From b786dcd7e696f14212ff4ffb926cbf91ab7a7672 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 9 Feb 2015 17:12:37 +0800 Subject: [PATCH 0001/2517] Translating by ZTinoZ --- .../20150114 What is a good IDE for C or C++ on Linux.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md index ad6dc965a7..bfd92b9d8a 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -1,7 +1,6 @@ -Translating by ZTinoZ -What is a good IDE for C/C++ on Linux +Linux上有哪些比较好的C/C++ IDE? ================================================================================ -"A real coder doesn't use an IDE, a real coder uses [insert a text editor name here] with such and such plugins." We all heard that somewhere. Yet, as much as one can agree with that statement, an IDE remains quite useful. An IDE is easy to set up and use out of the box. Hence there is no better way to start coding a project from scratch. So for this post, let me present you with my list of good IDEs for C/C++ on Linux. Why is C/C++ specifically? Because C is my favorite language, and we need to start somewhere. Also note that there are in general a lot of ways to code in C, so in order to trim down the list, I only selected "real out-of-the-box IDE", not text editors like Gedit or Vim pumped with [plugins][1]. Not that this alternative is bad in any way, just that the list will go on forever if I include text editors. +"一个真正的程序员是不用IDE的,他们是用uses insert a text editor name here with such and such plugins." We all heard that somewhere. Yet, as much as one can agree with that statement, an IDE remains quite useful. An IDE is easy to set up and use out of the box. Hence there is no better way to start coding a project from scratch. So for this post, let me present you with my list of good IDEs for C/C++ on Linux. Why is C/C++ specifically? Because C is my favorite language, and we need to start somewhere. Also note that there are in general a lot of ways to code in C, so in order to trim down the list, I only selected "real out-of-the-box IDE", not text editors like Gedit or Vim pumped with [plugins][1]. Not that this alternative is bad in any way, just that the list will go on forever if I include text editors. ### 1. Code::Blocks ### @@ -57,14 +56,14 @@ For all KDE fans out there, [KDevelop][11] might be the answer to your prayers. Finally, last for not least, [CodeLite][12] shows that you can take a traditional formula and still get something with its own feeling attached to it. If the interface really reminded me of Code::Blocks and Anjuta at first, I was just blown away by the extensive plugin library. Whether you want to diff a file, insert a copyright block, define an abbreviation, or push your work on Git, there is a plugin for you. If I had to nitpick, I would say that it lacks a few navigation shortcuts for my taste, but that's really it. -To conclude, I hope that this list had you discover new IDEs for coding in your favorite language. While Code::Blocks remains my favorite, it has some serious challengers. Also we are far from covering all the ways to code in C/C++ using an IDE on Linux. So if you have another one to propose, let us know in the comments. Also if you would like me to cover IDEs for a different language next, also let us know in the comment section. +最后,我希望that this list had you discover new IDEs for coding in your favorite language. While Code::Blocks remains my favorite, it has some serious challengers. Also we are far from covering all the ways to code in C/C++ using an IDE on Linux. So if you have another one to propose, let us know in the comments. Also if you would like me to cover IDEs for a different language next, also let us know in the comment section. -------------------------------------------------------------------------------- via: http://xmodulo.com/good-ide-for-c-cpp-linux.html 作者:[Adrien Brochard][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4a3098043b5cf5a9696138c918072d607fdf6352 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 10 Feb 2015 11:37:55 +0800 Subject: [PATCH 0002/2517] Translating by ZTinoZ --- .../20150114 What is a good IDE for C or C++ on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md index bfd92b9d8a..d050368ed1 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -1,12 +1,12 @@ Linux上有哪些比较好的C/C++ IDE? ================================================================================ -"一个真正的程序员是不用IDE的,他们是用uses insert a text editor name here with such and such plugins." We all heard that somewhere. Yet, as much as one can agree with that statement, an IDE remains quite useful. An IDE is easy to set up and use out of the box. Hence there is no better way to start coding a project from scratch. So for this post, let me present you with my list of good IDEs for C/C++ on Linux. Why is C/C++ specifically? Because C is my favorite language, and we need to start somewhere. Also note that there are in general a lot of ways to code in C, so in order to trim down the list, I only selected "real out-of-the-box IDE", not text editors like Gedit or Vim pumped with [plugins][1]. Not that this alternative is bad in any way, just that the list will go on forever if I include text editors. +"一个真正的程序员是不用IDE(译者注:集成开发环境)的,他们都是用带着某某插件的文本编辑器来写代码。"我们总能在某些地方听到此类观点。然而,尽管越来越多的人同意这样的观点,但是一个IDE仍然非常有用,它设置简单,使用起来也很方便,因此没有更好办法能像这样来编写一个项目了。所以鉴于这点,在这里我想给大家列一份在linux平台上比较好的C/C++ IDE清单。为什么特地说C/C++呢?因为C语言是我最喜欢的编程语言而且我们总要找个切入点来开始。另外要注意的是,通常有很多种编写C代码的方法,所以为了消减清单的篇幅,我只选择了"真正好用的IDE",而不是诸如Gedit或Vim这种注入[插件][1]的文本编辑器。并不是说这些编辑器在任何情况下都不好,只是如果我将文本编辑器包含进去那这份清单就将永无止境了。 ### 1. Code::Blocks ### ![](https://farm8.staticflickr.com/7520/16089880989_10173db27b_c.jpg) -Starting all out with my personal favorite, [Code::Blocks][2] is a simple and fast IDE for C/C++ exclusively. Like any respectable IDE, it integrates syntax highlighting, bookmarking, word completion, project management, and a debugger. Where it shines is via its simple plugin system which adds indispensable tools like Valgrind and CppCheck, and less indispensable like a Tetris mini-game. But my reason for liking it particularly is for its coherent set of handy shortcuts, and the large number of options that never feel too overwhelming. +用我个人的最爱来开篇,[Code::Blocks][2]是一款简单快速的专有C/C++ IDE。就像任何一款强大的IDE一样, 它集成了语法高亮、书签功能、自动补全功能、项目管理和一个调试器。Where it shines is via its simple plugin system which adds indispensable tools like Valgrind and CppCheck, and less indispensable like a Tetris mini-game. But my reason for liking it particularly is for its coherent set of handy shortcuts, and the large number of options that never feel too overwhelming. ### 2. Eclipse ### From d78f7ded4393fe5c0a02a05b3c4ee2213e1acbf2 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 11 Feb 2015 16:48:36 +0800 Subject: [PATCH 0003/2517] Translating by ZTinoZ --- .../20150114 What is a good IDE for C or C++ on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md index d050368ed1..2096f50b85 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -6,13 +6,13 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm8.staticflickr.com/7520/16089880989_10173db27b_c.jpg) -用我个人的最爱来开篇,[Code::Blocks][2]是一款简单快速的专有C/C++ IDE。就像任何一款强大的IDE一样, 它集成了语法高亮、书签功能、自动补全功能、项目管理和一个调试器。Where it shines is via its simple plugin system which adds indispensable tools like Valgrind and CppCheck, and less indispensable like a Tetris mini-game. But my reason for liking it particularly is for its coherent set of handy shortcuts, and the large number of options that never feel too overwhelming. +用我个人的最爱来开篇,[Code::Blocks][2]是一款简单快速的专有C/C++ IDE。就像任何一款强大的IDE一样, 它集成了语法高亮、书签功能、自动补全功能、项目管理和一个调试器。它闪耀的地方在于它简单的插件系统,里面添加了不可缺少的工具,像Valgrind和CppCheck,还有不太重要的比如像俄罗斯方块这样的小游戏。但是我特别喜欢它的理由是它连贯方便的快捷键设定和大量的却感受不到受压迫的选项设置。 ### 2. Eclipse ### ![](https://farm8.staticflickr.com/7522/16276001255_66235a0a69_c.jpg) -I know that I said only "real out-of-the-box IDE" and not a text editor pumped with plugins, but [Eclipse][3] is a "real out-of-the-box IDE." It's just that Eclipse needs a little [plugin][4] (or a variant) to code in C. So I technically did not contradict myself. And it would have been impossible to make an IDE list without mentioning the behemoth that is Eclipse. Like it or not, Eclipse remains a great tool to code in Java. And thanks to the [CDT Project][5], it is possible to program in C/C++ too. You will benefit from all the power of Eclipse and its traditional features like word completion, code outline, code generator, and advanced refactoring. What it lacks in my opinion is the lightness of Code::Blocks. It is still very heavy and takes time to load. But if your machine can take it, or if you are a hardcore Eclipse fan, it is a very safe option. +我知道我只说"真正好用的IDE"而不是带着插件的文本编辑器,但是,[Eclipse][3]的确是一款"真正好用的IDE",只是Eclipse需要一些[plugin][4](或经过一些改装)来编写C程序,所以严格来说我无法反驳我自己。而且,做一份IDE清单不提到Eclipse这个“巨人”是不可能的事情。无论喜欢它与否,Eclipse仍然是一款强大的Java编程工具。And thanks to the [CDT Project][5], it is possible to program in C/C++ too. You will benefit from all the power of Eclipse and its traditional features like word completion, code outline, code generator, and advanced refactoring. What it lacks in my opinion is the lightness of Code::Blocks. It is still very heavy and takes time to load. But if your machine can take it, or if you are a hardcore Eclipse fan, it is a very safe option. ### 3. Geany ### From 4663e6560ab83e78bb2daff978516aa0b82cb3ac Mon Sep 17 00:00:00 2001 From: J L Date: Wed, 11 Feb 2015 23:19:00 +0800 Subject: [PATCH 0004/2517] Announce for 20150205 --- ...xQuestions Survey Results Surface Top Open Source Projects.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md b/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md index c591faafcd..254684daaf 100644 --- a/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md +++ b/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md @@ -1,3 +1,4 @@ +[[jerryling315](https://github.com/jerryling315) 翻译中] LinuxQuestions Survey Results Surface Top Open Source Projects ================================================================================ ![](http://farm5.static.flickr.com/4099/4777335328_3cc363c419_m.jpg) From ab7f3b2951474f2ef198b87fbac1258fe29c7cff Mon Sep 17 00:00:00 2001 From: J L Date: Wed, 11 Feb 2015 23:39:30 +0800 Subject: [PATCH 0005/2517] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=2020150205?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ns Survey Results Surface Top Open Source Projects.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename {sources => translated}/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md (57%) diff --git a/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md b/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md similarity index 57% rename from sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md rename to translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md index 254684daaf..9dd834754b 100644 --- a/sources/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md +++ b/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md @@ -3,15 +3,16 @@ LinuxQuestions Survey Results Surface Top Open Source Projects ================================================================================ ![](http://farm5.static.flickr.com/4099/4777335328_3cc363c419_m.jpg) -Many people in the Linux community look forward to the always highly detailed and reliable results of the annual surveys from LinuxQuestions.org. As [Susan covered in detail in this post][1], this year's [results][2], focused on what readers at the site deem to be the best open source projects, are now available. Most of the people at LinuxQuestions are expert-level users who are on the site to answer questions from newer Linux users. +在Linux用户社区中, 很多人每年都会期待来自 LinuxQuestions.org 细致并可靠的年度问卷调查结果. 如同[Susan在她的报告][1]中指出的那样, 今年的[结果][2]着重于调查网站读者心中最棒的开源项目. 这份报告目前已经完成. 在LinuxQuestions的大多数人都是"专家级"的用户, 他们经常在网站上在线回答Linux新手们的提问. +在Susan所作的报告的附加内容里, 你可以看到由"专家"们对开源世界的关注点分布. In addition to the summary results that Susan provided in her post, below you'll find a graphical snapshot of what the experts took note of on the open source front. -You can get a very nice graphical summary of the findings from the LinuxQuestions survey [here][3]. Here is a snapshot of the site's determination of the best Linux distributions, where Mint and Slackware fare quite well: +你也可以在[这里][3]找到一份较为精美的调查问卷总结图.这里呈现了网站投票得出的最佳Linux发行版, 可以看到Mint和Slackwaer平分了半壁江山: ![](http://i1311.photobucket.com/albums/s669/webworkerdaily/lin_zps9ogvyrty.png) -And below is a snapshot of the site's determination of the best cloud projects. Notably, the LinuxQuestions crowd gives very high praise to ownCloud. Definiitely check into the full results of the survey at the site, see [Susan's summary][4] of winners, and check out all the good graphics [here][5]. +而下图则是网站票选出的得出的最佳云项目. 值得注意的是, LinuxQuestions的用户群体给予了ownCloud项目极高的评价. 你一定得亲自去看看调查结果的详情, 也看看 [Susan关于各项目"赢家"][4]的总结 , 还有[一堆精美的图表][5]. ![](http://i1311.photobucket.com/albums/s669/webworkerdaily/lin2_zps9nxf7yyi.png) @@ -20,7 +21,7 @@ And below is a snapshot of the site's determination of the best cloud projects. via: http://ostatic.com/blog/linuxquestions-survey-results-surface-top-open-source-projects 作者:[Sam Dean][a] -译者:[译者ID](https://github.com/译者ID) +译者:[jerryling315](https://github.com/jerryling315) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From fe6017ced8f9e1522f81398e1d1d63908bb20df9 Mon Sep 17 00:00:00 2001 From: J L Date: Wed, 11 Feb 2015 23:40:16 +0800 Subject: [PATCH 0006/2517] Delete Translating note --- ...xQuestions Survey Results Surface Top Open Source Projects.md | 1 - 1 file changed, 1 deletion(-) diff --git a/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md b/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md index 9dd834754b..0052aab380 100644 --- a/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md +++ b/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md @@ -1,4 +1,3 @@ -[[jerryling315](https://github.com/jerryling315) 翻译中] LinuxQuestions Survey Results Surface Top Open Source Projects ================================================================================ ![](http://farm5.static.flickr.com/4099/4777335328_3cc363c419_m.jpg) From 328b0c29ee30f71c0dd2352f81ac2aff7d0562c5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 12 Feb 2015 11:15:51 +0800 Subject: [PATCH 0007/2517] translating --- ...o Protect Ubuntu Server Against the GHOST Vulnerability.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md b/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md index a78b786606..3ff863af55 100644 --- a/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md +++ b/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md @@ -1,3 +1,5 @@ +Translating---geekpi + How To Protect Ubuntu Server Against the GHOST Vulnerability ================================================================================ On January 27, 2015, a GNU C Library (glibc) vulnerability, referred to as the GHOST vulnerability, was announced to the general public. In summary, the vulnerability allows remote attackers to take complete control of a system by exploiting a buffer overflow bug in glibc's GetHOST functions.Check more details from [here][1] @@ -41,4 +43,4 @@ via: http://www.ubuntugeek.com/how-to-protect-ubuntu-server-against-the-ghost-vu 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.ubuntugeek.com/author/ubuntufix -[1]:http://chargen.matasano.com/chargen/2015/1/27/vulnerability-overview-ghost-cve-2015-0235.html \ No newline at end of file +[1]:http://chargen.matasano.com/chargen/2015/1/27/vulnerability-overview-ghost-cve-2015-0235.html From dacd5b1d1671cb7e8f837fc5e262f19cf811c3ac Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 12 Feb 2015 11:27:25 +0800 Subject: [PATCH 0008/2517] translated --- ... Server Against the GHOST Vulnerability.md | 46 ------------------- ... Server Against the GHOST Vulnerability.md | 44 ++++++++++++++++++ 2 files changed, 44 insertions(+), 46 deletions(-) delete mode 100644 sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md create mode 100644 translated/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md diff --git a/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md b/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md deleted file mode 100644 index 3ff863af55..0000000000 --- a/sources/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md +++ /dev/null @@ -1,46 +0,0 @@ -Translating---geekpi - -How To Protect Ubuntu Server Against the GHOST Vulnerability -================================================================================ -On January 27, 2015, a GNU C Library (glibc) vulnerability, referred to as the GHOST vulnerability, was announced to the general public. In summary, the vulnerability allows remote attackers to take complete control of a system by exploiting a buffer overflow bug in glibc's GetHOST functions.Check more details from [here][1] - -The GHOST vulnerability can be exploited on Linux systems that use versions of the GNU C Library prior to glibc-2.18. That is, systems that use an unpatched version of glibc from versions 2.2 to 2.17 are at risk. - -### Check System Vulnerability ### - -You can use the following command to check the glib version - - ldd --version - -### Output ### - -ldd (Ubuntu GLIBC 2.19-10ubuntu2) **2.19** -Copyright (C) 2014 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -Written by Roland McGrath and Ulrich Drepper. - -The glib version should be above 2.17 and from the output we are running 2.19.If you are seeing glib version between 2.2 to 2.17 then you need to run the following commands - - sudo apt-get update - - sudo apt-get dist-upgrade - -After the installation you need to reboot the server using the following command - - sudo reboot - -After reboot use the same command again and check the glib version. - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/how-to-protect-ubuntu-server-against-the-ghost-vulnerability.html - -作者:[ruchi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ubuntugeek.com/author/ubuntufix -[1]:http://chargen.matasano.com/chargen/2015/1/27/vulnerability-overview-ghost-cve-2015-0235.html diff --git a/translated/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md b/translated/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md new file mode 100644 index 0000000000..38b7c955d3 --- /dev/null +++ b/translated/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md @@ -0,0 +1,44 @@ +如何让Ubuntu服务器远离鬼影漏洞影响 +================================================================================ +2015年1月27日,GNU C库(glibc)的一个漏洞也称鬼影漏洞被公诸于众。总的来说,这个漏洞允许远程攻击者利用glibc中的GetHOST函数的缓冲区溢出漏洞来获得系统的完全控制。点击[这里][1]获得更多细节。 + +鬼影漏洞可在版本在glibc-2.18之前的Linux系统上被利用。也就是说没有打过补丁的版本2.2到2.17都是有风险的。 + +### 检查系统漏洞 ### + +你可以使用下面的命令来检查glib的版本 + + ldd --version + +### 输出 ### + +ldd (Ubuntu GLIBC 2.19-10ubuntu2) **2.19** +Copyright (C) 2014 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +Written by Roland McGrath and Ulrich Drepper. + +glib的版本应该高于2.17,我们的输出是2.19。如果你看到glib的版本在2.2到2.17之间。你应该运行下面的命令。 + + sudo apt-get update + + sudo apt-get dist-upgrade + +安装完之后,你应该用下面的命令重启系统。 + + sudo reboot + +重启完成之后,你可以用同样的命令来检查glib的版本。 + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/how-to-protect-ubuntu-server-against-the-ghost-vulnerability.html + +作者:[ruchi][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix +[1]:http://chargen.matasano.com/chargen/2015/1/27/vulnerability-overview-ghost-cve-2015-0235.html From 80a04dd35f2f41294267b4a7fb22c5ac7078ecef Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Thu, 12 Feb 2015 11:30:48 +0800 Subject: [PATCH 0009/2517] Update 20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md --- ...8 Meet Vivaldi--A New Web Browser Built for Power Users.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md b/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md index 78122cd7c8..77e9762b7f 100644 --- a/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md +++ b/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md @@ -4,13 +4,13 @@ **这一周一个为了满足高手级用户的需要而制造出来的全新网页浏览器已然来临——而且它已经可以在Linux上使用了。** -Vivaldi就是这个新浏览器的名字,而且它还面向64位Linux,Windows和Mac机的技术预览版(请读:无责任测试)发行。它是在 — 震惊 — 尝试且已测试过的Chromium开源框架,Blink和Google的开源V8 JavaScript引擎(以及其他项目)的基础上制造的。 +Vivaldi就是这个新浏览器的名字,而且它还面向64位Linux,Windows和Mac机发布了技术预览版(请读:无责任测试)。它是在 — 震惊 — 尝试且已测试过的Chromium开源框架,Blink和Google的开源V8 JavaScript引擎(以及其他项目)的基础上制造的。 这个世界真的想要再有一个浏览器吗?Vivaldi——出自Opera软件前首席执行官Jon S.von Tetzchner的想法——不怎么关注所要,更关注所需。 Vivaldi被制造成带有着偏向于键盘操作的tab键瘾君子所需的那种功能。并没有为那些认为Firefox复杂或是对Chrome的唯一批评是它改动了书签按钮的用户而进行修改。 -这也不是什么俗气的营销噱头。不去看它所戴的‘技术预览版’标签,Vivaldi已经有了明显偏向于高手级用户们的功能。 +这也并不是什么俗气的营销噱头。尽管它带有‘技术预览版’标签,Vivaldi已经有了明显偏向于高手级用户们的功能。 相当多的人觉得自己被其他软件公司所生产的简化的,配对后发行的产品遗弃了、糊弄了。Vivaldi——即使在这个过渡期的早期——看起来适逢其会以至于打败了其他产品。 From 6085276ada05eecaa8242feaaf5eb9ace9df063b Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 12 Feb 2015 12:25:00 +0800 Subject: [PATCH 0010/2517] Delete 20141203 Undelete Files on Linux Systems.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完毕,删除源文件。 --- ...0141203 Undelete Files on Linux Systems.md | 120 ------------------ 1 file changed, 120 deletions(-) delete mode 100644 sources/tech/20141203 Undelete Files on Linux Systems.md diff --git a/sources/tech/20141203 Undelete Files on Linux Systems.md b/sources/tech/20141203 Undelete Files on Linux Systems.md deleted file mode 100644 index 126501e225..0000000000 --- a/sources/tech/20141203 Undelete Files on Linux Systems.md +++ /dev/null @@ -1,120 +0,0 @@ -Translating by FSSlc - -Undelete Files on Linux Systems -================================================================================ -Often times, a computer user will delete a needed file accidentally and not have an easy way to regain or recreate the file. Thankfully, files can be undeleted. When a user deletes a file, it is not gone, only hidden for some time. Here is how it all works. On a filesystem, the system has what is called a file allocation list. This list keeps track of what files are where on the storage unit (hard-drive, MicroSD card, flash-drive, etc.). When a file is deleted, the filesystem will perform one of two tasks on the allocation table. The file's entry on the file allocation table marked as "free space" or the file's entry on the list is erased and then the space is marked as free. Now, if a file needs to be placed on the storage unit, the operating system will put the file in the space marked as empty. After the new file is written to the "empty space", the deleted file is now gone forever. When a deleted file is to be recovered, the user must not manipulate any files because if the "empty space" is used, then the file can never be retrieved. - -### How do undelete programs work? ### - -The majority of filesystems only mark the space as empty. With these filesystems, the undelete program looks at the file allocation list and copies the deleted file to another storage unit. If the files were copied to the same storage unit, then the user could lose other deleted files that are needed. - -Rarely do filesystems erase the allocation table entry. If a filesystem does, this is how an undelete program undeletes the file. The program searches the storage unit for file headers. All files have a specific string of code that is at the very beginning of the file. This is called a magic number. For example, the magic number of a compiled JAVA class is the hex number "CAFEBABE". So, an undelete program would find "CAFEBABE" and copy that file to another storage unit. Some undelete programs can look for a specific file type. The user may want a PDF, so the program searches for the hex magic number "25504446" which is the ASCII code for "%PDF". Other undelete programs search for all magic numbers. Then, the user can select which deleted files to recover. - -If a part of the file has been written over, then the whole file will be corrupted. The file can usually be recovered, but the contents will be useless. For instance, recovering a corrupted JPEG file will be pointless because the image viewer will not be able to generate an image from the file. So, the user has the file, but the file is useless. - -### Device Locations: ### - -Before we continue, here is some information that will aid in directing the undelete utilities to the correct storage unit. All devices are in the /dev/ folder. The name of each device (not the name that the admin gave each partition or device) that is given by the system follows a predictable scheme. The second partition on the first SATA hard-drive would be sda2. The first letter indicates the storage type, in this case SATA, but an "s" could also mean SCSI, FireWire, or USB. The second letter "d" means disk. The third letter indicates the device number, so an "a" would be the first SATA and a "b" would be the second. The number displays the partition. To name the whole device with all partitions type the letters without the number. For this example that would be sda. Other possible letters "h" as the first letter. This means PATA hard-drive (IDE). As some examples of this scheme, a user has a computer with one SATA hard-drive (sda). The drive has four partitions - sda1, sda2, sda3, and sda4. The user deletes the third one, but sda4 remains sda4 until sda4 is reformatted. The user then plugs in a usb memory card (sdb) with one partition - sdb1. The user then adds a IDE hard-drive with one partition - hda1. Next, the user adds a SCSI hard-drive - sdc1. Then, the user removes the USB memory card (sdb). Now, the SCSI remains sdc, but if the SCSI is removed and added back, it will be sdb. Even though other storage device existed, the IDE drive will have the "a" because it is the first IDE drive. IDE devices are numbered separately from SCSI, SATA, FireWire, and USB devices. - -### Recovery: ### - -Each undelete program has different abilities, features, and support for various filesystems. Below are some instructions for using TestDisk to recover files on a set of filesystems. - -**FAT16, FAT32, exFAT (FAT64), NTFS, and ext2/3/4:** - -TestDisk is an open-source, free program that works on Linux, *BSD, SunOS, Mac OS X, DOS, and Windows. TestDisk can be found here: [http://www.cgsecurity.org/wiki/TestDisk][1]. TestDisk can also be installed by typing "sudo apt-get install testdisk". TestDisk has many abilities, but this article is concerned with undeleting files. - -Open TestDisk in a terminal using root privileges by typing “sudo testdisk”. - -Now, the TestDisk command-line application will execute. The terminal appearance will change. TestDisk asks the user if it can keep logs. This is entirely up to the user. If the user is recovering files from the system storage, then do not keep a log. The choices are "Create", "Append", and "No Log". If the user wants a log, it is kept in that user's home folder. - -![](http://www.linux.org/attachments/screen1-jpg.342/) - -In the following screen, the storage devices are listed using the /dev/* method. For my system, the system's storage unit is /dev/sda. This means that my storage unit is a SATA hard-drive (sd) and it is the first hard-drive (a). The size of each storage unit is displayed in Gigabytes. Use the up and down arrows to select a storage device and hit enter. - -![](http://www.linux.org/attachments/screen2-jpg.343/) - -The next screen displays a list of partition table (also called partition map) types. Just as there is the file allocation table for files, there is a table for the partitions. Partitions are dividers on a storage device. For instance, on almost all Linux systems there is at least two partitions - EXT3/4 and Swap. Each partition table will be briefly described. TestDisk does not support all partition tables, so this is not a complete list. - -![](http://www.linux.org/attachments/screen3-jpg.344/) - -- **Intel** - This partition table is very common on Windows systems and many Linux systems. This table is also know as MBR. -- **EFI GPT** - This is usually used with Linux systems. This partition map is most recommended for Linux because the concept of logical/extended partitions does not apply to GPT (GUID Partition Table) tables. This means that a Linux user can multiboot many forms of Linux with one Linux OS on each partition. There are other advantages to using GPT, but that is beyond this article. -- **Humax** - Humax maps are used with device made by the South Korean company Humax. -- **Mac** - The Apple Partition Map (APM) is used by Apple devices. -- **None** - Some devices do not have a partition table. For instance, many Subor game consoles do not use a partition map. If a user tried to undelete a file on these devices thinking that the partition map was one of the other choices, the user will be confused by the fact that TestDisk does not find any filesystem or files. -- **Sun** - The Sun partition table is used by Sun systems. -- **Xbox** - The Xbox uses the Xbox partition map for its storage devices. - -If a user selects "Xbox" even though their system uses GPT, TestDisk will not be able to find a partition or filesystem. If it does, then it will guess incorrectly. (The image below displays the output when the incorrect partition type) - -![](http://www.linux.org/attachments/xbox-jpg.350/) - -Once the user picks the correct choice for their device, on the next screen, select "Advanced". - -![](http://www.linux.org/attachments/screen4-jpg.345/) - -Now, the user should see a list of all of their filesystems/partitions on the storage unit. If the user had chosen the wrong partition map, then here is where they will know if they made the incorrect selection. If there are no errors, highlight the partition that contains the deleted file by placing the text-based cursor on it. Use the left and right arrows to highlight "List" on the bottom of the terminal. Now, hit enter. - -![](http://www.linux.org/attachments/screen5-jpg.346/) - -A new screen is displayed with a list of files and folders. The whitish files are current files that are not deleted. The red files have been deleted. On the far right column is the files' names. The next column over to the left is the creation date of the file. One column over to the left again is the files' sizes in bytes. To the far left is a column with dashes, "d"s, "r"s, "w"s, and "x"s. These are the file permissions. A "d" indicates that the item is a directory. The rest of the permission syntax is irrelevant to this article. The item on the top of the file list titled "." means the current directory. The second object titled ".." means go up one directory, so a user can move up a directory by selecting this line. For an example, I will go into the directory "Xaiml_Dataset". The folder is nearly full of deleted files. I will undelete "computers.xaiml" by pressing "c" on the keyboard. I am now asked to select a destination directory. Of course, I will put it on another partition. I am in my home folder, and I press "c". It does not matter what folder is highlighted. The current folder is the destination directory. Now, I am back to the list of files. At the top of the screen is a message that says "Copy Done!". In my home folder is a folder called "Xaiml_Dataset", and inside is the Xaiml file. If I press "c" on more deleted files, they will be placed in the new folder without a****g me for a destination. - -![](http://www.linux.org/attachments/screen6-jpg.347/) - -![](http://www.linux.org/attachments/screen7-jpg.348/) - -![](http://www.linux.org/attachments/screen8-jpg.349/) - -When finished press "q" repeatedly until the normal terminal is seen. The folder "Xaiml_Dataset" can only be accessed by the root. To fix this, use root privileges to change the folder permissions and the contained files. After that, the files have been recovered and accessible to the user. - -### ReiserFS: ### - -To undelete a file from a ReiserFS filesystem, make a backup of all of the files on the partition because this method can cause the file to be lost if something goes wrong. Next, execute the following command where DEVICE is the device in the form sda2. Some files will be put in the lost+found directory and other will remain where they were before deletion. - - reiserfsck --rebuild-tree --scan-whole-partition /dev/DEVICE - -### Recover Deleted File that is Open in a Program: ### - -Assume a user accidentally deletes a file that a program has open. The file of the hard-drive was deleted, but the program is using a copy of the file that is on the RAM. Thankfully, there are two easy solutions. - -If the program has save capabilities like a text editor, the user can resave the file. Thus, the file editor will write the file to the hard-drive. - -Assume that this is an MP3 file in a music player. The music player cannot save the MP3 file. This task requires a little more time than the previous situation. Unfortunately, this method does not work on all systems and applications. To begin, type the following command. - - lsof -c smplayer | grep mp3 - -This command LiSts all of the Open Files used by Smplayer. This list is piped (given) to grep which searches for mp3. The output looks like the following. - - smplayer 10037 collier mp3 169r 8,1 676376 1704294 /usr/bin/smplayer - -Now, type the following command to recover the file directly from the RAM (on Linux systems, /proc/ is the RAM) and copy it to a folder of choice. The "cp" is the copy command. The 10037 number comes from the process number given in the output. The 169 is the file descriptor shown in the output. The "~/Music/" is the destination directory. Lastly, "music.mp3" is the file name that the user wants for the file. - - cp /proc/10037/fd/169 ~/Music/music.mp3 - -### Real Deletion: ### - -To make for sure that a file can never be recovered, use a command that "wipes" the hard-drive. Wiping the hard-drive means writing meaningless data to the disk. For example, many wiping programs write zeros, random letters, or random data to the hard-drive. No space is taken up or lost. The wiping program just overwrites the "empty space". If the storage unit is ever full of files with no free space remaining, then all of the previously deleted files will be gone. - -The purpose of wiping hard-drives is to make sure that private data is never seen. For illustration, a company may order new computers. The manager decides to sell the old computers. However, there is concern that the new owners may view company secrets or customer information like credit card numbers and addresses. Thankfully, a computer technician in the company can wipe the hard-drives before selling the old computers. - -To install secure-delete, a wiping program, type "sudo apt-get install secure-delete". This installs a set of four commands that make sure that deleted files are never recovered. - -- srm - permanently delete a file. Usage: srm -f ./secret_file.txt -- sfill - wipe the free space. Usage: sfill -f /mount/point/of/partition -- sswap - wipe swap space. Usage: sswap -f /dev/SWAP_DEVICE - -If computers were to truly delete a file selected for deletion, then more time would be required to perform the task. It is quick and easy to mark some space as free, but to make the file gone forever requires time. Wiping a storage unit, for instance, takes a few hours to complete (depending on storage size). Overall, the current system works well because even when a user empties the recycle bin, they still have another chance to change their mind. - --------------------------------------------------------------------------------- - -via: http://www.linux.org/threads/undelete-files-on-linux-systems.4316/ - -作者:[DevynCJohnson][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linux.org/members/devyncjohnson.4843/ -[1]:http://www.cgsecurity.org/wiki/TestDisk From d09ecfd9a8f017e08aa1bc690fd5481cbb4b680e Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 12 Feb 2015 12:27:45 +0800 Subject: [PATCH 0011/2517] =?UTF-8?q?=E3=80=90Translated=E3=80=9120141203?= =?UTF-8?q?=20Undelete=20Files=20on=20Linux=20Systems.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完毕。FSSlc --- ...0141203 Undelete Files on Linux Systems.md | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 translated/tech/20141203 Undelete Files on Linux Systems.md diff --git a/translated/tech/20141203 Undelete Files on Linux Systems.md b/translated/tech/20141203 Undelete Files on Linux Systems.md new file mode 100644 index 0000000000..c5c6d9409d --- /dev/null +++ b/translated/tech/20141203 Undelete Files on Linux Systems.md @@ -0,0 +1,118 @@ +怎样在 Linux 系统中恢复已删除文件 +================================================================================ +大多数情况下,一个电脑用户可能意外地删除了一个仍然需要的文件,但没有一个简便的方法来重新找回或重建这个文件。幸好,文件可以被恢复。当用户删除了一个文件,该文件并没有消失,只是被隐藏了一段时间。这里将解释它是如何工作的。在一个文件系统中,有一个叫做 `文件分配表` 的文件,这个表跟踪文件在存储单元(硬盘, MicroSD 卡,闪存驱动器 等等)中的位置。当一个文件被删除,文件系统将会在`文件分配表`中执行以下 两个任务中的一个:这个文件在`文件分配表`上的条目被标记为 “空白空间” 或 这个文件在`文件分配表`的条目被擦除,且相应的空间被标记为 空白空间 。现在,如果一个文件需要被放置在一个存储单元上,操作系统将会把这个文件放置到标记为 空白 的空间中。在新文件被写入到这个空白空间后,被删除的文件就彻底消失了。当需要恢复一个已经删除的文件时,用户绝对不能再对任何文件进行操作,因为假如 该文件对应的 空白空间 被占用,这个文件就永远也不能恢复了。 + +### 恢复软件是如何工作的? ### + +大多数的文件系统只是标记空间为空白,在这些文件系统下,恢复软件查看`文件分配表`这个文件,然后复制被删除的文件到另外的存储单元中。假如该文件被复制到原来所处的存储单元中,那么用户将有可能会失去那个所需的删除文件。 + +文件系统很少会擦除`文件配置表`中的条目。假如文件系统真的这样做了, 这便是恢复软件在恢复文件了。恢复软件在存储单元中扫描文件头,所有文件都拥有一个特殊的编码字符串,它们位于文件的最前面,也被叫做 `魔法数字`。例如,一个编译的 JAVA 类文件的魔法数字在十六进制中是“CAFEBABE”。所以,假如要恢复该类型的文件,恢复软件会查找 “CAFEBABE” 然后复制文件到另一个存储单元。一些恢复软件可以查找某种特殊的文件类型。若用户想恢复一个 PDF 文件,则恢复软件将会查找十六进制的魔法数字 “25504446”,这恰恰是 ASCII 编码中的 “%PDF”。其他的恢复软件将查找所有的魔法数字。然后,用户可以选择恢复哪个已删除的文件。 + +假如一个文件的部分被重写了,则整个文件就会被损坏。通常这个文件可以被恢复,但是其中的内容可能已经没有什么用处。例如,恢复一个已损坏的 JPEG 文件将会是无意义的,因为 图片查看器不能从这个损坏的文件产生一幅图片。因此,即使用户拥有了这个文件,该文件也将毫无用处。 + +### 设备的位置: ### + +在我们继续之前,下面的一些信息将会对 指引恢复软件找到正确的存储单元 起到一定的帮助。所有的设备均挂载在 `/dev/` 目录下。操作系统赋予每个设备的名称(并不是管理员给予每个分区或设备的名称) 遵循一定的命名规律。第一个 SATA 硬盘的第二个分区的名称将会是 sda2。名称的第一个字母暗示了存储类型,在这里指的是 SATA,但字母 “s” 也可能指的是 SCSI, FireWire(火线端口), 或 USB。第二个字母 “d” 指的是 disk(硬盘)。第三个字母指的是设备序数,即字母 “a” 指的是第一个 SATA 而 “b” 指的是第二个。最后的数字代表分区。一个带有所有分区的设备的命名将只有字母而没有数字。对于上面的例子,对应的名称为 sda 。作为命名的第一个字母还可能是 “h” ,这对应 PATA 硬盘(IDE)。以下为命名规律的一些例子。假如一个用户有一个 SATA 硬盘(sda),这个设备有 4 个分区- sda1, sda2, sda3, 和 sda4 。该用户删除了第三个分区,但直到格式化第四个分区之前,将第四个分区保留。然后该用户插入了一个带有一个分区 - 即sdb1- 的 usb 存储卡(sdb),又增加了一个 带有一个分区 -hda1- 的 IDE 硬盘 ,接着该用户又增加了一个 SCSI 硬盘 - sdc1 。接着用户移除了 USB 存储卡(sdb)。现在,SCSI 硬盘的名称仍然为 sdc,但如果这个 SCSI 被移除接着再被插入,则它的名称将变为 sdb。即使其他的存储设备仍然存在, 那个 IDE 硬盘的名称仍会有一个 “a”, 因为它是第一个 IDE 硬盘,IDE 设备的命名与 SCSI, SATA, FireWire, 和 USB 设备要分开计数。 + +### 恢复: ### + +每个恢复软件有其不同的功能,特征及支持的不同文件系统。下面是一些关于 使用 TestDisk 在一系列的文件系统中恢复文件的指南。 + +**FAT16, FAT32, exFAT (FAT64), NTFS, 以及 ext2/3/4:** + +TestDisk 是一个运行在 Linux, *BSD, SunOS, Mac OS X, DOS, 和 Windows 等操作系统下的开源,免费软件。 TestDisk 可以从下面的链接中找到 :[http://www.cgsecurity.org/wiki/TestDisk][1]。TestDisk 也可以通过键入 `sudo apt-get install testdisk` 来安装。TestDisk 有着许多的功能,但这篇文章将只关注 恢复文件 这个功能。 + +使用 root 权限从终端中打开 TestDisk 可以通过键入 `sudo testdisk` 命令。 + +现在, TestDisk 命令行应用将会被执行。终端的外观将会改变。TestDisk 询问用户 它是否可以保留日志,这完全由用户决定。假如一个用户正从系统存储中恢复文件,则 TestDisk 不会保留日志。可选择的选项有 "生成", "追加", 和 "无 log"。假如用户想保留日志,则日志将会保留在该用户的主目录。 + +![](http://www.linux.org/attachments/screen1-jpg.342/) + +在接着的屏幕中,存储设备以 `/dev/*`的方式被罗列出来。对于我的系统,系统的存储单元为 `/dev/sda`,这意味着我的存储单元为 一个 SATA硬盘(sd) 且它是第一个硬盘(a)。每个存储单元的容量以 Gigabyte(千兆字节)为单位显示的。使用上下键来选择一个存储设备然后点击进入。 + +![](http://www.linux.org/attachments/screen2-jpg.343/) + +下一屏显示出一个列有分区表(也叫做 分区映射表)的清单。正如文件有`文件配置表`,分区有着分区表。分区是存储设备上的划分部分。例如在几乎所有的 Linux 系统中,至少存在两种分区类型 - EXT3/4 和 Swap 。每一个分区表将会在下面被简要地描述。TestDisk 并不支持所有类型的分区表,所以下面的列表不是完整的。 + +![](http://www.linux.org/attachments/screen3-jpg.344/) + +- **Intel** - 这类分区表在 Windows 系统和许多的 Linux 系统中非常普遍,它也以 MBR 的名称为人们熟知。 +- **EFI GPT** - 这种类型的分区表通常用在 Linux 系统中。对于 Linux系统,这种分区表是最为推荐的, 因为逻辑分区或扩展分区的概念并不适用于 GPT (GUID Partition Table) 分区表。 这意味着,如果每个分区中有一个 Linux 系统,一个 Linux 用户可以从多种类型的 Linux 系统中进行多重启动。当然使用 GPT 分区表还有其他的优势,但那些已超出了本文的讨论范围。 +- **Humax** - Humax 分区映射表适用于韩国公司 Humax 生产的设备。 +- **Mac** - Apple 分区映射表 (APM) 适用于 Apple 的设备。 +- **None** - 某些设备并没有分区表。例如,许多 Subor 游戏控制台不使用分区映射表。如果一个用户试图从这类设备中恢复文件, 并且认为分区表不是其他的类型,则实际上 TestDisk 并不能找到任何的文件系统或者文件,这将给用户带来困扰。 +- **Sun** - Sun 分区表适用于 Sun 系统。 +- **Xbox** -Xbox 适用于使用 Xbox 分区映射表的自家存储设备。 + +假如用户选择了 “Xbox” ,尽管他的系统使用了 GPT 分区表, 那么 TestDisk 将不能找到任何分区或文件系统。假如 TestDisk 按照用户的选择执行,则它将不正确地进行猜测。(下面的图片显示的是当分区表类型错误时的输出) + +![](http://www.linux.org/attachments/xbox-jpg.350/) + +一旦用户为他们的设备选择了正确的选项,则在下一屏中,选择 “高级” 选项。 + +![](http://www.linux.org/attachments/screen4-jpg.345/) + +现在,用户将看到一个列有 在用户的存储设备中所有的文件系统或分区 的列表。假如用户选择了错误的分区映射表,则在这一步中用户就将会知道他们做出了错误的选择。假如没有错误,通过放置文字类型的光标来高亮含有被删除文件的分区。使用 左右键 来高亮位于终端底部的 “列表”。接着,点击确认。 + +![](http://www.linux.org/attachments/screen5-jpg.346/) + +新的一屏便会呈现出列有文件和目录的列表。那些发白的文件就是还没有被删除的文件,而红色的文件就是那些已经被删除了的文件。最右边的一列是文件的名称,从右到左方向的接着一列是文件的创建日期,再往左的一列是文件的大小(以 byte(比特) 为单位),最左边带有虚线, “d” ,“r”, “w” 和"x"的一列则代表的是文件的权限情况。“d” 表示该文件为一个目录,其他的权限术语与本文关系不大。在列表的最顶端以“.”代表的一项表示当前目录,第二行以".."代表的一项表示当前目录的上级目录,通过选择这一行,用户可以到达上级目录。举个例子,我想进入"Xaiml_Dataset" 目录,该目录基本上由被删除的文件组成。通过按键盘上的 "c"键,我将恢复文件 "computers.xaiml",接着我被询问选择一个目标目录,当然,我将放置该文件到另一个分区中。现在,我在我的家目录中,并按下了“c”键。哪个目录被高亮并没有什么影响。当前目录就是目标目录,在屏幕的上方,将会显示“复制完成”的消息。在我的家目录中便会有一个名为"Xaiml_Dataset"的目录,里面里有名为 Xaiml 的文件。 假如我在更多的 已删除文件上按“c” 键,则这些文件将会被放置到新的文件夹中而无需再向我询问目标目录。 + +![](http://www.linux.org/attachments/screen6-jpg.347/) + +![](http://www.linux.org/attachments/screen7-jpg.348/) + +![](http://www.linux.org/attachments/screen8-jpg.349/) + +当这些步骤完成后,重复按“q”键直到看到正常的终端模样。目录"Xaiml_Dataset" 只能被 root 用户访问。为了修复这个问题,使用 root 权限改变该目录及其子目录的权限。做完这些后,文件便被恢复了且用户可以访问它们。 + +### ReiserFS: ### + +为了从 ReiserFS 文件系统中恢复一个文件,首先需将分区中的所有文件做一个备份。因为如果发生某些错误, 这个方法可能会引起文件丢失。接着执行下面的命令,其中 `DEVICE`指的是那些以 sda2 形式命名的设备。一些文件将被放入 lost+found 目录而其他则会保存到原先被删除的位置。 + + reiserfsck --rebuild-tree --scan-whole-partition /dev/DEVICE + +### 恢复被某个程序打开的删除文件: ### + +假设用户意外地删除了一个文件,且该文件被某个程序打开。虽然在硬盘中该文件被删除了,但这个程序正使用着位于 RAM 中的该文件的副本。幸好,我们有两种简单的解决方法来恢复该文件。 + +假如这个软件有自动保存功能,如文本编辑器,则用户可以重新保存该文件,这样,文本编辑器可以将该文件写入硬盘中。 + +假设在音乐播放器中有一个 MP3 文件,而该音乐播放器并不能保存该 MP3 文件,则这种情形下需要比先前花更多的时间来恢复文件。不幸的是,这种方法并不能保证在所有的系统和应用中有效。首先,键入下面的命令。 + + lsof -c smplayer | grep mp3 + +上面的命令会列出所有由 smplayer 使用的文件,这个列表由 `grep` 命令通过管道搜索 mp3 。命令的输入类似于下面: + + smplayer 10037 collier mp3 169r 8,1 676376 1704294 /usr/bin/smplayer + +现在,键入下面的命令来直接从 RAM(在 Linux 系统中,`/proc/`代表 RAM) 中恢复文件,并复制该文件到选定的文件夹中。其中 `cp` 指的是复制命令,输出中的数字 10037 来自于进程数,输出中的数字 169 指的是文件描述符,"~/Music/"为目标目录,最后的 "music.mp3" 为用户想恢复的文件的名称。 + + cp /proc/10037/fd/169 ~/Music/music.mp3 + +### 真正的删除: ### + +为确保一个文件不能被恢复,可以使用一个命令来 “擦除” 硬盘。擦除硬盘意味着向硬盘中写入无意义的数据。例如,许多擦除程序向硬盘中写入零,随机字母或随机数据,没有空间将会被占用或丢失,擦除程序只是对空白空间进行重写覆盖。假如存储单元被文件占满而没有空余空间,则所有先前被删除的文件将会消失。 + +擦除硬盘的目的是确保隐私数据不被他人看见。举个例子,一个公司可能预订了一些新的电脑,总经理决定将旧的电脑卖掉,然而,新的电脑拥有者可能会看到公司的一些机密或诸如信用卡号码,地址等顾客信息。幸好,公司的电脑技术人员可以在卖掉这些旧电脑之前,擦除这些硬盘。 + +为了安装擦除程序 secure-delete,键入 `sudo apt-get install secure-delete`,这个命令将会安装一个包含 4 个程序的程序集,用以确保被删除的文件不能被恢复。 + +- srm - 永久删除一个文件。使用方法: `srm -f ./secret_file.txt` +- sfill - 擦除空白空间。使用方法: `sfill -f /mount/point/of/partition` +- sswap - 擦除 swap 空间。使用方法: `sswap -f /dev/SWAP_DEVICE` + +假如电脑真的要去删除打算删除的文件,那么需要花费更长的时间去执行删除任务。将某些空间标记为空白空间是快速且容易的,但使得文件永远消失需要花费一定的时间。例如,擦除一个存储单元,可能需要花费几个小时的时间(根据磁盘容量大小)。总之,当前的系统工作良好,因为即便用户清空了垃圾箱,他们仍然有另一次机会来改变他们当初的想法。 + +-------------------------------------------------------------------------------- + +via: http://www.linux.org/threads/undelete-files-on-linux-systems.4316/ + +作者:[DevynCJohnson][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linux.org/members/devyncjohnson.4843/ +[1]:http://www.cgsecurity.org/wiki/TestDisk From 05fe9ecaf54a2a8f2efa5bbe0c382f9dcf99c6ba Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:38:19 +0800 Subject: [PATCH 0012/2517] Delete 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md --- ...umble in Ubuntu an Opensource VoIP Apps.md | 80 ------------------- 1 file changed, 80 deletions(-) delete mode 100644 sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md diff --git a/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md deleted file mode 100644 index f49cc07c31..0000000000 --- a/sources/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ /dev/null @@ -1,80 +0,0 @@ -translating by martin. - -Install Mumble in Ubuntu an Opensource VoIP Apps -================================================================================ -Mumble is a free and open source voice over IP (VoIP) application, released under the new BSD license, primarily designed for use by gamers and it's similar to programs such as TeamSpeak and Ventrilo. It uses a server to witch people can connect with a client to talk to each other. - -It offers the following great features: - -- low latency, very important for gaming -- offers in-game overlay so you can see who is talking and positional audio to hear the players from where they are located -- has encrypted communications so you can stay private and secure -- it also offers a few nice configuration interface that are easy to use -- very stable and good on resource usage for your server - -### Install Mumble ### - -[Mumble][1] has become very popular and is now present in the software repositories of the major Linux distributions and this makes it easy to install and setup. In Ubuntu you can use the command line to install it with apt-get by running the following command: - - $ sudo apt-get install mumble-server - -![mumble install](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-install.jpg) - -This will install the server (also called Murmur) on your server. - -### Configuring Mumble ### - -To setup Mumble you will need to run the following command: - -$ sudo dpkg-reconfigure mumble-server - -The following questions will pop-up: - -![mumble q1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q1.jpg) - -Pick Yes to have mumble start when your server boots, next it will ask if you wish to run it in a high-priority mode that will ensure lower latency, it's a good idea to have it run it like that for the best performance: - -![mumble q2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q2.jpg) - -It will then require you to introduce a password for the administrator user of the new mumble server, you will need to remember this password for when you will log-in. - -![mumble q3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q3.jpg) - -### Installing Mumble Client ### - -The client can be installed on most major platforms like Windows, Mac OS X and Linux. We will cover the installation and configuration on Ubuntu Linux, to install it you can use the Software Center or run the following command: - - $ sudo apt-get install mumble - -When you first run Mumble it will present you with a wizard to help you configure your audio input and output to make the best of the client. It will first ask you what sound device and microphone to use: - -![mumble client 1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-1.jpg) - -Then it will help you calibrate the devices: - -![mumble client 2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-2.jpg) - -And since mumble encrypts all the communication it will ask you to also create a certificate: - -![mumble client 3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-3.jpg) - -After you finish with the wizard you can add your first server and connect to it the dialog will look like this: - -![mumble add server](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-add-server.jpg) - -First enter a label, this can be anything you wish to remember the server by, next add the address and port of the server, and finally use "SuperUser" as user and the password you used when you configured the mumble server. - -You can now connect to the server and enjoy all of the features while you play online or talk to your friends or partners. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/install-mumble-ubuntu/ - -作者:[Adrian Dinu][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/adriand/ -[1]:http://wiki.mumble.info/wiki/Main_Page From 96fd7daa9c9b2bba55ea585f7ada0faeb505f3d1 Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:40:20 +0800 Subject: [PATCH 0013/2517] translated --- ...umble in Ubuntu an Opensource VoIP Apps.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md new file mode 100644 index 0000000000..65607a059b --- /dev/null +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -0,0 +1,79 @@ +Ubuntu安装Mumble一个开源VoIP应用 +================================================================================ +Mumble是一个免费开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 + +Mumble提供了如下的一些特性: + +- 低延迟,这点对游戏相当重要 +- 提供游戏中的可视插件,通过它你可以知道是谁正在和你通话并定位他们的位置 +- 交谈内容经过加密的,能够保护你的隐私和安全 +- 界面简单易于上手 +- 稳定高效的使用你的服务器资源 + +### 安装 Mumble ### + +[Mumble][1]已经流行开来,进入了许多linux主流发行版的软件仓库,这使它安装起来更加的方便。若你使用的是Ubuntu那么使用apt-get就能安装,详细命令如下: + + $ sudo apt-get install mumble-server + +![mumble install](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-install.jpg) + +这条命令将会在你的服务器上安装服务端(亦称Murmur)。 + +### 配置 Mumble ### + +运行以下命令启动Mumble: + +$ sudo dpkg-reconfigure mumble-server + +会弹出以下一些问题: + +![mumble q1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q1.jpg) + +选择“是”开机自动启动mumble,接着它会询问你是否运行高性能模式以保持低延迟,为了让它保持最佳性能这是个不错的主意。 + +![mumble q2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q2.jpg) + +接着为你刚安装好的mumble服务端设置最高权限用户的密码,记住密码会在登录时用到。 + +![mumble q3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q3.jpg) + +### 安装 Mumble 客户端 ### + +客户端可以安装到许多的主流操作系统中,例如windows,mac和linux。我们将涉及在Ubuntu linux上的安装和配置,你可以使用软件中心或以下的命令安装客户端: + + $ sudo apt-get install mumble + +第一次运行mumble时,导向将会帮助你配置音频的输入输出,使其能在客户端上保持最好的效果。第一次同样也会询问你要使用的是什么声音设备和麦克风: + +![mumble client 1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-1.jpg) + +然后它将帮你校准设备: +Then it will help you calibrate the devices: + +![mumble client 2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-2.jpg) + +在mumble帮你加密通讯时会询问你是否创建证书: + +![mumble client 3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-3.jpg) + +完成导向后你就能添加第一个服务器,连接对话框如下图所示: + +![mumble add server](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-add-server.jpg) + +首先输入一个标签,名字任意因为那只不过是为了记住服务器的,然后输入服务器的地址和端口,最后使用“SuperUser”作为用户名而密码则是你配置mumble服务器端时输入的密码。 + +现在你可以连接到服务器了,在联网玩游戏或与你好友、队友聊天开黑时享受这些功能给你带来的乐趣吧! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-mumble-ubuntu/ + +作者:[Adrian Dinu][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ +[1]:http://wiki.mumble.info/wiki/Main_Page From 3f0d9425f39e2116092c916a22ca4761d3cf3001 Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:42:51 +0800 Subject: [PATCH 0014/2517] Update 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md --- ...20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index 65607a059b..51f3344ca9 100644 --- a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -24,7 +24,7 @@ Mumble提供了如下的一些特性: 运行以下命令启动Mumble: -$ sudo dpkg-reconfigure mumble-server + $ sudo dpkg-reconfigure mumble-server 会弹出以下一些问题: From 68c1bae04996369c6429482414d0f4cd3a60b85d Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:53:02 +0800 Subject: [PATCH 0015/2517] Update 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md --- ...20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index 51f3344ca9..d471c4743f 100644 --- a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -1,4 +1,4 @@ -Ubuntu安装Mumble一个开源VoIP应用 +Ubuntu安装Mumble——一个开源VoIP应用 ================================================================================ Mumble是一个免费开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 From 98cdc238b1e608678d52a2f0cc648f18babe8258 Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:54:48 +0800 Subject: [PATCH 0016/2517] Update 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md --- ...20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index d471c4743f..e1911efe29 100644 --- a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -1,4 +1,4 @@ -Ubuntu安装Mumble——一个开源VoIP应用 +Ubuntu上的一个开源VoIP应用——Mumble ================================================================================ Mumble是一个免费开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 From e8ffd880ac46003f3b81ab11623b6636559c5d9f Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 12 Feb 2015 16:56:21 +0800 Subject: [PATCH 0017/2517] Update 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md --- ...211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index e1911efe29..254345f765 100644 --- a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -34,13 +34,13 @@ Mumble提供了如下的一些特性: ![mumble q2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q2.jpg) -接着为你刚安装好的mumble服务端设置最高权限用户的密码,记住密码会在登录时用到。 +接着为你刚安装好的mumble服务端设置最高权限用户的密码,记住密码它会在登录时用到。 ![mumble q3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q3.jpg) ### 安装 Mumble 客户端 ### -客户端可以安装到许多的主流操作系统中,例如windows,mac和linux。我们将涉及在Ubuntu linux上的安装和配置,你可以使用软件中心或以下的命令安装客户端: +客户端可以安装到许多的主流操作系统中,例如windows,mac和linux。我们将教你在Ubuntu linux上安装和配置,你可以使用软件中心也可以用命令安装客户端: $ sudo apt-get install mumble @@ -49,11 +49,10 @@ Mumble提供了如下的一些特性: ![mumble client 1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-1.jpg) 然后它将帮你校准设备: -Then it will help you calibrate the devices: ![mumble client 2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-2.jpg) -在mumble帮你加密通讯时会询问你是否创建证书: +因为mumble帮你加密所有的通讯内容所以它会征询你创建证书: ![mumble client 3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-3.jpg) From b1a9efec421fd4813b682e1ae726e56ff7879509 Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 13 Feb 2015 10:30:08 +0800 Subject: [PATCH 0018/2517] [translating] 20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md --- ...1 Simple Steps Migration From MySQL To MariaDB On Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md index 1588c979a4..fc04e08a2f 100644 --- a/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md +++ b/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md @@ -1,3 +1,5 @@ +Translating by martin. + Simple Steps Migration From MySQL To MariaDB On Linux ================================================================================ Hi all, this tutorial is all gonna be about how to migrate from MySQL to MariaDB on Linux Server or PC. So, you may ask why should we really migrate from MySQL to MariaDB for our database management. Here, below are the reasons why you should really need to migrate your database management system from MySQL to MariaDB. @@ -166,4 +168,4 @@ via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ [a]:http://linoxide.com/author/arunp/ [1]:https://mariadb.org/ -[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi \ No newline at end of file +[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi From b3c9a61fb99fc112755c725ce0ccefcdf6edfbc0 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Fri, 13 Feb 2015 10:44:32 +0800 Subject: [PATCH 0019/2517] [translated] 20150115 Get back your privacy and control.md --- ...50115 Get back your privacy and control.md | 1114 ----------------- ...50115 Get back your privacy and control.md | 1111 ++++++++++++++++ 2 files changed, 1111 insertions(+), 1114 deletions(-) delete mode 100644 sources/tech/20150115 Get back your privacy and control.md create mode 100644 translated/tech/20150115 Get back your privacy and control.md diff --git a/sources/tech/20150115 Get back your privacy and control.md b/sources/tech/20150115 Get back your privacy and control.md deleted file mode 100644 index 915e3b073e..0000000000 --- a/sources/tech/20150115 Get back your privacy and control.md +++ /dev/null @@ -1,1114 +0,0 @@ -zpl1025 -Get back your privacy and control over your data in just a few hours: build your own cloud for you and your friends -================================================================================ -40'000+ searches over 8 years! That's my Google Search history. How about yours? (you can find out for yourself [here][1]) With so many data points across such a long time, Google has a very precise idea of what you've been interested in, what's been on your mind, what you are worried about, and how that all changed over the years since you first got that Google account. - -### Some of the most personal pieces of your identity are stored on servers around the world beyond your control ### - -Let's say you've been a Gmail user between 2006 and 2013 like me, meaning you received 30'000+ emails and wrote about 5000 emails over that 7 year period. Some of the emails you sent or received are very personal, maybe so personal that you probably wouldn't like even some family members or close friends to go through them systematically. Maybe you also drafted a few emails that you never sent because you changed your mind at the last minute. But even if you never sent them, these emails are still stored somewhere on a server. As a result, it's fair to say that Google servers know more about your personal life than your closest friends or your family. - -Statistically, it's a safe bet to consider that you've got a smartphone. You can barely use the phone without using the contacts app which stores your contacts in Google Contact on Google servers by default. So not only does Google know about your emails, but also about your offline contacts: who you like to call, who calls you, whom you text, and what you text them about. You don't have to take my word for it, you can verify for yourself by taking a look at the permissions you gave apps such as the Google Play Service to read the list of people that called you and the SMS you got. Do you also use the calendar app that comes with your phone? Unless you explicitly opted out while setting up your calendar, this means that Google knows precisely what you're up to, at every time of the day, day after day, year after year. The same applies if you chose an iPhone over an Android phone, except Apple gets to know about your correspondance, contacts and schedule instead of Google. - -Do you also take great care to keep the contacts in your directory up-to-date, updating your friend's, colleagues's and and family's email addresses and phone numbers when they move to a new job or change carrier? That gives Google an extraordinarily accurate, up-to-date picture of your social network. And you love the GPS of your smartphone which you use a lot together with Google Maps. This means Google not only knows what you do from your calendar but also where you are, where you live, where you work. And by correlating GPS location data across users, Google can also tell with whom you may socializing with right now. - -### Your daily habit of handing out your most personal information will impact your life in a way that no one can even forsee ### - -To summarize, if you are an average internet user, Google has up-to-date, in-depth information about your interests, worries, passions, questions, over almost 10 years. It has a collection of some of your most personal messages (emails, SMS), an hour-by-hour detail of your daily activities and location, and a high-quality picture of your social network. Such an intimate knowledge of you likely goes beyond what your closest friends, family, or your sweetheart know of you. - -It wouldn't come to mind to give this mass of deeply personal information to complete strangers, for instance by putting it all on a USB key and leaving it on a table in a random cafe with a note saying 'Personal data of Olivier Martin, use as you please'. Who knows who might find it and what they would do with it? Yet, we have no problem handing in core pieces of your identity to strangers at IT companies with a strong interest in our data (that's how they make their bread) and [world-class experts in data analysis][2], perhaps just because it happens by default without us thinking about it when we hit that green 'Accept' button. - -With so much high-quality information, over the years, Google may well get to know you better than you can ever hope to know yourself: heck, crawling through my digital past right now, I can't remember having written half of the emails I sent five years ago. I am surprised and pleased to rediscover my interest in marxism back in 2005 and my joining [ATTAC][3] (an organization which strives to limit speculation and improve social justice by taxing financial transactions) the next year. And god knows why I was so much into dancing shoes back in 2007. These is pretty harmless information (you wouldn't have expected me to reveal something embarassing here, would you? ;-). But by connecting the dots between high-quality data over different aspects of your life (what, when, with whom, where, ...) over such time spans, one may extrapolate predictive statements about you. For instance, from the shopping habits of a 17-year-old girl, supermarkets can tell that she is pregnant before her dad even hears about it ([true story][4]). Who knows what will become possible with high-quality data the like Google has, which goes well beyond shopping habits? By connecting the dots, maybe one can predict how your tastes or political views will change in the coming years. Today, [companies you have never heard of claim to have 500 data points about you][5], including religion, sexual orientation and political views. Speaking of politics, what if you decide to go into politics in 10 years from now? Your life may change, your views too, and you may even forget, but Google won't. Will you have to worry that your opponent is in touch with someone who has access to your data at Google and can dig up something embarassing on you from those bottomless wells of personal data you gave away over the years? How long until Google or Facebook get hacked [just like Sony was recently hacked][6] and all your personal data end up in the public sphere forever? - -One of the reason most of us have entrusted our personal data to these companies is that they provide their services for free. But how free is it really? The value of the average Google account varies depending on the method used to estimate it: [1000 USD/year][7] accounts for the amount of time you invest in writing emails, while the value of your account for the advertisement industry is somewhere between [220 USD/year][8] and [500 USD/year][9]. So the service is not exactly free: you pay for it through advertisement and the yet unknown uses that our data may find in the future. - -I've been writing about Google mostly because that's the company I've entrusted most of my digital identify to so far and hence the one I know best. But I may well have written Apple or Facebook. These companies truly changed the world with their fantastic advances in design, engineering and services we love(d) to use, every day. But it doesn't mean we should stack up all our most personal data in their servers and entrust them with our digital lives: the potential for harm is just too large. - -### Claim back your privacy and that of people you care for in just 5h ### - -It does not have to be this way. You can live in the 21st century, have a smartphone, use email and GPS on daily basis, and still retain your privacy. All you need to do is get back control over your personal data: emails, calendar, contacts, files, etc.. The [Prism-Break.org][10] website lists software that help controlling the fate of your personal data. Beyond these options, the safest and most powerful way to get back control over your personal data is to host your cloud yourself, by building your own server. But you may just not have the time and energy to research how exactly to do that and make it work smoothly. - -That's where the present article fits in. In just 5 hours, we will set up a server to host your emails, contacts, calendars and files for you, your friends and your family. The server is designed to act as a hub or cloud for your personal data, so that you always retain full control over it. The data will automatically be synchronized between your PC/laptop, your phone and your tablet. Essentially, **we will set up a system that replaces Gmail, Google Drive / Dropbox, Google Contacts, Google Calendar and Picasa**. - -Just doing this for yourself will already be a big step. But then, a significant fraction of your personal information will still leak out and end up on some servers in the silicon valley, just because so many of the people you interact with every day use Gmail and have smartphones. So it's a good idea to have some of the people you are closest to join the adventure. - -We will build a system that - -- **supports an arbitrary number of domains and users**. This makes it easy to share your server with family and friends, so that they get control over their personal data too and can share the cost of the server with you. The people sharing your server can use their own domain name or share yours. -- **lets you send and receive your emails from any network** upon successfully logging in onto the server. This way, you can send your emails from any of your email addresses, from any device (PC, phone, tablet), and any network (at home, at work, from a public network, ...) -- **encrypts network traffic** when sending and receiving emails so people you don't trust won't fish out your password and won't be able to read your private emails. -- **offers state-of-the-art antispam**, combining black lists of known spammers, automatic greylisting, and adaptative spam filtering. Re-training the adaptative spam filter if an email is misclassified is simply done by moving spam in or out of the Junk/Spam folder. Also, the server will contribute to community-based spam fighting efforts. -- **requires just a few minutes of maintenance once in a while**, basically to install security updates and briefly check the server logs. Adding a new email address boils down to adding one record to a database. Apart from that, you can just forget about it and live your life. I set up the system described in this article 14 months ago and the thing has just been running smoothly since then. So I completely forgot about it, until I recently smiled at the thought that casually pressing the 'Check email' button of my phone caused electrons to travel all the way to Iceland (where my server sits) and back. - -To go through this article, you'll need a minimum of technical capabilities. If you know what is the difference between SMTP and IMAP, what is a DNS, and have a basic understanding of TCP/IP, you know enough to follow through. You will also need a basic working knowledge of Unix (working with files from the command line, basic system administration). And you'll need a total of 5 hours of time to set it up. - -Here's an overview what we will do: - -- [Get a Virtual Private Server, a domain name, and set them up][11] -- [Set up postfix and dovecot to send and receive email][12] -- [Prevent SPAM from reaching your INBOX][13] -- [Make sure the emails you send get through spam filters][14] -- [Host calendars, contacts, files with Owncloud and set up webmail][15] -- [Sync your devices to the cloud][16] - -### This article was inspired by and builds upon previous work ### - -This article draws heavily from two other articles, namely [Xavier Claude][17]'s and [Drew Crawford][18]'s introduction to email self-hosting. - -The article includes all the features of Xavier's and Draw's articles, except from three features that Drew had and which I didn't need, namely push support for email (I like to check email only when I decide to, otherwise I get distracted all the time), fulltext search in email (which I don't have a use for), and storing emails in an encrypted form (my emails and data are not critical to the point that I have to encrypt them locally on the server). If you need any of these features, feel free to just add them by following to the respective section of Drew's article, which is compatible with the present one. - -Compared to Xavier's and Drew's work, the present article improves on several aspects: - -- it fixes bugs and typos based on my experience with Drew's article and the numerous comments on his original article. I also went through the present article, setting up the server from scratch several times to replicate it and make sure it would work right out of the box. -- low maintenance: compared to Xavier's work, the present article adds support for multiple email domains on the server. It does so by requiring the minimum amount of server maintenance possible: basically, to add a domain or a user, just add one row to a mysql table and that's it (no need to add sieve scripts, ...). -- I added webmail. -- I added a section on setting up a cloud, to host not just your emails but also your files, your addressbook / contacts (emails, phone numbers, birthdays, ...), calendars and pictures for use across your devices. - -### Get a Virtual Private Server, a domain name, and set them up ### - -Let's start by setting the basic infrastructure: our virtual private server and our domain name. - -I've had an excellent experience with the Virtual Private Servers (VPS) of [1984.is][19] and [Linode][20]. In this article, we will use **Debian Wheezy**, for which both 1984 and Linode provide ready-made images to deploy on your VPS. I like 1984 because the servers are hosted in Iceland which run exclusively on renewable energy (geothermical and hydropower) and hence does not contribute to the climate change, unlike [the coal power plants on which most US-based datacenters currently run on][21]. Also, they put emphasis on [civil liberties, transparency, freedom][22] and [Free Software][23]. - -It could be a good idea to start a file to store the various passwords we will need to set on the server (user accounts, mail accounts, cloud accounts, database accounts). It's definitely a good idea to encrypt this file (maybe with [GnuPG][24]), so that it won't be too easy to attack your server even if the computer you use to set up your server gets stolen or compromised. - -For registering a domain name, I've been using the services of [gandi][25] for over 10 years now, also with satisfaction. For this article, we will set up a zone with the name **jhausse.net**. We then add a host named **cloud.jhausse.net** to it, set the MX record to that host. While you're at it, set short Time To Lives (TTL) to your records like 300 seconds so that you'll be able to make changes to your zone and test the result rapidly while you're setting up the server. - -Finally, set the PTR record (reverse DNS) so that the IP address of the host maps back to its name. If you don't understand the previous sentence, read [this article][26] to get the background. If you use Linode, you can set the PTR record in the control panel in the Remote Access section. With 1984, contact the tech support who will help you with it. - -On the server, we will start by adding a non-privledged user, so that we don't end up working as root all the time. Also, to log in as root will require an extra layer of security. - - adduser roudy - -Then, in **/etc/ssh/sshd_config**, we set - - PermitRootLogin no - -and reload the ssh server - - service ssh reload - -Then, we'll need to change the hostname of the server. Edit **/etc/hostname** so that it has just a single line with your hostname, in our case - - cloud - -Then, edit the ssh server's public key files **/etc/ssh/ssh_host_rsa_key.pub, /etc/ssh/ssh_host_dsa_key.pub, /etc/ssh/ssh_host_ecdsa_key.pub** so that the end of the file reflects your hostname, or instance **root@cloud**. Then restart the system to make sure the hostname is fixed wherever is should be - - reboot - -We will update the system and remove services we don't need to reduce the risk of remote attacks. - - apt-get update - apt-get dist-upgrade - service exim4 stop - apt-get remove exim4 rpcbind - apt-get autoremove - apt-get install vim - -I like to use vim for editing config files remotely. For this, it helps to automatically turn on syntax highlighting. We do so by adding - - syn on - -to **~/.vimrc**. - -### Set up postfix and dovecot to send and receive email ### - - apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-mysql mysql-server dovecot-lmtpd postgrey - -In the [Postfix][27] configuration menu, we select **Internet Site**, and set the system mail name to **jhausse.net**. - -We will now set up a database to store the list of domains hosted on our server, the list of users for each of these domains (together with their password), and a list of mail aliases (to forward email from a given address to another one). - - mysqladmin -p create mailserver - mysql -p mailserver - mysql> GRANT SELECT ON mailserver.* TO 'mailuser'@'localhost' IDENTIFIED BY 'mailuserpass'; - mysql> FLUSH PRIVILEGES; - mysql> CREATE TABLE `virtual_domains` ( - `id` int(11) NOT NULL auto_increment, - `name` varchar(50) NOT NULL, - PRIMARY KEY (`id`) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - mysql> CREATE TABLE `virtual_users` ( - `id` int(11) NOT NULL auto_increment, - `domain_id` int(11) NOT NULL, - `password` varchar(106) NOT NULL, - `email` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `email` (`email`), - FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - mysql> CREATE TABLE `virtual_aliases` ( - `id` int(11) NOT NULL auto_increment, - `domain_id` int(11) NOT NULL, - `source` varchar(100) NOT NULL, - `destination` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -We will host the **jhausse.net** domain. If there are other domains you'd like to host, you can also add them. We also set up a postmaster address for each domain, which forwards to **roudy@jhausse.net**. - - mysql> INSERT INTO virtual_domains (`name`) VALUES ('jhausse.net'); - mysql> INSERT INTO virtual_domains (`name`) VALUES ('otherdomain.net'); - mysql> INSERT INTO virtual_aliases (`domain_id`, `source`, `destination`) VALUES ('1', 'postmaster', 'roudy@jhausse.net'); - mysql> INSERT INTO virtual_aliases (`domain_id`, `source`, `destination`) VALUES ('2', 'postmaster', 'roudy@jhausse.net'); - -We now add a locally hosted email account **roudy@jhausse.net**. First, we generate a password hash for it: - - doveadm pw -s SHA512-CRYPT - -and then add the hash to the database - - mysql> INSERT INTO `mailserver`.`virtual_users` (`domain_id`, `password`, `email`) VALUES ('1', '$6$YOURPASSWORDHASH', 'roudy@jhausse.net'); - -Now that our list of domains, aliases and users are in place, we will set up postfix (SMTP server, for outgoing mail). Replace the contents of **/etc/postfix/main.cf** with the following: - - myhostname = cloud.jhausse.net - myorigin = /etc/mailname - mydestination = localhost.localdomain, localhost - mynetworks_style = host - - # We disable relaying in the general case - smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination - # Requirements on servers that contact us: we verify the client is not a - # known spammer (reject_rbl_client) and use a graylist mechanism - # (postgrey) to help reducing spam (check_policy_service) - smtpd_client_restrictions = permit_mynetworks, reject_rbl_client zen.spamhaus.org, check_policy_service inet:127.0.0.1:10023 - disable_vrfy_command = yes - inet_interfaces = all - smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) - biff = no - append_dot_mydomain = no - readme_directory = no - - # TLS parameters - smtpd_tls_cert_file=/etc/ssl/certs/cloud.crt - smtpd_tls_key_file=/etc/ssl/private/cloud.key - smtpd_use_tls=yes - smtpd_tls_auth_only = yes - smtp_tls_security_level=may - smtp_tls_loglevel = 1 - smtpd_tls_loglevel = 1 - smtpd_tls_received_header = yes - smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache - smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache - - # Delivery - alias_maps = hash:/etc/aliases - alias_database = hash:/etc/aliases - message_size_limit = 50000000 - recipient_delimiter = + - - # The next lines are useful to set up a backup MX for myfriendsdomain.org - # relay_domains = myfriendsdomain.org - # relay_recipient_maps = - - # Virtual domains - virtual_transport = lmtp:unix:private/dovecot-lmtp - virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf - virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf - virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf - local_recipient_maps = $virtual_mailbox_maps - -Now we need to teach postfix to figure out which domains we would like him to accept emails for using the database we just set up. Create a new file **/etc/postfix/mysql-virtual-mailbox-domains.cf** and add the following: - - user = mailuser - password = mailuserpass - hosts = 127.0.0.1 - dbname = mailserver - query = SELECT 1 FROM virtual_domains WHERE name='%s' - -We teach postfix to find out whether a given email account exists by creating **/etc/postfix/mysql-virtual-mailbox-maps.cf** with the following content - - user = mailuser - password = mailuserpass - hosts = 127.0.0.1 - dbname = mailserver - query = SELECT 1 FROM virtual_users WHERE email='%s' - -Finally, postfix will use **/etc/postfix/mysql-virtual-alias-maps.cf** to look up mail aliases - - user = mailuser - password = mailuserpass - hosts = 127.0.0.1 - dbname = mailserver - query = SELECT virtual_aliases.destination as destination FROM virtual_aliases, virtual_domains WHERE virtual_aliases.source='%u' AND virtual_aliases.domain_id = virtual_domains.id AND virtual_domains.name='%d' - -With all this in place, it is now time to test if postfix can query our database properly. We can do this using **postmap**: - - postmap -q jhausse.net mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf - postmap -q roudy@jhausse.net mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf - postmap -q postmaster@jhausse.net mysql:/etc/postfix/mysql-virtual-alias-maps.cf - postmap -q bob@jhausse.net mysql:/etc/postfix/mysql-virtual-alias-maps.cf - -If you set up everything properly, the first two queries should return 1, the third query should return **roudy@jhausse.net** and the last one should return nothing at all. - -Now, let's set up dovecot (the IMAP server, to fetch incoming mail on the server from our devices). Edit **/etc/dovecot/dovecot.conf** to set the following parameters: - - # Enable installed protocol - # !include_try /usr/share/dovecot/protocols.d/*.protocol - protocols = imap lmtp - -which will only enable imap (to let us fetch emails) and lmtp (which postfix will use to pass incoming emails to dovecot). Edit **/etc/dovecot/conf.d/10-mail.conf** to set the following parameters: - - mail_location = maildir:/var/mail/%d/%n - [...] - mail_privileged_group = mail - [...] - first_valid_uid = 0 - -which will store emails in /var/mail/domainname/username. Note that these settings are spread at different locations in the file, and are sometimes already there for us to set: we just need to comment them out. The other settings which are already in the file, you can leave as is. We will have to do the same to update settings in many more files in the remaining of this article. In **/etc/dovecot/conf.d/10-auth.conf**, set the parameters: - - disable_plaintext_auth = yes - auth_mechanisms = plain - #!include auth-system.conf.ext - !include auth-sql.conf.ext - -In **/etc/dovecot/conf.d/auth-sql.conf.ext**, set the following parameters: - - passdb { - driver = sql - args = /etc/dovecot/dovecot-sql.conf.ext - } - userdb { - driver = static - args = uid=mail gid=mail home=/var/mail/%d/%n - } - -where we just taught dovecot that users have their emails in /var/mail/domainname/username and to look up passwords from the database we just created. Now we still need to teach dovecot how exactly to use the database. To do so, put the following into **/etc/dovecot/dovecot-sql.conf.ext**: - - driver = mysql - connect = host=localhost dbname=mailserver user=mailuser password=mailuserpass - default_pass_scheme = SHA512-CRYPT - password_query = SELECT email as user, password FROM virtual_users WHERE email='%u'; - -We now fix permissions on config files - - chown -R mail:dovecot /etc/dovecot - chmod -R o-rwx /etc/dovecot - -Almost there! We just need to edit a couple files more. In **/etc/dovecot/conf.d/10-master.conf**, set the following parameters: - - service imap-login { - inet_listener imap { - #port = 143 - port = 0 - } - inet_listener imaps { - port = 993 - ssl = yes - } - } - - service pop3-login { - inet_listener pop3 { - #port = 110 - port = 0 - } - inet_listener pop3s { - #port = 995 - #ssl = yes - port = 0 - } - } - - service lmtp { - unix_listener /var/spool/postfix/private/dovecot-lmtp { - mode = 0666 - group = postfix - user = postfix - } - user = mail - } - - service auth { - unix_listener auth-userdb { - mode = 0600 - user = mail - #group = - } - - # Postfix smtp-auth - unix_listener /var/spool/postfix/private/auth { - mode = 0666 - user = postfix - group = postfix - } - - # Auth process is run as this user. - #user = $default_internal_user - user = dovecot - } - - service auth-worker { - user = mail - } - -Note that we set ports for all services but imaps to 0, which effectively disables them. Then, in **/etc/dovecot/conf.d/15-lda.conf**, specify an email address for the postmaster: - - postmaster_address = postmaster@jhausse.net - -Last but not least, we need to generate a pair of public and private key for the server, which we will use both in dovecot and postfix: - - openssl req -new -newkey rsa:4096 -x509 -days 365 -nodes -out "/etc/ssl/certs/cloud.crt" -keyout "/etc/ssl/private/cloud.key" - -Make sure that you specify your the Fully Qualified Domain Name (FQDN) of the server, in our case: - - Common Name (e.g. server FQDN or YOUR name) []:cloud.jhausse.net - -If you don't, our clients may complain that the server name in the SSL certificate does not match the name of the server they are connecting to. We tell dovecot to use these keys by setting the following parameters in **/etc/dovecot/conf.d/10-ssl.conf**: - - ssl = required - ssl_cert = : Relay access denied - -That's good: had the server accepted the mail, it would have meant that we set up postfix as an open relay for all the spammers of the world and beyhond to use. Instead of the 'Relay access denied' message, you may instead get the message - - 554 5.7.1 Service unavailable; Client host [87.68.61.119] blocked using zen.spamhaus.org; http://www.spamhaus.org/query/bl?ip=87.68.61.119 - -This means that you are trying to contact the server from an IP address that is considered as a spammer's address. I got this message while trying to connect to the server through my regular Internet Service Provider (ISP). To fix this issue, you can try to connect from another host, maybe another server you have access to through SSH. Alternatively, you can reconfigure Postfix's **main.cf** not to use Spamhaus's RBL, reload postfix, and verify that the above test works. In both cases, it's important that you find a solution that works for you because we'll test other things in a minute. If you chose to reconfigure Postfix not to use RBLs, don't forget to put the RBLs back in and to reload postfix after finishing the article to avoid getting more spam than necessary. - -Now let's try to send a valid email by SMTP on port 25, which regular mail servers use to talk to each other: - - openssl s_client -connect cloud.jhausse.net:25 -starttls smtp - EHLO cloud.jhausse.net - MAIL FROM:youremail@domain.com - rcpt to:roudy@jhausse.net - -to which the server should respond - - Client host rejected: Greylisted, see http://postgrey.schweikert.ch/help/jhausse.net.html - -which shows that [postgrey][28] is working as it should. What postgrey does it to reject emails with a temporary error if the sender has never been seen before. The technical rules of email require email servers to try to deliver the email again. After five minutes, postgrey will accept the email. Legit email servers around the world will try repeatidly to redeliver the email to us, but most spammers won't. So, wait for 5 minutes, try to send the email again using the command above, and verify that postfix now accepts the email. - -Afterwards, we'll check that we can fetch the two emails that we just sent ourselves by talking IMAP to dovecot: - - openssl s_client -crlf -connect cloud.jhausse.net:993 - 1 login roudy@jhausse.net "mypassword" - 2 LIST "" "*" - 3 SELECT INBOX - 4 UID fetch 1:1 (UID RFC822.SIZE FLAGS BODY.PEEK[]) - 5 LOGOUT - -where you should replace mypassword with the password you set for this email account. If that works, we basically have a functional email server which can receive our incoming emails, and from which we get retreive these emails from our devices (PC/laptop, tablets, phones, ...). But we can't give it our emails to send unless we send them from the server itself. We'll now allow postfix to forward our emails, but only upon successful authentification, that is after it could make sure that the email comes from someone who has a valid account on the server. To do so, we'll open a special, SSL-only, SASL-authentified email submission service. Set the following parameters in **/etc/postfix/master.cf**: - - submission inet n - - - - smtpd - -o syslog_name=postfix/submission - -o smtpd_tls_security_level=encrypt - -o smtpd_sasl_auth_enable=yes - -o smtpd_client_restrictions=permit_sasl_authenticated,reject - -o smtpd_sasl_type=dovecot - -o smtpd_sasl_path=private/auth - -o smtpd_sasl_security_options=noanonymous - -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject_non_fqdn_recipient,reject_unauth_destination - -and reload postfix - - service postfix reload - -Now, let's try to use this service from a different machine than than the server, to verify postfix will now relay our emails and nobody else's: - - openssl s_client -connect cloud.jhausse.net:587 -starttls smtp - EHLO cloud.jhausse.net - -Notice the '250-AUTH PLAIN' capabilities advertized by server, which doesn't appear when we connect to port 25. - - MAIL FROM:asdf@jkl.net - rcpt to:bob@gmail.com - 554 5.7.1 : Relay access denied - QUIT - -That's good, postfix won't relay our emails if he doesn't know us. So let's authentify ourselves first. To do so, we first need to generate an authentification string: - - echo -ne '\000roudy@jhausse.net\000mypassword'|base64 - -and let's try to send emails through the server again: - - openssl s_client -connect cloud.jhausse.net:587 -starttls smtp - EHLO cloud.jhausse.net - AUTH PLAIN DGplYW5AMTk4NGNsb3VQLm5ldAA4bmFmNGNvNG5jOA== - MAIL FROM:asdf@jkl.net - rcpt to:bob@gmail.com - -which postfix should now accept. To complete the test, let's verify that our virtual aliases work by sending an email to postmaster@jhausse.net and making sure it goes to roudy@jhausse.net: - - telnet cloud.jhausse.net 25 - EHLO cloud.jhausse.net - MAIL FROM:youremail@domain.com - rcpt to:postmaster@jhausse.net - data - Subject: Virtual alias test - - Dear postmaster, - Long time no hear! I hope your MX is working smoothly and securely. - Yours sincerely, Roudy - . - QUIT - -Let's check the mail made it all the way to the right inbox: - - openssl s_client -crlf -connect cloud.jhausse.net:993 - 1 login roudy@jhausse.net "mypassword" - 2 LIST "" "*" - 3 SELECT INBOX - * 2 EXISTS - * 2 RECENT - 4 LOGOUT - -At this point, we have a functional email server, both for incoming and outgoing mails. We can set up our devices to use it. - -PS: did you remember to [try sending an email to an account hosted by the server through port 25][29] again, to verify that you are not longer blocked by postgrey? - -### Prevent SPAM from reaching your INBOX ### - -For the sake of SPAM filtering, we already have Realtime BlackLists (RBLs) and greylisting (postgrey) in place. We'll now take our spam fighting capabilities up a notch by adding adaptative spam filtering. This means we'll add artificial intelligence to our email server, so that it can learn from experience what is spam and what is not. We will use [dspam][30] for that. - - apt-get install dspam dovecot-antispam postfix-pcre dovecot-sieve - -dovecot-antispam is a package that allows dovecot to retrain the spam filter if we find an email that is misclassified by dspam. Basically, all we need to do is to move emails in or out of the Junk/Spam folder. dovecot-antispam will then take care of calling dspam to retrain the filter. As for postfix-pcre and dovecot-sieve, we will use them respectively to pass incoming emails through the spam filter and to automatically move spam to the user's Junk/Spam folder. - -In **/etc/dspam/dspam.conf**, set the following parameters to these values: - - TrustedDeliveryAgent "/usr/sbin/sendmail" - UntrustedDeliveryAgent "/usr/lib/dovecot/deliver -d %u" - Tokenizer osb - IgnoreHeader X-Spam-Status - IgnoreHeader X-Spam-Scanned - IgnoreHeader X-Virus-Scanner-Result - IgnoreHeader X-Virus-Scanned - IgnoreHeader X-DKIM - IgnoreHeader DKIM-Signature - IgnoreHeader DomainKey-Signature - IgnoreHeader X-Google-Dkim-Signature - ParseToHeaders on - ChangeModeOnParse off - ChangeUserOnParse full - ServerPID /var/run/dspam/dspam.pid - ServerDomainSocketPath "/var/run/dspam/dspam.sock" - ClientHost /var/run/dspam/dspam.sock - -Then, in **/etc/dspam/default.prefs**, change the following parameters to: - - spamAction=deliver # { quarantine | tag | deliver } -> default:quarantine - signatureLocation=headers # { message | headers } -> default:message - showFactors=on - -Now we need to connect dspam to postfix and dovecot by adding these two lines at the end of **/etc/postfix/master.cf**: - - dspam unix - n n - 10 pipe - flags=Ru user=dspam argv=/usr/bin/dspam --deliver=innocent,spam --user $recipient -i -f $sender -- $recipient - dovecot unix - n n - - pipe - flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} - -Now we will tell postfix to filter every new email that gets submitted to the server on port 25 (normal SMTP traffic) through dspam, except if the email is submitted from the server itself (permit_mynetworks). Note that the emails we submit to postfix with SASL authentication won't be filtered through dspam either, as we set up a separate submission service for those in the previous section. Edit **/etc/postfix/main.cf** to change the **smtpd_client_restrictions** to the following: - - smtpd_client_restrictions = permit_mynetworks, reject_rbl_client zen.spamhaus.org, check_policy_service inet:127.0.0.1:10023, check_client_access pcre:/etc/postfix/dspam_filter_access - -At the end of the file, also also add: - - # For DSPAM, only scan one mail at a time - dspam_destination_recipient_limit = 1 - -We now need to specify the filter we defined. Basically, we will tell postfix to send all emails (/./) to dspam through a unix socket. Create a new file **/etc/postfix/dspam_filter_access** and put the following line into it: - - /./ FILTER dspam:unix:/run/dspam/dspam.sock - -That's it for the postfix part. Now let's set up dovecot for spam filtering. In **/etc/dovecot/conf.d/20-imap.conf**, edit the **imap mail_plugins** plugins parameter such that: - - mail_plugins = $mail_plugins antispam - -and add a section for lmtp: - - protocol lmtp { - # Space separated list of plugins to load (default is global mail_plugins). - mail_plugins = $mail_plugins sieve - } - -We now configure the dovecot-antispam plugin. Edit **/etc/dovecot/conf.d/90-plugin.conf** to add the following content to the plugin section: - - plugin { - ... - # Antispam (DSPAM) - antispam_backend = dspam - antispam_allow_append_to_spam = YES - antispam_spam = Junk;Spam - antispam_trash = Trash;trash - antispam_signature = X-DSPAM-Signature - antispam_signature_missing = error - antispam_dspam_binary = /usr/bin/dspam - antispam_dspam_args = --user;%u;--deliver=;--source=error - antispam_dspam_spam = --class=spam - antispam_dspam_notspam = --class=innocent - antispam_dspam_result_header = X-DSPAM-Result - } - -and in **/etc/dovecot/conf.d/90-sieve.conf**, specify a default sieve script which will apply to all users of the server: - - sieve_default = /etc/dovecot/default.sieve - -What is sieve and why do we need a default script for all users? Sieve lets us automatize tasks on the IMAP server. In our case, we won't all emails identified as spam to be put in the Junk folder instead of in the Inbox. We would like this to be the default behavior for all users on the server; that's why we just set this script as default script. Let's create this script now, by creating a new file **/etc/dovecot/default.sieve** with the following content: - - require ["regex", "fileinto", "imap4flags"]; - # Catch mail tagged as Spam, except Spam retrained and delivered to the mailbox - if allof (header :regex "X-DSPAM-Result" "^(Spam|Virus|Bl[ao]cklisted)$", - not header :contains "X-DSPAM-Reclassified" "Innocent") { - # Mark as read - # setflag "\\Seen"; - # Move into the Junk folder - fileinto "Junk"; - # Stop processing here - stop; - } - -Now we need to compile this script so that dovecot can run it. We also need to give it appropriate permissions. - - cd /etc/dovecot - sievec . - chown mail.dovecot default.siev* - chmod 0640 default.sieve - chmod 0750 default.svbin - -Finally, we need to fix permissions on two postfix config files that dspam needs to read from: - - chmod 0644 /etc/postfix/dynamicmaps.cf /etc/postfix/main.cf - -That's it! Let's restart dovecot and postfix - - service dovecot restart - service postfix restart - -and test the antispam, by contacting the server from a remote host (e.g. the computer we are using to set the server): - - openssl s_client -connect cloud.jhausse.net:25 -starttls smtp - EHLO cloud.jhausse.net - MAIL FROM:youremail@domain.com - rcpt to:roudy@jhausse.net - DATA - Subject: DSPAM test - - Hi Roudy, how'd you like to eat some ham tonight? Yours, J - . - QUIT - -Let's check if the mail arrived: - - openssl s_client -crlf -connect cloud.jhausse.net:993 - 1 login roudy@jhausse.net "mypassword" - 2 LIST "" "*" - 3 SELECT INBOX - 4 UID fetch 3:3 (UID RFC822.SIZE FLAGS BODY.PEEK[]) - -Which should return something the email with a collection of flag set by SPAM which look like this: - - X-DSPAM-Result: Innocent - X-DSPAM-Processed: Sun Oct 5 16:25:48 2014 - X-DSPAM-Confidence: 1.0000 - X-DSPAM-Probability: 0.0023 - X-DSPAM-Signature: 5431710c178911166011737 - X-DSPAM-Factors: 27, - Received*Postfix+with, 0.40000, - Received*with+#+id, 0.40000, - like+#+#+#+ham, 0.40000, - some+#+tonight, 0.40000, - Received*certificate+requested, 0.40000, - Received*client+certificate, 0.40000, - Received*for+roudy, 0.40000, - Received*Sun+#+#+#+16, 0.40000, - Received*Sun+#+Oct, 0.40000, - Received*roudy+#+#+#+Oct, 0.40000, - eat+some, 0.40000, - Received*5+#+#+16, 0.40000, - Received*cloud.jhausse.net+#+#+#+id, 0.40000, - Roudy+#+#+#+to, 0.40000, - Received*Oct+#+16, 0.40000, - to+#+#+ham, 0.40000, - Received*No+#+#+requested, 0.40000, - Received*jhausse.net+#+#+Oct, 0.40000, - Received*256+256, 0.40000, - like+#+#+some, 0.40000, - Received*ESMTPS+id, 0.40000, - how'd+#+#+to, 0.40000, - tonight+Yours, 0.40000, - Received*with+cipher, 0.40000 - 5 LOGOUT - -Good! You now have adaptive spam filtering set up for the users of your server. Of course, each user will need to train the filter in the first few weeks. To train a message as spam, just move it to a folder called "Spam" or "Junk" using any of your devices (PC, tablet, phone). Otherwise it'll be trained as ham. - -### Make sure the emails you send get through spam filters ### - -Our goal in this section will be to make our mail server appear as clean as possible to the world and to make it harder for spammers to send emails in our name. As a side-effect, this will help us get our emails through the spam filters of other mail servers. - -#### Sender Policy Framework #### - -Sender Policy Framework (SPF) is a record that your add to your zone which declares which mail servers on the whole internet can send emails for your domain name. Setting it up is very easy, use the SPF wizard at [microsoft.com][31] to generate your SPF record, and then add it to your zone as a TXT record. It will look like this: - - jhausse.net. 300 IN TXT v=spf1 mx mx:cloud.jhausse.net -all - -#### Reverse PTR #### - -We discussed this point [earlier][32] in this article, it's a good idea that you set up the reverse DNS for your server correctly, so that doing a reverse lookup on the IP address of your server returns the actual name of your server. - -#### OpenDKIM #### - -When we activate [OpenDKIM][33], postfix will sign every outgoing email using a cryptographic key. We will then deposit that key in our zone, on the DNS. That way, every mail server in the world will be able to verify if the email actually came from us, or if it was forged by a spammer. Let's install opendkim: - - apt-get install opendkim opendkim-tools - -And set it up by editing **/etc/opendkim.conf** so that it looks like this: - - ## - ## opendkim.conf -- configuration file for OpenDKIM filter - ## - Canonicalization relaxed/relaxed - ExternalIgnoreList refile:/etc/opendkim/TrustedHosts - InternalHosts refile:/etc/opendkim/TrustedHosts - KeyTable refile:/etc/opendkim/KeyTable - LogWhy Yes - MinimumKeyBits 1024 - Mode sv - PidFile /var/run/opendkim/opendkim.pid - SigningTable refile:/etc/opendkim/SigningTable - Socket inet:8891@localhost - Syslog Yes - SyslogSuccess Yes - TemporaryDirectory /var/tmp - UMask 022 - UserID opendkim:opendkim - -We'll need a couple of additional files which we will store in **/etc/opendkim**: - - mkdir -pv /etc/opendkim/ - cd /etc/opendkim/ - -Let's create a new file **/etc/opendkim/TrustedHosts** with the following content - - 127.0.0.1 - -and a new file called **/etc/opendkim/KeyTable** with the following content - - cloudkey jhausse.net:mail:/etc/opendkim/mail.private - -This tells OpenDKIM that we want to use an encryption key named 'cloudkey' whose contents can be found in /etc/opendkim/mail.private. We will create another file named **/etc/opendkim/SigningTable** and add the following line: - - *@jhausse.net cloudkey - -which tells OpenDKIM that every emails of the jhausse.net domain should be signed using the key 'cloudkey'. If we have other domains which we want to sign, we can add them here too. - -The next step is to generate that key and fix permissions on OpenDKIM's config files. - - opendkim-genkey -r -s mail [-t] - chown -Rv opendkim:opendkim /etc/opendkim - chmod 0600 /etc/opendkim/* - chmod 0700 /etc/opendkim - -At first, it's a good idea to use the -t which will signal to other mail servers that you are just in testing mode, and that they shouldn't discard emails based on your OpenDKIM signature (yet). You can get your OpenDKIM key from the mail.txt file: - - cat mail.txt - -and then add it to your zone file as TXT record, which should look like this - - mail._domainkey.cloud1984.net. 300 IN TXT v=DKIM1; k=rsa; p=MIGfMA0GCSqG... - -Finally, we need to tell postfix to sign outgoing emails. At the end of /etc/postfix/main.cf, add: - - # Now for OpenDKIM: we'll sign all outgoing emails - smtpd_milters = inet:127.0.0.1:8891 - non_smtpd_milters = $smtpd_milters - milter_default_action = accept - -And reload the corresponding services - - service postfix reload - service opendkim restart - -Now let's test if our OpenDKIM public key can be found and matches the private key: - - opendkim-testkey -d jhausse.net -s mail -k mail.private -vvv - -which should return - - opendkim-testkey: key OK - -For this, you may need to wait a bit until the name server has reloaded the zone (on Linode, this happens every 15min). You can use **dig** to check if the zone was reloaded yet. - -If this works, let's test if other servers can validate our OpenDKIM signatures and SPF record. To do this, we can use [Brandon Checkett's email test][34]. To send an email to a test address given to us on [Brandon's webpage][34], we can run the following command on the server - - mail -s CloudCheck ihAdmTBmUH@www.brandonchecketts.com - -On Brandon's webpage, you should then see **result = pass** in the 'DKIM Signature' section, and **Result: pass** in the 'SPF Information' section. If our emails pass this test, just regenerate an OpenDKIM key without the -t switch, upload the new key to the zone file, and retest to still if it still passes the tests. If so, congrats! You just successfully set up OpenDKIM and SPF on your server! - -### Host calendars, contacts, files with Owncloud and set up a webmail with Roundcube ### - -Now that we have a top-notch email server, let's add to it the possibility to store your contacts, calendars, and files in the cloud. These are services that the [Owncloud][35] provides out of the box. While we're at it, we'll also set up a webmail, so you can check email even if you're travelling without electronics, or in case your phone and laptop run out of battery. - -Installing Owncloud is straighforward and is well described [here][36]. On Debian, it boils down to adding the owncloud repository to your apt sources, downloading owncloud's release key and adding it to your apt keyring, and then installing owncloud itself using apt-get: - - echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud.list - wget http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_6.0/Release.key - apt-key add - < Release.key - apt-get update - apt-get install apache2 owncloud roundcube - -When prompted for it, choose **dbconfig** and then say you want **roundcube** to use **mysql**. Then, provide the mysql root password and set a good password for the roundcube mysql user. Then, edit the roundcube config file **/etc/roundcube/main.inc.php** so that logging in on roundcube will default to using your IMAP server: - - $rcmail_config['default_host'] = 'ssl://localhost'; - $rcmail_config['default_port'] = 993; - -Now we will set up the apache2 webserver with SSL so that we can talk to Owncloud and Roundcube using encryption for our passwords and data. Let's turn on Apache's ssl module: - - a2enmod ssl - -and edit **/etc/apache2/ports.conf** to set the following parameters: - -NameVirtualHost *:80 -Listen 80 -ServerName www.jhausse.net - - - # If you add NameVirtualHost *:443 here, you will also have to change - # the VirtualHost statement in /etc/apache2/sites-available/default-ssl - # to - # Server Name Indication for SSL named virtual hosts is currently not - # supported by MSIE on Windows XP. - NameVirtualHost *:443 - Listen 443 - - - - Listen 443 - - -We'll set up a default website for encrypted connections to the webserver as **https://www.jhausse.net** under **/var/www**. Edit **/etc/apache2/sites-available/default-ssl**: - - - ServerAdmin webmaster@localhost - - DocumentRoot /var/www - ServerName www.jhausse.net - [...] - - Deny from all - - [...] - SSLCertificateFile /etc/ssl/certs/cloud.crt - SSLCertificateKeyFile /etc/ssl/private/cloud.key - [...] - - -and let's also set up a website for unencrypted connections to **http://www.jhausse.net** under **/var/www**. Edit **/etc/apache2/sites-available/default**: - - - DocumentRoot /var/www - ServerName www.jhausse.net - [...] - - Deny from all - - - -That way, we can serve pages for www.jhausse.net by putting them in /var/www. The 'Deny from all' directive prevents access to Owncloud through www.jhausse.net: we will set it up to access it through **https://cloud.jhausse.net** instead. - -We will now set up the webmail (roundcube) so that it will be accessed through **https://webmail.jhausse.net**. Edit **/etc/apache2/sites-available/roundcube** to have the following content: - - - - ServerAdmin webmaster@localhost - - DocumentRoot /var/lib/roundcube - # The host name under which you'd like to access the webmail - ServerName webmail.jhausse.net - - Options FollowSymLinks - AllowOverride None - - - ErrorLog ${APACHE_LOG_DIR}/error.log - - # Possible values include: debug, info, notice, warn, error, crit, - # alert, emerg. - LogLevel warn - - CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined - - # SSL Engine Switch: - # Enable/Disable SSL for this virtual host. - SSLEngine on - - # do not allow unsecured connections - # SSLRequireSSL - SSLCipherSuite HIGH:MEDIUM - - # A self-signed (snakeoil) certificate can be created by installing - # the ssl-cert package. See - # /usr/share/doc/apache2.2-common/README.Debian.gz for more info. - # If both key and certificate are stored in the same file, only the - # SSLCertificateFile directive is needed. - SSLCertificateFile /etc/ssl/certs/cloud.crt - SSLCertificateKeyFile /etc/ssl/private/cloud.key - - # Those aliases do not work properly with several hosts on your apache server - # Uncomment them to use it or adapt them to your configuration - Alias /program/js/tiny_mce/ /usr/share/tinymce/www/ - - # Access to tinymce files - - Options Indexes MultiViews FollowSymLinks - AllowOverride None - Order allow,deny - allow from all - - - - Options +FollowSymLinks - # This is needed to parse /var/lib/roundcube/.htaccess. See its - # content before setting AllowOverride to None. - AllowOverride All - order allow,deny - allow from all - - - # Protecting basic directories: - - Options -FollowSymLinks - AllowOverride None - - - - Options -FollowSymLinks - AllowOverride None - Order allow,deny - Deny from all - - - - Options -FollowSymLinks - AllowOverride None - Order allow,deny - Deny from all - - - - SSLOptions +StdEnvVars - - - SSLOptions +StdEnvVars - - # SSL Protocol Adjustments: - # The safe and default but still SSL/TLS standard compliant shutdown - # approach is that mod_ssl sends the close notify alert but doesn't wait for - # the close notify alert from client. When you need a different shutdown - # approach you can use one of the following variables: - # o ssl-unclean-shutdown: - # This forces an unclean shutdown when the connection is closed, i.e. no - # SSL close notify alert is send or allowed to received. This violates - # the SSL/TLS standard but is needed for some brain-dead browsers. Use - # this when you receive I/O errors because of the standard approach where - # mod_ssl sends the close notify alert. - # o ssl-accurate-shutdown: - # This forces an accurate shutdown when the connection is closed, i.e. a - # SSL close notify alert is send and mod_ssl waits for the close notify - # alert of the client. This is 100% SSL/TLS standard compliant, but in - # practice often causes hanging connections with brain-dead browsers. Use - # this only for browsers where you know that their SSL implementation - # works correctly. - # Notice: Most problems of broken clients are also related to the HTTP - # keep-alive facility, so you usually additionally want to disable - # keep-alive for those clients, too. Use variable "nokeepalive" for this. - # Similarly, one has to force some clients to use HTTP/1.0 to workaround - # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and - # "force-response-1.0" for this. - BrowserMatch "MSIE [2-6]" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - # MSIE 7 and newer should be able to use keepalive - BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown - - - -and declare the server in your DNS, for instance: - - webmail.jhausse.net. 300 IN CNAME cloud.jhausse.net. - -Now let's enable these three websites - - a2ensite default default-ssl roundcube - service apache2 restart - -and the webmail, accessible under **https://webmail.jhausse.net**, should basically work. Log in using the full email (e.g. roudy@jhausse.net) and the password you set in mailserver DB at the beginning of this article. The first time you connect, the browser will warn you that the certificate was not signed by a certification authority. That's fine, just add an exception. - -Last but not least, we will create a virtual host for owncloud by putting the following content in **/etc/apache2/sites-available/owncloud**: - - - - ServerAdmin webmaster@localhost - - DocumentRoot /var/www/owncloud - ServerName cloud.jhausse.net - - Options FollowSymLinks - AllowOverride None - - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - allow from all - - - ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ - - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - Order allow,deny - Allow from all - - - ErrorLog ${APACHE_LOG_DIR}/error.log - - # Possible values include: debug, info, notice, warn, error, crit, - # alert, emerg. - LogLevel warn - - CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined - - # SSL Engine Switch: - # Enable/Disable SSL for this virtual host. - SSLEngine on - - # do not allow unsecured connections - # SSLRequireSSL - SSLCipherSuite HIGH:MEDIUM - SSLCertificateFile /etc/ssl/certs/cloud.crt - SSLCertificateKeyFile /etc/ssl/private/cloud.key - - - SSLOptions +StdEnvVars - - - SSLOptions +StdEnvVars - - - BrowserMatch "MSIE [2-6]" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - # MSIE 7 and newer should be able to use keepalive - BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown - - - -and activate owncloud by running - - a2ensite owncloud - service apache2 reload - -Then go ahead an configure owncloud by connecting to **https://cloud.jhausse.net/** in a web browswer. - -That's it! Now you've got your own Google Drive, Calendar, Contacts, Dropbox, and Gmail! Enjoy your freshly recovered privacy! :-) - -### Sync your devices to the cloud ### - -To sync your emails, you can just use your favorite email client: the standard email program on Android or iOS, [k9mail][37], or Thunderbird on your PC. Or you can also use the webmail we set up. - -How to sync your calendar and contacts with the cloud is described in the doc of owncloud. On Android, I'm using the CalDAV-Sync and CardDAV-Sync apps which act as bridges between the Android calendar and contacts apps of the phone and the owncloud server. - -For files, there is an Android app called Owncloud to access your files from your phone and automatically upload pictures and videos you take to your cloud. Accessing your files on the your Mac/PC is easy and [well described in the Owncloud documentation][38]. - -### Last tips ### - -During the first few weeks, it's a good idea to monitor **/var/log/syslog** and **/var/log/mail.log** on a daily basis and make sure everything everything is running smoothly. It's important to do so before you invite others (friends, family, ...) to be hosted on your server; you might loose their trust in self-hosting for good if they trust you with their data and the server suddently becomes unavailable. - -To add another email user, just add a row to the **virtual_users** table of the **mailserver** DB. - -To add a domain, just add a row to the **virtual_domains** table. Then update **/etc/opendkim/SigningTable** to get outgoing emails signed, upload the OpenDKIM key to the zone, and reload OpenDKIM. - -Owncloud has its own user DB which can be managed by logging in in Owncloud as administrator. - -Finally, it's important to think in advance of a solution in case your server becomes temporarily unavailable. For instance, where would your mails go until your server returns? One solution would be to find a friend who can act as your backup MX, while you act as his backup MX (see the **relay_domains** and **relay_recipient_maps** setting in Postfix's **main.cf** file). Similarly, what if your server is compromised and a malicious individual erases all your files there? For that, it's important to think of a regular backup system. Linode offers backups as an option. On 1984.is, I set up a basic but sufficient automatic backup system using on crontabs and scp. - --------------------------------------------------------------------------------- - -via: https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/ - -作者:[Roudy Jhausse ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:aboutlinux@free.fr -[1]:https://history.google.com/history/ -[2]:http://research.google.com/workatgoogle.html -[3]:http://www.attac.org/ -[4]:http://www.nytimes.com/2012/02/19/magazine/shopping-habits.html?pagewanted=all -[5]:http://vimeo.com/ondemand/termsandconditions -[6]:http://www.techtimes.com/articles/21670/20141208/sony-pictures-hack-nightmare-week-celebs-data-leak-and-threatening-emails-to-employees.htm -[7]:http://blog.backupify.com/2012/07/25/what-is-my-gmail-account-really-worth/ -[8]:http://adage.com/article/digital/worth-facebook-google/293042/ -[9]:http://vimeo.com/ondemand/termsandconditions -[10]:https://prism-break.org/en/ -[11]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#VPS -[12]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#mail -[13]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#dspam -[14]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#SPF -[15]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#owncloud -[16]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#sync -[17]:http://linuxfr.org/news/heberger-son-courriel -[18]:http://sealedabstract.com/code/nsa-proof-your-e-mail-in-2-hours/ -[19]:http://www.1984.is/ -[20]:http://www.linode.com/ -[21]:http://www.greenpeace.org/international/Global/international/publications/climate/2012/iCoal/HowCleanisYourCloud.pdf -[22]:http://www.1984.is/about/ -[23]:http://www.fsf.org/ -[24]:https://www.gnupg.org/ -[25]:http://www.gandi.net/ -[26]:http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html -[27]:http://www.postfix.org/ -[28]:http://postgrey.schweikert.ch/ -[29]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#testPort25 -[30]:http://dspam.sourceforge.net/ -[31]:http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/ -[32]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#PTR -[33]:http://opendkim.org/opendkim-README -[34]:http://www.brandonchecketts.com/emailtest.php -[35]:http://owncloud.org/ -[36]:http://owncloud.org/install/ -[37]:https://code.google.com/p/k9mail/ -[38]:http://doc.owncloud.org/server/7.0/user_manual/files/files.html diff --git a/translated/tech/20150115 Get back your privacy and control.md b/translated/tech/20150115 Get back your privacy and control.md new file mode 100644 index 0000000000..9695c1f3de --- /dev/null +++ b/translated/tech/20150115 Get back your privacy and control.md @@ -0,0 +1,1111 @@ +在短短几个小时里拿回自己数据的隐私和控制权:为自己和朋友们搭建私有云 +================================================================================ +8年里40'000多次搜索!这是我的Google搜索历史。你的呢?(可以在[这里][1]自己找一下)有经过这么长时间积累下来的这么多数据点,Google已经能非常精确的推测你对什么感兴趣,曾经的想法,担忧过的事情,以及从你第一次获得Google帐号后这些年里所有这些的变化。 + +### 很多非常私人的信息不受自己控制地存储在世界范围内的服务器上 ### + +比如说你也像我一样从2006年到2013年都是Gmail用户,意味着你收到了30'000+的电子邮件以及在这7年里写了差不多5000封电子邮件。这些发送或收到的电子邮件里有很多是非常私人的,私人到你甚至不希望自己的家人或好友能系统地查看。也许你还写过一些草稿邮件,因为最后一分钟改变主意而从没发出去。但是尽管你从未发出去,这些邮件仍然保存在服务器上的某个地方。结论是,说Google服务器比你最亲密的朋友或家人都更了解你的个人生活一点也不过分。 + +从统计数据来看,可以很安全地赌你拥有一部智能手机。如果不使用联系人应用的话手机将基本没法用,而它默认会将你的联系人信息保存到Google服务器上的Google联系人里。所以,现在Google不仅知道了你的电子邮件,还有了你的离线联系人:你喜欢打给谁,谁来过电话,你发过短信给谁,以及发了些什么。你也不需要听我的片面之词,可以自己检查一下,看看你开放给类似Google Play服务的一些应用的权限,用来读取来电信息以及收到的短信。你是否还会用到手机里自带的日历应用?除非你在设置日程的时候明确地去掉,那么Google将精确地知道你将要做什么,一天里的每个时段,每一天,每一年。用iPhone代替Android手机也是一样的,只是Apple会代替Google来掌握你的往来邮件,联系人和日程计划。 + +你是否还会非常小心地同步自己的联系人信息,在你朋友,同事或家人换工作或换服务商的时候更新他们的电子邮件地址和手机号?这给Google提供了一副你社交网络的非常精确的,最新的图片。还有你非常喜欢手机的GPS功能,经常配合Google地图使用。这意味着Google不仅能从日程里知道你在干什么,还知道你在哪儿,住在哪儿,在哪儿工作。然后再关联用户之间的GPS位置信息,GOogle还能知道你现在可能正在和哪些人来往。 + +### 这种泄漏自己私人信息的日常爱好会以一种甚至没人能够预测的方式影响你的生活 ### + +总结一下,如果你是一个普通的因特网用户,Google拥有过去差不多10年里你最新的,深度的信息,关于你的兴趣,忧虑,热情,疑问。它还收集了一些你很私人的信息(电子邮件,短信),精确到小时的你的日常活动和位置,一副你社交网络的高品质图片。关于你的如此私密的数据,很可能已经超越了你最亲密的朋友,家人或爱人对你的了解。 + +不敢想象把这些深度的个人信息交给完全陌生的人,就好像把这些信息拷到一个U盘里,然后随便放到某个咖啡厅的桌上,留张纸条说“Olivier Martin的个人数据,请随便”。谁知道什么人会拿到它以及用来干嘛?然而,我们毫不犹豫地把自己的主要信息交给那些对我们的数据很感兴趣的IT公司的陌生人(这是他们制造面包的材料)以及[世界级的数据分析专家][2]手里,也许只是因为我们在点击那个绿色的'接受'按钮时根本没有想这么多。 + +有这么多的高质量信息,这么多年里,Google可能会比你希望自我了解的更了解你自己:尼玛,回想我过去的数字生活,我已经不记得5年前发出的邮件里的一半了。我很高兴能重新发现早在2005年对马克思主义的兴趣以及第二年加入了[ATTAC][3](一个致力于通过征收金融交易税来限制投机和改善社会公平的组织)。天知道为什么我竟然在2007年这么喜欢跳舞。这些都是无关紧要的信息(你不要指望我能爆出什么猛料,不会吧?;-)。但是,连接起这些高质量数据点,关于你生活的方方面面(做什么,什么时候,和谁一起,在哪里,...),并跨越这么长时间间隔,应该能推测出你的未来状态。比如说,根据一个17岁女孩的购物习惯,超市甚至可以在他父亲听说之前断定这个女孩怀孕了([真实故事][4])。谁知道通过像Google所掌握的这些远远超出购物习惯的高质量数据能做些什么?连接起这些点,也许有人能预测你未来几年里口味或政治观点的变化。如今,[你从未听过的公司声称拥有你500项数据点][5],包括宗教信仰,性取向和政治观点。提到政治,如果说你决定今后10年内进入政坛会怎么样?你的生活会改变,你的观点也一样,甚至你有时候会有所遗忘,但是Google不会。那你会不会担心你的对手会接触一些可以从Google访问你数据的人并会从你过去这些年里积累的个人数据深渊里挖出一些猛料呢?[就像最近Sony被黑][6]一样,多久以后会轮到Google或Facebook,以致让你的个人信息最终永远暴露? + +我们大多数人把自己的个人数据托付给这些公司的一个原因就是它们提供免费服务。但是真的免费吗?一般的Google帐号的价值根据评估方式不同会有些差别:你花在写邮件上的时间占到[1000美元/年][7],你的帐号对于广告产业的价值差不多在[220美元/年][8]到[500美元/年][9]之间。所以这些服务并不是真的免费:会通过广告和我们的数据在未来的一些未知使用来间接付费。 + +我写的最多的是Google,这是因为这是我托付个人数字信息的,以及目前我所知道做的最好的公司。但是我也提到过Apple或Facebook。这些公司通过它们在设计,工程和我们(曾经)喜欢每天使用的服务方面的神奇进步实实在在地改变了世界。但是这并不是说我们应该把所有我们最私人的个人数据堆积到它们的服务器上并把我们的数字生活托付给它们:潜在的危害实在太大了。 + +### 只要5小时,拿回自己以及关心的人的隐私权 ### + +并不是一定要这样做。你可以生活在21世纪,拿着智能手机,每天都用电子邮件和GPS,却仍然可以保留自己的隐私。你所需要的就是拿回自己个人数据的控制权:邮件、日程、联系人、文件,等等。[Prism-Break.org][10]网站上列出了一些能帮你掌握个人数据命运的软件。除此以外,控制自己个人数据的最安全和最有效的方式是架设自己的服务器并搭建自己的云。不过你也许只是没有时间或精力去研究具体该怎么做以及如何让它能流畅工作。 + +这也是这篇文章的意义所在。仅仅5个小时内,我们将配置出一台服务器来支撑你的邮件、联系人、日程表和各种文件,为你、你的朋友和你的家人。这个服务器将设计成一个个人数据中心或云,所以你能时刻保留它的完整控制。数据将自动在你的台式机/笔记本、手机和平板之间同步。从根本上来说,**我们将建立一个系统来代替Gmail、Google文件/Dropbox、Google联系人、Google日历和Picasa**。 + +为自己做这件事情已经是迈出很大一步了。但是,你个人信息的很大一部分将仍然泄漏出去并保存到硅谷的一些主机上,只是因为和你日常来往的太多人在用Gmail和使用智能手机。所以最好是带上你一些比较亲近的人加入这次探险。 + +我们将构建的系统能够 + +- **支持任意数目的域名和用户**。这样就能轻易地和你的家人朋友共享这台服务器,所以他们也能掌控自己的个人数据,并且还能和你一起分摊服务费用。和你一起共享服务器的人可以使用他们自己的域名或者共享你的。 +- **允许你从任意网络发送和接收电子邮件**,需要成功登录服务器之后。这样,你可以通过任意的邮件地址,任意设备(台式机、手机、平板),任意网络(家里、公司、公共网络、...)来发送电子邮件。 +- **在发送和接收邮件的时候加密网络数据**,这样,你不信任的人不能钓出你的密码,也不能看到你的私人邮件。 +- **提供最先进的反垃圾邮件技术**,结合了已知垃圾邮件黑名单,自动灰名单,和自适应垃圾邮件过滤。如果邮件被误判了只需要简单地把它拖入或拖出垃圾目录就可以重新配置垃圾邮件过滤器。而且,服务器还会为基于社区的反垃圾邮件努力做出贡献。 +- **一段时间里只需要几分钟的维护**,基本上只是安装安全更新和简单地检查一下服务器日志。添加一个新的邮件地址只需要在数据库中插入一条记录。除此之外,你可以忘记它的存在过自己的生活。我在14个月之前搭建了本文描述的这个系统,从那以后就一直顺利运行。所以我完全把它给忘了,直到我最近觉得随便按下手机上的‘检查邮件’会导致电子一路跑到冰岛(我放置服务器的地方)再回来的想法有点好笑才想起来。 + +要完成这篇文章里的工作,你需要一点基本的技术能力。如果你知道SMTP和IMAP的区别,什么是DNS,以及对TCP/IP有基本了解的话,就够了。你还将需要一点基本的Unix知识(在命令行下和文件一起工作,基本的系统管理)。然后你需要花总共5小时时间来搭建。 + +下面是我们将要做的事情的概述。 + +- [申请一个虚拟私人服务器,一个域名,并把它们配置好][11] +- [设置postfix和dovecot来收发电子邮件][12] +- [阻止垃圾邮件进入你的收件箱][13] +- [确保你发出的邮件能通过垃圾邮件过滤器][14] +- [使用Owncloud提供日历,联系人,文件服务并配置webmail][15] +- [在云上同步你的设备][16] + +### 这篇文章是受之前工作的启发并以之为基础 ### + +本文很大程度参考了两篇文章,由[Xavier Claude][17]和[Drew Crawford][18]写的关于架设私有邮件服务器的介绍。 + +本文覆盖了Xavier和Drew的文章里所描述的所有功能,除了3个地方Drew有而我没有:邮件推送支持(我喜欢由我主动检查邮件,而其他时候都不会被打扰),邮件全文检索(我一直都没用过),以及使用加密方式存储邮件(我的邮件和数据还没那么重要到要把它们加密后再存到本地服务器上)。如果你需要这些功能,只需要按照Drew的文章里相应部分的说明做就好了,和本文的内容兼容。 + +和Xavier和Drew的成果比起来,本文有下面几个主要改进: + +- 根据我自己按Drew文章操作的经验以及原文的大量回复,修改了一些问题和文字错误。我也把本文所介绍的内容仔细检查了几遍,从头开始设定了几次服务器做重复验证以确保能正常工作。 +- 低维护:和Xavier的方式比起来,本文增加了在服务器上支持多个邮件域名。这样做是为了尽可能地减少服务器维护工作:基本上,要添加一个域名或用户,只需要往mysql数据库表里增加一行就好了(不需要增加过滤脚本,等等)。 +- 我增加了webmail。 +- 我增加了设定云服务器的部分,不仅能收发邮件还能管理文件,地址本/联系人(邮件地址,电话号码,生日,等等等),日程表和图片,供所有设备访问使用。 + +### 申请一个虚拟私人服务器,一个域名,并把它们配置好 ### + +让我们从设置基础设施开始:我们的虚拟私人主机和我们的域名。 + +我用过[1984.is][19]和[Linode][20]提供的虚拟私人主机(VPS),体验非常好。在本文中,我们将使用**Debian Wheezy**,这个在1984和Linode都提供了已经做好的映像文件可以直接布置到你的VPS上。我喜欢1984是因为它的服务器在冰岛,也是唯一使用可再生能源(地热和水力发电)的地方,目前还没有影响过气候变化,不像[大多数美国数据中心目前大多数依赖于烧煤的火力发电站][21]。而且,他们注重[民权,透明,自由][22]以及[免费软件][23]。 + +最好是在服务器上创建一个文件用来保存后面要用到的各种密码(用户账号,邮件账号,云帐号,数据库帐号)。当然最好是加密一下(可以用[GnuPG][24]),这样就算用来设定服务器的电脑被偷了或被入侵了,你的服务器就不会那么容易被攻击。 + +关于注册域名,我已经使用[grandi][25]的服务超过10年了,也很满意。在本文中,我们将开辟一个叫**jhausse.net**的域名。然后在上面增加一个叫**cloud.jhausse.net**的二级域名,并绑定MX纪录。在完成之后,设置比较短的纪录生存时间(TTL)比如300秒,这样你在设置服务器的时候,可以修改你的域并很快测试到结果。 + +最后,设置PTR纪录(反向DNS),这样IP地址可以反向映射回它的域名。如果你不理解前面这句话,看下[这篇文章][26]来获得相关背景知识。如果你使用Linode的服务,你可以在远程访问这一栏的控制面板里设置PTR纪录。如果是1984,联系一下技术支持来帮你搞定。 + +在服务器上,我们从添加一个普通用户开始,这样我们不用从头到尾一直用root账号。另外,用root登陆也需要额外多一层安全措施。 + + adduser roudy + +然后,在文件**/etc/ssh/sshd_config**中设置 + + PermitRootLogin no + +然后重启ssh服务 + + service ssh reload + +然后,我们要修改服务器的主机名。编辑文件**/etc/hostname**,只有一行就是自己的主机名,我们这个例子中是 + + cloud + +然后,编辑ssh服务的公钥文件**/etc/ssh/ssh_host_rsa_key.pub, /etc/ssh/ssh_host_dsa_key.pub, /etc/ssh/ssh_host_ecdsa_key.pub**,这样文件末尾可以反映你的主机名,比如**root@cloud**。然后重启系统保证主机名在系统的每个需要它的角落都生效了。 + + reboot + +我们将更新系统并移除不必要的服务以降低远程攻击的风险。 + + apt-get update + apt-get dist-upgrade + service exim4 stop + apt-get remove exim4 rpcbind + apt-get autoremove + apt-get install vim + +我喜欢使用vim远程编辑配置文件。打开自动语法高亮会很有帮助。添加下面这一行到**~/.vimrc**文件中。 + + syn on + +### 设置postfix和dovecot来收发电子邮件 ### + + apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-mysql mysql-server dovecot-lmtpd postgrey + +在[Postfix][27]的配置菜单里,选择**因特网站点**,把系统邮件名设为**jhausse.net**。 + +现在开始添加一个数据库用于保存主机上管理的域名列表,和每个域名下的用户列表(同时也包括他们各自的密码),以及邮件别名列表(用于从一个地址往另一个地址转发邮件)。 + + mysqladmin -p create mailserver + mysql -p mailserver + mysql> GRANT SELECT ON mailserver.* TO 'mailuser'@'localhost' IDENTIFIED BY 'mailuserpass'; + mysql> FLUSH PRIVILEGES; + mysql> CREATE TABLE `virtual_domains` ( + `id` int(11) NOT NULL auto_increment, + `name` varchar(50) NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + mysql> CREATE TABLE `virtual_users` ( + `id` int(11) NOT NULL auto_increment, + `domain_id` int(11) NOT NULL, + `password` varchar(106) NOT NULL, + `email` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `email` (`email`), + FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + mysql> CREATE TABLE `virtual_aliases` ( + `id` int(11) NOT NULL auto_increment, + `domain_id` int(11) NOT NULL, + `source` varchar(100) NOT NULL, + `destination` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +我们将承载**jhausse.net**域名。如果还需要加入其他域名,也没问题。我们也会为每个域名设置一个邮件管理地址,转寄给**roudy@jhausse.net**。 + + mysql> INSERT INTO virtual_domains (`name`) VALUES ('jhausse.net'); + mysql> INSERT INTO virtual_domains (`name`) VALUES ('otherdomain.net'); + mysql> INSERT INTO virtual_aliases (`domain_id`, `source`, `destination`) VALUES ('1', 'postmaster', 'roudy@jhausse.net'); + mysql> INSERT INTO virtual_aliases (`domain_id`, `source`, `destination`) VALUES ('2', 'postmaster', 'roudy@jhausse.net'); + +现在已经添加了一个本地邮件账号**roudy@jhausse.net**。首先,为它生成一个哈希密码: + + doveadm pw -s SHA512-CRYPT + +然后把哈希值加入到数据库中 + + mysql> INSERT INTO `mailserver`.`virtual_users` (`domain_id`, `password`, `email`) VALUES ('1', '$6$YOURPASSWORDHASH', 'roudy@jhausse.net'); + +现在我们的域名,别名和用户列表都设置好了,然后开始设置postfix(SMTP服务器,用来发送邮件)。把文件**/etc/postfix/main.cf**替换为下面的内容: + + myhostname = cloud.jhausse.net + myorigin = /etc/mailname + mydestination = localhost.localdomain, localhost + mynetworks_style = host + + # We disable relaying in the general case + smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination + # Requirements on servers that contact us: we verify the client is not a + # known spammer (reject_rbl_client) and use a graylist mechanism + # (postgrey) to help reducing spam (check_policy_service) + smtpd_client_restrictions = permit_mynetworks, reject_rbl_client zen.spamhaus.org, check_policy_service inet:127.0.0.1:10023 + disable_vrfy_command = yes + inet_interfaces = all + smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) + biff = no + append_dot_mydomain = no + readme_directory = no + + # TLS parameters + smtpd_tls_cert_file=/etc/ssl/certs/cloud.crt + smtpd_tls_key_file=/etc/ssl/private/cloud.key + smtpd_use_tls=yes + smtpd_tls_auth_only = yes + smtp_tls_security_level=may + smtp_tls_loglevel = 1 + smtpd_tls_loglevel = 1 + smtpd_tls_received_header = yes + smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache + smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache + + # Delivery + alias_maps = hash:/etc/aliases + alias_database = hash:/etc/aliases + message_size_limit = 50000000 + recipient_delimiter = + + + # The next lines are useful to set up a backup MX for myfriendsdomain.org + # relay_domains = myfriendsdomain.org + # relay_recipient_maps = + + # Virtual domains + virtual_transport = lmtp:unix:private/dovecot-lmtp + virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf + virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf + virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf + local_recipient_maps = $virtual_mailbox_maps + +现在我们要让postfix知道如何从我们设定的数据库里找出需要接收邮件的域名。建立一个新文件**/etc/postfix/mysql-virtual-mailbox-domains.cf**并添加以下内容: + + user = mailuser + password = mailuserpass + hosts = 127.0.0.1 + dbname = mailserver + query = SELECT 1 FROM virtual_domains WHERE name='%s' + +我们可以让postfix判断给定的电子邮件账号是否存在,创建文件**/etc/postfix/mysql-virtual-mailbox-maps.cf**并写入以下内容: + + user = mailuser + password = mailuserpass + hosts = 127.0.0.1 + dbname = mailserver + query = SELECT 1 FROM virtual_users WHERE email='%s' + +最后,postfix会根据文件**/etc/postfix/mysql-virtual-alias-maps.cf**的内容来查找邮件别名 + + user = mailuser + password = mailuserpass + hosts = 127.0.0.1 + dbname = mailserver + query = SELECT virtual_aliases.destination as destination FROM virtual_aliases, virtual_domains WHERE virtual_aliases.source='%u' AND virtual_aliases.domain_id = virtual_domains.id AND virtual_domains.name='%d' + +在配置好这些后,现在要测试一下postfix是否能正常查询数据库。我们可以用**postmap**命令测试: + + postmap -q jhausse.net mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf + postmap -q roudy@jhausse.net mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf + postmap -q postmaster@jhausse.net mysql:/etc/postfix/mysql-virtual-alias-maps.cf + postmap -q bob@jhausse.net mysql:/etc/postfix/mysql-virtual-alias-maps.cf + +如果一切都正常配置了的话,头两个查询应该输出1,第3个查询应该输出**roudy@jhausse.net**,而最后一个应该什么都不输出。 + +现在,让我们设置一下dovecot(一个IMAP服务程序,用来在我们的设备上从服务器获取收件箱里的邮件)。编辑文件**/etc/dovecot/dovecot.conf**设置以下参数: + + # Enable installed protocol + # !include_try /usr/share/dovecot/protocols.d/*.protocol + protocols = imap lmtp + +这样将只打开imap(让我们可以获取邮件)和lmtp(postfix用来将收件箱里的邮件转给dovecot)。编辑**/etc/dovecot/conf.d/10-mail.conf**并设置以下参数: + + mail_location = maildir:/var/mail/%d/%n + [...] + mail_privileged_group = mail + [...] + first_valid_uid = 0 + +这样邮件将被保存到目录/var/mail/domainname/username下。注意下这几个选项散布在配置文件的不同位置,有时已经在那里写好了:我们只需要取消注释。文件里的其他设定选项,可以维持原样。在本文后面还有很多文件需要用同样的方式更新设置。在文件**/etc/dovecot/conf.d/10-auth.conf**里,设置以下参数: + + disable_plaintext_auth = yes + auth_mechanisms = plain + #!include auth-system.conf.ext + !include auth-sql.conf.ext + +在文件**/etc/dovecot/conf.d/auth-sql.conf.ext**里,设置以下参数: + + passdb { + driver = sql + args = /etc/dovecot/dovecot-sql.conf.ext + } + userdb { + driver = static + args = uid=mail gid=mail home=/var/mail/%d/%n + } + +这是告诉dovecot用户的邮件保存在目录/var/mail/domainname/username下,以及如何从我们刚建立的数据库里查找密码。现在我们还需要告诉dovecot具体如何使用数据库。这样需要把下面的内容加入**/etc/dovecot/dovecot-sql.conf.ext**文件: + + driver = mysql + connect = host=localhost dbname=mailserver user=mailuser password=mailuserpass + default_pass_scheme = SHA512-CRYPT + password_query = SELECT email as user, password FROM virtual_users WHERE email='%u'; + +我们现在修改一下配置文件的权限 + + chown -R mail:dovecot /etc/dovecot + chmod -R o-rwx /etc/dovecot + +基本差不多了!只是还需要再多编辑几个文件。在文件**/etc/dovecot/conf.d/10-master.conf**里,设置以下参数: + + service imap-login { + inet_listener imap { + #port = 143 + port = 0 + } + inet_listener imaps { + port = 993 + ssl = yes + } + } + + service pop3-login { + inet_listener pop3 { + #port = 110 + port = 0 + } + inet_listener pop3s { + #port = 995 + #ssl = yes + port = 0 + } + } + + service lmtp { + unix_listener /var/spool/postfix/private/dovecot-lmtp { + mode = 0666 + group = postfix + user = postfix + } + user = mail + } + + service auth { + unix_listener auth-userdb { + mode = 0600 + user = mail + #group = + } + + # Postfix smtp-auth + unix_listener /var/spool/postfix/private/auth { + mode = 0666 + user = postfix + group = postfix + } + + # Auth process is run as this user. + #user = $default_internal_user + user = dovecot + } + + service auth-worker { + user = mail + } + +注意下我们把除了imaps之外所有服务的端口都设置成了0,这样可以有效地禁止这些服务。然后,在文件**/etc/dovecot/conf.d/15-lda.conf**里,指定一个邮箱管理地址: + + postmaster_address = postmaster@jhausse.net + +最后但很重要的一点,我们为服务器需要生成一对公钥和私钥,可以同时用于dovecot和postfix: + + openssl req -new -newkey rsa:4096 -x509 -days 365 -nodes -out "/etc/ssl/certs/cloud.crt" -keyout "/etc/ssl/private/cloud.key" + +请确保你指定了服务器的完全限定域名(FQDN),在本文的例子里: + + Common Name (e.g. server FQDN or YOUR name) []:cloud.jhausse.net + +如果没有的话,我们的客户端会抱怨在SSL证书里的服务器名字和所连接的服务器名字不一致。我们将通过修改配置文件**/etc/dovecot/conf.d/10-ssl.conf**里的如下选项来告诉dovecot使用刚生成的密钥: + + ssl = required + ssl_cert = : Relay access denied + +这个没问题:如果服务器能接受这封邮件,那意味着我们架设的postfix是一个对全世界所有垃圾邮件都开放的中继,将完全没法使用。除了'Relay access denied'消息,你也可能会收到这样的响应: + + 554 5.7.1 Service unavailable; Client host [87.68.61.119] blocked using zen.spamhaus.org; http://www.spamhaus.org/query/bl?ip=87.68.61.119 + +意思是你正尝试从一个被标记成垃圾邮件发送者的IP地址连接服务器。我在通过普通的因特网服务提供商(ISP)连接服务器时曾收到过这样的消息。要解决这个问题,可以试着从另一个主机发起连接,比如另外一个你可以SSH登录的主机。另外一种方式是,你可以修改postfix的**main.cf**配置文件,不要使用Spamhous的RBL,重启postfix服务,然后再检查上面的测试是否正常。不管用哪种方式,最重要的是你要确定一个能工作的,因为我们后面马上要测试其他功能。如果你选择了重新配置postfix不使用RBL,别忘了在完成本文后重新开启RBL并重启postfix,以避免收到一些不必要的垃圾邮件。 + +现在,我们试一下往SMTP端口25发送一封有效的邮件,这是一般正常的邮件服务器用来彼此对话的方式: + + openssl s_client -connect cloud.jhausse.net:25 -starttls smtp + EHLO cloud.jhausse.net + MAIL FROM:youremail@domain.com + rcpt to:roudy@jhausse.net + +服务器应该有这样的响应 + + Client host rejected: Greylisted, see http://postgrey.schweikert.ch/help/jhausse.net.html + +这意味着[postgrey][28]工作正常。postgrey做的是用临时错误拒绝未知发送者的邮件。邮件的技术规则是要求邮件服务器尝试重新发送邮件。在5分钟后,postgrey就会接收这封邮件。一般世界范围内遵守规则的邮件服务器都会尝试为我们重复投递邮件,但大多数垃圾邮件发送者不会这样做。所以,等上5分钟,再次通过上面的命令发送一次,然后检查postfix应该正常接收了邮件。 + +之后,我们检查一下我们可以通过IMAP和dovecot对话获取刚才发送的两封邮件。 + + openssl s_client -crlf -connect cloud.jhausse.net:993 + 1 login roudy@jhausse.net "mypassword" + 2 LIST "" "*" + 3 SELECT INBOX + 4 UID fetch 1:1 (UID RFC822.SIZE FLAGS BODY.PEEK[]) + 5 LOGOUT + +这里,你应该把mypassword替换为你自己为这个邮件账号设定的密码。如果能正常工作,基本上我们已经拥有一个能接收邮件的邮件服务器了,通过它我们可以在各种设备(PC/笔记本,平板,手机,...)上收取邮件了。但是我们不能把邮件给它发送出去,除非我们自己从服务器发送。现在我们将让postfix为我们转发邮件,但是这个只有成功登录才可以,这是为了保证邮件是由服务器上的某个有效帐号发出来的。要做到这个,我们要打开一个特殊的,全程SSL连接的,SASL鉴权的邮件提交服务。在文件**/etc/postfix/master.cf**里设置下面的参数: + + submission inet n - - - - smtpd + -o syslog_name=postfix/submission + -o smtpd_tls_security_level=encrypt + -o smtpd_sasl_auth_enable=yes + -o smtpd_client_restrictions=permit_sasl_authenticated,reject + -o smtpd_sasl_type=dovecot + -o smtpd_sasl_path=private/auth + -o smtpd_sasl_security_options=noanonymous + -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject_non_fqdn_recipient,reject_unauth_destination + +然后重启postfix服务 + + service postfix reload + +现在,让我们试试从一台不同的机器连接这个服务,确定一下postfix现在能够正常中继我们自己的而不是其他任何人的邮件: + + openssl s_client -connect cloud.jhausse.net:587 -starttls smtp + EHLO cloud.jhausse.net + +注意一下服务器建议的'250-AUTH PLAIN'功能,在从端口25连接的时候不会生效。 + + MAIL FROM:asdf@jkl.net + rcpt to:bob@gmail.com + 554 5.7.1 : Relay access denied + QUIT + +这个没问题,postfix在不认识我们的时候是不会中继邮件的。所以,首先让我们先鉴定一下自己的身份。要这样做,我们首先需要生成一个鉴权字符串: + + echo -ne '\000roudy@jhausse.net\000mypassword'|base64 + +然后让我们尝试再次通过服务器发送邮件: + + openssl s_client -connect cloud.jhausse.net:587 -starttls smtp + EHLO cloud.jhausse.net + AUTH PLAIN DGplYW5AMTk4NGNsb3VQLm5ldAA4bmFmNGNvNG5jOA== + MAIL FROM:asdf@jkl.net + rcpt to:bob@gmail.com + +现在postfix应该能正常接收。最后完成这个测试,来检查一下我们的虚拟别名能正常工作,给postmaster@jhausse.net发送一封邮件然后确认一下它会被送到roudy@jhausse.net: + + telnet cloud.jhausse.net 25 + EHLO cloud.jhausse.net + MAIL FROM:youremail@domain.com + rcpt to:postmaster@jhausse.net + data + Subject: Virtual alias test + + Dear postmaster, + Long time no hear! I hope your MX is working smoothly and securely. + Yours sincerely, Roudy + . + QUIT + +让我们检查一下邮件是否被正常送到正确的收件箱了: + + openssl s_client -crlf -connect cloud.jhausse.net:993 + 1 login roudy@jhausse.net "mypassword" + 2 LIST "" "*" + 3 SELECT INBOX + * 2 EXISTS + * 2 RECENT + 4 LOGOUT + +到这里,我们已经拥有一个能正常工作的邮箱服务器了,能收发邮件。我们可以配置自己的设备来使用它。 + +PS:不要忘记再次[试试通过端口25往自己架设的服务器上的帐号发送邮件][29],来验证你已经没有被postgrey阻挡了。 + +### 阻止垃圾邮件进入你的收件箱 ### + +为了过滤垃圾邮件,我们已经使用了实时黑名单(RBLs)和灰名单(postgrey)。现在我们将增加自适应垃圾邮件过滤来让我们的垃圾邮件过滤能力提高一个等级。这意味着我们将为我们的邮件服务器增加人工智能,这样它就能从经验中学习哪些有件是垃圾哪些不是。我们将使用[dspam][30]来实现这个功能。 + + apt-get install dspam dovecot-antispam postfix-pcre dovecot-sieve + +dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误分类了之后让dovecot重新更新垃圾邮件过滤器。基本上,我们所需要做的就只是把邮件放进或拿出垃圾箱。dovecot-antispam将负责调用dspam来更新过滤器。至于postfix-pcre和dovecot-sieve,我们将分别用它们来把接收的邮件递给垃圾邮件过滤器以及自动把垃圾邮件放入用户的垃圾箱。 + +在配置文件**/etc/dspam/dspam.conf**里,为以下参数设置相应的值: + + TrustedDeliveryAgent "/usr/sbin/sendmail" + UntrustedDeliveryAgent "/usr/lib/dovecot/deliver -d %u" + Tokenizer osb + IgnoreHeader X-Spam-Status + IgnoreHeader X-Spam-Scanned + IgnoreHeader X-Virus-Scanner-Result + IgnoreHeader X-Virus-Scanned + IgnoreHeader X-DKIM + IgnoreHeader DKIM-Signature + IgnoreHeader DomainKey-Signature + IgnoreHeader X-Google-Dkim-Signature + ParseToHeaders on + ChangeModeOnParse off + ChangeUserOnParse full + ServerPID /var/run/dspam/dspam.pid + ServerDomainSocketPath "/var/run/dspam/dspam.sock" + ClientHost /var/run/dspam/dspam.sock + +然后,在配置文件**/etc/dspam/default.prefs**里,把以下参数改为: + + spamAction=deliver # { quarantine | tag | deliver } -> default:quarantine + signatureLocation=headers # { message | headers } -> default:message + showFactors=on + +现在我们需要把dspam连接到postfix和dovecot上,在配置文件**/etc/postfix/master.cf**最后添加这样两行: + + dspam unix - n n - 10 pipe + flags=Ru user=dspam argv=/usr/bin/dspam --deliver=innocent,spam --user $recipient -i -f $sender -- $recipient + dovecot unix - n n - - pipe + flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} + +现在我们将告诉postfix通过dspam来过滤所有提交给服务器端口25(一般的SMTP通信)的新邮件,除非该邮件是从服务器本身发出(permit_mynetworks)。注意下我们通过SASL鉴权提交给postfix的邮件不会通过dspam过滤,因为我们在前面部分里为这种方式设定了独立的提交服务。编辑文件**/etc/postfix/main.cf**将选项**smtpd_client_restrictions**改为如下内容: + + smtpd_client_restrictions = permit_mynetworks, reject_rbl_client zen.spamhaus.org, check_policy_service inet:127.0.0.1:10023, check_client_access pcre:/etc/postfix/dspam_filter_access + +在文件末尾,还需要增加: + + # For DSPAM, only scan one mail at a time + dspam_destination_recipient_limit = 1 + +现在我们需要指定我们定义的过滤器。基本上,我们将告诉postfix把所有邮件(/./)通过unix套接字发给dspam。创建一个新文件**/etc/postfix/dspam_filter_access**并把下面一行写进去: + + /./ FILTER dspam:unix:/run/dspam/dspam.sock + +这是postfix部分的配置。现在让我们为dovecot设置垃圾过滤。在文件**/etc/dovecot/conf.d/20-imap.conf**里,修改**imap mail_plugin**插件参数为下面的方式: + + mail_plugins = $mail_plugins antispam + +并为lmtp增加一个部分: + + protocol lmtp { + # Space separated list of plugins to load (default is global mail_plugins). + mail_plugins = $mail_plugins sieve + } + +我们现在设置dovecot-antispam插件。编辑文件**/etc/dovecot/conf.d/90-plugin.conf**并把以下内容添加到插件部分: + + plugin { + ... + # Antispam (DSPAM) + antispam_backend = dspam + antispam_allow_append_to_spam = YES + antispam_spam = Junk;Spam + antispam_trash = Trash;trash + antispam_signature = X-DSPAM-Signature + antispam_signature_missing = error + antispam_dspam_binary = /usr/bin/dspam + antispam_dspam_args = --user;%u;--deliver=;--source=error + antispam_dspam_spam = --class=spam + antispam_dspam_notspam = --class=innocent + antispam_dspam_result_header = X-DSPAM-Result + } + +然后在文件**/etc/dovecot/conf.d/90-sieve.conf**里指定默认的sieve脚本,这个将对服务器上所有用户有效: + + sieve_default = /etc/dovecot/default.sieve + +什么是sieve以及为什么我们需要为所有用户设置一个默认脚本?sieve可以在IMAP服务器上为我们自动处理任务。在我们的例子里,我们想让所有被确定为垃圾的邮件会被移到垃圾箱而不是收件箱里。我们希望这是服务器上所有用户的默认行为;这是为什么我们把这个脚本设为默认脚本。现在让我们来创建这个脚本,建立一个新文件**/etc/dovecot/default.sieve**并写入以下内容: + + require ["regex", "fileinto", "imap4flags"]; + # Catch mail tagged as Spam, except Spam retrained and delivered to the mailbox + if allof (header :regex "X-DSPAM-Result" "^(Spam|Virus|Bl[ao]cklisted)$", + not header :contains "X-DSPAM-Reclassified" "Innocent") { + # Mark as read + # setflag "\\Seen"; + # Move into the Junk folder + fileinto "Junk"; + # Stop processing here + stop; + } + +现在我们需要编译这个脚本好让dovecot能运行它。我们也需要给它合适的权限。 + + cd /etc/dovecot + sievec . + chown mail.dovecot default.siev* + chmod 0640 default.sieve + chmod 0750 default.svbin + +最后,我们需要修改dspam要读取的两个postfix配置文件的权限: + + chmod 0644 /etc/postfix/dynamicmaps.cf /etc/postfix/main.cf + +就这些!让我们重启dovecot和postfix服务 + + service dovecot restart + service postfix restart + +然后通过从远程主机(比如我们用来设定服务器的电脑)连接服务器来测试一下反垃圾邮件: + + openssl s_client -connect cloud.jhausse.net:25 -starttls smtp + EHLO cloud.jhausse.net + MAIL FROM:youremail@domain.com + rcpt to:roudy@jhausse.net + DATA + Subject: DSPAM test + + Hi Roudy, how'd you like to eat some ham tonight? Yours, J + . + QUIT + +让我们检查一下邮件是否已经送到: + + openssl s_client -crlf -connect cloud.jhausse.net:993 + 1 login roudy@jhausse.net "mypassword" + 2 LIST "" "*" + 3 SELECT INBOX + 4 UID fetch 3:3 (UID RFC822.SIZE FLAGS BODY.PEEK[]) + +这个应该返回SPAM为邮件增加了一组标记的数据,看上去像这样: + + X-DSPAM-Result: Innocent + X-DSPAM-Processed: Sun Oct 5 16:25:48 2014 + X-DSPAM-Confidence: 1.0000 + X-DSPAM-Probability: 0.0023 + X-DSPAM-Signature: 5431710c178911166011737 + X-DSPAM-Factors: 27, + Received*Postfix+with, 0.40000, + Received*with+#+id, 0.40000, + like+#+#+#+ham, 0.40000, + some+#+tonight, 0.40000, + Received*certificate+requested, 0.40000, + Received*client+certificate, 0.40000, + Received*for+roudy, 0.40000, + Received*Sun+#+#+#+16, 0.40000, + Received*Sun+#+Oct, 0.40000, + Received*roudy+#+#+#+Oct, 0.40000, + eat+some, 0.40000, + Received*5+#+#+16, 0.40000, + Received*cloud.jhausse.net+#+#+#+id, 0.40000, + Roudy+#+#+#+to, 0.40000, + Received*Oct+#+16, 0.40000, + to+#+#+ham, 0.40000, + Received*No+#+#+requested, 0.40000, + Received*jhausse.net+#+#+Oct, 0.40000, + Received*256+256, 0.40000, + like+#+#+some, 0.40000, + Received*ESMTPS+id, 0.40000, + how'd+#+#+to, 0.40000, + tonight+Yours, 0.40000, + Received*with+cipher, 0.40000 + 5 LOGOUT + +很好!你现在已经为你服务器上的用户配置好自适应垃圾邮件过滤。当然,每个用户将需要在开始的几周里培训过滤器。要标记一则信息为垃圾,只需要在你的任意设备(电脑,平板,手机)上将它移动到叫“垃圾箱”或“废纸篓”的目录里。否则它将被标记为有用。 + +### 确保你发出的邮件能通过垃圾邮件过滤器 ### + +这个部分我们的目标是让我们的邮件服务器能尽量干净地出现在世界上,并让垃圾邮件发送者们更难以我们的名义发邮件。作为附加效果,这也有助于让我们的邮件能通过其他邮件服务器的垃圾邮件过滤器。 + +#### 发送者策略框架 #### + +发送者策略框架(SPF)是你添加到自己服务器区域里的一份记录,声明了整个因特网上哪些邮件服务器能以你的域名发邮件。设置非常简单,使用[microsoft.com][31]上的SPF向导来生成你的SPF记录,然后作为一个TXT记录添加到自己的服务器区域里。看上去像这样: + + jhausse.net. 300 IN TXT v=spf1 mx mx:cloud.jhausse.net -all + +#### 反向PTR #### + +我们[之前][32]在本文里讨论过这个问题,建议你为自己的服务器正确地设置反向DNS,这样对服务器IP地址的反向查询能返回你服务器的实际名字。 + +#### OpenDKIM #### + +当我们激活[OpenDKIM][33]后,postfix会用密钥为每封发出去的邮件签名。然后我们将把这个密钥存储在DNS域中。这样的话,世界上任意一个邮件服务器都能够检验邮件是否真的是我们发出的,或是由垃圾邮件发送者伪造的。让我们先安装opendkim: + + apt-get install opendkim opendkim-tools + +然后按如下方式编辑**/etc/opendkim.conf**文件的配置: + + ## + ## opendkim.conf -- configuration file for OpenDKIM filter + ## + Canonicalization relaxed/relaxed + ExternalIgnoreList refile:/etc/opendkim/TrustedHosts + InternalHosts refile:/etc/opendkim/TrustedHosts + KeyTable refile:/etc/opendkim/KeyTable + LogWhy Yes + MinimumKeyBits 1024 + Mode sv + PidFile /var/run/opendkim/opendkim.pid + SigningTable refile:/etc/opendkim/SigningTable + Socket inet:8891@localhost + Syslog Yes + SyslogSuccess Yes + TemporaryDirectory /var/tmp + UMask 022 + UserID opendkim:opendkim + +我们还需要几个额外的文件,将保存在目录**/etc/opendkim**里: + + mkdir -pv /etc/opendkim/ + cd /etc/opendkim/ + +让我们建立新文件**/etc/opendkim/TrustedHosts**并写入以下内容 + + 127.0.0.1 + +建立新文件**/etc/opendkim/KeyTable**并写入以下内容 + + cloudkey jhausse.net:mail:/etc/opendkim/mail.private + +这会告诉OpenDKIM我们希望使用一个名叫'cloudkey'的加密密钥,它的内容在文件/etc/opendkim/mail.private里。我们建立另一个名叫**/etc/opendkim/SigningTable**的文件然后写入下面这一行: + + *@jhausse.net cloudkey + +这会告诉OpenDKIM每封从jhausse.net域发出的邮件都应该用'cloudkey'密钥签名。如果我们还有其他域希望也能签名,我们也可以在这里添加。 + +下一步是生成密钥并修改OpenDKIM配置文件的权限。 + + opendkim-genkey -r -s mail [-t] + chown -Rv opendkim:opendkim /etc/opendkim + chmod 0600 /etc/opendkim/* + chmod 0700 /etc/opendkim + +一开始,最好使用-t开关,这样会通知其他邮件服务器你只是在测试模式下,这样他们就不会丢弃基于你的OpenDKIM签名的邮件(目前来说)。你可以从mail.txt文件里看到OpenDKIM密钥: + + cat mail.txt + +然后把它作为一个TXT记录添加到区域文件里,应该是这样的 + + mail._domainkey.cloud1984.net. 300 IN TXT v=DKIM1; k=rsa; p=MIGfMA0GCSqG... + +最后,我们需要告诉postfix来为发出的邮件签名。在文件/etc/postfix/main.cf末尾,添加: + + # Now for OpenDKIM: we'll sign all outgoing emails + smtpd_milters = inet:127.0.0.1:8891 + non_smtpd_milters = $smtpd_milters + milter_default_action = accept + +然后重启相关服务 + + service postfix reload + service opendkim restart + +现在让我们测试一下能找到我们的OpenDKIM公钥并和私钥匹配: + + opendkim-testkey -d jhausse.net -s mail -k mail.private -vvv + +这个应该返回 + + opendkim-testkey: key OK + +这个你可能需要等一会直到域名服务器重新加载该区域(对于Linode,每15分钟会更新一次)。你可以用**dig**来检查区域是否已经重新加载。 + +如果这个没问题,让我们测试一下其他服务器能验证我们的OpenDKIM签名和SPF记录。要做这个,我们可以用[Brandon Checkett的邮件测试][34]。发送一封邮件到[Brandon的网页][34]上提供的测试地址,我们可以在服务器上运行下面的命令 + + mail -s CloudCheck ihAdmTBmUH@www.brandonchecketts.com + +在Brandon的网页上,我们应该可以在'DKIM Signature'部分里看到**result = pass**的文字,以及在'SPF Information'部分看到**Result: pass**的文字。如果我们的邮件通过这个测试,只要不加-t开关重新生成OpenDKIM密钥,上传新的密钥到区域文件里,然后重新测试检查是否仍然可以通过这些测试。如果可以的话,恭喜!你已经在你的服务器上成功配置好OpenDKIM和SPF了! + +### 使用Owncloud提供日历,联系人,文件服务并通过Roundcube配置网页邮件 ### + +既然我们已经拥有了一流的邮件服务器,让我们再为它增加在云上保存通讯录,日程表和文件的能力。这些是[Owncloud][35]所提供的非常赞的服务。在这个弄好后,我们还会设置一个网页邮件,这样就算你没带任何电子设备出去旅行时,或者说在你的手机或笔记本没电的情况下,也可以检查邮件。 + +安装Owncloud非常直观,而且在[这里][36]有非常好的介绍。在Debian系统里,归根结底就是把owncloud的仓库添加到apt源里,下载Owncloud的发行密钥并安装到apt钥匙链中,然后通过apt-get安装Owncloud: + + echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud.list + wget http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_6.0/Release.key + apt-key add - < Release.key + apt-get update + apt-get install apache2 owncloud roundcube + +在有提示的时候,选择**dbconfig**然后说你希望**roundcube**使用**mysql**。然后,提供一下mysql的root密码并为roundcube的mysql用户设置一个漂亮的密码。然后,按如下方式编辑roundcube的配置文件**/etc/roundcube/main.inc.php**,这样登录roundcube默认会使用你的IMAP服务器: + + $rcmail_config['default_host'] = 'ssl://localhost'; + $rcmail_config['default_port'] = 993; + +现在我们来配置一下apache2网页服务器增加SSL支持,这样我们可以和Owncloud和Roundcube对话时使用加密的方式传输我们的密码和数据。让我们打开Apache的ssl模块: + + a2enmod ssl + +然后编辑文件**/etc/apache2/ports.conf**并设定以下参数: + +NameVirtualHost *:80 +Listen 80 +ServerName www.jhausse.net + + + # If you add NameVirtualHost *:443 here, you will also have to change + # the VirtualHost statement in /etc/apache2/sites-available/default-ssl + # to + # Server Name Indication for SSL named virtual hosts is currently not + # supported by MSIE on Windows XP. + NameVirtualHost *:443 + Listen 443 + + + + Listen 443 + + +我们将在目录**/var/www**下为服务器加密连接**https://www.jhausse.net**设定一个默认网站。编辑文件**/etc/apache2/sites-available/default-ssl**: + + + ServerAdmin webmaster@localhost + + DocumentRoot /var/www + ServerName www.jhausse.net + [...] + + Deny from all + + [...] + SSLCertificateFile /etc/ssl/certs/cloud.crt + SSLCertificateKeyFile /etc/ssl/private/cloud.key + [...] + + +然后让我们同时也在目录**/var/www**下设定一个非加密连接**http://www.jhausse.net**的默认网站。编辑文件**/etc/apache2/sites-available/default**: + + + DocumentRoot /var/www + ServerName www.jhausse.net + [...] + + Deny from all + + + +这样的话,我们通过把文件放到/var/www目录下让www.jhausse.net使用它们提供网站服务。名叫'Deny from all'的指令可以阻止通过www.jhausse.net访问Owncloud:我们将设定通过**https://cloud.jhausse.net**来正常访问。 + +现在我们将设定网页邮件(roundcube),让它可以通过网址**https://webmail.jhausse.net**来访问。编辑文件**/etc/apache2/sites-available/roundcube**并写入以下内容: + + + + ServerAdmin webmaster@localhost + + DocumentRoot /var/lib/roundcube + # The host name under which you'd like to access the webmail + ServerName webmail.jhausse.net + + Options FollowSymLinks + AllowOverride None + + + ErrorLog ${APACHE_LOG_DIR}/error.log + + # Possible values include: debug, info, notice, warn, error, crit, + # alert, emerg. + LogLevel warn + + CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined + + # SSL Engine Switch: + # Enable/Disable SSL for this virtual host. + SSLEngine on + + # do not allow unsecured connections + # SSLRequireSSL + SSLCipherSuite HIGH:MEDIUM + + # A self-signed (snakeoil) certificate can be created by installing + # the ssl-cert package. See + # /usr/share/doc/apache2.2-common/README.Debian.gz for more info. + # If both key and certificate are stored in the same file, only the + # SSLCertificateFile directive is needed. + SSLCertificateFile /etc/ssl/certs/cloud.crt + SSLCertificateKeyFile /etc/ssl/private/cloud.key + + # Those aliases do not work properly with several hosts on your apache server + # Uncomment them to use it or adapt them to your configuration + Alias /program/js/tiny_mce/ /usr/share/tinymce/www/ + + # Access to tinymce files + + Options Indexes MultiViews FollowSymLinks + AllowOverride None + Order allow,deny + allow from all + + + + Options +FollowSymLinks + # This is needed to parse /var/lib/roundcube/.htaccess. See its + # content before setting AllowOverride to None. + AllowOverride All + order allow,deny + allow from all + + + # Protecting basic directories: + + Options -FollowSymLinks + AllowOverride None + + + + Options -FollowSymLinks + AllowOverride None + Order allow,deny + Deny from all + + + + Options -FollowSymLinks + AllowOverride None + Order allow,deny + Deny from all + + + + SSLOptions +StdEnvVars + + + SSLOptions +StdEnvVars + + # SSL Protocol Adjustments: + # The safe and default but still SSL/TLS standard compliant shutdown + # approach is that mod_ssl sends the close notify alert but doesn't wait for + # the close notify alert from client. When you need a different shutdown + # approach you can use one of the following variables: + # o ssl-unclean-shutdown: + # This forces an unclean shutdown when the connection is closed, i.e. no + # SSL close notify alert is send or allowed to received. This violates + # the SSL/TLS standard but is needed for some brain-dead browsers. Use + # this when you receive I/O errors because of the standard approach where + # mod_ssl sends the close notify alert. + # o ssl-accurate-shutdown: + # This forces an accurate shutdown when the connection is closed, i.e. a + # SSL close notify alert is send and mod_ssl waits for the close notify + # alert of the client. This is 100% SSL/TLS standard compliant, but in + # practice often causes hanging connections with brain-dead browsers. Use + # this only for browsers where you know that their SSL implementation + # works correctly. + # Notice: Most problems of broken clients are also related to the HTTP + # keep-alive facility, so you usually additionally want to disable + # keep-alive for those clients, too. Use variable "nokeepalive" for this. + # Similarly, one has to force some clients to use HTTP/1.0 to workaround + # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and + # "force-response-1.0" for this. + BrowserMatch "MSIE [2-6]" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + # MSIE 7 and newer should be able to use keepalive + BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown + + + +然后在你的DNS服务商那里声明一下服务器,例如: + + webmail.jhausse.net. 300 IN CNAME cloud.jhausse.net. + +现在让我激活这三个网站 + + a2ensite default default-ssl roundcube + service apache2 restart + +关于网页邮件,可以通过网址**https://webmail.jhausse.net**来访问,基本上能工作。之后使用邮箱全名(例如roudy@jhausse.net)和在本文一开始在邮件服务器数据库里设定的密码登录。第一次连接成功,浏览器会警告说证书没有可靠机构的签名。这个没什么关系,只要添加一个例外。 + +最后但很重要的是,我们将通过把以下内容你哦个写入**/etc/apache2/sites-available/owncloud**来为Owncloud创建一个虚拟主机。 + + + + ServerAdmin webmaster@localhost + + DocumentRoot /var/www/owncloud + ServerName cloud.jhausse.net + + Options FollowSymLinks + AllowOverride None + + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Order allow,deny + allow from all + + + ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ + + AllowOverride None + Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch + Order allow,deny + Allow from all + + + ErrorLog ${APACHE_LOG_DIR}/error.log + + # Possible values include: debug, info, notice, warn, error, crit, + # alert, emerg. + LogLevel warn + + CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined + + # SSL Engine Switch: + # Enable/Disable SSL for this virtual host. + SSLEngine on + + # do not allow unsecured connections + # SSLRequireSSL + SSLCipherSuite HIGH:MEDIUM + SSLCertificateFile /etc/ssl/certs/cloud.crt + SSLCertificateKeyFile /etc/ssl/private/cloud.key + + + SSLOptions +StdEnvVars + + + SSLOptions +StdEnvVars + + + BrowserMatch "MSIE [2-6]" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + # MSIE 7 and newer should be able to use keepalive + BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown + + + +然后通过执行以下命令激活Owncloud + + a2ensite owncloud + service apache2 reload + +之后通过在浏览器里打开链接**https://cloud.jhausse.net/**配置一下Owncloud。 + +就这些了!现在你已经拥有自己的Google Drive,日程表,联系人,Dropbox,以及Gmail!好好享受下新鲜恢复保护的隐私吧!:-) + +### 在云上同步你的设备 ### + +要同步你的邮件,你可以只是用你喜欢的邮件客户端:Android或iOS自带的默认邮件应用,[k9mail][37],或者电脑上的Thunderbird。或者你也可以使用我们设置好的网页邮件。 + +在Owncloud的文档里描述了如何与云端同步你的日程表和联系人。在Android系统中,我用的是CalDAV-Sync,CardDAV-Sync应用桥接了手机上Android自带日历以及联系人应用和Owncloud服务器。 + +对于文件,有一个叫Owncloud的Android应用可以访问你手机上的文件,然后自动把你拍的图片和视频上传到云中。在你的Mac/PC上访问云端文件也很容易,在[Owncloud文档里有很好的描述][38]。 + +### 最后一点提示 ### + +在上线后的前几个星期里,最好每天检查一下日志**/var/log/syslog**和**/var/log/mail.log**以保证一切都在顺利运行。在你邀请其他人(朋友,家人,等等)加入你的服务器之前这很重要。他们信任你能很好地架设个人服务器维护他们的数据,但是如果服务器突然崩溃会让他们很失望。 + +要添加另一个邮件用户,只要在数据库**mailserver**的**virtual_users**表中增加一行。 + +要添加一个域名,只要在**virtual_domains**表中增加一行。然后更新**/etc/opendkim/SigningTable**为发出的邮件签名,上传OpenDKIM密钥到服务器区域,然后吃哦更年期OpenDKIM服务。 + +Owncloud有自己的用户数据库,在用管理员帐号登录后可以修改。 + +最后,万一在服务器临时崩溃的时候想办法找解决方案很重要。比如说,在服务器恢复之前你的邮件应该送往哪儿?一种方式是找个能帮你做备份MX的朋友,同时你也可以当他的备份MX(看下postfix的配置文件**main.cf**里**relay_domains**和**relay_recipient_maps**里的设定)。与此类似,如果你的服务器被破解然后一个坏蛋把你所有文件删了怎么办?对于这个,考虑增加一个常规备份系统就很重要了。Linode提供了备份选项。在1984.is里,我用crontabs和scp做了一个基本但管用的自动备份系统。 + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/ + +作者:[Roudy Jhausse ][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:aboutlinux@free.fr +[1]:https://history.google.com/history/ +[2]:http://research.google.com/workatgoogle.html +[3]:http://www.attac.org/ +[4]:http://www.nytimes.com/2012/02/19/magazine/shopping-habits.html?pagewanted=all +[5]:http://vimeo.com/ondemand/termsandconditions +[6]:http://www.techtimes.com/articles/21670/20141208/sony-pictures-hack-nightmare-week-celebs-data-leak-and-threatening-emails-to-employees.htm +[7]:http://blog.backupify.com/2012/07/25/what-is-my-gmail-account-really-worth/ +[8]:http://adage.com/article/digital/worth-facebook-google/293042/ +[9]:http://vimeo.com/ondemand/termsandconditions +[10]:https://prism-break.org/en/ +[11]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#VPS +[12]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#mail +[13]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#dspam +[14]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#SPF +[15]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#owncloud +[16]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#sync +[17]:http://linuxfr.org/news/heberger-son-courriel +[18]:http://sealedabstract.com/code/nsa-proof-your-e-mail-in-2-hours/ +[19]:http://www.1984.is/ +[20]:http://www.linode.com/ +[21]:http://www.greenpeace.org/international/Global/international/publications/climate/2012/iCoal/HowCleanisYourCloud.pdf +[22]:http://www.1984.is/about/ +[23]:http://www.fsf.org/ +[24]:https://www.gnupg.org/ +[25]:http://www.gandi.net/ +[26]:http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html +[27]:http://www.postfix.org/ +[28]:http://postgrey.schweikert.ch/ +[29]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#testPort25 +[30]:http://dspam.sourceforge.net/ +[31]:http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/ +[32]:https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/#PTR +[33]:http://opendkim.org/opendkim-README +[34]:http://www.brandonchecketts.com/emailtest.php +[35]:http://owncloud.org/ +[36]:http://owncloud.org/install/ +[37]:https://code.google.com/p/k9mail/ +[38]:http://doc.owncloud.org/server/7.0/user_manual/files/files.html From 78b4961b8cda4027772fdc0af50d3520fb28f67c Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 13 Feb 2015 13:21:48 +0800 Subject: [PATCH 0020/2517] translating --- ...wers--How to get the process ID (PID) of a shell script.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md b/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md index 999e3b4327..2fff492d6a 100644 --- a/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md +++ b/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md @@ -1,3 +1,5 @@ +Translating---geekpi + Linux FAQs with Answers--How to get the process ID (PID) of a shell script ================================================================================ > **Question**: I want to know the process ID (PID) of the subshell under which my shell script is running. How can I find a PID in a bash shell script? @@ -45,4 +47,4 @@ via: http://ask.xmodulo.com/process-id-pid-shell-script.html 译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 09f2ee0599e09b3e437b9a127d6791c85ec6d0c3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 13 Feb 2015 13:53:44 +0800 Subject: [PATCH 0021/2517] translated --- ... the process ID (PID) of a shell script.md | 50 ------------------- ... the process ID (PID) of a shell script.md | 48 ++++++++++++++++++ 2 files changed, 48 insertions(+), 50 deletions(-) delete mode 100644 sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md create mode 100644 translated/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md diff --git a/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md b/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md deleted file mode 100644 index 2fff492d6a..0000000000 --- a/sources/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md +++ /dev/null @@ -1,50 +0,0 @@ -Translating---geekpi - -Linux FAQs with Answers--How to get the process ID (PID) of a shell script -================================================================================ -> **Question**: I want to know the process ID (PID) of the subshell under which my shell script is running. How can I find a PID in a bash shell script? - -When you execute a shell script, it will launch a process known as a subshell. As a child process of the main shell, a subshell executes a list of commands in a shell script as a batch (so-called "batch processing"). - -In some cases, you may want to know the process ID (PID) of the subshell where your shell script is running. This PID information can be used under different circumstances. For example, you can create a unique temporary file in /tmp by naming it with the shell script PID. In case a script needs to examine all running processes, it can exclude its own subshell from the process list. - -In bash, the **PID of a shell script's subshell process** is stored in a special variable called '$$'. This variable is read-only, and you cannot modify it in a shell script. For example: - - #!/bin/bash - - echo "PID of this script: $$" - -The above script will show the following output. - - PID of this script: 6583 - -Besides $$, bash shell exports several other read-only variables. For example, PPID stores the process ID of the subshell's parent process (i.e., main shell). UID stores the user ID of the current user who is executing the script. For example: - - #!/bin/bash - - echo "PID of this script: $$" - echo "PPID of this script: $PPID" - echo "UID of this script: $UID" - -Its output will be: - - PID of this script: 6686 - PPID of this script: 4656 - UID of this script: 1000 - -In the above, PID will keep changing every time you invoke a script. That is because each invocation of a script will create a new subshell. On the other hand, PPID will remain the same as long as you run a script inside the same shell. - -![](https://farm8.staticflickr.com/7437/16274890369_e78ce16d42_b.jpg) - -For a complete list of built-in bash variables, refer to its man page. - - $ man bash - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/process-id-pid-shell-script.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md b/translated/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md new file mode 100644 index 0000000000..760757a712 --- /dev/null +++ b/translated/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md @@ -0,0 +1,48 @@ +Linux有问必答:如何在脚本中获取进程ID(PID) +================================================================================ +> **提问**: 我想要知道运行中脚本subshell的进程id。我该如何在shell脚本中得到PID。 + +当我在执行shell脚本时,它会启动一个叫subshell的进程。作为主shell的子进程,subshell将shell脚本中的命令作为批处理运行(因此称为“批处理进程”)。 + +在某些情况下,你也许想要知道运行中的subshell的PID。这个PID信息可以在不同的情况下使用。比如,你可以使用shell脚本的PID在/tmp下创建一个唯一的临时文件。有时侯脚本需要检测所有运行的进程,它可以从进程列表中排除自身的subshell。 + +在bash中,**subshell进程的PID**存储在一个特殊的变量‘$$’中。这个变量只读,你不可以在脚本中修改它。比如: + + #!/bin/bash + + echo "PID of this script: $$" + +上面的脚本会得到下面的输出: + + PID of this script: 6583 + +除了$$, bash shell还会导出其他的只读变量。比如,PPID存储subshell父进程的ID(也就是主shell)。UID存储了执行这个脚本的当前用户ID。比如: + + #!/bin/bash + + echo "PID of this script: $$" + echo "PPID of this script: $PPID" + echo "UID of this script: $UID" + +输出是: + + PID of this script: 6686 + PPID of this script: 4656 + UID of this script: 1000 + +上面输出中,PID每次执行都会变化。这个因为每次运行都会创建一个新的shell。另一方面,PPID每次都会一样只要你在同一个shell中运行。 + +![](https://farm8.staticflickr.com/7437/16274890369_e78ce16d42_b.jpg) + +对于所有bash内置变量列表,参考man页。 + + $ man bash + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/process-id-pid-shell-script.html + +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4aa6493d879f26fe664dfe30eb5b4e92fa9ad6c6 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Fri, 13 Feb 2015 14:29:22 +0800 Subject: [PATCH 0022/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...XBMC) In Ubuntu 14.04 and Linux Mint 17.md | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md b/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md index 20b6715d38..61202528a9 100644 --- a/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md +++ b/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md @@ -1,28 +1,28 @@ -Ubuntu14.04或Mint17如何安装Kodi14(XBMC) +如何在 Ubuntu 14.04 和 Linux Mint 17 中安装 Kodi14(XBMC) ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Kodi_Xmas.jpg) [Kodi][1],原名就是大名鼎鼎的XBMC,发布[最新版本14][2],命名为Helix。感谢官方XMBC提供的PPA,现在可以很简单地在Ubuntu14.04中安装了。 -Kodi是一个优秀的自由和开源的(GPL)媒体中心软件,支持所有平台,如Windows, Linux, Mac, Android等。此软件拥有全屏幕的媒体中心,可以管理所有音乐和视频,不单支持本地文件还支持网络播放,如Tube,[Netflix][3], Hulu, Amazon Prime和其他串流服务商。 +有些人可能还不了解Kodi,它是一个媒体中心软件,支持所有平台,如Windows、Linux、 Mac, Android等。此软件拥有全屏的媒体中心,可以管理所有音乐和视频,不单支持本地文件还支持网络播放,如Tube、[Netflix][3]、 Hulu, Amazon Prime和其他流媒体服务商。 -### Ubuntu 14.04, 14.10 和 Linux Mint 17 中安装XBMC 14 Kodi Helix ### +### 在 Ubuntu 14.04 和 Linux Mint 17 中安装 XBMC 14 Kodi Helix ### 再次感谢官方的PPA,让我们可以轻松安装Kodi 14。 -支持Ubuntu 14.04, Ubuntu 12.04, Linux Mint 17, Pinguy OS 14.04, Deepin 2014, LXLE 14.04, Linux Lite 2.0, Elementary OS and 其他基于Ubuntu的Linux 发行版。 +支持Ubuntu 14.04、Ubuntu 12.04、Linux Mint 17、Pinguy OS 14.04、Deepin 2014、LXLE 14.04、Linux Lite 2.0, Elementary OS 以及其他基于 Ubuntu 的 Linux 发行版。 打开终端(Ctrl+Alt+T)然后使用下列命令。 sudo add-apt-repository ppa:team-xbmc/ppa sudo apt-get update sudo apt-get install kodi -需要下载大约100MB,在我的观点这不是很大。若需安装解码插件,使用下列命令: +需要下载大约100MB,在我看来,这不是很大。若需安装解码插件,使用下列命令: sudo apt-get install kodi-audioencoder-* kodi-pvr-* -#### 从Ubuntu中移除Kodi 14 #### +#### 从 Ubuntu 中移除 Kodi 14 #### -从系统中移除Kodi 14 ,使用下列命令: +从系统中移除 Kodi 14,使用下列命令: sudo apt-get remove kodi @@ -30,10 +30,8 @@ Kodi是一个优秀的自由和开源的(GPL)媒体中心软件,支持所 sudo add-apt-repository --remove ppa:team-xbmc/ppa -我希望这个简单的文章可以帮助到你,在Ubuntu, Linux Mint 和其他 Linux版本中轻松安装Kodi 14。 -你怎么发现Kodi 14 Helix? -你有没有使用其他的什么媒体中心? -可以在下面的评论区分享你的观点。 +我希望这篇简单的文章可以帮助到你在Ubuntu、Linux Mint 和其他 Linux 版本中轻松安装 Kodi 14。你是怎么发现 Kodi 14 Helix 的? +你有没有使用其他的媒体中心来作为 XBMC 的替代?可以在下面的评论区分享你的观点。 -------------------------------------------------------------------------------- @@ -41,7 +39,7 @@ via: http://itsfoss.com/install-kodi-14-xbmc-in-ubuntu-14-04-linux-mint-17/ 作者:[Abhishek][a] 译者:[Vic020/VicYu](http://www.vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From df316cfec2c113041b0e7575ede7e043b83325c2 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Fri, 13 Feb 2015 14:59:32 +0800 Subject: [PATCH 0023/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5 How To Install Winusb In Ubuntu 14.04.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md b/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md index b9fe775752..a65ba04392 100644 --- a/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md +++ b/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md @@ -1,16 +1,16 @@ -如何在Ubuntu 14.04 中安装Winusb +如何在 Ubuntu 14.04 中安装 Winusb ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/WinUSB_Ubuntu_1404.jpeg) -[WinUSB][1]是一款简单的且有用的工具,可以让你从Windows ISO镜像或者DVD中创建USB安装盘。它结合了GUI和命令行,你可以根据你的喜好决定使用哪种。 +[WinUSB][1]是一款即简单又有用的工具,可以让你从 Windows ISO 镜像或者 DVD 中创建 USB 安装盘。它结合了 GUI 和命令行,你可以根据你的喜好决定使用哪种。 -在本篇中我们会展示**如何在Ubuntu 14.04、14.10 和 Linux Mint 17 中安装WinUSB**。 +在本文中我们会展示**如何在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB**。 -### 在Ubuntu 14.04、14.10 和 Linux Mint 17 中安装WinUSB ### +### 在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB ### -直到Ubuntu 13.10, WinUSBu一直都在积极开发,且在官方PPA中可以找到。这个PPA还没有为Ubuntu 14.04 和14.10更新,但是二进制文件仍旧可在更新版本的Ubuntu和Linux Mint中运行。基于[基于你使用的系统是32位还是64位的][2],使用下面的命令来下载二进制文件: +在 Ubuntu 13.10 之前, WinUSBu 一直都在积极开发,且在官方 PPA 中可以找到。这个 PPA 还没有为 Ubuntu 14.04 和 14.10 更新,但是二进制文件仍旧可在更新版本的 Ubuntu 和 Linux Mint 中运行。基于[你使用的系统是32位还是64位][2],使用下面的命令来下载二进制文件: -打开终端,并在32位的系统下使用下面的命令: +打开终端,32位的系统下使用下面的命令: wget https://launchpad.net/~colingille/+archive/freshlight/+files/winusb_1.0.11+saucy1_i386.deb @@ -22,15 +22,15 @@ sudo dpkg -i winusb* -不要担心在你安装WinUSB时看见错误。使用这条命令修复依赖: +不要担心在你安装WinUSB时看到错误。使用这条命令修复依赖错误: sudo apt-get -f install -之后,你就可以在Unity Dash中查找WinUSB并且用它在Ubuntu 14.04 中创建Windows的live USB了。 +之后,你就可以在 Unity Dash 中查找 WinUSB 并且用它在 Ubuntu 14.04 中创建 Windows 的 live USB 了。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/WinUSB_Ubuntu.png) -我希望这篇文章能够帮到你**在Ubuntu 14.04、14.10 和 Linux Mint 17 中安装WinUSB**。 +我希望这篇文章能够帮到你**在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB**。 -------------------------------------------------------------------------------- @@ -38,10 +38,10 @@ via: http://itsfoss.com/install-winusb-in-ubuntu-14-04/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/Abhishek/ [1]:http://en.congelli.eu/prog_info_winusb.html -[2]:http://itsfoss.com/how-to-know-ubuntu-unity-version/ \ No newline at end of file +[2]:http://itsfoss.com/how-to-know-ubuntu-unity-version/ From 8c334b577e0e9e13155d78dbca9d4406393ba86f Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 13 Feb 2015 15:50:13 +0800 Subject: [PATCH 0024/2517] Translating by ZTinoZ --- .../share/20150114 What is a good IDE for C or C++ on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md index 2096f50b85..2cf3d3ab37 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -12,7 +12,7 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm8.staticflickr.com/7522/16276001255_66235a0a69_c.jpg) -我知道我只说"真正好用的IDE"而不是带着插件的文本编辑器,但是,[Eclipse][3]的确是一款"真正好用的IDE",只是Eclipse需要一些[plugin][4](或经过一些改装)来编写C程序,所以严格来说我无法反驳我自己。而且,做一份IDE清单不提到Eclipse这个“巨人”是不可能的事情。无论喜欢它与否,Eclipse仍然是一款强大的Java编程工具。And thanks to the [CDT Project][5], it is possible to program in C/C++ too. You will benefit from all the power of Eclipse and its traditional features like word completion, code outline, code generator, and advanced refactoring. What it lacks in my opinion is the lightness of Code::Blocks. It is still very heavy and takes time to load. But if your machine can take it, or if you are a hardcore Eclipse fan, it is a very safe option. +我知道我只说"真正好用的IDE"而不是带着插件的文本编辑器,但是,[Eclipse][3]的确是一款"真正好用的IDE",只是Eclipse需要一些[plugin][4](或经过一些改装)来编写C程序,所以严格来说我无法反驳我自己。而且,做一份IDE清单不提到Eclipse这个“巨人”是不可能的事情。无论喜欢它与否,Eclipse仍然是一款强大的Java编程工具。这里要感谢[CDT 项目][5],让Eclipse编写C程序变得可能。你同样可以体验到Eclipse的强大功能包括它的一些传统功能特点比如自动补全、代码大纲、代码生成器和先进的重构功能。照我话说,它的不足之处在于它不如Code::Blocks那么轻量级,它仍然很臃肿,要花费很多时间去载入。但是如果你的电脑可以驾驭它,或者你是个忠实的Eclipse粉,那么它一定是你的不二选择。 ### 3. Geany ### From 91abf5dc4d9e335474f0111f11ab8ad852f61d1d Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 14 Feb 2015 07:43:44 +0800 Subject: [PATCH 0025/2517] Update 20150211 Best Known Linux Archive or Compress Tools.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- .../20150211 Best Known Linux Archive or Compress Tools.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md b/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md index 3d3960cf4d..86623a5c99 100644 --- a/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md +++ b/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md @@ -1,3 +1,5 @@ +Translating by FSSlc + Best Known Linux Archive / Compress Tools ================================================================================ Sending and receiving large files and pictures over the internet is a headache many times. Compression and decompression tools are meant to address this problem. Lets take a quick overview of a few open source tools that are available to make our jobs simpler. @@ -226,4 +228,4 @@ via: http://linoxide.com/tools/linux-compress-decompress-tools/ [2]:http://www.gzip.org/ [3]:http://www.bzip.org/ [4]:http://www.7-zip.org/ -[5]:https://wiki.archlinux.org/index.php/p7zip \ No newline at end of file +[5]:https://wiki.archlinux.org/index.php/p7zip From b9b12c00f376953e59a9dd18fd061b256261ae66 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 15 Feb 2015 10:27:40 +0800 Subject: [PATCH 0026/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...A New Web Browser Built for Power Users.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md b/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md index 77e9762b7f..f82ca8965d 100644 --- a/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md +++ b/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md @@ -1,18 +1,18 @@ -有请Vivaldi——全新网页浏览器,为高手级用户而生 +认识Vivaldi——一款为高手级用户定制的全新网页浏览器 ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/Screen-Shot-2015-01-27-at-17.36.jpg) -**这一周一个为了满足高手级用户的需要而制造出来的全新网页浏览器已然来临——而且它已经可以在Linux上使用了。** +**这周一个为了满足高手级用户的需要而定制的全新网页浏览器已然来临——而且它已经可以在Linux上使用了。** -Vivaldi就是这个新浏览器的名字,而且它还面向64位Linux,Windows和Mac机发布了技术预览版(请读:无责任测试)。它是在 — 震惊 — 尝试且已测试过的Chromium开源框架,Blink和Google的开源V8 JavaScript引擎(以及其他项目)的基础上制造的。 +Vivaldi就是这个新浏览器的名字,而且它还面向64位Linux、Windows 和 Mac 机发布了技术预览版(注解:无责任测试版)。它是建立在已测试过的Chromium开源框架,Blink和Google的开源V8 JavaScript引擎(以及其他项目)的基础上。 -这个世界真的想要再有一个浏览器吗?Vivaldi——出自Opera软件前首席执行官Jon S.von Tetzchner的想法——不怎么关注所要,更关注所需。 +这个世界真的还需要一个浏览器吗?Opera软件前首席执行官Jon S.von Tetzchner的构想——Vivaldi不怎么关注所要,更关注所需。 -Vivaldi被制造成带有着偏向于键盘操作的tab键瘾君子所需的那种功能。并没有为那些认为Firefox复杂或是对Chrome的唯一批评是它改动了书签按钮的用户而进行修改。 +Vivaldi被制造成带有着偏向于键盘操作的tab键痴迷者所需的那种功能。并没有为那些认为Firefox复杂或是批评Chrome改动了书签按钮的用户而进行修改。 这也并不是什么俗气的营销噱头。尽管它带有‘技术预览版’标签,Vivaldi已经有了明显偏向于高手级用户们的功能。 -相当多的人觉得自己被其他软件公司所生产的简化的,配对后发行的产品遗弃了、糊弄了。Vivaldi——即使在这个过渡期的早期——看起来适逢其会以至于打败了其他产品。 +相当多的人觉得自己被其他软件公司所生产的简化的,配对后发行的产品遗弃了、糊弄了。Vivaldi——即使在这个过渡期的早期——看起来适逢其会,可以打败其他产品。 ### Vivaldi功能### @@ -20,13 +20,13 @@ Vivaldi被制造成带有着偏向于键盘操作的tab键瘾君子所需的那 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/quick.jpg) -**快捷命令** (Ctrl + Q)是个内置的HUD应用,他可以让你快速的滤过设置,选项和功能,用它打开一个书签或是隐藏状态栏,只需用你的键盘。无需点击。 +**快捷命令** (Ctrl + Q)是个内置的HUD应用,它可以让你快速过滤设置、选项和功能,用它打开一个书签或是隐藏状态栏,只需用你的键盘,无需鼠标点击。 **标签堆** 让你可以通过把多个不同标签分到一组来清理你的工作区,然后可以通过键盘命令或者可预览标签选择器在标签组之间进行切换。 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/tab-stacks.jpg) -一个可折叠的**侧边栏**藏有额外功能(就像旧Opera)包括一个(目前还不能工作的)邮箱客户端,链接,书签浏览器和可以让你截屏并做注释的笔记专区 +一个可折叠的**侧边栏**藏有额外功能(就像旧Opera)包括一个(目前还不能工作的)邮箱客户端,链接,书签浏览器和可以让你截屏并做注释的笔记专区。 还提供了一大堆其他的功能,包括设置键盘快捷键,一个可以被设置在浏览器任何一个边(或完全隐藏)的标签栏,隐私选项和一个快速打开文件夹的功能。 @@ -34,9 +34,9 @@ Vivaldi被制造成带有着偏向于键盘操作的tab键瘾君子所需的那 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/vivaldi-settings-in-ubuntu-750x434.jpg) -把Vivaldi当作Opera post-Presto(Opera旧的拥有版权的引擎)的真正继承者并不是什么值得惊奇的事。当Opera(今天也推出了一个小更新)追求一个更轻、更好管理的一套功能时,已经剔除了它很多“高手级用户”功能。 +把Vivaldi当作Opera post-Presto(Opera拥有版权的旧引擎)的真正继承者并不是什么值得惊奇的事。当Opera(今天也推出了一个小更新)追求一个更轻、更好管理的一套功能时,已经剔除了它很多“高手级用户”功能。 -Vivaldi想要捡起Opera曾急于脱手的负担。虽然这么做没有帮他抓到什么预期的市场份额,但是它抓住了高手级用户的眼球。他们大多数无疑已经在使用Linux了。 +Vivaldi想要捡起Opera曾急于脱手的负担。虽然这么做没有帮它抓住什么预期的市场份额,但是它吸引了高手级用户的眼球。他们大多数无疑已经在使用Linux了。 ### 下载 ### @@ -52,7 +52,7 @@ via: http://www.omgubuntu.co.uk/2015/01/vivaldi-web-browser-linux-download-power 作者:[Joey-Elijah Sneddon][a] 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 10abec198e23c141fc51b1c79457f0293a72f155 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Sun, 15 Feb 2015 11:31:07 +0800 Subject: [PATCH 0027/2517] translated --- ...Scripting interview Questions & Answers.md | 238 +++++++++--------- 1 file changed, 124 insertions(+), 114 deletions(-) diff --git a/sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md b/sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md index 11d5e6645a..9a131bee9d 100644 --- a/sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md +++ b/sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md @@ -1,68 +1,68 @@ - Vic -25 Linux Shell Scripting interview Questions & Answers +Linux Shell脚本 入门25问 ================================================================================ -### Q:1 What is Shell Script and why it is required ? ### +### Q:1 Shell脚本是什么、为什么它是必需的吗? ### -Ans: A Shell Script is a text file that contains one or more commands. As a system administrator we often need to issue number of commands to accomplish the task, we can add these all commands together in a text file (Shell Script) to complete daily routine task. +答:一个Shell脚本是一个文本文件,包含一个或多个命令。作为系统管理员,我们经常需要发出多个命令来完成一项任务,我们可以添加这些所有命令在一个文本文件(Shell脚本)来完成日常工作任务。 -### Q:2 What is the default login shell and how to change default login shell for a specific user ? ### +### Q:2 什么是默认登录shell,如何改变指定用户的登录shell ### -Ans: In Linux like Operating system “/bin/bash” is the default login shell which is assigned while user creation. We can change default shell using the “chsh” command . Example is shown below : +答:在Linux操作系统,“/ bin / bash”是默认登录shell,在用户创建时被分配的。使用chsh命令可以改变默认的shell。示例如下所示: # chsh -s # chsh linuxtechi -s /bin/sh -### Q:3 What are the different type of variables used in a shell Script ? ### +### Q:3 有什么不同的类型在shell脚本中使用? ### -Ans: In a shell script we can use two types of variables : +答:在shell脚本,我们可以使用两个类型变量: -- System defined variables -- User defined variables +- 系统定义变量 +- 用户定义变量 -System defined variables are defined or created by Operating System(Linux) itself. These variables are generally defined in Capital Letters and can be viewed by “**set**” command. -User defined variables are created or defined by system users and the values of variables can be viewed by using the command “`echo $`” +系统变量是由系统系统自己创建的。这些变量由大写字母组成,可以通过“**set**”命令查看。 -### Q:4 How to redirect both standard output and standard error to the same location ? ### +用户变量由系统用户来生成,变量的值可以通过命令“`echo $<变量名>`”查看 -Ans: There two method to redirect std output and std error to the same location: +### Q:4 如何同时重定向标准输出和错误输出到同一位置? ### -Method:1 2>&1 (# ls /usr/share/doc > out.txt 2>&1 ) +答:这里有两个方法来实现: -Method:2 &> (# ls /usr/share/doc &> out.txt ) +方法1:2>&1 (# ls /usr/share/doc > out.txt 2>&1 ) -### Q:5 What is the Syntax of “nested if statement” in shell scripting ? ### +方法二:&> (# ls /usr/share/doc &> out.txt ) -Ans : Basic Syntax is shown below : +### Q:5 shell脚本中“if”的语法 ? ### - if [ Condition ] +答:基础语法: + + if [ 条件 ] then - command1 - command2 + 命令1 + 命令2 ….. else - if [ condition ] + if [ 条件 ] then - command1 - command2 + 命令1 + 命令2 …. else - command1 - command2 + 命令1 + 命令2 ….. fi fi -### Q:6 What is the use of “$?” sign in shell script ? ### +### Q:6 shell脚本中“$?”标记的用途是什么? ? ### -Ans:While writing a shell script , if you want to check whether previous command is executed successfully or not , then we can use “$?” with if statement to check the exit status of previous command. Basic example is shown below : +答:在写一个shell脚本时,如果你想要检查前一命令是否执行成功,在if条件中使用“$?”可以来检查前一命令的结束状态。简单的例子如下: root@localhost:~# ls /usr/bin/shar /usr/bin/shar root@localhost:~# echo $? 0 -If exit status is 0 , then command is executed successfully +如果结束状态是0,说明前一个命令执行成功。 root@localhost:~# ls /usr/bin/share @@ -70,11 +70,11 @@ If exit status is 0 , then command is executed successfully root@localhost:~# echo $? 2 -If the exit status is other than 0, then we can say command is not executed successfully. +如果结束状态不是0,说明命令执行失败。 -### Q:7 How to compare numbers in Linux shell Scripting ? ### +### Q:7 在shell脚本中如何比较两个数 ? ### -Ans: test command is used to compare numbers in if-then statement. Example is shown below : +答:测试用例使用if-then来比较两个数,例子如下: #!/bin/bash x=10 @@ -87,77 +87,76 @@ Ans: test command is used to compare numbers in if-then statement. Example is sh echo “y is greater than x” fi -### Q:8 What is the use of break command ? ### +### Q:8 shell脚本中break命令的作用 ? ### -Ans: The break command is a simple way to escape out of a loop in progress. We can use the break command to exit out from any loop, including while and until loops. +答:break命令一个简单的用途是退出执行中的循环。我们可以在while 和until循环中使用break命令跳出循环。 -### Q:9 What is the use of continue command in shell scripting ? ### +### Q:9 shell脚本中continue命令的作用 ? ### -Ans The continue command is identical to break command except it causes the present iteration of the loop to exit, instead of the entire loop. Continue command is useful in some scenarios where error has occurred but we still want to execute the next commands of the loop. +答:continue命令不同于break命令,它只跳出当前循环的迭代,而不是整个循环。continue命令很多时候是很有用的,例如错误发生,但我们依然希望循环继续的时候。 -### Q:10 Tell me the Syntax of “Case statement” in Linux shell scripting ? ### +### Q:10 告诉我shell脚本中Case语句的语法 ? ### -Ans: The basic syntax is shown below : +答:基础语法如下: - case word in - value1) - command1 - command2 + case 变量 in + 值1) + 命令1 + 命令2 ….. - last_command - !! - value2) - command1 - command2 + 最后命令 + !! + 值2) + 命令1 + 命令2 …… - last_command + 最后命令 ;; esac -### Q:11 What is the basic syntax of while loop in shell scripting ? ### +### Q:11 shell脚本中while循环语法 ? ### -Ans: Like the for loop, the while loop repeats its block of commands a number of times. Unlike the for loop, however, the while loop iterates until its while condition is no longer true. The basic syntax is : +答:如同for循环,while循环重复自己所有命令只要条件成立,不同于for循环。基础语法: - while [ test_condition ] + while [ 条件 ] do - commands… + 命令… done -### Q:12 How to make a shell script executable ? ### +### Q:12 如何使脚本成为可执行状态 ? ### -Ans: Using the chmod command we can make a shell script executable. Example is shown below : +答:使用chmod命令来使脚本可执行。例子如下: # chmod a+x myscript.sh -### Q:13 What is the use of “#!/bin/bash” ? ### +### Q:13 “#!/bin/bash”的作用 ? ### -Ans: #!/bin/bash is the first of a shell script , known as shebang , where # symbol is called hash and ‘!’ is called as bang. It shows that command to be executed via /bin/bash. +答:#!/bin/bash是shell脚本的第一行,总所周知,#符号调用hash而!调用bang。它的意思是命令使用 /bin/bash来执行命令 -### Q:14 What is the syntax of for loop in shell script ? ### +### Q:14 shell脚本中for循环语法 ? ### -Ans: Basic Syntax of for loop is given below : +答:for循环基础语法: - for variables in list_of_items + for 变量 in 循环列表 do - command1 - command2 + 命令1 + 命令2 …. - last_command + 最后命令 done -### Q:15 How to debug a shell script ? ### +### Q:15 如何调试shell脚本 ? ### -Ans: A shell script can be debug if we execute the script with ‘-x’ option ( sh -x myscript.sh). Another way to debug a shell script is by using ‘-nv’ option ( sh -nv myscript.sh). +答:使用'-x'参数(sh -x myscript.sh)可以调试shell脚本。另一个种方法是使用‘-nv’参数( sh -nv myscript.sh) -### Q:16 How compare the strings in shell script ? ### +### Q:16 shell脚本如何比较字符串? ### -Ans: test command is used to compare the text strings. The test command compares text strings by comparing each character in each string. +答:test命令可以用来比较字符串。Test命令比较字符串通过比较每一个字符来比较。 -### Q:17 What are the Special Variables set by Bourne shell for command line arguments ? ### +### Q:17 Bourne shell(bash) 中有哪些特别变量 ? ### -Ans: The following table lists the special variables set by the Bourne shell for command line arguments . +答:下面的表列出了Bourne shell为命令行设置的特殊变量。 -注:表格部分 @@ -165,10 +164,10 @@ Ans: The following table lists the special variables set by the Bourne shell for @@ -176,7 +175,7 @@ Ans: The following table lists the special variables set by the Bourne shell for

$0

@@ -184,7 +183,7 @@ Ans: The following table lists the special variables set by the Bourne shell for

$1

@@ -192,7 +191,7 @@ Ans: The following table lists the special variables set by the Bourne shell for

$2

@@ -208,7 +207,7 @@ Ans: The following table lists the special variables set by the Bourne shell for

$9

@@ -216,7 +215,7 @@ Ans: The following table lists the special variables set by the Bourne shell for

$#

@@ -224,17 +223,17 @@ Ans: The following table lists the special variables set by the Bourne shell for

$*

-

Special Variables

+

内建变量

-

Holds

+

解释

-

Name of the Script from the command line

+

来自命令行脚本的名字

-

First Command-line argument

+

第一个命令行参数

-

Second Command-line argument

+

第二个命令行参数

-

Ninth Command line argument

+

第九个命令行参数

-

Number of Command line arguments

+

命令行参数的数量

-

All Command-line arguments, separated with spaces

+

所有命令行参数,以空格隔开

### Q:18 How to test files in a shell script ? ### +### Q:18 在shell脚本中,如何测试文件 ? ### -Ans: test command is used to perform different test on the files. Basic test are listed below : +答:test命令可以用来测试文件。基础用法如下表格: -注:表格部分 @@ -245,79 +244,79 @@ Ans: test command is used to perform different test on the files. Basic test are

Test

-

Usage

+

用法

-

-d file_name

+

-d 文件名

-

Returns true if the file exists and is a directory

+

返回true,如果文件存在并且是一个目录

-

-e file_name

+

-e 文件名

-

Returns true if the file exists

+

返回true,如果文件存在

-

-f file_name

+

-f 文件名

-

Returns true if the file exists and is a regular file

+

返回true,如果文件存在并且是普通文件

-

-r file_name

+

-r 文件名

-

Returns true if the file exists and have read permissions

+

返回true,如果文件存在并拥有读权限

-

-s file_name

+

-s 文件名

-

Returns true if the file exists and is not empty

+

返回true,如果文件存在并且不为空

-

-w file_name

+

-w 文件名

-

Returns true if the file exists and have write permissions

+

返回true,如果文件存在并拥有写权限

-

-x file_name

+

-x 文件名

-

Returns true if the file exists and have execute permissions

+

返回true,如果文件存在并拥有执行权限

-### Q:19 How to put comments in your shell script ? ### +### Q:19 在shell脚本中,如何写入注释 ? ### -Ans: Comments are the messages to yourself and for other users that describe what a script is supposed to do and how its works.To put comments in your script, start each comment line with a hash sign (#) . Example is shown below : +答:注释可以用来描述一个脚本可以做什么和它是如何工作的。每一个注释以#开头。例子如下: #!/bin/bash # This is a command echo “I am logged in as $USER” -### Q:20 How to get input from the terminal for shell script ? ### +### Q:20 如何得到来自终端的命令输入到shell脚本? ### -Ans: ‘read’ command reads in data from the terminal (using keyboard). The read command takes in whatever the user types and places the text into the variable you name. Example is shown below : +答:read命令可以读取来自终端(使用键盘)的数据。read命令接入用户的输入并置于变量中。例子如下: # vi /tmp/test.sh @@ -331,37 +330,48 @@ Ans: ‘read’ command reads in data from the terminal (using keyboard). The re LinuxTechi My Name is LinuxTechi -### Q:21 How to unset or de-assign variables ? ### +### Q:21 如何取消设置或取消变量 ? ### -Ans: ‘unset’ command is used to de-assign or unset a variable. Syntax is shown below : +答:“unset”命令用于去取消或取消设置一个变量。语法如下所示: - # unset + # unset <变量名> -### Q:22 How to perform arithmetic operation ? ### +### Q:22 如何执行算术运算 ? ### -Ans: There are two ways to perform arithmetic operations : +答:有两种方法来执行算术运算: -1. Using `expr` command (# expr 5 + 2 ) -2. using a dollar sign and square brackets ( `$[ operation ]` ) Example : test=$[16 + 4] ; test=$[16 + 4] +1.使用`expr`命令(# expr 5 + 2) +2.用一个美元符号和方括号(`$[ 表达式 ]`)例如:test=$[16 + 4] ; test=$[16 + 4] -### Q:23 Basic Syntax of do-while statement ? ### +### Q:23 do-while语句的基本格式 ? ### -Ans: The do-while statement is similar to the while statement but performs the statements before checking the condition statement. The following is the format for the do-while statement: +答:do-while语句类似于while语句,但检查条件语句之前先执行命令。下面是用do-while语句的语法 do { - statements - } while (condition) + 命令 + } while (条件) -### Q:24 How to define functions in shell scripting ? ### +### Q:24 在shell脚本如何定义函数呢 ? ### -Ans: A function is simply a block of of code with a name. When we give a name to a block of code, we can then call that name in our script, and that block will be executed. Example is shown below : +答:函数是拥有名字的代码块。当我们定义代码块,我们就可以在我们的脚本调用名字,该块就会被执行。示例如下所示: $ diskusage () { df -h ; } -### Q:25 How to use bc (bash calculator) in a shell script ? ### + 译注:下面是我给的shell函数语法,原文没有 -Ans: Use the below Syntax to use bc in shell script. + [ function ] 函数名 [()] + { + + 命令; + [return int;] + + } + + +### Q:25 如何在shell脚本中使用BC(bash计算器) ? ### + +答:使用下列格式,在shell脚本中使用bc variable=`echo “options; expression” | bc` @@ -370,7 +380,7 @@ Ans: Use the below Syntax to use bc in shell script. via: http://www.linuxtechi.com/linux-shell-scripting-interview-questions-answers/ 作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[VicYu/Vic020](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2b1d2d58ba17a13dc4d2e05ebd25262824fbd953 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Sun, 15 Feb 2015 11:31:42 +0800 Subject: [PATCH 0028/2517] moved --- ...0205 25 Linux Shell Scripting interview Questions & Answers.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md (100%) diff --git a/sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md b/translated/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md similarity index 100% rename from sources/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md rename to translated/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md From 2eadea9fd92d8706c1a3f3621b9a70f8773426cb Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 15 Feb 2015 12:09:08 +0800 Subject: [PATCH 0029/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...est GNOME Shell Themes For Ubuntu 14.04.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md b/translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md index 339ef5f836..1b414e71c0 100644 --- a/translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md +++ b/translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md @@ -2,7 +2,7 @@ Ubuntu 14.04 上 最好的 GNOME Shell 主题 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Best_Gnome_Shell_Themes.jpeg) -自定义主题是自定义你的 Linux 桌面的最好方式。假如你在 [Ubuntu 14.04 中安装 GNOME][1] 或 在 Ubuntu 14.10 中安装了 GNOME,你或许想改变默认的主题以呈现出不同的外观。在这里,为帮助你完成该任务,我已经编制好了一个 **Ubuntu 或其他已经安装了 GNOME shell 的 Linux 操作系统中,最好的 GNOME Shell 主题** 的清单 。但在我们揭晓这份清单之前, 让我们先了解如何在 GNOME shell 中安装和应用新的主题。 +最好的方式来自定义你的 Linux 桌面就是使用自定义主题。假如你在 [Ubuntu 14.04 中安装 GNOME][1] 或 在 Ubuntu 14.10 中安装了 GNOME,你或许想改变默认的主题以呈现出不同的外观。在这里,为了帮助你完成该任务,我已经编制好了一个列表—— **Ubuntu 或其他已经安装了 GNOME shell 的 Linux 操作系统中,最好的 GNOME Shell 主题** 。但在我们揭晓这份列表之前, 让我们先了解如何在 GNOME shell 中安装和应用新的主题。 ### 在 GNOME Shell 中安装主题 ### @@ -12,7 +12,7 @@ Ubuntu 14.04 上 最好的 GNOME Shell 主题 sudo apt-get install gnome-tweak-tool ``` -或者,你可以使用新主题通过把它们放置到 `~/.themes` 目录中。如果你需要,我已经写了一个关于 [如何安装和使用 GNOME shell][2]的具体教程。 +或者,你可以通过把主题放置到 `~/.themes` 目录中来使用。如果你需要,我已经写了一个关于 [如何安装和使用 GNOME shell][2]的具体教程。 ### 最好的 GNOME Shell 主题 ### @@ -22,7 +22,7 @@ sudo apt-get install gnome-tweak-tool ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/02/mockups_numix_5.jpeg) -任何没有提到 [Numix 主题][3] 的清单都是不完整的。这个主题是如此地受欢迎以至于 [Numix 团队开发出一个新的 Linux 操作系统, Ozon][4]。考虑到他们的设计作品 Numix 主题,称在不久的将来发行的 `Ozon` 为 [最美丽的 Linux 操作系统][5] 也不为过。 +任何没有提到 [Numix 主题][3] 的列表都是不完整的。这个主题是如此地受欢迎以至于 [Numix 团队开发出一个新的 Linux 操作系统, Ozon][4]。考虑到他们的设计作品 Numix 主题,把不久将发行的 `Ozon` 称为 [最美丽的 Linux 操作系统][5] 也不为过。 使用下面的命令,在基于 Ubuntu 的发行版本中安装 Numix 主题: @@ -36,7 +36,7 @@ sudo apt-get install numix-icon-theme-circle ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Elegance_Colors_Theme_GNOME_Shell.jpeg) -另一个来自 Numix 团队的成员之一的 Satyajit Sahoo 的美丽主题 。[Elegance Colors][6] 拥有自己的 PPA (译者注: 即 Personal Package Archive 的缩写) 使得你可以轻易地安装它: +另一个美丽主题来自 Numix 团队成员之一 Satyajit Sahoo。[Elegance Colors][6] 拥有自己的 PPA (译者注: 即 Personal Package Archive 的缩写) 使得你可以轻松安装它: ``` sudo add-apt-repository ppa:satyajit-happy/themes @@ -48,7 +48,7 @@ sudo apt-get install gnome-shell-theme-elegance-colors ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Moka_GNOME_Shell.jpeg) -[Moka][7] 是另一个迷人的主题,它总是位于美丽的主题的清单之中。它是由给我们带来 Unity Tweak Tool 的开发者所设计。 Moka 是你绝对要尝试的主题之一: +[Moka][7] 是另一个迷人的主题,它总是位于美丽的主题列表之中。它是由 Unity Tweak Tool 的开发者所设计。 Moka 是你一定要尝试的主题: ``` sudo add-apt-repository ppa:moka/stable @@ -68,7 +68,7 @@ sudo apt-get install moka-gnome-shell-theme ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Ciliora_Prima_Gnome_Shell.jpeg) -以前它以 Zukitwo Dark 的名字为人们熟知, Ciliora-Prima 是一个拥有方块图标的主题,可得到的三种版本之间相互略有不同。你可以从下面的链接中下载它们: +以前它以 Zukitwo Dark 的名字为人们熟知, Ciliora-Prima 是一个拥有方块图标的主题,可使用的三种版本之间彼此略有不同。你可以从下面的链接中下载它们: - [Download Ciliora-Prima GNOME Shell Theme][9] @@ -76,7 +76,7 @@ sudo apt-get install moka-gnome-shell-theme ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Faience_GNOME_Shell_Theme.jpeg) -Faience 作为一个受欢迎的主题已经有一段时间了。你可以通过下面的 PPA 为 GNOME 3.10 及更高版本 安装 Faience: +Faience 作为一个受欢迎的主题已经有一段时间了。你可以通过下面的 PPA 为 GNOME 3.10 及更高版本安装 Faience: ``` sudo add-apt-repository ppa:tiheum/equinox @@ -88,7 +88,7 @@ sudo apt-get install faience-theme ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Paper_GTK_Theme.jpeg) -自从 Google 提出 `Material Design`,人们一直为之疯狂。Paper GTK 主题受 Google Material design 启发, 作者为 Sam Hewitt( Moka 项目开发者之一); 它正处于开发中,这意味着当前你将不能对 Paper 拥有最好的体验。假如你和我一样,具有一点实验精神,你绝对可以试一试。 +自从 Google 提出 `Material Design`,人们一直为之疯狂。Paper GTK 主题受 Google Material design 启发,作者为 Sam Hewitt( Moka 项目开发者之一);它正处于开发中,这意味着当前你还不能拥有 Paper 的最好体验。假如你和我一样,具有一点实验精神,你绝对可以试一试。 ``` sudo add-apt-repository ppa:snwh/pulp @@ -96,9 +96,9 @@ sudo apt-get update sudo apt-get install paper-gtk-theme ``` -以上就是我的清单。假如你正试着给你的 Ubuntu 换一个不同的模样,你也应该试试这个清单: [Ubuntu 14.04 中最好的图标主题][10]。 +以上就是我的列表。如果你正试着给你的 Ubuntu 换一个不同的模样,你也应该试试这个列表: [Ubuntu 14.04 中最好的图标主题][10]。 -你是怎样找到这份 **最好的 GNOME shell 主题** 清单的呢?在上面列举的主题中,哪个是你最中意的呢? 如果它没有在这里列出,请一定让我们知道那个你心目中最好的 GNOME shell 主题 。 +你是怎样找到这份 **最好的 GNOME shell 主题** 列表的呢?在上面列举的主题中,哪个是你最中意的? 如果它没有在这里列出,请一定在评论中告诉我们哪个是你心目中最好的 GNOME shell 主题 。 -------------------------------------------------------------------------------- @@ -106,7 +106,7 @@ via: http://itsfoss.com/gnome-shell-themes-ubuntu-1404/ 作者:[Abhishek][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 76559ab6dc49ac982b1c0ff4a7aac642723ffd22 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 15 Feb 2015 12:51:15 +0800 Subject: [PATCH 0030/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150112 Best GNOME Shell Themes For Ubuntu 14.04.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md (100%) diff --git a/translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md b/published/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md similarity index 100% rename from translated/share/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md rename to published/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md From e06edfcc7de09e187b913c600ee9df79105a104a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 15 Feb 2015 14:41:18 +0800 Subject: [PATCH 0031/2517] =?UTF-8?q?20150215-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... web server logs interactively on Linux.md | 143 ++++++++++++++++++ ...ween computers over network with btsync.md | 136 +++++++++++++++++ ...150225 How to Hide PHP Version in Linux.md | 56 +++++++ 3 files changed, 335 insertions(+) create mode 100644 sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md create mode 100644 sources/tech/20150215 How to share files between computers over network with btsync.md create mode 100644 sources/tech/20150225 How to Hide PHP Version in Linux.md diff --git a/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md new file mode 100644 index 0000000000..f2f7a9a270 --- /dev/null +++ b/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md @@ -0,0 +1,143 @@ +How to analyze and view Apache web server logs interactively on Linux +================================================================================ +Whether you are in the web hosting business, or run a few web sites on a VPS yourself, chances are you want to display visitor statistics such as top visitors, requested files (dynamic or static), used bandwidth, client browsers, and referring sites, and so forth. + +[GoAccess][1] is a command-line log analyzer and interactive viewer for Apache or Nginx web server. With this tool, you will not only be able to browse the data mentioned earlier, but also parse the web server logs to dig for further data as well - and **all of this within a terminal window in real time**. Since as of today [most web servers][2] use either a Debian derivative or a Red Hat based distribution as the underlying operating system, I will show you how to install and use GoAccess in Debian and CentOS. + +### Installing GoAccess on Linux ### + +In Debian, Ubuntu and derivatives, run the following command to install GoAccess: + + # aptitude install goaccess + +In CentOS, you'll need to enable the [EPEL repository][3] and then: + + # yum install goaccess + +In Fedora, simply use yum command: + + # yum install goaccess + +If you want to install GoAccess from the source to enable further options (such as GeoIP location), install [required dependencies][4] for your operating system, and then follow these steps: + + # wget http://tar.goaccess.io/goaccess-0.8.5.tar.gz + # tar -xzvf goaccess-0.8.5.tar.gz + # cd goaccess-0.8.5/ + # ./configure --enable-geoip + # make + # make install + +That will install version 0.8.5, but you can always verify what is the latest version in the [Downloads page][5] of the project's web site. + +Since GoAccess does not require any further configurations, once it's installed you are ready to go. + +### Running GoAccess ### + +To start using GoAccess, just run it against your Apache access log. + +For Debian and derivatives: + + # goaccess -f /var/log/apache2/access.log + +For Red Hat based distros: + + # goaccess -f /var/log/httpd/access_log + +When you first launch GoAccess, you will be presented with the following screen to choose the date and log format. As explained, you can toggle between options using the spacebar and proceed with F10. As for the date and log formats, you may want to refer to the [Apache documentation][6] if you need to refresh your memory. + +In this case, Choose Common Log Format (CLF): + +![](https://farm8.staticflickr.com/7422/15868350373_30c16d7c30.jpg) + +and then press F10. You will be presented with the statistics screen. For the sake of brevity, only the header, which shows the summary of the log file, is shown in the next image: + +![](https://farm9.staticflickr.com/8683/16486742901_7a35b5df69_b.jpg) + +### Browsing Web Server Statistics with GoAccess ### + +As you scroll down the page with the down arrow, you will find the following sections, sorted by requests. The order of the categories presented here may vary depending on your distribution or your preferred installation method (from repositories or from source): + +1. Unique visitors per day (HTTP requests having the same IP, same date and same agent are considered an unique visit) + +![](https://farm8.staticflickr.com/7308/16488483965_a439dbc5e2_b.jpg) + +2. Requested files (Pages-URL) + +![](https://farm9.staticflickr.com/8651/16488483975_66d05dce51_b.jpg) + +3. Requested static files (e.g., .png, .js, etc) + +4. Referrers URLs (the URLs where each request came from) + +5. HTTP 404 Not Found response code + +![](https://farm9.staticflickr.com/8669/16486742951_436539b0da_b.jpg) + +6. Operating Systems + +7. Browsers + +8. Hosts (client IPs) + +![](https://farm8.staticflickr.com/7392/16488483995_56e706d77c_z.jpg) + +9. HTTP status codes + +![](https://farm8.staticflickr.com/7282/16462493896_77b856f670_b.jpg) + +10. Top referring sites + +11. Top keyphrases used on Google's search engine + +If you also want to inspect the archived logs, you can pipe them to GoAccess as follows. + +For Debian and derivatives: + + # zcat -f /var/log/apache2/access.log* | goaccess + +For Red Hat based distributions: + + # cat /var/log/httpd/access* | goaccess + +Should you need a more detailed report of any of the above (1 through 11), press the desired section number and then O (uppercase o) to bring up what is called the Detailed View. The following image shows the output of 5-O (press 5, then press O): + +![](https://farm8.staticflickr.com/7382/16302213429_48d9233f40_b.jpg) + +To display GeoIP location information, open the Detail View in the Hosts section, as explained earlier, and you will see the location of the client IPs that performed requests to your web server: + +![](https://farm8.staticflickr.com/7393/16488484075_d778aa91a2_z.jpg) + +If your system has not been very busy lately, some of the above sections will not show a great deal of information, but that situation can change as more and more requests are made to your web server. + +### Saving Reports for Offline Analysis ### + +There will be times when you don't want to inspect your system's stats in real time, but save it to a file for offline analysis or printing. To generate an HTML report, simply redirect the output of the GoAccess commands mentioned earlier to an HTML file. Then just point your web browser to the file to open it. + + # zcat -f /var/log/apache2/access.log* | goaccess > /var/www/webserverstats.html + +Once the report is displayed, you will need to click on the Expand link to show the detail view on each category: + +![](https://farm9.staticflickr.com/8658/16486743041_bd8a80794d_o.png) + +注释:youtube视频 + + +As we have discussed throughout this article, GoAccess is an invaluable tool that will provide you, as a system administrator, with HTTP statistics in a visual report on the fly. Although GoAccess by default presents its results to the standard output, you can also save them to JSON, HTML, or CSV files. This converts GoAccess in an incredibly useful tool to monitor and display statistics of a web server. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:http://goaccess.io/ +[2]:http://w3techs.com/technologies/details/os-linux/all/all +[3]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[4]:http://goaccess.io/download#dependencies +[5]:http://goaccess.io/download +[6]:http://httpd.apache.org/docs/2.4/logs.html \ No newline at end of file diff --git a/sources/tech/20150215 How to share files between computers over network with btsync.md b/sources/tech/20150215 How to share files between computers over network with btsync.md new file mode 100644 index 0000000000..3af649b886 --- /dev/null +++ b/sources/tech/20150215 How to share files between computers over network with btsync.md @@ -0,0 +1,136 @@ +How to share files between computers over network with btsync +================================================================================ +If you are the type of person who uses several devices to work online, I'm sure you must be using, or at least wishing to use, a method for syncing files and directories among those devices. + +BitTorrent Sync, also known as btsync for short, is a cross-platform sync tool (freeware) which is powered by BitTorrent, the famous protocol for peer-to-peer (P2P) file sharing. Unlike classic BitTorrent clients, however, btsync encrypts traffic and grants access to shared files based on auto-generated keys across different operating system and device types. + +More specifically, when you add files or folder to btsync as shareable, corresponding read/write keys (so-called secret codes) are created. These keys are then shared among different devices via HTTPS links, emails, QR codes, etc. Once two devices are paired via a key, the linked content can be synced directly between them. There is no file size limit, and transfer speeds are never throttled unless you explicitly say so. You will be able to create accounts inside btsync, under which you can create and manage keys and files to share via web interface. + +BitTorrent Sync is available on multiple operating systems including Linux, MacOS X, Windows, as well as [Android][1] and [iOS][2]. In this tutorial, I will show you how to use BitTorrent Sync to sync files between a Linux box (a home server), and a Windows machine (a work laptop). + +### Installing Btsync on Linux ### + +BitTorrent Sync is available for download from the [project's website][3]. I assume that the Windows version of BiTorrent Sync is installed on a Windows laptop, which can be done very easily. I will focus on installing and configuring it on the Linux server. + +In the download page, choose your architecture, right click on the corresponding link, choose Copy link location (or similar, depending on your browser), and paste the link to wget in your terminal, as follows: + +**For 64-bit Linux:** + + # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-x64/track/stable + +**For 32-bit Linux:** + + # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-i386/track/stable + +![](https://farm9.staticflickr.com/8635/15895277773_8acf317e3c_c.jpg) + +Once the download has completed, extract the contents of the tarball into a directory specially created for that purpose: + + # cd /usr/local/bin + # mkdir btsync + # tar xzf stable -C btsync + +![](https://farm8.staticflickr.com/7306/16329173869_7dc8b64a39_b.jpg) + +You can now either add /usr/local/bin/btsync to your PATH environment variable. + + export PATH=$PATH:/usr/local/bin/btsync + +or run the btsync binary right from that folder. We'll go with the first option as it requires less typing and is easier to remember. + +### Configuring Btsync ### + +Btsync comes with a built-in web server which is used as the management interface for BitTorrent Sync. To be able to access the web interface, you need to create a configuration file. You can do that with the following command: + + # btsync --dump-sample-config > btsync.config + +Then edit the btsync.config file (webui section) with your preferred text editor, as follows: + + "listen" : "0.0.0.0:8888", + "login" : "yourusername", + "password" : "yourpassword" + +You can choose any username and password. + +![](https://farm9.staticflickr.com/8599/15895277793_da63841433_b.jpg) + +![](Feel free to check the README file in /usr/local/bin/btsync directory if you want to tweak the configuration further, but this will do for now.) + +### Running Btsync for the First Time ### + +As system administrators we believe in logs! So before we launch btsync, we will create a log file for btsync. + + # touch /var/log/btsync.log + +Finally it's time to start btsync: + + # btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log + +![](https://farm8.staticflickr.com/7288/16327720298_ccf2cbedea_c.jpg) + +Now point your web browser to the IP address of the Linux server and the port where btsync is listening on (192.168.0.15:8888 in my case), and agree to the privacy policies, terms, and EULA: + +![](https://farm9.staticflickr.com/8597/16327720318_d52551fc44_b.jpg) + +and you will be taken to the home page of your btsync installation: + +![](https://farm8.staticflickr.com/7412/16329544687_9a174527d8_c.jpg) + +Click on Add a folder, and choose a directory in your file system that you want to share. In our example, we will use /btsync: + +![](https://farm8.staticflickr.com/7407/16515452485_e25ded559f_b.jpg) + +That's enough by now. Please install BitTorrent Sync on your Windows machine (or another Linux box, if you want) before proceeding. + +### Sharing Files with Btsync ### + +The following screencast shows how to sync an existing folder in a Windows 8 machine [192.168.0.106]. After adding the desired folder, get its key, and add it in your Linux installation via the "Enter a key or link" menu (as shown in the previous image), and the sync will start: + +注释:youtube视频 + + +Now repeat the process for other computers or devices; selecting a folder or files to share, and importing the corresponding key(s) in your "central" btsync installation via the web interface on your Linux server. + +### Auto-start Btsync as a Normal User ### + +You will notice that the synced files in the screencast were created in the /btsync directory belonging to user and group 'root'. That is because we launched BitTorrent Sync manually as the superuser. However, under normal circumstances, you will want to have BitTorrent Sync start on boot and running as a non-privileged user (www-data or other special account created for that purpose, btsync user for example). + +To do so, create a user called btsync, and add the following stanza to the /etc/rc.local file (before the exit 0 line): + + sudo -u btsync /usr/local/bin/btsync/btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log + +Finally, create the pid file: + + # touch /usr/local/bin/btsync/.sync//sync.pid + +and change the ownership of /usr/local/bin/btsync recursively: + + # chown -R btsync:root /usr/local/bin/btsync + +Now reboot and verify that btsync is running as the intended user: + +![](https://farm9.staticflickr.com/8647/16327988660_644f6d4505_c.jpg) + +Based on your chosen distribution, you may find other ways to enable btsync to start on boot. In this tutorial I chose the rc.local approach since it's distribution-agnostic. + +### Final Remarks ### + +As you can see, BitTorrent Sync is almost like server-less Dropbox for you. I said "almost" because of this: When you sync between devices on the same local network, sync happens directly between two devices. However, if you try to sync across different networks, and the devices to be paired are behind restrictive firewalls, there is a chance that the sync traffic goes through a third-party relay server operated by BitTorrent. While they claim that the traffic is [AES-encrypted][4], you may still not want this to happen. For your privacy, be sure to turn off relay/tracker server options in every folder that you are sharing. + +Hope it helps! Happy syncing! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/share-files-between-computers-over-network.html + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:https://play.google.com/store/apps/details?id=com.bittorrent.sync +[2]:https://itunes.apple.com/us/app/bittorrent-sync/id665156116 +[3]:http://www.getsync.com/ +[4]:http://www.getsync.com/tech-specs \ No newline at end of file diff --git a/sources/tech/20150225 How to Hide PHP Version in Linux.md b/sources/tech/20150225 How to Hide PHP Version in Linux.md new file mode 100644 index 0000000000..ddc219bac1 --- /dev/null +++ b/sources/tech/20150225 How to Hide PHP Version in Linux.md @@ -0,0 +1,56 @@ +How to Hide PHP Version in Linux +================================================================================ +In general, most of the web server software has been installed with default settings that will lead to information leakage. One of them is a PHP software. PHP (Hypertest Preprocessor) is one of the most popular server-side HTML embedded scripting language for the websites today. In the current challenging times, there are lots of attacker will try to discover the weaknesses in your your server system. Hence, i will describe the simple way to hide the PHP information in Linux server. + +By default **expose_php** is set to On. Turning off the “expose_php” parameter causes that PHP will hide it version details. + + [root@centos66 ~]# vi /etc/php.ini + +In your php.ini, locate the line containing expose_php On and set it to Off: + + expose_php = Off + +Before the changes, web server header will look like below : + + [root@centos66 ~]# curl -I http://www.ehowstuff.com/ + +---------- + + HTTP/1.1 200 OK + Server: nginx + Content-Type: text/html; charset=UTF-8 + Vary: Accept-Encoding + X-Powered-By: PHP/5.3.3 + X-Pingback: http://www.ehowstuff.com/xmlrpc.php + Date: Wed, 11 Feb 2015 14:10:43 GMT + X-Page-Speed: 1.9.32.2-4321 + Cache-Control: max-age=0, no-cache + +After the changes, PHP will no longer show the version to the web server header : + +[root@centos66 ~]# curl -I http://www.ehowstuff.com/ + +HTTP/1.1 200 OK +Server: nginx +Date: Wed, 11 Feb 2015 15:38:14 GMT +Content-Type: text/html; charset=UTF-8 +Vary: Accept-Encoding +X-Pingback: http://www.ehowstuff.com/xmlrpc.php +Date: Wed, 11 Feb 2015 14:10:43 GMT +X-Page-Speed: 1.9.32.2-4321 +Cache-Control: max-age=0, no-cache + +As always if you need any help you can reach us on twitter @ehowstuff or drop us a comment below. [Jumping through archives page to read more articles..][1] + +-------------------------------------------------------------------------------- + +via: http://www.ehowstuff.com/how-to-hide-php-version-in-linux/ + +作者:[skytech][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ehowstuff.com/author/mhstar/ +[1]:http://www.ehowstuff.com/archives/ \ No newline at end of file From 7c73b8be9d11601e73bf7a8266fa712ab0dd79e1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 15 Feb 2015 15:50:07 +0800 Subject: [PATCH 0032/2517] =?UTF-8?q?20150215-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Icons From Dock In Elementary OS Freya.md | 55 +++++++++++++++++++ ...fault Instead of Ubuntu Software Center.md | 46 ++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md create mode 100644 sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md diff --git a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md new file mode 100644 index 0000000000..cccee5971a --- /dev/null +++ b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -0,0 +1,55 @@ +Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya [Quick Tip] +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) + +This quick tip shows you **how to get rid of two Google Chrome icons from the dock in Elementary OS Freya**. + +I hardly use the default Midori browser in [Elementary OS][1] Freya as Google Chrome is my main browser across all OSes. While [Midori][2] is kept in the dock by default, you’ll have to search for Google Chrome in Slingshot (applications) every time you want to open Google Chrome. To save time, I presume you have selected the “keep in dock” option for a quick access to Chrome. + +The problem here is that when you click on the Chrome icon in the dock, it creates another instance of Google Chrome. This leaves you with two Chrome icons in the docks and this is something that might be ignored by many but definitely an annoyance and against the design. If you share the same feeling, let’s see how can we remove the second Google Chrome icon. + +### Remove two Google Chrome icons from dock in Elementary OS Freya ### + +#### Step 1: #### + +Remove Google Chrome from the dock. + +#### Step 2: #### + +Open the terminal and use the following command: + + cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications + +#### Step 3: #### + +Next we need to edit the google-chrome.desktop file. Use the following commands: + + scratch-text-editor ~/.local/share/applications/google-chrome.desktop + +It will open the google-chrome.desktop file in Scratch for editing. Under the [Desktop Entry] section, add the following line: + + StartupWMClass=Google-chrome-stable + +It will look a bit like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) + +#### Step 4: #### + +Go to Slingshot and open Google Chrome again. Do select “keep in dock” again. Close it and start it again to verify that it doesn’t open a new Chrome instance in the dock. No reboot of system is required here. + +I hope this quick tip helped you to remove multiple Google Chrome icons from dock in Elementary OS Freya. Feel free to ask your questions and drop your suggestions in the comment below. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://elementary.io/ +[2]:http://midori-browser.org/ \ No newline at end of file diff --git a/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md new file mode 100644 index 0000000000..9bcbbb967e --- /dev/null +++ b/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md @@ -0,0 +1,46 @@ +How To Make GDebi Default Instead of Ubuntu Software Center +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) + +If you use Ubuntu or Ubuntu based Linux distribution such as Elementary OS Freya, you might be using Ubuntu Software Center to install .deb executable files. Ubuntu Software Center is a nice application for finding and installing apps but it is resource heavy and slow. This is why I prefer using [App Grid, a lighter alternative of Ubuntu Software Center][1]. + +Now, if you just trying to install a .deb file, I would not recommend either of Ubuntu Software Center or App Grid. I suggest GDebi, a dedicated program for installing Debian executable files. It is extremely lightweight and focused on installing .deb files. Best thing about GDebi is that it also shows the dependencies that will be installed along with the desired program. + +In this post we shall see **how to install GDebi and use it as the default installer instead of Ubuntu Software Center**. + +### Install GDebi in Ubuntu and other Linux distributions ### + +Open a terminal and use the following command: + + sudo apt-get install gdebi + +### Make GDebi default for .deb installation ### + +Once you have installed GDebi, it’s time to see how to make it the default application for installing .deb files. Please note that I am using Elementary OS Freya in this tutorial but the steps are applicable to all Ubuntu based distribution. Just the screenshots may look different. + +Download a .deb file first. Let’s say you have downloaded Google Chrome. Go to the download directory and right click on the .deb file. In here, go to **properties**. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default.jpeg) + +In the properties, you should see the option of **open with**. Click on it and change it to GDebi. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default_Ubuntu.jpeg) + +Next time you double click on a .deb file, it will automatically open GDebi to install the .deb file. Indeed using such light applications is a good way to [speed up Ubuntu][2] or other Linux systems. + +What do you say? You still prefer Ubuntu Software Center for application installation or GDebi? Or if you are old school, [Synaptic Package Manager][3] perhaps? Which one is your favorite? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/gdebi-default-ubuntu-software-center/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/app-grid-lighter-alternative-ubuntu-software-center/ +[2]:http://itsfoss.com/speed-up-ubuntu-1310/ +[3]:http://www.nongnu.org/synaptic/ \ No newline at end of file From b9644b6f35a125a793cfb5e412438b24301bc610 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 15 Feb 2015 16:23:09 +0800 Subject: [PATCH 0033/2517] =?UTF-8?q?20150215-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ux Games We Will See In 2015 And Beyond.md | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md diff --git a/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md b/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md new file mode 100644 index 0000000000..9f11f47573 --- /dev/null +++ b/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md @@ -0,0 +1,136 @@ +A Look At What Linux Games We Will See In 2015 And Beyond +================================================================================ +Linux Gaming is dead they said, Linux Gaming is pointless they said...ah whatever. Here’s a look at what’s to come for us in 2015 and beyond. + +It's pretty hard to keep up with everything that's going on for us, but here's a quick look at what we could see soon. + +### Confirmed Games ### + +#### Adventure Games #### + +- [Firewatch][1] +- [Paradise Lost: First Contact][2] +- [SteamWorld Heist][3] + +#### Action Games #### + +- [Darksiders][4] +- [Darksiders II][5] +- [Ray's The Dead][6] +- [Skullgirls][7] + +#### FPS Games #### + +- [Bioshock Infinite][8] +- Half Life 3 /troll +- [Homefront: The Revolution][9] +- [Killing Floor 2][10] +- Serious Sam 4 (No official site for it yet) +- [Storm United][11] +- [SUPERHOT][12] + +#### Platformers #### + +- [Broforce][13] +- [Chasm][14] +- [Giana Sisters][15] +- [Heart Forth, Alicia][16] +- [Hot Tin Roof][17] +- [Infinifactory][18] +- [Mighty No. 9][19] +- [Night in the Woods][20] +- [Noct][21] +- [Oddworld: New 'N' Tasty][22] +- [Red Goddess][23] + +#### RPG Games #### + +- [Divinity: Original Sin][24] +- [Pillars Of Eternity][25] +- [Shadowrun: Hong Kong][26] +- [The Banner Saga][27] + +#### Strategy Games #### + +- [Age of Wonders III][28] +- [Banished][29] +- [Cities: Skylines][30] +- [Clockwork Empires][31] +- [Parkitect][32] +- [Scrolls][33] +- [Space Pirates And Zombies 2][34] + +#### Sandbox Games #### + +- [Terraria][35] +- [X Rebirth][36] + +#### Unconfirmed, but highly likely #### + +- [Company of Heroes 2][37] +- [Outlast][38] +- [Shadow Warrior][39] +- [Torchlight II][40] + +Then there’s the [two ports teased from Feral Interactive][41], we can’t let them be left out just because we don’t know what they are. + +We imagine Aspyr Media are also working on new bigger ports, but they have only just released their latest game, so it may be a few months until we see anything. + +**This isn't a complete list** of course, as we can easily forget with the sheer amount of games heading our way, and wow what a list! + +We have GDC next month, and we are expecting a few announcements too. While we don't have anything solid, with Valve's big presence with Steam Machines we are expecting at least some more Linux games, otherwise it we fear it may be a little lacklustre for Valve to only show off older existing games for Linux. + +What did we miss that you’re excited about for Linux? + +-------------------------------------------------------------------------------- + +via: http://www.gamingonlinux.com/articles/a-look-at-what-linux-games-we-will-see-in-2015-and-beyond.4963 + +作者:[liamdawe][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.gamingonlinux.com/profiles/1 +[1]:https://www.gamingonlinux.com/articles/category/17/articles/firewatch-a-first-person-mystery-game-finally-reveals-itself-in-a-trailer.4231 +[2]:http://www.asthreeworks.com/games/ +[3]:https://www.gamingonlinux.com/articles/category/17/articles/image-form-announces-steamworld-heist.4304 +[4]:https://www.gamingonlinux.com/articles/darksiders-linux-port-looks-like-it-is-still-happening.4893 +[5]:https://www.gamingonlinux.com/articles/darksiders-2-confirmed-for-linux.4154 +[6]:http://ragtagstudio.com/?page_id=457 +[7]:https://www.gamingonlinux.com/articles/editorial-skullgirls-on-linux-finally-shows-some-progress.4789 +[8]:https://www.gamingonlinux.com/articles/bioshock-infinite-looks-set-for-a-linux-release-confirmed.4668 +[9]:http://www.homefront-game.com/ +[10]:https://www.gamingonlinux.com/articles/category/17/articles/killing-floor-2-fps-has-a-new-trailer.4676 +[11]:https://www.gamingonlinux.com/articles/storm-united-online-fps-shows-first-real-gameplay-video-first-alpha-due-soon.4872 +[12]:http://superhotgame.com/ +[13]:http://steamcommunity.com/app/274190/discussions/0/540738051503306548/#c540738051518330743 +[14]:https://www.gamingonlinux.com/articles/category/17/articles/chasm-rpg-platformer-will-have-a-same-day-linux-release.4266 +[15]:https://www.gamingonlinux.com/articles/linux-port-of-platformer-giana-sisters-brought-inhouse-sequel-might-get-sameday-release.4913 +[16]:http://www.alonsomartin.mx/hfa/ +[17]:http://www.hottinroofgame.com/ +[18]:https://twitter.com/zachtronics/status/566016742825005057 +[19]:http://www.mightyno9.com/ +[20]:http://www.nightinthewoods.com/ +[21]:https://www.gamingonlinux.com/articles/category/17/articles/noct-a-fantastic-top-down-thermal-image-survival-horror-game.4783 +[22]:https://www.gamingonlinux.com/articles/puzzle-platformer-oddworld-new-n-tasty-will-release-for-linux-next-month.4836 +[23]:https://www.gamingonlinux.com/articles/new-trailer-for-platformer-red-goddesss-looks-really-good.4939 +[24]:https://www.gamingonlinux.com/articles/divinity-original-sin-is-pushing-ahead-for-the-linux-release.4938 +[25]:https://www.gamingonlinux.com/articles/pillars-of-eternity-the-rpg-aims-for-a-sameday-linux-release-on-march-26th.4834 +[26]:https://www.kickstarter.com/projects/webeharebrained/shadowrun-hong-kong +[27]:https://www.gamingonlinux.com/articles/the-banner-saga-rpg-looks-close-to-a-linux-version.4862 +[28]:https://www.gamingonlinux.com/articles/the-linux-port-of-age-of-wonders-iii-is-progressing-a-bit-too-explosive-right-now.4857 +[29]:https://www.gamingonlinux.com/articles/banished-survival-city-building-sim-is-being-ported-to-linux.4813 +[30]:https://www.gamingonlinux.com/articles/city-builder-game-cities-skylines-now-has-a-release-date.4954 +[31]:https://www.gamingonlinux.com/articles/clockwork-empires-still-pushing-towards-a-linux-version-suffering-delays.4734 +[32]:https://www.gamingonlinux.com/articles/category/17/articles/parkitect-what-roller-coaster-tycoon-should-have-grown-into.4528 +[33]:https://www.gamingonlinux.com/articles/mojangs-scrolls-now-has-an-experimental-linux-build.4450 +[34]:https://www.gamingonlinux.com/articles/space-pirates-and-zombies-2-reveals-the-zombies-in-a-brand-new-video.4759 +[35]:https://www.gamingonlinux.com/articles/terraria-officially-confirmed-to-be-in-development-for-linux-finally.4299 +[36]:https://www.gamingonlinux.com/articles/egosofts-x-rebirth-actively-being-ported-to-linux.4822 +[37]:https://www.gamingonlinux.com/articles/company-of-heroes-2-looks-like-it-is-heading-to-linux.4199 +[38]:https://www.gamingonlinux.com/articles/outlast-that-really-scary-game-looks-like-its-still-heading-to-linux.4896 +[39]:https://www.gamingonlinux.com/articles/shadow-warrior-looks-like-it-will-come-to-linux.4859 +[40]:https://www.gamingonlinux.com/articles/torchlight-ii-has-even-more-positive-signs-for-linux.4817 +[41]:http://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/ \ No newline at end of file From 2a9fe89b45481064a4915562ed2cab708f73413a Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 15 Feb 2015 16:31:31 +0800 Subject: [PATCH 0034/2517] PUB:20141226 How to Download Music from Grooveshark with a Linux OS @Stevearzh --- ...ow to Download Music from Grooveshark with a Linux OS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/share => published}/20141226 How to Download Music from Grooveshark with a Linux OS.md (86%) diff --git a/translated/share/20141226 How to Download Music from Grooveshark with a Linux OS.md b/published/20141226 How to Download Music from Grooveshark with a Linux OS.md similarity index 86% rename from translated/share/20141226 How to Download Music from Grooveshark with a Linux OS.md rename to published/20141226 How to Download Music from Grooveshark with a Linux OS.md index 0af3e996d3..b6ecc8acbd 100644 --- a/translated/share/20141226 How to Download Music from Grooveshark with a Linux OS.md +++ b/published/20141226 How to Download Music from Grooveshark with a Linux OS.md @@ -6,7 +6,7 @@ **Grooveshark 对于喜欢音乐的人来说是一个不错的在线平台,同时有多种从上面下载音乐的方法。Groovesquid 是众多允许用户从 Grooveshark 上下载音乐的应用之一,并且是支持多平台的。** -只要有在线流媒体服务,就一定有方法从获取你之前看过或听过的视频及音乐。即使下载接口关闭了,也不是什么大不了的事,因为还有很多种解决方法,无论你用的什么操作系统。比如,网络上就有许多种 YouTube 下载器,同样的道理,从 Grooveshark 上下载音乐也并非难事。 +只要有在线流媒体服务,就一定有方法将你看过或听过的视频及音乐保存到本地。即使下载接口关闭了,也不是什么大不了的事,因为还有很多种解决方法,无论你用的什么操作系统。比如,网络上就有许多种 YouTube 下载器,同样的道理,从 Grooveshark 上下载音乐也并非难事。 现在,得考虑合法性的问题。与许多其他应用一样,Groovesquid 并非是完全不合法的。如果有用户使用应用去做一些非法的事情,那责任应归咎于用户。同样的道理也适用于 utorrent 或者 Bittorrent。只要你不触及版权问题,那你就可以无所顾忌的使用 Groovesquid 了。 @@ -14,7 +14,7 @@ 你能够找到的 Groovesquid 的唯一缺点是,它是基于 Java 而编写的,这从来都不是一个好的兆头。虽然为了确保应用的可移植性这样做确实是一个好方法,但这样做的结果导致了其糟糕的界面。确实是非常糟糕的的界面,不过这一点并不会影响到用户的使用体验,特别是这款应用所完成的工作时如此的有用。 -有一点需要注意的地方。Groovesquid 是一款免费的应用,但为了将免费保持下去,它会在菜单栏的右侧显示一则广告。这对大多数人来说都应该不是问题,不过最好在打开应用后注意下菜单栏右侧。 +有一点需要注意的地方。Groovesquid 是一款免费的应用,但为了将免费保持下去,它会在菜单栏的右侧显示一则广告。这对大多数人来说都应该不是问题,不过最好在打开应用后注意下菜单栏右侧(那不是应用的一部分)。 从易用性的角度来看,这款应用非常简洁。用户可以通过在顶部地址栏里输入链接直接下载单曲,地址栏的位置可以通过其左侧的下拉菜单进行修改。在下拉菜单中,也可以修改为歌曲名称、流行度、专辑名称、播放列表以及艺术家。有些选项向你提供了诸如查看 Grooveshark 上最流行的音乐,或者下载整个播放列表等。 @@ -38,7 +38,7 @@ via: http://news.softpedia.com/news/How-to-Download-Music-from-Grooveshark-with- 作者:[Silviu Stahie][a] 译者:[Stevearzh](https://github.com/Stevearzh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 120d5e349aa0c04f2650b1d34743acc55655699e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 15 Feb 2015 17:02:04 +0800 Subject: [PATCH 0035/2517] PUB:20140917 How to create a software RAID-1 array with mdadm on Linux @shipsw --- ...ftware RAID-1 array with mdadm on Linux.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20140917 How to create a software RAID-1 array with mdadm on Linux.md (83%) diff --git a/translated/tech/20140917 How to create a software RAID-1 array with mdadm on Linux.md b/published/20140917 How to create a software RAID-1 array with mdadm on Linux.md similarity index 83% rename from translated/tech/20140917 How to create a software RAID-1 array with mdadm on Linux.md rename to published/20140917 How to create a software RAID-1 array with mdadm on Linux.md index ddbdfc8689..4c183956d3 100644 --- a/translated/tech/20140917 How to create a software RAID-1 array with mdadm on Linux.md +++ b/published/20140917 How to create a software RAID-1 array with mdadm on Linux.md @@ -1,10 +1,10 @@ 如何使用linux程序mdadm创建软件RAID1软阵列 ================================================================================ -磁盘冗余阵列(RAID)是将多个物理磁盘结合成一个逻辑磁盘的技术,该技术可以提高磁盘容错性能,提高磁盘的读写速度。根据数据存储的排列(如 条带存储,镜像存储,奇偶或者他们的组合),定义了几个不同级别的RAID(RAID-0,RAID-1,RAID-5 等等)。磁盘阵列可以使用软件或者硬件方式实现。现代Linux操作系统中,基本的软件RAID功能是默认安装的。 +磁盘冗余阵列(RAID)是将多个物理磁盘结合成一个逻辑磁盘的技术,该技术可以提高磁盘容错性能,提高磁盘的读写速度。根据数据存储的排列(如:条带存储,镜像存储,奇偶或者他们的组合),定义了几个不同级别的RAID(RAID-0,RAID-1,RAID-5 等等)。磁盘阵列可以使用软件或者硬件方式实现。现代Linux操作系统中,基本的软件RAID功能是默认安装的。 本文中,我们将介绍软件方式构建RAID-1阵列(镜像阵列),RAID-1将相同的数据写到不同的设备中。虽然可以使用同一个磁盘的两个分区实现RAID-1,但是如果磁盘坏了的话数据就都丢了,所以没什么意义。实际上,这也是为什么大多数RAID级别都使用多个物理磁盘提供冗余。当单盘失效后不影响整个阵列的运行,并且可以在线更换磁盘,最重要的是数据不会丢失。尽管如此,阵列不能取代外部存储的定期备份。 -由于RAID-1阵列的大小是最小磁盘的大小,一般来说应该使用两个大小相同的磁盘来组建RAID-1。 +由于RAID-1阵列的大小是阵列中最小磁盘的大小,一般来说应该使用两个大小相同的磁盘来组建RAID-1。 ### 安装mdadm ### @@ -28,7 +28,7 @@ # aptitude install mdadm -Ubuntu系统中,会要求为电子邮件通知配置后缀MTA。你可以跳过去。 +Ubuntu系统中,会要求配置Postfix MTA 以发送电子邮件通知。你可以跳过去。 Debian系统中,安装程序会显示以下解释信息,用来帮助我们去判断是否将根目录安装到RAID阵列中。下面的所有操作都有赖于这一步,所以应该仔细阅读他。 @@ -38,13 +38,13 @@ Debian系统中,安装程序会显示以下解释信息,用来帮助我们 ![](https://farm6.staticflickr.com/5555/15198241896_29e08b977f.jpg) -提示是否开机启动阵列的时候,选择是。注意,这里需要往/etc/fstab 文件中添加一个条目使得系统启动的时候正确挂载阵列。 +提示是否开机启动阵列的时候,选择“是”。注意,这里需要往/etc/fstab 文件中添加一个条目使得系统启动的时候正确挂载阵列。 ![](https://farm4.staticflickr.com/3875/15220883342_2b1d689a0a_z.jpg) ### 硬盘分区 ### -现在开始准备建立阵列需要的硬盘。这里往插入两个8GB的usb磁盘,使用dmesg命令设备显示设备 /dev/sdb 和 /dev/sdc +现在开始准备建立阵列需要的硬盘。这里插入两个8GB的usb磁盘,使用dmesg命令设备显示设备 /dev/sdb 和 /dev/sdc # dmesg | less @@ -107,7 +107,7 @@ Debian系统中,安装程序会显示以下解释信息,用来帮助我们 ![](https://farm6.staticflickr.com/5583/15034683868_6c28564e5a_z.jpg) -'mdadm -D'命令提供的信息中,最重要就是阵列状态类。激活状态说明阵列正在进行读写操作。其他几个状态分别为 完成(读写完成)、降级(有一块磁盘失效或丢失)或者恢复中(一张新盘已插入,系统正在写入数据)。这几个状态涵盖类大多数情况。 +'mdadm -D'命令提供的信息中,最重要就是阵列状态类。激活状态说明阵列正在进行读写操作。其他几个状态分别为:完成(读写完成)、降级(有一块磁盘失效或丢失)或者恢复中(一张新盘已插入,系统正在写入数据)。这几个状态涵盖了大多数情况。 ### 格式化或加载磁盘阵列 ### @@ -128,7 +128,7 @@ Debian系统中,安装程序会显示以下解释信息,用来帮助我们 mdadm工具内置有磁盘阵列监控功能。当mdadm作为守护程序运行的时候(就像我们上文那样),会周期性的检测阵列运行状态,将检测到的信息通过电子邮件或者系统日志报告上来。当然,也可以配置其在发生致命性错误的时候调用紧急命令。 -mdadm默认会记录所有已知分区和阵列的事件,并将他们记录到 /var/log/syslog中。或者你可以在配置文件中(/etc/mdadm/mdadm.conf debian系统 /etc/mdadm.conf 红帽子系统)以以下格式指定监控设备或者阵列。如果mdadm.conf文件不存在,你可以创建一个。 +mdadm默认会记录所有已知分区和阵列的事件,并将他们记录到 /var/log/syslog中。或者你可以在配置文件中(debian系统:/etc/mdadm/mdadm.conf ,红帽子系统:/etc/mdadm.conf )用以下格式指定监控设备或者阵列。如果mdadm.conf文件不存在,你可以创建一个。 DEVICE /dev/sd[bcde]1 /dev/sd[ab]1 @@ -169,7 +169,7 @@ CentOS或者RHEL 6: ![](https://farm6.staticflickr.com/5563/15218183681_63a10da704_z.jpg) -现在我们的阵列已经可以访问类,拷贝文件/etc/passwd到/mnt中测试一下: +现在我们的阵列已经可以访问了,拷贝文件/etc/passwd到/mnt中测试一下: ![](https://farm6.staticflickr.com/5593/15034475219_a3476aec0a_o.png) @@ -179,7 +179,7 @@ Debian系统中,需要在/etc/default/mdadm 设置 AUTOSTART 变量为 true ### 模拟磁盘丢失故障 ### -我们将使用以下命令卸载磁盘来模拟磁盘故障。注意,在实际应用中,磁盘已经上故障状态了,不需要卸载。 +我们将使用以下命令卸载磁盘来模拟磁盘故障。注意,在实际应用中,磁盘如果已经是故障状态了,不需要卸载。 首先,卸载阵列: @@ -190,7 +190,7 @@ Debian系统中,需要在/etc/default/mdadm 设置 AUTOSTART 变量为 true # mdadm /dev/md0 --fail /dev/sdb1 #Marks /dev/sdb1 as faulty # mdadm --remove /dev/md0 /dev/sdb1 #Removes /dev/sdb1 from the array -然后,如果你有个备用盘的话,重新添加以下: +然后,如果你有个备用盘的话,重新添加一下: # mdadm /dev/md0 --add /dev/sdb1 @@ -208,7 +208,7 @@ Debian系统中,需要在/etc/default/mdadm 设置 AUTOSTART 变量为 true # mdadm /dev/md0 --add /dev/sdb1 # mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 -希望本文对你有所帮助 +希望本文对你有所帮助。 -------------------------------------------------------------------------------- @@ -216,7 +216,7 @@ via: http://xmodulo.com/2014/09/create-software-raid1-array-mdadm-linux.html 作者:[Gabriel Cánepa][a] 译者:[shipsw](https://github.com/shipsw) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 920bb55f3e8c471133ac9c4dc1f64636f3686167 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 16 Feb 2015 11:57:26 +0800 Subject: [PATCH 0036/2517] PUB:20141030 Test drive Linux with nothing but a flash drive @zpl1025 --- ...ve Linux with nothing but a flash drive.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20141030 Test drive Linux with nothing but a flash drive.md (83%) diff --git a/translated/tech/20141030 Test drive Linux with nothing but a flash drive.md b/published/20141030 Test drive Linux with nothing but a flash drive.md similarity index 83% rename from translated/tech/20141030 Test drive Linux with nothing but a flash drive.md rename to published/20141030 Test drive Linux with nothing but a flash drive.md index 9c1c8684d6..602c99eb18 100644 --- a/translated/tech/20141030 Test drive Linux with nothing but a flash drive.md +++ b/published/20141030 Test drive Linux with nothing but a flash drive.md @@ -1,7 +1,5 @@ 试试只用U盘加载Linux系统 ================================================================================ -![Penguins gathered together: Linux for the win](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png) -图片来源:Opensource.com 也许你听过Linux并对它有点好奇,终于想要实际体验一下,但可能不知道从哪儿开始。 @@ -9,25 +7,27 @@ 如果你手上正好有个U盘的话,那就可以试试做一个USB Linux启动盘。它是一个包含了整个操作系统并可以直接引导开机的U盘。创建它并不需要什么专业技术能力,让我们来看看怎么做,以及如何从USB引导进入Linux系统。 +![Penguins gathered together: Linux for the win](https://opensource.com/sites/default/files/styles/image-full-size/public/images/life/OSDC_Penguin_Image_520x292_12324207_0714_mm_v1a.png) + ### 你需要准备的 ### 除了一台台式机或笔记本电脑外,你还需要: - 一个空白的U盘-最好容量能有4GB或更多。 - 一个你想尝试的Linux发行版[ISO镜像][1](一种把所有磁盘内容打包起来的档案文件)。待会再详细介绍。 -- 一个叫[Unetbootin][2]的应用程序,它是一个开源的,跨平台的工具,用来创建USB启动盘。运行它并不需要启动Linux。在下面的教程中,我是在MacBook上运行的Unetbootiin。 +- 一个叫[Unetbootin][2]的应用程序,它是一个开源的,跨平台的工具,用来创建USB启动盘。运行它并不需要启动Linux。在下面的教程中,我是在MacBook上运行的Unetbootiin(LCTT 译注:它还有 Windows 和 Linux 版本)。 ### 开始干活 ### -把U盘插到你电脑的USB端口上,然后启动Unetbootin。然后会要求你输入电脑的登录密码。 +把U盘插到你电脑的USB端口上,然后启动Unetbootin。然后会要求你输入当前电脑的登录密码。 ![Unetbootin main window](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-main.png) -还记得之前提到的ISO镜像文件吗?有两种方式可以获得:要么自己从你想尝试的Linux发行版网站上下载,或者让Unetbootin帮你下载。还是选后者,在窗口顶部点击**选择发行版**,选择你想下载的发行版,然后点击**选择版本**来选择你希望尝试的发行版版本。 +还记得之前提到的ISO镜像文件吗?有两种方式可以获得:要么自己从你想尝试的Linux发行版网站上下载,或者让Unetbootin帮你下载。如果选后者,在窗口顶部点击**选择发行版**,选择你想下载的发行版,然后点击**选择版本**来选择你希望尝试的发行版版本。 ![Downloading a Linux distribution](http://opensource.com/sites/default/files/images/life-uploads/unetbootin-download-distro.png) -或者,你也可以自己下载发行版。通常,我想尝试的Linux发行版都没有在列表中。如果选择另一个方向,点击**磁盘镜像**,然后点击按钮来选择你下载好的.iso文件。 +或者,你也可以自己下载发行版。通常,我想尝试的Linux发行版都没有在列表中。如果选择自己下载,那么点击**磁盘镜像**,然后点击按钮来选择你下载好的.iso文件。 注意到下面的选项**预留每次重新启动后保存文件的空间(仅Ubuntu有效)**吗?如果你尝试的是Ubuntu或它的任一个衍生版(比如Lubuntu或Xubuntu),你可以在U盘上留出几M空间用来保存文件,比如网页书签或你自己创建的文档。当用这个U盘下次启动Ubuntu的时候,你可以继续使用这些文件。 @@ -39,21 +39,21 @@ ### 检验USB启动盘 ### -这个时候,你需要拥抱一下自己内在的极客精神。不会太难,不过你将需要进入[BIOS][3]去偷看一下你电脑内部空间。你的电脑的BIOS会加载各种硬件,并控制电脑操作系统的引导或启动。 +这个时候,你需要拥抱一下自己内在的极客精神。这不会太难,不过你将需要进入[BIOS][3]去偷看一下你的电脑内部空间。你的电脑的BIOS会加载各种硬件,并控制电脑操作系统的引导或启动。 -BIOS通常会按这个顺序搜索操作系统(或者类似的顺序):硬盘,然后是CD/DVD光驱,然后是外部存储设备。你需要调整这个顺序,让外部存储设备(在这里,意味着你的U盘启动盘)成为BIOS第一个搜索的设备。 +BIOS通常会按这个顺序搜索操作系统(或者类似的顺序):硬盘,然后是CD/DVD光驱,然后是外部存储设备。你需要调整这个顺序,让外部存储设备(在这里,指的是你的U盘启动盘)成为BIOS第一个搜索的设备。 -要做到这个,把U盘插到电脑上再重启电脑。在看到提示信息**Press F2 to enter setup**之后,按它要求的做。在有的电脑上,这个键可能是F10。 +要做到这一点,请把U盘插到电脑上再重启电脑。在看到提示信息**Press F2 to enter setup**之后,按它要求的做。在有的电脑上,这个键可能是F10。 在BIOS里,用键盘上的向右方向键切换到**Boot**菜单。然后你将看到你电脑上的驱动器列表。使用键盘上的向下方向键选中名字为**USB HDD**的选项,然后按下**F6**移动这个选项到列表的顶部。 -完成后,按下**F10**来保存改动。然后你会从BIOS里被踢出来,然后电脑会自己启动。等一小会,你就会看到一个你正在尝试的Linux发行版的启动菜单。选择**Run without installing**(或者最接近的选项)。 +完成后,按下**F10**来保存改动。然后你会从BIOS里被踢出来,然后电脑会自己启动。等一小会,你就会看到一个你正在尝试的Linux发行版的启动菜单。选择**Run without installing**(或者最类似的选项)。 在进入桌面后,你可以连接上无线或有线网络,看看网页,试一试预装的软件。你还可以看看,比如说,你的打印机或扫描仪是否能在你试的这个发行版下正常工作。你要是真的想不开,也可以去摸一下命令行。 ### 能干什么 ### -根据你尝试的Linux发行版和你使用的U盘的速度,操作系统可能会需要更长的时间来加载,而且很可能比直接装到硬盘上会慢一点。 +根据你尝试的Linux发行版和你使用的U盘的速度,操作系统可能会需要较长的时间来加载,而且很可能比直接装到硬盘上会慢一点。 还有,你也只能运行Linux发行版里预装好的基本软件。通常会有网页浏览器,一个文字处理软件,一个文本编辑器,一个媒体播放器,一个相片浏览器,以及一套实用工具。这些应该足够给你使用Linux的感觉了。 @@ -65,7 +65,7 @@ via: https://opensource.com/life/14/10/test-drive-linux-nothing-flash-drive 作者:[Scott Nesbitt][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3a79f4853cf05ae6ddc3ec6ea8e205f939014492 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 16 Feb 2015 14:40:17 +0800 Subject: [PATCH 0037/2517] translating --- sources/news/20150209 CrunchBang Linux Is Dead.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/news/20150209 CrunchBang Linux Is Dead.md b/sources/news/20150209 CrunchBang Linux Is Dead.md index 118baed41e..0f296e607e 100644 --- a/sources/news/20150209 CrunchBang Linux Is Dead.md +++ b/sources/news/20150209 CrunchBang Linux Is Dead.md @@ -1,4 +1,6 @@ -CrunchBang Linux Is Dead!!! +Translating----geekpi + +CrunchBang Linux 已死!!! ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Crunchbang_Linux_Dead.jpeg) @@ -29,4 +31,4 @@ via: http://itsfoss.com/crunchbang-linux-dead/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://en.wikipedia.org/wiki/Openbox [2]:http://crunchbang.org/forums/viewtopic.php?id=38916 -[3]:http://itsfoss.com/pear-os-history/ \ No newline at end of file +[3]:http://itsfoss.com/pear-os-history/ From 1a5bb9aa805c5a0e77d3bd864b703f7e68cfcf52 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 16 Feb 2015 15:05:53 +0800 Subject: [PATCH 0038/2517] translated --- .../news/20150209 CrunchBang Linux Is Dead.md | 34 ------------------- .../news/20150209 CrunchBang Linux Is Dead.md | 32 +++++++++++++++++ 2 files changed, 32 insertions(+), 34 deletions(-) delete mode 100644 sources/news/20150209 CrunchBang Linux Is Dead.md create mode 100644 translated/news/20150209 CrunchBang Linux Is Dead.md diff --git a/sources/news/20150209 CrunchBang Linux Is Dead.md b/sources/news/20150209 CrunchBang Linux Is Dead.md deleted file mode 100644 index 0f296e607e..0000000000 --- a/sources/news/20150209 CrunchBang Linux Is Dead.md +++ /dev/null @@ -1,34 +0,0 @@ -Translating----geekpi - -CrunchBang Linux 已死!!! -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Crunchbang_Linux_Dead.jpeg) - -Yes! You read it correct. The minimalist Linux distribution **CrunchBang Linux has been discontinued**. - -CrunchBang Linux, popularly known for its abbreviated symbol #!, is based on Debian and comes with [Openbox][1] window manager. The dark themed Linux was/is a popular Linux choice for many experience Linux users. - -### CrunchBang discontinued for “it no longer holds any value” ### - -[Announcing][2] that CrunchBang will no longer be developed, head of the project Philip Newborough said that when he started the project, Linux world was different place. He mentioned that there was no ‘competition’ in the same ilk at that time but with the advancement of Linux distros like Lubuntu, Crunchbang doesn’t hold the same value. - -> For anyone who has been involved with Linux for the past ten years or so, I’m sure they’ll agree that things have moved on. Whilst some things have stayed exactly the same, others have changed beyond all recognition. It’s called progress, and for the most part, progress is a good thing. That said, when progress happens, some things get left behind, and for me, CrunchBang is something that I need to leave behind. I’m leaving it behind because I honestly believe that it no longer holds any value, and whilst I could hold on to it for sentimental reasons, I don’t believe that would be in the best interest of its users, who would benefit from using vanilla Debian. - -### What after CrunchBang demise? ### - -As happened in case of [Pear OS][3], CrunchBang forums will stay online. Downloads are available for now but will be removed in near future. Philip mentioned that he was excited about some of his incoming projects and his day job. I wish him luck in his future endeavors. It is sad to see the death of a nice Linux distribution like CrunchBang. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/crunchbang-linux-dead/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://en.wikipedia.org/wiki/Openbox -[2]:http://crunchbang.org/forums/viewtopic.php?id=38916 -[3]:http://itsfoss.com/pear-os-history/ diff --git a/translated/news/20150209 CrunchBang Linux Is Dead.md b/translated/news/20150209 CrunchBang Linux Is Dead.md new file mode 100644 index 0000000000..7d6cee2613 --- /dev/null +++ b/translated/news/20150209 CrunchBang Linux Is Dead.md @@ -0,0 +1,32 @@ +CrunchBang Linux 已死!!! +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Crunchbang_Linux_Dead.jpeg) + +是的,你没看错。最小的Linux发行版**CrunchBang Linux 已经消失了**。 + +CrunchBang Linux,大家都知道它的缩写符号 #!,基于的是Debian和[Openbox][1]窗口管理器。黑色主题的Linux是每一个有经验的Linux用户的选择。 + +### CrunchBang 因为 “不再有继续下去的价值” 而消失了 ### + +[公告][2]称CrunchBang将不在继续开发,项目的领头人Philip Newborough说他在开始这个项目的时候,Linux时间是一个不同的地方。他指出那时在相同的种类在同一时间段中没有‘竞争’,但是随着Linux发行版的进步如Lubuntu,Crunchbang不再有相同的价值了。 + +> 对于任何十年前使用Linux的人而言,我确定他们同意事物在发展。虽然一些事情一直保持不变,还有一些的变化超出了认知。这称之为进步,对于大部分事物而言,进步是一件好事。也就是说当进步发生时,一些事物落后了,对于我而言,CrunchBang就是我需要抛弃的东西。我抛弃它的原因是我真实地认为它不再具有任何价值了,虽然我还可以因为一些多愁善感的原因把它留下来,但是我不认为那些使用原生Debian用户的兴趣了。 + +### CrunchBang消失之后会怎么样? ### + +就像[Pear OS][3]那样,CrunchBang论坛仍将在线。现在仍可以下载但是不久的将来就会停止。Philip提到对他即将面对的新的项目和工作感到很激动。我希望他今后工作顺利。很难过见到一个像CrunchBang这样好的Linux发行版的消失。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/crunchbang-linux-dead/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://en.wikipedia.org/wiki/Openbox +[2]:http://crunchbang.org/forums/viewtopic.php?id=38916 +[3]:http://itsfoss.com/pear-os-history/ From 614ef1e612a5361511d8681ff626c94acd128835 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 17 Feb 2015 11:15:03 +0800 Subject: [PATCH 0039/2517] translating --- ...Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md index 552f98e3f2..fd9fab4e4e 100644 --- a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md +++ b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md @@ -1,3 +1,5 @@ +Translating---geekpi + OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10 ---- *Users have been advised to upgrade as soon as possible* @@ -30,4 +32,4 @@ via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-1 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://news.softpedia.com/editors/browse/silviu-stahie \ No newline at end of file +[a]:http://news.softpedia.com/editors/browse/silviu-stahie From 237e002be578123a69ad758f125291de847e1046 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 17 Feb 2015 11:33:56 +0800 Subject: [PATCH 0040/2517] translated --- ...Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 35 ------------------- ...Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 31 ++++++++++++++++ 2 files changed, 31 insertions(+), 35 deletions(-) delete mode 100644 sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md create mode 100644 translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md diff --git a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md deleted file mode 100644 index fd9fab4e4e..0000000000 --- a/sources/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md +++ /dev/null @@ -1,35 +0,0 @@ -Translating---geekpi - -OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10 ----- -*Users have been advised to upgrade as soon as possible* - -##Canonical published details about a new OpenJDK 7 version has been pushed to the Ubuntu 14.04 LTS and Ubuntu 14.10 repositories. This update fixes a number of problems and various vulnerabilities. - -The Ubuntu maintainers have upgraded the OpenJDK packages in the repositories and numerous fixes have been implemented. This is an important update and it covers a few libraries. - -"Several vulnerabilities were discovered in the OpenJDK JRE related to information disclosure, data integrity and availability. An attacker could -exploit these to cause a denial of service or expose sensitive data over the network,” reads the security notice. - -Also, "a vulnerability was discovered in the OpenJDK JRE related to information disclosure and integrity. An attacker could exploit this to -expose sensitive data over the network." - -These are just a couple of the vulnerabilities identified and corrected by the developer and implemented by the maintainers/., and for a more detailed description of the problems, you can see Canonical's security notification. Users have been advised to upgrade their systems as soon as possible. - -The flaws can be fixed if you upgrade your system to the latest openjdk-7-related packages specific to each distribution. To apply the patch, users will have to run the Update Manager application. In general, a standard system update will make all the necessary changes. All Java-related applications will have to be restarted. - --------------------------------------------------------------------------------- - -via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtml - -本文发布时间:29 Jan 2015, 16:53 GMT - -作者:[Silviu Stahie][a] - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie diff --git a/translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md new file mode 100644 index 0000000000..1801580d00 --- /dev/null +++ b/translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md @@ -0,0 +1,31 @@ +OpenJDK 7的漏洞已经在Ubuntu 14.04 和Ubuntu 14.10中解决了 +---- +*建议用户尽快升级* + +## Canonical公布新的OpenJDK 7 的版本已经提交到Ubuntu 14.04 LTS和Ubuntu 14.10 的仓库中了。更新修复了大量的问题和漏洞。 + +Ubuntu维护者已经升级了仓库中的OpenJDK包,并且含有大量的修复。这是一个重要的更新切涵盖了少量的库。 + +安全公告中说“OpenJDK JRE中发现了一些信息泄露、数据完整性和可用性的漏洞。攻击者可以利用这些通过网络执行拒绝服务或者泄露信息。” + +同样,“OpenJDK JRE中发现了关于信息泄露和完整性的漏洞。攻击者可以利用这点通过网络泄露敏感信息。” + +这里有几个漏洞被开发者确认并修复,并有维护人员实现。关于问题的详细描述,你可以参考Canonical的安全通告。用户被建议尽快升级系统。 + +这个漏洞只要你升级到最新的openjdk 7相关的包就可以修复。要应用补丁,用户需要运行升级管理程序。通常上,一个标准系统更新就会运行必要的更新。所有java相关的程序需要重新启动。 + +-------------------------------------------------------------------------------- + +via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtml + +本文发布时间:29 Jan 2015, 16:53 GMT + +作者:[Silviu Stahie][a] + +译者:[geekpi](https://github.com/geekpi) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie From 761aec20665f70d0729f7522f90b8d41c1da9e53 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 13:08:33 +0800 Subject: [PATCH 0041/2517] =?UTF-8?q?=E9=80=89=E9=A2=98=EF=BC=88=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=96=87=E7=AB=A0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...from brute force attacks using fail2ban.md | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md diff --git a/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md b/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md new file mode 100644 index 0000000000..6397e82c7e --- /dev/null +++ b/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md @@ -0,0 +1,170 @@ +How to protect SSH server from brute force attacks using fail2ban +================ + +One common attack on SSH service is brute force attacks where a remote attacker indefinitely attempts to log in with different passwords. Of course there are arguments against password authentication for SSH, and alternative authentication mechanisms such as [public key authentication][1] or [two-factor authentication][2] exist to obsolete such attacks. Putting aside pros and cons of different authentication methods, let's consider the situation where password authentication is required. How would you protect your SSH server against brute-force attacks? + +[fail2ban][3] is a well-known open-source intrusion prevention framework on Linux that monitors various system log files (e.g., /var/log/auth.log or /var/log/secure) and automatically triggers various defensive actions upon detecting any suspicious activities. In fact, fail2ban can be quite useful to defend against brute force password guessing attacks on an SSH server. + +In this guide, I will demonstrate **how to install and configure fail2ban to protect an SSH server against brute force attacks from a remote IP address**. + +### Install Fail2ban on Linux + +To install fail2ban on CentOS or RHEL, first [set up EPEL repository][4], and then run the following command. + + $ sudo yum install fail2ban + +To install fail2ban on Fedora, simply run: + + $ sudo yum install fail2ban + +To install fail2ban on Ubuntu, Debian or Linux Mint: + + $ sudo apt-get install fail2ban + +### Configure Fail2ban for SSH Server + +Now you are ready to configure fail2ban to harden your SSH server. You need to edit the configuration file at /etc/fail2ban/jail.conf. The configuration file contains "DEFAULT" section where you define default parameters for all monitored services, and service-specific sections where you define any service-specific jails (e.g., SSH, Apache, etc) to overwrite default parameters. + +In the service-specific jail sections (somewhere after [DEFAULT] section), you need to define [ssh-iptables] section, where you define SSH-specific jail configurations. Actual IP address banning is done by iptables. + +The following is an example of /etc/fail2ban/jail.conf which contains "ssh-iptables" jail configuration. Of course there could be other application-specific jails depending on your needs. + + $ sudo vi /etc/fail2ban/jail.local + +``` +[DEFAULT] +# a space delimited list of IP addresses, CIDR prefixes, or DNS hostnames +# to bypass fail2ban protection +ignoreip = 127.0.0.1 172.31.0.0/24 10.10.0.0/24 192.168.0.0/24 + +# number of seconds during which a client host is blocked +bantime = 86400 + +# number of failures before a client host is blocked +maxretry = 5 + +# number of seconds within which "maxentry" failures result in banning +findtime = 600 + +mta = sendmail + +[ssh-iptables] +enabled = true +filter = sshd +action = iptables[name=SSH, port=ssh, protocol=tcp] +sendmail-whois[name=SSH, dest=your@email.com, sender=fail2ban@email.com] +# for Debian-based distros +logpath = /var/log/auth.log +# for Red Hat-based distros +logpath = /var/log/secure +# ssh-specific max-retry threshold +maxretry = 3 +``` + +According to the above configuration, fail2ban will automatically ban any remote IP address from which there have been at least 3 failed login attempts within the last 10 minutes. Once banned, the offending IP address will remain blocked for 24 hours. Such an event will be notified by sendemail to a recipient email address. + +Once the configuration file is ready, restart fail2ban service as follows. + +On Debian, Ubuntu or CentOS/RHEL 6: + + $ sudo service fail2ban restart + +On Fedora or CentOS/RHEL 7: + + $ sudo systemctl restart fail2ban + +To verify fail2ban is running successfully, run fail2ban-client command with "ping" argument. If fail2ban service is running okay, you should see "pong" as a response. + + $ sudo fail2ban-client ping + Server replied: pong + +### Test Protection against SSH Brute-Force Attacks with Fail2ban + +To test whether fail2ban works, try to SSH to the server using incorrect passwords to simulate a brute-force attack. In the mean time, monitor /var/log/fail2ban.log, which is logging any interesting events that are happening in fail2ban. + + $ sudo tail -f /var/log/fail2ban.log + +![](https://farm8.staticflickr.com/7550/15882084127_fccf9ca7b7_c.jpg) + +According to the log file above, fail2ban has banned an IP address 192.168.1.8, upon detecting multiple failed SSH login attempts from the IP address. + +### Check Fail2ban Status and Unban Blocked IP Addresses + +As fail2ban's "ssh-iptables" jail uses iptables to block offending IP addresses, you can easily verify the ban by checking current iptables rules as follows. + + $ sudo iptables --list -n + +``` +Chain INPUT (policy ACCEPT) +target prot opt source destination +fail2ban-SSH tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 + +Chain FORWARD (policy ACCEPT) +target prot opt source destination + +Chain OUTPUT (policy ACCEPT) +target prot opt source destination + +Chain fail2ban-SSH (1 references) +target prot opt source destination +DROP all -- 192.168.1.8 0.0.0.0/0 +RETURN all -- 0.0.0.0/0 0.0.0.0/0 +``` + +If you want to unblock the IP address from fail2ban, you can also use iptables command: + + $ sudo iptables -D fail2ban-SSH -s 192.168.1.8 -j DROP + +While you can check and manage fail2ban's IP blocklist manually with iptables command like above, a proper way is in fact to use fail2ban-client command-line tool. This tool allows you to manage not only "ssh-iptables" jail, but also any other types of fail2ban jails in a unified command-line interface. + +To check fail2ban status (which will show a list of currently active jails): + + $ sudo fail2ban-client status + +To check the status of a particular jail (e.g., ssh-iptables): + + $ sudo fail2ban-client status ssh-iptables + +The above command will show a list of banned IP addresses. + +![](https://farm8.staticflickr.com/7497/16067847655_021d23e320_b.jpg) + +To unban a particular IP address: + + $ sudo fail2ban-client set ssh-iptables unbanip 192.168.1.8 + +![](https://farm8.staticflickr.com/7465/16065915571_b215a8b344_b.jpg) + +Note that if you stop fail2ban, all blocked IP addresses will be unblocked. When you restart fail2ban, it will find a list of offending IP addresses from /var/log/secure (or /var/log/auth.log), and re-ban those IP addresses if the elapsed time of the offenses are still within ban time. + +### Set Fail2ban to Auto-start on Boot + +Once you haved tested fail2ban successfully, the last step is to enable fail2ban to launch automatically upon powering on your server. On Debian-based distributions, fail2ban auto-start is enabled by default. On Red Hat-based distributions, enable auto-start as follows. + +On CentOS/RHEL 6: + + $ sudo chkconfig fail2ban on + +On Fedora or CentOS/RHEL 7: + + $ sudo systemctl enable fail2ban + +### Summary + +In this tutorial, I demonstrated how to install and configure fail2ban to protect an SSH server. While fail2ban can mitigate brute-force password guessing attacks, please note that it cannot protect SSH servers against sophisticated distributed brute-force campaigns, where an attacker bypasses fail2ban by using many thousands of bot-controlled IP addresses. + +----------- + +via: http://linoxide.com/tools/linux-compress-decompress-tools/ + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-force-ssh-login-via-public-key-authentication.html +[2]:http://xmodulo.com/two-factor-authentication-ssh-login-linux.html +[3]:http://www.fail2ban.org/ +[4]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file From 2fc741d9e43755b8243b7fe9502ce28becf50e18 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 13:17:40 +0800 Subject: [PATCH 0042/2517] =?UTF-8?q?=E6=B8=85=E9=99=A4=E5=92=8C=E6=94=B6?= =?UTF-8?q?=E5=9B=9E=E8=BF=87=E6=9C=9F=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... as the Most Beautiful LibreOffice Ever.md | 38 ------ ...50202 The Pirate Bay Is Now Back Online.md | 38 ------ ...rth of Devuan GNU or Linux Distribution.md | 98 -------------- ... Ubuntu Edition, the First Ubuntu Phone.md | 45 ------- ...20141211 Open source all over the world.md | 3 - ... and the Integrated Open Source Company.md | 81 ----------- ...er the enterprise and other predictions.md | 2 - ...inus Tells Wired Leap Second Irrelevant.md | 29 ---- ...about diversity niceness in open source.md | 44 ------ ... Top 10 FOSS legal developments of 2014.md | 72 ---------- ...122 Top 10 open source projects of 2014.md | 126 ------------------ ...e a syslog server with rsyslog on Linux.md | 2 - ...l Repository in Ubuntu using APT-mirror.md | 1 - 13 files changed, 579 deletions(-) delete mode 100644 sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md delete mode 100644 sources/news/20150202 The Pirate Bay Is Now Back Online.md delete mode 100644 sources/news/20150205 Debian Forked over systemd--Birth of Devuan GNU or Linux Distribution.md delete mode 100644 sources/news/20150207 BQ and Canonical Officially Launch Aquaris E4.5 Ubuntu Edition, the First Ubuntu Phone.md delete mode 100644 sources/talk/20141217 Docker and the Integrated Open Source Company.md delete mode 100644 sources/talk/20150112 Linus Tells Wired Leap Second Irrelevant.md delete mode 100644 sources/talk/20150119 Linus Torvalds responds to Ars about diversity niceness in open source.md delete mode 100644 sources/talk/20150122 Top 10 FOSS legal developments of 2014.md delete mode 100644 sources/talk/20150122 Top 10 open source projects of 2014.md diff --git a/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md b/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md deleted file mode 100644 index 3718ee58a6..0000000000 --- a/sources/news/20150130 LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever.md +++ /dev/null @@ -1,38 +0,0 @@ -LibreOffice 4.4 Released as the Most Beautiful LibreOffice Ever ----- -*The developer has made a lot of UI improvements* - -![LibreOffice 4.4](http://i1-news.softpedia-static.com/images/news2/LibreOffice-4-4-Releases-As-the-Most-Beautiful-LibreOffice-Ever-471575-2.jpg) - -The Document Foundation has just announced that a new major update has been released for LibreOffice and it brings important UI improvements, enough for them to call this the most beautiful version ever. - -The Document Foundation doesn't usually make the UI the main focus of an update, but now the developers are saying that this is the most beautiful release made so far and that says a lot. Fortunately, this version is not just about interface fixes and there are plenty of other major improvements that should really provide a very good reason to get LibreOffice 4.4. - -LibreOffice has been gaining quite a lot of fans and users, and the past couple of years have been very successful. The office suite is implemented by default in most of the important Linux distributions out there and it was adopted by numerous administrations and companies across the world. LibreOffice is proving to be a difficult adversary for Microsoft's Office and each new version makes it even better. -LibreOffice 4.4 brings a lot of new features - -If we move aside all the improvements made to the interface, we're still left with a ton of fixes and changes. The Document Foundation takes its job very seriously and all upgrades really improve the users' experience tremendously. - -"LibreOffice 4.4 has got a lot of UX and design love, and in my opinion is the most beautiful ever. We have completed the dialog conversion, redesigned menu bars, context menus, toolbars, status bars and rulers to make them much more useful. The Sifr monochrome icon theme is extended and now the default on OS X. We also developed a new Color Selector, improved the Sidebar to integrate more smoothly with menus, and reworked many user interface details to follow today’s UX trends," [says Jan "Kendy" Holesovsky](1), a member of the Membership Committee and the leader of the design team. - -Some of the other improvements include much better support for OOXML file formats, the source code has been "groomed" and cleaned after a Coverity Scan analysis, digital signatures for exported PDF files, improved import filters for Microsoft Visio, Microsoft Publisher and AbiWord files, and Microsoft Works spreadsheets, and much more. - -For now, the PPA doesn't have the latest version, but that should change soon. For the time being, you can download the [LibreOffice 4.4](2) source packages from Softpedia, if you want to compile them yourself. - --------------------------------------------------------------------------------- - -via:http://news.softpedia.com/news/LibreOffice-4-4-Releases-As-the-Most-Beautiful-LibreOffice-Ever-471575.shtml - -本文发布时间:29 Jan 2015, 14:16 GMT - -作者:[Silviu Stahie][a] - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie -[1]:http://blog.documentfoundation.org/2015/01/29/libreoffice-4-4-the-most-beautiful-libreoffice-ever/ -[2]:http://linux.softpedia.com/get/Office/Office-Suites/LibreOffice-60713.shtml \ No newline at end of file diff --git a/sources/news/20150202 The Pirate Bay Is Now Back Online.md b/sources/news/20150202 The Pirate Bay Is Now Back Online.md deleted file mode 100644 index acde800ad8..0000000000 --- a/sources/news/20150202 The Pirate Bay Is Now Back Online.md +++ /dev/null @@ -1,38 +0,0 @@ -The Pirate Bay Is Now Back Online ------- -*The website was closed for about seven weeks* -![The Pirate Bay](http://i1-news.softpedia-static.com/images/news2/The-Pirate-Bay-Is-Now-Back-Online-471802-2.jpg) -##After being [raided](1) by the police almost two months ago, (in)famous torrent website The Pirate Bay is now back online. Those who thought the website will never return will be either disappointed or happy given that The Pirate Bay seems to live once again. - -In order to celebrate its coming back, The Pirate Bay admins have posted a Phoenix bird on the front page, which signifies the fact that the website can't be killed only damaged. - -About two weeks after The Pirate Bay was raided the domain miraculously came back to life. Soon after a countdown appeared on the temporary homepage of The Pirate Bay indicating that the website is almost ready for a comeback. - -The countdown hinted to February 1, as the possible date for The Pirate Bay's comeback, but it looks like those who manage the website manage to pull it out one day earlier. - -Beginning today, those who have accounts on The Pirate Bay can start downloading the torrents they want. Other than the Phoenix on the front page there are no other messages that might point to the resurrection The Pirate Bay except for the fact that it's now operational. - -Admins of the website said a few weeks ago they will find ways to manage and optimize The Pirate Bay, so that there will be minimal chances for the website to be closed once again. Let's see how it lasts this time. - -##Another version of The Pirate Bay may be launched soon - -In related news, one of the members of the original staff was dissatisfied with the decisions made by the majority regarding some of the changes made in the way admins interact with the website. - -He told [Torrentfreak](2) earlier this week that he, along with a few others, will open his version of The Pirate Bay, which they claim will be the "real" one. - ------- -via:http://news.softpedia.com/news/The-Pirate-Bay-Is-Now-Back-Online-471802.shtml - -本文发布时间:31 Jan 2015, 22:49 GMT - -作者:[Cosmin Vasile][a] - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/cosmin-vasile -[1]:http://news.softpedia.com/news/The-Pirate-Bay-Is-Down-December-9-2014-466987.shtml -[2]:http://torrentfreak.com/pirate-bay-back-online-150131/ \ No newline at end of file diff --git a/sources/news/20150205 Debian Forked over systemd--Birth of Devuan GNU or Linux Distribution.md b/sources/news/20150205 Debian Forked over systemd--Birth of Devuan GNU or Linux Distribution.md deleted file mode 100644 index 89299a55d5..0000000000 --- a/sources/news/20150205 Debian Forked over systemd--Birth of Devuan GNU or Linux Distribution.md +++ /dev/null @@ -1,98 +0,0 @@ -Debian Forked over systemd: Birth of Devuan GNU/Linux Distribution -================================================================================ -Debian GNU/Linux distribution is one of the oldest Linux distribution that is currently in working state. init used to be the default central management and configuration platform for Linux operating system before systemd emerged. Systemd from the date of its release has been very much controversial. - -Sooner or later it has replaced init on most of the Linux distribution. Debian remained no exception and Debian 8 codename JESSIE will be having systemd by default. The Debian adaptation of systemd in replacement of init caused polarization. This led to forking of Debian and hence Devuan GNU/Linux distribution born. - -Devuan project started with the primary goal to put back nit and remove controversial systemd. A lot of Linux Distribution are based on Debian or a derivative of Debian and one does not simply fork Debian. Debian will always attract developers. - -### What Devuan is all About? ### - -Devuan in Italian (pronounced Devone in English) suggests “Don’t panic and keep forking Debian”, for Init-Freedom lovers. Developers see Devuan as the beginning of a process which aims at base distribution and is able to protect the freedom of developers and community. - -![Devuan Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Devuan-Linux.jpg) - -Debian Forked over systemd: Birth of Devuan Linux - -Devuan project priority includes – interoperability, diversity and backward compatibility. It will derive its own installer and repos from Debian and modify where ever required. If everything works smooth by the mid of 2015 users can switch to Devuan from Debian 7 and start using devuan repos. - -The process of switching will fairly remain as simple as upgrading a Debian installation. The project will be as minimal as possible and completely in accordance of UNIX philosophy – “Doing one thing and doing it well”. The targeted users of Devuan will be System Admins, Developers and users having experience of Debian. - -The project started by italian developers has raised a fund of 4.5k€ (EUR) in the year 2014. They have moved distro infrastructure from GitHub to GitLab, progress on Loginkit (systemd Logind replaced), discussing Logo and other important aspects useful in long run. - -A few of the Logos are in discussion now are shown in the picture. - -![Devuan Logo Proposals](http://www.tecmint.com/wp-content/uploads/2015/02/Devuan-Logos.jpeg) - -Devuan Logo Proposals - -Have a look at them here at: [http://without-systemd.org/wiki/index.php/Category:Logo][1] - -The unrest over systemd that gave birth to Devuan is good or bad? Lets have a look. - -### Is Devuan fork a good thing? ### - -Well! difficult to answer that forking such a huge distro is really going to be of any good. A (group of) developer(s) who initially were working with Debian got unsatisfied with systemd and forked it. - -Now the actual number of developers working on Debian/Systemd decreased which is going to affect the productivity of both the projects. Now the same number of developers are working on two different projects. - -What you think would be the fate of Devuan as well as Debian project? Won’t it hinder the progress of either distro and Linux in the long run? - -Please give your [comments][2] about Devuan project. - -注:如果可以在发布文章的时候发布一个调查,就把下面这段发成一个调查,如果不行,就直接嵌入js代码 - - - -Do you think systemd for Debian is - -Good -Bad -Don't Know -Don't Care -Other: - -VoteView ResultsPolldaddy.com - - -**Do you really feel that Debian with systemd will have a bad fate as depicted below** - -![Strip SystmeD](http://www.tecmint.com/wp-content/uploads/2015/02/Strip-SystmeD.jpg) - -Strip SystmeD - -Time to wait for Devuan 1.0 and lets see what it could contain. - -### Conclusion ### - -All the major Linux Distributions Like Fedora, RedHat, openSUSE, SUSE Enterprise, Arch, Megia have already switched to Systemd, Ubuntu and Debian are in the way to replace init with systemd. Only Gentoo and Slack till date have shown no interest in systemd but who knows someday even Gentoo and slack too started moving in the same direction. - -The reputation of Debian as a Linux Distro is something very few have reached the mark. It is blessed by some hundreds of developers and millions of users. The actual question is what percentage of users and developers were not comfortable with systemd. If the percentage is really high then what led debian to switch to systemd. Had it moved against the wishes of its users and developers. If this is the case the chance of success of devuan is pretty fair. Well how many developers put long hours of code punching for the project. - -Hope the fate of this project will not be something like those distros which once was started with high degree of passion and enthusiasm and later the developers got uninterested. - -Post Script : Linus Torvalds do not mind systemd that much. - -**If you need Devuan, then join and support it now!** - -Development : [https://git.devuan.org][3] -Donations : [https://devuan.org/donate.html][4] -Discussions : [https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng][5] -Devuan Developers : onelove@devuan.org - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/debian-forked-over-systemd-birth-of-devuan-linux/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://without-systemd.org/wiki/index.php/Category:Logo -[2]:http://www.tecmint.com/debian-forked-over-systemd-birth-of-devuan-linux/#comments -[3]:https://git.devuan.org/ -[4]:https://devuan.org/donate.html -[5]:https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng \ No newline at end of file diff --git a/sources/news/20150207 BQ and Canonical Officially Launch Aquaris E4.5 Ubuntu Edition, the First Ubuntu Phone.md b/sources/news/20150207 BQ and Canonical Officially Launch Aquaris E4.5 Ubuntu Edition, the First Ubuntu Phone.md deleted file mode 100644 index 02b147abd9..0000000000 --- a/sources/news/20150207 BQ and Canonical Officially Launch Aquaris E4.5 Ubuntu Edition, the First Ubuntu Phone.md +++ /dev/null @@ -1,45 +0,0 @@ -BQ and Canonical Officially Launch Aquaris E4.5 Ubuntu Edition, the First Ubuntu Phone ------- -*Everything you need to know about Aquaris E4.5* - -##BQ and Canonical have officially announced the new Aquaris E4.5 Ubuntu Edition and the fact that the phone will be available in the coming weeks through a series of flash sales. - -Information about the imminent launch of BQ Ubuntu phone has been around for some time and now it the two companies seem to have decided to make it official. This is the first device powered by Ubuntu Touch and a lot of people will be paying very close attention to what is happening in the mobile world. - -Ubuntu Touch is the latest operating system from Canonical and it's a brand new experience that aims to be very different from what users can find right now on the market, and that includes systems like Jola or Firefox OS. The OS has been in the works for more than two years and it's a system designed to work on all kind of devices, across the hardware spectrum. - -##Who is BQ and why has Canonical chosen them? - -When Mark Shuttleworth announced the two partners for the launch of Ubuntu Touch, BQ and Meizu, most of the people watching asked the same question. Who? BQ is not a very big company, but it's a young company and it has already started to penetrate the European market with some interesting devices. In many ways, they are doing the same thing companies like Meizu or Xiaomi are trying and succeeded in China: to offer devices that are interesting and different from what everyone else is doing. - -Many Ubuntu fans have questioned Canonical’s decision of choosing small companies and not big ones, but they are trying to do the same thing as the just-mentioned hardware makers. They want to offer an operating system radically different from what everyone else is doing. It's easy to understand why the goals of Canonical and BQ are actually one and the same. - -##What is Ubuntu Touch? - -The new operating system developed by Canonical embraces the fact that people are now swiping a lot more than they are tapping. Smartphones are no longer something new and everyone can understand how to swipe and get things done on a phone. Ubuntu devs have taken this to a whole new level. The operating system has no buttons, with the exception of the regular power and volume buttons. Everything is done with swiped gestures, from all sides of the screen. - -Also, Ubuntu Touch brings a new concept to the market, that of scopes. There is no longer a home screen, just scopes defined by the user to expand the experience. For example, you can have a Music scope that aggregates all your music sources on a single screen. It's a different way of looking at your smartphone, but this is built for people who crave a new experience. Don't worry, regular apps still exist, but they are differently integrated. - -![Aquaris E4.5 Ubuntu Edition start screen](http://i1-news.softpedia-static.com/images/news2/BQ-and-Canonical-Officially-Launch-Aquaris-E4-5-Ubuntu-Edition-472397-5.jpg) - -"As any kind of content can be presented via Scopes - they provide developers an easy path for their creations to be integral to the device experience. It is simple to create new Scopes via an easy to use UI toolkit with much lower development and maintenance costs than traditional apps. Canonical and BQ have worked with a host of partners to ensure that there is a wealth of interesting, relevant and dynamic content available at launch, with more content partners to follow," said Cristian Parrino, VP Mobile at Canonical. - -##BQ’s Aquaris E4.5 Ubuntu Edition hardware specs - -First of all, it's important to know that Aquaris E4.5 Ubuntu Edition is a dual-sim phone and it comes unlocked so that everyone can use it with their network. It boasts a MediaTek Quad-Core Cortex A7 processor running at up to 1.3 GHz, a 4.5-inch screen, 1GB RAM, rear camera with high-quality BSI sensors, Largan lens, and autofocus with dual flash(8MP), and front camera with 5MP. - -It's also worth mentioning that several operators in Europe, including 3 Sweden, amena.com, giffgaff, and Portugal Telecom have decided to provide SIM bundles at purchase. The price is €169.90 ($191). - -So, are you ready to buy the Aquaris E4.5 Ubuntu Edition? - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/BQ-and-Canonical-Officially-Launch-Aquaris-E4-5-Ubuntu-Edition-472397.shtml - -作者:[Silviu Stahie][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie \ No newline at end of file diff --git a/sources/talk/20141211 Open source all over the world.md b/sources/talk/20141211 Open source all over the world.md index 175d870cb7..bd306edd5a 100644 --- a/sources/talk/20141211 Open source all over the world.md +++ b/sources/talk/20141211 Open source all over the world.md @@ -1,6 +1,3 @@ -////translating by yupmoon - - Open source all over the world ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUS_OpenSourceExperience_520x292_cm.png) diff --git a/sources/talk/20141217 Docker and the Integrated Open Source Company.md b/sources/talk/20141217 Docker and the Integrated Open Source Company.md deleted file mode 100644 index 5a98324135..0000000000 --- a/sources/talk/20141217 Docker and the Integrated Open Source Company.md +++ /dev/null @@ -1,81 +0,0 @@ -Docker and the Integrated Open Source Company -================================================================================ -It’s been a long time since an open source project has gotten as much buzz and attention as Docker. The easiest way to explain the concept is, well, to look at the logo of the eponymous1 company that created and manages the project: - -![](http://2yj23r14cytosbxol4cavq337g.wpengine.netdna-cdn.com/wp-content/uploads/2014/12/docker.png) - -The reference in the logo is to shipping containers, one of the most important inventions of the 20th century. Actually, the word “invention” is not quite right: the idea of putting bulk goods into consistently-sized boxes goes back at least a few hundred years.[2][1] What changed the world was the standardization of containers by a trucking magnate named Malcom McLean and Keith Tantlinger, his head engineer. Tantlinger developed much of the technology undergirding the intermodal container, especially its corner casting and Twistlock mechanism that allowed the containers to be stacked on ships, transported by trucks, and moved by crane. More importantly, Tantlinger convinced McLean to release the patented design for anyone to copy without license, knowing that the technology would only be valuable if it were deployed in every port and on every transport ship in the world. Tantlinger, to put it in software terms, open-sourced the design. - -Shipping containers really are a perfect metaphor for what Docker is building: standardized containers for applications. - - -- Just as the idea of a container wasn’t invented by Tantlinger, Docker is building on a concept that has been around for quite a while. Companies like Oracle, HP, and IBM have used containers for many years, and Google especially has a very similar implementation to Docker that they use for internal projects. Docker, though, by being open source and [community-centric][2], offers the promise of standardization -- It doesn’t matter what is inside of a shipping container; the container itself will fit on any ship, truck, or crane in the world. Similarly, it doesn’t matter what app (and associated files, frameworks, dependencies, etc.) is inside of a docker container; the container will run on any Linux distribution and, more importantly, just about every cloud provider including AWS, Azure, Google Cloud Platform, Rackspace, etc. -- When you move abroad, you can literally have a container brought to your house, stick in your belongings, and then have the entire thing moved to a truck to a crane to a ship to your new country. Similarly, containers allow developers to build and test an application on their local machine and have confidence that the application will behave the exact same way when it is pushed out to a server. Because everything is self-contained, the developer does not need to worry about there being different frameworks, versions, and other dependencies in the various places the application might be run - -The implications of this are far-reaching: not only do containers make it easier to manage the lifecycle of an application, they also (theoretically) commoditize cloud services through the age-old hope of “write once run anywhere.” More importantly, at least for now, docker containers offer the potential of being far more efficient than virtual machines. Relative to a container, using virtual machines is like using a car transport ship to move cargo: each unique entity on the ship is self-powered, which means a lot of wasted resources (those car engines aren’t very useful while crossing the ocean). Similarly, each virtual machine has to deal with the overhead of its own OS; containers, on the other hand, all share the same OS resulting in huge efficiency gains.[3][4] - -In short, Docker is a really big deal from a technical perspective. What excites me, though, is that the company is also innovating when it comes to their business model. - ----------- - -The problem with monetizing open source is self-evident: if the software is freely available, what exactly is worth paying for? And, unlike media, you can’t exactly stick an advertisement next to some code! - -For many years the default answer has been to “be like Red Hat.” Red Hat is the creator and maintainer of the Red Hat Enterprise Linux (RHEL) distribution, which, like all Linux distributions, is freely available.[4][5] Red Hat, however, makes money by offering support, training, a certification program, etc. for enterprises looking to use their software. It is very much a traditional enterprise model – make money on support! – just minus the up-front license fees. - -This sort of business is certainly still viable; Hortonworks is [set to IPO][3] with a similar model based on Hadoop, albeit at a much lower valuation than it received during its last VC round. That doesn’t surprise me: I don’t think this is a particularly great model from a business perspective. - -To understand why it’s useful to think about there being three distinct parts of any company that is based on open source: the open source project itself, any value-added software built on top of that project, and the actual means of making money: - -![](http://2yj23r14cytosbxol4cavq337g.wpengine.netdna-cdn.com/wp-content/uploads/2014/12/opensourcepaper.jpg) - -*There are three parts of an open source business: the project itself, the value-added software on top of that project, and the means of monetization* - -The problem with the “Red Hat” model is the complete separation of all three of these parts: Red Hat doesn’t control the core project (Linux), and their value-added software (RHEL) is free, leaving their money-making support program to stand alone. To the company’s credit they have pulled this model off, but I think a big reason is because utilizing Linux was so much more of a challenge back in the 90s.[5][11] I highly doubt Red Hat could successfully build a similar business from scratch today. - -![](http://2yj23r14cytosbxol4cavq337g.wpengine.netdna-cdn.com/wp-content/uploads/2014/12/redhatpaper.jpg) - -*The three parts of Red Hat’s business are separate and more difficult for the company to control and monetize* - -GitHub, the repository hosting service, is exploring what is to my mind a more compelling model. GitHub’s value-added software is a hosting service based on Git, an open-source project designed by Linux creator Linus Torvalds. Crucially, GitHub is seeking to monetize that hosting service directly, both through a SaaS model and through an on-premise enterprise offering[6][6]. This means that, in comparison to Red Hat, there is one less place to disintermediate GitHub: you can’t get their value-added software (for private projects – public is free) unless you’re willing to pay. - -![](http://2yj23r14cytosbxol4cavq337g.wpengine.netdna-cdn.com/wp-content/uploads/2014/12/githubpaper.jpg) - -*While GitHub does not control Git, their value-added software and means of monetization are unified, making the latter much easier and more sustainable* - -Docker takes the GitHub model a step further: the company controls everything from the open source project itself to the value-added software (DockerHub) built on top of that, and, just last week, [announced a monetization model][7] that is very similar to GitHub’s enterprise offering. Presuming Docker continues its present momentum and finds success with this enterprise offering, they have the potential to be a fully integrated open source software company: project, value-added software, and monetization all rolled into one. - -![](http://2yj23r14cytosbxol4cavq337g.wpengine.netdna-cdn.com/wp-content/uploads/2014/12/dockerpaper.jpg) - -*Docker controls all the parts of their business: they are a fully integrated open source company.* - -This is exciting, and, to be honest, a little scary. What is exciting is that very few movements have had such a profound effect as open source software, and not just on the tech industry. Open source products are responsible for end user products like this blog; more importantly, open source technologies have enabled exponentially more startups to get off the ground with minimal investment, vastly accelerating the rate of innovation and iteration in tech.[7][8] The ongoing challenge for any open source project, though, is funding, and Docker’s business model is a potentially sustainable solution not just for Docker but for future open source technologies. - -That said, if Docker is successful, over the long run commercial incentives will steer the Docker open source project in a way that benefits Docker the company, which may not be what is best for the community broadly. That is what is scary about this: might open source in the long run be subtly corrupted by this business model? The makers of CoreOS, a stripped-down Linux distribution that is a perfect complement for Docker, [argued that was the case][9] last week: - -> We thought Docker would become a simple unit that we can all agree on. Unfortunately, a simple re-usable component is not how things are playing out. Docker now is building tools for launching cloud servers, systems for clustering, and a wide range of functions: building images, running images, uploading, downloading, and eventually even overlay networking, all compiled into one monolithic binary running primarily as root on your server. The standard container manifesto was removed. We should stop talking about Docker containers, and start talking about the Docker Platform. It is not becoming the simple composable building block we had envisioned. - -This, I suppose, is the beauty of open source: if you disagree, fork, which is essentially what CoreOS did, launching their own “Rocket” container.[8][10] It also shows that Docker’s business model – and any business model that contains open source – will never be completely defensible: there will always be a disintermediation point. I suspect, though, that Rocket will fail and Docker’s momentum will continue: the logic of there being one true container is inexorable, and Docker has already built up quite a bit of infrastructure and – just maybe – a business model to make it sustainable. - --------------------------------------------------------------------------------- - -via: http://stratechery.com/2014/docker-integrated-open-source-company/ - -作者:[Ben Thompson][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://stratechery.com/category/about/ -[1]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:1:1300 -[2]:https://github.com/docker/docker -[3]:http://blogs.wsj.com/digits/2014/12/01/ipo-bound-hortonworks-drops-out-of-billion-dollar-startup-club/ -[4]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:2:1300 -[5]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:3:1300 -[6]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:5:1300 -[7]:http://blog.docker.com/2014/12/docker-announces-docker-hub-enterprise/ -[8]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:6:1300 -[9]:https://coreos.com/blog/rocket/ -[10]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:7:1300 -[11]:http://stratechery.com/2014/docker-integrated-open-source-company/#fn:4:1300 \ No newline at end of file diff --git a/sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md b/sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md index 4718480b82..0d2b26cc98 100644 --- a/sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md +++ b/sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md @@ -1,5 +1,3 @@ -translating by barney-ro - 2015 will be the year Linux takes over the enterprise (and other predictions) ================================================================================ > Jack Wallen removes his rose-colored glasses and peers into the crystal ball to predict what 2015 has in store for Linux. diff --git a/sources/talk/20150112 Linus Tells Wired Leap Second Irrelevant.md b/sources/talk/20150112 Linus Tells Wired Leap Second Irrelevant.md deleted file mode 100644 index ee1516c474..0000000000 --- a/sources/talk/20150112 Linus Tells Wired Leap Second Irrelevant.md +++ /dev/null @@ -1,29 +0,0 @@ -Linus Tells Wired Leap Second Irrelevant -================================================================================ -![](https://farm4.staticflickr.com/3852/14863156322_a354770b14_o.jpg) - -Two larger publications today featured Linux and the effect of the upcoming leap second. The Register today said that the leap second effects of the past are no longer an issue. Coincidentally, Wired talked to Linus Torvalds about the same issue today as well. - -**Linus Torvalds** spoke with Wired's Robert McMillan about the approaching leap second due to be added in June. The Register said the last leap second in 2012 took out Mozilla, StumbleUpon, Yelp, FourSquare, Reddit and LinkedIn as well as several major airlines and travel reservation services that ran Linux. Torvalds told Wired today that the kernel is patched and he doesn't expect too many issues this time around. [He said][1], "Just take the leap second as an excuse to have a small nonsensical party for your closest friends. Wear silly hats, get a banner printed, and get silly drunk. That’s exactly how relevant it should be to most people." - -**However**, The Register said not everyone agrees with Torvalds' sentiments. They quote Daily Mail saying, "The year 2015 will have an extra second — which could wreak havoc on the infrastructure powering the Internet," then remind us of the Y2K scare that ended up being a non-event. The Register's Gavin [Clarke concluded][2]: - -> No reason the Penguins were caught sans pants. - -> Now they've gone belt and braces. - -The take-away is: move along, nothing to see here. - --------------------------------------------------------------------------------- - -via: http://ostatic.com/blog/linus-tells-wired-leap-second-irrelevant - -作者:[Susan Linton][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ostatic.com/member/susan-linton -[1]:http://www.wired.com/2015/01/torvalds_leapsecond/ -[2]:http://www.theregister.co.uk/2015/01/09/leap_second_bug_linux_hysteria/ \ No newline at end of file diff --git a/sources/talk/20150119 Linus Torvalds responds to Ars about diversity niceness in open source.md b/sources/talk/20150119 Linus Torvalds responds to Ars about diversity niceness in open source.md deleted file mode 100644 index b98e27eacf..0000000000 --- a/sources/talk/20150119 Linus Torvalds responds to Ars about diversity niceness in open source.md +++ /dev/null @@ -1,44 +0,0 @@ -Linus Torvalds responds to Ars about diversity, niceness in open source -================================================================================ -> Acknowledges diversity factors, says "we're different in so many other ways." - -![See, sometimes Linus isn't flicking people off.](http://cdn.arstechnica.net/wp-content/uploads/2013/09/linus-torvalds.jpg) -See, sometimes Linus isn't flicking people off. - -Athanasios Kasampalis - -On Thursday, Linux legend Linus Torvalds sent a lengthy statement to Ars Technica responding to [statements he made in Auckland, New Zealand earlier that day about diversity and "niceness"][2] in the open source sector. - -"What I wanted to say [at the keynote]—and clearly must have done very badly—is that one of the great things about open source is exactly the fact that different people are so different," Torvalds wrote via e-mail. "I think people sometimes look at it as being just 'programmers,' which is not true. It's about all the people who are more oriented toward commercial things, too. It's about all those people who are interested in legal issues—and the social ones, too!" - -Torvalds spoke to what he thought was a larger concept of "diversity" than what has been mentioned a lot in recent stories on the topic, including economic disparity, language, and culture (even between neighboring European countries). "There's a lot of talk about gender and sexual preferences and race, but we're different in so many other ways, too," he wrote. - -"'Open source' as a term and as a movement hasn't been about 'you have to be a believer,'" Torvalds added. "It's not a religion. It's not an 'us vs them' thing. We've been able to work with all those 'evil commercial interests' and companies who also do proprietary software. And I think that was one of the things that the Linux community (and others—don't get me wrong, it's not unique to us) did and does well." - -Torvalds also talked about progress since the GPL vs. BSD "flame wars" from the '80s and early '90s, saying that the open source movement brought more technology and less "ideology" to the sector. "Which is not to say that a lot of people aren't around because they believe it's the 'ethical' thing to do (I do myself too)," Torvalds added, "but you don't have to believe that, and you can just do it because it's the most fun, or the most efficient way to do technology development." - -### “This ‘you have to be nice’ seems very popular in the US” ### - -He then sent a second e-mail to Ars about the topic of "niceness" that came up during the keynote. He said that his return to his Auckland hotel was delayed by "like three hours" because of hallway conversations about this very topic. - -"I don't know where you happen to be based, but this 'you have to be nice' seems to be very popular in the US," Torvalds continued, calling the concept an "ideology." - -"The same way we have developers and marketing people and legal people who speak different languages, I think we can have some developers who are used to—and prefer—a more confrontational style, and still **also** have people who don't," he wrote. - -He lambasted the "brainstorming" model of having a criticism-free bubble to bounce ideas off of. "Maybe it works for some people, but I happen to simply not believe in it," he said. "I'd rather be really confrontational, and bad ideas should be [taken] down aggressively. Even good ideas need to be vigorously defended." - -"Maybe it's just because I like arguing," Torvalds added. "I'm just not a huge believer in politeness and sensitivity being preferable over bluntly letting people know your feelings. But I also understand that other people are driven away by cursing and crass language when it all gets a bit too carried away." To that point, Torvalds said that the open source movement might simply need more "people who are good at mediating," as opposed to asking developers to calm their own tone or attitude. - --------------------------------------------------------------------------------- - -via: http://arstechnica.com/business/2015/01/linus-torvalds-responds-to-ars-about-diversity-niceness-in-open-source/ - -作者:[Sam Machkovech][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://arstechnica.com/author/samred/ -[1]:https://secure.flickr.com/photos/12693492@N04/1338136415/in/photolist-33fikv-3jXFce-3ALpLy-4m6Shj-4pADUg-4pHwcW-4rNTR7-4GMhKc-4HM2qp-4JSHKa-4PomQo-4SKxMo-58LBYf-5iVNX6-5tXbB8-5xi67A-5A8rRc-5C8fAT-5Ccxjw-5EcYvx-5UoNTc-5UoVJK-5Uti6q-5UuiX2-5UuE2B-5UyEJu-5UyHMf-5UyJ2G-5UFbXP-5UFg8Z-5UFhwV-5UKDkG-5UKDP9-5UTHGv-5XM2s2-5YFmLu-65N31L-6pSwh7-6trmfx-6H2uZP-6JVV4V-71qkot-71BBbk-72vuYo-73j9yB-79aQ2a-79bfqe-79EKPH-79EXvD-79PuG5-7a4BxF -[2]:http://arstechnica.com/business/2015/01/linus-torvalds-on-why-he-isnt-nice-i-dont-care-about-you/ \ No newline at end of file diff --git a/sources/talk/20150122 Top 10 FOSS legal developments of 2014.md b/sources/talk/20150122 Top 10 FOSS legal developments of 2014.md deleted file mode 100644 index a97e4910c6..0000000000 --- a/sources/talk/20150122 Top 10 FOSS legal developments of 2014.md +++ /dev/null @@ -1,72 +0,0 @@ -Top 10 FOSS legal developments of 2014 -================================================================================ -![](http://opensource.com/sites/default/files/styles/image-full-size/public/images/law/LAW_PatentSpotlight_520x292_cm.png.png?itok=N-O9b4FW) - -Image by : opensource.com - -The year 2014 continued the trend of the increasing importance of legal issues for the FOSS community. Continuing [the tradition of looking back][1] over the top ten legal developments in FOSS, my selection of the top ten issues for 2014 is as follows: - -### 1. Courts interpret General Public License version 2 (GPLv2) ### - -The GPLv2 continues to be the most widely used and most important license for free and open source software. Black Duck Software estimates that 16 billion lines of code are licensed under the GPLv2. Despite its importance, the GPLv2 has been the subject of very few court decisions, and virtually all of the most important terms of the GPLv2 have not been interpreted by courts. This lack of court decisions is about to change due to the five interrelated cases arising from an attempt by Versata Software, Inc. (Versata) to terminate its software license to Ameriprise Financial, Inc. Versata’s product included software licensed by Ximpleware, Inc. (Ximpleware) under the GPLv2, but Versata had not complied with the terms of the GPLv2. Ximpleware sued Versata and eight of its customers for both copyright and patent infringement. (For a more detailed description of the facts [read this article][2].) This dispute is important because Ximpleware is the first commercial enforcer of the GPLv2 in which the courts are likely to issue decisions and Ximpleware is seeking monetary damages rather than compliance. - -### 2. GPL guides ### - -Two of the most important organizations enforcing the GPL family of licenses recently provided [guidance on compliance][3]: On October 31, the Software Freedom Law Center published the second version of their Practical Guide to GPL Compliance. Several days later, the Software Conservancy and the Free Software Foundation published the first version of their guide, the Copyleft, and the GNU General Public License: [A Comprehensive Tutorial and Guide][4]. These guides are required reading for anyone managing FOSS. - -### 3. EU Commission (EC) to revise FOSS policy ### - -Governments are one of the most important users of software but have had a mixed record in using and contributing to FOSS (free and open source software). The EC recently announced that it intends to remove the barriers that may hinder code contributions to FOSS projects. In particular, the EC wants to clarify legal aspects, including intellectual property rights, copyright, and which author or authors to name when submitting code to the upstream repositories. Pierre Damas, Head of Sector at the Directorate General for IT, [hopes that such clarification][5] will motivate many of the EC’s software developers and functionaries to promote the use of FOSS at the EC. - -### 4. Validation of FOSS business model by Hortonworks IPO ### - -Hortonworks provides services and support for the Hadoop data analysis software managed by the Apache Software Foundation. Hortonworks is one of three venture backed companies based on the Hadoop software. Hortonworks went public this fall and immediately rose 65% in share price, valuing the company at over $1 billion. The market for Hadoop products, software, and services is projected to reach $50.2 billion in 2020, up from $1.5 billion in 2012. - -### 5. Core Infrastructure Initiative ### - -The Linux Foundation put together [a consortium of companies][6] to support the many smaller open source projects that are critical to software ecosystem, such as OpenSSL. This effort was a response to the Heartbleed problem with OpenSSL in 2013, which I described in last year’s summary. This consortium is a great example of the ability of the FOSS community to come together to solve community problems. - -### 6. Linux SCO case terminated again ### - -The lawsuit by Santa Cruz Operations, Inc. (SCO) against IBM claiming that Linux includes Unix code was once a potentially major challenge to FOSS. Despite losing its suit against Novell, the bankruptcy court allowed SCO to continue its suit against IBM. I thought this case [had been concluded in 2008][7], but Judge Nuffer appears to have put the case to rest on December 15, 2014. He dismissed the case against IBM based on the decisions in the Novell case (although SCO could still appeal once again): - -*It is further ORDERED that, with respect to all remaining claims and counterclaims, SCO is bound by, and may not here re-litigate, the rulings in the Novell Judgment that Novell (not SCO) owns the copyrights to the pre-1996 UNIX source code, and that Novell waived SCO’s contract claims against IBM for alleged breaches of the licensing agreements pursuant to which IBM licensed such source code.* - -### 7. FOSS trademark issues ### - -The use of trademarks in FOSS projects continues to raise issues. This year brought the settlement of the dispute over the “Python” mark between the Python Software Foundation and Veber, a small hosting company in the UK. Veber had decided to use "Python" in branding certain of its products and services. In addition, the OpenStack Foundation is working through the application of trademarks to the OpenStack project through its [DefCore committee][8]. - -### 8. Use of FOSS by commercial companies expands ### - -We have discussed in the past how many large companies are using FOSS as an explicit strategy to build their software. Jim Zemlin, Executive Director of the Linux Foundation, has described this strategic use of FOSS as external “research and development.” His conclusions are supported by Gartner who noted that “the top tech companies are still spending tens of billions of dollars on software research and development, the smart ones are leveraging open source for 80 percent of the code and spending their money on the remaining 20 percent, which represents their program’s ‘special sauce.’” The scope of this trend was emphasized by Microsoft’s announcement that it was “open sourcing” the .NET software framework (this software is used by millions of developers to build and operate websites and other large online applications). - -### 9. Rockstar Consortium threat evaporates ### - -The Rockstar Consortium was formed by Microsoft, Blackberry, Ericsson, Sony, and Apple to exploit the 6,000 patents from Nortel Networks. The Rockstar Consortium sued Google for infringement of the Android operating system. This litigation was aimed at fundamental functions of the Android operating system and could have had a significant effect on the Android ecosystem. The Rockstar Consortium settled its litigation with Google this year, but then sold 4,000 of its patents to RPX, the patent defense firm (financed by a number of companies as well as RPX). The remaining patents were distributed to the members of the Rockstar Consortium. - -### 10. Android litigation ### - -The litigation surrounding Android continued this year, with significant developments in the patent litigation between Apple Computer, Inc. (Apple) and Samsung Electronics, Inc. (Samsung) and the copyright litigation over the Java APIs between Oracle Corporation (Oracle) and Google, Inc. (Google). Apple and Samsung have agreed to end patent disputes in nine countries, but they will continue the litigation in the US. As I stated last year, the Rockstar Consortium was a wild card in this dispute. However, the Rockstar Consortium settled its litigation with Google this year and sold off its patents, so it will no longer be a risk to the Android ecosystem. - -The copyright litigation regarding the copyrightability of the Java APIs was brought back to life by the Court of Appeals for the Federal Circuit (CAFC) decision which overturned [the District Court decision][9]. The District Court had found that Google was not liable for copyright infringement for its admitted copying of the Java APIs: the court found that the Java APIs were either not copyrightable or their use by Google was protected by various defenses to copyright. The CAFC overturned both the decision and the analysis and remanded the case to the District Court for a review of the fair use defense raised by Google. Subsequently, Google filed an appeal to the Supreme Court. The impact of a finding that Google was liable for copyright infringement in this case would have a dramatic effect on Android and, depending on the reasoning, would have a ripple effect across the interpretation of the scope of the “copyleft” terms of the GPL family of licenses which use APIs. - --------------------------------------------------------------------------------- - -via: http://opensource.com/law/15/1/top-foss-legal-developments-2014 - -作者:[Mark Radcliffe][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://opensource.com/users/mradcliffe -[1]:http://lawandlifesiliconvalley.com/blog/?p=853 -[2]:http://opensource.com/law/14/12/gplv2-court-decisions-versata -[3]:http://www.softwarefreedom.org/resources/ -[4]:http://www.copyleft.org/guide/ -[5]:https://joinup.ec.europa.eu/community/osor/news/european-commission-update-its-open-source-policy -[6]:http://www.linuxfoundation.org/programs/core-infrastructure-initiative -[7]:http://lawandlifesiliconvalley.com/blog/?m=200812 -[8]:https://wiki.openstack.org/wiki/Governance/CoreDefinition -[9]:http://law.justia.com/cases/federal/appellate-courts/cafc/13-1021/13-1021-2014-05-09.html \ No newline at end of file diff --git a/sources/talk/20150122 Top 10 open source projects of 2014.md b/sources/talk/20150122 Top 10 open source projects of 2014.md deleted file mode 100644 index edc81938d6..0000000000 --- a/sources/talk/20150122 Top 10 open source projects of 2014.md +++ /dev/null @@ -1,126 +0,0 @@ -Top 10 open source projects of 2014 -================================================================================ -![](http://opensource.com/sites/default/files/styles/image-full-size/public/images/life/top10_projects_lead.jpg?itok=tMZo2sYi) - -Image credits : [CC0 Public Domain][1], modifications by Jen Wike Huger - -Every year we collect the best of the best open source projects covered on Opensource.com. [Last year's list of 10 projects][2] guided people working and interested in tech throughout 2014. Now, we're setting you up for 2015 with a brand new list of accomplished open source projects. - -Some faces are new. Some have been around and just keep rocking it. Let's dive in! - -## Top 10 open source projects in 2014 ## - -### Docker ### - -[application container platform][3] - -"In the same way that power management and virtualisation has allowed us to get maximum engineering benefit from our server utilisation, the problem of how to really solve first world problems in virtualisation has remained prevalent. Docker's open sourcing in 2013 can really align itself with these pivotal moments in the evolution of open source—providing the extensible building blocks allowing us as engineers and architects to extend distributed platforms like never before." —Richard Morrell, [Senior software engineer Petazzoni on the breathtaking growth of Docker][4]. - -**Interview**: VP of Services for Docker talks to Jodi Biddle in [Why is Docker the new craze in virtualization and cloud computing?][5] "I think it's the lightweight nature of Docker combined with the workflow. It's fast, easy to use and a developer-centric DevOps-ish tool. Its mission is basically: make it easy to package and ship code." —James Turnbull. - -### Kubernetes ### - -[orchestration system for containers][6] - -"One of the projects you're starting to hear a lot about in the orchestration space is [Kubernetes][7], which came out of Google's internal container work. It aims to provide features such as high availability and replication, service discovery, and service aggregation." —Gordon Haff, [Open source accelerating the pace of software][8]. - -### Taiga ### - -[project management platform][9] - -"It’s almost always the case that the project management tool doesn’t reflect the actual project scenario. One solution to this is using a tool that is intuitive and fits alongside the developer's normal workflow. Additionally, a tool that is quick to update and attracts users to use it. [Taiga][10] is an open source project management tool that aims to solve the basic problem of software usability." —Nitish Tiwari, [Taiga, a new open source project management tool with focus on usability][11]. - -### Apache Mesos ### - -[cluster manager][12] - -"[Apache Mesos][13] is a cluster manager that provides efficient resource isolation and sharing across distributed applications or frameworks. It sits between the application layer and the operating system and makes it easier to deploy and manage applications in large-scale clustered environments more efficiently. It can run many applications on a dynamically shared pool of nodes. Prominent users of Mesos include Twitter, Airbnb, MediaCrossing, Xogito and Categorize. —Sachin P Bappalige, [Open source datacenter computing with Apache Mesos][14]. - -Interview: Head of Open Source at Twitter talks to Jason Hibbets in [Scale like Twitter with Apache Mesos][15]. "As of today, Twitter has over 270 million active users which produces 500+ million tweets a day, up to 150k+ tweets per second, and more than 100TB+ of compressed data per day. Architecturally, Twitter is mostly composed of services, mostly written in the open source project [Finagle][16], representing the core nouns of the platform such as the user service, timeline service, and so on. Mesos allows theses services to scale to tens of thousands of bare-metal machines and leverage a shared pool of servers across data centers." —Chris Aniszczyk - -### OpenStack ### - -[cloud computing platform][17] - -"As OpenStack continues to mature and slowly make its way into production environments, the focus on the user is continuing to grow. And so, to better meet the needs of users, the community is working hard to get users to meet the next step of engagement by highlighting those users who are change agents both in their organization and within the OpenStack community at large: the superusers." —Jason Baker, [What is an OpenStack superuser][18]? - -**Interview**: Infrastructure manager at CERN talks to Jason Hibbets in [How OpenStack powers the research at CERN][19]. "At CERN, the European Organization for Nuclear Research physicists and engineers are probing the fundamental structure of the universe. In order to do this, we use some of the world's largest and most complex scientific instruments such as the Large Hadron Collider, a 27 KM ring 100m underground on the border between France and Switzerland. OpenStack provides the infrastructure cloud which is used to provide much of the compute resources for this processing." —Tim Bell. - -### Ansible ### - -[IT automation tool][20] - -"A lot of what I want to do is enable people to not only have more free time for beer, but to have more free time for their own projects, their own ideas, and to do new an interesting things." —[Michael DeHaan, Making your IT infrastructure boring with Ansible][21]. - -**Interview**: CTO of Ansible talks to Jen Krieger in [Behind the scenes with CTO Michael DeHaan of Ansible][22]. "I like to quote Star Trek 2 a lot. We definitely optimize for 'the needs of the many'. I know Spock dies after he says that, but he does get to come back." —Michael DeHaan - -### ownCloud ### - -[cloud storage tool][23] - -"I was looking for an easy way how to have all my online storage services, such as Google Drive and Dropbox, integrated with my Linux desktop without using some nasty hack, and I finally have a solution that works. I'm here to share it with you. This is not rocket science really, all I did was a little bit of documentation reading, and a couple of clicks." —Jiri Folta, [Using ownCloud to integrate Dropbox, Google Drive, and more in Gnome][24]. - -**Listed**: Top 5 open source alternatives: "ownCloud does most everything that the proprietary names do and it keeps control of your information in your hands." —Scott Nesbitt, [Five open source alternatives to popular web apps][25]. - -### Apache Hadoop ### - -[framework for big data][26] - -"Apache Hadoop is an open source software framework for storage and large scale processing of data-sets on clusters of commodity hardware. Hadoop is an Apache top-level project being built and used by a global community of contributors and users. It is licensed under the Apache License 2.0." —Sachin P Bappalige, [An introduction to Apache Hadoop for big data][27]. - -### Drupal ### - -[content management system (CMS)][28] - -"When it was released in 2011, Drupal 7 was the most accessible open source content management system (CMS) available. I expect that this will be true until the release of Drupal 8. Web accessibility requires constant vigilance and will be something that will always need attention in any piece of software striving to meet the Web Content Accessibility Guidelines (WCAG) 2.0 guidelines." —Mike Gifford, [Drupal 8's accessibility advantage][29]. - -### OpenDaylight ### - -[foundation for software defined networking][30] - -"We are seeing more and more that the networking functions traditionally done in the datacenter by dedicated, almost exclusively proprietary hardware and software combinations, are now being defined through software. Leading that charge within the open source community has been the [OpenDaylight Project][31], a collaborative project through the [Linux Foundation][32] working to define the needs which software defined networking may fill and coordinating the efforts of individuals and companies worldwide to create an open source solution to software defined networking (SDN)." —Jason Baker, [Define your network in software with OpenDaylight][33]. - --------------------------------------------------------------------------------- - -via: http://opensource.com/business/14/12/top-10-open-source-projects-2014 - -作者:[Jen Wike Huger][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://opensource.com/users/jen-wike -[1]:http://pixabay.com/en/lightbulb-lamp-light-hotspot-336193/ -[2]:http://opensource.com/life/13/12/top-open-source-projects-2013 -[3]:https://www.docker.com/ -[4]:http://opensource.com/business/14/7/interview-jerome-petazzoni-docker -[5]:https://opensource.com/business/14/7/why-docker-new-craze-virtualization-and-cloud-computing -[6]:http://kubernetes.io/ -[7]:https://cloud.google.com/compute/docs/containers -[8]:http://opensource.com/business/14/11/open-source-accelerating-pace-software -[9]:https://taiga.io/ -[10]:https://github.com/taigaio -[11]:https://opensource.com/business/14/10/taiga-open-source-project-management-tool -[12]:http://mesos.apache.org/ -[13]:http://mesos.apache.org/ -[14]:https://opensource.com/business/14/9/open-source-datacenter-computing-apache-mesos -[15]:https://opensource.com/business/14/8/interview-chris-aniszczyk-twitter-apache-mesos -[16]:https://twitter.github.io/finagle/ -[17]:http://www.openstack.org/ -[18]:https://opensource.com/business/14/5/what-is-openstack-superuser -[19]:https://opensource.com/business/14/10/interview-tim-bell-cern-it-operating-systems -[20]:http://www.ansible.com/home -[21]:https://opensource.com/business/14/12/ansible-it-infrastructure -[22]:https://opensource.com/business/14/10/interview-michael-dehaan-ansible -[23]:http://owncloud.org/ -[24]:https://opensource.com/life/14/12/using-owncloud-integrate-dropbox-google-drive-gnome -[25]:https://opensource.com/life/14/10/five-open-source-alternatives-popular-web-apps -[26]:http://hadoop.apache.org/ -[27]:http://opensource.com/life/14/8/intro-apache-hadoop-big-data -[28]:https://www.drupal.org/ -[29]:http://opensource.com/business/14/5/new-release-drupal-8-accessibility-advantage -[30]:http://www.opendaylight.org/ -[31]:http://www.opendaylight.org/ -[32]:http://www.linuxfoundation.org/ -[33]:http://opensource.com/business/14/5/defining-your-network-software-opendaylight diff --git a/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md b/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md index e55c028ecd..276e5a05fa 100644 --- a/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md +++ b/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md @@ -1,5 +1,3 @@ -translating by coloka... - How to configure a syslog server with rsyslog on Linux ================================================================================ A syslog server represents a central log monitoring point on a network, to which all kinds of devices including Linux or Windows servers, routers, switches or any other hosts can send their logs over network. By setting up a syslog server, you can filter and consolidate logs from different hosts and devices into a single location, so that you can view and archive important log messages more easily. diff --git a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md index 121f496d6a..2cba8c739f 100644 --- a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md +++ b/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md @@ -1,4 +1,3 @@ -ideas4u is translating! 4 Steps to Setup Local Repository in Ubuntu using APT-mirror ================================================================================ Today we will show you how to setup a local repository in your Ubuntu PC or Ubuntu Server straight from the official Ubuntu repository. There are a lot benefit of creating a local repository in your computer if you have a lot of computers to install software, security updates and fixes often in all systems, then having a local Ubuntu repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces the annual cost of Internet.. From 554e7cf7bd5f859f9a0d8654929f7ae506f09e57 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 13:43:42 +0800 Subject: [PATCH 0043/2517] PUB:20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4 @geekpi --- ...tall SSL on Apache 2.4 in Ubuntu 14.0.4.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md (61%) diff --git a/translated/tech/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md b/published/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md similarity index 61% rename from translated/tech/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md rename to published/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md index 6f5a53fdee..638bb2f67f 100644 --- a/translated/tech/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md +++ b/published/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md @@ -1,15 +1,14 @@ -如何在Ubuntu 14.04 上为Apache 2.4 安装SSL +如何在Ubuntu 14.04 上为Apache 2.4 安装SSL支持 ================================================================================ -今天我会站如如何为你的个人网站或者博客安装**SSL 证书**,来保护你的访问者和网站之间通信的安全。 +今天我会讲述如何为你的个人网站或者博客安装**SSL 证书**,来保护你的访问者和网站之间通信的安全。 -安全套接字层或称SSL,是一种加密网站和浏览器之间连接的标准安全技术。这确保服务器和浏览器之间传输的数据保持隐私和安全。这被成千上万的人使用来保护他们与客户的通信。要启用SSL链接,web服务器需要安装SSL证书。 +安全套接字层或称SSL,是一种加密网站和浏览器之间连接的标准安全技术。这确保服务器和浏览器之间传输的数据保持隐私和安全。它被成千上万的人使用来保护他们与客户的通信。要启用SSL链接,Web服务器需要安装SSL证书。 -你可以创建你自己的SSL证书,但是这默认不会被浏览器信任,要修复这个问题,你需要从受信任的证书机构(CA)处购买证书,我们会向你展示如何 -或者证书并在apache中安装。 +你可以创建你自己的SSL证书,但是这默认不会被浏览器所信任,要解决这个问题,你需要从受信任的证书机构(CA)处购买证书,我们会向你展示如何获取证书并在apache中安装。 ### 生成一个证书签名请求 ### -证书机构(CA)会要求你在你的服务器上生成一个证书签名请求(CSR)。这是一个很简单的过程,只需要一会就行,你需要运行下面的命令并输入需要的信息: +证书机构(CA)会要求你在你的服务器上生成一个证书签名请求(CSR)。这是一个很简单的过程,只需要一会儿就行,你需要在你的服务器上运行下面的命令并输入需要的信息: # openssl req -new -newkey rsa:2048 -nodes -keyout yourdomainname.key -out yourdomainname.csr @@ -17,13 +16,13 @@ ![generate csr](http://blog.linoxide.com/wp-content/uploads/2015/01/generate-csr.jpg) -这一步会生成两个文件按:一个用于解密SSL证书的私钥文件,一个证书签名请求(CSR)文件(用于申请你的SSL证书)。 +这一步会生成两个文件:一个用于解密SSL证书的私钥文件,一个证书签名请求(CSR)文件(用于申请你的SSL证书)。 -根据你申请的机构,你会需要上传csr文件或者在网站表格中粘帖他的内容。 +根据你申请的机构,你会需要上传csr文件或者在网站表格中粘帖该文件内容。 ### 在Apache中安装实际的证书 ### -生成步骤完成之后,你会收到新的数字证书,本篇教程中我们使用[Comodo SSL][1]并在一个zip文件中收到了证书。要在apache中使用它,你首先需要用下面的命令为收到的证书创建一个组合的证书: +生成步骤完成之后,你会收到新的数字证书。本篇教程中我们使用[Comodo SSL][1],并在一个它发给我们的zip文件中收到了证书。要在apache中使用它,你首先需要用下面的命令用收到的证书创建一个组合的证书: # cat COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > bundle.crt @@ -48,12 +47,12 @@ 你现在应该可以用https://YOURDOMAIN/(注意使用‘https’而不是‘http’)来访问你的网站了,并可以看到SSL的进度条了(通常在你浏览器中用一把锁来表示)。 -**NOTE:** All the links must now point to https, if some of the content on the website (like images or css files) still point to http links you will get a warning in the browser, to fix this you have to make sure that every link points to https. -**注意:** 现在所有的链接都必须指向https,如果网站上的一些内容(像图片或者css文件等)仍旧指向http链接的话,你会在浏览器中得到一个警告,要修复这个问题,请确保每个链接都指向了https。 + +**注意:** 现在所有的内容链接都必须指向https,如果网站上的一些内容(像图片或者css文件等)仍旧指向http链接的话,你会在浏览器中得到一个警告,要修复这个问题,请确保每个链接都指向了https。 ### 在你的网站上重定向HTTP请求到HTTPS中 ### -如果你希望重定向常规的HTTP请求到HTTPS,添加下面的文本到你希望的虚拟主机或者如果希望给服务器上所有网站都添加的话就加入到apache.conf中: +如果你希望重定向常规的HTTP请求到HTTPS,添加下面的文本到你希望修改的虚拟主机,或者如果希望给服务器上所有网站都添加的话就加入到apache.conf中: RewriteEngine On RewriteCond %{HTTPS} off @@ -65,7 +64,7 @@ via: http://linoxide.com/ubuntu-how-to/install-ssl-apache-2-4-in-ubuntu/ 作者:[Adrian Dinu][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f46f79cf0f9f2d816c399d1ed93455f83b13de14 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 14:31:31 +0800 Subject: [PATCH 0044/2517] PUB:20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7 @GOLinux --- ...ution Installations in RHEL or CentOS 7.md | 105 +++++++++++------- 1 file changed, 64 insertions(+), 41 deletions(-) rename {translated/tech => published}/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md (86%) diff --git a/translated/tech/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md b/published/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md similarity index 86% rename from translated/tech/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md rename to published/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md index db3cd3b706..046cee4f98 100644 --- a/translated/tech/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md +++ b/published/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md @@ -1,12 +1,13 @@ RHEL/CentOS 7中配置用于多版本Linux安装的“PXE网络启动服务器” ================================================================================ -**PXE服务器**——预启动执行环境——指示客户端计算机直接从网络接口启动、运行或安装操作系统,而不需要烧录CD/DVD或使用某个物理介质,它也可以减轻你网络中多台机器同时安装Linux发行版的工作。 +**PXE服务器**——预启动执行环境——指示客户端计算机直接从网络接口启动、运行或安装操作系统,而不需要烧录CD/DVD或使用某个物理介质,它可以减轻你网络中多台机器同时安装Linux发行版的工作。 ![Setting PXE Network Boot in RHEL/CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/10/Setting-PXE-Network-Boot-in-CentOS.png) -在RHEL/CentOS 7中设置PXE网络启动 -#### 需求 #### +*在RHEL/CentOS 7中设置PXE网络启动* + +#### 前置阅读 #### - [CentOS 7最小化安装步骤][1] - [RHEL 7最小化安装步骤][2] @@ -14,7 +15,7 @@ RHEL/CentOS 7中配置用于多版本Linux安装的“PXE网络启动服务器 - [移除RHEL/CentOS 7中不要的服务][4] - [安装NTP服务器以设置RHEL/CentOS 7的正确时间][5] -本文将介绍如何在配置有本地镜像安装仓库的**RHEL/CentOS 7** 64位上安装并配置一台**PXE服务器**,仓库源由CentOS 7 DVD ISO镜像提供,并由**DNSMASQ**服务器提供解析。 +本文将介绍如何在配置有本地镜像安装仓库的**RHEL/CentOS 7** 64位上安装并配置一台**PXE服务器**,仓库源由CentOS 7 DVD 的 ISO镜像提供,并由**DNSMASQ**服务器提供解析。 该机器提供了**DNS**和**DHCP**服务,用于网络启动引导的**Syslinux**包,**TFTP-Server**——提供了可通过网络使用**小文件传输协议**下载的可启动镜像,以及提供本地挂载DVD镜像的**VSFTPD**服务器——它将扮演官方RHEL/CentOS 7镜像安装仓库的角色,安装器将从这里提取所需的包。 @@ -27,11 +28,12 @@ RHEL/CentOS 7中配置用于多版本Linux安装的“PXE网络启动服务器 # yum install dnsmasq ![Install dnsmasq Package](http://www.tecmint.com/wp-content/uploads/2014/10/Install-dnsmasq-in-CentOS.jpg) -安装dnsmasq包 -**2.** DNSMASQ的默认主配置文件位于**/etc**目录中,虽然不需要任何说明就能看懂,但编辑起来确实相当困难的,即使有很详细的说明性注释。 +*安装dnsmasq包* -首先,确保你备份了该文件,以便你需要在以后对它进行恢复。然后使用你喜爱的文本编辑器创建一个新的空配置文件,命令如下。 +**2.** DNSMASQ的默认的主配置文件位于**/etc**目录中,虽然不需要任何说明就能看懂,但编辑起来确实相当困难的,即使有很详细的说明性注释。 + +首先,确保你备份了该文件,以便你需要在以后对它进行恢复。然后使用你爱用的文本编辑器创建一个新的空配置文件,命令如下。 # mv /etc/dnsmasq.conf /etc/dnsmasq.conf.backup # nano /etc/dnsmasq.conf @@ -61,7 +63,8 @@ RHEL/CentOS 7中配置用于多版本Linux安装的“PXE网络启动服务器 tftp-root=/var/lib/tftpboot ![Dnsmasq Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/dnsmasq-configuration.jpg) -Dnsmasq配置 + +*Dnsmasq配置* 你需要修改的声明有以下这些: @@ -89,14 +92,16 @@ Dnsmasq配置 # yum install syslinux ![Install Syslinux Bootloaders](http://www.tecmint.com/wp-content/uploads/2014/10/install-syslinux-bootloaders.jpg) -安装Syslinux启动加载器 + +*安装Syslinux启动加载器* **5.** PXE启动加载器文件位于**/usr/share/syslinux**系统绝对路径下,你可以通过列出该路径下的内容来查看。该步骤不是必须的,但你可能需要知道该路径,因为在下一步中,我们将拷贝该路径下的所有内容到**TFTP服务器**路径下。 # ls /usr/share/syslinux ![Syslinux Files](http://www.tecmint.com/wp-content/uploads/2014/10/syslinux-files.jpg) -Syslinux文件 + +*Syslinux文件* ### 步骤3: 安装TFTP-Server并加入SYSLINUX加载启动器 ### @@ -106,7 +111,8 @@ Syslinux文件 # cp -r /usr/share/syslinux/* /var/lib/tftpboot ![Install TFTP Server](http://www.tecmint.com/wp-content/uploads/2014/10/install-tftp-server.jpg) -安装TFTP服务器 + +*安装TFTP服务器* ### 步骤4: 设置PXE服务器配置文件 ### @@ -117,13 +123,13 @@ Syslinux文件 # mkdir /var/lib/tftpboot/pxelinux.cfg # touch /var/lib/tftpboot/pxelinux.cfg/default -**8.** 现在,该来编辑**PXE服务器**配置文件了,为它添加合法的Linux发行版安装选项。请注意,该文件中使用的所有路径必须是相对于**/var/lib/tftpboot**目录的。 +**8.** 现在,该来编辑**PXE服务器**配置文件了,为它添加合理的Linux发行版安装选项。请注意,该文件中使用的所有路径必须是相对于**/var/lib/tftpboot**目录的。 -下面,你可以看到配置文件的样例,你可以使用该模板,但请修改安装镜像(kernel和initrd文件)、协议(FTP、HTTP、HTTPS、NFS)以及映射你网络安装源仓库和路径的IP地址。 +下面,你可以看到配置文件的样例,你可以使用该模板,但请修改安装镜像(kernel和initrd文件)、协议(FTP、HTTP、HTTPS、NFS)以及映射你网络安装源仓库和路径的IP地址等参数。 # nano /var/lib/tftpboot/pxelinux.cfg/default -添加一下整个节录到文件中。 +添加以下整个节录到文件中。 default menu.c32 prompt 0 @@ -151,17 +157,18 @@ Syslinux文件 menu label ^4) Boot from local drive ![Configure PXE Server](http://www.tecmint.com/wp-content/uploads/2014/10/configure-pxe-server.jpg) -配置PXE服务器 + +*配置PXE服务器* 正如你所见,CentOS 7启动镜像(kernel和initrd)位于名为**centos7**的目录,该目录是**/var/lib/tftpboot**目录的相对路径(其系统绝对路径为**/var/lib/tftpboot/centos7**),而安装器仓库位于可通过FTP协议访问的**192.168.1.20/pub**网络位置中——在本例中,这些仓库位于本地,因为IP地址和PXE服务器地址相同。 同时,菜单**label 3**指定客户端安装应该通过**VNC**从一个远程位置实现(这里替换VNC密码为一个健壮的密码),如果你在一台没有输入输出的客户端上安装,菜单**label 2**指定了作为安装源的一个CentOS 7官方互联网镜像(这种情况要求客户端通过DHCP和NAT连接到互联网)。 -**重要**:正如你在上述配置中说看到的,我们使用了CentOS 7进行演示,但是你也可以定义RHEL 7镜像。而下面的完整说明和配置都只是基于CentOS 7的,所以在选在发行版时要当心。 +**重要**:正如你在上述配置中所看到的,我们使用了CentOS 7进行演示,但是你也可以定义一个 RHEL 7镜像。而下面的整个的说明和配置都只是基于CentOS 7的,所以在选发行版时要注意一下。 ### 步骤5: 添加CentOS 7启动镜像到PXE服务器 ### -**9.** 对于此步骤,需要用到CentOS的kernel和initrd文件。要获取这些文件,你需要**CentOS 7 DVD ISO**镜像。所以,去下载CentOS DVD镜像吧,然后把它放入你的DVD驱动器并挂载镜像到**/mnt**路径,命令见下面。 +**9.** 对于此步骤,需要用到CentOS的kernel和initrd文件。要获取这些文件,你需要**CentOS 7 DVD ISO**镜像。所以,去下载CentOS DVD镜像吧,然后把它(刻录成光盘)放入你的DVD驱动器并挂载镜像到**/mnt**路径,命令见下面。 使用DVD,而不是最小化CD镜像的原因在于,在后面我们将使用该DVD的内容为**FTP**源创建本地安装器仓库。 @@ -169,27 +176,29 @@ Syslinux文件 # ls /mnt ![Mount CentOS DVD](http://www.tecmint.com/wp-content/uploads/2014/10/mount-centos-dvd.jpg) -挂载CentOS DVD + +*挂载CentOS DVD* 如果你的机器没有DVD驱动器,你也可以使用**wget**或**curl**工具从[CentOS镜像站][7]下载**CentOS 7 DVD ISO**到本地并挂载。 # wget http://mirrors.xservers.ro/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso # mount -o loop /path/to/centos-dvd.iso /mnt -**10.** 在DVD内容可供使用后,创建**centos7**目录并将CentOS 7可启动kernel和initrd映像文件从DVD挂载位置拷贝到centos7文件夹。 +**10.** 在DVD内容可供使用后,创建**centos7**目录并将CentOS 7 的可启动的 kernel和initrd映像文件从DVD挂载位置拷贝到centos7文件夹。 # mkdir /var/lib/tftpboot/centos7 # cp /mnt/images/pxeboot/vmlinuz /var/lib/tftpboot/centos7 # cp /mnt/images/pxeboot/initrd.img /var/lib/tftpboot/centos7 ![Copy CentOS Bootable Files](http://www.tecmint.com/wp-content/uploads/2014/10/copy-centos-bootable-files.jpg) -拷贝CentOS可启动文件 + +*拷贝CentOS可启动文件* 使用该方法的原因在于,今后你可能会在**/var/lib/tftpboot**路径中创建新的独立的目录,并添加其它Linux发行版到PXE菜单中,你就不会将整个目录结构弄得一团糟了。 ### 步骤6: 创建CentOS 7本地镜像安装源 ### -**11.** 虽然你可以通过多种协议设置**安装源镜像**,如HTTP、HTTPS或NFS,但对于本指南,我选择使用**FTP**协议。因为通过**vsftpd**,你可以很便捷地配置,而且它也很稳定。 +**11.** 虽然你可以通过多种协议设置**安装源镜像**,如HTTP、HTTPS或NFS,但对于本指南,我选择了使用**FTP**协议。因为通过**vsftpd**,你可以很便捷地配置,而且它也很稳定。 接下里,安装vsftpd进程,然后复制所有DVD挂载目录中的内容到**vsftpd**默认服务器路径下(**/var/ftp/pub**)——这会花费一些时间,这取决于你的系统资源。然后为该路径设置可读权限,命令如下。 @@ -198,17 +207,20 @@ Syslinux文件 # chmod -R 755 /var/ftp/pub ![Install Vsftpd Server](http://www.tecmint.com/wp-content/uploads/2014/10/install-vsftpd-in-centos.jpg) -安装Vsftpd服务器 + +*安装Vsftpd服务器* ![Copy Files to FTP Path](http://www.tecmint.com/wp-content/uploads/2014/10/copy-files-to-ftp-path.jpg) -拷贝Files到FTP路径 + +*拷贝Files到FTP路径* ![Set Permissions on FTP Path](http://www.tecmint.com/wp-content/uploads/2014/10/set-permission-on-ftp-path.jpg) -设置FTP路径的权限 + +*设置FTP路径的权限* ### 步骤7: 在系统范围内启动并启用进程 ### -**12.** 既然PXE服务器配置已经完成,那么就来启动**DNSMASQ**和**VSFTPD**服务器吧。验证它们的状况并在系统范围内启用,以便让这些服务在每次系统重启后都能随系统启动,命令如下。 +**12.** 既然PXE服务器配置已经完成,那么就来启动**DNSMASQ**和**VSFTPD**服务器吧。验证它们的状况并在系统上启用,以便让这些服务在每次系统重启后都能随系统启动,命令如下。 # systemctl start dnsmasq # systemctl status dnsmasq @@ -218,10 +230,12 @@ Syslinux文件 # systemctl enable vsftpd ![Start Dnsmasq Service](http://www.tecmint.com/wp-content/uploads/2014/10/start-dnsmasq.jpg) -启动Dnsmasq服务 + +*启动Dnsmasq服务* ![Start Vsftpd Service](http://www.tecmint.com/wp-content/uploads/2014/10/start-vsftpd.jpg) -启动Vsftpd服务 + +*启动Vsftpd服务* ### 步骤8: 打开防火墙并测试FTP安装源 ### @@ -236,53 +250,62 @@ Syslinux文件 # firewall-cmd --reload ## Apply rules ![Check Listening Ports](http://www.tecmint.com/wp-content/uploads/2014/10/check-listening-ports.jpg) -检查监听端口 + +*检查监听端口* ![Open Ports in Firewall](http://www.tecmint.com/wp-content/uploads/2014/10/open-ports-on-firewall.jpg) -在防火墙上开启端口 + +*在防火墙上开启端口* **14.** 要测试FTP安装源网络路径,请在本地或另外一台计算机上打开浏览器([**lynx**][8]就可以做此事),然后输入你架设有FTP服务的PXE服务器的IP地址,并在填入的URL后面加上**/pub**网络位置,结果应该和截图中看到的一样。 ftp://192.168.1.20/pub ![Access FTP Files via Browser](http://www.tecmint.com/wp-content/uploads/2014/10/browse-ftp-files.jpg) -通过浏览器访问FTP文件 + +*通过浏览器访问FTP文件* **15.** 要解决PXE服务器最终的配置或其它信息产生的问题,请在live模式下诊断,命令如下: # tailf /var/log/messages ![Check PXE Logs for Errors](http://www.tecmint.com/wp-content/uploads/2014/10/check-pxe-errors.jpg) -检查PXE日志错误 -**16.** 最后,最后所需的步骤就是卸载CentOS 7 DVD,并移除物理介质。 +*检查PXE日志错误* + +**16.** 最后,最终所需的步骤就是卸载CentOS 7 DVD,并移除物理介质。 # umount /mnt ### 步骤9: 配置客户端从网络启动 ### -**17.** 现在,你的客户端可以通过它们的系统BIOS或在**BIOS开机自检**时按指定键来配置网络启动作为**首要启动设备**,具体方法见主板说明手册。 +**17.** 现在,你的客户端可以通过它们的系统BIOS或在**BIOS开机自检**时按指定键来配置网络启动作为**首选启动设备**,具体方法见主板说明手册。 为了选择网络启动,在第一次PXE提示符出现时,请按下**F8**键进入到PXE安装界面,然后敲**回车**键继续进入PXE菜单。 ![PXE Network Boot](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-network-boot.jpg) -PXE网络启动 + +*PXE网络启动* ![PXE Network OS Boot](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-network-os-boot.jpg) -PXE网络OS启动 + +*PXE网络OS启动* **18.** 一旦你进入PXE菜单,请选择你的CentOS 7安装类型,敲**回车**键继续安装过程,就像你使用本地启动介质安装一样。 -请记下这一点,使用菜单中的变体2需要激活目标客户端上的互联网连接。在下面的屏幕截图中,你可以通过VNC看到远程安装的实例。 +请记住这一点,使用菜单中的变体2需要激活目标客户端上的互联网连接。在下面的屏幕截图中,你可以通过VNC看到远程安装的实例。 ![PXE Menu](http://www.tecmint.com/wp-content/uploads/2014/10/pxe-menu.jpg) -PXE菜单 + +*PXE菜单* ![Remote Linux Installation via VNC](http://www.tecmint.com/wp-content/uploads/2014/10/os-installation-via-vnc.jpg) -通过VNC远程安装Linux + +*通过VNC远程安装Linux* ![Remote Installation of CentOS](http://www.tecmint.com/wp-content/uploads/2014/10/remote-centos-installation.jpg) -远程安装CentOS + +*远程安装CentOS* 以上是**CentOS 7**上配置最小化**PXE服务器**的所有内容。在我的本系列下一篇文章中,我将讨论其它PXE服务器配置过程中的其它问题,如怎样使用**Kickstart**文件来配置自动化安装**CentOS 7**,以及添加其它Linux发行版到PXE菜单——**Ubuntu Server**和**Debian 7**。 @@ -292,14 +315,14 @@ via: http://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/ 作者:[Matei Cezar][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/cezarmatei/ [1]:http://www.tecmint.com/centos-7-installation/ [2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ -[3]:http://www.tecmint.com/configure-network-interface-in-rhel-centos-7-0/ +[3]:http://linux.cn/article-3977-1.html [4]:http://www.tecmint.com/remove-unwanted-services-in-centos-7/ [5]:http://www.tecmint.com/install-ntp-server-in-centos/ [6]:http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html From 0bc12034fd138b8006aab8f3fcd25ed2beb9388b Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 14:43:58 +0800 Subject: [PATCH 0045/2517] PUB:20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7 @GOLinux --- ...t Environment Setup on RHEL or CentOS 7.md | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) rename {translated/tech => published}/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md (91%) diff --git a/translated/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md b/published/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md similarity index 91% rename from translated/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md rename to published/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md index 35936459d3..e131acbbc7 100644 --- a/translated/tech/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md +++ b/published/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md @@ -1,24 +1,26 @@ 添加Ubuntu 14.10,Ubuntu 14.04和Debian 7到RHEL/CentOS 7的PXE网络启动环境 ================================================================================ 本教程将指引你添加**Ubuntu 14.10 Server, Ubuntu 14.04 Server**和**Debian 7 Wheezy**发行版到**RHEL/CentOS 7**的PXE网络启动环境中。 + ![Add Ubuntu and Debian to PXE Network](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Ubuntu-and-Debian-to-PXE.png) -添加Ubuntu和Debian到PXE网络 + +*添加Ubuntu和Debian到PXE网络* 虽然对于本教程,我只会演示怎样来添加**64位**网络安装镜像,但对于Ubuntu或者Debian的**32位**系统,或者其它架构的镜像,操作步骤也基本相同。同时,就我而言,我会解释添加Ubuntu 32位源的方法,但不会演示配置。 从PXE服务器安装 **Ubuntu**或者**Debian**要求你的客户机必须激活网络连接,最好是使用**DHCP**通过**NAT**来进行动态分配地址。以便安装器拉取所需的包并完成安装过程。 -#### 需求 #### +#### 前置阅读 #### - [在RHEL/CentOS 7中为多种Linux发行版安装PXE网络启动服务器][1] ## 步骤 1: 添加Ubuntu 14.10和Ubuntu 14.04服务器到PXE菜单 ## -**1.** 为**Ubuntu 14.10**和**Ubuntu 14.04**添加网络安装源到PXE菜单可以通过两种方式实现:其一是通过下载Ubuntu CD ISO镜像并挂载到PXE服务器机器上以便可以读取Ubuntu网络启动文件,其二是通过直接下载Ubuntu网络启动归档包并将其解压缩到系统中。下面,我将进一步讨论这两种方法: +**1.** 要将**Ubuntu 14.10**和**Ubuntu 14.04**添加网络安装源到PXE菜单可以通过两种方式实现:其一是通过下载Ubuntu CD ISO镜像并挂载到PXE服务器机器上,以便可以读取Ubuntu网络启动文件,其二是通过直接下载Ubuntu网络启动归档包并将其解压缩到系统中。下面,我将进一步讨论这两种方法: ### 使用Ubuntu 14.10和Ubuntu 14.04 CD ISO镜像 ### -为了能使用此方法,你的PXE服务器需要有一台可工作的CD/DVD驱动器。在一台专有计算机上,转到[Ubuntu 14.10下载][2]和[Ubuntu 14.04 下载][3]页,获取64位**服务器安装镜像**,将它烧录到CD,并将CD镜像放到PXE服务器DVD/CD驱动器,然后使用以下命令挂载到系统。 +为了能使用此方法,你的PXE服务器需要有一台可工作的CD/DVD驱动器(LCTT 译注:也可以不用,参考下面内容)。在一台专用的计算机上,转到[Ubuntu 14.10下载][2]和[Ubuntu 14.04 下载][3]页,获取64位**服务器安装镜像**,将它烧录到CD,并将CD镜像放到PXE服务器DVD/CD驱动器,然后使用以下命令挂载到系统。 # mount /dev/cdrom /mnt @@ -160,16 +162,20 @@ 下面是**Ubuntu 14.04**PXE客户端安装测试的截图。 ![Select Ubuntu from PXE Menu](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-from-PXE-Menu.jpg) -从PXE菜单选择Ubuntu + +*从PXE菜单选择Ubuntu* ![Choose Ubuntu Installation Language](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-Installation-Language.jpg) -选择Ubuntu安装语言 + +*选择Ubuntu安装语言* ![Choose Ubuntu Rescue Mode](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Ubuntu-Rescue-Mode.jpg) -选择Ubuntu救援模式 + +*选择Ubuntu救援模式* ![Ubuntu Rescue Mode Shell](http://www.tecmint.com/wp-content/uploads/2014/11/Ubuntu-Rescue-Mode-Shell.jpg) -Ubuntu救援模式Shell + +*Ubuntu救援模式Shell* ## 步骤 2: 添加Debian 7 Wheezy到PXE菜单 ## @@ -184,7 +190,8 @@ Ubuntu救援模式Shell # wget http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/netboot.tar.gz ![Download Debain 7 Netboot](http://www.tecmint.com/wp-content/uploads/2014/11/Download-Debain-7-Netboot.jpg) -下载Debian 7网络启动包 + +*下载Debian 7网络启动包* **6.** 在**wget**下载完成**netboot.tar.gz**文件后,请将其解压缩并运行以下命令拷贝**debian-installer**目录到tftp服务器默认路径。 @@ -192,10 +199,12 @@ Ubuntu救援模式Shell # cp -rf debian-installer/ /var/lib/tftpboot/ ![Extract Debain 7 Netboot](http://www.tecmint.com/wp-content/uploads/2014/11/Extract-Debain-7-Netboot.jpg) -解压缩Debian 7网络启动包 + +*解压缩Debian 7网络启动包* ![Copy Debain 7 Netboot to FTP](http://www.tecmint.com/wp-content/uploads/2014/11/Copy-Debain-7-Netboot-to-FTP.jpg) -拷贝Debian 7网络启动文件到FTP + +*拷贝Debian 7网络启动文件到FTP* **7.** 要添加**Debian Wheezy**标签到**PXE菜单**,请用你最喜爱的文本编辑器打开PXE服务器默认配置文件并添加以下标签。 @@ -214,7 +223,8 @@ Debian Wheezy 64位的PXE标签菜单。 append auto=true priority=critical vga=788 initrd=debian-installer/amd64/initrd.gz -- quiet ![Add Debian to PXE Boot](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Debian-to-PXE-Boot.jpg) -添加Debian到PXE启动 + +*添加Debian到PXE启动* **注**:如果你想要添加其它Debian架构,请重复上述步骤,并相应替换PXE默认菜单配置文件中的标签号和**debian-installer/$architecture_name/**目录。 @@ -225,10 +235,12 @@ Debian Wheezy 64位的PXE标签菜单。 **9.** 然后通过网络启动一台客户机,选择从PXE菜单安装Debian,并像正常安装一样进一步下去。 ![Select Install Debian from PXE](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Install-Debian-from-PXE.jpg) -选择从PXE安装Debian + +*选择从PXE安装Debian* ![Select Debian Install Language](http://www.tecmint.com/wp-content/uploads/2014/11/Select-Debian-Install-Language.jpg) -选择Debian安装语言 + +*选择Debian安装语言* 以上是要求添加并从RHEL/CentOS 7 PXE服务器安装**Ubuntu**或**Debian**到客户机上的全部步骤。在我的下一篇文章中,我将讨论一种更为复杂的方法,如何使用RHEL/CentOS 7 PXE网络启动服务器来安装**Windows 7**到客户机。 @@ -243,7 +255,7 @@ via: http://www.tecmint.com/add-ubuntu-to-pxe-network-boot/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/cezarmatei/ -[1]:http://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/ +[1]:http://linux.cn/article-4902-1.html [2]:http://releases.ubuntu.com/14.10/ [3]:http://releases.ubuntu.com/14.04/ [4]:http://cdimage.ubuntu.com/netboot/14.10/ From 5fcce05c1d49e59276e4688c4fb057492635397f Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Feb 2015 21:06:28 +0800 Subject: [PATCH 0046/2517] PUB:20141219 How to block unwanted IP addresses on Linux efficiently @geekpi --- ...anted IP addresses on Linux efficiently.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) rename {translated/tech => published}/20141219 How to block unwanted IP addresses on Linux efficiently.md (75%) diff --git a/translated/tech/20141219 How to block unwanted IP addresses on Linux efficiently.md b/published/20141219 How to block unwanted IP addresses on Linux efficiently.md similarity index 75% rename from translated/tech/20141219 How to block unwanted IP addresses on Linux efficiently.md rename to published/20141219 How to block unwanted IP addresses on Linux efficiently.md index 5d45755066..feb53945b0 100644 --- a/translated/tech/20141219 How to block unwanted IP addresses on Linux efficiently.md +++ b/published/20141219 How to block unwanted IP addresses on Linux efficiently.md @@ -1,6 +1,7 @@ -如何在Linux有效地屏蔽不需要的IP +如何在 Linux 下大量屏蔽恶意 IP 地址 ================================================================================ -你可能需要在Linux的不同的环境下屏蔽IP地址。比如,作为一个终端用户,你可能想要免受间谍软件或者IP追踪的困扰。或者当你在运行P2P软件时。你可能想要过滤反P2P活动的网络链接。如果你是一名系统管理员,你可能想要禁止垃圾IP地址访问你们的生产邮件服务器。或者你因一些原因想要禁止某些国家访问web服务。在许多情况下,然而,你的IP地址屏蔽列表可能会很快地增长到几万的IP。该如何处理这个? + +很多情况下,你可能需要在Linux下屏蔽IP地址。比如,作为一个终端用户,你可能想要免受间谍软件或者IP追踪的困扰。或者当你在运行P2P软件时。你可能想要过滤反P2P活动的网络链接。如果你是一名系统管理员,你可能想要禁止垃圾IP地址访问你们的公司邮件服务器。或者你因一些原因想要禁止某些国家访问你的web服务。在许多情况下,然而,你的IP地址屏蔽列表可能会很快地增长到几万的IP。该如何处理这个? ### Netfilter/IPtables 的问题 ### @@ -8,11 +9,11 @@ $ sudo iptables -A INPUT -s 1.1.1.1 -p TCP -j DROP -如果你想要完全屏蔽一个IP地址,你可以用下面的命令很简单地做到: +如果你想要完全屏蔽一个IP地址段,你可以用下面的命令很简单地做到: $ sudo iptables -A INPUT -s 1.1.2.0/24 -p TCP -j DROP -然而,当你有1000个独立IP地址,且不带CIDR(无类别域间路由)前缀,你该怎么做?你要有1000条iptable规则!这显然无法扩展。 +然而,当你有1000个独立IP地址,且不带CIDR(无类别域间路由)前缀,你该怎么做?你要有1000条iptable规则!这显然这并不适于大规模屏蔽。 $ sudo iptables -A INPUT -s 1.1.1.1 -p TCP -j DROP $ sudo iptables -A INPUT -s 2.2.2.2 -p TCP -j DROP @@ -21,13 +22,13 @@ ### 什么是IP集? ### -这时候就是[IP集][1]登场了。IP集是一个内核特性,它允许多个(独立)IP地址、MAC地址或者甚至是端口号编码并有效地存储在位图/哈希内核数据结构中。一旦IP集创建之后,你可以创建一条iptable规则来匹配这个集合。 +这时候就是[IP集][1]登场了。IP集是一个内核特性,它允许多个(独立)IP地址、MAC地址或者甚至是端口号被编码和有效地存储在位图/哈希内核数据结构中。一旦IP集创建之后,你可以创建一条iptables规则来匹配这个集合。 -你应该马上看见IP集合的好处了,它可以让你用一条iptable规则匹配多个ip地址!你可以用多个IP地址和端口号的方式来构造IP集,并且可以动态地更新规则而没有请能影响。 +你马上就会看见IP集合的好处了,它可以让你用一条iptable规则匹配多个ip地址!你可以用多个IP地址和端口号的方式来构造IP集,并且可以动态地更新规则而没有性能影响。 ### 在Linux中安装IPset工具 ### -为了创建和管理IP集,你需要使用成为ipset的用户空间工具。 +为了创建和管理IP集,你需要使用称为ipset的用户空间工具。 要在Debian、Ubuntu或者Linux Mint上安装: @@ -45,7 +46,7 @@ Fedora或者CentOS/RHEL 7上安装: $ sudo ipset create banthis hash:net -第二个参数(hash:net)是必须的,代表的是集合的类型。IP集有[多个类型][2]。hash:net类型的IP集使用哈希来存储多个CIDR块。如果你想要在一个集合中存储独立的IP地址,你可以使用hash:ip类型。 +第二个参数(hash:net)是必须的,代表的是集合的类型。IP集有[多个类型][2]。hash:net类型的IP集使用哈希来存储多个CIDR块。如果你想要在一个集合中存储单独的IP地址,你可以使用hash:ip类型。 一旦创建了一个IP集之后,你可以用下面的命令来检查: @@ -70,25 +71,25 @@ Fedora或者CentOS/RHEL 7上安装: ![](https://farm8.staticflickr.com/7518/15380353474_4d6b9dbf63_z.jpg) -现在是时候去创建一个使用IP集的iptable规则了。这里的关键是使用"-m set --match-set "选项。 +现在是时候去创建一个使用IP集的iptables规则了。这里的关键是使用"-m set --match-set "选项。 现在让我们创建一条让之前那些IP块不能通过80端口访问web服务的iptable规则。可以通过下面的命令: $ sudo iptables -I INPUT -m set --match-set banthis src -p tcp --destination-port 80 -j DROP -如果你想,你可以保存特定的IP集到一个文件中,以后可以从文件中还原: +如果你愿意,你可以保存特定的IP集到一个文件中,以后可以从文件中还原: $ sudo ipset save banthis -f banthis.txt $ sudo ipset destroy banthis $ sudo ipset restore -f banthis.txt -上面的命令中,我使用了destory选项来删除一个已有的IP集来见证我可以还原它。 +上面的命令中,我使用了destory选项来删除一个已有的IP集来看看我是否可以还原它。 ### 自动IP地址禁用 ### -现在你应该看到了IP集合的强大了。维护IP黑名单是一件繁琐和费时的工作。实际上,有很多免费或者收费的服务可以来帮你完成这个。一个额外的好处是,让我们看看如何自动将IP黑名单家到IP集中。 +现在你应该看到了IP集合的强大了。维护IP黑名单是一件繁琐和费时的工作。实际上,有很多免费或者收费的服务可以来帮你完成这个。一个额外的好处是,让我们看看如何自动将IP黑名单加到IP集中。 -首先让我们从[iblocklist.com][3]抓取免费的黑名单,这个网站u有不同的免费和收费的名单。免费的版本是P2P格式。 +首先让我们从[iblocklist.com][3]得到免费的黑名单,这个网站有不同的免费和收费的名单。免费的版本是P2P格式。 接下来我要使用一个名为iblocklist2ipset的开源Python工具来将P2P格式的黑名单转化成IP集。 @@ -131,14 +132,13 @@ Fedora或者CentOS/RHEL 7上安装: $ sudo ipset list banthis - 在写这篇文章时候,“level1”类表包含了237,000个屏蔽的IP列表。你可以看到很多IP地址已经加入到IP集中了。 -最后,创建一条iptable命令来屏蔽它们! +最后,创建一条iptables命令来屏蔽这些坏蛋! ### 总结 ### -这篇文章中,我描述了你该如何用强大的ipset来·屏蔽不想要的IP地址。同时结合了第三方工具iblocklist2ipset,这样你就可以流畅地维护你的IP屏蔽列表了。对于那些对于ipset的速度提升好奇的人来说,下图显示了iptables在使用和不使用ipset的基准测试结果。 +这篇文章中,我描述了你该如何用强大的ipset来屏蔽不想要的IP地址。同时结合了第三方工具iblocklist2ipset,这样你就可以流畅地维护你的IP屏蔽列表了。那些对ipset的性能提升好奇的人,下图显示了iptables在使用和不使用ipset的基准测试结果。 ![](https://farm8.staticflickr.com/7575/15815220998_e1935c94c0_z.jpg) @@ -150,7 +150,7 @@ via: http://xmodulo.com/block-unwanted-ip-addresses-linux.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c33a123fa4aeb41d73be960fbad70ca59b87ad94 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 Feb 2015 15:25:09 +0800 Subject: [PATCH 0047/2517] PUB:20141224 Linux FAQs with Answers--How to rename multiple files on Linux @geekpi --- ...rs--How to rename multiple files on Linux.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) rename {translated/tech => published}/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md (67%) diff --git a/translated/tech/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md b/published/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md similarity index 67% rename from translated/tech/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md rename to published/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md index 24120bd386..d804bd390e 100644 --- a/translated/tech/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md +++ b/published/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md @@ -1,21 +1,20 @@ -Linux有问必答-- 如何在Linux重命名多个文件 +Linux有问必答:如何在Linux下重命名多个文件 ================================================================================ > **提问**:我知道我可以用mv命令重命名文件。但是当我想重命名很多文件怎么办?如果为每个文件都这么做将会是很乏味的。有没有办法一次性重命名多个文件? -在Linux中,当你想要改变一个文件名,使用mv命令就好了。然而mv不能使用通配符重命名多个文件。可以用sed、awk或者与[xargs][1]结合使用来处理多个文件的情况。然而,这些命令行即繁琐u又不友好,并且如果不小心的话还很容易出错。你不会想要撤销1000个文件的错误名的。 +在Linux中,当你想要改变一个文件名,使用mv命令就好了。然而mv不能使用通配符重命名多个文件。可以用sed、awk或者与[xargs][1]结合使用来处理多个文件的情况。然而,这些命令行即繁琐又不友好,并且如果不小心的话还很容易出错。你不会想要撤销1000个文件的错误名吧! -When it comes to renaming multiple files, the rename utility is probably the easiest, the safest, and the most powerful command-line tool. The rename command is actually a Perl script, and comes pre-installed on all modern Linux distributions. -当你想要重命名多个文件的时候,重命名的工具或许是最简单、最安全和最强大的命令行工具。重命名命令实际上是一个Perl脚本,它预安装在所有的现在Linux发行班上 +当你想要重命名多个文件的时候,rename 工具或许是最简单、最安全和最强大的命令行工具。这个rename命令实际上是一个Perl脚本,它预安装在所有的现在Linux发行版上。 下面是重命名命令的基本语法。 rename [-v -n -f] - 是Perl兼容正则表达式,它表示的是要重命名的文件和该怎么做。正则表达式的形式是‘s/old-name/new-name/’。 +\ 是Perl兼容正则表达式,它表示的是要重命名的文件和该怎么做。正则表达式的形式是‘s/old-name/new-name/’。 ‘-v’选项会显示文件名改变的细节(比如:XXX重命名成YYY)。 -‘-n’选项告诉rename会在不实际改变名称的情况下显示文件将会重命名的情况。这个选项在你想要在不改变文件名的情况下模拟改变文件名的情况下很有用。 +‘-n’选项告诉rename命令在不实际改变名称的情况下显示文件将会重命名的情况。这个选项在你想要在不改变文件名的情况下模拟改变文件名的情况下很有用。 ‘-f’选项强制覆盖存在的文件。 @@ -43,7 +42,7 @@ When it comes to renaming multiple files, the rename utility is probably the eas ### 更改文件名模式 ### -现在让我们考虑包含子模式的更复杂的正则表达式。在PCRE中,子模式包含在圆括号中,$符后接上数字(比如$1,$2)。 +现在让我们考虑更复杂的包含子模式的正则表达式。在PCRE中,子模式包含在圆括号中,$符后接上数字(比如$1,$2)。 比如,下面的命令会将‘img_NNNN.jpeg’变成‘dan_NNNN.jpg’。 @@ -57,7 +56,7 @@ When it comes to renaming multiple files, the rename utility is probably the eas img_5420.jpeg renamed as dan_5420.jpg img_5421.jpeg renamed as dan_5421.jpg -比如,下面的命令会将‘img_000NNNN.jpeg’变成‘dan_NNNN.jpg’。 +比如,下面的命令会将‘img\_000NNNN.jpeg’变成‘dan\_NNNN.jpg’。 # rename -v 's/img_\d{3}(\d{4})\.jpeg$/dan_$1\.jpg/' *jpeg @@ -76,7 +75,7 @@ When it comes to renaming multiple files, the rename utility is probably the eas via: http://ask.xmodulo.com/rename-multiple-files-linux.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 71bf51d050f76070804488fcb7f9dc686456075a Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 Feb 2015 15:31:59 +0800 Subject: [PATCH 0048/2517] PUB:20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17 @Vic020 --- ...all Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md (92%) diff --git a/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md b/published/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md similarity index 92% rename from translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md rename to published/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md index 61202528a9..64e065fa5b 100644 --- a/translated/tech/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md +++ b/published/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md @@ -2,14 +2,14 @@ ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Kodi_Xmas.jpg) -[Kodi][1],原名就是大名鼎鼎的XBMC,发布[最新版本14][2],命名为Helix。感谢官方XMBC提供的PPA,现在可以很简单地在Ubuntu14.04中安装了。 +[Kodi][1],原名就是大名鼎鼎的XBMC,发布了开发代号为Helix的[最新版本14][2]。感谢官方XMBC提供的PPA,现在可以很简单地在Ubuntu14.04中安装了。 有些人可能还不了解Kodi,它是一个媒体中心软件,支持所有平台,如Windows、Linux、 Mac, Android等。此软件拥有全屏的媒体中心,可以管理所有音乐和视频,不单支持本地文件还支持网络播放,如Tube、[Netflix][3]、 Hulu, Amazon Prime和其他流媒体服务商。 ### 在 Ubuntu 14.04 和 Linux Mint 17 中安装 XBMC 14 Kodi Helix ### -再次感谢官方的PPA,让我们可以轻松安装Kodi 14。 -支持Ubuntu 14.04、Ubuntu 12.04、Linux Mint 17、Pinguy OS 14.04、Deepin 2014、LXLE 14.04、Linux Lite 2.0, Elementary OS 以及其他基于 Ubuntu 的 Linux 发行版。 +再次感谢官方的PPA,让我们可以轻松安装Kodi 14。支持Ubuntu 14.04、Ubuntu 12.04、Linux Mint 17、Pinguy OS 14.04、Deepin 2014、LXLE 14.04、Linux Lite 2.0, Elementary OS 以及其他基于 Ubuntu 的 Linux 发行版。 + 打开终端(Ctrl+Alt+T)然后使用下列命令。 sudo add-apt-repository ppa:team-xbmc/ppa @@ -31,6 +31,7 @@ sudo add-apt-repository --remove ppa:team-xbmc/ppa 我希望这篇简单的文章可以帮助到你在Ubuntu、Linux Mint 和其他 Linux 版本中轻松安装 Kodi 14。你是怎么发现 Kodi 14 Helix 的? + 你有没有使用其他的媒体中心来作为 XBMC 的替代?可以在下面的评论区分享你的观点。 -------------------------------------------------------------------------------- From fbdce4f657062bfb0893bc305f7b1876b7f893df Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 18 Feb 2015 15:45:50 +0800 Subject: [PATCH 0049/2517] translating --- sources/share/20150209 Non-Linux FOSS--Homebrew.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150209 Non-Linux FOSS--Homebrew.md b/sources/share/20150209 Non-Linux FOSS--Homebrew.md index bb385737f3..23a59a2ff2 100644 --- a/sources/share/20150209 Non-Linux FOSS--Homebrew.md +++ b/sources/share/20150209 Non-Linux FOSS--Homebrew.md @@ -1,3 +1,5 @@ +Translating---geekpi + Non-Linux FOSS: Homebrew ================================================================================ I use OS X quite often during my day job. I'm able to tolerate it largely due to the terminal. If I couldn't do my work with green text on a black background, I think I'd go crazy (or crazier). Unfortunately, OS X doesn't come with all the command-line tools I need. That's where Homebrew comes in to save the day. @@ -21,4 +23,4 @@ via: http://www.linuxjournal.com/content/non-linux-foss-homebrew 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.linuxjournal.com/users/shawn-powers -[1]:http://brew.sh/ \ No newline at end of file +[1]:http://brew.sh/ From a511692fa569490e0b159408ae8b6cb16d5b76e2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 18 Feb 2015 16:01:00 +0800 Subject: [PATCH 0050/2517] translated --- .../20150209 Non-Linux FOSS--Homebrew.md | 26 ------------------- .../20150209 Non-Linux FOSS--Homebrew.md | 24 +++++++++++++++++ 2 files changed, 24 insertions(+), 26 deletions(-) delete mode 100644 sources/share/20150209 Non-Linux FOSS--Homebrew.md create mode 100644 translated/share/20150209 Non-Linux FOSS--Homebrew.md diff --git a/sources/share/20150209 Non-Linux FOSS--Homebrew.md b/sources/share/20150209 Non-Linux FOSS--Homebrew.md deleted file mode 100644 index 23a59a2ff2..0000000000 --- a/sources/share/20150209 Non-Linux FOSS--Homebrew.md +++ /dev/null @@ -1,26 +0,0 @@ -Translating---geekpi - -Non-Linux FOSS: Homebrew -================================================================================ -I use OS X quite often during my day job. I'm able to tolerate it largely due to the terminal. If I couldn't do my work with green text on a black background, I think I'd go crazy (or crazier). Unfortunately, OS X doesn't come with all the command-line tools I need. That's where Homebrew comes in to save the day. - -![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11811fossf1.png) - -Homebrew acts like the package management system OS X is lacking. Using commands very similar to apt-get, it allows the installation of hundreds of applications. A perfect example is the wget program. I was surprised to find that OS X doesn't include wget, but with Homebrew, it's a simple one-liner away. - -The best part is that Homebrew installs everything in the /usr/local file space. There's no reason to worry about Homebrew corrupting your system, because it doesn't touch anything outside of /usr/local. OS X system updates won't overwrite your programs, and because /usr/local/bin is already in the PATH, installed Homebrew apps just work! - -Homebrew uses Ruby to manage its packages and functions, but it doesn't require any programming knowledge to use. And the installation procedure is literally a copy/paste on the command line. If you use OS X, but you wish you could install packages as easily as in Linux, give Homebrew a try: [http://brew.sh][1]. - --------------------------------------------------------------------------------- - -via: http://www.linuxjournal.com/content/non-linux-foss-homebrew - -作者:[Shawn Powers][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linuxjournal.com/users/shawn-powers -[1]:http://brew.sh/ diff --git a/translated/share/20150209 Non-Linux FOSS--Homebrew.md b/translated/share/20150209 Non-Linux FOSS--Homebrew.md new file mode 100644 index 0000000000..a6f30ec50e --- /dev/null +++ b/translated/share/20150209 Non-Linux FOSS--Homebrew.md @@ -0,0 +1,24 @@ +非Linux的免费开源软件:Homebrew +================================================================================ +我日常工作中使用的是OS X。我能容忍它很大程序上是因为它的终端。如果我不能在黑色背景绿色文字的终端下工作,我想我会疯了。不幸的是,OS Xmei没有我需要的全部命令行工具。Homebrew的到来拯救了这。 + +![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11811fossf1.png) + +Homebrew扮演了OS X中缺乏的包管理器的角色。命令的使用很像apt-get,它能够安装无数的应用。一个最好的例子是wget。我很惊讶OS X中没有包含wget,但是homebrew中有,这是最简单的一套了 + +最棒的是homebrew在/usr/local文件夹下安装软件。你不必担心homebrew会破坏你的系统,因为它不会访问/usr/local之外的其他文件。OSX系统更新不会覆盖你的程序,并且/usr/local/bin已经在PATH中,使用homebrew安装的程序可以直接工作。 + +homebrew使用ruby管理它的包和功能,但是使用它不需要任何编程知识。并且安装过程只需要在命令行中复制粘贴就好了。如果你使用的是OS X,但是你希望像在Linux中那样方便地安装熬,就试一试homrbrew吧:[http://brew.sh][1]。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxjournal.com/content/non-linux-foss-homebrew + +作者:[Shawn Powers][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxjournal.com/users/shawn-powers +[1]:http://brew.sh/ From 53ff38ea21d4d3ede0227a4c83df875c1f1e941a Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 Feb 2015 16:08:44 +0800 Subject: [PATCH 0051/2517] PUB:20150104 Auditd--Tool for Security Auditing on Linux Server @shipsw --- ...l for Security Auditing on Linux Server.md | 79 +++++++++++-------- 1 file changed, 46 insertions(+), 33 deletions(-) rename {translated/tech => published}/20150104 Auditd--Tool for Security Auditing on Linux Server.md (73%) diff --git a/translated/tech/20150104 Auditd--Tool for Security Auditing on Linux Server.md b/published/20150104 Auditd--Tool for Security Auditing on Linux Server.md similarity index 73% rename from translated/tech/20150104 Auditd--Tool for Security Auditing on Linux Server.md rename to published/20150104 Auditd--Tool for Security Auditing on Linux Server.md index 1071e1521b..3e528fffa6 100644 --- a/translated/tech/20150104 Auditd--Tool for Security Auditing on Linux Server.md +++ b/published/20150104 Auditd--Tool for Security Auditing on Linux Server.md @@ -1,14 +1,14 @@ Auditd - Linux 服务器安全审计工具 ================================================================================ -首先,Linoxide组祝读者 **2015新年快乐万事如意!** 。下面开始这个新年版审计工具的介绍。 +首先,Linux中国祝贺读者 **2015羊年春节快乐,万事如意!** 。下面开始这个新年版审计工具的介绍。 -安全防护是首先要考虑的问题。为了避免别人盗取我们的数据,我们需要维护它。安全防护包括很多东西,审计是其中一个。 +安全防护是首先要考虑的问题。为了避免别人盗取我们的数据,我们需要时刻关注它。安全防护包括很多东西,审计是其中之一。 -我们知道Linux系统上有一个叫 **auditd** 的审计工具。这个工具在大多数Linux操作系统中是默认安装的。审计工具是什么?如何使用?下面我们开始介绍。 +我们知道Linux系统上有一个叫 **auditd** 的审计工具。这个工具在大多数Linux操作系统中是默认安装的。那么auditd 是什么?如何使用呢?下面我们开始介绍。 ### 什么是审计? ### -审计(或审计监控)是Linux审计系统中用户部分的一个组件,负责将审计记录写入磁盘。 +auditd(或 auditd 守护进程)是Linux审计系统中用户空间的一个组件,其负责将审计记录写入磁盘。 ![](http://blog.linoxide.com/wp-content/uploads/2014/12/what_is_auditd.png) @@ -20,16 +20,17 @@ Ubuntu系统中,我们可以使用 [wajig][1] 工具或者 **apt-get 工具** 按照下面的说明安装auditd,安装完毕后将自动安装以下auditd和相关的工具: -- **auditctl ;** 运行过程中控制守护进程的工具,比如如添加规则等等。 -- **/etc/audit/audit.rules ;** 记录审计规则的文件。 -- **aureport ;** 查看和生成审计报告的工具。 -- **ausearch ;** 查找审计事件的工具 -- **auditspd ;** 转发事件通知给其他应用程序,不写审计日志文件。 -- **autrace ;** 跟踪处理过程的命令。 -- **/etc/audit/auditd.conf ;** auditd工具的配置文件。 -- 首次安装 **auditd** 后, 审计规则是空的。 +- **auditctl :** 即时控制审计守护进程的行为的工具,比如如添加规则等等。 +- **/etc/audit/audit.rules :** 记录审计规则的文件。 +- **aureport :** 查看和生成审计报告的工具。 +- **ausearch :** 查找审计事件的工具 +- **auditspd :** 转发事件通知给其他应用程序,而不是写入到审计日志文件中。 +- **autrace :** 一个用于跟踪进程的命令。 +- **/etc/audit/auditd.conf :** auditd工具的配置文件。 -可以使用以下命令查看 +首次安装 **auditd** 后, 审计规则是空的。 + +可以使用以下命令查看: $ sudo auditctl -l @@ -41,7 +42,7 @@ Ubuntu系统中,我们可以使用 [wajig][1] 工具或者 **apt-get 工具** #### Audit 文件和目录访问审计 #### -我们使用审计工具的一个目的是监控文件和目录的更改。对于auditd工具,我们可使用命令来配置(注意,以下命令需要root权限)。 +我们使用审计工具的一个基本的需求是监控文件和目录的更改。使用auditd工具,我们可通过如下命令来配置(注意,以下命令需要root权限)。 **文件审计** @@ -51,9 +52,9 @@ Ubuntu系统中,我们可以使用 [wajig][1] 工具或者 **apt-get 工具** **选项 :** -- **-w path ;** 监控指定的路径,上面的命令指定监控路径 /etc/passwd -- **-p ; ** 指定触发审计的文件和目录的访问权限 -- **rwxa ;** 指定的触发条件,r 读取权限,w 写入权限,x 执行权限 +- **-w path :** 指定要监控的路径,上面的命令指定了监控的文件路径 /etc/passwd +- **-p :** 指定触发审计的文件/目录的访问权限 +- **rwxa :** 指定的触发条件,r 读取权限,w 写入权限,x 执行权限,a 属性(attr) #### 目录审计 #### @@ -79,31 +80,41 @@ Ubuntu系统中,我们可以使用 [wajig][1] 工具或者 **apt-get 工具** $ sudo ausearch -f /etc/passwd -- **-f** 设定ausearch审计/etc/passwd文件 -- 下面是输出 : +- **-f** 设定ausearch 调出 /etc/passwd文件的审计内容 + +下面是输出 : + > **time**->Mon Dec 22 09:39:16 2014 + > type=PATH msg=audit(1419215956.471:194): item=0 **name="/etc/passwd"** inode=142512 dev=08:01 mode=0100644 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL + > type=CWD msg=audit(1419215956.471:194): **cwd="/home/pungki"** + > type=SYSCALL msg=audit(1419215956.471:194): arch=40000003 **syscall=5** success=yes exit=3 a0=b779694b a1=80000 a2=1b6 a3=b8776aa8 items=1 ppid=2090 pid=2231 **auid=4294967295 uid=1000 gid=1000** euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 fsgid=1000 tty=pts0 ses=4294967295 **comm="sudo" exe="/usr/bin/sudo"** key=(null) 下面开始解读输出结果。 -- **time ;** 审计时间。 -- **name ;** 审计对象 -- **cwd ;** 当前路径 -- **syscall ;** 相关的系统调用 -- **auid ;** 审计用户ID -- **uid and gid ;** 访问文件的用户ID和用户组ID -- **comm ;** 用户访问文件的命令 -- **exe ;** 上面命令的可执行文件路径 -- 以上审计日志显示文件未被改动。 +- **time :** 审计时间。 +- **name :** 审计对象 +- **cwd :** 当前路径 +- **syscall :** 相关的系统调用 +- **auid :** 审计用户ID +- **uid 和 gid :** 访问文件的用户ID和用户组ID +- **comm :** 用户访问文件的命令 +- **exe :** 上面命令的可执行文件路径 - 以下我们将要添加一个用户,看看auditd如何记录文件 /etc/passwd的改动的。 +以上审计日志显示文件未被改动。 + +以下我们将要添加一个用户,看看auditd如何记录文件 /etc/passwd的改动的。 > **time->**Mon Dec 22 11:25:23 2014 + > type=PATH msg=audit(1419222323.628:510): item=1 **name="/etc/passwd.lock"** inode=143992 dev=08:01 mode=0100600 ouid=0 ogid=0 rdev=00:00 nametype=DELETE + > type=PATH msg=audit(1419222323.628:510): item=0 **name="/etc/"** inode=131073 dev=08:01 mode=040755 ouid=0 ogid=0 rdev=00:00 nametype=PARENT + > type=CWD msg=audit(1419222323.628:510): **cwd="/root"** + > type=SYSCALL msg=audit(1419222323.628:510): arch=40000003 **syscall=10** success=yes exit=0 a0=bfc0ceec a1=0 a2=bfc0ceec a3=897764c items=2 ppid=2978 pid=2994 **auid=4294967295 uid=0 gid=0** euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=4294967295 **comm="chfn" exe="/usr/bin/chfn"** key=(null) 我们可以看到,在指定的时间,**/etc/passwd ** 被root用户(uid =0, gid=0)在/root目录下修改。/etc/passwd 文件是使用**/usr/bin/chfn** 访问的。 @@ -133,7 +144,7 @@ Ubuntu系统中,我们可以使用 [wajig][1] 工具或者 **apt-get 工具** 一旦定义审计规则后,它会自动运行。过一段时间后,我们可以看看auditd是如何帮我们跟踪审计的。 -Auditd提供了另一个工具叫 **aureport** 。从名字上可以猜到, **aureport** 是使用系统日志生成简要报告的工具。 +Auditd提供了另一个工具叫 **aureport** 。从名字上可以猜到, **aureport** 是使用系统审计日志生成简要报告的工具。 我们已经配置auditd去跟踪/etc/passwd文件。auditd参数设置后一段时间后,audit.log 文件就创建出来了。 @@ -155,7 +166,7 @@ Auditd提供了另一个工具叫 **aureport** 。从名字上可以猜到, * 从上图可以看出,由两个用户在特定的时间授权失败。 -如果我们想看所有相关账户修改的事件,可以使用-m参数。 +如果我们想看所有账户修改相关的事件,可以使用-m参数。 $ sudo aureport -m @@ -165,8 +176,10 @@ Auditd提供了另一个工具叫 **aureport** 。从名字上可以猜到, * 我们已经添加如下规则: +- $ sudo auditctl -w /etc/passwd -p rwxa - $ sudo auditctl -w /production/ -- 现在,如果确信这些规则正常,我们可以将其添加到**/etc/audit/audit.rules**中使得规则永久有效。以下介绍如何将他们添加到/etc/audit/audit.rules中去。 + +现在,如果确信这些规则可以正常工作,我们可以将其添加到**/etc/audit/audit.rules**中使得规则永久有效。以下介绍如何将他们添加到/etc/audit/audit.rules中去。 ![](http://blog.linoxide.com/wp-content/uploads/2014/12/audit_rules_file.png) @@ -192,7 +205,7 @@ via: http://linoxide.com/how-tos/auditd-tool-security-auditing/ 作者:[Pungki Arianto][a] 译者:[shipsw](https://github.com/shipsw) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9fdc9f9324b786499a0b5d1b9d5ff905a38fb8ac Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 19 Feb 2015 12:31:11 +0800 Subject: [PATCH 0052/2517] Update 20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇文章。 --- ...teps to Setup Local Repository in Ubuntu using APT-mirror.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md index 2cba8c739f..f3a5a451d6 100644 --- a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md +++ b/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md @@ -1,3 +1,5 @@ +Translating by FSSlc + 4 Steps to Setup Local Repository in Ubuntu using APT-mirror ================================================================================ Today we will show you how to setup a local repository in your Ubuntu PC or Ubuntu Server straight from the official Ubuntu repository. There are a lot benefit of creating a local repository in your computer if you have a lot of computers to install software, security updates and fixes often in all systems, then having a local Ubuntu repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces the annual cost of Internet.. From 00d1c52258a3bb3427ef2ede55d854dcc441df7e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 19 Feb 2015 15:10:23 +0800 Subject: [PATCH 0053/2517] translating --- ...wo Google Chrome Icons From Dock In Elementary OS Freya.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md index cccee5971a..e8c39f25cf 100644 --- a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md +++ b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -1,3 +1,5 @@ +Translating---geekpi + Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya [Quick Tip] ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) @@ -52,4 +54,4 @@ via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://elementary.io/ -[2]:http://midori-browser.org/ \ No newline at end of file +[2]:http://midori-browser.org/ From 91ff15cfe0f15e2bb7f775ed75d08034e594415d Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 19 Feb 2015 15:27:52 +0800 Subject: [PATCH 0054/2517] translated --- ... Icons From Dock In Elementary OS Freya.md | 57 ------------------- ... Icons From Dock In Elementary OS Freya.md | 56 ++++++++++++++++++ 2 files changed, 56 insertions(+), 57 deletions(-) delete mode 100644 sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md create mode 100644 translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md diff --git a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md deleted file mode 100644 index e8c39f25cf..0000000000 --- a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md +++ /dev/null @@ -1,57 +0,0 @@ -Translating---geekpi - -Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya [Quick Tip] -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) - -This quick tip shows you **how to get rid of two Google Chrome icons from the dock in Elementary OS Freya**. - -I hardly use the default Midori browser in [Elementary OS][1] Freya as Google Chrome is my main browser across all OSes. While [Midori][2] is kept in the dock by default, you’ll have to search for Google Chrome in Slingshot (applications) every time you want to open Google Chrome. To save time, I presume you have selected the “keep in dock” option for a quick access to Chrome. - -The problem here is that when you click on the Chrome icon in the dock, it creates another instance of Google Chrome. This leaves you with two Chrome icons in the docks and this is something that might be ignored by many but definitely an annoyance and against the design. If you share the same feeling, let’s see how can we remove the second Google Chrome icon. - -### Remove two Google Chrome icons from dock in Elementary OS Freya ### - -#### Step 1: #### - -Remove Google Chrome from the dock. - -#### Step 2: #### - -Open the terminal and use the following command: - - cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications - -#### Step 3: #### - -Next we need to edit the google-chrome.desktop file. Use the following commands: - - scratch-text-editor ~/.local/share/applications/google-chrome.desktop - -It will open the google-chrome.desktop file in Scratch for editing. Under the [Desktop Entry] section, add the following line: - - StartupWMClass=Google-chrome-stable - -It will look a bit like this: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) - -#### Step 4: #### - -Go to Slingshot and open Google Chrome again. Do select “keep in dock” again. Close it and start it again to verify that it doesn’t open a new Chrome instance in the dock. No reboot of system is required here. - -I hope this quick tip helped you to remove multiple Google Chrome icons from dock in Elementary OS Freya. Feel free to ask your questions and drop your suggestions in the comment below. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://elementary.io/ -[2]:http://midori-browser.org/ diff --git a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md new file mode 100644 index 0000000000..19bb495231 --- /dev/null +++ b/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -0,0 +1,56 @@ +如何避免在ELemetary OS Freya中出现两个Google Chrome 图标[快速提示] +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) + +这篇文章会教你**如何避免在ELemetary OS Freya中出现两个Google Chrome 图标**。 + +Chrome才是我在所有系统中使用的主浏览器。而[Modori][2]默认在dock中,你不得不每次在使用Chrome时在Slingshot中搜索Google Chrome。为了节省时间,我假设你选择的是“保持在dock”中。 + +这里的问题是当你点击dock中的Chrome图标时,它会创建另外一个Google Chrome的实例。这就在dock中留下两个Chrome图标,这个或许可以被忽略但是很显然这是设计上的一个干扰。如果你有相同的感受,让我们看下如何移除这第二个Google Chrome图标。 + +### 在Elementary OS Freya的dock中删除第二个Google Chrome 图标 ### + +#### 第一步: #### + +从dock中删除Google Chrome。 + +#### 第二步: #### + +打开终端并使用下面的命令: + + cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications + +#### 第三步: #### + +接下来我们要编辑google-chrome.destop文件。使用下面的命令: + + scratch-text-editor ~/.local/share/applications/google-chrome.desktop + +这会用Scratch打开google-chrome.destop文件。在[Desktop Entry]段落下,加入下面的行: + + + StartupWMClass=Google-chrome-stable + +看上去像这样: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) + +#### 第四步: #### + +进入Slingshot并且再次打开Google Chrome。再次选择“keep in dock”。关闭并重启来验证它是否在dock中打开了另外一个新的Chrome实例。这里不需要重启系统。 + +我希望这篇提示能够帮助你删除Elementary OS Freya中多出的Chrome图标。有任何问题或建议让我在评论区中知道。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://elementary.io/ +[2]:http://midori-browser.org/ From 7babd7fd76adf4482bca0b121bee07c0d821ec11 Mon Sep 17 00:00:00 2001 From: zheng Date: Thu, 19 Feb 2015 15:31:43 +0800 Subject: [PATCH 0055/2517] Revert "translated" This reverts commit 91ff15cfe0f15e2bb7f775ed75d08034e594415d. --- ... Icons From Dock In Elementary OS Freya.md | 57 +++++++++++++++++++ ... Icons From Dock In Elementary OS Freya.md | 56 ------------------ 2 files changed, 57 insertions(+), 56 deletions(-) create mode 100644 sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md delete mode 100644 translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md diff --git a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md new file mode 100644 index 0000000000..e8c39f25cf --- /dev/null +++ b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -0,0 +1,57 @@ +Translating---geekpi + +Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya [Quick Tip] +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) + +This quick tip shows you **how to get rid of two Google Chrome icons from the dock in Elementary OS Freya**. + +I hardly use the default Midori browser in [Elementary OS][1] Freya as Google Chrome is my main browser across all OSes. While [Midori][2] is kept in the dock by default, you’ll have to search for Google Chrome in Slingshot (applications) every time you want to open Google Chrome. To save time, I presume you have selected the “keep in dock” option for a quick access to Chrome. + +The problem here is that when you click on the Chrome icon in the dock, it creates another instance of Google Chrome. This leaves you with two Chrome icons in the docks and this is something that might be ignored by many but definitely an annoyance and against the design. If you share the same feeling, let’s see how can we remove the second Google Chrome icon. + +### Remove two Google Chrome icons from dock in Elementary OS Freya ### + +#### Step 1: #### + +Remove Google Chrome from the dock. + +#### Step 2: #### + +Open the terminal and use the following command: + + cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications + +#### Step 3: #### + +Next we need to edit the google-chrome.desktop file. Use the following commands: + + scratch-text-editor ~/.local/share/applications/google-chrome.desktop + +It will open the google-chrome.desktop file in Scratch for editing. Under the [Desktop Entry] section, add the following line: + + StartupWMClass=Google-chrome-stable + +It will look a bit like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) + +#### Step 4: #### + +Go to Slingshot and open Google Chrome again. Do select “keep in dock” again. Close it and start it again to verify that it doesn’t open a new Chrome instance in the dock. No reboot of system is required here. + +I hope this quick tip helped you to remove multiple Google Chrome icons from dock in Elementary OS Freya. Feel free to ask your questions and drop your suggestions in the comment below. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://elementary.io/ +[2]:http://midori-browser.org/ diff --git a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md deleted file mode 100644 index 19bb495231..0000000000 --- a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md +++ /dev/null @@ -1,56 +0,0 @@ -如何避免在ELemetary OS Freya中出现两个Google Chrome 图标[快速提示] -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) - -这篇文章会教你**如何避免在ELemetary OS Freya中出现两个Google Chrome 图标**。 - -Chrome才是我在所有系统中使用的主浏览器。而[Modori][2]默认在dock中,你不得不每次在使用Chrome时在Slingshot中搜索Google Chrome。为了节省时间,我假设你选择的是“保持在dock”中。 - -这里的问题是当你点击dock中的Chrome图标时,它会创建另外一个Google Chrome的实例。这就在dock中留下两个Chrome图标,这个或许可以被忽略但是很显然这是设计上的一个干扰。如果你有相同的感受,让我们看下如何移除这第二个Google Chrome图标。 - -### 在Elementary OS Freya的dock中删除第二个Google Chrome 图标 ### - -#### 第一步: #### - -从dock中删除Google Chrome。 - -#### 第二步: #### - -打开终端并使用下面的命令: - - cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications - -#### 第三步: #### - -接下来我们要编辑google-chrome.destop文件。使用下面的命令: - - scratch-text-editor ~/.local/share/applications/google-chrome.desktop - -这会用Scratch打开google-chrome.destop文件。在[Desktop Entry]段落下,加入下面的行: - - - StartupWMClass=Google-chrome-stable - -看上去像这样: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) - -#### 第四步: #### - -进入Slingshot并且再次打开Google Chrome。再次选择“keep in dock”。关闭并重启来验证它是否在dock中打开了另外一个新的Chrome实例。这里不需要重启系统。 - -我希望这篇提示能够帮助你删除Elementary OS Freya中多出的Chrome图标。有任何问题或建议让我在评论区中知道。 - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ - -作者:[Abhishek][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://elementary.io/ -[2]:http://midori-browser.org/ From 8e83ef1442c76cb0cc40bf52b6818ff9215dbb48 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 19 Feb 2015 15:39:20 +0800 Subject: [PATCH 0056/2517] translated --- ... Icons From Dock In Elementary OS Freya.md | 57 ------------------- ... Icons From Dock In Elementary OS Freya.md | 56 ++++++++++++++++++ 2 files changed, 56 insertions(+), 57 deletions(-) delete mode 100644 sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md create mode 100644 translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md diff --git a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md deleted file mode 100644 index e8c39f25cf..0000000000 --- a/sources/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md +++ /dev/null @@ -1,57 +0,0 @@ -Translating---geekpi - -Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya [Quick Tip] -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) - -This quick tip shows you **how to get rid of two Google Chrome icons from the dock in Elementary OS Freya**. - -I hardly use the default Midori browser in [Elementary OS][1] Freya as Google Chrome is my main browser across all OSes. While [Midori][2] is kept in the dock by default, you’ll have to search for Google Chrome in Slingshot (applications) every time you want to open Google Chrome. To save time, I presume you have selected the “keep in dock” option for a quick access to Chrome. - -The problem here is that when you click on the Chrome icon in the dock, it creates another instance of Google Chrome. This leaves you with two Chrome icons in the docks and this is something that might be ignored by many but definitely an annoyance and against the design. If you share the same feeling, let’s see how can we remove the second Google Chrome icon. - -### Remove two Google Chrome icons from dock in Elementary OS Freya ### - -#### Step 1: #### - -Remove Google Chrome from the dock. - -#### Step 2: #### - -Open the terminal and use the following command: - - cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications - -#### Step 3: #### - -Next we need to edit the google-chrome.desktop file. Use the following commands: - - scratch-text-editor ~/.local/share/applications/google-chrome.desktop - -It will open the google-chrome.desktop file in Scratch for editing. Under the [Desktop Entry] section, add the following line: - - StartupWMClass=Google-chrome-stable - -It will look a bit like this: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) - -#### Step 4: #### - -Go to Slingshot and open Google Chrome again. Do select “keep in dock” again. Close it and start it again to verify that it doesn’t open a new Chrome instance in the dock. No reboot of system is required here. - -I hope this quick tip helped you to remove multiple Google Chrome icons from dock in Elementary OS Freya. Feel free to ask your questions and drop your suggestions in the comment below. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://elementary.io/ -[2]:http://midori-browser.org/ diff --git a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md new file mode 100644 index 0000000000..19bb495231 --- /dev/null +++ b/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -0,0 +1,56 @@ +如何避免在ELemetary OS Freya中出现两个Google Chrome 图标[快速提示] +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) + +这篇文章会教你**如何避免在ELemetary OS Freya中出现两个Google Chrome 图标**。 + +Chrome才是我在所有系统中使用的主浏览器。而[Modori][2]默认在dock中,你不得不每次在使用Chrome时在Slingshot中搜索Google Chrome。为了节省时间,我假设你选择的是“保持在dock”中。 + +这里的问题是当你点击dock中的Chrome图标时,它会创建另外一个Google Chrome的实例。这就在dock中留下两个Chrome图标,这个或许可以被忽略但是很显然这是设计上的一个干扰。如果你有相同的感受,让我们看下如何移除这第二个Google Chrome图标。 + +### 在Elementary OS Freya的dock中删除第二个Google Chrome 图标 ### + +#### 第一步: #### + +从dock中删除Google Chrome。 + +#### 第二步: #### + +打开终端并使用下面的命令: + + cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications + +#### 第三步: #### + +接下来我们要编辑google-chrome.destop文件。使用下面的命令: + + scratch-text-editor ~/.local/share/applications/google-chrome.desktop + +这会用Scratch打开google-chrome.destop文件。在[Desktop Entry]段落下,加入下面的行: + + + StartupWMClass=Google-chrome-stable + +看上去像这样: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/two_Google_Chrome_Elementary_Freya.png) + +#### 第四步: #### + +进入Slingshot并且再次打开Google Chrome。再次选择“keep in dock”。关闭并重启来验证它是否在dock中打开了另外一个新的Chrome实例。这里不需要重启系统。 + +我希望这篇提示能够帮助你删除Elementary OS Freya中多出的Chrome图标。有任何问题或建议让我在评论区中知道。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://elementary.io/ +[2]:http://midori-browser.org/ From 651ba8285ee3bf889bbaab474b9c83b75e5564c3 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 19 Feb 2015 22:43:47 +0800 Subject: [PATCH 0057/2517] PUB:20150205 LinuxQuestions Survey Results Surface Top Open Source Projects @jerryling315 --- ...rvey Results Surface Top Open Source Projects.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename {translated/talk => published}/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md (54%) diff --git a/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md b/published/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md similarity index 54% rename from translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md rename to published/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md index 0052aab380..9430f11ada 100644 --- a/translated/talk/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md +++ b/published/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md @@ -1,17 +1,16 @@ -LinuxQuestions Survey Results Surface Top Open Source Projects +LinuxQuestions 问卷调查揭晓最佳开源项目 ================================================================================ ![](http://farm5.static.flickr.com/4099/4777335328_3cc363c419_m.jpg) -在Linux用户社区中, 很多人每年都会期待来自 LinuxQuestions.org 细致并可靠的年度问卷调查结果. 如同[Susan在她的报告][1]中指出的那样, 今年的[结果][2]着重于调查网站读者心中最棒的开源项目. 这份报告目前已经完成. 在LinuxQuestions的大多数人都是"专家级"的用户, 他们经常在网站上在线回答Linux新手们的提问. +在Linux用户社区中, 很多人每年都会期待来自 LinuxQuestions.org 细致可靠的年度问卷调查报告。如同[Susan在她的报告][1]中指出的那样, 今年的[结果][2]着重于调查网站读者心中最棒的开源项目。 这份报告目前已经完成。 在LinuxQuestions的大多数人都是“专家级”的用户, 他们经常在网站上在线回答Linux新手们的提问。 -在Susan所作的报告的附加内容里, 你可以看到由"专家"们对开源世界的关注点分布. -In addition to the summary results that Susan provided in her post, below you'll find a graphical snapshot of what the experts took note of on the open source front. +在Susan所作的报告的附加内容里, 你可以看到由“专家”们对开源世界的关注点分布。 -你也可以在[这里][3]找到一份较为精美的调查问卷总结图.这里呈现了网站投票得出的最佳Linux发行版, 可以看到Mint和Slackwaer平分了半壁江山: +你也可以在[这里][3]找到一份较为精美的调查问卷总结图.这里呈现了网站投票得出的最佳Linux发行版, 可以看到Mint和Slackwaer平分了半壁江山: ![](http://i1311.photobucket.com/albums/s669/webworkerdaily/lin_zps9ogvyrty.png) -而下图则是网站票选出的得出的最佳云项目. 值得注意的是, LinuxQuestions的用户群体给予了ownCloud项目极高的评价. 你一定得亲自去看看调查结果的详情, 也看看 [Susan关于各项目"赢家"][4]的总结 , 还有[一堆精美的图表][5]. +而下图则是网站票选出的得出的最佳云项目。值得注意的是, LinuxQuestions的用户群体给予了ownCloud项目极高的评价。 你一定得亲自去看看调查结果的详情, 也看看 [Susan 关于各项目“赢家”][4]的总结, 还有[一堆精美的图表][5]。 ![](http://i1311.photobucket.com/albums/s669/webworkerdaily/lin2_zps9nxf7yyi.png) @@ -21,7 +20,7 @@ via: http://ostatic.com/blog/linuxquestions-survey-results-surface-top-open-sour 作者:[Sam Dean][a] 译者:[jerryling315](https://github.com/jerryling315) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a12cc5dd8a681894f2516a367a4eeeb03419e9f9 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Feb 2015 00:00:52 +0800 Subject: [PATCH 0058/2517] PUB:20150121 If a 32-bit integer overflows @KayGuoWhu --- .../20150121 If a 32-bit integer overflows.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) rename {translated/talk => published}/20150121 If a 32-bit integer overflows.md (87%) diff --git a/translated/talk/20150121 If a 32-bit integer overflows.md b/published/20150121 If a 32-bit integer overflows.md similarity index 87% rename from translated/talk/20150121 If a 32-bit integer overflows.md rename to published/20150121 If a 32-bit integer overflows.md index 651e829189..30687f4bc8 100644 --- a/translated/talk/20150121 If a 32-bit integer overflows.md +++ b/published/20150121 If a 32-bit integer overflows.md @@ -1,16 +1,17 @@ 如果使用32位整型会溢出,那么是否可以使用一个40位结构体代替64位长整型? ---------- +====== + +###问题: -#问题: 假如说,使用32位的整型会溢出,在不考虑使用长整型的情况下,如果我们只需要表示2的40次方范围内的数,是否可以利用某些40位长的数据类型来表示呢?这样的话,每个整型数就可以节省24位的空间。 如果可以,该怎么做? 需求是:我现在必须处理数以亿计的数字,所以在存储空间上受到了很大的限制。 -#回答: +###回答: -##可以是可以,但是…… +可以是可以,但是…… 这种方法的确可行,但这么做通常没什么意义(因为几乎没有程序需要处理多达十亿的数字): @@ -22,14 +23,15 @@ struct bad_idea }; ``` -在这里,变量var占据40位大小,但是以生成代码时拥有非常低的运行效率来换取的(事实证明“非常”二字言过其实了——测试中程序开销仅仅增加了1%到2%,正如下面的测试时间所示),而且这么做通常没什么用。除非你还需要保存一个24位的值(或者是8位、16位的值),这样你皆可以它们放到同一个结构中。不然的话,因为对齐内存地址产生的开销会抵消这么做带来的好处。 +在这里,变量var占据40位大小,但是这是以生成代码时拥有非常低的运行效率来换取的(事实证明“非常”二字言过其实了——测试中程序开销仅仅增加了1%到2%,正如下面的测试时间所示),而且这么做通常没什么用。除非你还需要保存一个24位的值(或者是8位、16位的值),这样你皆可以它们放到同一个结构中。不然的话,因为对齐内存地址产生的开销会抵消这么做带来的好处。 在任何情况下,除非你是真的需要保存数以亿计的数字,否则这样做给内存消耗带来的好处是可以忽略不计的(但是为了处理这些位字段的额外代码量是不可忽略的!)。 ###说明: 在此期间,这个问题已经被更新了,是为了说明实际上确实有需要处理数以亿计数字的情况。假设,采取某些措施来防止因为结构体对齐和填充抵消好处(比如在后24位中存储其它的内容,或者使用多个8位来存储40位),那么这么做就变得有意义了。 -如果有十亿个数,每个数都节省三个字节的空间,那么这么做就非常有用了。因为使用更小的空间存储要求更少的内存页,也就会产生更少的cache和TLB不命中和内存缺页(单个缺页会产生数以千万计的指令(译者注:直译是这样,但语义说不通!))。 + +如果有十亿个数,每个数都节省三个字节的空间,那么这么做就非常有用了。因为使用更小的空间存储要求更少的内存页,也就会产生更少的cache和TLB不命中和内存缺页(单个缺页会产生数以千万计的指令 [译者注:直译是这样,但语义说不通!])。 尽管上面提到的情况不足以充分利用到剩余的24位(它仅仅使用了40位部分),如果确实在剩余位中放入了有用的数据,那么使用类似下面的方法会使得这种思路就管理内存而言显得非常有用。 @@ -43,9 +45,10 @@ struct using_gaps ``` 结构体大小和对齐长度等于64位整型的大小,所以只要使用得当就不会浪费空间,比如对一个保存10亿个数的数组使用这个结构(不考虑使用指定编译器的扩展)。如果你不会用到一个8位的值,那么你可以使用一个48位和16位的值(giving a bigger overflow margin)。 + 或者以牺牲可用性为代价,把8个64位的值放入这样的结构体中(或者使用40和64的组合使得其和满足320)。当然,在这种情况下,通过代码去访问数组结构体中的元素会变得非常麻烦(尽管一种方法是实现一个operator[]在功能上还原线性数组,隐藏结构体的复杂性)。 -更新: +###更新: 我写了一个快速测试工具,只是为了获得位字段的开销(以及伴随位字段引用的重载操作)。由于长度限制将代码发布在gcc.godbolt.org上,在本人64位Win7上的测试结果如下: @@ -85,7 +88,7 @@ via:[stackoverflow](http://stackoverflow.com/questions/27705409/if-a-32-bit-inte 作者:[Damon][a][Michael Kohne][b] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 20ae8ef474e5ea70b6effa189316ff84d72beafa Mon Sep 17 00:00:00 2001 From: FSSlc Date: Fri, 20 Feb 2015 09:39:23 +0800 Subject: [PATCH 0059/2517] Translated 20150211 Best Known Linux Archive or Compress Tools.md --- ...t Known Linux Archive or Compress Tools.md | 231 ------------------ ...t Known Linux Archive or Compress Tools.md | 229 +++++++++++++++++ 2 files changed, 229 insertions(+), 231 deletions(-) delete mode 100644 sources/tech/20150211 Best Known Linux Archive or Compress Tools.md create mode 100644 translated/tech/20150211 Best Known Linux Archive or Compress Tools.md diff --git a/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md b/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md deleted file mode 100644 index 86623a5c99..0000000000 --- a/sources/tech/20150211 Best Known Linux Archive or Compress Tools.md +++ /dev/null @@ -1,231 +0,0 @@ -Translating by FSSlc - -Best Known Linux Archive / Compress Tools -================================================================================ -Sending and receiving large files and pictures over the internet is a headache many times. Compression and decompression tools are meant to address this problem. Lets take a quick overview of a few open source tools that are available to make our jobs simpler. - -Tar -gzip, gunzip -bzip2, bunzip2 -7-Zip - -### Tar ### - -Tar is derived from 'Tape archiver' as this was initially used for archiving and storing files on magnetic tapes. It is a GNU software. It can compress a set of files (archives), extract them and manipulate those which already exist. It is useful for storing, backing up and transporting files. Tar can preserve file and directory structure while creating the archives. Files archived using tar have '.tar' extensions. - -Basic Usage - -#### a) Creating an archive (c / --create) #### - - tar --create --verbose --file=archive.tar file1 file2 file3 - -OR - - tar cvf archive.tar file1 file2 file3 - -![tar cvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-cvf.png) - -creating an archive - -#### b) Listing an archive ( t / --list) #### - - tar --list archive.tar - -![tar tvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-tvf.png) - -Listing the contents - -#### c) Extracting an archive (x / --extract) #### - - tar xvf archive.tar - - tar xvf archive.tar --wildcards '*.c' - extracts files with only *.c extension from the archive. - -![tar xvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-xvf.png) - -Extracting files - -![tar xvf --wildcards](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-wildcard.png) - -Extract only the required files - -#### d) Updating an archive ( u / --update) #### - - tar uvf archive.tar newfile.c - updates the archive by adding newfile.c if its version is newer than the existing one. - -![tar uvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-uvf.png) - -Updating an archive - -#### e) Delete from an archive (--delete) #### - - tar--delete -f archive.tar file1.c - deletes 'file1.c' from the tar ball 'archive.tar' - -![tar --delete](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-delete.png) - -Deleting files - -Refer to [tar home page][1] for its detailed usage - -### Gzip / Gunzip ### - -Gzip stands for GNU zip. It is a compression utility that is commonly available in Linux operating system. Compressed files have an extension of '*.gz' - -**Basic Usage** - -#### a) Compressing files #### - - gzip file(s) - -Each file gets compressed individually - -![gzip](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip.png) - -Compress files - -This generally deletes the original files after compression. We can keep the original file by using the -c option. - - gzip -c file > file.gz - -![gzip-c](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-c.png) - -Keep original files after compressing - -We can also compress a group of files into a single file - - cat file1 file2 file3 | gzip > archieve.gz - -![gz group](http://blog.linoxide.com/wp-content/uploads/2015/01/gz-group.png) - -Compressing a group of files - -#### b) Checking compression ratio #### - -Compression ratio of the compressed file(s) can be verified using the '-l' option. - - gzip -l archieve.gz - -![gzip -l](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-l.png) - -Checking compression ratio - -#### c) Unzipping files #### - -Gunzip is used for unzipping files. Here also, original files are deleted after decompression. Use the -c option to retain original files. - - gunzip -c archieve.gz - -![gunzip -c](http://blog.linoxide.com/wp-content/uploads/2015/01/gunzip-c.png) - -Unzipping files - -Using '-d' option with gzip command has the same effect of gunzip on compressed files. - -More details can be obtained from [gzip home page][2] - -### Bzip2 / Bunzip2 ### - -[Bzip2][3] is also a compression tool like gzip but can compress files to smaller sizes than that is possible with other traditional tools. But the drawback is that it is slower than gzip. - -**Basic Usage** - -#### a) File Compression #### - -Generally, no options are used for compression and the files to be compressed are passed as arguments. Each file gets compressed individually and compressed files will have the extension 'bz2'. - - bzip2 file1 file2 file3 - -![bzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2.png) - -File Compression - -Use '-k' option to keep the original files after compression / decompression. - -![bzip2 -k](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-k.png) - -Retaining original files after compression - -'-d' option is used for forced decompression. - -![bzip2 -d](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-d.png) - -Delete files using -d option - -#### b) Decompression #### - - bunzip2 filename - -![bunzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bunzip2.png) - -Decompressing files - -bunzip2 can decompress files with extensions bz2, bz, tbz2 and tbz. Files with tbz2 and tbz will end up with '.tar' extension after decompression. - - bzip2 -dc performs the function of decompressing files to the stdout - -### 7-zip ### - -[7-zip][4] is another open source file archiver. It uses 7z format which is a new compression format and provides high-compression ratio. Hence, it is considered to be better than the previously mentioned compression tools. It is available under Linux as p7zip package. The package includes three binaries – 7z, 7za and 7zr. Refer to the [p7zip wiki][5] for differences between these binaries. In this article, we will be using 7zr to explain the usage. Archived files will have '.7z' extension. - -**Basic usage** - -#### a) Creating an archive #### - - 7zr a archive-name.7z file-name(s) / directory-name(s) - -![7zr a](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-a.png) - -Creating an archive - -#### b) Listing an archive #### - - 7zr l archive-name.7z - -![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-l.png) - -Listing an archive - -#### c) Extracting an archive #### - - 7zr e archive-name.7z - -![7zr e](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-e.png) - -Extracting an archive - -#### d) Updating an archive #### - - 7zr u archive-name.7z new-file - -![7zr u](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-u.png) - -Updating an archive - -#### e) Deleting files from an archive #### - - 7zr d archive-name.7z file-to-be-deleted - -![7zr d](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d.png) - -Deleting files - -![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d-l.png) - -Verifying file deletion - --------------------------------------------------------------------------------- - -via: http://linoxide.com/tools/linux-compress-decompress-tools/ - -作者:[B N Poornima][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/bnpoornima/ -[1]:http://www.gnu.org/software/tar/ -[2]:http://www.gzip.org/ -[3]:http://www.bzip.org/ -[4]:http://www.7-zip.org/ -[5]:https://wiki.archlinux.org/index.php/p7zip diff --git a/translated/tech/20150211 Best Known Linux Archive or Compress Tools.md b/translated/tech/20150211 Best Known Linux Archive or Compress Tools.md new file mode 100644 index 0000000000..9938efd5a5 --- /dev/null +++ b/translated/tech/20150211 Best Known Linux Archive or Compress Tools.md @@ -0,0 +1,229 @@ +Linux 下最为人熟知的归档/压缩工具 +================================================================================ +很多时候,通过互联网发送或接收大文件和图片是一件令人头疼的事。压缩及解压缩工具正好可以应对这个问题。下面让我们快速浏览一些可以使得我们的工作更加轻松的开源工具。 + +Tar +gzip, gunzip +bzip2, bunzip2 +7-Zip + +### Tar ### + +Tar 由 'Tape archiver' 衍生而来,最初被用来在磁带上归档和存储文件。Tar 是一个 GNU 软件,它可以压缩一组文件(归档),或提取它们以及对已经存在的压缩文件进行相关操作。在存储、备份以及转移文件方面,它是很有帮助的。在创建归档文件时,Tar 可以保持原有文件和目录结构不变。通过 Tar 归档的文件的后缀名为 ‘.tar’。 + +基本用法 + +#### a) 创建归档 (c / --create) #### + + tar --create --verbose --file=archive.tar file1 file2 file3 + +或 + + tar cvf archive.tar file1 file2 file3 + +![tar cvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-cvf.png) + +创建一个归档 + +#### b) 列出归档文件内容 ( t / --list) #### + + tar --list archive.tar + +![tar tvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-tvf.png) + +列出归档中包含的文件 + +#### c) 提取归档 (x / --extract) #### + + tar xvf archive.tar + + tar xvf archive.tar --wildcards '*.c' - 从归档中提取后缀名为 *.c 的文件。 + +![tar xvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-xvf.png) + +提取文件 + +![tar xvf --wildcards](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-wildcard.png) + +只提取需要的文件 + +#### d) 对归档进行更新 ( u / --update) #### + + tar uvf archive.tar newfile.c - 假如归档的版本比先前存在的版本新,通过添加文件 newfile.c 来更新归档. + +![tar uvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-uvf.png) + +更新一个归档 + +#### e) 从归档中删除文件 (--delete) #### + + tar--delete -f archive.tar file1.c - 从压缩包'archive.tar' 中删除文件'file1.c' + +![tar --delete](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-delete.png) + +删除文件 + +更加具体的使用方法请参考[tar 主页][1]。 + +### Gzip / Gunzip ### + +Gzip 代表 GNU zip,它是一个被广泛用于 Linux 操作系统中的压缩应用,被其压缩的文件的后缀名为'*.gz' 。 + +** 基本用法 ** + +#### a) 压缩文件 #### + + gzip file(s) + +每个文件将被单独压缩。 + +![gzip](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip.png) + +压缩文件 + +通常在压缩完成后,它会将原来的文件删除。我们可以使用 `-c` 选项来保留原来的文件。 + + gzip -c file > file.gz + +![gzip-c](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-c.png) + +压缩后保留原有文件 + +我们也可以将一组文件压缩到一个单独的文件中 + + cat file1 file2 file3 | gzip > archieve.gz + +![gz group](http://blog.linoxide.com/wp-content/uploads/2015/01/gz-group.png) + +压缩一组文件 + +#### b) 检查压缩比 #### + +被压缩文件的压缩比可以使用 ‘-l’ 选项来进行检验。 + + gzip -l archieve.gz + +![gzip -l](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-l.png) + +检查压缩率 + +#### c) 解压文件 #### + +Gunzip 被用来解压文件,在这里,原有文件在被解压后同样会被删除。使用 `-c`选项来保留原始文件。 + + gunzip -c archieve.gz + +![gunzip -c](http://blog.linoxide.com/wp-content/uploads/2015/01/gunzip-c.png) + +解压文件 + +gzip 加上'-d'选项 和 gunzip 对压缩文件有同样的效果。 + +更多细节可以从 [gzip 主页][2] 得到。 + +### Bzip2 / Bunzip2 ### + +同 gzip 一样,[Bzip2][3] 也是一个压缩工具,与其他传统的工具相比,它可以将文件压缩到更小,但其缺点为:运行速度比 gzip 慢。 + +** 基本用法 ** + +#### a) 压缩文件 #### + +一般情况下,针对压缩而言,Bzip2 没有选项可供选择,将被压缩的文件被传递为它的参数。每个文件被单独压缩,且压缩文件以 'bz2' 为后缀名。 + + bzip2 file1 file2 file3 + +![bzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2.png) + +文件压缩 + +使用 '-k' 选项可以使得 在压缩或解压缩之后保留原有的文件。 + +![bzip2 -k](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-k.png) + +在压缩后保留原有文件。 + +'-d' 选项被用来强制解压缩。 + +![bzip2 -d](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-d.png) + +使用 -d 选项删除文件 (!! 注:我(FSSlc)认为 这里的图片说明有误,可以参考 manpage或bzip 的官网来校对一下。) + +#### b) 解压 #### + + bunzip2 filename + +![bunzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bunzip2.png) + +解压文件 + +bunzip2 可以解压后缀名为 bz2, bz, tbz2 和 tbz 的文件。带有 tbz2 和 tbz 的文件在压缩后,后缀名将变为'.tar' 。 + + bzip2 -dc 执行解压文件到标准输出的功能。 + +### 7-zip ### + +[7-zip][4] 是另一个开源压缩软件。它使用 7z 这种新的压缩格式,并支持高压缩比。因此,它被认为是比先前提及的压缩工具更好的软件。在 Linux 下,可以通过 p7zip 软件包得到,该软件包里包含 3 个二进制文件 – 7z, 7za 和 7zr,读者可以参考 [p7zip wiki][5] 来了解这三个二进制文件之间的不同。在本篇中,我们将使用 7zr 来解释 7-zip 的用法。归档文件以 '.7z' 为后缀名。 + +** 基本用法 ** + +#### a) 创建归档 #### + + 7zr a archive-name.7z file-name(s) / directory-name(s) + +![7zr a](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-a.png) + +创建一个归档文件 + +#### b) 列出归档包含文件 #### + + 7zr l archive-name.7z + +![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-l.png) + +列出归档中包含的文件 + +#### c) 提取归档文件 #### + + 7zr e archive-name.7z + +![7zr e](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-e.png) + +提取归档 + +#### d) 更新归档文件 #### + + 7zr u archive-name.7z new-file + +![7zr u](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-u.png) + +更新一个归档文件 + +#### e) 从归档文件中删除文件 #### + + 7zr d archive-name.7z file-to-be-deleted + +![7zr d](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d.png) + +删除文件 + +![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d-l.png) + +确认文件删除 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/linux-compress-decompress-tools/ + +作者:[B N Poornima][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bnpoornima/ +[1]:http://www.gnu.org/software/tar/ +[2]:http://www.gzip.org/ +[3]:http://www.bzip.org/ +[4]:http://www.7-zip.org/ +[5]:https://wiki.archlinux.org/index.php/p7zip \ No newline at end of file From 5600ef3e03590034c92d0f5babdc384656dc5e02 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Fri, 20 Feb 2015 09:43:18 +0800 Subject: [PATCH 0060/2517] Translated 20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md --- ...l Repository in Ubuntu using APT-mirror.md | 127 ------------------ ...l Repository in Ubuntu using APT-mirror.md | 125 +++++++++++++++++ 2 files changed, 125 insertions(+), 127 deletions(-) delete mode 100644 sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md create mode 100644 translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md diff --git a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md deleted file mode 100644 index f3a5a451d6..0000000000 --- a/sources/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md +++ /dev/null @@ -1,127 +0,0 @@ -Translating by FSSlc - -4 Steps to Setup Local Repository in Ubuntu using APT-mirror -================================================================================ -Today we will show you how to setup a local repository in your Ubuntu PC or Ubuntu Server straight from the official Ubuntu repository. There are a lot benefit of creating a local repository in your computer if you have a lot of computers to install software, security updates and fixes often in all systems, then having a local Ubuntu repository is an efficient way. Because all required packages are downloaded over the fast LAN connection from your local server, so that it will save your Internet bandwidth and reduces the annual cost of Internet.. - -You can setup a local repository of Ubuntu in your local PC or server using many tools, but we'll featuring about APT-Mirror in this tutorial. Here, we'll be mirroring packages from the default mirror to our Local Server or PC and we'll need at least **120 GB** or more free space in your local or external hard drive. It can be configured through a **HTTP** or **FTP** server to share its software packages with local system clients. - -We'll need to install Apache Web Server and APT-Mirror to get our stuffs working out of the box. Here are the steps below to configure a working local repository: - -### 1. Installing Required Packages ### - -First of all, we are going to pull whole packages from the public repository of Ubuntu package server and save them in our local Ubuntu server hard disk. - -We'll first install a web server to host our local repository. We'll install Apache web server but you can install any web server you wish, web server are necessary for the http protocol. You can additionally install FTP servers like proftpd, vsftpd,etc if you need to configure for ftp protocols and Rsync for rsync protocols. - - $ sudo apt-get install apache2 - -And then we'll need to install apt-mirror: - - $ sudo apt-get install apt-mirror - -![apt-mirror-installation](http://blog.linoxide.com/wp-content/uploads/2014/12/apt-mirror-install.png) - -**Note: As I have already mentioned that we'll need at least 120 GBs free space to get all the packages mirrored or download.** - -### 2. Configuring APT-Mirror ### - -Now create a directory on your harddisk to save all packages. For example, let us create a directory called “/linoxide”. We are going to save all packages in this directory: - - $ sudo mkdir /linoxide - -![repo-dir](http://blog.linoxide.com/wp-content/uploads/2014/12/mkdir-linoxide.png) - -Now, open the file **/etc/apt/mirror.list** file - - $ sudo nano /etc/apt/mirror.list - -![apt-mirror-edit](http://blog.linoxide.com/wp-content/uploads/2014/12/edit-mirror-list-300x7.png) - -Copy the below lines of configuration to mirror.list and edit as your requirements. - - ############# config ################## - # - set base_path /linoxide - # - # set mirror_path $base_path/mirror - # set skel_path $base_path/skel - # set var_path $base_path/var - # set cleanscript $var_path/clean.sh - # set defaultarch - # set postmirror_script $var_path/postmirror.sh - # set run_postmirror 0 - set nthreads 20 - set _tilde 0 - # - ############# end config ############## - - deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse - deb http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse - deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse - #deb http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse - #deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse - - deb-src http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse - deb-src http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse - deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse - #deb-src http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse - #deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse - - clean http://archive.ubuntu.com/ubuntu - -![mirror-list-config](http://blog.linoxide.com/wp-content/uploads/2014/12/mirror-list-config.png) - -**Note: You can replace the above official mirror server url by the nearest one, you can get your nearest server by visiting the page [Ubuntu Mirror Server][1]. If you are not in hurry and can wait for the mirroring, you can go with the default official one.** - -Here, we are going to mirror package repository of the latest and greatest LTS release of Ubuntu ie. Ubuntu 14.04 LTS (Trusty Tahr) so, we have configured trusty. If you need to mirror of Saucy or other version of Ubuntu, please edit it as its codename. - -Now, we'll have to run apt-mirror which will now get/mirror all the packages in the repository. - - sudo apt-mirror - -It will take time to download all the packages from the Ubuntu Server which depends upon the connection speed and performance with respect to you and the mirror server. I have interrupted the download as I have already done that... - -![downloading-packages](http://blog.linoxide.com/wp-content/uploads/2014/12/downloading-index.png) - -### 3.Configuring Web Server ### - -To be able to access the repo from other computers you need a webserver. You can also do it via ftp but I choose to use a webserver as I mentioned in above step 1. So, we are now gonna configure Apache Server: - -We will create a symlink from our local repo's directory to a directory ubuntu in the hosting directory of Apache ie /var/www/ubuntu - - $ sudo ln -s /linoxide /var/www/ubuntu - $ sudo service apache2 start - -![symlinks-apache2](http://blog.linoxide.com/wp-content/uploads/2014/12/symblink-apache2.png) - -The above command will allow us to browse our Mirrored Repo from our localhost ie http://127.0.0.1 by default. - -### 4. Configuring Client Side ### - -Finally, we need to add repository source in other computers which will fetch the packages and repository from our computer. To do that, we'll need to edit /etc/apt/sources.list and add the following lines. - - $ sudo nano /etc/apt/sources.list - -Add this line in /etc/apt/sources.list and save. - - deb http://192.168.0.100/ubuntu/ trusty main restricted universe - -**Note: here 192.168.0.100 is the LAN IP address of our server computer, you need to replace that with yours.** - - $ sudo apt-get update - -Finally, we are done. Now you can install the required packages using sudo apt-get install packagename from your local Ubuntu repository with high speed download and with low bandwidth. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/setup-local-repository-ubuntu/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://launchpad.net/ubuntu/+archivemirrors diff --git a/translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md new file mode 100644 index 0000000000..c49b52c461 --- /dev/null +++ b/translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md @@ -0,0 +1,125 @@ +在 Ubuntu中使用 APT-mirror 简单四步配置本地软件仓库 +================================================================================ +今天,我们将向你展示如何在你的 Ubuntu 个人电脑 或 Ubuntu 服务器 中,直接通过 Ubuntu 官方软件仓库来配置本地软件仓库。在你的电脑中创建一个本地软件仓库有着许多的好处。假如你有许多电脑需要安装软件,安全升级和修复,那么配置一个本地软件仓库是一个高效的方法。因为,所有需要安装的软件包都可以通过快速局域网连接从你的本地服务器中下载,这样可以节省你的网络带宽,降低互联网的年度开支 ... + +你可以使用多种工具在你的本地个人电脑或服务器中配置一个 Ubuntu 的本地软件仓库,但在本教程中,我们将为你介绍 APT-Mirror。这里,我们将把默认的镜像包镜像到 我们本地的服务器或个人电脑中,并且在本地或外置硬盘中,我们至少需要 **120 GB** 或更多的可用空间。 上面的任务可以通过配置一个 **HTTP** 或 **FTP** 服务器来 与本地系统客户端共享软件包。 + +我们需要安装 Apache 网络服务器和 APT-Mirror 来使得我们的工作得以开始。下面是配置一个可工作的本地软件仓库的步骤: + +### 1. 安装需要的软件包 ### + +首先,我们需要从 Ubuntu 的公共软件包仓库中取得所有的软件包,然后在我们本地的 Ubuntu 服务器硬盘中保存它们。 + +首先我们安装一个网络服务器来承载我们的本地软件仓库。这里我们将安装 Apache 网络服务器,但你可以安装任何你中意的网络服务器,对于 http 协议,网络服务器是必须的。假如你需要配置 ftp 协议 及 rsync 协议,你还可以再分别额外安装 FTP 服务器,如 proftpd, vsftpd 等等 和 Rsync 。 + + $ sudo apt-get install apache2 + +然后我们需要安装 apt-mirror: + + $ sudo apt-get install apt-mirror + +![apt-mirror-installation](http://blog.linoxide.com/wp-content/uploads/2014/12/apt-mirror-install.png) + +**注: 正如我先前提到的,我们需要至少 120 GB 的可用空间来使得所有的软件包被镜像或下载。** + +### 2. 配置 APT-Mirror ### + +现在,在你的硬盘上创建一个目录来保存所有的软件包。例如,我们创建一个名为 `/linoxide`的目录,我们将在这个目录中保存所有的软件包: + + $ sudo mkdir /linoxide + +![repo-dir](http://blog.linoxide.com/wp-content/uploads/2014/12/mkdir-linoxide.png) + +现在,打开文件 **/etc/apt/mirror.list** : + + $ sudo nano /etc/apt/mirror.list + +![apt-mirror-edit](http://blog.linoxide.com/wp-content/uploads/2014/12/edit-mirror-list-300x7.png) + +复制下面的命令行配置到 `mirror.list`文件中并按照你的需求进行修改: + + ############# config ################## + # + set base_path /linoxide + # + # set mirror_path $base_path/mirror + # set skel_path $base_path/skel + # set var_path $base_path/var + # set cleanscript $var_path/clean.sh + # set defaultarch + # set postmirror_script $var_path/postmirror.sh + # set run_postmirror 0 + set nthreads 20 + set _tilde 0 + # + ############# end config ############## + + deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse + deb http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse + deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse + #deb http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse + #deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse + + deb-src http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse + deb-src http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse + deb-src http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse + #deb-src http://archive.ubuntu.com/ubuntu trusty-proposed main restricted universe multiverse + #deb-src http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse + + clean http://archive.ubuntu.com/ubuntu + +![mirror-list-config](http://blog.linoxide.com/wp-content/uploads/2014/12/mirror-list-config.png) + +**注: 你可以将上面的官方镜像服务器网址更改为离你最近的服务器的网址,而这可以访问 [Ubuntu Mirror Server][1]来得到。假如你并不着急并可以等待镜像的完成,你可以沿用默认的官方镜像服务器网址。** + +这里,我们将要镜像 最新和最大的 Ubuntu LTS 发行版 --- 即 Ubuntu 14.04 LTS (Trusty Tahr) --- 的软件包仓库,所以在上面的配置中发行版本号为 trusty 。假如我们需要镜像 Saucy 或其他的 Ubuntu 发行版本,请修改上面的 trusy 为相应的代号。 + +现在,我们必须运行 apt-mirror 来下载或镜像 官方仓库中的所有软件包。 + + sudo apt-mirror + +从 Ubuntu 服务器中下载所有的软件包所花费的时间取决于 你和镜像服务器之间的网络连接速率和性能。我已经中断了下载,因为我已经下载好了 ... + +![downloading-packages](http://blog.linoxide.com/wp-content/uploads/2014/12/downloading-index.png) + +### 3.配置网络服务器 ### + +为了使得其他的电脑能够取得这个软件仓库,你需要一个网络服务器。你也可以通过 ftp 来完成这件事,但我选择使用一个网络服务器因为在上面的步骤 1 中我提及到使用网络服务器。因此,我们现在要对 Apache 服务器进行配置: + +我们将为我们本地的软件仓库目录 建立一个到 Apache 托管目录 --- 即 `/var/www/ubuntu` --- 的符号链接。 + + $ sudo ln -s /linoxide /var/www/ubuntu + $ sudo service apache2 start + +![symlinks-apache2](http://blog.linoxide.com/wp-content/uploads/2014/12/symblink-apache2.png) + +上面的命令将允许我们从本地主机(localhost) --- 即 http://127.0.0.1(默认情况下) --- 浏览我们的镜像软件仓库。 + +### 4. 配置客户端 ### + +最后,我们需要在其他的电脑中添加软件源,来使得它们可以从我们的电脑中取得软件包或软件仓库。为达到此目的,我们需要编辑 `/etc/apt/sources.list` 文件并添加下面的命令: + + $ sudo nano /etc/apt/sources.list + +添加下面的一行到` /etc/apt/sources.list`中并保存。 + + deb http://192.168.0.100/ubuntu/ trusty main restricted universe + +**注: 这里的 192.168.0.100 是我们的服务器电脑的 局域网 IP 地址,你需要替换为你的服务器电脑的局域网 IP 地址** + + $ sudo apt-get update + +最终,我们完成了任务。现在,你可以使用`sudo apt-get install packagename` 命令来从你的本地 Ubuntu 软件仓库中安装所需的软件包,这将会是高速的且消耗很少的带宽。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-local-repository-ubuntu/ + +作者:[Arun Pyasi][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://launchpad.net/ubuntu/+archivemirrors From 83d38fba2257a24bd189ab2cb4ef59af4d752981 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 20 Feb 2015 14:27:29 +0800 Subject: [PATCH 0061/2517] translating --- ...119 Cutegram--A Better Telegram Client For GNU or Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md b/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md index 7a051be4fc..a04d4a5f5f 100644 --- a/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md +++ b/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md @@ -1,3 +1,5 @@ +Translating---geekpi + Cutegram: A Better Telegram Client For GNU/Linux ================================================================================ No need for a introduction to **Telegram**, right? Telegram is a popular free Instant messenger application that can be used to chat with your friends all over the world. Unlike Whatsapp, Telegram is free forever, no ads, no subscription fees. And, the Telegram client is open source too. Telegram is available for many different platforms, including Linux, Android, iOS, Windows Phone, Windows, and Mac OS X. The messages which are sending using telegram are highly encrypted and self-destructive. It is very secure, and there is no limit on the size of your media and chats. @@ -73,4 +75,4 @@ via: http://www.unixmen.com/cutegram-better-telegram-client-gnulinux/ [a]:http://www.unixmen.com/author/sk/ [1]:http://www.unixmen.com/install-telegram-desktop-via-ppa/ -[2]:http://aseman.co/en/products/cutegram/ \ No newline at end of file +[2]:http://aseman.co/en/products/cutegram/ From 123de83ceec08b53f53f4320f3d465767ab7c081 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 20 Feb 2015 14:51:37 +0800 Subject: [PATCH 0062/2517] translated --- ...Better Telegram Client For GNU or Linux.md | 78 ------------------- ...Better Telegram Client For GNU or Linux.md | 77 ++++++++++++++++++ 2 files changed, 77 insertions(+), 78 deletions(-) delete mode 100644 sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md create mode 100644 translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md diff --git a/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md b/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md deleted file mode 100644 index a04d4a5f5f..0000000000 --- a/sources/share/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md +++ /dev/null @@ -1,78 +0,0 @@ -Translating---geekpi - -Cutegram: A Better Telegram Client For GNU/Linux -================================================================================ -No need for a introduction to **Telegram**, right? Telegram is a popular free Instant messenger application that can be used to chat with your friends all over the world. Unlike Whatsapp, Telegram is free forever, no ads, no subscription fees. And, the Telegram client is open source too. Telegram is available for many different platforms, including Linux, Android, iOS, Windows Phone, Windows, and Mac OS X. The messages which are sending using telegram are highly encrypted and self-destructive. It is very secure, and there is no limit on the size of your media and chats. - -You can install and use Telegram desktop on your Debian/Ubuntu systems as mentioned in [our previous tutorial][1]. However, a new telegram client called **Cutegram** is available now to make your chat experience more fun and easy. - -### What is Cutegram? ### - -Cutegram is a free and opensource telegram clients for GNU/Linux focusing on user friendly, compatibility with Linux desktop environments and easy to use. Cutegram using Qt5, QML, libqtelegram, libappindication, AsemanQtTools technologies and Faenza icons and Twitter emojies graphic sets. It’s free and released under GPLv3 license. - -### Install Cutegram ### - -Head over to the Cutegram homepage and download the latest version of your distribution’s choice. As I use Ubuntu 64 bit, I downloaded the .deb file. - - wget http://aseman.co/downloads/cutegram/cutegram_1.0.2-1-amd64.deb - -Now, Install Cutegram as shown below. - - sudo apt-get install gdebi - sudo gdebi cutegram_1.0.2-1-amd64.deb - -For other distributions, run the following commands. - -**64bit:** - - wget http://aseman.co/downloads/cutegram/cutegram-1.0.2-linux-x64-installer.run - -**32 bit:** - - wget http://aseman.co/downloads/cutegram/cutegram-1.0.2-linux-installer.run - -Set executable permission: - - chmod + cutegram-1.0.2-linux*.run - -And, install it as shown below. - - sudo ./cutegram-1.0.2-linux*.run - -### Usage ### - -Launch Cutegram either from Menu or Unity dash. From the login screen, select your country, and enter your mobile number, finally click **Login**. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_005.png) - -A code will be sent to your mobile number. Enter the code and click **Sign in**. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_002.png) - -There you go. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_003.png) - -Start Chatting! - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_004.png) - -And, you can set a profile picture, start new chat/group chat, or secret chat from using the buttons on the left pane. - -Stay happy! Cheers!! - -For more details, check the [Cutegram website][2]. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/cutegram-better-telegram-client-gnulinux/ - -作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/sk/ -[1]:http://www.unixmen.com/install-telegram-desktop-via-ppa/ -[2]:http://aseman.co/en/products/cutegram/ diff --git a/translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md b/translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md new file mode 100644 index 0000000000..4f0a57ff52 --- /dev/null +++ b/translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md @@ -0,0 +1,77 @@ +Cutegram: 一个GNU/Linux下更好的Telegram客户端 +================================================================================ +不需要再介绍**Telegram**了,对吧。Telegram是一款流行的免费即时通信工具,帮助在全球与你的朋友聊天。不像Whatsapp,Telegram是永久免费、没有广告、没有订阅费用。并且Telegram客户端也是开源的。Telegram在许多不同的平台中都有,包括Linux、Android、iOS、Windows Phone和Mac OS X。使用telegram发送的消失是高度加密且会自我毁灭。它很安全,并且没有对你媒体和聊天的大小作限制。 + +在[先前的教程][1]中我们已经提到你可以在Ubuntu/Debian中安装Telegram。然而,一个新的Telegram客户端叫**Cutegram**出现了,可以使你的聊天体验更加有趣和简单。 + +### Cutegram是什么? ### + +Cutegram是一款GNU/Linux中专注于用户友好、与LInux桌面环境兼容和易于使用的开源telegram客户端。Cutegram使用Qt5、QML、libqtelegram、libappindication、AsemanQtTools技术和Faenzatu图标和Twitter emojies图片集。它在GPLv3许可证下免费发布。 + +### 安装 Cutegram ### + +进入Cutegrm的首页病根据你的发行版版本选择最新的版本。我使用的是Ubuntu 64位版,所以我下载的是.deb文件。 + + wget http://aseman.co/downloads/cutegram/cutegram_1.0.2-1-amd64.deb + +现在,如下安装Cutegram: + + sudo apt-get install gdebi + sudo gdebi cutegram_1.0.2-1-amd64.deb + +对于其他发行版,运行下面的命令。 + +**64位:** + + wget http://aseman.co/downloads/cutegram/cutegram-1.0.2-linux-x64-installer.run + +**32位:** + + wget http://aseman.co/downloads/cutegram/cutegram-1.0.2-linux-installer.run + +设置执行权限: + + chmod + cutegram-1.0.2-linux*.run + +如下进行安装。 + + sudo ./cutegram-1.0.2-linux*.run + +### 使用 ### + +在菜单或者Unity dash中启动Cutegram。在登录界面,选择你的国家并输入电话号码,最好点击**Login** + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_005.png) + +A code will be sent to your mobile number. Enter the code and click **Sign in**. +一个验证码将会发送到你手机上。输入验证码病点击**** + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_002.png) + +你会看到 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_003.png) + +开始聊天吧! + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_004.png) + +接着,你可以设置头像,开始新的聊天/群聊,或者使用左边面板的按钮开始秘密聊天。 + +玩得开心!干杯!! + +更多细节,请关注[Cutegram 网站][2] + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/cutegram-better-telegram-client-gnulinux/ + +作者:[SK][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://www.unixmen.com/install-telegram-desktop-via-ppa/ +[2]:http://aseman.co/en/products/cutegram/ From b45234e2136a323171c5b14e482db40097da4e4e Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Feb 2015 21:08:29 +0800 Subject: [PATCH 0063/2517] PUB:20150209 CrunchBang Linux Is Dead @geekpi --- .../20150209 CrunchBang Linux Is Dead.md | 32 +++++++++++++++++++ .../news/20150209 CrunchBang Linux Is Dead.md | 32 ------------------- 2 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 published/20150209 CrunchBang Linux Is Dead.md delete mode 100644 translated/news/20150209 CrunchBang Linux Is Dead.md diff --git a/published/20150209 CrunchBang Linux Is Dead.md b/published/20150209 CrunchBang Linux Is Dead.md new file mode 100644 index 0000000000..7adfa42887 --- /dev/null +++ b/published/20150209 CrunchBang Linux Is Dead.md @@ -0,0 +1,32 @@ +CrunchBang Linux 已死!!! +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Crunchbang_Linux_Dead.jpeg) + +是的,你没看错。最小的Linux发行版**CrunchBang Linux 已经消失了**。 + +CrunchBang Linux,被大家所熟知的缩写标志“#!”,其基于Debian和[Openbox][1]窗口管理器。这个黑色主题的 Linux 发行版是许多资深 Linux用户的选择。 + +### CrunchBang 因为 “不再有继续下去的价值” 而消失了 ### + +其[公告][2]称,CrunchBang将不在继续开发,项目的领头人Philip Newborough说他在开始这个项目的时候,Linux 世界和现在不同。他指出那时在这种发行版还没有‘竞争’,但是随着Linux发行版的进步,如Lubuntu,Crunchbang这样的发行版就不具备原来的价值了。 + +> 对于任何十年前使用Linux的人而言,我想他们都会看到事物在不断发展。虽然一些事情一直保持不变,还有一些的变化超出了认知。这称之为进步。对于大部分事物而言,进步是一件好事。也就是说当进步发生时,一些事物落后了。对于我而言,CrunchBang就是我需要抛弃的东西。我抛弃它的原因是我真的认为它不再具有任何价值了,虽然我还可以因为一些多愁善感的原因把它留下来,但是我不认为那些使用原生Debian用户还有兴趣了。 + +### CrunchBang消失之后会怎么样? ### + +就像[Pear OS][3]那样,CrunchBang论坛仍将在线。现在仍可以下载但是不久的将来就会停止。Philip对他即将面对的新的项目和工作感到很激动。我希望他今后工作顺利。很难过见到一个像CrunchBang这样好的Linux发行版的消失。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/crunchbang-linux-dead/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://en.wikipedia.org/wiki/Openbox +[2]:http://crunchbang.org/forums/viewtopic.php?id=38916 +[3]:http://itsfoss.com/pear-os-history/ diff --git a/translated/news/20150209 CrunchBang Linux Is Dead.md b/translated/news/20150209 CrunchBang Linux Is Dead.md deleted file mode 100644 index 7d6cee2613..0000000000 --- a/translated/news/20150209 CrunchBang Linux Is Dead.md +++ /dev/null @@ -1,32 +0,0 @@ -CrunchBang Linux 已死!!! -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Crunchbang_Linux_Dead.jpeg) - -是的,你没看错。最小的Linux发行版**CrunchBang Linux 已经消失了**。 - -CrunchBang Linux,大家都知道它的缩写符号 #!,基于的是Debian和[Openbox][1]窗口管理器。黑色主题的Linux是每一个有经验的Linux用户的选择。 - -### CrunchBang 因为 “不再有继续下去的价值” 而消失了 ### - -[公告][2]称CrunchBang将不在继续开发,项目的领头人Philip Newborough说他在开始这个项目的时候,Linux时间是一个不同的地方。他指出那时在相同的种类在同一时间段中没有‘竞争’,但是随着Linux发行版的进步如Lubuntu,Crunchbang不再有相同的价值了。 - -> 对于任何十年前使用Linux的人而言,我确定他们同意事物在发展。虽然一些事情一直保持不变,还有一些的变化超出了认知。这称之为进步,对于大部分事物而言,进步是一件好事。也就是说当进步发生时,一些事物落后了,对于我而言,CrunchBang就是我需要抛弃的东西。我抛弃它的原因是我真实地认为它不再具有任何价值了,虽然我还可以因为一些多愁善感的原因把它留下来,但是我不认为那些使用原生Debian用户的兴趣了。 - -### CrunchBang消失之后会怎么样? ### - -就像[Pear OS][3]那样,CrunchBang论坛仍将在线。现在仍可以下载但是不久的将来就会停止。Philip提到对他即将面对的新的项目和工作感到很激动。我希望他今后工作顺利。很难过见到一个像CrunchBang这样好的Linux发行版的消失。 - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/crunchbang-linux-dead/ - -作者:[Abhishek][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://en.wikipedia.org/wiki/Openbox -[2]:http://crunchbang.org/forums/viewtopic.php?id=38916 -[3]:http://itsfoss.com/pear-os-history/ From 37ab2123f3dd0e7c1f40f06d0bfb3e362feaca33 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Feb 2015 21:43:16 +0800 Subject: [PATCH 0064/2517] PUB:20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10 @geekpi --- ...ties Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) rename {translated/news => published}/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md (54%) diff --git a/translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/published/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md similarity index 54% rename from translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md rename to published/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md index 1801580d00..e49dd12654 100644 --- a/translated/news/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md +++ b/published/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md @@ -2,29 +2,27 @@ OpenJDK 7的漏洞已经在Ubuntu 14.04 和Ubuntu 14.10中解决了 ---- *建议用户尽快升级* -## Canonical公布新的OpenJDK 7 的版本已经提交到Ubuntu 14.04 LTS和Ubuntu 14.10 的仓库中了。更新修复了大量的问题和漏洞。 +**Canonical发布新 OpenJDK 7 的安全公告,它已经提交到Ubuntu 14.04 LTS和Ubuntu 14.10 的仓库中。该更新修复了大量的问题和漏洞。** -Ubuntu维护者已经升级了仓库中的OpenJDK包,并且含有大量的修复。这是一个重要的更新切涵盖了少量的库。 +Ubuntu维护者已经升级了仓库中的OpenJDK包,并且含有大量的修复。这是一个重要的更新,其涵盖了少量的库。 安全公告中说“OpenJDK JRE中发现了一些信息泄露、数据完整性和可用性的漏洞。攻击者可以利用这些通过网络执行拒绝服务或者泄露信息。” 同样,“OpenJDK JRE中发现了关于信息泄露和完整性的漏洞。攻击者可以利用这点通过网络泄露敏感信息。” -这里有几个漏洞被开发者确认并修复,并有维护人员实现。关于问题的详细描述,你可以参考Canonical的安全通告。用户被建议尽快升级系统。 +这里有几个漏洞被开发者确认,并且由维护人员解决。关于该问题的详细描述,你可以参考Canonical的安全通告。建议用户尽快升级系统。 -这个漏洞只要你升级到最新的openjdk 7相关的包就可以修复。要应用补丁,用户需要运行升级管理程序。通常上,一个标准系统更新就会运行必要的更新。所有java相关的程序需要重新启动。 +这个漏洞只要你升级到最新的openjdk 7相关的包就可以修复。要应用该补丁,用户需要运行升级管理程序。通常上,一个标准系统更新就会安装必要的更新。所有java相关的程序需要重新启动。 -------------------------------------------------------------------------------- -via:http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtml +via: http://linux.softpedia.com/blog/OpenJDK-7-Vulnerabilities-Closed-in-Ubuntu-14-04-and-Ubuntu-14-10-471605.shtml 本文发布时间:29 Jan 2015, 16:53 GMT 作者:[Silviu Stahie][a] - 译者:[geekpi](https://github.com/geekpi) - -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 598ee2512c5ee6254ca794288acf3a4fe5312cc4 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Fri, 20 Feb 2015 22:01:55 +0800 Subject: [PATCH 0065/2517] Translating by FSSlc --- ...w To Make GDebi Default Instead of Ubuntu Software Center.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md index 9bcbbb967e..55bca268d1 100644 --- a/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md +++ b/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md @@ -1,3 +1,5 @@ +Translating by FSSlc + How To Make GDebi Default Instead of Ubuntu Software Center ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) From 5219906b2dffb7d0a8bd3d714ec46b98f8d361fb Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Feb 2015 22:29:05 +0800 Subject: [PATCH 0066/2517] PUB:20140819 Top 4 Linux download managers @H-mudcup --- .../20140819 Top 4 Linux download managers.md | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) rename {translated/share => published}/20140819 Top 4 Linux download managers.md (69%) diff --git a/translated/share/20140819 Top 4 Linux download managers.md b/published/20140819 Top 4 Linux download managers.md similarity index 69% rename from translated/share/20140819 Top 4 Linux download managers.md rename to published/20140819 Top 4 Linux download managers.md index 78c5b9ec12..5896665a80 100644 --- a/translated/share/20140819 Top 4 Linux download managers.md +++ b/published/20140819 Top 4 Linux download managers.md @@ -1,17 +1,16 @@ -Translated By H-mudcup - -Linux排名前四的下载管理器 +Linux下的四大下载管理器 ================================================================================ -**改善并更好的管理你的网页下载,不论是镜像、抓取数据包还是仅仅更好的掌控你的文件。** +**改善你的网页下载,以便更好的管理文件镜像、批量下载还是仅仅希望更好的管理你的文件。** -下载管理器现在似乎已经是旧闻了,但是他们仍然非常有用。我们来比较一下Linux上排名前四的下载管理器。 +下载管理器现在似乎已经不新鲜了,但是他们仍然非常有用。我们来比较一下Linux上排名前四的下载管理器。 ### [uGet][1] ### -如同很多其他的Linux应用一样uGet把体积轻巧和功能全面作为宣传亮点。它能处理有着过滤器的多线程数据流,还能与任何网络浏览器进行整合。它从当初的UrlGet开始,如今已经经过了十年。它还能在Windows上运行。 +如同很多其他的Linux应用一样,uGet把体积轻巧和功能全面作为宣传亮点。它能处理多线程下载,支持过滤器,还能与任何网络浏览器进行整合。它从当初的UrlGet开始,如今已经经过了十年。它还能在Windows上运行。 ![uGet is actually very full-featured, with a lot of the kind of functions that advanced torrent clients use](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/uget1.png) -uGet的功能其实非常全面,有很多先进的BT下载客户端所拥有的功能 + +*uGet的功能其实非常全面,有很多先进的BT下载客户端所拥有的功能* #### 界面 #### @@ -23,40 +22,41 @@ uGet让我们想起了许多BT下载客户端的界面:有着活跃、结束 #### 功能 #### -成熟的uGet完备了各种功能,包括按计划进行下载任务的启动和终止的高级功能,通过剪贴板批量下载,还能改变它在剪贴板里查找的文件的类型。虽然有插件选项,但不多。 +成熟的uGet完备了各种功能,包括按计划启动和终止下载任务的高级功能,通过剪贴板批量下载,还能改变它在剪贴板里查找的文件的类型。虽然有插件选项,但不多。 -#### 可得性 #### +#### 可获得性 #### -虽然在多数主要的发行版的软件库中都能得到它,但uGet网站上有着定期更新的适用于各种流行的发行版的二进制安装文件,还能轻易获得源代码。它的运行基于GTK 3+的图形库,所以它在某些桌面环境上的封装要比其他的小,然而我们得说,在KDE或其他Qt桌面上值得有这么一个额外的从属。 +虽然在多数主要的发行版的软件库中都能得到它,但uGet网站上有着定期更新的适用于各种流行的发行版的二进制安装文件,还能轻易获得源代码。它的运行基于GTK 3+的图形库,所以它在某些桌面环境上的封装要比其他的小,然而我们得说,在KDE或其他Qt桌面上值得为此添加额外的依赖库。 #### 总体评价 #### 8/10 -我们非常喜欢uGet——它种类繁多的功能和极高的人气,让它成为了能与Linux浏览器优雅结合的,万能的下载管理器。 +我们非常喜欢uGet——它种类繁多的功能和极高的人气,让它成为了能与Linux浏览器优雅结合的万能下载管理器。 ### [KGet][2] ### -KDE自家的下载管理器貌似原本是设计成与KDE的网页浏览器,Konqueror,一同工作的。它带来了我们这次测试中所期待的功能:多下载控制和对下载完成的文件计算校验和的能力。 +KDE自家的下载管理器貌似原本是设计成与KDE的网页浏览器 Konqueror 一同工作的。它带来了我们这次测试中所期待的功能:多下载控制和对下载完成的文件计算校验和的能力。 ![You need to manually activate the ability to keep an eye on the clipboard for links](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/kget1.png) -你需要手动激活查看剪贴板中下载链接的功能 + +*你需要手动激活查看剪贴板中下载链接的功能* #### 界面 #### -作为一个备受期待的KDE应用软件,KGet用一贯的图标和线条,与桌面环境的审美风格完美融合。它的设计也相当简洁,在主工具栏里只显示最必要的功能,当前下载也以最小界面显示。 +作为一个备受期待的KDE应用软件,KGet采用一贯的图标和线条,与桌面环境的审美风格完美融合。它的设计也相当简洁,在主工具栏里只显示最必要的功能,当前下载也以最小界面显示。 #### 集成 #### -KGet会集成到本地的KDE的Konqueror浏览器里,虽然它并不是最流行的浏览器。Firefox对KGet的支持是一如往常的是通过FlashGot完成的,但是在Chromium里并没有任何一种方法能真正的将它集成进去。你可以打开一个询问你是否想下载已复制的URL的功能,然而KGet对于剪贴板的分析并不是很好,有的时候会把文本下载下来。 +KGet会集成到本地的KDE的Konqueror浏览器里,虽然它并不是最流行的浏览器。Firefox对KGet的支持是一如既往的是通过FlashGot完成的,但是在Chromium里并没有任何一种方法能真正的将它集成进去。你可以打开一个“询问你是否想下载已复制好的URL”的功能,然而KGet对于剪贴板的分析并不是很好,有的时候会把文本下载下来。 #### 功能 #### -能够选择的功能并不多。没有计划任务,没有批量下载,而且通常情况下,下载功能的数量几乎是光秃秃的。剪贴板扫描功能,想法很不错就是有点问题。设置菜单看起来有点怪怪的,因为它看起来应该设计有更多的功能。 +能够选择的功能并不多。没有计划任务,没有批量下载,基本上没有什么特色的下载功能。剪贴板扫描功能,想法很不错就是有点问题。设置菜单看起来有点怪怪的,因为它看起来应该设计有更多的功能。 -#### 可得性 #### +#### 可获得性 #### -虽然它不会随着KDE默认安装,但可以在任何支持KDE的发行版里得到它。虽然它的运行需要几个KDE库,找到它的源代码也很困难。支持如此少的发行版,二进制安装文件也没什么可选的。 +虽然它不会随着KDE默认安装,但可以在任何支持KDE的发行版里得到它。虽然它的运行需要几个KDE库,找到它的源代码也很困难。除了少数几个发行版之外也没有什么二进制安装文件。 #### 总体评价 #### @@ -66,14 +66,15 @@ KGet并没有真正的给予用户比大多数主流浏览器内置下载管理 ### [DownThemAll!][3] ### -经由Firefox的附件进入Linux的DownThemAll某种程度上可以说是跨平台。这让它只能通过Firefox使用,然而作为世界上最流行的浏览器之一,它这更加紧凑的集成也许正是某些人对下载管理器所期望的。 +经由Firefox的附属组件进入Linux的DownThemAll从某种程度上可以说是跨平台。这让它只能通过Firefox使用,然而作为世界上最流行的浏览器之一,它这更加紧凑的集成也许正是某些人对下载管理器所期望的。 ![There are actually a whole lot of options available for DownThemAll! that make it very flexible](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/down1.png) -其实在DownThemALL!上有很多选项可以设置,这让它非常的灵活 + +*其实在DownThemALL!上有很多选项可以设置,这让它非常的灵活* #### 界面 #### -与Firefox的集成使得DownThemAll!的风格符合浏览器的审美标准,右键单击可以唤出普通下载和DownThemAll选项。额外的对话框菜单通常和Firefox使用相同的主题,然而主下载窗口则非常整洁并且是基于它本身的设计。 +与Firefox的集成使得DownThemAll!的风格符合浏览器的审美标准,右键单击可以唤出普通下载和DownThemAll选项。额外的对话框菜单通常和Firefox的主题风格一致,然而主下载窗口则非常整洁并采用了它自己的设计。 #### 集成 #### @@ -81,11 +82,11 @@ KGet并没有真正的给予用户比大多数主流浏览器内置下载管理 #### 功能 #### -拥有着能同时控制多个下载任务的能力,限制而不荒废带宽以及先进的自动或手动过滤功能,DownThemAll!有着一大堆有助于大规模下载的优秀功能。“一键”功能还让它能非常迅速的启动到预定的文件夹中的下载。这比普通下载功能快多了。 +拥有着能同时控制多个下载任务的能力,限制而不浪费带宽以及先进的自动或手动过滤功能,DownThemAll!有着一大堆有助于大规模下载的优秀功能。“一键”功能还让它能非常迅速的启动预定文件夹的下载。这比普通下载功能快多了。 -#### 可得性 #### +#### 可获得性 #### -Firefox几乎能在所有的发行版和Linux以外的操作系统中获得。这让DownThemAll!也和它一样多产。不幸的是,这是一把双刃剑,因为Firefox可能不是你喜欢的浏览器。它还给浏览器增加了一些负担,让它的启动不再那么轻松。 +Firefox几乎能在所有的发行版和Linux以外的操作系统中获得。这让DownThemAll!也和它一样多能。不幸的是,这是一把双刃剑,因为Firefox可能不是你喜欢的浏览器。它还给浏览器增加了一些负担,让它的启动不再那么轻松。 #### 总体评价 #### @@ -95,10 +96,11 @@ DownThemAll!是很优秀的,如果你使用Firefox你也许就不再需要用 ### [Steadyflow][4] ### -Steadyflow很容易在Ubuntu和一些基于Debian的发行版中获得,获取到它的方式可能受到了限制,但它在某些圈子里一直被认为是你能得到的任何发行版里最好的管理器。它能查找剪贴板里的URL,使用GNOME的预设代理,还有许多其他的功能。 +Steadyflow很容易在Ubuntu和一些基于Debian的发行版中获得,获取它的方式可能受到了一些制约,但它在某些圈子里一直被认为是你能得到的任何发行版里最好的管理器。它能查找剪贴板里的URL,使用GNOME的预设代理,还有许多其他的功能。 ![The settings in Steady flow are extremely limiting and somewhat difficult to access](http://www.linuxuser.co.uk/wp-content/uploads/2014/08/steady1.png) -Steady flow里的设置非常受限,而且有点难以使用。 + +*Steady flow里的设置非常少,而且有点难以使用。* #### 界面 #### @@ -112,7 +114,7 @@ Steadyflow的形象相当简洁,令人愉悦的、干净的界面并没有让 极度缺少功能,选项菜单也受到很大限制。暂停和恢复功能看起来也不怎么好使——这是任何浏览器文件下载功能的最基本的部分。文件下载结束的通知和默认行为是可以设置的,还可以选择在文件下载完成之后运行脚本。 -#### 可得性 #### +#### 可获得性 #### 只能在Ubuntu上获取,还不容易得到这个应用的源代码。这意味着虽然在所有基于Ubuntu的发行版中都能很容易的得到它,但也仅限于这些发行版。由于它不是Linux上能得到的最好的下载管理器,所以也不用想太多。 @@ -126,7 +128,7 @@ Steadyflow的形象相当简洁,令人愉悦的、干净的界面并没有让 #### uGet #### -在此次测试中,我们已经证明了现代电脑中还是有下载管理器的一席之地的,即便它们中的佼佼者们从BT下载客户端中抄袭了某些功能,貌似侵犯了他们的权益。对于某些人来说BT下载可能是个更有效率的方式,随着ISP们对待BT流量越来越机智,一些人可能用一个好的下载管理器就得到更好的效果。大多数主流ISP不仅仅强加了数据转移标记,在高峰时段他们中的一些甚至开始减慢或封掉BT流量——甚至连发行版的ISO文件和其他免费软件的合法数据流都被限制了。 +在此次测试中,我们已经证明了现代电脑中还是有下载管理器的一席之地的,即便它们中的佼佼者们从BT下载客户端中抄袭了某些功能,貌似侵犯了他们的权益。对于某些人来说BT下载可能是个更有效率的方式,随着ISP们对待BT流量越来越机智,一些人可能用一个好的下载管理器就得到更好的效果。大多数主流ISP不仅仅强加了数据传输限额,在高峰时段他们中的一些甚至开始减慢或封掉BT流量——甚至连发行版的ISO文件和其他免费软件的合法数据流都被限制了。 对于这类问题Steadyflow看起来是非常受欢迎的解决方式,但我们的使用和测试显示出,它是一个未完成的简陋的产品。更加古老的uGet则是这场表演的明星,有着惊人数量的可选功能,这些功能既能在下载单一文件中有所帮助,还能在整个网页里过滤出相关元素进行抓取。DownThemAll!与之类似,优秀的Firefox有加分,但它也离不开Firefox,有着几乎同级别的功能,但集成效果更好。 @@ -140,7 +142,7 @@ via: http://www.linuxuser.co.uk/reviews/top-4-linux-download-managers 作者:Rob Zwetsloot 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1a624a9c2a10a92b1218ca6ac3ea448093fd8c40 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:38:18 +0800 Subject: [PATCH 0067/2517] [translated] 02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md --- ...igration From MySQL To MariaDB On Linux.md | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md diff --git a/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md new file mode 100644 index 0000000000..e21084faeb --- /dev/null +++ b/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md @@ -0,0 +1,169 @@ +Linux上从MySQL迁移到MariaDB的简单步骤 +================================================================================ +大家好!这是一篇介绍如何在服务器或个人电脑上从MySQL迁移到MariaDB的教程。也许你会问为什么我们要将数据库管理从MySQL迁移到MariaDB。往下看我们告诉你为什么这样做。 + +### 为什么要用MariaDB来代替MySQL ### + +MariaDB是MySQL社区开发的分支,也是一个增强型的替代品。它由MySQL前开发者们带头组织的基金会开发,使用起来和MySQL完全一样。自从Oracle买下了MySQL,它就不再自由开源了,但是 **MariaDB仍然自由开源**。一些如谷歌、维基、LinkedIn、Mozilla等的顶级的网站已经迁移到MariaDB了。它的优势在哪里: + +- 向后兼容MySQL +- 永远开源 +- 由MySQL缔造者的维护 +- 更尖端的功能 +- 更多的存储引擎 +- 大型的网站已经转向MariaDB + +现在,让我们迁移到MariaDB吧! + +**以测试为目的**让我们创建一个叫**linoxidedb**的示例数据库。 + +使用以下命令用root账户登陆MySQL: + + $ mysql -u root -p + +输入mysql root用户的密码后,你将进入**mysql的命令行** + +**创建测试数据库:** + +在mysql命令行输入以下命令以创建测试数据库。 + + mysql> create database linoxidedb; + +查看可用的数据库,输入以下命令: + + mysql> show databases; + +![creating test databases](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-test-databases.png) + +如你所见,算上刚刚新建的linoxidedb我们一共有5个数据库。 + + mysql> quit + +现在,我们就将刚创建的数据库从MySQL迁移到MariaDB。 + +注:使用CentOS这类基于fedora的linux发行版没有必要参考这篇教程,因为它们在安装MariaDB时会自动代替MySQL,无需备份现有的数据库,你只需要更新mysql就可以得到mariadb。 + +### 1. 备份现有的数据库 ### + +我们第一个重要的步骤就是备份现有的数据库。我们在**终端(不是MySQL命令行)**里输入如下命令来完成备份。 + + $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql + +哇哦!我们遇到了点麻烦。别担心我们可以搞定。 + + $ mysqldump: Error: Binlogging on server not active + +![](http://blog.linoxide.com/wp-content/uploads/2015/01/mysqldump-error.png) +mysqldump error + +为了修复这个错误,我们需要对**my.cnf**文件做一些小改动。 + +编辑my.cnf文件: + + $ sudo nano /etc/mysql/my.cnf + +在[mysqld]部分添加如下参数。 + +**log-bin=mysql-bin** + +![configuring my.cnf](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-my.cnf_.png) + +好了在保存并关闭文件后,我们需要重启一下mysql服务。运行以下命令重启: + + $ sudo /etc/init.d/mysql restart + +现在,重新运行mysqldump命令来备份所有的数据库。 + + $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql + +![](http://blog.linoxide.com/wp-content/uploads/2015/01/crearing-bakup-file.png) +dumping databases + +上面的命令将会备份所有的数据库,把它们存储在当前目录下的**backupdatabase.sql**文件中。 + +### 2. 卸载MySQL ### + +首先,我们得把**my.cnt文件挪到安全的地方去**。 + +**注**:my.cnf文件将不会在你卸载MySQL包的时候被删除,我们这样做只是以防万一。在MariaDB安装时,它会询问我们是保持现存的my.cnf文件,还是使用包中自带的版本(即新my.cnf文件)。 + +在shell或终端中输入如下命令来备份my.cnt文件: + + $ sudo cp /etc/mysql/my.cnf my.cnf.bak + +运行命令来终止mysql服务: + + $ sudo /etc/init.d/mysql stop + +然后移除mysql包: + + $ sudo apt-get remove mysql-server mysql-client + +![uninstalling mysql](http://blog.linoxide.com/wp-content/uploads/2015/01/uninstalling-mysql.png) + +### 3. 安装MariaDB ### + +这是在Ubuntu系统中安装MariaDB的命令: + + $ sudo apt-get install software-properties-common + $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db + # sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' + +![adding mariadb repo](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-repo-mariadb.png) + +键值导入并且添加完仓库后你就可以用以下命令安装MariaDB了: + + $ sudo apt-get update + $ sudo apt-get install mariadb-server + +![installing mariadb](http://blog.linoxide.com/wp-content/uploads/2015/01/installing-mariadb.png) + +![my.conf configuration prompt](http://blog.linoxide.com/wp-content/uploads/2015/01/my.conf-configuration-prompt.png) + +我们应该还没忘记在MariaDB安装时,它会问你是使用现有的my.cnf文件,还是包中自带的版本。你可以使用以前的my.cnf也可以用包中自带的。即使你想直接使用新的my.cnf文件,你依然可以晚点将以前的备份内容还原进去(别忘了我们已经将它复制到安全的地方那个去了)。所以,我们直接选择了默认的选项“N”。如果需要安装其他版本,请参考[MariaDB官方仓库][2]。 + +### 4. 恢复配置文件 ### + +想要将my.cnf.bak中的内容恢复到my.cnf,在终端中输入以下命令。由于my.cnf.bak文件在当前目录下,所以我们只要简单的执行以下命令即可: + + $ sudo cp my.cnf.bak /etc/mysql/my.cnf + +### 5. 导入数据库 ### + +最后,让我们把我们之前创建的数据库导入吧!运行一下命令即可完成导入。 + + $ mysql -u root -p < backupdatabase.sql + +就这样,我们已成功将之前的数据库导入了进来。 + +来,让我们登陆一下mysql命令行,检查一下数据库是否真的已经导入了: + + $ mysql -u root -p + +![importing database](http://blog.linoxide.com/wp-content/uploads/2015/01/importing-database.png) + +为了检查数据库是否被迁移到MariaDB,请在MariaDB命令行中输入“**show databases**;”不用输入(“”),如下: + + mariaDB> show databases; + +![mysql to mariadb database migrated](http://blog.linoxide.com/wp-content/uploads/2015/01/maria-database-migrated.png) + +如你所见,linoxidedb及所有的数据库都已经成功的被迁移了。 + +### 总结 ### + +最后,我们已经成功地从MySQL迁移到了MariaDB数据库管理系统。MariaDB比MySQL好,虽然在性能方面MySQL还是比它更快,但是MariaDB的优点在于它额外的特性与支持的许可证。这能够确保它自由开源(FOSS),并永久自由开源,相比之下MySQL还有许多额外的插件,有些不能自由使用代码、有些没有公开的开发进程、有些在不久的将来会变的不再自由开源。如果你有任何的问题、评论、反馈给我们,不要犹豫直接在评论区留下你的看法。谢谢观看本教程,希望那你能喜欢MariaDB。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://mariadb.org/ +[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi From 5b0d136f4944d76b29e63ee4dd923cb379e5bc9d Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:40:00 +0800 Subject: [PATCH 0068/2517] [translated] 20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md --- ...igration From MySQL To MariaDB On Linux.md | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 translated/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md diff --git a/translated/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/translated/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md new file mode 100644 index 0000000000..e21084faeb --- /dev/null +++ b/translated/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md @@ -0,0 +1,169 @@ +Linux上从MySQL迁移到MariaDB的简单步骤 +================================================================================ +大家好!这是一篇介绍如何在服务器或个人电脑上从MySQL迁移到MariaDB的教程。也许你会问为什么我们要将数据库管理从MySQL迁移到MariaDB。往下看我们告诉你为什么这样做。 + +### 为什么要用MariaDB来代替MySQL ### + +MariaDB是MySQL社区开发的分支,也是一个增强型的替代品。它由MySQL前开发者们带头组织的基金会开发,使用起来和MySQL完全一样。自从Oracle买下了MySQL,它就不再自由开源了,但是 **MariaDB仍然自由开源**。一些如谷歌、维基、LinkedIn、Mozilla等的顶级的网站已经迁移到MariaDB了。它的优势在哪里: + +- 向后兼容MySQL +- 永远开源 +- 由MySQL缔造者的维护 +- 更尖端的功能 +- 更多的存储引擎 +- 大型的网站已经转向MariaDB + +现在,让我们迁移到MariaDB吧! + +**以测试为目的**让我们创建一个叫**linoxidedb**的示例数据库。 + +使用以下命令用root账户登陆MySQL: + + $ mysql -u root -p + +输入mysql root用户的密码后,你将进入**mysql的命令行** + +**创建测试数据库:** + +在mysql命令行输入以下命令以创建测试数据库。 + + mysql> create database linoxidedb; + +查看可用的数据库,输入以下命令: + + mysql> show databases; + +![creating test databases](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-test-databases.png) + +如你所见,算上刚刚新建的linoxidedb我们一共有5个数据库。 + + mysql> quit + +现在,我们就将刚创建的数据库从MySQL迁移到MariaDB。 + +注:使用CentOS这类基于fedora的linux发行版没有必要参考这篇教程,因为它们在安装MariaDB时会自动代替MySQL,无需备份现有的数据库,你只需要更新mysql就可以得到mariadb。 + +### 1. 备份现有的数据库 ### + +我们第一个重要的步骤就是备份现有的数据库。我们在**终端(不是MySQL命令行)**里输入如下命令来完成备份。 + + $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql + +哇哦!我们遇到了点麻烦。别担心我们可以搞定。 + + $ mysqldump: Error: Binlogging on server not active + +![](http://blog.linoxide.com/wp-content/uploads/2015/01/mysqldump-error.png) +mysqldump error + +为了修复这个错误,我们需要对**my.cnf**文件做一些小改动。 + +编辑my.cnf文件: + + $ sudo nano /etc/mysql/my.cnf + +在[mysqld]部分添加如下参数。 + +**log-bin=mysql-bin** + +![configuring my.cnf](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-my.cnf_.png) + +好了在保存并关闭文件后,我们需要重启一下mysql服务。运行以下命令重启: + + $ sudo /etc/init.d/mysql restart + +现在,重新运行mysqldump命令来备份所有的数据库。 + + $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql + +![](http://blog.linoxide.com/wp-content/uploads/2015/01/crearing-bakup-file.png) +dumping databases + +上面的命令将会备份所有的数据库,把它们存储在当前目录下的**backupdatabase.sql**文件中。 + +### 2. 卸载MySQL ### + +首先,我们得把**my.cnt文件挪到安全的地方去**。 + +**注**:my.cnf文件将不会在你卸载MySQL包的时候被删除,我们这样做只是以防万一。在MariaDB安装时,它会询问我们是保持现存的my.cnf文件,还是使用包中自带的版本(即新my.cnf文件)。 + +在shell或终端中输入如下命令来备份my.cnt文件: + + $ sudo cp /etc/mysql/my.cnf my.cnf.bak + +运行命令来终止mysql服务: + + $ sudo /etc/init.d/mysql stop + +然后移除mysql包: + + $ sudo apt-get remove mysql-server mysql-client + +![uninstalling mysql](http://blog.linoxide.com/wp-content/uploads/2015/01/uninstalling-mysql.png) + +### 3. 安装MariaDB ### + +这是在Ubuntu系统中安装MariaDB的命令: + + $ sudo apt-get install software-properties-common + $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db + # sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' + +![adding mariadb repo](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-repo-mariadb.png) + +键值导入并且添加完仓库后你就可以用以下命令安装MariaDB了: + + $ sudo apt-get update + $ sudo apt-get install mariadb-server + +![installing mariadb](http://blog.linoxide.com/wp-content/uploads/2015/01/installing-mariadb.png) + +![my.conf configuration prompt](http://blog.linoxide.com/wp-content/uploads/2015/01/my.conf-configuration-prompt.png) + +我们应该还没忘记在MariaDB安装时,它会问你是使用现有的my.cnf文件,还是包中自带的版本。你可以使用以前的my.cnf也可以用包中自带的。即使你想直接使用新的my.cnf文件,你依然可以晚点将以前的备份内容还原进去(别忘了我们已经将它复制到安全的地方那个去了)。所以,我们直接选择了默认的选项“N”。如果需要安装其他版本,请参考[MariaDB官方仓库][2]。 + +### 4. 恢复配置文件 ### + +想要将my.cnf.bak中的内容恢复到my.cnf,在终端中输入以下命令。由于my.cnf.bak文件在当前目录下,所以我们只要简单的执行以下命令即可: + + $ sudo cp my.cnf.bak /etc/mysql/my.cnf + +### 5. 导入数据库 ### + +最后,让我们把我们之前创建的数据库导入吧!运行一下命令即可完成导入。 + + $ mysql -u root -p < backupdatabase.sql + +就这样,我们已成功将之前的数据库导入了进来。 + +来,让我们登陆一下mysql命令行,检查一下数据库是否真的已经导入了: + + $ mysql -u root -p + +![importing database](http://blog.linoxide.com/wp-content/uploads/2015/01/importing-database.png) + +为了检查数据库是否被迁移到MariaDB,请在MariaDB命令行中输入“**show databases**;”不用输入(“”),如下: + + mariaDB> show databases; + +![mysql to mariadb database migrated](http://blog.linoxide.com/wp-content/uploads/2015/01/maria-database-migrated.png) + +如你所见,linoxidedb及所有的数据库都已经成功的被迁移了。 + +### 总结 ### + +最后,我们已经成功地从MySQL迁移到了MariaDB数据库管理系统。MariaDB比MySQL好,虽然在性能方面MySQL还是比它更快,但是MariaDB的优点在于它额外的特性与支持的许可证。这能够确保它自由开源(FOSS),并永久自由开源,相比之下MySQL还有许多额外的插件,有些不能自由使用代码、有些没有公开的开发进程、有些在不久的将来会变的不再自由开源。如果你有任何的问题、评论、反馈给我们,不要犹豫直接在评论区留下你的看法。谢谢观看本教程,希望那你能喜欢MariaDB。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://mariadb.org/ +[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi From 2834e5efdb3397f6351fb908584f6e51515ea355 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:41:06 +0800 Subject: [PATCH 0069/2517] Delete 02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md --- ...igration From MySQL To MariaDB On Linux.md | 169 ------------------ 1 file changed, 169 deletions(-) delete mode 100644 translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md diff --git a/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md deleted file mode 100644 index e21084faeb..0000000000 --- a/translated/tech/02150211 Simple Steps Migration From MySQL To MariaDB On Linux.md +++ /dev/null @@ -1,169 +0,0 @@ -Linux上从MySQL迁移到MariaDB的简单步骤 -================================================================================ -大家好!这是一篇介绍如何在服务器或个人电脑上从MySQL迁移到MariaDB的教程。也许你会问为什么我们要将数据库管理从MySQL迁移到MariaDB。往下看我们告诉你为什么这样做。 - -### 为什么要用MariaDB来代替MySQL ### - -MariaDB是MySQL社区开发的分支,也是一个增强型的替代品。它由MySQL前开发者们带头组织的基金会开发,使用起来和MySQL完全一样。自从Oracle买下了MySQL,它就不再自由开源了,但是 **MariaDB仍然自由开源**。一些如谷歌、维基、LinkedIn、Mozilla等的顶级的网站已经迁移到MariaDB了。它的优势在哪里: - -- 向后兼容MySQL -- 永远开源 -- 由MySQL缔造者的维护 -- 更尖端的功能 -- 更多的存储引擎 -- 大型的网站已经转向MariaDB - -现在,让我们迁移到MariaDB吧! - -**以测试为目的**让我们创建一个叫**linoxidedb**的示例数据库。 - -使用以下命令用root账户登陆MySQL: - - $ mysql -u root -p - -输入mysql root用户的密码后,你将进入**mysql的命令行** - -**创建测试数据库:** - -在mysql命令行输入以下命令以创建测试数据库。 - - mysql> create database linoxidedb; - -查看可用的数据库,输入以下命令: - - mysql> show databases; - -![creating test databases](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-test-databases.png) - -如你所见,算上刚刚新建的linoxidedb我们一共有5个数据库。 - - mysql> quit - -现在,我们就将刚创建的数据库从MySQL迁移到MariaDB。 - -注:使用CentOS这类基于fedora的linux发行版没有必要参考这篇教程,因为它们在安装MariaDB时会自动代替MySQL,无需备份现有的数据库,你只需要更新mysql就可以得到mariadb。 - -### 1. 备份现有的数据库 ### - -我们第一个重要的步骤就是备份现有的数据库。我们在**终端(不是MySQL命令行)**里输入如下命令来完成备份。 - - $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql - -哇哦!我们遇到了点麻烦。别担心我们可以搞定。 - - $ mysqldump: Error: Binlogging on server not active - -![](http://blog.linoxide.com/wp-content/uploads/2015/01/mysqldump-error.png) -mysqldump error - -为了修复这个错误,我们需要对**my.cnf**文件做一些小改动。 - -编辑my.cnf文件: - - $ sudo nano /etc/mysql/my.cnf - -在[mysqld]部分添加如下参数。 - -**log-bin=mysql-bin** - -![configuring my.cnf](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-my.cnf_.png) - -好了在保存并关闭文件后,我们需要重启一下mysql服务。运行以下命令重启: - - $ sudo /etc/init.d/mysql restart - -现在,重新运行mysqldump命令来备份所有的数据库。 - - $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql - -![](http://blog.linoxide.com/wp-content/uploads/2015/01/crearing-bakup-file.png) -dumping databases - -上面的命令将会备份所有的数据库,把它们存储在当前目录下的**backupdatabase.sql**文件中。 - -### 2. 卸载MySQL ### - -首先,我们得把**my.cnt文件挪到安全的地方去**。 - -**注**:my.cnf文件将不会在你卸载MySQL包的时候被删除,我们这样做只是以防万一。在MariaDB安装时,它会询问我们是保持现存的my.cnf文件,还是使用包中自带的版本(即新my.cnf文件)。 - -在shell或终端中输入如下命令来备份my.cnt文件: - - $ sudo cp /etc/mysql/my.cnf my.cnf.bak - -运行命令来终止mysql服务: - - $ sudo /etc/init.d/mysql stop - -然后移除mysql包: - - $ sudo apt-get remove mysql-server mysql-client - -![uninstalling mysql](http://blog.linoxide.com/wp-content/uploads/2015/01/uninstalling-mysql.png) - -### 3. 安装MariaDB ### - -这是在Ubuntu系统中安装MariaDB的命令: - - $ sudo apt-get install software-properties-common - $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db - # sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' - -![adding mariadb repo](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-repo-mariadb.png) - -键值导入并且添加完仓库后你就可以用以下命令安装MariaDB了: - - $ sudo apt-get update - $ sudo apt-get install mariadb-server - -![installing mariadb](http://blog.linoxide.com/wp-content/uploads/2015/01/installing-mariadb.png) - -![my.conf configuration prompt](http://blog.linoxide.com/wp-content/uploads/2015/01/my.conf-configuration-prompt.png) - -我们应该还没忘记在MariaDB安装时,它会问你是使用现有的my.cnf文件,还是包中自带的版本。你可以使用以前的my.cnf也可以用包中自带的。即使你想直接使用新的my.cnf文件,你依然可以晚点将以前的备份内容还原进去(别忘了我们已经将它复制到安全的地方那个去了)。所以,我们直接选择了默认的选项“N”。如果需要安装其他版本,请参考[MariaDB官方仓库][2]。 - -### 4. 恢复配置文件 ### - -想要将my.cnf.bak中的内容恢复到my.cnf,在终端中输入以下命令。由于my.cnf.bak文件在当前目录下,所以我们只要简单的执行以下命令即可: - - $ sudo cp my.cnf.bak /etc/mysql/my.cnf - -### 5. 导入数据库 ### - -最后,让我们把我们之前创建的数据库导入吧!运行一下命令即可完成导入。 - - $ mysql -u root -p < backupdatabase.sql - -就这样,我们已成功将之前的数据库导入了进来。 - -来,让我们登陆一下mysql命令行,检查一下数据库是否真的已经导入了: - - $ mysql -u root -p - -![importing database](http://blog.linoxide.com/wp-content/uploads/2015/01/importing-database.png) - -为了检查数据库是否被迁移到MariaDB,请在MariaDB命令行中输入“**show databases**;”不用输入(“”),如下: - - mariaDB> show databases; - -![mysql to mariadb database migrated](http://blog.linoxide.com/wp-content/uploads/2015/01/maria-database-migrated.png) - -如你所见,linoxidedb及所有的数据库都已经成功的被迁移了。 - -### 总结 ### - -最后,我们已经成功地从MySQL迁移到了MariaDB数据库管理系统。MariaDB比MySQL好,虽然在性能方面MySQL还是比它更快,但是MariaDB的优点在于它额外的特性与支持的许可证。这能够确保它自由开源(FOSS),并永久自由开源,相比之下MySQL还有许多额外的插件,有些不能自由使用代码、有些没有公开的开发进程、有些在不久的将来会变的不再自由开源。如果你有任何的问题、评论、反馈给我们,不要犹豫直接在评论区留下你的看法。谢谢观看本教程,希望那你能喜欢MariaDB。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://mariadb.org/ -[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi From 3654c31a6eb6ad8f1a24bd6f303fa2017029248a Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:42:52 +0800 Subject: [PATCH 0070/2517] Delete 20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md --- ...igration From MySQL To MariaDB On Linux.md | 171 ------------------ 1 file changed, 171 deletions(-) delete mode 100644 sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md diff --git a/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md deleted file mode 100644 index fc04e08a2f..0000000000 --- a/sources/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md +++ /dev/null @@ -1,171 +0,0 @@ -Translating by martin. - -Simple Steps Migration From MySQL To MariaDB On Linux -================================================================================ -Hi all, this tutorial is all gonna be about how to migrate from MySQL to MariaDB on Linux Server or PC. So, you may ask why should we really migrate from MySQL to MariaDB for our database management. Here, below are the reasons why you should really need to migrate your database management system from MySQL to MariaDB. - -### Why should I use MariaDB instead of MySQL? ### - -MariaDB is an enhanced drop-in replacement and community-developed fork of the MySQL database system. It was developed by MariaDB foundation, and is being led by original developers of MySQL. Working with MariaDB is entirely same as MySQL. After Oracle bought MySQL, it is not free and open source anymore, but **MariaDB is still free and open source**. Top Websites like Google, Wikipedia, Linkedin, Mozilla and many more migrated to MariaDB. Its features are - -- Backwards compatible with MySQL -- Forever open source -- Maintained by MySQL's creator -- More cutting edge features -- More storage engines -- Large websites have switched - -Now, lets migrate to MariaDB. - -**For the testing purpose**, let us create a sample database called **linoxidedb** . - -Log in to MySQL as root user using the following command: - - $ mysql -u root -p - -Enter the mysql root user password. You’ll be redirected to the **mysql prompt**. - -**Create test databases:** - -Enter the following commands from mysql prompt to create test databases. - - mysql> create database linoxidedb; - -To view the list of available databases, enter the following command: - - mysql> show databases; - -![creating test databases](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-test-databases.png) - -As see above, we have totally 5 databases including the newly created database linoxidedb . - - mysql> quit - -Now, we'll migrate the created databases from MySQL to MariaDB. - -Note: This tutorial is not necessary for CentOS, fedora based distribution of Linux because MariaDB is automatically installed instead of MySQL which requires no need to backup the existing databases, you just need to update mysql which will give you mariadb. - -### 1. Backup existing databases ### - -Our first important step is to create a backup of existing databases. To do that, we'll enter the following command from the **Terminal (not from MySQL prompt)**. - - $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql - -Oops! We encountered an error. No worries, it can be fixed. - - $ mysqldump: Error: Binlogging on server not active - -![](http://blog.linoxide.com/wp-content/uploads/2015/01/mysqldump-error.png) -mysqldump error - -To fix this error, we have to do a small modification in **my.cnf** file. - -Edit my.cnf file: - - $ sudo nano /etc/mysql/my.cnf - -Under [mysqld] section, add the following parameter. - -**log-bin=mysql-bin** - -![configuring my.cnf](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-my.cnf_.png) - -Now, after done save and exit the file. Then, we'll need to restart mysql server. To do that please execute the below commands. - - $ sudo /etc/init.d/mysql restart - -Now, re-run the mysqldump command to backup all databases. - - $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql - -![](http://blog.linoxide.com/wp-content/uploads/2015/01/crearing-bakup-file.png) -dumping databases - -The above command will backup all databases, and stores them in **backupdatabase.sql** in the current directory. - -### 2. Uninstalling MySQL ### - -First of all, we'll want to **backup the my.cnf file to a safe location**. - -**Note**: The my.cnf file will not be deleted when uninstalling MySQL packages. We do it for the precaution. During MariaDB installation, the installer will ask us to keep the existing my.cnf(old backup) file or to use the package containers version (i.e new one). - -To backup the my.cnf file, please enter the following commands in a shell or terminal. - - $ sudo cp /etc/mysql/my.cnf my.cnf.bak - -To stop mysql service, enter the following command from your Terminal. - - $ sudo /etc/init.d/mysql stop - -Then, remove mysql packages. - - $ sudo apt-get remove mysql-server mysql-client - -![uninstalling mysql](http://blog.linoxide.com/wp-content/uploads/2015/01/uninstalling-mysql.png) - -### 3. Installing MariaDB ### - -Here are the commands to run to install MariaDB on your Ubuntu system: - - $ sudo apt-get install software-properties-common - $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db - # sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' - -![adding mariadb repo](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-repo-mariadb.png) - -Once the key is imported and the repository added you can install MariaDB with: - - $ sudo apt-get update - $ sudo apt-get install mariadb-server - -![installing mariadb](http://blog.linoxide.com/wp-content/uploads/2015/01/installing-mariadb.png) - -![my.conf configuration prompt](http://blog.linoxide.com/wp-content/uploads/2015/01/my.conf-configuration-prompt.png) - -We should remember that during MariaDB installation, the installer will ask you either to use the existing my.cnf(old backup) file, or use the package containers version (i.e new one). You can either use the old my.cnf file or the package containers version. If you want to use the new my.cnf version, you can restore the contents of older my.cnf (We already have copied this file to safe location before) later ie my.cnf.bak . So, I will go for default which is N, we'll press N then. For other versions, please refer the [MariaDB official repositories page][2]. - -### 4. Restoring Config File ### - -To restore my.cnf from my.cnf.bak, enter the following command in Terminal. We have the old as my.cnf.bak file in our current directory, so we can simply copy the file using the following command: - - $ sudo cp my.cnf.bak /etc/mysql/my.cnf - -### 5. Importing Databases ### - -Finally, lets import the old databases that we created before. To do that, we'll need to run the following command. - - $ mysql -u root -p < backupdatabase.sql - -That’s it. We have successfully imported the old databases. - -Let us check if the databases are really imported. To do that, we'll wanna log in to mysql prompt using command: - - $ mysql -u root -p - -![importing database](http://blog.linoxide.com/wp-content/uploads/2015/01/importing-database.png) - -Now, to check whether the databases are migrated to MariaDB please run "**show databases**;" command inside the MarianDB prompt without quotes("") as - - mariaDB> show databases; - -![mysql to mariadb database migrated](http://blog.linoxide.com/wp-content/uploads/2015/01/maria-database-migrated.png) - -As you see in the above result all old databases including our very linoxidedb has been successfully migrated. - -### Conclusion ### - -Finally, we have successfully migrated our databases from MySQL to MariaDB Database Management System. MariaDB is far more better than MySQL. Though MySQL is still faster than MariaDB in performance but MariaDB is far more better because of its additional features and license. MariaDB is a Free and Open Source Software (FOSS) and will be FOSS forever but MySQL has many additional plugins, etc non-free and there is no proper public roadmap and won't be FOSS in future. If you have any questions, comments, feedback to us, please don't hesitate to write on the comment box below. Thank You ! And Enjoy MariaDB. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://mariadb.org/ -[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=mephi From 2f19219d128c9a4bbd91837378647b947210227e Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:51:08 +0800 Subject: [PATCH 0071/2517] Update 20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改一个翻译错误 --- ...20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index 254345f765..762e363beb 100644 --- a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -1,6 +1,6 @@ Ubuntu上的一个开源VoIP应用——Mumble ================================================================================ -Mumble是一个免费开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 +Mumble是一个自由开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 Mumble提供了如下的一些特性: From 0fcd0d498b8d0467f35d660477429ffb15341083 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 21 Feb 2015 01:57:41 +0800 Subject: [PATCH 0072/2517] Update 20150215 How to share files between computers over network with btsync.md --- ... share files between computers over network with btsync.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150215 How to share files between computers over network with btsync.md b/sources/tech/20150215 How to share files between computers over network with btsync.md index 3af649b886..e892f2bb55 100644 --- a/sources/tech/20150215 How to share files between computers over network with btsync.md +++ b/sources/tech/20150215 How to share files between computers over network with btsync.md @@ -1,3 +1,5 @@ +translating by martin. + How to share files between computers over network with btsync ================================================================================ If you are the type of person who uses several devices to work online, I'm sure you must be using, or at least wishing to use, a method for syncing files and directories among those devices. @@ -133,4 +135,4 @@ via: http://xmodulo.com/share-files-between-computers-over-network.html [1]:https://play.google.com/store/apps/details?id=com.bittorrent.sync [2]:https://itunes.apple.com/us/app/bittorrent-sync/id665156116 [3]:http://www.getsync.com/ -[4]:http://www.getsync.com/tech-specs \ No newline at end of file +[4]:http://www.getsync.com/tech-specs From dbd9be1217475d4a3b0070983675bf04b837b68a Mon Sep 17 00:00:00 2001 From: coloka Date: Sat, 21 Feb 2015 10:43:25 +0800 Subject: [PATCH 0073/2517] [Translating]20150121 How to apply image effects to pictures on Raspberry Pi --- ...121 How to apply image effects to pictures on Raspberry Pi.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md b/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md index 920f542832..6f97f3454e 100644 --- a/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md +++ b/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md @@ -1,3 +1,4 @@ +Translating by coloka How to apply image effects to pictures on Raspberry Pi ================================================================================ Like a common pocket camera which has a built-in function to add various effects on captured photos, [Raspberry Pi camera board][1] ("raspi cam") can actually do the same. With the help of raspistill camera control options, we can add the image effects function like we have in a pocket camera. From 0615c77f20047b51976a660a928887c31b1d572d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 21 Feb 2015 22:40:26 +0800 Subject: [PATCH 0074/2517] PUB:20150105 How To Install Winusb In Ubuntu 14.04 @geekpi --- .../20150105 How To Install Winusb In Ubuntu 14.04.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150105 How To Install Winusb In Ubuntu 14.04.md (69%) diff --git a/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md b/published/20150105 How To Install Winusb In Ubuntu 14.04.md similarity index 69% rename from translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md rename to published/20150105 How To Install Winusb In Ubuntu 14.04.md index a65ba04392..8fb636c6d2 100644 --- a/translated/tech/20150105 How To Install Winusb In Ubuntu 14.04.md +++ b/published/20150105 How To Install Winusb In Ubuntu 14.04.md @@ -2,13 +2,13 @@ ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/WinUSB_Ubuntu_1404.jpeg) -[WinUSB][1]是一款即简单又有用的工具,可以让你从 Windows ISO 镜像或者 DVD 中创建 USB 安装盘。它结合了 GUI 和命令行,你可以根据你的喜好决定使用哪种。 +[WinUSB][1]是一款即简单又有用的工具,可以让你从 Windows ISO 镜像或者 DVD 中创建 USB 安装盘(LCTT译注:支持将 Windows Vista/7/8/PE 制作成 USB 安装盘)。它支持 GUI 和命令行,你可以根据你的喜好决定使用哪种。 在本文中我们会展示**如何在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB**。 ### 在 Ubuntu 14.04、14.10 和 Linux Mint 17 中安装 WinUSB ### -在 Ubuntu 13.10 之前, WinUSBu 一直都在积极开发,且在官方 PPA 中可以找到。这个 PPA 还没有为 Ubuntu 14.04 和 14.10 更新,但是二进制文件仍旧可在更新版本的 Ubuntu 和 Linux Mint 中运行。基于[你使用的系统是32位还是64位][2],使用下面的命令来下载二进制文件: +在 Ubuntu 13.10 之前, WinUSB 一直都在积极开发,且在官方 PPA 中可以找到。但这个 PPA 还没有为 Ubuntu 14.04 和 14.10 更新,不过其二进制文件仍旧可在更新版本的 Ubuntu 和 Linux Mint 中运行。基于[你使用的系统是32位还是64位][2],使用下面的命令来下载二进制文件: 打开终端,32位的系统下使用下面的命令: @@ -18,11 +18,11 @@ wget https://launchpad.net/~colingille/+archive/freshlight/+files/winusb_1.0.11+saucy1_amd64.deb -一旦你下载了正确的二进制包,你可以用下面的命令安装WinUSB: +当你下载了正确的二进制包,你可以用下面的命令安装WinUSB: sudo dpkg -i winusb* -不要担心在你安装WinUSB时看到错误。使用这条命令修复依赖错误: +不要担心在你安装WinUSB时看到的错误。使用这条命令修复依赖错误: sudo apt-get -f install From f1669fc0c4defed30d3c4ff32533a57048a1469d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 21 Feb 2015 23:07:03 +0800 Subject: [PATCH 0075/2517] PUB:20150106 How to deduplicate files on Linux with dupeGuru @geekpi --- ...eduplicate files on Linux with dupeGuru.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150106 How to deduplicate files on Linux with dupeGuru.md (51%) diff --git a/translated/tech/20150106 How to deduplicate files on Linux with dupeGuru.md b/published/20150106 How to deduplicate files on Linux with dupeGuru.md similarity index 51% rename from translated/tech/20150106 How to deduplicate files on Linux with dupeGuru.md rename to published/20150106 How to deduplicate files on Linux with dupeGuru.md index b8ffbd37e8..143e786e09 100644 --- a/translated/tech/20150106 How to deduplicate files on Linux with dupeGuru.md +++ b/published/20150106 How to deduplicate files on Linux with dupeGuru.md @@ -1,10 +1,10 @@ -如何在Linux上使用dupeGuru删除重复文件 +删除重复文件的神器:dupeGuru ================================================================================ -最近,我被要求清理我父亲的文件和文件夹。有一个难题是,里面存在很多不正确的名字的重复文件。有移动硬盘的备份,同时还为同一个文件编辑了多个版本,甚至改变的目录结构,同一个文件被复制了好几次,改变名字,改变位置等,这些挤满了磁盘空间。追踪每一个文件成了一个最大的问题。万幸的是,有一个小巧的软件可以帮助你省下很多时间来找到删除你系统中重复的文件:[dupeGuru][1]。它用Python写成,这个去重软件几个小时钱前切换到了GPLv3许可证。因此是时候用它来清理你的文件了! +最近,我需要清理我父亲的文件和文件夹。有一个难题是,里面存在很多不正确的名字的重复文件。有移动硬盘的备份,同时还为同一个文件编辑了多个版本,甚至改变的目录结构,同一个文件被复制了好几次,名字改变,位置改变等,这些文件挤满了磁盘空间。追踪每一个文件成了一个最大的问题。万幸的是,有一个小巧的软件可以帮助你省下很多时间来找到删除你系统中重复的文件:[dupeGuru][1]。它用Python写成,这个去重软件几个小时前切换到了GPLv3许可证。因此是时候用它来清理你的文件了! ### dupeGuru的安装 ### -在Ubuntu上, 你可以加入Hardcoded的软件PPA: +在Ubuntu上, 你可以加入如下硬编码的软件PPA: $ sudo apt-add-repository ppa:hsoft/ppa $ sudo apt-get update @@ -33,29 +33,29 @@ DupeGuru的构想是既快又安全。这意味着程序不会在你的系统上 ![](https://farm9.staticflickr.com/8600/16016041367_5ab2834efb_z.jpg) -注意的是默认上dupeGuru基于文件的内容匹配,而不是他们的名字。为了防止意外地删除了重要的文件,匹配那列列出了使用的匹配算法。在这里,你可以选择你想要删除的匹配文件,并按下“Action” 按钮来看到可用的操作。 +注意的是默认上dupeGuru基于文件的内容匹配,而不是他们的名字。为了防止意外地删除了重要的文件,匹配列列出了其使用的匹配算法。在这里,你可以选择你想要删除的匹配文件,并按下“Action” 按钮来看到可用的操作。 ![](https://farm8.staticflickr.com/7516/16199976361_c8f919b06e_b.jpg) -可用的选项是相当广泛的。简而言之,你可以删除重复、移动到另外的位置、忽略它们、打开它们、重命名它们甚至用自定义命令运行它们。如果你选择删除重复文件,你可能会像我一样非常意外竟然还有删除选项。 +可用的选项相当广泛。简而言之,你可以删除重复、移动到另外的位置、忽略它们、打开它们、重命名它们甚至用自定义命令运行它们。如果你希望删除重复文件,你可能会像我一样非常意外竟然有这么多种删除方式。 ![](https://farm8.staticflickr.com/7503/16014366568_54f70e3140.jpg) -你不及可以将删除文件移到垃圾箱或者永久删除,还可以选择留下指向原文件的链接(软链接或者硬链接)。也就是说,重复文件按将会删除但是会保留下指向原文件的链接。这将会省下大量的磁盘空间。如果你将这些文件导入到工作空间或者它们有一些依赖时很有用。 +你不仅可以将删除的文件移到垃圾箱或者永久删除,还可以选择留下指向原文件的链接(软链接或者硬链接)。也就是说,重复文件将会删除文件存储,但是会保留下一个指向原文件的链接。这将会省下大量的磁盘空间。如果你将这些文件导入到工作空间或者它们有一些依赖时很有用。 -还有一个奇特的选项:你可以用HTML或者CSV文件导出结果。不确定你会不会这么做,但是我假设你想追踪重复文件而不是想让dupeGuru处理它们时会有用。 +还有一个奇特的选项:你可以用HTML或者CSV文件导出结果。我不确定你会不会需要这么做,但是我假设你想追踪重复文件而不是想让dupeGuru处理它们时会有用。 -最后但并不是最不重要的是,偏好菜单可以让你对去重的想法成真。 +最后但并不是最不重要的是,偏好菜单可以让你按照你的想法来操作去重这件事。 ![](https://farm8.staticflickr.com/7493/16015755749_a9f343b943_z.jpg) -这里你可以选择扫描的标准,基于内容还是基于文字,并且有一个阈值来控制结果的数量。这里同样可以定义自定义在执行中可以选择的命令。在无数其他小的选项中,要注意的是dupeGuru默认忽略小于10KB的文件。 +这里你可以选择扫描的标准,基于内容还是基于名字,并且有一个阈值来控制结果的数量。这里同样可以定义自定义在执行中可以选择的命令。混在其他那些小的选项中,要注意的是dupeGuru默认忽略小于10KB的文件。 -要了解更多的信息,我建议你到[official website][4]官方网站看下,这里有很多文档、论坛支持和其他好东西。 +要了解更多的信息,我建议你到[官方网站][4]看下,这里有很多文档、论坛支持和其他好东西。 -总结一下,dupeGuru是我无论何时准备备份或者释放空间时想到的软件。我发现这对高级用户而言也足够强大了,对新人而言也很直观。锦上添花的是:dupeGuru是跨平台的额,这意味着你可以在Mac或者在Windows PC上都可以使用。如果你有特定的需求,想要清理音乐或者图片。这里有两个变种:[dupeguru-me][5]和 [dupeguru-pe][6], 相应地可以清理音频和图片文件。与常规版本的不同是它不仅比较文件格式还比较特定的媒体数据像质量和码率。 +总结一下,dupeGuru是我无论何时准备备份或者释放空间时所想到的软件。我发现这对高级用户而言也足够强大了,对新人而言也很直观。锦上添花的是:dupeGuru是跨平台的,这意味着你可以在Mac或者在Windows PC上都可以使用。如果你有特定的需求,想要清理音乐或者图片。这里有两个变种:[dupeguru-me][5]和 [dupeguru-pe][6], 相应地可以清理音频和图片文件。与常规版本的不同是它不仅比较文件格式还比较特定的媒体数据像质量和码率。 -你dupeGuru怎么样?你会考虑使用它么?或者你有任何可以替代的软件的建议么?让我在评论区知道你们的想法。 +你觉得dupeGuru怎么样?你会考虑使用它么?或者你有任何可以替代的软件的建议么?让我在评论区知道你们的想法。 -------------------------------------------------------------------------------- @@ -63,7 +63,7 @@ via: http://xmodulo.com/dupeguru-deduplicate-files-linux.html 作者:[Adrien Brochard][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 249a70a7c90bc0f886701ff32e4040b8091fff84 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 21 Feb 2015 23:45:05 +0800 Subject: [PATCH 0076/2517] PUB:20150106 Managing Linux server configs with the SaltStack @GOLinux --- ...Linux server configs with the SaltStack.md | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) rename {translated/tech => published}/20150106 Managing Linux server configs with the SaltStack.md (90%) diff --git a/translated/tech/20150106 Managing Linux server configs with the SaltStack.md b/published/20150106 Managing Linux server configs with the SaltStack.md similarity index 90% rename from translated/tech/20150106 Managing Linux server configs with the SaltStack.md rename to published/20150106 Managing Linux server configs with the SaltStack.md index 1acf7c2434..44c980dddc 100644 --- a/translated/tech/20150106 Managing Linux server configs with the SaltStack.md +++ b/published/20150106 Managing Linux server configs with the SaltStack.md @@ -1,20 +1,21 @@ -SaltStack:Linux服务器配置管理神器 +通过 SaltStack 管理服务器配置 ================================================================================ ![](http://techarena51.com/wp-content/uploads/2015/01/SaltStack+logo+-+black+on+white.png) 我在搜索[Puppet][1]的替代品时,偶然间碰到了Salt。我喜欢puppet,但是我又爱上Salt了:)。我发现Salt在配置和使用上都要比Puppet简单,当然这只是一家之言,你大可不必介怀。另外一个爱上Salt的理由是,它可以让你从命令行管理服务器配置,比如: -要通过Salt来更新所有服务器,你只需运行以下命令 +要通过Salt来更新所有服务器,你只需运行以下命令即可 - salt ‘*’ pkg.upgrade + salt '*' pkg.upgrade -**安装SaltStack到Linux上。** -如果你是在CentOS 6/7上安装的话,那么Salt可以通过EPEL仓库获取到。而对于Pi和Ubuntu Linux用户,你可以从[这里][2]添加Salt仓库。Salt是基于python的,所以你也可以使用‘pip’来安装,但是你得用yum-utils或是其它包管理器来自己处理它的依赖关系哦。 +##安装SaltStack到Linux上## -Salt遵循服务器-客户端模式,服务器端称为领主,而客户端则称为下属。 +如果你是在CentOS 6/7上安装的话,那么Salt可以通过EPEL仓库获取到。而对于Pi和Ubuntu Linux用户,你可以从[这里][2]添加Salt仓库。Salt是基于python的,所以你也可以使用‘pip’来安装,但是你得用yum-utils或是其它包管理器来自己处理它的依赖关系。 -**安装并配置Salt领主** +Salt采用服务器-客户端模式,服务器端称为领主,而客户端则称为下属。 + +###安装并配置Salt领主### [root@salt-master~]# yum install salt-master @@ -27,7 +28,7 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但 [root@salt-master ~]# systemctl start salt-master -**安装并配置Salt下属** +###安装并配置Salt下属### [root@salt-minion~]#yum install salt-minion @@ -39,7 +40,7 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但 在启动时,下属客户机会生成一个密钥和一个id。然后,它会连接到Salt领主服务器并验证自己的身份。Salt领主服务器在允许下属客户机下载配置之前,必须接受下属的密钥。 -**在Salt领主服务器上列出并接受密钥** +###在Salt领主服务器上列出并接受密钥### # 列出所有密钥 [root@salt-master~] salt-key -L @@ -59,7 +60,7 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但 在接受下属客户机的密钥后,你可以使用‘salt’命令来立即获取信息。 -**Salt命令行实例** +##Salt命令行实例## # 检查下属是否启动并运行 [root@salt-master~] salt 'minion.com' test.ping @@ -75,15 +76,15 @@ Salt配置文件位于/etc/salt和/srv/salt。Salt虽然可以开箱即用,但 # 安装/更新所有服务器上的软件 [root@salt-master ~]# salt '*' pkg.install git -salt命令需要一些组件来发送信息,其中之一是mimion id,而另一个是下属客户机上要调用的函数。 +salt命令需要一些组件来发送信息,其中之一是下属客户机的id,而另一个是下属客户机上要调用的函数。 在第一个实例中,我使用‘test’模块的‘ping’函数来检查系统是否启动。该函数并不是真的实施一次ping,它仅仅是在下属客户机作出回应时返回‘真’。 ‘cmd.run’用于执行远程命令,而‘pkg’模块包含了包管理的函数。本文结尾提供了全部内建模块的列表。 -**颗粒实例** +###颗粒实例### -Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用颗粒在指定属性的系统上运行命令。 +Salt使用一个名为**颗粒(Grains)**的界面来获取系统信息。你可以使用颗粒在指定属性的系统上运行命令。 [root@vps4544 ~]# salt -G 'os:Centos' test.ping minion: @@ -91,11 +92,11 @@ Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用 更多颗粒实例,请访问http://docs.saltstack.com/en/latest/topics/targeting/grains.html -**通过状态文件系统进行包管理。** +##通过状态文件系统进行包管理## -为了是软件配置自动化,你需要使用状态系统,并创建状态文件。这些文件使用YAML格式和python字典、列表、字符串以及编号来构成数据结构。将这些文件从头到尾研读一遍,这将有助于你更好地理解它的配置。 +为了使软件配置自动化,你需要使用状态系统,并创建状态文件。这些文件使用YAML格式和python字典、列表、字符串以及编号来构成数据结构。将这些文件从头到尾研读一遍,这将有助于你更好地理解它的配置。 -**VIM状态文件实例** +###VIM状态文件实例### [root@salt-master~]# vim /srv/salt/vim.sls vim-enhanced: @@ -107,7 +108,7 @@ Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用 - group: root - mode: 644 -该文件的第一和第三行成为状态id,它们必须包含有需要管理的包或文件的确切名称或路径。在状态id之后是状态和函数声明,‘pkg’和‘file’是状态声明,而‘installed’和‘managed’是函数声明。函数接受参数,用户、组、模式和源都是函数‘managed’的参数。 +该文件的第一和第三行称为状态id,它们必须包含有需要管理的包或文件的确切名称或路径。在状态id之后是状态和函数声明,‘pkg’和‘file’是状态声明,而‘installed’和‘managed’是函数声明。函数接受参数,用户、组、模式和源都是函数‘managed’的参数。 要将该配置应用到下属客户端,请移动你的‘vimrc’文件到‘/src/salt’,然后运行以下命令。 @@ -253,7 +254,7 @@ Salt使用一个名为**颗粒**的界面来获取系统信息。你可以使用 [root@vps4544 ssh]# cp /etc/ssh/sshd_config /srv/salt/ssh/ [root@vps4544 ssh]# salt 'minion.com' state.sls ssh -**Top文件和环境。** +###Top文件和环境### top文件(top.sls)是用来定义你的环境的文件,它允许你映射下属客户机到包,默认环境是‘base’。你需要定义在基本环境下,哪个包会被安装到哪台服务器。 @@ -268,7 +269,7 @@ top文件(top.sls)是用来定义你的环境的文件,它允许你映射 dev: - /srv/salt/dev -现在,添加一个top.sls文件到/src/salt +现在,添加一个top.sls文件到/src/salt。 [root@salt-master ~]# vim /srv/salt/top.sls base: @@ -299,7 +300,9 @@ top文件(top.sls)是用来定义你的环境的文件,它允许你映射 下属客户机将下载top文件并搜索用于它的配置,领主服务器也会将配置应用到所有下属客户机。 -这仅仅是一个Salt的简明教程,如果你想要深入学习并理解,你可以访问以下链接。如果你已经在使用Salt,那么请告诉我你的建议和意见吧。 +--- + +这仅仅是一个Salt的简明教程,如果你想要深入学习并理解,你可以访问下面的链接。如果你已经在使用Salt,那么请告诉我你的建议和意见吧。 更新: [Foreman][3] 已经通过[插件][4]支持salt。 @@ -329,7 +332,7 @@ via: http://techarena51.com/index.php/getting-started-with-saltstack/ 作者:[Leo G][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f49604a794e8a35c90b2dcf1cba330d931232196 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 21 Feb 2015 23:51:54 +0800 Subject: [PATCH 0077/2517] PUB:20150115 Configure Mate Desktop With Mate Tweak @geekpi --- .../20150115 Configure Mate Desktop With Mate Tweak.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20150115 Configure Mate Desktop With Mate Tweak.md (92%) diff --git a/translated/tech/20150115 Configure Mate Desktop With Mate Tweak.md b/published/20150115 Configure Mate Desktop With Mate Tweak.md similarity index 92% rename from translated/tech/20150115 Configure Mate Desktop With Mate Tweak.md rename to published/20150115 Configure Mate Desktop With Mate Tweak.md index 7ae68abaae..3b2f1c972b 100644 --- a/translated/tech/20150115 Configure Mate Desktop With Mate Tweak.md +++ b/published/20150115 Configure Mate Desktop With Mate Tweak.md @@ -4,7 +4,7 @@ [在Ubuntu中安装Mate桌面][1]是一码事但是你或许想要知道如何**配置Mate桌面**? 大多数桌面环境都有它们自己的调整工具。比如Unity有Unity Tweak,Gnome有Gnome Tweak,Elementary OS有 Elementary OS Teweak。好消息是Mate桌面也有它自己的调整工具,叫Mate Tweak][2]。 -Mate Tweak是[mintDesktop][3]的克隆分支,一款Linux Mint的配置工具。 +Mate Tweak是[mintDesktop][3]的克隆分支,那是一款Linux Mint的配置工具。 ### 安装Mate Tweak来配置Mate桌面 ### @@ -22,7 +22,7 @@ via: http://itsfoss.com/configure-mate-desktop-mate-tweak/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 48a3204c132d03dd78941f3be1ca3e82bdd372d7 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 22 Feb 2015 07:52:38 +0800 Subject: [PATCH 0078/2517] Translated --- ...fault Instead of Ubuntu Software Center.md | 48 ------------------- ...fault Instead of Ubuntu Software Center.md | 46 ++++++++++++++++++ 2 files changed, 46 insertions(+), 48 deletions(-) delete mode 100644 sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md create mode 100644 translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md diff --git a/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md deleted file mode 100644 index 55bca268d1..0000000000 --- a/sources/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md +++ /dev/null @@ -1,48 +0,0 @@ -Translating by FSSlc - -How To Make GDebi Default Instead of Ubuntu Software Center -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) - -If you use Ubuntu or Ubuntu based Linux distribution such as Elementary OS Freya, you might be using Ubuntu Software Center to install .deb executable files. Ubuntu Software Center is a nice application for finding and installing apps but it is resource heavy and slow. This is why I prefer using [App Grid, a lighter alternative of Ubuntu Software Center][1]. - -Now, if you just trying to install a .deb file, I would not recommend either of Ubuntu Software Center or App Grid. I suggest GDebi, a dedicated program for installing Debian executable files. It is extremely lightweight and focused on installing .deb files. Best thing about GDebi is that it also shows the dependencies that will be installed along with the desired program. - -In this post we shall see **how to install GDebi and use it as the default installer instead of Ubuntu Software Center**. - -### Install GDebi in Ubuntu and other Linux distributions ### - -Open a terminal and use the following command: - - sudo apt-get install gdebi - -### Make GDebi default for .deb installation ### - -Once you have installed GDebi, it’s time to see how to make it the default application for installing .deb files. Please note that I am using Elementary OS Freya in this tutorial but the steps are applicable to all Ubuntu based distribution. Just the screenshots may look different. - -Download a .deb file first. Let’s say you have downloaded Google Chrome. Go to the download directory and right click on the .deb file. In here, go to **properties**. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default.jpeg) - -In the properties, you should see the option of **open with**. Click on it and change it to GDebi. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default_Ubuntu.jpeg) - -Next time you double click on a .deb file, it will automatically open GDebi to install the .deb file. Indeed using such light applications is a good way to [speed up Ubuntu][2] or other Linux systems. - -What do you say? You still prefer Ubuntu Software Center for application installation or GDebi? Or if you are old school, [Synaptic Package Manager][3] perhaps? Which one is your favorite? - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/gdebi-default-ubuntu-software-center/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/app-grid-lighter-alternative-ubuntu-software-center/ -[2]:http://itsfoss.com/speed-up-ubuntu-1310/ -[3]:http://www.nongnu.org/synaptic/ \ No newline at end of file diff --git a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md new file mode 100644 index 0000000000..603c20cfce --- /dev/null +++ b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md @@ -0,0 +1,46 @@ +如何是 GDebi 代替 Ubuntu Software Center 成为默认的 deb 包安装器 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) + +假如你使用 Ubuntu 或像 Elementary OS Freya 一样的基于 Ubuntu 的 Linux 发行版本,也许你使用 Ubuntu 软件中心 来安装 `.deb` 可执行文件。对于查找和安装应用, Ubuntu 软件中心 是一个很好的应用,但它会消耗很多资源且运行速度缓慢。这就是为什么我更偏爱使用 [App Grid,一个 Ubuntu 软件中心 的轻量替代品][1]。 + +现在,假如你只是尝试安装一个 `.deb` 文件, 我不会向你推荐 Ubuntu 软件中心 或 App Grid ,我的建议为 GDebi,一个安装 Debian 可执行文件的专用程序。它极其轻量,且专注于安装 `.deb` 文件。关于 GDebi 最好的功能是它也可以为你展示出将要安装的程序的依赖。 + +在这篇文章中,我们将见证 ** 如何安装 GDebi 和使用它代替 Ubuntu 软件中心 作为默认的安装器**。 + +### 在 Ubuntu 和其他 Linux 发行版本中安装 GDebi ### + +打开终端并使用下面的命令: + + sudo apt-get install gdebi + +### 使得 GDebi成为默认的 `.deb`包安装器 ### + +一旦你安装了 GDebi,就该是看看如何使它成为安装 `.deb` 文件的默认应用的时间了。请读者注意在这篇教程中 我使用的是 Elementary OS Freya ,但是下面的步骤对于所有基于 Ubuntu 的发行版本都是适用的。 + +首先下载一个 `.deb`文件。例如你已经下载了一个 Google Chrome 的 `.deb`包。进入下载目录并右击该 `.deb`文件。这里,接着选择 **属性**选项。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default.jpeg) + +在属性中,你应该可以看到 **打开方式** 选项。点击它并选择为 GDebi。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default_Ubuntu.jpeg) + +下次你双击一个 `.deb` 文件,将自动打开 GDebi 来安装`.deb` 文件。使用这样轻量的应用的确是一个[加速 Ubuntu][2] 或其他 Linux 系统的好方法。 + +你有什么意见呢?对于安装应用,你仍然偏爱于 Ubuntu 软件中心还是 GDebi 呢?抑或,假如你是一个守旧派,也许你更喜欢[[新立得软件包管理器(Synaptic Package Manager)][3]? 哪一个是你的最爱呢? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/gdebi-default-ubuntu-software-center/ + +作者:[Abhishek][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/app-grid-lighter-alternative-ubuntu-software-center/ +[2]:http://itsfoss.com/speed-up-ubuntu-1310/ +[3]:http://www.nongnu.org/synaptic/ \ No newline at end of file From 2f309610bfe286651c9966a14f12f932f31408f9 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 22 Feb 2015 08:02:27 +0800 Subject: [PATCH 0079/2517] Update 20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 最后修改,确认翻译。 --- ...efault Instead of Ubuntu Software Center.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md index 603c20cfce..a8032e03ca 100644 --- a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md +++ b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md @@ -1,10 +1,10 @@ -如何是 GDebi 代替 Ubuntu Software Center 成为默认的 deb 包安装器 +如何使 GDebi 代替 Ubuntu Software Center 作为默认的 deb 包安装器 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) -假如你使用 Ubuntu 或像 Elementary OS Freya 一样的基于 Ubuntu 的 Linux 发行版本,也许你使用 Ubuntu 软件中心 来安装 `.deb` 可执行文件。对于查找和安装应用, Ubuntu 软件中心 是一个很好的应用,但它会消耗很多资源且运行速度缓慢。这就是为什么我更偏爱使用 [App Grid,一个 Ubuntu 软件中心 的轻量替代品][1]。 +假如你使用 Ubuntu 或像 Elementary OS Freya 一样的基于 Ubuntu 的 Linux 发行版本,也许你使用 Ubuntu 软件中心 来安装 `.deb` 可执行文件。对于查找和安装应用, Ubuntu 软件中心 是一个很好的应用,但它会消耗很多资源且运行速度缓慢。这就是为什么我更偏爱使用 [App Grid,一个 Ubuntu 软件中心 的轻量替代品][1] 的原因。 -现在,假如你只是尝试安装一个 `.deb` 文件, 我不会向你推荐 Ubuntu 软件中心 或 App Grid ,我的建议为 GDebi,一个安装 Debian 可执行文件的专用程序。它极其轻量,且专注于安装 `.deb` 文件。关于 GDebi 最好的功能是它也可以为你展示出将要安装的程序的依赖。 +现在,假如你只是尝试安装一个 `.deb` 文件, 我不会向你推荐 Ubuntu 软件中心 或 App Grid ,我的建议为 GDebi,一个安装 Debian 可执行文件的专用程序。它极其轻量,且专注于安装 `.deb` 文件。关于 GDebi 最有用的功能是它也可以为你展示出将要安装的程序的依赖。 在这篇文章中,我们将见证 ** 如何安装 GDebi 和使用它代替 Ubuntu 软件中心 作为默认的安装器**。 @@ -14,11 +14,11 @@ sudo apt-get install gdebi -### 使得 GDebi成为默认的 `.deb`包安装器 ### +### 使得 GDebi 成为默认的 `.deb`包安装器 ### -一旦你安装了 GDebi,就该是看看如何使它成为安装 `.deb` 文件的默认应用的时间了。请读者注意在这篇教程中 我使用的是 Elementary OS Freya ,但是下面的步骤对于所有基于 Ubuntu 的发行版本都是适用的。 +一旦你安装了 GDebi,就该是看看如何使它成为安装 `.deb` 文件的默认应用的时刻了。请读者注意在这篇教程中 我使用的是 Elementary OS Freya ,但下面的步骤对于所有基于 Ubuntu 的发行版本都是适用的。 -首先下载一个 `.deb`文件。例如你已经下载了一个 Google Chrome 的 `.deb`包。进入下载目录并右击该 `.deb`文件。这里,接着选择 **属性**选项。 +首先下载一个 `.deb`文件。例如你已经下载了一个 Google Chrome 的 `.deb`包。进入下载目录并右击该 `.deb`文件。在这里,接着选择 **属性**选项。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default.jpeg) @@ -26,9 +26,9 @@ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default_Ubuntu.jpeg) -下次你双击一个 `.deb` 文件,将自动打开 GDebi 来安装`.deb` 文件。使用这样轻量的应用的确是一个[加速 Ubuntu][2] 或其他 Linux 系统的好方法。 +这样下次你双击一个 `.deb` 文件,便会自动打开 GDebi 来安装这个`.deb` 文件。使用这样轻量的应用的确是一个[加速 Ubuntu][2] 或其他 Linux 系统的好方法。 -你有什么意见呢?对于安装应用,你仍然偏爱于 Ubuntu 软件中心还是 GDebi 呢?抑或,假如你是一个守旧派,也许你更喜欢[[新立得软件包管理器(Synaptic Package Manager)][3]? 哪一个是你的最爱呢? +你有什么意见呢?对于安装应用,你仍然偏爱于 Ubuntu 软件中心 还是 GDebi 呢?抑或,假如你是一个守旧派,也许你更喜欢 [新立得软件包管理器(Synaptic Package Manager)][3]? 哪一个是你的最爱呢? -------------------------------------------------------------------------------- @@ -43,4 +43,4 @@ via: http://itsfoss.com/gdebi-default-ubuntu-software-center/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://itsfoss.com/app-grid-lighter-alternative-ubuntu-software-center/ [2]:http://itsfoss.com/speed-up-ubuntu-1310/ -[3]:http://www.nongnu.org/synaptic/ \ No newline at end of file +[3]:http://www.nongnu.org/synaptic/ From 2d0ca99ca21473467fa83eafc723e20a5771bb88 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 22 Feb 2015 08:18:30 +0800 Subject: [PATCH 0080/2517] [Translating] 20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md --- ...11 Useful Utilities To Supercharge Your Ubuntu Experience.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md b/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md index e947762b7c..928778fc4b 100644 --- a/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md +++ b/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md @@ -1,3 +1,5 @@ +Translating by FSSlc + 11 Useful Utilities To Supercharge Your Ubuntu Experience ================================================================================ **Whether you’re a relative novice or a seasoned pro, we all want to get the most from our operating system. Ubuntu, like most modern OSes, has more to offer than what is presented at first blush.** From 81b5755ebd49efdeeb5b63b53669ed63c8c02747 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 22 Feb 2015 14:01:32 +0800 Subject: [PATCH 0081/2517] translating --- sources/tech/20150225 How to Hide PHP Version in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 How to Hide PHP Version in Linux.md b/sources/tech/20150225 How to Hide PHP Version in Linux.md index ddc219bac1..edd042e8f2 100644 --- a/sources/tech/20150225 How to Hide PHP Version in Linux.md +++ b/sources/tech/20150225 How to Hide PHP Version in Linux.md @@ -1,3 +1,5 @@ +Translating----geekpi + How to Hide PHP Version in Linux ================================================================================ In general, most of the web server software has been installed with default settings that will lead to information leakage. One of them is a PHP software. PHP (Hypertest Preprocessor) is one of the most popular server-side HTML embedded scripting language for the websites today. In the current challenging times, there are lots of attacker will try to discover the weaknesses in your your server system. Hence, i will describe the simple way to hide the PHP information in Linux server. @@ -53,4 +55,4 @@ via: http://www.ehowstuff.com/how-to-hide-php-version-in-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.ehowstuff.com/author/mhstar/ -[1]:http://www.ehowstuff.com/archives/ \ No newline at end of file +[1]:http://www.ehowstuff.com/archives/ From 972a0dcc68cd2ebf3c195141f3911adc8cebb91f Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 22 Feb 2015 14:18:51 +0800 Subject: [PATCH 0082/2517] translated --- ...0150225 How to Hide PHP Version in Linux.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) rename {sources => translated}/tech/20150225 How to Hide PHP Version in Linux.md (53%) diff --git a/sources/tech/20150225 How to Hide PHP Version in Linux.md b/translated/tech/20150225 How to Hide PHP Version in Linux.md similarity index 53% rename from sources/tech/20150225 How to Hide PHP Version in Linux.md rename to translated/tech/20150225 How to Hide PHP Version in Linux.md index edd042e8f2..1634ff2af2 100644 --- a/sources/tech/20150225 How to Hide PHP Version in Linux.md +++ b/translated/tech/20150225 How to Hide PHP Version in Linux.md @@ -1,18 +1,16 @@ -Translating----geekpi - -How to Hide PHP Version in Linux +如何在Linux中隐藏PHP版本 ================================================================================ -In general, most of the web server software has been installed with default settings that will lead to information leakage. One of them is a PHP software. PHP (Hypertest Preprocessor) is one of the most popular server-side HTML embedded scripting language for the websites today. In the current challenging times, there are lots of attacker will try to discover the weaknesses in your your server system. Hence, i will describe the simple way to hide the PHP information in Linux server. +通常上,大多数默认设置安装的web服务器存在信息泄露。这其中之一是PHP。PHP(超文本预处理器)是如今流行的服务端html嵌入式语言。在如今这个充满挑战的时代,有许多攻击者会尝试发现你服务端的漏洞。因此,我会简单描述如何在Linux服务器中隐藏PHP信息。 -By default **expose_php** is set to On. Turning off the “expose_php” parameter causes that PHP will hide it version details. +默认上**exposr_php**默认是开的。关闭“expose_php”参数可以使php隐藏它的版本信息。 [root@centos66 ~]# vi /etc/php.ini -In your php.ini, locate the line containing expose_php On and set it to Off: +在你的php.ini, 定位到含有expose_php的那行把On设成Off: expose_php = Off -Before the changes, web server header will look like below : +在此之前,web服务器头看上去就像这样: [root@centos66 ~]# curl -I http://www.ehowstuff.com/ @@ -28,7 +26,7 @@ Before the changes, web server header will look like below : X-Page-Speed: 1.9.32.2-4321 Cache-Control: max-age=0, no-cache -After the changes, PHP will no longer show the version to the web server header : +更改之后,php就不会在web服务头中显示版本了: [root@centos66 ~]# curl -I http://www.ehowstuff.com/ @@ -42,14 +40,14 @@ Date: Wed, 11 Feb 2015 14:10:43 GMT X-Page-Speed: 1.9.32.2-4321 Cache-Control: max-age=0, no-cache -As always if you need any help you can reach us on twitter @ehowstuff or drop us a comment below. [Jumping through archives page to read more articles..][1] +有任何需要帮助的请到twiiter @ehowstuff,或在下面留下你的评论。[点此获取更多历史文章][1] -------------------------------------------------------------------------------- via: http://www.ehowstuff.com/how-to-hide-php-version-in-linux/ 作者:[skytech][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9587a9d871f240274f53b3c8285ca512d230662e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Feb 2015 21:25:44 +0800 Subject: [PATCH 0083/2517] PUB:20150122 Linux FAQs with Answers--How to add a cron job on Linux @geekpi --- ...s with Answers--How to add a cron job on Linux.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md (81%) diff --git a/translated/tech/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md b/published/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md similarity index 81% rename from translated/tech/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md rename to published/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md index 6f0a5effe3..70326e249f 100644 --- a/translated/tech/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md +++ b/published/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md @@ -2,7 +2,7 @@ Linux 有问必答: 如何在Linux中加入cron任务 ================================================================================ > **提问**: 我想在我的Linux中安排一个计划任务,该任务在固定时间周期性地运行。我该如何在Linux中添加一个cron任务? -cron是Linux中默认的计划任务。使用cron,你可以安排一个计划(比如:命令或者shell脚本)周期性地运行或者在指定的小时、天、周、月等特定时间运行。cron在你安排不同的常规维护任务时是很有用的,比如周期性地备份、日志循环、检查文件系统、监测磁盘空间等等。 +cron是Linux中默认的计划任务。使用cron,你可以安排一个计划(比如:命令或者shell脚本)周期性地运行或者在指定的分钟、小时、天、周、月等特定时间运行。cron在你安排不同的常规维护任务时是很有用的,比如周期性地备份、日志循环、检查文件系统、监测磁盘空间等等。 ### 从命令行中添加cron任务 ### @@ -22,7 +22,7 @@ cron是Linux中默认的计划任务。使用cron,你可以安排一个计划 每个cron任务的格式如下。 - + <分钟> <小时> <日> <月> <星期> <命令> 前5个元素定义了任务的计划,最后一个元素是命令或者脚本的完整路径。 @@ -30,13 +30,13 @@ cron是Linux中默认的计划任务。使用cron,你可以安排一个计划 下面是一些cron任务示例。 -- *** * * * * /home/dan/bin/script.sh**: 每分钟运行。 +- **\* * * * * /home/dan/bin/script.sh**: 每分钟运行。 - **0 * * * * /home/dan/bin/script.sh**: 每小时运行。 -- **0 0 * * * /home/dan/bin/script.sh**: 每12小时运行。 +- **0 0 * * * /home/dan/bin/script.sh**: 每天零点运行。 - **0 9,18 * * * /home/dan/bin/script.sh**: 在每天的9AM和6PM运行。 - **0 9-18 * * * /home/dan/bin/script.sh**: 在9AM到6PM的每个小时运行。 - **0 9-18 * * 1-5 /home/dan/bin/script.sh**: 周一到周五的9AM到6PM每小时运行。 -- ***/10 * * * * /home/dan/bin/script.sh**: 每10分钟运行。 +- **\*/10 * * * * /home/dan/bin/script.sh**: 每10分钟运行。 一旦完成上面的设置步骤后,按下Ctrl+X来保存并退出编辑器。此时,新增的计划任务应该已经激活了。 @@ -61,6 +61,6 @@ cron是Linux中默认的计划任务。使用cron,你可以安排一个计划 via: http://ask.xmodulo.com/add-cron-job-linux.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From b9a3c78bc580d3b2de80dc4a885e1504be8d4553 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Feb 2015 22:03:48 +0800 Subject: [PATCH 0084/2517] PUB:20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x @geekpi --- ...sing nmcli Tool in RedHat or CentOS 7.x.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md (73%) diff --git a/translated/tech/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md b/published/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md similarity index 73% rename from translated/tech/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md rename to published/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md index 10c19b2d92..62bb475206 100644 --- a/translated/tech/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md +++ b/published/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md @@ -10,7 +10,7 @@ nmcli的通常语法是: # nmcli [ OPTIONS ] OBJECT { COMMAND | help } -一件很酷的事情是你可以使用tab键来补全操作,这样你在何时忘记了语法你都可以用tab来看到可用的选项了。 +一件很酷的事情是你可以使用tab键来补全操作,这样你在何时忘记了语法你都可以按下tab来看到可用的选项了。 ![nmcli tab](http://blog.linoxide.com/wp-content/uploads/2014/12/nmcli-tab.jpg) @@ -46,33 +46,33 @@ nmcli通常用法的一些例子: # nmcli device connect eno16777736 -### 使用静态IP添加一个以太网连接 ### +### 添加一个使用静态IP的以太网连接 ### 要用静态IP添加一个以太网连接可以使用下面的命令: - # nmcli connection add type ethernet con-name NAME_OF_CONNECTION ifname interface-name ip4 IP_ADDRESS gw4 GW_ADDRESS + # nmcli connection add type ethernet con-name NAME_OF_CONNECTION ifname INTERFACE-NAME ip4 IP_ADDRESS gw4 GW_ADDRESS -将NAME_OF_CONNECTION替换成新的连接名,IP_ADDRESS替换成你要的IP地址,GW_ADDRESS替换成你使用的网关地址(如果你并不使用网关,你可以忽略这部分)。 +将NAME_OF_CONNECTION替换成新的连接名(LCTT 译注:这个名字以后可以用来对其操作,可以使用任何简单明了的名称),INTERFACE-NAME 替换成你的接口名,IP_ADDRESS替换成你要的IP地址,GW_ADDRESS替换成你使用的网关地址(如果你并不使用网关,你可以忽略这部分)。 - # nmcli connection add type ethernet con-name NEW ifname eno16777736 ip4 192.168.1.141 gw4 192.168.1.1 + # nmcli connection add type ethernet con-name NEW_STATIC ifname eno16777736 ip4 192.168.1.141 gw4 192.168.1.1 -=要设置这个连接的DNS服务器使用下面的命令: +要设置这个连接所使用的DNS服务器使用下面的命令: - # nmcli connection modify NEW ipv4.dns "8.8.8.8 8.8.4.4" + # nmcli connection modify NEW_STATIC ipv4.dns "8.8.8.8 8.8.4.4" 要启用新的以太网连接,使用下面的命令: - # nmcli connection up NEW ifname eno16777736 + # nmcli connection up NEW_STATIC ifname eno16777736 要查看新配置连接的详细信息,使用下面的命令: - # nmcli -p connection show NEW + # nmcli -p connection show NEW_STATIC ![nmcli add static](http://blog.linoxide.com/wp-content/uploads/2014/12/nmcli-add-static.jpg) ### 添加一个使用DHCP的连接 ### -如果你想要添加一个使用DHCP来配置接口IP地址、网关地址和dns服务器地址的新的连接,你要做的就是忽略命令中的ip/gw部分,NetworkManager会自动使用DHCP来获取配置细节。 +如果你想要添加一个使用DHCP来配置接口IP地址、网关地址和dns服务器地址的新的连接,你要做的就是忽略上述命令中的ip/gw部分,NetworkManager会自动使用DHCP来获取配置细节。 比如,要创建一个新的叫NEW_DHCP的DHCP连接,在设备eno16777736上你可以使用下面的命令: @@ -84,7 +84,7 @@ via: http://linoxide.com/linux-command/nmcli-tool-red-hat-centos-7/ 作者:[Adrian Dinu][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7055871c69fc31e8bbc3cb69a5eeb3c43b2e64ab Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Feb 2015 22:49:54 +0800 Subject: [PATCH 0085/2517] PUB:20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror @FSSlc --- ...l Repository in Ubuntu using APT-mirror.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md (65%) diff --git a/translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/published/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md similarity index 65% rename from translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md rename to published/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md index c49b52c461..dc9d72ef77 100644 --- a/translated/tech/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md +++ b/published/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md @@ -1,16 +1,16 @@ -在 Ubuntu中使用 APT-mirror 简单四步配置本地软件仓库 +使用 APT-mirror 四步配置 Ubuntu 本地软件仓库 ================================================================================ -今天,我们将向你展示如何在你的 Ubuntu 个人电脑 或 Ubuntu 服务器 中,直接通过 Ubuntu 官方软件仓库来配置本地软件仓库。在你的电脑中创建一个本地软件仓库有着许多的好处。假如你有许多电脑需要安装软件,安全升级和修复,那么配置一个本地软件仓库是一个高效的方法。因为,所有需要安装的软件包都可以通过快速局域网连接从你的本地服务器中下载,这样可以节省你的网络带宽,降低互联网的年度开支 ... +今天,我们将向你展示如何在你的 Ubuntu 个人电脑或 Ubuntu 服务器中,直接通过 Ubuntu 官方软件仓库来配置本地软件仓库。在你的电脑中创建一个本地软件仓库有着许多的好处。假如你有许多电脑需要安装软件 、安全升级和修复补丁,那么配置一个本地软件仓库是一个做这些事情的高效方法。因为,所有需要安装的软件包都可以通过快速的局域网连接从你的本地服务器中下载,这样可以节省你的网络带宽,降低互联网接入的年度开支 ... -你可以使用多种工具在你的本地个人电脑或服务器中配置一个 Ubuntu 的本地软件仓库,但在本教程中,我们将为你介绍 APT-Mirror。这里,我们将把默认的镜像包镜像到 我们本地的服务器或个人电脑中,并且在本地或外置硬盘中,我们至少需要 **120 GB** 或更多的可用空间。 上面的任务可以通过配置一个 **HTTP** 或 **FTP** 服务器来 与本地系统客户端共享软件包。 +你可以使用多种工具在你的本地个人电脑或服务器中配置一个 Ubuntu 的本地软件仓库,但在本教程中,我们将为你介绍 APT-Mirror。这里,我们将把默认的镜像包镜像到我们本地的服务器或个人电脑中,并且在你的本地或外置硬盘中,我们至少需要 **120 GB** 或更多的可用空间才行。 我们可以通过配置一个 **HTTP** 或 **FTP** 服务器来与本地系统客户端共享这个软件仓库。 我们需要安装 Apache 网络服务器和 APT-Mirror 来使得我们的工作得以开始。下面是配置一个可工作的本地软件仓库的步骤: ### 1. 安装需要的软件包 ### -首先,我们需要从 Ubuntu 的公共软件包仓库中取得所有的软件包,然后在我们本地的 Ubuntu 服务器硬盘中保存它们。 +我们需要从 Ubuntu 的公共软件包仓库中取得所有的软件包,然后在我们本地的 Ubuntu 服务器硬盘中保存它们。 -首先我们安装一个网络服务器来承载我们的本地软件仓库。这里我们将安装 Apache 网络服务器,但你可以安装任何你中意的网络服务器,对于 http 协议,网络服务器是必须的。假如你需要配置 ftp 协议 及 rsync 协议,你还可以再分别额外安装 FTP 服务器,如 proftpd, vsftpd 等等 和 Rsync 。 +首先我们安装一个Web 服务器来承载我们的本地软件仓库。这里我们将安装 Apache Web 服务器,但你可以安装任何你中意的 Web 服务器。对于 http 协议,Web 服务器是必须的。假如你需要配置 ftp 协议 及 rsync 协议,你还可以再分别额外安装 FTP 服务器,如 proftpd, vsftpd 等等 和 Rsync 。 $ sudo apt-get install apache2 @@ -70,21 +70,21 @@ ![mirror-list-config](http://blog.linoxide.com/wp-content/uploads/2014/12/mirror-list-config.png) -**注: 你可以将上面的官方镜像服务器网址更改为离你最近的服务器的网址,而这可以访问 [Ubuntu Mirror Server][1]来得到。假如你并不着急并可以等待镜像的完成,你可以沿用默认的官方镜像服务器网址。** +**注: 你可以将上面的官方镜像服务器网址更改为离你最近的服务器的网址,可以通过访问 [Ubuntu Mirror Server][1]来找到这些服务器地址。假如你并不太在意镜像完成的时间,你可以沿用默认的官方镜像服务器网址。** -这里,我们将要镜像 最新和最大的 Ubuntu LTS 发行版 --- 即 Ubuntu 14.04 LTS (Trusty Tahr) --- 的软件包仓库,所以在上面的配置中发行版本号为 trusty 。假如我们需要镜像 Saucy 或其他的 Ubuntu 发行版本,请修改上面的 trusy 为相应的代号。 +这里,我们将要镜像最新和最大的 Ubuntu LTS 发行版 --- 即 Ubuntu 14.04 LTS (Trusty Tahr) --- 的软件包仓库,所以在上面的配置中发行版本号为 trusty 。假如我们需要镜像 Saucy 或其他的 Ubuntu 发行版本,请修改上面的 trusy 为相应的代号。 -现在,我们必须运行 apt-mirror 来下载或镜像 官方仓库中的所有软件包。 +现在,我们必须运行 apt-mirror 来下载或镜像官方仓库中的所有软件包。 sudo apt-mirror -从 Ubuntu 服务器中下载所有的软件包所花费的时间取决于 你和镜像服务器之间的网络连接速率和性能。我已经中断了下载,因为我已经下载好了 ... +从 Ubuntu 服务器中下载所有的软件包所花费的时间取决于你和镜像服务器之间的网络连接速率和性能。这里我中断了下载,因为我已经下载好了 ... ![downloading-packages](http://blog.linoxide.com/wp-content/uploads/2014/12/downloading-index.png) ### 3.配置网络服务器 ### -为了使得其他的电脑能够取得这个软件仓库,你需要一个网络服务器。你也可以通过 ftp 来完成这件事,但我选择使用一个网络服务器因为在上面的步骤 1 中我提及到使用网络服务器。因此,我们现在要对 Apache 服务器进行配置: +为了使得其他的电脑能够访问这个软件仓库,你需要一个Web服务器。你也可以通过 ftp 来完成这件事,但我选择使用一个Web服务器因为在上面的步骤 1 中我提及到使用Web服务器。因此,我们现在要对 Apache 服务器进行配置: 我们将为我们本地的软件仓库目录 建立一个到 Apache 托管目录 --- 即 `/var/www/ubuntu` --- 的符号链接。 @@ -105,7 +105,7 @@ deb http://192.168.0.100/ubuntu/ trusty main restricted universe -**注: 这里的 192.168.0.100 是我们的服务器电脑的 局域网 IP 地址,你需要替换为你的服务器电脑的局域网 IP 地址** +**注: 这里的 192.168.0.100 是我们的服务器电脑的局域网 IP 地址,你需要替换为你的服务器电脑的局域网 IP 地址** $ sudo apt-get update @@ -117,7 +117,7 @@ via: http://linoxide.com/ubuntu-how-to/setup-local-repository-ubuntu/ 作者:[Arun Pyasi][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c51591e9a20e3bcbc3fd51fb03f9a3156771aa03 Mon Sep 17 00:00:00 2001 From: coloka Date: Mon, 23 Feb 2015 08:31:19 +0800 Subject: [PATCH 0086/2517] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E3=80=9120150121=20How=20to=20apply=20image=20effects?= =?UTF-8?q?=20to=20pictures=20on=20Raspberry=20Pi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...age effects to pictures on Raspberry Pi.md | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md b/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md index 6f97f3454e..f767522855 100644 --- a/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md +++ b/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md @@ -1,13 +1,12 @@ -Translating by coloka -How to apply image effects to pictures on Raspberry Pi +如何在树莓派上使用图片特效 ================================================================================ -Like a common pocket camera which has a built-in function to add various effects on captured photos, [Raspberry Pi camera board][1] ("raspi cam") can actually do the same. With the help of raspistill camera control options, we can add the image effects function like we have in a pocket camera. +现在使用[树莓派摄像头模组][1]("raspi cam"),也可以像使用卡片相机那样,给拍摄的照片增加各种各样的图片特效。 raspistill命令行工具,为您的树莓派提供了丰富的图片特效选项,来美化处理你的图片。 -There are [three comman-line applications][2] which can be utilized for [taking videos or pictures][3] with raspi cam, and one of them is the raspistill application. The raspistill tool offers various camera control options such as sharpness, contrast, brightness, saturation, ISO, exposure, automatic white balance (AWB), image effects. +你可以用[这3个命令行工具][2]来[抓取raspicam拍摄的照片或者视频][3],在这文章中将重点介绍其中的raspstill工具。raspstill工具提供了丰富的控制选项来处理图片,比如说:锐度(sharpness)、对比度(contrast)、亮度(brightness)、饱和度(saturation)、ISO、自动白平衡(AWB)、以及图片特效(image effect)等。 -In this article I will show how to apply exposure, AWB, and other image effects with raspistill while capturing pictures using raspi cam. To automate the process, I wrote a simple Python script which takes pictures and automatically applies a series of image effects to the pictures. The raspi cam documentation describes available types of the exposure, AWB, and image effects. In total, the raspi cam offers 16 types of image effects, 12 types of exposure, and 10 types of AWB values. +在这篇文章中,将介绍如何使用raspstill工具以及raspicam摄像头模组来控制照片的曝光、AWB以及其他的图片效果。我写了一个简单的python脚本来自动拍摄照片并在这些照片上自动应用各种图片特效。raspicam的帮助文档中介绍了该摄像头模组所支持的曝光模式、AWB和图片特效。总的来说,raspicam一共支持16种图片特效、12种曝光模式以及10种AWB选项。 -The simple Python script looks like the following. +Python脚本很简单,如下所示 。 #!/usb/bin/python import os @@ -30,32 +29,34 @@ The simple Python script looks like the following. The Python script operates as follows. First, create three array/list variable for the exposure, AWB and image effects. In the example, we use 2 types of exposure, 3 types of AWB, and 13 types of image effects values. Then make nested loops for applying the value of the three variables that we have. Inside the nested loop, execute the raspistill application. We specify (1) the output filename; (2) exposure value; (3) AWB value; (4) image effect value; (5) the time to take a photo, which is set to 1 second; and (6) the size of the photo, which is set to 640x480px. This Python script will create 78 different versions of a captured photo with a combination of 2 types of exposure, 3 types of AWB, and 13 types of image effects. -To execute the Python script, simply type: +这个脚本完成了以下几个工作。首先,脚本中定义了3个列表,分别用于枚举曝光模式、AWB模式以及图片特效。在这个实例中,我们将使用到2种曝光模式、3种AWB模式以及13种图片特效。脚本会遍历上述3种选项的各种组合,并使用这些参数组合来运行raspistill工具。传入的参数共6个,分别为:(1)输出文件名;(2)曝光模式;(3)AWB模式;(4)图片特效模式;(5)拍照时间,设为1秒;(6)图片尺寸,设为640x480。脚本会自动拍摄78张照片,每张照片会应用不同的特效参数。 + +执行这个脚本也很简单,只需键入下面的命令行: $ python name_of_this_script.py -Here is the first round of the sample result. +下面是抓取到一些样张。 ![](https://farm8.staticflickr.com/7483/16134215939_c93291158a_c.jpg) -### Bonus ### +### 小福利 ### -For those who are more interested, there is another way to access and control the raspi cam besides raspistill. [Picamera][4] a pure Python interface which provides APIs for accessing and controlling raspi cam, so that one can build a complex program for utilizing raspi cam according to their needs. If you are skilled at Python, picamera is a good feature-complete interface for implementing your raspi cam project. The picamera interface is included by default in the recent image of Raspbian. If your [Raspberry Pi][5] operating system is not new or not Raspbian, you can install it on your system as follows. +除了使用raspistill命令行工具来操控raspicam摄像模组以外,还有其他的方法可以用哦。[Picamera][4]是一个python库,它提供了操控raspicam摄像模组的的API接口,这样就可以便捷地构建更加复杂的应用程序。如果你精通python,那么picamera一定是你项目的好伙伴。picamera已经被默认集成到Raspbian最新版本的的镜像中。当然,如果你用的不是最新的Raspbian或者是使用其他的操作系统版本,你可以通过下面的方法来进行手动安装。 -First, install pip on your system by following [this guideline][6]. +首先,先在你的系统上安装pip,详见[指导][6]。 -Then, install picamera as follows. +然后,就可以按下面的方法安装picamera。 $ sudo pip install picamera -Refer to the [official documentation][7] on how to use picamera. +picamera的使用说明可以查阅[官方文档][7]。 -------------------------------------------------------------------------------- via: http://xmodulo.com/apply-image-effects-pictures-raspberrypi.html 作者:[Kristophorus Hadiono][a] -译者:[译者ID](https://github.com/译者ID) +译者:[coloka](https://github.com/coloka) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a160ee09c0f6db64360b0d26dd59afa24a39b5a4 Mon Sep 17 00:00:00 2001 From: coloka Date: Mon, 23 Feb 2015 08:36:00 +0800 Subject: [PATCH 0087/2517] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=EF=BC=8Csource=20->=20translated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0121 How to apply image effects to pictures on Raspberry Pi.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md (100%) diff --git a/sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md b/translated/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md similarity index 100% rename from sources/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md rename to translated/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md From 1a033c8cd8091ea6209ce14dfb8e0e53b6515e82 Mon Sep 17 00:00:00 2001 From: coloka Date: Mon, 23 Feb 2015 08:51:22 +0800 Subject: [PATCH 0088/2517] [translating]20150112 What are useful command-line network monitors on Linux.md --- ...112 What are useful command-line network monitors on Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150112 What are useful command-line network monitors on Linux.md b/sources/tech/20150112 What are useful command-line network monitors on Linux.md index f17e45cbf4..eeda3f0542 100644 --- a/sources/tech/20150112 What are useful command-line network monitors on Linux.md +++ b/sources/tech/20150112 What are useful command-line network monitors on Linux.md @@ -1,3 +1,4 @@ +translating by coloka What are useful command-line network monitors on Linux ================================================================================ Network monitoring is a critical IT function for businesses of all sizes. The goal of network monitoring can vary. For example, the monitoring activity can be part of long-term network provisioning, security protection, performance troubleshooting, network usage accounting, and so on. Depending on its goal, network monitoring is done in many different ways, such as performing packet-level sniffing, collecting flow-level statistics, actively injecting probes into the network, parsing server logs, etc. From 9f404afc3085dde68a996557416027b886d6d068 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 23 Feb 2015 23:59:31 +0800 Subject: [PATCH 0089/2517] Translating by ZTinoZ --- .../share/20150114 What is a good IDE for C or C++ on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md index 2cf3d3ab37..42cf58e837 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -18,7 +18,7 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm9.staticflickr.com/8573/16088461968_c6a6c9e49a_c.jpg) -With a lot less features but a lot more flexibility, [Geany][6] is at the opposite of Eclipse. But what it lacks (like a debugger for example), Geany makes it up with nice little features: a space for note taking, creation from template, code outline, customizable shortcuts, and plugins management. Geany is still closer to an extensive text editor than an IDE here. However I keep it in the list for its lightness and its well designed interface. +用With a lot less features but a lot more flexibility, [Geany][6] is at the opposite of Eclipse. But what it lacks (like a debugger for example), Geany makes it up with nice little features: a space for note taking, creation from template, code outline, customizable shortcuts, and plugins management. Geany is still closer to an extensive text editor than an IDE here. However I keep it in the list for its lightness and its well designed interface. ### 4. MonoDevelop ### From 61918b428281ded98914991cbfcfba45c80aef4d Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 24 Feb 2015 01:06:09 +0800 Subject: [PATCH 0090/2517] Translating by ZTinoZ --- .../share/20150114 What is a good IDE for C or C++ on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md index 42cf58e837..0434deb27c 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -18,7 +18,7 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm9.staticflickr.com/8573/16088461968_c6a6c9e49a_c.jpg) -用With a lot less features but a lot more flexibility, [Geany][6] is at the opposite of Eclipse. But what it lacks (like a debugger for example), Geany makes it up with nice little features: a space for note taking, creation from template, code outline, customizable shortcuts, and plugins management. Geany is still closer to an extensive text editor than an IDE here. However I keep it in the list for its lightness and its well designed interface. +牺牲了很多特色功能但是增加了很多灵活性,[Geany][6] is at the opposite of Eclipse. But what it lacks (like a debugger for example), Geany makes it up with nice little features: a space for note taking, creation from template, code outline, customizable shortcuts, and plugins management. Geany is still closer to an extensive text editor than an IDE here. However I keep it in the list for its lightness and its well designed interface. ### 4. MonoDevelop ### From 91abf8ba733b044a0636c5fbeb973f1c417e7315 Mon Sep 17 00:00:00 2001 From: martin qi Date: Tue, 24 Feb 2015 15:04:08 +0800 Subject: [PATCH 0091/2517] Update and rename translated/tech to translated/tech/20150215 How to share files between computers over network with btsync.md --- ...ween computers over network with btsync.md | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 translated/tech/20150215 How to share files between computers over network with btsync.md diff --git a/translated/tech/20150215 How to share files between computers over network with btsync.md b/translated/tech/20150215 How to share files between computers over network with btsync.md new file mode 100644 index 0000000000..7155f789bf --- /dev/null +++ b/translated/tech/20150215 How to share files between computers over network with btsync.md @@ -0,0 +1,137 @@ +如何使用btsync通过网络实现电脑间文件共享 +================================================================================ +如果你是使用各式设备在网上工作的这类人,我相信你肯定需要一个在不同设备间同步文件及目录的方法,至少是非常渴望有这种功能。 + +BitTorrent Sync简称btsync,是一个基于BitTorrent(著名P2P文件分享协议)的免费跨平台同步工具。与传统BitTorrent客户端不同的是btsync用于传输加密和访问授权的是不同操作系统及设备中自动生成的键。 + +更具体点,当你想要通过btsync共享一些文件或文件夹,相应的读/写键(所谓的秘密编码)已经创建。这些键将会通过不同的途径例如HTTPS链接,电子邮件,二维码等被分享。一旦两台设备通过一个键配对成功,链接内容将会直接在其间同步。如果没有事先设置,传输将不会有文件大小和速度的限制。你可以在btsync中创建账号,以此来创建和管理通过网络分享的键和文件。 + +BitTorrent Sync可以在许多的操作系统上运行,包括Linux,MacOS X,Windows,在 [Android][1]和[iOS][2]上也可以使用。在这里,我们将教你在Linux环境(一台家用服务器)与Windows环境(一台笔记本电脑)之间如何使用BitTorrent Sync来同步文件。 + +### Linux下安装btsync ### + +BitTorrent Sync可以在[项目主页][3]直接下载。由于Windows版本的BitTorrent Syn安装起来十分简单,所以我们假设笔记本上已经安装了。我们把焦点放到Linux服务器上的安装和配置。 + +在下载页面中选择你的系统架构,右键相应链接,选择复制连接地址(或者简单的依靠浏览器判断),将链接粘贴到在终端中用wget下载,如下: + +**64位Linux:** + + # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-x64/track/stable + +**32位Linux:** + + # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-i386/track/stable + +![](https://farm9.staticflickr.com/8635/15895277773_8acf317e3c_c.jpg) + +下载完成后,把包中内容解压到你专门创建的目录中,为了完成这些: + + # cd /usr/local/bin + # mkdir btsync + # tar xzf stable -C btsync + +![](https://farm8.staticflickr.com/7306/16329173869_7dc8b64a39_b.jpg) + +现在你可以选择将/usr/local/bin/btsync添加到环境变量PATH中去。 + + export PATH=$PATH:/usr/local/bin/btsync + +或者在在该文件夹中运行btsync的二进制文件。我们推荐使用第一种方式,虽需要少量的输入但更容易记忆。 + +### 配置Btsync ### + +Btsync带有一个内置的网络服务器被用作其管理接口。想要使用这个接口你需要创建一个配置文件。你可以使用以下命令来创建: + + # btsync --dump-sample-config > btsync.config + +然后使用你最常用的编辑器对btsync.config文件的(webui部分)作以下修改 + + "listen" : "0.0.0.0:8888", + "login" : "yourusername", + "password" : "yourpassword" + +你可以选择任何用户名和密码。 + +![](https://farm9.staticflickr.com/8599/15895277793_da63841433_b.jpg) + +![](Feel free to check the README file in /usr/local/bin/btsync directory if you want to tweak the configuration further, but this will do for now.) + +### 第一次运行btsync ### + +作为一个系统的最高执行者我们需要依赖日志文件!所以在我们启动btsync之前,我们将先为btsync创建一个日志文件。 + + # touch /var/log/btsync.log + +最后,让我们开启btsync: + + # btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log + +![](https://farm8.staticflickr.com/7288/16327720298_ccf2cbedea_c.jpg) + +现在在你的浏览器中输入正在运行btsync监听的服务器IP地址和端口(我这是192.168.0.15:8888),同意隐私政策,条款和最终用户许可协议: + +![](https://farm9.staticflickr.com/8597/16327720318_d52551fc44_b.jpg) + +这样页面就会转到你安装的btsync主页: + +![](https://farm8.staticflickr.com/7412/16329544687_9a174527d8_c.jpg) + +点击添加文件夹并在你的文件系统中选择一个你想要分享的目录,在我们的例子中,我们使用的是/btsync: + +![](https://farm8.staticflickr.com/7407/16515452485_e25ded559f_b.jpg) + +现在这样就够了。在运行接下来的步骤之前,请先在Windows主机(或你想使用的其他Linux设备)上安装BitTorrent Sync。 + +### Btsync分享文件 ### + +下方的视频将会展示如何在安装Windows8的电脑[192.168.0.106]上分享现有的文件夹。在添加好想要同步的文件夹后,你会得到它的键,通过“Enter a key or link”菜单(上面的图已经展示过了)添加到你安装到的Linux机器上,并开始同步: + +注释:youtube视频 + + +现在用别的设备试试吧;找一个想要分享的文件夹或是一些文件,并通过Linux服务器的网络接口将键导入到你安装的“核心”btsync中。 + +### 使用常规用户开机自动运行btsync ### + +你们可能注意到了,视频中在同步文件时是使用'root'组的用户创建/btsync目录的。那是因为我们使用超级用户手动启动BitTorrent Sync的原因。在通常情况下,你会希望它开机自动使用无权限用户(www_data或是专门为此创建的账户,例如btsync)启动。 + +所以,我们创建了一个叫做btsync的用户,并在/etc/rc.local文件(exit 0行前)添加如下字段: + + sudo -u btsync /usr/local/bin/btsync/btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log + +最后,创建pid文件: + + # touch /usr/local/bin/btsync/.sync//sync.pid + +并递归更改/usr/local/bin/btsync的所属用户: + + # chown -R btsync:root /usr/local/bin/btsync + +现在重启试试,看看btsync是否正在由预期中的用户运行: +Now reboot and verify that btsync is running as the intended user: + +![](https://farm9.staticflickr.com/8647/16327988660_644f6d4505_c.jpg) + +基于你选择的发行版不同,你可能找到不同的方式来开机自启动btsync。在本教程中,我选择rc.local的方式是因为它在不同发行版中都可使用。 + +### 尾注 ### + +如你所见,BitTorrent Sync对你几乎就像一个无服务器的Dropbox。我说“几乎”的原因是:当你在局域网内同步数据时,同步在两个设备之间直接进行。然而如果你想要跨网段同步数据,并且你的设备可能要穿过防火墙的限制来配对,那就只能通过一个提供BitTorrent的第三方中继服务器来完成同步传输。虽然声称传输经过 [AES加密][4],你还是可能遇到不想放生的状况。为了你的隐私着想,务必在你共享的每个文件夹中关掉中继/跟踪选项。 + +希望这些对你有用!分享愉快! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/share-files-between-computers-over-network.html + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:https://play.google.com/store/apps/details?id=com.bittorrent.sync +[2]:https://itunes.apple.com/us/app/bittorrent-sync/id665156116 +[3]:http://www.getsync.com/ +[4]:http://www.getsync.com/tech-specs From 0ed13ca5b50fbf5836b62679220400763c97a418 Mon Sep 17 00:00:00 2001 From: martin qi Date: Tue, 24 Feb 2015 15:07:19 +0800 Subject: [PATCH 0092/2517] Delete 20150215 How to share files between computers over network with btsync.md --- ...ween computers over network with btsync.md | 138 ------------------ 1 file changed, 138 deletions(-) delete mode 100644 sources/tech/20150215 How to share files between computers over network with btsync.md diff --git a/sources/tech/20150215 How to share files between computers over network with btsync.md b/sources/tech/20150215 How to share files between computers over network with btsync.md deleted file mode 100644 index e892f2bb55..0000000000 --- a/sources/tech/20150215 How to share files between computers over network with btsync.md +++ /dev/null @@ -1,138 +0,0 @@ -translating by martin. - -How to share files between computers over network with btsync -================================================================================ -If you are the type of person who uses several devices to work online, I'm sure you must be using, or at least wishing to use, a method for syncing files and directories among those devices. - -BitTorrent Sync, also known as btsync for short, is a cross-platform sync tool (freeware) which is powered by BitTorrent, the famous protocol for peer-to-peer (P2P) file sharing. Unlike classic BitTorrent clients, however, btsync encrypts traffic and grants access to shared files based on auto-generated keys across different operating system and device types. - -More specifically, when you add files or folder to btsync as shareable, corresponding read/write keys (so-called secret codes) are created. These keys are then shared among different devices via HTTPS links, emails, QR codes, etc. Once two devices are paired via a key, the linked content can be synced directly between them. There is no file size limit, and transfer speeds are never throttled unless you explicitly say so. You will be able to create accounts inside btsync, under which you can create and manage keys and files to share via web interface. - -BitTorrent Sync is available on multiple operating systems including Linux, MacOS X, Windows, as well as [Android][1] and [iOS][2]. In this tutorial, I will show you how to use BitTorrent Sync to sync files between a Linux box (a home server), and a Windows machine (a work laptop). - -### Installing Btsync on Linux ### - -BitTorrent Sync is available for download from the [project's website][3]. I assume that the Windows version of BiTorrent Sync is installed on a Windows laptop, which can be done very easily. I will focus on installing and configuring it on the Linux server. - -In the download page, choose your architecture, right click on the corresponding link, choose Copy link location (or similar, depending on your browser), and paste the link to wget in your terminal, as follows: - -**For 64-bit Linux:** - - # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-x64/track/stable - -**For 32-bit Linux:** - - # wget http://download.getsyncapp.com/endpoint/btsync/os/linux-i386/track/stable - -![](https://farm9.staticflickr.com/8635/15895277773_8acf317e3c_c.jpg) - -Once the download has completed, extract the contents of the tarball into a directory specially created for that purpose: - - # cd /usr/local/bin - # mkdir btsync - # tar xzf stable -C btsync - -![](https://farm8.staticflickr.com/7306/16329173869_7dc8b64a39_b.jpg) - -You can now either add /usr/local/bin/btsync to your PATH environment variable. - - export PATH=$PATH:/usr/local/bin/btsync - -or run the btsync binary right from that folder. We'll go with the first option as it requires less typing and is easier to remember. - -### Configuring Btsync ### - -Btsync comes with a built-in web server which is used as the management interface for BitTorrent Sync. To be able to access the web interface, you need to create a configuration file. You can do that with the following command: - - # btsync --dump-sample-config > btsync.config - -Then edit the btsync.config file (webui section) with your preferred text editor, as follows: - - "listen" : "0.0.0.0:8888", - "login" : "yourusername", - "password" : "yourpassword" - -You can choose any username and password. - -![](https://farm9.staticflickr.com/8599/15895277793_da63841433_b.jpg) - -![](Feel free to check the README file in /usr/local/bin/btsync directory if you want to tweak the configuration further, but this will do for now.) - -### Running Btsync for the First Time ### - -As system administrators we believe in logs! So before we launch btsync, we will create a log file for btsync. - - # touch /var/log/btsync.log - -Finally it's time to start btsync: - - # btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log - -![](https://farm8.staticflickr.com/7288/16327720298_ccf2cbedea_c.jpg) - -Now point your web browser to the IP address of the Linux server and the port where btsync is listening on (192.168.0.15:8888 in my case), and agree to the privacy policies, terms, and EULA: - -![](https://farm9.staticflickr.com/8597/16327720318_d52551fc44_b.jpg) - -and you will be taken to the home page of your btsync installation: - -![](https://farm8.staticflickr.com/7412/16329544687_9a174527d8_c.jpg) - -Click on Add a folder, and choose a directory in your file system that you want to share. In our example, we will use /btsync: - -![](https://farm8.staticflickr.com/7407/16515452485_e25ded559f_b.jpg) - -That's enough by now. Please install BitTorrent Sync on your Windows machine (or another Linux box, if you want) before proceeding. - -### Sharing Files with Btsync ### - -The following screencast shows how to sync an existing folder in a Windows 8 machine [192.168.0.106]. After adding the desired folder, get its key, and add it in your Linux installation via the "Enter a key or link" menu (as shown in the previous image), and the sync will start: - -注释:youtube视频 - - -Now repeat the process for other computers or devices; selecting a folder or files to share, and importing the corresponding key(s) in your "central" btsync installation via the web interface on your Linux server. - -### Auto-start Btsync as a Normal User ### - -You will notice that the synced files in the screencast were created in the /btsync directory belonging to user and group 'root'. That is because we launched BitTorrent Sync manually as the superuser. However, under normal circumstances, you will want to have BitTorrent Sync start on boot and running as a non-privileged user (www-data or other special account created for that purpose, btsync user for example). - -To do so, create a user called btsync, and add the following stanza to the /etc/rc.local file (before the exit 0 line): - - sudo -u btsync /usr/local/bin/btsync/btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log - -Finally, create the pid file: - - # touch /usr/local/bin/btsync/.sync//sync.pid - -and change the ownership of /usr/local/bin/btsync recursively: - - # chown -R btsync:root /usr/local/bin/btsync - -Now reboot and verify that btsync is running as the intended user: - -![](https://farm9.staticflickr.com/8647/16327988660_644f6d4505_c.jpg) - -Based on your chosen distribution, you may find other ways to enable btsync to start on boot. In this tutorial I chose the rc.local approach since it's distribution-agnostic. - -### Final Remarks ### - -As you can see, BitTorrent Sync is almost like server-less Dropbox for you. I said "almost" because of this: When you sync between devices on the same local network, sync happens directly between two devices. However, if you try to sync across different networks, and the devices to be paired are behind restrictive firewalls, there is a chance that the sync traffic goes through a third-party relay server operated by BitTorrent. While they claim that the traffic is [AES-encrypted][4], you may still not want this to happen. For your privacy, be sure to turn off relay/tracker server options in every folder that you are sharing. - -Hope it helps! Happy syncing! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/share-files-between-computers-over-network.html - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/gabriel -[1]:https://play.google.com/store/apps/details?id=com.bittorrent.sync -[2]:https://itunes.apple.com/us/app/bittorrent-sync/id665156116 -[3]:http://www.getsync.com/ -[4]:http://www.getsync.com/tech-specs From 9253cce7079a609ed7366a41501b3bdb65d6200b Mon Sep 17 00:00:00 2001 From: martin qi Date: Tue, 24 Feb 2015 15:09:02 +0800 Subject: [PATCH 0093/2517] translated --- ...to share files between computers over network with btsync.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/translated/tech/20150215 How to share files between computers over network with btsync.md b/translated/tech/20150215 How to share files between computers over network with btsync.md index 7155f789bf..c6cd7051c4 100644 --- a/translated/tech/20150215 How to share files between computers over network with btsync.md +++ b/translated/tech/20150215 How to share files between computers over network with btsync.md @@ -54,8 +54,6 @@ Btsync带有一个内置的网络服务器被用作其管理接口。想要使 ![](https://farm9.staticflickr.com/8599/15895277793_da63841433_b.jpg) -![](Feel free to check the README file in /usr/local/bin/btsync directory if you want to tweak the configuration further, but this will do for now.) - ### 第一次运行btsync ### 作为一个系统的最高执行者我们需要依赖日志文件!所以在我们启动btsync之前,我们将先为btsync创建一个日志文件。 From 6c741a8f1ff7a1420723d2025e830b0bb6b79649 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Feb 2015 21:47:07 +0800 Subject: [PATCH 0094/2517] PUB:20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty) @geekpi --- ...o Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md (84%) diff --git a/translated/tech/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md b/published/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md similarity index 84% rename from translated/tech/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md rename to published/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md index 95dca20588..ccbee5e704 100644 --- a/translated/tech/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md +++ b/published/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md @@ -2,7 +2,7 @@ ================================================================================ 今天我们将会在Ubuntu Server 14.04 LTS (Trusty)上安装一个博客平台Ghost。 -Ghost是一款设计优美的发布平台,很容易使用且对任何人都免费。它是免费的开源软件(FOSS),它的源码在Github上。截至2014年1月,它的界面很简单还有分析面板。编辑使用的是分屏显示。 +Ghost是一款设计优美的发布平台,很容易使用且对任何人都免费。它是免费的开源软件(FOSS),它的源码在Github上。截至2015年1月(LCTT 译注:原文为2014,应为2015),它的界面很简单还有分析面板。编辑使用的是很便利的分屏显示。 因此有了这篇步骤明确的在Ubuntu Server上安装Ghost的教程: @@ -52,12 +52,12 @@ Ghost是一款设计优美的发布平台,很容易使用且对任何人都免 sudo adduser --shell /bin/bash --gecos 'Ghost application' ghost sudo chown -R ghost:ghost /var/www/ghost/ -现在启动Ghost,你需要以“ghsot”用户登录。 +现在启动Ghost,你需要以“ghost”用户登录。 su - ghost cd /var/www/ghost/ -现在,你已经以“ghsot”用户登录,并可启动Ghost: +现在,你已经以“ghost”用户登录,并可启动Ghost: npm start --production @@ -67,7 +67,7 @@ via: http://linoxide.com/ubuntu-how-to/install-ghost-ubuntu-server-14-04/ 作者:[Arun Pyasi][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 246f615ecfb12220daf150f4e9875a7fabcc8e07 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Feb 2015 22:05:33 +0800 Subject: [PATCH 0095/2517] PUB:20150105 Ubuntu apt-get and apt-cache commands with practical examples @geekpi --- ...-cache commands with practical examples.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md (90%) diff --git a/translated/tech/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md b/published/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md similarity index 90% rename from translated/tech/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md rename to published/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md index 7574a065f8..0b581084a5 100644 --- a/translated/tech/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md +++ b/published/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md @@ -1,6 +1,6 @@ -实例展示Ubuntu中apt-get和apt-cache命令的使用 +apt-get 和 apt-cache 命令实例展示 ================================================================================ -apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具。 apt-get的GUI版本是Synaptic包管理器,本篇中我们会讨论apt-get和apt-cache命令的不同。 +apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具。 apt-get的GUI版本是Synaptic包管理器。本篇中我们会展示apt-get和apt-cache命令的15个不同例子。 ### 示例:1 列出所有可用包 ### @@ -16,7 +16,7 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 ### 示例:2 用关键字搜索包 ### -这个命令在你不确定包名时很有用,只要在apt-cache(这里原文是apt-get,应为笔误)后面输入与包相关的关键字即可/ +这个命令在你不确定包名时很有用,只要在apt-cache(LCTT 译注:这里原文是apt-get,应为笔误)后面输入与包相关的关键字即可。 linuxtechi@localhost:~$ apt-cache search "web server" apache2 - Apache HTTP Server @@ -37,7 +37,7 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 pnp4nagios-bin: /etc/pnp4nagios/nagios.cfg pnp4nagios-bin: /usr/share/doc/pnp4nagios/examples/nagios.cfg -### 示例:3 显示特定包的基本信息 ### +### 示例:3 显示特定包的基本信息 ### linuxtechi@localhost:~$ apt-cache show postfix Package: postfix @@ -92,7 +92,7 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 ### 示例:6 使用 “apt-get update” 更新仓库 ### -使用命令“apt-get update”, 我们可以重新从源仓库中同步文件索引。包的索引从“/etc/apt/sources.list”中检索 +使用命令“apt-get update”, 我们可以重新从源仓库中同步文件索引。包的索引从“/etc/apt/sources.list”中检索。 linuxtechi@localhost:~$ sudo apt-get update Ign http://extras.ubuntu.com utopic InRelease @@ -106,7 +106,7 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 Ign http://in.archive.ubuntu.com utopic-backports InRelease ................................................................ -### 示例:7 使用apt-get安装包 ### +### 示例:7 使用apt-get安装包 ### linuxtechi@localhost:~$ sudo apt-get install icinga @@ -140,15 +140,15 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 Get:1 http://in.archive.ubuntu.com/ubuntu/ utopic/universe icinga amd64 1.11.6-1build1 [1,474 B] Fetched 1,474 B in 1s (1,363 B/s) -上面的目录会从你当前的目录下载icinga包。 +上面的目录会把icinga包下载到你的当前工作目录。 ### 示例:12 清理本地包占用的磁盘空间 ### linuxtechi@localhost:~$ sudo apt-get clean -上面的命令会清零apt-get在下载包时占用的磁盘空间。 +上面的命令会清空apt-get所下载的包占用的磁盘空间。 -我们也可以使用“**autoclean**”选项来代替“**clean**“,两者之间主要的区别是autoclean清理不再使用且没用的下载。 +我们也可以使用“**autoclean**”选项来代替“**clean**”,两者之间主要的区别是autoclean清理不再使用且没用的下载。 linuxtechi@localhost:~$ sudo apt-get autoclean Reading package lists... Done @@ -167,9 +167,9 @@ apt-get和apt-cache是**Ubuntu Linux**中的命令行下的**包管理**工具 Get:1 Changelog for apache2 (http://changelogs.ubuntu.com/changelogs/pool/main/a/apache2/apache2_2.4.10-1ubuntu1/changelog) [195 kB] Fetched 195 kB in 3s (60.9 kB/s) -上面的命令会下载apache2的更新日志,并在你屏幕上显示。 +上面的命令会下载apache2的更新日志,并在你屏幕上分页显示。 -### 示例15 使用 “check” 选项显示损坏的依赖 ### +### 示例:15 使用 “check” 选项显示损坏的依赖关系 ### linuxtechi@localhost:~$ sudo apt-get check Reading package lists... Done @@ -182,7 +182,7 @@ via: http://www.linuxtechi.com/ubuntu-apt-get-apt-cache-commands-examples/ 作者:[Pradeep Kumar][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a328d57091f085ac37685abe9b67cd8f3638e117 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Feb 2015 22:38:29 +0800 Subject: [PATCH 0096/2517] PUB:20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7 @geekpi --- ...ling Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md (97%) diff --git a/translated/tech/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md b/published/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md similarity index 97% rename from translated/tech/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md rename to published/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md index 901ce4380f..0777cc4d0d 100644 --- a/translated/tech/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md +++ b/published/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md @@ -65,7 +65,7 @@ vi /etc/sysconfig/iptables -加入红色显示的行: +加入如下行“-A INPUT -p tcp -m state --state NEW --dport 23 -j ACCEPT”: # Firewall configuration written by system-config-firewall # Manual customization of this file is not recommended. @@ -151,7 +151,7 @@ via: http://www.unixmen.com/installing-telnet-centosrhelscientific-linux-6-7/ 作者:[SK][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d05288ffb48b4221320c58ac65dea202e0cc9577 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Feb 2015 22:48:10 +0800 Subject: [PATCH 0097/2517] PUB:20150119 How To Disable IPv6 In CentOS 7 @geekpi --- .../20150119 How To Disable IPv6 In CentOS 7.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) rename {translated/tech => published}/20150119 How To Disable IPv6 In CentOS 7.md (88%) diff --git a/translated/tech/20150119 How To Disable IPv6 In CentOS 7.md b/published/20150119 How To Disable IPv6 In CentOS 7.md similarity index 88% rename from translated/tech/20150119 How To Disable IPv6 In CentOS 7.md rename to published/20150119 How To Disable IPv6 In CentOS 7.md index 080799f17c..a148053251 100644 --- a/translated/tech/20150119 How To Disable IPv6 In CentOS 7.md +++ b/published/20150119 How To Disable IPv6 In CentOS 7.md @@ -1,6 +1,6 @@ 如何在CentOS 7中禁止IPv6 ================================================================================ -最近,我的一位朋友问我该如何禁止IPv6。在搜索了一番之后,我找到了下面的方案。下面就是我在CentOS 7迷你版中禁止IPv6的方法。 +最近,我的一位朋友问我该如何禁止IPv6。在搜索了一番之后,我找到了下面的方案。下面就是在我的CentOS 7 迷你服务器禁止IPv6的方法。 你可以用两个方法做到这个。 @@ -41,7 +41,6 @@ ### 我在禁止IPv6后遇到问题怎么办 ### -You may get problems after disabling IPv6. 你可能在禁止IPv6后遇到一些问题 #### 问题1: #### @@ -60,9 +59,7 @@ vi /etc/ssh/sshd_config AddressFamily inet -或者, - -在这行的前面去掉注释**(#)**: +或者,在这行的前面去掉注释**(#)**: #ListenAddress 0.0.0.0 @@ -89,7 +86,7 @@ via: http://www.unixmen.com/disable-ipv6-centos-7/ 作者:[SK][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d0bbcb1237342da8fe5da14b6c064dfa6a266fd9 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Feb 2015 23:07:29 +0800 Subject: [PATCH 0098/2517] PUB:20150114 How to Configure Chroot Environment in Ubuntu 14.04 @bazz2 --- ...4 How to Configure Chroot Environment in Ubuntu 14.04.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md (93%) diff --git a/translated/tech/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md b/published/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md similarity index 93% rename from translated/tech/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md rename to published/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md index 789cb8a7fe..250b223b2a 100644 --- a/translated/tech/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md +++ b/published/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md @@ -2,7 +2,7 @@ ================================================================================ 你可能会有很多理由想要把一个应用、一个用户或者一个环境与你的 linux 系统隔离开来。不同的操作系统有不同的实现方式,而在 linux 中,一个典型的方式就是 chroot 环境。 -在这份教程中,我会一步一步指导你怎么使用 chroot 命令去配置一个与真实系统分离出来的独立环境。这个功能主要可以用于测试项目,这些步骤都在 **Ubuntu 14.04** 虚拟专用服务器(VPS)上执行。 +在这份教程中,我会一步一步指导你怎么使用 chroot 命令去配置一个与真实系统分离出来的独立环境。这个功能主要可以用于测试项目,以下这些步骤都在 **Ubuntu 14.04** 虚拟专用服务器(VPS)上执行。 学会快速搭建一个简单的 chroot 环境是一项非常实用的技能,绝大多数系统管理员都能从中受益。 @@ -22,7 +22,7 @@ 举个例子,你可以在 chroot 环境中编译、安装、测试软件,而不去动真实的系统。你也可以**在64位环境下使用 chroot 创建一个32位环境,然后运行一个32位的程序**(LCTT泽注:如果你的真实环境是32位的,那就不能 chroot 一个64位的环境了)。 -但是 为了安全考虑,chroot 环境为非特权用户设立了非常严格的限制,而不是提供完整的安全策略。如果你需要的是有完善的安全策略的隔离方案,可以考虑下 LXC、Docker、vservers等等。 +但是为了安全考虑,chroot 环境为非特权用户设立了非常严格的限制,而不是提供完整的安全策略。如果你需要的是有完善的安全策略的隔离方案,可以考虑下 LXC、Docker、vservers等等。 ### Debootstrap 和 Schroot ### @@ -138,7 +138,7 @@ via: http://linoxide.com/ubuntu-how-to/configure-chroot-environment-ubuntu-14-04 作者:[Arun Pyasi][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 55d4582e200a0727161bfcbfc0b0035a0987a266 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 25 Feb 2015 10:55:40 +0800 Subject: [PATCH 0099/2517] PUB:20141203 Undelete Files on Linux Systems @FSSlc --- ...0141203 Undelete Files on Linux Systems.md | 127 ++++++++++++++++++ ...0141203 Undelete Files on Linux Systems.md | 118 ---------------- 2 files changed, 127 insertions(+), 118 deletions(-) create mode 100644 published/20141203 Undelete Files on Linux Systems.md delete mode 100644 translated/tech/20141203 Undelete Files on Linux Systems.md diff --git a/published/20141203 Undelete Files on Linux Systems.md b/published/20141203 Undelete Files on Linux Systems.md new file mode 100644 index 0000000000..59367ed918 --- /dev/null +++ b/published/20141203 Undelete Files on Linux Systems.md @@ -0,0 +1,127 @@ +怎样在 Linux 系统中恢复已删除文件 +================================================================================ + +当用户意外地删除了一个仍然需要的文件时,大多数情况下,是没有简便的方法可以重新找回或重建这个文件。不过,幸运的是文件是可以通过一些方法恢复的。当用户删除了一个文件,该文件并没有消失,只是被隐藏了一段时间。 + +这里将解释它是如何工作的。在一个文件系统中,有一个叫做 `文件分配表` 的东西,这个表跟踪文件在存储单元(如硬盘, MicroSD 卡,闪存驱动器等等)中的位置。当一个文件被删除,文件系统将会在`文件分配表`中执行以下两个任务之一:这个文件在`文件分配表`上的条目被标记为 “自由空间” 或删除`文件分配表`里这个文件的条目,且将相应的空间被标记为自由空间 。现在,如果有一个新的文件需要被放置在一个存储单元上,操作系统将会把这个文件放置到标记为空位的地方。在新文件被写入到这个空位后,被删除的文件就彻底消失了。当需要恢复一个已经删除的文件时,用户绝对不能再对任何文件进行操作,因为假如该文件对应的“空位”被占用,这个文件就永远也不能恢复了。 + +### 恢复软件是如何工作的? ### + +大多数的文件系统(在删除文件时)只是标记空间为空白。在这些文件系统下,恢复软件查看`文件分配表`这个文件,然后复制被删除的文件到另外的存储单元中。假如该文件被复制到其它需要恢复的被删除的存储单元中,那么用户将有可能会失去那个所需的删除文件。 + +文件系统很少会擦除`文件分配表`中的条目。假如文件系统真的这样做了, 这便是恢复软件在恢复文件了。恢复软件在存储单元中扫描文件头,所有文件都拥有一个特殊的编码字符串,它们位于文件的最前面,也被叫做 `魔法数字`。例如,一个编译的 JAVA 类文件的魔法数字在十六进制中是“CAFEBABE”。所以,假如要恢复该类型的文件,恢复软件会查找 “CAFEBABE” 然后复制文件到另一个存储单元。一些恢复软件可以查找某种特殊的文件类型。若用户想恢复一个 PDF 文件,则恢复软件将会查找十六进制的魔法数字 “25504446”,这恰恰是 ASCII 编码中的 “%PDF”。恢复软件将会查找所有的魔法数字,然后用户可以选择恢复哪个已删除的文件。 + +假如一个文件的部分被覆写了,则整个文件就会被损坏。通常这个文件可以被恢复,但是其中的内容可能已经没有什么用处。例如,恢复一个已损坏的 JPEG 文件将会是无意义的,因为图片查看器不能从这个损坏的文件产生一幅图片。因此,即使用户拥有了这个文件,该文件也将毫无用处。 + +### 设备的位置:### + +在我们继续之前,下面的一些信息将会对指引恢复软件找到正确的存储单元起到一定的帮助。所有的设备均挂载在 `/dev/` 目录下。操作系统赋予每个设备的名称(并不是管理员给予每个分区或设备的名称)遵循一定的命名规律。 + +第一个 SATA 硬盘的第二个分区的名称将会是 sda2。名称的第一个字母暗示了存储类型,在这里指的是 SATA,但字母 “s” 也可能指的是 SCSI、 FireWire(火线端口)或 USB。第二个字母 “d” 指的是 disk(硬盘)。第三个字母指的是设备序数,即字母 “a” 指的是第一个 SATA 而 “b” 指的是第二个。最后的数字代表分区。没有分区数字的设备名代表该设置的所有分区。对于上面的例子,对应的名称为 sda 。作为命名的第一个字母还可能是 “h” ,这对应 PATA 硬盘(IDE)。 + +以下为命名规律的一些例子。假如一个用户有一个 SATA 硬盘(sda),这个设备有 4 个分区- sda1、 sda2、 sda3 和 sda4 。该用户删除了第三个分区,但直到格式化第四个分区之前,第四个分区名 sda4 都将保留不变。然后该用户插入了一个带有一个分区 - 即sdb1- 的 usb 存储卡(sdb),又增加了一个带有一个分区 -hda1- 的 IDE 硬盘 ,接着该用户又增加了一个 SCSI 硬盘 - sdc1 。接着用户移除了 USB 存储卡(sdb)。现在,SCSI 硬盘的名称仍然为 sdc,但如果这个 SCSI 被移除接着再被插入,则它的名称将变为 sdb。虽然还有其他的存储设备存在, 那个 IDE 硬盘的名称仍会有一个 “a”, 因为它是第一个 IDE 硬盘,IDE 设备的命名与 SCSI、 SATA、 FireWire 和 USB 设备要分开计数。 + +### 使用 TestDisk 进行恢复:### + +每个恢复软件有其不同的功能,特征及支持的不同文件系统。下面是一些关于 使用 TestDisk 在各种文件系统中恢复文件的指南。 + +####FAT16、 FAT32、 exFAT (FAT64)、 NTFS 以及 ext2/3/4:#### + +TestDisk 是一个运行在 Linux、 *BSD、 SunOS、 Mac OS X、 DOS 和 Windows 等操作系统下的开源的自由软件。 TestDisk 可以从下面的链接中找到 :[http://www.cgsecurity.org/wiki/TestDisk][1]。TestDisk 也可以通过键入 `sudo apt-get install testdisk` 来安装。TestDisk 有着许多的功能,但这篇文章将只关注恢复文件这个功能。 + +使用 root 权限从终端中打开 TestDisk 可以通过键入 `sudo testdisk` 命令。 + +现在, TestDisk 命令行应用将会被执行。终端的显示将会改变。TestDisk 询问用户它是否可以保留日志,这完全由用户决定。假如一个用户正从系统存储中恢复文件,则不必保留日志。可选择的选项有“生成”、 “追加” 和 “无日志”。假如用户想保留日志,则日志将会保留在该用户的主目录。 + +![](http://www.linux.org/attachments/screen1-jpg.342/?.jpg) + +在接着的屏幕中,存储设备以 `/dev/*`的方式被罗列出来。对于我的系统,系统的存储单元为 `/dev/sda`,这意味着我的存储单元为 一个 SATA硬盘(sd)且它是第一个硬盘(a)。每个存储单元的容量以 Gigabyte(千兆字节)为单位显示的。使用上下键来选择一个存储设备然后点击进入。 + +![](http://www.linux.org/attachments/screen2-jpg.343/?.jpg) + +下一屏显示出一个列有分区表(也叫做分区映射表)的清单。正如文件有`文件配置表`,分区有着分区表。分区是存储设备上的分段。例如在几乎所有的 Linux 系统中,至少存在两种分区类型 - EXT3/4 和 Swap 。每一个分区表将会在下面被简要地描述。TestDisk 并不支持所有类型的分区表,所以这并不是完整的列表。 + +![](http://www.linux.org/attachments/screen3-jpg.344/?.jpg) + +- **Intel** - 这类分区表在 Windows 系统和许多的 Linux 系统中非常普遍,它也常常称作 MBR 分区表。 +- **EFI GPT** - 这种类型的分区表通常用在 Linux 系统中。对于 Linux 系统,这种分区表是最为推荐的, 因为逻辑分区或扩展分区的概念并不适用于 GPT (GUID Partition Table) 分区表。 这意味着,如果每个分区中有一个 Linux 系统,一个 Linux 用户可以从多种类型的 Linux 系统中进行多重启动。当然使用 GPT 分区表还有其他的优势,但那些已超出了本文的讨论范围。 +- **Humax** - Humax 分区映射表适用于韩国公司 Humax 生产的设备。 +- **Mac** - Apple 分区映射表 (APM) 适用于 Apple 的设备。 +- **None** - 某些设备并没有分区表。例如,许多 Subor 游戏控制台不使用分区映射表。如果一个用户试图以其它分区表类型从这类设备中恢复文件,用户就会困扰 TestDisk 为何找卟到任何的文件系统或者文件。 +- **Sun** - Sun 分区表适用于 Sun 系统。 +- **Xbox** -Xbox 适用于使用 Xbox 分区映射表的存储设备。 + +假如用户选择了 “Xbox” ,尽管他的系统使用了 GPT 分区表, 那么 TestDisk 将不能找到任何分区或文件系统。假如 TestDisk 按照用户的选择执行,则它可能猜测错误。(下面的图片显示的是当分区表类型错误时的输出) + +![](http://www.linux.org/attachments/xbox-jpg.350/?.jpg) + +当用户为他们的设备选择了正确的选项,则在下一屏中,选择 “高级” 选项。 + +![](http://www.linux.org/attachments/screen4-jpg.345/?.jpg) + +现在,用户将看到一个列有用户存储设备中所有的文件系统或分区的列表。假如用户选择了错误的分区映射表,则在这一步中用户就将会知道他们做出了错误的选择。假如没有错误,通过移动文字光标来高亮选择含有被删除文件的分区。使用 左右键来高亮位于终端底部的 “列表”。接着,按下回车确认。 + +![](http://www.linux.org/attachments/screen5-jpg.346/?.jpg) + +新的一屏便会呈现出列有文件和目录的列表。那些白色的文件名就是未被删除的文件,而红色的文件名是那些已被删除的文件。最右边的一列是文件的名称,从右到左方向的接着一列是文件的创建日期,再往左的一列是文件的大小(以 byte/ 比特为单位),最左边带有“-”,“d” ,“r”, “w” 和"x"的一列则代表的是文件的权限情况。“d” 表示该文件为一个目录,其他的权限术语与本文关系不大。在列表的最顶端以“.”代表的一项表示当前目录,第二行以".."代表的一项表示当前目录的上级目录,所以用户可以通过选择目录所在行到达该目录。 + +![](http://www.linux.org/attachments/screen6-jpg.347/?.jpg) + +举个例子,我想进入"Xaiml\_Dataset" 目录,该目录基本上由被删除的文件组成。通过按键盘上的 "c"键,我将恢复文件 "computers.xaiml",接着我被询问选择一个目标目录,当然,我应该放置该文件到另一个分区中。现在,当我在我的家目录时,按下了“c”键。(选择目标目录时)哪个目录被高亮并没有什么影响,当前目录就是目标目录,在屏幕的上方,将会显示“复制完成”的消息。在我的家目录中便会有一个名为"Xaiml_Dataset"的目录,里面里有一个 Xaiml 文件。 假如我在更多的已删除文件上按“c” 键,则这些文件将会被放置到新的文件夹中而无需再向我询问目标目录。 + +![](http://www.linux.org/attachments/screen7-jpg.348/?.jpg) + +![](http://www.linux.org/attachments/screen8-jpg.349/?.jpg) + +当这些步骤完成后,重复按“q”键直到看到正常的终端模样。目录"Xaiml_Dataset" 只能被 root 用户访问。为了解决这个问题,使用 root 权限改变该目录及其子目录的权限。做完这些后,文件便被恢复了且用户可以访问它们。 + +### 特别的 ReiserFS:### + +为了从 ReiserFS 文件系统中恢复一个文件,首先需将分区中的所有文件做一个备份。因为如果发生某些错误, 这个方法可能会引起文件丢失。接着执行下面的命令,其中 `DEVICE`指的是那些以 sda2 形式命名的设备。一些文件将被放入 lost+found 目录而其他则会保存到原先被删除的位置。 + + reiserfsck --rebuild-tree --scan-whole-partition /dev/DEVICE + +### 恢复被某个程序打开的删除文件: ### + +假设用户意外地删除了一个文件,且该文件被某个程序打开。虽然在硬盘中该文件被删除了,但这个程序正使用着位于 RAM 中的该文件的副本。幸好,我们有两种简单的解决方法来恢复该文件。 + +假如这个软件有保存功能,如文本编辑器,则用户可以重新保存该文件,这样,文本编辑器可以将该文件写入硬盘中。 + +假设在音乐播放器中有一个 MP3 文件,而该音乐播放器并不能保存该 MP3 文件,则这种情形下需要比先前花更多的时间来恢复文件。不幸的是,这种方法并不能保证在所有的系统和应用中有效。首先,键入下面的命令。 + + lsof -c smplayer | grep mp3 + +上面的命令会列出所有由 smplayer 使用的文件,这个列表由 `grep` 命令通过管道搜索 mp3 。命令的输入类似于下面: + + smplayer 10037 collier mp3 169r 8,1 676376 1704294 /usr/bin/smplayer + +现在,键入下面的命令来直接从 RAM(在 Linux 系统中,`/proc/`映射到 RAM)中恢复文件,并复制该文件到选定的文件夹中。其中 `cp` 指的是复制命令,输出中的数字 10037 来自于进程数,输出中的数字 169 指的是文件描述符,"~/Music/"为目标目录,最后的 "music.mp3" 为用户想恢复的文件的名称。 + + cp /proc/10037/fd/169 ~/Music/music.mp3 + +### 真正的删除: ### + +为确保一个文件不能被恢复,可以使用一个命令来 “擦除” 硬盘。擦除硬盘实际上是向硬盘中写入无意义的数据。例如,许多擦除程序向硬盘中写入零,随机字母或随机数据。不会有空间被占用或丢失,擦除程序只是对空位进行重写覆盖。假如存储单元被文件占满而没有空余空间,则所有先前被删除的文件将会消失而不能恢复。 + +擦除硬盘的目的是确保隐私数据不被他人看见。举个例子,一个公司可能预订了一些新的电脑,总经理决定将旧的电脑卖掉,然而,新的电脑拥有者可能会看到公司的一些机密或诸如信用卡号码,地址等顾客信息。幸好,公司的电脑技术人员可以在卖掉这些旧电脑之前,擦除这些硬盘。 + +为了安装擦除程序 secure-delete,键入 `sudo apt-get install secure-delete`,这个命令将会安装一个包含 4 个程序的程序集,用以确保被删除的文件不能被恢复。 + +- srm - 永久删除一个文件。使用方法: `srm -f ./secret_file.txt` +- sfill - 擦除空白空间。使用方法: `sfill -f /mount/point/of/partition` +- sswap - 擦除 swap 空间。使用方法: `sswap -f /dev/SWAP_DEVICE` + +假如电脑实际去清除那些删除的文件,那么就需要花费更长的时间去执行删除任务。将某些空间标记为空位是快速且容易的,但使得文件永远消失需要花费一定的时间。例如,擦除一个存储单元,可能需要花费几个小时的时间(根据磁盘容量大小)。总之,现在的系统工作的就挺好,因为即便用户清空了垃圾箱,他们仍然有另一次机会来改变他们当初的想法(或错误)。 + +-------------------------------------------------------------------------------- + +via: http://www.linux.org/threads/undelete-files-on-linux-systems.4316/ + +作者:[DevynCJohnson][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linux.org/members/devyncjohnson.4843/ +[1]:http://www.cgsecurity.org/wiki/TestDisk diff --git a/translated/tech/20141203 Undelete Files on Linux Systems.md b/translated/tech/20141203 Undelete Files on Linux Systems.md deleted file mode 100644 index c5c6d9409d..0000000000 --- a/translated/tech/20141203 Undelete Files on Linux Systems.md +++ /dev/null @@ -1,118 +0,0 @@ -怎样在 Linux 系统中恢复已删除文件 -================================================================================ -大多数情况下,一个电脑用户可能意外地删除了一个仍然需要的文件,但没有一个简便的方法来重新找回或重建这个文件。幸好,文件可以被恢复。当用户删除了一个文件,该文件并没有消失,只是被隐藏了一段时间。这里将解释它是如何工作的。在一个文件系统中,有一个叫做 `文件分配表` 的文件,这个表跟踪文件在存储单元(硬盘, MicroSD 卡,闪存驱动器 等等)中的位置。当一个文件被删除,文件系统将会在`文件分配表`中执行以下 两个任务中的一个:这个文件在`文件分配表`上的条目被标记为 “空白空间” 或 这个文件在`文件分配表`的条目被擦除,且相应的空间被标记为 空白空间 。现在,如果一个文件需要被放置在一个存储单元上,操作系统将会把这个文件放置到标记为 空白 的空间中。在新文件被写入到这个空白空间后,被删除的文件就彻底消失了。当需要恢复一个已经删除的文件时,用户绝对不能再对任何文件进行操作,因为假如 该文件对应的 空白空间 被占用,这个文件就永远也不能恢复了。 - -### 恢复软件是如何工作的? ### - -大多数的文件系统只是标记空间为空白,在这些文件系统下,恢复软件查看`文件分配表`这个文件,然后复制被删除的文件到另外的存储单元中。假如该文件被复制到原来所处的存储单元中,那么用户将有可能会失去那个所需的删除文件。 - -文件系统很少会擦除`文件配置表`中的条目。假如文件系统真的这样做了, 这便是恢复软件在恢复文件了。恢复软件在存储单元中扫描文件头,所有文件都拥有一个特殊的编码字符串,它们位于文件的最前面,也被叫做 `魔法数字`。例如,一个编译的 JAVA 类文件的魔法数字在十六进制中是“CAFEBABE”。所以,假如要恢复该类型的文件,恢复软件会查找 “CAFEBABE” 然后复制文件到另一个存储单元。一些恢复软件可以查找某种特殊的文件类型。若用户想恢复一个 PDF 文件,则恢复软件将会查找十六进制的魔法数字 “25504446”,这恰恰是 ASCII 编码中的 “%PDF”。其他的恢复软件将查找所有的魔法数字。然后,用户可以选择恢复哪个已删除的文件。 - -假如一个文件的部分被重写了,则整个文件就会被损坏。通常这个文件可以被恢复,但是其中的内容可能已经没有什么用处。例如,恢复一个已损坏的 JPEG 文件将会是无意义的,因为 图片查看器不能从这个损坏的文件产生一幅图片。因此,即使用户拥有了这个文件,该文件也将毫无用处。 - -### 设备的位置: ### - -在我们继续之前,下面的一些信息将会对 指引恢复软件找到正确的存储单元 起到一定的帮助。所有的设备均挂载在 `/dev/` 目录下。操作系统赋予每个设备的名称(并不是管理员给予每个分区或设备的名称) 遵循一定的命名规律。第一个 SATA 硬盘的第二个分区的名称将会是 sda2。名称的第一个字母暗示了存储类型,在这里指的是 SATA,但字母 “s” 也可能指的是 SCSI, FireWire(火线端口), 或 USB。第二个字母 “d” 指的是 disk(硬盘)。第三个字母指的是设备序数,即字母 “a” 指的是第一个 SATA 而 “b” 指的是第二个。最后的数字代表分区。一个带有所有分区的设备的命名将只有字母而没有数字。对于上面的例子,对应的名称为 sda 。作为命名的第一个字母还可能是 “h” ,这对应 PATA 硬盘(IDE)。以下为命名规律的一些例子。假如一个用户有一个 SATA 硬盘(sda),这个设备有 4 个分区- sda1, sda2, sda3, 和 sda4 。该用户删除了第三个分区,但直到格式化第四个分区之前,将第四个分区保留。然后该用户插入了一个带有一个分区 - 即sdb1- 的 usb 存储卡(sdb),又增加了一个 带有一个分区 -hda1- 的 IDE 硬盘 ,接着该用户又增加了一个 SCSI 硬盘 - sdc1 。接着用户移除了 USB 存储卡(sdb)。现在,SCSI 硬盘的名称仍然为 sdc,但如果这个 SCSI 被移除接着再被插入,则它的名称将变为 sdb。即使其他的存储设备仍然存在, 那个 IDE 硬盘的名称仍会有一个 “a”, 因为它是第一个 IDE 硬盘,IDE 设备的命名与 SCSI, SATA, FireWire, 和 USB 设备要分开计数。 - -### 恢复: ### - -每个恢复软件有其不同的功能,特征及支持的不同文件系统。下面是一些关于 使用 TestDisk 在一系列的文件系统中恢复文件的指南。 - -**FAT16, FAT32, exFAT (FAT64), NTFS, 以及 ext2/3/4:** - -TestDisk 是一个运行在 Linux, *BSD, SunOS, Mac OS X, DOS, 和 Windows 等操作系统下的开源,免费软件。 TestDisk 可以从下面的链接中找到 :[http://www.cgsecurity.org/wiki/TestDisk][1]。TestDisk 也可以通过键入 `sudo apt-get install testdisk` 来安装。TestDisk 有着许多的功能,但这篇文章将只关注 恢复文件 这个功能。 - -使用 root 权限从终端中打开 TestDisk 可以通过键入 `sudo testdisk` 命令。 - -现在, TestDisk 命令行应用将会被执行。终端的外观将会改变。TestDisk 询问用户 它是否可以保留日志,这完全由用户决定。假如一个用户正从系统存储中恢复文件,则 TestDisk 不会保留日志。可选择的选项有 "生成", "追加", 和 "无 log"。假如用户想保留日志,则日志将会保留在该用户的主目录。 - -![](http://www.linux.org/attachments/screen1-jpg.342/) - -在接着的屏幕中,存储设备以 `/dev/*`的方式被罗列出来。对于我的系统,系统的存储单元为 `/dev/sda`,这意味着我的存储单元为 一个 SATA硬盘(sd) 且它是第一个硬盘(a)。每个存储单元的容量以 Gigabyte(千兆字节)为单位显示的。使用上下键来选择一个存储设备然后点击进入。 - -![](http://www.linux.org/attachments/screen2-jpg.343/) - -下一屏显示出一个列有分区表(也叫做 分区映射表)的清单。正如文件有`文件配置表`,分区有着分区表。分区是存储设备上的划分部分。例如在几乎所有的 Linux 系统中,至少存在两种分区类型 - EXT3/4 和 Swap 。每一个分区表将会在下面被简要地描述。TestDisk 并不支持所有类型的分区表,所以下面的列表不是完整的。 - -![](http://www.linux.org/attachments/screen3-jpg.344/) - -- **Intel** - 这类分区表在 Windows 系统和许多的 Linux 系统中非常普遍,它也以 MBR 的名称为人们熟知。 -- **EFI GPT** - 这种类型的分区表通常用在 Linux 系统中。对于 Linux系统,这种分区表是最为推荐的, 因为逻辑分区或扩展分区的概念并不适用于 GPT (GUID Partition Table) 分区表。 这意味着,如果每个分区中有一个 Linux 系统,一个 Linux 用户可以从多种类型的 Linux 系统中进行多重启动。当然使用 GPT 分区表还有其他的优势,但那些已超出了本文的讨论范围。 -- **Humax** - Humax 分区映射表适用于韩国公司 Humax 生产的设备。 -- **Mac** - Apple 分区映射表 (APM) 适用于 Apple 的设备。 -- **None** - 某些设备并没有分区表。例如,许多 Subor 游戏控制台不使用分区映射表。如果一个用户试图从这类设备中恢复文件, 并且认为分区表不是其他的类型,则实际上 TestDisk 并不能找到任何的文件系统或者文件,这将给用户带来困扰。 -- **Sun** - Sun 分区表适用于 Sun 系统。 -- **Xbox** -Xbox 适用于使用 Xbox 分区映射表的自家存储设备。 - -假如用户选择了 “Xbox” ,尽管他的系统使用了 GPT 分区表, 那么 TestDisk 将不能找到任何分区或文件系统。假如 TestDisk 按照用户的选择执行,则它将不正确地进行猜测。(下面的图片显示的是当分区表类型错误时的输出) - -![](http://www.linux.org/attachments/xbox-jpg.350/) - -一旦用户为他们的设备选择了正确的选项,则在下一屏中,选择 “高级” 选项。 - -![](http://www.linux.org/attachments/screen4-jpg.345/) - -现在,用户将看到一个列有 在用户的存储设备中所有的文件系统或分区 的列表。假如用户选择了错误的分区映射表,则在这一步中用户就将会知道他们做出了错误的选择。假如没有错误,通过放置文字类型的光标来高亮含有被删除文件的分区。使用 左右键 来高亮位于终端底部的 “列表”。接着,点击确认。 - -![](http://www.linux.org/attachments/screen5-jpg.346/) - -新的一屏便会呈现出列有文件和目录的列表。那些发白的文件就是还没有被删除的文件,而红色的文件就是那些已经被删除了的文件。最右边的一列是文件的名称,从右到左方向的接着一列是文件的创建日期,再往左的一列是文件的大小(以 byte(比特) 为单位),最左边带有虚线, “d” ,“r”, “w” 和"x"的一列则代表的是文件的权限情况。“d” 表示该文件为一个目录,其他的权限术语与本文关系不大。在列表的最顶端以“.”代表的一项表示当前目录,第二行以".."代表的一项表示当前目录的上级目录,通过选择这一行,用户可以到达上级目录。举个例子,我想进入"Xaiml_Dataset" 目录,该目录基本上由被删除的文件组成。通过按键盘上的 "c"键,我将恢复文件 "computers.xaiml",接着我被询问选择一个目标目录,当然,我将放置该文件到另一个分区中。现在,我在我的家目录中,并按下了“c”键。哪个目录被高亮并没有什么影响。当前目录就是目标目录,在屏幕的上方,将会显示“复制完成”的消息。在我的家目录中便会有一个名为"Xaiml_Dataset"的目录,里面里有名为 Xaiml 的文件。 假如我在更多的 已删除文件上按“c” 键,则这些文件将会被放置到新的文件夹中而无需再向我询问目标目录。 - -![](http://www.linux.org/attachments/screen6-jpg.347/) - -![](http://www.linux.org/attachments/screen7-jpg.348/) - -![](http://www.linux.org/attachments/screen8-jpg.349/) - -当这些步骤完成后,重复按“q”键直到看到正常的终端模样。目录"Xaiml_Dataset" 只能被 root 用户访问。为了修复这个问题,使用 root 权限改变该目录及其子目录的权限。做完这些后,文件便被恢复了且用户可以访问它们。 - -### ReiserFS: ### - -为了从 ReiserFS 文件系统中恢复一个文件,首先需将分区中的所有文件做一个备份。因为如果发生某些错误, 这个方法可能会引起文件丢失。接着执行下面的命令,其中 `DEVICE`指的是那些以 sda2 形式命名的设备。一些文件将被放入 lost+found 目录而其他则会保存到原先被删除的位置。 - - reiserfsck --rebuild-tree --scan-whole-partition /dev/DEVICE - -### 恢复被某个程序打开的删除文件: ### - -假设用户意外地删除了一个文件,且该文件被某个程序打开。虽然在硬盘中该文件被删除了,但这个程序正使用着位于 RAM 中的该文件的副本。幸好,我们有两种简单的解决方法来恢复该文件。 - -假如这个软件有自动保存功能,如文本编辑器,则用户可以重新保存该文件,这样,文本编辑器可以将该文件写入硬盘中。 - -假设在音乐播放器中有一个 MP3 文件,而该音乐播放器并不能保存该 MP3 文件,则这种情形下需要比先前花更多的时间来恢复文件。不幸的是,这种方法并不能保证在所有的系统和应用中有效。首先,键入下面的命令。 - - lsof -c smplayer | grep mp3 - -上面的命令会列出所有由 smplayer 使用的文件,这个列表由 `grep` 命令通过管道搜索 mp3 。命令的输入类似于下面: - - smplayer 10037 collier mp3 169r 8,1 676376 1704294 /usr/bin/smplayer - -现在,键入下面的命令来直接从 RAM(在 Linux 系统中,`/proc/`代表 RAM) 中恢复文件,并复制该文件到选定的文件夹中。其中 `cp` 指的是复制命令,输出中的数字 10037 来自于进程数,输出中的数字 169 指的是文件描述符,"~/Music/"为目标目录,最后的 "music.mp3" 为用户想恢复的文件的名称。 - - cp /proc/10037/fd/169 ~/Music/music.mp3 - -### 真正的删除: ### - -为确保一个文件不能被恢复,可以使用一个命令来 “擦除” 硬盘。擦除硬盘意味着向硬盘中写入无意义的数据。例如,许多擦除程序向硬盘中写入零,随机字母或随机数据,没有空间将会被占用或丢失,擦除程序只是对空白空间进行重写覆盖。假如存储单元被文件占满而没有空余空间,则所有先前被删除的文件将会消失。 - -擦除硬盘的目的是确保隐私数据不被他人看见。举个例子,一个公司可能预订了一些新的电脑,总经理决定将旧的电脑卖掉,然而,新的电脑拥有者可能会看到公司的一些机密或诸如信用卡号码,地址等顾客信息。幸好,公司的电脑技术人员可以在卖掉这些旧电脑之前,擦除这些硬盘。 - -为了安装擦除程序 secure-delete,键入 `sudo apt-get install secure-delete`,这个命令将会安装一个包含 4 个程序的程序集,用以确保被删除的文件不能被恢复。 - -- srm - 永久删除一个文件。使用方法: `srm -f ./secret_file.txt` -- sfill - 擦除空白空间。使用方法: `sfill -f /mount/point/of/partition` -- sswap - 擦除 swap 空间。使用方法: `sswap -f /dev/SWAP_DEVICE` - -假如电脑真的要去删除打算删除的文件,那么需要花费更长的时间去执行删除任务。将某些空间标记为空白空间是快速且容易的,但使得文件永远消失需要花费一定的时间。例如,擦除一个存储单元,可能需要花费几个小时的时间(根据磁盘容量大小)。总之,当前的系统工作良好,因为即便用户清空了垃圾箱,他们仍然有另一次机会来改变他们当初的想法。 - --------------------------------------------------------------------------------- - -via: http://www.linux.org/threads/undelete-files-on-linux-systems.4316/ - -作者:[DevynCJohnson][a] -译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linux.org/members/devyncjohnson.4843/ -[1]:http://www.cgsecurity.org/wiki/TestDisk From 020bf9a346a8d2049948f54a99362f5ce2b8b9ea Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 25 Feb 2015 13:05:41 +0800 Subject: [PATCH 0100/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...50128 Meet Vivaldi--A New Web Browser Built for Power Users.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md (100%) diff --git a/translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md b/published/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md similarity index 100% rename from translated/share/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md rename to published/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md From 70f8dc0a24c74bea1c2eb95fca9172a7127fd0d2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 25 Feb 2015 14:17:06 +0800 Subject: [PATCH 0101/2517] =?UTF-8?q?20150225-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...kup of LUKS-encrypted disk or partition.md | 80 ++++++ ...ring and filtering in Quagga BGP router.md | 258 ++++++++++++++++++ 2 files changed, 338 insertions(+) create mode 100644 sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md create mode 100644 sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md diff --git a/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md b/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md new file mode 100644 index 0000000000..64e872c4b7 --- /dev/null +++ b/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md @@ -0,0 +1,80 @@ +How to make remote incremental backup of LUKS-encrypted disk/partition +================================================================================ +Some of us have our hard drives at home or on a [VPS][1] encrypted by [Linux Unified Key Setup (LUKS)][2] for security reasons, and these drives can quickly grow to tens or hundreds of GBs in size. So while we enjoy the security of our LUKS device, we may start to think about a possible remote backup solution. For secure off-site backup, we will need something that operates at the block level of the encrypted LUKS device, and not at the un-encrypted file system level. So in the end we find ourselves in a situation where we will need to transfer the entire LUKS device (let's say 200GB for example) each time we want to make a backup. Clearly not feasible. How can we deal with this problem? + +### A Solution: Bdsync ### + +This is when a brilliant open-source tool called [Bdsync][3] (thanks to Rolf Fokkens) comes to our rescue. As the name implies, Bdsync can synchronize "block devices" over network. For fast synchronization, Bdsync generates and compares MD5 checksums of blocks in the local/remote block devices, and sync only the differences. What rsync can do at the file system level, Bdsync can do it at the block device level. Naturally, it works with encrypted LUKS devices as well. Pretty neat! + +Using Bdsync, the first-time backup will copy the entire LUKS block device to a remote host, so it will take a lot of time to finish. However, after that initial backup, if we make some new files on the LUKS device, the second backup will be finished quickly because we will need to copy only that blocks which have been changed. Classic incremental backup at play! + +### Install Bdsync on Linux ### + +Bdsync is not included in the standard repositories of [Linux][4] distributions. Thus you need to build it from the source. Use the following distro-specific instructions to install Bdsync and its man page on your system. + +#### Debian, Ubuntu or Linux Mint #### + + $ sudo apt-get install git gcc libssl-dev + $ git clone https://github.com/TargetHolding/bdsync.git + $ cd bdsync + $ make + $ sudo cp bdsync /usr/local/sbin + $ sudo mkdir -p /usr/local/man/man1 + $ sudo sh -c 'gzip -c bdsync.1 > /usr/local/man/man1/bdsync.1.gz' + +#### Fedora or CentOS/RHEL #### + + $ sudo yum install git gcc openssl-devel + $ git clone https://github.com/TargetHolding/bdsync.git + $ cd bdsync + $ make + $ sudo cp bdsync /usr/local/sbin + $ sudo mkdir -p /usr/local/man/man1 + $ sudo sh -c 'gzip -c bdsync.1 > /usr/local/man/man1/bdsync.1.gz' + +### Perform Off-site Incremental Backup of LUKS-Encrypted Device ### + +I assume that you have already provisioned a LUKS-encrypted block device as a backup source (e.g., /dev/LOCDEV). I also assume that you have a remote host where the source device will be backed up (e.g., as /dev/REMDEV). + +You need to access the root account on both systems, and set up [password-less SSH access][5] from the local host to a remote host. Finally, you need to install Bdsync on both hosts. + +To initiate a remote backup process on the local host, we execute the following command as the root: + + # bdsync "ssh root@remote_host bdsync --server" /dev/LOCDEV /dev/REMDEV | gzip > /some_local_path/DEV.bdsync.gz + +Some explanations are needed here. Bdsync client will open an SSH connection to the remote host as the root, and execute Bdsync client with --server option. As clarified, /dev/LOCDEV is our source LUKS block device on the local host, and /dev/REMDEV is the target block device on the remote host. They could be /dev/sda (for an entire disk) or /dev/sda2 (for a single partition). The output of the local Bdsync client is then piped to gzip, which creates DEV.bdsync.gz (so-called binary patch file) in the local host. + +The first time you run the above command, it will take very long time, depending on your Internet/LAN speed and the size of /dev/LOCDEV. Remember that you must have two block devices (/dev/LOCDEV and /dev/REMDEV) with the same size. + +The next step is to copy the generated patch file from the local host to the remote host. Using scp is one possibility: + + # scp /some_local_path/DEV.bdsync.gz root@remote_host:/remote_path + +The final step is to execute the following command on the remote host, which will apply the patch file to /dev/REMDEV: + + # gzip -d < /remote_path/DEV.bdsync.gz | bdsync --patch=/dev/DSTDEV + +I recommend doing some tests with small partitions (without any important data) before deploying Bdsync with real data. After you fully understand how the entire setup works, you can start backing up real data. + +### Conclusion ### + +In conclusion, we showed how to use Bdsync to perform incremental backups for LUKS devices. Like rsync, only a fraction of data, not the entire LUKS device, is needed to be pushed to an off-site backup site at each backup, which saves bandwidth and backup time. Rest assured that all the data transfer is secured by SSH or SCP, on top of the fact that the device itself is encrypted by LUKS. It is also possible to improve this setup by using a dedicated user (instead of the root) who can run bdsync. We can also use bdsync for ANY block device, such as LVM volumes or RAID disks, and can easily set up Bdsync to back up local disks on to USB drives as well. As you can see, its possibility is limitless! + +Feel free to share your thought. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/remote-incremental-backup-luks-encrypted-disk-partition.html + +作者:[Iulian Murgulet][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/iulian +[1]:http://xmodulo.com/go/digitalocean +[2]:http://xmodulo.com/how-to-create-encrypted-disk-partition-on-linux.html +[3]:http://bdsync.rolf-fokkens.nl/ +[4]:http://xmodulo.com/recommend/linuxbook +[5]:http://xmodulo.com/how-to-enable-ssh-login-without.html \ No newline at end of file diff --git a/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md b/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md new file mode 100644 index 0000000000..cae05670ba --- /dev/null +++ b/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md @@ -0,0 +1,258 @@ +How to set up IPv6 BGP peering and filtering in Quagga BGP router +================================================================================ +In the previous tutorials, we demonstrated how we can set up a [full-fledged BGP router][1] and configure [prefix filtering][2] with Quagga. In this tutorial, we are going to show you how we can set up IPv6 BGP peering and advertise IPv6 prefixes through BGP. We will also demonstrate how we can filter IPv6 prefixes advertised or received by using prefix-list and route-map features. + +### Topology ### + +For this tutorial, we will be considering the following topology. + +![](https://farm9.staticflickr.com/8599/15944659374_1c65852df2_c.jpg) + +Service providers A and B want to establish an IPv6 BGP peering between them. Their IPv6 and AS information is as follows. + +- Peering IP block: 2001:DB8:3::/64 +- Service provider A: AS 100, 2001:DB8:1::/48 +- Service provider B: AS 200, 2001:DB8:2::/48 + +### Installing Quagga on CentOS/RHEL ### + +If Quagga has not already been installed, we can install it using yum. + + # yum install quagga + +On CentOS/RHEL 7, the default SELinux policy, which prevents /usr/sbin/zebra from writing to its configuration directory, can interfere with the setup procedure we are going to describe. Thus we want to disable this policy as follows. Skip this step if you are using CentOS/RHEL 6. + + # setsebool -P zebra_write_config 1 + +### Creating Configuration Files ### + +After installation, we start the configuration process by creating the zebra/bgpd configuration files. + + # cp /usr/share/doc/quagga-XXXXX/zebra.conf.sample /etc/quagga/zebra.conf + # cp /usr/share/doc/quagga-XXXXX/bgpd.conf.sample /etc/quagga/bgpd.conf + +Next, enable auto-start of these services. + +**On CentOS/RHEL 6:** + + # service zebra start; service bgpd start + # chkconfig zebra on; chkconfig bgpd on + +**On CentOS/RHEL 7:** + + # systemctl start zebra; systemctl start bgpd + # systemctl enable zebra; systmectl enable bgpd + +Quagga provides a built-in shell called vtysh, whose interface is similar to those of major router vendors such as Cisco or Juniper. Launch vtysh command shell: + + # vtysh + +The prompt will be changed to: + + router-a# + +or + + router-b# + +In the rest of the tutorials, these prompts indicate that you are inside vtysh shell of either router. + +### Specifying Log File for Zebra ### + +Let's configure the log file for Zebra, which will be helpful for debugging. + +First, enter the global configuration mode by typing: + + router-a# configure terminal + +The prompt will be changed to: + + router-a(config)# + +Now specify log file location. Then exit the configuration mode: + + router-a(config)# log file /var/log/quagga/quagga.log + router-a(config)# exit + +Save configuration permanently by: + + router-a# write + +### Configuring Interface IP Addresses ### + +Let's now configure the IP addresses for Quagga's physical interfaces. + +First, we check the available interfaces from inside vtysh. + + router-a# show interfaces + +---------- + + Interface eth0 is up, line protocol detection is disabled + ## OUTPUT TRUNCATED ### + Interface eth1 is up, line protocol detection is disabled + ## OUTPUT TRUNCATED ## + +Now we assign necessary IPv6 addresses. + + router-a# conf terminal + router-a(config)# interface eth0 + router-a(config-if)# ipv6 address 2001:db8:3::1/64 + router-a(config-if)# interface eth1 + router-a(config-if)# ipv6 address 2001:db8:1::1/64 + +We use the same method to assign IPv6 addresses to router-B. I am summarizing the configuration below. + + router-b# show running-config + +---------- + + interface eth0 + ipv6 address 2001:db8:3::2/64 + + interface eth1 + ipv6 address 2001:db8:2::1/64 + +Since the eth0 interface of both routers are in the same subnet, i.e., 2001:DB8:3::/64, you should be able to ping from one router to another. Make sure that you can ping successfully before moving on to the next step. + + router-a# ping ipv6 2001:db8:3::2 + +---------- + + PING 2001:db8:3::2(2001:db8:3::2) 56 data bytes + 64 bytes from 2001:db8:3::2: icmp_seq=1 ttl=64 time=3.20 ms + 64 bytes from 2001:db8:3::2: icmp_seq=2 ttl=64 time=1.05 ms + +### Phase 1: IPv6 BGP Peering ### + +In this section, we will configure IPv6 BGP between the two routers. We start by specifying BGP neighbors in router-A. + + router-a# conf t + router-a(config)# router bgp 100 + router-a(config-router)# no auto-summary + router-a(config-router)# no synchronization + router-a(config-router)# neighbor 2001:DB8:3::2 remote-as 200 + +Next, we define the address family for IPv6. Within the address family section, we will define the network to be advertised, and activate the neighbors as well. + + router-a(config-router)# address-family ipv6 + router-a(config-router-af)# network 2001:DB8:1::/48 + router-a(config-router-af)# neighbor 2001:DB8:3::2 activate + +We will go through the same configuration for router-B. I'm providing the summary of the configuration. + + router-b# conf t + router-b(config)# router bgp 200 + router-b(config-router)# no auto-summary + router-b(config-router)# no synchronization + router-b(config-router)# neighbor 2001:DB8:3::1 remote-as 100 + router-b(config-router)# address-family ipv6 + router-b(config-router-af)# network 2001:DB8:2::/48 + router-b(config-router-af)# neighbor 2001:DB8:3::1 activate + +If all goes well, an IPv6 BGP session should be up between the two routers. If not already done, please make sure that necessary ports (TCP 179) are [open in your firewall][3]. + +We can check IPv6 BGP session information using the following commands. + +**For BGP summary:** + + router-a# show bgp ipv6 unicast summary + +**For BGP advertised routes:** + + router-a# show bgp ipv6 neighbors advertised-routes + +**For BGP received routes:** + + router-a# show bgp ipv6 neighbors routes + +![](https://farm8.staticflickr.com/7317/16379555088_6e29cb6884_b.jpg) + +### Phase 2: Filtering IPv6 Prefixes ### + +As we can see from the above output, the routers are advertising their full /48 IPv6 prefix. For demonstration purposes, we will consider the following requirements. + +- Router-B will advertise one /64 prefix, one /56 prefix, as well as one full /48 prefix. +- Router-A will accept any IPv6 prefix owned by service provider B, which has a netmask length between /56 and /64. + +We are going to filter the prefix as required, using prefix-list and route-map in router-A. + +![](https://farm8.staticflickr.com/7367/16381297417_6549218289_c.jpg) + +#### Modifying prefix advertisement for Router-B #### + +Currently, router-B is advertising only one /48 prefix. We will modify router-B's BGP configuration so that it advertises additional /56 and /64 prefixes as well. + + router-b# conf t + router-b(config)# router bgp 200 + router-b(config-router)# address-family ipv6 + router-b(config-router-af)# network 2001:DB8:2::/56 + router-b(config-router-af)# network 2001:DB8:2::/64 + +We will verify that all prefixes are received at router-A. + +![](https://farm9.staticflickr.com/8598/16379761980_7c083ae977_b.jpg) + +Great! As we are receiving all prefixes in router-A, we will move forward and create prefix-list and route-map entries to filter these prefixes. + +#### Creating Prefix-List #### + +As described in the [previous tutorial][4], prefix-list is a mechanism that is used to match an IP address prefix with a subnet length. Once a matched prefix is found, we can apply filtering or other actions to the matched prefix. To meet our requirements, we will go ahead and create a necessary prefix-list entry in router-A. + + router-a# conf t + router-a(config)# ipv6 prefix-list FILTER-IPV6-PRFX permit 2001:DB8:2::/56 le 64 + +The above commands will create a prefix-list entry named 'FILTER-IPV6-PRFX' which will match any prefix in the 2001:DB8:2:: pool with a netmask between 56 and 64. + +#### Creating and Applying Route-Map #### + +Now that the prefix-list entry is created, we will create a corresponding route-map rule which uses the prefix-list entry. + + router-a# conf t + router-a(config)# route-map FILTER-IPV6-RMAP permit 10 + router-a(config-route-map)# match ipv6 address prefix-list FILTER-IPV6-PRFX + +The above commands will create a route-map rule named 'FILTER-IPV6-RMAP'. This rule will permit IPv6 addresses matched by the prefix-list 'FILTER-IPV6-PRFX' that we have created earlier. + +Remember that a route-map rule is only effective when it is applied to a neighbor or an interface in a certain direction. We will apply the route-map in the BGP neighbor configuration. As the filter is meant for inbound prefixes, we apply the route-map in the inbound direction. + + router-a# conf t + router-a(config)# router bgp 100 + router-a(config-router)# address-family ipv6 + router-a(config-router-af)# neighbor 2001:DB8:3::2 route-map FILTER-IPV6-RMAP in + +Now when we check the routes received at router-A, we should see only two prefixes that are allowed. + +![](https://farm8.staticflickr.com/7337/16379762020_ec2dc39b31_c.jpg) + +**Note**: You may need to reset the BGP session for the route-map to take effect. + +All IPv6 BGP sessions can be restarted using the following command: + + router-a# clear bgp ipv6 * + +I am summarizing the configuration of both routers so you get a clear picture at a glance. + +![](https://farm9.staticflickr.com/8672/16567240165_eee4398dc8_c.jpg) + +### Summary ### + +To sum up, this tutorial focused on how to set up BGP peering and filtering using IPv6. We showed how to advertise IPv6 prefixes to a neighboring BGP router, and how to filter the prefixes advertised or received are advertised. Note that the process described in this tutorial may affect production networks of a service provider, so please use caution. + +Hope this helps. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/ipv6-bgp-peering-filtering-quagga-bgp-router.html + +作者:[Sarmed Rahman][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://xmodulo.com/centos-bgp-router-quagga.html +[2]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html +[3]:http://ask.xmodulo.com/open-port-firewall-centos-rhel.html +[4]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html \ No newline at end of file From 70106e5d2b9ea58da29e2ac60a39869e91974fdc Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 25 Feb 2015 14:35:46 +0800 Subject: [PATCH 0102/2517] =?UTF-8?q?20150225-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ilia-Romagna Is Switching To OpenOffice.md | 40 ++++ ...pired GTK And Icon Theme Paper in Linux.md | 67 +++++++ ... to create or extract archives in Linux.md | 187 ++++++++++++++++++ 3 files changed, 294 insertions(+) create mode 100644 sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md create mode 100644 sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md create mode 100644 sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md diff --git a/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md b/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md new file mode 100644 index 0000000000..59df5a0b2d --- /dev/null +++ b/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md @@ -0,0 +1,40 @@ +Italian Region Emilia-Romagna Is Switching To OpenOffice +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Turin_Open_Source.jpg) + +Italy seems to be winning the race to Open Source adoption, it seems. We have learned about how various Italian cities like [Udine][1], [Turin][2], [Todi and Turni][3] opted for [open source alternatives of Microsoft office][4] in the past. Now the news comes that [Emilia-Romagna][5] region in northern Italy is about to complete its switch to [Apache OpenOffice][6] next month. + +### Switching to OpenOffice ### + +The migration to OpenOffice will be complete by next month and will cover 4200 workstations, across 10 departments and 5 agencies. In addition, Open Document Format (ODF) will be the default document format. The initiative to switch to OpenOffice was approved in late 2013 and was originally planned to be completed by end of 2014. The move to OpenOffice from proprietary office product is believed to [save around 2 million euro][8] in licensing fee. + +To ease this migration and improve interoperability, several custom tools and plugins are also being developed by the team in charge of the migration. + +Head of the project, Giovanni Grazia is enthusiastic about the migration but he is prepared for the brickbats as well. + +> “Changing office suite is hard work, and we use the occasion to advocate for free and open source software. Some of the region’s civil servants are keen to switch, and some are very annoyed, as they have been using the proprietary alternative for 20 years. To deal with any issues during the transition, a team of five support staffers is backed up by three IT specialists. Department by department, one at a time, we’re completing the switch. Step by step, change is coming.” + +#### Best wishes #### + +I wish good luck to Grazia and hope that other administrative regions in Italy will follow the suit. I also hope that neighboring countries like [France will also speed up the open source adoption process][8]. + + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/emiliaromagna-completes-switch-openoffice/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/udine-open-source/ +[2]:http://itsfoss.com/italian-city-turin-open-source/ +[3]:http://itsfoss.com/italian-cities-switch-libreoffice/ +[4]:http://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[5]:http://en.wikipedia.org/wiki/Emilia-Romagna +[6]:https://www.openoffice.org/ +[7]:http://www.slwoods.co.uk/?p=2886 +[8]:http://itsfoss.com/french-city-toulouse-saved-1-million-euro-libreoffice/ \ No newline at end of file diff --git a/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md b/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md new file mode 100644 index 0000000000..33aa731843 --- /dev/null +++ b/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md @@ -0,0 +1,67 @@ +Install Google’s Material Design Inspired GTK And Icon Theme Paper in Linux +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Paper_theme_Material_Design.jpg) + +[Paper][1] is a new upcoming GTK and icon theme inspired by Google’s [Material design][2] guidelines. It is developed by Sam Hewitt, the man behind [Moka Project][3]. Moka has always been in the list of [best themes for Ubuntu][4] and looking at Paper, I can say that once it is developed completely, it will surely be listed as one of the [best GTK themes][5]. + +Yes, you heard it right. The theme is still under development. Therefore I suggest that if you want to install Paper theme in Ubuntu or any other Linux distributions, do it only for experimentation purpose. You may see some broken icons here and there but the over all experience is nice. + +### Install Paper theme in Ubuntu based distributions via PPA ### + +Sam has a dedicated PPA for Ubuntu based distributions. I recommend that you use this PPA instead of downloading the theme because you’ll be getting the updates on the themes regularly. This PPA is available for Ubuntu 15.04, Ubuntu 14.10, Ubuntu 14.04, Elementary OS Freya, Elementary OS Luna, Linux Mint 17, Linux Mint 16 and other Linux distributions based on Ubuntu. + +Open a terminal and use the following commands: + + sudo add-apt-repository ppa:snwh/pulp + sudo apt-get update + sudo apt-get install paper-gtk-theme paper-icon-theme + +### Download Paper GTK and icon theme ### + +If you do not want to use the PPA, you can download the themes and icons manually. As I said previously, you won’t get the updates automatically this way. + +- [Download Paper icon themes][6] +- [Download Paper GTK themes][7] + +#### Using Paper themes and icons #### + +I hope that you know how to change or install themes in your respective Linux distributions. If you are not unaware of it, below are few tutorials that could help you to install new themes: + +- [How to change themes in Ubuntu Unity][8] +- [How to change themes in GNOME Shell][9] +- [How to change themes in Linux Mint][10] +- [How to change theme in Elementary OS Freya][11] + +#### Here is what Paper theme looks like #### + +Since I am using [Elementary OS Freya][12] these days, here are some of the screenshots of how Paper theme and icons look like in Elementary OS Freya. I have used a wallpaper with Material design look so that it blends well with the icon and themes. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Material_Design_Paper_Theme_Elementary_OS_Freya_1.jpeg) + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Material_Design_Paper_Theme_Elementary_OS_Freya.jpeg) + +How do you find this Material design inspired theme? If you did use it, do share the screenshot of your desktop with rest of us here. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-paper-theme-linux/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://snwh.org/paper/ +[2]:http://www.google.fr/design/spec/material-design/introduction.html +[3]:http://mokaproject.com/moka-icon-theme/ +[4]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ +[5]:http://itsfoss.com/gnome-shell-themes-ubuntu-1404/ +[6]:https://github.com/snwh/paper-icon-theme +[7]:https://github.com/snwh/paper-gtk-theme +[8]:http://itsfoss.com/how-to-install-themes-in-ubuntu-13-10/ +[9]:http://itsfoss.com/install-switch-themes-gnome-shell/ +[10]:http://itsfoss.com/install-icon-linux-mint/ +[11]:http://itsfoss.com/install-themes-icons-elementary-os-freya/ +[12]:http://itsfoss.com/tag/elementary-os-freya/ \ No newline at end of file diff --git a/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md b/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md new file mode 100644 index 0000000000..0a39b7f476 --- /dev/null +++ b/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md @@ -0,0 +1,187 @@ +10 quick tar command examples to create/extract archives in Linux +================================================================================ +### Tar command on Linux ### + +The tar (tape archive) command is a frequently used command on linux that allows you to store files into an archive. + +The commonly seen file extensions are .tar.gz and .tar.bz2 which is a tar archive further compressed using gzip or bzip algorithms respectively. + +In this tutorial we shall take a look at simple examples of using the tar command to do daily jobs of creating and extracting archives on linux desktops or servers. + +### Using the tar command ### + +The tar command is available by default on most linux systems and you do not need to install it separately. + +> With tar there are 2 compression formats, gzip and bzip. The "z" option specifies gzip and "j" option specifies bzip. It is also possible to create uncompressed archives. + +#### 1. Extract a tar.gz archive #### + +Well, the more common use is to extract tar archives. The following command shall extract the files out a tar.gz archive + + $ tar -xvzf tarfile.tar.gz + +Here is a quick explanation of the parameters used - + +> x - Extract files +> +> v - verbose, print the file names as they are extracted one by one +> +> z - The file is a "gzipped" file +> +> f - Use the following tar archive for the operation + +Those are some of the important options to memorise + +**Extract tar.bz2/bzip archives** + +Files with extension bz2 are compressed with the bzip algorithm and tar command can deal with them as well. Use the j option instead of the z option. + + $ tar -xvjf archivefile.tar.bz2 + +#### 2. Extract files to a specific directory or path #### + +To extract out the files to a specific directory, specify the path using the "-C" option. Note that its a capital C. + + $ tar -xvzf abc.tar.gz -C /opt/folder/ + +However first make sure that the destination directory exists, since tar is not going to create the directory for you and will fail if it does not exist. + +#### 3. Extract a single file #### + +To extract a single file out of an archive just add the file name after the command like this + + $ tar -xz -f abc.tar.gz "./new/abc.txt" + +More than once file can be specified in the above command like this + + $ tar -xv -f abc.tar.gz "./new/cde.txt" "./new/abc.txt" + +#### 4. Extract multiple files using wildcards #### + +Wildcards can be used to extract out a bunch of files matching the given wildcards. For example all files with ".txt" extension. + + $ tar -xv -f abc.tar.gz --wildcards "*.txt" + +#### 5. List and search contents of the tar archive #### + +If you want to just list out the contents of the tar archive and not extract them, use the "-t" option. The following command prints the contents of a gzipped tar archive, + + $ tar -tz -f abc.tar.gz + ./new/ + ./new/cde.txt + ./new/subdir/ + ./new/subdir/in.txt + ./new/abc.txt + ... + +Pipe the output to grep to search a file or less command to browse the list. Using the "v" verbose option shall print additional details about each file. + +For tar.bz2/bzip files use the "j" option + +Use the above command in combination with the grep command to search the archive. Simple! + + $ tar -tvz -f abc.tar.gz | grep abc.txt + -rw-rw-r-- enlightened/enlightened 0 2015-01-13 11:40 ./new/abc.txt + +#### 6. Create a tar/tar.gz archive #### + +Now that we have learnt how to extract existing tar archives, its time to start creating new ones. The tar command can be told to put selected files in an archive or an entire directory. Here are some examples. + +The following command creates a tar archive using a directory, adding all files in it and sub directories as well. + + $ tar -cvf abc.tar ./new/ + ./new/ + ./new/cde.txt + ./new/abc.txt + +The above example does not create a compressed archive. Just a plain archive, that puts multiple files together without any real compression. + +In order to compress, use the "z" or "j" option for gzip or bzip respectively. + + $ tar -cvzf abc.tar.gz ./new/ + +> The extension of the file name does not really matter. "tar.gz" and tgz are common extensions for files compressed with gzip. ".tar.bz2" and ".tbz" are commonly used extensions for bzip compressed files. + +#### 7. Ask confirmation before adding files #### + +A useful option is "w" which makes tar ask for confirmation for every file before adding it to the archive. This can be sometimes useful. + +Only those files would be added which are given a yes answer. If you do not enter anything, the default answer would be a "No". + + # Add specific files + + $ tar -czw -f abc.tar.gz ./new/* + add ‘./new/abc.txt’?y + add ‘./new/cde.txt’?y + add ‘./new/newfile.txt’?n + add ‘./new/subdir’?y + add ‘./new/subdir/in.txt’?n + + # Now list the files added + $ tar -t -f abc.tar.gz + ./new/abc.txt + ./new/cde.txt + ./new/subdir/ + +#### 8. Add files to existing archives #### + +The r option can be used to add files to existing archives, without having to create new ones. Here is a quick example + + $ tar -rv -f abc.tar abc.txt + +> Files cannot be added to compressed archives (gz or bzip). Files can only be added to plain tar archives. + +#### 9. Add files to compressed archives (tar.gz/tar.bz2) #### + +Its already mentioned that its not possible to add files to compressed archives. However it can still be done with a simple trick. Use the gunzip command to uncompress the archive, add file to archive and compress it again. + + $ gunzip archive.tar.gz + $ tar -rf archive.tar ./path/to/file + $ gzip archive.tar + +For bzip files use the bzip2 and bunzip2 commands respectively. + +#### 10. Backup with tar #### + +A real scenario is to backup directories at regular intervals. The tar command can be scheduled to take such backups via cron. Here is an example - + + $ tar -cvz -f archive-$(date +%Y%m%d).tar.gz ./new/ + +Run the above command via cron and it would keep creating backup files with names like - +'archive-20150218.tar.gz'. + +Ofcourse make sure that the disk space is not overflown with larger and larger archives. + +#### 11. Verify archive files while creation #### + +The "W" option can be used to verify the files after creating archives. Here is a quick example. + + $ tar -cvW -f abc.tar ./new/ + ./new/ + ./new/cde.txt + ./new/subdir/ + ./new/subdir/in.txt + ./new/newfile.txt + ./new/abc.txt + Verify ./new/ + Verify ./new/cde.txt + Verify ./new/subdir/ + Verify ./new/subdir/in.txt + Verify ./new/newfile.txt + Verify ./new/abc.txt + +Note that the verification cannot be done on compressed archives. It works only with uncompressed tar archives. + +Thats all for now. For more check out the man page for tar command, with "man tar". + +-------------------------------------------------------------------------------- + +via: http://www.binarytides.com/linux-tar-command/ + +作者:[Silver Moon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117145272367995638274/posts \ No newline at end of file From 7e43bae6ac52bb2c1ff79a4d34a367db1c089b56 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 25 Feb 2015 15:23:29 +0800 Subject: [PATCH 0103/2517] =?UTF-8?q?20150225-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...g kernel code get hired really quickly'.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md diff --git a/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md b/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md new file mode 100644 index 0000000000..6d7e64f616 --- /dev/null +++ b/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md @@ -0,0 +1,31 @@ +Torvalds: 'People who start writing kernel code get hired really quickly' +================================================================================ +Now more than ever, the development of the Linux kernel is a matter for the professionals, as unpaid volunteer contributions to the project reached their lowest recorded levels in the latest "Who Writes Linux" report, which was released today. + +According to the report, which is compiled by the Linux Foundation, just 11.8 percent of kernel development last year was done by unpaid volunteers -- a 19 percent downturn from the 2012 figure of 14.6 percent. The foundation says that the downward trend in volunteer contributions has been present for years. + +![](http://images.techhive.com/images/article/2015/02/screen-shot-2015-02-17-at-5.25.43-pm-100568680-medium.idge.png) + +Even so, unpaid contributors were still the single biggest source of commits in the latest Who Writes Linux, at 11,968 total changes -- good for 12.4 percent of the whole. However, corporate contributors collectively account for much, much more. The Linux Foundation said that more than 80 percent of all work on the kernel is done by paid professional developers. + +According to Linus Torvalds, the shift towards paid developers hasn't changed much about kernel development on its own. + +"I think one reason it hasn't changed things all that much is that it's not so much 'unpaid volunteers are going away' as 'people who start writing kernel code get hired really quickly,'" he told Network World. + +Torvalds said that, while Linux development has changed for plenty of other reasons -- and that, naturally, new contributors pop up all the time -- many of the original developers, with decades of experience, have simply been snapped up by companies with an interest in Linux. + +"We may have started as volunteers, but we're happily employed doing Linux these days," he said. + +Torvalds' own role in development has become increasingly hands-off, according to the report -- he has personally signed off on 329 patches since version 3.10 of kernel was released, or 0.4 percent. Increasingly, subsystem maintainers do their own reviews and merges of code. + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2885339/application-development/torvalds-people-who-start-writing-kernel-code-get-hired-really-quickly.html + +作者:[Jon Gold][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Jon-Gold/ \ No newline at end of file From 77ff06ab90be38b311def439b6aca8c120e67437 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 25 Feb 2015 15:57:22 +0800 Subject: [PATCH 0104/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... not be opened correctly' on Google Chrome.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md b/translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md index 0a10253031..faf724786c 100644 --- a/translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md +++ b/translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md @@ -1,8 +1,8 @@ -Linux有问必答--如果修复Google Chrome 的 ‘Your profile could not be opened correctly’错误 +Linux有问必答——如何修复Google Chrome 的“Your profile could not be opened correctly”错误 ================================================================================ > **提问**:当我在linux打开Google Chrome 浏览器时,我已经几次收到弹出窗口,提示我的档案文件没有被正确打开(Your profile could not be opened correctly.)。每次我打开Chrome都要弹出来,我应该如何修复这个问题? -当你在你的Chrome上看见"Your profile could not be opened correctly"错误信息时,那是因为你的Chrome档案数据已经损坏。这个问题经常发生在手动升级Google Chrome时候。 +当你在你的Chrome上看见"Your profile could not be opened correctly"错误信息时,从某种程度上讲,那是因为你的Chrome配置文件数据已经损坏。这个问题经常发生在手动升级Google Chrome的时候。 ![](https://farm8.staticflickr.com/7428/16238502737_27bdda6685_o.png) @@ -10,7 +10,7 @@ Linux有问必答--如果修复Google Chrome 的 ‘Your profile could not be op ### 方法一 ### -关掉所有Chrome窗口和子窗口。 +关掉所有Chrome窗口和标签页。 进入~/.config/google-chrome/Default,移除或者重命名"Web Data"文件。 @@ -21,9 +21,9 @@ Linux有问必答--如果修复Google Chrome 的 ‘Your profile could not be op ### 方法二 ### -关掉所有Chrome窗口和子窗口。 +关掉所有Chrome窗口和标签页。 -进入~/.config/google-chrome/"Profile 1", 并重命名"History"文件。 +进入~/.config/google-chrome/"Profile 1",并重命名"History"文件。 $ cd ~/.config/google-chrome/"Profile 1" $ mv History History.bak @@ -32,9 +32,9 @@ Linux有问必答--如果修复Google Chrome 的 ‘Your profile could not be op ### 方法三 ### -如果依然没有解决,你可以试试移除所有默认档案文件夹(~/.config/google-chrome/Default)。注意:如果这样做,你将会遗失所有之前打开的Google子窗口,导入的书签,浏览记录和登录数据等。 +如果依然没有解决,你可以试试移除所有默认配置文件夹(~/.config/google-chrome/Default)。注意:如果这样做,你将会遗失所有之前打开的Google标签、导入的书签,浏览记录和登录数据等。 -在移除之前,先关掉所有Chrome窗口和子窗口 +在移除之前,先关掉所有Chrome窗口和标签页 $ rm -rf ~/.config/google-chrome/Default @@ -45,6 +45,6 @@ Linux有问必答--如果修复Google Chrome 的 ‘Your profile could not be op via: http://ask.xmodulo.com/your-profile-could-not-be-opened-correctly-google-chrome.html 译者:[VicYu/Vic020](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d27fb2ce44e1dc30ec4ce87b0dd7efa191bb319b Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 25 Feb 2015 16:08:41 +0800 Subject: [PATCH 0105/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...our profile could not be opened correctly' on Google Chrome.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md (100%) diff --git a/translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md b/published/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md similarity index 100% rename from translated/tech/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md rename to published/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md From e8c24536a2f69179afa5ddf1c675ad218a4f9481 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 25 Feb 2015 16:31:26 +0800 Subject: [PATCH 0106/2517] =?UTF-8?q?20150225-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...h Answers--How to disable IPv6 on Linux.md | 148 ++++++++++++++++++ ....h--No such file or directory' on Linux.md | 97 ++++++++++++ ...to install a USB webcam in Raspberry Pi.md | 63 ++++++++ ... full kernel source on Debian or Ubuntu.md | 58 +++++++ 4 files changed, 366 insertions(+) create mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md create mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md create mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md create mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md new file mode 100644 index 0000000000..c6f0cde895 --- /dev/null +++ b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -0,0 +1,148 @@ +Linux FAQs with Answers--How to disable IPv6 on Linux +================================================================================ +> **Question**: I notice that one of my applications is trying to establish a connection over IPv6. But since our local network is not able to route IPv6 traffic, the IPv6 connection times out, and the application falls back to IPv4, which causes unnecessary delay. As I don't have any need for IPv6 at the moment, I would like to disable IPv6 on my Linux box. What is a proper way to turn off IPv6 on Linux? + +IPv6 has been introduced as a replacement of IPv4, the traditional 32-bit address space used in the Internet, to solve the imminent exhaustion of available IPv4 address space. However, since IPv4 has been used by every host or device connected to the Internet, it is practically impossible to switch every one of them to IPv6 overnight. Numerous IPv4 to IPv6 transition mechanisms (e.g., dual IP stack, tunneling, proxying) have been proposed to facilitate the adoption of IPv6, and many applications are being rewritten, as we speak, to add support for IPv6. One thing for sure is that IPv4 and IPv6 will inevitably coexist for the forseeable future. + +Ideally the [ongoing IPv6 transition process][1] should not be visible to end users, but the mixed IPv4/IPv6 environment might sometimes cause you to encounter various hiccups originating from unintended interaction between IPv4 and IPv6. For example, you may experience timeouts from applications such as apt-get or ssh trying to unsuccessfully connecting via IPv6, DNS server accidentally dropping AAAA DNS records for IPv6, or your IPv6-capable device not compatible with your ISP's legacy IPv4 network, etc. + +Of course this doesn't mean that you should blindly disable IPv6 on you Linux box. With all the benefits promised by IPv6, we as a society want to fully embrace it eventually, but as part of troubleshooting process for end-user experienced hiccups, you may try turning off IPv6 to see if indeed IPv6 is a culprit. + +Here are a few techniques allowing you to disable IPv6 partially (e.g., for a certain network interface) or completely on Linux. These tips should be applicable to all major Linux distributions including Ubuntu, Debian, Linux Mint, CentOS, Fedora, RHEL, and Arch Linux. + +### Check if IPv6 is Enabled on Linux ### + +All modern Linux distributions have IPv6 automatically enabled by default. To see IPv6 is activated on your Linux, use ifconfig or ip commands. If you see "inet6" in the output of these commands, this means your Linux has IPv6 enabled. + + $ ifconfig + +![](https://farm8.staticflickr.com/7282/16415082398_5fb0920506_b.jpg) + + $ ip addr + +![](https://farm8.staticflickr.com/7290/16415082248_c4e075548b_c.jpg) + +### Disable IPv6 Temporarily ### + +If you want to turn off IPv6 temporarily on your Linux system, you can use /proc file system. By "temporarily", we mean that the change we make to disable IPv6 will not be preserved across reboots. IPv6 will be enabled back again after you reboot your Linux box. + +To disable IPv6 for a particular network interface, use the following command. + + $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf//disable_ipv6' + +For example, to disable IPv6 for eth0 interface: + + $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/eth0/disable_ipv6' + +![](https://farm8.staticflickr.com/7288/15982511863_0c1feafe7f_b.jpg) + +To enable IPv6 back on eth0 interface: + + $ sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/eth0/disable_ipv6' + +If you want to disable IPv6 system-wide for all interfaces including loopback interface, use this command: + + $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' + +### Disable IPv6 Permanently across Reboots ### + +The above method does not permanently disable IPv6 across reboots. IPv6 will be activated again once you reboot your system. If you want to turn off IPv6 for good, there are several ways you can do it. + +#### Method One #### + +The first method is to apply the above /proc changes persistently in /etc/sysctl.conf file. + +That is, open /etc/sysctl.conf with a text editor, and add the following lines. + + # to disable IPv6 on all interfaces system wide + net.ipv6.conf.all.disable_ipv6 = 1 + + # to disable IPv6 on a specific interface (e.g., eth0, lo) + net.ipv6.conf.lo.disable_ipv6 = 1 + net.ipv6.conf.eth0.disable_ipv6 = 1 + +To activate these changes in /etc/sysctl.conf, run: + + $ sudo sysctl -p /etc/sysctl.conf + +or simply reboot. + +#### Method Two #### + +An alternative way to disable IPv6 permanently is to pass a necessary kernel parameter via GRUB/GRUB2 during boot time. + +Open /etc/default/grub with a text editor, and add "ipv6.disable=1" to GRUB_CMDLINE_LINUX variable. + + $ sudo vi /etc/default/grub + +---------- + + GRUB_CMDLINE_LINUX="xxxxx ipv6.disable=1" + +In the above, "xxxxx" denotes any existing kernel parameter(s). Add "ipv6.disable=1" after them. + +![](https://farm8.staticflickr.com/7286/15982512103_ec5d940e58_b.jpg) + +Finally, don't forget to apply the modified GRUB/GRUB2 settings by running: + +On Debian, Ubuntu or Linux Mint: + + $ sudo update-grub + +On Fedora, CentOS/RHEL: + + $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg + +Now IPv6 will be completely disabled once you reboot your Linux system. + +### Other Optional Steps after Disabling IPv6 ### + +Here are a few optional steps you can consider after disabling IPv6. This is because while you disable IPv6 in the kernel, other programs may still try to use IPv6. In most cases, such application behaviors will not break things, but you want to disable IPv6 for them for efficiency or safety reason. + +#### /etc/hosts #### + +Depending on your setup, /etc/hosts may contain one or more IPv6 hosts and their addresses. Open /etc/hosts with a text editor, and comment out all lines which contain IPv6 hosts. + + $ sudo vi /etc/hosts + +---------- + + # comment these IPv6 hosts + # ::1 ip6-localhost ip6-loopback + # fe00::0 ip6-localnet + # ff00::0 ip6-mcastprefix + # ff02::1 ip6-allnodes + # ff02::2 ip6-allrouters + +#### Network Manager #### + +If you are using NetworkManager to manage your network settings, you can disable IPv6 on NetworkManager as follows. Open the wired connection on NetworkManager, click on "IPv6 Settings" tab, and choose "Ignore" in "Method" field. Save the change and exit. + +![](https://farm8.staticflickr.com/7293/16394993017_21917f027b_o.png) + +#### SSH server #### + +By default, OpenSSH server (sshd) tries to bind on both IPv4 and IPv6 addresses. + +To force sshd to bind only on IPv4 address, open /etc/ssh/sshd_config with a text editor, and add the following line. inet is for IPv4 only, and inet6 is for IPv6 only. + + $ sudo vi /etc/ssh/sshd_config + +---------- + + AddressFamily inet + +and restart sshd server. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/disable-ipv6-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://www.google.com/intl/en/ipv6/statistics.html \ No newline at end of file diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md new file mode 100644 index 0000000000..8a2ae9cdcc --- /dev/null +++ b/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md @@ -0,0 +1,97 @@ +Linux FAQs with Answers--How to fix “fatal error: lame/lame.h: No such file or directory” on Linux +================================================================================ +> **Question**: I am trying to compile video encoder software on Linux, but the compilation fails with a message saying "fatal error: lame/lame.h: No such file or directory." How can I fix this error? + +The following compilation error suggests that your Linux system does not have LAME library and its development files installed. + + fatal error: lame/lame.h: No such file or directory + +[LAME][1] (short for "LAME Ain't an MP3 Encoder") is a popular MP3 encoding codec licensed with LGPL. Many video encoding/ripping tools use or support LAME. Among them are [FFmpeg][2], VLC, [Audacity][3], K3b, RipperX, and many more. + +To fix the compilation error, you need to install LAME library and its development files, as shown in the following. + +### Install LAME Library and its Development Files on Debian, Ubuntu or Linux Mint ### + +Debian and its derivative systems offer LAME library in their base repositories, so it is easy to install LAME with apt-get. + + $ sudo apt-get install libmp3lame-dev + +### Install LAME Library and its Development Files on Fedora, CentOS/RHEL ### + +On Red Hat based distributions, the LAME encoder library is available via the RPM Fusion's free repository. Thus you first need to set up [RPM Fusion (free) repository][4] before proceeding. + +Once RPM Fusion is set up, install LAME development files as follows. + + $ sudo yum --enablerepo=rpmfusion-free-updates install lame-devel + +As of February, 2015, RPM Fusion repository is not yet available for CentOS/RHEL 7. So this method will not be applicable on CentOS/RHEL 7. In that case, you can install LAME library by building it from the source (which is described below). + +### Compile LAME Library from the Source on Debian, Ubuntu or Linux Mint ### + +If you want to install customized LAME library with different compilation options, you need to build it yourself. Here is how you can compile and install LAME library (along with its header files) on your Debian-based system. + + $ sudo apt-get install gcc git + $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz + $ tar -xzf lame-3.99.5.tar.gz + $ cd lame-3.99.5 + $ ./configure --enable-static --enable-shared + $ make + $ sudo make install + +Note that when you run configure in the above steps, you can enable or disable various options based on your needs. Run the following command to see all available compilation options. + + $ ./configure --help + +The shared/static LAME libraries are installed in /usr/local/lib by default. To make the shared library accessible to other applications, complete this last step: + +Open /etc/ld.so.conf with your favorite text editor, and append the following line. + + /usr/local/lib + +and then run the command below. This will add shared libraries in /usr/local/lib to the dynamic loader cache, thereby making shared LAME library accessible to other applications. + + $ sudo ldconfig + +### Compile LAME Library from the Source on Fedora or CentOS/RHEL ### + +If your distribution (e.g., CentOS 7) does not offer a pre-built LAME library package, or you want to customize LAME library in any way, you need to build it from the source yourself. Here is how to compile and install LAME library and its development files on a Red Hat based system. + + $ sudo yum install gcc git + $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz + $ tar -xzf lame-3.99.5.tar.gz + $ cd lame-3.99.5 + $ ./configure --enable-static --enable-shared + $ make + $ sudo make install + +Before running make, feel free to customize compilation options by running configure with appropriate options. You can check available options with: + + $ ./configure --help + +Finally, you need to complete the last step because the shared LAME library installed in /usr/local/lib may not be visible to other applications. + +Append the following line in /etc/ld.so.conf: + + /usr/local/lib + +and then run the command below. This will add shared libraries (including LAME) in /usr/local/lib to the dynamic loader cache, making them visible to other applications. + + $ sudo ldconfig + +![](https://farm8.staticflickr.com/7340/16534478445_abc97cb65a_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/fatal-error-lame-no-such-file-or-directory.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://lame.sourceforge.net/ +[2]:http://ask.xmodulo.com/compile-ffmpeg-ubuntu-debian.html +[3]:http://xmodulo.com/how-to-cut-split-or-edit-mp3-file-on-linux.html +[4]:http://xmodulo.com/how-to-install-rpm-fusion-on-fedora.html \ No newline at end of file diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md new file mode 100644 index 0000000000..443c9c0ad8 --- /dev/null +++ b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md @@ -0,0 +1,63 @@ +Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi +================================================================================ +> **Question**: Can I use a standard USB-based webcam on Raspberry Pi? How can I check if my USB webcam is compatible with Raspberry Pi, and how can I install it on Raspberry Pi? + +If you want to take pictures or record videos using Raspberry Pi board, you can install [Raspberry Pi camera board][1]. If you do not want to shell out money just for the camera board module, there is yet another way, which is to utilize a commonly found [USB web camera][2]. You may already have one for your PC. + +In this tutorial, we show how to set up a USB web camera on Raspberry Pi board. We assume that you are using Raspbian operation system. + +Before we start, it is better to check if your USB web camera is [one of those][3] which are known to be compatible with Raspberry Pi. If your USB webcam is not found in the compatibility list, don't be discouraged, as there is still a chance that your USB web camera may be detected by Raspberry Pi. + +### Check if a USB Webcam is Compatible with Raspberry Pi ### + +To check whether your USB web camera is detected on Raspberry Pi or not, plug it into the USB port of your Raspberry Pi, and type lsusb command in the terminal. + + $ lsusb + +If the output of the command does not list your webcam, there is a possibility that this is because your Raspberry Pi doesn't supply enough power needed for your USB web camera. In this case, you can try using a separate power line for the USB web camera, such as [USB power hub][4], and then repeat the lsusb command. If the USB webcam is still not recognized, we can only suggest you buy another USB web camera which is supported by Raspberry Pi. + +![](https://farm8.staticflickr.com/7408/16576646025_898f17f36e_o.png) + +In the above screenshot, the USB web camera is detected as "1e4e:0102", but it doesn't show the maker or the name of the web camera. When we try it with Fedora 20 in a laptop, it is successfully detected as "1e4e:0102 Cubeternet GL-UPC822 UVC WebCam." + +Another way to check if your USB web camera is supported by Raspberry Pi is by checking the /dev directory. If there is /dev/video0, this implies that your USB webcam is recognized by Raspberry Pi. + +### Take a Picture with USB Webcam ### + +After your USB webcam is successfully hooked up with Raspberry Pi, the next thing to do is to take some pictures to verify its functionality. + +For this, you can install fswebcam, which is a small webcam application. You can install fswebcam directly from the Raspbian repository as follows. + + $ sudo apt-get install fswebcam + +Once fswebcam is installed, run the following command in a terminal to capture a picture from the USB webcam: + + $ fswebcam --no-banner -r 640x480 image.jpg + +This command will capture a picture with 640x480 resolution, and save it as image.jpg. It will not put any banner in the bottom part of the picture. + +![](https://farm8.staticflickr.com/7417/16576645965_302046d230_o.png) + +Here is the result from the fswebcam command with 640x480 resolution. + +![](https://farm8.staticflickr.com/7345/16575497512_8d77f1b34c_o.jpg) + +The next example picture is captured without defining the resolution. The picture color is blueish, and the default resolution is only 358x288. + +![](https://farm8.staticflickr.com/7390/15954067124_760fbcdd9c_o.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-usb-webcam-raspberry-pi.html + +作者:[Kristophorus Hadiono][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/kristophorus +[1]:http://xmodulo.com/install-raspberry-pi-camera-board.html +[2]:http://xmodulo.com/go/usb_webcam +[3]:http://elinux.org/RPi_USB_Webcams +[4]:http://xmodulo.com/go/usb_powerhub \ No newline at end of file diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md new file mode 100644 index 0000000000..fdab7af325 --- /dev/null +++ b/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md @@ -0,0 +1,58 @@ +Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu +================================================================================ +> **Question**: I need to download and install a full kernel source tree to compile a custom kernel for my Debian or Ubuntu system. What is a proper way to download full kernel source on Debian or Ubuntu? + +Before installing full kernel source on your Linux system, ask yourself whether you really need the full kernel source. If you are trying to compile a kernel module or a custom driver for your kernel, you do not need the full kernel source. You only need to install [matching kernel header files][1], and that's it. + +You need the full kernel source tree only if you want to build a custom kernel after modifying the kernel code in any way and/or tweaking default kernel options. + +Here is how to **download and install full kernel source tree from Debian or Ubuntu repositories**. While you can download the official kernel source code from [https://www.kernel.org/pub/linux/kernel/][2], using distro's repositories allows you to download a kernel source with the maintainer's patches applied to it. + +### Install Full Kernel Source on Debian ### + +Before downloading kernel source, install dpkg-dev, which contains a suite of development tools needed to build Debian source packages. Among other things, dpkg-dev contains dpgk-source tool which can extract a Debian source package and automatically apply patches. + + $ sudo apt-get install dpkg-dev + +Next, run the following command to download full kernel source. + + $ apt-get source linux-image-$(uname -r) + +Along with the full kernel source (linux_X.X.XX.orig.tar.xz), any available kernel patches (linux_X.X.X+XXX.debian.tar.xz) and source control file (linux_XXXX.dsc) will also be downloaded and stored in the current directory. The .dsc file instructs how the patches are applied to the kernel sources. + +Upon the completion of download, the above command will automatically invoke dpkg-source tool, which will unpack the downloaded kernel source in the current directory, and apply downloaded patches according to .dsc file. + +The final full kernel source tree will be available in the current directory as "linux-X.X.XX". + +![](https://farm9.staticflickr.com/8676/16341110300_b4f059eeb0_b.jpg) + +### Install Full Kernel Source on Ubuntu ### + +If you want to install full kernel source, the Debian way described above should work on Ubuntu as well. + +There is another way to download full kernel source on Ubuntu. You can actually check out the kernel source tree maintained by Canonical for different Ubuntu releases. + +$ sudo apt-get install git +$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-$(lsb_release --codename | cut -f2).git + +For example, if you are using Ubuntu 14.04, the above command will check out code from "ubuntu-trusty" Git repository. + +![](https://farm9.staticflickr.com/8642/16526856391_de636ff9b8_c.jpg) + +Once you check out the Git repository, use the following command to install necessary development packages to meet the build dependencies for the kernel source tree. + + $ sudo apt-get build-dep linux-image-$(uname -r) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-full-kernel-source-debian-ubuntu.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/install-kernel-headers-linux.html +[2]:https://www.kernel.org/pub/linux/kernel/ \ No newline at end of file From 60fe04463754f2bbfc9c768244f891fb089a663b Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 25 Feb 2015 17:41:18 +0800 Subject: [PATCH 0107/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... And Persistent Xubuntu Linux USB Drive.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md b/translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md index 8025e91aa1..df7266a7a1 100644 --- a/translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md +++ b/translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md @@ -1,4 +1,4 @@ -3种创建轻量、持久化的Xubuntu Linux USB系统盘的方法 +3种方法来创建轻量、持久化的Xubuntu Linux USB系统盘 ================================================================================ ### 使用Universal USB Install创建持久化USB Xubuntu系统盘 ### @@ -9,13 +9,13 @@ > 译者注:持久化Linux USB系统盘(Persistent Linux USB drive),安装在优盘的Linux系统,允许用户保存数据到优盘而不是仅仅将这些修改留在内存中。这些数据可以在重启后恢复并且重新使用,甚至是在其他的机器上面启动也没有关系。一般情况下,持久化系统盘会安装一个压缩过的Linux操作系统。 -为什么你需要做这些事情呢,这里有5个很好的理由: +为什么要这样做呢,这里有5个很好的理由: -1. 你想要在你的电脑上安装一个轻量的并且功能完善的Linux版本。 +1. 你想要在你的电脑上安装一个轻量并且功能完善的Linux版本。 2. 你的电脑没有硬盘,那么一个Linux USB系统盘就可以让这台电脑摆脱被扔到垃圾堆的命运。 3. 你想体验一下Linux,但是你却不想花太多的时间去准备。 4. 你想创建一个USB系统恢复盘,并且在优盘上安装一些特定的应用程序。 -5. 你想要一个可以装在屁股口袋或者可以挂在钥匙圈上面的可定制的Linux版本。 +5. 你想要一个可定制的Linux版本,能装在后兜或者挂在钥匙圈上。 现在,我们有了充足的理由,那么开始做一些准备工作吧。 @@ -51,7 +51,7 @@ 14.04版是一个长期维护的版本,维护周期会持续3年。14.10是最新版本,但是只提供9个月的维护。 -你选择了下载站点以后,会提示你选择32位版本或者64位版本。如果你的电脑是32位,就选32位版本,同样,如果你的电脑是64位选64位版本就行了。 +你选择了下载站点以后,会提示你选择32位版本或者64位版本。如果你的电脑是32位,就选32位版本,同样,如果你的电脑是64位,那就选64位版本。 [点击这里,有一个教程来教你辨别你的电脑是32位还是64位][5]。 @@ -105,7 +105,7 @@ Universal USB Installer主界面出现以后,从下拉列表中选择你想要 Startup Disk Creator使用起来很简单。 -界面被划分成两个部分。在上面部分指定下载的系统盘路径,在下面指定安装的优盘。 +界面被划分成两个部分。上部分指定下载的系统盘路径,下部分指定安装的优盘。 首先,点击“Other”按钮,第二步,选择你所下载的Xubuntu ISO文件。 @@ -119,7 +119,7 @@ Startup Disk Creator使用起来很简单。 你创建的过程中,你可能需要输入几次你的系统密码,USB系统盘创建完成以后,你就可以使用它启动到Xubuntu了。 -### 使用UNetbootin创建持久化Xubuntu系统盘 ### +### 使用UNetbootin创建持久化的Xubuntu系统盘 ### ![](http://f.tqn.com/y/linux/1/S/I/J/1/unetbootin1.png) @@ -127,7 +127,7 @@ Startup Disk Creator使用起来很简单。 个人来说,在Windows系统上面我喜欢用Universal USB Installer,但Linux的话,UNetbootin更合适一些。 -> 注:UNetbootin并不是100%完美的,它并不支持所有的Linux发行版。 +> 注:UNetbootin并不是100%完美的,不是所有的Linux发行版都支持。 Windows平台可以点击[这里][8]下载UNetbootin。 @@ -141,11 +141,11 @@ Linux平台可以使用package manager安装UNetbootin。 > sudo unetbootin -UNetbootin的界面分为两个部分。你可以在上面的部分选择一个Linux发行版,然后下载它,如果已经下载了某个发行版,可以在下半部分选择已经下载的系统盘。 +UNetbootin的界面分为两个部分。你可以在上半部分选择一个Linux发行版,然后下载它,如果已经下载了某个发行版,可以在下半部分选择已经下载的系统盘。 点击“Diskimage”单选框,然后点击三个点的按钮。找到已经下载的Xubuntu ISO文件。路径会显示到按钮旁边的文本框里面。 -修改“Space used to preserve files across reboots”的值,来指定你想要用来存储“持久化”数据的空间大小。 +设置“Space used to preserve files across reboots”的值,来指定你想要用来存储“持久化”数据的空间大小。 类型选择USB drive,然后选择优盘的盘符。 @@ -159,7 +159,7 @@ via : http://linux.about.com/od/howtos/ss/How-To-Create-A-Persistent-Bootable-Xu 作者:[Gary Newell][a] 译者:[zhouj-sh](https://github.com/Zhouj-sh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -171,4 +171,4 @@ via : http://linux.about.com/od/howtos/ss/How-To-Create-A-Persistent-Bootable-Xu [5]:http://pcsupport.about.com/od/fixtheproblem/f/32-bit-64-bit-windows.htm [6]:http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ [7]:http://linux.about.com/od/howtos/fl/Learn-Ubuntu-The-Unity-Dash.htm -[8]:http://linux.about.com/od/howtos/ss/How-To-Create-A-UEFI-Bootable-Ubuntu-USB-Drive-Using-Windows.htm \ No newline at end of file +[8]:http://linux.about.com/od/howtos/ss/How-To-Create-A-UEFI-Bootable-Ubuntu-USB-Drive-Using-Windows.htm From 3438c76734e75297dda40151723eb4c7f78d7c2c Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 26 Feb 2015 03:49:20 +0800 Subject: [PATCH 0108/2517] Update 20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md --- ...--How to install full kernel source on Debian or Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md index fdab7af325..65b3a08c48 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md @@ -1,3 +1,5 @@ +translating by martin. + Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu ================================================================================ > **Question**: I need to download and install a full kernel source tree to compile a custom kernel for my Debian or Ubuntu system. What is a proper way to download full kernel source on Debian or Ubuntu? @@ -55,4 +57,4 @@ via: http://ask.xmodulo.com/install-full-kernel-source-debian-ubuntu.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://ask.xmodulo.com/install-kernel-headers-linux.html -[2]:https://www.kernel.org/pub/linux/kernel/ \ No newline at end of file +[2]:https://www.kernel.org/pub/linux/kernel/ From cd55dcb403f32cc6bb90d5fb09f865d2f042c257 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 26 Feb 2015 10:10:39 +0800 Subject: [PATCH 0109/2517] PUB:20140821 What is a good EPUB reader on Linux @shipsw --- ...140821 What is a good EPUB reader on Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/share => published}/20140821 What is a good EPUB reader on Linux.md (65%) diff --git a/translated/share/20140821 What is a good EPUB reader on Linux.md b/published/20140821 What is a good EPUB reader on Linux.md similarity index 65% rename from translated/share/20140821 What is a good EPUB reader on Linux.md rename to published/20140821 What is a good EPUB reader on Linux.md index 2b919ee6bb..7c3c4ea287 100644 --- a/translated/share/20140821 What is a good EPUB reader on Linux.md +++ b/published/20140821 What is a good EPUB reader on Linux.md @@ -1,25 +1,25 @@ Linux版EPUB阅读器 ================================================================================ -如果说用平板电脑看书尚属主流的话,那么在电脑上读书就非常少见了。专注阅读16世纪的书是非常困难的了,没人希望后台蹦出Facebook聊天窗口。但是如果你非要在电脑上打开电子书的话,那么你需要一个电子书阅读软件。大多数编辑支持使用EPUB格式来存放电子书(电子出版物)。幸运的书,linux上从不缺乏此类软件。以下书一些Linux上比较好的EPUB阅读软件。 +如果说用平板电脑看书尚属主流的话,那么在电脑上读书就非常少见了。专注阅读16世纪的书是非常困难的了,没人希望后台蹦出QQ聊天窗口。但是如果你非要在电脑上打开电子书的话,那么你需要一个电子书阅读软件。大多数出版物支持使用EPUB格式的电子书(电子出版物)。幸运的是,linux上从不缺乏EPUB阅读器类的软件。以下是一些Linux上不错的EPUB阅读软件。 ### 1. Calibre ### ![](https://farm6.staticflickr.com/5577/14975176155_0989766bb3_z.jpg) -先从列表中最有名的软件开始: [Calibre][1]。Calibre 不仅仅是个阅读器,他还是个电子图书馆。软件支持几乎所有的格式,集成了阅读器,管理器,一个可以从互联网下载书籍封面的元数据编辑器,一个EPUB编辑器,新闻阅读器和一个用来下载电子书的搜索引擎。可喜的是,界面丝毫不逊色专业的阅读软件。唯一的缺点书如果你只想要一个EPUB阅读器的话,这个软件还是太大了。 +先从列表中最有名的软件开始: [Calibre][1]。Calibre 不仅仅是个阅读器,它还是个电子图书馆。软件支持几乎所有的格式,集成了阅读器、管理器、一个可以从互联网下载书籍封面的元数据编辑器、一个EPUB编辑器、新闻阅读器和一个用来下载电子书的搜索引擎。可喜的是,界面丝毫不逊色专业的阅读软件。唯一的缺点是如果你只想要一个EPUB阅读器的话,这个软件还是太大了。 ### 2. FBReader ### ![](https://farm4.staticflickr.com/3900/14975176165_f2e4afd2fa_o.jpg) -[FBReader][2] 也是一个图书馆管理软件,但是比Calibre小。界面简洁分为两个部分:左边书文件管理、元数据编辑、和下载新书等功能;右边书阅读区。如果你喜欢简洁,这个软件挺不错。我个人非常喜欢这类直观标记书籍和分类的做法。 +[FBReader][2] 也是一个图书馆管理软件,但是比Calibre小。界面简洁分为两个部分:左边是文件管理、元数据编辑和下载新书等功能;右边是阅读区。如果你喜欢简洁,这个软件挺不错。我个人非常喜欢这类直观标记书籍和分类的做法。 ### 3. Cool Reader ### ![](https://farm6.staticflickr.com/5594/14975176195_ac46952150.jpg) -对于那些只想想看EPUB书内容的用户,我推荐 [Cool Reader][5]。遵循Linux应用程序的规则,Cool Reader 做了优化,每次只打开一个EPUB文件,可以使用简单的快捷键进行阅读和导航。由于程序书基于Qt开发的,所以他也遵循Qt的规则,需要大量的设置项。 +对于那些只想想看EPUB书内容的用户,我推荐 [Cool Reader][5]。遵循Linux应用程序的文化,Cool Reader 做了优化,每次只打开一个EPUB文件,可以使用简单的快捷键进行阅读和导航。由于程序书基于Qt开发的,所以他也遵循Qt的风格,需要大量的设置项。 ### 4. Okular ### @@ -31,19 +31,19 @@ Linux版EPUB阅读器 ![](https://farm4.staticflickr.com/3835/14788504789_e7c742fa20_z.jpg) -[pPub][4]是个老项目,Github上可以找到这个项目,他最后的更新已经是在两年前了。尽管如此,这个软件还是值得使用的,pPub是用Python编写的,基于GTK3和WebKit,是个简单轻量的软件。界面可能需要一些更新,不够简洁,但是内部却非常好。软件支持JavaScript。所以,谁来捡起这个项目呢? +[pPub][4]是个老项目,Github上可以找到这个项目,它最后的更新已经是在两年前了。尽管如此,这个软件还是值得使用的,pPub是用Python编写的,基于GTK3和WebKit,是个简单轻量的软件。界面可能需要一些更新,不够简洁,但是内部却非常好。软件支持JavaScript。所以,谁来捡起这个项目呢? ### 6. epub ### ![](https://farm4.staticflickr.com/3871/14788844378_16fb51a1b9_z.jpg) -如果你只是想快速简单的查看EPUB文件的内容,不关心任何图形化界面功能的话,最好使用命令行模式打开EPUB。[epub][6] 是一个用Python编写的阅读器,可以在终端环境读取EPUB文件的内容。软件可以在章节、页面见切换,没有其他的功能。这是最简洁的EPUB阅读器了。 +如果你只是想快速简单的查看EPUB文件的内容,不关心任何图形化界面功能的话,最好使用命令行模式打开EPUB。[epub][6] 是一个用Python编写的阅读器,可以在终端环境读取EPUB文件的内容。软件可以在章节、页面间切换,没有其他的功能。这是最简洁的EPUB阅读器了。 ### 7. Sigil ### ![](https://farm4.staticflickr.com/3921/14788640417_7940627871_z.jpg) -最后介绍的这个实际上不是个EPUB阅读器,应该是个独立的编辑器。[Sigil][7] 可以提取EPUB文件的内容并转换成其他格式:xhtml文本,图像,格式,还有其他的内容,比如音频等。界面比基本的阅读器复杂,但是功能还是比较丰富的。我很喜欢他的标签体系,如果你对网页比较熟悉的话,这个软件书很好使用的。 +最后介绍的这个实际上不是个EPUB阅读器,应该是个独立的编辑器。[Sigil][7] 可以提取EPUB文件的内容并将其分离成其他格式:xhtml文本、图像、css,及其他的内容比如音频等。界面比基本的阅读器复杂,但是功能还是比较丰富的。我很喜它的标签体系,如果你对网页比较熟悉的话,这个软件是很好使用的。 总结,有很多的开源的EPUB阅读器,有一些只有最基本的功能, 另外一些功能却太多了。一般来说,我建议你选择一个最合适的使用。如果你有更好的EPUB阅读器,请在评论里告诉我们! @@ -53,7 +53,7 @@ via: http://xmodulo.com/2014/08/good-epub-reader-linux.html 作者:[Adrien Brochard][a] 译者:[shipsw](https://github.com/shipsw) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 96d2a1f51ce516d0d2789398a1ba4de0305facfc Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 26 Feb 2015 10:22:32 +0800 Subject: [PATCH 0110/2517] translating --- ...or--lame or lame.h--No such file or directory' on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md index 8a2ae9cdcc..0ee6b607c8 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md @@ -1,3 +1,5 @@ +Translating----geekpi + Linux FAQs with Answers--How to fix “fatal error: lame/lame.h: No such file or directory” on Linux ================================================================================ > **Question**: I am trying to compile video encoder software on Linux, but the compilation fails with a message saying "fatal error: lame/lame.h: No such file or directory." How can I fix this error? @@ -94,4 +96,4 @@ via: http://ask.xmodulo.com/fatal-error-lame-no-such-file-or-directory.html [1]:http://lame.sourceforge.net/ [2]:http://ask.xmodulo.com/compile-ffmpeg-ubuntu-debian.html [3]:http://xmodulo.com/how-to-cut-split-or-edit-mp3-file-on-linux.html -[4]:http://xmodulo.com/how-to-install-rpm-fusion-on-fedora.html \ No newline at end of file +[4]:http://xmodulo.com/how-to-install-rpm-fusion-on-fedora.html From 73d713daa9214e4665973c813b2010f8b299e64c Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 26 Feb 2015 10:32:51 +0800 Subject: [PATCH 0111/2517] PUB:20150209 Non-Linux FOSS--Homebrew @geekpi --- .../20150209 Non-Linux FOSS--Homebrew.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/share => published}/20150209 Non-Linux FOSS--Homebrew.md (71%) diff --git a/translated/share/20150209 Non-Linux FOSS--Homebrew.md b/published/20150209 Non-Linux FOSS--Homebrew.md similarity index 71% rename from translated/share/20150209 Non-Linux FOSS--Homebrew.md rename to published/20150209 Non-Linux FOSS--Homebrew.md index a6f30ec50e..d132d55555 100644 --- a/translated/share/20150209 Non-Linux FOSS--Homebrew.md +++ b/published/20150209 Non-Linux FOSS--Homebrew.md @@ -1,14 +1,14 @@ -非Linux的免费开源软件:Homebrew +非Linux的自由开源软件:Homebrew ================================================================================ -我日常工作中使用的是OS X。我能容忍它很大程序上是因为它的终端。如果我不能在黑色背景绿色文字的终端下工作,我想我会疯了。不幸的是,OS Xmei没有我需要的全部命令行工具。Homebrew的到来拯救了这。 +我日常工作中使用的是OS X。我能容忍它很大程序上是因为它的终端。如果我不能在黑色背景绿色文字的终端下工作,我想我会疯了。不幸的是,OS X 没有我需要的全部命令行工具。Homebrew的到来拯救了我。 ![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11811fossf1.png) -Homebrew扮演了OS X中缺乏的包管理器的角色。命令的使用很像apt-get,它能够安装无数的应用。一个最好的例子是wget。我很惊讶OS X中没有包含wget,但是homebrew中有,这是最简单的一套了 +Homebrew扮演了OS X中所缺乏的包管理器的角色。命令的使用很像apt-get,它能够安装无数的应用。一个最好的例子是wget。我很惊讶OS X中没有包含wget,但是homebrew中有,很简单就安装上了。 最棒的是homebrew在/usr/local文件夹下安装软件。你不必担心homebrew会破坏你的系统,因为它不会访问/usr/local之外的其他文件。OSX系统更新不会覆盖你的程序,并且/usr/local/bin已经在PATH中,使用homebrew安装的程序可以直接工作。 -homebrew使用ruby管理它的包和功能,但是使用它不需要任何编程知识。并且安装过程只需要在命令行中复制粘贴就好了。如果你使用的是OS X,但是你希望像在Linux中那样方便地安装熬,就试一试homrbrew吧:[http://brew.sh][1]。 +homebrew使用ruby管理它的包和功能,但是使用它不需要任何编程知识。并且安装过程只需要在命令行中复制粘贴就好了。如果你使用的是OS X,但是你希望像在Linux中那样方便地安装,就试一试homrbrew吧:[http://brew.sh][1]。 -------------------------------------------------------------------------------- @@ -16,7 +16,7 @@ via: http://www.linuxjournal.com/content/non-linux-foss-homebrew 作者:[Shawn Powers][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 94a00e2594b7e49bd232f13ec8ec7a3ef7b81330 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 26 Feb 2015 10:53:05 +0800 Subject: [PATCH 0112/2517] translated --- ....h--No such file or directory' on Linux.md | 99 ------------------- ....h--No such file or directory' on Linux.md | 98 ++++++++++++++++++ 2 files changed, 98 insertions(+), 99 deletions(-) delete mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md create mode 100644 translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md deleted file mode 100644 index 0ee6b607c8..0000000000 --- a/sources/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md +++ /dev/null @@ -1,99 +0,0 @@ -Translating----geekpi - -Linux FAQs with Answers--How to fix “fatal error: lame/lame.h: No such file or directory” on Linux -================================================================================ -> **Question**: I am trying to compile video encoder software on Linux, but the compilation fails with a message saying "fatal error: lame/lame.h: No such file or directory." How can I fix this error? - -The following compilation error suggests that your Linux system does not have LAME library and its development files installed. - - fatal error: lame/lame.h: No such file or directory - -[LAME][1] (short for "LAME Ain't an MP3 Encoder") is a popular MP3 encoding codec licensed with LGPL. Many video encoding/ripping tools use or support LAME. Among them are [FFmpeg][2], VLC, [Audacity][3], K3b, RipperX, and many more. - -To fix the compilation error, you need to install LAME library and its development files, as shown in the following. - -### Install LAME Library and its Development Files on Debian, Ubuntu or Linux Mint ### - -Debian and its derivative systems offer LAME library in their base repositories, so it is easy to install LAME with apt-get. - - $ sudo apt-get install libmp3lame-dev - -### Install LAME Library and its Development Files on Fedora, CentOS/RHEL ### - -On Red Hat based distributions, the LAME encoder library is available via the RPM Fusion's free repository. Thus you first need to set up [RPM Fusion (free) repository][4] before proceeding. - -Once RPM Fusion is set up, install LAME development files as follows. - - $ sudo yum --enablerepo=rpmfusion-free-updates install lame-devel - -As of February, 2015, RPM Fusion repository is not yet available for CentOS/RHEL 7. So this method will not be applicable on CentOS/RHEL 7. In that case, you can install LAME library by building it from the source (which is described below). - -### Compile LAME Library from the Source on Debian, Ubuntu or Linux Mint ### - -If you want to install customized LAME library with different compilation options, you need to build it yourself. Here is how you can compile and install LAME library (along with its header files) on your Debian-based system. - - $ sudo apt-get install gcc git - $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz - $ tar -xzf lame-3.99.5.tar.gz - $ cd lame-3.99.5 - $ ./configure --enable-static --enable-shared - $ make - $ sudo make install - -Note that when you run configure in the above steps, you can enable or disable various options based on your needs. Run the following command to see all available compilation options. - - $ ./configure --help - -The shared/static LAME libraries are installed in /usr/local/lib by default. To make the shared library accessible to other applications, complete this last step: - -Open /etc/ld.so.conf with your favorite text editor, and append the following line. - - /usr/local/lib - -and then run the command below. This will add shared libraries in /usr/local/lib to the dynamic loader cache, thereby making shared LAME library accessible to other applications. - - $ sudo ldconfig - -### Compile LAME Library from the Source on Fedora or CentOS/RHEL ### - -If your distribution (e.g., CentOS 7) does not offer a pre-built LAME library package, or you want to customize LAME library in any way, you need to build it from the source yourself. Here is how to compile and install LAME library and its development files on a Red Hat based system. - - $ sudo yum install gcc git - $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz - $ tar -xzf lame-3.99.5.tar.gz - $ cd lame-3.99.5 - $ ./configure --enable-static --enable-shared - $ make - $ sudo make install - -Before running make, feel free to customize compilation options by running configure with appropriate options. You can check available options with: - - $ ./configure --help - -Finally, you need to complete the last step because the shared LAME library installed in /usr/local/lib may not be visible to other applications. - -Append the following line in /etc/ld.so.conf: - - /usr/local/lib - -and then run the command below. This will add shared libraries (including LAME) in /usr/local/lib to the dynamic loader cache, making them visible to other applications. - - $ sudo ldconfig - -![](https://farm8.staticflickr.com/7340/16534478445_abc97cb65a_c.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/fatal-error-lame-no-such-file-or-directory.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni -[1]:http://lame.sourceforge.net/ -[2]:http://ask.xmodulo.com/compile-ffmpeg-ubuntu-debian.html -[3]:http://xmodulo.com/how-to-cut-split-or-edit-mp3-file-on-linux.html -[4]:http://xmodulo.com/how-to-install-rpm-fusion-on-fedora.html diff --git a/translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md b/translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md new file mode 100644 index 0000000000..685e637072 --- /dev/null +++ b/translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md @@ -0,0 +1,98 @@ +Linux 有问必答:如何在Linux中修复“fatal error: lame/lame.h: No such file or directory” +================================================================================ +> **提问**: 我尝试着在Linux中编译视频编码器,但是编译提示出错:“fatal error: lame/lame.h: No such file or directory”, 我该如何修复这个错误? + +下面的编译错误说明你的系统没有安装LAME库和它的开发文件。 + + fatal error: lame/lame.h: No such file or directory + +[LAME][1]("LAME Ain't an MP3 Encoder")是一个流行的LPGL授权的MP3编码器。许多视频编码工具使用或者支持LAME。这其中有[FFmpeg][2]、 VLC、 [Audacity][3]、 K3b、 RipperX等。 + +要修复这个编译错误,你需要安装LAME库和开发文件,按照下面的来。 + +### 在Debian、Ubuntu或者Linux Mint上安装LAME库和安装文件 ### + +Debian和它的衍生版在基础库中已经提供了LAME库,因此可以用apt-get直接安装。 + + $ sudo apt-get install libmp3lame-dev + +### 在Fedora、CentOS/RHEL上安装LAME库和安装文件 ### + +在基于RED HAT的版本中,LAME在RPM Fusion的免费仓库中就有,那么你需要先设置[RPM Fusion (免费)仓库][4]。 + +RPM Fusion设置完成后,如下安装LAME开发文件。 + + $ sudo yum --enablerepo=rpmfusion-free-updates install lame-devel + +在2015年1月,RPM Fusion仓库已经不可以在CentOS/RHEL 7中可用了。因此,这个方法不能用在CentOS/RHEL 7 中。这时你就要从源码安装LAME库了(下面会描述)。 + +### 在Debian、Ubuntu或者Linux Mint中从源码编译LAME库 ### + +如果你希望用不同的编译选项安装自定义的LAME库,你需要自己编译。下面是怎样在基于Debian的系统中编译和安装LAME库(和它的头文件)。 + + $ sudo apt-get install gcc git + $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz + $ tar -xzf lame-3.99.5.tar.gz + $ cd lame-3.99.5 + $ ./configure --enable-static --enable-shared + $ make + $ sudo make install + +注意当你运行上面的配置步骤时,你可以根据你的需求启用会禁止不同的选项。运行下面的命令查看不同的编译选项。 + + $ ./configure --help + +共享/静态LAME默认安装在 /usr/local/lib。要让共享库可以被其他程序使用,完成最后一步: + +用编辑器打开 /etc/ld.so.conf,加入下面这行。 + + /usr/local/lib + +接着运行下面的命令,这会将/usr/local/lib中的共享库添加到动态加载缓存中,因此LAME库就可以被其他程序调用了。 + + $ sudo ldconfig + +### 在Fedora或者CentOS/RHEL中从源码编译LAME库 ### + +如果你的发行版(比如 CentOS 7)没有提供预编译的LAME库,或者你想要自定义LAME库,你需要从源码自己编译。下面是在基于Red Hat的系统中编译安装LAME库的方法。 + + + $ sudo yum install gcc git + $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz + $ tar -xzf lame-3.99.5.tar.gz + $ cd lame-3.99.5 + $ ./configure --enable-static --enable-shared + $ make + $ sudo make install + +运行make之前,你可以在configure中带上合适的选项自定义编译选项。你可以用下面的命令检查可用的选项: + + $ ./configure --help + +最后你需要完成最后一步,因为安装在/usr/local/lib的LAME共享库可能在其他程序中不可用。 + +在/etc/ld.so.conf中添加下面这行: + + /usr/local/lib + +接着运行下面的命令。这会添加 /usr/local/lib中的共享库(包括LAME)到动态加载缓存中,让其他程序可以访问到。 + + $ sudo ldconfig + +![](https://farm8.staticflickr.com/7340/16534478445_abc97cb65a_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/fatal-error-lame-no-such-file-or-directory.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://lame.sourceforge.net/ +[2]:http://ask.xmodulo.com/compile-ffmpeg-ubuntu-debian.html +[3]:http://xmodulo.com/how-to-cut-split-or-edit-mp3-file-on-linux.html +[4]:http://xmodulo.com/how-to-install-rpm-fusion-on-fedora.html From ceb65922fa430335b090705fa1013365267f6abd Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 26 Feb 2015 14:10:47 +0800 Subject: [PATCH 0113/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Create A Lightweight And Persistent Xubuntu Linux USB Drive.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md (100%) diff --git a/translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md b/published/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md similarity index 100% rename from translated/share/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md rename to published/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md From a42150d4d06c5081151b80581e6665e40e197e81 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 26 Feb 2015 15:50:01 +0800 Subject: [PATCH 0114/2517] Translating by ZTinoZ --- .../share/20150114 What is a good IDE for C or C++ on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md index 0434deb27c..475e75542d 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -18,7 +18,7 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm9.staticflickr.com/8573/16088461968_c6a6c9e49a_c.jpg) -牺牲了很多特色功能但是增加了很多灵活性,[Geany][6] is at the opposite of Eclipse. But what it lacks (like a debugger for example), Geany makes it up with nice little features: a space for note taking, creation from template, code outline, customizable shortcuts, and plugins management. Geany is still closer to an extensive text editor than an IDE here. However I keep it in the list for its lightness and its well designed interface. +牺牲了很多特色功能但是增加了很多灵活性,[Geany][6]就是这样一款与Eclipse对立的软件。但是对于它所缺乏的地方(比如说没有调试器), Geany用一些漂亮小巧的特色功能弥补了它们:一个可以做笔记的区域、模板a space for note taking, creation from template, code outline, customizable shortcuts, and plugins management. Geany is still closer to an extensive text editor than an IDE here. However I keep it in the list for its lightness and its well designed interface. ### 4. MonoDevelop ### From 42db52ade961c8f9ad60e9bc2886919d46ef4cb5 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 27 Feb 2015 19:26:37 +0800 Subject: [PATCH 0115/2517] =?UTF-8?q?20150227-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/20150227 Chess in a Few Bytes.md | 114 +++++ ...Bunch of Best Known Linux Network Tools.md | 444 ++++++++++++++++++ ...oid Apps on Ubuntu using ARChon Runtime.md | 114 +++++ ...diting is supported GRUB Error In Linux.md | 86 ++++ ...pdate cannot be used to add new CD-ROMs.md | 72 +++ ...eight Budgie v8 Desktop in Ubuntu 14.04.md | 98 ++++ 6 files changed, 928 insertions(+) create mode 100644 sources/share/20150227 Chess in a Few Bytes.md create mode 100644 sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md create mode 100644 sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md create mode 100644 sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md create mode 100644 sources/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md create mode 100644 sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md diff --git a/sources/share/20150227 Chess in a Few Bytes.md b/sources/share/20150227 Chess in a Few Bytes.md new file mode 100644 index 0000000000..26ef9d523d --- /dev/null +++ b/sources/share/20150227 Chess in a Few Bytes.md @@ -0,0 +1,114 @@ +Chess in a Few Bytes +================================================================================ +I am showing my age by mentioning that my introduction to computing was a ZX81, a home computer produced by a UK developer (Sinclair Research) which had a whopping 1KB of RAM. The 1KB is not a typographical error, the home computer really shipped with a mere 1KB of onboard memory. But this memory limitation did not prevent enthusiasts producing a huge variety of software. In fact the machine sparked a generation of programming wizards who were forced to get to grips with its workings. The machine was upgradable with a 16KB RAM pack which offered so many more coding possibilities. But the unexpanded 1KB machine still inspired programmers to release remarkable software. + +![1K ZX Chess ](http://www.linuxlinks.com/portal/content2/reviews/Games2/1KZXChess.jpg) + +My favourite ZX81 games were Flight Simulation, 3D Monster Maze, Galaxians, and above all 1K ZX Chess. Only the latter was written for the unexpanded ZX81. In fact, David Horne's 1K ZX Chess was coded in a mere 672 bytes of RAM. However, the game managed to implement most chess rules, and offer a computer opponent. While some important rules were omitted (castling, pawn promotion, and en passant capture), it was still amazing to be able to play against artificial intelligence. The game took up a fair chunk of my misspent youth. + +1K ZX Chess remained the smallest implementation of chess on any computer for 33 years until the record was broken by BootChess this year, and subsequently by Toledo AtomChess. These three games do not implement all of the chess rules, so for completeness I have included my favourite small implementation of chess that implements a complete set of chess rules. + +Linux has a good range of extremely strong chess engines such as Stockfish, Critter, Togo II, Crafty, GNU Chess, and Komodo. The chess engines featured in this article offer no match to a good chess engine, but they show how much can be achieved with a minuscule codebase. + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/ToledoAtomchess.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Toledo.png) + +You may have seen a considerable amount of press coverage about BootChess, a chess program written in 487 bytes of code, smashing the record of the then smallest chess program, 1K ZX Chess. Óscar Toledo Gutiérrez took up the mantle and decided to code an even more compact chess game. Toledo Atomchess is a mere 481 bytes of x86 assembly code which fits in a boot sector. The engine plays a reasonable game of chess given the limitations of its incredibly small codebase. + +Features include: + +- Basic chess movements +- ASCII text representation of chess board +- Moves are entered in algebraic form +- Search depth of 3-ply + +Obviously, to fit the chess of game into 481 bytes, the author had to make some sacrifices. These limitations include: + +- No promotion of pawns +- No castling +- No en passant +- No move validation + +The author has also written chess programs in C, JavaScript and Java; each are very small implementations of chess. + +- Website: [nanochess.org/chess6.html][1] +- Developer: Óscar Toledo Gutiérrez +- License: Free for non-commercial use +- Version Number: - + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/BootChess.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-BootChess.png) + +BootChess is an extremely small computer implementation of chess. The game is crammed into a mere 487 bytes and runs on Windows, Mac OS X and Linux operating systems. The board and pieces of BootChess are represented by text alone, with P representing pawns, Q used for the queens and full stops entered for empty squares. + +Features include: + +- Graphic text representation of chess board and use input +- Bootsector sized (512 bytes) with a playable chess game +- x86 bios hardware only bootstrap (no software dependencies) +- All main legal moves including double square pawn start +- Pawn promotion to queen (contrary to 1k ZX Chess) +- CPU artificial intelligence called taxiMax > minMax half-ply +- Hard-coded Spanish white pieces opening + +Again, there are some important limitations. Omissions include: + +- Under-promotion +- En passant pawn capture +- No castling +- 3-repetition rule +- 50 move draw rule +- No opening or closing books +- One or more minMax/negaMax full plies for artificial intelligence + +- Website: [www.pouet.net/prod.php?which=64962][2] +- Developer: Olivier "Baudsurfer/RSi" Poudade +- License: WTFPL v2 +- Version Number: .02 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/Micro-Max.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Micro-Max.png) + +Micro-Max is a 133-line chess source which is written in C + +The author has implemented a (hash) transposition table, the engine checks the legality of the input moves, and full FIDE rules except for for under-promotions. + +Features include: + +- Recursive negamax search +- Quiescence search with recaptures +- Recapture extensions +- Iterative deepening +- Best-move-first 'sorting' +- Hash table storing score and best move +- Full FIDE rules (except under promotion) and move-legality checking + +There is also a stripped-down 1433-character version, but allowing you to play under-promotions for full FIDE-rule compliance. + +- Website: [home.hccnet.nl/h.g.muller/max-src2.html][3] +- Developer: Harm Geert Muller +- License: The MIT License +- Version Number: 3.2 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150222033906262/ChessBytes.html + +作者:Frazer Kline +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://nanochess.org/chess6.html +[2]:http://www.pouet.net/prod.php?which=64962 +[3]:http://home.hccnet.nl/h.g.muller/max-src2.html \ No newline at end of file diff --git a/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md b/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md new file mode 100644 index 0000000000..207abb0530 --- /dev/null +++ b/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md @@ -0,0 +1,444 @@ +Bringing a Bunch of Best Known Linux Network Tools +================================================================================ +It is very useful to use command line tools to monitor the network on your system and there are a tons of them out there available for the linux user such as nethogs, ntopng, nload, iftop, iptraf, bmon, slurm, tcptrack, cbm, netwatch, collectl, trafshow, cacti, etherape, ipband, jnettop, netspeed and speedometer. + +Since there are many linux gurus and developers out there it is obvious that other network monitoring tools exist but I am not going to cover all of them in this tutorial. + +Each one of the above tools has its own specifics but at the end all they do is monitor network traffic and there is not really only one way to do the job. For example nethogs can be used to show bandwidth per process in case you want to know the application which is consuming your entire network resources, iftop can be used to show bandwidth per socket connection and tools like nload help to get information about the overall bandwidth. + +### 1) nethogs ### + +nethogs is a free tool that is very handy when it comes to find out which PID is causing the trouble with your network traffic as it groups bandwidth by process instead of breaking the traffic down per protocol or per subnet, like most tools do. It is feature rich, supports both IPv4 and IPv6 and in my opinion is the best utility when you want to identify programs that are consuming all your bandwidth on your linux machine. + +A linux user can use **nethogs** to show TCP download and upload-speed per process, monitor a specific device by using the command **nethogs eth0** where eth0 is the name of the device you want to get information from and also get information on the speed at which the data is currently being transferred. + +To me nethogs is very easy to use, maybe because I like it so much that I use it all the time to monitor network bandwidth on my Ubuntu 12.04 LTS machine. + +For example to sniff in promiscious the option -p is used like shown in the following command. + + nethogs -p wlan0 + +If you like to learn more about nethogs and explore it in a very deep way than don't hesitate to read our full tutorial on this network bandwidth monitoring tool. + +### 2) nload ### + +nload is a console application which can be used to monitor network traffic and bandwidth usage in real time and it also visualizes the traffic by providing two easy to understand graphs. This cool network monitoring tool can also be used to switch between devices while monitoring and this can be done by pressing the left and right arrow keys. + +![network monitoring tools in linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload8.png) + +As you can see from the above screenshot graphs provided by the nload tool are very easy to understand, provide useful information and also display additional info like total amount of transferred data and min/max network usage. + +And what is even cooler is the fact that you can run the tool nload with the help of the following command which seems to be very short and easy to remember. + + nload + +I am very sure that our detailed tutorial on how to use nload will help new linux users and even experienced ones that are looking for more information on it. + +### 3) slurm ### + +slurm is another network load monitoring tool for linux which shows results in a nice ascii grap and it also supports many keys for interaction such as c to switch to classic mode, s to switch to split graph mode, **r** to redraw the screen, **L** to enable TX/RX led, **m** to switch between classic split and large view, and **q** to quit slurm. + +![linux network load monitoring tools](http://blog.linoxide.com/wp-content/uploads/2013/12/slurm2.png) + +There are also some other keys available in the network load monitoring tool slurm and you can easily study them in the manual page by using the following command. + + man slurm + +slurm is available in the official repos of Ubuntu and Debian so users of these distros can easy download it by using the apt-get install command like shown below. + + sudo apt-get install slurm + +We have covered slurm usage on a tutorial so please visit it and do not forget to share the knowledge with other linux friends. + +### 4) iftop ### + +iftop is a very useful tool when you want to display bandwidth usage on an interface by host. According to the manual page **iftop** listens to network traffic on a named interface, or on the first +interface it can find which looks like an external interface if none is specified, and displays a table of current bandwidth usage by pairs of hosts. + +Ubuntu and Debian users can easily install iftop on their machines by using the following command on a terminal. + + sudo apt-get install iftop + +Use the following command to install iftop on your machine using yum + + yum -y install iftop + +### 5) collectl ### + +collectl can be used to collect data that describes the current system status and it supports the following modes: + +- Record Mode +- Playback Mode + +**Record Mode** allows to take data from a live system and either display it on a terminal or writte to one or more files or a socket. + +**Playback Mode** + +According to the manual pages in this mode data is read from one or more data files that were generated in Record Mode. + +Ubuntu and Debian users can use their default package manager to install collectl on their machines. The following command will do the job for them. + + sudo apt-get install collectl + +Use the following command because these distros have collectl in their official repos too. + + yum install collectl + +### 6) Netstat ### + +Netstat is a command line tool for **monitoring incoming** and **outgoing network packets statistics** as well as interface statistics. It displays network connections for the Transmission Control Protocol (both incoming and outgoing),routing tables, and a number of network interface (network interface controller or software-defined network interface) and network protocol statistics. + +Ubuntu and Debian users can use the default package manager to install netstat on their box. Netstat software includes inside the package net-tools. And can be installed by running the below commands in a shell or terminal: + + sudo apt-get install net-tools + +CentOS, Fedora, RHEL users can use the default package manager to install netstat on their box. Netstat software includes inside the package net-tools. And can be installed by running the below commands in a shell or terminal: + + yum install net-tools + +Simply, run the following to monitor the network packet statistic with Netstat: + + netstat + +![Netstat](http://blog.linoxide.com/wp-content/uploads/2015/02/netstat.png) + +For more information or manual about netstat, we can simply type man netstat in a shell or terminal: + + man netstat + +![man netstat](http://blog.linoxide.com/wp-content/uploads/2015/02/man-netstat.png) + +### 7) Netload ### + +The netload command just displays a small report on the current traffic load, and the total number of bytes transferred since the program start. No more features are there. Its part of the netdiag. + +We can install Netload using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][1] . + + # yum install netdiag + +Netload is available in the default repository as a part of netdiag so, we can easily install **netdiag** using **apt** manager using the command below. + + $ sudo install netdiag + +To run netload, we must make sure to choose a working network interface name like eth0, eh1, wlan0, mon0, etc. And run the following command accordingly in a shell or a terminal. + + $ netload wlan2 + +Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. + +### 8) Nagios ### + +Nagios is a leading open source powerful monitoring system that enables network/system administrators to identify and resolve server related problems before they affect major business processes. With the Nagios system, administrators can able to monitor remote Linux, Windows, Switches, Routers and Printers on a single window. It shows critical warnings and indicates if something went wrong in your network/server which indirectly helps you to begin remediation processes before they occur. + +Nagios has a web interface in which there is a graphical monitor of activities. One can login to the web interface by browsing to the url http://localhost/nagios/ or http://localhost/nagios3/ . Please replace localhost with your IP-address if on remote machine. Then enter the username and pass then, we'll get to see the information like shown below. + +![Nagios3 on Chromium](http://blog.linoxide.com/wp-content/uploads/2015/02/nagios3-ubuntu.png) + +### 9) EtherApe ### + +EtherApe is a graphical network monitor for Unix modeled after etherman. Featuring link layer, IP and TCP modes and support interfaces Ethernet, FDDI, Token Ring, ISDN, PPP, SLIP and WLAN devices, plus several encapsulation formats. Hosts and links change in size with traffic and color coded protocols display. It can filter traffic to be shown, and can read packets from a file as well as live from the network. + +It is easy to install etherape in CentOS, Fedora, RHEL distributions of Linux cause they are available default on their official repository. We can use yum manager to install it with the command shown below: + + yum install etherape + +We can install EtherApe on Ubuntu, Debian and their derivatives using **apt** manager with the below command. + + sudo apt-get install etherape + +After EtherApe is installed on the system, we'll need to run etherape in root permission as: + + sudo etherape + +Then, the **GUI** of **etherape** will be executed. Then, up in the menu we can select the **Mode** (IP, Link Layer, TCP) and **Interface** under **Capture**. After everything are set, we'll need to click **Start** button. Then, we'll gonna see something like this. + +![EtherApe](http://blog.linoxide.com/wp-content/uploads/2015/02/etherape.png) + +### 10) tcpflow ### + +tcpflow is a command line utility that captures data transmitted as part of TCP connections (flows), and stores the data in a way that is convenient for protocol analysis or debugging. It reconstructs the actual data streams and stores each flow in a separate file for later analysis. It understands TCP sequence numbers and will correctly reconstruct data streams regardless of retransmissions or out-of-order delivery . + +Installing tcpflow in Ubuntu, Debian system is easy via **apt** manager as it is available by default in the official repository. + + $ sudo apt-get install tcpflow + +We can install tcpflow in Fedora, CentOS, RHEL and their derivatives from repository using **yum** manager as shown below. + + # yum install tcpflow + +If it is not available in the repository or can't be installed via yum manager, we need to install manually from **http://pkgs.repoforge.org/tcpflow/** as shown below. + +If you are running 64 bit PC: + + # yum install --nogpgcheck http://pkgs.repoforge.org/tcpflow/tcpflow-0.21-1.2.el6.rf.x86_64.rpm + +If you are running 32 bit PC: + + # yum install --nogpgcheck http://pkgs.repoforge.org/tcpflow/tcpflow-0.21-1.2.el6.rf.i686.rpm + +We can use tcpflow to capture all/some tcp traffic and put it in an easy to read file. The below command does what we want but we'll need to run that command in an empty directory as it creates files of the format x.x.x.x.y-a.a.a.a.z and after done, just press Control-C that command to stop it. + + $ sudo tcpflow -i eth0 port 8000 + +Note: Please replace eth0 with the interface of the card you are trying to capture. + +### 11) IPTraf ### + +[IPTraf][2] is a console-based network statistics utility for Linux. It gathers a variety of figures such as TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts. + +IPTraf is available in the default repository so, we can easily install IPTraf using **apt** manager using the command below. + + $ sudo apt-get install iptraf + +IPTraf is available in the default repository so, we can easily install IPTraf using yum manager using the command below. + + # yum install iptraf + +We need to run TPTraf in administration permission with a valid network interface name. Here, we have wlan2 so, we'll be using wlan2 as interface name. + + $ sudo iptraf + +![IPTraf](http://blog.linoxide.com/wp-content/uploads/2015/02/iptraf.png) + +To start the general interface statistics, enter: + + # iptraf -g + +To see the detailed statistics facility on an interface called eth0 + + # iptraf -d wlan2 + +To see the TCP and UDP monitor on an interface called eth0 + + # iptraf -z wlan2 + +To displays the packet size counts on an interface called eth0 + + # iptraf -z wlan2 + +Note: Please replace wlan2 with your interface name. You can check your interface by running command ip link show . + +### 12) Speedometer ### + +Speedometer is a small and simple tool that just draws out good looking graphs of incoming and outgoing traffic through a given interface. + +Speedometer is available in the default repository so, we can easily install Speedometer using yum manager using the command below. + + # yum install speedometer + +Speedometer is available in the default repository so, we can easily install Speedometer using apt manager using the command below. + + $ sudo apt-get install speedometer + +Speedometer can simply be run by executing the following command in a shell or a terminal. + + $ speedometer -r wlan2 -t wlan2 + +![Speedometer](http://blog.linoxide.com/wp-content/uploads/2015/02/Speedometer.png) + +Note: Please replace wlan2 with the network interface name you would like to use. + +### 13) Netwatch ### + +Netwatch is part of the netdiag collection of tools, and it too displays the connections between local host and other remote hosts, and the speed at which data is transferring on each connection. + +We can install Netwatch using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][3] . + + # yum install netwatch + +Netwatch is available in the default repository as a part of netdiag so, we can easily install **netdiag** using **apt** manager using the command below. + + $ sudo install netdiag + +To run netwatch, we'll need to execute the following command in a terminal or shell. + + $ sudo netwatch -e wlan2 -nt + +![Netwatch](http://blog.linoxide.com/wp-content/uploads/2015/02/netwatch.png) + +Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. + +### 14) Trafshow ### + +Trafshow reports the current active connections like netwatch and pktstat, trafshow, their protocol and the data transfer speed on each connection. It can filter out connections using pcap type filters. + +We can install Netwatch using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][4] . + +# yum install trafshow + +Trafshow is available in the default repository so, we can easily install it using **apt** manager using the command below. + + $ sudo install trafshow + +To monitor using trafshow, we'll need to run the following command in a shell or terminal. + + $ sudo trafshow -i wlan2 + +![Trafshow](http://blog.linoxide.com/wp-content/uploads/2015/02/trafshow-all.png) + +To monitor specifically tcp connections add tcp as shown below. + + $ sudo trafshow -i wlan2 tcp + +![Trafshow tcp](http://blog.linoxide.com/wp-content/uploads/2015/02/trafshow-tcp.png) + +Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. + +### 15) Vnstat ### + +Vnstat is bit different from most of the other tools. It actually runs a background service/daemon and keeps recording the size of data transfer all the time. Next it can be used to generate a report of the history of network usage. + +We'll need to turn on EPEL Repository then run **yum** manager to install vnstat. + + # yum install vnstat + +Vnstat is available in the default repository. So, we can run **apt** manager to install it using the following command. + + $ sudo apt-get install vnstat + +Running vnstat without any options would simply show the total amount of data transfer that took place since the date the daemon is running. + + $ vnstat + +![vnstat](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat.png) + +To monitor the bandwidth usage in realtime, use the '-l' option (live mode). It would then show the total bandwidth used by incoming and outgoing data, but in a very precise manner without any internal details about host connections or processes. + + $ vnstat -l + +![Vnstat live mode](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat-live.png) + +After done, press Ctrl-C to stop which will result the following type of output + +![Vnstat Live Result](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat-live-result.png) + +### 16) tcptrack ### + +[tcptrack][5] displays the status of TCP connections that it sees on a given network interface. tcptrack monitors their state and displays information such as state, source/destination addresses and bandwidth usage in a sorted, updated list very much like the **top** command. + +As tcptrack is in the repository , we can simply install tcptrack in Debian, Ubuntu from their repository using apt manager. To do so, we'll need to execute the following command in a shell or terminal: + + $ sudo apt-get install tcptrack + +We can install it using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][6] . To do so, we'll need to run the following commands. + + # wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm + + # rpm -Uvh rpmforge-release*rpm + + # yum install tcptrack + +Note: Here, we have downloaded current latest version of rpmforge-release ie 0.5.3-1 . You can always get the latest version from rpmforge repository and do replace with that you downloaded in the above command. + +**tcptrack** needs to be run in root permission or superuser. We'll need to execute tcptrack with the network interface name we wanna monitor the TCP connections of. Here, we've wlan2 so will be using that as: + + sudo tcptrack -i wlan2 + +![tcptrack](http://blog.linoxide.com/wp-content/uploads/2015/02/tcptrack.png) + +If you wanna monitor of specific ports then: + + # tcptrack -i wlan2 port 80 + +![tcptrack port 80](http://blog.linoxide.com/wp-content/uploads/2015/02/tcptrack-port-80.png) + +Please replace 80 with the port number you wanna monitor .Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. + +### 17) CBM ### + +The CBM or Color Bandwidth Meter displays current traffic of all network device. This program is so simple that is should be self-explanatory. Source code and newer versions of CBM are available at [http://www.isotton.com/utils/cbm/][7] . + +As CBM is in the repository , we can simply install CBM in Debian, Ubuntu from their repository using **apt** manager. To do so, we'll need to execute the following command in a shell or terminal: + + $ sudo apt-get install cbm + +We simply need to run cbm in a shell or terminal as shown below: + + $ cbm + +![Color Bandwidth Meter](http://blog.linoxide.com/wp-content/uploads/2015/02/cbm.png) + +### 18) bmon ### + +[Bmon][8] or Bandwidth Monitoring is a tool that intended for debugging and monitor bandwidth in real-time access. This tool is capable to retrieving statistics from various input modules. It provides various output methods including a curses based interface,lightweight HTML output but also formatable ASCII output. + +bmon is available in the repository, so we can install it in Debian, Ubuntu from their repository using apt manager. To do so, we'll need to run the following command in a shell or terminal. + + $ sudo apt-get install bmon + +We can run bmon and monitor our bandwidth status using the command below. + + $ bmon + +![bmon](http://blog.linoxide.com/wp-content/uploads/2015/02/bmon.png) + +### 19) tcpdump ### + +[TCPDump][9] is a tool for network monitoring and data acquisition. It can save lots of time and can be used for debugging network or server related problems. It prints out a description of the contents of packets on a network interface that match the boolean expression. + +tcpdump is available in the default repository of Debian, Ubuntu so, we can simply use apt manager to install it under sudo privilege . To do so, we'll need to run the following command in a shell or terminal. + + $ sudo apt -get install tcpdump + +tcpdump is also available in the repository of Fedora, CentOS, RHEL so, we can install it via yum manager as: + + # yum install tcpdump + +tcpdump needs to be run in root permission or superuser. We'll need to execute tcpdump with the network interface name we wanna monitor the TCP connections of. Here, we've wlan2 so will be using it as: + + $ sudo tcpdump -i wlan2 + +![tcpdump](http://blog.linoxide.com/wp-content/uploads/2015/02/tcpdump.png) + +If you want to monitor to a specific port only, then can run the command as follows. Here is the example for port 80 (webserver). + + $ sudo tcpdump -i wlan2 'port 80' + +![tcpdump port](http://blog.linoxide.com/wp-content/uploads/2015/02/tcpdump-port.png) + +### 20) ntopng ### + +[ntopng][20] is the next generation version of the original ntop. It is a network probe that shows network usage in a way similar to what top does for processes. ntopng is based on libpcap and it has been written in a portable way in order to virtually run on every Unix platform, MacOSX and on Win32 as well. + +To install ntopng in Debian, Ubuntu system, we'll first need to install the required **dependencies packages to compile ntopng**. You can install them all by running the below command in a shell or a terminal. + + $ sudo apt-get install libpcap-dev libglib2.0-dev libgeoip-dev redis-server wget libxml2-dev build-essential checkinstall + +Now, we'll need to manually compile ntopng for our system as: + + $ sudo wget http://sourceforge.net/projects/ntop/files/ntopng/ntopng-1.1_6932.tgz/download + $ sudo tar zxfv ntopng-1.1_6932.tgz + $ sudo cd ntopng-1.1_6932 + $ sudo ./configure + $ sudo make + $ sudo make install + +Now, you should have your ntopng installed in your Debian or Ubuntu system. + +We have already covered tutorial on ntopng usages. It is available in both command line and web interface. We can go ahead to get knowledge on it. + +### Conclusion ### + +In this first part we covered some network load monitoring tools for linux that are very helpful to a sysadmin and even a novice user. Each one of the tools covered in this article has its own specifics, different options but at the end they all help you to monitor your network traffic. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/monitoring-2/network-monitoring-tools-linux/ + +作者:[Bobbin Zachariah][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bobbin/ +[1]:http://pkgs.org/centos-7/repoforge-x86_64/netwatch-1.0c-1.el7.rf.x86_64.rpm.html +[2]:http://iptraf.seul.org/ +[3]:http://pkgs.org/centos-7/repoforge-x86_64/netwatch-1.0c-1.el7.rf.x86_64.rpm.html +[4]:http://pkgs.org/centos-6/epel-x86_64/trafshow-5.2.3-6.el6.x86_64.rpm.html +[5]:http://linux.die.net/man/1/tcptrack +[6]:http://pkgs.org/centos-6/repoforge-x86_64/tcptrack-1.4.0-1.el6.rf.x86_64.rpm.html +[7]:http://www.isotton.com/utils/cbm/ +[8]:https://github.com/tgraf/bmon/ +[9]:http://www.tcpdump.org/ +[10]:http://www.ntop.org/ \ No newline at end of file diff --git a/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md new file mode 100644 index 0000000000..f85b2cf725 --- /dev/null +++ b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md @@ -0,0 +1,114 @@ +Enjoy Android Apps on Ubuntu using ARChon Runtime +================================================================================ +Before, we gave try to many android app emulating tools like Genymotion, Virtualbox, Android SDK, etc to try to run android apps on it. But, with this new Chrome Android Runtime, we are able to run Android Apps on our Chrome Browser. So, here are the steps we'll need to follow to install Android Apps on Ubuntu using ARChon Runtime. + +Google had [announced the first set of Android apps is ready to run natively on Chrome OS][1], a feature made possible using a new ‘**Android Runtime**’ extension. Now, a developer named Vlad Filippov has figured out a way to bring Android Apps to Chrome on the desktop. His chromeos-apk script and ARChon Android Runtime extension work hand-in-hand to bring Android apps to Chrome browser on the Windows, Mac and Linux desktop. + +Performance of this apps through the runtime is not pretty good. Similarly, as its both an unofficial repackaging of the official runtime and running outside of Google's Chrome OS, system integration like webcam, speakers, etc. may be patchy or non-existent. + +### Installing Chrome ### + +First of all, we'll need Chrome installed in our machine, Chrome version 37 or higher is required. We can download them from the [download page of Chrome Browser][2]. + +If you wanna install a Dev Channel version you'll need to follow below procedure. + +We'll need to add repository source list for Google Chrome which can be done my using the following command. + + $ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - + $ sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' + +![Adding google source list](http://blog.linoxide.com/wp-content/uploads/2015/02/adding-google-source-list.png) + +After adding the repository source list, we'll need to update the local repository index by the command below. + + $ sudo apt-get update + +Now, we'll gonna install google chrome unstable which is dev version. + + $ sudo apt-get install google-chrome-unstable + +![Installing Google chrome unstable](http://blog.linoxide.com/wp-content/uploads/2015/02/installing-google-chrome-unstable.png) + +### Installing Archon Runtime ### + +Next we'll need to download the custom-made ergo officially not endorsed by Google or Chromium Android Runtime created by Vlad Filippov. This differs from the official version in a number of ways, the chief being it can be used on desktop versions of the browser. Here below is the runtime we need to download, please select anyone of the following according to your bit of Ubuntu installed. + +For **32-bit** Ubuntu Distributions: + +- [Download Archron for 32-bit Ubuntu][3] + +For **64-bit** Ubuntu Distributions: + +- [Download Archron for 64-bit Ubuntu][4] + +Once the runtime has fully downloaded you will need to extract the contents from the .zip files and move the resulting directory to Home. Here is the gist commands for this steps to download and extract the contents. + + $ wget https://github.com/vladikoff/chromeos-apk/releases/download/v3.0.0/ARChon-v1.1-x86_32.zip + +![Downloading ARChon](http://blog.linoxide.com/wp-content/uploads/2015/02/download-archon.png) + + $ unzip ARChon-v1.1-x86_32.zip ~/ + +Now to install the runtime, we'll gonna Open our latest Google Chrome and goto the url **chrome://extensions/** then, we'll need to check ‘**Enable developer mode**’. Finally, we'll gonna click on the ‘**load unpacked extension**’ button and select the folder which was placed into **~/Home**. + +### Installing ChromeOS-APK ### + +To convert APKs manually is something you really don’t need to do any more if you use one of the apps mentioned above — you will need to install the ‘[chromeos-apk][5]’ command line JavaScript utility. This is available to install through the Node Packaged Modules (npm) manager. To install nmp and chromeos-apk, we'll need to run the following command in a shell or terminal. + + $ sudo apt-get install npm nodejs nodejs-legacy + +**If you are running 64 bit OS**, you should grab the following library, to do so run the below commands in a shell or terminal. + + $ sudo apt-get install lib32stdc++6 + +Now run the command to install the the latest chromeos-apk is: + + $ npm install -g chromeos-apk@latest + +![chromeos apk installation](http://blog.linoxide.com/wp-content/uploads/2015/02/chomeos-apk-installation.png) + +Depending on your system configuration you may need to need to run this latter command as sudo. + +Now, we'll gonna for Google to find an APK of an app to give it a try, bearing in mind **not all Android apps will work**, and those that do may be unstable or lack features. Most of the messenger out of the box are not working. + +### Converting APK ### + +Place your **Android APK in ~/Home**, then return to **Terminal** to convert it using the following command: + + $ chromeos-apk myapp.apk --archon + +If you want the app in fullscreen mode then run the following instead: + + $ chromeos-apk myapp.apk --archon --tablet + +Note: Please replace myapp.apk to the Android APK app filename you want to convert. + +For our ease, we can also use [Twerk][6] for the conversion process if we want to skip this step. + +### Running Android Apk ### + +Finally, we'll need to open our chrome browser and then goto chrome://extensions page and enable developer mode then tap the ‘load unpacked extension’ button and select the folder the script above created. + +Now, we can Open the Chrome App Launcher to run it. + +### Conclusion ### + +Hurray! We have successfully installed Android Apk App in our favorite desktop browser ie Chrome Browser. This article is all about the popular Chrome Android Runtime called Archon created by Vlad Filippov. This runtime allows us to run converted Apk files in our Chrome browser. It has not yet supported messaging apps like Whatsapp, etc. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Archon :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/android-apps-ubuntu-archon-runtime/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://chrome.blogspot.com/2014/09/first-set-of-android-apps-coming-to.html +[2]:https://www.google.com/chrome/browser +[3]:https://github.com/vladikoff/chromeos-apk/releases/download/v3.0.0/ARChon-v1.1-x86_32.zip +[4]:https://github.com/vladikoff/chromeos-apk/releases/download/v3.0.0/ARChon-v1.1-x86_64.zip +[5]:https://github.com/vladikoff/chromeos-apk/blob/master/README.md +[6]:https://chrome.google.com/webstore/detail/twerk/jhdnjmjhmfihbfjdgmnappnoaehnhiaf \ No newline at end of file diff --git a/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md b/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md new file mode 100644 index 0000000000..88b742d4f9 --- /dev/null +++ b/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md @@ -0,0 +1,86 @@ +Fix Minimal BASH like line editing is supported GRUB Error In Linux +================================================================================ +The other day when I [installed Elementary OS in dual boot with Windows][1], I encountered a Grub error at the reboot time. I was presented with command line with error message: + +**Minimal BASH like line editing is supported. For the first word, TAB lists possible command completions. anywhere else TAB lists possible device or file completions.** + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_Linux_1.jpeg) + +Indeed this is not an error specific to Elementary OS. It is a common [Grub][2] error that could occur with any Linux OS be it Ubuntu, Fedora, Linux Mint etc. + +In this post we shall see **how to fix this “minimal BASH like line editing is supported” Grub error in Ubuntu** based Linux systems. + +> You can read this tutorial to fix similar and more frequent issue, [error: no such partition grub rescue in Linux][3]. + +### Prerequisites ### + +To fix this issue, you would need the followings: + +- A live USB or disk of the same OS and same version +- A working internet connection in the live session + +Once you make sure that you have the prerequisites, let’s see how to fix the black screen of death for Linux (if I can call it that ;)). + +### How to fix this “minimal BASH like line editing is supported” Grub error in Ubuntu based Linux ### + +I know that you might point out that this Grub error is not exclusive to Ubuntu or Ubuntu based Linux distributions, then why am I putting emphasis on the world Ubuntu? The reason is, here we will take an easy way out and use a tool called **Boot Repair** to fix our problem. I am not sure if this tool is available for other distributions like Fedora. Without wasting anymore time, let’s see how to solve minimal BASH like line editing is supported Grub error. + +### Step 1: Boot in lives session ### + +Plug in the live USB and boot in to the live session. + +### Step 2: Install Boot Repair ### + +Once you are in the lives session, open the terminal and use the following commands to install Boot Repair: + + sudo add-apt-repository ppa:yannubuntu/boot-repair + sudo apt-get update + sudo apt-get install boot-repair + +Note: Follow this tutorial to [fix failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs error][4], if you encounter it while running the above command. + +### Step 3: Repair boot with Boot Repair ### + +Once you installed Boot Repair, run it from the command line using the following command: + + boot-repair & + +Actually things are pretty straight forward from here. You just need to follow the instructions provided by Boot Repair tool. First, click on **Recommended repair** option in the Boot Repair. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu.png) + +It will take couple of minutes for Boot Repair to analyze the problem with boot and Grub. Afterwards, it will provide you some commands to use in the command line. Copy the commands one by one in terminal. For me it showed me a screen like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_1.png) + +It will do some processes after you enter these commands: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_2.png) + +Once the process finishes, it will provide you a URL which consists of the logs of the boot repair. If your boot issue is not fixed even now, you can go to the forum or mail to the dev team and provide them the URL as a reference. Cool, isn’t it? + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Final_Ubuntu.png) + +After the boot repair finishes successfully, shutdown your computer, remove the USB and boot again. For me it booted successfully but added two additional lines in the Grub screen. Something which was not of importance to me as I was happy to see the system booting normally again. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_Linux_2.jpeg) + +### Did it work for you? ### + +So this is how I fixed **minimal BASH like line editing is supported Grub error in Elementary OS Freya**. How about you? Did it work for you? Feel free to ask a question or drop a suggestion in the comment box below. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/guide-install-elementary-os-luna/ +[2]:http://www.gnu.org/software/grub/ +[3]:http://itsfoss.com/solve-error-partition-grub-rescue-ubuntu-linux/ +[4]:http://itsfoss.com/fix-failed-fetch-cdrom-aptget-update-add-cdroms/ \ No newline at end of file diff --git a/sources/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md b/sources/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md new file mode 100644 index 0000000000..2815330506 --- /dev/null +++ b/sources/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md @@ -0,0 +1,72 @@ +How To Fix: Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/12/elementary_OS_Freya.jpg) + +These days I am experimenting with Elementary OS Freya and during this, I encountered a very common updater error: **Failed to fetch cdrom Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs**. The complete error looked like this after running the apt-get update command: + +> W: Failed to fetch cdrom://elementary OS 0.3 _Freya_ – Daily amd64 (20150208)/dists/trusty/main/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs +> +> W: Failed to fetch cdrom://elementary OS 0.3 _Freya_ – Daily amd64 (20150208)/dists/trusty/restricted/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs +> +> E: Some index files failed to download. They have been ignored, or old ones used instead. + +In this post, we shall see how to fix this error. + +### Fix Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs error ### + +The reason for this error is that cdrom has been included as one of the the sources here. And to fix this issue, we need to remove this from the list of software sources. + +In Ubuntu, look for Software & Updates: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Software_Update_Ubuntu.jpeg) + +In the first tab Ubuntu Software, look for the cdrom, if it’s checked, uncheck it. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/CDROM_Error_Update_Software_Sources.jpeg) + +Close the Software Sources and run the update again. It should work fine now. + +### Further troubleshoot: ### + +The method described above should have fixed this **apt-get update cannot be used to add new CD-ROMs** error. But this was not the case for me because the option of cdrom was already grayed out as I was using live session. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/CDROM_Update_Error.png) + +Now to fix our error, we shall take the command line route. Open a terminal and use the following line to see what is included in sources list: + + cat /etc/apt/sources.list + +The output for me was as following: + + deb cdrom:[elementary OS 0.3 _Freya_ – Daily amd64 (20150208)]/ trusty main restricted + deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse + deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse + deb http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse + deb-src http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse + deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse + deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse + +Look at the first line in the above list. It includes cdrom. We need to comment out this line by adding # in front of it to make it look like this: + + #deb cdrom:[elementary OS 0.3 _Freya_ – Daily amd64 (20150208)]/ trusty main restricted + +To do that use the command below: + + sudo gedit /etc/apt/sources.list + +Once you have edited the sources.list, run the apt-get update once again. The error apt-get update cannot be used to add new CD-ROMs should have been fixed. If you are facing any other update issue, do look at this article which is a collection of most [common Ubuntu update error fixes][1]. + +I hope you found this tutorial helpful. If you have any questions or suggestions, feel free to drop a comment. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-failed-fetch-cdrom-aptget-update-add-cdroms/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/fix-update-errors-ubuntu-1404/ \ No newline at end of file diff --git a/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md b/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md new file mode 100644 index 0000000000..417e333e31 --- /dev/null +++ b/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md @@ -0,0 +1,98 @@ +How to Install Lightweight Budgie ( v8) Desktop in Ubuntu 14.04 +================================================================================ +Budgie is the flagship desktop of the Evolve OS Linux Distribution, and is an Evolve OS project. Designed with the modern user in mind, it focuses on simplicity and elegance. A huge advantage for the Budgie desktop is that it is not a fork of another project, but rather one written from scratch with integration in mind. + +The [Budgie Desktop][1] tightly integrates with the GNOME stack, employing underlying technologies to offer an alternative desktop experience. In the spirit of open source, the project is compatible with and available for other Linux distributions. + +Also note that Budgie can now emulate the look and feel of the GNOME 2 desktop, optionally, via a setting in the panel preferences. + +### Features in the 0.8 release ### + +- IconTasklist: Add pinning support +- IconTasklist: Use .desktop files for quicklists +- IconTasklist: Use .desktop files for icon resolution +- IconTasklist: Support “attention” hint (blue blink) +- Panel: Support dark theme (used by default) +- Add Menubar applet +- Panel: Initial autohide support (manual, not automatic) +- Panel: Support shadow onall screen edges +- Panel: Dynamic support for gnome panel theming +- RunDialog: Complete visual refresh (bootiful) +- BudgieMenu: Add compact mode, use by default +- BudgieMenu: Sort items by usage +- BudgieMenu: Remove old power option +- Editor: Add all menu options to UI +- Support from GNOME 3.10 up to 3.16 (unreleased, git) +- wm: Kill workspace animation (resolve after v8) +- wm: Better animations for changing of wallpapers + +### Important information ### + +- Budgie [released version 0.8][2] so it is still in development and a beta. +- No nnative network management; can be fixed by using Ubuntu's applet. +- Budgie is intended for the Evolve OS so even with this PPA it might be buggy. +- GNOME themes work better than the native Ubuntu themes. +- Ubuntu’s overlay scrollbars are not working. +- If you want to read more visit the Evolve OS website. + +### Installation ### + +Now, we'll install our Lightweight Budgie Desktop in our Ubuntu 14.04 LTS "Trusty" distribution of Linux Operating System. First of all, we'll need to add ppa repository to our Ubuntu PC. To do so, we'll need to execute the below command in a shell or terminal. + + $ sudo add-apt-repository ppa:evolve-os/ppa + +![Add Budgie Desktop PPA Repo](http://blog.linoxide.com/wp-content/uploads/2015/01/budgie-desktop-ppa.png) + +Now, after we finish adding PPA to our Ubuntu Computer, we'll need to update the local repository index in it. It can be done by running the following command in the same terminal or shell after above is done. + + $ sudo apt-get update + +Then, finally, we'll install the one and only Budgie Desktop Environment in our Ubuntu machine running the latest version 14.04 LTS. + + $ sudo apt-get install budgie-desktop + +![Install Budgie Desktop](http://blog.linoxide.com/wp-content/uploads/2015/02/install-budgie-desktop.png) + +**Notes** + +It is in active development and features remain missing, including, but not limited to: no network management support, no volume control applet (keyboard keys will work fine), no notification system and no way to ‘pin’ apps to the task bar. + +As a workaround you can disable overlay scrollbars, set a different default theme and quit a session from the terminal using the following command: + + $ gnome-session-quit + +![Quitting Gnome Session](http://blog.linoxide.com/wp-content/uploads/2015/02/gnome-seesion-quit.png) + +### Log into the Budgie Session ### + +After installation is completed, we’ll be able to select ‘Budgie’ from the session selector of the Unity Greeter. For that, we'll need to logout the current user and get back to the login screen. Then, we'll be able to switch to Budgie Desktop Environment. + +![Select Desktop Session](http://blog.linoxide.com/wp-content/uploads/2015/02/session-select.png) + +### Budgie Desktop Environment ### + +![Budgie Desktop Environment](http://blog.linoxide.com/wp-content/uploads/2015/02/budgie-desktop.png) + +### Logging Out ### + +You can simply execute **budgie-session --logout** in a shell or terminal to logout it. + + $ budgie-sessioon --logout + +### Conclusion ### + +Hurray! We have successfully installed our Lightweight Budgie Desktop Environment in our Ubuntu 14.04 LTS "Trusty" box. As we know, Budgie Desktop is still underdevelopment which makes it a lot of stuffs missing. Though it’s based on Gnome’s GTK3, it’s not a fork. The desktop is written completely from scratch, and the design is elegant and well thought out. If you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy Budgie Desktop 0.8 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-lightweight-budgie-v8-desktop-ubuntu/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://evolve-os.com/budgie/ +[2]:https://evolve-os.com/2014/11/16/courageous-budgie-v8-released/ \ No newline at end of file From 26f6231a537a10f3d59245ee6f0dead374ed2a21 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 27 Feb 2015 22:42:15 +0800 Subject: [PATCH 0116/2517] PUB:20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya @geekpi --- ...le Chrome Icons From Dock In Elementary OS Freya.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md (75%) diff --git a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/published/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md similarity index 75% rename from translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md rename to published/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md index 19bb495231..fb593dbf68 100644 --- a/translated/tech/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md +++ b/published/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md @@ -1,12 +1,12 @@ -如何避免在ELemetary OS Freya中出现两个Google Chrome 图标[快速提示] +如何避免在ELemetary OS Freya中出现两个Google Chrome 图标 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Two_Google_Chrome_ElementaryOS_Freya.jpeg) 这篇文章会教你**如何避免在ELemetary OS Freya中出现两个Google Chrome 图标**。 -Chrome才是我在所有系统中使用的主浏览器。而[Modori][2]默认在dock中,你不得不每次在使用Chrome时在Slingshot中搜索Google Chrome。为了节省时间,我假设你选择的是“保持在dock”中。 +Chrome才是我在所有系统中使用的主浏览器。[Modori][2] 是默认放在dock中的浏览器,所以你每次使用Chrome时都需要在Slingshot中搜索Google Chrome,而为了节省时间,我通常会将它“保持在dock”中。 -这里的问题是当你点击dock中的Chrome图标时,它会创建另外一个Google Chrome的实例。这就在dock中留下两个Chrome图标,这个或许可以被忽略但是很显然这是设计上的一个干扰。如果你有相同的感受,让我们看下如何移除这第二个Google Chrome图标。 +这里的问题是当你点击dock中的Chrome图标时,它会创建另外一个Google Chrome的实例。这就在dock中留下两个Chrome图标,这或许你可以不在意,但是很显然处女座不能忍!如果你有相同的感受,让我们看下如何移除这第二个Google Chrome图标。 ### 在Elementary OS Freya的dock中删除第二个Google Chrome 图标 ### @@ -37,7 +37,7 @@ Chrome才是我在所有系统中使用的主浏览器。而[Modori][2]默认在 #### 第四步: #### -进入Slingshot并且再次打开Google Chrome。再次选择“keep in dock”。关闭并重启来验证它是否在dock中打开了另外一个新的Chrome实例。这里不需要重启系统。 +进入Slingshot并且再次打开Google Chrome。再次选择“keep in dock”。关闭并重新打开它来验证它是否在dock中打开了另外一个新的Chrome图标。这里不需要重启系统。 我希望这篇提示能够帮助你删除Elementary OS Freya中多出的Chrome图标。有任何问题或建议让我在评论区中知道。 @@ -47,7 +47,7 @@ via: http://itsfoss.com/rid-google-chrome-icons-dock-elementary-os-freya/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 75c422423dd901c00755e34b44be6945bb203fd9 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 27 Feb 2015 22:47:58 +0800 Subject: [PATCH 0117/2517] PUB:20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl @mr-ping --- ...s with Answers--How to set a custom HTTP header in curl.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md (94%) diff --git a/translated/tech/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md b/published/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md similarity index 94% rename from translated/tech/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md rename to published/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md index 7c382558eb..145ef9168e 100644 --- a/translated/tech/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md +++ b/published/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md @@ -6,7 +6,7 @@ curl是一个强大的命令行工具,它可以通过网络将信息传递给 ![](https://farm8.staticflickr.com/7568/16225032086_fb8f1c508a_b.jpg) -在一些个例中,或许你想要在一个HTTP请求中覆盖掉默认的HTTP头或者添加一个新的自定义头部字段。例如,你或许想要重写“HOST”字段来测试一个[负载均衡][1],或者通过重写"User-Agent"字符串来欺骗特定浏览器以解决其访问限制的问题。 +在一些个例中,或许你想要在一个HTTP请求中覆盖掉默认的HTTP头或者添加一个新的自定义头部字段。例如,你或许想要重写“HOST”字段来测试一个[负载均衡][1],或者通过重写"User-Agent"字符串来假冒特定浏览器以解决一些访问限制的问题。 为了解决所有这些问题,curl提供了一个简单的方法来完全控制传出HTTP请求的HTTP头。你需要的这个参数是“-H” 或者 “--header”。 @@ -36,7 +36,7 @@ wget是另外一个类似于curl,可以用来获取URL的命令行工具。并 via: http://ask.xmodulo.com/custom-http-header-curl.html 译者:[Ping](http://mr-ping.com) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e96b68530f2912197995cfd3c04b57e8faa17657 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 27 Feb 2015 22:57:02 +0800 Subject: [PATCH 0118/2517] PUB:20150119 Quick Tip--How To Restart Cinnamon After Crash @geekpi --- ...0119 Quick Tip--How To Restart Cinnamon After Crash.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150119 Quick Tip--How To Restart Cinnamon After Crash.md (83%) diff --git a/translated/tech/20150119 Quick Tip--How To Restart Cinnamon After Crash.md b/published/20150119 Quick Tip--How To Restart Cinnamon After Crash.md similarity index 83% rename from translated/tech/20150119 Quick Tip--How To Restart Cinnamon After Crash.md rename to published/20150119 Quick Tip--How To Restart Cinnamon After Crash.md index eee9d41d0c..e5b6cbae5a 100644 --- a/translated/tech/20150119 Quick Tip--How To Restart Cinnamon After Crash.md +++ b/published/20150119 Quick Tip--How To Restart Cinnamon After Crash.md @@ -1,6 +1,6 @@ 如何在崩溃后重启Cinnamon ================================================================================ -Cinnamon是一个提供了高级创新特性和传统用户体验的Linux桌面环境。桌面布局和Gnome 2相似。底层的技术与Gnome Shell相似。它的重点是让用户有宾至如归的感觉并提供一个简单和舒适的桌面体验。 +Cinnamon是一个提供了高级创新特性和传统用户体验的Linux桌面环境。桌面布局和Gnome 2相似。底层的技术与Gnome Shell相似。它的重点是让用户以熟悉的方式得到简单和舒适的桌面体验。 本篇中我们会展示一个快速的方法来重启Cinnamon而不用在崩溃后登出或者重启。 @@ -18,15 +18,15 @@ Cinnamon应该会重新在面板和菜单中显示图标和文本了。 ![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/linux_mint_cinnamon_menu.png) -享受吧! +试试吧! -------------------------------------------------------------------------------- via: http://www.unixmen.com/quick-tip-restart-cinnamon-crash/ 作者:[Enock Seth Nyamador][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d9157955cf9831dd7962ee1c6ed90e942f501cb7 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sat, 28 Feb 2015 11:43:36 +0800 Subject: [PATCH 0119/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Step Guide To Installing Xubuntu Linux.md | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md b/translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md index 3fc83ba9ef..ed6c31e46e 100644 --- a/translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md +++ b/translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md @@ -5,17 +5,17 @@ ![Xubuntu](http://f.tqn.com/y/linux/1/S/J/J/1/fulldesktop.png) -这个教程会一步一步的教你如何安装Xubuntu Linux。 +这个教程会一步步教你如何安装Xubuntu Linux。 为什么你会想要安装Xubuntu呢?这里有三个原因: 1. 你有一台安装Windows XP的计算机,但是微软已经不再对Windows XP提供支持 -2. 你的[电脑运行很慢][1],并且你想要一个轻量级并且跟得上时代潮流的操作系统 -3. 你想要增加一些DIY经验 +2. 你的[电脑运行很慢][1],你想要一个轻量级并且跟得上时代潮流的操作系统 +3. 你想要自定义你的电脑使用体验 -首先,你需要[下载Xubuntu,并且创建一个启动优盘][2]。 +首先,你需要[下载Xubuntu,并且创建一个可启动的USB驱动器][2]。 -完成以后,用优盘启动到Xubuntu,然后点击安装Xubuntu图标。 +完成以后,用优盘启动到当前版本的Xubuntu,然后点击安装Xubuntu图标。 ### 选择你的安装语言 ### @@ -29,9 +29,9 @@ ![选择无线网络](http://f.tqn.com/y/linux/1/S/L/J/1/xubuntuinstall2.png) -第二步,需要你来选择你的网络链接。这个步骤不是必须的。 +第二步,需要你来选择你的网络链接。这个步骤不是必须的,你在这个阶段可能会选择不设置网络链接是有原因的。 -如果你[网络状况十分糟糕][3],直接跳过是一个明智的选择,因为安装程序会在安装过程中从网络上下载一些更新包。那么可想而知,你的安装过程就会花费很长的时间。 +如果你的[网络状况十分糟糕][3],不选无线网络是一个明智的选择,因为安装程序会在安装过程中从网络上下载一些更新包。那么可想而知,你的安装过程就会花费很长的时间。 当然,如果你的[网速很快][4],选择一个无线网,然后输入密码就行了。 @@ -51,17 +51,19 @@ 安装过程中,如果电池电量耗完的话,你才必须要链接到到电源。 +请注意,如果你连网了,这里有一个关闭安装过程中下载更新包的复选框。 + 这里还有一个复选框,提示你是否安装用于[播放MP3][5]或者[Flash视频][6]的第三方软件,当然,这些内容也可以在安装完成以后进行。 ### 选择安装类型 ### ![选择安装类型](http://f.tqn.com/y/linux/1/S/N/J/1/xubuntuinstall4.png) -接下来的步骤是选择安装类型。显示那些选项,取决于之前电脑上安装了什么系统。 +接下来的步骤是选择安装类型。显示哪些选项,取决于之前电脑上安装了什么系统。 -在我的示例中,我已经安装了[Ubuntu MATE][7],所以,我的选项是重装Ubuntu、删除并且重装、Xubuntu和Ubuntu双系统、以及其他。 +在我的示例中,我已经安装了[Ubuntu MATE][7],所以,我的选项是重装Ubuntu、删除并且重装、安装Xubuntu和Ubuntu双系统,或者其它。 -如果你的计算机上安装了Windows,那么你得到的选项就是,安装双系统、使用Xubuntu替换Windows以及其他。 +如果你的计算机上安装了Windows,那么你得到的选项就是,安装双系统,使用Xubuntu替换Windows或者其他。 这个教程只是用来说明如何在计算机上安装Xubuntu,而不是怎么安装双系统,那将是一个完全不同的教程。 @@ -73,11 +75,11 @@ ![清除磁盘并且安装Xubuntu](http://f.tqn.com/y/linux/1/S/O/J/1/xubuntuinstall5.png) -选择你要在那个磁盘上安装的Xubuntu。 +选择你要安装Xubuntu的磁盘。 点击“Install Now”。 -这时候会弹出一个警告窗口,会提示你,选择的磁盘驱动器会被完全清除,然后会显示一个新创建的分区列表。 +这时候会弹出一个警告窗口,会提示你选择的磁盘驱动器会被完全清除,然后会显示一个新创建的分区列表。 > 备注:这是你改变主意的最后一个机会,如果你点击继续,磁盘就会被完全清除,然后开始安装Xubuntu。 @@ -103,7 +105,7 @@ 如果你需要确认键盘布局是否正确,可以在“Type here to test your keyboard”输入字符。你需要特别注意fn键和一些符号,例如英镑和美元符号。 -如果在安装过程中没有设对也没关系,安装完成以后在Xubuntu系统设置中也可以进行调整。 +如果在安装过程中没有设置正确也没关系,安装完成以后在Xubuntu系统设置中也可以进行调整。 ### 新增用户 ### @@ -115,9 +117,9 @@ 为用户选择一个用户名并且[创建一个密码][8]。为了保证你的密码输入正确,你需要输入两遍。 -如果你想要系统自动登入,而不是在每次启动的时候输入密码,选择“Log in automatically”。尽管对于我来说,我肯定不会选择这个选项。 +如果你想要系统自动登入,而不是在每次启动的时候输入密码,选择“Log in automatically”。对于我来说,我肯定不会选择这个选项。 -更好的选项是“Require my password to log in”,并且如果你想要更高的安全等级,勾选“Encrypt my home fodler”选项。 +更好的选项是“Require my password to log in”,并且如果你想要更高的安全等级,勾选“Encrypt my home folder”选项。 点击“Continue”然后继续。 @@ -125,9 +127,9 @@ ![等待安装完成](http://f.tqn.com/y/linux/1/S/S/J/1/xubuntuinstall10.png) -这个步骤中,将会会拷贝文件到你的电脑,并且安装Xubuntu。 +这个步骤中,将会拷贝文件到你的电脑,并且安装Xubuntu。 -在这个过程中,你会看到一个简短的幻灯片。在这个时候你可以去[泡一杯咖啡][9]或者放松一下什么的。 +在这个过程中,你会看到一个简短的幻灯片。在这个时候你可以去[泡一杯咖啡][9]或者放松一下。 安装完成以后,会弹出提示告诉你是否重新启动,并且开始体验一下新安装的Xubuntu系统。 @@ -139,7 +141,7 @@ via : http://linux.about.com/od/howtos/ss/A-Step-By-Step-Guide-To-Installing-Xu 作者:[Gary Newell][a] 译者:[zhouj-sh](https://github.com/zhouj-sh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -152,4 +154,4 @@ via : http://linux.about.com/od/howtos/ss/A-Step-By-Step-Guide-To-Installing-Xu [6]:http://animation.about.com/od/2danimationtutorials/ss/2d_fla_lesson1.htm [7]:http://www.everydaylinuxuser.com/2014/11/ubuntu-mate-vs-lubuntu-on-old-netbook.html [8]:http://netsecurity.about.com/cs/generalsecurity/a/aa112103b.htm -[9]:http://coffeetea.about.com/od/preparationandrecipes/ \ No newline at end of file +[9]:http://coffeetea.about.com/od/preparationandrecipes/ From c6eb6a54567f51abd85099467f6f09165e9d47eb Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sat, 28 Feb 2015 15:02:04 +0800 Subject: [PATCH 0120/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150116 A Step By Step Guide To Installing Xubuntu Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150116 A Step By Step Guide To Installing Xubuntu Linux.md (100%) diff --git a/translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md b/published/20150116 A Step By Step Guide To Installing Xubuntu Linux.md similarity index 100% rename from translated/share/20150116 A Step By Step Guide To Installing Xubuntu Linux.md rename to published/20150116 A Step By Step Guide To Installing Xubuntu Linux.md From 0586b77be812fd40d261f22baf2842b04c97e52c Mon Sep 17 00:00:00 2001 From: johnhoow Date: Sat, 28 Feb 2015 16:24:05 +0800 Subject: [PATCH 0121/2517] johnhoow translating --- ...to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md b/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md index 417e333e31..60155b9f68 100644 --- a/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md +++ b/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md @@ -1,3 +1,4 @@ +johnhoow translating... How to Install Lightweight Budgie ( v8) Desktop in Ubuntu 14.04 ================================================================================ Budgie is the flagship desktop of the Evolve OS Linux Distribution, and is an Evolve OS project. Designed with the modern user in mind, it focuses on simplicity and elegance. A huge advantage for the Budgie desktop is that it is not a fork of another project, but rather one written from scratch with integration in mind. @@ -95,4 +96,4 @@ via: http://linoxide.com/ubuntu-how-to/install-lightweight-budgie-v8-desktop-ubu [a]:http://linoxide.com/author/arunp/ [1]:https://evolve-os.com/budgie/ -[2]:https://evolve-os.com/2014/11/16/courageous-budgie-v8-released/ \ No newline at end of file +[2]:https://evolve-os.com/2014/11/16/courageous-budgie-v8-released/ From da65b6b5583cf23f7c231e420fcbe70f9967ec17 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sat, 28 Feb 2015 17:58:58 +0800 Subject: [PATCH 0122/2517] Transalting by ZTinoZ --- .../20150114 What is a good IDE for C or C++ on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md index 475e75542d..8a6eaaff6d 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -18,13 +18,13 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm9.staticflickr.com/8573/16088461968_c6a6c9e49a_c.jpg) -牺牲了很多特色功能但是增加了很多灵活性,[Geany][6]就是这样一款与Eclipse对立的软件。但是对于它所缺乏的地方(比如说没有调试器), Geany用一些漂亮小巧的特色功能弥补了它们:一个可以做笔记的区域、模板a space for note taking, creation from template, code outline, customizable shortcuts, and plugins management. Geany is still closer to an extensive text editor than an IDE here. However I keep it in the list for its lightness and its well designed interface. +牺牲了很多特色功能但是增加了很多灵活性,[Geany][6]就是这样一款与Eclipse对立的软件。但是对于它所缺乏的地方(比如说没有调试器), Geany用一些漂亮小巧的特色功能弥补了它们:一个可以做笔记的区域、基于模板创作、代码大纲、自定义快捷键和插件管理。相比于现在的IDE,Geany仍然是一款作用广泛的文本编辑器,然而,因为它的功能亮点和它的界面设计,所以我把它放在这份列表里。 ### 4. MonoDevelop ### ![](https://farm8.staticflickr.com/7515/16275175052_61487480ce_c.jpg) -Another monster to add to the list, [MonoDevelop][7] has a very unique feel derived from its look and interface. I personally love its project management and its integrated version control system. The plugin system is also pretty amazing. But for some reason, all the options and the support for all kind of programming languages make it feel a bit overwhelming to me. It remains a great tool that I used many times in the past, but just not my number one when dealing with "simplistic" C. +这又是这份列表里的一个“巨人级”工具,[MonoDevelop][7]那无与伦比的体验来源于它的外表和界面。我个人非常喜爱它的项目管理和它的一体化版本控制系统。The plugin system is also pretty amazing. But for some reason, all the options and the support for all kind of programming languages make it feel a bit overwhelming to me. It remains a great tool that I used many times in the past, but just not my number one when dealing with "simplistic" C. ### 5. Anjuta ### From 11da060bd09336dd961021ee7e60eee225afde95 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 28 Feb 2015 20:31:36 +0800 Subject: [PATCH 0123/2517] PUB:20141229 How to Create Btrfs Filesystem in Linux and its Features @GOLinux --- ...o Create Btrfs Filesystem in Linux and its Features.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20141229 How to Create Btrfs Filesystem in Linux and its Features.md (91%) diff --git a/translated/tech/20141229 How to Create Btrfs Filesystem in Linux and its Features.md b/published/20141229 How to Create Btrfs Filesystem in Linux and its Features.md similarity index 91% rename from translated/tech/20141229 How to Create Btrfs Filesystem in Linux and its Features.md rename to published/20141229 How to Create Btrfs Filesystem in Linux and its Features.md index 8ab85e81dc..9439ace204 100644 --- a/translated/tech/20141229 How to Create Btrfs Filesystem in Linux and its Features.md +++ b/published/20141229 How to Create Btrfs Filesystem in Linux and its Features.md @@ -28,7 +28,7 @@ Btrfs文件系统在Linux中的创建及其特性 ### 转换到Btrfs ### -**警告:在尝试转换文件系统前,请务必备份数据。虽然此操作很稳定,也很安全,但它仍然可能导致数据丢失,而防止此情况发生的唯一途径就是进行数据备份。** +**警告:在尝试转换文件系统前,请务必备份数据!虽然此操作很稳定,也很安全,但它仍然可能导致数据丢失,而防止此情况发生的唯一途径就是进行数据备份。** 将现存的ext4文件系统转换到btrfs是相当简单而易懂的。你首先需要使用fsck来检查你现存分区上是否存在错误,然后使用btrfs-convert命令进行转换。如果你想要对/dev/sda3分区进行转换,你可以进行以下操作: @@ -41,7 +41,7 @@ Btrfs文件系统在Linux中的创建及其特性 ### 转换根分区 ### -如果你想要对你系统上的根分区进行转换,你首先需要使用Live CD启动。对于Ubuntu,你可以使用Ubuntu安装CD来完成此操作,在启动后第一个屏幕选择“尝试Ubuntu”。对于其它系统,你同样可以使用Live CD镜像,操作类似。 +如果你想要对你系统上的根分区进行转换,你首先需要使用Live CD启动。对于Ubuntu,你可以使用Ubuntu安装盘来完成此操作,在启动后第一个屏幕选择“尝试Ubuntu”。对于其它系统,你同样可以使用Live CD镜像,操作类似。 在启动后,打开终端,使用下面的命令来转换文件系统。 @@ -57,7 +57,7 @@ Btrfs文件系统在Linux中的创建及其特性 ![btrfs-root-convert](http://blog.linoxide.com/wp-content/uploads/2014/11/btrfs-root-convert.jpg) -现在来编辑fstab,并根据blkid输出的结果来修改当前/文件系统的UUID,并将它的文件系统类型修改为btrfs,修改后的行如下: +现在来编辑fstab,并根据blkid输出的结果来修改当前“/”文件系统的UUID,并将它的文件系统类型修改为btrfs,修改后的行如下: UUID=8e7e80aa-337e-4179-966d-d60128bd3714 / btrfs defaults 0 1 @@ -74,7 +74,7 @@ via: http://linoxide.com/file-system/create-btrfs-features/ 作者:[Adrian Dinu][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 0d52296a88ba8bbf15cf662ca99d6c4521fefc39 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 28 Feb 2015 20:55:19 +0800 Subject: [PATCH 0124/2517] PUB:20141114 How To Use Emoji Anywhere With Twitter's Open Source Library @FSSlc --- ...here With Twitter's Open Source Library.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) rename {translated/tech => published}/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md (63%) diff --git a/translated/tech/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md b/published/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md similarity index 63% rename from translated/tech/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md rename to published/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md index 6f1e2b5b56..ab8046d43e 100644 --- a/translated/tech/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md +++ b/published/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md @@ -1,36 +1,36 @@ - 怎样通过 Twitter 的开源库来随处使用 Emoji 表情符号 +怎样通过 Twitter 的开源库来随处使用 Emoji 表情符号 ================================================================================ > 通过 GitHub 将它们嵌入到网页和其他项目中。 ![](http://a3.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2OTIyNTI3MjcxNTU1.png) -Emoji, 来自日本的小巧符号,通过图像表达感情,已经征服了手机文字信息的世界。 +Emoji, 来自日本的小巧符号,通过图像表达感情,已经征服了移动互联网的信息世界。 现在,你可以在虚拟世界中随处使用它们了。 Twitter 最近[开源了][1]他们的 emoji 符号库,使得你可以在你自己的网站,应用,和项目中使用它们。 -但这需要一点体力活。 Unicode 已经识别甚至标准化了 emoji 字母表, 然而 emoji 仍然[不能完全与所有的网络浏览器相兼容][2],这意味着大多数情况下,它们将呈现为 “豆腐块”或 空白盒子。当 Twitter 想使得 emoji 可用时,社交网络联合一家名为[Icon Factory][3]的公司共同渲染浏览器以模仿 文本信息符号的效果。结果,Twiter 说道 人们对他们的 emoji 库有很大的需求。 +但这需要一点体力活。 Unicode 已经识别甚至标准化了 emoji 字母表, 然而 emoji 仍然[不能完全与所有的网络浏览器相兼容][2],这意味着大多数情况下,它们将呈现为 “豆腐块”或“空白盒子”。当 Twitter 想使得 emoji 到处可用时,这家社交网络联合了一家名为[Icon Factory][3]的公司来渲染浏览器以模仿文本信息符号的效果。Twiter 认为人们对他们的 emoji 库有很大的需求。 现在, 你可以从 [GitHub][4] 上克隆 Twitter 的整个库,从而在你的开发项目中使用它们。 下面将为你介绍如何达到上面的目的以及如何使得 emoji 更容易被使用。 ### 为 Emoji 得到 Unicode 支持 ### -Unicode 是国际编码标准,它为任意的符号,字母或人们想在网络上使用的数字配置了一串符号。换句话说,它是 你如何在计算机上阅读文本 与 计算机如何读取文本 之间的缺失环节。例如,对于你正看到的位于这些句子中的`空白`,计算机读取为 “&mbsp”。 +Unicode 是国际编码标准,它为任意的符号、字母或人们想在网络上使用的数字配置了一串编码。换句话说,它是你如何在计算机上阅读文本与计算机如何读取文本之间的缺失环节。例如,对于你正看到的位于这些句子中的`空格`(LCTT 译注:英文分词中间的空格),计算机读取为 “ ”。 -Unicode 甚至拥有其自己的 [原始 emoji][5],它们可以 在没有你的任何努力的情况下在浏览器中被阅读。例如,当你看到了 一个 ❤ 符号,你的计算机正在解码字符串 “2665” 。 +Unicode 甚至拥有其自己的[原始 emoji][5],它们可以在没有你的任何努力的情况下在浏览器中被阅读。例如,当你看到了 一个 ❤ 符号,你的计算机正在解码字符串 “2665” 。 要在大多数情况下使用 Twitter 的 emoji 库,你只需在你的 HTML 网页中的 ``块中添加如下脚本: -这样就使得你的项目可以访问 包含有已经在 Twitter 中可使用的数以百计的 Emoji 符号的 JavaScript 库。然而,创建一个仅仅包含这个脚本的文档并不能使得在你的网站中呈现出 emoji 符号,实际上,你仍需要嵌入一些 emoji 符号! +这样就使得你的项目可以访问包含有已经在 Twitter 中可使用的数以百计的 Emoji 符号的 JavaScript 库。然而,创建一个仅仅包含这个脚本的文档并不能使得在你的网站中呈现出 emoji 符号,实际上,你仍需要嵌入这些 emoji 符号! -在 ``块中,粘贴一些可以在 Twitter 的[preview.html 文件源代码][6] 中找到的 emoji 字符串。我使用了 🎹 和 🏁,当然我并不知道在浏览器窗口中它们的样子。是的,你必须粘贴并猜测它们。你已经看出了问题,我们将在 第二小节中予以解决。 +在 ``块中,粘贴一些可以在 Twitter 的[preview.html 文件源代码][6] 中找到的 emoji 字符串。我使用了 🎹 和 🏁,当然我并不知道在浏览器窗口中它们的样子。是的,你必须粘贴并猜测它们。你已经看出了问题,我们将在第二小节中予以解决。 无论如何,通过一些尝试,你可以将一个如下图的原始 HTML 文件--- ![](http://a4.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODQyNTMzNTQ1OTk0.png) ----转变成如下图的网页: +---显示为如下图的网页: ![](http://a1.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODExNjYzNDU1NTA2.png) @@ -52,11 +52,11 @@ Unicode 甚至拥有其自己的 [原始 emoji][5],它们可以 在没有你 - 一旦你将上面的代码添加了进去,你便可以删除先前添加的 Twitter 的脚本链接。 +一旦你将上面的代码添加了进去,你便可以删除先前添加的 Twitter 的脚本链接。 - 现在,找到 `body` 块部分的代码,然后添加一些 emoji 符号。我使用了 ``, ``, `` 和 ``。 +现在,找到 `body` 块部分的代码,然后添加一些 emoji 符号。我使用了 ``, ``, `` 和 ``。 - 最终,你将得到如下的代码: +最终,你将得到如下的代码: ![](http://a2.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODcyMDYxNDU2MzU0.png) @@ -64,9 +64,9 @@ Unicode 甚至拥有其自己的 [原始 emoji][5],它们可以 在没有你 ![](http://a1.files.readwrite.com/image/upload/c_fit,w_620/MTI1OTA2ODExOTMxODkwOTYy.png) -当当!这样你不仅得到了一个可以在浏览器中支持 emoji 符号的基本网页,而且还知道了如何简单地实现它。你可以随意的在[我的 GitHub][9] 中查看这个教程,并且可以克隆这些实际的文件而不只是看看这些截图。 +Duang!这样你不仅得到了一个可以在浏览器中支持 emoji 符号的基本网页,而且还知道了如何简单地实现它。你可以随意的在[我的 GitHub][9] 中查看这个教程,并且可以克隆这些实际的文件而不只是看看这些截图。 -来自于[得到 Emoji][10]的引导图像; Lauren Orsini 截图。 +题图来自于[得到 Emoji][10]; Lauren Orsini 截图。 -------------------------------------------------------------------------------- @@ -74,7 +74,7 @@ via: http://readwrite.com/2014/11/12/how-to-use-emoji-in-the-browser-window 作者:[Lauren Orsini][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7edb0d612567915d22a949e106ea02fc61c878da Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 28 Feb 2015 21:35:12 +0800 Subject: [PATCH 0125/2517] Update and rename translated/tech to translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md --- ... full kernel source on Debian or Ubuntu.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md diff --git a/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md new file mode 100644 index 0000000000..1296b0f975 --- /dev/null +++ b/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md @@ -0,0 +1,58 @@ +Linux有问必答:如何在Debian或Ubuntu上安装完整的内核源码 +================================================================================ +> **问题**:我需要为我的Debian或Ubuntu下载并安装完整树结构的内核源码以供编译一个定制的内核。那么在Debian或Ubuntu上有什么可行的方法来下载完整的内核源码呢? + +在给你的Linux安装完整内核源码之前,先问问自己是否真的需要这样做。如果你仅仅是尝试去编译一个内核模块或是为内核定制驱动,你并不需要完整的内核源码树。你只需要安装[一些与内核对应的头文件][1],这样就足够了。 + +只有在你需要生成一个定制的内核,而且内核源码中的一些内核默认设置要被你调整了的情况下,你才需要完整的内核源码树。 + +这里将会解答如何**在Debian或Ubuntu的库中下载并安装完整树结构的内核源码**。虽然你可以在这个网站[https://www.kernel.org/pub/linux/kernel/][2]下载官方的内核源码,但是发行版软件仓库可以允许你下载包含补丁的内核源码。 + +### 在Debian上安装完整的内核源码 ### + +在下载内核源码之前,先安装dpkg-dev,其中包含你在Debian上生成源代码时需要的开发工具套件。不仅如此,dpkg-dev中还包含在用来解压Debian源码包并自动打补丁的工具dpgk-source。 + + $ sudo apt-get install dpkg-dev + +然后,运行以下命令下载完整的内核源码。 + + $ apt-get source linux-image-$(uname -r) + +伴随着完整内核源码(linux_X.X.XX.orig.tar.xz)的还有一些可用的内核补丁(linux_X.X.X+XXX.debian.tar.xz)和源码控制文件(linux_XXXX.dsc),这些都将被下载并存储到当前目录。在.dsc文件中会指出如何给内核源码打补丁。 + +当下载完成,以上的命令将会自动调用工具dpkg-source将下载的内核源码解压到当前的目录中,与此同时更具.dsc文件来下补丁。 + +最终完整的内核源码树将会以"linux-X.X.XX"的形式呈现在当前目录中。 + +![](https://farm9.staticflickr.com/8676/16341110300_b4f059eeb0_b.jpg) + +### 在Ubuntu上安装完整内核源码 ### + +如果你想安装完整内核源码的话,以上在Debian上的那一套做法在Ubuntu上仍然奏效。 + +在Ubuntu上还有另一套方法安装完整内核源码。事实上,你可以查一下由Canonical为Ubuntu不同发行版维护的内核源码树。 + + $ sudo apt-get install git + $ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-$(lsb_release --codename | cut -f2).git + +举个例子,如果你使用的是Ubuntu14.04,以上的命令将会查看Git的"ubuntu-trusty"仓库中的代码。 + +![](https://farm9.staticflickr.com/8642/16526856391_de636ff9b8_c.jpg) + +一旦在你对Git仓库的查询结束后,使用以下的命令来安装用来访问生成内核源码树所需依赖的重要开发包。 + + $ sudo apt-get build-dep linux-image-$(uname -r) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-full-kernel-source-debian-ubuntu.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/install-kernel-headers-linux.html +[2]:https://www.kernel.org/pub/linux/kernel/ From d9246bbbdea839879993958ec5a8c55600cd026e Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 28 Feb 2015 21:39:32 +0800 Subject: [PATCH 0126/2517] Delete 20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md --- ... full kernel source on Debian or Ubuntu.md | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md deleted file mode 100644 index 65b3a08c48..0000000000 --- a/sources/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md +++ /dev/null @@ -1,60 +0,0 @@ -translating by martin. - -Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu -================================================================================ -> **Question**: I need to download and install a full kernel source tree to compile a custom kernel for my Debian or Ubuntu system. What is a proper way to download full kernel source on Debian or Ubuntu? - -Before installing full kernel source on your Linux system, ask yourself whether you really need the full kernel source. If you are trying to compile a kernel module or a custom driver for your kernel, you do not need the full kernel source. You only need to install [matching kernel header files][1], and that's it. - -You need the full kernel source tree only if you want to build a custom kernel after modifying the kernel code in any way and/or tweaking default kernel options. - -Here is how to **download and install full kernel source tree from Debian or Ubuntu repositories**. While you can download the official kernel source code from [https://www.kernel.org/pub/linux/kernel/][2], using distro's repositories allows you to download a kernel source with the maintainer's patches applied to it. - -### Install Full Kernel Source on Debian ### - -Before downloading kernel source, install dpkg-dev, which contains a suite of development tools needed to build Debian source packages. Among other things, dpkg-dev contains dpgk-source tool which can extract a Debian source package and automatically apply patches. - - $ sudo apt-get install dpkg-dev - -Next, run the following command to download full kernel source. - - $ apt-get source linux-image-$(uname -r) - -Along with the full kernel source (linux_X.X.XX.orig.tar.xz), any available kernel patches (linux_X.X.X+XXX.debian.tar.xz) and source control file (linux_XXXX.dsc) will also be downloaded and stored in the current directory. The .dsc file instructs how the patches are applied to the kernel sources. - -Upon the completion of download, the above command will automatically invoke dpkg-source tool, which will unpack the downloaded kernel source in the current directory, and apply downloaded patches according to .dsc file. - -The final full kernel source tree will be available in the current directory as "linux-X.X.XX". - -![](https://farm9.staticflickr.com/8676/16341110300_b4f059eeb0_b.jpg) - -### Install Full Kernel Source on Ubuntu ### - -If you want to install full kernel source, the Debian way described above should work on Ubuntu as well. - -There is another way to download full kernel source on Ubuntu. You can actually check out the kernel source tree maintained by Canonical for different Ubuntu releases. - -$ sudo apt-get install git -$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-$(lsb_release --codename | cut -f2).git - -For example, if you are using Ubuntu 14.04, the above command will check out code from "ubuntu-trusty" Git repository. - -![](https://farm9.staticflickr.com/8642/16526856391_de636ff9b8_c.jpg) - -Once you check out the Git repository, use the following command to install necessary development packages to meet the build dependencies for the kernel source tree. - - $ sudo apt-get build-dep linux-image-$(uname -r) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/install-full-kernel-source-debian-ubuntu.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/install-kernel-headers-linux.html -[2]:https://www.kernel.org/pub/linux/kernel/ From 184a516a7716a23f2d3455315cfdf094e5340b9e Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 28 Feb 2015 21:41:56 +0800 Subject: [PATCH 0127/2517] PUB:20141120 How to install Xen hypervisor on unused old hardware @liaoishere --- ...l Xen hypervisor on unused old hardware.md | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) rename {translated/tech => published}/20141120 How to install Xen hypervisor on unused old hardware.md (82%) diff --git a/translated/tech/20141120 How to install Xen hypervisor on unused old hardware.md b/published/20141120 How to install Xen hypervisor on unused old hardware.md similarity index 82% rename from translated/tech/20141120 How to install Xen hypervisor on unused old hardware.md rename to published/20141120 How to install Xen hypervisor on unused old hardware.md index 87a28c57fc..f26d753e00 100644 --- a/translated/tech/20141120 How to install Xen hypervisor on unused old hardware.md +++ b/published/20141120 How to install Xen hypervisor on unused old hardware.md @@ -1,11 +1,11 @@ - 怎样在废旧的硬件上安装 Xen 虚拟机监视器 ================================================================================ -Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必须准备一个裸机来安装和运行 Xen。KVM 和 Xen 有一些不同 —— 你可以把它安装在任何已经正在运行 Linux 的机器上。本教程描述了如何在废旧的硬件上安装和配置 Xen 虚拟机监视器。 +Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必须准备一个裸机来安装和运行 Xen。而 KVM 则和 Xen 有一些不同 —— 你可以把它添加到任何已经正在运行 Linux 的机器上。本教程描述了如何在废旧的硬件上安装和配置 Xen 虚拟机监视器。 整个安装过程使用 Debian Jessie(Debian 的测试发行版)作为宿主机操作系统(也称作 [Dom0][1])。Jessie 并不是唯一的选择 —— Xen 的支持是内建在 Linux 内核中的,[许多 Linux 发行版][2] 都包含支持 Xen 的内核。 ### 找点废旧的硬件 ### + 首先,找一个可以格式化的合适的工作站,比如一台旧的笔记本或者台式机。旧的硬件可能不适合玩游戏,但是足够安装一个宿主机和一些客户机了。一个满足下面这些要求的 PC 机就可以了。 - 一个双核 CPU(64 位) @@ -14,7 +14,7 @@ Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必 - 能够从 CD,DVD 或者 USB 引导启动 - 一块网卡 -注意 CPU 必须是 64 位的,因为 Debian 已经不再支持 32 位的 Xen 安装包。如果你没有空余的硬件,你可以花点钱投资一台旧机器。2010 年值 $1000 的旗舰级笔记本现在只需要 $100。从 eBay 买台二手笔记本并升级下内存也可以满足需求。 +注意 **CPU 必须是 64 位的,因为 Debian 已经不再支持 32 位的 Xen 安装包**。如果你没有空余的硬件,你可以花点钱买一台旧机器。2010 年值 $1000 的旗舰级笔记本现在只需要 $100。从 eBay 买台二手笔记本并升级下内存也可以满足需求。 ### 刻录一个引导 CD/USB ### @@ -41,19 +41,19 @@ Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必 这里的设置使用了四个分区。自动安装时通常会创建一个包含逻辑分区的扩展分区。像下面这样给硬盘分四个区。 - sda1 挂载至 /boot,200MB -- sda2 /, 20GB, Ubuntu 占用 4GB -- sda3 swap, 6GB (4GB x 1.5 = 6) +- sda2 做为 /, 20GB, Ubuntu 占用 4GB +- sda3 做为 swap, 6GB (4GB x 1.5 = 6) - sda4 保留用作 LVM, 不挂载,大小为剩余的硬盘大小 ### 安装基本的系统 ### -这里尽可能的让系统的安装更简单快速一些。一个基本的工作用系统可以稍后再添加。Debian 的 APT(Advanced Package Tool)使得添加软件非常的简单。在一个工作站上安装 Deibian 可能会有一些很浪费时间的问题。可能显卡驱动与内核不监控或者可能老旧的 CD-ROM 驱动器只能间歇性的工作。 +这里尽可能的让系统的安装更简单快速一些。一个基本的工作用系统可以稍后再添加。Debian 的 APT(Advanced Package Tool)使得添加软件非常的简单。在机器上安装 Debian 可能会有一些很浪费时间的问题。可能显卡驱动与内核不监控或者可能老旧的 CD-ROM 驱动器只能间歇性的工作。 当选择安装软件时,选择安装一个 SSH 服务器,不要安装桌面环境如 Gnome。 ![](https://farm9.staticflickr.com/8541/15176520633_5d31beda9c_z.jpg) -安装一个图形桌面需要安装成百上千的包 —— 这些额外的工作可以稍后再进行。如果你遇到问题了,等到图形桌面的安装会浪费很多事件。同时,没有桌面组件,系统的启动可以更快一些 —— 只需要几十秒而不是几分钟。整个安装过程会需要重启几次,因此这样做可以节省不少时间。 +安装一个图形桌面需要安装成百上千的包 —— 这些额外的工作可以稍后再进行。如果你遇到问题了,等待图形桌面的安装会浪费很多时间。同时,没有桌面组件,系统的启动可以更快一些 —— 只需要几十秒而不是几分钟。整个安装过程会需要重启几次,因此这样做可以节省不少时间。 一个 SSH 服务器可以让你从另一台电脑来配置这台工作站。这可以避免一些旧硬件的问题 —— 可能旧机器的键盘少了几个键,LCD 屏幕有坏点或者触摸板没有反应等等。 @@ -79,9 +79,9 @@ Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必 检查 LVM 状态。 - # pvs (to view information about physical volumes) - # vgs (to view information about volume groups) - # lvs (to view information about logical volumes) + # pvs (查看物理卷的信息) + # vgs (查看卷组的信息) + # lvs (查看逻辑卷的信息) ### 添加一个 Linux 网桥 ### @@ -92,7 +92,6 @@ Xen 是一个直接运行在硬件上的虚拟机监视器,这意味着你必 # apt-get install bridge-utils 查看在哪块网卡配置桥接。 -See what interfaces are configured. # ip addr @@ -156,13 +155,13 @@ See what interfaces are configured. ![](https://farm8.staticflickr.com/7535/15794086091_bf1bce6b4b_z.jpg) -第一个选项会在 5 秒钟内自动启动(在 /etc/default/grub 的 GRUB_TIMEOUT 这行设置),因此这点时间还来不及喝咖啡的。 +第一个选项会在 5 秒钟内自动启动(在 /etc/default/grub 的 GRUB_TIMEOUT 这行设置),因此这点时间可来不及喝咖啡。 按下方向键选择 "Debian GNU/Linux, with Xen hypervisor" 这个选项,然后按回车。这时屏幕会出现很多行信息,接着是正常的登录界面。 ### 检查 Xen 工作是否正常 ### -Xen 虚拟机监视器嗲有一个管理 Xen 的命令行工序叫做 xl,可以用来创建和管理 Xen 虚拟机。使用 xl 命令来检查 Xen 是否成功安装了。 +Xen 虚拟机监视器带有一个管理 Xen 的命令行程序叫做 xl,可以用来创建和管理 Xen 虚拟机。使用 xl 命令来检查 Xen 是否成功安装了。 以 root 用户登录,执行: @@ -206,9 +205,11 @@ Xen 虚拟机监视器嗲有一个管理 Xen 的命令行工序叫做 xl,可 ### 最后 ### -如果你使用这台主机作为你的工作站,可以安装一个图形桌面。Debian 包好几种[桌面环境][6]。如果你想要一个包含所有东西的图形桌面,那么安装 Gnome 吧。如果图形效果并不是你的菜,试试 Awesome 吧。 +如果你使用这台主机作为你的工作站,可以安装一个图形桌面。Debian 包括好几种[桌面环境][6]。如果你想要一个包含所有东西的图形桌面,那么安装 Gnome 吧。如果它的图形效果并不是你的菜,试试 Awesome 吧。 -注意 Debian 的默认 Gnome 环境有大量的额外应用程序包括办公套件 LibreOffice,Iceweasel 浏览器和 Rhythmbox 音乐播放器。安装命令 "apt-get install gnome" 会安装 1,000 多个包并需要将近 2GB 的硬盘空间。运行这个重量级的桌面环境需要占用 1GB 的内存。 +注意 Debian 的默认 Gnome 环境有大量的额外应用程序包括办公套件 LibreOffice,Iceweasel 浏览器和 Rhythmbox 音乐播放器。安装命令 "apt-get install gnome" 会安装 1,000 多个包并需要将近 2GB 的硬盘空间。运行这个重量级的桌面环境需要占用 1GB 的内存。 + +(LCTT 译注:本文没有涉及如何安装 guest 虚拟机,请关注后继文章) -------------------------------------------------------------------------------- @@ -216,7 +217,7 @@ via: http://xmodulo.com/install-xen-hypervisor.html 作者:[Nick Hardiman][a] 译者:[Liao](https://github.com/liaoishere) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a606951d16fa23112efc8526df089a0041dd8f0c Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 28 Feb 2015 21:42:39 +0800 Subject: [PATCH 0128/2517] translated From ed8f63cb1e20ba4a83770945200db2ef9e4ce78d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 28 Feb 2015 22:32:33 +0800 Subject: [PATCH 0129/2517] PUB:20150119 Cutegram--A Better Telegram Client For GNU or Linux @geekpi --- ...Better Telegram Client For GNU or Linux.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md (54%) diff --git a/translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md b/published/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md similarity index 54% rename from translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md rename to published/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md index 4f0a57ff52..57511dd73c 100644 --- a/translated/tech/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md +++ b/published/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md @@ -1,12 +1,12 @@ -Cutegram: 一个GNU/Linux下更好的Telegram客户端 +Cutegram: 一个GNU/Linux下不错的Telegram客户端 ================================================================================ -不需要再介绍**Telegram**了,对吧。Telegram是一款流行的免费即时通信工具,帮助在全球与你的朋友聊天。不像Whatsapp,Telegram是永久免费、没有广告、没有订阅费用。并且Telegram客户端也是开源的。Telegram在许多不同的平台中都有,包括Linux、Android、iOS、Windows Phone和Mac OS X。使用telegram发送的消失是高度加密且会自我毁灭。它很安全,并且没有对你媒体和聊天的大小作限制。 +不需要再介绍**Telegram**了,对吧。Telegram是一款流行的免费即时通信工具,帮助你在全球与朋友聊天。不像Whatsapp,Telegram是永久免费、没有广告、没有订阅费用的。并且Telegram客户端也是开源的。Telegram在许多不同的平台中都有,包括Linux、Android、iOS、Windows Phone和Mac OS X。使用telegram发送的消息是高度加密且会自我销毁。它很安全,并且没有对你的多媒体和聊天的大小作限制。 -在[先前的教程][1]中我们已经提到你可以在Ubuntu/Debian中安装Telegram。然而,一个新的Telegram客户端叫**Cutegram**出现了,可以使你的聊天体验更加有趣和简单。 +在[先前的教程][1]中我们已经提到你可以在Ubuntu/Debian中安装Telegram。然而,有一个新的Telegram客户端叫**Cutegram**出现了,可以使你的聊天体验更加有趣和简单。 ### Cutegram是什么? ### -Cutegram是一款GNU/Linux中专注于用户友好、与LInux桌面环境兼容和易于使用的开源telegram客户端。Cutegram使用Qt5、QML、libqtelegram、libappindication、AsemanQtTools技术和Faenzatu图标和Twitter emojies图片集。它在GPLv3许可证下免费发布。 +Cutegram是一款专注于用户友好、与Linux桌面环境兼容和易于使用的开源 telegram 的 GNU/Linux客户端。Cutegram使用Qt5、QML、libqtelegram、libappindication、AsemanQtTools技术和Faenzatu图标和Twitter emojie图片集。它在GPLv3许可证下免费发布。 ### 安装 Cutegram ### @@ -31,7 +31,7 @@ Cutegram是一款GNU/Linux中专注于用户友好、与LInux桌面环境兼容 设置执行权限: - chmod + cutegram-1.0.2-linux*.run + chmod a+x cutegram-1.0.2-linux*.run 如下进行安装。 @@ -41,22 +41,21 @@ Cutegram是一款GNU/Linux中专注于用户友好、与LInux桌面环境兼容 在菜单或者Unity dash中启动Cutegram。在登录界面,选择你的国家并输入电话号码,最好点击**Login** -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_005.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/Cutegram_005.png) -A code will be sent to your mobile number. Enter the code and click **Sign in**. -一个验证码将会发送到你手机上。输入验证码病点击**** +一个验证码将会发送到你手机上。输入验证码并点击**Sign in** -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_002.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/Cutegram_002.png) 你会看到 -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_003.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/Cutegram_003.png) 开始聊天吧! -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Cutegram_004.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/Cutegram_004.png) -接着,你可以设置头像,开始新的聊天/群聊,或者使用左边面板的按钮开始秘密聊天。 +接着,你可以设置头像,开始新的聊天/群聊,或者使用左边面板的按钮开始秘密聊天。 玩得开心!干杯!! @@ -68,7 +67,7 @@ via: http://www.unixmen.com/cutegram-better-telegram-client-gnulinux/ 作者:[SK][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 502429180bd3526a47a98a26881407bfe4283998 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 1 Mar 2015 00:58:28 +0800 Subject: [PATCH 0130/2517] Translated 20141127 11 Usefull Utilities To Supercharge Your Ubuntu Experience.md --- ...s To Supercharge Your Ubuntu Experience.md | 156 ------------------ ...s To Supercharge Your Ubuntu Experience.md | 155 +++++++++++++++++ 2 files changed, 155 insertions(+), 156 deletions(-) delete mode 100644 sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md create mode 100644 translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md diff --git a/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md b/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md deleted file mode 100644 index 928778fc4b..0000000000 --- a/sources/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md +++ /dev/null @@ -1,156 +0,0 @@ -Translating by FSSlc - -11 Useful Utilities To Supercharge Your Ubuntu Experience -================================================================================ -**Whether you’re a relative novice or a seasoned pro, we all want to get the most from our operating system. Ubuntu, like most modern OSes, has more to offer than what is presented at first blush.** - -From tweaking and refining the look, behaviour and performance of the Unity desktop to performing system maintenance, there are a huge array of useful utilities and apps that can help **tune Ubuntu to meet your needs in no time**. - -Caveat time: Ubuntu has always shipped with ‘sane defaults’ — options that just work — out of the box. These defaults are well suited for the majority of people. They’re tested, accepted and recommended. - -But one size doesn’t fit all. For the tinkerers and experimenters among us the default experience is a starting point from which to tailor. - -So, without any more waffle, here is a set of 11 nifty utilities to help you supercharge your Ubuntu experience. - -### Unity Tweak Tool ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/unity-tweak-tool.jpg) - -I’ll kick off this list with the big one: **Unity Tweak** Tool. The kitchen sink of customisation, Unity Tweak Tool offers a comprehensive set of system tweaks tuned for Ubuntu and the Unity desktop. - -It’s stuffed full of switches, toggles and control, letting you configure everything from the way Unity looks to the way it behaves. Use it to **quickly and easily change the GTK theme and icon set**, set up hot corners, adjust launcher size, add or remove workspaces, and — notably — enable Unity’s elusive ‘minimise on click’ feature. - -Free and readily available from the Software Center, Unity Tweak Tool is one well worth keeping in your back pocket. - -### Unity Privacy Indicator ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/indicator-privacy-in-ubuntu.jpg) - -Privacy. A big, big issue and rightly so. But the topic is often shaded rather than binary; you may be happy to let some data or habits, say apps you frequently open, be logged locally, but not be ok with the searches you make in the Dash being ferried to a third-party server (however anonymous that data may be). - -[Privacy Indicator][1] is a useful tool to help you stay abreast of what files, folders and services are being accessed, logged and recce’d on the Ubuntu desktop. - -With a quick click on the ‘eye’ icon added to the desktop panel you can: - -- Toggle Online Search Results, Zeitgeist, HUD Logging & GeoIP -- Quick access to clean Zeitgeist, F2, Recent Files, etc. -- Options to show/hide desktop icons and name in the panel - -The latter two options may seem a little misplaced in this app but have less obvious privacy implications for those who take screenshots or screen share. - -- [Download Indicator Privacy (.deb)][2] - -### Unity Folders ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/unity-folders.jpg) - -**Android, iOS, OS X, Chrome OS, and GNOME Shell have app folders, and so can Unity with a nifty third-party app. ** - -“Unity Folders” allows you to organise apps on the Unity Launcher into handy folders — think ‘games’, ‘office’, ‘social‘, etc. You get quick access to your favourite apps without needing to open the Dash, which may suit your workflow. - -Each ‘folder’ is, actually, an application that opens up and positions itself near the origin point. But the overall effect is one that looks like an OS X style stack or an Android folder popover. - -Folder icons can be customised or auto-generated based on the applications tucked up inside. Existing folders can be edited, rearranged, rename and re-other stuff, too. - -- Create as many folders as you like -- Choose custom or auto-generated folder icon -- 3 folder layouts to choose from -- Set custom icons for apps added to folders -- Edit existing folders - -- Unity Folders Website - -### Caffeine ### - -A staple for many of us, and not just in our drinks, Caffeine offers a fast, silent way to stop your screensaver or lock-screen kicking in. The degree of usefulness will depend on your circumstances (read: quirks of your system), and though it’s not quite as user friendly as it once was, it’s still worth [checking out][3]. - -### System Monitor Indicator ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/multiload-indicator-in-ubuntu.jpg) - -If you’re a stat hound who likes to keep tabs on apps, processes and hardware status, Linux makes it easy. From Conky Configs to Terminal Commands — there’s no shortage of ways to monitor your CPU usage, network traffic or GPU temperature. - -But by far my favourite is System **Monitor Indicator** – also known as indicator-multiload — available from the Ubuntu Software Center. It has a host of configuration options, too. - -- [Click to Install ‘System Load Indicator’ on Ubuntu][4] - -### Power Saving Tools for Linux Laptops ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2012/08/front.jpg) - -**TLP** - -Linux distributions don’t have the best reputation when it comes to power efficiency on portable devices. - -If your own Linux laptop can barely get you from the sofa to the kitchen before needing a recharge, there are some tools you can try. - -TLP is one of the most popular automated background tool promising to prolong battery life of laptops running Linux. It does this by adjusting the settings and behaviour of system processes and hardware, such as enabling Wi-Fi power saving mode, runtime power management of PCI bus devices, and processor frequency scaling. - -It’s available to [install on Ubuntu 14.04 LTS and later using the dedicated TLP PPA][5] and comes with a ‘catch-all’ config to get you started. The more advanced users among you can dive in and manually adjust the settings to suit your own hardware, something that a [thorough guide on the TLP wiki][6] makes easy. - -**Laptop Mode Tools** - -If TLP sounds a little too complex — and there’s no shame if it does — there’s a simpler alternative: **Laptop Mode Tools**. This package is available to install from the Ubuntu Software Center and keeps the tweaks made to a set of sane defaults (Wi-Fi, Bluetooth, etc.). - -Laptop Mode Tools cannot be installed at the same time as TLP. - -- [Laptop Mode Tools in Ubuntu Software Center][7] - -### Intel Graphics Installer ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/intelgraphicsdriverinstaller.png) - -The Intel Graphics Installer tool is a must-have for those running Intel graphics hardware who want the best performance they can get. It makes finding and installing the latest Intel GPU drivers a painless, fuss-free affair — no PPAs or Terminal kung foo needed. - -- [Download Intel Graphics Installer for Linux 0.7][8] - -### Hardware Stats ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/Screen-Shot-2014-02-10-at-21.05.37.png) - -If you plan on upgrading your PC or replacing a worn-out part you’ll need to get some specific hardware details, such as RAM type, CPU socket set or what PCI slots are available. - -**I-Nex** makes unearthing this, and host of other detailed system stats, easy. Use it to find your motherboard model number, RAM stepping, S.M.A.R.T. status and…well, pretty much anything else you can think of! - -- [Learn More About I-Nex on Launchpad][9] - -### Disk Space Visualizer ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/disk-usage-visualizer-for-ubuntu.jpg) - -In this age of 1TB hard drives we might not need to be as prudent with disk space as we once were. But for those of using a smallish SSD, running multiple partitions or working in a virtual machine with a fixed-size virtual disk, there’ll be times when freeing up a bit of extra space is required. - -GNOME Disks, installed in Ubuntu by default, makes finding the biggest space-gobbling culprits easy. Ideal for locating hidden logs, caches, and media files. - -### BleachBit (Cruft Cleaner) ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/bleachbit.jpg) - -Windows users will be familiar with applications like CCleaner, which scan for and clean out junk files, empty folders, bloated caches, and obsolete packages. For a a similarly quick and effortless click n’ clean solution on Ubuntu try **BleachBit**. - -It is a powerful tool, so do pay attention to what you’re cleaning. Don’t aimlessly check every box; not everything that it can clean needs to be. Play it smart; when in doubt, leave it out. - -- [Install BleachBit from Ubuntu Software Center][10] - -Got a favourite system utility of your own? Let others know about it in the comments. --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2014/11/useful-tools-for-ubuntu-do-you-use-them - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.florian-diesch.de/software/indicator-privacy/index.html -[2]:http://www.florian-diesch.de/software/indicator-privacy/dist/indicator-privacy_0.04-1_all.deb -[3]:http://www.omgubuntu.co.uk/2014/05/stop-ubuntu-sleeping-caffeine -[4]:apt://indicator-mulitload -[5]:https://launchpad.net/~linrunner/+archive/ubuntu/tlp/+packages -[6]:http://linrunner.de/en/tlp/docs/tlp-configuration.html -[7]:https://apps.ubuntu.com/cat/applications/laptop-mode-tools/ -[8]:https://01.org/linuxgraphics/downloads/2014/intelr-graphics-installer-linux-1.0.7 -[9]:https://launchpad.net/i-nex -[10]:https://apps.ubuntu.com/cat/applications/bleachbit/ diff --git a/translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md b/translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md new file mode 100644 index 0000000000..5b60043bcd --- /dev/null +++ b/translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md @@ -0,0 +1,155 @@ +11 个 增强你的 Ubuntu 使用体验的实用工具 +================================================================================ +**无论你是一个相对的新手还是经验丰富的专家,我们都想从我们的操作系统中得到更多的东西。正如大多数现代的操作系统,相比于乍一看呈现出的内容,Ubuntu 有更多东西可以向我们提供。** + +从调整和优化 Unity 桌面的外观、行为、性能 到 执行系统维护,有着大量的实用工具和应用可以帮助你 **调整 Ubuntu 来无时不刻地满足你的需求**。 + +注意时刻: Ubuntu 一直都配备了‘合理的默认设置---即工作良好的选项---’,以达到开箱即用,这些默认设置适合大多数人,并且它们都是经过了测试,采用及推荐等过程的。 + +但一个尺寸并不适合所有。对于我们当中的能工巧匠和实验主义者来说,默认设置只是他们定制系统的起点。 + +所以,无需更多的唠叨, 这里有 11 个极好的实用工具来帮助你增强你的 Ubuntu 使用体验。 + +### Unity Tweak Tool ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/unity-tweak-tool.jpg) + +我将以这个列表中最重要的一个工具: **Unity Tweak Tool** 来开始这次的介绍。定制的厨房水槽(注:不知该如何翻译,感觉意思是:水槽之于厨房的重要性相当于该软件之于定制 Ubuntu 的重要性), Unity Tweak Tool 提供了一系列针对 Ubuntu 和 Unity 桌面的系统综合调整功能。 + +它被各种开关,切换和控制塞得满满的,使得你可以任意设置从 Unity 桌面的外观到 Unity 的行为之类的任何东西。你可以使用它 **快速简便地改变 GTK 主题和图标集**、设置热区、调整启动器图标尺寸、增加或移除工作区,以及 ---特别地---开启 Unity 桌面中被巧妙隐藏的“通过点击最小化”的特点。 + +免费并可直接从 Ubuntu 软件中心里找到, Unity Tweak Tool 是非常值得保留在你的口袋里的工具之一。 + +### Unity Privacy Indicator ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/indicator-privacy-in-ubuntu.jpg) + +隐私是一个非常,非常重要的事,事实也恰恰如此。但这个话题总是被隐藏在二进制之下(注:感觉这里翻译有误,不太确定)。让一些数据或习惯,比如说你经常打开的应用,在本地被记录下来,这或许会让你感到高兴,但对于 你在 Dash 中的搜索数据被发送带第三方服务机构(尽管这些数据或许是匿名的)这类事情,你就高兴不起来了。 + +[Privacy Indicator][1] 是一个帮助你时刻跟踪 Ubuntu桌面系统中哪些文件、目录和服务正被获取、记录及搜索的实用工具。 + +通过快速的点击被添加到桌面面板上的‘眼睛’图标,你可以: + +- 开启或关闭在线搜索结果,Zeitgeist(注:根据图片看,Zeitgeist 指的是 record activity), HUD 记录 和 GeoIP 服务 +- 快速的启用 清理 Zeitgeist,F2(注:根据图片看,F2 指的是 通过 Alt-F2 执行的命令),当前文件等等的记录数据 +- 展示或隐藏桌面图标以及它们在桌面面板上的名称 + +上面的最后两个选项在这个应用中似乎有点被放错了位置,但对于那些要分享截图或截屏的人来说,将会泄露更少的隐私。 + +- [从这里下载 Indicator Privacy (.deb)][2] + +### Unity Folders ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/unity-folders.jpg) + +**Android, iOS, OS X, Chrome OS, 和 GNOME Shell 都有应用橱窗, 借助一个极好的第三方应用,Unity 也可以实现类似功能。** + +“Unity Folders” 允许你组织位于 Unity 启动器中的应用到实用的橱窗中,--- 如 游戏,办公,社交等。不必打开 Dash,你就可以快速启动你喜爱的应用,这非常适合你的工作流。 + +每一个 ‘橱窗’其实一个打开 ,但总体效果看上去就像是一个 OS X 的风格栈 或 Android 的切换框(注:这里的翻译我拿不准)。 + +橱窗的图标可以自定义或根据橱窗内的应用来自动生成。已经存在的橱窗可以被编辑,重新组织,重命名以及如下的更多选择: + +- 根据你的喜好创建任意多的橱窗 +- 选择自定义或自动生成橱窗图标 +- 可选择 3 种橱窗样式 +- 为添加到橱窗中的应用设定自定义图标 +- 编辑现有橱窗 + +[Unity Folders 的网址](http://unity-folders.exceptionfound.com/) +(注:根据原文来看,这里应该有链接,转换为 md 文档时没有加上链接) + +### 咖啡因 ### + +对于我们中的许多人来说,咖啡因是主食,它并不只存在于饮料之中。咖啡因提供了一个快速,温和的方式来阻止你的屏保或锁屏起作用。有用的程度将取决于你的环境(即你系统的怪癖) (注:这一句我没有完全理解原文的意思),并且尽管它不像以前那样对用户友好,它仍然值得你[尝试一下][3]。 + +### 系统状态指示器 (System Monitor Indicator) ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/multiload-indicator-in-ubuntu.jpg) + +假如你是一个状态迷,即一个喜欢密切关注程序,进程和硬件的状态的人, Linux 很容易满足你的需求。从 Conky 的配置到终端命令,并不缺少监视你的 CPU 使用情况、网络流量或 GPU 温度的方法。 + +但至今为止,我最喜爱的应用是 系统**监视指示器**,---也被叫做多负载指示器---它可从 Ubuntu 软件中心获得。它也有着大量的配置选项。 + +- [点击这个链接,在 Ubuntu 中 下载 ‘System Load Indicator’][4] + +### 针对 Linux 笔记本电脑的省电工具 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2012/08/front.jpg) + +**TLP** + +当提到便携式设备上的电池使用效率时,Linux 发行版本并没有最好的声誉。 + +如果你自己的 Linux 笔记本可以勉强在再次充电之前,让你从沙发到厨房,那么这里有几个你可以试试的工具。 + +TLP 是最受欢迎的确保延长 Linux 笔记本的电池寿命的自动化后台工具之一,它是通过调整系统进程和硬件的设置及行为来达到此目的的,例如 启动 Wi-Fi 省电模式, PCI 总线设备的实时电量管理和处理器的频率缩放调整。 + +在 Ubuntu 14.04 LTS 以及后续发行版本中可以使用 TLP 专用的 PPA 来安装它。且它只带了‘包罗万象’的设置来使你踏上配置它的旅程。 在我们之中的高级用户可以潜心研究并根据你自己的硬件来调整设置,一个 [关于 TLP 的完整指导 wiki][6] 使得设置更加容易。 + +**Laptop Mode Tools** + +假如 TLP 听起来有一点复杂 --这也并没有什么可羞耻的--这里有一个更简单的替代品: **Laptop Mode Tools**。 这个软件包可从 Ubuntu 软件中心直接安装,且本身设置好了一系列合理的默认设置(Wi-Fi,蓝牙等等)。 + +Laptop Mode Tools 不能和 TLP 同时被安装在电脑中。 + +- [Ubuntu 软件中心里的 Laptop Mode Tools ][7] + +### Intel 显卡驱动安装工具 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/intelgraphicsdriverinstaller.png) + +对于那些运行 Intel 显卡硬件,并想使得这些硬件发挥出最佳性能的人来说,Intel 显卡安装工具是必须拥有的。 它使得 查找并安装最新的 Intel GPU 驱动变得不再是一件痛苦和大费周折的事 ---因为这无需 PPA 或任何的终端使用知识。 + +- [下载针对 Linux平台的 Intel 图形安装器 0.7 版本][8] + +### Hardware Stats ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/Screen-Shot-2014-02-10-at-21.05.37.png) + +假如你计划 升级你的 PC 或替换一个坏掉的零部件,你需要知道一些特定的硬件信息,例如 RAM 类型,CPU插座类型 或 查看那个PCI 槽是可用的等信息。 + +**I-Nex**可以使得 发掘出以上的信息以及其他的系统具体状态变得更加容易。使用它来查找你的主板型号、S.M.A.R.T.(注:为 Self-Monitoring, Analysis and Reporting Technology 的缩写,经常写为 SMART ) 状态,以及你想得出的很多东西! + +- [可从 Launchpad 了解到更多关于 I-Nex 的信息][9] + +### 磁盘空间可视化程序(Disk Space Visualizer) ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/disk-usage-visualizer-for-ubuntu.jpg) + +在这个硬盘以 1TB 计数的时代,我们或许不必同以前一样对硬盘空间的使用三思而后行。但对于那些使用小容量的 SSD,运行多个分区或在一个拥有固定虚拟磁盘大小的虚拟机上工作,总有感觉 释放一些额外空间是必要的 这种想法的时候。 + +GNOME Disks,在 Ubuntu 中被默认安装,使得查找占用最大磁盘空间的罪魁祸首变得容易。对于定位隐藏的日志、缓存和视频文件,它是非常完美的工具。 + +### BleachBit (Cruft Cleaner) ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/bleachbit.jpg) + +Windows 用户可能对像 CCleaner 之类的应用很熟悉,它可以扫描并清理垃圾文件、空白文件夹、臃肿的缓存以及陈旧的软件包。在 Ubuntu 上,一个相似的快速且毫不费力的一键式清理方法可以试试 **BleachBit** 。 + +它是一个强大的工具,所以一定要注意你正在清理什么。不要漫无目的地确认每个选项框;不是所有的东西它都可以清理。所以请合理地使用它,当你对某个选项有疑问时,就跳过它。 + +- [Install BleachBit from Ubuntu Software Center][10] + +你已经有了自己最喜欢的系统实用工具了吗?可以在下面的评论中让其他人知晓它。 +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/useful-tools-for-ubuntu-do-you-use-them + +作者:[Joey-Elijah Sneddon][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.florian-diesch.de/software/indicator-privacy/index.html +[2]:http://www.florian-diesch.de/software/indicator-privacy/dist/indicator-privacy_0.04-1_all.deb +[3]:http://www.omgubuntu.co.uk/2014/05/stop-ubuntu-sleeping-caffeine +[4]:apt://indicator-mulitload +[5]:https://launchpad.net/~linrunner/+archive/ubuntu/tlp/+packages +[6]:http://linrunner.de/en/tlp/docs/tlp-configuration.html +[7]:https://apps.ubuntu.com/cat/applications/laptop-mode-tools/ +[8]:https://01.org/linuxgraphics/downloads/2014/intelr-graphics-installer-linux-1.0.7 +[9]:https://launchpad.net/i-nex +[10]:https://apps.ubuntu.com/cat/applications/bleachbit/ From ae052da79bea48274ad1fbe4737ac4b4a6650318 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 1 Mar 2015 01:04:16 +0800 Subject: [PATCH 0131/2517] Update 20150104 How to set up a cross-platform backup server on Linux with BackupPC.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译。 --- ...p a cross-platform backup server on Linux with BackupPC.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md b/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md index 48df08fa3b..41336f53f6 100644 --- a/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md +++ b/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md @@ -1,3 +1,5 @@ +FSSlc translating + How to set up a cross-platform backup server on Linux with BackupPC ================================================================================ Just in case you haven't been able to tell from my earlier posts on [backupninja][1] and [backup-manager][2], I am a big backup fan. When it comes to backup, I'd rather have too much than not enough, because if the need arises, you will be grateful that you took the time and effort to generate extra copies of your important data. @@ -131,4 +133,4 @@ via: http://xmodulo.com/backuppc-cross-platform-backup-server-linux.html [4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html [5]:http://ask.xmodulo.com/enable-nux-dextop-repository-centos-rhel.html [6]:http://xmodulo.com/recommend/linuxguide -[7]:http://xmodulo.com/how-to-enable-ssh-login-without.html \ No newline at end of file +[7]:http://xmodulo.com/how-to-enable-ssh-login-without.html From 26f1f6cba931d73c1d4944da5e14540516920107 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 28 Feb 2015 15:27:17 -0300 Subject: [PATCH 0132/2517] repair the reposit and translate --- ...e a syslog server with rsyslog on Linux.md | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 translated/tech/20141205 How to configure a syslog server with rsyslog on Linux.md diff --git a/translated/tech/20141205 How to configure a syslog server with rsyslog on Linux.md b/translated/tech/20141205 How to configure a syslog server with rsyslog on Linux.md new file mode 100644 index 0000000000..21d6e8993b --- /dev/null +++ b/translated/tech/20141205 How to configure a syslog server with rsyslog on Linux.md @@ -0,0 +1,166 @@ +如何在linux上通过rsyslog来配置一个syslog服务器 +======================================================================== +syslog服务器表示一个用来监控一个网络中的端点--所有能够通过网络来发送日志的设施(包含了Linux或Windows服务器,路由器,交换机以及其他主机)--的中央日志。 通过设置一个syslog服务器,可以将不同设施/主机发送的日志,过滤和合并到一个独立的位置,这样使得你更容易地查看和获取重要的日志消息。 + +**rsyslog** 被作为标准的syslog守护进程预装在了大多数的Linux发行版中。在客户端/服务器架构的配置下,**rsyslog**同时扮演了两种角色:1.作为一个syslog服务器,**rsyslog**可以收集来自其他设施的日志信息;2.作为一个syslog客户端,**rsyslog**可以将其内部的日志信息传输到远程的syslog服务器。 + + +在此,我们演示了在linux上如何通过**rsyslog**来配置一个中心化syslog服务器。 在进入详解之前,先温习一下syslog标准。 + +### syslog标准基础### + +当通过syslog机制来收集日志时,有3个必须要考虑到的重要事情: + +- **设施层级**: 监听何种类型的进程 +- **严重性 (优先) 级别**: 收集何种类型的日志消息 +- **目标**: 发送或记录日志消息到何处 + +现在我们更加深入地了解一下配置是如何定义的。 + + +设施层级定义了一种用来对内部系统进程进行分类的方法,linux中的一些常见的设施包括: + +- **auth**: 身份验证相关的消息(登录时) +- **cron**: 进程或应用调度相关的消息 +- **daemon**: 守护进程相关的消息(内部服务器) +- **kernel**: 内核相关的消息 +- **mail**: 内部邮件服务器相关的消息 +- **syslog**: syslog 守护进程本身相关的消息 +- **lpr**: 打印服务相关的消息 +- **local0 - local7**: 用户自定义的消息 (local7 通常被Cisco 和 Windows 服务器 使用) + +严重性(优先)级别是通过标准的缩写和赋予的数字来进行定义和标准化的,其中的数字7具有最高的级别,这些级别包含了: + +- emerg: Emergency(紧急)- 0 +- alert: Alerts (报警)- 1 +- crit: Critical (关键)- 2 +- err: Errors (错误)- 3 +- warn: Warnings (警告)- 4 +- notice: Notification (通知)- 5 +- info: Information (消息)- 6 +- debug: Debugging (调试)- 7 + +最后,目标语句迫使一个syslog客户端来执行以下3个任务中的一个:1.保存日志消息到一个本地文件;2. 通过TCP/UDP将消息路由到远程的syslog服务器中 +;3.将其发送到一个标准输出中,例如控制台。 + +在rsyslog, syslog配置是基于以下模式进行结构化的。 + + [facility-level].[severity-level] [destination] + +### Configure Rsyslog on Linux ### +### 在Linux中配置Rsyslog### + +在我们理解syslog之后,现在是时候来通过rsyslog来将一个Linux服务器配置为一个中心syslog服务器了,另外我们也将看到如何将基于Windows的系统配置为一个syslog客户端来发送内部日志到该syslog服务器中。 + +### 第1步: 初始化系统需求 ### + +为了将linux主机设置为一个中央日志服务器, 我们需要创建一个隔离的/var 分区,并分配足够大的磁盘空间或者创建一个特殊的LVM卷组。这样就会使得syslog服务器能够承担在日积月累收集日志所带来的潜在增长。 + + +### 第2步: 让rsyslog 后台进程生效 ### + +rsyslog守护进程来自于当前的linux发布版本的预装模块,但是默认并没有启动。为了能够让rsyslog守护进程能够接受外部的消息,需要编辑其配置文件/etc/rsyslog.conf. + +如果已经准备好打开文件进行编辑,查找到下面的两行所在的位置,通过删除其行首的#字符来取消其注释。 + + $ModLoad imudp + $UDPServerRun 514 + +这会使得rsysolog守护进程能够在UDP端口514上接受日志消息了---UDP是一种比TCP速度快,但是并不具有TCP一样的数据流程的可靠性。所以如果你需要使用可靠的传送机制,就可以通过取消以下行的注释。 + + $ModLoad imtcp + $InputTCPServerRun 514 + +需要注意的是,TCP和UDP可以被同时生效来监听TCP/UDP 连接。 + +### 第3步:创建日志接受模板### + +接下来的这步,需要我们来为远程消息创建模板,并告知rsyslog守护进程如何记录从其他客户端机器所接受到的消息。 + + +使用文本编辑器来打开 /etc/rsyslog.conf,然后在GLOBAL DIRECTIVE块前追加以下的模板。 + + $template RemoteLogs,"/var/log/%HOSTNAME%/%PROGRAMNAME%.log" * + *.* ?RemoteLogs + & ~ + +在此对该模板进行简单解释,$template RemoteLogs(“RemoteLogs” 字符串可以为任何其他的指令名称)指令强制rsyslog后台进程将日志消息写道/var/log下的分开的本地日志文件中,其中日志文件的名称是基于远程日志发送机器的主机名以及生成该日志的应用程序名进行定义的。其中第二行暗示了我们将RemoteLogs模板应用到所有接受到的日志上。 + + +符号"& ~"表示了一个重定向规则,被用来告知rsyslog守护进程停止对日志消息的进一步处理,并且不要在本地写入。如果该重定向规则没有使用,那么所有的远程消息都会在写入上述描述的日志文件之外同时被写入到本地日志文件,这就意味着日志消息实际上被写了两次。使用该规则的另外一个结果就是syslog服务器本身的日志消息只会被以该机器主机名命名的专有文件中。 + + +如果你想要的话,也可以使用下面的模式对特定的设备或严重性级别使用新的模板直接来记录日志消息。 + + + [facility-level].[severity-level] ?RemoteLogs + +例如: + +将所有内部的所有优先级别的用户验证消息指定为RemoteLogs模板: + + authpriv.* ?RemoteLogs + +将所有系统进程中除开mail,用户验证和cron消息之外的进程产生的消息级别的日志指定为RemoteLogs模板: + + + *.info,mail.none,authpriv.none,cron.none ?RemoteLogs + +如果我们想要将所有从远程客户端接受到的消息写入到一个以它们的IP地址命名的单个文件中,可以使用以下的模板。在此我们为该模板赋予了“IPTemplate”名称。 + + $template IpTemplate,"/var/log/%FROMHOST-IP%.log" + *.* ?IpTemplate + & ~ + +在我们生效rsyslog守护进程以及编辑其配置文件之后,需要重启该守护进程。 + +在 Debian,Ubuntu 或 CentOS/RHEL 6中: + + $ sudo service rsyslog restart + +在 Fedora 或 CentOS/RHEL 7中: + + $ sudo systemctl restart rsyslog + +我们可以通过netstat命令来验证rsyslog守护进程是否正常工作。 + + $ sudo netstat -tulpn | grep rsyslog + +在UDP监听端口下工作的rsyslog守护进程会有类似下面的输出。 + + udp 0 0 0.0.0.0:514 0.0.0.0:* 551/rsyslogd + udp6 0 0 :::514 :::* 551/rsyslogd + +如果rsyslog守护进程被设置在TCP连接端口,那么应该有类似下面所示的输出。 + + tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 1891/rsyslogd + tcp6 0 0 :::514 :::* LISTEN 1891/rsyslogd + +### 发送Windows日志到一个远程的rsyslog服务器### + +为了将一个Windows客户端的日志消息转发到我们的rsyslog服务器,需要一个Windows syslog 代理。当然,有许多的syslog代理可以在windows上运行,在此我们可以使用一个自由软件程序 [Datagram SyslogAgent][1]. + + + +在下载安装该syslog代理后,需要将其配置为作为服务运行。指定使用何种协议来发送数据,以及远程rsyslog服务器的IP地址和端口,最后指定应该传输的事件日志类型,如下所示。 + +![](https://farm8.staticflickr.com/7509/15305930594_27b7f4440a_o.jpg) + +在我们完成所有的这些配置之后,我们就可以启动该服务并且在中央rsyslog服务器中使用命令行工具tailf来查看日志文件了。 + +### 总结### + +通过创建一个可以收集本地和远程主机的中央rsyslog服务器,我们可以更好地了解在这些系统内部究竟发生着什么,而且可以更加容易地调试他们的问题,是否在他们之间有任何缓慢或崩溃存在。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/configure-syslog-server-linux.html + +作者:[Caezsar M][a] +译者:[theo-l](https://github.com/theo-l) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/caezsar +[1]:http://www.syslogserver.com/download.html From 8164797ef82dbb74ef7ae14cce954d944663588e Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 28 Feb 2015 15:27:40 -0300 Subject: [PATCH 0133/2517] repair the reposit and translate --- ...e a syslog server with rsyslog on Linux.md | 154 ------------------ 1 file changed, 154 deletions(-) delete mode 100644 sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md diff --git a/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md b/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md deleted file mode 100644 index 276e5a05fa..0000000000 --- a/sources/tech/20141205 How to configure a syslog server with rsyslog on Linux.md +++ /dev/null @@ -1,154 +0,0 @@ -How to configure a syslog server with rsyslog on Linux -================================================================================ -A syslog server represents a central log monitoring point on a network, to which all kinds of devices including Linux or Windows servers, routers, switches or any other hosts can send their logs over network. By setting up a syslog server, you can filter and consolidate logs from different hosts and devices into a single location, so that you can view and archive important log messages more easily. - -On most Linux distributions, **rsyslog** is the standard syslog daemon that comes pre-installed. Configured in a client/server architecture, **rsyslog** can play both roles; as a syslog server **rsyslog** can gather logs from other devices, and as a syslog client, **rsyslog** can transmit its internal logs to a remote syslog server. - -In this tutorial, we cover how to configure a centralized syslog server using **rsyslog** on Linux. Before we go into the details, it is instructive to go over syslog standard first. - -### Basic of Syslog Standard ### - -When logs are collected with syslog mechanism, three important things must be taken into consideration: - -- **Facility level**: what type of processes to monitor -- **Severity (priority) level**: what type of log messages to collect -- **Destination**: where to send or record log messages - -Let's take a look at how the configuration is defined in more detail. - -The facility levels define a way to categorize internal system processes. Some of the common standard facilities in Linux are: - -- **auth**: messages related to authentication (login) -- **cron**: messages related to scheduled processes or applications -- **daemon**: messages related to daemons (internal servers) -- **kernel**: messages related to the kernel -- **mail**: messages related to internal mail servers -- **syslog**: messages related to the syslog daemon itself -- **lpr**: messages related to print servers -- **local0 - local7**: messages defined by user (local7 is usually used by Cisco and Windows servers) - -The severity (priority) levels are standardized, and defined by using standard abbreviation and an assigned number with number 7 being the highest level of all. These levels are: - -- emerg: Emergency - 0 -- alert: Alerts - 1 -- crit: Critical - 2 -- err: Errors - 3 -- warn: Warnings - 4 -- notice: Notification - 5 -- info: Information - 6 -- debug: Debugging - 7 - -Finally, the destination statement enforces a syslog client to perform one of three following tasks: (1) save log messages on a local file, (2) route them to a remote syslog server over TCP/UDP, or (3) send them to stdout such as a console. - -In rsyslog, syslog configuration is structured based on the following schema. - - [facility-level].[severity-level] [destination] - -### Configure Rsyslog on Linux ### - -Now that we understand syslog, it's time to configure a Linux server as a central syslog server using rsyslog. We will also see how to configure a Windows based system as a syslog client to send internal logs to the syslog server. - -#### Step One: Initial System Requirements #### - -To set up a Linux host as a central log server, we need to create a separate /var partition, and allocate a large enough disk size or create a LVM special volume group. That way, the syslog server will be able to sustain the exponential growth of collected logs over time. - -#### Step Two: Enable Rsyslog Daemon #### - -rsyslog daemon comes pre-installed on modern Linux distributions, but is not enabled by default. To enable rsyslog daemon to receive external messages, edit its configuration file located in /etc/rsyslog.conf. - -Once the file is opened for editing, search and uncomment the below two lines by removing the # sign from the beginning of lines. - - $ModLoad imudp - $UDPServerRun 514 - -This will enable rsyslog daemon to receive log messages on UDP port 514. UDP is way faster than TCP, but does not provide reliability on data flow the same way as TCP does. If you need to reliable delivery, you can enable TCP by uncommenting the following lines. - - $ModLoad imtcp - $InputTCPServerRun 514 - -Note that both TCP and UDP can be set on the server simultaneously to listen on TCP/UDP connections. - -#### Step Three: Create a Template for Log Receipt #### - -In the next step we need to create a template for remote messages, and tell rsyslog daemon how to record messages received from other client machines. - -Open /etc/rsyslog.conf with a text editor, and append the following template before the GLOBAL DIRECTIVES block: - - $template RemoteLogs,"/var/log/%HOSTNAME%/%PROGRAMNAME%.log" * - *.* ?RemoteLogs - & ~ - -This template needs a little explanation. The $template RemoteLogs directive ("RemoteLogs" string can be changed to any other descriptive name) forces rsyslog daemon to write log messages to separate local log files in /var/log/, where log file names are defined based on the hostname of the remote sending machine as well as the remote application that generated the logs. The second line ("*.* ?RemoteLogs") implies that we apply RemoteLogs template to all received logs. - -The "& ~" sign represents a redirect rule, and is used to tell rsyslog daemon to stop processing log messages further, and not write them locally. If this redirection is not used, all the remote messages would be also written on local log files besides the log files described above, which means they would practically be written twice. Another consequence of using this rule is that the syslog server's own log messages would only be written to dedicated files named after machine's hostname. - -If you want, you can direct log messages with a specific facility or severity level to this new template using the following schema. - - [facility-level].[severity-level] ?RemoteLogs - -For example: - -Direct all internal authentication messages of all priority levels to RemoteLogs template: - - authpriv.* ?RemoteLogs - -Direct informational messages generated by all system processes, except mail, authentication and cron messages to RemoteLogs template: - - *.info,mail.none,authpriv.none,cron.none ?RemoteLogs - -If we want all received messages from remote clients written to a single file named after their IP address, you can use the following template. We assign a new name "IpTemplate" to this template. - - $template IpTemplate,"/var/log/%FROMHOST-IP%.log" - *.* ?IpTemplate - & ~ - -After we have enabled rsyslog daemon and edited its configuration file, we need to restart the daemon. - -On Debian, Ubuntu or CentOS/RHEL 6: - - $ sudo service rsyslog restart - -On Fedora or CentOS/RHEL 7: - - $ sudo systemctl restart rsyslog - -We can verify that rsyslog daemon is functional by using netstat command. - - $ sudo netstat -tulpn | grep rsyslog - -The output should look like the following in case rsyslog daemon listens on UDP port. - - udp 0 0 0.0.0.0:514 0.0.0.0:* 551/rsyslogd - udp6 0 0 :::514 :::* 551/rsyslogd - -If rsyslog daemon is set up to listen on TCP connections, the output should look like this. - - tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN 1891/rsyslogd - tcp6 0 0 :::514 :::* LISTEN 1891/rsyslogd - -#### Send Windows Logs to a Remote Rsyslog Server #### - -To forward a Windows based client's log messages to our rsyslog server, we need a Windows syslog agent. While there are a multitude of syslog agents that can run on Windows, we can use [Datagram SyslogAgent][1], which is a freeware program. - -After downloading and installing the syslog agent, we need to configure it to run as a service. Specify the protocol though which it will send data, the IP address and port of a remote rsyslog server, and what type of event logs should be transmitted as follows. - -![](https://farm8.staticflickr.com/7509/15305930594_27b7f4440a_o.jpg) - -After we have set up all the configurations, we can start the service and watch the log files on the central rsyslog server using tailf command line utility. - -### Conclusion ### - -By creating a central rsyslog server that can collect log files of local or remote hosts, we can get a better idea on what is going on internally in their systems, and can debug their problems more easily should any of them become unresponsive or crash. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/configure-syslog-server-linux.html - -作者:[Caezsar M][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/caezsar -[1]:http://www.syslogserver.com/download.html \ No newline at end of file From 1455f404d0544fc8f07b7f9580ac181b760276f6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 1 Mar 2015 13:24:39 +0800 Subject: [PATCH 0134/2517] translating --- ...th Answers--How to install a USB webcam in Raspberry Pi.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md index 443c9c0ad8..1085abddc4 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md @@ -1,3 +1,5 @@ +Translating----geekpi + Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi ================================================================================ > **Question**: Can I use a standard USB-based webcam on Raspberry Pi? How can I check if my USB webcam is compatible with Raspberry Pi, and how can I install it on Raspberry Pi? @@ -60,4 +62,4 @@ via: http://ask.xmodulo.com/install-usb-webcam-raspberry-pi.html [1]:http://xmodulo.com/install-raspberry-pi-camera-board.html [2]:http://xmodulo.com/go/usb_webcam [3]:http://elinux.org/RPi_USB_Webcams -[4]:http://xmodulo.com/go/usb_powerhub \ No newline at end of file +[4]:http://xmodulo.com/go/usb_powerhub From f57d993216e478d424c82e2b911da7bb7db8c13f Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 1 Mar 2015 13:56:29 +0800 Subject: [PATCH 0135/2517] translated --- ...to install a USB webcam in Raspberry Pi.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md index 1085abddc4..805a0aaca4 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md @@ -1,50 +1,48 @@ -Translating----geekpi - -Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi +Linux有问必答 -- 如何在树莓派上安装USB网络摄像头 ================================================================================ -> **Question**: Can I use a standard USB-based webcam on Raspberry Pi? How can I check if my USB webcam is compatible with Raspberry Pi, and how can I install it on Raspberry Pi? +> **Question**: 我可以在树莓派上使用标准的USB网络摄像头么?我该如何检查USB网络摄像头与树莓派是否兼容?另外我该如何在树莓派上安装它? -If you want to take pictures or record videos using Raspberry Pi board, you can install [Raspberry Pi camera board][1]. If you do not want to shell out money just for the camera board module, there is yet another way, which is to utilize a commonly found [USB web camera][2]. You may already have one for your PC. +如果你想在树莓上拍照或者录影,你可以安装[树莓派的摄像头板][1]。如果你不想要为摄像头模块花费额外的金钱,那有另外一个方法,就是你常见的[USB 摄像头][2]。你可能已经在PC上安装了。 -In this tutorial, we show how to set up a USB web camera on Raspberry Pi board. We assume that you are using Raspbian operation system. +本教程中,我会展示如何在树莓派上设置摄像头。我们假设你使用的系统是Raspbian。 -Before we start, it is better to check if your USB web camera is [one of those][3] which are known to be compatible with Raspberry Pi. If your USB webcam is not found in the compatibility list, don't be discouraged, as there is still a chance that your USB web camera may be detected by Raspberry Pi. +在此之前,你最好检查一下你的摄像头是否在[这些][3]已知与树莓派兼容的摄像头之中。如果你的摄像头不在这个兼容列表中,不要丧气,仍然有可能你的摄像头被树莓派检测到。 -### Check if a USB Webcam is Compatible with Raspberry Pi ### +### 检查USB摄像头是否雨树莓派兼容 ### -To check whether your USB web camera is detected on Raspberry Pi or not, plug it into the USB port of your Raspberry Pi, and type lsusb command in the terminal. +要检查你的摄像头是否可以被树莓派检测到,将它插入到树莓派的USB口中,然后输入下面的命令。 $ lsusb -If the output of the command does not list your webcam, there is a possibility that this is because your Raspberry Pi doesn't supply enough power needed for your USB web camera. In this case, you can try using a separate power line for the USB web camera, such as [USB power hub][4], and then repeat the lsusb command. If the USB webcam is still not recognized, we can only suggest you buy another USB web camera which is supported by Raspberry Pi. +如果输出中没有你的摄像头,那么有可能你的树莓派的电源无法供应足够的电力给你的摄像头。这时你可以给你的摄像头用独立的电源线,比如[有源USB hub][4],并重新输入lsusb命令。如果摄像头还是不能被识别,我们只有建议你购买其他树莓派支持的摄像头了。 ![](https://farm8.staticflickr.com/7408/16576646025_898f17f36e_o.png) -In the above screenshot, the USB web camera is detected as "1e4e:0102", but it doesn't show the maker or the name of the web camera. When we try it with Fedora 20 in a laptop, it is successfully detected as "1e4e:0102 Cubeternet GL-UPC822 UVC WebCam." +在上面的截屏中,USB摄像头被识别为“1e4e:0102”,但是没有显示摄像头的制造商。当你在笔记本的Fedora 20中使用它时,它可以成功的检测到“1e4e:0102 Cubeternet GL-UPC822 UVC WebCam”。 -Another way to check if your USB web camera is supported by Raspberry Pi is by checking the /dev directory. If there is /dev/video0, this implies that your USB webcam is recognized by Raspberry Pi. +另外一个可以检查摄像头是否被树莓派支持的方法是检查/dev目录。如果有/dev/video0,那么这暗示树莓派支持你的摄像头。 -### Take a Picture with USB Webcam ### +### 用USB Webcam拍照片 ### -After your USB webcam is successfully hooked up with Raspberry Pi, the next thing to do is to take some pictures to verify its functionality. +当USB摄像头成功挂载到树莓派上之后,下一步就是拍一些照片来验证它的功能了。 -For this, you can install fswebcam, which is a small webcam application. You can install fswebcam directly from the Raspbian repository as follows. +要想拍摄照片,你要安装fswebcam,这是一款小型摄像头程序。你可以直接通过Raspbian的仓库来安装fswebcam。 $ sudo apt-get install fswebcam -Once fswebcam is installed, run the following command in a terminal to capture a picture from the USB webcam: +fswebcam安装完成后,在终端中运行下面的命令来抓去一张来自摄像头的照片: $ fswebcam --no-banner -r 640x480 image.jpg -This command will capture a picture with 640x480 resolution, and save it as image.jpg. It will not put any banner in the bottom part of the picture. +这条命令可以抓取一张640x480分辨率的照片,并且用jpg格式保存。它不会在照片的地步留下任何标志. ![](https://farm8.staticflickr.com/7417/16576645965_302046d230_o.png) -Here is the result from the fswebcam command with 640x480 resolution. +这就是fswebcam下640x480分辨率的结果。 ![](https://farm8.staticflickr.com/7345/16575497512_8d77f1b34c_o.jpg) -The next example picture is captured without defining the resolution. The picture color is blueish, and the default resolution is only 358x288. +下面的例子是没有定义分辨率的照片。图片是偏蓝的,并且默认的分辨率是358x288。 ![](https://farm8.staticflickr.com/7390/15954067124_760fbcdd9c_o.jpg) @@ -53,7 +51,7 @@ The next example picture is captured without defining the resolution. The pictur via: http://ask.xmodulo.com/install-usb-webcam-raspberry-pi.html 作者:[Kristophorus Hadiono][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From bd32f16d55979cf86f3b7ca766480df1c1923520 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 1 Mar 2015 13:57:38 +0800 Subject: [PATCH 0136/2517] translated --- ...s with Answers--How to install a USB webcam in Raspberry Pi.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md (100%) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/translated/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md similarity index 100% rename from sources/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md rename to translated/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md From e933a22f4877e9a7471af56fdfe3608605014766 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 1 Mar 2015 22:47:52 +0800 Subject: [PATCH 0137/2517] [Translated 20150104 How to set up a cross-platform backup server on Linux with BackupPC.md] --- ...rm backup server on Linux with BackupPC.md | 136 ------------------ ...rm backup server on Linux with BackupPC.md | 133 +++++++++++++++++ 2 files changed, 133 insertions(+), 136 deletions(-) delete mode 100644 sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md create mode 100644 translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md diff --git a/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md b/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md deleted file mode 100644 index 41336f53f6..0000000000 --- a/sources/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md +++ /dev/null @@ -1,136 +0,0 @@ -FSSlc translating - -How to set up a cross-platform backup server on Linux with BackupPC -================================================================================ -Just in case you haven't been able to tell from my earlier posts on [backupninja][1] and [backup-manager][2], I am a big backup fan. When it comes to backup, I'd rather have too much than not enough, because if the need arises, you will be grateful that you took the time and effort to generate extra copies of your important data. - -In this post, I will introduce you to [BackupPC][3], a cross-platform backup server software which can perform pull backup of Linux, Windows and MacOS client hosts over network. BackupPC adds a number of features that make managing backups an almost fun thing to do. - -### Features of BackupPC ### - -BackupPC comes with a robust web interface that allows you to collect and manage backups of other remote client hosts in a centralized fashion. Using the web interface, you can examine logs and configuration files, start/cancel/schedule backups of other remote hosts, and visualize current status of backup tasks. You can also browse through archived files and restore individual files or entire jobs from backup archives very easily. To restore individual single files, you can download them from any previous backup directly from the web interface. As if this weren't enough, no special client-side software is needed for client hosts. On Windows clients, the native SMB protocol is used, whereas on *nix clients, you will use `rsync` or tar over SSH, RSH or NFS. - -### Installing BackupPC ### - -On Debian, Ubuntu and their derivatives, run the following command. - - # aptitude install backuppc - -On Fedora, use `yum` command. Note the case sensitive package name. - -On CentOS/RHEL 6, first enable [EPEL repository][4]. On CentOS/RHEL 7, enable [Nux Dextop][5] repository instead. Then go ahead with `yum` command: - - # yum install BackupPC - -As usual, both package management systems will take care of dependency resolution automatically. In addition, as part of the installation process, you may be asked to configure, or reconfigure the web server that will be used for the graphical user interface. The following screenshot is from a Debian system: - -![](https://farm8.staticflickr.com/7573/16163781711_6218b620ef_c.jpg) - -Select your choice by pressing the space bar, and then move to Ok with the tab key and hit ENTER. - -You will then be presented with the following screen informing you that an administrative user account 'backuppc', along with its corresponding password (which can be changed later if desired), has been created to manage BackupPC. Note that both a HTTP user account and a regular Linux account of the same name 'backuppc' will be created with an identical password. The former is needed to access BackupPC's protected web interface, while the latter is needed to perform backup using rsync over SSH. - -![](https://farm8.staticflickr.com/7579/15979622809_25e734658d_c.jpg) - -You can change the default password for the HTTP user 'backuppc' with the following command: - - # htpasswd /path/to/hash/file backuppc - -As for a regular 'backuppc' [Linux][6] user account, use passwd command to change its default password. - - # passwd backuppc - -Note that the installation process creates the web and the program's configuration files automatically. - -### Launching BackupPC and Configuring Backups ### - -To start, open a browser window and point to http:///backuppc/. When prompted, enter the default HTTP user credentials that were supplied to you earlier. If the authentication succeeds, you will be taken to the main page of the web interface. - -![](https://farm9.staticflickr.com/8601/15543330314_f6fdaa235e_z.jpg) - -Most likely the first thing that you will want to do is add a new client host to back up. Go to "Edit Hosts" in the Task pane. We will add two client hosts: - -- Host #1: CentOS 7 [IP 192.168.0.17] -- Host #2: Windows 7 [IP 192.168.0.103] - -We will back up the CentOS host using rsync over SSH and the Windows host using SMB. Prior to performing the backup, we need to set up [key-based authentication][7] to our CentOS host and a shared folder in our Windows machine. - -Here are the instructions for setting up key-based authentication for a remote CentOS host. We create the 'backuppc' user's RSA key pair, and transfer its public key to the root account of the CentOS host. - - # usermod -s /bin/bash backuppc - # su - backuppc - # ssh-keygen -t rsa - # ssh-copy-id root@192.168.0.17 - -When prompted, type yes and enter root's password for 192.168.0.17. - -![](https://farm8.staticflickr.com/7496/16164929932_8fc817125d_b.jpg) - -You will need root access for a remote CentOS host to grant write access to all its file system in case of restoring a backup of files or directories owned by root. - -Once the CentOS and Windows hosts are ready, add them to BackupPC using the web interface: - -![](https://farm9.staticflickr.com/8586/15979622709_76c2dcf68c_z.jpg) - -The next step consists of modifying each host's backup settings: - -![](https://farm8.staticflickr.com/7461/16163781611_765c147f9f_z.jpg) - -The following image shows the configuration for the backup of the Windows machine: - -![](https://farm8.staticflickr.com/7480/16139884676_bddfafed75_z.jpg) - -And the following screenshot shows the settings for the backup of the CentOS box: - -![](https://farm8.staticflickr.com/7557/16139884666_34ff8fd858_z.jpg) - -### Starting a Backup ### - -To start each backup, go to each host's settings, and then click "Start Full Backup": - -![](https://farm8.staticflickr.com/7536/15978247428_458c023f4c.jpg) - -At any time, you can view the status of the process by clicking on the host's home as shown in the image above. If it fails for some reason, a link to a page with the error message(s) will appear in the host menu as well. When a backup completes successfully, a directory with the host's name or IP address is created under /var/lib/backuppc/pc in the server: - -![](https://farm8.staticflickr.com/7549/16165680115_196ee42a49_z.jpg) - -Feel free to browse those directories for the files from the command line, but there is an easier way to look for those files and restore them. - -### Restoring Backup ### - -To view the files that have been saved, go to "Browse backups" under each host's main menu. You can visualize the directories and files at a glance, and select those that you want to restore. Alternatively, you can click on files to open them with the default program, or right click and choose Save link as to download it to the machine where you're working at the time: - -![](https://farm8.staticflickr.com/7506/16165680105_bd5883e0da_c.jpg) - -If you want, you can download a zip or tar file containing the backup's contents: - -![](https://farm8.staticflickr.com/7507/15978247398_18e81667cd_z.jpg) - -or just restore the file(s): - -![](https://farm8.staticflickr.com/7545/15545911003_2aca8a36fc_z.jpg) - -### Conclusion ### - -There is a saying that goes, "the simpler, the better", and that is just what BackupPC has to offer. In BackupPC, you will not only find a backup tool but also a very versatile interface to manage your backups of several operating systems without needing any client-side application. I believe that's more than reason enough for you to give it at least a try. - -Feel free to leave your comments and questions, if you have any, using the form below. I am always happy to hear what readers have to say! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/backuppc-cross-platform-backup-server-linux.html - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/gabriel -[1]:http://xmodulo.com/backup-debian-system-backupninja.html -[2]:http://xmodulo.com/linux-backup-manager.html -[3]:http://backuppc.sourceforge.net/ -[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[5]:http://ask.xmodulo.com/enable-nux-dextop-repository-centos-rhel.html -[6]:http://xmodulo.com/recommend/linuxguide -[7]:http://xmodulo.com/how-to-enable-ssh-login-without.html diff --git a/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md b/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md new file mode 100644 index 0000000000..64310419c3 --- /dev/null +++ b/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md @@ -0,0 +1,133 @@ +如何在 Linux 上使用 BackupPC 来设置一个跨平台的备份服务器 +================================================================================ +为了防止你不能分辨这篇教程和我先前关于[backupninja][1] 和 [backup-manager][2] 的帖子,=== 我是一个积极的备份迷。当提到备份,我宁愿备份的太多而不希望备份不足,因为如果我们有需要的话,你将会感激你花费了时间和精力来为你的重要数据生成额外的拷贝。 + +在这篇帖子中,我将向你介绍[BackupPC][3],一个跨平台的备份服务器软件,它可以通过网络为 Linux,Window 和 MacOS 等系统上的客户端主机拉取备份。BackupPC 添加了一系列的特点使得管理备份变为一件快乐的事。 + +### BackupPC 的特点 ### + +BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收集和管理其他远程客户端主机上的备份。通过使用它的 Web 界面,你可以检查日志和配置文件、为其他远程主机启动/取消/安排备份任务以及可视化备份任务的当前状态。你也可以非常容易地浏览归档的文件以及从备份的归档中恢复个人文件或整个作业。为了恢复单一的个人文件,你可以直接通过 Web 界面来下载任何先前备份的文件。若如这还不够,针对客户端主机,没有特别的客户端软件需要安装。在 Windows 客户端上, 本机 SMB 协议将被使用,而对于 *nix 客户端,你将使用 `rsync` 或 通过 SSH, RSH 或 NFS 来使用 `tar` 。 + +### 安装 BackupPC ### + +在 Debian,Ubuntu 和它们的衍生版本上,运行下面的命令: + + # aptitude install backuppc + +在 Fedra, 使用 `yum` 命令。请注意软件包名字对大小写敏感。 + +在 CentOS/RHEL 6 上,首先要启用 [EPEL 软件仓库][4]。在 CentOS/RHEL 7 上,请替代启用 [Nux Dextop][5] 。然后接着使用 `yum` 命令: + + # yum install BackupPC + +同往常一样,这两种包管理系统都会自动地对依赖问题进行解决。另外,作为安装过程中的一部分,你可能会被要求去配置或重新配置用于图形用户界面的 Web 服务器。下面的截图来自于 Debian 系统: + +![](https://farm8.staticflickr.com/7573/16163781711_6218b620ef_c.jpg) + +通过空格键来确定你的选择,然后使用 tab 键移动到 Ok 选项并敲回车键。 + +接着类似于下面的截屏将会呈现在你眼前,通知你一个用来管理 BackupPC 的名为 ‘backuppc’的管理员用户以及相应的密码(这个密码可以在以后被更改,如果你希望的话)已经被创建。这里需要注意的是:同样名为 ‘backuppc’的一个 HTTP 账户和一个常规的 Linux 账户将会被创建,它们使用同一个密码。需要前者的目的是来访问受保护的 BackupPC 的 Web 界面,而后者则是为了通过 SSH 来使用 `rsync` 来执行备份任务。 + +![](https://farm8.staticflickr.com/7579/15979622809_25e734658d_c.jpg) + +你可以使用下面的命令来更改 HTTP 账户 ‘backuppc’ 的默认密码: + + # htpasswd /path/to/hash/file backuppc + +至于常规的 ‘backuppc’ [Linux][6]账户,可以使用 `passwd`命令来更改它的默认密码: + + # passwd backuppc + +需要提及的是:安装过程中会自动创建 Web 和程序的配置文件。 + +### 启动 BackupPC 并设置备份 ### + +首先,打开一个浏览器窗口并指向 http:///backuppc/ 。当弹出提示框时,输入先前向你提供的默认 HTTP 用户凭据(注:即用户名 backuppc 和相应的默认密码)。假如认证成功,你就会被带入到 Web 界面的主页: + +![](https://farm9.staticflickr.com/8601/15543330314_f6fdaa235e_z.jpg) + +你想做的第一件事最有可能是新增一个客户端主机来备份。进入任务窗格中的 “编辑主机”选项。我们将添加两个客户端主机: + +- Host #1: CentOS 7 [IP 192.168.0.17] +- Host #2: Windows 7 [IP 192.168.0.103] + +我们将通过 SSH 使用 `rsync`来备份 CentOS 主机,使用 SMB 来备份 Windows 主机。在执行备份之前,我们需要向我们的 CentOS 主机设置 [基于密码认证][7](注:这里我不知如何翻译,根据链接,感觉是无需密码来连接主机)以及在我们的 Windows 主机中设置一个共享目录。 + +下面是关于如何设置为一个远程 CentOS 主机设置 key-based authentication 的指导。我们创建 ‘backuppc’ 用户的 RSA 密钥对,并向 CentOS 主机上的 root 账户传递它的公共密钥。 + + # usermod -s /bin/bash backuppc + # su - backuppc + # ssh-keygen -t rsa + # ssh-copy-id root@192.168.0.17 + +当弹出提示框时,键入 yes 并为 192.168.0.17 键入 root 用户的密码: + +![](https://farm8.staticflickr.com/7496/16164929932_8fc817125d_b.jpg) + +你需要一个远程的 CentOS 主机的 root 权限来在该主机中的文件系统中发放写权限,以防恢复的备份文件或目录的所有者为 root 账户。 + +一旦 CentOS 和 Windows 主机都准备完毕,使用 Web 界面将它们添加到 BackupPC: + +![](https://farm9.staticflickr.com/8586/15979622709_76c2dcf68c_z.jpg) + +下一步的内容由更改每个主机的备份设置组成: + +![](https://farm8.staticflickr.com/7461/16163781611_765c147f9f_z.jpg) + +接下来的图片展示了 Windows 主机的备份设置: + +![](https://farm8.staticflickr.com/7480/16139884676_bddfafed75_z.jpg) + +而接着的截图展示了 CentOS 盒子的备份设置: + +![](https://farm8.staticflickr.com/7557/16139884666_34ff8fd858_z.jpg) + +### 开始一个备份任务 ### + +为了开始每个备份,到每个主机的设定选项,然后点击“开始全备份”: + +![](https://farm8.staticflickr.com/7536/15978247428_458c023f4c.jpg) + +在任何时候,你都可以通过点击如上图展示的每个主机的备份主页来查看备份任务的状态。假如因为某些原因备份失败,在主机菜单中将会出现一个指向包含错误信息的网页。当一个备份任务被成功地完成,一个名为主机名或 IP 地址的目录将会在服务器的 /var/lib/backuppc/pc 目录下被创建。 + +![](https://farm8.staticflickr.com/7549/16165680115_196ee42a49_z.jpg) + +我们也可以随意地在命令行中浏览这个目录中的文件,但存在一个更加简单的方式来查找和恢复这些文件。 + +### 恢复备份 ### + +为了浏览已经保存过的文件。进入每个主机的主菜单下的 “浏览备份”选项,你可以一目了然地看到目录和文件,并选择那些你想恢复的文件。另外,你还可以通过点击文件来使用默认程序打开文件或右击文件并选择“另存为”来下载该文件到你正工作的机器上: + +![](https://farm8.staticflickr.com/7506/16165680105_bd5883e0da_c.jpg) + +如若你想,你可以下载一个包含所有你想备份的内容的 zip 或 tar 文件: + +![](https://farm8.staticflickr.com/7507/15978247398_18e81667cd_z.jpg) + +或只是恢复文件: + +![](https://farm8.staticflickr.com/7545/15545911003_2aca8a36fc_z.jpg) + +### 总结 ### + +有句俗话说,"越简单,越好",而这正是 BackupPC 所提供。在 BackupPC 中,你将不仅找到了一个备份工具,而且还找到了一个无需任何客户端应用来在几个不同的操作系统中管理你的备份的方法。我相信这就有足够的理由让你去尝试一下。 + +欢迎使用下面的评论框来留下你的评论和问题,假如你有的话。我总是乐于听取读者想说的话! +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/backuppc-cross-platform-backup-server-linux.html + +作者:[Gabriel Cánepa][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:http://xmodulo.com/backup-debian-system-backupninja.html +[2]:http://xmodulo.com/linux-backup-manager.html +[3]:http://backuppc.sourceforge.net/ +[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[5]:http://ask.xmodulo.com/enable-nux-dextop-repository-centos-rhel.html +[6]:http://xmodulo.com/recommend/linuxguide +[7]:http://xmodulo.com/how-to-enable-ssh-login-without.html From 139ae0df2ad8b09c553742baa68d898c4d83df8f Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 1 Mar 2015 23:06:07 +0800 Subject: [PATCH 0138/2517] =?UTF-8?q?=E5=AF=B9=E8=AF=91=E6=96=87=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=B8=80=E4=BA=9B=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rm backup server on Linux with BackupPC.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md b/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md index 64310419c3..9dd434a809 100644 --- a/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md +++ b/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md @@ -2,7 +2,7 @@ ================================================================================ 为了防止你不能分辨这篇教程和我先前关于[backupninja][1] 和 [backup-manager][2] 的帖子,=== 我是一个积极的备份迷。当提到备份,我宁愿备份的太多而不希望备份不足,因为如果我们有需要的话,你将会感激你花费了时间和精力来为你的重要数据生成额外的拷贝。 -在这篇帖子中,我将向你介绍[BackupPC][3],一个跨平台的备份服务器软件,它可以通过网络为 Linux,Window 和 MacOS 等系统上的客户端主机拉取备份。BackupPC 添加了一系列的特点使得管理备份变为一件快乐的事。 +在这篇帖子中,我将向你介绍 [BackupPC][3],一个跨平台的备份服务器软件,它可以通过网络为 Linux,Windows 和 MacOS 等系统上的客户端主机拉取备份。BackupPC 添加了一系列的特点使得管理备份变为一件快乐的事。 ### BackupPC 的特点 ### @@ -14,9 +14,9 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 # aptitude install backuppc -在 Fedra, 使用 `yum` 命令。请注意软件包名字对大小写敏感。 +在 Fedora上, 使用 `yum` 命令。请注意软件包名字对大小写敏感。 -在 CentOS/RHEL 6 上,首先要启用 [EPEL 软件仓库][4]。在 CentOS/RHEL 7 上,请替代启用 [Nux Dextop][5] 。然后接着使用 `yum` 命令: +在 CentOS/RHEL 6 上,首先要启用 [EPEL 软件仓库][4]。在 CentOS/RHEL 7 上,请替代启用 [Nux Dextop][5] 软件仓库。然后接着使用 `yum` 命令: # yum install BackupPC @@ -46,14 +46,14 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ![](https://farm9.staticflickr.com/8601/15543330314_f6fdaa235e_z.jpg) -你想做的第一件事最有可能是新增一个客户端主机来备份。进入任务窗格中的 “编辑主机”选项。我们将添加两个客户端主机: +你想做的第一件事最有可能是通过新增一个客户端主机来备份。进入任务窗格中的 “编辑主机”选项。我们将添加两个客户端主机: - Host #1: CentOS 7 [IP 192.168.0.17] - Host #2: Windows 7 [IP 192.168.0.103] 我们将通过 SSH 使用 `rsync`来备份 CentOS 主机,使用 SMB 来备份 Windows 主机。在执行备份之前,我们需要向我们的 CentOS 主机设置 [基于密码认证][7](注:这里我不知如何翻译,根据链接,感觉是无需密码来连接主机)以及在我们的 Windows 主机中设置一个共享目录。 -下面是关于如何设置为一个远程 CentOS 主机设置 key-based authentication 的指导。我们创建 ‘backuppc’ 用户的 RSA 密钥对,并向 CentOS 主机上的 root 账户传递它的公共密钥。 +下面是关于如何为一个远程 CentOS 主机设置 key-based authentication 的指导。我们创建 ‘backuppc’ 用户的 RSA 密钥对,并向 CentOS 主机上的 root 账户传递它的公共密钥。 # usermod -s /bin/bash backuppc # su - backuppc @@ -64,7 +64,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ![](https://farm8.staticflickr.com/7496/16164929932_8fc817125d_b.jpg) -你需要一个远程的 CentOS 主机的 root 权限来在该主机中的文件系统中发放写权限,以防恢复的备份文件或目录的所有者为 root 账户。 +你需要一个远程的 CentOS 主机的 root 权限来在该主机中的文件系统中发放写权限,以防要恢复的备份文件或目录的所有者为 root 账户。 一旦 CentOS 和 Windows 主机都准备完毕,使用 Web 界面将它们添加到 BackupPC: @@ -78,17 +78,17 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ![](https://farm8.staticflickr.com/7480/16139884676_bddfafed75_z.jpg) -而接着的截图展示了 CentOS 盒子的备份设置: +而接着的截图展示了 CentOS 主机的备份设置: ![](https://farm8.staticflickr.com/7557/16139884666_34ff8fd858_z.jpg) ### 开始一个备份任务 ### -为了开始每个备份,到每个主机的设定选项,然后点击“开始全备份”: +为了开始备份,到每个主机的设定选项,然后点击“开始全备份”: ![](https://farm8.staticflickr.com/7536/15978247428_458c023f4c.jpg) -在任何时候,你都可以通过点击如上图展示的每个主机的备份主页来查看备份任务的状态。假如因为某些原因备份失败,在主机菜单中将会出现一个指向包含错误信息的网页。当一个备份任务被成功地完成,一个名为主机名或 IP 地址的目录将会在服务器的 /var/lib/backuppc/pc 目录下被创建。 +在任何时候,你都可以通过点击如上图展示的每个主机的备份主页来查看备份任务的状态。假如因为某些原因备份失败,在主机菜单中将会出现一个指向包含错误信息的网页的链接。当一个备份任务被成功地完成,一个被命名为主机名或 IP 地址的目录将会在服务器的 /var/lib/backuppc/pc 目录下被创建。 ![](https://farm8.staticflickr.com/7549/16165680115_196ee42a49_z.jpg) @@ -96,7 +96,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ### 恢复备份 ### -为了浏览已经保存过的文件。进入每个主机的主菜单下的 “浏览备份”选项,你可以一目了然地看到目录和文件,并选择那些你想恢复的文件。另外,你还可以通过点击文件来使用默认程序打开文件或右击文件并选择“另存为”来下载该文件到你正工作的机器上: +为了浏览已经保存过的文件。进入每个主机的主菜单下的 “浏览备份”选项,你可以一目了然地看到目录和文件,并选择那些你想恢复的文件。另外,你还可以通过点击文件来使用默认程序打开文件或右击文件并选择“另存为”来下载该文件到你正在工作的机器上: ![](https://farm8.staticflickr.com/7506/16165680105_bd5883e0da_c.jpg) @@ -110,7 +110,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ### 总结 ### -有句俗话说,"越简单,越好",而这正是 BackupPC 所提供。在 BackupPC 中,你将不仅找到了一个备份工具,而且还找到了一个无需任何客户端应用来在几个不同的操作系统中管理你的备份的方法。我相信这就有足够的理由让你去尝试一下。 +有句俗话说,"越简单,越好",而这正是 BackupPC 所提供的东西。在 BackupPC 中,你将不仅找到了一个备份工具,而且还找到了一个无需任何客户端应用来在几个不同的操作系统中管理你的备份的方法。我相信这就有足够的理由让你去尝试一下。 欢迎使用下面的评论框来留下你的评论和问题,假如你有的话。我总是乐于听取读者想说的话! -------------------------------------------------------------------------------- From 59e874292600260e6c08f6a538332330eb3b6499 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 1 Mar 2015 23:23:50 +0800 Subject: [PATCH 0139/2517] Update 20150209 How to back up a Debian system using backupninja.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...150209 How to back up a Debian system using backupninja.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150209 How to back up a Debian system using backupninja.md b/sources/tech/20150209 How to back up a Debian system using backupninja.md index edfc6150f6..97e43f57bf 100644 --- a/sources/tech/20150209 How to back up a Debian system using backupninja.md +++ b/sources/tech/20150209 How to back up a Debian system using backupninja.md @@ -1,3 +1,5 @@ +FSSlc translating + How to back up a Debian system using backupninja ================================================================================ Prudence or experience by disaster can teach every [sysadmin][1] the importance of taking frequent system backups. You can do so by writing good old shell scripts, or using one (or more) of the many backup tools available for the job. Thus the more tools you become acquainted with, the better informed decisions you will make when implementing a backup solution. @@ -108,4 +110,4 @@ via: http://xmodulo.com/backup-debian-system-backupninja.html [a]:http://xmodulo.com/author/gabriel [1]:http://xmodulo.com/recommend/sysadminbook -[2]:https://labs.riseup.net/code/projects/backupninja \ No newline at end of file +[2]:https://labs.riseup.net/code/projects/backupninja From fe9ae45cec479a26fdc7ba12495eacfefa758213 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sun, 1 Mar 2015 19:02:36 -0300 Subject: [PATCH 0140/2517] translating --- ... command examples to create or extract archives in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md b/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md index 0a39b7f476..adef9acbf2 100644 --- a/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md +++ b/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md @@ -1,3 +1,4 @@ +theo-l translating 10 quick tar command examples to create/extract archives in Linux ================================================================================ ### Tar command on Linux ### @@ -184,4 +185,4 @@ via: http://www.binarytides.com/linux-tar-command/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:https://plus.google.com/117145272367995638274/posts \ No newline at end of file +[a]:https://plus.google.com/117145272367995638274/posts From 304716f11ac7dff3ca831add332d15abd418ea98 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sun, 1 Mar 2015 21:36:27 -0300 Subject: [PATCH 0141/2517] translated --- ... to create or extract archives in Linux.md | 188 ----------------- ... to create or extract archives in Linux.md | 191 ++++++++++++++++++ 2 files changed, 191 insertions(+), 188 deletions(-) delete mode 100644 sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md create mode 100644 translated/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md diff --git a/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md b/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md deleted file mode 100644 index adef9acbf2..0000000000 --- a/sources/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md +++ /dev/null @@ -1,188 +0,0 @@ -theo-l translating -10 quick tar command examples to create/extract archives in Linux -================================================================================ -### Tar command on Linux ### - -The tar (tape archive) command is a frequently used command on linux that allows you to store files into an archive. - -The commonly seen file extensions are .tar.gz and .tar.bz2 which is a tar archive further compressed using gzip or bzip algorithms respectively. - -In this tutorial we shall take a look at simple examples of using the tar command to do daily jobs of creating and extracting archives on linux desktops or servers. - -### Using the tar command ### - -The tar command is available by default on most linux systems and you do not need to install it separately. - -> With tar there are 2 compression formats, gzip and bzip. The "z" option specifies gzip and "j" option specifies bzip. It is also possible to create uncompressed archives. - -#### 1. Extract a tar.gz archive #### - -Well, the more common use is to extract tar archives. The following command shall extract the files out a tar.gz archive - - $ tar -xvzf tarfile.tar.gz - -Here is a quick explanation of the parameters used - - -> x - Extract files -> -> v - verbose, print the file names as they are extracted one by one -> -> z - The file is a "gzipped" file -> -> f - Use the following tar archive for the operation - -Those are some of the important options to memorise - -**Extract tar.bz2/bzip archives** - -Files with extension bz2 are compressed with the bzip algorithm and tar command can deal with them as well. Use the j option instead of the z option. - - $ tar -xvjf archivefile.tar.bz2 - -#### 2. Extract files to a specific directory or path #### - -To extract out the files to a specific directory, specify the path using the "-C" option. Note that its a capital C. - - $ tar -xvzf abc.tar.gz -C /opt/folder/ - -However first make sure that the destination directory exists, since tar is not going to create the directory for you and will fail if it does not exist. - -#### 3. Extract a single file #### - -To extract a single file out of an archive just add the file name after the command like this - - $ tar -xz -f abc.tar.gz "./new/abc.txt" - -More than once file can be specified in the above command like this - - $ tar -xv -f abc.tar.gz "./new/cde.txt" "./new/abc.txt" - -#### 4. Extract multiple files using wildcards #### - -Wildcards can be used to extract out a bunch of files matching the given wildcards. For example all files with ".txt" extension. - - $ tar -xv -f abc.tar.gz --wildcards "*.txt" - -#### 5. List and search contents of the tar archive #### - -If you want to just list out the contents of the tar archive and not extract them, use the "-t" option. The following command prints the contents of a gzipped tar archive, - - $ tar -tz -f abc.tar.gz - ./new/ - ./new/cde.txt - ./new/subdir/ - ./new/subdir/in.txt - ./new/abc.txt - ... - -Pipe the output to grep to search a file or less command to browse the list. Using the "v" verbose option shall print additional details about each file. - -For tar.bz2/bzip files use the "j" option - -Use the above command in combination with the grep command to search the archive. Simple! - - $ tar -tvz -f abc.tar.gz | grep abc.txt - -rw-rw-r-- enlightened/enlightened 0 2015-01-13 11:40 ./new/abc.txt - -#### 6. Create a tar/tar.gz archive #### - -Now that we have learnt how to extract existing tar archives, its time to start creating new ones. The tar command can be told to put selected files in an archive or an entire directory. Here are some examples. - -The following command creates a tar archive using a directory, adding all files in it and sub directories as well. - - $ tar -cvf abc.tar ./new/ - ./new/ - ./new/cde.txt - ./new/abc.txt - -The above example does not create a compressed archive. Just a plain archive, that puts multiple files together without any real compression. - -In order to compress, use the "z" or "j" option for gzip or bzip respectively. - - $ tar -cvzf abc.tar.gz ./new/ - -> The extension of the file name does not really matter. "tar.gz" and tgz are common extensions for files compressed with gzip. ".tar.bz2" and ".tbz" are commonly used extensions for bzip compressed files. - -#### 7. Ask confirmation before adding files #### - -A useful option is "w" which makes tar ask for confirmation for every file before adding it to the archive. This can be sometimes useful. - -Only those files would be added which are given a yes answer. If you do not enter anything, the default answer would be a "No". - - # Add specific files - - $ tar -czw -f abc.tar.gz ./new/* - add ‘./new/abc.txt’?y - add ‘./new/cde.txt’?y - add ‘./new/newfile.txt’?n - add ‘./new/subdir’?y - add ‘./new/subdir/in.txt’?n - - # Now list the files added - $ tar -t -f abc.tar.gz - ./new/abc.txt - ./new/cde.txt - ./new/subdir/ - -#### 8. Add files to existing archives #### - -The r option can be used to add files to existing archives, without having to create new ones. Here is a quick example - - $ tar -rv -f abc.tar abc.txt - -> Files cannot be added to compressed archives (gz or bzip). Files can only be added to plain tar archives. - -#### 9. Add files to compressed archives (tar.gz/tar.bz2) #### - -Its already mentioned that its not possible to add files to compressed archives. However it can still be done with a simple trick. Use the gunzip command to uncompress the archive, add file to archive and compress it again. - - $ gunzip archive.tar.gz - $ tar -rf archive.tar ./path/to/file - $ gzip archive.tar - -For bzip files use the bzip2 and bunzip2 commands respectively. - -#### 10. Backup with tar #### - -A real scenario is to backup directories at regular intervals. The tar command can be scheduled to take such backups via cron. Here is an example - - - $ tar -cvz -f archive-$(date +%Y%m%d).tar.gz ./new/ - -Run the above command via cron and it would keep creating backup files with names like - -'archive-20150218.tar.gz'. - -Ofcourse make sure that the disk space is not overflown with larger and larger archives. - -#### 11. Verify archive files while creation #### - -The "W" option can be used to verify the files after creating archives. Here is a quick example. - - $ tar -cvW -f abc.tar ./new/ - ./new/ - ./new/cde.txt - ./new/subdir/ - ./new/subdir/in.txt - ./new/newfile.txt - ./new/abc.txt - Verify ./new/ - Verify ./new/cde.txt - Verify ./new/subdir/ - Verify ./new/subdir/in.txt - Verify ./new/newfile.txt - Verify ./new/abc.txt - -Note that the verification cannot be done on compressed archives. It works only with uncompressed tar archives. - -Thats all for now. For more check out the man page for tar command, with "man tar". - --------------------------------------------------------------------------------- - -via: http://www.binarytides.com/linux-tar-command/ - -作者:[Silver Moon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117145272367995638274/posts diff --git a/translated/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md b/translated/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md new file mode 100644 index 0000000000..75865f7713 --- /dev/null +++ b/translated/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md @@ -0,0 +1,191 @@ +linux中创建和解压文档的10个快速tar命令样例 +================================================================================ +### linux中的tar命令### + +tar(磁带归档)命令是linux系统中被经常用来将文件存入到一个归档文件中的命令。 + +常见的文件扩展包括:.tar.gz 和 .tar.bz2, 分别表示通过gzip或bzip算法进一步压缩的磁带归档文件扩展。 + + +在该教程中我们会窥探一下在linux桌面或服务器版本中使用tar命令来处理一些日常创建和解压归档文件的工作样例。 +### 使用tar命令### + +tar命令在大部分linux系统默认情况下都是可用的,所以你不用单独安装该软件。 + +> tar命令具有两个压缩格式,gzip和bzip,该命令的“z”选项用来指定gzip,“j”选项用来指定bzip。同时也可哟用来创建非压缩归档文件。 + +#### 1.解压一个tar.gz归档 #### + +一般常见的用法是用来解压归档文件,下面的命令将会把文件从一个tar.gz归档文件中解压出来。 + + + $ tar -xvzf tarfile.tar.gz + +这里对这些参数做一个简单解释- + +> x - 解压文件 + +> v - 繁琐,在解压每个文件时打印出文件的名称。 + +> z - 该文件是一个使用 gzip压缩的文件。 + +> f - 使用接下来的tar归档来进行操作。 + +这些就是一些需要记住的重要选项。 + +**解压 tar.bz2/bzip 归档文件 ** + +具有bz2扩展名的文件是使用bzip算法进行压缩的,但是tar命令也可以对其进行处理,但是是通过使用“j”选项来替换“z”选项。 + + $ tar -xvjf archivefile.tar.bz2 + +#### 2.将文件解压到一个指定的目录或路径 #### + +为了将文件解压到一个指定的目录中,使用“-C”选项来指定路径,此处的“C”是大写“C”。 + + $ tar -xvzf abc.tar.gz -C /opt/folder/ + +然后,首先需要确认目标目录是否存在,毕竟tar命令并不会为你创建目录,所以如果目标目录不存在的情况下该命令会失败。 + +####3. 解压出单个文件 #### + +为了从一个归档文件中解压出单个文件,只需要将文件名按照以下方式将其放置在命令后面。 + + $ tar -xz -f abc.tar.gz "./new/abc.txt" + +在上述命令中,可以按照以下方式来指定多个文件。 + + $ tar -xv -f abc.tar.gz "./new/cde.txt" "./new/abc.txt" + +#### 4.使用通配符来解压多个文件 #### + +通配符可以用来解压于给定通配符匹配的一批文件,例如所有以".txt"作为扩展名的文件。 + + $ tar -xv -f abc.tar.gz --wildcards "*.txt" + +#### 5. 列出并检索tar归档文件中的内容 #### + +如果你仅仅想要列出而不是解压tar归档文件的中的内容,使用“-t”选项, 下面的命令用来打印一个使用gzip压缩过的tar归档文件中的内容。 + + $ tar -tz -f abc.tar.gz + ./new/ + ./new/cde.txt + ./new/subdir/ + ./new/subdir/in.txt + ./new/abc.txt + ... + +将输出通过管道定向到grep来搜索一个文件或者定向到less命令来浏览内容列表。 使用"v"繁琐选项将会打印出每个文件的额外详细信息。 + +对于 tar.bz2/bzip文件,需要使用"j"选项。 + +结合上述的命令和grep命令来检索归档文件,如下所示。简单吧! + + $ tar -tvz -f abc.tar.gz | grep abc.txt + -rw-rw-r-- enlightened/enlightened 0 2015-01-13 11:40 ./new/abc.txt + +#### 6.创建一个tar/tar.gz归档文件 #### + +现在我们已经学过了如何解压一个tar归档文件,是时候开始创建一个新的tar归档文件了。tar命令可以用来将所选的文件或整个目录放入到一个归档文件中,以下是相应的样例。 + + +下面的命令使用一个目录来创建一个tar归档文件,它会将该目录中所有的文件和子目录都加入到归档文件中。 + + $ tar -cvf abc.tar ./new/ + ./new/ + ./new/cde.txt + ./new/abc.txt + +上述命令不会创建一个压缩的的归档文件,只是一个普通的归档文件,只是将多个文件放入到一个归档文件中并没有真正地压缩每个文件。 + +为了使用压缩,可以分别使用“z”或“j”选项进行gzip或bzip压缩算法。 + + $ tar -cvzf abc.tar.gz ./new/ + +> 文件的扩展名其实并不真正有什么影响。“tar.gz” 和tgz是gzip压缩算法压缩文件的常见扩展名。 “tar.bz2”和“tbz”是bzip压缩算法压缩文件的常见扩展名。 + + +#### 7. 在添加文件之前进行确认 #### + +一个有用的选项是“w”,该选项使得tar命令在添加每个文件到归档文件之前来让用户进行确认,有时候这会很有用。 + +使用该选项时,只有用户输入yes时的文件才会被加入到归档文件中,如果你输入任何东西,默认的回答是一个“No”。 + + # 添加指定文件 + + $ tar -czw -f abc.tar.gz ./new/* + add ‘./new/abc.txt’?y + add ‘./new/cde.txt’?y + add ‘./new/newfile.txt’?n + add ‘./new/subdir’?y + add ‘./new/subdir/in.txt’?n + + #现在列出所有被加入的文件 + + $ tar -t -f abc.tar.gz + ./new/abc.txt + ./new/cde.txt + ./new/subdir/ + +#### 8. 加入文件到存在的归档文件中 #### + +“r”选项可以被用来将文件加入到已存在的归档文件中,而不用创建一个新的归档文件,下面是一个简单的样例: + + $ tar -rv -f abc.tar abc.txt + +> 文件并不能加入到已压缩的归档文件中(gz 或 bzip)。文件只能被加入到普通的归档文件中。 + +#### 9. 将文件加入到压缩的归档文件中(tar.gz/tar.bz2) #### + +之前已经提到了不可能将文件加入到已压缩的归档文件中,然和依然可以通过简单的一些把戏来完成。使用gunzip命令来解压缩归档文件,然后将文件加入到归档文件中后重新进行压缩。 + + $ gunzip archive.tar.gz + $ tar -rf archive.tar ./path/to/file + $ gzip archive.tar + +对于bzip文件分别使用bzip2和bunzip2。 + +#### 10.通过tar来进行备份 #### + +一个真实的场景是在规则的间隔内来备份目录,tar命令可以通过cron调度来实现这样的一个备份,以下是一个样例 - + + $ tar -cvz -f archive-$(date +%Y%m%d).tar.gz ./new/ + +使用cron来运行上述的命令会保持创建类似以下名称的备份文件 - +'archive-20150218.tar.gz'. + +当然,需要确保日益增长的归档文件不会导致磁盘空间的溢出。 + +#### 11. 在创建归档文件是进行验证 #### + +"W"选项可以用来在创建归档文件之后进行验证,以下是一个简单例子。 + + $ tar -cvW -f abc.tar ./new/ + ./new/ + ./new/cde.txt + ./new/subdir/ + ./new/subdir/in.txt + ./new/newfile.txt + ./new/abc.txt + Verify ./new/ + Verify ./new/cde.txt + Verify ./new/subdir/ + Verify ./new/subdir/in.txt + Verify ./new/newfile.txt + Verify ./new/abc.txt + +需要注意的是验证动作不能呢该在压缩过的归档文件上进行,只能在非压缩的tar归档文件上执行。 + +现在就先到此为止,可以通过“man tar”命令来查看tar命令的的手册。 + +-------------------------------------------------------------------------------- + +via: http://www.binarytides.com/linux-tar-command/ + +作者:[Silver Moon][a] +译者:[theo-l](https://github.com/theo-l) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117145272367995638274/posts From fc13be47c573e77a5aefc0ccf40a89e12484df3b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 2 Mar 2015 14:27:33 +0800 Subject: [PATCH 0142/2517] =?UTF-8?q?=E5=BD=92=E6=A1=A3201502?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- published/{ => 201502}/20140819 Top 4 Linux download managers.md | 0 .../{ => 201502}/20140821 What is a good EPUB reader on Linux.md | 0 ...7 How to create a software RAID-1 array with mdadm on Linux.md | 0 ...w to Install and Setup My Weather Indicator in Ubuntu 14.10.md | 0 .../20141030 Test drive Linux with nothing but a flash drive.md | 0 ...7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md | 0 ...ow To Use Emoji Anywhere With Twitter's Open Source Library.md | 0 ...141120 How to install Xen hypervisor on unused old hardware.md | 0 .../{ => 201502}/20141203 Undelete Files on Linux Systems.md | 0 ...The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md | 0 .../20141205 What is a good free control panel for VPS.md | 0 ...ow to configure rsyslog client for remote logging on CentOS.md | 0 ...1211 How to use matplotlib for scientific plotting on Linux.md | 0 ...219 How to block unwanted IP addresses on Linux efficiently.md | 0 ...o schedule appointments and to-do tasks in a Linux terminal.md | 0 .../20141223 20 Linux Commands Interview Questions & Answers.md | 0 ...ltiple Linux Distribution Installations in RHEL or CentOS 7.md | 0 ... FAQs with Answers--How to install Kingsoft Office on Linux.md | 0 ...ux FAQs with Answers--How to rename multiple files on Linux.md | 0 ...1226 How to Download Music from Grooveshark with a Linux OS.md | 0 ... Steps to Setup Local Repository in Ubuntu using APT-mirror.md | 0 ...29 How to Create Btrfs Filesystem in Linux and its Features.md | 0 ...20150104 Auditd--Tool for Security Auditing on Linux Server.md | 0 .../{ => 201502}/20150104 How To Install Websvn In CentOS 7.md | 0 ...To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md | 0 .../20150105 How To Install Winusb In Ubuntu 14.04.md | 0 ...untu apt-get and apt-cache commands with practical examples.md | 0 .../20150106 How to deduplicate files on Linux with dupeGuru.md | 0 .../20150106 Managing Linux server configs with the SaltStack.md | 0 .../20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md | 0 .../20150112 Best GNOME Shell Themes For Ubuntu 14.04.md | 0 ...0150114 How to Configure Chroot Environment in Ubuntu 14.04.md | 0 ...14 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md | 0 ... to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md | 0 ...stalling Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md | 0 .../{ => 201502}/20150114 Why Mac users don't switch to Linux.md | 0 .../20150115 Configure Mate Desktop With Mate Tweak.md | 0 ...es To a Different Directory on a Linux or Unix-like Systems.md | 0 ...5 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md | 0 .../20150116 A Step By Step Guide To Installing Xubuntu Linux.md | 0 ...Create A Lightweight And Persistent Xubuntu Linux USB Drive.md | 0 ...0150119 Cutegram--A Better Telegram Client For GNU or Linux.md | 0 .../{ => 201502}/20150119 How To Disable IPv6 In CentOS 7.md | 0 .../20150119 Quick Tip--How To Restart Cinnamon After Crash.md | 0 published/{ => 201502}/20150121 If a 32-bit integer overflows.md | 0 ...h Answers--How to check disk space on Linux with df command.md | 0 ...122 Linux FAQs with Answers--How to add a cron job on Linux.md | 0 ...Linux FAQs with Answers--How to check memory usage on Linux.md | 0 ... FAQs with Answers--How to set a custom HTTP header in curl.md | 0 .../20150125 4 Best Modern Open Source Code Editors For Linux.md | 0 ...126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md | 0 ...i-Fi Direct Android Implementation Causes Denial of Service.md | 0 .../{ => 201502}/20150127 Install Jetty Web Server On CentOS 7.md | 0 ...50128 Meet Vivaldi--A New Web Browser Built for Power Users.md | 0 ...K 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md | 0 ...eate and show a presentation from the command line on Linux.md | 0 ...our profile could not be opened correctly' on Google Chrome.md | 0 ...inux FAQs with Answers--How to install Go language on Linux.md | 0 ...uxQuestions Survey Results Surface Top Open Source Projects.md | 0 published/{ => 201502}/20150209 CrunchBang Linux Is Dead.md | 0 published/{ => 201502}/20150209 Non-Linux FOSS--Homebrew.md | 0 ...Of Two Google Chrome Icons From Dock In Elementary OS Freya.md | 0 62 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201502}/20140819 Top 4 Linux download managers.md (100%) rename published/{ => 201502}/20140821 What is a good EPUB reader on Linux.md (100%) rename published/{ => 201502}/20140917 How to create a software RAID-1 array with mdadm on Linux.md (100%) rename published/{ => 201502}/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md (100%) rename published/{ => 201502}/20141030 Test drive Linux with nothing but a flash drive.md (100%) rename published/{ => 201502}/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md (100%) rename published/{ => 201502}/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md (100%) rename published/{ => 201502}/20141120 How to install Xen hypervisor on unused old hardware.md (100%) rename published/{ => 201502}/20141203 Undelete Files on Linux Systems.md (100%) rename published/{ => 201502}/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md (100%) rename published/{ => 201502}/20141205 What is a good free control panel for VPS.md (100%) rename published/{ => 201502}/20141210 How to configure rsyslog client for remote logging on CentOS.md (100%) rename published/{ => 201502}/20141211 How to use matplotlib for scientific plotting on Linux.md (100%) rename published/{ => 201502}/20141219 How to block unwanted IP addresses on Linux efficiently.md (100%) rename published/{ => 201502}/20141219 How to schedule appointments and to-do tasks in a Linux terminal.md (100%) rename published/{ => 201502}/20141223 20 Linux Commands Interview Questions & Answers.md (100%) rename published/{ => 201502}/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md (100%) rename published/{ => 201502}/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md (100%) rename published/{ => 201502}/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md (100%) rename published/{ => 201502}/20141226 How to Download Music from Grooveshark with a Linux OS.md (100%) rename published/{ => 201502}/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md (100%) rename published/{ => 201502}/20141229 How to Create Btrfs Filesystem in Linux and its Features.md (100%) rename published/{ => 201502}/20150104 Auditd--Tool for Security Auditing on Linux Server.md (100%) rename published/{ => 201502}/20150104 How To Install Websvn In CentOS 7.md (100%) rename published/{ => 201502}/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md (100%) rename published/{ => 201502}/20150105 How To Install Winusb In Ubuntu 14.04.md (100%) rename published/{ => 201502}/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md (100%) rename published/{ => 201502}/20150106 How to deduplicate files on Linux with dupeGuru.md (100%) rename published/{ => 201502}/20150106 Managing Linux server configs with the SaltStack.md (100%) rename published/{ => 201502}/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md (100%) rename published/{ => 201502}/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md (100%) rename published/{ => 201502}/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md (100%) rename published/{ => 201502}/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md (100%) rename published/{ => 201502}/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md (100%) rename published/{ => 201502}/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md (100%) rename published/{ => 201502}/20150114 Why Mac users don't switch to Linux.md (100%) rename published/{ => 201502}/20150115 Configure Mate Desktop With Mate Tweak.md (100%) rename published/{ => 201502}/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md (100%) rename published/{ => 201502}/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md (100%) rename published/{ => 201502}/20150116 A Step By Step Guide To Installing Xubuntu Linux.md (100%) rename published/{ => 201502}/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md (100%) rename published/{ => 201502}/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md (100%) rename published/{ => 201502}/20150119 How To Disable IPv6 In CentOS 7.md (100%) rename published/{ => 201502}/20150119 Quick Tip--How To Restart Cinnamon After Crash.md (100%) rename published/{ => 201502}/20150121 If a 32-bit integer overflows.md (100%) rename published/{ => 201502}/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md (100%) rename published/{ => 201502}/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md (100%) rename published/{ => 201502}/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md (100%) rename published/{ => 201502}/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md (100%) rename published/{ => 201502}/20150125 4 Best Modern Open Source Code Editors For Linux.md (100%) rename published/{ => 201502}/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md (100%) rename published/{ => 201502}/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md (100%) rename published/{ => 201502}/20150127 Install Jetty Web Server On CentOS 7.md (100%) rename published/{ => 201502}/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md (100%) rename published/{ => 201502}/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md (100%) rename published/{ => 201502}/20150202 How to create and show a presentation from the command line on Linux.md (100%) rename published/{ => 201502}/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md (100%) rename published/{ => 201502}/20150205 Linux FAQs with Answers--How to install Go language on Linux.md (100%) rename published/{ => 201502}/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md (100%) rename published/{ => 201502}/20150209 CrunchBang Linux Is Dead.md (100%) rename published/{ => 201502}/20150209 Non-Linux FOSS--Homebrew.md (100%) rename published/{ => 201502}/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md (100%) diff --git a/published/20140819 Top 4 Linux download managers.md b/published/201502/20140819 Top 4 Linux download managers.md similarity index 100% rename from published/20140819 Top 4 Linux download managers.md rename to published/201502/20140819 Top 4 Linux download managers.md diff --git a/published/20140821 What is a good EPUB reader on Linux.md b/published/201502/20140821 What is a good EPUB reader on Linux.md similarity index 100% rename from published/20140821 What is a good EPUB reader on Linux.md rename to published/201502/20140821 What is a good EPUB reader on Linux.md diff --git a/published/20140917 How to create a software RAID-1 array with mdadm on Linux.md b/published/201502/20140917 How to create a software RAID-1 array with mdadm on Linux.md similarity index 100% rename from published/20140917 How to create a software RAID-1 array with mdadm on Linux.md rename to published/201502/20140917 How to create a software RAID-1 array with mdadm on Linux.md diff --git a/published/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md b/published/201502/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md similarity index 100% rename from published/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md rename to published/201502/20141029 How to Install and Setup My Weather Indicator in Ubuntu 14.10.md diff --git a/published/20141030 Test drive Linux with nothing but a flash drive.md b/published/201502/20141030 Test drive Linux with nothing but a flash drive.md similarity index 100% rename from published/20141030 Test drive Linux with nothing but a flash drive.md rename to published/201502/20141030 Test drive Linux with nothing but a flash drive.md diff --git a/published/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md b/published/201502/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md similarity index 100% rename from published/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md rename to published/201502/20141108 Adding Ubuntu 14.10, Ubuntu 14.04 and Debian 7 to PXE Network Boot Environment Setup on RHEL or CentOS 7.md diff --git a/published/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md b/published/201502/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md similarity index 100% rename from published/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md rename to published/201502/20141114 How To Use Emoji Anywhere With Twitter's Open Source Library.md diff --git a/published/20141120 How to install Xen hypervisor on unused old hardware.md b/published/201502/20141120 How to install Xen hypervisor on unused old hardware.md similarity index 100% rename from published/20141120 How to install Xen hypervisor on unused old hardware.md rename to published/201502/20141120 How to install Xen hypervisor on unused old hardware.md diff --git a/published/20141203 Undelete Files on Linux Systems.md b/published/201502/20141203 Undelete Files on Linux Systems.md similarity index 100% rename from published/20141203 Undelete Files on Linux Systems.md rename to published/201502/20141203 Undelete Files on Linux Systems.md diff --git a/published/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md b/published/201502/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md similarity index 100% rename from published/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md rename to published/201502/20141204 The Easy Way to Keep Track of Multiple Time Zones in Ubuntu.md diff --git a/published/20141205 What is a good free control panel for VPS.md b/published/201502/20141205 What is a good free control panel for VPS.md similarity index 100% rename from published/20141205 What is a good free control panel for VPS.md rename to published/201502/20141205 What is a good free control panel for VPS.md diff --git a/published/20141210 How to configure rsyslog client for remote logging on CentOS.md b/published/201502/20141210 How to configure rsyslog client for remote logging on CentOS.md similarity index 100% rename from published/20141210 How to configure rsyslog client for remote logging on CentOS.md rename to published/201502/20141210 How to configure rsyslog client for remote logging on CentOS.md diff --git a/published/20141211 How to use matplotlib for scientific plotting on Linux.md b/published/201502/20141211 How to use matplotlib for scientific plotting on Linux.md similarity index 100% rename from published/20141211 How to use matplotlib for scientific plotting on Linux.md rename to published/201502/20141211 How to use matplotlib for scientific plotting on Linux.md diff --git a/published/20141219 How to block unwanted IP addresses on Linux efficiently.md b/published/201502/20141219 How to block unwanted IP addresses on Linux efficiently.md similarity index 100% rename from published/20141219 How to block unwanted IP addresses on Linux efficiently.md rename to published/201502/20141219 How to block unwanted IP addresses on Linux efficiently.md diff --git a/published/20141219 How to schedule appointments and to-do tasks in a Linux terminal.md b/published/201502/20141219 How to schedule appointments and to-do tasks in a Linux terminal.md similarity index 100% rename from published/20141219 How to schedule appointments and to-do tasks in a Linux terminal.md rename to published/201502/20141219 How to schedule appointments and to-do tasks in a Linux terminal.md diff --git a/published/20141223 20 Linux Commands Interview Questions & Answers.md b/published/201502/20141223 20 Linux Commands Interview Questions & Answers.md similarity index 100% rename from published/20141223 20 Linux Commands Interview Questions & Answers.md rename to published/201502/20141223 20 Linux Commands Interview Questions & Answers.md diff --git a/published/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md b/published/201502/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md similarity index 100% rename from published/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md rename to published/201502/20141223 Setting up a 'PXE Network Boot Server' for Multiple Linux Distribution Installations in RHEL or CentOS 7.md diff --git a/published/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md b/published/201502/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md similarity index 100% rename from published/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md rename to published/201502/20141224 Linux FAQs with Answers--How to install Kingsoft Office on Linux.md diff --git a/published/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md b/published/201502/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md similarity index 100% rename from published/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md rename to published/201502/20141224 Linux FAQs with Answers--How to rename multiple files on Linux.md diff --git a/published/20141226 How to Download Music from Grooveshark with a Linux OS.md b/published/201502/20141226 How to Download Music from Grooveshark with a Linux OS.md similarity index 100% rename from published/20141226 How to Download Music from Grooveshark with a Linux OS.md rename to published/201502/20141226 How to Download Music from Grooveshark with a Linux OS.md diff --git a/published/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md b/published/201502/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md similarity index 100% rename from published/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md rename to published/201502/20141229 4 Steps to Setup Local Repository in Ubuntu using APT-mirror.md diff --git a/published/20141229 How to Create Btrfs Filesystem in Linux and its Features.md b/published/201502/20141229 How to Create Btrfs Filesystem in Linux and its Features.md similarity index 100% rename from published/20141229 How to Create Btrfs Filesystem in Linux and its Features.md rename to published/201502/20141229 How to Create Btrfs Filesystem in Linux and its Features.md diff --git a/published/20150104 Auditd--Tool for Security Auditing on Linux Server.md b/published/201502/20150104 Auditd--Tool for Security Auditing on Linux Server.md similarity index 100% rename from published/20150104 Auditd--Tool for Security Auditing on Linux Server.md rename to published/201502/20150104 Auditd--Tool for Security Auditing on Linux Server.md diff --git a/published/20150104 How To Install Websvn In CentOS 7.md b/published/201502/20150104 How To Install Websvn In CentOS 7.md similarity index 100% rename from published/20150104 How To Install Websvn In CentOS 7.md rename to published/201502/20150104 How To Install Websvn In CentOS 7.md diff --git a/published/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md b/published/201502/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md similarity index 100% rename from published/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md rename to published/201502/20150105 How To Install Kodi 14 (XBMC) In Ubuntu 14.04 and Linux Mint 17.md diff --git a/published/20150105 How To Install Winusb In Ubuntu 14.04.md b/published/201502/20150105 How To Install Winusb In Ubuntu 14.04.md similarity index 100% rename from published/20150105 How To Install Winusb In Ubuntu 14.04.md rename to published/201502/20150105 How To Install Winusb In Ubuntu 14.04.md diff --git a/published/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md b/published/201502/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md similarity index 100% rename from published/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md rename to published/201502/20150105 Ubuntu apt-get and apt-cache commands with practical examples.md diff --git a/published/20150106 How to deduplicate files on Linux with dupeGuru.md b/published/201502/20150106 How to deduplicate files on Linux with dupeGuru.md similarity index 100% rename from published/20150106 How to deduplicate files on Linux with dupeGuru.md rename to published/201502/20150106 How to deduplicate files on Linux with dupeGuru.md diff --git a/published/20150106 Managing Linux server configs with the SaltStack.md b/published/201502/20150106 Managing Linux server configs with the SaltStack.md similarity index 100% rename from published/20150106 Managing Linux server configs with the SaltStack.md rename to published/201502/20150106 Managing Linux server configs with the SaltStack.md diff --git a/published/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md b/published/201502/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md similarity index 100% rename from published/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md rename to published/201502/20150108 How to Install SSL on Apache 2.4 in Ubuntu 14.0.4.md diff --git a/published/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md b/published/201502/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md similarity index 100% rename from published/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md rename to published/201502/20150112 Best GNOME Shell Themes For Ubuntu 14.04.md diff --git a/published/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md b/published/201502/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md similarity index 100% rename from published/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md rename to published/201502/20150114 How to Configure Chroot Environment in Ubuntu 14.04.md diff --git a/published/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md b/published/201502/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md similarity index 100% rename from published/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md rename to published/201502/20150114 How to Install Ghost on Ubuntu Server 14.04 LTS (Trusty).md diff --git a/published/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md b/published/201502/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md similarity index 100% rename from published/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md rename to published/201502/20150114 How to Manage Network using nmcli Tool in RedHat or CentOS 7.x.md diff --git a/published/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md b/published/201502/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md similarity index 100% rename from published/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md rename to published/201502/20150114 Installing Telnet In CentOS or RHEL or Scientific Linux 6 & 7.md diff --git a/published/20150114 Why Mac users don't switch to Linux.md b/published/201502/20150114 Why Mac users don't switch to Linux.md similarity index 100% rename from published/20150114 Why Mac users don't switch to Linux.md rename to published/201502/20150114 Why Mac users don't switch to Linux.md diff --git a/published/20150115 Configure Mate Desktop With Mate Tweak.md b/published/201502/20150115 Configure Mate Desktop With Mate Tweak.md similarity index 100% rename from published/20150115 Configure Mate Desktop With Mate Tweak.md rename to published/201502/20150115 Configure Mate Desktop With Mate Tweak.md diff --git a/published/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md b/published/201502/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md similarity index 100% rename from published/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md rename to published/201502/20150115 How To Extract a Tar Files To a Different Directory on a Linux or Unix-like Systems.md diff --git a/published/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md b/published/201502/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md similarity index 100% rename from published/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md rename to published/201502/20150115 Tips for Apache Migration From 2.2 to 2.4 on Ubuntu 14.04.md diff --git a/published/20150116 A Step By Step Guide To Installing Xubuntu Linux.md b/published/201502/20150116 A Step By Step Guide To Installing Xubuntu Linux.md similarity index 100% rename from published/20150116 A Step By Step Guide To Installing Xubuntu Linux.md rename to published/201502/20150116 A Step By Step Guide To Installing Xubuntu Linux.md diff --git a/published/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md b/published/201502/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md similarity index 100% rename from published/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md rename to published/201502/20150119 3 Ways To Create A Lightweight And Persistent Xubuntu Linux USB Drive.md diff --git a/published/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md b/published/201502/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md similarity index 100% rename from published/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md rename to published/201502/20150119 Cutegram--A Better Telegram Client For GNU or Linux.md diff --git a/published/20150119 How To Disable IPv6 In CentOS 7.md b/published/201502/20150119 How To Disable IPv6 In CentOS 7.md similarity index 100% rename from published/20150119 How To Disable IPv6 In CentOS 7.md rename to published/201502/20150119 How To Disable IPv6 In CentOS 7.md diff --git a/published/20150119 Quick Tip--How To Restart Cinnamon After Crash.md b/published/201502/20150119 Quick Tip--How To Restart Cinnamon After Crash.md similarity index 100% rename from published/20150119 Quick Tip--How To Restart Cinnamon After Crash.md rename to published/201502/20150119 Quick Tip--How To Restart Cinnamon After Crash.md diff --git a/published/20150121 If a 32-bit integer overflows.md b/published/201502/20150121 If a 32-bit integer overflows.md similarity index 100% rename from published/20150121 If a 32-bit integer overflows.md rename to published/201502/20150121 If a 32-bit integer overflows.md diff --git a/published/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md b/published/201502/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md similarity index 100% rename from published/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md rename to published/201502/20150121 Linux FAQs with Answers--How to check disk space on Linux with df command.md diff --git a/published/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md b/published/201502/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md similarity index 100% rename from published/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md rename to published/201502/20150122 Linux FAQs with Answers--How to add a cron job on Linux.md diff --git a/published/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md b/published/201502/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md similarity index 100% rename from published/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md rename to published/201502/20150122 Linux FAQs with Answers--How to check memory usage on Linux.md diff --git a/published/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md b/published/201502/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md similarity index 100% rename from published/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md rename to published/201502/20150122 Linux FAQs with Answers--How to set a custom HTTP header in curl.md diff --git a/published/20150125 4 Best Modern Open Source Code Editors For Linux.md b/published/201502/20150125 4 Best Modern Open Source Code Editors For Linux.md similarity index 100% rename from published/20150125 4 Best Modern Open Source Code Editors For Linux.md rename to published/201502/20150125 4 Best Modern Open Source Code Editors For Linux.md diff --git a/published/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md b/published/201502/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md similarity index 100% rename from published/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md rename to published/201502/20150126 Ubuntu 15.04 to Integrate Linux Kernel 3.19 Branch Soon.md diff --git a/published/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md b/published/201502/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md similarity index 100% rename from published/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md rename to published/201502/20150127 Bug in Wi-Fi Direct Android Implementation Causes Denial of Service.md diff --git a/published/20150127 Install Jetty Web Server On CentOS 7.md b/published/201502/20150127 Install Jetty Web Server On CentOS 7.md similarity index 100% rename from published/20150127 Install Jetty Web Server On CentOS 7.md rename to published/201502/20150127 Install Jetty Web Server On CentOS 7.md diff --git a/published/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md b/published/201502/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md similarity index 100% rename from published/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md rename to published/201502/20150128 Meet Vivaldi--A New Web Browser Built for Power Users.md diff --git a/published/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md b/published/201502/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md similarity index 100% rename from published/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md rename to published/201502/20150130 OpenJDK 7 Vulnerabilities Closed in Ubuntu 14.04 and Ubuntu 14.10.md diff --git a/published/20150202 How to create and show a presentation from the command line on Linux.md b/published/201502/20150202 How to create and show a presentation from the command line on Linux.md similarity index 100% rename from published/20150202 How to create and show a presentation from the command line on Linux.md rename to published/201502/20150202 How to create and show a presentation from the command line on Linux.md diff --git a/published/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md b/published/201502/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md similarity index 100% rename from published/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md rename to published/201502/20150203 Linux FAQs with Answers--How to fix 'Your profile could not be opened correctly' on Google Chrome.md diff --git a/published/20150205 Linux FAQs with Answers--How to install Go language on Linux.md b/published/201502/20150205 Linux FAQs with Answers--How to install Go language on Linux.md similarity index 100% rename from published/20150205 Linux FAQs with Answers--How to install Go language on Linux.md rename to published/201502/20150205 Linux FAQs with Answers--How to install Go language on Linux.md diff --git a/published/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md b/published/201502/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md similarity index 100% rename from published/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md rename to published/201502/20150205 LinuxQuestions Survey Results Surface Top Open Source Projects.md diff --git a/published/20150209 CrunchBang Linux Is Dead.md b/published/201502/20150209 CrunchBang Linux Is Dead.md similarity index 100% rename from published/20150209 CrunchBang Linux Is Dead.md rename to published/201502/20150209 CrunchBang Linux Is Dead.md diff --git a/published/20150209 Non-Linux FOSS--Homebrew.md b/published/201502/20150209 Non-Linux FOSS--Homebrew.md similarity index 100% rename from published/20150209 Non-Linux FOSS--Homebrew.md rename to published/201502/20150209 Non-Linux FOSS--Homebrew.md diff --git a/published/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md b/published/201502/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md similarity index 100% rename from published/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md rename to published/201502/20150215 Get Rid Of Two Google Chrome Icons From Dock In Elementary OS Freya.md From ba7260c9d7143f44f5d5f9f297358a73af6623ec Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 2 Mar 2015 14:28:18 +0800 Subject: [PATCH 0143/2517] PUB:20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I @geekpi --- ...get on RHEL or CentOS or Fedora Part -I.md | 69 ++++++++++--------- 1 file changed, 35 insertions(+), 34 deletions(-) rename {translated/tech => published}/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md (67%) diff --git a/translated/tech/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md b/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md similarity index 67% rename from translated/tech/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md rename to published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md index 8455aeb5cb..c425f2fe43 100644 --- a/translated/tech/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md +++ b/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md @@ -1,46 +1,47 @@ -在RHEL/CentOS/Fedora上使用iSCSI Target创建集中式安全存储 - 第一部分 +使用iSCSI Target创建集中式安全存储(一) ================================================================================ -**iSCSI** 是一种就块级别协议,用于通过TCP/IP网络共享**原始存储设备**,可以用已经存在的IP和以太网如网卡、交换机、路由器等通过iSCSI协议共享和访问存储。iSCSI target是一种远程iSCSI服务器或者taget上的远程硬盘。 +**iSCSI** 是一种块级别的协议,用于通过TCP/IP网络共享**原始存储设备**,可以用已经存在的IP和以太网如网卡、交换机、路由器等通过iSCSI协议共享和访问存储。iSCSI target是一种由远程iSCSI服务器(target)提供的远程硬盘。 ![Install iSCSI Target in Linux](http://www.tecmint.com/wp-content/uploads/2014/07/Install-iSCSI-Target-in-Linux.jpg) -在Linux中安装iSCSI Target -我们不需要在客户端为了稳定的连接和性能而占用很大的资源。iSCSI服务器称为Target,它共享存储。iSCSI客户端称为Initiator,它访问Target服务器行的存储。市场中有用于大型存储服务如SAN的iSCSI适配器。 +*在Linux中安装iSCSI Target* + +我们不需要占用很大的资源就可以为客户端提供稳定的连接和性能。iSCSI服务器称为“Target(目标器)”,它提供服务器上的存储共享。iSCSI客户端称为“Initiator(发起程序)”,它访问Target服务器共享的存储。市场中有卖的用于大型存储服务如SAN的iSCSI适配器。 **我们为什么要在大型存储领域中使用iSCSI适配器** -以太网适配器(NIC)被设计用于在系统、服务器和存储设备如NAS间传输分组数据,它不适合在Internet中传输块级别数据。 +以太网适配器(NIC)被设计用于在系统、服务器和存储设备如NAS间传输分组数据,它不适合在Internet中传输块级数据。 ### iSCSI Target的功能 ### - 可以在一台机器上运行几个iSCSI target -- 一台机器的多个iSCSI target可以在iSCSI中访问 -- 一个target就是一块存储,并且可以通过网络被初始化器(客户端)访问 +- 一台机器可以提供多个iSCSI target用于iSCSI SAN访问 +- 一个target就是一块存储,并且可以通过网络被发起程序(客户端)访问 - 把这些存储汇聚在一起让它们在网络中可以访问的是iSCSI LUN(逻辑单元号) -- iSCSI支持在同一个会话中含有多个连接 -- iSCSI初始化器在网络中发现目标接着用LUN验证并登录,这样就可以本地访问远程存储。 -- 我们了一在本地挂载的LUN上安装任何操作系统,就像我们安装我们本地的操作系统一样。 +- iSCSI支持在同一个会话中使用多个连接 +- iSCSI发起程序在网络中发现目标接着用LUN验证并登录,这样就可以本地访问远程存储。 +- 我们可以在本地挂载的LUN上安装任何操作系统,就像我们安装我们本地的操作系统一样。 ### 为什么需要iSCSI? ### 在虚拟化中,我们需要存储拥有高度的冗余性、稳定性,iSCSI以低成本的方式提供了这些特性。与使用光纤通道的SAN比起来,我们可以使用已经存在的设备比如NIC、以太网交换机等建造一个低成本的SAN。 -现在我开始使用iSCSI Target安装并配置安全存储。本篇中,我们遵循下面的步骤 +现在我开始使用iSCSI Target安装并配置安全存储。本篇中,我们遵循下面的步骤: -- 我们需要隔离一个系统来设置iSCSI Target服务器和初始化器(客户端)。 -- 可以在大型存储环境中添加多个硬盘,但是我们除了基本的安装盘之外只使用一个额外的驱动器。 -- 现在我们只使用2块硬盘,一个用于基本的服务器安装,另外一个用于存储(LUN),这个我们会在这个系列的第二篇描述。 +- 我们需要隔离一个系统来设置iSCSI Target服务器和发起程序(客户端)。 +- 在大型存储环境中可以添加多个硬盘,但是这里我们除了基本的安装盘之外只使用了一个额外的驱动器。 +- 这里我们只使用了2块硬盘,一个用于基本的服务器安装,另外一个用于存储(LUN),这个我们会在这个系列的第二篇描述。 #### 主服务器设置 #### -- 操作系统 – CentOS release 6.5 (最终版) +- 操作系统 – CentOS 6.5 (Final) - iSCSI Target IP – 192.168.0.200 - 使用的端口 : TCP 860, 3260 - 配置文件 : /etc/tgt/targets.conf ## 安装 iSCSI Target ## -打开终端并使用yum命令来搜索我们需要在iscsi target上安装的包名。 +打开终端并使用yum命令来搜索需要在iscsi target上安装的包名。 # yum search iscsi @@ -52,21 +53,21 @@ lsscsi.x86_64 : List SCSI devices (or hosts) and associated information scsi-target-utils.x86_64 : The SCSI target daemon and utility programs -We got the search result as above, choose the **Target** package and install to play around. -你会的到上面的那些结果,选择**Target**包来安装 +你会的到上面的那些结果,选择**Target**包来安装。 # yum install scsi-target-utils -y ![Install iSCSI Utils](http://www.tecmint.com/wp-content/uploads/2014/07/Install-iSCSI-in-Linux.jpg) -安装iSCSI工具 -列出安装的包来了解默认的配置、服务和man页面的位置 +*安装iSCSI工具* + +列出安装的包里面的内容来了解默认的配置、服务和man页面的位置。 # rpm -ql scsi-target-utils.x86_64 ![List All iSCSI Files](http://www.tecmint.com/wp-content/uploads/2014/07/List-All-ISCSI-Files.jpg) -列出所有的iSCSI文件 +*列出所有的iSCSI包里面的文件* 让我们启动iSCSI服务,并检查服务运行的状态,iSCSI的服务名是**tgtd**。 @@ -75,7 +76,7 @@ We got the search result as above, choose the **Target** package and install to ![Start iSCSI Service](http://www.tecmint.com/wp-content/uploads/2014/07/Start-iSCSI-Service.jpg) -启动iSCSI服务 +*启动iSCSI服务* 现在我们需要配置开机自动启动。 @@ -87,27 +88,27 @@ We got the search result as above, choose the **Target** package and install to ![Enable iSCSI on Startup](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-iSCSI-on-Startup.jpg) -开机启动iSCSI +*开机启动iSCSI* 现在使用**tgtadm**来列出在我们的服务器上已经配置了哪些target和LUN。 # tgtadm --mode target --op show -**tgtd**已经安装并在运行了,但是上面的命令没有**输出**因为我们还没有在Target服务器上定义LUN。要查看手册,运行‘**man**‘命令。 +**tgtd**已经安装并在运行了,但是上面的命令没有**输出**因为我们还没有在Target服务器上定义LUN。要查看手册,可以运行‘**man**‘命令。 # man tgtadm ![iSCSI Man Pages](http://www.tecmint.com/wp-content/uploads/2014/07/iSCSI-Man-Pages.jpg) -iSCSI Man 页面 +*iSCSI Man 页面* -最终我们需要为iSCSI添加iptable规则,如果你的target服务器上存在iptable的话。首先使用netstat命令找出iscsi target的端口号,target总是监听TCP端口3260。 +如果你的target服务器上有iptable的话,那么我们需要为iSCSI添加iptable规则。首先使用netstat命令找出iscsi target的端口号,target总是监听TCP端口3260。 # netstat -tulnp | grep tgtd ![Find iSCSI Port](http://www.tecmint.com/wp-content/uploads/2014/07/Find-iSCSI-Port.jpg) -找出iSCSI端口 +*找出iSCSI端口* 下面加入如下规则让iptable允许广播iSCSI target发现包。 @@ -116,24 +117,24 @@ iSCSI Man 页面 ![Open iSCSI Ports](http://www.tecmint.com/wp-content/uploads/2014/07/Open-iSCSI-Ports.jpg) -打开iSCSI端口 +*打开iSCSI端口* ![Add iSCSI Ports to Iptables](http://www.tecmint.com/wp-content/uploads/2014/07/Add-iSCSI-Ports-to-Iptables.jpg) -添加iSCSI端口到iptable中 +*添加iSCSI端口到iptable中* -**注意**: 规则可能根据你的 **默认链策略**而不同。接着保存iptable并重启。 +**注意**: 规则可能根据你的 **默认链策略**而不同。接着保存iptable并重启该服务。 # iptables-save # /etc/init.d/iptables restart ![Restart iptables](http://www.tecmint.com/wp-content/uploads/2014/07/Restart-iptables.jpg) -重启iptable +*重启iptable* -现在我们已经部署了一个target服务器来共享LUN给通过TCP/IP认证的初始化器。这也适用于从小到大规模的生产环境。 +现在我们已经部署了一个target服务器来共享LUN给通过TCP/IP认证的发起程序。这也适用于从小到大规模的生产环境。 -在我的下篇文章中,我会展示如何[在Target服务器中使用LVM创建LUN][1],并且如何在客户端中共享LUN,在此之前请继续关注TecMint获取更多的更新,并且不要忘记留下有价值的评论。 +在我的下篇文章中,我会展示如何[在Target服务器中使用LVM创建LUN][1],并且如何在客户端中共享LUN,不要忘记留下有价值的评论。 -------------------------------------------------------------------------------- @@ -141,7 +142,7 @@ via: http://www.tecmint.com/create-centralized-secure-storage-using-iscsi-target 作者:[Babin Lonston][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ff12d39dd38bff82021bb1e58b670078363e211b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 2 Mar 2015 15:09:16 +0800 Subject: [PATCH 0144/2517] PUB:20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II @geekpi --- ...get on RHEL or CentOS or Fedora Part -I.md | 26 +++--- ...r' on RHEL or CentOS or Fedora -Part II.md | 93 ++++++++++--------- 2 files changed, 60 insertions(+), 59 deletions(-) rename {translated/tech => published}/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md (65%) diff --git a/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md b/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md index c425f2fe43..34352ed08c 100644 --- a/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md +++ b/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md @@ -6,7 +6,7 @@ *在Linux中安装iSCSI Target* -我们不需要占用很大的资源就可以为客户端提供稳定的连接和性能。iSCSI服务器称为“Target(目标器)”,它提供服务器上的存储共享。iSCSI客户端称为“Initiator(发起程序)”,它访问Target服务器共享的存储。市场中有卖的用于大型存储服务如SAN的iSCSI适配器。 +我们不需要占用很大的资源就可以为客户端提供稳定的连接和性能。iSCSI服务器称为“Target(目标器)”,它提供服务器上的存储共享。iSCSI客户端称为“Initiator(发起程序)”,它访问目标器共享的存储。市场中有卖的用于大型存储服务如SAN的iSCSI适配器。 **我们为什么要在大型存储领域中使用iSCSI适配器** @@ -14,9 +14,9 @@ ### iSCSI Target的功能 ### -- 可以在一台机器上运行几个iSCSI target -- 一台机器可以提供多个iSCSI target用于iSCSI SAN访问 -- 一个target就是一块存储,并且可以通过网络被发起程序(客户端)访问 +- 可以在一台机器上运行几个iSCSI 目标器 +- 一台机器可以提供多个iSCSI 目标器用于iSCSI SAN访问 +- 一个目标器就是一块存储,并且可以通过网络被发起程序(客户端)访问 - 把这些存储汇聚在一起让它们在网络中可以访问的是iSCSI LUN(逻辑单元号) - iSCSI支持在同一个会话中使用多个连接 - iSCSI发起程序在网络中发现目标接着用LUN验证并登录,这样就可以本地访问远程存储。 @@ -26,7 +26,7 @@ 在虚拟化中,我们需要存储拥有高度的冗余性、稳定性,iSCSI以低成本的方式提供了这些特性。与使用光纤通道的SAN比起来,我们可以使用已经存在的设备比如NIC、以太网交换机等建造一个低成本的SAN。 -现在我开始使用iSCSI Target安装并配置安全存储。本篇中,我们遵循下面的步骤: +现在我开始使用iSCSI 目标器安装并配置安全存储。本篇中,我们遵循下面的步骤: - 我们需要隔离一个系统来设置iSCSI Target服务器和发起程序(客户端)。 - 在大型存储环境中可以添加多个硬盘,但是这里我们除了基本的安装盘之外只使用了一个额外的驱动器。 @@ -35,13 +35,13 @@ #### 主服务器设置 #### - 操作系统 – CentOS 6.5 (Final) -- iSCSI Target IP – 192.168.0.200 +- iSCSI 目标器 IP – 192.168.0.200 - 使用的端口 : TCP 860, 3260 - 配置文件 : /etc/tgt/targets.conf -## 安装 iSCSI Target ## +### 安装 iSCSI Target ### -打开终端并使用yum命令来搜索需要在iscsi target上安装的包名。 +打开终端并使用yum命令来搜索需要在iscsi 目标器上安装的包名。 # yum search iscsi @@ -90,11 +90,11 @@ *开机启动iSCSI* -现在使用**tgtadm**来列出在我们的服务器上已经配置了哪些target和LUN。 +现在使用**tgtadm**来列出在我们的服务器上已经配置了哪些目标器和LUN。 # tgtadm --mode target --op show -**tgtd**已经安装并在运行了,但是上面的命令没有**输出**因为我们还没有在Target服务器上定义LUN。要查看手册,可以运行‘**man**‘命令。 +**tgtd**已经安装并在运行了,但是上面的命令没有**输出**因为我们还没有在目标器上定义LUN。要查看手册,可以运行‘**man**‘命令。 # man tgtadm @@ -110,7 +110,7 @@ *找出iSCSI端口* -下面加入如下规则让iptable允许广播iSCSI target发现包。 +下面加入如下规则让iptable允许广播iSCSI 目标器发现包。 # iptables -A INPUT -i eth0 -p tcp --dport 860 -m state --state NEW,ESTABLISHED -j ACCEPT # iptables -A INPUT -i eth0 -p tcp --dport 3260 -m state --state NEW,ESTABLISHED -j ACCEPT @@ -132,9 +132,9 @@ *重启iptable* -现在我们已经部署了一个target服务器来共享LUN给通过TCP/IP认证的发起程序。这也适用于从小到大规模的生产环境。 +现在我们已经部署了一个目标器来共享LUN给通过TCP/IP认证的发起程序。这也适用于从小到大规模的生产环境。 -在我的下篇文章中,我会展示如何[在Target服务器中使用LVM创建LUN][1],并且如何在客户端中共享LUN,不要忘记留下有价值的评论。 +在我的下篇文章中,我会展示如何[在目标器中使用LVM创建LUN][1],并且如何在客户端中共享LUN,不要忘记留下有价值的评论。 -------------------------------------------------------------------------------- diff --git a/translated/tech/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md b/published/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md similarity index 65% rename from translated/tech/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md rename to published/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md index bac7aba27f..3c8f09a168 100644 --- a/translated/tech/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md +++ b/published/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md @@ -1,47 +1,47 @@ -如何在RHEL/CentOS/Fedora中使用LVM创建和设置LUN- 第二部分 +在 iSCSI Target 服务器中使用LVM创建和设置LUN(二) ================================================================================ -LUN是逻辑单元号,它与iSCSI存储服务器共享。物理iSCSI target服务器共享它的驱动器来初始化TCP/IP网络。驱动器的集合称作LUN来幸存一个大型存储也就是SAN(Storage Area Network)。在真实环境中LUN在LVM中定义,因此它可以按需扩展。 +LUN是逻辑单元号,它与iSCSI存储服务器共享。iSCSI 目标器通过TCP/IP网络共享它的物理驱动器给发起程序(initiator)。这些来自一个大型存储(SAN:Storage Area Network)的驱动器集合称作LUN。在真实环境中LUN是在LVM中定义的,因为它可以按需扩展。 ![Create LUNS using LVM in Target Server](http://www.tecmint.com/wp-content/uploads/2014/07/Create-LUNS-inLVM.png) -Create LUNS using LVM in Target Server + +*在目标器中使用 LVM 创建 LUN* ### 为什么使用LUN? ### -LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块物理驱动器组成。我们可以使用LUN作为系统物理驱动器来安装操作系统,LUN在集群、虚拟服务器、SAN中使用。在虚拟服务器中使用LUN的目的是作为系统存储。LUN的性能和可靠性根据在创建目标存储服务器时所使用的驱动器决定。 +LUN用于存储,SAN存储大多数由LUN的集群来组成存储池,LUN由目标器的几块物理驱动器组成。我们可以使用LUN作为系统物理驱动器来安装操作系统,LUN可以用在集群、虚拟服务器、SAN中。在虚拟服务器中使用LUN的主要用途是作为操作系统的存储。LUN的性能和可靠性根据在创建目标存储服务器时所使用的驱动器决定。 -### 需求 ### +### 前置阅读 ### -要了解创建iSCSI target服务器点击下面的链接。 +要了解创建iSCSI 目标器,点击下面的链接。 -- [使用iSCSI target创建爱你集中话安全存储][1] +- [使用iSCSI Target创建集中式安全存储(一)][1] #### 主服务器设置 #### -系统信息和网络设置部分与已经写的iSCSI Target服务相同 - 我们在相同的服务器上定义LUN。 +系统信息和网络设置部分与前文的iSCSI 目标器相同 - 我们在相同的服务器上定义LUN。 - -- 操作系统 – CentOS release 6.5 (最终版) -- iSCSI Target IP – 192.168.0.200 +- 操作系统 – CentOS 6.5 (Final) +- iSCSI 目标器 IP – 192.168.0.200 - 使用的端口 : TCP 860, 3260 - 配置文件 : /etc/tgt/targets.conf -## 在iSCSI Target Server使用LVM创建LUN ## +### 在iSCSI 目标器使用LVM创建LUN ### 首先,用**fdisk -l**命令找出驱动器的列表,这会列出系统中所有分区的列表。 # fdisk -l -上面的命令只会给出基本系统的驱动器信息。为了个到存储设备的信息,使用下面的命令来的到存储设备的列表。 +上面的命令只会给出基本系统的驱动器信息。为了得到存储设备的信息,使用下面的命令来得到存储设备的列表。 # fdisk -l /dev/vda && fdisk -l /dev/sda ![List Storage Drives](http://www.tecmint.com/wp-content/uploads/2014/07/1.jpg) -列出存储设备 +*列出存储设备* **注意**:这里**vda**是虚拟机硬盘,因为我使用的是虚拟机来用于演示,**/dev/sda** 是额外加入的存储。 -### 第一步: 创建用于LUN的LVM ### +### 第一步: 创建用于LUN的LVM驱动器 ### 我们使用**/dev/sda**驱动器来创建LVM。 @@ -49,14 +49,14 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![List LVM Drive](http://www.tecmint.com/wp-content/uploads/2014/07/2.jpg) -列出LVM驱动器 +*列出LVM驱动器* -现在让我们如下使用fdisk命令列出驱动器分区。 +现在让我们使用如下fdisk命令列出驱动器分区。 # fdisk -cu /dev/sda -- The option ‘**-c**‘ 关闭DOS兼容模式。 -- The option ‘**-u**‘ 用于列出分区表,给出扇区而不是柱面的大小。 +- 选项 ‘**-c**’ 关闭DOS兼容模式。 +- 选项 ‘**-u**’ 用于列出分区表时给出扇区而不是柱面的大小。 使用**n**创建新的分区。 @@ -109,7 +109,7 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![Create LVM Partition](http://www.tecmint.com/wp-content/uploads/2014/07/3.jpg) -创建LVM分区 +*创建LVM分区* 系统重启后,使用fdisk命令列出分区表。 @@ -117,7 +117,7 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![Verify LVM Partition](http://www.tecmint.com/wp-content/uploads/2014/07/4.jpg) -验证LVM分区 +*验证LVM分区* ### 第二步: 为LUN创建逻辑卷 ### @@ -125,7 +125,7 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 # pvcreate /dev/sda1 -用iSCSI的名字创建卷组来区分组。 +用iSCSI的名字创建卷组来区分这个卷组。 # vgcreate vg_iscsi /dev/sda1 @@ -148,17 +148,17 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![Creating LVM Logical Volumes](http://www.tecmint.com/wp-content/uploads/2014/07/5.jpg) -创建LVM逻辑卷 +*创建LVM逻辑卷* ![Verify LVM Logical Volumes](http://www.tecmint.com/wp-content/uploads/2014/07/6.jpg) -验证LVM逻辑卷 +*验证LVM逻辑卷* -### 第三步: 在Target Server中定义LUN ### +### 第三步: 在目标器中定义LUN ### -我们已经创建了逻辑卷并准备使用LUN,现在我们在target配置中定义LUN,如果这样那么它只能用在客户机中(启动器)。 +我们已经创建了逻辑卷并准备使用LUN,现在我们在目标器配置中定义LUN,只有这样做它才能用在客户机中(发起程序)。 -用你选择的编辑器打开位于‘/etc/tgt/targets.conf’的target配置文件。 +用你选择的编辑器打开位于‘/etc/tgt/targets.conf’的目标器配置文件。 # vim /etc/tgt/targets.conf @@ -179,20 +179,22 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![Configure LUNs in Target Server](http://www.tecmint.com/wp-content/uploads/2014/07/7.jpg) -在target中配置LUN +*在target中配置LUN* -- iSCSI 限定名 (iqn.2014-07.com.tecmint:tgt1). -- 随你怎么使用 -- 确定使用目标, 这台服务器中的第一个目标 -- 4. LVM共享特定的LUN。 +上图的解释: -接下来使用下面命令重载**tgd**服务配置。 +1. iSCSI 采取限定名 (iqn.2014-07.com.tecmint:tgt1). +2. 名称随便你 +3. 用于确定目标名, 这是这台服务器中的第一个目标 +4. LVM共享特定的LUN。 + +接下来使用下面的命令重载**tgd**服务配置。 # /etc/init.d/tgtd reload ![Reload Configuration](http://www.tecmint.com/wp-content/uploads/2014/07/8.jpg) -重载配置 +*重载配置* 接下来使用下面的命令验证可用的LUN。 @@ -200,23 +202,22 @@ LUN用于存储,SAN存储大多数有LUN的集群来组成池,LUN由几块 ![List Available LUNs](http://www.tecmint.com/wp-content/uploads/2014/07/9.jpg) -列出可用LUN +*列出可用LUN* ![LUNs Information](http://www.tecmint.com/wp-content/uploads/2014/07/10.jpg) -LUN信息 +*LUN信息* -The above command will give long list of available LUNs with following information. 上面的命令会列出可用LUN的下面这些信息 -- iSCSI 限定名 -- iSCSI 准备使用 -- 默认LUN 0被控制器保留 -- LUN 1是我们定义的target服务器 -- 这里我为每个LUN都定义了4GB -- 在线: 是的,这就是可以使用的LUN +1. iSCSI 限定名 +2. iSCSI 已经准备好 +3. 默认LUN 0被控制器所保留 +4. LUN 1是我们定义的目标器 +5. 这里我为每个LUN都定义了4GB +6. 在线: 是的,这就是可以使用的LUN -现在我们已经使用LVM为target服务器定义了LUN,这可扩展并且支持很多特性,如快照。我们将会在第三部分了解如何用target服务器授权,并且本地挂载远程存储。 +现在我们已经使用LVM为目标器定义了LUN,这可扩展并且支持很多特性,如快照。我们将会在第三部分了解如何用目标器授权,并且本地挂载远程存储。 -------------------------------------------------------------------------------- @@ -224,9 +225,9 @@ via: http://www.tecmint.com/create-luns-using-lvm-in-iscsi-target/ 作者:[Babin Lonston][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/create-centralized-secure-storage-using-iscsi-targetin-linux/ \ No newline at end of file +[1]:http://linux.cn/article-4971-1.html \ No newline at end of file From 15d74bcf653856a432cf0a9aa83d0bfbdf1cfa94 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 2 Mar 2015 15:46:48 +0800 Subject: [PATCH 0145/2517] PUB:20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III @geekpi --- ...p on RHEL or CentOS or Fedora -Part III.md | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) rename {translated/tech => published}/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md (68%) diff --git a/translated/tech/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md b/published/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md similarity index 68% rename from translated/tech/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md rename to published/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md index f4754a6bb8..482733a3a2 100644 --- a/translated/tech/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md +++ b/published/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md @@ -1,33 +1,33 @@ -中心化存储(iSCSI)- “初始器客户端” 在RHEL/CentOS/Fedora上的设置 - 第三部分 -================================================================================ -**iSCSI** 初始化器是一种用于与iSCSI target服务器认证并访问服务器上共享的的LUN的客户端。我们可以在本地挂载的硬盘上部署任何操作系统,只需要安装一个包来与target服务器验证。 +设置iSCSI的发起程序(客户端)(三) +============================ + +**iSCSI** 发起程序是一种用于同 iSCSI 目标器认证并访问服务器上共享的LUN的客户端。我们可以在本地挂载的硬盘上部署任何操作系统,只需要安装一个包来与目标器验证。 ![Client Initiator Setup](http://www.tecmint.com/wp-content/uploads/2014/07/Client-Initiator-Setup.jpg) -初始器客户端设置 +*初始器客户端设置* -#### 功能 #### +### 功能 ### - 可以处理本地挂载磁盘上的任意文件系统 -- 在使用fdisk命令后不需要重启系统 +- 在使用fdisk命令分区后不需要重启系统 -#### 要求 #### +### 前置阅读 ### -- [使用iSCSI Target创建集中化安全存储- 第一部分][1] -- [在Target服务器中使用LVM创建LUN - 第二部分][2] +- [使用iSCSI Target创建集中式安全存储(一)][1] +- [在 iSCSI Target 服务器中使用LVM创建和设置LUN(二)][2] #### 我的客户端设置 #### -- 操作系统 – CentOS release 6.5 (最终版) -- iSCSI Target IP – 192.168.0.50 +- 操作系统 – CentOS 6.5 (Final) +- iSCSI 目标器 IP – 192.168.0.50 - 使用的端口 : TCP 3260 -**Warning**: Never stop the service while LUNs Mounted in Client machines (Initiator). -**Warning**:永远不要在使用LUN的时候在客户端中(初始化器)停止服务。 +**警告**:永远不要在LUN还挂载在客户端(发起程序)时停止服务。 ### 客户端设置 ### -**1.** 在客户端,我们需要安装包‘**iSCSI-initiator-utils**‘,用下面的命令搜索包。 +**1.** 在客户端,我们需要安装包‘**iSCSI-initiator-utils**’,用下面的命令搜索包。 # yum search iscsi @@ -37,29 +37,29 @@ iscsi-initiator-utils.x86_64 : iSCSI daemon and utility programs iscsi-initiator-utils-devel.x86_64 : Development files for iscsi-initiator-utils -**2.** 一旦定位了包,就用下面的yum命令安装初始化包。 +**2.** 找到了包,就用下面的yum命令安装初始化包。 # yum install iscsi-initiator-utils.x86_64 -**3.** 安装完毕后,我们需要发现**Target 服务器**上的共享。客户端的命令有点难记,因此我们使用man来的到需要运行的命令列表 +**3.** 安装完毕后,我们需要发现**目标器**上的共享。客户端的命令有点难记,因此我们使用man找到需要运行的命令列表。 # man iscsiadm ![man iscsiadm](http://www.tecmint.com/wp-content/uploads/2014/07/man-iscsiadm.jpg) -man iscsiadm +*man iscsiadm* -**4.** 按下**SHIFT+G** 进入man页的底部并且稍微向上滚动来的到登录的示例命令。下面的发现命令中,需要用我们的**服务器IP地址**来替换。 +**4.** 按下**SHIFT+G** 进入man页的底部并且稍微向上滚动找到示例的登录命令。下面的发现命令中,需要用我们的**服务器IP地址**来替换。 # iscsiadm --mode discoverydb --type sendtargets --portal 192.168.0.200 --discover -**5.** 这里我们从下面的命令中得到了iSCSIi限定名(iqn)。 +**5.** 这里我们从下面的命令输出中找到了iSCSI的限定名(iqn)。 192.168.0.200:3260,1 iqn.2014-07.com.tecmint:tgt1 ![Discover Target](http://www.tecmint.com/wp-content/uploads/2014/07/Discover-Target.jpg) -发现服务器 +*发现服务器* **6.** 要登录就用下面的命令来连接一台LUN到我们本地系统中,这会与服务器验证并允许我们登录LUN。 @@ -67,7 +67,7 @@ man iscsiadm ![Login To Target Server](http://www.tecmint.com/wp-content/uploads/2014/07/Login-To-Target-Server.jpg) -登录到服务器 +*登录到服务器* **注意**:登出使用登录命令并在命令的最后使用logout来替换。 @@ -75,15 +75,15 @@ man iscsiadm ![Logout from Target Server](http://www.tecmint.com/wp-content/uploads/2014/07/Logout-from-Target-Server.jpg) -等出服务器 +*登出服务器* -**7.** 登录服务器后,使用下面的命令列出节点的记录。 +**7.** 登录服务器后,使用下面的命令列出节点的记录行。 # iscsiadm --mode node ![List Node](http://www.tecmint.com/wp-content/uploads/2014/07/List-Node.jpg) -列出节点 +*列出节点* **8.** 显示特定节点的所有数据 @@ -109,7 +109,7 @@ man iscsiadm iface.linklocal_autocfg = .... -**9.** 接着列出使用的磁盘,fdisk会列出所有的认证过的磁盘。 +**9.** 接着列出使用的磁盘,fdisk会列出所有的登录认证过的磁盘。 # fdisk -l /dev/sda @@ -123,7 +123,7 @@ man iscsiadm ![Create New Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Create-New-Partition.jpg) -创建新分区 +*创建新分区* **注意**:在使用fdisk创建新分区之后,我们无需重启,就像使用我们本地的文件系统一样就行。因为这个将远程共享存储挂载到本地了。 @@ -133,7 +133,7 @@ man iscsiadm ![Format New Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Format-New-Partition.jpg) -格式化新分区 +*格式化新分区* **12.** 创建一个目录来挂载新创建的分区 @@ -143,20 +143,20 @@ man iscsiadm ![Mount New Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Mount-New-Partition.jpg) -挂载新分区 +*挂载新分区* **13.** 列出挂载点 # df -Th -- **-T** – Prints files system types. -- **-h** – Prints in human readable format eg : Megabyte or Gigabyte. +- **-T** – 输出文件系统类型 +- **-h** – 以易读的方式显示大小 ![List New Partition](http://www.tecmint.com/wp-content/uploads/2014/07/List-New-Partition.jpg) -列出新分区 +*列出新分区* -**14.** 如果需要永久挂在使用fdtab文件 +**14.** 如果需要永久挂载,使用fdtab文件 # vim /etc/fstab @@ -168,18 +168,18 @@ man iscsiadm ![Auto Mount Partition](http://www.tecmint.com/wp-content/uploads/2014/07/Auto-Mount-Partition.jpg) -自动挂载分区 +*自动挂载分区* **16.** 最后检查我们fstab文件是否有错误。 # mount -av - **-a** – 所有挂载点 -- **-v** – 繁琐模式 +- **-v** – 冗余模式 ![Verify fstab Entries](http://www.tecmint.com/wp-content/uploads/2014/07/Verify-fstab-Entries.jpg) -验证fstab文件 +*验证fstab文件* 我们已经成功完成了我们的客户端配置。现在让我们像本地磁盘一样使用它吧。 @@ -189,10 +189,10 @@ via: http://www.tecmint.com/iscsi-initiator-client-setup/ 作者:[Babin Lonston][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/create-centralized-secure-storage-using-iscsi-targetin-linux/ -[2]:http://www.tecmint.com/create-luns-using-lvm-in-iscsi-target/ +[1]:http://linux.cn/article-4971-1.html +[2]:http://linux.cn/article-4972-1.html From 4ed37060b0afcd9f4af251e661da0f303d543124 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 2 Mar 2015 16:18:56 +0800 Subject: [PATCH 0146/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Run Linux Applications From The Terminal In Background Mode.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150115 How To Run Linux Applications From The Terminal In Background Mode.md (100%) diff --git a/translated/share/20150115 How To Run Linux Applications From The Terminal In Background Mode.md b/published/20150115 How To Run Linux Applications From The Terminal In Background Mode.md similarity index 100% rename from translated/share/20150115 How To Run Linux Applications From The Terminal In Background Mode.md rename to published/20150115 How To Run Linux Applications From The Terminal In Background Mode.md From 71ccaba7157eeb522de5319d254f777ef46c7952 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 2 Mar 2015 16:47:26 +0800 Subject: [PATCH 0147/2517] =?UTF-8?q?20150302-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ications in a Linux System with Trickle.md | 296 ++++++++++++++++++ ...onment using Commandline Tools in Linux.md | 152 +++++++++ ... Passwordless SSH Logon to Ubuntu 14.04.md | 85 +++++ 3 files changed, 533 insertions(+) create mode 100644 sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md create mode 100644 sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md create mode 100644 sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md diff --git a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md new file mode 100644 index 0000000000..18607f7f96 --- /dev/null +++ b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md @@ -0,0 +1,296 @@ +How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle +================================================================================ +Have you ever encountered situations where one application dominated you all network bandwidth? If you have ever been in a situation where one application ate all your traffic, then you will value the role of the trickle bandwidth shaper application. Either you are a system admin or just a Linux user, you need to learn how to control the upload and download speeds for applications to make sure that your network bandwidth is not burned by a single application. + +![Install Trickle Bandwidth Limit in Linux](http://www.tecmint.com/wp-content/uploads/2013/11/Bandwidth-limit-trickle.png) +Install Trickle Bandwidth Limit in Linux + +### What is Trickle? ### + +Trickle is a network bandwidth shaper tool that allows us to manage the upload and download speeds of applications in order to prevent any single one of them to hog all (or most) of the available bandwidth. In few words, trickle lets you control the network traffic rate on a per-application basis, as opposed to per-user control, which is the classic example of bandwidth shaping in a client-server environment, and is probably the setup we are more familiar with. + +### How Trickle Works? ### + +In addition, trickle can help us to define priorities on a per-application basis, so that when overall limits have been set for the entire system, priority apps will still get more bandwidth automatically. To accomplish this task, trickle sets traffic limits to the way in which data is sent to, and received from, sockets using TCP connections. We must note that, other than the data transfer rates, trickle does not modify in any way the behavior of the process it is shaping at any given moment. + +### What Can’t Trickle do? ### + +The only limitation, so to speak, is that trickle will not work with statically linked applications or binaries with the SUID or SGID bits set since it uses dynamic linking and loading to place itself between the shaped process and its associated network socket. Trickle then acts as a proxy between these two software components. + +Since trickle does not require superuser privileges in order to run, users can set their own traffic limits. Since this may not be desirable, we will explore how to set overall limits that system users cannot exceed. In other words, users will still be able to manage their traffic rates, but always within the boundaries set by the system administrator. + +In this article we will explain how to limit the network bandwidth used by applications in a Linux server with trickle. To generate the necessary traffic, we will use ncftpput and ncftpget (both tools are available by installing ncftp) on the client (CentOS 7 server – dev1: 192.168.0.17), and vsftpd on the server (Debian Wheezy 7.5 – dev2: 192.168.0.15) for demonstration purposes. The same instructions also works on RedHat, Fedora and Ubuntu based systems. + +#### Prerequisites #### + +1. For RHEL/CentOS 7/6, [enable the EPEL repository][1]. Extra Packages for Enterprise Linux (EPEL) is a repository of high-quality free and open-source software maintained by the Fedora project and is 100% compatible with its spinoffs, such as Red Hat Enterprise Linux and CentOS. Both trickle and ncftp are made available from this repository. + +2. Install ncftp as follows: + + # yum update && sudo yum install ncftp [On RedHat based systems] + # aptitude update && aptitude install ncftp [On Debian based systems] + +3. Set up a FTP server in a separate server. Please note that although FTP is inherently insecure, it is still widely used in cases when security in uploading or downloading files is not needed. We are using it in this article to illustrate the bounties of trickle and because it shows the transfer rates in stdout on the client, and we will leave the discussion of whether it should or should not be used for another date and time :). + + # yum update && yum install vsftpd [On RedHat based systems] + # aptitude update && aptitude install vsftpd [On Debian based systems] + +Now, edit the /etc/vsftpd/vsftpd.conf file on the FTP server as follows: + + anonymous_enable=NO + local_enable=YES + chroot_local_user=YES + allow_writeable_chroot=YES + +After that, make sure to start vsftpd for your current session and to enable it for automatic start on future boots: + + # systemctl start vsftpd [For systemd-based systems] + # systemctl enable vsftpd + # service vsftpd start [For init-based systems] + # chkconfig vsftpd on + +4. If you chose to set up the FTP server in a CentOS/RHEL 7 droplet with SSH keys for remote access, you will need a password-protected user account with the appropriate directory and file permissions for uploading and downloading the desired content OUTSIDE root’s home directory. + +You can then browse to your home directory by entering the following URL in your browser. A login window will pop up prompting you for a valid user account and password on the FTP server. + + ftp://192.168.0.15 + +If the authentication succeeds, you will see the contents of your home directory. Later in this tutorial you will be able to refresh that page to display the files that have been uploaded during previous steps. + +![FTP Directory Tree](http://www.tecmint.com/wp-content/uploads/2013/11/FTP-Directory-Tree.png) +FTP Directory Tree + +### How to Install Trickle in Linux ### + +1. Install trickle via yum or aptitude. + +To ensure a successful installation, it is considered good practice to make sure the currently installed packages are up-to-date (using yum update) before installing the tool itself. + + # yum -y update && yum install trickle [On RedHat based systems] + # aptitude -y update && aptitude install trickle [On Debian based systems] + +2. Verify whether trickle will work with the desired binary. + +As we explained earlier, trickle will only work with binaries using dynamic, or shared, libraries. To verify whether we can use this tool with a certain application, we can use the well-known ldd utility, where ldd stands for list dynamic dependencies. Specifically, we will look for the presence of glibc (the GNU C library) in the list of dynamic dependencies of any given program because it is precisely that library which defines the system calls involved in communication through sockets. + +Run the following command against a given binary to see if trickle can be used to shape its bandwidth: + + # ldd $(which [binary]) | grep libc.so + +For example, + + # ldd $(which ncftp) | grep libc.so + +whose output is: + + # libc.so.6 => /lib64/libc.so.6 (0x00007efff2e6c000) + +The string between brackets in the output may change from system to system and even between subsequent runs of the same command, since it represents the load address of the library in physical memory. + +If the above command does not return any results, it means that the binary it was run against does not use libc and thus trickle cannot be used as bandwidth shaper in that case. + +### Learn How to Use Trickle ### + +The most basic usage of trickle is in standalone mode. Using this approach, trickle is used to explicitly define the download and upload speeds of a given application. As we explained earlier, for the sake of brevity, we will use the same application for download and upload tests. + +#### Running Trickle in Standalone Mode #### + +We will compare the download and upload speeds with and without using trickle. The -d option indicates the download speed in KB/s, while the -u flag tells trickle to limit the upload speed by the same unit. In addition, we will use the -s flag, which specifies that trickle should run in standalone mode. + +The basic syntax to run trickle in standalone mode is as follows: + + # trickle -s -d [download rate in KB/s] -u [upload rate in KB/s] + +In order to perform the following examples on your own, make sure to have trickle and ncftp installed on the client machine (192.168.0.17 in my case). + +**Example 1: Uploading a 2.8 MB PDF file with and without trickle.** + +We are using the freely-distributable Linux Fundamentals PDF file (available from [here][2]) for the following tests. + +You can initially download this file to your current working directory with the following command: + + # wget http://linux-training.be/files/books/LinuxFun.pdf + +The syntax to upload a file to our FTP server without trickle is as follows: + + # ncftpput -u username -p password 192.168.0.15 /remote_directory local-filename + +Where /remote_directory is the path of the upload directory relative to username’s home, and local-filename is a file in your current working directory. + +Specifically, without trickle we get a peak upload speed of 52.02 MB/s (please note that this is not the real average upload speed, but an instant starting peak), and the file gets uploaded almost instantly: + + # ncftpput -u username -p password 192.168.0.15 /testdir LinuxFun.pdf + +Output: + + LinuxFun.pdf: 2.79 MB 52.02 MB/s + +With trickle, we will limit the upload transfer rate at 5 KB/s. Before uploading the file for the second time, we need to delete it from the destination directory; otherwise, ncftp will inform us that the file at the destination directory is the same that we are trying to upload, and will not perform the transfer: + + # rm /absolute/path/to/destination/directory/LinuxFun.pdf + +Then: + + # trickle -s -u 5 ncftpput -u username -p password 111.111.111.111 /testdir LinuxFun.pdf + +Output: + + LinuxFun.pdf: 2.79 MB 4.94 kB/s + +In the example above, we can see that the average upload speed dropped to ~5 KB/s. + +**Example 2: Downloading the same 2.8 MB PDF file with and without trickle** + +First, remember to delete the PDF from the original source directory: + + # rm /absolute/path/to/source/directory/LinuxFun.pdf + +Please note that the following cases will download the remote file to the current directory in the client machine. This fact is indicated by the period (‘.‘) that appears after the IP address of the FTP server. + +Without trickle: + + # ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf + +Output: + + LinuxFun.pdf: 2.79 MB 260.53 MB/s + +With trickle, limiting the download speed at 20 KB/s: + + # trickle -s -d 30 ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf + +Output: + + LinuxFun.pdf: 2.79 MB 17.76 kB/s + +### Running Trickle in Supervised [unmanaged] Mode ### + +Trickle can also run in unmanaged mode, following a series of parameters defined in /etc/trickled.conf. This file defines how trickled (the daemon) behaves and manages trickle. + +In addition, if we want to set global settings to be used, overall, by all applications, we will need to use the trickled command. This command runs the daemon and allows us to define download and upload limits that will be shared by all the applications run through trickle without us needing to specify limits each time. + +For example, running: + + # trickled -d 50 -u 10 + +Will cause that the download and upload speeds of any application run through trickle be limited to 30 KB/s and 10 KB/s, respectively. + +Please note that you can check at any time whether trickled is running and with what arguments: + + # ps -ef | grep trickled | grep -v grep + +Output: + + root 16475 1 0 Dec24 ? 00:00:04 trickled -d 50 -u 10 + +**Example 3: Uploading a 19 MB mp4 file to our FTP server using with and without trickle.** + +In this example we will use the freely-distributable “He is the gift” video, available for download from [this link][3]. + +We will initially download this file to your current working directory with the following command: + + # wget http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 + +First off, we will start the trickled daemon with the command listed above: + + # trickled -d 30 -u 10 + +Without trickle: + + # ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 + +Output: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 36.31 MB/s + +With trickle: + + # trickle ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 + +Output: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 9.51 kB/s + +As we can see in the output above, the upload transfer rate dropped to ~10 KB/s. + +**Example 4: Downloading the same video with and without trickle** + +As in Example 2, we will be downloading the file to the current working directory. + +Without trickle: + + # ncftpget -u username -p password 192.168.0.15 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 + +Output: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 108.34 MB/s + +With trickle: + + # trickle ncftpget -u username -p password 111.111.111.111 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 + +Output: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 29.28 kB/s + +Which is in accordance with the download limit set earlier (30 KB/s). + +**Note:** That once the daemon has been started, there is no need to set individual limits for each application that uses trickle. + +As we mentioned earlier, one can further customize trickle’s bandwidth shaping through trickled.conf. A typical section in this file consists of the following: + + [service] + Priority = + Time-Smoothing = + Length-Smoothing = + +Where, + +- [service] indicates the name of the application whose bandwidth usage we intend to shape. +- Priority allows us to specify a service to have a higher priority relative to another, thus not allowing a single application to hog all the bandwidth which the daemon is managing. The lower the number, the more bandwidth that is assigned to [service]. +- Time-Smoothing [in seconds]: defines with what time intervals trickled will try to let the application transfer and / or receive data. Smaller values (something between the range of 0.1 – 1s) are ideal for interactive applications and will result in a more continuous (smooth) session while slightly larger values (1 – 10 s) are better for applications that need bulk transfer. If no value is specified, the default (5 s) is used. +- Length-Smoothing [in KB]: the idea is the same as in Time-Smoothing, but based on the length of an I/O operation. If no value is specified, the default (10 KB) is used. + +Changing the smoothing values will translate into the application specified by [service] using transfer rates within an interval instead of a fixed value. Unfortunately, there is no formula to calculate the lower and upper limits of this interval as it mainly depends of each specific case scenario. + +The following is a trickled.conf sample file in the CentOS 7 client (192.168.0.17): + + [ssh] + Priority = 1 + Time-Smoothing = 0.1 + Length-Smoothing = 2 + + [ftp] + Priority = 2 + Time-Smoothing = 1 + Length-Smoothing = 3 + +Using this setup, trickled will prioritize SSH connections over FTP transfers. Note that an interactive process, such as SSH, uses smaller time-smoothing values, whereas a service that performs bulk data transfers (FTP) uses a greater value. The smoothing values are responsible for the download and upload speeds in our previous example not matching the exact value specified by the trickled daemon but moving in an interval close to it. + +### Conclusion ### + +In this article we have explored how to limit the bandwidth used by applications using trickle on Fedora-based distributions and Debian / derivatives. Other possible use cases include, but are not limited to: + +- Limiting the download speed via a system utility such as [wget][4], or a torrent client, for example. +- Limiting the speed at which your system can be updated via `[yum][5]` (or `[aptitude][6]`, if you’re in a Debian-based system), the package management system. +- If your server happens to be behind a proxy or firewall (or is the proxy or firewall itself), you can use trickle to set limits on both the download and upload, or communication speed with the clients or the outside. + +Questions and comments are most welcome. Feel free to use the form below to send them our way. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[2]:http://linux-training.be/files/books/LinuxFun.pdf +[3]:http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 +[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ +[5]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[6]:http://www.tecmint.com/dpkg-command-examples/ \ No newline at end of file diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md new file mode 100644 index 0000000000..dcd3fcf919 --- /dev/null +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -0,0 +1,152 @@ +How to Manage KVM Virtual Environment using Commandline Tools in Linux +================================================================================ +In this 4th part of our [KVM series][1], we are discussing KVM environment management using CLI. We use ‘virt-install’ CL tool to create and configure virtual machines, virsh CL tool to create and configure storage pools and qemu-img CL tool to create and manage disk images. + +![KVM Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/KVM-Management-in-Linux.jpg) +KVM Management in Linux + +There is nothing new concepts in this article, we just do the previous tasks using command line tools. There is no new prerequisite, just the same procedure, we have discussed in previous parts. + +### Step 1: Configure Storage Pool ### + +Virsh CLI tool is a management user interface for managing virsh guest domains. The virsh program can be used either to run one command by giving the command and its arguments on the shell command line. + +In this section, we will use it to create storage pool for our KVM environment. For more information about the tool, use the following command. + + # man virsh + +**1. Using the command pool-define-as with virsh to define new storage pool, you need also to specify name, type and type’s arguments.** + +In our case, name will be Spool1, type will be dir. By default you could provide five arguments for the type: + +- source-host +- source-path +- source-dev +- source-name +- target + +For (Dir) type, we need the last argumet “target” to specify the path of storage pool, for the other arguments we could use “-” to unspecific them. + + # virsh pool-define-as Spool1 dir - - - - "/mnt/personal-data/SPool1/" + +![Create New Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Storage-Pool.png) +Create New Storage Pool + +**2. To check the all storage pools you have in the environment, use the following command.** + + # virsh pool-list --all + +![List All Storage Pools](http://www.tecmint.com/wp-content/uploads/2015/02/List-All-Storage-Pools.png) +List All Storage Pools + +**3. Now it’s time to build the storage pool, which we have defined above with the following command.** + + # virsh pool-build Spool1 + +![Build Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Build-Storage-Pool.png) +Build Storage Pool + +**4. Using the virsh command pool-start to active/enable the storage pool we have just created/built above.** + + # virsh pool-start Spool1 + +![Active Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Active-Storage-Pool.png) +Active Storage Pool + +**5. Check the status of environment storage pools using the following command.** + + # virsh pool-list --all + +![Check Storage Pool Status](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Pool-Status.png) +Check Storage Pool Status + +You will notice that the status of Spool1 converted to active. + +**6. Configure Spool1 to start by libvirtd service every time automaticlly.** + + # virsh pool-autostart Spool1 + +![Configure KVM Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Configure-Storage-Pool.png) +Configure KVM Storage Pool + +**7. Finally lets display information about our new storage pool.** + + # virsh pool-info Spool1 + +![Check KVM Storage Pool Information](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Pool-Information.png) +Check KVM Storage Pool Information + +Congratulations, Spool1 is ready to be used lets try to create storage volumes using it. + +### Step 2: Configure Storage Volumes/Disk Images ### + +Now it is disk image’s turn, using qemu-img to create new disk image from Spool1. For more details about qemy-img, use the man page. + + # man qemu-img + +**8. We should specify the qemu-img command “create, check,….etc”, disk image format, the path of disk image you want to create and the size.** + + # qemu-img create -f raw /mnt/personal-data/SPool1/SVol1.img 10G + +![Create Storage Volume](http://www.tecmint.com/wp-content/uploads/2015/02/Create-Storage-Volumes.png) +Create Storage Volume + +**9. By using qemu-img command info, you could get information about your new disk image.** + +![Check Storage Volume Information](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Volume-Information.png) +Check Storage Volume Information + +**Warning**: Never use qemu-img to modify images in use by a running virtual machine or any other process; this may destroy the image. + +Now its time to create virtual machines in the next step. + +### Step 3: Create Virtual Machines ### + +10. Now with the last and latest part, we will create virtual machines using virt-istall. The virt-install is a command line tool for creating new KVM virtual machines using the “libvirt” hypervisor management library. For more details about it, use: + + # man virt-install + +To create new KVM virtual machine, you need to use the following command with all the details like shown in the below. + +- Name: Virtual Machine’s name. +- Disk Location: Location of disk image. +- Graphics : How to connect to VM “Usually be SPICE”. +- vcpu : Number of virtual CPU’s. +- ram : Amount of allocated memory in megabytes. +- Location : Specify the installation source path. +- Network : Specify the virtual network “Usually be vibr00 bridge”. + + # virt-install --name=rhel7 --disk path=/mnt/personal-data/SPool1/SVol1.img --graphics spice --vcpu=1 --ram=1024 --location=/run/media/dos/9e6f605a-f502-4e98-826e-e6376caea288/rhel-server-7.0-x86_64-dvd.iso --network bridge=virbr0 + +![Create New Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Virtual-Machines.png) +Create New Virtual Machine + +**11. You will find also a pop-up virt-vierwer window appears to communicate with virtual machine through it.** + +![Booting Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Booting-Virtual-Machine.jpeg) +Booting Virtual Machine + +![Installation of Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Installation-of-Virtual-Machine.jpeg) +Installation of Virtual Machine + +### Conclusion ### + +This is the latest part of our KVM tutorial, we haven’t covered everything of course. It a shot to scratch the KVM environment so its your turn to search and keep hands dirty using this nice resources. + +- [KVM Getting Started Guide][2] +- [KVM Virtualization Deployment and Administration Guide][3] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/kvm-management-tools-to-manage-virtual-machines/ + +作者:[Mohammad Dosoukey][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/dos2009/ +[1]:http://www.tecmint.com/install-and-configure-kvm-in-linux/ +[2]:https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Getting_Started_Guide/index.html +[3]:https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/index.html \ No newline at end of file diff --git a/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md b/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md new file mode 100644 index 0000000000..478cc10009 --- /dev/null +++ b/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md @@ -0,0 +1,85 @@ +How to Setup Passwordless SSH Logon to Ubuntu 14.04 +================================================================================ +Hi all, today we'll gonna learn how we can setup Passwordless SSH Logon to Ubuntu 14.04 "Trusty". Only the workstations having the correct matching key pair (private and public) will be allowed to logon to the SSH server, without the key paring, access will not be allowed. + +Usually, we need to enter username and password combination to connect to an SSH console. If the combination is correct to that of the system's then, we get access to the server else we are denied from the access. But, there is something more secure than Password logon, we have passwordless SSH logon using the encrypted keys. + +If you want to enable this secured option, we can simply disable password-logon and only allow logon using an encryption key. When using encryption keys option, the client computer generates a private and public key pair. The client then must upload the public key to the SSH server authorized_key file. Before access is granted, the server and client computer validate the key pair. If the public key on the server matches the private key submitted via the client then access will be granted else will be denied. + +This is a very secure way authenticating to a SSH server and it’s a recommended method if you wish to implement secure logon with single user SSH logon. Here's a quick step-wise process on how to enable Passwordless SSH logon. + +### 1. Installing Openssh Server ### + +First off all, we'll need to update our local repository index. To do so, we'll first need to run apt-get update as shown below. + + $ sudo apt-get update + +![Updating Repo Index](http://blog.linoxide.com/wp-content/uploads/2015/02/updating-repo-list.png) + +Now, we can install openssh-server by running following command. + + $ sudo apt-get install openssh-server + +![Installing openssh server](http://blog.linoxide.com/wp-content/uploads/2015/02/installing-openssh-server.png) + +### 2. Enabling Openssh Server ### + +Now, we'll want to enable OpenSSH server after we successfully installed it on our Ubuntu 14.04 Operating System. The command to enable/start the server is given as follows. + + $ sudo service ssh start + +OR + + $ sudo /etc/init.d/ssh start + +### 3. Configuring Key Pair ### + +After we have installed our OpenSSH Server and enabled it. We'll now finally wanna go for generating our Public and Private Key Pair. To do that, run the following command in a terminal or console. + + $ ssh-keygen -t rsa + +After running the above command, we'll be prompted to complete a series of tasks. The first will be where to save the keys, press Enter to choose the default location which is in a hidden .ssh folder in the home directory. The next prompt will be to enter the Paraphrase. I personally leave this blank (just press enter) to continue. It will then create the key pair and we’re done. + +![Generating Key Pair](http://blog.linoxide.com/wp-content/uploads/2015/02/generating-key-pair.png) + +After generation of the key pair, we will need to **copy the client’s public key to the SSH server** or host inorder to create trusted relationship with it. We'll need to run the commands below to copy the client public key to the server. + + $ ssh-copy-id user@ip_address + +After the public key is copied to the server, we can now go and disable password logon via SSH. To do that, we'll need to open **/etc/ssh/ssh_config** via a text editor by run the commands below. + + $ sudo nano /etc/ssh/sshd_config + +Now, we'll need to uncomment the lines and set the values as shown below. + +![Configuring sshd Config](http://blog.linoxide.com/wp-content/uploads/2015/02/configuring-sshd_config.png) + +### 4. Restarting the SSH Server ### + +Finally, after we are done configuring SSH Server, we'll want to restart our SSH Server so that all the changes will take affect. To restart one can run the following command in a terminal or the console. + + $ sudo service ssh restart + +OR + + $ sudo /etc/init.d/ssh restart + +![Restarting ssh](http://blog.linoxide.com/wp-content/uploads/2015/02/restarting-ssh.png) + +Finally, we can now ssh in to the server without a password and only from the client having the same key pair not the password. + +### Conclusion ### + +Hurray! We have successfully enabled Passwordless SSH logon. It is a lot secure to enable Encrypted Key Pair SSH logon . This is a very secure way authenticating to a SSH server and it’s a recommended method if you wish to implement secure logon with single user SSH logon. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Encrypted Secure SSH Login :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-passwordless-ssh-logon-ubuntu-14-04/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ \ No newline at end of file From 110bd128f7b39ba8bf40fadd094362ada9e50ac0 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Mon, 2 Mar 2015 17:19:25 +0800 Subject: [PATCH 0148/2517] [Translated]20150209 How to back up a Debian system using backupninja.md --- ...ck up a Debian system using backupninja.md | 77 +++++++++---------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/sources/tech/20150209 How to back up a Debian system using backupninja.md b/sources/tech/20150209 How to back up a Debian system using backupninja.md index 97e43f57bf..b58baa3bdc 100644 --- a/sources/tech/20150209 How to back up a Debian system using backupninja.md +++ b/sources/tech/20150209 How to back up a Debian system using backupninja.md @@ -1,64 +1,62 @@ -FSSlc translating - -How to back up a Debian system using backupninja +如何使用 backupninja 来备份一个 Debian 系统 ================================================================================ -Prudence or experience by disaster can teach every [sysadmin][1] the importance of taking frequent system backups. You can do so by writing good old shell scripts, or using one (or more) of the many backup tools available for the job. Thus the more tools you become acquainted with, the better informed decisions you will make when implementing a backup solution. +面临灾难时的小心谨慎或体验可以教会每一个系统管理采取频繁的系统备份的重要性。你可以通过编写存在已久的管用的 shell 脚本,或使用一个(或多个) 适合这项工作的备份工具来完成备份任务。因此,当你要实施一个备份解决方案时,你了解的备份工具越多,你做出的决策就会越明智。 -In this article we will present [backupninja][2], a lightweight and easy-to-configure system backup tool. With the help of programs like **rdiff-backup**, **duplicity**, **mysqlhotcopy** and **mysqldump**, Backupninja offers common backup features such as remote, secure and incremental file system backups, encrypted backup, and MySQL/MariaDB database backup. You can selectively enable status email reports, and can back up general hardware and system information as well. One key strength of backupninja is a built-in console-based wizard (called **ninjahelper**) that allows you to easily create configuration files for various backup scenarios. +在这篇文章中,我们将为你介绍 [backupninja][2] ,一个轻量且易于配置的系统备份工具。在诸如 **rdiff-backup**, **duplicity**, **mysqlhotcopy** 和 **mysqldump** 等程序的帮助下, Backupninja 可以提供常用的备份功能,如执行远程的、安全的和增量式的文件系统备份,加密备份以及 MySQL/MariaDB 数据库备份。你可以选择性地开启使用 email 进行状态报告功能,也可以对一般的硬件和系统的信息进行备份。 backupninja 的一个关键功能是它拥有一个内建的基于控制台的向导程序(被称为 **ninjahelper**),而后者允许你为不同的备份情景轻松地创建配置文件。 -The downside, so to speak, is that backupninja requires other "helper" programs to be installed in order to take full advantage of all its features. While backupninja's RPM package is available for Red Hat-based distributions, backupninja's dependencies are optimized for Debian and its derivatives. Thus it is not recommended to try backupninja for Red Hat based systems. +如果非要说的话,backupninja 的缺点是:为了充分使用其所有的功能,它要求一些其他“助手”程序已经被安装在了计算机中。尽管 backupninja 有针对基于 Red Hat(红帽) 的发行版本的 RPM 安装包,但 backupninja 针对 Debian 和它的衍生发行版本的依赖进行了优化。所以不建议在基于 Red Hat 的系统上尝试 backupninja 。 -In this tutorial, we will cover the backupninja installation for Debian-based distributions. +在这篇教程中,我们将介绍如何在基于 Debian 的发行版本上安装 backupninja 。 -### Installing Backupninja ### - -Run the following command as root: +### 安装 Backupninja ### + +以 root 账户来运行下面的命令: # aptitude install backupninja -During installation, several files and directories will be created: +在安装的过程中,有几个文件和目录将被创建: -- **/usr/sbin/backupninja** is the main bash shell script. -- **/etc/cron.d/backupninja**, by default, instructs cron to run the main script once per hour. -- **/etc/logrotate.d/backupninja** rotates the logs created by the program. -- **/etc/backup.d/** is the directory where the configuration files for backup actions reside. -- **/etc/backupninja.conf** is the main configuration file that includes general options. It is well commented and explains each option in detail. -- **/usr/share/backupninja** is the directory where the scripts used by backupninja are located (aka "handlers"). These are the scripts which are in charge of doing the actual work. In this directory you will also find .helper files, which are used to configure and set up ninjahelper menus. -- **/usr/share/doc/backupninja/examples** contains templates for action configuration files (the kind of files that are created through ninjahelper). +- **/usr/sbin/backupninja** 是 bash shell 主脚本; +- **/etc/cron.d/backupninja**, 默认情况下,构建 cron 任务来每隔一个小时运行上面的主脚本; +- **/etc/logrotate.d/backupninja** 处理由 backupninja 程序产生的日志;(注:我不知道这里的 rotate 该如何翻译) +- **/etc/backup.d/** 是备份操作的配置文件驻留的目录; +- **/etc/backupninja.conf** 是包含一般选项的主配置文件。这个文件带有良好的注释且详细解释了每个选项的含义; +- **/usr/share/backupninja** 是那些被 backupninja 使用的脚本所处的目录。这些脚本文件负责执行实际的工作。在这个目录中,你还可以找到 `.helper` 文件,它们可以被用来配置和设定 ninjahelper 的菜单; +- **/usr/share/doc/backupninja/examples** 含有操作配置文件(即通过 ninjahelper 产生的文件)的模板。 -### Running Ninjahelper for the First Time ### +### 首次运行 Ninjahelper ### -When we try to launch ninjahelper, we can see that an internal dependency may be required. If prompted, enter "yes" and press the ENTER key to install dialog (a tool that displays user-friendly dialog boxes from shell scripts). +当我们尝试启动 ninjahelper 时,我们可以看到一个内部依赖可能会被需要。假如系统进行了提示,请输入 “yes” 并敲下回车键来安装 dialog(一个用于从 shell 脚本中显示友好对话框的工具)。 ![](https://farm8.staticflickr.com/7537/15700597667_6618fbc142_z.jpg) -When you press Enter after typing yes, backupninja will install dialog and present the following screen once it's done. +当你在键入 yes 后再敲回车键时,backupninja 将会安装 dialog,一旦安装完成,将呈现出下面的截屏: ![](https://farm8.staticflickr.com/7469/15884374871_29f1c9acf1_z.jpg) -#### Example 1: Back up Hardware and System Info #### +#### 案例 1: 备份硬件和系统信息 #### -After launching ninjahelper, we will create a new backup action: +在启动了 ninjahelper 之后,我们将创建一个新的备份操作: ![](https://farm9.staticflickr.com/8637/15885715132_eb3156678e_z.jpg) -If necessary helper programs are not installed, we will be presented with the following screens. Disregard this step if these packages have already been installed on your system. +如果必要的助手程序没有被安装,下面的截屏将会呈现在我们眼前。假如这些软件包已经在你的系统上安装了,请跳过这一步。 ![](https://farm8.staticflickr.com/7508/15700315139_4c6117ef32_z.jpg) -The next step consists of selecting the items that you want to be a part of this backup. The first four are selected by default, but you can deselect them by pressing the spacebar. +接下来的一步需要你选取相关条目来作为此次备份任务的一部分。前四个条目已经默认被选上了,但你可以通过按空格键来撤消选择。 ![](https://farm8.staticflickr.com/7507/15699051870_65abaf52e5_z.jpg) -Once you are done, press OK to continue. You will be able to choose whether you want to use the default configuration file for this backup action (/etc/backup.d/10.sys), or if you want to create a new one. In the latter case, a new file with the same contents as the default one will be created under the same directory but named 11.sys, and so on for future system backup actions. Note that you can edit the configuration file once it's created with your preferred text editor. +一旦你完成了上面的步骤,按 OK 选项来继续。接着你将能够选择 是愿意使用默认的配置文件(/etc/backup.d/10.sys)来完成这次备份操作,还是创建一个新的配置文件。若为后者,一个含有与默认配置文件内容相同的文件将会在相同的目录下被创建,但它被命名为 11.sys,后续的备份操作将会创建类似的文件(注:只不过命名的序号不同)。需要说明的是一旦这个新的配置文件被创建,你便可以使用你喜爱的文本编辑器来编辑该文件。 ![](https://farm9.staticflickr.com/8654/15885715072_1e6126e929_o.png) -#### Example 2: Incremental Rsync Pull Backup of a Remote Directory #### +#### 案例 2: 一个远程目录的增量式 Rsync 拉取备份 #### -As you most likely know, rsync is widely used to synchronize files and folders over a network. In the following example we will discuss an approach to take incremental pull backups of a remote directory with hardlinking to save historical data and store them in our local file server. This approach will help us save space and increase security on the server side. +正如你最有可能知道的那样, rsync 被广泛地用于通过网络同步文件或文件夹。在接下来的例子中,我们将讨论一个使用硬链接来为一个远程目录做增量式拉取备份的方法,它被用来保存历史数据以及在我们本地的文件服务器中恢复这些历史数据。这个方法将帮助我们节省空间并增强位于服务器端的安全性。 -**Step 1**: Write a custom script in the /etc/backup.d directory with the following contents and chmod it to 600. Note that this directory may contain, besides plain configuration files, scripts that you want to run when backupninja is executed, with the advantage of using variables present in the main configuration file. +**步骤 1**:编写一个位于 `/etc/backup.d`的带有如下内容的自定义脚本,并将它的权限设置为 600 。需要说明的是,除了一般的配置文件,这个目录可能还包含当 backupninja 被执行时你想运行的一些脚本文件,它们可以发挥出位于主配置文件中的变量的优势。 # REMOTE USER user=root @@ -74,36 +72,35 @@ As you most likely know, rsync is widely used to synchronize files and folders o # RSYNC rsync -av --delete --recursive --link-dest=$localdirold $user@$host:$remotedir $localdir -In the above configuration, the '--link-dest' option of rsync is use to hardlink unchanged files (in all attributes) from $localdir-old to the destination directory ($localdir). +在上面的配置中, rsync 的 ‘--link-dest’ 选项的作用是为位于 $localdir-old 目录中那些没有改变的文件(包含所有属性) 硬链接到目标目录 ($localdir)。 -**Step 2**: Before backupninja is run for the first time, the parent directory (/home/gacanepa in this case) is empty. The first time we execute: +**步骤 2**:在 backupninja 第一次运行之前,上层目录(这个例子中指的是 /home/gacanepa) 是空的。第一次我们执行下面的命令: # backupninja -n -the backup.0 directory is created, and later in the process its name is changed to backup.1. +backup.0 目录就被创建了,并在接下来的过程中,它的名称将会被更改为 backup.1。 -The second time we run backupninja, backup.0 is re-created and backup.1 is kept. +当我们第二次运行 backupninja 时, backup.0 将会被重新创建,而 backup.1 被保留。 ![](https://farm8.staticflickr.com/7581/15700597497_0e0cd89ab9.jpg) -**Step 3**: Verify that the contents of backup.1 are hard links to the files in backup.0 by comparing the respective inode numbers and directory sizes. +**步骤 3**: 确保 backup.1 里面的文件硬链接到 backup.0 里的文件,我们可以通过比较文件的 inode( i 节点) 数和目录的大小来达到此目的。 ![](https://farm9.staticflickr.com/8636/15700315029_e922ce771b.jpg) -### Conclusion ### +### 总结 ### -Backupninja is not only a classic backup tool, but also an easy-to-configure utility. You can write your own handlers to run backupninja as per the individual configuration files located in /etc/backup.d, and you can even write helpers for ninjahelper in order to include them in its main interface. +Backupninja 不仅是一个经典的备份工具,它也是一个易于配置的实用程序。你可以通过编写你自己的 handler(注:我不知道该如何翻译 handler 这个单词) 来运行 backupninja 并将它们作为位于 `/etc.backup.d` 的个人配置文件。甚至你还可以为 ninjahelper 编写助手程序,以达到将它们包括在 ninjahelper 的主界面上。 -For example, if you create a handler named xmodulo in /usr/share/backupninja, it will run by default every file with the .xmodulo extension in /etc/backup.d. If you decide you want to add your xmodulo handler to ninjahelper, you can write the corresponding helper as xmodulo.helper. In addition, if you want backupninja to run an arbitrary script, just add it to /etc/backup.d and you are good to go. - -Feel free to leave your comments, questions, or suggestions, using the form below. we will be more than glad to hear from you. +例如,假如你在 `/usr/share/backupninja`目录中创建了一个名为 modulo 的 handler,它将自动运行那些位于 `/etc/backup.d` 目录中以 .xmodulo 为后缀的每个文件。如果你决定添加你的 xmodulo handler 到 ninjahelper 中, 你可以编写相应的助手程序,即 xmodulo.helper 。另外,假如你想 让 backupninja 运行任意一个脚本,只需把它添加到 `/etc/backup.d` 目录中,这样你的目的便可以达到了。 +欢迎使用下面的评论框来留下你的评论、问题或建议。听到你的回应将会使我们很高兴。 -------------------------------------------------------------------------------- via: http://xmodulo.com/backup-debian-system-backupninja.html 作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) +译者:[FSSlc](https://github.com/FSSlc) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a084066cd833531045425b8ac80b76919df38b90 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Mon, 2 Mar 2015 17:21:36 +0800 Subject: [PATCH 0149/2517] =?UTF-8?q?=E5=B0=86=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E7=9A=84=E6=96=87=E7=AB=A0=E7=A7=BB=E5=8A=A8=E5=88=B0=20transl?= =?UTF-8?q?ated=20=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150209 How to back up a Debian system using backupninja.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150209 How to back up a Debian system using backupninja.md (100%) diff --git a/sources/tech/20150209 How to back up a Debian system using backupninja.md b/translated/tech/20150209 How to back up a Debian system using backupninja.md similarity index 100% rename from sources/tech/20150209 How to back up a Debian system using backupninja.md rename to translated/tech/20150209 How to back up a Debian system using backupninja.md From 403c84a7ff65720e24526e758c054ecb77fc5d2b Mon Sep 17 00:00:00 2001 From: martin qi Date: Mon, 2 Mar 2015 19:34:32 +0800 Subject: [PATCH 0150/2517] translating --- ...302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md b/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md index 478cc10009..58c6351003 100644 --- a/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md +++ b/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md @@ -1,3 +1,5 @@ +translating by martin. + How to Setup Passwordless SSH Logon to Ubuntu 14.04 ================================================================================ Hi all, today we'll gonna learn how we can setup Passwordless SSH Logon to Ubuntu 14.04 "Trusty". Only the workstations having the correct matching key pair (private and public) will be allowed to logon to the SSH server, without the key paring, access will not be allowed. @@ -82,4 +84,4 @@ via: http://linoxide.com/ubuntu-how-to/setup-passwordless-ssh-logon-ubuntu-14-04 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/arunp/ \ No newline at end of file +[a]:http://linoxide.com/author/arunp/ From 507f0091b2dc22735eabd39f9f6925631c7d569f Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Mon, 2 Mar 2015 22:34:55 +0800 Subject: [PATCH 0151/2517] Update 20150227 Bringing a Bunch of Best Known Linux Network Tools.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...0227 Bringing a Bunch of Best Known Linux Network Tools.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md b/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md index 207abb0530..b5f8f6273e 100644 --- a/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md +++ b/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md @@ -1,3 +1,5 @@ +FSSlc translating + Bringing a Bunch of Best Known Linux Network Tools ================================================================================ It is very useful to use command line tools to monitor the network on your system and there are a tons of them out there available for the linux user such as nethogs, ntopng, nload, iftop, iptraf, bmon, slurm, tcptrack, cbm, netwatch, collectl, trafshow, cacti, etherape, ipband, jnettop, netspeed and speedometer. @@ -441,4 +443,4 @@ via: http://linoxide.com/monitoring-2/network-monitoring-tools-linux/ [7]:http://www.isotton.com/utils/cbm/ [8]:https://github.com/tgraf/bmon/ [9]:http://www.tcpdump.org/ -[10]:http://www.ntop.org/ \ No newline at end of file +[10]:http://www.ntop.org/ From 3670e03bf68864a3153e5523924865d3dbb458f9 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 3 Mar 2015 13:40:39 +0800 Subject: [PATCH 0152/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Default Instead of Ubuntu Software Center.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md index a8032e03ca..9e6499eb2b 100644 --- a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md +++ b/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md @@ -1,12 +1,12 @@ -如何使 GDebi 代替 Ubuntu Software Center 作为默认的 deb 包安装器 +如何使 GDebi 默认代替 Ubuntu 软件中心 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Make_GDebi_Default.jpeg) -假如你使用 Ubuntu 或像 Elementary OS Freya 一样的基于 Ubuntu 的 Linux 发行版本,也许你使用 Ubuntu 软件中心 来安装 `.deb` 可执行文件。对于查找和安装应用, Ubuntu 软件中心 是一个很好的应用,但它会消耗很多资源且运行速度缓慢。这就是为什么我更偏爱使用 [App Grid,一个 Ubuntu 软件中心 的轻量替代品][1] 的原因。 +如果你使用 Ubuntu 或基于 Ubuntu 的 Linux 发行版本,比如Elementary OS Freya,也许你使用 Ubuntu 软件中心来安装 `.deb` 可执行文件。对于查找和安装应用,Ubuntu 软件中心是一个很好的应用,但它会消耗很多资源且运行速度缓慢。这就是为什么我更偏爱使用 [一个 Ubuntu 软件中心的轻量级替代品——App Grid][1] 的原因。 -现在,假如你只是尝试安装一个 `.deb` 文件, 我不会向你推荐 Ubuntu 软件中心 或 App Grid ,我的建议为 GDebi,一个安装 Debian 可执行文件的专用程序。它极其轻量,且专注于安装 `.deb` 文件。关于 GDebi 最有用的功能是它也可以为你展示出将要安装的程序的依赖。 +现在,假如你只是尝试安装一个 `.deb` 文件,我不会向你推荐 Ubuntu 软件中心或 App Grid ,我的建议为 GDebi,一个安装 Debian 可执行文件的专用程序。它极其轻量,且专注于安装 `.deb` 文件。GDebi 最有用的功能是它也可以为你展示出将要安装的程序的依赖。 -在这篇文章中,我们将见证 ** 如何安装 GDebi 和使用它代替 Ubuntu 软件中心 作为默认的安装器**。 +在这篇文章中,我们将看一看 **如何安装 GDebi 以及使用它代替 Ubuntu 软件中心作为默认的安装器**。 ### 在 Ubuntu 和其他 Linux 发行版本中安装 GDebi ### @@ -16,7 +16,7 @@ ### 使得 GDebi 成为默认的 `.deb`包安装器 ### -一旦你安装了 GDebi,就该是看看如何使它成为安装 `.deb` 文件的默认应用的时刻了。请读者注意在这篇教程中 我使用的是 Elementary OS Freya ,但下面的步骤对于所有基于 Ubuntu 的发行版本都是适用的。 +一旦你安装了 GDebi,就是时候来看看如何使它成为安装 `.deb` 文件的默认应用了。请读者注意在这篇教程中我使用的是 Elementary OS Freya ,但下面的步骤对于所有基于 Ubuntu 的发行版本都是适用的。可能截屏显示会有点不同。 首先下载一个 `.deb`文件。例如你已经下载了一个 Google Chrome 的 `.deb`包。进入下载目录并右击该 `.deb`文件。在这里,接着选择 **属性**选项。 @@ -26,9 +26,9 @@ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/GDebi_default_Ubuntu.jpeg) -这样下次你双击一个 `.deb` 文件,便会自动打开 GDebi 来安装这个`.deb` 文件。使用这样轻量的应用的确是一个[加速 Ubuntu][2] 或其他 Linux 系统的好方法。 +这样下次你双击一个 `.deb` 文件,便会自动打开 GDebi 来安装这个`.deb` 文件。使用这样轻量级的应用的确是一个[加速 Ubuntu][2] 或其他 Linux 系统的好方法。 -你有什么意见呢?对于安装应用,你仍然偏爱于 Ubuntu 软件中心 还是 GDebi 呢?抑或,假如你是一个守旧派,也许你更喜欢 [新立得软件包管理器(Synaptic Package Manager)][3]? 哪一个是你的最爱呢? +你怎么看呢?对于安装应用,你仍然偏爱 Ubuntu 软件中心还是 GDebi 呢?如果你是一个守旧派,也许你更喜欢 [新立得软件包管理器(Synaptic Package Manager)][3]?那么,哪一个是你的最爱? -------------------------------------------------------------------------------- @@ -36,7 +36,7 @@ via: http://itsfoss.com/gdebi-default-ubuntu-software-center/ 作者:[Abhishek][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 5c41ea0a2a13013dc5a047b15d3735d533345e4b Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 3 Mar 2015 13:55:41 +0800 Subject: [PATCH 0153/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...How To Make GDebi Default Instead of Ubuntu Software Center.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md (100%) diff --git a/translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/published/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md similarity index 100% rename from translated/tech/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md rename to published/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md From 711098662457046a3ed63da6be55adabd575244b Mon Sep 17 00:00:00 2001 From: theo-l Date: Tue, 3 Mar 2015 10:48:11 -0300 Subject: [PATCH 0154/2517] theo-l translating --- ...0150121 How to Monitor Network Usage with nload in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md b/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md index afbfa4eab6..511b15fd64 100644 --- a/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md +++ b/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md @@ -1,3 +1,4 @@ +theo-l translating How to Monitor Network Usage with nload in Linux ================================================================================ nload is a free linux utility that can help the linux user or sysadmin to monitor network traffic and bandwidth usage in real time by providing two simple graphs: one per incoming traffic and one for outgoing traffic. @@ -203,4 +204,4 @@ via: http://linoxide.com/monitoring-2/monitor-network-usage-nload/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/oltjano/ -[1]:http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz \ No newline at end of file +[1]:http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz From 0b918c89d137f30454c1ee65503129c340b6a564 Mon Sep 17 00:00:00 2001 From: theo-l Date: Tue, 3 Mar 2015 18:07:28 -0300 Subject: [PATCH 0155/2517] translating --- ...50121 How to Monitor Network Usage with nload in Linux.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md b/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md index 511b15fd64..1ab8f35e95 100644 --- a/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md +++ b/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md @@ -1,10 +1,15 @@ theo-l translating How to Monitor Network Usage with nload in Linux +在linux中如何通过nload来监控网络使用情况 ================================================================================ nload is a free linux utility that can help the linux user or sysadmin to monitor network traffic and bandwidth usage in real time by providing two simple graphs: one per incoming traffic and one for outgoing traffic. +nload 是一个免费的linux工具,通过提供两个简单的图形化界面来帮助linux用户和系统管理员来实时监控网络流量以及宽带使用情况:一个作为进入流量,一个作为流出流量. I really like to use **nload** to display information on my screen about the current download speed, the total incoming traffic, and the average download speed. The graphs reported by nload tool are very easy to interpret and what is the most important thing they are very helpful. + + + According to the manual pages it monitors all network devices by default, but you can easily specify the device you want to monitor and also switch between different network devices using the arrow keys. There are many options avaliable such as -t to determine refresh interval of the display in milliseconds (the default value of interval is 500), -m to show multiple devices at the same time(traffic graphs are not shown when this option is used), -u to set the type of unit used for the display of traffic numbers and many others that we are going to explore and practise in this tutorial. ### How to install nload on your linux machine ### From c5ab4078938c6a6e45e5446f33a1e286bd1b5161 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Wed, 4 Mar 2015 10:04:42 +0800 Subject: [PATCH 0156/2517] [translating] 20150211 25 Tips for Intermediate Git Users --- sources/tech/20150211 25 Tips for Intermediate Git Users.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150211 25 Tips for Intermediate Git Users.md b/sources/tech/20150211 25 Tips for Intermediate Git Users.md index a4dcb2b546..71ead3ad6a 100644 --- a/sources/tech/20150211 25 Tips for Intermediate Git Users.md +++ b/sources/tech/20150211 25 Tips for Intermediate Git Users.md @@ -1,3 +1,4 @@ +zpl1025 25 Tips for Intermediate Git Users ================================================================================ I’ve been using git for about 18 months now and thought I knew it pretty well. Then we had [Scott Chacon][1] from GitHub over to do some training at [LVS, a supplier/developer of betting/gaming software][2] (where contracted until 2013) and I learnt a ton in the first day. @@ -466,4 +467,4 @@ via: https://www.andyjeffries.co.uk/25-tips-for-intermediate-git-users/ [a]:https://www.andyjeffries.co.uk/author/andy-jeffries/ [1]:http://gitcasts.com/about -[2]:http://www.lvs.co.uk/ \ No newline at end of file +[2]:http://www.lvs.co.uk/ From ed9edea7e1da37542fd84c1d042317f31b9d180c Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 10:57:55 +0800 Subject: [PATCH 0157/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md translating by JeffDing --- ...19 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index 346937d2b9..3b732a2d7b 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -1,3 +1,4 @@ +translating by JeffDing Ubuntu 15.04 Finally Lets You Set Menus To ‘Always Show’ ================================================================================ **If you hate the way that Unity’s global menus fade out of view after you mouse away, Ubuntu 15.04 has a little extra to win you around.** @@ -38,4 +39,4 @@ via: http://www.omgubuntu.co.uk/2015/01/ubuntu-15-04-always-show-menu-bar-option [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:http://www.omgubuntu.co.uk/2014/02/locally-integrated-menus-ubuntu-14-04 -[2]:http://www.omgubuntu.co.uk/2014/03/minimize-click-launcher-option-ubuntu-14-04 \ No newline at end of file +[2]:http://www.omgubuntu.co.uk/2014/03/minimize-click-launcher-option-ubuntu-14-04 From c4ec73a213a3c50bc2fef8ad5d7341f2b170600a Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 11:18:56 +0800 Subject: [PATCH 0158/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...u 15.04 Finally Lets You Set Menus ToAlways Show.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index 3b732a2d7b..3d4928847d 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -1,15 +1,15 @@ translating by JeffDing -Ubuntu 15.04 Finally Lets You Set Menus To ‘Always Show’ +Ubuntu 15.04 最终你可以设置你的菜单 ‘始终可见’ ================================================================================ -**If you hate the way that Unity’s global menus fade out of view after you mouse away, Ubuntu 15.04 has a little extra to win you around.** +**如果你不喜欢 Unity 的全局菜单在你的鼠标离开后就淡出你的视野, Ubuntu 15.04 有一些额外附加去实现这点.** ![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/locally-integrated-menus-in-ubuntu.png) -The latest build of Unity for Ubuntu 15.04, currently sitting in the ‘proposed’ channel, offers an option to **make app menus visible in Ubuntu**. +最新的Ubuntu 15.04的Unity界面通过在提议通道提供了一个选项**使应用程序菜单在Ubuntu中可见**. -No fading, no timeout, no missing menus. +不时尚, 不过时, 没有丢失的菜单. -The drawback for now is that it can currently only be enabled through a dconf switch and not a regular user-facing option. +最大的缺点是现在它目前只能通过dconf开关,而不是常规的面向用户的选项设置。 I’d hope (if not expect) that an option to set the feature is added to the Ubuntu System Settings > Appearance section as development continues. From 19ac6760ab151d0e6eb1626a52ef8acb51efb51b Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 11:19:53 +0800 Subject: [PATCH 0159/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index 3d4928847d..a5f4abf599 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -9,7 +9,7 @@ Ubuntu 15.04 最终你可以设置你的菜单 ‘始终可见’ 不时尚, 不过时, 没有丢失的菜单. -最大的缺点是现在它目前只能通过dconf开关,而不是常规的面向用户的选项设置。 +最大的缺点是现在它目前只能通过dconf来控制,而不是常规的面向用户的选项设置。 I’d hope (if not expect) that an option to set the feature is added to the Ubuntu System Settings > Appearance section as development continues. From d869e32523654ef1c97485ae5c9e1c0c3acf9c6c Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 11:24:07 +0800 Subject: [PATCH 0160/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ... Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index a5f4abf599..21cf1516c5 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -11,9 +11,10 @@ Ubuntu 15.04 最终你可以设置你的菜单 ‘始终可见’ 最大的缺点是现在它目前只能通过dconf来控制,而不是常规的面向用户的选项设置。 -I’d hope (if not expect) that an option to set the feature is added to the Ubuntu System Settings > Appearance section as development continues. +我希望(如果不是期望)能有一个选项被加入到Ubuntu的【系统设置】>【外观】部分的开发仍在继续。 + +现在,如果你在Ubuntu15.04,并在“建议”的更新通道启用后,你会发现这个开关存在于在COM>规范>统一>“始终显示菜单”。 -Right now, if you’re on Ubuntu 15.04 and have the “Proposed” update channel enabled, you should find this switch waiting in **com > canonical > unity >** ‘always show menus’. ### Better Late Than Never? ### From 2f52b4874d1b189567d536b43d207e096caa22c6 Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 11:33:50 +0800 Subject: [PATCH 0161/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index 21cf1516c5..0343fc68b5 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -11,7 +11,7 @@ Ubuntu 15.04 最终你可以设置你的菜单 ‘始终可见’ 最大的缺点是现在它目前只能通过dconf来控制,而不是常规的面向用户的选项设置。 -我希望(如果不是期望)能有一个选项被加入到Ubuntu的【系统设置】>【外观】部分的开发仍在继续。 +我希望(如果不是期望)能有一个设置这个特性的选项被加入到Ubuntu的【系统设置】>【外观】部分的开发仍在继续。 现在,如果你在Ubuntu15.04,并在“建议”的更新通道启用后,你会发现这个开关存在于在COM>规范>统一>“始终显示菜单”。 From 992ea54bf0db391df805f914db50393e8c37da1e Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 11:39:31 +0800 Subject: [PATCH 0162/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index 0343fc68b5..86d1e05a7f 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -13,7 +13,7 @@ Ubuntu 15.04 最终你可以设置你的菜单 ‘始终可见’ 我希望(如果不是期望)能有一个设置这个特性的选项被加入到Ubuntu的【系统设置】>【外观】部分的开发仍在继续。 -现在,如果你在Ubuntu15.04,并在“建议”的更新通道启用后,你会发现这个开关存在于在COM>规范>统一>“始终显示菜单”。 +现在,如果你使用的是Ubuntu15.04,并启用“建议”的更新通道后,你会发现这个开关存在于在COM>规范>统一>“始终显示菜单”。 ### Better Late Than Never? ### From acaf293b7a6632e3ace1fb1534b1034b33cf9de4 Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 11:41:41 +0800 Subject: [PATCH 0163/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...9 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index 86d1e05a7f..9c9ec25297 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -9,7 +9,7 @@ Ubuntu 15.04 最终你可以设置你的菜单 ‘始终可见’ 不时尚, 不过时, 没有丢失的菜单. -最大的缺点是现在它目前只能通过dconf来控制,而不是常规的面向用户的选项设置。 +最大的缺点是它目前只能通过dconf来控制,而不是常规的面向用户的选项设置。 我希望(如果不是期望)能有一个设置这个特性的选项被加入到Ubuntu的【系统设置】>【外观】部分的开发仍在继续。 @@ -33,7 +33,7 @@ A year on from that we finally get an option to make application menus always sh via: http://www.omgubuntu.co.uk/2015/01/ubuntu-15-04-always-show-menu-bar-option 作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) +译者:[译者ID](https://github.com/JeffDing) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 260e8617ef5fbb77e35f4ffa566fe04c2ef796d9 Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 11:42:14 +0800 Subject: [PATCH 0164/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...9 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index 9c9ec25297..07d655abb3 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -16,7 +16,7 @@ Ubuntu 15.04 最终你可以设置你的菜单 ‘始终可见’ 现在,如果你使用的是Ubuntu15.04,并启用“建议”的更新通道后,你会发现这个开关存在于在COM>规范>统一>“始终显示菜单”。 -### Better Late Than Never? ### +### 迟到总比没有要好? ### Developers plan to backport the option to Ubuntu 14.04 LTS in the next SRU (assuming nothing unexpected crops up during testing). @@ -33,7 +33,7 @@ A year on from that we finally get an option to make application menus always sh via: http://www.omgubuntu.co.uk/2015/01/ubuntu-15-04-always-show-menu-bar-option 作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/JeffDing) +译者:[JeffDing](https://github.com/JeffDing) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 171f59af7f60028ff84f022459b08285fb5f4e31 Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 11:48:35 +0800 Subject: [PATCH 0165/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index 07d655abb3..e908406d79 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -18,7 +18,7 @@ Ubuntu 15.04 最终你可以设置你的菜单 ‘始终可见’ ### 迟到总比没有要好? ### -Developers plan to backport the option to Ubuntu 14.04 LTS in the next SRU (assuming nothing unexpected crops up during testing). +开发者计划在Ubuntu14.04 LTS的下一个SRU中反向移植这个选项(假设在测试阶段没有任何意外发生)。 Locally Integrated Menus (LIM) debuted in Ubuntu 14.04 LTS to much appreciation, being widely seen as the best compromise between those who liked the simplicity of the “hidden” approach and those who disliked the mouse and trackpad aerobics using it required. From 059987c2d50418fc72eb43f8d3ffd939c2916817 Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 12:33:44 +0800 Subject: [PATCH 0166/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...untu 15.04 Finally Lets You Set Menus ToAlways Show.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index e908406d79..a06cc01e17 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -20,13 +20,13 @@ Ubuntu 15.04 最终你可以设置你的菜单 ‘始终可见’ 开发者计划在Ubuntu14.04 LTS的下一个SRU中反向移植这个选项(假设在测试阶段没有任何意外发生)。 -Locally Integrated Menus (LIM) debuted in Ubuntu 14.04 LTS to much appreciation, being widely seen as the best compromise between those who liked the simplicity of the “hidden” approach and those who disliked the mouse and trackpad aerobics using it required. +本地集成菜单(LIM)在Ubuntu 14.04 LTS 首次获得了欣赏,被广泛认为在那些喜欢隐藏方式的和那些不喜欢必须使用鼠标和触摸板的人之间的最佳的这种方法 -While locally integrated menus brought us half way to silencing the criticisms levelled at this aspect of Unity, the default “fade in/fade out” behaviour left an itch unscratched. +虽然本地集成菜单给我们带来了半路上沉默的批评在统一方面,默认的“淡入/淡出”行为给我们留下了令人发痒的伤痕 -The past few releases of Ubuntu has seen proactive addressing of concerns and issues experienced by its earlier UX decisions. After several years on the ‘to do’ list [we finally got Locally Integrated Menus last year][1], as well as an unsupported [option to minimise and restore apps to the Unity Launcher][2] by clicking on their icon. +在Ubuntu 过去的几个版本中已经能够看到积极的去解决早期UX的经历过的关切的问题。在经过几年“打算去做”的列表[我们去年终于得到了本地集成菜单][1],以及不支持的通过点击图标实现[减少和恢复Unity启动程序中不支持的应用程序的选项]。 -A year on from that we finally get an option to make application menus always show, no matter where our mouse is. Better late than never, right? +一年以来我们终于得到一个选项以使应用程序菜单始终显示,无论我们的鼠标在哪里。迟来总比没有好,对不对? -------------------------------------------------------------------------------- From b4d37d35228798b3c3aed16e626c71a153af388a Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 12:34:31 +0800 Subject: [PATCH 0167/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index a06cc01e17..945159940f 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -20,7 +20,7 @@ Ubuntu 15.04 最终你可以设置你的菜单 ‘始终可见’ 开发者计划在Ubuntu14.04 LTS的下一个SRU中反向移植这个选项(假设在测试阶段没有任何意外发生)。 -本地集成菜单(LIM)在Ubuntu 14.04 LTS 首次获得了欣赏,被广泛认为在那些喜欢隐藏方式的和那些不喜欢必须使用鼠标和触摸板的人之间的最佳的这种方法 +本地集成菜单(LIM)在Ubuntu 14.04 LTS 首次获得了欣赏,被广泛认为在那些喜欢隐藏方式的和那些不喜欢必须使用鼠标和触摸板的人之间的最佳的折衷方法 虽然本地集成菜单给我们带来了半路上沉默的批评在统一方面,默认的“淡入/淡出”行为给我们留下了令人发痒的伤痕 From 6d400690c447e5e7ee2f787ee7fccd91817bc799 Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 12:36:23 +0800 Subject: [PATCH 0168/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index 945159940f..0c16741515 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -1,5 +1,5 @@ translating by JeffDing -Ubuntu 15.04 最终你可以设置你的菜单 ‘始终可见’ +Ubuntu 15.04 最终实现你可以设置你的菜单 ‘始终可见’ ================================================================================ **如果你不喜欢 Unity 的全局菜单在你的鼠标离开后就淡出你的视野, Ubuntu 15.04 有一些额外附加去实现这点.** From a76f0c2e9802c424c672cbdf991c699608809403 Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 12:37:02 +0800 Subject: [PATCH 0169/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...0119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index 0c16741515..95678c9466 100644 --- a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -1,4 +1,3 @@ -translating by JeffDing Ubuntu 15.04 最终实现你可以设置你的菜单 ‘始终可见’ ================================================================================ **如果你不喜欢 Unity 的全局菜单在你的鼠标离开后就淡出你的视野, Ubuntu 15.04 有一些额外附加去实现这点.** From 15138b1fb2c903bd6822c342cf90f0021ef13c09 Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 12:43:53 +0800 Subject: [PATCH 0170/2517] translate finish Signed-off-by: JeffDing --- ...50119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md (100%) diff --git a/sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md similarity index 100% rename from sources/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md rename to translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md From 3002bbf288a6081d04321d62f7ba97f9d65af5f0 Mon Sep 17 00:00:00 2001 From: JeffDing Date: Wed, 4 Mar 2015 12:46:46 +0800 Subject: [PATCH 0171/2517] Update 20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md --- ...119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md index 95678c9466..1247c8eb78 100644 --- a/translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ b/translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -12,7 +12,7 @@ Ubuntu 15.04 最终实现你可以设置你的菜单 ‘始终可见’ 我希望(如果不是期望)能有一个设置这个特性的选项被加入到Ubuntu的【系统设置】>【外观】部分的开发仍在继续。 -现在,如果你使用的是Ubuntu15.04,并启用“建议”的更新通道后,你会发现这个开关存在于在COM>规范>统一>“始终显示菜单”。 +现在,如果你使用的是Ubuntu15.04,并启用“建议”的更新通道后,你会发现这个开关存在于在COM>规范>Unity>“始终显示菜单”。 ### 迟到总比没有要好? ### From da22e2769a2ce6f8c5df7c412352a734a5ea4f92 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 4 Mar 2015 13:17:38 +0800 Subject: [PATCH 0172/2517] =?UTF-8?q?20150304-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nd Maximum Supported RAM By Your System.md | 696 ++++++++++++++++++ ...returned error exit status 1' In Ubuntu.md | 45 ++ ...Your Network And Servers With Observium.md | 174 +++++ 3 files changed, 915 insertions(+) create mode 100644 sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md create mode 100644 sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md create mode 100644 sources/tech/20150304 Monitoring Your Network And Servers With Observium.md diff --git a/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md b/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md new file mode 100644 index 0000000000..2fed06677b --- /dev/null +++ b/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md @@ -0,0 +1,696 @@ +Linux Basics: How To Find Maximum Supported RAM By Your System +================================================================================ +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/RAM-790x527.jpg) + +Mostly, you will find maximum supported RAM by your system from the BIOS, Product catalog, or manuals. Here is the simple, yet useful trick, to find out maximum supported RAM using Dmidecode without opening the system chassis or referring the BIOS, product catalogs. + +### What is Dmidecode? ### + +As you may know, **Dmidecode** is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Using Dmidecode, you can retrieve this information without having to probe for the actual hardware. + +### Find out the maximum RAM supported by your system ### + +Make sure you have installed dmidecode on your system. I think it will be automatically installed while installing your OS, but I am not sure though. + +**On Deb based system:** + + sudo apt-get install dmidecode + +**On RPM based system:** + + sudo yum install dmidecode + +**On SUSE/openSUSE:** + + sudo zypper in dmidecode + +Well, we installed dmidecode. Let us find out the maximum RAM supported. To do that, enter the following command: + + sudo dmidecode -t 16 + +**Sample output:** + + # dmidecode 2.12 + SMBIOS 2.6 present. + + Handle 0x0014, DMI type 16, 15 bytes + Physical Memory Array + Location: System Board Or Motherboard + Use: System Memory + Error Correction Type: None + Maximum Capacity: 16 GB + Error Information Handle: Not Provided + Number Of Devices: 2 + +As you see in the above output, my system will support RAM upto 16GB, and it has two RAM slots. Pretty easy, isn’t it? + +Well, let us find out the currently installed RAM details. + + sudo dmidecode -t 17 + +**Sample output:** + + # dmidecode 2.12 + SMBIOS 2.6 present. + + Handle 0x0017, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM_B + Bank Locator: BANK 2 + Type: Unknown + Type Detail: None + Speed: Unknown + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + Rank: Unknown + + Handle 0x0015, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: 64 bits + Data Width: 64 bits + Size: 4096 MB + Form Factor: SODIMM + Set: None + Locator: DIMM_A + Bank Locator: BANK 0 + Type: DDR3 + Type Detail: Synchronous + Speed: 1067 MHz + Manufacturer: 014F + Serial Number: 00092AF2 + Asset Tag: 54114000 + Part Number: JM1066KSN-4G + Rank: Unknown + +As per the above output, I have installed one RAM in DIMM slot 1. The RAM size is **4GB**, and it’s type and speed is **DDR3** and **1067 MHz** respectively. + +Also, we can have the complete RAM details using the following commands. + + sudo dmidecode -t memory + sudo dmidecode -t memory | less + sudo dmidecode -t memory | more + +**Sample output:** + + # dmidecode 2.12 + SMBIOS 2.6 present. + + Handle 0x0014, DMI type 16, 15 bytes + Physical Memory Array + Location: System Board Or Motherboard + Use: System Memory + Error Correction Type: None + Maximum Capacity: 16 GB + Error Information Handle: Not Provided + Number Of Devices: 2 + + Handle 0x0017, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM_B + Bank Locator: BANK 2 + Type: Unknown + Type Detail: None + Speed: Unknown + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + Rank: Unknown + + Handle 0x0015, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: 64 bits + Data Width: 64 bits + Size: 4096 MB + Form Factor: SODIMM + Set: None + Locator: DIMM_A + Bank Locator: BANK 0 + Type: DDR3 + Type Detail: Synchronous + Speed: 1067 MHz + Manufacturer: 014F + Serial Number: 00092AF2 + Asset Tag: 54114000 + Part Number: JM1066KSN-4G + Rank: Unknown + +Curious to know the complete system details such as Motherboard, Memory, Bios etc? Well, enter the following command to get all details. + + sudo dmidecode + +**Sample output:** + + # dmidecode 2.12 + SMBIOS 2.6 present. + 48 structures occupying 2173 bytes. + Table at 0x000EB840. + + Handle 0xDA00, DMI type 218, 251 bytes + OEM-specific Type + Header and Data: + DA FB 00 DA B2 00 0D 5F 0F 37 40 7D 00 00 00 00 + 00 7E 00 01 00 00 00 DC 01 00 80 02 00 DD 01 00 + 80 03 00 75 01 01 80 01 00 76 01 02 80 01 00 2D + 01 03 80 01 00 2E 01 03 80 00 00 81 01 07 80 00 + 00 82 01 07 80 01 00 83 01 08 80 00 00 84 01 08 + 80 01 00 85 01 06 80 00 00 86 01 06 80 01 00 58 + 02 05 80 00 00 57 02 05 80 01 00 9C 00 02 00 01 + 00 9B 00 02 00 00 00 8A 01 03 00 01 00 89 01 03 + 00 00 00 7F 01 04 00 00 00 80 01 04 00 01 00 53 + 01 05 00 00 00 52 01 05 00 01 00 7B 01 06 00 00 + 00 7C 01 06 00 01 00 94 01 07 00 00 00 93 01 07 + 00 01 00 7D 00 08 00 00 00 2D 00 09 00 01 00 2E + 00 09 00 00 00 6E 00 0A 00 00 00 95 00 0B 00 01 + 00 96 00 0B 00 00 00 2F 02 0C 00 01 00 30 02 0C + 00 00 00 50 02 0D 00 00 00 51 02 0D 00 01 00 52 + 02 0D 00 02 00 FF FF 00 00 00 00 + + Handle 0xDA01, DMI type 218, 59 bytes + OEM-specific Type + Header and Data: + DA 3B 01 DA B2 00 0D 5F 0F 37 40 53 02 0D 00 03 + 00 54 02 0D 00 04 00 56 02 0D 00 05 00 4B 01 0E + 00 01 00 4A 01 0E 00 00 00 EA 00 0F 00 01 00 EB + 00 0F 00 00 00 FF FF 00 00 00 00 + + Handle 0x0004, DMI type 4, 42 bytes + Processor Information + Socket Designation: CPU 1 + Type: Central Processor + Family: Core i3 + Manufacturer: Intel + ID: A7 06 03 01 FF FB AB BE + Signature: Type 0, Family 6, Model 42, Stepping 7 + Flags: + FPU (Floating-point unit on-chip) + VME (Virtual mode extension) + DE (Debugging extension) + PSE (Page size extension) + TSC (Time stamp counter) + MSR (Model specific registers) + PAE (Physical address extension) + MCE (Machine check exception) + CX8 (CMPXCHG8 instruction supported) + APIC (On-chip APIC hardware supported) + SEP (Fast system call) + MTRR (Memory type range registers) + PGE (Page global enable) + MCA (Machine check architecture) + CMOV (Conditional move instruction supported) + PAT (Page attribute table) + PSE-36 (36-bit page size extension) + CLFSH (CLFLUSH instruction supported) + DS (Debug store) + ACPI (ACPI supported) + MMX (MMX technology supported) + FXSR (FXSAVE and FXSTOR instructions supported) + SSE (Streaming SIMD extensions) + SSE2 (Streaming SIMD extensions 2) + SS (Self-snoop) + HTT (Multi-threading) + TM (Thermal monitor supported) + PBE (Pending break enabled) + Version: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz + Voltage: 1.1 V + External Clock: 100 MHz + Max Speed: 2300 MHz + Current Speed: 2300 MHz + Status: Populated, Enabled + Upgrade: Other + L1 Cache Handle: 0x0005 + L2 Cache Handle: 0x0006 + L3 Cache Handle: 0x0007 + Serial Number: To Be Filled By O.E.M. + Asset Tag: To Be Filled By O.E.M. + Part Number: To Be Filled By O.E.M. + Core Count: 2 + Core Enabled: 1 + Thread Count: 2 + Characteristics: + 64-bit capable + + Handle 0x0005, DMI type 7, 19 bytes + Cache Information + Socket Designation: L1-Cache + Configuration: Enabled, Not Socketed, Level 1 + Operational Mode: Write Back + Location: Internal + Installed Size: 64 kB + Maximum Size: 64 kB + Supported SRAM Types: + Other + Installed SRAM Type: Other + Speed: Unknown + Error Correction Type: None + System Type: Unified + Associativity: 8-way Set-associative + + Handle 0x0006, DMI type 7, 19 bytes + Cache Information + Socket Designation: L2-Cache + Configuration: Enabled, Not Socketed, Level 2 + Operational Mode: Varies With Memory Address + Location: Internal + Installed Size: 512 kB + Maximum Size: 512 kB + Supported SRAM Types: + Other + Installed SRAM Type: Other + Speed: Unknown + Error Correction Type: None + System Type: Unified + Associativity: 8-way Set-associative + + Handle 0x0007, DMI type 7, 19 bytes + Cache Information + Socket Designation: L3-Cache + Configuration: Enabled, Not Socketed, Level 3 + Operational Mode: Varies With Memory Address + Location: Internal + Installed Size: 3072 kB + Maximum Size: 3072 kB + Supported SRAM Types: + Other + Installed SRAM Type: Other + Speed: Unknown + Error Correction Type: None + System Type: Unified + Associativity: Other + + Handle 0x0008, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J1A1 + Internal Connector Type: None + External Reference Designator: PS2Mouse + External Connector Type: PS/2 + Port Type: Mouse Port + + Handle 0x0009, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J1A1 + Internal Connector Type: None + External Reference Designator: Keyboard + External Connector Type: PS/2 + Port Type: Keyboard Port + + Handle 0x000A, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J2A2B + Internal Connector Type: None + External Reference Designator: Video + External Connector Type: DB-15 female + Port Type: Video Port + + Handle 0x000B, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J3A1 + Internal Connector Type: None + External Reference Designator: USB1 + External Connector Type: Access Bus (USB) + Port Type: USB + + Handle 0x000C, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J3A1 + Internal Connector Type: None + External Reference Designator: USB2 + External Connector Type: Access Bus (USB) + Port Type: USB + + Handle 0x000D, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J3A1 + Internal Connector Type: None + External Reference Designator: USB3 + External Connector Type: Access Bus (USB) + Port Type: USB + + Handle 0x000E, DMI type 8, 9 bytes + Port Connector Information + Internal Reference Designator: J5A1 + Internal Connector Type: None + External Reference Designator: LAN + External Connector Type: RJ-45 + Port Type: Network Port + + Handle 0x000F, DMI type 9, 17 bytes + System Slot Information + Designation: J6B2 + Type: x16 PCI Express + Current Usage: In Use + Length: Long + ID: 0 + Characteristics: + 3.3 V is provided + Opening is shared + PME signal is supported + Bus Address: 0000:00:01.0 + + Handle 0x0010, DMI type 9, 17 bytes + System Slot Information + Designation: J6B1 + Type: x1 PCI Express + Current Usage: In Use + Length: Short + ID: 1 + Characteristics: + 3.3 V is provided + Opening is shared + PME signal is supported + Bus Address: 0000:00:1c.3 + + Handle 0x0012, DMI type 11, 5 bytes + OEM Strings + String 1: Dell System + String 2: 5[0003] + String 3: 13[P18F] + + Handle 0x0013, DMI type 12, 5 bytes + System Configuration Options + Option 1: To Be Filled By O.E.M. + + Handle 0x001C, DMI type 21, 7 bytes + Built-in Pointing Device + Type: Touch Pad + Interface: Bus Mouse + Buttons: 2 + + Handle 0x001D, DMI type 22, 26 bytes + Portable Battery + Location: Sys. Battery Bay + Manufacturer: Sanyo + Serial Number: 5390 + Name: DELL 4YRJH22 + Chemistry: Lithium Ion + Design Capacity: 45000 mWh + Design Voltage: 10800 mV + SBDS Version: 1.0 + Maximum Error: 2% + SBDS Manufacture Date: 2012-02-28 + OEM-specific Information: 0x00000001 + + Handle 0x001E, DMI type 32, 20 bytes + System Boot Information + Status: No errors detected + + Handle 0x0020, DMI type 27, 12 bytes + Cooling Device + Type: Fan + Status: OK + OEM-specific Information: 0x00000000 + + Handle 0x0021, DMI type 28, 20 bytes + Temperature Probe + Description: CPU Internal Temperature + Location: Processor + Status: OK + Maximum Value: 127.0 deg C + Minimum Value: 0.0 deg C + Resolution: 1.000 deg C + Tolerance: 0.5 deg C + Accuracy: Unknown + OEM-specific Information: 0x00000000 + + Handle 0xB000, DMI type 176, 5 bytes + OEM-specific Type + Header and Data: + B0 05 00 B0 00 + + Handle 0xB100, DMI type 177, 12 bytes + OEM-specific Type + Header and Data: + B1 0C 00 B1 1A 0E 00 00 00 00 00 00 + + Handle 0x0025, DMI type 209, 12 bytes + OEM-specific Type + Header and Data: + D1 0C 25 00 00 00 00 03 05 01 00 03 + + Handle 0x0026, DMI type 210, 12 bytes + OEM-specific Type + Header and Data: + D2 0C 26 00 00 00 00 03 05 20 01 03 + + Handle 0x0027, DMI type 211, 13 bytes + OEM-specific Type + Header and Data: + D3 0D 27 00 01 00 00 00 00 02 03 04 04 + Strings: + Front + + Handle 0x0028, DMI type 212, 57 bytes + OEM-specific Type + Header and Data: + D4 39 28 00 70 00 71 00 01 49 50 48 9C 00 49 FC + 01 9B 00 49 FC 00 7F 01 4A FB 04 80 01 4A FB 00 + 53 01 4A F7 08 52 01 4A F7 08 7B 01 4A EF 10 7C + 01 4A EF 10 FF FF 00 00 00 + + Handle 0x002A, DMI type 217, 8 bytes + OEM-specific Type + Header and Data: + D9 08 2A 00 01 02 00 00 + Strings: + + Handle 0x002B, DMI type 219, 11 bytes + OEM-specific Type + Header and Data: + DB 0B 2B 00 00 01 02 03 00 04 05 + Strings: + + Handle 0x002C, DMI type 220, 22 bytes + OEM-specific Type + Header and Data: + DC 16 2C 00 01 F0 00 00 02 F0 00 00 00 00 03 F0 + 04 F0 00 00 00 00 + + Handle 0x002D, DMI type 221, 19 bytes + OEM-specific Type + Header and Data: + DD 13 2D 00 00 00 00 00 00 03 00 00 00 00 00 00 + 00 00 00 + + Handle 0x002E, DMI type 222, 16 bytes + OEM-specific Type + Header and Data: + DE 10 2E 00 01 08 FF FF 00 00 00 00 00 00 00 00 + + Handle 0x0014, DMI type 16, 15 bytes + Physical Memory Array + Location: System Board Or Motherboard + Use: System Memory + Error Correction Type: None + Maximum Capacity: 16 GB + Error Information Handle: Not Provided + Number Of Devices: 2 + + Handle 0x0016, DMI type 20, 19 bytes + Memory Device Mapped Address + Starting Address: 0x00000000000 + Ending Address: 0x000FFFFFFFF + Range Size: 4 GB + Physical Device Handle: 0x0015 + Memory Array Mapped Address Handle: 0x0018 + Partition Row Position: 1 + Interleave Position: 1 + Interleaved Data Depth: 1 + + Handle 0x0017, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: Unknown + Data Width: Unknown + Size: No Module Installed + Form Factor: DIMM + Set: None + Locator: DIMM_B + Bank Locator: BANK 2 + Type: Unknown + Type Detail: None + Speed: Unknown + Manufacturer: Not Specified + Serial Number: Not Specified + Asset Tag: Not Specified + Part Number: Not Specified + Rank: Unknown + + Handle 0x0018, DMI type 19, 15 bytes + Memory Array Mapped Address + Starting Address: 0x00000000000 + Ending Address: 0x000FFFFFFFF + Range Size: 4 GB + Physical Array Handle: 0x0014 + Partition Width: 2 + + Handle 0x002F, DMI type 13, 22 bytes + BIOS Language Information + Language Description Format: Abbreviated + Installable Languages: 1 + eng + Currently Installed Language: eng + + Handle 0x0030, DMI type 131, 64 bytes + OEM-specific Type + Header and Data: + 83 40 30 00 31 00 00 00 00 00 00 00 00 00 00 00 + F8 00 4B 1C FF FF FF FF 01 00 00 00 00 00 07 00 + AD 04 04 00 00 00 00 00 C8 00 FF FF 00 00 00 00 + 00 00 00 00 32 00 00 00 76 50 72 6F 00 00 00 00 + + Handle 0x0029, DMI type 216, 9 bytes + OEM-specific Type + Header and Data: + D8 09 29 00 01 02 01 00 00 + Strings: + INTEL + 0000 + + Handle 0x0000, DMI type 0, 24 bytes + BIOS Information + Vendor: Dell Inc. + Version: A05 + Release Date: 08/03/2012 + Address: 0xF0000 + Runtime Size: 64 kB + ROM Size: 2048 kB + Characteristics: + MCA is supported + PCI is supported + BIOS is upgradeable + BIOS shadowing is allowed + ESCD support is available + Boot from CD is supported + Selectable boot is supported + BIOS ROM is socketed + EDD is supported + 5.25"/1.2 MB floppy services are supported (int 13h) + 3.5"/720 kB floppy services are supported (int 13h) + 3.5"/2.88 MB floppy services are supported (int 13h) + Print screen service is supported (int 5h) + 8042 keyboard services are supported (int 9h) + Serial services are supported (int 14h) + Printer services are supported (int 17h) + CGA/mono video services are supported (int 10h) + ACPI is supported + USB legacy is supported + ATAPI Zip drive boot is supported + BIOS boot specification is supported + Targeted content distribution is supported + BIOS Revision: 0.5 + Firmware Revision: 0.5 + + Handle 0x0002, DMI type 2, 15 bytes + Base Board Information + Manufacturer: Dell Inc. + Product Name: 01HXXJ + Version: A05 + Serial Number: .JSQ7PA1.CN7117623M00J2. + Asset Tag: Not Specified + Features: + Board is a hosting board + Board is replaceable + Location In Chassis: To Be Filled By O.E.M. + Chassis Handle: 0x0003 + Type: Motherboard + Contained Object Handles: 0 + + Handle 0x0003, DMI type 3, 21 bytes + Chassis Information + Manufacturer: Dell Inc. + Type: Portable + Lock: Not Present + Version: Not Specified + Serial Number: JSR1 + Asset Tag: Not Specified + Boot-up State: Safe + Power Supply State: Safe + Thermal State: Safe + Security Status: None + OEM Information: 0x00000000 + Height: Unspecified + Number Of Power Cords: 1 + Contained Elements: 0 + + Handle 0x0001, DMI type 1, 27 bytes + System Information + Manufacturer: Dell Inc. + Product Name: Inspiron N5050 + Version: Not Specified + Serial Number: JSR1 + UUID: 4C4C4544-0053-5110-8029-CAC05241 + Wake-up Type: Power Switch + SKU Number: To be filled by O.E.M. + Family: + + Handle 0x0024, DMI type 208, 12 bytes + OEM-specific Type + Header and Data: + D0 0C 24 00 02 05 FE 00 04 05 01 02 + Strings: + 20120323 + 20120323 + + Handle 0x0011, DMI type 10, 6 bytes + On Board Device Information + Type: Video + Status: Enabled + Description: Mobile Intel SandyBridge HD Graphics + + Handle 0x0015, DMI type 17, 28 bytes + Memory Device + Array Handle: 0x0014 + Error Information Handle: 0x0000 + Total Width: 64 bits + Data Width: 64 bits + Size: 4096 MB + Form Factor: SODIMM + Set: None + Locator: DIMM_A + Bank Locator: BANK 0 + Type: DDR3 + Type Detail: Synchronous + Speed: 1067 MHz + Manufacturer: 014F + Serial Number: 0009F2 + Asset Tag: 54114000 + Part Number: JM1066-4G + Rank: Unknown + + Handle 0x0031, DMI type 127, 4 bytes + End Of Table + +That’s it. Happy weekend. Stay happy! + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/linux-basics-how-to-find-maximum-supported-ram-by-your-system/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/sk/ \ No newline at end of file diff --git a/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md b/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md new file mode 100644 index 0000000000..f3f262dfbc --- /dev/null +++ b/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md @@ -0,0 +1,45 @@ +Linux Basics: How To Fix “E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1″ In Ubuntu +================================================================================ +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/04/ubuntu-790x558.png) + +Today, I got a problem while updating VirtualBox to the latest version. + +> E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1 + +![](https://www.unixmen.com/wp-content/uploads/2015/03/Update-Manager_0011.png) + +### Solution: ### + +I googled a bit and found the solution. Here is what I did to solve the problem. + + sudo apt-get clean + sudo apt-get update && sudo apt-get upgrade + +This will almost fix the problem. + +If you still end up with the same error, then try the following commands: + + sudo dpkg --configure -a + sudo apt-get -f install + +Or, you can manually download the latest version from [Oracle VirtualBox][1] site and install it as shown below. + + sudo apt-get update + sudo dpkg -i virtualbox-4.3_4.3.24-98716~Ubuntu~raring_amd64.deb + sudo apt-get -f install + sudo apt-get autoclean && sudo apt-get autoremove + +Cheers! + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/linux-basics-how-to-fix-e-varcacheaptarchives-subprocess-new-pre-removal-script-returned-error-exit-status-1-in-ubuntu/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/sk/ +[1]:https://www.virtualbox.org/wiki/Downloads \ No newline at end of file diff --git a/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md b/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md new file mode 100644 index 0000000000..4eae05d99d --- /dev/null +++ b/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md @@ -0,0 +1,174 @@ +Monitoring Your Network And Servers With Observium +================================================================================ +### Introduction ### + +You have a problem while monitoring your servers, switches or physical machines. **Observium** fits your need. As a free monitoring system, it helps you to monitor your servers remotely. It is an auto-discovering SNMP based network monitoring platform written in PHP which includes support for a wide range of network hardware and operating systems including Cisco, Windows, Linux, HP, NetApp and many other. I will give you the steps to follow while setting up an **Observium** server on Ubuntu 12.04. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture1.png) + +Currently there are two different versions of **observium**. + +- The observium Community is a free tool and licensed under the QPL Open Source license. This version is the best solution for small deployments. It gets security updates each 6 months. +- While the second version, the Observium Professional is distributed under SVN based release mechanism. And it gets daily security updates. This tool is the best for Service Provider and enterprises deployments. + +For more information you can visit the offcial [website of Observium][1]. + +### System Requirements ### + +In order to install **Observium** , it’s necessary to have a server with a fresh installation. The development of **Observium** takes place on Ubuntu LTS and Debian systems, so it’s recommended to install **Observium** on Ubuntu or Debian because may be issues with other platforms. + +This article will guide you on how to install **Observium** on Ubuntu 12.04. For a small **Observium** installation is recommended to use 256MB for the memory and dual core for the process. + +### Installing Prerequisites ### + +Before installing **Observium** you need to make sure to install all dependencies. + +First step is to update your server + + sudo apt-get update + +Then you need to install all packages required to run Observium. + +Observuim need this list of software the run correctly: + +- LAMP server +- fping +- Net-SNMP 5.4+ +- RRDtool 1.3+ +- Graphviz + +Requirements for optional features: + +- Ipmitool – Only if you want to poll IPMI baseboard controllers on servers +- Libvirt-bin – Only if you want to monitor remote VM hosts using libvirt + + sudo apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-json php-pear snmp fping mysql-server mysql-client python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick libvirt ipmitool + +### Creation MySQL Database and User for Observium ### + +Now you need to log into MySQL and create database for **Observuim**: + + mysql -u root -p + +After successful authenticated, you need to create the database. + + CREATE DATABASE observium; + +The database Name is **Observium**. You will need this information later. + +Now, you should create the database administrator. + + CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword'; + +Next, you need to give this user permissions to administer the database you created. + + GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost; + +You need to flush the privilege information to disk to activate the new MySQL user: + + FLUSH PRIVILEGES; + exit + +### Downloading and Installing Observium ### + +Now that our system is ready, we can start the installation of Observium. + +First step to do is, creating the directory Observium is going to operate out of: + + mkdir -p /opt/observium && cd /opt + +For the purpose of this tutorial, we’re going to be using the Community/Open Source Edition of Observium. Download and unpack it. + + wget http://www.observium.org/observium-community-latest.tar.gz + tar zxvf observium-community-latest.tar.gz + +Now go under Observium directory + + cd observium + +Copy the default configuration file ‘**config.php.default**‘ to ‘**config.php**‘ and fill out the database config options: + + cp config.php.default config.php + nano config.php + +---------- + + / Database config + $config['db_host'] = 'localhost'; + $config['db_user'] = 'observiumadmin'; + $config['db_pass'] = 'observiumpassword'; + $config['db_name'] = 'observium'; + +Let’s setup the default schema for the MySQL Database: + + php includes/update/update.php + +Now you need to create directory to store rrd file and change permission to let apache write into the file . + + mkdir rrd + chown apache:apache rrd + +To help you troubleshooting on case of problem, you need to create logs file. + + mkdir -p /var/log/observium + chown apache:apache /var/log/observium + +Now you have to create the virtual host configuration for Observium + + + DocumentRoot /opt/observium/html/ + ServerName observium.domain.com + CustomLog /var/log/observium/access_log combined + ErrorLog /var/log/observium/error_log + + AllowOverride All + Options FollowSymLinks MultiViews + + + +Next, you need to enable rewrite functionality for your Apache server. + +To enable `mod_rewrite` modules, type this command: + + sudo a2enmod rewrite + +This module will be enable the next after reboot of Apache service. + + sudo service apache2 restart + +### Configuring Observium ### + +Before log into the web interface, you need to create administrator account (level 10) to Observium + + # cd /opt/observium + # ./adduser.php admin adminpassword 10 + User admin added successfully. + +Next set a cron jobs for the discovery and the poller jobs, create a new file ‘**/etc/cron.d/observium**‘ and add the following contents. + + 33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1 + */5 * * * * root /opt/observium/discovery.php -h new >> /dev/null 2>&1 + */5 * * * * root /opt/observium/poller-wrapper.py 1 >> /dev/null 2>&1 + +Reload cron process to take new entries. + + # /etc/init.d/cron reload + +You’ve installed Observium Server! Log into Observium using your browser **http://** and be on your way. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture.png) + +Enjoy! + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/monitoring-network-servers-observium/ + +作者:[anismaj][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/anis/ +[1]:http://www.observium.org/ \ No newline at end of file From f34e78bfa033bcfe34eaa78cfc6dc9fa9bf25e48 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 4 Mar 2015 15:17:01 +0800 Subject: [PATCH 0173/2517] =?UTF-8?q?20150304-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4 ​No reboot patching comes to Linux 4.0.md | 58 ++++++ ...ough Free Disk Space On boot' In Ubuntu.md | 63 +++++++ ... How To Fix Windows Updates Stuck At 0%.md | 53 ++++++ ...ocal Network Between Ubuntu And Windows.md | 177 ++++++++++++++++++ 4 files changed, 351 insertions(+) create mode 100644 sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md create mode 100644 sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md create mode 100644 sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md create mode 100644 sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md diff --git a/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md b/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md new file mode 100644 index 0000000000..6333fea9a7 --- /dev/null +++ b/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md @@ -0,0 +1,58 @@ +​No reboot patching comes to Linux 4.0 +================================================================================ +> **Summary**:With the new Linux 4.0 kernel, you'll need to reboot Linux less often than ever. + +With [Linux 4.0][1], you may never need to reboot your operating system again. + +![Using Linux means never having to reboot. -- SUSE ](http://zdnet4.cbsistatic.com/hub/i/r/2015/03/02/5e766833-454b-45b5-a8f7-a55d21e9d26a/resize/270x270/4d0774552c342a1507784ef802619b71/livepatching.jpg) +Using Linux means never having to reboot. -- SUSE + +One reason to love Linux on your servers or in your data-center is that you so seldom needed to reboot it. True, critical patches require a reboot, but you could go months without rebooting. Now, with the latest changes to the Linux kernel you may be able to go years between reboots. + +This is actually a feature that was available in Linux in 2009 thanks to a program called [Ksplice][2]. This program compares the original and patched kernels and then uses a customized kernel module to patch the new code into the running kernel. Each Ksplice-enabled kernel comes with a special set of flags for each function that will be patched. The [Ksplice process][3] then watches for a moment when the code for the function being patched isn't in use, and ta-da, the patch is made and your server runs on. + +[Oracle acquired Ksplice][4] in 2011, and kept it just for its own [Oracle Linux][5], a [Red Hat Enterprise Linux (RHEL)][6] clone, and as a RHEL subscription service. That left all the other enterprise and server Linux back where they started. + +Then [KernelCare released a service that could provide bootless patches][7] for most enterprise Linux distros. This program use proprietary software and is only available as a service with a monthly fee. That was a long way from satisfying many Linux system administrators. + +So, [Red Hat][8] and [SUSE][9] both started working on their own purely open-source means of giving Linux the ability to keep running even while critical patches were being installed. Red Hat's program was named [kpatch][10], while SUSE' is named [kGraft][11]. + +The two companies took different approaches. Kpatch issues a stop_machine() command. After that it looks at the stack of existing processes using [ftrace][12] and, if the patch can be made safely, it redirects the running code to the patched functions and then removes the now outdated code. + +Kgraft also uses ftrace, but it works on the thread level. When an old function is called it makes sure the thread reaches a point that it can switch to the new function. + +While the end result is the same, the operating system keeps running while patches are made, there are significant differences in performance. Kpatch takes from one to forty milliseconds, while kGraft might take several minutes but there's never even a millisecond of down time. + +At the Linux Plumbers Conference in October 2014, the two groups got together and started work on a way to [patch Linux without rebooting that combines the best of both programs][13]. Essentially, what they ended up doing was putting both kpatch and kGraft in the 4.0 Linux kernel. + +Jiri Kosina, a SUSE software engineer and Linux kernel developer, explained, that live-patching in the Linux kernel will "provides a basic infrastructure for function "live patching" (i.e. code redirection), including API [application programming interface] for kernel modules containing the actual patches, and API/ABI [application binary interface] for userspace to be able to operate on the patches. This is "relatively simple and minimalistic, as it's making use of existing kernel infrastructure (namely ftrace) as much as possible. It's also self-contained, in a sense that it doesn't hook itself in any other kernel subsystem (it doesn't even touch any other code)." + +The release candidate for Linux 4.0 is now out. Kosina stated that "It's now implemented for x86 only as a reference architecture, but support for powerpc, s390 and arm is already in the works." And, indeed, the source code for these architectures is already in the [Live Patching Git code][14]. + +Simply having the code in there is just the start. Your Linux distribution will have to support it with patches that can make use of it. With both Red Hat and SUSE behind it, live patching will soon be the default in all serious business Linux distributions. + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/no-reboot-patching-comes-to-linux-4-0/#ftag=RSSbaffb68 + +作者:[Steven J. Vaughan-Nichols][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.zdnet.com/meet-the-team/us/sjvn/ +[1]:http://www.zdnet.com/article/linux-kernel-turns-over-release-odometer-to-4-0/ +[2]:http://www.computerworld.com/article/2466389/open-source-tools/never-reboot-again-with-linux-and-ksplice.html +[3]:http://www.ksplice.com/ +[4]:http://www.zdnet.com/article/oracle-acquires-zero-downtime-linux-upgrade-software/ +[5]:http://www.oracle.com/us/technologies/linux/overview/index.html +[6]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[7]:http://www.zdnet.com/article/kernelcare-new-no-reboot-linux-patching-system/ +[8]:http://www.redhat.com/ +[9]:http://www.suse.com/ +[10]:http://rhelblog.redhat.com/2014/02/26/kpatch/ +[11]:http://www.zdnet.com/article/suse-gets-live-patching/ +[12]:http://elinux.org/Ftrace +[13]:http://linuxplumbersconf.org/2014/wp-content/uploads/2014/10/LPC2014_LivePatching.txt +[14]:https://kernel.googlesource.com/pub/scm/linux/kernel/git/jikos/livepatching/+/9ec0de0ee0c9f0ffe4f72da9158194121cc22807 \ No newline at end of file diff --git a/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md b/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md new file mode 100644 index 0000000000..3d20014215 --- /dev/null +++ b/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md @@ -0,0 +1,63 @@ +How To Fix “Not Enough Free Disk Space On /boot” In Ubuntu +================================================================================ +### Question: How To Fix “Not Enough Free Disk Space On /boot” In Ubuntu? ### + +Today, I got the following error, but a simple one, when try to update my Lubuntu 14.04 desktop. + +> “Not Enough Free Disk Space On /boot” + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Software-Updater_002.png) + +This is because my /boot partition has caught up with unwanted old kernels, packages etc. + +### Answer: ### + +I heard about **Computer Janitor** feature which will remove unwanted old junk files in Ubuntu Tweak tool. Using the Computer Janitor, you can clean up your system like a freshly installed system. Janitor will remove; + +- Apps cache(Firefox/Chrome cache, Software center cache); +- Thumbnail cache; +- Apt cache; +- Old kernels; +- Package configs; +- And unneeded packages. + +If you haven’t install this tool, look at the following link. + +- **[How To Install And Use Ubuntu Tweak On Ubuntu][1]** + +To remove unwanted junk files, open Ubuntu Tweak, and click on the **Janitor** option. + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_006.png) + +Select the check the boxes to remove unwanted junk from your system, and click **Clean** button. + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_007.png) + +Janitor will now start to clean up your system + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_003.png) + +Cool! The system is clean now. + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_008.png) + +Again I re-launched the software updater. This time it went smoothly without any issues. + +![](https://www.unixmen.com/wp-content/uploads/2015/02/Software-Updater_009.png) + +That’s all. Enjoy. There are others ways also available to clean up the system. But, this seems very easy to follow. We can do system clean up in few mouse clicks. + +Cheers! + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/how-to-fix-not-enough-free-disk-space-on-boot-in-ubuntu/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/sk/ +[1]:http://www.unixmen.com/after-a-fresh-install-of-ubuntu-1010-maverick-meerkat-configuration-made-easy-with-ubuntu-tweak/ \ No newline at end of file diff --git a/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md b/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md new file mode 100644 index 0000000000..c74df29f1e --- /dev/null +++ b/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md @@ -0,0 +1,53 @@ +How To Fix Windows Updates Stuck At 0% +================================================================================ +How do you feel when you log in to Windows after a month, find there are updates to install, you select to install these updates and those **Windows updates stuck at zero percent**? + +Why am I talking about Windows updates on a blog dedicated to Linux and Open Source? Because I prefer to [dual boot Windows with Linux][1]. While I use Linux as my main desktop, once in a while I do log in to Windows. The most annoying thing after logging in Windows is the Windows updates. It has happened to me on several occasions that I found **Windows update not working**. I choose to install the updates and Windows updates get stuck at 0 KB and 0%, like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_Updates_stuck_at_zero.jpeg) + +In this tutorial, we shall see how to make Windows update work again. The tutorial should be applicable for Windows 7, Windows 8 and Windows 8.1. + +### Fix Windows updates stuck at zero percent ### + +Please mind that Windows updates can be stuck at any percent and the trick which we are going to use would require you to install those updates again. I hope you do not find that too inconvenient. If you are ready, let’s see how to fix this Windows update issue. + +#### Step 1: #### + +Press Windows+R. This will prompt run dialogue box. In here, type services.msc: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Updates_3.png) + +#### Step 2: #### + +Now it brings us to all the services installed in Windows. These services are listed in alphabetical order. Scroll down and look for **Windows Update Service**. Right click on it and stop it. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_Updates_stuck_1.jpeg) + +#### Step 3: #### + +Now go in **C:\Windows\SoftwareDistribution and delete all of its contents**. Actually, this is the folder where downloaded installation files were stored. But since Windows update suck, they somehow have problem with partially downloaded update files. + +#### Step 4: #### + +Go back to services again (as mentioned in Step 1) and this time start the Windows Update Service, by right clicking on it. Try to update Windows again. It should be working this time. + +So once you have got the updates working, perhaps you will find plenty of updates to install at next reboot. And that moment calls for a meme: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_update_suck.jpg) + +Jokes apart, I hope this tip helps you to get rid of Windows updates hanged at 0%. I wish that Linux like updates are also included in the list of [Windows 10 features copied from Linux][2]. I wish. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-windows-updates-stuck-0/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ +[2]:http://itsfoss.com/windows-10-inspired-linux/ \ No newline at end of file diff --git a/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md b/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md new file mode 100644 index 0000000000..d0f6d9f1df --- /dev/null +++ b/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md @@ -0,0 +1,177 @@ +Share Folders On Local Network Between Ubuntu And Windows +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_windows.jpeg) + +This is a complete tutorial to show you **how to share folders over local network in Ubuntu**. + +Do you have multiple devices in your home? Do you have to use Flash Drive or SD card to transfer data from Ubuntu to another computer? Do you find it annoying? We know you do. Because we don’t want you to waste your precious time while you can transfer your files, documents and other large stuff quickly and easily, over the local network. It’s one time setup and then with some clicks you will be able to **share files between Ubuntu and Windows** or any other Linux system. And don’t worry it’s easy and takes only little time. + +One more thing to add, while we performed this tutorial on Ubuntu, this tutorial should be valid for any other Linux OS. + +#### Share folder on local network in Ubuntu #### + +If you are using Ubuntu 14.04, 14.10 or 12.04, there are two ways you can share your local files over the local network to access it from Windows or other Linux computers. + +- Share it for everyone’s access on local network, without password +- Password protect the folders for restricted access + +We’ll see both methods in this post and will let you decide which one you would prefer to use. + +### 1. Share folders on local network without password ### + +#### Step 1: #### + +To share a folder on local network in Ubuntu, right click on the desired folder and select Local Network Share: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Share_Folder_Ubuntu.jpeg) + +**Possible troubleshoot**: If do not see the option of Local Network Share in right click menu, open a terminal and use the following command to install nautlius-share: + + sudo apt-get install nautilus-share + +You’ll need to restart Nautilus. Either log out and log in back or use the command below: + + nautilus -q + +#### Step 2: #### + +When you click on Local Network Share, you will see the option of sharing the folder. Just check the option of Share this folder: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_1.jpeg) + +Possible troubleshoot: If you are prompted about Sharing service not being installed, like in the screenshot below, just click on Install service and follow the instructions. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_2.jpeg) + +#### Step 3: #### + +When you check the option of Share this folder, you’ll see option of Create Share available for you. You can also allow other users to edit the files in the shared folder. Option for guest access can be checked as well. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_folder_Ubuntu_3.png) + +You’ll see that the folder icon have been changed to show that it has been shared. To stop sharing a folder, just uncheck the Share this folder option. + +Now this was the easy way out. This provides access to anyone on your local network to access these files. In normal condition, you should prefer this. I mean, devices on your home network should be generally know devices. But this could not be the case always. What if you want only certain people to access it? This is where Samba server comes in picture. We’ll see that in the second part of the tutorial. + +### 2. Share the folders on local network in Ubuntu with password protection ### + +To do this, we need to configure Samba server. Actually, we did use Samba in the previous part of this tutorial. We just did not emphasize on it. Before we go on seeing how to set up Samba server for local network sharing in Ubuntu, let’s first have a quick look on what actually is [Samba][1]. + +#### What is Samba? #### + +Samba is the software package that allows you to share files, documents and printers across a network, irrespective of whether you are using Linux, Windows and Mac. It’s available for all major platforms and can work tremendously nice in all of them. Quoting from Wikipedia: + +> Samba a free software re-implementation of the SMB/CIFS networking protocol, and was originally developed by Andrew Tridgell. As of version 3, Samba provides file and print services for various Windows Clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a domain member. It can also be part an Active Directory domain. + +#### Install Samba server on Ubuntu #### + +You can easily install Samba on you Ubuntu box. Before installing update your system so that you can install any available updates. + + sudo apt-get update && apt-get upgrade + +Now install Samba serer and few other required stuffs with the following command: + + sudo apt-get install samba samba-common system-config-samba python-glade2 gksu + +Once you’ve installed Samba server, it’s time to configure Samba from the graphical interface window to share files. + +#### Configure Samba server on Ubuntu #### + +Open Samba Configuration tool from the dash: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Setup-Samba.png) + +Go to **Preference->Server Settings**. Although the default settings are good and may be same you need. But you may need to make change to it in some cases. + +Now in Server Settings you’ve two tabs, ‘Basic’ and ‘Security’. Under Basic tab you’ve the following options that mean: + +- Workgroup – This is the name of the Workgroup of the computer you want to connect to. For example, if you want to connect to a Windows computer so you will enter the workgroup name of Windows computer, and in Windows you already have the same workgroup name as is set by default in Samba Server Settings. But if you have a different workgroup name on Windows then you will enter that workgroup name in this field. (In Windows 7 to get the workgroup name, right-click Computer icon and go to Properties, there you’ll see Windows Workgroup name.) +- Description – This is the name of your computer as seen by others. Don’t use spaces or non-internet friendly characters. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/samba-server-settings.png) + +setting up samba serverAllowing ‘Guests’ is not advisable so there is no reason to change security settings. Keep as it is. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Samba-Security-Settings-compressed.jpg) + +Samba Security security settingsIt is all done! You’ve setup Samba Server. We are not far from sharing our first folder on network. + +#### Create a system user for network file sharing #### + +We will now create a system user for sharing file on network. This is how simple it is. + +- Go to **System Settings**. +- Under Systems Settings Click **User Accounts**. +- Click **unlock** to Enable + (**plus**) icon. +- Click + (plus) icon to create a new system user. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/create-system-user1.jpg) + +Now as you can see the above image, you can enter ‘Full name’. As you enter ‘Full name’ Username will be taken as Full name automatically. Because we are creating this user to share files so we will assign Account Type to ‘**Standard**‘. + +Done above steps? Click add. You have created a system user. The user is not yet activated so we will activate it by setting up password for this account. Make sure Users accounts panel is unlocked. Click Account disabled and type a new password, then confirm password and click Change. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/activate-system-user.jpg) + +Yipee… Upto now we have installed and configured Samba and We have created a System user to share files on network from the account and we have activated our newly created account, too. Now We will move to Samba for the last step of configuring everything, then we will share a folder. + +#### Add new Samba user #### + +Open Samba and click Samba Users under Preference. Fill up the the simple dialogue. Here are couple of details about the fields: + +**Unix Username** – In this case I am selecting the user that I just created. + +**Windows Username** – You will enter this username when you are accessing from Windows Machine. + +**Samba Password** – You will enter this password when you are accessing from Windows Machine. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/samba-user-setting.jpg) + +Once you’ve done click OK. Now take a deep breath. You have successfully created a network with the help of Samba. Now restart the network or Samba services and ready to share files with other machines. + + sudo restart smbd && sudo restart nmbd + +#### Share folders or files over the network #### + +To share files with Samba it’s simple with graphical user interface. Click the Plus icon in Samba and you will get dialogue like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/share-files-and-folders.jpg) + +share files and folders over network with sambaComplete the fields. In ‘Directory‘ browse the folder you want to share. Here are the details about the fields you will see here: + +- **Share name** is the name of the folder that other would see. +- **Description** is simply about the content you are sharing on network. +- **Writable** You shared folders are ‘read only’ by default. You can set them to writable if you want others on network to change them. +- **Visible** As the name suggests when you click Visible, the shared folder will be visible to the people on network. + +Now you can set permissions for the folder you are sharing. To do this click ‘Access’ tab and check the users you want to share the folder with. When you select Allow access to everyone, the folder will be accessible to everyone on the network. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Screenshot-from-2015-02-28-202031.png) + +Finally click OK to complete the sharing. Now the folder is shared with the people you want. You have completed sharing file on network. Is there everything left? Yes! How to remove the folders from the network? + +#### Remove shared folders #### + +We will also need to remove some of the folders after sometime from network. It is very simple and here is how we can do that. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/remove-shared-folder-from-network.jpg) + +This is all done! We can also share files over network using terminal but that would not be as easy as this one. If you request for command line sharing then I will write a tutorial on how to share files over network with command line in Linux. + +So, how do you find this tutorial to share files on local network in Ubuntu? I hope with this tutorial you can **easily share files between Ubuntu and Windows**. If you have questions or suggestions, feel free to ask it in the comment box below. + +This tutorial was requested by Kalc. If you would like, you can [request your own tutorial][2]. We would be happy to help you out along with other readers facing the same issue. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/share-folders-local-network-ubuntu-windows/ + +作者:[Mohd Sohail][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/sohail/ +[1]:http://en.wikipedia.org/wiki/Samba_%28software%29 +[2]:http://itsfoss.com/request-tutorial/ \ No newline at end of file From eb1a540d5a70d9fbe6558ae7dd21c8cbc8ecf086 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 4 Mar 2015 17:12:04 +0800 Subject: [PATCH 0174/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...plicate Files Instantly From Hard Drive.md | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md b/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md index 17da6a9508..1910310f2d 100644 --- a/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md +++ b/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md @@ -3,17 +3,17 @@ dupeGuru - 直接从硬盘中查找并移除重复文件 ### 简介 ### -对我们来说,磁盘被装满是一个较大的困扰。无论我们如何小心谨慎,我们总可能将相同的文件复制到多个不同的地方,或者在不知情的情况下,重复下载了同一个文件。因此,迟早你会看到“磁盘已满”的错误提示,若此时我们确实需要一些磁盘空间来存储重要数据,以上情形无疑是最糟糕的。假如你确信自己的系统中有重复文件,那么 **dupeGuru** 可能会帮助到你。 +对我们来说,磁盘被装满是棘手问题之一。无论我们如何小心谨慎,我们总可能将相同的文件复制到多个不同的地方,或者在不知情的情况下,重复下载了同一个文件。因此,迟早你会看到“磁盘已满”的错误提示,若此时我们确实需要一些磁盘空间来存储重要数据,以上情形无疑是最糟糕的。假如你确信自己的系统中有重复文件,那么 **dupeGuru** 可能会帮助到你。 dupeGuru 团队也开发了名为 **dupeGuru 音乐版** 的应用来移除重复的音乐文件,和名为 **dupeGuru 图片版** 的应用来移除重复的图片文件。 ### 1. dupeGuru (标准版) ### -对于那些不熟悉 [dupeGuru][1] 的人来说,它是一个免费,开源,跨平台的应用,其用途是在系统中查找和移除重复文件。它可以在 Linux, Windows, 和 Mac OS X 等平台下使用。通过使用一个快速的模糊匹配算法,它可以在几分钟内找到重复文件。同时,你还可以调整 dupeGuru 使它去精确查找特定文件类型的重复文件,以及从你想删除的文件中,消除特定的某些文件。它支持英语、 法语、 德语、 中文 (简体)、 捷克语、 意大利语、亚美尼亚语、 俄语、乌克兰语、巴西语和越南语。 +需要告诉那些不熟悉 [dupeGuru][1] 的人,它是一个免费、开源、跨平台的应用,其用途是在系统中查找和移除重复文件。它可以在 Linux, Windows, 和 Mac OS X 等平台下使用。通过使用一个快速的模糊匹配算法,它可以在几分钟内找到重复文件。同时,你还可以调整 dupeGuru 使它去精确查找特定文件类型的重复文件,以及从你想删除的文件中,清除某种文件。它支持英语、 法语、 德语、 中文 (简体)、 捷克语、 意大利语、亚美尼亚语、俄语、乌克兰语、巴西语和越南语。 #### 在 Ubuntu 14.10/14.04/13.10/13.04/12.04 中安装 dupeGuru #### -dupeGuru 开发者已经构建了一个 Ubuntu PPA (Personal Package Archives)来简化安装过程。为了安装 dupeGuru,依次在终端中键入以下命令: +dupeGuru 开发者已经构建了一个 Ubuntu PPA (Personal Package Archives)来简化安装过程。想要安装 dupeGuru,依次在终端中键入以下命令: ``` sudo apt-add-repository ppa:hsoft/ppa @@ -23,31 +23,31 @@ sudo apt-get install dupeguru-se ### 使用 ### -使用非常简单,可从 Unity 面板或菜单中启动 dupeGuru 。 +使用非常简单,可从 Unity 面板或菜单中启动 dupeGuru。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru_007.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/dupeGuru_007.png) 点击位于底部的 `+` 按钮来添加你想扫描的文件目录。点击 `扫描` 按钮开始查找重复文件。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru_008.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/dupeGuru_008.png) -一旦所选目录中含有重复文件,则它将在窗口中展示重复文件。正如你所看到的,在下面的截图中,我的下载目录中有一个重复文件。 +一旦所选目录中含有重复文件,那么它将在窗口中展示重复文件。正如你所看到的,在下面的截图中,我的下载目录中有一个重复文件。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Results_009.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/dupeGuru-Results_009.png) -现在,你可以决定下一步如何操作。你可以删除这个重复的文件,或者对它进行重命名,抑或是 复制/移动 这个文件到另一个位置。为此,选定该重复文件,或 在菜单栏中选定写有“**仅显示重复**”选项 ,如果你选择了“**仅显示重复**”选项,则只有重复文件在窗口中可见,这样你便可以轻易地选择并删除这些文件。点击“操作”下拉菜单,最后选择你将执行的操作。在这里,我只想删除重复文件,所以我选择了“移动标记文件到垃圾箱”这个选项。 +现在,你可以决定下一步如何操作。你可以删除这个重复的文件,或者对它进行重命名,抑或是 复制/移动 到另一个位置。为此,选定该重复文件,或在菜单栏中选定写有“**仅显示重复**”选项 ,如果你选择了“**仅显示重复**”选项,则只有重复文件在窗口中可见,这样你便可以轻松选择并删除这些文件。点击“操作”下拉菜单,最后选择你将执行的操作。在这里,我只想删除重复文件,所以我选择了“移动标记文件到垃圾箱”这个选项。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Menu_010.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/Menu_010.png) 接着,点击“继续”选项来移除重复文件。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/Deletion-Options_011.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/Deletion-Options_011.png) ### 2. dupeGuru 音乐版 ### -[dupeGuru 音乐版][2] 或 简称 dupeGuru ME ,它的功能与 dupeGuru 类似。它拥有 dupeGuru 的所有功能,但它包含更多的信息列 (如比特率,持续时间,标签等)和更多的扫描类型(如带有字段的文件名,标签以及音频内容)。同 dupeGuru 一样, dupeGuru ME 也运行在 Linux, Windows, 和 Mac OS X 中。 +[dupeGuru 音乐版][2] 或简称 dupeGuru ME,它的功能与 dupeGuru 类似。它拥有 dupeGuru 的所有功能,但它包含更多的信息列 (如比特率,持续时间,标签等)和更多的扫描类型(如带有字段的文件名,标签以及音频内容)。和 dupeGuru 一样,dupeGuru ME 也运行在 Linux、Windows 和 Mac OS X 中。 -它支持众多的格式,诸如 MP3, WMA, AAC (iTunes 格式), OGG, FLAC, 即失真率较少的 AAC 和 WMA 格式等。 +它支持众多的格式,诸如 MP3、WMA、AAC (iTunes 格式)、OGG、FLAC,以及失真率较少的 AAC 和 WMA 格式等。 #### 在 Ubuntu 14.10/14.04/13.10/13.04/12.04 中安装 dupeGuru ME #### @@ -59,19 +59,19 @@ sudo apt-get install dupeguru-me ### 使用 ### -你可以从 Unity 面板或菜单中启动它。dupeGuru ME 的使用方法,操作界面和外观与正常的 dupeGuru 类似。添加你想扫描的目录并选择你想执行的操作。重复的音乐文件就会被删除。 +你可以从 Unity 面板或菜单中启动它。dupeGuru ME 的使用方法、操作界面以及外观和正常的 dupeGuru 类似。添加你想扫描的目录并选择你想执行的操作。重复的音乐文件就会被删除。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Music-Edition-Results_012.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/dupeGuru-Music-Edition-Results_012.png) ### 3. dupeGuru 图片版 ### -[dupeGuru 图片版][3],或简称为 duepGuru PE,是一个在你的电脑中查找重复图片的工具。它与 dupeGuru 类似,但独具匹配重复图片的功能。dupeGuru PE 可运行在 Linux, Windows, 和 Mac OS X 中。 +[dupeGuru 图片版][3],或简称为 duepGuru PE,是一个在你的电脑中查找重复图片的工具。它和 dupeGuru 类似,但独具匹配重复图片的功能。dupeGuru PE 可运行在 Linux、Windows 和 Mac OS X 中。 -dupeGuru PE 支持 JPG, PNG, TIFF, GIF 和 BMP 等图片格式。所有的这些格式可以被同时比较。Mac OS X 版的 dupeGuru PE 还支持 PSD 和 RAW (CR2 和 NEF) 格式。 +dupeGuru PE 支持 JPG、PNG、TIFF、GIF 和 BMP 等图片格式。所有的这些格式可以被同时比较。Mac OS X 版的 dupeGuru PE 还支持 PSD 和 RAW (CR2 和 NEF) 格式。 #### 在 Ubuntu 14.10/14.04/13.10/13.04/12.04 中安装 dupeGuru PE #### -由于我们已经添加了 PPA, 我们也不必为 dupeGuru PE 添加 PPA。只需运行如下命令来安装它。 +由于我们已经添加了 PPA,我们也不必为 dupeGuru PE 再次添加。只需运行如下命令来安装它。 ``` sudo apt-get install dupeguru-pe @@ -79,13 +79,13 @@ sudo apt-get install dupeguru-pe #### 使用 #### -就使用方法,操作界面和外观而言,它与 dupeGuru ,dupeGuru ME 类似。我就纳闷为什么开发者为不同的类别开发了不同的版本。我想如果开发一个结合以上三个版本功能的应用,或许会更好。 +就使用方法,操作界面和外观而言,它与 dupeGuru,dupeGuru ME 类似。我就纳闷为什么开发者为不同的类别开发了不同的版本。我想如果开发一个结合以上三个版本功能的应用,或许会更好。 -启动它,添加你想扫描的目录,并选择你想执行的操作。就这样,你的重复文件将消失。 +启动它,添加你想扫描的目录,并选择你想执行的操作。就这样,你的重复文件将被清除。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/11/dupeGuru-Picture-Edition-Results_014.png) +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/11/dupeGuru-Picture-Edition-Results_014.png) -如若因为任何的安全问题而不能移除某些重复文件,请记下这些文件的位置,通过终端或文件管理器来手动删除它们。 +如果因为任何的安全问题而不能移除某些重复文件,请记下这些文件的位置,通过终端或文件管理器来手动删除它们。 欢呼吧! @@ -95,7 +95,7 @@ via: http://www.unixmen.com/dupeguru-find-remove-duplicate-files-instantly-hard- 作者:[SK][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 168bc15093f9152c6236b33ed2766afad634eb6c Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 4 Mar 2015 17:38:39 +0800 Subject: [PATCH 0175/2517] Translating by ZTinoZ --- .../20150114 What is a good IDE for C or C++ on Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md index 8a6eaaff6d..fd49a1d6f3 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -24,13 +24,13 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm8.staticflickr.com/7515/16275175052_61487480ce_c.jpg) -这又是这份列表里的一个“巨人级”工具,[MonoDevelop][7]那无与伦比的体验来源于它的外表和界面。我个人非常喜爱它的项目管理和它的一体化版本控制系统。The plugin system is also pretty amazing. But for some reason, all the options and the support for all kind of programming languages make it feel a bit overwhelming to me. It remains a great tool that I used many times in the past, but just not my number one when dealing with "simplistic" C. +这又是这份列表里的一个“巨人级”工具,[MonoDevelop][7]那无与伦比的体验来源于它的外表和界面。我个人非常喜爱它的项目管理体系和它的一体化版本控制系统。插件系统同样漂亮地让人震惊。但是由于一些原因,所有的设置和对所有编程语言的支持对于我来说让我感觉有点“资源过剩”了。它仍然是我在过去经常使用的伟大工具,但不是我在单单处理C语言时的第一选择。 ### 5. Anjuta ### ![](https://farm8.staticflickr.com/7514/16088462018_7ee6e5b433_c.jpg) -With a very strong "GNOME feeling" attached to it, [Anjuta][8]'s appearance is a hit or miss. I tend to see it as an advanced version of Geany with a debugger included, but the interface is actually a lot more elaborate. I do enjoy the tab system to switch between the project, folders, and code outline view. I would have liked maybe a bit more shortcuts to move around in a file. However, it is a good tool, and offers outstanding compilation and build options, which can support the most specific needs. +它身上有着强烈的“GNOME感”,[Anjuta][8]的外观很具争议。我倾向于把它看作是带着调试器的Geany升级版,但是它的界面实际上要复杂得多。我确实很享受能在项目、文件夹和代码大纲视图之间来回切换的标签系统,我本想用诸如更多的快捷键来移动文件,然而,这是一个很好的提供了显著编译功能和构建选项的工具,它能够支持哪些很有特点的需求。 ### 6. Komodo Edit ### @@ -56,7 +56,7 @@ For all KDE fans out there, [KDevelop][11] might be the answer to your prayers. Finally, last for not least, [CodeLite][12] shows that you can take a traditional formula and still get something with its own feeling attached to it. If the interface really reminded me of Code::Blocks and Anjuta at first, I was just blown away by the extensive plugin library. Whether you want to diff a file, insert a copyright block, define an abbreviation, or push your work on Git, there is a plugin for you. If I had to nitpick, I would say that it lacks a few navigation shortcuts for my taste, but that's really it. -最后,我希望that this list had you discover new IDEs for coding in your favorite language. While Code::Blocks remains my favorite, it has some serious challengers. Also we are far from covering all the ways to code in C/C++ using an IDE on Linux. So if you have another one to propose, let us know in the comments. Also if you would like me to cover IDEs for a different language next, also let us know in the comment section. +最后,我希望这份清单that this list had you discover new IDEs for coding in your favorite language. While Code::Blocks remains my favorite, it has some serious challengers. Also we are far from covering all the ways to code in C/C++ using an IDE on Linux. So if you have another one to propose, let us know in the comments. Also if you would like me to cover IDEs for a different language next, also let us know in the comment section. -------------------------------------------------------------------------------- From bdaf278a205944216a1f50b0d4f5c37fd72fd074 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Wed, 4 Mar 2015 20:53:52 +0800 Subject: [PATCH 0176/2517] Update 20150126 CD Audio Grabbers--Graphical Based.md --- sources/share/20150126 CD Audio Grabbers--Graphical Based.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150126 CD Audio Grabbers--Graphical Based.md b/sources/share/20150126 CD Audio Grabbers--Graphical Based.md index 5dcfa26cca..8865d5d810 100644 --- a/sources/share/20150126 CD Audio Grabbers--Graphical Based.md +++ b/sources/share/20150126 CD Audio Grabbers--Graphical Based.md @@ -1,3 +1,4 @@ +Translating By H-mudcup CD Audio Grabbers - Graphical Based ================================================================================ CD audio grabbers are designed to extract ("rip") the raw digital audio (in a format commonly called CDDA) from a compact disc to a file or other output. This type of software enables a user to encode the digital audio into a variety of formats, and download and upload disc info from freedb, an internet compact disc database. @@ -125,4 +126,4 @@ via: http://www.linuxlinks.com/article/20150125043738417/AudioGrabbersGraphical. [1]:http://www.freac.org/ [2]:http://kde.maniatek.com/audex/ [3]:http://burtonini.com/blog/computers/sound-juicer -[4]:http://sourceforge.net/projects/ripperx/ \ No newline at end of file +[4]:http://sourceforge.net/projects/ripperx/ From 9d9b6b6943ae251e8380a7e734214ae0097ebf21 Mon Sep 17 00:00:00 2001 From: theo-l Date: Wed, 4 Mar 2015 22:54:57 -0300 Subject: [PATCH 0177/2517] translating --- ...nitor Network Usage with nload in Linux.md | 41 +++++++++++++++---- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md b/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md index 1ab8f35e95..62f401e72f 100644 --- a/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md +++ b/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md @@ -6,111 +6,138 @@ nload is a free linux utility that can help the linux user or sysadmin to monito nload 是一个免费的linux工具,通过提供两个简单的图形化界面来帮助linux用户和系统管理员来实时监控网络流量以及宽带使用情况:一个作为进入流量,一个作为流出流量. I really like to use **nload** to display information on my screen about the current download speed, the total incoming traffic, and the average download speed. The graphs reported by nload tool are very easy to interpret and what is the most important thing they are very helpful. - +我是真的很喜欢用**nload**来在屏幕上显示当前的下载速度,总的流入量和平均下载速度等信息。nload工具的报告图非常容易理解,最重要的是这些信息真的非常有用。 According to the manual pages it monitors all network devices by default, but you can easily specify the device you want to monitor and also switch between different network devices using the arrow keys. There are many options avaliable such as -t to determine refresh interval of the display in milliseconds (the default value of interval is 500), -m to show multiple devices at the same time(traffic graphs are not shown when this option is used), -u to set the type of unit used for the display of traffic numbers and many others that we are going to explore and practise in this tutorial. +在使用手册上说到,在默认情况下会监控所有网络设备。但是你可以轻松地指定你想要监控的设备,而且可以可以通过方向键头在不同的网络设备之间进行转换。另外还有很多的选项可用,例如 ‘-r’选项确定以毫秒来刷新显示时间间隔(默认时间间隔值是500毫秒),‘-m’选项用来实时显示多个设备(流量图在使用该选项时不会显示), ‘-u’选项用来设置显示流量数字的单元类型,另外还有许多其他的选项将会在该教程中探索和练习。 ### How to install nload on your linux machine ### +### 如何将 nload安装到你的linux机器上 ### **Ubuntu** and **Fedora** users can easily install nload from the default repositories. +**Ubuntu** 和 **Fedora** 用户可以从默认的软件仓库中容易地安装。 Install nload on Ubuntu by using the following command. +在Ubuntu上使用以下命令进行安装。 sudo apt-get install nload Install nload on Fedora by using the following command. +在Fedora上使用以下命令进行安装。 sudo yum install nload What about **CentOS** users? Just type the following command on your machine and you will get nload installed. +**CentOS**用户该怎么办呢? 只需要在你的机器上输入以下命令,通用能够达到相同的结果--殊途同归。 sudo yum install nload The following command will help you to install nload on OpenBSD systems. +以下的命令会帮助你在OpenBSD系统中安装nload. sudo pkg_add -i nload A very effective way to install software on linux machine is to compile by source as you can download and install the latest version which usually means better performance, cool features and less bugs. +linux机器上的另外一个非常有效的安装软件的方式就是编译源代码,通过下载并安装最新的版本意味着能够获得更好地性能,更酷的特性以及越少的bug数。 ### How to install nload from source ### +### 如何通过源代码安装nload ### The first thing you need to do before installing nload from source you need to download it and to do this I like to use the wget uility which is available by default on many linux machines. This free utility helps linux users to download files from the web in a non-interactive way and has support for the following protocols. +在从源代码安装nload之前,你需要首先下载源代码。 我通常使用wget工具来进行下载--该工具在许多linux机器上默认可用。该免费工具帮助用户以非交互式的方式从网络上下载文件,并支持以下协议: - HTTP - HTTPS - FTP Change directory to **/tmp** by using the following command. +通过以下命令来进入到**/tmp**目录中。 cd /tmp Now type the following command in your terminal to download the latest version of nload on your linux machine. +然后在你的终端中输入以下命令就可以将最新版本的nload下载到你的linux机器上了。 wget http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz If you don't like to use the linux wget utility you can easily download it from the [official][1] source by just a mouse click. +如果你不喜欢使用wget工具,也可以通过简单的一个鼠标点击轻松地从[官网][1]上下载源代码。 The download will finish in no time as it is a small software. The next step is to untar the file you downloaded with the help of the **tar** utility. +由于该软件非常轻巧,其下载过程几乎在瞬间就会完成。接下来的步骤就是通过**tar**工具来将下载的源代码包进行解压。 The tar archiving utility can be used to store and extract files from a tape or disk archive. There are many options available in this tool but we need the followings to perform our operation: +tar归档工具可以用来从磁带或硬盘文档中存储或解压文件,该工具具有许多可用的选项,但是我们只需要下面的几个选项来执行我们的操作。 1. **-x** to extract files from an archive +1. **-x** 从文档中解压文件 1. **-v** to run in verbose mode +1. **-v** 使用繁琐模式运行--用来输入详细信息 1. **-f** to specify the files +1. **-f** 用来指定文件 For example: +例如: tar xvf example.tar Now that you learned how to use the tar utility I am very sure you know how to untar .tar archives from the commandline. +现在你学会了如何使用tar工具,我可以非常肯定你会知道如何从命令行中解压.tar文档。 tar xvf nload-0.7.4.tar.gz Then use the cd command to change directory to nload*. +之后使用cd命令来进入到nload*目录中 cd nload* It looks like this on my system. +在我的系统上看起来是这样的 oltjano@baby:/tmp/nload-0.7.4$ -Now run the command - - ./configure - -to to configure the package for your system. +Now run the command to to configure the package for your system. +然后运行下面这个命令来为你的系统配置包 ./configure Alot of stuff is going to be displayed on your screen. The following screenshot demonstrates how it is going to look like. +此时会有一大波僵尸会在你的屏幕上显示出来,下面的一个屏幕截图描述了它的样子。 ![configuring packages for nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload1.png) Then compile the nload with the following command. +在上述命令完成之后,通过下面的命令来编译nload。 make ![compiling nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload2.png) And finally install nload on your linux machine with the following command. +好了,终于....,下载通过以下命令可以将nload安装在你的机器上了。 sudo make install ![installing nload from source](http://blog.linoxide.com/wp-content/uploads/2015/01/nload3.png) Now that the installation of nload is finished it is time for you to learn how to use it. +安装好nload之后就是时间来让你学习如何使用它了。 ### How to use nload ### +###如何使用nload### I like to explore so type the following command on your terminal. +我喜欢探索,所以在你的终端输入以下命令. nload What do you see? +看到了什么? I get the following. +我得到了下面的结果。 ![running nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.png) @@ -203,7 +230,7 @@ And if you run the command nload without any option it will monitor all auto-det via: http://linoxide.com/monitoring-2/monitor-network-usage-nload/ 作者:[Oltjano Terpollari][a] -译者:[译者ID](https://github.com/译者ID) +译者:[theo-l](https://github.com/theo-l) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 497071cb7b4c5ceb6c8ba01753f0a790c0f3f2a5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 5 Mar 2015 10:53:26 +0800 Subject: [PATCH 0178/2517] translating --- ...w To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md b/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md index 3d20014215..52a0cf1951 100644 --- a/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md +++ b/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md @@ -1,3 +1,5 @@ +Translating----geekpi + How To Fix “Not Enough Free Disk Space On /boot” In Ubuntu ================================================================================ ### Question: How To Fix “Not Enough Free Disk Space On /boot” In Ubuntu? ### @@ -60,4 +62,4 @@ via: https://www.unixmen.com/how-to-fix-not-enough-free-disk-space-on-boot-in-ub 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:https://www.unixmen.com/author/sk/ -[1]:http://www.unixmen.com/after-a-fresh-install-of-ubuntu-1010-maverick-meerkat-configuration-made-easy-with-ubuntu-tweak/ \ No newline at end of file +[1]:http://www.unixmen.com/after-a-fresh-install-of-ubuntu-1010-maverick-meerkat-configuration-made-easy-with-ubuntu-tweak/ From 76ea4c21db5ee0aded04073d313d7867e0c509cd Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 5 Mar 2015 11:01:59 +0800 Subject: [PATCH 0179/2517] Translating by ZTinoZ --- .../20150114 What is a good IDE for C or C++ on Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md index fd49a1d6f3..7fbac29032 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -30,13 +30,13 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm8.staticflickr.com/7514/16088462018_7ee6e5b433_c.jpg) -它身上有着强烈的“GNOME感”,[Anjuta][8]的外观很具争议。我倾向于把它看作是带着调试器的Geany升级版,但是它的界面实际上要复杂得多。我确实很享受能在项目、文件夹和代码大纲视图之间来回切换的标签系统,我本想用诸如更多的快捷键来移动文件,然而,这是一个很好的提供了显著编译功能和构建选项的工具,它能够支持哪些很有特点的需求。 +它身上有着强烈的“GNOME感”,[Anjuta][8]的外观很具争议。我倾向于把它看作是带着调试器的Geany升级版,但是它的界面实际上要复杂得多。我确实很享受能在项目、文件夹和代码大纲视图之间来回切换的标签系统,我本想用诸如更多的快捷方法来移动文件,然而,这是一个很好的提供了显著编译功能和构建选项的工具,它能够支持哪些很有特点的需求。 ### 6. Komodo Edit ### ![](https://farm8.staticflickr.com/7502/16088462028_81d1114c84_c.jpg) -I was not very familiar with [Komodo Edit][9], but after trying it a few days, it surprised me with many many good things. First, the tab-based navigation is always appreciable. Then the fancy looking code outline reminds me a lot of Sublime Text. Furthermore, the macro system and the file comparator make Komodo Edit very practical. Its plugin library makes it almost perfect. "Almost" because I do not find the shortcuts as nice as in other IDEs. Also, I would enjoy more specific C/C++ tools, and this is typically the flaw of general IDEs. Yet, very enjoyable software. +我不是非常熟悉[Komodo Edit][9],但是在试用了一段时间之后,我被它很多很多的优点给惊喜到了。首先,基于标签的导航功能很有很强的可预见性。其次它奇特的代码大纲让我想到了Sublime Text。此外,它的宏系统和文件比较器使得Komodo Edit非常实用。它的插件库让它几乎是完美的,说“几乎”是因为在其它IDE里我的确找不到能与之相媲美的快捷方法了。而且我们能享受到更多特别的C/C++工具,这往往是普通IDE的不足之处。然而,Komodo Edit就能做到。 ### 7. NetBeans ### @@ -56,7 +56,7 @@ For all KDE fans out there, [KDevelop][11] might be the answer to your prayers. Finally, last for not least, [CodeLite][12] shows that you can take a traditional formula and still get something with its own feeling attached to it. If the interface really reminded me of Code::Blocks and Anjuta at first, I was just blown away by the extensive plugin library. Whether you want to diff a file, insert a copyright block, define an abbreviation, or push your work on Git, there is a plugin for you. If I had to nitpick, I would say that it lacks a few navigation shortcuts for my taste, but that's really it. -最后,我希望这份清单that this list had you discover new IDEs for coding in your favorite language. While Code::Blocks remains my favorite, it has some serious challengers. Also we are far from covering all the ways to code in C/C++ using an IDE on Linux. So if you have another one to propose, let us know in the comments. Also if you would like me to cover IDEs for a different language next, also let us know in the comment section. +最后,我希望这份清单能让你给自己最喜欢的语言探索到更多新的IDE。虽然Code::Blocks仍然是我的最爱,不过它有一些很强大的对手。当然我们也可以远离Linux上的IDE用文本编辑器去编写C/C++代码。所以如果你有什么其它的建议想法,在评论中让我们获悉。或者如果你想要我再说说关于一些其它语言的IDE,也可以评论里提出。 -------------------------------------------------------------------------------- From 21883dee4ba4767636284f39d6a2ccca1faa0b83 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 5 Mar 2015 11:13:23 +0800 Subject: [PATCH 0180/2517] translated --- ...ough Free Disk Space On boot' In Ubuntu.md | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md b/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md index 52a0cf1951..41318dd5fc 100644 --- a/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md +++ b/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md @@ -1,62 +1,61 @@ -Translating----geekpi - -How To Fix “Not Enough Free Disk Space On /boot” In Ubuntu +如何在Ubuntu上修复“Not Enough Free Disk Space On /boot” ================================================================================ -### Question: How To Fix “Not Enough Free Disk Space On /boot” In Ubuntu? ### +### 提问:如何在Ubuntu上修复“Not Enough Free Disk Space On /boot”错误?### -Today, I got the following error, but a simple one, when try to update my Lubuntu 14.04 desktop. +今天,当我在升级Lubuntu 14.04的时候遇到了下面这个错误,但是很简单。 > “Not Enough Free Disk Space On /boot” ![](https://www.unixmen.com/wp-content/uploads/2015/02/Software-Updater_002.png) -This is because my /boot partition has caught up with unwanted old kernels, packages etc. +这是因为我的启动分区超出了不再要的旧内核与包等。 -### Answer: ### +### 回答: ### -I heard about **Computer Janitor** feature which will remove unwanted old junk files in Ubuntu Tweak tool. Using the Computer Janitor, you can clean up your system like a freshly installed system. Janitor will remove; +我听说**Computer Janitor**这个特性可以在Ubuntu Tweak中删除不想要的垃圾文件。使用Computer Janitor,你可以将你的系统清理成像新安装的那样。Janitor会删除: -- Apps cache(Firefox/Chrome cache, Software center cache); -- Thumbnail cache; -- Apt cache; -- Old kernels; -- Package configs; -- And unneeded packages. +- 程序缓存(Firefox/Chrome 缓存、软件中心缓存); +- 略缩图缓存; +- apt缓存; +- 旧内核; +- 包的配置; +- 不再需要的包。 If you haven’t install this tool, look at the following link. +如果你还没有安装这个工具,参考下面的链接 -- **[How To Install And Use Ubuntu Tweak On Ubuntu][1]** +- **[如何安装和使用Ubuntu Tweak][1]** -To remove unwanted junk files, open Ubuntu Tweak, and click on the **Janitor** option. +要删除不需要的垃圾文件,打开Ubuntu Tweak,点击 **Janitor** 选项。 ![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_006.png) -Select the check the boxes to remove unwanted junk from your system, and click **Clean** button. +选择你想要删除的文件的选框,并点击 **Clean** 按钮。 ![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_007.png) -Janitor will now start to clean up your system +Janitor现在就开始清理你的系统了。 ![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_003.png) -Cool! The system is clean now. +真酷!系统清理完成了。 ![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_008.png) -Again I re-launched the software updater. This time it went smoothly without any issues. +我重启启动了软件更新。这个没再遇到问题了。 ![](https://www.unixmen.com/wp-content/uploads/2015/02/Software-Updater_009.png) -That’s all. Enjoy. There are others ways also available to clean up the system. But, this seems very easy to follow. We can do system clean up in few mouse clicks. +就是这样。当然也有其他的方法可以清理系统。但是,这个方法很容易学。我们可以只点击几次鼠标就可以清理系统。 -Cheers! +干杯! -------------------------------------------------------------------------------- via: https://www.unixmen.com/how-to-fix-not-enough-free-disk-space-on-boot-in-ubuntu/ 作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e697013cbecb0fbee15f94a81d787e3acf2b9b38 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 5 Mar 2015 11:13:48 +0800 Subject: [PATCH 0181/2517] translated --- ...4 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md (100%) diff --git a/sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md b/translated/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md similarity index 100% rename from sources/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md rename to translated/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md From 176085ad11050024ae4e32bf31f2fd2ae1eb3f70 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 5 Mar 2015 11:41:25 +0800 Subject: [PATCH 0182/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...--Find And Remove Duplicate Files Instantly From Hard Drive.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md (100%) diff --git a/translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md b/published/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md similarity index 100% rename from translated/tech/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md rename to published/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md From bac14ffb151ec129b822bb1aaf6da3e70b224d17 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 5 Mar 2015 16:24:33 +0800 Subject: [PATCH 0183/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...w to install full kernel source on Debian or Ubuntu.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md index 1296b0f975..4887c60e6a 100644 --- a/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md +++ b/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md @@ -6,7 +6,7 @@ Linux有问必答:如何在Debian或Ubuntu上安装完整的内核源码 只有在你需要生成一个定制的内核,而且内核源码中的一些内核默认设置要被你调整了的情况下,你才需要完整的内核源码树。 -这里将会解答如何**在Debian或Ubuntu的库中下载并安装完整树结构的内核源码**。虽然你可以在这个网站[https://www.kernel.org/pub/linux/kernel/][2]下载官方的内核源码,但是发行版软件仓库可以允许你下载包含补丁的内核源码。 +这里将会解答如何**在Debian或Ubuntu的库中下载并安装完整树结构的内核源码**。你可以在[https://www.kernel.org/pub/linux/kernel/][2]下载官方的内核源码,不过使用发行版软件仓库可以允许你下载包含补丁的内核源码。 ### 在Debian上安装完整的内核源码 ### @@ -20,7 +20,7 @@ Linux有问必答:如何在Debian或Ubuntu上安装完整的内核源码 伴随着完整内核源码(linux_X.X.XX.orig.tar.xz)的还有一些可用的内核补丁(linux_X.X.X+XXX.debian.tar.xz)和源码控制文件(linux_XXXX.dsc),这些都将被下载并存储到当前目录。在.dsc文件中会指出如何给内核源码打补丁。 -当下载完成,以上的命令将会自动调用工具dpkg-source将下载的内核源码解压到当前的目录中,与此同时更具.dsc文件来下补丁。 +当下载完成,以上的命令将会自动调用工具dpkg-source将下载的内核源码解压到当前的目录中,与此同时根据.dsc文件来下补丁。 最终完整的内核源码树将会以"linux-X.X.XX"的形式呈现在当前目录中。 @@ -35,7 +35,7 @@ Linux有问必答:如何在Debian或Ubuntu上安装完整的内核源码 $ sudo apt-get install git $ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-$(lsb_release --codename | cut -f2).git -举个例子,如果你使用的是Ubuntu14.04,以上的命令将会查看Git的"ubuntu-trusty"仓库中的代码。 +举个例子,如果你使用的是Ubuntu 14.04,以上的命令将会查看Git的"ubuntu-trusty"仓库中的代码。 ![](https://farm9.staticflickr.com/8642/16526856391_de636ff9b8_c.jpg) @@ -49,7 +49,7 @@ via: http://ask.xmodulo.com/install-full-kernel-source-debian-ubuntu.html 作者:[Dan Nanni][a] 译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c62318312961d61490e3e67975113484328dc5ac Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 5 Mar 2015 17:08:56 +0800 Subject: [PATCH 0184/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ovie Player Has a Stylish Interface Ubuntu Installation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/share => published}/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md (91%) diff --git a/translated/share/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md b/published/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md similarity index 91% rename from translated/share/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md rename to published/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md index 9cb0a3765d..0decb425e1 100644 --- a/translated/share/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md +++ b/published/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md @@ -1,10 +1,10 @@ -Flow 'N Play视频播放器有着独具风格的界面[在Ubuntu上安装] +在Ubuntu上安装Flow 'N Play—界面独具风格的视频播放器 ================================================================================ **Flow ‘N Play**是个用Qt编写的新视频播放器。它有着漂亮又简洁的界面,只提供基本播放功能。 ![](http://www.tuxarena.com/wp-content/uploads/2014/11/flow_n_play.jpg) -[Flow ‘N Play][1]是个比较新的视频播放器,它有着漂亮的界面和简单的操作(今年三月份第一次发行)。其中一个功能就是能通过拖动鼠标滑动视频列表。播放器带有基本功能,一个搜索功能,支持彩色主题。 +[Flow ‘N Play][1]是个比较新的视频播放器,它有着漂亮的界面和简单的操作(2014年3月份第一次发行)。其中一个功能就是能通过拖动鼠标滑动视频列表。播放器带有基本功能,一个搜索功能,支持彩色主题。 打开一个新的视频——你还可以在同一个对话框下自定义一个封面: From 872eb1af723014d8986e34ae28bb140999ef09db Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 5 Mar 2015 20:11:42 +0800 Subject: [PATCH 0185/2517] Update and rename translated/tech to translated/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md --- ... Passwordless SSH Logon to Ubuntu 14.04.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 translated/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md diff --git a/translated/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md b/translated/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md new file mode 100644 index 0000000000..a3020446ee --- /dev/null +++ b/translated/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md @@ -0,0 +1,85 @@ +设置Ubuntu14.04无密码登录SSH +================================================================================ +大家好,今天我来向大家介绍如何在可信的Ubuntu12.04上设置无密码登录SSH功能。仅在工作站有正确的(公私)密钥以供匹配时SSH服务端才会允许你登录,反之访问将不会被允许。 + +正常情况下,我们需要连上SSH的控制台输入用户名和密码,两者结合使用。如果两者全部正确,我们就可以访问,反之访问被服务端拒绝。不过相比而言还有一种比用密码更安全的登录方式,我们用的不是密码在登录SSH我们用的是密钥。 + +如果你想使用这个安全的方式,我们只需简单的禁用密码登录并只允许密钥即可。使用这种方式时,客户端计算机上会产生公私一对密钥。接着客户端得把公钥上传到SSH服务端的密要验证文件中去。在访问被授予前,服务器及客户端电脑互验密钥对。如果服务器上的公钥与客服端提交的私钥匹配访问开始,否则访问被拒绝。 + +这是获取SSH服务器认证中非常安全的一种做法,如果你想为SSH用户登录实施安全的认证,这也是备受推崇的方式。这里快速的过一遍允许无密码登录SSH的配置过程。 + +### 1.安装Openssh服务端 ### + +首先,我们需要更新我们的本地库索引。所以如下所见,我们需要先输入“apt-get update” + + $ sudo apt-get update + +![Updating Repo Index](http://blog.linoxide.com/wp-content/uploads/2015/02/updating-repo-list.png) + +现在我们可以通过以下命令安装openssh-server: + + $ sudo apt-get install openssh-server + +![Installing openssh server](http://blog.linoxide.com/wp-content/uploads/2015/02/installing-openssh-server.png) + +### 2. 开启openssh服务 ### + +在OpenSSH已经成功安装在Ubuntu14.04操作系统上了之后,我们要启动OpenSSH的服务。以下命令让你启动/开启服务。 + + $ sudo service ssh start + +OR + + $ sudo /etc/init.d/ssh start + +### 3. 配置密钥对 ### + +在我们安装并启动了OpenSSH服务以后。现在终于到了要我们搞定公私钥对的时候了,在终端中运行以下命令: + + $ ssh-keygen -t rsa + +在运行完以上命令了以后,我们完成一系列的提示的任务。首先选择保存密钥路径,按回车将会选择默认路径即家目录的一个隐藏的.ssh文件夹。下一个提示是请输入提醒。我个人将此留白(回车过)。之后密钥对就会创建,大功告成。 + +![Generating Key Pair](http://blog.linoxide.com/wp-content/uploads/2015/02/generating-key-pair.png) + +在密钥对生成以后,我们需要将**客户端的上的公钥复制到SSH服务端**或者宿主来创建对客户端的信任关系。运行以下命令复制客户端的公钥到服务端。 + + $ ssh-copy-id user@ip_address + +在公钥上传之后,我们现在可以不用通过密码登陆SSH了。为此,我们需要通过以下命令用文本编辑器打开**etc/ssh/ssh_config**。 + + $ sudo nano /etc/ssh/sshd_config + +现在,我们需要按照下图所示去到几行注释并进行一些赋值。 + +![Configuring sshd Config](http://blog.linoxide.com/wp-content/uploads/2015/02/configuring-sshd_config.png) + +### 4. 重启SSH服务 ### + +最后,在我们配置完SSH服务端后,为了使改动生效我们需要重启SSH服务。在终端或控制台运行以下命令重启。 + + $ sudo service ssh restart + +OR + + $ sudo /etc/init.d/ssh restart + +![Restarting ssh](http://blog.linoxide.com/wp-content/uploads/2015/02/restarting-ssh.png) + +现在,我们可以试试不用密码仅用密钥配对的方式登录ssh服务端了。 + +### 总结 ### + +太好了!我们成功的配置了无密码登录SSH。这是获取SSH服务器认证中非常安全的一种做法,如果你想为SSH但用户登录实施安全的认证这也是备受推崇的方式。所以,如果你还有什么问题或建议,请在意见框中向我们反馈。很欣慰你能读完,祝你SSH登录愉快 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-passwordless-ssh-logon-ubuntu-14-04/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ From 881b049e7b5fbb8de332d6982dde275f3f10dc11 Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 5 Mar 2015 20:12:31 +0800 Subject: [PATCH 0186/2517] translated From 01b9a4e928172827adf8821d9eae770828e9ebcd Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 5 Mar 2015 20:14:10 +0800 Subject: [PATCH 0187/2517] Delete 20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md --- ... Passwordless SSH Logon to Ubuntu 14.04.md | 87 ------------------- 1 file changed, 87 deletions(-) delete mode 100644 sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md diff --git a/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md b/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md deleted file mode 100644 index 58c6351003..0000000000 --- a/sources/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md +++ /dev/null @@ -1,87 +0,0 @@ -translating by martin. - -How to Setup Passwordless SSH Logon to Ubuntu 14.04 -================================================================================ -Hi all, today we'll gonna learn how we can setup Passwordless SSH Logon to Ubuntu 14.04 "Trusty". Only the workstations having the correct matching key pair (private and public) will be allowed to logon to the SSH server, without the key paring, access will not be allowed. - -Usually, we need to enter username and password combination to connect to an SSH console. If the combination is correct to that of the system's then, we get access to the server else we are denied from the access. But, there is something more secure than Password logon, we have passwordless SSH logon using the encrypted keys. - -If you want to enable this secured option, we can simply disable password-logon and only allow logon using an encryption key. When using encryption keys option, the client computer generates a private and public key pair. The client then must upload the public key to the SSH server authorized_key file. Before access is granted, the server and client computer validate the key pair. If the public key on the server matches the private key submitted via the client then access will be granted else will be denied. - -This is a very secure way authenticating to a SSH server and it’s a recommended method if you wish to implement secure logon with single user SSH logon. Here's a quick step-wise process on how to enable Passwordless SSH logon. - -### 1. Installing Openssh Server ### - -First off all, we'll need to update our local repository index. To do so, we'll first need to run apt-get update as shown below. - - $ sudo apt-get update - -![Updating Repo Index](http://blog.linoxide.com/wp-content/uploads/2015/02/updating-repo-list.png) - -Now, we can install openssh-server by running following command. - - $ sudo apt-get install openssh-server - -![Installing openssh server](http://blog.linoxide.com/wp-content/uploads/2015/02/installing-openssh-server.png) - -### 2. Enabling Openssh Server ### - -Now, we'll want to enable OpenSSH server after we successfully installed it on our Ubuntu 14.04 Operating System. The command to enable/start the server is given as follows. - - $ sudo service ssh start - -OR - - $ sudo /etc/init.d/ssh start - -### 3. Configuring Key Pair ### - -After we have installed our OpenSSH Server and enabled it. We'll now finally wanna go for generating our Public and Private Key Pair. To do that, run the following command in a terminal or console. - - $ ssh-keygen -t rsa - -After running the above command, we'll be prompted to complete a series of tasks. The first will be where to save the keys, press Enter to choose the default location which is in a hidden .ssh folder in the home directory. The next prompt will be to enter the Paraphrase. I personally leave this blank (just press enter) to continue. It will then create the key pair and we’re done. - -![Generating Key Pair](http://blog.linoxide.com/wp-content/uploads/2015/02/generating-key-pair.png) - -After generation of the key pair, we will need to **copy the client’s public key to the SSH server** or host inorder to create trusted relationship with it. We'll need to run the commands below to copy the client public key to the server. - - $ ssh-copy-id user@ip_address - -After the public key is copied to the server, we can now go and disable password logon via SSH. To do that, we'll need to open **/etc/ssh/ssh_config** via a text editor by run the commands below. - - $ sudo nano /etc/ssh/sshd_config - -Now, we'll need to uncomment the lines and set the values as shown below. - -![Configuring sshd Config](http://blog.linoxide.com/wp-content/uploads/2015/02/configuring-sshd_config.png) - -### 4. Restarting the SSH Server ### - -Finally, after we are done configuring SSH Server, we'll want to restart our SSH Server so that all the changes will take affect. To restart one can run the following command in a terminal or the console. - - $ sudo service ssh restart - -OR - - $ sudo /etc/init.d/ssh restart - -![Restarting ssh](http://blog.linoxide.com/wp-content/uploads/2015/02/restarting-ssh.png) - -Finally, we can now ssh in to the server without a password and only from the client having the same key pair not the password. - -### Conclusion ### - -Hurray! We have successfully enabled Passwordless SSH logon. It is a lot secure to enable Encrypted Key Pair SSH logon . This is a very secure way authenticating to a SSH server and it’s a recommended method if you wish to implement secure logon with single user SSH logon. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Encrypted Secure SSH Login :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/setup-passwordless-ssh-logon-ubuntu-14-04/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ From 1985cad11b8781e962455741d3ad55f6e3eeaef8 Mon Sep 17 00:00:00 2001 From: theo-l Date: Thu, 5 Mar 2015 15:50:52 -0300 Subject: [PATCH 0188/2517] translated --- ...nitor Network Usage with nload in Linux.md | 93 +++++-------------- 1 file changed, 25 insertions(+), 68 deletions(-) rename {sources => translated}/tech/20150121 How to Monitor Network Usage with nload in Linux.md (51%) diff --git a/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md b/translated/tech/20150121 How to Monitor Network Usage with nload in Linux.md similarity index 51% rename from sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md rename to translated/tech/20150121 How to Monitor Network Usage with nload in Linux.md index 62f401e72f..904a7c6861 100644 --- a/sources/tech/20150121 How to Monitor Network Usage with nload in Linux.md +++ b/translated/tech/20150121 How to Monitor Network Usage with nload in Linux.md @@ -1,74 +1,55 @@ -theo-l translating -How to Monitor Network Usage with nload in Linux 在linux中如何通过nload来监控网络使用情况 ================================================================================ -nload is a free linux utility that can help the linux user or sysadmin to monitor network traffic and bandwidth usage in real time by providing two simple graphs: one per incoming traffic and one for outgoing traffic. nload 是一个免费的linux工具,通过提供两个简单的图形化界面来帮助linux用户和系统管理员来实时监控网络流量以及宽带使用情况:一个作为进入流量,一个作为流出流量. -I really like to use **nload** to display information on my screen about the current download speed, the total incoming traffic, and the average download speed. The graphs reported by nload tool are very easy to interpret and what is the most important thing they are very helpful. 我是真的很喜欢用**nload**来在屏幕上显示当前的下载速度,总的流入量和平均下载速度等信息。nload工具的报告图非常容易理解,最重要的是这些信息真的非常有用。 -According to the manual pages it monitors all network devices by default, but you can easily specify the device you want to monitor and also switch between different network devices using the arrow keys. There are many options avaliable such as -t to determine refresh interval of the display in milliseconds (the default value of interval is 500), -m to show multiple devices at the same time(traffic graphs are not shown when this option is used), -u to set the type of unit used for the display of traffic numbers and many others that we are going to explore and practise in this tutorial. 在使用手册上说到,在默认情况下会监控所有网络设备。但是你可以轻松地指定你想要监控的设备,而且可以可以通过方向键头在不同的网络设备之间进行转换。另外还有很多的选项可用,例如 ‘-r’选项确定以毫秒来刷新显示时间间隔(默认时间间隔值是500毫秒),‘-m’选项用来实时显示多个设备(流量图在使用该选项时不会显示), ‘-u’选项用来设置显示流量数字的单元类型,另外还有许多其他的选项将会在该教程中探索和练习。 -### How to install nload on your linux machine ### ### 如何将 nload安装到你的linux机器上 ### -**Ubuntu** and **Fedora** users can easily install nload from the default repositories. **Ubuntu** 和 **Fedora** 用户可以从默认的软件仓库中容易地安装。 -Install nload on Ubuntu by using the following command. 在Ubuntu上使用以下命令进行安装。 sudo apt-get install nload -Install nload on Fedora by using the following command. 在Fedora上使用以下命令进行安装。 sudo yum install nload -What about **CentOS** users? Just type the following command on your machine and you will get nload installed. **CentOS**用户该怎么办呢? 只需要在你的机器上输入以下命令,通用能够达到相同的结果--殊途同归。 sudo yum install nload -The following command will help you to install nload on OpenBSD systems. 以下的命令会帮助你在OpenBSD系统中安装nload. sudo pkg_add -i nload -A very effective way to install software on linux machine is to compile by source as you can download and install the latest version which usually means better performance, cool features and less bugs. linux机器上的另外一个非常有效的安装软件的方式就是编译源代码,通过下载并安装最新的版本意味着能够获得更好地性能,更酷的特性以及越少的bug数。 -### How to install nload from source ### ### 如何通过源代码安装nload ### -The first thing you need to do before installing nload from source you need to download it and to do this I like to use the wget uility which is available by default on many linux machines. This free utility helps linux users to download files from the web in a non-interactive way and has support for the following protocols. 在从源代码安装nload之前,你需要首先下载源代码。 我通常使用wget工具来进行下载--该工具在许多linux机器上默认可用。该免费工具帮助用户以非交互式的方式从网络上下载文件,并支持以下协议: - HTTP - HTTPS - FTP -Change directory to **/tmp** by using the following command. 通过以下命令来进入到**/tmp**目录中。 cd /tmp -Now type the following command in your terminal to download the latest version of nload on your linux machine. 然后在你的终端中输入以下命令就可以将最新版本的nload下载到你的linux机器上了。 wget http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz -If you don't like to use the linux wget utility you can easily download it from the [official][1] source by just a mouse click. 如果你不喜欢使用wget工具,也可以通过简单的一个鼠标点击轻松地从[官网][1]上下载源代码。 -The download will finish in no time as it is a small software. The next step is to untar the file you downloaded with the help of the **tar** utility. 由于该软件非常轻巧,其下载过程几乎在瞬间就会完成。接下来的步骤就是通过**tar**工具来将下载的源代码包进行解压。 -The tar archiving utility can be used to store and extract files from a tape or disk archive. There are many options available in this tool but we need the followings to perform our operation: tar归档工具可以用来从磁带或硬盘文档中存储或解压文件,该工具具有许多可用的选项,但是我们只需要下面的几个选项来执行我们的操作。 1. **-x** to extract files from an archive @@ -78,152 +59,128 @@ tar归档工具可以用来从磁带或硬盘文档中存储或解压文件, 1. **-f** to specify the files 1. **-f** 用来指定文件 -For example: 例如: tar xvf example.tar -Now that you learned how to use the tar utility I am very sure you know how to untar .tar archives from the commandline. 现在你学会了如何使用tar工具,我可以非常肯定你会知道如何从命令行中解压.tar文档。 tar xvf nload-0.7.4.tar.gz -Then use the cd command to change directory to nload*. 之后使用cd命令来进入到nload*目录中 cd nload* -It looks like this on my system. 在我的系统上看起来是这样的 oltjano@baby:/tmp/nload-0.7.4$ -Now run the command to to configure the package for your system. 然后运行下面这个命令来为你的系统配置包 ./configure -Alot of stuff is going to be displayed on your screen. The following screenshot demonstrates how it is going to look like. 此时会有一大波僵尸会在你的屏幕上显示出来,下面的一个屏幕截图描述了它的样子。 ![configuring packages for nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload1.png) -Then compile the nload with the following command. 在上述命令完成之后,通过下面的命令来编译nload。 make ![compiling nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload2.png) -And finally install nload on your linux machine with the following command. 好了,终于....,下载通过以下命令可以将nload安装在你的机器上了。 sudo make install ![installing nload from source](http://blog.linoxide.com/wp-content/uploads/2015/01/nload3.png) -Now that the installation of nload is finished it is time for you to learn how to use it. 安装好nload之后就是时间来让你学习如何使用它了。 -### How to use nload ### ###如何使用nload### -I like to explore so type the following command on your terminal. 我喜欢探索,所以在你的终端输入以下命令. nload -What do you see? 看到了什么? -I get the following. 我得到了下面的结果。 ![running nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.png) -As you can see from the above screenshot I get information on: - -### Incoming Traffic ### - -#### Current download speed #### +如上述截图可以看到,我得到了以下信息: +### 流入量### +#### 当前下载速度#### ![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.1.png) -#### Average download speed #### - +#### 平均下载速度#### ![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.2.png) -#### Minimum download speed #### - +#### 最小下载速度#### ![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.3.png) -#### Maximum download speed #### - +#### 最大下载速度#### ![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.4.png) -#### Total incoming traffic in bytes by default #### - +#### 总的流入量按字节进行显示#### ![](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.5.png) -### Outgoing Traffic ### +### 流出量 ### -The same goes for outgoing traffic. - -#### Some useful options of nload #### - -Use the option +类似的同样适用于流出量 +#### 一些nload游泳的选项#### +使用选项 -u -to set set the type of unit used for the display of traffic numbers. - -The following command will help you to use the MBit/s unit. +用来设置显示流量单元的类型. +下面的命令会帮助你使用MBit/s显示单元 nload -u m -The following screenshot shows the result of the above command. - +下面的屏幕截图显示了上述命令的结果. ![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload5.png) -Try the following command and see the results. +尝试以下命令然后看看有什么结果. nload -u g ![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload6.png) -There is also the option **-U**. According to the manual pages it is same as the option -u but only for an amount of data. I tested this option and to be honest it very helpful when you want to check the total amount of traffic be it incoming or outgoing. +同时还有一个**-U**选项.根据手册描述,该选项基本上与-u选项类似,只是用在合计数据. 我测试了这个命令,老实说,当你需要检查总的流入与流出量时非常有用. nload -U G ![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload7.png) -As you can see from the above screenshot the command **nload -U G** helps to display the total amount of data (incoming or outgoing) in Gbyte. +从上面的截图中可以看到,**nload -U G** 使用Gbyte来显示数据总量. -Another useful option I like to use with nload is the option **-t**. This option is used to refresh interval of display in milliseconds which is 500 by default. - -I like to experiment a little by using the following command. +另外一个我喜欢使用的有用选项是 **-t**. 该选项用来设置刷新显示事件间隔为毫秒,默认值为500毫秒. +我会通过下面的命令做一些小的实验. nload -t 130 -So what the above command does is that it sets the display to refresh every 130 milliseconds. It is recommended to no specify refresh intervals shorter than about 100 milliseconds as nload will generate reports with mistakes during the calculations. +那么上述命令做了什么呢,它讲刷新显示时间间隔设置为130毫秒. 通常推荐不要讲该时间间隔值设置为小于100毫秒,因为nload在计算过程中可能会生成带错的报告. -Another option is **-a**. It is used when you want to set the length in seconds of the time window for average calculation which is 300 seconds by default. +另外的一个选项为 **-a**. 在你想要设置计算平均值的时间窗口秒数长度时使用,默认该值为300秒. -What if you want to monitor a specific network device? It is very easy to do that, just specify the device or the list of devices you want to monitor like shown below. +那么当你想要监控指定的网络设备该如何呢? 非常容易, 想下面这样简单地指定设备或者列出想要监控的设备列表. nload wlan0 ![nload monitoring wlan0 on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload8.png) -The following syntax can help to monitor specific multiple devices. +下面的语法可帮助你监控指定的多个设备. nload [options] device1 device2 devicen -For example use the following command to monitor eth0 and wlan0. +例如,使用下面的命令来监控eth0和eth1. nload wlan0 eth0 -And if you run the command nload without any option it will monitor all auto-detected devices, you can display graphs for each one of them by using the right and left arrow keys. +如果不带选项来运行nload,那么它会监控监控所有自动检测到的设备,你可以通过左右方向键来显示其中的任何一个设备的信息. -------------------------------------------------------------------------------- From 3c88756d2dea2245f8ff1ac271e91e3cf9aca463 Mon Sep 17 00:00:00 2001 From: theo-L Date: Thu, 5 Mar 2015 17:33:04 -0300 Subject: [PATCH 0189/2517] Update 20150121 How to Monitor Network Usage with nload in Linux.md --- ...20150121 How to Monitor Network Usage with nload in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150121 How to Monitor Network Usage with nload in Linux.md b/translated/tech/20150121 How to Monitor Network Usage with nload in Linux.md index 904a7c6861..9b70fa4d8e 100644 --- a/translated/tech/20150121 How to Monitor Network Usage with nload in Linux.md +++ b/translated/tech/20150121 How to Monitor Network Usage with nload in Linux.md @@ -130,7 +130,7 @@ tar归档工具可以用来从磁带或硬盘文档中存储或解压文件, ### 流出量 ### 类似的同样适用于流出量 -#### 一些nload游泳的选项#### +#### 一些nload有用的选项#### 使用选项 -u From 06534f5a2847c8ad0a711d39dbcaffee546b515e Mon Sep 17 00:00:00 2001 From: Ping Date: Fri, 6 Mar 2015 09:29:44 +0800 Subject: [PATCH 0190/2517] Ping Translating --- ...asics--How To Find Maximum Supported RAM By Your System.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md b/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md index 2fed06677b..5761359df6 100644 --- a/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md +++ b/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md @@ -1,3 +1,5 @@ +Translating + Linux Basics: How To Find Maximum Supported RAM By Your System ================================================================================ ![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/RAM-790x527.jpg) @@ -693,4 +695,4 @@ via: https://www.unixmen.com/linux-basics-how-to-find-maximum-supported-ram-by-y 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:https://www.unixmen.com/author/sk/ \ No newline at end of file +[a]:https://www.unixmen.com/author/sk/ From f411c1458d9d547a5bb2916096a30dc78354a7b7 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 6 Mar 2015 11:52:50 +0800 Subject: [PATCH 0191/2517] Translating by ZTinoZ --- .../20150114 What is a good IDE for C or C++ on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md index 7fbac29032..652f228367 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/sources/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -42,13 +42,13 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm8.staticflickr.com/7569/16089881229_98beb0fce3_c.jpg) -Just like Eclipse, impossible to avoid this beast. With navigation via tabs, project management, code outline, change history tracking, and a plethora of tools, [NetBeans][10] might be the most complete IDE out there. I could list for half a page all of its amazing features. But that will tip you off too easily about its main disadvantage, it might be too big. As great as it is, I prefer plugin based software because I doubt that anyone will need both Git and Mercurial integration for the same project. Call me crazy. But if you have the patience to master all of its options, you will be pretty much become the master of IDEs everywhere. +就好像Eclipse一样,这又是一款不得不提的“巨人级”软件。拥有的功能包括通过标签进行导航、项目管理、代码大纲、更改历史追踪和大量工具,[NetBeans][10]可能是最完整的IDE了,我能用半页来列出它所有让人震惊的特色功能。但是这同时也很容易地向你透露了它的主要缺点,它太臃肿了。比起它的强大,我更喜欢基于插件的软件因为我觉得不太会有人为了一个同样的项目同时需要Git和Mercurial相结合来工作,我是不是很疯狂。但是如果你有耐心去掌握它所有的选项,那你差不多无论到哪里都是IDE大师了。 ### 8. KDevelop ### ![](https://farm8.staticflickr.com/7519/15653583824_e412f2ab1f_c.jpg) -For all KDE fans out there, [KDevelop][11] might be the answer to your prayers. With a lot of configuration options, KDevelop is yours if you manage to seize it. Call me superficial but I never really got past the interface. But it's too bad for me as the editor itself packs quite a punch with a lot of navigation options and customizable shortcuts. The debugger is also very advanced and will take a bit of practice to master. However, this patience will be rewarded with this very flexible IDE's full power. And it gets special credits for its amazing embedded documentation. +说到这,肯定照顾到所有的KDE粉丝,[KDevelop][11]会是你希望的答案。它拥有许多配置选项,如果你设法去征服KDevelop,那它就是你的。你们说我肤浅,但是我真的从来没有深入过它界面以外的层次了。But it's too bad for me as the editor itself packs quite a punch with a lot of navigation options and customizable shortcuts. 它的调试器也是相当高级,要去练习掌握。然而,这样的耐心是有回报的,就是能领会到这款灵活的IDE的全部能力。And it gets special credits for its amazing embedded documentation. ### 9. CodeLite ### From 164c71e43362307459dff2e6a2b359bde5f27cd8 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 6 Mar 2015 16:36:56 +0800 Subject: [PATCH 0192/2517] =?UTF-8?q?20150306-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sed Install It In Ubuntu And Linux Mint.md | 49 +++++ ...lftp--A Simple Command line FTP Program.md | 174 ++++++++++++++++++ .../tech/20150306 Nmap--Not Just for Evil.md | 41 +++++ 3 files changed, 264 insertions(+) create mode 100644 sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md create mode 100644 sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md create mode 100644 sources/tech/20150306 Nmap--Not Just for Evil.md diff --git a/sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md b/sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md new file mode 100644 index 0000000000..8aef952736 --- /dev/null +++ b/sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md @@ -0,0 +1,49 @@ +Pinta 1.6 Released! Install It In Ubuntu And Linux Mint +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Pinta_Ubuntu_Linux.jpeg) + +[Pinta][1] is a free and open source drawing application which is very popular among Linux users. It won’t be incorrect to term it as an **open source alternative to Microsoft Paint**. Pinta is available for all major platforms such as Linux, Windows and Mac OS X. + +While Gimp is popular as full featured image editing software, Pinta is more of a paint and drawing tool. I have used it extensively in my tutorials for drawing arrows and curves on the screenshots and I can say that it’s my favorite drawing app in Linux. + +### New features in Pinta 1.6 ### + +After over an year, Pinta has released version 1.6, fixing over 50 bugs and introducing some new features. New features are as following: + +- Line tool now supports drawing curves and arrows +- Shapes can be edited even after being drawn +- All shape tools now support drawing dashed lines +- All selection tools now support the Union, Exclude, Xor, and Intersection modes +- Add-in manager now consists of ‘add ins’ +- New options in command line usage + +New version also fixes the annoying bug where you [cannot open a file with Pinta in right click menu option][2]. You can read all the changes in the [release note][3]. + +### Install Pinta 1.6 in Ubuntu and Linux Mint ### + +Pinta 1.5 is available in Ubuntu 14.04, 14.10, Linux Mint 17, elementary OS. If you want to install the latest version 1.6, you can use the official PPA from Pinta team. Don’t worry if you have Pinta 1.5 installed already. Installing it again will upgrade the version. + +Open a terminal and use the following commands: + + sudo add-apt-repository ppa:pinta-maintainers/pinta-stable + sudo apt-get update + sudo apt-get install pinta + +To download the source code or to get the installation files for Windows and Mac OS X, check the [download page of Pinta][4]. In a related post, you can also check out [best photo applications for Linux][5]. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/pinta-1-6-ubuntu-linux-mint/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://pinta-project.com/ +[2]:http://itsfoss.com/add-application-list-open-applications-ubuntu-1310/ +[3]:http://pinta-project.com/releases/1-6 +[4]:http://pinta-project.com/releases +[5]:http://itsfoss.com/image-applications-ubuntu-linux/ \ No newline at end of file diff --git a/sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md b/sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md new file mode 100644 index 0000000000..b4fe88cd12 --- /dev/null +++ b/sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md @@ -0,0 +1,174 @@ +How to Setup lftp - A Simple Command line FTP Program +================================================================================ +Hi everyone, this article is about Lftp and how we can install Lftp in our Linux Operating System. [Lftp][1] is a command line based File Transfer Software also known as FTP Client which was developed by Alexander Lukyanov and was distributed as GNU General Public License. Besides FTP, it also supports FTPS, HTTP, HTTPS, HFTP, FISH, and SFTP. The program also supports FXP, allowing for data transfers between two FTP servers bypassing the client machine. + +It has some awesome advanced features such as recursively mirroring entire directory trees and resuming downloads. Transfers can be scheduled for execution at a later time, bandwidth can be throttled, transfer queues can be created, and Unix shell-like job control is supported. The client can also be used interactively or automated with scripts. + +### Installing Lftp ### + +Before we try to run lftp, we have make sure that it is properly installed in our Linux Distribution. Here are some commands mentioned for installing lftp in the list common distribution of Linux. + +**On Ubuntu 14.04 LTS** + +In Ubuntu 14.04 LTS and its derivatives, we can install lftp using apt manager. So, to install it, we'll need to run the following commands in a shell or a terminal under sudo privilege. + + $ sudo apt-get install lftp + +![ubuntu install lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/ubuntu-install-lftp.png) + +**On CentOS/Fedora/RHEL** + +As lftp is also available in the repository of Fedora, CentOS and RHEL, we can use **yum** manager to install it. + + $ sudo yum install lftp + +![fedora lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/fedora-lftp.png) + +**On Arch Linux** + +It is also available in Arch Linux Package Repository so, we can simply use pacman to install it. + + $ sudo pacman -S lftp + +![archlinux install lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/archlinux-install-lftp.png) + +**On OpenSuse** + +Zypper, package management software for OpenSuse can be used to install lftp. Here is the command with which one can install it on their OpenSuse machine. + + $ sudo zypper install lftp + +![opensuse lftp install](http://blog.linoxide.com/wp-content/uploads/2015/03/lftp_install.png) + +### Logging in ### + +To login to a ftp server or sftp server, we'll first need to know about the required credential for the login like username, password, ports. + +After that, we'll want to login using lftp client as basic usage. + + $ lftp ftp://linoxide@localhost + +![ftp login](http://blog.linoxide.com/wp-content/uploads/2015/03/lftp-login.png) + +If we need to point a port to the login then, we'll need to add port as shown below. + + $ lftp ftp://linoxide@localhost:21 + +![ftp login with ports](http://blog.linoxide.com/wp-content/uploads/2015/03/lftp-login-port.png) + +### Navigation ### + +We can use **ls** to list files and directories, **cd** to enter into a directory. + +![ls and cd](http://blog.linoxide.com/wp-content/uploads/2015/03/ls-cd-lftp.png) + +### Uploading and Download Files ### + +We can use **pget** for downloading files from the remote server. + + > pget linspeed.svg + +![pget lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/pget-lftp.png) + +We can use **put** for uploading files to the remote server. + + > put linoxide.tar + +![upload with put](http://blog.linoxide.com/wp-content/uploads/2015/03/put-upload.png) + +To resume partially downloaded files/directories, we will use the -c switch: + + > mirror -c Directory + + >pget -c linoxide.tar + + > put -c upload.tar + +### Using Mirror ### + +We can use mirror to download the whole directory pointed as the source. + + > mirror remote local + +![download with mirror](http://blog.linoxide.com/wp-content/uploads/2015/03/mirror.png) + +There is also reverse mirror (mirror -R) which uploads or updates a directory tree on server. + + > mirror -R local remote + +![upload or update with mirror reverse](http://blog.linoxide.com/wp-content/uploads/2015/03/mirror-reverse.png) + +To resume partially downloaded files/directories, we will use the -c switch: + + > mirror -c Directory + +### To Queue Items to Download ### + +We can use queue option with lftp so that we can download selected files in a queue one by one as there is an option in GUI based clients to select and download in a queue. Here's an example on it. + +To prevent queue from auto transferring while you add to it : + + > queue stop + +Now, we'll add them into queue. + + > queue mirror "directory" + + > queue pget "file.tar" + +After the queue has been added, we should run queue start command. + + > queue start + +To remove the entire queue run the following command. + + > queue -d + +### Segmented Downloading ### + +Here, in this example we are segmenting files into 3 segments, one can change it according to their own need. + +A pget command using segmentation is **pget -n 3 file.tar**, where 3 is the number of segments. + + > pget -n 3 file.tar + +A mirror command using segmentation is **mirror --use-pget-n=3 directory**, where 3 is the number of segments. + + > mirror --use-pget-n=3 linxoxide + +We can use jobs -v to see the speeds of the individual segments as well as the total speed. + +### To Stop, Resume or Kill a Transfer ### + +To cancel a transfer we can press Ctrl+c . And to resume a download we can use the -c (--continue) switch as shown below. + + > mirror -c directory + +And to kill an active transfer we should run **kill** and to kill and delete all we'll need to run **kill all** as shown below. + + > kill + + > kill all + +### Exiting ### + +To quit from lftp, we should run exit command in the terminal or inside lftp interface. + + > exit + +### Conclusion ### + +Hurray! We have successfully installed lftp and learned some basic major ways to use it. lftp is an awesome command line ftp client which supports a lot of additional functionality and cool features. It has a lot stuffs more than the other common ftp client. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy lftp :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-lftp-command-line-ftp/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://lftp.yar.ru/ \ No newline at end of file diff --git a/sources/tech/20150306 Nmap--Not Just for Evil.md b/sources/tech/20150306 Nmap--Not Just for Evil.md new file mode 100644 index 0000000000..8b7428f762 --- /dev/null +++ b/sources/tech/20150306 Nmap--Not Just for Evil.md @@ -0,0 +1,41 @@ +Nmap—Not Just for Evil! +================================================================================ +If SSH is the Swiss Army knife of the system administration world, Nmap is a box of dynamite. It's really easy to misuse dynamite and blow your foot off, but it's also a very powerful tool that can do jobs that are impossible without it. + +When most people think of Nmap, they think of scanning servers, looking for open ports to attack. Through the years, however, that same ability is incredibly useful when you're in charge of the server or computer in question. Whether you're trying to figure out what kind of server is using a specific IP address in your network or trying to lock down a new NAS device, scanning networks is incredibly useful. + +Figure 1 shows a network scan of my QNAP NAS. The only thing I use the unit for is NFS and SMB file sharing, but as you can tell, it has a ton of ports wide open. Without Nmap, it would be difficult to figure out what the machine was running. + +![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11825nmapf1.jpg) + +### Figure 1. Network Scan ### + +Another incredibly useful way to use Nmap is to scan a network. You don't even have to have root access for that, and it's as simple as specifying the network block you want to scan. For example, typing: + + nmap 192.168.1.0/24 + +will scan the entire range of 254 possible IP addresses on my local network and let me know which are pingable, along with which ports are open. If you've just plugged in a new piece of hardware, but don't know what IP address it grabbed via DHCP, Nmap is priceless. For example, the above command revealed this on my network: + + Nmap scan report for TIVO-8480001903CCDDB.brainofshawn.com (192.168.1.220) + Host is up (0.0083s latency). + Not shown: 995 filtered ports + PORT STATE SERVICE + 80/tcp open http + 443/tcp open https + 2190/tcp open tivoconnect + 2191/tcp open tvbus + 9080/tcp closed glrpc + +This not only tells me the address of my new Tivo unit, but it also shows me what ports it has open. Thanks to its reliability, usability and borderline black hat abilities, Nmap gets this month's Editors' Choice award. It's not a new program, but if you're a Linux user, you should be using it! + +-------------------------------------------------------------------------------- + +via: http://www.linuxjournal.com/content/nmap%E2%80%94not-just-evil + +作者:[Shawn Powers][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxjournal.com/users/shawn-powers \ No newline at end of file From eec57673f9643a7c30c455f75537c814469641db Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Fri, 6 Mar 2015 16:56:43 +0800 Subject: [PATCH 0193/2517] Delete 20150126 CD Audio Grabbers--Graphical Based.md --- ...0126 CD Audio Grabbers--Graphical Based.md | 129 ------------------ 1 file changed, 129 deletions(-) delete mode 100644 sources/share/20150126 CD Audio Grabbers--Graphical Based.md diff --git a/sources/share/20150126 CD Audio Grabbers--Graphical Based.md b/sources/share/20150126 CD Audio Grabbers--Graphical Based.md deleted file mode 100644 index 8865d5d810..0000000000 --- a/sources/share/20150126 CD Audio Grabbers--Graphical Based.md +++ /dev/null @@ -1,129 +0,0 @@ -Translating By H-mudcup -CD Audio Grabbers - Graphical Based -================================================================================ -CD audio grabbers are designed to extract ("rip") the raw digital audio (in a format commonly called CDDA) from a compact disc to a file or other output. This type of software enables a user to encode the digital audio into a variety of formats, and download and upload disc info from freedb, an internet compact disc database. - -Is copying CDs legal? Under US copyright law, converting an original CD to digital files for personal use has been cited as qualifying as 'fair use'. However, US copyright law does not explicitly allow or forbid making copies of a personally-owned audio CD, and case law has not yet established what specific scenarios are permitted as fair use. The copyright position is much clearer in the UK. From 2014 it become legal for UK citizens to make copies of CDs, MP3s, DVD, Blu-rays and e-books. This only applies if the individual owns the physical media being ripped, and the copy is made only for their own private use. For other countries in the European Union, member nations can allow a private copy exception too. - -If you are not sure what the position is for the country you live in, please check your local copyright law to make sure that you are on the right side of the law before using the software featured in this two page article. - -To some extent, it may seem a bit of a chore to rip CDs. Streaming services like Spotify and Google Play Music offer access to a huge library of music in a convenient form, and without having to rip your CD collection. However, if you already have a large CD collection, it is still desirable to be able to convert your CDs to enjoy on mobile devices like smartphones, tablets, and portable MP3 players. - -This two page article highlights my favorite audio CD grabbers. I pick the best four graphical audio grabbers, and the best four console audio grabbers. All of the utilities are released under an open source license. - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/freac.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-freac.png) - -fre:ac is an open source audio converter and CD ripper that supports a wide range of popular formats and encoders. The utility currently converts between MP3, MP4/M4A, WMA, Ogg Vorbis, FLAC, AAC, WAV and Bonk formats. It comes with several different presents for the LAME encoder. - -#### Features include: #### - -- Easy to learn and use -- Converter for MP3, MP4/M4A, WMA, Ogg Vorbis, FLAC, AAC, WAV and Bonk formats -- Integrated CD ripper with CDDB/freedb title database support -- Multi-core optimized encoders to speed up conversions on modern PCs -- Full Unicode support for tags and file names -- Easy to learn and use, still offers expert options when you need them -- Joblists -- Can use Winamp 2 input plugins -- Multilingual user interface available in 41 languages - -- Website: [freac.org][1] -- Developer: Robert Kausch -- License: GNU GPL v2 -- Version Number: 20141005 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/Audex.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Audex.png) - -Audex is an easy to use open source audio CD ripping application. Whilst it is in a fairly early stage of development, this KDE desktop tool is stable, slick and simple to use. - -The assistant is able to create profiles for LAME, OGG Vorbis (oggenc), FLAC, FAAC (AAC/MP4) and RIFF WAVE. Beyond the assistant you can define your own profile, which means, that Audex works together with commmand line encoders in general. - -#### Features include: #### - -- Extract with CDDA Paranoia -- Extract and encode run parallel -- Filename editing with local and remote CDDB/FreeDB database -- Submit new entries to CDDB/FreeDB database -- Metadata correction tools like capitalize etc -- Multi-profile extraction (with one commandline-encoder per profile) -- Fetch covers from the internet and store them in the database -- Create playlists, cover and template-based-info files in target directory -- Create extraction and encoding protocols -- Transfer files to a FTP-server -- Internationalization support - -- Website: [kde.maniatek.com/audex][2] -- Developer: Marco Nelles -- License: GNU GPL v3 -- Version Number: 0.79 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/SoundJuicer.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-SoundJuicer.png) - -Sound Juicer is a lean CD ripper using GTK+ and GStreamer. It extracts audio from CDs and converts it into audio files. Sound Juicer can also play audio tracks directly from the CD, offering a preview before ripping. - -It supports any audio codec supported by a GStreamer plugin, including MP3, Ogg Vorbis, FLAC, and uncompressed PCM formats. - -It is an established part of the GNOME desktop environment. - -#### Features include: #### - -- Automatic track tagging via CDDB -- Encoding to ogg / vorbis, FLAC and raw WAV -- Easy to configure encoding path -- Multiple genres -- Internationalization support - -- Website: [burtonini.com][3] -- Developer: Ross Burton -- License: GNU GPL v2 -- Version Number: 3.14 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/ripperX.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-ripperX.png) - -ripperX is an open source graphical interface for ripping CD audio tracks and encoding them to Ogg, MP2, MP3, or FLAC formats. It's goal is to be easy to use, requiring only a few mouse clicks to convert an entire album. It supports CDDB lookups for album and track information. - -It uses cdparanoia to convert (i.e. "rip") CD audio tracks to WAV files, and then calls the Vorbis/Ogg encoder oggenc to convert the WAV to an OGG file. It can also call flac to perform lossless compression on the WAV file, resulting in a FLAC file. - -#### Features include: #### - -- Very simple to use -- Rip audio CD tracks into WAV, MP3, OGG, or FLAC files -- Supports CDDB lookups -- Supports ID3v2 tags -- Pause the ripping process - -- Website: [sourceforge.net/projects/ripperx][4] -- Developer: Marc André Tanner -- License: MIT/X Consortium License -- Version Number: 2.8.0 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20150125043738417/AudioGrabbersGraphical.html - -作者:Frazer Kline -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.freac.org/ -[2]:http://kde.maniatek.com/audex/ -[3]:http://burtonini.com/blog/computers/sound-juicer -[4]:http://sourceforge.net/projects/ripperx/ From e8c77a87c7f500997fe01991a6678dffa12c5394 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Fri, 6 Mar 2015 16:57:32 +0800 Subject: [PATCH 0194/2517] Update and rename translated/share to translated/share/20150126 CD Audio Grabbers--Graphical Based.md --- ...0126 CD Audio Grabbers--Graphical Based.md | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 translated/share/20150126 CD Audio Grabbers--Graphical Based.md diff --git a/translated/share/20150126 CD Audio Grabbers--Graphical Based.md b/translated/share/20150126 CD Audio Grabbers--Graphical Based.md new file mode 100644 index 0000000000..45254072cb --- /dev/null +++ b/translated/share/20150126 CD Audio Grabbers--Graphical Based.md @@ -0,0 +1,129 @@ + +CD音频抓取器——基于图形界面 +================================================================================ +CD音频抓取器是为了从光盘中提取(“剖出”)原始数字音频(它在一个通常被称为CDDA的格式中)并把它保存成文件或以其他形式输出而设计的。这类软件使用户能把数字音频编码成各种格式,并能下载和上传在线CD目录服务——一个在线的光盘数据库——中的光盘信息。 + +复制CD合法吗?在美国版权法中,把一个原始CD转换成数字文件用于个人使用在被引用时等同于‘合理使用’。然而,美国版权法并没有明确的允许或禁止拷贝私人音频CD,而且判例法还没有确立出在具体的哪种情况下可以视为合理使用。在英国版权的位置更清晰一些。从2014年开始,英国公民制造CD,MP3,DVD,蓝光和电子书的行为成为合法行为。这仅适用于这个人拥有被采集的媒体的实体,并且复制品仅用于他们个人使用。对于欧盟的其他国家,成员国可以允许私人复制这种特例。 + +如果你不确定在你生活的国家里版权处于什么位置,在你使用这两页文章中所列举的软件前请查询本地的版权法以确定你处在合法的一边。 + +在某种程度上,提取CD音轨看起来有点多余。如Spotify和Google Play Music这类流服务提供了一个巨大的以通用格式存在的音乐的库,无需采集你的CD集。但是,如果你已将收藏了一个数量巨大的CD集。能把你的CD转换成可以在便携设备如智能手机、平板和便携式MP3播放器上播放的格式仍然是个诱人的选择。 + +这两页文章推荐了我最喜欢的音频CD抓取器。我挑了四个最好的图形界面的音频抓取器,四个最好的控制台音频抓取器。所有这些应用程序都是在开源许可下发行的。 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/freac.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-freac.png) + +fre:ac是个开源音频转换器和CD提取器,支持很多种流行格式和编码器。目前这个应用可以在MA3、MP4/M4A、WMA、Ogg Vorbis、FLAC、AAC、WAV和Bonk格式间转换。这来源于几种不同形式的LAME编码器。 + +#### 功能包括: #### + +- 易学易用 +- MP3、MP4/M4A、WMA、Ogg Vorbis、FLAC、AAC、WAV和Bonk格式转换器 +- 集成了CDDB/freedb标题数据库支持的CD提取器 +- 多核优化的编码器加速了现代PC上的转换速度 +- 对于标签和文件名称的全Unicode支持 +- 易学易用,当你需要时还提供专家级选项 +- 任务列表 +- 可以使用Winamp 2加入附件 +- 多语言用户界面可以使用41种语言 + +- 网址: [freac.org][1] +- 开发人员:Robert Kausch +- 许可证: GNU GPL v2 +- 版本号: 20141005 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/Audex.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Audex.png) + +Audex是个简单易用的开源音频CD提取应用。虽然它还处于早期开发阶段,这个KDE桌面工具足够稳定、聪明和简单,可以使用。 + +助手可以给LAME、OGG Vorbis(oggenc)、FLAC、FAAC(AAC/MP4)和RIFF WAVE创建配置文件。除去这个助手,你可以定义你自己的配置文件,这意味着,Audex适用于大部分的命令行编码器。 + +#### 功能包括: #### + +- 可提取CDDA Paranoia +- 提取和编码同时进行 +- 文件名采用本地和远程CDDB/FreeDB数据库 +- 提供新的CDDB/FreeDB数据库入口 +- 类似capitalize的元数据纠正工具 +- 多配置文件提取(每个配置文件文件有一个命令行编码器) +- 从互联网上抓取封面并将他们存在数据库中 +- 在目标目录中创建播放列表、封面和基于模板的信息文件 +- 创建提取和编码协议 +- 将文件传送到FTP服务器 +- 支持国际化 + +- 网址: [kde.maniatek.com/audex][2] +- 开发人员: Marco Nelles +- 许可证: GNU GPL v3 +- 版本号: 0.79 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/SoundJuicer.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-SoundJuicer.png) + +Sound Juicer是个使用GTK+和GStreamer的轻量级CD提取器。它从CD中提取音频并把它转换成音频文件。Sound Juicer还可以直接播放CD中的音轨,在提取前提供预览。 + +由于GStreamer插件它支持任何音频编码,包括 MP3、Ogg Vorbis、FLAC和未压缩的PCM格式。 + +它是GNOME桌面环境已建成的一部分。 + +#### 功能包括: #### + +- 自动通过CDDB给音轨加标签 +- 可编码成ogg/vorbis、FLAC和原始WAV +- 编码路径的设置很简单 +- 多种流派 +- 国际化支持 + +- 网址:[burtonini.com][3] +- 开发人员: Ross Burton +- 许可证:GNU GPL v2 +- 版本号:3.14 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/ripperX.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-ripperX.png) + +ripperX是个开源的图形交互界面,用于提取CD音轨并把他们编码成Ogg、MP2、MP3或FLAC格式。它的目的是容易使用,只需要点几下鼠标就能转换整张专辑。它支持在CDDB寻找专辑和音轨信息。 + +他使用cdparanoia把CD音轨转换(也就是“提取”)成WAV文件,然后访问Vorbis/Ogg编码器oggenc把WAV文件转换成OGG文件。它还可以访问flac让WAV文件有无损压缩的表现,制成FLAC文件。 + +#### 功能包括: #### + +- 非常简单易用 +- 可以把CD音轨提取成WAV、MP3、OGG或FLAC文件 +- 支持CDDB查找 +- 支持ID3v2标签 +- 可暂停提取进程 + +- 网址:[sourceforge.net/projects/ripperx][4] +- 开发人员:Marc André Tanner +- 许可证:MIT/X Consortium License +- 版本号:2.8.0 + +-------------------------------------------------------------------------------- + +转自:http://www.linuxlinks.com/article/20150125043738417/AudioGrabbersGraphical.html + +作者:Frazer Kline +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.freac.org/ +[2]:http://kde.maniatek.com/audex/ +[3]:http://burtonini.com/blog/computers/sound-juicer +[4]:http://sourceforge.net/projects/ripperx/ From 53f22ab1f8b63b43e7778aa5cef94dd05c560f6d Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 6 Mar 2015 20:40:30 +0800 Subject: [PATCH 0195/2517] translating --- ...-removal script returned error exit status 1' In Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md b/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md index f3f262dfbc..65fe0186b2 100644 --- a/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md +++ b/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md @@ -1,3 +1,5 @@ +Translating---geekpi + Linux Basics: How To Fix “E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1″ In Ubuntu ================================================================================ ![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/04/ubuntu-790x558.png) @@ -42,4 +44,4 @@ via: https://www.unixmen.com/linux-basics-how-to-fix-e-varcacheaptarchives-subpr 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:https://www.unixmen.com/author/sk/ -[1]:https://www.virtualbox.org/wiki/Downloads \ No newline at end of file +[1]:https://www.virtualbox.org/wiki/Downloads From 14182cba36a043c24505f130a0cdeeacc0e7ad31 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 6 Mar 2015 20:45:59 +0800 Subject: [PATCH 0196/2517] translated --- ...returned error exit status 1' In Ubuntu.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) rename {sources => translated}/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md (65%) diff --git a/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md b/translated/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md similarity index 65% rename from sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md rename to translated/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md index 65fe0186b2..b086684614 100644 --- a/sources/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md +++ b/translated/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md @@ -1,44 +1,42 @@ -Translating---geekpi - -Linux Basics: How To Fix “E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1″ In Ubuntu +Linux 基础:如何修复Ubuntu上“E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1 ”的错误 ================================================================================ ![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/04/ubuntu-790x558.png) -Today, I got a problem while updating VirtualBox to the latest version. +今天,我在更新VirtualBox新版本的时候遇到了一个问题。 > E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1 ![](https://www.unixmen.com/wp-content/uploads/2015/03/Update-Manager_0011.png) -### Solution: ### +### 解决: ### -I googled a bit and found the solution. Here is what I did to solve the problem. +我google了以下并找到了方法。下面是我解决的方法。 sudo apt-get clean sudo apt-get update && sudo apt-get upgrade -This will almost fix the problem. +这样几乎可以修复这个问题了。 -If you still end up with the same error, then try the following commands: +如果你仍然有问题,那就试试下面的命令: sudo dpkg --configure -a sudo apt-get -f install -Or, you can manually download the latest version from [Oracle VirtualBox][1] site and install it as shown below. +或者你可以按照下面的方法从[Oracle VirtualBox][1]官网下载最新版本并安装。 sudo apt-get update sudo dpkg -i virtualbox-4.3_4.3.24-98716~Ubuntu~raring_amd64.deb sudo apt-get -f install sudo apt-get autoclean && sudo apt-get autoremove -Cheers! +干杯! -------------------------------------------------------------------------------- via: https://www.unixmen.com/linux-basics-how-to-fix-e-varcacheaptarchives-subprocess-new-pre-removal-script-returned-error-exit-status-1-in-ubuntu/ 作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From be055ec64477a227985d3e14ad744e1837358b1c Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 6 Mar 2015 22:42:57 +0800 Subject: [PATCH 0197/2517] translating by martin qi --- sources/tech/20150306 Nmap--Not Just for Evil.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150306 Nmap--Not Just for Evil.md b/sources/tech/20150306 Nmap--Not Just for Evil.md index 8b7428f762..a386afca4c 100644 --- a/sources/tech/20150306 Nmap--Not Just for Evil.md +++ b/sources/tech/20150306 Nmap--Not Just for Evil.md @@ -1,3 +1,5 @@ +translating by martin. + Nmap—Not Just for Evil! ================================================================================ If SSH is the Swiss Army knife of the system administration world, Nmap is a box of dynamite. It's really easy to misuse dynamite and blow your foot off, but it's also a very powerful tool that can do jobs that are impossible without it. @@ -38,4 +40,4 @@ via: http://www.linuxjournal.com/content/nmap%E2%80%94not-just-evil 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.linuxjournal.com/users/shawn-powers \ No newline at end of file +[a]:http://www.linuxjournal.com/users/shawn-powers From 9a4f50fa5b63d8a216fad302ddd25b767c412498 Mon Sep 17 00:00:00 2001 From: theo-l Date: Fri, 6 Mar 2015 12:46:20 -0300 Subject: [PATCH 0198/2517] translating --- ... use yum to download a RPM package without installing it.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md b/sources/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md index f1663888c8..238266819f 100644 --- a/sources/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md +++ b/sources/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md @@ -1,3 +1,4 @@ +theo-l translating Linux FAQs with Answers--How to use yum to download a RPM package without installing it ================================================================================ > **Question**: I want to download a RPM package from Red Hat's standard repositories. Can I use yum command to download a RPM package without installing it? @@ -53,4 +54,4 @@ via: http://ask.xmodulo.com/yum-download-rpm-package.html 译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 224eaea45760dedce74a3be296d851fbf99e70e9 Mon Sep 17 00:00:00 2001 From: theo-l Date: Fri, 6 Mar 2015 13:08:48 -0300 Subject: [PATCH 0199/2517] translated --- ...oad a RPM package without installing it.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) rename {sources => translated}/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md (61%) diff --git a/sources/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md b/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md similarity index 61% rename from sources/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md rename to translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md index 238266819f..205d976529 100644 --- a/sources/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md +++ b/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md @@ -1,57 +1,72 @@ theo-l translating Linux FAQs with Answers--How to use yum to download a RPM package without installing it +Linux 常见问题解答--如何使用yum来下载RPM包而不进行安装. ================================================================================ > **Question**: I want to download a RPM package from Red Hat's standard repositories. Can I use yum command to download a RPM package without installing it? +> **问题**:我想从Red Hat's的标准仓库中下载一个RPM包,我能使用yum命令来下载一个RPM包但是不进行安装吗? yum is the default package manager for Red Hat based systems, such as CentOS, Fedora or RHEL. Using yum, you can install or update a RPM package while resolving its package dependencies automatically. What if you want to download a RPM package without installing it on the system? For example, you may want to archive some RPM packages for later use or to install them on another machine. +yum是基于Red Hat的系统(如CentOS,Fedora,RHEl)上的默认包管理器.使用yum,你可以安装或者更新一个RPM包,并且他会自动解决包依赖关系.但是如果你只想将一个RPM包下载到你的系统上该怎么办呢? 例如,你可能想要获取一些RPM包在以后使用,或者将他们安装在另外的机器上. Here is how to download a RPM package from yum repositories. +这里说明了如何从yum仓库上下载一个RPM包. ### Method One: Yum ### +### 方法一:yum### The yum command itself can be used to download a RPM package. The standard yum command offers '--downloadonly' option for this purpose. +yum命令本身就可以用来下载一个RPM包,标准的yum命令提供了`--downloadonly(只下载)`的选项来达到这个目的. $ sudo yum install --downloadonly By default, a downloaded RPM package will be saved in: +默认情况下,一个下载的RPM包会保存在下面的目录中: /var/cache/yum/x86_64/[centos/fedora-version]/[repository]/packages In the above, [repository] is the name of the repository (e.g., base, fedora, updates) from which the package is downloaded. +以上的[repository]表示下载包的来源仓库的名称(例如,base,fedora,updates) If you want to download a package to a specific directory (e.g., /tmp): +如果你想要讲一个包下载到一个指定的目录(如/tmp): $ sudo yum install --downloadonly --downloaddir=/tmp Note that if a package to download has any unmet dependencies, yum will download all dependent packages as well. None of them will be installed. +注意,如果下载的包包含了任意没有满足的依赖关系,yum将会把所有的依赖关系包下载,但是都不会被安装. One important thing is that on CentOS/RHEL 6 or earlier, you will need to install a separate yum plugin (called yum-plugin-downloadonly) to be able to use '--downloadonly' command option: +另外一个重要的事情时,在CentOS/RHEL 6或更早期的版本中,你需要安装一个单独yum插件(名称为 yum-plugin-downloadonly)才能使用`--downloadonly`命令选项: $ sudo yum install yum-plugin-downloadonly Without this plugin, you will get the following error with yum: +如果没有该插件,你会在使用yum时得到以下错误: Command line error: no such option: --downloadonly ![](https://farm9.staticflickr.com/8627/15571201803_38390aae75_c.jpg) ### Method Two: Yumdownloader ### - +### 方法二: Yumdownloader### Another method to download a RPM package is via a dedicated package downloader tool called yumdownloader. This tool is part of yum-utils package which contains a suite of helper tools for yum package manager. +另外一个下载RPM包的方法就是通过一个专门的包下载工具--yumdownloader. 这个工具时yum工具包(包含了用来进行yum包管理的帮助工具套件)的子集. $ sudo yum install yum-utils To download a RPM package: +下载一个RPM包: $ sudo yumdownloader The downloaded package will be saved in the current directory. You need to use root privilege because yumdownloader will update package index files during downloading. Unlike yum command above, none of the dependent package(s) will be downloaded. +下载的包会被保存在当前目录中.你需要使用root权限,因为yumdownloader会在下载过程中更新包索引文件.与yum命令不同的是,任何依赖包不会被下载. -------------------------------------------------------------------------------- via: http://ask.xmodulo.com/yum-download-rpm-package.html -译者:[译者ID](https://github.com/译者ID) +译者:[theo-l](https://github.com/theo-l) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 53ca199a117bc343a71af9a756b22c5d303ddef8 Mon Sep 17 00:00:00 2001 From: theo-l Date: Fri, 6 Mar 2015 13:10:25 -0300 Subject: [PATCH 0200/2517] remove english --- ...nload a RPM package without installing it.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md b/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md index 205d976529..a9f1019c19 100644 --- a/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md +++ b/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md @@ -1,65 +1,48 @@ -theo-l translating -Linux FAQs with Answers--How to use yum to download a RPM package without installing it Linux 常见问题解答--如何使用yum来下载RPM包而不进行安装. ================================================================================ -> **Question**: I want to download a RPM package from Red Hat's standard repositories. Can I use yum command to download a RPM package without installing it? > **问题**:我想从Red Hat's的标准仓库中下载一个RPM包,我能使用yum命令来下载一个RPM包但是不进行安装吗? -yum is the default package manager for Red Hat based systems, such as CentOS, Fedora or RHEL. Using yum, you can install or update a RPM package while resolving its package dependencies automatically. What if you want to download a RPM package without installing it on the system? For example, you may want to archive some RPM packages for later use or to install them on another machine. yum是基于Red Hat的系统(如CentOS,Fedora,RHEl)上的默认包管理器.使用yum,你可以安装或者更新一个RPM包,并且他会自动解决包依赖关系.但是如果你只想将一个RPM包下载到你的系统上该怎么办呢? 例如,你可能想要获取一些RPM包在以后使用,或者将他们安装在另外的机器上. -Here is how to download a RPM package from yum repositories. 这里说明了如何从yum仓库上下载一个RPM包. -### Method One: Yum ### ### 方法一:yum### -The yum command itself can be used to download a RPM package. The standard yum command offers '--downloadonly' option for this purpose. yum命令本身就可以用来下载一个RPM包,标准的yum命令提供了`--downloadonly(只下载)`的选项来达到这个目的. $ sudo yum install --downloadonly -By default, a downloaded RPM package will be saved in: 默认情况下,一个下载的RPM包会保存在下面的目录中: /var/cache/yum/x86_64/[centos/fedora-version]/[repository]/packages -In the above, [repository] is the name of the repository (e.g., base, fedora, updates) from which the package is downloaded. 以上的[repository]表示下载包的来源仓库的名称(例如,base,fedora,updates) -If you want to download a package to a specific directory (e.g., /tmp): 如果你想要讲一个包下载到一个指定的目录(如/tmp): $ sudo yum install --downloadonly --downloaddir=/tmp -Note that if a package to download has any unmet dependencies, yum will download all dependent packages as well. None of them will be installed. 注意,如果下载的包包含了任意没有满足的依赖关系,yum将会把所有的依赖关系包下载,但是都不会被安装. -One important thing is that on CentOS/RHEL 6 or earlier, you will need to install a separate yum plugin (called yum-plugin-downloadonly) to be able to use '--downloadonly' command option: 另外一个重要的事情时,在CentOS/RHEL 6或更早期的版本中,你需要安装一个单独yum插件(名称为 yum-plugin-downloadonly)才能使用`--downloadonly`命令选项: $ sudo yum install yum-plugin-downloadonly -Without this plugin, you will get the following error with yum: 如果没有该插件,你会在使用yum时得到以下错误: Command line error: no such option: --downloadonly ![](https://farm9.staticflickr.com/8627/15571201803_38390aae75_c.jpg) -### Method Two: Yumdownloader ### ### 方法二: Yumdownloader### -Another method to download a RPM package is via a dedicated package downloader tool called yumdownloader. This tool is part of yum-utils package which contains a suite of helper tools for yum package manager. 另外一个下载RPM包的方法就是通过一个专门的包下载工具--yumdownloader. 这个工具时yum工具包(包含了用来进行yum包管理的帮助工具套件)的子集. $ sudo yum install yum-utils -To download a RPM package: 下载一个RPM包: $ sudo yumdownloader -The downloaded package will be saved in the current directory. You need to use root privilege because yumdownloader will update package index files during downloading. Unlike yum command above, none of the dependent package(s) will be downloaded. 下载的包会被保存在当前目录中.你需要使用root权限,因为yumdownloader会在下载过程中更新包索引文件.与yum命令不同的是,任何依赖包不会被下载. -------------------------------------------------------------------------------- From 3da9be0f119bf157ed030523271f559215db6365 Mon Sep 17 00:00:00 2001 From: theo-l Date: Fri, 6 Mar 2015 13:16:29 -0300 Subject: [PATCH 0201/2517] translating --- sources/tech/20150306 Nmap--Not Just for Evil.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150306 Nmap--Not Just for Evil.md b/sources/tech/20150306 Nmap--Not Just for Evil.md index 8b7428f762..3d142eea6c 100644 --- a/sources/tech/20150306 Nmap--Not Just for Evil.md +++ b/sources/tech/20150306 Nmap--Not Just for Evil.md @@ -1,3 +1,4 @@ +theo-l translating Nmap—Not Just for Evil! ================================================================================ If SSH is the Swiss Army knife of the system administration world, Nmap is a box of dynamite. It's really easy to misuse dynamite and blow your foot off, but it's also a very powerful tool that can do jobs that are impossible without it. @@ -38,4 +39,4 @@ via: http://www.linuxjournal.com/content/nmap%E2%80%94not-just-evil 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.linuxjournal.com/users/shawn-powers \ No newline at end of file +[a]:http://www.linuxjournal.com/users/shawn-powers From 6f6fc0ce19038151680c8d551c08f12da6149f87 Mon Sep 17 00:00:00 2001 From: theo-l Date: Fri, 6 Mar 2015 14:59:00 -0300 Subject: [PATCH 0202/2517] translated --- .../tech/20150306 Nmap--Not Just for Evil.md | 42 ------------------- .../tech/20150306 Nmap--Not Just for Evil.md | 41 ++++++++++++++++++ 2 files changed, 41 insertions(+), 42 deletions(-) delete mode 100644 sources/tech/20150306 Nmap--Not Just for Evil.md create mode 100644 translated/tech/20150306 Nmap--Not Just for Evil.md diff --git a/sources/tech/20150306 Nmap--Not Just for Evil.md b/sources/tech/20150306 Nmap--Not Just for Evil.md deleted file mode 100644 index 3d142eea6c..0000000000 --- a/sources/tech/20150306 Nmap--Not Just for Evil.md +++ /dev/null @@ -1,42 +0,0 @@ -theo-l translating -Nmap—Not Just for Evil! -================================================================================ -If SSH is the Swiss Army knife of the system administration world, Nmap is a box of dynamite. It's really easy to misuse dynamite and blow your foot off, but it's also a very powerful tool that can do jobs that are impossible without it. - -When most people think of Nmap, they think of scanning servers, looking for open ports to attack. Through the years, however, that same ability is incredibly useful when you're in charge of the server or computer in question. Whether you're trying to figure out what kind of server is using a specific IP address in your network or trying to lock down a new NAS device, scanning networks is incredibly useful. - -Figure 1 shows a network scan of my QNAP NAS. The only thing I use the unit for is NFS and SMB file sharing, but as you can tell, it has a ton of ports wide open. Without Nmap, it would be difficult to figure out what the machine was running. - -![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11825nmapf1.jpg) - -### Figure 1. Network Scan ### - -Another incredibly useful way to use Nmap is to scan a network. You don't even have to have root access for that, and it's as simple as specifying the network block you want to scan. For example, typing: - - nmap 192.168.1.0/24 - -will scan the entire range of 254 possible IP addresses on my local network and let me know which are pingable, along with which ports are open. If you've just plugged in a new piece of hardware, but don't know what IP address it grabbed via DHCP, Nmap is priceless. For example, the above command revealed this on my network: - - Nmap scan report for TIVO-8480001903CCDDB.brainofshawn.com (192.168.1.220) - Host is up (0.0083s latency). - Not shown: 995 filtered ports - PORT STATE SERVICE - 80/tcp open http - 443/tcp open https - 2190/tcp open tivoconnect - 2191/tcp open tvbus - 9080/tcp closed glrpc - -This not only tells me the address of my new Tivo unit, but it also shows me what ports it has open. Thanks to its reliability, usability and borderline black hat abilities, Nmap gets this month's Editors' Choice award. It's not a new program, but if you're a Linux user, you should be using it! - --------------------------------------------------------------------------------- - -via: http://www.linuxjournal.com/content/nmap%E2%80%94not-just-evil - -作者:[Shawn Powers][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linuxjournal.com/users/shawn-powers diff --git a/translated/tech/20150306 Nmap--Not Just for Evil.md b/translated/tech/20150306 Nmap--Not Just for Evil.md new file mode 100644 index 0000000000..ba923d178d --- /dev/null +++ b/translated/tech/20150306 Nmap--Not Just for Evil.md @@ -0,0 +1,41 @@ +Nmap--不只是邪恶. +================================================================================ +如果SSH是系统管理员世界的"瑞士军刀"的话,那么Nmap就是一盒炸药. 炸药很容易被误用然后将你的双脚崩掉,但是也是一个很有威力的工具,能够胜任一些看似无法完成的任务. + +大多数人想到Nmap时,他们想到的是扫描服务器,查找开放端口来实施工具. 然而,在过去的这些年中,同样的超能力在当你管理服务器或计算机遇到问题时变得难以置信的有用.无论是你试图找出在你的网络上有哪些类型的服务器使用了指定的IP地址,或者尝试锁定一个新的NAS设备,以及扫描网络等,都会非常有用. + +图1显示了我的QNAP NAS的网络扫描.我使用该单元的唯一目的是为了NFS和SMB文件共享,但是你可以看到,它包含了一大堆大开大敞的端口.如果没有Nmap,很难发现机器到底在运行着什么玩意儿. + +![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11825nmapf1.jpg) + +### 图1 网络扫描 ### + +另外一个无法想象的用处是用它来扫描一个网络.你甚至根本不需要root的访问权限,而且你也可以非常容易地来指定你想要扫描的网络块,例如,输入: + + nmap 192.168.1.0/24 + +上述命令会扫描我局部网络中全部的254个可用的IP地址,让我可以知道那个使可以Ping的,以及那些端口时开放的.如果你刚刚插入一片新的硬件,但是不知道它通过DHCP获取的IP地址,那么此时Nmap就是无价之宝. 例如,上述命令在我的网络中揭示了这个问题. + + Nmap scan report for TIVO-8480001903CCDDB.brainofshawn.com (192.168.1.220) + Host is up (0.0083s latency). + Not shown: 995 filtered ports + PORT STATE SERVICE + 80/tcp open http + 443/tcp open https + 2190/tcp open tivoconnect + 2191/tcp open tvbus + 9080/tcp closed glrpc + +它不仅显示了新的Tivo单元,而且还告诉我那些端口是开放的. 由于它的可靠性,可用性以及黑色边框帽子的能力,Nmap获得了本月的 <<编辑推荐>>奖. 这不是一个新的程序,但是如果你是一个linux用户的话,你应该玩玩它. + +-------------------------------------------------------------------------------- + +via: http://www.linuxjournal.com/content/nmap%E2%80%94not-just-evil + +作者:[Shawn Powers][a] +译者:[theo-l](https://github.com/theo-l) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxjournal.com/users/shawn-powers From 107eb061425dd11835d8499b286fa6d21e26a821 Mon Sep 17 00:00:00 2001 From: theo-l Date: Fri, 6 Mar 2015 15:36:40 -0300 Subject: [PATCH 0203/2517] translating --- ...0304 Monitoring Your Network And Servers With Observium.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md b/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md index 4eae05d99d..232ea790a6 100644 --- a/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md +++ b/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md @@ -1,3 +1,5 @@ +theo-l Translating + Monitoring Your Network And Servers With Observium ================================================================================ ### Introduction ### @@ -171,4 +173,4 @@ via: https://www.unixmen.com/monitoring-network-servers-observium/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:https://www.unixmen.com/author/anis/ -[1]:http://www.observium.org/ \ No newline at end of file +[1]:http://www.observium.org/ From 28e0d097d5d5d70c9e951f74a73fcd7fb6e1b2ea Mon Sep 17 00:00:00 2001 From: theo-l Date: Fri, 6 Mar 2015 17:42:29 -0300 Subject: [PATCH 0204/2517] translating --- ...Monitoring Your Network And Servers With Observium.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md b/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md index 232ea790a6..8dfd79dc27 100644 --- a/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md +++ b/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md @@ -1,23 +1,32 @@ theo-l Translating Monitoring Your Network And Servers With Observium +使用Observium来监控你的网络和服务器 ================================================================================ ### Introduction ### +### 简介### You have a problem while monitoring your servers, switches or physical machines. **Observium** fits your need. As a free monitoring system, it helps you to monitor your servers remotely. It is an auto-discovering SNMP based network monitoring platform written in PHP which includes support for a wide range of network hardware and operating systems including Cisco, Windows, Linux, HP, NetApp and many other. I will give you the steps to follow while setting up an **Observium** server on Ubuntu 12.04. +在监控你的服务器,交换机或者物理机器时有过问题吗?, **Observium**可以满足你的需求.作为一个免费的监控系统,可以帮助你远程监控你的服务器.它是一个由PHP编写的基于自动发现SNMP的网络监控平台,支持非常广泛的网络硬件和操作系统,包括 Cisco,Windows,Linux,HP,NetApp等.在此我会通过在Ubuntu12.04上设置一个**Observium**服务器的同时提供相应的步骤. ![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture1.png) Currently there are two different versions of **observium**. +目前存在两种不同的**observium**版本. - The observium Community is a free tool and licensed under the QPL Open Source license. This version is the best solution for small deployments. It gets security updates each 6 months. +- Observium 社区版本是一个在QPL开源许可证下的免费工具,这个版本时对于较小部署的最好解决方案. 该版本每6个月得到一次安全性更新. - While the second version, the Observium Professional is distributed under SVN based release mechanism. And it gets daily security updates. This tool is the best for Service Provider and enterprises deployments. +- 第2个版本是Observium Professional, 该版本在基于SVN的发布机制下的发行版. 会得到每日安全性更新. 该工具适用于服务提供商和企业级部署. For more information you can visit the offcial [website of Observium][1]. +更多信息可以通过其官网获得[website of Observium][1]. ### System Requirements ### +### 系统需求### In order to install **Observium** , it’s necessary to have a server with a fresh installation. The development of **Observium** takes place on Ubuntu LTS and Debian systems, so it’s recommended to install **Observium** on Ubuntu or Debian because may be issues with other platforms. +为了安装 **Observium**, This article will guide you on how to install **Observium** on Ubuntu 12.04. For a small **Observium** installation is recommended to use 256MB for the memory and dual core for the process. From 360df62ba5a8bda104c7be18d48771b0da66fa89 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 7 Mar 2015 00:40:02 -0300 Subject: [PATCH 0205/2517] translated --- ...Your Network And Servers With Observium.md | 185 ------------------ ...Your Network And Servers With Observium.md | 172 ++++++++++++++++ 2 files changed, 172 insertions(+), 185 deletions(-) delete mode 100644 sources/tech/20150304 Monitoring Your Network And Servers With Observium.md create mode 100644 translated/tech/20150304 Monitoring Your Network And Servers With Observium.md diff --git a/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md b/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md deleted file mode 100644 index 8dfd79dc27..0000000000 --- a/sources/tech/20150304 Monitoring Your Network And Servers With Observium.md +++ /dev/null @@ -1,185 +0,0 @@ -theo-l Translating - -Monitoring Your Network And Servers With Observium -使用Observium来监控你的网络和服务器 -================================================================================ -### Introduction ### -### 简介### - -You have a problem while monitoring your servers, switches or physical machines. **Observium** fits your need. As a free monitoring system, it helps you to monitor your servers remotely. It is an auto-discovering SNMP based network monitoring platform written in PHP which includes support for a wide range of network hardware and operating systems including Cisco, Windows, Linux, HP, NetApp and many other. I will give you the steps to follow while setting up an **Observium** server on Ubuntu 12.04. -在监控你的服务器,交换机或者物理机器时有过问题吗?, **Observium**可以满足你的需求.作为一个免费的监控系统,可以帮助你远程监控你的服务器.它是一个由PHP编写的基于自动发现SNMP的网络监控平台,支持非常广泛的网络硬件和操作系统,包括 Cisco,Windows,Linux,HP,NetApp等.在此我会通过在Ubuntu12.04上设置一个**Observium**服务器的同时提供相应的步骤. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture1.png) - -Currently there are two different versions of **observium**. -目前存在两种不同的**observium**版本. - -- The observium Community is a free tool and licensed under the QPL Open Source license. This version is the best solution for small deployments. It gets security updates each 6 months. -- Observium 社区版本是一个在QPL开源许可证下的免费工具,这个版本时对于较小部署的最好解决方案. 该版本每6个月得到一次安全性更新. -- While the second version, the Observium Professional is distributed under SVN based release mechanism. And it gets daily security updates. This tool is the best for Service Provider and enterprises deployments. -- 第2个版本是Observium Professional, 该版本在基于SVN的发布机制下的发行版. 会得到每日安全性更新. 该工具适用于服务提供商和企业级部署. - -For more information you can visit the offcial [website of Observium][1]. -更多信息可以通过其官网获得[website of Observium][1]. - -### System Requirements ### -### 系统需求### - -In order to install **Observium** , it’s necessary to have a server with a fresh installation. The development of **Observium** takes place on Ubuntu LTS and Debian systems, so it’s recommended to install **Observium** on Ubuntu or Debian because may be issues with other platforms. -为了安装 **Observium**, - -This article will guide you on how to install **Observium** on Ubuntu 12.04. For a small **Observium** installation is recommended to use 256MB for the memory and dual core for the process. - -### Installing Prerequisites ### - -Before installing **Observium** you need to make sure to install all dependencies. - -First step is to update your server - - sudo apt-get update - -Then you need to install all packages required to run Observium. - -Observuim need this list of software the run correctly: - -- LAMP server -- fping -- Net-SNMP 5.4+ -- RRDtool 1.3+ -- Graphviz - -Requirements for optional features: - -- Ipmitool – Only if you want to poll IPMI baseboard controllers on servers -- Libvirt-bin – Only if you want to monitor remote VM hosts using libvirt - - sudo apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-json php-pear snmp fping mysql-server mysql-client python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick libvirt ipmitool - -### Creation MySQL Database and User for Observium ### - -Now you need to log into MySQL and create database for **Observuim**: - - mysql -u root -p - -After successful authenticated, you need to create the database. - - CREATE DATABASE observium; - -The database Name is **Observium**. You will need this information later. - -Now, you should create the database administrator. - - CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword'; - -Next, you need to give this user permissions to administer the database you created. - - GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost; - -You need to flush the privilege information to disk to activate the new MySQL user: - - FLUSH PRIVILEGES; - exit - -### Downloading and Installing Observium ### - -Now that our system is ready, we can start the installation of Observium. - -First step to do is, creating the directory Observium is going to operate out of: - - mkdir -p /opt/observium && cd /opt - -For the purpose of this tutorial, we’re going to be using the Community/Open Source Edition of Observium. Download and unpack it. - - wget http://www.observium.org/observium-community-latest.tar.gz - tar zxvf observium-community-latest.tar.gz - -Now go under Observium directory - - cd observium - -Copy the default configuration file ‘**config.php.default**‘ to ‘**config.php**‘ and fill out the database config options: - - cp config.php.default config.php - nano config.php - ----------- - - / Database config - $config['db_host'] = 'localhost'; - $config['db_user'] = 'observiumadmin'; - $config['db_pass'] = 'observiumpassword'; - $config['db_name'] = 'observium'; - -Let’s setup the default schema for the MySQL Database: - - php includes/update/update.php - -Now you need to create directory to store rrd file and change permission to let apache write into the file . - - mkdir rrd - chown apache:apache rrd - -To help you troubleshooting on case of problem, you need to create logs file. - - mkdir -p /var/log/observium - chown apache:apache /var/log/observium - -Now you have to create the virtual host configuration for Observium - - - DocumentRoot /opt/observium/html/ - ServerName observium.domain.com - CustomLog /var/log/observium/access_log combined - ErrorLog /var/log/observium/error_log - - AllowOverride All - Options FollowSymLinks MultiViews - - - -Next, you need to enable rewrite functionality for your Apache server. - -To enable `mod_rewrite` modules, type this command: - - sudo a2enmod rewrite - -This module will be enable the next after reboot of Apache service. - - sudo service apache2 restart - -### Configuring Observium ### - -Before log into the web interface, you need to create administrator account (level 10) to Observium - - # cd /opt/observium - # ./adduser.php admin adminpassword 10 - User admin added successfully. - -Next set a cron jobs for the discovery and the poller jobs, create a new file ‘**/etc/cron.d/observium**‘ and add the following contents. - - 33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1 - */5 * * * * root /opt/observium/discovery.php -h new >> /dev/null 2>&1 - */5 * * * * root /opt/observium/poller-wrapper.py 1 >> /dev/null 2>&1 - -Reload cron process to take new entries. - - # /etc/init.d/cron reload - -You’ve installed Observium Server! Log into Observium using your browser **http://** and be on your way. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture.png) - -Enjoy! - --------------------------------------------------------------------------------- - -via: https://www.unixmen.com/monitoring-network-servers-observium/ - -作者:[anismaj][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://www.unixmen.com/author/anis/ -[1]:http://www.observium.org/ diff --git a/translated/tech/20150304 Monitoring Your Network And Servers With Observium.md b/translated/tech/20150304 Monitoring Your Network And Servers With Observium.md new file mode 100644 index 0000000000..9c78793904 --- /dev/null +++ b/translated/tech/20150304 Monitoring Your Network And Servers With Observium.md @@ -0,0 +1,172 @@ + +使用Observium来监控你的网络和服务器 +================================================================================ +### 简介### + +在监控你的服务器,交换机或者物理机器时有过问题吗?, **Observium**可以满足你的需求.作为一个免费的监控系统,可以帮助你远程监控你的服务器.它是一个由PHP编写的基于自动发现SNMP的网络监控平台,支持非常广泛的网络硬件和操作系统,包括 Cisco,Windows,Linux,HP,NetApp等.在此我会通过在Ubuntu12.04上设置一个**Observium**服务器的同时提供相应的步骤. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture1.png) + +目前存在两种不同的**observium**版本. + +- Observium 社区版本是一个在QPL开源许可证下的免费工具,这个版本时对于较小部署的最好解决方案. 该版本每6个月得到一次安全性更新. +- 第2个版本是Observium Professional, 该版本在基于SVN的发布机制下的发行版. 会得到每日安全性更新. 该工具适用于服务提供商和企业级部署. + +更多信息可以通过其官网获得[website of Observium][1]. + +### 系统需求### + +为了安装 **Observium**, 需要具有一个最新安装的服务器。**Observium**是在Ubuntu LTS和Debian系统上进行开发的,所以推荐在Ubuntu或Debian上安装**Observium**,因为可能在别的平台上会有一些小问题。 + +该文章会知道你如何在Ubuntu12.04上进行安装**Observium**。对于小型的**Observium**安装,推荐的基础配置要有256MB内存和双核处理器。 + +### 安装需求 ### + +在安装**Observuim**之前,你需要确认安装所有的依赖关系包。 + +首先,使用下面的命令更新的服务器: + + sudo apt-get update + +然后你需要安装运行Observuim 所需的全部包。 + +Observium需要使用下面所列出的软件才能正确的运行: + +- LAMP server +- fping +- Net-SNMP 5.4+ +- RRDtool 1.3+ +- Graphviz + +对于可选特性的要求: + +- Ipmitool - 只有当你想要探寻IPMI(Intelligent Platform Management Interface智能平台管理接口)基板控制器。 +- Libvirt-bin - 只有当你想要使用libvirt进行远程VM主机监控时。 + + sudo apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-json php-pear snmp fping mysql-server mysql-client python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick libvirt ipmitool + +### 为Observium创建MySQL 数据库和用户。 + +现在你需要登录到MySQL中并为**Observium**创建数据库: + mysql -u root -p + +在用户验证成功之后,你需要按照下面的命令创建该数据库。 + + CREATE DATABASE observium; + +数据库名为**Observium**,稍后你会需要这个信息。 + +现在你需要创建数据库管理员用户。 + + CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword'; + +接下来,你需要给该管理员用户相应的权限来管理创建的数据库。 + + GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost; + +你需要将权限信息写回到磁盘中来激活新的MySQL用户: + + FLUSH PRIVILEGES; + exit + +### 下载并安装 Observium### + +现在我们的系统已经准备好了, 可以开始Observium的安装了。 + +第一步,创建Observium将要使用的文件目录: + mkdir -p /opt/observium && cd /opt + +为了达到本教程的目的,我们将会使用Observium的社区/开源版本。使用下面的命令下载并解压: + + wget http://www.observium.org/observium-community-latest.tar.gz + tar zxvf observium-community-latest.tar.gz + +现在进入到Observium目录。 + + cd observium + +将默认的配置文件'**config.php.default**'复制到'**config.php**',并将数据库配置选项填充到配置文件中: + + cp config.php.default config.php + nano config.php + +---------- + + / Database config + $config['db_host'] = 'localhost'; + $config['db_user'] = 'observiumadmin'; + $config['db_pass'] = 'observiumpassword'; + $config['db_name'] = 'observium'; + +现在为MySQL数据库设置默认的数据库模式: + php includes/update/update.php + +现在你需要创建一个文件目录来存储rrd文件,并修改其权限以便让apache能将写入到文件中。 + + mkdir rrd + chown apache:apache rrd + +为了在出现问题时进行问题修理,你需要创建日志文件。 + + mkdir -p /var/log/observium + chown apache:apache /var/log/observium + +现在你需要为Observium创建虚拟主机配置。 + + + DocumentRoot /opt/observium/html/ + ServerName observium.domain.com + CustomLog /var/log/observium/access_log combined + ErrorLog /var/log/observium/error_log + + AllowOverride All + Options FollowSymLinks MultiViews + + + +下一步你需要让你的Apache服务器的rewrite(重写)功能生效。 + +为了让'mod_rewrite'生效,输入以下命令: + + sudo a2enmod rewrite + +该模块在下一次Apache服务重启之后就会生效。 + + sudo service apache2 restart + +###配置Observium### + +在登入网络接口之前,你需要为Observium创建一个管理员账户(级别10)。 + + # cd /opt/observium + # ./adduser.php admin adminpassword 10 + User admin added successfully. + +下一步为发现和探寻工作设置一个cron任务,创建一个新的文件‘**/etc/cron.d/observium**’ 并在其中添加以下的内容。 + + 33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1 + */5 * * * * root /opt/observium/discovery.php -h new >> /dev/null 2>&1 + */5 * * * * root /opt/observium/poller-wrapper.py 1 >> /dev/null 2>&1 + +重载cron进程来获取系的人物实体。 + + # /etc/init.d/cron reload + +好啦,你已经完成了Observium服务器的安装拉! 使用你的浏览器登录到**http://**,然后上路巴。 + +![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture.png) + +尽情享受吧! + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/monitoring-network-servers-observium/ + +作者:[anismaj][a] +译者:[theo-l](https://github.com/theo-l) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/anis/ +[1]:http://www.observium.org/ From 17b0738d0a54df8e75d30f0e5ec6ecd70618551d Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 7 Mar 2015 00:54:01 -0300 Subject: [PATCH 0206/2517] translating --- ...50203 9 Best IDEs and Code Editors for JavaScript Users.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md b/sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md index 83f5f11293..09c2a688ac 100644 --- a/sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md +++ b/sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md @@ -1,3 +1,5 @@ +theo-l translating + 9 Best IDEs and Code Editors for JavaScript Users ================================================================================ Web designing and developing is one of the trending sectors in the recent times, where more and more peoples started to search for their career opportunities. But, Getting the right opportunity as a web developer or graphic designer is not just a piece of cake for everyone, It certainly requires a strong mind presence as well as right skills to find the find the right job. There are a lot of websites available today which can help you to get the right job description according to your knowledge. But still if you want to achieve something in this sector you must have some excellent skills like working with different platforms, IDEs and various other tools too. @@ -79,4 +81,4 @@ via: http://devzum.com/2015/01/31/9-best-ides-and-code-editors-for-javascript-us [6]:http://ace.c9.io/#nav=about [7]:https://github.com/scripted-editor/scripted [8]:https://netbeans.org/ -[9]:http://www.jetbrains.com/webstorm/ \ No newline at end of file +[9]:http://www.jetbrains.com/webstorm/ From 7299c160f4405478126dc52fd6499dc6639f3f7b Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 7 Mar 2015 14:33:22 +0800 Subject: [PATCH 0207/2517] translating --- .../tech/20150304 How To Fix Windows Updates Stuck At 0%.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md b/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md index c74df29f1e..d398b90e5b 100644 --- a/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md +++ b/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md @@ -1,3 +1,5 @@ +translating-----geekpi + How To Fix Windows Updates Stuck At 0% ================================================================================ How do you feel when you log in to Windows after a month, find there are updates to install, you select to install these updates and those **Windows updates stuck at zero percent**? @@ -50,4 +52,4 @@ via: http://itsfoss.com/fix-windows-updates-stuck-0/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ -[2]:http://itsfoss.com/windows-10-inspired-linux/ \ No newline at end of file +[2]:http://itsfoss.com/windows-10-inspired-linux/ From fd97ed14d03786d9e9dcd40798e2520c78f7611d Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 7 Mar 2015 15:04:55 +0800 Subject: [PATCH 0208/2517] translated --- ... How To Fix Windows Updates Stuck At 0%.md | 55 ------------------- ... How To Fix Windows Updates Stuck At 0%.md | 54 ++++++++++++++++++ 2 files changed, 54 insertions(+), 55 deletions(-) delete mode 100644 sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md create mode 100644 translated/tech/20150304 How To Fix Windows Updates Stuck At 0%.md diff --git a/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md b/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md deleted file mode 100644 index d398b90e5b..0000000000 --- a/sources/tech/20150304 How To Fix Windows Updates Stuck At 0%.md +++ /dev/null @@ -1,55 +0,0 @@ -translating-----geekpi - -How To Fix Windows Updates Stuck At 0% -================================================================================ -How do you feel when you log in to Windows after a month, find there are updates to install, you select to install these updates and those **Windows updates stuck at zero percent**? - -Why am I talking about Windows updates on a blog dedicated to Linux and Open Source? Because I prefer to [dual boot Windows with Linux][1]. While I use Linux as my main desktop, once in a while I do log in to Windows. The most annoying thing after logging in Windows is the Windows updates. It has happened to me on several occasions that I found **Windows update not working**. I choose to install the updates and Windows updates get stuck at 0 KB and 0%, like this: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_Updates_stuck_at_zero.jpeg) - -In this tutorial, we shall see how to make Windows update work again. The tutorial should be applicable for Windows 7, Windows 8 and Windows 8.1. - -### Fix Windows updates stuck at zero percent ### - -Please mind that Windows updates can be stuck at any percent and the trick which we are going to use would require you to install those updates again. I hope you do not find that too inconvenient. If you are ready, let’s see how to fix this Windows update issue. - -#### Step 1: #### - -Press Windows+R. This will prompt run dialogue box. In here, type services.msc: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Updates_3.png) - -#### Step 2: #### - -Now it brings us to all the services installed in Windows. These services are listed in alphabetical order. Scroll down and look for **Windows Update Service**. Right click on it and stop it. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_Updates_stuck_1.jpeg) - -#### Step 3: #### - -Now go in **C:\Windows\SoftwareDistribution and delete all of its contents**. Actually, this is the folder where downloaded installation files were stored. But since Windows update suck, they somehow have problem with partially downloaded update files. - -#### Step 4: #### - -Go back to services again (as mentioned in Step 1) and this time start the Windows Update Service, by right clicking on it. Try to update Windows again. It should be working this time. - -So once you have got the updates working, perhaps you will find plenty of updates to install at next reboot. And that moment calls for a meme: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_update_suck.jpg) - -Jokes apart, I hope this tip helps you to get rid of Windows updates hanged at 0%. I wish that Linux like updates are also included in the list of [Windows 10 features copied from Linux][2]. I wish. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/fix-windows-updates-stuck-0/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ -[2]:http://itsfoss.com/windows-10-inspired-linux/ diff --git a/translated/tech/20150304 How To Fix Windows Updates Stuck At 0%.md b/translated/tech/20150304 How To Fix Windows Updates Stuck At 0%.md new file mode 100644 index 0000000000..ca09f61d1c --- /dev/null +++ b/translated/tech/20150304 How To Fix Windows Updates Stuck At 0%.md @@ -0,0 +1,54 @@ +如何修复Windows更新在0%卡住 +================================================================================ +当你在一个月后登录Windows,发现有一些更新需要安装, 你选择安装这些更新但是**Windows更新卡在0%**时你感觉怎么样? + +为什么我在Linux和开源专属的博客上谈论Windows更新呢?因为我喜欢[双启动Windows和Linux][1]。当我使用Linux作为我的主桌面时,过了一段时间我登录到Windows中。登录Windows后最烦人的事情是Windows更新。我偶尔遇到了几次**Windows更新不能工作**的情况。我选择安装更新而且Windows更新卡在了0%和0KB上,就像这样: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_Updates_stuck_at_zero.jpeg) + +本教程中,我们会让Windows更新再次可用。这个教程应该同样适用于Windows 7、Windows 8和Windows 8.1。 + +### 修复Windows更新卡在0% ### + +请注意Windows更新可能卡在任何地方,我们将会使用的这个技巧需要你重新安装这些更新。我希望你不要觉得太麻烦。如果你准备好了,就让我们开始修复这个Windows更新问题。 + +#### 步骤 1: #### + +按下Windows+R。这时会弹出运行窗口。在这里我们输入services.msc: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Updates_3.png) + +#### 步骤 2: #### + +这里会显示Windows上安装的所有服务。这些服务以字母排序。向下拉到**Windows Update Service**。右击并停止服务。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_Updates_stuck_1.jpeg) + +#### 步骤 3: #### + +现在进入**C:\Windows\SoftwareDistribution并删除这里所有的内容**。实际上,这个文件夹是下载和保存安装文件的地方。但是由于Windows更新卡住了,所以这里的某个安装文件存在一些问题。 + +#### 步骤 4: #### + +回到前面的服务(第一步中提到的)并右击重新启动Windows更新服务。再重新试一下Windows更新,这次应该可以用了。 + +当系统更新可以工作时,你或许会发现在下次启动时会有很多更新要安装。这时打个电话: + + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_update_suck.jpg) + +玩笑之余,我希望这个贴士能够帮助你拜托Windows更新卡在0%的情况。我希望Linux中的更新也能够含在[Windows 10从Linux复制的特性][2]列表中。这只是我的希望。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-windows-updates-stuck-0/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ +[2]:http://itsfoss.com/windows-10-inspired-linux/ From 7a194b3bbc15d5b8dae8651b6786ba290682a761 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 7 Mar 2015 13:18:00 -0300 Subject: [PATCH 0209/2517] translated --- ...s and Code Editors for JavaScript Users.md | 84 ------------------- ...s and Code Editors for JavaScript Users.md | 82 ++++++++++++++++++ 2 files changed, 82 insertions(+), 84 deletions(-) delete mode 100644 sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md create mode 100644 translated/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md diff --git a/sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md b/sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md deleted file mode 100644 index 09c2a688ac..0000000000 --- a/sources/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md +++ /dev/null @@ -1,84 +0,0 @@ -theo-l translating - -9 Best IDEs and Code Editors for JavaScript Users -================================================================================ -Web designing and developing is one of the trending sectors in the recent times, where more and more peoples started to search for their career opportunities. But, Getting the right opportunity as a web developer or graphic designer is not just a piece of cake for everyone, It certainly requires a strong mind presence as well as right skills to find the find the right job. There are a lot of websites available today which can help you to get the right job description according to your knowledge. But still if you want to achieve something in this sector you must have some excellent skills like working with different platforms, IDEs and various other tools too. - -Talking about the different platforms and IDEs used for various languages for different purposes, gone is the time when we learn just one IDE and get the optimum solutions for our web design projects easily. Today we are living in the modern lifestyle where competition is getting more and more tough on every single day. Same is the case with the IDEs, IDE is basically a powerful client application for creating and deploying applications. Today we are going to share some best javascript IDE for web designers and developers. - -Please visit this list of best code editors for javascript user and share your thought with us. - -### 1) [Spket][1] ### - -**Spket IDE** is powerful toolkit for JavaScript and XML development. The powerful editor for JavaScript, XUL/XBL and Yahoo! Widget development. The JavaScript editor provides features like code completion, syntax highlighting and content outline that helps developers productively create efficient JavaScript code. - -![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/spket-e1422674329554.png) - -### 2) [Ixedit][2] ### - -IxEdit is a JavaScript-based interaction design tool for the web. With IxEdit, designers can practice DOM-scripting without coding to change, add, move, or transform elements dynamically on your web pages. - -![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/ixedit.png) - -### 3) [Komodo Edit][3] ### - -Komode is free and powerful code editor for Javascript and other programming languages. - -![](http://i2.wp.com/devzum.com/wp-content/uploads/2015/01/komodo-edit-e1422674596277.png) - -### 4) [EpicEditor][4] ### - -EpicEditor is an embeddable JavaScript Markdown editor with split fullscreen editing, live previewing, automatic draft saving, offline support, and more. For developers, it offers a robust API, can be easily themed, and allows you to swap out the bundled Markdown parser with anything you throw at it. - -![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/epiceditor-e1422674732281.png) - -### 5) [codepress][5] ### - -CodePress is web-based source code editor with syntax highlighting written in JavaScript that colors text in real time while it’s being typed in the browser. - -![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/codepres-e1422674893706.png) - -### 6) [ACe][6] ### - -Ace is an embeddable code editor written in JavaScript. It matches the features and performance of native editors such as Sublime, Vim and TextMate. It can be easily embedded in any web page and JavaScript application. - -![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/ace-e1422675089912.png) - -### 7) [scripted][7] ### - -Scripted is a fast and lightweight code editor with an initial focus on JavaScript editing. Scripted is a browser based editor and the editor itself is served from a locally running Node.js server instance. - -![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/scripted-e1422675188408.png) - -### 8) [Netbeans][8] ### - -This is another more impressive and useful code editors for javascript and other programming languages. - -![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/code_editing1-e1422675506226.png) - -### 9) [Webstorm][9] ### - -This is the smartest ID for javascript. WebStorm is a lightweight yet powerful IDE, perfectly equipped for complex client-side development and server-side development with Node.js. - -![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/webstorm.png) - --------------------------------------------------------------------------------- - -via: http://devzum.com/2015/01/31/9-best-ides-and-code-editors-for-javascript-users/ - -作者:[vikas][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://devzum.com/author/vikas/ -[1]:http://spket.com/ -[2]:http://www.ixedit.com/ -[3]:http://komodoide.com/komodo-edit/ -[4]:http://oscargodson.github.io/EpicEditor/ -[5]:http://codepress.sourceforge.net/ -[6]:http://ace.c9.io/#nav=about -[7]:https://github.com/scripted-editor/scripted -[8]:https://netbeans.org/ -[9]:http://www.jetbrains.com/webstorm/ diff --git a/translated/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md b/translated/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md new file mode 100644 index 0000000000..c0bd5881ed --- /dev/null +++ b/translated/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md @@ -0,0 +1,82 @@ +9款最好的Javacript用户的IDE和代码编辑器。 +================================================================================ +网络应用设计和开发是最近一段时间的发展趋势,也有越来越多的人开始在此寻找他们的职业机会。但是,作为网络开发人员或图形设计人员来说,一个好的机会并不是每个人都能够轻易获得到的,它需要很好的思维展现,以及对于工作的熟练技巧。现在有许多可用的网站来根据你的知识帮助你找到正确的工作描述。但是如果你想要在这个领域有所成就,你仍然需要具有一些出色的手段,例如可以在不同的平台、IDE以及其他的工具上开展工作。 + +说到根据不同目的所使用的大量语言用到的不同平台以及IDE,只靠学习一个IDE来容易地获取项目设计的最佳方案的惯例已经属于过去时了。今天我们活在一个竞争日益激烈的现代生活节奏中,对于IDE们也是相同的处境,IDE是一个用来创建和部署应用的强大的客户端应用。今天我们打算为网络设计者和开发人员分享一些最好的Javacript IDE。 + +请访问作为javascript 用户最好的代码编辑器列表,并将你的想法与我们一起分享。 + +### 1) [Spket][1] ### + +**Spket IDE** 是JavaScript和XML开发的强大工具包。该编辑器可以用来进行开发 JavaScript,XUL/XBL 和Yahoo!小组件。 JavaScript编辑器提供了例如代码补全,语法高亮以及代码内容大纲等特性,可以帮助开发者提高创建高效JavaScript代码的生产率。 + + +![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/spket-e1422674329554.png) + +### 2) [Ixedit][2] ### + +IxEdit 基于Javascript交互的网络设计工具。通过IxEdit,设计者可以在不需要通过代码改变,添加,删除或变换页面元素的情况下,在网页上进行动态进行DOM脚本编写。 + +![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/ixedit.png) + +### 3) [Komodo Edit][3] ### + +Komodo是一款免费而强大的编辑器,可以用来编辑JavaScript和其他的编程语言。 +![](http://i2.wp.com/devzum.com/wp-content/uploads/2015/01/komodo-edit-e1422674596277.png) + +### 4) [EpicEditor][4] ### + +EpicEditor是一个可嵌入的 JavaScript Markdown编辑器,具有分割全屏进行编辑,实时预览,自动草稿保存,离线支持等特性。对于开发人员,它提供了健壮的API,可以容易地设置主题,并允许你以任何其他的事物来替换绑定的Markdown解析器。 + +![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/epiceditor-e1422674732281.png) + +### 5) [codepress][5] ### + +CodePress是一个用JavaScript编写的基于网络的源代码编辑器,具有语法高亮,并且是在你将代码输入到浏览器后实时进行文本颜色渲染。 + +![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/codepres-e1422674893706.png) + +### 6) [ACe][6] ### + +Ace 是一个使用JavaScript编写的嵌入式代码编辑器,它能够匹配宿主编辑器的特性和性能,例如Sublime,Vim和Textate。它能够容易地嵌入到任何的网页和JavaScript应用中。 + +![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/ace-e1422675089912.png) + +### 7) [scripted][7] ### + +Scripted是一个快速的轻量级代码编辑器,最初是为了JavaScript编写实现的。 Scripted是一个基于浏览器的编辑器,而编辑器本身有本地运行的Node.js服务器实例来提供服务支持。 + +![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/scripted-e1422675188408.png) + +### 8) [Netbeans][8] ### + +这是另外的一个更加震撼而且有用的编辑器,可以用来编写javascript和其他的编程语言。 + +![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/code_editing1-e1422675506226.png) + +### 9) [Webstorm][9] ### + +这是最智能的JavaScript IDE。 它是为使用Node.js进行复杂的客户端开发和服务器端开发而装备的一个轻巧而强大的完美IDE。 + +![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/webstorm.png) + +-------------------------------------------------------------------------------- + +via: http://devzum.com/2015/01/31/9-best-ides-and-code-editors-for-javascript-users/ + +作者:[vikas][a] +译者:[theo-l](https://github.com/theo-l) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://devzum.com/author/vikas/ +[1]:http://spket.com/ +[2]:http://www.ixedit.com/ +[3]:http://komodoide.com/komodo-edit/ +[4]:http://oscargodson.github.io/EpicEditor/ +[5]:http://codepress.sourceforge.net/ +[6]:http://ace.c9.io/#nav=about +[7]:https://github.com/scripted-editor/scripted +[8]:https://netbeans.org/ +[9]:http://www.jetbrains.com/webstorm/ From 53314a2391c9319b45578813e7389e6ea828e010 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 7 Mar 2015 13:23:12 -0300 Subject: [PATCH 0210/2517] translating --- ...ious Case of the Disappearing Distros.md.swp | Bin 0 -> 20480 bytes ... Curious Case of the Disappearing Distros.md | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 sources/talk/.20141224 The Curious Case of the Disappearing Distros.md.swp diff --git a/sources/talk/.20141224 The Curious Case of the Disappearing Distros.md.swp b/sources/talk/.20141224 The Curious Case of the Disappearing Distros.md.swp new file mode 100644 index 0000000000000000000000000000000000000000..e00551e00df308f45da241238c3a8dae473ae1a9 GIT binary patch literal 20480 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 DB@ Date: Sun, 8 Mar 2015 10:57:06 +0800 Subject: [PATCH 0211/2517] translating --- ...asics--How To Find Maximum Supported RAM By Your System.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md b/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md index 2fed06677b..d6ed396e35 100644 --- a/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md +++ b/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md @@ -1,3 +1,5 @@ +Translating-------geekpi + Linux Basics: How To Find Maximum Supported RAM By Your System ================================================================================ ![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/RAM-790x527.jpg) @@ -693,4 +695,4 @@ via: https://www.unixmen.com/linux-basics-how-to-find-maximum-supported-ram-by-y 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:https://www.unixmen.com/author/sk/ \ No newline at end of file +[a]:https://www.unixmen.com/author/sk/ From ec8f770d8c2ae7a951d7fef271b53e4b03ab2bb4 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Sun, 8 Mar 2015 11:10:54 +0800 Subject: [PATCH 0212/2517] translated by KayGuoWhu --- ...a float cannot represent all int values.md | 44 ------------------- ...a float cannot represent all int values.md | 43 ++++++++++++++++++ 2 files changed, 43 insertions(+), 44 deletions(-) delete mode 100644 sources/talk/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md create mode 100644 translated/talk/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md diff --git a/sources/talk/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md b/sources/talk/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md deleted file mode 100644 index b2e6372a0b..0000000000 --- a/sources/talk/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md +++ /dev/null @@ -1,44 +0,0 @@ -translating by KayGuoWhu -Why does C++ promote an int to a float when a float cannot represent all int values? ---------- - -#Q: - -Say I have the following: - -```C -int i = 23; -float f = 3.14; -if (i == f) // do something -``` - -The i will be promoted to a float and the two float numbers will be compared, but can a float represent all int values? Why not promote both the int and the float to a double? - -#A: - -When `int` is promoted to `unsigned` in the integral promotions, negative values are also lost (which leads to such fun as `0u < -1` being true). - -Like most mechanisms in C (that are inherited in C++), the usual arithmetic conversions should be understood in terms of hardware operations. The makers of C were very familiar with the assembly language of the machines with which they worked, and they wrote C to make immediate sense to themselves and people like themselves when writing things that would until then have been written in assembly (such as the UNIX kernel). - -Now, processors, as a rule, do not have mixed-type instructions (add float to double, compare int to float, etc.) because it would be a huge waste of real estate on the wafer -- you'd have to implement as many times more opcodes as you want to support different types. That you only have instructions for "add int to int," "compare float to float", "multiply unsigned with unsigned" etc. makes the usual arithmetic conversions necessary in the first place -- they are a mapping of two types to the instruction family that makes most sense to use with them. - -From the point of view of someone who's used to writing low-level machine code, if you have mixed types, the assembler instructions you're most likely to consider in the general case are those that require the least conversions. This is particularly the case with floating points, where conversions are runtime-expensive, and particularly back in the early 1970s, when C was developed, computers were slow, and when floating point calculations were done in software. This shows in the usual arithmetic conversions -- only one operand is ever converted (with the single exception of `long/unsigned int`, where the `long` may be converted to `unsigned long`, which does not require anything to be done on most machines. Perhaps not on any where the exception applies). - -So, the usual arithmetic conversions are written to do what an assembly coder would do most of the time: you have two types that don't fit, convert one to the other so that it does. This is what you'd do in assembler code unless you had a specific reason to do otherwise, and to people who are used to writing assembler code and do have a specific reason to force a different conversion, explicitly requesting that conversion is natural. After all, you can simply write - -```C -if((double) i < (double) f) -``` - -It is interesting to note in this context, by the way, that `unsigned` is higher in the hierarchy than `int`, so that comparing `int` with `unsigned` will end in an unsigned comparison (hence the `0u < -1` bit from the beginning). I suspect this to be an indicator that people in olden times considered `unsigned` less as a restriction on `int` than as an extension of its value range: We don't need the sign right now, so let's use the extra bit for a larger value range. You'd use it if you had reason to expect that an `int` would overflow -- a much bigger worry in a world of 16-bit ints. - ----- -via:[stackoverflow](http://stackoverflow.com/questions/28010565/why-does-c-promote-an-int-to-a-float-when-a-float-cannot-represent-all-int-val/28011249#28011249) - -作者:[wintermute][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://stackoverflow.com/users/4301306/wintermute \ No newline at end of file diff --git a/translated/talk/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md b/translated/talk/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md new file mode 100644 index 0000000000..e9dd6e997c --- /dev/null +++ b/translated/talk/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md @@ -0,0 +1,43 @@ +既然float不能表示所有的int,那为什么在类型转换时C++将int转换成float? +--------- + +#问题: + +代码如下: + +```C +int i = 23; +float f = 3.14; +if (i == f) // 执行某段代码 +``` + +编译器会将i转换成float类型,然后比较这两个float的大小,但是float能够表示所有的int吗?为什么没有将int和float转换成double类型进行比较呢? + +#回答: + +在整型数的演变中,当`int`变成`unsigned`时,会丢掉负数部分(有趣的是,这样的话,`0u < -1`就是对的了)。 + +和C语言中的大部分机制(在C++中得到继承)一样,就硬件操作而言,常见的算术转换应该简明易懂。C语言的发明者精通他们所使用机器上的汇编语言,他们编写的C语言对他们和像他们一样编写程序的人有直接的意义,直到使用汇编语言编写(诸如UNIX内核)的程序时。 + +现如今,一般来说,处理器并不具有混合类型的指令系统(如float和double相加、比较int和float,诸如此类),因为如果这样做造成芯片晶圆的巨大浪费——如果你想支持更多不同的类型,你不得不实现更多的操作码。然而,在实际中,你只有实现"add int to int"、"compare float to float"和"multiply unsigned with unsigned"等功能的常见指令,这使得优先进行算术转换变得很有必要——它们是指令系统中两种类型的映射关系,它们中的大部分很有用处。 + +从习惯编写低级别机器代码的编程人员的角度来说,如果有了混合类型,那么在一般情况下最有可能使用的汇编指令就是那些只需要进行最少类型转换的指令。其中,有一种特殊情况就是浮点数的转换,特别是在20世纪70年代早期,当时C语言正在被开发,计算机运行速度很慢,而浮点数的计算是通过软件完成的,所以进行转换的成本很高。这拖慢了常用算术运算的转换开发——当时只有一种操作数实现了转换(这个例外就是long到unsigned int的转换,这种转换没有任何要求,在大部分机器上都可以进行。当然并不是全部,因为总有例外情况)。 + +所以,编写常用的算术转换是为了完成汇编程序员在大部分时间需要做的事情:即有两种不匹配的类型,将一种转换成另一种。这也就是汇编代码所做的事情,除非有特别原因需要进行其它类型转换。对于那些习惯编写汇编代码的人来说,除非是特殊需要,才会被迫去编写一种不同的类型转换。显然,这种情况下提出编写转换是很自然的事情。虽然,你可以简单地写成这样 + +```C +if((double) i < (double) f) +``` + +顺便提一下,在这个问题中有趣的是,`unsigned`的优先级高于`int`,所以把`int`和`unsigned`进行比较时,最终进行的是unsigned类型的比较(开头提到的`0u < -1`就是这个道理)。我猜测这可能是在早些时候(计算机发展初期),当时的人们认为`unsigned`比`int`在所表示的数值范围上受到的限制更小:现在还不需要符号位,所以可以使用额外的位来表示更大的数值范围。如果你觉得`int`可能会溢出,那么就使用unsigned好了——在使用16位表示的ints时这个担心会更明显。 + +---- +via:[stackoverflow](http://stackoverflow.com/questions/28010565/why-does-c-promote-an-int-to-a-float-when-a-float-cannot-represent-all-int-val/28011249#28011249) + +作者:[wintermute][a] +译者:[KayGuoWhu](https://github.com/KayGuoWhu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://stackoverflow.com/users/4301306/wintermute \ No newline at end of file From 8ce034ad6471980109daadaab254be4d37844e67 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 8 Mar 2015 11:44:25 +0800 Subject: [PATCH 0213/2517] translated --- ...pdate cannot be used to add new CD-ROMs.md | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) rename {sources => translated}/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md (53%) diff --git a/sources/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md b/translated/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md similarity index 53% rename from sources/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md rename to translated/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md index c8621c895a..77c4c05d63 100644 --- a/sources/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md +++ b/translated/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md @@ -1,10 +1,8 @@ -Translating----geekpi - -How To Fix: Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs +如何修复:apt-get update无法添加新的CD-ROM ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/12/elementary_OS_Freya.jpg) -These days I am experimenting with Elementary OS Freya and during this, I encountered a very common updater error: **Failed to fetch cdrom Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs**. The complete error looked like this after running the apt-get update command: +这些天我正在体验Elementary OS Freya,在这期间,我遇到了一个非常常见的更新错误:**Failed to fetch cdrom Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs**。完整的错误在运行apt-get update后看上去像这样: > W: Failed to fetch cdrom://elementary OS 0.3 _Freya_ – Daily amd64 (20150208)/dists/trusty/main/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs > @@ -12,33 +10,33 @@ These days I am experimenting with Elementary OS Freya and during this, I encoun > > E: Some index files failed to download. They have been ignored, or old ones used instead. -In this post, we shall see how to fix this error. +本篇中,我们会了解如何修复这个错误。 -### Fix Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs error ### +### 修复apt-get update无法添加新的CD-ROM的错误 ### -The reason for this error is that cdrom has been included as one of the the sources here. And to fix this issue, we need to remove this from the list of software sources. +这个错误的原因是cdrom已经被包含在源之中。要修复这个问题,我们需要将它从软件源中移除。 -In Ubuntu, look for Software & Updates: +在Ubuntu中,找到“软件与更新”: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Software_Update_Ubuntu.jpeg) -In the first tab Ubuntu Software, look for the cdrom, if it’s checked, uncheck it. +在Ubuntu Software的第一个标签中,找到cdrom,如果它是勾选的,那么取消勾选。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/CDROM_Error_Update_Software_Sources.jpeg) -Close the Software Sources and run the update again. It should work fine now. +关闭软件源并再次运行更新。现在应该可以用了。 -### Further troubleshoot: ### +### 进一步故障排除: ### -The method described above should have fixed this **apt-get update cannot be used to add new CD-ROMs** error. But this was not the case for me because the option of cdrom was already grayed out as I was using live session. +上面描述的方法已经修复了这个**apt-get update cannot be used to add new CD-ROMs**错误。但是这个方法对我无效,因为cdrom的选项这时是灰色的,因为我使用的live版本。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/CDROM_Update_Error.png) -Now to fix our error, we shall take the command line route. Open a terminal and use the following line to see what is included in sources list: +现在要修复我们的问题了,我们是要采用命令行路线。打开终端并查看软件源中包含了哪些源: cat /etc/apt/sources.list -The output for me was as following: +我的输出是下面这样: deb cdrom:[elementary OS 0.3 _Freya_ – Daily amd64 (20150208)]/ trusty main restricted deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse @@ -48,17 +46,17 @@ The output for me was as following: deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse -Look at the first line in the above list. It includes cdrom. We need to comment out this line by adding # in front of it to make it look like this: +在上面的第一行中。它包含了cdrom。我们需要用‘#’来注释掉这行: #deb cdrom:[elementary OS 0.3 _Freya_ – Daily amd64 (20150208)]/ trusty main restricted -To do that use the command below: +要用下面的命令来: sudo gedit /etc/apt/sources.list -Once you have edited the sources.list, run the apt-get update once again. The error apt-get update cannot be used to add new CD-ROMs should have been fixed. If you are facing any other update issue, do look at this article which is a collection of most [common Ubuntu update error fixes][1]. +在你编辑完软件源后,再次运行apt-get update。“apt-get update cannot be used to add new CD-ROMs”这个错误应该已经修复了。如果你还遇到其他的问题,看一下这篇收集了大部分[Ubuntu常见更新错误修复][1]的文章。 -I hope you found this tutorial helpful. If you have any questions or suggestions, feel free to drop a comment. +我希望这篇教程对你有用。如果你还有其他的问题和建议,请在下面留言。 -------------------------------------------------------------------------------- @@ -71,4 +69,4 @@ via: http://itsfoss.com/fix-failed-fetch-cdrom-aptget-update-add-cdroms/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/fix-update-errors-ubuntu-1404/ \ No newline at end of file +[1]:http://itsfoss.com/fix-update-errors-ubuntu-1404/ From 5d162ca9ef3a61a71c67f0da7e89b0e9b44a7a1c Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 8 Mar 2015 23:36:55 +0800 Subject: [PATCH 0214/2517] =?UTF-8?q?=E8=A1=A5=E5=85=85=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @theo-l --- ...us Case of the Disappearing Distros.md.swp | Bin 20480 -> 0 bytes .../tech/20150306 Nmap--Not Just for Evil.md | 43 ------------------ 2 files changed, 43 deletions(-) delete mode 100644 sources/talk/.20141224 The Curious Case of the Disappearing Distros.md.swp delete mode 100644 sources/tech/20150306 Nmap--Not Just for Evil.md diff --git a/sources/talk/.20141224 The Curious Case of the Disappearing Distros.md.swp b/sources/talk/.20141224 The Curious Case of the Disappearing Distros.md.swp deleted file mode 100644 index e00551e00df308f45da241238c3a8dae473ae1a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20480 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 DB@ Date: Sun, 8 Mar 2015 23:37:50 +0800 Subject: [PATCH 0215/2517] Translated 20150227 Bringing a Bunch of Best Known Linux Network Tools.md --- ...Bunch of Best Known Linux Network Tools.md | 446 ------------------ ...Bunch of Best Known Linux Network Tools.md | 443 +++++++++++++++++ 2 files changed, 443 insertions(+), 446 deletions(-) delete mode 100644 sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md create mode 100644 translated/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md diff --git a/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md b/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md deleted file mode 100644 index b5f8f6273e..0000000000 --- a/sources/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md +++ /dev/null @@ -1,446 +0,0 @@ -FSSlc translating - -Bringing a Bunch of Best Known Linux Network Tools -================================================================================ -It is very useful to use command line tools to monitor the network on your system and there are a tons of them out there available for the linux user such as nethogs, ntopng, nload, iftop, iptraf, bmon, slurm, tcptrack, cbm, netwatch, collectl, trafshow, cacti, etherape, ipband, jnettop, netspeed and speedometer. - -Since there are many linux gurus and developers out there it is obvious that other network monitoring tools exist but I am not going to cover all of them in this tutorial. - -Each one of the above tools has its own specifics but at the end all they do is monitor network traffic and there is not really only one way to do the job. For example nethogs can be used to show bandwidth per process in case you want to know the application which is consuming your entire network resources, iftop can be used to show bandwidth per socket connection and tools like nload help to get information about the overall bandwidth. - -### 1) nethogs ### - -nethogs is a free tool that is very handy when it comes to find out which PID is causing the trouble with your network traffic as it groups bandwidth by process instead of breaking the traffic down per protocol or per subnet, like most tools do. It is feature rich, supports both IPv4 and IPv6 and in my opinion is the best utility when you want to identify programs that are consuming all your bandwidth on your linux machine. - -A linux user can use **nethogs** to show TCP download and upload-speed per process, monitor a specific device by using the command **nethogs eth0** where eth0 is the name of the device you want to get information from and also get information on the speed at which the data is currently being transferred. - -To me nethogs is very easy to use, maybe because I like it so much that I use it all the time to monitor network bandwidth on my Ubuntu 12.04 LTS machine. - -For example to sniff in promiscious the option -p is used like shown in the following command. - - nethogs -p wlan0 - -If you like to learn more about nethogs and explore it in a very deep way than don't hesitate to read our full tutorial on this network bandwidth monitoring tool. - -### 2) nload ### - -nload is a console application which can be used to monitor network traffic and bandwidth usage in real time and it also visualizes the traffic by providing two easy to understand graphs. This cool network monitoring tool can also be used to switch between devices while monitoring and this can be done by pressing the left and right arrow keys. - -![network monitoring tools in linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload8.png) - -As you can see from the above screenshot graphs provided by the nload tool are very easy to understand, provide useful information and also display additional info like total amount of transferred data and min/max network usage. - -And what is even cooler is the fact that you can run the tool nload with the help of the following command which seems to be very short and easy to remember. - - nload - -I am very sure that our detailed tutorial on how to use nload will help new linux users and even experienced ones that are looking for more information on it. - -### 3) slurm ### - -slurm is another network load monitoring tool for linux which shows results in a nice ascii grap and it also supports many keys for interaction such as c to switch to classic mode, s to switch to split graph mode, **r** to redraw the screen, **L** to enable TX/RX led, **m** to switch between classic split and large view, and **q** to quit slurm. - -![linux network load monitoring tools](http://blog.linoxide.com/wp-content/uploads/2013/12/slurm2.png) - -There are also some other keys available in the network load monitoring tool slurm and you can easily study them in the manual page by using the following command. - - man slurm - -slurm is available in the official repos of Ubuntu and Debian so users of these distros can easy download it by using the apt-get install command like shown below. - - sudo apt-get install slurm - -We have covered slurm usage on a tutorial so please visit it and do not forget to share the knowledge with other linux friends. - -### 4) iftop ### - -iftop is a very useful tool when you want to display bandwidth usage on an interface by host. According to the manual page **iftop** listens to network traffic on a named interface, or on the first -interface it can find which looks like an external interface if none is specified, and displays a table of current bandwidth usage by pairs of hosts. - -Ubuntu and Debian users can easily install iftop on their machines by using the following command on a terminal. - - sudo apt-get install iftop - -Use the following command to install iftop on your machine using yum - - yum -y install iftop - -### 5) collectl ### - -collectl can be used to collect data that describes the current system status and it supports the following modes: - -- Record Mode -- Playback Mode - -**Record Mode** allows to take data from a live system and either display it on a terminal or writte to one or more files or a socket. - -**Playback Mode** - -According to the manual pages in this mode data is read from one or more data files that were generated in Record Mode. - -Ubuntu and Debian users can use their default package manager to install collectl on their machines. The following command will do the job for them. - - sudo apt-get install collectl - -Use the following command because these distros have collectl in their official repos too. - - yum install collectl - -### 6) Netstat ### - -Netstat is a command line tool for **monitoring incoming** and **outgoing network packets statistics** as well as interface statistics. It displays network connections for the Transmission Control Protocol (both incoming and outgoing),routing tables, and a number of network interface (network interface controller or software-defined network interface) and network protocol statistics. - -Ubuntu and Debian users can use the default package manager to install netstat on their box. Netstat software includes inside the package net-tools. And can be installed by running the below commands in a shell or terminal: - - sudo apt-get install net-tools - -CentOS, Fedora, RHEL users can use the default package manager to install netstat on their box. Netstat software includes inside the package net-tools. And can be installed by running the below commands in a shell or terminal: - - yum install net-tools - -Simply, run the following to monitor the network packet statistic with Netstat: - - netstat - -![Netstat](http://blog.linoxide.com/wp-content/uploads/2015/02/netstat.png) - -For more information or manual about netstat, we can simply type man netstat in a shell or terminal: - - man netstat - -![man netstat](http://blog.linoxide.com/wp-content/uploads/2015/02/man-netstat.png) - -### 7) Netload ### - -The netload command just displays a small report on the current traffic load, and the total number of bytes transferred since the program start. No more features are there. Its part of the netdiag. - -We can install Netload using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][1] . - - # yum install netdiag - -Netload is available in the default repository as a part of netdiag so, we can easily install **netdiag** using **apt** manager using the command below. - - $ sudo install netdiag - -To run netload, we must make sure to choose a working network interface name like eth0, eh1, wlan0, mon0, etc. And run the following command accordingly in a shell or a terminal. - - $ netload wlan2 - -Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. - -### 8) Nagios ### - -Nagios is a leading open source powerful monitoring system that enables network/system administrators to identify and resolve server related problems before they affect major business processes. With the Nagios system, administrators can able to monitor remote Linux, Windows, Switches, Routers and Printers on a single window. It shows critical warnings and indicates if something went wrong in your network/server which indirectly helps you to begin remediation processes before they occur. - -Nagios has a web interface in which there is a graphical monitor of activities. One can login to the web interface by browsing to the url http://localhost/nagios/ or http://localhost/nagios3/ . Please replace localhost with your IP-address if on remote machine. Then enter the username and pass then, we'll get to see the information like shown below. - -![Nagios3 on Chromium](http://blog.linoxide.com/wp-content/uploads/2015/02/nagios3-ubuntu.png) - -### 9) EtherApe ### - -EtherApe is a graphical network monitor for Unix modeled after etherman. Featuring link layer, IP and TCP modes and support interfaces Ethernet, FDDI, Token Ring, ISDN, PPP, SLIP and WLAN devices, plus several encapsulation formats. Hosts and links change in size with traffic and color coded protocols display. It can filter traffic to be shown, and can read packets from a file as well as live from the network. - -It is easy to install etherape in CentOS, Fedora, RHEL distributions of Linux cause they are available default on their official repository. We can use yum manager to install it with the command shown below: - - yum install etherape - -We can install EtherApe on Ubuntu, Debian and their derivatives using **apt** manager with the below command. - - sudo apt-get install etherape - -After EtherApe is installed on the system, we'll need to run etherape in root permission as: - - sudo etherape - -Then, the **GUI** of **etherape** will be executed. Then, up in the menu we can select the **Mode** (IP, Link Layer, TCP) and **Interface** under **Capture**. After everything are set, we'll need to click **Start** button. Then, we'll gonna see something like this. - -![EtherApe](http://blog.linoxide.com/wp-content/uploads/2015/02/etherape.png) - -### 10) tcpflow ### - -tcpflow is a command line utility that captures data transmitted as part of TCP connections (flows), and stores the data in a way that is convenient for protocol analysis or debugging. It reconstructs the actual data streams and stores each flow in a separate file for later analysis. It understands TCP sequence numbers and will correctly reconstruct data streams regardless of retransmissions or out-of-order delivery . - -Installing tcpflow in Ubuntu, Debian system is easy via **apt** manager as it is available by default in the official repository. - - $ sudo apt-get install tcpflow - -We can install tcpflow in Fedora, CentOS, RHEL and their derivatives from repository using **yum** manager as shown below. - - # yum install tcpflow - -If it is not available in the repository or can't be installed via yum manager, we need to install manually from **http://pkgs.repoforge.org/tcpflow/** as shown below. - -If you are running 64 bit PC: - - # yum install --nogpgcheck http://pkgs.repoforge.org/tcpflow/tcpflow-0.21-1.2.el6.rf.x86_64.rpm - -If you are running 32 bit PC: - - # yum install --nogpgcheck http://pkgs.repoforge.org/tcpflow/tcpflow-0.21-1.2.el6.rf.i686.rpm - -We can use tcpflow to capture all/some tcp traffic and put it in an easy to read file. The below command does what we want but we'll need to run that command in an empty directory as it creates files of the format x.x.x.x.y-a.a.a.a.z and after done, just press Control-C that command to stop it. - - $ sudo tcpflow -i eth0 port 8000 - -Note: Please replace eth0 with the interface of the card you are trying to capture. - -### 11) IPTraf ### - -[IPTraf][2] is a console-based network statistics utility for Linux. It gathers a variety of figures such as TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts. - -IPTraf is available in the default repository so, we can easily install IPTraf using **apt** manager using the command below. - - $ sudo apt-get install iptraf - -IPTraf is available in the default repository so, we can easily install IPTraf using yum manager using the command below. - - # yum install iptraf - -We need to run TPTraf in administration permission with a valid network interface name. Here, we have wlan2 so, we'll be using wlan2 as interface name. - - $ sudo iptraf - -![IPTraf](http://blog.linoxide.com/wp-content/uploads/2015/02/iptraf.png) - -To start the general interface statistics, enter: - - # iptraf -g - -To see the detailed statistics facility on an interface called eth0 - - # iptraf -d wlan2 - -To see the TCP and UDP monitor on an interface called eth0 - - # iptraf -z wlan2 - -To displays the packet size counts on an interface called eth0 - - # iptraf -z wlan2 - -Note: Please replace wlan2 with your interface name. You can check your interface by running command ip link show . - -### 12) Speedometer ### - -Speedometer is a small and simple tool that just draws out good looking graphs of incoming and outgoing traffic through a given interface. - -Speedometer is available in the default repository so, we can easily install Speedometer using yum manager using the command below. - - # yum install speedometer - -Speedometer is available in the default repository so, we can easily install Speedometer using apt manager using the command below. - - $ sudo apt-get install speedometer - -Speedometer can simply be run by executing the following command in a shell or a terminal. - - $ speedometer -r wlan2 -t wlan2 - -![Speedometer](http://blog.linoxide.com/wp-content/uploads/2015/02/Speedometer.png) - -Note: Please replace wlan2 with the network interface name you would like to use. - -### 13) Netwatch ### - -Netwatch is part of the netdiag collection of tools, and it too displays the connections between local host and other remote hosts, and the speed at which data is transferring on each connection. - -We can install Netwatch using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][3] . - - # yum install netwatch - -Netwatch is available in the default repository as a part of netdiag so, we can easily install **netdiag** using **apt** manager using the command below. - - $ sudo install netdiag - -To run netwatch, we'll need to execute the following command in a terminal or shell. - - $ sudo netwatch -e wlan2 -nt - -![Netwatch](http://blog.linoxide.com/wp-content/uploads/2015/02/netwatch.png) - -Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. - -### 14) Trafshow ### - -Trafshow reports the current active connections like netwatch and pktstat, trafshow, their protocol and the data transfer speed on each connection. It can filter out connections using pcap type filters. - -We can install Netwatch using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][4] . - -# yum install trafshow - -Trafshow is available in the default repository so, we can easily install it using **apt** manager using the command below. - - $ sudo install trafshow - -To monitor using trafshow, we'll need to run the following command in a shell or terminal. - - $ sudo trafshow -i wlan2 - -![Trafshow](http://blog.linoxide.com/wp-content/uploads/2015/02/trafshow-all.png) - -To monitor specifically tcp connections add tcp as shown below. - - $ sudo trafshow -i wlan2 tcp - -![Trafshow tcp](http://blog.linoxide.com/wp-content/uploads/2015/02/trafshow-tcp.png) - -Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. - -### 15) Vnstat ### - -Vnstat is bit different from most of the other tools. It actually runs a background service/daemon and keeps recording the size of data transfer all the time. Next it can be used to generate a report of the history of network usage. - -We'll need to turn on EPEL Repository then run **yum** manager to install vnstat. - - # yum install vnstat - -Vnstat is available in the default repository. So, we can run **apt** manager to install it using the following command. - - $ sudo apt-get install vnstat - -Running vnstat without any options would simply show the total amount of data transfer that took place since the date the daemon is running. - - $ vnstat - -![vnstat](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat.png) - -To monitor the bandwidth usage in realtime, use the '-l' option (live mode). It would then show the total bandwidth used by incoming and outgoing data, but in a very precise manner without any internal details about host connections or processes. - - $ vnstat -l - -![Vnstat live mode](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat-live.png) - -After done, press Ctrl-C to stop which will result the following type of output - -![Vnstat Live Result](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat-live-result.png) - -### 16) tcptrack ### - -[tcptrack][5] displays the status of TCP connections that it sees on a given network interface. tcptrack monitors their state and displays information such as state, source/destination addresses and bandwidth usage in a sorted, updated list very much like the **top** command. - -As tcptrack is in the repository , we can simply install tcptrack in Debian, Ubuntu from their repository using apt manager. To do so, we'll need to execute the following command in a shell or terminal: - - $ sudo apt-get install tcptrack - -We can install it using yum in fedora as it is in the default repository. But if you're running CentOS or RHEL, we'll need to install [rpmforge repository][6] . To do so, we'll need to run the following commands. - - # wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm - - # rpm -Uvh rpmforge-release*rpm - - # yum install tcptrack - -Note: Here, we have downloaded current latest version of rpmforge-release ie 0.5.3-1 . You can always get the latest version from rpmforge repository and do replace with that you downloaded in the above command. - -**tcptrack** needs to be run in root permission or superuser. We'll need to execute tcptrack with the network interface name we wanna monitor the TCP connections of. Here, we've wlan2 so will be using that as: - - sudo tcptrack -i wlan2 - -![tcptrack](http://blog.linoxide.com/wp-content/uploads/2015/02/tcptrack.png) - -If you wanna monitor of specific ports then: - - # tcptrack -i wlan2 port 80 - -![tcptrack port 80](http://blog.linoxide.com/wp-content/uploads/2015/02/tcptrack-port-80.png) - -Please replace 80 with the port number you wanna monitor .Note: Please replace wlan2 with the network interface name you wanna use. If you wanna scan for your network interface name run ip link show in a terminal or shell. - -### 17) CBM ### - -The CBM or Color Bandwidth Meter displays current traffic of all network device. This program is so simple that is should be self-explanatory. Source code and newer versions of CBM are available at [http://www.isotton.com/utils/cbm/][7] . - -As CBM is in the repository , we can simply install CBM in Debian, Ubuntu from their repository using **apt** manager. To do so, we'll need to execute the following command in a shell or terminal: - - $ sudo apt-get install cbm - -We simply need to run cbm in a shell or terminal as shown below: - - $ cbm - -![Color Bandwidth Meter](http://blog.linoxide.com/wp-content/uploads/2015/02/cbm.png) - -### 18) bmon ### - -[Bmon][8] or Bandwidth Monitoring is a tool that intended for debugging and monitor bandwidth in real-time access. This tool is capable to retrieving statistics from various input modules. It provides various output methods including a curses based interface,lightweight HTML output but also formatable ASCII output. - -bmon is available in the repository, so we can install it in Debian, Ubuntu from their repository using apt manager. To do so, we'll need to run the following command in a shell or terminal. - - $ sudo apt-get install bmon - -We can run bmon and monitor our bandwidth status using the command below. - - $ bmon - -![bmon](http://blog.linoxide.com/wp-content/uploads/2015/02/bmon.png) - -### 19) tcpdump ### - -[TCPDump][9] is a tool for network monitoring and data acquisition. It can save lots of time and can be used for debugging network or server related problems. It prints out a description of the contents of packets on a network interface that match the boolean expression. - -tcpdump is available in the default repository of Debian, Ubuntu so, we can simply use apt manager to install it under sudo privilege . To do so, we'll need to run the following command in a shell or terminal. - - $ sudo apt -get install tcpdump - -tcpdump is also available in the repository of Fedora, CentOS, RHEL so, we can install it via yum manager as: - - # yum install tcpdump - -tcpdump needs to be run in root permission or superuser. We'll need to execute tcpdump with the network interface name we wanna monitor the TCP connections of. Here, we've wlan2 so will be using it as: - - $ sudo tcpdump -i wlan2 - -![tcpdump](http://blog.linoxide.com/wp-content/uploads/2015/02/tcpdump.png) - -If you want to monitor to a specific port only, then can run the command as follows. Here is the example for port 80 (webserver). - - $ sudo tcpdump -i wlan2 'port 80' - -![tcpdump port](http://blog.linoxide.com/wp-content/uploads/2015/02/tcpdump-port.png) - -### 20) ntopng ### - -[ntopng][20] is the next generation version of the original ntop. It is a network probe that shows network usage in a way similar to what top does for processes. ntopng is based on libpcap and it has been written in a portable way in order to virtually run on every Unix platform, MacOSX and on Win32 as well. - -To install ntopng in Debian, Ubuntu system, we'll first need to install the required **dependencies packages to compile ntopng**. You can install them all by running the below command in a shell or a terminal. - - $ sudo apt-get install libpcap-dev libglib2.0-dev libgeoip-dev redis-server wget libxml2-dev build-essential checkinstall - -Now, we'll need to manually compile ntopng for our system as: - - $ sudo wget http://sourceforge.net/projects/ntop/files/ntopng/ntopng-1.1_6932.tgz/download - $ sudo tar zxfv ntopng-1.1_6932.tgz - $ sudo cd ntopng-1.1_6932 - $ sudo ./configure - $ sudo make - $ sudo make install - -Now, you should have your ntopng installed in your Debian or Ubuntu system. - -We have already covered tutorial on ntopng usages. It is available in both command line and web interface. We can go ahead to get knowledge on it. - -### Conclusion ### - -In this first part we covered some network load monitoring tools for linux that are very helpful to a sysadmin and even a novice user. Each one of the tools covered in this article has its own specifics, different options but at the end they all help you to monitor your network traffic. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/monitoring-2/network-monitoring-tools-linux/ - -作者:[Bobbin Zachariah][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/bobbin/ -[1]:http://pkgs.org/centos-7/repoforge-x86_64/netwatch-1.0c-1.el7.rf.x86_64.rpm.html -[2]:http://iptraf.seul.org/ -[3]:http://pkgs.org/centos-7/repoforge-x86_64/netwatch-1.0c-1.el7.rf.x86_64.rpm.html -[4]:http://pkgs.org/centos-6/epel-x86_64/trafshow-5.2.3-6.el6.x86_64.rpm.html -[5]:http://linux.die.net/man/1/tcptrack -[6]:http://pkgs.org/centos-6/repoforge-x86_64/tcptrack-1.4.0-1.el6.rf.x86_64.rpm.html -[7]:http://www.isotton.com/utils/cbm/ -[8]:https://github.com/tgraf/bmon/ -[9]:http://www.tcpdump.org/ -[10]:http://www.ntop.org/ diff --git a/translated/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md b/translated/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md new file mode 100644 index 0000000000..112147414a --- /dev/null +++ b/translated/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md @@ -0,0 +1,443 @@ +领略一些最著名的 Linux 网络工具 +================================================================================ +在你的系统上使用命令行工具来监控你的网络是非常实用的,并且对于 Linux 用户来说,有着许许多多现成的工具可以使用,如 nethogs, ntopng, nload, iftop, iptraf, bmon, slurm, tcptrack, cbm, netwatch, collectl, trafshow, cacti, etherape, ipband, jnettop, netspeed 以及 speedometer。 + +鉴于世上有着许多的 Linux 专家和开发者,显然还存在其他的网络监控工具,但在这篇教程中,我不打算将它们所有包括在内。 + +上面列出的工具都有着自己的独特之处,但归根结底,它们都做着监控网络流量的工作,且并不是只有一种方法来完成这件事。例如 nethogs 可以被用来展示每个进程的带宽使用情况,以防你想知道究竟是哪个应用在消耗了你的整个网络资源; iftop 可以被用来展示每个套接字连接的带宽使用情况,而 像 nload 这类的工具可以帮助你得到有关整个带宽的信息。 + +### 1) nethogs ### + +nethogs 是一个免费的工具,当要查找哪个 PID (注:即 process identifier,进程 ID) 给你的网络流量带来了麻烦时,它是非常方便的。它按每个进程来组织带宽,而不是像大多数的工具那样按照每个协议或每个子网来划分流量。它功能丰富,同时支持 IPv4 和 IPv6,并且我认为,若你想在你的 Linux 主机上确定哪个程序正消耗着你的全部带宽,它是来做这件事的最佳的程序。 + +一个 Linux 用户可以使用 **nethogs** 来显示每个进程的 TCP 下载和上传速率,使用命令 **nethogs eth0** 来监控一个特定的设备,上面的 eth0 是那个你想获取信息的设备的名称,你还可以得到有关正在被传输的数据的传输速率的信息。 + +对我而言, nethogs 是非常容易使用的,或许是因为我非常喜欢它以至于我总是在我的 Ubuntu 12.04 LTS 机器中使用它来监控我的网络带宽。 + +例如要想使用混杂模式来嗅探,可以像下面展示的命令那样使用选项 -p: + + nethogs -p wlan0 + +假如你想更多地了解 nethogs 并深入探索它,那么请毫不犹豫地阅读我们做的关于这个网络带宽监控工具的整个教程。 + +### 2) nload ### + +nload 是一个控制台应用,可以被用来实时地监控网络流量和带宽使用情况,它还通过提供两个简单易懂的图表来对流量进行可视化。这个绝妙的网络监控工具还可以在监控过程中切换被监控的设备,而这可以通过按左右箭头来完成。 + +![network monitoring tools in linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload8.png) + +正如你在上面的截图中所看到的那样,由 nload 提供的图表是非常容易理解的。nload 提供了有用的信息,也展示了诸如被传输数据的总量和最小/最大网络速率等信息。 + +而更酷的是你可以在下面的命令的帮助下运行 nload 这个工具,这个命令是非常的短小且易记的: + + nload + +我很确信的是:我们关于如何使用 nload 的详细教程将帮助到新的 Linux 用户,甚至可以帮助那些正寻找关于 nload 信息的老手。 + +### 3) slurm ### + +slurm 是另一个 Linux 网络负载监控工具,它以一个不错的 ASCII 图来显示结果,它还支持许多键值用以交互,例如 **c** 用来切换到经典模式, **s** 切换到分图模式, **r** 用来重绘屏幕, **L** 用来启用 TX/RX(注:TX,发送流量;RX,接收流量) LED,**m** 用来在经典分图模式和大图模式之间进行切换, **q** 退出 slurm。 + +![linux network load monitoring tools](http://blog.linoxide.com/wp-content/uploads/2013/12/slurm2.png) + +在网络负载监控工具 slurm 中,还有许多其它的键值可用,你可以很容易地使用下面的命令在 man 手册中学习它们。 + + man slurm + +slurm 在 Ubuntu 和 Debian 的官方软件仓库中可以找到,所以使用这些发行版本的用户可以像下面展示的那样,使用 apt-get 安装命令来轻松地下载它: + + sudo apt-get install slurm + +我们已经在一个教程中对 slurm 的使用做了介绍,所以请访问相关网页( 注:应该指的是[这篇文章](http://linoxide.com/ubuntu-how-to/monitor-network-load-slurm-tool/) ),并不要忘记和其它使用 Linux 的朋友分享这些知识。 + +### 4) iftop ### + +当你想在一个接口上按照主机来展示带宽使用情况时,iftop 是一个非常有用的工具。根据 man 手册,**iftop** 在一个已命名的接口或在它可以找到的第一个接口(假如没有任何特殊情况,它就像一个外部的接口)上监听网络流量,并且展示出一个表格来显示当前一对主机间的带宽使用情况。 + +通过在虚拟终端中使用下面的命令,Ubuntu 和 Debian 用户可以在他们的机器中轻易地安装 iftop: + + sudo apt-get install iftop + +在你的机器上,可以使用下面的命令通过 yum 来安装 iftop: + + yum -y install iftop + +### 5) collectl ### + +collectl 可以被用来收集描述当前系统状态的数据,并且它支持如下两种模式: + +- 记录模式 +- 回放模式 + +**记录模式** 允许从一个正在运行的系统中读取数据,然后将这些数据要么显示在终端中,要么写入一个或多个文件或套接字中。 + +**回放模式** + +根据 man 手册,在这种模式下,数据从一个或多个由记录模式生成的数据文件中读取。 + +Ubuntu 和 Debian 用户可以在他们的机器上使用他们默认的包管理器来安装 colletcl。下面的命令将为他们做这个工作: + + sudo apt-get install collectl + +还可以使用下面的命令来安装 collectl, 因为对于这些发行版本(注:这里指的是用 yum 作为包管理器的发行版本),在它们官方的软件仓库中也含有 collectl: + + yum install collectl + +### 6) Netstat ### + +Netstat 是一个用来监控**传入和传出的网络数据包统计数据**和接口统计数据的命令行工具。它为传输控制协议 TCP (包括上传和下行),路由表,及一系列的网络接口(网络接口控制器或者软件定义的网络接口) 和网络协议统计数据展示网络连接情况。 + +Ubuntu 和 Debian 用户可以在他们的机器上使用默认的包管理器来安装 netstat。Netsta 软件被包括在 net-tools 软件包中,并可以在 shell 或虚拟终端中运行下面的命令来安装它: + + sudo apt-get install net-tools + +CentOS, Fedora, RHEL 用户可以在他们的机器上使用默认的包管理器来安装 netstat。Netstat 软件被包括在 net-tools 软件包中,并可以在 shell 或虚拟终端中运行下面的命令来安装它: + + yum install net-tools + +运行下面的命令使用 Netstat 来轻松地监控网络数据包统计数据: + + netstat + +![Netstat](http://blog.linoxide.com/wp-content/uploads/2015/02/netstat.png) + +更多的关于 netstat 的信息,我们可以简单地在 shell 或终端中键入 man netstat 来了解: + + man netstat + +![man netstat](http://blog.linoxide.com/wp-content/uploads/2015/02/man-netstat.png) + +### 7) Netload ### + +netload 命令只展示一个关于当前网络荷载和自从程序运行之后传输数据总的字节数目的简要报告,它没有更多的功能。它是 netdiag 软件的一部分。 + +我们可以在 fedora 中使用 yum 来安装 Netload,因为它在 fedora 的默认软件仓库中。但假如你运行的是 CentOS 或 RHEL,则我们需要安装 [rpmforge 软件仓库][1]。 + + # yum install netdiag + +Netload 在默认仓库中作为 netdiag 的一部分可以被找到,我们可以轻易地使用下面的命令来利用 **apt** 包管理器安装 **netdiag**: + + $ sudo apt-get install netdiag (注:这里原文为 sudo install netdiag,应该加上 apt-get) + +为了运行 netload,我们需要确保选择了一个正在工作的网络接口的名称,如 eth0, eh1, wlan0, mon0等,然后在 shell 或虚拟终端中运行下面的命令: + + $ netload wlan2 + +注意: 请将上面的 wlan2 替换为你想使用的网络接口名称,假如你想通过扫描了解你的网络接口名称,可以在一个虚拟终端或 shell 中运行 `ip link show` 命令。 + +### 8) Nagios ### + +Nagios 是一个领先且功能强大的开源监控系统,它使得网络或系统管理员在服务器相关的问题影响到服务器的主要事务之前,鉴定并解决这些问题。 有了 Nagios 系统,管理员便可以在一个单一的窗口中监控远程的 Linux 、Windows 系统、交换机、路由器和打印机等。它显示出重要的警告并指示出在你的网络或服务器中是否出现某些故障,这间接地帮助你在问题发生之前,着手执行补救行动。 + +Nagios 有一个 web 界面,其中有一个图形化的活动监视器。通过浏览网页 http://localhost/nagios/ 或 http://localhost/nagios3/ 便可以登录到这个 web 界面。假如你在远程的机器上进行操作,请使用你的 IP 地址来替换 localhost,然后键入用户名和密码,我们便会看到如下图所展示的信息: + +![在 Chromium 浏览器中的 Nagios3](http://blog.linoxide.com/wp-content/uploads/2015/02/nagios3-ubuntu.png) + +### 9) EtherApe ### + +EtherApe 是一个针对 Unix 的图形化网络监控工具,它仿照了 etherman 软件。它具有链路层,IP 和 TCP 模式并支持 Ethernet, FDDI, Token Ring, ISDN, PPP, SLIP 及 WLAN 设备等接口,再加上支持一些封装的格式。主机和链接随着流量大小和被着色的协议名称展示而变化。它可以过滤要展示的流量,并可从一个文件或运行的网络中读取数据报。 + +在 CentOS、Fedora、RHEL 等 Linux 发行版本中安装 etherape 是一件容易的事,因为在它们的官方软件仓库中就可以找到 etherape。我们可以像下面展示的命令那样使用 yum 包管理器来安装它: + + yum install etherape + +我们可以使用下面的命令在 Ubuntu、Debian 及它们的衍生发行版本中使用 **apt** 包管理器来安装 EtherApe : + + sudo apt-get install etherape + +在 EtherApe 安装到你的系统之后,我们需要像下面那样以 root 权限来运行 etherape: + + sudo etherape + +然后, **etherape** 的 **图形用户界面** 便会被执行。接着,在菜单上面的 **捕捉** 选项下,我们可以选择 **模式**(IP,链路层,TCP) 和 **接口**。一切设定完毕后,我们需要点击 **开始** 按钮。接着我们便会看到类似下面截图的东西: + +![EtherApe](http://blog.linoxide.com/wp-content/uploads/2015/02/etherape.png) + +### 10) tcpflow ### + +tcpflow 是一个命令行工具,它可以捕捉作为 TCP 连接(流)的一部分的传输数据,并以一种方便协议分析或除错的方式来存储数据。它重建了实际的数据流并将每个流存储在不同的文件中,以备日后的分析。它理解 TCP 序列号并可以正确地重建数据流,不管是在重发或乱序发送状态下。 + +通过 **apt** 包管理器在 Ubuntu 、Debian 系统中安装 tcpflow 是很容易的,因为默认情况下在官方软件仓库中可以找到它。 + + $ sudo apt-get install tcpflow + +我们可以使用下面的命令通过 **yum** 包管理器在 Fedora 、CentOS 、RHEL 及它们的衍生发行版本中安装 tcpflow: + + # yum install tcpflow + +假如在软件仓库中没有找到它或不能通过 yum 包管理器来安装它,则我们需要像下面展示的那样从 **http://pkgs.repoforge.org/tcpflow/** 上手动安装它: + +假如你运行 64 位的 PC: + + # yum install --nogpgcheck http://pkgs.repoforge.org/tcpflow/tcpflow-0.21-1.2.el6.rf.x86_64.rpm + +假如你运行 32 位的 PC: + + # yum install --nogpgcheck http://pkgs.repoforge.org/tcpflow/tcpflow-0.21-1.2.el6.rf.i686.rpm + +我们可以使用 tcpflow 来捕捉全部或部分 tcp 流量并以一种简单的方式把它们写到一个可读文件中。下面的命令执行着我们想要做的事情,但我们需要在一个空目录中运行下面的命令,因为它将创建诸如 x.x.x.x.y-a.a.a.a.z 格式的文件,做完这些之后,只需按 Ctrl-C 便可停止这个命令。 + + $ sudo tcpflow -i eth0 port 8000 + +注意:请将上面的 eth0 替换为你想捕捉的网卡接口名称。 + +### 11) IPTraf ### + +[IPTraf][2] 是一个针对 Linux 平台的基于控制台的网络统计应用。它生成一系列的图形,如 TCP 连接包和字节的数目、接口信息和活动指示器、 TCP/UDP 流量故障以及 LAN 状态包和字节的数目。 + +在默认的软件仓库中可以找到 IPTraf,所以我们可以使用下面的命令通过 **apt** 包管理器轻松地安装 IPTraf: + + $ sudo apt-get install iptraf + +在默认的软件仓库中可以找到 IPTraf,所以我们可以使用下面的命令通过 **yum** 包管理器轻松地安装 IPTraf: + + # yum install iptraf + +我们需要以管理员权限来运行 IPTraf(注:这里原文写错为 TPTraf),并带有一个可用的网络接口名。这里,我们的网络接口名为 wlan2,所以我们使用 wlan2 来作为接口的名称: + + $ sudo iptraf wlan2 (注:这里原文为 sudo iptraf,应该加上 wlan2) + +![IPTraf](http://blog.linoxide.com/wp-content/uploads/2015/02/iptraf.png) + +开始一般的网络接口统计,键入: + + # iptraf -g + +为了在一个名为 eth0 的接口设备上看详细的统计信息,使用: + + # iptraf -d wlan2 (注:这里的 wlan2 和 上面的 eth0 不一致,下面的几句也是这种情况,请相应地改正) + +为了看一个名为 eth0 的接口的 TCP 和 UDP 监控,使用: + + # iptraf -z wlan2 + +为了展示在一个名为 eth0 的接口上的包的大小和数目,使用: + + # iptraf -z wlan2 + +注意:请将上面的 wlan2 替换为你的接口名称。你可以通过运行`ip link show`命令来检查你的接口。 + +### 12) Speedometer ### + +Speedometer 是一个小巧且简单的工具,它只绘出一幅包含有通过某个给定端口的上行、下行流量的好看的图。 + +在默认的软件仓库中可以找到 Speedometer ,所以我们可以使用下面的命令通过 **yum** 包管理器轻松地安装 Speedometer: + + # yum install speedometer + +在默认的软件仓库中可以找到 Speedometer ,所以我们可以使用下面的命令通过 **apt** 包管理器轻松地安装 Speedometer: + + $ sudo apt-get install speedometer + +Speedometer 可以简单地通过在 shell 或虚拟终端中执行下面的命令来运行: + + $ speedometer -r wlan2 -t wlan2 + +![Speedometer](http://blog.linoxide.com/wp-content/uploads/2015/02/Speedometer.png) + +注:请将上面的 wlan2 替换为你想要使用的网络接口名称。 + +### 13) Netwatch ### + +Netwatch 是 netdiag 工具集里的一部分,并且它也显示出当前主机和其他远程主机的连接情况,以及在每个连接中数据传输的速率。 + +我们可以使用 yum 在 fedora 中安装 Netwatch,因为它在 fedora 的默认软件仓库中。但若你运行着 CentOS 或 RHEL , 我们需要安装 [rpmforge 软件仓库][3]。 + + # yum install netwatch + +Netwatch 作为 netdiag 的一部分可以在默认的软件仓库中找到,所以我们可以轻松地使用下面的命令来利用 **apt** 包管理器安装 **netdiag**: + + $ sudo apt-get install netdiag(注:这里应该加上 apt-get + +为了运行 netwatch, 我们需要在虚拟终端或 shell 中执行下面的命令: + + $ sudo netwatch -e wlan2 -nt + +![Netwatch](http://blog.linoxide.com/wp-content/uploads/2015/02/netwatch.png) + +注意: 请将上面的 wlan2 替换为你想使用的网络接口名称,假如你想通过扫描了解你的网络接口名称,可以在一个虚拟终端或 shell 中运行 `ip link show` 命令。 + +### 14) Trafshow ### + +Trafshow 同 netwatch 和 pktstat(注:这里原文中多了一个 trafshow)一样,可以报告当前激活的连接里使用的协议和每个连接中数据传输的速率。它可以使用 pcap 类型的滤波器来筛选出特定的连接。 + +我们可以使用 yum 在 fedora 中安装 trafshow(注:这里原文为 Netwatch,应该为 trafshow),因为它在 fedora 的默认软件仓库中。但若你正运行着 CentOS 或 RHEL , 我们需要安装 [rpmforge 软件仓库][4]。 + + # yum install trafshow + +Trafshow 在默认仓库中可以找到,所以我们可以轻松地使用下面的命令来利用 **apt** 包管理器安装它: + + $ sudo apt-get install trafshow(注:原文少了 apt-get) + +为了使用 trafshow 来执行监控任务,我们需要在虚拟终端或 shell 中执行下面的命令: + + $ sudo trafshow -i wlan2 + +![Trafshow](http://blog.linoxide.com/wp-content/uploads/2015/02/trafshow-all.png) + +为了特别地监控 tcp 连接,如下面一样添加上 tcp 参数: + + $ sudo trafshow -i wlan2 tcp + +![Trafshow tcp](http://blog.linoxide.com/wp-content/uploads/2015/02/trafshow-tcp.png) + +注意: 请将上面的 wlan2 替换为你想使用的网络接口名称,假如你想通过扫描了解你的网络接口名称,可以在一个虚拟终端或 shell 中运行 `ip link show` 命令。 + +### 15) Vnstat ### + +与大多数的其他工具相比,Vnstat 有一点不同。实际上它运行一个后台服务或守护进程,并时刻记录着传输数据的大小。另外,它可以被用来生成一个带有网络使用历史记录的报告。 + +我们需要开启 EPEL 软件仓库,然后运行 **yum** 包管理器来安装 vnstat。 + + # yum install vnstat + +Vnstat 在默认软件仓库中可以找到,所以我们可以使用下面的命令运行 **apt** 包管理器来安装它: + + $ sudo apt-get install vnstat + +不带有任何选项运行 vnstat 将简单地展示出从该守护进程运行后数据传输的总量。 + + $ vnstat + +![vnstat](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat.png) + +为了实时地监控带宽使用情况,使用 ‘-l’ 选项(实时模式)。然后它将以一种非常精确的方式来展示被上行和下行数据所使用的带宽总量,但不会显示任何有关主机连接或进程的内部细节。 + + $ vnstat -l + +![Vnstat 实时模式](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat-live.png) + +完成了上面的步骤后,按 Ctrl-C 来停止,这将会得到如下类型的输出: + +![Vnstat 实时结果](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat-live-result.png) + +### 16) tcptrack ### + +[tcptrack][5] 可以展示 TCP 连接的状态,它在一个给定的网络端口上进行监听。tcptrack 监控它们的状态并展示出一个经过排列且不断更新的有关来源/目标地址、带宽使用情况等信息的列表,这与 **top** 命令的输出非常类似 。 + +鉴于 tcptrack 在软件仓库中,我们可以轻松地在 Debian、Ubuntu 系统中从软件仓库使用 **apt** 包管理器来安装 tcptrack。为此,我们需要在 shell 或虚拟终端中执行下面的命令: + + $ sudo apt-get install tcptrack + +我们可以通过 yum 在 fedora 中安装它,因为它在 fedora 的默认软件仓库中。但若你运行着 CentOS 或 RHEL 系统,我们需要安装 [rpmforge 软件仓库][6]。为此,我们需要运行下面的命令: + + # wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm + + # rpm -Uvh rpmforge-release*rpm + + # yum install tcptrack + +注:这里我们下载了 rpmforge-release 的当前最新版本,即 0.5.3-1,你总是可以从 rpmforge 软件仓库中下载其最新版本,并请在上面的命令中替换为你下载的版本。 + +**tcptrack** 需要以 root 权限或超级用户身份来运行。执行 tcptrack 时,我们需要带上那个我们想监视的网络接口 TCP 连接状况的接口名称。这里我们的接口名称为 wlan2,所以如下面这样使用: + + sudo tcptrack -i wlan2 + +![tcptrack](http://blog.linoxide.com/wp-content/uploads/2015/02/tcptrack.png) + +假如你想监控特定的端口,则使用: + + # tcptrack -i wlan2 port 80 + +![tcptrack port 80](http://blog.linoxide.com/wp-content/uploads/2015/02/tcptrack-port-80.png) + +请替换上面的 80 为你想要监控的端口号。注意: 请将上面的 wlan2 替换为你想使用的网络接口名称,假如你想通过扫描了解你的网络接口名称,可以在一个虚拟终端或 shell 中运行 `ip link show` 命令。 + +### 17) CBM ### + +CBM 或 Color Bandwidth Meter 可以展示出当前所有网络设备的流量使用情况。这个程序是如此的简单,以至于应该可以从它的名称中看出其功能。CBM 的源代码和新版本可以在 [http://www.isotton.com/utils/cbm/][7] 上找到。 + +鉴于 CBM 已经包含在软件仓库中,我们可以简单地使用 **apt** 包管理器从 Debian、Ubuntu 的软件仓库中安装 CBM。为此,我们需要在一个 shell 窗口或虚拟终端中运行下面的命令: + + $ sudo apt-get install cbm + +我们只需使用下面展示的命令来在 shell 窗口或虚拟终端中运行 cbm: + + $ cbm + +![Color Bandwidth Meter](http://blog.linoxide.com/wp-content/uploads/2015/02/cbm.png) + +### 18) bmon ### + +[Bmon][8] 或 Bandwidth Monitoring ,是一个用于调试和实时监控带宽的工具。这个工具能够检索各种输入模块的统计数据。它提供了多种输出方式,包括一个基于 curses 库的界面,轻量级的HTML输出,以及 ASCII 输出格式。 + +bmon 可以在软件仓库中找到,所以我们可以通过使用 apt 包管理器来在 Debian、Ubuntu 中安装它。为此,我们需要在一个 shell 窗口或虚拟终端中运行下面的命令: + + $ sudo apt-get install bmon + +我们可以使用下面的命令来运行 bmon 以监视我们的网络状态: + + $ bmon + +![bmon](http://blog.linoxide.com/wp-content/uploads/2015/02/bmon.png) + +### 19) tcpdump ### + +[TCPDump][9] 是一个用于网络监控和数据获取的工具。它可以为我们节省很多的时间,并可用来调试网络或服务器 的相关问题。它打印出在某个网络接口上与布尔表达式匹配的数据包所包含的内容的一个描述。 + +tcpdump 可以在 Debian、Ubuntu 的默认软件仓库中找到,我们可以简单地以 sudo 权限使用 apt 包管理器来安装它。为此,我们需要在一个 shell 窗口或虚拟终端中运行下面的命令: + + $ sudo apt -get install tcpdump + +tcpdump 也可以在 Fedora、CentOS、RHEL 的软件仓库中找到。我们可以像下面一样通过 yum 包管理器来安装它: + + # yum install tcpdump + +tcpdump 需要以 root 权限或超级用户来运行,我们需要带上我们想要监控的 TCP 连接的网络接口名称来执行 tcpdump 。在这里,我们有 wlan2 这个网络接口,所以可以像下面这样使用: + + $ sudo tcpdump -i wlan2 + +![tcpdump](http://blog.linoxide.com/wp-content/uploads/2015/02/tcpdump.png) + + +假如你只想监视一个特定的端口,则可以运行下面的命令。下面是一个针对 80 端口(网络服务器)的例子: + + $ sudo tcpdump -i wlan2 'port 80' + +![tcpdump port](http://blog.linoxide.com/wp-content/uploads/2015/02/tcpdump-port.png) + +### 20) ntopng ### + +[ntopng][20] 是 ntop 的下一代版本。它是一个用于展示网络使用情况的网络探头,在一定程度上它与 top 针对进程所做的工作类似。ntopng 基于 libpcap 并且它以可移植的方式被重写,以达到可以在每一个 Unix 平台 、 MacOSX 以及 Win32 上运行的目的。 + +为了在 Debian,Ubuntu 系统上安装 ntopng,首先我们需要安装 **编译 ntopng 所需的依赖软件包**。你可以通过在一个 shell 窗口或一个虚拟终端中运行下面的命令来安装它们: + + $ sudo apt-get install libpcap-dev libglib2.0-dev libgeoip-dev redis-server wget libxml2-dev build-essential checkinstall + +现在,我们需要像下面一样针对我们的系统手动编译 ntopng : + + $ sudo wget http://sourceforge.net/projects/ntop/files/ntopng/ntopng-1.1_6932.tgz/download + $ sudo tar zxfv ntopng-1.1_6932.tgz + $ sudo cd ntopng-1.1_6932 + $ sudo ./configure + $ sudo make + $ sudo make install + +这样,在你的 Debian 或 Ubuntu 系统上应该已经安装上了你编译的 ntopng 。 + +我们已经有了有关 ntopng 的使用方法的[教程](linoxide.com/monitoring-2/ntopng-network-monitoring-tool/),它既可以在命令行也可以在 Web 界面中使用,我们可以前往这些教程来获得有关 ntopng 的知识。 + +### 结论 ### + +在第一部分中(注:我认为原文多了 first 这个单词,总之是前后文的内容有些不连贯),我们介绍了一些在 Linux 下的网络负载监控工具,这对于系统管理员甚至是新手来说,都是很有帮助的。在这篇文章中介绍的每一个工具都有其特点,不同的选项等,但最终它们都可以帮助你来监控你的网络流量。 +-------------------------------------------------------------------------------- + +via: http://linoxide.com/monitoring-2/network-monitoring-tools-linux/ + +作者:[Bobbin Zachariah][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bobbin/ +[1]:http://pkgs.org/centos-7/repoforge-x86_64/netwatch-1.0c-1.el7.rf.x86_64.rpm.html +[2]:http://iptraf.seul.org/ +[3]:http://pkgs.org/centos-7/repoforge-x86_64/netwatch-1.0c-1.el7.rf.x86_64.rpm.html +[4]:http://pkgs.org/centos-6/epel-x86_64/trafshow-5.2.3-6.el6.x86_64.rpm.html +[5]:http://linux.die.net/man/1/tcptrack +[6]:http://pkgs.org/centos-6/repoforge-x86_64/tcptrack-1.4.0-1.el6.rf.x86_64.rpm.html +[7]:http://www.isotton.com/utils/cbm/ +[8]:https://github.com/tgraf/bmon/ +[9]:http://www.tcpdump.org/ +[10]:http://www.ntop.org/ \ No newline at end of file From 5ac98448fc9de78e7c2be5ba377514f5fbbd2ecb Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 8 Mar 2015 23:48:46 +0800 Subject: [PATCH 0216/2517] Update 20150205 How To Use Smartphones Like Weather Conky In Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...0205 How To Use Smartphones Like Weather Conky In Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md b/sources/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md index b5bbc69a3b..7607920dd3 100644 --- a/sources/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md +++ b/sources/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md @@ -1,3 +1,5 @@ +FSSlc translating + How To Use Smartphones Like Weather Conky In Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Use_Weather_Conky_Linux.jpeg) @@ -81,4 +83,4 @@ via: http://itsfoss.com/weather-conky-linux/ [2]:http://www.computerhope.com/unix/curl.htm [3]:http://speedracker.deviantart.com/art/Flair-Weather-Conky-Made-for-Conky-Manager-510130311 [4]:http://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ -[5]:https://weather.yahoo.com/ \ No newline at end of file +[5]:https://weather.yahoo.com/ From e32a98f0eeff768c1257eea055387ef2dfafe508 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sun, 8 Mar 2015 17:19:09 -0300 Subject: [PATCH 0217/2517] update --- ...us Case of the Disappearing Distros.md.swp | Bin 20480 -> 32768 bytes ...urious Case of the Disappearing Distros.md | 2 ++ 2 files changed, 2 insertions(+) diff --git a/sources/talk/.20141224 The Curious Case of the Disappearing Distros.md.swp b/sources/talk/.20141224 The Curious Case of the Disappearing Distros.md.swp index e00551e00df308f45da241238c3a8dae473ae1a9..7f5c0d619bacbc005cbf30bc7d08477554d33e5e 100644 GIT binary patch delta 2376 zcmZvdZA?>V6vrvu^O|Ta8&9=LSia`122* zpMg2H9^TGZW$h&mVJX^1BUa*{kbCNh!=((_Wt%nm?5DyQwKR~p@2OB1j=%K*Z`PJ` z-1T)F=LgIzJ5Uhjs=#Hi<_-1TGrTu}YVZ&zd;ki71{_+$aqof+U_EfH<~S#~2rhtZ zkOihPIW7#YBeL(n`V8(QmyL&Jgl+@n;2c=MDV~7K;2ZXgv^@q9a1Z2y-N1#EI>9Ee z5&VwB{}%p}|8=c7=cwLLb5(8&5$`CqIwdhGMH?kiki;?KA0hoMNC*{0YIQuHwG*eE zc1B3UH1*oZ^k~A@$I@lJMI*y_tIT)Pt{{8mn3Q4x+83Z+fdt~%BSl+~Pb5={H)0QI zxI-MGG+Qf~#U5q87paF=+BQP05g1~H=?coTZrb2e1iKuL$*}=gk^OVT9!-^sgeDS# zlZsBocbm*i(l#56;Pae)9~+GomAZW9SdFB$M-pTF`<1%tYOSHX%E*6MrmLzpRx0M; z6tRYIFf|WkRv;rS#L-3OI*G+`_*Ah*!%RebmyR5tm)l3l4Lgkm@SsLRCx;NU6pKl5 z59#fv&4J`cbZ}Y?fm!EN`@FuI*Yaih3cf;nNyi(E;RVe?T2fpJ>iZRn&cwyk{Su;z zKveg@6xaYBz0PrefFjTVfq8%*!kU4YMBo4?!Drwhg!BOX490*J6aWqQ1%8;XAz;bi zzU1oQd=uCRTo9HMTm%;Yg|G;?3a+qc2ucERFbfKR26RDKo#0Kd4Lm^*kHdfQO&R7K zRT@jhn6t{`0%`T2Jc-Wngs&@EGoCNgRcH+)S*ntgMij`zpD_wrE%Q<~sYsy8k4ZKe4{weR)_8mKR@VQK!|Myic-nvbD za@{?9>JGs{qVA?NV}&wE)C22s`vB{Tn7|fYzUQ+8@WCIx_O)JDS=!>`;cQgg6fnrV^57Us??DD$qjnQ3nej)O1?5A1?D zyiRntCWHYJ9oA@2A2hr&6e3Lybq(8b=9WzPYqJ&;05POjV3nduc~V-H9|4|9~X6u~C4@m>SK?7cXt@RECCfaHbPR*7LOE zt}-g5gq;!-J6kO-jczuSLw!ongN{4`2@%JbdUQ!0(&HAW7h9$HAhm??8S|OEhoE8N zY$L8_c_5%FUlKcHk6o3t+r8UrRxQhY5MCQ?!9`{}xF0{PN#a4MpV%QhH;KAgGM7Wp zXvlC~v93(7HQ>%7)=t(~>~fQD_e)V5LSuQZ?@d}h NZ_m|*8*<-C`w!*eb$$Q< delta 124 zcmZo@U}{*vsE}k3=IN_ou4lpk1Of~UcU6Cfe3a#2aFS+VD9K38pLkJaqswY$MuyEF zn1y)wnHl~A)iD9F5fC$Ob`;ppKkca8wKnh7cUAxZY=#~o diff --git a/sources/talk/20141224 The Curious Case of the Disappearing Distros.md b/sources/talk/20141224 The Curious Case of the Disappearing Distros.md index 5494804e39..3fe7cd788c 100644 --- a/sources/talk/20141224 The Curious Case of the Disappearing Distros.md +++ b/sources/talk/20141224 The Curious Case of the Disappearing Distros.md @@ -1,10 +1,12 @@ theol-l translating The Curious Case of the Disappearing Distros +关于消失的发行版的古怪情形。 ================================================================================ ![](http://www.linuxinsider.com/ai/828896/linux-distros.jpg) "Linux is a big game now, with billions of dollars of profit, and it's the best thing since sliced bread, but corporations are taking control, and slowly but systematically, community distros are being killed," said Google+ blogger Alessandro Ebersol. "Linux is slowly becoming just like BSD, where companies use and abuse it and give very little in return." +"Linux现在成为了一个大型的游戏,同时具有巨额的利润,这是有史以来最好的事情。但是公司企业进行了控制,于是缓慢而系统的社区发行版就逐渐被干掉了,",Google+的一个博主 Alessandro Ebersol说到。"Linux开始变得像BSD--一些公司使用和滥用但是没有任何回报--一样缓慢。" Well the holidays are pretty much upon us at last here in the Linux blogosphere, and there's nowhere left to hide. The next two weeks or so promise little more than a blur of forced social occasions and too-large meals, punctuated only -- for the luckier ones among us -- by occasional respite down at the Broken Windows Lounge. From 773bbe00ae685d694eae3cf92778df88cc0d1498 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sun, 8 Mar 2015 17:36:20 -0300 Subject: [PATCH 0218/2517] theo-l translating --- ...ct SSH server from brute force attacks using fail2ban.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md b/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md index 6397e82c7e..4b79e03cf8 100644 --- a/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md +++ b/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md @@ -1,7 +1,11 @@ +theo-l translating + How to protect SSH server from brute force attacks using fail2ban +如何使用fail2ban来保护SSH服务器避免暴力破解攻击。 ================ One common attack on SSH service is brute force attacks where a remote attacker indefinitely attempts to log in with different passwords. Of course there are arguments against password authentication for SSH, and alternative authentication mechanisms such as [public key authentication][1] or [two-factor authentication][2] exist to obsolete such attacks. Putting aside pros and cons of different authentication methods, let's consider the situation where password authentication is required. How would you protect your SSH server against brute-force attacks? +对于SSH服务的常见的攻击就是暴力破解攻击--远程攻击者通过不同的密码来进行无限地登录尝试。当然SSH存在参数来防备密码验证以及可用的验证机制,例如[公钥验证][1]或者[双重验证][2], [fail2ban][3] is a well-known open-source intrusion prevention framework on Linux that monitors various system log files (e.g., /var/log/auth.log or /var/log/secure) and automatically triggers various defensive actions upon detecting any suspicious activities. In fact, fail2ban can be quite useful to defend against brute force password guessing attacks on an SSH server. @@ -167,4 +171,4 @@ via: http://linoxide.com/tools/linux-compress-decompress-tools/ [1]:http://xmodulo.com/how-to-force-ssh-login-via-public-key-authentication.html [2]:http://xmodulo.com/two-factor-authentication-ssh-login-linux.html [3]:http://www.fail2ban.org/ -[4]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file +[4]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html From e4de316b84d9580e2a366d64ef009aeca51fff80 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 9 Mar 2015 10:58:15 +0800 Subject: [PATCH 0219/2517] Finish the translation by ZTinoZ --- .../20150114 What is a good IDE for C or C++ on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {sources => translated}/share/20150114 What is a good IDE for C or C++ on Linux.md (88%) diff --git a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md b/translated/share/20150114 What is a good IDE for C or C++ on Linux.md similarity index 88% rename from sources/share/20150114 What is a good IDE for C or C++ on Linux.md rename to translated/share/20150114 What is a good IDE for C or C++ on Linux.md index 652f228367..32d7371d18 100644 --- a/sources/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/translated/share/20150114 What is a good IDE for C or C++ on Linux.md @@ -48,13 +48,13 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm8.staticflickr.com/7519/15653583824_e412f2ab1f_c.jpg) -说到这,肯定照顾到所有的KDE粉丝,[KDevelop][11]会是你希望的答案。它拥有许多配置选项,如果你设法去征服KDevelop,那它就是你的。你们说我肤浅,但是我真的从来没有深入过它界面以外的层次了。But it's too bad for me as the editor itself packs quite a punch with a lot of navigation options and customizable shortcuts. 它的调试器也是相当高级,要去练习掌握。然而,这样的耐心是有回报的,就是能领会到这款灵活的IDE的全部能力。And it gets special credits for its amazing embedded documentation. +说到这,肯定照顾到所有的KDE粉丝,[KDevelop][11]会是你希望的答案。它拥有许多配置选项,如果你设法去征服KDevelop,那它就是你的。你们说我肤浅,但是我真的从来没有深入过除它界面以外的层次了,对于我来说编辑器本身就携带着大量的导航选项和可定制的快捷键简直是一个再糟糕不过的事了。它的调试器也是相当高级,要去练习掌握。然而,这样的耐心是有回报的,就是能领会到这款灵活的IDE的全部能力,并且由于它令人吃惊的嵌入式文件编制,你会给予它一种特殊的信任。 ### 9. CodeLite ### ![](https://farm9.staticflickr.com/8594/16250066446_b5f654e63f_c.jpg) -Finally, last for not least, [CodeLite][12] shows that you can take a traditional formula and still get something with its own feeling attached to it. If the interface really reminded me of Code::Blocks and Anjuta at first, I was just blown away by the extensive plugin library. Whether you want to diff a file, insert a copyright block, define an abbreviation, or push your work on Git, there is a plugin for you. If I had to nitpick, I would say that it lacks a few navigation shortcuts for my taste, but that's really it. +留在最后的不代表是最差的,[CodeLite][12]展现给你一种传统的编程规则却仍然能让你从它身上那特有的感觉上有所收获,即使它的界面一开始的确让我想到了Code::Blocks和Anjuta,只是不包括大量的插件库。无论你想要比较文件、插入一条版权块、定义缩略语或者用Git来工作,总有一款插件适合你。如果我不得不挑点毛病,我想说它缺乏一些符合我口味的导航快捷键,但这是真的。 最后,我希望这份清单能让你给自己最喜欢的语言探索到更多新的IDE。虽然Code::Blocks仍然是我的最爱,不过它有一些很强大的对手。当然我们也可以远离Linux上的IDE用文本编辑器去编写C/C++代码。所以如果你有什么其它的建议想法,在评论中让我们获悉。或者如果你想要我再说说关于一些其它语言的IDE,也可以评论里提出。 From 6248ed5c834e3584255c2f709cb5ca5ed506347e Mon Sep 17 00:00:00 2001 From: Ping Date: Mon, 9 Mar 2015 11:24:03 +0800 Subject: [PATCH 0220/2517] Translated by Ping. --- ...nd Maximum Supported RAM By Your System.md | 48 +++++++++---------- 1 file changed, 23 insertions(+), 25 deletions(-) rename {sources => translated}/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md (91%) diff --git a/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md b/translated/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md similarity index 91% rename from sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md rename to translated/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md index 5761359df6..52b978dbc8 100644 --- a/sources/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md +++ b/translated/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md @@ -1,36 +1,34 @@ -Translating - -Linux Basics: How To Find Maximum Supported RAM By Your System +Linux基础:如何找出你的系统所支持的最大内存 ================================================================================ ![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/RAM-790x527.jpg) -Mostly, you will find maximum supported RAM by your system from the BIOS, Product catalog, or manuals. Here is the simple, yet useful trick, to find out maximum supported RAM using Dmidecode without opening the system chassis or referring the BIOS, product catalogs. +大多数情况下你可以从BIOS、产品目录或者干脆手动找出你的系统所持的最大内存。这里,我们介绍一种简单有用的技巧——使用Dmidecode来找出系统支持的最大内存,这样你就无需打开机箱或者参照BIOS和产品目录了。 -### What is Dmidecode? ### +### 什么是 Dmidecode? ### -As you may know, **Dmidecode** is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Using Dmidecode, you can retrieve this information without having to probe for the actual hardware. +就像你可能知道的一样, **Dmidecode**是一个将计算机DMI(又名SMBIOS)表的内容转换为可读格式的工具。这个表包含了系统硬件组件的介绍以及其他一些如序列号和IOS版本等有用的信息。使用Dmidecode你能够获取此项信息,而无需去探测真实的硬件。 -### Find out the maximum RAM supported by your system ### +### 找出你的系统所支持的最大内存 ### -Make sure you have installed dmidecode on your system. I think it will be automatically installed while installing your OS, but I am not sure though. +请确定你已经在系统中安装了dmidecode,我觉得你的操作系统应该已经自动安装过了,不过并不非常确定。 -**On Deb based system:** +**在基于Deb的系统中安装** sudo apt-get install dmidecode -**On RPM based system:** +**在基于RPM的系统中安装** sudo yum install dmidecode -**On SUSE/openSUSE:** +**在SUSE/openSUSE中安装** sudo zypper in dmidecode -Well, we installed dmidecode. Let us find out the maximum RAM supported. To do that, enter the following command: +好了,我们已经安装了dmidecode,接下来让我们找出支持的最大内存。输入以下命令: sudo dmidecode -t 16 -**Sample output:** +**输出样本** # dmidecode 2.12 SMBIOS 2.6 present. @@ -44,13 +42,13 @@ Well, we installed dmidecode. Let us find out the maximum RAM supported. To do t Error Information Handle: Not Provided Number Of Devices: 2 -As you see in the above output, my system will support RAM upto 16GB, and it has two RAM slots. Pretty easy, isn’t it? +就像你看到的,我的系统支持最大内存到16G,并且有两个内存插槽,简单吧? -Well, let us find out the currently installed RAM details. +接下来,让我们找出现在已经安装的内存的详细信息。 sudo dmidecode -t 17 -**Sample output:** +**输出样本** # dmidecode 2.12 SMBIOS 2.6 present. @@ -95,15 +93,15 @@ Well, let us find out the currently installed RAM details. Part Number: JM1066KSN-4G Rank: Unknown -As per the above output, I have installed one RAM in DIMM slot 1. The RAM size is **4GB**, and it’s type and speed is **DDR3** and **1067 MHz** respectively. +就像上边输出的一样,我在插槽1里边安装了一个内存条。内存大小为**4G**,类型为**DDR3**,速度为**1067 MHz**。 -Also, we can have the complete RAM details using the following commands. +同样的,我们可以通过下边命令得到完整的内存信息。 sudo dmidecode -t memory sudo dmidecode -t memory | less sudo dmidecode -t memory | more -**Sample output:** +**输出样本** # dmidecode 2.12 SMBIOS 2.6 present. @@ -157,11 +155,11 @@ Also, we can have the complete RAM details using the following commands. Part Number: JM1066KSN-4G Rank: Unknown -Curious to know the complete system details such as Motherboard, Memory, Bios etc? Well, enter the following command to get all details. +如果你好奇想要知道整个系统的详细信息,例如主板、内存、BIOS等,那么可以输入以下命令来获取。 sudo dmidecode -**Sample output:** +**输出样本** # dmidecode 2.12 SMBIOS 2.6 present. @@ -683,16 +681,16 @@ Curious to know the complete system details such as Motherboard, Memory, Bios et Handle 0x0031, DMI type 127, 4 bytes End Of Table -That’s it. Happy weekend. Stay happy! +好了,就是这样。周末愉快! -------------------------------------------------------------------------------- via: https://www.unixmen.com/linux-basics-how-to-find-maximum-supported-ram-by-your-system/ -作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) +作者:[SK][0] +译者:[mr-ping](https://github.com/mr-ping) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:https://www.unixmen.com/author/sk/ +[0]:https://www.unixmen.com/author/sk/ From bebd9215a83260fd500e87c6aa633fcec3c62283 Mon Sep 17 00:00:00 2001 From: theo-l Date: Wed, 11 Mar 2015 18:57:24 -0300 Subject: [PATCH 0221/2517] translating --- ...rotect SSH server from brute force attacks using fail2ban.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md b/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md index 4b79e03cf8..e80f3b75ec 100644 --- a/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md +++ b/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md @@ -5,7 +5,7 @@ How to protect SSH server from brute force attacks using fail2ban ================ One common attack on SSH service is brute force attacks where a remote attacker indefinitely attempts to log in with different passwords. Of course there are arguments against password authentication for SSH, and alternative authentication mechanisms such as [public key authentication][1] or [two-factor authentication][2] exist to obsolete such attacks. Putting aside pros and cons of different authentication methods, let's consider the situation where password authentication is required. How would you protect your SSH server against brute-force attacks? -对于SSH服务的常见的攻击就是暴力破解攻击--远程攻击者通过不同的密码来进行无限地登录尝试。当然SSH存在参数来防备密码验证以及可用的验证机制,例如[公钥验证][1]或者[双重验证][2], +对于SSH服务的常见的攻击就是暴力破解攻击--远程攻击者通过不同的密码来进行无限地登录尝试。当然SSH存在参数来防备密码验证以及可用的验证机制,例如[公钥验证][1]或者[双重验证][2],存在此类过时的攻击. 将不同的验证方法的优劣处先放在一边,先考虑一下强制密码验证的情形.你是如何保护你的SSH服务器免遭暴力破解攻击的呢? [fail2ban][3] is a well-known open-source intrusion prevention framework on Linux that monitors various system log files (e.g., /var/log/auth.log or /var/log/secure) and automatically triggers various defensive actions upon detecting any suspicious activities. In fact, fail2ban can be quite useful to defend against brute force password guessing attacks on an SSH server. From aa75bf6c1aeaf88889b2a9f1ee7399b7e73258f4 Mon Sep 17 00:00:00 2001 From: theo-l Date: Mon, 9 Mar 2015 02:20:18 -0300 Subject: [PATCH 0222/2517] translated --- ...from brute force attacks using fail2ban.md | 174 ------------------ ...from brute force attacks using fail2ban.md | 165 +++++++++++++++++ 2 files changed, 165 insertions(+), 174 deletions(-) delete mode 100644 sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md create mode 100644 translated/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md diff --git a/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md b/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md deleted file mode 100644 index e80f3b75ec..0000000000 --- a/sources/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md +++ /dev/null @@ -1,174 +0,0 @@ -theo-l translating - -How to protect SSH server from brute force attacks using fail2ban -如何使用fail2ban来保护SSH服务器避免暴力破解攻击。 -================ - -One common attack on SSH service is brute force attacks where a remote attacker indefinitely attempts to log in with different passwords. Of course there are arguments against password authentication for SSH, and alternative authentication mechanisms such as [public key authentication][1] or [two-factor authentication][2] exist to obsolete such attacks. Putting aside pros and cons of different authentication methods, let's consider the situation where password authentication is required. How would you protect your SSH server against brute-force attacks? -对于SSH服务的常见的攻击就是暴力破解攻击--远程攻击者通过不同的密码来进行无限地登录尝试。当然SSH存在参数来防备密码验证以及可用的验证机制,例如[公钥验证][1]或者[双重验证][2],存在此类过时的攻击. 将不同的验证方法的优劣处先放在一边,先考虑一下强制密码验证的情形.你是如何保护你的SSH服务器免遭暴力破解攻击的呢? - -[fail2ban][3] is a well-known open-source intrusion prevention framework on Linux that monitors various system log files (e.g., /var/log/auth.log or /var/log/secure) and automatically triggers various defensive actions upon detecting any suspicious activities. In fact, fail2ban can be quite useful to defend against brute force password guessing attacks on an SSH server. - -In this guide, I will demonstrate **how to install and configure fail2ban to protect an SSH server against brute force attacks from a remote IP address**. - -### Install Fail2ban on Linux - -To install fail2ban on CentOS or RHEL, first [set up EPEL repository][4], and then run the following command. - - $ sudo yum install fail2ban - -To install fail2ban on Fedora, simply run: - - $ sudo yum install fail2ban - -To install fail2ban on Ubuntu, Debian or Linux Mint: - - $ sudo apt-get install fail2ban - -### Configure Fail2ban for SSH Server - -Now you are ready to configure fail2ban to harden your SSH server. You need to edit the configuration file at /etc/fail2ban/jail.conf. The configuration file contains "DEFAULT" section where you define default parameters for all monitored services, and service-specific sections where you define any service-specific jails (e.g., SSH, Apache, etc) to overwrite default parameters. - -In the service-specific jail sections (somewhere after [DEFAULT] section), you need to define [ssh-iptables] section, where you define SSH-specific jail configurations. Actual IP address banning is done by iptables. - -The following is an example of /etc/fail2ban/jail.conf which contains "ssh-iptables" jail configuration. Of course there could be other application-specific jails depending on your needs. - - $ sudo vi /etc/fail2ban/jail.local - -``` -[DEFAULT] -# a space delimited list of IP addresses, CIDR prefixes, or DNS hostnames -# to bypass fail2ban protection -ignoreip = 127.0.0.1 172.31.0.0/24 10.10.0.0/24 192.168.0.0/24 - -# number of seconds during which a client host is blocked -bantime = 86400 - -# number of failures before a client host is blocked -maxretry = 5 - -# number of seconds within which "maxentry" failures result in banning -findtime = 600 - -mta = sendmail - -[ssh-iptables] -enabled = true -filter = sshd -action = iptables[name=SSH, port=ssh, protocol=tcp] -sendmail-whois[name=SSH, dest=your@email.com, sender=fail2ban@email.com] -# for Debian-based distros -logpath = /var/log/auth.log -# for Red Hat-based distros -logpath = /var/log/secure -# ssh-specific max-retry threshold -maxretry = 3 -``` - -According to the above configuration, fail2ban will automatically ban any remote IP address from which there have been at least 3 failed login attempts within the last 10 minutes. Once banned, the offending IP address will remain blocked for 24 hours. Such an event will be notified by sendemail to a recipient email address. - -Once the configuration file is ready, restart fail2ban service as follows. - -On Debian, Ubuntu or CentOS/RHEL 6: - - $ sudo service fail2ban restart - -On Fedora or CentOS/RHEL 7: - - $ sudo systemctl restart fail2ban - -To verify fail2ban is running successfully, run fail2ban-client command with "ping" argument. If fail2ban service is running okay, you should see "pong" as a response. - - $ sudo fail2ban-client ping - Server replied: pong - -### Test Protection against SSH Brute-Force Attacks with Fail2ban - -To test whether fail2ban works, try to SSH to the server using incorrect passwords to simulate a brute-force attack. In the mean time, monitor /var/log/fail2ban.log, which is logging any interesting events that are happening in fail2ban. - - $ sudo tail -f /var/log/fail2ban.log - -![](https://farm8.staticflickr.com/7550/15882084127_fccf9ca7b7_c.jpg) - -According to the log file above, fail2ban has banned an IP address 192.168.1.8, upon detecting multiple failed SSH login attempts from the IP address. - -### Check Fail2ban Status and Unban Blocked IP Addresses - -As fail2ban's "ssh-iptables" jail uses iptables to block offending IP addresses, you can easily verify the ban by checking current iptables rules as follows. - - $ sudo iptables --list -n - -``` -Chain INPUT (policy ACCEPT) -target prot opt source destination -fail2ban-SSH tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 - -Chain FORWARD (policy ACCEPT) -target prot opt source destination - -Chain OUTPUT (policy ACCEPT) -target prot opt source destination - -Chain fail2ban-SSH (1 references) -target prot opt source destination -DROP all -- 192.168.1.8 0.0.0.0/0 -RETURN all -- 0.0.0.0/0 0.0.0.0/0 -``` - -If you want to unblock the IP address from fail2ban, you can also use iptables command: - - $ sudo iptables -D fail2ban-SSH -s 192.168.1.8 -j DROP - -While you can check and manage fail2ban's IP blocklist manually with iptables command like above, a proper way is in fact to use fail2ban-client command-line tool. This tool allows you to manage not only "ssh-iptables" jail, but also any other types of fail2ban jails in a unified command-line interface. - -To check fail2ban status (which will show a list of currently active jails): - - $ sudo fail2ban-client status - -To check the status of a particular jail (e.g., ssh-iptables): - - $ sudo fail2ban-client status ssh-iptables - -The above command will show a list of banned IP addresses. - -![](https://farm8.staticflickr.com/7497/16067847655_021d23e320_b.jpg) - -To unban a particular IP address: - - $ sudo fail2ban-client set ssh-iptables unbanip 192.168.1.8 - -![](https://farm8.staticflickr.com/7465/16065915571_b215a8b344_b.jpg) - -Note that if you stop fail2ban, all blocked IP addresses will be unblocked. When you restart fail2ban, it will find a list of offending IP addresses from /var/log/secure (or /var/log/auth.log), and re-ban those IP addresses if the elapsed time of the offenses are still within ban time. - -### Set Fail2ban to Auto-start on Boot - -Once you haved tested fail2ban successfully, the last step is to enable fail2ban to launch automatically upon powering on your server. On Debian-based distributions, fail2ban auto-start is enabled by default. On Red Hat-based distributions, enable auto-start as follows. - -On CentOS/RHEL 6: - - $ sudo chkconfig fail2ban on - -On Fedora or CentOS/RHEL 7: - - $ sudo systemctl enable fail2ban - -### Summary - -In this tutorial, I demonstrated how to install and configure fail2ban to protect an SSH server. While fail2ban can mitigate brute-force password guessing attacks, please note that it cannot protect SSH servers against sophisticated distributed brute-force campaigns, where an attacker bypasses fail2ban by using many thousands of bot-controlled IP addresses. - ------------ - -via: http://linoxide.com/tools/linux-compress-decompress-tools/ - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/how-to-force-ssh-login-via-public-key-authentication.html -[2]:http://xmodulo.com/two-factor-authentication-ssh-login-linux.html -[3]:http://www.fail2ban.org/ -[4]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html diff --git a/translated/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md b/translated/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md new file mode 100644 index 0000000000..599fcfceeb --- /dev/null +++ b/translated/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md @@ -0,0 +1,165 @@ +如何使用fail2ban来保护SSH服务器避免暴力破解攻击。 +================ +对于SSH服务的常见的攻击就是暴力破解攻击--远程攻击者通过不同的密码来进行无限地登录尝试。当然SSH存在参数来防备密码验证以及可用的验证机制,例如[公钥验证][1]或者[双重验证][2],来解决这类攻击. 将不同的验证方法的优劣处先放在一边,先考虑一下强制密码验证的情形.你是如何保护你的SSH服务器免遭暴力破解攻击的呢? + +[fail2ban][3]是linux上的一个著名的入侵保护的开源框架,它会监控多个系统的日志文件(例如/var/log/auth.log 或者 /var/log/secure)并根据检测到的任何可疑的行为自动触发不同的防御活动。实际上,fail2ban在防御对SSH服务器的暴力密码破解上非常有用。 + +在该指导教程中,我会演示**如何安装并配置fail2ban来保护SSH服务器避免来自远程IP地址的暴力攻击** + +###在linux上安装Fail2ban + +为了在CentOS 或 RHEL上安装fail2ban,首先[设置EPEL仓库][4],然后运行以下命令。 + + $ sudo yum install fail2ban + +在Fedora上安装fail2ban,简单地运行以下命令: + + $ sudo yum install fail2ban + +在ubuntu,Debian或 Linux Mint上安装fail2ban: + + $ sudo apt-get install fail2ban + +### 为SSH服务器配置Fail2ban + +现在你已经准备好了通过配置fail2ban来加强你的SSH服务器。你需要编辑其配置文件/etc/fail2ban/jail.conf。 在配置文件的“DEFAULT[默认]”区,你可以在此定义所有受监控的服务的默认参数,另外在特定的服务器,你可以定义任何特定服务键入来覆载默认的参数配置(例如SSH,Apache等)。 + +在特定服务监狱区(在[DEFAULT(默认)]区后面的地方),你需要定义[ssh-iptables]区,这里用来定义SSH相关的监狱配置。禁止真正的IP地址是通过iptables完成的。 + +下面是一个包含“ssh-iptables”监狱配置的/etc/fail2ban/jail.conf的文件样例。当然根据你的需要,你也可以指定其他的应用监狱。 + + $ sudo vi /etc/fail2ban/jail.local + +``` +[DEFAULT] +# a space delimited list of IP addresses, CIDR prefixes, or DNS hostnames +# to bypass fail2ban protection +ignoreip = 127.0.0.1 172.31.0.0/24 10.10.0.0/24 192.168.0.0/24 + +# number of seconds during which a client host is blocked +bantime = 86400 + +# number of failures before a client host is blocked +maxretry = 5 + +# number of seconds within which "maxentry" failures result in banning +findtime = 600 + +mta = sendmail + +[ssh-iptables] +enabled = true +filter = sshd +action = iptables[name=SSH, port=ssh, protocol=tcp] +sendmail-whois[name=SSH, dest=your@email.com, sender=fail2ban@email.com] +# for Debian-based distros +logpath = /var/log/auth.log +# for Red Hat-based distros +logpath = /var/log/secure +# ssh-specific max-retry threshold +maxretry = 3 +``` + +根据上述配置,fail2ban会自动禁止在最近10分钟内有超过3次访问尝试失败的任意IP地址1。一旦被禁,这个IP地址将会保持在24小时内被持续阻塞。这个事件会通过sendemail发送到一个接收邮件地址进行通知。 + +一旦配置文件准备就位,按照以下方式重启fail2ban服务。 + +在 Debian, Ubuntu 或 CentOS/RHEL 6: + + $ sudo service fail2ban restart + +在 Fedora 或 CentOS/RHEL 7: + + $ sudo systemctl restart fail2ban + +为了验证fail2ban成功运行,使用参数'ping'来运行fail2ban-client 命令。 如果fail2ban服务正常运行,你可以看到“pong(膨)”作为响应。 + + $ sudo fail2ban-client ping + Server replied: pong + +### 测试fail2ban 保护SSH免遭暴力破解攻击 + +为了测试fail2ban是否能正常工作,尝试通过使用错误的密码来用SSH连接到服务器模拟一个暴力破解攻击。与此同时,监控/var/log/fail2ban.log--该文件记录在fail2ban中发生的任何敏感事件。 + + $ sudo tail -f /var/log/fail2ban.log + +![](https://farm8.staticflickr.com/7550/15882084127_fccf9ca7b7_c.jpg) + +根据上述的日志文件,Fail2ban通过检测IP地址的多次失败登录尝试,禁止了一个IP地址192.168.1.8。 + +###检查fail2ban状态并解禁被锁住的IP地址 +由于fail2ban的“ssh-iptables”监狱使用iptables来阻塞问题IP地址,你可以通过以下方式来检测当前iptables来验证禁止规则。 + + $ sudo iptables --list -n + +``` +Chain INPUT (policy ACCEPT) +target prot opt source destination +fail2ban-SSH tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 + +Chain FORWARD (policy ACCEPT) +target prot opt source destination + +Chain OUTPUT (policy ACCEPT) +target prot opt source destination + +Chain fail2ban-SSH (1 references) +target prot opt source destination +DROP all -- 192.168.1.8 0.0.0.0/0 +RETURN all -- 0.0.0.0/0 0.0.0.0/0 +``` + +如果你想要从fail2ban中解锁某个IP地址,你可以使用iptables命令: + $ sudo iptables -D fail2ban-SSH -s 192.168.1.8 -j DROP + +当然你可以使用上述的iptables命令手动地检验和管理fail2ban的IP阻塞列表,但实际上有一个适当的方法就是使用fail2ban-client命令行工具。这个命令不仅允许你对"ssh-iptables"监狱进行管理,也可以通过一个标准的命令行接口对其他任何的fail2ban监狱类型。 + +为了检验fail2ban状态(会显示出当前活动的监狱列表): + + $ sudo fail2ban-client status + +为了检验一个特定监狱的状态(例如ssh-iptables): + + $ sudo fail2ban-client status ssh-iptables + +上面的命令会显示出被禁止IP地址列表。 + +![](https://farm8.staticflickr.com/7497/16067847655_021d23e320_b.jpg) + +为了解锁特定的IP地址: + + $ sudo fail2ban-client set ssh-iptables unbanip 192.168.1.8 + +![](https://farm8.staticflickr.com/7465/16065915571_b215a8b344_b.jpg) + +注意,如果你停止了Fail2ban,那么所有的IP地址都会被解锁。当你重启Fail2ban,它会从/etc/log/secure(或 /var/log/auth.log)中找到异常的IP地址列表,如果这些异常对象的流逝时间仍然在禁止时间内,那么Fail2ban会重新将这些IP地址禁止。 +### Set Fail2ban to Auto-start on Boot + +一旦你成功地测试了fail2ban之后,最后一个步骤就是在你的服务器上让其在开机时自动启动。在基于Debian的发行版中,fail2ban已经默认让自动启动生效。在基于Red-Hat的发行版中,按照下面的方式让自动启动生效。 + +在 CentOS/RHEL 6中: + + $ sudo chkconfig fail2ban on + +在 Fedora 或 CentOS/RHEL 7: + + $ sudo systemctl enable fail2ban + +### 总结 + +在该教程中,我演示了如何安装并配置fail2ban来保护一个SSH服务器。当然fail2ban可以缓解暴力密码攻击,但是请注意,这并不能保护SSH服务器避免来自复杂分布的暴力破解组织,这些攻击者通过使用成千上万个机器控制的IP地址来绕过fail2ban的防御机制。 +----------- + +via: http://linoxide.com/tools/linux-compress-decompress-tools/ + +作者:[Dan Nanni][a] +译者:[theo-l](https://github.com/theo-l) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-force-ssh-login-via-public-key-authentication.html +[2]:http://xmodulo.com/two-factor-authentication-ssh-login-linux.html +[3]:http://www.fail2ban.org/ +[4]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html From 9bde39c07d4b8782171df6ea538182fc1d26c935 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 9 Mar 2015 16:28:48 +0800 Subject: [PATCH 0223/2517] =?UTF-8?q?20150309-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...roid Notifications to The GNOME Desktop.md | 38 +++++++ ...n source software in the business world.md | 85 ++++++++++++++++ ...Introduction To FreeBSD For Linux Users.md | 98 +++++++++++++++++++ ...t Tools To Connect To Your Linux Server.md | 81 +++++++++++++++ 4 files changed, 302 insertions(+) create mode 100644 sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md create mode 100644 sources/talk/20150309 10 best uses for open source software in the business world.md create mode 100644 sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md create mode 100644 sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md diff --git a/sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md b/sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md new file mode 100644 index 0000000000..0a67dab449 --- /dev/null +++ b/sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md @@ -0,0 +1,38 @@ +New App Brings Android Notifications to The GNOME Desktop +================================================================================ +![Fancy seeing your Android alerts here? You can.](http://www.omgubuntu.co.uk/wp-content/uploads/2015/02/Screen-Shot-2015-02-24-at-17.47.48.png) +Fancy seeing your Android alerts here? You can. + +**You’ll shortly be able to view your Android notifications on the GNOME desktop thanks to a new application in development.** + +The new project is called ‘Nuntius’ and lets notifications received on an Android phone appear on the GNOME desktop. It’s with GNOME 3.16 and its (wonderfully) [redesigned notification system][1] that the app and its features will be used by more. + +The app, which developers are hoping will be ready in time for this month’s release of GNOME 3.16, will work over Bluetooth to ensure that nothing is passed to external servers or stored online. This does mean that your phone will need to be in a certain proximity to your GNOME desktop for the feature to work. + +It also isn’t yet possible to reply to a text message or act on a news alert. + +The development team do caution that **this is an early release** and those planning on diving in to use it should expect minimum functionality for now. + +The mobile app required to see Android notifications in GNOME’s new notification shade is already available [from the Google Play Store][2] and the GNOME application is already available in the Fedora repos. + +The developers have open-sourced both the Android app and the GNOME application receiver and hosted them (where else) on GitHub. + +A similar tool [has been available for KDE desktops][3] – ‘KDE Connect’ – for a year or two, while the ever-gaining Pushbullet offers similar features on Windows, Mac and Linux desktops for iOS and Android platforms using Google Chrome. + +- [Nuntius for Android & GNOME on GitHub][4] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/03/new-app-brings-android-notifications-to-the-gnome-desktop + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2015/02/4-reason-why-gnome-3-16-might-be-the-best-version-yet-gallery +[2]:https://play.google.com/store/apps/details?id=org.holylobster.nuntius +[3]:http://www.omgubuntu.co.uk/2014/06/kde-connect-android-notifications-linux-desktop +[4]:https://github.com/holylobster \ No newline at end of file diff --git a/sources/talk/20150309 10 best uses for open source software in the business world.md b/sources/talk/20150309 10 best uses for open source software in the business world.md new file mode 100644 index 0000000000..b0c4475652 --- /dev/null +++ b/sources/talk/20150309 10 best uses for open source software in the business world.md @@ -0,0 +1,85 @@ +10 best uses for open source software in the business world +================================================================================ +> Open source offers some compelling benefits for businesses large and small -- but you might be surprised at some of the ways it's being used. + +![](http://tr2.cbsistatic.com/hub/i/r/2015/03/05/54a9c323-4311-4455-b10b-5182548da424/resize/620x485/95164f01a19cbd7a3e4b843be78febae/foss.jpg) + +Certain inevitabilities occur in technology. For instance, open source software will make its way into your business. Ten years ago, this could easily have been called into question. Now? There's no way to avoid it -- and there's no reason to. With so many powerful (and necessary) pieces of technology, open source has become, in various cases, the savior of tech. But what areas of your business are best suited for open source? The answer to that question is, of course, will be different from one company to the next. But some applications can apply in almost every circumstance. + +Let's take a look at 10 possible best-case uses for open source software that can help make your business grow, bring you a level of flexibility and reliability you haven't experienced, or just save you a welcome percentage of your budget. + +### 1: Server software ### + +If you're still battling Microsoft's IIS platform, you need to experience Apache. The flagship open source web server software is one of the most widely used on the planet. It's free, incredibly reliable, easy to manage, and doesn't require the enormous overhead needed for IIS. But open source isn't limited to just web servers. If you need SMB sharing across your company, consider Samba. Samba 4 even integrates with Active Directory, so you don't have to worry about setting up separate user accounts on the Samba server. + +### 2: Development ### + +Developing with open source is a no-brainer. PHP, Rails, Perl -- there are as many languages to develop with as there are tools (from IDEs to bug tracking). There are a lot of options for developing for open source or with open source tools (as are there with proprietary development). The biggest difference between open source and proprietary is the access you have to the software code. Within the world of FOSS (free open source software) the code is readily available. For many developers, the Linux operating system has everything they need to develop, built right in (especially those who code without a full-blown IDE). If you do require GUI development tools, open source has you covered. + +### 3: Security ### + +The route to security is a challenging one, but there are many paths to success. You can opt for the "security in a box" solution and go with the likes of Cisco (a solid solution) or you can craft your security to perfectly fit your needs with the likes of iptables. Yes, the open source security route will take a bit more time to deploy (with a much higher learning curve), but the end results are generally incredible. This doesn't even address the idea that using open source on the desktop is, generally speaking, a more secure platform than most proprietary systems. Deploy Linux on the desktops and your security woes will drop dramatically. + +### 4: Desktops ### + +This area is where most of the pushback happens. However, you must take into consideration the fact that the daily workflow has undergone a major paradigm shift. Most of what we do now is done via a web browser. So why not deploy Linux on the desktop? Not only does it work with the majority of today's tasks, it will do so without suffering from viruses, malware, and updates that cripple a system. It's not perfect -- what platform is? But it's solid, and in the end, it can save you money. That's a win-win. + +### 5: Workflow ### + +Every business depends upon workflow. For some businesses, a smooth workflow depends upon tools. Open source has this arena covered. CRM, HRM, ERP, BI, BPM... you name it, open source handles just about every possible acronym you can think of -- and it does it very well. With the likes of [Pentaho][1], [Collabtive][2], and [SugarCRM][3], open source can keep up with closed source tools any day. + +### 6: Collaboration ### + +Without the ability to work together on projects, your staff wouldn't be able to get the job done. So the collaboration tools you choose are crucial. You'll find plenty of quality collaboration tools within the world of open source. [Cyn.in community edition][4], [Zimbra Open Source Edition][5], and [Kolab][6] are just three examples of the excellent collaboration tools that exist within the open source world. + +### 7: Big data ### + +When it comes to big data, open source can't be matched. Thanks to the likes of [SUSE][7], big data and open source now go hand in hand. Innovations like in-memory data and live kernel patching make open source an ideal solution for big data. It can be perfectly tuned to meet the massive demands big data places on the platform. Closed source software can't touch this level of flexibility. + +### 8: Cloud ### + +The major players in the cloud are open source. [Red Hat][8], [Ubuntu][9], [SUSE][10], [Amazon][11], [Rackspace][12] -- they all get it and know that open source is the best solution for cloud deployments. But if you don't want to go with the larger companies, there are always up and coming tools like [ownCloud][12], where you can either take advantage of its hosted cloud solutions or build your own. + +### 9: Multimedia ### + +If your company does podcasting or video for PR, open source has you covered. With tools like [Audacity][14] and [OpenShot][15], you can do just about anything with audio or video you need -- and do so on the cheap. In fact, you'll be hard-pressed to find a better podcasting tool than Audacity or an easier-to-use video editor than OpenShot. Both pieces of software do an outstanding job of creating professional-quality results without the steep learning curves or the high prices often associated with closed source tools + +### 10: E-commerce ### + +If your business sells products online, you'd be remiss not to give a tool like [PrestaShop][16] a try. PrestaShop is, hands down, one of the most powerful e-commerce solutions available -- regardless of license. With just about every feature you could possible want (and some you probably haven't even thought of), the open source platform excels at e-commerce on every level. + +### FOSS for business ### + +Open source is no longer hanging around the periphery of the business conversation. In many instances, FOSS leads and dominates that conversation. If you've been looking for areas to consider deploying open source solutions, look no further than these 10. + +### Your turn ### + +Have you added open source software to your business? If so, in what way? + +-------------------------------------------------------------------------------- + +via: http://www.techrepublic.com/blog/10-things/10-best-uses-for-open-source-software-in-the-business-world/ + +作者:[Jack Wallen][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.techrepublic.com/search/?a=jack+wallen +[1]:http://community.pentaho.com/ +[2]:http://collabtive.o-dyn.de/ +[3]:http://www.sugarcrm.com/ +[4]:http://cynapse.com/cyn-in/ +[5]:https://www.zimbra.com/open-source +[6]:http://kolab.org/ +[7]:http://www.suse.org/ +[8]:http://www.redhat.com/ +[9]:http://www.ubuntu.com/ +[10]:http://www.suse.com/ +[11]:http://aws.amazon.com/ec2/ +[12]:http://www.rackspace.com/cloud +[13]:https://owncloud.org/ +[14]:http://audacity.sourceforge.net/ +[15]:http://www.openshot.org/ +[16]:https://www.prestashop.com/ \ No newline at end of file diff --git a/sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md b/sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md new file mode 100644 index 0000000000..d29a75cb69 --- /dev/null +++ b/sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md @@ -0,0 +1,98 @@ +Comparative Introduction To FreeBSD For Linux Users +================================================================================ +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/FreeBSD-790x494.jpg) + +### Introduction ### + +BSD was originally derived from UNIX and currently, there are various number of Unix-like operating systems descended from the BSD. While, FreeBSD is the most widely used open source Berkeley Software Distribution (BSD distribution). As it is implicitly said it is a free and open source Unix-like-operating system and a public server platform. FreeBSD source code is generally released under a permissive BSD license. It is true that it has similarities with Linux but we cannot deny that they differs in other points. + +The remainder of this article is organized as follows: the description of FreeBSD will be treated in our first section. The similarities between FreeBSD and Linux will be briefly described in the second section. While their differences will be discussed in the third section. And a comparison of their features will be summarized in our last section. + +### FreeBSD description ### + +#### History #### + +- The first version of FreeBSD was released in 1993, while its first CD-ROM distributed was FreeBSD1.0 on December 1993. Then, FreeBSD 2.1.0 was released in 1995 which gained the satisfaction of all users. Actually, many IT companies use FreeBSD and are satisfied where we can list those companies: IBM, Nokia, NetApp and Juniper Networks. + +#### License #### + +- Concerning its license, FreeBSD is released under various source licenses. Its newest code called Kernel is released under the two-clause BSD license, offering the possibility to use and redistribute FreeBSD with absolute freedom. Other codes are released three- and four-clause BSD license and some others are released under GPL and CDDL. + +#### Users #### + +- One of the important feature of FreeBSD, we can mention the various categories of its users. In fact, it is possible to use FreeBSD as a mail server, web server, FTP server and as a router due to the significant set of server-related software accompanied with it. Furthermore, ARM, PowerPC and MIPS are supported by FreeBSD so it is possible to use x86 and s86-64. + +### FreeBSD and Linux similarities ### + +FreeBSD and Linux are two free and open source systems. Indeed, their users can easily check and modify the source code with an absolute freedom. To add, FreeBSD and Linux, both of them are derived from Unix.-like because they have a kernel, internals, and libraries programmed using algorithms derived from historic AT&T Unix. While FreeBSD’s roots are similar to Unix systems, Linux is released as a free Unix-like option. Various tools and applications can be found either in FreeBSD or in Linux in fact, they almost share the same functionality. + +Furthermore, FreeBSD can run big number of Linux applications. It has a Linux compatibility layer that can be installed. This Linux compatibility layer can be installed while compiling FreeBSD with AAC Compact Linux or downloading compiled FreeBSD systems with a Linux compatibility program such as: aac_linux.ko. Which is not the same case with Linux, Linux cannot run FreeBSD software. + +At the end, we can mention that both of them have the same goal but have also some differences which we will outline in the next section. + +### FreeBSD and Linux differences ### + +Currently, no criteria of choice between FreeBSD and Linux is clear for most users. Since, they share almost the same applications. Those two operating systems are as mentioned previously UNIX-like. + +In this section, we will list the most important differences of those two systems. + +#### License #### + +- The first difference point between those two compared systems consist on their license. To start by Linux license, it is released under the GPL license which offers the possibility to view, distribute and change the source code with an absolute freedom. The GPL license helps users to prevent the distribution of binary-only source. Which is the case with FreeBSD, which is licensed under BSD license. This kind of license is more restrictive and easily allows the distribution of binary-only source. The BSD license is more permissive that the GPL since no derivative work is required to maintain the licensing terms. Means any user can use, distribute and modify the code without need to have the previous version of code before changing made. They only need to have the original license of BSD. +- Depending on the needs of each user, a selection can be made between those two types of license. Starting by BSD license which is more preferred by many users due to its special features. In fact, this license gives the possibility to sell each software licensed under it and retain the source code. Passing now to the GPL license, which requires some care of each user has a software released under it. +- To be able to choose between those two software, it is required to understand the licensing of both of them to more understand the methodology used in their development, to distinguish between their features and know which one will fit user’s need. + +#### Control #### + +- Since FreeBSD and Linux are released under two different type of license, the Linux Torvalds control the Linux kernel which is not the same case with FreeBSD which is not controlled. Personally, I prefer to use FreeBSD instead of Linux since it is an absolute free software, no control permission exists. But it is not enough there is other differences between Linux and FreeBSD, help you to choose between both of them. As an advice don’t choose one of them, follow us and then give us your choice. + +#### Operating system #### + +- Linux concentrates only on the kernel system which is not the case with FreeBSD while the whole operating system is maintained. The kernel and a set of software, some of them are developed by the FreeBSD team, are maintained as one unit. Indeed, the FreeBSD developers have the possibility to manage the essential operating systems remotely and efficiently. +- With Linux, there is some difficulties while managing a system. Since, the different components maintained will be from different sources so the Linux developers need to assemble them into groups having the same functionality. +- FreeBSD and Linux both of them give the possibility to have a big set of optional software and distributions but they differ on the way they are managed. With FreeBSD, they are managed together while with Linux they will be maintained separately. + +#### Hardware support #### + +- Concerning the hardware support, Linux is better than FreeBSD. It doesn’t mean that FreeBSD hasn’t the capability to support hardware as Linux. They differ just on the manner. It depends on your need as usual. So if you are searching for the newest solution, the FreeBSD will fit your needs but if you are looking for greatest graphs, it is better to use Linux. + +#### FreeBSD origin Vs Linux origin #### + +- The origin of each system is also another point of distinction between both of them. As I said previously Linux is an alternative of the operating system Unix, written by Linus Trovalds and assisted by a special group of hackers across the Net. Linux has all the needed features in a modern Unix, such as virtual memory, shared libraries, demand loading, proper memory management and many others. It is released under the General Public License. +- FreeBSD also shared many important features of its Unix heritage. FreeBSD as a type of the Berkeley Software Distribution, the distribution of the Unix developed at the University of California. The most important reason under developing BSD is to replace the AT&T operating system by an open source alternative giving the user the ability to use BSD without carry about the obtaining of the AT&T license. +- The problem of licensing, is the most important worry of developers. They try to offer the maximum open source clone of Unix. Which influences the choice of users regarding the degree of open source of each system as FreeBSD gives more freedom than Linux regarding its use since it is released under BSD license. + +#### Supported Package #### + +- From the user’s perspective, another difference between our two compared systems, is their availability and support of the packaged software and source installed software. The Linux distributions provide just the pre-compiled binary packages which is not the same case with FreeBSD, which has the pre-built packages and the build system for the compilation and installation through their available open source. Due to its ports, FreeBSD gives you the possibility to choose between the default making of pre-compiled packages and your ability to customize your software while it is compiled. +- Those ports enable you to build all the software available with FreeBSD. Furthermore, there is an hierarchy of organization all of them due to the directories /usr/ports where you can find the location of the source files and some documentation about the way to use FreeBSD correctly. +- The ports as mentioned give the possibility produce the packages version of software. Instead of having just the pre-compiled packages using Linux, FreeBSD gives you the possibility to have the source-built and the pre-packages software. You can manage your system using the two installation methods. + +#### FreeBSD Vs Linux common Tools #### + +- A huge number of common tools are available while using FreeBSD and are fully own made by the FreeBSD team. In contrast, the Linux tools are from the GNU that is why there is some control during their usage. +- The fact that FreeBSD is released under BSD license is so beneficial and useful. Since, you have the ability to maintain the core operating system, control the development of these applications. Same of those tools are similar to BSD and Unix tools from where they were derived which is not the same case with GNU suite, which want to just make them less backwards compatible. + +#### The Standard Shell #### + +- The tcsh shell is used by default with FreeBSD. Which is an evaluated version fo csh. Since, the FreeBSD is released under the BSD license, it is not recommended to use the bash shell which is a GNU component. The only difference between bash and tcsh shell consists on the scripting feature which can’t be made by tcsh. Indeed, the sh shell is more recommended for the FreeBSD use since it is more reliable and prevents some issues of scripting can be occurred using the tcsh or csh shell. + +#### A More Stratified Filesystem #### + +- As it was mentioned previously, base operating system and optional components can be easily distinguished using the FreeBSD system. Which causes some specification of their organization. In Linux, /bin, /sbin, /usr/bin, or usr/sbin are the directories for executable systems. With FreeBSD it is not the case. There are some additional specifications concerning their organization. The base system are putted in one of the directories mentioned above while the ports and packages are placed in /usr/local/bin or /usr/local/sbin. This methodology helps to recognize and distinguish between an application considered as a base system or a port. + +### Conclusion ### + +FreeBSD and Linux those two free and open source systems, share various similarities but they also differ in several points. The list giving above isn’t given to say that one of them is better than the other. In fact, FreeBSD and Linux, each one of them has its features and specifications that make it a special regarding the other. And you what is your opinion? Have you already used one on them or both? If yes what is your feedback and if no after reading our description what do you think? Sound off and give us and the fellow readers your opinion. + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/comparative-introduction-freebsd-linux-users/ + +作者:[anismaj][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/anis/ \ No newline at end of file diff --git a/sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md b/sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md new file mode 100644 index 0000000000..550d373d65 --- /dev/null +++ b/sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md @@ -0,0 +1,81 @@ +List Of Free Windows SSH Client Tools To Connect To Your Linux Server +================================================================================ +You have Windows as operating system and you need to connect to Linux server to transfer files from Linux to Windows and inversely. So you need to have Secure Shell known as SSH. In fact, SSH is a network protocol which enables you to connect to Linux and Unix servers over the network. It uses public key cryptography to authenticate the remote computer. You can use SSH by several ways, either by using it automatically or by using a password authentication to log in. + +This article provides a list of SSH clients let you to connect SSH to your Linux servers. + +let’s start. + +### PuTTY ### + +**PuTTY** is the most famous SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open source software that is available with source code and is developed and supported by a group of volunteers. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/putty.png) + +Putty is very easy to install and to use.You don’t usually need to change most of the configuration options. To start the simplest kind of session, all you need to do is to enter a few basic parameters.You can download PuTTY [here][1] + +### Bitvise SSH Client ### + +**Bitvise SSH** Client is an SSH and SFTP client for Windows. It is developed and supported professionally by Bitvise. The SSH Client is robust, easy to install, easy to use. Bitvise SSH Client is a feature-rich graphical SSH/SFTP client for windows and allow you dynamic port forwarding through an integrated proxy with auto-reconnecting capability. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/bitvise.png) + +Bitvise SSH Client is **free for personal use**, as well as for individual commercial use inside organizations. You can [download Bitvise SSH Client here][2]. + +### MobaXterm ### + +**MobaXterm** is your **ultimate toolbox for remote computing**. In a single Windows application, it provides loads of functions that are tailored for programmers, webmasters, IT administrators and pretty much all users who need to handle their remote jobs in a more simple fashion. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/mobaxterm.png) + +MobaXterm provides all the important **remote network tools** (SSH, X11, RDP, VNC, FTP, MOSH, …) and **Unix commands** (bash, ls, cat, sed, grep, awk, rsync, …) to Windows desktop, in a **single portable exe file** which works out of the box. MobaXterm is **free for personal use**. You can download MobaXterm [from here][3]. + +### DameWare SSH ### + +I think that **DameWare SSH** is the best free ssh client. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/ssh.png) + +This free tool is a terminal emulator that lets you make multiple telnet and SSH connections from one easy-to-use console. + +- Manage multiple sessions from one console with a tabbed interface +- Save favorite sessions within the Windows file system +- Access multiple sets of saved credentials for easy log-in to different devices +- Connect to computers and devices using telnet, SSH1, and SSH2 protocols + +You can download **DameWare SSH** from [this link][4]. + +### SmarTTY ### + +SmarTTY is a free multi-tabbed SSH client that supports copying files and directories with SCP on-the-fly. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/smart.png) + +Most SSH servers support up to 10 sub-sessions per connection. SmarTTY makes the best of it: no annoying multiple windows, no need to relogin, just open a new tab and go! + +### Cygwin ### + +Cygwin is a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/cyq.png) + +**Cygwin** consists of a Unix system call emulation library, cygwin1.dll, together with a [vast set][5] of GNU and other free software applications organized into a large number of optional packages. Among these packages are high-quality compilers and other software development tools, an X11 server, a complete X11 development toolkit, GNU emacs, TeX and LaTeX, OpenSSH (client and server), and much more, including everything needed to compile and use PhysioToolkit software under MS-Windows. + +After reading our article, which is your favorite SSH client? You can leave a comment describing your favorite system and the reasons of your choice. And of course if there is another SSH client doesn’t appear in this article, you can help us to add it. + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/list-free-windows-ssh-client-tools-connect-linux-server/ + +作者:[anismaj][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/anis/ +[1]:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html +[2]:http://www.bitvise.com/download-area +[3]:http://mobaxterm.mobatek.net/download.html +[4]:http://www.dameware.com/downloads/registration.aspx?productType=ssh&AppID=17471&CampaignID=70150000000PcNM +[5]:http://cygwin.com/packages/ \ No newline at end of file From e299e3dbf4f55818f19eceafe4dc1fd087fd5938 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 9 Mar 2015 16:54:48 +0800 Subject: [PATCH 0224/2517] =?UTF-8?q?20150309-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ls' Command Interview Questions--Part 2.md | 167 +++++++++++ ...15 Basic 'ls' Command Examples in Linux.md | 262 ++++++++++++++++++ ...uestions on Linux 'ls ' Command--Part 1.md | 187 +++++++++++++ 3 files changed, 616 insertions(+) create mode 100644 sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md create mode 100644 sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md create mode 100644 sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md diff --git a/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md b/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md new file mode 100644 index 0000000000..bd9a956d12 --- /dev/null +++ b/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md @@ -0,0 +1,167 @@ +10 Useful ‘ls’ Command Interview Questions – Part 2 +================================================================================ +Continuing the legacy of ls command here is the second interview article on Listing command. The first article of the series was highly appreciated by the Tecmint Community. If you’ve missed the first part of this series you may like to visit at: + +- [15 Interview Questions on “ls” Command – Part 1][1] + +This article is well presented in the manner that it gives deep insight of ls command with examples. We have taken extra care in the making of article so that it remains simple to understand yet serve the purpose to the fullest. + +![10 Interview Questions on ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-Command-Interview-Questions.jpg) +10 Interview Questions on ls Command + +### 1. You are supposed to list the content of a directory in long list format, but not print the name of the author and group the file belongs. Also show the difference in output. ### + +a. ls command listing the name of the files in long listing format when used with switch (-l). + + # ls -l + +![List Files in- Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-inLong-List-Format.gif) +List Files in- Long List Format + +b. ls command listing the name of the files in long listing format along with the name of the author file belongs, when used with switch (–author) along with switch (-l). + + # ls -l --author + +![List Files By Author](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-By-Author.gif) +List Files By Author + +c. ls command listing the name of the files without the name of its owner, when used with switch (-g). + + # ls -g + +![List Files Without Printing Owner Name](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Printing-Author.gif) +List Files Without Printing Owner Name + +d. ls command listing the name of files in long listing format without the name of group it belongs, when used with switch (-G) along with switch (-l). + + # ls -Gl + +![List Files Without Printing Group](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Printing-Group.gif) +List Files Without Printing Group + +### 2. Print the size of files and folders in the current directory, in human readable format. How will you do this? ### + +Well we need to use switch -h (human-readable) along with switch (-l) and/or (-s) with the command ls to get the desired output. + + # ls -hl + +![List Files in Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-Size-of-Files-with-ls.gif) +List Files in Human Readable Format + + # ls -hs + +![List File Sizes in Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-File-Sizes-in-Readable-Format.gif) +List File Sizes in Long List Format + +**Note**: The option -h uses the power of 1024 (standard in computation) and output the size of files and folders in the units of K, M and G. + +### 3. Well if switch (-h) output size in power of 1024, that is standard, What else power values are supported in ls command? ### + +There exist a switch -si which is similar to switch -h. The only difference is switch -si uses power of 1000 unlike switch -h which uses the power of 1024. + + # ls -si + +![Supported Power Values of ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-supported-power-values.gif) +Supported Power Values of ls Command + +It can also be used with switch -l to output the size of folder in the power of 1000, in long listing format. + + # ls -si -l + +![List Files by Power Values](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-by-Power-Values.gif) +List Files by Power Values + +### 4. You are supposed to print the contents of a directory separated with comma. Is it possible? Can it be done in long listing format? ### + +Yup! Linux ls command can output the contents of a directory separated by comma when used with the switch (-m). Since this comma separated entries are filled horizontally, ls command can’t separate contents with comma when listing contents vertically. + + # ls -m + +![Print Contents of Directory by Comma](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Contents-of-Directory-by-Comma.gif) +Print Contents of Directory by Comma + +When used in long listing format, switch -m gets useless. + + # ls -ml + +![Listing Content Horizontally](http://www.tecmint.com/wp-content/uploads/2015/03/Listing-Content-Horizentally.gif) +Listing Content Horizontally + +### 5. If there any way to print the contents of a directory upside down? i.e., in reverse order. ### + +Yeah! The above situation can easily be achieved using the switch -r. The switch ‘-r‘ reverse the order of output. It can also be used with switch -l (long listing format). + + # ls -r + +![List Content in Reverse Order](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-in-Reverse-Order.gif) +List Content in Reverse Order + + # ls -rl + +![Long List Content in Reverse Order](http://www.tecmint.com/wp-content/uploads/2015/03/Long-List-Content-in-Reverse-Order.gif) +Long List Content in Reverse Order + +### 6. You are given a situation to print the sub-directories recursively. How will you achieve this situation? Mind it only sub directories and no files. ### + +Okay! That is pretty easy with the switch -R when used with command ls. It can further be grouped with other options like -l (long list) and -m (comma separated), etc. + + # ls -R + +![Print Sub Directories in Recursively](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Sub-Directories-in-Recursively.gif) +Print Sub Directories in Recursively + +### 7. How to sort the files based upon the size? ### + +The Linux command line option -S when used with ls gives the desired output. To sort the files based upon size in descending order with the largest file listed at first and smallest at last. + + # ls -S + +![Sort Files with ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Files-in-Linux.gif) +Sort Files with ls Command + +To sort the files based upon size in descending order with the smallest file listed at first and largest at last. + + # ls -Sr + +![Sort Files in Descending Order](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Files-in-Descending-Order.gif) +Sort Files in Descending Order + +### 8. List the contents of a directory with no additional information appearing one file per line. ### + +The switch -1 comes to rescue here. ls command with switch -1 output the contents of the directory with one file per line and no additional information. + + # ls -1 + +![List Files Without Information](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Information.gif) +List Files Without Information + +### 9. You are given a situation in which you have to print the contents of a directory on standard output enclosed by double quotes. How will you do this? ### + +There exist an option -Q (quote-name) which output the content of ls enclosed in double quotes. + + # ls -Q + +![Print Files with Double Quotes](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Files-with-Double-Quotes.gif) +Print Files with Double Quotes + +### 10. You are working in a directory which contains lots of files and folders. You need to print the name of folders before directories. How will you get this? ### + + # ls --group-directories-first + +![Print Directories First](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Directories-First.gif) +Print Directories First + +That’s all for now. We will be coming up with the next part of this article series very soon. Till then stay tuned and connected to Tecmint. Do not forget to provide us with valuable feedback in the comment section below. Like and share us and help us get spread! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/ls-interview-questions/ + +作者:[Ravi Saive][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/admin/ +[1]:http://www.tecmint.com/ls-command-interview-questions/ \ No newline at end of file diff --git a/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md b/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md new file mode 100644 index 0000000000..3ff1e4df47 --- /dev/null +++ b/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md @@ -0,0 +1,262 @@ +15 Basic ‘ls’ Command Examples in Linux +================================================================================ +ls command is one of the most frequently used command in Linux. I believe ls command is the first command you may use when you get into the command prompt of Linux Box. We use ls command daily basis and frequently even though we may not aware and never use all the option available. In this article, we’ll be discussing basic ls command where we have tried to cover as much parameters as possible. + +![Linux ls Command](http://www.tecmint.com/wp-content/uploads/2012/08/Linux-ls-Commands.png) +Linux ls Command + +### 1. List Files using ls with no option ### + +ls with no option list files and directories in bare format where we won’t be able to view details like file types, size, modified date and time, permission and links etc. + + # ls + + 0001.pcap Desktop Downloads index.html install.log.syslog Pictures Templates + anaconda-ks.cfg Documents fbcmd_update.php install.log Music Public Videos + +### 2 List Files With option –l ### + +Here, ls -l (-l is character not one) shows file or directory, size, modified date and time, file or folder name and owner of file and it’s permission. + + # ls -l + + total 176 + -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap + -rw-------. 1 root root 1586 Jul 31 02:17 anaconda-ks.cfg + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Desktop + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Documents + drwxr-xr-x. 4 root root 4096 Aug 16 02:55 Downloads + -rw-r--r--. 1 root root 21262 Aug 12 12:42 fbcmd_update.php + -rw-r--r--. 1 root root 46701 Jul 31 09:58 index.html + -rw-r--r--. 1 root root 48867 Jul 31 02:17 install.log + -rw-r--r--. 1 root root 11439 Jul 31 02:13 install.log.syslog + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Music + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Pictures + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Public + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Templates + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Videos + +### 3. View Hidden Files ### + +List all files including hidden file starting with ‘.‘. + + # ls -a + + . .bashrc Documents .gconfd install.log .nautilus .pulse-cookie + .. .cache Downloads .gnome2 install.log.syslog .netstat.swp .recently-used.xbel + 0001.pcap .config .elinks .gnome2_private .kde .opera .spice-vdagent + anaconda-ks.cfg .cshrc .esd_auth .gtk-bookmarks .libreoffice Pictures .tcshrc + .bash_history .dbus .fbcmd .gvfs .local .pki Templates + .bash_logout Desktop fbcmd_update.php .ICEauthority .mozilla Public Videos + .bash_profile .digrc .gconf index.html Music .pulse .wireshark + +### 4. List Files with Human Readable Format with option -lh ### + +With combination of -lh option, shows sizes in human readable format. + + # ls -lh + + total 176K + -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap + -rw-------. 1 root root 1.6K Jul 31 02:17 anaconda-ks.cfg + drwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Desktop + drwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Documents + drwxr-xr-x. 4 root root 4.0K Aug 16 02:55 Downloads + -rw-r--r--. 1 root root 21K Aug 12 12:42 fbcmd_update.php + -rw-r--r--. 1 root root 46K Jul 31 09:58 index.html + -rw-r--r--. 1 root root 48K Jul 31 02:17 install.log + -rw-r--r--. 1 root root 12K Jul 31 02:13 install.log.syslog + drwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Music + drwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Pictures + drwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Public + drwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Templates + drwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Videos + +### 5. List Files and Directories with ‘/’ Character at the end ### + +Using -F option with ls command, will add the ‘/’ Character at the end each directory. + + # ls -F + + 0001.pcap Desktop/ Downloads/ index.html install.log.syslog Pictures/ Templates/ + anaconda-ks.cfg Documents/ fbcmd_update.php install.log Music/ Public/ Videos/ + +### 6. List Files in Reverse Order ### + +The following command with ls -r option display files and directories in reverse order. + + # ls -r + + Videos Public Music install.log fbcmd_update.php Documents anaconda-ks.cfg + Templates Pictures install.log.syslog index.html Downloads Desktop 0001.pcap + +### 7. Recursively list Sub-Directories ### + +ls -R option will list very long listing directory trees. See an example of output of the command. + + # ls -R + + total 1384 + -rw-------. 1 root root 33408 Aug 8 17:25 anaconda.log + -rw-------. 1 root root 30508 Aug 8 17:25 anaconda.program.log + + ./httpd: + total 132 + -rw-r--r-- 1 root root 0 Aug 19 03:14 access_log + -rw-r--r--. 1 root root 61916 Aug 10 17:55 access_log-20120812 + + ./lighttpd: + total 68 + -rw-r--r-- 1 lighttpd lighttpd 7858 Aug 21 15:26 access.log + -rw-r--r--. 1 lighttpd lighttpd 37531 Aug 17 18:21 access.log-20120819 + + ./nginx: + total 12 + -rw-r--r--. 1 root root 0 Aug 12 03:17 access.log + -rw-r--r--. 1 root root 390 Aug 12 03:17 access.log-20120812.gz + +### 8. Reverse Output Order ### + +With combination of -ltr will shows latest modification file or directory date as last. + + # ls -ltr + + total 176 + -rw-r--r--. 1 root root 11439 Jul 31 02:13 install.log.syslog + -rw-r--r--. 1 root root 48867 Jul 31 02:17 install.log + -rw-------. 1 root root 1586 Jul 31 02:17 anaconda-ks.cfg + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Desktop + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Videos + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Templates + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Public + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Pictures + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Music + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Documents + -rw-r--r--. 1 root root 46701 Jul 31 09:58 index.html + -rw-r--r--. 1 root root 21262 Aug 12 12:42 fbcmd_update.php + drwxr-xr-x. 4 root root 4096 Aug 16 02:55 Downloads + -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap + +### 9. Sort Files by File Size ### + +With combination of -lS displays file size in order, will display big in size first. + + # ls -lS + + total 176 + -rw-r--r--. 1 root root 48867 Jul 31 02:17 install.log + -rw-r--r--. 1 root root 46701 Jul 31 09:58 index.html + -rw-r--r--. 1 root root 21262 Aug 12 12:42 fbcmd_update.php + -rw-r--r--. 1 root root 11439 Jul 31 02:13 install.log.syslog + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Desktop + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Documents + drwxr-xr-x. 4 root root 4096 Aug 16 02:55 Downloads + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Music + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Pictures + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Public + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Templates + drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Videos + -rw-------. 1 root root 1586 Jul 31 02:17 anaconda-ks.cfg + -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap + +### 10. Display Inode number of File or Directory ### + +We can see some number printed before file / directory name. With -i options list file / directory with inode number. + + # ls -i + + 20112 0001.pcap 23610 Documents 23793 index.html 23611 Music 23597 Templates + 23564 anaconda-ks.cfg 23595 Downloads 22 install.log 23612 Pictures 23613 Videos + 23594 Desktop 23585 fbcmd_update.php 35 install.log.syslog 23601 Public + +### 11. Shows version of ls command ### + +Check version of ls command. + + # ls --version + + ls (GNU coreutils) 8.4 + Copyright (C) 2010 Free Software Foundation, Inc. + License GPLv3+: GNU GPL version 3 or later . + This is free software: you are free to change and redistribute it. + There is NO WARRANTY, to the extent permitted by law. + Written by Richard M. Stallman and David MacKenzie. + +### 12. Show Help Page ### + +List help page of ls command with their option. + + # ls --help + + Usage: ls [OPTION]... [FILE]... + +### 13. List Directory Information ### + +With ls -l command list files under directory /tmp. Wherein with -ld parameters displays information of /tmp directory. + + # ls -l /tmp + total 408 + drwx------. 2 narad narad 4096 Aug 2 02:00 CRX_75DAF8CB7768 + -r--------. 1 root root 384683 Aug 4 12:28 htop-1.0.1.tar.gz + drwx------. 2 root root 4096 Aug 4 11:20 keyring-6Mfjnk + drwx------. 2 root root 4096 Aug 16 01:33 keyring-pioZJr + drwx------. 2 gdm gdm 4096 Aug 21 11:26 orbit-gdm + drwx------. 2 root root 4096 Aug 19 08:41 pulse-gl6o4ZdxQVrX + drwx------. 2 narad narad 4096 Aug 4 08:16 pulse-UDH76ExwUVoU + drwx------. 2 gdm gdm 4096 Aug 21 11:26 pulse-wJtcweUCtvhn + -rw-------. 1 root root 300 Aug 16 03:34 yum_save_tx-2012-08-16-03-34LJTAa1.yumtx + +---------- + + # ls -ld /tmp/ + + drwxrwxrwt. 13 root root 4096 Aug 21 12:48 /tmp/ + +### 14. Display UID and GID of Files ### + +To display UID and GID of files and directories. use option -n with ls command. + + # ls -n + + total 36 + drwxr-xr-x. 2 500 500 4096 Aug 2 01:52 Downloads + drwxr-xr-x. 2 500 500 4096 Aug 2 01:52 Music + drwxr-xr-x. 2 500 500 4096 Aug 2 01:52 Pictures + -rw-rw-r--. 1 500 500 12 Aug 21 13:06 tmp.txt + drwxr-xr-x. 2 500 500 4096 Aug 2 01:52 Videos + +### 15. ls command and it’s Aliases ### + +We have made alias for ls command, when we execute ls command it’ll take -l option by default and display long listing as mentioned earlier. + + # alias ls="ls -l" + +Note: We can see number of alias available in your system with below alias command and same can be unalias as shown below example. + + # alias + + alias cp='cp -i' + alias l.='ls -d .* --color=auto' + alias ll='ls -l --color=auto' + alias ls='ls --color=auto' + alias mv='mv -i' + alias rm='rm -i' + alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' + +To remove an alias previously defined, just use the unalias command. + + # unalias ls + +In our next article we’ll cover up more or advanced ls command with their examples. If we’ve missed anything in the list, please update us via comment section. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ + +作者:[Ravi Saive][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/admin/ \ No newline at end of file diff --git a/sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md b/sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md new file mode 100644 index 0000000000..29804f5874 --- /dev/null +++ b/sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md @@ -0,0 +1,187 @@ +15 Interview Questions on Linux “ls” Command – Part 1 +================================================================================ +The listing command in UNIX and UNIX like operating System ‘ls‘ is one of the most basic and widely used utility in command-line. It is POSIX compliant utility available for GNU coreutils and BSD variants. The ‘ls’ command can be used with a variety of options to get desired results. This article aims at deep insight of file listing command in Linux with relevant examples. + +![15 ls Command Questions](http://www.tecmint.com/wp-content/uploads/2014/09/ls-Command-Questions.png) +15 ls Command Questions + +### 1. How will you List files from a directory? ### + +Ans: The Linux file listing command ‘ls‘ comes to rescue here. + + # ls + +![List Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-files.gif) +List Files + +Alternatively, we can use ‘echo‘ command to list files within a directory in association with wildcard (*). + + # echo * + +![List All Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-files.gif) +List All Files + +### 2. How will you list all the directories only using echo command? ### + + # echo */ + +![List All Directories](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-directories.gif) +List All Directories + +### 3. How will you list all the files within a directory including hidden files aka (.) dot files? ### + +Ans: We need to use option ‘-a‘ (list hidden files) with command ‘ls‘. + + # ls -a + +![List All Hidden Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-hidden-files.gif) +List All Hidden Files + +### 4. How do you list all the files within a directory including hidden files, but do not list implied ‘.’ and ‘..’? ### + +Ans: We need to use option ‘-A‘ (do not list implied . and ..) with command ‘ls‘. + + # ls -A + +![Do Not List Implied](http://www.tecmint.com/wp-content/uploads/2014/09/Do-not-list-Implied.gif) +Do Not List Implied + +### 5. How will you print the content of a directory in long format listing? ### + +Ans: We need to use option ‘l‘ (long format) with command ‘ls‘. + + # ls -l + +![List Files Long](http://www.tecmint.com/wp-content/uploads/2014/09/list-files-long.gif) +List Files Long + +In the above example, the output seems like. + + drwxr-xr-x 5 avi tecmint 4096 Sep 30 11:31 Binary + +Here, drwxr-xr-x is file permission for owner, group and world. Owner has Read(r), Write(w) and Execute(x) permission. The group to which this file belongs has Read(r) and Execute(x) permission but not Write(w) permission, same permission implies for the world that have access to this file. + +- The Initial ‘d‘ means its a Directory. +- Number ‘5‘ represents Symbolic Link. +- The File Binary belongs to user avi and group tecmint. +- Sep 30 11:31 represents the date and time it was last modified. + +### 6. You are supposed to print the content of directory in long format listing, showing hidden/dot files. How will you achieve this? ### + +Ans: We need to use option ‘-a‘ (list hidden files) and ‘-l‘ (long listing) together with command ‘ls‘. + + # ls -la + +![Print Content of Directory](http://www.tecmint.com/wp-content/uploads/2014/09/Print-Content-of-Directory.gif) +Print Content of Directory + +Alternatively We can use option ‘-A‘ and ‘-l‘ with ‘ls‘ command, if we do not want to list implied ‘.’ and ‘..’. + + # ls -lA + +### 7. How will you figure out the author of each file? ### + +Ans: We need to use option ‘–author‘ along with option ‘-l‘ to print the author name of each file. + + # ls --author -l + +![List Author Files](http://www.tecmint.com/wp-content/uploads/2014/09/List-Author-Files.gif) +List Author Files + +### 8. How will you print escape for non-graphic character? ### + +Ans: We just need to use option ‘-b‘ to print escape for non-graphic character. + + # ls -b + +![Print Escape Character](http://www.tecmint.com/wp-content/uploads/2014/09/Print-Escape-Character.gif) + +### 9. List the size of files and folders in desired scale format. How will you achieve this? ### + +Ans: Here option ‘–block-size=scale‘ along with option ‘-l‘ needs to be used. We need to remove ‘scale’ in the example with the desired scale viz M, K, etc. + + # ls --block-size=M -l + # ls --block-size=K -l + +![List File Scale Format](http://www.tecmint.com/wp-content/uploads/2014/09/List-File-Scale-Format.gif) +List File Scale Format + +### 10. List the files within a directory, but don’t show the backup files, i.e., those files that end with ~. ### + +Ans: Here option ‘-B‘ (do not list implied entries ending with ~) comes to rescue. + + # ls -B + +![List File Without Backup](http://www.tecmint.com/wp-content/uploads/2014/09/List-File-Without-Backup.gif) +List File Without Backup + +### 11. Sort all the files within a directory by name and show associated last modification information. ### + +Ans: We need to use option ‘-c‘ and option ‘-l‘ with command ls to fulfil the need as suggested above. + + # ls -cl + +![Sort Files](http://www.tecmint.com/wp-content/uploads/2014/09/Sort-Files.gif) +Sort Files + +### 12. Sort all the files within a directory by modification time and show associated information. ### + +Ans: We need to use three options together i.e., ‘-l‘, ‘-t‘ and ‘-c‘ with command ls to sort files by modification time, newest first. + + # ls -ltc + +![Sort Files by Modification](http://www.tecmint.com/wp-content/uploads/2014/09/Sort-Files-by-Modification.gif) +Sort Files by Modification + +### 13. How will you control the output of ‘ls’ command to be colorful or no-color? ### + +Ans: We need to use option ‘–color=parameter‘. The parameter to be used with color option are ‘auto’, ‘always’ and ‘never’ which are self explanatory. + + # ls --color=never + # ls --color=auto + # ls --color=always + +![ls Colorful Output](http://www.tecmint.com/wp-content/uploads/2014/09/ls-colorful-output.gif) +ls Colorful Output + +### 14. You are supposed to list directory entries themselves, not their contents. What will you do? ### + +Ans: Here the option ‘-d‘ comes handy. + + # ls -d + +![List Directory Entries](http://www.tecmint.com/wp-content/uploads/2014/09/List-Directory-Entries.gif) +List Directory Entries + +### 15. Create an alias for long format listing “ls -l” as “ll” and output the result to a file and not standard output. ### + +Ans: Here in the above scenario, we need to add alias to .bashrc file and then use redirect operator to write the output to file and not standard output. We will be using editor nano. + + # ls -a + # nano .bashrc + # ll >> ll.txt + # nano ll.txt + +![Create Alias for ls command](http://www.tecmint.com/wp-content/uploads/2014/09/Create-ls-Alias.gif) +Create Alias for ls command + +That’s all for now. Don’t forget to provide us with your valuable feedback in the comments below. I’ll be here again with another interesting article soon. Till then stay tuned and connected. + +### Real Also: ### + +- [10 ‘ls’ Command Interview Questions – Part 2][1] +- [15 Basic ‘ls’ Commands in Linux][2] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/ls-command-interview-questions/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/ls-interview-questions/ +[2]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ \ No newline at end of file From 100192033473efc90b4551bd304d14be8f9e6dcb Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 9 Mar 2015 17:38:02 +0800 Subject: [PATCH 0225/2517] Update 20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md --- ...rs--How to install full kernel source on Debian or Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md index 4887c60e6a..3c0f4ec412 100644 --- a/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md +++ b/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md @@ -48,7 +48,7 @@ Linux有问必答:如何在Debian或Ubuntu上安装完整的内核源码 via: http://ask.xmodulo.com/install-full-kernel-source-debian-ubuntu.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[martin qi](https://github.com/martin2011qi) 校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6faf8cc67271217bbcd37277a9aa92afed7b825b Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 9 Mar 2015 17:43:21 +0800 Subject: [PATCH 0226/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...wers--How to install full kernel source on Debian or Ubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md (100%) diff --git a/translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/published/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md similarity index 100% rename from translated/tech/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md rename to published/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md From 8cc4738be89c365843bdc04a13798e6bea14c66c Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 9 Mar 2015 21:45:16 +0800 Subject: [PATCH 0227/2517] PUB:20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error @ZTinoZ --- ...fix 'XXX is not in the sudoers file' error.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md (72%) diff --git a/translated/tech/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md b/published/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md similarity index 72% rename from translated/tech/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md rename to published/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md index 996f833bff..0cd74b4e3d 100644 --- a/translated/tech/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md +++ b/published/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md @@ -1,16 +1,16 @@ -Linux有问必答时间--怎样解决“XXX is not in the sudoers file”错误 +Linux有问必答时间:怎样解决“XXX is not in the sudoers file”错误 ================================================================================ -> **问题**:我想在我的Linux系统上使用sudo来运行一些特权命令,然而当我试图这么做时,我却得到了"[我的用户ID] is not in the sudoers file. This incident will be reported."的错误信息。我该怎么处理这种sudo错误呢? +> **问题**:我想在我的Linux系统上使用sudo来运行一些特权命令,然而当我试图这么做时,我却得到了"[我的用户名] is not in the sudoers file. This incident will be reported."的错误信息。我该怎么处理这种sudo错误呢? -sudo是一个允许特定的用户组用另一个用户(典型的代表是root)的特权来运行一个命令。sudo有详细的日志功能并且提供了细粒度控制来覆盖用户通过sudo敲入的命令。 +sudo是一个允许特定的用户组用另一个用户(典型的是root)的特权来运行一个命令。sudo有详细的日志功能,并且提供了对用户可通过sudo来运行哪些命令的细粒度控制。 ### Sudo vs. Su ### -su命令也提供了同样的特权升级功能,两者不同的是它们认证过程和特权变化的粒度。su允许你从你的登录会话切换到另一个用户的会话,然后你可以随心所欲地用该用户的特权来运行任何程序,但是你需要知道目标用户的密码才能切换这个用户。另一方面,sudo能在每个命令的基础上工作,允许你用root的特权来运行单个命令。用sudo你不必一定要知道root的密码,但是在提示输入sudo密码的时候要输入你的密码。 +su命令也提供了同样的特权提升功能,两者不同的是它们认证过程和特权变化的粒度。su允许你从你的登录会话切换到另一个用户的会话,然后你可以随心所欲地用该用户的特权来运行任何程序,但是你需要知道目标用户的密码才能切换这个用户。而另一方面,sudo能在单个命令的基础上工作,允许你用root的特权来运行单个命令。用sudo你不必一定要知道root的密码,但是在提示输入sudo密码的时候要输入你的密码。 ### 在Sudoers列表里添加用户 ### -作为一个新用户的你如果试图运行sudo命令,你会碰到以下错误。意思是你不在这个包含经过认证可以使用sudo特权的这么一个用户组的sudoers列表里。 +作为一个新用户的你如果试图运行sudo命令,你会碰到以下错误。意思是你不在这个包含经过认证就可以使用sudo特权的这么一个用户组的sudoers列表里。 [my-user-id] is not in the sudoers file. This incident will be reported. @@ -32,11 +32,11 @@ su命令也提供了同样的特权升级功能,两者不同的是它们认证 alice adm cdrom sudo dip plugdev fuse lpadmin netdev sambashare davfs2 libvirtd docker promiscuous -组员资格变动(和sudo访问)会在你登出登录后生效。 +组员资格变动(和sudo访问)会在你登出后重新登录后生效。 ### 方法二 ### -第二个能让你使用sudo的方法是直接把你自己添加到路径为 /etc/sudoers 这个配置文件中去。 +第二个能让你使用sudo的方法是直接把你自己添加到 /etc/sudoers 这个配置文件中去。 要修改 /etc/sudoers 文件,你可以使用一个名为visudo的特殊sudo编辑器命令。用root身份简单调用以下命令。 @@ -55,6 +55,6 @@ su命令也提供了同样的特权升级功能,两者不同的是它们认证 via: http://ask.xmodulo.com/fix-is-not-in-the-sudoers-file.html 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 334f9b1f12b8912b0275151934c13a1bc4adc82b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 9 Mar 2015 22:23:20 +0800 Subject: [PATCH 0228/2517] PUB:20141204 Linux Namespaces @bazz2 --- .../20141204 Linux Namespaces.md | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) rename {translated/tech => published}/20141204 Linux Namespaces.md (79%) diff --git a/translated/tech/20141204 Linux Namespaces.md b/published/20141204 Linux Namespaces.md similarity index 79% rename from translated/tech/20141204 Linux Namespaces.md rename to published/20141204 Linux Namespaces.md index 522131a50b..c40854d780 100644 --- a/translated/tech/20141204 Linux Namespaces.md +++ b/published/20141204 Linux Namespaces.md @@ -1,32 +1,36 @@ -Linux 命名空间 +介绍 Linux 的命名空间 ================================================================================ ### 背景 ### -从2.6.24版的内核开始,Linux 就支持6种不同类型的命名空间。它们的出现,使用户创建的进程能够与系统分离得更加彻底,从而不需要考虑太多底层的虚拟化技术。 +从Linux 2.6.24版的内核开始,Linux 就支持6种不同类型的命名空间。它们的出现,使用户创建的进程能够与系统分离得更加彻底,从而不需要使用更多的底层虚拟化技术。 - **CLONE_NEWIPC**: 进程间通信(IPC)的命名空间,可以将 SystemV 的 IPC 和 POSIX 的消息队列独立出来。 -- **CLONE_NEWPID**: 进程 ID 的命名空间,进程 ID 独立,意思就是命名空间内的进程 ID 可能会与命名空间外的进程 ID 冲突,于是命名空间内的进程 ID 映射到命名空间外时会使用另外一个进程 ID。比如说,命名空间内 ID 为1的进程,在命名空间外就是指 init 进程。 +- **CLONE_NEWPID**: PID 命名空间。空间内的PID 是独立分配的,意思就是命名空间内的虚拟 PID 可能会与命名空间外的 PID 相冲突,于是命名空间内的 PID 映射到命名空间外时会使用另外一个 PID。比如说,命名空间内第一个 PID 为1,而在命名空间外就是该 PID 已被 init 进程所使用。 - **CLONE_NEWNET**: 网络命名空间,用于隔离网络资源(/proc/net、IP 地址、网卡、路由等)。后台进程可以运行在不同命名空间内的相同端口上,用户还可以虚拟出一块网卡。 - **CLONE_NEWNS**: 挂载命名空间,进程运行时可以将挂载点与系统分离,使用这个功能时,我们可以达到 chroot 的功能,而在安全性方面比 chroot 更高。 - **CLONE_NEWUTS**: UTS 命名空间,主要目的是独立出主机名和网络信息服务(NIS)。 - **CLONE_NEWUSER**: 用户命名空间,同进程 ID 一样,用户 ID 和组 ID 在命名空间内外是不一样的,并且在不同命名空间内可以存在相同的 ID。 +下面我们介绍一下进程命名空间和网络命名空间。 + +### 进程命名空间 + 本文用 C 语言介绍上述概念,因为演示进程命名空间的时候需要用到 C 语言。下面的测试过程在 Debian 6 和 Debian 7 上执行。首先,在栈内分配一页内存空间,并将指针指向内存页的末尾。这里我们使用 **alloca()** 函数来分配内存,不要用 malloc() 函数,它会把内存分配在堆上。 void *mem = alloca(sysconf(_SC_PAGESIZE)) + sysconf(_SC_PAGESIZE); -然后使用 **clone()** 函数创建子进程,传入栈空间的地址 "mem",以及指定命名空间的标记。同时我们还指定“callee”作为子进程运行的函数。 +然后使用 **clone()** 函数创建子进程,传入我们的子栈空间地址 "mem",并指定命名空间的标记。同时我们还指定“callee”作为子进程运行的函数。 mypid = clone(callee, mem, SIGCHLD | CLONE_NEWIPC | CLONE_NEWPID | CLONE_NEWNS | CLONE_FILES, NULL); -**clone** 之后我们要在父进程中等待子进程先退出,否则的话,父进程会继续运行下去,直到进程结束,留下子进程变成孤儿进程: +**clone** 之后我们要在父进程中等待子进程先退出,否则的话,父进程会继续运行下去,并马上进程结束,留下子进程变成孤儿进程: while (waitpid(mypid, &r, 0) < 0 && errno == EINTR) { continue; } -最后当子进程退出后,我们会回到 shell 界面。 +最后当子进程退出后,我们会回到 shell 界面,并返回子进程的退出码。 if (WIFEXITED(r)) { @@ -47,7 +51,7 @@ Linux 命名空间 return ret; } -程序挂载 **/proc** 文件系统,设置用户 ID 和组 ID,值都为“u”,然后运行 **/bin/bash** 程序,[LXC][1] 是操作系统级的虚拟化工具,使用 cgroups 和命名空间来完成资源的分离。现在我们把所有代码放在一起,变量“u”的值设为65534,在 Debian 系统中,这是“nobody”和“nogroup”: +程序挂载了 **/proc** 文件系统,设置用户 ID 和组 ID,值都为“u”,然后运行 **/bin/bash** 程序,[LXC][1] 是一个操作系统级的虚拟化工具,使用 cgroups 和命名空间来完成资源的分离。现在我们把所有代码放在一起,变量“u”的值设为65534,在 Debian 系统中,这是“nobody”和“nogroup”: #define _GNU_SOURCE #include @@ -101,12 +105,16 @@ Linux 命名空间 nobody 5 0.0 0.0 2784 1064 pts/1 R+ 21:21 0:00 ps auxw nobody@w:~/pen/tmp$ -注意上面的结果,UID 和 GID 被设置成 nobody 和 nogroup 了,特别是 ps 工具只输出两个进程,它们的 ID 分别是1和5(LCTT注:这就是上文介绍 CLONE_NEWPID 时提到的功能,在线程所在的命名空间内,进程 ID 可以为1,映射到命名空间外就是65534;而命名空间外的 ID 为1的进程一直是 init)。接下来轮到使用 ip netns 来设置网络的命名空间。第一步先确定当前系统没有命名空间: +注意上面的结果,UID 和 GID 被设置成 nobody 和 nogroup 了,特别是 ps 工具只输出两个进程,它们的 ID 分别是1和5(LCTT注:这就是上文介绍 CLONE_NEWPID 时提到的功能,在线程所在的命名空间内,进程 ID 可以为1,映射到命名空间外是另外一个 PID;而命名空间外的 ID 为1的进程一直是 init)。 + +### 网络命名空间 + +接下来轮到使用 ip netns 来设置网络的命名空间。第一步先确定当前系统没有命名空间: root@w:~# ip netns list Object "netns" is unknown, try "ip help". -这种情况下,你需要更新你的系统内核,以及 ip 工具。这里假设你的内核版高于2.6.24,ip 工具版本也差不多,高于2.6.24(LCTT注:ip 工具由 iproute 安装包提供,此安装包版本与内核版本相近)。更新好后,**ip netns list** 在没有命名空间存在的情况下不会输出任务信息。加个名为“ns1”的命名空间看看: +如果报了上述错误,你需要更新你的系统内核,以及 ip 工具程序。这里假设你的内核版高于2.6.24,ip 工具版本也差不多,高于2.6.24(LCTT注:ip 工具由 iproute 安装包提供,此安装包版本与内核版本相近)。更新好后,**ip netns list** 在没有命名空间存在的情况下不会输出任务信息。加个名为“ns1”的命名空间看看: root@w:~# ip netns add ns1 root@w:~# ip netns list @@ -120,7 +128,7 @@ Linux 命名空间 2: eth0: mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 1000 link/ether 00:0c:29:65:25:9e brd ff:ff:ff:ff:ff:ff -创建新的虚拟网卡,加到命名空间。虚拟网卡需要成对创建,互相关联——想想交叉电缆吧: +创建新的虚拟网卡,并加到命名空间。虚拟网卡需要成对创建,互相关联——就像交叉电缆一样: root@w:~# ip link add veth0 type veth peer name veth1 root@w:~# ip link list @@ -146,11 +154,11 @@ Linux 命名空间 这个时候 **ifconfig** -a 命令只能显示 veth0,不能显示 veth1,因为后者现在在 ns1 命名空间中。 -如果想删除 veth1,可以执行下面的命令: +如果想删除 veth0/veth1,可以执行下面的命令: ip netns exec ns1 ip link del veth1 -为 veth0 分配 IP 地址: +我们可以为 veth0 分配 IP 地址: ifconfig veth0 192.168.5.5/24 @@ -229,7 +237,7 @@ via: http://www.howtoforge.com/linux-namespaces 作者:[aziods][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2576f70d8cba1e871f1cd233bff2c9559ef4a711 Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 9 Mar 2015 23:29:47 +0800 Subject: [PATCH 0229/2517] translated - Debian TC New Member --- ...nted For Going Past The Systemd Fallout.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 translated/news/New Debian TC Members Appointed For Going Past The Systemd Fallout.md diff --git a/translated/news/New Debian TC Members Appointed For Going Past The Systemd Fallout.md b/translated/news/New Debian TC Members Appointed For Going Past The Systemd Fallout.md new file mode 100644 index 0000000000..2fdccd07ba --- /dev/null +++ b/translated/news/New Debian TC Members Appointed For Going Past The Systemd Fallout.md @@ -0,0 +1,25 @@ +经过Systemd争执 新Debian TC成员已被任命 +================================================================================ + +去年随着Debian做出选择systemd作为init管理器的决定以及随后的[init系统投票][1],有三个人从Debian技术委员会退出:Colin Watson, [Ian Jackson][2], 以及[Russ Allbery][3]。这些空缺席位现已由现有的技术委员会成员任命。 + +新任命的技术委员会成员是Sam Hartman, Tollef Fog Heen,以及Didier Raboud。这些新成员加上Bdale Garbee, Don Armstrong, Andreas Barth, Steve Langasek,以及Keith Packard组成了现在的Debian技术委员会。由Debian章程确定的Debian技术委员会负责对Debian项目中的技术争端做出最后的决定,他们在去年所有的关于init系统的讨论中变得十分重要。 + +![](http://www.phoronix.net/image.php?id=debconf12_managua&image=debconf_12_conference_med) + +新技术委员会成员的委任公告可以从[debian-devel-announce列表][4]中获悉。 +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=news_item&px=Debian-TC-Three-Appointments + +作者:[Michael Larabel][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.michaellarabel.com/ +[1]:http://www.phoronix.com/scan.php?page=news_item&px=MTg0MzY +[2]:http://www.phoronix.com/scan.php?page=news_item&px=MTg0NDA +[3]:http://www.phoronix.com/scan.php?page=news_item&px=MTg0MjM +[4]:https://lists.debian.org/debian-devel-announce/2015/03/msg00003.html From cba9d88e87a22be78d76e70c02eba3a7c403a750 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 10 Mar 2015 08:56:32 +0800 Subject: [PATCH 0230/2517] PUB:20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line @mr-ping --- ...gure a MySQL user from the command line.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md (81%) diff --git a/translated/tech/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md b/published/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md similarity index 81% rename from translated/tech/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md rename to published/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md index 9318d87821..0b393aa3b1 100644 --- a/translated/tech/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md +++ b/published/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md @@ -1,4 +1,4 @@ -Linux有问必答: 如何通过命令行创建和设置一个MySQL用户 +Linux有问必答:如何通过命令行创建和设置一个MySQL用户 ================================================================================ > **问题**:我想要在MySQL服务器上创建一个新的用户帐号,并且赋予他适当的权限和资源限制。如何通过命令行的方式来创建并且设置一个MySQL用户呢? @@ -21,7 +21,7 @@ Linux有问必答: 如何通过命令行创建和设置一个MySQL用户 mysql> CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypassword'; -一旦用户被创建后,包括加密的密码、权限和资源限制在内的所有帐号细节都会被存储在一个名为**user**的表中,这个表则存在与**mysql**这个特殊的数据库里。 +一旦用户被创建后,包括加密的密码、权限和资源限制在内的所有帐号细节都会被存储在一个名为**user**的表中,这个表则存在于**mysql**这个特殊的数据库里。 运行下列命令,验证帐号是否创建成功 @@ -33,14 +33,14 @@ Linux有问必答: 如何通过命令行创建和设置一个MySQL用户 - **ALL**: 所有可用的权限 - **CREATE**: 创建库、表和索引 -- **LOCK_TABLES**: 锁定表. -- **ALTER**: 修改表. -- **DELETE**: 删除表. -- **INSERT**: 插入表或列. -- **SELECT**: 选择表或列. -- **CREATE_VIEW**: 创建视图. -- **SHOW_DATABASES**: 展示数据库. -- **DROP**: 删除库、表和视图. +- **LOCK_TABLES**: 锁定表 +- **ALTER**: 修改表 +- **DELETE**: 删除表 +- **INSERT**: 插入表或列 +- **SELECT**: 检索表或列的数据 +- **CREATE_VIEW**: 创建视图 +- **SHOW_DATABASES**: 列出数据库 +- **DROP**: 删除库、表和视图 运行以下命令赋予"myuser"用户特定权限。 @@ -70,10 +70,10 @@ Linux有问必答: 如何通过命令行创建和设置一个MySQL用户 在MySQL中,你可以为单独的用户设置MySQL的资源使用限制。可用的资源限制如下: -- **MAX_QUERIES_PER_HOUR**: 允许的每小时最大请求数量. -- **MAX_UPDATES_PER_HOUR**: 允许的每小时最大更新数量. -- **MAX_CONNECTIONS_PER_HOUR**: 允许的每小时最大连接(译者注:[其与 MySQL全局变量: max_user_connections 共同决定用户到数据库的同时连接数量](http://dev.mysql.com/doc/refman/5.0/en/user-resources.html))数量. -- **MAX_USER_CONNECTIONS**: 对服务器的同时连接量. +- **MAX\_QUERIES\_PER\_HOUR**: 允许的每小时最大请求数量 +- **MAX\_UPDATES\_PER\_HOUR**: 允许的每小时最大更新数量 +- **MAX\_CONNECTIONS\_PER\_HOUR**: 允许的每小时最大连接(译者注:[其与 MySQL全局变量: max\_user\_connections 共同决定用户到数据库的同时连接数量](http://dev.mysql.com/doc/refman/5.0/en/user-resources.html))数量 +- **MAX\_USER\_CONNECTIONS**: 对服务器的同时连接量 使用以下命令为"myuser"帐号增加一个资源限制: @@ -102,6 +102,6 @@ Linux有问必答: 如何通过命令行创建和设置一个MySQL用户 via: http://ask.xmodulo.com/create-configure-mysql-user-command-line.html 译者:[Ping](http://weibo.com/370321376) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 \ No newline at end of file From 6acc3e665e40b2d24ee0231fa24648520d884cd3 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 10 Mar 2015 09:07:22 +0800 Subject: [PATCH 0231/2517] PUB:New Debian TC Members Appointed For Going Past The Systemd Fallout @alim0x --- ...nted For Going Past The Systemd Fallout.md | 26 +++++++++++++++++++ ...nted For Going Past The Systemd Fallout.md | 25 ------------------ 2 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 published/New Debian TC Members Appointed For Going Past The Systemd Fallout.md delete mode 100644 translated/news/New Debian TC Members Appointed For Going Past The Systemd Fallout.md diff --git a/published/New Debian TC Members Appointed For Going Past The Systemd Fallout.md b/published/New Debian TC Members Appointed For Going Past The Systemd Fallout.md new file mode 100644 index 0000000000..d33e7d3b5d --- /dev/null +++ b/published/New Debian TC Members Appointed For Going Past The Systemd Fallout.md @@ -0,0 +1,26 @@ +经过 systemd 争执后,辞职的 Debian TC 席位已被增补 +================================================================================ + +去年随着Debian 以 systemd 作为 init 管理器的决议,以及随后的 [init 系统投票][1],有三个人从 Debian 技术委员会退出:Colin Watson, [Ian Jackson][2], 以及 [Russ Allbery][3]。现在,这些空缺席位现已由现有的技术委员会成员任命。 + +新任命的技术委员会成员是 Sam Hartman, Tollef Fog Heen 以及 Didier Raboud。这些新成员加上Bdale Garbee, Don Armstrong, Andreas Barth, Steve Langasek 以及 Keith Packard 组成了现在的Debian技术委员会。由Debian章程确定的 Debian 技术委员会(TC)负责对 Debian 项目中的技术争端做出最后的决定,他们在去年所有的关于 init 系统的讨论中变得十分重要。 + +![](http://www.phoronix.net/image.php?id=debconf12_managua&image=debconf_12_conference_med) + +新技术委员会成员的委任公告可以从 [debian-devel-announce列表][4] 中获悉。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=news_item&px=Debian-TC-Three-Appointments + +作者:[Michael Larabel][a] +译者:[alim0x](https://github.com/alim0x) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.michaellarabel.com/ +[1]:http://www.phoronix.com/scan.php?page=news_item&px=MTg0MzY +[2]:http://www.phoronix.com/scan.php?page=news_item&px=MTg0NDA +[3]:http://www.phoronix.com/scan.php?page=news_item&px=MTg0MjM +[4]:https://lists.debian.org/debian-devel-announce/2015/03/msg00003.html diff --git a/translated/news/New Debian TC Members Appointed For Going Past The Systemd Fallout.md b/translated/news/New Debian TC Members Appointed For Going Past The Systemd Fallout.md deleted file mode 100644 index 2fdccd07ba..0000000000 --- a/translated/news/New Debian TC Members Appointed For Going Past The Systemd Fallout.md +++ /dev/null @@ -1,25 +0,0 @@ -经过Systemd争执 新Debian TC成员已被任命 -================================================================================ - -去年随着Debian做出选择systemd作为init管理器的决定以及随后的[init系统投票][1],有三个人从Debian技术委员会退出:Colin Watson, [Ian Jackson][2], 以及[Russ Allbery][3]。这些空缺席位现已由现有的技术委员会成员任命。 - -新任命的技术委员会成员是Sam Hartman, Tollef Fog Heen,以及Didier Raboud。这些新成员加上Bdale Garbee, Don Armstrong, Andreas Barth, Steve Langasek,以及Keith Packard组成了现在的Debian技术委员会。由Debian章程确定的Debian技术委员会负责对Debian项目中的技术争端做出最后的决定,他们在去年所有的关于init系统的讨论中变得十分重要。 - -![](http://www.phoronix.net/image.php?id=debconf12_managua&image=debconf_12_conference_med) - -新技术委员会成员的委任公告可以从[debian-devel-announce列表][4]中获悉。 --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=news_item&px=Debian-TC-Three-Appointments - -作者:[Michael Larabel][a] -译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.michaellarabel.com/ -[1]:http://www.phoronix.com/scan.php?page=news_item&px=MTg0MzY -[2]:http://www.phoronix.com/scan.php?page=news_item&px=MTg0NDA -[3]:http://www.phoronix.com/scan.php?page=news_item&px=MTg0MjM -[4]:https://lists.debian.org/debian-devel-announce/2015/03/msg00003.html From 9d2294938b550b9771d16392b9b9a500fe482436 Mon Sep 17 00:00:00 2001 From: Love-xuan Date: Tue, 10 Mar 2015 10:27:36 +0800 Subject: [PATCH 0232/2517] Love-xuan translating --- sources/share/20140804 Group Test--Linux Text Editors.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20140804 Group Test--Linux Text Editors.md b/sources/share/20140804 Group Test--Linux Text Editors.md index b1f2846a0e..02c1b2b586 100644 --- a/sources/share/20140804 Group Test--Linux Text Editors.md +++ b/sources/share/20140804 Group Test--Linux Text Editors.md @@ -1,3 +1,4 @@ +Love-xuan Translating Group Test: Linux Text Editors ================================================================================ > Mayank Sharma tests five supercharged text editors that can crunch more than just words. @@ -315,4 +316,4 @@ via: http://www.linuxvoice.com/text-editors/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.linuxvoice.com/author/ben_everard/ \ No newline at end of file +[a]:http://www.linuxvoice.com/author/ben_everard/ From 34e88d28b1b5179bcaa74475b086054fce068cea Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 10 Mar 2015 11:52:14 +0800 Subject: [PATCH 0233/2517] Translating by ZTinoZ --- .../tech/20150309 15 Basic 'ls' Command Examples in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md b/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md index 3ff1e4df47..d51dce8f75 100644 --- a/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md +++ b/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ 15 Basic ‘ls’ Command Examples in Linux ================================================================================ ls command is one of the most frequently used command in Linux. I believe ls command is the first command you may use when you get into the command prompt of Linux Box. We use ls command daily basis and frequently even though we may not aware and never use all the option available. In this article, we’ll be discussing basic ls command where we have tried to cover as much parameters as possible. @@ -259,4 +260,4 @@ via: http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.tecmint.com/author/admin/ \ No newline at end of file +[a]:http://www.tecmint.com/author/admin/ From e0d525c293a7d2e738c465f0d060401cfad71f95 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 10 Mar 2015 16:22:12 +0800 Subject: [PATCH 0234/2517] =?UTF-8?q?20150310-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Linux Based Mini PC You Can Buy In 2015.md | 139 ++++++++++++++++++ sources/talk/20150310 FAQ--BSD.md | 81 ++++++++++ ...il Alerts for SSH Login on Linux Server.md | 59 ++++++++ ...ter Suspend In Ubuntu 14.04 [Quick Tip].md | 28 ++++ 4 files changed, 307 insertions(+) create mode 100644 sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md create mode 100644 sources/talk/20150310 FAQ--BSD.md create mode 100644 sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md create mode 100644 sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md diff --git a/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md new file mode 100644 index 0000000000..fcecf0d396 --- /dev/null +++ b/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md @@ -0,0 +1,139 @@ +4 Linux Based Mini PC You Can Buy In 2015 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Linux_Based_Mini_PC.jpg) + +Mini PCs, in my opinion, will takeover the traditional desktop computers in near future. Traditional desktop has a bulky CPU which takes a lot of space with its fan running like a blower. The mini PCs, on the other hand, are tiny and compact. With hardly 4″ or 5″ in size, they can be easily placed on a table. + +Moreover, these mini PCs are fanless which is an added virtue. Of course, you can buy fanless regular desktops but the space consumption is still an issue. Personally, I find the mini PC cute in looks. If you are not a gamer and thinking of buying a new desktop PC, I’ll highly recommend you to **buy a Linux based mini PC**. + +If you go by my recommendation and consider buying it, you might wonder what options do you have. Worry not. In this post we shall see four **Linux based Mini PC that you can buy in 2015**. + +### Linux based mini PCs ### + +Please do note that some of these gadgets might not be available to order just yet. Some of these have been just announced and will be released to public in near future. + +#### 1. Meerkat by System76 #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/system76-meerkat.jpg) + +[System76][1] is a computer manufacturer exclusively dealing with only Ubuntu based desktop, laptops and servers. [System76 announced an Ubuntu based mini PC Meerkat][2] last week. Let’s take a quick look at its specification: + +**Specification** + +- Intel 5th Generation processors, available options i3-5010U and i5-5250U +- up to 2 TB of storage (M.2 SATA SSD) +- 16 GB DDR3 RAM +- Graphics Intel HD 5500 and Intel HD 6000 for i3 and i5 respectively +- 4″ x 4″ in size +- WiFi +- 1 Gb NIC +- 2 USB 3.0 ports + +**Price** + +In the range of $500 (yet to be confirmed). + +**Availability** + +US release by the end of March 2015. + +#### 2. Mintbox Mini by Compulab #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/mintbox-mini.jpeg) + +[Compulab][3] shrunk its flagship Linux Mint based PC devices, Mintbox into [Mintbox Mini][4]. The compact version is around 4″ in size. More details are as following: + +**Specifications** + +- AMD A4-6400T processor +- Radeon R3 graphics processor +- 4 GB RAM +- 64 GB SSD +- 2 USB 3.0 ports, 3 USB 2.0 ports +- 2 HDMI out ports +- 802.11 b/g/n Wifi +- Gigabit Ethernet +- MicroSD reader + +**Price** + +Staring around $300 + +**Availability** + +Second quarter of 2015 + +#### 3. Utilite2 by Compulab #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Utilite2-ARM-PC.jpg) + +It’s not that Compulab has stuck with Linux Mint only. It announced an ARM desktop PC running Ubuntu in last December. With a size of 3.4″x2.3″, [Utilite2][5] has modest feature and modest price. + +**Specifications** + +- Qualcomm Snapdragon 600 (APQ8064) quad-core CPU 1.7GHz +- 2GB RAM, eMMC with optional 32 GB mSATA storage +- Graphics with Qualcomm Adreno™ GPU +- 1080p video playback and capture +- Dual-antenna WiFi 802.11 and Bluetooth 4.0 +- Gigabit Ethernet, 4x USB2, USB OTG +- Cellular modem support + +**Price** + +$192 for regular model, $229 with SSD storage. Shipping charges extra. + +**Availability** + +Available to purchase now. It will take four weeks in shipping. + +#### Penguin Pocket Wee by Think Penguin #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Think_Penguin_Pocket_Wee.jpeg) + +[Think Penguin][6] is a Open Source focused hardware manufacturer. In the mini PC category, it has [Penguin Pocket Wee][7] to offer. With 4.6″x 4.4″x 1.4″ in size, Penguin Pocket Wee provides a number of configuration to you. You can choose between the processors, storage, network adapters and what not. You can choose to buy it pre-installed with your favorite Linux distribution, default OS is Ubuntu. + +The general configuration is as following: + +- Intel Core i3 or i5 processor with support for up to 1080p HD video +- Expandable up to 16GB of DDR3 RAM +- Intel HD graphics +- Wireless N +- Up to 250GB of SSD +- 4 USB 3.0 +- Intel 10/100/1000 Gigabit Ethernet Controller + +**Price** + +Basic model starts at $499 and it can go up to $1000 based on the configuration you select. + +**Availability** + +Available to order now. There are offices in UK and USA so it should be shipping to North America and Europe. + +### What’s your pick? ### + +I have deliberately not included [Raspberry Pi 2][8] or other Linux microcomputer such as [Intel’s Compute Stick][9]. The reason is that I do not think that micro-computers fall in the same categories as mini PCs. + +What do you think? Are you tempted to replace your desktop with a mini PC? Is there another player which I missed in this list of **best Linux based mini PCs**? Do share your views. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/4-linux-based-mini-pc-buy-2015/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:https://system76.com/ +[2]:http://itsfoss.com/system76-unveils-ubuntu-based-mini-pc-meerkat/ +[3]:http://www.compulab.co.il/ +[4]:http://itsfoss.com/mintbox-mini-compact-linux-mint-powered-pc-unveiled/ +[5]:http://www.compulab.co.il/utilite-computer/web/utilite2-overview +[6]:https://www.thinkpenguin.com/ +[7]:https://www.thinkpenguin.com/gnu-linux/penguin-pocket-wee-gnu-linux-desktop +[8]:http://itsfoss.com/raspberry-pi-2-specs/ +[9]:http://itsfoss.com/intels-compute-stick/ \ No newline at end of file diff --git a/sources/talk/20150310 FAQ--BSD.md b/sources/talk/20150310 FAQ--BSD.md new file mode 100644 index 0000000000..80f77ef656 --- /dev/null +++ b/sources/talk/20150310 FAQ--BSD.md @@ -0,0 +1,81 @@ +FAQ: BSD +================================================================================ +![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq1-large1.png) + +### Had history been slightly different, you’d be reading FreeBSD Voice today… ### + +#### So what’s the deal with this Birsa Seva Dal then? Isn’t it a political group in India? #### + +Very funny – you looked up the “BSD” disambiguation page on Wikipedia just to make that joke, didn’t you? Here we’re talking about the Berkeley Software Distribution, a family of operating systems that are much more widely used than you might think. + +#### Sorry, I couldn’t help myself. OK, so what’s the deal with these OSes? #### + +There are three main BSD operating systems in use today. They are based on Unix, they are open source, they tend to be used in server roles, but can also make good desktops and workstations as well. They run KDE, Firefox, LibreOffice, Apache, MySQL and pretty much any open source application you can name. They’re reliable, secure and support a lot of different hardware. + +#### Congratulations – you’ve just described GNU/Linux… #### + +True. Linux has all of the things I’ve just mentioned, and that’s why a lot of people never investigate BSD. In day-to-day usage, there isn’t a lot of difference between the BSD family and Linux, largely because they all have Unix underpinnings, and also because they share a lot of software. You could be logged into a remote machine, hacking some Python code in Vim, and checking your email in Mutt, and you wouldn’t know you were running BSD. Or you could be using an internet terminal in a cafe somewhere and not know it’s BSD. + +The biggest differences are in the development model and licence, and to understand this, we need to step back in time. The B in BSD refers to the University of California, Berkeley, which was a hotbed of open source Unix development back in the 1980s. As the 90s came, x86-based PCs were becoming popular and many people were interested in having a Unix-like OS on their home computers. A project called 386BSD was released in 1992 to provide just that. + +#### And where were all the Linux distributions at this time? #### + +Good question! You might know that one year before, Linus Torvalds had announced his kernel, which, when paired with the GNU project, formed a complete open source operating system. Linus had been following GNU’s own kernel (Hurd) and 386BSD, and said that had either of them been ready for daily use, he probably wouldn’t have created Linux. So the first few years of the 90s were tremendously lively for open source operating systems, and nobody was really sure which ones would succeed. + +Then it got messy for BSD. AT&T, the original developer of Unix, was trying to monetise its work on the operating system and claimed that BSD infringed its intellectual property rights. This culminated in a lawsuit in 1992 which severely held back BSD development. In the end, various chunks of the BSD source code had to be rewritten – while all this time, GNU/Linux was gaining features, stability and popularity. + +BSD was arguably in a more mature state than GNU/Linux in the early 1990s, and without these legal complications it could have become the standard on x86 PCs. We could all be using it today instead of Linux. + +#### But you said earlier that BSD is still widely used, so things improved after that? #### + +Yes. 386BSD development stagnated, but two teams of developers working over the internet created separate successor projects. FreeBSD became the most widely used flavour of BSD, and is now the closest to Linux as a desktop and server operating system, while NetBSD focused on portability (today it runs on over 50 platforms, all built from the same codebase). The third flavour, OpenBSD, forked off from NetBSD just a few years after NetBSD started due to a developer spat, and today it’s well known for its concentration on security. Over the years, OpenBSD has created many programs that have become standard on Linux, such as OpenSSH – and now we have LibreSSL too. + +#### So these three flavours of BSD are like Linux distributions? #### + +Yes and no. Each BSD has a separate codebase and separate development teams, although there is a lot of code-flow between them (especially for hardware drivers). But they are standalone operating systems with their own features, pros and cons. + +We mentioned that the development model of the BSDs is one feature that really distinguishes them from GNU/Linux. There’s nobody in charge of GNU/Linux as a whole: some teams are working on the GNU components, some are working on the kernel, some on boot scripts, some on manual pages, some on libraries, and so forth. The development model is often called “wild west”, with a lack of central authority, and distributions do all the hard work of fitting everything together. + +The BSDs, in contrast, are developed as complete projects from centralised source code trees. The kernel, the libraries, the system utilities and the manual pages are all stored and worked on in the same place. Many BSD fans argue that this gives the operating systems more coherency and stability, and from our years of dabbling with BSD we can attest that the manual pages are largely superb. + +![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq2-large1.png) + +#### Don’t the BSDs use anything from GNU/Linux? #### + +Yes, especially GCC. The GNU Compiler Collection has been the de-facto standard compiler on free Unix systems for decades, although FreeBSD has recently moved to LLVM/Clang. It’s important to note that the BSDs also use other open source projects that aren’t specifically GNU or Linux, such as the X Window System (XFree86 and X.org), Perl and so forth. And thanks to standards such as POSIX, most programs that run on Linux can be recompiled to run on the various BSD flavours. + +So, you could replace the L in a LAMP (Linux, Apache, MySQL and PHP) stack with FreeBSD, and get pretty much the same environment, with a different set of features (eg variations in filesystem and driver support). And there are some mega, super, huge users of FreeBSD, such as Netflix, which serve up ridiculous amounts of data every day. While FreeBSD makes a good desktop OS, its strengths really lie in the server room, with exceptional reliability and network performance. + +OpenBSD tends to be used in smaller web serving, file hosting, firewall and gateway roles where security is imperative. NetBSD is the least popular of the main BSD flavours – it can run on almost anything though, including old Amigas and Acorn boxes, and sometimes finds itself inside closed-source network devices. + +#### Hang on – how can someone close the source code? That ain’t kosher in Linux! #### + +Correct, and here we come to the other major difference with GNU/Linux. The licence for the BSD flavours (called, funnily enough, the BSD Licence) is very different to the GPL that we know. For starters, it’s much shorter. The BSD Licence essentially says: do what you want with this code, but give the original developers credit for writing it, and don’t try to sue them if it blows up your computer. + +So there’s nothing in the licence that forces the code to stay open, unlike with the GPL, which requires that users of the code also make their modifications freely available. This crucial difference has sparked countless flame wars over the years, with BSD fans saying that their licence is more free (because it’s less restrictive), while GNU/GPL fans say that their licence is actually more free (because it preserves freedom down the road). + +#### Blimey. Anyway, now that you’ve piqued my interest, where can I try out all these lovely BSD flavours? #### + +You can probably guess the websites – [www.openbsd.org][1], [www.freebsd.org][2] and [www.netbsd.org][3] – where you can download ISO images, boot them in VirtualBox, and play around. If you’ve been using Linux for a while, you won’t find any of them too difficult, although you’re expected to know your way around the command line. If you’re looking for something more newbie-friendly, PC-BSD + +([www.pcbsd.org][4]) is a customised version of FreeBSD focused on the desktop, with a fancy graphical installer and super-simple management of software. Have fun exploring! + + + + + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/faq-bsd-2/ + +作者:[Mike Saunders][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/mike/ +[1]:http://www.openbsd.org/ +[2]:http://www.freebsd.org/ +[3]:http://www.netbsd.org/ +[4]:http://www.pcbsd.org/ \ No newline at end of file diff --git a/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md b/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md new file mode 100644 index 0000000000..286c909768 --- /dev/null +++ b/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md @@ -0,0 +1,59 @@ +How To Get Email Alerts for SSH Login on Linux Server +================================================================================ +![](http://www.ehowstuff.com/wp-content/uploads/2015/03/fail2ban-security.jpg) + +Enable SSH server on a virtual private server (VPS) will expose the server to the internet and provide opportunities for hacking activities, especially when VPS still using root as a primary access. VPS should be configured with a email alert automatically to each successful login attempts via SSH server . VPS server owner shall be notified of any SSH server access log, such as who, when and which source IP address. This is an important security concern for server owners to protect the server from unknown login attempts. This is because if hackers use brute force to log into your VPS via ssh then it can be very dangerous. In this article, I will explain how to set up an email alert to all SSH login users on linux CentOS 6, CentOS 7, RHEL 6 and RHEL 7. + +1. Login to your server as root user : + +2. Configure at alert from source global definitions (/etc/bashrc). This will enabled for root and normal users : + + [root@vps ~]# vi /etc/bashrc + +Add the following at the bottom of the files. + + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + +3. Optionally you can enable alert for root only : + + [root@vps ~]# vi .bashrc + +Add the following at the bottom of /root/.bashrc : + + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + +Full Configuration file example : + + # .bashrc + + # User specific aliases and functions + + alias rm='rm -i' + alias cp='cp -i' + alias mv='mv -i' + + # Source global definitions + if [ -f /etc/bashrc ]; then + . /etc/bashrc + fi + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + +4. Optionally you can enable alert for specify normal user (e.g skytech ) : + + [root@vps ~]# vi /home/skytech/.bashrc + +Add the following at the bottom of /home/skytech/.bashrc : + + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + +-------------------------------------------------------------------------------- + +via: http://www.ehowstuff.com/how-to-get-email-alerts-for-ssh-login-on-linux-server/ + +作者:[skytech][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ehowstuff.com/author/mhstar/ \ No newline at end of file diff --git a/sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md b/sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md new file mode 100644 index 0000000000..cf356462da --- /dev/null +++ b/sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md @@ -0,0 +1,28 @@ +[Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip] +================================================================================ +### Problem: ### + +When Ubuntu 14.04 or 14.10 comes back from sleep or suspend mode, the keyboard and mouse freeze. Nothing can be clicked or entered. The only way out is to force shutdown the system by pressing the power button. This is very inconvenient, rather very annoying. Because the default behavior in Ubuntu is that when you close the lid of the laptop, it goes in sleep mode. + +In this quick post, we shall see how to fix this issue of mouse freeze after suspend in Ubuntu 14.04 and 14.10. + +### Solution to mouse freezing after sleep in Ubuntu 14.04 ### + +The issue is actually coming from Kernel upgrade. I am not sure of the reason why, but a re-install of input device driver seems to be fixing this issue. + + sudo apt-get install --reinstall xserver-xorg-input-all + +This quick tip was based on a question asked by an It’s FOSS reader, Dev. Try this quick tip and see if it works for you as well. In a similar issue, you can [fix no Unity, launcher and dash after logging in to Ubuntu][1]. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/keyboard-mouse-freeze-suspend/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/how-to-fix-no-unity-no-launcher-no-dash-in-ubuntu-12-10-quick-tip/ \ No newline at end of file From d0bc9007593d1b4ad93f9ede737c21c96180aa57 Mon Sep 17 00:00:00 2001 From: Wi Date: Tue, 10 Mar 2015 21:43:54 +0800 Subject: [PATCH 0235/2517] Update 20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md Translating, , , --- ...Italian Region Emilia-Romagna Is Switching To OpenOffice.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md b/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md index 59df5a0b2d..91ac747dbe 100644 --- a/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md +++ b/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md @@ -1,3 +1,4 @@ +Translating by 355968851 Italian Region Emilia-Romagna Is Switching To OpenOffice ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Turin_Open_Source.jpg) @@ -37,4 +38,4 @@ via: http://itsfoss.com/emiliaromagna-completes-switch-openoffice/ [5]:http://en.wikipedia.org/wiki/Emilia-Romagna [6]:https://www.openoffice.org/ [7]:http://www.slwoods.co.uk/?p=2886 -[8]:http://itsfoss.com/french-city-toulouse-saved-1-million-euro-libreoffice/ \ No newline at end of file +[8]:http://itsfoss.com/french-city-toulouse-saved-1-million-euro-libreoffice/ From db7ad744da238d1accc2b70727055f516e2e460e Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 10 Mar 2015 22:01:16 +0800 Subject: [PATCH 0236/2517] PUB:20141205 How to configure a syslog server with rsyslog on Linux @theo-l --- ...e a syslog server with rsyslog on Linux.md | 60 ++++++++----------- 1 file changed, 26 insertions(+), 34 deletions(-) rename {translated/tech => published}/20141205 How to configure a syslog server with rsyslog on Linux.md (62%) diff --git a/translated/tech/20141205 How to configure a syslog server with rsyslog on Linux.md b/published/20141205 How to configure a syslog server with rsyslog on Linux.md similarity index 62% rename from translated/tech/20141205 How to configure a syslog server with rsyslog on Linux.md rename to published/20141205 How to configure a syslog server with rsyslog on Linux.md index 21d6e8993b..49dd3eb4d4 100644 --- a/translated/tech/20141205 How to configure a syslog server with rsyslog on Linux.md +++ b/published/20141205 How to configure a syslog server with rsyslog on Linux.md @@ -1,9 +1,8 @@ -如何在linux上通过rsyslog来配置一个syslog服务器 +在 Linux 上配置一个 syslog 服务器 ======================================================================== -syslog服务器表示一个用来监控一个网络中的端点--所有能够通过网络来发送日志的设施(包含了Linux或Windows服务器,路由器,交换机以及其他主机)--的中央日志。 通过设置一个syslog服务器,可以将不同设施/主机发送的日志,过滤和合并到一个独立的位置,这样使得你更容易地查看和获取重要的日志消息。 - -**rsyslog** 被作为标准的syslog守护进程预装在了大多数的Linux发行版中。在客户端/服务器架构的配置下,**rsyslog**同时扮演了两种角色:1.作为一个syslog服务器,**rsyslog**可以收集来自其他设施的日志信息;2.作为一个syslog客户端,**rsyslog**可以将其内部的日志信息传输到远程的syslog服务器。 +syslog服务器可以用作一个网络中的日志监控中心,所有能够通过网络来发送日志的设施(包含了Linux或Windows服务器,路由器,交换机以及其他主机)都可以把日志发送给它。 通过设置一个syslog服务器,可以将不同设施/主机发送的日志,过滤和合并到一个独立的位置,这样使得你更容易地查看和获取重要的日志消息。 +**rsyslog** 作为标准的syslog守护进程,预装在了大多数的Linux发行版中。在客户端/服务器架构的配置下,**rsyslog**同时扮演了两种角色:1.作为一个syslog服务器,**rsyslog**可以收集来自其他设施的日志信息;2.作为一个syslog客户端,**rsyslog**可以将其内部的日志信息传输到远程的syslog服务器。 在此,我们演示了在linux上如何通过**rsyslog**来配置一个中心化syslog服务器。 在进入详解之前,先温习一下syslog标准。 @@ -12,12 +11,11 @@ syslog服务器表示一个用来监控一个网络中的端点--所有能够通 当通过syslog机制来收集日志时,有3个必须要考虑到的重要事情: - **设施层级**: 监听何种类型的进程 -- **严重性 (优先) 级别**: 收集何种类型的日志消息 +- **严重性 (优先) 级别**: 收集何种级别的日志消息 - **目标**: 发送或记录日志消息到何处 现在我们更加深入地了解一下配置是如何定义的。 - 设施层级定义了一种用来对内部系统进程进行分类的方法,linux中的一些常见的设施包括: - **auth**: 身份验证相关的消息(登录时) @@ -29,7 +27,7 @@ syslog服务器表示一个用来监控一个网络中的端点--所有能够通 - **lpr**: 打印服务相关的消息 - **local0 - local7**: 用户自定义的消息 (local7 通常被Cisco 和 Windows 服务器 使用) -严重性(优先)级别是通过标准的缩写和赋予的数字来进行定义和标准化的,其中的数字7具有最高的级别,这些级别包含了: +严重性(优先)级别有固定的标准缩写和指代的值,其中的数字7具有最高的级别,这些级别包含了: - emerg: Emergency(紧急)- 0 - alert: Alerts (报警)- 1 @@ -40,79 +38,75 @@ syslog服务器表示一个用来监控一个网络中的端点--所有能够通 - info: Information (消息)- 6 - debug: Debugging (调试)- 7 -最后,目标语句迫使一个syslog客户端来执行以下3个任务中的一个:1.保存日志消息到一个本地文件;2. 通过TCP/UDP将消息路由到远程的syslog服务器中 -;3.将其发送到一个标准输出中,例如控制台。 +最后,目标语句会让一个syslog客户端来执行以下三个任务之一: -在rsyslog, syslog配置是基于以下模式进行结构化的。 +1. 保存日志消息到一个本地文件; +2. 通过TCP/UDP将消息路由到远程的syslog服务器中; +3. 将其发送到一个标准输出中,例如控制台。 + +在 rsyslog里, syslog的配置是基于以下模式进行结构化的。 [facility-level].[severity-level] [destination] -### Configure Rsyslog on Linux ### ### 在Linux中配置Rsyslog### -在我们理解syslog之后,现在是时候来通过rsyslog来将一个Linux服务器配置为一个中心syslog服务器了,另外我们也将看到如何将基于Windows的系统配置为一个syslog客户端来发送内部日志到该syslog服务器中。 +在我们理解syslog之后,现在可以通过rsyslog来将一个Linux服务器配置为一个中心syslog服务器了,另外我们也将看到如何在一个Windows的系统上配置一个syslog客户端来发送内部日志到该syslog服务器中。 ### 第1步: 初始化系统需求 ### -为了将linux主机设置为一个中央日志服务器, 我们需要创建一个隔离的/var 分区,并分配足够大的磁盘空间或者创建一个特殊的LVM卷组。这样就会使得syslog服务器能够承担在日积月累收集日志所带来的潜在增长。 - +要将linux主机设置为一个中央日志服务器, 我们需要创建一个分离的 /var 分区,并分配足够大的磁盘空间或者创建一个特殊的LVM卷组。这样就会使得syslog服务器能够承担在日积月累收集日志所带来的潜在增长。 ### 第2步: 让rsyslog 后台进程生效 ### rsyslog守护进程来自于当前的linux发布版本的预装模块,但是默认并没有启动。为了能够让rsyslog守护进程能够接受外部的消息,需要编辑其配置文件/etc/rsyslog.conf. -如果已经准备好打开文件进行编辑,查找到下面的两行所在的位置,通过删除其行首的#字符来取消其注释。 +打开文件进行编辑,查找到下面的两行所在的位置,通过删除其行首的#字符来取消注释。 $ModLoad imudp $UDPServerRun 514 -这会使得rsysolog守护进程能够在UDP端口514上接受日志消息了---UDP是一种比TCP速度快,但是并不具有TCP一样的数据流程的可靠性。所以如果你需要使用可靠的传送机制,就可以通过取消以下行的注释。 +这会使得rsysolog守护进程能够在UDP端口514上接受日志消息了---UDP是一种比TCP速度快,但是并不具有TCP一样的数据流的可靠性。所以如果你需要使用可靠的传送机制,就可以通过取消以下行的注释。 $ModLoad imtcp $InputTCPServerRun 514 需要注意的是,TCP和UDP可以被同时生效来监听TCP/UDP 连接。 -### 第3步:创建日志接受模板### +### 第3步:创建日志接收模板### 接下来的这步,需要我们来为远程消息创建模板,并告知rsyslog守护进程如何记录从其他客户端机器所接受到的消息。 - 使用文本编辑器来打开 /etc/rsyslog.conf,然后在GLOBAL DIRECTIVE块前追加以下的模板。 $template RemoteLogs,"/var/log/%HOSTNAME%/%PROGRAMNAME%.log" * *.* ?RemoteLogs & ~ -在此对该模板进行简单解释,$template RemoteLogs(“RemoteLogs” 字符串可以为任何其他的指令名称)指令强制rsyslog后台进程将日志消息写道/var/log下的分开的本地日志文件中,其中日志文件的名称是基于远程日志发送机器的主机名以及生成该日志的应用程序名进行定义的。其中第二行暗示了我们将RemoteLogs模板应用到所有接受到的日志上。 - - -符号"& ~"表示了一个重定向规则,被用来告知rsyslog守护进程停止对日志消息的进一步处理,并且不要在本地写入。如果该重定向规则没有使用,那么所有的远程消息都会在写入上述描述的日志文件之外同时被写入到本地日志文件,这就意味着日志消息实际上被写了两次。使用该规则的另外一个结果就是syslog服务器本身的日志消息只会被以该机器主机名命名的专有文件中。 +在此对该模板进行简单解释,$template RemoteLogs(这里“RemoteLogs” 字符串可以为任何其他的描述性的名称)指令使rsyslog后台进程将日志消息写到/var/log下的单独的本地日志文件中,其中日志文件的名称是基于远程日志发送机器的主机名以及生成该日志的应用程序名进行定义的。其中第二行暗示了我们将RemoteLogs模板应用到所有接收到的日志上。 +符号"& ~"表示了一个重定向规则,被用来告知rsyslog守护进程停止对日志消息的进一步处理,并且不要在本地写入。如果没有使用该重定向规则,那么所有的远程消息都会在写入上述描述的日志文件之外同时被写入到本地日志文件,这就意味着日志消息实际上被写了两次。使用该规则的另外一个结果就是syslog服务器本身的日志消息只会被以该机器主机名命名的专有文件中。 如果你想要的话,也可以使用下面的模式对特定的设备或严重性级别使用新的模板直接来记录日志消息。 - [facility-level].[severity-level] ?RemoteLogs 例如: -将所有内部的所有优先级别的用户验证消息指定为RemoteLogs模板: +将全部优先级别的所有内部用户验证消息指定为RemoteLogs模板: authpriv.* ?RemoteLogs -将所有系统进程中除开mail,用户验证和cron消息之外的进程产生的消息级别的日志指定为RemoteLogs模板: - +将所有系统进程中除开mail、用户验证和cron消息之外的进程产生的消息级别的日志指定为RemoteLogs模板: *.info,mail.none,authpriv.none,cron.none ?RemoteLogs -如果我们想要将所有从远程客户端接受到的消息写入到一个以它们的IP地址命名的单个文件中,可以使用以下的模板。在此我们为该模板赋予了“IPTemplate”名称。 +如果我们想要将所有从远程客户端接受到的消息写入到一个以它们的IP地址命名的单个文件中,可以使用以下的模板。在此我们为该模板赋予了“IpTemplate”名称。 $template IpTemplate,"/var/log/%FROMHOST-IP%.log" *.* ?IpTemplate & ~ -在我们生效rsyslog守护进程以及编辑其配置文件之后,需要重启该守护进程。 +在我们启用rsyslog守护进程并编辑好配置文件之后,需要重启该守护进程。 在 Debian,Ubuntu 或 CentOS/RHEL 6中: @@ -138,19 +132,17 @@ rsyslog守护进程来自于当前的linux发布版本的预装模块,但是 ### 发送Windows日志到一个远程的rsyslog服务器### -为了将一个Windows客户端的日志消息转发到我们的rsyslog服务器,需要一个Windows syslog 代理。当然,有许多的syslog代理可以在windows上运行,在此我们可以使用一个自由软件程序 [Datagram SyslogAgent][1]. - - +要将一个Windows客户端的日志消息转发到我们的rsyslog服务器,需要一个安装 Windows syslog 代理。当然,有许多的syslog代理可以在windows上运行,在此我们可以使用一个自由软件程序 [Datagram SyslogAgent][1]. 在下载安装该syslog代理后,需要将其配置为作为服务运行。指定使用何种协议来发送数据,以及远程rsyslog服务器的IP地址和端口,最后指定应该传输的事件日志类型,如下所示。 ![](https://farm8.staticflickr.com/7509/15305930594_27b7f4440a_o.jpg) -在我们完成所有的这些配置之后,我们就可以启动该服务并且在中央rsyslog服务器中使用命令行工具tailf来查看日志文件了。 +在我们完成所有的这些配置之后,我们就可以启动该服务并且在中央rsyslog服务器中使用命令行工具tail -f来查看日志文件了。 ### 总结### -通过创建一个可以收集本地和远程主机的中央rsyslog服务器,我们可以更好地了解在这些系统内部究竟发生着什么,而且可以更加容易地调试他们的问题,是否在他们之间有任何缓慢或崩溃存在。 +通过创建一个可以收集本地和远程主机的中央rsyslog服务器,我们可以更好地了解在这些系统内部究竟发生着什么,而且可以更加容易地调试它们的问题,是否在它们之间有任何延迟或崩溃存在。 -------------------------------------------------------------------------------- @@ -158,7 +150,7 @@ via: http://xmodulo.com/configure-syslog-server-linux.html 作者:[Caezsar M][a] 译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3728dec73d311a88900153588163f14faf4d451a Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 10 Mar 2015 22:40:01 +0800 Subject: [PATCH 0237/2517] Update 20141204 Intense Gameplay--Try these 13 Roguelike games.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...20141204 Intense Gameplay--Try these 13 Roguelike games.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md b/sources/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md index 14ce0991d0..199474e714 100644 --- a/sources/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md +++ b/sources/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md @@ -1,3 +1,5 @@ +FSSlc translating + Intense Gameplay? Try these 13 Roguelike games ================================================================================ Roguelike is a sub-genre of role-playing games. It literally means "a game like Rogue". Rogue is a dungeon crawling video game first released in 1980, standing out for being fiendishly addictive. Its goal was to retrieve the Amulet of Yendor, hidden deep in the 26th level, and ascend back to the top. @@ -401,4 +403,4 @@ via: http://www.linuxlinks.com/article/201412031524381/RoguelikeGames.html [11]:http://rephial.org/ [12]:http://sourceforge.net/apps/trac/unnethack/ [13]:http://www.roguetemple.com/z/hydra/ -[14]:https://sites.google.com/site/broguegame/ \ No newline at end of file +[14]:https://sites.google.com/site/broguegame/ From 0b7e8770c27b9b7d4fd314fb3347fb22c98f69c0 Mon Sep 17 00:00:00 2001 From: Wi Date: Tue, 10 Mar 2015 22:50:13 +0800 Subject: [PATCH 0238/2517] Delete 20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md --- ...ilia-Romagna Is Switching To OpenOffice.md | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md diff --git a/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md b/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md deleted file mode 100644 index 91ac747dbe..0000000000 --- a/sources/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md +++ /dev/null @@ -1,41 +0,0 @@ -Translating by 355968851 -Italian Region Emilia-Romagna Is Switching To OpenOffice -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Turin_Open_Source.jpg) - -Italy seems to be winning the race to Open Source adoption, it seems. We have learned about how various Italian cities like [Udine][1], [Turin][2], [Todi and Turni][3] opted for [open source alternatives of Microsoft office][4] in the past. Now the news comes that [Emilia-Romagna][5] region in northern Italy is about to complete its switch to [Apache OpenOffice][6] next month. - -### Switching to OpenOffice ### - -The migration to OpenOffice will be complete by next month and will cover 4200 workstations, across 10 departments and 5 agencies. In addition, Open Document Format (ODF) will be the default document format. The initiative to switch to OpenOffice was approved in late 2013 and was originally planned to be completed by end of 2014. The move to OpenOffice from proprietary office product is believed to [save around 2 million euro][8] in licensing fee. - -To ease this migration and improve interoperability, several custom tools and plugins are also being developed by the team in charge of the migration. - -Head of the project, Giovanni Grazia is enthusiastic about the migration but he is prepared for the brickbats as well. - -> “Changing office suite is hard work, and we use the occasion to advocate for free and open source software. Some of the region’s civil servants are keen to switch, and some are very annoyed, as they have been using the proprietary alternative for 20 years. To deal with any issues during the transition, a team of five support staffers is backed up by three IT specialists. Department by department, one at a time, we’re completing the switch. Step by step, change is coming.” - -#### Best wishes #### - -I wish good luck to Grazia and hope that other administrative regions in Italy will follow the suit. I also hope that neighboring countries like [France will also speed up the open source adoption process][8]. - - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/emiliaromagna-completes-switch-openoffice/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/udine-open-source/ -[2]:http://itsfoss.com/italian-city-turin-open-source/ -[3]:http://itsfoss.com/italian-cities-switch-libreoffice/ -[4]:http://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ -[5]:http://en.wikipedia.org/wiki/Emilia-Romagna -[6]:https://www.openoffice.org/ -[7]:http://www.slwoods.co.uk/?p=2886 -[8]:http://itsfoss.com/french-city-toulouse-saved-1-million-euro-libreoffice/ From c57385523e181e1869b1f6e6ae08388b3c740bbf Mon Sep 17 00:00:00 2001 From: Wi Date: Tue, 10 Mar 2015 22:53:37 +0800 Subject: [PATCH 0239/2517] Create 20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md Translated by wi --- ...ilia-Romagna Is Switching To OpenOffice.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 translated/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md diff --git a/translated/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md b/translated/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md new file mode 100644 index 0000000000..0dfbfce001 --- /dev/null +++ b/translated/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md @@ -0,0 +1,38 @@ +意大利Emilia-Romagna区正在切换到OpenOffice +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Turin_Open_Source.jpg) + +在拥抱开源的道路上,意大利似乎走在了最前面.我们已经知道,很多意大利的城市如Udine,Turin,Todi和Turin过去已经选择了开源办公套件以取代微软的Office.现在,位于意大利北部的Emilia-Romagna区也将在下个月完成向Apache OpenOffice的过渡. + +### Switching to OpenOffice ### + +这次向OpenOffice的转变将会在下个月完成,而且将会覆盖4200个工作站,涉及到10个部门和5个代理部门. 而且,开源文档格式(ODF)也将成为默认的文档格式.向OpenOffice的过渡最初在2013年底被提出来,原本打算在2014年底完成.这次改用OpenOffice从专用办公产品认证费用来说,相信会节约大概2 000 000欧元. + +为了使这次搬家顺利,提高内部可操作性,许多定制工具和插件也正在被负责这次搬家的团队开发出来. + +本次项目的负责人,Giovanni Grazia对本次"搬家"充满激情,但同时他也会做好应对批评 +> "改用新的办公套件不是容易完成的工作,我们借这次机会来拥护免费和开源的软件.一些地区的公务员表示深深的支持,而令一些则感到厌烦, 因为他们已经使用专业产品二十年了.为了处理任何在转变中发生的问题,一个有五个支持人员的团队已经得到了三个IT专家的支持.一个部门接一个部门,逐渐地,我们将完成这次过渡.一步步的,改变正在发生." + +#### Best wishes #### + +我希望祝Grazia好运,其他的意大利辖区也会使用OpenOffice套件.也希望像法国这样的邻国也会加速拥抱开源的进程. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/emiliaromagna-completes-switch-openoffice/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/udine-open-source/ +[2]:http://itsfoss.com/italian-city-turin-open-source/ +[3]:http://itsfoss.com/italian-cities-switch-libreoffice/ +[4]:http://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[5]:http://en.wikipedia.org/wiki/Emilia-Romagna +[6]:https://www.openoffice.org/ +[7]:http://www.slwoods.co.uk/?p=2886 +[8]:http://itsfoss.com/french-city-toulouse-saved-1-million-euro-libreoffice/ From 3fdbf2dce8428147cc06898c2d30c20b54fdd8dc Mon Sep 17 00:00:00 2001 From: martin qi Date: Tue, 10 Mar 2015 23:31:24 +0800 Subject: [PATCH 0240/2517] Update 20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md translating by martin. --- ... Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md b/sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md index cf356462da..f0915baf40 100644 --- a/sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md +++ b/sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md @@ -1,3 +1,5 @@ +translating by martin. + [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip] ================================================================================ ### Problem: ### @@ -25,4 +27,4 @@ via: http://itsfoss.com/keyboard-mouse-freeze-suspend/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/how-to-fix-no-unity-no-launcher-no-dash-in-ubuntu-12-10-quick-tip/ \ No newline at end of file +[1]:http://itsfoss.com/how-to-fix-no-unity-no-launcher-no-dash-in-ubuntu-12-10-quick-tip/ From 58b2fa30ca680425bf09b2d94303c8e4019db04e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 11 Mar 2015 00:44:29 +0800 Subject: [PATCH 0241/2517] PUB:20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc 翻译的不错,部分语句我做了修改。 --- ...s To Supercharge Your Ubuntu Experience.md | 158 ++++++++++++++++++ ...s To Supercharge Your Ubuntu Experience.md | 155 ----------------- 2 files changed, 158 insertions(+), 155 deletions(-) create mode 100644 published/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md delete mode 100644 translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md diff --git a/published/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md b/published/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md new file mode 100644 index 0000000000..d18644094c --- /dev/null +++ b/published/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md @@ -0,0 +1,158 @@ +让你玩转 Ubuntu 桌面的十一件武器 +================================================================================ +**无论你是一个相对的新手还是经验丰富的专家,我们都想从我们的操作系统中得到更多的东西。正如大多数现代的操作系统,相比于乍一看呈现出的内容,Ubuntu 还有更多东西可以向我们提供。** + +从调整和优化 Unity 桌面的外观、行为、性能到执行系统维护,这里有大量的实用工具和应用可以帮助你**调整 Ubuntu ,随时满足你的需求**。 + +注意: Ubuntu 总是配备了‘合理的默认设置’(即工作良好的选项),以达到开箱即用,这些默认设置适合大多数人,并且它们都是经过了测试、采用及推荐等过程的。 + +但一个尺码并不适合所有人。对于我们当中的能工巧匠和实验主义者来说,默认设置只是他们定制系统的起点。 + +所以,无需更多的唠叨, 这里有 11 个极好的实用工具可以帮助你增强 Ubuntu 使用体验。 + +### Unity Tweak Tool ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/unity-tweak-tool.jpg) + +我将以这个列表中最重要的一个工具: **Unity Tweak Tool** 来开始这次的介绍。融汇了各种定制选项,Unity Tweak Tool 提供了一系列针对 Ubuntu 和 Unity 桌面的系统综合调整功能。 + +它被各种开关、切换和控制器塞得满满的,使得你可以任意设置从 Unity 桌面的外观到 Unity 的行为之类的任何东西。你可以使用它**快速简便地改变 GTK 主题和图标集**、设置热区、调整启动器图标尺寸、增加或移除工作区,以及 ---特别地---开启 Unity 桌面中被巧妙隐藏的“通过点击最小化”的功能。 + +它是免费的,可直接从 Ubuntu 软件中心里找到, Unity Tweak Tool 是非常值得保留在你的口袋里的工具之一。 + +### Unity 隐私指示器 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/indicator-privacy-in-ubuntu.jpg) + +隐私是一个非常、非常重要的事,事实也恰恰如此,但这个话题要比二进制还难以说明白。让一些数据或习惯,比如说你经常打开的应用,在本地被记录下来,这或许会让你感到高兴,但对于你在 Dash 中的搜索数据被发送到第三方服务机构(尽管这些数据或许是匿名的)这类事情,你就高兴不起来了。 + +[隐私指示器][1] 是一个帮助你时刻跟踪 Ubuntu桌面系统中有哪些文件、目录和服务正被获取、记录及搜索的实用工具。 + +通过快速的点击被添加到桌面面板上的‘眼睛’图标,你可以: + +- 开启或关闭在线搜索结果,使用 Zeitgeist 记录系统活动,存储 HUD 使用记录和启用 Ubuntu GeoIP 服务 +- 快速清理 Zeitgeist 日志、 ALT-F2 历史、最近访问文件等等的记录数据 +- 展示或隐藏桌面图标及面板上显示的用户名 + +上述的最后一条的功能似乎不应该出现在这个应用程序中,但对于那些要分享截图或截屏的人来说,这将会泄露更少的隐私。 + +- [从这里下载隐私指示器 (.deb)][2] + +### Unity 橱窗 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/unity-folders.jpg) + +**Android, iOS, OS X, Chrome OS, 和 GNOME Shell 都有应用橱窗, 借助一个极好的第三方应用,Unity 也可以实现类似功能。** + +“Unity 橱窗” 允许你将 Unity 启动器中的应用分组到实用的橱窗中,--- 如游戏,办公,社交等。不必打开 Dash,你就可以快速启动你喜爱的应用,这非常适合你的工作流。 + +每一个 ‘橱窗’其实上是一个打开在图标附近的应用窗口,但总体效果看上去就像是一个 OS X 风格的“堆栈”或 Android 的分组框。 + +橱窗的图标可以自定义或根据橱窗内的应用来自动生成。已有的橱窗可以修改和重新组织、重命名以及如下的更多选择: + +- 根据你的喜好创建任意多的橱窗 +- 选择自定义或自动生成橱窗图标 +- 可选择 3 种橱窗样式 +- 为添加到橱窗中的应用设定自定义图标 +- 编辑现有橱窗 + +[Unity 橱窗的网址](http://unity-folders.exceptionfound.com/) + +### 咖啡因(Caffeine) ### + +对于我们中的许多人来说,咖啡因是必需品,而不仅仅是饮料。而这里的“咖啡因”则提供了一个快速,温和的方式来避免屏保/锁屏占据屏幕。它的有用程度将取决于你的环境(即你系统的怪癖),并且尽管它不像以前那样好用,它仍然值得你[尝试一下][3]。 + +[下载咖啡因(Caffeine) ](https://launchpad.net/~caffeine-developers/+archive/ppa/+files/caffeine_2.7_all.deb) + +### 系统监控指示器 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/multiload-indicator-in-ubuntu.jpg) + +假如你是一个状态迷,即一个喜欢密切关注程序,进程和硬件的状态的人, Linux 很容易满足你的需求。从 Conky 的配置到终端命令,并不缺少监视你的 CPU 使用情况、网络流量或 GPU 温度的方法。 + +但至今为止,我最喜爱的应用是**系统监控指示器**(也被叫做多负载指示器),它可从 Ubuntu 软件中心获得。它也有着大量的配置选项。 + +- [点击这个链接,在 Ubuntu 中下载 ‘系统监控指示器’][4] + +### 针对 Linux 笔记本电脑的省电工具 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2012/08/front.jpg) + +#### TLP #### + +当提到便携式设备上的电池使用效率时,Linux 发行版的声誉并不算好。 + +如果你的 Linux 笔记本在重新充电前,电池只够让你从沙发走到厨房的话,那么这里有几个你可以试试的工具。 + +TLP 是最受欢迎的确保延长 Linux 笔记本的电池寿命的自动化后台工具之一,它是通过调整系统进程和硬件的设置及行为来达成省电的,例如 启动 Wi-Fi 省电模式, PCI 总线设备的实时电量管理和处理器的降频调整。 + +在 Ubuntu 14.04 LTS 以及后续发行版本中可以[使用 TLP 专用的 PPA 来安装它][11],通过它的‘一下搞定’的设置就能用起来。在我们之中的高级用户可以潜心研究并根据你自己的硬件来调整设置,一个[关于 TLP 的完整指导 wiki][6] 使得设置更加容易。 + +#### Laptop Mode Tools #### + +假如 TLP 听起来有一点复杂,这也并没有什么可羞耻的,这里有一个更简单的替代品: **Laptop Mode Tools**。 这个软件包可从 Ubuntu 软件中心直接安装,且本身设置好了一系列合理的默认设置(Wi-Fi,蓝牙等等)。 + +切记,Laptop Mode Tools 不能和 TLP 同时被安装在电脑中。 + +- [Ubuntu 软件中心里的 Laptop Mode Tools ][7] + +### Intel 显卡驱动安装工具 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/intelgraphicsdriverinstaller.png) + +对于那些运行 Intel 显卡硬件,并想使得这些硬件发挥出最佳性能的人来说,Intel 显卡安装工具是必须拥有的。 它使得查找并安装最新的 Intel GPU 驱动变得不再是一件痛苦和大费周折的事,因为这无需 PPA 或任何的终端使用知识。 + +- [下载针对 Linux平台的 Intel 显卡驱动安装器 0.7 版本][8] + +### 硬件信息 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/Screen-Shot-2014-02-10-at-21.05.37.png) + +假如你计划升级你的 PC 或想替换一个坏掉的零部件,你需要知道一些特定的硬件信息,例如 RAM 类型,CPU插座类型 或查看哪个 PCI 槽是可用的等信息。 + +**I-Nex**可以使得找出这些以及其他的系统具体配置变得更加容易。使用它来查找你的主板型号、S.M.A.R.T.(注:为 Self-Monitoring, Analysis and Reporting Technology 的缩写,经常写为 SMART ) 状态,以及你想的出的很多东西! + +- [可从 Launchpad 了解到更多关于 I-Nex 的信息][9] + +### 磁盘空间可视化程序 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/disk-usage-visualizer-for-ubuntu.jpg) + +在这个硬盘以 TB 计数的时代,我们或许不必同以前一样对硬盘空间的使用三思而后行。但对于那些使用小容量的 SSD,分成多个分区或在一个拥有固定大小的虚拟磁盘的虚拟机上工作的人来说,总有“应该释放一些额外空间是必要的”这种想法的时候。 + +GNOME Disks,在 Ubuntu 中被默认安装,使得查找占用最大磁盘空间的罪魁祸首变得容易。对于定位隐藏的日志、缓存和视频文件,它是非常完美的工具。 + +### BleachBit (Cruft Cleaner) ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/bleachbit.jpg) + +Windows 用户可能对像 CCleaner 之类的应用很熟悉,它可以扫描并清理垃圾文件、空白文件夹、臃肿的缓存以及陈旧的软件包。在 Ubuntu 上,一个相似的快速且毫不费力的一键式清理方法可以试试 **BleachBit** 。 + +它是一个强大的工具,所以一定要注意你正在清理什么。不要漫无目的地确认每个选项框;不是所有的东西它都可以清理。所以请合理地使用它,当你对某个选项有疑问时,就跳过它。 + +- [从 Ubuntu 软件中心里安装 BleachBit][10] + +你已经有了自己最喜欢的系统实用工具了吗?可以在下面的评论中让其他人知晓它。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2014/11/useful-tools-for-ubuntu-do-you-use-them + +作者:[Joey-Elijah Sneddon][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.florian-diesch.de/software/indicator-privacy/index.html +[2]:http://www.florian-diesch.de/software/indicator-privacy/dist/indicator-privacy_0.04-1_all.deb +[3]:http://www.omgubuntu.co.uk/2014/05/stop-ubuntu-sleeping-caffeine +[4]:apt://indicator-mulitload +[5]:https://launchpad.net/~linrunner/+archive/ubuntu/tlp/+packages +[6]:http://linrunner.de/en/tlp/docs/tlp-configuration.html +[7]:https://apps.ubuntu.com/cat/applications/laptop-mode-tools/ +[8]:https://01.org/linuxgraphics/downloads/2014/intelr-graphics-installer-linux-1.0.7 +[9]:https://launchpad.net/i-nex +[10]:https://apps.ubuntu.com/cat/applications/bleachbit/ +[11]:https://launchpad.net/~linrunner/+archive/ubuntu/tlp/+packages diff --git a/translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md b/translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md deleted file mode 100644 index 5b60043bcd..0000000000 --- a/translated/share/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md +++ /dev/null @@ -1,155 +0,0 @@ -11 个 增强你的 Ubuntu 使用体验的实用工具 -================================================================================ -**无论你是一个相对的新手还是经验丰富的专家,我们都想从我们的操作系统中得到更多的东西。正如大多数现代的操作系统,相比于乍一看呈现出的内容,Ubuntu 有更多东西可以向我们提供。** - -从调整和优化 Unity 桌面的外观、行为、性能 到 执行系统维护,有着大量的实用工具和应用可以帮助你 **调整 Ubuntu 来无时不刻地满足你的需求**。 - -注意时刻: Ubuntu 一直都配备了‘合理的默认设置---即工作良好的选项---’,以达到开箱即用,这些默认设置适合大多数人,并且它们都是经过了测试,采用及推荐等过程的。 - -但一个尺寸并不适合所有。对于我们当中的能工巧匠和实验主义者来说,默认设置只是他们定制系统的起点。 - -所以,无需更多的唠叨, 这里有 11 个极好的实用工具来帮助你增强你的 Ubuntu 使用体验。 - -### Unity Tweak Tool ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/unity-tweak-tool.jpg) - -我将以这个列表中最重要的一个工具: **Unity Tweak Tool** 来开始这次的介绍。定制的厨房水槽(注:不知该如何翻译,感觉意思是:水槽之于厨房的重要性相当于该软件之于定制 Ubuntu 的重要性), Unity Tweak Tool 提供了一系列针对 Ubuntu 和 Unity 桌面的系统综合调整功能。 - -它被各种开关,切换和控制塞得满满的,使得你可以任意设置从 Unity 桌面的外观到 Unity 的行为之类的任何东西。你可以使用它 **快速简便地改变 GTK 主题和图标集**、设置热区、调整启动器图标尺寸、增加或移除工作区,以及 ---特别地---开启 Unity 桌面中被巧妙隐藏的“通过点击最小化”的特点。 - -免费并可直接从 Ubuntu 软件中心里找到, Unity Tweak Tool 是非常值得保留在你的口袋里的工具之一。 - -### Unity Privacy Indicator ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/indicator-privacy-in-ubuntu.jpg) - -隐私是一个非常,非常重要的事,事实也恰恰如此。但这个话题总是被隐藏在二进制之下(注:感觉这里翻译有误,不太确定)。让一些数据或习惯,比如说你经常打开的应用,在本地被记录下来,这或许会让你感到高兴,但对于 你在 Dash 中的搜索数据被发送带第三方服务机构(尽管这些数据或许是匿名的)这类事情,你就高兴不起来了。 - -[Privacy Indicator][1] 是一个帮助你时刻跟踪 Ubuntu桌面系统中哪些文件、目录和服务正被获取、记录及搜索的实用工具。 - -通过快速的点击被添加到桌面面板上的‘眼睛’图标,你可以: - -- 开启或关闭在线搜索结果,Zeitgeist(注:根据图片看,Zeitgeist 指的是 record activity), HUD 记录 和 GeoIP 服务 -- 快速的启用 清理 Zeitgeist,F2(注:根据图片看,F2 指的是 通过 Alt-F2 执行的命令),当前文件等等的记录数据 -- 展示或隐藏桌面图标以及它们在桌面面板上的名称 - -上面的最后两个选项在这个应用中似乎有点被放错了位置,但对于那些要分享截图或截屏的人来说,将会泄露更少的隐私。 - -- [从这里下载 Indicator Privacy (.deb)][2] - -### Unity Folders ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/unity-folders.jpg) - -**Android, iOS, OS X, Chrome OS, 和 GNOME Shell 都有应用橱窗, 借助一个极好的第三方应用,Unity 也可以实现类似功能。** - -“Unity Folders” 允许你组织位于 Unity 启动器中的应用到实用的橱窗中,--- 如 游戏,办公,社交等。不必打开 Dash,你就可以快速启动你喜爱的应用,这非常适合你的工作流。 - -每一个 ‘橱窗’其实一个打开 ,但总体效果看上去就像是一个 OS X 的风格栈 或 Android 的切换框(注:这里的翻译我拿不准)。 - -橱窗的图标可以自定义或根据橱窗内的应用来自动生成。已经存在的橱窗可以被编辑,重新组织,重命名以及如下的更多选择: - -- 根据你的喜好创建任意多的橱窗 -- 选择自定义或自动生成橱窗图标 -- 可选择 3 种橱窗样式 -- 为添加到橱窗中的应用设定自定义图标 -- 编辑现有橱窗 - -[Unity Folders 的网址](http://unity-folders.exceptionfound.com/) -(注:根据原文来看,这里应该有链接,转换为 md 文档时没有加上链接) - -### 咖啡因 ### - -对于我们中的许多人来说,咖啡因是主食,它并不只存在于饮料之中。咖啡因提供了一个快速,温和的方式来阻止你的屏保或锁屏起作用。有用的程度将取决于你的环境(即你系统的怪癖) (注:这一句我没有完全理解原文的意思),并且尽管它不像以前那样对用户友好,它仍然值得你[尝试一下][3]。 - -### 系统状态指示器 (System Monitor Indicator) ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/multiload-indicator-in-ubuntu.jpg) - -假如你是一个状态迷,即一个喜欢密切关注程序,进程和硬件的状态的人, Linux 很容易满足你的需求。从 Conky 的配置到终端命令,并不缺少监视你的 CPU 使用情况、网络流量或 GPU 温度的方法。 - -但至今为止,我最喜爱的应用是 系统**监视指示器**,---也被叫做多负载指示器---它可从 Ubuntu 软件中心获得。它也有着大量的配置选项。 - -- [点击这个链接,在 Ubuntu 中 下载 ‘System Load Indicator’][4] - -### 针对 Linux 笔记本电脑的省电工具 ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2012/08/front.jpg) - -**TLP** - -当提到便携式设备上的电池使用效率时,Linux 发行版本并没有最好的声誉。 - -如果你自己的 Linux 笔记本可以勉强在再次充电之前,让你从沙发到厨房,那么这里有几个你可以试试的工具。 - -TLP 是最受欢迎的确保延长 Linux 笔记本的电池寿命的自动化后台工具之一,它是通过调整系统进程和硬件的设置及行为来达到此目的的,例如 启动 Wi-Fi 省电模式, PCI 总线设备的实时电量管理和处理器的频率缩放调整。 - -在 Ubuntu 14.04 LTS 以及后续发行版本中可以使用 TLP 专用的 PPA 来安装它。且它只带了‘包罗万象’的设置来使你踏上配置它的旅程。 在我们之中的高级用户可以潜心研究并根据你自己的硬件来调整设置,一个 [关于 TLP 的完整指导 wiki][6] 使得设置更加容易。 - -**Laptop Mode Tools** - -假如 TLP 听起来有一点复杂 --这也并没有什么可羞耻的--这里有一个更简单的替代品: **Laptop Mode Tools**。 这个软件包可从 Ubuntu 软件中心直接安装,且本身设置好了一系列合理的默认设置(Wi-Fi,蓝牙等等)。 - -Laptop Mode Tools 不能和 TLP 同时被安装在电脑中。 - -- [Ubuntu 软件中心里的 Laptop Mode Tools ][7] - -### Intel 显卡驱动安装工具 ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/intelgraphicsdriverinstaller.png) - -对于那些运行 Intel 显卡硬件,并想使得这些硬件发挥出最佳性能的人来说,Intel 显卡安装工具是必须拥有的。 它使得 查找并安装最新的 Intel GPU 驱动变得不再是一件痛苦和大费周折的事 ---因为这无需 PPA 或任何的终端使用知识。 - -- [下载针对 Linux平台的 Intel 图形安装器 0.7 版本][8] - -### Hardware Stats ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/Screen-Shot-2014-02-10-at-21.05.37.png) - -假如你计划 升级你的 PC 或替换一个坏掉的零部件,你需要知道一些特定的硬件信息,例如 RAM 类型,CPU插座类型 或 查看那个PCI 槽是可用的等信息。 - -**I-Nex**可以使得 发掘出以上的信息以及其他的系统具体状态变得更加容易。使用它来查找你的主板型号、S.M.A.R.T.(注:为 Self-Monitoring, Analysis and Reporting Technology 的缩写,经常写为 SMART ) 状态,以及你想得出的很多东西! - -- [可从 Launchpad 了解到更多关于 I-Nex 的信息][9] - -### 磁盘空间可视化程序(Disk Space Visualizer) ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/disk-usage-visualizer-for-ubuntu.jpg) - -在这个硬盘以 1TB 计数的时代,我们或许不必同以前一样对硬盘空间的使用三思而后行。但对于那些使用小容量的 SSD,运行多个分区或在一个拥有固定虚拟磁盘大小的虚拟机上工作,总有感觉 释放一些额外空间是必要的 这种想法的时候。 - -GNOME Disks,在 Ubuntu 中被默认安装,使得查找占用最大磁盘空间的罪魁祸首变得容易。对于定位隐藏的日志、缓存和视频文件,它是非常完美的工具。 - -### BleachBit (Cruft Cleaner) ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/bleachbit.jpg) - -Windows 用户可能对像 CCleaner 之类的应用很熟悉,它可以扫描并清理垃圾文件、空白文件夹、臃肿的缓存以及陈旧的软件包。在 Ubuntu 上,一个相似的快速且毫不费力的一键式清理方法可以试试 **BleachBit** 。 - -它是一个强大的工具,所以一定要注意你正在清理什么。不要漫无目的地确认每个选项框;不是所有的东西它都可以清理。所以请合理地使用它,当你对某个选项有疑问时,就跳过它。 - -- [Install BleachBit from Ubuntu Software Center][10] - -你已经有了自己最喜欢的系统实用工具了吗?可以在下面的评论中让其他人知晓它。 --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2014/11/useful-tools-for-ubuntu-do-you-use-them - -作者:[Joey-Elijah Sneddon][a] -译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.florian-diesch.de/software/indicator-privacy/index.html -[2]:http://www.florian-diesch.de/software/indicator-privacy/dist/indicator-privacy_0.04-1_all.deb -[3]:http://www.omgubuntu.co.uk/2014/05/stop-ubuntu-sleeping-caffeine -[4]:apt://indicator-mulitload -[5]:https://launchpad.net/~linrunner/+archive/ubuntu/tlp/+packages -[6]:http://linrunner.de/en/tlp/docs/tlp-configuration.html -[7]:https://apps.ubuntu.com/cat/applications/laptop-mode-tools/ -[8]:https://01.org/linuxgraphics/downloads/2014/intelr-graphics-installer-linux-1.0.7 -[9]:https://launchpad.net/i-nex -[10]:https://apps.ubuntu.com/cat/applications/bleachbit/ From 00d3f7a2cbae50748e25d935d042fc158c52b5d4 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 11 Mar 2015 12:25:34 +0800 Subject: [PATCH 0242/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Es and Code Editors for JavaScript Users.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/translated/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md b/translated/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md index c0bd5881ed..870e5b6888 100644 --- a/translated/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md +++ b/translated/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md @@ -1,21 +1,21 @@ -9款最好的Javacript用户的IDE和代码编辑器。 +9款最好的 Javacript 用户的 IDE 和代码编辑器。 ================================================================================ -网络应用设计和开发是最近一段时间的发展趋势,也有越来越多的人开始在此寻找他们的职业机会。但是,作为网络开发人员或图形设计人员来说,一个好的机会并不是每个人都能够轻易获得到的,它需要很好的思维展现,以及对于工作的熟练技巧。现在有许多可用的网站来根据你的知识帮助你找到正确的工作描述。但是如果你想要在这个领域有所成就,你仍然需要具有一些出色的手段,例如可以在不同的平台、IDE以及其他的工具上开展工作。 +网络应用设计和开发是最近一段时间的发展趋势,也有越来越多的人开始在此寻找他们的职业机会。但是,作为网络开发人员或图形设计人员来说,一个好的机会并不是每个人都能够轻易获得到的,它需要很好的思维展现,以及对于工作的熟练技巧。现在有许多可用的网站来根据你的知识帮助你找到正确的职位描述。但是如果你想要在这个领域有所成就,你仍然需要具有一些出色的技能,例如可以在不同的平台、IDE以及其他的工具上开展工作。 -说到根据不同目的所使用的大量语言用到的不同平台以及IDE,只靠学习一个IDE来容易地获取项目设计的最佳方案的惯例已经属于过去时了。今天我们活在一个竞争日益激烈的现代生活节奏中,对于IDE们也是相同的处境,IDE是一个用来创建和部署应用的强大的客户端应用。今天我们打算为网络设计者和开发人员分享一些最好的Javacript IDE。 +说到根据不同目的和不同语言所用到的不同平台以及IDE,只靠学习一个IDE来轻松获取项目设计最佳方案的惯例已经属于过去时了。今天我们活在一个竞争日益激烈的现代生活节奏中,对于IDE们也是相同的处境,IDE是一个用来创建和部署应用的强大的客户端应用。今天我们打算为网络设计者和开发人员分享一些最好的Javacript IDE。 -请访问作为javascript 用户最好的代码编辑器列表,并将你的想法与我们一起分享。 +请访问这个 javascript 用户最好的代码编辑器列表,并将你的想法与我们一起分享。 ### 1) [Spket][1] ### -**Spket IDE** 是JavaScript和XML开发的强大工具包。该编辑器可以用来进行开发 JavaScript,XUL/XBL 和Yahoo!小组件。 JavaScript编辑器提供了例如代码补全,语法高亮以及代码内容大纲等特性,可以帮助开发者提高创建高效JavaScript代码的生产率。 +**Spket IDE** 是 JavaScript 和 XML 开发的强大工具包。这个功能强大的编辑器可以用来进行开发 JavaScript,XUL/XBL 和 Yahoo!小组件。JavaScript 编辑器提供了例如代码补全、语法高亮以及代码内容大纲等特性,可以帮助开发者提高创建高效 JavaScript 代码的生产率。 ![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/spket-e1422674329554.png) ### 2) [Ixedit][2] ### -IxEdit 基于Javascript交互的网络设计工具。通过IxEdit,设计者可以在不需要通过代码改变,添加,删除或变换页面元素的情况下,在网页上进行动态进行DOM脚本编写。 +IxEdit 是一个基于 Javascript 交互的网络设计工具。通过 IxEdit,设计者可以在不需要通过代码改变,添加,删除或变换页面元素的情况下,在网页上进行动态进行 DOM 脚本编写。 ![](http://i0.wp.com/devzum.com/wp-content/uploads/2015/01/ixedit.png) @@ -26,13 +26,13 @@ Komodo是一款免费而强大的编辑器,可以用来编辑JavaScript和其 ### 4) [EpicEditor][4] ### -EpicEditor是一个可嵌入的 JavaScript Markdown编辑器,具有分割全屏进行编辑,实时预览,自动草稿保存,离线支持等特性。对于开发人员,它提供了健壮的API,可以容易地设置主题,并允许你以任何其他的事物来替换绑定的Markdown解析器。 +EpicEditor是一个可嵌入的 JavaScript Markdown 编辑器,具有分割全屏进行编辑,实时预览,自动草稿保存,离线支持等特性。对于开发人员,它提供了健壮的API,可以容易地设置主题,并允许你以任何其他的事物来替换绑定的 Markdown 解析器。 ![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/epiceditor-e1422674732281.png) ### 5) [codepress][5] ### -CodePress是一个用JavaScript编写的基于网络的源代码编辑器,具有语法高亮,并且是在你将代码输入到浏览器后实时进行文本颜色渲染。 +CodePress是一个基于网络的源代码编辑器,它用 JavaScript 编写,具有语法高亮,并且是在你将代码输入到浏览器后实时进行文本颜色渲染。 ![](http://i1.wp.com/devzum.com/wp-content/uploads/2015/01/codepres-e1422674893706.png) @@ -66,7 +66,7 @@ via: http://devzum.com/2015/01/31/9-best-ides-and-code-editors-for-javascript-us 作者:[vikas][a] 译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3f4e375e25a117c2cf5c2f571714a25b6b772163 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Wed, 11 Mar 2015 18:10:09 +0800 Subject: [PATCH 0243/2517] [translated] 20150211 25 Tips for Intermediate Git Users.md --- ...0211 25 Tips for Intermediate Git Users.md | 470 ------------------ ...0211 25 Tips for Intermediate Git Users.md | 469 +++++++++++++++++ 2 files changed, 469 insertions(+), 470 deletions(-) delete mode 100644 sources/tech/20150211 25 Tips for Intermediate Git Users.md create mode 100644 translated/tech/20150211 25 Tips for Intermediate Git Users.md diff --git a/sources/tech/20150211 25 Tips for Intermediate Git Users.md b/sources/tech/20150211 25 Tips for Intermediate Git Users.md deleted file mode 100644 index 71ead3ad6a..0000000000 --- a/sources/tech/20150211 25 Tips for Intermediate Git Users.md +++ /dev/null @@ -1,470 +0,0 @@ -zpl1025 -25 Tips for Intermediate Git Users -================================================================================ -I’ve been using git for about 18 months now and thought I knew it pretty well. Then we had [Scott Chacon][1] from GitHub over to do some training at [LVS, a supplier/developer of betting/gaming software][2] (where contracted until 2013) and I learnt a ton in the first day. - -As someone who’s always felt fairly comfortable in Git, I thought sharing some of the nuggets I learnt with the community might help someone to find an answer without needing to do lots of research. - -### Basic Tips ### - -#### 1. First Steps After Install #### - -After installing Git, the first thing you should do is configure your name and email, as every commit will have these details: - - $ git config --global user.name "Some One" - $ git config --global user.email "someone@gmail.com" - -#### 2. Git is Pointer-Based #### - -Everything stored in git is in a file. When you create a commit it creates a file containing your commit message and associated data (name, email, date/time, previous commit, etc) and links it to a tree file. The tree file contains a list of objects or other trees. The object or blob is the actual content associated with the commit (a file, if you will, although the filename isn’t stored in the object, but in the tree). All of these files are stored with a filename of a SHA-1 hash of the object. - -From there branches and tags are simply files containing (basically) a SHA-1 hash which points to the commit. Using these references allows for a lot of flexibility and speed, as creating a new branch is as simple as creating a file with the name of the branch and the SHA-1 reference to the commit you’re branching from. Of course, you’d never do that as you’d use the Git command line tools (or a GUI), but it’s that simple. - -You may have heard references to the HEAD. This is simply a file containing the SHA-1 reference of the commit you’re currently pointing to. If you’re resolving a merge conflict and see HEAD, that’s nothing to do with a particular branch or necessarily a particular point on the branch but where you currently are. - -All the branch pointers are kept in .git/refs/heads, HEAD is in .git/HEAD and tags are in .git/refs/tags – feel free to have a look in there. - -#### 3. Two Parents – of course! #### - -When viewing a merge commit message in a log, you will see two parents (as opposed to the normal one for a work-based commit). The first parent is the branch you were on and the second is the one you merged in to it. - -#### 4. Merge Conflicts #### - -By now I’m sure you have had a merge conflict and had to resolve it. This is normally done by editing the file, removing the <<<<, ====, >>>> markers and the keeping the code you want to store. Sometimes it’s nice to see the code before either change, i.e. before you made the change in both branches that now conflicts. This is one command away: - - $ git diff --merge - diff --cc dummy.rb - index 5175dde,0c65895..4a00477 - --- a/dummy.rb - +++ b/dummy.rb - @@@ -1,5 -1,5 +1,5 @@@ - class MyFoo - def say - - puts "Bonjour" - - puts "Hello world" - ++ puts "Annyong Haseyo" - end - end - -If the file is binary, diffing files isn’t so easy… What you’ll normally want to do is to try each version of the binary file and decide which one to use (or manually copy portions over in the binary file’s editor). To pull a copy of the file from a particular branch (say you’re merging master and feature132): - - $ git checkout master flash/foo.fla # or... - $ git checkout feature132 flash/foo.fla - $ # Then... - $ git add flash/foo.fla - -Another way is to cat the file from git – you can do this to another filename then copy the correct file over (when you’ve decided which it is) to the normal filename: - - $ git show master:flash/foo.fla > master-foo.fla - $ git show feature132:flash/foo.fla > feature132-foo.fla - $ # Check out master-foo.fla and feature132-foo.fla - $ # Let's say we decide that feature132's is correct - $ rm flash/foo.fla - $ mv feature132-foo.fla flash/foo.fla - $ rm master-foo.fla - $ git add flash/foo.fla - -UPDATE: Thanks to Carl in the comments on the original blog post for the reminder, you can actually use “git checkout —ours flash/foo.fla” and “git checkout —theirs flash/foo.fla” to checkout a particular version without remembering which branches you merge in. Personally I prefer to be more explicit, but the option is there… - -Remember to add the file after resolving the merge conflict (as I do above). - -### Servers, Branching and Tagging ### - -#### 5. Remote Servers #### - -One of the most powerful features of Git is the ability to have more than one remote server (as well as the fact that you’re running a local repository always). You don’t always need write access either, you may have multiple servers you read from (to merge work in) and then write to another. To add a new remote server is simple: - - $ git remote add john git@github.com:johnsomeone/someproject.git - -If you want to see information about your remote servers you can do: - - # shows URLs of each remote server - $ git remote -v - - # gives more details about each - $ git remote show name - -You can always see the differences between a local branch and a remote branch: - - $ git diff master..john/master - -You can also see the changes on HEAD that aren’t on that remote branch: - - $ git log remote/branch.. - # Note: no final refspec after .. - -#### 6. Tagging #### - -In Git there are two types of tag – a lightweight tag and an annotated tag. Bearing in mind Tip 2 about Git being pointer based, the difference between the two is simple. A lightweight tag is simply a named pointer to a commit. You can always change it to point to another commit. An annotated tag is a name pointer to a tag object, with it’s own message and history. As it has it’s own message it can be GPG signed if required. - -Creating the two types of tag is easy (and one command line switch different) - - $ git tag to-be-tested - $ git tag -a v1.1.0 # Prompts for a tag message - -#### 7. Creating Branches #### - -Creating branches in git is very easy (and lightning quick due to it only needing to create a less than 100 byte file). The longhand way of creating a new branch and switching to it: - - $ git branch feature132 - $ git checkout feature132 - -Of course, if you know you’re going to want to switch to it straight away you can do it in one command: - - $ git checkout -b feature132 - -If you want to rename a local branch it’s as easy as (the long way to show what happens): - - $ git checkout -b twitter-experiment feature132 - $ git branch -d feature132 - -Update: Or you can (as Brian Palmer points out in the comments on the original blog post) just use the -m switch to “git branch” to do it in one step (as Mike points out, if you only specify one branch it renames your current branch): - - $ git branch -m twitter-experiment - $ git branch -m feature132 twitter-experiment - -#### 8. Merging Branches #### - -At some point in the future, you’re going to want to merge your changes back in. There are two ways to do this: - - $ git checkout master - $ git merge feature83 # Or... - $ git rebase feature83 - -The difference between merge and rebase is that merge tries to resolve the changes and create a new commit that blends them. Rebase tries to take your changes since you last diverged from the other branch and replay them from the HEAD of the other branch. However, don’t rebase after you’ve pushed a branch to a remote server – this can cause confusion/problems. - -If you aren’t sure which branches still have unique work on them – so you know which you need to merge and which ones can be removed, there are two switches to git branch that help: - - # Shows branches that are all merged in to your current branch - $ git branch --merged - - # Shows branches that are not merged in to your current branch - $ git branch --no-merged - -#### 9. Remote Branches #### - -If you have a local branch that you’d like to appear on a remote server, you can push it up with one command: - - $ git push origin twitter-experiment:refs/heads/twitter-experiment - # Where origin is our server name and twitter-experiment is the branch - -Update: Thanks to Erlend in the comments on the original blog post – this is actually the same as doing `git push origin twitter-experiment` but by using the full syntax you can see that you can actually use different names on both ends (so your local can be `add-ssl-support` while your remote name can be `issue-1723`). - -If you want to delete a branch from the server (note the colon before the branch name): - - $ git push origin :twitter-experiment - -If you want to show the state of all remote branches you can view them like this: - - $ git remote show origin - -This may list some branches that used to exist on the server but now don’t exist. If this is the case you can easily remove them from your local checkout using: - - $ git remote prune - -Finally, if you have a remote branch that you want to track locally, the longhand way is: - - $ git branch --track myfeature origin/myfeature - $ git checkout myfeature - -However, newer versions of Git automatically set up tracking if you use the -b flag to checkout: - - $ git checkout -b myfeature origin/myfeature - -### Storing Content in Stashes, Index and File System ### - -#### 10. Stashing #### - -In Git you can drop your current work state in to a temporary storage area stack and then re-apply it later. The simple case is as follows: - - $ git stash - # Do something... - $ git stash pop - -A lot of people recommend using `git stash apply` instead of pop, however if you do this you end up with a long list of stashes left hanging around. “pop” will only remove it from the stack if it applies cleanly. If you’ve used `git stash apply` you can remove the last item from the stack anyway using: - - $ git stash drop - -Git will automatically create a comment based on the current commit message. If you’d prefer to use a custom message (as it may have nothing to do with the previous commit): - - $ git stash save "My stash message" - -If you want to apply a particular stash from your list (not necessarily the last one) you can list them and apply it like this: - - $ git stash list - stash@{0}: On master: Changed to German - stash@{1}: On master: Language is now Italian - $ git stash apply stash@{1} - -#### 11. Adding Interactively #### - -In the subversion world you change files and then just commit everything that has changed. In Git you have a LOT more power to commit just certain files or even certain patches. To commit certain files or parts of files you need to go in to interactive mode. - - $ git add -i - staged unstaged path - - - *** Commands *** - 1: status 2: update 3: revert 4: add untracked - 5: patch 6: diff 7: quit 8: help - What now> - -This drops you in to a menu based interactive prompt. You can use the numbers of the commands or the highlighted letters (if you have colour highlighting turned on) to go in to that mode. Then it’s normally a matter of typing the numbers of the files you want to apply that action to (you can use formats like 1 or 1-4 or 2,4,7). - -If you want to go to patch mode (‘p’ or ‘5’ from interactive mode) you can also go straight in to that mode: - - $ git add -p - diff --git a/dummy.rb b/dummy.rb - index 4a00477..f856fb0 100644 - --- a/dummy.rb - +++ b/dummy.rb - @@ -1,5 +1,5 @@ - class MyFoo - def say - - puts "Annyong Haseyo" - + puts "Guten Tag" - end - end - Stage this hunk [y,n,q,a,d,/,e,?]? - -As you can see you then get a set of options at the bottom for choosing to add this changed part of the file, all changes from this file, etc. Using the ‘?’ command will explain the options. - -#### 12. Storing/Retrieving from the File System #### - -Some projects (the Git project itself for example) store additional files directly in the Git file system without them necessarily being a checked in file. - -Let’s start off by storing a random file in Git: - - $ echo "Foo" | git hash-object -w --stdin - 51fc03a9bb365fae74fd2bf66517b30bf48020cb - -At this point the object is in the database, but if you don’t set something up to point to that object it will be garbage collected. The easiest way is to tag it: - - $ git tag myfile 51fc03a9bb365fae74fd2bf66517b30bf48020cb - -Note that here we’ve used the tag myfile. When we need to retrieve the file we can do it with: - - $ git cat-file blob myfile - -This can be useful for utility files that developers may need (passwords, gpg keys, etc) but you don’t want to actually check out on to disk every time (particularly in production). - -### Logging and What Changed? ### - -#### 13. Viewing a Log #### - -You can’t use Git for long without using ‘git log’ to view your recent commits. However, there are some tips on how to use it better. For example, you can view a patch of what changed in each commit with: - - $ git log -p - -Or you can just view a summary of which files changed with: - - $ git log --stat - -There’s a nice alias you can set up which shows abbreviated commits and a nice graph of branches with the messages on a single line (like gitk, but on the command line): - - $ git config --global alias.lol "log --pretty=oneline --abbrev-commit --graph --decorate" - $ git lol - * 4d2409a (master) Oops, meant that to be in Korean - * 169b845 Hello world - -#### 14. Searching in the Log #### - -If you want to search for a particular author you can specify that: - - $ git log --author=Andy - -Update: Thanks to Johannes in the comments, I’ve cleared up some of the confusion here. - -Or if you have a search term that appears in the commit message: - - $ git log --grep="Something in the message" - -There’s also a more powerful command called the pickaxe command that look for the entry that removes or adds a particular piece of content (i.e. when it first appeared or was removed). This can tell you when a line was added (but not if a character on that line was later changed): - - $ git log -S "TODO: Check for admin status" - -What about if you changed a particular file, e.g. `lib/foo.rb` - - $ git log lib/foo.rb - -Let’s say you have a `feature/132` branch and a `feature/145` and you want to view the commits on those branches that aren’t on master (note the ^ meaning not): - - $ git log feature/132 feature/145 ^master - -You can also narrow it down to a date range using ActiveSupport style dates: - - $ git log --since=2.months.ago --until=1.day.ago - -By default it will use OR to combine the query, but you can easily change it to use AND (if you have more than one criteria) - - $ git log --since=2.months.ago --until=1.day.ago --author=andy -S "something" --all-match - -#### 15. Selecting Revisions to View/Change #### - -There are a number of items you can specify when referring to a revision, depending on what you know about it: - - $ git show 12a86bc38 # By revision - $ git show v1.0.1 # By tag - $ git show feature132 # By branch name - $ git show 12a86bc38^ # Parent of a commit - $ git show 12a86bc38~2 # Grandparent of a commit - $ git show feature132@{yesterday} # Time relative - $ git show feature132@{2.hours.ago} # Time relative - -Note that unlike the previous section, a caret on the end means the parent of that commit – a caret at the start means not on this branch. - -#### 16. Selecting a Range #### - -The easiest way is to use: - - $ git log origin/master..new - # [old]..[new] - everything you haven't pushed yet - -You can also omit the [new] and it will use your current HEAD. - -### Rewinding Time & Fixing Mistakes ### - -#### 17. Resetting changes #### - -You can easily unstage a change if you haven’t committed it using: - - $ git reset HEAD lib/foo.rb - -Often this is aliased to ‘unstage’ as it’s a bit non-obvious. - - $ git config --global alias.unstage "reset HEAD" - $ git unstage lib/foo.rb - -If you’ve committed the file already, you can do two things – if it’s the last commit you can just amend it: - - $ git commit --amend - -This undoes the last commit, puts your working copy back as it was with the changes staged and the commit message ready to edit/commit next time you commit. - -If you’ve committed more than once and just want to completely undo them, you can reset the branch back to a previous point in time. - - $ git checkout feature132 - $ git reset --hard HEAD~2 - -If you actually want to bring a branch to point to a completely different SHA1 (maybe you’re bringing the HEAD of a branch to another branch, or a further commit) you can do the following to do it the long way: - - $ git checkout FOO - $ git reset --hard SHA - -There’s actually a quicker way (as it doesn’t change your working copy back to the state of FOO first then forward to SHA): - - $ git update-ref refs/heads/FOO SHA - -#### 18. Committing to the Wrong Branch #### - -OK, let’s assume you committed to master but should have created a topic branch called experimental instead. To move those changes over, you can create a branch at your current point, rewind head and then checkout your new branch: - - $ git branch experimental # Creates a pointer to the current master state - $ git reset --hard master~3 # Moves the master branch pointer back to 3 revisions ago - $ git checkout experimental - -This can be more complex if you’ve made the changes on a branch of a branch of a branch etc. Then what you need to do is rebase the change on a branch on to somewhere else: - - $ git branch newtopic STARTPOINT - $ git rebase oldtopic --onto newtopic - -#### 19. Interactive Rebasing #### - -This is a cool feature I’ve seen demoed before but never actually understood, now it’s easy. Let’s say you’ve made 3 commits but you want to re-order them or edit them (or combine them): - - $ git rebase -i master~3 - -Then you get your editor pop open with some instructions. All you have to do is amend the instructions to pick/squash/edit (or remove them) commits and save/exit. Then after editing you can `git rebase —continue` to keep stepping through each of your instructions. - -If you choose to edit one, it will leave you in the state you were in at the time you committed that, so you need to use git commit —amend to edit it. - -**Note: DO NOT COMMIT DURING REBASE – only add then use —continue, —skip or —abort.** - -#### 20. Cleaning Up #### - -If you’ve committed some content to your branch (maybe you’ve imported an old repo from SVN) and you want to remove all occurrences of a file from the history: - - $ git filter-branch --tree-filter 'rm -f *.class' HEAD - -If you’ve already pushed to origin, but have committed the rubbish since then, you can also do this for your local system before pushing: - - $ git filter-branch --tree-filter 'rm -f *.class' origin/master..HEAD - -### Miscellaneous Tips ### - -#### 21. Previous References You’ve Viewed #### - -If you know you’ve previously viewed a SHA-1, but you’ve done some resetting/rewinding you can use the reflog commands to view the SHA-1s you’ve recently viewed: - - $ git reflog - $ git log -g # Same as above, but shows in 'log' format - -#### 22. Branch Naming #### - -A lovely little tip – don’t forget that branch names aren’t limited to a-z and 0-9. It can be quite nice to use / and . in names for fake namespacing or versionin, for example: - - $ # Generate a changelog of Release 132 - $ git shortlog release/132 ^release/131 - $ # Tag this as v1.0.1 - $ git tag v1.0.1 release/132 - -#### 23. Finding Who Dunnit #### - -Often it can be useful to find out who changed a line of code in a file. The simple command to do this is: - - $ git blame FILE - -Sometimes the change has come from a previous file (if you’ve combined two files, or you’ve moved a function) so you can use: - - $ # shows which file names the content came from - $ git blame -C FILE - -Sometimes it’s nice to track this down by clicking through changes and going further and further back. There’s a nice in-built gui for this: - - $ git gui blame FILE - -#### 24. Database Maintenance #### - -Git doesn’t generally require a lot of maintenance, it pretty much takes care of itself. However, you can view the statistics of your database using: - - $ git count-objects -v - -If this is high you can choose to garbage collect your clone. This won’t affect pushes or other people but it can make some of your commands run much faster and take less space: - - $ git gc - -It also might be worth running a consistency check every so often: - - $ git fsck --full - -You can also add a `—auto` parameter on the end (if you’re running it frequently/daily from crontab on your server) and it will only fsck if the stats show it’s necessary. - -When checking, getting “dangling” or “unreachable” is fine, this is often a result of rewinding heads or rebasing. Getting “missing” or “sha1 mismatch” is bad… Get professional help! - -#### 25. Recovering a Lost Branch #### - -If you delete a branch experimental with -D you can recreate it with: - - $ git branch experimental SHA1_OF_HASH - -You can often find the SHA1 hash using git reflog if you’ve accessed it recently. - -Another way is to use `git fsck —lost-found`. A dangling commit here is the lost HEAD (it will only be the HEAD of the deleted branch as the HEAD^ is referred to by HEAD so it’s not dangling) - -### Done! ### - -Wow, the longest blog post I’ve ever written, I hope someone finds it useful. If you did, or if you have any questions let me know in the comments… - --------------------------------------------------------------------------------- - -via: https://www.andyjeffries.co.uk/25-tips-for-intermediate-git-users/ - -作者:[Andy Jeffries][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://www.andyjeffries.co.uk/author/andy-jeffries/ -[1]:http://gitcasts.com/about -[2]:http://www.lvs.co.uk/ diff --git a/translated/tech/20150211 25 Tips for Intermediate Git Users.md b/translated/tech/20150211 25 Tips for Intermediate Git Users.md new file mode 100644 index 0000000000..a1c1dd8328 --- /dev/null +++ b/translated/tech/20150211 25 Tips for Intermediate Git Users.md @@ -0,0 +1,469 @@ +25个给git熟手的技巧 +================================================================================ +我已经使用git差不多18个月了,觉得自己对它应该已经非常了解。然后来自GitHub的[Scott Chacon][1]过来给LVS做培训,[LVS是一个赌博软件供应商和开发商][2](从2013年开始的合同),而我在第一天里就学到了很多。 + +作为一个对git感觉良好的人,我觉得分享从社区里掌握的一些有价值的信息,也许能帮某人解决问题而不用做太深入研究。 + +### 基本技巧 ### + +#### 1. 安装后的第一步 #### + +在安装好git后,你第一件该做的事是设置你的名字和电子邮箱,因为每次提交都要用到这些信息: + + $ git config --global user.name "Some One" + $ git config --global user.email "someone@gmail.com" + +#### 2. Git是基于指针的 #### + +保存在git里的一切都是文件。当你创建一个提交的时候,会建立一个包含你的提交信息和相关数据(名字,邮件地址,日期/时间,前一个提交,等等)的文件,并把它链接到一个文件树中。文件树中包含了对象或其他树的列表。对象或容器是和本次提交相关的实际内容(也是一个文件,你想了解的话,尽管文件名并没有包含在对象里,而是在树中)。所有这些文件都使用对象的SHA-1哈希值作为文件名。 + +用这种方式,分支和标签就是简单的文件(基本上是这样),包含指向实际提交的SHA-1哈希值。使用这些索引会带来优秀的灵活性和速度,比如创建一个新分支就只要简单地创建一个包含分支名字和所分出的那个提交的SHA-1索引的文件。当然,你不需要自己做这些,而只要使用Git命令行工具(或者GUI),但是实际上就是这么简单。 + +你也许听说过叫HEAD的索引。这只是简单的一个文件,包含了你当前指向的那个提交的SHA-1索引值。如果你正在解决一次合并冲突然后看到了HEAD,这并不是一个特别的分支或分值上一个必须的特殊点,只是标明你当前所在位置。 + +所有的分支指针都保存在.git/refs/heads里,HEAD在.git/HEAD里,而标签保存在.git/refs/tags里 - 自己可以放心地进去看看。 + +#### 3. 两个父节点 - 当然! #### + +在历史中查看一个合并提交的信息时,你将看到有两个父节点(相对于一般工作上的常规提交的情况)。第一个父节点是你所在的分支,第二个是你合并过来的分支。 + +#### 4. 合并冲突 #### + +目前我相信你碰到过合并冲突并且解决过。通常是编辑一下文件,去掉<<<<,====,>>>>标志,保留需要留下的代码。有时能够看到这两个修改之前的代码会很不错,比如,在这两个分支上有冲突的改动之前。下面是一种方式: + + $ git diff --merge + diff --cc dummy.rb + index 5175dde,0c65895..4a00477 + --- a/dummy.rb + +++ b/dummy.rb + @@@ -1,5 -1,5 +1,5 @@@ + class MyFoo + def say + - puts "Bonjour" + - puts "Hello world" + ++ puts "Annyong Haseyo" + end + end + +如果是二进制文件,比较差异就没那么简单了...通常你要做的就是测试这个二进制文件的两个版本来决定保留哪个(或者在二进制文件编辑器里手工复制冲突部分)。从一个特定分支获取文件拷贝(比如说你在合并master和feature123): + + $ git checkout master flash/foo.fla # 或者... + $ git checkout feature132 flash/foo.fla + $ # 然后... + $ git add flash/foo.fla + +另一种方式是通过git输出文件 - 你可以输出到另外的文件名,然后再重命名正确的文件(当你决定了要用哪个)为正常的文件名: + + $ git show master:flash/foo.fla > master-foo.fla + $ git show feature132:flash/foo.fla > feature132-foo.fla + $ # 检出master-foo.fla和feature132-foo.fla + $ # 假如说我们决定来自feature132的文件是正确的 + $ rm flash/foo.fla + $ mv feature132-foo.fla flash/foo.fla + $ rm master-foo.fla + $ git add flash/foo.fla + +更新:感谢Carl在原博客文章上评论里的提醒,你实际上可以用“git checkout —ours flash/foo.fla”和“git checkout —theirs flash/foo.fla”来检出特定版本的文件,而不用记住你在合并的分支名字。就我个人来说喜欢更精确一点,但这也是一种方式... + +记着在解决完冲突后要将文件加入提交(像我上面做的那样)。 + +### 服务器,分支和标签 ### + +#### 5. 远端服务器 #### + +git的一个超强大的功能就是可以有不止一个远端服务器(实际上你一直都在一个本地仓库上工作)。你并不是一定都要有写权限,你可以有多个可以读取的服务器(用来合并他们的工作)然后写入其他仓库。添加一个新的远端服务器很简单: + + $ git remote add john git@github.com:johnsomeone/someproject.git + +如果你想查看远端服务器的信息可以这样做: + + # 显示每个远端服务器的URL + $ git remote -v + + # 提供更多详细信息 + $ git remote show name + +你随时都可以查看本地分支和远端分支的差异: + + $ git diff master..john/master + +你也可以查看不在远端分支的HEAD的改动: + + $ git log remote/branch.. + # 注意:..后面没有结束的refspec + +#### 6. 标签 #### + +在git里有两种类型的标签 - 轻量级标签和带注释标签。记住技巧2里说过git是基于指针的,这两者之间的差异也很简单。轻量级标签只是一个简单的指向一次提交的带名字指针。你随时都可以将它指向另一个提交。带注释标签是一个指向标签对象的带名字指针,带有自己的信息和历史。因为有自己的信息,它可以根据需要用GPG签名。 + +建立这两种类型的标签都很简单(只有一个命令行开关的差异) + + $ git tag to-be-tested + $ git tag -a v1.1.0 # 会提示输入标签信息 + +#### 7. 建立分支 #### + +在git里建立分支非常简单(而且像闪电一样快,因为它只需要创建一个小于100字节的文件)。用普通方式建立新分支并切换过去: + + $ git branch feature132 + $ git checkout feature132 + +当然,如果你确定自己要新建分支并直接切换过去,可以用一个命令实现: + + $ git checkout -b feature132 + +如果你想重命名一个本地分支也很简单(可以显示发生了什么的较长的方式): + + $ git checkout -b twitter-experiment feature132 + $ git branch -d feature132 + +更新:你也可以(像Brian Palmer在原博客文章的评论里提出的)只用“git branch”的-m开关在一个命令里实现(像Mike提出的,如果你只有一个分支参数,就会重命名当前分支): + + $ git branch -m twitter-experiment + $ git branch -m feature132 twitter-experiment + +#### 8. 合并分支 #### + +在将来什么时候,你希望合并改动。有两种方式: + + $ git checkout master + $ git merge feature83 # 或者... + $ git rebase feature83 + +merge和rebase之间的差别是merge会尝试处理改动并建立一个新的混合了两者的提交。rebase会尝试把你从一个分支最后一次分离后的所有改动,一个个加到该分支的HEAD上。不过,在已经将分支推到远端服务器后不要再rebase了 - 这回引起冲突/问题。 + +如果你不确定在哪些分支上还有独有的工作 - 所以你也不知道哪些分支需要合并而哪些可以删除,git branch有两个开关可以帮你: + + # 显示已经全部合并到当前分支的分支 + $ git branch --merged + + # 显示没有合并到当前分支的分支 + $ git branch --no-merged + +#### 9. 远端分支 #### + +如果你在本地有一个分支希望推到远端服务器上,你可以用一行命令推送上去: + + $ git push origin twitter-experiment:refs/heads/twitter-experiment + # origin是我们服务器的名字,而twitter-experiment是分支名字 + +更新:感谢Erlend在原博客文章上的评论 - 这个实际上和`git push origin twitter-experiment`效果一样,不过使用完整的语法,你可以在两者之间使用不同的分知名(这样本地分支可以是`add-ssl-support`而远端是`issue-1723`)。 + +如果你想在远端服务器上删除一个分支(注意分支名前面的冒号): + + $ git push origin :twitter-experiment + +如果你想查看所有远端分支的状态可以这样做: + + $ git remote show origin + +这个命令可能会列出服务器上一些以前有过但现在已经不在了的分支。如果碰到这种情况你可以用下面的命令从你本地分支里清理掉: + + $ git remote prune + +最后,如果你想在本地跟踪一个远端分支,普通的方式是: + + $ git branch --track myfeature origin/myfeature + $ git checkout myfeature + +不过,新版的git在使用-b标记检出分支时会自动设定跟踪: + + $ git checkout -b myfeature origin/myfeature + +### 在储藏点,索引和文件系统中保存内容 ### + +#### 10. 储藏 #### + +在git里你可以把当前工作状态放进一个储藏堆栈中,然后可以再取出来。最简单的情形是下面这样: + + $ git stash + # 做点其他事情... + $ git stash pop + +许多人建议使用`git stash apply`来代替pop,不过如果这样做的话最后会遗留一个很长的储藏列表。而“pop”会在全部加载后自动从堆栈中移除。如果使用过`git stash apply`,你也可以使用下面的命令从堆栈上移除最后一项: + + $ git stash drop + +git会基于当前的提交信息自动创建评论。如果你更希望有自定义信息的话(因为它可能和前一个提交没有任何联系): + + $ git stash save "My stash message" + +如果你希望从列表中取出一个特定的储藏点(不一定非得是最后一个)可以先列出它们然后用下面的方式取出: + + $ git stash list + stash@{0}: On master: Changed to German + stash@{1}: On master: Language is now Italian + $ git stash apply stash@{1} + +#### 11. 交互式添加 #### + +在subversion的世界里你只能修改文件然后提交所有改动。而在git里你有强大得多的方式来提交部分文件或者甚至是部分补丁。提交部分文件或文件中的部分改动你需要进入交互式模式: + + $ git add -i + staged unstaged path + + + *** Commands *** + 1: status 2: update 3: revert 4: add untracked + 5: patch 6: diff 7: quit 8: help + What now> + +这会让你进入一个基于菜单的交互式提示。你可以使用命令中的数字或高亮的字母(如果你在终端里打开了高亮的话)来进入相应的模式。然后就只是输入你希望操作的文件的数字了(你可以使用这样的格式,1或者1-4或2,4,7)。 + +如果你想进入补丁模式(交互式模式下的‘p’或‘5’),你也可以直接进入: + + $ git add -p + diff --git a/dummy.rb b/dummy.rb + index 4a00477..f856fb0 100644 + --- a/dummy.rb + +++ b/dummy.rb + @@ -1,5 +1,5 @@ + class MyFoo + def say + - puts "Annyong Haseyo" + + puts "Guten Tag" + end + end + Stage this hunk [y,n,q,a,d,/,e,?]? + +你可以看到下方会有一些选项供选择用来添加该文件的这个改动,该文件的所有改动,等等。使用‘?’命令可以详细解释这些选项。 + +#### 12. 从文件系统里保存/取回改动 #### + +有些项目(比如git项目本身)在git文件系统中直接保存额外文件而并没有将它们加入到版本控制中。 + +让我们从在git中存储一个随机文件开始: + + $ echo "Foo" | git hash-object -w --stdin + 51fc03a9bb365fae74fd2bf66517b30bf48020cb + +这样这个目标文件就已经保存到数据库中了,但是如果你没有设定一个指向它的指针的话它会被当做垃圾回收。最简单的方式是设定一个标签: + + $ git tag myfile 51fc03a9bb365fae74fd2bf66517b30bf48020cb + +注意这里我们使用了标签myfile。当我们需要使用这个文件的时候可以这样做: + + $ git cat-file blob myfile + +这个对于一些工具文件很有用,开发者可能会用到(密码,GPG密钥,等等)但是又不希望每次都检出到硬盘(尤其是在实际工作中)。 + +### 日志以及有哪些改动? ### + +#### 13. 查看日志 #### + +如果不用‘git log’来查看最近的提交你git用不了多久。不过,有一些技巧来更好地应用。比如,你可以使用下面的命令来查看每次提交的具体改动: + + $ git log -p + +或者你可以仅仅查看有哪些文件改动: + + $ git log --stat + +有个很不错的别名你可以试试,会显示简短提交名和一个不错的分支图并在一行里显示提交信息(有点像gitk,但是是在命令行下): + + $ git config --global alias.lol "log --pretty=oneline --abbrev-commit --graph --decorate" + $ git lol + * 4d2409a (master) Oops, meant that to be in Korean + * 169b845 Hello world + +#### 14. 搜索日志 #### + +如果你想找特定作者可以这样做: + + $ git log --author=Andy + +更新:感谢Johannes的评论,我已经去掉了之前这里的一些有混淆的地方。 + +或者你想在提交信息里找一些相关字段: + + $ git log --grep="Something in the message" + +也有一个更强大的叫做pickaxe的命令用来查找删除或添加某个特定内容的提交(比如,该文件第一次出现或被删除)。这可以告诉你什么时候增加了一行(但这一行里的某个字符后面被改动过就不行了): + + $ git log -S "TODO: Check for admin status" + +假如你改动了一个特定的文件,比如`lib/foo.rb` + + $ git log lib/foo.rb + +比如说你有一个`feature/132`分支和`feature/145`分支,然后你想看看这两个分支上不在master分支里的提交(注意^符号是不在的意思): + + $ git log feature/132 feature/145 ^master + +你也可以使用ActiveSupport格式的日期来缩小到某个日期范围: + + $ git log --since=2.months.ago --until=1.day.ago + +默认情况下会用OR来组合查询,但你可以轻易地改为AND(如果你有超过一条的标准) + + $ git log --since=2.months.ago --until=1.day.ago --author=andy -S "something" --all-match + +#### 15. 查看/修改版本 #### + +有很多方式可以用来引用一个版本,看你记得哪个: + + $ git show 12a86bc38 # 根据版本 + $ git show v1.0.1 # 根据标签 + $ git show feature132 # 根据分支名 + $ git show 12a86bc38^ # 一次提交的父节点 + $ git show 12a86bc38~2 # 一次提交的祖父节点 + $ git show feature132@{yesterday} # 时间相关 + $ git show feature132@{2.hours.ago} # 时间相关 + +注意和之前部分有些不同,末尾的插入符号意思是该提交的父节点 - 开始位置的插入符号意思是不在这个分支。 + +#### 16. 选择范围 #### + +最简单的方式: + + $ git log origin/master..new + # [old]..[new] - 所有你还没有推送的提交 + +你也可以省略[new],将使用当前的HEAD。 + +### Rewinding Time & Fixing Mistakes ### + +#### 17. 重置改动 #### + +如果你还没有提交的话可以用下面的命令轻松地取消改动: + + $ git reset HEAD lib/foo.rb + +通常会使用‘unstage’的别名,因为看上去有些不直观。 + + $ git config --global alias.unstage "reset HEAD" + $ git unstage lib/foo.rb + +如果你已经提交了该文件,你可以做两件事 - 如果是最后一次提交你还可以改正: + + $ git commit --amend + +这会取消最后一次提交,把工作分支回退到提交前标记了所有改动的状态,而且提交信息也都准备好可以修改或直接提交。 + +如果你已经提交过多次而且希望全部回退,你可以将分支重置到合适的位置。 + + $ git checkout feature132 + $ git reset --hard HEAD~2 + +如果你实际上希望将分支指向一个完全不同的SHA1(也许你要将一个分支的HEAD替换到另一个分支,或者之后的某次提交)你可以使用下面的较长的方式: + + $ git checkout FOO + $ git reset --hard SHA + +实际上有一个快速的方式(不需要先把你的工作分支切换到FOO再前进到SHA): + + $ git update-ref refs/heads/FOO SHA + +#### 18. 提交到了错误的分支 #### + +好吧,假如说你已经提交到了master,但却应该创建一个叫experimental的主题分支更合适。要移动这些改动,你可以在当前位置创建分支,回退HEAD再检出新分支: + + $ git branch experimental # 创建一个指向当前master的位置的指针 + $ git reset --hard master~3 # 移动master分支的指针到3个版本之前 + $ git checkout experimental + +如果你的改动是在分支的分支的分支上会更复杂。那样你需要做的是将分支基础切换到其他地方: + + $ git branch newtopic STARTPOINT + $ git rebase oldtopic --onto newtopic + +#### 19. 交互式切换基础 #### + +这是一个我之前看过展示却没真正理解过的很赞的功能,现在很简单。假如说你提交了3次但是你希望更改顺序或编辑(或者合并): + + $ git rebase -i master~3 + +然后会启动你的编辑器并带有一些指令。你所要做的就是修改这些指令来选择/插入/编辑(或者删除)提交和保存/退出。然后在编辑完后你可以用`git rebase --continue`命令来让每一条指令生效。 + +如果你有修改,将会切换到你提交时所处的状态,之后你需要使用命令git commit --amend来编辑。 + +**注意:在rebase的时候千万不要提交 - 只能先添加然后使用参数--continue,--skip或--abort。** + +#### 20. 清理 #### + +如果你提交了一些内容到你的分支(也许你从SVN导入了一些旧仓库),然后你希望把某个文件从历史记录中全部删掉: + + $ git filter-branch --tree-filter 'rm -f *.class' HEAD + +如果你已经推送到origin了,但之后提交了一些垃圾改动,你也可以在推送前在本地系统里这样做: + + $ git filter-branch --tree-filter 'rm -f *.class' origin/master..HEAD + +### 其他技巧 ### + +#### 21. 你查看过的前一个引用 #### + +如果你知道自己之前查看过一个SHA-1,但是随后做了一些重置/回退的操作,你可以使用reflog命令来列出最近查看过的SHA-1记录: + + $ git reflog + $ git log -g # 和上面一样,但是使用'log'格式输出 + +#### 22. 分支命名 #### + +一个可爱的小技巧 - 别忘了分支名并不限于a-z和0-9。名字中可以用/和.将非常方便用来建立伪命名空间或版本,例如: + + $ # 生成版本132的改动历史 + $ git shortlog release/132 ^release/131 + $ # 贴上v1.0.1的标签 + $ git tag v1.0.1 release/132 + +#### 23. 找出谁是凶手 #### + +通常找出来谁改动了某个文件里的某行代码会很有用。实现这个功能的最简单命令是: + + $ git blame FILE + +有时候这些改动来自其他文件(如果你合并了两个文件,或者你移动了某个函数)所以你可以使用下面的命令: + + $ # 显示内容来自哪个文件 + $ git blame -C FILE + +有时候通过点击各个改动然后回到很早很早以前来跟踪改动会很不错。有一个很好的内建GUI命令来做这个: + + $ git gui blame FILE + +#### 24. 数据维护 #### + +通常git不需要经常维护,它把自己照顾的很好。不过,你可以通过下面的命令查看数据统计: + + $ git count-objects -v + +如果占用很多空间的话,你可以选择在你的本地仓库做垃圾回收。这不会影响推送或其他人,却会让一些命令运行更快而且减少空间占用: + + $ git gc + +经常运行完整性检查也很有意义: + + $ git fsck --full + +你也可以在末尾加上`--auto`参数(如果你在服务器上通过crontab经常/每天都运行这个命令的话),然后它只会在必要的时候才执行fsck动作。 + +在检查的时候,看到“dangling”或“unreachable”是正常的,通常这是由回退HEAD或切换基础的结果。而看到“missing”或“sha1 mismatch”就不对了...找专业人士帮忙吧! + +#### 25. 恢复遗失的分支 #### + +如果你使用-D参数删除了experimental分支,可以用下面的命令重新建立: + + $ git branch experimental SHA1_OF_HASH + +如果你访问过的话,你通常可以用git reflog来找到SHA1哈希值。 + +另一种方式是使用`git fsck —lost-found`。其中一个dangling的提交就是丢失的HEAD(它只是已删除分支的HEAD,而HEAD^被引用为当前的HEAD所以它并不处于dangling状态) + +### 搞定! ### + +哇,这是我写过的最长的一篇博客,我希望有人能觉得有用。如果你这么觉得,或者你有任何疑问请在评论里留言让我知道... + +-------------------------------------------------------------------------------- + +via: https://www.andyjeffries.co.uk/25-tips-for-intermediate-git-users/ + +作者:[Andy Jeffries][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.andyjeffries.co.uk/author/andy-jeffries/ +[1]:http://gitcasts.com/about +[2]:http://www.lvs.co.uk/ From cc5ebd07355fde7779a5f0c5d73db9c9f077d5aa Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Wed, 11 Mar 2015 18:14:57 +0800 Subject: [PATCH 0244/2517] [translating] Windows 10 versus Linux.md --- sources/talk/20150127 Windows 10 versus Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150127 Windows 10 versus Linux.md b/sources/talk/20150127 Windows 10 versus Linux.md index e2cdfc14c1..d79b45d93c 100644 --- a/sources/talk/20150127 Windows 10 versus Linux.md +++ b/sources/talk/20150127 Windows 10 versus Linux.md @@ -1,3 +1,4 @@ +zpl1025 Windows 10 versus Linux ================================================================================ ![](https://farm4.staticflickr.com/3852/14863156322_e4edbae70e_t.jpg) @@ -28,4 +29,4 @@ via: http://ostatic.com/blog/windows-10-versus-linux [3]:http://blowingupbits.com/2015/01/an-outsiders-perspective-on-windows-10-preview/ [4]:http://blowingupbits.com/2015/01/an-outsiders-perspective-on-windows-10-preview/ [5]:http://www.datamation.com/open-source/windows-vs-linux-the-2015-version-1.html -[6]:http://www.zdnet.com/article/microsoft-the-open-source-company/ \ No newline at end of file +[6]:http://www.zdnet.com/article/microsoft-the-open-source-company/ From ce61957232c98c448d9a3826f27b4b285e8540c7 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 11 Mar 2015 20:21:54 +0800 Subject: [PATCH 0245/2517] Upload20150311 translated --- ...ter Suspend In Ubuntu 14.04 [Quick Tip].md | 30 ------------------- ...ter Suspend In Ubuntu 14.04 [Quick Tip].md | 28 +++++++++++++++++ 2 files changed, 28 insertions(+), 30 deletions(-) delete mode 100644 sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md create mode 100644 translated/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md diff --git a/sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md b/sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md deleted file mode 100644 index f0915baf40..0000000000 --- a/sources/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md +++ /dev/null @@ -1,30 +0,0 @@ -translating by martin. - -[Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip] -================================================================================ -### Problem: ### - -When Ubuntu 14.04 or 14.10 comes back from sleep or suspend mode, the keyboard and mouse freeze. Nothing can be clicked or entered. The only way out is to force shutdown the system by pressing the power button. This is very inconvenient, rather very annoying. Because the default behavior in Ubuntu is that when you close the lid of the laptop, it goes in sleep mode. - -In this quick post, we shall see how to fix this issue of mouse freeze after suspend in Ubuntu 14.04 and 14.10. - -### Solution to mouse freezing after sleep in Ubuntu 14.04 ### - -The issue is actually coming from Kernel upgrade. I am not sure of the reason why, but a re-install of input device driver seems to be fixing this issue. - - sudo apt-get install --reinstall xserver-xorg-input-all - -This quick tip was based on a question asked by an It’s FOSS reader, Dev. Try this quick tip and see if it works for you as well. In a similar issue, you can [fix no Unity, launcher and dash after logging in to Ubuntu][1]. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/keyboard-mouse-freeze-suspend/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/how-to-fix-no-unity-no-launcher-no-dash-in-ubuntu-12-10-quick-tip/ diff --git a/translated/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md b/translated/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md new file mode 100644 index 0000000000..0e766f4f66 --- /dev/null +++ b/translated/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md @@ -0,0 +1,28 @@ +[已解决] Ubuntu 14.04从待机中唤醒后鼠标键盘出现僵死情况 [快速小贴士] +================================================================================ +### 问题: ### + +当Ubuntu14.04或14.10从睡眠和待机状态恢复时,鼠标和键盘出现僵死,不能点击也不能输入。解决这种情况是唯一方法就是按关机键强关系统,这不仅非常不便且令人恼火。因为在Ubuntu的默认情况中合上笔记本等同于切换到睡眠模式。 + +在这篇短文中,我们将学会如何解决Ubuntu14.04和14.10中出现的鼠标僵死问题。 + +### Ubuntu14.04唤醒后鼠标僵死的解决办法 ### + +这个问题的是由内核升级导致的。为何导致这一情况不得而知,但是看起来好像仅需重装输入设备的驱动就能解决了。 + + sudo apt-get install --reinstall xserver-xorg-input-all + +这则贴士源自一个自由开源读者Dev的提问。快试试这篇贴士,看看是否对你也有效。在一个类似的问题中,你可以[修复Ubuntu登录后无Unity界面、侧边栏和Dash的问题][1] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/keyboard-mouse-freeze-suspend/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/how-to-fix-no-unity-no-launcher-no-dash-in-ubuntu-12-10-quick-tip/ \ No newline at end of file From 7cf2062e91b15fb35061d393368a489aecf170de Mon Sep 17 00:00:00 2001 From: FSSlc Date: Thu, 12 Mar 2015 13:23:35 +0800 Subject: [PATCH 0246/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E6=96=B0=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Smartphones Like Weather Conky In Linux.md | 86 --------------- ...Smartphones Like Weather Conky In Linux.md | 101 ++++++++++++++++++ 2 files changed, 101 insertions(+), 86 deletions(-) delete mode 100644 sources/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md create mode 100644 translated/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md diff --git a/sources/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md b/sources/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md deleted file mode 100644 index 7607920dd3..0000000000 --- a/sources/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md +++ /dev/null @@ -1,86 +0,0 @@ -FSSlc translating - -How To Use Smartphones Like Weather Conky In Linux -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Use_Weather_Conky_Linux.jpeg) - -Smartphones have those sleek weather widgets that blend in to the display. Thanks to Flair Weather Conky, you can get **smartphone like weather display on your Linux desktop**. We will be using a GUI tool [Conky Manager to easily manage Conky in Linux][1]. Let’s first see how to install Conky Manager in Ubuntu 14.10, 14.04, Linux Mint 17 and other Linux distributions. - -### Install Conky Manager ### - -Open a terminal and use the following commands: - - sudo add-apt-repository ppa:teejee2008/ppa - sudo apt-get update - sudo apt-get install conky-manager - -You can read this article on [how to use Conky Manager in Linux][1]. - -### Make sure curl is installed ### - -Do make sure that [curl][2] is installed. Use the following command: - - sudo apt-get install curl - -### Download Flair Weather Conky ### - -Get the Flair Weather Conky script from the link below: - -- [Download Flair Weather Conky Script][3] - -### Using Flair Weather Conky script in Conky Manager ### - -#### Step 1: #### - -Same as you install themes in Ubuntu 14.04, you should have a .conky directory in your Home folder. If you use command line, I don’t need to tell you how to find that. For beginners, go to your Home directory from File manager and press Ctrl+H to [show hidden files in Ubuntu][4]. Look for .conky folder here. If there is no such folder, make one. - -#### Step 2: #### - -In the .conky directory, extract the downloaded Flair Weather file. Do note that by default it is extracted to .conky directory itself. So go in this directory and get the Flair Weather folder out of it and paste it to actual .conky directory. - -#### Step 3: #### - -Flair Weather uses Yahoo and it doesn’t recognize your location automatically. You’ll need to manually edit it. Go to [Yahoo Weather][5] and get the location of id of your city by typing your city/pin code. You can get the location id from the URL. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Yahoo_Weather_Location_Code.jpeg) - -#### Step 4: #### - -Open Conky Manager. It should be able to read the newly installed Conky script. There are two variants, dark and light, available. You can choose whichever you prefer. You can should see the conky displayed on the desktop as soon as you select it. - -Default location in Flair Weather is set to Melbourne. You’ll have to manually edit the conky. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Using_Weather_Conky_Ubuntu.jpeg) - -#### Step 5: #### - -In the screenshot above, you can see the option to edit the selected conky. In the editor opened, look for location or WOEID. Change it with the location code you got in step 3. Now restart the Conky. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Edit_Conky.jpeg) - -In the same place, if you replace C by F, the unit of temperature will be changed to Fahrenheit from Celsius. Don’t forget to restart the Conky to see the changes made. - -#### Give it a try #### - -In this article we actually learned quite few things. We saw how we can use any Conky script easily, how to edit the scripts and how to use Conky Manager for various purposes. I hope you find it useful. - -A word of caution, Ubuntu 14.10 users might see overlapped time numerals. Please make the developer ware of any such issues. - -I have already shown you the screenshot of how the Flair Weather conky looked in my system. Time for you to try this and flaunt your desktop. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/weather-conky-linux/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/Abhishek/ -[1]:http://itsfoss.com/conky-gui-ubuntu-1304/ -[2]:http://www.computerhope.com/unix/curl.htm -[3]:http://speedracker.deviantart.com/art/Flair-Weather-Conky-Made-for-Conky-Manager-510130311 -[4]:http://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ -[5]:https://weather.yahoo.com/ diff --git a/translated/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md b/translated/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md new file mode 100644 index 0000000000..962becea1b --- /dev/null +++ b/translated/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md @@ -0,0 +1,101 @@ +如何在 Linux 中使用类似智能手机外观的 Conky 天气插件 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Use_Weather_Conky_Linux.jpeg) + +智能手机都拥有一些平滑融入手机外观的天气小插件,幸亏有了 Flair Weather Conky,你便可以**在你的 Linux 桌面中拥有像智能手机一样的天气外观**。我们将使用一个 GUI 工具[Conky Manager 在 Linux 中轻松地管理 Conky][1]。那就先让我们看看如何在 Ubuntu 14.10,14.04、Linux Mint 17 及其他 Linux 发行版本中安装 Conky Manager 吧。 + +### 安装 Conky Manager ### + +打开一个终端并使用下面的命令: + + sudo add-apt-repository ppa:teejee2008/ppa + sudo apt-get update + sudo apt-get install conky-manager + +你可以阅读这篇关于[如何在 Linux 中使用 Conky Manager][1] 的文章。 + +### 确保 `curl` 已被安装 ### + +请确保 [curl][2] 已被安装。(如果没有安装它,)可以使用下面的命令来安装: + + sudo apt-get install curl + +### 下载 Flair Weather Conky ### + +从下面的链接下载 Flair Weather Conky 的脚本: + +- [下载 Flair Weather Conky 的脚本][3] + +### 在 Conky Manager 中使用 Flair Weather Conky 脚本 ### + +#### 步骤 1: #### + +同你在 Ubuntu 14.04 中安装主题一样,在你的家目录中应该有一个 `.conky` 目录。假如你使用命令行,则不需要让我来告诉你如何找到这个目录。对于新手,请用文件管理器切换到你的家目录下,并按 `Ctrl+H` 来 [在 Ubuntu 中显示隐藏文件][4]。在这里查找 `.conky` 文件夹,假如没有这个文件夹,则创建一个。 + +#### 步骤 2: #### + +在 `.conky` 目录中,解压下载到的 Flair Weather 文件。请注意在默认情况下它会自动解压到一个名为 `.conky` 目录。所以请进入这个目录,将 Flair Weather 文件夹从中取出,然后将它粘贴到真正的 `.conky` 目录下。 + +#### 步骤 3: #### + +Flair Weather 使用 Yahoo 的天气服务,但它不能自动地识别你的位置。你需要手动地编辑它。到[Yahoo 天气][5] 网页,然后通过键入你的城市/Pin 码来得到你所在城市的 位置 ID号。你可以从网页地址栏中取得位置 ID 号。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Yahoo_Weather_Location_Code.jpeg) + +#### 步骤 4: #### + +打开 Conky Manager,它应该能够读取新安装的 Conky 脚本。这里有两款样式可用,黑色主题或亮丽主题。你可以选择你偏爱的那一款。当你选择后,你就可以在桌面上看到 conky 的显示了。 + +在 Flair Weather 中,默认位置被设定为 Melbourne。你必须手动编辑 conky 文件。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Using_Weather_Conky_Ubuntu.jpeg) + +#### 步骤 5: #### + +在上面的截图中,你可以看到有一个编辑选定 conky 脚本的选项,在打开的编辑器中,查找 location 或 WOEID ,更换它为你在 `步骤 3` 中得到的位置 ID 号。然后重启 Conky。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Edit_Conky.jpeg) + +在上面查找的相同位置,假如你将 C 替换为 F,则温度的单位将从摄氏温标改为华氏温标 。不要忘了重启 Conky 来查看已经做出的修改。 + +#### 可能的故障排除 #### +(注:这一小节在 md 文件中没有,原文新添加的。) + +在 Ubuntu 14.04 和 Ubuntu 14.10 中,假如你发现 Conky 展示的时间有重叠现象,则请编辑 conky 脚本。查找下面的这些行: +``` +## cairo-compmgr +own_window_type override +own_window_argb_visual no +``` +然后将内容更换为下面的这些行: +``` +## cairo-compmgr +own_window_type dock +own_window_argb_visual no +``` +保存更改并重启 conky。这就应该解决了这个问题。感谢 Jesse(这个 Conky 脚本的开发者)给我们提供了这个解决方法和为其他相关问题给予的支持。 + +#### 尝试尝试 #### + +在这篇文章中,我们实际上学到了不少东西。我们见证了如何轻松地使用任何 Conky 脚本,如何编辑脚本以及如何使用 Conky Manager 来达到不同的目的。我希望这些对你有用。 + +需要留心的是,Ubuntu 14.10 用户可能会看到重叠的时间数字。请在开发者 Jesse 绝妙的[Google + 主页][6] 中报告任何相关的问题。(注:这句在 md 文件中的内容与原文有差异,我按照原文翻译,并加上了 链接) + +我已经向你展示了在我的系统上 Flair Weather conky 外观的截图。现在该你尝试它并炫耀你的桌面的时间了。 +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/weather-conky-linux/ + +作者:[Abhishek][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/Abhishek/ +[1]:http://itsfoss.com/conky-gui-ubuntu-1304/ +[2]:http://www.computerhope.com/unix/curl.htm +[3]:http://speedracker.deviantart.com/art/Flair-Weather-Conky-Made-for-Conky-Manager-510130311 +[4]:http://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ +[5]:https://weather.yahoo.com/ +[6]:https://plus.google.com/communities/104794997718869399105 From 0f49de4ec1c715f71276b69c2d9b8d9ab24342e9 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 12 Mar 2015 15:08:39 +0800 Subject: [PATCH 0247/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150203 9 Best IDEs and Code Editors for JavaScript Users.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/talk => published}/20150203 9 Best IDEs and Code Editors for JavaScript Users.md (100%) diff --git a/translated/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md b/published/20150203 9 Best IDEs and Code Editors for JavaScript Users.md similarity index 100% rename from translated/talk/20150203 9 Best IDEs and Code Editors for JavaScript Users.md rename to published/20150203 9 Best IDEs and Code Editors for JavaScript Users.md From e1e4f8be6fb224f318d004f4c8cf3204c1e58441 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 12 Mar 2015 15:37:58 +0800 Subject: [PATCH 0248/2517] PUB:20141219 Creating your First App on Linux with Python and Flask @geekpi --- ...irst App on Linux with Python and Flask.md | 65 +++++++++---------- 1 file changed, 31 insertions(+), 34 deletions(-) rename {translated/tech => published}/20141219 Creating your First App on Linux with Python and Flask.md (64%) diff --git a/translated/tech/20141219 Creating your First App on Linux with Python and Flask.md b/published/20141219 Creating your First App on Linux with Python and Flask.md similarity index 64% rename from translated/tech/20141219 Creating your First App on Linux with Python and Flask.md rename to published/20141219 Creating your First App on Linux with Python and Flask.md index fc90044195..94f3cd7873 100644 --- a/translated/tech/20141219 Creating your First App on Linux with Python and Flask.md +++ b/published/20141219 Creating your First App on Linux with Python and Flask.md @@ -2,29 +2,28 @@ ================================================================================ ![](http://techarena51.com/wp-content/uploads/2014/12/python-logo.png) -无论你在linux上娱乐还是工作,这对你而言都是一个很好的机会使用python来编程。回到大学我希望他们教我的是Python而不是Java,这学起来很有趣且在实际的应用如yum包管理器中很有用。 +无论你在linux上娱乐还是工作,这对你而言都是一个使用python来编程的很好的机会。回到大学我希望他们教我的是Python而不是Java,这学起来很有趣且在实际的应用如yum包管理器中很有用。 -本篇教程中我会带你使用python和一个称为flask的微型框架来构建一个简单的应用来显示诸如[每个进程的内存使用][1],CPU百分比之类有用的信息。 +本篇教程中我会带你使用python和一个称为flask的微型框架来构建一个简单的应用,来显示诸如[每个进程的内存使用][1],CPU百分比之类有用的信息。 -### 前提 ### +### 前置需求 ### -Python基础、列表、类、函数、模块。 -HTML/CSS (基础) +Python基础、列表、类、函数、模块。HTML/CSS (基础)。 -学习这篇教程你不必是一个python高级开发者,但是首先我建议你阅读https://wiki.python.org/moin/BeginnersGuide/NonProgrammers。 +学习这篇教程你不必是一个python高级开发者,但是首先我建议你阅读 https://wiki.python.org/moin/BeginnersGuide/NonProgrammers 。 -### I在Linux上安装Python 3 ### +### 在Linux上安装Python 3 ### 在大多数Linux发行版上Python是默认安装的。下面的你命令可以让你看到安装的版本。 [root@linux-vps ~]# python -V Python 2.7.5 -我们会使用3.x的版本来构建我们的app。根据[Python.org][2]所说,这版本上面所有的改进都不向后兼容Python 2。 +我们会使用3.x的版本来构建我们的app。根据[Python.org][2]所说,现在只对这个版本进行改进,而且不向后兼容Python 2。 -**注意**: 在开始之前,我强烈建议你在虚拟机中尝试这个教程,因为Python许多Linux发行版的核心组建,任何意外都可能会损坏你的系统。 +**注意**: 在开始之前,我强烈建议你在虚拟机中尝试这个教程,因为Python是许多Linux发行版的核心组件,任何意外都可能会损坏你的系统。 -这步是基于红帽的版本如CentOS(6和7),基于Debian的版本如UbuntuMint和Resbian可以跳过这步,Pythonn 3应该默认已经安装了。如果没有安装,请用apt-get而不是yum来安装下面相应的包。 +以下步骤是基于红帽的版本如CentOS(6和7),基于Debian的版本如UbuntuMint和Resbian可以跳过这步,Pythonn 3应该默认已经安装了。如果没有安装,请用apt-get而不是yum来安装下面相应的包。 [leo@linux-vps] yum groupinstall 'Development Tools' [leo@linux-vps] yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel @@ -33,7 +32,7 @@ HTML/CSS (基础) [leo@linux-vps] cd Python-3.4.2 [leo@linux-vps] ./configure [leo@linux-vps] make - # make altinstall is recommended as make install can overwrite the current python binary, + # 推荐使用 make altinstall 以覆盖当前的 python 库 [leo@linux-vps] make altinstall 成功安装后,你应该可以用下面的命令进入Python3.4的shell了。 @@ -48,21 +47,19 @@ HTML/CSS (基础) Python有它自己的包管理去,与yum和apt-get相似。你将需要它来下载、安装和卸载包。 - [leo@linux-vps] pip3.4 install "packagename" - + [leo@linux-vps] pip3.4 install "packagename" [leo@linux-vps] pip3.4 list - [leo@linux-vps] pip3.4 uninstall "packagename" ### Python虚拟环境 ### -在Python中虚拟环境是一个你项目依赖的目录。隔离项目的一个好主意是使用不同的依赖。这可以让你不用sudo命令就能安装包。 +在Python中虚拟环境是一个放置你的项目的依赖环境的目录。这是一个将带有不同的依赖环境的项目隔离的好办法。它可以让你不用sudo命令就能安装包。 [leo@linux-vps] mkdir python3.4-flask [leo@linux-vps] cd python3.4-flask [leo@linux-vps python3.4-flask] pyvenv-3.4 venv -要创建虚拟环境你需要使用“pyvenv-3.4”命令。这会在venv文件夹的内部创建一个名为lib的目录,这里会安装项目所依赖的包。这里同样会创建一个bin文件夹容纳该环境下的pip和python可执行文件。 +要创建虚拟环境你需要使用“pyvenv-3.4”命令。上述命令会在venv文件夹的内部创建一个名为lib的目录,这里会安装项目所依赖的包。这里同样会创建一个bin文件夹容纳该环境下的pip和python可执行文件。 ### 为我们的Linux系统信息项目激活虚拟环境 ### @@ -74,21 +71,21 @@ Python有它自己的包管理去,与yum和apt-get相似。你将需要它来 ### 使用pip安装flask ### -让我们继续安装第一个模块flask框架,它可以处理路由和渲染我们app的模板。 +让我们继续安装第一个模块flask框架,它可以处理访问路由和渲染显示我们app的模板。 [leo@linux-vps python3.4-flask]pip3.4 install flask ### 在flask中创建第一个应用 ### -第一步:创建你app的目录 +####第一步:创建你app的目录 - [leo@linux-vps python3.4-flask] mkdir app - [leo@linux-vps python3.4-flask]mkdir app/static - [leo@linux-vps python3.4-flask]mkdir app/templates + [leo@linux-vps python3.4-flask] mkdir app + [leo@linux-vps python3.4-flask] mkdir app/static + [leo@linux-vps python3.4-flask] mkdir app/templates -在python3.4-flask文件家中创建一个一个名为app的文件夹,它包含了两个子文件夹“static”和“templates”。我们的Python脚本会在app文件夹,像css/js这类文件会在static文件夹,template文件夹会包含我们的html模板。 +在python3.4-flask文件夹中创建一个名为app的文件夹,它包含了两个子文件夹“static”和“templates”。我们的Python脚本会放在app文件夹,像css/js这类文件会在static文件夹,template文件夹会包含我们的html模板。 -第二步:在app文件夹内部创建一个初始化文件。 +####第二步:在app文件夹内部创建一个初始化文件 [leo@linux-vps python3.4-flask] vim app/_init_.py from flask import Flask @@ -96,7 +93,7 @@ Python有它自己的包管理去,与yum和apt-get相似。你将需要它来 app = Flask(__name__) from app import index -这个文件创建一个Flask的新的实例并加载我们存储在index.py文件中的python程序,这个文件我们之后会创建。 +这个文件会创建一个Flask的新的实例,并加载我们存储在index.py文件中的python程序——这个文件我们之后会创建。 [leo@linux-vps python3.4-flask]vim app/index.py from app import app @@ -110,7 +107,7 @@ Python有它自己的包管理去,与yum和apt-get相似。你将需要它来 return -flask中的路由由路由装饰器处理。这用于给函数绑定URL。 +flask中的访问路由通过“路由装饰器”处理。它用于将一个 URL 绑定到函数。 @app.route('/') @app.route('/index') @@ -123,7 +120,7 @@ flask中的路由由路由装饰器处理。这用于给函数绑定URL。 subprocess.Popen(['ls', ‘-l’],stdout=subprocess.PIPE,stderr=subprocess.PIPE) -stdout和stderr会相应地存储命令的输出和错误。你可以使用Popen的communicate方法来访问输出了。 +stdout和stderr会相应地存储命令的输出和错误。你可以使用Popen的communicate方法来访问输出。 out,error = cmd.communicate() @@ -133,7 +130,7 @@ stdout和stderr会相应地存储命令的输出和错误。你可以使用Popen 关于subprocess模块更多的信息会在教程的最后给出。 -第三步:创建一个html模板来显示我们命令的输出。 +####第三步:创建一个html模板来显示我们命令的输出。 要做到这个我们使用flask中的Jinja2模板引擎来为我们渲染。 @@ -162,31 +159,31 @@ stdout和stderr会相应地存储命令的输出和错误。你可以使用Popen {% endfor %} -Jinja2模板引擎允许你使用“{{ … }}”分隔符来打印结果,{% … %}来做循环和赋值。我使用“decode()”方法来格式化。 +Jinja2模板引擎允许你使用“{{ … }}”分隔符来输出结果,{% … %}来做循环和赋值。我使用“decode()”方法来格式化。 -第四步:运行app +####第四步:运行app [leo@linux-vps python3.4-flask]vim run.py from app import app app.debug = True app.run(host='174.140.165.231', port=80) -上面的代码会在debug模式下运行app。如果你不写IP地址和端口,默认则是localhost:5000。 +上面的代码会在debug模式下运行app。如果你不指定 IP 地址和端口,默认则是localhost:5000。 [leo@linux-vps python3.4-flask] chmod +x run.py [leo@linux-vps python3.4-flask] python3.4 run.py ![](http://techarena51.com/wp-content/uploads/2014/12/install-python3-flask.png) -我已经加了更多的带来来显示CPU、I/O和平均负载。 +我已经加了更多的代码来显示CPU、I/O和平均负载。 ![](http://techarena51.com/wp-content/uploads/2014/12/install-python3-flask-on-linux.png) -你可以在[这里][3]浏览代码。 +你可以在[这里][3]浏览完整的代码。 这是一个对flask的简短教程,我建议你阅读下面的教程和文档来更深入地了解。 -http://flask.pocoo.org/docs/0.10/quickstart/# +http://flask.pocoo.org/docs/0.10/quickstart/ https://docs.python.org/3.4/library/subprocess.html#popen-constructor @@ -198,7 +195,7 @@ via: http://techarena51.com/index.php/how-to-install-python-3-and-flask-on-linux 作者:[Leo G][a] 译者:[geekpi](https://github.com/gekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c9a41a4fb067d900bfd2bbc782f62e10efb6688d Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 12 Mar 2015 15:49:19 +0800 Subject: [PATCH 0249/2517] PUB:20141106 Tomahawk Music Player Returns With New Look, Features @H-mudcup --- ... Player Returns With New Look, Features.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) rename {translated/share => published}/20141106 Tomahawk Music Player Returns With New Look, Features.md (65%) diff --git a/translated/share/20141106 Tomahawk Music Player Returns With New Look, Features.md b/published/20141106 Tomahawk Music Player Returns With New Look, Features.md similarity index 65% rename from translated/share/20141106 Tomahawk Music Player Returns With New Look, Features.md rename to published/20141106 Tomahawk Music Player Returns With New Look, Features.md index 0194b88257..6a8b7496cb 100644 --- a/translated/share/20141106 Tomahawk Music Player Returns With New Look, Features.md +++ b/published/20141106 Tomahawk Music Player Returns With New Look, Features.md @@ -1,5 +1,4 @@ - -Tomahawk音乐播放器带着新形象、新功能回来了 +新面孔、新功能的 Tomahawk 音乐播放器 ================================================================================ **在悄无声息得过了一年之后,Tomahawk——音乐播放器中的瑞士军刀——带着值得歌颂的全新发行版回归了。 ** @@ -9,35 +8,35 @@ Tomahawk音乐播放器带着新形象、新功能回来了 ### Tomahawk——两个世界的极品 ### -Tomahawk嫁给了一个带有我们的“即时”现代文化的传统应用结构。它可以浏览和播放本地的音乐和Spotify、Grooveshark以及SoundCloud这类的线上音乐。在最新的发行版中,它把Google Play Music和Beats Music列入了它的名册。 +Tomahawk 将一个传统的应用结构与我们的“即时”现代文化相结合。它可以浏览和播放本地的音乐和Spotify、Grooveshark以及SoundCloud这类的线上音乐。在最新的发行版中,它把Google Play Music和Beats Music列入了它的名册。 这可能听着很繁复或令人困惑,但实际上它表现得出奇的好。 -若你想要播放一首歌,而且不介意它是从哪里来的,你只需告诉Tomahawk音乐的标题和作者,它就会自动从可获取的源里找出高品质版本的音乐——你不需要做任何事。 +若你想要播放一首歌,而且不介意它是从哪里来的,你只需告诉Tomahawk这个音乐的标题和作者,它就会自动从可获取的源里找出高品质版本的音乐——你不需要做任何事。 ![](http://i.imgur.com/nk5oixy.jpg) -这个应用还弄了一些附加的功能,比如EchoNest剖析,Last.fm建议,还有对Jabber的支持,这样你就能‘播放’朋友的音乐。它还有一个内置的信息服务,以便于你能和其他人快速的分享播放列表和音乐。 +这个应用还弄了一些附加的功能,比如EchoNest剖析,Last.fm建议,还有对Jabber的支持,这样你就能“播放”朋友的音乐。它还有一个内置的信息服务,以便于你能和其他人快速的分享播放列表和音乐。 ->“这种从根本上就与众不同的听音乐的方式,开启了前所未有的音乐的消费和分享体验”,项目的网站上这样写道。而且即便它如此独特,这也没有错。 +>“这种从根本上就与众不同的听音乐的方式,开启了前所未有的音乐的消费和分享体验”,该项目的网站上这样写道。而且即便它如此独特,这也没有错。 ![Tomahawk supports the Sound Menu](http://www.omgubuntu.co.uk/wp-content/uploads/2014/11/tomahawk-controllers.jpg) -支持声音菜单 +*支持声音菜单* ### Tomahawk0.8发行版的亮点 ### - 新的交互界面 - 对Beats Music的支持 - 对Google Play Music的支持(保存的和播放全部链接) -- 对拖拽iTunes,Spotify这类网站的链接的支持 +- 支持拖拽iTunes,Spotify这类网站的链接 - 正在播放的提示 - Android应用(测试版) - 收件箱的改进 ### 在Ubuntu上安装Tomahawk0.8 ### -作为一个流媒体音乐的大用户,我会在接下来的几天里体验一下这个应用软件,然后提供一个关于他的改变的更全面的赏析。与此同时,你也可以尝尝鲜。 +作为一个流媒体音乐的粉丝,我会在接下来的几天里体验一下这个应用软件,然后提供一个关于他的改变的更全面的赏析。与此同时,你也可以尝尝鲜。 在Ubuntu 14.04 LTS和Ubuntu 14.10上可以通过官方PPA获得Tomahawk。 @@ -47,7 +46,7 @@ Tomahawk嫁给了一个带有我们的“即时”现代文化的传统应用结 在官方项目网站上可以找的独立安装程序和更详细的信息。 -- [Visit the Official Tomahawk Website][1] +- [访问 Tomahawk 官网][1] -------------------------------------------------------------------------------- @@ -55,7 +54,7 @@ via: http://www.omgubuntu.co.uk/2014/11/tomahawk-media-player-returns-new-look-f 作者:[Joey-Elijah Sneddon][a] 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 424874e4a600f0c2acf8df947d1d69557c89fda4 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 12 Mar 2015 16:09:06 +0800 Subject: [PATCH 0250/2517] PUB:20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously @runningwater --- ...gle ISO to 20 USB Drives Simultaneously.md | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) rename {translated/share => published}/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md (59%) diff --git a/translated/share/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md b/published/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md similarity index 59% rename from translated/share/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md rename to published/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md index 098350741f..b9768d7148 100644 --- a/translated/share/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md +++ b/published/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md @@ -1,20 +1,20 @@ -支持同时把单个 ISO 文件写入 20 个 USB 驱动盘的应用程序 +MultiWriter:同时将 ISO 镜像并发写入 20 个 USB 启动盘 ================================================================================ -**我的问题是如何把一个Linux ISO 文件烧录到 17 个 USB 拇指驱动盘?** +**我的问题是如何把一个Linux ISO 文件烧录到 17 个 USB 启动盘?** -精通代码的会写一个 bash 脚本来自动化处理,而大部分的人会使用像 USB 启动盘创建器这样的图形用户界面工具来把 ISO 文件一个一个的烧录到驱动盘中。但剩下的还有一些人会很快得出结论,两种方法都不太理想。 +精通代码的人会写一个 bash 脚本来自动化处理,而大部分的人会使用像 USB 启动盘创建器这样的图形用户界面工具来把 ISO 文件一个、一个的烧录到驱动盘中。但剩下的还有一些人也许会很快得出结论,两种方法都不太理想。 ### 问题 > 解决 ### ![GNOME MultiWriter in action](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/gnome-multi-writer.jpg) -GNOME MultiWriter 在运行当中 +*GNOME MultiWriter 在运行当中* -Richard Hughes,一个 GNOME 开发者,也面临着类似的困境。他要创建一批预装操作系统的 USB 驱动盘,需要一个足够简单的工具,使得像他父亲这样的用户也能使用。 +Richard Hughes,一个 GNOME 开发者,也面临着类似的困境。他要创建一批预装操作系统的 USB 启动盘,需要一个足够简单的工具,使得像他父亲这样的用户也能使用。 他的反应是开发**品牌性的新应用程序**,使上面的两种方法合二为一,创造出易用的一款工具。 -它的名字就叫 “[GNOME MultiWriter][1]”。同时可以把单个的 ISO 或 IMG 文件写入多个 USB 驱动盘。 +它的名字就叫 “[GNOME MultiWriter][1]”,可以同时把单个的 ISO 或 IMG 文件写入多个 USB 驱动盘。 它不支持个性化自定义或命令行执行的功能,使用它就可以省掉浪费一下午的时间来对相同的操作的重复动作。 @@ -24,25 +24,25 @@ Richard Hughes,一个 GNOME 开发者,也面临着类似的困境。他要 ![The app can be installed on Ubuntu](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/mutli-writer-on-ubuntu.jpg) -该应用程序可以在 Ubuntu 上安装 +*该应用程序可以在 Ubuntu 上安装* -这款应用程序的定义使用场景很不错,正适合使用于预装正要发布的操作系统或 live 映像的 USB 棒上。 +这款应用程序的定义使用场景很不错,正适合使用于预装正要发布的操作系统或 live 映像的 USB 启动盘上。 -那就是说,任何人想要创建一个单独可启动的 USB 棒的话,也是一样的适用 - 因我用 Ubuntu 的内置磁盘创建工具来创建可引导的映像从来没有一次成功过的,所以这方案对我来说是个好消息! +那就是说,任何人想要创建一个单独可启动的 USB 启动盘的话,也是一样的适用 - 因我用 Ubuntu 的内置磁盘创建工具来创建可引导的映像从来没有一次成功过的,所以这方案对我来说是个好消息! -它的开发者 Hughes 说它**最高能支持20个 USB驱动盘**,每个盘的大小在 1GB 到 32GB之间。 +它的开发者 Hughes 说它**最高能支持20个 USB 启动盘**,每个盘的大小在 1GB 到 32GB之间。 -GNOME MultiWriter 不好的地方(到现在为止)就是它还没有一个完结、稳定的成品。它是能工作,但在早期的时候,还没有可安装的二进制版本或可添加到你庞大软件源的 PPA。 +GNOME MultiWriter 也有不好的地方(到现在为止)就是它还没有一个完结、稳定的成品。它是能工作,但在早期的时候,还没有可安装的二进制版本或可添加到你庞大软件源的 PPA。 如果您知道通常的 configure/make 的操作流程的话,可以获取其源码并随时都可以编译运行。在 Ubuntu14.10 系统上,你可能还需要首先安装以下软件包: sudo apt-get install gnome-common yelp-tools libcanberra-gtk3-dev libudisks2-dev gobject-introspection -如果您得到并运行起来,已经玩转的话,给我们分享下您的感受! +如果您可以运行起来,已经玩转的话,给我们分享下您的感受! 此项目托管在 GitHub 上,盼望对其提出问题缺陷和发起 pull 请求,在上面也可以找到压缩包下载,进行手动安装。 -- [Github 上的 GNOME MultiWriter][2] +- [Github 上的 GNOME MultiWriter][1] -------------------------------------------------------------------------------- @@ -50,10 +50,9 @@ via: http://www.omgubuntu.co.uk/2015/01/gnome-multiwriter-iso-usb-utility 作者:[Joey-Elijah Sneddon][a] 译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:https://github.com/hughsie/gnome-multi-writer/ -[2]:https://github.com/hughsie/gnome-multi-writer/ From ed1c45b4b8ca27423269b13c59bb4418571da4fb Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 12 Mar 2015 16:44:15 +0800 Subject: [PATCH 0251/2517] PUB:20141229 5 User Space Debugging Tools in Linux @mtunique --- ...9 5 User Space Debugging Tools in Linux.md | 102 +++++++++--------- 1 file changed, 54 insertions(+), 48 deletions(-) rename {translated/tech => published}/20141229 5 User Space Debugging Tools in Linux.md (63%) diff --git a/translated/tech/20141229 5 User Space Debugging Tools in Linux.md b/published/20141229 5 User Space Debugging Tools in Linux.md similarity index 63% rename from translated/tech/20141229 5 User Space Debugging Tools in Linux.md rename to published/20141229 5 User Space Debugging Tools in Linux.md index 7989758115..d3f572c516 100644 --- a/translated/tech/20141229 5 User Space Debugging Tools in Linux.md +++ b/published/20141229 5 User Space Debugging Tools in Linux.md @@ -1,9 +1,11 @@ -5 Linux下用户空间调试工具 +五个 Linux 下用户空间的调试工具 ================================================================================ -根据定义,调试工具是那些那些使我们能够监测、控制和纠正其他程序的程序。我们为什么应该用调试工具呢? 在有些情况下,运行一些程序的时候我们会被卡住,我们需要明白究竟发生了什么。 例如, 我们正在运行应用程序,它产生了一些错误消息。要修复这些错误,我们应该先找出为什么产生这些错误的消息和这些错误消息从哪里产生的。 一个应用程序可能突然挂起,我们必须了解其他什么进程同时在运行。我们可能还必须弄清楚进程'x'挂起的时候在做什么。为了剖析这些细节, 我们需要调试工具的帮助。有几个Linux下的用户空间调试工具和技术,他们用来分析用户空间问题相当有用。他们是: +根据定义,调试工具是那些那些使我们能够监测、控制和纠正其他程序的程序。我们为什么应该用调试工具呢? 在有些情况下,运行一些程序的时候我们会被卡住,我们需要明白究竟发生了什么。 例如,我们正在运行应用程序,它产生了一些错误消息。要修复这些错误,我们应该先找出为什么产生这些错误的消息和这些错误消息从哪里产生的。 一个应用程序可能突然挂起,我们必须了解其他什么进程同时在运行。我们可能还必须弄清楚某个进程挂起的时候在做什么。为了剖析这些细节, 我们需要调试工具的帮助。 + +有几个Linux下的用户空间调试工具和技术,它们用来分析用户空间的问题相当有用。它们是: - **'print' 语句** -- **查询 (/proc, /sys etc)** +- **查询 (/proc, /sys 等)** - **跟踪 (strace/ltrace)** - **Valgrind (memwatch)** - **GDB** @@ -12,42 +14,44 @@ ### 1.'print' 语句 ### -这是一个基本的原始的调试问题的方法。 我们可以在程序中插入print语句来了解控制流和变量值。 虽然这是一个简单的技术, 但它有一些缺点的。 程序需要进行编辑以添加'print'语句,然后不得不重新编译,重新运行来获得输出。 如果要调试的程序相当大,这是一个耗时的方法。 +这是一个基本的原始的调试问题的方法。 我们可以在程序中插入print语句来了解控制流和变量值。 虽然这是一个简单的技术, 但它有一些缺点。 程序需要进行编辑以添加'print'语句,然后必须重新编译,重新运行来获得输出。 如果要调试的程序相当大,这是一个耗时的方法。 ### 2. 查询 ### 在某些情况下,我们需要弄清楚在一个运行在内核中的进程的状态和内存映射。为了获得这些信息,我们不需要在内核中插入任何代码。 相反,可以用 /proc 文件系统。 -/proc 是一个伪文件系统,系统一起启动运行就收集着运行时系统的信息 (cpu信息, 内存容量 等)。 +/proc 是一个伪文件系统,系统一启动运行就收集着运行时系统的信息 (cpu信息, 内存容量等)。 ![output of 'ls /proc'](http://blog.linoxide.com/wp-content/uploads/2014/12/proc-output.png) -'ls /proc'的输出 + +*'ls /proc'的输出* 正如你看到的, 系统中运行的每一个进程在/proc文件系统中有一个以进程id命名的项。每个进程的细节信息可以在进程id对应的目录下的文件中获得。 ![output of 'ls /proc/pid'](http://blog.linoxide.com/wp-content/uploads/2014/12/proc-pid.png) -'ls /proc/pid'的输出 + +*'ls /proc/pid'的输出* 解释/proc文件系统内的所有条目超出了本文的范围。一些有用的列举如下: - /proc/cmdline -> 内核命令行 - /proc/cpuinfo -> 关于处理器的品牌,型号信息等 - /proc/filesystems -> 文件系统的内核支持的信息 -- /proc//cmdline -> 命令行参数传递到当前进程 -- /proc//mem -> 当前进程持有的内存 -- /proc//status -> 当前进程的状态 +- /proc/\/cmdline -> 命令行参数传递到当前进程 +- /proc/\/mem -> 当前进程持有的内存 +- /proc/\/status -> 当前进程的状态 ### 3. 跟踪 ### -strace的和ltrace是两个在Linux中用来追踪程序的执行细节的跟踪工具 +strace的和ltrace是两个在Linux中用来追踪程序的执行细节的跟踪工具。 #### strace: #### -strace拦截和记录系统调用并且由它来接收的信号。对于用户,它显示了系统调用,传递给它们的参数和返回值。 strace的可以附着到已在运行的进程中,或到一个新的进程。它作为一个针对开发者和系统管理员的诊断,调试工具是很有用的。它也可以用来当为一个通过跟踪不同的程序调用来了解系统的工具。这个工具的好处是不需要源代码和程序不需要重新编译。 +strace拦截和记录系统调用及其接收的信号。对于用户,它显示了系统调用、传递给它们的参数和返回值。strace的可以附着到已在运行的进程或一个新的进程。它作为一个针对开发者和系统管理员的诊断、调试工具是很有用的。它也可以用来当做一个通过跟踪不同的程序调用来了解系统的工具。这个工具的好处是不需要源代码,程序也不需要重新编译。 使用strace的基本语法是: -**strace command** +**strace 命令** strace有各种各样的参数。可以检查看strace的手册页来获得更多的细节。 @@ -58,11 +62,12 @@ strace的输出非常长,我们通常不会对显示的每一行都感兴趣 用'-o'选项,命令的输出可以被重定向到文件。 ![output of strace filtering only the open system call](http://blog.linoxide.com/wp-content/uploads/2014/12/strace-output.png) -strace过滤成只有系统调用的输出 + +*strace过滤成只有系统调用的输出* #### ltrace: #### -ltrace跟踪和记录一个进程的动态(运行时)库的调用和收到的信号。它也可以跟踪一个进程所作的系统调用。它的用法是类似与strace。 +ltrace跟踪和记录一个进程的动态(运行时)库的调用及其收到的信号。它也可以跟踪一个进程所作的系统调用。它的用法是类似与strace。 **ltrace command** @@ -73,25 +78,26 @@ ltrace跟踪和记录一个进程的动态(运行时)库的调用和收到 所有可用的选项请参阅ltrace手册。 ![output of ltrace capturing 'strcmp' library call](http://blog.linoxide.com/wp-content/uploads/2014/12/ltrace-output.png) -ltrace捕捉'STRCMP'库调用的输出 + +*ltrace捕捉'STRCMP'库调用的输出* ### 4. Valgrind ### -Valgrind是一套调试和分析工具。一个被广泛使用的工具,默认的工具被称为'Memcheck'的拦截malloc(),new(),free()和delete()调用的内存检测工具。换句话说,它在检测下面这些问题非常有用: +Valgrind是一套调试和分析工具。它的一个被广泛使用的默认工具——'Memcheck'——可以拦截malloc(),new(),free()和delete()调用。换句话说,它在检测下面这些问题非常有用: - 内存泄露 - 重释放 - 访问越界 - 使用未初始化的内存 -- 使用的内存已经被释放 等。 +- 使用已经被释放的内存等。 它直接通过可执行文件运行。 -Valgrind带有一些缺点。因为它增加了内存占用,可以减慢你的程序。它有时会造成误报和漏报。它不能检测出静态分配的数组的访问越界问题。 +Valgrind也有一些缺点,因为它增加了内存占用,会减慢你的程序。它有时会造成误报和漏报。它不能检测出静态分配的数组的访问越界问题。 -为了用他, 首先下载并安装在你的系统上。 ([Valgrind下载页面][1]). 可以使用操作系统上的包管理起来安装。 +为了使用它,首先请[下载][1]并安装在你的系统上。可以使用操作系统上的包管理器来安装。 -使用命令行安装涉及解压缩,解包下载的文件。 +使用命令行安装需要解压缩和解包下载的文件。 tar -xjvf valgring-x.y.z.tar.bz2 (where x.y.z is the version number you are trying to install) @@ -130,9 +136,10 @@ Valgrind带有一些缺点。因为它增加了内存占用,可以减慢你的 这是valgrind呈现错误的输出: ![output of valgrind showing heap block overrun and memory leak](http://blog.linoxide.com/wp-content/uploads/2014/12/Valgrind.png) -valgrind显示堆溢出和内存泄漏的输出 -正如我们在上面看到的消息,我们正在试图访问超出函数f分配的内存和分配的内存没有释放。 +*valgrind显示堆溢出和内存泄漏的输出* + +正如我们在上面看到的消息,我们正在试图访问函数f未分配的内存以及分配尚未释放的内存。 ### 5. GDB ### @@ -144,15 +151,15 @@ GDB是来自自由软件基金会的调试器。它对定位和修复代码中 - 检查所需信息 - 改变程序中的数据 等。 -你也可以附加一个崩溃的程序coredump到GDB并分析故障的原因。 +你也可以将一个崩溃的程序coredump附着到GDB并分析故障的原因。 GDB提供很多选项来调试程序。 然而,我们将介绍一些重要的选择,来感受如何开始使用GDB。 -如果你还没有安装GDB,可以在这里下载 [GDB官方网站][2]. +如果你还没有安装GDB,可以在这里下载:[GDB官方网站][2]。 #### 编译程序: #### -为了用GDB调试程序,必须使用gcc的'-g'选项进行编译。将以操作系统的本地格式产生调试信息,GDB利用这些信息来工作。 +为了用GDB调试程序,必须使用gcc的'-g'选项进行编译。这将以操作系统的本地格式产生调试信息,GDB利用这些信息来工作。 下面是一个简单的程序(example1.c)执行被零除用来显示GDB的用法: @@ -169,18 +176,20 @@ GDB提供很多选项来调试程序。 然而,我们将介绍一些重要的 } ![An example showing usage of gdb](http://blog.linoxide.com/wp-content/uploads/2014/12/gdb-example.png) -展示GDB用法的例子 + +*展示GDB用法的例子* #### 调用 GDB: #### 通过在命令行中执行'gdb'来启动gdb: ![invoking gdb](http://blog.linoxide.com/wp-content/uploads/2014/12/gdb.png) -调用 gdb -一旦调用, 它将等待终端命令并执行,直到退出。 +*调用 gdb* -如果一个进程已经在运行,你需要将GDB连接到它上面,可以通过指定进程ID来实现。假设程序已经崩溃,要分析问题的原因,则连接GDB到core文件。 +调用后, 它将等待终端命令并执行,直到退出。 + +如果一个进程已经在运行,你需要将GDB连接到它上面,可以通过指定进程ID来实现。假设程序已经崩溃,要分析问题的原因,则用GDB分析core文件。 #### 启动程序: #### @@ -188,7 +197,7 @@ GDB提供很多选项来调试程序。 然而,我们将介绍一些重要的 #### 给程序传参数: #### -使用'set args'给你的程序传参数,当程序下次运行时将获得参数。'show args'将显示传递给程序的参数。 +使用'set args'给你的程序传参数,当程序下次运行时将获得该参数。'show args'将显示传递给程序的参数。 #### 检查堆栈: #### @@ -202,13 +211,13 @@ GDB提供很多选项来调试程序。 然而,我们将介绍一些重要的 #### 检查数据: #### -程序的数据可以在里面GDB使用'print'命令进行检查。例如,如果'X'是调试程序内的变量,'print x'会打印x的值。 +程序的数据可以在里面GDB使用'print'命令进行检查。例如,如果'x'是调试程序内的变量,'print x'会打印x的值。 #### 检查源码: #### 源码可以在GDB中打印。默认情况下,'list'命令会打印10行代码。 -- **list **: 列出'linenum'行周外的源码 +- **list **: 列出'linenum'行周围的源码 - **list **: 从'function'开始列出源码 - **disas **: 显示该函数机器代码 @@ -217,11 +226,11 @@ GDB提供很多选项来调试程序。 然而,我们将介绍一些重要的 使用GDB,我们可以在必要的地方设置断点,观察点等来停止程序。 - **break **: 在'location'设置一个断点。当在程序执行到这里时断点将被击中,控制权被交给用户。 -- **watch **: 当'expr'被程序写而且它的值发生变化时GDB将停止 -- **catch **: 当'event'发生时GDB停止。 +- **watch **: 当'expr'被程序写入而且它的值发生变化时GDB将停止 +- **catch **: 当'event'发生时GDB停止 - **disable **: 禁用指定断点 - **enable **: 启用指定断点 -- **delete **: 删除 断点/观察点/捕获点。 如果没有传递参数默认操作是在所有的断点。 +- **delete **: 删除 断点/观察点/捕获点。 如果没有传递参数默认操作是在所有的断点 - **step**: 一步一步执行程序 - **continue**: 继续执行程序,直到执行完毕 @@ -232,21 +241,18 @@ GDB提供很多选项来调试程序。 然而,我们将介绍一些重要的 GDB还有更多的可用选项。里面GDB使用help选项了解更多详情。 ![getting help within gdb](http://blog.linoxide.com/wp-content/uploads/2014/12/gdb-help.png) -在GDB种获得帮助 + +*在GDB中获得帮助* ### 总结 ### -在这篇文章中,我们已经看到不同类型的Linux用户空间的调试工具。总结以上所有内容,这是些什么时候使用该什么的快速指南: +在这篇文章中,我们已经看到不同类型的Linux用户空间的调试工具。总结以上所有内容,如下是什么时候使用该什么的快速指南: -基本调试,获得关键变量 - print 语句 - -获取有关文件系统支持,可用内存,CPU,运行程序的内核状态等信息 - 查询 /proc 文件系统 - -最初的问题诊断,系统调用或库调用的相关问题,了解程序流程 – strace / ltrace - -应用程序内存空间的问题 – valgrind - -检查应用程序运行时的行为,分析应用程序崩溃 – gdb。 +- 基本调试,获得关键变量 - print 语句 +- 获取有关文件系统支持,可用内存,CPU,运行程序的内核状态等信息 - 查询 /proc 文件系统 +- 最初的问题诊断,系统调用或库调用的相关问题,了解程序流程 – strace / ltrace +- 应用程序内存空间的问题 – valgrind +- 检查应用程序运行时的行为,分析应用程序崩溃 – gdb -------------------------------------------------------------------------------- @@ -254,7 +260,7 @@ via: http://linoxide.com/linux-how-to/user-space-debugging-tools-linux/ 作者:[B N Poornima][a] 译者:[mtunique](https://github.com/mtunique) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f5a21bd49d810c9b76127e190fff8d28de622536 Mon Sep 17 00:00:00 2001 From: theo-l Date: Thu, 12 Mar 2015 15:03:52 -0300 Subject: [PATCH 0252/2517] translating --- ...10 How To Get Email Alerts for SSH Login on Linux Server.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md b/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md index 286c909768..4147d4bab5 100644 --- a/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md +++ b/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md @@ -1,3 +1,4 @@ +theo-l translating How To Get Email Alerts for SSH Login on Linux Server ================================================================================ ![](http://www.ehowstuff.com/wp-content/uploads/2015/03/fail2ban-security.jpg) @@ -56,4 +57,4 @@ via: http://www.ehowstuff.com/how-to-get-email-alerts-for-ssh-login-on-linux-ser 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.ehowstuff.com/author/mhstar/ \ No newline at end of file +[a]:http://www.ehowstuff.com/author/mhstar/ From e89e7c26b6c5938e7d9f05126cae502258443341 Mon Sep 17 00:00:00 2001 From: theo-l Date: Thu, 12 Mar 2015 18:17:05 -0300 Subject: [PATCH 0253/2517] translating --- ...10 How To Get Email Alerts for SSH Login on Linux Server.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md b/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md index 4147d4bab5..c153a57a88 100644 --- a/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md +++ b/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md @@ -1,11 +1,14 @@ theo-l translating How To Get Email Alerts for SSH Login on Linux Server +在Linux服务器上如何为SSH登陆获取Email警告 ================================================================================ ![](http://www.ehowstuff.com/wp-content/uploads/2015/03/fail2ban-security.jpg) Enable SSH server on a virtual private server (VPS) will expose the server to the internet and provide opportunities for hacking activities, especially when VPS still using root as a primary access. VPS should be configured with a email alert automatically to each successful login attempts via SSH server . VPS server owner shall be notified of any SSH server access log, such as who, when and which source IP address. This is an important security concern for server owners to protect the server from unknown login attempts. This is because if hackers use brute force to log into your VPS via ssh then it can be very dangerous. In this article, I will explain how to set up an email alert to all SSH login users on linux CentOS 6, CentOS 7, RHEL 6 and RHEL 7. +让SSH服务器在虚拟私有服务器(VPS)上生效会使得该服务器暴露到互联网中并为黑客活动提供了机会,尤其时当VPS还将root作为主要访问时. VPS应该为每次通过SSH服务器成功登陆尝试配置一个自动的email警告. VPS的服务器所有者应该在任何的SSH服务器访问时得到通知,例如登陆者,登陆时间以及IP地址等信息.这是一个对于服务器拥有者保护服务器避免未知登陆尝试的非常重要的安全关注点.因为如果黑客使用暴力破解方式通过SSH来登陆你的VPS,那么后果很严重.在本文中,我会解释如何在CentOS 6, CentOS 7, RHEL 6 和 RHEL 7上为所有的SSH用户登陆设置一个email警告. 1. Login to your server as root user : +1. 使用root用户登陆到你的服务器: 2. Configure at alert from source global definitions (/etc/bashrc). This will enabled for root and normal users : From 8703f2f61725878cb9742a4ac4fc099ac9811d6f Mon Sep 17 00:00:00 2001 From: theo-l Date: Thu, 12 Mar 2015 21:22:46 -0300 Subject: [PATCH 0254/2517] translated --- ...il Alerts for SSH Login on Linux Server.md | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) rename {sources => translated}/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md (64%) diff --git a/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md b/translated/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md similarity index 64% rename from sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md rename to translated/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md index c153a57a88..7c7e556f31 100644 --- a/sources/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md +++ b/translated/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md @@ -1,32 +1,27 @@ -theo-l translating -How To Get Email Alerts for SSH Login on Linux Server 在Linux服务器上如何为SSH登陆获取Email警告 ================================================================================ ![](http://www.ehowstuff.com/wp-content/uploads/2015/03/fail2ban-security.jpg) -Enable SSH server on a virtual private server (VPS) will expose the server to the internet and provide opportunities for hacking activities, especially when VPS still using root as a primary access. VPS should be configured with a email alert automatically to each successful login attempts via SSH server . VPS server owner shall be notified of any SSH server access log, such as who, when and which source IP address. This is an important security concern for server owners to protect the server from unknown login attempts. This is because if hackers use brute force to log into your VPS via ssh then it can be very dangerous. In this article, I will explain how to set up an email alert to all SSH login users on linux CentOS 6, CentOS 7, RHEL 6 and RHEL 7. 让SSH服务器在虚拟私有服务器(VPS)上生效会使得该服务器暴露到互联网中并为黑客活动提供了机会,尤其时当VPS还将root作为主要访问时. VPS应该为每次通过SSH服务器成功登陆尝试配置一个自动的email警告. VPS的服务器所有者应该在任何的SSH服务器访问时得到通知,例如登陆者,登陆时间以及IP地址等信息.这是一个对于服务器拥有者保护服务器避免未知登陆尝试的非常重要的安全关注点.因为如果黑客使用暴力破解方式通过SSH来登陆你的VPS,那么后果很严重.在本文中,我会解释如何在CentOS 6, CentOS 7, RHEL 6 和 RHEL 7上为所有的SSH用户登陆设置一个email警告. -1. Login to your server as root user : 1. 使用root用户登陆到你的服务器: -2. Configure at alert from source global definitions (/etc/bashrc). This will enabled for root and normal users : - +2. 在全局源定义处配置警告(/etc/bashrc),这样就会对跟用户以及普通用户都生效: [root@vps ~]# vi /etc/bashrc -Add the following at the bottom of the files. +将下面的内容加入到上述文件的尾部。 echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com -3. Optionally you can enable alert for root only : +3.你也可以选择性地让警告只对跟用户生效: [root@vps ~]# vi .bashrc -Add the following at the bottom of /root/.bashrc : +将下面的内容添加到/root/.bashrc的为尾部: echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com -Full Configuration file example : +整个配置文件样例: # .bashrc @@ -42,11 +37,11 @@ Full Configuration file example : fi echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com -4. Optionally you can enable alert for specify normal user (e.g skytech ) : +4.你也可以选择性地让警告只对特定的普通用户生效(例如 skytech): [root@vps ~]# vi /home/skytech/.bashrc -Add the following at the bottom of /home/skytech/.bashrc : +将下面的内容加入到/home/skytech/.bashrc文件尾部: echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com @@ -55,7 +50,7 @@ Add the following at the bottom of /home/skytech/.bashrc : via: http://www.ehowstuff.com/how-to-get-email-alerts-for-ssh-login-on-linux-server/ 作者:[skytech][a] -译者:[译者ID](https://github.com/译者ID) +译者:[theo-l](https://github.com/theo-l) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From cd7803df524bb40b91d0156102660b6901f19c69 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Fri, 13 Mar 2015 09:03:07 +0800 Subject: [PATCH 0255/2517] translating --- ... Share Folders On Local Network Between Ubuntu And Windows.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md b/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md index d0f6d9f1df..28c93ea5fd 100644 --- a/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md +++ b/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md @@ -1,3 +1,4 @@ +[translating by KayGuoWhu] Share Folders On Local Network Between Ubuntu And Windows ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_windows.jpeg) From caaee827dde07189d55eab7ff995ea396b155ab7 Mon Sep 17 00:00:00 2001 From: theo-l Date: Thu, 12 Mar 2015 22:29:33 -0300 Subject: [PATCH 0256/2517] translating --- ...9 15 Interview Questions on Linux 'ls ' Command--Part 1.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md b/sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md index 29804f5874..fd0a8d99ee 100644 --- a/sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md +++ b/sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md @@ -1,3 +1,5 @@ +theo-l translating + 15 Interview Questions on Linux “ls” Command – Part 1 ================================================================================ The listing command in UNIX and UNIX like operating System ‘ls‘ is one of the most basic and widely used utility in command-line. It is POSIX compliant utility available for GNU coreutils and BSD variants. The ‘ls’ command can be used with a variety of options to get desired results. This article aims at deep insight of file listing command in Linux with relevant examples. @@ -184,4 +186,4 @@ via: http://www.tecmint.com/ls-command-interview-questions/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/ls-interview-questions/ -[2]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ \ No newline at end of file +[2]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ From 20fdbd3e069ac8df674ef669c420ca6db60c6d73 Mon Sep 17 00:00:00 2001 From: LouisWei Date: Fri, 13 Mar 2015 13:31:44 +0800 Subject: [PATCH 0257/2517] wi-cuckoo tranlating --- ...Windows SSH Client Tools To Connect To Your Linux Server.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md b/sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md index 550d373d65..5760b5aaa5 100644 --- a/sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md +++ b/sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md @@ -1,3 +1,4 @@ +wi-cuckoo translating LLAP List Of Free Windows SSH Client Tools To Connect To Your Linux Server ================================================================================ You have Windows as operating system and you need to connect to Linux server to transfer files from Linux to Windows and inversely. So you need to have Secure Shell known as SSH. In fact, SSH is a network protocol which enables you to connect to Linux and Unix servers over the network. It uses public key cryptography to authenticate the remote computer. You can use SSH by several ways, either by using it automatically or by using a password authentication to log in. @@ -78,4 +79,4 @@ via: https://www.unixmen.com/list-free-windows-ssh-client-tools-connect-linux-se [2]:http://www.bitvise.com/download-area [3]:http://mobaxterm.mobatek.net/download.html [4]:http://www.dameware.com/downloads/registration.aspx?productType=ssh&AppID=17471&CampaignID=70150000000PcNM -[5]:http://cygwin.com/packages/ \ No newline at end of file +[5]:http://cygwin.com/packages/ From b33cbc78e7a344dbb38d03ada23f6963393c5fda Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 13 Mar 2015 14:46:47 +0800 Subject: [PATCH 0258/2517] PUB:20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script @geekpi --- ...o get the process ID (PID) of a shell script.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md (74%) diff --git a/translated/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md b/published/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md similarity index 74% rename from translated/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md rename to published/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md index 760757a712..0e24fa1fb1 100644 --- a/translated/tech/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md +++ b/published/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md @@ -1,12 +1,12 @@ -Linux有问必答:如何在脚本中获取进程ID(PID) +Linux有问必答:如何在脚本中获取进程ID(PID) ================================================================================ -> **提问**: 我想要知道运行中脚本subshell的进程id。我该如何在shell脚本中得到PID。 +> **提问**: 我想要知道运行中脚本子shell的进程id。我该如何在shell脚本中得到PID。 -当我在执行shell脚本时,它会启动一个叫subshell的进程。作为主shell的子进程,subshell将shell脚本中的命令作为批处理运行(因此称为“批处理进程”)。 +当我在执行shell脚本时,它会启动一个叫子shell的进程。作为主shell的子进程,子shell将shell脚本中的命令作为批处理运行(因此称为“批处理进程”)。 -在某些情况下,你也许想要知道运行中的subshell的PID。这个PID信息可以在不同的情况下使用。比如,你可以使用shell脚本的PID在/tmp下创建一个唯一的临时文件。有时侯脚本需要检测所有运行的进程,它可以从进程列表中排除自身的subshell。 +在某些情况下,你也许想要知道运行中的子shell的PID。这个PID信息可以在不同的情况下使用。比如,你可以使用shell脚本的PID在/tmp下创建一个唯一的临时文件。有时侯脚本需要检测所有运行的进程,它可以从进程列表中排除自身的子shell。 -在bash中,**subshell进程的PID**存储在一个特殊的变量‘$$’中。这个变量只读,你不可以在脚本中修改它。比如: +在bash中,**子shell进程的PID**存储在一个特殊的变量‘$$’中。这个变量只读,你不可以在脚本中修改它。比如: #!/bin/bash @@ -16,7 +16,7 @@ Linux有问必答:如何在脚本中获取进程ID(PID) PID of this script: 6583 -除了$$, bash shell还会导出其他的只读变量。比如,PPID存储subshell父进程的ID(也就是主shell)。UID存储了执行这个脚本的当前用户ID。比如: +除了$$, bash shell还会导出其他的只读变量。比如,PPID存储子shell父进程的ID(也就是主shell)。UID存储了执行这个脚本的当前用户ID。比如: #!/bin/bash @@ -43,6 +43,6 @@ Linux有问必答:如何在脚本中获取进程ID(PID) via: http://ask.xmodulo.com/process-id-pid-shell-script.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9f9b54e0714edac8ea7dd75a31995431a592dbc9 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 14 Mar 2015 06:07:15 -0300 Subject: [PATCH 0259/2517] transalted --- ...uestions on Linux 'ls ' Command--Part 1.md | 189 ------------------ ...uestions on Linux 'ls ' Command--Part 1.md | 183 +++++++++++++++++ 2 files changed, 183 insertions(+), 189 deletions(-) delete mode 100644 sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md create mode 100644 translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md diff --git a/sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md b/sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md deleted file mode 100644 index fd0a8d99ee..0000000000 --- a/sources/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md +++ /dev/null @@ -1,189 +0,0 @@ -theo-l translating - -15 Interview Questions on Linux “ls” Command – Part 1 -================================================================================ -The listing command in UNIX and UNIX like operating System ‘ls‘ is one of the most basic and widely used utility in command-line. It is POSIX compliant utility available for GNU coreutils and BSD variants. The ‘ls’ command can be used with a variety of options to get desired results. This article aims at deep insight of file listing command in Linux with relevant examples. - -![15 ls Command Questions](http://www.tecmint.com/wp-content/uploads/2014/09/ls-Command-Questions.png) -15 ls Command Questions - -### 1. How will you List files from a directory? ### - -Ans: The Linux file listing command ‘ls‘ comes to rescue here. - - # ls - -![List Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-files.gif) -List Files - -Alternatively, we can use ‘echo‘ command to list files within a directory in association with wildcard (*). - - # echo * - -![List All Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-files.gif) -List All Files - -### 2. How will you list all the directories only using echo command? ### - - # echo */ - -![List All Directories](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-directories.gif) -List All Directories - -### 3. How will you list all the files within a directory including hidden files aka (.) dot files? ### - -Ans: We need to use option ‘-a‘ (list hidden files) with command ‘ls‘. - - # ls -a - -![List All Hidden Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-hidden-files.gif) -List All Hidden Files - -### 4. How do you list all the files within a directory including hidden files, but do not list implied ‘.’ and ‘..’? ### - -Ans: We need to use option ‘-A‘ (do not list implied . and ..) with command ‘ls‘. - - # ls -A - -![Do Not List Implied](http://www.tecmint.com/wp-content/uploads/2014/09/Do-not-list-Implied.gif) -Do Not List Implied - -### 5. How will you print the content of a directory in long format listing? ### - -Ans: We need to use option ‘l‘ (long format) with command ‘ls‘. - - # ls -l - -![List Files Long](http://www.tecmint.com/wp-content/uploads/2014/09/list-files-long.gif) -List Files Long - -In the above example, the output seems like. - - drwxr-xr-x 5 avi tecmint 4096 Sep 30 11:31 Binary - -Here, drwxr-xr-x is file permission for owner, group and world. Owner has Read(r), Write(w) and Execute(x) permission. The group to which this file belongs has Read(r) and Execute(x) permission but not Write(w) permission, same permission implies for the world that have access to this file. - -- The Initial ‘d‘ means its a Directory. -- Number ‘5‘ represents Symbolic Link. -- The File Binary belongs to user avi and group tecmint. -- Sep 30 11:31 represents the date and time it was last modified. - -### 6. You are supposed to print the content of directory in long format listing, showing hidden/dot files. How will you achieve this? ### - -Ans: We need to use option ‘-a‘ (list hidden files) and ‘-l‘ (long listing) together with command ‘ls‘. - - # ls -la - -![Print Content of Directory](http://www.tecmint.com/wp-content/uploads/2014/09/Print-Content-of-Directory.gif) -Print Content of Directory - -Alternatively We can use option ‘-A‘ and ‘-l‘ with ‘ls‘ command, if we do not want to list implied ‘.’ and ‘..’. - - # ls -lA - -### 7. How will you figure out the author of each file? ### - -Ans: We need to use option ‘–author‘ along with option ‘-l‘ to print the author name of each file. - - # ls --author -l - -![List Author Files](http://www.tecmint.com/wp-content/uploads/2014/09/List-Author-Files.gif) -List Author Files - -### 8. How will you print escape for non-graphic character? ### - -Ans: We just need to use option ‘-b‘ to print escape for non-graphic character. - - # ls -b - -![Print Escape Character](http://www.tecmint.com/wp-content/uploads/2014/09/Print-Escape-Character.gif) - -### 9. List the size of files and folders in desired scale format. How will you achieve this? ### - -Ans: Here option ‘–block-size=scale‘ along with option ‘-l‘ needs to be used. We need to remove ‘scale’ in the example with the desired scale viz M, K, etc. - - # ls --block-size=M -l - # ls --block-size=K -l - -![List File Scale Format](http://www.tecmint.com/wp-content/uploads/2014/09/List-File-Scale-Format.gif) -List File Scale Format - -### 10. List the files within a directory, but don’t show the backup files, i.e., those files that end with ~. ### - -Ans: Here option ‘-B‘ (do not list implied entries ending with ~) comes to rescue. - - # ls -B - -![List File Without Backup](http://www.tecmint.com/wp-content/uploads/2014/09/List-File-Without-Backup.gif) -List File Without Backup - -### 11. Sort all the files within a directory by name and show associated last modification information. ### - -Ans: We need to use option ‘-c‘ and option ‘-l‘ with command ls to fulfil the need as suggested above. - - # ls -cl - -![Sort Files](http://www.tecmint.com/wp-content/uploads/2014/09/Sort-Files.gif) -Sort Files - -### 12. Sort all the files within a directory by modification time and show associated information. ### - -Ans: We need to use three options together i.e., ‘-l‘, ‘-t‘ and ‘-c‘ with command ls to sort files by modification time, newest first. - - # ls -ltc - -![Sort Files by Modification](http://www.tecmint.com/wp-content/uploads/2014/09/Sort-Files-by-Modification.gif) -Sort Files by Modification - -### 13. How will you control the output of ‘ls’ command to be colorful or no-color? ### - -Ans: We need to use option ‘–color=parameter‘. The parameter to be used with color option are ‘auto’, ‘always’ and ‘never’ which are self explanatory. - - # ls --color=never - # ls --color=auto - # ls --color=always - -![ls Colorful Output](http://www.tecmint.com/wp-content/uploads/2014/09/ls-colorful-output.gif) -ls Colorful Output - -### 14. You are supposed to list directory entries themselves, not their contents. What will you do? ### - -Ans: Here the option ‘-d‘ comes handy. - - # ls -d - -![List Directory Entries](http://www.tecmint.com/wp-content/uploads/2014/09/List-Directory-Entries.gif) -List Directory Entries - -### 15. Create an alias for long format listing “ls -l” as “ll” and output the result to a file and not standard output. ### - -Ans: Here in the above scenario, we need to add alias to .bashrc file and then use redirect operator to write the output to file and not standard output. We will be using editor nano. - - # ls -a - # nano .bashrc - # ll >> ll.txt - # nano ll.txt - -![Create Alias for ls command](http://www.tecmint.com/wp-content/uploads/2014/09/Create-ls-Alias.gif) -Create Alias for ls command - -That’s all for now. Don’t forget to provide us with your valuable feedback in the comments below. I’ll be here again with another interesting article soon. Till then stay tuned and connected. - -### Real Also: ### - -- [10 ‘ls’ Command Interview Questions – Part 2][1] -- [15 Basic ‘ls’ Commands in Linux][2] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/ls-command-interview-questions/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/ls-interview-questions/ -[2]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ diff --git a/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md b/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md new file mode 100644 index 0000000000..5d72d1f9ca --- /dev/null +++ b/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md @@ -0,0 +1,183 @@ +关于linux中的“ls”命令的15个面试问题 - 第一部分 +================================================================================ +Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使用的最广泛的命令行中工具之一。 +它是一个在GNU基本工具集以及BSD各种变体上可用的与POSIX兼容的工具。 +“ls”命令可以通过与大量的选项一起使用来达到想要的结果。 +这篇文章的目的在于通过相关的样例来深入讨论文件列表命令。 + +![15 ls Command Questions](http://www.tecmint.com/wp-content/uploads/2014/09/ls-Command-Questions.png) +15个“ls”命令问题。 + +### 1. 你会如何从目录中列出文件?### + +答:使用linux文件列表命令“ls”驾到拯救。 + + # ls + +![List Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-files.gif) +列出文件 + +同时,我们也可以使用“echo(打印)”命令与一个通配符(*)相关联的方式在目录中列出其中的所有文件。 + # echo * + +![List All Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-files.gif) +列出所有的文件。 + +### 2. 你会如何只通过使用echo命令来列出目录中的所有文件?### + # echo */ + +![List All Directories](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-directories.gif) +列出所有的目录 + +### 3. 你会怎样列出一个目录中的所有文件, 包括隐藏的dot文件?### + +答:我们需要将“-a”选项与“ls”命令一起使用。 + # ls -a + +![List All Hidden Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-hidden-files.gif) +列出所有的隐藏文件。 + +### 4. 如何列出目录中除了 “当前目录暗喻(.)”和“父目录暗喻(..)”之外的所有文件,包括隐藏文件?### + +答: 我们需要将“-A”选项与“ls”命令一起使用 + # ls -A + +![Do Not List Implied](http://www.tecmint.com/wp-content/uploads/2014/09/Do-not-list-Implied.gif) +别列出暗喻文件。 + +### 5. 如何将当前目录中的内容使用长格式打印列表?### + +答: 我们需要将“-l”选项与“ls”命令一起使用。 + # ls -l + +![List Files Long](http://www.tecmint.com/wp-content/uploads/2014/09/list-files-long.gif) +列出文件的长格式。 + +上面的样例中,其输出结果看起来向下面这样。 + + drwxr-xr-x 5 avi tecmint 4096 Sep 30 11:31 Binary + +上面的drwxr-xr-x 是文件的权限,分别代表了文件所有者,组以及对整个世界。 所有者具有读(r),写(w)以及执行(x)等权限。 该文件所属组具有读(r)和执行(x)但是没有写的权限,相同的权限预示着 +对于整个世界的其他可以访问该文件的用户。 + +- 开头的‘d’意味着这是一个目录 +- 数字'5'表示符号链接 +- 文件 Binary归属于用户 “avi”以及用户组 "tecmint" +- Sep 30 11:31 表示文件最后一次的访问日期与时间。 + +### 6. 假如让你来将目录中的内容以长格式列表打印,并且显示出隐藏的“点文件”,你会如何实现?### + +答: 我们需要同时将"-a"和"-l"选项与“ls”命令一起使用。 + + # ls -la + +![Print Content of Directory](http://www.tecmint.com/wp-content/uploads/2014/09/Print-Content-of-Directory.gif) +打印目录内容 + +同时,如果我们不想列出“当前目录暗喻”和"父目录暗喻",可以将“-A”和“-l”选项同“ls”命令一起使用。 + # ls -lA + +### 7. 如何找到每个文件的创建者?### + +答: 我们需要结合 “--author”和 "-l"选项来打印出每个文件的创建者。 + # ls --author -l + +![List Author Files](http://www.tecmint.com/wp-content/uploads/2014/09/List-Author-Files.gif) +列出文件创建者。 + +### 8. 如何对非显示字符进行转义打印?### + +答:我们只需要使用“-b”选项来对非显示字符进行转义打印 + + # ls -b + +![Print Escape Character](http://www.tecmint.com/wp-content/uploads/2014/09/Print-Escape-Character.gif) + +### 9. 指定特定的单位格式来列出文件和目录的大小,你会如何实现?### +答: 在此可以同时使用选项“-block-size=scale”和“-l”,但是我们需要用特定的单位如M,K等来替换‘scale’。 + + # ls --block-size=M -l + # ls --block-size=K -l + +![List File Scale Format](http://www.tecmint.com/wp-content/uploads/2014/09/List-File-Scale-Format.gif) +列出文件大小单位格式。 + +### 10. 列出目录中的非备份文件,也就是那些文件名以‘~’结尾的文件### + +答: 选项‘-B’赶来救驾。 + + # ls -B + +![List File Without Backup](http://www.tecmint.com/wp-content/uploads/2014/09/List-File-Without-Backup.gif) +列出非备份文件 + +### 11. 将目录中的所有文件按照名称进行排序并与最后修改时间信息进行关联显示### + +答: 为了实现这个需求,我们需要同时将“-c”和"-l"选项与命令一起使用。 + + # ls -cl + +![Sort Files](http://www.tecmint.com/wp-content/uploads/2014/09/Sort-Files.gif) +文件排序 + +### 12. 将目录中的文件按照修改时间进行排序,并显示相关联的信息。### + +答: 我们需要同时使用3个选项--'-l','-t','-c'--与命令‘ls’一起使用来对文件使用修改时间排序,最新的修改时间排在最前。 + + # ls -ltc + +![Sort Files by Modification](http://www.tecmint.com/wp-content/uploads/2014/09/Sort-Files-by-Modification.gif) +按照修改时间对文件排序。 + +### 13. 如何控制‘ls’命令的输出颜色的有无?### + +答: 需要使用选项‘--color=parameter’,parameter参数值具有三种不同值,“auto(自动)”,“always(一直)”,“never(无色)”。 + + # ls --color=never + # ls --color=auto + # ls --color=always + +![ls Colorful Output](http://www.tecmint.com/wp-content/uploads/2014/09/ls-colorful-output.gif) +ls的输出颜色 + +### 14. 假如只需要列出目录本身,而不是目录的内容,你会如何做?### + +答:在此“-d”选项就会显得很顺手。 + + # ls -d + +![List Directory Entries](http://www.tecmint.com/wp-content/uploads/2014/09/List-Directory-Entries.gif) +列出目录本身 + +### 15. 为长格式列表命令"ls -l"创建别名“ll”,并将其结果输出到一个文件而不是标准输出中。### + +答:在上述的这个场景中,我们需要将别名添加到.bashrc文件中,然后使用重定向操作符将输出写入到文件而不是标准输出中。我们将会使用编辑器nano。 + + # ls -a + # nano .bashrc + # ll >> ll.txt + # nano ll.txt + +![Create Alias for ls command](http://www.tecmint.com/wp-content/uploads/2014/09/Create-ls-Alias.gif) +为ls命令创建别名。 + +先到此为止,别忘了在下面的评论中提出你们的宝贵意见,我会再次带着另外的有趣的文章在此闪亮登场。 + +### 参考阅读:### + +- [10 个‘ls’命令的面试问题-第二部分][1] +- [Linux中15个基础的'ls'命令][2] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/ls-command-interview-questions/ + +作者:[Avishek Kumar][a] +译者:[theo-l](https://github.com/theo-l) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/ls-interview-questions/ +[2]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ From 260c255e8d73781c4a93ade527e7ad528637fef2 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 14 Mar 2015 06:17:31 -0300 Subject: [PATCH 0260/2517] updated --- ...9 15 Interview Questions on Linux 'ls ' Command--Part 1.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md b/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md index 5d72d1f9ca..60d41dd161 100644 --- a/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md +++ b/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md @@ -24,6 +24,7 @@ Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使 列出所有的文件。 ### 2. 你会如何只通过使用echo命令来列出目录中的所有文件?### + # echo */ ![List All Directories](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-directories.gif) @@ -32,6 +33,7 @@ Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使 ### 3. 你会怎样列出一个目录中的所有文件, 包括隐藏的dot文件?### 答:我们需要将“-a”选项与“ls”命令一起使用。 + # ls -a ![List All Hidden Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-hidden-files.gif) @@ -40,6 +42,7 @@ Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使 ### 4. 如何列出目录中除了 “当前目录暗喻(.)”和“父目录暗喻(..)”之外的所有文件,包括隐藏文件?### 答: 我们需要将“-A”选项与“ls”命令一起使用 + # ls -A ![Do Not List Implied](http://www.tecmint.com/wp-content/uploads/2014/09/Do-not-list-Implied.gif) @@ -48,6 +51,7 @@ Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使 ### 5. 如何将当前目录中的内容使用长格式打印列表?### 答: 我们需要将“-l”选项与“ls”命令一起使用。 + # ls -l ![List Files Long](http://www.tecmint.com/wp-content/uploads/2014/09/list-files-long.gif) From 5b259482011b6109713392baeb349a130614e5bb Mon Sep 17 00:00:00 2001 From: theo-L Date: Sat, 14 Mar 2015 06:20:16 -0300 Subject: [PATCH 0261/2517] Update 20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md --- ...09 15 Interview Questions on Linux 'ls ' Command--Part 1.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md b/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md index 60d41dd161..77e42ff9e9 100644 --- a/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md +++ b/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md @@ -18,6 +18,7 @@ Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使 列出文件 同时,我们也可以使用“echo(打印)”命令与一个通配符(*)相关联的方式在目录中列出其中的所有文件。 + # echo * ![List All Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-files.gif) @@ -79,11 +80,13 @@ Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使 打印目录内容 同时,如果我们不想列出“当前目录暗喻”和"父目录暗喻",可以将“-A”和“-l”选项同“ls”命令一起使用。 + # ls -lA ### 7. 如何找到每个文件的创建者?### 答: 我们需要结合 “--author”和 "-l"选项来打印出每个文件的创建者。 + # ls --author -l ![List Author Files](http://www.tecmint.com/wp-content/uploads/2014/09/List-Author-Files.gif) From 424be6472986610dc725ed69e2e9442458a4b21b Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 14 Mar 2015 06:27:51 -0300 Subject: [PATCH 0262/2517] theo-l translating --- ...ls' Command Interview Questions--Part 2.md | 6 ++- ...15 Basic 'ls' Command Examples in Linux.md | 39 ++++++++++--------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md b/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md index bd9a956d12..3e185fe7e1 100644 --- a/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md +++ b/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md @@ -1,3 +1,5 @@ +theo-l translating + 10 Useful ‘ls’ Command Interview Questions – Part 2 ================================================================================ Continuing the legacy of ls command here is the second interview article on Listing command. The first article of the series was highly appreciated by the Tecmint Community. If you’ve missed the first part of this series you may like to visit at: @@ -158,10 +160,10 @@ That’s all for now. We will be coming up with the next part of this article se via: http://www.tecmint.com/ls-interview-questions/ 作者:[Ravi Saive][a] -译者:[译者ID](https://github.com/译者ID) +译者:[theo-l](https://github.com/theo-l) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/admin/ -[1]:http://www.tecmint.com/ls-command-interview-questions/ \ No newline at end of file +[1]:http://www.tecmint.com/ls-command-interview-questions/ diff --git a/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md b/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md index d51dce8f75..f02c7daa58 100644 --- a/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md +++ b/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md @@ -1,3 +1,4 @@ +theo-l translating Translating by ZTinoZ 15 Basic ‘ls’ Command Examples in Linux ================================================================================ @@ -11,7 +12,7 @@ Linux ls Command ls with no option list files and directories in bare format where we won’t be able to view details like file types, size, modified date and time, permission and links etc. # ls - + 0001.pcap Desktop Downloads index.html install.log.syslog Pictures Templates anaconda-ks.cfg Documents fbcmd_update.php install.log Music Public Videos @@ -20,7 +21,7 @@ ls with no option list files and directories in bare format where we won’t be Here, ls -l (-l is character not one) shows file or directory, size, modified date and time, file or folder name and owner of file and it’s permission. # ls -l - + total 176 -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap -rw-------. 1 root root 1586 Jul 31 02:17 anaconda-ks.cfg @@ -42,7 +43,7 @@ Here, ls -l (-l is character not one) shows file or directory, size, modified da List all files including hidden file starting with ‘.‘. # ls -a - + . .bashrc Documents .gconfd install.log .nautilus .pulse-cookie .. .cache Downloads .gnome2 install.log.syslog .netstat.swp .recently-used.xbel 0001.pcap .config .elinks .gnome2_private .kde .opera .spice-vdagent @@ -56,7 +57,7 @@ List all files including hidden file starting with ‘.‘. With combination of -lh option, shows sizes in human readable format. # ls -lh - + total 176K -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap -rw-------. 1 root root 1.6K Jul 31 02:17 anaconda-ks.cfg @@ -78,7 +79,7 @@ With combination of -lh option, shows sizes in human readable format. Using -F option with ls command, will add the ‘/’ Character at the end each directory. # ls -F - + 0001.pcap Desktop/ Downloads/ index.html install.log.syslog Pictures/ Templates/ anaconda-ks.cfg Documents/ fbcmd_update.php install.log Music/ Public/ Videos/ @@ -87,7 +88,7 @@ Using -F option with ls command, will add the ‘/’ Character at the end each The following command with ls -r option display files and directories in reverse order. # ls -r - + Videos Public Music install.log fbcmd_update.php Documents anaconda-ks.cfg Templates Pictures install.log.syslog index.html Downloads Desktop 0001.pcap @@ -96,21 +97,21 @@ The following command with ls -r option display files and directories in reverse ls -R option will list very long listing directory trees. See an example of output of the command. # ls -R - + total 1384 -rw-------. 1 root root 33408 Aug 8 17:25 anaconda.log -rw-------. 1 root root 30508 Aug 8 17:25 anaconda.program.log - + ./httpd: total 132 -rw-r--r-- 1 root root 0 Aug 19 03:14 access_log -rw-r--r--. 1 root root 61916 Aug 10 17:55 access_log-20120812 - + ./lighttpd: total 68 -rw-r--r-- 1 lighttpd lighttpd 7858 Aug 21 15:26 access.log -rw-r--r--. 1 lighttpd lighttpd 37531 Aug 17 18:21 access.log-20120819 - + ./nginx: total 12 -rw-r--r--. 1 root root 0 Aug 12 03:17 access.log @@ -121,7 +122,7 @@ ls -R option will list very long listing directory trees. See an example of outp With combination of -ltr will shows latest modification file or directory date as last. # ls -ltr - + total 176 -rw-r--r--. 1 root root 11439 Jul 31 02:13 install.log.syslog -rw-r--r--. 1 root root 48867 Jul 31 02:17 install.log @@ -143,7 +144,7 @@ With combination of -ltr will shows latest modification file or directory date a With combination of -lS displays file size in order, will display big in size first. # ls -lS - + total 176 -rw-r--r--. 1 root root 48867 Jul 31 02:17 install.log -rw-r--r--. 1 root root 46701 Jul 31 09:58 index.html @@ -165,7 +166,7 @@ With combination of -lS displays file size in order, will display big in size fi We can see some number printed before file / directory name. With -i options list file / directory with inode number. # ls -i - + 20112 0001.pcap 23610 Documents 23793 index.html 23611 Music 23597 Templates 23564 anaconda-ks.cfg 23595 Downloads 22 install.log 23612 Pictures 23613 Videos 23594 Desktop 23585 fbcmd_update.php 35 install.log.syslog 23601 Public @@ -175,7 +176,7 @@ We can see some number printed before file / directory name. With -i options lis Check version of ls command. # ls --version - + ls (GNU coreutils) 8.4 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . @@ -188,7 +189,7 @@ Check version of ls command. List help page of ls command with their option. # ls --help - + Usage: ls [OPTION]... [FILE]... ### 13. List Directory Information ### @@ -210,7 +211,7 @@ With ls -l command list files under directory /tmp. Wherein with -ld parameters ---------- # ls -ld /tmp/ - + drwxrwxrwt. 13 root root 4096 Aug 21 12:48 /tmp/ ### 14. Display UID and GID of Files ### @@ -218,7 +219,7 @@ With ls -l command list files under directory /tmp. Wherein with -ld parameters To display UID and GID of files and directories. use option -n with ls command. # ls -n - + total 36 drwxr-xr-x. 2 500 500 4096 Aug 2 01:52 Downloads drwxr-xr-x. 2 500 500 4096 Aug 2 01:52 Music @@ -235,7 +236,7 @@ We have made alias for ls command, when we execute ls command it’ll take -l op Note: We can see number of alias available in your system with below alias command and same can be unalias as shown below example. # alias - + alias cp='cp -i' alias l.='ls -d .* --color=auto' alias ll='ls -l --color=auto' @@ -255,7 +256,7 @@ In our next article we’ll cover up more or advanced ls command with their exam via: http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ 作者:[Ravi Saive][a] -译者:[译者ID](https://github.com/译者ID) +译者:[theo-l](https://github.com/theo-l) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From edbe43a3867148ee88487cc25941d8a7bd8eba5c Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 14 Mar 2015 06:30:35 -0300 Subject: [PATCH 0263/2517] update --- .../tech/20150309 15 Basic 'ls' Command Examples in Linux.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md b/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md index f02c7daa58..c2ec2532f0 100644 --- a/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md +++ b/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md @@ -1,4 +1,3 @@ -theo-l translating Translating by ZTinoZ 15 Basic ‘ls’ Command Examples in Linux ================================================================================ @@ -256,7 +255,7 @@ In our next article we’ll cover up more or advanced ls command with their exam via: http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ 作者:[Ravi Saive][a] -译者:[theo-l](https://github.com/theo-l) +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 27635f039184ec68317ecd9c7d8e14343bbfc32e Mon Sep 17 00:00:00 2001 From: just4fun Date: Sat, 14 Mar 2015 19:53:27 +0800 Subject: [PATCH 0264/2517] Update 20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md --- ...6 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md b/sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md index 8aef952736..684d7e31dd 100644 --- a/sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md +++ b/sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md @@ -1,3 +1,4 @@ +linuhap translating Pinta 1.6 Released! Install It In Ubuntu And Linux Mint ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Pinta_Ubuntu_Linux.jpeg) @@ -46,4 +47,4 @@ via: http://itsfoss.com/pinta-1-6-ubuntu-linux-mint/ [2]:http://itsfoss.com/add-application-list-open-applications-ubuntu-1310/ [3]:http://pinta-project.com/releases/1-6 [4]:http://pinta-project.com/releases -[5]:http://itsfoss.com/image-applications-ubuntu-linux/ \ No newline at end of file +[5]:http://itsfoss.com/image-applications-ubuntu-linux/ From deba48aec73245cd9aeec19c4a55de5096a8157b Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Sat, 14 Mar 2015 22:53:49 +0800 Subject: [PATCH 0265/2517] Delete 20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md --- ...t Tools To Connect To Your Linux Server.md | 82 ------------------- 1 file changed, 82 deletions(-) delete mode 100644 sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md diff --git a/sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md b/sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md deleted file mode 100644 index 5760b5aaa5..0000000000 --- a/sources/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server.md +++ /dev/null @@ -1,82 +0,0 @@ -wi-cuckoo translating LLAP -List Of Free Windows SSH Client Tools To Connect To Your Linux Server -================================================================================ -You have Windows as operating system and you need to connect to Linux server to transfer files from Linux to Windows and inversely. So you need to have Secure Shell known as SSH. In fact, SSH is a network protocol which enables you to connect to Linux and Unix servers over the network. It uses public key cryptography to authenticate the remote computer. You can use SSH by several ways, either by using it automatically or by using a password authentication to log in. - -This article provides a list of SSH clients let you to connect SSH to your Linux servers. - -let’s start. - -### PuTTY ### - -**PuTTY** is the most famous SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open source software that is available with source code and is developed and supported by a group of volunteers. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/putty.png) - -Putty is very easy to install and to use.You don’t usually need to change most of the configuration options. To start the simplest kind of session, all you need to do is to enter a few basic parameters.You can download PuTTY [here][1] - -### Bitvise SSH Client ### - -**Bitvise SSH** Client is an SSH and SFTP client for Windows. It is developed and supported professionally by Bitvise. The SSH Client is robust, easy to install, easy to use. Bitvise SSH Client is a feature-rich graphical SSH/SFTP client for windows and allow you dynamic port forwarding through an integrated proxy with auto-reconnecting capability. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/bitvise.png) - -Bitvise SSH Client is **free for personal use**, as well as for individual commercial use inside organizations. You can [download Bitvise SSH Client here][2]. - -### MobaXterm ### - -**MobaXterm** is your **ultimate toolbox for remote computing**. In a single Windows application, it provides loads of functions that are tailored for programmers, webmasters, IT administrators and pretty much all users who need to handle their remote jobs in a more simple fashion. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/mobaxterm.png) - -MobaXterm provides all the important **remote network tools** (SSH, X11, RDP, VNC, FTP, MOSH, …) and **Unix commands** (bash, ls, cat, sed, grep, awk, rsync, …) to Windows desktop, in a **single portable exe file** which works out of the box. MobaXterm is **free for personal use**. You can download MobaXterm [from here][3]. - -### DameWare SSH ### - -I think that **DameWare SSH** is the best free ssh client. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/ssh.png) - -This free tool is a terminal emulator that lets you make multiple telnet and SSH connections from one easy-to-use console. - -- Manage multiple sessions from one console with a tabbed interface -- Save favorite sessions within the Windows file system -- Access multiple sets of saved credentials for easy log-in to different devices -- Connect to computers and devices using telnet, SSH1, and SSH2 protocols - -You can download **DameWare SSH** from [this link][4]. - -### SmarTTY ### - -SmarTTY is a free multi-tabbed SSH client that supports copying files and directories with SCP on-the-fly. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/smart.png) - -Most SSH servers support up to 10 sub-sessions per connection. SmarTTY makes the best of it: no annoying multiple windows, no need to relogin, just open a new tab and go! - -### Cygwin ### - -Cygwin is a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/cyq.png) - -**Cygwin** consists of a Unix system call emulation library, cygwin1.dll, together with a [vast set][5] of GNU and other free software applications organized into a large number of optional packages. Among these packages are high-quality compilers and other software development tools, an X11 server, a complete X11 development toolkit, GNU emacs, TeX and LaTeX, OpenSSH (client and server), and much more, including everything needed to compile and use PhysioToolkit software under MS-Windows. - -After reading our article, which is your favorite SSH client? You can leave a comment describing your favorite system and the reasons of your choice. And of course if there is another SSH client doesn’t appear in this article, you can help us to add it. - --------------------------------------------------------------------------------- - -via: https://www.unixmen.com/list-free-windows-ssh-client-tools-connect-linux-server/ - -作者:[anismaj][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://www.unixmen.com/author/anis/ -[1]:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html -[2]:http://www.bitvise.com/download-area -[3]:http://mobaxterm.mobatek.net/download.html -[4]:http://www.dameware.com/downloads/registration.aspx?productType=ssh&AppID=17471&CampaignID=70150000000PcNM -[5]:http://cygwin.com/packages/ From 3a800cd6f03a23712dddcce6d9edb06d731cf74b Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Sat, 14 Mar 2015 22:55:38 +0800 Subject: [PATCH 0266/2517] Create 20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md --- ... Tools To Connect To Your Linux Server .md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 translated/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md diff --git a/translated/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md b/translated/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md new file mode 100644 index 0000000000..ccb4bc2fec --- /dev/null +++ b/translated/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md @@ -0,0 +1,81 @@ +在windows下,连接你的Linux服务器的ssh免费客户端工具列举\ +================================================================================ +你的操作系统是Windows,而你想要连接Linux服务器相互传送文件.于是你需要一个Secure Shell,简称SSH.实际上,SSH是一个网络协议,允许你通过网络连接到Linux和Unix服务器.SSH使用公钥加密来认证远程的计算机.你可以有多种途径使用SSH,要么自动地连接,或者使用密码认证登录. + +本篇文章讲述了几种SSH客户端,供选择使用来连接你的Linux服务器. + +我们开始. + +### Putty ### + +**Putty**是最有名的SSH和telnet客户端,最初由Simon Tatham为Windows平台开发.Putty是一款开源软件,有可用的源代码,和一群志愿者的发展和支持. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/putty.png) + +Putty非常易于安装和使用,通常你不需要改大部分的配置选项.你只需要输入少量基本的参赛,就可以开始最简单的对话连接[here][1]. + +### Bitvise SSH Client ### + +**Bitvise SSH **是一款支持SSH和SFTP的Windows客户端.由Bitvise专业地提供支持和发展.这款SSH客户端性能强悍,易于安装和使用.Bitvise SSH客户端功能丰富,拥有图形界面,通过一个有自动重连能力的内置代理允许用户动态端口运行. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/bitvise.png) + +Bitvise SSH客户端对个人用户使用**是**免费的,同时对于在组织内部的单独商业使用也一样.你可以[在这里下载Bitvise SSH客户端][2] + +### MobaXterm ### + +**M偶吧Xterm**是你的**终极工具箱,解决远程计算**.在单一的Windows应用里,它提供了许多裁剪过的的功能,针对程序员,网络管理者,IT管理员和相当一部分需要在更简单界面(此处原文为in a more simple fashion,有点费解)远程作业的用户. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/mobaxterm.png) + +MobaXterm提供了所有重要的**远程网络工具** (如SSH, X11, RDP, VNC, FTP, MOSH 等等),和**Unix 命令**(bash, ls, cat, sed, grep, awk, rsync等等)适用于Windows桌面,在一个**单独便于携带的可执行文件里**,其工作独立于工具箱.MobaXterm对**个人使用免费**.你可以下载MobaXterm[在这里][3]. + +### DameWare SSH ### + +我认为**DameWare SSH**是最好的免费SSH客户端. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/ssh.png) + +这个免费工具是一个终端模拟器,可以让你实现从一个易用控制台的多种telnet和SSH连接. + +-用一个带标签的控制台界面管理多方会话 +-在Windows文件系统中保存喜欢的会话 +-获取多个保存的证书集合,用于轻松登录不同的设备 +-使用telnet,SSH1和SSH2协议连接计算机和设备 + +你可以从[这个链接][4]下载 **DameWare SSH** + +### SmarTTY ### +  +SmarTTY是一款免费的多标签SSH客户端,支持使用SCP命令及时复制文件和目录 + +![](https://www.unixmen.com/wp-content/uploads/2015/03/smart.png) + +大多数SSH服务器每次连接支持最多10个子会话.SmarTTY在这方面做得很好:没有烦人的多个窗口,不需要重新登录,仅仅打开一个新的标签页就可以开始了! + +### Cygwin ### + +Cygwin是一款GNU和开源工具的大杂烩,提供的功能近似一个Windows平台下的Linux. + +![](https://www.unixmen.com/wp-content/uploads/2015/03/cyq.png) + +**Cygwin**包括了一个Unix系统,集模拟库,cygwin.dll,GNU大量集合和其他被归类了的大量可选免费应用软件包.在这些安装包中,有高质量的编译器和其他软件开发工具,一个X11服务器,一套完整的X11开发套件,GNU emacs编辑器,Tex和LaTeX,openSSH(客户端和服务器),除此之外还有很多,包括在微软Windows下需要编译和使用PhysioToolkit软件的每一样东西. + +读完我们的文章后,不知你中意哪一款SSH客户端?你可以留下你的评论,描述你喜欢的系统和选择的原因.当然,如果有另外的SSH客户端没有被本文列举出来,你可以帮助我们补充. + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/list-free-windows-ssh-client-tools-connect-linux-server/ + +作者:[anismaj][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/anis/ +[1]:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html +[2]:http://www.bitvise.com/download-area +[3]:http://mobaxterm.mobatek.net/download.html +[4]:http://www.dameware.com/downloads/registration.aspx?productType=ssh&AppID=17471&CampaignID=70150000000PcNM +[5]:http://cygwin.com/packages/ From 3d2b832d93c1109e85f1b6c648feaa213ec39c0e Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 14 Mar 2015 15:57:30 -0300 Subject: [PATCH 0267/2517] translated --- ...ls' Command Interview Questions--Part 2.md | 38 +++++++++++++++---- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md b/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md index 3e185fe7e1..cade1ae602 100644 --- a/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md +++ b/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md @@ -1,19 +1,22 @@ -theo-l translating - 10 Useful ‘ls’ Command Interview Questions – Part 2 +10个有用的‘ls’命令面试问题-第二部分 ================================================================================ Continuing the legacy of ls command here is the second interview article on Listing command. The first article of the series was highly appreciated by the Tecmint Community. If you’ve missed the first part of this series you may like to visit at: +这是关于文件列表命令的第二篇文章,继续探讨‘ls’命令的其他方面。该系列的第一篇文章收到了Tecmint社区的高度关注,如果你错过了该系列的第一部分,你可能会访问以下地址: - [15 Interview Questions on “ls” Command – Part 1][1] This article is well presented in the manner that it gives deep insight of ls command with examples. We have taken extra care in the making of article so that it remains simple to understand yet serve the purpose to the fullest. +这篇文章通过样例来很好地展现‘ls’命令的深入应用,我们加倍小心地来写这篇文章来保持其简洁可理解性,同时又能提供最全面的服务。 ![10 Interview Questions on ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-Command-Interview-Questions.jpg) 10 Interview Questions on ls Command ### 1. You are supposed to list the content of a directory in long list format, but not print the name of the author and group the file belongs. Also show the difference in output. ### +### 1. 假如你想要以长列表的形式列出目录中的内容,但是不打印文件创建者名称以及文件所属组。同时在输出中显示其不同之处。### a. ls command listing the name of the files in long listing format when used with switch (-l). +a. ls 命令在与‘-l’选项一起使用时会将文件以长列表格式输出。 # ls -l @@ -21,6 +24,7 @@ a. ls command listing the name of the files in long listing format when used wit List Files in- Long List Format b. ls command listing the name of the files in long listing format along with the name of the author file belongs, when used with switch (–author) along with switch (-l). +b. ls 命令在与‘-l’和‘--author’一起使用时,会将文件以长列表格式输出并带有文件创建者的名称信息。 # ls -l --author @@ -28,6 +32,7 @@ b. ls command listing the name of the files in long listing format along with th List Files By Author c. ls command listing the name of the files without the name of its owner, when used with switch (-g). +c. ls 命令在与‘-g’选项 一起将会列出文件名但是不带属主名称。 # ls -g @@ -35,16 +40,16 @@ c. ls command listing the name of the files without the name of its owner, when List Files Without Printing Owner Name d. ls command listing the name of files in long listing format without the name of group it belongs, when used with switch (-G) along with switch (-l). - +d. ls 命令在与'-G'和‘-l’选项一起将会使用长列表格式列出文件名称带式不带文件所属组名称。 # ls -Gl ![List Files Without Printing Group](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Printing-Group.gif) List Files Without Printing Group ### 2. Print the size of files and folders in the current directory, in human readable format. How will you do this? ### - +### 2. 使用用户友好的格式打印出当前目录中的文件以及文件夹的大小,你会如何做?### Well we need to use switch -h (human-readable) along with switch (-l) and/or (-s) with the command ls to get the desired output. - +这里我们需要使用'-h'选项(人类可阅读的)同‘-l’或‘-s’选项与ls命令一起使用来得到想要的输出。 # ls -hl ![List Files in Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-Size-of-Files-with-ls.gif) @@ -56,10 +61,13 @@ List Files in Human Readable Format List File Sizes in Long List Format **Note**: The option -h uses the power of 1024 (standard in computation) and output the size of files and folders in the units of K, M and G. +**注意**: ‘-h’选项使用1024(计算机中的标准)的幂,文件或文件夹的大小分别以K,M和G作为输出单位。 ### 3. Well if switch (-h) output size in power of 1024, that is standard, What else power values are supported in ls command? ### +### 3. 既然‘-h’选项是使用1024的幂作为标准来输出大小,那么ls命令还支持其他的幂值呢?### There exist a switch -si which is similar to switch -h. The only difference is switch -si uses power of 1000 unlike switch -h which uses the power of 1024. +存在一个选项 ‘-si’与选项‘-h’相似,不同之处在于前者以使用1000的幂,后者使用1024的幂。 # ls -si @@ -67,6 +75,7 @@ There exist a switch -si which is similar to switch -h. The only difference is s Supported Power Values of ls Command It can also be used with switch -l to output the size of folder in the power of 1000, in long listing format. +所以'-si'也可以与‘-l’选项一起使用来按照1000的幂来输出文件夹的大小,并且以长列表格式显示。 # ls -si -l @@ -74,8 +83,10 @@ It can also be used with switch -l to output the size of folder in the power of List Files by Power Values ### 4. You are supposed to print the contents of a directory separated with comma. Is it possible? Can it be done in long listing format? ### +### 4. 假如要你使用逗号‘,’作为分隔符来打印一个目录中的内容,可以吗? 对于长列表形式也可行吗?### Yup! Linux ls command can output the contents of a directory separated by comma when used with the switch (-m). Since this comma separated entries are filled horizontally, ls command can’t separate contents with comma when listing contents vertically. +当然!linux的ls命令当与其选项‘-m’一起使用时可以在打印目录内容时以逗号‘,’分割。由于逗号分割的内容是水平填充的,ls命令不能在垂直列出内容时使用逗号来分割内容。 # ls -m @@ -83,6 +94,7 @@ Yup! Linux ls command can output the contents of a directory separated by comma Print Contents of Directory by Comma When used in long listing format, switch -m gets useless. +当使用长列表格式时,‘-m’选项就没有什么效果了。 # ls -ml @@ -90,8 +102,10 @@ When used in long listing format, switch -m gets useless. Listing Content Horizontally ### 5. If there any way to print the contents of a directory upside down? i.e., in reverse order. ### +### 5. 有办法将目录的内容逆序打印出来吗?### Yeah! The above situation can easily be achieved using the switch -r. The switch ‘-r‘ reverse the order of output. It can also be used with switch -l (long listing format). +可以!上面的情形可以轻松地通过'-r'选项搞定,该选项将输出顺序倒置。这个选项也可以与‘-l’选项一起使用。 # ls -r @@ -104,17 +118,20 @@ List Content in Reverse Order Long List Content in Reverse Order ### 6. You are given a situation to print the sub-directories recursively. How will you achieve this situation? Mind it only sub directories and no files. ### +### 6. 如果你被分配一个任务,来递归地打印各个子目录,你会如何应付?注意哟,只针对子目录而不是文件哦。### Okay! That is pretty easy with the switch -R when used with command ls. It can further be grouped with other options like -l (long list) and -m (comma separated), etc. - +小意思!使用“-R”选项就可以轻轻松松拿下,它也可以更进一步地与其他选项如‘-l’和‘-m’选项等组合使用。 # ls -R ![Print Sub Directories in Recursively](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Sub-Directories-in-Recursively.gif) Print Sub Directories in Recursively ### 7. How to sort the files based upon the size? ### +### 7. 如何按照文件大小对其进行排序?### The Linux command line option -S when used with ls gives the desired output. To sort the files based upon size in descending order with the largest file listed at first and smallest at last. +linux命令行选项'-S'赋予了ls命令这个超能力。按照文件大小从大到小的顺序排序: # ls -S @@ -122,6 +139,7 @@ The Linux command line option -S when used with ls gives the desired output. To Sort Files with ls Command To sort the files based upon size in descending order with the smallest file listed at first and largest at last. +按照文件大小从小到大的顺序排序。 # ls -Sr @@ -129,8 +147,9 @@ To sort the files based upon size in descending order with the smallest file lis Sort Files in Descending Order ### 8. List the contents of a directory with no additional information appearing one file per line. ### - +### 8. 列出目录中的内容按照一行一个文件并且不带额外信息的方式 ### The switch -1 comes to rescue here. ls command with switch -1 output the contents of the directory with one file per line and no additional information. +选项‘-l’在此可以解决这个问题,使用‘-l’选项来使用ls命令可以将目录中的内容按照一行一个文件并且不带额外信息的方式进行输出。 # ls -1 @@ -138,8 +157,9 @@ The switch -1 comes to rescue here. ls command with switch -1 output the content List Files Without Information ### 9. You are given a situation in which you have to print the contents of a directory on standard output enclosed by double quotes. How will you do this? ### - +### 9. 现在委派给你一个任务,你必须将目录中的内容输出到终端而且需要使用双引号引起来,你会如何做?### There exist an option -Q (quote-name) which output the content of ls enclosed in double quotes. +存在一个选项‘-Q’会将ls命令的输出内容用双引号引起来。 # ls -Q @@ -147,6 +167,7 @@ There exist an option -Q (quote-name) which output the content of ls enclosed in Print Files with Double Quotes ### 10. You are working in a directory which contains lots of files and folders. You need to print the name of folders before directories. How will you get this? ### +### 10. 想象一下你正在与一个包含有很多文件和文件夹的目录打交道,你需要使目录名显示在文件名之前,你如何做?### # ls --group-directories-first @@ -154,6 +175,7 @@ Print Files with Double Quotes Print Directories First That’s all for now. We will be coming up with the next part of this article series very soon. Till then stay tuned and connected to Tecmint. Do not forget to provide us with valuable feedback in the comment section below. Like and share us and help us get spread! +先点到为止,我们会马上提供该系列文章的下一部分。别换频道,关注Tecmint。 另外别忘了在下面的评论中提出你们宝贵的反馈信息,喜欢就分享,帮助我们得到更好的传播吧! -------------------------------------------------------------------------------- From b65c622f3b9043c88fffd7e941f183293cc9785a Mon Sep 17 00:00:00 2001 From: LouisWei Date: Sun, 15 Mar 2015 10:42:00 +0800 Subject: [PATCH 0268/2517] translating wi-cuckoo --- ... Look At What Linux Games We Will See In 2015 And Beyond.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md b/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md index 9f11f47573..bf99fd2154 100644 --- a/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md +++ b/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md @@ -1,3 +1,4 @@ +translating wi-cuckoo LLAP A Look At What Linux Games We Will See In 2015 And Beyond ================================================================================ Linux Gaming is dead they said, Linux Gaming is pointless they said...ah whatever. Here’s a look at what’s to come for us in 2015 and beyond. @@ -133,4 +134,4 @@ via: http://www.gamingonlinux.com/articles/a-look-at-what-linux-games-we-will-se [38]:https://www.gamingonlinux.com/articles/outlast-that-really-scary-game-looks-like-its-still-heading-to-linux.4896 [39]:https://www.gamingonlinux.com/articles/shadow-warrior-looks-like-it-will-come-to-linux.4859 [40]:https://www.gamingonlinux.com/articles/torchlight-ii-has-even-more-positive-signs-for-linux.4817 -[41]:http://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/ \ No newline at end of file +[41]:http://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/ From f4bb5998c2b75870a54a619211d5a315087f6e0a Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Sun, 15 Mar 2015 11:53:00 +0800 Subject: [PATCH 0269/2517] [translated] 20150127 Windows 10 versus Linux.md --- .../talk/20150127 Windows 10 versus Linux.md | 32 ------------------- .../talk/20150127 Windows 10 versus Linux.md | 31 ++++++++++++++++++ 2 files changed, 31 insertions(+), 32 deletions(-) delete mode 100644 sources/talk/20150127 Windows 10 versus Linux.md create mode 100644 translated/talk/20150127 Windows 10 versus Linux.md diff --git a/sources/talk/20150127 Windows 10 versus Linux.md b/sources/talk/20150127 Windows 10 versus Linux.md deleted file mode 100644 index d79b45d93c..0000000000 --- a/sources/talk/20150127 Windows 10 versus Linux.md +++ /dev/null @@ -1,32 +0,0 @@ -zpl1025 -Windows 10 versus Linux -================================================================================ -![](https://farm4.staticflickr.com/3852/14863156322_e4edbae70e_t.jpg) - -Windows 10 seemed to dominate the headlines today, even in many Linux circles. Leading the pack is Brian Fagioli at betanews.com saying Windows 10 is ringing the death knell for Linux desktops. Microsoft announced today that Windows 10 will be free for loyal Windows users and Steven J. Vaughan-Nichols said it's the newest Open Source company. Then Matt Hartley compares Windows 10 to Ubuntu and Jesse Smith reviews Windows 10 from a Linux user's perspective. - -**Windows 10** was the talk around water coolers today with Microsoft's [announcement][1] that it would be free for Windows 7 and up users. Here in Linuxland, that didn't go unnoticed. Brian Fagioli at betanews.com, a self-proclaimed Linux fan, said today, "Windows 10 closes the door entirely. The year of the Linux desktop will never happen. Rest in peace." [Fagioli explained][2] that Microsoft listened to user complaints and not only addressed them but improved way beyond that. He said Linux missed the boat by failing to capitalize on the Windows 8 unpopularity and ultimate failure. Then he concluded that we on the fringe must accept our "shattered dreams" thanks to Windows 10. - -**H**owever, Jesse Smith, of Distrowatch.com fame, said Microsoft isn't making it easy to find the download, but it is possible and he did it. The installer was simple enough except for the partitioner, which was quite limited and almost scary. After finally getting into Windows 10, Smith said the layout was "sparce" without a lot of the distractions folks hated about 7. The menu is back and the start screen is gone. A new package manager looks a lot like Ubuntu's and Android's according to Smith, but requires an online Microsoft account to use. [Smith concludes][3] in part, "Windows 10 feels like a beta for an early version of Android, a consumer operating system that is designed to be on-line all the time. It does not feel like an operating system I would use to get work done." - -**S**mith's [full article][4] compares Windows 10 to Linux quite a bit, but Matt Hartley today posted an actual Windows 10 vs Linux report. [He said][5] both installers were straightforward and easy Windows still doesn't dual boot easily and Windows provides encryption by default but Ubuntu offers it as an option. At the desktop Hartley said Windows 10 "is struggling to let go of its Windows 8 roots." He thought the Windows Store looks more polished than Ubuntu's but didn't really like the "tile everything" approach to newly installed apps. In conclusion, Hartley said, "The first issue is that it's going to be a free upgrade for a lot of Windows users. This means the barrier to entry and upgrade is largely removed. Second, it seems this time Microsoft has really buckled down on listening to what their users want." - -**S**teven J. Vaughan-Nichols today said that Microsoft is the newest Open Source company; not because it's going to be releasing Windows 10 as a free upgrade but because Microsoft is changing itself from a software company to a software as a service company. And, according to Vaughan-Nichols, Microsoft needs Open Source to do it. They've been working on it for years beginning with Novell/SUSE. Not only that, they've been releasing software as Open Source as well (whatever the motives). [Vaughan-Nichols concluded][6], "Most people won't see it, but Microsoft -- yes Microsoft -- has become an open-source company." - --------------------------------------------------------------------------------- - -via: http://ostatic.com/blog/windows-10-versus-linux - -作者:[Susan Linton][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ostatic.com/member/susan-linton -[1]:https://news.google.com/news/section?q=microsoft+windows+10+free&ie=UTF-8&oe=UTF-8 -[2]:http://betanews.com/2015/01/25/windows-10-is-the-final-nail-in-the-coffin-for-the-linux-desktop/ -[3]:http://blowingupbits.com/2015/01/an-outsiders-perspective-on-windows-10-preview/ -[4]:http://blowingupbits.com/2015/01/an-outsiders-perspective-on-windows-10-preview/ -[5]:http://www.datamation.com/open-source/windows-vs-linux-the-2015-version-1.html -[6]:http://www.zdnet.com/article/microsoft-the-open-source-company/ diff --git a/translated/talk/20150127 Windows 10 versus Linux.md b/translated/talk/20150127 Windows 10 versus Linux.md new file mode 100644 index 0000000000..c54e8ff1ee --- /dev/null +++ b/translated/talk/20150127 Windows 10 versus Linux.md @@ -0,0 +1,31 @@ +Windows 10 VS Linux +================================================================================ +![](https://farm4.staticflickr.com/3852/14863156322_e4edbae70e_t.jpg) + +如今Windows 10好像占据了绝大部分头条,甚至在一些Linux圈里也是一样。最突出的是betanews.com的Brian Fagioli说Windows 10已经为Linux桌面系统敲响了丧钟,Microsoft如今宣布将为忠实的Windows用户免费提供windows 10,Steven J. Vaughan-Nichols说这是一个最新的开源公司,然后Matt Hartley比较了Windows 10和Ubuntu,Jesse Smith发表了从Linux用户角度对Windows 10的评估。 + +**Windows 10**,在Microsoft[声明][1]说将免费提供给Windows 7及以上用户时,成为如今闲聊的热门话题。在Linuxland这里,也没有被忽视。betanews.com的Brian Fagioli,一个自封的Linux粉丝,如今这样说,“Windows 10把门彻底关上了。Linux桌面元年将永远不会到来。安息吧。”[Fagioli解释][2]说Microsoft倾听了用户的抱怨而且并不只是记录一下,而是解决的更好。他说Linux错失了由Windows 8不受欢迎以及巨大失败带来的积累机会。然后他总结,拜Windows 10所赐,处于边缘地带的我们只能接受一个“破碎的梦”。 + +**不**过,来自闻名的Distrowatch.com的Jesse Smith,说Microsoft并没有提供一个很明显的下载方式,不过确实可行而且他也升级了。安装程序非常简单,除了分区功能很有限甚至有点吓人。在最终启动进入Windows 10后,Smith说界面布局很“松散”,没有Win7里被很多人讨厌的大量分散注意的元素,开始菜单又回来了,取消了欢迎屏幕。据Smith所说,还有一个和Ubuntu以及Android很类似的新的包管理程序,不过需要Microsoft在线账户才可以使用。[Smith的总结][3]里有这样一条,“感觉Windows 10像是Android的早期beta版本,一个设计成时刻保持在线的消费者操作系统。而不像是一个我能用来完成工作的操作系统。” + +**S**mith的[完整文章][4]里比较了Windows 10和Linux的大量细节,不过Matt Hartley发表了一个实在的Windows 10 vs Linux的报告。[他说][5]两者的安装程序都很直观和简单,Windows的双启动仍然没那么容易,Windows默认提供了加密而Ubuntu只提供了配置选项。在桌面上Hartley说Windows 10“纠结地丢弃了它Windows 8的根。”他觉得Windows 10的Windows商店比Ubuntu的漂亮很多,但是实在不喜欢通过“一切都是卡片”的方式来查看新安装的应用。Hartley这样总结,“首先是它将为大量Windows用户提供免费升级。这意味着大大降低了进入和升级门槛。第二,这次看起来Microsoft真的在全力以赴地倾听他们用户的需求了。” + +**S**teven J. Vaughan-Nichols如今声称Microsoft是最新的开源公司;不仅因为它将放出Windows 10的免费升级,而且Microsoft正在从一个软件公司转型为一个软件服务公司。然后,据Vaughan-Nichols所说,Microsoft需要开源来完成这次转型。从Novell/SUSE开始,他们已经在这一块工作好多年了。不仅如此,他们也发布过开源软件(不管什么目的)。[Vaughan-Nichols总结][6],“很多人都没注意到,但是Microsoft -- 就是那个Microsoft -- 已经成为一家开源公司。” + +-------------------------------------------------------------------------------- + +via: http://ostatic.com/blog/windows-10-versus-linux + +作者:[Susan Linton][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ostatic.com/member/susan-linton +[1]:https://news.google.com/news/section?q=microsoft+windows+10+free&ie=UTF-8&oe=UTF-8 +[2]:http://betanews.com/2015/01/25/windows-10-is-the-final-nail-in-the-coffin-for-the-linux-desktop/ +[3]:http://blowingupbits.com/2015/01/an-outsiders-perspective-on-windows-10-preview/ +[4]:http://blowingupbits.com/2015/01/an-outsiders-perspective-on-windows-10-preview/ +[5]:http://www.datamation.com/open-source/windows-vs-linux-the-2015-version-1.html +[6]:http://www.zdnet.com/article/microsoft-the-open-source-company/ From 47c1bc24bd883751722f4fa353886a880a5462e7 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Sun, 15 Mar 2015 11:59:59 +0800 Subject: [PATCH 0270/2517] [translating] 20141219 Google Cloud offers streamlined Ubuntu for Docker use.md --- ...1219 Google Cloud offers streamlined Ubuntu for Docker use.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md b/sources/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md index c63c4a78f2..7a24d0f90a 100644 --- a/sources/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md +++ b/sources/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md @@ -1,3 +1,4 @@ +zpl1025 Google Cloud offers streamlined Ubuntu for Docker use ================================================================================ > Ubuntu Core provides a minimal Lightweight Linux environment for running containers From a1cb729d7596d007491f902a82fe72790d359ab4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 15 Mar 2015 12:45:33 +0800 Subject: [PATCH 0271/2517] translating --- ...w App Brings Android Notifications to The GNOME Desktop.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md b/sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md index 0a67dab449..3a43eecb35 100644 --- a/sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md +++ b/sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md @@ -1,3 +1,5 @@ +Translating----geekpi + New App Brings Android Notifications to The GNOME Desktop ================================================================================ ![Fancy seeing your Android alerts here? You can.](http://www.omgubuntu.co.uk/wp-content/uploads/2015/02/Screen-Shot-2015-02-24-at-17.47.48.png) @@ -35,4 +37,4 @@ via: http://www.omgubuntu.co.uk/2015/03/new-app-brings-android-notifications-to- [1]:http://www.omgubuntu.co.uk/2015/02/4-reason-why-gnome-3-16-might-be-the-best-version-yet-gallery [2]:https://play.google.com/store/apps/details?id=org.holylobster.nuntius [3]:http://www.omgubuntu.co.uk/2014/06/kde-connect-android-notifications-linux-desktop -[4]:https://github.com/holylobster \ No newline at end of file +[4]:https://github.com/holylobster From 59a502ef4bff9d775f568a7f14f8767c45a1102c Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 15 Mar 2015 13:13:55 +0800 Subject: [PATCH 0272/2517] translated --- ...roid Notifications to The GNOME Desktop.md | 40 ------------------- ...roid Notifications to The GNOME Desktop.md | 39 ++++++++++++++++++ 2 files changed, 39 insertions(+), 40 deletions(-) delete mode 100644 sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md create mode 100644 translated/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md diff --git a/sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md b/sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md deleted file mode 100644 index 3a43eecb35..0000000000 --- a/sources/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md +++ /dev/null @@ -1,40 +0,0 @@ -Translating----geekpi - -New App Brings Android Notifications to The GNOME Desktop -================================================================================ -![Fancy seeing your Android alerts here? You can.](http://www.omgubuntu.co.uk/wp-content/uploads/2015/02/Screen-Shot-2015-02-24-at-17.47.48.png) -Fancy seeing your Android alerts here? You can. - -**You’ll shortly be able to view your Android notifications on the GNOME desktop thanks to a new application in development.** - -The new project is called ‘Nuntius’ and lets notifications received on an Android phone appear on the GNOME desktop. It’s with GNOME 3.16 and its (wonderfully) [redesigned notification system][1] that the app and its features will be used by more. - -The app, which developers are hoping will be ready in time for this month’s release of GNOME 3.16, will work over Bluetooth to ensure that nothing is passed to external servers or stored online. This does mean that your phone will need to be in a certain proximity to your GNOME desktop for the feature to work. - -It also isn’t yet possible to reply to a text message or act on a news alert. - -The development team do caution that **this is an early release** and those planning on diving in to use it should expect minimum functionality for now. - -The mobile app required to see Android notifications in GNOME’s new notification shade is already available [from the Google Play Store][2] and the GNOME application is already available in the Fedora repos. - -The developers have open-sourced both the Android app and the GNOME application receiver and hosted them (where else) on GitHub. - -A similar tool [has been available for KDE desktops][3] – ‘KDE Connect’ – for a year or two, while the ever-gaining Pushbullet offers similar features on Windows, Mac and Linux desktops for iOS and Android platforms using Google Chrome. - -- [Nuntius for Android & GNOME on GitHub][4] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/03/new-app-brings-android-notifications-to-the-gnome-desktop - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.omgubuntu.co.uk/2015/02/4-reason-why-gnome-3-16-might-be-the-best-version-yet-gallery -[2]:https://play.google.com/store/apps/details?id=org.holylobster.nuntius -[3]:http://www.omgubuntu.co.uk/2014/06/kde-connect-android-notifications-linux-desktop -[4]:https://github.com/holylobster diff --git a/translated/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md b/translated/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md new file mode 100644 index 0000000000..b180d43571 --- /dev/null +++ b/translated/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md @@ -0,0 +1,39 @@ +一款在Gnome桌面中显示Andorid通知的程序 +================================================================================ +![Fancy seeing your Android alerts here? You can.](http://www.omgubuntu.co.uk/wp-content/uploads/2015/02/Screen-Shot-2015-02-24-at-17.47.48.png) +在这里看到Android通知很棒么?你可以 + +**你很快就可以在GNOME桌面中看到Andorid通知了,这都要归功于一个在开发中的新程序。** + + +这个新的项目叫“Numtius”,这可以让在Andorid手机上收到的通知显示在GNOME桌面上。它会集成在GNOME 3.16中,并且它[重新设计了通知系统][1],这个app和特性会用在其他更多的地方。 + +这个app的开发者希望在这个月GNOME 3.16发布之前可以完成,它将通过蓝牙工作来保证不会传给外部的系统或者使用在线存储。这意味着你的电话必须接近GNOME桌面来保证这个功能可用。 + +他现在还不能回复短消息或者对提醒采取操作。 + +开发团队警告说**这是一个早期发布版本**,那些打算重度使用的人们现在应该做好最少功能的准备。 + +在GNOME桌面上看Android通知的移动端app现在已经在[Google Play商店][2]了,GNOME程序已经在Fedora的仓库中了。 + +开发者已经在Gituhb上开源了Android和GNOME接收端的程序, + +一个相似的工具[已经在KDE桌面上有了][3] - ‘KDE Connect’ - 已经有一两年了,通过Pushbullet来为使用Chrome的iOS和Android平台在Windows、MAC和Linux桌面上提供相似的功能。 + +- [Nuntius for Android & GNOME on GitHub][4] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/03/new-app-brings-android-notifications-to-the-gnome-desktop + +作者:[Joey-Elijah Sneddon][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2015/02/4-reason-why-gnome-3-16-might-be-the-best-version-yet-gallery +[2]:https://play.google.com/store/apps/details?id=org.holylobster.nuntius +[3]:http://www.omgubuntu.co.uk/2014/06/kde-connect-android-notifications-linux-desktop +[4]:https://github.com/holylobster From a43a22ef01f07b617d2dab22c201078480401b06 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Sun, 15 Mar 2015 14:15:15 +0800 Subject: [PATCH 0273/2517] [translated] 20141219 Google Cloud offers streamlined Ubuntu for Docker use.md --- ...ffers streamlined Ubuntu for Docker use.md | 44 ------------------- ...ffers streamlined Ubuntu for Docker use.md | 43 ++++++++++++++++++ 2 files changed, 43 insertions(+), 44 deletions(-) delete mode 100644 sources/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md create mode 100644 translated/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md diff --git a/sources/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md b/sources/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md deleted file mode 100644 index 7a24d0f90a..0000000000 --- a/sources/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md +++ /dev/null @@ -1,44 +0,0 @@ -zpl1025 -Google Cloud offers streamlined Ubuntu for Docker use -================================================================================ -> Ubuntu Core provides a minimal Lightweight Linux environment for running containers - -Google has adopted for use in its cloud a streamlined version of the Canonical Ubuntu Linux distribution tweaked to run Docker and other containers. - -Ubuntu Core was designed to provide only the essential components for running Linux workloads in the cloud. An [early preview edition][1] of it, which Canonical calls "Snappy," was released last week. The new edition jettisoned many of the libraries and programs usually found in general use Linux distributions that were unnecessary for cloud use. - -[ [Get started with Docker][2] using this step-by-step guide to the red-hot open source framework. | Get the latest insight on the tech news that matters from [InfoWorld's Tech Watch blog][3]. ] - -The Google Compute Engine (GCE) [joins Microsoft Azure][4] in supporting the fresh distribution. - -According to Canonical, Ubuntu Core should provide users with an easy way to deploy Docker, an [increasingly lightweight virtualization container][4] that allows users to quickly spin up workloads and easily move them around, even across different cloud providers. - -Google has been an ardent supporter of Docker and container-based virtualization itself. In June, the company [released as open source its software for managing containers][5], called Kubernetes. - -The design of Ubuntu Core is similar to another Linux distribution, CoreOS, [first released a year ago][7]. - -Developed in part by two ex-Rackspace engineers, [CoreOS][8] is a lightweight Linux distribution designed to work in clustered, highly scalable environments favored by companies that do much or all of their business on the Web. - -CoreOS was quickly adopted by many cloud providers, including Microsoft Azure, Amazon Web Services, DigitalOcean and Google Compute Engine. - -Like CoreOS, Ubuntu Core offers an expedited process for updating components, reducing the amount of time that an administrator would need to manually manage them. -如同Coreos一样,Ubuntu内核提供了一个快速引擎来更新组件 --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2860401/cloud-computing/google-cloud-offers-streamlined-ubuntu-for-docker-use.html - -作者:[Joab Jackson][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Joab-Jackson/ -[1]:http://www.ubuntu.com/cloud/tools/snappy -[2]:http://www.infoworld.com/article/2607941/linux/how-to--get-started-with-docker.html -[3]:http://www.infoworld.com/blog/infoworld-tech-watch/ -[4]:http://www.ubuntu.com/cloud/tools/snappy -[5]:http://www.itworld.com/article/2695383/open-source-tools/docker-all-geared-up-for-the-enterprise.html -[6]:http://www.itworld.com/article/2695501/cloud-computing/google-unleashes-docker-management-tools.html -[7]:http://www.itworld.com/article/2696116/open-source-tools/coreos-linux-does-away-with-the-upgrade-cycle.html -[8]:https://coreos.com/using-coreos/ diff --git a/translated/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md b/translated/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md new file mode 100644 index 0000000000..ab0bdc3210 --- /dev/null +++ b/translated/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md @@ -0,0 +1,43 @@ +Google云服务为Docker应用提供简化版Ubuntu +================================================================================ +> Ubuntu Core为运行容器提供了最小的轻量级Linux环境 + +Google为自己的云服务采用了一个简化版的Canonical Ubuntu Linux发行版,优化来运行Docker和其他容器。 + +Ubuntu Core被设计成仅提供在云上运行Linux所必需的组件。它的一个[早期预览版][1],Canonical命名为“Snappy”,在上个星期发布了。这个新版本裁减了大量在普通Linux发行版中常见而在云应用中不实用的库和应用程序。 + +[ 通过这篇red-hot开源框架逐步指导文章[开始使用Docker][2] | 从[InfoWorld的技术观察博客][3]获取重要技术新闻的最新解读。 ] + +Google计算引擎(GCE)[加入了Microsoft Azure][4]来支持这个新的发行版。 + +从Canonical了解到,Ubuntu Core将为用户提供一个部署Docker的简单方式,一个[日益精简的虚拟容器][4]允许用户快速启动工作负载并轻松地转移,甚至可以跨越不同的云服务提供商。 + +Google是Docker和基于容器的虚拟化的热心支持者。在六月份,这家公司[用开源的方式发布了一个容器管理软件][5]:Kubernetes。 + +Ubuntu Core在设计上类似于另一个Linux发行版,CoreOS,[发布于一年前][7]。 + +主要由两名前Rackspace工程师开发,[CoreOS][8]是一个轻量级Linux发行版,设计运行在集群中,被那些在网页上完成他们大部分或所有业务的公司所喜好的大规模环境。 + +CoreOS很快被许多云服务提供商采用,包括Microsoft Azure,Amazon网站服务,DigitalOcean以及Google计算引擎。 + +如同CoreOS一样,Ubuntu Core提供了一个快速引擎来更新组件,减少系统管理员去手动处理的时间。 + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2860401/cloud-computing/google-cloud-offers-streamlined-ubuntu-for-docker-use.html + +作者:[Joab Jackson][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Joab-Jackson/ +[1]:http://www.ubuntu.com/cloud/tools/snappy +[2]:http://www.infoworld.com/article/2607941/linux/how-to--get-started-with-docker.html +[3]:http://www.infoworld.com/blog/infoworld-tech-watch/ +[4]:http://www.ubuntu.com/cloud/tools/snappy +[5]:http://www.itworld.com/article/2695383/open-source-tools/docker-all-geared-up-for-the-enterprise.html +[6]:http://www.itworld.com/article/2695501/cloud-computing/google-unleashes-docker-management-tools.html +[7]:http://www.itworld.com/article/2696116/open-source-tools/coreos-linux-does-away-with-the-upgrade-cycle.html +[8]:https://coreos.com/using-coreos/ From 0bf1765da467dce15682a5966ea94df15ec1820f Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Sun, 15 Mar 2015 14:30:08 +0800 Subject: [PATCH 0274/2517] [translating] 20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md --- ...Press Can Be Used to Leverage Critical Ghost Flaw in Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md b/sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md index 3d132079a4..15eebc3ad5 100644 --- a/sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md +++ b/sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md @@ -1,3 +1,4 @@ +zpl1025 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux ----- *Users are advised to apply available patches immediately* From 454c6f142504ea4555da8c8f929663287bb1d6d8 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Sun, 15 Mar 2015 15:17:10 +0800 Subject: [PATCH 0275/2517] [translated] 20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md --- ...o Leverage Critical Ghost Flaw in Linux.md | 50 ------------------- ...o Leverage Critical Ghost Flaw in Linux.md | 49 ++++++++++++++++++ 2 files changed, 49 insertions(+), 50 deletions(-) delete mode 100644 sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md create mode 100644 translated/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md diff --git a/sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md b/sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md deleted file mode 100644 index 15eebc3ad5..0000000000 --- a/sources/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md +++ /dev/null @@ -1,50 +0,0 @@ -zpl1025 -WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux ------ -*Users are advised to apply available patches immediately* - -![WordPress validating pingback’s post URL](http://i1-news.softpedia-static.com/images/news2/WordPress-Can-Be-Used-to-Leverage-Critical-Ghost-Flaw-in-Linux-471730-2.jpg) - -**The vulnerability revealed this week by security researchers at Qualys, who dubbed it [Ghost](1), could be taken advantage of through WordPress or other PHP applications to compromise web servers.** - -The glitch is a buffer overflow that can be triggered by an attacker to gain command execution privileges on a Linux machine. It is present in the glibc’s “__nss_hostname_digits_dots()” function that can be used by the “gethostbyname()” function. - -##PHP applications can be used to exploit the glitch - -Marc-Alexandre Montpas at Sucuri says that the problem is significant because these functions are used in plenty of software and server-level mechanism. - -“An example of where this could be a big issue is within WordPress itself: it uses a function named wp_http_validate_url() to validate every pingback’s post URL,” which is carried out through the “gethostbyname()” function wrapper used by PHP applications, he writes in a blog post on Wednesday. - -An attacker could use this method to introduce a malicious URL designed to trigger the vulnerability on the server side and thus obtain access to the machine. - -In fact, security researchers at Trustwave created [proof-of-concept](2) code that would cause the buffer overflow using the pingback feature in WordPress. - -##Multiple Linux distributions are affected - -Ghost is present in glibc versions up to 2.17, which was made available in May 21, 2013. The latest version of glibc is 2.20, available since September 2014. - -However, at that time it was not promoted as a security fix and was not included in many Linux distributions, those offering long-term support (LTS) in particular. - -Among the impacted operating systems are Debian 7 (wheezy), Red Hat Enterprise Linux 6 and 7, CentOS 6 and 7, Ubuntu 12.04. Luckily, Linux vendors have started to distribute updates with the fix that mitigates the risk. Users are advised to waste no time downloading and applying them. - -In order to demonstrate the flaw, Qualys has created an exploit that allowed them remote code execution through the Exim email server. The security company said that it would not release the exploit until the glitch reached its half-life, meaning that the number of the affected systems has been reduced by 50%. - -Vulnerable application in Linux are clockdiff, ping and arping (under certain conditions), procmail, pppd, and Exim mail server. - --------------------------------------------------------------------------------- - -via:http://news.softpedia.com/news/WordPress-Can-Be-Used-to-Leverage-Critical-Ghost-Flaw-in-Linux-471730.shtml - -本文发布时间:30 Jan 2015, 17:36 GMT - -作者:[Ionut Ilascu][a] - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/ionut-ilascu -[1]:http://news.softpedia.com/news/Linux-Systems-Affected-by-14-year-old-Vulnerability-in-Core-Component-471428.shtml -[2]:http://blog.spiderlabs.com/2015/01/ghost-gethostbyname-heap-overflow-in-glibc-cve-2015-0235.html diff --git a/translated/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md b/translated/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md new file mode 100644 index 0000000000..356fe136d2 --- /dev/null +++ b/translated/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md @@ -0,0 +1,49 @@ +WordPress可以用来触发Linux上的Ghost缺陷 +----- +*建议用户马上更新可用的补丁* + +![WordPress validating pingback’s post URL](http://i1-news.softpedia-static.com/images/news2/WordPress-Can-Be-Used-to-Leverage-Critical-Ghost-Flaw-in-Linux-471730-2.jpg) + +**这个漏洞于本周由Qualys的安全研究员发现,并取了绰号叫[Ghost](1),可以利用WordPress或其他PHP应用来攻击网站服务器。** + +这个瑕疵是一个缓冲区溢出问题,可以被攻击者触发用来获取Linux主机的命令行执行权限。发生在glibc的“__nss_hostname_digits_dots()”函数中,它会被“gethostbyname()”函数用到。 + +##PHP应用可以用来利用这个瑕疵 + +Sucuri的Marc-Alexandre Montpas说之所以这个问题很重要是因为这些函数在大量软件和服务器系统使用。 + +“说这是个严重问题的一个例子是WordPress本身:它使用一个叫wp_http_validate_url()的函数来验证每个pingback的发送URL,它是通过PHP应用的“gethostbyname()”函数替代来执行的”,他在周三的一篇博客文章里写到。 + +攻击者可以用这种方式来引入一个设计用来触发服务器端漏洞的恶意URL,从而获得系统访问权限。 + +实际上,Trustwave的安全研究人员提供了[验证][2]代码,可以使用WordPress的pingback功能引起缓冲区溢出。 + +##多个Linux发行版受到影响 + +ghost漏洞存在于glibc 2.17以上版本中,发布于2013年5月21日。glibc当前版本是2.20,发布于2014年9月。 + +不过,当时并没有升级为一个安全补丁,许多发行版并没有包含进去,特别是提供长期支持(LTS)的发行版。 + +受影响的系统包括Debian 7(wheezy),Red Hat企业版Linux 6和7,CentOS 6和7,Ubuntu 12.04。幸运的是,Linux供应商已经开始发布可以减轻风险的升级补丁。建议用户马上下载并更新。 + +为了展示这个漏洞,Qualys建立了一个利用它通过Exim邮件服务器运行远程代码的试验页面。这家安全公司声称在这个漏洞丢掉半条命之前不会关闭这个页面,意思是受影响的系统的数量降到50%的水平。 + +Linux上存在漏洞的应用包括clockdiff,ping和arping(在某些特定情况下),procmail,pppd,和Exim邮件服务器。 + +-------------------------------------------------------------------------------- + +via:http://news.softpedia.com/news/WordPress-Can-Be-Used-to-Leverage-Critical-Ghost-Flaw-in-Linux-471730.shtml + +本文发布时间:30 Jan 2015, 17:36 GMT + +作者:[Ionut Ilascu][a] + +译者:[zpl1025](https://github.com/zpl1025) + +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/ionut-ilascu +[1]:http://news.softpedia.com/news/Linux-Systems-Affected-by-14-year-old-Vulnerability-in-Core-Component-471428.shtml +[2]:http://blog.spiderlabs.com/2015/01/ghost-gethostbyname-heap-overflow-in-glibc-cve-2015-0235.html From 77df4e5e44097a8805f6c3e924fa6d583e75c74f Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Sun, 15 Mar 2015 15:20:12 +0800 Subject: [PATCH 0276/2517] [translating] 20150306 How to Setup lftp--A Simple Command line FTP Program.md --- ...306 How to Setup lftp--A Simple Command line FTP Program.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md b/sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md index b4fe88cd12..ad5f1da84c 100644 --- a/sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md +++ b/sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md @@ -1,3 +1,4 @@ +zpl1025 How to Setup lftp - A Simple Command line FTP Program ================================================================================ Hi everyone, this article is about Lftp and how we can install Lftp in our Linux Operating System. [Lftp][1] is a command line based File Transfer Software also known as FTP Client which was developed by Alexander Lukyanov and was distributed as GNU General Public License. Besides FTP, it also supports FTPS, HTTP, HTTPS, HFTP, FISH, and SFTP. The program also supports FXP, allowing for data transfers between two FTP servers bypassing the client machine. @@ -171,4 +172,4 @@ via: http://linoxide.com/linux-how-to/setup-lftp-command-line-ftp/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:http://lftp.yar.ru/ \ No newline at end of file +[1]:http://lftp.yar.ru/ From a8ef75d88d73d841fca04516ca3715849310d825 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Sun, 15 Mar 2015 15:24:08 +0800 Subject: [PATCH 0277/2517] translated --- ...ocal Network Between Ubuntu And Windows.md | 178 ------------------ ...ocal Network Between Ubuntu And Windows.md | 176 +++++++++++++++++ 2 files changed, 176 insertions(+), 178 deletions(-) delete mode 100644 sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md create mode 100644 translated/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md diff --git a/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md b/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md deleted file mode 100644 index 28c93ea5fd..0000000000 --- a/sources/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md +++ /dev/null @@ -1,178 +0,0 @@ -[translating by KayGuoWhu] -Share Folders On Local Network Between Ubuntu And Windows -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_windows.jpeg) - -This is a complete tutorial to show you **how to share folders over local network in Ubuntu**. - -Do you have multiple devices in your home? Do you have to use Flash Drive or SD card to transfer data from Ubuntu to another computer? Do you find it annoying? We know you do. Because we don’t want you to waste your precious time while you can transfer your files, documents and other large stuff quickly and easily, over the local network. It’s one time setup and then with some clicks you will be able to **share files between Ubuntu and Windows** or any other Linux system. And don’t worry it’s easy and takes only little time. - -One more thing to add, while we performed this tutorial on Ubuntu, this tutorial should be valid for any other Linux OS. - -#### Share folder on local network in Ubuntu #### - -If you are using Ubuntu 14.04, 14.10 or 12.04, there are two ways you can share your local files over the local network to access it from Windows or other Linux computers. - -- Share it for everyone’s access on local network, without password -- Password protect the folders for restricted access - -We’ll see both methods in this post and will let you decide which one you would prefer to use. - -### 1. Share folders on local network without password ### - -#### Step 1: #### - -To share a folder on local network in Ubuntu, right click on the desired folder and select Local Network Share: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Share_Folder_Ubuntu.jpeg) - -**Possible troubleshoot**: If do not see the option of Local Network Share in right click menu, open a terminal and use the following command to install nautlius-share: - - sudo apt-get install nautilus-share - -You’ll need to restart Nautilus. Either log out and log in back or use the command below: - - nautilus -q - -#### Step 2: #### - -When you click on Local Network Share, you will see the option of sharing the folder. Just check the option of Share this folder: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_1.jpeg) - -Possible troubleshoot: If you are prompted about Sharing service not being installed, like in the screenshot below, just click on Install service and follow the instructions. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_2.jpeg) - -#### Step 3: #### - -When you check the option of Share this folder, you’ll see option of Create Share available for you. You can also allow other users to edit the files in the shared folder. Option for guest access can be checked as well. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_folder_Ubuntu_3.png) - -You’ll see that the folder icon have been changed to show that it has been shared. To stop sharing a folder, just uncheck the Share this folder option. - -Now this was the easy way out. This provides access to anyone on your local network to access these files. In normal condition, you should prefer this. I mean, devices on your home network should be generally know devices. But this could not be the case always. What if you want only certain people to access it? This is where Samba server comes in picture. We’ll see that in the second part of the tutorial. - -### 2. Share the folders on local network in Ubuntu with password protection ### - -To do this, we need to configure Samba server. Actually, we did use Samba in the previous part of this tutorial. We just did not emphasize on it. Before we go on seeing how to set up Samba server for local network sharing in Ubuntu, let’s first have a quick look on what actually is [Samba][1]. - -#### What is Samba? #### - -Samba is the software package that allows you to share files, documents and printers across a network, irrespective of whether you are using Linux, Windows and Mac. It’s available for all major platforms and can work tremendously nice in all of them. Quoting from Wikipedia: - -> Samba a free software re-implementation of the SMB/CIFS networking protocol, and was originally developed by Andrew Tridgell. As of version 3, Samba provides file and print services for various Windows Clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a domain member. It can also be part an Active Directory domain. - -#### Install Samba server on Ubuntu #### - -You can easily install Samba on you Ubuntu box. Before installing update your system so that you can install any available updates. - - sudo apt-get update && apt-get upgrade - -Now install Samba serer and few other required stuffs with the following command: - - sudo apt-get install samba samba-common system-config-samba python-glade2 gksu - -Once you’ve installed Samba server, it’s time to configure Samba from the graphical interface window to share files. - -#### Configure Samba server on Ubuntu #### - -Open Samba Configuration tool from the dash: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Setup-Samba.png) - -Go to **Preference->Server Settings**. Although the default settings are good and may be same you need. But you may need to make change to it in some cases. - -Now in Server Settings you’ve two tabs, ‘Basic’ and ‘Security’. Under Basic tab you’ve the following options that mean: - -- Workgroup – This is the name of the Workgroup of the computer you want to connect to. For example, if you want to connect to a Windows computer so you will enter the workgroup name of Windows computer, and in Windows you already have the same workgroup name as is set by default in Samba Server Settings. But if you have a different workgroup name on Windows then you will enter that workgroup name in this field. (In Windows 7 to get the workgroup name, right-click Computer icon and go to Properties, there you’ll see Windows Workgroup name.) -- Description – This is the name of your computer as seen by others. Don’t use spaces or non-internet friendly characters. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/samba-server-settings.png) - -setting up samba serverAllowing ‘Guests’ is not advisable so there is no reason to change security settings. Keep as it is. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Samba-Security-Settings-compressed.jpg) - -Samba Security security settingsIt is all done! You’ve setup Samba Server. We are not far from sharing our first folder on network. - -#### Create a system user for network file sharing #### - -We will now create a system user for sharing file on network. This is how simple it is. - -- Go to **System Settings**. -- Under Systems Settings Click **User Accounts**. -- Click **unlock** to Enable + (**plus**) icon. -- Click + (plus) icon to create a new system user. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/create-system-user1.jpg) - -Now as you can see the above image, you can enter ‘Full name’. As you enter ‘Full name’ Username will be taken as Full name automatically. Because we are creating this user to share files so we will assign Account Type to ‘**Standard**‘. - -Done above steps? Click add. You have created a system user. The user is not yet activated so we will activate it by setting up password for this account. Make sure Users accounts panel is unlocked. Click Account disabled and type a new password, then confirm password and click Change. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/activate-system-user.jpg) - -Yipee… Upto now we have installed and configured Samba and We have created a System user to share files on network from the account and we have activated our newly created account, too. Now We will move to Samba for the last step of configuring everything, then we will share a folder. - -#### Add new Samba user #### - -Open Samba and click Samba Users under Preference. Fill up the the simple dialogue. Here are couple of details about the fields: - -**Unix Username** – In this case I am selecting the user that I just created. - -**Windows Username** – You will enter this username when you are accessing from Windows Machine. - -**Samba Password** – You will enter this password when you are accessing from Windows Machine. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/samba-user-setting.jpg) - -Once you’ve done click OK. Now take a deep breath. You have successfully created a network with the help of Samba. Now restart the network or Samba services and ready to share files with other machines. - - sudo restart smbd && sudo restart nmbd - -#### Share folders or files over the network #### - -To share files with Samba it’s simple with graphical user interface. Click the Plus icon in Samba and you will get dialogue like this: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/share-files-and-folders.jpg) - -share files and folders over network with sambaComplete the fields. In ‘Directory‘ browse the folder you want to share. Here are the details about the fields you will see here: - -- **Share name** is the name of the folder that other would see. -- **Description** is simply about the content you are sharing on network. -- **Writable** You shared folders are ‘read only’ by default. You can set them to writable if you want others on network to change them. -- **Visible** As the name suggests when you click Visible, the shared folder will be visible to the people on network. - -Now you can set permissions for the folder you are sharing. To do this click ‘Access’ tab and check the users you want to share the folder with. When you select Allow access to everyone, the folder will be accessible to everyone on the network. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Screenshot-from-2015-02-28-202031.png) - -Finally click OK to complete the sharing. Now the folder is shared with the people you want. You have completed sharing file on network. Is there everything left? Yes! How to remove the folders from the network? - -#### Remove shared folders #### - -We will also need to remove some of the folders after sometime from network. It is very simple and here is how we can do that. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/remove-shared-folder-from-network.jpg) - -This is all done! We can also share files over network using terminal but that would not be as easy as this one. If you request for command line sharing then I will write a tutorial on how to share files over network with command line in Linux. - -So, how do you find this tutorial to share files on local network in Ubuntu? I hope with this tutorial you can **easily share files between Ubuntu and Windows**. If you have questions or suggestions, feel free to ask it in the comment box below. - -This tutorial was requested by Kalc. If you would like, you can [request your own tutorial][2]. We would be happy to help you out along with other readers facing the same issue. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/share-folders-local-network-ubuntu-windows/ - -作者:[Mohd Sohail][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/sohail/ -[1]:http://en.wikipedia.org/wiki/Samba_%28software%29 -[2]:http://itsfoss.com/request-tutorial/ \ No newline at end of file diff --git a/translated/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md b/translated/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md new file mode 100644 index 0000000000..972486fbf0 --- /dev/null +++ b/translated/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md @@ -0,0 +1,176 @@ +局域网中实现Ubuntu和Windows共享文件夹 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_windows.jpeg) + +本文全面详细地向你描述了**在Ubuntu中如何实现局域网内的文件夹共享**。 + +你的家中是不是有多台电脑?当你需要从一台Ubuntu电脑向另一台电脑传输数据时,是不是必须用到U盘或SD卡?你是否也觉得这个方法很烦人?我想肯定是。本文的目的就是使你在局域网内快速方便地传输文件、文档和其它较大的数据,来节省你的宝贵时间。只需一次设置,然后轻点鼠标,你就可以自由地**在Ubuntu和Windows之间共享文件**,当然这对其它Linux系统同样使用。不要担心这很容易操作,不会花费太多时间。 + +除此之外,尽管本文是在Ubuntu上进行实践,但这个教程在其它Linux系统上同样有用。 + +#### 在Ubuntu上实现局域网共享文件夹 #### + +如果你的系统是Ubuntu 14.04、14.10或12.04,有两个方法可以使你通过局域网在搭载Windows或其他Linux的电脑上共享本地文件。 + +- 对局域网中的每个用户提供无密码共享 +- 仅限特定访问,提供文件夹密码保护 + +这篇文章包括两种方法,你可以选择你想用的那种。 + +### 1. 局域网无密码共享文件夹 ### + +#### 步骤一:#### + +为了在Ubuntu上实现局域网共享文件夹,右键点击打算共享的文件夹,并选择“Local Network Share”: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Share_Folder_Ubuntu.jpeg) + +**可能有用的故障方案**:如果在右键菜单中看不到“Local Network Share”的选项,那就新建一个终端,使用下面的命令去安装nautlius-share: + + sudo apt-get install nautilus-share + +然后重启Nautilus。可以选择注销再登录,或者使用这个命令: + + nautilus -q + +#### 步骤二:#### + +一旦点击“Local Network Share”,就会出现共享文件夹的选项。只需选中“Share this folder”这一项: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_1.jpeg) + +可能的故障方案:如果提示共享服务还未安装,就像下图所示,那就点击安装服务,按照提示操作。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_2.jpeg) + +#### 步骤三:#### + +一旦选中“Share this folder”的选项,就会看到按钮“Create Share”变成可用了。你也可以允许其他用户在共享文件夹中编辑文件。选项“Guest access”也是如此。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_folder_Ubuntu_3.png) + +你会看到文件夹图标已经显示为共享的。如果要停止共享文件夹,只需取消“Share this floder”这个选项。 + +这个方法就是这么简单,使得局域网中的任何人都可以访问共享文件夹中的文件。在正常情况下,你会选择这种方式。因为,家用局域网中的电脑通常都是可信电脑。但情况也不总是这样。如果你只是想特定的用户才能访问怎么办?这个时候就需要Samba服务器了。我们在本文的第二部分讨论这种方法。 + +### 2. 在Ubuntu上使用密码保护实现局域网共享文件夹### + +为了达到目的,首先需要配置Samba服务器。事实上,在这篇教程的前一部分我们已经用到了Samba,只是我们没有刻意强调。在介绍如何在Ubuntu上搭建Samba服务器实现局域网共享的方法之前,先快速预览一下[Samba][1]到底是什么。 + +#### Samba是什么? #### + +Samba是一个允许用户通过网络共享文件、文档和打印机的软件包,无论是在Linux、Windows,还是Mac上。它适用于所有的主流平台,可以在所有支持系统上流畅运行。下面是维基百科的介绍: + +> Samba是一款重新实现SMB/CIFS网络协议的自由软件,最初由安德鲁·垂鸠开发。在第三版中,Smaba不仅支持通过不同的Windows客户端访问及分享SMB的文件夹及打印机,还可以集成到Windows Server域名,作为主要域名控制站(PDC)或者域名成员。它也可以作为Active Directory域名的一部分。 + +#### 在Ubuntu上安装Samba服务器 #### + +你可以很方便地在Ubuntu电脑上安装Samba。安装前,请先更新系统以便安装任何可用的更新。 + + sudo apt-get update && apt-get upgrade + +然后按照这条命令安装samba和少量所需的软件包: + + sudo apt-get install samba samba-common system-config-samba python-glade2 gksu + +一旦安装完成Samba服务器,就可以从图形界面配置Samba来分享文件。 + +#### 在Ubuntu上配置Samba服务器 #### + +从dash打开Samba配置工具: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Setup-Samba.png) + +进入到**Preference->Server Settings**。尽管默认已经设置好,可能就是你需要的。但在某些情况下你可能需要做一些改动。 + +在Server Setting中可以看到两个选项卡,‘Basic’和‘Security’。在Basic选项卡下的选项含义如下: + +- 工作组 - 用户要连接的电脑所在工作组的名字。比如,如果你想连接到一台Windows电脑,你就要输入Windows电脑的工作组名字。在Windows的Samba服务器设置中,已经默认设置好统一的工作组名字。但如果你有不同的工作组名字,就在这个字段中输入自定义的工作组名字。(在Windows 7中获取工作组名字,右击计算机图标,进到属性,就能看到Windows工作组名字。) +- 描述 - 其他用户看到的你的电脑名字。不要使用空格或计算机不支持(望更正!)的字符。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/samba-server-settings.png) + +设置samba服务器允许‘Guests’可用是不明智的,所以没必要修改安全设置,保持原样即可。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Samba-Security-Settings-compressed.jpg) + +这就搞定了!你已经搭建好Samba服务器,距离实现网络共享第一个文件夹的目标不远了! + +#### 为网络文件共享创建一个系统用户 #### + +现在我们需要为网络共享文件创建一个系统用户。下面是非常简单的步骤: + +- 在Systems Settings下点击**User Accounts**。 +- 点击**unlock**使其可用,以及+(**plus**)图标。 +- 点击+(plus)图标,创建一个新的系统用户。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/create-system-user1.jpg) + +如上图所示,需要输入‘Full name’。当你输入‘Full name’时,Username会自动填充为Full name。因为创建这个用户是为了共享文件,所以还要指定Account Type为‘**Standard**’。 + +完成上述步骤,点击添加,你就创建好一个系统用户。这个用户还没有被激活,所以需要为其设置密码来激活。确保Users accounts界面已经解锁。点击Account disabled。输入一个新密码,然后确认密码,点击Change。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/activate-system-user.jpg) + +耶!到目前为止我们已经安装并配置好Samba,已经创建了一个系统用户以通过这个账户在网络上共享文件,而且也已经激活了新用户。现在来到配置Samba的最后一步,然后就可以共享文件夹了。 + +#### 添加Samba新用户 #### + +打开Samba,在Preference先点击Samba Users。填写弹出的对话框,下面是其中几个字段的说明: + +**Unix Username** - 在这种情况下,我选择刚才创建的用户。 + +**Windows Username** - 输入你要访问的Windows电脑的用户名。 + +**Samba Password** - 输入你要访问的Windows电脑的密码。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/samba-user-setting.jpg) + +完成后点击OK。现在做个深呼吸。你已经在Samba的帮助下成功创建一个网络。然后重启网络或Samba服务,准备好和其它电脑共享文件。 + + sudo restart smbd && sudo restart nmbd + +#### 通过网络共享文件夹或文件 #### + +在图形用户界面下通过Samba共享文件是很简单的。点击Plus图标,会看到如图所示的对话框: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/share-files-and-folders.jpg) + +填写完这些字段。在‘Directory’中,浏览要共享的文件夹。你会看到的字段的含义如下: + +- **Share name** 是其它人会看到的文件夹名字。 +- **Description** 是要共享内容的简单描述。 +- **Writeable** 默认情况下共享的文件夹是‘read only’。如果允许网络上的其他用户修改它们,设置为writable。 +- **Visiable** 当你点击Visiable时,就像它的名字一样,共享文件夹就对网络上的其他人可见。 + +现在你可以设置共享文件夹的权限。点击‘Access’选项,选择想要共享文件夹的用户。当你选择对所有人允许访问后,这个文件夹就对网络上的所有人可见。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Screenshot-from-2015-02-28-202031.png) + +最后点击OK,完成共享。现在这个文件夹就与你想要共享的用户实现共享。你已经完成了网络共享文件。还有其它要做的吗?对!还不知道如何从网络上移除文件夹? + +#### 移除共享文件夹 #### + +在网络共享一段时间后,我们也需要移除其中的一些文件夹。操作很简答,下面就是我们要做的。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/remove-shared-folder-from-network.jpg) + +全部搞定!我们也可以使用终端进行网络文件共享,但这样没有本文介绍的方法这么容易。如果你确实想知道命令行操作,我会再写一篇关于在Linux上使用命令行实现网络文件共享的文章。 + +所以,你是怎么找到这篇教程的呢?我希望看了这篇教程你可以**很容易地在Ubuntu和Windows之间共享文件**。如果你有任何问题或建议,请再评论里说出来。 + +这篇教程是在Kalc的请求下写出的。如果你也想,你可以[请求你自己的教程][2]。我们很乐意帮助你和面临同样问题的读者解决问题。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/share-folders-local-network-ubuntu-windows/ + +作者:[Mohd Sohail][a] +译者:[KayGuoWhu](https://github.com/KayGuoWhu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/sohail/ +[1]:http://en.wikipedia.org/wiki/Samba_%28software%29 +[2]:http://itsfoss.com/request-tutorial/ From 95dfc87718637f0dcfb533d38e9fff2051958add Mon Sep 17 00:00:00 2001 From: LouisWei Date: Sun, 15 Mar 2015 22:23:48 +0800 Subject: [PATCH 0278/2517] translated wi-cuckoo --- ...ux Games We Will See In 2015 And Beyond.md | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 translated/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md diff --git a/translated/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md b/translated/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md new file mode 100644 index 0000000000..fc5d48aad4 --- /dev/null +++ b/translated/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md @@ -0,0 +1,136 @@ +预见我们将会在2015年及之后的Linux游戏 +================================================================================他们说Linux游戏开发已经死了,已经变得毫无意义...随他们说去吧.一起看看2015甚至以后会为我们带来什么游戏. + +真的很难跟上为我们出现的每一样事物,但是可以快速浏览一下我们将会看到的变化. + +### 已确认的游戏 ### + +#### 冒险游戏 #### + +- [看火人][1] +- [失落的天堂:初探][2] +- [蒸汽世界:浩劫][3] + +#### 动作游戏 #### + +- [暗黑血统][4] +- [暗黑血统2][5] +- [尸人的世界][6] +- [骷髅女孩][7] + +#### 第一人称游戏 #### + +- [生化奇兵:永恒][8] +- 半条命 3 /troll      #此处troll不知道如何翻译 +- [烽火家园:革命][9] +- [杀戮空间 2][10] +- 英雄萨姆 4(目前无官方站点) +- [联合风暴][11] +- [烈火击杀][12] + +#### 平台游戏 #### + +- [武装原型][13] +- [峡谷][14] #此处游戏名尚不确定 +- [吉安娜姐妹][15] +- [心之所向:Alicia][16] +- [ ][17] #此处游戏名未知 +- [无限工厂][18] +- [无敌9号][19] +- [林中之夜][20] +- [夜][21] +- [奇异的世界:新鲜可口][22] +- [真红女神][23] + +#### 角色扮演游戏 #### + +- [神界:原罪][24] +- [永恒之柱][25] +- [暗影狂奔:香港][26] +- [旗帜的传说][27] + +#### 策略游戏 #### + +- [奇迹时代3][28] +- [放逐之城][29] +- [城:天际][30] +- [发条帝国][31] +- [][32] +- [卷轴][33] +- [太空海盗和僵尸 2][34] + +#### 沙盒游戏 #### + +- [泰拉瑞亚][35] +- [X 重生][36] + +#### 不太确认,不过可能性高 #### + +- [英雄连][37] +- [逃生][38] +- [影子武士][39] +- [火炬之光 2][40] + +然而有两个来自Feral Interactive的,由于不知道他们是什么,所以没有列举出来. + +我们猜测Aspyr也在准备新的大制作,但是他们仅仅发布了他们最新的游戏,所以可能要等上几个月我们才能看到些什么. + +当然,** 这不是完整的列表 **,我们会轻易忘记巨量的游戏正在走向我们,哇,如此丰富的列表. + +下个月就是游戏开发者大会,我们也期待一些改变发生.然而,我们没有什么确切的东西,对于Valve与Steam Machines的合作,我们期待至少会增加一些Linux游戏,否则,如我们担心,炫耀一些过时的游戏会让Valve脸上无光. + +你怀念Linux的哪些地方曾让你兴奋? + +-------------------------------------------------------------------------------- + +via: http://www.gamingonlinux.com/articles/a-look-at-what-linux-games-we-will-see-in-2015-and-beyond.4963 + +作者:[liamdawe][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.gamingonlinux.com/profiles/1 +[1]:https://www.gamingonlinux.com/articles/category/17/articles/firewatch-a-first-person-mystery-game-finally-reveals-itself-in-a-trailer.4231 +[2]:http://www.asthreeworks.com/games/ +[3]:https://www.gamingonlinux.com/articles/category/17/articles/image-form-announces-steamworld-heist.4304 +[4]:https://www.gamingonlinux.com/articles/darksiders-linux-port-looks-like-it-is-still-happening.4893 +[5]:https://www.gamingonlinux.com/articles/darksiders-2-confirmed-for-linux.4154 +[6]:http://ragtagstudio.com/?page_id=457 +[7]:https://www.gamingonlinux.com/articles/editorial-skullgirls-on-linux-finally-shows-some-progress.4789 +[8]:https://www.gamingonlinux.com/articles/bioshock-infinite-looks-set-for-a-linux-release-confirmed.4668 +[9]:http://www.homefront-game.com/ +[10]:https://www.gamingonlinux.com/articles/category/17/articles/killing-floor-2-fps-has-a-new-trailer.4676 +[11]:https://www.gamingonlinux.com/articles/storm-united-online-fps-shows-first-real-gameplay-video-first-alpha-due-soon.4872 +[12]:http://superhotgame.com/ +[13]:http://steamcommunity.com/app/274190/discussions/0/540738051503306548/#c540738051518330743 +[14]:https://www.gamingonlinux.com/articles/category/17/articles/chasm-rpg-platformer-will-have-a-same-day-linux-release.4266 +[15]:https://www.gamingonlinux.com/articles/linux-port-of-platformer-giana-sisters-brought-inhouse-sequel-might-get-sameday-release.4913 +[16]:http://www.alonsomartin.mx/hfa/ +[17]:http://www.hottinroofgame.com/ +[18]:https://twitter.com/zachtronics/status/566016742825005057 +[19]:http://www.mightyno9.com/ +[20]:http://www.nightinthewoods.com/ +[21]:https://www.gamingonlinux.com/articles/category/17/articles/noct-a-fantastic-top-down-thermal-image-survival-horror-game.4783 +[22]:https://www.gamingonlinux.com/articles/puzzle-platformer-oddworld-new-n-tasty-will-release-for-linux-next-month.4836 +[23]:https://www.gamingonlinux.com/articles/new-trailer-for-platformer-red-goddesss-looks-really-good.4939 +[24]:https://www.gamingonlinux.com/articles/divinity-original-sin-is-pushing-ahead-for-the-linux-release.4938 +[25]:https://www.gamingonlinux.com/articles/pillars-of-eternity-the-rpg-aims-for-a-sameday-linux-release-on-march-26th.4834 +[26]:https://www.kickstarter.com/projects/webeharebrained/shadowrun-hong-kong +[27]:https://www.gamingonlinux.com/articles/the-banner-saga-rpg-looks-close-to-a-linux-version.4862 +[28]:https://www.gamingonlinux.com/articles/the-linux-port-of-age-of-wonders-iii-is-progressing-a-bit-too-explosive-right-now.4857 +[29]:https://www.gamingonlinux.com/articles/banished-survival-city-building-sim-is-being-ported-to-linux.4813 +[30]:https://www.gamingonlinux.com/articles/city-builder-game-cities-skylines-now-has-a-release-date.4954 +[31]:https://www.gamingonlinux.com/articles/clockwork-empires-still-pushing-towards-a-linux-version-suffering-delays.4734 +[32]:https://www.gamingonlinux.com/articles/category/17/articles/parkitect-what-roller-coaster-tycoon-should-have-grown-into.4528 +[33]:https://www.gamingonlinux.com/articles/mojangs-scrolls-now-has-an-experimental-linux-build.4450 +[34]:https://www.gamingonlinux.com/articles/space-pirates-and-zombies-2-reveals-the-zombies-in-a-brand-new-video.4759 +[35]:https://www.gamingonlinux.com/articles/terraria-officially-confirmed-to-be-in-development-for-linux-finally.4299 +[36]:https://www.gamingonlinux.com/articles/egosofts-x-rebirth-actively-being-ported-to-linux.4822 +[37]:https://www.gamingonlinux.com/articles/company-of-heroes-2-looks-like-it-is-heading-to-linux.4199 +[38]:https://www.gamingonlinux.com/articles/outlast-that-really-scary-game-looks-like-its-still-heading-to-linux.4896 +[39]:https://www.gamingonlinux.com/articles/shadow-warrior-looks-like-it-will-come-to-linux.4859 +[40]:https://www.gamingonlinux.com/articles/torchlight-ii-has-even-more-positive-signs-for-linux.4817 +[41]:http://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/ + From 08ab60cc63afdfab16cc1b225f161def5a1182ca Mon Sep 17 00:00:00 2001 From: lihaiming Date: Sun, 15 Mar 2015 23:20:35 +0800 Subject: [PATCH 0279/2517] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...who start writing kernel code get hired really quickly'.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md b/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md index 6d7e64f616..c06b482252 100644 --- a/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md +++ b/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md @@ -1,3 +1,5 @@ +translating by haiming + Torvalds: 'People who start writing kernel code get hired really quickly' ================================================================================ Now more than ever, the development of the Linux kernel is a matter for the professionals, as unpaid volunteer contributions to the project reached their lowest recorded levels in the latest "Who Writes Linux" report, which was released today. @@ -28,4 +30,4 @@ via: http://www.infoworld.com/article/2885339/application-development/torvalds-p 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.infoworld.com/author/Jon-Gold/ \ No newline at end of file +[a]:http://www.infoworld.com/author/Jon-Gold/ From 6a89282d9a9425525208ae36133112433a396a6d Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 15 Mar 2015 23:30:56 +0800 Subject: [PATCH 0280/2517] =?UTF-8?q?=E8=A1=A5=E5=85=85=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wi-cuckoo --- ...ux Games We Will See In 2015 And Beyond.md | 137 ------------------ 1 file changed, 137 deletions(-) delete mode 100644 sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md diff --git a/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md b/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md deleted file mode 100644 index bf99fd2154..0000000000 --- a/sources/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md +++ /dev/null @@ -1,137 +0,0 @@ -translating wi-cuckoo LLAP -A Look At What Linux Games We Will See In 2015 And Beyond -================================================================================ -Linux Gaming is dead they said, Linux Gaming is pointless they said...ah whatever. Here’s a look at what’s to come for us in 2015 and beyond. - -It's pretty hard to keep up with everything that's going on for us, but here's a quick look at what we could see soon. - -### Confirmed Games ### - -#### Adventure Games #### - -- [Firewatch][1] -- [Paradise Lost: First Contact][2] -- [SteamWorld Heist][3] - -#### Action Games #### - -- [Darksiders][4] -- [Darksiders II][5] -- [Ray's The Dead][6] -- [Skullgirls][7] - -#### FPS Games #### - -- [Bioshock Infinite][8] -- Half Life 3 /troll -- [Homefront: The Revolution][9] -- [Killing Floor 2][10] -- Serious Sam 4 (No official site for it yet) -- [Storm United][11] -- [SUPERHOT][12] - -#### Platformers #### - -- [Broforce][13] -- [Chasm][14] -- [Giana Sisters][15] -- [Heart Forth, Alicia][16] -- [Hot Tin Roof][17] -- [Infinifactory][18] -- [Mighty No. 9][19] -- [Night in the Woods][20] -- [Noct][21] -- [Oddworld: New 'N' Tasty][22] -- [Red Goddess][23] - -#### RPG Games #### - -- [Divinity: Original Sin][24] -- [Pillars Of Eternity][25] -- [Shadowrun: Hong Kong][26] -- [The Banner Saga][27] - -#### Strategy Games #### - -- [Age of Wonders III][28] -- [Banished][29] -- [Cities: Skylines][30] -- [Clockwork Empires][31] -- [Parkitect][32] -- [Scrolls][33] -- [Space Pirates And Zombies 2][34] - -#### Sandbox Games #### - -- [Terraria][35] -- [X Rebirth][36] - -#### Unconfirmed, but highly likely #### - -- [Company of Heroes 2][37] -- [Outlast][38] -- [Shadow Warrior][39] -- [Torchlight II][40] - -Then there’s the [two ports teased from Feral Interactive][41], we can’t let them be left out just because we don’t know what they are. - -We imagine Aspyr Media are also working on new bigger ports, but they have only just released their latest game, so it may be a few months until we see anything. - -**This isn't a complete list** of course, as we can easily forget with the sheer amount of games heading our way, and wow what a list! - -We have GDC next month, and we are expecting a few announcements too. While we don't have anything solid, with Valve's big presence with Steam Machines we are expecting at least some more Linux games, otherwise it we fear it may be a little lacklustre for Valve to only show off older existing games for Linux. - -What did we miss that you’re excited about for Linux? - --------------------------------------------------------------------------------- - -via: http://www.gamingonlinux.com/articles/a-look-at-what-linux-games-we-will-see-in-2015-and-beyond.4963 - -作者:[liamdawe][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.gamingonlinux.com/profiles/1 -[1]:https://www.gamingonlinux.com/articles/category/17/articles/firewatch-a-first-person-mystery-game-finally-reveals-itself-in-a-trailer.4231 -[2]:http://www.asthreeworks.com/games/ -[3]:https://www.gamingonlinux.com/articles/category/17/articles/image-form-announces-steamworld-heist.4304 -[4]:https://www.gamingonlinux.com/articles/darksiders-linux-port-looks-like-it-is-still-happening.4893 -[5]:https://www.gamingonlinux.com/articles/darksiders-2-confirmed-for-linux.4154 -[6]:http://ragtagstudio.com/?page_id=457 -[7]:https://www.gamingonlinux.com/articles/editorial-skullgirls-on-linux-finally-shows-some-progress.4789 -[8]:https://www.gamingonlinux.com/articles/bioshock-infinite-looks-set-for-a-linux-release-confirmed.4668 -[9]:http://www.homefront-game.com/ -[10]:https://www.gamingonlinux.com/articles/category/17/articles/killing-floor-2-fps-has-a-new-trailer.4676 -[11]:https://www.gamingonlinux.com/articles/storm-united-online-fps-shows-first-real-gameplay-video-first-alpha-due-soon.4872 -[12]:http://superhotgame.com/ -[13]:http://steamcommunity.com/app/274190/discussions/0/540738051503306548/#c540738051518330743 -[14]:https://www.gamingonlinux.com/articles/category/17/articles/chasm-rpg-platformer-will-have-a-same-day-linux-release.4266 -[15]:https://www.gamingonlinux.com/articles/linux-port-of-platformer-giana-sisters-brought-inhouse-sequel-might-get-sameday-release.4913 -[16]:http://www.alonsomartin.mx/hfa/ -[17]:http://www.hottinroofgame.com/ -[18]:https://twitter.com/zachtronics/status/566016742825005057 -[19]:http://www.mightyno9.com/ -[20]:http://www.nightinthewoods.com/ -[21]:https://www.gamingonlinux.com/articles/category/17/articles/noct-a-fantastic-top-down-thermal-image-survival-horror-game.4783 -[22]:https://www.gamingonlinux.com/articles/puzzle-platformer-oddworld-new-n-tasty-will-release-for-linux-next-month.4836 -[23]:https://www.gamingonlinux.com/articles/new-trailer-for-platformer-red-goddesss-looks-really-good.4939 -[24]:https://www.gamingonlinux.com/articles/divinity-original-sin-is-pushing-ahead-for-the-linux-release.4938 -[25]:https://www.gamingonlinux.com/articles/pillars-of-eternity-the-rpg-aims-for-a-sameday-linux-release-on-march-26th.4834 -[26]:https://www.kickstarter.com/projects/webeharebrained/shadowrun-hong-kong -[27]:https://www.gamingonlinux.com/articles/the-banner-saga-rpg-looks-close-to-a-linux-version.4862 -[28]:https://www.gamingonlinux.com/articles/the-linux-port-of-age-of-wonders-iii-is-progressing-a-bit-too-explosive-right-now.4857 -[29]:https://www.gamingonlinux.com/articles/banished-survival-city-building-sim-is-being-ported-to-linux.4813 -[30]:https://www.gamingonlinux.com/articles/city-builder-game-cities-skylines-now-has-a-release-date.4954 -[31]:https://www.gamingonlinux.com/articles/clockwork-empires-still-pushing-towards-a-linux-version-suffering-delays.4734 -[32]:https://www.gamingonlinux.com/articles/category/17/articles/parkitect-what-roller-coaster-tycoon-should-have-grown-into.4528 -[33]:https://www.gamingonlinux.com/articles/mojangs-scrolls-now-has-an-experimental-linux-build.4450 -[34]:https://www.gamingonlinux.com/articles/space-pirates-and-zombies-2-reveals-the-zombies-in-a-brand-new-video.4759 -[35]:https://www.gamingonlinux.com/articles/terraria-officially-confirmed-to-be-in-development-for-linux-finally.4299 -[36]:https://www.gamingonlinux.com/articles/egosofts-x-rebirth-actively-being-ported-to-linux.4822 -[37]:https://www.gamingonlinux.com/articles/company-of-heroes-2-looks-like-it-is-heading-to-linux.4199 -[38]:https://www.gamingonlinux.com/articles/outlast-that-really-scary-game-looks-like-its-still-heading-to-linux.4896 -[39]:https://www.gamingonlinux.com/articles/shadow-warrior-looks-like-it-will-come-to-linux.4859 -[40]:https://www.gamingonlinux.com/articles/torchlight-ii-has-even-more-positive-signs-for-linux.4817 -[41]:http://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/ From d3e7a582e1d1754e84202a406b1a82e8926a9b18 Mon Sep 17 00:00:00 2001 From: haimingli Date: Sun, 15 Mar 2015 23:38:36 +0800 Subject: [PATCH 0281/2517] Update 20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md --- ...e who start writing kernel code get hired really quickly'.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md b/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md index c06b482252..2e71467581 100644 --- a/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md +++ b/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md @@ -1,4 +1,4 @@ -translating by haiming +translating by haimingfg Torvalds: 'People who start writing kernel code get hired really quickly' ================================================================================ From 957e248741acdac3755c473c3217402cd8fb21c1 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 15 Mar 2015 23:44:56 +0800 Subject: [PATCH 0282/2517] PUB:20141219 Google Cloud offers streamlined Ubuntu for Docker use @zpl1025 --- ...offers streamlined Ubuntu for Docker use.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) rename {translated/news => published}/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md (61%) diff --git a/translated/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md b/published/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md similarity index 61% rename from translated/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md rename to published/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md index ab0bdc3210..c79d6de837 100644 --- a/translated/news/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md +++ b/published/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md @@ -2,23 +2,17 @@ Google云服务为Docker应用提供简化版Ubuntu ================================================================================ > Ubuntu Core为运行容器提供了最小的轻量级Linux环境 -Google为自己的云服务采用了一个简化版的Canonical Ubuntu Linux发行版,优化来运行Docker和其他容器。 +Google为自己的云服务采用了一个简化版的Canonical Ubuntu Linux发行版,以优化运行Docker和其他容器。 -Ubuntu Core被设计成仅提供在云上运行Linux所必需的组件。它的一个[早期预览版][1],Canonical命名为“Snappy”,在上个星期发布了。这个新版本裁减了大量在普通Linux发行版中常见而在云应用中不实用的库和应用程序。 +Ubuntu Core被设计成仅提供在云上运行Linux所必需的组件。它发布了一个[早期预览版][1],Canonical命名其为“Snappy”。这个新版本裁减了大量在普通Linux发行版中常见而在云应用中不实用的库和应用程序。 -[ 通过这篇red-hot开源框架逐步指导文章[开始使用Docker][2] | 从[InfoWorld的技术观察博客][3]获取重要技术新闻的最新解读。 ] - -Google计算引擎(GCE)[加入了Microsoft Azure][4]来支持这个新的发行版。 +Google计算引擎(GCE)和Microsoft Azure[加入了][4]支持这个新的发行版的行列。 从Canonical了解到,Ubuntu Core将为用户提供一个部署Docker的简单方式,一个[日益精简的虚拟容器][4]允许用户快速启动工作负载并轻松地转移,甚至可以跨越不同的云服务提供商。 -Google是Docker和基于容器的虚拟化的热心支持者。在六月份,这家公司[用开源的方式发布了一个容器管理软件][5]:Kubernetes。 +Google是Docker和基于容器的虚拟化的热心支持者。在去年六月份,这家公司[用开源的方式发布了一个容器管理软件][5]:Kubernetes。 -Ubuntu Core在设计上类似于另一个Linux发行版,CoreOS,[发布于一年前][7]。 - -主要由两名前Rackspace工程师开发,[CoreOS][8]是一个轻量级Linux发行版,设计运行在集群中,被那些在网页上完成他们大部分或所有业务的公司所喜好的大规模环境。 - -CoreOS很快被许多云服务提供商采用,包括Microsoft Azure,Amazon网站服务,DigitalOcean以及Google计算引擎。 +Ubuntu Core在设计上类似于另一个[发布于一年前][7]的 Linux发行版 CoreOS。CoreOS 主要由两名前Rackspace工程师开发,[CoreOS][8]是一个轻量级Linux发行版,设计运行在集群中,被那些在网页上完成他们大部分或所有业务的公司所喜好的大规模环境。CoreOS很快被许多云服务提供商采用,包括Microsoft Azure,Amazon网站服务,DigitalOcean以及Google计算引擎。 如同CoreOS一样,Ubuntu Core提供了一个快速引擎来更新组件,减少系统管理员去手动处理的时间。 @@ -28,7 +22,7 @@ via: http://www.infoworld.com/article/2860401/cloud-computing/google-cloud-offer 作者:[Joab Jackson][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a1afc414e34ec7876ba237d9534a2cdfc1722544 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 15 Mar 2015 23:50:50 +0800 Subject: [PATCH 0283/2517] PUB:20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux @zpl1025 --- ...to Leverage Critical Ghost Flaw in Linux.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) rename {translated/news => published}/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md (75%) diff --git a/translated/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md b/published/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md similarity index 75% rename from translated/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md rename to published/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md index 356fe136d2..181ef5922d 100644 --- a/translated/news/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md +++ b/published/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md @@ -1,24 +1,24 @@ -WordPress可以用来触发Linux上的Ghost缺陷 +WordPress 可以触发 Linux 上的 Ghost 缺陷 ----- *建议用户马上更新可用的补丁* ![WordPress validating pingback’s post URL](http://i1-news.softpedia-static.com/images/news2/WordPress-Can-Be-Used-to-Leverage-Critical-Ghost-Flaw-in-Linux-471730-2.jpg) -**这个漏洞于本周由Qualys的安全研究员发现,并取了绰号叫[Ghost](1),可以利用WordPress或其他PHP应用来攻击网站服务器。** +**这个漏洞之前由Qualys的安全研究员发现,并取了绰号叫[Ghost](1),可以利用WordPress或其他PHP应用来攻击网站服务器。** -这个瑕疵是一个缓冲区溢出问题,可以被攻击者触发用来获取Linux主机的命令行执行权限。发生在glibc的“__nss_hostname_digits_dots()”函数中,它会被“gethostbyname()”函数用到。 +这个瑕疵是一个缓冲区溢出问题,可以被攻击者触发用来获取Linux主机的命令行执行权限。发生在glibc的“`__nss_hostname_digits_dots()`”函数中,它会被“gethostbyname()”函数用到。 -##PHP应用可以用来利用这个瑕疵 +###PHP应用可以用来利用这个瑕疵 Sucuri的Marc-Alexandre Montpas说之所以这个问题很重要是因为这些函数在大量软件和服务器系统使用。 -“说这是个严重问题的一个例子是WordPress本身:它使用一个叫wp_http_validate_url()的函数来验证每个pingback的发送URL,它是通过PHP应用的“gethostbyname()”函数替代来执行的”,他在周三的一篇博客文章里写到。 +“说这是个严重问题的一个例子是WordPress本身:它使用一个叫`wp_http_validate_url()`的函数来验证每个pingback的发送URL,它是通过PHP应用的“gethostbyname()”函数替代来执行的”,他在周三的一篇博客文章里写到。 攻击者可以用这种方式来引入一个设计用来触发服务器端漏洞的恶意URL,从而获得系统访问权限。 实际上,Trustwave的安全研究人员提供了[验证][2]代码,可以使用WordPress的pingback功能引起缓冲区溢出。 -##多个Linux发行版受到影响 +###多个Linux发行版受到影响 ghost漏洞存在于glibc 2.17以上版本中,发布于2013年5月21日。glibc当前版本是2.20,发布于2014年9月。 @@ -32,15 +32,13 @@ Linux上存在漏洞的应用包括clockdiff,ping和arping(在某些特定 -------------------------------------------------------------------------------- -via:http://news.softpedia.com/news/WordPress-Can-Be-Used-to-Leverage-Critical-Ghost-Flaw-in-Linux-471730.shtml +via: http://news.softpedia.com/news/WordPress-Can-Be-Used-to-Leverage-Critical-Ghost-Flaw-in-Linux-471730.shtml 本文发布时间:30 Jan 2015, 17:36 GMT 作者:[Ionut Ilascu][a] - 译者:[zpl1025](https://github.com/zpl1025) - -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2f6b72e762580fe85540649bada67b8d544b653a Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 16 Mar 2015 00:18:56 +0800 Subject: [PATCH 0284/2517] PUB:20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wi-cuckoo 翻译的文章有一些小小的不足,请注意一下: 1、标点符号,请在翻译过程中变成中文的。 2、markdown 格式保留不动,比如你的译文中,把链接都给丢失了。 3、文章内的小标题不要忘记翻译了。 --- ...ilia-Romagna Is Switching To OpenOffice.md | 39 +++++++++++++++++++ ...ilia-Romagna Is Switching To OpenOffice.md | 38 ------------------ 2 files changed, 39 insertions(+), 38 deletions(-) create mode 100644 published/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md delete mode 100644 translated/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md diff --git a/published/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md b/published/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md new file mode 100644 index 0000000000..4ebb83401f --- /dev/null +++ b/published/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md @@ -0,0 +1,39 @@ +意大利艾米利亚-罗马涅大区正在切换到OpenOffice +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Turin_Open_Source.jpg) + +在拥抱开源的道路上,意大利似乎走在了最前面。我们已经知道,很多意大利的城市如[乌迪内][1],[都灵][2],[Todi和都灵][3]过去已经选择了[开源办公套件以取代微软的Office][4]。现在,位于意大利北部的[艾米利亚-罗马涅大区][5](位于意大利北部,是意大利20个大区之一)也将在下个月完成向[Apache OpenOffice][6]的过渡。 + +### 切换到 OpenOffice ### + +这次向OpenOffice的迁移将会在下个月完成,而且将会覆盖4200个计算机工作站,涉及到10个部门和5个代理机构。 而且,开源文档格式(ODF)也将成为默认的文档格式。向OpenOffice的过渡最初在2013年底被提出来,原本打算在2014年底完成。这次从商业办公产品改用OpenOffice,从授权费用来说,据信会[节约大概2 000 000欧元][7]。 + +为了使这次顺利搬家和方便内部操作,负责这次搬家的团队正在开发许多定制工具和插件。 + +本次项目的负责人,Giovanni Grazia对本次“搬家”充满激情,但同时他也做好了应对批评的准备: + +> “改用新的办公套件并不是一件容易完成的工作,我们借这次机会来拥护免费和开源的软件。一些地区的公务员表示高度支持,而另一些则感到厌烦,因为他们已经使用商业产品二十年了。为了处理任何在迁移中发生的问题,一个有着三个IT专家的五人支持团队正在一个部门接一个部门,逐渐地完成这次迁移。” + +### 祝愿 ### + +我希望其他的国家也能使用OpenOffice套件,祝愿所有迁移到开源软件的人或国家都顺利完成。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/emiliaromagna-completes-switch-openoffice/ + +作者:[Abhishek][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://linux.cn/article-3853-1.html +[2]:http://linux.cn/article-3602-1.html +[3]:http://itsfoss.com/italian-cities-switch-libreoffice/ +[4]:http://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[5]:http://en.wikipedia.org/wiki/Emilia-Romagna +[6]:https://www.openoffice.org/ +[7]:http://www.slwoods.co.uk/?p=2886 +[8]:http://itsfoss.com/french-city-toulouse-saved-1-million-euro-libreoffice/ diff --git a/translated/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md b/translated/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md deleted file mode 100644 index 0dfbfce001..0000000000 --- a/translated/news/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md +++ /dev/null @@ -1,38 +0,0 @@ -意大利Emilia-Romagna区正在切换到OpenOffice -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Turin_Open_Source.jpg) - -在拥抱开源的道路上,意大利似乎走在了最前面.我们已经知道,很多意大利的城市如Udine,Turin,Todi和Turin过去已经选择了开源办公套件以取代微软的Office.现在,位于意大利北部的Emilia-Romagna区也将在下个月完成向Apache OpenOffice的过渡. - -### Switching to OpenOffice ### - -这次向OpenOffice的转变将会在下个月完成,而且将会覆盖4200个工作站,涉及到10个部门和5个代理部门. 而且,开源文档格式(ODF)也将成为默认的文档格式.向OpenOffice的过渡最初在2013年底被提出来,原本打算在2014年底完成.这次改用OpenOffice从专用办公产品认证费用来说,相信会节约大概2 000 000欧元. - -为了使这次搬家顺利,提高内部可操作性,许多定制工具和插件也正在被负责这次搬家的团队开发出来. - -本次项目的负责人,Giovanni Grazia对本次"搬家"充满激情,但同时他也会做好应对批评 -> "改用新的办公套件不是容易完成的工作,我们借这次机会来拥护免费和开源的软件.一些地区的公务员表示深深的支持,而令一些则感到厌烦, 因为他们已经使用专业产品二十年了.为了处理任何在转变中发生的问题,一个有五个支持人员的团队已经得到了三个IT专家的支持.一个部门接一个部门,逐渐地,我们将完成这次过渡.一步步的,改变正在发生." - -#### Best wishes #### - -我希望祝Grazia好运,其他的意大利辖区也会使用OpenOffice套件.也希望像法国这样的邻国也会加速拥抱开源的进程. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/emiliaromagna-completes-switch-openoffice/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/udine-open-source/ -[2]:http://itsfoss.com/italian-city-turin-open-source/ -[3]:http://itsfoss.com/italian-cities-switch-libreoffice/ -[4]:http://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ -[5]:http://en.wikipedia.org/wiki/Emilia-Romagna -[6]:https://www.openoffice.org/ -[7]:http://www.slwoods.co.uk/?p=2886 -[8]:http://itsfoss.com/french-city-toulouse-saved-1-million-euro-libreoffice/ From 13098dca89bd175032d016906e08f6bfdef55841 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sun, 15 Mar 2015 21:00:06 -0300 Subject: [PATCH 0285/2517] translated --- ...ls' Command Interview Questions--Part 2.md | 33 ++----------------- 1 file changed, 3 insertions(+), 30 deletions(-) rename {sources => translated}/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md (63%) diff --git a/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md b/translated/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md similarity index 63% rename from sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md rename to translated/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md index cade1ae602..f2cd020692 100644 --- a/sources/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md +++ b/translated/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md @@ -1,21 +1,16 @@ -10 Useful ‘ls’ Command Interview Questions – Part 2 10个有用的‘ls’命令面试问题-第二部分 ================================================================================ -Continuing the legacy of ls command here is the second interview article on Listing command. The first article of the series was highly appreciated by the Tecmint Community. If you’ve missed the first part of this series you may like to visit at: 这是关于文件列表命令的第二篇文章,继续探讨‘ls’命令的其他方面。该系列的第一篇文章收到了Tecmint社区的高度关注,如果你错过了该系列的第一部分,你可能会访问以下地址: - [15 Interview Questions on “ls” Command – Part 1][1] -This article is well presented in the manner that it gives deep insight of ls command with examples. We have taken extra care in the making of article so that it remains simple to understand yet serve the purpose to the fullest. 这篇文章通过样例来很好地展现‘ls’命令的深入应用,我们加倍小心地来写这篇文章来保持其简洁可理解性,同时又能提供最全面的服务。 ![10 Interview Questions on ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-Command-Interview-Questions.jpg) 10 Interview Questions on ls Command -### 1. You are supposed to list the content of a directory in long list format, but not print the name of the author and group the file belongs. Also show the difference in output. ### ### 1. 假如你想要以长列表的形式列出目录中的内容,但是不打印文件创建者名称以及文件所属组。同时在输出中显示其不同之处。### -a. ls command listing the name of the files in long listing format when used with switch (-l). a. ls 命令在与‘-l’选项一起使用时会将文件以长列表格式输出。 # ls -l @@ -23,7 +18,6 @@ a. ls 命令在与‘-l’选项一起使用时会将文件以长列表格式输 ![List Files in- Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-inLong-List-Format.gif) List Files in- Long List Format -b. ls command listing the name of the files in long listing format along with the name of the author file belongs, when used with switch (–author) along with switch (-l). b. ls 命令在与‘-l’和‘--author’一起使用时,会将文件以长列表格式输出并带有文件创建者的名称信息。 # ls -l --author @@ -31,7 +25,6 @@ b. ls 命令在与‘-l’和‘--author’一起使用时,会将文件以长 ![List Files By Author](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-By-Author.gif) List Files By Author -c. ls command listing the name of the files without the name of its owner, when used with switch (-g). c. ls 命令在与‘-g’选项 一起将会列出文件名但是不带属主名称。 # ls -g @@ -39,16 +32,14 @@ c. ls 命令在与‘-g’选项 一起将会列出文件名但是不带属主 ![List Files Without Printing Owner Name](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Printing-Author.gif) List Files Without Printing Owner Name -d. ls command listing the name of files in long listing format without the name of group it belongs, when used with switch (-G) along with switch (-l). d. ls 命令在与'-G'和‘-l’选项一起将会使用长列表格式列出文件名称带式不带文件所属组名称。 # ls -Gl ![List Files Without Printing Group](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Printing-Group.gif) List Files Without Printing Group -### 2. Print the size of files and folders in the current directory, in human readable format. How will you do this? ### ### 2. 使用用户友好的格式打印出当前目录中的文件以及文件夹的大小,你会如何做?### -Well we need to use switch -h (human-readable) along with switch (-l) and/or (-s) with the command ls to get the desired output. + 这里我们需要使用'-h'选项(人类可阅读的)同‘-l’或‘-s’选项与ls命令一起使用来得到想要的输出。 # ls -hl @@ -60,13 +51,10 @@ List Files in Human Readable Format ![List File Sizes in Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-File-Sizes-in-Readable-Format.gif) List File Sizes in Long List Format -**Note**: The option -h uses the power of 1024 (standard in computation) and output the size of files and folders in the units of K, M and G. **注意**: ‘-h’选项使用1024(计算机中的标准)的幂,文件或文件夹的大小分别以K,M和G作为输出单位。 -### 3. Well if switch (-h) output size in power of 1024, that is standard, What else power values are supported in ls command? ### ### 3. 既然‘-h’选项是使用1024的幂作为标准来输出大小,那么ls命令还支持其他的幂值呢?### -There exist a switch -si which is similar to switch -h. The only difference is switch -si uses power of 1000 unlike switch -h which uses the power of 1024. 存在一个选项 ‘-si’与选项‘-h’相似,不同之处在于前者以使用1000的幂,后者使用1024的幂。 # ls -si @@ -74,7 +62,6 @@ There exist a switch -si which is similar to switch -h. The only difference is s ![Supported Power Values of ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-supported-power-values.gif) Supported Power Values of ls Command -It can also be used with switch -l to output the size of folder in the power of 1000, in long listing format. 所以'-si'也可以与‘-l’选项一起使用来按照1000的幂来输出文件夹的大小,并且以长列表格式显示。 # ls -si -l @@ -82,10 +69,8 @@ It can also be used with switch -l to output the size of folder in the power of ![List Files by Power Values](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-by-Power-Values.gif) List Files by Power Values -### 4. You are supposed to print the contents of a directory separated with comma. Is it possible? Can it be done in long listing format? ### ### 4. 假如要你使用逗号‘,’作为分隔符来打印一个目录中的内容,可以吗? 对于长列表形式也可行吗?### -Yup! Linux ls command can output the contents of a directory separated by comma when used with the switch (-m). Since this comma separated entries are filled horizontally, ls command can’t separate contents with comma when listing contents vertically. 当然!linux的ls命令当与其选项‘-m’一起使用时可以在打印目录内容时以逗号‘,’分割。由于逗号分割的内容是水平填充的,ls命令不能在垂直列出内容时使用逗号来分割内容。 # ls -m @@ -93,7 +78,6 @@ Yup! Linux ls command can output the contents of a directory separated by comma ![Print Contents of Directory by Comma](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Contents-of-Directory-by-Comma.gif) Print Contents of Directory by Comma -When used in long listing format, switch -m gets useless. 当使用长列表格式时,‘-m’选项就没有什么效果了。 # ls -ml @@ -101,10 +85,8 @@ When used in long listing format, switch -m gets useless. ![Listing Content Horizontally](http://www.tecmint.com/wp-content/uploads/2015/03/Listing-Content-Horizentally.gif) Listing Content Horizontally -### 5. If there any way to print the contents of a directory upside down? i.e., in reverse order. ### ### 5. 有办法将目录的内容逆序打印出来吗?### -Yeah! The above situation can easily be achieved using the switch -r. The switch ‘-r‘ reverse the order of output. It can also be used with switch -l (long listing format). 可以!上面的情形可以轻松地通过'-r'选项搞定,该选项将输出顺序倒置。这个选项也可以与‘-l’选项一起使用。 # ls -r @@ -117,20 +99,16 @@ List Content in Reverse Order ![Long List Content in Reverse Order](http://www.tecmint.com/wp-content/uploads/2015/03/Long-List-Content-in-Reverse-Order.gif) Long List Content in Reverse Order -### 6. You are given a situation to print the sub-directories recursively. How will you achieve this situation? Mind it only sub directories and no files. ### ### 6. 如果你被分配一个任务,来递归地打印各个子目录,你会如何应付?注意哟,只针对子目录而不是文件哦。### -Okay! That is pretty easy with the switch -R when used with command ls. It can further be grouped with other options like -l (long list) and -m (comma separated), etc. 小意思!使用“-R”选项就可以轻轻松松拿下,它也可以更进一步地与其他选项如‘-l’和‘-m’选项等组合使用。 # ls -R ![Print Sub Directories in Recursively](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Sub-Directories-in-Recursively.gif) Print Sub Directories in Recursively -### 7. How to sort the files based upon the size? ### ### 7. 如何按照文件大小对其进行排序?### -The Linux command line option -S when used with ls gives the desired output. To sort the files based upon size in descending order with the largest file listed at first and smallest at last. linux命令行选项'-S'赋予了ls命令这个超能力。按照文件大小从大到小的顺序排序: # ls -S @@ -138,7 +116,6 @@ linux命令行选项'-S'赋予了ls命令这个超能力。按照文件大小从 ![Sort Files with ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Files-in-Linux.gif) Sort Files with ls Command -To sort the files based upon size in descending order with the smallest file listed at first and largest at last. 按照文件大小从小到大的顺序排序。 # ls -Sr @@ -146,9 +123,8 @@ To sort the files based upon size in descending order with the smallest file lis ![Sort Files in Descending Order](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Files-in-Descending-Order.gif) Sort Files in Descending Order -### 8. List the contents of a directory with no additional information appearing one file per line. ### ### 8. 列出目录中的内容按照一行一个文件并且不带额外信息的方式 ### -The switch -1 comes to rescue here. ls command with switch -1 output the contents of the directory with one file per line and no additional information. + 选项‘-l’在此可以解决这个问题,使用‘-l’选项来使用ls命令可以将目录中的内容按照一行一个文件并且不带额外信息的方式进行输出。 # ls -1 @@ -156,9 +132,8 @@ The switch -1 comes to rescue here. ls command with switch -1 output the content ![List Files Without Information](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Information.gif) List Files Without Information -### 9. You are given a situation in which you have to print the contents of a directory on standard output enclosed by double quotes. How will you do this? ### ### 9. 现在委派给你一个任务,你必须将目录中的内容输出到终端而且需要使用双引号引起来,你会如何做?### -There exist an option -Q (quote-name) which output the content of ls enclosed in double quotes. + 存在一个选项‘-Q’会将ls命令的输出内容用双引号引起来。 # ls -Q @@ -166,7 +141,6 @@ There exist an option -Q (quote-name) which output the content of ls enclosed in ![Print Files with Double Quotes](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Files-with-Double-Quotes.gif) Print Files with Double Quotes -### 10. You are working in a directory which contains lots of files and folders. You need to print the name of folders before directories. How will you get this? ### ### 10. 想象一下你正在与一个包含有很多文件和文件夹的目录打交道,你需要使目录名显示在文件名之前,你如何做?### # ls --group-directories-first @@ -174,7 +148,6 @@ Print Files with Double Quotes ![Print Directories First](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Directories-First.gif) Print Directories First -That’s all for now. We will be coming up with the next part of this article series very soon. Till then stay tuned and connected to Tecmint. Do not forget to provide us with valuable feedback in the comment section below. Like and share us and help us get spread! 先点到为止,我们会马上提供该系列文章的下一部分。别换频道,关注Tecmint。 另外别忘了在下面的评论中提出你们宝贵的反馈信息,喜欢就分享,帮助我们得到更好的传播吧! -------------------------------------------------------------------------------- From 605067fea03b61377cdbe19fedcfbf625ad0141a Mon Sep 17 00:00:00 2001 From: theo-l Date: Sun, 15 Mar 2015 21:03:11 -0300 Subject: [PATCH 0286/2517] theo-l translating --- ...ications in a Linux System with Trickle.md | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md index 18607f7f96..ef1fee0680 100644 --- a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md +++ b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md @@ -1,3 +1,5 @@ +theo-l translating + How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle ================================================================================ Have you ever encountered situations where one application dominated you all network bandwidth? If you have ever been in a situation where one application ate all your traffic, then you will value the role of the trickle bandwidth shaper application. Either you are a system admin or just a Linux user, you need to learn how to control the upload and download speeds for applications to make sure that your network bandwidth is not burned by a single application. @@ -109,17 +111,17 @@ We are using the freely-distributable Linux Fundamentals PDF file (available fro You can initially download this file to your current working directory with the following command: - # wget http://linux-training.be/files/books/LinuxFun.pdf + # wget http://linux-training.be/files/books/LinuxFun.pdf The syntax to upload a file to our FTP server without trickle is as follows: - # ncftpput -u username -p password 192.168.0.15 /remote_directory local-filename + # ncftpput -u username -p password 192.168.0.15 /remote_directory local-filename Where /remote_directory is the path of the upload directory relative to username’s home, and local-filename is a file in your current working directory. Specifically, without trickle we get a peak upload speed of 52.02 MB/s (please note that this is not the real average upload speed, but an instant starting peak), and the file gets uploaded almost instantly: - # ncftpput -u username -p password 192.168.0.15 /testdir LinuxFun.pdf + # ncftpput -u username -p password 192.168.0.15 /testdir LinuxFun.pdf Output: @@ -127,11 +129,11 @@ Output: With trickle, we will limit the upload transfer rate at 5 KB/s. Before uploading the file for the second time, we need to delete it from the destination directory; otherwise, ncftp will inform us that the file at the destination directory is the same that we are trying to upload, and will not perform the transfer: - # rm /absolute/path/to/destination/directory/LinuxFun.pdf + # rm /absolute/path/to/destination/directory/LinuxFun.pdf Then: - # trickle -s -u 5 ncftpput -u username -p password 111.111.111.111 /testdir LinuxFun.pdf + # trickle -s -u 5 ncftpput -u username -p password 111.111.111.111 /testdir LinuxFun.pdf Output: @@ -143,13 +145,13 @@ In the example above, we can see that the average upload speed dropped to ~5 KB/ First, remember to delete the PDF from the original source directory: - # rm /absolute/path/to/source/directory/LinuxFun.pdf + # rm /absolute/path/to/source/directory/LinuxFun.pdf Please note that the following cases will download the remote file to the current directory in the client machine. This fact is indicated by the period (‘.‘) that appears after the IP address of the FTP server. Without trickle: - # ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf + # ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf Output: @@ -157,7 +159,7 @@ Output: With trickle, limiting the download speed at 20 KB/s: - # trickle -s -d 30 ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf + # trickle -s -d 30 ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf Output: @@ -189,7 +191,7 @@ In this example we will use the freely-distributable “He is the gift” video, We will initially download this file to your current working directory with the following command: - # wget http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 + # wget http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 First off, we will start the trickled daemon with the command listed above: @@ -197,7 +199,7 @@ First off, we will start the trickled daemon with the command listed above: Without trickle: - # ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 + # ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 Output: @@ -205,7 +207,7 @@ Output: With trickle: - # trickle ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 + # trickle ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 Output: @@ -219,7 +221,7 @@ As in Example 2, we will be downloading the file to the current working director Without trickle: - # ncftpget -u username -p password 192.168.0.15 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 + # ncftpget -u username -p password 192.168.0.15 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 Output: @@ -227,7 +229,7 @@ Output: With trickle: - # trickle ncftpget -u username -p password 111.111.111.111 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 + # trickle ncftpget -u username -p password 111.111.111.111 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 Output: @@ -259,7 +261,7 @@ The following is a trickled.conf sample file in the CentOS 7 client (192.168.0.1 Priority = 1 Time-Smoothing = 0.1 Length-Smoothing = 2 - + [ftp] Priority = 2 Time-Smoothing = 1 @@ -293,4 +295,4 @@ via: http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trick [3]:http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 [4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ [5]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ -[6]:http://www.tecmint.com/dpkg-command-examples/ \ No newline at end of file +[6]:http://www.tecmint.com/dpkg-command-examples/ From 66bf62dcdb4c69a310f439517dbe82124d906312 Mon Sep 17 00:00:00 2001 From: linuhap Date: Mon, 16 Mar 2015 09:32:45 +0800 Subject: [PATCH 0287/2517] translated by linuhap --- ...sed Install It In Ubuntu And Linux Mint.md | 50 ------------------- ...sed Install It In Ubuntu And Linux Mint.md | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 50 deletions(-) delete mode 100644 sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md create mode 100644 translated/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md diff --git a/sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md b/sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md deleted file mode 100644 index 684d7e31dd..0000000000 --- a/sources/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md +++ /dev/null @@ -1,50 +0,0 @@ -linuhap translating -Pinta 1.6 Released! Install It In Ubuntu And Linux Mint -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Pinta_Ubuntu_Linux.jpeg) - -[Pinta][1] is a free and open source drawing application which is very popular among Linux users. It won’t be incorrect to term it as an **open source alternative to Microsoft Paint**. Pinta is available for all major platforms such as Linux, Windows and Mac OS X. - -While Gimp is popular as full featured image editing software, Pinta is more of a paint and drawing tool. I have used it extensively in my tutorials for drawing arrows and curves on the screenshots and I can say that it’s my favorite drawing app in Linux. - -### New features in Pinta 1.6 ### - -After over an year, Pinta has released version 1.6, fixing over 50 bugs and introducing some new features. New features are as following: - -- Line tool now supports drawing curves and arrows -- Shapes can be edited even after being drawn -- All shape tools now support drawing dashed lines -- All selection tools now support the Union, Exclude, Xor, and Intersection modes -- Add-in manager now consists of ‘add ins’ -- New options in command line usage - -New version also fixes the annoying bug where you [cannot open a file with Pinta in right click menu option][2]. You can read all the changes in the [release note][3]. - -### Install Pinta 1.6 in Ubuntu and Linux Mint ### - -Pinta 1.5 is available in Ubuntu 14.04, 14.10, Linux Mint 17, elementary OS. If you want to install the latest version 1.6, you can use the official PPA from Pinta team. Don’t worry if you have Pinta 1.5 installed already. Installing it again will upgrade the version. - -Open a terminal and use the following commands: - - sudo add-apt-repository ppa:pinta-maintainers/pinta-stable - sudo apt-get update - sudo apt-get install pinta - -To download the source code or to get the installation files for Windows and Mac OS X, check the [download page of Pinta][4]. In a related post, you can also check out [best photo applications for Linux][5]. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/pinta-1-6-ubuntu-linux-mint/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://pinta-project.com/ -[2]:http://itsfoss.com/add-application-list-open-applications-ubuntu-1310/ -[3]:http://pinta-project.com/releases/1-6 -[4]:http://pinta-project.com/releases -[5]:http://itsfoss.com/image-applications-ubuntu-linux/ diff --git a/translated/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md b/translated/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md new file mode 100644 index 0000000000..6c0ee2740c --- /dev/null +++ b/translated/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md @@ -0,0 +1,50 @@ +Pinta 1.6发布了!在 Ubuntu 和 Linux Mint 上安装Pinta +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Pinta_Ubuntu_Linux.jpeg) + + +[Pinta][1] 是一款免费开源的绘图应用软件,它在Linux用户中很受欢迎。你也可以把它看作是**开源的微软画图软件的替代品**。Pinta 可以在很多平台上使用,如 Linux,Windows 以及 Mac OS X。 + +Gimp 作为全功能图像编辑软件而流行,相比Pinta则单纯是一种绘图工具。我常用它在我的截图上画箭头和曲线,而且我可以说这是我在 Linux 上最喜欢的绘图应用软件。 + +### Pinta 1.6 的新功能### + +经一年之后,Pinta发布了1.6版本,修复了50个漏洞并且加入了一些新功能。加入的新功能如下: + +- 线条工具现在支持绘制曲线和箭头 +- 绘制好的图形可以被编辑 +- 所有的图形工具现在支持绘制虚线 +- 所有的选择工具现在支持并集,排除,异或和交集模式 +- 插件可通过插件管理器安装 +- 命令行中加入新选项 + +新版本同时也修复了一个很烦人的漏洞——右键文件,[在打开方式中使用Pinta不能打开文件][2]。你可以在[发布说明][3]阅读所有的改变。 + +### 在 Ubuntu 和 Linux Mint 中安装 Pinta 1.6### + +Pinta 1.5 可以在 Ubuntu 14.04,14.10,Linux Mint 17 和 elementary OS 中使用。如果你想安装最新的1.6版本,你可以使用 Pinta 团队的官方PPA源。如果你已经安装了 Pinta 1.5 也不必担心。再安装一次将会使版本升级。 + +打开终端并使用以下命令: + + sudo add-apt-repository ppa:pinta-maintainers/pinta-stable + sudo apt-get update + sudo apt-get install pinta + +下载源代码或者获取 Windows 和 Mac OS X 的安装文件,请点击[Pinta下载页面][4]。在如下这篇相关文章中,你也可以选出[Linux中最好的照片应用软件][5]。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/pinta-1-6-ubuntu-linux-mint/ + +作者:[Abhishek][a] +译者:[linuhap](https://github.com/linuhap) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://pinta-project.com/ +[2]:http://itsfoss.com/add-application-list-open-applications-ubuntu-1310/ +[3]:http://pinta-project.com/releases/1-6 +[4]:http://pinta-project.com/releases +[5]:http://itsfoss.com/image-applications-ubuntu-linux/ \ No newline at end of file From 34071b3b6b4dcce1815f1f1fd083148c777af598 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 16 Mar 2015 11:21:09 +0800 Subject: [PATCH 0288/2517] Finish the translation by ZTinoZ --- ...15 Basic 'ls' Command Examples in Linux.md | 109 +++++++++--------- 1 file changed, 54 insertions(+), 55 deletions(-) rename {sources => translated}/tech/20150309 15 Basic 'ls' Command Examples in Linux.md (73%) diff --git a/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md b/translated/tech/20150309 15 Basic 'ls' Command Examples in Linux.md similarity index 73% rename from sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md rename to translated/tech/20150309 15 Basic 'ls' Command Examples in Linux.md index c2ec2532f0..31fdefd736 100644 --- a/sources/tech/20150309 15 Basic 'ls' Command Examples in Linux.md +++ b/translated/tech/20150309 15 Basic 'ls' Command Examples in Linux.md @@ -1,26 +1,25 @@ -Translating by ZTinoZ -15 Basic ‘ls’ Command Examples in Linux +Linux中的15个基本‘ls’命令示例 ================================================================================ -ls command is one of the most frequently used command in Linux. I believe ls command is the first command you may use when you get into the command prompt of Linux Box. We use ls command daily basis and frequently even though we may not aware and never use all the option available. In this article, we’ll be discussing basic ls command where we have tried to cover as much parameters as possible. +ls命令是Linux系统中最被频繁使用的命令之一,我相信ls命令一定是你进入一台Linux系统的电脑打开命令提示符后第一个使用的命令。我们每天都在频繁地使用ls命令即使我们可能没有意识也从来用不到所以可用的选项。本文中,我们将讨论下一些基本的ls命令并且覆盖尽可能多的有关参数来讲解。 ![Linux ls Command](http://www.tecmint.com/wp-content/uploads/2012/08/Linux-ls-Commands.png) -Linux ls Command +Linux的ls命令 -### 1. List Files using ls with no option ### +### 1. 不带任何选项列出文件 ### -ls with no option list files and directories in bare format where we won’t be able to view details like file types, size, modified date and time, permission and links etc. +不带选项的ls命令来光秃秃地列出文件和目录,我们是不能看到像文件类型、大小、修改日期和时间、权限以及链接这样具体的信息的。 # ls - + 0001.pcap Desktop Downloads index.html install.log.syslog Pictures Templates anaconda-ks.cfg Documents fbcmd_update.php install.log Music Public Videos -### 2 List Files With option –l ### +### 2 带–l选项列出文件列表 ### -Here, ls -l (-l is character not one) shows file or directory, size, modified date and time, file or folder name and owner of file and it’s permission. +你看,ls -l(-l是字母不是“1”)就能展示出是文件还是目录,它的大小、修改日期和时间、文件或目录的名字以及文件的属主和它的权限。 # ls -l - + total 176 -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap -rw-------. 1 root root 1586 Jul 31 02:17 anaconda-ks.cfg @@ -37,12 +36,12 @@ Here, ls -l (-l is character not one) shows file or directory, size, modified da drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Templates drwxr-xr-x. 2 root root 4096 Jul 31 02:48 Videos -### 3. View Hidden Files ### +### 3. 浏览隐藏文件 ### -List all files including hidden file starting with ‘.‘. +列出所有文件包括以‘.’开头的隐藏文件。 # ls -a - + . .bashrc Documents .gconfd install.log .nautilus .pulse-cookie .. .cache Downloads .gnome2 install.log.syslog .netstat.swp .recently-used.xbel 0001.pcap .config .elinks .gnome2_private .kde .opera .spice-vdagent @@ -51,12 +50,12 @@ List all files including hidden file starting with ‘.‘. .bash_logout Desktop fbcmd_update.php .ICEauthority .mozilla Public Videos .bash_profile .digrc .gconf index.html Music .pulse .wireshark -### 4. List Files with Human Readable Format with option -lh ### +### 4. 用-lh选项来以人类可读方式列出文件 ### -With combination of -lh option, shows sizes in human readable format. +用-lh组合选项,以人类可读方式来显示大小。 # ls -lh - + total 176K -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap -rw-------. 1 root root 1.6K Jul 31 02:17 anaconda-ks.cfg @@ -73,55 +72,55 @@ With combination of -lh option, shows sizes in human readable format. drwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Templates drwxr-xr-x. 2 root root 4.0K Jul 31 02:48 Videos -### 5. List Files and Directories with ‘/’ Character at the end ### +### 5. 以尾部以‘/’字符结尾的方式列出文件和目录 ### Using -F option with ls command, will add the ‘/’ Character at the end each directory. # ls -F - + 0001.pcap Desktop/ Downloads/ index.html install.log.syslog Pictures/ Templates/ anaconda-ks.cfg Documents/ fbcmd_update.php install.log Music/ Public/ Videos/ -### 6. List Files in Reverse Order ### +### 6. 倒序列出文件 ### -The following command with ls -r option display files and directories in reverse order. +ls -r选项能以倒序方式显示文件和目录。 # ls -r - + Videos Public Music install.log fbcmd_update.php Documents anaconda-ks.cfg Templates Pictures install.log.syslog index.html Downloads Desktop 0001.pcap -### 7. Recursively list Sub-Directories ### +### 7. 递归列出子目录 ### -ls -R option will list very long listing directory trees. See an example of output of the command. +ls -R选项能列出非常长的目录树,来看看示例输出: # ls -R - + total 1384 -rw-------. 1 root root 33408 Aug 8 17:25 anaconda.log -rw-------. 1 root root 30508 Aug 8 17:25 anaconda.program.log - + ./httpd: total 132 -rw-r--r-- 1 root root 0 Aug 19 03:14 access_log -rw-r--r--. 1 root root 61916 Aug 10 17:55 access_log-20120812 - + ./lighttpd: total 68 -rw-r--r-- 1 lighttpd lighttpd 7858 Aug 21 15:26 access.log -rw-r--r--. 1 lighttpd lighttpd 37531 Aug 17 18:21 access.log-20120819 - + ./nginx: total 12 -rw-r--r--. 1 root root 0 Aug 12 03:17 access.log -rw-r--r--. 1 root root 390 Aug 12 03:17 access.log-20120812.gz -### 8. Reverse Output Order ### +### 8. 反向输出次序 ### -With combination of -ltr will shows latest modification file or directory date as last. +带-ltr组合选项能以文件或目录的最新修改时间的次序来显示它们。 # ls -ltr - + total 176 -rw-r--r--. 1 root root 11439 Jul 31 02:13 install.log.syslog -rw-r--r--. 1 root root 48867 Jul 31 02:17 install.log @@ -138,12 +137,12 @@ With combination of -ltr will shows latest modification file or directory date a drwxr-xr-x. 4 root root 4096 Aug 16 02:55 Downloads -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap -### 9. Sort Files by File Size ### +### 9. 按文件大小排序 ### -With combination of -lS displays file size in order, will display big in size first. +带-lS组合选项能按文件从大到小的次序显示。 # ls -lS - + total 176 -rw-r--r--. 1 root root 48867 Jul 31 02:17 install.log -rw-r--r--. 1 root root 46701 Jul 31 09:58 index.html @@ -160,22 +159,22 @@ With combination of -lS displays file size in order, will display big in size fi -rw-------. 1 root root 1586 Jul 31 02:17 anaconda-ks.cfg -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap -### 10. Display Inode number of File or Directory ### +### 10. 显示文件或目录的索引节点数 ### -We can see some number printed before file / directory name. With -i options list file / directory with inode number. +我们有时候可以看到一些数字打印在文件或目录名之前,带-i选项就能列出文件或目录的索引节点数。 # ls -i - + 20112 0001.pcap 23610 Documents 23793 index.html 23611 Music 23597 Templates 23564 anaconda-ks.cfg 23595 Downloads 22 install.log 23612 Pictures 23613 Videos 23594 Desktop 23585 fbcmd_update.php 35 install.log.syslog 23601 Public -### 11. Shows version of ls command ### +### 11. 显示ls命令的版本 ### -Check version of ls command. +查看ls命令的版本。 # ls --version - + ls (GNU coreutils) 8.4 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . @@ -183,17 +182,17 @@ Check version of ls command. There is NO WARRANTY, to the extent permitted by law. Written by Richard M. Stallman and David MacKenzie. -### 12. Show Help Page ### +### 12. 显示帮助页面 ### -List help page of ls command with their option. +列出ls命令的选项帮助页面。 # ls --help - + Usage: ls [OPTION]... [FILE]... -### 13. List Directory Information ### +### 13. 列出目录信息 ### -With ls -l command list files under directory /tmp. Wherein with -ld parameters displays information of /tmp directory. +用ls -l命令列出/tmp目录下的文件,其中-ld参数可以显示/tmp目录的信息。 # ls -l /tmp total 408 @@ -210,15 +209,15 @@ With ls -l command list files under directory /tmp. Wherein with -ld parameters ---------- # ls -ld /tmp/ - + drwxrwxrwt. 13 root root 4096 Aug 21 12:48 /tmp/ -### 14. Display UID and GID of Files ### +### 14. 显示文件的UID和GID ### -To display UID and GID of files and directories. use option -n with ls command. +用ls -n命令来显示文件和目录的UID(译者注:userid,用户ID)和GID(译者注:groupid,组ID)。 # ls -n - + total 36 drwxr-xr-x. 2 500 500 4096 Aug 2 01:52 Downloads drwxr-xr-x. 2 500 500 4096 Aug 2 01:52 Music @@ -226,16 +225,16 @@ To display UID and GID of files and directories. use option -n with ls command. -rw-rw-r--. 1 500 500 12 Aug 21 13:06 tmp.txt drwxr-xr-x. 2 500 500 4096 Aug 2 01:52 Videos -### 15. ls command and it’s Aliases ### +### 15. ls命令和它的别名功能 ### -We have made alias for ls command, when we execute ls command it’ll take -l option by default and display long listing as mentioned earlier. +我们给ls命令设置过别名之后,当我们执行ls命令的时候它会默认执行-l选项并且像上文提到的那样显示长列表。 # alias ls="ls -l" -Note: We can see number of alias available in your system with below alias command and same can be unalias as shown below example. +注意:我们可以通过不加任何参数的alias命令来看到目前系统中可用的所有alias设置,当然它们同时也可以unalias。 # alias - + alias cp='cp -i' alias l.='ls -d .* --color=auto' alias ll='ls -l --color=auto' @@ -244,18 +243,18 @@ Note: We can see number of alias available in your system with below alias comma alias rm='rm -i' alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' -To remove an alias previously defined, just use the unalias command. +删除一项之前定义的alias设置,只需用unalias命令即可。 # unalias ls -In our next article we’ll cover up more or advanced ls command with their examples. If we’ve missed anything in the list, please update us via comment section. +下篇文章我们将讨论更多更高级的ls命令以及示例,如果我们在本文有遗漏了任何东西,请通过评论让我们获悉。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ 作者:[Ravi Saive][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b7eab74344c4b8245755825ceb55c8ef0437284a Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 16 Mar 2015 13:56:17 +0800 Subject: [PATCH 0289/2517] Translating by ZTinoZ --- ...KVM Virtual Environment using Commandline Tools in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index dcd3fcf919..19cddfb274 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ How to Manage KVM Virtual Environment using Commandline Tools in Linux ================================================================================ In this 4th part of our [KVM series][1], we are discussing KVM environment management using CLI. We use ‘virt-install’ CL tool to create and configure virtual machines, virsh CL tool to create and configure storage pools and qemu-img CL tool to create and manage disk images. @@ -149,4 +150,4 @@ via: http://www.tecmint.com/kvm-management-tools-to-manage-virtual-machines/ [a]:http://www.tecmint.com/author/dos2009/ [1]:http://www.tecmint.com/install-and-configure-kvm-in-linux/ [2]:https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Getting_Started_Guide/index.html -[3]:https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/index.html \ No newline at end of file +[3]:https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/index.html From 2f69722ec28b4ecdaa62fafbe5c5f3dd6af172e8 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 16 Mar 2015 14:23:43 +0800 Subject: [PATCH 0290/2517] Translating by ZTinoZ --- ...rtual Environment using Commandline Tools in Linux.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index 19cddfb274..e3da1ec917 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -1,7 +1,6 @@ -Translating by ZTinoZ -How to Manage KVM Virtual Environment using Commandline Tools in Linux +如何在Linux中用命令行工具管理KVM虚拟环境 ================================================================================ -In this 4th part of our [KVM series][1], we are discussing KVM environment management using CLI. We use ‘virt-install’ CL tool to create and configure virtual machines, virsh CL tool to create and configure storage pools and qemu-img CL tool to create and manage disk images. +在我们[KVM系列专题][1]的第四部分,我们将会一起讨论下命令行界面下来管理KVM环境。We use ‘virt-install’ CL tool to create and configure virtual machines, virsh CL tool to create and configure storage pools and qemu-img CL tool to create and manage disk images. ![KVM Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/KVM-Management-in-Linux.jpg) KVM Management in Linux @@ -130,7 +129,7 @@ Booting Virtual Machine ![Installation of Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Installation-of-Virtual-Machine.jpeg) Installation of Virtual Machine -### Conclusion ### +### 结论 ### This is the latest part of our KVM tutorial, we haven’t covered everything of course. It a shot to scratch the KVM environment so its your turn to search and keep hands dirty using this nice resources. @@ -142,7 +141,7 @@ This is the latest part of our KVM tutorial, we haven’t covered everything of via: http://www.tecmint.com/kvm-management-tools-to-manage-virtual-machines/ 作者:[Mohammad Dosoukey][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7f0e851449ac1475d5065987eb00b544df71530b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 16 Mar 2015 17:08:36 +0800 Subject: [PATCH 0291/2517] =?UTF-8?q?20150316-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d Line Tips and Tricks in Linux--Part 1.md | 115 ++++++++++++++ ...Command Line Using 'Speedtest-CLI' Tool.md | 132 +++++++++++++++ ...m the command line on Linux with Alpine.md | 103 ++++++++++++ ...16 Install Mate desktop in FreeBSD 10.1.md | 61 +++++++ ...n local time and UNIX timestamp in Perl.md | 61 +++++++ ...temd Boot Process a Close Look in Linux.md | 150 ++++++++++++++++++ 6 files changed, 622 insertions(+) create mode 100644 sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md create mode 100644 sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md create mode 100644 sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md create mode 100644 sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md create mode 100644 sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md create mode 100644 sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md diff --git a/sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md b/sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md new file mode 100644 index 0000000000..352fa2816c --- /dev/null +++ b/sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md @@ -0,0 +1,115 @@ +5 Interesting Command Line Tips and Tricks in Linux – Part 1 +================================================================================ +Are you making most out of the Linux? There are lots of helpful features which appears to be Tips and Tricks for many of Linux Users. Sometimes Tips and Tricks become the need. It helps you get productive with the same set of commands yet with enhanced functionality. + +![5 Command Line Tips and Tricks](http://www.tecmint.com/wp-content/uploads/2015/03/5-Command-Line-Tips.jpg) +5 Command Line Tips and Tricks + +Here we are starting a new series, where we will be writing some tips and tricks and will try to yield as more as we can in small time. + +### 1. To audit the commands we’d run in past, we use [history command][1]. Here is a sample output of history command. ### + + # history + +![history command example](http://www.tecmint.com/wp-content/uploads/2015/03/history-command.gif) +history command example + +Obvious from output, the history command do not output the time stamp with the log of last executed commands. Any solution for this? Yeah! Run the below command. + + # HISTTIMEFORMAT="%d/%m/%y %T " + # history + +If you want to permanently append this change, add the below line to `~/.bashrc`. + + export HISTTIMEFORMAT="%d/%m/%y %T " + +and then, from terminal run, + + # source ~/.bashrc + +Explanation of commands and switches. + +- history – GNU History Library +- HISTIMEFORMAT – Environmental Variable +- %d – Day +- %m – Month +- %y – Year +- %T – Time Stamp +- source – in short send the contents of file to shell +- .bashrc – is a shell script that BASH runs whenever it is started interactively. + +![history Command Logs](http://www.tecmint.com/wp-content/uploads/2015/03/History-Command-Logs.gif) +history Command Logs + +### 2. The next gem in the list is – how to check disk write speed? Well one liner dd command script serves the purpose. ### + + # dd if=/dev/zero of=/tmp/output.img bs=8k count=256k conv=fdatasync; rm -rf /tmp/output.img + +![dd Command Example](http://www.tecmint.com/wp-content/uploads/2015/03/dd-Command-Example.gif) +dd Command Example + +Explanation of commands and switches. + +- dd – Convert and Copy a file +- if=/dev/zero – Read the file and not stdin +- of=/tmp/output.img – Write to file and not stdout +- bs – Read and Write maximum upto M bytes, at one time +- count – Copy N input block +- conv – Convert the file as per comma separated symbol list. +- rm – Removes files and folder +- -rf – (-r) removes directories and contents recursively and (-f) Force the removal without prompt. + +### 3. How will you check the top six files that are eating out your space? A simple one liner script made from [du command][2], which is primarily used as file space usages. ### + + # du -hsx * | sort -rh | head -6 + +![Check Disk Space Usage](http://www.tecmint.com/wp-content/uploads/2015/03/check-disk-space-usage.gif) +Check Disk Space Usage + +Explanation of commands and switches. + +- du – Estimate file space usages +- -hsx – (-h) Human Readable Format, (-s) Summaries Output, (-x) One File Format, skip directories on other file format. +- sort – Sort text file lines +- -rf – (-r) Reverse the result of comparison, (-f) Ignore case +- head – output first n lines of file. + +### 4. The next step involves statistics in terminal of a file of every kind. We can output the statistics related to a file with the help of stat (output file/fileSystem status) command. ### + + # stat filename_ext (viz., stat abc.pdf) + +![Check File Statistics](http://www.tecmint.com/wp-content/uploads/2015/03/Check-File-Statistics.gif) +Check File Statistics + +### 5. The next and last but not the least, this one line script is for those, who are newbies. If you are an experienced user you probably don’t need it, unless you want some fun out of it. Well newbies are Linux-command-line phobic and the below one liner will generate random man pages. The benefit is as a newbie you always get something to learn and never get bored. ### + + # man $(ls /bin | shuf | head -1) + +![Generate Random Man Pages](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Man-Pages.gif) +Generate Random Man Pages + +Explanation of commands and switches. + +- man – Linux Man pages +- ls – Linux Listing Commands +- /bin – System Binary file Location +- shuf – Generate Random Permutation +- head – Output first n line of file. + +That’s all for now. If you know any such tips and tricks you may share with us and we will post the same in your words on our reputed Tecmint.com website. + +If you want to share any tips and tricks that you cannot make into article you may share it at tecmint[dot]com[at]gmail[dot]com and we will include it in our article. Don’t forget to provide us with your valuable feedback in the comments below. Keep connected. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/5-linux-command-line-tricks/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/history-command-examples/ +[2]:http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ \ No newline at end of file diff --git a/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md b/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md new file mode 100644 index 0000000000..a2e5ebc1d8 --- /dev/null +++ b/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md @@ -0,0 +1,132 @@ +How to Test Your Internet Speed Bidirectionally from Command Line Using ‘Speedtest-CLI’ Tool +================================================================================ +We always need to check the speed of the Internet connection at home and office. What we do for this? Go to websites like Speedtest.net and begin test. It loads JavaScript in the web browser and then select best server based upon ping and output the result. It also uses a Flash player to produce graphical results. + +What about headless server, where isn’t any web based browser and the main point is, most of the servers are headless. The another bottleneck of such web browser based speed testing is that, you can’t schedule the speed testing at regular interval. Here comes an application “Speedtest-cli” that removes such bottlenecks and let you test the speed of Internet connection from command line. + +#### What is Speedtest-cli #### + +The application is basically a script developed in Python programming Language. It measures Internet Bandwidth speed bidirectionally. It used speedtest.net infrastructure to measure the speed. Speedtest-cli is able to list server based upon physical distance, test against specific server, and gives you URL to share the result of your internet speed test. + +To install latest speedtest-cli tool in Linux systems, you must have Python 2.4-3.4 or higher version installed on the system. + +### Install speedtest-cli in Linux ### + +There are two ways to install speedtest-cli tool. The first method involves the use of `python-pip` package while the second method is to download the Python script, make it executable and run, here I will cover both ways…. + +#### Install speedtest-cli Using pythin-pip #### + +First you need to install `python-pip` package, then afterwards you can install the speedtest-cli tool using pip command as shown below. + + $ sudo apt-get install python-pip + $ sudo pip install speedtest-cli + +To upgrade speedtest-cli, at later stage, use. + + $ sudo pip install speedtest-cli --upgrade + +#### Install speedtest-cli Using Python Script #### + +First download the python script from github using wget command, unpack the downloaded file (master.zip) and extract it.. + + $ wget https://github.com/sivel/speedtest-cli/archive/master.zip + $ unzip master.zip + +After extracting the file, go to the extracted directory `speedtest-cli-master` and make the script file executable. + + $ cd speedtest-cli-master/ + $ chmod 755 speedtest_cli.py + +Next, move the executable to `/usr/bin` folder, so that you don’t need to type the full path everytime. + + $ sudo mv speedtest_cli.py /usr/bin/ + +### Testing Internet Connection Speed with speedtest-cli ### + +**1. To test Download and Upload speed of your internet connection, run the `speedtest-cli` command without any argument as shown below.** + + $ speedtest_cli.py + +![Test Download Upload Speed in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Download-Upload-Speed-in-Linux1.png) +Test Download Upload Speed in Linux + +**2. To check the speed result in bytes in place of bits.** + + $ speedtest_cli.py --bytes + +![Test Internet Speed in Bytes](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Speed-in-Bytes.png) +Test Internet Speed in Bytes + +**3. Share your bandwidth speed with your friends or family. You are provided with a link that can be used to download an image.** + +![Share Internet Speed Results](http://www.tecmint.com/wp-content/uploads/2015/03/Share-Internet-Speed-Results.png) +Share Internet Speed Results + +The following picture is a sample speed test result generated using above command. + +![Speed Test Results](http://www.tecmint.com/wp-content/uploads/2015/03/Speed-Test-Results.png) +Speed Test Results + +**4. Don’t need any additional information other than Ping, Download and upload?** + + $ speedtest_cli.py --simple + +![Test Ping Download Upload Speed](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Ping-Download-Upload-Speed1.png) +Test Ping Download Upload Speed + +**5. List the `speedtest.net` server based upon physical distance. The distance in km is mentioned.** + + $ speedtest_cli.py --list + +![Check Speedtest.net Servers](http://www.tecmint.com/wp-content/uploads/2015/03/Check-Speedtest-Servers.png) +Check Speedtest.net Servers + +**6. The last stage generated a huge list of servers sorted on the basis of distance. How to get desired output? Say I only want to see the speedtest.net server located in Mumbai (India).** + + $ speedtest_cli.py --list | grep -i Mumbai + +![Check Nearest Server](http://www.tecmint.com/wp-content/uploads/2015/03/Check-Nearest-Server.png) +Check Nearest Server + +**7. Test connection speed against a specific server. Use Server Id generated in example 5 and example 6 in above.** + + $ speedtest_cli.py --server [server ID] + $ speedtest_cli.py --server [5060] ## Here server ID 5060 is used in the example. + +![Test Connection Against Server](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Connection-Against-Server.png) +Test Connection Against Server + +**8. To check the version number and help of `speedtest-cli` tool.** + + $ speedtest_cli.py --version + +![Check SpeedCli Version](http://www.tecmint.com/wp-content/uploads/2015/03/Check-SpeedCLi-Version.png) +Check SpeedCli Version + + $ speedtest_cli.py --help + +![SpeedCli Help](http://www.tecmint.com/wp-content/uploads/2015/03/SpeedCli-Help.png) +SpeedCli Help + +**Note:** Latency reported by tool is not its goal and one should not rely on it. The relative latency values output is responsible for server selected to be tested against. CPU and Memory capacity will influence the result to certain extent. + +### Conclusion ### + +The tool is must for system administrators and developers. A simple script which runs without any issue. I must say that the application is wonderful, lightweight and do what it promises. I disliked Speedtest.net for the reason it was using flash, but speedtest-cli gave me a reason to love them. + +speedtest_cli is a third party application and should not be used to automatically record the bandwidth speed. Speedtest.net is used by millions of users and it is a good idea to [Set Your Own Speedtest Mini Server][1]. + +That’s all for now, till then stay tuned and connected to Tecmint. Don’t forget to give your valuable feedback in the comments below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/speedtest-mini-server-to-test-bandwidth-speed/ \ No newline at end of file diff --git a/sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md b/sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md new file mode 100644 index 0000000000..d62533381f --- /dev/null +++ b/sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md @@ -0,0 +1,103 @@ +How to access Gmail from the command line on Linux with Alpine +================================================================================ +If you are a command-line lover, I am sure that you welcome with open arms any tool that allows you to perform at least one of your daily tasks using that powerful work environment, e.g., from [scheduling appointments][1] and [managing finances][2] to accessing [Facebook][3] and [Twitter][4]. + +In this post I will show you yet another pretty neat use case of Linux command-line: **accessing Google's Gmail service**. To do so, we are going to use Alpine, a versatile ncurses-based, command-line email client (not to be confused with Alpine Linux). We will configure Gmail's IMAP and SMTP settings in Alpine to receive and send email messages via Google mail servers in a terminal environment. At the end of this tutorial, you will realize that it will only take a few minimum steps to use any other mail servers in Alpine. + +Granted there are already outstanding GUI-based email clients such as Thunderbird, Evolution or even web interface. So why would anyone be interested in using a command-line email client to access Gmail? The answer is simple. You need to get something done quickly and want to avoid using system resources unnecessarily. Or you are accessing a minimal headless server that does not have the X server installed. Or the X server on your desktop crashed, and you need to send emails urgently before fixing it. In all these situations Alpine can come in handy and get you going in no time. + +Beyond simple editing, sending and receiving of text-based email messages, Alpine is able to encrypt, decrypt, and digitally sign email messages, and integrate seamlessly with TLS. + +### Installing Alpine on Linux ### + +In Red Hat-based distributions, install Alpine as follows. Note that on RHEL/CentOS, you need to enable [EPEL repository][5] first. + + # yum install alpine + +In Debian, Ubuntu or their derivatives, you will do: + + # aptitude install alpine + +After the installation is complete, you can launch the email client by running: + + # alpine + +The first time you run alpine, it will create a mail directory for the current user inside his/her home directory (~/mail), and bring up the main interface, as shown in the following screencast. + +注:youtube视频,发布的时候做个链接吧 + + +The user interface has the following sections: + +![](https://farm9.staticflickr.com/8724/16618079590_6c236ce2c2_c.jpg) + +Feel free to browse around a bit in order to become acquainted with Alpine. You can always return to the command prompt by hitting the 'Q' key any time. Note that all screens have context-related help available at the bottom of the screen. + +Before proceeding further, we will create a default configuration file for Alpine. In order to do so, quit Alpine, and execute the following command from the command line: + + # alpine -conf > /etc/pine.conf + +### Configuring Alpine to Use a Gmail Account ### + +Once you have installed Alpine and spent at least a few minutes to feel comfortable with its interface and menus, it's time to actually configure it to use an existing Gmail account. + +Before following these steps in Alpine, remember to enable IMAP in your Gmail settings from the webmail interface. Once IMAP access is enabled in your Gmail account, proceed to the following steps to enable reading Gmail messages on Alpine. + +First, launch Alpine. + +Press 'S' for Setup, and then 'L' for collection lists to define groups of folders to help you better organize your mail: + +![](https://farm8.staticflickr.com/7614/16779579656_690eda419c_o.png) + +Add a new folder by pressing 'A' and fill the required information: + +- **Nickname**: whatever name of your choice. +- **Server**: imap.gmail.com/ssl/user=yourgmailusername@gmail.com + +You may leave Path and View blank. + +Then press Ctrl+X and enter your password when prompted: + +![](https://farm9.staticflickr.com/8611/16618079640_6f7dca336a_b.jpg) + +If everything goes as expected, there should be a new folder named after the nickname that you chose earlier. You should find your Gmail mailboxes there: + +![](https://farm8.staticflickr.com/7598/16804355052_10c1a6c5bd_b.jpg) + +For verification, you can compare the contents of your Alpine's "Gmail Sent" mailbox with those of the web client: + +![](https://farm8.staticflickr.com/7602/16619323939_d2eab3e162_c.jpg) + +By default new mail checking/notification occurs automatically every 150 seconds. You can change this value, along with many others, in the /etc/pine.conf file. This configuration file is heavily commented for clarity. To set the desired mail check interval to 10 seconds, for example, you will need to do: + + # The approximate number of seconds between checks for new mail + mail-check-interval=10 + +Finally, we need to configure an SMTP server to send email messages via Alpine. Go back to the Alpine's setup screen as explained earlier, and press 'C' to set the address of a Google's SMTP server. You will need to edit the value of the SMTP Server (for sending) line as follows: + + smtp.gmail.com:587/tls/user=yourgmailusername@gmail.com + +You will be prompted to save changes when you press 'E' to exit setup. Once you save the changes, you are on your way to sending emails through Alpine! To do that, just go to Compose in the main menu, and start enjoying your Gmail account from the command line. + +### Conclusion ### + +In this post we have discussed how to access Gmail in a terminal environment via a lightweight and powerful command-line email client called Alpine. Alpine is free software released under the Apache Software License 2.0, which is a software license compatible with the GPL. Alpine takes pride in being friendly for new users, yet powerful for seasoned system administrators at the same time. I hope that after reading this article you have come to realize how true that last statement is. + +Feel free to leave your comments or questions using the form below. I look forward to hearing from you! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/gmail-command-line-linux-alpine.html + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:http://xmodulo.com/schedule-appointments-todo-tasks-linux-terminal.html +[2]:http://xmodulo.com/manage-personal-expenses-command-line.html +[3]:http://xmodulo.com/access-facebook-command-line-linux.html +[4]:http://xmodulo.com/access-twitter-command-line-linux.html +[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file diff --git a/sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md b/sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md new file mode 100644 index 0000000000..37e5255b30 --- /dev/null +++ b/sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md @@ -0,0 +1,61 @@ +Install Mate desktop in FreeBSD 10.1 +================================================================================ +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/FreeBSD-790x494.jpg) + +FreeBSD is fully text mode system, however some times new users might want to use GUI desktop environment. This tutorial will help you to install Mate Desktop in Freebsd 10.1. + +Here is my test system details: + + root@Freebsd-unixmen:~ # uname -a + FreeBSD Freebsd-unixmen 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 + root@Freebsd-unixmen:~ + +To start installing Mate desktop in FreeBSD 10.1, the following steps can be used. + + pkg install xf86-video-fbdev mate-desktop mate xorg + +### Add the following lines to /etc/rc.conf ### + + moused_enable="YES" + dbus_enable="YES" + hald_enable="YES" + +### Test the installation. ### + + xinit mate-session + +![](http://www.unixmen.com/wp-content/uploads/2015/03/snapshot2.png) + +Mate doesn’t have a display manager of its own. Hence we can use any other display managers like XDM, GDM, slim etc to use the login manager. Here let’s see how to configure Slim DM with Mate desktop. + +### Install Slim ### + + pkg install slim + +Add the following line to **/etc/rc.conf**: + + slim_enable="YES" + +Add the following line to .xinitrc file in the user’s home directory + + exec mate-session + +Reboot the machine. Now the machine will boot into Slim login where you can login to Mate session. + +![](http://www.unixmen.com/wp-content/uploads/2015/03/snapshot3.png) + +![](http://www.unixmen.com/wp-content/uploads/2015/03/snapshot4.png) + +That’s it. Cheers! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-mate-desktop-freebsd-10-1/ + +作者:[M.el Khamlichi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/pirat9/ \ No newline at end of file diff --git a/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md b/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md new file mode 100644 index 0000000000..ecd44c9c75 --- /dev/null +++ b/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md @@ -0,0 +1,61 @@ +Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl +================================================================================ +> **Question**: I need to convert readable date and time to a corresponding UNIX timestamp (i.e., Epoch time), or vice versa in a Perl program. Can you show me Perl code examples of converting date/time to UNIX timestamp, or conversely, converting UNIX timestamp to human-readable date and time? + +When your Perl script needs to deal with time information, there are two different ways to represent and manipulate date and time in the script. One way is a human-readable string representation of time (e.g., "Sat Mar 14 10:14:05 EDT 2015"), and the other is via UNIX timestamp (also known as "Epoch time") which is the number of elapsed seconds since 00:00:00 UTC, 1 Jaunary 1970. Either method has its own pros and cons, and depending on your requirements you may want to convert one format to the other. + +### Convert Local Time to UNIX Timestamp in Perl ### + +To obtain UNIX time from a date string, you can use str2time() in Date::Parse module. It can handle a variety of date formats, such as: + +- Sat Mar 14 10:14:05 EDT 2015 +- 3/14/2015 10:14:05 -0400 +- 14/Mar/15 10:14:05 +- 14 Mar 15 10:14:05 + + use Date::Parse; + + my $local_time = "Sat Mar 14 10:14:05 EDT 2015"; + + # 1426342445 will be stored in $unix_time + my $unix_time = str2time($local_time); + +Date:Parse module supports multiple languages (English, French, German and Italian) and timezones. For example: + + use Date::Parse; + use Date::Language; + + my $lang = Date::Language->new('French'); + my $unix_time = $lang->str2time("12:14:05, Ago 16, 2014 (CEST)"); + +### Convert UNIX Timestmp to Human-Readable Date and Time in Perl ### + +If you want to show a UNIX timestamp in a human-readable format, you can use localtime() function which converts a UNIX timestamp into a 9-element list. You can use the returned list to construct any kind of human-readable date/time string as you want. Here is a code snippet. + + # $sec, $min, $hour: seconds, minutes and hours + # $mday: the day of the month (0-31) + # $mon: month in the range of 0 (Jaunary) and 11 (December) + # $year: the number of years that have elapsed since 1900 + # $wday: the day of the week in the range of 0 (Sunday) and 6 (Saturday) + # $yday: the day of the year in the range of 0 and 364 (or 365 in leap years) + # $isdst: whether or not it's in daylight saving time + + my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($unix_timestamp); + + # necessary conversion of $mon and $year + $mon += 1; + $year += 1900; + + print "Current time: $year-$mon-$mday $hour:$min:$sec\n"; + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/convert-local-time-unix-timestamp-perl.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md b/sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md new file mode 100644 index 0000000000..cec937b8fd --- /dev/null +++ b/sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md @@ -0,0 +1,150 @@ +Systemd Boot Process a Close Look in Linux +================================================================================ +The way Linux system boots up is quite complex and there have always been need to optimize the way it works. The traditional boot up process of Linux system is mainly handled by the well know init process (also known as SysV init boot system), while there have been identified inefficiencies in the init based boot system, systemd on the other hand is another boot up manager for Linux based systems which claims to overcome the shortcomings of [traditional Linux SysV init][2] based system. We will be focusing our discussion on the features and controversies of systemd , but in order to understand it, let’s see how Linux boot process is handled by traditional SysV init based system. Kindly note that Systemd is still in testing phase and future releases of Linux operating systems are preparing to replace their current boot process with Systemd Boot manager. + +### Understanding Linux Boot Process ### + +Init is the very first process that starts when we power on our Linux system. Init process is assigned the PID of 1. It is parent process for all other processes on the system. When a Linux computer is started, the processor searches for the BIOS on the system memory, BIOS then tests system resources and find the first boot device, usually set as hard disk, it looks for Master Boot Record (MBR) on the hard disk, loads its contents to memory and passes control to it, the further boot process is controlled by MBR. + +Master Boot Record initiates the Boot loader (Linux has two well know boot loaders, GRUB and LILO, 80% of Linux systems are using GRUB loaders), this is the time when GRUB or LILO loads the kernel module. Kernel module immediately looks for the “init” in /sbin partition and executes it. That’s from where init becomes the parent process of Linux system. The very first file read by init is /etc/inittab , from here init decides the run level of our Linux operating system. It finds partition table information from /etc/fstab file and mounts partitions accordingly. Init then launches all the services/scripts specified in the /etc/init.d directory of the default run level. This is the step where all services are initialized by init one by one. In this process, one service at a time is started by init , all services/daemons run in the background and init keeps managing them. + +The shutdown process works in pretty much the reverse function, first of all init stops all services and then filesystem is un-mounted at the last stage. + +The above mentioned process has some shortcomings. The need to replace traditional init with something better have been felt from long time now. Some replacements have been developed and implemented as well. The well know replacements for this init based system as Upstart , Epoch , Mudar and Systemd. Systemd is the one which got most attention and is considered to be better of all available alternatives. + +### Understanding Systemd ### + +Reducing the boot time and computational overhead is the main objective of developing the Systemd. Systemd (System Manager Daemon) , originally developed under GNU General Public License, is now under GNU Lesser General Public License, it is most frequently discussed boot and services manager these days. If your Linux system is configured to use Systemd boot manager, then instead of traditional SysV init, startup process will be handled by systemd. One of the core feature of Systemd is that it supports post boot scripts of SysV Init as well . + +Systemd introduces the parallelization boot concept, it creates a sockets for each daemon that needs to be started, these sockets are abstracted from the processes that use them so they allow daemons to interact with each other. Systemd creates news processes and assigns every process a control group. The processes in different control groups use kernel to communicate with each others. The way [systemd handles the start up process][2] is quite neat, and much optimized as compared to the traditional init based system. Let’s review some of the core features of Systemd. + +- The boot process is much simpler as compared to the init +- Systemd provides concurrent and parallel process of system boot so it ensures better boot speed +- Processes are tracked using control groups, not by PIDs +- Improved ways to handle boot and services dependencies. +- Capability of system snapshots and restore +- Monitoring of started services ; also capabale of restarting any crashed services +- Includes systemd-login module to control user logins. +- Ability to add and remove components +- Low memory foot prints and ability for job scheduling +- Journald module for event logging and syslogd module for system log. + +Systemd handles system shutdown process in well organized way as well. It has three script located inside /usr/lib/systemd/ directory, named systemd-halt.service , systemd-poweroff.service , systemd-reboot.service . These scripts are executed when user choose to shutdown, reboot or halt Linux system. In the event of shutdown, systemd first un-mount all file systems and disabled all swap devices, detaches the storage devices and kills remaining processes. + +![](http://images.linoxide.com/systemd-boot-process.jpg) + +### Structural Overview of Systemd ### + +Let’s review Linux system boot process with some structural details when it is using systemd as boot and services manager. For the sake of simplicity, we are listing the process in steps below: + +**1.** The very first steps when you power on your system is the BIOS initialization. BIOS reads the boot device settings, locates and hands over control to MBR (assuming hard disk is set as first boot device). + +**2.** MBR reads information from Grub or LILO boot loader and initializes the kernel. Grub or LILO will specify how to handle further system boot up. If you have specified systemd as boot manager in grub configuration file, then the further boot process will be handled by systemd. Systemd handles boot and services management process using “targets”. The ”target" files in systemd are used for grouping different boot units and start up synchronization processes. + +**3.** The very first target executed by systemd is **default.target**. But default.target is actually a symlink to **graphical.target**. Symlink in linux works just like shortcuts in Windows. Graphical.target file is located at /usr/lib/systemd/system/graphical.target path. We have shown the contents of graphical.target file in the following screenshot. + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/graphical1.png) + +**4.** At this stage, **multi-user.target** has been invoked and this target keeps its further sub-units inside “/etc/systemd/system/multi-user.target.wants” directory. This target sets the environment for multi user support. None root users are enabled at this stage of boot up process. Firewall related services are started on this stage of boot as well. + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/multi-user-target1.png) + +"multi-user.target" passes control to another layer “**basic.target**”. + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Basic-Target.png) + +**5.** "basic.target" unit is the one that starts usual services specially graphical manager service. It uses /etc/systemd/system/basic.target.wants directory to decide which services need to be started, basic.target passes on control to **sysinit.target**. + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Sysint-Target.png) + +**6.** "sysinit.target" starts important system services like file System mounting, swap spaces and devices, kernel additional options etc. sysinit.target passes on startup process to **local-fs.target**. The contents of this target unit are shown in the following screenshot. + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/local-FS-Target.png) + +**7.** local-fs.target , no user related services are started by this target unit, it handles core low level services only. This target is the one performing actions on the basis of /etc/fstab and /etc/inittab files. + +### Analyzing System Boot Performancev ### + +Systemd offers tool to identify and troubleshoot boot related issues or performance concerns. **Systemd-analyze** is a built-in command which lets you examine boot process. You can find out the units which are facing errors during boot up and can further trace and correct boot component issues. Some useful systemd-analyze commands are listed below. + +**systemd-analyze time** shows the time spent in kernel, and normal user space. + + $ systemd-analyze time + + Startup finished in 1440ms (kernel) + 3444ms (userspace) + +**systemd-analyze blame** prints a list of all running units, sorted by the time taken by then to initialize, in this way you can have idea of which services are taking long time to start during boot up. + + $ systemd-analyze blame + + 2001ms mysqld.service + 234ms httpd.service + 191ms vmms.service + +**systemd-analyze verify** shows if there are any syntax errors in the system units. **Systemd-analyze plot** can be used to write down whole startup process to a SVG formate file. Whole boot process is very lengthy to read, so using this command we can dump the output of whole boot processing into a file and then can read and analyze it further. The following command will take care of this. + + systemd-analyze plot > boot.svg + +### Systemd Controversies ### + +Systemd has not been lucky to receive love from everyone, some professionals and administrators have different opinions on its working and developments. Per critics of Systemd, it’s “not Unix-like” because it tried to replace some system services. Some professionals don’t like the idea of using binary configuration files as well. It is said that editing systemd configuration is not an easy tasks and there are no graphical tools available for this purpose. + +### Test Systemd on Ubuntu 14.04 and 12.04 ### + +Originally, Ubuntu decided to replace their current boot process with Systemd in Ubuntu 16.04 LTS. Ubuntu 16.04 is supposed to be released in April 2016, but considering the popularity and demand for Systemd, the upcoming **Ubuntu 15.04** will have it as its default boot manager. Good news is that the user of Ubuntu 14.04 Trusty Tahr And Ubuntu 12.04 Precise Pangolin can still test Systemd on their machines. The test process is not very complex, all you need to do is to include the related PPA to the system, update repository and perform system upgrade. + +**Disclaimer** : Please note that its still in testing and development stages for Ubuntu. Testing packages might have any unknown issues and in worst case scenario, they might break your system configurations. Make sure you backup your important data before trying this upgrade. + +Run following command on the terminal to add ppa to the your ubuntu system: + + sudo add-apt-repository ppa:pitti/systemd + +You will be seeing warning message here because we are trying to use temporary/testing PPA which is not recommended for production machines. + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/PPA-Systemd1.png) + +Now update the APT Package Manager repositories by running the following command. + + sudo apt-get update + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Update-APT1.png) + +Perform system upgrade by running the following command. + + sudo apt-get dist-upgrade + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/System-Upgrade.png) + +That’s all, you should be able to see configuration files of systemd on your ubuntu system now, just browse to the /lib/systemd/ directory and see the files there. + +Alright, it’s time we edit grub configuration file and specify systemd as default Boot Manager. Edit grub file using Gedit text editor. + + sudo gedit /etc/default/grub + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Edit-Grub.png) + +Here edit GRUB_CMDLINE_LINUX_DEFAULT parameter in this file and specify the value of this parameter as: "**init=/lib/systemd/systemd**" + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Grub-Systemd.png) + +That’s all, your ubuntu system is no longer using its traditional boot manager, its using Systemd Manager now. Reboot your system and see the systemd boot up process. + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Sytemd-Boot.png) + +### Conclusion ### + +Systemd is no doubt a step forward towards improving Linux Boot process; it’s an awesome suite of libraries and daemons that together improve the system boot and shutdown process. Many linux distributions are preparing to support it as their official boot manager. In future releases of Linux distros, we can hope to see systemd startup. But on the other hand, in order to succeed and to be adopted on the wide scale, systemd should address the concerns of critics as well. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/systemd-boot-process/ + +作者:[Aun Raza][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:http://linoxide.com/booting/boot-process-of-linux-in-detail/ +[2]:http://0pointer.de/blog/projects/self-documented-boot.html \ No newline at end of file From b3309a9a1eb6126fe745f822832748f1d395c2bb Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Mon, 16 Mar 2015 18:22:44 +0800 Subject: [PATCH 0292/2517] [translated] 20150306 How to Setup lftp--A Simple Command line FTP Program.md --- ...lftp--A Simple Command line FTP Program.md | 175 ------------------ ...lftp--A Simple Command line FTP Program.md | 174 +++++++++++++++++ 2 files changed, 174 insertions(+), 175 deletions(-) delete mode 100644 sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md create mode 100644 translated/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md diff --git a/sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md b/sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md deleted file mode 100644 index ad5f1da84c..0000000000 --- a/sources/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md +++ /dev/null @@ -1,175 +0,0 @@ -zpl1025 -How to Setup lftp - A Simple Command line FTP Program -================================================================================ -Hi everyone, this article is about Lftp and how we can install Lftp in our Linux Operating System. [Lftp][1] is a command line based File Transfer Software also known as FTP Client which was developed by Alexander Lukyanov and was distributed as GNU General Public License. Besides FTP, it also supports FTPS, HTTP, HTTPS, HFTP, FISH, and SFTP. The program also supports FXP, allowing for data transfers between two FTP servers bypassing the client machine. - -It has some awesome advanced features such as recursively mirroring entire directory trees and resuming downloads. Transfers can be scheduled for execution at a later time, bandwidth can be throttled, transfer queues can be created, and Unix shell-like job control is supported. The client can also be used interactively or automated with scripts. - -### Installing Lftp ### - -Before we try to run lftp, we have make sure that it is properly installed in our Linux Distribution. Here are some commands mentioned for installing lftp in the list common distribution of Linux. - -**On Ubuntu 14.04 LTS** - -In Ubuntu 14.04 LTS and its derivatives, we can install lftp using apt manager. So, to install it, we'll need to run the following commands in a shell or a terminal under sudo privilege. - - $ sudo apt-get install lftp - -![ubuntu install lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/ubuntu-install-lftp.png) - -**On CentOS/Fedora/RHEL** - -As lftp is also available in the repository of Fedora, CentOS and RHEL, we can use **yum** manager to install it. - - $ sudo yum install lftp - -![fedora lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/fedora-lftp.png) - -**On Arch Linux** - -It is also available in Arch Linux Package Repository so, we can simply use pacman to install it. - - $ sudo pacman -S lftp - -![archlinux install lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/archlinux-install-lftp.png) - -**On OpenSuse** - -Zypper, package management software for OpenSuse can be used to install lftp. Here is the command with which one can install it on their OpenSuse machine. - - $ sudo zypper install lftp - -![opensuse lftp install](http://blog.linoxide.com/wp-content/uploads/2015/03/lftp_install.png) - -### Logging in ### - -To login to a ftp server or sftp server, we'll first need to know about the required credential for the login like username, password, ports. - -After that, we'll want to login using lftp client as basic usage. - - $ lftp ftp://linoxide@localhost - -![ftp login](http://blog.linoxide.com/wp-content/uploads/2015/03/lftp-login.png) - -If we need to point a port to the login then, we'll need to add port as shown below. - - $ lftp ftp://linoxide@localhost:21 - -![ftp login with ports](http://blog.linoxide.com/wp-content/uploads/2015/03/lftp-login-port.png) - -### Navigation ### - -We can use **ls** to list files and directories, **cd** to enter into a directory. - -![ls and cd](http://blog.linoxide.com/wp-content/uploads/2015/03/ls-cd-lftp.png) - -### Uploading and Download Files ### - -We can use **pget** for downloading files from the remote server. - - > pget linspeed.svg - -![pget lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/pget-lftp.png) - -We can use **put** for uploading files to the remote server. - - > put linoxide.tar - -![upload with put](http://blog.linoxide.com/wp-content/uploads/2015/03/put-upload.png) - -To resume partially downloaded files/directories, we will use the -c switch: - - > mirror -c Directory - - >pget -c linoxide.tar - - > put -c upload.tar - -### Using Mirror ### - -We can use mirror to download the whole directory pointed as the source. - - > mirror remote local - -![download with mirror](http://blog.linoxide.com/wp-content/uploads/2015/03/mirror.png) - -There is also reverse mirror (mirror -R) which uploads or updates a directory tree on server. - - > mirror -R local remote - -![upload or update with mirror reverse](http://blog.linoxide.com/wp-content/uploads/2015/03/mirror-reverse.png) - -To resume partially downloaded files/directories, we will use the -c switch: - - > mirror -c Directory - -### To Queue Items to Download ### - -We can use queue option with lftp so that we can download selected files in a queue one by one as there is an option in GUI based clients to select and download in a queue. Here's an example on it. - -To prevent queue from auto transferring while you add to it : - - > queue stop - -Now, we'll add them into queue. - - > queue mirror "directory" - - > queue pget "file.tar" - -After the queue has been added, we should run queue start command. - - > queue start - -To remove the entire queue run the following command. - - > queue -d - -### Segmented Downloading ### - -Here, in this example we are segmenting files into 3 segments, one can change it according to their own need. - -A pget command using segmentation is **pget -n 3 file.tar**, where 3 is the number of segments. - - > pget -n 3 file.tar - -A mirror command using segmentation is **mirror --use-pget-n=3 directory**, where 3 is the number of segments. - - > mirror --use-pget-n=3 linxoxide - -We can use jobs -v to see the speeds of the individual segments as well as the total speed. - -### To Stop, Resume or Kill a Transfer ### - -To cancel a transfer we can press Ctrl+c . And to resume a download we can use the -c (--continue) switch as shown below. - - > mirror -c directory - -And to kill an active transfer we should run **kill** and to kill and delete all we'll need to run **kill all** as shown below. - - > kill - - > kill all - -### Exiting ### - -To quit from lftp, we should run exit command in the terminal or inside lftp interface. - - > exit - -### Conclusion ### - -Hurray! We have successfully installed lftp and learned some basic major ways to use it. lftp is an awesome command line ftp client which supports a lot of additional functionality and cool features. It has a lot stuffs more than the other common ftp client. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy lftp :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/setup-lftp-command-line-ftp/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://lftp.yar.ru/ diff --git a/translated/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md b/translated/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md new file mode 100644 index 0000000000..df90008704 --- /dev/null +++ b/translated/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md @@ -0,0 +1,174 @@ +如何设置lftp - 一个简易的命令行FTP程序 +================================================================================ +大家好,这篇文章是介绍Lftp以及如何在Linux操作系统下安装的。[Lftp][1]是一个基于命令行的文件传输软件也被称为FTP客户端,由Alexander Lukyanov开发并以GNU GPL协议许可发行。除了FTP,它还支持FTPS,HTTP,HTTPS,HFTP,FISH,以及SFTP。这个程序还支持FXP,允许数据绕过客户端直接在两个FTP服务器之间传输。 + +他有很多很棒的高级功能,比如完整目录树递归镜像以及断点续传下载。传输任务可以安排在稍后的时间段执行,可以限制带宽,可以创建传输列表,还支持类似Unix shell的任务控制。客户端还可以在交互式或自动脚本里使用。 + +### 安装Lftp ### + +在运行lftp之前,我们需要确定它已经正确安装在我们的Linux发行版中了。下面是在常见Linux发行版中安装lftp的一些命令。 + +**Ubuntu 14.04 LTS** + +在Ubuntu 14.04 LTS以及它的衍生版中,我们可以通过apt管理程序安装lftp。要安装它,我们需要使用sudo权限在shell或终端里运行下面的命令。 + + $ sudo apt-get install lftp + +![ubuntu install lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/ubuntu-install-lftp.png) + +**CentOS/Fedora/RHEL** + +因为在Fedora,CentOS和RHEL的软件仓库里也能找到lftp,我们可以用**yum**管理程序来安装它。 + + $ sudo yum install lftp + +![fedora lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/fedora-lftp.png) + +**Arch Linux** + +在Arch Linux安装包仓库里也有,我们可以简单地使用pacman来安装它。 + + $ sudo pacman -S lftp + +![archlinux install lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/archlinux-install-lftp.png) + +**OpenSuse** + +OpenSuse系统里的包管理软件Zypper可以用来安装lftp。下面是在OpenSuse机器上用来安装的命令。 + + $ sudo zypper install lftp + +![opensuse lftp install](http://blog.linoxide.com/wp-content/uploads/2015/03/lftp_install.png) + +### 登录 ### + +要登录到ftp服务器或sftp服务器,我们首先需要知道所要求的认证信息,比如用户名,密码,端口。 + +之后,我们想通过lftp来登录。 + + $ lftp ftp://linoxide@localhost + +![ftp login](http://blog.linoxide.com/wp-content/uploads/2015/03/lftp-login.png) + +如果需要指定登录端口,我们可以按下面的方式加上去。 + + $ lftp ftp://linoxide@localhost:21 + +![ftp login with ports](http://blog.linoxide.com/wp-content/uploads/2015/03/lftp-login-port.png) + +### 浏览 ### + +我们可以用**ls**命令来列出文件和目录,用**cd**命令打开目录。 + +![ls and cd](http://blog.linoxide.com/wp-content/uploads/2015/03/ls-cd-lftp.png) + +### 上传和下载文件 ### + +我们可以用**pget**命令来从远端服务器下载文件。 + + > pget linspeed.svg + +![pget lftp](http://blog.linoxide.com/wp-content/uploads/2015/03/pget-lftp.png) + +我们可以用**put**命令来上传文件到远端服务器。 + + > put linoxide.tar + +![upload with put](http://blog.linoxide.com/wp-content/uploads/2015/03/put-upload.png) + +要恢复之前只下载了一部分的文件/目录,我们可以用-c开关: + + > mirror -c Directory + + >pget -c linoxide.tar + + > put -c upload.tar + +### 使用镜像命令 ### + +我们可以用mirror命令来下载所指定的整个目录。 + + > mirror remote local + +![download with mirror](http://blog.linoxide.com/wp-content/uploads/2015/03/mirror.png) + +还可以做反向镜像(mirror -R),可以用来上传或更新本地目录树到服务器上。 + + > mirror -R local remote + +![upload or update with mirror reverse](http://blog.linoxide.com/wp-content/uploads/2015/03/mirror-reverse.png) + +要恢复之前下载了一部分的文件/目录,我们可以用-c开关: + + > mirror -c Directory + +### 下载队列 ### + +我们可以在lftp里使用queue的选项,这样我们可以像基于GUI的客户端那样挨个下载队列里选择的文件。下面举个例子。 + +为了避免队列自动开始传输,我们可以这样做: + + > queue stop + +现在,我们添加任务到队列。 + + > queue mirror "directory" + + > queue pget "file.tar" + +在建立好队列后,我们再运行queue start命令。 + + > queue start + +可以运行下面的命令移除整个队列。 + + > queue -d + +### 分块下载 ### + +下面是一个把一个文件分成3块来下载的例子,你可以根据自己的需要调整。 + +使用pget命令分块功能的方式是**pget -n 3 file.tar**,里面的3是分块的数目。 + + > pget -n 3 file.tar + +使用mirror命令分块功能的方式是**mirror --use-pget-n=3 directory**,里面的3是分块的数目。 + + > mirror --use-pget-n=3 linxoxide + +我们可以用jobs -v命令来查看每个独立分块的下载速度以及整体速度。 + +### 停止,继续或删除一次传输任务 ### + +要取消传输我们可以按下Ctrl+C。而要恢复下载我们可以像下面那样使用-c (--continue)开关。 + + > mirror -c directory + +要删除一次正在正在传输的任务我们可以用**kill**命令,而要删除所有任务我们可以使用下面那样的**kill all**命令。 + + > kill + + > kill all + +### 退出 ### + +要从lftp退出,我们需要在终端或lftp交互接口中运行exit命令。 + + > exit + +### 总结 ### + +哇!我们已经成功地安装了lftp并学会了使用它的一些基础的主要方式。lftp是一个非常棒的命令行ftp客户端,它支持许多额外的功能以及很酷的特性。它比其他普通ftp客户端多了很多东西。好吧,你要是有任何问题,建议,反馈,请在下面的评论区里留言。谢谢!享用lftp吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-lftp-command-line-ftp/ + +作者:[Arun Pyasi][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://lftp.yar.ru/ From 4c6e07095e54af61cf49bbe370af19d6705527c5 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Mon, 16 Mar 2015 18:28:32 +0800 Subject: [PATCH 0293/2517] [translating] 20150309 Comparative Introduction To FreeBSD For Linux Users.md --- .../20150316 Systemd Boot Process a Close Look in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md b/sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md index cec937b8fd..eded061738 100644 --- a/sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md +++ b/sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md @@ -1,3 +1,4 @@ +zpl1025 Systemd Boot Process a Close Look in Linux ================================================================================ The way Linux system boots up is quite complex and there have always been need to optimize the way it works. The traditional boot up process of Linux system is mainly handled by the well know init process (also known as SysV init boot system), while there have been identified inefficiencies in the init based boot system, systemd on the other hand is another boot up manager for Linux based systems which claims to overcome the shortcomings of [traditional Linux SysV init][2] based system. We will be focusing our discussion on the features and controversies of systemd , but in order to understand it, let’s see how Linux boot process is handled by traditional SysV init based system. Kindly note that Systemd is still in testing phase and future releases of Linux operating systems are preparing to replace their current boot process with Systemd Boot manager. @@ -147,4 +148,4 @@ via: http://linoxide.com/linux-how-to/systemd-boot-process/ [a]:http://linoxide.com/author/arunrz/ [1]:http://linoxide.com/booting/boot-process-of-linux-in-detail/ -[2]:http://0pointer.de/blog/projects/self-documented-boot.html \ No newline at end of file +[2]:http://0pointer.de/blog/projects/self-documented-boot.html From bc2776edfdfd6f32e158b429b6c0f09619e7c24e Mon Sep 17 00:00:00 2001 From: LouisWei Date: Mon, 16 Mar 2015 21:11:57 +0800 Subject: [PATCH 0294/2517] translating wi-cuckoo --- ...best uses for open source software in the business world.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150309 10 best uses for open source software in the business world.md b/sources/talk/20150309 10 best uses for open source software in the business world.md index b0c4475652..5393108cde 100644 --- a/sources/talk/20150309 10 best uses for open source software in the business world.md +++ b/sources/talk/20150309 10 best uses for open source software in the business world.md @@ -1,3 +1,4 @@ +translating wi-cuckoo LLAP 10 best uses for open source software in the business world ================================================================================ > Open source offers some compelling benefits for businesses large and small -- but you might be surprised at some of the ways it's being used. @@ -82,4 +83,4 @@ via: http://www.techrepublic.com/blog/10-things/10-best-uses-for-open-source-sof [13]:https://owncloud.org/ [14]:http://audacity.sourceforge.net/ [15]:http://www.openshot.org/ -[16]:https://www.prestashop.com/ \ No newline at end of file +[16]:https://www.prestashop.com/ From 9998ff511e8da36806f08aab04e9e172801b6649 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 16 Mar 2015 21:33:22 +0800 Subject: [PATCH 0295/2517] PUB:20130315 How to protect SSH server from brute force attacks using fail2ban @theo-l --- ...from brute force attacks using fail2ban.md | 59 ++++++++++--------- 1 file changed, 32 insertions(+), 27 deletions(-) rename {translated/tech => published}/20130315 How to protect SSH server from brute force attacks using fail2ban.md (56%) diff --git a/translated/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md b/published/20130315 How to protect SSH server from brute force attacks using fail2ban.md similarity index 56% rename from translated/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md rename to published/20130315 How to protect SSH server from brute force attacks using fail2ban.md index 599fcfceeb..e2940a2ed7 100644 --- a/translated/tech/20130315 How to protect SSH server from brute force attacks using fail2ban.md +++ b/published/20130315 How to protect SSH server from brute force attacks using fail2ban.md @@ -1,10 +1,11 @@ -如何使用fail2ban来保护SSH服务器避免暴力破解攻击。 +如何使用 fail2ban 防御 SSH 服务器的暴力破解攻击 ================ -对于SSH服务的常见的攻击就是暴力破解攻击--远程攻击者通过不同的密码来进行无限地登录尝试。当然SSH存在参数来防备密码验证以及可用的验证机制,例如[公钥验证][1]或者[双重验证][2],来解决这类攻击. 将不同的验证方法的优劣处先放在一边,先考虑一下强制密码验证的情形.你是如何保护你的SSH服务器免遭暴力破解攻击的呢? -[fail2ban][3]是linux上的一个著名的入侵保护的开源框架,它会监控多个系统的日志文件(例如/var/log/auth.log 或者 /var/log/secure)并根据检测到的任何可疑的行为自动触发不同的防御活动。实际上,fail2ban在防御对SSH服务器的暴力密码破解上非常有用。 +对于SSH服务的常见的攻击就是暴力破解攻击——远程攻击者通过不同的密码来无限次地进行登录尝试。当然SSH可以设置使用非密码验证验证方式来对抗这种攻击,例如[公钥验证][1]或者[双重验证][2]。将不同的验证方法的优劣处先放在一边,如果我们必须使用密码验证方式怎么办?你是如何保护你的 SSH 服务器免遭暴力破解攻击的呢? -在该指导教程中,我会演示**如何安装并配置fail2ban来保护SSH服务器避免来自远程IP地址的暴力攻击** +[fail2ban][3] 是 Linux 上的一个著名的入侵保护的开源框架,它会监控多个系统的日志文件(例如:/var/log/auth.log 或者 /var/log/secure)并根据检测到的任何可疑的行为自动触发不同的防御动作。事实上,fail2ban 在防御对SSH服务器的暴力密码破解上非常有用。 + +在这篇指导教程中,我会演示**如何安装并配置 fail2ban 来保护 SSH 服务器以避免来自远程IP地址的暴力攻击**。 ###在linux上安装Fail2ban @@ -16,15 +17,15 @@ $ sudo yum install fail2ban -在ubuntu,Debian或 Linux Mint上安装fail2ban: +在ubuntu,Debian 或 Linux Mint上安装fail2ban: $ sudo apt-get install fail2ban ### 为SSH服务器配置Fail2ban -现在你已经准备好了通过配置fail2ban来加强你的SSH服务器。你需要编辑其配置文件/etc/fail2ban/jail.conf。 在配置文件的“DEFAULT[默认]”区,你可以在此定义所有受监控的服务的默认参数,另外在特定的服务器,你可以定义任何特定服务键入来覆载默认的参数配置(例如SSH,Apache等)。 +现在你已经准备好了通过配置 fail2ban 来加强你的SSH服务器。你需要编辑其配置文件 /etc/fail2ban/jail.conf。 在配置文件的“[DEFAULT]”区,你可以在此定义所有受监控的服务的默认参数,另外在特定服务的配置部分,你可以为每个服务(例如SSH,Apache等)设置特定的配置来覆盖默认的参数配置。 -在特定服务监狱区(在[DEFAULT(默认)]区后面的地方),你需要定义[ssh-iptables]区,这里用来定义SSH相关的监狱配置。禁止真正的IP地址是通过iptables完成的。 +在针对服务的监狱区(在[DEFAULT]区后面的地方),你需要定义一个[ssh-iptables]区,这里用来定义SSH相关的监狱配置。真正的禁止IP地址的操作是通过iptables完成的。 下面是一个包含“ssh-iptables”监狱配置的/etc/fail2ban/jail.conf的文件样例。当然根据你的需要,你也可以指定其他的应用监狱。 @@ -32,17 +33,17 @@ ``` [DEFAULT] -# a space delimited list of IP addresses, CIDR prefixes, or DNS hostnames -# to bypass fail2ban protection +# 以空格分隔的列表,可以是 IP 地址、CIDR 前缀或者 DNS 主机名 +# 用于指定哪些地址可以忽略 fail2ban 防御 ignoreip = 127.0.0.1 172.31.0.0/24 10.10.0.0/24 192.168.0.0/24 -# number of seconds during which a client host is blocked +# 客户端主机被禁止的时长(秒) bantime = 86400 -# number of failures before a client host is blocked +# 客户端主机被禁止前允许失败的次数 maxretry = 5 -# number of seconds within which "maxentry" failures result in banning +# 查找失败次数的时长(秒) findtime = 600 mta = sendmail @@ -52,17 +53,17 @@ enabled = true filter = sshd action = iptables[name=SSH, port=ssh, protocol=tcp] sendmail-whois[name=SSH, dest=your@email.com, sender=fail2ban@email.com] -# for Debian-based distros +# Debian 系的发行版 logpath = /var/log/auth.log -# for Red Hat-based distros +# Red Hat 系的发行版 logpath = /var/log/secure -# ssh-specific max-retry threshold +# ssh 服务的最大尝试次数 maxretry = 3 ``` -根据上述配置,fail2ban会自动禁止在最近10分钟内有超过3次访问尝试失败的任意IP地址1。一旦被禁,这个IP地址将会保持在24小时内被持续阻塞。这个事件会通过sendemail发送到一个接收邮件地址进行通知。 +根据上述配置,fail2ban会自动禁止在最近10分钟内有超过3次访问尝试失败的任意IP地址。一旦被禁,这个IP地址将会在24小时内一直被禁止访问 SSH 服务。这个事件也会通过sendemail发送邮件通知。 -一旦配置文件准备就位,按照以下方式重启fail2ban服务。 +一旦配置文件准备就绪,按照以下方式重启fail2ban服务。 在 Debian, Ubuntu 或 CentOS/RHEL 6: @@ -72,14 +73,14 @@ maxretry = 3 $ sudo systemctl restart fail2ban -为了验证fail2ban成功运行,使用参数'ping'来运行fail2ban-client 命令。 如果fail2ban服务正常运行,你可以看到“pong(膨)”作为响应。 +为了验证fail2ban成功运行,使用参数'ping'来运行fail2ban-client 命令。 如果fail2ban服务正常运行,你可以看到“pong(嘭)”作为响应。 $ sudo fail2ban-client ping Server replied: pong -### 测试fail2ban 保护SSH免遭暴力破解攻击 +### 测试 fail2ban 保护SSH免遭暴力破解攻击 -为了测试fail2ban是否能正常工作,尝试通过使用错误的密码来用SSH连接到服务器模拟一个暴力破解攻击。与此同时,监控/var/log/fail2ban.log--该文件记录在fail2ban中发生的任何敏感事件。 +为了测试fail2ban是否能正常工作,尝试通过使用错误的密码来用SSH连接到服务器模拟一个暴力破解攻击。与此同时,监控 /var/log/fail2ban.log,该文件记录在fail2ban中发生的任何敏感事件。 $ sudo tail -f /var/log/fail2ban.log @@ -88,6 +89,7 @@ maxretry = 3 根据上述的日志文件,Fail2ban通过检测IP地址的多次失败登录尝试,禁止了一个IP地址192.168.1.8。 ###检查fail2ban状态并解禁被锁住的IP地址 + 由于fail2ban的“ssh-iptables”监狱使用iptables来阻塞问题IP地址,你可以通过以下方式来检测当前iptables来验证禁止规则。 $ sudo iptables --list -n @@ -110,9 +112,10 @@ RETURN all -- 0.0.0.0/0 0.0.0.0/0 ``` 如果你想要从fail2ban中解锁某个IP地址,你可以使用iptables命令: + $ sudo iptables -D fail2ban-SSH -s 192.168.1.8 -j DROP -当然你可以使用上述的iptables命令手动地检验和管理fail2ban的IP阻塞列表,但实际上有一个适当的方法就是使用fail2ban-client命令行工具。这个命令不仅允许你对"ssh-iptables"监狱进行管理,也可以通过一个标准的命令行接口对其他任何的fail2ban监狱类型。 +当然你可以使用上述的iptables命令手动地检验和管理fail2ban的IP阻塞列表,但实际上有一个适当的方法就是使用fail2ban-client命令行工具。这个命令不仅允许你对"ssh-iptables"监狱进行管理,同时也是一个标准的命令行接口,可以管理其他类型的fail2ban监狱。 为了检验fail2ban状态(会显示出当前活动的监狱列表): @@ -132,8 +135,9 @@ RETURN all -- 0.0.0.0/0 0.0.0.0/0 ![](https://farm8.staticflickr.com/7465/16065915571_b215a8b344_b.jpg) -注意,如果你停止了Fail2ban,那么所有的IP地址都会被解锁。当你重启Fail2ban,它会从/etc/log/secure(或 /var/log/auth.log)中找到异常的IP地址列表,如果这些异常对象的流逝时间仍然在禁止时间内,那么Fail2ban会重新将这些IP地址禁止。 -### Set Fail2ban to Auto-start on Boot +注意,如果你停止了Fail2ban 服务,那么所有的IP地址都会被解锁。当你重启 Fail2ban,它会从/etc/log/secure(或 /var/log/auth.log)中找到异常的IP地址列表,如果这些异常地址的发生时间仍然在禁止时间内,那么Fail2ban会重新将这些IP地址禁止。 + +### 设置 Fail2ban 自动启动 一旦你成功地测试了fail2ban之后,最后一个步骤就是在你的服务器上让其在开机时自动启动。在基于Debian的发行版中,fail2ban已经默认让自动启动生效。在基于Red-Hat的发行版中,按照下面的方式让自动启动生效。 @@ -147,14 +151,15 @@ RETURN all -- 0.0.0.0/0 0.0.0.0/0 ### 总结 -在该教程中,我演示了如何安装并配置fail2ban来保护一个SSH服务器。当然fail2ban可以缓解暴力密码攻击,但是请注意,这并不能保护SSH服务器避免来自复杂分布的暴力破解组织,这些攻击者通过使用成千上万个机器控制的IP地址来绕过fail2ban的防御机制。 +在该教程中,我演示了如何安装并配置fail2ban来保护一个SSH服务器。当然fail2ban可以缓解暴力密码攻击,但是请注意,这并不能保护SSH服务器避免来自复杂的分布式暴力破解组织,这些攻击者通过使用成千上万个机器控制的IP地址来绕过fail2ban的防御机制。 + ----------- -via: http://linoxide.com/tools/linux-compress-decompress-tools/ +via: http://xmodulo.com/how-to-protect-ssh-server-from-brute-force-attacks-using-fail2ban.html 作者:[Dan Nanni][a] 译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -162,4 +167,4 @@ via: http://linoxide.com/tools/linux-compress-decompress-tools/ [1]:http://xmodulo.com/how-to-force-ssh-login-via-public-key-authentication.html [2]:http://xmodulo.com/two-factor-authentication-ssh-login-linux.html [3]:http://www.fail2ban.org/ -[4]:http://xmodulo.com/2013/03/how-to-set-up-epel-repository-on-centos.html +[4]:http://linux.cn/article-2324-1.html From a98199820b7701957281103e500751fcdacfccdf Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 16 Mar 2015 22:08:23 +0800 Subject: [PATCH 0296/2517] PUB:20150104 How to configure fail2ban to protect Apache HTTP server @geekpi --- ... fail2ban to protect Apache HTTP server.md | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) rename {translated/tech => published}/20150104 How to configure fail2ban to protect Apache HTTP server.md (61%) diff --git a/translated/tech/20150104 How to configure fail2ban to protect Apache HTTP server.md b/published/20150104 How to configure fail2ban to protect Apache HTTP server.md similarity index 61% rename from translated/tech/20150104 How to configure fail2ban to protect Apache HTTP server.md rename to published/20150104 How to configure fail2ban to protect Apache HTTP server.md index 8f89c4b388..2d7b3efc88 100644 --- a/translated/tech/20150104 How to configure fail2ban to protect Apache HTTP server.md +++ b/published/20150104 How to configure fail2ban to protect Apache HTTP server.md @@ -1,16 +1,16 @@ -如何配置fail2ban来保护Apache服务器 +如何配置 fail2ban 来保护 Apache 服务器 ================================================================================ -生产环境中的Apache服务器可能会受到不同的攻击。攻击者或许试图通过暴力攻击或者执行恶意脚本来获取未经授权或者禁止访问的目录。一些恶意爬虫或许会扫描你网站下的任意安全漏洞,或者手机email地址或者web表格来发送垃圾邮件。 +生产环境中的 Apache 服务器可能会受到不同的攻击。攻击者或许试图通过暴力攻击或者执行恶意脚本来获取未经授权或者禁止访问的目录。一些恶意爬虫或许会扫描你网站下的各种安全漏洞,或者通过收集email地址和web表单来发送垃圾邮件。 -Apache服务器具有综合的日志功能来捕捉不同表明是攻击的异常事件。然而,它还不能系统地解析具体的apache日志并迅速地反应到潜在的攻击(比如,禁止/解禁IP地址)。这时候`fail2ban`可以解救这一切,解放了系统管理员的工作。 +Apache服务器具有全面的日志功能,可以捕捉到各种攻击所反映的异常事件。然而,它还不能系统地解析具体的apache 日志并迅速地对潜在的攻击进行反应(比如,禁止/解禁IP地址)。这时候`fail2ban`可以解救这一切,解放了系统管理员的工作。 -`fail2ban`是一款入侵防御工具,可以基于系统日志检测不同的工具并且可以自动采取保护措施比如:通过`iptables`禁止ip、阻止/etc/hosts.deny中的连接、或者通过邮件通知事件。fail2ban具有一系列预定义的“监狱”,它使用特定程序日志过滤器来检测通常的攻击。你也可以编写自定义的规则来检测来自任意程序的攻击。 +`fail2ban`是一款入侵防御工具,可以基于系统日志检测不同的工具并且可以自动采取保护措施比如:通过`iptables`禁止ip、通过 /etc/hosts.deny 阻止连接、或者通过邮件发送通知。fail2ban具有一系列预定义的“监狱”,它使用特定程序日志过滤器来检测通常的攻击。你也可以编写自定义的规则来检测来自任意程序的攻击。 在本教程中,我会演示如何配置fail2ban来保护你的apache服务器。我假设你已经安装了apache和fail2ban。对于安装,请参考[另外一篇教程][1]。 ### 什么是 Fail2ban 监狱 ### -让我们更深入地了解fail2ban监狱。监狱定义了具体的应用策略,它会为指定的程序触发一个保护措施。fail2ban在/etc/fail2ban/jail.conf 下为一些流行程序如Apache、Dovecot、Lighttpd、MySQL、Postfix、[SSH][2]等预定义了一些监狱。每个依赖于特定的程序日志过滤器(在/etc/fail2ban/fileter.d 下面)来检测通常的攻击。让我看一个例子监狱:SSH监狱。 +让我们更深入地了解 fail2ban 监狱。监狱定义了具体的应用策略,它会为指定的程序触发一个保护措施。fail2ban在 /etc/fail2ban/jail.conf 下为一些流行程序如Apache、Dovecot、Lighttpd、MySQL、Postfix、[SSH][2] 等预定义了一些监狱。每个监狱都通过特定的程序日志过滤器(在/etc/fail2ban/fileter.d 下面)来检测通常的攻击。让我看一个例子监狱:SSH监狱。 [ssh] enabled = true @@ -24,15 +24,15 @@ SSH监狱的配置定义了这些参数: - **[ssh]**: 方括号内是监狱的名字。 - **enabled**:是否启用监狱 -- **port**: 端口的数字 (或者数字对应的名称). -- **filter**: 检测攻击的检测规则 -- **logpath**: 检测的日志文件 -- **maxretry**: 禁止前失败的最大数字 -- **banaction**: 禁止操作 +- **port**: 端口号(或者对应的服务名称) +- **filter**: 检测攻击的日志解析规则 +- **logpath**: 所检测的日志文件 +- **maxretry**: 最大失败次数 +- **banaction**: 所进行的禁止操作 -定义配置文件中的任意参数都会覆盖相应的默认配置`fail2ban-wide` 中的参数。相反,任意缺少的参数都会使用定义在[DEFAULT]字段的值。 +定义在监狱配置中的任意参数都会覆盖`fail2ban-wide` 中相应的默认配置参数。相反,任何缺少的参数都会使用定义在[DEFAULT] 字段的默认值。 -预定义日志过滤器都必须在/etc/fail2ban/filter.d,可以采取的操作在/etc/fail2ban/action.d。 +预定义的日志过滤器都放在/etc/fail2ban/filter.d,而可以采取的禁止操作放在 /etc/fail2ban/action.d。 ![](https://farm8.staticflickr.com/7538/16076581722_cbca3c1307_b.jpg) @@ -40,7 +40,7 @@ SSH监狱的配置定义了这些参数: ### 启用预定义的apache监狱 ### -`fail2ban`的默认安装为Apache服务提供了一些预定义监狱以及过滤器。我要启用这些内建的Apache监狱。由于Debian和红买配置的稍微不同,我会分别它们的配置文件。 +`fail2ban`的默认安装为Apache服务提供了一些预定义监狱和过滤器。我要启用这些内建的Apache监狱。由于Debian和RedHat配置的稍微不同,我会分别提供它们的配置文件。 #### 在Debian 或者 Ubuntu启用Apache监狱 #### @@ -50,7 +50,7 @@ SSH监狱的配置定义了这些参数: ---------- - # detect password authentication failures + # 检测密码认证失败 [apache] enabled = true port = http,https @@ -58,7 +58,7 @@ SSH监狱的配置定义了这些参数: logpath = /var/log/apache*/*error.log maxretry = 6 - # detect potential search for exploits and php vulnerabilities + # 检测漏洞和 PHP 脆弱性扫描 [apache-noscript] enabled = true port = http,https @@ -66,7 +66,7 @@ SSH监狱的配置定义了这些参数: logpath = /var/log/apache*/*error.log maxretry = 6 - # detect Apache overflow attempts + # 检测 Apache 溢出攻击 [apache-overflows] enabled = true port = http,https @@ -74,7 +74,7 @@ SSH监狱的配置定义了这些参数: logpath = /var/log/apache*/*error.log maxretry = 2 - # detect failures to find a home directory on a server + # 检测在服务器寻找主目录的尝试 [apache-nohome] enabled = true port = http,https @@ -100,7 +100,7 @@ SSH监狱的配置定义了这些参数: ---------- - # detect password authentication failures + # 检测密码认证失败 [apache] enabled = true port = http,https @@ -108,7 +108,7 @@ SSH监狱的配置定义了这些参数: logpath = /var/log/httpd/*error_log maxretry = 6 - # detect spammer robots crawling email addresses + # 检测抓取邮件地址的爬虫 [apache-badbots] enabled = true port = http,https @@ -117,7 +117,7 @@ SSH监狱的配置定义了这些参数: bantime = 172800 maxretry = 1 - # detect potential search for exploits and php vulnerabilities + # 检测漏洞和 PHP 脆弱性扫描 [apache-noscript] enabled = true port = http,https @@ -125,7 +125,7 @@ SSH监狱的配置定义了这些参数: logpath = /var/log/httpd/*error_log maxretry = 6 - # detect Apache overflow attempts + # 检测 Apache 溢出攻击 [apache-overflows] enabled = true port = http,https @@ -133,7 +133,7 @@ SSH监狱的配置定义了这些参数: logpath = /var/log/httpd/*error_log maxretry = 2 - # detect failures to find a home directory on a server + # 检测在服务器寻找主目录的尝试 [apache-nohome] enabled = true port = http,https @@ -141,9 +141,9 @@ SSH监狱的配置定义了这些参数: logpath = /var/log/httpd/*error_log maxretry = 2 - # detect failures to execute non-existing scripts that - # are associated with several popular web services - # e.g. webmail, phpMyAdmin, WordPress + # 检测执行不存在的脚本的企图 + # 这些都是流行的网站服务程序 + # 如:webmail, phpMyAdmin,WordPress port = http,https filter = apache-botsearch logpath = /var/log/httpd/*error_log @@ -175,7 +175,7 @@ SSH监狱的配置定义了这些参数: ![](https://farm8.staticflickr.com/7572/15891521967_5c6cbc5f8f_c.jpg) -你也可以手动禁止或者解禁IP地址 +你也可以手动禁止或者解禁IP地址: 要用制定监狱禁止IP: @@ -187,7 +187,7 @@ SSH监狱的配置定义了这些参数: ### 总结 ### -本篇教程解释了fail2ban监狱如何工作以及如何使用内置的监狱来保护Apache服务器。依赖于你的环境以及要保护的web服务器类型,你或许要适配已存在的监狱或者编写自定义监狱和日志过滤器。查看outfail2ban的[官方Github页面][3]来获取最新的监狱和过滤器示例。 +本篇教程解释了fail2ban监狱如何工作以及如何使用内置的监狱来保护Apache服务器。依赖于你的环境以及要保护的web服务器类型,你或许要调整已有的监狱或者编写自定义监狱和日志过滤器。查看outfail2ban的[官方Github页面][3]来获取最新的监狱和过滤器示例。 你有在生产环境中使用fail2ban么?分享一下你的经验吧。 @@ -197,11 +197,11 @@ via: http://xmodulo.com/configure-fail2ban-apache-http-server.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/how-to-protect-ssh-server-from-brute-force-attacks-using-fail2ban.html -[2]:http://xmodulo.com/how-to-protect-ssh-server-from-brute-force-attacks-using-fail2ban.html +[1]:http://linux.cn/article-5067-1.html +[2]:http://linux.cn/article-5067-1.html [3]:https://github.com/fail2ban/fail2ban \ No newline at end of file From 38c9a62ca4bf99c8c776b75ce963d42ceb047be6 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Mar 2015 00:22:09 +0800 Subject: [PATCH 0297/2517] PUB:20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system @FSSlc --- ...ning up Ubuntu 14.10,14.04,13.10 system.md | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) rename {translated/tech => published}/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md (54%) diff --git a/translated/tech/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md b/published/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md similarity index 54% rename from translated/tech/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md rename to published/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md index a49467781e..ff995682ad 100644 --- a/translated/tech/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md +++ b/published/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md @@ -1,10 +1,10 @@ -清理 Ubuntu 14.10,14.04,13.10 系统 +如何清理你的 Ubuntu 14.10/14.04/13.10 系统 ================================================================================ 前面我们已经讨论了[如何清理 Ubuntu GNU/Linux 系统][1],这篇教程将在原有教程的基础上,增加对新的 Ubuntu 发行版本的支持,并介绍更多的工具。 假如你想清理你的 Ubuntu 主机,你可以按照以下的一些简单步骤来移除所有不需要的垃圾文件。 -### 移除多余软件包 ### +## 移除多余软件包 ## 这又是一个内置功能,但这次我们不必使用新得立包管理软件(Synaptic Package Manager),而是在终端中达到目的。 @@ -14,7 +14,7 @@ sudo apt-get autoclean ``` -这便激活了包清除命令。这个命令所做的工作是: 自动清除那些当你安装或升级程序时系统所缓存的 `.deb` 包(即清除 `/var/cache/apt/archives` 目录,不过只清理过时的包)。如果需要使用 清除命令,只需在终端窗口中键入以下命令: +这便激活了包清除命令。这个命令所做的工作是: 自动清除那些当你安装或升级程序时系统所缓存的 `.deb` 包(即清除 `/var/cache/apt/archives` 目录,不过只清理过时的包)。如果需要使用清除命令,只需在终端窗口中键入以下命令: ``` sudo apt-get clean @@ -26,9 +26,9 @@ sudo apt-get clean sudo apt-get autoremove ``` -### 移除不需要的本地数据 ### +## 移除不需要的本地化数据 ## -为达到此目的,我们需要安装 `localepurge` 软件,它将自动移除一些不需要的本地数据。这个软件是一个简单的脚本,它将从那些 不再需要的本地文件和本地联机手册( man pages ) 所占用的空间中回收磁盘空间。这个软件将在任何 apt 安装命令运行时 被自动激活。 +为达到此目的,我们需要安装 `localepurge` 软件,它将自动移除一些不需要的本地化数据(LCTT 译注:即各种语言翻译)。这个软件是一个简单的脚本,它将从那些不再需要的本地化文件和本地化联机手册( man pages ) 所占用的空间中回收磁盘空间。这个软件将在任何 apt 安装命令运行时 被自动激活。 在 Ubuntu 中安装 `localepurge` @@ -36,7 +36,7 @@ sudo apt-get autoremove sudo apt-get install localepurge ``` -在通过 `apt-get install` 安装任意软件后, localepurge 将移除所有 不是使用你系统中所设定语言的 翻译文件和翻译的联机手册。 +在通过 `apt-get install` 安装任意软件后, localepurge 将移除所有不是使用你系统中所设定语言的翻译文件和翻译的联机手册。 假如你想设置 `localepurge`,你需要编辑 `/ect/locale.nopurge` 文件。 @@ -54,9 +54,9 @@ sudo apt-get install discus > localepurge: Disk space freed in /usr/share/locale: 41860K -### 移除 孤包 ### +## 移除孤包 ## -假如你想移除孤包,你需要安装 `deborphan` 软件: +假如你想移除孤包,你需要安装 `deborphan` 软件: 在 Ubuntu 中安装 `deborphan` : @@ -72,11 +72,11 @@ sudo apt-get install deborphan sudo deborphan | xargs sudo apt-get -y remove --purge ``` -### 使用 GtkOrphan 来移除 孤包 ### +### 使用 GtkOrphan 来移除孤包 ### -`GtkOrphan` (一个针对 debian 系发行版本的 Perl/Gtk2 应用) 是一个分析 用户安装过程状态并查找孤立库文件的图形化工具, 它为 `deborphan` 提供了一个 GUI 前端,并具备移除软件包的功能。 +`GtkOrphan` (一个针对 debian 系发行版本的 Perl/Gtk2 应用) 是一个分析用户安装过程状态并查找孤立库文件的图形化工具,它为 `deborphan` 提供了一个 GUI 前端,并具备移除软件包的功能。 -### 在 Ubuntu 中安装 GtkOrphan ### +#### 在 Ubuntu 中安装 GtkOrphan #### 打开终端并运行如下命令: @@ -90,11 +90,11 @@ sudo apt-get install gtkorphan ### 使用 Wajig 移除孤包 ### -`Wajig`是 Debian 包管理系统中一个简单的软件包管理前端。它将 apt、apt-cache、 dpkg、 /etc/init.d 中的脚本等 通过一个单一命令集成在一起,它的设计初衷是 使用简单 和 为它所包含的函数提供丰富的文档。 +`Wajig`是 Debian 包管理系统中一个简单的软件包管理前端。它将 apt、apt-cache、 dpkg、 /etc/init.d 中的脚本等 通过一个单一命令集成在一起,它的设计初衷是使用简单和为它的所有功能提供丰富的文档。 -通过适当的 `sudo`配置,大多数(如果不是全部)的软件包安装和创建等任务可以通过 一个用户 shell 来完成。`Wajig` 也适用于一般的系统管理。另外,一个 Gnome GUI 命令 `gjig`也被囊括在这个软件包之中。 +通过适当的 `sudo`配置,大多数(如果不是全部)的软件包安装和创建等任务可以通过一个用户 shell 来完成。`Wajig` 也适用于一般的系统管理。另外,一个 Gnome GUI 命令 `gjig`也被囊括在这个软件包之中。 -### 在 Ubuntu 中安装 Wajig ### +#### 在 Ubuntu 中安装 Wajig #### 打开终端并运行如下命令: @@ -102,13 +102,13 @@ sudo apt-get install gtkorphan sudo apt-get install wajig ``` -### Debfoster --- 跟踪你在安装过程中的操作 ### +## Debfoster --- 跟踪你在安装过程中的操作 ## -debfoster 将会维护一个列有 被明确要求安装的软件包的列表,但不包括那些作为某个软件的依赖而被安装的软件包。参数是完全可选的,你甚至可以使得 在 dpkg 和/或 apt-get 每次运行之后的每一秒内 激活 debfoster 。 +debfoster 将会维护一个列有被明确需要安装的软件包的列表,但不包括那些作为某个软件的依赖而被安装的软件包。参数是完全可选的,你甚至可以使得在 dpkg 和/或 apt-get 每次运行之后马上激活 debfoster 。 另外,你还可以在命令行中使用 debfoster 来安装或移除某些特定的软件包。那些后缀为 `---` 的软件包将会被移除,而没有后缀的软件包将会被安装。 -假如一个新的软件包或 debfoster 注意到 作为某个软件包的依赖的软件包 是一个孤包,则 debfoster 将会询问你下一步如何操作。若你决定保留这个孤包, debfoster 将只会进行记录并继续安装过程;若你觉得这个软件包不足以引起你的兴趣,在 debfoster 询问这个问题后,它将移除这个软件包。进一步的,如果你的决定使得其他的软件包变为孤包,更多的提问将会接踵而来。 +假如一个新的软件包或 debfoster 注意到作为某个软件包的依赖的软件包是一个孤包,则 debfoster 将会询问你下一步如何操作。若你决定保留这个孤包, debfoster 将只会进行记录并继续安装过程;若你觉得这个软件包不足以引起你的兴趣,在 debfoster 询问这个问题后,它将移除这个软件包。进一步的,如果你的决定使得其他的软件包变为孤包,更多的提问将会接踵而来。 ### 在 Ubuntu 中安装 debfoster ### @@ -120,13 +120,13 @@ sudo apt-get install debfoster ### 使用 debfoster ### -为了创建一个 初始跟踪文件,可以使用如下命令: +为了创建一个初始跟踪文件,可以使用如下命令: ``` sudo debfoster -q ``` -你总可以编辑 `/var/lib/debfoster/keepers` 文件,来定义那些 你想留在系统中的软件包。 +你总可以编辑 `/var/lib/debfoster/keepers` 文件,来定义那些你想留在系统中的软件包。 为了编辑这个文件,可以键入: @@ -134,7 +134,7 @@ sudo debfoster -q sudo vi /var/lib/debfoster/keepers ``` -强制使 debfoster 去移除 所有没有被列在上面这个文件的软件包 或 安装作为某些列在这个文件中的软件包的依赖, 它也会添加所有在这个列表中没有被安装的软件包。若要根据这个列表来执行相关操作,只需执行 +要强制使 debfoster 去移除所有没有被列在上面这个文件的软件包,或安装作为某些列在这个文件中的软件包的依赖,它也同时会添加所有在这个列表中没有被安装的软件包。若要根据这个列表来执行相关操作,只需执行: ``` sudo debfoster -f @@ -146,9 +146,9 @@ sudo debfoster -f sudo debfoster ``` -### xdiskusage -- 查看你的硬盘空间都去哪儿了 ### +## xdiskusage -- 查看你的硬盘空间都去哪儿了 ## -图形化地展示磁盘使用情况的 du.xdiskusage 是一个用户友好型程序,它将为你展示你所有磁盘的使用情况。 它是在 Phillip C. Dykstra 所写的 “xdu” 程序的基础上设计的。一些改变使得它可以为你运行 “du”命令,并显示磁盘的剩余空间,并且假如你想清晰地了解你的磁盘空间都去哪儿了,它还可以生成一个 PostScript 格式的名为 display.xdiskusage 的文件。 +图形化地展示磁盘使用情况的 du。xdiskusage 是一个用户友好型的程序,它将为你展示你所有磁盘的使用情况。 它是在 Phillip C. Dykstra 所写的 “xdu” 程序的基础上设计的。做了一些修改以使得它可以为你运行 “du”命令,并显示磁盘的剩余空间,并且假如你想清晰地了解你的磁盘空间都去哪儿了,它还可以生成一个 PostScript 格式的名为 display.xdiskusage 的文件。 ### 在 Ubuntu 中安装 xdiskusage ### @@ -169,9 +169,9 @@ sudo xdiskusage ![](http://www.ubuntugeek.com/wp-content/uploads/2015/01/5.png) -### Bleachbit ### +## Bleachbit ## -BleachBit 能快速地释放磁盘空间并不知疲倦地保护你的隐私。它可以 释放缓存,删除 cookie,清除 Internet 上网历史,粉碎临时文件,删除日志,丢弃你所不知道存在何处的垃圾。为 Linux 和 Windows 系统设计,它支持擦除清理数以千计的应用程序,如 Firefox, Internet Explorer, Adobe Flash, Google Chrome, Opera, Safari 等等。除了简单地删除文件,BleachBit 还包括许多高级功能,诸如 粉碎文件以防止恢复,擦除磁盘空间 来隐藏被其他应用程序所删除文件的痕迹,为火狐“除尘”,使其速度更快等。比免费更好,BleachBit 是一个开源软件。 +BleachBit 能快速地释放磁盘空间并不知疲倦地保护你的隐私。它可以释放缓存,删除 cookie,清除 Internet 上网历史,粉碎临时文件,删除日志,丢弃你所不知道存在何处的垃圾。为 Linux 和 Windows 系统而设计,它支持擦除清理数以千计的应用程序,如 Firefox, Internet Explorer, Adobe Flash, Google Chrome, Opera, Safari 等等。除了简单地删除文件,BleachBit 还包括许多高级功能,诸如粉碎文件以防止恢复,擦除磁盘空间来隐藏被其他应用程序所删除文件的痕迹,为火狐“除尘”,使其速度更快等。比免费更好,BleachBit 是一个开源软件。 ### 在 Ubuntu 中安装 Bleachbit ### @@ -195,10 +195,10 @@ via: http://www.ubuntugeek.com/cleaning-up-a-ubuntu-gnulinux-system-updated-with 作者:[ruchi][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.ubuntugeek.com/author/ubuntufix [1]:http://www.ubuntugeek.com/cleaning-up-all-unnecessary-junk-files-in-ubuntu.html -[2]:http://www.ubuntugeek.com/www.ubuntugeek.com/install-ubuntu-tweak-on-ubuntu-14-10.html +[2]:http://linux.cn/article-3335-1.html From 3d6d6d5cee8966a638602d202fc8e4b36243e64e Mon Sep 17 00:00:00 2001 From: disylee Date: Tue, 17 Mar 2015 11:27:30 +0800 Subject: [PATCH 0298/2517] Update 20150215 How to analyze and view Apache web server logs interactively on Linux.md by disylee --- ...e and view Apache web server logs interactively on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md index f2f7a9a270..fdcc127252 100644 --- a/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md +++ b/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md @@ -1,3 +1,4 @@ +disylee 来一篇~ How to analyze and view Apache web server logs interactively on Linux ================================================================================ Whether you are in the web hosting business, or run a few web sites on a VPS yourself, chances are you want to display visitor statistics such as top visitors, requested files (dynamic or static), used bandwidth, client browsers, and referring sites, and so forth. @@ -140,4 +141,4 @@ via: http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html [3]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html [4]:http://goaccess.io/download#dependencies [5]:http://goaccess.io/download -[6]:http://httpd.apache.org/docs/2.4/logs.html \ No newline at end of file +[6]:http://httpd.apache.org/docs/2.4/logs.html From bc084acc4aa8c9fed4d9474b65b91cfe1aad5a6f Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 17 Mar 2015 17:06:55 +0800 Subject: [PATCH 0299/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ased Install It In Ubuntu And Linux Mint.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/translated/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md b/translated/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md index 6c0ee2740c..bf0a698a16 100644 --- a/translated/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md +++ b/translated/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md @@ -3,26 +3,26 @@ Pinta 1.6发布了!在 Ubuntu 和 Linux Mint 上安装Pinta ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Pinta_Ubuntu_Linux.jpeg) -[Pinta][1] 是一款免费开源的绘图应用软件,它在Linux用户中很受欢迎。你也可以把它看作是**开源的微软画图软件的替代品**。Pinta 可以在很多平台上使用,如 Linux,Windows 以及 Mac OS X。 +[Pinta][1] 是一款免费的开源绘图应用软件,它在Linux用户中很受欢迎。你也可以把它看作是**微软画图软件的开源替代品**。Pinta 可以在很多平台上使用,如 Linux、Windows 以及 Mac OS X。 -Gimp 作为全功能图像编辑软件而流行,相比Pinta则单纯是一种绘图工具。我常用它在我的截图上画箭头和曲线,而且我可以说这是我在 Linux 上最喜欢的绘图应用软件。 +Gimp 作为一款功能齐全的图像编辑软件而流行,相比Pinta则单纯是一种绘图工具。我常用它在我的截图上画箭头和曲线,而且我可以说这是我在 Linux 上最喜欢的绘图应用软件。 ### Pinta 1.6 的新功能### -经一年之后,Pinta发布了1.6版本,修复了50个漏洞并且加入了一些新功能。加入的新功能如下: +经过一年多的时间,Pinta发布了1.6版本,修复了50多个漏洞并且增加了一些新功能。增加的新功能如下: - 线条工具现在支持绘制曲线和箭头 -- 绘制好的图形可以被编辑 +- 绘制好的图形可以编辑形状 - 所有的图形工具现在支持绘制虚线 -- 所有的选择工具现在支持并集,排除,异或和交集模式 +- 所有的选择工具现在支持并集、排除,异或和交集模式 - 插件可通过插件管理器安装 - 命令行中加入新选项 -新版本同时也修复了一个很烦人的漏洞——右键文件,[在打开方式中使用Pinta不能打开文件][2]。你可以在[发布说明][3]阅读所有的改变。 +新版本同时也修复了一个很烦人的漏洞——右键菜单选项,[在打开方式中使用Pinta不能打开文件][2]。你可以在[发布说明][3]阅读所有的改变。 ### 在 Ubuntu 和 Linux Mint 中安装 Pinta 1.6### -Pinta 1.5 可以在 Ubuntu 14.04,14.10,Linux Mint 17 和 elementary OS 中使用。如果你想安装最新的1.6版本,你可以使用 Pinta 团队的官方PPA源。如果你已经安装了 Pinta 1.5 也不必担心。再安装一次将会使版本升级。 +Pinta 1.5 可以在 Ubuntu 14.04,14.10,Linux Mint 17 和 elementary OS 中使用。如果你想安装最新的 1.6 版本,你可以使用 Pinta 团队的官方PPA源。如果你已经安装了 Pinta 1.5 也不必担心。再安装一次将会使版本升级。 打开终端并使用以下命令: @@ -38,7 +38,7 @@ via: http://itsfoss.com/pinta-1-6-ubuntu-linux-mint/ 作者:[Abhishek][a] 译者:[linuhap](https://github.com/linuhap) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -47,4 +47,4 @@ via: http://itsfoss.com/pinta-1-6-ubuntu-linux-mint/ [2]:http://itsfoss.com/add-application-list-open-applications-ubuntu-1310/ [3]:http://pinta-project.com/releases/1-6 [4]:http://pinta-project.com/releases -[5]:http://itsfoss.com/image-applications-ubuntu-linux/ \ No newline at end of file +[5]:http://itsfoss.com/image-applications-ubuntu-linux/ From 8874d21c4bce420191b1bb88eed3b9f188ce07fc Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 17 Mar 2015 18:01:10 +0800 Subject: [PATCH 0300/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md (100%) diff --git a/translated/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md b/published/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md similarity index 100% rename from translated/share/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md rename to published/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md From 8f21e2b84a86d494c138ab992bfd20d05fd355ca Mon Sep 17 00:00:00 2001 From: VicYu Date: Tue, 17 Mar 2015 21:12:28 +0800 Subject: [PATCH 0301/2517] Update 20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md --- ...o convert between local time and UNIX timestamp in Perl.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md b/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md index ecd44c9c75..ab8efa8f19 100644 --- a/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md +++ b/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md @@ -1,3 +1,5 @@ + Vic020 + Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl ================================================================================ > **Question**: I need to convert readable date and time to a corresponding UNIX timestamp (i.e., Epoch time), or vice versa in a Perl program. Can you show me Perl code examples of converting date/time to UNIX timestamp, or conversely, converting UNIX timestamp to human-readable date and time? @@ -58,4 +60,4 @@ via: http://ask.xmodulo.com/convert-local-time-unix-timestamp-perl.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 7b900618e1c4f1aa77804760de44cedd04f42133 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 17 Mar 2015 21:14:12 +0800 Subject: [PATCH 0302/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- translated/talk/20150127 Windows 10 versus Linux.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/translated/talk/20150127 Windows 10 versus Linux.md b/translated/talk/20150127 Windows 10 versus Linux.md index c54e8ff1ee..f0c78dfb4d 100644 --- a/translated/talk/20150127 Windows 10 versus Linux.md +++ b/translated/talk/20150127 Windows 10 versus Linux.md @@ -2,15 +2,15 @@ Windows 10 VS Linux ================================================================================ ![](https://farm4.staticflickr.com/3852/14863156322_e4edbae70e_t.jpg) -如今Windows 10好像占据了绝大部分头条,甚至在一些Linux圈里也是一样。最突出的是betanews.com的Brian Fagioli说Windows 10已经为Linux桌面系统敲响了丧钟,Microsoft如今宣布将为忠实的Windows用户免费提供windows 10,Steven J. Vaughan-Nichols说这是一个最新的开源公司,然后Matt Hartley比较了Windows 10和Ubuntu,Jesse Smith发表了从Linux用户角度对Windows 10的评估。 +前阵子 Windows 10 好像占据了绝大部分头条,甚至在一些Linux圈里也是一样。最具代表性的是 betanews.com 的 Brian Fagioli 说 Windows 10 已经为 Linux 桌面系统敲响了丧钟,Microsoft 如今宣布将为忠实的 Windows 用户免费提供 Windows 10,Steven J. Vaughan-Nichols 说这是一个最新的开源公司,然后 Matt Hartley 比较了 Windows 10 和 Ubuntu,Jesse Smith 从 Linux 用户的视角对 Windows 10 做出评估。 -**Windows 10**,在Microsoft[声明][1]说将免费提供给Windows 7及以上用户时,成为如今闲聊的热门话题。在Linuxland这里,也没有被忽视。betanews.com的Brian Fagioli,一个自封的Linux粉丝,如今这样说,“Windows 10把门彻底关上了。Linux桌面元年将永远不会到来。安息吧。”[Fagioli解释][2]说Microsoft倾听了用户的抱怨而且并不只是记录一下,而是解决的更好。他说Linux错失了由Windows 8不受欢迎以及巨大失败带来的积累机会。然后他总结,拜Windows 10所赐,处于边缘地带的我们只能接受一个“破碎的梦”。 +**Windows 10**,在 Microsoft [声明][1]说将免费提供给 Windows 7 及以上用户,这件事成为如今大家闲聊的热门话题。在 Linuxland 这里,也没有被忽视。betanews.com 的 Brian Fagioli,一个自封的 Linux 粉丝,如今这样说,“ Windows 10 把门彻底关上了。Linux 桌面元年将永远不会到来,歇歇吧。”[Fagioli解释][2]说 Microsoft 倾听了用户的抱怨而且并不只是记录一下,还更好地解决了这些问题。他说 Linux 错失了由 Windows 8 不受欢迎以及巨大失败带来的机会。然后他总结,拜 Windows 10 所赐,处于边缘地带的我们只能接受一个“破碎的梦”。 -**不**过,来自闻名的Distrowatch.com的Jesse Smith,说Microsoft并没有提供一个很明显的下载方式,不过确实可行而且他也升级了。安装程序非常简单,除了分区功能很有限甚至有点吓人。在最终启动进入Windows 10后,Smith说界面布局很“松散”,没有Win7里被很多人讨厌的大量分散注意的元素,开始菜单又回来了,取消了欢迎屏幕。据Smith所说,还有一个和Ubuntu以及Android很类似的新的包管理程序,不过需要Microsoft在线账户才可以使用。[Smith的总结][3]里有这样一条,“感觉Windows 10像是Android的早期beta版本,一个设计成时刻保持在线的消费者操作系统。而不像是一个我能用来完成工作的操作系统。” +不过,来自闻名的 Distrowatch.com 的 Jesse Smith 说 Microsoft 并没有提供一个很明显的下载方式,不过确实可行而且它也升级了。安装程序非常简单,除了分区功能很有限甚至有点吓人。在最终启动进入 Windows 10 后,Smith说界面布局很“松散”,没有 Win7 里被很多人讨厌的大量分散注意的元素,开始菜单又回来了,取消了欢迎屏幕。据Smith所说,还有一个很类似 Ubuntu 和 Android 的新的包管理程序,不过需要 Microsoft 在线账户才可以使用。[Smith的总结][3]里有这样一条,“感觉 Windows 10 像是 Android 的早期 beta 版本,一个设计成时刻保持在线的消费者操作系统。而不像是一个我能用来完成工作的操作系统。” -**S**mith的[完整文章][4]里比较了Windows 10和Linux的大量细节,不过Matt Hartley发表了一个实在的Windows 10 vs Linux的报告。[他说][5]两者的安装程序都很直观和简单,Windows的双启动仍然没那么容易,Windows默认提供了加密而Ubuntu只提供了配置选项。在桌面上Hartley说Windows 10“纠结地丢弃了它Windows 8的根。”他觉得Windows 10的Windows商店比Ubuntu的漂亮很多,但是实在不喜欢通过“一切都是卡片”的方式来查看新安装的应用。Hartley这样总结,“首先是它将为大量Windows用户提供免费升级。这意味着大大降低了进入和升级门槛。第二,这次看起来Microsoft真的在全力以赴地倾听他们用户的需求了。” +**S**mith的[完整文章][4]里比较了 Windows 10 和 Linux 的大量细节,不过 Matt Hartley 发表了一份实在的 Windows 10 vs Linux 的报告。[他说][5]两者的安装程序都很直观和简单,Windows 的双启动仍然没那么容易,Windows 默认提供了加密而 Ubuntu 只提供了配置选项。在桌面方面 Hartley 说 Windows 10 “纠结地丢弃了它 Windows 8 的根。”他觉得 Windows 10 的 Windows 商店比 Ubuntu 的漂亮很多,但是实在不喜欢通过“一切都是卡片”的方式来查看新安装的应用。Hartley这样总结,“首先是它将为大量 Windows 用户提供免费升级。这意味着大大降低了进入和升级门槛。第二,看起来 Microsoft 这次真的在全力以赴地倾听他们的用户需求了。” -**S**teven J. Vaughan-Nichols如今声称Microsoft是最新的开源公司;不仅因为它将放出Windows 10的免费升级,而且Microsoft正在从一个软件公司转型为一个软件服务公司。然后,据Vaughan-Nichols所说,Microsoft需要开源来完成这次转型。从Novell/SUSE开始,他们已经在这一块工作好多年了。不仅如此,他们也发布过开源软件(不管什么目的)。[Vaughan-Nichols总结][6],“很多人都没注意到,但是Microsoft -- 就是那个Microsoft -- 已经成为一家开源公司。” +**S**teven J. Vaughan-Nichols 如今声称 Microsoft 是最新的开源公司;不仅因为它将发布 Windows 10 的免费升级,而且 Microsoft 正在从一个软件公司转型为一个软件服务公司。然后,据 Vaughan-Nichols 所说,Microsoft 需要开源来完成这次转型。从Novell/SUSE开始,他们已经致力于这一块儿好多年了。不仅如此,他们也发布过开源软件(不管什么目的)。[Vaughan-Nichols总结][6],“很多人不这么认为,但是Microsoft——就是Microsoft——已经成为一家开源公司。” -------------------------------------------------------------------------------- @@ -18,7 +18,7 @@ via: http://ostatic.com/blog/windows-10-versus-linux 作者:[Susan Linton][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 81cadb54f016dcb925ecd40f8179e510e484b9cc Mon Sep 17 00:00:00 2001 From: lihaiming Date: Tue, 17 Mar 2015 23:07:13 +0800 Subject: [PATCH 0303/2517] =?UTF-8?q?=E5=88=9D=E6=AD=A5=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...g kernel code get hired really quickly'.md | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md b/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md index 2e71467581..5b99e27165 100644 --- a/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md +++ b/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md @@ -2,30 +2,49 @@ translating by haimingfg Torvalds: 'People who start writing kernel code get hired really quickly' ================================================================================ +Torvalds: 参加linux内核贡献更加容易找工作 +======================================== + Now more than ever, the development of the Linux kernel is a matter for the professionals, as unpaid volunteer contributions to the project reached their lowest recorded levels in the latest "Who Writes Linux" report, which was released today. +相比起以往,linux内核的发展变是一个专业性的问题,作为一个无偿贡献者去贡献的项目今天在"谁写linux"被低调报道出来了。 + According to the report, which is compiled by the Linux Foundation, just 11.8 percent of kernel development last year was done by unpaid volunteers -- a 19 percent downturn from the 2012 figure of 14.6 percent. The foundation says that the downward trend in volunteer contributions has been present for years. +这个报道由linux基金会编写,基金会说自愿者有逐年下降的趋势,上年有11.8%的内核开发是由无偿自愿者完成,从2012年起由14.6%下滑了19%。 + ![](http://images.techhive.com/images/article/2015/02/screen-shot-2015-02-17-at-5.25.43-pm-100568680-medium.idge.png) Even so, unpaid contributors were still the single biggest source of commits in the latest Who Writes Linux, at 11,968 total changes -- good for 12.4 percent of the whole. However, corporate contributors collectively account for much, much more. The Linux Foundation said that more than 80 percent of all work on the kernel is done by paid professional developers. +即使是这样,在最新的谁写linux里面报道,无偿贡献者还是主要的共享来源,共有11,968改变,整体来说有12.4%是好的,企业贡献者共同占比越来越多,有超过80%的内核贡献是有有尝的专业开发者来完成,linux基金会说。 According to Linus Torvalds, the shift towards paid developers hasn't changed much about kernel development on its own. +根据 linus Torvalds 说,这个有偿开发者趋势不会改变太多这个内核发展的本身。 + "I think one reason it hasn't changed things all that much is that it's not so much 'unpaid volunteers are going away' as 'people who start writing kernel code get hired really quickly,'" he told Network World. +他向全世界人说,我认为不会改变太多的一个原因是不会有更多的无偿自愿者因为编写内核就会更加快找到工作而离开。 + Torvalds said that, while Linux development has changed for plenty of other reasons -- and that, naturally, new contributors pop up all the time -- many of the original developers, with decades of experience, have simply been snapped up by companies with an interest in Linux. +Torvalds +讲到,linux发展改变有很多其他原因,很自然的,新的贡献者会经常冒出来,有很多都是原来的开发者,有着10年的经验,被很多对linux感兴趣的公司抢着去做。 + "We may have started as volunteers, but we're happily employed doing Linux these days," he said. +他说:“开始我们是自愿者,但我们这几天很开心被请去开发linux” + Torvalds' own role in development has become increasingly hands-off, according to the report -- he has personally signed off on 329 patches since version 3.10 of kernel was released, or 0.4 percent. Increasingly, subsystem maintainers do their own reviews and merges of code. +Torvalds 开始抽离了他的开发角色,根据报道在3.10的内核版本里面他个人发布329补丁,占04% 逐渐地,子系统维护人员自己会检查与合并他们的代码。 + -------------------------------------------------------------------------------- via: http://www.infoworld.com/article/2885339/application-development/torvalds-people-who-start-writing-kernel-code-get-hired-really-quickly.html 作者:[Jon Gold][a] -译者:[译者ID](https://github.com/译者ID) +译者:[haimingfg](https://github.com/haimingfg) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1e962837560cd4810932a6d26f7310f81a229028 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Mar 2015 23:28:14 +0800 Subject: [PATCH 0304/2517] PUB:20150114 What is a good IDE for C or C++ on Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ZTinoZ 翻译的棒极了,我基本上没修改。 --- ...hat is a good IDE for C or C++ on Linux.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/share => published}/20150114 What is a good IDE for C or C++ on Linux.md (61%) diff --git a/translated/share/20150114 What is a good IDE for C or C++ on Linux.md b/published/20150114 What is a good IDE for C or C++ on Linux.md similarity index 61% rename from translated/share/20150114 What is a good IDE for C or C++ on Linux.md rename to published/20150114 What is a good IDE for C or C++ on Linux.md index 32d7371d18..e0e960744a 100644 --- a/translated/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/published/20150114 What is a good IDE for C or C++ on Linux.md @@ -1,24 +1,24 @@ -Linux上有哪些比较好的C/C++ IDE? +Linux 上的最佳 C/C++ IDE ================================================================================ -"一个真正的程序员是不用IDE(译者注:集成开发环境)的,他们都是用带着某某插件的文本编辑器来写代码。"我们总能在某些地方听到此类观点。然而,尽管越来越多的人同意这样的观点,但是一个IDE仍然非常有用,它设置简单,使用起来也很方便,因此没有更好办法能像这样来编写一个项目了。所以鉴于这点,在这里我想给大家列一份在linux平台上比较好的C/C++ IDE清单。为什么特地说C/C++呢?因为C语言是我最喜欢的编程语言而且我们总要找个切入点来开始。另外要注意的是,通常有很多种编写C代码的方法,所以为了消减清单的篇幅,我只选择了"真正好用的IDE",而不是诸如Gedit或Vim这种注入[插件][1]的文本编辑器。并不是说这些编辑器在任何情况下都不好,只是如果我将文本编辑器包含进去那这份清单就将永无止境了。 +"一个真正的程序员是不用IDE(译者注:集成开发环境)的,他们都是用带着某某插件的文本编辑器来写代码。"我们总能在某些地方听到此类观点。然而,尽管越来越多的人同意这样的观点,但是一个IDE仍然非常有用,它设置简单,使用起来也很方便,因此不能比这样更合适编写一个项目了。所以鉴于这点,在这里我想给大家列一份在Linux平台上比较好的C/C++ IDE清单。为什么特地说C/C++呢?因为C语言是我最喜欢的编程语言,而且我们总要找个切入点来开始。另外要注意的是,通常有很多种编写C代码的方法,所以为了消减清单的篇幅,我只选择了"真正好用的IDE",而不是诸如Gedit或Vim这种注入[插件][1]的文本编辑器。并不是说这些编辑器不好,只是如果我将文本编辑器包含进去那这份清单就将永无止境了。 ### 1. Code::Blocks ### ![](https://farm8.staticflickr.com/7520/16089880989_10173db27b_c.jpg) -用我个人的最爱来开篇,[Code::Blocks][2]是一款简单快速的专有C/C++ IDE。就像任何一款强大的IDE一样, 它集成了语法高亮、书签功能、自动补全功能、项目管理和一个调试器。它闪耀的地方在于它简单的插件系统,里面添加了不可缺少的工具,像Valgrind和CppCheck,还有不太重要的比如像俄罗斯方块这样的小游戏。但是我特别喜欢它的理由是它连贯方便的快捷键设定和大量的却感受不到受压迫的选项设置。 +用我个人的最爱来开篇,[Code::Blocks][2]是一款简单快速的专有C/C++ IDE。就像任何一款强大的IDE一样, 它集成了语法高亮、书签功能、自动补全功能、项目管理和一个调试器。它最闪亮的地方在于它简单的插件系统,里面添加了不可缺少的工具,像Valgrind和CppCheck,还有不太重要的比如像俄罗斯方块这样的小游戏。但是我特别喜欢它的理由是它连贯方便的快捷键设定和大量的却感受不到拥挤的选项设置。 ### 2. Eclipse ### ![](https://farm8.staticflickr.com/7522/16276001255_66235a0a69_c.jpg) -我知道我只说"真正好用的IDE"而不是带着插件的文本编辑器,但是,[Eclipse][3]的确是一款"真正好用的IDE",只是Eclipse需要一些[plugin][4](或经过一些改装)来编写C程序,所以严格来说我无法反驳我自己。而且,做一份IDE清单不提到Eclipse这个“巨人”是不可能的事情。无论喜欢它与否,Eclipse仍然是一款强大的Java编程工具。这里要感谢[CDT 项目][5],让Eclipse编写C程序变得可能。你同样可以体验到Eclipse的强大功能包括它的一些传统功能特点比如自动补全、代码大纲、代码生成器和先进的重构功能。照我话说,它的不足之处在于它不如Code::Blocks那么轻量级,它仍然很臃肿,要花费很多时间去载入。但是如果你的电脑可以驾驭它,或者你是个忠实的Eclipse粉,那么它一定是你的不二选择。 +我知道我只说"真正好用的IDE"而不是带着插件的文本编辑器,但是,[Eclipse][3]的确是一款"真正好用的IDE",只是Eclipse需要一些[插件][4](或经过一些改装)来编写C程序,所以严格来说我无法反驳我自己。而且,做一份IDE清单不提到Eclipse这个“巨人”是不可能的事情。无论喜欢它与否,Eclipse仍然是一款强大的Java编程工具。这里要感谢[CDT 项目][5],让Eclipse编写C程序变得可能。你同样可以体验到Eclipse的强大功能,包括它的一些传统功能特点比如自动补全、代码大纲、代码生成器和先进的重构功能。照我话说,它的不足之处在于它不如Code::Blocks那么轻量级,它仍然很臃肿,要花费很多时间去载入。但是如果你的电脑可以驾驭它,或者你是个忠实的Eclipse粉,那么它一定是你的不二选择。 ### 3. Geany ### ![](https://farm9.staticflickr.com/8573/16088461968_c6a6c9e49a_c.jpg) -牺牲了很多特色功能但是增加了很多灵活性,[Geany][6]就是这样一款与Eclipse对立的软件。但是对于它所缺乏的地方(比如说没有调试器), Geany用一些漂亮小巧的特色功能弥补了它们:一个可以做笔记的区域、基于模板创作、代码大纲、自定义快捷键和插件管理。相比于现在的IDE,Geany仍然是一款作用广泛的文本编辑器,然而,因为它的功能亮点和它的界面设计,所以我把它放在这份列表里。 +牺牲了很多特色功能但是增加了很多灵活性,[Geany][6]就是这样一款与Eclipse对立的软件。但是对于它所缺乏的地方(比如说没有调试器), Geany用一些漂亮小巧的特色功能弥补了它们:一个可以做笔记的区域、基于模板创作、代码大纲、自定义快捷键和插件管理。相比于现在的IDE,Geany仍然是一款作用广泛的文本编辑器,然而,因为它的功能亮点和它的界面设计,所以我把它放在这份列表里。 ### 4. MonoDevelop ### @@ -30,19 +30,19 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm8.staticflickr.com/7514/16088462018_7ee6e5b433_c.jpg) -它身上有着强烈的“GNOME感”,[Anjuta][8]的外观很具争议。我倾向于把它看作是带着调试器的Geany升级版,但是它的界面实际上要复杂得多。我确实很享受能在项目、文件夹和代码大纲视图之间来回切换的标签系统,我本想用诸如更多的快捷方法来移动文件,然而,这是一个很好的提供了显著编译功能和构建选项的工具,它能够支持哪些很有特点的需求。 +它身上有着强烈的“GNOME即视感”,[Anjuta][8]的外观很具争议。我倾向于把它看作是带着调试器的Geany升级版,但是它的界面实际上要复杂得多。我确实很享受能在项目、文件夹和代码大纲视图之间来回切换的标签系统,我本想用诸如更多的快捷方法来移动文件,然而,这是一个很好的提供了显著编译功能和构建选项的工具,它能够支持哪些很有特点的需求。 ### 6. Komodo Edit ### ![](https://farm8.staticflickr.com/7502/16088462028_81d1114c84_c.jpg) -我不是非常熟悉[Komodo Edit][9],但是在试用了一段时间之后,我被它很多很多的优点给惊喜到了。首先,基于标签的导航功能很有很强的可预见性。其次它奇特的代码大纲让我想到了Sublime Text。此外,它的宏系统和文件比较器使得Komodo Edit非常实用。它的插件库让它几乎是完美的,说“几乎”是因为在其它IDE里我的确找不到能与之相媲美的快捷方法了。而且我们能享受到更多特别的C/C++工具,这往往是普通IDE的不足之处。然而,Komodo Edit就能做到。 +我不是非常熟悉[Komodo Edit][9],但是在试用了一段时间之后,我被它很多很多的优点给惊喜到了。首先,基于标签的导航功能有很强的可预见性。其次它奇特的代码大纲让我想到了Sublime Text。此外,它的宏系统和文件比较器使得Komodo Edit非常实用。它的插件库让它几乎是完美的,说“几乎”是因为在其它IDE里我的确找不到能与之相媲美的快捷方法了。而且我们能享受到更多特别的C/C++工具,这往往是普通IDE的不足之处。然而,Komodo Edit就能做到。 ### 7. NetBeans ### ![](https://farm8.staticflickr.com/7569/16089881229_98beb0fce3_c.jpg) -就好像Eclipse一样,这又是一款不得不提的“巨人级”软件。拥有的功能包括通过标签进行导航、项目管理、代码大纲、更改历史追踪和大量工具,[NetBeans][10]可能是最完整的IDE了,我能用半页来列出它所有让人震惊的特色功能。但是这同时也很容易地向你透露了它的主要缺点,它太臃肿了。比起它的强大,我更喜欢基于插件的软件因为我觉得不太会有人为了一个同样的项目同时需要Git和Mercurial相结合来工作,我是不是很疯狂。但是如果你有耐心去掌握它所有的选项,那你差不多无论到哪里都是IDE大师了。 +就好像Eclipse一样,这又是一款不得不提的“巨人级”软件。拥有的功能包括通过标签进行导航、项目管理、代码大纲、更改历史追踪和大量工具,[NetBeans][10]可能是最完整的IDE了,我能用半页来列出它所有让人震惊的特色功能。但是这同时也很容易地向你透露了它的主要缺点,它太臃肿了。比起它的强大,我更喜欢基于插件的软件,因为我觉得不太会有人为了一个同样的项目同时需要Git和Mercurial相结合来工作,我是不是很疯狂?但是如果你有耐心去掌握它所有的选项,那你差不多无论到哪里都是IDE大师了。 ### 8. KDevelop ### @@ -56,7 +56,7 @@ Linux上有哪些比较好的C/C++ IDE? 留在最后的不代表是最差的,[CodeLite][12]展现给你一种传统的编程规则却仍然能让你从它身上那特有的感觉上有所收获,即使它的界面一开始的确让我想到了Code::Blocks和Anjuta,只是不包括大量的插件库。无论你想要比较文件、插入一条版权块、定义缩略语或者用Git来工作,总有一款插件适合你。如果我不得不挑点毛病,我想说它缺乏一些符合我口味的导航快捷键,但这是真的。 -最后,我希望这份清单能让你给自己最喜欢的语言探索到更多新的IDE。虽然Code::Blocks仍然是我的最爱,不过它有一些很强大的对手。当然我们也可以远离Linux上的IDE用文本编辑器去编写C/C++代码。所以如果你有什么其它的建议想法,在评论中让我们获悉。或者如果你想要我再说说关于一些其它语言的IDE,也可以评论里提出。 +最后,我希望这份清单能让你给自己最喜欢的语言探索到更多新的IDE。虽然Code::Blocks仍然是我的最爱,不过它有一些很强大的对手。当然我们也可以远离Linux上的IDE,而用文本编辑器去编写C/C++代码。所以如果你有什么其它的建议想法,在评论中让我们获悉。或者如果你想要我再说说关于一些其它语言的IDE,也可以评论里提出。 -------------------------------------------------------------------------------- @@ -64,7 +64,7 @@ via: http://xmodulo.com/good-ide-for-c-cpp-linux.html 作者:[Adrien Brochard][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d53acb2b7307f9de1446da3b28ce8abf51b42ffc Mon Sep 17 00:00:00 2001 From: theo-l Date: Tue, 17 Mar 2015 19:36:04 -0300 Subject: [PATCH 0305/2517] translating --- ...th Used by Applications in a Linux System with Trickle.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md index ef1fee0680..59b22ac16f 100644 --- a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md +++ b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md @@ -1,15 +1,20 @@ theo-l translating How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle +如何在linux上使用Trickle来显示应用程序的网络宽带使用. ================================================================================ Have you ever encountered situations where one application dominated you all network bandwidth? If you have ever been in a situation where one application ate all your traffic, then you will value the role of the trickle bandwidth shaper application. Either you are a system admin or just a Linux user, you need to learn how to control the upload and download speeds for applications to make sure that your network bandwidth is not burned by a single application. +有没有遇到过系统中的某个应用程序独占了你所有的网络宽带的情形?如果你有过这样的遭遇,那么你就会感受到Trickle宽带调整应用角色的价值.不管你是一个系统管理员还是仅仅Linux用户,都需要学习如何控制应用程序的上下行速度,来确保你的网络宽带不会被某个程序 +霸占. ![Install Trickle Bandwidth Limit in Linux](http://www.tecmint.com/wp-content/uploads/2013/11/Bandwidth-limit-trickle.png) Install Trickle Bandwidth Limit in Linux ### What is Trickle? ### +### 什么是 Trickle? ### Trickle is a network bandwidth shaper tool that allows us to manage the upload and download speeds of applications in order to prevent any single one of them to hog all (or most) of the available bandwidth. In few words, trickle lets you control the network traffic rate on a per-application basis, as opposed to per-user control, which is the classic example of bandwidth shaping in a client-server environment, and is probably the setup we are more familiar with. +Trickle是一个网络宽带调整工具,可以让我们管理应用程序的网络上下行速度,使得可以避免其中的某个应用程序吃掉了全部或大部分可用的宽带.换句话说,Trickle可以让你基于单个应用程序来控制网络流量速率,而不是仅仅针对与单个用户--在客户端网络环境中经典的宽带调整样例, ### How Trickle Works? ### From f872ca4b1cb79468a624b13ce5db8389986a0dbe Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 18 Mar 2015 11:29:59 +0800 Subject: [PATCH 0306/2517] =?UTF-8?q?20150318-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0150318 Fedora GNOME Keyboard Shortcuts.md | 211 ++++++++++++++++++ ...irectory with Samba on Fedora or CentOS.md | 144 ++++++++++++ 2 files changed, 355 insertions(+) create mode 100644 sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md create mode 100644 sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md diff --git a/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md b/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md new file mode 100644 index 0000000000..7b70ec9779 --- /dev/null +++ b/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md @@ -0,0 +1,211 @@ +Fedora GNOME Keyboard Shortcuts +================================================================================ +To get the very best out of the [GNOME desktop environment][1], within Fedora, you need to learn and remember the keyboard shortcuts required to navigate the system. + +This article lists the most useful keyboard shortcuts and how they are used. + +![GNOME Keyboard Shortcuts - The Super Key. ](http://f.tqn.com/y/linux/1/L/o/K/1/gnomekeyboardshortcut1.png) +GNOME Keyboard Shortcuts - The Super Key. + +#### 1. The Super Key #### + +[The "super" key][2] is your best friend when navigating modern operating systems. + +On a standard laptop the "super" key sits on the bottom row next to the "alt" key. + +When you press the "super" key the "activities" overview will be displayed and you will be able to see all of the open applications zoomed out. + +Pressing "ALT" and "F1" together will show the same display. + +![GNOME Run Command.](http://f.tqn.com/y/linux/1/L/p/K/1/runcommand.png) +GNOME Run Command. + +### 2. How To Run A Command Quickly ### + +If you need to run a command quickly, you can press "ALT" and "F2" which displays a "Run Command" dialog. + +You can now enter your command into that window and press return. + +![TAB Through Applications.](http://f.tqn.com/y/linux/1/L/q/K/1/tabthroughwindows.png) +TAB Through Applications. + +### 3. Quickly Switch To Other Open Applications ### + +As with Microsoft Windows you can switch applications using the "ALT" and "TAB" keys. + +On some keyboards the tab key looks like this: **|<- ->|** and on others it simply spells the word "TAB". + +The GNOME application switcher simply shows the icons and names of the applications as you tab through them. + +If you hold down the "shift" and "tab" keys, the application switcher rotates around the icons in reverse order. + +![Switch Windows In The Same Application.](http://f.tqn.com/y/linux/1/L/r/K/1/switchwindowsinsameapplication.png) +Switch Windows In The Same Application. + +### 4. Quickly Switch To Another Window In The Same Application ### + +If you are anything like me then you will end up with half a dozen instances of Firefox open. + +You now know that "Alt" and "Tab" switch between applications. + +There are two ways to cycle through all of the open instances of the same application. + +The first is to press "Alt" and "Tab" until the cursor sits over the icon of the application with many windows that you wish to cycle through. After a pause a dropdown will appear and you can select the Window with the mouse. + +The second and preferred option is to press "Alt" and "Tab" until the cursor sits over the icon of the application you want to cycle through and then press the "super" and "`" keys to toggle through the open instances. + +**Note that the "`" key is the one just above the tab key. The key for cycling through the open instances is always the key above the tab key regardless of your keyboard layout, therefore it isn't always guaranteed to be the "`" key.** + +If you have nimble fingers (or as I like to call them ninja fingers) then you can hold the "shift", "`" and "super" key to cycle backwards through the open instances of an application. + +![Switch Keyboard Focus.](http://f.tqn.com/y/linux/1/L/s/K/1/switchkeyboardfocus.png) +Switch Keyboard Focus. + +### 5. Switch Keyboard Focus ### + +This keyboard shortcut isn't essential but a nice to know. + +If you want to switch the keyboard focus to the search bar or to an application window you can press "CTRL", "ALT" and "TAB". to show a list of possible areas to switch to. + +You can then use the arrow keys to cycle through the possible options. + +![Show All Applications.](http://f.tqn.com/y/linux/1/L/t/K/1/showapplications.png) +Show All Applications. + +### 6. Show A List Of All The Applications ### + +If the last one was a nice to have then this one is a real time saver. + +To quickly navigate to a full list of all the applications on your system press the "super" key and "A". + +![Switch Workspaces.](http://f.tqn.com/y/linux/1/L/u/K/1/switchworkspaces.png) +Switch Workspaces. + +### 7. Switch Workspaces ### + +If you have been using Linux for a while you will appreciate the fact that you [can use multiple workspaces][3]. + +For instance in one workspace you might have development environments open, in another web browsers and in a third your email client. + +To toggle between workspaces press the "super" and the "Page Up" (PGUP) keys to toggle in one direction and the "super", "Page Down" (PGDN) keys to toggle in the other direction. + +The alternative but more longwinded away to switch to another workspace is to press the "super" key to show a list of applications and then select the workspace you wish to switch to on the right side of the screen. + +![Move Application To Another Workspace.](http://f.tqn.com/y/linux/1/L/v/K/1/movetoanewworkspace.png) +Move Application To Another Workspace. + +### 8. Move Items To A New Workspace ### + +If the workspace you are using is getting cluttered and you wish to move the current application to a new workspace press the "super", "shift" and "page up" button or "super", "shift" and "page down" key. + +Alternatively press the "super" key to bring up the list of applications and drag the application you wish to move to one of the workspaces on the right of the screen. + +![Show The Message Tray.](http://f.tqn.com/y/linux/1/L/w/K/1/showmessagetray.png) +Show The Message Tray. + +### 9. Show The Message Tray ### + +The message tray provides a list of notifications. + +To bring up the message tray press the "super" and "M" key on the keyboard. + +Alternatively move the mouse to the bottom right corner of the screen. + +![Lock The Screen.](http://f.tqn.com/y/linux/1/L/x/K/1/lockscreen.png) +Lock The Screen. + +### 10. Lock The Screen ### + +Need to a comfort break or a cup of coffee? Don't want sticky paws all over your keyboard? + +Whenever you leave your computer alone get in the habit of pressing "super" and L to lock the screen. + +To unlock the screen drag up from the bottom and enter your password. + +![Control Alt Delete Within Fedora.](http://f.tqn.com/y/linux/1/L/y/K/1/poweroff.png) +Control Alt Delete Within Fedora. + +### 11. Power Off ### + +If you used to be a Windows user then you will remember the three finger salute known as CTRL, ALT and DELETE. + +If you press "CTRL", "ALT" and "DEL" on your keyboard within Fedora a message will appear telling you that your computer will shut down in 60 seconds. + +### 12. Editing Shortcuts ### + +The editing keyboard shortcuts are pretty much universal across every operating system. + +- CTRL + A Select All +- CTRL + X Cut +- CTRL + C Copy +- CTRL + V Paste +- CTRL + Z Undo + +### 13. Screen Capturing ### + +As with the editing shortcuts, the screencapturing keys are fairly standard + +- PRTSC (Print Screen) Take screenshot +- Alt + PRTSC Take screenshot of current window +- Shift + PRTSC Take screenshot of an area of the screen + +Here is one that is fairly unique but great for people making tutorial videos. + +- CTRL + ALT + SHIFT + R Record Screencast +- CTRL + ALT + SHIFT + R again Stop Screencast + +The [screencasts][4] will be stored in the videos folder under your home directory in the [webm][5] format. + +![Put Windows Side By Side.](http://f.tqn.com/y/linux/1/L/z/K/1/splitwindows.png) +Put Windows Side By Side. + +### 14. Put Windows Side By Side ### + +You can put windows side by side so that one uses up the left side of the screen and the other uses the right side of the screen. + +Press the "Super" and "Left Arrow" key on the keyboard to shift the current application to the left. + +Press the "Super" and "Right Arrow" key on the keyboard to shift the current application to the right. + +### 15. Maximise, Minimise And Restore Windows ### + +To maximise a window double click on the title bar. + +To restore a window to its original size double click on the maximised window. + +To minimise a window, right click and select "minimise" from the menu. + +![GNOME Keyboard Shortcut Cheat Sheet. ](http://f.tqn.com/y/linux/1/L/-/L/1/gnomekeyboardshortcuts.png) +GNOME Keyboard Shortcut Cheat Sheet. + +### 16. Summary ### + +To help you learn these keyboard shortcuts I have created a cheat sheet which you can print out and stick to your wall. + +When you have learned these shortcuts you will begin to appreciate how modern desktop environments work. + +- [Click here to view the Fedora Linux GNOME Desktop Environment cheat sheet.][6] +- [Click here for the GNOME WIKI][7] +- [The other GNOME WIKI][8] +- [An alternative GNOME 3 Cheat Sheet][9] + +-------------------------------------------------------------------------------- + +via: http://linux.about.com/od/howtos/tp/Fedora-GNOME-Keyboard-Shortcuts.htm + +作者:[Gary Newell][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linux.about.com/bio/Gary-Newell-132058.htm +[1]:https://www.gnome.org/gnome-3/ +[2]:http://en.wikipedia.org/wiki/Super_key_%28keyboard_button%29 +[3]:http://linux.about.com/library/gnome/blgnome2n4.htm +[4]:http://en.wikipedia.org/wiki/Screencast +[5]:http://en.wikipedia.org/wiki/WebM +[6]:https://s-media-cache-ak0.pinimg.com/originals/d5/f4/a4/d5f4a42c0940fae6653ee9a17294d450.jpg +[7]:http://en.wikipedia.org/wiki/GNOME +[8]:https://wiki.gnome.org/ +[9]:https://wiki.gnome.org/Gnome3CheatSheet \ No newline at end of file diff --git a/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md b/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md new file mode 100644 index 0000000000..0c01862bff --- /dev/null +++ b/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md @@ -0,0 +1,144 @@ +How to share a directory with Samba on Fedora or CentOS +================================================================================ +Nowadays sharing data across different computers is not something new at home or many work places. Riding on this trend, modern operating systems make it easy to share and exchange data transparently across computers via network file systems. If your work environment involves a mix of Microsoft Windows and Linux computers, one way to share files and folders among them is via SMB/CIFS, a cross-platform network file sharing protocol. Windows Microsoft natively supports SMB/CIFS, while Linux offers free software implementation of SMB/CIFS network protocol in Samba. + +In this article, we will demonstrate **how to share a directory using Samba**. The Linux platform we will use is **Fedora or CentOS**. This article is dividied into four parts. First, we will install Samba under Fedora/CentOS environment. Next, we discuss how to adjust SELinux and firewall configurations to allow file sharing with Samba. Finally, we cover how to enable Samba to share a directory. + +### Step One: Install Samba on Fedora or CentOS ### + +First thing first. Let's install Samba and configure basic settings. + +Check whether Samba application is already installed on your system by running: + + $ rpm -q samba samba-common samba-client + +If the above command doesn't show anything at all, it means that Samba is not installed. In that case, install Samba using the command below. + + $ sudo yum install samba samba-common samba-client + +Next, creates a local directory which will share data over network. This directory will be exported to remote users as a Samba share. In this tutorial, we will create this directory in the top-level directory '/', so make sure that you have the privileges to do it. + + $ sudo mkdir /shared + +If you want to create a shared directory inside your home directory (e.g., ~/shared), you must activate Samba home directory sharing in the SELinux options, which will be described below in more detail. + +After creating /shared directory, set the privileges of the directory so other users can access it. + + $ sudo chmod o+rw /shared + +If you don't want other users to be able to have write to the directory, just remove the 'w' option in chmod command as follows. + + $ sudo chmod o+r /shared + +Next, create one empty file as a test. This file will be used to verify that he Samba share is mounted properly. + + $ sudo touch /shared/file1 + +### Step Two: Configure SELinux for Samba ### + +Next, we need to re-configure SELinux which is enabled by default in Fedora and CentOS distributions. SELinux allows Samba to read and modify files or directories only when they have the right security context (e.g., labeled with the 'samba_share_t' attribute). + +The following command adds the necessary label to file-context configuration: + + $ sudo semanage fcontext -a -t samba_share_t "(/.*)?" + +Replace the with the local directory we created earlier for Samba share (e.g., /shared): + + $ sudo semanage fcontext -a -t samba_share_t "/shared(/.*)?" + +To activate the label change, we then must run the restorecon command like below. + + $ sudo restorecon -R -v /shared + +![](https://farm9.staticflickr.com/8584/16652774078_2055f45f70_b.jpg) + +To share a directory inside our home directory via Samba, we must enable sharing home directory option in SELinux because it is disabled by default. The following command achieves the desired effect. Skip this step if you are not sharing your home directory. + + $ sudo setsebool -P samba_enable_home_dirs 1 + +### Step Three: Configure Firewall for Samba ### + +The next step is to open necessary TCP/UDP ports in the firewall settings for Samba to operate. + +If you are using firewalld (e.g., on Fedora or CentOS 7), the following command will take care of permanent firewall rule change for Samba service. + + $ sudo firewall-cmd --permanent --add-service=samba + +If you are using iptables for your firewall (e.g., CentOS 6 or earlier), use the following commands to open up necessary Samba ports to the world. + + $ sudo vi /etc/sysconfig/iptables + +---------- + + -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 445 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT + +Then restart iptables service: + + $ sudo service iptables restart + +### Step Four: Change Samba Configuration ### + +The last step is to configure Samba to export a created local directory as a Samba-share. + +Open the Samba configuration file with a text editor, and add the following lines at the bottom of the file. + + $ sudo nano /etc/samba/smb.conf + +---------- + + [myshare] + comment=my shared files + path=/shared + public=yes + writeable=yes + +In the above the text inside a pair of brackets (e.g., "myshare") is the name of the Samba-shared resource, which will be used to access the Samba share from a remote host. + +Create a Samba user account which is required to mount and export the Samba file system. To create a Samba user, use the smbpasswd tool. Note that the Samba user account must be the same as any existing Linux user. If you try to add a non-existing user with smbpasswd, it will give an error message. + +If you don't want to use any existing Linux user as a Samba user, you can create a new dedicated user in your system. For safety, set the new user's login shell to /sbin/nologin, and do not create its home directory. + +In this example, we are creating a new user named "sambaguest" as follows. + + $ sudo useradd -M -s /sbin/nologin sambaguest + $ sudo passwd sambaguest + +![](https://farm9.staticflickr.com/8702/16814479366_53f540d3ba_b.jpg) + +After creating a new user, add the user as a Samba user using smbpasswd command. When this command asks a password, you can type a different password than the user's password. + + $ sudo smbpasswd -a sambaguest + +4. Activate the Samba service, and check whether the Samba service is running or not. + + $ sudo systemctl enable smb.service + $ sudo systemctl start smb.service + $ sudo systemctl is-active smb + +![](https://farm8.staticflickr.com/7607/16652984770_622f24bccc_b.jpg) + +To see the list of shared directories in Samba, type the following command. + + $ smbclient -U sambaguest -L localhost + +![](https://farm8.staticflickr.com/7281/16220411103_06bf585901_b.jpg) + +The following is a screenshot of accessing the Samba-shared directory on Thunar file manager, and doing copy-paste of file1. Note that the Samba share is accessible via "smb:///myshare" address on Thunar. + +![](https://farm8.staticflickr.com/7644/16218011174_c8b34fcedc_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/share-directory-samba-fedora-centos.html + +作者:[Kristophorus Hadiono][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/kristophorus \ No newline at end of file From e8f3cc6b20d8b8a5fae27aac13e31b3f4263b5c8 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 18 Mar 2015 15:30:27 +0800 Subject: [PATCH 0307/2517] =?UTF-8?q?20150318-2=20=E9=80=89=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B0=E4=B8=8A=E9=9D=A2=E4=B8=80=E7=AF=87?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E4=B8=AD=E4=B8=80=E5=B0=8F=E7=82=B9=E6=8E=92?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inal Commands That Will Rock Your World.md | 266 ++++++++++++++++++ ...0150318 Fedora GNOME Keyboard Shortcuts.md | 20 +- 2 files changed, 276 insertions(+), 10 deletions(-) create mode 100644 sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md diff --git a/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md new file mode 100644 index 0000000000..ba85e4c6a8 --- /dev/null +++ b/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md @@ -0,0 +1,266 @@ +11 Linux Terminal Commands That Will Rock Your World +================================================================================ +I have been using Linux for about 10 years and what I am going to show you in this article is a list of Linux commands, tools and clever little tricks that I wish somebody had shown me from the outset instead of stumbling upon them as I went along. + +![Linux Keyboard Shortcuts.](http://f.tqn.com/y/linux/1/L/m/J/1/keyboardshortcuts.png) +Linux Keyboard Shortcuts. + +### 1. Useful Command Line Keyboard Shortcuts ### + +The following keyboard shortcuts are incredibly useful and will save you loads of time: + +- CTRL + U - Cuts text up until the cursor. +- CTRL + K - Cuts text from the cursor until the end of the line +- CTRL + Y - Pastes text +- CTRL + E - Move cursor to end of line +- CTRL + A - Move cursor to the beginning of the line +- ALT + F - Jump forward to next space +- ALT + B - Skip back to previous space +- ALT + Backspace - Delete previous word +- CTRL + W - Cut word behind cursor +- Shift + Insert - Pastes text into terminal + +Just so that the commands above make sense look at the next line of text. + + sudo apt-get intall programname + +As you can see I have a spelling error and for the command to work I would need to change "intall" to "install". + +Imagine the cursor is at the end of the line. There are various ways to get back to the word install to change it. + +I could press ALT + B twice which would put the cursor in the following position (denoted by the ^ symbol): + + sudo apt-get^intall programname + +Now you could press the cursor key and insert the ''s' into install. + +Another useful command is "shift + insert" especially If you need to copy text from a browser into the terminal. + +![](http://f.tqn.com/y/linux/1/L/n/J/1/sudotricks2.png) + +### 2. SUDO !! ### + +You are going to really thank me for the next command if you don't already know it because until you know this exists you curse yourself every time you enter a command and the words "permission denied" appear. + +- sudo !! + +How do you use sudo !!? Simply. Imagine you have entered the following command: + + apt-get install ranger + +The words "Permission denied" will appear unless you are logged in with elevated privileges. + +sudo !! runs the previous command as sudo. So the previous command now becomes: + + sudo apt-get install ranger + +If you don't know what sudo is [start here][1]. + +![Pause Terminal Applications.](http://f.tqn.com/y/linux/1/L/o/J/1/pauseapps.png) +Pause Terminal Applications. + +### 3. Pausing Commands And Running Commands In The Background ### + +I have already written a guide showing how to run terminal commands in the background. + +- CTRL + Z - Pauses an application +- fg - Returns you to the application + +So what is this tip about? + +Imagine you have opened a file in nano as follows: + + sudo nano abc.txt + +Halfway through typing text into the file you realise that you quickly want to type another command into the terminal but you can't because you opened nano in foreground mode. + +You may think your only option is to save the file, exit nano, run the command and then re-open nano. + +All you have to do is press CTRL + Z and the foreground application will pause and you will be returned to the command line. You can then run any command you like and when you have finished return to your previously paused session by entering "fg" into the terminal window and pressing return. + +An interesting thing to try out is to open a file in nano, enter some text and pause the session. Now open another file in nano, enter some text and pause the session. If you now enter "fg" you return to the second file you opened in nano. If you exit nano and enter "fg" again you return to the first file you opened within nano. + +![nohup.](http://f.tqn.com/y/linux/1/L/p/J/1/nohup3.png) +nohup. + +### 4. Use nohup To Run Commands After You Log Out Of An SSH Session ### + +The [nohup command][2] is really useful if you use the ssh command to log onto other machines. + +So what does nohup do? + +Imagine you are logged on to another computer remotely using ssh and you want to run a command that takes a long time and then exit the ssh session but leave the command running even though you are no longer connected then nohup lets you do just that. + +For instance I use my [Raspberry PI][3] to download distributions for review purposes. + +I never have my Raspberry PI connected to a display nor do I have a keyboard and mouse connected to it. + +I always connect to the Raspberry PI via [ssh][4] from a laptop. If I started downloading a large file on the Raspberry PI without using the nohup command then I would have to wait for the download to finish before logging off the ssh session and before shutting down the laptop. If I did this then I may as well have not used the Raspberry PI to download the file at all. + +To use nohup all I have to type is nohup followed by the command as follows: + + nohup wget http://mirror.is.co.za/mirrors/linuxmint.com/iso//stable/17.1/linuxmint-17.1-cinnamon-64bit.iso & + +![Schedule tasks with at.](http://f.tqn.com/y/linux/1/L/q/J/1/at.png) +Schedule tasks with at. + +### 5. Running A Linux Command 'AT' A Specific Time ### + +The 'nohup' command is good if you are connected to an SSH server and you want the command to remain running after logging out of the SSH session. + +Imagine you want to run that same command at a specific point in time. + +The 'at' command allows you to do just that. 'at' can be used as follows. + + at 10:38 PM Fri + at> cowsay 'hello' + at> CTRL + D + +The above command will run the program [cowsay][5] at 10:38 PM on Friday evening. + +The syntax is 'at' followed by the date and time to run. + +When the at> prompt appears enter the command you want to run at the specified time. + +The CTRL + D returns you to the cursor. + +There are lots of different date and time formats and it is worth checking the man pages for more ways to use 'at'. + +![](http://f.tqn.com/y/linux/1/L/l/J/1/manmost.png) + +### 6. Man Pages ### + +Man pages give you an outline of what commands are supposed to do and the switches that can be used with them. + +The man pages are kind of dull on their own. (I guess they weren't designed to excite us). + +You can however do things to make your usage of man more appealing. + + export PAGER=most + +You will need to install 'most; for this to work but when you do it makes your man pages more colourful. + +You can limit the width of the man page to a certain number of columns using the following command: + + export MANWIDTH=80 + +Finally, if you have a browser available you can open any man page in the default browser by using the -H switch as follows: + + man -H + +Note this only works if you have a default browser set up within the $BROWSER environment variable. + +![View Processes With htop.](http://f.tqn.com/y/linux/1/L/r/J/1/nohup2.png) +View Processes With htop. + +### 7. Use htop To View And Manage Processes ### + +Which command do you currently use to find out which processes are running on your computer? My bet is that you are using '[ps][6]' and that you are using various switches to get the output you desire. + +Install '[htop][7]'. It is definitely a tool you will wish that you installed earlier. + +htop provides a list of all running processes in the terminal much like the file manager in Windows. + +You can use a mixture of function keys to change the sort order and the columns that are displayed. You can also kill processes from within htop. + +To run htop simply type the following into the terminal window: + + htop + +![Command Line File Manager - Ranger.](http://f.tqn.com/y/linux/1/L/s/J/1/ranger.png) +Command Line File Manager - Ranger. + +### 8. Navigate The File System Using ranger ### + +If htop is immensely useful for controlling the processes running via the command line then [ranger][8] is immensely useful for navigating the file system using the command line. + +You will probably need to install ranger to be able to use it but once installed you can run it simply by typing the following into the terminal: + + ranger + +The command line window will be much like any other file manager but it works left to right rather than top to bottom meaning that if you use the left arrow key you work your way up the folder structure and the right arrow key works down the folder structure. + +It is worth reading the man pages before using ranger so that you can get used to all keyboard switches that are available. + +![Cancel Linux Shutdown.](http://f.tqn.com/y/linux/1/L/t/J/1/shutdown.png) +Cancel Linux Shutdown. + +### 9. Cancel A Shutdown ### + +So you started the [shutdown][9] either via the command line or from the GUI and you realised that you really didn't want to do that. + + shutdown -c + +Note that if the shutdown has already started then it may be too late to stop the shutdown. + +Another command to try is as follows: + +- [pkill][10] shutdown + +![Kill Hung Processes With XKill.](http://f.tqn.com/y/linux/1/L/u/J/1/killhungprocesses.png) +Kill Hung Processes With XKill. + +### 10. Killing Hung Processes The Easy Way ### + +Imagine you are running an application and for whatever reason it hangs. + +You could use 'ps -ef' to find the process and then kill the process or you could use 'htop'. + +There is a quicker and easier command that you will love called [xkill][11]. + +Simply type the following into a terminal and then click on the window of the application you want to kill. + + xkill + +What happens though if the whole system is hanging? + +Hold down the 'alt' and 'sysrq' keys on your keyboard and whilst they are held down type the following slowly: + +- [REISUB][12] + +This will restart your computer without having to hold in the power button. + +![youtube-dl.](http://f.tqn.com/y/linux/1/L/v/J/1/youtubedl2.png) +youtube-dl. + +### 11. Download Youtube Videos ### + +Generally speaking most of us are quite happy for Youtube to host the videos and we watch them by streaming them through our chosen media player. + +If you know you are going to be offline for a while (i.e. due to a plane journey or travelling between the south of Scotland and the north of England) then you may wish to download a few videos onto a pen drive and watch them at your leisure. + +All you have to do is install youtube-dl from your package manager. + +You can use youtube-dl as follows: + + youtube-dl url-to-video + +You can get the url to any video on Youtube by clicking the share link on the video's page. Simply copy the link and paste it into the command line (using the shift + insert shortcut). + +### Summary ### + +I hope that you found this list useful and that you are thinking "i didn't know you could do that" for at least 1 of the 11 items listed. + +-------------------------------------------------------------------------------- + +via: http://linux.about.com/od/commands/tp/11-Linux-Terminal-Commands-That-Will-Rock-Your-World.htm + +作者:[Gary Newell][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linux.about.com/bio/Gary-Newell-132058.htm +[1]:http://linux.about.com/cs/linux101/g/sudo.htm +[2]:http://linux.about.com/library/cmd/blcmdl1_nohup.htm +[3]:http://linux.about.com/od/mobiledevicesother/a/Raspberry-Pi-Computer-Running-Linux.htm +[4]:http://linux.about.com/od/commands/l/blcmdl1_ssh.htm +[5]:http://linux.about.com/cs/linux101/g/cowsay.htm +[6]:http://linux.about.com/od/commands/l/blcmdl1_ps.htm +[7]:http://www.linux.com/community/blogs/133-general-linux/745323-5-commands-to-check-memory-usage-on-linux +[8]:http://ranger.nongnu.org/ +[9]:http://linux.about.com/od/commands/l/blcmdl8_shutdow.htm +[10]:http://linux.about.com/library/cmd/blcmdl1_pkill.htm +[11]:http://linux.about.com/od/funnymanpages/a/funman_xkill.htm +[12]:http://blog.kember.net/articles/reisub-the-gentle-linux-restart/ \ No newline at end of file diff --git a/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md b/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md index 7b70ec9779..9f39418fce 100644 --- a/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md +++ b/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md @@ -135,24 +135,24 @@ If you press "CTRL", "ALT" and "DEL" on your keyboard within Fedora a message wi The editing keyboard shortcuts are pretty much universal across every operating system. -- CTRL + A Select All -- CTRL + X Cut -- CTRL + C Copy -- CTRL + V Paste -- CTRL + Z Undo +- CTRL + A - Select All +- CTRL + X - Cut +- CTRL + C - Copy +- CTRL + V - Paste +- CTRL + Z - Undo ### 13. Screen Capturing ### As with the editing shortcuts, the screencapturing keys are fairly standard -- PRTSC (Print Screen) Take screenshot -- Alt + PRTSC Take screenshot of current window -- Shift + PRTSC Take screenshot of an area of the screen +- PRTSC (Print Screen) - Take screenshot +- Alt + PRTSC - Take screenshot of current window +- Shift + PRTSC - Take screenshot of an area of the screen Here is one that is fairly unique but great for people making tutorial videos. -- CTRL + ALT + SHIFT + R Record Screencast -- CTRL + ALT + SHIFT + R again Stop Screencast +- CTRL + ALT + SHIFT + R - Record Screencast +- CTRL + ALT + SHIFT + R again - Stop Screencast The [screencasts][4] will be stored in the videos folder under your home directory in the [webm][5] format. From 823d5e26f3fea402f013269e655abbd66295d1d1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 18 Mar 2015 16:08:40 +0800 Subject: [PATCH 0308/2517] =?UTF-8?q?20150318-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150318 The future of Linux storage.md | 81 ++++++ ...M (Logical Volume Management) in Ubuntu.md | 268 ++++++++++++++++++ ...r Easy Partition Resizing and Snapshots.md | 67 +++++ ...And Use 'Go For It!' To Do App In Linux.md | 93 ++++++ 4 files changed, 509 insertions(+) create mode 100644 sources/talk/20150318 The future of Linux storage.md create mode 100644 sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md create mode 100644 sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md create mode 100644 sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md diff --git a/sources/talk/20150318 The future of Linux storage.md b/sources/talk/20150318 The future of Linux storage.md new file mode 100644 index 0000000000..d1a8898677 --- /dev/null +++ b/sources/talk/20150318 The future of Linux storage.md @@ -0,0 +1,81 @@ +The future of Linux storage +================================================================================ +> **Summary**:Linux software developers are working hard on expanding Linux's file and storage options. + +BOSTON - At the [Linux Foundation's][1] new [Vault][2] show, it's all about file systems and storage. You might think that there's nothing new to say about either topic, but you'd be wrong. + +![](http://zdnet2.cbsistatic.com/hub/i/r/2015/03/12/c8f92cc2-b963-4238-80a0-d785ec93698c/resize/770x578/08d93a8a393d3f50b2a56e6b0e7a0ca9/btrfs-1.jpg) +Linux file systems, such as Btrfs, and storage support options are constantly evolving. -- Facebook + +Storage technology has come a long way from the days of, as Linus Torvalds put it, "[nasty platters of spinning rust][3]" and Linux has had to keep up. In recent years, for example, [flash memory has arrived as enterprise server primary storage][4] and [persistent memory][5] is bringing us storage that works at DRAM speeds. At the same time, Big Data, cloud computing, and containers are all bringing new use cases to Linux. + +To deal with this, Linux developers are both expanding their existing file and storage programs and working on new ones. + +### Btrfs ### + +For instance, Chris Mason, a Facebook software engineer and one of the [Btrfs][6] (pronounced Butter FS) maintainers, explained how Facebook uses this file system. Btrfs has many advantages as a file system such as the ability to handle both numerous small files and single files as large as 16 exabytes; baked in RAID; built-in file-system compression; and integrated multi-storage device support. + +Facebook, of course, runs on Linux. To be exact, Facebook runs the 3.10 and 3.18 Linux kernels on an internal distribution, which is based on [CentOS][7]. For Facebook, the real win is that Btrfs is stable and fast under the endless input/output operations per second (IOPS) pounding from Facebook's constantly updating users. + +That's the good news. The bad news is that Btrfs is still much too slow for traditional DBMSs such as MySQL. For those, Facebook uses [XFS][8]. To co-ordinate the two file systems, Facebook uses [Gluster][9], the open-source distributed file system. + +Facebook, which works hand-in-glove with the upstream Btrfs Linux kernel developers, is working on improving Btrfs's DBMS speed. Mason, and his companions, are doing this by using Btrfs with the [RocksDB][10] database. This is a persistent key-value store for fast storage, which can be used as the foundation for a client-server database. + +Btrfs also still has some bugs. For example, if you're foolish enough to fill a disk almost to bursting, Btrfs will stop you from writing to storage before the disk is completely stuffed. For some projects, such as [CoreOS][12], the enterprise Linux that relies on containers, that's a showstopper. [CoreOS has since switched to using xt4 and overlayfs][11]. + +The Btrfs crew is also working on data deduplication. In this, when a file system has more than one identical file, you automatically delete the duplicate. As Mason said, "Not everyone needs this, but if you need it, you really need it!" + +Btrfs isn't the only file system that's both very important and getting worked on. John Spray, a senior software engineer at [Red Hat][13], talked about the distributed [Ceph][14] file system. + +### Ceph FS ### + +Ceph provides a distributed object store and file system which, in turn, relies on a resilient and scalable storage model (RADOS) using clusters of commodity hardware. Along with the RADOS block device (RBD), and the RADOS object gateway (RGW), Ceph provides a [POSIX][15] file-system interface -- Ceph FS. While RBD and RGW have been in use for production workloads for some time, efforts to make Ceph FS ready for production are now underway. + +[Red Hat, after acquiring Inktank][16], Ceph's parent company, in 2014 has been working hard on making CephFS production ready. For better or worse, Spray said, "Some people are already using it in production; we're terrified of this. It's really not ready yet." Still, Spray added, that this "is a mixed blessing because while it's a bit scary, we get really useful feedback and testing from those users." + +That's because while Ceph object stores scale out well, Ceph FS, as a POSIX compliant file-system, are hard to scale out. For example, as a distributed file system, Ceph FS has to deal with multiple writes from multiple clients. This can lead to all or nothing situations where one client can write and others must wait. This can result in file-locking situations that are more complicated than those in ordinary file systems. + +Still, Ceph FS is worth doing, Spray said, "since POSIX file-systems are an operating system lingua franca." That's not to say that Ceph FS doesn't work. "It's not horribly broken. It works. What's missing is the repair and monitoring tools." + +Red Hat is currently hard at work on getting [fsck][17] and journal repair tools, snapshot hardening, better client access control, and cloud and container integration. For now, though, Ceph FS is a file system that only the very brave, or foolish, should use in production. + +### File and storage odds and ends ### + +As for larger issues of file-systems and storage, Jeff Layton, senior software engineer at [Primary Data][18], explained that there are efforts under way to to create "tests for catastrophic power failure, without actually pulling the plug." These tests will soon be integrated with [xfstests][19], the gold standard for Linux file-system testing. + +Rik van Riel, a Red Hat principal software engineer, spoke about the problem of dealing with persistent memory products. You can treat them as storage or as memory. But, you can't currently take snapshots for backups if you use them as memory. The real problem: van Riel is certain that people will try to use persistent memory as both, which will lead to such as situations as "Without back up, how do you deal with a 200GB persistent memory database?" Adding insult to injury, logging systems don't currently work with persistent memory. + +What's the right answer? Linux doesn't have one yet, but programmers are working on it. + +So, while Linux has many file systems and can use any kind of storage out there that can hold a byte, there's still a lot of work to be done. Technology never stands still. Linux, which runs on everything from devices to desktops to servers to clouds to supercomputers, has to keep up with storage advances no matter where they appear. + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/linux-storage-futures/ + +作者:[Steven J. Vaughan-Nichols][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.zdnet.com/meet-the-team/us/sjvn/ +[1]:http://www.linuxfoundation.org/ +[2]:http://events.linuxfoundation.org/events/vault +[3]:http://www.wired.com/2012/10/linus-torvalds-hard-disks/ +[4]:http://www.zdnet.com/article/sandisk-launches-infiniflash-aims-to-bring-flash-array-costs-down/ +[5]:http://events.linuxfoundation.org/sites/events/files/eeus13_wheeler.pdf +[6]:https://btrfs.wiki.kernel.org/index.php/Main_Page +[7]:http://www.centos.org/ +[8]:http://oss.sgi.com/projects/xfs/ +[9]:http://www.gluster.org/ +[10]:http://rocksdb.org/ +[11]:http://lwn.net/Articles/627232/ +[12]:https://coreos.com/ +[13]:http://www.redhat.com/ +[14]:http://ceph.com/ +[15]:http://pubs.opengroup.org/onlinepubs/9699919799/ +[16]:http://www.zdnet.com/article/red-hat-acquires-inktank-for-175m/ +[17]:http://linux.die.net/man/8/fsck +[18]:http://primarydata.com/ +[19]:http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git;a=summary \ No newline at end of file diff --git a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md new file mode 100644 index 0000000000..570217f220 --- /dev/null +++ b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md @@ -0,0 +1,268 @@ +How to Manage and Use LVM (Logical Volume Management) in Ubuntu +================================================================================ +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-1.png.pagespeed.ic.VGSxDeVS9P.png) + +In our [previous article we told you what LVM is and what you may want to use it for][1], and today we are going to walk you through some of the key management tools of LVM so you will be confident when setting up or expanding your installation. + +As stated before, LVM is a abstraction layer between your operating system and physical hard drives. What that means is your physical hard drives and partitions are no longer tied to the hard drives and partitions they reside on. Rather, the hard drives and partitions that your operating system sees can be any number of separate hard drives pooled together or in a software RAID. + +To manage LVM there are GUI tools available but to really understand what is happening with your LVM configuration it is probably best to know what the command line tools are. This will be especially useful if you are managing LVM on a server or distribution that does not offer GUI tools. + +Most of the commands in LVM are very similar to each other. Each valid command is preceded by one of the following: + +- Physical Volume = pv +- Volume Group = vg +- Logical Volume = lv + +The physical volume commands are for adding or removing hard drives in volume groups. Volume group commands are for changing what abstracted set of physical partitions are presented to your operating in logical volumes. Logical volume commands will present the volume groups as partitions so that your operating system can use the designated space. + +### Downloadable LVM Cheat Sheet ### + +To help you understand what commands are available for each prefix we made a LVM cheat sheet. We will cover some of the commands in this article, but there is still a lot you can do that won’t be covered here. + +All commands on this list will need to be run as root because you are changing system wide settings that will affect the entire machine. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/01/lvm-cheatsheet.png) + +### How to View Current LVM Information ### + +The first thing you may need to do is check how your LVM is set up. The s and display commands work with physical volumes (pv), volume groups (vg), and logical volumes (lv) so it is a good place to start when trying to figure out the current settings. + +The display command will format the information so it’s easier to understand than the s command. For each command you will see the name and path of the pv/vg and it should also give information about free and used space. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/01/539x225xpvdisplay.png.pagespeed.ic.u2XV5LBTYa.png) + +The most important information will be the PV name and VG name. With those two pieces of information we can continue working on the LVM setup. + +### Creating a Logical Volume ### + +Logical volumes are the partitions that your operating system uses in LVM. To create a logical volume we first need to have a physical volume and volume group. Here are all of the steps necessary to create a new logical volume. + +#### Create physical volume #### + +We will start from scratch with a brand new hard drive with no partitions or information on it. Start by finding which disk you will be working with. (/dev/sda, sdb, etc.) + +> Note: Remember all of the commands will need to be run as root or by adding ‘sudo’ to the beginning of the command. + + fdisk -l + +If your hard drive has never been formatted or partitioned before you will probably see something like this in the fdisk output. This is completely fine because we are going to create the needed partitions in the next steps. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/fdisk.png.pagespeed.ce.AmAEsxm-7Q.png) + +Our new disk is located at /dev/sdb so lets use fdisk to create a new partition on the drive. + +There are a plethora of tools that can create a new partition with a GUI, [including Gparted][2], but since we have the terminal open already, we will use fdisk to create the needed partition. + +From a terminal type the following commands: + + fdisk /dev/sdb + +This will put you in a special fdisk prompt. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x145xfdisk00.png.pagespeed.ic.I7S8bjoXQG.png) + +Enter the commands in the order given to create a new primary partition that uses 100% of the new hard drive and is ready for LVM. If you need to change the partition size or want multiple partions I suggest using GParted or reading about fdisk on your own. + +**Warning: The following steps will format your hard drive. Make sure you don’t have any information on this hard drive before following these steps.** + +- n = create new partition +- p = creates primary partition +- 1 = makes partition the first on the disk + +Push enter twice to accept the default first cylinder and last cylinder. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/562x216xfdisk01.png.pagespeed.ic.DsSZ38kWcA.png) + +To prepare the partition to be used by LVM use the following two commands. + +- t = change partition type +- 8e = changes to LVM partition type + +Verify and write the information to the hard drive. + +- p = view partition setup so we can review before writing changes to disk +- w = write changes to disk + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/560x339xfdisk03.png.pagespeed.ic.FC8foICZsb.png) + +After those commands, the fdisk prompt should exit and you will be back to the bash prompt of your terminal. + +Enter pvcreate /dev/sdb1 to create a LVM physical volume on the partition we just created. + +You may be asking why we didn’t format the partition with a file system but don’t worry, that step comes later. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/pvcreate.png.pagespeed.ce.W7VAr-ig3t.png) + +#### Create volume Group #### + +Now that we have a partition designated and physical volume created we need to create the volume group. Luckily this only takes one command. + + vgcreate vgpool /dev/sdb1 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/vgcreate.png.pagespeed.ce.fVLzSmPZou.png) + +Vgpool is the name of the new volume group we created. You can name it whatever you’d like but it is recommended to put vg at the front of the label so if you reference it later you will know it is a volume group. + +#### Create logical volume #### + +To create the logical volume that LVM will use: + + lvcreate -L 3G -n lvstuff vgpool + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/lvcreate.png.pagespeed.ce.vupLB-LJEW.png) + +The -L command designates the size of the logical volume, in this case 3 GB, and the -n command names the volume. Vgpool is referenced so that the lvcreate command knows what volume to get the space from. + +#### Format and Mount the Logical Volume #### + +One final step is to format the new logical volume with a file system. If you want help choosing a Linux file system, read our [how to that can help you choose the best file system for your needs][3]. + + mkfs -t ext3 /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/571x424xmkfs.png.pagespeed.ic.ERMan1Mz0P.png) + +Create a mount point and then mount the volume somewhere you can use it. + + mkdir /mnt/stuff + mount -t ext3 /dev/vgpool/lvstuff /mnt/stuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/510x69xmount.png.pagespeed.ic.k0i1tvqgcV.png) + +#### Resizing a Logical Volume #### + +One of the benefits of logical volumes is you can make your shares physically bigger or smaller without having to move everything to a bigger hard drive. Instead, you can add a new hard drive and extend your volume group on the fly. Or if you have a hard drive that isn’t used you can remove it from the volume group to shrink your logical volume. + +There are three basic tools for making physical volumes, volume groups, and logical volumes bigger or smaller. + +Note: Each of these commands will need to be preceded by pv, vg, or lv depending on what you are working with. + +- resize – can shrink or expand physical volumes and logical volumes but not volume groups +- extend – can make volume groups and logical volumes bigger but not smaller +- reduce – can make volume groups and logical volumes smaller but not bigger + +Let’s walk through an example of how to add a new hard drive to the logical volume “lvstuff” we just created. + +#### Install and Format new Hard Drive #### + +To install a new hard drive follow the steps above to create a new partition and add change it’s partition type to LVM (8e). Then use pvcreate to create a physical volume that LVM can recognize. + +#### Add New Hard Drive to Volume Group #### + +To add the new hard drive to a volume group you just need to know what your new partition is, /dev/sdc1 in our case, and the name of the volume group you want to add it to. + +This will add the new physical volume to the existing volume group. + + vgextend vgpool /dev/sdc1 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/vgextend.png.pagespeed.ce.atRPT1yg5f.png) + +#### Extend Logical Volume #### + +To resize the logical volume we need to say how much we want to extend by size instead of by device. In our example we just added a 8 GB hard drive to our 3 GB vgpool. To make that space usable we can use lvextend or lvresize. + + lvextend -L8G /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/lvextend1.png.pagespeed.ce.6scXbQVUTT.png) + +While this command will work you will see that it will actually resize our logical volume to 8 GB instead of adding 8 GB to the existing volume like we wanted. To add the last 3 available gigabytes you need to use the following command. + + lvextend -L+3G /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/430x85xlvextend2.png.pagespeed.ic.7aBiTBrW03.png) + +Now our logical volume is 11 GB in size. + +#### Extend File System #### + +The logical volume is 11 GB but the file system on that volume is still only 3 GB. To make the file system use the entire 11 GB available you have to use the command resize2fs. Just point resize2fs to the 11 GB logical volume and it will do the magic for you. + + resize2fs /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/650x150xresize2fs.png.pagespeed.ic.Mx74EdMuk_.png) + +**Note: If you are using a different file system besides ext3/4 please see your file systems resize tools.** + +#### Shrink Logical Volume #### + +If you wanted to remove a hard drive from a volume group you would need to follow the above steps in reverse order and use lvreduce and vgreduce instead. + +1. resize file system (make sure to move files to a safe area of the hard drive before resizing) +1. reduce logical volume (instead of + to extend you can also use – to reduce by size) +1. remove hard drive from volume group with vgreduce + +#### Backing up a Logical Volume #### + +Snapshots is a feature that some newer advanced file systems come with but ext3/4 lacks the ability to do snapshots on the fly. One of the coolest things about LVM snapshots is your file system is never taken offline and you can have as many as you want without taking up extra hard drive space. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-2.png.pagespeed.ic.VtOUuqYX1W.png) + +When LVM takes a snapshot, a picture is taken of exactly how the logical volume looks and that picture can be used to make a copy on a different hard drive. While a copy is being made, any new information that needs to be added to the logical volume is written to the disk just like normal, but changes are tracked so that the original picture never gets destroyed. + +To create a snapshot we need to create a new logical volume with enough free space to hold any new information that will be written to the logical volume while we make a backup. If the drive is not actively being written to you can use a very small amount of storage. Once we are done with our backup we just remove the temporary logical volume and the original logical volume will continue on as normal. + +#### Create New Snapshot #### + +To create a snapshot of lvstuff use the lvcreate command like before but use the -s flag. + + lvcreate -L512M -s -n lvstuffbackup /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/597x68xlvcreate-snapshot.png.pagespeed.ic.Rw2ivtcpPg.png) + +Here we created a logical volume with only 512 MB because the drive isn’t being actively used. The 512 MB will store any new writes while we make our backup. + +#### Mount New Snapshot #### + +Just like before we need to create a mount point and mount the new snapshot so we can copy files from it. + + mkdir /mnt/lvstuffbackup + mount /dev/vgpool/lvstuffbackup /mnt/lvstuffbackup + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/565x68xmount-snapshot.png.pagespeed.ic.pVMkhK1o4x.png) + +#### Copy Snapshot and Delete Logical Volume #### + +All you have left to do is copy all of the files from /mnt/lvstuffbackup/ to an external hard drive or tar it up so it is all in one file. + +**Note: tar -c will create an archive and -f will say the location and file name of the archive. For help with the tar command use man tar in the terminal.** + + tar -cf /home/rothgar/Backup/lvstuff-ss /mnt/lvstuffbackup/ + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x67xsnapshot-backup.png.pagespeed.ic.tw-2AK_lfZ.png) + +Remember that while the backup is taking place all of the files that would be written to lvstuff are being tracked in the temporary logical volume we created earlier. Make sure you have enough free space while the backup is happening. + +Once the backup finishes, unmount the volume and remove the temporary snapshot. + + umount /mnt/lvstuffbackup + lvremove /dev/vgpool/lvstuffbackup/ + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/630x102xlvremove.png.pagespeed.ic.yBWk47X6lF.png) + +#### Deleting a Logical Volume #### + +To delete a logical volume you need to first make sure the volume is unmounted, and then you can use lvremove to delete it. You can also remove a volume group once the logical volumes have been deleted and a physical volume after the volume group is deleted. + +Here are all the commands using the volumes and groups we’ve created. + + umount /mnt/lvstuff + lvremove /dev/vgpool/lvstuff + vgremove vgpool + pvremove /dev/sdb1 /dev/sdc1 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/580x185xdelete-lvm.png.pagespeed.ic.3zJTo0Zu9k.png) + +That should cover most of what you need to know to use LVM. If you’ve got some experience on the topic, be sure to share your wisdom in the comments. + +-------------------------------------------------------------------------------- + +via: http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and-how-do-you-enable-it-in-ubuntu/ +[2]:http://www.howtogeek.com/howto/17001/how-to-format-a-usb-drive-in-ubuntu-using-gparted/ +[3]:http://www.howtogeek.com/howto/33552/htg-explains-which-linux-file-system-should-you-choose/ \ No newline at end of file diff --git a/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md b/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md new file mode 100644 index 0000000000..7554abd392 --- /dev/null +++ b/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md @@ -0,0 +1,67 @@ +How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots +================================================================================ +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035707bbd74.png.pagespeed.ic.9_yebxUF1C.png) + +Ubuntu’s installer offers an easy “Use LVM” checkbox. The description says it enables Logical Volume Management so you can take snapshots and more easily resize your hard disk partitions — here’s how to do that. + +LVM is a technology that’s similar to [RAID arrays][1] or [Storage Spaces on Windows][2] in some ways. While this technology is particularly useful on servers, it can be used on desktop PCs, too. + +### Should You Use LVM With Your New Ubuntu Installation? ### + +The first question is whether you even want to use LVM with your Ubuntu installation. Ubuntu makes this easy to enable with a quick click, but this option isn’t enabled by default. As the installer says, this allows you to resize partitions, create snapshots, merge multiple disks into a single logical volume, and so on — all while the system is running. Unlike with typical partitions, you don’t have to shut down your system, boot from a live CD or USB drive, and [resize your partitions while they aren’t in use][3]. + +To be perfectly honest, the average Ubuntu desktop user probably won’t realize whether they’re using LVM or not. But, if you want to do more advanced things later, LVM can help. LVM is potentially more complex, which could cause problems if you need to recover your data later — especially if you’re not that experienced with it. There shouldn’t be a noticeable performance penalty here — LVM is implemented right down in the Linux kernel. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035cbada6ae.png.pagespeed.ic.cnqyiKfCvi.png) + +### Logical Volume Management Explained ### + +We’re previously [explained what LVM is][4]. In a nutshell, it provides a layer of abstraction between your physical disks and the partitions presented to your operating system. For example, your computer might have two hard drives inside it, each 1 TB in size. You’d have to have at least two partitions on these disks, and each of these partitions would be 1 TB in size. + +LVM provides a layer of abstraction over this. Instead of the traditional partition on a disk, LVM would treat the disks as two separate “physical volumes” after you initialize them. You could then create “logical volumes” based on these physical volumes. For example, you could combine those two 1 TB disks into a single 2 TB partition. Your operating system would just see a 2 TB volume, and LVM would deal with everything in the background. A group of physical volumes and logical volumes is known as a “volume group.” A typical system will just have a single volume group. + +This layer of abstraction makes it possibly to easily resize partitions, combine multiple disks into a single volume, and even take “snapshots” of a partition’s file system while it’s running, all without unmounting it. + +Note that merging multiple disks into a single volume can be a bad idea if you’re not creating backups. It’s like with RAID 0 — if you combine two 1 TB volumes into a single 2 TB volume, you could lose important data on the volume if just one of your hard disks fails. Backups are crucial if you go this route. + +### Graphical Utilities for Managing Your LVM Volumes ### + +Traditionally, [LVM volumes are managed with Linux terminal commands][5].These will work for you on Ubuntu, but there’s an easier, graphical method anyone can take advantage of. If you’re a Linux user used to using GParted or a similar partition manager, don’t bother — GParted doesn’t have support for LVM disks. + +Instead, you can use the Disks utility included along with Ubuntu for this. This utility is also known as GNOME Disk Utility, or Palimpsest. Launch it by clicking the icon on the dash, searching for Disks, and pressing Enter. Unlike GParted, the Disks utility will display your LVM partitions under “Other Devices,” so you can format them and adjust other options if you need to. This utility will also work from a live CD or USB drive, too. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550361b3772f7.png.pagespeed.ic.nZWwLJUywR.png) + +Unfortunately, the Disks utility doesn’t include support for taking advantage of LVM’s most powerful features. There’s no options for managing your volume groups, extending partitions, or taking snapshots. You could do that from the terminal, but you don’t have to. Instead, you can open the Ubuntu Software Center, search for LVM, and install the Logical Volume Management tool. You could also just run the **sudo apt-get install system-config-lvm** command in a terminal window. After it’s installed, you can open the Logical Volume Management utility from the dash. + +This graphical configuration tool was made by Red Hat. It’s a bit dated, but it’s the only graphical way to do this stuff without resorting to terminal commands. + +Let’s say you wanted to add a new physical volume to your volume group. You’d open the tool, select the new disk under Uninitialized Entries, and click the “Initialize Entry” button. You’d then find the new physical volume under Unallocated Volumes, and you could use the “Add to existing Volume Group” button to add it to the “ubuntu-vg” volume group Ubuntu created during the installation process. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363106789c.png.pagespeed.ic.drVInt3Weq.png) + +The volume group view shows you a visual overview of your physical volumes and logical volumes. Here, we have two physical partitions across two separate hard drives. We have a swap partition and a root partition, just as Ubuntu sets up its partitioning scheme by default. Because we’ve added a second physical partition from another drive, there’s now a good chunk of unused space. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363f631c19.png.pagespeed.ic.54E_Owcq8y.png) + +To expand a logical partition into the physical space, you could select it under Logical View, click Edit Properties, and modify the size to grow the partition. You could also shrink it from here. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55036893712d3.png.pagespeed.ic.ce7y_Mt0uF.png) + +The other options in system-config-lvm allow you to set up snapshots and mirroring. You probably won’t need these features on a typical desktop, but they’re available graphically here. Remember, you can also [do all of this with terminal commands][6]. + +-------------------------------------------------------------------------------- + +via: http://www.howtogeek.com/211937/how-to-use-lvm-on-ubuntu-for-easy-partition-resizing-and-snapshots/ + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.howtogeek.com/162676/how-to-use-multiple-disks-intelligently-an-introduction-to-raid/ +[2]:http://www.howtogeek.com/109380/how-to-use-windows-8s-storage-spaces-to-mirror-combine-drives/ +[3]:http://www.howtogeek.com/114503/how-to-resize-your-ubuntu-partitions/ +[4]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ +[5]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ +[6]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ \ No newline at end of file diff --git a/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md b/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md new file mode 100644 index 0000000000..d994409438 --- /dev/null +++ b/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md @@ -0,0 +1,93 @@ +Install And Use ‘Go For It!’ To Do App In Linux +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_For_It_TODO_Linux.jpeg) + +How do you manage tasks and remember things in desktop Linux? I preferred [using sticky notes in Ubuntu][1] for a long time. But the problem I faced was syncing it with other devices, especially with my smartphone. This is the reason why went on with [Google Keep][2]. + +Now, Google Keep is feature rich app and I really like it, and like it to the extent of calling it [Linux alternative of Evernote][3]. But not everyone may like a feature rich todo list app. Minmalist is the current trend and liked by many. And if you are one of the minimalist lover, who is looking for an open source to do list app, you should give [Go For It!][4] a try. + +### Go For It! productivity desktop app for Linux ### + +Go For It! is a simple to do list app that comes with a timer to keep you focused on the work. So, you add a task to the list and can attach a timer to it. It will keep remind you to work on the task. You can watch the video by its developer, [Manuel Kehl][5]: + +注释:youtube视频,发布的时候可做成一个链接 + + +### Install Go For It! ### + +To install Go For It! in Ubuntu 15.04, 14.10, 14.04 and other Ubuntu based Linux distributions such as Linux Mint, elementary OS Freya etc, use the official PPA of this app: + + sudo add-apt-repository ppa:mank319/go-for-it + sudo apt-get update + sudo apt-get install go-for-it + +You can download the .deb binaries, binaries for Windows and source code from the respective links below: + +- [Download source code][6] +- [Download .deb binaries][7] +- [Download for Windows][8] + +### Using Go For It! in desktop Linux ### + +Using Go For It! is really simple. You add tasks in the list. The tasks are saved in todo.txt file. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux.png) + +By default a timer of 25 minutes will be set on each task. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_1.png) + +Once done, task is automatically archived to done.txt. Based on preferences, it will send desktop notifications at regular time interval and few minutes before the task is supposed to be over: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Linux_notification.png) + +You can change all these preferences from configuration. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_2.png) + +So far so good. But what about using it on a smartphone. A productivity app is not complete if you cannot keep it synced across various devices. Good thing is that Go For It! is based on [todo.txt][9], which means you can use it in smartphones using third party apps and a cloud service like Dropbox. + +### Using Go For It! in Android smartphones and tablets ### + +You need to do couple of things here. First thing first, install Dropbox in Linux as well as in your Android phone, if you haven’t installed it already. The next thing you need to do is to change the configuration of Go For It! and **change the todo.txt directory to Dropbox location**. + +Next, you will have to download [Simpletask Android app][10]. It’s a free app. Install this app. When you run Simpletask for the first time, you will ask to link your account with Dropbox: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android_1.jpeg) + +Once you have linked Simpletask with Dropbox, open the app. If you have change the configuration of Go For It! to save the files in Dropbox, you should be able to see it in Simpletask. If you do not see it, click on the settings from the bottom and use the option of Open Todo file: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android.jpeg) + +Now you should be able to see your tasks synced with Simpletask. + +### Conclusion ### + +With Simpletask, you can use it in similar fashion as a [markup language tool][11]. For minimal and focused usage Go For It! is a nice to do app. A clean interface is another plus point. It could have been better to have its own smartphone app but we already saw the workarounds. + +On the down side, Go For It! doesn’t run in background. Which means, you’ll have to keep it running always. It doesn’t even has a minimize button, a tiny annoyance. What I would like to see is an indicator applet for it. Running in the background and quick access in the panel will definitely improve its usability. + +Do try Go For It! and share your experience with it. What other to-do app do you use on desktop Linux? How does Go For It! compare with your other favorite productivity app? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/go-for-it-to-do-app-in-linux/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ +[2]:http://itsfoss.com/install-google-keep-ubuntu-1310/ +[3]:http://itsfoss.com/5-evernote-alternatives-linux/ +[4]:http://manuel-kehl.de/projects/go-for-it/ +[5]:http://manuel-kehl.de/about-me/ +[6]:https://github.com/mank319/Go-For-It +[7]:https://launchpad.net/~mank319/+archive/ubuntu/go-for-it +[8]:http://manuel-kehl.de/projects/go-for-it/download-windows-version/ +[9]:http://todotxt.com/ +[10]:https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en +[11]:http://itsfoss.com/install-latex-ubuntu-1404/ \ No newline at end of file From f5dffd27d321a35a3d4053646bf7e1c328f14585 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 Mar 2015 22:19:04 +0800 Subject: [PATCH 0309/2517] PUB:20150127 Windows 10 versus Linux @zpl1025 --- .../talk => published}/20150127 Windows 10 versus Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/talk => published}/20150127 Windows 10 versus Linux.md (100%) diff --git a/translated/talk/20150127 Windows 10 versus Linux.md b/published/20150127 Windows 10 versus Linux.md similarity index 100% rename from translated/talk/20150127 Windows 10 versus Linux.md rename to published/20150127 Windows 10 versus Linux.md From 62438ef56f12792c0c12c5222f82611b1a7b9c32 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 Mar 2015 23:32:32 +0800 Subject: [PATCH 0310/2517] PUB:20150215 A Look At What Linux Games We Will See In 2015 And Beyond @wi-cuckoo --- ...ux Games We Will See In 2015 And Beyond.md | 130 ++++++++++-------- 1 file changed, 76 insertions(+), 54 deletions(-) rename {translated/talk => published}/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md (53%) diff --git a/translated/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md b/published/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md similarity index 53% rename from translated/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md rename to published/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md index fc5d48aad4..5def58511a 100644 --- a/translated/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md +++ b/published/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md @@ -1,85 +1,100 @@ -预见我们将会在2015年及之后的Linux游戏 -================================================================================他们说Linux游戏开发已经死了,已经变得毫无意义...随他们说去吧.一起看看2015甚至以后会为我们带来什么游戏. +Linux 游戏之 2015 动向 +================================================================================ +他们说Linux游戏开发已经死了,已经变得毫无意义…… 随他们说去吧。一起看看2015甚至以后会为我们带来什么Linux游戏。 -真的很难跟上为我们出现的每一样事物,但是可以快速浏览一下我们将会看到的变化. +真的很难跟得上扑面而来的各种形形色色的新事物,但是可以快速浏览一下我们将会看到的变化。 ### 已确认的游戏 ### #### 冒险游戏 #### -- [看火人][1] -- [失落的天堂:初探][2] -- [蒸汽世界:浩劫][3] +- [看火人(Firewatch)][1] +- [失落的天堂:初探(Paradise Lost: First Contact)][2] +- [时空英豪 1.1(Outcast 1.1)][42] +- [蒸汽世界:浩劫(SteamWorld Heist)][3] #### 动作游戏 #### -- [暗黑血统][4] -- [暗黑血统2][5] -- [尸人的世界][6] -- [骷髅女孩][7] +- [暗黑血统(Darksiders)][4] +- [暗黑血统 2(Darksiders 2)][5] +- [尸人的世界(Ray's The Dead)][6] +- [骷髅女孩(Skullgirls)][7] #### 第一人称游戏 #### -- [生化奇兵:永恒][8] -- 半条命 3 /troll      #此处troll不知道如何翻译 -- [烽火家园:革命][9] -- [杀戮空间 2][10] -- 英雄萨姆 4(目前无官方站点) -- [联合风暴][11] -- [烈火击杀][12] +- [生化奇兵:永恒(Bioshock Infinite)][8] +- 半条命 3 /troll (Half Life 3 /troll)    +- [烽火家园:革命(Homefront: The Revolution)][9] +- [叛变(Insurgency)][43] +- [杀戮空间 2(Killing Floor 2)][10] +- 英雄萨姆 4(Serious Sam 4)(目前无官方站点) +- [联合风暴(Storm United)][11] +- [烈火击杀(SUPERHOT)][12] #### 平台游戏 #### -- [武装原型][13] -- [峡谷][14] #此处游戏名尚不确定 -- [吉安娜姐妹][15] -- [心之所向:Alicia][16] -- [ ][17] #此处游戏名未知 -- [无限工厂][18] -- [无敌9号][19] -- [林中之夜][20] -- [夜][21] -- [奇异的世界:新鲜可口][22] -- [真红女神][23] +- [武装原型(Broforce)][13] +- [峡谷(Chasm)][14] #此处游戏中文名尚不确定 +- [吉安娜姐妹(Giana Sisters)][15] +- [心之所向:Alicia(Heart Forth, Alicia)][16] +- [热铁皮屋顶(Hot Tin Roof)][17] +- [无限工厂(Infinifactory)][18] +- [无敌9号(Mighty No. 9)][19] +- [林中之夜(Night in the Woods)][20] +- [夜(Noct)][21] +- [奇异的世界:新鲜可口(Oddworld: New 'N' Tasty)][22] +- [真红女神(Red Goddess)][23] + +#### 赛车游戏 #### + +- [赛车计划(Project Cars)][44] +- [死亡赛车:再生(Carmageddon: Reincarnation)][45] #### 角色扮演游戏 #### -- [神界:原罪][24] -- [永恒之柱][25] -- [暗影狂奔:香港][26] -- [旗帜的传说][27] +- [神界:原罪(Divinity: Original Sin)][24] +- [永恒之柱(Pillars Of Eternity)][25] +- [暗影狂奔:香港(Shadowrun: Hong Kong)][26] +- [旗帜的传说(The Banner Saga)][27] +- [镇魂曲:遗器之潮(Torment: Tides of Numenera)][46] #### 策略游戏 #### -- [奇迹时代3][28] -- [放逐之城][29] -- [城:天际][30] -- [发条帝国][31] -- [][32] -- [卷轴][33] -- [太空海盗和僵尸 2][34] +- [奇迹时代3(Age of Wonders III)][28] +- [At The Gates][47] # 尚无中文名 +- [放逐之城(Banished)][29] +- [城:天际(Cities: Skylines)][30] +- [发条帝国(Clockwork Empires)][31] +- [Parkitect][32] # 尚无中文名 +- [卷轴(Scrolls)][33] +- [太空海盗和僵尸 2(Space Pirates And Zombies 2)][34] #### 沙盒游戏 #### -- [泰拉瑞亚][35] -- [X 重生][36] +- [泰拉瑞亚(Terraria)][35] +- [X 重生(X Rebirth)][36] -#### 不太确认,不过可能性高 #### +#### 体育游戏 #### -- [英雄连][37] -- [逃生][38] -- [影子武士][39] -- [火炬之光 2][40] +- [惊爆美国棒球16(Out of the Park Baseball 16)][48] -然而有两个来自Feral Interactive的,由于不知道他们是什么,所以没有列举出来. +### 不太确认,不过可能性高 ### -我们猜测Aspyr也在准备新的大制作,但是他们仅仅发布了他们最新的游戏,所以可能要等上几个月我们才能看到些什么. +- [英雄连 2(Company of Heroes 2)][37] +- [逃生(Outlast)][38] +- [影子武士(Shadow Warrior)][39] +- 无光之海 - 其开发商试验性地构建 Linux 版本,不过这要取决于他们的 Windows 版本的销售情况(据邮件沟通信息) +- [火炬之光 2(Torchlight II)][40] -当然,** 这不是完整的列表 **,我们会轻易忘记巨量的游戏正在走向我们,哇,如此丰富的列表. +然而有[两个来自Feral Interactive的移植大作][49],由于不知道他们是什么,所以没有列举出来。 -下个月就是游戏开发者大会,我们也期待一些改变发生.然而,我们没有什么确切的东西,对于Valve与Steam Machines的合作,我们期待至少会增加一些Linux游戏,否则,如我们担心,炫耀一些过时的游戏会让Valve脸上无光. +我们猜测Aspyr也在准备新的大制作,但是他们仅仅发布了他们最新的游戏,所以可能要等上几个月我们才能看到些什么。 -你怀念Linux的哪些地方曾让你兴奋? +当然,** 这不是完整的列表 **,我们会轻易忘记如此多的游戏正在走向我们,哇,如此丰富的列表。 + +我们也期待 GDC 2015 上有一些改变,然而,我们没有什么确切的东西,对于Valve与Steam Machines的合作,我们期待至少会增加一些Linux游戏,否则,如我们担心,炫耀一些过时的游戏会让Valve脸上无光。 + +希望我们没有错过那些 Linux 中让你感到兴奋的东西! -------------------------------------------------------------------------------- @@ -87,7 +102,7 @@ via: http://www.gamingonlinux.com/articles/a-look-at-what-linux-games-we-will-se 作者:[liamdawe][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -132,5 +147,12 @@ via: http://www.gamingonlinux.com/articles/a-look-at-what-linux-games-we-will-se [38]:https://www.gamingonlinux.com/articles/outlast-that-really-scary-game-looks-like-its-still-heading-to-linux.4896 [39]:https://www.gamingonlinux.com/articles/shadow-warrior-looks-like-it-will-come-to-linux.4859 [40]:https://www.gamingonlinux.com/articles/torchlight-ii-has-even-more-positive-signs-for-linux.4817 -[41]:http://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/ - +[41]:https://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/ +[42]:https://www.gamingonlinux.com/articles/outcast-a-real-classic-has-been-revamped-and-linux-is-planned.4736 +[43]:https://www.gamingonlinux.com/articles/insurgency-fps-is-waiting-on-valve-so-it-can-come-to-linux-updated.4564 +[44]:http://projectcarsgame.com/ +[45]:https://www.gamingonlinux.com/articles/carmageddon-reincarnations-jason-garber-answers-our-questions-on-their-linux-support.3380 +[46]:https://www.gamingonlinux.com/articles/torment-tides-of-numenera-new-video-looks-absolutely-stunning.4320 +[47]:http://www.atthegatesgame.com/info +[48]:http://www.ootpdevelopments.com/newsletters/nl0154/ +[49]:http://feralinteractive.com/en/upcoming/ \ No newline at end of file From 3541cca48ad92b098acb218df820647b71e40aca Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Thu, 19 Mar 2015 15:03:03 +0800 Subject: [PATCH 0311/2517] translating --- sources/talk/20150318 The future of Linux storage.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150318 The future of Linux storage.md b/sources/talk/20150318 The future of Linux storage.md index d1a8898677..25f178bf8b 100644 --- a/sources/talk/20150318 The future of Linux storage.md +++ b/sources/talk/20150318 The future of Linux storage.md @@ -1,3 +1,4 @@ +[translating by KayGuoWhu] The future of Linux storage ================================================================================ > **Summary**:Linux software developers are working hard on expanding Linux's file and storage options. From 06a3a61874eb618f8689dde545e4bb58e6e2d1cb Mon Sep 17 00:00:00 2001 From: martin qi Date: Thu, 19 Mar 2015 19:53:49 +0800 Subject: [PATCH 0312/2517] translating --- sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md b/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md index 9f39418fce..8faab0ce1d 100644 --- a/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md +++ b/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md @@ -1,3 +1,5 @@ +tanslating by martin. + Fedora GNOME Keyboard Shortcuts ================================================================================ To get the very best out of the [GNOME desktop environment][1], within Fedora, you need to learn and remember the keyboard shortcuts required to navigate the system. @@ -208,4 +210,4 @@ via: http://linux.about.com/od/howtos/tp/Fedora-GNOME-Keyboard-Shortcuts.htm [6]:https://s-media-cache-ak0.pinimg.com/originals/d5/f4/a4/d5f4a42c0940fae6653ee9a17294d450.jpg [7]:http://en.wikipedia.org/wiki/GNOME [8]:https://wiki.gnome.org/ -[9]:https://wiki.gnome.org/Gnome3CheatSheet \ No newline at end of file +[9]:https://wiki.gnome.org/Gnome3CheatSheet From 620535311fdba97dba05e92808e9ef805ac8c4b5 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Fri, 20 Mar 2015 01:30:38 +0800 Subject: [PATCH 0313/2517] Translated --- ...n local time and UNIX timestamp in Perl.md | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md b/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md index ab8efa8f19..34b8bf4629 100644 --- a/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md +++ b/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md @@ -1,14 +1,12 @@ - Vic020 - -Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl +Linux有问必答:Perl中本地时间和UNIX时间戳间相互转换 ================================================================================ -> **Question**: I need to convert readable date and time to a corresponding UNIX timestamp (i.e., Epoch time), or vice versa in a Perl program. Can you show me Perl code examples of converting date/time to UNIX timestamp, or conversely, converting UNIX timestamp to human-readable date and time? +> **问题**: 在Perl语言中,我需要转换易读的日期和时间到对应的UNIX时间戳,反之亦然。你可以给我一些Perl代码例子吗?关于日期及时间转换到UNIX时间戳,或者相反,转换UNIX时间戳到可读的日期和时间。 -When your Perl script needs to deal with time information, there are two different ways to represent and manipulate date and time in the script. One way is a human-readable string representation of time (e.g., "Sat Mar 14 10:14:05 EDT 2015"), and the other is via UNIX timestamp (also known as "Epoch time") which is the number of elapsed seconds since 00:00:00 UTC, 1 Jaunary 1970. Either method has its own pros and cons, and depending on your requirements you may want to convert one format to the other. +当你的Perl脚本需要解决时间信息,这里有两种方法来表示和处理日期和时间。一种方法是易读的时间表示(例,"Sat Mar 14 10:14:05 EDT 2015"),另外一种是使用UNIX时间戳(也叫“新纪元时间”),这是从1970年1月1日到今所消耗的时间秒数。每一种方法都有它自己的优劣势,取决于你的需要,也许也就需要转换一种格式到另一种。 -### Convert Local Time to UNIX Timestamp in Perl ### +### Perl中转换本地时间到UNIX时间戳 ### -To obtain UNIX time from a date string, you can use str2time() in Date::Parse module. It can handle a variety of date formats, such as: +为了从日期字符串中获得UNIX时间,可以使用Date::Parse模块中str2time()函数。此函数可以处理多种格式,例如: - Sat Mar 14 10:14:05 EDT 2015 - 3/14/2015 10:14:05 -0400 @@ -22,7 +20,7 @@ To obtain UNIX time from a date string, you can use str2time() in Date::Parse mo # 1426342445 will be stored in $unix_time my $unix_time = str2time($local_time); -Date:Parse module supports multiple languages (English, French, German and Italian) and timezones. For example: +Date:Parse 模块支持多种语言(英语,法语,德语和意大利语)和时区。例如: use Date::Parse; use Date::Language; @@ -30,17 +28,18 @@ Date:Parse module supports multiple languages (English, French, German and Itali my $lang = Date::Language->new('French'); my $unix_time = $lang->str2time("12:14:05, Ago 16, 2014 (CEST)"); -### Convert UNIX Timestmp to Human-Readable Date and Time in Perl ### +### Perl中UNIX时间戳到可读的日期和时间 ### -If you want to show a UNIX timestamp in a human-readable format, you can use localtime() function which converts a UNIX timestamp into a 9-element list. You can use the returned list to construct any kind of human-readable date/time string as you want. Here is a code snippet. - # $sec, $min, $hour: seconds, minutes and hours - # $mday: the day of the month (0-31) - # $mon: month in the range of 0 (Jaunary) and 11 (December) - # $year: the number of years that have elapsed since 1900 - # $wday: the day of the week in the range of 0 (Sunday) and 6 (Saturday) - # $yday: the day of the year in the range of 0 and 364 (or 365 in leap years) - # $isdst: whether or not it's in daylight saving time +如果你想要转换UNIX时间戳到可读的格式,可以使用localtime()函数,此函数可以转换UNIX时间戳为一个9元素列表。然后你可以使用返回的list构造任何你需要的可读格式。这里有一个代码片段: + + # $sec, $min, $hour: 秒,分,时 + # $mday: 月中的某天 (0-31) + # $mon: 月份,范围 0 (一月) 至 11 (十二月) + # $year: 年份,与1900年的差值(2015年为2015-1900=115) + # $wday: 星期,范围 0 (星期天) 至 6 (星期六) + # $yday: 年中的某天,范围 0 至 364 (或 365 闰年) + # $isdst: 是否是夏令时 my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($unix_timestamp); @@ -55,7 +54,7 @@ If you want to show a UNIX timestamp in a human-readable format, you can use loc via: http://ask.xmodulo.com/convert-local-time-unix-timestamp-perl.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[VicYu/Vic020](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 187dee23ca8f4f063bd07511a1289b3827670784 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Fri, 20 Mar 2015 01:31:34 +0800 Subject: [PATCH 0314/2517] Moved --- ...ow to convert between local time and UNIX timestamp in Perl.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md (100%) diff --git a/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md b/translated/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md similarity index 100% rename from sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md rename to translated/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md From 6decf505737ecdd20fc8039b62c1efc8392836be Mon Sep 17 00:00:00 2001 From: theo-l Date: Thu, 19 Mar 2015 23:11:47 -0300 Subject: [PATCH 0315/2517] translating --- ...pplications in a Linux System with Trickle.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md index 59b22ac16f..446e4f8ec7 100644 --- a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md +++ b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md @@ -14,21 +14,33 @@ Install Trickle Bandwidth Limit in Linux ### 什么是 Trickle? ### Trickle is a network bandwidth shaper tool that allows us to manage the upload and download speeds of applications in order to prevent any single one of them to hog all (or most) of the available bandwidth. In few words, trickle lets you control the network traffic rate on a per-application basis, as opposed to per-user control, which is the classic example of bandwidth shaping in a client-server environment, and is probably the setup we are more familiar with. -Trickle是一个网络宽带调整工具,可以让我们管理应用程序的网络上下行速度,使得可以避免其中的某个应用程序吃掉了全部或大部分可用的宽带.换句话说,Trickle可以让你基于单个应用程序来控制网络流量速率,而不是仅仅针对与单个用户--在客户端网络环境中经典的宽带调整样例, +Trickle是一个网络宽带调整工具,可以让我们管理应用程序的网络上下行速度,使得可以避免其中的某个应用程序吃掉了全部或大部分可用的宽带.换句话说,Trickle可以让你基于单个应用程序来控制 +网络流量速率,而不是仅仅针对与单个用户--在客户端网络环境中经典的宽带调整样例, ### How Trickle Works? ### +### Trickle是如何工作的?### In addition, trickle can help us to define priorities on a per-application basis, so that when overall limits have been set for the entire system, priority apps will still get more bandwidth automatically. To accomplish this task, trickle sets traffic limits to the way in which data is sent to, and received from, sockets using TCP connections. We must note that, other than the data transfer rates, trickle does not modify in any way the behavior of the process it is shaping at any given moment. +另外,tricle可以帮助我们基于应用来定义优先级,所以当对整个系统进行了全局限制设定,高优先级的应用依然会自动地获取更多的宽带。为了实现这个目标,tricle设置通过TCP连接的套接字对数 +据发送、数据接收路径的流量限制。我们必须注意到,除了影响传输速率之外,tricle任何时候都不会以任何方式来改变其处理过程。 ### What Can’t Trickle do? ### +### Trickle不能做什么? ### The only limitation, so to speak, is that trickle will not work with statically linked applications or binaries with the SUID or SGID bits set since it uses dynamic linking and loading to place itself between the shaped process and its associated network socket. Trickle then acts as a proxy between these two software components. +这么说吧,唯一的限制就是,tricle静态连接的应用或者具有SUID或SGID位设置的二进制--因为他们使用动态链接并且将其自身加载到调整过程以及其关联的网络套接字之间。 Trickle此时会在这两种软件 +组件之间扮演代理的角色。 Since trickle does not require superuser privileges in order to run, users can set their own traffic limits. Since this may not be desirable, we will explore how to set overall limits that system users cannot exceed. In other words, users will still be able to manage their traffic rates, but always within the boundaries set by the system administrator. +由于trickle并不会需要超级用户的权限来运行,所以用户可以设置用户独立的流量限制,可能这并不是你想要的,我们会探索如何使用全局设定来限制系统中的所有用户的流量限制。也即是说,此时系统中的每个用户具有管理 +各自的流量速率,但是无论如何,都会受到系统管理员给他们设置的边界限制。 In this article we will explain how to limit the network bandwidth used by applications in a Linux server with trickle. To generate the necessary traffic, we will use ncftpput and ncftpget (both tools are available by installing ncftp) on the client (CentOS 7 server – dev1: 192.168.0.17), and vsftpd on the server (Debian Wheezy 7.5 – dev2: 192.168.0.15) for demonstration purposes. The same instructions also works on RedHat, Fedora and Ubuntu based systems. +在这边文章中,我们会描述如何通过trickle在linux平台上管理应用程序使用的网络宽带。为了生成必要流量,在此会在客户端(CentOS 7 server – dev1: 192.168.0.17)上使用 ncftpput 和 + ncftpget, 在服务器(Debian Wheezy 7.5 – dev2: 192.168.0.15)上使用vsftpd 来进行演示。 相同的指令也可以在RedHat,Fedora和Ubuntu等系统使用。 #### Prerequisites #### +#### 前提条件 #### 1. For RHEL/CentOS 7/6, [enable the EPEL repository][1]. Extra Packages for Enterprise Linux (EPEL) is a repository of high-quality free and open-source software maintained by the Fedora project and is 100% compatible with its spinoffs, such as Red Hat Enterprise Linux and CentOS. Both trickle and ncftp are made available from this repository. @@ -289,7 +301,7 @@ Questions and comments are most welcome. Feel free to use the form below to send via: http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ 作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) +译者:[theo-l](https://github.com/theo-l) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3aa8bc097e07fb086671f5f5abcfae602eb1c324 Mon Sep 17 00:00:00 2001 From: LouisWei Date: Fri, 20 Mar 2015 11:17:57 +0800 Subject: [PATCH 0316/2517] temp --- ...n source software in the business world.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 translated/talk/20150309 10 best uses for open source software in the business world.md diff --git a/translated/talk/20150309 10 best uses for open source software in the business world.md b/translated/talk/20150309 10 best uses for open source software in the business world.md new file mode 100644 index 0000000000..2defa40f83 --- /dev/null +++ b/translated/talk/20150309 10 best uses for open source software in the business world.md @@ -0,0 +1,25 @@ +10种将开源用于商业的最佳途径 +=============================================================================== +> 开源为大大小小的商业带来了一些显著的效益 -- 但是你可能会对某些用途感到惊讶。 + +![](http://tr2.cbsistatic.com/hub/i/r/2015/03/05/54a9c323-4311-4455-b10b-5182548da424/resize/620x485/95164f01a19cbd7a3e4b843be78febae/foss.jpg) + +技术上出现了一些不可避免的东西。举个例子,开源会以自己的方式来协助你的工作。10年前,这很容易成为问题。现在呢?仍然无法避免 -- 也没有理由要去避免。有如此多强大(和必要的)的方方面面技术,开源在许多方面已经成为了技术的救世主。但是你哪一块的工作最适合开源呢?当然,这个问题的答案会因公司而异。然而许多的应用可以部署到几乎每个场景中。 + +让我们来看看这10种可能是最佳的使用方法,帮助你的公司成长,带给你从未体验过的灵活性与可靠性,或者仅仅是帮你节省一笔可观的预算。 + +### 1: 服务器软件 ### + +如果你还在微软的互联网信息服务(IIS,Internet Information Services)平台苦苦挣扎,那么你需要体验一下Apache。这款旗舰开源网页服务器软件是这个星球上使用最广泛的软件之一。Apsche免费,难以置信的可靠,易于管理,而且不需要大量如IIS需要的费用。然而,开源并不局限于网页服务器。如果你需要在公司内共享服务器信息块(SMB,Server Message Block),考虑一下Samba, Samba 4甚至集成了活动的目录,所以你不需要担心在Samba服务器上建立单独的用户账号。 + +### 2: 开发 ### + +用开源开发是很简单的事。PHP,Rails,Perl -- 开源上面的开发语言如同开发的工具(从I集成开发环境到调试)一样多。为开源或者开源工具做开发可以有很多种选择(如同私有的开发一样)。开源与私有最大的不同之处在于开源可以接触到软件源代码。在免费开源软件的世界里(FOSS,free open source software),代码都是公开的。对许多开发者来说,Linux操作系统有他们开发和建立需要的一切(特别那些写代码没有一个成熟环境的人)。如果你确实需要图形用户界面(GNU)的开发工具,开源能满足你。 + +### 3: 安全 ### + +通往安全的道路是充满挑战的,但还是很多途径可以达到。你可以选择“安全盒子”的解决方案,跟随Cisco(一个可靠的解决方案)的节奏,或者你可以借助iptables打造最适合你需求的安全。是的,开源的安全之路会需要更多的时间去配置(有很高的学习壁垒),但是结果通常是不错的。这里甚至不强调一种观点,就是一般来说在桌面上使用开源比起大多数封闭的系统来说是一个比较安全的平台。不过在桌面上部署Linux,你的安全性会大大降低。 + +### 4: 桌面 ### + + From 17d47fdea3923cbaa8ae10763f4f80a7505e9ef7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 20 Mar 2015 17:11:55 +0800 Subject: [PATCH 0317/2517] =?UTF-8?q?20150320-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Revealed--The best and worst of Docker.md | 66 ++++++++ ... Smart phones Using Prey Tool in Ubuntu.md | 70 ++++++++ ...o Analyze Disk Images and Recover Files.md | 159 ++++++++++++++++++ 3 files changed, 295 insertions(+) create mode 100644 sources/talk/20150320 Revealed--The best and worst of Docker.md create mode 100644 sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md create mode 100644 sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md diff --git a/sources/talk/20150320 Revealed--The best and worst of Docker.md b/sources/talk/20150320 Revealed--The best and worst of Docker.md new file mode 100644 index 0000000000..1e188d6cba --- /dev/null +++ b/sources/talk/20150320 Revealed--The best and worst of Docker.md @@ -0,0 +1,66 @@ +Revealed: The best and worst of Docker +================================================================================ +![](http://images.techhive.com/images/article/2015/01/best_worst_places_to_work-100564193-primary.idge.jpg) +Credit: [Shutterstock][1] + +> Docker experts talk about the good, the bad, and the ugly of the ubiquitous application container system + +No question about it: Docker's app container system has made its mark and become a staple in many IT environments. With its accelerating adoption, it's bound to stick around for a good long time. + +But there's no end to the debate about what Docker's best for, where it falls short, or how to most sensibly move it forward without alienating its existing users or damaging its utility. Here, we've turned to a few of the folks who have made Docker their business to get their takes on Docker's good, bad, and ugly sides. + +### The good ### + +One hardly expects Steve Francia, chief of operations of the Docker open source project, to speak of Docker in anything less than glowing terms. When asked by email about Docker's best attributes, he didn't disappoint: "I think the best thing about Docker is that it enables people, enables developers, enables users to very easily run an application anywhere," he said. "It's almost like the Holy Grail of development in that you can run an application on your desktop, and the exact same application without any changes can run on the server. That's never been done before." + +Alexis Richardson of [Weaveworks][2], a virtual networking product, praised Docker for enabling simplicity. "Docker offers immense potential to radically simplify and speed up how software gets built," he replied in an email. "This is why it has delivered record-breaking initial mind share and traction." + +Bob Quillin, CEO of [StackEngine][3], which makes Docker management and automation solutions, noted in an email that Docker (the company) has done a fine job of maintaining Docker's (the product) appeal to its audience. "Docker has been best at delivering strong developer support and focused investment in its product," he wrote. "Clearly, they know they have to keep the momentum, and they are doing that by putting intense effort into product functionality." He also mentioned that Docker's commitment to open source has accelerated adoption by "[allowing] people to build around their features as they are being built." + +Though containerization itself isn't new, as Rob Markovich of IT monitoring-service makers [Moogsoft][4] pointed out, Docker's implementation makes it new. "Docker is considered a next-generation virtualization technology given its more modern, lightweight form [of containerization]," he wrote in an email. "[It] brings an opportunity for an order-of-magnitude leap forward for software development teams seeking to deploy code faster." + +### The bad ### + +What's less appealing about Docker boils down to two issues: the complexity of using the product, and the direction of the company behind it. + +Samir Ghosh, CEO of enterprise PaaS outfit [WaveMaker][5], gave Docker a thumbs-up for simplifying the complex scripting typically needed for continuous delivery. That said, he added, "That doesn't mean Docker is simple. Implementing Docker is complicated. There are a lot of supporting technologies needed for things like container management, orchestration, app stack packaging, intercontainer networking, data snapshots, and so on." + +Ghosh noted the ones who feel the most of that pain are enterprises that want to leverage Docker for continuous delivery, but "it's even more complicated for enterprises that have diverse workloads, various app stacks, heterogenous infrastructures, and limited resources, not to mention unique IT needs for visibility, control and security." + +Complexity also becomes an issue in troubleshooting and analysis, and Markovich cited the fact that Docker provides application abstraction as the reason why. "It is nearly impossible to relate problems with application performance running on Docker to the performance of the underlying infrastructure domains," he said in an email. "IT teams are going to need visibility -- a new class of monitoring and analysis tools that can correlate across and relate how everything is working up and down the Docker stack, from the applications down to the private or public infrastructure." + +Quillin is most concerned about Docker's direction vis-à-vis its partner community: "Where will Docker make money, and where will their partners? If [Docker] wants to be the next VMware, it will need to take a page out of VMware's playbook in how to build and support a thriving partner ecosystem. + +"Additionally, to drive broader adoption, especially in the enterprise, Docker needs to start acting like a market leader by releasing more fully formed capabilities that organizations can count on, versus announcements of features with 'some assembly required,' that don't exist yet, or that require you to 'submit a pull request' to fix it yourself." + +Francia pointed to Docker's rapid ascent for creating its own difficulties. "[Docker] caught on so quickly that there's definitely places that we're focused on to add some features that a lot of users are looking forward to." + +One such feature, he noted, was having a GUI. "Right now to use Docker," he said, "you have to be comfortable with the command line. There's no visual interface to using Docker. Right now it's all command line-based. And we know if we want to really be as successful as we think we can be, we need to be more approachable and a lot of people when they see a command line, it's a bit intimidating for a lot of users." + +### The future ### + +In that last respect, Docker recently started to make advances. Last week it [bought the startup Kitematic][6], whose product gave Docker a convenient GUI on Mac OS X (and will eventually do the same for Windows). Another acqui-hire, [SocketPlane][7], is being spun in to work on Docker's networking. + +What remains to be seen is whether Docker's proposed solutions to its problems will be adopted, or whether another party -- say, [Red Hat][8] -- will provide a more immediately useful solution for enterprise customers who can't wait around for the chips to stop falling. + +"Good technology is hard and takes time to build," said Richardson. "The big risk is that expectations spin wildly out of control and customers are disappointed." + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2896895/application-virtualization/best-and-worst-about-docker.html + +作者:[Serdar Yegulalp][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Serdar-Yegulalp/ +[1]:http://shutterstock.com/ +[2]:http://weave.works/ +[3]:http://stackengine.com/ +[4]:http://www.moogsoft.com/ +[5]:http://www.wavemaker.com/ +[6]:http://www.infoworld.com/article/2896099/application-virtualization/dockers-new-acquisition-does-containers-on-the-desktop.html +[7]:http://www.infoworld.com/article/2892916/application-virtualization/docker-snaps-up-socketplane-to-fix-networking-flaws.html +[8]:http://www.infoworld.com/article/2895804/application-virtualization/red-hat-wants-to-do-for-containers-what-its-done-for-linux.html \ No newline at end of file diff --git a/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md b/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md new file mode 100644 index 0000000000..598c56bd66 --- /dev/null +++ b/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md @@ -0,0 +1,70 @@ +Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu +================================================================================ +Prey is an open source, cross platform tool which helps recover your stolen laptops, desktops, tablet computers and smart phones. It has gained vast popularity and has claimed to help recover hundreds of missing laptops and smart phones. The working of this tool is pretty simple, install it on your Laptop or smart phone, and if your device goes missing, login the Prey website with your credentials and mark your device as “Missing” there. As soon as the thief connects your device with internet, it will immediately send you the Geo location of your device. If your laptop is having webcam, it will also capture the screenshot of the thief. + +Prey consumes minimum system resources; it does not affect your device’s performance in any way. You can also use it alongside any other anti-theft application you had installed on your device. It uses secure and encrypted channels to communicate your device data with Prey servers. + +### Installing and configuring Prey on Ubuntu ### + +Let’s see how we can install and configure Prey on ubuntu, note that during configuration process, we will have to register an account at Prey official website. Once done, it will be able to monitor your devices. Its free account monitors up-to 3 devices, if you need to add more devices to its watch list, you need to purchase appropriate plan. + +Considering the popularity and use of Prey, it has been added to the official ubuntu repository now. That means you don’t need to add any additional PPA to the package manager. Simply launch your terminal application and run the following command to install it: + + sudo apt-get install prey + +![Install Prey](http://blog.linoxide.com/wp-content/uploads/2015/03/Install-Prey.png) + +![Install Prey 1](http://blog.linoxide.com/wp-content/uploads/2015/03/Install-Prey-1.png) + +It is a very lightweight application, uses only few MB of space on the system, once installation is completed, launch it from Applications >> Prey and it will ask you for the configuration. + +Choose “New user” if you are using this app for first time. + +![Prey New User](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-New-User.png) + +This second step is actually the process to sign you up on Prey official website. Please provide your username, email address and password for free account. + +![Register Prey](http://blog.linoxide.com/wp-content/uploads/2015/03/Register-Prey.png) + +Hit “Apply” once done, that’s all, your computer is now protected by Prey. + +![Prey Configuration](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Configuration.png) + +Login your newly created [Prey account][1] and you should be able to see your device information there under “Devices” menu. + +![Prey Web Login](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Web-Login.png) + +As soon as your laptop or any other device goes missing, simply login your Prey web account and change the device status to “missing” by clicking “Set Device to Missing” option. + +![Prey Missing Page](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-1.png) + +Choose report frequency from here and hit “Yes, my device is missing”. Report Frequency option is the time interval after which this app will send you status updates for your device location. It will email you as soon as the device status is changed from web interface. + +![Prey Missing Email](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-2.png) + +As soon as your stolen device is connected to the internet, it will immediately send you report, containing your device's Geo whereabouts and IP address. + +![Prey Found Report](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-3.png) + +Click the report link and you should be able to see your device’s Geo location and IP address. + +![Prey Final](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Final.png) + +There is one known drawback in Prey , It needs your device to be connected to internet for sending Geo location, if thief is smart enough to format your device hard disk before connecting it to the network, then you’ll never get report of its recovery. But there is still a work around to overcome this drawback, make sure to add a BIOS password and disable booting the system from removable devices. + +### Conclusion ### + +It is a small, very useful security application which lets you track all of your devices on a single place, although not perfect, but still provides good level of recovery chances for your stolen devices. It runs seamlessly on Linux, Windows and Mac operating system. Here are details about Prey Pro plans. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/anti-theft-application-prey-ubuntu/ + +作者:[Aun Raza][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:https://preyproject.com/ \ No newline at end of file diff --git a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md new file mode 100644 index 0000000000..ff7ef029e7 --- /dev/null +++ b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md @@ -0,0 +1,159 @@ +Sleuth Kit - Open Source Forensic Tool to Analyze Disk Images and Recover Files +================================================================================ +SIFT is a Ubuntu based forensics distribution provided by SANS Inc. It consist of many forensics tools such as Sleuth kit / Autopsy etc . However, Sleuth kit/Autopsy tools can be installed on Ubuntu/Fedora distribution instead of downloading complete distribution of SIFT. + +Sleuth Kit /Autopsy is open source digital forensics investigation tool which is used for recovering the lost files from disk image and analysis of images for incident response. Autopsy tool is a web interface of sleuth kit which supports all features of sleuth kit. This tool is available for both Windows and Linux Platforms. + +### Install Sleuth kit ### + +First of all, download Sleuth kit software from [sleuthkit][1] website. Use wget command to download it in terminal which is shown in the figure. + + # wget http://cznic.dl.sourceforge.net/project/sleuthkit/sleuthkit/4.1.3/sleuthkit-4.1.3.tar.gz + +![Download Sleuth Kit](http://blog.linoxide.com/wp-content/uploads/2015/03/download-sleuthkeit.png) + +Extract the sleuthkit-4.1.3.tar.gz using following command and go inside the extracted directory + + # tar -xvzf sleuthkit-4.1.3.tar.gz + +![Extraction Process](http://blog.linoxide.com/wp-content/uploads/2015/03/extract.png) + +Run following command which perform the requirement check before sleuth kit installation + + #./configure + +![configure](http://blog.linoxide.com/wp-content/uploads/2015/03/configure.png) + +Make command compile the sleuth kit code. + + #make + +![make](http://blog.linoxide.com/wp-content/uploads/2015/03/make.png) + +Finally following command install it under **/usr/local** path. + + #make install + +![make install](http://blog.linoxide.com/wp-content/uploads/2015/03/make-install.png) + +### Install Autopsy Tool ### + +Sleuth kit installation is complete and now we will install autopsy interface. Download Autopsy software from [sleuthkit's autopsy page][2] . Use wget command to download it in terminal which is shown in the figure. + + # wget http://kaz.dl.sourceforge.net/project/autopsy/autopsy/2.24/autopsy-2.24.tar.gz + +![Autpsy download link](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy.png) + +Extract the autopsy-2.24.tar.gz using following command and go inside the extracted directory + + # tar -xvzf autopsy-2.24.tar.gz + +![Autopsy Extraction](http://blog.linoxide.com/wp-content/uploads/2015/03/Autopsy-extraction.png) + +Configuration script of autopsy asks for NSRL (National Software Reference Library) and path of **Evidence_Locker** folder. + +Enter "n" for NSRL prompt and create Evidence_Locker folder under **/usr/local** directory. Autopsy stores the configuration files, audit logs and output under Evidence_Locker folder. + + #mkdir /usr/local/Evidence_Locker + + #cd autopsy-2.24 + + #./configure + +![Autopsy Configuration Script](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy-configuration.png) + +After adding Evidence_Locker path in installation process , autopsy stores configuration files in it and shows a following message to run the autopsy program. + +![Start Autopsy](http://blog.linoxide.com/wp-content/uploads/2015/03/start-autopsy.png) + +Type **./autopsy** command in terminal to start the graphical interface of Sleuth kit tool. + +![Autopsy Started](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy-started.png) + +Type following address in the web browser to access the interface of autopsy . + + http://localhost:9999/autopsy + +Main web page of autopsy plugin is shown int the following figure. + +![Main Page](http://blog.linoxide.com/wp-content/uploads/2015/03/main-interface.png) + +Click on the **New Case** button to start analysis in autopsy tool. Enter the case name, description about the investigation and name of agent which is shown in the following figure. + +![create new case](http://blog.linoxide.com/wp-content/uploads/2015/03/create-new-case1.png) + +Following web page will appear after entering the details in the above page. Click on **Add Host** button to add details for the analyst machine. + +![add host](http://blog.linoxide.com/wp-content/uploads/2015/03/add-host1.png) + +Enter host name, description and time zone setting of analyst machine on the next page. + +![add host-detial](http://blog.linoxide.com/wp-content/uploads/2015/03/add-host-detial.png) + +Click on the **Add Image** button to add image file for forensics analysis. + +![add image](http://blog.linoxide.com/wp-content/uploads/2015/03/add-image.png) + +Click on the **Add Image File** button on the following web page. It opens new web page which require Path of image file and select type & importing method. + +![Add image file](http://blog.linoxide.com/wp-content/uploads/2015/03/Add-image-file.png) + +As shown in the following figure, we have entered path of Linux image file. In our case, image file is partition of disk. + +![add image parition](http://blog.linoxide.com/wp-content/uploads/2015/03/add-image-parition.png) + +Click on the next button and select **Calculate hash** option in the next page which is shown in the following figure. It also detect the file system type of the given image. + +![image and file system detail](http://blog.linoxide.com/wp-content/uploads/2015/03/image-and-file-system-detail.png) + +Following window shows the MD5 hash of the image file before static analysis . + +![hash](http://blog.linoxide.com/wp-content/uploads/2015/03/hash1.png) + +On the next web page, autopsy shows following information about the image file. + +- mount point for the image +- name of image +- file system type of given image + +Click on the **details** button to get more information about the given image file. It also offer extraction of unallocated fragments and strings from the volume of image file which is shown in the following figure. + +![Image detail](http://blog.linoxide.com/wp-content/uploads/2015/03/image-details.png) + +Click on **Analyze** button which is shown in the below figure to start analysis on given image . It opens another page which shows the multiple options for image analysis. + +![analysis](http://blog.linoxide.com/wp-content/uploads/2015/03/analysis1.png) + +Autopsy offer following features during image analysis process. + +- File Analysis +- Keyword Search +- File Type +- Image Details +- Data Unit + +File Analysis on given image of Linux partition is shown in the following figure. + +![Analysis of image](http://blog.linoxide.com/wp-content/uploads/2015/03/Analysis-of-image.png) + +It extracts all files and folders from the given image . Extraction of deleted files are shown int he figure. + +![Deleted Files](http://blog.linoxide.com/wp-content/uploads/2015/03/deleted.png) + +### Conclusion ### + +Hopefully this article will be useful for the beginner in static forensics analysis of disk image. Autopsy is web interface for sleuth kit which provides features such as extraction of strings , recovery of deleted files, timeline analysis, extraction of web surfing history, keyword search and email analysis on windows and linux disk images. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/autopsy-sleuth-kit-installation-ubuntu/ + +作者:[nido][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/naveeda/ +[1]:http://www.sleuthkit.org/sleuthkit/download.php +[2]:http://www.sleuthkit.org/autopsy/download.php \ No newline at end of file From aefbeeb6ec493aa8b4de3c4adf830a1fdd10063f Mon Sep 17 00:00:00 2001 From: LouisWei Date: Fri, 20 Mar 2015 20:58:13 +0800 Subject: [PATCH 0318/2517] translated wi-cuckoo --- ...n source software in the business world.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/translated/talk/20150309 10 best uses for open source software in the business world.md b/translated/talk/20150309 10 best uses for open source software in the business world.md index 2defa40f83..976768229b 100644 --- a/translated/talk/20150309 10 best uses for open source software in the business world.md +++ b/translated/talk/20150309 10 best uses for open source software in the business world.md @@ -22,4 +22,64 @@ ### 4: 桌面 ### +桌面是大多数宏机发生的地方。尽管如此,你必须考虑一个事实,那就是你每天的工作流程已经经历了一个主要的思维模式的转换。我们现在做的大部分事情都是通过网络浏览器。那么为什么不在桌面上部署Linux呢?不但可以能做如今要做的许多工作,而且不用遭受病毒,恶意软件和能破外系统的更新。它不完美 -- 但哪个平台敢说完美?但是它很强大,最后,还可以节省你的开支。这是一个双赢的结局。 +### 5: 工作流程 ### + +每一种工作都依赖于工作的流程。对于某些工作来说,一个流畅的工作流程又取决于所用的工具。开源已经登上这个舞台了。CRM(客户关系管理),HRM(人力资源管理),ERP(企业资源计划),BI(商业智能),BPM(业务流程管理) 。。。。。。只要你叫得出名字,开源就可以做到几乎你能想到的每一种可能的缩写 -- 并且干得不错。借助于[Pentaho][1], [Collabtive][2]和[SugarCRM][3], 开源可以在任何时候与最新的源工具保持同步。 + +### 6: 协作 ### + +没有一起合作项目的能力,你的员工就不能干好工作。所以你选择的协作工具是十分重要的。你会在开源的世界里发现大量的优质协作工具。[Cyn.in community edition][4], [Zimbra Open Source Edition][5]和[Kolab][6]都是不错的协作工具,但仅仅是开源世界里的三个代表而已。 + +### 7: 大数据 ### + +以前说道大数据的时候,往往不会想到开源。多亏了[SUSE][7]的努力,大数据和开源现在可以携手共进了。许多如内存数据和现场内核修复的创意,使得开源成为大数据一个理想的解决方案。 它可以完美地满足大数据在平台上所需的大量要求。而封闭的软件则达不到如此灵活的水平。 + +### 8: 云 ### + +云的主要玩家都是开源的。[Red Hat][8], [Ubuntu][9], [SUSE][10], [Amazon][11], [Rackspace][12] -- 他们都提供云服务,而且知道开源是云配置的最好解决方案。但是,如果你不想用大公司的服务,仍然有很多后起之秀如[OwnCloud][13],你可以选择OwnCloud的特色云方案,或者建立自己的一套。 + +### 9: 多媒体 ### + +如果你的公司为产品发布做播客或视频,开源可以为你提供服务。借助像[Audacity][14]和[OpenShot][15]这样的工具,你可以对音频和视频做你需要的任何处理 -- 而且十分的廉价。实际上,你会感觉到很难再去找到比Audacity更好的播客工具,或者比OpenShot更易用的视频编辑器。没有太大的学习壁垒,或者封闭软件工具要求的高额费用,开源的软件在帮助你创造专业水准的作品方面已经做得很好了。 #这里前一个意群不明白如何翻译 + +### 10: 电子商务 ### + +如果你做在线销售,如果不尝试一下像[PrestaShop][16]之类的工具,你会觉得很没效率的。PrestaShop是最强大的电子商务解决方案之一,易于获取 -- 不需要许可证。 PrestaShop有你可能想要的所有功能(而且有些你可能都没有想过),这个开源平台已经在任何水平上超出了电子商务的范畴。 + +### FOSS 之于商业 ### + +开源已经不再局限于商业交流的范围了。在许多情况下,FOSS已经主导这种交流。如果你已经在寻找将开源解决方案运用的领域,看上面的10条就行了。 + +### 该你了 ### + +你已经将开源用到你的工作中了吗?如果是,属于哪一条方法呢? + +------------------------------------------------------------------------------- + +via: http://www.techrepublic.com/blog/10-things/10-best-uses-for-open-source-software-in-the-business-world/ + +作者:[Jack Wallen][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.techrepublic.com/search/?a=jack+wallen +[1]:http://community.pentaho.com/ +[2]:http://collabtive.o-dyn.de/ +[3]:http://www.sugarcrm.com/ +[4]:http://cynapse.com/cyn-in/ +[5]:https://www.zimbra.com/open-source +[6]:http://kolab.org/ +[7]:http://www.suse.org/ +[8]:http://www.redhat.com/ +[9]:http://www.ubuntu.com/ +[10]:http://www.suse.com/ +[11]:http://aws.amazon.com/ec2/ +[12]:http://www.rackspace.com/cloud +[13]:https://owncloud.org/ +[14]:http://audacity.sourceforge.net/ +[15]:http://www.openshot.org/ +[16]:https://www.prestashop.com/ From 14c70aa5ddb35fb21e0f22b7d6feb695a9ce3c91 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Mar 2015 21:07:58 +0800 Subject: [PATCH 0319/2517] =?UTF-8?q?=E8=A1=A5=E5=85=85=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wi-cuckoo --- ...n source software in the business world.md | 86 ------------------- 1 file changed, 86 deletions(-) delete mode 100644 sources/talk/20150309 10 best uses for open source software in the business world.md diff --git a/sources/talk/20150309 10 best uses for open source software in the business world.md b/sources/talk/20150309 10 best uses for open source software in the business world.md deleted file mode 100644 index 5393108cde..0000000000 --- a/sources/talk/20150309 10 best uses for open source software in the business world.md +++ /dev/null @@ -1,86 +0,0 @@ -translating wi-cuckoo LLAP -10 best uses for open source software in the business world -================================================================================ -> Open source offers some compelling benefits for businesses large and small -- but you might be surprised at some of the ways it's being used. - -![](http://tr2.cbsistatic.com/hub/i/r/2015/03/05/54a9c323-4311-4455-b10b-5182548da424/resize/620x485/95164f01a19cbd7a3e4b843be78febae/foss.jpg) - -Certain inevitabilities occur in technology. For instance, open source software will make its way into your business. Ten years ago, this could easily have been called into question. Now? There's no way to avoid it -- and there's no reason to. With so many powerful (and necessary) pieces of technology, open source has become, in various cases, the savior of tech. But what areas of your business are best suited for open source? The answer to that question is, of course, will be different from one company to the next. But some applications can apply in almost every circumstance. - -Let's take a look at 10 possible best-case uses for open source software that can help make your business grow, bring you a level of flexibility and reliability you haven't experienced, or just save you a welcome percentage of your budget. - -### 1: Server software ### - -If you're still battling Microsoft's IIS platform, you need to experience Apache. The flagship open source web server software is one of the most widely used on the planet. It's free, incredibly reliable, easy to manage, and doesn't require the enormous overhead needed for IIS. But open source isn't limited to just web servers. If you need SMB sharing across your company, consider Samba. Samba 4 even integrates with Active Directory, so you don't have to worry about setting up separate user accounts on the Samba server. - -### 2: Development ### - -Developing with open source is a no-brainer. PHP, Rails, Perl -- there are as many languages to develop with as there are tools (from IDEs to bug tracking). There are a lot of options for developing for open source or with open source tools (as are there with proprietary development). The biggest difference between open source and proprietary is the access you have to the software code. Within the world of FOSS (free open source software) the code is readily available. For many developers, the Linux operating system has everything they need to develop, built right in (especially those who code without a full-blown IDE). If you do require GUI development tools, open source has you covered. - -### 3: Security ### - -The route to security is a challenging one, but there are many paths to success. You can opt for the "security in a box" solution and go with the likes of Cisco (a solid solution) or you can craft your security to perfectly fit your needs with the likes of iptables. Yes, the open source security route will take a bit more time to deploy (with a much higher learning curve), but the end results are generally incredible. This doesn't even address the idea that using open source on the desktop is, generally speaking, a more secure platform than most proprietary systems. Deploy Linux on the desktops and your security woes will drop dramatically. - -### 4: Desktops ### - -This area is where most of the pushback happens. However, you must take into consideration the fact that the daily workflow has undergone a major paradigm shift. Most of what we do now is done via a web browser. So why not deploy Linux on the desktop? Not only does it work with the majority of today's tasks, it will do so without suffering from viruses, malware, and updates that cripple a system. It's not perfect -- what platform is? But it's solid, and in the end, it can save you money. That's a win-win. - -### 5: Workflow ### - -Every business depends upon workflow. For some businesses, a smooth workflow depends upon tools. Open source has this arena covered. CRM, HRM, ERP, BI, BPM... you name it, open source handles just about every possible acronym you can think of -- and it does it very well. With the likes of [Pentaho][1], [Collabtive][2], and [SugarCRM][3], open source can keep up with closed source tools any day. - -### 6: Collaboration ### - -Without the ability to work together on projects, your staff wouldn't be able to get the job done. So the collaboration tools you choose are crucial. You'll find plenty of quality collaboration tools within the world of open source. [Cyn.in community edition][4], [Zimbra Open Source Edition][5], and [Kolab][6] are just three examples of the excellent collaboration tools that exist within the open source world. - -### 7: Big data ### - -When it comes to big data, open source can't be matched. Thanks to the likes of [SUSE][7], big data and open source now go hand in hand. Innovations like in-memory data and live kernel patching make open source an ideal solution for big data. It can be perfectly tuned to meet the massive demands big data places on the platform. Closed source software can't touch this level of flexibility. - -### 8: Cloud ### - -The major players in the cloud are open source. [Red Hat][8], [Ubuntu][9], [SUSE][10], [Amazon][11], [Rackspace][12] -- they all get it and know that open source is the best solution for cloud deployments. But if you don't want to go with the larger companies, there are always up and coming tools like [ownCloud][12], where you can either take advantage of its hosted cloud solutions or build your own. - -### 9: Multimedia ### - -If your company does podcasting or video for PR, open source has you covered. With tools like [Audacity][14] and [OpenShot][15], you can do just about anything with audio or video you need -- and do so on the cheap. In fact, you'll be hard-pressed to find a better podcasting tool than Audacity or an easier-to-use video editor than OpenShot. Both pieces of software do an outstanding job of creating professional-quality results without the steep learning curves or the high prices often associated with closed source tools - -### 10: E-commerce ### - -If your business sells products online, you'd be remiss not to give a tool like [PrestaShop][16] a try. PrestaShop is, hands down, one of the most powerful e-commerce solutions available -- regardless of license. With just about every feature you could possible want (and some you probably haven't even thought of), the open source platform excels at e-commerce on every level. - -### FOSS for business ### - -Open source is no longer hanging around the periphery of the business conversation. In many instances, FOSS leads and dominates that conversation. If you've been looking for areas to consider deploying open source solutions, look no further than these 10. - -### Your turn ### - -Have you added open source software to your business? If so, in what way? - --------------------------------------------------------------------------------- - -via: http://www.techrepublic.com/blog/10-things/10-best-uses-for-open-source-software-in-the-business-world/ - -作者:[Jack Wallen][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.techrepublic.com/search/?a=jack+wallen -[1]:http://community.pentaho.com/ -[2]:http://collabtive.o-dyn.de/ -[3]:http://www.sugarcrm.com/ -[4]:http://cynapse.com/cyn-in/ -[5]:https://www.zimbra.com/open-source -[6]:http://kolab.org/ -[7]:http://www.suse.org/ -[8]:http://www.redhat.com/ -[9]:http://www.ubuntu.com/ -[10]:http://www.suse.com/ -[11]:http://aws.amazon.com/ec2/ -[12]:http://www.rackspace.com/cloud -[13]:https://owncloud.org/ -[14]:http://audacity.sourceforge.net/ -[15]:http://www.openshot.org/ -[16]:https://www.prestashop.com/ From beba4b7d91268345b378ec17bc6f9c5a5730aeed Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Mar 2015 22:32:56 +0800 Subject: [PATCH 0320/2517] PUB:20150119 Ubuntu With XFCE vs Xubuntu Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ZhouJ-sh 翻译的很不错! --- ...50119 Ubuntu With XFCE vs Xubuntu Linux.md | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) rename {translated/share => published}/20150119 Ubuntu With XFCE vs Xubuntu Linux.md (91%) diff --git a/translated/share/20150119 Ubuntu With XFCE vs Xubuntu Linux.md b/published/20150119 Ubuntu With XFCE vs Xubuntu Linux.md similarity index 91% rename from translated/share/20150119 Ubuntu With XFCE vs Xubuntu Linux.md rename to published/20150119 Ubuntu With XFCE vs Xubuntu Linux.md index c739b3b702..f48ee95fa7 100644 --- a/translated/share/20150119 Ubuntu With XFCE vs Xubuntu Linux.md +++ b/published/20150119 Ubuntu With XFCE vs Xubuntu Linux.md @@ -1,7 +1,8 @@ -Ubuntu With XFCE vs Xubuntu Linux +Ubuntu & XFCE vs Xubuntu ========================================================= -Ubuntu vs Xubuntu。Ubuntu拥有漂亮的桌面体验以及强大的应用程序。Xubuntu轻量、快速并且可定制,哪个更适合你? +Ubuntu拥有漂亮的桌面体验以及强大的应用程序。Xubuntu轻量、快速并且可定制,哪个更适合你? + --------------------------------------------------------- ![](http://f.tqn.com/y/linux/1/W/T/J/1/ubuntudesktop.png) @@ -10,11 +11,11 @@ Ubuntu vs Xubuntu。Ubuntu拥有漂亮的桌面体验以及强大的应用程序 并且,我同时也会在这篇文章中介绍Ubuntu用户如何获取基本的XFCE桌面,以及如何安装完整的Xubuntu桌面。 -[Ubuntu][1]以及[Xubuntu][2]是针对不同目的开发的操作系统,为什么我会强调这一点,是为了说明什么时候或者为什么你应该使用Ubuntu以及什么时候应该使用Xubuntu。 +[Ubuntu][1]以及[Xubuntu][2]是针对不同目的开发的操作系统,为什么我会强调这一点,是为了说明什么时候或者为什么你应该使用Ubuntu或Xubuntu。 比较这两个操作系统就像比较[劳斯莱斯][3]与[保时捷][4]。这两个都是很棒的车,但是如果把劳斯莱斯给一个赛车迷,他们也许会卖掉它买个其他的车,同样,如果把保时捷给舒格勋爵或者休·海夫纳这类人可能也不那么合适。 -Ubuntu拥有一个适用性很强的桌面环境,叫做Unity,并且默认会安装一些很棒的Linux应用程序,包括Rhythmbox以及[LibreOffic][5]。Ubuntu就像是劳斯莱斯。它为舒适而生,并且尽可能的提供从A到B的最时髦的方法。 +Ubuntu拥有一个适用性很强的桌面环境,叫做Unity,并且默认会安装一些很棒的Linux应用程序,包括Rhythmbox以及[LibreOffic][5]。Ubuntu就像是劳斯莱斯。它为舒适而生,并且尽可能的提供满足需要的漂亮的解决方案。 作为一个Ubuntu用户,就像汽车里面的乘客。你在到达目的地的过程中就可以同时把事情搞定,并且所有的事看起来都很漂亮并且很简单。 @@ -92,7 +93,7 @@ Xubuntu就像一个改装过的跑车。你可以把它改装成任何你想要 接下来,我会使用命令行工具[apt-get][7]介绍在Ubuntu安装XFCE桌面的方法。 -打开一个终端窗口,在Unity环境,你可以在[Dash][8]中搜索“TERM”,或者使用组合键 CTRL+ALT+T。 +打开一个终端窗口,在Unity环境,你可以在[Dash][8]中搜索“TERM”,或者使用组合键 `CTRL+ALT+T`。 安装XFCE桌面十分简单,输入下列命令就可以了: @@ -105,7 +106,7 @@ Xubuntu就像一个改装过的跑车。你可以把它改装成任何你想要 系统会显示一个消息,提示你是否使用默认的面板布局或者使用单独的面板。 -[最新版本的Xubuntu][10]在顶部包含一个单独的面板,不过我更喜欢两个面板,顶部一个标准面板,底部一个常用程序的停靠面板。 +[最新版本的Xubuntu][10]在顶部包含一个单独的面板,不过我更喜欢双面板,顶部一个标准面板,底部一个常用程序的停靠面板。 需要注意的是,XFCE桌面菜单系统和Xubuntu的菜单有些差异,除非你安装[一个更好的菜单系统][11],设置两个面板或许是个更好的选择。 @@ -117,7 +118,7 @@ Xubuntu就像一个改装过的跑车。你可以把它改装成任何你想要 如果你想全都使用Xubuntu的东西,但是又不想按照那些介绍重新安装系统的话,看看下面的东西。 -通过搜索“TERM”,或者组合键CTRL+ALT+T,打开一个终端窗口。 +通过搜索“TERM”,或者组合键`CTRL+ALT+T`,打开一个终端窗口。 在终端输入如下命令: @@ -132,16 +133,17 @@ Xubuntu就像一个改装过的跑车。你可以把它改装成任何你想要 Xubuntu桌面就会显示出来啦。 -这里会有一些差异。菜单仍然是XFCE菜单,而不是Xubuntu菜单。某些图标也不会出现在顶部面板中。但是这些问题都不足以让我们花时间卸载Ubuntu然后重装Xubuntu。 +这里会有一些差异。菜单仍然是XFCE菜单,而不是Xubuntu菜单。某些图标也不会出现在顶部面板中。但是这些小问题都不足以让我们花时间卸载Ubuntu然后重装Xubuntu。 下一篇文章中,我会介绍如何自定义Xubuntu以及XFCE桌面。 +----- via : http://linux.about.com/od/dist/fl/Ubuntu-With-XFCE-vs-Xubuntu-Linux.htm 作者:[Gary Newell][a] 译者:[zhouj-sh](https://github.com/Zhouj-sh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 838f2de9fd610e0a344ba8a13dd3ddd8d1b7b458 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Mar 2015 23:09:38 +0800 Subject: [PATCH 0321/2517] PUB:20150209 How to back up a Debian system using backupninja @FSSlc --- ...ck up a Debian system using backupninja.md | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) rename {translated/tech => published}/20150209 How to back up a Debian system using backupninja.md (53%) diff --git a/translated/tech/20150209 How to back up a Debian system using backupninja.md b/published/20150209 How to back up a Debian system using backupninja.md similarity index 53% rename from translated/tech/20150209 How to back up a Debian system using backupninja.md rename to published/20150209 How to back up a Debian system using backupninja.md index b58baa3bdc..33e95473af 100644 --- a/translated/tech/20150209 How to back up a Debian system using backupninja.md +++ b/published/20150209 How to back up a Debian system using backupninja.md @@ -1,10 +1,10 @@ -如何使用 backupninja 来备份一个 Debian 系统 +如何使用 backupninja 来备份 Debian 系统 ================================================================================ -面临灾难时的小心谨慎或体验可以教会每一个系统管理采取频繁的系统备份的重要性。你可以通过编写存在已久的管用的 shell 脚本,或使用一个(或多个) 适合这项工作的备份工具来完成备份任务。因此,当你要实施一个备份解决方案时,你了解的备份工具越多,你做出的决策就会越明智。 +小心谨慎或灾难体验会让每一个系统管理都认识到频繁的系统备份的重要性。你可以通过编写管用的旧式 shell 脚本,或使用一个(或几个)适合这项工作的备份工具来完成备份任务。因此,当你要实施一个备份解决方案时,你了解的备份工具越多,你做出的决策就会越明智。 -在这篇文章中,我们将为你介绍 [backupninja][2] ,一个轻量且易于配置的系统备份工具。在诸如 **rdiff-backup**, **duplicity**, **mysqlhotcopy** 和 **mysqldump** 等程序的帮助下, Backupninja 可以提供常用的备份功能,如执行远程的、安全的和增量式的文件系统备份,加密备份以及 MySQL/MariaDB 数据库备份。你可以选择性地开启使用 email 进行状态报告功能,也可以对一般的硬件和系统的信息进行备份。 backupninja 的一个关键功能是它拥有一个内建的基于控制台的向导程序(被称为 **ninjahelper**),而后者允许你为不同的备份情景轻松地创建配置文件。 +在这篇文章中,我们将为你介绍 [backupninja][2] ,这是一个轻量且易于配置的系统备份工具。在诸如 **rdiff-backup**, **duplicity**, **mysqlhotcopy** 和 **mysqldump** 等程序的帮助下, Backupninja 可以提供常用的备份功能,如执行远程的、安全的和增量式的文件系统备份,加密备份以及 MySQL/MariaDB 数据库备份。你可以选择性地开启使用 Email 状态报告功能,也可以对一般的硬件和系统的信息进行备份。 backupninja 的一个关键功能是它拥有一个内建的基于控制台的向导程序(被称为 **ninjahelper**),而后者允许你为不同的备份情景轻松地创建配置文件。 -如果非要说的话,backupninja 的缺点是:为了充分使用其所有的功能,它要求一些其他“助手”程序已经被安装在了计算机中。尽管 backupninja 有针对基于 Red Hat(红帽) 的发行版本的 RPM 安装包,但 backupninja 针对 Debian 和它的衍生发行版本的依赖进行了优化。所以不建议在基于 Red Hat 的系统上尝试 backupninja 。 +如果非要说的话,backupninja 的缺点是:为了充分使用其所有的功能,它要求安装一些其他“助手”程序。尽管 backupninja 有针对基于 Red Hat(红帽)的发行版本的 RPM 安装包,但 backupninja 针对 Debian 及其衍生发行版本的依赖进行了优化。所以不建议在基于 Red Hat 的系统上尝试 backupninja 。 在这篇教程中,我们将介绍如何在基于 Debian 的发行版本上安装 backupninja 。 @@ -16,17 +16,17 @@ 在安装的过程中,有几个文件和目录将被创建: -- **/usr/sbin/backupninja** 是 bash shell 主脚本; -- **/etc/cron.d/backupninja**, 默认情况下,构建 cron 任务来每隔一个小时运行上面的主脚本; -- **/etc/logrotate.d/backupninja** 处理由 backupninja 程序产生的日志;(注:我不知道这里的 rotate 该如何翻译) +- **/usr/sbin/backupninja** 是个 bash shell 的主脚本; +- **/etc/cron.d/backupninja**, 默认情况下,设置 cron 任务来每隔一个小时运行上面的主脚本; +- **/etc/logrotate.d/backupninja** 截断由 backupninja 程序产生的日志; - **/etc/backup.d/** 是备份操作的配置文件驻留的目录; - **/etc/backupninja.conf** 是包含一般选项的主配置文件。这个文件带有良好的注释且详细解释了每个选项的含义; -- **/usr/share/backupninja** 是那些被 backupninja 使用的脚本所处的目录。这些脚本文件负责执行实际的工作。在这个目录中,你还可以找到 `.helper` 文件,它们可以被用来配置和设定 ninjahelper 的菜单; -- **/usr/share/doc/backupninja/examples** 含有操作配置文件(即通过 ninjahelper 产生的文件)的模板。 +- **/usr/share/backupninja** 是那些 backupninja 所使用的脚本所处的目录。这些脚本文件负责执行实际的工作。在这个目录中,你还可以找到 `.helper` 文件,它们可以被用来配置和设定 ninjahelper 的菜单; +- **/usr/share/doc/backupninja/examples** 含有操作配置文件(即通过 ninjahelper 产生的文件)的模板。 ### 首次运行 Ninjahelper ### -当我们尝试启动 ninjahelper 时,我们可以看到一个内部依赖可能会被需要。假如系统进行了提示,请输入 “yes” 并敲下回车键来安装 dialog(一个用于从 shell 脚本中显示友好对话框的工具)。 +当我们尝试启动 ninjahelper 时,我们可以看到可能需要一个内部依赖程序。假如系统进行了提示,请输入 “yes” 并敲下回车键来安装 dialog(一个用于从 shell 脚本中显示友好对话框的工具)。 ![](https://farm8.staticflickr.com/7537/15700597667_6618fbc142_z.jpg) @@ -44,11 +44,11 @@ ![](https://farm8.staticflickr.com/7508/15700315139_4c6117ef32_z.jpg) -接下来的一步需要你选取相关条目来作为此次备份任务的一部分。前四个条目已经默认被选上了,但你可以通过按空格键来撤消选择。 +接下来的一步需要你选取相关条目来作为此次备份任务的一部分。前四个条目已经默认被选上了,但你可以通过在条目上按空格键来撤消选择。 ![](https://farm8.staticflickr.com/7507/15699051870_65abaf52e5_z.jpg) -一旦你完成了上面的步骤,按 OK 选项来继续。接着你将能够选择 是愿意使用默认的配置文件(/etc/backup.d/10.sys)来完成这次备份操作,还是创建一个新的配置文件。若为后者,一个含有与默认配置文件内容相同的文件将会在相同的目录下被创建,但它被命名为 11.sys,后续的备份操作将会创建类似的文件(注:只不过命名的序号不同)。需要说明的是一旦这个新的配置文件被创建,你便可以使用你喜爱的文本编辑器来编辑该文件。 +一旦你完成了上面的步骤,按 OK 选项来继续。接着你将能够选择是愿意使用默认的配置文件(/etc/backup.d/10.sys)来完成这次备份操作,还是创建一个新的配置文件。若为后者,一个含有与默认配置文件内容相同的文件将会在相同的目录下被创建,但它被命名为 11.sys,后续的备份操作将会创建类似的文件(注:只不过命名的序号不同)。需要说明的是一旦这个新的配置文件被创建,你便可以使用你喜爱的文本编辑器来编辑该文件。 ![](https://farm9.staticflickr.com/8654/15885715072_1e6126e929_o.png) @@ -56,7 +56,7 @@ 正如你最有可能知道的那样, rsync 被广泛地用于通过网络同步文件或文件夹。在接下来的例子中,我们将讨论一个使用硬链接来为一个远程目录做增量式拉取备份的方法,它被用来保存历史数据以及在我们本地的文件服务器中恢复这些历史数据。这个方法将帮助我们节省空间并增强位于服务器端的安全性。 -**步骤 1**:编写一个位于 `/etc/backup.d`的带有如下内容的自定义脚本,并将它的权限设置为 600 。需要说明的是,除了一般的配置文件,这个目录可能还包含当 backupninja 被执行时你想运行的一些脚本文件,它们可以发挥出位于主配置文件中的变量的优势。 +**步骤 1**:编写一个带有如下内容的自定义脚本,放在 `/etc/backup.d`,并将它的权限设置为 600 。需要说明的是,除了一般的配置文件,这个目录可能还包含当 backupninja 执行时你想运行的一些脚本文件,它们可以发挥出位于主配置文件中的变量的优势。 # REMOTE USER user=root @@ -72,36 +72,37 @@ # RSYNC rsync -av --delete --recursive --link-dest=$localdirold $user@$host:$remotedir $localdir -在上面的配置中, rsync 的 ‘--link-dest’ 选项的作用是为位于 $localdir-old 目录中那些没有改变的文件(包含所有属性) 硬链接到目标目录 ($localdir)。 +在上面的配置中, rsync 的 ‘--link-dest’ 选项的作用是为位于 $localdir-old 目录中那些没有改变的文件(包含所有属性) 硬链接到目标目录($localdir)。 -**步骤 2**:在 backupninja 第一次运行之前,上层目录(这个例子中指的是 /home/gacanepa) 是空的。第一次我们执行下面的命令: +**步骤 2**:在 backupninja 第一次运行之前,上层目录(这个例子中指的是 /home/gacanepa) 是空的。第一次我们执行下面的命令: # backupninja -n backup.0 目录就被创建了,并在接下来的过程中,它的名称将会被更改为 backup.1。 -当我们第二次运行 backupninja 时, backup.0 将会被重新创建,而 backup.1 被保留。 +当我们第二次运行 backupninja 时, backup.0 将会被重新创建,而 backup.1 保持不动。 ![](https://farm8.staticflickr.com/7581/15700597497_0e0cd89ab9.jpg) -**步骤 3**: 确保 backup.1 里面的文件硬链接到 backup.0 里的文件,我们可以通过比较文件的 inode( i 节点) 数和目录的大小来达到此目的。 +**步骤 3**: 确保 backup.1 里面的文件硬链接到 backup.0 里的文件,我们可以通过比较文件的 inode(i 节点)数和目录的大小来达到此目的。 ![](https://farm9.staticflickr.com/8636/15700315029_e922ce771b.jpg) ### 总结 ### -Backupninja 不仅是一个经典的备份工具,它也是一个易于配置的实用程序。你可以通过编写你自己的 handler(注:我不知道该如何翻译 handler 这个单词) 来运行 backupninja 并将它们作为位于 `/etc.backup.d` 的个人配置文件。甚至你还可以为 ninjahelper 编写助手程序,以达到将它们包括在 ninjahelper 的主界面上。 +Backupninja 不仅是一个经典的备份工具,它也是一个易于配置的实用程序。你可以通过编写你自己的控制脚本,用放在 `/etc.backup.d` 中的不同的配置文件来运行 backupninja 。甚至你还可以为 ninjahelper 编写助手程序,并将其包括在 ninjahelper 的主界面上。 -例如,假如你在 `/usr/share/backupninja`目录中创建了一个名为 modulo 的 handler,它将自动运行那些位于 `/etc/backup.d` 目录中以 .xmodulo 为后缀的每个文件。如果你决定添加你的 xmodulo handler 到 ninjahelper 中, 你可以编写相应的助手程序,即 xmodulo.helper 。另外,假如你想 让 backupninja 运行任意一个脚本,只需把它添加到 `/etc/backup.d` 目录中,这样你的目的便可以达到了。 +例如,假如你在 `/usr/share/backupninja`目录中创建了一个名为 xmodulo 的控制脚本,它将自动运行那些位于 `/etc/backup.d` 目录中以 .xmodulo 为后缀的每个文件。如果你决定添加你的 xmodulo 控制脚本到 ninjahelper 中, 你可以编写相应的助手程序,即 xmodulo.helper 。另外,假如你想 让 backupninja 运行其它的脚本,只需把它添加到 `/etc/backup.d` 目录中就可以了。 欢迎使用下面的评论框来留下你的评论、问题或建议。听到你的回应将会使我们很高兴。 + -------------------------------------------------------------------------------- via: http://xmodulo.com/backup-debian-system-backupninja.html 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 5d36c785f206a21b594dc73e57bcde915219d51b Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Mar 2015 23:58:25 +0800 Subject: [PATCH 0322/2517] PUB:20150104 How to set up a cross-platform backup server on Linux with BackupPC @FSSlc --- ...rm backup server on Linux with BackupPC.md | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) rename {translated/tech => published}/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md (56%) diff --git a/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md b/published/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md similarity index 56% rename from translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md rename to published/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md index 9dd434a809..24daaf3424 100644 --- a/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md +++ b/published/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md @@ -1,12 +1,12 @@ -如何在 Linux 上使用 BackupPC 来设置一个跨平台的备份服务器 +如何在 Linux 上使用 BackupPC 来架设跨平台的备份服务器 ================================================================================ -为了防止你不能分辨这篇教程和我先前关于[backupninja][1] 和 [backup-manager][2] 的帖子,=== 我是一个积极的备份迷。当提到备份,我宁愿备份的太多而不希望备份不足,因为如果我们有需要的话,你将会感激你花费了时间和精力来为你的重要数据生成额外的拷贝。 +也许你没有从我先前关于 [backupninja][1] 和 [backup-manager][2] 的两篇文章中发现,我是一个超级备“粉”。当提到备份,我宁愿备份的太多而不希望备份不足,因为如果我们有需要的话,你将会感激你为重要数据生成额外的拷贝所付出的时间和精力。 -在这篇帖子中,我将向你介绍 [BackupPC][3],一个跨平台的备份服务器软件,它可以通过网络为 Linux,Windows 和 MacOS 等系统上的客户端主机拉取备份。BackupPC 添加了一系列的特点使得管理备份变为一件快乐的事。 +在这篇文章中,我将向你介绍 [BackupPC][3],一个跨平台的备份服务器软件,它可以通过网络为 Linux,Windows 和 MacOS 等系统上的客户端主机拉取备份。BackupPC 添加了一系列的特点使得管理备份变为一件快乐的事。 ### BackupPC 的特点 ### -BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收集和管理其他远程客户端主机上的备份。通过使用它的 Web 界面,你可以检查日志和配置文件、为其他远程主机启动/取消/安排备份任务以及可视化备份任务的当前状态。你也可以非常容易地浏览归档的文件以及从备份的归档中恢复个人文件或整个作业。为了恢复单一的个人文件,你可以直接通过 Web 界面来下载任何先前备份的文件。若如这还不够,针对客户端主机,没有特别的客户端软件需要安装。在 Windows 客户端上, 本机 SMB 协议将被使用,而对于 *nix 客户端,你将使用 `rsync` 或 通过 SSH, RSH 或 NFS 来使用 `tar` 。 +BackupPC 自带有一个健壮的 Web 界面,允许你以集中化的方式来收集和管理其他远程客户端主机上的备份。通过使用它的 Web 界面,你可以检查日志和配置文件、为其他远程主机启动/取消/安排备份任务以及可视化备份任务的当前状态。你也可以非常容易地浏览归档的文件以及从备份的归档中恢复单个文件或整个备份。要恢复单个文件,你可以直接通过 Web 界面来下载任何先前备份的文件。不仅如此,客户端主机并不需要安装特别的客户端软件。在 Windows 客户端上, 使用的是原生的 SMB 协议,而对于 *nix 客户端,你将使用 `rsync` 或 通过 SSH, RSH 或 NFS 来使用 `tar` 。 ### 安装 BackupPC ### @@ -20,13 +20,13 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 # yum install BackupPC -同往常一样,这两种包管理系统都会自动地对依赖问题进行解决。另外,作为安装过程中的一部分,你可能会被要求去配置或重新配置用于图形用户界面的 Web 服务器。下面的截图来自于 Debian 系统: +同往常一样,这两种包管理系统都会自动解决依赖问题。另外,作为安装过程中的一部分,你可能需要新配置或修改配置用于图形用户界面的 Web 服务器。下面的截图来自于 Debian 系统: ![](https://farm8.staticflickr.com/7573/16163781711_6218b620ef_c.jpg) 通过空格键来确定你的选择,然后使用 tab 键移动到 Ok 选项并敲回车键。 -接着类似于下面的截屏将会呈现在你眼前,通知你一个用来管理 BackupPC 的名为 ‘backuppc’的管理员用户以及相应的密码(这个密码可以在以后被更改,如果你希望的话)已经被创建。这里需要注意的是:同样名为 ‘backuppc’的一个 HTTP 账户和一个常规的 Linux 账户将会被创建,它们使用同一个密码。需要前者的目的是来访问受保护的 BackupPC 的 Web 界面,而后者则是为了通过 SSH 来使用 `rsync` 来执行备份任务。 +接着类似于下面的截屏将会呈现在你眼前,通知你创建了一个用来管理 BackupPC 的名为 ‘backuppc’的管理员用户以及相应的密码(如果你需要,这个密码以后可以更改)。这里需要注意的是:这里创建了同样名为 ‘backuppc’的 HTTP 账户和常规的 Linux 账户,它们使用相同的密码。需要前者的目的是来访问受保护的 BackupPC 的 Web 界面,而后者则是为了通过 SSH 来使用 `rsync` 来执行备份任务。 ![](https://farm8.staticflickr.com/7579/15979622809_25e734658d_c.jpg) @@ -42,7 +42,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ### 启动 BackupPC 并设置备份 ### -首先,打开一个浏览器窗口并指向 http:///backuppc/ 。当弹出提示框时,输入先前向你提供的默认 HTTP 用户凭据(注:即用户名 backuppc 和相应的默认密码)。假如认证成功,你就会被带入到 Web 界面的主页: +首先,打开一个浏览器窗口并指向 http://\<服务器名称或 IP 地址>/backuppc/ 。当弹出提示框时,输入先前向你创建的默认 HTTP 用户凭据(注:即用户名 backuppc 和相应的默认密码)。假如认证成功,你就会被带入到 Web 界面的主页: ![](https://farm9.staticflickr.com/8601/15543330314_f6fdaa235e_z.jpg) @@ -51,9 +51,9 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 - Host #1: CentOS 7 [IP 192.168.0.17] - Host #2: Windows 7 [IP 192.168.0.103] -我们将通过 SSH 使用 `rsync`来备份 CentOS 主机,使用 SMB 来备份 Windows 主机。在执行备份之前,我们需要向我们的 CentOS 主机设置 [基于密码认证][7](注:这里我不知如何翻译,根据链接,感觉是无需密码来连接主机)以及在我们的 Windows 主机中设置一个共享目录。 +我们将通过 SSH 使用 `rsync`来备份 CentOS 主机,使用 SMB 来备份 Windows 主机。在执行备份之前,我们需要向我们的 CentOS 主机设置 [基于密钥认证][7] 以及在我们的 Windows 主机中设置一个共享目录。 -下面是关于如何为一个远程 CentOS 主机设置 key-based authentication 的指导。我们创建 ‘backuppc’ 用户的 RSA 密钥对,并向 CentOS 主机上的 root 账户传递它的公共密钥。 +下面是关于如何为一个远程 CentOS 主机设置基于密钥认证的指导。我们创建 ‘backuppc’ 用户的 RSA 密钥对,并将其公钥传输给 CentOS 主机上的 root 账户。 # usermod -s /bin/bash backuppc # su - backuppc @@ -64,13 +64,13 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ![](https://farm8.staticflickr.com/7496/16164929932_8fc817125d_b.jpg) -你需要一个远程的 CentOS 主机的 root 权限来在该主机中的文件系统中发放写权限,以防要恢复的备份文件或目录的所有者为 root 账户。 +你需要一个远程的 CentOS 主机的 root 权限,以获得在该主机中的文件系统中写权限,以防要恢复的备份文件或目录的所有者为 root 账户。 一旦 CentOS 和 Windows 主机都准备完毕,使用 Web 界面将它们添加到 BackupPC: ![](https://farm9.staticflickr.com/8586/15979622709_76c2dcf68c_z.jpg) -下一步的内容由更改每个主机的备份设置组成: +下一步更改每个主机的备份设置: ![](https://farm8.staticflickr.com/7461/16163781611_765c147f9f_z.jpg) @@ -88,7 +88,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ![](https://farm8.staticflickr.com/7536/15978247428_458c023f4c.jpg) -在任何时候,你都可以通过点击如上图展示的每个主机的备份主页来查看备份任务的状态。假如因为某些原因备份失败,在主机菜单中将会出现一个指向包含错误信息的网页的链接。当一个备份任务被成功地完成,一个被命名为主机名或 IP 地址的目录将会在服务器的 /var/lib/backuppc/pc 目录下被创建。 +在任何时候,你都可以通过点击如上图展示的每个主机的备份主页来查看备份任务的状态。假如因为某些原因备份失败,在主机菜单中将会出现一个指向包含错误信息的网页的链接。当一个备份任务成功完成后,在服务器的 /var/lib/backuppc/pc 目录下会创建一个命名为主机名或 IP 地址的目录。 ![](https://farm8.staticflickr.com/7549/16165680115_196ee42a49_z.jpg) @@ -96,7 +96,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ### 恢复备份 ### -为了浏览已经保存过的文件。进入每个主机的主菜单下的 “浏览备份”选项,你可以一目了然地看到目录和文件,并选择那些你想恢复的文件。另外,你还可以通过点击文件来使用默认程序打开文件或右击文件并选择“另存为”来下载该文件到你正在工作的机器上: +要浏览这些保存的文件,进入每个主机的主菜单下的 “浏览备份”选项,你可以一目了然地看到目录和文件,并选择那些你想恢复的文件。另外,你还可以通过点击文件来使用默认程序打开文件或右击文件并选择“另存为”来下载该文件到你当前的机器上: ![](https://farm8.staticflickr.com/7506/16165680105_bd5883e0da_c.jpg) @@ -113,21 +113,22 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 有句俗话说,"越简单,越好",而这正是 BackupPC 所提供的东西。在 BackupPC 中,你将不仅找到了一个备份工具,而且还找到了一个无需任何客户端应用来在几个不同的操作系统中管理你的备份的方法。我相信这就有足够的理由让你去尝试一下。 欢迎使用下面的评论框来留下你的评论和问题,假如你有的话。我总是乐于听取读者想说的话! + -------------------------------------------------------------------------------- via: http://xmodulo.com/backuppc-cross-platform-backup-server-linux.html 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/gabriel -[1]:http://xmodulo.com/backup-debian-system-backupninja.html -[2]:http://xmodulo.com/linux-backup-manager.html +[1]:http://linux.cn/article-5096-1.html +[2]:http://linux.cn/article-4586-1.html [3]:http://backuppc.sourceforge.net/ -[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[5]:http://ask.xmodulo.com/enable-nux-dextop-repository-centos-rhel.html +[4]:http://linux.cn/article-2324-1.html +[5]:http://linux.cn/article-3889-1.html [6]:http://xmodulo.com/recommend/linuxguide [7]:http://xmodulo.com/how-to-enable-ssh-login-without.html From c71cc70bf2ea8b9724b8c91ee0a47f65405acdbe Mon Sep 17 00:00:00 2001 From: LouisWei Date: Sat, 21 Mar 2015 12:19:20 +0800 Subject: [PATCH 0323/2517] translating wi-cuckoo --- ...20150318 Install And Use 'Go For It!' To Do App In Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md b/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md index d994409438..f09b6b03b2 100644 --- a/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md +++ b/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md @@ -1,3 +1,4 @@ +translating wi-cuckoo LLAP Install And Use ‘Go For It!’ To Do App In Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_For_It_TODO_Linux.jpeg) @@ -90,4 +91,4 @@ via: http://itsfoss.com/go-for-it-to-do-app-in-linux/ [8]:http://manuel-kehl.de/projects/go-for-it/download-windows-version/ [9]:http://todotxt.com/ [10]:https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en -[11]:http://itsfoss.com/install-latex-ubuntu-1404/ \ No newline at end of file +[11]:http://itsfoss.com/install-latex-ubuntu-1404/ From c78d944ea8dd8f46ae558e035a6496bef57223da Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 21 Mar 2015 17:36:19 +0800 Subject: [PATCH 0324/2517] translating --- sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md b/sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md index 37e5255b30..ce77ec963f 100644 --- a/sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md +++ b/sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md @@ -1,3 +1,5 @@ +Translating----geekpi + Install Mate desktop in FreeBSD 10.1 ================================================================================ ![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/FreeBSD-790x494.jpg) @@ -58,4 +60,4 @@ via: http://www.unixmen.com/install-mate-desktop-freebsd-10-1/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/pirat9/ \ No newline at end of file +[a]:http://www.unixmen.com/author/pirat9/ From f90c1ab4d7e7e8c4c296260fdaa231ee89425e70 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 21 Mar 2015 17:43:10 +0800 Subject: [PATCH 0325/2517] PUB:20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS @geekpi --- ...a Web Crawling Tool in Ubuntu 14.04 LTS.md | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) rename {translated/tech => published}/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md (80%) diff --git a/translated/tech/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md b/published/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md similarity index 80% rename from translated/tech/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md rename to published/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md index 672548853b..6ab4241c76 100644 --- a/translated/tech/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md +++ b/published/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md @@ -1,4 +1,4 @@ -如何在Ubuntu 14.04 LTS安装网络爬虫工具 +如何在Ubuntu 14.04 LTS安装网络爬虫工具:Scrapy ================================================================================ 这是一款提取网站数据的开源工具。Scrapy框架用Python开发而成,它使抓取工作又快又简单,且可扩展。我们已经在virtual box中创建一台虚拟机(VM)并且在上面安装了Ubuntu 14.04 LTS。 @@ -6,13 +6,13 @@ Scrapy依赖于Python、开发库和pip。Python最新的版本已经在Ubuntu上预装了。因此我们在安装Scrapy之前只需安装pip和python开发库就可以了。 -pip是作为python包索引器easy_install的替代品。用于安装和管理Python包。pip包的安装可见图 1。 +pip是作为python包索引器easy_install的替代品,用于安装和管理Python包。pip包的安装可见图 1。 sudo apt-get install python-pip ![Fig:1 Pip installation](http://blog.linoxide.com/wp-content/uploads/2014/11/f1.png) -图:1 pip安装 +*图:1 pip安装* 我们必须要用下面的命令安装python开发库。如果包没有安装那么就会在安装scrapy框架的时候报关于python.h头文件的错误。 @@ -20,42 +20,41 @@ pip是作为python包索引器easy_install的替代品。用于安装和管理Py ![Fig:2 Python Developer Libraries](http://blog.linoxide.com/wp-content/uploads/2014/11/f2.png) -图:2 Python 开发库 +*图:2 Python 开发库* -scrapy框架即可从deb包安装也可以从源码安装。然而在图3中我们已经用pip(Python 包管理器)安装了deb包了。 +scrapy框架既可从deb包安装也可以从源码安装。在图3中我们用pip(Python 包管理器)安装了deb包了。 sudo pip install scrapy ![Fig:3 Scrapy Installation](http://blog.linoxide.com/wp-content/uploads/2014/11/f3.png) -图:3 Scrapy 安装 +*图:3 Scrapy 安装* 图4中scrapy的成功安装需要一些时间。 ![Fig:4 Successful installation of Scrapy Framework](http://blog.linoxide.com/wp-content/uploads/2014/11/f4.png) -图:4 成功安装Scrapy框架 +*图:4 成功安装Scrapy框架* ### 使用scrapy框架提取数据 ### -**(基础教程)** +####基础教程#### -我们将用scrapy从fatwallet.com上提取店名(提供卡的店)。首先,我们使用下面的命令新建一个scrapy项目“store name”, 见图5。 +我们将用scrapy从fatwallet.com上提取商店名称(卖卡的店)。首先,我们使用下面的命令新建一个scrapy项目“store name”, 见图5。 $sudo scrapy startproject store_name ![Fig:5 Creation of new project in Scrapy Framework](http://blog.linoxide.com/wp-content/uploads/2014/11/f5.png) -图:5 Scrapy框架新建项目 +*图:5 Scrapy框架新建项目* -Above command creates a directory with title “store_name” at current path. This main directory of the project contains files/folders which are shown in the following Figure 6. 上面的命令在当前路径创建了一个“store_name”的目录。项目主目录下包含的文件/文件夹见图6。 $sudo ls –lR store_name ![Fig:6 Contents of store_name project.](http://blog.linoxide.com/wp-content/uploads/2014/11/f6.png) -图:6 store_name项目的内容 +*图:6 store_name项目的内容* 每个文件/文件夹的概要如下: @@ -66,13 +65,13 @@ Above command creates a directory with title “store_name” at current path. T - store_name/settings.py 是项目的配置文件 - store_name/spiders/, 包含了用于爬取的蜘蛛 -由于我们要从fatwallet.com上如提取店名,因此我们如下修改文件。 +由于我们要从fatwallet.com上如提取店名,因此我们如下修改文件(LCTT 译注:这里没说明是哪个文件,译者认为应该是 items.py)。 import scrapy class StoreNameItem(scrapy.Item): - name = scrapy.Field() # extract the names of Cards store + name = scrapy.Field() # 取出卡片商店的名称 之后我们要在项目的store_name/spiders/文件夹下写一个新的蜘蛛。蜘蛛是一个python类,它包含了下面几个必须的属性: @@ -80,7 +79,7 @@ Above command creates a directory with title “store_name” at current path. T 2. 爬取起点url (start_urls) 3. 包含了从响应中提取需要内容相应的正则表达式的解析方法。解析方法对爬虫而言很重要。 -我们在store_name/spiders/目录下创建了“store_name.py”爬虫,并添加如下的代码来从fatwallet.com上提取点名。爬虫的输出到文件(**StoreName.txt**)中,见图7。 +我们在store_name/spiders/目录下创建了“store_name.py”爬虫,并添加如下的代码来从fatwallet.com上提取店名。爬虫的输出写到文件(**StoreName.txt**)中,见图7。 from scrapy.selector import Selector from scrapy.spider import BaseSpider @@ -113,7 +112,7 @@ Above command creates a directory with title “store_name” at current path. T ![Fig:7 Output of the Spider code .](http://blog.linoxide.com/wp-content/uploads/2014/11/f7.png) -图:7 爬虫的输出 +*图:7 爬虫的输出* *注意: 本教程的目的仅用于理解scrapy框架* @@ -123,7 +122,7 @@ via: http://linoxide.com/ubuntu-how-to/scrapy-install-ubuntu/ 作者:[nido][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1e0c467871166824612e10fe27fedbe6095fed80 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 21 Mar 2015 17:44:55 +0800 Subject: [PATCH 0326/2517] translated --- ...16 Install Mate desktop in FreeBSD 10.1.md | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) rename {sources => translated}/tech/20150316 Install Mate desktop in FreeBSD 10.1.md (56%) diff --git a/sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md b/translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md similarity index 56% rename from sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md rename to translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md index ce77ec963f..76d05da5ab 100644 --- a/sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md +++ b/translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md @@ -1,61 +1,59 @@ -Translating----geekpi - -Install Mate desktop in FreeBSD 10.1 +在FreeBSD 10.1中安装Mate桌面 ================================================================================ ![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/FreeBSD-790x494.jpg) -FreeBSD is fully text mode system, however some times new users might want to use GUI desktop environment. This tutorial will help you to install Mate Desktop in Freebsd 10.1. +FreeBSD是全文本模式的系统,然而有些新用户想要使用GUI桌面环境。这个教程就是帮助你在Freebsd 10.1中安装Mate桌面。 -Here is my test system details: +下面是我的系统细节: root@Freebsd-unixmen:~ # uname -a FreeBSD Freebsd-unixmen 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 root@Freebsd-unixmen:~ -To start installing Mate desktop in FreeBSD 10.1, the following steps can be used. +要在FreeBSD 10.1 中开始安装Mate桌面,按照下面的步骤。 pkg install xf86-video-fbdev mate-desktop mate xorg -### Add the following lines to /etc/rc.conf ### +### 在 /etc/rc.conf 中加入下面的行 ### moused_enable="YES" dbus_enable="YES" hald_enable="YES" -### Test the installation. ### +### 测试安装 ### xinit mate-session ![](http://www.unixmen.com/wp-content/uploads/2015/03/snapshot2.png) -Mate doesn’t have a display manager of its own. Hence we can use any other display managers like XDM, GDM, slim etc to use the login manager. Here let’s see how to configure Slim DM with Mate desktop. +Mate本身没有显示管理器。因此我们会使用其他的显示管理器如XDM、GDM、slim等等来作为登录管理器。这里让我们看看如何在Mate桌面中配置Slim DM -### Install Slim ### +### 安装 Slim ### pkg install slim -Add the following line to **/etc/rc.conf**: +在**/etc/rc.conf**中加入下面的行: slim_enable="YES" -Add the following line to .xinitrc file in the user’s home directory +在用户的家目录下的.xinitrc文件加入下面的行。 exec mate-session -Reboot the machine. Now the machine will boot into Slim login where you can login to Mate session. +重启电脑。现在在你登录Mate时就会进入Slim登录界面了。 ![](http://www.unixmen.com/wp-content/uploads/2015/03/snapshot3.png) ![](http://www.unixmen.com/wp-content/uploads/2015/03/snapshot4.png) -That’s it. Cheers! +就是这样。干杯! -------------------------------------------------------------------------------- via: http://www.unixmen.com/install-mate-desktop-freebsd-10-1/ 作者:[M.el Khamlichi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 28917b514dd1dc0455698d55df3f757a1b2aa269 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 21 Mar 2015 19:34:03 +0800 Subject: [PATCH 0327/2517] PUB:20150115 20 Unix Command Line Tricks--Part I @geekpi --- ...115 20 Unix Command Line Tricks--Part I.md | 85 +++++++++---------- 1 file changed, 41 insertions(+), 44 deletions(-) rename {translated/tech => published}/20150115 20 Unix Command Line Tricks--Part I.md (73%) diff --git a/translated/tech/20150115 20 Unix Command Line Tricks--Part I.md b/published/20150115 20 Unix Command Line Tricks--Part I.md similarity index 73% rename from translated/tech/20150115 20 Unix Command Line Tricks--Part I.md rename to published/20150115 20 Unix Command Line Tricks--Part I.md index b178a61db9..deaaef6bfa 100644 --- a/translated/tech/20150115 20 Unix Command Line Tricks--Part I.md +++ b/published/20150115 20 Unix Command Line Tricks--Part I.md @@ -1,6 +1,6 @@ -20个Unix命令技巧 - 第一部分 +20个 Unix/Linux 命令技巧(一) ================================================================================ -让我们用**这些Unix命令技巧**开启新的一年,提高在终端下的生产力。我已经找了很久了,现在就与你们分享。 +让我们用**这些Unix/Linux命令技巧**开启新的一年,提高在终端下的生产力。我已经找了很久了,现在就与你们分享。 ![](http://s0.cyberciti.org/uploads/cms/2015/01/unix-command-line-tricks.001.jpg) @@ -9,16 +9,15 @@ 我在生产服务器上有一个很大的200GB的日志文件需要删除。我的rm和ls命令已经崩溃,我担心这是由于巨大的磁盘IO造成的,要删除这个大文件,输入: > /path/to/file.log - # or use the following syntax + # 或使用如下格式 : > /path/to/file.log - # finally delete it + # 然后删除它 rm /path/to/file.log -### 如何缓存终端输出? ### - -尝试使用script命令行工具来为你的终端输出创建typescript。 +### 如何记录终端输出? ### +试试使用script命令行工具来为你的终端输出创建输出记录。 script my.terminal.sessio @@ -28,7 +27,7 @@ date sudo service foo stop -要退出(结束script绘画),输入*exit* 或者 *logout* 或者按下 *control-D* +要退出(结束script会话),输入 *exit* 或者 *logout* 或者按下 *control-D*。 exit @@ -38,11 +37,10 @@ less my.terminal.session cat my.terminal.session -### 还原删除的 /tmp 文件夹 ### +### 还原被删除的 /tmp 文件夹 ### 我在文章[Linux和Unix shell,我犯了一些错误][1]。我意外地删除了/tmp文件夹。要还原它,我需要这么做: - mkdir /tmp chmod 1777 /tmp chown root:root /tmp @@ -50,11 +48,11 @@ ### 锁定一个文件夹 ### -为了我的数据隐私,我想要锁定我文件服务器下的/downloads文件夹。因此我运行: +为了我的数据隐私,我想要锁定我文件服务器下的/downloads文件夹。因此我运行了: chmod 0000 /downloads -root用户仍旧可以访问,但是ls和cd命令还不可用。要还原它用: +root用户仍旧可以访问,而ls和cd命令则不工作。要还原它用: chmod 0755 /downloads @@ -66,40 +64,40 @@ root用户仍旧可以访问,但是ls和cd命令还不可用。要还原它用 或者,在退出vim之前使用:X 命令来加密你的文件,vim会提示你输入一个密码。 -### 清除屏幕上的输出 ### +### 清除屏幕上的乱码 ### 只要输入: reset -### 成为人类 ### +### 易读格式 ### -传递*-h*或者*-H*(和其他选项)选项给GNU或者BSD工具来获取像ls、df、du等命令以人类可读的格式输出: +传递*-h*或者*-H*(和其他选项)选项给GNU或者BSD工具来获取像ls、df、du等命令以易读的格式输出: ls -lh - # 以人类可读的格式 (比如: 1K 234M 2G) + # 以易读的格式 (比如: 1K 234M 2G) df -h df -k - # 已字节输出如: KB, MB, or GB + # 以字节、KB、MB 或 GB 输出: free -b free -k free -m free -g - # 以人类可读的格式打印 (比如 1K 234M 2G) + # 以易读的格式输出 (比如 1K 234M 2G) du -h - # 以人类可读的格式获取系统perms + # 以易读的格式显示文件系统权限 stat -c %A /boot - # 比较人类可读的数字 + # 比较易读的数字 sort -h -a file - # 在Linux上以人类可读的形式显示cpu信息 + # 在Linux上以易读的形式显示cpu信息 lscpu lscpu -e lscpu -e=cpu,node - # 以人类可读的形式显示每个文件的大小 + # 以易读的形式显示每个文件的大小 tree -h tree -h /boot -### 在Linux系统中显示已知用户的信息 ### +### 在Linux系统中显示已知的用户信息 ### 只要输入: @@ -143,7 +141,7 @@ root用户仍旧可以访问,但是ls和cd命令还不可用。要还原它用 ### 我如何删除意外在当前文件夹下解压的文件? ### -我意外在/var/www/html/而不是/home/projects/www/current下解压了一个tarball。它混乱了/var/www/html下的文件。最简单修复这个问题的方法是: +我意外在/var/www/html/而不是/home/projects/www/current下解压了一个tarball。它搞乱了/var/www/html下的文件,你甚至不知道哪些是误解压出来的。最简单修复这个问题的方法是: cd /var/www/html/ /bin/rm -f "$(tar ztf /path/to/file.tar.gz)" @@ -166,7 +164,7 @@ root用户仍旧可以访问,但是ls和cd命令还不可用。要还原它用 ## 以root用户运行最后运行的命令 sudo !! -!!会运行最近使用的命令。要运行最近运行的“foo”命令: +!!会运行最近使用的命令。要运行最近运行的以“foo”开头命令: !foo # 以root用户运行上一次以“service”开头的命令 @@ -180,12 +178,11 @@ root用户仍旧可以访问,但是ls和cd命令还不可用。要还原它用 # 测试 nginx.conf /sbin/nginx -t -c /etc/nginx/nginx.conf - # 测试完 "/sbin/nginx -t -c /etc/nginx/nginx.conf"你可以用vi编辑了 + # 测试完 "/sbin/nginx -t -c /etc/nginx/nginx.conf"你可以用vi再次编辑这个文件了 sudo vi !$ -### 在你要离开的时候留下一个提醒 ### +### 在终端上提醒你必须得走了 ### -If you need a reminder to leave your terminal, type the following command: 如果你需要提醒离开你的终端,输入下面的命令: leave +hhmm @@ -200,26 +197,26 @@ If you need a reminder to leave your terminal, type the following command: cd - -需要快速地回到家目录?输入: +需要快速地回到你的家目录?输入: cd -变量*CDPATH*定义了含有这个目录的搜索目录路径: +变量*CDPATH*定义了目录的搜索路径: export CDPATH=/var/www:/nas10 -现在,不用输入cd */var/www/html/ ,我可以直接输入下面的命令进入/var/www/html: +现在,不用输入cd */var/www/html/ 这样长了,我可以直接输入下面的命令进入 /var/www/html: cd html -### 编辑一个用less浏览的文件 ### +### 在less浏览时编辑文件 ### -要编辑一个用less浏览的文件,按下v。你就可以用变量$EDITOR下的编辑器来编辑了: +要编辑一个正在用less浏览的文件,可以按下v。你就可以用变量$EDITOR所指定的编辑器来编辑了: less *.c less foo.html - ## 下载v编辑文件 ## - ## 退出编辑器,你可以继续用less浏览了 ## + ## 按下v键来编辑文件 ## + ## 退出编辑器后,你可以继续用less浏览了 ## ### 列出你系统中的所有文件和目录 ### @@ -237,14 +234,14 @@ If you need a reminder to leave your terminal, type the following command: # 列出 $HOME 中所有的文件 find $HOME -type f -ls | less -### 用一条命令构造命令树 ### +### 用一条命令构造目录树 ### -你可以用mkdir加上-p选项一次创建目录树: +你可以用mkdir加上-p选项一次创建一颗目录树: mkdir -p /jail/{dev,bin,sbin,etc,usr,lib,lib64} ls -l /jail/ -### 复制文件到多个目录中 ### +### 将文件复制到多个目录中 ### 不必运行: @@ -260,16 +257,16 @@ If you need a reminder to leave your terminal, type the following command: ### 快速找出两个目录的不同 ### -diff命令会按行比较文件。它也可以比较两个目录: +diff命令会按行比较文件。但是它也可以比较两个目录: ls -l /tmp/r ls -l /tmp/s - # Compare two folders using diff ## + # 使用 diff 比较两个文件夹 diff /tmp/r/ /tmp/s/ [![Fig. : Finding differences between folders](http://s0.cyberciti.org/uploads/cms/2015/01/differences-between-folders.jpg)][3] -图片: 找出目录之间的不同 +*图片: 找出目录之间的不同* ### 文本格式化 ### @@ -281,13 +278,13 @@ diff命令会按行比较文件。它也可以比较两个目录: fmt -s file.txt -### 看见输出并写入到一个文件中 ### +### 可以看见输出并将其写入到一个文件中 ### 如下使用tee命令在屏幕上看见输出并同样写入到日志文件my.log中: mycoolapp arg1 arg2 input.file | tee my.log -tee可以保证你同时在屏幕上看到mycoolapp的输出和写入文件。 +tee可以保证你同时在屏幕上看到mycoolapp的输出并写入文件  my.log。 -------------------------------------------------------------------------------- @@ -295,7 +292,7 @@ via: http://www.cyberciti.biz/open-source/command-line-hacks/20-unix-command-lin 作者:[nixCraft][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 51b26227bc0232bf3e11ab02ae46b35465f3d30f Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 21 Mar 2015 19:43:02 +0800 Subject: [PATCH 0328/2517] PUB:20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it @theo-l --- ...oad a RPM package without installing it.md | 56 +++++++++++++++++++ ...oad a RPM package without installing it.md | 55 ------------------ 2 files changed, 56 insertions(+), 55 deletions(-) create mode 100644 published/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md delete mode 100644 translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md diff --git a/published/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md b/published/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md new file mode 100644 index 0000000000..e83de0ff93 --- /dev/null +++ b/published/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md @@ -0,0 +1,56 @@ +Linux 有问必答:如何使用yum来下载RPM包而不进行安装 +================================================================================ +> **问题**:我想从Red Hat 的标准仓库中下载一个RPM包,我能使用yum命令来下载一个RPM包但是不进行安装吗? + +yum是基于Red Hat的系统(如CentOS、Fedora、RHEl)上的默认包管理器。使用yum,你可以安装或者更新一个RPM包,并且他会自动解决包依赖关系。但是如果你只想将一个RPM包下载到你的系统上该怎么办呢? 例如,你可能想要获取一些RPM包在以后使用,或者将他们安装在另外的机器上。 + +这里说明了如何从yum仓库上下载一个RPM包。 + +### 方法一:yum### + +yum命令本身就可以用来下载一个RPM包,标准的yum命令提供了`--downloadonly(只下载)`的选项来达到这个目的。 + + $ sudo yum install --downloadonly + +默认情况下,一个下载的RPM包会保存在下面的目录中: + + /var/cache/yum/x86_64/[centos/fedora-version]/[repository]/packages + +以上的[repository]表示下载包的来源仓库的名称(例如:base、fedora、updates) + +如果你想要将一个包下载到一个指定的目录(如/tmp): + + $ sudo yum install --downloadonly --downloaddir=/tmp + +注意,如果下载的包包含了任何没有满足的依赖关系,yum将会把所有的依赖关系包下载,但是都不会被安装。 + +另外一个重要的事情是,在CentOS/RHEL 6或更早期的版本中,你需要安装一个单独yum插件(名称为 yum-plugin-downloadonly)才能使用`--downloadonly`命令选项: + + $ sudo yum install yum-plugin-downloadonly + +如果没有该插件,你会在使用yum时得到以下错误: + + Command line error: no such option: --downloadonly + +![](https://farm9.staticflickr.com/8627/15571201803_38390aae75_c.jpg) + +### 方法二: Yumdownloader### + +另外一个下载RPM包的方法就是通过一个专门的包下载工具--yumdownloader。 这个工具是yum工具包(包含了用来进行yum包管理的帮助工具套件)的子集。 + + $ sudo yum install yum-utils + +下载一个RPM包: + + $ sudo yumdownloader + +下载的包会被保存在当前目录中。你需要使用root权限,因为yumdownloader会在下载过程中更新包索引文件。与yum命令不同的是,任何依赖包不会被下载。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/yum-download-rpm-package.html + +译者:[theo-l](https://github.com/theo-l) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md b/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md deleted file mode 100644 index a9f1019c19..0000000000 --- a/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md +++ /dev/null @@ -1,55 +0,0 @@ -Linux 常见问题解答--如何使用yum来下载RPM包而不进行安装. -================================================================================ -> **问题**:我想从Red Hat's的标准仓库中下载一个RPM包,我能使用yum命令来下载一个RPM包但是不进行安装吗? - -yum是基于Red Hat的系统(如CentOS,Fedora,RHEl)上的默认包管理器.使用yum,你可以安装或者更新一个RPM包,并且他会自动解决包依赖关系.但是如果你只想将一个RPM包下载到你的系统上该怎么办呢? 例如,你可能想要获取一些RPM包在以后使用,或者将他们安装在另外的机器上. - -这里说明了如何从yum仓库上下载一个RPM包. - -### 方法一:yum### - -yum命令本身就可以用来下载一个RPM包,标准的yum命令提供了`--downloadonly(只下载)`的选项来达到这个目的. - - $ sudo yum install --downloadonly - -默认情况下,一个下载的RPM包会保存在下面的目录中: - - /var/cache/yum/x86_64/[centos/fedora-version]/[repository]/packages - -以上的[repository]表示下载包的来源仓库的名称(例如,base,fedora,updates) - -如果你想要讲一个包下载到一个指定的目录(如/tmp): - - $ sudo yum install --downloadonly --downloaddir=/tmp - -注意,如果下载的包包含了任意没有满足的依赖关系,yum将会把所有的依赖关系包下载,但是都不会被安装. - -另外一个重要的事情时,在CentOS/RHEL 6或更早期的版本中,你需要安装一个单独yum插件(名称为 yum-plugin-downloadonly)才能使用`--downloadonly`命令选项: - - $ sudo yum install yum-plugin-downloadonly - -如果没有该插件,你会在使用yum时得到以下错误: - - Command line error: no such option: --downloadonly - -![](https://farm9.staticflickr.com/8627/15571201803_38390aae75_c.jpg) - -### 方法二: Yumdownloader### -另外一个下载RPM包的方法就是通过一个专门的包下载工具--yumdownloader. 这个工具时yum工具包(包含了用来进行yum包管理的帮助工具套件)的子集. - - $ sudo yum install yum-utils - -下载一个RPM包: - - $ sudo yumdownloader - -下载的包会被保存在当前目录中.你需要使用root权限,因为yumdownloader会在下载过程中更新包索引文件.与yum命令不同的是,任何依赖包不会被下载. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/yum-download-rpm-package.html - -译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e4283f0affa14d1590d848a054d75e1c2ad160d0 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Mar 2015 11:08:01 +0800 Subject: [PATCH 0329/2517] PUB:20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show @JeffDing --- ...inally Lets You Set Menus ToAlways Show.md | 41 ++++++++++++++++++ ...inally Lets You Set Menus ToAlways Show.md | 42 ------------------- 2 files changed, 41 insertions(+), 42 deletions(-) create mode 100644 published/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md delete mode 100644 translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md diff --git a/published/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/published/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md new file mode 100644 index 0000000000..3eec1c4a08 --- /dev/null +++ b/published/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -0,0 +1,41 @@ +Ubuntu 15.04 终于可以让你将菜单设置为 ‘始终可见’ +================================================================================ +**如果你不喜欢 Unity 的全局菜单在你的鼠标离开后就淡出你的视野,在 Ubuntu 15.04 稍微做点工作就可以留住菜单。** + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/locally-integrated-menus-in-ubuntu.png) + +最新的Ubuntu 15.04的Unity界面通过在“提议(Proposed)”通道提供了一个选项,**使应用程序菜单在Ubuntu中始终可见**。 + +这是个不会淡出,也不会过段时间就消失的菜单。 + +最大的缺点是它目前只能通过`dconf`来控制,而不是常规的面向用户的选项设置。 + +我希望(如果预计没有的话)在之后的开发中,能有一个设置这个特性的选项被加入到Ubuntu的【系统设置】>【外观】部分。 + +现在,如果你使用的是 Ubuntu 15.04,并启用了“提议(Proposed)”的更新通道后,你可以在dconf 的com>canonical>Unity>‘always show menus’ 中找到这个开关。 + +### 迟到总比没有要好? ### + +开发者们计划在Ubuntu 14.04 LTS的下一个SRU中反向移植这个选项(假设在测试阶段没有任何意外发生)。 + +本地集成菜单(LIM)在Ubuntu 14.04 LTS 中的首次亮相就赢得了赞誉,其被广泛认为在那些喜欢隐藏方式的与那些不喜欢必须使用鼠标和触摸板的人之间的最佳的折衷方案。 + +虽然在Unity方面本地集成菜单减少了不少批评,不过默认的“淡入/淡出”行为总是还让人不爽。 + +在Ubuntu 过去的几个版本中已经能够看到他们在积极解决早期的用户体验中的几个痛点。经过了几年,在TODO列表中[我们去年终于看到了本地集成菜单][1],以及通过[点击应用图标来实现Unity 启动器中应用的最小化及恢复的选项][2]。 + +一年以来我们终于看到了一个使应用程序菜单始终显示的选项,无论我们的鼠标在哪里。迟来总比没有好,对不对? + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/01/ubuntu-15-04-always-show-menu-bar-option + +作者:[Joey-Elijah Sneddon][a] +译者:[JeffDing](https://github.com/JeffDing) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2014/02/locally-integrated-menus-ubuntu-14-04 +[2]:http://www.omgubuntu.co.uk/2014/03/minimize-click-launcher-option-ubuntu-14-04 diff --git a/translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md deleted file mode 100644 index 1247c8eb78..0000000000 --- a/translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ /dev/null @@ -1,42 +0,0 @@ -Ubuntu 15.04 最终实现你可以设置你的菜单 ‘始终可见’ -================================================================================ -**如果你不喜欢 Unity 的全局菜单在你的鼠标离开后就淡出你的视野, Ubuntu 15.04 有一些额外附加去实现这点.** - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/locally-integrated-menus-in-ubuntu.png) - -最新的Ubuntu 15.04的Unity界面通过在提议通道提供了一个选项**使应用程序菜单在Ubuntu中可见**. - -不时尚, 不过时, 没有丢失的菜单. - -最大的缺点是它目前只能通过dconf来控制,而不是常规的面向用户的选项设置。 - -我希望(如果不是期望)能有一个设置这个特性的选项被加入到Ubuntu的【系统设置】>【外观】部分的开发仍在继续。 - -现在,如果你使用的是Ubuntu15.04,并启用“建议”的更新通道后,你会发现这个开关存在于在COM>规范>Unity>“始终显示菜单”。 - - -### 迟到总比没有要好? ### - -开发者计划在Ubuntu14.04 LTS的下一个SRU中反向移植这个选项(假设在测试阶段没有任何意外发生)。 - -本地集成菜单(LIM)在Ubuntu 14.04 LTS 首次获得了欣赏,被广泛认为在那些喜欢隐藏方式的和那些不喜欢必须使用鼠标和触摸板的人之间的最佳的折衷方法 - -虽然本地集成菜单给我们带来了半路上沉默的批评在统一方面,默认的“淡入/淡出”行为给我们留下了令人发痒的伤痕 - -在Ubuntu 过去的几个版本中已经能够看到积极的去解决早期UX的经历过的关切的问题。在经过几年“打算去做”的列表[我们去年终于得到了本地集成菜单][1],以及不支持的通过点击图标实现[减少和恢复Unity启动程序中不支持的应用程序的选项]。 - -一年以来我们终于得到一个选项以使应用程序菜单始终显示,无论我们的鼠标在哪里。迟来总比没有好,对不对? - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/01/ubuntu-15-04-always-show-menu-bar-option - -作者:[Joey-Elijah Sneddon][a] -译者:[JeffDing](https://github.com/JeffDing) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.omgubuntu.co.uk/2014/02/locally-integrated-menus-ubuntu-14-04 -[2]:http://www.omgubuntu.co.uk/2014/03/minimize-click-launcher-option-ubuntu-14-04 From e824b167a1d3310d6b18f242271d9ca3600bd6fe Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Mar 2015 11:44:24 +0800 Subject: [PATCH 0330/2517] PUB:20150309 10 best uses for open source software in the business world MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wi-cuckoo 翻译的不错。 --- ...n source software in the business world.md | 85 +++++++++++++++++++ ...n source software in the business world.md | 85 ------------------- 2 files changed, 85 insertions(+), 85 deletions(-) create mode 100644 published/20150309 10 best uses for open source software in the business world.md delete mode 100644 translated/talk/20150309 10 best uses for open source software in the business world.md diff --git a/published/20150309 10 best uses for open source software in the business world.md b/published/20150309 10 best uses for open source software in the business world.md new file mode 100644 index 0000000000..82b5c89956 --- /dev/null +++ b/published/20150309 10 best uses for open source software in the business world.md @@ -0,0 +1,85 @@ +10种将开源用于商业的最佳途径 +=============================================================================== +> 开源为大大小小的商业带来了一些显著的效益 -- 但是你可能会对某些用途感到惊讶。 + +![](http://tr2.cbsistatic.com/hub/i/r/2015/03/05/54a9c323-4311-4455-b10b-5182548da424/resize/620x485/95164f01a19cbd7a3e4b843be78febae/foss.jpg) + +技术上已经发生了一些必然性的改变。举个例子,开源软件以它的方式进入到了你的工作之中。10 年前,这也许还能称为一个问题。现在呢?则已经无法避免开源技术的使用 -- 也没有理由要去避免。有如此多强大(和必需的)的方方面面技术,开源在许多方面已经成为了技术的救世主。但是你哪一块的工作最适合开源软件呢?当然,这个问题的答案会因公司而异。然而许多的应用几乎可以适用于每个场景中。 + +让我们来看看这10种可能是最佳的使用方法,它们可以帮助你的公司成长,带给你从未体验过的灵活性与可靠性,或者仅仅是帮你节省一笔可观的预算。 + +### 1: 服务器软件 ### + +如果你还在微软的 IIS 平台苦苦挣扎,那么你需要体验一下 Apache。这款旗舰级开源软件是这个星球上使用最广泛的网页服务器软件之一。Apache 免费、极其可靠、易于管理,而且不像 IIS 一样需要大量的资源。然而,开源并不局限于网页服务器。如果你需要在公司内使用 SMB 来共享资源,可以试试 Samba, Samba 4甚至集成了活动目录(AD),所以你不需要担心在Samba服务器上建立单独的用户账号。 + +### 2: 开发 ### + +用开源开发是很简单的事。PHP,Rails,Perl -- 开源上面的开发语言和开发的工具(从集成开发环境到调试)都很多。为开源或者开源工具做开发可以有很多种选择(如同使用商业软件开发一样)。开源软件与商业软件最大的不同之处在于开源可以接触到软件源代码。在自由开源软件(FOSS,free open source software)的世界里,代码都是公开的。对许多开发者来说,Linux操作系统有他们开发和构建所需要的一切(特别那些没有一个成熟环境来写代码的人而言)。如果你需要图形用户界面(GUI)的开发工具,开源也能满足你。 + +### 3: 安全 ### + +通往安全的道路是充满挑战的,但还是很多途径可以达到。你可以选择“安全盒子”的解决方案,跟随Cisco(一个可靠的解决方案)的节奏,或者你可以借助iptables打造最适合你需求的安全。是的,开源的安全之路会需要更多的时间去配置(有很高的学习壁垒),但是结果通常是不错的。这里甚至不强调一种观点,就一般来说,在桌面上使用开源比起大多数封闭的系统而言是一个更安全的平台。在桌面上部署Linux,你的安全痛点会大大降低。 + +### 4: 桌面 ### + +Linux 桌面是大多数人不认可的地方。尽管如此,你必须考虑一个事实,那就是你每天的工作流程已经经历了一个主要的思维模式的转换。我们现在做的大部分事情都是通过网络浏览器。那么为什么不将Linux部署到桌面上呢?不但可以能做如今要做的许多工作,而且不用遭受病毒,恶意软件和能破坏系统的更新。它不完美 -- 但哪个平台敢说完美?但是它很强大,最后,还可以节省你的开支。这是一个双赢的结局。 + +### 5: 工作流程 ### + +每一种工作都依赖于工作流程。对于某些工作来说,一个流畅的工作流程又取决于所用的工具。开源已经登上这个舞台了。CRM(客户关系管理),HRM(人力资源管理),ERP(企业资源计划),BI(商业智能),BPM(业务流程管理) …… 只要你叫得出名字,开源就可以做到几乎你能想到的每一种可能 -- 并且干得不错。借助于[Pentaho][1], [Collabtive][2]和[SugarCRM][3], 开源可以在任何时候与最新的源工具保持同步。 + +### 6: 协作 ### + +没有一起合作项目的能力,你的员工就不能干好工作。所以你选择的协作工具是十分重要的。你会在开源的世界里发现大量的优质协作工具。[Cyn.in 社区版][4], [Zimbra 开源版][5]和[Kolab][6]都是不错的协作工具,但这仅仅是开源世界里的三个代表而已。 + +### 7: 大数据 ### + +以前说到大数据的时候,往往不会想到开源。多亏了[SUSE][7]的努力,大数据和开源现在可以携手共进了。许多如内存数据和内核热补丁的发明创建,使得开源成为大数据一个理想的解决方案。它可以完美地满足大数据在平台上所需的大量要求,而封闭的软件则达不到如此灵活的水平。 + +### 8: 云 ### + +云的主要玩家都是开源的。[Red Hat][8], [Ubuntu][9], [SUSE][10], [Amazon][11], [Rackspace][12] -- 他们都提供云服务,而且认为开源是云配置的最好解决方案。但是,如果你不想用大公司的服务,仍然有很多后起之秀如[OwnCloud][13],你可以选择OwnCloud的托管云方案,或者建立自己的一套。 + +### 9: 多媒体 ### + +如果你的公司做播客或为产品发布制作视频,开源可以为你提供服务。借助像[Audacity][14]和[OpenShot][15]这样的工具,你可以对音频和视频做你需要的任何处理 -- 而且十分的廉价。实际上,你会感觉到很难再去找到比Audacity更好的播客工具,或者比OpenShot更易用的视频编辑器。没有太大的学习壁垒,或者闭源软件工具所要求的高额费用,开源的软件在帮助你创造专业水准的作品方面已经做得很好了。 + +### 10: 电子商务 ### + +如果你做在线销售,如果不尝试一下像[PrestaShop][16]之类的工具,你就太懈怠了。PrestaShop是最强大的电子商务解决方案之一,易于获取 -- 不需要许可证。 PrestaShop有你可能想要的所有功能(而且有些你可能都没有想过),这个开源平台已经在任何水平上超出了电子商务的范畴。 + +### FOSS 之于商业 ### + +开源已经不再局限于商业交流的范围了。在许多情况下,FOSS已经主导这种交流。如果你已经在寻找将开源解决方案运用的领域,看上面的10条就行了。 + +### 该你了 ### + +你已经将开源用到你的工作中了吗?如果是,属于哪一条方法呢? + +------------------------------------------------------------------------------- + +via: http://www.techrepublic.com/blog/10-things/10-best-uses-for-open-source-software-in-the-business-world/ + +作者:[Jack Wallen][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.techrepublic.com/search/?a=jack+wallen +[1]:http://community.pentaho.com/ +[2]:http://collabtive.o-dyn.de/ +[3]:http://www.sugarcrm.com/ +[4]:http://cynapse.com/cyn-in/ +[5]:https://www.zimbra.com/open-source +[6]:http://kolab.org/ +[7]:http://www.suse.org/ +[8]:http://www.redhat.com/ +[9]:http://www.ubuntu.com/ +[10]:http://www.suse.com/ +[11]:http://aws.amazon.com/ec2/ +[12]:http://www.rackspace.com/cloud +[13]:https://owncloud.org/ +[14]:http://audacity.sourceforge.net/ +[15]:http://www.openshot.org/ +[16]:https://www.prestashop.com/ diff --git a/translated/talk/20150309 10 best uses for open source software in the business world.md b/translated/talk/20150309 10 best uses for open source software in the business world.md deleted file mode 100644 index 976768229b..0000000000 --- a/translated/talk/20150309 10 best uses for open source software in the business world.md +++ /dev/null @@ -1,85 +0,0 @@ -10种将开源用于商业的最佳途径 -=============================================================================== -> 开源为大大小小的商业带来了一些显著的效益 -- 但是你可能会对某些用途感到惊讶。 - -![](http://tr2.cbsistatic.com/hub/i/r/2015/03/05/54a9c323-4311-4455-b10b-5182548da424/resize/620x485/95164f01a19cbd7a3e4b843be78febae/foss.jpg) - -技术上出现了一些不可避免的东西。举个例子,开源会以自己的方式来协助你的工作。10年前,这很容易成为问题。现在呢?仍然无法避免 -- 也没有理由要去避免。有如此多强大(和必要的)的方方面面技术,开源在许多方面已经成为了技术的救世主。但是你哪一块的工作最适合开源呢?当然,这个问题的答案会因公司而异。然而许多的应用可以部署到几乎每个场景中。 - -让我们来看看这10种可能是最佳的使用方法,帮助你的公司成长,带给你从未体验过的灵活性与可靠性,或者仅仅是帮你节省一笔可观的预算。 - -### 1: 服务器软件 ### - -如果你还在微软的互联网信息服务(IIS,Internet Information Services)平台苦苦挣扎,那么你需要体验一下Apache。这款旗舰开源网页服务器软件是这个星球上使用最广泛的软件之一。Apsche免费,难以置信的可靠,易于管理,而且不需要大量如IIS需要的费用。然而,开源并不局限于网页服务器。如果你需要在公司内共享服务器信息块(SMB,Server Message Block),考虑一下Samba, Samba 4甚至集成了活动的目录,所以你不需要担心在Samba服务器上建立单独的用户账号。 - -### 2: 开发 ### - -用开源开发是很简单的事。PHP,Rails,Perl -- 开源上面的开发语言如同开发的工具(从I集成开发环境到调试)一样多。为开源或者开源工具做开发可以有很多种选择(如同私有的开发一样)。开源与私有最大的不同之处在于开源可以接触到软件源代码。在免费开源软件的世界里(FOSS,free open source software),代码都是公开的。对许多开发者来说,Linux操作系统有他们开发和建立需要的一切(特别那些写代码没有一个成熟环境的人)。如果你确实需要图形用户界面(GNU)的开发工具,开源能满足你。 - -### 3: 安全 ### - -通往安全的道路是充满挑战的,但还是很多途径可以达到。你可以选择“安全盒子”的解决方案,跟随Cisco(一个可靠的解决方案)的节奏,或者你可以借助iptables打造最适合你需求的安全。是的,开源的安全之路会需要更多的时间去配置(有很高的学习壁垒),但是结果通常是不错的。这里甚至不强调一种观点,就是一般来说在桌面上使用开源比起大多数封闭的系统来说是一个比较安全的平台。不过在桌面上部署Linux,你的安全性会大大降低。 - -### 4: 桌面 ### - -桌面是大多数宏机发生的地方。尽管如此,你必须考虑一个事实,那就是你每天的工作流程已经经历了一个主要的思维模式的转换。我们现在做的大部分事情都是通过网络浏览器。那么为什么不在桌面上部署Linux呢?不但可以能做如今要做的许多工作,而且不用遭受病毒,恶意软件和能破外系统的更新。它不完美 -- 但哪个平台敢说完美?但是它很强大,最后,还可以节省你的开支。这是一个双赢的结局。 - -### 5: 工作流程 ### - -每一种工作都依赖于工作的流程。对于某些工作来说,一个流畅的工作流程又取决于所用的工具。开源已经登上这个舞台了。CRM(客户关系管理),HRM(人力资源管理),ERP(企业资源计划),BI(商业智能),BPM(业务流程管理) 。。。。。。只要你叫得出名字,开源就可以做到几乎你能想到的每一种可能的缩写 -- 并且干得不错。借助于[Pentaho][1], [Collabtive][2]和[SugarCRM][3], 开源可以在任何时候与最新的源工具保持同步。 - -### 6: 协作 ### - -没有一起合作项目的能力,你的员工就不能干好工作。所以你选择的协作工具是十分重要的。你会在开源的世界里发现大量的优质协作工具。[Cyn.in community edition][4], [Zimbra Open Source Edition][5]和[Kolab][6]都是不错的协作工具,但仅仅是开源世界里的三个代表而已。 - -### 7: 大数据 ### - -以前说道大数据的时候,往往不会想到开源。多亏了[SUSE][7]的努力,大数据和开源现在可以携手共进了。许多如内存数据和现场内核修复的创意,使得开源成为大数据一个理想的解决方案。 它可以完美地满足大数据在平台上所需的大量要求。而封闭的软件则达不到如此灵活的水平。 - -### 8: 云 ### - -云的主要玩家都是开源的。[Red Hat][8], [Ubuntu][9], [SUSE][10], [Amazon][11], [Rackspace][12] -- 他们都提供云服务,而且知道开源是云配置的最好解决方案。但是,如果你不想用大公司的服务,仍然有很多后起之秀如[OwnCloud][13],你可以选择OwnCloud的特色云方案,或者建立自己的一套。 - -### 9: 多媒体 ### - -如果你的公司为产品发布做播客或视频,开源可以为你提供服务。借助像[Audacity][14]和[OpenShot][15]这样的工具,你可以对音频和视频做你需要的任何处理 -- 而且十分的廉价。实际上,你会感觉到很难再去找到比Audacity更好的播客工具,或者比OpenShot更易用的视频编辑器。没有太大的学习壁垒,或者封闭软件工具要求的高额费用,开源的软件在帮助你创造专业水准的作品方面已经做得很好了。 #这里前一个意群不明白如何翻译 - -### 10: 电子商务 ### - -如果你做在线销售,如果不尝试一下像[PrestaShop][16]之类的工具,你会觉得很没效率的。PrestaShop是最强大的电子商务解决方案之一,易于获取 -- 不需要许可证。 PrestaShop有你可能想要的所有功能(而且有些你可能都没有想过),这个开源平台已经在任何水平上超出了电子商务的范畴。 - -### FOSS 之于商业 ### - -开源已经不再局限于商业交流的范围了。在许多情况下,FOSS已经主导这种交流。如果你已经在寻找将开源解决方案运用的领域,看上面的10条就行了。 - -### 该你了 ### - -你已经将开源用到你的工作中了吗?如果是,属于哪一条方法呢? - -------------------------------------------------------------------------------- - -via: http://www.techrepublic.com/blog/10-things/10-best-uses-for-open-source-software-in-the-business-world/ - -作者:[Jack Wallen][a] -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.techrepublic.com/search/?a=jack+wallen -[1]:http://community.pentaho.com/ -[2]:http://collabtive.o-dyn.de/ -[3]:http://www.sugarcrm.com/ -[4]:http://cynapse.com/cyn-in/ -[5]:https://www.zimbra.com/open-source -[6]:http://kolab.org/ -[7]:http://www.suse.org/ -[8]:http://www.redhat.com/ -[9]:http://www.ubuntu.com/ -[10]:http://www.suse.com/ -[11]:http://aws.amazon.com/ec2/ -[12]:http://www.rackspace.com/cloud -[13]:https://owncloud.org/ -[14]:http://audacity.sourceforge.net/ -[15]:http://www.openshot.org/ -[16]:https://www.prestashop.com/ From 2e63a45961caad6ab2df13867439ad677f1642ba Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Mar 2015 12:09:27 +0800 Subject: [PATCH 0331/2517] PUB:20150121 Linux FAQs with Answers--How to check CPU info on Linux @ZTinoZ --- ...Answers--How to check CPU info on Linux.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md (73%) diff --git a/translated/tech/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md b/published/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md similarity index 73% rename from translated/tech/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md rename to published/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md index da72d8527b..e8b97a3f0d 100644 --- a/translated/tech/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md +++ b/published/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md @@ -1,8 +1,8 @@ -Linux有问必答时间--如何查看Linux系统的CPU信息 +Linux有问必答:如何查看Linux系统的CPU信息 ================================================================================ > **问题**: 我想要了解我的电脑关于CPU处理器的详细信息,查看CPU信息比较有效地方法是什么? -根据你的需要,有各种各样的关于你的CPU处理器信息你需要了解,比如CPU供应商名、模型名、时钟频率、套接字/内核的数量, L1/L2/L3缓存配置、可用的处理器能力(比如:硬件虚拟化、AES, MMX, SSE)等等。在Linux中,有许多命令行或基于GUI的工具就能来展示你的CPU硬件的相关具体信息。 +根据你的需要,有各种各样的关于你的CPU处理器信息你需要了解,比如CPU供应商名、模型名、时钟频率、插槽/内核的数量, L1/L2/L3缓存配置、可用的处理器能力(比如:硬件虚拟化、AES, MMX, SSE)等等。在Linux中,有许多命令行或基于GUI的工具就能来展示你的CPU硬件的相关具体信息。 ### 1. /proc/cpuinfo ### @@ -12,7 +12,7 @@ Linux有问必答时间--如何查看Linux系统的CPU信息 ![](https://farm8.staticflickr.com/7572/15934711577_4136a8e0b9_c.jpg) -通过查看这个文件,你能[识别出][1]物理处理器数、每个CPU核心数、可用的CPU标志寄存器以及其它东西的数量。 +通过查看这个文件,你能[识别出][1]物理处理器数(插槽)、每个CPU核心数、可用的CPU标志寄存器以及其它东西的数量。 ### 2. cpufreq-info ### @@ -32,7 +32,7 @@ cpuid命令的功能就相当于一个专用的CPU信息工具,它能通过使 ### 4. dmidecode ### -dmidecode命令直接从BIOS的DMI(译者注:桌面管理接口)数据收集关于系统硬件的具体信息。CPU信息报告包括CPU供应商、版本、CPU标志寄存器、最大/最近的时钟速度、(所允许的)核心总数、L1/L2/L3缓存配置等等。 +dmidecode命令直接从BIOS的DMI(桌面管理接口)数据收集关于系统硬件的具体信息。CPU信息报告包括CPU供应商、版本、CPU标志寄存器、最大/当前的时钟速度、(启用的)核心总数、L1/L2/L3缓存配置等等。 $ sudo dmidecode @@ -54,7 +54,7 @@ i7z是一个专供英特尔酷睿i3、i5和i7 CPU的实时CPU报告工具。它 ![](https://farm8.staticflickr.com/7546/15534687744_1968dc2b18_c.jpg) -### 8. likwid-topology ### +### 8. likwid拓扑 ### [likwid][3] (Like I Knew What I'm Doing) 是一个用来测量、配置并显示硬件相关特性的命令行收集工具。其中的likwid拓扑结构能显示CPU硬件(线程/缓存/NUMA)的拓扑结构信息,还能识别处理器家族(比如:Intel Core 2, AMD Shanghai)。 @@ -70,7 +70,7 @@ lscpu命令用一个更加用户友好的格式统计了 /etc/cpuinfo 的内容 ### 10. lshw ### -**lshw**命令是一个综合性硬件查询工具。不同于其它工具,lshw需要root特权才能运行因为它是在BIOS系统里查询DMI(译者注:桌面管理接口)信息。它能报告总核心数和可用核心数,但是会遗漏掉一些信息比如L1/L2/L3缓存配置。GTK版本的lshw-gtk也是可用的。 +**lshw**命令是一个综合性硬件查询工具。不同于其它工具,lshw需要root特权才能运行,因为它是在BIOS系统里查询DMI(桌面管理接口)信息。它能报告总核心数和可用核心数,但是会遗漏掉一些信息比如L1/L2/L3缓存配置。GTK版本的lshw-gtk也是可用的。 $ sudo lshw -class processor @@ -78,7 +78,7 @@ lscpu命令用一个更加用户友好的格式统计了 /etc/cpuinfo 的内容 ### 11. lstopo ### -lstopo命令 (包括 [hwloc][4] 包) 使由CPU、缓存、内存和I/O设备组成的拓扑结构可见。这个命令用来识别处理器结构和系统的NUMA拓扑结构。 +lstopo命令 (包括在 [hwloc][4] 包中) 以可视化的方式组成 CPU、缓存、内存和I/O设备的拓扑结构。这个命令用来识别处理器结构和系统的NUMA拓扑结构。 $ lstopo @@ -86,7 +86,7 @@ lstopo命令 (包括 [hwloc][4] 包) 使由CPU、缓存、内存和I/O设备组 ### 12. numactl ### -其被开发的起初是为了设置NUMA的时序安排和Linux处理器的内存布局策略,numactl命令也能通过命令行来展示关于CPU硬件的NUMA拓扑结构信息。 +最初其被开发的目的是为了设置NUMA的时序安排和Linux处理器的内存布局策略,numactl命令也能通过命令行来展示关于CPU硬件的NUMA拓扑结构信息。 $ numactl --hardware @@ -94,7 +94,7 @@ lstopo命令 (包括 [hwloc][4] 包) 使由CPU、缓存、内存和I/O设备组 ### 13. x86info ### -x86info是一个为了展示基于x86架构的CPU信息的命令行工具。信息报告包括CPU型号、线程/核心数、时钟速度、TLB(译者注:传输后备缓冲器)缓存配置、支持的特征标志寄存器等等。 +x86info是一个为了展示基于x86架构的CPU信息的命令行工具。信息报告包括CPU型号、线程/核心数、时钟速度、TLB(传输后备缓冲器)缓存配置、支持的特征标志寄存器等等。 $ x86info --all @@ -105,7 +105,7 @@ x86info是一个为了展示基于x86架构的CPU信息的命令行工具。信 via: http://ask.xmodulo.com/check-cpu-info-linux.html 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d173bfb5a1e189030f017feb4199e3f22e2f5d4e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Mar 2015 12:33:43 +0800 Subject: [PATCH 0332/2517] PUB:20150126 How To Kill All Processes Of A Specific User With slay @geekpi --- ... Kill All Processes Of A Specific User With slay.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150126 How To Kill All Processes Of A Specific User With slay.md (83%) diff --git a/translated/tech/20150126 How To Kill All Processes Of A Specific User With slay.md b/published/20150126 How To Kill All Processes Of A Specific User With slay.md similarity index 83% rename from translated/tech/20150126 How To Kill All Processes Of A Specific User With slay.md rename to published/20150126 How To Kill All Processes Of A Specific User With slay.md index 897c4c16c7..77a8441323 100644 --- a/translated/tech/20150126 How To Kill All Processes Of A Specific User With slay.md +++ b/published/20150126 How To Kill All Processes Of A Specific User With slay.md @@ -1,4 +1,4 @@ -如何用‘slay’杀掉指定用户的所有进程 +用‘slay’干掉某个用户的所有进程 ================================================================================ **slay** 是**Chris Ausbrooks**写的一款用于杀掉指定用户所有运行进程的命令行工具。slay对系统管理员而言在找出那些不应该运行进程的用户是很有用的。 @@ -31,19 +31,19 @@ slay在大多数发行版中都有官方仓库。 ~ sudo slay amitooo slay: Done. -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/slay-amitoo-kpenee.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/slay-amitoo-kpenee.png) 当slay运行完成后,你应该就可以看到反馈了。 -享受吧。 +爽吧?! -------------------------------------------------------------------------------- via: http://www.unixmen.com/kill-processes-specific-user-slay/ -作者:[ Enock Seth Nyamador][a] +作者:[Enock Seth Nyamador][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2b3a4256c90fd74f634aba2c87b2d8cd39882a58 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Mar 2015 12:55:46 +0800 Subject: [PATCH 0333/2517] PUB:20150128 How To Monitor Access Point Signal Strength With wifi-linux @geekpi --- ...cess Point Signal Strength With wifi-linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md (71%) diff --git a/translated/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md b/published/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md similarity index 71% rename from translated/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md rename to published/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md index db2ae3c05a..7a12be0642 100644 --- a/translated/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md +++ b/published/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md @@ -1,14 +1,14 @@ 如何用wifi-linux检测AP信号强度 ================================================================================ -作为一名python极客,我喜欢在github上发现新的针对linux用户的python工具。今天我发现了一款用python写成的用于检测AP信号强度的工具。 +作为一名python极客,我喜欢在github上挖掘新的用于linux用户的python工具。今天我发现了一款用python写成的用于检测AP信号强度的工具:wifi-linux。 我已经在**wifi-linux**上实验了大约两个小时,并且它工作的很好但是我希望在不久的将来在作者那里看到一些单元测试,因为命令**plot**无法在我的电脑上工作,并且会导致一些问题。 ### 什么是wifi-linux ### -根据github作者账号的官方的offical readme.md文件, wifi-linux是一个简单的收集你周围AP的RSSI信息的python脚本,它还会画出RSSI活动图形。 +根据github上作者账号的官方的 readme.md文件, wifi-linux是一个简单的收集你周围AP的RSSI信息的python脚本,它还会画出RSSI活动图形。 -,这同样可以用命令plot生成,但是不幸的是,这对我不可行。wifi-linux支持其他的命令,比如**bp** 来加入一个断点,**print**会打印一些统计和**启动开关**。 +作者说可以在该程序中可以使用plot命令绘制RSSI 活动图形,但是不幸的是,这对我不可行。wifi-linux也支持其他的命令,比如**bp** 来加入一个断点,**print**会打印一些统计和**启动开关**。 wifi-linux程序有下面这些依赖: @@ -19,15 +19,15 @@ wifi-linux程序有下面这些依赖: ### 安装wifi-linux需要的包 ### -我怕尝试使用python包管理工具pip安装python-dbus但是失败了,因为pip会查找setup.py,但是python-dbus中没有。因此下面的命令不工作。 +我尝试使用python包管理工具pip安装python-dbus但是失败了,因为pip会查找setup.py,但是python-dbus中没有。因此下面的命令不工作。 pip install dbus-python -你可以试一下但是很有可能会在终端中下面的错误。 +你可以试一下但是很有可能会在终端中出现下面的错误。 IOError: [Errno 2] No such file or directory: '/tmp/pip_build_oltjano/dbus-python/setup.py' -我该怎么解决这个问题呢?很简单,用下面命令中的系统包管理工具安装Python DBUS。 +我该怎么解决这个问题呢?很简单,用下面命令中的系统包管理工具来安装Python DBUS。 sudo apt-get install python-dbus @@ -69,7 +69,7 @@ wifi-linux程序有下面这些依赖: ![the bp command in wifi-linux](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux2.png) -命令**print**可以用于显示你机器的状态。下面就是一个例子。 +命令**print**可以用于在终端上显示你机器的状态。下面就是一个例子。 ![the print command](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux3.png) @@ -79,7 +79,7 @@ via: http://linoxide.com/linux-how-to/monitor-access-point-signal-strength-wifi- 作者:[Oltjano Terpollari][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 5a6329ca9a7736b2226a73f4edab583b13a8c61c Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 22 Mar 2015 13:49:37 +0800 Subject: [PATCH 0334/2517] translating --- .../20150310 4 Linux Based Mini PC You Can Buy In 2015.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md index fcecf0d396..ced7df8156 100644 --- a/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md +++ b/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md @@ -1,3 +1,5 @@ +Translating---geekpi + 4 Linux Based Mini PC You Can Buy In 2015 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Linux_Based_Mini_PC.jpg) @@ -136,4 +138,4 @@ via: http://itsfoss.com/4-linux-based-mini-pc-buy-2015/ [6]:https://www.thinkpenguin.com/ [7]:https://www.thinkpenguin.com/gnu-linux/penguin-pocket-wee-gnu-linux-desktop [8]:http://itsfoss.com/raspberry-pi-2-specs/ -[9]:http://itsfoss.com/intels-compute-stick/ \ No newline at end of file +[9]:http://itsfoss.com/intels-compute-stick/ From a71c491feb3ce0f759473337df793999d7865b95 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 22 Mar 2015 14:38:37 +0800 Subject: [PATCH 0335/2517] translated --- ...Linux Based Mini PC You Can Buy In 2015.md | 141 ----------------- ...Linux Based Mini PC You Can Buy In 2015.md | 145 ++++++++++++++++++ 2 files changed, 145 insertions(+), 141 deletions(-) delete mode 100644 sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md create mode 100644 translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md diff --git a/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md deleted file mode 100644 index ced7df8156..0000000000 --- a/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md +++ /dev/null @@ -1,141 +0,0 @@ -Translating---geekpi - -4 Linux Based Mini PC You Can Buy In 2015 -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Linux_Based_Mini_PC.jpg) - -Mini PCs, in my opinion, will takeover the traditional desktop computers in near future. Traditional desktop has a bulky CPU which takes a lot of space with its fan running like a blower. The mini PCs, on the other hand, are tiny and compact. With hardly 4″ or 5″ in size, they can be easily placed on a table. - -Moreover, these mini PCs are fanless which is an added virtue. Of course, you can buy fanless regular desktops but the space consumption is still an issue. Personally, I find the mini PC cute in looks. If you are not a gamer and thinking of buying a new desktop PC, I’ll highly recommend you to **buy a Linux based mini PC**. - -If you go by my recommendation and consider buying it, you might wonder what options do you have. Worry not. In this post we shall see four **Linux based Mini PC that you can buy in 2015**. - -### Linux based mini PCs ### - -Please do note that some of these gadgets might not be available to order just yet. Some of these have been just announced and will be released to public in near future. - -#### 1. Meerkat by System76 #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/system76-meerkat.jpg) - -[System76][1] is a computer manufacturer exclusively dealing with only Ubuntu based desktop, laptops and servers. [System76 announced an Ubuntu based mini PC Meerkat][2] last week. Let’s take a quick look at its specification: - -**Specification** - -- Intel 5th Generation processors, available options i3-5010U and i5-5250U -- up to 2 TB of storage (M.2 SATA SSD) -- 16 GB DDR3 RAM -- Graphics Intel HD 5500 and Intel HD 6000 for i3 and i5 respectively -- 4″ x 4″ in size -- WiFi -- 1 Gb NIC -- 2 USB 3.0 ports - -**Price** - -In the range of $500 (yet to be confirmed). - -**Availability** - -US release by the end of March 2015. - -#### 2. Mintbox Mini by Compulab #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/mintbox-mini.jpeg) - -[Compulab][3] shrunk its flagship Linux Mint based PC devices, Mintbox into [Mintbox Mini][4]. The compact version is around 4″ in size. More details are as following: - -**Specifications** - -- AMD A4-6400T processor -- Radeon R3 graphics processor -- 4 GB RAM -- 64 GB SSD -- 2 USB 3.0 ports, 3 USB 2.0 ports -- 2 HDMI out ports -- 802.11 b/g/n Wifi -- Gigabit Ethernet -- MicroSD reader - -**Price** - -Staring around $300 - -**Availability** - -Second quarter of 2015 - -#### 3. Utilite2 by Compulab #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Utilite2-ARM-PC.jpg) - -It’s not that Compulab has stuck with Linux Mint only. It announced an ARM desktop PC running Ubuntu in last December. With a size of 3.4″x2.3″, [Utilite2][5] has modest feature and modest price. - -**Specifications** - -- Qualcomm Snapdragon 600 (APQ8064) quad-core CPU 1.7GHz -- 2GB RAM, eMMC with optional 32 GB mSATA storage -- Graphics with Qualcomm Adreno™ GPU -- 1080p video playback and capture -- Dual-antenna WiFi 802.11 and Bluetooth 4.0 -- Gigabit Ethernet, 4x USB2, USB OTG -- Cellular modem support - -**Price** - -$192 for regular model, $229 with SSD storage. Shipping charges extra. - -**Availability** - -Available to purchase now. It will take four weeks in shipping. - -#### Penguin Pocket Wee by Think Penguin #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Think_Penguin_Pocket_Wee.jpeg) - -[Think Penguin][6] is a Open Source focused hardware manufacturer. In the mini PC category, it has [Penguin Pocket Wee][7] to offer. With 4.6″x 4.4″x 1.4″ in size, Penguin Pocket Wee provides a number of configuration to you. You can choose between the processors, storage, network adapters and what not. You can choose to buy it pre-installed with your favorite Linux distribution, default OS is Ubuntu. - -The general configuration is as following: - -- Intel Core i3 or i5 processor with support for up to 1080p HD video -- Expandable up to 16GB of DDR3 RAM -- Intel HD graphics -- Wireless N -- Up to 250GB of SSD -- 4 USB 3.0 -- Intel 10/100/1000 Gigabit Ethernet Controller - -**Price** - -Basic model starts at $499 and it can go up to $1000 based on the configuration you select. - -**Availability** - -Available to order now. There are offices in UK and USA so it should be shipping to North America and Europe. - -### What’s your pick? ### - -I have deliberately not included [Raspberry Pi 2][8] or other Linux microcomputer such as [Intel’s Compute Stick][9]. The reason is that I do not think that micro-computers fall in the same categories as mini PCs. - -What do you think? Are you tempted to replace your desktop with a mini PC? Is there another player which I missed in this list of **best Linux based mini PCs**? Do share your views. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/4-linux-based-mini-pc-buy-2015/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:https://system76.com/ -[2]:http://itsfoss.com/system76-unveils-ubuntu-based-mini-pc-meerkat/ -[3]:http://www.compulab.co.il/ -[4]:http://itsfoss.com/mintbox-mini-compact-linux-mint-powered-pc-unveiled/ -[5]:http://www.compulab.co.il/utilite-computer/web/utilite2-overview -[6]:https://www.thinkpenguin.com/ -[7]:https://www.thinkpenguin.com/gnu-linux/penguin-pocket-wee-gnu-linux-desktop -[8]:http://itsfoss.com/raspberry-pi-2-specs/ -[9]:http://itsfoss.com/intels-compute-stick/ diff --git a/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md new file mode 100644 index 0000000000..c3aa5b76b5 --- /dev/null +++ b/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md @@ -0,0 +1,145 @@ +2015你可以买的一款基于Linux的迷你PC +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Linux_Based_Mini_PC.jpg) + +在我看来迷你PC将在不久的将来会替代传统桌面电脑。传统桌面的有一个像送风机那样占据大量空间的风扇。迷你PC,在另一方面说很小巧和紧凑。通常是4″或者5″大小,可以轻易地放在桌子上。 + +不仅如此,这些迷你PC的无风扇设计是一个好处。当然,你可以购买无风扇的常规电脑,但是空间占用仍然是一个问题。对我个人来说,我觉得迷你PC外观上看着很可爱。如果你不是一个游戏玩家也不想买新的桌面PC,我强烈建议你**购买一个基于Linux的迷你PC**。 + +如果你考虑我的建议买一个,那么你或许想知道该买哪款。不要担心,这篇文章我们会介绍**四款你可以在2015购买的基于Linux的迷你PC**。 + +### 基于Linux的迷你PC ### + +请注意这些PC可能还不能下单。它们中有些还刚刚公布,在不久的将来才会面向公众出售。 + + +#### 1. System76出品的Meerkat #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/system76-meerkat.jpg) + +[System76][1] is a computer manufacturer exclusively dealing with only Ubuntu based desktop, laptops and servers. [System76 announced an Ubuntu based mini PC Meerkat][2] last week. Let’s take a quick look at its specification: +[System76][1] 是一家仅出品基于Ubuntu电脑、笔记本、服务器的电脑生产商。[System76在上周宣布了一款基于Ubuntu的迷你PC][2]。让我看一下它的规格: + +**规格** + +- Intel第五代处理器,共有两种选择 i3-5010U 和 i5-5250U +- 最高2TB存储 (M.2 SATA SSD) +- 16 GB DDR3 内存 +- i3和i5处理器下相应的Intel HD 5500 和 Intel HD 6000显卡 +- 4″ x 4″ 大小 +- WiFi +- 1 Gb 网卡 +- 2个USB 3.0端口 + +**价格** + +在$500之内(还没确定)。 + +**发售日期** + +美国地区在2015年3月底 + +#### 2.Compulab出品的Mintbox Mini #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/mintbox-mini.jpeg) + +[Compulab][3]将它的旗舰产品基于Linux Mint的桌面设备成了[Mintbox Mini][4]。紧凑的版本在4″大小。更多的细节如下: + +**规格** + +- AMD A4-6400T 处理器 +- Radeon R3 显卡 +- 4 GB 内存 +- 64 GB SSD +- 2个USB 3.0端口, 3个USB 2.0端口 +- 2个HDMI输出端 +- 802.11 b/g/n Wifi +- 千兆网卡 +- MicroSD读卡器 + +**价格** + +$300起售 + +**发售日期** + +2015第二季度 + +#### 3. Compulab出品的Utilite2 #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Utilite2-ARM-PC.jpg) + +It’s not that Compulab has stuck with Linux Mint only. It announced an ARM desktop PC running Ubuntu in last December. With a size of 3.4″x2.3″, [Utilite2][5] has modest feature and modest price. +Compulab并不是坚持用Linux Mint的。它在去年12月宣布了一款运行Ubuntu的ARM桌面PC。大小是3.4″x2.3″,[Utilite2][5]有最现代的特性和价格 + + +**规格** + +- 高通Snapdragon 600 (APQ8064) 四核 CPU 1.7GHz +- 2GB 内存, 可选32 GB的eMMC mSATA 存储 +- 高通 Adreno™ GPU显卡 +- 1080p 视频回放和捕捉 +- 双天线 WiFi 802.11 和 Bluetooth 4.0 +- 千兆网卡, 4个USB2端口和USB OTG +- 蜂窝调制解调器支持 + +**价格** + +常规版售价$192、带硬盘售价$229。邮费另付。 + +**发售日期** + +现在就可购买。运送将花费4周。 + +#### Think Penguin出品的Penguin Pocket Wee #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Think_Penguin_Pocket_Wee.jpeg) + +[Think Penguin][6]是一家开源硬件生产商。在迷你PC领域,它提供了[Penguin Pocket Wee][7]。大小是4.6″x 4.4″x 1.4″ ,, Penguin Pocket Wee提供了大量的配置。你可以选择处理器、存储、网卡等。你可以选择购买预装你喜欢的Linux发行版,默认系统是Ubuntu。 + +The general configuration is as following: +下面的默认的配置 + +- Intel Core i3 或者 i5处理器,最高支持1080p视频 +- 最高扩展至 16GB 的 DDR3内存 +- Intel HD 显卡 +- Wireless N +- 最大250GB的SSD +- 4个USB 3.0接口 +- Intel 10/100/1000 千兆网卡 + +**价格** + +Basic model starts at $499 and it can go up to $1000 based on the configuration you select. +基础版本$499起售,根据你的配置最大是$1000。 + +**发售日期** + +现在就可下订单。该公司在美国和英国也有办公司,所以应也可以运送到南美和欧洲。 + +### 你会选哪种? ### + +我故意没有介绍[Raspberry Pi 2][8]或者其他Linux微电脑如[Intel的电脑棒][9]。原因是我不认为这些微电脑属于迷你PC的范畴。 + +你怎么看?你想用迷你PC代替你的桌面PC么?是不是还有我没有在**最好的基于Linux的迷你PC**列出的PC?分享你们的观点吧。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/4-linux-based-mini-pc-buy-2015/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:https://system76.com/ +[2]:http://itsfoss.com/system76-unveils-ubuntu-based-mini-pc-meerkat/ +[3]:http://www.compulab.co.il/ +[4]:http://itsfoss.com/mintbox-mini-compact-linux-mint-powered-pc-unveiled/ +[5]:http://www.compulab.co.il/utilite-computer/web/utilite2-overview +[6]:https://www.thinkpenguin.com/ +[7]:https://www.thinkpenguin.com/gnu-linux/penguin-pocket-wee-gnu-linux-desktop +[8]:http://itsfoss.com/raspberry-pi-2-specs/ +[9]:http://itsfoss.com/intels-compute-stick/ From 613bc8c1d3d6012341124bca69f7ae3bc387684e Mon Sep 17 00:00:00 2001 From: zheng Date: Sun, 22 Mar 2015 14:43:33 +0800 Subject: [PATCH 0336/2517] Revert "translated" This reverts commit a71c491feb3ce0f759473337df793999d7865b95. --- ...Linux Based Mini PC You Can Buy In 2015.md | 141 +++++++++++++++++ ...Linux Based Mini PC You Can Buy In 2015.md | 145 ------------------ 2 files changed, 141 insertions(+), 145 deletions(-) create mode 100644 sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md delete mode 100644 translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md diff --git a/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md new file mode 100644 index 0000000000..ced7df8156 --- /dev/null +++ b/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md @@ -0,0 +1,141 @@ +Translating---geekpi + +4 Linux Based Mini PC You Can Buy In 2015 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Linux_Based_Mini_PC.jpg) + +Mini PCs, in my opinion, will takeover the traditional desktop computers in near future. Traditional desktop has a bulky CPU which takes a lot of space with its fan running like a blower. The mini PCs, on the other hand, are tiny and compact. With hardly 4″ or 5″ in size, they can be easily placed on a table. + +Moreover, these mini PCs are fanless which is an added virtue. Of course, you can buy fanless regular desktops but the space consumption is still an issue. Personally, I find the mini PC cute in looks. If you are not a gamer and thinking of buying a new desktop PC, I’ll highly recommend you to **buy a Linux based mini PC**. + +If you go by my recommendation and consider buying it, you might wonder what options do you have. Worry not. In this post we shall see four **Linux based Mini PC that you can buy in 2015**. + +### Linux based mini PCs ### + +Please do note that some of these gadgets might not be available to order just yet. Some of these have been just announced and will be released to public in near future. + +#### 1. Meerkat by System76 #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/system76-meerkat.jpg) + +[System76][1] is a computer manufacturer exclusively dealing with only Ubuntu based desktop, laptops and servers. [System76 announced an Ubuntu based mini PC Meerkat][2] last week. Let’s take a quick look at its specification: + +**Specification** + +- Intel 5th Generation processors, available options i3-5010U and i5-5250U +- up to 2 TB of storage (M.2 SATA SSD) +- 16 GB DDR3 RAM +- Graphics Intel HD 5500 and Intel HD 6000 for i3 and i5 respectively +- 4″ x 4″ in size +- WiFi +- 1 Gb NIC +- 2 USB 3.0 ports + +**Price** + +In the range of $500 (yet to be confirmed). + +**Availability** + +US release by the end of March 2015. + +#### 2. Mintbox Mini by Compulab #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/mintbox-mini.jpeg) + +[Compulab][3] shrunk its flagship Linux Mint based PC devices, Mintbox into [Mintbox Mini][4]. The compact version is around 4″ in size. More details are as following: + +**Specifications** + +- AMD A4-6400T processor +- Radeon R3 graphics processor +- 4 GB RAM +- 64 GB SSD +- 2 USB 3.0 ports, 3 USB 2.0 ports +- 2 HDMI out ports +- 802.11 b/g/n Wifi +- Gigabit Ethernet +- MicroSD reader + +**Price** + +Staring around $300 + +**Availability** + +Second quarter of 2015 + +#### 3. Utilite2 by Compulab #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Utilite2-ARM-PC.jpg) + +It’s not that Compulab has stuck with Linux Mint only. It announced an ARM desktop PC running Ubuntu in last December. With a size of 3.4″x2.3″, [Utilite2][5] has modest feature and modest price. + +**Specifications** + +- Qualcomm Snapdragon 600 (APQ8064) quad-core CPU 1.7GHz +- 2GB RAM, eMMC with optional 32 GB mSATA storage +- Graphics with Qualcomm Adreno™ GPU +- 1080p video playback and capture +- Dual-antenna WiFi 802.11 and Bluetooth 4.0 +- Gigabit Ethernet, 4x USB2, USB OTG +- Cellular modem support + +**Price** + +$192 for regular model, $229 with SSD storage. Shipping charges extra. + +**Availability** + +Available to purchase now. It will take four weeks in shipping. + +#### Penguin Pocket Wee by Think Penguin #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Think_Penguin_Pocket_Wee.jpeg) + +[Think Penguin][6] is a Open Source focused hardware manufacturer. In the mini PC category, it has [Penguin Pocket Wee][7] to offer. With 4.6″x 4.4″x 1.4″ in size, Penguin Pocket Wee provides a number of configuration to you. You can choose between the processors, storage, network adapters and what not. You can choose to buy it pre-installed with your favorite Linux distribution, default OS is Ubuntu. + +The general configuration is as following: + +- Intel Core i3 or i5 processor with support for up to 1080p HD video +- Expandable up to 16GB of DDR3 RAM +- Intel HD graphics +- Wireless N +- Up to 250GB of SSD +- 4 USB 3.0 +- Intel 10/100/1000 Gigabit Ethernet Controller + +**Price** + +Basic model starts at $499 and it can go up to $1000 based on the configuration you select. + +**Availability** + +Available to order now. There are offices in UK and USA so it should be shipping to North America and Europe. + +### What’s your pick? ### + +I have deliberately not included [Raspberry Pi 2][8] or other Linux microcomputer such as [Intel’s Compute Stick][9]. The reason is that I do not think that micro-computers fall in the same categories as mini PCs. + +What do you think? Are you tempted to replace your desktop with a mini PC? Is there another player which I missed in this list of **best Linux based mini PCs**? Do share your views. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/4-linux-based-mini-pc-buy-2015/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:https://system76.com/ +[2]:http://itsfoss.com/system76-unveils-ubuntu-based-mini-pc-meerkat/ +[3]:http://www.compulab.co.il/ +[4]:http://itsfoss.com/mintbox-mini-compact-linux-mint-powered-pc-unveiled/ +[5]:http://www.compulab.co.il/utilite-computer/web/utilite2-overview +[6]:https://www.thinkpenguin.com/ +[7]:https://www.thinkpenguin.com/gnu-linux/penguin-pocket-wee-gnu-linux-desktop +[8]:http://itsfoss.com/raspberry-pi-2-specs/ +[9]:http://itsfoss.com/intels-compute-stick/ diff --git a/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md deleted file mode 100644 index c3aa5b76b5..0000000000 --- a/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md +++ /dev/null @@ -1,145 +0,0 @@ -2015你可以买的一款基于Linux的迷你PC -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Linux_Based_Mini_PC.jpg) - -在我看来迷你PC将在不久的将来会替代传统桌面电脑。传统桌面的有一个像送风机那样占据大量空间的风扇。迷你PC,在另一方面说很小巧和紧凑。通常是4″或者5″大小,可以轻易地放在桌子上。 - -不仅如此,这些迷你PC的无风扇设计是一个好处。当然,你可以购买无风扇的常规电脑,但是空间占用仍然是一个问题。对我个人来说,我觉得迷你PC外观上看着很可爱。如果你不是一个游戏玩家也不想买新的桌面PC,我强烈建议你**购买一个基于Linux的迷你PC**。 - -如果你考虑我的建议买一个,那么你或许想知道该买哪款。不要担心,这篇文章我们会介绍**四款你可以在2015购买的基于Linux的迷你PC**。 - -### 基于Linux的迷你PC ### - -请注意这些PC可能还不能下单。它们中有些还刚刚公布,在不久的将来才会面向公众出售。 - - -#### 1. System76出品的Meerkat #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/system76-meerkat.jpg) - -[System76][1] is a computer manufacturer exclusively dealing with only Ubuntu based desktop, laptops and servers. [System76 announced an Ubuntu based mini PC Meerkat][2] last week. Let’s take a quick look at its specification: -[System76][1] 是一家仅出品基于Ubuntu电脑、笔记本、服务器的电脑生产商。[System76在上周宣布了一款基于Ubuntu的迷你PC][2]。让我看一下它的规格: - -**规格** - -- Intel第五代处理器,共有两种选择 i3-5010U 和 i5-5250U -- 最高2TB存储 (M.2 SATA SSD) -- 16 GB DDR3 内存 -- i3和i5处理器下相应的Intel HD 5500 和 Intel HD 6000显卡 -- 4″ x 4″ 大小 -- WiFi -- 1 Gb 网卡 -- 2个USB 3.0端口 - -**价格** - -在$500之内(还没确定)。 - -**发售日期** - -美国地区在2015年3月底 - -#### 2.Compulab出品的Mintbox Mini #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/mintbox-mini.jpeg) - -[Compulab][3]将它的旗舰产品基于Linux Mint的桌面设备成了[Mintbox Mini][4]。紧凑的版本在4″大小。更多的细节如下: - -**规格** - -- AMD A4-6400T 处理器 -- Radeon R3 显卡 -- 4 GB 内存 -- 64 GB SSD -- 2个USB 3.0端口, 3个USB 2.0端口 -- 2个HDMI输出端 -- 802.11 b/g/n Wifi -- 千兆网卡 -- MicroSD读卡器 - -**价格** - -$300起售 - -**发售日期** - -2015第二季度 - -#### 3. Compulab出品的Utilite2 #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Utilite2-ARM-PC.jpg) - -It’s not that Compulab has stuck with Linux Mint only. It announced an ARM desktop PC running Ubuntu in last December. With a size of 3.4″x2.3″, [Utilite2][5] has modest feature and modest price. -Compulab并不是坚持用Linux Mint的。它在去年12月宣布了一款运行Ubuntu的ARM桌面PC。大小是3.4″x2.3″,[Utilite2][5]有最现代的特性和价格 - - -**规格** - -- 高通Snapdragon 600 (APQ8064) 四核 CPU 1.7GHz -- 2GB 内存, 可选32 GB的eMMC mSATA 存储 -- 高通 Adreno™ GPU显卡 -- 1080p 视频回放和捕捉 -- 双天线 WiFi 802.11 和 Bluetooth 4.0 -- 千兆网卡, 4个USB2端口和USB OTG -- 蜂窝调制解调器支持 - -**价格** - -常规版售价$192、带硬盘售价$229。邮费另付。 - -**发售日期** - -现在就可购买。运送将花费4周。 - -#### Think Penguin出品的Penguin Pocket Wee #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Think_Penguin_Pocket_Wee.jpeg) - -[Think Penguin][6]是一家开源硬件生产商。在迷你PC领域,它提供了[Penguin Pocket Wee][7]。大小是4.6″x 4.4″x 1.4″ ,, Penguin Pocket Wee提供了大量的配置。你可以选择处理器、存储、网卡等。你可以选择购买预装你喜欢的Linux发行版,默认系统是Ubuntu。 - -The general configuration is as following: -下面的默认的配置 - -- Intel Core i3 或者 i5处理器,最高支持1080p视频 -- 最高扩展至 16GB 的 DDR3内存 -- Intel HD 显卡 -- Wireless N -- 最大250GB的SSD -- 4个USB 3.0接口 -- Intel 10/100/1000 千兆网卡 - -**价格** - -Basic model starts at $499 and it can go up to $1000 based on the configuration you select. -基础版本$499起售,根据你的配置最大是$1000。 - -**发售日期** - -现在就可下订单。该公司在美国和英国也有办公司,所以应也可以运送到南美和欧洲。 - -### 你会选哪种? ### - -我故意没有介绍[Raspberry Pi 2][8]或者其他Linux微电脑如[Intel的电脑棒][9]。原因是我不认为这些微电脑属于迷你PC的范畴。 - -你怎么看?你想用迷你PC代替你的桌面PC么?是不是还有我没有在**最好的基于Linux的迷你PC**列出的PC?分享你们的观点吧。 - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/4-linux-based-mini-pc-buy-2015/ - -作者:[Abhishek][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:https://system76.com/ -[2]:http://itsfoss.com/system76-unveils-ubuntu-based-mini-pc-meerkat/ -[3]:http://www.compulab.co.il/ -[4]:http://itsfoss.com/mintbox-mini-compact-linux-mint-powered-pc-unveiled/ -[5]:http://www.compulab.co.il/utilite-computer/web/utilite2-overview -[6]:https://www.thinkpenguin.com/ -[7]:https://www.thinkpenguin.com/gnu-linux/penguin-pocket-wee-gnu-linux-desktop -[8]:http://itsfoss.com/raspberry-pi-2-specs/ -[9]:http://itsfoss.com/intels-compute-stick/ From 5188734f49a8d63039a95f91589f52300d000310 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 22 Mar 2015 14:45:23 +0800 Subject: [PATCH 0337/2517] translated --- ...Linux Based Mini PC You Can Buy In 2015.md | 141 ----------------- ...Linux Based Mini PC You Can Buy In 2015.md | 145 ++++++++++++++++++ 2 files changed, 145 insertions(+), 141 deletions(-) delete mode 100644 sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md create mode 100644 translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md diff --git a/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md deleted file mode 100644 index ced7df8156..0000000000 --- a/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md +++ /dev/null @@ -1,141 +0,0 @@ -Translating---geekpi - -4 Linux Based Mini PC You Can Buy In 2015 -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Linux_Based_Mini_PC.jpg) - -Mini PCs, in my opinion, will takeover the traditional desktop computers in near future. Traditional desktop has a bulky CPU which takes a lot of space with its fan running like a blower. The mini PCs, on the other hand, are tiny and compact. With hardly 4″ or 5″ in size, they can be easily placed on a table. - -Moreover, these mini PCs are fanless which is an added virtue. Of course, you can buy fanless regular desktops but the space consumption is still an issue. Personally, I find the mini PC cute in looks. If you are not a gamer and thinking of buying a new desktop PC, I’ll highly recommend you to **buy a Linux based mini PC**. - -If you go by my recommendation and consider buying it, you might wonder what options do you have. Worry not. In this post we shall see four **Linux based Mini PC that you can buy in 2015**. - -### Linux based mini PCs ### - -Please do note that some of these gadgets might not be available to order just yet. Some of these have been just announced and will be released to public in near future. - -#### 1. Meerkat by System76 #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/system76-meerkat.jpg) - -[System76][1] is a computer manufacturer exclusively dealing with only Ubuntu based desktop, laptops and servers. [System76 announced an Ubuntu based mini PC Meerkat][2] last week. Let’s take a quick look at its specification: - -**Specification** - -- Intel 5th Generation processors, available options i3-5010U and i5-5250U -- up to 2 TB of storage (M.2 SATA SSD) -- 16 GB DDR3 RAM -- Graphics Intel HD 5500 and Intel HD 6000 for i3 and i5 respectively -- 4″ x 4″ in size -- WiFi -- 1 Gb NIC -- 2 USB 3.0 ports - -**Price** - -In the range of $500 (yet to be confirmed). - -**Availability** - -US release by the end of March 2015. - -#### 2. Mintbox Mini by Compulab #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/mintbox-mini.jpeg) - -[Compulab][3] shrunk its flagship Linux Mint based PC devices, Mintbox into [Mintbox Mini][4]. The compact version is around 4″ in size. More details are as following: - -**Specifications** - -- AMD A4-6400T processor -- Radeon R3 graphics processor -- 4 GB RAM -- 64 GB SSD -- 2 USB 3.0 ports, 3 USB 2.0 ports -- 2 HDMI out ports -- 802.11 b/g/n Wifi -- Gigabit Ethernet -- MicroSD reader - -**Price** - -Staring around $300 - -**Availability** - -Second quarter of 2015 - -#### 3. Utilite2 by Compulab #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Utilite2-ARM-PC.jpg) - -It’s not that Compulab has stuck with Linux Mint only. It announced an ARM desktop PC running Ubuntu in last December. With a size of 3.4″x2.3″, [Utilite2][5] has modest feature and modest price. - -**Specifications** - -- Qualcomm Snapdragon 600 (APQ8064) quad-core CPU 1.7GHz -- 2GB RAM, eMMC with optional 32 GB mSATA storage -- Graphics with Qualcomm Adreno™ GPU -- 1080p video playback and capture -- Dual-antenna WiFi 802.11 and Bluetooth 4.0 -- Gigabit Ethernet, 4x USB2, USB OTG -- Cellular modem support - -**Price** - -$192 for regular model, $229 with SSD storage. Shipping charges extra. - -**Availability** - -Available to purchase now. It will take four weeks in shipping. - -#### Penguin Pocket Wee by Think Penguin #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Think_Penguin_Pocket_Wee.jpeg) - -[Think Penguin][6] is a Open Source focused hardware manufacturer. In the mini PC category, it has [Penguin Pocket Wee][7] to offer. With 4.6″x 4.4″x 1.4″ in size, Penguin Pocket Wee provides a number of configuration to you. You can choose between the processors, storage, network adapters and what not. You can choose to buy it pre-installed with your favorite Linux distribution, default OS is Ubuntu. - -The general configuration is as following: - -- Intel Core i3 or i5 processor with support for up to 1080p HD video -- Expandable up to 16GB of DDR3 RAM -- Intel HD graphics -- Wireless N -- Up to 250GB of SSD -- 4 USB 3.0 -- Intel 10/100/1000 Gigabit Ethernet Controller - -**Price** - -Basic model starts at $499 and it can go up to $1000 based on the configuration you select. - -**Availability** - -Available to order now. There are offices in UK and USA so it should be shipping to North America and Europe. - -### What’s your pick? ### - -I have deliberately not included [Raspberry Pi 2][8] or other Linux microcomputer such as [Intel’s Compute Stick][9]. The reason is that I do not think that micro-computers fall in the same categories as mini PCs. - -What do you think? Are you tempted to replace your desktop with a mini PC? Is there another player which I missed in this list of **best Linux based mini PCs**? Do share your views. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/4-linux-based-mini-pc-buy-2015/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:https://system76.com/ -[2]:http://itsfoss.com/system76-unveils-ubuntu-based-mini-pc-meerkat/ -[3]:http://www.compulab.co.il/ -[4]:http://itsfoss.com/mintbox-mini-compact-linux-mint-powered-pc-unveiled/ -[5]:http://www.compulab.co.il/utilite-computer/web/utilite2-overview -[6]:https://www.thinkpenguin.com/ -[7]:https://www.thinkpenguin.com/gnu-linux/penguin-pocket-wee-gnu-linux-desktop -[8]:http://itsfoss.com/raspberry-pi-2-specs/ -[9]:http://itsfoss.com/intels-compute-stick/ diff --git a/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md new file mode 100644 index 0000000000..c3aa5b76b5 --- /dev/null +++ b/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md @@ -0,0 +1,145 @@ +2015你可以买的一款基于Linux的迷你PC +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Linux_Based_Mini_PC.jpg) + +在我看来迷你PC将在不久的将来会替代传统桌面电脑。传统桌面的有一个像送风机那样占据大量空间的风扇。迷你PC,在另一方面说很小巧和紧凑。通常是4″或者5″大小,可以轻易地放在桌子上。 + +不仅如此,这些迷你PC的无风扇设计是一个好处。当然,你可以购买无风扇的常规电脑,但是空间占用仍然是一个问题。对我个人来说,我觉得迷你PC外观上看着很可爱。如果你不是一个游戏玩家也不想买新的桌面PC,我强烈建议你**购买一个基于Linux的迷你PC**。 + +如果你考虑我的建议买一个,那么你或许想知道该买哪款。不要担心,这篇文章我们会介绍**四款你可以在2015购买的基于Linux的迷你PC**。 + +### 基于Linux的迷你PC ### + +请注意这些PC可能还不能下单。它们中有些还刚刚公布,在不久的将来才会面向公众出售。 + + +#### 1. System76出品的Meerkat #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/system76-meerkat.jpg) + +[System76][1] is a computer manufacturer exclusively dealing with only Ubuntu based desktop, laptops and servers. [System76 announced an Ubuntu based mini PC Meerkat][2] last week. Let’s take a quick look at its specification: +[System76][1] 是一家仅出品基于Ubuntu电脑、笔记本、服务器的电脑生产商。[System76在上周宣布了一款基于Ubuntu的迷你PC][2]。让我看一下它的规格: + +**规格** + +- Intel第五代处理器,共有两种选择 i3-5010U 和 i5-5250U +- 最高2TB存储 (M.2 SATA SSD) +- 16 GB DDR3 内存 +- i3和i5处理器下相应的Intel HD 5500 和 Intel HD 6000显卡 +- 4″ x 4″ 大小 +- WiFi +- 1 Gb 网卡 +- 2个USB 3.0端口 + +**价格** + +在$500之内(还没确定)。 + +**发售日期** + +美国地区在2015年3月底 + +#### 2.Compulab出品的Mintbox Mini #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/mintbox-mini.jpeg) + +[Compulab][3]将它的旗舰产品基于Linux Mint的桌面设备成了[Mintbox Mini][4]。紧凑的版本在4″大小。更多的细节如下: + +**规格** + +- AMD A4-6400T 处理器 +- Radeon R3 显卡 +- 4 GB 内存 +- 64 GB SSD +- 2个USB 3.0端口, 3个USB 2.0端口 +- 2个HDMI输出端 +- 802.11 b/g/n Wifi +- 千兆网卡 +- MicroSD读卡器 + +**价格** + +$300起售 + +**发售日期** + +2015第二季度 + +#### 3. Compulab出品的Utilite2 #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Utilite2-ARM-PC.jpg) + +It’s not that Compulab has stuck with Linux Mint only. It announced an ARM desktop PC running Ubuntu in last December. With a size of 3.4″x2.3″, [Utilite2][5] has modest feature and modest price. +Compulab并不是坚持用Linux Mint的。它在去年12月宣布了一款运行Ubuntu的ARM桌面PC。大小是3.4″x2.3″,[Utilite2][5]有最现代的特性和价格 + + +**规格** + +- 高通Snapdragon 600 (APQ8064) 四核 CPU 1.7GHz +- 2GB 内存, 可选32 GB的eMMC mSATA 存储 +- 高通 Adreno™ GPU显卡 +- 1080p 视频回放和捕捉 +- 双天线 WiFi 802.11 和 Bluetooth 4.0 +- 千兆网卡, 4个USB2端口和USB OTG +- 蜂窝调制解调器支持 + +**价格** + +常规版售价$192、带硬盘售价$229。邮费另付。 + +**发售日期** + +现在就可购买。运送将花费4周。 + +#### Think Penguin出品的Penguin Pocket Wee #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Think_Penguin_Pocket_Wee.jpeg) + +[Think Penguin][6]是一家开源硬件生产商。在迷你PC领域,它提供了[Penguin Pocket Wee][7]。大小是4.6″x 4.4″x 1.4″ ,, Penguin Pocket Wee提供了大量的配置。你可以选择处理器、存储、网卡等。你可以选择购买预装你喜欢的Linux发行版,默认系统是Ubuntu。 + +The general configuration is as following: +下面的默认的配置 + +- Intel Core i3 或者 i5处理器,最高支持1080p视频 +- 最高扩展至 16GB 的 DDR3内存 +- Intel HD 显卡 +- Wireless N +- 最大250GB的SSD +- 4个USB 3.0接口 +- Intel 10/100/1000 千兆网卡 + +**价格** + +Basic model starts at $499 and it can go up to $1000 based on the configuration you select. +基础版本$499起售,根据你的配置最大是$1000。 + +**发售日期** + +现在就可下订单。该公司在美国和英国也有办公司,所以应也可以运送到南美和欧洲。 + +### 你会选哪种? ### + +我故意没有介绍[Raspberry Pi 2][8]或者其他Linux微电脑如[Intel的电脑棒][9]。原因是我不认为这些微电脑属于迷你PC的范畴。 + +你怎么看?你想用迷你PC代替你的桌面PC么?是不是还有我没有在**最好的基于Linux的迷你PC**列出的PC?分享你们的观点吧。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/4-linux-based-mini-pc-buy-2015/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:https://system76.com/ +[2]:http://itsfoss.com/system76-unveils-ubuntu-based-mini-pc-meerkat/ +[3]:http://www.compulab.co.il/ +[4]:http://itsfoss.com/mintbox-mini-compact-linux-mint-powered-pc-unveiled/ +[5]:http://www.compulab.co.il/utilite-computer/web/utilite2-overview +[6]:https://www.thinkpenguin.com/ +[7]:https://www.thinkpenguin.com/gnu-linux/penguin-pocket-wee-gnu-linux-desktop +[8]:http://itsfoss.com/raspberry-pi-2-specs/ +[9]:http://itsfoss.com/intels-compute-stick/ From b3a8f81c2804dcb94e7731bad80b793610c8af4f Mon Sep 17 00:00:00 2001 From: LouisWei Date: Sun, 22 Mar 2015 16:48:32 +0800 Subject: [PATCH 0338/2517] translated wi-cuckoo --- ...And Use 'Go For It!' To Do App In Linux.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md diff --git a/translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md b/translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md new file mode 100644 index 0000000000..6fa5899404 --- /dev/null +++ b/translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md @@ -0,0 +1,94 @@ +在Linux上安装与使用‘Go for it!’备忘软件 +=============================================================================== +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_For_It_TODO_Linux.jpeg) + +你在Linux桌面是如何管理任务和备忘的?我喜欢[用Ubuntu的粘滞便签][1]很久了。但是我要面对与其他设备同步的麻烦,特别是我的智能手机。这就是我为什么选择使用[Google Keep][2]的原因了。 + +现在,Google Keep是一款功能丰富的软件,我十分喜爱,而且喜欢到把他叫做[Linux的Evernote][3]地步。但是并不是每个人都喜欢一款功能丰富的备忘录软件。极简主义是目前的主流,很多人喜欢。如果你是极简主义的追求者之一,而且正在寻找一款开源的备忘录软件,那么你应该试一试[Go For It!][4]。 + +### Go For It!高效的Linux桌面软件 ### + +Go For It!是一款简洁的备忘软件,借助定时提醒帮助你专注于工作。所以,你添加一个任务到列表后,可以附上一个定时器。到设定时间后,它就会提醒你去做任务。你可以看看其开发者制作的视频,[Manuel Kehl][5]: + +注释:youtube视频,发布的时候可做成一个链接 + + +### 安装 Go For It!### + +为在Ubuntu 15.04,14.04和其他基于Linux内核的Ubuntu版本,如Linux Mint,初级操作系统Freya等等上面安装 Go For It!请使用这款软件官方的PPA: + + sudo add-apt-repository ppa:mank319/go-for-it + sudo apt-get update + sudo apt-get install go-for-it + +你也可以下载.deb包,Windows安装包和源代码,从下面不同的连接中: + +- [Download source code][6] +- [Download .deb binaries][7] +- [Download for Windows][8] + +### 在Linux桌面使用Go For It!### + +Go For It!使用真心方便。你只需添加任务到列表中,任务会自动存入todo.txt文件中。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux.png) + +默认是为每个任务定时25分钟。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_1.png) + +任务一旦完成,就会被自动存档到done.txt文件中。根据喜好,它会在规定的时间间隔或者任务过期前不久,发送桌面提醒: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Linux_notification.png) + +你可以从配置里面修改所有的喜好。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_2.png) + +目前一切都看着挺好。但是在智能手机上使用体验怎样呢?如果你不能使它在不同设备间同步,那这款高效软件就是不完整的。好消息是Go For It!是基于[todo.txt][9]的,这意味着你可以用第三方软件和像Dropbox一样的云服务来使用它。 + +### 在安卓手机和平板上使用Go For It! ### + +在这里你需要做一些工作。首先的首先,在Linux和你的安卓手机上安装Dropbox,如果之前没有安装的话。下一步你要做的就是要配置Go For It!和 **改todo.txt的目录到Dropbox的路径下**。 + +然后,你得去下载[Simpletask Andriod app][10]。这是免费的应用。安装它。当你第一次运行Simletask的时候,你会被要求关联你的账号到Dropbox: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android_1.jpeg) + +一旦你完成了Simpletask与Dropbox的关联,就可以打开应用。如果你已经修改了Go For It的配置,将文件保存到Dropbox上,你就应该可以在Simpletask里看到。而如果你没有看到,点击应用底部的设置,选择Open Todo file的选项: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android.jpeg) + +现在,你应该可以看到Simpletask同步的任务了。 + +### 总结 ### + +有了Simpletask,你就可以相似地使用它,就像一种[标记语言工具][11]。对于小巧和专注而言,Go For It!是一款不错的备忘软件。一个干净的界面是额外的加分点。拥有它自己的手机应用应该是比较好的,但是我们已经看到了替代的方案。 + +底层来讲,Go For It!不会运行在后台。这就是说,你不得不让它一直保持运行。它甚至没有一个最小化的按钮,这有一点小小的烦扰。我想要看到的是有一个小的指示程序,运行在后台,并且快速进入主面板,这肯定会提升其可用性。 + +是该试试Go For It!了,分享一下你们之间的经历。在Linux桌面上,你还使用了哪些其他的备忘软件?比起其他你最喜欢的同类应用,Go For It!怎么样? + +------------------------------------------------------------------------------- + + +via: http://itsfoss.com/go-for-it-to-do-app-in-linux/ + +作者:[Abhishek][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ +[2]:http://itsfoss.com/install-google-keep-ubuntu-1310/ +[3]:http://itsfoss.com/5-evernote-alternatives-linux/ +[4]:http://manuel-kehl.de/projects/go-for-it/ +[5]:http://manuel-kehl.de/about-me/ +[6]:https://github.com/mank319/Go-For-It +[7]:https://launchpad.net/~mank319/+archive/ubuntu/go-for-it +[8]:http://manuel-kehl.de/projects/go-for-it/download-windows-version/ +[9]:http://todotxt.com/ +[10]:https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en +[11]:http://itsfoss.com/install-latex-ubuntu-1404/ From bfb9f1842ed8462cded239d48399105630c4956d Mon Sep 17 00:00:00 2001 From: lihaiming Date: Sun, 22 Mar 2015 18:37:29 +0800 Subject: [PATCH 0339/2517] =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rm backup server on Linux with BackupPC.md | 37 +-- ...a Web Crawling Tool in Ubuntu 14.04 LTS.md | 33 ++- ...hat is a good IDE for C or C++ on Linux.md | 20 +- ...115 20 Unix Command Line Tricks--Part I.md | 85 +++--- ...inally Lets You Set Menus ToAlways Show.md | 41 +++ ...50119 Ubuntu With XFCE vs Xubuntu Linux.md | 20 +- ...Answers--How to check CPU info on Linux.md | 20 +- ...oad a RPM package without installing it.md | 56 ++++ ... Processes Of A Specific User With slay.md | 10 +- .../20150127 Windows 10 versus Linux.md | 0 ...s Point Signal Strength With wifi-linux.md | 16 +- ...ck up a Debian system using backupninja.md | 41 +-- ...ux Games We Will See In 2015 And Beyond.md | 130 +++++---- ...n source software in the business world.md | 85 ++++++ ...Linux Based Mini PC You Can Buy In 2015.md | 139 --------- ...n source software in the business world.md | 86 ------ .../20150318 The future of Linux storage.md | 82 ++++++ ... Revealed--The best and worst of Docker.md | 66 +++++ ...n local time and UNIX timestamp in Perl.md | 61 ---- ...inal Commands That Will Rock Your World.md | 266 +++++++++++++++++ ...0150318 Fedora GNOME Keyboard Shortcuts.md | 213 ++++++++++++++ ...M (Logical Volume Management) in Ubuntu.md | 268 ++++++++++++++++++ ...r Easy Partition Resizing and Snapshots.md | 67 +++++ ...irectory with Samba on Fedora or CentOS.md | 144 ++++++++++ ...And Use 'Go For It!' To Do App In Linux.md | 94 ++++++ ... Smart phones Using Prey Tool in Ubuntu.md | 70 +++++ ...o Analyze Disk Images and Recover Files.md | 159 +++++++++++ ...Linux Based Mini PC You Can Buy In 2015.md | 145 ++++++++++ ...inally Lets You Set Menus ToAlways Show.md | 42 --- ...g kernel code get hired really quickly'.md | 39 +++ ...oad a RPM package without installing it.md | 55 ---- ...16 Install Mate desktop in FreeBSD 10.1.md | 28 +- ...n local time and UNIX timestamp in Perl.md | 62 ++++ 33 files changed, 2088 insertions(+), 592 deletions(-) rename {translated/tech => published}/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md (56%) rename {translated/tech => published}/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md (80%) rename {translated/share => published}/20150114 What is a good IDE for C or C++ on Linux.md (61%) rename {translated/tech => published}/20150115 20 Unix Command Line Tricks--Part I.md (73%) create mode 100644 published/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md rename {translated/share => published}/20150119 Ubuntu With XFCE vs Xubuntu Linux.md (91%) rename {translated/tech => published}/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md (73%) create mode 100644 published/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md rename {translated/tech => published}/20150126 How To Kill All Processes Of A Specific User With slay.md (83%) rename {translated/talk => published}/20150127 Windows 10 versus Linux.md (100%) rename {translated/tech => published}/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md (71%) rename {translated/tech => published}/20150209 How to back up a Debian system using backupninja.md (53%) rename {translated/talk => published}/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md (53%) create mode 100644 published/20150309 10 best uses for open source software in the business world.md delete mode 100644 sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md delete mode 100644 sources/talk/20150309 10 best uses for open source software in the business world.md create mode 100644 sources/talk/20150318 The future of Linux storage.md create mode 100644 sources/talk/20150320 Revealed--The best and worst of Docker.md delete mode 100644 sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md create mode 100644 sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md create mode 100644 sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md create mode 100644 sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md create mode 100644 sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md create mode 100644 sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md create mode 100644 sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md create mode 100644 sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md create mode 100644 sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md create mode 100644 translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md delete mode 100644 translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md create mode 100644 translated/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md delete mode 100644 translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md rename {sources => translated}/tech/20150316 Install Mate desktop in FreeBSD 10.1.md (55%) create mode 100644 translated/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md diff --git a/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md b/published/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md similarity index 56% rename from translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md rename to published/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md index 9dd434a809..24daaf3424 100644 --- a/translated/tech/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md +++ b/published/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md @@ -1,12 +1,12 @@ -如何在 Linux 上使用 BackupPC 来设置一个跨平台的备份服务器 +如何在 Linux 上使用 BackupPC 来架设跨平台的备份服务器 ================================================================================ -为了防止你不能分辨这篇教程和我先前关于[backupninja][1] 和 [backup-manager][2] 的帖子,=== 我是一个积极的备份迷。当提到备份,我宁愿备份的太多而不希望备份不足,因为如果我们有需要的话,你将会感激你花费了时间和精力来为你的重要数据生成额外的拷贝。 +也许你没有从我先前关于 [backupninja][1] 和 [backup-manager][2] 的两篇文章中发现,我是一个超级备“粉”。当提到备份,我宁愿备份的太多而不希望备份不足,因为如果我们有需要的话,你将会感激你为重要数据生成额外的拷贝所付出的时间和精力。 -在这篇帖子中,我将向你介绍 [BackupPC][3],一个跨平台的备份服务器软件,它可以通过网络为 Linux,Windows 和 MacOS 等系统上的客户端主机拉取备份。BackupPC 添加了一系列的特点使得管理备份变为一件快乐的事。 +在这篇文章中,我将向你介绍 [BackupPC][3],一个跨平台的备份服务器软件,它可以通过网络为 Linux,Windows 和 MacOS 等系统上的客户端主机拉取备份。BackupPC 添加了一系列的特点使得管理备份变为一件快乐的事。 ### BackupPC 的特点 ### -BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收集和管理其他远程客户端主机上的备份。通过使用它的 Web 界面,你可以检查日志和配置文件、为其他远程主机启动/取消/安排备份任务以及可视化备份任务的当前状态。你也可以非常容易地浏览归档的文件以及从备份的归档中恢复个人文件或整个作业。为了恢复单一的个人文件,你可以直接通过 Web 界面来下载任何先前备份的文件。若如这还不够,针对客户端主机,没有特别的客户端软件需要安装。在 Windows 客户端上, 本机 SMB 协议将被使用,而对于 *nix 客户端,你将使用 `rsync` 或 通过 SSH, RSH 或 NFS 来使用 `tar` 。 +BackupPC 自带有一个健壮的 Web 界面,允许你以集中化的方式来收集和管理其他远程客户端主机上的备份。通过使用它的 Web 界面,你可以检查日志和配置文件、为其他远程主机启动/取消/安排备份任务以及可视化备份任务的当前状态。你也可以非常容易地浏览归档的文件以及从备份的归档中恢复单个文件或整个备份。要恢复单个文件,你可以直接通过 Web 界面来下载任何先前备份的文件。不仅如此,客户端主机并不需要安装特别的客户端软件。在 Windows 客户端上, 使用的是原生的 SMB 协议,而对于 *nix 客户端,你将使用 `rsync` 或 通过 SSH, RSH 或 NFS 来使用 `tar` 。 ### 安装 BackupPC ### @@ -20,13 +20,13 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 # yum install BackupPC -同往常一样,这两种包管理系统都会自动地对依赖问题进行解决。另外,作为安装过程中的一部分,你可能会被要求去配置或重新配置用于图形用户界面的 Web 服务器。下面的截图来自于 Debian 系统: +同往常一样,这两种包管理系统都会自动解决依赖问题。另外,作为安装过程中的一部分,你可能需要新配置或修改配置用于图形用户界面的 Web 服务器。下面的截图来自于 Debian 系统: ![](https://farm8.staticflickr.com/7573/16163781711_6218b620ef_c.jpg) 通过空格键来确定你的选择,然后使用 tab 键移动到 Ok 选项并敲回车键。 -接着类似于下面的截屏将会呈现在你眼前,通知你一个用来管理 BackupPC 的名为 ‘backuppc’的管理员用户以及相应的密码(这个密码可以在以后被更改,如果你希望的话)已经被创建。这里需要注意的是:同样名为 ‘backuppc’的一个 HTTP 账户和一个常规的 Linux 账户将会被创建,它们使用同一个密码。需要前者的目的是来访问受保护的 BackupPC 的 Web 界面,而后者则是为了通过 SSH 来使用 `rsync` 来执行备份任务。 +接着类似于下面的截屏将会呈现在你眼前,通知你创建了一个用来管理 BackupPC 的名为 ‘backuppc’的管理员用户以及相应的密码(如果你需要,这个密码以后可以更改)。这里需要注意的是:这里创建了同样名为 ‘backuppc’的 HTTP 账户和常规的 Linux 账户,它们使用相同的密码。需要前者的目的是来访问受保护的 BackupPC 的 Web 界面,而后者则是为了通过 SSH 来使用 `rsync` 来执行备份任务。 ![](https://farm8.staticflickr.com/7579/15979622809_25e734658d_c.jpg) @@ -42,7 +42,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ### 启动 BackupPC 并设置备份 ### -首先,打开一个浏览器窗口并指向 http:///backuppc/ 。当弹出提示框时,输入先前向你提供的默认 HTTP 用户凭据(注:即用户名 backuppc 和相应的默认密码)。假如认证成功,你就会被带入到 Web 界面的主页: +首先,打开一个浏览器窗口并指向 http://\<服务器名称或 IP 地址>/backuppc/ 。当弹出提示框时,输入先前向你创建的默认 HTTP 用户凭据(注:即用户名 backuppc 和相应的默认密码)。假如认证成功,你就会被带入到 Web 界面的主页: ![](https://farm9.staticflickr.com/8601/15543330314_f6fdaa235e_z.jpg) @@ -51,9 +51,9 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 - Host #1: CentOS 7 [IP 192.168.0.17] - Host #2: Windows 7 [IP 192.168.0.103] -我们将通过 SSH 使用 `rsync`来备份 CentOS 主机,使用 SMB 来备份 Windows 主机。在执行备份之前,我们需要向我们的 CentOS 主机设置 [基于密码认证][7](注:这里我不知如何翻译,根据链接,感觉是无需密码来连接主机)以及在我们的 Windows 主机中设置一个共享目录。 +我们将通过 SSH 使用 `rsync`来备份 CentOS 主机,使用 SMB 来备份 Windows 主机。在执行备份之前,我们需要向我们的 CentOS 主机设置 [基于密钥认证][7] 以及在我们的 Windows 主机中设置一个共享目录。 -下面是关于如何为一个远程 CentOS 主机设置 key-based authentication 的指导。我们创建 ‘backuppc’ 用户的 RSA 密钥对,并向 CentOS 主机上的 root 账户传递它的公共密钥。 +下面是关于如何为一个远程 CentOS 主机设置基于密钥认证的指导。我们创建 ‘backuppc’ 用户的 RSA 密钥对,并将其公钥传输给 CentOS 主机上的 root 账户。 # usermod -s /bin/bash backuppc # su - backuppc @@ -64,13 +64,13 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ![](https://farm8.staticflickr.com/7496/16164929932_8fc817125d_b.jpg) -你需要一个远程的 CentOS 主机的 root 权限来在该主机中的文件系统中发放写权限,以防要恢复的备份文件或目录的所有者为 root 账户。 +你需要一个远程的 CentOS 主机的 root 权限,以获得在该主机中的文件系统中写权限,以防要恢复的备份文件或目录的所有者为 root 账户。 一旦 CentOS 和 Windows 主机都准备完毕,使用 Web 界面将它们添加到 BackupPC: ![](https://farm9.staticflickr.com/8586/15979622709_76c2dcf68c_z.jpg) -下一步的内容由更改每个主机的备份设置组成: +下一步更改每个主机的备份设置: ![](https://farm8.staticflickr.com/7461/16163781611_765c147f9f_z.jpg) @@ -88,7 +88,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ![](https://farm8.staticflickr.com/7536/15978247428_458c023f4c.jpg) -在任何时候,你都可以通过点击如上图展示的每个主机的备份主页来查看备份任务的状态。假如因为某些原因备份失败,在主机菜单中将会出现一个指向包含错误信息的网页的链接。当一个备份任务被成功地完成,一个被命名为主机名或 IP 地址的目录将会在服务器的 /var/lib/backuppc/pc 目录下被创建。 +在任何时候,你都可以通过点击如上图展示的每个主机的备份主页来查看备份任务的状态。假如因为某些原因备份失败,在主机菜单中将会出现一个指向包含错误信息的网页的链接。当一个备份任务成功完成后,在服务器的 /var/lib/backuppc/pc 目录下会创建一个命名为主机名或 IP 地址的目录。 ![](https://farm8.staticflickr.com/7549/16165680115_196ee42a49_z.jpg) @@ -96,7 +96,7 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 ### 恢复备份 ### -为了浏览已经保存过的文件。进入每个主机的主菜单下的 “浏览备份”选项,你可以一目了然地看到目录和文件,并选择那些你想恢复的文件。另外,你还可以通过点击文件来使用默认程序打开文件或右击文件并选择“另存为”来下载该文件到你正在工作的机器上: +要浏览这些保存的文件,进入每个主机的主菜单下的 “浏览备份”选项,你可以一目了然地看到目录和文件,并选择那些你想恢复的文件。另外,你还可以通过点击文件来使用默认程序打开文件或右击文件并选择“另存为”来下载该文件到你当前的机器上: ![](https://farm8.staticflickr.com/7506/16165680105_bd5883e0da_c.jpg) @@ -113,21 +113,22 @@ BackupPC 自带有一个健壮的 Web 界面,允许你以集中的方式来收 有句俗话说,"越简单,越好",而这正是 BackupPC 所提供的东西。在 BackupPC 中,你将不仅找到了一个备份工具,而且还找到了一个无需任何客户端应用来在几个不同的操作系统中管理你的备份的方法。我相信这就有足够的理由让你去尝试一下。 欢迎使用下面的评论框来留下你的评论和问题,假如你有的话。我总是乐于听取读者想说的话! + -------------------------------------------------------------------------------- via: http://xmodulo.com/backuppc-cross-platform-backup-server-linux.html 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/gabriel -[1]:http://xmodulo.com/backup-debian-system-backupninja.html -[2]:http://xmodulo.com/linux-backup-manager.html +[1]:http://linux.cn/article-5096-1.html +[2]:http://linux.cn/article-4586-1.html [3]:http://backuppc.sourceforge.net/ -[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[5]:http://ask.xmodulo.com/enable-nux-dextop-repository-centos-rhel.html +[4]:http://linux.cn/article-2324-1.html +[5]:http://linux.cn/article-3889-1.html [6]:http://xmodulo.com/recommend/linuxguide [7]:http://xmodulo.com/how-to-enable-ssh-login-without.html diff --git a/translated/tech/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md b/published/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md similarity index 80% rename from translated/tech/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md rename to published/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md index 672548853b..6ab4241c76 100644 --- a/translated/tech/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md +++ b/published/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md @@ -1,4 +1,4 @@ -如何在Ubuntu 14.04 LTS安装网络爬虫工具 +如何在Ubuntu 14.04 LTS安装网络爬虫工具:Scrapy ================================================================================ 这是一款提取网站数据的开源工具。Scrapy框架用Python开发而成,它使抓取工作又快又简单,且可扩展。我们已经在virtual box中创建一台虚拟机(VM)并且在上面安装了Ubuntu 14.04 LTS。 @@ -6,13 +6,13 @@ Scrapy依赖于Python、开发库和pip。Python最新的版本已经在Ubuntu上预装了。因此我们在安装Scrapy之前只需安装pip和python开发库就可以了。 -pip是作为python包索引器easy_install的替代品。用于安装和管理Python包。pip包的安装可见图 1。 +pip是作为python包索引器easy_install的替代品,用于安装和管理Python包。pip包的安装可见图 1。 sudo apt-get install python-pip ![Fig:1 Pip installation](http://blog.linoxide.com/wp-content/uploads/2014/11/f1.png) -图:1 pip安装 +*图:1 pip安装* 我们必须要用下面的命令安装python开发库。如果包没有安装那么就会在安装scrapy框架的时候报关于python.h头文件的错误。 @@ -20,42 +20,41 @@ pip是作为python包索引器easy_install的替代品。用于安装和管理Py ![Fig:2 Python Developer Libraries](http://blog.linoxide.com/wp-content/uploads/2014/11/f2.png) -图:2 Python 开发库 +*图:2 Python 开发库* -scrapy框架即可从deb包安装也可以从源码安装。然而在图3中我们已经用pip(Python 包管理器)安装了deb包了。 +scrapy框架既可从deb包安装也可以从源码安装。在图3中我们用pip(Python 包管理器)安装了deb包了。 sudo pip install scrapy ![Fig:3 Scrapy Installation](http://blog.linoxide.com/wp-content/uploads/2014/11/f3.png) -图:3 Scrapy 安装 +*图:3 Scrapy 安装* 图4中scrapy的成功安装需要一些时间。 ![Fig:4 Successful installation of Scrapy Framework](http://blog.linoxide.com/wp-content/uploads/2014/11/f4.png) -图:4 成功安装Scrapy框架 +*图:4 成功安装Scrapy框架* ### 使用scrapy框架提取数据 ### -**(基础教程)** +####基础教程#### -我们将用scrapy从fatwallet.com上提取店名(提供卡的店)。首先,我们使用下面的命令新建一个scrapy项目“store name”, 见图5。 +我们将用scrapy从fatwallet.com上提取商店名称(卖卡的店)。首先,我们使用下面的命令新建一个scrapy项目“store name”, 见图5。 $sudo scrapy startproject store_name ![Fig:5 Creation of new project in Scrapy Framework](http://blog.linoxide.com/wp-content/uploads/2014/11/f5.png) -图:5 Scrapy框架新建项目 +*图:5 Scrapy框架新建项目* -Above command creates a directory with title “store_name” at current path. This main directory of the project contains files/folders which are shown in the following Figure 6. 上面的命令在当前路径创建了一个“store_name”的目录。项目主目录下包含的文件/文件夹见图6。 $sudo ls –lR store_name ![Fig:6 Contents of store_name project.](http://blog.linoxide.com/wp-content/uploads/2014/11/f6.png) -图:6 store_name项目的内容 +*图:6 store_name项目的内容* 每个文件/文件夹的概要如下: @@ -66,13 +65,13 @@ Above command creates a directory with title “store_name” at current path. T - store_name/settings.py 是项目的配置文件 - store_name/spiders/, 包含了用于爬取的蜘蛛 -由于我们要从fatwallet.com上如提取店名,因此我们如下修改文件。 +由于我们要从fatwallet.com上如提取店名,因此我们如下修改文件(LCTT 译注:这里没说明是哪个文件,译者认为应该是 items.py)。 import scrapy class StoreNameItem(scrapy.Item): - name = scrapy.Field() # extract the names of Cards store + name = scrapy.Field() # 取出卡片商店的名称 之后我们要在项目的store_name/spiders/文件夹下写一个新的蜘蛛。蜘蛛是一个python类,它包含了下面几个必须的属性: @@ -80,7 +79,7 @@ Above command creates a directory with title “store_name” at current path. T 2. 爬取起点url (start_urls) 3. 包含了从响应中提取需要内容相应的正则表达式的解析方法。解析方法对爬虫而言很重要。 -我们在store_name/spiders/目录下创建了“store_name.py”爬虫,并添加如下的代码来从fatwallet.com上提取点名。爬虫的输出到文件(**StoreName.txt**)中,见图7。 +我们在store_name/spiders/目录下创建了“store_name.py”爬虫,并添加如下的代码来从fatwallet.com上提取店名。爬虫的输出写到文件(**StoreName.txt**)中,见图7。 from scrapy.selector import Selector from scrapy.spider import BaseSpider @@ -113,7 +112,7 @@ Above command creates a directory with title “store_name” at current path. T ![Fig:7 Output of the Spider code .](http://blog.linoxide.com/wp-content/uploads/2014/11/f7.png) -图:7 爬虫的输出 +*图:7 爬虫的输出* *注意: 本教程的目的仅用于理解scrapy框架* @@ -123,7 +122,7 @@ via: http://linoxide.com/ubuntu-how-to/scrapy-install-ubuntu/ 作者:[nido][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/share/20150114 What is a good IDE for C or C++ on Linux.md b/published/20150114 What is a good IDE for C or C++ on Linux.md similarity index 61% rename from translated/share/20150114 What is a good IDE for C or C++ on Linux.md rename to published/20150114 What is a good IDE for C or C++ on Linux.md index 32d7371d18..e0e960744a 100644 --- a/translated/share/20150114 What is a good IDE for C or C++ on Linux.md +++ b/published/20150114 What is a good IDE for C or C++ on Linux.md @@ -1,24 +1,24 @@ -Linux上有哪些比较好的C/C++ IDE? +Linux 上的最佳 C/C++ IDE ================================================================================ -"一个真正的程序员是不用IDE(译者注:集成开发环境)的,他们都是用带着某某插件的文本编辑器来写代码。"我们总能在某些地方听到此类观点。然而,尽管越来越多的人同意这样的观点,但是一个IDE仍然非常有用,它设置简单,使用起来也很方便,因此没有更好办法能像这样来编写一个项目了。所以鉴于这点,在这里我想给大家列一份在linux平台上比较好的C/C++ IDE清单。为什么特地说C/C++呢?因为C语言是我最喜欢的编程语言而且我们总要找个切入点来开始。另外要注意的是,通常有很多种编写C代码的方法,所以为了消减清单的篇幅,我只选择了"真正好用的IDE",而不是诸如Gedit或Vim这种注入[插件][1]的文本编辑器。并不是说这些编辑器在任何情况下都不好,只是如果我将文本编辑器包含进去那这份清单就将永无止境了。 +"一个真正的程序员是不用IDE(译者注:集成开发环境)的,他们都是用带着某某插件的文本编辑器来写代码。"我们总能在某些地方听到此类观点。然而,尽管越来越多的人同意这样的观点,但是一个IDE仍然非常有用,它设置简单,使用起来也很方便,因此不能比这样更合适编写一个项目了。所以鉴于这点,在这里我想给大家列一份在Linux平台上比较好的C/C++ IDE清单。为什么特地说C/C++呢?因为C语言是我最喜欢的编程语言,而且我们总要找个切入点来开始。另外要注意的是,通常有很多种编写C代码的方法,所以为了消减清单的篇幅,我只选择了"真正好用的IDE",而不是诸如Gedit或Vim这种注入[插件][1]的文本编辑器。并不是说这些编辑器不好,只是如果我将文本编辑器包含进去那这份清单就将永无止境了。 ### 1. Code::Blocks ### ![](https://farm8.staticflickr.com/7520/16089880989_10173db27b_c.jpg) -用我个人的最爱来开篇,[Code::Blocks][2]是一款简单快速的专有C/C++ IDE。就像任何一款强大的IDE一样, 它集成了语法高亮、书签功能、自动补全功能、项目管理和一个调试器。它闪耀的地方在于它简单的插件系统,里面添加了不可缺少的工具,像Valgrind和CppCheck,还有不太重要的比如像俄罗斯方块这样的小游戏。但是我特别喜欢它的理由是它连贯方便的快捷键设定和大量的却感受不到受压迫的选项设置。 +用我个人的最爱来开篇,[Code::Blocks][2]是一款简单快速的专有C/C++ IDE。就像任何一款强大的IDE一样, 它集成了语法高亮、书签功能、自动补全功能、项目管理和一个调试器。它最闪亮的地方在于它简单的插件系统,里面添加了不可缺少的工具,像Valgrind和CppCheck,还有不太重要的比如像俄罗斯方块这样的小游戏。但是我特别喜欢它的理由是它连贯方便的快捷键设定和大量的却感受不到拥挤的选项设置。 ### 2. Eclipse ### ![](https://farm8.staticflickr.com/7522/16276001255_66235a0a69_c.jpg) -我知道我只说"真正好用的IDE"而不是带着插件的文本编辑器,但是,[Eclipse][3]的确是一款"真正好用的IDE",只是Eclipse需要一些[plugin][4](或经过一些改装)来编写C程序,所以严格来说我无法反驳我自己。而且,做一份IDE清单不提到Eclipse这个“巨人”是不可能的事情。无论喜欢它与否,Eclipse仍然是一款强大的Java编程工具。这里要感谢[CDT 项目][5],让Eclipse编写C程序变得可能。你同样可以体验到Eclipse的强大功能包括它的一些传统功能特点比如自动补全、代码大纲、代码生成器和先进的重构功能。照我话说,它的不足之处在于它不如Code::Blocks那么轻量级,它仍然很臃肿,要花费很多时间去载入。但是如果你的电脑可以驾驭它,或者你是个忠实的Eclipse粉,那么它一定是你的不二选择。 +我知道我只说"真正好用的IDE"而不是带着插件的文本编辑器,但是,[Eclipse][3]的确是一款"真正好用的IDE",只是Eclipse需要一些[插件][4](或经过一些改装)来编写C程序,所以严格来说我无法反驳我自己。而且,做一份IDE清单不提到Eclipse这个“巨人”是不可能的事情。无论喜欢它与否,Eclipse仍然是一款强大的Java编程工具。这里要感谢[CDT 项目][5],让Eclipse编写C程序变得可能。你同样可以体验到Eclipse的强大功能,包括它的一些传统功能特点比如自动补全、代码大纲、代码生成器和先进的重构功能。照我话说,它的不足之处在于它不如Code::Blocks那么轻量级,它仍然很臃肿,要花费很多时间去载入。但是如果你的电脑可以驾驭它,或者你是个忠实的Eclipse粉,那么它一定是你的不二选择。 ### 3. Geany ### ![](https://farm9.staticflickr.com/8573/16088461968_c6a6c9e49a_c.jpg) -牺牲了很多特色功能但是增加了很多灵活性,[Geany][6]就是这样一款与Eclipse对立的软件。但是对于它所缺乏的地方(比如说没有调试器), Geany用一些漂亮小巧的特色功能弥补了它们:一个可以做笔记的区域、基于模板创作、代码大纲、自定义快捷键和插件管理。相比于现在的IDE,Geany仍然是一款作用广泛的文本编辑器,然而,因为它的功能亮点和它的界面设计,所以我把它放在这份列表里。 +牺牲了很多特色功能但是增加了很多灵活性,[Geany][6]就是这样一款与Eclipse对立的软件。但是对于它所缺乏的地方(比如说没有调试器), Geany用一些漂亮小巧的特色功能弥补了它们:一个可以做笔记的区域、基于模板创作、代码大纲、自定义快捷键和插件管理。相比于现在的IDE,Geany仍然是一款作用广泛的文本编辑器,然而,因为它的功能亮点和它的界面设计,所以我把它放在这份列表里。 ### 4. MonoDevelop ### @@ -30,19 +30,19 @@ Linux上有哪些比较好的C/C++ IDE? ![](https://farm8.staticflickr.com/7514/16088462018_7ee6e5b433_c.jpg) -它身上有着强烈的“GNOME感”,[Anjuta][8]的外观很具争议。我倾向于把它看作是带着调试器的Geany升级版,但是它的界面实际上要复杂得多。我确实很享受能在项目、文件夹和代码大纲视图之间来回切换的标签系统,我本想用诸如更多的快捷方法来移动文件,然而,这是一个很好的提供了显著编译功能和构建选项的工具,它能够支持哪些很有特点的需求。 +它身上有着强烈的“GNOME即视感”,[Anjuta][8]的外观很具争议。我倾向于把它看作是带着调试器的Geany升级版,但是它的界面实际上要复杂得多。我确实很享受能在项目、文件夹和代码大纲视图之间来回切换的标签系统,我本想用诸如更多的快捷方法来移动文件,然而,这是一个很好的提供了显著编译功能和构建选项的工具,它能够支持哪些很有特点的需求。 ### 6. Komodo Edit ### ![](https://farm8.staticflickr.com/7502/16088462028_81d1114c84_c.jpg) -我不是非常熟悉[Komodo Edit][9],但是在试用了一段时间之后,我被它很多很多的优点给惊喜到了。首先,基于标签的导航功能很有很强的可预见性。其次它奇特的代码大纲让我想到了Sublime Text。此外,它的宏系统和文件比较器使得Komodo Edit非常实用。它的插件库让它几乎是完美的,说“几乎”是因为在其它IDE里我的确找不到能与之相媲美的快捷方法了。而且我们能享受到更多特别的C/C++工具,这往往是普通IDE的不足之处。然而,Komodo Edit就能做到。 +我不是非常熟悉[Komodo Edit][9],但是在试用了一段时间之后,我被它很多很多的优点给惊喜到了。首先,基于标签的导航功能有很强的可预见性。其次它奇特的代码大纲让我想到了Sublime Text。此外,它的宏系统和文件比较器使得Komodo Edit非常实用。它的插件库让它几乎是完美的,说“几乎”是因为在其它IDE里我的确找不到能与之相媲美的快捷方法了。而且我们能享受到更多特别的C/C++工具,这往往是普通IDE的不足之处。然而,Komodo Edit就能做到。 ### 7. NetBeans ### ![](https://farm8.staticflickr.com/7569/16089881229_98beb0fce3_c.jpg) -就好像Eclipse一样,这又是一款不得不提的“巨人级”软件。拥有的功能包括通过标签进行导航、项目管理、代码大纲、更改历史追踪和大量工具,[NetBeans][10]可能是最完整的IDE了,我能用半页来列出它所有让人震惊的特色功能。但是这同时也很容易地向你透露了它的主要缺点,它太臃肿了。比起它的强大,我更喜欢基于插件的软件因为我觉得不太会有人为了一个同样的项目同时需要Git和Mercurial相结合来工作,我是不是很疯狂。但是如果你有耐心去掌握它所有的选项,那你差不多无论到哪里都是IDE大师了。 +就好像Eclipse一样,这又是一款不得不提的“巨人级”软件。拥有的功能包括通过标签进行导航、项目管理、代码大纲、更改历史追踪和大量工具,[NetBeans][10]可能是最完整的IDE了,我能用半页来列出它所有让人震惊的特色功能。但是这同时也很容易地向你透露了它的主要缺点,它太臃肿了。比起它的强大,我更喜欢基于插件的软件,因为我觉得不太会有人为了一个同样的项目同时需要Git和Mercurial相结合来工作,我是不是很疯狂?但是如果你有耐心去掌握它所有的选项,那你差不多无论到哪里都是IDE大师了。 ### 8. KDevelop ### @@ -56,7 +56,7 @@ Linux上有哪些比较好的C/C++ IDE? 留在最后的不代表是最差的,[CodeLite][12]展现给你一种传统的编程规则却仍然能让你从它身上那特有的感觉上有所收获,即使它的界面一开始的确让我想到了Code::Blocks和Anjuta,只是不包括大量的插件库。无论你想要比较文件、插入一条版权块、定义缩略语或者用Git来工作,总有一款插件适合你。如果我不得不挑点毛病,我想说它缺乏一些符合我口味的导航快捷键,但这是真的。 -最后,我希望这份清单能让你给自己最喜欢的语言探索到更多新的IDE。虽然Code::Blocks仍然是我的最爱,不过它有一些很强大的对手。当然我们也可以远离Linux上的IDE用文本编辑器去编写C/C++代码。所以如果你有什么其它的建议想法,在评论中让我们获悉。或者如果你想要我再说说关于一些其它语言的IDE,也可以评论里提出。 +最后,我希望这份清单能让你给自己最喜欢的语言探索到更多新的IDE。虽然Code::Blocks仍然是我的最爱,不过它有一些很强大的对手。当然我们也可以远离Linux上的IDE,而用文本编辑器去编写C/C++代码。所以如果你有什么其它的建议想法,在评论中让我们获悉。或者如果你想要我再说说关于一些其它语言的IDE,也可以评论里提出。 -------------------------------------------------------------------------------- @@ -64,7 +64,7 @@ via: http://xmodulo.com/good-ide-for-c-cpp-linux.html 作者:[Adrien Brochard][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150115 20 Unix Command Line Tricks--Part I.md b/published/20150115 20 Unix Command Line Tricks--Part I.md similarity index 73% rename from translated/tech/20150115 20 Unix Command Line Tricks--Part I.md rename to published/20150115 20 Unix Command Line Tricks--Part I.md index b178a61db9..deaaef6bfa 100644 --- a/translated/tech/20150115 20 Unix Command Line Tricks--Part I.md +++ b/published/20150115 20 Unix Command Line Tricks--Part I.md @@ -1,6 +1,6 @@ -20个Unix命令技巧 - 第一部分 +20个 Unix/Linux 命令技巧(一) ================================================================================ -让我们用**这些Unix命令技巧**开启新的一年,提高在终端下的生产力。我已经找了很久了,现在就与你们分享。 +让我们用**这些Unix/Linux命令技巧**开启新的一年,提高在终端下的生产力。我已经找了很久了,现在就与你们分享。 ![](http://s0.cyberciti.org/uploads/cms/2015/01/unix-command-line-tricks.001.jpg) @@ -9,16 +9,15 @@ 我在生产服务器上有一个很大的200GB的日志文件需要删除。我的rm和ls命令已经崩溃,我担心这是由于巨大的磁盘IO造成的,要删除这个大文件,输入: > /path/to/file.log - # or use the following syntax + # 或使用如下格式 : > /path/to/file.log - # finally delete it + # 然后删除它 rm /path/to/file.log -### 如何缓存终端输出? ### - -尝试使用script命令行工具来为你的终端输出创建typescript。 +### 如何记录终端输出? ### +试试使用script命令行工具来为你的终端输出创建输出记录。 script my.terminal.sessio @@ -28,7 +27,7 @@ date sudo service foo stop -要退出(结束script绘画),输入*exit* 或者 *logout* 或者按下 *control-D* +要退出(结束script会话),输入 *exit* 或者 *logout* 或者按下 *control-D*。 exit @@ -38,11 +37,10 @@ less my.terminal.session cat my.terminal.session -### 还原删除的 /tmp 文件夹 ### +### 还原被删除的 /tmp 文件夹 ### 我在文章[Linux和Unix shell,我犯了一些错误][1]。我意外地删除了/tmp文件夹。要还原它,我需要这么做: - mkdir /tmp chmod 1777 /tmp chown root:root /tmp @@ -50,11 +48,11 @@ ### 锁定一个文件夹 ### -为了我的数据隐私,我想要锁定我文件服务器下的/downloads文件夹。因此我运行: +为了我的数据隐私,我想要锁定我文件服务器下的/downloads文件夹。因此我运行了: chmod 0000 /downloads -root用户仍旧可以访问,但是ls和cd命令还不可用。要还原它用: +root用户仍旧可以访问,而ls和cd命令则不工作。要还原它用: chmod 0755 /downloads @@ -66,40 +64,40 @@ root用户仍旧可以访问,但是ls和cd命令还不可用。要还原它用 或者,在退出vim之前使用:X 命令来加密你的文件,vim会提示你输入一个密码。 -### 清除屏幕上的输出 ### +### 清除屏幕上的乱码 ### 只要输入: reset -### 成为人类 ### +### 易读格式 ### -传递*-h*或者*-H*(和其他选项)选项给GNU或者BSD工具来获取像ls、df、du等命令以人类可读的格式输出: +传递*-h*或者*-H*(和其他选项)选项给GNU或者BSD工具来获取像ls、df、du等命令以易读的格式输出: ls -lh - # 以人类可读的格式 (比如: 1K 234M 2G) + # 以易读的格式 (比如: 1K 234M 2G) df -h df -k - # 已字节输出如: KB, MB, or GB + # 以字节、KB、MB 或 GB 输出: free -b free -k free -m free -g - # 以人类可读的格式打印 (比如 1K 234M 2G) + # 以易读的格式输出 (比如 1K 234M 2G) du -h - # 以人类可读的格式获取系统perms + # 以易读的格式显示文件系统权限 stat -c %A /boot - # 比较人类可读的数字 + # 比较易读的数字 sort -h -a file - # 在Linux上以人类可读的形式显示cpu信息 + # 在Linux上以易读的形式显示cpu信息 lscpu lscpu -e lscpu -e=cpu,node - # 以人类可读的形式显示每个文件的大小 + # 以易读的形式显示每个文件的大小 tree -h tree -h /boot -### 在Linux系统中显示已知用户的信息 ### +### 在Linux系统中显示已知的用户信息 ### 只要输入: @@ -143,7 +141,7 @@ root用户仍旧可以访问,但是ls和cd命令还不可用。要还原它用 ### 我如何删除意外在当前文件夹下解压的文件? ### -我意外在/var/www/html/而不是/home/projects/www/current下解压了一个tarball。它混乱了/var/www/html下的文件。最简单修复这个问题的方法是: +我意外在/var/www/html/而不是/home/projects/www/current下解压了一个tarball。它搞乱了/var/www/html下的文件,你甚至不知道哪些是误解压出来的。最简单修复这个问题的方法是: cd /var/www/html/ /bin/rm -f "$(tar ztf /path/to/file.tar.gz)" @@ -166,7 +164,7 @@ root用户仍旧可以访问,但是ls和cd命令还不可用。要还原它用 ## 以root用户运行最后运行的命令 sudo !! -!!会运行最近使用的命令。要运行最近运行的“foo”命令: +!!会运行最近使用的命令。要运行最近运行的以“foo”开头命令: !foo # 以root用户运行上一次以“service”开头的命令 @@ -180,12 +178,11 @@ root用户仍旧可以访问,但是ls和cd命令还不可用。要还原它用 # 测试 nginx.conf /sbin/nginx -t -c /etc/nginx/nginx.conf - # 测试完 "/sbin/nginx -t -c /etc/nginx/nginx.conf"你可以用vi编辑了 + # 测试完 "/sbin/nginx -t -c /etc/nginx/nginx.conf"你可以用vi再次编辑这个文件了 sudo vi !$ -### 在你要离开的时候留下一个提醒 ### +### 在终端上提醒你必须得走了 ### -If you need a reminder to leave your terminal, type the following command: 如果你需要提醒离开你的终端,输入下面的命令: leave +hhmm @@ -200,26 +197,26 @@ If you need a reminder to leave your terminal, type the following command: cd - -需要快速地回到家目录?输入: +需要快速地回到你的家目录?输入: cd -变量*CDPATH*定义了含有这个目录的搜索目录路径: +变量*CDPATH*定义了目录的搜索路径: export CDPATH=/var/www:/nas10 -现在,不用输入cd */var/www/html/ ,我可以直接输入下面的命令进入/var/www/html: +现在,不用输入cd */var/www/html/ 这样长了,我可以直接输入下面的命令进入 /var/www/html: cd html -### 编辑一个用less浏览的文件 ### +### 在less浏览时编辑文件 ### -要编辑一个用less浏览的文件,按下v。你就可以用变量$EDITOR下的编辑器来编辑了: +要编辑一个正在用less浏览的文件,可以按下v。你就可以用变量$EDITOR所指定的编辑器来编辑了: less *.c less foo.html - ## 下载v编辑文件 ## - ## 退出编辑器,你可以继续用less浏览了 ## + ## 按下v键来编辑文件 ## + ## 退出编辑器后,你可以继续用less浏览了 ## ### 列出你系统中的所有文件和目录 ### @@ -237,14 +234,14 @@ If you need a reminder to leave your terminal, type the following command: # 列出 $HOME 中所有的文件 find $HOME -type f -ls | less -### 用一条命令构造命令树 ### +### 用一条命令构造目录树 ### -你可以用mkdir加上-p选项一次创建目录树: +你可以用mkdir加上-p选项一次创建一颗目录树: mkdir -p /jail/{dev,bin,sbin,etc,usr,lib,lib64} ls -l /jail/ -### 复制文件到多个目录中 ### +### 将文件复制到多个目录中 ### 不必运行: @@ -260,16 +257,16 @@ If you need a reminder to leave your terminal, type the following command: ### 快速找出两个目录的不同 ### -diff命令会按行比较文件。它也可以比较两个目录: +diff命令会按行比较文件。但是它也可以比较两个目录: ls -l /tmp/r ls -l /tmp/s - # Compare two folders using diff ## + # 使用 diff 比较两个文件夹 diff /tmp/r/ /tmp/s/ [![Fig. : Finding differences between folders](http://s0.cyberciti.org/uploads/cms/2015/01/differences-between-folders.jpg)][3] -图片: 找出目录之间的不同 +*图片: 找出目录之间的不同* ### 文本格式化 ### @@ -281,13 +278,13 @@ diff命令会按行比较文件。它也可以比较两个目录: fmt -s file.txt -### 看见输出并写入到一个文件中 ### +### 可以看见输出并将其写入到一个文件中 ### 如下使用tee命令在屏幕上看见输出并同样写入到日志文件my.log中: mycoolapp arg1 arg2 input.file | tee my.log -tee可以保证你同时在屏幕上看到mycoolapp的输出和写入文件。 +tee可以保证你同时在屏幕上看到mycoolapp的输出并写入文件  my.log。 -------------------------------------------------------------------------------- @@ -295,7 +292,7 @@ via: http://www.cyberciti.biz/open-source/command-line-hacks/20-unix-command-lin 作者:[nixCraft][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/published/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md new file mode 100644 index 0000000000..3eec1c4a08 --- /dev/null +++ b/published/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md @@ -0,0 +1,41 @@ +Ubuntu 15.04 终于可以让你将菜单设置为 ‘始终可见’ +================================================================================ +**如果你不喜欢 Unity 的全局菜单在你的鼠标离开后就淡出你的视野,在 Ubuntu 15.04 稍微做点工作就可以留住菜单。** + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/locally-integrated-menus-in-ubuntu.png) + +最新的Ubuntu 15.04的Unity界面通过在“提议(Proposed)”通道提供了一个选项,**使应用程序菜单在Ubuntu中始终可见**。 + +这是个不会淡出,也不会过段时间就消失的菜单。 + +最大的缺点是它目前只能通过`dconf`来控制,而不是常规的面向用户的选项设置。 + +我希望(如果预计没有的话)在之后的开发中,能有一个设置这个特性的选项被加入到Ubuntu的【系统设置】>【外观】部分。 + +现在,如果你使用的是 Ubuntu 15.04,并启用了“提议(Proposed)”的更新通道后,你可以在dconf 的com>canonical>Unity>‘always show menus’ 中找到这个开关。 + +### 迟到总比没有要好? ### + +开发者们计划在Ubuntu 14.04 LTS的下一个SRU中反向移植这个选项(假设在测试阶段没有任何意外发生)。 + +本地集成菜单(LIM)在Ubuntu 14.04 LTS 中的首次亮相就赢得了赞誉,其被广泛认为在那些喜欢隐藏方式的与那些不喜欢必须使用鼠标和触摸板的人之间的最佳的折衷方案。 + +虽然在Unity方面本地集成菜单减少了不少批评,不过默认的“淡入/淡出”行为总是还让人不爽。 + +在Ubuntu 过去的几个版本中已经能够看到他们在积极解决早期的用户体验中的几个痛点。经过了几年,在TODO列表中[我们去年终于看到了本地集成菜单][1],以及通过[点击应用图标来实现Unity 启动器中应用的最小化及恢复的选项][2]。 + +一年以来我们终于看到了一个使应用程序菜单始终显示的选项,无论我们的鼠标在哪里。迟来总比没有好,对不对? + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/01/ubuntu-15-04-always-show-menu-bar-option + +作者:[Joey-Elijah Sneddon][a] +译者:[JeffDing](https://github.com/JeffDing) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2014/02/locally-integrated-menus-ubuntu-14-04 +[2]:http://www.omgubuntu.co.uk/2014/03/minimize-click-launcher-option-ubuntu-14-04 diff --git a/translated/share/20150119 Ubuntu With XFCE vs Xubuntu Linux.md b/published/20150119 Ubuntu With XFCE vs Xubuntu Linux.md similarity index 91% rename from translated/share/20150119 Ubuntu With XFCE vs Xubuntu Linux.md rename to published/20150119 Ubuntu With XFCE vs Xubuntu Linux.md index c739b3b702..f48ee95fa7 100644 --- a/translated/share/20150119 Ubuntu With XFCE vs Xubuntu Linux.md +++ b/published/20150119 Ubuntu With XFCE vs Xubuntu Linux.md @@ -1,7 +1,8 @@ -Ubuntu With XFCE vs Xubuntu Linux +Ubuntu & XFCE vs Xubuntu ========================================================= -Ubuntu vs Xubuntu。Ubuntu拥有漂亮的桌面体验以及强大的应用程序。Xubuntu轻量、快速并且可定制,哪个更适合你? +Ubuntu拥有漂亮的桌面体验以及强大的应用程序。Xubuntu轻量、快速并且可定制,哪个更适合你? + --------------------------------------------------------- ![](http://f.tqn.com/y/linux/1/W/T/J/1/ubuntudesktop.png) @@ -10,11 +11,11 @@ Ubuntu vs Xubuntu。Ubuntu拥有漂亮的桌面体验以及强大的应用程序 并且,我同时也会在这篇文章中介绍Ubuntu用户如何获取基本的XFCE桌面,以及如何安装完整的Xubuntu桌面。 -[Ubuntu][1]以及[Xubuntu][2]是针对不同目的开发的操作系统,为什么我会强调这一点,是为了说明什么时候或者为什么你应该使用Ubuntu以及什么时候应该使用Xubuntu。 +[Ubuntu][1]以及[Xubuntu][2]是针对不同目的开发的操作系统,为什么我会强调这一点,是为了说明什么时候或者为什么你应该使用Ubuntu或Xubuntu。 比较这两个操作系统就像比较[劳斯莱斯][3]与[保时捷][4]。这两个都是很棒的车,但是如果把劳斯莱斯给一个赛车迷,他们也许会卖掉它买个其他的车,同样,如果把保时捷给舒格勋爵或者休·海夫纳这类人可能也不那么合适。 -Ubuntu拥有一个适用性很强的桌面环境,叫做Unity,并且默认会安装一些很棒的Linux应用程序,包括Rhythmbox以及[LibreOffic][5]。Ubuntu就像是劳斯莱斯。它为舒适而生,并且尽可能的提供从A到B的最时髦的方法。 +Ubuntu拥有一个适用性很强的桌面环境,叫做Unity,并且默认会安装一些很棒的Linux应用程序,包括Rhythmbox以及[LibreOffic][5]。Ubuntu就像是劳斯莱斯。它为舒适而生,并且尽可能的提供满足需要的漂亮的解决方案。 作为一个Ubuntu用户,就像汽车里面的乘客。你在到达目的地的过程中就可以同时把事情搞定,并且所有的事看起来都很漂亮并且很简单。 @@ -92,7 +93,7 @@ Xubuntu就像一个改装过的跑车。你可以把它改装成任何你想要 接下来,我会使用命令行工具[apt-get][7]介绍在Ubuntu安装XFCE桌面的方法。 -打开一个终端窗口,在Unity环境,你可以在[Dash][8]中搜索“TERM”,或者使用组合键 CTRL+ALT+T。 +打开一个终端窗口,在Unity环境,你可以在[Dash][8]中搜索“TERM”,或者使用组合键 `CTRL+ALT+T`。 安装XFCE桌面十分简单,输入下列命令就可以了: @@ -105,7 +106,7 @@ Xubuntu就像一个改装过的跑车。你可以把它改装成任何你想要 系统会显示一个消息,提示你是否使用默认的面板布局或者使用单独的面板。 -[最新版本的Xubuntu][10]在顶部包含一个单独的面板,不过我更喜欢两个面板,顶部一个标准面板,底部一个常用程序的停靠面板。 +[最新版本的Xubuntu][10]在顶部包含一个单独的面板,不过我更喜欢双面板,顶部一个标准面板,底部一个常用程序的停靠面板。 需要注意的是,XFCE桌面菜单系统和Xubuntu的菜单有些差异,除非你安装[一个更好的菜单系统][11],设置两个面板或许是个更好的选择。 @@ -117,7 +118,7 @@ Xubuntu就像一个改装过的跑车。你可以把它改装成任何你想要 如果你想全都使用Xubuntu的东西,但是又不想按照那些介绍重新安装系统的话,看看下面的东西。 -通过搜索“TERM”,或者组合键CTRL+ALT+T,打开一个终端窗口。 +通过搜索“TERM”,或者组合键`CTRL+ALT+T`,打开一个终端窗口。 在终端输入如下命令: @@ -132,16 +133,17 @@ Xubuntu就像一个改装过的跑车。你可以把它改装成任何你想要 Xubuntu桌面就会显示出来啦。 -这里会有一些差异。菜单仍然是XFCE菜单,而不是Xubuntu菜单。某些图标也不会出现在顶部面板中。但是这些问题都不足以让我们花时间卸载Ubuntu然后重装Xubuntu。 +这里会有一些差异。菜单仍然是XFCE菜单,而不是Xubuntu菜单。某些图标也不会出现在顶部面板中。但是这些小问题都不足以让我们花时间卸载Ubuntu然后重装Xubuntu。 下一篇文章中,我会介绍如何自定义Xubuntu以及XFCE桌面。 +----- via : http://linux.about.com/od/dist/fl/Ubuntu-With-XFCE-vs-Xubuntu-Linux.htm 作者:[Gary Newell][a] 译者:[zhouj-sh](https://github.com/Zhouj-sh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md b/published/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md similarity index 73% rename from translated/tech/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md rename to published/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md index da72d8527b..e8b97a3f0d 100644 --- a/translated/tech/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md +++ b/published/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md @@ -1,8 +1,8 @@ -Linux有问必答时间--如何查看Linux系统的CPU信息 +Linux有问必答:如何查看Linux系统的CPU信息 ================================================================================ > **问题**: 我想要了解我的电脑关于CPU处理器的详细信息,查看CPU信息比较有效地方法是什么? -根据你的需要,有各种各样的关于你的CPU处理器信息你需要了解,比如CPU供应商名、模型名、时钟频率、套接字/内核的数量, L1/L2/L3缓存配置、可用的处理器能力(比如:硬件虚拟化、AES, MMX, SSE)等等。在Linux中,有许多命令行或基于GUI的工具就能来展示你的CPU硬件的相关具体信息。 +根据你的需要,有各种各样的关于你的CPU处理器信息你需要了解,比如CPU供应商名、模型名、时钟频率、插槽/内核的数量, L1/L2/L3缓存配置、可用的处理器能力(比如:硬件虚拟化、AES, MMX, SSE)等等。在Linux中,有许多命令行或基于GUI的工具就能来展示你的CPU硬件的相关具体信息。 ### 1. /proc/cpuinfo ### @@ -12,7 +12,7 @@ Linux有问必答时间--如何查看Linux系统的CPU信息 ![](https://farm8.staticflickr.com/7572/15934711577_4136a8e0b9_c.jpg) -通过查看这个文件,你能[识别出][1]物理处理器数、每个CPU核心数、可用的CPU标志寄存器以及其它东西的数量。 +通过查看这个文件,你能[识别出][1]物理处理器数(插槽)、每个CPU核心数、可用的CPU标志寄存器以及其它东西的数量。 ### 2. cpufreq-info ### @@ -32,7 +32,7 @@ cpuid命令的功能就相当于一个专用的CPU信息工具,它能通过使 ### 4. dmidecode ### -dmidecode命令直接从BIOS的DMI(译者注:桌面管理接口)数据收集关于系统硬件的具体信息。CPU信息报告包括CPU供应商、版本、CPU标志寄存器、最大/最近的时钟速度、(所允许的)核心总数、L1/L2/L3缓存配置等等。 +dmidecode命令直接从BIOS的DMI(桌面管理接口)数据收集关于系统硬件的具体信息。CPU信息报告包括CPU供应商、版本、CPU标志寄存器、最大/当前的时钟速度、(启用的)核心总数、L1/L2/L3缓存配置等等。 $ sudo dmidecode @@ -54,7 +54,7 @@ i7z是一个专供英特尔酷睿i3、i5和i7 CPU的实时CPU报告工具。它 ![](https://farm8.staticflickr.com/7546/15534687744_1968dc2b18_c.jpg) -### 8. likwid-topology ### +### 8. likwid拓扑 ### [likwid][3] (Like I Knew What I'm Doing) 是一个用来测量、配置并显示硬件相关特性的命令行收集工具。其中的likwid拓扑结构能显示CPU硬件(线程/缓存/NUMA)的拓扑结构信息,还能识别处理器家族(比如:Intel Core 2, AMD Shanghai)。 @@ -70,7 +70,7 @@ lscpu命令用一个更加用户友好的格式统计了 /etc/cpuinfo 的内容 ### 10. lshw ### -**lshw**命令是一个综合性硬件查询工具。不同于其它工具,lshw需要root特权才能运行因为它是在BIOS系统里查询DMI(译者注:桌面管理接口)信息。它能报告总核心数和可用核心数,但是会遗漏掉一些信息比如L1/L2/L3缓存配置。GTK版本的lshw-gtk也是可用的。 +**lshw**命令是一个综合性硬件查询工具。不同于其它工具,lshw需要root特权才能运行,因为它是在BIOS系统里查询DMI(桌面管理接口)信息。它能报告总核心数和可用核心数,但是会遗漏掉一些信息比如L1/L2/L3缓存配置。GTK版本的lshw-gtk也是可用的。 $ sudo lshw -class processor @@ -78,7 +78,7 @@ lscpu命令用一个更加用户友好的格式统计了 /etc/cpuinfo 的内容 ### 11. lstopo ### -lstopo命令 (包括 [hwloc][4] 包) 使由CPU、缓存、内存和I/O设备组成的拓扑结构可见。这个命令用来识别处理器结构和系统的NUMA拓扑结构。 +lstopo命令 (包括在 [hwloc][4] 包中) 以可视化的方式组成 CPU、缓存、内存和I/O设备的拓扑结构。这个命令用来识别处理器结构和系统的NUMA拓扑结构。 $ lstopo @@ -86,7 +86,7 @@ lstopo命令 (包括 [hwloc][4] 包) 使由CPU、缓存、内存和I/O设备组 ### 12. numactl ### -其被开发的起初是为了设置NUMA的时序安排和Linux处理器的内存布局策略,numactl命令也能通过命令行来展示关于CPU硬件的NUMA拓扑结构信息。 +最初其被开发的目的是为了设置NUMA的时序安排和Linux处理器的内存布局策略,numactl命令也能通过命令行来展示关于CPU硬件的NUMA拓扑结构信息。 $ numactl --hardware @@ -94,7 +94,7 @@ lstopo命令 (包括 [hwloc][4] 包) 使由CPU、缓存、内存和I/O设备组 ### 13. x86info ### -x86info是一个为了展示基于x86架构的CPU信息的命令行工具。信息报告包括CPU型号、线程/核心数、时钟速度、TLB(译者注:传输后备缓冲器)缓存配置、支持的特征标志寄存器等等。 +x86info是一个为了展示基于x86架构的CPU信息的命令行工具。信息报告包括CPU型号、线程/核心数、时钟速度、TLB(传输后备缓冲器)缓存配置、支持的特征标志寄存器等等。 $ x86info --all @@ -105,7 +105,7 @@ x86info是一个为了展示基于x86架构的CPU信息的命令行工具。信 via: http://ask.xmodulo.com/check-cpu-info-linux.html 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/published/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md b/published/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md new file mode 100644 index 0000000000..e83de0ff93 --- /dev/null +++ b/published/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md @@ -0,0 +1,56 @@ +Linux 有问必答:如何使用yum来下载RPM包而不进行安装 +================================================================================ +> **问题**:我想从Red Hat 的标准仓库中下载一个RPM包,我能使用yum命令来下载一个RPM包但是不进行安装吗? + +yum是基于Red Hat的系统(如CentOS、Fedora、RHEl)上的默认包管理器。使用yum,你可以安装或者更新一个RPM包,并且他会自动解决包依赖关系。但是如果你只想将一个RPM包下载到你的系统上该怎么办呢? 例如,你可能想要获取一些RPM包在以后使用,或者将他们安装在另外的机器上。 + +这里说明了如何从yum仓库上下载一个RPM包。 + +### 方法一:yum### + +yum命令本身就可以用来下载一个RPM包,标准的yum命令提供了`--downloadonly(只下载)`的选项来达到这个目的。 + + $ sudo yum install --downloadonly + +默认情况下,一个下载的RPM包会保存在下面的目录中: + + /var/cache/yum/x86_64/[centos/fedora-version]/[repository]/packages + +以上的[repository]表示下载包的来源仓库的名称(例如:base、fedora、updates) + +如果你想要将一个包下载到一个指定的目录(如/tmp): + + $ sudo yum install --downloadonly --downloaddir=/tmp + +注意,如果下载的包包含了任何没有满足的依赖关系,yum将会把所有的依赖关系包下载,但是都不会被安装。 + +另外一个重要的事情是,在CentOS/RHEL 6或更早期的版本中,你需要安装一个单独yum插件(名称为 yum-plugin-downloadonly)才能使用`--downloadonly`命令选项: + + $ sudo yum install yum-plugin-downloadonly + +如果没有该插件,你会在使用yum时得到以下错误: + + Command line error: no such option: --downloadonly + +![](https://farm9.staticflickr.com/8627/15571201803_38390aae75_c.jpg) + +### 方法二: Yumdownloader### + +另外一个下载RPM包的方法就是通过一个专门的包下载工具--yumdownloader。 这个工具是yum工具包(包含了用来进行yum包管理的帮助工具套件)的子集。 + + $ sudo yum install yum-utils + +下载一个RPM包: + + $ sudo yumdownloader + +下载的包会被保存在当前目录中。你需要使用root权限,因为yumdownloader会在下载过程中更新包索引文件。与yum命令不同的是,任何依赖包不会被下载。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/yum-download-rpm-package.html + +译者:[theo-l](https://github.com/theo-l) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150126 How To Kill All Processes Of A Specific User With slay.md b/published/20150126 How To Kill All Processes Of A Specific User With slay.md similarity index 83% rename from translated/tech/20150126 How To Kill All Processes Of A Specific User With slay.md rename to published/20150126 How To Kill All Processes Of A Specific User With slay.md index 897c4c16c7..77a8441323 100644 --- a/translated/tech/20150126 How To Kill All Processes Of A Specific User With slay.md +++ b/published/20150126 How To Kill All Processes Of A Specific User With slay.md @@ -1,4 +1,4 @@ -如何用‘slay’杀掉指定用户的所有进程 +用‘slay’干掉某个用户的所有进程 ================================================================================ **slay** 是**Chris Ausbrooks**写的一款用于杀掉指定用户所有运行进程的命令行工具。slay对系统管理员而言在找出那些不应该运行进程的用户是很有用的。 @@ -31,19 +31,19 @@ slay在大多数发行版中都有官方仓库。 ~ sudo slay amitooo slay: Done. -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/slay-amitoo-kpenee.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/slay-amitoo-kpenee.png) 当slay运行完成后,你应该就可以看到反馈了。 -享受吧。 +爽吧?! -------------------------------------------------------------------------------- via: http://www.unixmen.com/kill-processes-specific-user-slay/ -作者:[ Enock Seth Nyamador][a] +作者:[Enock Seth Nyamador][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/talk/20150127 Windows 10 versus Linux.md b/published/20150127 Windows 10 versus Linux.md similarity index 100% rename from translated/talk/20150127 Windows 10 versus Linux.md rename to published/20150127 Windows 10 versus Linux.md diff --git a/translated/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md b/published/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md similarity index 71% rename from translated/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md rename to published/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md index db2ae3c05a..7a12be0642 100644 --- a/translated/tech/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md +++ b/published/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md @@ -1,14 +1,14 @@ 如何用wifi-linux检测AP信号强度 ================================================================================ -作为一名python极客,我喜欢在github上发现新的针对linux用户的python工具。今天我发现了一款用python写成的用于检测AP信号强度的工具。 +作为一名python极客,我喜欢在github上挖掘新的用于linux用户的python工具。今天我发现了一款用python写成的用于检测AP信号强度的工具:wifi-linux。 我已经在**wifi-linux**上实验了大约两个小时,并且它工作的很好但是我希望在不久的将来在作者那里看到一些单元测试,因为命令**plot**无法在我的电脑上工作,并且会导致一些问题。 ### 什么是wifi-linux ### -根据github作者账号的官方的offical readme.md文件, wifi-linux是一个简单的收集你周围AP的RSSI信息的python脚本,它还会画出RSSI活动图形。 +根据github上作者账号的官方的 readme.md文件, wifi-linux是一个简单的收集你周围AP的RSSI信息的python脚本,它还会画出RSSI活动图形。 -,这同样可以用命令plot生成,但是不幸的是,这对我不可行。wifi-linux支持其他的命令,比如**bp** 来加入一个断点,**print**会打印一些统计和**启动开关**。 +作者说可以在该程序中可以使用plot命令绘制RSSI 活动图形,但是不幸的是,这对我不可行。wifi-linux也支持其他的命令,比如**bp** 来加入一个断点,**print**会打印一些统计和**启动开关**。 wifi-linux程序有下面这些依赖: @@ -19,15 +19,15 @@ wifi-linux程序有下面这些依赖: ### 安装wifi-linux需要的包 ### -我怕尝试使用python包管理工具pip安装python-dbus但是失败了,因为pip会查找setup.py,但是python-dbus中没有。因此下面的命令不工作。 +我尝试使用python包管理工具pip安装python-dbus但是失败了,因为pip会查找setup.py,但是python-dbus中没有。因此下面的命令不工作。 pip install dbus-python -你可以试一下但是很有可能会在终端中下面的错误。 +你可以试一下但是很有可能会在终端中出现下面的错误。 IOError: [Errno 2] No such file or directory: '/tmp/pip_build_oltjano/dbus-python/setup.py' -我该怎么解决这个问题呢?很简单,用下面命令中的系统包管理工具安装Python DBUS。 +我该怎么解决这个问题呢?很简单,用下面命令中的系统包管理工具来安装Python DBUS。 sudo apt-get install python-dbus @@ -69,7 +69,7 @@ wifi-linux程序有下面这些依赖: ![the bp command in wifi-linux](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux2.png) -命令**print**可以用于显示你机器的状态。下面就是一个例子。 +命令**print**可以用于在终端上显示你机器的状态。下面就是一个例子。 ![the print command](http://blog.linoxide.com/wp-content/uploads/2015/01/wifi-linux3.png) @@ -79,7 +79,7 @@ via: http://linoxide.com/linux-how-to/monitor-access-point-signal-strength-wifi- 作者:[Oltjano Terpollari][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150209 How to back up a Debian system using backupninja.md b/published/20150209 How to back up a Debian system using backupninja.md similarity index 53% rename from translated/tech/20150209 How to back up a Debian system using backupninja.md rename to published/20150209 How to back up a Debian system using backupninja.md index b58baa3bdc..33e95473af 100644 --- a/translated/tech/20150209 How to back up a Debian system using backupninja.md +++ b/published/20150209 How to back up a Debian system using backupninja.md @@ -1,10 +1,10 @@ -如何使用 backupninja 来备份一个 Debian 系统 +如何使用 backupninja 来备份 Debian 系统 ================================================================================ -面临灾难时的小心谨慎或体验可以教会每一个系统管理采取频繁的系统备份的重要性。你可以通过编写存在已久的管用的 shell 脚本,或使用一个(或多个) 适合这项工作的备份工具来完成备份任务。因此,当你要实施一个备份解决方案时,你了解的备份工具越多,你做出的决策就会越明智。 +小心谨慎或灾难体验会让每一个系统管理都认识到频繁的系统备份的重要性。你可以通过编写管用的旧式 shell 脚本,或使用一个(或几个)适合这项工作的备份工具来完成备份任务。因此,当你要实施一个备份解决方案时,你了解的备份工具越多,你做出的决策就会越明智。 -在这篇文章中,我们将为你介绍 [backupninja][2] ,一个轻量且易于配置的系统备份工具。在诸如 **rdiff-backup**, **duplicity**, **mysqlhotcopy** 和 **mysqldump** 等程序的帮助下, Backupninja 可以提供常用的备份功能,如执行远程的、安全的和增量式的文件系统备份,加密备份以及 MySQL/MariaDB 数据库备份。你可以选择性地开启使用 email 进行状态报告功能,也可以对一般的硬件和系统的信息进行备份。 backupninja 的一个关键功能是它拥有一个内建的基于控制台的向导程序(被称为 **ninjahelper**),而后者允许你为不同的备份情景轻松地创建配置文件。 +在这篇文章中,我们将为你介绍 [backupninja][2] ,这是一个轻量且易于配置的系统备份工具。在诸如 **rdiff-backup**, **duplicity**, **mysqlhotcopy** 和 **mysqldump** 等程序的帮助下, Backupninja 可以提供常用的备份功能,如执行远程的、安全的和增量式的文件系统备份,加密备份以及 MySQL/MariaDB 数据库备份。你可以选择性地开启使用 Email 状态报告功能,也可以对一般的硬件和系统的信息进行备份。 backupninja 的一个关键功能是它拥有一个内建的基于控制台的向导程序(被称为 **ninjahelper**),而后者允许你为不同的备份情景轻松地创建配置文件。 -如果非要说的话,backupninja 的缺点是:为了充分使用其所有的功能,它要求一些其他“助手”程序已经被安装在了计算机中。尽管 backupninja 有针对基于 Red Hat(红帽) 的发行版本的 RPM 安装包,但 backupninja 针对 Debian 和它的衍生发行版本的依赖进行了优化。所以不建议在基于 Red Hat 的系统上尝试 backupninja 。 +如果非要说的话,backupninja 的缺点是:为了充分使用其所有的功能,它要求安装一些其他“助手”程序。尽管 backupninja 有针对基于 Red Hat(红帽)的发行版本的 RPM 安装包,但 backupninja 针对 Debian 及其衍生发行版本的依赖进行了优化。所以不建议在基于 Red Hat 的系统上尝试 backupninja 。 在这篇教程中,我们将介绍如何在基于 Debian 的发行版本上安装 backupninja 。 @@ -16,17 +16,17 @@ 在安装的过程中,有几个文件和目录将被创建: -- **/usr/sbin/backupninja** 是 bash shell 主脚本; -- **/etc/cron.d/backupninja**, 默认情况下,构建 cron 任务来每隔一个小时运行上面的主脚本; -- **/etc/logrotate.d/backupninja** 处理由 backupninja 程序产生的日志;(注:我不知道这里的 rotate 该如何翻译) +- **/usr/sbin/backupninja** 是个 bash shell 的主脚本; +- **/etc/cron.d/backupninja**, 默认情况下,设置 cron 任务来每隔一个小时运行上面的主脚本; +- **/etc/logrotate.d/backupninja** 截断由 backupninja 程序产生的日志; - **/etc/backup.d/** 是备份操作的配置文件驻留的目录; - **/etc/backupninja.conf** 是包含一般选项的主配置文件。这个文件带有良好的注释且详细解释了每个选项的含义; -- **/usr/share/backupninja** 是那些被 backupninja 使用的脚本所处的目录。这些脚本文件负责执行实际的工作。在这个目录中,你还可以找到 `.helper` 文件,它们可以被用来配置和设定 ninjahelper 的菜单; -- **/usr/share/doc/backupninja/examples** 含有操作配置文件(即通过 ninjahelper 产生的文件)的模板。 +- **/usr/share/backupninja** 是那些 backupninja 所使用的脚本所处的目录。这些脚本文件负责执行实际的工作。在这个目录中,你还可以找到 `.helper` 文件,它们可以被用来配置和设定 ninjahelper 的菜单; +- **/usr/share/doc/backupninja/examples** 含有操作配置文件(即通过 ninjahelper 产生的文件)的模板。 ### 首次运行 Ninjahelper ### -当我们尝试启动 ninjahelper 时,我们可以看到一个内部依赖可能会被需要。假如系统进行了提示,请输入 “yes” 并敲下回车键来安装 dialog(一个用于从 shell 脚本中显示友好对话框的工具)。 +当我们尝试启动 ninjahelper 时,我们可以看到可能需要一个内部依赖程序。假如系统进行了提示,请输入 “yes” 并敲下回车键来安装 dialog(一个用于从 shell 脚本中显示友好对话框的工具)。 ![](https://farm8.staticflickr.com/7537/15700597667_6618fbc142_z.jpg) @@ -44,11 +44,11 @@ ![](https://farm8.staticflickr.com/7508/15700315139_4c6117ef32_z.jpg) -接下来的一步需要你选取相关条目来作为此次备份任务的一部分。前四个条目已经默认被选上了,但你可以通过按空格键来撤消选择。 +接下来的一步需要你选取相关条目来作为此次备份任务的一部分。前四个条目已经默认被选上了,但你可以通过在条目上按空格键来撤消选择。 ![](https://farm8.staticflickr.com/7507/15699051870_65abaf52e5_z.jpg) -一旦你完成了上面的步骤,按 OK 选项来继续。接着你将能够选择 是愿意使用默认的配置文件(/etc/backup.d/10.sys)来完成这次备份操作,还是创建一个新的配置文件。若为后者,一个含有与默认配置文件内容相同的文件将会在相同的目录下被创建,但它被命名为 11.sys,后续的备份操作将会创建类似的文件(注:只不过命名的序号不同)。需要说明的是一旦这个新的配置文件被创建,你便可以使用你喜爱的文本编辑器来编辑该文件。 +一旦你完成了上面的步骤,按 OK 选项来继续。接着你将能够选择是愿意使用默认的配置文件(/etc/backup.d/10.sys)来完成这次备份操作,还是创建一个新的配置文件。若为后者,一个含有与默认配置文件内容相同的文件将会在相同的目录下被创建,但它被命名为 11.sys,后续的备份操作将会创建类似的文件(注:只不过命名的序号不同)。需要说明的是一旦这个新的配置文件被创建,你便可以使用你喜爱的文本编辑器来编辑该文件。 ![](https://farm9.staticflickr.com/8654/15885715072_1e6126e929_o.png) @@ -56,7 +56,7 @@ 正如你最有可能知道的那样, rsync 被广泛地用于通过网络同步文件或文件夹。在接下来的例子中,我们将讨论一个使用硬链接来为一个远程目录做增量式拉取备份的方法,它被用来保存历史数据以及在我们本地的文件服务器中恢复这些历史数据。这个方法将帮助我们节省空间并增强位于服务器端的安全性。 -**步骤 1**:编写一个位于 `/etc/backup.d`的带有如下内容的自定义脚本,并将它的权限设置为 600 。需要说明的是,除了一般的配置文件,这个目录可能还包含当 backupninja 被执行时你想运行的一些脚本文件,它们可以发挥出位于主配置文件中的变量的优势。 +**步骤 1**:编写一个带有如下内容的自定义脚本,放在 `/etc/backup.d`,并将它的权限设置为 600 。需要说明的是,除了一般的配置文件,这个目录可能还包含当 backupninja 执行时你想运行的一些脚本文件,它们可以发挥出位于主配置文件中的变量的优势。 # REMOTE USER user=root @@ -72,36 +72,37 @@ # RSYNC rsync -av --delete --recursive --link-dest=$localdirold $user@$host:$remotedir $localdir -在上面的配置中, rsync 的 ‘--link-dest’ 选项的作用是为位于 $localdir-old 目录中那些没有改变的文件(包含所有属性) 硬链接到目标目录 ($localdir)。 +在上面的配置中, rsync 的 ‘--link-dest’ 选项的作用是为位于 $localdir-old 目录中那些没有改变的文件(包含所有属性) 硬链接到目标目录($localdir)。 -**步骤 2**:在 backupninja 第一次运行之前,上层目录(这个例子中指的是 /home/gacanepa) 是空的。第一次我们执行下面的命令: +**步骤 2**:在 backupninja 第一次运行之前,上层目录(这个例子中指的是 /home/gacanepa) 是空的。第一次我们执行下面的命令: # backupninja -n backup.0 目录就被创建了,并在接下来的过程中,它的名称将会被更改为 backup.1。 -当我们第二次运行 backupninja 时, backup.0 将会被重新创建,而 backup.1 被保留。 +当我们第二次运行 backupninja 时, backup.0 将会被重新创建,而 backup.1 保持不动。 ![](https://farm8.staticflickr.com/7581/15700597497_0e0cd89ab9.jpg) -**步骤 3**: 确保 backup.1 里面的文件硬链接到 backup.0 里的文件,我们可以通过比较文件的 inode( i 节点) 数和目录的大小来达到此目的。 +**步骤 3**: 确保 backup.1 里面的文件硬链接到 backup.0 里的文件,我们可以通过比较文件的 inode(i 节点)数和目录的大小来达到此目的。 ![](https://farm9.staticflickr.com/8636/15700315029_e922ce771b.jpg) ### 总结 ### -Backupninja 不仅是一个经典的备份工具,它也是一个易于配置的实用程序。你可以通过编写你自己的 handler(注:我不知道该如何翻译 handler 这个单词) 来运行 backupninja 并将它们作为位于 `/etc.backup.d` 的个人配置文件。甚至你还可以为 ninjahelper 编写助手程序,以达到将它们包括在 ninjahelper 的主界面上。 +Backupninja 不仅是一个经典的备份工具,它也是一个易于配置的实用程序。你可以通过编写你自己的控制脚本,用放在 `/etc.backup.d` 中的不同的配置文件来运行 backupninja 。甚至你还可以为 ninjahelper 编写助手程序,并将其包括在 ninjahelper 的主界面上。 -例如,假如你在 `/usr/share/backupninja`目录中创建了一个名为 modulo 的 handler,它将自动运行那些位于 `/etc/backup.d` 目录中以 .xmodulo 为后缀的每个文件。如果你决定添加你的 xmodulo handler 到 ninjahelper 中, 你可以编写相应的助手程序,即 xmodulo.helper 。另外,假如你想 让 backupninja 运行任意一个脚本,只需把它添加到 `/etc/backup.d` 目录中,这样你的目的便可以达到了。 +例如,假如你在 `/usr/share/backupninja`目录中创建了一个名为 xmodulo 的控制脚本,它将自动运行那些位于 `/etc/backup.d` 目录中以 .xmodulo 为后缀的每个文件。如果你决定添加你的 xmodulo 控制脚本到 ninjahelper 中, 你可以编写相应的助手程序,即 xmodulo.helper 。另外,假如你想 让 backupninja 运行其它的脚本,只需把它添加到 `/etc/backup.d` 目录中就可以了。 欢迎使用下面的评论框来留下你的评论、问题或建议。听到你的回应将会使我们很高兴。 + -------------------------------------------------------------------------------- via: http://xmodulo.com/backup-debian-system-backupninja.html 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md b/published/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md similarity index 53% rename from translated/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md rename to published/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md index fc5d48aad4..5def58511a 100644 --- a/translated/talk/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md +++ b/published/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md @@ -1,85 +1,100 @@ -预见我们将会在2015年及之后的Linux游戏 -================================================================================他们说Linux游戏开发已经死了,已经变得毫无意义...随他们说去吧.一起看看2015甚至以后会为我们带来什么游戏. +Linux 游戏之 2015 动向 +================================================================================ +他们说Linux游戏开发已经死了,已经变得毫无意义…… 随他们说去吧。一起看看2015甚至以后会为我们带来什么Linux游戏。 -真的很难跟上为我们出现的每一样事物,但是可以快速浏览一下我们将会看到的变化. +真的很难跟得上扑面而来的各种形形色色的新事物,但是可以快速浏览一下我们将会看到的变化。 ### 已确认的游戏 ### #### 冒险游戏 #### -- [看火人][1] -- [失落的天堂:初探][2] -- [蒸汽世界:浩劫][3] +- [看火人(Firewatch)][1] +- [失落的天堂:初探(Paradise Lost: First Contact)][2] +- [时空英豪 1.1(Outcast 1.1)][42] +- [蒸汽世界:浩劫(SteamWorld Heist)][3] #### 动作游戏 #### -- [暗黑血统][4] -- [暗黑血统2][5] -- [尸人的世界][6] -- [骷髅女孩][7] +- [暗黑血统(Darksiders)][4] +- [暗黑血统 2(Darksiders 2)][5] +- [尸人的世界(Ray's The Dead)][6] +- [骷髅女孩(Skullgirls)][7] #### 第一人称游戏 #### -- [生化奇兵:永恒][8] -- 半条命 3 /troll      #此处troll不知道如何翻译 -- [烽火家园:革命][9] -- [杀戮空间 2][10] -- 英雄萨姆 4(目前无官方站点) -- [联合风暴][11] -- [烈火击杀][12] +- [生化奇兵:永恒(Bioshock Infinite)][8] +- 半条命 3 /troll (Half Life 3 /troll)    +- [烽火家园:革命(Homefront: The Revolution)][9] +- [叛变(Insurgency)][43] +- [杀戮空间 2(Killing Floor 2)][10] +- 英雄萨姆 4(Serious Sam 4)(目前无官方站点) +- [联合风暴(Storm United)][11] +- [烈火击杀(SUPERHOT)][12] #### 平台游戏 #### -- [武装原型][13] -- [峡谷][14] #此处游戏名尚不确定 -- [吉安娜姐妹][15] -- [心之所向:Alicia][16] -- [ ][17] #此处游戏名未知 -- [无限工厂][18] -- [无敌9号][19] -- [林中之夜][20] -- [夜][21] -- [奇异的世界:新鲜可口][22] -- [真红女神][23] +- [武装原型(Broforce)][13] +- [峡谷(Chasm)][14] #此处游戏中文名尚不确定 +- [吉安娜姐妹(Giana Sisters)][15] +- [心之所向:Alicia(Heart Forth, Alicia)][16] +- [热铁皮屋顶(Hot Tin Roof)][17] +- [无限工厂(Infinifactory)][18] +- [无敌9号(Mighty No. 9)][19] +- [林中之夜(Night in the Woods)][20] +- [夜(Noct)][21] +- [奇异的世界:新鲜可口(Oddworld: New 'N' Tasty)][22] +- [真红女神(Red Goddess)][23] + +#### 赛车游戏 #### + +- [赛车计划(Project Cars)][44] +- [死亡赛车:再生(Carmageddon: Reincarnation)][45] #### 角色扮演游戏 #### -- [神界:原罪][24] -- [永恒之柱][25] -- [暗影狂奔:香港][26] -- [旗帜的传说][27] +- [神界:原罪(Divinity: Original Sin)][24] +- [永恒之柱(Pillars Of Eternity)][25] +- [暗影狂奔:香港(Shadowrun: Hong Kong)][26] +- [旗帜的传说(The Banner Saga)][27] +- [镇魂曲:遗器之潮(Torment: Tides of Numenera)][46] #### 策略游戏 #### -- [奇迹时代3][28] -- [放逐之城][29] -- [城:天际][30] -- [发条帝国][31] -- [][32] -- [卷轴][33] -- [太空海盗和僵尸 2][34] +- [奇迹时代3(Age of Wonders III)][28] +- [At The Gates][47] # 尚无中文名 +- [放逐之城(Banished)][29] +- [城:天际(Cities: Skylines)][30] +- [发条帝国(Clockwork Empires)][31] +- [Parkitect][32] # 尚无中文名 +- [卷轴(Scrolls)][33] +- [太空海盗和僵尸 2(Space Pirates And Zombies 2)][34] #### 沙盒游戏 #### -- [泰拉瑞亚][35] -- [X 重生][36] +- [泰拉瑞亚(Terraria)][35] +- [X 重生(X Rebirth)][36] -#### 不太确认,不过可能性高 #### +#### 体育游戏 #### -- [英雄连][37] -- [逃生][38] -- [影子武士][39] -- [火炬之光 2][40] +- [惊爆美国棒球16(Out of the Park Baseball 16)][48] -然而有两个来自Feral Interactive的,由于不知道他们是什么,所以没有列举出来. +### 不太确认,不过可能性高 ### -我们猜测Aspyr也在准备新的大制作,但是他们仅仅发布了他们最新的游戏,所以可能要等上几个月我们才能看到些什么. +- [英雄连 2(Company of Heroes 2)][37] +- [逃生(Outlast)][38] +- [影子武士(Shadow Warrior)][39] +- 无光之海 - 其开发商试验性地构建 Linux 版本,不过这要取决于他们的 Windows 版本的销售情况(据邮件沟通信息) +- [火炬之光 2(Torchlight II)][40] -当然,** 这不是完整的列表 **,我们会轻易忘记巨量的游戏正在走向我们,哇,如此丰富的列表. +然而有[两个来自Feral Interactive的移植大作][49],由于不知道他们是什么,所以没有列举出来。 -下个月就是游戏开发者大会,我们也期待一些改变发生.然而,我们没有什么确切的东西,对于Valve与Steam Machines的合作,我们期待至少会增加一些Linux游戏,否则,如我们担心,炫耀一些过时的游戏会让Valve脸上无光. +我们猜测Aspyr也在准备新的大制作,但是他们仅仅发布了他们最新的游戏,所以可能要等上几个月我们才能看到些什么。 -你怀念Linux的哪些地方曾让你兴奋? +当然,** 这不是完整的列表 **,我们会轻易忘记如此多的游戏正在走向我们,哇,如此丰富的列表。 + +我们也期待 GDC 2015 上有一些改变,然而,我们没有什么确切的东西,对于Valve与Steam Machines的合作,我们期待至少会增加一些Linux游戏,否则,如我们担心,炫耀一些过时的游戏会让Valve脸上无光。 + +希望我们没有错过那些 Linux 中让你感到兴奋的东西! -------------------------------------------------------------------------------- @@ -87,7 +102,7 @@ via: http://www.gamingonlinux.com/articles/a-look-at-what-linux-games-we-will-se 作者:[liamdawe][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -132,5 +147,12 @@ via: http://www.gamingonlinux.com/articles/a-look-at-what-linux-games-we-will-se [38]:https://www.gamingonlinux.com/articles/outlast-that-really-scary-game-looks-like-its-still-heading-to-linux.4896 [39]:https://www.gamingonlinux.com/articles/shadow-warrior-looks-like-it-will-come-to-linux.4859 [40]:https://www.gamingonlinux.com/articles/torchlight-ii-has-even-more-positive-signs-for-linux.4817 -[41]:http://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/ - +[41]:https://www.gamingonlinux.com/articles/feralinteractive.com/en/upcoming/ +[42]:https://www.gamingonlinux.com/articles/outcast-a-real-classic-has-been-revamped-and-linux-is-planned.4736 +[43]:https://www.gamingonlinux.com/articles/insurgency-fps-is-waiting-on-valve-so-it-can-come-to-linux-updated.4564 +[44]:http://projectcarsgame.com/ +[45]:https://www.gamingonlinux.com/articles/carmageddon-reincarnations-jason-garber-answers-our-questions-on-their-linux-support.3380 +[46]:https://www.gamingonlinux.com/articles/torment-tides-of-numenera-new-video-looks-absolutely-stunning.4320 +[47]:http://www.atthegatesgame.com/info +[48]:http://www.ootpdevelopments.com/newsletters/nl0154/ +[49]:http://feralinteractive.com/en/upcoming/ \ No newline at end of file diff --git a/published/20150309 10 best uses for open source software in the business world.md b/published/20150309 10 best uses for open source software in the business world.md new file mode 100644 index 0000000000..82b5c89956 --- /dev/null +++ b/published/20150309 10 best uses for open source software in the business world.md @@ -0,0 +1,85 @@ +10种将开源用于商业的最佳途径 +=============================================================================== +> 开源为大大小小的商业带来了一些显著的效益 -- 但是你可能会对某些用途感到惊讶。 + +![](http://tr2.cbsistatic.com/hub/i/r/2015/03/05/54a9c323-4311-4455-b10b-5182548da424/resize/620x485/95164f01a19cbd7a3e4b843be78febae/foss.jpg) + +技术上已经发生了一些必然性的改变。举个例子,开源软件以它的方式进入到了你的工作之中。10 年前,这也许还能称为一个问题。现在呢?则已经无法避免开源技术的使用 -- 也没有理由要去避免。有如此多强大(和必需的)的方方面面技术,开源在许多方面已经成为了技术的救世主。但是你哪一块的工作最适合开源软件呢?当然,这个问题的答案会因公司而异。然而许多的应用几乎可以适用于每个场景中。 + +让我们来看看这10种可能是最佳的使用方法,它们可以帮助你的公司成长,带给你从未体验过的灵活性与可靠性,或者仅仅是帮你节省一笔可观的预算。 + +### 1: 服务器软件 ### + +如果你还在微软的 IIS 平台苦苦挣扎,那么你需要体验一下 Apache。这款旗舰级开源软件是这个星球上使用最广泛的网页服务器软件之一。Apache 免费、极其可靠、易于管理,而且不像 IIS 一样需要大量的资源。然而,开源并不局限于网页服务器。如果你需要在公司内使用 SMB 来共享资源,可以试试 Samba, Samba 4甚至集成了活动目录(AD),所以你不需要担心在Samba服务器上建立单独的用户账号。 + +### 2: 开发 ### + +用开源开发是很简单的事。PHP,Rails,Perl -- 开源上面的开发语言和开发的工具(从集成开发环境到调试)都很多。为开源或者开源工具做开发可以有很多种选择(如同使用商业软件开发一样)。开源软件与商业软件最大的不同之处在于开源可以接触到软件源代码。在自由开源软件(FOSS,free open source software)的世界里,代码都是公开的。对许多开发者来说,Linux操作系统有他们开发和构建所需要的一切(特别那些没有一个成熟环境来写代码的人而言)。如果你需要图形用户界面(GUI)的开发工具,开源也能满足你。 + +### 3: 安全 ### + +通往安全的道路是充满挑战的,但还是很多途径可以达到。你可以选择“安全盒子”的解决方案,跟随Cisco(一个可靠的解决方案)的节奏,或者你可以借助iptables打造最适合你需求的安全。是的,开源的安全之路会需要更多的时间去配置(有很高的学习壁垒),但是结果通常是不错的。这里甚至不强调一种观点,就一般来说,在桌面上使用开源比起大多数封闭的系统而言是一个更安全的平台。在桌面上部署Linux,你的安全痛点会大大降低。 + +### 4: 桌面 ### + +Linux 桌面是大多数人不认可的地方。尽管如此,你必须考虑一个事实,那就是你每天的工作流程已经经历了一个主要的思维模式的转换。我们现在做的大部分事情都是通过网络浏览器。那么为什么不将Linux部署到桌面上呢?不但可以能做如今要做的许多工作,而且不用遭受病毒,恶意软件和能破坏系统的更新。它不完美 -- 但哪个平台敢说完美?但是它很强大,最后,还可以节省你的开支。这是一个双赢的结局。 + +### 5: 工作流程 ### + +每一种工作都依赖于工作流程。对于某些工作来说,一个流畅的工作流程又取决于所用的工具。开源已经登上这个舞台了。CRM(客户关系管理),HRM(人力资源管理),ERP(企业资源计划),BI(商业智能),BPM(业务流程管理) …… 只要你叫得出名字,开源就可以做到几乎你能想到的每一种可能 -- 并且干得不错。借助于[Pentaho][1], [Collabtive][2]和[SugarCRM][3], 开源可以在任何时候与最新的源工具保持同步。 + +### 6: 协作 ### + +没有一起合作项目的能力,你的员工就不能干好工作。所以你选择的协作工具是十分重要的。你会在开源的世界里发现大量的优质协作工具。[Cyn.in 社区版][4], [Zimbra 开源版][5]和[Kolab][6]都是不错的协作工具,但这仅仅是开源世界里的三个代表而已。 + +### 7: 大数据 ### + +以前说到大数据的时候,往往不会想到开源。多亏了[SUSE][7]的努力,大数据和开源现在可以携手共进了。许多如内存数据和内核热补丁的发明创建,使得开源成为大数据一个理想的解决方案。它可以完美地满足大数据在平台上所需的大量要求,而封闭的软件则达不到如此灵活的水平。 + +### 8: 云 ### + +云的主要玩家都是开源的。[Red Hat][8], [Ubuntu][9], [SUSE][10], [Amazon][11], [Rackspace][12] -- 他们都提供云服务,而且认为开源是云配置的最好解决方案。但是,如果你不想用大公司的服务,仍然有很多后起之秀如[OwnCloud][13],你可以选择OwnCloud的托管云方案,或者建立自己的一套。 + +### 9: 多媒体 ### + +如果你的公司做播客或为产品发布制作视频,开源可以为你提供服务。借助像[Audacity][14]和[OpenShot][15]这样的工具,你可以对音频和视频做你需要的任何处理 -- 而且十分的廉价。实际上,你会感觉到很难再去找到比Audacity更好的播客工具,或者比OpenShot更易用的视频编辑器。没有太大的学习壁垒,或者闭源软件工具所要求的高额费用,开源的软件在帮助你创造专业水准的作品方面已经做得很好了。 + +### 10: 电子商务 ### + +如果你做在线销售,如果不尝试一下像[PrestaShop][16]之类的工具,你就太懈怠了。PrestaShop是最强大的电子商务解决方案之一,易于获取 -- 不需要许可证。 PrestaShop有你可能想要的所有功能(而且有些你可能都没有想过),这个开源平台已经在任何水平上超出了电子商务的范畴。 + +### FOSS 之于商业 ### + +开源已经不再局限于商业交流的范围了。在许多情况下,FOSS已经主导这种交流。如果你已经在寻找将开源解决方案运用的领域,看上面的10条就行了。 + +### 该你了 ### + +你已经将开源用到你的工作中了吗?如果是,属于哪一条方法呢? + +------------------------------------------------------------------------------- + +via: http://www.techrepublic.com/blog/10-things/10-best-uses-for-open-source-software-in-the-business-world/ + +作者:[Jack Wallen][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.techrepublic.com/search/?a=jack+wallen +[1]:http://community.pentaho.com/ +[2]:http://collabtive.o-dyn.de/ +[3]:http://www.sugarcrm.com/ +[4]:http://cynapse.com/cyn-in/ +[5]:https://www.zimbra.com/open-source +[6]:http://kolab.org/ +[7]:http://www.suse.org/ +[8]:http://www.redhat.com/ +[9]:http://www.ubuntu.com/ +[10]:http://www.suse.com/ +[11]:http://aws.amazon.com/ec2/ +[12]:http://www.rackspace.com/cloud +[13]:https://owncloud.org/ +[14]:http://audacity.sourceforge.net/ +[15]:http://www.openshot.org/ +[16]:https://www.prestashop.com/ diff --git a/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md deleted file mode 100644 index fcecf0d396..0000000000 --- a/sources/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md +++ /dev/null @@ -1,139 +0,0 @@ -4 Linux Based Mini PC You Can Buy In 2015 -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Linux_Based_Mini_PC.jpg) - -Mini PCs, in my opinion, will takeover the traditional desktop computers in near future. Traditional desktop has a bulky CPU which takes a lot of space with its fan running like a blower. The mini PCs, on the other hand, are tiny and compact. With hardly 4″ or 5″ in size, they can be easily placed on a table. - -Moreover, these mini PCs are fanless which is an added virtue. Of course, you can buy fanless regular desktops but the space consumption is still an issue. Personally, I find the mini PC cute in looks. If you are not a gamer and thinking of buying a new desktop PC, I’ll highly recommend you to **buy a Linux based mini PC**. - -If you go by my recommendation and consider buying it, you might wonder what options do you have. Worry not. In this post we shall see four **Linux based Mini PC that you can buy in 2015**. - -### Linux based mini PCs ### - -Please do note that some of these gadgets might not be available to order just yet. Some of these have been just announced and will be released to public in near future. - -#### 1. Meerkat by System76 #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/system76-meerkat.jpg) - -[System76][1] is a computer manufacturer exclusively dealing with only Ubuntu based desktop, laptops and servers. [System76 announced an Ubuntu based mini PC Meerkat][2] last week. Let’s take a quick look at its specification: - -**Specification** - -- Intel 5th Generation processors, available options i3-5010U and i5-5250U -- up to 2 TB of storage (M.2 SATA SSD) -- 16 GB DDR3 RAM -- Graphics Intel HD 5500 and Intel HD 6000 for i3 and i5 respectively -- 4″ x 4″ in size -- WiFi -- 1 Gb NIC -- 2 USB 3.0 ports - -**Price** - -In the range of $500 (yet to be confirmed). - -**Availability** - -US release by the end of March 2015. - -#### 2. Mintbox Mini by Compulab #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/mintbox-mini.jpeg) - -[Compulab][3] shrunk its flagship Linux Mint based PC devices, Mintbox into [Mintbox Mini][4]. The compact version is around 4″ in size. More details are as following: - -**Specifications** - -- AMD A4-6400T processor -- Radeon R3 graphics processor -- 4 GB RAM -- 64 GB SSD -- 2 USB 3.0 ports, 3 USB 2.0 ports -- 2 HDMI out ports -- 802.11 b/g/n Wifi -- Gigabit Ethernet -- MicroSD reader - -**Price** - -Staring around $300 - -**Availability** - -Second quarter of 2015 - -#### 3. Utilite2 by Compulab #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Utilite2-ARM-PC.jpg) - -It’s not that Compulab has stuck with Linux Mint only. It announced an ARM desktop PC running Ubuntu in last December. With a size of 3.4″x2.3″, [Utilite2][5] has modest feature and modest price. - -**Specifications** - -- Qualcomm Snapdragon 600 (APQ8064) quad-core CPU 1.7GHz -- 2GB RAM, eMMC with optional 32 GB mSATA storage -- Graphics with Qualcomm Adreno™ GPU -- 1080p video playback and capture -- Dual-antenna WiFi 802.11 and Bluetooth 4.0 -- Gigabit Ethernet, 4x USB2, USB OTG -- Cellular modem support - -**Price** - -$192 for regular model, $229 with SSD storage. Shipping charges extra. - -**Availability** - -Available to purchase now. It will take four weeks in shipping. - -#### Penguin Pocket Wee by Think Penguin #### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Think_Penguin_Pocket_Wee.jpeg) - -[Think Penguin][6] is a Open Source focused hardware manufacturer. In the mini PC category, it has [Penguin Pocket Wee][7] to offer. With 4.6″x 4.4″x 1.4″ in size, Penguin Pocket Wee provides a number of configuration to you. You can choose between the processors, storage, network adapters and what not. You can choose to buy it pre-installed with your favorite Linux distribution, default OS is Ubuntu. - -The general configuration is as following: - -- Intel Core i3 or i5 processor with support for up to 1080p HD video -- Expandable up to 16GB of DDR3 RAM -- Intel HD graphics -- Wireless N -- Up to 250GB of SSD -- 4 USB 3.0 -- Intel 10/100/1000 Gigabit Ethernet Controller - -**Price** - -Basic model starts at $499 and it can go up to $1000 based on the configuration you select. - -**Availability** - -Available to order now. There are offices in UK and USA so it should be shipping to North America and Europe. - -### What’s your pick? ### - -I have deliberately not included [Raspberry Pi 2][8] or other Linux microcomputer such as [Intel’s Compute Stick][9]. The reason is that I do not think that micro-computers fall in the same categories as mini PCs. - -What do you think? Are you tempted to replace your desktop with a mini PC? Is there another player which I missed in this list of **best Linux based mini PCs**? Do share your views. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/4-linux-based-mini-pc-buy-2015/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:https://system76.com/ -[2]:http://itsfoss.com/system76-unveils-ubuntu-based-mini-pc-meerkat/ -[3]:http://www.compulab.co.il/ -[4]:http://itsfoss.com/mintbox-mini-compact-linux-mint-powered-pc-unveiled/ -[5]:http://www.compulab.co.il/utilite-computer/web/utilite2-overview -[6]:https://www.thinkpenguin.com/ -[7]:https://www.thinkpenguin.com/gnu-linux/penguin-pocket-wee-gnu-linux-desktop -[8]:http://itsfoss.com/raspberry-pi-2-specs/ -[9]:http://itsfoss.com/intels-compute-stick/ \ No newline at end of file diff --git a/sources/talk/20150309 10 best uses for open source software in the business world.md b/sources/talk/20150309 10 best uses for open source software in the business world.md deleted file mode 100644 index 5393108cde..0000000000 --- a/sources/talk/20150309 10 best uses for open source software in the business world.md +++ /dev/null @@ -1,86 +0,0 @@ -translating wi-cuckoo LLAP -10 best uses for open source software in the business world -================================================================================ -> Open source offers some compelling benefits for businesses large and small -- but you might be surprised at some of the ways it's being used. - -![](http://tr2.cbsistatic.com/hub/i/r/2015/03/05/54a9c323-4311-4455-b10b-5182548da424/resize/620x485/95164f01a19cbd7a3e4b843be78febae/foss.jpg) - -Certain inevitabilities occur in technology. For instance, open source software will make its way into your business. Ten years ago, this could easily have been called into question. Now? There's no way to avoid it -- and there's no reason to. With so many powerful (and necessary) pieces of technology, open source has become, in various cases, the savior of tech. But what areas of your business are best suited for open source? The answer to that question is, of course, will be different from one company to the next. But some applications can apply in almost every circumstance. - -Let's take a look at 10 possible best-case uses for open source software that can help make your business grow, bring you a level of flexibility and reliability you haven't experienced, or just save you a welcome percentage of your budget. - -### 1: Server software ### - -If you're still battling Microsoft's IIS platform, you need to experience Apache. The flagship open source web server software is one of the most widely used on the planet. It's free, incredibly reliable, easy to manage, and doesn't require the enormous overhead needed for IIS. But open source isn't limited to just web servers. If you need SMB sharing across your company, consider Samba. Samba 4 even integrates with Active Directory, so you don't have to worry about setting up separate user accounts on the Samba server. - -### 2: Development ### - -Developing with open source is a no-brainer. PHP, Rails, Perl -- there are as many languages to develop with as there are tools (from IDEs to bug tracking). There are a lot of options for developing for open source or with open source tools (as are there with proprietary development). The biggest difference between open source and proprietary is the access you have to the software code. Within the world of FOSS (free open source software) the code is readily available. For many developers, the Linux operating system has everything they need to develop, built right in (especially those who code without a full-blown IDE). If you do require GUI development tools, open source has you covered. - -### 3: Security ### - -The route to security is a challenging one, but there are many paths to success. You can opt for the "security in a box" solution and go with the likes of Cisco (a solid solution) or you can craft your security to perfectly fit your needs with the likes of iptables. Yes, the open source security route will take a bit more time to deploy (with a much higher learning curve), but the end results are generally incredible. This doesn't even address the idea that using open source on the desktop is, generally speaking, a more secure platform than most proprietary systems. Deploy Linux on the desktops and your security woes will drop dramatically. - -### 4: Desktops ### - -This area is where most of the pushback happens. However, you must take into consideration the fact that the daily workflow has undergone a major paradigm shift. Most of what we do now is done via a web browser. So why not deploy Linux on the desktop? Not only does it work with the majority of today's tasks, it will do so without suffering from viruses, malware, and updates that cripple a system. It's not perfect -- what platform is? But it's solid, and in the end, it can save you money. That's a win-win. - -### 5: Workflow ### - -Every business depends upon workflow. For some businesses, a smooth workflow depends upon tools. Open source has this arena covered. CRM, HRM, ERP, BI, BPM... you name it, open source handles just about every possible acronym you can think of -- and it does it very well. With the likes of [Pentaho][1], [Collabtive][2], and [SugarCRM][3], open source can keep up with closed source tools any day. - -### 6: Collaboration ### - -Without the ability to work together on projects, your staff wouldn't be able to get the job done. So the collaboration tools you choose are crucial. You'll find plenty of quality collaboration tools within the world of open source. [Cyn.in community edition][4], [Zimbra Open Source Edition][5], and [Kolab][6] are just three examples of the excellent collaboration tools that exist within the open source world. - -### 7: Big data ### - -When it comes to big data, open source can't be matched. Thanks to the likes of [SUSE][7], big data and open source now go hand in hand. Innovations like in-memory data and live kernel patching make open source an ideal solution for big data. It can be perfectly tuned to meet the massive demands big data places on the platform. Closed source software can't touch this level of flexibility. - -### 8: Cloud ### - -The major players in the cloud are open source. [Red Hat][8], [Ubuntu][9], [SUSE][10], [Amazon][11], [Rackspace][12] -- they all get it and know that open source is the best solution for cloud deployments. But if you don't want to go with the larger companies, there are always up and coming tools like [ownCloud][12], where you can either take advantage of its hosted cloud solutions or build your own. - -### 9: Multimedia ### - -If your company does podcasting or video for PR, open source has you covered. With tools like [Audacity][14] and [OpenShot][15], you can do just about anything with audio or video you need -- and do so on the cheap. In fact, you'll be hard-pressed to find a better podcasting tool than Audacity or an easier-to-use video editor than OpenShot. Both pieces of software do an outstanding job of creating professional-quality results without the steep learning curves or the high prices often associated with closed source tools - -### 10: E-commerce ### - -If your business sells products online, you'd be remiss not to give a tool like [PrestaShop][16] a try. PrestaShop is, hands down, one of the most powerful e-commerce solutions available -- regardless of license. With just about every feature you could possible want (and some you probably haven't even thought of), the open source platform excels at e-commerce on every level. - -### FOSS for business ### - -Open source is no longer hanging around the periphery of the business conversation. In many instances, FOSS leads and dominates that conversation. If you've been looking for areas to consider deploying open source solutions, look no further than these 10. - -### Your turn ### - -Have you added open source software to your business? If so, in what way? - --------------------------------------------------------------------------------- - -via: http://www.techrepublic.com/blog/10-things/10-best-uses-for-open-source-software-in-the-business-world/ - -作者:[Jack Wallen][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.techrepublic.com/search/?a=jack+wallen -[1]:http://community.pentaho.com/ -[2]:http://collabtive.o-dyn.de/ -[3]:http://www.sugarcrm.com/ -[4]:http://cynapse.com/cyn-in/ -[5]:https://www.zimbra.com/open-source -[6]:http://kolab.org/ -[7]:http://www.suse.org/ -[8]:http://www.redhat.com/ -[9]:http://www.ubuntu.com/ -[10]:http://www.suse.com/ -[11]:http://aws.amazon.com/ec2/ -[12]:http://www.rackspace.com/cloud -[13]:https://owncloud.org/ -[14]:http://audacity.sourceforge.net/ -[15]:http://www.openshot.org/ -[16]:https://www.prestashop.com/ diff --git a/sources/talk/20150318 The future of Linux storage.md b/sources/talk/20150318 The future of Linux storage.md new file mode 100644 index 0000000000..25f178bf8b --- /dev/null +++ b/sources/talk/20150318 The future of Linux storage.md @@ -0,0 +1,82 @@ +[translating by KayGuoWhu] +The future of Linux storage +================================================================================ +> **Summary**:Linux software developers are working hard on expanding Linux's file and storage options. + +BOSTON - At the [Linux Foundation's][1] new [Vault][2] show, it's all about file systems and storage. You might think that there's nothing new to say about either topic, but you'd be wrong. + +![](http://zdnet2.cbsistatic.com/hub/i/r/2015/03/12/c8f92cc2-b963-4238-80a0-d785ec93698c/resize/770x578/08d93a8a393d3f50b2a56e6b0e7a0ca9/btrfs-1.jpg) +Linux file systems, such as Btrfs, and storage support options are constantly evolving. -- Facebook + +Storage technology has come a long way from the days of, as Linus Torvalds put it, "[nasty platters of spinning rust][3]" and Linux has had to keep up. In recent years, for example, [flash memory has arrived as enterprise server primary storage][4] and [persistent memory][5] is bringing us storage that works at DRAM speeds. At the same time, Big Data, cloud computing, and containers are all bringing new use cases to Linux. + +To deal with this, Linux developers are both expanding their existing file and storage programs and working on new ones. + +### Btrfs ### + +For instance, Chris Mason, a Facebook software engineer and one of the [Btrfs][6] (pronounced Butter FS) maintainers, explained how Facebook uses this file system. Btrfs has many advantages as a file system such as the ability to handle both numerous small files and single files as large as 16 exabytes; baked in RAID; built-in file-system compression; and integrated multi-storage device support. + +Facebook, of course, runs on Linux. To be exact, Facebook runs the 3.10 and 3.18 Linux kernels on an internal distribution, which is based on [CentOS][7]. For Facebook, the real win is that Btrfs is stable and fast under the endless input/output operations per second (IOPS) pounding from Facebook's constantly updating users. + +That's the good news. The bad news is that Btrfs is still much too slow for traditional DBMSs such as MySQL. For those, Facebook uses [XFS][8]. To co-ordinate the two file systems, Facebook uses [Gluster][9], the open-source distributed file system. + +Facebook, which works hand-in-glove with the upstream Btrfs Linux kernel developers, is working on improving Btrfs's DBMS speed. Mason, and his companions, are doing this by using Btrfs with the [RocksDB][10] database. This is a persistent key-value store for fast storage, which can be used as the foundation for a client-server database. + +Btrfs also still has some bugs. For example, if you're foolish enough to fill a disk almost to bursting, Btrfs will stop you from writing to storage before the disk is completely stuffed. For some projects, such as [CoreOS][12], the enterprise Linux that relies on containers, that's a showstopper. [CoreOS has since switched to using xt4 and overlayfs][11]. + +The Btrfs crew is also working on data deduplication. In this, when a file system has more than one identical file, you automatically delete the duplicate. As Mason said, "Not everyone needs this, but if you need it, you really need it!" + +Btrfs isn't the only file system that's both very important and getting worked on. John Spray, a senior software engineer at [Red Hat][13], talked about the distributed [Ceph][14] file system. + +### Ceph FS ### + +Ceph provides a distributed object store and file system which, in turn, relies on a resilient and scalable storage model (RADOS) using clusters of commodity hardware. Along with the RADOS block device (RBD), and the RADOS object gateway (RGW), Ceph provides a [POSIX][15] file-system interface -- Ceph FS. While RBD and RGW have been in use for production workloads for some time, efforts to make Ceph FS ready for production are now underway. + +[Red Hat, after acquiring Inktank][16], Ceph's parent company, in 2014 has been working hard on making CephFS production ready. For better or worse, Spray said, "Some people are already using it in production; we're terrified of this. It's really not ready yet." Still, Spray added, that this "is a mixed blessing because while it's a bit scary, we get really useful feedback and testing from those users." + +That's because while Ceph object stores scale out well, Ceph FS, as a POSIX compliant file-system, are hard to scale out. For example, as a distributed file system, Ceph FS has to deal with multiple writes from multiple clients. This can lead to all or nothing situations where one client can write and others must wait. This can result in file-locking situations that are more complicated than those in ordinary file systems. + +Still, Ceph FS is worth doing, Spray said, "since POSIX file-systems are an operating system lingua franca." That's not to say that Ceph FS doesn't work. "It's not horribly broken. It works. What's missing is the repair and monitoring tools." + +Red Hat is currently hard at work on getting [fsck][17] and journal repair tools, snapshot hardening, better client access control, and cloud and container integration. For now, though, Ceph FS is a file system that only the very brave, or foolish, should use in production. + +### File and storage odds and ends ### + +As for larger issues of file-systems and storage, Jeff Layton, senior software engineer at [Primary Data][18], explained that there are efforts under way to to create "tests for catastrophic power failure, without actually pulling the plug." These tests will soon be integrated with [xfstests][19], the gold standard for Linux file-system testing. + +Rik van Riel, a Red Hat principal software engineer, spoke about the problem of dealing with persistent memory products. You can treat them as storage or as memory. But, you can't currently take snapshots for backups if you use them as memory. The real problem: van Riel is certain that people will try to use persistent memory as both, which will lead to such as situations as "Without back up, how do you deal with a 200GB persistent memory database?" Adding insult to injury, logging systems don't currently work with persistent memory. + +What's the right answer? Linux doesn't have one yet, but programmers are working on it. + +So, while Linux has many file systems and can use any kind of storage out there that can hold a byte, there's still a lot of work to be done. Technology never stands still. Linux, which runs on everything from devices to desktops to servers to clouds to supercomputers, has to keep up with storage advances no matter where they appear. + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/linux-storage-futures/ + +作者:[Steven J. Vaughan-Nichols][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.zdnet.com/meet-the-team/us/sjvn/ +[1]:http://www.linuxfoundation.org/ +[2]:http://events.linuxfoundation.org/events/vault +[3]:http://www.wired.com/2012/10/linus-torvalds-hard-disks/ +[4]:http://www.zdnet.com/article/sandisk-launches-infiniflash-aims-to-bring-flash-array-costs-down/ +[5]:http://events.linuxfoundation.org/sites/events/files/eeus13_wheeler.pdf +[6]:https://btrfs.wiki.kernel.org/index.php/Main_Page +[7]:http://www.centos.org/ +[8]:http://oss.sgi.com/projects/xfs/ +[9]:http://www.gluster.org/ +[10]:http://rocksdb.org/ +[11]:http://lwn.net/Articles/627232/ +[12]:https://coreos.com/ +[13]:http://www.redhat.com/ +[14]:http://ceph.com/ +[15]:http://pubs.opengroup.org/onlinepubs/9699919799/ +[16]:http://www.zdnet.com/article/red-hat-acquires-inktank-for-175m/ +[17]:http://linux.die.net/man/8/fsck +[18]:http://primarydata.com/ +[19]:http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git;a=summary \ No newline at end of file diff --git a/sources/talk/20150320 Revealed--The best and worst of Docker.md b/sources/talk/20150320 Revealed--The best and worst of Docker.md new file mode 100644 index 0000000000..1e188d6cba --- /dev/null +++ b/sources/talk/20150320 Revealed--The best and worst of Docker.md @@ -0,0 +1,66 @@ +Revealed: The best and worst of Docker +================================================================================ +![](http://images.techhive.com/images/article/2015/01/best_worst_places_to_work-100564193-primary.idge.jpg) +Credit: [Shutterstock][1] + +> Docker experts talk about the good, the bad, and the ugly of the ubiquitous application container system + +No question about it: Docker's app container system has made its mark and become a staple in many IT environments. With its accelerating adoption, it's bound to stick around for a good long time. + +But there's no end to the debate about what Docker's best for, where it falls short, or how to most sensibly move it forward without alienating its existing users or damaging its utility. Here, we've turned to a few of the folks who have made Docker their business to get their takes on Docker's good, bad, and ugly sides. + +### The good ### + +One hardly expects Steve Francia, chief of operations of the Docker open source project, to speak of Docker in anything less than glowing terms. When asked by email about Docker's best attributes, he didn't disappoint: "I think the best thing about Docker is that it enables people, enables developers, enables users to very easily run an application anywhere," he said. "It's almost like the Holy Grail of development in that you can run an application on your desktop, and the exact same application without any changes can run on the server. That's never been done before." + +Alexis Richardson of [Weaveworks][2], a virtual networking product, praised Docker for enabling simplicity. "Docker offers immense potential to radically simplify and speed up how software gets built," he replied in an email. "This is why it has delivered record-breaking initial mind share and traction." + +Bob Quillin, CEO of [StackEngine][3], which makes Docker management and automation solutions, noted in an email that Docker (the company) has done a fine job of maintaining Docker's (the product) appeal to its audience. "Docker has been best at delivering strong developer support and focused investment in its product," he wrote. "Clearly, they know they have to keep the momentum, and they are doing that by putting intense effort into product functionality." He also mentioned that Docker's commitment to open source has accelerated adoption by "[allowing] people to build around their features as they are being built." + +Though containerization itself isn't new, as Rob Markovich of IT monitoring-service makers [Moogsoft][4] pointed out, Docker's implementation makes it new. "Docker is considered a next-generation virtualization technology given its more modern, lightweight form [of containerization]," he wrote in an email. "[It] brings an opportunity for an order-of-magnitude leap forward for software development teams seeking to deploy code faster." + +### The bad ### + +What's less appealing about Docker boils down to two issues: the complexity of using the product, and the direction of the company behind it. + +Samir Ghosh, CEO of enterprise PaaS outfit [WaveMaker][5], gave Docker a thumbs-up for simplifying the complex scripting typically needed for continuous delivery. That said, he added, "That doesn't mean Docker is simple. Implementing Docker is complicated. There are a lot of supporting technologies needed for things like container management, orchestration, app stack packaging, intercontainer networking, data snapshots, and so on." + +Ghosh noted the ones who feel the most of that pain are enterprises that want to leverage Docker for continuous delivery, but "it's even more complicated for enterprises that have diverse workloads, various app stacks, heterogenous infrastructures, and limited resources, not to mention unique IT needs for visibility, control and security." + +Complexity also becomes an issue in troubleshooting and analysis, and Markovich cited the fact that Docker provides application abstraction as the reason why. "It is nearly impossible to relate problems with application performance running on Docker to the performance of the underlying infrastructure domains," he said in an email. "IT teams are going to need visibility -- a new class of monitoring and analysis tools that can correlate across and relate how everything is working up and down the Docker stack, from the applications down to the private or public infrastructure." + +Quillin is most concerned about Docker's direction vis-à-vis its partner community: "Where will Docker make money, and where will their partners? If [Docker] wants to be the next VMware, it will need to take a page out of VMware's playbook in how to build and support a thriving partner ecosystem. + +"Additionally, to drive broader adoption, especially in the enterprise, Docker needs to start acting like a market leader by releasing more fully formed capabilities that organizations can count on, versus announcements of features with 'some assembly required,' that don't exist yet, or that require you to 'submit a pull request' to fix it yourself." + +Francia pointed to Docker's rapid ascent for creating its own difficulties. "[Docker] caught on so quickly that there's definitely places that we're focused on to add some features that a lot of users are looking forward to." + +One such feature, he noted, was having a GUI. "Right now to use Docker," he said, "you have to be comfortable with the command line. There's no visual interface to using Docker. Right now it's all command line-based. And we know if we want to really be as successful as we think we can be, we need to be more approachable and a lot of people when they see a command line, it's a bit intimidating for a lot of users." + +### The future ### + +In that last respect, Docker recently started to make advances. Last week it [bought the startup Kitematic][6], whose product gave Docker a convenient GUI on Mac OS X (and will eventually do the same for Windows). Another acqui-hire, [SocketPlane][7], is being spun in to work on Docker's networking. + +What remains to be seen is whether Docker's proposed solutions to its problems will be adopted, or whether another party -- say, [Red Hat][8] -- will provide a more immediately useful solution for enterprise customers who can't wait around for the chips to stop falling. + +"Good technology is hard and takes time to build," said Richardson. "The big risk is that expectations spin wildly out of control and customers are disappointed." + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2896895/application-virtualization/best-and-worst-about-docker.html + +作者:[Serdar Yegulalp][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Serdar-Yegulalp/ +[1]:http://shutterstock.com/ +[2]:http://weave.works/ +[3]:http://stackengine.com/ +[4]:http://www.moogsoft.com/ +[5]:http://www.wavemaker.com/ +[6]:http://www.infoworld.com/article/2896099/application-virtualization/dockers-new-acquisition-does-containers-on-the-desktop.html +[7]:http://www.infoworld.com/article/2892916/application-virtualization/docker-snaps-up-socketplane-to-fix-networking-flaws.html +[8]:http://www.infoworld.com/article/2895804/application-virtualization/red-hat-wants-to-do-for-containers-what-its-done-for-linux.html \ No newline at end of file diff --git a/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md b/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md deleted file mode 100644 index ecd44c9c75..0000000000 --- a/sources/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md +++ /dev/null @@ -1,61 +0,0 @@ -Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl -================================================================================ -> **Question**: I need to convert readable date and time to a corresponding UNIX timestamp (i.e., Epoch time), or vice versa in a Perl program. Can you show me Perl code examples of converting date/time to UNIX timestamp, or conversely, converting UNIX timestamp to human-readable date and time? - -When your Perl script needs to deal with time information, there are two different ways to represent and manipulate date and time in the script. One way is a human-readable string representation of time (e.g., "Sat Mar 14 10:14:05 EDT 2015"), and the other is via UNIX timestamp (also known as "Epoch time") which is the number of elapsed seconds since 00:00:00 UTC, 1 Jaunary 1970. Either method has its own pros and cons, and depending on your requirements you may want to convert one format to the other. - -### Convert Local Time to UNIX Timestamp in Perl ### - -To obtain UNIX time from a date string, you can use str2time() in Date::Parse module. It can handle a variety of date formats, such as: - -- Sat Mar 14 10:14:05 EDT 2015 -- 3/14/2015 10:14:05 -0400 -- 14/Mar/15 10:14:05 -- 14 Mar 15 10:14:05 - - use Date::Parse; - - my $local_time = "Sat Mar 14 10:14:05 EDT 2015"; - - # 1426342445 will be stored in $unix_time - my $unix_time = str2time($local_time); - -Date:Parse module supports multiple languages (English, French, German and Italian) and timezones. For example: - - use Date::Parse; - use Date::Language; - - my $lang = Date::Language->new('French'); - my $unix_time = $lang->str2time("12:14:05, Ago 16, 2014 (CEST)"); - -### Convert UNIX Timestmp to Human-Readable Date and Time in Perl ### - -If you want to show a UNIX timestamp in a human-readable format, you can use localtime() function which converts a UNIX timestamp into a 9-element list. You can use the returned list to construct any kind of human-readable date/time string as you want. Here is a code snippet. - - # $sec, $min, $hour: seconds, minutes and hours - # $mday: the day of the month (0-31) - # $mon: month in the range of 0 (Jaunary) and 11 (December) - # $year: the number of years that have elapsed since 1900 - # $wday: the day of the week in the range of 0 (Sunday) and 6 (Saturday) - # $yday: the day of the year in the range of 0 and 364 (or 365 in leap years) - # $isdst: whether or not it's in daylight saving time - - my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($unix_timestamp); - - # necessary conversion of $mon and $year - $mon += 1; - $year += 1900; - - print "Current time: $year-$mon-$mday $hour:$min:$sec\n"; - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/convert-local-time-unix-timestamp-perl.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md new file mode 100644 index 0000000000..ba85e4c6a8 --- /dev/null +++ b/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md @@ -0,0 +1,266 @@ +11 Linux Terminal Commands That Will Rock Your World +================================================================================ +I have been using Linux for about 10 years and what I am going to show you in this article is a list of Linux commands, tools and clever little tricks that I wish somebody had shown me from the outset instead of stumbling upon them as I went along. + +![Linux Keyboard Shortcuts.](http://f.tqn.com/y/linux/1/L/m/J/1/keyboardshortcuts.png) +Linux Keyboard Shortcuts. + +### 1. Useful Command Line Keyboard Shortcuts ### + +The following keyboard shortcuts are incredibly useful and will save you loads of time: + +- CTRL + U - Cuts text up until the cursor. +- CTRL + K - Cuts text from the cursor until the end of the line +- CTRL + Y - Pastes text +- CTRL + E - Move cursor to end of line +- CTRL + A - Move cursor to the beginning of the line +- ALT + F - Jump forward to next space +- ALT + B - Skip back to previous space +- ALT + Backspace - Delete previous word +- CTRL + W - Cut word behind cursor +- Shift + Insert - Pastes text into terminal + +Just so that the commands above make sense look at the next line of text. + + sudo apt-get intall programname + +As you can see I have a spelling error and for the command to work I would need to change "intall" to "install". + +Imagine the cursor is at the end of the line. There are various ways to get back to the word install to change it. + +I could press ALT + B twice which would put the cursor in the following position (denoted by the ^ symbol): + + sudo apt-get^intall programname + +Now you could press the cursor key and insert the ''s' into install. + +Another useful command is "shift + insert" especially If you need to copy text from a browser into the terminal. + +![](http://f.tqn.com/y/linux/1/L/n/J/1/sudotricks2.png) + +### 2. SUDO !! ### + +You are going to really thank me for the next command if you don't already know it because until you know this exists you curse yourself every time you enter a command and the words "permission denied" appear. + +- sudo !! + +How do you use sudo !!? Simply. Imagine you have entered the following command: + + apt-get install ranger + +The words "Permission denied" will appear unless you are logged in with elevated privileges. + +sudo !! runs the previous command as sudo. So the previous command now becomes: + + sudo apt-get install ranger + +If you don't know what sudo is [start here][1]. + +![Pause Terminal Applications.](http://f.tqn.com/y/linux/1/L/o/J/1/pauseapps.png) +Pause Terminal Applications. + +### 3. Pausing Commands And Running Commands In The Background ### + +I have already written a guide showing how to run terminal commands in the background. + +- CTRL + Z - Pauses an application +- fg - Returns you to the application + +So what is this tip about? + +Imagine you have opened a file in nano as follows: + + sudo nano abc.txt + +Halfway through typing text into the file you realise that you quickly want to type another command into the terminal but you can't because you opened nano in foreground mode. + +You may think your only option is to save the file, exit nano, run the command and then re-open nano. + +All you have to do is press CTRL + Z and the foreground application will pause and you will be returned to the command line. You can then run any command you like and when you have finished return to your previously paused session by entering "fg" into the terminal window and pressing return. + +An interesting thing to try out is to open a file in nano, enter some text and pause the session. Now open another file in nano, enter some text and pause the session. If you now enter "fg" you return to the second file you opened in nano. If you exit nano and enter "fg" again you return to the first file you opened within nano. + +![nohup.](http://f.tqn.com/y/linux/1/L/p/J/1/nohup3.png) +nohup. + +### 4. Use nohup To Run Commands After You Log Out Of An SSH Session ### + +The [nohup command][2] is really useful if you use the ssh command to log onto other machines. + +So what does nohup do? + +Imagine you are logged on to another computer remotely using ssh and you want to run a command that takes a long time and then exit the ssh session but leave the command running even though you are no longer connected then nohup lets you do just that. + +For instance I use my [Raspberry PI][3] to download distributions for review purposes. + +I never have my Raspberry PI connected to a display nor do I have a keyboard and mouse connected to it. + +I always connect to the Raspberry PI via [ssh][4] from a laptop. If I started downloading a large file on the Raspberry PI without using the nohup command then I would have to wait for the download to finish before logging off the ssh session and before shutting down the laptop. If I did this then I may as well have not used the Raspberry PI to download the file at all. + +To use nohup all I have to type is nohup followed by the command as follows: + + nohup wget http://mirror.is.co.za/mirrors/linuxmint.com/iso//stable/17.1/linuxmint-17.1-cinnamon-64bit.iso & + +![Schedule tasks with at.](http://f.tqn.com/y/linux/1/L/q/J/1/at.png) +Schedule tasks with at. + +### 5. Running A Linux Command 'AT' A Specific Time ### + +The 'nohup' command is good if you are connected to an SSH server and you want the command to remain running after logging out of the SSH session. + +Imagine you want to run that same command at a specific point in time. + +The 'at' command allows you to do just that. 'at' can be used as follows. + + at 10:38 PM Fri + at> cowsay 'hello' + at> CTRL + D + +The above command will run the program [cowsay][5] at 10:38 PM on Friday evening. + +The syntax is 'at' followed by the date and time to run. + +When the at> prompt appears enter the command you want to run at the specified time. + +The CTRL + D returns you to the cursor. + +There are lots of different date and time formats and it is worth checking the man pages for more ways to use 'at'. + +![](http://f.tqn.com/y/linux/1/L/l/J/1/manmost.png) + +### 6. Man Pages ### + +Man pages give you an outline of what commands are supposed to do and the switches that can be used with them. + +The man pages are kind of dull on their own. (I guess they weren't designed to excite us). + +You can however do things to make your usage of man more appealing. + + export PAGER=most + +You will need to install 'most; for this to work but when you do it makes your man pages more colourful. + +You can limit the width of the man page to a certain number of columns using the following command: + + export MANWIDTH=80 + +Finally, if you have a browser available you can open any man page in the default browser by using the -H switch as follows: + + man -H + +Note this only works if you have a default browser set up within the $BROWSER environment variable. + +![View Processes With htop.](http://f.tqn.com/y/linux/1/L/r/J/1/nohup2.png) +View Processes With htop. + +### 7. Use htop To View And Manage Processes ### + +Which command do you currently use to find out which processes are running on your computer? My bet is that you are using '[ps][6]' and that you are using various switches to get the output you desire. + +Install '[htop][7]'. It is definitely a tool you will wish that you installed earlier. + +htop provides a list of all running processes in the terminal much like the file manager in Windows. + +You can use a mixture of function keys to change the sort order and the columns that are displayed. You can also kill processes from within htop. + +To run htop simply type the following into the terminal window: + + htop + +![Command Line File Manager - Ranger.](http://f.tqn.com/y/linux/1/L/s/J/1/ranger.png) +Command Line File Manager - Ranger. + +### 8. Navigate The File System Using ranger ### + +If htop is immensely useful for controlling the processes running via the command line then [ranger][8] is immensely useful for navigating the file system using the command line. + +You will probably need to install ranger to be able to use it but once installed you can run it simply by typing the following into the terminal: + + ranger + +The command line window will be much like any other file manager but it works left to right rather than top to bottom meaning that if you use the left arrow key you work your way up the folder structure and the right arrow key works down the folder structure. + +It is worth reading the man pages before using ranger so that you can get used to all keyboard switches that are available. + +![Cancel Linux Shutdown.](http://f.tqn.com/y/linux/1/L/t/J/1/shutdown.png) +Cancel Linux Shutdown. + +### 9. Cancel A Shutdown ### + +So you started the [shutdown][9] either via the command line or from the GUI and you realised that you really didn't want to do that. + + shutdown -c + +Note that if the shutdown has already started then it may be too late to stop the shutdown. + +Another command to try is as follows: + +- [pkill][10] shutdown + +![Kill Hung Processes With XKill.](http://f.tqn.com/y/linux/1/L/u/J/1/killhungprocesses.png) +Kill Hung Processes With XKill. + +### 10. Killing Hung Processes The Easy Way ### + +Imagine you are running an application and for whatever reason it hangs. + +You could use 'ps -ef' to find the process and then kill the process or you could use 'htop'. + +There is a quicker and easier command that you will love called [xkill][11]. + +Simply type the following into a terminal and then click on the window of the application you want to kill. + + xkill + +What happens though if the whole system is hanging? + +Hold down the 'alt' and 'sysrq' keys on your keyboard and whilst they are held down type the following slowly: + +- [REISUB][12] + +This will restart your computer without having to hold in the power button. + +![youtube-dl.](http://f.tqn.com/y/linux/1/L/v/J/1/youtubedl2.png) +youtube-dl. + +### 11. Download Youtube Videos ### + +Generally speaking most of us are quite happy for Youtube to host the videos and we watch them by streaming them through our chosen media player. + +If you know you are going to be offline for a while (i.e. due to a plane journey or travelling between the south of Scotland and the north of England) then you may wish to download a few videos onto a pen drive and watch them at your leisure. + +All you have to do is install youtube-dl from your package manager. + +You can use youtube-dl as follows: + + youtube-dl url-to-video + +You can get the url to any video on Youtube by clicking the share link on the video's page. Simply copy the link and paste it into the command line (using the shift + insert shortcut). + +### Summary ### + +I hope that you found this list useful and that you are thinking "i didn't know you could do that" for at least 1 of the 11 items listed. + +-------------------------------------------------------------------------------- + +via: http://linux.about.com/od/commands/tp/11-Linux-Terminal-Commands-That-Will-Rock-Your-World.htm + +作者:[Gary Newell][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linux.about.com/bio/Gary-Newell-132058.htm +[1]:http://linux.about.com/cs/linux101/g/sudo.htm +[2]:http://linux.about.com/library/cmd/blcmdl1_nohup.htm +[3]:http://linux.about.com/od/mobiledevicesother/a/Raspberry-Pi-Computer-Running-Linux.htm +[4]:http://linux.about.com/od/commands/l/blcmdl1_ssh.htm +[5]:http://linux.about.com/cs/linux101/g/cowsay.htm +[6]:http://linux.about.com/od/commands/l/blcmdl1_ps.htm +[7]:http://www.linux.com/community/blogs/133-general-linux/745323-5-commands-to-check-memory-usage-on-linux +[8]:http://ranger.nongnu.org/ +[9]:http://linux.about.com/od/commands/l/blcmdl8_shutdow.htm +[10]:http://linux.about.com/library/cmd/blcmdl1_pkill.htm +[11]:http://linux.about.com/od/funnymanpages/a/funman_xkill.htm +[12]:http://blog.kember.net/articles/reisub-the-gentle-linux-restart/ \ No newline at end of file diff --git a/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md b/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md new file mode 100644 index 0000000000..8faab0ce1d --- /dev/null +++ b/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md @@ -0,0 +1,213 @@ +tanslating by martin. + +Fedora GNOME Keyboard Shortcuts +================================================================================ +To get the very best out of the [GNOME desktop environment][1], within Fedora, you need to learn and remember the keyboard shortcuts required to navigate the system. + +This article lists the most useful keyboard shortcuts and how they are used. + +![GNOME Keyboard Shortcuts - The Super Key. ](http://f.tqn.com/y/linux/1/L/o/K/1/gnomekeyboardshortcut1.png) +GNOME Keyboard Shortcuts - The Super Key. + +#### 1. The Super Key #### + +[The "super" key][2] is your best friend when navigating modern operating systems. + +On a standard laptop the "super" key sits on the bottom row next to the "alt" key. + +When you press the "super" key the "activities" overview will be displayed and you will be able to see all of the open applications zoomed out. + +Pressing "ALT" and "F1" together will show the same display. + +![GNOME Run Command.](http://f.tqn.com/y/linux/1/L/p/K/1/runcommand.png) +GNOME Run Command. + +### 2. How To Run A Command Quickly ### + +If you need to run a command quickly, you can press "ALT" and "F2" which displays a "Run Command" dialog. + +You can now enter your command into that window and press return. + +![TAB Through Applications.](http://f.tqn.com/y/linux/1/L/q/K/1/tabthroughwindows.png) +TAB Through Applications. + +### 3. Quickly Switch To Other Open Applications ### + +As with Microsoft Windows you can switch applications using the "ALT" and "TAB" keys. + +On some keyboards the tab key looks like this: **|<- ->|** and on others it simply spells the word "TAB". + +The GNOME application switcher simply shows the icons and names of the applications as you tab through them. + +If you hold down the "shift" and "tab" keys, the application switcher rotates around the icons in reverse order. + +![Switch Windows In The Same Application.](http://f.tqn.com/y/linux/1/L/r/K/1/switchwindowsinsameapplication.png) +Switch Windows In The Same Application. + +### 4. Quickly Switch To Another Window In The Same Application ### + +If you are anything like me then you will end up with half a dozen instances of Firefox open. + +You now know that "Alt" and "Tab" switch between applications. + +There are two ways to cycle through all of the open instances of the same application. + +The first is to press "Alt" and "Tab" until the cursor sits over the icon of the application with many windows that you wish to cycle through. After a pause a dropdown will appear and you can select the Window with the mouse. + +The second and preferred option is to press "Alt" and "Tab" until the cursor sits over the icon of the application you want to cycle through and then press the "super" and "`" keys to toggle through the open instances. + +**Note that the "`" key is the one just above the tab key. The key for cycling through the open instances is always the key above the tab key regardless of your keyboard layout, therefore it isn't always guaranteed to be the "`" key.** + +If you have nimble fingers (or as I like to call them ninja fingers) then you can hold the "shift", "`" and "super" key to cycle backwards through the open instances of an application. + +![Switch Keyboard Focus.](http://f.tqn.com/y/linux/1/L/s/K/1/switchkeyboardfocus.png) +Switch Keyboard Focus. + +### 5. Switch Keyboard Focus ### + +This keyboard shortcut isn't essential but a nice to know. + +If you want to switch the keyboard focus to the search bar or to an application window you can press "CTRL", "ALT" and "TAB". to show a list of possible areas to switch to. + +You can then use the arrow keys to cycle through the possible options. + +![Show All Applications.](http://f.tqn.com/y/linux/1/L/t/K/1/showapplications.png) +Show All Applications. + +### 6. Show A List Of All The Applications ### + +If the last one was a nice to have then this one is a real time saver. + +To quickly navigate to a full list of all the applications on your system press the "super" key and "A". + +![Switch Workspaces.](http://f.tqn.com/y/linux/1/L/u/K/1/switchworkspaces.png) +Switch Workspaces. + +### 7. Switch Workspaces ### + +If you have been using Linux for a while you will appreciate the fact that you [can use multiple workspaces][3]. + +For instance in one workspace you might have development environments open, in another web browsers and in a third your email client. + +To toggle between workspaces press the "super" and the "Page Up" (PGUP) keys to toggle in one direction and the "super", "Page Down" (PGDN) keys to toggle in the other direction. + +The alternative but more longwinded away to switch to another workspace is to press the "super" key to show a list of applications and then select the workspace you wish to switch to on the right side of the screen. + +![Move Application To Another Workspace.](http://f.tqn.com/y/linux/1/L/v/K/1/movetoanewworkspace.png) +Move Application To Another Workspace. + +### 8. Move Items To A New Workspace ### + +If the workspace you are using is getting cluttered and you wish to move the current application to a new workspace press the "super", "shift" and "page up" button or "super", "shift" and "page down" key. + +Alternatively press the "super" key to bring up the list of applications and drag the application you wish to move to one of the workspaces on the right of the screen. + +![Show The Message Tray.](http://f.tqn.com/y/linux/1/L/w/K/1/showmessagetray.png) +Show The Message Tray. + +### 9. Show The Message Tray ### + +The message tray provides a list of notifications. + +To bring up the message tray press the "super" and "M" key on the keyboard. + +Alternatively move the mouse to the bottom right corner of the screen. + +![Lock The Screen.](http://f.tqn.com/y/linux/1/L/x/K/1/lockscreen.png) +Lock The Screen. + +### 10. Lock The Screen ### + +Need to a comfort break or a cup of coffee? Don't want sticky paws all over your keyboard? + +Whenever you leave your computer alone get in the habit of pressing "super" and L to lock the screen. + +To unlock the screen drag up from the bottom and enter your password. + +![Control Alt Delete Within Fedora.](http://f.tqn.com/y/linux/1/L/y/K/1/poweroff.png) +Control Alt Delete Within Fedora. + +### 11. Power Off ### + +If you used to be a Windows user then you will remember the three finger salute known as CTRL, ALT and DELETE. + +If you press "CTRL", "ALT" and "DEL" on your keyboard within Fedora a message will appear telling you that your computer will shut down in 60 seconds. + +### 12. Editing Shortcuts ### + +The editing keyboard shortcuts are pretty much universal across every operating system. + +- CTRL + A - Select All +- CTRL + X - Cut +- CTRL + C - Copy +- CTRL + V - Paste +- CTRL + Z - Undo + +### 13. Screen Capturing ### + +As with the editing shortcuts, the screencapturing keys are fairly standard + +- PRTSC (Print Screen) - Take screenshot +- Alt + PRTSC - Take screenshot of current window +- Shift + PRTSC - Take screenshot of an area of the screen + +Here is one that is fairly unique but great for people making tutorial videos. + +- CTRL + ALT + SHIFT + R - Record Screencast +- CTRL + ALT + SHIFT + R again - Stop Screencast + +The [screencasts][4] will be stored in the videos folder under your home directory in the [webm][5] format. + +![Put Windows Side By Side.](http://f.tqn.com/y/linux/1/L/z/K/1/splitwindows.png) +Put Windows Side By Side. + +### 14. Put Windows Side By Side ### + +You can put windows side by side so that one uses up the left side of the screen and the other uses the right side of the screen. + +Press the "Super" and "Left Arrow" key on the keyboard to shift the current application to the left. + +Press the "Super" and "Right Arrow" key on the keyboard to shift the current application to the right. + +### 15. Maximise, Minimise And Restore Windows ### + +To maximise a window double click on the title bar. + +To restore a window to its original size double click on the maximised window. + +To minimise a window, right click and select "minimise" from the menu. + +![GNOME Keyboard Shortcut Cheat Sheet. ](http://f.tqn.com/y/linux/1/L/-/L/1/gnomekeyboardshortcuts.png) +GNOME Keyboard Shortcut Cheat Sheet. + +### 16. Summary ### + +To help you learn these keyboard shortcuts I have created a cheat sheet which you can print out and stick to your wall. + +When you have learned these shortcuts you will begin to appreciate how modern desktop environments work. + +- [Click here to view the Fedora Linux GNOME Desktop Environment cheat sheet.][6] +- [Click here for the GNOME WIKI][7] +- [The other GNOME WIKI][8] +- [An alternative GNOME 3 Cheat Sheet][9] + +-------------------------------------------------------------------------------- + +via: http://linux.about.com/od/howtos/tp/Fedora-GNOME-Keyboard-Shortcuts.htm + +作者:[Gary Newell][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linux.about.com/bio/Gary-Newell-132058.htm +[1]:https://www.gnome.org/gnome-3/ +[2]:http://en.wikipedia.org/wiki/Super_key_%28keyboard_button%29 +[3]:http://linux.about.com/library/gnome/blgnome2n4.htm +[4]:http://en.wikipedia.org/wiki/Screencast +[5]:http://en.wikipedia.org/wiki/WebM +[6]:https://s-media-cache-ak0.pinimg.com/originals/d5/f4/a4/d5f4a42c0940fae6653ee9a17294d450.jpg +[7]:http://en.wikipedia.org/wiki/GNOME +[8]:https://wiki.gnome.org/ +[9]:https://wiki.gnome.org/Gnome3CheatSheet diff --git a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md new file mode 100644 index 0000000000..570217f220 --- /dev/null +++ b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md @@ -0,0 +1,268 @@ +How to Manage and Use LVM (Logical Volume Management) in Ubuntu +================================================================================ +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-1.png.pagespeed.ic.VGSxDeVS9P.png) + +In our [previous article we told you what LVM is and what you may want to use it for][1], and today we are going to walk you through some of the key management tools of LVM so you will be confident when setting up or expanding your installation. + +As stated before, LVM is a abstraction layer between your operating system and physical hard drives. What that means is your physical hard drives and partitions are no longer tied to the hard drives and partitions they reside on. Rather, the hard drives and partitions that your operating system sees can be any number of separate hard drives pooled together or in a software RAID. + +To manage LVM there are GUI tools available but to really understand what is happening with your LVM configuration it is probably best to know what the command line tools are. This will be especially useful if you are managing LVM on a server or distribution that does not offer GUI tools. + +Most of the commands in LVM are very similar to each other. Each valid command is preceded by one of the following: + +- Physical Volume = pv +- Volume Group = vg +- Logical Volume = lv + +The physical volume commands are for adding or removing hard drives in volume groups. Volume group commands are for changing what abstracted set of physical partitions are presented to your operating in logical volumes. Logical volume commands will present the volume groups as partitions so that your operating system can use the designated space. + +### Downloadable LVM Cheat Sheet ### + +To help you understand what commands are available for each prefix we made a LVM cheat sheet. We will cover some of the commands in this article, but there is still a lot you can do that won’t be covered here. + +All commands on this list will need to be run as root because you are changing system wide settings that will affect the entire machine. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/01/lvm-cheatsheet.png) + +### How to View Current LVM Information ### + +The first thing you may need to do is check how your LVM is set up. The s and display commands work with physical volumes (pv), volume groups (vg), and logical volumes (lv) so it is a good place to start when trying to figure out the current settings. + +The display command will format the information so it’s easier to understand than the s command. For each command you will see the name and path of the pv/vg and it should also give information about free and used space. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/01/539x225xpvdisplay.png.pagespeed.ic.u2XV5LBTYa.png) + +The most important information will be the PV name and VG name. With those two pieces of information we can continue working on the LVM setup. + +### Creating a Logical Volume ### + +Logical volumes are the partitions that your operating system uses in LVM. To create a logical volume we first need to have a physical volume and volume group. Here are all of the steps necessary to create a new logical volume. + +#### Create physical volume #### + +We will start from scratch with a brand new hard drive with no partitions or information on it. Start by finding which disk you will be working with. (/dev/sda, sdb, etc.) + +> Note: Remember all of the commands will need to be run as root or by adding ‘sudo’ to the beginning of the command. + + fdisk -l + +If your hard drive has never been formatted or partitioned before you will probably see something like this in the fdisk output. This is completely fine because we are going to create the needed partitions in the next steps. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/fdisk.png.pagespeed.ce.AmAEsxm-7Q.png) + +Our new disk is located at /dev/sdb so lets use fdisk to create a new partition on the drive. + +There are a plethora of tools that can create a new partition with a GUI, [including Gparted][2], but since we have the terminal open already, we will use fdisk to create the needed partition. + +From a terminal type the following commands: + + fdisk /dev/sdb + +This will put you in a special fdisk prompt. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x145xfdisk00.png.pagespeed.ic.I7S8bjoXQG.png) + +Enter the commands in the order given to create a new primary partition that uses 100% of the new hard drive and is ready for LVM. If you need to change the partition size or want multiple partions I suggest using GParted or reading about fdisk on your own. + +**Warning: The following steps will format your hard drive. Make sure you don’t have any information on this hard drive before following these steps.** + +- n = create new partition +- p = creates primary partition +- 1 = makes partition the first on the disk + +Push enter twice to accept the default first cylinder and last cylinder. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/562x216xfdisk01.png.pagespeed.ic.DsSZ38kWcA.png) + +To prepare the partition to be used by LVM use the following two commands. + +- t = change partition type +- 8e = changes to LVM partition type + +Verify and write the information to the hard drive. + +- p = view partition setup so we can review before writing changes to disk +- w = write changes to disk + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/560x339xfdisk03.png.pagespeed.ic.FC8foICZsb.png) + +After those commands, the fdisk prompt should exit and you will be back to the bash prompt of your terminal. + +Enter pvcreate /dev/sdb1 to create a LVM physical volume on the partition we just created. + +You may be asking why we didn’t format the partition with a file system but don’t worry, that step comes later. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/pvcreate.png.pagespeed.ce.W7VAr-ig3t.png) + +#### Create volume Group #### + +Now that we have a partition designated and physical volume created we need to create the volume group. Luckily this only takes one command. + + vgcreate vgpool /dev/sdb1 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/vgcreate.png.pagespeed.ce.fVLzSmPZou.png) + +Vgpool is the name of the new volume group we created. You can name it whatever you’d like but it is recommended to put vg at the front of the label so if you reference it later you will know it is a volume group. + +#### Create logical volume #### + +To create the logical volume that LVM will use: + + lvcreate -L 3G -n lvstuff vgpool + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/lvcreate.png.pagespeed.ce.vupLB-LJEW.png) + +The -L command designates the size of the logical volume, in this case 3 GB, and the -n command names the volume. Vgpool is referenced so that the lvcreate command knows what volume to get the space from. + +#### Format and Mount the Logical Volume #### + +One final step is to format the new logical volume with a file system. If you want help choosing a Linux file system, read our [how to that can help you choose the best file system for your needs][3]. + + mkfs -t ext3 /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/571x424xmkfs.png.pagespeed.ic.ERMan1Mz0P.png) + +Create a mount point and then mount the volume somewhere you can use it. + + mkdir /mnt/stuff + mount -t ext3 /dev/vgpool/lvstuff /mnt/stuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/510x69xmount.png.pagespeed.ic.k0i1tvqgcV.png) + +#### Resizing a Logical Volume #### + +One of the benefits of logical volumes is you can make your shares physically bigger or smaller without having to move everything to a bigger hard drive. Instead, you can add a new hard drive and extend your volume group on the fly. Or if you have a hard drive that isn’t used you can remove it from the volume group to shrink your logical volume. + +There are three basic tools for making physical volumes, volume groups, and logical volumes bigger or smaller. + +Note: Each of these commands will need to be preceded by pv, vg, or lv depending on what you are working with. + +- resize – can shrink or expand physical volumes and logical volumes but not volume groups +- extend – can make volume groups and logical volumes bigger but not smaller +- reduce – can make volume groups and logical volumes smaller but not bigger + +Let’s walk through an example of how to add a new hard drive to the logical volume “lvstuff” we just created. + +#### Install and Format new Hard Drive #### + +To install a new hard drive follow the steps above to create a new partition and add change it’s partition type to LVM (8e). Then use pvcreate to create a physical volume that LVM can recognize. + +#### Add New Hard Drive to Volume Group #### + +To add the new hard drive to a volume group you just need to know what your new partition is, /dev/sdc1 in our case, and the name of the volume group you want to add it to. + +This will add the new physical volume to the existing volume group. + + vgextend vgpool /dev/sdc1 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/vgextend.png.pagespeed.ce.atRPT1yg5f.png) + +#### Extend Logical Volume #### + +To resize the logical volume we need to say how much we want to extend by size instead of by device. In our example we just added a 8 GB hard drive to our 3 GB vgpool. To make that space usable we can use lvextend or lvresize. + + lvextend -L8G /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/lvextend1.png.pagespeed.ce.6scXbQVUTT.png) + +While this command will work you will see that it will actually resize our logical volume to 8 GB instead of adding 8 GB to the existing volume like we wanted. To add the last 3 available gigabytes you need to use the following command. + + lvextend -L+3G /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/430x85xlvextend2.png.pagespeed.ic.7aBiTBrW03.png) + +Now our logical volume is 11 GB in size. + +#### Extend File System #### + +The logical volume is 11 GB but the file system on that volume is still only 3 GB. To make the file system use the entire 11 GB available you have to use the command resize2fs. Just point resize2fs to the 11 GB logical volume and it will do the magic for you. + + resize2fs /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/650x150xresize2fs.png.pagespeed.ic.Mx74EdMuk_.png) + +**Note: If you are using a different file system besides ext3/4 please see your file systems resize tools.** + +#### Shrink Logical Volume #### + +If you wanted to remove a hard drive from a volume group you would need to follow the above steps in reverse order and use lvreduce and vgreduce instead. + +1. resize file system (make sure to move files to a safe area of the hard drive before resizing) +1. reduce logical volume (instead of + to extend you can also use – to reduce by size) +1. remove hard drive from volume group with vgreduce + +#### Backing up a Logical Volume #### + +Snapshots is a feature that some newer advanced file systems come with but ext3/4 lacks the ability to do snapshots on the fly. One of the coolest things about LVM snapshots is your file system is never taken offline and you can have as many as you want without taking up extra hard drive space. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-2.png.pagespeed.ic.VtOUuqYX1W.png) + +When LVM takes a snapshot, a picture is taken of exactly how the logical volume looks and that picture can be used to make a copy on a different hard drive. While a copy is being made, any new information that needs to be added to the logical volume is written to the disk just like normal, but changes are tracked so that the original picture never gets destroyed. + +To create a snapshot we need to create a new logical volume with enough free space to hold any new information that will be written to the logical volume while we make a backup. If the drive is not actively being written to you can use a very small amount of storage. Once we are done with our backup we just remove the temporary logical volume and the original logical volume will continue on as normal. + +#### Create New Snapshot #### + +To create a snapshot of lvstuff use the lvcreate command like before but use the -s flag. + + lvcreate -L512M -s -n lvstuffbackup /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/597x68xlvcreate-snapshot.png.pagespeed.ic.Rw2ivtcpPg.png) + +Here we created a logical volume with only 512 MB because the drive isn’t being actively used. The 512 MB will store any new writes while we make our backup. + +#### Mount New Snapshot #### + +Just like before we need to create a mount point and mount the new snapshot so we can copy files from it. + + mkdir /mnt/lvstuffbackup + mount /dev/vgpool/lvstuffbackup /mnt/lvstuffbackup + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/565x68xmount-snapshot.png.pagespeed.ic.pVMkhK1o4x.png) + +#### Copy Snapshot and Delete Logical Volume #### + +All you have left to do is copy all of the files from /mnt/lvstuffbackup/ to an external hard drive or tar it up so it is all in one file. + +**Note: tar -c will create an archive and -f will say the location and file name of the archive. For help with the tar command use man tar in the terminal.** + + tar -cf /home/rothgar/Backup/lvstuff-ss /mnt/lvstuffbackup/ + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x67xsnapshot-backup.png.pagespeed.ic.tw-2AK_lfZ.png) + +Remember that while the backup is taking place all of the files that would be written to lvstuff are being tracked in the temporary logical volume we created earlier. Make sure you have enough free space while the backup is happening. + +Once the backup finishes, unmount the volume and remove the temporary snapshot. + + umount /mnt/lvstuffbackup + lvremove /dev/vgpool/lvstuffbackup/ + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/630x102xlvremove.png.pagespeed.ic.yBWk47X6lF.png) + +#### Deleting a Logical Volume #### + +To delete a logical volume you need to first make sure the volume is unmounted, and then you can use lvremove to delete it. You can also remove a volume group once the logical volumes have been deleted and a physical volume after the volume group is deleted. + +Here are all the commands using the volumes and groups we’ve created. + + umount /mnt/lvstuff + lvremove /dev/vgpool/lvstuff + vgremove vgpool + pvremove /dev/sdb1 /dev/sdc1 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/580x185xdelete-lvm.png.pagespeed.ic.3zJTo0Zu9k.png) + +That should cover most of what you need to know to use LVM. If you’ve got some experience on the topic, be sure to share your wisdom in the comments. + +-------------------------------------------------------------------------------- + +via: http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and-how-do-you-enable-it-in-ubuntu/ +[2]:http://www.howtogeek.com/howto/17001/how-to-format-a-usb-drive-in-ubuntu-using-gparted/ +[3]:http://www.howtogeek.com/howto/33552/htg-explains-which-linux-file-system-should-you-choose/ \ No newline at end of file diff --git a/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md b/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md new file mode 100644 index 0000000000..7554abd392 --- /dev/null +++ b/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md @@ -0,0 +1,67 @@ +How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots +================================================================================ +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035707bbd74.png.pagespeed.ic.9_yebxUF1C.png) + +Ubuntu’s installer offers an easy “Use LVM” checkbox. The description says it enables Logical Volume Management so you can take snapshots and more easily resize your hard disk partitions — here’s how to do that. + +LVM is a technology that’s similar to [RAID arrays][1] or [Storage Spaces on Windows][2] in some ways. While this technology is particularly useful on servers, it can be used on desktop PCs, too. + +### Should You Use LVM With Your New Ubuntu Installation? ### + +The first question is whether you even want to use LVM with your Ubuntu installation. Ubuntu makes this easy to enable with a quick click, but this option isn’t enabled by default. As the installer says, this allows you to resize partitions, create snapshots, merge multiple disks into a single logical volume, and so on — all while the system is running. Unlike with typical partitions, you don’t have to shut down your system, boot from a live CD or USB drive, and [resize your partitions while they aren’t in use][3]. + +To be perfectly honest, the average Ubuntu desktop user probably won’t realize whether they’re using LVM or not. But, if you want to do more advanced things later, LVM can help. LVM is potentially more complex, which could cause problems if you need to recover your data later — especially if you’re not that experienced with it. There shouldn’t be a noticeable performance penalty here — LVM is implemented right down in the Linux kernel. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035cbada6ae.png.pagespeed.ic.cnqyiKfCvi.png) + +### Logical Volume Management Explained ### + +We’re previously [explained what LVM is][4]. In a nutshell, it provides a layer of abstraction between your physical disks and the partitions presented to your operating system. For example, your computer might have two hard drives inside it, each 1 TB in size. You’d have to have at least two partitions on these disks, and each of these partitions would be 1 TB in size. + +LVM provides a layer of abstraction over this. Instead of the traditional partition on a disk, LVM would treat the disks as two separate “physical volumes” after you initialize them. You could then create “logical volumes” based on these physical volumes. For example, you could combine those two 1 TB disks into a single 2 TB partition. Your operating system would just see a 2 TB volume, and LVM would deal with everything in the background. A group of physical volumes and logical volumes is known as a “volume group.” A typical system will just have a single volume group. + +This layer of abstraction makes it possibly to easily resize partitions, combine multiple disks into a single volume, and even take “snapshots” of a partition’s file system while it’s running, all without unmounting it. + +Note that merging multiple disks into a single volume can be a bad idea if you’re not creating backups. It’s like with RAID 0 — if you combine two 1 TB volumes into a single 2 TB volume, you could lose important data on the volume if just one of your hard disks fails. Backups are crucial if you go this route. + +### Graphical Utilities for Managing Your LVM Volumes ### + +Traditionally, [LVM volumes are managed with Linux terminal commands][5].These will work for you on Ubuntu, but there’s an easier, graphical method anyone can take advantage of. If you’re a Linux user used to using GParted or a similar partition manager, don’t bother — GParted doesn’t have support for LVM disks. + +Instead, you can use the Disks utility included along with Ubuntu for this. This utility is also known as GNOME Disk Utility, or Palimpsest. Launch it by clicking the icon on the dash, searching for Disks, and pressing Enter. Unlike GParted, the Disks utility will display your LVM partitions under “Other Devices,” so you can format them and adjust other options if you need to. This utility will also work from a live CD or USB drive, too. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550361b3772f7.png.pagespeed.ic.nZWwLJUywR.png) + +Unfortunately, the Disks utility doesn’t include support for taking advantage of LVM’s most powerful features. There’s no options for managing your volume groups, extending partitions, or taking snapshots. You could do that from the terminal, but you don’t have to. Instead, you can open the Ubuntu Software Center, search for LVM, and install the Logical Volume Management tool. You could also just run the **sudo apt-get install system-config-lvm** command in a terminal window. After it’s installed, you can open the Logical Volume Management utility from the dash. + +This graphical configuration tool was made by Red Hat. It’s a bit dated, but it’s the only graphical way to do this stuff without resorting to terminal commands. + +Let’s say you wanted to add a new physical volume to your volume group. You’d open the tool, select the new disk under Uninitialized Entries, and click the “Initialize Entry” button. You’d then find the new physical volume under Unallocated Volumes, and you could use the “Add to existing Volume Group” button to add it to the “ubuntu-vg” volume group Ubuntu created during the installation process. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363106789c.png.pagespeed.ic.drVInt3Weq.png) + +The volume group view shows you a visual overview of your physical volumes and logical volumes. Here, we have two physical partitions across two separate hard drives. We have a swap partition and a root partition, just as Ubuntu sets up its partitioning scheme by default. Because we’ve added a second physical partition from another drive, there’s now a good chunk of unused space. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363f631c19.png.pagespeed.ic.54E_Owcq8y.png) + +To expand a logical partition into the physical space, you could select it under Logical View, click Edit Properties, and modify the size to grow the partition. You could also shrink it from here. + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55036893712d3.png.pagespeed.ic.ce7y_Mt0uF.png) + +The other options in system-config-lvm allow you to set up snapshots and mirroring. You probably won’t need these features on a typical desktop, but they’re available graphically here. Remember, you can also [do all of this with terminal commands][6]. + +-------------------------------------------------------------------------------- + +via: http://www.howtogeek.com/211937/how-to-use-lvm-on-ubuntu-for-easy-partition-resizing-and-snapshots/ + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.howtogeek.com/162676/how-to-use-multiple-disks-intelligently-an-introduction-to-raid/ +[2]:http://www.howtogeek.com/109380/how-to-use-windows-8s-storage-spaces-to-mirror-combine-drives/ +[3]:http://www.howtogeek.com/114503/how-to-resize-your-ubuntu-partitions/ +[4]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ +[5]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ +[6]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ \ No newline at end of file diff --git a/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md b/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md new file mode 100644 index 0000000000..0c01862bff --- /dev/null +++ b/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md @@ -0,0 +1,144 @@ +How to share a directory with Samba on Fedora or CentOS +================================================================================ +Nowadays sharing data across different computers is not something new at home or many work places. Riding on this trend, modern operating systems make it easy to share and exchange data transparently across computers via network file systems. If your work environment involves a mix of Microsoft Windows and Linux computers, one way to share files and folders among them is via SMB/CIFS, a cross-platform network file sharing protocol. Windows Microsoft natively supports SMB/CIFS, while Linux offers free software implementation of SMB/CIFS network protocol in Samba. + +In this article, we will demonstrate **how to share a directory using Samba**. The Linux platform we will use is **Fedora or CentOS**. This article is dividied into four parts. First, we will install Samba under Fedora/CentOS environment. Next, we discuss how to adjust SELinux and firewall configurations to allow file sharing with Samba. Finally, we cover how to enable Samba to share a directory. + +### Step One: Install Samba on Fedora or CentOS ### + +First thing first. Let's install Samba and configure basic settings. + +Check whether Samba application is already installed on your system by running: + + $ rpm -q samba samba-common samba-client + +If the above command doesn't show anything at all, it means that Samba is not installed. In that case, install Samba using the command below. + + $ sudo yum install samba samba-common samba-client + +Next, creates a local directory which will share data over network. This directory will be exported to remote users as a Samba share. In this tutorial, we will create this directory in the top-level directory '/', so make sure that you have the privileges to do it. + + $ sudo mkdir /shared + +If you want to create a shared directory inside your home directory (e.g., ~/shared), you must activate Samba home directory sharing in the SELinux options, which will be described below in more detail. + +After creating /shared directory, set the privileges of the directory so other users can access it. + + $ sudo chmod o+rw /shared + +If you don't want other users to be able to have write to the directory, just remove the 'w' option in chmod command as follows. + + $ sudo chmod o+r /shared + +Next, create one empty file as a test. This file will be used to verify that he Samba share is mounted properly. + + $ sudo touch /shared/file1 + +### Step Two: Configure SELinux for Samba ### + +Next, we need to re-configure SELinux which is enabled by default in Fedora and CentOS distributions. SELinux allows Samba to read and modify files or directories only when they have the right security context (e.g., labeled with the 'samba_share_t' attribute). + +The following command adds the necessary label to file-context configuration: + + $ sudo semanage fcontext -a -t samba_share_t "(/.*)?" + +Replace the with the local directory we created earlier for Samba share (e.g., /shared): + + $ sudo semanage fcontext -a -t samba_share_t "/shared(/.*)?" + +To activate the label change, we then must run the restorecon command like below. + + $ sudo restorecon -R -v /shared + +![](https://farm9.staticflickr.com/8584/16652774078_2055f45f70_b.jpg) + +To share a directory inside our home directory via Samba, we must enable sharing home directory option in SELinux because it is disabled by default. The following command achieves the desired effect. Skip this step if you are not sharing your home directory. + + $ sudo setsebool -P samba_enable_home_dirs 1 + +### Step Three: Configure Firewall for Samba ### + +The next step is to open necessary TCP/UDP ports in the firewall settings for Samba to operate. + +If you are using firewalld (e.g., on Fedora or CentOS 7), the following command will take care of permanent firewall rule change for Samba service. + + $ sudo firewall-cmd --permanent --add-service=samba + +If you are using iptables for your firewall (e.g., CentOS 6 or earlier), use the following commands to open up necessary Samba ports to the world. + + $ sudo vi /etc/sysconfig/iptables + +---------- + + -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 445 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT + +Then restart iptables service: + + $ sudo service iptables restart + +### Step Four: Change Samba Configuration ### + +The last step is to configure Samba to export a created local directory as a Samba-share. + +Open the Samba configuration file with a text editor, and add the following lines at the bottom of the file. + + $ sudo nano /etc/samba/smb.conf + +---------- + + [myshare] + comment=my shared files + path=/shared + public=yes + writeable=yes + +In the above the text inside a pair of brackets (e.g., "myshare") is the name of the Samba-shared resource, which will be used to access the Samba share from a remote host. + +Create a Samba user account which is required to mount and export the Samba file system. To create a Samba user, use the smbpasswd tool. Note that the Samba user account must be the same as any existing Linux user. If you try to add a non-existing user with smbpasswd, it will give an error message. + +If you don't want to use any existing Linux user as a Samba user, you can create a new dedicated user in your system. For safety, set the new user's login shell to /sbin/nologin, and do not create its home directory. + +In this example, we are creating a new user named "sambaguest" as follows. + + $ sudo useradd -M -s /sbin/nologin sambaguest + $ sudo passwd sambaguest + +![](https://farm9.staticflickr.com/8702/16814479366_53f540d3ba_b.jpg) + +After creating a new user, add the user as a Samba user using smbpasswd command. When this command asks a password, you can type a different password than the user's password. + + $ sudo smbpasswd -a sambaguest + +4. Activate the Samba service, and check whether the Samba service is running or not. + + $ sudo systemctl enable smb.service + $ sudo systemctl start smb.service + $ sudo systemctl is-active smb + +![](https://farm8.staticflickr.com/7607/16652984770_622f24bccc_b.jpg) + +To see the list of shared directories in Samba, type the following command. + + $ smbclient -U sambaguest -L localhost + +![](https://farm8.staticflickr.com/7281/16220411103_06bf585901_b.jpg) + +The following is a screenshot of accessing the Samba-shared directory on Thunar file manager, and doing copy-paste of file1. Note that the Samba share is accessible via "smb:///myshare" address on Thunar. + +![](https://farm8.staticflickr.com/7644/16218011174_c8b34fcedc_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/share-directory-samba-fedora-centos.html + +作者:[Kristophorus Hadiono][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/kristophorus \ No newline at end of file diff --git a/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md b/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md new file mode 100644 index 0000000000..f09b6b03b2 --- /dev/null +++ b/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md @@ -0,0 +1,94 @@ +translating wi-cuckoo LLAP +Install And Use ‘Go For It!’ To Do App In Linux +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_For_It_TODO_Linux.jpeg) + +How do you manage tasks and remember things in desktop Linux? I preferred [using sticky notes in Ubuntu][1] for a long time. But the problem I faced was syncing it with other devices, especially with my smartphone. This is the reason why went on with [Google Keep][2]. + +Now, Google Keep is feature rich app and I really like it, and like it to the extent of calling it [Linux alternative of Evernote][3]. But not everyone may like a feature rich todo list app. Minmalist is the current trend and liked by many. And if you are one of the minimalist lover, who is looking for an open source to do list app, you should give [Go For It!][4] a try. + +### Go For It! productivity desktop app for Linux ### + +Go For It! is a simple to do list app that comes with a timer to keep you focused on the work. So, you add a task to the list and can attach a timer to it. It will keep remind you to work on the task. You can watch the video by its developer, [Manuel Kehl][5]: + +注释:youtube视频,发布的时候可做成一个链接 + + +### Install Go For It! ### + +To install Go For It! in Ubuntu 15.04, 14.10, 14.04 and other Ubuntu based Linux distributions such as Linux Mint, elementary OS Freya etc, use the official PPA of this app: + + sudo add-apt-repository ppa:mank319/go-for-it + sudo apt-get update + sudo apt-get install go-for-it + +You can download the .deb binaries, binaries for Windows and source code from the respective links below: + +- [Download source code][6] +- [Download .deb binaries][7] +- [Download for Windows][8] + +### Using Go For It! in desktop Linux ### + +Using Go For It! is really simple. You add tasks in the list. The tasks are saved in todo.txt file. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux.png) + +By default a timer of 25 minutes will be set on each task. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_1.png) + +Once done, task is automatically archived to done.txt. Based on preferences, it will send desktop notifications at regular time interval and few minutes before the task is supposed to be over: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Linux_notification.png) + +You can change all these preferences from configuration. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_2.png) + +So far so good. But what about using it on a smartphone. A productivity app is not complete if you cannot keep it synced across various devices. Good thing is that Go For It! is based on [todo.txt][9], which means you can use it in smartphones using third party apps and a cloud service like Dropbox. + +### Using Go For It! in Android smartphones and tablets ### + +You need to do couple of things here. First thing first, install Dropbox in Linux as well as in your Android phone, if you haven’t installed it already. The next thing you need to do is to change the configuration of Go For It! and **change the todo.txt directory to Dropbox location**. + +Next, you will have to download [Simpletask Android app][10]. It’s a free app. Install this app. When you run Simpletask for the first time, you will ask to link your account with Dropbox: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android_1.jpeg) + +Once you have linked Simpletask with Dropbox, open the app. If you have change the configuration of Go For It! to save the files in Dropbox, you should be able to see it in Simpletask. If you do not see it, click on the settings from the bottom and use the option of Open Todo file: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android.jpeg) + +Now you should be able to see your tasks synced with Simpletask. + +### Conclusion ### + +With Simpletask, you can use it in similar fashion as a [markup language tool][11]. For minimal and focused usage Go For It! is a nice to do app. A clean interface is another plus point. It could have been better to have its own smartphone app but we already saw the workarounds. + +On the down side, Go For It! doesn’t run in background. Which means, you’ll have to keep it running always. It doesn’t even has a minimize button, a tiny annoyance. What I would like to see is an indicator applet for it. Running in the background and quick access in the panel will definitely improve its usability. + +Do try Go For It! and share your experience with it. What other to-do app do you use on desktop Linux? How does Go For It! compare with your other favorite productivity app? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/go-for-it-to-do-app-in-linux/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ +[2]:http://itsfoss.com/install-google-keep-ubuntu-1310/ +[3]:http://itsfoss.com/5-evernote-alternatives-linux/ +[4]:http://manuel-kehl.de/projects/go-for-it/ +[5]:http://manuel-kehl.de/about-me/ +[6]:https://github.com/mank319/Go-For-It +[7]:https://launchpad.net/~mank319/+archive/ubuntu/go-for-it +[8]:http://manuel-kehl.de/projects/go-for-it/download-windows-version/ +[9]:http://todotxt.com/ +[10]:https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en +[11]:http://itsfoss.com/install-latex-ubuntu-1404/ diff --git a/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md b/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md new file mode 100644 index 0000000000..598c56bd66 --- /dev/null +++ b/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md @@ -0,0 +1,70 @@ +Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu +================================================================================ +Prey is an open source, cross platform tool which helps recover your stolen laptops, desktops, tablet computers and smart phones. It has gained vast popularity and has claimed to help recover hundreds of missing laptops and smart phones. The working of this tool is pretty simple, install it on your Laptop or smart phone, and if your device goes missing, login the Prey website with your credentials and mark your device as “Missing” there. As soon as the thief connects your device with internet, it will immediately send you the Geo location of your device. If your laptop is having webcam, it will also capture the screenshot of the thief. + +Prey consumes minimum system resources; it does not affect your device’s performance in any way. You can also use it alongside any other anti-theft application you had installed on your device. It uses secure and encrypted channels to communicate your device data with Prey servers. + +### Installing and configuring Prey on Ubuntu ### + +Let’s see how we can install and configure Prey on ubuntu, note that during configuration process, we will have to register an account at Prey official website. Once done, it will be able to monitor your devices. Its free account monitors up-to 3 devices, if you need to add more devices to its watch list, you need to purchase appropriate plan. + +Considering the popularity and use of Prey, it has been added to the official ubuntu repository now. That means you don’t need to add any additional PPA to the package manager. Simply launch your terminal application and run the following command to install it: + + sudo apt-get install prey + +![Install Prey](http://blog.linoxide.com/wp-content/uploads/2015/03/Install-Prey.png) + +![Install Prey 1](http://blog.linoxide.com/wp-content/uploads/2015/03/Install-Prey-1.png) + +It is a very lightweight application, uses only few MB of space on the system, once installation is completed, launch it from Applications >> Prey and it will ask you for the configuration. + +Choose “New user” if you are using this app for first time. + +![Prey New User](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-New-User.png) + +This second step is actually the process to sign you up on Prey official website. Please provide your username, email address and password for free account. + +![Register Prey](http://blog.linoxide.com/wp-content/uploads/2015/03/Register-Prey.png) + +Hit “Apply” once done, that’s all, your computer is now protected by Prey. + +![Prey Configuration](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Configuration.png) + +Login your newly created [Prey account][1] and you should be able to see your device information there under “Devices” menu. + +![Prey Web Login](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Web-Login.png) + +As soon as your laptop or any other device goes missing, simply login your Prey web account and change the device status to “missing” by clicking “Set Device to Missing” option. + +![Prey Missing Page](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-1.png) + +Choose report frequency from here and hit “Yes, my device is missing”. Report Frequency option is the time interval after which this app will send you status updates for your device location. It will email you as soon as the device status is changed from web interface. + +![Prey Missing Email](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-2.png) + +As soon as your stolen device is connected to the internet, it will immediately send you report, containing your device's Geo whereabouts and IP address. + +![Prey Found Report](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-3.png) + +Click the report link and you should be able to see your device’s Geo location and IP address. + +![Prey Final](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Final.png) + +There is one known drawback in Prey , It needs your device to be connected to internet for sending Geo location, if thief is smart enough to format your device hard disk before connecting it to the network, then you’ll never get report of its recovery. But there is still a work around to overcome this drawback, make sure to add a BIOS password and disable booting the system from removable devices. + +### Conclusion ### + +It is a small, very useful security application which lets you track all of your devices on a single place, although not perfect, but still provides good level of recovery chances for your stolen devices. It runs seamlessly on Linux, Windows and Mac operating system. Here are details about Prey Pro plans. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/anti-theft-application-prey-ubuntu/ + +作者:[Aun Raza][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:https://preyproject.com/ \ No newline at end of file diff --git a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md new file mode 100644 index 0000000000..ff7ef029e7 --- /dev/null +++ b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md @@ -0,0 +1,159 @@ +Sleuth Kit - Open Source Forensic Tool to Analyze Disk Images and Recover Files +================================================================================ +SIFT is a Ubuntu based forensics distribution provided by SANS Inc. It consist of many forensics tools such as Sleuth kit / Autopsy etc . However, Sleuth kit/Autopsy tools can be installed on Ubuntu/Fedora distribution instead of downloading complete distribution of SIFT. + +Sleuth Kit /Autopsy is open source digital forensics investigation tool which is used for recovering the lost files from disk image and analysis of images for incident response. Autopsy tool is a web interface of sleuth kit which supports all features of sleuth kit. This tool is available for both Windows and Linux Platforms. + +### Install Sleuth kit ### + +First of all, download Sleuth kit software from [sleuthkit][1] website. Use wget command to download it in terminal which is shown in the figure. + + # wget http://cznic.dl.sourceforge.net/project/sleuthkit/sleuthkit/4.1.3/sleuthkit-4.1.3.tar.gz + +![Download Sleuth Kit](http://blog.linoxide.com/wp-content/uploads/2015/03/download-sleuthkeit.png) + +Extract the sleuthkit-4.1.3.tar.gz using following command and go inside the extracted directory + + # tar -xvzf sleuthkit-4.1.3.tar.gz + +![Extraction Process](http://blog.linoxide.com/wp-content/uploads/2015/03/extract.png) + +Run following command which perform the requirement check before sleuth kit installation + + #./configure + +![configure](http://blog.linoxide.com/wp-content/uploads/2015/03/configure.png) + +Make command compile the sleuth kit code. + + #make + +![make](http://blog.linoxide.com/wp-content/uploads/2015/03/make.png) + +Finally following command install it under **/usr/local** path. + + #make install + +![make install](http://blog.linoxide.com/wp-content/uploads/2015/03/make-install.png) + +### Install Autopsy Tool ### + +Sleuth kit installation is complete and now we will install autopsy interface. Download Autopsy software from [sleuthkit's autopsy page][2] . Use wget command to download it in terminal which is shown in the figure. + + # wget http://kaz.dl.sourceforge.net/project/autopsy/autopsy/2.24/autopsy-2.24.tar.gz + +![Autpsy download link](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy.png) + +Extract the autopsy-2.24.tar.gz using following command and go inside the extracted directory + + # tar -xvzf autopsy-2.24.tar.gz + +![Autopsy Extraction](http://blog.linoxide.com/wp-content/uploads/2015/03/Autopsy-extraction.png) + +Configuration script of autopsy asks for NSRL (National Software Reference Library) and path of **Evidence_Locker** folder. + +Enter "n" for NSRL prompt and create Evidence_Locker folder under **/usr/local** directory. Autopsy stores the configuration files, audit logs and output under Evidence_Locker folder. + + #mkdir /usr/local/Evidence_Locker + + #cd autopsy-2.24 + + #./configure + +![Autopsy Configuration Script](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy-configuration.png) + +After adding Evidence_Locker path in installation process , autopsy stores configuration files in it and shows a following message to run the autopsy program. + +![Start Autopsy](http://blog.linoxide.com/wp-content/uploads/2015/03/start-autopsy.png) + +Type **./autopsy** command in terminal to start the graphical interface of Sleuth kit tool. + +![Autopsy Started](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy-started.png) + +Type following address in the web browser to access the interface of autopsy . + + http://localhost:9999/autopsy + +Main web page of autopsy plugin is shown int the following figure. + +![Main Page](http://blog.linoxide.com/wp-content/uploads/2015/03/main-interface.png) + +Click on the **New Case** button to start analysis in autopsy tool. Enter the case name, description about the investigation and name of agent which is shown in the following figure. + +![create new case](http://blog.linoxide.com/wp-content/uploads/2015/03/create-new-case1.png) + +Following web page will appear after entering the details in the above page. Click on **Add Host** button to add details for the analyst machine. + +![add host](http://blog.linoxide.com/wp-content/uploads/2015/03/add-host1.png) + +Enter host name, description and time zone setting of analyst machine on the next page. + +![add host-detial](http://blog.linoxide.com/wp-content/uploads/2015/03/add-host-detial.png) + +Click on the **Add Image** button to add image file for forensics analysis. + +![add image](http://blog.linoxide.com/wp-content/uploads/2015/03/add-image.png) + +Click on the **Add Image File** button on the following web page. It opens new web page which require Path of image file and select type & importing method. + +![Add image file](http://blog.linoxide.com/wp-content/uploads/2015/03/Add-image-file.png) + +As shown in the following figure, we have entered path of Linux image file. In our case, image file is partition of disk. + +![add image parition](http://blog.linoxide.com/wp-content/uploads/2015/03/add-image-parition.png) + +Click on the next button and select **Calculate hash** option in the next page which is shown in the following figure. It also detect the file system type of the given image. + +![image and file system detail](http://blog.linoxide.com/wp-content/uploads/2015/03/image-and-file-system-detail.png) + +Following window shows the MD5 hash of the image file before static analysis . + +![hash](http://blog.linoxide.com/wp-content/uploads/2015/03/hash1.png) + +On the next web page, autopsy shows following information about the image file. + +- mount point for the image +- name of image +- file system type of given image + +Click on the **details** button to get more information about the given image file. It also offer extraction of unallocated fragments and strings from the volume of image file which is shown in the following figure. + +![Image detail](http://blog.linoxide.com/wp-content/uploads/2015/03/image-details.png) + +Click on **Analyze** button which is shown in the below figure to start analysis on given image . It opens another page which shows the multiple options for image analysis. + +![analysis](http://blog.linoxide.com/wp-content/uploads/2015/03/analysis1.png) + +Autopsy offer following features during image analysis process. + +- File Analysis +- Keyword Search +- File Type +- Image Details +- Data Unit + +File Analysis on given image of Linux partition is shown in the following figure. + +![Analysis of image](http://blog.linoxide.com/wp-content/uploads/2015/03/Analysis-of-image.png) + +It extracts all files and folders from the given image . Extraction of deleted files are shown int he figure. + +![Deleted Files](http://blog.linoxide.com/wp-content/uploads/2015/03/deleted.png) + +### Conclusion ### + +Hopefully this article will be useful for the beginner in static forensics analysis of disk image. Autopsy is web interface for sleuth kit which provides features such as extraction of strings , recovery of deleted files, timeline analysis, extraction of web surfing history, keyword search and email analysis on windows and linux disk images. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/autopsy-sleuth-kit-installation-ubuntu/ + +作者:[nido][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/naveeda/ +[1]:http://www.sleuthkit.org/sleuthkit/download.php +[2]:http://www.sleuthkit.org/autopsy/download.php \ No newline at end of file diff --git a/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md new file mode 100644 index 0000000000..c3aa5b76b5 --- /dev/null +++ b/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md @@ -0,0 +1,145 @@ +2015你可以买的一款基于Linux的迷你PC +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Linux_Based_Mini_PC.jpg) + +在我看来迷你PC将在不久的将来会替代传统桌面电脑。传统桌面的有一个像送风机那样占据大量空间的风扇。迷你PC,在另一方面说很小巧和紧凑。通常是4″或者5″大小,可以轻易地放在桌子上。 + +不仅如此,这些迷你PC的无风扇设计是一个好处。当然,你可以购买无风扇的常规电脑,但是空间占用仍然是一个问题。对我个人来说,我觉得迷你PC外观上看着很可爱。如果你不是一个游戏玩家也不想买新的桌面PC,我强烈建议你**购买一个基于Linux的迷你PC**。 + +如果你考虑我的建议买一个,那么你或许想知道该买哪款。不要担心,这篇文章我们会介绍**四款你可以在2015购买的基于Linux的迷你PC**。 + +### 基于Linux的迷你PC ### + +请注意这些PC可能还不能下单。它们中有些还刚刚公布,在不久的将来才会面向公众出售。 + + +#### 1. System76出品的Meerkat #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/system76-meerkat.jpg) + +[System76][1] is a computer manufacturer exclusively dealing with only Ubuntu based desktop, laptops and servers. [System76 announced an Ubuntu based mini PC Meerkat][2] last week. Let’s take a quick look at its specification: +[System76][1] 是一家仅出品基于Ubuntu电脑、笔记本、服务器的电脑生产商。[System76在上周宣布了一款基于Ubuntu的迷你PC][2]。让我看一下它的规格: + +**规格** + +- Intel第五代处理器,共有两种选择 i3-5010U 和 i5-5250U +- 最高2TB存储 (M.2 SATA SSD) +- 16 GB DDR3 内存 +- i3和i5处理器下相应的Intel HD 5500 和 Intel HD 6000显卡 +- 4″ x 4″ 大小 +- WiFi +- 1 Gb 网卡 +- 2个USB 3.0端口 + +**价格** + +在$500之内(还没确定)。 + +**发售日期** + +美国地区在2015年3月底 + +#### 2.Compulab出品的Mintbox Mini #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/mintbox-mini.jpeg) + +[Compulab][3]将它的旗舰产品基于Linux Mint的桌面设备成了[Mintbox Mini][4]。紧凑的版本在4″大小。更多的细节如下: + +**规格** + +- AMD A4-6400T 处理器 +- Radeon R3 显卡 +- 4 GB 内存 +- 64 GB SSD +- 2个USB 3.0端口, 3个USB 2.0端口 +- 2个HDMI输出端 +- 802.11 b/g/n Wifi +- 千兆网卡 +- MicroSD读卡器 + +**价格** + +$300起售 + +**发售日期** + +2015第二季度 + +#### 3. Compulab出品的Utilite2 #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Utilite2-ARM-PC.jpg) + +It’s not that Compulab has stuck with Linux Mint only. It announced an ARM desktop PC running Ubuntu in last December. With a size of 3.4″x2.3″, [Utilite2][5] has modest feature and modest price. +Compulab并不是坚持用Linux Mint的。它在去年12月宣布了一款运行Ubuntu的ARM桌面PC。大小是3.4″x2.3″,[Utilite2][5]有最现代的特性和价格 + + +**规格** + +- 高通Snapdragon 600 (APQ8064) 四核 CPU 1.7GHz +- 2GB 内存, 可选32 GB的eMMC mSATA 存储 +- 高通 Adreno™ GPU显卡 +- 1080p 视频回放和捕捉 +- 双天线 WiFi 802.11 和 Bluetooth 4.0 +- 千兆网卡, 4个USB2端口和USB OTG +- 蜂窝调制解调器支持 + +**价格** + +常规版售价$192、带硬盘售价$229。邮费另付。 + +**发售日期** + +现在就可购买。运送将花费4周。 + +#### Think Penguin出品的Penguin Pocket Wee #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Think_Penguin_Pocket_Wee.jpeg) + +[Think Penguin][6]是一家开源硬件生产商。在迷你PC领域,它提供了[Penguin Pocket Wee][7]。大小是4.6″x 4.4″x 1.4″ ,, Penguin Pocket Wee提供了大量的配置。你可以选择处理器、存储、网卡等。你可以选择购买预装你喜欢的Linux发行版,默认系统是Ubuntu。 + +The general configuration is as following: +下面的默认的配置 + +- Intel Core i3 或者 i5处理器,最高支持1080p视频 +- 最高扩展至 16GB 的 DDR3内存 +- Intel HD 显卡 +- Wireless N +- 最大250GB的SSD +- 4个USB 3.0接口 +- Intel 10/100/1000 千兆网卡 + +**价格** + +Basic model starts at $499 and it can go up to $1000 based on the configuration you select. +基础版本$499起售,根据你的配置最大是$1000。 + +**发售日期** + +现在就可下订单。该公司在美国和英国也有办公司,所以应也可以运送到南美和欧洲。 + +### 你会选哪种? ### + +我故意没有介绍[Raspberry Pi 2][8]或者其他Linux微电脑如[Intel的电脑棒][9]。原因是我不认为这些微电脑属于迷你PC的范畴。 + +你怎么看?你想用迷你PC代替你的桌面PC么?是不是还有我没有在**最好的基于Linux的迷你PC**列出的PC?分享你们的观点吧。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/4-linux-based-mini-pc-buy-2015/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:https://system76.com/ +[2]:http://itsfoss.com/system76-unveils-ubuntu-based-mini-pc-meerkat/ +[3]:http://www.compulab.co.il/ +[4]:http://itsfoss.com/mintbox-mini-compact-linux-mint-powered-pc-unveiled/ +[5]:http://www.compulab.co.il/utilite-computer/web/utilite2-overview +[6]:https://www.thinkpenguin.com/ +[7]:https://www.thinkpenguin.com/gnu-linux/penguin-pocket-wee-gnu-linux-desktop +[8]:http://itsfoss.com/raspberry-pi-2-specs/ +[9]:http://itsfoss.com/intels-compute-stick/ diff --git a/translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md deleted file mode 100644 index 1247c8eb78..0000000000 --- a/translated/talk/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md +++ /dev/null @@ -1,42 +0,0 @@ -Ubuntu 15.04 最终实现你可以设置你的菜单 ‘始终可见’ -================================================================================ -**如果你不喜欢 Unity 的全局菜单在你的鼠标离开后就淡出你的视野, Ubuntu 15.04 有一些额外附加去实现这点.** - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/02/locally-integrated-menus-in-ubuntu.png) - -最新的Ubuntu 15.04的Unity界面通过在提议通道提供了一个选项**使应用程序菜单在Ubuntu中可见**. - -不时尚, 不过时, 没有丢失的菜单. - -最大的缺点是它目前只能通过dconf来控制,而不是常规的面向用户的选项设置。 - -我希望(如果不是期望)能有一个设置这个特性的选项被加入到Ubuntu的【系统设置】>【外观】部分的开发仍在继续。 - -现在,如果你使用的是Ubuntu15.04,并启用“建议”的更新通道后,你会发现这个开关存在于在COM>规范>Unity>“始终显示菜单”。 - - -### 迟到总比没有要好? ### - -开发者计划在Ubuntu14.04 LTS的下一个SRU中反向移植这个选项(假设在测试阶段没有任何意外发生)。 - -本地集成菜单(LIM)在Ubuntu 14.04 LTS 首次获得了欣赏,被广泛认为在那些喜欢隐藏方式的和那些不喜欢必须使用鼠标和触摸板的人之间的最佳的折衷方法 - -虽然本地集成菜单给我们带来了半路上沉默的批评在统一方面,默认的“淡入/淡出”行为给我们留下了令人发痒的伤痕 - -在Ubuntu 过去的几个版本中已经能够看到积极的去解决早期UX的经历过的关切的问题。在经过几年“打算去做”的列表[我们去年终于得到了本地集成菜单][1],以及不支持的通过点击图标实现[减少和恢复Unity启动程序中不支持的应用程序的选项]。 - -一年以来我们终于得到一个选项以使应用程序菜单始终显示,无论我们的鼠标在哪里。迟来总比没有好,对不对? - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/01/ubuntu-15-04-always-show-menu-bar-option - -作者:[Joey-Elijah Sneddon][a] -译者:[JeffDing](https://github.com/JeffDing) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.omgubuntu.co.uk/2014/02/locally-integrated-menus-ubuntu-14-04 -[2]:http://www.omgubuntu.co.uk/2014/03/minimize-click-launcher-option-ubuntu-14-04 diff --git a/translated/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md b/translated/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md new file mode 100644 index 0000000000..62d9af6b24 --- /dev/null +++ b/translated/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md @@ -0,0 +1,39 @@ +translated by haimingfg + +Torvalds: 参加linux内核贡献更加容易找工作 +======================================== + +相比起以往,linux内核的发展变是一个专业性的问题,作为一个无偿贡献者去贡献的项目今天在"谁写linux"被低调报道出来了。 + +这个报道由linux基金会编写,基金会说自愿者有逐年下降的趋势,上年有11.8%的内核开发是由无偿自愿者完成,从2012年起由14.6%下滑了19%。 + +![](http://images.techhive.com/images/article/2015/02/screen-shot-2015-02-17-at-5.25.43-pm-100568680-medium.idge.png) + +即使是这样,在最新的谁写linux里面报道,无偿贡献者还是主要的共享来源,共有11,968改变,整体来说有12.4%是好的,企业贡献者共同占比越来越多,有超过80%的内核贡献是有有尝的专业开发者来完成,linux基金会说。 + + +根据 linus Torvalds 说,这个有偿开发者趋势不会改变太多这个内核发展的本身。 + + +他向全世界人说,我认为不会改变太多的一个原因是不会有更多的无偿自愿者因为编写内核就会更加快找到工作而离开。 + + +Torvalds讲到,linux发展改变有很多其他原因,很自然的,新的贡献者会经常冒出来,有很多都是原来的开发者,有着10年的经验,被很多对linux感兴趣的公司抢着去做。 + + +他说:“开始我们是自愿者,但我们这几天很开心被请去开发linux” + + +Torvalds 开始抽离了他的开发角色,根据报道在3.10的内核版本里面他个人发布329补丁,占04% 逐渐地,子系统维护人员自己会检查与合并他们的代码。 + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2885339/application-development/torvalds-people-who-start-writing-kernel-code-get-hired-really-quickly.html + +作者:[Jon Gold][a] +译者:[haimingfg](https://github.com/haimingfg) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Jon-Gold/ diff --git a/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md b/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md deleted file mode 100644 index a9f1019c19..0000000000 --- a/translated/tech/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md +++ /dev/null @@ -1,55 +0,0 @@ -Linux 常见问题解答--如何使用yum来下载RPM包而不进行安装. -================================================================================ -> **问题**:我想从Red Hat's的标准仓库中下载一个RPM包,我能使用yum命令来下载一个RPM包但是不进行安装吗? - -yum是基于Red Hat的系统(如CentOS,Fedora,RHEl)上的默认包管理器.使用yum,你可以安装或者更新一个RPM包,并且他会自动解决包依赖关系.但是如果你只想将一个RPM包下载到你的系统上该怎么办呢? 例如,你可能想要获取一些RPM包在以后使用,或者将他们安装在另外的机器上. - -这里说明了如何从yum仓库上下载一个RPM包. - -### 方法一:yum### - -yum命令本身就可以用来下载一个RPM包,标准的yum命令提供了`--downloadonly(只下载)`的选项来达到这个目的. - - $ sudo yum install --downloadonly - -默认情况下,一个下载的RPM包会保存在下面的目录中: - - /var/cache/yum/x86_64/[centos/fedora-version]/[repository]/packages - -以上的[repository]表示下载包的来源仓库的名称(例如,base,fedora,updates) - -如果你想要讲一个包下载到一个指定的目录(如/tmp): - - $ sudo yum install --downloadonly --downloaddir=/tmp - -注意,如果下载的包包含了任意没有满足的依赖关系,yum将会把所有的依赖关系包下载,但是都不会被安装. - -另外一个重要的事情时,在CentOS/RHEL 6或更早期的版本中,你需要安装一个单独yum插件(名称为 yum-plugin-downloadonly)才能使用`--downloadonly`命令选项: - - $ sudo yum install yum-plugin-downloadonly - -如果没有该插件,你会在使用yum时得到以下错误: - - Command line error: no such option: --downloadonly - -![](https://farm9.staticflickr.com/8627/15571201803_38390aae75_c.jpg) - -### 方法二: Yumdownloader### -另外一个下载RPM包的方法就是通过一个专门的包下载工具--yumdownloader. 这个工具时yum工具包(包含了用来进行yum包管理的帮助工具套件)的子集. - - $ sudo yum install yum-utils - -下载一个RPM包: - - $ sudo yumdownloader - -下载的包会被保存在当前目录中.你需要使用root权限,因为yumdownloader会在下载过程中更新包索引文件.与yum命令不同的是,任何依赖包不会被下载. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/yum-download-rpm-package.html - -译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md b/translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md similarity index 55% rename from sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md rename to translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md index 37e5255b30..76d05da5ab 100644 --- a/sources/tech/20150316 Install Mate desktop in FreeBSD 10.1.md +++ b/translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md @@ -1,61 +1,61 @@ -Install Mate desktop in FreeBSD 10.1 +在FreeBSD 10.1中安装Mate桌面 ================================================================================ ![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/FreeBSD-790x494.jpg) -FreeBSD is fully text mode system, however some times new users might want to use GUI desktop environment. This tutorial will help you to install Mate Desktop in Freebsd 10.1. +FreeBSD是全文本模式的系统,然而有些新用户想要使用GUI桌面环境。这个教程就是帮助你在Freebsd 10.1中安装Mate桌面。 -Here is my test system details: +下面是我的系统细节: root@Freebsd-unixmen:~ # uname -a FreeBSD Freebsd-unixmen 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 root@Freebsd-unixmen:~ -To start installing Mate desktop in FreeBSD 10.1, the following steps can be used. +要在FreeBSD 10.1 中开始安装Mate桌面,按照下面的步骤。 pkg install xf86-video-fbdev mate-desktop mate xorg -### Add the following lines to /etc/rc.conf ### +### 在 /etc/rc.conf 中加入下面的行 ### moused_enable="YES" dbus_enable="YES" hald_enable="YES" -### Test the installation. ### +### 测试安装 ### xinit mate-session ![](http://www.unixmen.com/wp-content/uploads/2015/03/snapshot2.png) -Mate doesn’t have a display manager of its own. Hence we can use any other display managers like XDM, GDM, slim etc to use the login manager. Here let’s see how to configure Slim DM with Mate desktop. +Mate本身没有显示管理器。因此我们会使用其他的显示管理器如XDM、GDM、slim等等来作为登录管理器。这里让我们看看如何在Mate桌面中配置Slim DM -### Install Slim ### +### 安装 Slim ### pkg install slim -Add the following line to **/etc/rc.conf**: +在**/etc/rc.conf**中加入下面的行: slim_enable="YES" -Add the following line to .xinitrc file in the user’s home directory +在用户的家目录下的.xinitrc文件加入下面的行。 exec mate-session -Reboot the machine. Now the machine will boot into Slim login where you can login to Mate session. +重启电脑。现在在你登录Mate时就会进入Slim登录界面了。 ![](http://www.unixmen.com/wp-content/uploads/2015/03/snapshot3.png) ![](http://www.unixmen.com/wp-content/uploads/2015/03/snapshot4.png) -That’s it. Cheers! +就是这样。干杯! -------------------------------------------------------------------------------- via: http://www.unixmen.com/install-mate-desktop-freebsd-10-1/ 作者:[M.el Khamlichi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/pirat9/ \ No newline at end of file +[a]:http://www.unixmen.com/author/pirat9/ diff --git a/translated/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md b/translated/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md new file mode 100644 index 0000000000..34b8bf4629 --- /dev/null +++ b/translated/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md @@ -0,0 +1,62 @@ +Linux有问必答:Perl中本地时间和UNIX时间戳间相互转换 +================================================================================ +> **问题**: 在Perl语言中,我需要转换易读的日期和时间到对应的UNIX时间戳,反之亦然。你可以给我一些Perl代码例子吗?关于日期及时间转换到UNIX时间戳,或者相反,转换UNIX时间戳到可读的日期和时间。 + +当你的Perl脚本需要解决时间信息,这里有两种方法来表示和处理日期和时间。一种方法是易读的时间表示(例,"Sat Mar 14 10:14:05 EDT 2015"),另外一种是使用UNIX时间戳(也叫“新纪元时间”),这是从1970年1月1日到今所消耗的时间秒数。每一种方法都有它自己的优劣势,取决于你的需要,也许也就需要转换一种格式到另一种。 + +### Perl中转换本地时间到UNIX时间戳 ### + +为了从日期字符串中获得UNIX时间,可以使用Date::Parse模块中str2time()函数。此函数可以处理多种格式,例如: + +- Sat Mar 14 10:14:05 EDT 2015 +- 3/14/2015 10:14:05 -0400 +- 14/Mar/15 10:14:05 +- 14 Mar 15 10:14:05 + + use Date::Parse; + + my $local_time = "Sat Mar 14 10:14:05 EDT 2015"; + + # 1426342445 will be stored in $unix_time + my $unix_time = str2time($local_time); + +Date:Parse 模块支持多种语言(英语,法语,德语和意大利语)和时区。例如: + + use Date::Parse; + use Date::Language; + + my $lang = Date::Language->new('French'); + my $unix_time = $lang->str2time("12:14:05, Ago 16, 2014 (CEST)"); + +### Perl中UNIX时间戳到可读的日期和时间 ### + + +如果你想要转换UNIX时间戳到可读的格式,可以使用localtime()函数,此函数可以转换UNIX时间戳为一个9元素列表。然后你可以使用返回的list构造任何你需要的可读格式。这里有一个代码片段: + + # $sec, $min, $hour: 秒,分,时 + # $mday: 月中的某天 (0-31) + # $mon: 月份,范围 0 (一月) 至 11 (十二月) + # $year: 年份,与1900年的差值(2015年为2015-1900=115) + # $wday: 星期,范围 0 (星期天) 至 6 (星期六) + # $yday: 年中的某天,范围 0 至 364 (或 365 闰年) + # $isdst: 是否是夏令时 + + my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($unix_timestamp); + + # necessary conversion of $mon and $year + $mon += 1; + $year += 1900; + + print "Current time: $year-$mon-$mday $hour:$min:$sec\n"; + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/convert-local-time-unix-timestamp-perl.html + +作者:[Dan Nanni][a] +译者:[VicYu/Vic020](http://vicyu.net) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From ed12ddaf9ce278f50f29685bd3a0275465fc366d Mon Sep 17 00:00:00 2001 From: lihaiming Date: Sun, 22 Mar 2015 18:45:43 +0800 Subject: [PATCH 0340/2517] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E5=AE=8C=E7=9A=84=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...g kernel code get hired really quickly'.md | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md diff --git a/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md b/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md deleted file mode 100644 index 5b99e27165..0000000000 --- a/sources/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md +++ /dev/null @@ -1,52 +0,0 @@ -translating by haimingfg - -Torvalds: 'People who start writing kernel code get hired really quickly' -================================================================================ -Torvalds: 参加linux内核贡献更加容易找工作 -======================================== - -Now more than ever, the development of the Linux kernel is a matter for the professionals, as unpaid volunteer contributions to the project reached their lowest recorded levels in the latest "Who Writes Linux" report, which was released today. - -相比起以往,linux内核的发展变是一个专业性的问题,作为一个无偿贡献者去贡献的项目今天在"谁写linux"被低调报道出来了。 - -According to the report, which is compiled by the Linux Foundation, just 11.8 percent of kernel development last year was done by unpaid volunteers -- a 19 percent downturn from the 2012 figure of 14.6 percent. The foundation says that the downward trend in volunteer contributions has been present for years. - -这个报道由linux基金会编写,基金会说自愿者有逐年下降的趋势,上年有11.8%的内核开发是由无偿自愿者完成,从2012年起由14.6%下滑了19%。 - -![](http://images.techhive.com/images/article/2015/02/screen-shot-2015-02-17-at-5.25.43-pm-100568680-medium.idge.png) - -Even so, unpaid contributors were still the single biggest source of commits in the latest Who Writes Linux, at 11,968 total changes -- good for 12.4 percent of the whole. However, corporate contributors collectively account for much, much more. The Linux Foundation said that more than 80 percent of all work on the kernel is done by paid professional developers. -即使是这样,在最新的谁写linux里面报道,无偿贡献者还是主要的共享来源,共有11,968改变,整体来说有12.4%是好的,企业贡献者共同占比越来越多,有超过80%的内核贡献是有有尝的专业开发者来完成,linux基金会说。 - -According to Linus Torvalds, the shift towards paid developers hasn't changed much about kernel development on its own. - -根据 linus Torvalds 说,这个有偿开发者趋势不会改变太多这个内核发展的本身。 - -"I think one reason it hasn't changed things all that much is that it's not so much 'unpaid volunteers are going away' as 'people who start writing kernel code get hired really quickly,'" he told Network World. - -他向全世界人说,我认为不会改变太多的一个原因是不会有更多的无偿自愿者因为编写内核就会更加快找到工作而离开。 - -Torvalds said that, while Linux development has changed for plenty of other reasons -- and that, naturally, new contributors pop up all the time -- many of the original developers, with decades of experience, have simply been snapped up by companies with an interest in Linux. - -Torvalds -讲到,linux发展改变有很多其他原因,很自然的,新的贡献者会经常冒出来,有很多都是原来的开发者,有着10年的经验,被很多对linux感兴趣的公司抢着去做。 - -"We may have started as volunteers, but we're happily employed doing Linux these days," he said. - -他说:“开始我们是自愿者,但我们这几天很开心被请去开发linux” - -Torvalds' own role in development has become increasingly hands-off, according to the report -- he has personally signed off on 329 patches since version 3.10 of kernel was released, or 0.4 percent. Increasingly, subsystem maintainers do their own reviews and merges of code. - -Torvalds 开始抽离了他的开发角色,根据报道在3.10的内核版本里面他个人发布329补丁,占04% 逐渐地,子系统维护人员自己会检查与合并他们的代码。 - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2885339/application-development/torvalds-people-who-start-writing-kernel-code-get-hired-really-quickly.html - -作者:[Jon Gold][a] -译者:[haimingfg](https://github.com/haimingfg) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Jon-Gold/ From 9f23e49691aee0d15f83fe18cd0b46878e136158 Mon Sep 17 00:00:00 2001 From: lihaiming Date: Sun, 22 Mar 2015 19:41:13 +0800 Subject: [PATCH 0341/2517] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Forensic Tool to Analyze Disk Images and Recover Files.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md index ff7ef029e7..4e8461528e 100644 --- a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md +++ b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md @@ -1,3 +1,6 @@ + +tranlating by haimingfg + Sleuth Kit - Open Source Forensic Tool to Analyze Disk Images and Recover Files ================================================================================ SIFT is a Ubuntu based forensics distribution provided by SANS Inc. It consist of many forensics tools such as Sleuth kit / Autopsy etc . However, Sleuth kit/Autopsy tools can be installed on Ubuntu/Fedora distribution instead of downloading complete distribution of SIFT. @@ -156,4 +159,4 @@ via: http://linoxide.com/ubuntu-how-to/autopsy-sleuth-kit-installation-ubuntu/ [a]:http://linoxide.com/author/naveeda/ [1]:http://www.sleuthkit.org/sleuthkit/download.php -[2]:http://www.sleuthkit.org/autopsy/download.php \ No newline at end of file +[2]:http://www.sleuthkit.org/autopsy/download.php From abf3a29cc01a09af740e1861f3546201d0f006e7 Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Sun, 22 Mar 2015 20:38:50 +0800 Subject: [PATCH 0342/2517] Delete 20150318 Install And Use 'Go For It!' To Do App In Linux.md --- ...And Use 'Go For It!' To Do App In Linux.md | 94 ------------------- 1 file changed, 94 deletions(-) delete mode 100644 sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md diff --git a/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md b/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md deleted file mode 100644 index f09b6b03b2..0000000000 --- a/sources/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md +++ /dev/null @@ -1,94 +0,0 @@ -translating wi-cuckoo LLAP -Install And Use ‘Go For It!’ To Do App In Linux -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_For_It_TODO_Linux.jpeg) - -How do you manage tasks and remember things in desktop Linux? I preferred [using sticky notes in Ubuntu][1] for a long time. But the problem I faced was syncing it with other devices, especially with my smartphone. This is the reason why went on with [Google Keep][2]. - -Now, Google Keep is feature rich app and I really like it, and like it to the extent of calling it [Linux alternative of Evernote][3]. But not everyone may like a feature rich todo list app. Minmalist is the current trend and liked by many. And if you are one of the minimalist lover, who is looking for an open source to do list app, you should give [Go For It!][4] a try. - -### Go For It! productivity desktop app for Linux ### - -Go For It! is a simple to do list app that comes with a timer to keep you focused on the work. So, you add a task to the list and can attach a timer to it. It will keep remind you to work on the task. You can watch the video by its developer, [Manuel Kehl][5]: - -注释:youtube视频,发布的时候可做成一个链接 - - -### Install Go For It! ### - -To install Go For It! in Ubuntu 15.04, 14.10, 14.04 and other Ubuntu based Linux distributions such as Linux Mint, elementary OS Freya etc, use the official PPA of this app: - - sudo add-apt-repository ppa:mank319/go-for-it - sudo apt-get update - sudo apt-get install go-for-it - -You can download the .deb binaries, binaries for Windows and source code from the respective links below: - -- [Download source code][6] -- [Download .deb binaries][7] -- [Download for Windows][8] - -### Using Go For It! in desktop Linux ### - -Using Go For It! is really simple. You add tasks in the list. The tasks are saved in todo.txt file. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux.png) - -By default a timer of 25 minutes will be set on each task. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_1.png) - -Once done, task is automatically archived to done.txt. Based on preferences, it will send desktop notifications at regular time interval and few minutes before the task is supposed to be over: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Linux_notification.png) - -You can change all these preferences from configuration. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_2.png) - -So far so good. But what about using it on a smartphone. A productivity app is not complete if you cannot keep it synced across various devices. Good thing is that Go For It! is based on [todo.txt][9], which means you can use it in smartphones using third party apps and a cloud service like Dropbox. - -### Using Go For It! in Android smartphones and tablets ### - -You need to do couple of things here. First thing first, install Dropbox in Linux as well as in your Android phone, if you haven’t installed it already. The next thing you need to do is to change the configuration of Go For It! and **change the todo.txt directory to Dropbox location**. - -Next, you will have to download [Simpletask Android app][10]. It’s a free app. Install this app. When you run Simpletask for the first time, you will ask to link your account with Dropbox: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android_1.jpeg) - -Once you have linked Simpletask with Dropbox, open the app. If you have change the configuration of Go For It! to save the files in Dropbox, you should be able to see it in Simpletask. If you do not see it, click on the settings from the bottom and use the option of Open Todo file: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android.jpeg) - -Now you should be able to see your tasks synced with Simpletask. - -### Conclusion ### - -With Simpletask, you can use it in similar fashion as a [markup language tool][11]. For minimal and focused usage Go For It! is a nice to do app. A clean interface is another plus point. It could have been better to have its own smartphone app but we already saw the workarounds. - -On the down side, Go For It! doesn’t run in background. Which means, you’ll have to keep it running always. It doesn’t even has a minimize button, a tiny annoyance. What I would like to see is an indicator applet for it. Running in the background and quick access in the panel will definitely improve its usability. - -Do try Go For It! and share your experience with it. What other to-do app do you use on desktop Linux? How does Go For It! compare with your other favorite productivity app? - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/go-for-it-to-do-app-in-linux/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ -[2]:http://itsfoss.com/install-google-keep-ubuntu-1310/ -[3]:http://itsfoss.com/5-evernote-alternatives-linux/ -[4]:http://manuel-kehl.de/projects/go-for-it/ -[5]:http://manuel-kehl.de/about-me/ -[6]:https://github.com/mank319/Go-For-It -[7]:https://launchpad.net/~mank319/+archive/ubuntu/go-for-it -[8]:http://manuel-kehl.de/projects/go-for-it/download-windows-version/ -[9]:http://todotxt.com/ -[10]:https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en -[11]:http://itsfoss.com/install-latex-ubuntu-1404/ From d979e7bb04a23e3e01556811802fafee56d51919 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sun, 22 Mar 2015 21:27:54 +0800 Subject: [PATCH 0343/2517] translated --- ...0150318 Fedora GNOME Keyboard Shortcuts.md | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md diff --git a/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md b/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md new file mode 100644 index 0000000000..6273cf010b --- /dev/null +++ b/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md @@ -0,0 +1,215 @@ +Fedora GNOME快捷键 + +================================================================================ + +在Fedora,为了获得最好的[GNOME桌面] [1]体验,你需要了解并掌握一些驾驭系统的快捷键。 + +这篇文章将列举我们日常使用中使用频率最高的快捷键。 + +![GNOME Keyboard Shortcuts - The Super Key. ](http://f.tqn.com/y/linux/1/L/o/K/1/gnomekeyboardshortcut1.png) +GNOME 快捷键 - super键. + +#### 1. Super键 #### + +[“super”键][2]是如今驾驭操作系统的好朋友。 + +在传统的笔记本电脑中“super”键坐落于最后一列就在“alt”键的旁边(就是徽标键)。 + +当你按下“super”键后“activities”总览图就会出现,你就能看见所有打开应用的缩略图。 + +同时按下 "ALT" 和"F1"一样可以达到这样的效果。 + +![GNOME Run Command.](http://f.tqn.com/y/linux/1/L/p/K/1/runcommand.png) +GNOME 指令运行. + +### 2. 如何快速执行一条指令 ### + +如果你需要快速的执行一条指令,你可以按下"ALT"+"F2",这样就会出现指令运行对话框了。 + +你就可以在窗口中输入你想要执行的指令了,回车执行。 + +![TAB Through Applications.](http://f.tqn.com/y/linux/1/L/q/K/1/tabthroughwindows.png) +使用TAB在应用中切换。 + +### 3. 快速切换到另一个打开的应用 ### + +就像微软的Windows一样你可以使用"ALT"和"TAB" 的组合键在应用程序之间切换。 + +在一些键盘上tab键是这样的**|<- ->|**而有些则是简单的"TAB"字母。 + +GNOME应用间切换随着你的切换显示的是简单的图标和应用的名字 + +如果你按下"shift"+"tab"将反过来切换应用。 + +![Switch Windows In The Same Application.](http://f.tqn.com/y/linux/1/L/r/K/1/switchwindowsinsameapplication.png) +在应用中切换不同窗口。 + +### 4. 在同一应用中快速切换不同的窗口 ### + +如果你像我一样经常打开五六个Firefox。 + +你已经知道通过"Alt"+"Tab"实现应用间的切换。 + +有两种方法可以在同应用中所有打开的窗口中切换。 + +第一种是按"Alt"+"Tab"让选框停留在你所要切换窗口的应用图标上。短暂的停留等到下拉窗出现你就能用鼠标选择窗口了。 + +第二种也是比较推荐的方式是按"Alt"+"Tab"让选框停留在你所要切换窗口的应用图标上然后按"super"+"`"在此应用打开的窗口间切换。 + +**注释"`"就是tab键上面的那个键。用于切换的键一直都是tab上面的那个键,无论你使用的那种键盘排布,也有可能不是"`"键。** + +如果你的手很灵活(或者是我称之为的忍者手)那你也可以同时按"shift", "`"和"super"键来反向切换窗口。 + +![Switch Keyboard Focus.](http://f.tqn.com/y/linux/1/L/s/K/1/switchkeyboardfocus.png) +切换键盘焦点。 + +### 5. 切换键盘焦点 ### + +这个键盘快捷键并不是必须掌握的,但是还是最好掌握。 + +如若你想将输入的焦点放到搜索栏或者一个应用窗口上,你可以同时按下"CTRL", "ALT"和"TAB",这样就会出现一个让你选择切换区域的列表。 + +然后就可以按方向键做出选择了。 + +![Show All Applications.](http://f.tqn.com/y/linux/1/L/t/K/1/showapplications.png) +显示所有应用程序。 + +### 6. 显示所有应用程序列表 ### + +如果恰巧最后一个应用就是你想要找的,那么这样做真的会帮你省很多时间。 + +按"super"和"A"键来快速浏览这个包含你系统上所有应用的列表。 + +![Switch Workspaces.](http://f.tqn.com/y/linux/1/L/u/K/1/switchworkspaces.png) +切换工作区。 + +### 7. 切换工作区 ### + +如果你已经使用linux有一段时间了,那么这种[多工作区切换][3]的工作方式一定深得你心了吧。 + +举个例子,你在第一个工作区里做开发,第二个中浏览网页而把你邮件的客户端开在第三个工作区中。 + +工作区切换你可以使用"super"+"Page Up" (PGUP)键朝一个方向切,也可以按"super"+"Page Down" (PGDN)键朝另一个方向切。 + +还有一个比较麻烦的备选方案就是按"super"显示打开的应用,然后在屏幕的右侧选择你所要切换的工作区。 + +![Move Application To Another Workspace.](http://f.tqn.com/y/linux/1/L/v/K/1/movetoanewworkspace.png) +将应用移至另一个工作区。 + +### 8. 将一些项目移至一个新的工作区 ### + +如果这个工作区已经被搞得杂乱无章了没准你会想将手头的应用转到一个全新的工作区,请按组合键"super", "shift"和"page up"或"super", "shift"和"page down" key。 + +备选方案按"super"键,然后在应用列表中找到你想要移动的应用拖到屏幕右侧的工作区。 + +![Show The Message Tray.](http://f.tqn.com/y/linux/1/L/w/K/1/showmessagetray.png) +显示信息栏。 + +### 9. 显示信息栏 ### + +消息栏会提供一些通知。 + +按"super"+"M"呼出消息栏。 + +备选方法是鼠标移动到屏幕右下角。 + +![Lock The Screen.](http://f.tqn.com/y/linux/1/L/x/K/1/lockscreen.png) +锁屏。 + +### 10. 锁屏 ### + +想要休息一会喝杯咖啡?不想误触键盘? + +无论何时只要离开你的电脑应该习惯性的按下"super"+"L"锁屏。 + +解锁方法是从屏幕的下方向上拽,输入密码即可。 + +![Control Alt Delete Within Fedora.](http://f.tqn.com/y/linux/1/L/y/K/1/poweroff.png) +Fedora中Control+Alt+Delete + +### 11. 关机 ### + +如果你曾是windows的用户,你一定记得著名的三指快捷操作CTRL+ALT+DELETE。 + +如果在键盘上同时按下CTRL+ALT+DELETE,Fedora就会弹出一则消息,提示你的电脑将在60秒后关闭。 + +### 12. 编辑快捷键 ### + +在各类操作系统中编辑快捷键都大同小异。 + +- CTRL + A - 全选 +- CTRL + X - 剪切 +- CTRL + C - 复制 +- CTRL + V - 粘贴 +- CTRL + Z - 撤销 + +### 13. 截屏 ### + +和编辑快捷键一样,截屏键也就那么基础的几个。 + +- PRTSC (Print Screen) - 截屏 + +- Alt + PRTSC - 当前窗口截图 + +- Shift + PRTSC - 所选区域截图 + +这里还有一个比较特殊的按键,主要是为了大家可以更容易的制作视频教程的。 + +- CTRL + ALT + SHIFT + R - 录制视频 +- CTRL + ALT + SHIFT + R 第二次按下时 - 停止录制 + +[录制的内容][4]将以[webm][5]格式保存于当前用户家目录下的录像文件夹中。 + +![Put Windows Side By Side.](http://f.tqn.com/y/linux/1/L/z/K/1/splitwindows.png) +并排显示窗口。 + +### 14. 并排显示窗口 ### + +你可以将一个窗口靠左占满左半屏,另一个窗口靠右占满右半屏,让两个窗口并排显示。 + +也可以按"Super"+"←"让当前应用占满左半屏。 + +按"Super"+"→"让当前应用占满右半屏。 + +### 15. 窗口的最大化, 最小化和恢复 ### + +双击标题栏可以最大化窗口。 + +最大化后的窗口再双击就会还原至原大小。 + +右键菜单选择"最小化"就可以最小化了。 + +![GNOME Keyboard Shortcut Cheat Sheet. ](http://f.tqn.com/y/linux/1/L/-/L/1/gnomekeyboardshortcuts.png) +GNOME快捷键速查表。 + +### 16. 总结 ### + +我做了一份快捷键速查表,你可以打印出来贴在墙上,这样一定能够更快上手。 + +当你掌握了这些快捷键后,你一定会感慨这个桌面环境使用起来是如此的顺手。 + +- [戳这里查看Fedora GNOME桌面的速查表][6] +- [查看GNOME WIKI请戳这里][7] +- [另外的一个GNOME WIKI][8] +- [GNOME 3备用速查表][9] + +-------------------------------------------------------------------------------- + +via: http://linux.about.com/od/howtos/tp/Fedora-GNOME-Keyboard-Shortcuts.htm + +作者:[Gary Newell][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linux.about.com/bio/Gary-Newell-132058.htm +[1]:https://www.gnome.org/gnome-3/ +[2]:http://en.wikipedia.org/wiki/Super_key_%28keyboard_button%29 +[3]:http://linux.about.com/library/gnome/blgnome2n4.htm +[4]:http://en.wikipedia.org/wiki/Screencast +[5]:http://en.wikipedia.org/wiki/WebM +[6]:https://s-media-cache-ak0.pinimg.com/originals/d5/f4/a4/d5f4a42c0940fae6653ee9a17294d450.jpg +[7]:http://en.wikipedia.org/wiki/GNOME +[8]:https://wiki.gnome.org/ +[9]:https://wiki.gnome.org/Gnome3CheatSheet From aa0e465c757bbfa0772125ac7dc85c6932889b0d Mon Sep 17 00:00:00 2001 From: martin qi Date: Sun, 22 Mar 2015 21:29:44 +0800 Subject: [PATCH 0344/2517] Update 20150318 Fedora GNOME Keyboard Shortcuts.md --- translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md b/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md index 6273cf010b..3c4d3316e9 100644 --- a/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md +++ b/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md @@ -1,7 +1,5 @@ Fedora GNOME快捷键 - ================================================================================ - 在Fedora,为了获得最好的[GNOME桌面] [1]体验,你需要了解并掌握一些驾驭系统的快捷键。 这篇文章将列举我们日常使用中使用频率最高的快捷键。 From 4c5b461271d7a086c45d21ff64c4999511f2a524 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sun, 22 Mar 2015 21:34:49 +0800 Subject: [PATCH 0345/2517] Update 20150318 Fedora GNOME Keyboard Shortcuts.md --- translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md b/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md index 3c4d3316e9..4210289b6d 100644 --- a/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md +++ b/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md @@ -54,7 +54,7 @@ GNOME应用间切换随着你的切换显示的是简单的图标和应用的名 第二种也是比较推荐的方式是按"Alt"+"Tab"让选框停留在你所要切换窗口的应用图标上然后按"super"+"`"在此应用打开的窗口间切换。 -**注释"`"就是tab键上面的那个键。用于切换的键一直都是tab上面的那个键,无论你使用的那种键盘排布,也有可能不是"`"键。** +**注释"\`"就是tab键上面的那个键。用于切换的键一直都是tab上面的那个键,无论你使用的那种键盘排布,也有可能不是"`"键。** 如果你的手很灵活(或者是我称之为的忍者手)那你也可以同时按"shift", "`"和"super"键来反向切换窗口。 From 8af7d4a429d4a20224344cf88d25437162cfcc88 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sun, 22 Mar 2015 21:35:55 +0800 Subject: [PATCH 0346/2517] Delete 20150318 Fedora GNOME Keyboard Shortcuts.md --- ...0150318 Fedora GNOME Keyboard Shortcuts.md | 213 ------------------ 1 file changed, 213 deletions(-) delete mode 100644 sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md diff --git a/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md b/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md deleted file mode 100644 index 8faab0ce1d..0000000000 --- a/sources/tech/20150318 Fedora GNOME Keyboard Shortcuts.md +++ /dev/null @@ -1,213 +0,0 @@ -tanslating by martin. - -Fedora GNOME Keyboard Shortcuts -================================================================================ -To get the very best out of the [GNOME desktop environment][1], within Fedora, you need to learn and remember the keyboard shortcuts required to navigate the system. - -This article lists the most useful keyboard shortcuts and how they are used. - -![GNOME Keyboard Shortcuts - The Super Key. ](http://f.tqn.com/y/linux/1/L/o/K/1/gnomekeyboardshortcut1.png) -GNOME Keyboard Shortcuts - The Super Key. - -#### 1. The Super Key #### - -[The "super" key][2] is your best friend when navigating modern operating systems. - -On a standard laptop the "super" key sits on the bottom row next to the "alt" key. - -When you press the "super" key the "activities" overview will be displayed and you will be able to see all of the open applications zoomed out. - -Pressing "ALT" and "F1" together will show the same display. - -![GNOME Run Command.](http://f.tqn.com/y/linux/1/L/p/K/1/runcommand.png) -GNOME Run Command. - -### 2. How To Run A Command Quickly ### - -If you need to run a command quickly, you can press "ALT" and "F2" which displays a "Run Command" dialog. - -You can now enter your command into that window and press return. - -![TAB Through Applications.](http://f.tqn.com/y/linux/1/L/q/K/1/tabthroughwindows.png) -TAB Through Applications. - -### 3. Quickly Switch To Other Open Applications ### - -As with Microsoft Windows you can switch applications using the "ALT" and "TAB" keys. - -On some keyboards the tab key looks like this: **|<- ->|** and on others it simply spells the word "TAB". - -The GNOME application switcher simply shows the icons and names of the applications as you tab through them. - -If you hold down the "shift" and "tab" keys, the application switcher rotates around the icons in reverse order. - -![Switch Windows In The Same Application.](http://f.tqn.com/y/linux/1/L/r/K/1/switchwindowsinsameapplication.png) -Switch Windows In The Same Application. - -### 4. Quickly Switch To Another Window In The Same Application ### - -If you are anything like me then you will end up with half a dozen instances of Firefox open. - -You now know that "Alt" and "Tab" switch between applications. - -There are two ways to cycle through all of the open instances of the same application. - -The first is to press "Alt" and "Tab" until the cursor sits over the icon of the application with many windows that you wish to cycle through. After a pause a dropdown will appear and you can select the Window with the mouse. - -The second and preferred option is to press "Alt" and "Tab" until the cursor sits over the icon of the application you want to cycle through and then press the "super" and "`" keys to toggle through the open instances. - -**Note that the "`" key is the one just above the tab key. The key for cycling through the open instances is always the key above the tab key regardless of your keyboard layout, therefore it isn't always guaranteed to be the "`" key.** - -If you have nimble fingers (or as I like to call them ninja fingers) then you can hold the "shift", "`" and "super" key to cycle backwards through the open instances of an application. - -![Switch Keyboard Focus.](http://f.tqn.com/y/linux/1/L/s/K/1/switchkeyboardfocus.png) -Switch Keyboard Focus. - -### 5. Switch Keyboard Focus ### - -This keyboard shortcut isn't essential but a nice to know. - -If you want to switch the keyboard focus to the search bar or to an application window you can press "CTRL", "ALT" and "TAB". to show a list of possible areas to switch to. - -You can then use the arrow keys to cycle through the possible options. - -![Show All Applications.](http://f.tqn.com/y/linux/1/L/t/K/1/showapplications.png) -Show All Applications. - -### 6. Show A List Of All The Applications ### - -If the last one was a nice to have then this one is a real time saver. - -To quickly navigate to a full list of all the applications on your system press the "super" key and "A". - -![Switch Workspaces.](http://f.tqn.com/y/linux/1/L/u/K/1/switchworkspaces.png) -Switch Workspaces. - -### 7. Switch Workspaces ### - -If you have been using Linux for a while you will appreciate the fact that you [can use multiple workspaces][3]. - -For instance in one workspace you might have development environments open, in another web browsers and in a third your email client. - -To toggle between workspaces press the "super" and the "Page Up" (PGUP) keys to toggle in one direction and the "super", "Page Down" (PGDN) keys to toggle in the other direction. - -The alternative but more longwinded away to switch to another workspace is to press the "super" key to show a list of applications and then select the workspace you wish to switch to on the right side of the screen. - -![Move Application To Another Workspace.](http://f.tqn.com/y/linux/1/L/v/K/1/movetoanewworkspace.png) -Move Application To Another Workspace. - -### 8. Move Items To A New Workspace ### - -If the workspace you are using is getting cluttered and you wish to move the current application to a new workspace press the "super", "shift" and "page up" button or "super", "shift" and "page down" key. - -Alternatively press the "super" key to bring up the list of applications and drag the application you wish to move to one of the workspaces on the right of the screen. - -![Show The Message Tray.](http://f.tqn.com/y/linux/1/L/w/K/1/showmessagetray.png) -Show The Message Tray. - -### 9. Show The Message Tray ### - -The message tray provides a list of notifications. - -To bring up the message tray press the "super" and "M" key on the keyboard. - -Alternatively move the mouse to the bottom right corner of the screen. - -![Lock The Screen.](http://f.tqn.com/y/linux/1/L/x/K/1/lockscreen.png) -Lock The Screen. - -### 10. Lock The Screen ### - -Need to a comfort break or a cup of coffee? Don't want sticky paws all over your keyboard? - -Whenever you leave your computer alone get in the habit of pressing "super" and L to lock the screen. - -To unlock the screen drag up from the bottom and enter your password. - -![Control Alt Delete Within Fedora.](http://f.tqn.com/y/linux/1/L/y/K/1/poweroff.png) -Control Alt Delete Within Fedora. - -### 11. Power Off ### - -If you used to be a Windows user then you will remember the three finger salute known as CTRL, ALT and DELETE. - -If you press "CTRL", "ALT" and "DEL" on your keyboard within Fedora a message will appear telling you that your computer will shut down in 60 seconds. - -### 12. Editing Shortcuts ### - -The editing keyboard shortcuts are pretty much universal across every operating system. - -- CTRL + A - Select All -- CTRL + X - Cut -- CTRL + C - Copy -- CTRL + V - Paste -- CTRL + Z - Undo - -### 13. Screen Capturing ### - -As with the editing shortcuts, the screencapturing keys are fairly standard - -- PRTSC (Print Screen) - Take screenshot -- Alt + PRTSC - Take screenshot of current window -- Shift + PRTSC - Take screenshot of an area of the screen - -Here is one that is fairly unique but great for people making tutorial videos. - -- CTRL + ALT + SHIFT + R - Record Screencast -- CTRL + ALT + SHIFT + R again - Stop Screencast - -The [screencasts][4] will be stored in the videos folder under your home directory in the [webm][5] format. - -![Put Windows Side By Side.](http://f.tqn.com/y/linux/1/L/z/K/1/splitwindows.png) -Put Windows Side By Side. - -### 14. Put Windows Side By Side ### - -You can put windows side by side so that one uses up the left side of the screen and the other uses the right side of the screen. - -Press the "Super" and "Left Arrow" key on the keyboard to shift the current application to the left. - -Press the "Super" and "Right Arrow" key on the keyboard to shift the current application to the right. - -### 15. Maximise, Minimise And Restore Windows ### - -To maximise a window double click on the title bar. - -To restore a window to its original size double click on the maximised window. - -To minimise a window, right click and select "minimise" from the menu. - -![GNOME Keyboard Shortcut Cheat Sheet. ](http://f.tqn.com/y/linux/1/L/-/L/1/gnomekeyboardshortcuts.png) -GNOME Keyboard Shortcut Cheat Sheet. - -### 16. Summary ### - -To help you learn these keyboard shortcuts I have created a cheat sheet which you can print out and stick to your wall. - -When you have learned these shortcuts you will begin to appreciate how modern desktop environments work. - -- [Click here to view the Fedora Linux GNOME Desktop Environment cheat sheet.][6] -- [Click here for the GNOME WIKI][7] -- [The other GNOME WIKI][8] -- [An alternative GNOME 3 Cheat Sheet][9] - --------------------------------------------------------------------------------- - -via: http://linux.about.com/od/howtos/tp/Fedora-GNOME-Keyboard-Shortcuts.htm - -作者:[Gary Newell][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linux.about.com/bio/Gary-Newell-132058.htm -[1]:https://www.gnome.org/gnome-3/ -[2]:http://en.wikipedia.org/wiki/Super_key_%28keyboard_button%29 -[3]:http://linux.about.com/library/gnome/blgnome2n4.htm -[4]:http://en.wikipedia.org/wiki/Screencast -[5]:http://en.wikipedia.org/wiki/WebM -[6]:https://s-media-cache-ak0.pinimg.com/originals/d5/f4/a4/d5f4a42c0940fae6653ee9a17294d450.jpg -[7]:http://en.wikipedia.org/wiki/GNOME -[8]:https://wiki.gnome.org/ -[9]:https://wiki.gnome.org/Gnome3CheatSheet From 10197251c865d94419e776937e6bbcbdd43d8c46 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Mar 2015 21:46:29 +0800 Subject: [PATCH 0347/2517] PUB:20150104 How to debug a C or C++ program with Nemiver debugger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @disylee 诗诗,有些错别字~ --- ... C or C++ program with Nemiver debugger.md | 110 +++++++++++++++ ... C or C++ program with Nemiver debugger.md | 126 ------------------ 2 files changed, 110 insertions(+), 126 deletions(-) create mode 100644 published/20150104 How to debug a C or C++ program with Nemiver debugger.md delete mode 100644 translated/tech/20150104 How to debug a C or C++ program with Nemiver debugger.md diff --git a/published/20150104 How to debug a C or C++ program with Nemiver debugger.md b/published/20150104 How to debug a C or C++ program with Nemiver debugger.md new file mode 100644 index 0000000000..99eee59987 --- /dev/null +++ b/published/20150104 How to debug a C or C++ program with Nemiver debugger.md @@ -0,0 +1,110 @@ +使用Nemiver调试器来调试 C/C++ 程序 +================================================================================ + +如果你读过我写的[使用GDB命令行调试器调试C/C++程序][1],你就会明白一个调试器对一段C/C++程序来说有多么的重要和有用。然而,如果一个像GDB这样的命令行对你而言听起来更像一个问题而不是一个解决方案的话,那么你也许会对Nemiver更感兴趣。[Nemiver][2] 是一款基于 GTK+ 的用于C/C++程序的图形化的独立调试器,它以GDB作为其后端。最令人赞赏的是其速度和稳定性,Nemiver是一个非常可靠,具备许多优点的调试工具。 + +### Nemiver的安装 ### + +基于Debian发行版,它的安装时非常直接简单,如下: + + $ sudo apt-get install nemiver + +在Arch Linux中安装如下: + + $ sudo pacman -S nemiver + +在Fedora中安装如下: + + $ sudo yum install nemiver + +如果你选择自己编译,[GNOME 网站][3]上有最新源码包。 + +最令人欣慰的是,它能够很好地与GNOME环境像结合。 + +### Nemiver的基本用法 ### + +启动Nemiver的命令: + + $ nemiver + +你也可以通过执行一下命令来启动: + + $ nemiver [需要调试的可执行程序的路径] + +注意,如果在调试模式下编译程序(在 GCC 中使用 -g 选项)将会对 nemiver 更有帮助。 + +还有一个优点是Nemiver的加载很快,所以你马上就可以看到主屏幕的默认布局。 + +![](https://farm9.staticflickr.com/8679/15535277554_d320f6692c_c.jpg) + +默认情况下,断点通常位于主函数的第一行。这样就可以空出时间让你去认识调试器的基本功能: + +![](https://farm9.staticflickr.com/8669/16131832596_bc68ae18a8_o.jpg) + +- 执行到下一行 (按键是F6) +- 执行到函数内部即停止(F7) +- 执行到函数外部即停止(Shift+F7) + +不过我个人喜欢“Run to cursor(运行至光标所在行)”,该选项使你的程序准确的运行至你光标所在行,它的默认按键是F11。 + +断点是很容易使用的。最快捷的方式是在一行代码上按下F8来设置一个断点。但是Nemiver在“Debug”菜单下也有一个更复杂的菜单,它允许你在一个特定的函数,某一行,二进制文件中的位置,或者类似异常、分支或者exec的事件上设置断点。 + +![](https://farm8.staticflickr.com/7579/16157622315_d680a63896_z.jpg) + +你也可以通过追踪来查看一个变量。在“Debug”中,你可以用一个表达式的名字来检查它的值,然后也可以通过将其添加到列表中以方便访问。这可能是最有用的一个功能,虽然我从未有兴趣将鼠标悬停在一个变量来获取它的值。值得注意的是,虽然鼠标悬停可以取到值,如果想要让它更好地工作,Nemiver是可以看到结构并给出所有成员的变量的赋值。 + +![](https://farm8.staticflickr.com/7465/15970310470_7ed020c613.jpg) + +谈到方便地访问信息,我也非常欣赏这个程序的布局。默认情况下,代码在上半部分,功能区标签在下半部分。这可以让你访问终端的输出、上下文追踪器、断点列表、注册器地址、内存映射和变量控制。但是请注意在“Edit”-“Preferences”-“Layout”下你可以选择不同的布局,包括一个可以修改的动态布局。 + +![](https://farm9.staticflickr.com/8606/15971551549_00e4cdd32e_c.jpg) + +![](https://farm8.staticflickr.com/7525/15535277594_026fef17c1_z.jpg) + +自然,当你设置了全部断点,观察点和布局,您可以在“File”菜单下很方便地保存该会话,以便你下次打开时恢复。 + +### Nemiver的高级用法 ### + +到目前为止,我们讨论的都是Nemiver的基本特征,例如,你马上开始调试一个简单的程序需要了解什么。如果你有更高的需求,特别是对于一些更加复杂的程序,你应该会对接下来提到的这些特征更感兴趣。 + +#### 调试一个正在运行的进程 #### + +Nemiver允许你驳接到一个正在运行的进程进行调试。在“File”菜单,你可以筛选出正在运行的进程,并驳接到某个进程。 + +![](https://farm9.staticflickr.com/8593/16155720571_00e4cdd32e_z.jpg) + +#### 通过TCP连接远程调试一个程序 #### + +Nemiver支持远程调试,你可以在一台远程机器上设置一个轻量级调试服务器,然后你在另外一台机器上启动 nemiver 去调试运行在调试服务器上的程序。如果出于某些原因,你不能在远程机器上很好地驾驭 Nemiver或者GDB,那么远程调试对于你来说将非常有用。在“File”菜单下,指定二进制文件、共享库位置、远程地址和端口。 + +![](https://farm8.staticflickr.com/7469/16131832746_c47dee4ef1.jpg) + +#### 使用你的GDB二进制程序进行调试 #### + +如果你的Nemiver是自行编译的,你可以在“Edit(编辑)”-“Preferences(首选项)”-“Debug(调试)”下给GDB指定一个新的位置。如果你想在Nemiver下使用定制版本的GDB,那么这个选项对你来说是非常实用的。 + +#### 跟随一个子进程或者父进程 #### + +当你的程序分支时,Nemiver是可以设置为跟随子进程或者父进程的。想激活这个功能,请到“Debugger”下面的“Preferences(首选项)”。 + +![](https://farm8.staticflickr.com/7512/16131832716_5724ff434c_z.jpg) + +总而言之,Nemiver大概是我最喜欢的不在IDE里面的调试程序。在我看来,它甚至可以击败GDB,它和命令行程序一样深深吸引了我。所以,如果你从未使用过的话,我会强烈推荐你使用。我十分感谢它背后的开发团队给了我这么一个可靠、稳定的程序。 + +你对Nemiver有什么见解?你是否也考虑它作为独立的调试工具?或者仍然坚持使用IDE?让我们在评论中探讨吧。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/debug-program-nemiver-debugger.html + +作者:[Adrien Brochard][a] +译者:[disylee](https://github.com/disylee) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://linux.cn/article-4302-1.html +[2]:https://wiki.gnome.org/Apps/Nemiver +[3]:https://download.gnome.org/sources/nemiver/0.9/ +[4]:http://xmodulo.com/recommend/linuxclibook diff --git a/translated/tech/20150104 How to debug a C or C++ program with Nemiver debugger.md b/translated/tech/20150104 How to debug a C or C++ program with Nemiver debugger.md deleted file mode 100644 index b5dc4c34a7..0000000000 --- a/translated/tech/20150104 How to debug a C or C++ program with Nemiver debugger.md +++ /dev/null @@ -1,126 +0,0 @@ -使用Nemiver调试器找出C/C++程序中的bug -================================================================================ - -如果你读过[my post on GDB][1],你就会明白我认为一个调试器对一段C/C++程序来说意味着多么的重要和有用。然而,如果一个像GDB的命令行对你而言听起来更像一个问题而不是一个解决方案,那么你也许会对Nemiver更感兴趣。[Nemiver][2] 是一款基于GTK+的独立图形化用于C/C++程序的调试器,同时它以GDB作为其后端。最令人佩服的是其速度和稳定性,Nemiver时一个非常可靠,具备许多优点的调试工具。 - -### Nemiver的安装 ### - -基于Debian发行版,它的安装时非常直接简单如下: - - $ sudo apt-get install nemiver - -在Arch Linux中安装如下: - - $ sudo pacman -S nemiver - -在Fedora中安装如下: - - $ sudo yum install nemiver - -如果你选择自己变异,[GNOME website][3]中最新源码包可用。 - -最令人欣慰的是,它能够很好地与GNOME环境像结合。 - -### Nemiver的基本用法 ### - -启动Nemiver的命令: - - $ nemiver - -你也可以通过执行一下命令来启动: - - $ nemiver [path to executable to debug] - -你会注意到如果在调试模式下执行编译(-g标志表示GCC)将会更有帮助。 - -还有一个优点是Nemiver的快速加载,所以你应该可以马上看到主屏幕的默认布局。 - - - - - -![](https://farm9.staticflickr.com/8679/15535277554_d320f6692c_c.jpg) - -默认情况下,断点通常位于主函数的第一行。这样就可以空出时间让你去认识调试器的基本功能: - -![](https://farm9.staticflickr.com/8669/16131832596_bc68ae18a8_o.jpg) - -- Next line (mapped to F6) -- Step inside a function (F7) -- Step out of a function (Shift+F7) -- 下一行 (映射到F6) -- 执行内部行数(F7) -- 执行外部函数(Shift+F7) ## 我不确定这个保留哪个都翻译出来了 ## - -但是由于我个人的喜好是“Run to cursor(运行至光标)”,该选项使你的程序运行精确至你光标下的行,并且默认映射到F11. - -下一步,断点通常是容易使用的。最快捷的方式是使用F8设置一个断点在相应的行。但是Nemiver也有一个更富在的菜单在“Debug”项,这允许你在一个特定的函数,行数,二进制位置文件的位置,或者类似一个异常,分支或者exec的事件。 - -![](https://farm8.staticflickr.com/7579/16157622315_d680a63896_z.jpg) - - -你也可以通过追踪来查看一个变量。在“Debug”选项,你可以通过命名来匹配一个表达式来检查。然后也可以通过将其添加到列表中以方便访问。这可能是最有用的一个功能虽然我从未因为浓厚的兴趣将鼠标悬停在一个变量来获取它的值。值得注意的是,将鼠标放置在相应位置时不生效的。如果想要让它更好地工作,Nemiver是可以看到结构并给所有成员的变量赋值。 - -![](https://farm8.staticflickr.com/7465/15970310470_7ed020c613.jpg) - - -谈到方便地访问信息,我也非常欣赏这个程序的平面布局。默认情况下,代码在上个部分,标签在下半部分。这授予你访问中断输出、文本追踪、断点列表、注册地址、内存映射和变量控制。但是注意到在“Edit”“Preferences”“Layout”下你可以选择不同的布局,包括动态修改。 - -![](https://farm9.staticflickr.com/8606/15971551549_00e4cdd32e_c.jpg) - -![](https://farm8.staticflickr.com/7525/15535277594_026fef17c1_z.jpg) - - -自然而然,一旦你设置了所有短点,观察点和布局,您可以在“File”下很方便地保存以免你不小心关掉Nemiver。 - - -### Nemiver的高级用法 ### - - -到目前为止,我们讨论的都是Nemiver的基本特征,例如,你马上开始喝调试一个简单的程序需要什么。如果你有更高的药求,特别是对于一些更佳复杂的程序,你应该会对接下来提到的这些特征更感兴趣。 - - -#### 调试一个正在运行的进程 #### - - -Nemiver允许你连接到一个正在运行的进程进行调试。在“File”菜单,你可以过滤出正在运行的进程,并连接到这个进程。 - -![](https://farm9.staticflickr.com/8593/16155720571_00e4cdd32e_z.jpg) - - -#### 通过TCP连接远程调试一个程序 #### - -Nemiver支持远程调试,当你在一台远程机器设置一个轻量级调试服务器,你可以通过调试服务器启动Nemiver从另一台机器去调试承载远程服务器上的目标。如果出于某些原因,你不能在远程机器上吗很好地驾驭Nemiver或者GDB,那么远程调试对于你来说将非常有用。在“File”菜单下,指定二进制文件、共享库的地址和端口。 - -![](https://farm8.staticflickr.com/7469/16131832746_c47dee4ef1.jpg) - -#### 使用你的GDB二进制进行调试 #### - -如果你想自行通过Nemiver进行编译,你可以在“Edit(编辑)”“Preferences(首选项)”“Debug(调试)”下给GDB制定一个新的位置。如果你想在Nemiver使用GDB的定制版本,那么这个选项对你来说是非常实用的。 - - -#### 循序一个子进程或者父进程 #### - -Nemiver是可以兼容一个子进程或者附近成的。想激活这个功能,请到“Debugger”下面的“Preferences(首选项)”。 - -![](https://farm8.staticflickr.com/7512/16131832716_5724ff434c_z.jpg) - -总而言之,Nemiver大概是我最喜欢的没有IDE的调试程序。在我看来,它甚至可以击败GDB,并且[命令行][4]程序对我本身来说更接地气。所以,如果你从未使用过的话,我会强烈推荐你使用。我只能庆祝我们团队背后给了我这么一个可靠、稳定的程序。 - -你对Nemiver有什么见解?你是否也考虑它作为独立的调试工具?或者仍然坚持使用IDE?让我们在评论中探讨吧。 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/debug-program-nemiver-debugger.html - -作者:[Adrien Brochard][a] -译者:[disylee](https://github.com/disylee) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/adrien -[1]:http://xmodulo.com/gdb-command-line-debugger.html -[2]:https://wiki.gnome.org/Apps/Nemiver -[3]:https://download.gnome.org/sources/nemiver/0.9/ -[4]:http://xmodulo.com/recommend/linuxclibook From 21c8563993e61047f03b81590d0cff42f4c94fbf Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Mar 2015 22:09:23 +0800 Subject: [PATCH 0348/2517] PUB:20150114 Install Gitblit On Ubuntu or Fedora or CentOS @geekpi --- ...l Gitblit On Ubuntu or Fedora or CentOS.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md (90%) diff --git a/translated/tech/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md b/published/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md similarity index 90% rename from translated/tech/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md rename to published/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md index 84232f87a1..e2dd91ef0b 100644 --- a/translated/tech/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md +++ b/published/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md @@ -2,13 +2,13 @@ ================================================================================ **Git**是一款注重速度、数据完整性、分布式支持和非线性工作流的分布式版本控制工具。Git最初由Linus Torvalds在2005年为Linux内核开发而设计,如今已经成为被广泛接受的版本控制系统。 -和其他大多数分布式版本控制系统比起来,不像大多数客户端-服务端的系统,每个Git工作目录是一个完整的仓库,带有完整的历史记录和完整的版本跟踪能力,不需要依赖网络或者中心服务器。像Linux内核一样,Git意识在GPLv2许可证下的免费软件。 +和其他大多数分布式版本控制系统比起来,不像大多数客户端-服务端的系统,每个Git工作目录是一个完整的仓库,带有完整的历史记录和完整的版本跟踪能力,不需要依赖网络或者中心服务器。像Linux内核一样,Git也是在GPLv2许可证下分发的自由软件。 -本篇教程我会演示如何安装gitlit服务器。gitlit的最新稳定版是1.6.2。[Gitblit][1]是一款开源、纯Java开发的用于管理浏览和服务的[Git][2]仓库。它被设计成一款为希望托管中心仓库的小工作组服务的工具。 +本篇教程我会演示如何安装 gitlit 服务器。gitlit的最新稳定版是1.6.2。[Gitblit][1]是一款开源、纯Java开发的用于管理、浏览和提供[Git][2]仓库服务的软件。它被设计成一款为希望托管中心仓库的小型工作组服务的工具。 mkdir -p /opt/gitblit; cd /opt/gitblit; wget http://dl.bintray.com/gitblit/releases/gitblit-1.6.2.tar.gz -### 列出目录: ### +### 列出解压后目录内容: ### root@vps124229 [/opt/gitblit]# ls ./ docs/ gitblit-stop.sh* LICENSE service-ubuntu.sh* @@ -21,7 +21,7 @@ ### 启动gitlit服务: ### -### 通过service命令: ### +**通过service命令:** root@vps124229 [/opt/gitblit]# cp service-centos.sh /etc/init.d/gitblit root@vps124229 [/opt/gitblit]# chkconfig --add gitblit @@ -29,7 +29,7 @@ Starting gitblit server . -### 手动启动: ### +**手动启动:** root@vps124229 [/opt/gitblit]# java -jar gitblit.jar --baseFolder data 2015-01-10 09:16:53 [INFO ] ***************************************************************** @@ -108,15 +108,15 @@ 打开浏览器,依据你的配置进入**http://localhost:8080** 或者 **https://localhost:8443**。 输入默认的管理员授权:**admin / admin** 并点击**Login** 按钮 -![snapshot2](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/snapshot2.png) +![snapshot2](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/snapshot2.png) ### 添加用户: ### -![snapshot1](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/snapshot1.png) +![snapshot1](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/snapshot1.png) -添加仓库: +###添加仓库:### -![snapshot3](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/snapshot3.png) +![snapshot3](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/snapshot3.png) ### 用命令行创建新的仓库: ### @@ -140,7 +140,7 @@ via: http://www.unixmen.com/install-gitblit-ubuntu-fedora-centos/ 作者:[M.el Khamlichi][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3794ad3136511fc2dd03324779f583c554f0aa31 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Sun, 22 Mar 2015 22:26:40 +0800 Subject: [PATCH 0349/2517] translated --- .../20150318 The future of Linux storage.md | 82 ------------------ .../20150318 The future of Linux storage.md | 86 +++++++++++++++++++ 2 files changed, 86 insertions(+), 82 deletions(-) delete mode 100644 sources/talk/20150318 The future of Linux storage.md create mode 100644 translated/talk/20150318 The future of Linux storage.md diff --git a/sources/talk/20150318 The future of Linux storage.md b/sources/talk/20150318 The future of Linux storage.md deleted file mode 100644 index 25f178bf8b..0000000000 --- a/sources/talk/20150318 The future of Linux storage.md +++ /dev/null @@ -1,82 +0,0 @@ -[translating by KayGuoWhu] -The future of Linux storage -================================================================================ -> **Summary**:Linux software developers are working hard on expanding Linux's file and storage options. - -BOSTON - At the [Linux Foundation's][1] new [Vault][2] show, it's all about file systems and storage. You might think that there's nothing new to say about either topic, but you'd be wrong. - -![](http://zdnet2.cbsistatic.com/hub/i/r/2015/03/12/c8f92cc2-b963-4238-80a0-d785ec93698c/resize/770x578/08d93a8a393d3f50b2a56e6b0e7a0ca9/btrfs-1.jpg) -Linux file systems, such as Btrfs, and storage support options are constantly evolving. -- Facebook - -Storage technology has come a long way from the days of, as Linus Torvalds put it, "[nasty platters of spinning rust][3]" and Linux has had to keep up. In recent years, for example, [flash memory has arrived as enterprise server primary storage][4] and [persistent memory][5] is bringing us storage that works at DRAM speeds. At the same time, Big Data, cloud computing, and containers are all bringing new use cases to Linux. - -To deal with this, Linux developers are both expanding their existing file and storage programs and working on new ones. - -### Btrfs ### - -For instance, Chris Mason, a Facebook software engineer and one of the [Btrfs][6] (pronounced Butter FS) maintainers, explained how Facebook uses this file system. Btrfs has many advantages as a file system such as the ability to handle both numerous small files and single files as large as 16 exabytes; baked in RAID; built-in file-system compression; and integrated multi-storage device support. - -Facebook, of course, runs on Linux. To be exact, Facebook runs the 3.10 and 3.18 Linux kernels on an internal distribution, which is based on [CentOS][7]. For Facebook, the real win is that Btrfs is stable and fast under the endless input/output operations per second (IOPS) pounding from Facebook's constantly updating users. - -That's the good news. The bad news is that Btrfs is still much too slow for traditional DBMSs such as MySQL. For those, Facebook uses [XFS][8]. To co-ordinate the two file systems, Facebook uses [Gluster][9], the open-source distributed file system. - -Facebook, which works hand-in-glove with the upstream Btrfs Linux kernel developers, is working on improving Btrfs's DBMS speed. Mason, and his companions, are doing this by using Btrfs with the [RocksDB][10] database. This is a persistent key-value store for fast storage, which can be used as the foundation for a client-server database. - -Btrfs also still has some bugs. For example, if you're foolish enough to fill a disk almost to bursting, Btrfs will stop you from writing to storage before the disk is completely stuffed. For some projects, such as [CoreOS][12], the enterprise Linux that relies on containers, that's a showstopper. [CoreOS has since switched to using xt4 and overlayfs][11]. - -The Btrfs crew is also working on data deduplication. In this, when a file system has more than one identical file, you automatically delete the duplicate. As Mason said, "Not everyone needs this, but if you need it, you really need it!" - -Btrfs isn't the only file system that's both very important and getting worked on. John Spray, a senior software engineer at [Red Hat][13], talked about the distributed [Ceph][14] file system. - -### Ceph FS ### - -Ceph provides a distributed object store and file system which, in turn, relies on a resilient and scalable storage model (RADOS) using clusters of commodity hardware. Along with the RADOS block device (RBD), and the RADOS object gateway (RGW), Ceph provides a [POSIX][15] file-system interface -- Ceph FS. While RBD and RGW have been in use for production workloads for some time, efforts to make Ceph FS ready for production are now underway. - -[Red Hat, after acquiring Inktank][16], Ceph's parent company, in 2014 has been working hard on making CephFS production ready. For better or worse, Spray said, "Some people are already using it in production; we're terrified of this. It's really not ready yet." Still, Spray added, that this "is a mixed blessing because while it's a bit scary, we get really useful feedback and testing from those users." - -That's because while Ceph object stores scale out well, Ceph FS, as a POSIX compliant file-system, are hard to scale out. For example, as a distributed file system, Ceph FS has to deal with multiple writes from multiple clients. This can lead to all or nothing situations where one client can write and others must wait. This can result in file-locking situations that are more complicated than those in ordinary file systems. - -Still, Ceph FS is worth doing, Spray said, "since POSIX file-systems are an operating system lingua franca." That's not to say that Ceph FS doesn't work. "It's not horribly broken. It works. What's missing is the repair and monitoring tools." - -Red Hat is currently hard at work on getting [fsck][17] and journal repair tools, snapshot hardening, better client access control, and cloud and container integration. For now, though, Ceph FS is a file system that only the very brave, or foolish, should use in production. - -### File and storage odds and ends ### - -As for larger issues of file-systems and storage, Jeff Layton, senior software engineer at [Primary Data][18], explained that there are efforts under way to to create "tests for catastrophic power failure, without actually pulling the plug." These tests will soon be integrated with [xfstests][19], the gold standard for Linux file-system testing. - -Rik van Riel, a Red Hat principal software engineer, spoke about the problem of dealing with persistent memory products. You can treat them as storage or as memory. But, you can't currently take snapshots for backups if you use them as memory. The real problem: van Riel is certain that people will try to use persistent memory as both, which will lead to such as situations as "Without back up, how do you deal with a 200GB persistent memory database?" Adding insult to injury, logging systems don't currently work with persistent memory. - -What's the right answer? Linux doesn't have one yet, but programmers are working on it. - -So, while Linux has many file systems and can use any kind of storage out there that can hold a byte, there's still a lot of work to be done. Technology never stands still. Linux, which runs on everything from devices to desktops to servers to clouds to supercomputers, has to keep up with storage advances no matter where they appear. - --------------------------------------------------------------------------------- - -via: http://www.zdnet.com/article/linux-storage-futures/ - -作者:[Steven J. Vaughan-Nichols][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.zdnet.com/meet-the-team/us/sjvn/ -[1]:http://www.linuxfoundation.org/ -[2]:http://events.linuxfoundation.org/events/vault -[3]:http://www.wired.com/2012/10/linus-torvalds-hard-disks/ -[4]:http://www.zdnet.com/article/sandisk-launches-infiniflash-aims-to-bring-flash-array-costs-down/ -[5]:http://events.linuxfoundation.org/sites/events/files/eeus13_wheeler.pdf -[6]:https://btrfs.wiki.kernel.org/index.php/Main_Page -[7]:http://www.centos.org/ -[8]:http://oss.sgi.com/projects/xfs/ -[9]:http://www.gluster.org/ -[10]:http://rocksdb.org/ -[11]:http://lwn.net/Articles/627232/ -[12]:https://coreos.com/ -[13]:http://www.redhat.com/ -[14]:http://ceph.com/ -[15]:http://pubs.opengroup.org/onlinepubs/9699919799/ -[16]:http://www.zdnet.com/article/red-hat-acquires-inktank-for-175m/ -[17]:http://linux.die.net/man/8/fsck -[18]:http://primarydata.com/ -[19]:http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git;a=summary \ No newline at end of file diff --git a/translated/talk/20150318 The future of Linux storage.md b/translated/talk/20150318 The future of Linux storage.md new file mode 100644 index 0000000000..23a2dfc674 --- /dev/null +++ b/translated/talk/20150318 The future of Linux storage.md @@ -0,0 +1,86 @@ +Linux存储的未来 +================================================================================ +> **摘要**:Linux系统的软件开发者们正致力于使Linux支持更多种类的文件和存储方案。 + +波士顿 - 在[Linux基金会][1]最近的[Vault][2]展示会上,全都是关于文件系统和存储方案的讨论。你可以会想关于这两个主题并没有什么展值得讨论的最新进展,但事实并非如此。 + +![](http://zdnet2.cbsistatic.com/hub/i/r/2015/03/12/c8f92cc2-b963-4238-80a0-d785ec93698c/resize/770x578/08d93a8a393d3f50b2a56e6b0e7a0ca9/btrfs-1.jpg) + +对Linux文件系统,比如Btrfs,和存储方案的支持正在持续发展中。 -- Facebook + +自从Linus提出“[讨厌的、生锈的机械磁盘]”的观点以来,存储技术已经走过一段长路,Linux也始终保持跟进。比如说,近几年来,[闪存已经逐渐成为企业服务器的主要存储器][4],[持久化内存][5]也正给我们带来拥有DRAM一般快速的存储。与此同时,大数据、云计算和容器化技术正给Linux引入新的应用场景。 + +为了应对挑战,Linux开发者们一边继续扩展已有的文件系统和存储程序,一边致力于开发新的方案。 + +### Btrfs ### + +例如,Chris Mason,一位来自Facebook的软件工程师,也是[Btrfs][6](对外宣称Butter FS)的维护者之一,说明了Facebook是如何使用这种文件系统。Btrfs拥有文件系统固有的许多优点,比如既能处理大量的小文件,也能处理大小可达16EB的单个文件;支持RAID的baked(烦请校正补充);内置的文件系统压缩,以及集成了对多种存储设备的支持。 + +当然,Facebook的服务器也运行在Linux上。更准确地讲,是运行在一个基于[CentOS][7]的内部发行版上,它是基于3.10和3.18版的内核。对Facebook来说,真正的收获是Btrfs在由Facebook持续的更新用户操作带来的巨大的IOPS(每秒钟输入输出的操作数)的负载下依旧保持稳定和快速。 + +这就是好消息,但坏消息是对于像MySQL一样的传统DBMS(数据库管理系统)来说Btrfs还是太慢了。对此,Facebook采用了[XFS][8]。为了协同这两种文件系统,Facebook又用到了一种叫做[Gluster][9]的开源分布式文件系统。 + +Facebook,一直与上游的负责Btrfs的Linux内核开发者保持密切联系,致力于提高Btrfs在DBMS上的速度。Mason和他的同事在[RocksDB][10]数据库上使用Btrfs以达成目标,RocksDB是一种为提供快速存储开发的持久化键值存储系统,可以作为客户端服务器模式数据库的基础部分。 + +当然Btrfs也还存在一些问题,比如,如果有用户傻到用数据把硬盘几乎要撑爆时,Btrfs会在硬盘被完全装满前阻止用户继续写入。对某些工程来说,比如[CoreOS][12],一款依赖容器化的企业版Linux系统,这种问题是致命的。[因此,CoreOS已经切换到使用xt4和overlayfs了][11]。 + +Btrfs的开发人员正致力于数据去重。在这一点上,当文件系统中拥有超过一个的相同文件时,会自动删除多余文件。正如Mason所说,“并非每个人都需要这个功能,但如果有人需要,那就是真的需要!” + +在正在开展的重要性工作中,Btrfs并非是唯一的文件系统。John Spary,[Red Hat][13]的一位高级软件工程师,提到了另一款名为[Ceph][14]的分布式文件系统。 + +### Ceph FS ### + +Ceph提供了一种分布式对象存储方案和文件系统,反过来它依托于一种使用商用硬件集群的弹性的、可扩展的存储模型(RADOS)。配合RADOS块设备(RBD)和RADOS对象网关(RGW),Ceph提供了一种[POSIX][15]接口的文件系统 -- Ceph FS。尽管RBD和RGW已经在生产环境中使用了一段时间,但使Ceph FS适用于生产的工作还是进行中。 + +[Rad Hat,在收购Ceph的母公司Inktank后][16],在2014年一直致力于使CephFS适用于生产环境。不管怎样,Spray说,“有些人已经在生产中使用了它;我们对此表示担忧,毕竟它还没有准备好。”然而,Spray也补充说,“这具有两面性,因为一方面这是让人担心的,另一方面我们又从用户获得了真正有用的反馈和测试。” + +这是因为尽管Ceph对象存储很好地支持扩展,但Ceph Fs,作为一种兼容POSIX的文件系统,却很难实现扩展。比如,作为一种分布式文件系统,Ceph FS必须解决来自多个客户端的多个写操作。这会导致全有或全无的情况,即一个客户端可以写入,但其它客户端必须等待,也会产生文件加锁的情形,即相比普通文件系统中更加复杂。 + +但是,Ceph FS仍值得去做,正如Spray所说,“因为兼容POSIX的文件系统是操作系统通用的。”这并不是说Ceph FS就一无是处。“它并不是支离破碎的,相反它奏效了。所缺的是修复和监控工具。” + +Red Hat目前正致力于获得[fsck][17]和日志修复工具、快照强化、更好客户端访问控制,以及云与容器的集成。尽管Ceph FS到目前为止只是一种有潜力或者没前景的文件系统,但仍然值得用在生产环境中。 + +### 文件与存储的差别与目标 ### + +至于文件系统和存储上的更大问题,Jeff Layton,[Primary Data][18]的一位高级软件工程师,解释说为了“在不断开电源的情况下给灾难性的电源故障提供测试”,大量的相关工作正在进行中。这些测试很快会被集成到[xftests][19]中,它是Linux文件系统测试的黄金标准。 + +Rik van Riel,一位Red Hat的主要软件工程师,谈到了解决持久化内存产品的问题。你可以把它们作为存储器或者内存。但是,如果你现在把它们作为内存来用,是不能为备份创建快照。真正的问题是:van Riel确信人们会尝试使用持久的内存作这两种用途,这会导致出现和“如果不备份,你会如何处理一个200GB大小的持久化内存数据库?”类似的情形发生。更糟的是,现在日志系统也无法和持久化的内存一起发挥作用。 + +正确的答案是什么呢?Linux至今还没有一个,但编程人员们正在努力寻找答案。 + +因此,尽管Linux支持很多文件系统,可以使用这里以外的任何一种存储器来存储数据,但是仍然有很多工作要做。技术从来不会止步不前。Linux,正运行在移动设备、桌面电脑、服务器、云端和超级计算机上等几乎所有的主流设备上,必须跟紧存储的发展步伐,不管它们以何种形式出现。 + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/linux-storage-futures/ + +作者:[Steven J. Vaughan-Nichols][a] +译者:[KayGuoWhu](https://github.com/KayGuoWhu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.zdnet.com/meet-the-team/us/sjvn/ +[1]:http://www.linuxfoundation.org/ +[2]:http://events.linuxfoundation.org/events/vault +[3]:http://www.wired.com/2012/10/linus-torvalds-hard-disks/ +[4]:http://www.zdnet.com/article/sandisk-launches-infiniflash-aims-to-bring-flash-array-costs-down/ +[5]:http://events.linuxfoundation.org/sites/events/files/eeus13_wheeler.pdf +[6]:https://btrfs.wiki.kernel.org/index.php/Main_Page +[7]:http://www.centos.org/ +[8]:http://oss.sgi.com/projects/xfs/ +[9]:http://www.gluster.org/ +[10]:http://rocksdb.org/ +[11]:http://lwn.net/Articles/627232/ +[12]:https://coreos.com/ +[13]:http://www.redhat.com/ +[14]:http://ceph.com/ +[15]:http://pubs.opengroup.org/onlinepubs/9699919799/ +[16]:http://www.zdnet.com/article/red-hat-acquires-inktank-for-175m/ +[17]:http://linux.die.net/man/8/fsck +[18]:http://primarydata.com/ +[19]:http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfstests.git;a=summary + + + + From 639279db9a16c8ff1c030037cf79eb8b47d7b903 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Mar 2015 22:34:11 +0800 Subject: [PATCH 0350/2517] PUB:20150309 15 Basic 'ls' Command Examples in Linux @ZTinoZ --- ...15 Basic 'ls' Command Examples in Linux.md | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) rename {translated/tech => published}/20150309 15 Basic 'ls' Command Examples in Linux.md (91%) diff --git a/translated/tech/20150309 15 Basic 'ls' Command Examples in Linux.md b/published/20150309 15 Basic 'ls' Command Examples in Linux.md similarity index 91% rename from translated/tech/20150309 15 Basic 'ls' Command Examples in Linux.md rename to published/20150309 15 Basic 'ls' Command Examples in Linux.md index 31fdefd736..e5feb79b2e 100644 --- a/translated/tech/20150309 15 Basic 'ls' Command Examples in Linux.md +++ b/published/20150309 15 Basic 'ls' Command Examples in Linux.md @@ -1,9 +1,10 @@ Linux中的15个基本‘ls’命令示例 ================================================================================ -ls命令是Linux系统中最被频繁使用的命令之一,我相信ls命令一定是你进入一台Linux系统的电脑打开命令提示符后第一个使用的命令。我们每天都在频繁地使用ls命令即使我们可能没有意识也从来用不到所以可用的选项。本文中,我们将讨论下一些基本的ls命令并且覆盖尽可能多的有关参数来讲解。 +ls命令是Linux系统中最被频繁使用的命令之一,我相信ls命令一定是你进入一台Linux系统的电脑打开命令提示符后第一个使用的命令。我们每天都在频繁地使用ls命令,即使我们可能没有意识也从来用不到所有可用的选项。本文中,我们将讨论下一些基本的ls命令并且覆盖尽可能多的有关参数来讲解。 ![Linux ls Command](http://www.tecmint.com/wp-content/uploads/2012/08/Linux-ls-Commands.png) -Linux的ls命令 + +*Linux的ls命令* ### 1. 不带任何选项列出文件 ### @@ -14,7 +15,7 @@ Linux的ls命令 0001.pcap Desktop Downloads index.html install.log.syslog Pictures Templates anaconda-ks.cfg Documents fbcmd_update.php install.log Music Public Videos -### 2 带–l选项列出文件列表 ### +### 2 带 –l 选项列出文件列表 ### 你看,ls -l(-l是字母不是“1”)就能展示出是文件还是目录,它的大小、修改日期和时间、文件或目录的名字以及文件的属主和它的权限。 @@ -50,9 +51,9 @@ Linux的ls命令 .bash_logout Desktop fbcmd_update.php .ICEauthority .mozilla Public Videos .bash_profile .digrc .gconf index.html Music .pulse .wireshark -### 4. 用-lh选项来以人类可读方式列出文件 ### +### 4. 用 -lh 选项来以易读方式列出文件 ### -用-lh组合选项,以人类可读方式来显示大小。 +用-lh组合选项,以易读方式来显示大小。 # ls -lh @@ -74,7 +75,7 @@ Linux的ls命令 ### 5. 以尾部以‘/’字符结尾的方式列出文件和目录 ### -Using -F option with ls command, will add the ‘/’ Character at the end each directory. +使用 ls 命令的 -F 选项,会在每个目录的末尾添加“/”字符显示。 # ls -F @@ -83,7 +84,7 @@ Using -F option with ls command, will add the ‘/’ Character at the end each ### 6. 倒序列出文件 ### -ls -r选项能以倒序方式显示文件和目录。 +ls -r 选项能以倒序方式显示文件和目录。 # ls -r @@ -92,7 +93,7 @@ ls -r选项能以倒序方式显示文件和目录。 ### 7. 递归列出子目录 ### -ls -R选项能列出非常长的目录树,来看看示例输出: +ls -R 选项能列出非常长的目录树,来看看示例输出: # ls -R @@ -115,7 +116,7 @@ ls -R选项能列出非常长的目录树,来看看示例输出: -rw-r--r--. 1 root root 0 Aug 12 03:17 access.log -rw-r--r--. 1 root root 390 Aug 12 03:17 access.log-20120812.gz -### 8. 反向输出次序 ### +### 8. 以修改时间倒序列出 ### 带-ltr组合选项能以文件或目录的最新修改时间的次序来显示它们。 @@ -159,9 +160,9 @@ ls -R选项能列出非常长的目录树,来看看示例输出: -rw-------. 1 root root 1586 Jul 31 02:17 anaconda-ks.cfg -rw-r--r--. 1 root root 683 Aug 19 09:59 0001.pcap -### 10. 显示文件或目录的索引节点数 ### +### 10. 显示文件或目录的索引节点号 ### -我们有时候可以看到一些数字打印在文件或目录名之前,带-i选项就能列出文件或目录的索引节点数。 +我们有时候可以看到一些数字打印在文件或目录名之前,带-i选项就能列出文件或目录的索引节点号。 # ls -i @@ -192,7 +193,7 @@ ls -R选项能列出非常长的目录树,来看看示例输出: ### 13. 列出目录信息 ### -用ls -l命令列出/tmp目录下的文件,其中-ld参数可以显示/tmp目录的信息。 +用ls -l命令列出/tmp目录下的文件,其中-ld参数可以只显示/tmp目录的信息。 # ls -l /tmp total 408 @@ -225,13 +226,13 @@ ls -R选项能列出非常长的目录树,来看看示例输出: -rw-rw-r--. 1 500 500 12 Aug 21 13:06 tmp.txt drwxr-xr-x. 2 500 500 4096 Aug 2 01:52 Videos -### 15. ls命令和它的别名功能 ### +### 15. ls命令和它的别名 ### -我们给ls命令设置过别名之后,当我们执行ls命令的时候它会默认执行-l选项并且像上文提到的那样显示长列表。 +我们给ls命令设置如下别名之后,当我们执行ls命令的时候它会默认执行-l选项并且像上文提到的那样显示长列表。 # alias ls="ls -l" -注意:我们可以通过不加任何参数的alias命令来看到目前系统中可用的所有alias设置,当然它们同时也可以unalias。 +注意:我们可以通过不加任何参数的alias命令来看到目前系统中可用的所有alias设置,当然它们同时也可以unalias来取消。 # alias @@ -255,7 +256,7 @@ via: http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ 作者:[Ravi Saive][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From dc84746601357d22fc0081160942a2dae923d8a4 Mon Sep 17 00:00:00 2001 From: LouisWei Date: Mon, 23 Mar 2015 10:51:30 +0800 Subject: [PATCH 0351/2517] translating wi-cuckoo LLAP --- ...tolen laptops and Smart phones Using Prey Tool in Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md b/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md index 598c56bd66..d1a881f189 100644 --- a/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md +++ b/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md @@ -1,3 +1,4 @@ +translating wi-cuckoo LLAP Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu ================================================================================ Prey is an open source, cross platform tool which helps recover your stolen laptops, desktops, tablet computers and smart phones. It has gained vast popularity and has claimed to help recover hundreds of missing laptops and smart phones. The working of this tool is pretty simple, install it on your Laptop or smart phone, and if your device goes missing, login the Prey website with your credentials and mark your device as “Missing” there. As soon as the thief connects your device with internet, it will immediately send you the Geo location of your device. If your laptop is having webcam, it will also capture the screenshot of the thief. @@ -67,4 +68,4 @@ via: http://linoxide.com/ubuntu-how-to/anti-theft-application-prey-ubuntu/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunrz/ -[1]:https://preyproject.com/ \ No newline at end of file +[1]:https://preyproject.com/ From a435269ed5595e4752bab12f971f96b94271684d Mon Sep 17 00:00:00 2001 From: johnhoow Date: Mon, 23 Mar 2015 13:23:01 +0800 Subject: [PATCH 0352/2517] translated --- ...eight Budgie v8 Desktop in Ubuntu 14.04.md | 99 ------------------- ...eight Budgie v8 Desktop in Ubuntu 14.04.md | 97 ++++++++++++++++++ 2 files changed, 97 insertions(+), 99 deletions(-) delete mode 100644 sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md create mode 100644 translated/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md diff --git a/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md b/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md deleted file mode 100644 index 60155b9f68..0000000000 --- a/sources/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md +++ /dev/null @@ -1,99 +0,0 @@ -johnhoow translating... -How to Install Lightweight Budgie ( v8) Desktop in Ubuntu 14.04 -================================================================================ -Budgie is the flagship desktop of the Evolve OS Linux Distribution, and is an Evolve OS project. Designed with the modern user in mind, it focuses on simplicity and elegance. A huge advantage for the Budgie desktop is that it is not a fork of another project, but rather one written from scratch with integration in mind. - -The [Budgie Desktop][1] tightly integrates with the GNOME stack, employing underlying technologies to offer an alternative desktop experience. In the spirit of open source, the project is compatible with and available for other Linux distributions. - -Also note that Budgie can now emulate the look and feel of the GNOME 2 desktop, optionally, via a setting in the panel preferences. - -### Features in the 0.8 release ### - -- IconTasklist: Add pinning support -- IconTasklist: Use .desktop files for quicklists -- IconTasklist: Use .desktop files for icon resolution -- IconTasklist: Support “attention” hint (blue blink) -- Panel: Support dark theme (used by default) -- Add Menubar applet -- Panel: Initial autohide support (manual, not automatic) -- Panel: Support shadow onall screen edges -- Panel: Dynamic support for gnome panel theming -- RunDialog: Complete visual refresh (bootiful) -- BudgieMenu: Add compact mode, use by default -- BudgieMenu: Sort items by usage -- BudgieMenu: Remove old power option -- Editor: Add all menu options to UI -- Support from GNOME 3.10 up to 3.16 (unreleased, git) -- wm: Kill workspace animation (resolve after v8) -- wm: Better animations for changing of wallpapers - -### Important information ### - -- Budgie [released version 0.8][2] so it is still in development and a beta. -- No nnative network management; can be fixed by using Ubuntu's applet. -- Budgie is intended for the Evolve OS so even with this PPA it might be buggy. -- GNOME themes work better than the native Ubuntu themes. -- Ubuntu’s overlay scrollbars are not working. -- If you want to read more visit the Evolve OS website. - -### Installation ### - -Now, we'll install our Lightweight Budgie Desktop in our Ubuntu 14.04 LTS "Trusty" distribution of Linux Operating System. First of all, we'll need to add ppa repository to our Ubuntu PC. To do so, we'll need to execute the below command in a shell or terminal. - - $ sudo add-apt-repository ppa:evolve-os/ppa - -![Add Budgie Desktop PPA Repo](http://blog.linoxide.com/wp-content/uploads/2015/01/budgie-desktop-ppa.png) - -Now, after we finish adding PPA to our Ubuntu Computer, we'll need to update the local repository index in it. It can be done by running the following command in the same terminal or shell after above is done. - - $ sudo apt-get update - -Then, finally, we'll install the one and only Budgie Desktop Environment in our Ubuntu machine running the latest version 14.04 LTS. - - $ sudo apt-get install budgie-desktop - -![Install Budgie Desktop](http://blog.linoxide.com/wp-content/uploads/2015/02/install-budgie-desktop.png) - -**Notes** - -It is in active development and features remain missing, including, but not limited to: no network management support, no volume control applet (keyboard keys will work fine), no notification system and no way to ‘pin’ apps to the task bar. - -As a workaround you can disable overlay scrollbars, set a different default theme and quit a session from the terminal using the following command: - - $ gnome-session-quit - -![Quitting Gnome Session](http://blog.linoxide.com/wp-content/uploads/2015/02/gnome-seesion-quit.png) - -### Log into the Budgie Session ### - -After installation is completed, we’ll be able to select ‘Budgie’ from the session selector of the Unity Greeter. For that, we'll need to logout the current user and get back to the login screen. Then, we'll be able to switch to Budgie Desktop Environment. - -![Select Desktop Session](http://blog.linoxide.com/wp-content/uploads/2015/02/session-select.png) - -### Budgie Desktop Environment ### - -![Budgie Desktop Environment](http://blog.linoxide.com/wp-content/uploads/2015/02/budgie-desktop.png) - -### Logging Out ### - -You can simply execute **budgie-session --logout** in a shell or terminal to logout it. - - $ budgie-sessioon --logout - -### Conclusion ### - -Hurray! We have successfully installed our Lightweight Budgie Desktop Environment in our Ubuntu 14.04 LTS "Trusty" box. As we know, Budgie Desktop is still underdevelopment which makes it a lot of stuffs missing. Though it’s based on Gnome’s GTK3, it’s not a fork. The desktop is written completely from scratch, and the design is elegant and well thought out. If you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy Budgie Desktop 0.8 :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/install-lightweight-budgie-v8-desktop-ubuntu/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://evolve-os.com/budgie/ -[2]:https://evolve-os.com/2014/11/16/courageous-budgie-v8-released/ diff --git a/translated/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md b/translated/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md new file mode 100644 index 0000000000..10bb779e71 --- /dev/null +++ b/translated/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md @@ -0,0 +1,97 @@ +如何在ubuntu14.04上安装轻量级的Budgie桌面(v8) +================================================================================ +Budgie是为Linux发行版定制的旗舰桌面,也是一个定制工程。为思想前卫的用户设计,致力于简单和简洁。它的一个巨大优势是它不是别的项目的fork版本,是从都到尾都独立的。 + +[Budgie桌面][1]与GNOME栈紧密结合,使用先进的技术从而提供一个可选择的桌面体验。出于开源理念,这个桌面之后也能在别的Linux发行版中看到。 + +现在Budgie能够通过面板的设置达到和GNOME2桌面相似的使用体验。 + +### 0.8版的特点 ### + +- 任务栏:支持应用锁定到任务栏 +- 任务栏:使用.desktop文件来配置quicklists菜单 +- 任务栏:使用.desktop文件来配置图标分辨率 +- 任务栏:支持有通知时蓝色闪烁 +- 面板:支持默认深色主体 +- 添加菜单条的小组件 +- 面板:自动隐藏菜单条和工具条(这配置为手动) +- 面板:支持屏幕边缘处阴影 +- 面板:动态支持gnome面板主题 +- 运行对话框:虚拟刷新 +- Budgie菜单: 增加紧凑模式,并默认采用 +- Budgie菜单: 按照使用顺序排列菜单项 +- Budgie菜单: 移除旧的电源选项 +- 编辑器: 在UI中增加所有的菜单选项 +- 支持从GNOME 3.10 升级到3.16 +- wm: 关闭工作区的动画(v8之后) +- wm: 改变壁纸时更好的动画 + +### 重要信息 ### + +- Budgie [0.8版发行版][2]目前只是beta +- 无本地网络管理;可以通过使用ubuntu的小组件解决 +- Budgie 是为Evolve OS设计的,因此这个PPA可能会有bug +- GNOME 主题比Ubuntu本地的主题效果更好 +- Ubuntu的滚动栏将不在工作 +- 如果你想了解的更多可以访问Evolve OS网站 + +### 安装 ### + +现在,我们将在Ubuntu14.04 LTS中安装我们自己的轻量级Budgie桌面。首先,我们要把PPA源添加到我们的Ubuntu中。执行以下命令: + + $ sudo add-apt-repository ppa:evolve-os/ppa + +![添加Budgie的ppa源](http://blog.linoxide.com/wp-content/uploads/2015/01/budgie-desktop-ppa.png) + +添加完ppa之后,运行下面的命令更新本地软件仓库。 + + $ sudo apt-get update + +然后只要执行下面的命令安装 + + $ sudo apt-get install budgie-desktop + +![安装 Budgie Desktop](http://blog.linoxide.com/wp-content/uploads/2015/02/install-budgie-desktop.png) + +**注意点** + +这是一个活跃的开发版本,一些主要的特点可能还不是特别的完善,如:网络管理器,为数不多的控制组件,无通知系统斌并且无法将app锁定到任务栏。 + +作为工作区你能够禁用滚动栏,通过设置一个默认的主题并且通过下面的命令退出当前的会话 + + $ gnome-session-quit + +![退出 Gnome 会话](http://blog.linoxide.com/wp-content/uploads/2015/02/gnome-seesion-quit.png) + +### 登录Budgie会话 ### + +安装完成之后,我们能在登录时选择机进入budgie桌面。 + +![选择桌面会话](http://blog.linoxide.com/wp-content/uploads/2015/02/session-select.png) + +### Budgie 桌面环境 ### + +![Budgie 桌面环境](http://blog.linoxide.com/wp-content/uploads/2015/02/budgie-desktop.png) + +### 注销当前用户 ### + + $ budgie-sessioon --logout + +### 结论 ### + +Hurray! We have successfully installed our Lightweight Budgie Desktop Environment in our Ubuntu 14.04 LTS "Trusty" box. As we know, Budgie Desktop is still underdevelopment which makes it a lot of stuffs missing. Though it’s based on Gnome’s GTK3, it’s not a fork. The desktop is written completely from scratch, and the design is elegant and well thought out. If you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy Budgie Desktop 0.8 :-) +Budgie桌面当前正在开发过程中,因此有目前有很多功能的缺失。虽然它是基于Gnome,但不是完全的复制。Budgie是完全从零开始实现,它的设计是优雅的并且正在不断的完善。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-lightweight-budgie-v8-desktop-ubuntu/ + +作者:[Arun Pyasi][a] +译者:[johnhoow](https://github.com/johnhoow) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://evolve-os.com/budgie/ +[2]:https://evolve-os.com/2014/11/16/courageous-budgie-v8-released/ From 9352e84b9bdb2599941f24d7f0462036c9e60a79 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 23 Mar 2015 16:25:24 +0800 Subject: [PATCH 0353/2517] =?UTF-8?q?20150323-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...23 Papyrus--An Open Source Note Manager.md | 57 +++++++ ... Hat Developer Toolset 3.1 beta arrives.md | 52 ++++++ ...e 2.0 Icon Pack Is Twice More Beautiful.md | 56 ++++++ ...ble ssh login without entering password.md | 41 +++++ ...up networking between Docker containers.md | 160 ++++++++++++++++++ ...G images from the command line on Linux.md | 100 +++++++++++ ...and access CentOS remote desktop on VPS.md | 121 +++++++++++++ 7 files changed, 587 insertions(+) create mode 100644 sources/share/20150323 Papyrus--An Open Source Note Manager.md create mode 100644 sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md create mode 100644 sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md create mode 100644 sources/tech/20150323 How to enable ssh login without entering password.md create mode 100644 sources/tech/20150323 How to set up networking between Docker containers.md create mode 100644 sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md create mode 100644 sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md diff --git a/sources/share/20150323 Papyrus--An Open Source Note Manager.md b/sources/share/20150323 Papyrus--An Open Source Note Manager.md new file mode 100644 index 0000000000..eda13551a8 --- /dev/null +++ b/sources/share/20150323 Papyrus--An Open Source Note Manager.md @@ -0,0 +1,57 @@ +Papyrus: An Open Source Note Manager +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_4.jpeg) + +In last post, we saw an [open source to-do app Go For It!][1]. In a similar article, today we’ll see an **open source note taking application Papyrus**. + +[Papyrus][2] is a fork of [Kaqaz note manager][3] and is built on QT5. It brings a clean, polished user interface and is security focused (as it claims). Emphasizing on simplicity, I find Papyrus similar to OneNote. You organize your notes in ‘paper’ and add them a label for grouping those papers. Simple enough! + +### Papyrus features: ### + +Though Papyrus focuses on simplicity, it still has plenty of features up its sleeves. Some of the main features are: + +- Note management with labels and categories +- Advanced search options +- Touch mode available +- Full screen option +- Back up to Dropbox/hard drive/external +- Password protection for selective papers +- Sharing papers with other applications +- Encrypted synchronization via Dropbox +- Available for Android, Windows and OS X apart from Linux + +### Install Papyrus ### + +Papyrus has APK available for Android users. There are installer files for Windows and OS X. Linux users can get source code of the application. Ubuntu and other Ubuntu based distributions can use the .deb packages. Based on your OS and preference, you can get the respective files from the Papyrus download page: + +- [Download Papyrus][4] + +### Screenshots ### + +Here are some screenshots of the application: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_3-700x450_c.jpeg) + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_2-700x450_c.jpeg) + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_1-700x450_c.jpeg) + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux-700x450_c.jpeg) + +Give Papyrus a try and see if you like it. Do share your experience with it with the rest of us here. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/papyrus-open-source-note-manager/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ +[2]:http://aseman.co/en/products/papyrus/ +[3]:https://github.com/sialan-labs/kaqaz/ +[4]:http://aseman.co/en/products/papyrus/ \ No newline at end of file diff --git a/sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md b/sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md new file mode 100644 index 0000000000..9faf1f2eb4 --- /dev/null +++ b/sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md @@ -0,0 +1,52 @@ +Red Hat Developer Toolset 3.1 beta arrives +================================================================================ +> **Summary**:Want the newest developer tools for Red Hat Enterprise Linux 6 or 7? The beta's ready for you now. + +It's one of those eternal problems between developers and operators that even [DevOps][1] can't entirely solve. System administrators want the most stable operating system possible, while programmers want the latest and greatest development tools. [Red Hat][2]'s solution for this dilemma has been to take those brand spanking-new tools, test them out on the latest stable [Red Hat Enterprise Linux (RHEL)][3], and then release them to developers. + +![Red Hat Developer Toolset](http://zdnet4.cbsistatic.com/hub/i/2015/03/18/d92b1067-6b36-4ff0-ac9e-608fbe3e8c5d/ae80362df5401a37e3cbcd2598f33370/rhel-dev-tools.png) +Red Hat Developer Toolset + +So it is that Red Hat has just announced its latest toys for developers, [Red Hat Developer Toolset 3.1][4]. This packaging of the hottest new tools is now available in beta. + +This update includes: + +[GNUCompiler Collection (GCC) 4.9][5]: the latest stable upstream version of GCC, which provides numerous improvements and bug fixes + +[Eclipse 4.4.1][6]: with support for Java 8 and updated versions of Eclipse CDT (8.5), Eclipse Linux Tools (3.1), Eclipse Mylyn (3.14), and Eclipse Egit/Jgit (3.6.1) + +Numerous additional updated packages: These include GDB 7.8.2, elfutils 0.161, memstomp 0.1.5, SystemTap 2.6, Valgrind 3.10.1, Dyninst 8.2.1, and ltrace 0.7.91. + +With these development programs, you'll be able to create applications for RHEL 6 and 7.x. These apps will then run on RHEL regardless of whether you're running it on a physical, virtual or cloud environments. They will also run on Red Hat's [OpenShift][7], its Platform-as-a-Service (PaaS) offering. + +This new set of developer programs includes packages for both RHEL 7 and 7 running on [AMD64 and Intel 64 architectures][8]. Although the tools are 64-bit you can use them to create and modify 32-bit binaries. + +Before you try running any of these programs, you should patch RHEL with all the latest updates. To install the beta Toolset, your systems need to be subscribed to the Optional channel to access all the required Red Hat Developer Toolset tool-chain packages. + +In addition, if you've installed earlier Toolkits you may run into some [problems while installing Toolkit 3.1][9]. While these difficulties are easy enough to fix, you should go over these possible hiccups before trying to install the new Toolkit. + +Finally, you may notice that some of the most exciting of the new tools, such as Docker, Kubernetes, and other container tools aren't here. That's because they're in the newly released [RHEL 7.1][10] and [Red Hat Enterprise Linux 7 Atomic Host (RHELAH)][11]. [Red Hat has partnered with Docker][12], but you'll need to move to a Docker-friendly version of RHEL to get at these container-friendly programs. + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/red-hat-developer-toolset-3-1-beta-arrives/ + +作者:[Steven J. Vaughan-Nichols][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.zdnet.com/meet-the-team/us/sjvn/ +[1]:http://blogs.csc.com/2015/02/03/devops-theory-for-beginners/ +[2]:http://www.redhat.com/en +[3]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[4]:http://www.redhat.com/en/about/blog/red-hat-developer-toolset-31-beta-now-available +[5]:https://gcc.gnu.org/gcc-4.9/ +[6]:https://projects.eclipse.org/projects/eclipse/releases/4.4.1 +[7]:https://www.openshift.com/ +[8]:https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3-Beta/html/3.1_Release_Notes/System_Requirements.html +[9]:https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3-Beta/html/3.1_Release_Notes/DTS3.1_Release.html#Known_Issues +[10]:http://www.zdnet.com/article/red-hat-7-1-is-here-centos-7-1-is-coming-soon/ +[11]:http://www.zdnet.com/article/red-hat-buys-into-docker-containers-with-atomic-host/ +[12]:http://www.zdnet.com/article/red-hat-partners-with-docker-to-create-linuxdocker-software-stack/ \ No newline at end of file diff --git a/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md b/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md new file mode 100644 index 0000000000..b0e5afbf8b --- /dev/null +++ b/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md @@ -0,0 +1,56 @@ +Square 2.0 Icon Pack Is Twice More Beautiful +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux_3.jpeg) + +Elegant, modern looking [Square icon theme][1] has recently been upgraded to version 2.0, which makes it more beautiful than ever. Square icon packs are compatible with all major desktop environments such as **Unity, GNOME, KDE, MATE** etc. Which means that you can use them for all popular Linux distributions such as Ubuntu, Fedora, Linux Mint, elementary OS etc. The vastness of this icon pack can be estimated from the fact it contains over 15,000 icons. + +### Install and use Square icon pack 2.0 in Linux ### + +There are two variants of Square icons, dark and light. Based on your preference, you can choose either of the two. For experimentation sake, I would advise you to download both variants of the icon theme. + +You can download the icon pack from the link below. The files are stored in Google Drive, so don’t be suspicious if you don’t see a standard website like [SourceForge][2]. + +- [Square Dark Icons][3] +- [Square Light Icons][4] + +To use the icon theme, extract the downloaded files in ~/.icons directory. If this doesn’t exist, create it. Once you have the files in the right place, based on your desktop environment, use a tool to change the icon theme. I have written some small tutorials in the past on this topic. Feel free to refer to them if you need further help: + +- [How to change themes in Ubuntu Unity][5] +- [How to change themes in GNOME Shell][6] +- [How to change themes in Linux Mint][7] +- [How to change theme in Elementary OS Freya][8] + +### Give it a try ### + +Here is what my Ubuntu 14.04 looks like with Square icons. I am using [Ubuntu 15.04 default wallpaper][9] in the background. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux_2.jpeg) + +A quick look at several icons in the Square theme: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux.jpeg) + +How do you find it? Do you think it can be considered as one of the [best icon themes for Ubuntu 14.04][10]? Do share your thoughts and stay tuned for more articles on customizing your Linux desktop. + + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/square-2-0-icon-pack-linux/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://gnome-look.org/content/show.php/Square?content=163513 +[2]:http://sourceforge.net/ +[3]:http://gnome-look.org/content/download.php?content=163513&id=1&tan=62806435 +[4]:http://gnome-look.org/content/download.php?content=163513&id=2&tan=19789941 +[5]:http://itsfoss.com/how-to-install-themes-in-ubuntu-13-10/ +[6]:http://itsfoss.com/install-switch-themes-gnome-shell/ +[7]:http://itsfoss.com/install-icon-linux-mint/ +[8]:http://itsfoss.com/install-themes-icons-elementary-os-freya/ +[9]:http://itsfoss.com/default-wallpapers-ubuntu-1504/ +[10]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ \ No newline at end of file diff --git a/sources/tech/20150323 How to enable ssh login without entering password.md b/sources/tech/20150323 How to enable ssh login without entering password.md new file mode 100644 index 0000000000..40a4085f01 --- /dev/null +++ b/sources/tech/20150323 How to enable ssh login without entering password.md @@ -0,0 +1,41 @@ +How to enable ssh login without entering password +================================================================================ +Assume that you are a user "aliceA" on hostA, and wish to ssh to hostB as user "aliceB", without entering her password on hostB. You can follow this guide to **enable ssh login without entering a password**. + +First of all, you need to be logged in as user "aliceA" on hostA. + +Generate a public/private rsa key pair by using ssh-keygen. The generated key pair will be stored in ~/.ssh directory. + + $ ssh-keygen -t rsa + +Then, create ~/.ssh directory on aliceB account at the destination hostB by running the following command. This step can be omitted if there is already .ssh directory at aliceB@hostB. + + $ ssh aliceB@hostB mkdir -p .ssh + +Finally, copy the public key of user "aliceA" on hostA to aliceB@hostB to enable password-less ssh. + + $ cat .ssh/id_rsa.pub | ssh aliceB@hostB 'cat >> .ssh/authorized_keys' + +From this point on, you no longer need to type in password to ssh to aliceB@hostB from aliceA@hostA. + +### Troubleshooting ### + +1. You are still asked for an SSH password even after enabling key authentication. In this case, check for system logs (e.g., /var/log/secure) to see if you see something like the following. + + Authentication refused: bad ownership or modes for file /home/aliceB/.ssh/authorized_keys + +In this case, failure of key authentication is due to the fact that the permission or ownership ~/.ssh/authorized_keys file is not correct. Typically this error can happen if ~/.ssh/authorized_keys is read accessible to anyone but yourself. To fix this problem, change the file permission as follows. + + $ chmod 700 ~/.ssh/authorized_keys + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/how-to-enable-ssh-login-without.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150323 How to set up networking between Docker containers.md b/sources/tech/20150323 How to set up networking between Docker containers.md new file mode 100644 index 0000000000..7f950494be --- /dev/null +++ b/sources/tech/20150323 How to set up networking between Docker containers.md @@ -0,0 +1,160 @@ +How to set up networking between Docker containers +================================================================================ +As you may be aware, Docker container technology has emerged as a viable lightweight alternative to full-blown virtualization. There are a growing number of use cases of Docker that the industry adopted in different contexts, for example, enabling rapid build environment, simplifying configuration of your infrastructure, isolating applications in multi-tenant environment, and so on. While you can certainly deploy an application sandbox in a standalone Docker container, many real-world use cases of Docker in production environments may involve deploying a complex multi-tier application in an ensemble of multiple containers, where each container plays a specific role (e.g., load balancer, LAMP stack, database, UI). + +There comes the problem of **Docker container networking**: How can we interconnect different Docker containers spawned potentially across different hosts when we do not know beforehand on which host each container will be created? + +One pretty neat open-source solution for this is [weave][1]. This tool makes interconnecting multiple Docker containers pretty much hassle-free. When I say this, I really mean it. + +In this tutorial, I am going to demonstrate **how to set up Docker networking across different hosts using weave**. + +### How Weave Works ### + +![](https://farm8.staticflickr.com/7288/16662287067_27888684a7_b.jpg) + +Let's first see how weave works. Weave creates a network of "peers", where each peer is a virtual router container called "weave router" residing on a distinct host. The weave routers on different hosts maintain TCP connections among themselves to exchange topology information. They also establish UDP connections among themselves to carry inter-container traffic. A weave router on each host is then connected via a bridge to all other Docker containers created on the host. When two containers on different hosts want to exchange traffic, a weave router on each host captures their traffic via a bridge, encapsulates the traffic with UDP, and forwards it to the other router over a UDP connection. + +Each weave router maintains up-to-date weave router topology information, as well as container's MAC address information (similar to switch's MAC learning), so that it can make forwarding decision on container traffic. Weave is able to route traffic between containers created on hosts which are not directly reachable, as long as two hosts are interconnected via an intermediate weave router on weave topology. Optionally, weave routers can be set to encrypt both TCP control data and UDP data traffic based on public key cryptography. + +### Prerequisite ### + +Before using weave on Linux, of course you need to set up Docker environment on each host where you want to run [Docker][2] containers. Check out [these][3] [tutorials][4] on how to create Docker containers on Ubuntu or CentOS/Fedora. + +Once Docker environment is set up, install weave on Linux as follows. + + $ wget https://github.com/zettio/weave/releases/download/latest_release/weave + $ chmod a+x weave + $ sudo cp weave /usr/local/bin + +Make sure that /usr/local/bin is include in your PATH variable by appending the following in /etc/profile. + + export PATH="$PATH:/usr/local/bin" + +Repeat weave installation on every host where Docker containers will be deployed. + +Weave uses TCP/UDP 6783 port. If you are using firewall, make sure that these port numbers are not blocked by the firewall. + +### Launch Weave Router on Each Host ### + +When you want to interconnect Docker containers across multiple hosts, the first step is to launch a weave router on every host. + +On the first host, run the following command, which will create and start a weave router container. + + $ sudo weave launch + +The first time you run this command, it will take a couple of minutes to download a weave image before launching a router container. On successful launch, it will print the ID of a launched weave router. + +To check the status of the router, use this command: + + $ sudo weave status + +![](https://farm9.staticflickr.com/8632/16249607573_4514790cf5_c.jpg) + +Since this is the first weave router launched, there will be only one peer in the peer list. + +You can also verify the launch of a weave router by using docker command. + + $ docker ps + +![](https://farm8.staticflickr.com/7655/16681964438_51d8b18809_c.jpg) + +On the second host, run the following command, where we specify the IP address of the first host as a peer to join. + + $ sudo weave launch + +When you check the status of the router, you will see two peers: the current host and the first host. + +![](https://farm8.staticflickr.com/7608/16868571891_e66d4b8841_c.jpg) + +As you launch more routers on subsequent hosts, the peer list will grow accordingly. When launching a router, just make sure that you specify any previously launched peer's IP address. + +At this point, you should have a weave network up and running, which consists of multiple weave routers across different hosts. + +### Interconnect Docker Containers across Multiple Hosts ### + +Now it is time to launch Docker containers on different hosts, and interconnect them on a virtual network. + +Let's say we want to create a private network 10.0.0.0/24, to interconnect two Docker containers. We will assign random IP addressses from this subnet to the containers. + +When you create a Docker container to deploy on a weave network, you need to use weave command, not docker command. Internally, the weave command uses docker command to create a container, and then sets up Docker networking on it. + +Here is how to create a Ubuntu container on hostA, and attach the container to 10.0.0.0/24 subnet with an IP addresss 10.0.0.1. + + hostA:~$ sudo weave run 10.0.0.1/24 -t -i ubuntu + +On successful run, it will print the ID of a created container. You can use this ID to attach to the running container and access its console as follows. + + hostA:~$ docker attach + +Move to hostB, and let's create another container. Attach it to the same subnet (10.0.0.0/24) with a different IP address 10.0.0.2. + + hostB:~$ sudo weave run 10.0.0.2/24 -t -i ubuntu + +Let's attach to the second container's console as well: + + hostB:~$ docker attach + +At this point, those two containers should be able to ping each other via the other's IP address. Verify that from each container's console. + +![](https://farm9.staticflickr.com/8566/16868571981_d73c8e401b_c.jpg) + +If you check the interfaces of each container, you will see an interface named "ethwe" which is assigned an IP address (e.g., 10.0.0.1 and 10.0.0.2) you specified. + +![](https://farm8.staticflickr.com/7286/16681964648_013f9594b1_b.jpg) + +### Other Advanced Usages of Weave ### + +Weave offers a number of pretty neat features. Let me briefly cover a few here. + +#### Application Isolation #### + +Using weave, you can create multiple virtual networks and dedicate each network to a distinct application. For example, create 10.0.0.0/24 for one group of containers, and 10.10.0.0/24 for another group of containers, and so on. Weave automatically takes care of provisioning these networks, and isolating container traffic on each network. Going further, you can flexibly detach a container from one network, and attach it to another network without restarting containers. For example: + +First launch a container on 10.0.0.0/24: + + $ sudo weave run 10.0.0.2/24 -t -i ubuntu + +Detach the container from 10.0.0.0/24: + + $ sudo weave detach 10.0.0.2/24 + +Re-attach the container to another network 10.10.0.0/24: + + $ sudo weave attach 10.10.0.2/24 + +![](https://farm8.staticflickr.com/7639/16247212144_c31a49714d_c.jpg) + +Now this container should be able to communicate with other containers on 10.10.0.0/24. This is a pretty useful feature when network information is not available at the time you create a container. + +#### Integrate Weave Networks with Host Network #### + +Sometimes you may need to allow containers on a virtual weave network to access physical host network. Conversely, hosts may want to access containers on a weave network. To support this requirement, weave allows weave networks to be integrated with host network. + +For example, on hostA where a container is running on network 10.0.0.0/24, run the following command. + + hostA:~$ sudo weave expose 10.0.0.100/24 + +This will assign IP address 10.0.0.100 to hostA, so that hostA itself is also connected to 10.0.0.0/24 network. Obviously, you need to choose an IP address which is not used by any other containers on the network. + +At this point, hostA should be able to access any containers on 10.0.0.0/24, whether or not the containers are residing on hostA. Pretty neat! + +### Conclusion ### + +As you can see, weave is a pretty useful Docker networking tool. This tutorial only covers a glimpse of [its powerful features][5]. If you are more ambitious, you can try its multi-hop routing, which can be pretty useful in multi-cloud environment, dynamic re-routing, which is a neat fault-tolerance feature, or even its distributed DNS service which allows you to name containers on weave networks. If you decide to use this gem in your environment, feel free to share your use case! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/networking-between-docker-containers.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://github.com/zettio/weave +[2]:http://xmodulo.com/recommend/dockerbook +[3]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html +[4]:http://xmodulo.com/docker-containers-centos-fedora.html +[5]:http://zettio.github.io/weave/features.html \ No newline at end of file diff --git a/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md b/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md new file mode 100644 index 0000000000..0dab928789 --- /dev/null +++ b/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md @@ -0,0 +1,100 @@ +Linux FAQs with Answers--How to compress JPEG images from the command line on Linux +================================================================================ +> **Question**: I have several JPEG photo images I have taken using a digital camera. I would like to optimize and compress the JPEG pictures before uploading them to Dropbox. What is the easiest way to compress JPEG images without losing their quality on Linux? + +Image resolution of today's picture taking gadgets (e.g., smartphones, digital cameras) keeps increasing. Even 36.3 Megapixel Nikon D800 recently hit the consumer market, and this trend will continue. While modern gadgets continue to produce increasingly high resolution images, we may often want to post-process and compress their sizes before uploading them to a storage-limited and bandwidth-restricted cloud. + +In fact, there is a way to compress JPEG images easily on Linux. A command-line tool called jpegoptim allows you do "lossless" optimization on JPEG images, so you can compress JPEG pictures without sacrificing their quality. In case your storage or bandwidth budget is really low, jpegoptim allows you to do "lossy" compression as well by adjusting image quality. + +For those interested in compressing PNG images, refer to [this guideline][1] instead. + +### Install Jpegoptim on Linux ### + +To install jpegoptim on Ubuntu, Debian or Linux Mint: + + $ sudo apt-get install jpegoptim + +To install jpegoptim on Fedora: + + $ sudo yum install jpegoptim + +To install jpegoptim on CentOS/RHEL, first enable [EPEL repo][2], and then run: + + $ sudo yum install jpegoptim + +### Compress JPEG Images Losslessly ### + +To compress a JPG picture losslessly, simply run: + + $ jpegoptim photo.jpg + +---------- + + photo.jpg 2048x1536 24bit N ICC JFIF [OK] 882178 --> 821064 bytes (6.93%), optimized. + +Note that the original input image will be overwritten with a compressed impage. + +If jpegoptim is not able to further optimize an image losselessly, it will skip overwriting it. + + $ jpegoptim -v photo.jpg + +---------- + + photo.jpg 2048x1536 24bit N ICC JFIF [OK] 821064 --> 821064 bytes (0.00%), skipped. + +If you want to preserve an original image, use "-d" option to specify a target directory. + + $ jpegoptim -d ./compressed photo.jpg + +An compressed image will then be placed (with the same name as the input file) in ./compressed directory. + +If you want to preserve file creation/modification time, use "-p" option as follows. Then a compressed image will be placed with the same date and time as the original image. + + $ jpegoptim -d ./compressed -p photo.jpg + +If you simply check out possible lossless compression ratio without actually compressing it, use "-n" option to "simulate" compression. Then it will simply print results without actually performing compression. + + $ jpegoptim -n photo.jpg + +### Compress JPEG Images Lossily ### + +In case you really want to save storage space, you can do lossy compression on large JPEG pictures. + +In this case, use "-m" option, where maximum quality is specified in the range of 0 and 100 (0 is the highest quality, and 100 is the lowest quality). + +For example, to compress an image with 50% quality: + + $ jpegoptim -m50 photo.jpg + +---------- + + photo.jpg 2048x1536 24bit N ICC JFIF [OK] 882178 --> 301780 bytes (65.79%), optimized. + +You will get a smaller image at the cost of reduced quality. + +![](https://farm9.staticflickr.com/8707/16260736234_6d6f1d2434_c.jpg) + +### Compress Multiple JPEG Images in a Batch ### + +Often times you need to compress many JPEG image files in a directory. In that case, you can use the following shell script. + + #!/bin/sh + + # compress all *.jpg files in the current directory + # and place them in ./compressed directory + # with the same modification date as original files. + for i in *.jpg; do jpegoptim -d ./compressed -p "$i"; done + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/compress-jpeg-images-command-line-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-compress-png-files-on-linux.html +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file diff --git a/sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md b/sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md new file mode 100644 index 0000000000..9306f21c8d --- /dev/null +++ b/sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md @@ -0,0 +1,121 @@ +Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS +================================================================================ +> **Question**: I want to install CentOS desktop on VPS, and be able to access the desktop GUI remotely from home. What is a recommended way to set up and access CentOS-based remote desktop on VPS? + +Nowadays teleworking or remote working with flexible hours is increasingly popular in tech industry. One of the enabling technologies behind this trend is remote desktop. Your desktop environment is in the cloud, and you can access the remote desktop anywhere you go, either from home or at your workplace. + +This tutorial describes how you can set up CentOS based remote desktop on VPS. Here we are going to demonstrate CentOS 7 based environment. + +We assume that you already created a CentOS 7 VPS instance somewhere (e.g., using [DigitalOcean][1] or Amazon EC2). Make sure that the VPS instance has at least 1GB memory. Otherwise, CentOS desktop will crash when you try to access remote desktop. + +### Step One: Install CentOS Desktop ### + +If an available CentOS image is a minimal version of CentOS without desktop, you will need to install desktop (e.g., GNOME) on your CentOS VPS before proceeding. For example, DigitalOcean's CentOS image is such a minimal version, which requires [desktop GUI installation][2] as follows. + + # yum groupinstall "GNOME Desktop" + +Reboot a VPS after finishing installation. + +### Step Two: Install and Configure VNC Server ### + +The next step is to install and configure VNC server. We are going to use TigerVNC, an open-source VNC server implementation. + + # yum install tigervnc-server + +Now create a user account (e.g., xmodulo) which will be used to access remote desktop. + + # useradd xmodulo + # passwd xmodulo + +When a user tries to access remote desktop using VNC, a dedicated VNC server daemon will be launched to handle its requests. This means that you will need to create a separate VNC server configuration for each user. + +CentOS 7 relies on systemd to manage and configure system services. So we are going to configure VNC server for xmodulo user using systemd. + +Let's first check the status of VNC server by running either command below: + + # systemctl status vncserver@:.service + # systemctl is-enabled vncserver@.service + +By default, freshly installed VNC service is not active (disabled). + +![](https://farm8.staticflickr.com/7613/16877514732_8ccffe7b6b_b.jpg) + +Now create a VNC service configuration for xmodulo user by copying a generic VNC service unit file as follows. + + # cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service + +Open the configuration file with a text editor, and replace with an actual user name (e.g., xmodulo) under [Service] section. Also, append "-geometry " parameter in ExecStart. In the end, the following two lines with bold font will be modified. + + # vi /etc/systemd/system/vncserver@:1.service + +---------- + + [Service] + Type=forking + # Clean any existing files in /tmp/.X11-unix environment + ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' + ExecStart=/sbin/runuser -l xmodulo -c "/usr/bin/vncserver %i -geometry 1024x768" + PIDFile=/home/xmodulo/.vnc/%H%i.pid + ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' + +Now set up (optional) VNC password for xmodulo user for security. For this, switch to the user, and run vncserver command. + + # su - xmodulo + # vncserver + +You will be prompted to enter a VNC password for the user. Once the password is set, you will need to use this password to gain access to remote desktop. + +![](https://farm9.staticflickr.com/8752/16692564599_9c4e5da1b6_b.jpg) + +Finally, reload services to activate the new VNC configuration: + + # systemctl daemon-reload + +and enable VNC service to make it start automatically upon boot: + + # systemctl enable vncserver@:1.service + +Check the port number that a VNC server is listening on by running: + + # netstat -tulpn | grep vnc + +![](https://farm8.staticflickr.com/7625/16692646729_7bb16c4897_b.jpg) + +Port 5901 is the default port number for VNC client to connect to a VNC server. + +### Step Three: Connect to Remote Desktop over SSH ### + +By design, Remote Frame Buffer (RFB) protocol used by VNC is not a secure protocol. Thus it is not a good idea to directly connect to a remote VNC server running on VPS using a VNC client. Any sensitive information such as password could easily be leaked from VNC traffic. So instead, I strongly recommend that you [tunnel VNC traffic][3] over a secure SSH tunnel, as described here. + +On a local host where you want to run VNC client, create an SSH tunnel to a remote VPS using the following command. When prompted for SSH password, type the password of the user. + + $ ssh xmodulo@ -L 5901:127.0.0.1:5901 + +Replace "xmodulo" with your own VNC user, and fill in the IP address of your VPS instance. + +Once an SSH tunnel is established, remote VNC traffic will be routed over the SSH tunnel, and be sent to 127.0.0.1:5901. + +Now go ahead and launch your favorite VNC client (e.g., vinagre), and connect to 127.0.0.1:5901. + +![](https://farm8.staticflickr.com/7639/16691289910_fae83510fb_o.png) + +You will be asked to enter a VNC password. When you type a correct VNC password, you will finally be able to CentOS remote desktop on VPS securely. + +![](https://farm8.staticflickr.com/7614/16877678411_aa8349f6b1_c.jpg) + +![](https://farm9.staticflickr.com/8702/16256320434_81f9b5b70c_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/centos-remote-desktop-vps.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/go/digitalocean +[2]:http://xmodulo.com/how-to-install-gnome-desktop-on-centos.html +[3]:http://xmodulo.com/how-to-set-up-vnc-over-ssh.html \ No newline at end of file From cb33d1666aaadb4f4c1a8031615debdc740f9f68 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 23 Mar 2015 17:59:31 +0800 Subject: [PATCH 0354/2517] Translating by ZTinoZ --- ...ual Environment using Commandline Tools in Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index e3da1ec917..cce8eb5688 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -1,15 +1,15 @@ 如何在Linux中用命令行工具管理KVM虚拟环境 ================================================================================ -在我们[KVM系列专题][1]的第四部分,我们将会一起讨论下命令行界面下来管理KVM环境。We use ‘virt-install’ CL tool to create and configure virtual machines, virsh CL tool to create and configure storage pools and qemu-img CL tool to create and manage disk images. +在我们[KVM系列专题][1]的第四部分,我们将会一起讨论下在命令行界面下来管理KVM环境。我们分别用‘virt-install’和virsh命令行工具来创建并配置虚拟机和存储池,用qemu-img命令行工具来创建并管理磁盘映像。 ![KVM Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/KVM-Management-in-Linux.jpg) -KVM Management in Linux +Linux系统的KVM管理 -There is nothing new concepts in this article, we just do the previous tasks using command line tools. There is no new prerequisite, just the same procedure, we have discussed in previous parts. +在这篇文章里没有什么新的概念,我们只是用命令行工具重复之前所做过的事情,也没有什么前提条件,都是相同的过程,之前的文章我们都讨论过。 -### Step 1: Configure Storage Pool ### +### 第一步: 配置存储池 ### -Virsh CLI tool is a management user interface for managing virsh guest domains. The virsh program can be used either to run one command by giving the command and its arguments on the shell command line. +Virsh命令行工具 CLI tool is a management user interface for managing virsh客户域 guest domains. The virsh program can be used either to run one command by giving the command and its arguments on the shell command line. In this section, we will use it to create storage pool for our KVM environment. For more information about the tool, use the following command. From 85f1c498e42d805bba6f1cb1158b6d91eda997af Mon Sep 17 00:00:00 2001 From: VicYu Date: Mon, 23 Mar 2015 23:38:01 +0800 Subject: [PATCH 0355/2517] Update 20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md --- ... to compress JPEG images from the command line on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md b/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md index 0dab928789..e96abc6f52 100644 --- a/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md +++ b/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md @@ -1,3 +1,5 @@ + Vic020 + Linux FAQs with Answers--How to compress JPEG images from the command line on Linux ================================================================================ > **Question**: I have several JPEG photo images I have taken using a digital camera. I would like to optimize and compress the JPEG pictures before uploading them to Dropbox. What is the easiest way to compress JPEG images without losing their quality on Linux? @@ -97,4 +99,4 @@ via: http://ask.xmodulo.com/compress-jpeg-images-command-line-linux.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://xmodulo.com/how-to-compress-png-files-on-linux.html -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html From 244055c59f4d8960c4319a218bdbfa34ece5c78c Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 23 Mar 2015 23:55:30 +0800 Subject: [PATCH 0356/2517] PUB:20150121 How to Monitor Network Usage with nload in Linux @theo-l --- ...nitor Network Usage with nload in Linux.md | 202 ++++++++++++++++++ ...nitor Network Usage with nload in Linux.md | 196 ----------------- 2 files changed, 202 insertions(+), 196 deletions(-) create mode 100644 published/20150121 How to Monitor Network Usage with nload in Linux.md delete mode 100644 translated/tech/20150121 How to Monitor Network Usage with nload in Linux.md diff --git a/published/20150121 How to Monitor Network Usage with nload in Linux.md b/published/20150121 How to Monitor Network Usage with nload in Linux.md new file mode 100644 index 0000000000..e94489c554 --- /dev/null +++ b/published/20150121 How to Monitor Network Usage with nload in Linux.md @@ -0,0 +1,202 @@ +在linux中如何通过nload来监控网络使用情况 +================================================================================ +nload 是一个 linux 自由软件工具,通过提供两个简单的图形来帮助linux用户和系统管理员来实时监控网络流量以及宽带使用情况:一个是进入流量,一个是流出流量。 + +我真的很喜欢用**nload**来在屏幕上显示当前的下载速度、总的流入量和平均下载速度等信息。nload工具的报告图非常容易理解,最重要的是这些信息真的非常有用。 + +在其使用手册上说到,在默认情况下它会监控所有网络设备。但是你可以轻松地指定你想要监控的设备,而且可以通过方向键在不同的网络设备之间进行转换。另外还有很多的选项可用,例如 ‘-t’选项以毫秒来设定刷新显示时间间隔(默认时间间隔值是500毫秒),‘-m’选项用来同时显示多个设备(在使用该选项时不会显示流量图),‘-u’选项用来设置显示流量数字的单位,另外还有许多其他的选项将会在本教程中探索和练习。 + +### 如何将 nload安装到你的linux机器上 ### + +**Ubuntu** 和 **Fedora** 用户可以从默认的软件仓库中容易地安装。 + +在Ubuntu上使用以下命令进行安装。 + + sudo apt-get install nload + +在Fedora上使用以下命令进行安装。 + + sudo yum install nload + +**CentOS**用户该怎么办呢? 只需要在你的机器上输入以下命令就可以安装成功。 + + sudo yum install nload + +以下的命令会帮助你在OpenBSD系统中安装nload。 + + sudo pkg_add -i nload + +在 linux 机器上的另外一个非常有效的安装软件的方式就是编译源代码,下载并安装最新的版本意味着能够获得更好地性能、更酷的特性以及更少的bug。 + +### 如何通过源代码安装nload ### + +在从源代码安装nload之前,你需要首先下载源代码。 我通常使用wget工具来进行下载--该工具在许多linux机器上默认可用。该免费工具帮助用户以非交互式的方式从网络上下载文件,并支持以下协议: + +- HTTP +- HTTPS +- FTP + +通过以下命令来进入到**/tmp**目录中。 + + cd /tmp + +然后在你的终端中输入以下命令就可以将最新版本的nload下载到你的linux机器上了。 + + wget http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz + +如果你不喜欢使用wget工具,也可以通过简单的一个鼠标点击轻松地从[官网][1]上下载其源代码。 + +由于该软件非常轻巧,其下载过程几乎在瞬间就会完成。接下来的步骤就是通过**tar**工具来将下载的源代码包进行解压。 + +tar归档工具可以用来从磁带或硬盘文档中存储或解压文件,该工具有许多可用的选项,但是我们只需要下面的几个选项来执行我们的操作。 + +1. **-x** 从归档中解压文件 +1. **-v** 使用繁琐模式运行--用来显示详细信息 +1. **-f** 用来指定归档文件 + +例如(LCTT 译注:tar 命令的参数前的“-”可以省略): + + tar xvf example.tar + +现在你学会了如何使用tar工具,我可以非常肯定你知道了如何从命令行中解压这个.tar文档。 + + tar xvf nload-0.7.4.tar.gz + +之后使用cd命令来进入到nload*目录中: + + cd nload* + +在我的系统上看起来是这样的: + + oltjano@baby:/tmp/nload-0.7.4$ + +然后运行下面这个命令来为你的系统配置该软件包: + + ./configure + +此时会有“一大波僵尸”会在你的屏幕上显示出来,下面的一个屏幕截图描述了它的样子。 + +![configuring packages for nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload1.png) + +在上述命令完成之后,通过下面的命令来编译nload。 + + make + +![compiling nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload2.png) + +好了,终于....,通过以下命令可以将nload安装在你的机器上了。 + + sudo make install + +![installing nload from source](http://blog.linoxide.com/wp-content/uploads/2015/01/nload3.png) + +安装好nload之后就是让你学习如何使用它的时间了。 + +###如何使用nload### + +我喜欢探索,所以在你的终端输入以下命令. + + nload + +看到了什么? + +我得到了下面的结果。 + +![running nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.png) + +如上述截图可以看到,我得到了以下信息: + +#### 流入量#### + +**当前下载速度** + +![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.1.png) + +**平均下载速度** + +![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.2.png) + +**最小下载速度** + +![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.3.png) + +**最大下载速度** + +![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.4.png) + +**总的流入量按字节进行显示** + +![](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.5.png) + +#### 流出量 #### + +类似的同样适用于流出量 + +#### 一些nload有用的选项#### + +使用选项 + + -u + +用来设置显示流量单位。 + +下面的命令会帮助你使用MBit/s显示单元 + + nload -u m + +下面的屏幕截图显示了上述命令的结果。 + +![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload5.png) + +尝试以下命令然后看看有什么结果。 + + nload -u g + +![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload6.png) + +同时还有一个**-U**选项。根据手册描述,该选项基本上与-u选项类似,只是用在合计数据。 我测试了这个命令,老实说,当你需要检查总的流入与流出量时非常有用。 + + nload -U G + +![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload7.png) + +从上面的截图中可以看到,**nload -U G** 使用Gbyte来显示数据总量。 + +另外一个我喜欢使用的有用选项是 **-t**。 该选项用来设置刷新显示事件间隔,单位为毫秒,默认值为500毫秒。 + +我会通过下面的命令做一些小的实验。 + + nload -t 130 + +那么上述命令做了什么呢?它将刷新显示时间间隔设置为130毫秒。 通常推荐不要将该时间间隔值设置为小于100毫秒,因为nload在生成报告时计算错误。 + +另外的一个选项为 **-a**, 在你想要设置计算平均值的时间窗口的秒数时使用,默认该值为300秒。 + +那么当你想要监控指定的网络设备该如何呢? 非常容易, 像下面这样简单地指定设备或者列出想要监控的设备列表即可。 + + nload wlan0 + +![nload monitoring wlan0 on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload8.png) + +下面的语法可帮助你监控指定的多个设备。 + + nload [options] device1 device2 devicen + +例如,使用下面的命令来监控eth0和eth1。 + + nload wlan0 eth0 + +如果不带选项来运行nload,那么它会监控所有自动检测到的设备,你可以通过左右方向键来显示其中的任何一个设备的信息。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/monitoring-2/monitor-network-usage-nload/ + +作者:[Oltjano Terpollari][a] +译者:[theo-l](https://github.com/theo-l) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/oltjano/ +[1]:http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz diff --git a/translated/tech/20150121 How to Monitor Network Usage with nload in Linux.md b/translated/tech/20150121 How to Monitor Network Usage with nload in Linux.md deleted file mode 100644 index 9b70fa4d8e..0000000000 --- a/translated/tech/20150121 How to Monitor Network Usage with nload in Linux.md +++ /dev/null @@ -1,196 +0,0 @@ -在linux中如何通过nload来监控网络使用情况 -================================================================================ -nload 是一个免费的linux工具,通过提供两个简单的图形化界面来帮助linux用户和系统管理员来实时监控网络流量以及宽带使用情况:一个作为进入流量,一个作为流出流量. - -我是真的很喜欢用**nload**来在屏幕上显示当前的下载速度,总的流入量和平均下载速度等信息。nload工具的报告图非常容易理解,最重要的是这些信息真的非常有用。 - - - -在使用手册上说到,在默认情况下会监控所有网络设备。但是你可以轻松地指定你想要监控的设备,而且可以可以通过方向键头在不同的网络设备之间进行转换。另外还有很多的选项可用,例如 ‘-r’选项确定以毫秒来刷新显示时间间隔(默认时间间隔值是500毫秒),‘-m’选项用来实时显示多个设备(流量图在使用该选项时不会显示), ‘-u’选项用来设置显示流量数字的单元类型,另外还有许多其他的选项将会在该教程中探索和练习。 - -### 如何将 nload安装到你的linux机器上 ### - -**Ubuntu** 和 **Fedora** 用户可以从默认的软件仓库中容易地安装。 - -在Ubuntu上使用以下命令进行安装。 - - sudo apt-get install nload - -在Fedora上使用以下命令进行安装。 - - sudo yum install nload - -**CentOS**用户该怎么办呢? 只需要在你的机器上输入以下命令,通用能够达到相同的结果--殊途同归。 - - sudo yum install nload - -以下的命令会帮助你在OpenBSD系统中安装nload. - - sudo pkg_add -i nload - -linux机器上的另外一个非常有效的安装软件的方式就是编译源代码,通过下载并安装最新的版本意味着能够获得更好地性能,更酷的特性以及越少的bug数。 - -### 如何通过源代码安装nload ### - -在从源代码安装nload之前,你需要首先下载源代码。 我通常使用wget工具来进行下载--该工具在许多linux机器上默认可用。该免费工具帮助用户以非交互式的方式从网络上下载文件,并支持以下协议: - -- HTTP -- HTTPS -- FTP - -通过以下命令来进入到**/tmp**目录中。 - - cd /tmp - -然后在你的终端中输入以下命令就可以将最新版本的nload下载到你的linux机器上了。 - - wget http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz - -如果你不喜欢使用wget工具,也可以通过简单的一个鼠标点击轻松地从[官网][1]上下载源代码。 - -由于该软件非常轻巧,其下载过程几乎在瞬间就会完成。接下来的步骤就是通过**tar**工具来将下载的源代码包进行解压。 - -tar归档工具可以用来从磁带或硬盘文档中存储或解压文件,该工具具有许多可用的选项,但是我们只需要下面的几个选项来执行我们的操作。 - -1. **-x** to extract files from an archive -1. **-x** 从文档中解压文件 -1. **-v** to run in verbose mode -1. **-v** 使用繁琐模式运行--用来输入详细信息 -1. **-f** to specify the files -1. **-f** 用来指定文件 - -例如: - - tar xvf example.tar - -现在你学会了如何使用tar工具,我可以非常肯定你会知道如何从命令行中解压.tar文档。 - - tar xvf nload-0.7.4.tar.gz - -之后使用cd命令来进入到nload*目录中 - - cd nload* - -在我的系统上看起来是这样的 - - oltjano@baby:/tmp/nload-0.7.4$ - -然后运行下面这个命令来为你的系统配置包 - - ./configure - -此时会有一大波僵尸会在你的屏幕上显示出来,下面的一个屏幕截图描述了它的样子。 - -![configuring packages for nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload1.png) - -在上述命令完成之后,通过下面的命令来编译nload。 - - make - -![compiling nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload2.png) - -好了,终于....,下载通过以下命令可以将nload安装在你的机器上了。 - - sudo make install - -![installing nload from source](http://blog.linoxide.com/wp-content/uploads/2015/01/nload3.png) - -安装好nload之后就是时间来让你学习如何使用它了。 - -###如何使用nload### - -我喜欢探索,所以在你的终端输入以下命令. - - nload - -看到了什么? - -我得到了下面的结果。 - -![running nload](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.png) - -如上述截图可以看到,我得到了以下信息: -### 流入量### - -#### 当前下载速度#### -![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.1.png) - -#### 平均下载速度#### -![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.2.png) - -#### 最小下载速度#### -![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.3.png) - -#### 最大下载速度#### -![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.4.png) - -#### 总的流入量按字节进行显示#### -![](http://blog.linoxide.com/wp-content/uploads/2015/01/nload4.5.png) - -### 流出量 ### - -类似的同样适用于流出量 -#### 一些nload有用的选项#### - -使用选项 - -u - -用来设置显示流量单元的类型. - -下面的命令会帮助你使用MBit/s显示单元 - nload -u m - -下面的屏幕截图显示了上述命令的结果. -![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload5.png) - -尝试以下命令然后看看有什么结果. - - nload -u g - -![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload6.png) - -同时还有一个**-U**选项.根据手册描述,该选项基本上与-u选项类似,只是用在合计数据. 我测试了这个命令,老实说,当你需要检查总的流入与流出量时非常有用. - - nload -U G - -![nload running on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload7.png) - -从上面的截图中可以看到,**nload -U G** 使用Gbyte来显示数据总量. - -另外一个我喜欢使用的有用选项是 **-t**. 该选项用来设置刷新显示事件间隔为毫秒,默认值为500毫秒. - -我会通过下面的命令做一些小的实验. - nload -t 130 - -那么上述命令做了什么呢,它讲刷新显示时间间隔设置为130毫秒. 通常推荐不要讲该时间间隔值设置为小于100毫秒,因为nload在计算过程中可能会生成带错的报告. - -另外的一个选项为 **-a**. 在你想要设置计算平均值的时间窗口秒数长度时使用,默认该值为300秒. - -那么当你想要监控指定的网络设备该如何呢? 非常容易, 想下面这样简单地指定设备或者列出想要监控的设备列表. - - nload wlan0 - -![nload monitoring wlan0 on linux](http://blog.linoxide.com/wp-content/uploads/2015/01/nload8.png) - -下面的语法可帮助你监控指定的多个设备. - - nload [options] device1 device2 devicen - -例如,使用下面的命令来监控eth0和eth1. - - nload wlan0 eth0 - -如果不带选项来运行nload,那么它会监控监控所有自动检测到的设备,你可以通过左右方向键来显示其中的任何一个设备的信息. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/monitoring-2/monitor-network-usage-nload/ - -作者:[Oltjano Terpollari][a] -译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/oltjano/ -[1]:http://www.roland-riegel.de/nload/nload-0.7.4.tar.gz From 9b16eee344ab9740be1f03c800ef4e31938895d5 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 24 Mar 2015 11:52:15 +0800 Subject: [PATCH 0357/2517] Translating by ZTinoZ --- ...onment using Commandline Tools in Linux.md | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index cce8eb5688..be433085c3 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -9,15 +9,15 @@ Linux系统的KVM管理 ### 第一步: 配置存储池 ### -Virsh命令行工具 CLI tool is a management user interface for managing virsh客户域 guest domains. The virsh program can be used either to run one command by giving the command and its arguments on the shell command line. +Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序能在命令行中运行所给的命令以及它的参数。 -In this section, we will use it to create storage pool for our KVM environment. For more information about the tool, use the following command. +本节中,我们要用它给我们的KVM环境创建存储池。想知道关于这个工具的更多信息,用以下这条命令。 # man virsh -**1. Using the command pool-define-as with virsh to define new storage pool, you need also to specify name, type and type’s arguments.** +**1. 用virsh带pool-define-as的命令来定义新的存储池,你需要指定名字、类型和类型参数。** -In our case, name will be Spool1, type will be dir. By default you could provide five arguments for the type: +本例中,我们将名字取为Spool1,类型为目录。默认情况下你可以提供五个参数给该类型: - source-host - source-path @@ -25,62 +25,62 @@ In our case, name will be Spool1, type will be dir. By default you could provide - source-name - target -For (Dir) type, we need the last argumet “target” to specify the path of storage pool, for the other arguments we could use “-” to unspecific them. +对于目录类型,我们需要用最后一个参数“target”来指定存储池的路径,其它参数项我们可以用“-”来填充。 # virsh pool-define-as Spool1 dir - - - - "/mnt/personal-data/SPool1/" ![Create New Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Storage-Pool.png) -Create New Storage Pool +创建新存储池 -**2. To check the all storage pools you have in the environment, use the following command.** +**2. 查看环境中我们所有的存储池,用以下命令。** # virsh pool-list --all ![List All Storage Pools](http://www.tecmint.com/wp-content/uploads/2015/02/List-All-Storage-Pools.png) -List All Storage Pools +列出所有存储池 -**3. Now it’s time to build the storage pool, which we have defined above with the following command.** +**3. 现在是时候来构造存储池了,用以下命令来构造我们刚才定义的存储池。** # virsh pool-build Spool1 ![Build Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Build-Storage-Pool.png) -Build Storage Pool +构造存储池 -**4. Using the virsh command pool-start to active/enable the storage pool we have just created/built above.** +**4. 用virsh带pool-start的命令来激活并启动我们刚才创建并构造完成的存储池。** # virsh pool-start Spool1 ![Active Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Active-Storage-Pool.png) -Active Storage Pool +激活存储池 -**5. Check the status of environment storage pools using the following command.** +**5. 查看环境中存储池的状态,用以下命令。** # virsh pool-list --all ![Check Storage Pool Status](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Pool-Status.png) -Check Storage Pool Status +查看存储池状态 -You will notice that the status of Spool1 converted to active. +你会发现Spool1的状态变成了已激活。 -**6. Configure Spool1 to start by libvirtd service every time automaticlly.** +**6. 对Spool1进行配置,让它每次都能被libvirtd服务自启动。** # virsh pool-autostart Spool1 ![Configure KVM Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Configure-Storage-Pool.png) -Configure KVM Storage Pool +配置KVM存储池 -**7. Finally lets display information about our new storage pool.** +**7. 最后来看看我们新的存储池的信息吧。** # virsh pool-info Spool1 ![Check KVM Storage Pool Information](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Pool-Information.png) -Check KVM Storage Pool Information +查看KVM存储池信息 -Congratulations, Spool1 is ready to be used lets try to create storage volumes using it. +恭喜你,Spool1已经准备好待命,接下来我们试着创建存储卷来使用它。 -### Step 2: Configure Storage Volumes/Disk Images ### +### 第二步: 配置存储卷/磁盘映像 ### -Now it is disk image’s turn, using qemu-img to create new disk image from Spool1. For more details about qemy-img, use the man page. +现在轮到磁盘映像了,using qemu-img to create new disk image from Spool1. For more details about qemy-img, use the man page. # man qemu-img @@ -100,9 +100,9 @@ Check Storage Volume Information Now its time to create virtual machines in the next step. -### Step 3: Create Virtual Machines ### +### 第三步: 创建虚拟机 ### -10. Now with the last and latest part, we will create virtual machines using virt-istall. The virt-install is a command line tool for creating new KVM virtual machines using the “libvirt” hypervisor management library. For more details about it, use: +**10. Now with the last and latest part, we will create virtual machines using virt-istall. The virt-install is a command line tool for creating new KVM virtual machines using the “libvirt” hypervisor management library. For more details about it, use:** # man virt-install From 34cfb7e78f212cb3bfa591563c726c94b0aa77c1 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 24 Mar 2015 11:55:42 +0800 Subject: [PATCH 0358/2517] Translating by ZTinoZ --- ...e KVM Virtual Environment using Commandline Tools in Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index be433085c3..7e47bac3bb 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -3,6 +3,7 @@ 在我们[KVM系列专题][1]的第四部分,我们将会一起讨论下在命令行界面下来管理KVM环境。我们分别用‘virt-install’和virsh命令行工具来创建并配置虚拟机和存储池,用qemu-img命令行工具来创建并管理磁盘映像。 ![KVM Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/KVM-Management-in-Linux.jpg) + Linux系统的KVM管理 在这篇文章里没有什么新的概念,我们只是用命令行工具重复之前所做过的事情,也没有什么前提条件,都是相同的过程,之前的文章我们都讨论过。 From 07f9b94c061ee2527baa9ecd90eb57e1803c1052 Mon Sep 17 00:00:00 2001 From: sailing Date: Tue, 24 Mar 2015 15:06:50 +0800 Subject: [PATCH 0359/2517] claim an article --- sources/talk/20141211 Open source all over the world.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20141211 Open source all over the world.md b/sources/talk/20141211 Open source all over the world.md index bd306edd5a..130201bff4 100644 --- a/sources/talk/20141211 Open source all over the world.md +++ b/sources/talk/20141211 Open source all over the world.md @@ -1,3 +1,4 @@ +[raywang] Open source all over the world ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUS_OpenSourceExperience_520x292_cm.png) From bf30ebd317519848617aebe79772ffabcbe0a6bb Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 24 Mar 2015 15:07:32 +0800 Subject: [PATCH 0360/2517] Translating by ZTinoZ --- ...onment using Commandline Tools in Linux.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index 7e47bac3bb..64ffeccad2 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -40,7 +40,7 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 ![List All Storage Pools](http://www.tecmint.com/wp-content/uploads/2015/02/List-All-Storage-Pools.png) 列出所有存储池 -**3. 现在是时候来构造存储池了,用以下命令来构造我们刚才定义的存储池。** +**3. 现在我们来构造存储池了,用以下命令来构造我们刚才定义的存储池。** # virsh pool-build Spool1 @@ -81,46 +81,46 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 ### 第二步: 配置存储卷/磁盘映像 ### -现在轮到磁盘映像了,using qemu-img to create new disk image from Spool1. For more details about qemy-img, use the man page. +现在轮到磁盘映像了,用qemu-img命令在Spool1中创建一个新磁盘映像。获取更多细节信息,可以查看man手册。 # man qemu-img -**8. We should specify the qemu-img command “create, check,….etc”, disk image format, the path of disk image you want to create and the size.** +**8. 我们应该在qemu-img命令之后指定“create, check,…”等等操作、磁盘映像格式、你想要创建的磁盘映像的路径和大小。** # qemu-img create -f raw /mnt/personal-data/SPool1/SVol1.img 10G ![Create Storage Volume](http://www.tecmint.com/wp-content/uploads/2015/02/Create-Storage-Volumes.png) -Create Storage Volume +创建存储卷 -**9. By using qemu-img command info, you could get information about your new disk image.** +**9. 通过使用带info的qemu-img命令,你可以获取到你的新磁盘映像的一些信息。** ![Check Storage Volume Information](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Volume-Information.png) -Check Storage Volume Information +查看存储卷信息 -**Warning**: Never use qemu-img to modify images in use by a running virtual machine or any other process; this may destroy the image. +**警告**: 不要用qemu-img命令来修改被运行中的虚拟机或任何其它进程所正在使用的映像,那样映像会被破坏。 -Now its time to create virtual machines in the next step. +现在是时候来创建虚拟机了。 ### 第三步: 创建虚拟机 ### -**10. Now with the last and latest part, we will create virtual machines using virt-istall. The virt-install is a command line tool for creating new KVM virtual machines using the “libvirt” hypervisor management library. For more details about it, use:** +**10. 现在到最后一个环节了,在最后一步中,我们将用virt-istall命令来创建虚拟机。virt-install是一个用来创建新的KVM虚拟机命令行工具,它使用“libvirt”管理程序库。想获取更多细节,同样可以查看man手册。** # man virt-install -To create new KVM virtual machine, you need to use the following command with all the details like shown in the below. +要创建新的KVM虚拟机,你需要用到带以下所有信息的命令。 -- Name: Virtual Machine’s name. -- Disk Location: Location of disk image. -- Graphics : How to connect to VM “Usually be SPICE”. -- vcpu : Number of virtual CPU’s. -- ram : Amount of allocated memory in megabytes. -- Location : Specify the installation source path. -- Network : Specify the virtual network “Usually be vibr00 bridge”. +- Name: 虚拟机的名字。 +- Disk Location: 磁盘映像的位置。 +- Graphics : 怎样连接VM,通常是SPICE。 +- vcpu : 虚拟CPU的数量。 +- ram : 以兆字节计算的已分配内存大小。 +- Location : 指定安装源路径。 +- Network : 指定虚拟网络,通常是virbr0网桥。 # virt-install --name=rhel7 --disk path=/mnt/personal-data/SPool1/SVol1.img --graphics spice --vcpu=1 --ram=1024 --location=/run/media/dos/9e6f605a-f502-4e98-826e-e6376caea288/rhel-server-7.0-x86_64-dvd.iso --network bridge=virbr0 ![Create New Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Virtual-Machines.png) -Create New Virtual Machine +创建新的虚拟机 **11. You will find also a pop-up virt-vierwer window appears to communicate with virtual machine through it.** From b52aa9da24c625c33b64b0ffb36b8ec96fadca5a Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Mar 2015 15:13:47 +0800 Subject: [PATCH 0361/2517] PUB:20150126 4 lvcreate Command Examples on Linux @Vic020 --- ...26 4 lvcreate Command Examples on Linux.md | 41 ++++++++----------- 1 file changed, 18 insertions(+), 23 deletions(-) rename {translated/tech => published}/20150126 4 lvcreate Command Examples on Linux.md (61%) diff --git a/translated/tech/20150126 4 lvcreate Command Examples on Linux.md b/published/20150126 4 lvcreate Command Examples on Linux.md similarity index 61% rename from translated/tech/20150126 4 lvcreate Command Examples on Linux.md rename to published/20150126 4 lvcreate Command Examples on Linux.md index 145f2c52ee..0da451aef2 100644 --- a/translated/tech/20150126 4 lvcreate Command Examples on Linux.md +++ b/published/20150126 4 lvcreate Command Examples on Linux.md @@ -1,39 +1,38 @@ -在linux中4个lvcreate命令例子 +4 个 lvcreate 常用命令举例 ================================================================================ 逻辑卷管理(LVM)是广泛使用的技术,并拥有极其灵活磁盘管理方案。主要包含3个基础命令: -a. 创建物理卷使用**pvcreate** -b. 创建卷组并给卷组增加分区**vgcreate** -c. 创建新的逻辑卷使用**lvcreate** +1. 创建物理卷使用**pvcreate** +2. 创建卷组并给卷组增加分区**vgcreate** +3. 创建新的逻辑卷使用**lvcreate** ![](http://www.ehowstuff.com/wp-content/uploads/2015/01/lvm-diagram1.jpg) -随后的例子着重在已经存在的卷组上使用**lvcreate**创建逻辑卷。**lvcreate**命令可以在来自自由物理扩展池的卷组分配逻辑扩展。通常,逻辑卷可以随意使用底层逻辑卷上的任意空间。修改逻辑卷将释放或重新分配在物理卷空间。这些例子已经在CentOS 5, CentOS 6, CentOS 7, RHEL 5, RHEl 6 和 RHEL 7 版本中测试通过。 +下列例子主要讲述在已经存在的卷组上使用**lvcreate**创建逻辑卷。**lvcreate**命令可以在卷组的可用物理扩展池中分配逻辑扩展。通常,逻辑卷可以随意使用底层逻辑卷上的任意空间。修改逻辑卷将释放或重新分配物理卷的空间。这些例子已经在CentOS 5, CentOS 6, CentOS 7, RHEL 5, RHEl 6 和 RHEL 7 版本中测试通过。 ### 4个lvcreate命令例子 ### -1. 在名为vg_newlvm卷组中创建15G大小的逻辑卷: +1. 在名为vg_newlvm的卷组中创建15G大小的逻辑卷: - [root@centos7 ~]# lvcreate -L 15G vg_newlvm + [root@centos7 ~]# lvcreate -L 15G vg_newlvm -2. 在名为vg_newlvm中创建大小为2500MB的逻辑卷并命名centos7_newvol,创建块设备/dev/vg_newlvm/centos7_newvol: +2. 在名为vg_newlvm的卷组中创建大小为2500MB的逻辑卷,并命名为centos7_newvol,这样就创建了块设备/dev/vg_newlvm/centos7_newvol: - [root@centos7 ~]# lvcreate -L 2500 -n centos7_newvol vg_newlvm + [root@centos7 ~]# lvcreate -L 2500 -n centos7_newvol vg_newlvm -3.可以使用**lvcreate**命令的参数-l,能指定一些特别的逻辑卷扩展大小。也可以使用这个参数以卷组的大小百分比来扩展逻辑卷。这下列的命令创建了centos7_newvol卷组的50%大小的逻辑卷vg_newlvm: +3. 可以使用**lvcreate**命令的参数-l来指定逻辑卷扩展的大小。也可以使用这个参数以卷组的大小百分比来扩展逻辑卷。这下列的命令创建了centos7_newvol卷组的50%大小的逻辑卷vg_newlvm: - [root@centos7 ~]# lvcreate -l 50%VG -n centos7_newvol vg_newlvm + [root@centos7 ~]# lvcreate -l 50%VG -n centos7_newvol vg_newlvm 4. 使用卷组剩下的所有空间创建逻辑卷 - [root@centos7 ~]# lvcreate --name centos7_newvol -l 100%FREE vg_newlvm + [root@centos7 ~]# lvcreate --name centos7_newvol -l 100%FREE vg_newlvm 更多帮助,使用**lvcreate**命令--help选项来查看: [root@centos7 ~]# lvcreate --help ---------- -以下空号中是帮助字面翻译 lvcreate: Create a logical volume(创建逻辑卷) @@ -46,8 +45,8 @@ c. 创建新的逻辑卷使用**lvcreate** [-C|--contiguous {y|n}] [-d|--debug] [-h|-?|--help] - [--ignoremonitoring](忽略监听) - [--monitor {y|n}](监听) + [--ignoremonitoring](忽略监控) + [--monitor {y|n}](监控) [-i|--stripes Stripes [-I|--stripesize StripeSize]] [-k|--setactivationskip {y|n}] [-K|--ignoreactivationskip] @@ -66,7 +65,7 @@ c. 创建新的逻辑卷使用**lvcreate** [--discards {ignore|nopassdown|passdown}] [--poolmetadatasize MetadataSize[bBsSkKmMgG]]] [--poolmetadataspare {y|n}] - [--thinpool ThinPoolLogicalVolume{Name|Path}]精简池逻辑卷 + [--thinpool ThinPoolLogicalVolume{Name|Path}] (精简池逻辑卷) [-t|--test] [--type VolumeType](卷类型) [-v|--verbose] @@ -75,18 +74,14 @@ c. 创建新的逻辑卷使用**lvcreate** [--version] VolumeGroupName [PhysicalVolumePath...] - lvcreate - { {-s|--snapshot} OriginalLogicalVolume[Path] | - [-s|--snapshot] VolumeGroupName[Path] -V|--virtualsize VirtualSize} - {-T|--thin} VolumeGroupName[Path][/PoolLogicalVolume] - -V|--virtualsize VirtualSize}( + -------------------------------------------------------------------------------- via: http://www.ehowstuff.com/4-lvcreate-command-examples-on-linux/ 作者:[skytech][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[Vic020](https://github.com/Vic020) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 45a30b0f3035a98e38269b4db12d404d382f0aab Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 24 Mar 2015 16:13:06 +0800 Subject: [PATCH 0362/2517] =?UTF-8?q?20150324-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Telegram Messenger Application on Linux.md | 132 ++++++++++++++ ...ols to Securely Delete Files from Linux.md | 130 ++++++++++++++ ...and Tricks Every Linux User Should Know.md | 163 ++++++++++++++++++ ...t Open Source Code Repository in github.md | 113 ++++++++++++ ...Interactively Create a Docker Container.md | 99 +++++++++++ ...rips--Print IP address on a given range.md | 60 +++++++ 6 files changed, 697 insertions(+) create mode 100644 sources/share/20150324 How to Install Telegram Messenger Application on Linux.md create mode 100644 sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md create mode 100644 sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md create mode 100644 sources/tech/20150324 How to Host Open Source Code Repository in github.md create mode 100644 sources/tech/20150324 How to Interactively Create a Docker Container.md create mode 100644 sources/tech/20150324 Prips--Print IP address on a given range.md diff --git a/sources/share/20150324 How to Install Telegram Messenger Application on Linux.md b/sources/share/20150324 How to Install Telegram Messenger Application on Linux.md new file mode 100644 index 0000000000..0d4946db1f --- /dev/null +++ b/sources/share/20150324 How to Install Telegram Messenger Application on Linux.md @@ -0,0 +1,132 @@ +How to Install Telegram Messenger Application on Linux +================================================================================ +Telegram is an Instant Messaging (IM) application similar to whatsapp. It has a very large user base. It has a lot of features that differentiate it from other messaging application. + +![Install Telegram in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Install-Telegram-in-Linux.png) +Telegram Messenger for Linux + +This article aims at making you aware of telegram application followed by detailed installation instructions on Linux Box. + +#### Features of Telegram #### + +- Implementation for mobile devices +- Available for Desktop. +- Application Program Interface (API) of Telegram can be Accessed by third party developers. +- Available for Android, iphone/ipad, Windows Phone, Web-Version, PC, Mac and Linux +- The above application provides Heavily Encrypted and self destruct messages. +- Lets you access your message from multiple devices and platform. +- The overall processing and message delivery is lightening fast. +- Distributed server across the globe for security and speed. +- Open API and Free Protocol +- NoAds, No Subscription charge. – Free forever. +- Powerful – No limit to media and chats +- Several security measures that make it safe from Hackers. +- Reply to Specific message in group. Mention @username to notify multiple users in group. + +#### Why Telegram? #### + +When Applications like whatsapp and other IM are providing almost same things in bag, why should someone opt for Telegram? + +Well Availability of API to third party developer is enough to say. Moreover availability for PC which means you won’t have to struggle typing message using your mobile, but you can use your PC and that is pretty more than sufficient. + +Also The option to connect on remote locations, Co-ordinate – Group of upto 200 Members, Sync all your devices, Send – Documents of all kind, Encrypt message, Self destruction of message, Storage of Media in Cloud, Build own tool on freely available API and what not. + +**Testing Environment** + +We have used Debian GNU/Linux, x86_64 architecture to test it and the overall process went very smooth for us. Here what we did stepwise. + +### Installation of Telegram Messenger in Linux ### + +First go to the official Telegram site, and download Telegram source package ([tsetup.0.7.23.tar.xz][1]) for Linux system or you may use following wget command to download directly. + + # wget https://updates.tdesktop.com/tlinux/tsetup.0.7.23.tar.xz + +Once package has been downloaded, unpack the tarball and switch from current working directory to the extracted directory. + + # tar -xf tsetup.0.7.23.tar.xz + # cd Telegram/ + +Next, execute the binary file ‘Telegram’ from the command line as shown below. + + # ./Telegram + +1. The first Impression. Click “START MESSAGING”. + +![Start Messaging](http://www.tecmint.com/wp-content/uploads/2015/03/Start-Messaging.jpeg) +Start Messaging + +2. Enter Your phone Number. Click “NEXT”. If you have not registered for telegram before this, using the same number as entered above you will get a warning that you don’t have a telegram account yet. Click “Register Here”. + +![Signup for Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Register.png) +Signup for Telegram + +3. After submitting your phone number, telegram will send you a verification code, shortly. You need to Enter it. + +![Telegram Verification Code](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Verfication-Code.png) +Telegram Verification Code + +4. Enter your First_Name, Last_name and pics and click “SIGNUP”. + +![Enter Account Details](http://www.tecmint.com/wp-content/uploads/2015/03/Enter-Account-Details.jpeg) +Enter Account Details + +5. After account creation, I got this interface. Everything seems at its place, even when I am new to telegram Application. The interface is really simple. + +![Telegram Interface](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Interface.jpeg) +Telegram Interface + +6. Click Add a contact and Enter Their first_name, last_name and Phone number. Click create when done!. + +![Add New Telegram Contact](http://www.tecmint.com/wp-content/uploads/2015/03/Add-New-Telegram-Contact.png) +Add New Telegram Contact + +7. If the contact you added is not on telegram already, You get a warning message and telegram will acknowledge you when your contact joins telegram. + +![Telegram Contact Notification](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Contact-Notification.jpeg) +Telegram Contact Notification + +8. As soon as the contact joins telegram you get a message (pop-out like) that reads [YOUR_CONTACT] joined telegram. + +9. A formal chat window on Linux Machine. Nice experience… + +![Telegram Contact Join Message](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Contact-Join-Message.jpeg) +Telegram Contact Join Message + +10. At the same time, I’ve tried messaging from my android mobile device, the interface looks similar on both. + +![Telegram Mobile Interface](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Mobile-Interface.png) +Telegram Mobile Interface + +11. Telegram settings page. You have a lot of options to configure. + +![Telegram Settings](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Settings.png) +Telegram Settings + +12. About Telegram. + +![About Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/About-Telegram.jpeg) +About Telegram + +#### Less Interesting Points #### + +- Telegram usage protocol MTProto Mobile protocol. +- Released Initially for iPhone in the year 2013 (August 14).. +- People Behind this Amazing Project: Pavel and Nikolai Durov.. + +That’s all for now. I’ll be here again with another interesting article you will love to read. I take the pleasure on behalf of Tecmint to thank all our valuable readers and critics who made us stand where we are now through continuous self evolving process. Keep Connected! Keep Commenting. Share if you care for us. + +- [https://telegram.org/][2] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-telegram-in-linux/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:https://tdesktop.com/linux +[2]:https://telegram.org/ \ No newline at end of file diff --git a/sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md b/sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md new file mode 100644 index 0000000000..f66f54247d --- /dev/null +++ b/sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md @@ -0,0 +1,130 @@ +4 Tools to Securely Delete Files from Linux +================================================================================ +Any computer user with normal level skill set knows that any data removed from computer system can be recovered later with little bit of efforts. This is a good thing in the scenario when you have accidentally deleted your critical data. But in most cases, you don't want your private data to be recovered easily. Whenever we remove anything, the operating system deletes just the index of the particular data. It means that data is still there somewhere on the disk, this method is insecure, as any smart computer hacker can use any good data recovery tool to easily recover your deleted data. Linux users utilizes the well know “**rm**” command to remove data from their operating system, but “rm” command works in the conventional fashion. Data removed using this command can be recovered by special file recovery tools. + +Let’s see how we can safely and completely remove files/folders from our Linux system. The methods mentioned below remove data completely so it becomes very hard for recovery tools to find traces of the actual data and recover it. + +### Secure-Delete ### + +Secure-Delete is a set of tools for Linux operating system and they provide advanced techniques for permanent removal of files. Once Secure-Delete has been installed on any Linux system, it provides following four commands: + +- srm +- smem +- sfill +- sswap + +Run following command in the terminal to install it in ubuntu: + + sudo apt-get install secure-delete + +![secure delete](http://blog.linoxide.com/wp-content/uploads/2015/03/secure-delete.png) + +Run following command to install it in RHEL, Fedora or Centos: + + sudo yum install secure-delete + +“**srm**” command works similarly to “rm” command, but instead of just deleting the file, it first overwrites it multiple times with some random data and then removes the file permanently. The syntax for this command is pretty simply, just specify the file or directory to remove and it will take care of the task. + + sudo srm /home/aun/Documents/xueo/1.png + +"**sfill**" checks the specified partition/directories for space marked as free or available, and then uses its algorithm to fill it up with some random data. In this way it ensures that there are no more recoverable files/folders on the partition. + + sudo sfill /home + +"**sswap**" command is used to securely wipe your swap partitions. Swap partition is used to store data for running programs. First of all find out your swap partition by running the following command: + + cat /proc/swaps + +Example output of above command is show below: + + aun@eagle:~$ cat /proc/swaps + Filename Type Size Used Priority + /dev/sda5 partition 2084860 71216 -1 + +From here, you can see that swap is set to which partition, and then securely clean it by running the following command. Replace the "/dev/sda5" part with your partition name. + + sudo sswap /dev/sda5 + +“**smem**” is used to clean the contents of memory, its true that RAM contents are cleaned when system is rebooted or powered off, but some residual traces of data still remain in the memory. This command provides secure memory cleaning, simly run smem command on the terminal. + + smem + +### Shred ### + +"shred" command destroys files/folder’s contents in a way that it is impossible to recover. It keeps overwriting the files with randomly generated data patterns so in this way it becomes very hard to recover any data from them even if hackers or thief uses high level of data recovery tools/equipments. Shred is installed by default on all Linux distributions, if you want, you can find its installation path by running following command: + + aun@eagle:~$ whereis shred + + shred: /usr/bin/shred /usr/share/man/man1/shred.1.gz + +Run following command to remove file using shred utility. + + shred /home/aun/Documents/xueo/1.png + +Run following command to securely remove any partition using shred ; Replace partition name with your desired partition. + + shred /dev/sda5 + +Shred by default overwrites file with random contents 25 times. If you want it to overwrite file more than this, simply specify the desired number with "shred -n" option. + + shred -n 100 filename + +If you want to truncate and remove file after overwriting, use "shred -u" option + + shred -u filename + +### dd ### + +This command is originally used for Disk Cloning. It is used to copy contents of one partition or disk to another. But it is also used for securely wiping out the contents of a hard disk or partitions. Run following command to overwrite your current data with random data.You don't need to install dd command, all Linux distributions include this command already. + + sudo dd if=/dev/random of=/dev/sda + +You can also overwrite the contents of hard disk or partitions by simply replacing everything with “zero”. + + sudo dd if=/dev/zero of=/dev/sda + +### Wipe ### + +Wipe was originally developed to securely erase files from magnetic media. This command line utility writes special patterns to the files repeatedly. It uses fsync() call and/or the O_SYNC bit to force disk access. It uses Gutmann algorithm for repeated writes. You can remove contents of single file, folder or entire hard disk with this command, but whole hard disk format using wipe command will take good amount of time. The installation and use of this utility is pretty easy. + +Install wipe on ubuntu by running the following command on the terminal. + + sudo aptitude install wipe + +![Wipe Linux](http://blog.linoxide.com/wp-content/uploads/2015/03/wipe.png) + +Install Wipe in Redhat Linux, Centos or Fedora by running the following command: + + sudo yum install wipe + +Once the installation is complete, run following command on the terminal to get complete list of its available options: + + man wipe + +Remove any file or directory as: + + wipe filename + +Securely remove your tmp partition by running following command: + + wipe -r /tmp + +Use following command to remove contents of complete partition (replace partition name with your desired partition). + + wipe /dev/sda1 + +### Conclusion ### + +We hope you find this article useful, the privacy of your data is critical, its important to have such secure file removal utilities installed on your system so you may be able to remove your private data without fear of being recovered easily. All of the above mentioned tools are pretty lightweight, they take minimum system resources to run, and does not affect performance of your system in anyway. Enjoy! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/security/delete-files-permanatly-linux/ + +作者:[Aun Raza][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ \ No newline at end of file diff --git a/sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md b/sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md new file mode 100644 index 0000000000..9878cc8cee --- /dev/null +++ b/sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md @@ -0,0 +1,163 @@ +7 Quirky ‘ls’ Command Tricks Every Linux User Should Know +================================================================================ +We have covered most of the things on ‘ls‘ command in last two articles of our Interview series. This article is the last part of the ‘ls command‘ series. If you have not gone through last two articles of this series you may visit the links below. + +注:以下三篇都做过源文,看看翻译了没有,如果发布了可适当改链接地址 +- [15 Basic ‘ls’ Command Examples in Linux][] +- [15 Interview Questions on Linux “ls” Command – Part 1][] +- [10 Useful ‘ls’ Command Interview Questions – Part 2][] + +![7 Quirky ls Command Tricks](http://www.tecmint.com/wp-content/uploads/2015/03/ls-command-tricks.jpg) +7 Quirky ls Command Tricks + +### 1. List the contents of a directory with time using various time styles. ### + +To list the contents of a directory with times using style, we need to choose any of the below two methods. + + # ls -l –time-style=[STYLE] (Method A) + +**Note** – The above switch (`--time` style must be run with switch `-l`, else it won’t serve the purpose). + + # ls –full-time (Method B) + +Replace `[STYLE]` with any of the below option. + + full-iso + long-iso + iso + locale + +%H:%M:%S:%D + +**Note** – In the above line H(Hour), M(Minute), S(Second), D(Date) can be used in any order. + +Moreover you just choose those relevant and not all options. E.g., `ls -l --time-style=+%H` will show only hour. + +`ls -l --time-style=+%H:%M:%D` will show Hour, Minute and date. + + # ls -l --time-style=full-iso + +![ls Command Full Time Style](http://www.tecmint.com/wp-content/uploads/2015/03/ls-Command-Full-Time-Style.gif) +ls Command Full Time Style + + # ls -l --time-style=long-iso + +![Long Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Long-Time-Listing-Format.gif) +Long Time Style Listing + + # ls -l --time-style=iso + +![Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Local-Time-Style-Listing.gif) +Time Style Listing + + # ls -l --time-style=locale + +![Locale Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Hour-Mintue-Time-Style-Listing.gif) +Locale Time Style Listing + + # ls -l --time-style=+%H:%M:%S:%D + +![Date and Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Full-Time-Style-Listing.gif) +Date and Time Style Listing + + # ls --full-time + +![Full Style Time Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Full-Style-Time-Listing.gif) + +Full Style Time Listing + +### 2. Output the contents of a directory in various formats such as separated by commas, horizontal, long, vertical, across, etc. ### + +Contents of directory can be listed using ls command in various format as suggested below. + +- across +- comma +- horizontal +- long +- single-column +- verbose +- vertical + + # ls –-format=across + # ls --format=comma + # ls --format=horizontal + # ls --format=long + # ls --format=single-column + # ls --format=verbose + # ls --format=vertical + +![Listing Formats of ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-command-Listing-Formats.gif) +Listing Formats of ls Command + +### 3. Use ls command to append indicators like (/=@|) in output to the contents of the directory. ### + +The option `-p` with ‘ls‘ command will server the purpose. It will append one of the above indicator, based upon the type of file. + + # ls -p + +![Append Indicators to Content](http://www.tecmint.com/wp-content/uploads/2015/03/Append-Indicators.gif) +Append Indicators to Content + +### 4. Sort the contents of directory on the basis of extension, size, time and version. ### + +We can use options like `--extension` to sort the output by extension, size by extension `--size`, time by using extension `-t` and version using extension `-v`. + +Also we can use option `--none` which will output in general way without any sorting in actual. + + # ls --sort=extension + # ls --sort=size + # ls --sort=time + # ls --sort=version + # ls --sort=none + +![Sort Listing of Content by Options](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Content-by-Extensions.gif) +Sort Listing of Content by Options + +### 5. Print numeric UID and GID for every contents of a directory using ls command. ### + +The above scenario can be achieved using flag -n (Numeric-uid-gid) along with ls command. + + # ls -n + +![Print Listing of Content by UID and GID](http://www.tecmint.com/wp-content/uploads/2015/03/Print-UID-GID-of-Contents.gif) +Print Listing of Content by UID and GID + +### 6. Print the contents of a directory on standard output in more columns than specified by default. ### + +Well ls command output the contents of a directory according to the size of the screen automatically. + +We can however manually assign the value of screen width and control number of columns appearing. It can be done using switch ‘`--width`‘. + + # ls --width 80 + # ls --width 100 + # ls --width 150 + +![List Content Based on Window Sizes](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-By-More-Column.gif) +List Content Based on Window Sizes + +**Note**: You can experiment what value you should pass with width flag. + +### 7. Include manual tab size at the contents of directory listed by ls command instead of default 8. ### + + # ls --tabsize=[value] + +![List Content by Table Size](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-by-Table-Size.gif) +List Content by Table Size + +**Note**: Specify the `[Value]=` Numeric value. + +That’s all for now. Stay tuned to Tecmint till we come up with next article. Do not forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-ls-command-tricks/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ +[2]:http://www.tecmint.com/ls-command-interview-questions/ +[3]:http://www.tecmint.com/ls-interview-questions/ \ No newline at end of file diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md new file mode 100644 index 0000000000..8749f0b0e3 --- /dev/null +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -0,0 +1,113 @@ +How to Host Open Source Code Repository in github +================================================================================ +Hi all, today we will be learning how to host Source Code of Open Source Software in the repository hosted by github.com . GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features. It provides a workplace to host powerful collaboration, code review, and code management for open source and private projects. Unlike Git, which is strictly a command-line tool, GitHub provides a web-based graphical interface and desktop as well as mobile integration. GitHub offers both paid plans for private repositories and free accounts, which are usually used to host open-source software projects. + +![github universe logo](http://blog.linoxide.com/wp-content/uploads/2015/03/github-universe.jpg) + +It is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Anyone can host their software's source code in github's repository for the use, contribution, sharing, issue tracking and many more by millions of people across the globe. Here are some easy and quick steps to easily host software's source code. + +### 1. Creating a new Github Account ### + +First of all, open your favorite browser and go to Github's homepage url ie [github][1]. Then, the homepage will be opened as shown below. + +![Github Homepage](http://blog.linoxide.com/wp-content/uploads/2015/03/github-homepage.png) + +Now, after the homepage has been opened, please fill form shown to sign up for a new github account. + +After the you entered the valid information required for sign up, you'll be redirected to the plan choosing step. We have 5 plans listed in this page. One can choose the plan according to their requirement. Here, we'll go for a free plan. So, click on Choose to the Free plan and click on Finish Sign up. If we are planning to create an organization then, we need to tick on Help me setup an organization next. + +![choosing plan](http://blog.linoxide.com/wp-content/uploads/2015/03/choosing-plan.png) + +### 2. Creating a New Repository ### + +After we have successfully signed up a new account or logged in to Github, we'll now need to create a new Repository to get started. + +Click on **(+)** button which is located at the top right near the account id. Then Click on New Repository . + +![Add new repository](http://blog.linoxide.com/wp-content/uploads/2015/03/create-new-repository.png) + +Now, after clicking on add a new repository, we'll now be directed to the page where we'll need to enter the required information. + +![adding repository information](http://blog.linoxide.com/wp-content/uploads/2015/03/adding-information-repository.png) + +Now, after entering the required information about the new repository, we'll need to click on green Create repository button. + +After it is done, we'll get to see something similar like this image. + +![repository github](http://blog.linoxide.com/wp-content/uploads/2015/03/repository-github.png) + +### 3. Uploading an existing Project ### + +If we want to share our existing project on Github, we'll surely need to push the codes to the repository we created. To do so, we'll first need to install git in our Linux machine. As I am running Ubuntu 14.04 LTS in my machine, I'll need to run **apt** manger to install it. + + $ sudo apt-get install git + +![installing git](http://blog.linoxide.com/wp-content/uploads/2015/03/install-git.png) + +Now, as git is ready, we are now ready to upload the codes. + +**Note**: To avoid errors, do not initialize the new repository with **README**, license, or gitignore files. You can add these files after your project has been pushed to GitHub. + +In Terminal, we'll need to change the current working directory to your local project then initialize the local directory as a Git repository/ + + $ git init + +We'll then add the files in our new local repository. This stages them for the first commit. + + $ git add . + +Now, we'll need to commit the files that we've staged in our local repository. + + $ git commit -m 'First commit' + +![git commit](http://blog.linoxide.com/wp-content/uploads/2015/03/git-commit.png) + +In Terminal, we'll add the URL for the remote repository where our local repostory will be pushed. + + $ git remote add origin remote Repository url + $ git remote -v + +![adding remote url](http://blog.linoxide.com/wp-content/uploads/2015/03/adding-remote-url.png) + +Note: Please do replace remote Repository url to the url of the remote repo. + +Now, to push the changes in our local repository to GitHub's repo we'll need to run as below and enter the required credential for the repository. + + $ git push origin master + +![pushing repo](http://blog.linoxide.com/wp-content/uploads/2015/03/pushing-repo.png) + +### Cloning a Repo ### + +If we want to download a code repository from github straight to our local drives with a single command then, we can simply use git clone command which will clone the current directory to the remote repository. + + $ git clone https://github.com/aruntechgeek/linspeed.git + +![cloning repo](http://blog.linoxide.com/wp-content/uploads/2015/03/cloning-repo.png) + +Please change the above url to the repository you want to clone from. + +### Updating a Change ### + +If we made changes to our code and want to push them to our remote repository then after changing the changes, we should run the following commands inside that directory. + + $ git add . + $ git commit -m "Updating" + $ git push + +### Conclusion ### + +Hurray! We have successfully hosted our Project Source Code in Github repository. Github is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Millions of awesome Open Source projects are hosted in github. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Github :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/usr-mgmt/host-open-source-code-repository-github/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://github.com/ \ No newline at end of file diff --git a/sources/tech/20150324 How to Interactively Create a Docker Container.md b/sources/tech/20150324 How to Interactively Create a Docker Container.md new file mode 100644 index 0000000000..6f8e1a6433 --- /dev/null +++ b/sources/tech/20150324 How to Interactively Create a Docker Container.md @@ -0,0 +1,99 @@ +How to Interactively Create a Docker Container +================================================================================ +Hi everyone, today we'll learn how we can interactively create a docker container using a docker image. Once we start a process in Docker from an Image, Docker fetches the image and its Parent Image, and repeats the process until it reaches the Base Image. Then the Union File System adds a read-write layer on top. That read-write layer, the information about its Parent Image and some other information like its unique id, networking configuration, and resource limits is called a **Container**. Containers has states as they can change from **running** to **exited** state. A container with state as **running** includes a tree of processes running on the CPU, isolated from the other processes running on the host where as **exited** is the state of the file system and its exit value is preserved. You can start, stop, and restart a container with it. + +Docker Technology has brought a remarkable change in the field of IT enabling cloud service for sharing applications and automating workflows, enabling apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. In this article, we'll build CentOS Instance in which we'll host a website running under Apache Web Server. + +Here is quick and easy tutorial on how we can create a container in an interactive method using an interactive shell. + +### 1. Running a Docker Instance ### + +Docker initially tries to fetch and run the required image locally and if its not found in local host the it pulls from the [Docker Public Registry Hub][1] . Here. we'll fetch and create a fedora instance in a Docker Container and attach a bash shell to the tty. + + # docker run -i -t fedora bash + +![Downloading Fedora Base Image](http://blog.linoxide.com/wp-content/uploads/2015/03/downloading-fedora-base-image.png) + +### 2. Installing Apache Web Server ### + +Now, after our Fedora base image with instance is ready, we'll now gonna install Apache Web Server interactively without creating a Dockerfile for it. To do so, we'll need to run the following commands in a terminal or shell. + + # yum update + +![Updating Fedora Base Image](http://blog.linoxide.com/wp-content/uploads/2015/03/updating-fedora-base-image.png) + + # yum install httpd + +![Installing httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-httpd2.png) + + # exit + +### 3. Saving the Image ### + +Now, we'll gonna save the changes we made into the Fedora Instance. To do that, we'll first gonna need to know the Container ID of the Instance. To get that we'll need to run the following command. + + # docker ps -a + +![Docker Running Container](http://blog.linoxide.com/wp-content/uploads/2015/03/docker-running-container.png) + +Then, we'll save the changes as a new image by running the below command. + + # docker commit c16378f943fe fedora-httpd + +![committing fedora httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/committing-fedora-httpd.png) + +Here, the changes are saved using the Container ID and image name fedora-httpd. To make sure that the new image is running or not, we'll run the following command. + + # docker images + +![view docker images](http://blog.linoxide.com/wp-content/uploads/2015/03/view-docker-images.png) + +### 4. Adding the Contents to the new image ### + +As we have our new Fedora Apache image running successfully, now we'll want to add the web contents which includes our website to Apache Web Server so that our website will run successfully out of the box. To do so, we'll need to create a new Dockerfile which will handle the operation from copying web contents to allowing port 80. To do so, we'll need to create a file Dockerfile using our favorite text editor as shown below. + + # nano Dockerfile + +Now, we'll need to add the following lines into that file. + + FROM fedora-httpd + ADD mysite.tar /tmp/ + RUN mv /tmp/mysite/* /var/www/html + EXPOSE 80 + ENTRYPOINT [ "/usr/sbin/httpd" ] + CMD [ "-D", "FOREGROUND" ] + +![configuring Dockerfile](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-Dockerfile.png) + +Here, in above Dockerfile, the web content which we have in mysite.tar will get automatically extracted to /tmp/ folder. Then, the entire site will move to the Apache Web root ie /var/www/html/ and the expose 80 will open port 80 so that the website will be available normally. Then, the entrypoint is set to /usr/sbin/httpd so that the Apache Server will execute. + +### 5. Building and running a Container ### + +Now, we'll build our Container using the Dockerfile we just created in order to add our website on it. To do so, we'll need to run the following command. + + # docker build -rm -t mysite . + +![Building mysite Image](http://blog.linoxide.com/wp-content/uploads/2015/03/building-mysite-image.png) + +After building our new container, we'll want to run the container using the command below. + + # docker run -d -P mysite + +![Running mysite Container](http://blog.linoxide.com/wp-content/uploads/2015/03/running-mysite-container.png) + +### Conclusion ### + +Finally, we've successfully built a Docker Container interactively. In this method, we build our containers and image directly via interactive shell commands. This method is quite easy and quick to build and deploy our images and containers. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/interactively-create-docker-container/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://registry.hub.docker.com/ \ No newline at end of file diff --git a/sources/tech/20150324 Prips--Print IP address on a given range.md b/sources/tech/20150324 Prips--Print IP address on a given range.md new file mode 100644 index 0000000000..14cd04c4a0 --- /dev/null +++ b/sources/tech/20150324 Prips--Print IP address on a given range.md @@ -0,0 +1,60 @@ +Prips – Print IP address on a given range +================================================================================ +prips is a tool that can be used to print all of the IP address on a given range. It can enhance the usability of tools that are made to work on only one host at a time. + +### Install Prips on ubuntu ### + +Open the terminal and run the following command + + sudo apt-get install prips + +### Using prips ### + +### prips syntax ### + + prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] start end + prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] CIDR-block + +### Available Options ### + +The prips tool accepts the following command-line options: + +- -c -- Print the range in CIDR notation. +- -d delim -- Set the delimiter to the character with ASCII code delim where 0 <= delim <= 255. +- -e -- Exclude ranges from the output. +- -f format -- Set the format of addresses (hex, dec, or dot). +- -i incr -- Set the increment to ‘x'. + +### Prips Examples ### + +Display all the addresses in a reserved subnet: + + prips 192.168.32.0 192.168.32.255 + +The same, using CIDR notation: + + prips 192.168.32/24 + +Display only the usable addresses in a class A reserved subnet using a space instead of a newline for a delimiter: + + prips -d 32 10.0.0.1 10.255.255.255 + +Display every fourth address in a weird block: + + prips -i 4 192.168.32.7 192.168.33.5 + +Determine the smallest CIDR block containing two addresses: + + prips -c 192.168.32.5 192.168.32.11 + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/prips-print-ip-address-on-a-given-range.html + +作者:[ruchi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file From 9e9491f89b6516c5cecd7ab60813c2d4df08f5ce Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Mar 2015 16:28:37 +0800 Subject: [PATCH 0363/2517] PUB:20150126 Improve system performance by moving your log files to RAM Using Ramlog @soooogreen --- ...ving your log files to RAM Using Ramlog.md | 107 +++++++++++++++++ ...ving your log files to RAM Using Ramlog.md | 111 ------------------ 2 files changed, 107 insertions(+), 111 deletions(-) create mode 100644 published/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md delete mode 100644 translated/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md diff --git a/published/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md b/published/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md new file mode 100644 index 0000000000..3ad03ac708 --- /dev/null +++ b/published/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md @@ -0,0 +1,107 @@ +性能优化:使用ramlog将日志文件转移到内存中 +================================================================================ +Ramlog 以系统守护进程的形式运行。在系统启动时它创建虚拟磁盘(ramdisk),将 /var/log 下的文件复制到虚拟磁盘中,同时把虚拟磁盘挂载为/var/log。然后所有的日志就会更新到虚拟磁盘上。而当 ramlog 重启或停止时,需要记录到硬盘上的日志就会保留在目录/var/log.hdd中。而关机的时候,(ramdisk上的)日志文件会重新保存到硬盘上,以确保日志一致性。Ramlog 2.x默认使用tmpfs文件系统,同时也可以支持ramfs和内核ramdisk。使用rsync(译注:Linux数据镜像备份工具)这个工具来同步日志。 + +注意:如果突然断电或者内核崩溃(kernel panic)时,没有保存进硬盘的日志将会丢失。 + +如果你拥有够多的可用内存,而又想把日志放进虚拟磁盘,就安装ramlog吧。它是笔记本用户、带有UPS的系统或是直接在flash中运行的系统的优良选择,可以节省日志的写入时间。 + +Ramlog的运行机制以及步骤如下: + +1. Ramlog 由第一个守护进程(这取决于你所安装过的其它守护进程)启动。 + +2. 然后创建目录/var/log.hdd并将其硬链至/var/log。 + +3. 如果使用的是tmpfs(默认)或者ramfs 文件系统,将其挂载到/var/log上。 + +4. 而如果使用的是内核ramdisk,ramdisk会在/dev/ram9中创建,并将其挂载至/var/log。默认情况下ramlog会占用所有ramdisk的内存,其大小由内核参数"ramdisk_size"指定。 + +5. 接着其它的守护进程被启动,并在ramdisk中更新日志。Logrotate(译注:Linux日志轮替工具)和 ramdisk 配合的也很好。 + +6. 重启(默认一天一次)ramlog时,目录/var/log.hdd将借助rsync与/var/log保持同步。日志自动保存的频率可以通过cron(译注:Linux例行性工作调度)来控制。默认情况下,ramlog 的调度任务放置在目录/etc/cron.daily下。 + +7. 系统关机时,ramlog在最后一个守护进程关闭之前关闭。 + +8. 在ramlog关闭期间,/var/log.hdd中的文件将被同步至/var/log,接着/var/log和/var/log.hdd都被卸载,然后删除空目录/var/log.hdd。 + +**注意:- 此文仅面向高级用户** + +### 在Ubuntu中安装Ramlog ### + +首先需要用以下命令,从[这里][1]下载.deb安装包: + + wget http://www.tremende.com/ramlog/download/ramlog_2.0.0_all.deb + +下载ramlog\_2.0.0\_all.deb安装包完毕,使用以下命令进行安装: + + sudo dpkg -i ramlog_2.0.0_all.deb + +这一步会完成整个安装,现在你需要运行以下命令: + + sudo update-rc.d ramlog start 2 2 3 4 5 . stop 99 0 1 6 . + +现在,在更新sysklogd的初始化顺序,使之能在ramlog停止运行前正确关闭: + + sudo update-rc.d -f sysklogd remove + + sudo update-rc.d sysklogd start 10 2 3 4 5 . stop 90 0 1 6 . + +然后重启系统: + + sudo reboot + +系统重启完毕,运行'ramlog getlogsize'来获取你当前的/var/log的空间大小。在此基础之上多分配40%的空间,确保ramdisk有足够的空间(这整个都将作为ramdisk的空间大小)。 + +编辑引导配置文件,如/etc/grub.conf,、/boot/grub/menu.lst 或/etc/lilo.conf(译注:具体哪个配置文件视不同引导加载程序而定),给你的当前内核的新增选项 'ramdisk_size=xxx' ,其中xxx是ramdisk的空间大小。 + +### 配置Ramlog ### + +基于deb的系统中,Ramlog的配置文件位于/etc/default/ramlog,你可以在该配置文件中设置以下变量: + + RAMDISKTYPE=0 + # 取值: + # 0 -- tmpfs (可被交换到交换分区) -- 默认 + # 1 -- ramfs (旧内核不能设置最大空间大小, + # 不能被交换到交换分区,和 SELinux 不兼容) + # 2 -- 老式的内核 ramdisk + TMPFS_RAMFS_SIZE= + # 可以用于 tmpfs 或 ramfs 的最大内存大小 + # 这个值可以是百分比或数值(单位是 Mb),例如: + # TMPFS_RAMFS_SIZE=40% + # TMPFS_RAMFS_SIZE=100m + # 该值为空表示 tmpfs/ramfs 的大小是全部内存的 50% + # 更多选项可以参考 ‘man mount' 中的‘Mount options for tmpfs' 一节 + # (补充,在较新的内核中,ramfs 支持大小限制, + # 虽然 man 中说没有这个挂载选项) + # 该选项仅用于 RAMDISKTYPE=0 或 1 时 + KERNEL_RAMDISK_SIZE=MAX + #以 kb 为单位指定的内核 ramdisk 大小,或者使用 MAX 来使用整个 ramdisk。 + #该选项仅用于 RAMDISKTYPE=2 时 + LOGGING=1 + # 0=关闭, 1=打开 。记录自身的日志到 /var/log/ramdisk + LOGNAME=ramlog + # 自身的日志文件名 (用于 LOGGING=1时) + VERBOSE=1 + # 0=关闭, 1=打开 (设置为 1时,启动或停止失败时会调用 teststartstop 将细节 + # 写到日志中) + +### 在Ubuntu中卸载ramlog ### + +打开终端运行以下命令: + + sudo dpkg -P ramlog + +注意:如果ramlog卸载之前仍在运行,需要重启系统完成整个卸载工作。 + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/improve-system-performance-by-moving-your-log-files-to-ram-using-ramlog.html + +作者:[ruchi][a] +译者:[soooogreen](https://github.com/soooogreen) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix +[1]:http://www.tremende.com/ramlog/download/ramlog_2.0.0_all.deb diff --git a/translated/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md b/translated/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md deleted file mode 100644 index 66f5d72f87..0000000000 --- a/translated/tech/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md +++ /dev/null @@ -1,111 +0,0 @@ -系统性能优化支招:使用Ramlog将日志文件转移到RAM -================================================================================ -Ramlog以系统守护进程的形式存在。它系统启动的时候创建了虚拟磁盘(ramdisk),将文件从目录/var/log复制到虚拟磁盘中,同时把虚拟磁盘挂载为/var/log。接着更新虚拟磁盘上所有的日志。硬盘上的日志会保留在目录/var/log中,直到ramlog重启或停止时被更新。而关机的时候,(ramdisk上的)日志文件会重新保存到硬盘上,以确保日志一致性。Ramlog 2.x默认使用tmpfs文件系统,同时也可以支持ramfs和内核ramdisk。使用rsync(译注:Linux数据镜像备份工具)这个工具来同步日志。 - -注意:没有保存进硬盘的日志将在断电或者内核混乱(kernel panic)的情况下丢失。 - -如果你拥有空间足够的可用内存,而又想把日志放进虚拟磁盘,就安装ramlog吧。它是笔记本用户、UPS系统或是直接在flash中运行的系统节省写周期的优良选择。 - -Ramlog的运行机制以及步骤: - -1.Ramlog在第一个守护进程(这取决于你所安装过的其它守护进程)的基础上启动。 - -2.然后创建目录/var/log.hdd并将其硬链至/var/log。 - -3.如果使用的是tmpfs(默认)或者ramfs之一的文件系统,将其挂载到/var/log上。 - -而如果使用的是内核ramdisk,ramdisk将在/dev/ram9中创建,并将挂载至/var/log。默认情况下ramlog会占用所有ramdisk的内存,其大小由内核参数"ramdisk_size"指定。 - -5.接着其它的守护进程被启动,并在ramdisk中更新日志。Logrotate(译注:Linux日志轮替工具)也是在ramdiks之上运行。 - -6.重启(默认一天一次)ramlog时,目录/var/log.hdd将借助rsync与/var/log保持同步。日志自动保存的频率可以通过cron(译注:Linux例行性工作调度)来控制。默认情况下,ramlog文件放置在目录/etc/cron.daily下。 - -7.系统关机时,ramlog在最后一个守护进程关闭之前关闭。 - -在ramlog关闭期间,/var/log.hdd中的文件将被同步至/var/log,接着/var/log和/var/log.hdd都被卸载,然后删除空目录/var/log.hdd。 - -**注意:- 此文仅面向高级用户** - -### 在Ubuntu中安装Ramlog ### - -首先需要用以下命令,从[这里][1]下载.deb安装包: - - wget http://www.tremende.com/ramlog/download/ramlog_2.0.0_all.deb - -下载ramlog_2.0.0_all.deb安装包完毕,使用以下命令进行安装: - - sudo dpkg -i ramlog_2.0.0_all.deb - -这一步会完成整个安装,现在你需要运行以下命令: - - sudo update-rc.d ramlog start 2 2 3 4 5 . stop 99 0 1 6 . - -#现在,在初始状态下升级sysklogd,使之能在ramlog停止运行前正确关闭: - - sudo update-rc.d -f sysklogd remove - - sudo update-rc.d sysklogd start 10 2 3 4 5 . stop 90 0 1 6 . - -然后重启系统: - - sudo reboot - -系统重启完毕,运行'ramlog getlogsize'获取/var/log的空间大小。在此基础之上多分配40%的空间,确保ramdisk有足够的空间(这整个都将作为ramdisk的空间大小)。 - -编辑引导配置文件,如/etc/grub.conf,、/boot/grub/menu.lst 或/etc/lilo.conf(译注:具体哪个配置文件视不同引导加载程序而定),kernel参数新增项'ramdisk_size=xxx'以更新当前内核,其中xxx是ramdisk的空间大小。 - -### 配置Ramlog ### - -基于deb的系统中,Ramlog的配置文件位于/etc/default/ramlog,你可以在该目录下设置以下变量: - -Variable (with default value): - -Description: - - RAMDISKTYPE=0 - # Values: - # 0 -- tmpfs (can be swapped) -- default - # 1 -- ramfs (no max size in older kernels, - # cannot be swapped, not SELinux friendly) - # 2 -- old kernel ramdisk - TMPFS_RAMFS_SIZE= - #Maximum size of memory to be used by tmpfs or ramfs. - # The value can be percentage of total RAM or size in megabytes -- for example: - # TMPFS_RAMFS_SIZE=40% - # TMPFS_RAMFS_SIZE=100m - # Empty value means default tmpfs/ramfs size which is 50% of total RAM. - # For more options please check ‘man mount', section ‘Mount options for tmpfs' - # (btw -- ramfs supports size limit in newer kernels - # as well despite man says there are no mount options) - # It has only effect if RAMDISKTYPE=0 or 1 - KERNEL_RAMDISK_SIZE=MAX - #Kernel ramdisk size in kilobytes or MAX to use entire ramdisk. - #It has only effect if RAMDISKTYPE=2 - LOGGING=1 - # 0=off, 1=on Logs can be found in /var/log/ramdisk - LOGNAME=ramlog - # name of the ramlog log file (makes sense if LOGGING=1) - VERBOSE=1 - # 0=off, 1=on (if 1, teststartstop puts detials - # to the logs and it is called after start or stop fails) - -### 在Ubuntu中卸载ramlog ### - -打开终端运行以下命令: - - sudo dpkg -P ramlog - -注意:如果ramlog卸载之前仍在运行,需要重启系统完成整个卸载工作。 - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/improve-system-performance-by-moving-your-log-files-to-ram-using-ramlog.html - -作者:[ruchi][a] -译者:[soooogreen](https://github.com/soooogreen) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ubuntugeek.com/author/ubuntufix -[1]:http://www.tremende.com/ramlog/download/ramlog_2.0.0_all.deb From 036c5860747ad4452cfda67f25ebd56761e23724 Mon Sep 17 00:00:00 2001 From: LouisWei Date: Tue, 24 Mar 2015 20:46:45 +0800 Subject: [PATCH 0364/2517] translated wi-cuckoo LLAP --- ... Smart phones Using Prey Tool in Ubuntu.md | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 translated/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md diff --git a/translated/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md b/translated/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md new file mode 100644 index 0000000000..2d9a5e4485 --- /dev/null +++ b/translated/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md @@ -0,0 +1,70 @@ +Ubuntu中,使用Prey定位被盗的笔记本与手机 +=============================================================================== +Prey是一款跨平台的开源工具,可以帮助你找回被盗的笔记本,台式机,平板和智能手机。它已经获得了广泛的流行,声称帮助召回了成百上千台丢失的笔记本和智能手机。Prey的使用特别简单,首先安装在你的笔记本或者手机上,当你的设备不见了,用你的账号登入Prey网站,并且标记你的设备为“丢失”。只要小偷将设备接入网络,Prey就会马上发送设备的地理位置给你。如果你的笔记本有摄像头,它还会拍下小偷。 + +Prey占用很小的系统资源;你不会对你的设备运行有任何影响。你也可以配合其他你已经在设备上安装的防盗软件使用。Prey采用安全加密的通道,在你的设备与Prey服务器之间进行数据传输。 + +### 在Ubuntu上安装并配置Prey ### + +让我们来看看如何在Ubuntu上安装和配置Prey,需要提醒的是,在配置过程中,我们必须到Prey官网进行账号注册。一旦完成上述工作,Prey将会开始监视的设备了。免费的账号最多可以监视三个设备,如果你需要添加更多的设备,你就需要购买合适的的套餐了。 + +想象一下Prey多么流行与被广泛使用,它现在已经被添加到了官方的软件库中了。这意味着你不要往软件包管理器添加任何PPA。很简单地,登录你的终端,运行以下的命令来安装它: + + sudo apt-get install prey + +![Install Prey](http://blog.linoxide.com/wp-content/uploads/2015/03/Install-Prey.png) + +![Install Prey 1](http://blog.linoxide.com/wp-content/uploads/2015/03/Install-Prey-1.png) + +Prey是十分轻巧的软件,只使用了系统几兆的空间,安装完成后,从Application >> Prey启动,之后它会询问你进行相关配置。 + +选择“New User”,如果你是第一次使用的话。 + +![Prey New User](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-New-User.png) + +第二步实际上就是官网注册的流程。请提供你的用户名,邮箱地址和密码,来申清一个免费的账号。 + +![Register Prey](http://blog.linoxide.com/wp-content/uploads/2015/03/Register-Prey.png) + +点击“Apply”完成,所有工作搞定,现在你的计算机被Prey保护了。 + +![Prey Configuration](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Configuration.png) + +登录你最新建立的[Prey 账号][1],你就应该可以在“Devices”菜单下看见你的设备信息了。 + +![Prey Web Login](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Web-Login.png) + +只要你的笔记本或者任何其他设备丢失了,就登录你的Prey网站账号,然后点击“Set Device to Missing”选项修改设备状态为“missing”。 + +![Prey Missing Page](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-1.png) + +从这里选择定时报告,并点击“Yes,my device is missing”。定时报告选项是指一段时间间隔后,软件会更新并发送给你设备的地理位置。它还会从网页界面那发邮件给你,只要设备的状态改变了。 + +![Prey Missing Email](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-2.png) + +而一旦被盗的设备接入了互联网,Prey就会马上发送报告给你,包括设备的地理位置和IP地址。 + +![Prey Found Report](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-3.png) + +点击报告链接,你应该会看到设备的地理位置和IP地址。 + +![Prey Final](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Final.png) + +Prey有一个明显的不足。它需要你的设备接入互联网才会发送地理位置给你,如果小偷比较聪明,在接入网络前将你的设备磁盘格式化了,那么你就永远不会收到设备被发现的报告了。但是这里仍然是有一个方法克服这个不足,确保添加一个BIOS密码,并且禁用从可移除的设备里启动系统。 + +### 结论 ### + +这是一款小巧,非常有用的安全保护应用,可以让你在一个地方追踪你所有的设备,尽管不完美,但是仍然提供了找回被盗设备的机会。它在Linux,Windows和Mac平台上无缝运行。以上就是Prey完整使用的所有细节。 + +------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/anti-theft-application-prey-ubuntu/ + +作者:[Aun Raza][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:https://preyproject.com/ From 3d717b2e9dfa78a43c6743e18f50e2244939c623 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Mar 2015 21:26:10 +0800 Subject: [PATCH 0365/2517] PUB:20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux @geekpi --- ...ID--A Graphical Wi-Fi Scanner for Linux.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md (58%) diff --git a/translated/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md b/published/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md similarity index 58% rename from translated/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md rename to published/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md index 5935a4545c..e9db8a1172 100644 --- a/translated/tech/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md +++ b/published/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md @@ -1,14 +1,14 @@ -LinSSID - 一款Linux下的图形化Wi-Fi扫描器 +LinSSID:一款Linux下的图形化Wi-Fi扫描器 ================================================================================ ### 介绍 ### -如你所知,**LinSSID** 是一款可以用于寻找可用无线网络的图形化软件。它完全开源,用C++写成,使用了Linux无线工具、Qt5、Qwt6.1,它在外观和功能上与**Inssider** (MS Windows)相近。 +你可能知道,**LinSSID** 是一款可以用于寻找可用无线网络的图形化软件。它完全开源,用C++写成,使用了Linux wireless tools、Qt5、Qwt6.1,它在外观和功能上与**Inssider** (MS Windows 下的)相近。 ### 安装 ### 你可以使用源码安装,如果你使用的是基于DEB的系统比如Ubuntu和LinuxMint等等,你也可以使用PPA安装。 -你可用从[this link][1]这个链接下载并安装LinSSID。 +你可用从[这个][1]下载并安装LinSSID。 这里我门将使用PPA来安装并测试这个软件。 @@ -22,22 +22,21 @@ LinSSID - 一款Linux下的图形化Wi-Fi扫描器 安装完成之后,你可以从菜单或者unity中启动。 -你将被要求输入管理员密码。 +你需要输入管理员密码。 -![Password required for iwlist scan_001](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Password-required-for-iwlist-scan_001.png) +![Password required for iwlist scan_001](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/Password-required-for-iwlist-scan_001.png) 这就是LinSSID的界面。 -![LinSSID_002](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/LinSSID_002.png) +![LinSSID_002](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/LinSSID_002.png) -现在选择你想要连接无线网络的网卡,比如这里是wlan0.点击Play按钮来搜寻wi-fi网络列表。 +现在选择你想要连接无线网络的网卡,比如这里是wlan0,点击Play按钮来搜寻wi-fi网络列表。 几秒钟之后,LinSSID就会显示wi-fi网络了。 -![LinSSID_003](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/LinSSID_003.png) - -如你在上面的截屏中所见,LinSSID显示SSID名、MAC ID、通道、隐私、加密方式、信号和协议等等信息。当然,你可以让LinSSID显示更多的选项,比如安全、带宽等等。要显示这些,进入**View**菜单并选择需要的选项。同样,它显示了不同通道中的信号随着时间信号强度的变化。最后,它可以工作在2.4Ghz和5Ghz通道上。 +![LinSSID_003](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/LinSSID_003.png) +如你在上面的截屏中所见,LinSSID显示SSID名、MAC ID、通道、隐私、加密方式、信号和协议等等信息。当然,你可以让LinSSID显示更多的选项,比如安全设置、带宽等等。要显示这些,进入**View**菜单并选择需要的选项。同样,它显示了不同的通道中的信号随着时间信号强度的变化。最后,它可以工作在2.4Ghz和5Ghz通道上。 就是这样。希望这个工具对你有用。 @@ -53,7 +52,7 @@ via: http://www.unixmen.com/linssid-graphical-wi-fi-scanner-linux/ 作者:[SK][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b8699044b595ba6f4ae38b43a7048bbf17a62a34 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Mar 2015 21:45:50 +0800 Subject: [PATCH 0366/2517] PUB:20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10 @geekpi --- ...To Install KDE Plasma 5.2 In Ubuntu 14.10.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) rename {translated/tech => published}/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md (64%) diff --git a/translated/tech/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md b/published/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md similarity index 64% rename from translated/tech/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md rename to published/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md index 0e6a83f60f..28a49ca44e 100644 --- a/translated/tech/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md +++ b/published/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md @@ -2,11 +2,11 @@ ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Plasma_Ubuntu_1410.jpg) -[KDE][1] Plasma 5.2已经[发布][2],在本篇中我们将看到如何在Ubuntu 14.10 上安装KDE Plasma 5.2。 +[KDE][1] Plasma 5.2已经[发布][2]一段时间了,在本篇中我们将看到如何在Ubuntu 14.10 上安装KDE Plasma 5.2。 -Ubuntu的默认桌面环境Unity很漂亮还有很多特性。但是如果你问任何有经验的Linux用户关于桌面自定义,他的回答将是KDE。KDE在定制上是王者并且它得到流行大概是由于Ubuntu有官方的KDE版本,也就是Kubuntu[3]。 +Ubuntu的默认桌面环境Unity很漂亮还有很多特性,但是如果你问任何有经验的Linux用户关于桌面定制能力,他的回答将是KDE。KDE在定制上是王者并且它得到流行大概是由于Ubuntu有官方的KDE版本,也就是Kubuntu[3]。 -对于Ubuntu(或者任何其他的Linux系统而言)的一个好消息是它没有绑定任何特定的桌面环境。你可以安装额外的桌面环境并且可以在不同的桌面环境间切换。早先我们已经了解了桌面环境的安装。 +对于Ubuntu(或者任何其他的Linux系统)而言的一个好消息是它们没有绑定在任何特定的桌面环境上,你可以安装额外的桌面环境并在不同的桌面环境间切换。早先我们已经了解如下的桌面环境的安装。 - [如何在Ubuntu 14.04中安装Mate桌面][4] - [如何在Ubuntu 14.04中安装Cinnamon桌面][5] @@ -17,25 +17,24 @@ Ubuntu的默认桌面环境Unity很漂亮还有很多特性。但是如果你问 ### 如何在Ubuntu 14.10 上安装KDE Plasma 5.2 ### -在Ubuntu 14.10上安装Plasma之前,你要知道这会下载大概1GB的内容。因此在安装KDE之前要考虑速度和数据包。我们下载所使用的PPA是KDEs社区官方提供的。在终端中使用下面的命令: +在Ubuntu 14.10上安装Plasma之前,你要知道这会下载大概1GB的内容。因此在安装KDE之前要考虑速度和数据存放空间。我们下载所使用的PPA是KDE社区官方提供的。在终端中使用下面的命令: sudo apt-add-repository ppa:kubuntu-ppa/next-backports sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install kubuntu-plasma5-desktop plasma-workspace-wallpapers -During the installation, it will as you to choose the default display manager. I chose the default LightDM. Once installed, restart the system. At the login, click on the Ubuntu symbol beside the login field. In here, select Plasma. 在安装中,我们要选择默认的显示管理器。我选择的是默认的LightDM。安装完成后,重启系统。在登录时,点击登录区域旁边的Ubuntu图标。这里选择Plasma。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/Select_Plasma_KDE_Ubuntu.jpeg) -你现在就登录到KDE Plasma了。这里有一个KDE Plasma 5.2在Ubuntu 14.10下的截图 +你现在就登录到KDE Plasma了。这里有一个KDE Plasma 5.2在Ubuntu 14.10下的截图: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/KDE_Plasma_Desktop.jpeg) -### 从Ubuntu卸载KDE Plasma ### +### 从Ubuntu中卸载KDE Plasma ### -如果你想要还原更改,使用下面的命令从Ubuntu 14.10中卸载KDE Plasma。 +如果你想要卸载它,使用下面的命令从Ubuntu 14.10中卸载KDE Plasma。 sudo apt-get install ppa-purge sudo apt-get remove kubuntu-plasma5-desktop @@ -47,7 +46,7 @@ via: http://itsfoss.com/install-kde-plasma-ubuntu-1410/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7ae7b70bf22bab20713ae717b6124673c22bf1dd Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 24 Mar 2015 22:04:35 +0800 Subject: [PATCH 0367/2517] PUB:20150205 How To Use Smartphones Like Weather Conky In Linux @FSSlc --- ...Smartphones Like Weather Conky In Linux.md | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150205 How To Use Smartphones Like Weather Conky In Linux.md (70%) diff --git a/translated/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md b/published/20150205 How To Use Smartphones Like Weather Conky In Linux.md similarity index 70% rename from translated/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md rename to published/20150205 How To Use Smartphones Like Weather Conky In Linux.md index 962becea1b..8eb8647d4e 100644 --- a/translated/tech/20150205 How To Use Smartphones Like Weather Conky In Linux.md +++ b/published/20150205 How To Use Smartphones Like Weather Conky In Linux.md @@ -2,7 +2,7 @@ ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Use_Weather_Conky_Linux.jpeg) -智能手机都拥有一些平滑融入手机外观的天气小插件,幸亏有了 Flair Weather Conky,你便可以**在你的 Linux 桌面中拥有像智能手机一样的天气外观**。我们将使用一个 GUI 工具[Conky Manager 在 Linux 中轻松地管理 Conky][1]。那就先让我们看看如何在 Ubuntu 14.10,14.04、Linux Mint 17 及其他 Linux 发行版本中安装 Conky Manager 吧。 +智能手机都拥有一些平滑地融入手机外观的天气小插件,现在幸亏有了 Flair Weather Conky,你便可以**在你的 Linux 桌面中拥有像智能手机一样的天气外观**。我们将使用一个 GUI 工具[Conky Manager 在 Linux 中轻松地管理 Conky][1]。那就先让我们看看如何在 Ubuntu 14.10,14.04、Linux Mint 17 及其他 Linux 发行版本中安装 Conky Manager 吧。 ### 安装 Conky Manager ### @@ -16,7 +16,7 @@ ### 确保 `curl` 已被安装 ### -请确保 [curl][2] 已被安装。(如果没有安装它,)可以使用下面的命令来安装: +请确保 [curl][2] 已被安装。如果没有安装它,可以使用下面的命令来安装: sudo apt-get install curl @@ -30,15 +30,15 @@ #### 步骤 1: #### -同你在 Ubuntu 14.04 中安装主题一样,在你的家目录中应该有一个 `.conky` 目录。假如你使用命令行,则不需要让我来告诉你如何找到这个目录。对于新手,请用文件管理器切换到你的家目录下,并按 `Ctrl+H` 来 [在 Ubuntu 中显示隐藏文件][4]。在这里查找 `.conky` 文件夹,假如没有这个文件夹,则创建一个。 +同你在 Ubuntu 14.04 中安装主题一样,在你的家目录中应该有一个 `.conky` 目录。假如你使用命令行,我想我不需要告诉你如何找到这个目录。对于新手,请用文件管理器切换到你的家目录下,并按 `Ctrl+H` 来 [在 Ubuntu 中显示隐藏文件][4]。在这里查找 `.conky` 文件夹,假如没有这个文件夹,则创建一个。 #### 步骤 2: #### -在 `.conky` 目录中,解压下载到的 Flair Weather 文件。请注意在默认情况下它会自动解压到一个名为 `.conky` 目录。所以请进入这个目录,将 Flair Weather 文件夹从中取出,然后将它粘贴到真正的 `.conky` 目录下。 +在 `.conky` 目录中,解压下载到的 Flair Weather 文件。请注意在默认情况下它会自动解压到一个名为 `.conky` 目录下。所以请进入这个目录,将其中的 Flair Weather 文件夹从中取出,然后将它粘贴到真正的 `.conky` 目录下。 #### 步骤 3: #### -Flair Weather 使用 Yahoo 的天气服务,但它不能自动地识别你的位置。你需要手动地编辑它。到[Yahoo 天气][5] 网页,然后通过键入你的城市/Pin 码来得到你所在城市的 位置 ID号。你可以从网页地址栏中取得位置 ID 号。 +Flair Weather 使用 Yahoo 的天气服务,但它不能自动地识别你的位置。你需要手动地编辑它。到[Yahoo 天气][5] 网页,然后通过键入你的城市/Pin 码来得到你所在城市的位置 ID号。你可以从网页地址栏中取得位置 ID 号。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Yahoo_Weather_Location_Code.jpeg) @@ -46,7 +46,7 @@ Flair Weather 使用 Yahoo 的天气服务,但它不能自动地识别你的 打开 Conky Manager,它应该能够读取新安装的 Conky 脚本。这里有两款样式可用,黑色主题或亮丽主题。你可以选择你偏爱的那一款。当你选择后,你就可以在桌面上看到 conky 的显示了。 -在 Flair Weather 中,默认位置被设定为 Melbourne。你必须手动编辑 conky 文件。 +在 Flair Weather 中,默认位置被设定为 Melbourne。你必须手动编辑 conky 文件来修改。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Using_Weather_Conky_Ubuntu.jpeg) @@ -56,44 +56,49 @@ Flair Weather 使用 Yahoo 的天气服务,但它不能自动地识别你的 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Edit_Conky.jpeg) -在上面查找的相同位置,假如你将 C 替换为 F,则温度的单位将从摄氏温标改为华氏温标 。不要忘了重启 Conky 来查看已经做出的修改。 +在上面查找的相同位置,假如你将`u=c` 替换为`u=f`,则温度的单位将从摄氏温标改为华氏温标 。不要忘了重启 Conky 来查看已经做出的修改。 #### 可能的故障排除 #### -(注:这一小节在 md 文件中没有,原文新添加的。) 在 Ubuntu 14.04 和 Ubuntu 14.10 中,假如你发现 Conky 展示的时间有重叠现象,则请编辑 conky 脚本。查找下面的这些行: + ``` ## cairo-compmgr own_window_type override own_window_argb_visual no ``` + 然后将内容更换为下面的这些行: + + ``` ## cairo-compmgr own_window_type dock own_window_argb_visual no ``` + 保存更改并重启 conky。这就应该解决了这个问题。感谢 Jesse(这个 Conky 脚本的开发者)给我们提供了这个解决方法和为其他相关问题给予的支持。 -#### 尝试尝试 #### +### 尝试一下 ### 在这篇文章中,我们实际上学到了不少东西。我们见证了如何轻松地使用任何 Conky 脚本,如何编辑脚本以及如何使用 Conky Manager 来达到不同的目的。我希望这些对你有用。 -需要留心的是,Ubuntu 14.10 用户可能会看到重叠的时间数字。请在开发者 Jesse 绝妙的[Google + 主页][6] 中报告任何相关的问题。(注:这句在 md 文件中的内容与原文有差异,我按照原文翻译,并加上了 链接) +需要留心的是,Ubuntu 14.10 用户可能会看到重叠的时间数字。请在开发者 Jesse 绝妙的[Google + 主页][6] 中报告任何相关的问题。 + +我已经向你展示了在我的系统上 Flair Weather conky 外观的截图。现在是该你尝试它并炫耀你的桌面的时间了。 -我已经向你展示了在我的系统上 Flair Weather conky 外观的截图。现在该你尝试它并炫耀你的桌面的时间了。 -------------------------------------------------------------------------------- via: http://itsfoss.com/weather-conky-linux/ 作者:[Abhishek][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/Abhishek/ -[1]:http://itsfoss.com/conky-gui-ubuntu-1304/ +[1]:http://www.linux.cn/article-3434-1.html [2]:http://www.computerhope.com/unix/curl.htm [3]:http://speedracker.deviantart.com/art/Flair-Weather-Conky-Made-for-Conky-Manager-510130311 [4]:http://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ From 81b5022cbd2657886092de46dab1805f477854ac Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Tue, 24 Mar 2015 23:23:00 +0800 Subject: [PATCH 0368/2517] Delete 20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md --- ... Smart phones Using Prey Tool in Ubuntu.md | 71 ------------------- 1 file changed, 71 deletions(-) delete mode 100644 sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md diff --git a/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md b/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md deleted file mode 100644 index d1a881f189..0000000000 --- a/sources/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md +++ /dev/null @@ -1,71 +0,0 @@ -translating wi-cuckoo LLAP -Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu -================================================================================ -Prey is an open source, cross platform tool which helps recover your stolen laptops, desktops, tablet computers and smart phones. It has gained vast popularity and has claimed to help recover hundreds of missing laptops and smart phones. The working of this tool is pretty simple, install it on your Laptop or smart phone, and if your device goes missing, login the Prey website with your credentials and mark your device as “Missing” there. As soon as the thief connects your device with internet, it will immediately send you the Geo location of your device. If your laptop is having webcam, it will also capture the screenshot of the thief. - -Prey consumes minimum system resources; it does not affect your device’s performance in any way. You can also use it alongside any other anti-theft application you had installed on your device. It uses secure and encrypted channels to communicate your device data with Prey servers. - -### Installing and configuring Prey on Ubuntu ### - -Let’s see how we can install and configure Prey on ubuntu, note that during configuration process, we will have to register an account at Prey official website. Once done, it will be able to monitor your devices. Its free account monitors up-to 3 devices, if you need to add more devices to its watch list, you need to purchase appropriate plan. - -Considering the popularity and use of Prey, it has been added to the official ubuntu repository now. That means you don’t need to add any additional PPA to the package manager. Simply launch your terminal application and run the following command to install it: - - sudo apt-get install prey - -![Install Prey](http://blog.linoxide.com/wp-content/uploads/2015/03/Install-Prey.png) - -![Install Prey 1](http://blog.linoxide.com/wp-content/uploads/2015/03/Install-Prey-1.png) - -It is a very lightweight application, uses only few MB of space on the system, once installation is completed, launch it from Applications >> Prey and it will ask you for the configuration. - -Choose “New user” if you are using this app for first time. - -![Prey New User](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-New-User.png) - -This second step is actually the process to sign you up on Prey official website. Please provide your username, email address and password for free account. - -![Register Prey](http://blog.linoxide.com/wp-content/uploads/2015/03/Register-Prey.png) - -Hit “Apply” once done, that’s all, your computer is now protected by Prey. - -![Prey Configuration](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Configuration.png) - -Login your newly created [Prey account][1] and you should be able to see your device information there under “Devices” menu. - -![Prey Web Login](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Web-Login.png) - -As soon as your laptop or any other device goes missing, simply login your Prey web account and change the device status to “missing” by clicking “Set Device to Missing” option. - -![Prey Missing Page](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-1.png) - -Choose report frequency from here and hit “Yes, my device is missing”. Report Frequency option is the time interval after which this app will send you status updates for your device location. It will email you as soon as the device status is changed from web interface. - -![Prey Missing Email](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-2.png) - -As soon as your stolen device is connected to the internet, it will immediately send you report, containing your device's Geo whereabouts and IP address. - -![Prey Found Report](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Missing-3.png) - -Click the report link and you should be able to see your device’s Geo location and IP address. - -![Prey Final](http://blog.linoxide.com/wp-content/uploads/2015/03/Prey-Final.png) - -There is one known drawback in Prey , It needs your device to be connected to internet for sending Geo location, if thief is smart enough to format your device hard disk before connecting it to the network, then you’ll never get report of its recovery. But there is still a work around to overcome this drawback, make sure to add a BIOS password and disable booting the system from removable devices. - -### Conclusion ### - -It is a small, very useful security application which lets you track all of your devices on a single place, although not perfect, but still provides good level of recovery chances for your stolen devices. It runs seamlessly on Linux, Windows and Mac operating system. Here are details about Prey Pro plans. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/anti-theft-application-prey-ubuntu/ - -作者:[Aun Raza][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunrz/ -[1]:https://preyproject.com/ From 4c29f6179cf78a6a9b97c7e57e28245b2237b015 Mon Sep 17 00:00:00 2001 From: theo-l Date: Tue, 24 Mar 2015 19:26:54 -0300 Subject: [PATCH 0369/2517] translating --- ...sed by Applications in a Linux System with Trickle.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md index 446e4f8ec7..84b1928ed1 100644 --- a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md +++ b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md @@ -43,7 +43,7 @@ In this article we will explain how to limit the network bandwidth used by appli #### 前提条件 #### 1. For RHEL/CentOS 7/6, [enable the EPEL repository][1]. Extra Packages for Enterprise Linux (EPEL) is a repository of high-quality free and open-source software maintained by the Fedora project and is 100% compatible with its spinoffs, such as Red Hat Enterprise Linux and CentOS. Both trickle and ncftp are made available from this repository. - +1. 对于 RHEL/CentOS 7/6, [开启EPEL仓库][1] 2. Install ncftp as follows: # yum update && sudo yum install ncftp [On RedHat based systems] @@ -287,14 +287,19 @@ The following is a trickled.conf sample file in the CentOS 7 client (192.168.0.1 Using this setup, trickled will prioritize SSH connections over FTP transfers. Note that an interactive process, such as SSH, uses smaller time-smoothing values, whereas a service that performs bulk data transfers (FTP) uses a greater value. The smoothing values are responsible for the download and upload speeds in our previous example not matching the exact value specified by the trickled daemon but moving in an interval close to it. ### Conclusion ### - +### 总结 ### In this article we have explored how to limit the bandwidth used by applications using trickle on Fedora-based distributions and Debian / derivatives. Other possible use cases include, but are not limited to: +在该文章中,我们探索了任何使用trickle在基于Fedora发行版和Debian衍生版平台上来限制应用程序的宽带使用.也包含了其他的可能用法,但是不对以下情形进行限制: - Limiting the download speed via a system utility such as [wget][4], or a torrent client, for example. +- 限制系统下载工具的下载速度,例如[wget][4],或 BT客户端. + - Limiting the speed at which your system can be updated via `[yum][5]` (or `[aptitude][6]`, if you’re in a Debian-based system), the package management system. +- - If your server happens to be behind a proxy or firewall (or is the proxy or firewall itself), you can use trickle to set limits on both the download and upload, or communication speed with the clients or the outside. Questions and comments are most welcome. Feel free to use the form below to send them our way. +欢迎提问或留言. -------------------------------------------------------------------------------- From b3d5e20f43912f2229e05de1ac2eb783de0bf559 Mon Sep 17 00:00:00 2001 From: LouisWei Date: Wed, 25 Mar 2015 11:11:22 +0800 Subject: [PATCH 0370/2517] translating wi-cuckoo LLAP --- .../20150324 How to Interactively Create a Docker Container.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150324 How to Interactively Create a Docker Container.md b/sources/tech/20150324 How to Interactively Create a Docker Container.md index 6f8e1a6433..17576ec4f0 100644 --- a/sources/tech/20150324 How to Interactively Create a Docker Container.md +++ b/sources/tech/20150324 How to Interactively Create a Docker Container.md @@ -1,3 +1,4 @@ +translating wi-cuckoo LLAP How to Interactively Create a Docker Container ================================================================================ Hi everyone, today we'll learn how we can interactively create a docker container using a docker image. Once we start a process in Docker from an Image, Docker fetches the image and its Parent Image, and repeats the process until it reaches the Base Image. Then the Union File System adds a read-write layer on top. That read-write layer, the information about its Parent Image and some other information like its unique id, networking configuration, and resource limits is called a **Container**. Containers has states as they can change from **running** to **exited** state. A container with state as **running** includes a tree of processes running on the CPU, isolated from the other processes running on the host where as **exited** is the state of the file system and its exit value is preserved. You can start, stop, and restart a container with it. @@ -96,4 +97,4 @@ via: http://linoxide.com/linux-how-to/interactively-create-docker-container/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:https://registry.hub.docker.com/ \ No newline at end of file +[1]:https://registry.hub.docker.com/ From 2c49973fa63a3656e436fb345128b7bf78a36317 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Wed, 25 Mar 2015 12:20:35 +0800 Subject: [PATCH 0371/2517] Translated --- ...G images from the command line on Linux.md | 58 +++++++++---------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md b/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md index e96abc6f52..6d72a9f5d9 100644 --- a/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md +++ b/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md @@ -1,32 +1,30 @@ - Vic020 - -Linux FAQs with Answers--How to compress JPEG images from the command line on Linux +Linux有问必答--如何使用命令行压缩JPEG图像 ================================================================================ -> **Question**: I have several JPEG photo images I have taken using a digital camera. I would like to optimize and compress the JPEG pictures before uploading them to Dropbox. What is the easiest way to compress JPEG images without losing their quality on Linux? +> **问题**: 我有许多数码照相机拍出来的照片。我想在上传到Dropbox之前,优化和压缩下JPEG图片。有没有什么简单的方法压缩JPEG图片并不损耗他们的质量? -Image resolution of today's picture taking gadgets (e.g., smartphones, digital cameras) keeps increasing. Even 36.3 Megapixel Nikon D800 recently hit the consumer market, and this trend will continue. While modern gadgets continue to produce increasingly high resolution images, we may often want to post-process and compress their sizes before uploading them to a storage-limited and bandwidth-restricted cloud. +如今拍照设备(如智能手机、数码相机)拍出来的图片分辨率越来越大。甚至3630万像素的Nikon D800已经冲入市场,并且这个趋势根本停不下来。如今的拍照设备不断地提高着照片分辨率,使得我们不得不压缩后,再上传到有储存限制、带宽限制的云。 -In fact, there is a way to compress JPEG images easily on Linux. A command-line tool called jpegoptim allows you do "lossless" optimization on JPEG images, so you can compress JPEG pictures without sacrificing their quality. In case your storage or bandwidth budget is really low, jpegoptim allows you to do "lossy" compression as well by adjusting image quality. +事实上,这里有一个非常简单的方法压缩JPEG图像。一个叫“jpegoptim”命令行工具可以帮助你“无损”美化JPEG图像,所以你可以压缩JPEG图片而不至于牺牲他们的质量。万一你的存储空间和带宽预算真的很少,jpegoptim也支持“有损耗”压缩来调整图像大小。 -For those interested in compressing PNG images, refer to [this guideline][1] instead. +如果要压缩PNG图像,参考[this guideline][1]例子。 -### Install Jpegoptim on Linux ### +### 安装jpegoptim ### -To install jpegoptim on Ubuntu, Debian or Linux Mint: +Ubuntu, Debian 或 Linux Mint: $ sudo apt-get install jpegoptim -To install jpegoptim on Fedora: +Fedora: $ sudo yum install jpegoptim -To install jpegoptim on CentOS/RHEL, first enable [EPEL repo][2], and then run: +CentOS/RHEL安装,先开启[EPEL库][2],然后运行下列命令: $ sudo yum install jpegoptim -### Compress JPEG Images Losslessly ### +### 无损压缩jpeg图像 ### -To compress a JPG picture losslessly, simply run: +为了无损地压缩一副JPG图片,使用: $ jpegoptim photo.jpg @@ -34,9 +32,9 @@ To compress a JPG picture losslessly, simply run: photo.jpg 2048x1536 24bit N ICC JFIF [OK] 882178 --> 821064 bytes (6.93%), optimized. -Note that the original input image will be overwritten with a compressed impage. +注意,原始图像会被压缩后图像覆盖。 -If jpegoptim is not able to further optimize an image losselessly, it will skip overwriting it. +如果jpegoptim不能无损美化图像,将不会覆盖 $ jpegoptim -v photo.jpg @@ -44,27 +42,27 @@ If jpegoptim is not able to further optimize an image losselessly, it will skip photo.jpg 2048x1536 24bit N ICC JFIF [OK] 821064 --> 821064 bytes (0.00%), skipped. -If you want to preserve an original image, use "-d" option to specify a target directory. +如果你想保护原始图片,使用"-d"参数指明保存目录 $ jpegoptim -d ./compressed photo.jpg -An compressed image will then be placed (with the same name as the input file) in ./compressed directory. +这样,压缩的图片将会保存在./compressed目录(已同样的输入文件名) -If you want to preserve file creation/modification time, use "-p" option as follows. Then a compressed image will be placed with the same date and time as the original image. +如果你想要保护文件的创建修改时间,使用"-p"参数。这样压缩后的图片会得到与原始图片相同的日期时间。 $ jpegoptim -d ./compressed -p photo.jpg -If you simply check out possible lossless compression ratio without actually compressing it, use "-n" option to "simulate" compression. Then it will simply print results without actually performing compression. +如果你只是想获得无损压缩率,使用"-n"参数来模拟压缩,然后它会打印压缩率。 $ jpegoptim -n photo.jpg -### Compress JPEG Images Lossily ### +### 有损压缩JPG图像 ### -In case you really want to save storage space, you can do lossy compression on large JPEG pictures. +万一你真的需要要保存在云空间上,你可以使用有损压缩JPG图片。 -In this case, use "-m" option, where maximum quality is specified in the range of 0 and 100 (0 is the highest quality, and 100 is the lowest quality). +这种情况下,使用"-m<质量>"选项,质量数范围0到100。(0是最好质量,100是最坏质量) -For example, to compress an image with 50% quality: +例如,用50%质量压缩图片: $ jpegoptim -m50 photo.jpg @@ -72,19 +70,19 @@ For example, to compress an image with 50% quality: photo.jpg 2048x1536 24bit N ICC JFIF [OK] 882178 --> 301780 bytes (65.79%), optimized. -You will get a smaller image at the cost of reduced quality. +在牺牲质量的基础上,将会得到一个更小的图片。 ![](https://farm9.staticflickr.com/8707/16260736234_6d6f1d2434_c.jpg) -### Compress Multiple JPEG Images in a Batch ### +### 一次压缩多张JPEG图像 ### -Often times you need to compress many JPEG image files in a directory. In that case, you can use the following shell script. +最常见的情况是需要压缩一个目录下的多张JPEG图像文件。为了应付这种情况,你可以使用接下里的脚本。 #!/bin/sh - # compress all *.jpg files in the current directory - # and place them in ./compressed directory - # with the same modification date as original files. + # 压缩当前目录下所有*.jpg文件 + # 保存在./compressed目录 + # 并拥有与原始文件同样的修改日期 for i in *.jpg; do jpegoptim -d ./compressed -p "$i"; done -------------------------------------------------------------------------------- @@ -92,7 +90,7 @@ Often times you need to compress many JPEG image files in a directory. In that c via: http://ask.xmodulo.com/compress-jpeg-images-command-line-linux.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[VicYu/Vic020](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c1ef207b0d754f18edbf4b5eadabf4d3bae5a1aa Mon Sep 17 00:00:00 2001 From: Vic___ Date: Wed, 25 Mar 2015 12:21:13 +0800 Subject: [PATCH 0372/2517] moved --- ...-How to compress JPEG images from the command line on Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md (100%) diff --git a/sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md b/translated/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md similarity index 100% rename from sources/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md rename to translated/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md From 948799785f36254cc6c5cd2d7a33f3dce666760d Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 25 Mar 2015 13:18:04 +0800 Subject: [PATCH 0373/2517] transla --- .../tech/20150324 Prips--Print IP address on a given range.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150324 Prips--Print IP address on a given range.md b/sources/tech/20150324 Prips--Print IP address on a given range.md index 14cd04c4a0..d94116599f 100644 --- a/sources/tech/20150324 Prips--Print IP address on a given range.md +++ b/sources/tech/20150324 Prips--Print IP address on a given range.md @@ -1,3 +1,5 @@ +Translating---geekpi + Prips – Print IP address on a given range ================================================================================ prips is a tool that can be used to print all of the IP address on a given range. It can enhance the usability of tools that are made to work on only one host at a time. @@ -57,4 +59,4 @@ via: http://www.ubuntugeek.com/prips-print-ip-address-on-a-given-range.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file +[a]:http://www.ubuntugeek.com/author/ubuntufix From d78be663e1f36d17a11921af0478b88f1005eb2f Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 25 Mar 2015 13:45:11 +0800 Subject: [PATCH 0374/2517] translated --- ...rips--Print IP address on a given range.md | 62 ------------------- ...rips--Print IP address on a given range.md | 60 ++++++++++++++++++ 2 files changed, 60 insertions(+), 62 deletions(-) delete mode 100644 sources/tech/20150324 Prips--Print IP address on a given range.md create mode 100644 translated/tech/20150324 Prips--Print IP address on a given range.md diff --git a/sources/tech/20150324 Prips--Print IP address on a given range.md b/sources/tech/20150324 Prips--Print IP address on a given range.md deleted file mode 100644 index d94116599f..0000000000 --- a/sources/tech/20150324 Prips--Print IP address on a given range.md +++ /dev/null @@ -1,62 +0,0 @@ -Translating---geekpi - -Prips – Print IP address on a given range -================================================================================ -prips is a tool that can be used to print all of the IP address on a given range. It can enhance the usability of tools that are made to work on only one host at a time. - -### Install Prips on ubuntu ### - -Open the terminal and run the following command - - sudo apt-get install prips - -### Using prips ### - -### prips syntax ### - - prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] start end - prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] CIDR-block - -### Available Options ### - -The prips tool accepts the following command-line options: - -- -c -- Print the range in CIDR notation. -- -d delim -- Set the delimiter to the character with ASCII code delim where 0 <= delim <= 255. -- -e -- Exclude ranges from the output. -- -f format -- Set the format of addresses (hex, dec, or dot). -- -i incr -- Set the increment to ‘x'. - -### Prips Examples ### - -Display all the addresses in a reserved subnet: - - prips 192.168.32.0 192.168.32.255 - -The same, using CIDR notation: - - prips 192.168.32/24 - -Display only the usable addresses in a class A reserved subnet using a space instead of a newline for a delimiter: - - prips -d 32 10.0.0.1 10.255.255.255 - -Display every fourth address in a weird block: - - prips -i 4 192.168.32.7 192.168.33.5 - -Determine the smallest CIDR block containing two addresses: - - prips -c 192.168.32.5 192.168.32.11 - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/prips-print-ip-address-on-a-given-range.html - -作者:[ruchi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ubuntugeek.com/author/ubuntufix diff --git a/translated/tech/20150324 Prips--Print IP address on a given range.md b/translated/tech/20150324 Prips--Print IP address on a given range.md new file mode 100644 index 0000000000..a628c1e122 --- /dev/null +++ b/translated/tech/20150324 Prips--Print IP address on a given range.md @@ -0,0 +1,60 @@ +Prips - 打印指定范围内的IP地址 +================================================================================ +prips是一个可以打印出指定范围内所有ip地址的一个工具。它可以增强那些只能同时工作在一个主机上的工具的可用性。 + +### 在ubuntu上安装prips ### + +打开终端并输入下面的命令 + + sudo apt-get install prips + +### 使用prips ### + +### prips语法 ### + + prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] start end + prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] CIDR-block + +### 可用选项 ### + +prips接受下面的命令行选项: + +- -c -- 以CIDR形式打印范围。 +- -d delim -- 用ASCII码作为分隔符,0 <= delim <= 255。 +- -e -- 排除输出的范围。 +- -f format -- 设置地址格式 (16进制, 10进制, 或者dot). +- -i incr -- 设置增长上限 + +### Prips示例 ### + +显示保留的子网内的所有地址: + + prips 192.168.32.0 192.168.32.255 + +同样使用CIDR标示: + + prips 192.168.32/24 + +只显示A类保留子网内所有可用的地址,用空格而不是换行作为分隔符: + + prips -d 32 10.0.0.1 10.255.255.255 + +每块显示4个ip地址: + + prips -i 4 192.168.32.7 192.168.33.5 + +打印包含两个地址的最小CIDR块。 + + prips -c 192.168.32.5 192.168.32.11 + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/prips-print-ip-address-on-a-given-range.html + +作者:[ruchi][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix From cbb77ef8b6fec1153153adce051ab21299c5e28e Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 25 Mar 2015 14:22:39 +0800 Subject: [PATCH 0375/2517] Translating by ZTinoZ --- ...ual Environment using Commandline Tools in Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index 64ffeccad2..3ece220dd5 100644 --- a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -103,7 +103,7 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 ### 第三步: 创建虚拟机 ### -**10. 现在到最后一个环节了,在最后一步中,我们将用virt-istall命令来创建虚拟机。virt-install是一个用来创建新的KVM虚拟机命令行工具,它使用“libvirt”管理程序库。想获取更多细节,同样可以查看man手册。** +**10. 现在到最后一个环节了,在最后一步中,我们将用virt-install命令来创建虚拟机。virt-install是一个用来创建新的KVM虚拟机命令行工具,它使用“libvirt”管理程序库。想获取更多细节,同样可以查看man手册。** # man virt-install @@ -122,17 +122,17 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 ![Create New Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Virtual-Machines.png) 创建新的虚拟机 -**11. You will find also a pop-up virt-vierwer window appears to communicate with virtual machine through it.** +**11. 你会看到弹出一个virt-vierwer窗口,像是在通过它在与虚拟机通信。** ![Booting Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Booting-Virtual-Machine.jpeg) -Booting Virtual Machine +虚拟机启动程式 ![Installation of Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Installation-of-Virtual-Machine.jpeg) -Installation of Virtual Machine +虚拟机安装过程 ### 结论 ### -This is the latest part of our KVM tutorial, we haven’t covered everything of course. It a shot to scratch the KVM environment so its your turn to search and keep hands dirty using this nice resources. +以上就是我们KVM教程的最后一部分了,当然我们还没有完全覆盖到全部,我们只是打了个擦边球,所以现在该轮到你来好好地利用这些丰富的资源来做自己想做的事了。 - [KVM Getting Started Guide][2] - [KVM Virtualization Deployment and Administration Guide][3] From 4167a92860f6c4ad2d72a7360c239a0b5829e2bf Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 25 Mar 2015 14:23:59 +0800 Subject: [PATCH 0376/2517] Finish the translation by ZTinoZ --- ...ge KVM Virtual Environment using Commandline Tools in Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md (100%) diff --git a/sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/translated/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md similarity index 100% rename from sources/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md rename to translated/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md From ca951ee6a2e0f209f81ef27d710b288f00a595d3 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 25 Mar 2015 22:15:51 +0800 Subject: [PATCH 0377/2517] PUB:20150115 Get back your privacy and control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @zpl1025 鸿篇巨制!辛苦啦,翻译得非常好~~ --- ...50115 Get back your privacy and control.md | 145 +++++++++--------- 1 file changed, 73 insertions(+), 72 deletions(-) rename {translated/tech => published}/20150115 Get back your privacy and control.md (80%) diff --git a/translated/tech/20150115 Get back your privacy and control.md b/published/20150115 Get back your privacy and control.md similarity index 80% rename from translated/tech/20150115 Get back your privacy and control.md rename to published/20150115 Get back your privacy and control.md index 9695c1f3de..5c78a23751 100644 --- a/translated/tech/20150115 Get back your privacy and control.md +++ b/published/20150115 Get back your privacy and control.md @@ -1,42 +1,42 @@ -在短短几个小时里拿回自己数据的隐私和控制权:为自己和朋友们搭建私有云 +权威指南:构建个人私有云,拿回你的数据隐私的控制权! ================================================================================ -8年里40'000多次搜索!这是我的Google搜索历史。你的呢?(可以在[这里][1]自己找一下)有经过这么长时间积累下来的这么多数据点,Google已经能非常精确的推测你对什么感兴趣,曾经的想法,担忧过的事情,以及从你第一次获得Google帐号后这些年里所有这些的变化。 +8年里40000多次搜索!这是我的Google搜索历史。你的呢?(可以在[这里][1]自己找一下)有经过这么长时间积累下来的这么多数据点,Google已经能非常精确的推测你对什么感兴趣、曾经的想法、担忧过的事情,以及从你第一次获得Google帐号后这些年里所有这些的变化! -### 很多非常私人的信息不受自己控制地存储在世界范围内的服务器上 ### +## 很多非常私人的信息不受自己控制地存储在世界范围内的服务器上 ## -比如说你也像我一样从2006年到2013年都是Gmail用户,意味着你收到了30'000+的电子邮件以及在这7年里写了差不多5000封电子邮件。这些发送或收到的电子邮件里有很多是非常私人的,私人到你甚至不希望自己的家人或好友能系统地查看。也许你还写过一些草稿邮件,因为最后一分钟改变主意而从没发出去。但是尽管你从未发出去,这些邮件仍然保存在服务器上的某个地方。结论是,说Google服务器比你最亲密的朋友或家人都更了解你的个人生活一点也不过分。 +比如说你也像我一样从2006年到2013年都是Gmail用户,意味着你收到了30000封以上的电子邮件,以及在这7年里写了差不多5000封电子邮件。这些发送或收到的电子邮件里有很多是非常私人的,私人到你甚至不希望自己的家人或好友可以系统地查看。也许你还写过一些草稿邮件,因为最后一分钟改变主意而从没发出去。但是尽管你从未发出去,这些邮件仍然保存在服务器上的某个地方。结论是,说Google服务器比你最亲密的朋友或家人都更了解你的个人生活一点也不过分。 -从统计数据来看,可以很安全地赌你拥有一部智能手机。如果不使用联系人应用的话手机将基本没法用,而它默认会将你的联系人信息保存到Google服务器上的Google联系人里。所以,现在Google不仅知道了你的电子邮件,还有了你的离线联系人:你喜欢打给谁,谁来过电话,你发过短信给谁,以及发了些什么。你也不需要听我的片面之词,可以自己检查一下,看看你开放给类似Google Play服务的一些应用的权限,用来读取来电信息以及收到的短信。你是否还会用到手机里自带的日历应用?除非你在设置日程的时候明确地去掉,那么Google将精确地知道你将要做什么,一天里的每个时段,每一天,每一年。用iPhone代替Android手机也是一样的,只是Apple会代替Google来掌握你的往来邮件,联系人和日程计划。 +从统计数据来看,我可以很保险地打赌你拥有一部智能手机。如果不使用联系人应用的话手机将基本没法用,而它默认会将你的联系人信息保存到Google服务器上的Google联系人里。所以,现在Google不仅知道了你的电子邮件,还有了你的离线联系人:你喜欢打给谁、谁来过电话、你发过短信给谁,以及发了些什么。你也不需要听我的片面之词,可以自己检查一下,看看你开放给类似Google Play服务的一些应用的权限,用来读取来电信息以及收到的短信。你是否还会用到手机里自带的日历应用?除非你在设置日程的时候明确地去掉同步,那么Google将精确地知道你将要做什么,一天里的每个时段、每一天、每一年。用iPhone代替Android手机也是一样的,只是Apple会代替Google来掌握你的往来邮件、联系人和日程计划。 -你是否还会非常小心地同步自己的联系人信息,在你朋友,同事或家人换工作或换服务商的时候更新他们的电子邮件地址和手机号?这给Google提供了一副你社交网络的非常精确的,最新的图片。还有你非常喜欢手机的GPS功能,经常配合Google地图使用。这意味着Google不仅能从日程里知道你在干什么,还知道你在哪儿,住在哪儿,在哪儿工作。然后再关联用户之间的GPS位置信息,GOogle还能知道你现在可能正在和哪些人来往。 +你是否还会非常小心地同步自己的联系人信息,在你朋友,同事或家人换工作或换服务商的时候更新他们的电子邮件地址和手机号?这给Google提供了一副你的社交网络的非常精确的、最新的描绘。还有你非常喜欢手机的GPS功能,经常配合Google地图使用。这意味着Google不仅能从日程里知道你在干什么,还知道你在哪儿、住在哪儿、在哪儿工作。然后再关联用户之间的GPS位置信息,Google还能知道你现在可能正在和哪些人来往。 -### 这种泄漏自己私人信息的日常爱好会以一种甚至没人能够预测的方式影响你的生活 ### +## 这种泄漏自己私人信息的日常爱好会以一种甚至没人能够预测的方式影响你的生活 ## -总结一下,如果你是一个普通的因特网用户,Google拥有过去差不多10年里你最新的,深度的信息,关于你的兴趣,忧虑,热情,疑问。它还收集了一些你很私人的信息(电子邮件,短信),精确到小时的你的日常活动和位置,一副你社交网络的高品质图片。关于你的如此私密的数据,很可能已经超越了你最亲密的朋友,家人或爱人对你的了解。 +总结一下,如果你是一个普通的因特网用户,Google拥有过去差不多10年里你最新的、深度的信息,关于你的兴趣、忧虑、热情、疑问。它还收集了一些你很私人的信息(电子邮件、短信),精确到小时的你的日常活动和位置,一副你社交网络的高精度的描绘。关于你的如此私密的数据,很可能已经超越了你最亲密的朋友,家人或爱人对你的了解。 不敢想象把这些深度的个人信息交给完全陌生的人,就好像把这些信息拷到一个U盘里,然后随便放到某个咖啡厅的桌上,留张纸条说“Olivier Martin的个人数据,请随便”。谁知道什么人会拿到它以及用来干嘛?然而,我们毫不犹豫地把自己的主要信息交给那些对我们的数据很感兴趣的IT公司的陌生人(这是他们制造面包的材料)以及[世界级的数据分析专家][2]手里,也许只是因为我们在点击那个绿色的'接受'按钮时根本没有想这么多。 -有这么多的高质量信息,这么多年里,Google可能会比你希望自我了解的更了解你自己:尼玛,回想我过去的数字生活,我已经不记得5年前发出的邮件里的一半了。我很高兴能重新发现早在2005年对马克思主义的兴趣以及第二年加入了[ATTAC][3](一个致力于通过征收金融交易税来限制投机和改善社会公平的组织)。天知道为什么我竟然在2007年这么喜欢跳舞。这些都是无关紧要的信息(你不要指望我能爆出什么猛料,不会吧?;-)。但是,连接起这些高质量数据点,关于你生活的方方面面(做什么,什么时候,和谁一起,在哪里,...),并跨越这么长时间间隔,应该能推测出你的未来状态。比如说,根据一个17岁女孩的购物习惯,超市甚至可以在他父亲听说之前断定这个女孩怀孕了([真实故事][4])。谁知道通过像Google所掌握的这些远远超出购物习惯的高质量数据能做些什么?连接起这些点,也许有人能预测你未来几年里口味或政治观点的变化。如今,[你从未听过的公司声称拥有你500项数据点][5],包括宗教信仰,性取向和政治观点。提到政治,如果说你决定今后10年内进入政坛会怎么样?你的生活会改变,你的观点也一样,甚至你有时候会有所遗忘,但是Google不会。那你会不会担心你的对手会接触一些可以从Google访问你数据的人并会从你过去这些年里积累的个人数据深渊里挖出一些猛料呢?[就像最近Sony被黑][6]一样,多久以后会轮到Google或Facebook,以致让你的个人信息最终永远暴露? +有这么多的高质量信息,这么多年里,Google可能会比你希望自我了解的更了解你自己:尼玛,回想我过去的数字生活,5年前发出的邮件里有一半我已经不记得了。我很高兴能重新发现早在2005年对xxx主义的兴趣以及第二年加入了[ATTAC][3](一个致力于通过征收金融交易税来限制投机和改善社会公平的组织)。天知道为什么我竟然在2007年这么喜欢跳舞。这些都是无关紧要的信息(你不指望我能爆出什么猛料,是吧?;-)。但是,连接起这些高质量数据点,关于你生活的方方面面(做什么、什么时候、和谁一起、在哪里,...),并跨越这么长时间间隔,应该能推测出你的未来状态。比如说,根据一个17岁女孩的购物习惯,超市甚至可以在他父亲听说之前断定这个女孩怀孕了(这是一个[真实的故事][4])。谁知道通过像Google所掌握的这些远远超出购物习惯的高质量数据能做些什么?连接起这些点,也许有人能预测你未来几年里口味或观点的变化。如今,[你从未听过的公司声称拥有你500项数据点][5],包括宗教信仰、性取向和政治观点。提到政治,如果说你决定今后10年内进入政坛会怎么样?你的生活会改变,你的观点也一样,甚至你有时候会有所遗忘,但是Google不会。那你会不会担心你的对手会接触一些可以从Google访问你数据的人并会从你过去这些年里积累的个人数据深渊里挖出一些猛料呢?[就像最近Sony被黑][6]一样,多久以后会轮到Google或Facebook,以致让你的个人信息最终永远暴露? 我们大多数人把自己的个人数据托付给这些公司的一个原因就是它们提供免费服务。但是真的免费吗?一般的Google帐号的价值根据评估方式不同会有些差别:你花在写邮件上的时间占到[1000美元/年][7],你的帐号对于广告产业的价值差不多在[220美元/年][8]到[500美元/年][9]之间。所以这些服务并不是真的免费:会通过广告和我们的数据在未来的一些未知使用来间接付费。 -我写的最多的是Google,这是因为这是我托付个人数字信息的,以及目前我所知道做的最好的公司。但是我也提到过Apple或Facebook。这些公司通过它们在设计,工程和我们(曾经)喜欢每天使用的服务方面的神奇进步实实在在地改变了世界。但是这并不是说我们应该把所有我们最私人的个人数据堆积到它们的服务器上并把我们的数字生活托付给它们:潜在的危害实在太大了。 +我写的最多的是Google,这是因为这是我托付个人数字信息的,以及目前我所知道做的最好的公司。但是我也提到过Apple或Facebook。这些公司通过它们在设计、工程和我们(曾经)喜欢每天使用的服务方面的神奇进步实实在在地改变了世界。但是这并不是说我们应该把所有我们最私人的个人数据堆积到它们的服务器上并把我们的数字生活托付给它们:潜在的危害实在太大了。 -### 只要5小时,拿回自己以及关心的人的隐私权 ### +## 只要5小时,拿回自己以及关心的人的隐私权 ## -并不是一定要这样做。你可以生活在21世纪,拿着智能手机,每天都用电子邮件和GPS,却仍然可以保留自己的隐私。你所需要的就是拿回自己个人数据的控制权:邮件、日程、联系人、文件,等等。[Prism-Break.org][10]网站上列出了一些能帮你掌握个人数据命运的软件。除此以外,控制自己个人数据的最安全和最有效的方式是架设自己的服务器并搭建自己的云。不过你也许只是没有时间或精力去研究具体该怎么做以及如何让它能流畅工作。 +但是事实并不是一定必须这样的。你可以生活在21世纪,拿着智能手机,每天都用电子邮件和GPS,却仍然可以保留自己的隐私。你所需要的就是拿回自己个人数据的控制权:邮件、日程、联系人、文件,等等。[Prism-Break.org][10]网站上列出了一些能帮你掌握个人数据命运的软件。除此以外,控制自己个人数据的最安全和最有效的方式是架设自己的服务器并搭建自己的云。不过你也许只是没有时间或精力去研究具体该怎么做以及如何让它能流畅工作。 这也是这篇文章的意义所在。仅仅5个小时内,我们将配置出一台服务器来支撑你的邮件、联系人、日程表和各种文件,为你、你的朋友和你的家人。这个服务器将设计成一个个人数据中心或云,所以你能时刻保留它的完整控制。数据将自动在你的台式机/笔记本、手机和平板之间同步。从根本上来说,**我们将建立一个系统来代替Gmail、Google文件/Dropbox、Google联系人、Google日历和Picasa**。 -为自己做这件事情已经是迈出很大一步了。但是,你个人信息的很大一部分将仍然泄漏出去并保存到硅谷的一些主机上,只是因为和你日常来往的太多人在用Gmail和使用智能手机。所以最好是带上你一些比较亲近的人加入这次探险。 +为自己做这件事情已经是迈出很大一步了。但是,你个人信息的很大一部分将仍然泄漏出去并保存到硅谷的一些主机上,只是因为和你日常来往的太多人在用Gmail和使用智能手机,所以最好是带上你一些比较亲近的人加入这次探险。 -我们将构建的系统能够 +我们将构建的系统能够: - **支持任意数目的域名和用户**。这样就能轻易地和你的家人朋友共享这台服务器,所以他们也能掌控自己的个人数据,并且还能和你一起分摊服务费用。和你一起共享服务器的人可以使用他们自己的域名或者共享你的。 -- **允许你从任意网络发送和接收电子邮件**,需要成功登录服务器之后。这样,你可以通过任意的邮件地址,任意设备(台式机、手机、平板),任意网络(家里、公司、公共网络、...)来发送电子邮件。 +- **允许你从任意网络发送和接收电子邮件**,需要成功登录服务器之后。这样,你可以通过任意的邮件地址、任意设备(台式机、手机、平板)、任意网络(家里、公司、公共网络、...)来发送电子邮件。 - **在发送和接收邮件的时候加密网络数据**,这样,你不信任的人不能钓出你的密码,也不能看到你的私人邮件。 -- **提供最先进的反垃圾邮件技术**,结合了已知垃圾邮件黑名单,自动灰名单,和自适应垃圾邮件过滤。如果邮件被误判了只需要简单地把它拖入或拖出垃圾目录就可以重新配置垃圾邮件过滤器。而且,服务器还会为基于社区的反垃圾邮件努力做出贡献。 -- **一段时间里只需要几分钟的维护**,基本上只是安装安全更新和简单地检查一下服务器日志。添加一个新的邮件地址只需要在数据库中插入一条记录。除此之外,你可以忘记它的存在过自己的生活。我在14个月之前搭建了本文描述的这个系统,从那以后就一直顺利运行。所以我完全把它给忘了,直到我最近觉得随便按下手机上的‘检查邮件’会导致电子一路跑到冰岛(我放置服务器的地方)再回来的想法有点好笑才想起来。 +- **提供最先进的反垃圾邮件技术**,结合了已知垃圾邮件黑名单、自动灰名单、和自适应垃圾邮件过滤。如果邮件被误判了只需要简单地把它拖入或拖出垃圾目录就可以重新调校垃圾邮件过滤器。而且,服务器还会为基于社区的反垃圾邮件努力做出贡献。 +- **一段时间里只需要几分钟的维护**,基本上只是安装安全更新和简单地检查一下服务器日志。添加一个新的邮件地址只需要在数据库中插入一条记录。除此之外,你可以忘记它的存在过自己的生活。我在14个月之前搭建了本文描述的这个系统,从那以后就一直顺利运行。所以我完全把它给忘了,直到我最近觉得随便按下手机上的‘检查邮件’会导致电子信号一路跑到冰岛(我放置服务器的地方)再回来的想法有点好笑才想起来。 要完成这篇文章里的工作,你需要一点基本的技术能力。如果你知道SMTP和IMAP的区别,什么是DNS,以及对TCP/IP有基本了解的话,就够了。你还将需要一点基本的Unix知识(在命令行下和文件一起工作,基本的系统管理)。然后你需要花总共5小时时间来搭建。 @@ -49,7 +49,7 @@ - [使用Owncloud提供日历,联系人,文件服务并配置webmail][15] - [在云上同步你的设备][16] -### 这篇文章是受之前工作的启发并以之为基础 ### +## 这篇文章是受之前工作的启发并以之为基础 ## 本文很大程度参考了两篇文章,由[Xavier Claude][17]和[Drew Crawford][18]写的关于架设私有邮件服务器的介绍。 @@ -62,13 +62,13 @@ - 我增加了webmail。 - 我增加了设定云服务器的部分,不仅能收发邮件还能管理文件,地址本/联系人(邮件地址,电话号码,生日,等等等),日程表和图片,供所有设备访问使用。 -### 申请一个虚拟私人服务器,一个域名,并把它们配置好 ### +## 申请一个虚拟私人服务器,一个域名,并把它们配置好 ## 让我们从设置基础设施开始:我们的虚拟私人主机和我们的域名。 我用过[1984.is][19]和[Linode][20]提供的虚拟私人主机(VPS),体验非常好。在本文中,我们将使用**Debian Wheezy**,这个在1984和Linode都提供了已经做好的映像文件可以直接布置到你的VPS上。我喜欢1984是因为它的服务器在冰岛,也是唯一使用可再生能源(地热和水力发电)的地方,目前还没有影响过气候变化,不像[大多数美国数据中心目前大多数依赖于烧煤的火力发电站][21]。而且,他们注重[民权,透明,自由][22]以及[免费软件][23]。 -最好是在服务器上创建一个文件用来保存后面要用到的各种密码(用户账号,邮件账号,云帐号,数据库帐号)。当然最好是加密一下(可以用[GnuPG][24]),这样就算用来设定服务器的电脑被偷了或被入侵了,你的服务器就不会那么容易被攻击。 +最好是在服务器上创建一个文件用来保存后面要用到的各种密码(用户账号、邮件账号、云帐号、数据库帐号)。当然最好是加密一下(可以用[GnuPG][24]),这样就算用来设定服务器的电脑被偷了或被入侵了,你的服务器就不会那么容易被攻击。 关于注册域名,我已经使用[grandi][25]的服务超过10年了,也很满意。在本文中,我们将开辟一个叫**jhausse.net**的域名。然后在上面增加一个叫**cloud.jhausse.net**的二级域名,并绑定MX纪录。在完成之后,设置比较短的纪录生存时间(TTL)比如300秒,这样你在设置服务器的时候,可以修改你的域并很快测试到结果。 @@ -78,7 +78,7 @@ adduser roudy -然后,在文件**/etc/ssh/sshd_config**中设置 +然后,在文件**/etc/ssh/sshd\_config**中设置 PermitRootLogin no @@ -90,7 +90,7 @@ cloud -然后,编辑ssh服务的公钥文件**/etc/ssh/ssh_host_rsa_key.pub, /etc/ssh/ssh_host_dsa_key.pub, /etc/ssh/ssh_host_ecdsa_key.pub**,这样文件末尾可以反映你的主机名,比如**root@cloud**。然后重启系统保证主机名在系统的每个需要它的角落都生效了。 +然后,编辑ssh服务的公钥文件**/etc/ssh/ssh\_host\_rsa\_key.pub, /etc/ssh/ssh\_host\_dsa\_key.pub, /etc/ssh/ssh\_host\_ecdsa\_key.pub**,这样文件末尾可以反映你的主机名,比如**root@cloud**。然后重启系统保证主机名在系统的每个需要它的角落都生效了。 reboot @@ -103,15 +103,15 @@ apt-get autoremove apt-get install vim -我喜欢使用vim远程编辑配置文件。打开自动语法高亮会很有帮助。添加下面这一行到**~/.vimrc**文件中。 +我喜欢使用vim远程编辑配置文件。打开vim 的自动语法高亮会很有帮助。添加下面这一行到**~/.vimrc**文件中。 syn on -### 设置postfix和dovecot来收发电子邮件 ### +## 设置postfix和dovecot来收发电子邮件 ## apt-get install postfix postfix-mysql dovecot-core dovecot-imapd dovecot-mysql mysql-server dovecot-lmtpd postgrey -在[Postfix][27]的配置菜单里,选择**因特网站点**,把系统邮件名设为**jhausse.net**。 +在[Postfix][27]的配置菜单里,选择`Internet Site`,设置这个系统的邮件名称为**jhausse.net**。 现在开始添加一个数据库用于保存主机上管理的域名列表,和每个域名下的用户列表(同时也包括他们各自的密码),以及邮件别名列表(用于从一个地址往另一个地址转发邮件)。 @@ -142,14 +142,14 @@ FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -我们将承载**jhausse.net**域名。如果还需要加入其他域名,也没问题。我们也会为每个域名设置一个邮件管理地址,转寄给**roudy@jhausse.net**。 +这里我们为**jhausse.net**域名提供邮件服务。如果还需要加入其他域名,也没问题。我们也会为每个域名设置一个邮件管理地址(postmaster),转寄给**roudy@jhausse.net**。 mysql> INSERT INTO virtual_domains (`name`) VALUES ('jhausse.net'); mysql> INSERT INTO virtual_domains (`name`) VALUES ('otherdomain.net'); mysql> INSERT INTO virtual_aliases (`domain_id`, `source`, `destination`) VALUES ('1', 'postmaster', 'roudy@jhausse.net'); mysql> INSERT INTO virtual_aliases (`domain_id`, `source`, `destination`) VALUES ('2', 'postmaster', 'roudy@jhausse.net'); -现在已经添加了一个本地邮件账号**roudy@jhausse.net**。首先,为它生成一个哈希密码: +现在已经添加了一个本地邮件账号**roudy@jhausse.net**。首先,为它生成一个密码的哈希串: doveadm pw -s SHA512-CRYPT @@ -157,7 +157,7 @@ mysql> INSERT INTO `mailserver`.`virtual_users` (`domain_id`, `password`, `email`) VALUES ('1', '$6$YOURPASSWORDHASH', 'roudy@jhausse.net'); -现在我们的域名,别名和用户列表都设置好了,然后开始设置postfix(SMTP服务器,用来发送邮件)。把文件**/etc/postfix/main.cf**替换为下面的内容: +现在我们的域名、别名和用户列表都设置好了,然后开始设置postfix(这是一个SMTP服务器,用来发送邮件)。把文件**/etc/postfix/main.cf**替换为下面的内容: myhostname = cloud.jhausse.net myorigin = /etc/mailname @@ -239,7 +239,7 @@ 如果一切都正常配置了的话,头两个查询应该输出1,第3个查询应该输出**roudy@jhausse.net**,而最后一个应该什么都不输出。 -现在,让我们设置一下dovecot(一个IMAP服务程序,用来在我们的设备上从服务器获取收件箱里的邮件)。编辑文件**/etc/dovecot/dovecot.conf**设置以下参数: +现在,让我们设置一下dovecot(一个IMAP服务程序,用来在我们的设备上从服务器获取收到的邮件)。编辑文件**/etc/dovecot/dovecot.conf**设置以下参数: # Enable installed protocol # !include_try /usr/share/dovecot/protocols.d/*.protocol @@ -253,7 +253,7 @@ [...] first_valid_uid = 0 -这样邮件将被保存到目录/var/mail/domainname/username下。注意下这几个选项散布在配置文件的不同位置,有时已经在那里写好了:我们只需要取消注释。文件里的其他设定选项,可以维持原样。在本文后面还有很多文件需要用同样的方式更新设置。在文件**/etc/dovecot/conf.d/10-auth.conf**里,设置以下参数: +这样邮件将被保存到目录 /var/mail/domainname/username 下。注意下这几个选项散布在配置文件的不同位置,有时已经在那里写好了:我们只需要取消注释即可。文件里的其他设定选项,可以维持原样。在本文后面还有很多文件需要用同样的方式更新设置。在文件**/etc/dovecot/conf.d/10-auth.conf**里,设置以下参数: disable_plaintext_auth = yes auth_mechanisms = plain @@ -366,9 +366,10 @@ 在服务器上,尝试发送邮件给本地用户: telnet localhost 25 + EHLO cloud.jhausse.net MAIL FROM:youremail@domain.com - rcpt to:roudy@jhausse.net + RCPT TO:roudy@jhausse.net data Subject: Hallo! @@ -397,18 +398,18 @@ 554 5.7.1 : Relay access denied -这个没问题:如果服务器能接受这封邮件,那意味着我们架设的postfix是一个对全世界所有垃圾邮件都开放的中继,将完全没法使用。除了'Relay access denied'消息,你也可能会收到这样的响应: +这个没问题:如果服务器能接受这封邮件而不是返回如上的拒绝消息,那意味着我们架设的postfix是一个对全世界所有垃圾邮件都开放的中继,这将完全没法使用。除了'Relay access denied'消息,你也可能会收到这样的响应: 554 5.7.1 Service unavailable; Client host [87.68.61.119] blocked using zen.spamhaus.org; http://www.spamhaus.org/query/bl?ip=87.68.61.119 -意思是你正尝试从一个被标记成垃圾邮件发送者的IP地址连接服务器。我在通过普通的因特网服务提供商(ISP)连接服务器时曾收到过这样的消息。要解决这个问题,可以试着从另一个主机发起连接,比如另外一个你可以SSH登录的主机。另外一种方式是,你可以修改postfix的**main.cf**配置文件,不要使用Spamhous的RBL,重启postfix服务,然后再检查上面的测试是否正常。不管用哪种方式,最重要的是你要确定一个能工作的,因为我们后面马上要测试其他功能。如果你选择了重新配置postfix不使用RBL,别忘了在完成本文后重新开启RBL并重启postfix,以避免收到一些不必要的垃圾邮件。 +意思是你正尝试从一个被标记成垃圾邮件发送者的IP地址连接服务器。我在通过普通的因特网服务提供商(ISP)连接服务器时曾收到过这样的消息。要解决这个问题,可以试着从另一个主机发起连接,比如另外一个你可以SSH登录的主机。另外一种方式是,你可以修改postfix的**main.cf**配置文件,不要使用Spamhous的RBL,重启postfix服务,然后再检查上面的测试是否正常。不管用哪种方式,最重要的是你要确定一个能工作的,因为我们后面马上要测试其他功能。如果你选择了重新配置postfix不使用RBL,别忘了在完成本文后重新开启RBL并重启postfix,以避免收到一些不必要的垃圾邮件。(LCTT 译者注:在国内可以使用 CASA 的 RBL:cblplus.anti-spam.org.cn,参见:http://www.anti-spam.org.cn/ 。) 现在,我们试一下往SMTP端口25发送一封有效的邮件,这是一般正常的邮件服务器用来彼此对话的方式: openssl s_client -connect cloud.jhausse.net:25 -starttls smtp EHLO cloud.jhausse.net MAIL FROM:youremail@domain.com - rcpt to:roudy@jhausse.net + RCPT TO:roudy@jhausse.net 服务器应该有这样的响应 @@ -425,7 +426,7 @@ 4 UID fetch 1:1 (UID RFC822.SIZE FLAGS BODY.PEEK[]) 5 LOGOUT -这里,你应该把mypassword替换为你自己为这个邮件账号设定的密码。如果能正常工作,基本上我们已经拥有一个能接收邮件的邮件服务器了,通过它我们可以在各种设备(PC/笔记本,平板,手机,...)上收取邮件了。但是我们不能把邮件给它发送出去,除非我们自己从服务器发送。现在我们将让postfix为我们转发邮件,但是这个只有成功登录才可以,这是为了保证邮件是由服务器上的某个有效帐号发出来的。要做到这个,我们要打开一个特殊的,全程SSL连接的,SASL鉴权的邮件提交服务。在文件**/etc/postfix/master.cf**里设置下面的参数: +这里,你应该把*mypassword*替换为你自己为这个邮件账号设定的密码。如果能正常工作,基本上我们已经拥有一个能接收邮件的邮件服务器了,通过它我们可以在各种设备(PC/笔记本、平板、手机...)上收取邮件了。但是我们不能把邮件给它发送出去,除非我们自己从服务器发送。现在我们将让postfix为我们转发邮件,但是这个只有成功登录才可以,这是为了保证邮件是由服务器上的某个有效帐号发出来的。要做到这个,我们要打开一个特殊的,全程SSL连接的,SASL鉴权的邮件提交服务。在文件**/etc/postfix/master.cf**里设置下面的参数: submission inet n - - - - smtpd -o syslog_name=postfix/submission @@ -437,7 +438,7 @@ -o smtpd_sasl_security_options=noanonymous -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject_non_fqdn_recipient,reject_unauth_destination -然后重启postfix服务 +然后重启postfix服务: service postfix reload @@ -446,7 +447,7 @@ openssl s_client -connect cloud.jhausse.net:587 -starttls smtp EHLO cloud.jhausse.net -注意一下服务器建议的'250-AUTH PLAIN'功能,在从端口25连接的时候不会生效。 +注意一下服务器建议的'250-AUTH PLAIN'功能,在从端口25连接的时候不会出现。 MAIL FROM:asdf@jkl.net rcpt to:bob@gmail.com @@ -494,13 +495,13 @@ PS:不要忘记再次[试试通过端口25往自己架设的服务器上的帐号发送邮件][29],来验证你已经没有被postgrey阻挡了。 -### 阻止垃圾邮件进入你的收件箱 ### +## 阻止垃圾邮件进入你的收件箱 ## -为了过滤垃圾邮件,我们已经使用了实时黑名单(RBLs)和灰名单(postgrey)。现在我们将增加自适应垃圾邮件过滤来让我们的垃圾邮件过滤能力提高一个等级。这意味着我们将为我们的邮件服务器增加人工智能,这样它就能从经验中学习哪些有件是垃圾哪些不是。我们将使用[dspam][30]来实现这个功能。 +为了过滤垃圾邮件,我们已经使用了实时黑名单(RBL)和灰名单(postgrey)。现在我们将增加自适应垃圾邮件过滤来让我们的垃圾邮件过滤能力提高一个等级。这意味着我们将为我们的邮件服务器增加人工智能,这样它就能从经验中学习哪些邮件是垃圾哪些不是。我们将使用[dspam][30]来实现这个功能。 apt-get install dspam dovecot-antispam postfix-pcre dovecot-sieve -dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误分类了之后让dovecot重新更新垃圾邮件过滤器。基本上,我们所需要做的就只是把邮件放进或拿出垃圾箱。dovecot-antispam将负责调用dspam来更新过滤器。至于postfix-pcre和dovecot-sieve,我们将分别用它们来把接收的邮件递给垃圾邮件过滤器以及自动把垃圾邮件放入用户的垃圾箱。 +dovecot-antispam是一个安装包,可以在我们发现有邮件被dspam误分类了之后让dovecot重新更新垃圾邮件过滤器。基本上,我们所需要做的就只是把邮件放进或拿出垃圾箱。dovecot-antispam将负责调用dspam来更新过滤器。至于postfix-pcre和dovecot-sieve,我们将分别用它们来把接收的邮件传递给垃圾邮件过滤器以及自动把垃圾邮件放入用户的垃圾箱。 在配置文件**/etc/dspam/dspam.conf**里,为以下参数设置相应的值: @@ -535,7 +536,7 @@ dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误 dovecot unix - n n - - pipe flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient} -现在我们将告诉postfix通过dspam来过滤所有提交给服务器端口25(一般的SMTP通信)的新邮件,除非该邮件是从服务器本身发出(permit_mynetworks)。注意下我们通过SASL鉴权提交给postfix的邮件不会通过dspam过滤,因为我们在前面部分里为这种方式设定了独立的提交服务。编辑文件**/etc/postfix/main.cf**将选项**smtpd_client_restrictions**改为如下内容: +现在我们将告诉postfix通过dspam来过滤所有提交给服务器端口25(一般的SMTP通信)的新邮件,除非该邮件是从服务器本身发出(permit\_mynetworks)。注意下我们通过SASL鉴权提交给postfix的邮件不会通过dspam过滤,因为我们在前面部分里为这种方式设定了独立的提交服务。编辑文件**/etc/postfix/main.cf**将选项**smtpd\_client\_restrictions**改为如下内容: smtpd_client_restrictions = permit_mynetworks, reject_rbl_client zen.spamhaus.org, check_policy_service inet:127.0.0.1:10023, check_client_access pcre:/etc/postfix/dspam_filter_access @@ -544,11 +545,11 @@ dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误 # For DSPAM, only scan one mail at a time dspam_destination_recipient_limit = 1 -现在我们需要指定我们定义的过滤器。基本上,我们将告诉postfix把所有邮件(/./)通过unix套接字发给dspam。创建一个新文件**/etc/postfix/dspam_filter_access**并把下面一行写进去: +现在我们需要指定我们定义的过滤器。基本上,我们将告诉postfix把所有邮件(如下用 /./ 代表)通过unix套接字发给dspam。创建一个新文件**/etc/postfix/dspam\_filter\_access**并把下面一行写进去: /./ FILTER dspam:unix:/run/dspam/dspam.sock -这是postfix部分的配置。现在让我们为dovecot设置垃圾过滤。在文件**/etc/dovecot/conf.d/20-imap.conf**里,修改**imap mail_plugin**插件参数为下面的方式: +这是postfix部分的配置。现在让我们为dovecot设置垃圾过滤。在文件**/etc/dovecot/conf.d/20-imap.conf**里,修改**imap mail\_plugin**插件参数为下面的方式: mail_plugins = $mail_plugins antispam @@ -581,7 +582,7 @@ dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误 sieve_default = /etc/dovecot/default.sieve -什么是sieve以及为什么我们需要为所有用户设置一个默认脚本?sieve可以在IMAP服务器上为我们自动处理任务。在我们的例子里,我们想让所有被确定为垃圾的邮件会被移到垃圾箱而不是收件箱里。我们希望这是服务器上所有用户的默认行为;这是为什么我们把这个脚本设为默认脚本。现在让我们来创建这个脚本,建立一个新文件**/etc/dovecot/default.sieve**并写入以下内容: +什么是sieve以及为什么我们需要为所有用户设置一个默认脚本?sieve可以在IMAP服务器上为我们自动处理任务。在我们的例子里,我们想让所有被确定为垃圾的邮件移到垃圾箱而不是收件箱里。我们希望这是服务器上所有用户的默认行为;这是为什么我们把这个脚本设为默认脚本。现在让我们来创建这个脚本,建立一个新文件**/etc/dovecot/default.sieve**并写入以下内容: require ["regex", "fileinto", "imap4flags"]; # Catch mail tagged as Spam, except Spam retrained and delivered to the mailbox @@ -603,7 +604,7 @@ dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误 chmod 0640 default.sieve chmod 0750 default.svbin -最后,我们需要修改dspam要读取的两个postfix配置文件的权限: +最后,我们需要修改dspam需要读取的两个postfix配置文件的权限: chmod 0644 /etc/postfix/dynamicmaps.cf /etc/postfix/main.cf @@ -669,21 +670,21 @@ dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误 很好!你现在已经为你服务器上的用户配置好自适应垃圾邮件过滤。当然,每个用户将需要在开始的几周里培训过滤器。要标记一则信息为垃圾,只需要在你的任意设备(电脑,平板,手机)上将它移动到叫“垃圾箱”或“废纸篓”的目录里。否则它将被标记为有用。 -### 确保你发出的邮件能通过垃圾邮件过滤器 ### +## 确保你发出的邮件能通过垃圾邮件过滤器 ## 这个部分我们的目标是让我们的邮件服务器能尽量干净地出现在世界上,并让垃圾邮件发送者们更难以我们的名义发邮件。作为附加效果,这也有助于让我们的邮件能通过其他邮件服务器的垃圾邮件过滤器。 -#### 发送者策略框架 #### +### 发送者策略框架(SPF) ### 发送者策略框架(SPF)是你添加到自己服务器区域里的一份记录,声明了整个因特网上哪些邮件服务器能以你的域名发邮件。设置非常简单,使用[microsoft.com][31]上的SPF向导来生成你的SPF记录,然后作为一个TXT记录添加到自己的服务器区域里。看上去像这样: jhausse.net. 300 IN TXT v=spf1 mx mx:cloud.jhausse.net -all -#### 反向PTR #### +### 反向PTR ### 我们[之前][32]在本文里讨论过这个问题,建议你为自己的服务器正确地设置反向DNS,这样对服务器IP地址的反向查询能返回你服务器的实际名字。 -#### OpenDKIM #### +### OpenDKIM ### 当我们激活[OpenDKIM][33]后,postfix会用密钥为每封发出去的邮件签名。然后我们将把这个密钥存储在DNS域中。这样的话,世界上任意一个邮件服务器都能够检验邮件是否真的是我们发出的,或是由垃圾邮件发送者伪造的。让我们先安装opendkim: @@ -710,7 +711,7 @@ dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误 UMask 022 UserID opendkim:opendkim -我们还需要几个额外的文件,将保存在目录**/etc/opendkim**里: +我们还需要几个额外的文件,需保存在目录**/etc/opendkim**里: mkdir -pv /etc/opendkim/ cd /etc/opendkim/ @@ -740,7 +741,7 @@ dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误 cat mail.txt -然后把它作为一个TXT记录添加到区域文件里,应该是这样的 +然后把它作为一个TXT记录添加到区域文件里,应该是类似这样的 mail._domainkey.cloud1984.net. 300 IN TXT v=DKIM1; k=rsa; p=MIGfMA0GCSqG... @@ -751,30 +752,30 @@ dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误 non_smtpd_milters = $smtpd_milters milter_default_action = accept -然后重启相关服务 +然后重启相关服务: service postfix reload service opendkim restart -现在让我们测试一下能找到我们的OpenDKIM公钥并和私钥匹配: +现在让我们测试一下是否能找到我们的OpenDKIM公钥并和私钥匹配: opendkim-testkey -d jhausse.net -s mail -k mail.private -vvv -这个应该返回 +这个应该返回: opendkim-testkey: key OK 这个你可能需要等一会直到域名服务器重新加载该区域(对于Linode,每15分钟会更新一次)。你可以用**dig**来检查区域是否已经重新加载。 -如果这个没问题,让我们测试一下其他服务器能验证我们的OpenDKIM签名和SPF记录。要做这个,我们可以用[Brandon Checkett的邮件测试][34]。发送一封邮件到[Brandon的网页][34]上提供的测试地址,我们可以在服务器上运行下面的命令 +如果这个没问题,让我们测试一下其他服务器能验证我们的OpenDKIM签名和SPF记录。要做这个,我们可以用[Brandon Checkett的邮件测试系统][34]。发送一封邮件到[Brandon的网页][34]上提供的测试地址,我们可以在服务器上运行下面的命令 mail -s CloudCheck ihAdmTBmUH@www.brandonchecketts.com 在Brandon的网页上,我们应该可以在'DKIM Signature'部分里看到**result = pass**的文字,以及在'SPF Information'部分看到**Result: pass**的文字。如果我们的邮件通过这个测试,只要不加-t开关重新生成OpenDKIM密钥,上传新的密钥到区域文件里,然后重新测试检查是否仍然可以通过这些测试。如果可以的话,恭喜!你已经在你的服务器上成功配置好OpenDKIM和SPF了! -### 使用Owncloud提供日历,联系人,文件服务并通过Roundcube配置网页邮件 ### +## 使用Owncloud提供日历,联系人,文件服务并通过Roundcube配置网页邮件 ## -既然我们已经拥有了一流的邮件服务器,让我们再为它增加在云上保存通讯录,日程表和文件的能力。这些是[Owncloud][35]所提供的非常赞的服务。在这个弄好后,我们还会设置一个网页邮件,这样就算你没带任何电子设备出去旅行时,或者说在你的手机或笔记本没电的情况下,也可以检查邮件。 +既然我们已经拥有了一流的邮件服务器,让我们再为它增加在云上保存通讯录,日程表和文件的能力。这些是[Owncloud][35]所提供的非常赞的服务。在这个弄好后,我们还会设置一个网页邮件,这样就算你没带任何电子设备出去旅行时,或者说在你的手机或笔记本没电的情况下,也可以通过网吧来检查邮件。 安装Owncloud非常直观,而且在[这里][36]有非常好的介绍。在Debian系统里,归根结底就是把owncloud的仓库添加到apt源里,下载Owncloud的发行密钥并安装到apt钥匙链中,然后通过apt-get安装Owncloud: @@ -784,20 +785,20 @@ dovecot-antispam是一个安装包,可以在我们发现有邮件被dspan误 apt-get update apt-get install apache2 owncloud roundcube -在有提示的时候,选择**dbconfig**然后说你希望**roundcube**使用**mysql**。然后,提供一下mysql的root密码并为roundcube的mysql用户设置一个漂亮的密码。然后,按如下方式编辑roundcube的配置文件**/etc/roundcube/main.inc.php**,这样登录roundcube默认会使用你的IMAP服务器: +在有提示的时候,选择**dbconfig**并设置**roundcube**使用**mysql**。然后,提供一下mysql的root密码并为roundcube的mysql用户设置一个漂亮的密码。然后,按如下方式编辑roundcube的配置文件**/etc/roundcube/main.inc.php**,这样登录roundcube默认会使用你的IMAP服务器: $rcmail_config['default_host'] = 'ssl://localhost'; $rcmail_config['default_port'] = 993; -现在我们来配置一下apache2网页服务器增加SSL支持,这样我们可以和Owncloud和Roundcube对话时使用加密的方式传输我们的密码和数据。让我们打开Apache的ssl模块: +现在我们来配置一下apache2网页服务器增加SSL支持,这样我们可以和Owncloud和Roundcube对话时使用加密的方式传输我们的密码和数据。让我们打开Apache的SSL模块: a2enmod ssl 然后编辑文件**/etc/apache2/ports.conf**并设定以下参数: -NameVirtualHost *:80 -Listen 80 -ServerName www.jhausse.net + NameVirtualHost *:80 + Listen 80 + ServerName www.jhausse.net # If you add NameVirtualHost *:443 here, you will also have to change @@ -969,9 +970,9 @@ ServerName www.jhausse.net a2ensite default default-ssl roundcube service apache2 restart -关于网页邮件,可以通过网址**https://webmail.jhausse.net**来访问,基本上能工作。之后使用邮箱全名(例如roudy@jhausse.net)和在本文一开始在邮件服务器数据库里设定的密码登录。第一次连接成功,浏览器会警告说证书没有可靠机构的签名。这个没什么关系,只要添加一个例外。 +关于网页邮件,可以通过网址**https://webmail.jhausse.net**来访问,基本上能工作。之后使用邮箱全名(例如roudy@jhausse.net)和在本文一开始在邮件服务器数据库里设定的密码登录。第一次连接成功,浏览器会警告说证书没有可靠机构的签名。这个没什么关系,只要添加一个例外即可。 -最后但很重要的是,我们将通过把以下内容你哦个写入**/etc/apache2/sites-available/owncloud**来为Owncloud创建一个虚拟主机。 +最后但很重要的是,我们将通过把以下内容写入到**/etc/apache2/sites-available/owncloud**来为Owncloud创建一个虚拟主机。 @@ -1040,33 +1041,33 @@ ServerName www.jhausse.net 就这些了!现在你已经拥有自己的Google Drive,日程表,联系人,Dropbox,以及Gmail!好好享受下新鲜恢复保护的隐私吧!:-) -### 在云上同步你的设备 ### +## 在云上同步你的设备 ## -要同步你的邮件,你可以只是用你喜欢的邮件客户端:Android或iOS自带的默认邮件应用,[k9mail][37],或者电脑上的Thunderbird。或者你也可以使用我们设置好的网页邮件。 +要同步你的邮件,你只需用你喜欢的邮件客户端即可:Android或iOS自带的默认邮件应用,[k9mail][37],或者电脑上的Thunderbird。或者你也可以使用我们设置好的网页邮件。 在Owncloud的文档里描述了如何与云端同步你的日程表和联系人。在Android系统中,我用的是CalDAV-Sync,CardDAV-Sync应用桥接了手机上Android自带日历以及联系人应用和Owncloud服务器。 对于文件,有一个叫Owncloud的Android应用可以访问你手机上的文件,然后自动把你拍的图片和视频上传到云中。在你的Mac/PC上访问云端文件也很容易,在[Owncloud文档里有很好的描述][38]。 -### 最后一点提示 ### +## 最后一点提示 ## 在上线后的前几个星期里,最好每天检查一下日志**/var/log/syslog**和**/var/log/mail.log**以保证一切都在顺利运行。在你邀请其他人(朋友,家人,等等)加入你的服务器之前这很重要。他们信任你能很好地架设个人服务器维护他们的数据,但是如果服务器突然崩溃会让他们很失望。 -要添加另一个邮件用户,只要在数据库**mailserver**的**virtual_users**表中增加一行。 +要添加另一个邮件用户,只要在数据库**mailserver**的**virtual\_users**表中增加一行。 -要添加一个域名,只要在**virtual_domains**表中增加一行。然后更新**/etc/opendkim/SigningTable**为发出的邮件签名,上传OpenDKIM密钥到服务器区域,然后吃哦更年期OpenDKIM服务。 +要添加一个域名,只要在**virtual_domains**表中增加一行。然后更新**/etc/opendkim/SigningTable**为发出的邮件签名,上传OpenDKIM密钥到服务器区域,然后重启OpenDKIM服务。 Owncloud有自己的用户数据库,在用管理员帐号登录后可以修改。 -最后,万一在服务器临时崩溃的时候想办法找解决方案很重要。比如说,在服务器恢复之前你的邮件应该送往哪儿?一种方式是找个能帮你做备份MX的朋友,同时你也可以当他的备份MX(看下postfix的配置文件**main.cf**里**relay_domains**和**relay_recipient_maps**里的设定)。与此类似,如果你的服务器被破解然后一个坏蛋把你所有文件删了怎么办?对于这个,考虑增加一个常规备份系统就很重要了。Linode提供了备份选项。在1984.is里,我用crontabs和scp做了一个基本但管用的自动备份系统。 +最后,万一在服务器临时崩溃的时候想办法找解决方案很重要。比如说,在服务器恢复之前你的邮件应该送往哪儿?一种方式是找个能帮你做备份MX的朋友,同时你也可以当他的备份MX(看下postfix的配置文件**main.cf**里**relay\_domains**和**relay\_recipient\_maps**里的设定)。与此类似,如果你的服务器被破解然后一个坏蛋把你所有文件删了怎么办?对于这个,考虑增加一个常规备份系统就很重要了。Linode提供了备份选项。在1984.is里,我用crontabs和scp做了一个基本但管用的自动备份系统。 -------------------------------------------------------------------------------- via: https://www.howtoforge.com/tutorial/build-your-own-cloud-on-debian-wheezy/ -作者:[Roudy Jhausse ][a] +作者:[Roudy Jhausse][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a897b9b3bec7e707be02bbc86525e20deb09dfe3 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 26 Mar 2015 10:04:15 +0800 Subject: [PATCH 0378/2517] PUB:20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7 @geekpi --- ... To Single Network Interface Card On CentOS 7.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md (92%) diff --git a/translated/tech/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md b/published/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md similarity index 92% rename from translated/tech/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md rename to published/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md index 3dec583608..31a10d3923 100644 --- a/translated/tech/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md +++ b/published/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md @@ -1,6 +1,6 @@ -Linux 基础:在CentOS 7上给一个网卡分配多个IP地址 +在CentOS 7上给一个网卡分配多个IP地址 ================================================================================ -有时你也许想要给一个网卡多个地址。你该怎么做呢?另外买一个网卡来分配地址?不用这么做(只要在小型网络中)。我们现在可以再CentOS/RHEL 7中给一个网卡分配多个ip地址。想知道怎么做么?好的,跟随我,这并不难。 +有时你也许想要给一个网卡多个地址。你该怎么做呢?另外买一个网卡来分配地址?在小型网络中其实不用这么做。我们现在可以在CentOS/RHEL 7中给一个网卡分配多个ip地址。想知道怎么做么?好的,跟随我,这并不难。 首先,让我们找到网卡的IP地址。在我的CentOS 7服务器中,我只使用了一个网卡。 @@ -83,7 +83,6 @@ Linux 基础:在CentOS 7上给一个网卡分配多个IP地址 类似地,你可以加入更多的ip地址。 -Finally, save and close the file. Restart network service to take effect the changes. 最后,保存并退出文件。重启网络服务来使更改生效。 systemctl restart network @@ -172,11 +171,9 @@ Finally, save and close the file. Restart network service to take effect the cha IPV6_PEERDNS="yes" IPV6_PEERROUTES="yes" -你可以看到我已经添加一个A类地址(10.0.0.1)并且前缀是16 +你可以看到我已经添加一个A类地址(10.0.0.1)并且前缀是16。 -保存并退出文件。重启网络服务, - -接着,ping新增的地址: +保存并退出文件。重启网络服务,接着,ping新增的地址: ping -c 4 10.0.0.1 @@ -202,7 +199,7 @@ via: http://www.unixmen.com/linux-basics-assign-multiple-ip-addresses-single-net 作者:[SK][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d96678f024851ae993b350a242414b7af9f50bf0 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Thu, 26 Mar 2015 10:21:41 +0800 Subject: [PATCH 0379/2517] translating --- ...20150323 How to enable ssh login without entering password.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150323 How to enable ssh login without entering password.md b/sources/tech/20150323 How to enable ssh login without entering password.md index 40a4085f01..64449b7228 100644 --- a/sources/tech/20150323 How to enable ssh login without entering password.md +++ b/sources/tech/20150323 How to enable ssh login without entering password.md @@ -1,3 +1,4 @@ +[translating by KayGuoWhu] How to enable ssh login without entering password ================================================================================ Assume that you are a user "aliceA" on hostA, and wish to ssh to hostB as user "aliceB", without entering her password on hostB. You can follow this guide to **enable ssh login without entering a password**. From 638a903f62962dc28b05be4165697a467b3006c3 Mon Sep 17 00:00:00 2001 From: dbarobin Date: Thu, 26 Mar 2015 14:06:50 +0800 Subject: [PATCH 0380/2517] dbarobin translating --- .../20150324 4 Tools to Securely Delete Files from Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md b/sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md index f66f54247d..7012e405ab 100644 --- a/sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md +++ b/sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md @@ -1,3 +1,5 @@ +dbarobin translating + 4 Tools to Securely Delete Files from Linux ================================================================================ Any computer user with normal level skill set knows that any data removed from computer system can be recovered later with little bit of efforts. This is a good thing in the scenario when you have accidentally deleted your critical data. But in most cases, you don't want your private data to be recovered easily. Whenever we remove anything, the operating system deletes just the index of the particular data. It means that data is still there somewhere on the disk, this method is insecure, as any smart computer hacker can use any good data recovery tool to easily recover your deleted data. Linux users utilizes the well know “**rm**” command to remove data from their operating system, but “rm” command works in the conventional fashion. Data removed using this command can be recovered by special file recovery tools. @@ -127,4 +129,4 @@ via: http://linoxide.com/security/delete-files-permanatly-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/arunrz/ \ No newline at end of file +[a]:http://linoxide.com/author/arunrz/ From 1821889c943ba9dd6be0353580d3cd0222095346 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 26 Mar 2015 14:13:29 +0800 Subject: [PATCH 0381/2517] Translating by ZTinoZ --- ...150324 How to Host Open Source Code Repository in github.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md index 8749f0b0e3..267486f211 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ How to Host Open Source Code Repository in github ================================================================================ Hi all, today we will be learning how to host Source Code of Open Source Software in the repository hosted by github.com . GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features. It provides a workplace to host powerful collaboration, code review, and code management for open source and private projects. Unlike Git, which is strictly a command-line tool, GitHub provides a web-based graphical interface and desktop as well as mobile integration. GitHub offers both paid plans for private repositories and free accounts, which are usually used to host open-source software projects. @@ -110,4 +111,4 @@ via: http://linoxide.com/usr-mgmt/host-open-source-code-repository-github/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:http://github.com/ \ No newline at end of file +[1]:http://github.com/ From 6d0962ade66a83694c0e012e06f510c8bfab7576 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 26 Mar 2015 15:23:58 +0800 Subject: [PATCH 0382/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Linux Based Mini PC You Can Buy In 2015.md | 41 ++++++++----------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md index c3aa5b76b5..bbb7efa05c 100644 --- a/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md +++ b/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md @@ -1,24 +1,23 @@ -2015你可以买的一款基于Linux的迷你PC +2015年你可以买的四款基于Linux的迷你PC ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Linux_Based_Mini_PC.jpg) -在我看来迷你PC将在不久的将来会替代传统桌面电脑。传统桌面的有一个像送风机那样占据大量空间的风扇。迷你PC,在另一方面说很小巧和紧凑。通常是4″或者5″大小,可以轻易地放在桌子上。 +在我看来迷你PC将在不久的将来会替代传统桌面电脑。传统桌面的有一个像吹风机那样占据大量空间的风扇。迷你PC,在另一方面说很小巧和紧凑。通常是4″或者5″大小,可以轻易地放在桌子上。 -不仅如此,这些迷你PC的无风扇设计是一个好处。当然,你可以购买无风扇的常规电脑,但是空间占用仍然是一个问题。对我个人来说,我觉得迷你PC外观上看着很可爱。如果你不是一个游戏玩家也不想买新的桌面PC,我强烈建议你**购买一个基于Linux的迷你PC**。 +不仅如此,这些迷你PC的无风扇设计是一个优点。当然,你可以购买无风扇的常规电脑,但是空间占用仍然是一个问题。对我个人来说,我觉得迷你PC外观上看着很可爱。如果你不是一个游戏玩家也不想买新的桌面PC,我强烈建议你**购买一款基于Linux的迷你PC**。 -如果你考虑我的建议买一个,那么你或许想知道该买哪款。不要担心,这篇文章我们会介绍**四款你可以在2015购买的基于Linux的迷你PC**。 +如果你考虑我的建议,那么你或许想知道该买哪款。不要担心,这篇文章我们会介绍**2015年你可以购买的四款基于Linux的迷你PC**。 ### 基于Linux的迷你PC ### -请注意这些PC可能还不能下单。它们中有些还刚刚公布,在不久的将来才会面向公众出售。 +需要注意的是,这其中的一些PC可能还不能下单。它们中有些还刚刚公布,在不久的将来才会面向公众出售。 #### 1. System76出品的Meerkat #### ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/system76-meerkat.jpg) -[System76][1] is a computer manufacturer exclusively dealing with only Ubuntu based desktop, laptops and servers. [System76 announced an Ubuntu based mini PC Meerkat][2] last week. Let’s take a quick look at its specification: -[System76][1] 是一家仅出品基于Ubuntu电脑、笔记本、服务器的电脑生产商。[System76在上周宣布了一款基于Ubuntu的迷你PC][2]。让我看一下它的规格: +[System76][1] 是一家仅出品基于Ubuntu电脑、笔记本、服务器的电脑生产商。[System76在上周公布了一款基于Ubuntu的迷你PC][2]。让我看一下它的规格: **规格** @@ -43,7 +42,7 @@ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/mintbox-mini.jpeg) -[Compulab][3]将它的旗舰产品基于Linux Mint的桌面设备成了[Mintbox Mini][4]。紧凑的版本在4″大小。更多的细节如下: +[Compulab][3]将它基于Linux Mint的期间PC设备压缩,从Mintbox变为[Mintbox Mini][4]。这个紧凑的版本大小在4″左右。更多的细节如下: **规格** @@ -59,19 +58,17 @@ **价格** -$300起售 +$300左右起售 **发售日期** -2015第二季度 +2015年第二季度 #### 3. Compulab出品的Utilite2 #### ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Utilite2-ARM-PC.jpg) -It’s not that Compulab has stuck with Linux Mint only. It announced an ARM desktop PC running Ubuntu in last December. With a size of 3.4″x2.3″, [Utilite2][5] has modest feature and modest price. -Compulab并不是坚持用Linux Mint的。它在去年12月宣布了一款运行Ubuntu的ARM桌面PC。大小是3.4″x2.3″,[Utilite2][5]有最现代的特性和价格 - +Compulab并不仅仅被Linux Mint所限制。它在去年12月公布了一款运行Ubuntu的ARM桌面PC。大小是3.4″x2.3″,[Utilite2][5]有最适合的性价比。 **规格** @@ -85,20 +82,19 @@ Compulab并不是坚持用Linux Mint的。它在去年12月宣布了一款运行 **价格** -常规版售价$192、带硬盘售价$229。邮费另付。 +常规版售价$192、带硬盘售价$229。运费另付。 **发售日期** 现在就可购买。运送将花费4周。 -#### Think Penguin出品的Penguin Pocket Wee #### +#### 4. Think Penguin出品的Penguin Pocket Wee #### ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Think_Penguin_Pocket_Wee.jpeg) -[Think Penguin][6]是一家开源硬件生产商。在迷你PC领域,它提供了[Penguin Pocket Wee][7]。大小是4.6″x 4.4″x 1.4″ ,, Penguin Pocket Wee提供了大量的配置。你可以选择处理器、存储、网卡等。你可以选择购买预装你喜欢的Linux发行版,默认系统是Ubuntu。 +[Think Penguin][6]是一家开源硬件生产商。在迷你PC领域,它提供了[Penguin Pocket Wee][7]。大小是4.6″x 4.4″x 1.4″ ,, Penguin Pocket Wee为你提供了大量的配置。你可以选择处理器、存储、网卡等。你可以选择购买预装你喜欢的Linux发行版,默认系统是Ubuntu。 -The general configuration is as following: -下面的默认的配置 +下面是默认的配置: - Intel Core i3 或者 i5处理器,最高支持1080p视频 - 最高扩展至 16GB 的 DDR3内存 @@ -110,18 +106,17 @@ The general configuration is as following: **价格** -Basic model starts at $499 and it can go up to $1000 based on the configuration you select. -基础版本$499起售,根据你的配置最大是$1000。 +基础版本$499起售,根据你选择的配置最高价格是$1000。 **发售日期** -现在就可下订单。该公司在美国和英国也有办公司,所以应也可以运送到南美和欧洲。 +现在就可下订单。该公司在美国和英国也有办公地点,所以应也可以运送到南美和欧洲。 ### 你会选哪种? ### 我故意没有介绍[Raspberry Pi 2][8]或者其他Linux微电脑如[Intel的电脑棒][9]。原因是我不认为这些微电脑属于迷你PC的范畴。 -你怎么看?你想用迷你PC代替你的桌面PC么?是不是还有我没有在**最好的基于Linux的迷你PC**列出的PC?分享你们的观点吧。 +你怎么看?你想用迷你PC代替你的桌面PC么?是不是还有我没有在**基于Linux的最好的迷你PC**列表里列出的PC?在评论区分享你们的观点吧。 -------------------------------------------------------------------------------- @@ -129,7 +124,7 @@ via: http://itsfoss.com/4-linux-based-mini-pc-buy-2015/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2c629f8c525c7b6245cec3303b8b2e1300e8919c Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 26 Mar 2015 15:02:22 +0800 Subject: [PATCH 0383/2517] PUB:20150127 How to limit network bandwidth on Linux @FSSlc --- ...How to limit network bandwidth on Linux.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename {translated/tech => published}/20150127 How to limit network bandwidth on Linux.md (55%) diff --git a/translated/tech/20150127 How to limit network bandwidth on Linux.md b/published/20150127 How to limit network bandwidth on Linux.md similarity index 55% rename from translated/tech/20150127 How to limit network bandwidth on Linux.md rename to published/20150127 How to limit network bandwidth on Linux.md index cc1efc2aef..5be2501e58 100644 --- a/translated/tech/20150127 How to limit network bandwidth on Linux.md +++ b/published/20150127 How to limit network bandwidth on Linux.md @@ -1,12 +1,12 @@ -怎样在 Linux 中限制网络带宽 +怎样在 Linux 中限制网络带宽使用 ================================================================================ -假如你经常在 Linux 桌面上运行多个网络应用,或在家中让多台电脑共享带宽;(这时,)你可能想更好地控制带宽的使用。否则,当你使用下载器下载一个大文件时,交互式 SSH 会话可能会变得缓慢以至不可用;或者当你通过 Dropbox 来同步一个大文件夹时,你的室友可能会抱怨在她的电脑上,视频流变得断断续续。 +假如你经常在 Linux 桌面上运行多个网络应用,或在家中让多台电脑共享带宽;那么你可能想更好地控制带宽的使用。否则,当你使用下载器下载一个大文件时,交互式 SSH 会话可能会变得缓慢以至不可用;或者当你通过 Dropbox 来同步一个大文件夹时,你的室友可能会抱怨在她的电脑上,视频流变得断断续续。 -在本教程中,我将为你描述两种 在 Linux 中限制网络流量速率的不同方法。 +在本教程中,我将为你描述两种在 Linux 中限制网络流量速率的不同方法。 ### 在 Linux 中限制一个应用的速率 ### -限制网络流量速率的一种方法是通过一个名为[trickle][1]的命令行工具。通过在程序运行时,预先加载一个 速率限制 socket 库 的方法,trickle 命令允许你改变任意一个特定程序的流量。 关于 trickle 命令的一个很好的特征是 它仅在用户空间中运行,这意味着,你不必需要 root 权限来达到限制一个程序的带宽使用的目的。为了与 trickle 程序兼容,这个特定程序必须使用没有静态链接库的套接字接口。当你想对一个不具有内置带宽控制功能的程序进行速率限制时,trickle 可以帮得上忙。 +限制网络流量速率的一种方法是通过一个名为[trickle][1]的命令行工具。通过在程序运行时,预先加载一个速率限制 socket 库 的方法,trickle 命令允许你改变任意一个特定程序的流量。 trickle 命令有一个很好的特性是它仅在用户空间中运行,这意味着,你不必需要 root 权限就可以限制一个程序的带宽使用。要能使用 trickle 程序控制程序的带宽,这个程序就必须使用非静态链接库的套接字接口。当你想对一个不具有内置带宽控制功能的程序进行速率限制时,trickle 可以帮得上忙。 在 Ubuntu,Debian 及其衍生发行版中安装 trickle : @@ -20,10 +20,10 @@ $ sudo apt-get install trickle $ sudo yum install trickle ``` -trickle 的基本使用方法如下。仅需简单地把 trickle 命令(带有速率参数)放在你想运行的命令之前。 +trickle 的基本使用方法如下。仅需简单地把 trickle 命令(及速率参数)放在你想运行的命令之前。 ``` -$ trickle -d -u +$ trickle -d -u ``` 这就可以将 `` 的下载和上传速率限定为特定值(单位 KBytes/s)。 @@ -34,27 +34,27 @@ $ trickle -d -u $ trickle -u 100 scp backup.tgz alice@remote_host.com: ``` -如若你想,你可以使用下面的命令为你的 Firefox 浏览器设定最大下载速率(e.g. , 300 KB/s),通过产生一个[自定义启动器][3]的方式。 +如若你想,你可以通过创建一个[自定义启动器][3]的方式,使用下面的命令为你的 Firefox 浏览器设定最大下载速率(例如, 300 KB/s)。 ``` trickle -d 300 firefox %u ``` -最后, trickle 也可以 以守护进程模式运行,在该模式下,它将会限制所有通过 trickle 启动且正在运行的程序的总的带宽和。 启动 trickle 使其作为一个守护进程(i.e., trickled): +最后, trickle 也可以以守护进程模式运行,在该模式下,它将会限制所有通过 trickle 启动且正在运行的程序的总带宽之和。 启动 trickle 使其作为一个守护进程(例如, trickled): ``` $ sudo trickled -d 1000 ``` -一旦 trickled 守护进程在后台运行,你便可以通过 trickle 命令来启动其他程序。假如你通过 trickle 启动一个程序,那么这个程序的最大下载速率将是 1000 KB/s, 假如你再通过 trickle 启动了另一个程序,则每个程序的(下载)速率极限将会被限制为 500 KB/s, 等等。 +一旦 trickled 守护进程在后台运行,你便可以通过 trickle 命令来启动其他程序。假如你通过 trickle 启动一个程序,那么这个程序的最大下载速率将是 1000 KB/s, 假如你再通过 trickle 启动了另一个程序,则每个程序的(下载)速率极限将会被限制为 500 KB/s,等等。 ### 在 Linux 中限制一个网络接口的速率 ### -另一种控制你的带宽资源的方式是在每一个接口上限制带宽。这在你与其他人分享你的网络连接的上行带宽时尤为实用。同其他一样,Linux 有一个工具来为你做这件事。[wondershaper][4]恰好执行限制网络接口速率的任务。 +另一种控制你的带宽资源的方式是在每一个接口上限制带宽。这在你与其他人分享你的网络连接的上行带宽时尤为实用。同其他一样,Linux 有一个工具来为你做这件事。[wondershaper][4]就是干这个的。 -wondershaper 实际上是一个 shell 脚本,它使用 [tc][5] 来定义流量调整命令,使用 QoS 来处理特定的网络接口。通过放置被赋予不同的优先级的传出流量在一个队列中,达到限制传出流量速率的目的, 而传入流量通过丢包的方式来达到速率限制的目的。 +wondershaper 实际上是一个 shell 脚本,它使用 [tc][5] 来定义流量调整命令,使用 QoS 来处理特定的网络接口。外发流量通过放在不同优先级的队列中,达到限制传出流量速率的目的;而传入流量通过丢包的方式来达到速率限制的目的。 -事实上, wondershaper 的既定目标不仅仅是对一个接口增加其带宽上限;当批量下载或上传正在进行时,wondershaper 还试图去保持互动性会话如SSH 的低延迟。同样的,它还确保批量上传(e.g. , Dropbox 的同步)不会使得下载“窒息”,反之亦然。 +事实上, wondershaper 的既定目标不仅仅是对一个接口增加其带宽上限;当批量下载或上传正在进行时,wondershaper 还试图去保持互动性会话如 SSH 的低延迟。同样的,它还会控制批量上传(例如, Dropbox 的同步)不会使得下载“窒息”,反之亦然。 在 Ubuntu Debian 及其衍生发行版本 中安装 wondershaper: @@ -62,9 +62,9 @@ wondershaper 实际上是一个 shell 脚本,它使用 [tc][5] 来定义流量 $ sudo apt-get install wondershaper ``` -在 Fdora 或 CentOS/RHEL (带有 [EPEL 软件仓库][2]) 中安装 wondershaper:(注:这里 链接 2 和 6 一样,可以删除其中之一) +在 Fdora 或 CentOS/RHEL (带有 [EPEL 软件仓库][2]) 中安装 wondershaper: -`` +``` $ sudo yum install wondershaper ``` @@ -90,7 +90,7 @@ $ sudo wondershaper clear eth0 ### 总结 ### -在本教程中,我介绍了两种不同的方法,来达到如何在 Linux 桌面环境中,控制每个应用或每个接口的带宽使用的目的。 这些工具对用户都及其友好,都为用户提供了一个快速且容易的方式来调整或限制流量。 对于那些想更多地了解如何在 Linux 中进行速率控制的读者,请参考 [the Linux bible][7]. +在本教程中,我介绍了两种不同的方法,来达到如何在 Linux 桌面环境中,控制每个应用或每个接口的带宽使用的目的。 这些工具的使用都很简单,都为用户提供了一个快速且容易的方式来调整或限制流量。 对于那些想更多地了解如何在 Linux 中进行速率控制的读者,请参考 [the Linux bible][7]. -------------------------------------------------------------------------------- @@ -98,15 +98,15 @@ via: http://xmodulo.com/limit-network-bandwidth-linux.html 作者:[Dan Nanni][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/nanni [1]:http://monkey.org/~marius/trickle -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[2]:http://linux.cn/article-2324-1.html [3]:http://xmodulo.com/create-desktop-shortcut-launcher-linux.html [4]:http://lartc.org/wondershaper/ [5]:http://lartc.org/manpages/tc.txt -[6]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[6]:http://linux.cn/article-2324-1.html [7]:http://www.lartc.org/lartc.html From 7f70e58a04f43ca03d744fa0b5bea8979ec5b1ef Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 26 Mar 2015 15:08:29 +0800 Subject: [PATCH 0384/2517] PUB:20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability @geekpi --- ... To Protect Ubuntu Server Against the GHOST Vulnerability.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {translated/tech => published}/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md (97%) diff --git a/translated/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md b/published/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md similarity index 97% rename from translated/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md rename to published/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md index 38b7c955d3..243c4212d0 100644 --- a/translated/tech/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md +++ b/published/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md @@ -36,7 +36,7 @@ via: http://www.ubuntugeek.com/how-to-protect-ubuntu-server-against-the-ghost-vu 作者:[ruchi][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ca7e27cfce532bbc8568d332443adbc0627b3e7c Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 26 Mar 2015 15:54:53 +0800 Subject: [PATCH 0385/2517] PUB:20150211 Best Known Linux Archive or Compress Tools @FSSlc --- ...t Known Linux Archive or Compress Tools.md | 86 +++++++++---------- 1 file changed, 42 insertions(+), 44 deletions(-) rename {translated/tech => published}/20150211 Best Known Linux Archive or Compress Tools.md (67%) diff --git a/translated/tech/20150211 Best Known Linux Archive or Compress Tools.md b/published/20150211 Best Known Linux Archive or Compress Tools.md similarity index 67% rename from translated/tech/20150211 Best Known Linux Archive or Compress Tools.md rename to published/20150211 Best Known Linux Archive or Compress Tools.md index 9938efd5a5..c570ee62a4 100644 --- a/translated/tech/20150211 Best Known Linux Archive or Compress Tools.md +++ b/published/20150211 Best Known Linux Archive or Compress Tools.md @@ -2,16 +2,11 @@ Linux 下最为人熟知的归档/压缩工具 ================================================================================ 很多时候,通过互联网发送或接收大文件和图片是一件令人头疼的事。压缩及解压缩工具正好可以应对这个问题。下面让我们快速浏览一些可以使得我们的工作更加轻松的开源工具。 -Tar -gzip, gunzip -bzip2, bunzip2 -7-Zip - ### Tar ### -Tar 由 'Tape archiver' 衍生而来,最初被用来在磁带上归档和存储文件。Tar 是一个 GNU 软件,它可以压缩一组文件(归档),或提取它们以及对已经存在的压缩文件进行相关操作。在存储、备份以及转移文件方面,它是很有帮助的。在创建归档文件时,Tar 可以保持原有文件和目录结构不变。通过 Tar 归档的文件的后缀名为 ‘.tar’。 +Tar 由 'Tape archiver(磁带归档器)' 衍生而来,最初被用来在磁带上归档和存储文件。Tar 是一个 GNU 软件,它可以压缩一组文件(归档),或提取它们以及对已有的归档文件进行相关操作。在存储、备份以及传输文件方面,它是很有用的。在创建归档文件时,Tar 可以保持原有文件和目录结构不变。通过 Tar 归档的文件的后缀名为 ‘.tar’。 -基本用法 +**基本用法如下:** #### a) 创建归档 (c / --create) #### @@ -23,7 +18,7 @@ Tar 由 'Tape archiver' 衍生而来,最初被用来在磁带上归档和存 ![tar cvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-cvf.png) -创建一个归档 +*创建一个归档* #### b) 列出归档文件内容 ( t / --list) #### @@ -31,7 +26,7 @@ Tar 由 'Tape archiver' 衍生而来,最初被用来在磁带上归档和存 ![tar tvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-tvf.png) -列出归档中包含的文件 +*列出归档中包含的文件* #### c) 提取归档 (x / --extract) #### @@ -41,45 +36,45 @@ Tar 由 'Tape archiver' 衍生而来,最初被用来在磁带上归档和存 ![tar xvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-xvf.png) -提取文件 +*提取文件* ![tar xvf --wildcards](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-wildcard.png) -只提取需要的文件 +*只提取需要的文件* -#### d) 对归档进行更新 ( u / --update) #### +#### d) 对归档文件进行更新 ( u / --update) #### - tar uvf archive.tar newfile.c - 假如归档的版本比先前存在的版本新,通过添加文件 newfile.c 来更新归档. + tar uvf archive.tar newfile.c - 假如归档的newfile.c 要比先前已经归档的新,则添加更新的 newfile.c 到归档里面. ![tar uvf](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-uvf.png) -更新一个归档 +*更新一个归档* #### e) 从归档中删除文件 (--delete) #### - tar--delete -f archive.tar file1.c - 从压缩包'archive.tar' 中删除文件'file1.c' + tar --delete -f archive.tar file1.c - 从压缩包'archive.tar' 中删除文件'file1.c' ![tar --delete](http://blog.linoxide.com/wp-content/uploads/2015/01/tar-delete.png) -删除文件 +*删除文件* 更加具体的使用方法请参考[tar 主页][1]。 ### Gzip / Gunzip ### -Gzip 代表 GNU zip,它是一个被广泛用于 Linux 操作系统中的压缩应用,被其压缩的文件的后缀名为'*.gz' 。 +Gzip 即 GNU zip,它是一个被广泛用于 Linux 操作系统中的压缩应用,被其压缩的文件的后缀名为'*.gz' 。 -** 基本用法 ** +**基本用法如下:** #### a) 压缩文件 #### gzip file(s) -每个文件将被单独压缩。 +每个文件将被**单独压缩**。 ![gzip](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip.png) -压缩文件 +*压缩文件* 通常在压缩完成后,它会将原来的文件删除。我们可以使用 `-c` 选项来保留原来的文件。 @@ -87,7 +82,7 @@ Gzip 代表 GNU zip,它是一个被广泛用于 Linux 操作系统中的压缩 ![gzip-c](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-c.png) -压缩后保留原有文件 +*压缩后保留原有文件* 我们也可以将一组文件压缩到一个单独的文件中 @@ -95,7 +90,7 @@ Gzip 代表 GNU zip,它是一个被广泛用于 Linux 操作系统中的压缩 ![gz group](http://blog.linoxide.com/wp-content/uploads/2015/01/gz-group.png) -压缩一组文件 +*压缩一组文件* #### b) 检查压缩比 #### @@ -105,17 +100,17 @@ Gzip 代表 GNU zip,它是一个被广泛用于 Linux 操作系统中的压缩 ![gzip -l](http://blog.linoxide.com/wp-content/uploads/2015/01/gzip-l.png) -检查压缩率 +*检查压缩率* #### c) 解压文件 #### -Gunzip 被用来解压文件,在这里,原有文件在被解压后同样会被删除。使用 `-c`选项来保留原始文件。 +Gunzip 用来解压文件,在这里,原有的(压缩)文件在被解压后同样会被删除。使用 `-c`选项来保留原始文件。 gunzip -c archieve.gz ![gunzip -c](http://blog.linoxide.com/wp-content/uploads/2015/01/gunzip-c.png) -解压文件 +*解压文件* gzip 加上'-d'选项 和 gunzip 对压缩文件有同样的效果。 @@ -125,47 +120,50 @@ gzip 加上'-d'选项 和 gunzip 对压缩文件有同样的效果。 同 gzip 一样,[Bzip2][3] 也是一个压缩工具,与其他传统的工具相比,它可以将文件压缩到更小,但其缺点为:运行速度比 gzip 慢。 -** 基本用法 ** +**基本用法如下:** #### a) 压缩文件 #### -一般情况下,针对压缩而言,Bzip2 没有选项可供选择,将被压缩的文件被传递为它的参数。每个文件被单独压缩,且压缩文件以 'bz2' 为后缀名。 +一般情况下,针对压缩而言,Bzip2 不用什么选项,将被压缩的文件被传递为它的参数。每个文件被单独压缩,且压缩文件以 'bz2' 为后缀名。 bzip2 file1 file2 file3 ![bzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2.png) -文件压缩 +*文件压缩* -使用 '-k' 选项可以使得 在压缩或解压缩之后保留原有的文件。 +使用 '-k' 选项可以使得在压缩或解压缩之后保留原有的文件。 ![bzip2 -k](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-k.png) -在压缩后保留原有文件。 +*在压缩后保留原有文件* -'-d' 选项被用来强制解压缩。 + +#### b) 解压 #### + +'-d' 选项被用来解压缩。 ![bzip2 -d](http://blog.linoxide.com/wp-content/uploads/2015/01/bzip2-d.png) -使用 -d 选项删除文件 (!! 注:我(FSSlc)认为 这里的图片说明有误,可以参考 manpage或bzip 的官网来校对一下。) +*使用 -d 选项解压缩文件* -#### b) 解压 #### +也可以使用 bunzip2 来解压缩。 bunzip2 filename ![bunzip2](http://blog.linoxide.com/wp-content/uploads/2015/01/bunzip2.png) -解压文件 +*解压文件* bunzip2 可以解压后缀名为 bz2, bz, tbz2 和 tbz 的文件。带有 tbz2 和 tbz 的文件在压缩后,后缀名将变为'.tar' 。 - bzip2 -dc 执行解压文件到标准输出的功能。 + bzip2 -dc - 执行解压文件到标准输出的功能。 ### 7-zip ### -[7-zip][4] 是另一个开源压缩软件。它使用 7z 这种新的压缩格式,并支持高压缩比。因此,它被认为是比先前提及的压缩工具更好的软件。在 Linux 下,可以通过 p7zip 软件包得到,该软件包里包含 3 个二进制文件 – 7z, 7za 和 7zr,读者可以参考 [p7zip wiki][5] 来了解这三个二进制文件之间的不同。在本篇中,我们将使用 7zr 来解释 7-zip 的用法。归档文件以 '.7z' 为后缀名。 +[7-zip][4] 是另一个开源压缩软件。它使用 7z 这种新的压缩格式,并支持高压缩比。因此,它被认为是比先前提及的压缩工具更好的软件。在 Linux 下,可以通过 p7zip 软件包得到,该软件包里包含 3 个二进制文件: 7z, 7za 和 7zr,读者可以参考 [p7zip wiki][5] 来了解这三个二进制文件之间的不同。在本篇中,我们将使用 7zr 来解释 7-zip 的用法。归档文件以 '.7z' 为后缀名。 -** 基本用法 ** +**基本用法如下:** #### a) 创建归档 #### @@ -173,7 +171,7 @@ bunzip2 可以解压后缀名为 bz2, bz, tbz2 和 tbz 的文件。带有 tbz2 ![7zr a](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-a.png) -创建一个归档文件 +*创建一个归档文件* #### b) 列出归档包含文件 #### @@ -181,7 +179,7 @@ bunzip2 可以解压后缀名为 bz2, bz, tbz2 和 tbz 的文件。带有 tbz2 ![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-l.png) -列出归档中包含的文件 +*列出归档中包含的文件* #### c) 提取归档文件 #### @@ -189,7 +187,7 @@ bunzip2 可以解压后缀名为 bz2, bz, tbz2 和 tbz 的文件。带有 tbz2 ![7zr e](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-e.png) -提取归档 +*提取归档* #### d) 更新归档文件 #### @@ -197,7 +195,7 @@ bunzip2 可以解压后缀名为 bz2, bz, tbz2 和 tbz 的文件。带有 tbz2 ![7zr u](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-u.png) -更新一个归档文件 +*更新一个归档文件* #### e) 从归档文件中删除文件 #### @@ -205,11 +203,11 @@ bunzip2 可以解压后缀名为 bz2, bz, tbz2 和 tbz 的文件。带有 tbz2 ![7zr d](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d.png) -删除文件 +*删除文件* ![7zr l](http://blog.linoxide.com/wp-content/uploads/2015/01/7zr-d-l.png) -确认文件删除 +*确认文件删除* -------------------------------------------------------------------------------- @@ -217,7 +215,7 @@ via: http://linoxide.com/tools/linux-compress-decompress-tools/ 作者:[B N Poornima][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a91774045a511d42ee6aef922a40813b3d76ee4d Mon Sep 17 00:00:00 2001 From: dbarobin Date: Thu, 26 Mar 2015 16:37:20 +0800 Subject: [PATCH 0386/2517] [Translated] dbarobin translated, 20150324 4 Tools to Securely Delete Files from Linux --- ...ols to Securely Delete Files from Linux.md | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 translated/20150324 4 Tools to Securely Delete Files from Linux.md diff --git a/translated/20150324 4 Tools to Securely Delete Files from Linux.md b/translated/20150324 4 Tools to Securely Delete Files from Linux.md new file mode 100644 index 0000000000..bbf0dcb3bf --- /dev/null +++ b/translated/20150324 4 Tools to Securely Delete Files from Linux.md @@ -0,0 +1,130 @@ +# Linux 下四种安全删除文件的工具 # + +任何一个普通水平的计算机用户都知道,从计算机系统中删除的任意数据都可以稍候通过一些努力恢复出来。当你不小心删除了你的重要数据,这是一个不错的方案。但是大多数情况,你不希望你的隐私数据被轻易地恢复。不论何时,我们删除任意的文件,操作系统删除的仅仅是特定数据的索引。这就意味着,数据仍然保存在磁盘的某块地方,这种方法是不安全的,任何一个聪明的计算机黑客可以使用任意不错的数据恢复工具来恢复你删除的数据。Linux 用户利用我们都知晓的 "rm" 命令来从他们的操作系统中删除数据,但是 "rm" 命令在约定俗成的场景下工作。从这个命令删除的数据也可以使用特殊的文件恢复工具恢复。 + +让我们看看怎样安全并且完整地从你地 Linux 系统中删除文件或者文件夹。以下提到的工具可以完全地删除数据,因此那些恢复工具很难找到真实数据的痕迹然后恢复它。 + +### Secure-Delete ### + +Secure-Delete 是一组为 Linux 操作系统而生的工具集合,他们为永久删除文件提供高级的技术支持。一旦 Secure-Delete 安装在任意的 Linux 系统,它会提供如下的四个命令: + +- srm +- smem +- sfill +- sswap + +在 ubuntu 的终端中运行如下命令安装此工具: + + sudo apt-get install secure-delete + +![secure delete](http://blog.linoxide.com/wp-content/uploads/2015/03/secure-delete.png) + +在 RHEL,Fedora 或者 Centos 中运行如下命令安装此工具: + + sudo yum install secure-delete + +“**srm**” 命令的工作方式和 "rm" 命令类似,但是它不仅仅是删除文件,它首先使用一些随机的数据重写数次文件,然后彻底地删除此文件。这个命令的语法是相当地简单,仅仅指定要删除的文件或者目录,然后它会负责此任务。 + + sudo srm /home/aun/Documents/xueo/1.png + +"**sfill**" 检测在指定的分区或者目录被标记为空闲或者可用的空间,然后使用它自身的算法用一些随机数据填充。因此它保证了在此分区没有可以恢复的文件或者文件夹。 + + sudo sfill /home + +"**sswap**" 命令用来安全地清除你的交换分区。交换分区用来存放运行程序的数据。首先我们需要运行如下命令来找到你的交换分区。 + + cat /proc/swaps + +如下是上述命令的输出示例: + + aun@eagle:~$ cat /proc/swaps + Filename Type Size Used Priority + /dev/sda5 partition 2084860 71216 -1 + +从现在起,你可以看到你的交换分区设置在哪个分区,然后使用如下命令安全地清除。替换 "/dev/sda5" 部分为你的交换分区名字。 + + sudo sswap /dev/sda5 + +“**smem**” 用来清理在内存中的内容,它保证当系统重启或者关机时随机存取存储器(RAM)中的内容被清理,但是残余的数据痕迹仍然保存在内存。这个命令提供安全的内存清理,简单地在终端中运行 smem 命令。 + + smem + +### Shred ### + +"shred" 命令销毁文件或者文件夹的内容,在某种程度上,不可能恢复。它使用随机生成的数据模式来持续重写文件,因此很难恢复任意的被销毁的数据,即使是那些黑客或者窃贼使用高水平的数据恢复工具或者设备。Shred 在 Linux 发行版中时默认安装的,如果你想,你可以运行如下命令来找到它的安装目录: + + aun@eagle:~$ whereis shred + + shred: /usr/bin/shred /usr/share/man/man1/shred.1.gz + +使用 shred 工具运行如下命令来删除文件: + + shred /home/aun/Documents/xueo/1.png + +使用 shred 运行如下命令来删除任意的分区,用你期望的分区来替换分区名字。 + + shred /dev/sda5 + +Shred 默认情况下使用随机内容重写数据 25 次。如果你想它重写文件更多次数,可以使用 "shred -n" 选项来简单地指定你所期望的次数。 + + shred -n 100 filename + +如果你想在重写后截断或者删除文件,使用 "shred -u" 选项: + + shred -u filename + +### dd ### + +这个命令起初是用于磁盘克隆的。它用于一个分区或者一个磁盘复制到另一个分区或者磁盘。但是它还用于安全地清除硬盘或者分区的内容。运行如下命令使用随机数据来重写你的当前数据。你不需要安装 dd 命令,所有的 Linux 分发版都已经包含了此命令。 + + sudo dd if=/dev/random of=/dev/sda + +你也可以重写磁盘或者分区中的内容,只需要简单地将所有替换为 “zero”。 + + sudo dd if=/dev/zero of=/dev/sda + +### Wipe ### + +Wipe 起初开发的目的是从磁媒体中安全地擦除文件。这个命令行工具使用特殊的模式来重复地写文件。它使用 fsync() 调用和或 O_SYNC 位来强制访问磁盘,并且使用 Gutmann 算法来重复地写。你可以使用此命令删除单个文件,文件夹或者整个磁盘的内容,但是使用 wipe 命令来删除整个磁盘的模式会耗费大量的时间。另外,安装和使用这个工具相当容易。 + +在 ubuntu 的终端中运行如下命令来安装 wipe。 + + sudo aptitude install wipe + +![Wipe Linux](http://blog.linoxide.com/wp-content/uploads/2015/03/wipe.png) + +使用如下命令在 Redhat Linux,Centos 或者 Fedora 中安装 Wipe: + + sudo yum install wipe + +一旦安装完成,在终端中运行如下命令来获得完整的可用选项列表: + + man wipe + +删除任意文件或者目录: + + wipe filename + +运行如下命令来安全地移除 tmp 分区: + + wipe -r /tmp + +使用如下的命令来删除完整分区的内容(替换分区名字为你所期望的分区)。 + + wipe /dev/sda1 + +### 小结 ### + +我们期望这篇文章对你有帮助,你的数据隐私是有决定性意义的,在你的系统中安装这些安全的删除工具对你来说非常重要,因此你可以删除你的隐私数据而不用担心它们被轻易地恢复。上面提到的所有工具都是相当轻量的,它们只需要耗费最低的系统资源来运行,并且无论如何也不会影响你的系统性能。享受它们带来的便利吧! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/security/delete-files-permanatly-linux/ + +作者:[Aun Raza][a] +译者:[dbarobin](https://github.com/dbarobin) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ \ No newline at end of file From 7b0a75178304c73b66cfc98f7d106df64e924d63 Mon Sep 17 00:00:00 2001 From: dbarobin Date: Thu, 26 Mar 2015 16:39:34 +0800 Subject: [PATCH 0387/2517] [Translated] dbarobin translated, 20150324 4 Tools to Securely Delete Files from Linux --- ...ols to Securely Delete Files from Linux.md | 132 ------------------ ...ols to Securely Delete Files from Linux.md | 0 2 files changed, 132 deletions(-) delete mode 100644 sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md rename translated/{ => tech}/20150324 4 Tools to Securely Delete Files from Linux.md (100%) diff --git a/sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md b/sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md deleted file mode 100644 index 7012e405ab..0000000000 --- a/sources/tech/20150324 4 Tools to Securely Delete Files from Linux.md +++ /dev/null @@ -1,132 +0,0 @@ -dbarobin translating - -4 Tools to Securely Delete Files from Linux -================================================================================ -Any computer user with normal level skill set knows that any data removed from computer system can be recovered later with little bit of efforts. This is a good thing in the scenario when you have accidentally deleted your critical data. But in most cases, you don't want your private data to be recovered easily. Whenever we remove anything, the operating system deletes just the index of the particular data. It means that data is still there somewhere on the disk, this method is insecure, as any smart computer hacker can use any good data recovery tool to easily recover your deleted data. Linux users utilizes the well know “**rm**” command to remove data from their operating system, but “rm” command works in the conventional fashion. Data removed using this command can be recovered by special file recovery tools. - -Let’s see how we can safely and completely remove files/folders from our Linux system. The methods mentioned below remove data completely so it becomes very hard for recovery tools to find traces of the actual data and recover it. - -### Secure-Delete ### - -Secure-Delete is a set of tools for Linux operating system and they provide advanced techniques for permanent removal of files. Once Secure-Delete has been installed on any Linux system, it provides following four commands: - -- srm -- smem -- sfill -- sswap - -Run following command in the terminal to install it in ubuntu: - - sudo apt-get install secure-delete - -![secure delete](http://blog.linoxide.com/wp-content/uploads/2015/03/secure-delete.png) - -Run following command to install it in RHEL, Fedora or Centos: - - sudo yum install secure-delete - -“**srm**” command works similarly to “rm” command, but instead of just deleting the file, it first overwrites it multiple times with some random data and then removes the file permanently. The syntax for this command is pretty simply, just specify the file or directory to remove and it will take care of the task. - - sudo srm /home/aun/Documents/xueo/1.png - -"**sfill**" checks the specified partition/directories for space marked as free or available, and then uses its algorithm to fill it up with some random data. In this way it ensures that there are no more recoverable files/folders on the partition. - - sudo sfill /home - -"**sswap**" command is used to securely wipe your swap partitions. Swap partition is used to store data for running programs. First of all find out your swap partition by running the following command: - - cat /proc/swaps - -Example output of above command is show below: - - aun@eagle:~$ cat /proc/swaps - Filename Type Size Used Priority - /dev/sda5 partition 2084860 71216 -1 - -From here, you can see that swap is set to which partition, and then securely clean it by running the following command. Replace the "/dev/sda5" part with your partition name. - - sudo sswap /dev/sda5 - -“**smem**” is used to clean the contents of memory, its true that RAM contents are cleaned when system is rebooted or powered off, but some residual traces of data still remain in the memory. This command provides secure memory cleaning, simly run smem command on the terminal. - - smem - -### Shred ### - -"shred" command destroys files/folder’s contents in a way that it is impossible to recover. It keeps overwriting the files with randomly generated data patterns so in this way it becomes very hard to recover any data from them even if hackers or thief uses high level of data recovery tools/equipments. Shred is installed by default on all Linux distributions, if you want, you can find its installation path by running following command: - - aun@eagle:~$ whereis shred - - shred: /usr/bin/shred /usr/share/man/man1/shred.1.gz - -Run following command to remove file using shred utility. - - shred /home/aun/Documents/xueo/1.png - -Run following command to securely remove any partition using shred ; Replace partition name with your desired partition. - - shred /dev/sda5 - -Shred by default overwrites file with random contents 25 times. If you want it to overwrite file more than this, simply specify the desired number with "shred -n" option. - - shred -n 100 filename - -If you want to truncate and remove file after overwriting, use "shred -u" option - - shred -u filename - -### dd ### - -This command is originally used for Disk Cloning. It is used to copy contents of one partition or disk to another. But it is also used for securely wiping out the contents of a hard disk or partitions. Run following command to overwrite your current data with random data.You don't need to install dd command, all Linux distributions include this command already. - - sudo dd if=/dev/random of=/dev/sda - -You can also overwrite the contents of hard disk or partitions by simply replacing everything with “zero”. - - sudo dd if=/dev/zero of=/dev/sda - -### Wipe ### - -Wipe was originally developed to securely erase files from magnetic media. This command line utility writes special patterns to the files repeatedly. It uses fsync() call and/or the O_SYNC bit to force disk access. It uses Gutmann algorithm for repeated writes. You can remove contents of single file, folder or entire hard disk with this command, but whole hard disk format using wipe command will take good amount of time. The installation and use of this utility is pretty easy. - -Install wipe on ubuntu by running the following command on the terminal. - - sudo aptitude install wipe - -![Wipe Linux](http://blog.linoxide.com/wp-content/uploads/2015/03/wipe.png) - -Install Wipe in Redhat Linux, Centos or Fedora by running the following command: - - sudo yum install wipe - -Once the installation is complete, run following command on the terminal to get complete list of its available options: - - man wipe - -Remove any file or directory as: - - wipe filename - -Securely remove your tmp partition by running following command: - - wipe -r /tmp - -Use following command to remove contents of complete partition (replace partition name with your desired partition). - - wipe /dev/sda1 - -### Conclusion ### - -We hope you find this article useful, the privacy of your data is critical, its important to have such secure file removal utilities installed on your system so you may be able to remove your private data without fear of being recovered easily. All of the above mentioned tools are pretty lightweight, they take minimum system resources to run, and does not affect performance of your system in anyway. Enjoy! - --------------------------------------------------------------------------------- - -via: http://linoxide.com/security/delete-files-permanatly-linux/ - -作者:[Aun Raza][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunrz/ diff --git a/translated/20150324 4 Tools to Securely Delete Files from Linux.md b/translated/tech/20150324 4 Tools to Securely Delete Files from Linux.md similarity index 100% rename from translated/20150324 4 Tools to Securely Delete Files from Linux.md rename to translated/tech/20150324 4 Tools to Securely Delete Files from Linux.md From 5f385fe5738e2cc3427f988034b3c7c3ddac2797 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 26 Mar 2015 16:44:03 +0800 Subject: [PATCH 0388/2517] =?UTF-8?q?20150326-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...26 Mydumper--Mysql Database Backup tool.md | 110 ++++++++ ...to Process Management Commands in Linux.md | 191 +++++++++++++ ... up server monitoring system with Monit.md | 252 ++++++++++++++++++ 3 files changed, 553 insertions(+) create mode 100644 sources/share/20150326 Mydumper--Mysql Database Backup tool.md create mode 100644 sources/tech/20150326 A Peep into Process Management Commands in Linux.md create mode 100644 sources/tech/20150326 How to set up server monitoring system with Monit.md diff --git a/sources/share/20150326 Mydumper--Mysql Database Backup tool.md b/sources/share/20150326 Mydumper--Mysql Database Backup tool.md new file mode 100644 index 0000000000..e8260760e2 --- /dev/null +++ b/sources/share/20150326 Mydumper--Mysql Database Backup tool.md @@ -0,0 +1,110 @@ +Mydumper – Mysql Database Backup tool +================================================================================ +Mydumper is a tool used for backing up MySQL database servers much faster than the mysqldump tool distributed with MySQL. It also has the capability to retrieve the binary logs from the remote server at the same time as the dump itself. + +### Mydumper advantages ### + +o Parallelism (hence, speed) and performance (avoids expensive character set conversion routines, efficient code overall) + +o Easier to manage output (separate files for tables, dump metadata,etc, easy to view/parse data) + +o Consistency -- maintains snapshot across all threads, provides accurate master and slave log positions, etc + +o Manageability -- supports PCRE for specifying database and tables inclusions and exclusions + +### Install mydumper on ubuntu ### + +Open the terminal and run the following command + + sudo apt-get install mydumper + +### Using Mydumper ### + +#### Syntax #### + + mydumper [options] + +Application Options: + +- -B, --database Database to dump +- -T, --tables-list Comma delimited table list to dump (does not exclude regex option) +- -o, --outputdir Directory to output files to +- -s, --statement-size Attempted size of INSERT statement in bytes, default 1000000 +- -r, --rows Try to split tables into chunks of this many rows +- -c, --compress Compress output files +- -e, --build-empty-files Build dump files even if no data available from table +- -x, --regex Regular expression for ‘db.table' matching +- -i, --ignore-engines Comma delimited list of storage engines to ignore +- -m, --no-schemas Do not dump table schemas with the data +- -k, --no-locks Do not execute the temporary shared read lock. WARNING: This will cause inconsistent backups +- -l, --long-query-guard Set long query timer in seconds, default 60 +- --kill-long-queries Kill long running queries (instead of aborting) +- -b, --binlogs Get a snapshot of the binary logs as well as dump data +- -D, --daemon Enable daemon mode +- -I, --snapshot-interval Interval between each dump snapshot (in minutes), requires --daemon, default 60 +- -L, --logfile Log file name to use, by default stdout is used +- -h, --host The host to connect to +- -u, --user Username with privileges to run the dump +- -p, --password User password +- -P, --port TCP/IP port to connect to +- -S, --socket UNIX domain socket file to use for connection +- -t, --threads Number of threads to use, default 4 +- -C, --compress-protocol Use compression on the MySQL connection +- -V, --version Show the program version and exit +- -v, --verbose Verbosity of output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2 + +#### Mydumper Example #### + + mydumper \ + --database=$DB_NAME \ + --host=$DB_HOST \ + --user=$DB_USER \ + --password=$DB_PASS \ + --outputdir=$DB_DUMP \ + --rows=500000 \ + --compress \ + --build-empty-files \ + --threads=2 \ + --compress-protocol + +Description of Mydumper's output data + +Mydumper does not output to files, but rather to files in a directory. The --outputdir option specifies the name of the directory to use. + +The output is two parts + +Schema + +For each table in the database, a file containing the CREATE TABLE statement will be created. It will be named: + +dbname.tablename-schema.sql.gz + +Data + +For each table with number of rows above the --rows parameter, you will have a file called: + +dbname.tablename.0000n.sql.gz + +Where "n" starts with 0 up to the number of. + +If you want to restore these backup you can use Myloader + + myloader \ + --database=$DB_NAME \ + --directory=$DB_DUMP \ + --queries-per-transaction=50000 \ + --threads=10 \ + --compress-protocol \ + --verbose=3 + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/mydumper-mysql-database-backup-tool.html + +作者:[ruchi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file diff --git a/sources/tech/20150326 A Peep into Process Management Commands in Linux.md b/sources/tech/20150326 A Peep into Process Management Commands in Linux.md new file mode 100644 index 0000000000..f05ed62768 --- /dev/null +++ b/sources/tech/20150326 A Peep into Process Management Commands in Linux.md @@ -0,0 +1,191 @@ +A Peep into Process Management Commands in Linux +================================================================================ +A program in execution is called a process. While a program is an executable file present in storage and is passive, a process is a dynamic entity comprising of allocated system resources, memory, security attributes and has a state associated with it. There can be multiple processes associated with the same program and operating simultaneously without interfering with each other. The operating system efficiently manages and keeps track of all the processes running in the system. + +In order to manage these processes, user should be able to + +- See all the processes that are running +- View the system resources consumed by the processes +- Locate a particular process and take specific action on it +- Change the priority levels associated with processes +- Kill the required processes +- Restrict the system resources available to processes etc. + +Linux offers many commands to the user to effectively handle the above mentioned scenarios. Let's understand them one by one. + +### 1. ps ### + +'ps' is one of the basic commands in Linux to view the processes on the system. It lists the running processes in a system along with other details such as process id, command, cpu usage, memory usage etc. Some of the following options come handy to get more useful information + + ps -a - List all the running / active processes + +![Output of "ps -a" command](http://blog.linoxide.com/wp-content/uploads/2015/02/ps-a2.png) + + ps -ef |grep - List only the required process + + ps -aux - Displays processes including those with no terminals(x) Output is user oriented (u) with fields like USER, PID, %CPU, %MEM etc + +### 2. pstree ### + +In Linux, every process gets spawned by its parent process. This command helps visualize the processes by displaying a tree diagram of the processes showing the relationship between them. If a pid is mentioned, the root of the tree will be the pid. Else it will be rooted at init. + +![pstree](http://blog.linoxide.com/wp-content/uploads/2015/02/pstree.png) + +### 3. top ### + +'top' is a very useful command to monitor the system as it shows the system resources used by different processes. It gives a snapshot of the situation that the system is currently in. Its output includes data like process identification number(PID), user of the process, nice value, %CPU and %memory currently consumed by the process etc. One can use this output to figure out which process is hogging the CPU or memory. + +![top](http://blog.linoxide.com/wp-content/uploads/2015/02/top.png) + +### 4. htop ### + +htop is similar to top, but is an interactive text mode process viewer. It displays the per CPU usage and memory, swap usage using a text graph. One can use the Up/Down arrow key to select processes, F7 and F8 to change the priority and F9 to kill a process. It is not present by default in the system and need to be installed explicitly. + +![htop output](http://blog.linoxide.com/wp-content/uploads/2015/03/htop1.png) + +### 5. nice ### + +With the help of nice command, users can set or change the priorities of processes in Linux. Higher the priority of a process, more is the CPU time allocated by the kernel for it. By default, a process gets launched with priority 0. Process priority can be viewed using the top command output under the NI (nice value) column. + +Values of process priority range from -20 to 19. Lower the nice value, higher the priority. + + nice - starts the process by setting its priority to the given value + +![nice command](http://blog.linoxide.com/wp-content/uploads/2015/02/nice-cmd.png) + +![changed nice value of 'top'](http://blog.linoxide.com/wp-content/uploads/2015/02/top-nice.png) + +In the above example, 'top' gets launched with a priority -3. + +### 6. renice ### + +It is similar to nice command. Use this command to change the priority of an already running process. Please note that users can change the priority of only the processes that they own. + + renice -n -p - change the priority of the given process + +![renice command](http://blog.linoxide.com/wp-content/uploads/2015/02/renice2.png) + +Priority of process with id 3806 which had an initial priority of 0 is now changed to priority 4. + + renice -u -g - change the priority of processes owned by the given user and group +![output of renice for a user group](http://blog.linoxide.com/wp-content/uploads/2015/02/renice1.png) + +In the above example, priority of all processes owned by user 'mint' get changed to '-3' + +### 7. kill ### + +This is a command used to terminate processes by sending signals. If a process is not responding to kill command, then it can be forcefully killed using the kill -9 command. But this needs to be used carefully as it does not give a chance for the process to clean up and might end up in corrupted files. If we are not aware of the PID of the process to be killed or want to mention the process name to be killed, then killall comes to rescue. + + kill + + kill -9 + + killall -9 - kill all instances having the same process name + +If you use kill, you need to know the process id of the process to be killed. pkill is a similar command but can be used to kill processes using a pattern, i.e. process name, process owner etc. + + pkill + +![kill initiated](http://blog.linoxide.com/wp-content/uploads/2015/02/kill-initiated.png) + +![kill](http://blog.linoxide.com/wp-content/uploads/2015/02/kill.png) + +### 8. ulimit ### + +Command useful in controlling the system-wide resources available to the shells and processes. Mostly useful for system administrators to manage systems that are heavily used and have performance problems. Limiting the resources ensures that important processes continue to run while other processes do not consume more resources. + + ulimit -a - Displays the current limits associated with the current user. + +![ulimit -a](http://blog.linoxide.com/wp-content/uploads/2015/02/ulimit-a.png) + + -f - maximum file size + + -v - maximum virtual memory size (in KB) + + -n - maximum file descriptor plus 1 + + -H : To change and report the hard limit + + -S : To change and report the soft limit + +Check out the ulimit man page for more options. + +### 9. w ### + +w gives us information about the users who have currently logged in and the processes that they are running. The header details displayed contain information like current time, how long the system has been running, total number of users logged in, load average of the system for the last 1, 5 and 15 minutes + +Based on the user information, one can take care before terminating any processes that do not belong to them. + +!['w' command](http://blog.linoxide.com/wp-content/uploads/2015/02/w.png) + +**who** is a related command and gives a list of currently logged in users, time of last system boot, current run levels etc. + +!['who' command](http://blog.linoxide.com/wp-content/uploads/2015/02/who.png) + +**whoami** command prints the username of the current user ID + +!['whoami' command](http://blog.linoxide.com/wp-content/uploads/2015/02/whoami.png) + +### 10. pgrep ### + +pgrep stands for "Process-ID Global Regular Expression Print". It scans the currently running processes and lists the process IDs that match the selection criteria mentioned on command line to stdout. Useful for retrieving the process id of a process by using its name. + + pgrep -u mint sh + +This command will display the process ID for the process named 'sh' and owned by user 'mint' + +![output of pgrep](http://blog.linoxide.com/wp-content/uploads/2015/03/pgrep.png) + +### 11. fg , bg ### + +Sometimes, the commands that we execute take a long time to complete. In such situations, we can push the jobs to be executed in the background using 'bg' command and can be brought to the foreground with the 'fg' command. + +We can start a program in background by using the '&' : + + find . -name *iso > /tmp/res.txt & + +A program that is already running can also be sent to the background using 'CTRL+Z' and 'bg' command: + + find . -name *iso > /tmp/res.txt & - start the job in the background + + ctrl+z - suspend the currently executing foreground job + + bg - push the command execution to background + +We can list all the background processes using 'jobs' command + + jobs + +We can bring back a background process to foreground using the 'fg' command. + + fg % + +![output of fg, bg and jobscommands](http://blog.linoxide.com/wp-content/uploads/2015/03/fg-bg-jobs.png) + +### 12. ipcs ### + +ipcs command is used for listing the inter-process communication facilities (shared memory, semaphores and message queues). + +This command with -p option can be combined with options -m, -s or-q to display the process id which recently accessed the corresponding ipc facility. + + ipcs -p -m + +The screen shot below is listing the creator id and process id which accessed the shared memory recently. + +![ipcs command](http://blog.linoxide.com/wp-content/uploads/2015/03/ipcs.png) + +### Conclusion ### + +Generally, it is considered the job of administrators to fix problems and tweak the system to improve the performance. But users also need to deal with processes in Linux quite often. Hence, it is essential to familiarise ourselves with the various commands available to manage them effectively. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/process-management-commands-linux/ + +作者:[B N Poornima][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bnpoornima/ \ No newline at end of file diff --git a/sources/tech/20150326 How to set up server monitoring system with Monit.md b/sources/tech/20150326 How to set up server monitoring system with Monit.md new file mode 100644 index 0000000000..c8f9efaecd --- /dev/null +++ b/sources/tech/20150326 How to set up server monitoring system with Monit.md @@ -0,0 +1,252 @@ +How to set up server monitoring system with Monit +================================================================================ +Many Linux admins rely on a centralized remote monitoring system (e.g., [Nagios][1] or [Cacti][2]) to check the health of their network infrastructure. While centralized monitoring makes an admin's life easy when dealing with many hosts and devices, a dedicated monitoring box obviously becomes a single point of failure; if the monitoring box goes down or becomes unreachable for whatever reason (e.g., bad hardware or network outage), you will lose visibility on your entire infrastructure. + +One way to add redundancy to your monitoring system is to install standalone monitoring software (as a fallback) at least on any critical/core servers on your network. In case a centralized monitor is down, you will still be able to maintain visibility on your core servers from their backup monitor. + +### What is Monit? ### + +[Monit][3] is a cross-platform open-source tool for monitoring Unix/Linux systems (e.g., Linux, BSD, OSX, Solaris). Monit is extremely easy to install and reasonably lightweight (with only 500KB in size), and does not require any third-party programs, plugins or libraries. Yet, Monit lends itself to full-blown monitoring, capable of process status monitoring, filesystem change monitoring, email notification, customizable actions for core services, and so on. The combination of ease of setup, lightweight implementation and powerful features makes Monit an ideal candidate for a backup monitoring tool. + +I have been using Monit for several years on multiple hosts, and I am very pleased how reliable it has been. Even as a full-blown monitoring system, Monit is very useful and powerful for any Linux admin. In this tutorial, let me demonstrate how to set up Monit on a local server (as a backup monitor) to monitor common services. With this setup, I will only scrach the surface of what Monit can do for us. + +### Installation of Monit on Linux ### + +Most Linux distributions already include Monit in their repositories. + +Debian, Ubuntu or Linux Mint: + + $ sudo aptitude install monit + +Fedora or CentOS/RHEL: + +On CentOS/RHEL, you must enable either [EPEL][4] or [Repoforge][5] repository first. + + # yum install monit + +Monit comes with a very well documented configuration file with a lots of examples. The main configuration file is located in /etc/monit.conf in Fedora/CentOS/RHEL, or /etc/monit/monitrc in Debian/Ubuntu/Mint. Monit configuration has two parts: "Global" and "Services" sections. + +Gl### ###obal Configuration: Web Status Page + +Monit can use several mail servers for notifications, and/or an HTTP/HTTPS status page. Let's start with the web status page with the following requirements. + +- Monit listens on port 1966. +- Access to the web status page is encrypted with SSL. +- Login requires monituser/romania as user/password. +- Login is permitted from localhost, myhost.mydomain.ro, and internal LAN (192.168.0.0/16) only. +- Monit stores an SSL certificate in a pem format. + +For subsequent steps, I will use a Red Hat based system. Similar steps will be applicable on a Debian based system. + +First, generate and store a self-signed certificate (monit.pem) in /var/cert. + + # mkdir /var/certs + # cd /etc/pki/tls/certs + # ./make-dummy-cert monit.pem + # cp monit.pem /var/certs + # chmod 0400 /var/certs/monit.pem + +Now put the following snippet in the Monit's main configuration file. You can start with an empty configuration file or make a copy of the original file. + + set httpd port 1966 and + SSL ENABLE + PEMFILE /var/certs/monit.pem + allow monituser:romania + allow localhost + allow 192.168.0.0/16 + allow myhost.mydomain.ro + +### Global Configuration: Email Notification ### + +Next, let's set up email notification in Monit. We need at least one active [SMTP server][6] which can send mails from the Monit host. Something like the following will do (adjust it for your case): + +- Mail server hostname: smtp.monit.ro +- Sender email address used by monit (from): monit@monit.ro +- Who will receive mail from monit daemon: guletz@monit.ro +- SMTP port used by mail server: 587 (default is 25) + +With the above information, email notification would be configured like this: + + set mailserver smtp.monit.ro port 587 + set mail-format { + from: monit@monit.ro + subject: $SERVICE $EVENT at $DATE on $HOST + message: Monit $ACTION $SERVICE $EVENT at $DATE on $HOST : $DESCRIPTION. + + Yours sincerely, + Monit + + } + + set alert guletz@monit.ro + +As you can see, Monit offers several built-in variables ($DATE, $EVENT, $HOST, etc.), and you can customize your email message for your needs. If you want to send mails from the Monit host itself, you need a sendmail-compatible program (e.g., postfix or ssmtp) already installed. + +### Global Configuration: Monit Daemon ### + +The next part is setting up monit daemon. We will set it up as follows. + +- Performs the first check after 120 seconds. +- Checks services once every 3 minutes. +- Use syslog for logging. + +Place the following snippet to achieve the above setting. + + set daemon 120 + with start delay 240 + set logfile syslog facility log_daemon + +We must also define "idfile", a unique ID used by monit demon, and "eventqueue", a path where mails sent by monit but undelivered due to SMTP/network errors. Verifiy that path (/var/monit) already exists. The following configuration will do. + + set idfile /var/monit/id + set eventqueue + basedir /var/monit + +### Test Global Configuration ### + +Now the "Global" section is finished. The Monit configuration file will look like this: + + # Global Section + + # status webpage and acl's + set httpd port 1966 and + SSL ENABLE + PEMFILE /var/certs/monit.pem + allow monituser:romania + allow localhost + allow 192.168.0.0/16 + allow myhost.mydomain.ro + + # mail-server + set mailserver smtp.monit.ro port 587 + # email-format + set mail-format { + from: monit@monit.ro + subject: $SERVICE $EVENT at $DATE on $HOST + message: Monit $ACTION $SERVICE $EVENT at $DATE on $HOST : $DESCRIPTION. + + Yours sincerely, + Monit + + } + + set alert guletz@monit.ro + + # delay checks + set daemon 120 + with start delay 240 + set logfile syslog facility log_daemon + + # idfile and mail queue path + set idfile /var/monit/id + set eventqueue + basedir /var/monit + +Now it is time to check what we have done. You can test an existing configuration file (/etc/monit.conf) by running: + + # monit -t + +---------- + + Control file syntax OK + +If Monit complains about any error, please review the configuration file again. Fortunately, error/warnings messages are informative. For example: + + monit: Cannot stat the SSL server PEM file '/var/certs/monit.pem' -- No such file or directory + /etc/monit/monitrc:10: Warning: hostname did not resolve 'smtp.monit.ro' + +Once you verify the syntax of configuration, start monit daemon, and wait 2 to 3 minutes: + + # service monit start + +If you are using systemd, run: + + # systemctl start monit + +Now open a browser window, and go to https://:1966. Replace & with your Monit hostname or IP address. + +Note that if you have a self-signed SSL certificate, you will see a warning message in your browser. + +![](https://farm8.staticflickr.com/7596/16737206479_96b9f7dfdb_c.jpg) + +After you have completed login, you must see the following page. + +![](https://farm8.staticflickr.com/7594/16303369973_6019482dea_c.jpg) + +In the rest of the tutorial, let me show how we can monitor a local server and common services. You will see a lot of useful examples on the [official wiki page][7]. Most of them are copy-and-pastable! + +### Service Configuration: CPU/Memory Monitoring ### + +Let start with monitoring a local server's CPU/memory usage. Copy the following snippet in the configuration file. + + check system localhost + if loadavg (1min) > 10 then alert + if loadavg (5min) > 6 then alert + if memory usage > 75% then alert + if cpu usage (user) > 70% then alert + if cpu usage (system) > 60% then alert + if cpu usage (wait) > 75% then alert + +You can easily interpret the above configuration. The above checks are performed on local host for every monitoring cycle (which is set to 120 seconds in the Global section). If any condition is met, monit daemon will send an alert with an email. + +If certain properties do not need to be monitored for every cycle, you can use the following format. For example, this will monitor average load every other cycle (i.e., every 240 seconds). + + if loadavg (1min) > 10 for 2 cycles then alert + +### Service Configuration: SSH Service Monitoring ### + +Let's check if we have sshd binary installed in /usr/sbin/sshd: + + check file sshd_bin with path /usr/sbin/sshd + +We also want to check if the init script for sshd exist: + + check file sshd_init with path /etc/init.d/sshd + +Finally, we want to check if sshd daemon is up an running, and listens on port 22: + + check process sshd with pidfile /var/run/sshd.pid + start program "/etc/init.d/sshd start" + stop program "/etc/init.d/sshd stop" + if failed port 22 protocol ssh then restart + if 5 restarts within 5 cycles then timeout + +More specifically, we can interpret the above configuration as follows. We check if a process named sshd and a pidfile (/var/run/sshd.pid) exist. If either one does not exist, we restart sshd demon using init script. We check if a process listening on port 22 can speak SSH protocol. If not, we restart sshd daemon. If there are at least 5 restarts within the last 5 monitoring cycles (i.e., 5x120 seconds), sshd daemon is declared non-functional, and we do not try to check again. + +![](https://farm9.staticflickr.com/8685/16735725998_62c26a24bc_c.jpg) + +### Service Configuration: SMTP Service Monitoring ### + +Now let's set up a check on a remote SMTP mail server (e.g., 192.168.111.102). Let's assume that the SMTP server is running SMTP, IMAP and SSH on its LAN interface. + + check host MAIL with address 192.168.111.102 + if failed icmp type echo within 10 cycles then alert + if failed port 25 protocol smtp then alert + else if recovered then exec "/scripts/mail-script" + if failed port 22 protocol ssh then alert + if failed port 143 protocol imap then alert + +We check if the remote host responds to ICMP. If we haven't received ICMP response within 10 cycles, we send out an alert. If testing for SMTP protocol on port 25 fails, we send out an alert. If testing succeeds again after a failed test, we run a script (/scripts/mail-script). If testing for SSH and IMAP protocols fail on port 22 and 143, respectively, we send out an alert. + +### Conclusion ### + +In this tutorial, I demonstrate how to set up Monit on a local server. What I showed here is just the tip of the iceberg, as far as Monit's capabilities are concerned. Take your time and read the man page about Monit (a very good one). Monit can do a lot for any Linux admin with a very nice and easy to understand syntax. If you put together a centralized remote monitor and Monit to work for you, you will have a more reliable monitoring system. What is your thought on Monit? + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/server-monitoring-system-monit.html + +作者:[Iulian Murgulet][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/iulian +[1]:http://xmodulo.com/monitor-common-services-nagios.html +[2]:http://xmodulo.com/monitor-linux-servers-snmp-cacti.html +[3]:http://mmonit.com/monit/ +[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[5]:http://xmodulo.com/how-to-set-up-rpmforge-repoforge-repository-on-centos.html +[6]:http://xmodulo.com/mail-server-ubuntu-debian.html +[7]:http://mmonit.com/wiki/Monit/ConfigurationExamples \ No newline at end of file From ffea9fb362f9307171a5d71f9178b0e35498c0d0 Mon Sep 17 00:00:00 2001 From: theo-l Date: Thu, 26 Mar 2015 22:25:30 -0300 Subject: [PATCH 0389/2517] translating --- ...ications in a Linux System with Trickle.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md index 446e4f8ec7..3a57c2e5e3 100644 --- a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md +++ b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md @@ -43,18 +43,27 @@ In this article we will explain how to limit the network bandwidth used by appli #### 前提条件 #### 1. For RHEL/CentOS 7/6, [enable the EPEL repository][1]. Extra Packages for Enterprise Linux (EPEL) is a repository of high-quality free and open-source software maintained by the Fedora project and is 100% compatible with its spinoffs, such as Red Hat Enterprise Linux and CentOS. Both trickle and ncftp are made available from this repository. +1. 对于 RHEL/CentOS 7/6, [开启EPEL仓库][1]。EPEL的Extra Packages是一个 +有Fedora项目维护的高质量、开源的软件仓库,而且百分之百与其衍生产品相兼容,如 +企业版本Linux和CentOS. 在这个仓库中trickle和ncftp两者都是可用的。 2. Install ncftp as follows: +2. 按照如下方式安装ncftp: # yum update && sudo yum install ncftp [On RedHat based systems] # aptitude update && aptitude install ncftp [On Debian based systems] 3. Set up a FTP server in a separate server. Please note that although FTP is inherently insecure, it is still widely used in cases when security in uploading or downloading files is not needed. We are using it in this article to illustrate the bounties of trickle and because it shows the transfer rates in stdout on the client, and we will leave the discussion of whether it should or should not be used for another date and time :). +3. 在单独的服务器上设置一个FTP服务器。需要注意的是,尽管FTP天生就不安全,但是 +仍然被广泛应用在安全性无关紧要的文件上传下载中。 在这篇文章中我们使用它来演示 +trickle的优点,同时它也会在客户端的标准输出流中显示传输速率,我们将是否在另外 +的日期时间中使用放在一边讨论。 # yum update && yum install vsftpd [On RedHat based systems] # aptitude update && aptitude install vsftpd [On Debian based systems] Now, edit the /etc/vsftpd/vsftpd.conf file on the FTP server as follows: +现在,在FTP服务器上按照以下方式编辑 /etc/vsftpd/vsftpd.conf 文件。 anonymous_enable=NO local_enable=YES @@ -62,6 +71,7 @@ Now, edit the /etc/vsftpd/vsftpd.conf file on the FTP server as follows: allow_writeable_chroot=YES After that, make sure to start vsftpd for your current session and to enable it for automatic start on future boots: +在此之后,确保在你的当前会话中开启了vsftpd,并在之后的启动中让其自动启动。 # systemctl start vsftpd [For systemd-based systems] # systemctl enable vsftpd @@ -69,22 +79,31 @@ After that, make sure to start vsftpd for your current session and to enable it # chkconfig vsftpd on 4. If you chose to set up the FTP server in a CentOS/RHEL 7 droplet with SSH keys for remote access, you will need a password-protected user account with the appropriate directory and file permissions for uploading and downloading the desired content OUTSIDE root’s home directory. +4. 如果你选在在一个CentOS/RHEL 7中为FTP服务器的远程访问配备SSH秘钥,你需要 +一个具有适合访问root目录之外的目录和文件内容上传下载权限并密码受保护的用户账户。 You can then browse to your home directory by entering the following URL in your browser. A login window will pop up prompting you for a valid user account and password on the FTP server. +你可以通过在你的浏览器中输入以下的URL来浏览你的Home目录。一个登陆窗口会弹出来 +提示你输入FTP服务器中的有效的用户名和密码。 ftp://192.168.0.15 If the authentication succeeds, you will see the contents of your home directory. Later in this tutorial you will be able to refresh that page to display the files that have been uploaded during previous steps. +如果验证成功,你就会看到你的home目录中的内容。该教程的稍后部分中,你将可以刷新 +页面来显示在你之前上传过的文件。 ![FTP Directory Tree](http://www.tecmint.com/wp-content/uploads/2013/11/FTP-Directory-Tree.png) FTP Directory Tree ### How to Install Trickle in Linux ### +### 如何在Linux中安装 Tricle ### 1. Install trickle via yum or aptitude. +1. 通过yum或aptitude来安装tricle. To ensure a successful installation, it is considered good practice to make sure the currently installed packages are up-to-date (using yum update) before installing the tool itself. + # yum -y update && yum install trickle [On RedHat based systems] # aptitude -y update && aptitude install trickle [On Debian based systems] From 62431ab1b43686e673ef0820f29abe828d99ed2f Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 27 Mar 2015 17:56:42 +0800 Subject: [PATCH 0390/2517] Translating by ZTinoZ --- ...t Open Source Code Repository in github.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md index 267486f211..eebbfac7ee 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -1,13 +1,12 @@ -Translating by ZTinoZ -How to Host Open Source Code Repository in github +怎样在Github上做开源代码库的主人 ================================================================================ -Hi all, today we will be learning how to host Source Code of Open Source Software in the repository hosted by github.com . GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features. It provides a workplace to host powerful collaboration, code review, and code management for open source and private projects. Unlike Git, which is strictly a command-line tool, GitHub provides a web-based graphical interface and desktop as well as mobile integration. GitHub offers both paid plans for private repositories and free accounts, which are usually used to host open-source software projects. +大家好,今天我们要学习一下怎样在github.com上的开源软件库中源代码的主人。GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features. It provides a workplace to host powerful collaboration, code review, and code management for open source and private projects. Unlike Git, which is strictly a command-line tool, GitHub provides a web-based graphical interface and desktop as well as mobile integration. GitHub offers both paid plans for private repositories and free accounts, which are usually used to host open-source software projects. ![github universe logo](http://blog.linoxide.com/wp-content/uploads/2015/03/github-universe.jpg) It is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Anyone can host their software's source code in github's repository for the use, contribution, sharing, issue tracking and many more by millions of people across the globe. Here are some easy and quick steps to easily host software's source code. -### 1. Creating a new Github Account ### +### 1. 创建一个新的Github账号 ### First of all, open your favorite browser and go to Github's homepage url ie [github][1]. Then, the homepage will be opened as shown below. @@ -19,7 +18,7 @@ After the you entered the valid information required for sign up, you'll be redi ![choosing plan](http://blog.linoxide.com/wp-content/uploads/2015/03/choosing-plan.png) -### 2. Creating a New Repository ### +### 2. 创建一个新的库 ### After we have successfully signed up a new account or logged in to Github, we'll now need to create a new Repository to get started. @@ -37,7 +36,7 @@ After it is done, we'll get to see something similar like this image. ![repository github](http://blog.linoxide.com/wp-content/uploads/2015/03/repository-github.png) -### 3. Uploading an existing Project ### +### 3. 上传一个已有项目 ### If we want to share our existing project on Github, we'll surely need to push the codes to the repository we created. To do so, we'll first need to install git in our Linux machine. As I am running Ubuntu 14.04 LTS in my machine, I'll need to run **apt** manger to install it. @@ -78,7 +77,7 @@ Now, to push the changes in our local repository to GitHub's repo we'll need to ![pushing repo](http://blog.linoxide.com/wp-content/uploads/2015/03/pushing-repo.png) -### Cloning a Repo ### +### 克隆一个库 ### If we want to download a code repository from github straight to our local drives with a single command then, we can simply use git clone command which will clone the current directory to the remote repository. @@ -88,7 +87,7 @@ If we want to download a code repository from github straight to our local drive Please change the above url to the repository you want to clone from. -### Updating a Change ### +### 更新改动 ### If we made changes to our code and want to push them to our remote repository then after changing the changes, we should run the following commands inside that directory. @@ -96,7 +95,7 @@ If we made changes to our code and want to push them to our remote repository th $ git commit -m "Updating" $ git push -### Conclusion ### +### 结论 ### Hurray! We have successfully hosted our Project Source Code in Github repository. Github is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Millions of awesome Open Source projects are hosted in github. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Github :-) @@ -105,7 +104,7 @@ Hurray! We have successfully hosted our Project Source Code in Github repository via: http://linoxide.com/usr-mgmt/host-open-source-code-repository-github/ 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f819c9e82276716a55913077ed273c2bbb6b5e45 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 27 Mar 2015 21:29:02 +0800 Subject: [PATCH 0391/2517] PUB:20150126 CD Audio Grabbers--Graphical Based @H-mudcup --- ...0126 CD Audio Grabbers--Graphical Based.md | 121 ++++++++++++++++ ...0126 CD Audio Grabbers--Graphical Based.md | 129 ------------------ 2 files changed, 121 insertions(+), 129 deletions(-) create mode 100644 published/20150126 CD Audio Grabbers--Graphical Based.md delete mode 100644 translated/share/20150126 CD Audio Grabbers--Graphical Based.md diff --git a/published/20150126 CD Audio Grabbers--Graphical Based.md b/published/20150126 CD Audio Grabbers--Graphical Based.md new file mode 100644 index 0000000000..4521760139 --- /dev/null +++ b/published/20150126 CD Audio Grabbers--Graphical Based.md @@ -0,0 +1,121 @@ +4 个图形界面的 CD 音频抓取器 +================================================================================ +CD音频抓取器设计用来从光盘中提取(“RIP”)原始数字音频(通常被称为 CDDA 格式)并把它保存成文件或以其他形式输出。这类软件使用户能把数字音频编码成各种格式,并可以从在线光盘数据库 freedb 中下载或上传光盘信息。 + +复制CD合法吗?在美国版权法中,把一个原始CD转换成数字文件用于个人使用等同于‘合理使用’。然而,美国版权法并没有明确的允许或禁止拷贝私人音频CD,而且判例法还没有确立出在具体的哪种情况下可以视为合理使用。而在英国,其版权的定位则更清晰一些。从2014年开始,英国公民制造CD,MP3,DVD,蓝光和电子书的行为成为合法行为。当然,这仅适用于这个人拥有被采集的媒体的实体,并且复制品仅用于他们个人使用。对于欧盟的其他国家,成员国也允许私人复制这种特例。 + +如果你不确定在你生活的国家里这种版权是如何界定的,在你使用这篇文章中所列举的软件前请查询本地的版权法以确定你处在合法的一边。 + +在某种程度上,提取CD音轨看起来有点多余。如[Spotify][5]和Google Play Music这类流媒体服务提供了一个巨大的以通用格式的音乐的库,无需采集你的CD集。但是,如果你已将收藏了一个数量巨大的CD集。能把你的CD转换成可以在便携设备如智能手机、平板和便携式MP3播放器上播放的格式仍然是个诱人的选择。 + +这篇文章推荐了我最喜欢的音频CD抓取器。我挑了四个最好的图形界面的音频抓取器。所有这些应用程序都是在开源许可下发行的。 + +###fre:ac + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-freac.png) + +fre:ac是个开源的音频转换器和CD提取器,支持很多种流行格式和编码器。目前这个应用可以在MA3、MP4/M4A、WMA、Ogg Vorbis、FLAC、AAC、WAV和Bonk格式间转换。这来源于几种不同形式的LAME编码器。 + +#### 功能包括: #### + +- 易学易用 +- MP3、MP4/M4A、WMA、Ogg Vorbis、FLAC、AAC、WAV和Bonk格式转换器 +- 集成了CDDB/freedb标题数据库支持的CD提取器 +- 多核优化的编码器加速了现代PC上的转换速度 +- 对于标签和文件名称的全Unicode支持 +- 易学易用,而当你需要时还提供专家级选项 +- 任务列表 +- 可以使用Winamp 2输入插件 +- 多语言用户界面支持41种语言 + +- 网址: [freac.org][1] +- 开发人员:Robert Kausch +- 许可证: GNU GPL v2 +- 版本号: 20141005 + +###Audex + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Audex.png) + +Audex是个简单易用的开源的音频CD提取应用。虽然它还处于早期开发阶段,但这个KDE桌面工具足够稳定、智能和简单易用。 + +它的助手可以为LAME、OGG Vorbis(oggenc)、FLAC、FAAC(AAC/MP4)和RIFF WAVE等格式创建配置文件。除了这个助手,你也可以定义你自己的配置文件,这意味着,Audex适用于大部分的命令行编码器。 + +#### 功能包括: #### + +- 可提取CDDA Paranoia +- 提取和编码同时进行 +- 文件名采用本地和远程的CDDB/FreeDB数据库 +- 可以提交到CDDB/FreeDB数据库 +- 类似capitalize的元数据纠正工具 +- 多配置文件提取(每个配置文件文件有一个命令行编码器) +- 从互联网上抓取封面并将他们存在数据库中 +- 在目标目录中创建播放列表、封面和基于模板的信息文件 +- 创建提取和编码协议 +- 将文件传送到FTP服务器 +- 支持国际化 + +- 网址: [kde.maniatek.com/audex][2] +- 开发人员: Marco Nelles +- 许可证: GNU GPL v3 +- 版本号: 0.79 + +###Sound Juicer + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-SoundJuicer.png) + +Sound Juicer是个使用GTK+和GStreamer开发的轻量级CD提取器。它从CD中提取音频并把它转换成音频文件。Sound Juicer还可以直接播放CD中的音轨,在提取前提供预览。 + +它支持任何GStreamer插件所支持的音频编码,包括 MP3、Ogg Vorbis、FLAC和未压缩的PCM格式。 + +它是GNOME桌面环境内建的一部分。 + +#### 功能包括: #### + +- 自动通过CDDB给音轨加标签 +- 可编码成ogg/vorbis、FLAC和原始WAV +- 编码路径的设置很简单 +- 多种风格流派 +- 国际化支持 + +- 网址:[burtonini.com][3] +- 开发人员: Ross Burton +- 许可证:GNU GPL v2 +- 版本号:3.14 + +###ripperX + +![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-ripperX.png) + +ripperX是个开源的图形界面的程序,用于提取CD音轨并把他们编码成Ogg、MP2、MP3或FLAC格式。它的目的是容易使用,只需要点几下鼠标就能转换整张专辑。它支持在CDDB寻找专辑和音轨信息。 + +他使用cdparanoia把CD音轨转换(也就是“提取”)成WAV文件,然后调用Vorbis/Ogg编码器oggenc把WAV文件转换成OGG文件。它还可以调用flac让WAV文件生成无损压缩的FLAC文件。 + +#### 功能包括: #### + +- 非常简单易用 +- 可以把CD音轨提取成WAV、MP3、OGG或FLAC文件 +- 支持CDDB查找 +- 支持ID3v2标签 +- 可暂停提取进程 + +- 网址:[sourceforge.net/projects/ripperx][4] +- 开发人员:Marc André Tanner +- 许可证:MIT/X Consortium License +- 版本号:2.8.0 + +-------------------------------------------------------------------------------- + +转自:http://www.linuxlinks.com/article/20150125043738417/AudioGrabbersGraphical.html + +作者:Frazer Kline +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.freac.org/ +[2]:http://kde.maniatek.com/audex/ +[3]:http://burtonini.com/blog/computers/sound-juicer +[4]:http://sourceforge.net/projects/ripperx/ +[5]:http://linux.cn/article-3130-1.html \ No newline at end of file diff --git a/translated/share/20150126 CD Audio Grabbers--Graphical Based.md b/translated/share/20150126 CD Audio Grabbers--Graphical Based.md deleted file mode 100644 index 45254072cb..0000000000 --- a/translated/share/20150126 CD Audio Grabbers--Graphical Based.md +++ /dev/null @@ -1,129 +0,0 @@ - -CD音频抓取器——基于图形界面 -================================================================================ -CD音频抓取器是为了从光盘中提取(“剖出”)原始数字音频(它在一个通常被称为CDDA的格式中)并把它保存成文件或以其他形式输出而设计的。这类软件使用户能把数字音频编码成各种格式,并能下载和上传在线CD目录服务——一个在线的光盘数据库——中的光盘信息。 - -复制CD合法吗?在美国版权法中,把一个原始CD转换成数字文件用于个人使用在被引用时等同于‘合理使用’。然而,美国版权法并没有明确的允许或禁止拷贝私人音频CD,而且判例法还没有确立出在具体的哪种情况下可以视为合理使用。在英国版权的位置更清晰一些。从2014年开始,英国公民制造CD,MP3,DVD,蓝光和电子书的行为成为合法行为。这仅适用于这个人拥有被采集的媒体的实体,并且复制品仅用于他们个人使用。对于欧盟的其他国家,成员国可以允许私人复制这种特例。 - -如果你不确定在你生活的国家里版权处于什么位置,在你使用这两页文章中所列举的软件前请查询本地的版权法以确定你处在合法的一边。 - -在某种程度上,提取CD音轨看起来有点多余。如Spotify和Google Play Music这类流服务提供了一个巨大的以通用格式存在的音乐的库,无需采集你的CD集。但是,如果你已将收藏了一个数量巨大的CD集。能把你的CD转换成可以在便携设备如智能手机、平板和便携式MP3播放器上播放的格式仍然是个诱人的选择。 - -这两页文章推荐了我最喜欢的音频CD抓取器。我挑了四个最好的图形界面的音频抓取器,四个最好的控制台音频抓取器。所有这些应用程序都是在开源许可下发行的。 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/freac.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-freac.png) - -fre:ac是个开源音频转换器和CD提取器,支持很多种流行格式和编码器。目前这个应用可以在MA3、MP4/M4A、WMA、Ogg Vorbis、FLAC、AAC、WAV和Bonk格式间转换。这来源于几种不同形式的LAME编码器。 - -#### 功能包括: #### - -- 易学易用 -- MP3、MP4/M4A、WMA、Ogg Vorbis、FLAC、AAC、WAV和Bonk格式转换器 -- 集成了CDDB/freedb标题数据库支持的CD提取器 -- 多核优化的编码器加速了现代PC上的转换速度 -- 对于标签和文件名称的全Unicode支持 -- 易学易用,当你需要时还提供专家级选项 -- 任务列表 -- 可以使用Winamp 2加入附件 -- 多语言用户界面可以使用41种语言 - -- 网址: [freac.org][1] -- 开发人员:Robert Kausch -- 许可证: GNU GPL v2 -- 版本号: 20141005 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/Audex.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Audex.png) - -Audex是个简单易用的开源音频CD提取应用。虽然它还处于早期开发阶段,这个KDE桌面工具足够稳定、聪明和简单,可以使用。 - -助手可以给LAME、OGG Vorbis(oggenc)、FLAC、FAAC(AAC/MP4)和RIFF WAVE创建配置文件。除去这个助手,你可以定义你自己的配置文件,这意味着,Audex适用于大部分的命令行编码器。 - -#### 功能包括: #### - -- 可提取CDDA Paranoia -- 提取和编码同时进行 -- 文件名采用本地和远程CDDB/FreeDB数据库 -- 提供新的CDDB/FreeDB数据库入口 -- 类似capitalize的元数据纠正工具 -- 多配置文件提取(每个配置文件文件有一个命令行编码器) -- 从互联网上抓取封面并将他们存在数据库中 -- 在目标目录中创建播放列表、封面和基于模板的信息文件 -- 创建提取和编码协议 -- 将文件传送到FTP服务器 -- 支持国际化 - -- 网址: [kde.maniatek.com/audex][2] -- 开发人员: Marco Nelles -- 许可证: GNU GPL v3 -- 版本号: 0.79 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/SoundJuicer.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-SoundJuicer.png) - -Sound Juicer是个使用GTK+和GStreamer的轻量级CD提取器。它从CD中提取音频并把它转换成音频文件。Sound Juicer还可以直接播放CD中的音轨,在提取前提供预览。 - -由于GStreamer插件它支持任何音频编码,包括 MP3、Ogg Vorbis、FLAC和未压缩的PCM格式。 - -它是GNOME桌面环境已建成的一部分。 - -#### 功能包括: #### - -- 自动通过CDDB给音轨加标签 -- 可编码成ogg/vorbis、FLAC和原始WAV -- 编码路径的设置很简单 -- 多种流派 -- 国际化支持 - -- 网址:[burtonini.com][3] -- 开发人员: Ross Burton -- 许可证:GNU GPL v2 -- 版本号:3.14 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/ripperX.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-ripperX.png) - -ripperX是个开源的图形交互界面,用于提取CD音轨并把他们编码成Ogg、MP2、MP3或FLAC格式。它的目的是容易使用,只需要点几下鼠标就能转换整张专辑。它支持在CDDB寻找专辑和音轨信息。 - -他使用cdparanoia把CD音轨转换(也就是“提取”)成WAV文件,然后访问Vorbis/Ogg编码器oggenc把WAV文件转换成OGG文件。它还可以访问flac让WAV文件有无损压缩的表现,制成FLAC文件。 - -#### 功能包括: #### - -- 非常简单易用 -- 可以把CD音轨提取成WAV、MP3、OGG或FLAC文件 -- 支持CDDB查找 -- 支持ID3v2标签 -- 可暂停提取进程 - -- 网址:[sourceforge.net/projects/ripperx][4] -- 开发人员:Marc André Tanner -- 许可证:MIT/X Consortium License -- 版本号:2.8.0 - --------------------------------------------------------------------------------- - -转自:http://www.linuxlinks.com/article/20150125043738417/AudioGrabbersGraphical.html - -作者:Frazer Kline -译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.freac.org/ -[2]:http://kde.maniatek.com/audex/ -[3]:http://burtonini.com/blog/computers/sound-juicer -[4]:http://sourceforge.net/projects/ripperx/ From 61e00fe33cd82b2e2952d55f486de4a92aac77d1 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 27 Mar 2015 22:13:42 +0800 Subject: [PATCH 0392/2517] PUB:20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps @Medusar --- ...ows 7 And Delete Ubuntu In 3 Easy Steps.md | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md (91%) diff --git a/translated/tech/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md b/published/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md similarity index 91% rename from translated/tech/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md rename to published/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md index 9278bbd707..e20cd1c1ab 100644 --- a/translated/tech/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md +++ b/published/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md @@ -1,4 +1,4 @@ -如何通过简单的3步恢复Windows7同时删除Ubuntu +如何通过简单的3步恢复Windows 7同时删除Ubuntu ================================================================================ ### 说明 ### @@ -8,11 +8,11 @@ 那么为什么我现在要写这篇文章呢? -到目前为止我曾经在很多场合被问到如何从一个装有Windows7或Windows8的双系统中删除Unbuntu系统,因此写这篇文章就变得有意义了。 +到目前为止我曾经在很多场合被问到如何从一个装有Windows7或Windows8的双系统中删除Ubuntu系统,因此写这篇文章就变得有意义了。 我在圣诞节期间浏览了人们在我文章中的留言,感觉是时候把缺失的文章写完同时更新一下那些比较老的又需要关注的文章了。 -我打算把一月份剩下的时间都用在这上面。这是第一步。如果你的电脑上安装了Windown7和Ubuntu双系统,同时你不想通过恢复出厂设置的方式恢复Windows7系统,那么请参考该教程。(注意:对于Windows8系统,有一个独立的教程) +我打算把一月份剩下的时间都用在这上面。这是第一步。如果你的电脑上安装了Windows7和Ubuntu双系统,同时你不想通过恢复出厂设置的方式恢复Windows7系统,那么请参考该教程。(注意:对于Windows8系统,有一个独立的教程) ### 删除Ubuntu系统需要的步骤 ### @@ -24,11 +24,10 @@ 在你开始之前,我建议为你的系统保留一个备份。 -我也建议不要放弃这样的机会也不要使用微软自带的工具。 +我建议你不要放弃备份的机会,但也不要使用微软自带的工具。 [点击查看如何使用Macrinum Reflect备份你的驱动][1] - 如果Ubuntu中有你希望保存的数据,现在就登录进去然后将数据保存到外部硬盘驱动器,USB驱动器或者DVD中。 ### 步骤1 - 删除Grub启动菜单 ### @@ -57,7 +56,7 @@ 点击“创建光盘”。 -将光盘留在电脑中重启电脑,当出现从CD中启动的消息的时候按下键盘上的“回车”键。 +将光盘留在电脑中并重启电脑,当出现从CD中启动的消息的时候按下键盘上的“回车”键。 ![](http://2.bp.blogspot.com/-VPSD50bmk2E/VLWftBg7HxI/AAAAAAAAHnM/APVzvPg4rC0/s1600/recoveryoptionschooselanguage.jpg) @@ -111,13 +110,13 @@ 对于Windows系统来说,我们真正需要的只有驱动器C,所以剩下的是可以删掉的。 -**注意: 注意一下.你的磁盘上可能有恢复分区。 不要删除恢复分区.。它们应该会被标记,将文件系统设置为NTFS或FAT32** +**注意: 注意一下.你的磁盘上可能有恢复分区。 不要删除恢复分区。它们应该有专门的卷标,文件系统也许是NTFS或FAT32** ![](http://3.bp.blogspot.com/-8YUE2p5Fj8Q/VLWlHXst6JI/AAAAAAAAHoQ/BJC57d9Nilg/s1600/deletevolume.png) 在你希望删除的分区上单击右键(例如:root,home和swap分区),然后从弹出的菜单中点击“删除卷”。 -**(不要删除任何NTFS或者FAT32文件系统的分区)** +**(不要删除任何NTFS或者FAT32文件系统的分区!)** 对于剩下的两个分区重复执行上面的操作。 @@ -134,11 +133,12 @@ ![](http://4.bp.blogspot.com/-pLV5L3CvQ1Y/VLWmh-5SKTI/AAAAAAAAHoc/7sJzITyvduo/s1600/diskmanagement4.png) 最后一步是扩展Windows以便于将它再变成一个大的分区。 + 右键点击Windows分区(C盘),然后选择“扩展卷”。 ![](http://1.bp.blogspot.com/-vgmw_N2WZWw/VLWm7i5oSxI/AAAAAAAAHok/k0q_gnIik9A/s1600/extendvolume1.PNG) -当出现左面的窗口的时候点击“下一步”, +当出现左面的窗口的时候点击“下一步”。 ![](http://3.bp.blogspot.com/-WLA86V-Au8g/VLWnTq5RpAI/AAAAAAAAHos/6vzjLNkrwRQ/s1600/extendvolume2.PNG) @@ -165,13 +165,14 @@ 这就是全部内容。一个致力于Linux的网站刚刚向你展示了如何移除Linux然后用Windows7取而代之。 有任何疑问可以在下面评论区留言。 + -------------------------------------------------------------------------------- via: http://www.everydaylinuxuser.com/2015/01/how-to-recover-windows-7-and-delete.html 作者:Gary Newell 译者:[Medusar](https://github.com/Medusar) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 594bd4aae73d8eeac5a2bbf60524e303f1e3f555 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 28 Mar 2015 11:57:59 +0800 Subject: [PATCH 0393/2517] Update 20150318 11 Linux Terminal Commands That Will Rock Your World.md --- ...18 11 Linux Terminal Commands That Will Rock Your World.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md index ba85e4c6a8..0e3af6907d 100644 --- a/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md +++ b/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md @@ -1,3 +1,5 @@ +translating by martin. + 11 Linux Terminal Commands That Will Rock Your World ================================================================================ I have been using Linux for about 10 years and what I am going to show you in this article is a list of Linux commands, tools and clever little tricks that I wish somebody had shown me from the outset instead of stumbling upon them as I went along. @@ -263,4 +265,4 @@ via: http://linux.about.com/od/commands/tp/11-Linux-Terminal-Commands-That-Will- [9]:http://linux.about.com/od/commands/l/blcmdl8_shutdow.htm [10]:http://linux.about.com/library/cmd/blcmdl1_pkill.htm [11]:http://linux.about.com/od/funnymanpages/a/funman_xkill.htm -[12]:http://blog.kember.net/articles/reisub-the-gentle-linux-restart/ \ No newline at end of file +[12]:http://blog.kember.net/articles/reisub-the-gentle-linux-restart/ From 1c443b48a93d14200dfd701ce64cff8d941df12d Mon Sep 17 00:00:00 2001 From: disylee Date: Sun, 29 Mar 2015 03:21:13 +0800 Subject: [PATCH 0394/2517] translated by disylee --- ... web server logs interactively on Linux.md | 144 ------------------ ... web server logs interactively on Linux.md | Bin 0 -> 521572 bytes 2 files changed, 144 deletions(-) delete mode 100644 sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md create mode 100644 translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md diff --git a/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md deleted file mode 100644 index fdcc127252..0000000000 --- a/sources/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md +++ /dev/null @@ -1,144 +0,0 @@ -disylee 来一篇~ -How to analyze and view Apache web server logs interactively on Linux -================================================================================ -Whether you are in the web hosting business, or run a few web sites on a VPS yourself, chances are you want to display visitor statistics such as top visitors, requested files (dynamic or static), used bandwidth, client browsers, and referring sites, and so forth. - -[GoAccess][1] is a command-line log analyzer and interactive viewer for Apache or Nginx web server. With this tool, you will not only be able to browse the data mentioned earlier, but also parse the web server logs to dig for further data as well - and **all of this within a terminal window in real time**. Since as of today [most web servers][2] use either a Debian derivative or a Red Hat based distribution as the underlying operating system, I will show you how to install and use GoAccess in Debian and CentOS. - -### Installing GoAccess on Linux ### - -In Debian, Ubuntu and derivatives, run the following command to install GoAccess: - - # aptitude install goaccess - -In CentOS, you'll need to enable the [EPEL repository][3] and then: - - # yum install goaccess - -In Fedora, simply use yum command: - - # yum install goaccess - -If you want to install GoAccess from the source to enable further options (such as GeoIP location), install [required dependencies][4] for your operating system, and then follow these steps: - - # wget http://tar.goaccess.io/goaccess-0.8.5.tar.gz - # tar -xzvf goaccess-0.8.5.tar.gz - # cd goaccess-0.8.5/ - # ./configure --enable-geoip - # make - # make install - -That will install version 0.8.5, but you can always verify what is the latest version in the [Downloads page][5] of the project's web site. - -Since GoAccess does not require any further configurations, once it's installed you are ready to go. - -### Running GoAccess ### - -To start using GoAccess, just run it against your Apache access log. - -For Debian and derivatives: - - # goaccess -f /var/log/apache2/access.log - -For Red Hat based distros: - - # goaccess -f /var/log/httpd/access_log - -When you first launch GoAccess, you will be presented with the following screen to choose the date and log format. As explained, you can toggle between options using the spacebar and proceed with F10. As for the date and log formats, you may want to refer to the [Apache documentation][6] if you need to refresh your memory. - -In this case, Choose Common Log Format (CLF): - -![](https://farm8.staticflickr.com/7422/15868350373_30c16d7c30.jpg) - -and then press F10. You will be presented with the statistics screen. For the sake of brevity, only the header, which shows the summary of the log file, is shown in the next image: - -![](https://farm9.staticflickr.com/8683/16486742901_7a35b5df69_b.jpg) - -### Browsing Web Server Statistics with GoAccess ### - -As you scroll down the page with the down arrow, you will find the following sections, sorted by requests. The order of the categories presented here may vary depending on your distribution or your preferred installation method (from repositories or from source): - -1. Unique visitors per day (HTTP requests having the same IP, same date and same agent are considered an unique visit) - -![](https://farm8.staticflickr.com/7308/16488483965_a439dbc5e2_b.jpg) - -2. Requested files (Pages-URL) - -![](https://farm9.staticflickr.com/8651/16488483975_66d05dce51_b.jpg) - -3. Requested static files (e.g., .png, .js, etc) - -4. Referrers URLs (the URLs where each request came from) - -5. HTTP 404 Not Found response code - -![](https://farm9.staticflickr.com/8669/16486742951_436539b0da_b.jpg) - -6. Operating Systems - -7. Browsers - -8. Hosts (client IPs) - -![](https://farm8.staticflickr.com/7392/16488483995_56e706d77c_z.jpg) - -9. HTTP status codes - -![](https://farm8.staticflickr.com/7282/16462493896_77b856f670_b.jpg) - -10. Top referring sites - -11. Top keyphrases used on Google's search engine - -If you also want to inspect the archived logs, you can pipe them to GoAccess as follows. - -For Debian and derivatives: - - # zcat -f /var/log/apache2/access.log* | goaccess - -For Red Hat based distributions: - - # cat /var/log/httpd/access* | goaccess - -Should you need a more detailed report of any of the above (1 through 11), press the desired section number and then O (uppercase o) to bring up what is called the Detailed View. The following image shows the output of 5-O (press 5, then press O): - -![](https://farm8.staticflickr.com/7382/16302213429_48d9233f40_b.jpg) - -To display GeoIP location information, open the Detail View in the Hosts section, as explained earlier, and you will see the location of the client IPs that performed requests to your web server: - -![](https://farm8.staticflickr.com/7393/16488484075_d778aa91a2_z.jpg) - -If your system has not been very busy lately, some of the above sections will not show a great deal of information, but that situation can change as more and more requests are made to your web server. - -### Saving Reports for Offline Analysis ### - -There will be times when you don't want to inspect your system's stats in real time, but save it to a file for offline analysis or printing. To generate an HTML report, simply redirect the output of the GoAccess commands mentioned earlier to an HTML file. Then just point your web browser to the file to open it. - - # zcat -f /var/log/apache2/access.log* | goaccess > /var/www/webserverstats.html - -Once the report is displayed, you will need to click on the Expand link to show the detail view on each category: - -![](https://farm9.staticflickr.com/8658/16486743041_bd8a80794d_o.png) - -注释:youtube视频 - - -As we have discussed throughout this article, GoAccess is an invaluable tool that will provide you, as a system administrator, with HTTP statistics in a visual report on the fly. Although GoAccess by default presents its results to the standard output, you can also save them to JSON, HTML, or CSV files. This converts GoAccess in an incredibly useful tool to monitor and display statistics of a web server. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/gabriel -[1]:http://goaccess.io/ -[2]:http://w3techs.com/technologies/details/os-linux/all/all -[3]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[4]:http://goaccess.io/download#dependencies -[5]:http://goaccess.io/download -[6]:http://httpd.apache.org/docs/2.4/logs.html diff --git a/translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md new file mode 100644 index 0000000000000000000000000000000000000000..c65b78f21ed2ad0a2c8352bae2e61ba5e5622b6f GIT binary patch literal 521572 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
Fu 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 Ils^jm4_=!k7ytkO literal 0 HcmV?d00001 From 553403497343ed063f16c3a443e336a3878b0451 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 29 Mar 2015 08:47:01 +0800 Subject: [PATCH 0395/2517] [Translated] 20141204 Intense Gameplay--Try these 13 Roguelike games.md --- ... Gameplay--Try these 13 Roguelike games.md | 406 ------------------ ... Gameplay--Try these 13 Roguelike games.md | 400 +++++++++++++++++ 2 files changed, 400 insertions(+), 406 deletions(-) delete mode 100644 sources/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md create mode 100644 translated/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md diff --git a/sources/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md b/sources/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md deleted file mode 100644 index 199474e714..0000000000 --- a/sources/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md +++ /dev/null @@ -1,406 +0,0 @@ -FSSlc translating - -Intense Gameplay? Try these 13 Roguelike games -================================================================================ -Roguelike is a sub-genre of role-playing games. It literally means "a game like Rogue". Rogue is a dungeon crawling video game first released in 1980, standing out for being fiendishly addictive. Its goal was to retrieve the Amulet of Yendor, hidden deep in the 26th level, and ascend back to the top. - -There is no exact definition of a roguelike, but this type of game typically has the following characteristics: - -- High fantasy narrative background -- Procedural level generation. Most of the game world is generated by the game for every new gameplay session. This is meant to encourage replayability -- Turn-based dungeon exploration and combat -- Tile-based graphics that are randomly generated -- Random conflict outcomes -- Permanent death death works realistically, once you're gone, you're gone -- High difficulty - -This article compiles a good selection of roguelike games available for Linux. If you enjoy intense, addictive gameplay, try these 13 games. Don't be put off by the primitive graphics, you'll soon forget the visuals once you get immersed. All of them are available to download without charge, and almost all are released under an open source license. - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/DungeonCrawlStoneSoup.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-Dungeon1.png) - -Dungeon Crawl Stone Soup is an open-source, single-player, role-playing roguelike game of exploration and treasure-hunting in dungeons filled with dangerous and unfriendly monsters in a quest to rescue the mystifyingly fabulous Orb of Zot. - -Dungeon Crawl Stone Soup is a continuation of Linley's Dungeon Crawl. It is openly developed and invites participation from the Crawl community. - -Dungeon Crawl has superb, deep tactical gameplay, innovative magic and religion systems, and a grand variety of monsters to fight. Crawl is also one of the hardest roguelikes to beat. When you finally beat the game and write your victory post on rec.games.roguelike.misc, you know you have achieved something. - -Features include: - -- Well-rounded, deep tactically rich roguelike -- Hand-drawn maps -- Numerous portal vaults -- Slick interface -- Innovative magic and religion systems -- Wide range of Gods, Characters, Items, and Smart Monsters - -- Website: [crawl.develz.org][1] -- Developer: Stone Soup devteam -- License: Crawl General Public License -- Version Number: 0.15.2 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/DwarfFortress.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-DwarfFortress.png) - -Dwarf Fortress is a single-player fantasy game, similar to NetHack. You can control a dwarven outpost or an adventurer in a randomly generated, persistent world. - -The game features three modes of play (Dwarf Fortress, Adventurer and Legends modes), a distinct, randomly-generated world (complete with terrain, wildlife and legends), gruesome combat mechanics and vicious schools of carp. - -Features include: - - -- The world persists as long as you like, over many games, recording historical events and tracking changes -- Command your dwarves as they search for wealth in the mountain - - Craft treasures and furniture from many materials and improve these objects with precious metals, jewels and more - - Defend yourself against attacks from hostile civilizations, the wilderness and the depths - - Support the nobility as they make demands of your populace - - Keep your dwarves happy and read their thoughts as they work and relax - - Z coordinate allows you to dig out fortresses with multiple levels. Build towers or conquer the depths - - Build floodgates to divert water for farming or to drown your adversaries -- Play an adventurer and explore, quest for glory or seek vengeance - - Meet adversaries from previous games - - Recruit people in towns to come with you on your journey - - Explore without cumbersome plot restrictions - - Seamlessly wander the world -up to 197376 x 197376 squares total -or travel more rapidly on the region map - - Accept quests from the town and civilization leaders - - Retire and meet your old characters. Bring them along on an adventure with a new character or reactivate them and play directly - - Z coordinate allows you to move seamlessly between dungeon levels and scale structures fighting adversaries above and below -- The combat model uses skills, body parts, wrestling, charging and dodging between squares, bleeding, pain, nausea, and much more -- A dynamic weather model tracks wind, humidity and air masses to create fronts, clouds, rain storms and blizzards -- Over two hundred rock and mineral types are incorporated into the world, placed in their proper geological environments -- Add new creatures, weapons, plants, metals and other objects via modifiable text files -- Extended ASCII character set rendered in 16 colors (including black) as well as 8 background colors (including black) - -- Website: [www.bay12games.com/dwarves/][2] -- Developer: Tarn Adams -- License: Freeware -- Version Number: 0.40.19 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/ADOM.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-ADOM.png) - -Ancient Domains of Mystery (ADOM) is a rogue-like game which has been in development since 1994. - -It is a single-user game featuring the exploration of a dungeon complex. You control a fictional character described by race, class, attributes, skills, and equipment. This fictional character is trying to achieve a specific goal (see below) and succeed in a difficult quest. To fulfill the quest, you have to explore previously undiscovered tunnels and dungeons, fight hideous monsters, uncover long forgotten secrets, and find treasures of all kind. - -During the game, you explore dungeon levels which are randomly generated each game. You might also encounter certain special levels, which present a particular challenge or are built around a certain theme. - -Features include: - -- Huge game world with hundreds of locations such as towns, randomized dungeons, elemental temples, graveyards, ancient ruins, towers and other secrets -- Loads of races (dwarves, drakelings, mist elves, hurthlings, orcs, trolls, ratlings and many others) and even more classes (fighters, elementalists, assassins, chaos knights, duelists and much more) allowing for infinite play styles -- Hundreds of monsters and items, many with enhanced random features -- A corruption system forcing you to balance lust for power with fear of damnation -- Spells, prayers, mindcraft, alchemy, crafting and more -- Dozens of quests and branching story lines -- Numerous wildly different endings that might alter reality itself - -- Website: [www.adom.de][3] -- Developer: Thomas Biskup -- License: Postcardware -- Version Number: 1.20 Prelease 20 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/ToME.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-ToME.png) - -Tales of Maj’Eyal (ToME) is a free, open source roguelike RPG, featuring tactical turn-based combat and advanced character building. It is written as a module that runs in T-Engine 4.0. - -This is the Age of Ascendancy, after over ten thousand years of strife, pain and chaos the known world is at last at relative peace. The Spellblaze last effects are now tamed, the land slowly heals itself and the civilisations rebuild themselves after the Age of Pyre. - -Features include: - -- Suitable for gamers without any rogueline experience -- Supports both graphical tiles and ASCII mode -- Over 40 abilities available on some characters -- Talent system -- Combat engine -- Online persistent stat/achievement tracking -- IRC chat client -- Expandable and moddable -- Atmospheric music -- Unlock new races, classes, starting points, playmodes and features - -- Website: [te4.org][4] -- Developer: ToME Development Team -- License: GNU GPL v3.0 -- Version Number: 1.2.5 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/CataclysmDarkDaysAhead1.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Cataclysm.png) - -Cataclysm is an open source post-apocalyptic roguelike, set in the countryside of fictional New England after a devastating plague of monsters and zombies. It is a continuation of Whale's original Cataclysm, which expands it with numerous new creatures, buildings, gameplay mechanics and many other features. - -While some have described it as a "zombie game", there's far more to Cataclysm than that. Struggle to survive in a harsh, persistent, procedurally generated world. Scavenge the remnants of a dead civilization for for food, equipment, or, if you're lucky, a vehicle with a full tank of gas to get you the hell out of Dodge. Fight to defeat or escape from a wide variety of powerful monstrosities, from zombies to giant insects to killer robots and things far stranger and deadlier, and against the others like yourself, that want what you have... - -Cataclysm is very different from most roguelikes in many ways. Rather than being set in a vertical, linear dungeon, it is set in an unbounded, 3D world. This means that exploration plays a much bigger role than in most roguelikes, and the game is much less linear. As the map is so huge, it is actually completely persistant between games. If you die, and start a new character, your new game will be set in the same game world as your last. Like in many roguelikes, you will be able to loot the dead bodies of previous characters; unlike most roguelikes, you will also be able to retrace their steps completely, and any dramatic changes made to the world will persist into your next game. - -Features include: - - -- Detailed character creation, with a plethora of traits to choose -- Defense mode, a coffeebreak mode with fast-paced combat -- Bionics; Similar to the magic system in many games -- Mutations, both positive and negative -- Unbounded, fully randomized world map that is persistent between characters -- Item crafting - - New recipes may be acquired by honing your knowledge through practice or learning from books -- Realistic fire, smoke, and other dynamic map effects -- A day/night cycle with the need to sleep. Use caffeine to stay awake longer if you must but be aware this is not healthy -- Over 300 item types, including a multitude of real-world guns, drugs, and tools - - Many drugs are addictive, and will require continuous use to avoid withdrawal effects. -- Ability to board doors and windows, construct traps and fortify your home base to prevent a rude awakening by a zombie -- Ability to construct your own wooden constructions, including walls and a roof -- Ability to drive around in vehicles found in the post-apocalyptic landscape - - These can be modified to your needs, or you could even build one from scratch -- A temperature system, being too cold or too hot is quite hazardous -- Preliminary tile support -- WorldGen options, and versatile editing methods -- -- Website: [en.cataclysmdda.com][5] -- Authors: Kevin Granade and others -- License: Creative Commons Attribution-ShareAlike 3.0 Unported License -- Version Number: 0.B - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/GoblinHack1.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-GoblinHack.png) - -Goblin Hack is an open source roguelike OpenGL-based smooth-scrolling ASCII graphics game. The game is inspired by the likes of NetHack, but faster with fewer keys. - -Goblin Hack has a simple interface that appears to appeal to players of all ages, and fires their imagination in today's world of over-rendered games. - -Players can choose one of several classes before being thrown into the first floor of a randomized, ongoing dungeon. - -Features include: - -- Impressive graphics (compared with many other roguelike games) -- Simple interface -- Choose one of several classes before being thrown into the first floor of a randomized, ongoing dungeon -- Manually save the game - -- Website: [goblinhack.sourceforge.net][6], [github.com/goblinhack/goblinhack][7] -- Authors: Neil McGill -- License: GNU GPL v2 -- Version Number: 1.19 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/SLASH%27EM.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-SlashEM.png) - -Super Lotsa Added Stuff Hack - Extended Magic (SLASH'EM) is a role-playing game where you control a single character. SLASH'EM is a variant of NetHack. It also has an interface and gameplay similar to Rogue, ADOM, Anghand and NetHack. You control the actions through the keyboard and view the world from an overhead perspective. - -The problem: The Amulet of Yendor has been stolen. Not only that but it appears that the Wizard of Yendor (not a nice person), who took the amulet, is hiding in the Dungeons of Doom (not a friendly place). - -Features include: - -- Offers extra features, monsters, and items -- Novel features inlude the Monk class and Sokoban levels -- The main dungeon is much larger than in NetHack - -- Website: [www.slashem.org][8] -- Developer: The Slash'EM development team -- License: MIT License, NetHack General Public License -- Version Number: 0.0.7E7F3 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/NetHack.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-NetHack.jpg) - -NetHack is a wonderfully silly, yet quite addictive Dungeons and Dragons-style adventure game. The "net" element references that its development has been coordinated through the Internet. The "hack" element refers to a genre of role-playing games known as hack and slash for their focus on combat. - -In NetHack you play the part of a fierce fighter, wizard, or any of many other classes, fighting your way down to retrieve the Amulet of Yendor (try saying THAT one backwards!) for your god. On the way, you might encounter a quantum mechanic or two, or perhaps a microscopic space fleet, or -- if you're REALLY lucky -- the Ravenous Bugblatter Beast of Traal. - -Features include: - -- 45-50 levels, most of which are randomly generated -- Variety of items: weapons, armour, scrolls, potions, rings, gems, and an assortment of tools such as keys and lamps -- Blessings and curses -- Permadeath: expired characters cannot be revived without having made backup copies of the actual save files -- Interfaces: - - Console - - Graphical, using X, Qt toolkit or GNOME libraries - -- Website: [www.nethack.org][9] -- Developer: The NetHack DevTeam -- License: NetHack General Public License -- Version Number: 3.4.3 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/AsciiSector.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-AsciiSector.png) - -Ascii Sector is a free space combat/exploration/trading game which is based on the classic computer game Wing Commander: Privateer released by Origin Systems in 1993. - -In Ascii Sector, you start with a simple spaceship and can then accept missions or trade goods to earn enough money to upgrade your ship or buy a new one. You can engage in deadly fights both in space, on the ground and on board spaceships, and using the Ascii Sector scripting language, you can create your own quests for the game or have fun with other players' quests. - -Features include: - -- Uses the ANSI character set for the graphics -- Real depth to the gameplay -- Offers a wide variety of bases, missions, commodities and ships -- Ships include: Broadsword, Centurion, Demon, Dralthi, Drayman, Galaxy, Gladius, Gothri, Kamekh, Nexus, Orion, Paradign, Stileto, Talon, Tarsus, and Ulysses -- Four quadrants: Alizarin, Crimson, Mauve, and Viridian -- Downloadable quests -- Scripting of quests -- Ascii Sector quest language, create your own stories in the Ascii Sector universe -- NPCs on planets can be attacked and robbed -- Persistent fleets that can move around, change control of systems, engage enemy fleets, head back for repairs and rebuilds -- Ships whose systems have been disabled can be boarded -- Download high quality music files - -- Website: [www.asciisector.net][10] -- Developer: Christian Knudsen -- License: Freeware -- Version Number: 0.7.1.4 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/Angband.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Angband.png) - -Angband is a free, single-player graphical dungeon exploration game that uses ASCII characters where you take the role of an adventurer, exploring a deep dungeon, fighting monsters, and acquiring the best weaponry you can, in preparation for a final battle with Morgoth, the Lord of Darkness. It has been in development since the 1990s. - -Angband is along the lines of Rogue and NetHack. It is derived from the games Moria and Umoria, which were in turn based on Rogue. It is often described as a "roguelike" game because the look and feel of the game is still quite similar to Rogue. Many of these new creatures and objects are drawn from the writings of J.R.R Tolkien, although some of the monsters come straight from classical mythology, Dungeons & Dragons, Rolemaster, or the minds of the orginal Angband coders. - -Features include: - -- 100 level dungeon -- New levels are randomly generated -- Choose to be a human, half-elf, elf, hobbit, gnome, dwarf, half-orc, half-troll, dunadan, high-elf, or kobold -- Artifacts -- Spellcasting -- Monsters -- Monster pits -- Monster nests - -- Website: [rephial.org][11] -- Developer: Angband Development Team -- License: GNU GPL v2 -- Version Number: 3.5.0 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/UnNetHack1.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-UnNetHack.png) - -UnNetHack is a fork of NetHack. NetHack was first released in 1987, and is considered by many gamers to be one of the best gaming experiences the computing world offers. - -Features include: - - -- Adds a number of enhancements to NetHack such as additional monsters, more levels, a few new objects, additional dangers, more challenging gameplay, and most importantly more entertainment than vanilla NetHack -- Tutorial to help new players get started - -- Website: [sourceforge.net/apps/trac/unnethack][12] -- Authors: Patric Mueller -- License: Nethack General Public License -- Version Number: 5.1.0 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/HydraSlayer.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-HydraSlayer.png) - -Hydra Slayer is an open source Roguelike game focused on slaying Hydras. It is inspired by Greek mythology, Dungeon Crawl, MathRL seven day roguelike, and some mathematical puzzles about brave heroes slaying many headed beasts. - -Features include: - -- Unique gameplay mechanics -- A theme which mixes Greek mythology and mathematics -- Traditional roguelike ASCII graphics, or tiles/3D display -- 5 player character races with very distinct tactics, strengths and weaknesses -- 28 enemy types: - - 10 basic types of elemental hydras (each of them has two special variations) - - 8 types of special enemies - - Harmless mushrooms for strategic advantage -- 28 types of equipment (not counting material and size/power variations) -- 15 weapon materials -- 18 types of non-equipment items -- 3 game geometries to choose -- 8 level topologies (including the Mobius strip and Klein bottle) -- 11 level generators -- 2 endings - -- Website: [www.roguetemple.com/z/hydra][13] -- Developer: Zeno Rogue -- License: GNU GPL v2 -- Version Number: 16.1 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/Brogue1.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Brogue.png) - -Brogue is an open source Roguelike game for Mac OS X, Windows, Linux, iOS and Android. - -Brogue is a direct descendant of Rogue, a dungeon crawling video game first developed by Michael Toy and Glenn Wichman around 1980. Unlike other popular modern roguelikes, Brogue favors simplicity over complexity, while trying to ensure that the interactions between components are interesting and varied. - -The goal of the game is to travel to the 26th subterranean floor of the dungeon, retrieve the Amulet of Yendor and return with it to the surface. For the truly skillful who desire further challenge, depths below 26 contain three lumenstones each, items which confer an increased score upon victory. - -Brogue is a challenging game, but still great fun to play. Try not to be disheartened by the difficulty of the game; with some application, Brogue will become very addictive. - -Features include: - -- Favors simplicity over complexity -- User-friendly features -- Compared with Rogue, Brogue has a more sophisticated level generation -- XP and levelling system removed -- Traps, protecting items -- Additional monster types and magical items - -- Website: [sites.google.com/site/broguegame][14] -- Authors: Brian Walker -- License: GNU Affero GPL -- Version Number: 1.7.3 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/201412031524381/RoguelikeGames.html - -作者:Frazer Kline -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://crawl.develz.org/ -[2]:http://www.bay12games.com/dwarves/index.html -[3]:http://www.adom.de/ -[4]:http://te4.org/ -[5]:http://en.cataclysmdda.com/ -[6]:http://goblinhack.sourceforge.net/ -[7]:https://github.com/goblinhack/goblinhack -[8]:http://www.slashem.org/ -[9]:http://www.nethack.org/ -[10]:http://www.asciisector.net/ -[11]:http://rephial.org/ -[12]:http://sourceforge.net/apps/trac/unnethack/ -[13]:http://www.roguetemple.com/z/hydra/ -[14]:https://sites.google.com/site/broguegame/ diff --git a/translated/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md b/translated/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md new file mode 100644 index 0000000000..aedc2fe881 --- /dev/null +++ b/translated/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md @@ -0,0 +1,400 @@ +寻求激烈的游戏玩法?那就试试这 13 款 Roguelike 游戏吧 +================================================================================ +Roguelike 是角色扮演游戏的一个子类。从字面上看,它的意思是 “像 Rogue 的游戏”。Rogue 是一个关于地下城冒险的视频游戏,于 1980 年第一次发行,以友好、易上瘾而著称。这个游戏的目标是取得深藏于第 26 层的 "Amulet of Yendor",再返回到顶层逃出生天。 + +Roguelike 的准确定义并不存在,但这类游戏通常具有下面的特点: + +- 奇幻的叙事背景; +- 程序性的关卡产生。每个新的游戏环节中的游戏世界均由游戏产生。这样做是为了鼓励玩家重玩; +- 回合制的地下城探险和战斗; +- 随机生成的基于瓷砖的(Tile-based)图形环境; +- 随机的冲突生成; +- 永久死亡 。在游戏中,死亡真的存在,一旦你死了,就代表你真的结束了。 +- 高难度。 + +这篇文章精心挑选了一些可运行在 Linux 平台下的 roguelike 游戏。假如你喜欢激烈、易上瘾的游戏,可以尝试这 13 款游戏。不要因它们原始的画质而退步,一旦你沉浸其中,你将很快忘记画面的简陋。所有的这些都可以免费下载,并且几乎所有的游戏都是在开源协议下发行的。 +---------- + +![](http://www.linuxlinks.com/portal/content2/png/DungeonCrawlStoneSoup.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-Dungeon1.png) + +Dungeon Crawl Stone Soup 是一个开源的,单用户角色扮演类的 roguelike 游戏,玩家要在充满危险和不友好的怪兽的地下城中进行探险和寻找宝藏,并在任务中拯救 mystifyingly fabulous Orb of Zot(注:这里我不知如何翻译) + +Dungeon Crawl Stone Soup 是 Linley 开发的 Dungeon Crawl 游戏的延续。它被公开地开发并邀请 Crawl 社区的人员来参与其中。 + +Dungeon Crawl 有着超棒且深层次的战术游戏环节,创新的魔法和信仰系统,以及数量宏大的可供战斗的怪兽。Crawl 也是最难以攻陷的 roguelike 游戏之一。当你最终在游戏中通关并将你的胜利宣言张贴在 rec.games.roguelike.misc ,这时在你心中,你知道你已经取得了什么。 + +特点有: + +- 丰富多彩的, 富含深层次战术的 roguelike 游戏; +- 手绘地图; +- 无数的金库; +- 漂亮的界面; +- 创新的魔法和信仰系统; +- 广泛的神灵,角色,物品和聪明的怪兽; + +- 网站: [crawl.develz.org][1] +- 开发者: Stone Soup 开发小组 +- 协议: Crawl General Public License +- 版本号: 0.15.2 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/DwarfFortress.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-DwarfFortress.png) + +Dwarf Fortress 是一个绝妙的单人游戏,与 NetHack 类似。你可以在一个随机生成的持久的世界中,控制一个矮人哨兵或一个冒险者。 + +这个游戏的特色有:三种游戏模式(矮人要塞,冒险者,传说模式),一个独特的随机生成的世界(由地形,野生生物和传说等组成), 阴森的战斗机制以及各种恶性的鲤鱼。 + +特点包括: + +- 在这个世界里,你想持续多久都可以。可以经历许多次游戏,记录历史事件,对更改进行跟踪等; +- 当你的矮人在山群中寻找宝藏时,你可以对它们下达命令 + - 用各种材料来手工制作珍宝、家具,并可以用贵重金属,宝石等来改进这些珍宝、家具; + - 在广度和深度上保护你自己,防御来自敌对文明的袭击; + - 当他们有求于你的民众时,支持贵族(注:感觉自己翻译错了这句) + - 维持你的矮人的高兴状态,在它们工作和休闲时读取它们的思想; + - Z 坐标可以使你在多个层级上建造你的堡垒,建立塔台或征服深处; + - 建立水闸来为耕种调水或水淹你的对手; +- 扮演一个探险者并进行探索,为荣誉而战或复仇 + - 与以前的游戏中的对手相遇; + - 在你经过的旅途中营救小城里的人群 + - 在没有笨重的绘画限制下探险; + - 无缝的漫游游戏世界-总共达到 197376 x 197376 平方 -或者在区域地图上更快速地穿行; + - 接受小城或文明社会的领导委托的任务 + - 收回并与你扮演的老角色相遇,在一次探险中,以一个新的角色带上它们或者直接使用它们; + - Z 轴使得你可以在各个地牢层级间无缝地上下移动以及调整结构的尺寸来和对手战斗; +- 战斗模型的使用技巧,身体组成,搏斗,在方块之间进行操作和躲避,流血,疼痛,恶心及其他; +- 一个动态的天气模型用来跟踪风,湿度及空气的动向,用来创造前线,风,暴风雨和暴风雪 +- 超过 200 种岩石和矿物类型被引入游戏世界,它们被放置在合适的地理环境中; +- 通过可更改的文本文件来添加生物,武器,植物,金属和其他对象; +- 扩展的以 16 色(包括黑色)渲染的 ASCII 角色集合,以及 8 种背景颜色(包括黑色); + +- 网站: [www.bay12games.com/dwarves/][2] +- 开发者: Tarn Adams +- 协议: 免费软件 +- 版本号: 0.40.19 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/ADOM.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-ADOM.png) + +Ancient Domains of Mystery (ADOM) 是一个 rogue-like 游戏,自从 1994 年开始,它一直在开发。 + +它是一个包含复杂地牢的单用户游戏。你控制一个用种族,类别,属性,技巧和装备等描述的虚构角色。这个虚构角色正尝试着达到一个特定的目标(参考下面的介绍)并在一个困难的任务中取胜。为了完成任务,你必须在以前没有发现的隧道和地牢中探险,和丑陋的怪兽战斗,解开一系列遗忘的秘密,并找到宝藏。 + +在游戏期间,你在每次游戏时随机生成的各层地牢中探索。你也可能遇到某个特定的关卡,其中有着特定的挑战或者围绕某个特定主题而生成。 + +特点包括: + +- 拥有上百个地点的巨大游戏世界,例如城堡,随机生成的地牢,主题寺庙,墓地,古代遗迹,塔台和其他名胜; +- 各种各样的种族(dwarves, drakelings, mist elves, hurthlings, orcs, trolls, ratlings and many others)(注:种族信息可以参考[这里](http://ancardia.wikia.com/wiki/Race) 和更多的类别 (fighters, elementalists, assassins, chaos knights, duelists and much more),允许无限的游戏风格; +- 上百个怪兽和物品,其中的许多拥有增强的随机特性; +- 一个堕落系统,迫使你在对力量的欲望和对诅咒的恐惧之间进行权衡; +- 法术,祈祷,思想技艺,炼金术,手工艺和更多; +- 多样的任务和分支故事主线; +- 许多完全不同的结局,可能改变现实本身 + +- 网站: [www.adom.de][3] +- 开发者: Thomas Biskup +- 协议: Postcardware +- 版本号: 1.20 Prelease 20 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/ToME.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-ToME.png) + +Tales of Maj’Eyal (ToME) (注:中文翻译为 马基埃亚尔的传说) 是一个免费,开源的 roguelike 角色扮演游戏,包含特色的战术回合制战役和先进的建筑。它作为运行在 T-Engine 4.0 中的一个模块而被创造。 + +现在处于王权世纪(Age of Ascendancy),在长达一万年的冲突痛苦和混乱之后,我们所知的世界终于进入了一个相对和平的时期。 “魔法大爆裂(Spellblaze)” 留下的影响已经大为减缓, 大地的伤痕也慢慢地开始愈合。在薪火世纪(Age of Pyre)之后,各个文明也纷纷开始重建家园。(注:翻译来源于 [这里](http://www.qiyun.org/zhuanti/majiaiyaerdechuanshuo.htm))    +特点包括: + +- 适合于那些没有 rogueline 体验的玩家; +- 同时支持图形界面和 ASCII 模式; +- 某些角色拥有超过 40 种能力; +- 天赋系统; +- 战役引擎; +- 在线的持久状态/成就追踪; +- IRC 聊天客户端; +- 可扩展,可修改; +- 充满激情的音乐; +- 解锁新的种族,类别,起始点,游戏模式和特点等; + +- 网站: [te4.org][4] +- 开发者: ToME 开发团队 +- 协议: GNU GPL v3.0 +- 版本号: 1.2.5 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/CataclysmDarkDaysAhead1.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Cataclysm.png) + +Cataclysm 是一个开源的 “后末世” roguelike 游戏,背景设定在由怪兽和僵尸带来的毁灭性的瘟疫后虚构的新英格兰(New England) 乡村。它是 Whale 开发的原有 Cataclysm 的继续,拓展了更多新的生物,建筑,游戏机制和其他特点。 + +尽管有些人描述它为一个 “僵尸游戏”,但 Cataclysm 远比一个“僵尸游戏”包含更多内容。玩家要在一个由程序生成的严酷,持久的世界中艰难生存下去。在一个死寂的文明世界中为了食物,装备或者假如你足够幸运,一辆装满汽油的汽车来逃离 Dodge --这个如地狱一般的地方-- 而苦苦寻觅。通过战斗来击败或从一系列强大的怪兽底下逃离,从僵尸到巨型昆虫或机器人杀手以及更加奇怪和致命的东西中逃离,以及和那些想要得到你拥有的东西的同你一样的人战斗。 + +在许多方面上, Cataclysm 同大多数的 roguelike 游戏有很大的不同。它被设定在一个无界的三维世界里,而不是设定在一个垂直、线性的地牢。这意味着相比于大多数的 roguel 游戏,探险将占一个更大的比重,而且这个游戏将具有更少的线性性。由于地图是如此的巨大,在每次游戏之间,它可以完全保持原样。假如你死了,并以一个新的角色开始,你的新游戏将会设定在同你最近呆过的游戏世界相同的世界里。同许多 roguelike 游戏一样,你可以获得先前角色的战利品;而与大多数 roguelike 不同的是,你也可以重新踏上先前角色的轨迹,并且对世界做出的任何戏剧性改变将会维持到你的下一次游戏。 + +特点包括: + +- 详细的角色创造,提供了数量众多的特性来选择; +- 防御模式, 一个休息模式和快节奏作战; +- Bionics; 类似于在许多其他游戏里的 魔法系统; +- 基因突变, 有好的和坏的; +- 无界的, 完全随机的世界地图,可以在角色交替时保持不变; +- 创造物品 + - 新的制作方法可能需要通过练习或从书本中获得来磨练你的知识; +- 逼真的火,烟和其他动态的地图特效; +- 一个昼/夜循环,需要睡觉。假如你必须的话,可以使用咖啡因来保持更长时间的清醒,但这不健康; +- 超过 300 种物品类型,包括众多的现实世界的枪支,药品和工具; + - 许多药品是上瘾的,并需要持续使用来避免负面效果; +- 通过修补门,窗,建造陷阱和巩固你的家的基石来防止一个僵尸的突然造访; +- 拥有构建你自己的木质建筑,包括墙和屋顶的能力; +- 使用汽车在“后末世”发现的景观中兜风; + - 这个可以根据你的需求来修改,或甚至你可以从底层建造一个景观; +- 一个温度系统,太冷或太热都非常危险; +- 初步支持 tile 界面; +- 一个类似于 World Gen 一样的选项和多彩的编辑方法; + +- 网站: [en.cataclysmdda.com][5] +- 作者: Kevin Granade 及其他 +- 协议: Creative Commons Attribution-ShareAlike 3.0 Unported License +- 版本号: 0.B + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/GoblinHack1.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-GoblinHack.png) + +Goblin Hack 是一个拥有基于 OpenGL 的平滑滚动的图形界面的开源 roguelike 游戏。这个游戏受 NetHack 外观的启发,但更加快速且使用更少的按键。 + +Goblin Hack 有一个简洁的界面,在今天这个过度渲染的游戏世界中,似乎它对所有年龄段的玩家都有吸引力,并启发了这些玩家的想象力。 + +在被投进一个随机的正在生成的地牢之前,玩家可以从几个角色类别中选择一个角色。 + +特点包括: + +- 令人印象深刻的界面(相比于许多其他的 roguelike 游戏); +- 简洁的界面; +- 在被投进一个随机的正在生成的第一层地牢之前,玩家可以从几个角色类别中选择一个角色; +- 手动保存游戏; + +- 网站: [goblinhack.sourceforge.net][6], [github.com/goblinhack/goblinhack][7] +- 作者: Neil McGill +- 协议: GNU GPL v2 +- 版本号: 1.19 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/SLASH%27EM.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-SlashEM.png) + +Super Lotsa Added Stuff Hack - Extended Magic (SLASH'EM) 是一个角色扮演游戏,在其中你控制一个单独的角色。SLASH'EM 是 NetHack 的一个变种。它拥有一个和 Rogue, ADOM, Anghand 及 NetHack 相似的界面和游戏玩法。你通过键盘来控制角色的动作,以一个俯视的视角来查看这个世界。 + +背景: Amulet of Yendor 已被偷走,不仅如此,偷走 amulet 的 Wizard of Yendor(不是一个好人)似乎深藏于 Dungeons of Doom(不是一个友好的地方)。 + +特点包括: + +- 提供额外的特点、怪兽和项目; +- 新颖的特点包括僧人种类和类似推箱子的关卡; +- 主要的地牢比在 NetHack 中的要大很多; + +- 网站: [www.slashem.org][8] +- 开发者: Slash'EM 开发团队 +- 协议: MIT License, NetHack General Public License +- 版本号: 0.0.7E7F3 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/NetHack.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-NetHack.jpg) + + +NetHack 是一个绝妙的简洁,但又非常吸引人的具有地下城与龙风格的冒险游戏。“net”元素指的是它的发展已经根据网络进行了协调,“hack”元素指的是角色扮演游戏的一种体裁,以乱砍、猛砍著称,着眼于战斗。 + +在 NetHack 中,你扮演激烈的战士、精灵或许多其他种类的一部分角色,一路战斗着,为你的神灵获取 Amulet of Yendor(可以说这是一个倒退!)。在这个过程中,你可能会遇到一个或两个 quantum mechanic(注:从[这里](http://nethack.wikia.com/wiki/Quantum_mechanic)得知,这指的是一种怪兽),或者可能遇到一个小型的太空舰队,抑或是 --假如你*足够*幸运 -- Ravenous Bugblatter Beast of Traal。(注:我参考了[这里](http://nethack.wikia.com/wiki/Douglas_Adams))。 + +特点包括: + +- 45-50 个关卡, 其中的大多数随机生成 +- 各种各样的物品:武器、盔甲、卷轴、药水、戒指、宝石和各种各样的工具,如钥匙和灯 +- 祝福和诅咒 +- Permadeath永久死亡: 若没有对当前的保存文件进行备份,过期的角色不能再找回; +- 界面: + - 控制台; + - 图形化界面, 使用 X、Qt 工具集或 GNOME 库 + +- 网站: [www.nethack.org][9] +- 开发者: NetHack 开发团队 +- 协议: NetHack 通用公共许可证 +- 版本号: 3.4.3 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/AsciiSector.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-AsciiSector.png) + +Ascii Sector 是一个免费的太空战斗/探险/交易游戏,它基于经典的电脑游戏 `Wing Commander: Privateer`,后者由 Origine Systems 公司于 1993 年发布。 + +在 Ascii Sector 中,刚开始你将驾驶一艘简易的飞船,然后可以通过接受任务或者贩卖物品来挣得足够多的钱以升级你的飞船或重新再买一艘。不管是在太空中,还是在地面上,抑或是在飞船上,你可以专注于致命的战斗;并且通过使用 Ascii Sector 的脚本语言,你还可以为游戏创造自己的任务或享受其他玩家创造的任务。 + +特点包括: + +- 图像界面使用 ANSI 人物集; +- 真正的深入到游戏中; +- 提供各种基地,任务,商品和飞船; +- 飞船型号包括: Broadsword, Centurion, Demon, Dralthi, Drayman, Galaxy, Gladius, Gothri, Kamekh, Nexus, Orion, Paradign, Stileto, Talon, Tarsus 和 Ulysses; +- 四个象限: Alizarin, Crimson, Mauve, and Viridian; +- 可下载的任务; +- 任务可用脚本编辑; +- Ascii Sector 任务语言,在 Ascii Sector 宇宙中创造你自己的故事; +- 可以袭击或抢劫位于星球上的 NPCs(指非玩家控制角色); +- 可以到处移动的持久性舰队、可以改变系统的控制、玩弄敌人的舰队、回基地修复或重建; +- 可以登录系统受损的飞船; +- 可下载高质量的音乐文件; + +- 网站: [www.asciisector.net][10] +- 开发者: Christian Knudsen +- 协议: 免费软件 +- 版本号: 0.7.1.4 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/Angband.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Angband.png) + +Angband 是一个免费、单用户、图形界面的地下城探险游戏,它使用 ASCII 字符的角色,在其中你将以一个冒险者的角色探索一个深深的地下城,与怪兽战斗,获得你能取得的最好武器,准备着与黑暗之主 Morgoth 的最后绝战。从上世纪九十年代开始,它一直在持续地开发着。 + +Angband 沿袭了 Rogue 和 NetHack 的风格路线。它由 Moria 和 Umoria 游戏衍生而来,反过来这两个游戏都以 Rogue 为基础。它经常被描述为一个 “roguelike”游戏,因为它的外观和游戏体验与 Rogue 非常相似。很多游戏中的新生物、物品都来自 J.R.R Tolkien 的画作,尽管有些野兽直接来源于经典的神话、Dungeons & Dragons, Rolemaster(根据wikipedia,这两个都是角色扮演游戏的名称)、或原来 Angband 开发者的脑海中。 + +特点包括: + +- 100 层地牢; +- 随机产生的新关卡; +- 可以选择成为人类、半精灵、精灵、霍比特人、地精、矮人,半兽人,半巨魔, 登丹人 ,高等精灵,或者狗头人; +- 神器; +- 施法; +- 怪物; +- 怪物坑; +- 怪物巢穴; + +- 网站: [rephial.org][11] +- 开发者: Angband 开发小组 +- 协议: GNU GPL v2 +- 版本号: 3.5.0 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/UnNetHack1.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-UnNetHack.png) + +UnNetHack 是 NetHack 的一个分支。NetHack 最开始于 1987 年发行,并且许多游戏玩家认为它是计算机世界所能提供的最好游戏体验的游戏之一。 + +特点包括: + +- 增加了许多针对 NetHack 的增强,如额外的怪兽、更多的关卡、许多新的元素、更多的危险、更具挑战性的游戏,以及最重要的,相比普通的 NetHack,它更具娱乐性; +- 帮助新手开始的教程; + +- 网站: [sourceforge.net/apps/trac/unnethack][12] +- 作者: Patric Mueller +- 协议: Nethack General Public License +- 版本号: 5.1.0 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/HydraSlayer.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-HydraSlayer.png) + +Hydra Slayer 是一个专注于杀死九头蛇的开源 Roguelike 游戏。它受希腊神话、地下城探险、MathRL 七日 rouguelike,和一些关于勇敢的英雄杀死多头野兽的数字谜题等启发。 + +特点如下: + +- 独特的游戏机制; +- 混合希腊神话和数字迷宫的主题; +- 传统的 roguelike ASSCII 字符界面或 砖块/3D 界面; +- 5 种人物角色,具有极为不同的战术、力量及弱点; +- 28 种敌人类型: + - 10 种基本的九头蛇类型(每种类型都有两种变种); + - 8 种特殊类型的敌人; + - 无害的蘑菇可用作战术工具; +- 28 种装备(并包括材料和装备的大小/力量的变种); +- 15 种武器材料; +- 18 种不可装备项; +- 3 种可供选择的地图; +- 8 种层级拓扑结构(包括莫比乌斯带和克莱因瓶); +- 11 个等级; +- 2 种胜利结局; + +- 网站: [www.roguetemple.com/z/hydra][13] +- 开发者: Zeno Rogue +- 协议: GNU GPL v2 +- 版本号: 16.1 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/Brogue1.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Brogue.png) + +Brogue 是一个开源的 Roguelike 游戏,它可以运行在 Mac OS X, Windows, Linux, iOS 和 Android 等平台下。 + +Brogue 是 Rogue 的一个直系分支,后者是一个由 Michael Toy 和 Glenn Wichman 于 1980 年左右最先开发的地下城探险视频游戏。与其他受欢迎的现代 Roguelike 游戏不同, Brogue 追求简单而不是复杂性,同时尽力确保游戏的不同组成之间的联系是有趣且纷繁多彩的。 + +这个游戏的目标是取得深藏于地下第 26 层的 "Amulet of Yendor",再返回到顶层逃出生天。对于那些技术娴熟且想进一步探险的人来说,位于 26 层之下的每层均包含 3 颗 lumenstone (流明石)(注:这里与我在[这里](http://brogue.wikia.com/wiki/Lumenstone)看到的有些出入),获得它们,将在胜利的基础上被授予额外的得分。 + +Brogue 是一个富有挑战性的游戏,但玩着仍有许多趣味。尽量不要因游戏的高难度而灰心;试玩一段时间之后,你会发现它变得非常吸引人。 + +特点如下: + +- 追求简单而非复杂; +- 对用户友好; +- 相比于 Rogue, Brogue 有一个更加复杂的层级划分; +- 移除了 XP 和 水平系统 ; +- 陷阱,保护项目; +- 额外的怪兽类型和魔法项目; + +- 网站: [sites.google.com/site/broguegame][14] +- 作者: Brian Walker +- 协议: GNU Affero GPL +- 版本号: 1.7.3 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/201412031524381/RoguelikeGames.html + +作者:Frazer Kline +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://crawl.develz.org/ +[2]:http://www.bay12games.com/dwarves/index.html +[3]:http://www.adom.de/ +[4]:http://te4.org/ +[5]:http://en.cataclysmdda.com/ +[6]:http://goblinhack.sourceforge.net/ +[7]:https://github.com/goblinhack/goblinhack +[8]:http://www.slashem.org/ +[9]:http://www.nethack.org/ +[10]:http://www.asciisector.net/ +[11]:http://rephial.org/ +[12]:http://sourceforge.net/apps/trac/unnethack/ +[13]:http://www.roguetemple.com/z/hydra/ +[14]:levelling system \ No newline at end of file From f0a7b1fbb4b343ced5d9dbe77d8a96442d781dc3 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 29 Mar 2015 09:25:28 +0800 Subject: [PATCH 0396/2517] Update 20150316 How to access Gmail from the command line on Linux with Alpine.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译这篇文章。 --- ...access Gmail from the command line on Linux with Alpine.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md b/sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md index d62533381f..498cd2c827 100644 --- a/sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md +++ b/sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md @@ -1,3 +1,5 @@ +FSSlc translating + How to access Gmail from the command line on Linux with Alpine ================================================================================ If you are a command-line lover, I am sure that you welcome with open arms any tool that allows you to perform at least one of your daily tasks using that powerful work environment, e.g., from [scheduling appointments][1] and [managing finances][2] to accessing [Facebook][3] and [Twitter][4]. @@ -100,4 +102,4 @@ via: http://xmodulo.com/gmail-command-line-linux-alpine.html [2]:http://xmodulo.com/manage-personal-expenses-command-line.html [3]:http://xmodulo.com/access-facebook-command-line-linux.html [4]:http://xmodulo.com/access-twitter-command-line-linux.html -[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file +[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html From 319fa18b90704828abae0193d935196825273995 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Sun, 29 Mar 2015 10:51:26 +0800 Subject: [PATCH 0397/2517] translated --- ...ble ssh login without entering password.md | 42 ------------------- ...ble ssh login without entering password.md | 41 ++++++++++++++++++ 2 files changed, 41 insertions(+), 42 deletions(-) delete mode 100644 sources/tech/20150323 How to enable ssh login without entering password.md create mode 100644 translated/tech/20150323 How to enable ssh login without entering password.md diff --git a/sources/tech/20150323 How to enable ssh login without entering password.md b/sources/tech/20150323 How to enable ssh login without entering password.md deleted file mode 100644 index 64449b7228..0000000000 --- a/sources/tech/20150323 How to enable ssh login without entering password.md +++ /dev/null @@ -1,42 +0,0 @@ -[translating by KayGuoWhu] -How to enable ssh login without entering password -================================================================================ -Assume that you are a user "aliceA" on hostA, and wish to ssh to hostB as user "aliceB", without entering her password on hostB. You can follow this guide to **enable ssh login without entering a password**. - -First of all, you need to be logged in as user "aliceA" on hostA. - -Generate a public/private rsa key pair by using ssh-keygen. The generated key pair will be stored in ~/.ssh directory. - - $ ssh-keygen -t rsa - -Then, create ~/.ssh directory on aliceB account at the destination hostB by running the following command. This step can be omitted if there is already .ssh directory at aliceB@hostB. - - $ ssh aliceB@hostB mkdir -p .ssh - -Finally, copy the public key of user "aliceA" on hostA to aliceB@hostB to enable password-less ssh. - - $ cat .ssh/id_rsa.pub | ssh aliceB@hostB 'cat >> .ssh/authorized_keys' - -From this point on, you no longer need to type in password to ssh to aliceB@hostB from aliceA@hostA. - -### Troubleshooting ### - -1. You are still asked for an SSH password even after enabling key authentication. In this case, check for system logs (e.g., /var/log/secure) to see if you see something like the following. - - Authentication refused: bad ownership or modes for file /home/aliceB/.ssh/authorized_keys - -In this case, failure of key authentication is due to the fact that the permission or ownership ~/.ssh/authorized_keys file is not correct. Typically this error can happen if ~/.ssh/authorized_keys is read accessible to anyone but yourself. To fix this problem, change the file permission as follows. - - $ chmod 700 ~/.ssh/authorized_keys - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/how-to-enable-ssh-login-without.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni \ No newline at end of file diff --git a/translated/tech/20150323 How to enable ssh login without entering password.md b/translated/tech/20150323 How to enable ssh login without entering password.md new file mode 100644 index 0000000000..4f9a4c317d --- /dev/null +++ b/translated/tech/20150323 How to enable ssh login without entering password.md @@ -0,0 +1,41 @@ +如何实现ssh无密码登录 +================================================================================ +假设你是hostA上的一个用户"aliceA",想以用户“aliceB”的身份ssh到hostB上,但又不想输入密码。那么,你可以参考这篇教程实现ssd无密码登录。 + +首先,你需要以用户“aliceA”的身份登录到hostA上。 + +然后,使用ssh-keygen生成一对rsa公私钥,生成的密钥对会存放在~/.ssh目录下。 + + $ ssh-keygen -t rsa + +接下来,使用下面的命令在目标主机hostB上的aliceB用户目录下创建~/.ssh目录。如果在aliceB@hostB上已经存在.ssh目录,这一步会被略过。 + + $ ssh aliceB@hostB mkdir -p .ssh + +最后,将hostA上用户“aliceA”的公钥拷贝到aliceB@hostB上,来实现无密码ssh。 + + $ cat .ssh/id_rsa.pub | ssh aliceB@hostB 'cat >> .ssh/authorized_keys' + +自此以后,从aliceA@hostA上ssh到aliceB@hostB上再也不需要输入密码。 + +### 疑难解答 ### + +1. 即使在密钥认证生效后,你可能仍然需要输入SSH密码。如果遇到这种情况,请检查系统日志(如/var/log/secure)以查看是否出现下面的异常。 + + Authentication refused: bad ownership or modes for file /home/aliceB/.ssh/authorized_keys + +在这种情况下,密钥认证的失败是由于~/.ssh/authorized_keys文件的权限或拥有者不正确。一般情况,如果这个文件对除了你之外的所有用户都可读,就会出现这个错误。用下面的方式改变文件的权限以修正错误。 + + $ chmod 700 ~/.ssh/authorized_keys + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/how-to-enable-ssh-login-without.html + +作者:[Dan Nanni][a] +译者:[KayGuoWhu](https://github.com/KayGuoWhu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni \ No newline at end of file From b3c4eb72f31d7f20ca8c0fd6873308f382987210 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 29 Mar 2015 20:04:04 +0800 Subject: [PATCH 0398/2517] PUB:20150309 New App Brings Android Notifications to The GNOME Desktop @geekpi --- ...roid Notifications to The GNOME Desktop.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/share => published}/20150309 New App Brings Android Notifications to The GNOME Desktop.md (72%) diff --git a/translated/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md b/published/20150309 New App Brings Android Notifications to The GNOME Desktop.md similarity index 72% rename from translated/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md rename to published/20150309 New App Brings Android Notifications to The GNOME Desktop.md index b180d43571..7b299029bb 100644 --- a/translated/share/20150309 New App Brings Android Notifications to The GNOME Desktop.md +++ b/published/20150309 New App Brings Android Notifications to The GNOME Desktop.md @@ -1,24 +1,24 @@ 一款在Gnome桌面中显示Andorid通知的程序 ================================================================================ + +**你很快就可以在GNOME桌面中看到Andorid通知了,这都要归功于一个正在开发中的新程序。** + ![Fancy seeing your Android alerts here? You can.](http://www.omgubuntu.co.uk/wp-content/uploads/2015/02/Screen-Shot-2015-02-24-at-17.47.48.png) -在这里看到Android通知很棒么?你可以 +在这里看到Android通知是不是很棒?就可以了~ -**你很快就可以在GNOME桌面中看到Andorid通知了,这都要归功于一个在开发中的新程序。** - - -这个新的项目叫“Numtius”,这可以让在Andorid手机上收到的通知显示在GNOME桌面上。它会集成在GNOME 3.16中,并且它[重新设计了通知系统][1],这个app和特性会用在其他更多的地方。 +这个新的项目叫“Nuntius”,这可以让在Andorid手机上收到的通知显示在GNOME桌面上。它会集成在GNOME 3.16中,并且它[重新设计了通知系统][1],这个app和特性会用在其他更多的地方。 这个app的开发者希望在这个月GNOME 3.16发布之前可以完成,它将通过蓝牙工作来保证不会传给外部的系统或者使用在线存储。这意味着你的电话必须接近GNOME桌面来保证这个功能可用。 他现在还不能回复短消息或者对提醒采取操作。 -开发团队警告说**这是一个早期发布版本**,那些打算重度使用的人们现在应该做好最少功能的准备。 +开发团队警告说**这是一个早期发布版本**,那些打算期望很高人要有暂时只能提供部分功能的心理准备。 -在GNOME桌面上看Android通知的移动端app现在已经在[Google Play商店][2]了,GNOME程序已经在Fedora的仓库中了。 +这个用来配合在GNOME桌面上看Android通知的移动端app现在已经在[Google Play商店][2]找到了,而GNOME程序已经放在Fedora的仓库中了。 -开发者已经在Gituhb上开源了Android和GNOME接收端的程序, +开发者已经在Gituhb上开源了Android和GNOME接收端的程序。 -一个相似的工具[已经在KDE桌面上有了][3] - ‘KDE Connect’ - 已经有一两年了,通过Pushbullet来为使用Chrome的iOS和Android平台在Windows、MAC和Linux桌面上提供相似的功能。 +在一两年前,[KDE桌面上已经有了][3]一个相似的工具 - ‘KDE Connect,它通过Pushbullet来为使用Chrome的iOS和Android提供相似的功能,支持Windows、MAC和Linux桌面。 - [Nuntius for Android & GNOME on GitHub][4] @@ -28,7 +28,7 @@ via: http://www.omgubuntu.co.uk/2015/03/new-app-brings-android-notifications-to- 作者:[Joey-Elijah Sneddon][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 8a70b4ae4d92da122a0b289ff705ee4719cf63f9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 29 Mar 2015 20:13:35 +0800 Subject: [PATCH 0399/2517] PUB:20150112 How to Find and Remove Duplicate Files on Linux @geekpi --- ... to Find and Remove Duplicate Files on Linux.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150112 How to Find and Remove Duplicate Files on Linux.md (81%) diff --git a/translated/tech/20150112 How to Find and Remove Duplicate Files on Linux.md b/published/20150112 How to Find and Remove Duplicate Files on Linux.md similarity index 81% rename from translated/tech/20150112 How to Find and Remove Duplicate Files on Linux.md rename to published/20150112 How to Find and Remove Duplicate Files on Linux.md index 7e0b96c45f..d646627e84 100644 --- a/translated/tech/20150112 How to Find and Remove Duplicate Files on Linux.md +++ b/published/20150112 How to Find and Remove Duplicate Files on Linux.md @@ -2,13 +2,13 @@ ================================================================================ 大家好,今天我们会学习如何在Linux PC或者服务器上找出和删除重复文件。这里有一款工具你可以工具自己的需要使用。 -无论你是否正在使用Linux桌面或者服务器,有一些很好的工具能一帮你扫描系统中的重复文件并删除它们来释放空间。图形界面和命令行界面的都有。重复文件是磁盘空间不必要的浪费。毕竟,如果你的确需要在不同的位置享有同一个文件,你可以使用软链接或者硬链接,这样就可以这样就可以在磁盘的一处地方存储数据了。 +无论你是否正在使用Linux桌面或者服务器,有一些很好的工具能够帮你扫描系统中的重复文件并删除它们来释放空间。图形界面和命令行界面的都有。重复文件是磁盘空间不必要的浪费。毕竟,如果你的确需要在不同的位置享有同一个文件,你可以使用软链接或者硬链接,这样就可以在磁盘的一个地方存储数据了。 ### FSlint ### -[FSlint][1] 在不同的Linux发行办二进制仓库中都有,包括Ubuntu、Debian、Fedora和Red Hat。只需你运行你的包管理器并安装“fslint”包就行。这个工具默认提供了一个简单的图形化界面,同样也有包含各种功能的命令行版本。 +[FSlint][1] 在不同的Linux发行版二进制仓库中都有,包括Ubuntu、Debian、Fedora和Red Hat。只需你运行你的包管理器并安装“fslint”包就行。这个工具默认提供了一个简单的图形化界面,同样也有包含各种功能的命令行版本。 -不要让它让你害怕使用FSlint的图形化界面。默认情况下,它会自动选中Duplicate窗格,并以你的家目录作为搜索路径。 +不要担心FSlint的图形化界面太复杂。默认情况下,它会自动选中Duplicate窗格,并以你的家目录作为搜索路径。 要安装fslint,若像我这样运行的是Ubuntu,这里是默认的命令: @@ -27,7 +27,7 @@ Fedora: sudo yum install fslint -For OpenSuse: +OpenSuse: [ -f /etc/mandrake-release ] && pkg=rpm [ -f /etc/SuSE-release ] && pkg=packages @@ -51,11 +51,11 @@ For OpenSuse: ![Delete Duplicate files with Fslint](http://blog.linoxide.com/wp-content/uploads/2015/01/delete-duplicates-fslint.png) -使用按钮来删除任何你要删除的文件,并且可以双击预览。 +点击按钮来删除任何你要删除的文件,并且可以双击预览。 完成这一切后,我们就成功地删除你系统中的重复文件了。 -**注意** 的是命令行工具默认不在环境的路径中,你不能像典型的命令那样运行它。在Ubuntu中,你可以在/usr/share/fslint/fslint下找到它。因此,如果你要在一个单独的目录运行fslint完整扫描,下面是Ubuntu中的运行命令: +**注意** ,命令行工具默认不在环境的路径中,你不能像典型的命令那样运行它。在Ubuntu中,你可以在/usr/share/fslint/fslint下找到它。因此,如果你要在一个单独的目录运行fslint完整扫描,下面是Ubuntu中的运行命令: cd /usr/share/fslint/fslint @@ -84,7 +84,7 @@ via: http://linoxide.com/file-system/find-remove-duplicate-files-linux/ 作者:[Arun Pyasi][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 8779d4476a55820943d8c3446a8895679bb4d681 Mon Sep 17 00:00:00 2001 From: disylee Date: Sun, 29 Mar 2015 20:16:41 +0800 Subject: [PATCH 0400/2517] disylee translated --- ... web server logs interactively on Linux.md | Bin 521572 -> 6723 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md index c65b78f21ed2ad0a2c8352bae2e61ba5e5622b6f..51ad96d272d1d80ff260754f42f83ebd4777ee0e 100644 GIT binary patch literal 6723 zcmb_hSx*~T7Jm1ys39-Yk-XsrXmz^PN^couI?;5xrIBT!!Y;tw#zwXYNi+`*1h4^P z2!z!HOxQxez$5`D<0I!TeZ?=t@Ko#KV#=vmKs%`PqU|!>e`l;oA|n44)iM0pwgx0GHg80mUh*J zEmmFl%5vim{;^opg>}79s#Vt2#Y0G_Rc5qTOKN&iE97g%WpICYKB-q1#an%BkDVTC z%TIo}`%|qru2-k^{3IJ&uNC*iMI0tl$#U&{SFKmjz>6ulyLho|Z>ELPR#cIo;2Sgm~W?mQ(#B}vA2)#PI}HLoW} z@U_0Wgs<<;)40ou+pJK*EpeTmfL-cTdv!>p-e&ck6zoaQpH6BkMKdAIfSbkE){-; zlZ9`=8`NQ%T4_|TE`c69-C`rB5D12=6*IN+2+JNKKnz(^N42vF*htMzv+Ov@%7umn z)l31m;2UvXa5Vh)e%z?5TY7bc#6Q?lC+F3vMR8rSO4^eXJvk{|zYbw=fThOj!xe*I zZWm9;wdE9T$6m}O(7>(_1C+%b$%E043ymypfJHh0+OGN?BPuiw|| z7w!=BzEQeDasi$%iE zHA(JIgc1WmMG8gY2{{~=dZIFqJc%=GC;-Bw;n8S4mqbQE4SXfDe|z`a+fuDO%Sy9; zpUV&bQR+N7VbfD;dWR%I!6_P&G%&u`$EGLM^;2OmoEEzL4h2YU zfg9B4If#ekua&3N(zLez_Tl=SF$M+Y@rkX8OPuirUT3R)?+K=CSeDkKj7PfA}t0A3VC>-EiD{2aQvK;0Lem#tWN0 z5RG()dIn;OWVI?0xht$#dz5IX-#E}G|E4s3Y`6?|<|>T~-JvukOl}{wO5&38fElII zh1znq*2ru9a7(YC$ehp>Uh#bh54}>U=imB$9>10^=!H$(W7FICtLBpG{E?t7vPI;* znHwluA|e~ktd9t9Q3|LFD9Mz05P}^Y3nA(+_t8K^TwNxhXeg3NSL7T!PqLkf_j8sa zGrMOnJv?KDVR2Q2g(%KwHT8vpD93^YJ3K>yF$%*KY1>Fh)8CS{Te9DmWA<>g$1d}> z+-eu8X~QFm^QM{wW1?)a=M%zGO|f+)J&LuUL9G+ic-mBENrinF2fZfGrm5GN=HT9> z^hdn|OkijY#R)?gIm;2QNgst*>sV>7-sg zG6?c^BkmFccv-@g`dk4NzH>Uzed-Hu&~$)S&>hsw21w~+uVKh588v89G8ZS++zQJM z>B(WAfojmr)%**;&+Dg(m^wvZ38(3WBUT+X9F^PU{b-M>z`-AkHgjG z>U22*PH(U+;Bwf0?eF=_VlhhRWEuvr@vtSEqmDI9txuh@iv=_xy^t5p6p~Y2DvfG| zq*mI7z=%)*dg|Nr^dYdlI$cB$L$zMHfSZ7scp!bG zSjWeTkw$i>*WK=giX9GTXPfNuba{f^-j2>LLpADi_2jZ%9c!c+93jBQ2jHPuJ0lf& zc#7+6dImyL%%}I*<{PyPu(*r*f#@PlQEt}#HB4Ct4Pz@;DnECzHY+TN|Zp0{`g~)UK#e@ zj?1uza&DK`zk4cf?kcpYGZY z)D@&3cWsBK)8kdz94IVpfzC%p`gIt3YvU)FS^k@nR~4<+c23;e>h5s0cX&J7+Pd03 z-fnN3qoE{IQ&|Dk;F*DPXDQuv+Q6IMV+qmmLu}Nfi}$kCF+L3 zs*tZgp4IlZS@u+vJ6`!4@cJrL-DuB`0&?PaTJv@39}To6Q1qvDYNFie_{|;q1A>y4_fZQ~&>4)1|c~l+W!i<9Oa-w-Uo%Q?~!U~4cR^F&nn99

5yu6V3> z=p>)ui26thd^}X>Opc#g$ap}y9IdTR7urpyyFJ*^>T-3vF9XuB63RW=07gfS<^__k zRrBg&RLw~>Jqv^@ia z3BGOM(f3hNy($k~9iqn~$=wbVRit;jEO$8N)<%+F1_$ViVUou5BdkRB^b20*E>f(z zq-{_hic$bA1(v^TfV^Q6+{0D?t&i_d5DeIykY1+!Y83+bXr9_mMjakul??-7^Ck}? zP`4CY9dj$7pNymD<1d1>VFBvZb8G6{8OttmYYjd=^eva*5i15#qc?9{`S}odRDRu&J`B8={2^+guuet0I{3CR-8gA*0|e zI*+mVLEL2cP_l?=_ZV{@h1v2G$W9-iN(#Uc$Ybw^dw;!crr+h*U{s^VawT^6mMpyARjMLvoNuEIQqtmZxeU4o63 z+3_>vBMe!ey`ahjaL6N%cl15&xXe7Qal#8(PB;ru$IkW!AAq7 zuS*HqfBvQG_JDk+|L?(`ueudEfx-Mnl)q~E@(a6=;Y(OlOjOuG)yn(A*OZ2bV+d11 zyMUX?zz7(lli7G^Ko4svtN`G3w<-pjO&h@d&3m1e+Rw*!3|s zHflBoMDa(91C*ljJaje7!O>rSy7MCxr7l!BzPkFl}I5LDB+ zdd=oQ?GXE3VGc^Xl^JzvhXz?5fFBewGROPlm&IcJgMTcR`yu&rb1U?qFB%*OM|q%x zA_*lX2NI$Cid8HItjId6NINU0d8-_e!w(-RF>9EX{zei)ZS1TO*S_!Nu2@J3OE>?O zk0|}J-zWPm`r(Z6HW-RO3@ggzDBBZC^bT}!*5cHyZ$7iA>v^m+h?@9>%eTI{@=nux z$}X&k5TbL(lJEA-d-txqK`-q0Vsa!NmJ`a|SoBvVkoZhuQ)?`>qE*X~0v`35|D(ZH zDuN8gZlQ1>V*gCiGcWYLG;k<@3O4Gp|8vSboN2bDJdo&(#_T=9A{K1h%~R&ygm!Qi zY?009gRX=U=#6u8(5FZg77rW(DjSI8eQ2^+l1zS<`ax?4R=%6(bh1(L= zfqtvfuY|2Jr9T=EC8Dv1)@Z~U!16e1lu+yuO&ZOD1*3zJa8wRn3*vqxs6+yg#DXo_ h|2k~J0>pgJVWv$)ku4hQu?M4pxV_cprnQs7`#;}AbS3}* literal 521572 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

Fu zck;lr)FG+J`hQskMknk>C*NPcu)el_Zgp+-Y`41h>hk$FU%2qvnWz5nYhU}r zZ~fVyJ-@oV`uhBl`PVm&+!b&ox^(XnKh1%hinsur(#4XA+5{vXrH zpf=^~&$|Eh(>E;~J-&A1{CxM|Pks9H|4Os}6W5?dht}l8 zGyUe1f3%OhH*+F{QVyhz?uaIHC*;;Q3vP z4X|q;oJRGW=Hh;wzr=uO7Qz6rU_~eOH|N&7v-0b6njyTldZ}AoSvhv&t$VEmg5^ug-NKs}k9_owyMO%e z|L1?@ckWzRe5iY=yX6}vPafsk&nyUBo1VY+0ifLHzwPa7^CxfIm|vS;SXf)%SY(YE z^GePOv+XT!1J?QDwLVM#cJmO8zR8)tQB9tmb;&_Mvw$sDVo+dXjf#9hDi zlmEqUec;Ahe|Ty6`CHDt_QbJS5NMk4DuUNO0O(*Z-ulAa+8Zb4R@T<%7v@(M<`;B5 zDTn-3Y>Go{s&VFV5SY{|?U^5Xlp7su!mJ6utQo-@ngP73?e+PM?t;qm3Idm2d9}NH ze)0I<{M_gN`48TD>c`H0_xx=Hf%iZ5*urckFsa4gI^2N>036=xv2$}e^Utrd>F)Ad zcgQo%JGH>1Ai(;bWM>})0nz4g?n3u7fQS$XE^sY?AfWA{H0TmRcka6{cXuuwTlybA z^OygZKY!nYpLp%rSKof&!t=)?2z>F23$tqiYPhSAuDzpu>|=8`uidt=v9h$desq3m zZf)(vLbvd?55Mod|LNTP-0WJwRTuxD@CUD{0`R?x9Z=e6Z`|kh5i!XiWiElpj+zaa$UtYa^xm$bnU;fLv?lYh1 zx;BO!9o!aB@7VFTs$?5P;9Zr>n_^}L!1aOk_4RILdAWP} zg%`Vb+;Z!}U;pIi{?U&<^w6i@Jim7Ph1Xxd;ekt+7P{x3U+BK@g@ZXpw>t3a41eGn zcVj`1{La$BZh=YXWL+&>mt$|0;tqk90^A|Eq+5lnVkAhs_S%^U1aCia!~8FN>hu5L zFMi;IpS^J5^*b*uFW+$L%$dbm5ZJ0kuMGac1%NAaSTikebqjb2U^`p8zBmez$Nq5q z+_+Gf^N8o3d#*cq;zV~`mwaHkX;^Lm6>jBH#WMC{EA7rNKap6zbF@y1Rs7|s8U&-~@T_n-XG4}EHB z_02mY2z1>-HwywgHSfOY2RZ<7mYMy%^(`=d&SKJC0G#un`0{x))w}zB_W{Xg9A%hjrz5?tl37U;5=)5Xg3XEB6OF0KAn4 zKGVHT3&<(=oaER{@twv&1m|B854WAT#LGp&H3a~2%I7r;c;nm~-HGGJJG})OLEslZ z_4!}^#1CpF(4CLvz&kEpT%64W+`?BTp9O#`(~gHii~Mp^YG(m<`gt*GLJ)HSU}go2 za(+GDDTs@OI6of=$Onc903vrUe)pyBxB`H_F(7#b49y#U;WMBA<&S?PgTUEi$4<_I zz@{#^EW|7TTvqcXQatqaG} zVNF3nAAaf1y!L9hs^zAg~!e~mUS{4w=kljE-_Uss;j0#w$ufHSYX9?O6^IX~M1fj~jv z7eD>EzY{@V{f)cNE-v0Mn+fc;H@4@S1%U0_=TK88%>v}Jk=j`RaFj)}OuXEyGE;k| z_%ZDl*Q!R`s+@jR&b_8bK32$8UKbvRf9chiyTv0*ngL`0Kwq5+CDc`nly&U`2Rl1S|<hlY z;HsVyTv}2PP(WZQ(9Q&Y;gg@qnZW#oyJkTkTKuwhvjA{e%{S%3@?oFRCmm@UG;$7* zPH!2`{5t7}V{?YrOI|S>;2OZH9G;oLn$Gkw15kNmZeEWFZ*=GMb(o_^kJccdK!8pH zf<8MoM-ceL5B$idmu5j=Qn&00HwyrJYOd*KZXLQm()8)RxFyi?6&QUi0pzoh^RbY0 ze3k)nd>mdht^+U&*jUtX)Ux39v#)mxu?*1qe{nHp0n7vl0KO*h^Pl+a-<}15Eqi0v zgjoRCbyFQoMmlh(Z7(&S6a;)mZ}rGuBend%F6&Lspx0{wDznxXmYD#z0loI;4ghxp zVum2vYiHjOm(KW_9S{JPwBh(H1!h4Yn)Qn9W&z-eHRW5QsC8~`r^PKb<-8}&mh`;Z z&Xx8_n|aBtqtz?)_DRkbG#;GOce9z6}C_7h@j;5K@YAfjPtHEkObS7yfb< zkU>HAi&?sgEr1``8S~7W zXJR`Z4$0P@m7(!`{CMN(I&b;-t(;c4b~8Pm#2f2CZ){_G)Dhjf>aH#9nz!g@Nl-UA zxeg4w>Fgz^)LaWlIGsKMfn+x1+;ejH3NlB-l7)32ka<$W=|)@ne0Ty`>bt;cQBab=yX5S4!zt7SYZUM$S4eLCe zD2KcqEpQs_>G;W?v~)Tv%WPT#PT8NwJzA;h*Cy) zjs+YCU6P%hB5?eLpBE-&I6wcXjXZgmS5~?;y%?mQhf@IHqMvLv7yp309B>fmbE%j; zCy;Hq)1E$?r7PG1jAb?&HXUhrwvV%aIDYb&&(25LTbz+YkM&iWdB|Bj22 zAdnXWea0UL0m=>nyg)Py0^9XK(&)2Ux&kf00IrUNlT^nKd^o*uVx$cJ*y&q`H*DTE z4}Ha6>$EMth0W9IZ0Rj*UT{MgC(pW5Z~j;cWRNTPSQ_N9WqYuvoOu+y6Dno}H|*rd*sJ$8T}D9GC?GH}_UK7n=`c$`gTy#(}J2 zREiq*n=0MI!sA3>#yA9_k%Cs_64U4_2zZ=QTk=$#q3!dy04J838)|W>BiH5?=Hq>= z)47EQjr#KyU>_gf_T%B5IE$-5pyNxxl-D4ZgCOIUKR*tFL@XUZ@N+QIAJ-mKMr37m zRlEwN6hf$16K8rfj8ps$0sKzu>oF6c_@%G@yZ`&_;_(;tD)G7JAAPjzzVL-rZBY}m zAGX}%@UR{C6**o8a|~$ZUIWvhdFC9>0)}T(@mr<|8dWywsXO(wvxW9doM&L$+CH}q z*QJ&{g-5>BtsIBTcFwp+S$INT^^f|fva~_!tU7#5L&} z^p~?ffnj{sr)-?*o(aru5sq6w%ai(LGUp6CXaNu2a1ag9cA#@s47?=ltS*~B97=S{ zRlanF>YTY$NC&Bo3cZ!JQ!}M&H{+eBOtsPKO&&XO@9Ej=}T5{6wx;toCp4@bqC^qWxVGleh>Pf3{42g=VKV{O& zDh~#fIYqCE4(4s>lmJ4?U3l>3^{OkS%PjSM2{U5 zc#}=!x7fzKtsd6_M{5H@)F*6aJ<`5m>Xr6Fw{{K^Szq{SJHZQ{KfV%79(M71?7A$z zxTL5%0VL`}qHd(U1OZw2XNwZ za3>63Ou5MiTkFUk@Wnx7ApIa6B%Ptk+rIVL9=UPkExv^((Tr>5E1dPnfFQl9K(Z~$nR0}cZ5c`?2* zc!+}leKMB8r<5zv#SwWqdQ2%U?9w**<+~s(hHq>-nbLK2Yb*a@Kk#8 zCSStgWKx#11aOrH8+JzPZk^J&tczvSL3guHTPf$`nWTS=t7Ta!fxx(Q;+)-pi(`-z zI}mVD5NF3W>;G6{C~s#K-0O$VEx>F8y&oW4`uye11aSB^2=oDfTZ#k$e{%c~{_X(d zX_mHV0XvA#=rk5imU#&b!bLepYI7D&hk$0M3x|06yDD=z#M$DbYsx zG$1(Y*rqEn6L1h9pI=*_`vqnK%`Xt0q8XllenAfkaadEEn9UvBH0<}QT2Bvh56U<@ zsRj&g<098UB~KiVlmoWnG`LmpAWnMnn}?hP54=vMQ%8%*SeE0 zo;q{p+-VSB_yU{PBVeW`9qa&bjhdN(XNPYC!FJB?HLT@Ahj!$+ZR&J6a}F=@417wJ zZWv7J7|JBQ2vI0$GbRb?y5=&jI&@+neEAgdFB{)W$Jb9{Ylp`1vAK|^8%Uy)1)E zCx908;7h!5&XH+1*R91F-pYR3NL#5lZN)Uc)S<;wSI*igmop;krZ&KN>{Sn8CHN(b zY+n2;bjsj47Ui)?j~?BLARx5TDA*)2_7Mbts2G`M0>I#7de0PJ8#95p`p>#wo39B# z3w+604*a}+kTiakc=gRY*B2L0DhMo2>vDj0pQX|Q3?VjOyu!sP(@5T;%m6EVlboMH zZrOCCl&`wd@sqFBjUzDlD=wWc@yL%i*DLFse67qF_OT&1)|K^Zb!0uLPabDeH!2WqnBw#*v4rED9dGpoHAw?;$zv+{;?d%O+=B%M9~s$NXdZ za8}^@xAg|+c5`mN+E&&>oq%26cnJvaCq;#|t}hXQr3bJ#-Y`tKk=K_X zpf=>Yg9L*T5cs^9g8&~IB>;FPz|0{60zu%@pZmK6fs5U_shtVX*R!M+$U&G67h_Mj zu><+cWqK=v^Cy1uz)w9ISOky4mrj-roDPxBLk&`o_1USC7YBph)@=+|eU)!JT0kpVCh|D`Qg`S)KFrx48V$n*!#p~Q^?F47qL9w;Yt6>h z2FlQkM}CzcAsRCPt~JEmLcu^E5{N($KRUXo_XI{kAOeAB3CiPB`G(}Pkl!ZXDeBWG-moBw&8?zsran|^#8fSlh3+?ba;%UQd1g)BAPDyRO?j85Q8 z6*8uB1sjzim3NEjMP1vIPC}uQMn3&WLRZ0d8|A`alyzW>>uYnrpdg@_vHqps|AQ|b zKYsIf9=LSr{8P_AFTpslNmU8G*Te3>27s&CcnkzK#*DXd*}=hh&S3CPa{lBoT}<#5 z{*Wm!_^>x}eB`0HE?Ej>?7%yy79t4J5lc%(g z0iEETtRv{9@=yaWz5Gy!=Hu~ufgAc^kQFEj6xQGX13#pFB_<2i&#v@JnIj4>mC zuz?NLShE0kq#ArS9mB-;E&f(?2cRhTd2z zQDz``eH3N^K>d`1D9`i^BKjPhot9FThxpw%zx6O2tPfml3{D72$(K-14@&M@KEuh~ zFbQmFLrN`qh@02tHit&pdDT1$1Y&|O=L*TiZ~W1Qat`gF#rYR(%mi9|a-@!MYRRp} zHrJiikAqy)he44?KXihL>qOaR78NuINTgh0C8+?T*>y9Xa zK=%i<&-x&>>z!@r$aOzFl^m27yB#0AgS; zFx9gG3rM&QAn?gYUho<@;7FEDo}#PK1J72@k8Ex!=Q1+Dq^)qK1yk8srp1k6JDu?! z@Rl{*c=K_-#Qos2Lz)&?5pX2jm8m<&97!2vO0-ex5TkI|;D@4q+SM$iuiWtB1 z#_QdSzyFo)O?@HwlD1_{&sX%3kW2bb!0MV{JzT`YKSvh$u@KGC*VenE%9oaobVoIN zxaq_V-N_TjyA#KbcgKz#=}sO$F5HRk*wJI%5$*`YrrU!0CE|7I=JjKJgdpk^@j(@# zz6)GsC_&(7Kk?arpa-Bfe*3Fm{mr=(^BWI5_0*eBeesJN%XJw94t)S%P_|n-adtfT zq2m@OZJZx|Z%{*Cg01X8hh%L}qRB5zivuR1i{$bop5$ov=5BFAxK5}Oj|7hB1k7f< z%cdtj?IbN7nfh|^jTykaoV%QC1IdzUO*7?rF~pJpakWMAOGY&KW#N{^uq+3Ui-Plu`fT`mx1uxj1)f5@1XiI%K0J5fO`YK-xc*|d!4rUSyFmV_ zT=)6au5$_qOWhr}zOB3C?QiSuyzOn>+itzByZOc&yQO0a4hj%!3NV+Jmt)(|hl%1B z3>5^31V8)nPya(bEcDlZ``>@rAIbmG*lX7gpj67`!9u(!sOEAdkzh(@&t+GlG!0|U0 zI(;Nu*8`L*P_XIA-Jq|D#>Yo7z%lSC@mTXKDB$oLssq6&oL~8dW)JHM3g?7B|I&B5 zr@!+;1c^BXh9zmZ^_E+@2k*VFd*I$v-E9gA$8WfyJ0{wN7^>k{$kT-s(+;TV`$vPbv@F&j_;DygywoMHLriWt( zUt-t?uaw8vfn8P}K}2}2$}?Nw%#TgZ{;LWca#5ZAaen2}k{dx_T{O)AqU&K|1F6@ey*-E-7HVbncDr2{UiO7@lXGoKmEqn#Wz+5nIPxt{$gGick*xc)4z0cxBFxM}eOo8fA9%m+5M_UHQ);Jiz3(Xt#4LB;s)LsbVq?xrjZIN8c#TS?J#0QoZ zU`fE*e_f47klI&Fp7?=}Sp>m^C;G!YiUY{{ z@PZNnVXe#x=GHXaad?$kK7`{7UWh=TvS`c%A~3{KqwAi1`McdSFTSAb3=7?Tr%rY6 z`=0OVZn@>wc$8SbU$*$OpZWZ+oW1bIU;UG3pZkMXmb+Kq-*p!refVJ_lA?+Z@PMa7 z9RL_F;dlT6r(@>utOFG?(|6x1j&j4ld*`nK1bfyqDTf~Q5D_|Qt30Wd-a@9;+^$`G zrReoY#RhPn3qXRCDYF9O;bFr8gIi;r^}R-Z;BjoG-X`lO`-1MP__RAu?x7Gi^vM14 zM?&#I0)uV|uIU+pSbC$|SNfIXTGR&TMu*tNhgMmTJgW6TK`4(UfiO7!oSrXWnLxmy zjPoNvFyMLtONGEGK*Vx^Kq2Q}75&@KKHEM1?I*jt@4B;l{|7$M-E!NlidZX4f8#&< ztN+{2|LQ;fiC0!HJ^GzD-&}wHV~;H>2w?lb2LW2_(4}yCjT#?3xi>-p4jpTK2C+7t zV8i)^E_}#VzK{t_!Hbr9DCYx1EFpl=QS}V%U@NW@lsxJY0Kz~$znb#NI&7w%w3AjQ z?Xj`9zc?Prv^H8>ZWGtf?L)idCRx=xHtN|Q13JY6O-gtTIKTJ&e6HqkeSDy8$`968n) zGcX}!%M}F^-?ujR!=x$g%a^pY# z?|x1};Nm;xyK^VLbN-u)5d^;YMNM4}ZV;gT4^?7VdE>y{0EuItgD%S2<-o0ukbGH& z*G>VRGbYK--_k5+eR-xF+J}~WNG8p4=p~sR4i-*S?1_Nm?KZ*7R)Yk=CTolut1{fz zd&JYy4TlyL@@K@+m4Pf~0R_%uZI4qh$D<1IVot!~<+lJsk8<2ssWY=LWwd#|FP7 zIPe4jmE*SrflDx$*V#Yc3?w)Jvn@qXSU>REr zMIO>YuXYKdEFI!YLUQ_e8&l;79xMf*OPYQT9JJU(6Mw!Ps63Vt8U>Q^OGA1kFoFnq zolU??nb`>Pd|N=d;0tn4{Q6BdZG7K_3*A${ z`@3ED$Rj@BIHrTJyP^(u5DsX&I>cbmkRVSu^DLLaQt0Suok-oB!9&b&ro8il3tFY8 z-n7x{DuWUlsq&;Qmy?=w_6*`Swbz$hQuuDmH~}_)_><_?<0zWt|K!o`d%o|3|K*Ro_j`Wx%P+q0dn-p@ef_0}Xp)CercQQiWAxgm zgBt+U6L}`Oa*agidc&cC`@A?NgU8MuyuyQPc_{^-kd|-h=1+OJht9pZ?0O*~SXn~G z2O3Jno57?e--gt4;SbnpQ(J^iNZaD~shYYt?YtdD7FsRp9t4EB^kuGvg!aV-qJEgQDnW_pG! z^O1Abb^xh(@lj~nf_5QA8;FP;u-hxH3xF>;ruD|<&yD3}!Mxz7DYu+|Nx_0`QS0v| zP06`Ozo^wB@FLd)#G?s(skPZE&$NTI3|f+z)?wL zo*6{hgrHStjH$1zcaUB3p#+?-e zI1|VEU-GbXrpAGJ%$Q(+R;~k3AH-sI0Ik$PsBP1DmOw3{uTU&okty&Hq}B;Q3RK(~ znAfAr4hZ?=VHdA3pXla3{Jz`oy7$k{zW(~Lg_D{EoEPK4xgdBb0szB_j$^~gNzUoq zA-&~=FU#x=*W9|QOpdd3@3fgb37fCrl(l$DE=MJM+sU^b4q9q8*WPlR&GO`w+hn@& z=1r+`HWx7+rb^~n9;eN=WLl2X@&Zq`J!^i5YE`EBg83nl;0~t(gr*!BId)tK!~^M( zsI25k(oHe8LIO_C3<$6#2YJe|4>h2g)CPk%u40A=v!R2CB>_tTru|w9tn;2hyqK`A zd)kta(u)@^oc#XpdG9B_@s;0u;?37?y0m)Z`L&n@GLQ!hlPLIZ3*g>A;vSq*#C|o9|Ij8f! z7_bwzM6ykmAlRba5oLD3eS2mIrFz0D#Y`i?Feb26FOhT-xGWU_9blA4b#$CE#4XAd z0s2;mz9X1NuEh-R5X`;p#+(2A`pU-tdg6xF^KV}2R^Pb$?zwn4s8MYbS35s60U*0F z2O~p_^4JLj2fl1}Trh^6r-tg>blhfrRn9ssSIZ&U+oVJ?-SDIw+@yr;Zc{(F8-d-* zTNZw1R5%_>B!U1m*6HE9g6)u)>1P3=^I%RmI4xWZuZC1!6ifxurZax{og57|E)Xus zPB^#7t7Ue8J+=r2MIWAuO%y<*Zv8E0cmkmua1a3!7x-X;0Ur0F^h6wzUd;mZnE<`2 z%*8;}5ks)+u=IbAW(h|wuAE)G@yPLoi#NWo+THq)YnP1IXn$Y>Ks50cXrk6(IqRU3 zAw(Xxo0JDmJFw7@$qkGKDCI&A-j*&z);~@ za2G(1vnZapxQCOozQ!r_R1de$aqLwtCP-)am}oI?Kt^?8X~FfnsJC{sE9`MyKrr@H zEU6q7SqK=PXLpy#kqXHw9Kj+q#PNtKV|+gldn^IC4uM`>E4Wz!;mDDTOAE{M8}rNO zRjrd$MU}qB&jcLU0MIu6<-#}>1Ht{=>I0X~opfmCb8cL#BWUcJWZS186tS zZ#kQA**TgkY_4kWJ1@Q5{hwd@op?q*j*+$WghZ9N!k%Zb_3mBoyubU=|M1U+qd>Eb zQuV%URo{K-)$Z4S<9FiX9VYT^Kb(eSsf2hBpC|12pvS2PPjx@|Lmv$;p4y8GdTqm~ z*Wy;7IJiaVpr984qaAU0Dl?~tb(nf%iU5HM9KD=`)xSAY;5gX)gkUuVR;gqOl-l>z z&sk0I;qc(auU1PyWpG>@$a;z#2;~d&NA+6s(#pcog_D{loH=vToUQ}RJrc^U?QW_A z0R3sFbu)ttyn5eo=2

PBc><=SivDn;$Ivo>2r_;Y=R*6B~oA45rkFbjp*%HYFGl)3z!(%>l8gB6|Jm$%=rK)_(2Ta1|GtWNP-KeM4j_c{QBYL`xvuLed@-aXO z0IRx(eNoS{Bln&M?@uCn`dY$S6Q!uDcF)SrO?p-Kn4X;5i=B7fe{Yqh7FOEA72&UuG zre%#gODB1yd9$=~i0L@RgXSV=v zPVMv``s6JoD=o_r6a=>TaiG9rr3+5cAudXl&$TS9J#|=4F5@iYoN4cqPe0S0&}*wF zjxNP4fX8W@iEOaqCVBSf{*_*L7e8Oh7ungItk0N9cC+cNa6b&MU==fR|BfQXKlP|}QJY?bQ=JuSvt;IUyk z_2leeyOc?;1A`-}mWN-PMvL_XAeksLib4i0iHkf&WuPYRJYZjX`4xS$cBMNZ$7BX@ zv^?`Z7Q&rbkK=ADS^_-yu6GK~O7-cK6ls4IU z=L30sI>va~UpX(~L=cD;paIy#rhDzoQg{G}-~P+$sUDJvTYlkfFa~$DY0L#3u zcTnn4n(oSGr5{6SbY|(S3NxH@+)SPc)WL3DmhBz8RJoN0WxX{|4SiX_-ke``Va%qQ zVl^{6y^+-Vv>X#>WJ=EZpBG$s>TWEqvr`P-d0nO^fblu(er#8TA(zh2kj}(&`mLQM z+2O^Uct78=C2#HEMW^(E&2VbLd3IL_;<^I|Q!0>$YpY3zR?e!a8D7b7T%7$8&kO7M zJ^_vxPw~cqCmkjv(7&71Px~zq726ybtjjILHxi@6q7pi?wIy8&)B$(PX1(V5)CPd) zZ*_8ZL6&H3pZx<*UntovoCh-S(S1cng~#+P+m=hoPs!H9CS?IJP=l310GY+$>QRMM zYF7A?J9QW)FNYKP)6YH|YyMdGi@=h=GZf2&1IU3mQ{jwUp+9xc-Fb!;F~+Z%(GT3u zK+@@+dFI)C3s24;U*b_vz*d_k*}3b~-JuUovuB$iA5~C5kn_rUa8=$6tcwyn3OAEx zjw}8Gr6Sg-JS1{)Ne^~N*y6fP+(8ILXbJvc2wV>h@j_!O9|S^|wPFUlB^fMaE~vI? z?fmgMwyt}%MPCzmY6AeRN&811Xt(K%tr5}>oQBspcbVmlZ}oyBF<^nRG|Urcif9!K z36}#MgLWuSX&{0@r5NYrV`9j3(;W%u^C-=-x&j$qpu z1cIU`T2D%!`1aG?EhmqMvyL4f{Z81yNw9O%O*eJ7>5IA-6>xYqgMVfS{9-UEVccF@ zyc8tomn?k}dI;mLeZDaC*NOM1|tF z29#$I$TtUL+8?%5QS?QALV;@I9eLC$dD9WUrf%?8c72_cz0R)8znwCHld-`HAkB3fvJq5?|N(pcrio>Lpd2sV+N$*$YP{N#+E!qTDx z_Sjlq;3H=Gh{yp-QyBngU%ELr_L=C2ich*}Z@6 z0<)}v6g)ZX;0UPT+NpoiV92g!pLCalgo&`!>*~uxKIkN{!CMe1mox}T&9a-Ku-YFA zbKxnaH_n~w&cyovSUAL_TXGh}7rg#|@WBU+j_G_mWNo*{32|D>j9st)4S$4(t&m;EW)skA5d1 z2R`FL&K7*4ZreUdxzcvKH|IDvkMS-)`yA7M?)jJXKee1N0`sEWaQz?7P!w5j zJJ!M3iJslZ`k%M>PH~+<)AOnyIIr+C^~ZqiBqiOKL*P0?1`2Sxl_wlu=Hfyi!2=r0 zo^WsQIv_sy8B>N*_o%;ip(i=xn2<_I0Zpnk9Uz;+W^f=QTjOQJW{GQunYsW#Cvui2 zuPMvf$qa#na-Su5EoIp@x5OA{8x?QJR;qsUrmZ2qN^M_{v5vOPVa57i&YwS6p(C2) z{1U?1hwJ~mFgMVr0`;QBoG7#He*It1{ycGb&pWjKmqzN9({UefIy#pF=m)M35Pb8T zUxGjonZ2RABrR>}1q(>;C$ zcq-F2;DC7T3weUO_Vsv6YCzkwjg!X3<|JIpZ&xhfhRs{h(19Dl*3Pa6<#f zMuOYd6tbMOR=&kszj5Q-ddGOmlal%0ICs9>|KIES|G`u%Mb>3I?a9luc>GsEW;gf$ zW9?4>(53MAzvo@W4(*-sCNAu$69@@;X3blGwjb{X=t;V)2YYIvTr%j6I|3@w)=Us6 z$DM)Tl2#$n9(3gqdc+5mxU2{JcqmCa!&W)ifL)pW=T}J0{wuJReQ9ulb#~Hj|!|gj?!l*_Lk%x6-LKF^0!^%MWb2@f_FFr=N?n@?O{f_ua$# zKXs1vPQpL+^ltC}%h}{jEHk+O&-&kvJV~!@$Miq?MExQpc+(P2=Wc1{A?M6)0hh!1 z3mP1<9wYFxf!}Wmof6(E->=@cTF!p)R@=EI`m-}?$GU^teB5EK=$L1WZ_5m(e#8|* zwQA1HjkkVN$7SOu<&${9?RWjp^Z)H>Z<2oM0iHnftv#&&eWCHLyYAGx26_rk0U`9D zuq4`~#YI^NaHLpXsX$=BKJ9H<@QSDANrOIi>ME1`=r+#qSO)y%r`F2lYrB#frY-<% z)zsjDdrDcMVnk?5!hX_9=HvU^H!5-W8B#{&T0LBwqBT%*G%F? zjwvqdXSR1ecwZpKQ&?mt$)DD3Mt}8Z$LIfJx}7tC`|rIsrs-p?V>`BKypN(CsOhBT ztS!b24ANYJ1HAAMDZmjxEW^76Nw?gPj=dUaQXU=Cnx^g=09}<^cG?(rN1D%Na{Af$ zngb<1fCl#9OpeVwEk5<7gz;m2ludJPo|ZNV$GW^aW)9pqpq3dJ?=OzY^!$Fk|KFbd z$L!R@!2w6Wjz9Xr$1=9^jj*C!%5HS`-pl=eueYn#UUwY1xv2%Z#oz15w!wM1RTq6F znl+KLvG=;(K?AKx3x`nWEz)osAt1c9xtqomb?xu3cKKr_3uosXLyd<>wTb2l=n zZL-cGmLa&C)N-}(Ze-!H41<#^^L+r&?YZ65fivB`TK~5W0z6K(1D+3!#;@_}E&%dz zwj2vIWn`(}JMO-#4@#?@Jf^i*`9oGa0*4cAK`_ZD4W);AD;U8N z!6aHM1(0`;vHWiHErUc!IOl>1Tw z4LOGKh#a`D|M6qp?|<$8i~IMUe!|zvZjuubUT($V_^-V3YJ886pUqAk+sUWn@|f_y z{(t|iJ_fqd@w@h``VIh(2ICp_AC8a5ae202Nk7MZ`t<4Uq&_sdDA|1KZd|irnbzfb zfnWd9Z^jpg`Rv$=E(o&x(0?Q{&Ys}-IO#_|{C(Z~Klr`ErsH}RKzn!#TB#+tzP<%E zAND;X5UH0polu#fAT?3~%G-%ZOm~{90N^R#xXZxP;Z6*R?NUn(xFC$*Dz{GP<^h-G z#2DY_0?uju{`iwmGLm*~5{6GhRhL4OMRgOGoysgf9*e4KCN91168;Z-T#g1+X z;_P-?K%Nu0#FvRxm-oKs!3a7$%A4+(^?)C}Y~TUv?L5IkSb{eMbtpZ*VBoc#w408Isa=s{Fpy%9DyPiG;72n-A#f@i?(qz4WP3jJB){>Q3)k~j zerTl1Be;y@)ZEa-#k2c2$g$$%opR)Sz{Xlq*QUM5;b5|#XXkt^*Y5yCg*ORNDb+xA zK^D8mgd%7hl~Z!NZqqup*g-FLIP%yW%K!|4o6dZKmkl93veou}Z8*%I* zleAD}g{gL5dyeIxrUM%QE~mjf6JU@Jl8PhDfa&N(I{*Mc07*naR6H)UyoSelD`Ofs zU~j?G5F0Q^d{Be0>Yn86ssO-6wse~yPu}5RqJ*Q!DVe6n=f4VmvQT1ami$(LTt|gP zIsUrds)@hxfG_$Y&ciMI?3Z7W+M#|&UmM}s`elbHHrsj-7&voyf@LC5SOj;%PW zWZ~y{?Ywc^a%h5Cwu5<-$vAQ~Pcs|9*=1ik^Lqm+FSbabS9IhKLz>C}&~}_V(m6C> zmz}rxq_-5Pn^Qae-Im*{4zrvN-{-~f(39|w6hV@~s1yy4`h zB`PO0(_1)slV&`5-&K+#P;7Nq0QqT12Q~o2KrVxMFAbfYUH93!Z8=;eRH7aV4hY1+ z3%i0711*rH4Az6jJkE_D6`(9nK=v+ zr{Fe?>4i3uY9#{h=|z4!I}sdYHaTd?2adt*~=9=AW7Ql1;B$f-> z3&&^0^a=jJGqY*+A&qnASA{a5V1tIaZ445|TIRq(wdfVkx72=x?e4}7JnixKjh#&s zMF)ZYmw$zgseEaf)((A}&-wd|o{o)+Xo%p|1G2 zY&Y63vpac!ryo!G+gjLT!W?day6!~<>;-ZHa%`xbE94cjrD6v>vJ zni4bQuY8vA zj$xiu_S^Ffr4D1MZJ)NixE4UlY_lULwe)8xqi^}#;3$}P?mGf81TitAubOv`@7onb$~HGxu69tgh=`IG3-)+c}TM1o($X%@fTk1Mtv> z@gPAMq?Cam<-<(uD7SU0lgT*kON$zaF;b)0@4#{8o7Zr85Qm3y{5<|7egqk~I2bnkZa#VZA`nAf_;I>gc5IhA z;QSmv?Z6|vB-*{Loy*RHNn8$pnGfaMcg|A=o|FUcZ7Z7b)0j_H0HA}$9laH9J3KVf zP}i`O9Ah41cb}t`S8{*+NB^U^56+{uq_IQWI`_!g`2PPlzwr(6@nKF=Lv*;4b437< zS8ya)8YeAp?1MXl8g zb5-tZU;BDEG{?%Tu3H5G1};vB^DpZx`@s)>pnLHC`{Yf#7}C=HNBgw%eX?`^{rC1} zY;BlliGAI8BQZZBl6_zawQ+!@6;+_U@>+oUNwg%FX}k*2o??fKfB^?M6j938gH@yr zWiy>W1cMKI@MQ|^F6=F@O70NCTfN5^g>bEW!VlAaa^?5!O>+f*&j&@sO1 zARFs!<(UCI@$@r#dryv!BUiDOEzq3(dC6x*8&m9e=+j*53I@ALIL3bM+@hNau zt<5WJs0IM80OTR1lU9yw&2gFIa9d^0NJuW1^H_`X7n;xX@OZN>Xsw-;pU!=r6sP3a z+90sk0~-v2969@Fm7N7Aad^PjNjbx>4ndcCj0FDl@h9WVo@d3atBP)ZR+|~X9k<`! z9nniit-fvHecHMG_O};198vj`E`rf;(@_c+*C$FI^yb*x_R1MS9;@;0bC;n4yKETQ z9!?cK&se6ABSVI&12g_?hwj*?CWI##L*b*LF>FIrD5?Xr_;0^S5|#<`1|O#yl-wTPMq6-Eh7mg2eQu z1G@ysj&oP++yUksM>I$N?A6-2(a{o0IhD$2pqyLc3{wO11l;pwDea^-Fr=^%xpf9Q z@JUa+;iPWfw_1Upe)c)lCG}I;mOhrofny1vi)&nKK(M_vHs){3d}e$cT2K zT<1|66y!LLR~VB<>K8S7%e{>eB0 zEZ@u5sHYs;s97~``>8cw+u`c^DZb0U%NYPV|M(mGvvaTP;5cn+kE4a*8J8^weoSj| zrfrpP)W0TAX)!s{ikODJOdcpjf-iD06g%+xBecu@7_JF|DV~X zo%?sN)3#CTa&|Q51{x0@#qbjMOF69v7ojLByF9pSNOnQ1E4{- zIk|0W@9g00vW)Nr6DYw#0w&g-p8T9elQzVIjR+|^d2)|+WL2!!73*b-T<9+fsx7z^ zSxAiyYcfaXPe1FQ<&p(00m^ejmAQdp{jXCoO8_1=n$wem{nfdKZwThO`>D&cMJm3{5qf}`vzU349R3(mcmadl;(5Qa=sb_NfFK3RxB^(2^O*jC~AJhM`{*Ukf zGx~Q-(svnlPU-2t-Ck#KRmSxnm(5r6|6c!ZH6-!%m;uE4|A9Db?)Ff*&agi__wUKhpg!e5CLIqrHa#y-t6ps{l8NuwZ~@% z-Q>BAlAfpFC|d{lgb7nmZ`AZ)E88Qd2$%(c>!dST|3A-*MoanmoG0b@5|1+WoM_0e|Dx#_1y=e>Po1Vcc-ik3`ijF;9y;DVV8HO`TF9T z>HskOwhT_O&$MsBecGEK_N>K0IuG_+{i(@3TN%Wr2K;+4} z9shv+IxZa82Z0#8+jrUIR*!+76S^{`OFh;Wo!X2FPxC^X@GeI#W*!#_8ERv>f=iuA zx820mnp^gFe)r#XzxIFqX8i7-fBC0s-h3?R^Dp=w)9(fH!=d~#FTbzHr@$fzY!=JI zU@rv(i~s$f{aW|t@=E;bF2BypPk^^m^($rPpZv3jx3v>X5(TFfy_3M3iGSs@AMgI+ zU-*$eYC?BI(`E$IY&*9g2c_O9FBtK%0qy6Y8(ajx0FnYPdi#FsgCk7Hlf-L$mQric z69#y(!K#Z?i0*RN+utSs)nq%c0pM~QAqLch&f@8@g+{ptP=g9E@a%GwB#uE4|9IkVEndz?_|99Y5l2i<~*^ zoQr~Se*Zdei9{`X4~HDz3Y3o>6&9Hz`dMy12HKweEpRpL5CC{1ad|~SO!Zk(fV$jd z4dm{(7H;)}_txSA-b$!pqz`)|4gPuurzQZj9l^yvU&Lwg9wgvexaFAyPvSL>oUxH< zSTdHJ2X{P`KXybv0nS>!k!*Q^8E`=-ClIj7X~?U+u~e3!Gs6&f@blTQ^$lI_DO25& z1@qOi!;FmSKlLXV>=gVaAKBiqJGGTHW~;ha6FW&3+>px}uFw3y27qY%NjB1kOUX09loRZbZar`YrMFYcW+=J!VwC~US^r3x%EwQD@8T?2YES}#6sOYu zI7TJ|?_d7ai8cZu4xdY+F?TJ$)pnSD%+K-3?+tyNR2Ab*MrxaeYefXrFd7vPS~{I1 zf}f))HI}}FbFCl8DQ0xD6oQs({ItbY0haX8<3AM(PAwQKCc-WSJ|4P;To|`Nl6SKY zeY;`220RBg0K8RgF{%5)LDWmo+HF_|DA|=28gh(FLq31UUuR``=5Ce%V|}|Vd%)#@ zl~f>%-L00L`K)m_cGl%!I6u>WHe_j^w>E8WC4xXx3m?x`b=rx(mE1wbPu*?6abtUs zIfvfDWBy5H0>oBnOd6NBlAGc8-vYBX-hbPTC8sk0lo3(~N`>42U^Zh-&3sIEd7SU8 zX{dKr+FJ{_z4s;s_x>gKZtMD#n7RPqF6VaNq-45jloPjkZyxeVa%1|Kr=`!}y|+Lt z&9)W0ycUn^1>5SMe&W;w0EWV(;m}UsC(*a>;+=*_Y8>mO99s~^)a@ z$_4b!25pqCmYvot^%?vGIF+1`CSxZsPC#9bY^&}{>1lNyRCuZaz_^j!k!^0cBQg#f;tl z|BpWw_y75xAF`GYc0}}tt^C^WT=$hPf2Gq~13WV`;Dx_UI698c=f7{f;l}Qv_dgUL z1obkbbsFju8}?<42b8}2*ZELUp2ujpb0qRuz8nPL4hC>Mm z8QOyXkhiA?9vnxIvm*ityhz1y0rR9!2v)v8loyG3K!_AC3-!E#(JuAH5D*(0*!hJa z3V{Q^+Z4)n%Y1eD4sHOrjCP2#iyGZSDZ4wzgkjV}r@O&<%OO)bepCnZq-@HVAKGAG zFleI=$$j6cd-N0F_XdyooWo(*`HL@pCw|d)ZjQ%i^-zD&2k#&W&++oX`dsY*Y$r2co0~TRUrPwNiZEZz4JFU8ROPmV_9L^MzJpAgssON6$F+FiwoKmSRoG~oMxOzYzhh6xF@&;G08y`%te zN+0Iff_;+)X21Kk^A6c5hPJYo_~Ps%Udxbs+f>03V$9d-fYs%ZSdX`S%~PV4+X~)J z|JdI3R6ei)AkK`{ANSa%d0x#mw&0>CbtWwpiqOy~#M)fM47`vFi~|DtM;MG(@Ck8Ip^*PY$5qepY5gWP~~LP3hZ zaT#`E2GHB7=W{y|_H#v@#{fQYS(lzBLWVlQt*mKpypaZltVq-Sx(N~@3RKG=f9eqw8hk=?0PzR za{_1l7>0X*Q^DmrK*40HP~~fBE#3HWZvDnn=KFsPJTB1X;9>NF86`Qsr~h04eDJ>e z1`K1}1ELD?^WVz%V`qG9<1)4;;lNKyuIqL(+tJYJ8A-s65%*o%7-|`oQph;xjjE{w zr!D}v(}ta%{l;~H-6V8a5B%tIGSue+4EH>NORQ;|beLeFCV%Sb)A7b!|Nj33--jI) z5dZ{m>+k;i^j-ee3yMzoCYgKk>1VHyovOV;#rP!=fdJCK%NNX zI>3Y=5Ytr|;R!9$i1dtgvDuI)YJOdpnAsI=HbK}lyI~?A&vt4F>*~+y% z0c&SEoE1*%l{!hkxeHeZ^{FZsA^GK-4cuKzdN;W>kP z%;;?Gv~WuUznPYLOtV(=g`H9`4?0Per!57k-?cm`Zwoz3516+{2xxIF-11!S@Kgo> zcUBCb(vils9p+%*vjMcB%;o`8F)bvyVt~xHz?sXqw9)YN++DYP=~DNtCw8~~M|aEs z^g|!-e&++_Ox9Y#QrZFAQZCBQpFXj>_5auo$J6R+;V`(vZm;~PYh{4jwl+QRP2J1` zoz&_`OvSZFWc@8}D|zd=p7W^=0PdI=wCY(8g6QN@GOq3978iISQYJNy;c91SV-nst z=V2>$TK~t-a_7%~#T$XUS^snY|Ni?zU8*U{Y@o@Zu;tHx@6XQG+Uv2~q%ufi*H(7`T%W2RsI_9sbmdbS0Nh0$Htk@FL7@?2oCgeL z4-VvmujI9CDF$%zB(3Tj^Cn-)S-Q1pdGcoz0QkLt_@;lnsRwp)8m|BK`+vm?u#vT~ zwaxOZ|1Z}LT3ZV(+*)k$ExZ+v@zF*_fUK46XKoGN^f7PXOMg$|Y5CnRu0w0bxM|A| z?xVn4-~HNEALJwV`S2ze(%kt8waNvTVtwi^O@vHO0|##+;u$@G@Z?9XQzrJDx%=V} zHo;nYHUW=w|G#`TJD$!P=t)lOZCaP>)mm`XW~;S7ygqW4nlC#|0yH65TI0SK!F|%C@#DS_V0J(>%vKG zc?;XFv%#V6TI%XBPUQ^1{py_i%b$Plh5Y$14bFT#x84w_Du^{DcS=5*h2q_r+srqSS?K_G?f8>u3}9`Vp>m{ z)XDvT5Hab-P_6^R1HV$uAF6xa@su$wCvRH^!)YbyPwVwxp8oUw|9Ajs!l`3$|DW~$ z1NZd-D{E8jx!mS?`)_}CqLGR+9~;FMcFDNbL0u1Mb*ruFHXrK@T}5HZqRl7qS%+mR zzik@hnkp}2WvnmD(%8_!O;ei60N^h6(5mIyb?(%OG_e_9fs{3#ywz_!Tsi1X4NRy> z9_))6I__D}|Qy;l9cwJ@~Yvl}&RV`a(})*tfK{Y<$%+)QPT^pYk-NsSE&gQ0-WE zpfTCOlX=Xmys-Pipa((ZBD(D5h4mG&fqm1Qd$6UBlz5_9|NH4b0z;eN9IyXR-CN)P zx9zb^+DYu=PuA-Ud$Dt0vD4aUVcRs$?bq6dr>7UVmfb2tp2;#PW!;e%g99AGN|4Y# zq>amI7ao#%voyW?1A7s$UIf}-kaK z|HzN)X_3|%xaH+b-81{L^PrAP+VVft<36EZm8!MO)}owkkrenUPl)F(uhb@WFy#pi zA(U=PUnCTQmW%e0c04@f#ZwGLCR`&ms)TE$++eAtbzqC5OmjtXRA8?=3>?gKfCIqg zH5lvhh3Nhq1e~e;VvW0!vpZeGReW&9V>w{$=zMg+mzv66gdCJv4yyP)j*&;kxj@0# zgFkh7|Fmw)u_WQCzId{4U6QRJ!X)8v{$+h#cUd0*xnKAHW3UE00%*i)ro4i29{igufkA9$;5(ou}ZbNsw~F~ul1XsyuAjKJi*x411-kaT#_o(vf-*3 zxoJ&P8vw=~Mh7!MSn~v|UMC;`M-qUuQ?6S%%Qa3#AZeZ4yf|13qmwfG4Jk&Zr2{(@ zeEZ2~;)}j~HhkgIY8OAHt@ZghF;IEzcX@TSyRf{X$A5YKHwSQVhmEw_1_Jbe{g$Tx zd^lvUb{?=DS4hgziV>L`XV)20>+!b^2e!&py~&d__V9Q^ui=4gDO6law!A@`z~{P} z*X6WT1X|>jz*8Flvg^~u+D^^0IheUVAY>Rt!S4GXdY=MPnWZRNm}8uWe(ksxaIfymw-+-#BSv@H!BT2q{{tWT zVE3W#eQ$gYJl6kEZ2+N?s3E6Cg58D!26i~!NZ=Cc_ifqmq#WFKc-I-lhRq*16;el1 zgQgvI3s`&lDS41EEV__zL4(K1Fq8^gE_3rvV?MP3z@0T142*&@;=z-WPUokq7;hR3 zb*i7Pn=&CTGJn;JS{m9-vuWs+J2~#S^X)M+33nCI^l_dRYd!7!iO*w^!IUq;)PThP zt~>7V;RkN3-DbU#&i_p!sXfuHEik4z53Yfp0j2U69;oQde5lVf+o9~#(*$hBC$0vK z5f2@ulsc?&dh@9c07UfmIsne-j*VP9oEzuYm-nOBeMa|GKhE?cIZh{BL_`N?U1YE| zpO`q?_{<6qiDB%sv2`Y;d@?+!;*kKdc7Aw(UB+taG^Wz5FX-qoq5%9}P!Tp|`#cS8 zDN@Lx!?iMQQjTwdPg+X2Oq)1CF}}wMk+_D|<3yuRif-q2@|ejKS}^r|l4*6cc)?io ztRRY0xSQ$#kVB$(gMNUxAED#?z86Yo!wnv1B?r>3cXH^-lT%OqZcoq0z%vavlXZz- zNH6Wt+_-448q)@WR-a**OZe&SB`(zTyS@$uK)z3dg0MaF0PNXYpkXayc{Ju}>EI~0 zjs_-hrWGyl+F60&YWWgZ^c5L9xoPxa*w-#)qojULU9CeWudSFLO_^GGW_y`q@z7BI8)S)PqyT#gAF<q0@MuS#ThUW+*3;7flw3BP81GH5<;n+S zeA-G(m2r8Tr_I8rLO7-Kq7$C2lI2ZL-pzGr>8(smU1d~TO%uLJa0?E_Da8sDEAF(# zt+>0py97#0OIx65aV_pnkpyUQE$;5_4qx7XU(U%%aepU$S_`hJ5mXABm<9Fgb~o%Kf(OOl7zciA#48_Q z>I52;|GWEO2vxLcIy4BxzH$e{c&!Y8tMgChX>+A9&mHXOX4^tHALVB&q3!K&+%tkq z_I}(N!FMtr$4E730l^-AD`w^{qd|n7$kIkARY5e5Cyw93Gbu?qsQ%W)K*H;DdhA8a z8DkSVhiB4?H9y@dbp*>&3Vvy2a8<4i-4AiZYgX`n=k^jn}#Q*IM%X6o-bHEg{t+}mi^9c*oHr+6^>v-1h&P;_SEIj!#o{Jr}ELcuRW znk%SG({Y#!D#8A`F)ITzHVVuYo@+HGBULlo@c#MzbU@i;14<&p~7z?BfV}Um(hu6=du#@GiDoO6fn8qY-}-5vuB}zj4YvU z?{S#T;r;E&@5pKBX2P%SF#RXUDZC(D7gg?%YyVG1(t{Q7s}TaG%OEt_|ZC4jC8f1|A8-8-zWJHMlC){U;civ5>AbRgd*KW z<^$Pl<}RxjIXrZn6+b!13N|8$e>R>*zl*}EdPn2I zseD=&u18XyG99A@e`oO-sc2%hO5)d+V_xjs1tI%muZIlbxKEynL^yC1_B}n274gS% zl=inXcalmshiWK*@C+p+Cnzl1y)^+nbC_T26FqvORA=ksV>UgSn%lHsz&5*dBP>ut5T1eY&VIb1j-I4`2)2`%lulQIx69i zNlF?KyFP8v3n#bu9QJo&#(?Y5G6rk=4^es5v=g;RqmA|gqw!8Fay%(vVh}9&+!V;q zEqU{mDTj8mJ+mPdb)BIWr`%KUe6}}~S1zv=kt+2Xk&)A3g$^1gfex=M(g6t+XJ1$X z(9sxboL^aqcUk#`YY}{_;`o-xUg8aYSth)tJw)5G?@v8buO&N?FuVRlZ=kew;&@L;6-2 z_}-?TTIfm6^kA}jLcD-_gX6wxnyQLpYlF=f5>$4(N8mDyvY z9DD*XjFl_ElH3mvia5lU9~pH>Pepg|ipoGoefMfN&uG00YCdWg7{_eE^LH_Jnzf!{ zS37G0=NBUJ#YnfhpU_aLq7@te%8^|ijoW}2$H}DGgEQIda6F86Nq)V`1uk;Sr4l#e zI)4+rm~1MO#EX9$=({T&J*o`?+q$0!ZG6>@&#~2}7Q?p`DkC>flKHz5u$F}i>fLcF z{j!6k@SR*yGs0pw{DZ!f+qh#oN)X9W51>?U+T|AR)D%*S{95MqFpX8~37xr6kxul8 zDmB~c+Bk`P1+L9wCY>HizV72?Z@7O$!?LZirIJD|`YW6$h%E@k&eDQS$ue8##!LaZ zB))D+`)!%+ALq>I&h{nK5qQ#dUslIbN*N)pYOk$_pB60wF3)E-Z|f=ar~22%N{tOD;N4U($nDSeG%Whw*jUfP%jK- z%S*jWj&mHe;0fWKvZ(l?-#O8p9V@fceSjp{R!m=w3r;b)zOT&?SSe!a!w1Qgy5H!G zyx^g0rGTQkO10{>(AZs!j`eNFyF!p0w*&W@2@D;Oj)zPn*?9r2CGBkhF-ILHmA z?2#`t%s)5e7DsAxlruaO&F=4B!)voB>~m_RilF?B0#m&M$KSTS3~lHCK|i5yeZzGC zwE}wD)zbh+`^~;LqvAIYON3v|yCgTBvzWP^baWMV*Ix|Q72`9o{x@4D zac_m)cV#E>sDDSQ$R|%Pd{6$)RGl;nZy#jEg1Qr+NGai&*oS3^#+^>KGP5{ z-5EgxgwvviLu1R^lg*^$Ud=xn&cY-cgFWL!%_2Y%ot{Lw%b^=ny_WBd;8n!~f8@A! z-AfB~9i-cOv2AMui647;Q5p&arYZ~u5L^Az4n>@=_dSqr@%VKdh`YrN-P&Szf1gwk zPb1$U&9r&UJ{wE4dpCAlnaYt-E$=~VTA=a}@p_+LRk}U_bDe&kdKZuk;k}kCT}XBg zP@CD&i`bH!X(5&iMq?v@_?>UeP^XKagGxWs=CaD0*1J z%lw!g&B`2{u8C}uY9pHPp0B6jY(scSEi;!K&LUf~U7l9~mWD8Kw!2z{v6i#V?8iIoDTvr{?7tb53c)7Qyhf zR}_!9$8Q#zhWF|fiLHhDa=4s+mNeALmkNiaz;H6ol%$bZ=p4E8!xZ+X3lURd2U{N( zPk%*y^W<_g5V9{^E)uf%=x@?v?LoxY_nfib@%>k;ek=}=`c=f_pD$>+N?crMa$uC7 zw9HSE@gb(cKTWJ-+UX?04lQ&R-QMOR)zmYSt7`c#6p8E9R@*oi_8$&7mxhZB9%u{} z)Unn6MBS3!9IAWSi(Cb&rVDFb@ju7f&c=BSP)I$8T{RK{xJ#7V+TaoPOgz9Ey=@GQ zQIgs%nTrA=+xlPUbrjFGHcC8o=(e4FSKhA|oT&faxFqFhx6rxxY_~<{itSAOy%Q_L zr4LIMSq12~5H%>_G-RM>r_wbP*N`U&f;GB&m6uMnF?xd?4h;-L!`hYqpjQkKvP#m0 znYMVm1eOE;kTzz0iF_`M+AJFkyLDCoU=ai&@o&C7Yv2OB@%7OgDTo1T3i6Ln3&fxx zMC2EGz}U@5fj+-%17{jDov;EPWw!u}Ja`fP!7EBFSSLbR8}K8LW*#whX?PQfnUckh#Hs4&+`*Y%&VGHv5AI#?3Oa zO<>*hu*#+!;{NlySCw62RU1n0GJtMWP|eCNTJ<<2R2zAB{h=-HamcqogWq>u z)ao`@1fB6j-Wq;YE$zR|YM*Nn>J=}yT$WS>W(m75e=SWU7NyhL`mQSU_g!TNZrlc+ zr|ZH?7+>uJgxPIH3hPG#2K{p{+P9p4x^G0~m8snoq7^!R>8eusqx(FMAGMJjy~e2) zzSaZ_!?FVYi9%mTZiySBy88Nm)(ph=wqH%L*m`Nm*4L>{y5MEP+&h)Nt%1X465(&5 z-{@iMSI;Hwb0{Cd|48*y?WH;9{qLP2^n;6Fn3_!5^FKVxLF^50Xze{2m%TiR!8h5e zZz7QNpWDYB75MlljC70$R7CZ2SYwl3`5)jKnBGtTJa~aNh&@Vtlf>V*aS|+{bbs2& zB#Q)z-h)R_XIZKXQAU}R&ph$I$ij#L2=Y71EBx$F$V^CulVdVvjcD+0Hpk0%0lAq~YSCI5em-+V92|GwJ+7(Gb zTG9iO{=9?c8+b+jFAjJG=nB}Pp#pPdC>=p+q%azgrz?{J(Ed#U5nAk?gHT-8D!&1-iDV7bcQR01# zuByk4?)mJOfwlt@+e;!?Nk_^x{V;a>aV3+3)3iyCGrRQb;flmVC*644+hy}|bz;xq z!f#XJ@wovTWVZrSc=V%LAhqF^ebjH z0jDbUy4eJIHb)w_Y*2=VtZL+8Sb_p7YiQa81#ZEcXXD6wq6MhoJt_#q!VtN|mpJs& zreR_Dnd^n{z;r_vrG6(Ph(~jyp?sxjqeiuGqi|E|w0l(7=00kF@##W{3&O=R_aTYM zW$~^hE$wdg)IX9M71nW4y5wp`xhaeezxndK-hm?cF`14Fyp_P30SV*dryW`FGm@0Fp(q``z%==B@7gxj! zSh}Tr^8=Snt%^E7@c=axUgy&lnjJ`wR1B)aKP{iDcvD6Pn0dSK7#M}3F_*X!qw(}q z^A%zHxk%B%1w!YmxwR_w|}0?8C2M!@vh z)7pPB)6uK4e^nEXgkAsKL~O}e3E_XvvP=ir^5-V*pluKk%f$}a;kJJzH4^P+Hy*6^ zSF;|;ju-U!b_0mh=S9?veU=54a;vIg^skv(k&hB(v2~p7Z8Nm=U5YAtW>d3Xryn>7 zJL;kWK5Ae*@=)QWq2H)nUZ>w6@bdGS8lDF$65`i6tA=MkQbljywXfkI2wYTtZoPuR ze%LPD*{YazUAo5!LtI5qf4>1RV=%|Lx!0q8 z(mk?pt_Zpo+}6L=bsLU={xPCv;jDkTNt4JZ7rfwHj2oUy|0AXPEZp|ATaeR0;6!}$ zd*VAaLZp;_M`xAUBtVNa%MI?qyxG_8D1)k)ni&u9kxqiA$pEj1GK zo85aei~b4SX=%Y{cK-Yu_5DnZ_wKe^MZ|BPqvpZO`KGBuzhz?(6U&PV*ByZ50h<7} zx%;=@`@Al<{PX8`?@1IHn~&O6nMSY`HmCPo=GY>FEh0<=_mgG2We!4zC2X&XU(HhM zaErc2zmAA~?yB(W;J&x!a+MeTApTn22PcX$M*S|Xi%P6rb5+D3aM8fv*u;dm+WzzT&z9d)oRXv>cD$%OWcXE&WhoaCWx-3EHObQVjwDcIGt?BuolGO zVid3!PV&MG`de1eq3+P2xr!YvDugIif|JZC)tkf_%XG$+fa9K$@*^h z)0Ao2teK&$jtznC@Sx2Sc+L3)Jzc~ysb|}B&PPSnM`>})!4i^&hx&!Kfy;%bGq3*M z8^NrbhaO#5wO46kE)q%7ja#92u|Ie_UVY~F!F^cWs~NOk$hbBM$?f@M@EZ4G<`ngA zHsr1XFMqm%8GiRhBWC4Zgd?-JibOW8Oze;(LC58`Z7%YbLsSL0f+7mR<)B zWp`p6rzzF%$rnhajYWfRQlGX1BW#*!e=qr4+Na<2dbB-{o$zWMtv(QGn5lR=l+{)< zslO-`^A|rhT{%v@yf2YGKx96B5lusaW>rZS12432Lz@}7&Yfn=Jqm_q2j-Zawpvdi zwwRSK=y3L@?XmT#Z9yq7mXFtTVqhc*A%+Y+StwswA*3IU2SPq_sTM@F+xNbD-2B`s zEbK^x9_D&?kLcymPF!>Dm&^<}HHbY0B|Mx9v{~ey)?Q&qTBWx-j&f>Z_hOI%7%aab z4FrN03JYydQ%jZfdIAp+7A98ei3{4c%byqaZ>{+tw_`3Dl?}B+aHGTs5wUk~3j3w> zC;B>?7%B|B9OH;TcTJ24sWQ8~?yUOMb`=6Qt1F4Cx3C=X=iA*xwVpk2A{=&Y#M8F- zUe)3BHMo=rMD$g^_3l@4>MqZdsT} z%eSQr${QN4B;RjH&9OfwAn&&O?KYZ;xq&uIq|d8?-Rse z)-|Duob{FP7u=6<`DgeZ#w^^-+N(?`Z~qV!KKC19#De~J-LkWjd|*C0P8@w+;y&XORcuMbTSz%|fP;83#Sxg3Co z?3z;Suo*}(aOXc*D}U#AS+d?zNw2~#P%-cbRzaTYc}_4fy%&M8-)$BjQ-R~RggAFK z^^JB=v)vN4cE!a0c}ayql{Ri0iE>5M({9Yc{1x|HwZ>Q;N2=pVAcJUhlh6f+uHJd{ zs)b3DPr|RBPs9kAZ&yVQNy=ijR0{pqEZYw-BQH}gO{;|SJ)y<(6OmG_in)(Tc+Cl+ zArV}x8#>ntUB&VeqV5nX{uc1^Gv1KDRQr@mIVUL-p<&AK)8E*vo3_y?1t+PUIn6Zo z7%$+Z+5}8A!9C6y(+U zxuv>qyA*`VH4_dl5)Um-kGU1In?@oBY4^nBG-G5H#p9K+pg7L{Oi90SEsEWS9AcaR z?)*BX{&>tbf?IFL6IO5upL6<`r11LN+9xR79#>Clz5nuZw#fz>Ii;t^ikkYSNa4ih z7jcnAZn!3BTb{Riit%`(%)5*62N(v$xD-*qom8JGN~8R&+wT;F95qYq0&(iO(h`OkB2Okd5QJN2jg zOs4_knlt07`o>m=Hv_G0hF_$&N%a?1EG+|8dNU2)Aj#ZqZh>nFw&N|vb?lcSDF>2U z-|jK@8BA?nh!*y&FP$adImsx5iJ$sFou?kEI%N%|K+nOoRcRiws=DtFEO`k_*y7## zAy;#nB`XJ(G0DT(O#hGB}D*fB$#|TGQr+NHSZb& zh;8(%S%B{$_uiqEKL*C$vFtF>uBAXs1TZ``fjm%_U70194=us99VAHfcw2{q)285q z$wil>2wDDC;EP{D9LaAx=j!#0?sbXj-Zbm;lz8yxT=#AC@5++vv39oSuUfD3e(?y7 zpIWXjn@p^6l424Z$>~ZN|GT|t;B?Y0;eiVKvY6{{&CFb;nkzgg-N4nF+*)dsJhzb~ z6x3dCKOTK{e>uU*_W5($D_i@IRc|Q!a_kC8FR0a ztzB*U<)Gp3mRiTY01`n}kRcx{NO*UsMD>lnwv(~c z58GLW;6cp&RPQ5oVNIT~33Qo9ck8cO8){UE&&^b#)tlX|6jJh>^+L%$isb#E4tY1c zsr;Cx_PJ`5MO+(n?DZ$ZwX4|d&c^`C4>>0Kn3G2N5~-AE$`!ZlktQ96pKasL9aICCWc&k4Lo5-piQ7dwq_l(NPOij+(a$kYd++%L zn;N$${Gq~Y@s5}*1L=B0kZrR>%D!)XfPdHOPZEq=L!O_bx7}jad@COdGOF4aM1mgo z33@|Y%Hzjn%1muK@rrU;eF>CeCsEV{`P!zGkr94_Tv8%3U5Upm$9MAAhoa&ZREmwaK49mggzs zX``ryQ`FlLO2EOjgxG;1?3>zv3+Vd#&jEj<*Stcn0)UXXDKRlnwsvN2Ja0mPH!+_7 z`=QZi=6U*FgBua)0DR}6d;4)jvon?@8hTS#TxAz`frmGH(-7VJGRAy_;<_f}DKF^I zA^LZRn>n=_N%*wH(sXV>d@LK2D(=Niph*u%6h%ep2gYK39zGHy0GBcQEynRrwp#^? zbM6>*9rFsA6XevX3dee5dCvc7fj{81lpR*Ra9V664%;&sO=u@+K8>dIrdPXn}q_1ADs`*gUeGAEhkfOtFv%bR% z@!emyu?a93s~8_Px1BPUIP~uA_i7|+EtDRZ2zzu5!M*0Y)=|D*__4K$lf;G3IPe-X zd*K&`?cEgF!3%K1)oPMVQH9Re>kY8ZjM40BB}OEp-_>NfcSzgO4HHMEg!O`0e)W#` zmw|62DP{x1hr^o!-THqbqy4a+UHcwzPmjq5uXk*&=Re3yzVosWr_wBafVkoNL93&K zdBVQHELMlGC4J#!p474ez0+PGptiOPdd#i-9xK6r?3UTNhV69HBw@{29nPwUU-NRW zg)018B=?`&4reid6h=60j^7aF`Jds;a~xIx%Q)ofMJ5E^V2Y$6`qH}*dAQA5nxtk$(@ z;Dfpm7Y{m^VQ}$gP2m!x4cLsiq(BJVP-!v`wTL@)6c?uD5Q9i@#+VXc*({14stg(* zNR}3Q{4Faz`-(oxQtK+s>D;>}yCiR-KDqeyypj|z56hIpQ2%4T$=)QL1cC`aJ(#;i zlBi~!Pg(FJ&L&Xf{p7+J{YTMzd~2C=;NT})HbH3grEo4?BHM=;W)}RuNDx(xvC3kk z0k8g;#4(bi{qrEVqn>yLM{k_Xkbf&di|@1@Q~|etbGf0-B~CvV-83!pX%Z@$aUKPV zVc}v;&$%SSvAX~~(g@NX0GEDQcd38_J6i4T-Yw%wd8g`*ALu=9{Lb*JR|kkUc99Bf zWX}#(bMKJ^9sRV3i!6Q(sj+6|0KT`~3W~}@(wBPI@!2LC5k0W;7HhmbaTs4s@te;8 zSe$<1L^P>j-ja9MxNvoF-4oheu?*R7e; zp%M?nlcdY~;Poigc{5%Y>NsAFxs+dk8b-w9<&(j?Eq9(Epb;j5HmllvoWNe_(y)t~ znFPPNYHM38@n>240}Zy1xOg7r8GRH^mB82G89utSUNYVCgx6d@Zte7M^b-wopP%u! z9$I#kL`GirqH3Mo_t;p{i7G#(!%1M%<>xK@c%B*Sv)dXk-GJ=%2+70XZIFYl1`Y#r z05FYaFtu09JKSblH?>%8R)+J<)~_<;#ek8Hg(-WDNV*`ga@zB2Dt$K=?8?q(oXy3- z-P;8$(F~kp1pMv$533;LK3He}vmvQqvr!c)|G)hv+mM3R~-IP&9~k`RDSLe=o}r z!;7`6)#N5jOEW3@F|yO%thT^~yE3n5o>uX%j=is)+|DSLSsx;Rs+IxwC>lbk1CrDB z?R1iAZlA86eaK%@VE?1J;bA%w7mX;iA>92U3wPuYTEKt1_?nW?Ri>6*kgnqHGJ3(> z=c%1xwxF2WZPxyGme=0IZZ2-#dno*qBxOF(z6uQ7S7POyaj~HO#a>_Vn^^~czOKR^ zrcSZ%oP6-PZN|`j?nv%`(G4GuYA$&s90-${YJOZ}NTj8?Y-$BGoc+Rxca$7Ynlc1Wq-2E*OFUWr>Wc3Qp?h!OU=ta!Hi3SR+rx+{v(HgM77X8r1 zmuF~ekS5oZz<_OL?DaO->h3ly!X!v)beRQbC&%nf%s|MJK(@L$g0@pdVRn1CB#u~q z-sa5swc;PzQS1g57uzM85Yd3SZI(CEMKfc&y?m6ZmQ;r~M*aekxxG z;UmGp4W|QM?=~+-rBU2eFrzGCMN(8`y-6;^n6Gh8)AJ+od_E7gK8je9k)LT*tbT3J zlF7fzIJfmSELKx(Q!AZTXwp&|eyUNYc^M&w0r;peyu8EzdG{(r4aWP)Jk|%+l7sSX zpDs;1#5L`&8Y%V0RS6C0a8~DgU**0qG3a@jM4V2Ddp*n1U1>f~IL+Vz`b7?2ZTMmy zO*}y&YQV#cF%{%~mk2j7l-Xm8Qe+Q-{Ak+gaTH|vds#U2LmxKhHrdHJ zs(2QQTmdw%v*2eipC3(aw$6piErE_c1KIB)R@r&TE(=pYQNV$rR@FmW?xUOI#7u*V#w4| z{ULU_?tLM_;T9JRoDHp%s6D0ei_^#Q3MP3jtZhxzaiIsd}4hS%N;kJ%%cntq+U zrzBrm_ZodvEK9jcMwWVjZ@hL6zP7lUQ!k^c^t^L&X8FpzVb z(OT)B%`fueUSpiox4~~nuV1v4$Kv50NJ-Uf{DkFTIpx*jPf8QnN%U>u76V~wWv^!| z&MQF#46J}YO%Ck&&wc6soeyb1obPG}{KXX3jfLNfsspl-a=y3fnP@DW2iR**eT+c( z)yvEUU&qZ}%<$1ZI@%z5S3{hnVEDgKOJBvd$XbPU%-UnZcSPe`A|7#MnWzW4tSvgi zeuX}vm*whR`gYpIPr0NG^dt!Q-#2e3@pmZ?KKqj;n|L&^c5+0ZoI4CPesgU-w$!Wn zH}?w9(U94cjObr~JcKdxeT^GQYIc~sK~DmfAaTJW{qlm^m)(Itc; z8~*&SAp$CK;NKUj3CiP%aW{o{Ab&u4y;5ML`d@ISiKdR{X!@VWgGk)h?y(}BdQ6{W zUnuTCs8<2Nqijqf|E4cAng+dku;X{!0rJ>=Rl_x)O`(n#7%muNkjc~fY7vdyDcw=P zI$-udzrIW&b3$`DefFX#O6MxThY|1OpoG8p5(+fzj^6NCs;Ii;kxn_v8129L9;klZiUvm{zU0xPhg$cjRgGW zyQ~!iXFK7X=HX^OmRxrn{pB@-V3C#U+6I$T`%9`3oxby?cR`ay=|!MhC6VSBC!73V zM5Jdk<{GrI&Kv%uv#7l-GdEfaH^(_H_n&8-Z4U2B;C&`(nZtVlF2CB$TjyD<{dvj^ zLrS!c>}=evs&Zenk-p{}VP@4pJzn`Dt3P(P0c#r?|0g@M-aB;4q0I`jW=!Q^udk`L zbvXEYqo18q!Kl@JcS{lRxIcXERCk?3v*e;oi}Uci5A8{RZN8752zeEsn)V$(Q6*pPKyXk-SA* zSg+7(_Isqbjd2oBVG`QS_L_OXavuAl7yjf&u&=#&PEY~0opL7Y>%N-|rFyOYaSwIK zq@yLzKk#X?Wr|bKU*Q5R=|@uM$R{s45j&zp4@sI5$5&HB$4Lt3QkFrQNN)QeXp_-! zy?cU8NrCYX9|zklbL?c3j0c(dC0|q+=K1y70e7;>#Au*(_UoDLvZ&qE3lAsUtMC5& z8V*)_O)X3s2ikhhzyoWcq1Xf6$@>D{J&4>XWV!*K-s)oiQpBjtn(ezxy-Q(6#SpPa5ahtIb>^Q* zgR_mnO~MJeA_L6!4aS+;tSm#t-P3|b4i{ZQzB{ZR-Gdz!WY-S3&6M||BQQd7b- zM<#1s{(1C;hS*SDe}!*hwBmRO(xCD3sN{rV-0A-Rz%?LvT+unj zG~sdf`zL^W$iGv0TP|%HW@o|u8UT6Dd{I-8#l@n)LVkrSFZWg*0Kmw%U;qOR`Eu?% zj@+pTfIQS?rGfGxsvYD9OjkKQ4*(!#{O<{pSATH~0FuCe6JcM_eyiSy)sz>F_u)BI zEQeAoi#vvpRRy0_|CeBt)Z74gB7FJ+H6&xgtKb;t#p!DDUub&yS%#Lsw;W@R}*1tHlu8*CQcMtv**x z0Y`jCUWf20;k$hg=Yp3TgJ+1qMZdFfvfjTC*>Onv(EVq9?SYpxEHoH2ETETy7FHe= zl8^UieGN;my*XgoT$)x zcE#bJg;KmNi2B4BY9f`{ZVU=`zqPkHolX7(wPCIhxP2dJM+PN^YHIoH4MkGISUoQOofypY7yb{~yh9%c(heRSwF^9gvcKbl`RPh#)f zsTDC;Ivl8<5-FJS8H}!}yI57dsTuzZ3GmGlp%`+(5pYKwU0A<3N}o@@@=+ZOC}`MP znwv>s(=&C)j|=;SDJ74FteKG_fwCjzWk+JbNH(789B+|4O=?ewH3e0fltHJ8SCA0V zySQiz?_Cy;d^XpDZ6+yGX}98n4~FX&^PCmm6@5iNw1R%i55m4qfBdt1=*e}2!*q67 z$xE4YI6Rr(>TFa0HMgNgY|p1;=Frz;R@Oc1&vM-(8!r>80!E{Br40|h3sJmQXu!>$ zPFLF>2&3F6>&Y(d)!khClhTo;i)T>F`wQWMt+U5uKb!i|^ozT*!&=@W?}dmly@iZn z>%SF>ZH}m#qLNV0-$wVCgPU5zdv?e%#C;%R=fj^aPaEMBycnMf=+V91OGIiXDiQb}OUifjp#FGcSVfinZg+{QP22pn#Xk0PAl=xnHo|vb* z<|goUs)~>G*^F}d&0cfvXkD-8>F(jsar0bfx(ht`;I`rE$R&79)%tA5yP|_<&N1w7 z!{DeR7lm@k#mTK}z$zQcl=WV#{pBp%L}|e0Y)i<)eoM&X#Ldjb)o`Ot)(ddMMlA__ z_Xy;{LNH(8^^3)`scMN25=S>aB2&$|?Ve@4yBUFRIMO&Uf-?tUihCOw zn0)8?w;KAvZ@ID^PVXguOcq?TtFOl z24VzLyp=~;e^g(B(69sm{~n&YPkecZU^-LAhi*Gho*^{?Ep3wqBHRbVzsJ5mI=bSO zfOUd5Djp}EHfXMmauKPZybws=jJl2CawZ`aWmpm!2L@jiVJzb9)n(PGu=4ZXGpy zdwwA>8rpH0_E;3EO;6I<=4r^K(w&jxlM`S1)#HtMCUz>bh=pjn=jnNi$l+zc2eS%+ zb{?SosXwyU>B5)5TT`r3$26FMzkAsw=_&vt6=n(+^~TW-l!wLQ{t04BYq1{F)(E-NdAtodo9~u5$y_x{J4!t~G}J{p?qcWiGMAQm?qwpe<~aGJ zFOO`|+D7xF+u~8{v}~{&Zqo(Q*Bl$UzRTDCSuX(5hU>Mh3Hai%0M+pC!1iHZ;XUVp z<4Ti;2wX)XQI~Pn1|aHaN&49gy;v43P_5poJu~%T_M_*$z^5>RC~k~W+-YJbCWsQ& zK7hk2$(O2Bf|+2U?j3kxSy(RXVfCE`FC zDBI@ms$KvbJ_(21=ZI9V3;2N6_dGhnWuB0{N2;QRht4$!#wB};`-(yk`V8QMWvYsV zBEX6!&|X`RpU6}WARA5#x@LY{4LKHAItx0wzFxYGcv_Y?D#wL4RL#M;jhgGf8U*Hg zwRmmsq97}un%u2Ey~yfl0}e5HVmO52=Rk*FPyN`%)U<&PyN%|Dru$)?dlerak(S%c z=-c#m;G#tuPt6&G;*(%~f(R8G!8o_Wg@Y7hQ7i~~#zFJ=QW@RO#j=fuw7Fs`d@dxe zzhEUG4@YA1L%fpIDHl3|pA`>?gb4Bbdkxj6ha-uQ6ER==j(1({vG!r2%F8yLwbMx&kS=ZT^zrGu3o`)z(%#8_4^oZgWH#uirO?bR?`pTP;CUN< zDzAJ)&@y(9>%}k$OehZa-`Gb0rFwy>yMcAzx^JYtTnC2vMgbBfGP;|zYo^PYbZ47d z;veA4^*k}!SdDfu0VpZ*h|<}G+4{Bn%`Zfm_uJjU2i;2-8PJP*<||bnHp{!_J%il$ znW_)9aj@48}eCs2dVEMbAPGUW?!B1i7{4seoN zRhO)*@v5O%oG(5!SlWI(kAB#IKdhsRUlT1X?ED@2zPO`e6AYC?VNoL7Ts7*q z8WD00zrLY;7&ZB+EW6cQbFxEuw&+i*_w;4uMx2(U%LjSi|JA+VL;?kJ{42y?Z+ zL6O|nkCQkN$ut*ke+4ML_-o>Xp73~b0x)buy8nCuRC#;pg_gvH!E6v$j6oq#AnE$x zhs1rt=3AH)4JAPI?X@B9GFk_LHkPOz%##W1YlFBPq@1|k^!D;Td%MNib{7P{?WKJh z*|J_cxmk3*8z&9kZC+{>THcgw!>oM)Dp9p)r-DM`VTnVzi=eDAfAjF>Z;hyxlbvDD zKS=m6uIMO!jDUU2xW-270n{($O5SidS-z^|lX`ANz^G zzJTM9sHWczNZZ*Np>p8QvP_a<)6*JGM$OuT5xKkfUx?D7!An<9-Io!*h*+Dz%Dcxh{6@-gbGsy;?@6)s|(Qa9mo`Lj%PRElC>y^k}G{G z3PBE`4fXvCKYI~rI1t4Ep*!8 zIi0raAJL+G)ZaPr@;fycF?HQ}u(oymmlsulOTSv1pm`Uxhi4|D#tO*4yc2pkaZ~1R zrbSqp6o?i=!`_mklUcVwQTYPK2Hsz@1C7_y!d$8RRAHEfGQO&aiKABi^zEyXugt1m zix114!$Bui%$Z#V9~B8DnUmaAegC`4;TH`BgEk7}#h8-DwIdu5+ze5p2h7g|e|)P8)bF-4%JT{s*t;uzEO~ zsW$HDM*nVAtbbAV8F>3~*(Hu>qys(^LK7D=#y! z$So|Eh04LEL@R)V2frSZ8_h{YZ|JF>0ZU zXARw;&@~O@CJnAX`EL#hOrLHq_9p5m1&V8!RWu)rhlB4@*+9|a=RI4Qk1SUxjtMX5 zgqv%R{QuKQxx_~+;4h@19nwG^o@@Q*Uqk73aVFMTq;$*UaK2>=GwM98X#k4p@kj>o zF^Xvbe_7jItIqM{k+aw3x_mQ9CE6@si{$ZW#Ny>mf%qlSa9tcMbt&Vr-{C_|h2q}f zDe~SqEI-pKokJV+1oFLrJfwt+E zG-E$@19z9F8&?v#a+DrbrzXDn@gJ;v2{faXn=%O0CgAhr^+~&rmpZY;^HvBZQ}meH zCNZ@$%K99H*%rDrwws`1QnuOZ?6r9=4@a7b@Z0j0!E9RJ5uCp#{{hXSjvjRO&Uoj!8b%Ah z^;)A$aOV*gp+*>MFJ{oWol)uNk6$eBFiV_l?D*dOGcEB@U;{B?!g3XwO8&En=3P$` z3*>}23*DL9c1h}M&914409LhaCtVyM&eT%?{)w`$(mj!BL6Wt!Hzkh%Fb61NLzUSn zT^W}jpyKB<1rnDU!^+++hKB_S05Z^#hc(p)&NCvT2ZWJ(PGs_5NcRln1S`10t*hh? zl?MCta@5#`>xaJBXC7Zlfb!vC2dM3qRB=^Y_9_L>PcM|IEPnw=7xlO4-Atdu9)Nmg zWasLD6$nk8U()&{|EH3q^h$H*6U4%DD7huni8HJ$tj_n@{iSI0YP z%edatpKwG?5{)7X{`A2+sbxzr*SpHCF~CCfe>A;^Bh~-=KK?wzICcnS#z7(^dmNOq zS6=qcPFD6lR+2)<<_JYb_Q*U&W;PkeIQGu5H^0;S_xb(>&*%LZ_v519jA{PTmdmHBCAt zPR>9VE><16F)a6k827pLc-jI(Go%LQGA?yVf@kmSjmW3Br#SQ z2$MYlAM%0FuYi=DTk=1k0o&X=Ug*=#bq{5*hn`B{fB&!uUIX>s^cTb%4cS4~kA>TO z^5j`ycTK&tDSI~Xth-ks&l2UWrWmRi2p#ta4b`A-Jx8uRN5gEpwlJ9Szt$#4qM~td zBn{3?1vvc=4e){)3(hbgyt4D)8lMUrxIm*Dha=Yc-tU#=rfAB1{*o-)```(a;*vBi zFCLjbpe!b9j%0qud%p|Yn0&v(gtw~w8U_^fQOP%xQ`y+PksG$820HzovL#>s{ar7z4TG(9>QEeItvUCsFcL0@raPmC>*3o3!Hr$-2bc)qks^`tgfx9v1QE zEZrfZln)3O$xKI{$T@T0U3Qu$G-z{Z4M_bz!my$hjO@5zlY)Liaih_ zk|7>fmX5!Hkn&JL@cq7!Lso_Io;OhqWe0i&r99$;o-st_vY|149ns>B5k42(K(+=4IC@+oOp~ssOyhir1PD6m5+iuR zasm|uO|p>hX&?~{4aC=tt9I0AD4NsF9GJfakf?&o^svh4Fv{Tb)YzM`NP58kr20G7H!Fv zqqLmvl?OUDyde9>AgmL>f7a3*Sef?Qc9N{l7RTZO65NJ#eFm;Q1QUQc68ww>fOEq1kpeg&RV z$XcN8u3VHF_%s}FAu8+lCd8-bSxU3B8G6*|>Endqvg_OO*NLvmU~IvQzwiDfQN@JsZ-;Jr2BV1;6vvl5DB3h>-m^%OfOu*Dks7(@@_x3r;j(78DBL) ze?*!>uOxz=myNb30NAaZzx!TtMg&+Dz?*p88?t>%ezNlIYa8-X#(=@kL@l^q+*t() z$dZy_KV|Sp)ctYezxch=xWX?$f)5=cnGFX;p4QNgU{>%WKf|v{C-Dn%Qctv*{j-IGiirOGld5~v%^*^yM`)VH*SE9P ztt9(96NQx&ok*(}SYdnfqTp|L;&&mFEEGkzg6PqIZ^GWTwuCJsmjmITWvijxEiWM4 zfVD9Rn!S3BR7X2K1AcZ$vDO`qt+Du5z(F`w9+xKkg2Vl}Xtd{JspFMFW9wWjx2+YV z<))JP-Z`ujW-#u(yocy@97-6nhHZw97u`ufsBjG=U2D5@u+flR-={)B(UL7C#JEg= zsmP4{HwJ`{dk~(DI)DO)H5@J%qR5EV0=btjocy3+Y$9LHTTvldr9jqFZ;+#S;kQZRZg0SK1x^ zf_h?bU?WF%4uOM=U|0<30$q7LPloe@)R(hc@PbfRg3d$+)PhnX4ds<)@kpPysuy1V z_~Wq_ll#nU4^2&pqul8iPb!cU%GTB2h!l<66N|7L@3SWMW@t)Pr2azo%i3Tx@!|pi z<}*JO4tu;$fN4N|xg^zSi^&;x3S~JV*Du-3Z(}(^FBjOPWw9+R_R4rC`*{s3Pzya* z1M`~&tUhM-Tl~IZ&G-*QXHu#I>q^nQBR zD@5-H$%+gv%5Gx8FIDXGUC`S8=c8G%8GBxa=*aisI>;)bt=5+JNt zH3OQ-?B6v3Cgf$GL1RYOb}!J6`{C#;u!Xv`W!x8Thz}!jt>651Mm&HOD;tg5g`Hlj zCTAVNE&huKPQNFL4MH*=tMK5-gTVp_H6nwooTaGf3zez~wG4G3dh=G`W`Yd&$yxjQ zfsx9qrMwBx2EOTH_`T^lmWlTZyRbh#$Ay;PI6-6;MHCM}etQKntBqW|ZA=z#Yzn5p zhBKrV=Sl*z&na8Jwu<4Nuf3?EMCxx>MYCStXQKv8u43ILuY$3c%Ak=2xw19Y5VVC0 zku`eF7@P`qbwQSbaVv6-x6!-AKhCu=2mptxL370;j}oB)f1k2;s>msWFN+fg#oGU6 zw#SV|)^pV?O64FOH;U}gUqGQn5!-Kc0)`CK&#|xK70&#v=|ix#d5xmiuMWBMj;`kE zVi)}{=4v<=@SS(bpTAnrByVua_KKfAKnWXj$vdZy3$CYc9DiyrV3I^tz4c7C-{Z#;_Yd+8Ae zqMp?Wp=!xjU=f#sA-mOOnY<35`Tg(Z;wOZ4>s0y=*@`r&T@>FvP74y^;~^v%_;DUG z-|7Txg9}_JCvkOPbW!k_i9A*XxdST04k93kV<68PN;RQKoy|%*q5}%h9wLP9Ka!uL zI7PrgsG#k3^9Q^jRSh*zlO?5V(EYDI*sOhk`%stYhK+XnO7h1YToku}WBw6aY4cJ? zm|Pf4hJ}t6h!&~O-V5s+-J{CzT-KKAwUy!`t5EhTq|~;Ra&&pjCb?S?jtt1L3FM8~ zclqi%LrPF~e{lL?y-g8t7^`AWl4xTq)INm(s{V7?{X3liNNYDsVs}Zhb-hTDYaz7| z{Jo7kanN-y07Zt~lrw>0cL`jdA&&?N%Rmvw9_R?w!N6}b6a|Ai4l@W!oJ&I@9?$H8 z1~zt{f<9G;BEppO97lYx@DIW&RJ7slTDD~xk;5Wq8Di}@F$Mkt^{=0*YK%lPylhph z5lMioEfls2&EBQoN};N9vbxc-VSUSxt>5!8q(!~*eK3e+8=rO`W|td-zO(dmjWfi8 z2dEEdtG94z%D^unSQ&Zfx=1|okBVF-RBqrd1s5p2;3sui>i+@T<$OqQU+A%ndxQlm zC2qIn-=E^wM91DckN~0NutFm^PklA+<;{rophfHr%lenF0F7i!{P(oh|A;(WhM!g# zs77vz$JCSOVbm~JuB>(acT3kR`D#D=O^XjREt4+mv4mGBKTSX3b(*?3+IhWmZvyPs zcF>E8SsK5lrC`9{3T69v2LI^mS_0@>^fehT_}!&#MG2JeC$pT-Rj&nZIvsLPnHSK@ zbzy{zssIT{P1$3GK&k9TKKmAzXRW(ypqr$>in=&FtNBDE?s9-lHg-BnCJ0=h1)2sO zm~R9nc5iRz22jRDhnR*K`PonGNZ;3&oK}v&R=CRxQ2DO3IVEQfv!>2F1Qbto?Te^Q zHE0d7{3^{mVFTW;{ko|QzxCnZYg^Irkci-3r^}m+7yFYmfl1WHb6Hp(fD80|Fx$lf z?rqP(ot@}|*UB-v3_P#V@U&!Py1GPUj z6z;rNMSG(JrxyQQgeSoSf~l6b(O4dkk`qGGK9=oC1z1*lRTU0S?7@I8W2P>^Z7RSC z)ZQwa6IeH7!IC&nJ74D#Z$Wo8ld?~OF1*nQU;^rcvnq?7LFof zTIjb}O=vVHSYuO^>@lX3HVvXU%)710SWCt~)n|Va_HgO*wP-1}Fv3nYMiurO%nW2v ztyl=$XeW(I4XoJQP`4E0iW!!KmPr_1Vn<$9B)u%i=^6X0D7q*;DdsEmv0Yj07YRTE z%-zMxBbp%q`7s~Pm{o=obba-5$c`F#FocN?sbfcqq9`mDvlXEmsxmCy7|^kYoCZknP;R@#vKSvVbzn{S7ua zC`s@Oo>k<)k;2EBkQs+I9Wc^C6L70}MD-?>%HE1C;olka`pKvize&JqCF`})8PCFb z-setB8SMN}`0$AdSvFE!<+>+}ky|<%BBrMmB1b!yT+*fV2|*#iBVO$HQpr zBIi;5t>_w4fn2BdY3XuS2Uu)i4My;Ig@zLnZ+EyZnBB7$pX`vttwrVdYk)RNKhX=# zb!TkHJl>Rj`RYv6JW>6VQ=<C}K1eU@q1W!G$L?)vAI4k4){bDQGbR)xyq zW8O_B;gd~)C2lppyoOnB^5|2Jpxd$b%e#Hf>;VN4) z0tHM~*>r0n=0DqThDKUlK45#dN_JHRBBI;dY3Rf{_dt;K=lRmrsZ6d@vd!Gc>#C0- zZ~IEgZK;P)gSSrI(t*NlPWkNWCXgEVwI&dxa{5$L`tcNtIg46kz6!OROY$2k%0tR0 z|Jhd%Eh>Ea^7Y8pADK|fW#MR*^Sa$0!u^6SGr!59LTybsuv>5b?ne8URK>tyzT?O6 z+Kl?ydt1L3WYJ{YqYm=L>*QBYq>|-8i{*n^(F`LGVXS62$gfZ)vaHAIGQeF zLjK|Ik;=nci>^UNR1sJS>w-KT2!m(c4_~5qH(fQJa6^>mVx=xXV?k(pwf-Vhd5!2I z(W-i@YWdTAVT{0;zeVW-1PrLQwaW33IA%byIg3DKNm-d+*M6kNQ5=I^bwiYayQl1< zIt5?6N-(8d?o|>#qZ@YFeWIO{Aw04;G(__sxsnP#3BIsv5j9}cGd9-s++Xg0b#bIK zen#59xv6SbxVeygZ&~H&v`@g>JbQT!wfmp>)q|P0x4gyEUi=lIv~O;l=rry0Pxe95 z2)E=FkJqe>14Rpj#*Nc(vy(!@=&b5#E*hF*%~J}Z`p#(cnt}l#2EV-YkQk?0nGq5$ z#02V0yqfhe?!$c@r$1Hl`hOF7F4$39-clmZ+YCNXAU?U=cfakDxFiY>TqZ(MtRzM>=2%ANr`MC1(FUBP0uugg4GBE31cf!6sA`+C8BOM zByoCVhdOO;oM=4*bbCI;C#dRC9KNj7DK}PkTgwSw-wZfYMFn4S45~e^RCVLTuGZ#X z9ngQ9b;Qd;cC!3`y5p5$151C;d*cC|F*UkA(Z3gR*}#W~H{HH+AbF9Nf;2S(t4v5V z*pA|bdgJJG28eN@GPjcGN+qLcnl!*iUy`Gs@rUO?O8t>YXB&75$+J zuX{h4B7TgYKcnw5yCArJ-y>HgFw*zDDWnExN?0umCl%b@DEehi}K87B(NKhE41MxyrG`cwnJV zaB_}52)K7@rE7tl7A1Vb;{sWR)Dpx&8`na3&8?{g@m;IGv0V8sF*TxpH2Tl+ee4NU z2Y=*z5xz|wlSnj@(d#=-sh+*g>r-|t%B_fEb36}^u4=o(*F&RLZT()L{SL8-CWV1> zx_!F*gu~-tiXgH?lB8u_bI&SELt~G^XQO{c63@E9N3r_D$f zd`HinBHfxOsiZb)3mqll*=sQq!SEGI7T9}Q(>6E{$Yh({v!l=3#k2*J&S?T2mI>Q#Hz za@8>nFg0-VDfAfn;cYUZaVEasm|d%CxC**{nDj#06)uhT6=k9G5SJjV3ysvAK9ZN@lTI5>(AD){e4}k>>uWdU z62psMx-tI9QJW>D1bYe!o_Ap?A{@KS|0v+=C~SX0=@C( zLr1qSEOA>&v;9VI4EtiPHoKPs)KmXh0gE@T25$h?ZoTm_dK4m#-|*pb;UJmemK*9>&N6JkgKV^n58IMIfcr#ERNV z*qLIPRb?o$3bmB*utl;=+p_8r6yz4z%KeC6(IC|14F1c|cX^5&B(c?4@(8stU9My!2EP+|nO@h=lJ9L+EAlC2_7!PqP?Z$n6miSv;|GRLSLO3# zOJ+5i6iGL3u02w{&nKR@FdWif$)9Ox8peI#*o4QtdC4w!m2=A_DZ!JN=vI*Pq`1XG z9fi(z8)6^6qEiguP5=X?_AvbwzGfk;)5lB^)$JmDjE&PBzuqjDULr_yyk$Xk5oum+8NgQ5Hk1vsxYsRP{DGilB1 z{qu@3m(gF%_Re3O`y5VknLD&2?Z=YMcGt8M;+pNbA%~`jW!b&&^CJZEWM(6rQi;S` zkpoeq)<%`2jhD%1f>bdP-GL-$|DBpTBzd(&=?=z&JovCn_y-Vk?uEff)v4@Y@;SQM z$#awX#v!QsF)j`K^RJ`V04L~=rZTbw8uwP3p{PlMsv>|B=mD}Qd~WcPFT9#Bc(pGH zO15T~0`;()_)}x{{oIBVnbmSaa+8EFBKh=5qrdBomZ&eMlnH;K`RkN#-#!&9sGg;5 z263ss-%`>Ji8>sA14CQB8O8Cyjsmt{FF3Q4U9WzHGr*8_k~Vge<5N$A4`_K9&M4Hoer}20JlIeIv-BF4U5O; z;uEvs`N1Z!eW6ACdd@iaFpxtld_{bG#K0Eri`f`=9*as2aPmt|4U6~iiDPf9uF51X zn7a8Hv_aGIs%`0>xMM4U@x!O}&gLb1%C)bi*f1~6MS1UOnKy1qxm0{^CSw0VA|7}w zu@UHtlAaO>uk0pV_>Yvu(Okq;;**AORi-No(L??c^``ssA*j|rB(KcQ4(O0Au%Wp> zj`NJo#|Ced`OO@@kTHjUXLckAS{&zU&V(vVB5Mg;h3bgVqJ*JydSsKO3BdI`Dl^^> z#VcWyh)Y%TvkvpK_xRTALrrk+4&Zk+_u!K80X{#ep8)xT=R*o97MIlL)>+)XBP4(8 zI$GlO_uZ-D5d@uY8^f!5CcZgM%ns>dR%-Z2n-+ z>1RO#f{NMkqs~5oj_jYl)4Y%;ZYtYGSPevXPPP~G2S`m=o!Ylf-9bJgju51c-E(pW7-v?ITK6Qxr-_EUt z7|`IG^3yH?r0irwthcJT2>|>CKApBu1+xS#(>L$y1g|7Vin*9=^mE&#LUI4MdGm3* z`S{H%HV$!^u8NxClCY=w&F!jT+}~qD)6ks#rwjTVLH8%8r(#;D!epeL%+BjWAC0qi z)`3Euee%YjP!oZ=UPYiG%gTKV6|M_OsIhJ|e=il^zLFTZ1BN~Uyl=0z=yH-gTt}w0 zFH14f&9#|8k<3F{!CDX&=@D-x9dqEWlA7cBbF(t}^j0DVGrG2VUAs-wKGXy0{>1p75Z^R;7)l`2Gb$@yRQ4T z=rx`6NBBX*b-~kf-7dGfCPUlDxbqaw=$g)&*Mm5C*K1Fs4S1(hBH708V-*$`Ub*n$ ztyl9q`wDXBd<a&0tVrS5;BHol_C zN3&uc!34$E7db)?zcxuS7?N#yc6YcC{U>|bjk)IF1WnVR;n|Ik$^tuM>`=j@c+%U* z!-5^tW6jupG7tIG-nhe6U^?2VEQF&O%t5y`gClCEPAs1MB9Uk-k0EmS+F+_!&lfqw z7bZ>OQ^*;aSncE>eFS$2tff(>3@W%oyw!gCR2JLOKK=J|y0pRfySW~-Xl{uLO%a2B z`hr)oQHtVwh0X`@{IUAy%t;RPG$93wm){^@CpBB`3T9vyF|;@C?z6m;1hv;hI+5{}l7CZ;4P2O4lSA29y+k5(E+jzVmnsh)1`>Na%h(l!zxv6Rmm*9Nn9Lu70F zy_tOO9|kr|o++)p{r@K$zpgO?Fs&!{7f|fabA19GY6}7KQ01*|ixjA4o@1Bk&JoH2ZT86K56=@$p)S1^fEzOllL?FEz?M>a zIDzV6yv`_B-7;*qF`mto-@GxETf5zsz`y0L`f>5ttxIUyulN#&7u0in{@T3*)6P`w zW7b6&Ga|!xoSEPTVVhuURd}*+_3NrB`rnw-d>vbI;cx5kAFd2 zsimBl+Lk1UGi@deI8;h6(vd_N{O4bKT?J(2h_76zJn3Q~fKO6#m)!;lH?6U+PZ&%G zE-w2oyfk+r2pTC;pOH@hFz|Qi`7nv=aO6Bi**qmO10h^0On=BbmeOj~Di-V6tW^^4?~> z*_lKu4XcfiP=eRs2z%L&%DapgRiES$EaBy@CJ)qzGY~+?vUhxVlRuxp?LnZ9;&R81M&Qj<+^4<3jL~#<5D)iyi^Zw_*pHuw*zozz<*E zK6%k=DQywlZ*kwVohU_hGf2h|w46|{d5(~9jQ`QI1sgeyXP^Yqx{nUZHr?-xavN#9 z%=maV=xKANjY?0pS7MFntdPNOZ&78QkA2~^pQu0m{%C1|FZXs6wr^8cIJ{JH`pt2? z{4`(Jm2%2;HKuwSOL~qBc^Y{Uz6N^HX4(1+zUKZ#;Q@-~oZ(u&3NBNsWSVvHVJ-T2 zAH_)`IlrDB1SsdaxhZrCoOgQ1&Wj{JHN2j6o2tS@_vuV@S(!f^wHkx9PFWdy@aOgg(o*N>hV%Xyvp$KbngLP@ng1j5EJuOCy9s}b?QK7Nipcux|v3! zox>4J#JXpb(bG!A?MByC#~<{G)2h64nX(uhh4-m``zkylvfv!Oq@Wr^ccd%kFe|xW zpvd@D(KC<6DbHm|e^|+^_!*(d-H7Tn195!u}?QxUKXe-2^@Q$=NenzZ+sHgWSvhg zIlXvkvV$UX&C}Rw?%tmv`blXsM)WNHA!DA@NPPOu70GN1L_1jz(%rWhq$w)yC?mR< zsHR2a>(g=kf+6Hfiu(7#>|S<;_WG;~eQG&r49VHG8t|o`-7vJ~BAoXfDgDJOJm)rZ zTBL}Fy5cpi77BjoRUvK!-cCRIgxV0%!oT!GaESo#*e zzdKK|uE&jq%}}g2o`ggqZpIX4uYX$$HwdRtXyWI44#5&JfAuf$9!Q3qkA0}#eExI# zsSIT1+`4!FcpNy@~jy!X)ydtt5@Rzi#%35l8NEJHvIDHSu#@;VOAA+Y-srA39OU1E|U3SF)vN z?E{wN$u~5V?1iHhtOML<_rG*DaEkKdQB%ExV?62UlY5U;3LC>*OA(Gg2)n(bka{U7 zOlwOghF(FY+vO-qn@WH7ZFwmk>*dLIs{nyBnv9U2lt>KG#A{9hPNp`11trpPA1E2|!)qnai7fnB~@v zHFotR`%EtA`@F8u2*b=H6_zbgGx1)hUc#2Rf?3MF(UoZH5V0wmy^G;EukXzAe}wM% zsyVYVKf~-OHTJEH1P5_hb9eVR6S=iTn+J}J)nw!SYBp{^&4h$9QM{NkdLKvML`#!J zPs3`8eKwySiiFZU05bj%Y*yRgJhA2^82O@oQf~O9Zw^WvMCh|=S<+VH41$Y(xhrx* z_tN1csL9|GCGJ6@=zHFj`b&U#d!e<0AcWTfMD>8lv)VRLvBqbne{w} z6O^#|(hz_4?Ord=XEg*f*+5;&iG+DxJz1rX(s6z3`0}_%do)A+<#W}#rTgkh zzS>HR3>WL*+&)z^Yb+%_^Q)D@kb075iJCP!J7%jBvnC%}|5Omb@vW;YsaIVL_azym zw}68aZ(%+u?nvv&oti6FJnrS9+&EZh2I`JceFx14y#lFk52afwN=m}~l={<-ecIxD zg;?!z7Kn|!zE{9&CgPVJd&6SGWyc(Wc4f!A`!A@0yaoJK)U=b|zy4A6?O^1D=DZv5 zKhueldn;_5NQ2LI85=_W_6eh;HTb+>M!FwW8z_Yo$9qBW`a^#qNL65g1JpMr|HoVQ zwTC3%>Puu}SsAV;K3!IIE8eW4iG?aS4UTioR~quINjE%{oIA?ZNvV#Q*wk(EX`%d{|QW!ySnPC_+DQ?luWqi-}#z=TrXx?e1O z??PcvGg3-J>xG>UBX<@b?=V+*p3iLJQU%lVYl1tZe)MNwZ@k9*H|7Tslo<|*f`oh7 z$7?wzgeD`BNi43_b6ZS5D`-kJf?iW0p zhv1*;rlnL5nsd=ubZfiaMEg$PT)Ow(hhMJWpWaU|iludZb*|Qzq<%<#&8J!4y?Oq4 zz|t_Ozo&<|_PcVrR&{1y=iIlb!08<71(&Lasl}Lzq$!50YO>OD9fm;mR41czowY<^ zK8-EcjXk60;;)Q5Z|){9@AHiAF6nrU5+;9z%heUcinmtNv&ASMi|RA7(JQ>Iv~I=t z7NdQt#4z>`qXUDH-FRioX`$xkJAA+zA*P<;Jd>5H_tJ>z`Q|9tJ_tX8mC^HC3af#) z>7m+~5&#aGp~3wnDwRGuicIxRVu1^HI*NGM*`1fr{3UDz3ZlEuO(eJR2VFKW3oV&f#JNBcivjYZ;lKkx(k zT5f)omJz~Qw~yCa-c0I@_8hjkN=yBMTU>SInFmQ_<4M2my!qWgVJE40y|Y74xVpdU zhyAFbrlFL^5LYH{taQl8ef4^`7kHzzv}GG-6W4^2z#R?E2NQ}CuN2enCUI%z_lmyn zTTX>`MY*&X?X#Owhdoe^RS*%@DIaHdU^{6OA%2>FOFRjk`&()2R@c3pD4&|~!D^xh z^(lh;HcXg~3n8D5J?S$Fzl^O8RmAX%7h-!L6LXnCHORSxZlVS{AI%=$3R!}Djdb-3yUc@rUVx`i!Oc2>M@3X2l_LvAsyyCp_^SSH_}`oZ{sW+e z@6r8K(xb$-(kW#fsw{!`a*urkmEYsy zzZ&5T#CG1y=9QLUeb5$)nr9xqIQ!_wqq){Zo==N7?$UZ9NjDK zQP2*-yRtfJv?ACS?_SF-*9EpALxV&va+-m>0BwLKx*-KBeGJtD*En%ncv;ys6+>}w z=AE3D&$&)E<$v-0I&)go^nSiYI8F+crqm1v!Fbn;H6N7J~97`DCyKO-0&0mGtnuBan;nUZA2!2*|cQx{9 z;W^@5^Sp_LLtpXTwow=RtpLCDMhb6%7L&T*l*02kQ<;(>-OssNfV8PumuK1dvev}N z|Mgu($iQA}etb5a!(ERk_O=b)5j%z}%`G7l;cyaezdtc9`>yn|4$lO9^_HyeWK=NJ zJud0X3m7?glOetlc*zAB4z1Y99-Ug5XT(Hu!URiMc4Ak>PVF&9#SKqchM?VdBHZ7v z(uL?@qX8W9Y?xa5m|2y_4S}+YE^u(roL5N=c^f zarQn5N`B_Y{+-ET*4!??aKAQD@CmUv%cE18=4dN>AD747jIwwSmFsdYMe=SDfeu4& zdptRIUj-B@!_@g1#Oq;3vM!yh0x?J(0a1ir~cAZB6tOyH{|dgwn0D! zw}RIoE(kn=VLQ}|PQ0PEoF)1a{4<@V;q+O)EOJsmy_z0%X|383{f*qQE%zk6$I7hp!nReI z-NCyrv_+oEQ*6+(Ed>v-YXxr!%&o{hG&~CR&s#?+e*%DL1^=?M`ZG z5{zZ<`Q5Muj?E?8C(a7RZtrj-^0PB+bq&#F6mKikR2MiHgt2TAD;5+6SzOi4$>8r{$-3;!uxbZs3t*wuZ~{y z?EsSJ_DTD+=wWFA#m)yBUI@#JWkW_=ns4pGkKRtZV?onK%673(Z`9nXHs8)>X@+;!N9VYy>I(JZf40h*?Y$ZQdwss#TpSG^u zZdy33q>zRN4_juk*ng`$R|ZsUo(STtJ2RwmK_q3|G=g5!E6)>{n+XxSipaN9#R>7q zO|hUY#}>rhVtvPz4Zv?l=`-H$_I=dt@I$$*$BlcfriMg@LGg1bLMx-)!=KLRP38Ch z8U)fgeClT82I+4Dl)2Klo>qw8DpY5RJ})**I$~Zjn4;SFMZYye$9d0;9bS{XK!7PS z<9aHe*I)Y~sZ959**oKj#@n*$iWGK2?sH*P?v!#JJO<2|=NR@W8@TLXq|}6>{eW@BYSxN;MJr_vT4+ffD7v7t568hCE>id$hnG1%p^_`=-kq9)B7j*{&Q!@LMyVriqHi{Xwtmup~q-b08FRp@FJkdnJh+ zDtb3K>&>bsC4M*Nd*MKqM3~soQQ^ndY)Rk6aDtmrZjC2|a|_8Iich4nOKX(nP^G7w zhD1W=JRjGmUl6`lphjDV#u8L`SkQO1O`kLIQiEb9LWw@Cl>l>zWgUcT))Wz|GH}pt zqigCvZ-n43b5ksSl$+e&So6JztLV3^m7OsQD5m zAldUG*cYdnU>se$>d^Wf^-RQAuo^`3!_*F8nHF$o7iV+zAxc!izH%qmv0XY&Ti{;-oCT_BHBs}keR_YKq5Mw2+nx^w%<3%N8OK!D;eg9s^g<5=<>Ov+c zG~apd=Xt)|v-$gbg1yUsYXe!;9|KSD4+fSjJh)u$tp6CBerk_E9oPY^*`vGcA#w`q zOCvI z()r$Q<=te5a!)?j&2mR~>U&ofvhMIG4V=lE1zAO!rcZ+Y0e32YagsoD3L8VP%KdQf zR6}#>gx3ekrd7q5dRQ(2*|pQ0*F4Vww=rMQ1{167Gfeoyu;=f`ogy~IX){vNpT*f2 z!D!|j9jK~!iiX2z9#RMr!xa)0sV>O4>MW|zw=G{^ob~AA!aqgn;bg9=LNBwRIYjbm z;BLE~r&`^-M)^dD;alp4#XIM>$(t3CLmpS}(|jN=rP<`dt5bgSngnT634i}2#_SWD zDbFI%RatZaOF&9oupH(az*73ZMAbaaBY3fx{Ru@j$5(@YvyZW5m<#&JzTR_thzYQ# zQueWlx#pKF<@i+KLv{I3s8tW!joCdcJh0QyryrcrpRN6AnE9;2)%n2M^XB_#5;5*h zFyR49=bxPgJEW}vhe7+Jd7Lf?4q3Wa!^JLvl*3;Pkr_@R5k?g7_$}cVAoeTuw5>8a zA91*pIq$Pj8x%NazLl6vkQ({-R1t5tJmnEjBXk8X&X>kaCjaXAUQm+eTJ8DO>;y8f za<0I%M{*keOY|Z>($)#Z<=##c!tOiP%ASEOj9OsgNxRzW-U#@VKWjEOC{z({>lpl= zE3hH?n_H(ih{@fW z)ZOIoU_IHj0Z5K2gN<6K8^aMK_)eMzz4M+G7BbGWj%o7dYZ;ZbmA^|mKBgJaVf&Y>RGfVkr zylW&QFnHCWRio(#JEx)2RRe5pUA^0x(EKb$D5{Au{=Z)eevWazzEHKrnmXPw`=ATQsdM5sS}B9u;X&PJ*PEa2<9CnAaWJF^9PH=_fx6;cUjOGl!(N7g zwtsSZlK1@jLs=&2DY`f$EC@TYBESJF*o0?q&Y8%{q$W=gUO4y`$*O{Jdj6OELtRnH z!DW&!QLDUlmHib;Yr(iY=YT#VRo`IRjj^W;{(vE_FfuE=iBLOReR0rE6R5 zG~%&2W75~FS*7)~SVfJ=$X6c8sGf`%cfm8EPD>(9 zD8qj}Ph(78rt9Ht<-*CEzBa#iNv0ZO1YP%gXRLFaLZ(Y{)p8Y+LnfU;$T(LPjR?d* z%b_6Nb0H^f|21}ui&B2@?^JF(H2h7fhigPb*!_XvMs>NAM_QyGtyn(~=cFc9Ml32V zebu_OvmBA*{3{SSWq00OVY)>9p|~ao1?TZs8wO0-G(#`w7?yKVl0Kw<}BMb zLUKVhwfFWUvpm*ke3}ZIVL#&zuxA%V(RRBP^mlP=ZDeT(|e+FaZ?zKO%P%D>OC9M7E73!a;MxeD27&x`9QUfvRr zEFJH=3@wOhoQq+2B2;=pCrd9u=RiSf$f@Hdzt7I>_E*<3(@6SLjq*KyZ4$;;R<_xP z*$)iWW1!W@ZZDdxEDr`{A7|g&{Yvee{-nRxRcc;c#29*fQ`nc1k)NSbN)%_fe}`iX}0P_eWqa2rES1AYpiwKXiWJI?#U z>kPDv%S>qTZ!#wV{+Hoy!Dx9410aqeN%k?K%ast8Ki#@s{TY)2tP-5YhQo*MJ6~Nw zLU8%aSxW>q@U+0j=0>%aZWDBo2uw#qdsz^L*^rO~yz9zCU-{&RJ~aG?|MIv0!Dv31 zuZ;(IcfwU{V8DvQUOym2JIap-`RTb0pCtjf4Ng2xA~+@3#FgsBem%|Du-kZI#ZLm_ zS@xqN4<}$2@vAoA0zB(+uH}5vFB(#D@>D<8v7IS$tBH531Y^%Fa=7<%yWNU>hrzXJ z58Bt1PWra)RXD=)m@<{a7d1PDI5PbLr3E2EQ$ScCAb?hS7^Ng$s}kY?o;tj*v3L@Y zzHg8(dId+y<1YlV5JovHmPCZ0$Q1$Z=I8f@)V6v61||^XW3aSDfiU3xBA>|waj*)4 zNt2V4#0b0a26&3u{06_pln@$ z!m#Qgq4ZbHMHB?Th8GoGd-cz&ufOu=)h1-V{ldlSp>tRvICZ8v!9)PRzdXQ3!&A7G zFdSo50EgQMZag0G=)-UO>p%aOer)uQ|Brw9k49J~INiZ5h5i<92b^3;0;+T8I@OCW z&h1wO&9-zh<3LLL&>koWz@c4sFEIF@di@8FM%~8n+4jSsOL3SGI4QCS?>s(%s;#+5 zVS{j8{Tnm+K~&Qxd9hEr*k_xit)EoXC%kw_8)51-VSA8=9e7u)WS_UumJ?R8J5WIgcT{FZN-ixOk9<avZCsGEgU?ju@8tF2^kAO{8Eq)KD~X-)kt85L-3wBV`biqGVjsKh6L zb=@QhQ=L%G;3P~O=GYU!gkcMr(AU5BO7(BQ``zk(tPH&U{DtaaY$!apwoz^3=Z1Uz zjp_vV3t+FnoErz}6(j*a^vL)B>gb0@JOA^){@s5v?)T<9YlHde{?<@Q!1XN%Klk$N zM_#MC|LW04XO;xei25x}(Xi4!tOrU0a9EEWV|q?hoCUw0Wau(j z#(L`@G;N-}`kMPAP1GU$L16BEO7hSWc_iQEiBi&q%{4KRpXW`~!l`yj5ABp7I`NZN z352()U%}qL6XX#M`IJQPJIK*+C4twL_MU(`2>>AqHG6WAk_qBLKL-&O(vyp9oAbF1<~0gHse`w7@Cj_f5#+`7#>9X$>YF?gwq-8JacQ`=9}NB9>E5}cU-wPT;moMeRaK0lZ7Ez(Jr5&_9so=7a`7Y}vnOD(x3 z2OZHYt7Yjj9APXOr_pAZQ}}15%g|*oVIxj$;?#b#YUyw55?p%Kk96MN`&^LUOQw@d z)eOLDFV-1HIgaYeUy_OM{k-P)?U zyXRi+{K#vsb*o1o?bxjV4u(lUDYxu__}#l@A%*eo_kboS{?X@lo@*4GInp|y+9cx> zhfN-75^3}M`G{x5q*Awjo=MtMDjCyKal8?H!PximjI?7CXXovLIHY7cQFN_Iz z8+2_?I+sbleASSh^kwgc@daDt7rK<^ln3KUl;t$k2@fUv4HkHumyB+k1z*w9PP9EB z(+;O`d8utQK1}xm;Dq6e%YXKQoFv;I<_pQ8Y^O(+Z47P7s&Q;%EZjTLKIgWdz+`7! z?HAgS4zt1JP?jHP*Z}0O)D?K4MhrF>%v`{&;W7MrqtgTlYpv6*j=NBJ;^1r`$`s6#YU*Nv^ z&Uo|YXtp-IzP6AAJpST~ostCbY`yWq?^G%GxCb~PvG9*s#af(448E#%4lb9*q8@8a zc*JuuQDM_3kEZMinC(8mp;YcBV1|t^dWa8jK(_w78MBznS%Lc-~r-_#1 zL&A`LB}ZQMjS!%rqpkpyrxV1y?FzJnJK z{qwK?QT2cQKYvvH`HgG#ONm|3Y+%&@?+xfY`_n)B_waDxgUE0!3FvKHTSx+KT)EOI zNkBf|Z=@B!H*Z8v;l0Z}U=tF?pqj&p?L0g}y$ElA>j3e~B&=|xRNHG&G~v$cILh;q zCgi#&Xp>jus!7GRADRx;cNzK=4JY@k7i|jyiKl@Rhtn{C5@IFM)qMb+I?;gE=q0;> zbP-EG6Q6?hq3Wdq0Zh8>+@a0!N^aXM>x-VOv_FlZ7DPDZ@CY<$8qE9)3~?$(ht5K6 zL{7VaOZ57__}QflW2)tgkGd>~q1N}4v}#+;u^Zm^7x>jJ@9%>Wf_QlFc0R{D%mTgP zeH<3R!JzMx`Yr=J2#O}l1Si|rUQ%dxEFO$AOmcEkK>Kv~csV|<798py^hTMv4QXaK zY@ivbExWv~!5pk50yEaQ|36EKz?g}^_BK`nUabD`TYpwX1}*H;7Y)`$;IyEwKJV-!(n%65)hqL+6VFgzaORC!yd4|V~n2@ z1WWGcwoNn%=M%Zp8|{*-|13jNLGR*&jtp>m@7tUb>@Ws==!@#K*)~m*!joP!;#J=@ z2r4>Gb^+E1ZcV$LBYma-Xsq~<-I7FjEjGwBT@9o-Qq5qLju>dga_CyRgItr}QcGiP z46FmK^pV`!31F3Eo2*PJUx-Gk9M11V{$A8_C0{j})m~B)$8+vlJupkE!@Vb~L|cEC zfoS9SU9#YgaXB3qsU=%5Uh$)C{0T>T^!W~b<4bb562UPO#vp80%d|V;MN31LU7d4` zb#R3O`>u=DWIHVX4dgz9Hm|~SO{rSw?FzBD|D6J;3u`O7Vbs0DrH!@Q*k5QY%B)vI8Hi zHNlF7Fczb!YeCy^BejoAkBOw_bG*0(w;2Yg_$97!#=9uPB~gF+C!wTg;A8ET#3x9S z6@wlKZIVm$tZMy~C0YR`IMDAE>?4`lQPf^-(Z{+$pX}Q+8341A0r66vwG+T9jnkA7 zlKg^Z#0#$A>6D4axN_V0mcaabCe9{(#CeeRb7p$+;b&Yt2!=R$ZcF<9VjPr_Vde`Nd9ZaF zwOO-JqiWOM;>q;D(!Lt6zSr81pqjKCzb6=OBY8oMu@gsFk^v{UTpENJjj=EhnBa*4 z+boEE0$X?i(I0%{Ppg0Xt#4K%{Kyb}hF1<>`WwIassCy^9^OBh?4GK417SStFG~V! zKY)!CA0-KpCk|Bedsxan?g35{s}D{&36F-i6ReeR*K|hjG;}Tgp6kLUCkoNp#A>}r zm+_*Lfcgu|Nd`b3DzQ(j`jLjTH7+1x@Ta}mW+$>w2D+fEZkx=6OM#U*lM#u;E1D#) zO=7%3rtGQZEf7RvZ$}<$2NE=`)M98yvPrl|VEnQf2-$1=Nr+WxJWk1`Q>$YTo2|=J2p19byKIjCy)ta8Bzb)xW zW5w|8@0d6pS-#t0e8gg`ObBQXoz!6#go8gUGy`mwo*LjP!0-L>zr)WWZ{vjH6~k+5 zk3RP^Klh)_r_=MZado0Ip061)Mjl5K3MZh#9Bpd*7s@>-i8C=FkkM8L!w@J0(b;z6Qf-8^sY^PE%|J==CbxWiGS!M47S z7MKW36w>7ozuzC}NlG5WC%GmAiLU>1*(M+OI)IapeNZ`!SL|vt;0xzh^1Pb2L;y4% z3u*ga2SxxLP7~V(%(oAyle%z7p6xlXguw%_k_6Uji*{Arprh<~wCv`2WidY{oF!|t z4gRr&h{+pdz)463kO1(h0qhZ&;EjRTC*$hh{Mr9oUA=zYzUr6Hp8Lt4{r7+DXJ^Cd zx$$^*Vz<+`#{==>LA}|@>m5BFST+T^-w*p)5`e>c>=@GHPthm6G`8GlE8)CZPlSoI zt}+kl`Ogdg&T}v85xoScFJASDS9@74yy|8A#Ie*k3QDC8?C4{T5|lmDYe74JYZ9YK zh!ix9KN1kVBw!LuGCS~5^NCkHlFM53w^9c=vIk;nq0}$=1{W&XA(+*q<&kiaPvbCH zvN=kQdW=5_jxtEEeym9v`^`3ji;WSyKs0e&k_XI;%K_X1l*x2`4A|sjVM{^YWF-Ve z*it-bi1#4Rwg)!V^)f%Ndcnk_P6A9eVJR6Pwe_DEk3>Q^)+W29&)^)5>4zS)Z7%`(yd}USfbS6Cia>=Y0>FJTSf^VECQ$ow6yA-`vBOk^mgu zXUB%aCXF;2wU^aCCAKCVyDIXDkUT1Cv&P?XUD)J=rV{&@2U2kg$GN_YN&Q4zv(%g} ze;F@HDA{mzXIoUMBHE<(j|`_Y~!$Z z2;h&xm(w%MXcLWsDFf;119#eS58Vz0V$`(I|7E*nKg7FV8a1ea@I!d@y^aY1uiDkG zR{>~uZEM2QrhO9w*h`zqPd}k;w*-&`OtBg;MI!LcSH4@l^vWyvip@Kp{OHI3JFJ^r z=}oFroz8fDyECkx3|P7;kmtJW2cQ@BEF}Th(>=!*$%%mlf9CiX3MYurWs{SKikfX0 z;eKR!>POy8C#d+EdP&D3dhfVw;UZpIBhGkCM&b)d3r>k3kHrc2S>w?OY`M+gM*fIo zpK#&WMUeCkJD!DzE=qGI|)IMQ2NG!h^>jU~|;ePU*1 z<7AyAnr!kC0$!e-L|)f|I(!k|rnev_4M+l*d`21%GA_p~ff0m}&-(ZvkCK20b6((0 zBIJTjLEi&C`WEmUPMigN)E?{+5ZPw%Pe-P~u6G1KlLK758n@t>f~$=WG8Ss^STLr} znwI*S2S>i@A88kH?mzi~UQ!apc731$)#-o~+DMzs9*rmUsVCssHh&XVvU+cB&4QABg!FP)EOrj z;^=D8Tc0pH_}S8LaHlsU`^N7)ggKYn(>{%k6O9wMVd_&>64q`Syg}C_HF^AY49iK60HOlfjQ5$A5K~ zHaHi3VstJVpZVAh&=3gHh3IfSP8-xvGS zq$j>$%jX?piDZpWRP}d-Y6w7S&r#G;(-}qhNFt-IfZekxeUXSTGv6}GaL&wZ;Ou+? z?xwoU#sEL3bK)27AV74Q0`{HPU&pTm4yudi&OP|aCqMGcZ@%!g|9UzfjVImp*~wlX zzaH41^CyJ$!$FU~_;TlkM<3;*f&QBT(ZJGfc%UQz4R_o-9nMeuyNd@$pZ*r>+F?F@ zv~iht5igu%YOvleUz+`bK#ePa_G~W7UL;@C(xizxl?;R_+roxyl|IT`)t2;Sc;dtxYr;iO z0>%Iqi^JAY@FG_z7D&k8uv!MX&f&sb&i~KeoAlVWWO-i4-LK#GUc88x8IjSw=HAyt zL`GziS#*L~RUvYKK!5}YsU)fdQjK7MR3D+H2quUcFkrx-BnAk95E3;hYC>B;LQ<;C zB%0U17fq6t8ST6Gdc*pyW&dq!+u8dx?#KPQpJV2JwwbNY)>^i=Ei>Eu>=Q&jDK$b5 zT$aZV@>u(Zc79}f03#T~V|7C^nW%E29J|DHXwMU}uJ-Qx-jWPSRPhz*kv< zlZ#imU~N6~tfPT9^HU3086}G_p!#d&t1ek>F8r#z1cIb8keiE(d zOtiyXCj52_06D(HV&xD1i!z>2DG!DL2N!tZ1aEV{u$>l6q$#<`Ax+Uc+*?$; zkvjuC!kLgkj>9Xb;FTvz8BV#ai(Yw)SH0zxR$8~gkDmIIyqrsh@{HS6S+bS4a$Ei8 zCIawf8M!Q(g5^B(3GSY;ir3RTiC_jSQk2D`9GsU6Z7zGD0T0lqIL{*pSx^?A<+U9P zz7CJJBESW$0y9srM;pK?BQtV>8n>|Fi{KwYk4b>N;Vyz{34{cHp8yyfT4Y3fQT9oI zf;aL9e8>ztYP&;#HMvoi%qBl*2FEfH^O+&?D82hF~AG z7Tk*;ydO$iOg8F-0A=u5JRrz!z{h{`lf~J^#mj&7U-*~)#@YGe^XI=hdFk}*;=#*b zxIEVT0nWbgr$@XWVD#0%VVl7^x2M4a{T9IBio+_{rDa1v{a`(Hl5&-EeFx8f+# z0=ii?nWoOUIayTzz6f6lrv49j_`q@At{sA9;Nr0d>E!wqV$5*3=nLHu+x(!MpybvM zgIQ){JhO4Rupqzqk-aeJwJ(49U-{-&zVf%f|7U;tt6yH8KRfy5+4)Nkj{2 zdOmK>(<$${2Ykj|Y|yosO%lwVOpUbKv19--XOK|1z1mUPYb zSXmb+=XYJb8>Q9Z<92}W1X#`G7(y%jpf@^Jx6p!vp1QA!kyGFW7prDg!_dZO*g+U% ztBuG}n>NYy@zu5QPv%DJ{%P`IrCwI_L*4YnANgaIVkfyZJG32b#w~|v2RXStY@FO7 zfUe-kfBK7`FMj^3Umg96f9Ws%2X<@!mBrcRi*{SZZv{L%yFBJcgY=fbrEdkOBYW;1 z=o5f`BKROQT&FftP$sEV>w?F45;VCS9934(OHvD$+)5R)GCX(!66M;S_*@S|230^S z#}s@SCSK(u*;Wx;xwn~#inrR}KO!k|vWymgSL*1fk94AUbxr^aTf>@68<1uG;0bA> zU#1NRfkQOn%d}uKO~$ol$;p!m20jmDp^n=nx(HkfWCZC5q`-ahYyru?&gWN-X#(61 z1hc?HmnH!Qw+-)rL1RHI?)@8`2}Q0?0=yk$sgAt(gy%U55|agQ)8tJ}5Om8y6NOc| zOGUR0Kc(c*3m!y(N(D^;-cHNc~no_@Nv*Uwb+*4{+_0 z$~8Qc1#>`y7f!rRQz}_b@G?-vz}VsfQ`;WlsTikVkvq^~Av=yET#z^-;1sKz;FvyE z`p~JRN}@+PWO%f-dexuXY1`PQE;-xg+qBWrsx86sYIsVj zo(N8)mT#a-I1e5}y_^Fj0Kq>DcvkVc=SEj@+5+yA8!HT}`vQmGgFJP^54sJs1bXAQ zy8V|`J(B@sfg^;6+*(h1x_oG~1As95Hzxm3PM;jGkrJHIips-^eF(@Aq;tSM@fQmj zd~z}&xJhKfVjm_K!-N7JQ!0N#XM6-a+RGDz2=JB1`%RO8(uTu~-*arEY`6={&+Gw! zKmYm9kACZ|cmBo;CnvvtakhBzUiLcUU%w}cjsC+Z7Wh(LKe3@!BM7*Mka{ws5#Rn>@w46I}IRtgk zc-anflYk}K(i-px5Xez~C{MD%A>Zf;RPjgIg43W+OlHu*gW1pqynKREZ7Sf69tt!% z$@F%-?i?KMKTqxQzUA#1={fdEY61wSPJ3O7&3nfz7` z!NIn59d5D0zq3y*&H+*L;9fkahZ1~0pTtTMUJoz^fGpfSn$MTQs?~w6tEXQ#Ob{NhVh393BdkPp#l6E zISeuSHhCX7fni`)%4NYe%+Zk)-i`9;=z5PE2o+2l1A9M6h%=gv**VUmTWjfX4x)0gHt0mQ) zx$pyP;gY3XG=rRmA*%TZXO$~*<$6++;#Ru|3_y&qG7$I45X~!087U2S;t8;H!v{?^sEaL|=0c<$*IA4Sso> zA1>)KcU-FOvjKAO=-)<;2 z7doevz7E3&W;-&hZMBIWIQ(b7{KfH0r>Bqpsc(JjcWk!x;)BzR2igTV|HVs3ye3$? z0N(L`^Ka5UJrxi1uK^y|sleHLPQ|1upzl-qO$0pxF?a+;;J1o(!8SOSd_EhHpc=3177!Q%6~C zt)dYZw3#lv!|FL!YhbfH(JP;l<2XC`PJjuIg|bPsm0_G0u`YzplTKL2hdz=oeK<4t z${?$7i!Z(sM{fcOatS;x-*7BIoxkK>_CxUc*8xpd-AS+@#X8-BlD{6`suQqkmP<1aPYX-Lx|j98f43UPW>mP06c*Sw5mQI<34D z%gUnrE=wr_<)<`QxFv@{48;FUpn<-$eKiPVqxWxy`5KIE@_?7km;h@P`D+ z5xw{3#rY&abpv}HgG!3?Lp6E=ZA=y<=GUx? z-%Kg2K1p**sDtmb&z>B8@#W9|ldpXKbFcjD;{4B^J-oD+1b*)P<)e$^C%^P>1YE>V z2ETCRw*mN#02=DI0pc7qKlXHh9*BWW7gBXVTv)5?!a_?@9<_i7mgQxb(>g$xzjO&I z@hPveYpLQYkFWu$x>ec=6D|1^eZ@yu3p!B-c3i6*Q>9h3;Pjc|y(yU5oYPJCb?s;V z=+WQ^cs?%sTC#In&S3|Kd0?ngDLLL4l_P^P0a~z}2Tl;9u_A%SKLamQ1ZbE{#K-xl zyXeG5GGvawESi=XRzR|>mS4CQ zp2a~UynLnI05! zWINtC;pMG=;GA2wSY5XQq6Iq|0rF@*oI+u{q<+a??0k0S_j8K?-k_vZ3PK@q**U4jU6FxR1Dna&d9;)i3|XZyo*UqyPQc#S0IP z9y~p}JUc#r`O;ny{Osab4+DPT({P;&>j!>tv8O}vfL|`Q7IQ%b>)Ib9zzo4R)=Z&mU~>!wN3bMie6)O zmfx18UrRd&7k`Tn4-yiz@f+a*xzH+y-^&K{fu3A6R`%E{njsGfqBF4ZM4%?f1~zhV zO33220xMt-(B&Qj0g6>+D8M9uRp!FpKM$?lE^s;mxmi=>^CDX&0c=(CjDdm^n#82U z2pk_C0Pe{MX`2rNF+Y9lw;YU?%YS+_x(zUNLaWPR)%yhCK>Ay&i)?OO z+HsLhm7xVLoa*Ex!P~rID!=3?4+)u4kZG8(8UV7KT!xN1Dd)Ky*f>tX1w#Tu5lI74 za8=o=Pvuq47&`|aQ$=kX+A01ySe6?W&QVrdTRLR4uq-9x!;|xq0Qit49{PED5)c$4 zT5-Wd=y0W?MePCvy`)>Rfhc^-nYsay$MXT_7q)8vz10a=@do<{ z%KVl+&jc__A&AFw1W2=F8Iuu$H%1Z!k4%W#g9;q-XqQQYI|FhaS=F6UO*V+fF#pZJ4bYp+vg`*$}1_F;#Z7;~EXNIZ-7U z{6;_M7RIw@&yGI-@=I@;^B$V-k57-ETJ(SM_}QY~2KebiyAANvz7E*a;DJ5?7+kSo zA)SaDay)mktTGoEb-lcViGgP2z!@;fy-aQe;eFt8df`PIYmwjw7jR8FBu|5k*KJVp zaiYkx%(=!qA;)pX6nxa;!jDoM!I7NCk5LxPkp-V&YC-%N7d#bHOD(3h6&T?&heo`B zX;5@Zp)&I=ma~?lW)p&OJE|yK5eh)!TWw14anZ@G%`)lJW?Xe zVE)jUm#ud_;KWKBkS7!7=b63zPAl}|BSLU!=BsREbB@~fa@;Jqv{%m>z00!)1rcPO zcw(|RhY0XKQ*cL>i4Nj`Lt)XLDs=1;P(gQKx~`Zsz<|8C-4OJ^y;-826_|WL>P=e7 zaj?!Mmpev|&Oetn#z$@N?i8}Ziu~dghr5Pudyoy2gwinCaPDA$XkAvZFNjJz5CDg( z`i+My{kF^H#nFqWFa5^F`T42Mt{xmev{k?TF2KCtq5A*;KmbWZK~%-Fr$-m(FCCqq zJv8lK=GY{`TV6UU@|XmX|i6bLwb2n}jZ^=W-F^ znczSB+0Pcg|Ns0$826}JDh$IK5)n(%}0{9~^v%;np@N)xRSYZF{-}%ns;7myj3F4aAND=#YafwNV&hUQS`$81A}`LDU4!EN&0T0XP(Zj?(dESO5@< z2Y~<(-mv0pQux)2!RJ6DhTcdb3%ddMBE^8Tc5Hnald#3n>Cy2^N0;aJmf{yqtdEZu z51t*JKd?6g+P4ADj(%=W3!X+J{Wy4_PXGp2?03OeJmrFurMlp$Q`QA3I2Zp=7E{Ru z7gwzZ!BV{d$XMM-u;|ow(~MW8$3Uw>A+FU`Qd-HGD{vJurfuQ5p3878YfwfpaG4nJ zHPZ(lf4cZD|NFnYIJK3jzl_GVsTmx3GF>mTk)PK!MW82+@pUxH1j%#TBDddOU)a;s z3wyu%;-C2ozvDJQ7af>vvxa=oFBm9fB4$sOp;3b7|NaMmxcG1W&i}ADH9P#}H)h9R zi`nJA%{~NqzKcn!5CSZf7h)?|z zxZxPh57ku#ou9DK$JCY64&~D7NQ{HQq_)hZqvXHAgN)%!C}nS_GV1z)&f6!K64psj z`o|9Vf^QYLNTV_O7mv;_PA`tmPaa;L96zy1z~|1M9xYyYu;8UYdJbT*_|uVYhg|6s zfCKG)E+Ud&Oi>)_s)~ks8GfC8lDV)mKA;sAI1L2_TLzS|q~HmCBxMs= zl`VP7tCT3U@LbR3&>=%mn0mm5!Lb<_qm}KCtVG}a@FN@B9@qrH0;YZZ2UDf=%9j_v{>m51>NMokA65%nq09q3d@^^g zERE3jAN=8W&7KqAYL7{PO=QZXW;gcO_wb87U;oN)EPnmhURgXnKQpcIm1*kAh7~xE zz!R2Pu;C>?W`sR$?pC3XKLcO{vAbZtHW=YLfv+q(1}g(P9B~e`!55$@YJSrr}pCI&wh1u@xrlx9q^Y= z?CpWCz8dcXxVpD!d@oX;0PICKt~P>;M5!&uB^B7Xm};34c=5D(P!{@v6ix8f3t#mS zPpRZKGTwPiATlL4jVn$ncxc*kPuInxe41(*n(1>H%IYO*b;uj(8)F*;*G{zmy?5VV zJhXuM&~^aqr&0Z*fa$MfH5wmC*RGh0{f#Q6nCCdR32g!> zKMVtT!N4r4woLu$v!{y>KK^86PwWD)8&GsX#>k;?E~icG`K@ogW5T2}+w82yt!|N& zMJ1CUU+EhNI01(sYg-b&GeQxAe5a)ZdV;ejgF7il)7JyJtzNJtHK5%8f8 z8hjZt39+$z!0m^ii{S4!D69?I^VTWcWHR~c+uBTR)Vrs+A@C8TE2z+t8L)CvW+Idz zR`j+6D)g$-XZVu-VloEWUd(iIdGX}vl6l>U_1x3*qsxa6jpEGJ@%I7r2Las|9Qp)c zaK(NWbg^XXVl9y&K28k)c;?1g#|@NRv^hm>46Cx7*Ow}pC(4eqV&pNP4OC_HSdv=^ z#7k8)%9mjo69SeY%kWH-%OO8QP&Vp=4~zaG^?FCO^z^9(%uhaz9RQmIunXXm09MSt zYR2#QQ5^H_GRP7%W9854-`-ls_u7ot;THYA_10qs*qYQQMSKk0$#!@P2PER1D}VUW zr+zDg$qbVk9=O9E0&Li0mKgK(>@hve&U3Tp&9@#6N`=f=MTX9G65u{GfQbVx5-iRH_4ItNVml>7l z2>ylC@aPkLQ<_vI1JoD1KztrS_ng7^G5; z34oPwoHgPT0h|3=_4xSofw{`Q4DjT$;X%N~=YCOI>KPvB6MzFb54c$LX-x*MG*zDB z3%a;8g%_{t$Q&--(m)L2^+FDsf^4#ub{Iq?YoJ%l0mwC#*X4t#CE2TW9oxsK6)g?A zmhrBYzfE1bXC79|-1|R$a9jfBaoh^9;N-giteW|oV$OoBtl;mza%V#(gF1-`0k;*- zjxQE(z45xkmJY>aSVpTiBc%OJCIKkYOMQU(582R`%Rp$HBs52gTCDhMTY>YV0fXCQ8h}X>b;`Gym;Uk+Nv+OJnxNyoPYdK#}k!82#R^C{52Dp&#gB!$U%xn2Jsjt$M0r&ln zK8Y27St8N69QU086mhp3FmAodV7!Sc+4<=5^0|0`ekygxuU zDWRB--5Te^_~=aq2W*l{a+&k<-FH85d$5C*zjguQHb4a9O>99w*<<0L1b=(GezAw( z|JLKz7pD(T7f;T3|DO3M>5X255B!0y1R8%&zX5>()V4c;*8{(~3>oq50i6XrP>7HS zK;b7z$It8%04r))Q&vKeTTZ?c;MR>BR=)$) zWWmc==eibpRK|!Q)rzB3wF>n(t1M4&=3)GXg3k&Tr;AJLoXewUkS{JC*redu+2ZWQ z_$I(-U*zY3zc{pZ$b~)uIKbYIi)d`PUnvEovMw~h6;}BK3rN()Fyku#vi$Ual@hWY zpMh)2wVhgmCD&AryoQf4d`&|MExu?c*BFUPD*|h9O8lD?#lDIbn(x170n=9J`ot{& z3!WAchI{66{wiUH^8wtVo3G;dz#9rPghXM5h}c7~L23e&`c zwKSqlCPkq)?L)5H08|2E0T_cz6y{q4z^TUSzvyl-Fl^t)4gkT*aI|gwOfX2|rHm{l z7{Hhiggi|G&;_dSs!trORu;Ynz1=j`FPMb(BoFqDO7Q5MaD{`kPz6r>xY%i3CUW(O zTPpaG4|n;G9zMMAW$oG7k$s(HacOS^Ts$=YJ+vPJT0Ap~Nc<+i-;19HzHN6&g*%b= z3BZ=!Fgj1Sbk)6OaOIOH(Z>ulM)x8=mS2+V;8bL89}UQD$HdV zGUUX-2Q90h0S6vnNtFHLG(iU{!@XVx1*ZU6lGAZ%7kXZ3HL@W5Vf!&jpeG{>^4 zq$<^hR*xnYMlN`MfZ%C9GGpCdQ}?Y$Z#d)fKtBxOMKHE;{-~XyVBlH?uK*16uose85sh#X4f^2~g_LOtFFg|)@w==9vz|@oeM&T;L3mJ8e z3a*?VM(qy-`fF>=0RAGNhi+U0+~3#j0wfUh;f(78y5KROW5DxVfd3YNkQ~^w8p7@B~5i3i{q=QoG(}Y1;i(P6(eA7`*m<5Q$GY{H^ZPbzaeDaPmMT zw)@uvEoVohJPc?xYv;^@zkAuM{#8Id3>c7p>=S@JJ_q9R8XM>r(ir45XhpBQB@=vA zE}VGV_F6o2zyw#h%_VOx7e9C}Gw!M!#d^%d(1=!W)hkB~J_Qa~gHa+$MFdsi5G&y# ztN3btE@eDC;=f#cX!rjK@C2~>qI?! zHPXolJkh&(*aiSx6s z0cgzh>T6#g0JQHrAO)g2RmvV@EvU;PS&VOevQSjgD)-2~u4i97^LBmmV2m*#iJ;|j z%|~Wt3Er_YK;YsT0er_%6M>Ln0pD=I`H+Ir`q&J1ngY>8BVa*$TgT9_Y0VTJ&XA(C zo0-VM=LRTFrmj@|8ZeHWb4-GKl50G}tr+9Gu&tX@d*af5@9F5NIpNY?1{Bi*N$h#{ zK%W3)Z|rTkUOdAHQf!S2YTEFO)5Tr$7=%J{IA#tX+@08< z86mm^i=t`IAd}$EK5@t-J|3093DPt^&2Uy?wL2yhzP3_J!ihtefa8B20E|ExLEk3= zM&<#_lq0xM&I75WP2~)zL0j9VL@<5y`m2jqKCk=#=;9d5r573vLwv!D&Z;Tlw{{W$ z<-6~HP$mEbPi*4;xrJUcMBf0wCQ~v=nhJY8N&`kP zkHG6IZ?#jDMHim}l)8L{eC{&Xzx&VcK^qN{5aBp-`!EUcm3q;M0F8EVyFBpaU_;GH5Y;3 zY;~WxNav-Gtgl3750#!B+1LITpL-fF1EQ^qmw!6osULdk6MzFf0~jjWDDqw#bU^uBy0M?u=_Z`i}q7SxE z&Pf;JklRHo8cJNlZK|LssZK8L3~TwRXM9@@IhAITzYGMkR1!M0l>kNHQt%f%HR$%o zSme+te*`)5D`B*j+pIY0T(QfzEGwzA;DNby0aNrc%zKP z1Q=gin-EDx3ZJM)-)s06oP3<{A?=Yqw&1VHOiW$~VuoY~VBXomoQ}B_%Kotf!JW3; z9(#-5+wZ*XT+%fvF$oyjgQv)Loun)`=-LScO6NSS65MIaePy(o?ae?t6t;>Tdj*=z*f!7PFWsa$G&~fz76kCA_<#dfG5B4Hx za6{DwluY7dP#LJ8$>Z0+;{~`XVaUjmDo!m_tZ;&;K5juZg8wc8rpvRyLI6W|50oWm z#T)_ia`Ae)Uk;sY3oWTp;v@a(b%h|ogW8CO6uykx84T*I{Cx+&5FT`m5*nmQ^1wV- zaC?d^lEuPr#8hD}sqjUMCEV%Biqd9t!$HRR=?_2K%M0eVdg$>6^qLenPtlKaF{gICLM|(Rg1`IQ%80{XJ#FWKJ^|RyU-ycd>tXy^ zz9ch#opIvUb*5Z=sw)RRS8j2VAvk=QH{)}8iH5Nw0i&1zh1n+rkP0;(bAoCLR`_d% zfJ(UBUd2hVplRW`UZv*}{^$Nb1KlnHCM`1XGTwUG3K1|Zw@JVouf4i>!M5i4Q6TAF zC{2?HiUAKvl_s!2gMREI2ipPY5A5rVn$QsFB6vm)h4;_UN#dN&rG;ay!j?P1#JAop zf9LJD+&=KMg{?F&1RN`S-xRo>E=MkK9yTLPpO=RM6}-T)`qbA3t?Kk1$PH<4r*S;D zr|~6lWa9e>^11nK)F^op zQ@l8cZR<#6^sljRf+aVs`bH{_0Kc!i=`=!b&^dDtbdeVu$KYxKxj|X9_SN* zX}=r-vEYQ~0#;eHsw)@4P#58lR}3Z9a-QJ>+e9H&O(2Xz0t(%%jD~JP>`0W2 zFXKUNWByF2p^Mf69>*4*>r4d9tQkeUO!U8)D9& z$%?DPd;Z=rOtt9!4Ku@-QSzTNE}VgaKd%`>dK4LDD(Wv+d<%{XR3zbPDZ}?m!hW+$ zGsy}TTcc^&Z%rh*bCkGBo1Nskk%?oGx+I8qc|mLExg5 z2cFdUt3L46#G~|^mnbQ7nlXy9bN~A*vZ-P67{;n50GHV^cklsI$8@|KGG~0LJL=ni zT=HVk`L3s=$r0x>p4_V*}{>5i7^oKei>I6)dW?^cw|@EzTbOwcvYXyr3@_YXQ9(riEDVI@ z1QWH9*J#5Mo*~{NZwDzFnJTos%u4oCaTEf~SVMIdkSZEJu}acwHoamvf6qx}!P%wZ zZqgqkb$UQFbiv@r=Sm0G)B(=|C5AAj)!VpB4sU`pu;qQuWMuMc!}`L%WC#XPGqZQj zembh99`ZrP_{E&&P|o0M7l#HPT*ZY!a88hv`Aa)YmVFzINht;MGe>YaHZI=eLRR|GzvI%J$!^4F2kO$1_Eb@d3g5oc?c&q0Vk zJbs|)=dgu^#Q5JZ1hF6{j2;C|>o0Slkwn)?G(NSY z($0U^Jqq}?QRc;m06ak#VWR70BF_e?ia(KroFV@K9b6ApOXpzc@>WprO4L&!NP8iJ zO5)OD`@#{@5}UL+e*WIN5B;8srNhI%!n)YH`aDIL&ak42Z9ve%!)v*y)j~~KXe;Kh zj1+*#caqu>>^6-@3XOfIDVQGhjc>uG4_hlw8#jQbsX-LD(qm__8b4=IpGlgmpn6B} z-E0;~NnS9KXLpJz-eR#hgy5_eN*-Xb0UNZ`$%ch>g{W`d8r=227MbtxE7?cqr{52A^ZerkOAS z{1QuaqTS!FqVoC9<))1L+vmHG>SM0UPU>RYgYitab95omA&OVdl+A<%ju_mnbSkFi zKWTn(5jPfKQ+p@kzh>q*_#p0{6n?%_&vNao)^-c;Adc6IyyZT3;%>E4neLKH7r2}& zn+KybS+bFOIpu9wFm#X0l zacs+U9+G2h{zr+(!u(dG!^f@C5Z7gZDMVu*mD(!&>!7T#&(H#NN|{aLNynegvPNz0 z-ru4JNI+e;4F?K(Zo`{^5zm9LuyRx(Ac44%7Js>VQfy4L#!!jX=4-07LrphSqcDfk z(YWmat#u|-@qsBf{0LnAB<-?$Tcg=?jP$j}6ElIbMR zJz~>2QJ0*OH*C|QZw zNQvot7ws6=gIBPgYk#zt@=YyrQ5g*mO(15LCIN51v+V;u5}4>PMfATbDPIlQp-a1r z9n}z!N*%oZt7Bp4TWlEb^=OL3;05Fe^Db%WcoT!ZybCNI7wMMwp?a;nGe%@pQWr}u z-w8WC350Dh?CXUTMy}5i%OH&!2+1WEBMnZHZ}i>5UR_7cbuEFOVZyX43*_He^lj>A zoPxoi52Xs+@kZhoo*lIxh5uC#aWw{4)oQLp7v`!;ns5-$+{|?pzZy?dkX~7kbuhjd&flwJbqlmX^rPKR;?W4+x6CtK#z}d49NrpIRmx zs*n7rvEw``$^~xcq|UE$T{7-mC=G@ggVA!RzXh|4BE^vjkIxQ?C=@*$##KBC>VQOYZ^NMYLod0RkRo!}CdE>6a=6Yys4BB~Rm5Z@vvw-{tdwy~w+}=i*2sOkmljOcjl{$V@Yh*FWQ}^`r&tZwoHEQ>q7a03=Ubn%}=8@MyhhD%>&K9 zt&eE~E_*jmg4Weguhgq|klcA@L*MmbxkVliHTYVuz<#X3yeoFDWz!w8Do*C@Q6Iot z36jMphn@rBW)%;~quHdU{;n50yg|cfur^Ve3Z}W8T|H;0q#GrGv2RWhX%{h-O zN}|FJ#hz`d-BU@W)Kj}lHqff`u--LZiGvT(js#-r(!1S+XW@v*bw^rImgju>bMJRuh^EDc(*;`Wz-4qmkcDOq$)TUM7 zXdIK3;?i+{eZv)G34pJ1#BCufqbPYH_}ras_C_V$!s?(L7K0ul`0o~f*?GZhu+H}r zSrosqI#P%L&57;PsdIo|+Wyeq6rQhNNZo4s7PMm_H%4$OW*UUVH4S)|u=uIEmf-$l z7I`>xrL1WImeUQ~fX8Rcw-?jkt5@FkTrfFEy9SGW*ginD}0aeD+awWoV)c=4@O!C(WrITEK$1;d4}zYDld!CtPDFsFpqO92EK|$YH6> z7{}JbWG36EaCyRpJBeKC*AR9az-X9nor*`a<=CGZi?$e8hlJZA%9sOKoisXS|W2fg#j11QR=1zpBh<)xaFi|?m z9D#fA6;JMho|bq}RC28u?Ex1Q*LD{uIA!Ae_jT;3jv{ln7U{4$X>SbGvZ(K-LHn{X zy;t~`dxarx&bIFjak0jde8QM%)~|2SGm&A05{{2B;SHcTzV5k_lSK@5n{>Sm`L)G+ z%qL+l@m_4d=QkMuVym9B@-dvxus)i>5IS|uEopQGqrrhKEFc-?`V!_V{a_1isjt;? zN~{KWffJ;}266oC@&t3w9VlZIne*G}3{RPWn7sHht?M34N%mkeNluU|Qc^@P{V<_~ zAq$Icn`&!zvQlSYhx$$S**g3rR{P~hc}HVAFbVLKYIy2J;syWaQ{nXBR5%|(;-uKI z_+@}3t@b*hgfKb)E4F79_H+f=2Rw>cea((4`GRHP5qZ5x7vnRa?DiUTBnpt zN)@5A`u;05q7zY{rNycffholX*X$pw*N3^Shkwk0g1?+zJ^Hr(f`dWum%tUQO0lVO zA=cTQOR7|!RppFPZrbaz^Qk7ELvF57V_tquXC0F{c-m{+i3+^Eg?%d&vaZdG%eAvA ztA0p`?q-=cird{ig&9sYy$;PSR|Ks%OGDh|iE}uN`b0H)q8Nk0#E&`q<;>p^Y!mrvlT$=h0LUTOE-7ktlv$P27_4d&dwrf5_ zmgQLQYv5UW%!UvCJ8#cXA+88^eCdo`xKdXSBVQ^B!sIg!bid;k!;N=c!h)lFg#1^g zR0SIdJ>b`#{Pw1rO7<#Cm=>qowLpXO``u@r?0qQg8zhmw>(-G|KNM*X+5di3Z)cV( z$IL+53JnBUyt<1Men0Y|Df7tTO4}{J?MRd2n{wtH!f$sY>3YSylpR^5_p7qh^t8U4 zZ1P0xf4-uTSA1-ae>!f0!C6FOfUt7F~G{JDH3p8qf1oAtH z;ys~nff%O(KRC@zaK&UUa?R-8(J?`9O;RW}$ z&^<3?`zvL6eMJvVK zqsx)z^23Vl3fv4KUu~&vQ|3D&6sfy?Mq2RJkp(t{e^{FG`lV<_>m-fT7P$p50Ms6HuwCGW*_eIkv6BjS{)Z?zZjh zf0Ziy4M*HVvDzhYp7306@Bj@q zyM8MrDBkomkk(sj(i|||LDIfOL>wHED#S|s;f(~+ssLBLDKnyfbtAOf?&L=){1-#` zQf32TaY*Gh=>w?^Hn9a|IHkPBl%1=iu|y~*sl@xr-;IUUeI1d3Gy&R*+@^*(_O6<( zqEPMgq8&7MJ&cFF$TOI9<0EV#fWmKtMkRQ+Yhq}`LrHB}BWF%(lXC+`%Obc63pzP^ z^Od5&Kt0>^4#t7vUYVni=I3tak6&)QRV zq^}s2xQqyHLqytzV9uEHbV;iCD!quyAm`$8(|LaD+#rV34}d#fz+pDUYc z4UG()4;JRCM!Qs@#L%!M+A;o>Dq=pRY9^m$Q$JXaE?`3|uW5bb{sj9t`W06a;P?Ws zd*c))?SI$vp6FMj^TOQ4k6At1K1-0C-7GC8C~+>kB9v6NwKU<=?DgyVe z(<3tSx1e1WP{*ArV*sAW05Jkf)Hi*_cr#-%`(C!bups2IW*g|qzPcM7v-06hn}9Ok!3Wc(Y)qaqL~I@hcX2GW|VCH}bA))Ciq z%O#MQ^;^PEW``R+TtGKkqiu@fLE&Gs^ell8p)ViDj%mOwLZrg2XxpnyKV zo6PyKM|0F_?&v$b6Y+Ukf28G6W^LDxiP;0Ne>yG-DEcI9$Sgx_E|VD6dX{ zNpaRlj%yOstjn+X2UR#Q>-TyyO@4O`21(m$$U}GYg@p{BCx@LpZI4F%M~Q38cKdhx zxOgrf;IH_a@7C7)OzRU26z5?r^j#{_l=vdP<$Dj0Eh_+RYOi(iO>y~=$Moo%E#Hd% zYNpcrcDFt=mJw`H2klOrXQBF*@v=)R@}E`h55nu4Q0X#QEt1Pxu$^n*BI;NCkQ4$L z+N%H{!y!&VGtAWCVov&&rb6T{z0pE?_) z^vXx%Eb^~$UH5TK&-#Fke`$32;}ZHqOyIHM$ecoa8VpV1Kvhb)=G>~A-xYaphY6b{ zW}QR7cmIfH@;IgE#Gl$y40_;WA$(Ak-ou=fMeew0&YXH*UHmQy#KcQCtAG-;GpmI# z2W*Hb+&Yba!6>KK{S$(lJ?nz5pC)G~Ere2}Wqkrlh~%(}lh@|=M1==e!^eJm9^v7o zu?itn*TURr+5q!PHJ&uxW<=DNX3|5vC^);w%Cz;-EW$qn&pSIN0hD7jEJ7SnxL#26 zSlY%hOI|%zTA-^UyVfQVrG1%d47 z5hMyDfmvegcJRn+wV!+ZqxJvDB5Oqx{cwVI5v~-zkmcrZhu=?MtBfq-`udKA?WV+mt|sfw+~|9 zQ)yhExZB==e*LvP2aTQXp7tP7#5x(w^Q`C>*srJ>n)bJGt}2l5sll5FgeHJ0mzlxT zwKS@i=01lQFjEj^6UXji;%>6z`rp5~s-OVfQr^*;Na=^WBul)eH)%e$H@tBv`nvL= zcoetM)I(htkc>cai!b)%@tIn>>;KM^G`KM|++8&9f^}m*isDh+C=NMX$Z)PTb4Pun zKcIj3-t0ft$Za9M{r#o5;{Iu}04H=?XAK{reihv1`eqPq#DeCAl42)oDCgex6E+_N zHGS*CuK;ZG5XEv6oE%Q38fk+byHQ2Oy;k_6VU5{C1{00u5bz=!bV>A&dA@-xb) zX!38GurBSRbzny@h^gxvdBb>%4Qw6cFXx6OxO=MQ?T*G19eLZUDLjYQ0aF;xxOH7S zjq*-k!&C4ScVhQe3j>KJ5vHuwZhK#vdFh9PLxV5GwoJC_ws7AhEBhmc%rLB=oqo38W});}c-QMBWzemDc@Hx*kQwW` z7xKby*Ply*vPza=5o3q-exGG`4rXoOQqrd(R)7u3_M+IHjmNO083k>*Ccy(z)=EskH@n#%HFb^Y8?x7ET*5ols8i2ros zwMLi_pIZXno-LF11Zx}Y`-ySAlsKB(Tb5gIL3QO8^H)wWfuwwq^?N_iS&&PkIv*Ny ztq_!nLM}9q78ZCA)AYX-5@HARJHU+!LU-|>;@%_7J|za!Rix(L%BX;HRWkG>M0O{f z{h811{tY3*T+5-n+`Qf2gJsn-l`0i#7`J&P79T4kmk5)JFDwTRVim64Ygso%D%gm< zrkX#svbzpY_OT)>Tl1hAekKiGl(4}i0vyM$A+aEk+)a+_Lg=TjiQUbRk`*yYX|SO^ zJiqu&WquQ9O61P+kz&RX%;lgLI?W>1 zP+OX%EpoxR5$;7qG0eycCh`XYcpEpBzyf!FOW#~MX+mT^_r5OELE(1`Wljp&lma>} z*u@2Yi_F!omX|UQt|Ds1r@gQsq@z|nR@mZAL)JS#pW}PdF-ff+EMnc(iB`k`-re!Xc~qY#z) z{A}bD<-?Bq`;Ee%_@phwH{g$On6m2E=gs$>kbM?`@=yn?3a|?Hg3k|yPl5&*8koXM)e$d zebv~O)!e66(7zlI?9Op@q}*iK|Bx6bC50{~SE1{#&buHV`3FU6RxJBf4N8y~K=qyv zgN`h9t{Lr(e*~fU2PZ6OcOgTnO!TCLOo|zKbMA$8)sz$kXPTKL!@e%ALZjSn$psdY zFF;TadF0;gz*i8>a)vQ`h5qRkUnsvDDw#>GHPj6#|h52bSlh){IH661y{FU(i75K1!j?}3eW zhA}EAG`=!qtBExe#QU{8o8ol*7=TG8P0he;5AA zbiPJ;dw_ksY>Ocbv1w}`-m|V3E)DkRQ$%w5C3i77bH4d#XeUH^?e=yBq4B5xd9dU0 zVhSyy;mSUVrzIPKUkN*%09b+2%fXco_!j@xOZ0^A*q%^EsT@;sjBt_Pwa3k>fux$ z)KWDHp>48Z7>P$H$j0q|N!M(W9lx_Es08k9zfXRZ5s5JMW@@ ze5;(?kT`e}`(^R_F~Z*O39wW;`7ya`%eW>4{}^Llp|i?~@|yJ+{qLTDh;UvUdZs={ zS_zoLciLL5G}C>0hiZwwt1*vIT%-6~Y$la6nu>3+8gmv3IMXJkxEJz5?^Q3XJwCg-&XWX?0+O z{>Potd++DH|3n=yt>&(TE2b-088H~6r72qcd-shWp{(bvCVf4%dOWw(Ld0bI&#*#u z>j;A$lMV5giXi35PU@_t3kgP);4EWv=M@c*Ip*V5G@K4nsyE!HU#AyI_Ci)5{>>sM zi%w&k-#X1d>K;k%m$EOEXcFBgy>EMhzNkOIJNYSXYMH+_N;y1@f)2?UZ4!#7?(KNN&%CK=IcOf`eA`+Q;5LocTT51djDLNr6 z5|d4^yL%dmfo>3WU=zVj^@l#{9;dk6MKUOtC}%%+v&`pXU^cnhY69Nj;%Zdh z&)B7|N}GKyv@eH&@dC0nUBUgrqTrHAgy0CN{UKmwnAbCB*o6Kzxp71{iW+#40L=MY zk~$J?|17%|&1nuPz^6sq`*y(VIK&^y;j+tuY=0mSH8@YK?dsXQRU%y$YuX;sV%+VsPBxCZ+ZBd;Q z6i)QE+t||$HQ@S3dF;_n?+evNr4!_B-}ds%gOCU8vHDzBGwOu_s#m&7veWY+jeLjP z${yU674iy%K^bU`w6|+7Av%*>JvpM;r)mC#r;MW8O|18cF11cBbaJmpc@%$M7ozWC zr*)^{iD{rn*K<=hUz?^}o)KHtXzEK2q-NUMTLXuH?^Oq9DiXO$i@ub}$_XIVXFAgq>wTf4w6W7m7#$>+z8YH8NT!j8vw&krfUnP&$ zGo+VB|C{r^yUArQ>ur}yUe?G?>hXf8Ug25o3C(O{-A~*ADr@ z=;OhQylyh^M8~)riQ?fD=^o)*ak) z2tmlsY~+z?yxZ|L{(&W&oUa#ACRh+qaFyKgBer!>56B2c*Rh;!($273qHgVaVN0J+ zR-BenXwE~{(V!Ms0LU-xZ^+P>&24*IbzaU21 zRt3$keDvlVF|S;1UdqKsbA~8J-xv+121b+aWcLTUjGvF(bYFJ9vhGPqxPW?4n&kCT&6QK210u=>1bnh&(60$5nzHEs%;}6hH03@o6=iE!SyH_p9T-U-74VN&X zoplJSa5sn?WRQFqWnn;F(Hn7pBB`rn7!czrT25PR4H#n&Obc8QGNDq z^bGe;=!L!$MJ}L1@VRT}XO;0XN3h?r^h=U}-qbwdxPTX-+Y>v_7>gho0Qhx@`fq0{Ht_cjNb}5a^?POG!1Ff2g3z{R>^wWN~V8Pe9UUgB+kurSRW|gK&map)|h9z;%s&(LX*2Hxf_n&0eMPv$GQny!0H zjZnW{eWkP5$HbWP!ET}N$@>&)f%qyZge$dkxo}-51*z7up~Z*8h}nDqIG{1%$%evc znrg7_c}*Q8{UY$Yt=njw7l#14w>F;bgZgz3czpZOn-2hDC3)|rVOzJbs(!qnCkskA zAuey98g=v}iNvP|B)Zp!;NO*lWjm3BbgE1rM|4SH4_yzuHkWHDIbo8pUrX{}(~Lw$ zv`b{h&@I0ix(ecdJ>u>pwcG3cP*)_3TfKkFxfMxDFlgdS2pWj&!8K>R~ zi%6>k1bl{v)H?p1PCPPn4A4EX%WFm)JBM17U>&8nFf1J-> z%eDu~gcXI~Ef#+qE;7Rzc1UJ@?s`1+`!{hW#{Vl%iN?xvEL5Oc^ zx&^)I|2JJ$B{u$^b63BD6~B^A_Q>l5*n2!(5nDbtL`(iD)M%j0p%gFrbE%lbp?sQA z58hZlVm!GL!{T1!`)zxU(HRc;frg!SEPxXahJurDoAT8cUd<4LjHIc}+a;t-R!L7h z54_bxG%4t2LS(Wpa+YiL;zyis9LOY0_{1gWpd4r2RO;Xblg9@gh9>4tM?aGwNfyD3 zqZ0h4F@myl%$%atc+^AfTJ&;Fp998KLG68ksbckIW$lfNk(=^V=~;rjhl}8s2j6@R_@~87Egv(b#j}n1f4M&1?zna)wGawQIezhn1-8bgEn!KsPo0Ec{Ccayxb6dt6 zxa_3!_G;;59|*DcdTXz%Y%mnC-(gt1*e<;&|HA*o!aV}O*&^*5H)h23X+o?6Xy0`x8 zuEpJ6G1(+Oz;(86PfhEg@5B=}_c4ge)yO@&4_yrp*Mj!MqT=>K3i74tK-Cv4*#=Yl zoau;mU0g)4$i9cy_Yv<==iChg>Ps+{zhKg_`3U>g??>B@4E8z(I$j`7z8-7a{+Lz} z*qrz?#jb@mbw$6>uAsOxMqta0+ywQO1eI!$n94{kY9|Ex2E_g7Cvmo(cuz94)l;d^ z$+9|eNfsO0Lrj6$LZ*Y7#f2-^ft$K~r-@9i`J3vkxbbVmc%ZBDCT~B7RXBes=&OO7 zndV44NT9-Y*KHbeV;+UoG{Uea<9Q?K3<>M0FzeAalX2X5J8E?#MxZ;#>UHPuM0V`GU+^rR0SKl9UZ$^~7x&iZN5?gple#Z+)Hg#9?I4{eQ7vtmr=Z zk0?}-@qs@GWGUtURHSeCiN)>wy*^cF<&B?Ud&wt(KHBz+2FcEwkVL(&5|g91Fk{$E zp-V)2Jx!ck9^Ogb8`G!)!F}_cY{(>%qr;*!R@=KZB=0_?pt}y*J8zf;p&3$n+&=ap zg?|CdO-mo3^6ipz?3Oa(ac7qkQv3b>;mS^87f+Y5-@0DWM8kQRe`hp!?#be~nPg_L zTD!r@QNWYun;R~w1Y#$fU!d&^nvy@da5{6pfM2X23SMZv!<{tTKykYGitu1zb9Yy{n2kFG-E|{^~P^ZvR zwY!m692jHS;%?PIbf?U$Jc$SId=OoVB{xnwwei|-rxl<`@&tkwH%5=-0 zMww*F;B&6KMIHbi>_5`(EWl?JBH_Q^M!mA=q4}F21KOCrbB@8KF; z$yM*R;$>*PIox9PfuHs{DG*?w64(&TfX9=GT&vsuWr;`WYp|?lVAb z8e!Ik?l>as`URR>HhJeeuOJ0>W#*vlzD9oD3Gw*?N~sh@ei7|I2?g)eAi0=tz`6<^ zVNF(QR}#G(w8OfSoT*ML$}}94)&}2b4qLo((|h<4PD=b_;IRMz^Y+$|gttT1HekHB zP)F@!ae%|~$_nfnpUxDaeYpPd5q5N9p6G6Pz|;5PAlImI&zEOVOQ3j}PP#DZk1KAR zl$q9gxHnhH!fDdWU`^^qXW_=g*X%`*L+L+9D-Q5N19<~Fuj0I&Ru$U1VA9T$P2<@s zn9oO{S)qAURM*L6DQ|0l*

Linux中国术语词典
+
+
[Linux中国](http://www.linux.cn)出品
+**************************************************** +**************************************************** +本词典为规范Linux中国翻译组(LCTT)技术术语翻译而编写,同时也方便广大翻译志愿者查阅。限于编写者的水平,其中可能有不完善或疏漏的地方,希望广大翻译志愿者不吝指正。同时,希望广大翻译志愿者能提供相关术语的翻译供大家参考。另外,若在翻译过程中对某些术语有疑虑,可在我们的QQ专门群中进行讨论。在此,谨代表LCTT感谢各位志愿者的辛勤劳动和无私奉献。 +

LCTT翻译组

+**************************************************** + +#### A #### +### 1. APM:高级电源管理 +### 2. +#### B #### +### 1. Backbone:骨干 +>是一个网络的一部分,其作为所有网络运输的一个基本通道,其需要非常高的带宽。一个骨干网络的服务提供者连接许多企业子网和较小服务提供者的网络。一个企业骨干网络连接许多局域网和数据中心。 +### 2. B channel(Bearer channel):承载信道 +>承载信道(Bearer Channel),也叫做B channel,是一个全双工DS0时间槽(64-kbps),其携带模拟语音或数字资料通过综合服务数字网(ISDN)。 +### 3. Backchannel:反向通道 +>是指当其他实时在线会话在进行中时,习惯使用网络化的计算机来维持一个实时的在线会话。 +### 4. Back End:后台 +>在一个计算机系统中,是指为一个前台作业提供服务的一个节点或软件程序。前台直接影响用户,后台可能与其他系统相连接,如数据库和其它系统。 +### 5. Back-haul:回程线路 +>是一个通信信道,它使携带信息流到远于最终目的地的地方,然后将它送回。这样做是因为传输到更远的远程区域的代价要远比直接发送的代价低地多。 +### 6. Backoff:退避 +>是指当一个主机已经在有MAC 协议的网络中经历了一个冲突之后试图去重发之前的等待时期。这个退避时间通常是任意的来最小化相同节点再次冲突的可能性。在每次冲突后增加退避时期也能帮助预防重复碰撞,特别当这个网络负担很重时。 +### 7. Backplane:附加卡 +>在许多网络中是一个物理接口模块,例如,连接在一个界面处理器或卡和在一个总线机箱内数据总线和功率分配总线之间的一个路由器或转换器。 +### 8. Back Pressure:背压 +>在计算机系统中,是指网络拥塞信息逆流通过一个Internet网络。 +### 9. Balun(balanced-unbalanced):不平衡变压器 +>意味着平衡-非平衡。不平衡变压器是一个设计用来转换平衡和不平衡之间的电信号的设备。 +### 10. Baseband:基带 +>是一种类型的网络技术,在那里仅仅一种载波频率被使用。在一个基带网中,信息在传送介质中以数字的形式被携带在一个单一的多元信号通道中。 +### 11. Bastion Host:防御主机 +>是在内部网络和外部网络之间的一个网关,它被设计来防御针对内部网络的攻击。这个系统在非武装区(DMZ)的公共一边,不被防火墙或过滤路由器保护,它对攻击是完全暴露的。 +### 12: Bc(Committed Burst):约定资讯讯务 +>是一个用在帧中继系统的术语,是一个帧中继交互网约定接受和传输和通过一个帧中继网络数据链路控制(DLC)和一个特殊的时帧的最大数据量(用比特表示)。 +### 13. BCP(Best Current Practices):最优现行方法 +>是副系列的IETF RFCs,其被用于描述在Internet上的最优配置技术。 +### 14. BCU(Balanced Configuration Unit):平衡配置单元 +>是一个综合的IBM解决方法,它由软件和硬件组成。BCUs是综合的和测试作为数据仓库系统的预配置功能块。 +### 15. BECN(Backward Explicit Congestion Notification):显式拥塞通知 +>是在帧中继报头的一个1比特域,其发信号到任何接收帧的事物(转换器和数据终端设备),拥塞就发生在帧的反面(后面)。帧中继转换器和数据终端设备可能遵照显式拥塞通知位来减慢那个方向的数据传输率。 +### 16. BER(Bit Error Rate):误码率 +>是接收到的位包含错误的比率。BER通常被表示成十足的负面力量。 +### 17. BIP(Bit Interleaved Parity):位交叉奇偶校验 +>一个用在ATM中的术语,是一个通常用来检测链接错误的一种方法。一个检测位或字被嵌入到以前发生阻塞或帧的链接中。位错误在有效载荷中能够作为维护信息被删除和报告。 + +#### C #### + +#### D #### +### 1. daemon:守护进程 +### 2. +#### F #### + +#### G #### + +#### H #### +### 1. Home Directory:家目录 +#### I #### + +#### J #### + +#### K #### + +#### L #### + +#### M #### + +#### N #### + +#### O #### + +#### P #### +### 1.P-code(Pseudo-code):伪代码语言 +>一种解释型语言,执行方式介于编译型语言和解释型语言之间。和解释型语言一样,伪代码编程语言无需编译,在执行时自动转换成二进制形式。然而,和编译型语言不同的是,这种可执行的二进制文件是以伪代码的形式而不是机器语言的形式存储的。伪代码语言的例子有 Java、Python 和 REXX/Object REXX。 +### 2. PAM(Pluggable Authentication Modules):可插拔认证模块 +>用于系统安全性的可替换的用户认证模块,它允许在不知道将使用何种认证方案的情况下进行编程。这允许将来用其它模块来替换某个模块,却无需重写软件。 +### 3. Port/Ported/Porting:移植 +>一个过程,即获取为某个操作系统平台编写的程序,并对其进行修改使之能在另一 OS 上运行,并且具有类似的功能。 +### 4. POSIX(Portable Operating System Interface for uniX):UNIX 可移植操作系统接口 +>一组编程接口标准,它们规定如何编写应用程序源代码以便应用程序可在操作系统之间移植。POSIX 基于 UNIX,它是 The Open Group 的 X/Open 规范的基础。 +#### Q #### + +#### R #### +### 1. RCS(Revision Control System):修订控制系统 +>一组程序,它们控制组环境下文件的共享访问并跟踪文本文件的变化。常用于维护源代码模块的编码工作。 +### 2. RFS(Remote File Sharing):远程文件共享 +>一个程序,它让用户访问其它计算机上的文件,就好象文件在用户的系统上一样。 +#### S #### +### 1. shebang [ʃɪ'bæŋ]:释伴 +>Shebang(也称为Hashbang)是一个由井号和叹号构成的字符序列(#!),出现在文本文件的第一行的前两个字符,后跟解释器路径,如:#!/bin/sh,这通常是Linux中shell脚本的标准起始行。 +>长期以来,shebang都没有正式的中文名称。Linux中国翻译组将其翻译为:释伴,即解释伴随行的简称,同时又是shebang的音译。 +### 2. Spool(Simultaneous Peripheral Operation On-Line):假脱机 +>将数据发送给一个程序,该程序将该数据信息放入队列以备将来使用(例如,打印假脱机程序) +### 2. Steganography:隐写术 +>将一段信息隐藏在另一段信息中的做法。一个示例是在数字化照片中放置不可见的数字水印。 +### 3. Swap:交换 +>暂时将数据(程序和/或数据文件)从随机存取存储器移到磁盘存储器(换出),或反方向移动(换入),以允许处理比物理内存所能容纳的更多的程序和数据。 +#### T #### +### 1. Time-sharing:分时 +>一种允许多个用户分享处理器的方法,它以时间为基础给每个用户分配一部分处理器资源,按照这些时间段轮流运行每个用户的进程。 +### 2. TL;DR:长篇摘要 +>Too Long;Didn't Read的缩写词,即太长,未阅的意思。该词多见于互联网社区论坛中,用于指出该文太长,没有阅读,或者标示出一篇长文章的摘要。因此,Linux中国翻译组将其翻译为:长篇摘要。 +#### U #### + +#### V #### +### 1. VRML(Virtual Reality Modeling Language):虚拟现实建模语言 +>一种主要基于 Web 的语言,用于 3D 效果(如构建遍历)。 +#### W #### +### 1. Wrapper:封装器 +>用于启动另一个程序的程序。 +#### X #### + +#### Y #### + +#### Z #### \ No newline at end of file diff --git a/sources/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md b/sources/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md deleted file mode 100644 index 48971b9ca8..0000000000 --- a/sources/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md +++ /dev/null @@ -1,266 +0,0 @@ -Translating by GOLinux ... -Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM -================================================================================ -**TL;DR In a local, Vagrant-based environment HHVM lost, probably due to a bug; it’s still investigated with the help of the HHVM guys! However on a DigitalOcean 4GB box it beat even the latest build of PHP-NG!** - -![](https://kinsta.com/wp-content/uploads/2014/07/phphhvm.jpg) - -**Update: Please take a look at the results at the end of the article! They reflect the power of HHVM better (after the JIT warmup), for some reason we cannot get these results with all setups though. - -The tests below were done in a Vagrant/VVV environment, the results are still interesting, it might be a bug in HHVM or the Vagrant setup that’s preventing it from kicking into high speed, we’re investigating the issue with the HHVM guys.** - -If you remember we [wrote an article a good couple of months ago][1] when WordPress 3.9 came out that HHVM was fully supported beginning with that release, and we were all happy about it. The initial benchmark results showed HHVM to be far more superior than the Zend engine that’s currently powering all PHP builds. Then the problems came: - -- HHVM can only be run as one user, which means less security (in shared environments) -- HHVM does not restart itself after it crashes, and unfortunately it still does that quite often -- HHVM uses a lot of memory right from the start, and yes, it per-request memory usage will be lower once you scale compared to PHP-FPM - -Obviously you have to compromise based on your (or rather your sites’) needs but is it worth it? How much of a performance gain can you expect by switching to HHVM? - -At Kinsta we really like to test everything new and generally optimize everything to provide the best environment to our clients. Today I finally took the time to set up a test environment and do some tests to compare a couple of different builds with a fresh out of the box WordPress install and one that has a bunch of content added plus runs WooCommerce! To measure the script running time I simply added the - - - -line before the /body tag of the footer.php’s. - -**Note: -Previously this section contained benchmarks made with Vagrant/Virtualbox/Ubuntu14.04 however for some reason HHVM was really underperforming, probably due to a bug or a limitation of the virtualized environment. We feel that these test results do not reflect the reality so we re-run the tests on a cloud server and consider these valid.** - -Here are the exact setup details of the environment: - -- DigitalOcean 4GB droplet (2 CPU cores, 4GB RAM) -- Ubuntu 14.04, MariaDB10 -- Test site: Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1 -- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d) and HHVM 3.2.0 (version says PHP 5.6.99-hhvm) - -**Without further ado, these were my test results, the lower the better, values in seconds:** - -### DigitalOcean 4GB droplet ### - -Seconds, 10 runs, lower the better. - -这里有一个canvas的数据,发布的时候需要截一个图 - -It looks like that PHP-NG achieves its peak performance after the first run! HHVM needs a couple more reloads, but their performance seems to be almost equal! I can’t wait until PHP-NG is merged into the master! :) - -Hits in a minute, higher the better. - -这里有一个canvas的数据,发布的时候需要截一个图 - -**PHP 5.5.15 OpCache Disabled** - -- Transactions: **236 hits** -- Availability: 100.00 % -- Elapsed time: 59.03 secs -- Data transferred: 2.40 MB -- Response time: 2.47 secs -- Transaction rate: 4.00 trans/sec -- Throughput: 0.04 MB/sec -- Concurrency: 9.87 -- Successful transactions: 236 -- Failed transactions: 0 -- Longest transaction: 4.44 -- Shortest transaction: 0.48 - -**PHP 5.5.15 OpCache Enabled** - -- Transactions: **441 hits** -- Availability: 100.00 % -- Elapsed time: 59.55 secs -- Data transferred: 4.48 MB -- Response time: 1.34 secs -- Transaction rate: 7.41 trans/sec -- Throughput: 0.08 MB/sec -- Concurrency: 9.91 -- Successful transactions: 441 -- Failed transactions: 0 -- Longest transaction: 2.19 -- Shortest transaction: 0.64 - -**PHP 5.6 RC2 OpCache Disabled** - -- Transactions: **207 hits** -- Availability: 100.00 % -- Elapsed time: 59.87 secs -- Data transferred: 2.10 MB -- Response time: 2.80 secs -- Transaction rate: 3.46 trans/sec -- Throughput: 0.04 MB/sec -- Concurrency: 9.68 -- Successful transactions: 207 -- Failed transactions: 0 -- Longest transaction: 3.65 -- Shortest transaction: 0.54 - -**PHP 5.6 RC2 OpCache Enabled** - -- Transactions: **412 hits** -- Availability: 100.00 % -- Elapsed time: 59.03 secs -- Data transferred: 4.18 MB -- Response time: 1.42 secs -- Transaction rate: 6.98 trans/sec -- Throughput: 0.07 MB/sec -- Concurrency: 9.88 -- Successful transactions: 412 -- Failed transactions: 0 -- Longest transaction: 1.93 -- Shortest transaction: 0.34 - -**HHVM 3.2.0 (version says PHP 5.6.99-hhvm)** - -- Transactions: **955 hits** -- Availability: 100.00 % -- Elapsed time: 59.69 secs -- Data transferred: 9.18 MB -- Response time: 0.62 secs -- Transaction rate: 16.00 trans/sec -- Throughput: 0.15 MB/sec -- Concurrency: 9.94 -- Successful transactions: 955 -- Failed transactions: 0 -- Longest transaction: 0.85 -- Shortest transaction: 0.23 - -**PHP-NG OpCache Enabled (built: Jul 29 2014 )** - -- Transactions: **849 hits** -- Availability: 100.00 % -- Elapsed time: 59.88 secs -- Data transferred: 8.63 MB -- Response time: 0.70 secs -- Transaction rate: 14.18 trans/sec -- Throughput: 0.14 MB/sec -- Concurrency: 9.94 -- Successful transactions: 849 -- Failed transactions: 0 -- Longest transaction: 1.06 -- Shortest transaction: 0.13 - ----------- - -**Note: -These are the previous test results, they’re faulty. I left them here for future reference but please do NOT consider these values a truthful representation!** - -Here are the exact setup details of the environment: - -- Apple MacBook Pro mid-2011 (Intel Core i7 2 GHz 4 cores, 4GB RAM, 256GB Ocz Vertex 3 MI) -- Current Varying Vagrant Vagrants build with Ubuntu 14.04, nginx 1.6.x, mysql 5.5.x, etc. -- Test site 1: WordPress 3.9.1 bare minimum -- Test site 2: Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1 -- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d) and HHVM 3.2.0 (version says PHP 5.6.99-hhvm) - -**Default Theme, Default WordPress 3.9.1, PHP 5.5.9-1ubuntu4.3 (with OpCache 7.0.3)** - -**Faulty results. Please read the note above!** Seconds, 10 runs, lower the better. - -这里有一个canvas的数据,发布的时候需要截一个图 - -### Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1 (OpCache Disabled) ### - -**Faulty results. Please read the note above**! Seconds, 10 runs, lower the better. - -这里有一个canvas的数据,发布的时候需要截一个图 - -### Munditia Theme with Demo Content Imported, WooCommerce 2.1.12 & WordPress 3.9.1 (OpCache Enabled) ### - -**Faulty results. Please read the note above!** Seconds, 10 runs, lower the better. - -这里有一个canvas的数据,发布的时候需要截一个图 - -**Siege -parameters: 10 concurrent users for 1 minute: siege -c 10 -b -t 1M** - -**Faulty results. Please read the note above!** Hits in a minute, higher the better. - -这里有一个canvas的数据,发布的时候需要截一个图 - -**PHP5.5 OpCache Disabled (PHP 5.5.15-1+deb.sury.org~trusty+1)Faulty results. Please read the note above!** - -- Transactions: 35 hits -- Availability: 100.00 % -- Elapsed time: 59.04 secs -- Data transferred: 2.03 MB -- Response time: 14.56 secs -- Transaction rate: 0.59 trans/sec -- Throughput: 0.03 MB/sec -- Concurrency: 8.63 -- Successful transactions: 35 -- Failed transactions: 0 -- Longest transaction: 18.73 -- Shortest transaction: 5.80 - -**HHVM 3.2.0 (version says PHP 5.6.99-hhvm)Faulty results. Please read the note above!** - -- Transactions: 44 hits -- Availability: 100.00 % -- Elapsed time: 59.53 secs -- Data transferred: 0.42 MB -- Response time: 12.00 secs -- Transaction rate: 0.74 trans/sec -- Throughput: 0.01 MB/sec -- Concurrency: 8.87 -- Successful transactions: 44 -- Failed transactions: 0 -- Longest transaction: 13.40 -- Shortest transaction: 2.65 - -**PHP5.5 OpCache Enabled (PHP 5.5.15-1+deb.sury.org~trusty+1 with OpCache 7.0.4-dev)Faulty results. Please read the note above!** - -- Transactions: 100 hits -- Availability: 100.00 % -- Elapsed time: 59.30 secs -- Data transferred: 5.81 MB -- Response time: 5.69 secs -- Transaction rate: 1.69 trans/sec -- Throughput: 0.10 MB/sec -- Concurrency: 9.60 -- Successful transactions: 100 -- Failed transactions: 0 -- Longest transaction: 7.25 -- Shortest transaction: 2.82 - -**PHP5.6 OpCache Enabled (PHP 5.6.0RC2 with OpCache 7.0.4-dev)Faulty results. Please read the note above!** - -- Transactions: 103 hits -- Availability: 100.00 % -- Elapsed time: 59.99 secs -- Data transferred: 5.98 MB -- Response time: 5.51 secs -- Transaction rate: 1.72 trans/sec -- Throughput: 0.10 MB/sec -- Concurrency: 9.45 -- Successful transactions: 103 -- Failed transactions: 0 -- Longest transaction: 6.87 -- Shortest transaction: 2.52 - -**PHP-NG OpCache Enabled (20140718-git-6cc487d)Faulty results. Please read the note above!** - -- Transactions: 124 hits -- Availability: 100.00 % -- Elapsed time: 59.32 secs -- Data transferred: 7.19 MB -- Response time: 4.58 secs -- Transaction rate: 2.09 trans/sec -- Throughput: 0.12 MB/sec -- Concurrency: 9.57 -- Successful transactions: 124 -- Failed transactions: 0 -- Longest transaction: 6.86 -- Shortest transaction: 2.24 - -**What do you think about this test? Did I miss something? What would you like to see in the next benchmarking article? Please leave your comment below!** - --------------------------------------------------------------------------------- - -via: https://kinsta.com/blog/real-world-wordpress-benchmarks-with-php5-5-php5-6-php-ng-and-hhvm/ - -作者:[Mark Gavalda][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://kinsta.com/blog/author/kinstadmin/ -[1]:https://kinsta.com/blog/hhvm-and-wordpress/ diff --git a/translated/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md b/translated/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md new file mode 100644 index 0000000000..82aba752aa --- /dev/null +++ b/translated/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md @@ -0,0 +1,270 @@ +真实世界WordPress PHP 5.5 PHP5.6 PHP-NG和HHVM基准测试 +================================================================================ +**长篇摘要:在一个基于Vagrant的本地环境中,可能是某个错误的原因,导致HHVM测试结果丢失了;在HHVM伙伴们协助下,该原因仍在研究中!然而,在数字海洋的一个4GB容器中,它甚至盖过了最新版的PHP-NG的风头!** +![](https://kinsta.com/wp-content/uploads/2014/07/phphhvm.jpg) + +**更新:请查看文章结尾的结果!它们反映出HHVM的功效更佳(在JIT热机后),虽然处于某些原因,我们不能在所有装备中获取这些结果。 + +下面的测试是在Vagrant/VVV环境中进行的,结果仍然令人关注。也许是HHVM或Vagrant配置中的某个错误,导致它不能以高速运行,我们正和HHVM的伙计们一起研究该问题。** + +如果你记得我们[在几个月前写过一篇文章][1],那时WordPress 3.9表明是完全支持HHVM的,当时是那么令我们欢欣鼓舞。最初的基准测试结果显示,HHVM要比驱动着当前所有PHP构建的Zend引擎高级得多。后来,问题就出来了: + +- HHVM只能以单个用户运行,这意味着(在共享环境中)安全性差了 +- HHVM在崩溃后不会自动重启,而不幸的是,它至今仍然经常发生 +- HHVM在启动时使用大量内存,而当你把它和PHP-FPM规模比较后会发现,它单个请求的内存使用量却更低。 + +很显然,你不得不根据你的(或者更确切地说是你的站点)的需求采取折中方案,然而这值得吗?切换到HHVM后,你期望获得多少性能改善呢? + +在Kinsta,我们真的想要测试所有新技术,并通常会优化这一切来为我们的客户提供最佳的环境。今天,我最终花了点时间来配置测试环境并进行了一些测试来对比两个不同的构建,一个是全新出炉的WordPress安装,另外一个则添加了大量内容的WooCommerce!为了计量脚本的运行时间,我只是简单地添加了 + + + +这一行到footer.php的/body标记前。 + +**注意: +前面这一章节包含了Vagrant/Virtualbox/Ubuntu14.04的基准测试,然而出于某些原因,HHVM真的表现得很差,也许是某个错误所导致,又或许是虚拟化环境的限制。我们感到,这些测试结果并不反映真实情况,因此我们在云服务器上再次进行了测试,并考虑了这些情况的合理性。** + +这里是配置环境的详情: + +- 数字海洋4GB雨滴容器 (2 CPU核心, 4GB RAM) +- Ubuntu 14.04, MariaDB10 +- 测试站点: 已导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1 +- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d)和HHVM 3.2.0 (版本中说是PHP 5.6.99-hhvm) + +**没有进一步大费周章,这些就是我的测试结果,数值越低越好,以秒为单位:** +### 数字海洋4GB雨滴容器 ### + +秒,运行10次,越低越好 + +这里有一个canvas的数据,发布的时候需要截一个图 + +看起来似乎PHP-NG在它首次运行后就获得了峰值性能!HHVM需要更多几次重载,但是它们的性能貌似差不多!我等不到PHP-NG合并到主进程了!:) + +一分钟命中,越高越好。 + +这里有一个canvas的数据,发布的时候需要截一个图 + +**PHP 5.5.15禁用OpCache** + +- 执行: **236 hits** +- 可用性: 100.00 % +- 消耗时间: 59.03 secs +- 传输的数据: 2.40 MB +- 回应时间: 2.47 secs +- 执行率: 4.00 trans/sec +- 吞吐量: 0.04 MB/sec +- 并发数: 9.87 +- 成功的执行: 236 +- 失败的执行: 0 +- 最长执行: 4.44 +- 最短执行: 0.48 + +**PHP 5.5.15启用OpCache** + +- 执行: **441 hits** +- 可用性: 100.00 % +- 消耗时间: 59.55 secs +- 传输的数据: 4.48 MB +- 回应时间: 1.34 secs +- 执行率: 7.41 trans/sec +- 吞吐量: 0.08 MB/sec +- 并发数: 9.91 +- 成功的执行: 441 +- 失败的执行: 0 +- 最长执行: 2.19 +- 最短执行: 0.64 + +**PHP 5.6 RC2禁用OpCache** + +- 执行: **207 hits** +- 可用性: 100.00 % +- 消耗时间: 59.87 secs +- 传输的数据: 2.10 MB +- 回应时间: 2.80 secs +- 执行率: 3.46 trans/sec +- 吞吐量: 0.04 MB/sec +- 并发数: 9.68 +- 成功的执行: 207 +- 失败的执行: 0 +- 最长执行: 3.65 +- 最短执行: 0.54 +- +**PHP 5.6 RC2启用OpCache** + +- 执行: **412 hits** +- 可用性: 100.00 % +- 消耗时间: 59.03 secs +- 传输的数据: 4.18 MB +- 回应时间: 1.42 secs +- 执行率: 6.98 trans/sec +- 吞吐量: 0.07 MB/sec +- 并发数: 9.88 +- 成功的执行: 412 +- 失败的执行: 0 +- 最长执行: 1.93 +- 最短执行: 0.34 + +**HHVM 3.2.0(版本说是PHP 5.6.99-hhvm)** + +- 执行: **955 hits** +- 可用性: 100.00 % +- 消耗时间: 59.69 secs +- 传输的数据: 9.18 MB +- 回应时间: 0.62 secs +- 执行率: 16.00 trans/sec +- 吞吐量: 0.15 MB/sec +- 并发数: 9.94 +- 成功的执行: 955 +- 失败的执行: 0 +- 最长执行: 0.85 +- 最短执行: 0.23 + +**PHP-NG启用OpCache(构建: Jul 29 2014)** + +- 执行: **849 hits** +- 可用性: 100.00 % +- 消耗时间: 59.88 secs +- 传输的数据: 8.63 MB +- 回应时间: 0.70 secs +- 执行率: 14.18 trans/sec +- 吞吐量: 0.14 MB/sec +- 并发数: 9.94 +- 成功的执行: 849 +- 失败的执行: 0 +- 最长执行: 1.06 +- 最短执行: 0.13 + +---------- + +**注意: +这些是先前的测试结果,它们不真实。我放在这里用于将来的参考,但是请不要将这些值当作真实的表现!** + +这里是配置环境的详情: + +- 苹果MacBook Pro mid-2011 (Intel Core i7 2 GHz 4 cores, 4GB RAM, 256GB Ocz Vertex 3 MI) +- 当前修改中的Vagrant,带有Ubuntu 14.04, nginx 1.6.x, mysql 5.5.x等的Vagrants构建 +- 测试站点 1: WordPress 3.9.1最小化裸版 +- 测试站点 2: 导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1 +- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d)和HHVM 3.2.0 (版本中说是PHP 5.6.99-hhvm) + +**默认主题,默认的WordPress 3.9.1, PHP 5.5.9-1ubuntu4.3 (带有OpCache 7.0.3)** + +**错误结果,请阅读上面的说明!** + +秒,10次运行,越低越好。 + +这里有一个canvas的数据,发布的时候需要截一个图 + +### 导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1(禁用OpCache) ### + +**错误结果,请阅读上面的说明!** + +秒,10次运行,越低越好。 + +这里有一个canvas的数据,发布的时候需要截一个图 + +### 导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1(启用OpCache)### + +**错误结果,请阅读上面的说明!** + +秒,10次运行,越低越好。 + +这里有一个canvas的数据,发布的时候需要截一个图 + +**Siege参数:1分钟10个并发用户:siege -c 10 -b -t 1M** + +**错误结果,请阅读上面的说明!** + +一分钟命中,越高越好。 + +这里有一个canvas的数据,发布的时候需要截一个图 + +**PHP5.5禁用OpCache(PHP 5.5.15-1+deb.sury.org~trusty+1)错误结果,请阅读上面的说明!** + +- 执行: 35 hits +- 可用性: 100.00 % +- 消耗时间: 59.04 secs +- 传输的数据: 2.03 MB +- 回应时间: 14.56 secs +- 执行率: 0.59 trans/sec +- 吞吐量: 0.03 MB/sec +- 并发数: 8.63 +- 成功的执行: 35 +- 失败的执行: 0 +- 最长执行: 18.73 +- 最短执行: 5.80 + +**HHVM 3.2.0 (version says PHP 5.6.99-hhvm)错误结果,请阅读上面的说明!** + +- 执行: 44 hits +- 可用性: 100.00 % +- 消耗时间: 59.53 secs +- 传输的数据: 0.42 MB +- 回应时间: 12.00 secs +- 执行率: 0.74 trans/sec +- 吞吐量: 0.01 MB/sec +- 并发数: 8.87 +- 成功的执行: 44 +- 失败的执行: 0 +- 最长执行: 13.40 +- 最短执行: 2.65 + +**PHP5.5启用OpCache(PHP 5.5.15-1+deb.sury.org~trusty+1 with OpCache 7.0.4-dev)错误结果,请阅读上面的说明!** + +- 执行: 100 hits +- 可用性: 100.00 % +- 消耗时间: 59.30 secs +- 传输的数据: 5.81 MB +- 回应时间: 5.69 secs +- 执行率: 1.69 trans/sec +- 吞吐量: 0.10 MB/sec +- 并发数: 9.60 +- 成功的执行: 100 +- 失败的执行: 0 +- 最长执行: 7.25 +- 最短执行: 2.82 + +**PHP5.6启用OpCache(PHP 5.6.0RC2 with OpCache 7.0.4-dev)错误结果,请阅读上面的说明!** + +- 执行: 103 hits +- 可用性: 100.00 % +- 消耗时间: 59.99 secs +- 传输的数据: 5.98 MB +- 回应时间: 5.51 secs +- 执行率: 1.72 trans/sec +- 吞吐量: 0.10 MB/sec +- 并发数: 9.45 +- 成功的执行: 103 +- 失败的执行: 0 +- 最长执行: 6.87 +- 最短执行: 2.52 + +**PHP-NG启用OpCache(20140718-git-6cc487d)错误结果,请阅读上面的说明!** + +- 执行: 124 hits +- 可用性: 100.00 % +- 消耗时间: 59.32 secs +- 传输的数据: 7.19 MB +- 回应时间: 4.58 secs +- 执行率: 2.09 trans/sec +- 吞吐量: 0.12 MB/sec +- 并发数: 9.57 +- 成功的执行: 124 +- 失败的执行: 0 +- 最长执行: 6.86 +- 最短执行: 2.24 + +**你觉得这测试怎样?我遗漏了什么没有?下一篇基准测试文章中你想看到什么呢?请在下面评论中回复!** + +-------------------------------------------------------------------------------- + +via: https://kinsta.com/blog/real-world-wordpress-benchmarks-with-php5-5-php5-6-php-ng-and-hhvm/ + +作者:[Mark Gavalda][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://kinsta.com/blog/author/kinstadmin/ +[1]:https://kinsta.com/blog/hhvm-and-wordpress/ From a03775070939bce60c7ba7247a0083922393cd47 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 7 Apr 2015 15:34:52 +0800 Subject: [PATCH 0482/2517] Translating:sources/share/20150324 How to Install Telegram Messenger Application on Linux --- ...324 How to Install Telegram Messenger Application on Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/share/20150324 How to Install Telegram Messenger Application on Linux.md b/sources/share/20150324 How to Install Telegram Messenger Application on Linux.md index 0d4946db1f..6dc57e2005 100644 --- a/sources/share/20150324 How to Install Telegram Messenger Application on Linux.md +++ b/sources/share/20150324 How to Install Telegram Messenger Application on Linux.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to Install Telegram Messenger Application on Linux ================================================================================ Telegram is an Instant Messaging (IM) application similar to whatsapp. It has a very large user base. It has a lot of features that differentiate it from other messaging application. From 7868c5e16dbf9b0ab76473ee2d95d0572234c705 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 7 Apr 2015 16:17:31 +0800 Subject: [PATCH 0483/2517] Update Dict.md --- Dict.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dict.md b/Dict.md index ab220cb977..6663c820ff 100644 --- a/Dict.md +++ b/Dict.md @@ -66,7 +66,8 @@ #### K #### #### L #### - +### 1. LTS(Long Term Support):长期支持 +>该缩写词多见于操作系统发行版或者软件发行版名称中,表明该版本属于长期支持版。 #### M #### #### N #### @@ -103,7 +104,7 @@ ### 1. Time-sharing:分时 >一种允许多个用户分享处理器的方法,它以时间为基础给每个用户分配一部分处理器资源,按照这些时间段轮流运行每个用户的进程。 ### 2. TL;DR:长篇摘要 ->Too Long;Didn't Read的缩写词,即太长,未阅的意思。该词多见于互联网社区论坛中,用于指出该文太长,没有阅读,或者标示出一篇长文章的摘要。因此,Linux中国翻译组将其翻译为:长篇摘要。 +>Too Long;Didn't Read的缩写词,即太长,未阅的意思。该词多见于互联网社区论坛中,用于指出该文太长,没有阅读,或者标示出一篇长文章的摘要。在论坛回复中,该缩写词也多作为灌水用。因此,Linux中国翻译组将其翻译为:长篇摘要。 #### U #### #### V #### From a58938f4b8e3e7035a85b64f33df8d3d04b20133 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 7 Apr 2015 16:22:18 +0800 Subject: [PATCH 0484/2517] Update Dict.md --- Dict.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/Dict.md b/Dict.md index 6663c820ff..23207f3f93 100644 --- a/Dict.md +++ b/Dict.md @@ -15,36 +15,52 @@ #### B #### ### 1. Backbone:骨干 >是一个网络的一部分,其作为所有网络运输的一个基本通道,其需要非常高的带宽。一个骨干网络的服务提供者连接许多企业子网和较小服务提供者的网络。一个企业骨干网络连接许多局域网和数据中心。 + ### 2. B channel(Bearer channel):承载信道 >承载信道(Bearer Channel),也叫做B channel,是一个全双工DS0时间槽(64-kbps),其携带模拟语音或数字资料通过综合服务数字网(ISDN)。 + ### 3. Backchannel:反向通道 >是指当其他实时在线会话在进行中时,习惯使用网络化的计算机来维持一个实时的在线会话。 + ### 4. Back End:后台 >在一个计算机系统中,是指为一个前台作业提供服务的一个节点或软件程序。前台直接影响用户,后台可能与其他系统相连接,如数据库和其它系统。 + ### 5. Back-haul:回程线路 >是一个通信信道,它使携带信息流到远于最终目的地的地方,然后将它送回。这样做是因为传输到更远的远程区域的代价要远比直接发送的代价低地多。 + ### 6. Backoff:退避 >是指当一个主机已经在有MAC 协议的网络中经历了一个冲突之后试图去重发之前的等待时期。这个退避时间通常是任意的来最小化相同节点再次冲突的可能性。在每次冲突后增加退避时期也能帮助预防重复碰撞,特别当这个网络负担很重时。 + ### 7. Backplane:附加卡 >在许多网络中是一个物理接口模块,例如,连接在一个界面处理器或卡和在一个总线机箱内数据总线和功率分配总线之间的一个路由器或转换器。 + ### 8. Back Pressure:背压 >在计算机系统中,是指网络拥塞信息逆流通过一个Internet网络。 + ### 9. Balun(balanced-unbalanced):不平衡变压器 >意味着平衡-非平衡。不平衡变压器是一个设计用来转换平衡和不平衡之间的电信号的设备。 + ### 10. Baseband:基带 >是一种类型的网络技术,在那里仅仅一种载波频率被使用。在一个基带网中,信息在传送介质中以数字的形式被携带在一个单一的多元信号通道中。 + ### 11. Bastion Host:防御主机 >是在内部网络和外部网络之间的一个网关,它被设计来防御针对内部网络的攻击。这个系统在非武装区(DMZ)的公共一边,不被防火墙或过滤路由器保护,它对攻击是完全暴露的。 + ### 12: Bc(Committed Burst):约定资讯讯务 ->是一个用在帧中继系统的术语,是一个帧中继交互网约定接受和传输和通过一个帧中继网络数据链路控制(DLC)和一个特殊的时帧的最大数据量(用比特表示)。 +>是一个用在帧中继系统的术语,是一个帧中继交互网约定接受和传输和通过一个帧中继网络数据链路控制(DLC)和一个特殊的时帧的最大数据量(用比特表示)。 + ### 13. BCP(Best Current Practices):最优现行方法 >是副系列的IETF RFCs,其被用于描述在Internet上的最优配置技术。 + ### 14. BCU(Balanced Configuration Unit):平衡配置单元 >是一个综合的IBM解决方法,它由软件和硬件组成。BCUs是综合的和测试作为数据仓库系统的预配置功能块。 + ### 15. BECN(Backward Explicit Congestion Notification):显式拥塞通知 >是在帧中继报头的一个1比特域,其发信号到任何接收帧的事物(转换器和数据终端设备),拥塞就发生在帧的反面(后面)。帧中继转换器和数据终端设备可能遵照显式拥塞通知位来减慢那个方向的数据传输率。 + ### 16. BER(Bit Error Rate):误码率 >是接收到的位包含错误的比率。BER通常被表示成十足的负面力量。 + ### 17. BIP(Bit Interleaved Parity):位交叉奇偶校验 >一个用在ATM中的术语,是一个通常用来检测链接错误的一种方法。一个检测位或字被嵌入到以前发生阻塞或帧的链接中。位错误在有效载荷中能够作为维护信息被删除和报告。 @@ -68,6 +84,7 @@ #### L #### ### 1. LTS(Long Term Support):长期支持 >该缩写词多见于操作系统发行版或者软件发行版名称中,表明该版本属于长期支持版。 + #### M #### #### N #### @@ -77,42 +94,56 @@ #### P #### ### 1.P-code(Pseudo-code):伪代码语言 >一种解释型语言,执行方式介于编译型语言和解释型语言之间。和解释型语言一样,伪代码编程语言无需编译,在执行时自动转换成二进制形式。然而,和编译型语言不同的是,这种可执行的二进制文件是以伪代码的形式而不是机器语言的形式存储的。伪代码语言的例子有 Java、Python 和 REXX/Object REXX。 + ### 2. PAM(Pluggable Authentication Modules):可插拔认证模块 >用于系统安全性的可替换的用户认证模块,它允许在不知道将使用何种认证方案的情况下进行编程。这允许将来用其它模块来替换某个模块,却无需重写软件。 + ### 3. Port/Ported/Porting:移植 >一个过程,即获取为某个操作系统平台编写的程序,并对其进行修改使之能在另一 OS 上运行,并且具有类似的功能。 + ### 4. POSIX(Portable Operating System Interface for uniX):UNIX 可移植操作系统接口 >一组编程接口标准,它们规定如何编写应用程序源代码以便应用程序可在操作系统之间移植。POSIX 基于 UNIX,它是 The Open Group 的 X/Open 规范的基础。 + #### Q #### #### R #### ### 1. RCS(Revision Control System):修订控制系统 >一组程序,它们控制组环境下文件的共享访问并跟踪文本文件的变化。常用于维护源代码模块的编码工作。 + ### 2. RFS(Remote File Sharing):远程文件共享 >一个程序,它让用户访问其它计算机上的文件,就好象文件在用户的系统上一样。 + #### S #### ### 1. shebang [ʃɪ'bæŋ]:释伴 >Shebang(也称为Hashbang)是一个由井号和叹号构成的字符序列(#!),出现在文本文件的第一行的前两个字符,后跟解释器路径,如:#!/bin/sh,这通常是Linux中shell脚本的标准起始行。 >长期以来,shebang都没有正式的中文名称。Linux中国翻译组将其翻译为:释伴,即解释伴随行的简称,同时又是shebang的音译。 + ### 2. Spool(Simultaneous Peripheral Operation On-Line):假脱机 >将数据发送给一个程序,该程序将该数据信息放入队列以备将来使用(例如,打印假脱机程序) + ### 2. Steganography:隐写术 >将一段信息隐藏在另一段信息中的做法。一个示例是在数字化照片中放置不可见的数字水印。 + ### 3. Swap:交换 >暂时将数据(程序和/或数据文件)从随机存取存储器移到磁盘存储器(换出),或反方向移动(换入),以允许处理比物理内存所能容纳的更多的程序和数据。 + #### T #### ### 1. Time-sharing:分时 >一种允许多个用户分享处理器的方法,它以时间为基础给每个用户分配一部分处理器资源,按照这些时间段轮流运行每个用户的进程。 + ### 2. TL;DR:长篇摘要 >Too Long;Didn't Read的缩写词,即太长,未阅的意思。该词多见于互联网社区论坛中,用于指出该文太长,没有阅读,或者标示出一篇长文章的摘要。在论坛回复中,该缩写词也多作为灌水用。因此,Linux中国翻译组将其翻译为:长篇摘要。 + #### U #### #### V #### ### 1. VRML(Virtual Reality Modeling Language):虚拟现实建模语言 >一种主要基于 Web 的语言,用于 3D 效果(如构建遍历)。 + #### W #### ### 1. Wrapper:封装器 >用于启动另一个程序的程序。 + #### X #### #### Y #### From b0138baef821979dfde78056d5a68a4bd3f76571 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 7 Apr 2015 16:21:31 +0800 Subject: [PATCH 0485/2517] =?UTF-8?q?20150407-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...7 10 Truly Amusing Easter Eggs in Linux.md | 154 +++++++++++++++++ ...Downloading Files and Browsing Websites.md | 156 ++++++++++++++++++ ...sessions using authentication on Quagga.md | 85 ++++++++++ 3 files changed, 395 insertions(+) create mode 100644 sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md create mode 100644 sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md create mode 100644 sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md diff --git a/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md b/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md new file mode 100644 index 0000000000..6d02c4cfbb --- /dev/null +++ b/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md @@ -0,0 +1,154 @@ +10 Truly Amusing Easter Eggs in Linux +================================================================================ +![](http://en.wikipedia.org/wiki/File:Adventure_Easteregg.PNG) +The programmer working on Adventure slipped a secret feature into the game. Instead of getting upset about it, Atari decided to give these sorts of “secret features” a name -- “Easter Eggs” because… you know… you hunt for them. Image credit: Wikipedia. + +Back in 1979, a video game was being developed for the Atari 2600 -- [Adventure][1]. + +The programmer working on Adventure slipped a secret feature into the game which, when the user moved an “invisible square” to a particular wall, allowed entry into a “secret room”. That room contained a simple phrase: “Created by [Warren Robinett][2]”. + +Atari had a policy against putting author credits in their games, so this intrepid programmer put his John Hancock on the game by being, well, sneaky. Atari only found out about the “secret room” after Warren Robinett had left the company. Instead of getting upset about it, Atari decided to give these sorts of “secret features” a name -- “Easter Eggs” because… you know… you hunt for them -- and declared that they would be putting more of these “Easter Eggs” in future games. + +This wasn’t the first such “hidden feature” built into a piece of software (that distinction goes to an operating system for the [PDP-10][3] from 1966, but this was the first time it was given a name. And it was the first time it really grabbed the attention of most computer users and gamers. + +Linux (and Linux related software) has not been left out. Some truly amusing Easter Eggs have been created for our beloved operating system over the years. Here are some of my personal favorites -- with how to achieve them. + +You’ll notice, rather quickly, that most of these are experienced via a terminal. That’s on purpose. Because terminals are cool. [I should also take this moment to say that if you try to run an application I list, and you do not have it installed, it will not work. You should install it first. Because… computers.] + +### Arch : Pac-Man in pacman ### + +We’re going to start with one just for the [Arch Linux][4] fans out there. You can add a [Pac-Man][5]-esque character to your progress bars in “[pacman][6]” (the Arch package manager). Why this isn’t enabled by default is beyond me. + +To do this you’ll want to edit “/etc/pacman.conf” in your favorite text editor. Under the “# Misc options” section, remove the “#” in front of “Color” and add the line “ILoveCandy”. Because Pac-Man loves candy. + +That’s it! Next time you fire up a terminal and run pacman, you’ll help the little yellow guy get some lunch (or at least some candy). + +### GNU Emacs : Tetris and such ### + +![emacs Tetris](http://www.linux.com/images/stories/41373/emacsTetris.jpg) +I don’t like emacs. Not even a little bit. But it does play Tetris. + +I have a confession to make: I don’t like [emacs][7]. Not even a little bit. + +Some things fill my heart with gladness. Some things take away all my sadness. Some things ease my troubles. That’s [not what emacs does][8]. + +But it does play Tetris. And that’s not nothing. Here’s how: + +Step 1) Launch emacs. (When in doubt, type “emacs”.) + +Step 2) Hit Escape then X on your keyboard. + +Step 3) Type “tetris” and hit Enter. + +Bored of Tetris? Try “pong”, “snake” and a whole host of other little games (and novelties). Take a look in “/usr/share/emacs/*/lisp/play” for the full list. + +### Animals Saying Things ### + +The Linux world has a long and glorious history of animals saying things in a terminal. Here are the ones that are the most important to know by heart. + +On a Debian-based distro? Try typing “apt-get moo". + +![apt-get moo](http://www.linux.com/images/stories/41373/AptGetMoo.jpg) +apt-get moo + +Simple, sure. But it’s a talking cow. So we like it. Then try “aptitude moo”. It will inform you that “There are no Easter Eggs in this program”. + +If there’s one thing you should know about [aptitude][9], it’s that it’s a dirty, filthy liar. If aptitude were wearing pants, the fire could be seen from space. Add a “-v” option to that same command. Keep adding more v’s until you force aptitude to come clean. + +![](http://www.linux.com/images/stories/41373/AptitudeMoo.jpg) +I think we can all agree, that this is probably the most important feature in aptitude. + +I think we can all agree, that this is probably the most important feature in aptitude. But what if you want to put your own words into the mouth of a cow? That’s where “cowsay” comes in. + +And, don’t let the name “cowsay” fool you. You can put words into so much more than just a cow. Like an elephant, Calvin, Beavis and even the Ghostbusters logo. Just do a “cowsay -l” from the terminal to get a complete list of options. + +![](http://www.linux.com/images/stories/41373/cowsay.jpg) +You can put words into so much more than just a cow. + +Want to get really tricky? You can pipe the output of other applications into cowsay. Try “fortune | cowsay”. Lots of fun can be had. + +### Sudo Insult Me Please ### + +Raise your hand if you’ve always wanted your computer to insult you when you do something wrong. Hell. I know I have. Try this: + +Type “sudo visudo” to open the “sudoers” file. In the top of that file you’ll likely see a few lines that start with “Defaults”. At the bottom of that list add “Defaults insults” and save the file. + +Now, whenever you mistype your sudo password, your system will lob insults at you. Confidence boosting phrases such as “Listen, burrito brains, I don’t have time to listen to this trash.”, “Are you on drugs?” and “You’re mind just hasn’t been the same since the electro-shocks, has it?”. + +This one has the side-effect of being a rather fun thing to set on a co-worker's computer. + +### Firefox is cheeky ### + +Here’s one that isn’t done from the Terminal! Huzzah! + +Open up Firefox. In the URL bar type “about:about”. That will give you a list of all of the “about” pages in Firefox. Nothing too fancy there, right? + +Now try “about:mozilla” and you’ll be greeted with a quote from the “[Book of Mozilla][10]” -- the holy book of web browsing. One of my other favorites, “about:robots”, is also quite excellent. + +![](http://www.linux.com/images/stories/41373/About-Mozilla550.jpg) +The “Book of Mozilla” -- the holy book of web browsing. + +### Carefully Crafted Calendar Concoctions ### + +Tired of the boring old [Gregorian Calendar][11]? Ready to mix things up a little bit? Try typing “ddate”. This will print the current date on the [Discordian Calendar][12]. You will be greeted by something that looks like this: + +“Today is Sweetmorn, the 18th day of Discord in the YOLD 3181” + +I hear what you’re saying, “But, this isn’t an Easter Egg!” Shush. I’ll call it an Easter Egg if I want to. + +### Instant l33t Hacker Mode ### + +Want to feel like you’re a super-hacker from a movie? Try setting nmap into “[Script Kiddie][13]” mode (by adding “-oS”) and all of the output will be rendered in the most 3l33t [h@x0r-y way][14] possible. + +Example: “nmap -oS - google.com” + +Do it. You know you want to. Angelina Jolie would be [super impressed][15]. + +### The lolcat Rainbow ### + +Having awesome Easter Eggs and goodies in your Linux terminal is fine and dandy… but what if you want it to have a little more… pizazz? Enter: lolcat. Take the text output of any program and pipe it through lolcat to super-duper-rainbow-ize it. + +![](http://www.linux.com/images/stories/41373/lolcat.jpg) +Take the text output of any program and pipe it through lolcat to super-duper-rainbow-ize it. + +### Cursor Chasing Critter ### + +![oneko cat](http://www.linux.com/images/stories/41373/onekocat.jpg) +“Oneko” -- the Linux port of the classic “Neko”. + +“Oneko” -- the Linux port of the classic “[Neko][16]”. +And that brings us to “oneko” -- the Linux port of the classic “Neko”. Basically a little cat that chases your cursor around the screen. + +While this may not qualify as an “Easter Egg” in the strictest sense of the word, it’s still fun. And it feels Easter Egg-y. + +You can also use different options (such as “oneko -dog”) to use a little dog instead of a cat and a few other tweaks and options. Lots of possibilities for annoying co-workers with this one. + +There you have it! A list of my favorite Linux Easter Eggs (and things of that ilk). Feel free to add your own favorite in the comments section below. Because this is the Internet. And you can do that sort of thing. + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/news/software/applications/820944-10-truly-amusing-linux-easter-eggs- + +作者:[Bryan Lunduke][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/56734 +[1]:http://en.wikipedia.org/wiki/Adventure_(Atari_2600) +[2]:http://en.wikipedia.org/wiki/Warren_Robinett +[3]:http://en.wikipedia.org/wiki/PDP-10 +[4]:http://en.wikipedia.org/wiki/Arch_Linux +[5]:http://en.wikipedia.org/wiki/Pac-Man +[6]:http://www.linux.com/news/software/applications/820944-10-truly-amusing-linux-easter-eggs-#Pacman +[7]:http://en.wikipedia.org/wiki/GNU_Emacs +[8]:https://www.youtube.com/watch?v=AQ4NAZPi2js +[9]:https://wiki.debian.org/Aptitude +[10]:http://en.wikipedia.org/wiki/The_Book_of_Mozilla +[11]:http://en.wikipedia.org/wiki/Gregorian_calendar +[12]:http://en.wikipedia.org/wiki/Discordian_calendar +[13]:http://nmap.org/book/output-formats-script-kiddie.html +[14]:http://nmap.org/book/output-formats-script-kiddie.html +[15]:https://www.youtube.com/watch?v=Ql1uLyuWra8 +[16]:http://en.wikipedia.org/wiki/Neko_%28computer_program%29 \ No newline at end of file diff --git a/sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md b/sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md new file mode 100644 index 0000000000..1bbc9e9928 --- /dev/null +++ b/sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md @@ -0,0 +1,156 @@ +5 Linux Command Line Based Tools for Downloading Files and Browsing Websites +================================================================================ +Linux command-line, the most adventurous and fascinating part of GNU/Linux is very cool and powerful tool. Command line itself is very productive and the availability of various inbuilt and third party command line application makes Linux robust and powerful. The Linux Shell supports a variety of web application of various kind be it torrent downloader, dedicated downloader or Internet Surfing. + +![Command Line Internet Tools](http://www.tecmint.com/wp-content/uploads/2014/02/Command-Line-Internet-Tools.jpg) +5 Command Line Internet Tools + +Here we are presenting 5 great command line Internet tools, which are very useful and proves to be very handy. + +### 1. rTorrent ### + +rTorrent is a text­-based Torrent Client which is written in C++ aimed at high performance. It is available for most of the standard Linux Distributions including FreeBSD and Mac OS X. + +#### Installation of rTorrent #### + + # apt­-get install rtorrent (on APT based System) + +---------- + + # yum install rtorrent (on YUM based System) + +Check if rtorrent is installed correctly by running the following command in the terminal. + + # rtorrent + +![Command line torrent download](http://www.tecmint.com/wp-content/uploads/2014/02/rTorrent.jpeg) +rTorrent Command Line Tool + +#### Functioning of rTorrent #### + +Some of the useful Key-bindings and their use. + +- CTRL+ q – Quit rTorrent Application +- CTRL+ s – Start Download +- CTRL+ d – Stop an active Download or Remove an already stopped Download. +- CTRL+ k – Stop and Close an active Download. +- CTRL+ r – Hash Check a torrent before Upload/Download Begins. +- CTRL+ q – When this key combination is executed twice, rTorrent shutdown without sending a stop Signal. +- Left Arrow Key – Redirect to Previous screen. +- Right Arrow Key – Redirect to Next Screen + +### 2. Wget ### + +Wget, is a part of GNU Project, the name is derived from World Wide Web (WWW). Wget is a brilliant tool which is useful for recursive download, offline viewing of HTML from local Server and is available for most of the platforms be it Windows, Mac, Linux. Wget makes it possible to download files over HTTP, HTTPS and FTP. Moreover it can be useful in mirroring the whole website as well as support for proxy browsing, pausing/resuming Downloads. + +#### Installation of Wget #### + +Wget being a GNU project comes bundled with Most of the Standard Linux Distributions and there is no need to download and install it separately. If in-case, it’s not installed by default, you can still install it using apt or yum. + + # apt­-get install wget (on APT based System) + +---------- + + # yum install wget (on YUM based System) + +#### Some Basic Usage of Wget #### + +Download a single file using wget. + + # wget http://www.website-name.com/file + +Download a whole website, recursively. + + # wget -r http://www.website-name.com + +Download specific type of file (say pdf and png) from a website. + + # wget -r -A png,pdf http://www.website-name.com + +Wget is a wonderful tool which enables custom and filtered download even on limited resource Machine. A screen shot of wget download, where we are mirroring a website (Yahoo.com). + +![Wget Download Files](http://www.tecmint.com/wp-content/uploads/2014/02/Wget.jpeg) +Wget Command Line File Download + +For more such wget download examples, read our article that shows [10 Wget Download Command Examples][1]. + +### 3. cURL ### + +cURL is a command line tool for transferring data over a number of protocols. cURL is a client side application which support protocols like FTP, HTTP, FTPS, TFTP, TELNET, IMAP, POP3, etc. cURL is a simple downloader which is different from wget in supporting LDAP, POP3 as compared to others. Moreover Proxy Downloading, pausing download, resuming download are well supported in cURL. + +#### Installation of cURL #### + +By default cURL is available in most of the distribution either in repository or installed. if it’s not installed, just do a apt or yum to get a required package from the repository. + + # apt­-get install curl (on APT based System) + +---------- + + # yum install curl (on YUM based System) + +Basic Usage of cURL + + # curl www.tecmint.com + +![Curl Download](http://www.tecmint.com/wp-content/uploads/2014/02/Curl.jpeg) +Curl Data Download + +![Curl Data Download](http://www.tecmint.com/wp-content/uploads/2014/02/Curl-2.jpeg) +Curl Download + +### 4. w3m ### + +The w3m is a text based web browser released under GPL. W3m support tables, frames, color, SSL connection and inline images. W3m is known for fast browsing. + +#### Installation of w3m #### + +Again w3m is available by default in most of the Linux Distribution. If incase, it is not available you can always apt or yum the required package. + + # apt­-get install w3m (on APT based System) + +---------- + + # yum install w3m (on YUM based System) + +#### Basic Usage of w3m #### + + # w3m www.tecmint.com + +![Command Line Browser](http://www.tecmint.com/wp-content/uploads/2014/02/w3m.jpeg) +w3m Text Based Web Browser + +### 5. Elinks ### + +Elinks is a free text-based web browser for Unix and Unix based System. Elinks support HTTP, HTTP Cookies and also support browsing script in Perl and Ruby. Tab based browsing is well supported. The best thing is that it supports Mouse, Display Colours and support a number of Protocols like HTTP, FTP, SMB, Ipv4 and Ipv6. + +#### Installation of Elinks #### + +By default elinks also available in most of the Linux distributions. If not, install it via apt or yum. + + # apt­-get install elinks (on APT based System) + +---------- + + # yum install elinks (on YUM based System) + +Basic Usage of Elinks + + # elinks www.tecmint.com + +![Command Line Internet Browsing](http://www.tecmint.com/wp-content/uploads/2014/02/Elinks.jpeg) +Elinks Command Line Web Browsing + +That’s all for now. I’ll be here again with an interesting article which you people will love to read. Till then stay tuned and connected to Tecmint and don’t forget to give your valuable feedback in comment section. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-command-line-tools-for-downloading-files/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file diff --git a/sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md b/sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md new file mode 100644 index 0000000000..020e2277cc --- /dev/null +++ b/sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md @@ -0,0 +1,85 @@ +How to secure BGP sessions using authentication on Quagga +================================================================================ +The BGP protocol runs over TCP, and as such, it inherits all the vulnerabilities of a TCP connection. For example, within a BGP session, an attacker may impersonate a legitimate BGP neighbor, and convince the BGP routers on the other end to share their routing information with the attacker. The problem occurs when the attacker advertises and injects bogus routes towards neighboring routers. The unsuspecting neighboring routers may then start sending live traffic towards the attacker, which in most cases goes nowhere and simply gets dropped. Back in 2008, YouTube actually [fell victim][1] to such BGP route poisoning, and suffered major outage on their video service for more than an hour. In a far worse case, if the attacker is savvy enough, they can falsely act as a transparent transit router and sniff the transit traffic for any sensitive data. As you can imagine, this can have far reaching consequences. + +To protect active BGP sessions against such attacks, many service providers leverage [MD5 checksum and a pre-shared key][2] for their BGP sessions. In a protected BGP session, a BGP router which sends a packet generates an MD5 hash value by using a pre-shared key, portions of the IP and TCP headers and the payload. The MD5 hash is then stored as a TCP option field. Upon receipt of the packet, a receiving router uses the same method to generate its version of the MD5 hash using a pre-shared key. It compares the hash with the one of the received packet to decide whether to accept the packet. For an attacker, it is almost impossible to guess the checksum or the key. For BGP routers, they can be assured that each packet is validated before its content is consumed. + +In this tutorial, we will see how we can secure a BGP session between two neighbors using MD5 checksum and a pre-shared key. + +### Preparation ### + +Securing a BGP session is fairly straightforward. We will use the following routers. + +注:表格 + + + + + + + + + + + + + + + + +
Router nameASIP address
router-A10010.10.12.1/30
router-B20010.10.12.2/30
+ +The stock Linux kernel supports TCP MD5 option natively for IPv4 and IPv6. Thus if you built Quagga router from a brand new [Linux box][3], TCP MD5 capability will be automatically available for Quagga. It'll be just a matter of configuring Quagga to take advantage of the capability. But if you are using a FreeBSD box or built a custom kernel for Quagga, make sure that you enable TCP MD5 support on the kernel (e.g., CONFIG_TCP_MD5SIG kernel option in Linux). + +### Configuring Router-A for Authentication ### + +We will use the CLI shell of Quagga to configure the routers. The only new command that we will use is 'password'. + + [root@router-a ~]# vtysh + router-a# conf t + router-a(config)# router bgp 100 + router-a(config-router)# network 192.168.100.0/24 + router-a(config-router)# neighbor 10.10.12.2 remote-as 200 + router-a(config-router)# neighbor 10.10.12.2 password xmodulo + +The pre-shared key in this example is 'xmodulo'. Obviously, in a production environment you need to select a strong key. + +**Note**: in Quagga, the 'service password-encryption’ command is supposed to encrypt all plain-text passwords (e.g., login password) in its configuration file. However, when I use this command, I notice that the pre-shared key in BGP configuration still remains in clear text. I am not sure whether it's a limitation of Quagga, or whether it's a version issue. + +### Configuring Router-B for Authentication ### + +We will configure router-B in a similar fashion. + + [root@router-b ~]# vtysh + router-b# conf t + router-b(config)# router bgp 200 + router-b(config-router)# network 192.168.200.0/24 + router-b(config-router)# neighbor 10.10.12.1 remote-as 100 + router-b(config-router)# neighbor 10.10.12.1 password xmodulo + +### Verifying a BGP session ### + +If everything has been configured correctly, the BGP session should be up, and both routers should be exchanging routes. At this point, every outgoing packet in a TCP session carries a MD5 digest of the packet contents and a secret key, and the digest is automatically validated by the other end point. + +We can verify the active BGP session by viewing BGP summary as usual. MD5 checksum verification occurs transparently within Quagga, so you don't see it at the BGP level. + +![](https://farm8.staticflickr.com/7621/16837774368_e9ff66b370_c.jpg) + +If you want to test BGP authentication, you can configure one neighbor without a password or deliberately use a wrong pre-shared key and see what happens. You can also use a packet sniffer like tcpdump or Wireshark to analyze the packets that go through the BGP session. For example, tcpdump with "-M " option will validate the MD5 digests found in TCP option field. + +To sum up, in this tutorial we demonstrate how we can easily secure the BGP session between two routers. The process is very straightforward compared to other protocols. It is always recommended to secure your BGP session, especially if you are setting up the BGP session with another AS. The pre-shared key should also be kept safe. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/bgp-authentication-quagga.html + +作者:[Sarmed Rahman][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://research.dyn.com/2008/02/pakistan-hijacks-youtube-1/ +[2]:http://tools.ietf.org/html/rfc2385 +[3]:http://xmodulo.com/centos-bgp-router-quagga.html \ No newline at end of file From cfa5100d44fdbfac0c53071bd0faa19df9ccac58 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 7 Apr 2015 16:35:16 +0800 Subject: [PATCH 0486/2517] [Translated]share/20150324 How to Install Telegram Messenger Application on Linux --- ...Telegram Messenger Application on Linux.md | 133 ------------------ ...Telegram Messenger Application on Linux.md | 132 +++++++++++++++++ 2 files changed, 132 insertions(+), 133 deletions(-) delete mode 100644 sources/share/20150324 How to Install Telegram Messenger Application on Linux.md create mode 100644 translated/share/20150324 How to Install Telegram Messenger Application on Linux.md diff --git a/sources/share/20150324 How to Install Telegram Messenger Application on Linux.md b/sources/share/20150324 How to Install Telegram Messenger Application on Linux.md deleted file mode 100644 index 6dc57e2005..0000000000 --- a/sources/share/20150324 How to Install Telegram Messenger Application on Linux.md +++ /dev/null @@ -1,133 +0,0 @@ -Translating by ictlyh -How to Install Telegram Messenger Application on Linux -================================================================================ -Telegram is an Instant Messaging (IM) application similar to whatsapp. It has a very large user base. It has a lot of features that differentiate it from other messaging application. - -![Install Telegram in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Install-Telegram-in-Linux.png) -Telegram Messenger for Linux - -This article aims at making you aware of telegram application followed by detailed installation instructions on Linux Box. - -#### Features of Telegram #### - -- Implementation for mobile devices -- Available for Desktop. -- Application Program Interface (API) of Telegram can be Accessed by third party developers. -- Available for Android, iphone/ipad, Windows Phone, Web-Version, PC, Mac and Linux -- The above application provides Heavily Encrypted and self destruct messages. -- Lets you access your message from multiple devices and platform. -- The overall processing and message delivery is lightening fast. -- Distributed server across the globe for security and speed. -- Open API and Free Protocol -- NoAds, No Subscription charge. – Free forever. -- Powerful – No limit to media and chats -- Several security measures that make it safe from Hackers. -- Reply to Specific message in group. Mention @username to notify multiple users in group. - -#### Why Telegram? #### - -When Applications like whatsapp and other IM are providing almost same things in bag, why should someone opt for Telegram? - -Well Availability of API to third party developer is enough to say. Moreover availability for PC which means you won’t have to struggle typing message using your mobile, but you can use your PC and that is pretty more than sufficient. - -Also The option to connect on remote locations, Co-ordinate – Group of upto 200 Members, Sync all your devices, Send – Documents of all kind, Encrypt message, Self destruction of message, Storage of Media in Cloud, Build own tool on freely available API and what not. - -**Testing Environment** - -We have used Debian GNU/Linux, x86_64 architecture to test it and the overall process went very smooth for us. Here what we did stepwise. - -### Installation of Telegram Messenger in Linux ### - -First go to the official Telegram site, and download Telegram source package ([tsetup.0.7.23.tar.xz][1]) for Linux system or you may use following wget command to download directly. - - # wget https://updates.tdesktop.com/tlinux/tsetup.0.7.23.tar.xz - -Once package has been downloaded, unpack the tarball and switch from current working directory to the extracted directory. - - # tar -xf tsetup.0.7.23.tar.xz - # cd Telegram/ - -Next, execute the binary file ‘Telegram’ from the command line as shown below. - - # ./Telegram - -1. The first Impression. Click “START MESSAGING”. - -![Start Messaging](http://www.tecmint.com/wp-content/uploads/2015/03/Start-Messaging.jpeg) -Start Messaging - -2. Enter Your phone Number. Click “NEXT”. If you have not registered for telegram before this, using the same number as entered above you will get a warning that you don’t have a telegram account yet. Click “Register Here”. - -![Signup for Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Register.png) -Signup for Telegram - -3. After submitting your phone number, telegram will send you a verification code, shortly. You need to Enter it. - -![Telegram Verification Code](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Verfication-Code.png) -Telegram Verification Code - -4. Enter your First_Name, Last_name and pics and click “SIGNUP”. - -![Enter Account Details](http://www.tecmint.com/wp-content/uploads/2015/03/Enter-Account-Details.jpeg) -Enter Account Details - -5. After account creation, I got this interface. Everything seems at its place, even when I am new to telegram Application. The interface is really simple. - -![Telegram Interface](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Interface.jpeg) -Telegram Interface - -6. Click Add a contact and Enter Their first_name, last_name and Phone number. Click create when done!. - -![Add New Telegram Contact](http://www.tecmint.com/wp-content/uploads/2015/03/Add-New-Telegram-Contact.png) -Add New Telegram Contact - -7. If the contact you added is not on telegram already, You get a warning message and telegram will acknowledge you when your contact joins telegram. - -![Telegram Contact Notification](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Contact-Notification.jpeg) -Telegram Contact Notification - -8. As soon as the contact joins telegram you get a message (pop-out like) that reads [YOUR_CONTACT] joined telegram. - -9. A formal chat window on Linux Machine. Nice experience… - -![Telegram Contact Join Message](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Contact-Join-Message.jpeg) -Telegram Contact Join Message - -10. At the same time, I’ve tried messaging from my android mobile device, the interface looks similar on both. - -![Telegram Mobile Interface](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Mobile-Interface.png) -Telegram Mobile Interface - -11. Telegram settings page. You have a lot of options to configure. - -![Telegram Settings](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Settings.png) -Telegram Settings - -12. About Telegram. - -![About Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/About-Telegram.jpeg) -About Telegram - -#### Less Interesting Points #### - -- Telegram usage protocol MTProto Mobile protocol. -- Released Initially for iPhone in the year 2013 (August 14).. -- People Behind this Amazing Project: Pavel and Nikolai Durov.. - -That’s all for now. I’ll be here again with another interesting article you will love to read. I take the pleasure on behalf of Tecmint to thank all our valuable readers and critics who made us stand where we are now through continuous self evolving process. Keep Connected! Keep Commenting. Share if you care for us. - -- [https://telegram.org/][2] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-telegram-in-linux/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:https://tdesktop.com/linux -[2]:https://telegram.org/ \ No newline at end of file diff --git a/translated/share/20150324 How to Install Telegram Messenger Application on Linux.md b/translated/share/20150324 How to Install Telegram Messenger Application on Linux.md new file mode 100644 index 0000000000..8721488444 --- /dev/null +++ b/translated/share/20150324 How to Install Telegram Messenger Application on Linux.md @@ -0,0 +1,132 @@ +如何在Linux上安装Telegram Messenger应用 +================================================================================ +Telegram是和whatsapp类似的及时通讯应用。它有一个非常庞大的用户群。它有很多能和其他通讯应用区分开来的特性。 + +![在Linux上安装Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/Install-Telegram-in-Linux.png) +Telegram Messenger for Linux + +这篇文章让你了解Telegram应用,以及在Linux Box上的详细安装命令。 + +#### Telegram的特性 #### + +- 支持移动设备 +- 有桌面版本 +- 第三方开发者可以访问Telegram的应用程序接口(API)。 +- 支持Android, iphone/ipad, Windows Phone, Web-Version, PC, Mac 和 Linux。 +- 以上应用支持重度加密和自销毁信息。 +- 可以让你从多种设备和平台查看你的信息。 +- 整体的处理和消息传送都非常快 +- 为了安全和效率,在全球有分布式服务器 +- 开放的API和自由协议 +- 没有广告,没有认购费用。-永久免费 +- 强大-没有媒体和聊天限制 +- 多种安全措施使其免受黑客侵害 +- 在群组中回复特定信息。使用@username提醒群组里的多个用户 + +#### 为什么使用Telegram? #### + +当像WhatsApp的和其他的及时通讯应用都提供了几乎同样的功能的情况下,为什么要选择Telegram? + +第三方开发者可以使用API这一点就足够了。更多PC的可用性意味着你不必再纠结在你的移动设备上打字,你可以使用你的PC,这样更具有可用性。 + +另外,支持连接远程地点,协作-多达200个成员的群组,在所有设备上同步,发送各种类型的文件,信息加密,自毁信息,在云上存储媒体,基于完全可用API构建自己的工具。 + +**测试环境** + +我们使用Debian GNU/Linux, x86_64结构测试,所有的步骤都非常顺利。以下是我们的详细步骤。 + +### 在Linux上安装Telegram Messenger ### + +首先去Telegram的官方网站,下载Linux系统版本的Telegram源码包([tsetup.0.7.23.tar.xz][1]),你也可以使用下面的wget命令直接下载。 + + # wget https://updates.tdesktop.com/tlinux/tsetup.0.7.23.tar.xz + +下载好安装包后,解压安装包,并从当前目录进入解压后的文件夹。 + + # tar -xf tsetup.0.7.23.tar.xz + # cd Telegram/ + +然后,如下所示,在命令行中执行二进制文件‘Telegram’. + + # ./Telegram + +1. 第一个界面, 点击 “START MESSAGING”. + +![开始安装](http://www.tecmint.com/wp-content/uploads/2015/03/Start-Messaging.jpeg) +开始安装 + +2. 输入你的手机号码,点击"Next"。如果在这之前你没有注册过Telegram,使用和之前输入相同的号码你会看到警告说你还没有Telegram账户。点击“Register Here”。 + +![注册Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Register.png) +注册Telegram + +3. 提交你的手机号码之后,Telegram很快会给你发送一个验证码。你需要输入它。 + +![Telegram验证码](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Verfication-Code.png) +Telegram验证码 + +4. 输入你的姓名,昵称并点击“SIGNUP”. + +![输入账户详细信息](http://www.tecmint.com/wp-content/uploads/2015/03/Enter-Account-Details.jpeg) +输入账户详细信息 + +5. 新建账户之后,我看到这个界面。一切准备就绪,尽管我是Telegram的新用户。这个界面真的很简洁。 + +![Telegram界面](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Interface.jpeg) +Telegram界面 + +6. 点击新建联系人,输入他们的姓名和手机号码,完成后点击新建。 + +![新建Telegram联系人](http://www.tecmint.com/wp-content/uploads/2015/03/Add-New-Telegram-Contact.png) +新建Telegram联系人 + +7. 如果Telegram中还没有你输入的联系人,你会收到一个提示信息,当这个联系人加入Telegram的时候Telegram会通知你。 + +![Telegram联系人提示](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Contact-Notification.jpeg) +Telegram联系人提示 + +8. 当联系人加入Telegram的时候,你会收到信息(类似弹出提示)显示[YOUR_CONTACT]加入了Telegram。 + +9. 在Linux系统上正式的聊天窗口。 很好的体验… + +![联系人加入Telegram消息](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Contact-Join-Message.jpeg) +联系人加入Telegram消息 + +10. 同时,我试着在我的Android移动设备上发送信息,两者之间界面非常相似。 + +![移动版Telegram界面](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Mobile-Interface.png) +移动版Telegram界面 + +11. Telegram设置页面. 你有很多可以配置的选项. + +![设置Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Settings.png) +设置Telegram + +12. 关于Telegram. + +![关于Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/About-Telegram.jpeg) +关于Telegram + +#### 有趣的几点 #### + +- Telegram使用MTProto移动协议 +- 一开始在2013年(8月14号)发布iPhone版 +- 惊人项目背后的人物:Pavel and Nikolai Durov.. + +就是这些了。我还会有你喜欢阅读的其它有趣的文章。很高兴能代表Tecmint感谢我们尊贵的读者以及使得我们通过不断的自我进步走到这里的批评者。保持联系!继续评论。如果你关注我们就请和我们分享吧。 + +- [https://telegram.org/][2] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-telegram-in-linux/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:https://tdesktop.com/linux +[2]:https://telegram.org/ \ No newline at end of file From 65ccfcb8dbfd18d77addd72fcaca8c5e8a3ba9ee Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 7 Apr 2015 16:36:59 +0800 Subject: [PATCH 0487/2517] =?UTF-8?q?20150407-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...terview with Git Creator Linus Torvalds.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md diff --git a/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md b/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md new file mode 100644 index 0000000000..d9a2776850 --- /dev/null +++ b/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md @@ -0,0 +1,133 @@ +10 Years of Git: An Interview with Git Creator Linus Torvalds +================================================================================ +> Linus Torvalds explains why he created Git +> +> ![](http://www.linuxveda.com/wp-content/uploads/2014/10/Linus_Torvalds.jpg) +> +> Thanks to Linus' Git today GitHub is the world's biggest code hoster in the world with over 9 million users and over 21.1 million repositories. +> +> By Swapnil Bhartiya - +> +> Git will be celebrating it’s 10 anniversary this month. It’s yet another contribution of Linus Torvalds to the world in addition to Sub Surface and Linux. [Jennifer Cloer of The Linux Foundation interviewed the father of Linux][2] and presented us with a very comprehensive story behind Git. +> +> When Cloer asked Linus why he created Git, his answer was: +> +> “I really never wanted to do source control management at all and felt that it was just about the least interesting thing in the computing world (with the possible exception of databases ;^), and I hated all SCM’s with a passion.” +> +> He then played with BitKeeper which he initially liked as in his own words: +> +> “BK got most things right and having a local copy of the repository and distributed merging was a big deal.” +> +> But he was not satisfied: +> +> “I had performance requirements that were not even remotely satisfied by what was available, and I also worried about integrity of the code and the whole workflow, so I ended up just deciding to write my own.” +> +> And the rest is history. Today GitHub is the world’s biggest code hoster in the world with over 9 million users and over 21.1 million repositories. +> +> via:http://www.linuxveda.com/2015/04/06/linus-torvalds-explains-why-he-created-git/ + +![](http://www.linux.com/images/stories/714/Linus-Torvalds-LinuxCon-Europe-2014.jpg) + +Ten years ago this week, the Linux kernel community faced a daunting challenge: They could no longer use their revision control system BitKeeper and no other Software Configuration Management (SCMs) met their needs for a distributed system. Linus Torvalds, the creator of Linux, took the challenge into his own hands and disappeared over the weekend to emerge the following week with Git. Today Git is used for thousands of projects and has ushered in a new level of social coding among programmers. + +To celebrate this milestone, we asked Linus to share the behind-the-scenes story of Git and tell us what he thinks of the project and its impact on software development. You'll find his comments in the story below. We'll follow this Q&A with a week of Git in which we profile a different project each day that is using the revision control system. Look for the stories behind KVM, Qt, Drupal, Puppet and Wine, among others. + +### Why did you create Git? ### + +**Torvalds**: I really never wanted to do source control management at all and felt that it was just about the least interesting thing in the computing world (with the possible exception of databases ;^), and I hated all SCM's with a passion. But then BitKeeper came along and really changed the way I viewed source control. BK got most things right and having a local copy of the repository and distributed merging was a big deal. The big thing about distributed source control is that it makes one of the main issues with SCM's go away - the politics around "who can make changes." BK showed that you can avoid that by just giving everybody their own source repository. But BK had its own problems, too; there were a few technical choices that caused problems (renames were painful), but the biggest downside was the fact that since it wasn't open source, there was a lot of people who didn't want to use it. So while we ended up having several core maintainers use BK - it was free to use for open source projects - it never got ubiquitous. So it helped kernel development, but there were still pain points. + +That then came to a head when Tridge (Andrew Tridgell) started reverse-engineering the (fairly simply) BK protocol, which was against the usage rules for BK. I spent a few weeks (months? It felt that way) trying to mediate between Tridge and Larry McVoy, but in the end it clearly wasn't working. So at some point I decided that I can't continue using BK, but that I really didn't want to go back to the bad old pre-BK days. Sadly, at the time, while there were some other SCM's that kind of tried to get the whole distributed thing, none of them did it remotely well. I had performance requirements that were not even remotely satisfied by what was available, and I also worried about integrity of the code and the whole workflow, so I ended up just deciding to write my own. + +### How did you approach it? Did you stay up all weekend to write it or was it just during regular hours? ### + +**Torvalds**: Heh. You can actually see how it all took shape in the git source code repository, except for the very first day or so. It took about a day to get to be "self-hosting" so that I could start committing things into git using git itself, so the first day or so is hidden, but everything else is there. The work was clearly mostly during the day, but there's a few midnight entries and a couple of 2 a.m. ones. The most interesting part is how quickly it took shape ; the very first commit in the git tree is not a lot of code, but it already did the basics - enough to commit itself. The trick wasn't really so much the coding but coming up with how it organizes the data. + +So I'd like to stress that while it really came together in just about ten days or so (at which point I did my first *kernel* commit using git), it wasn't like it was some kind of mad dash of coding. The actual amount of that early code is actually fairly small, it all depended on getting the basic ideas right. And that I had been mulling over for a while before the whole project started. I'd seen the problems others had. I'd seen what I wanted to avoid doing. + +### Has it lived up to your expectations? How is it working today in your estimation? Are there any limitations? ### + +**Torvalds**: I'm very happy with git. It works remarkably well for the kernel and is still meeting all my expectations. What I find interesting is how it took over so many other projects, too. Surprisingly quickly, in the end. There is a lot of inertia in switching source control systems; just look at how long CVS and even RCS have stayed around, but at some point git just took over. + +### Why do you think it's been so widely adopted? ### + +**Torvalds**: I think that many others had been frustrated by all the same issues that made me hate SCM's, and while there have been many projects that tried to fix one or two small corner cases that drove people wild, there really hadn't been anything like git that really ended up taking on the big problems head on. Even when people don't realize how important that "distributed" part was (and a lot of people were fighting it), once they figure out that it allows those easy and reliable backups, and allows people to make their own private test repositories without having to worry about the politics of having write access to some central repository, they'll never go back. + +### Does Git last forever, or do you foresee another revision control system in another 10 years? Will you be the one to write it? ### + +**Torvalds**: I'm not going to be the one writing it, no. And maybe we'll see something new in ten years, but I guarantee that it will be pretty "git-like." It's not like git got everything right, but it got all the really basic issues right in a way that no other SCM had ever done before. + +No false modesty ;) + +### Why does Git work so well for Linux? ### + +**Torvalds**: Well, it was obviously designed for our workflow, so that is part of it. I've already mentioned the whole "distributed" part many times, but it bears repeating. But it was also designed to be efficient enough for a biggish project like Linux, and it was designed to do things that people considered "hard" before git - because those are the things *I* do every day. + +Just to pick an example: the concept of "merging" was generally considered to be something really quite painful and hard in most SCM's. You'd plan your merges, because they were big deals. That's not acceptable to me, since I commonly do tens of merges a day when in the merge window, and even then, the biggest overhead shouldn't be the merge itself, it should be testing the result. The "git" part of the merge is just a couple of seconds, it should take me much longer just to write the merge explanation message. + +So git was basically designed and written for my requirements, and it shows. + +### People have said that Git is only for super smart people. Even Andrew Morton said Git is "expressly designed to make you feel less intelligent than you thought you were." What's your response to this? ### + +**Torvalds**: So I think it used to be true but isn't any more. There is a few reasons people feel that way, but I think only one of them remains. The one that remains is fairly simple: "you can do things so many ways." + +You can do a lot of things with git, and many of the rules of what you *should* do are not so much technical limitations but are about what works well when working together with other people. So git is a very powerful set of tools, and that can not only be overwhelming at first, it also means that you can often do the same (or similar) things different ways, and they all "work." Generally, the best way to learn git is probably to first only do very basic things and not even look at some of the things you can do until you are familiar and confident about the basics. + +There's a few historical reasons for why git was considered complicated. One of them is that it was complicated. The people who started using git very early on in order to work on the kernel really had to learn a very rough set of scripts to make everything work. All the effort had been on making the core technology work and very little on making it easy or obvious. So git (deservedly) had a reputation for requiring you to know exactly what you did early on. But that was mainly true for the first 6 months or a year. + +The other big reason people thought git was hard is that git is very different. There are people who used things like CVS for a decade or two, and git is not CVS. Not even close. The concepts are different. The commands are different. Git never even really tried to look like CVS, quite the reverse. And if you've used a CVS-like system for a long time, that makes git appear complicated and needlessly different. People were put off by the odd revision numbers. Why is a git revision not "1.3.1" with nice incrementing numbers like it was in CVS? Why is it that odd scary 40-character HEX number? + +But git wasn't "needlessly different." The differences are required. It's just that it made some people really think it was more complicated than it is, because they came from a very different background. The "CVS background" thing is going away. By now there are probably lots of programmers out there who have never used CVS in their lives and would find the CVS way of doing things very confusing, because they learned git first. + +### Do you think the rate of Linux kernel development would have been able to grow at its current rate without Git? Why or why not? ### + +**Torvalds**: Well, "without git," sure. But it would have required that somebody else wrote something git-equivalent: a distributed SCM that is as efficient as git is. We definitely needed something *like* git. + +### What's your latest opinion of GitHub? ### + +**Torvalds**: Github is an excellent hosting service; I have nothing against it at all. Now, the complaints I've had is that GitHub as a development platform - making commits, pull requests, keeping track of issues etc - doesn't work very well at all. It's not even close, not for something like the kernel. It's much too limited. + +That's partly because of how the kernel is developed, but part of it was that the GitHub interfaces were actively encouraging bad behavior. Commits done on GitHub had bad commit messages etc, because the web interfaces at GitHub were actively encouraging bad behavior. They did fix some of that, so it probably works better, but it will never be appropriate for something like the Linux kernel. + +### What is the most interesting use you've seen for Git and/or GitHub? ### + +**Torvalds**: I'm just happy that it made it so easy to start a new project. Project hosting used to be painful, and with git and GitHub it's just so trivial to do a random small project. It doesn't matter what the project is; what matters is that you can do it. + +### Do you have side projects up your sleeve today? Any more brilliant software projects that will dominate software development for years to come? ### + +**Torvalds**: Nothing planned. But I'll let you know if that changes. + +Atlassian is also helping to celebrate the anniversary of Git. Click on the image below to [take a walk down memory lane][1]. + +![](http://www.linux.com/images/stories/714/AtlassianGit10year.jpg) + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/news/featured-blogs/185-jennifer-cloer/821541-10-years-of-git-an-interview-with-git-creator-linus-torvalds + +作者:[Jennifer Cloer][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/714/catid/185-jennifer-cloer +[1]:https://www.atlassian.com/git/articles/10-years-of-git/ +[2]:http://www.linux.com/news/featured-blogs/185-jennifer-cloer/821541-10-years-of-git-an-interview-with-git-creator-linus-torvalds +[3]: +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: \ No newline at end of file From 2f6a8c3fd82fb3d460b25205acad290dbb0a57b8 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 7 Apr 2015 16:59:02 +0800 Subject: [PATCH 0488/2517] Finish the translation by ZTinoZ --- ...t Open Source Code Repository in github.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {sources => translated}/tech/20150324 How to Host Open Source Code Repository in github.md (69%) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/translated/tech/20150324 How to Host Open Source Code Repository in github.md similarity index 69% rename from sources/tech/20150324 How to Host Open Source Code Repository in github.md rename to translated/tech/20150324 How to Host Open Source Code Repository in github.md index e9ff764434..d382f9cd64 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/translated/tech/20150324 How to Host Open Source Code Repository in github.md @@ -38,40 +38,40 @@ ### 3. 上传一个已有项目 ### -如果我们想在Github上分享我们的项目,我们自然要把代码推上我们创建的库中。想要这样的话,我们首先要在我们的Linux机器上安装git。如果As I am running Ubuntu 14.04 LTS in my machine, I'll need to run **apt** manger to install it. +如果我们想在Github上分享我们的项目,我们自然要把代码推上我们创建的库中。想要这样的话,我们首先要在我们的Linux机器上安装git。如果我在机器上运行的是Ubuntu 14.04 LTS,我需要运行**apt**工具来安装它。 $ sudo apt-get install git ![installing git](http://blog.linoxide.com/wp-content/uploads/2015/03/install-git.png) -Now, as git is ready, we are now ready to upload the codes. +现在git已经准备就绪,我们要上传代码了。 -**Note**: To avoid errors, do not initialize the new repository with **README**, license, or gitignore files. You can add these files after your project has been pushed to GitHub. +**注意**:为了避免错误,不要用**README**文件、许可证或gitignore文件来初始化新库,你可以在项目推送到Github上之后再添加它们。 -In Terminal, we'll need to change the current working directory to your local project then initialize the local directory as a Git repository/ +在终端上,我们需要把当前工作目录更改为你的本地项目,然后将本地目录初始化为Git库。 $ git init -We'll then add the files in our new local repository. This stages them for the first commit. +接着我们在我们的新的本地库里添加的文件来作为我们的首次提交内容。 $ git add . -Now, we'll need to commit the files that we've staged in our local repository. +现在我们就提交我们在本地库所添加的文件。 $ git commit -m 'First commit' ![git commit](http://blog.linoxide.com/wp-content/uploads/2015/03/git-commit.png) -In Terminal, we'll add the URL for the remote repository where our local repostory will be pushed. +在终端上,我们要给远程库添加URL地址,用于以后我们能提交我们本地的库。 $ git remote add origin remote Repository url $ git remote -v ![adding remote url](http://blog.linoxide.com/wp-content/uploads/2015/03/adding-remote-url.png) -Note: Please do replace remote Repository url to the url of the remote repo. +注意:请确保将远程库的URL替换成了自己的远程库的URL。 -Now, to push the changes in our local repository to GitHub's repo we'll need to run as below and enter the required credential for the repository. +现在,要将我们的本地库提交至GitHub版本库中,我们需要运行一下命令并且输入所需的用户名和密码。 $ git push origin master @@ -79,17 +79,17 @@ Now, to push the changes in our local repository to GitHub's repo we'll need to ### 克隆一个库 ### -If we want to download a code repository from github straight to our local drives with a single command then, we can simply use git clone command which will clone the current directory to the remote repository. +如果我们想用一条简单地命令从github上下载代码库至本机上,我们可以用git clone命令,该命令将会从远程库中克隆最新的目录。 $ git clone https://github.com/aruntechgeek/linspeed.git ![cloning repo](http://blog.linoxide.com/wp-content/uploads/2015/03/cloning-repo.png) -Please change the above url to the repository you want to clone from. +请把以上这条URL地址更改成你想要克隆的地址。 ### 更新改动 ### -If we made changes to our code and want to push them to our remote repository then after changing the changes, we should run the following commands inside that directory. +如果我们对我们的代码做了更改并想把它们提交至我们的远程库中,我们应该在该目录下运行以下命令。 $ git add . $ git commit -m "Updating" @@ -97,7 +97,7 @@ If we made changes to our code and want to push them to our remote repository th ### 结论 ### -Hurray! We have successfully hosted our Project Source Code in Github repository. Github is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Millions of awesome Open Source projects are hosted in github. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Github :-) +啊哈!我们已经成功地管理我们在Github库中的项目源代码了。快速灵活的Github基于web的托管服务,分布式修改控制系统使用起来方便容易。数百万个非常棒的开源项目驻扎在github上。所以,如果你有任何问题、建议或反馈,请在评论中告诉我们。谢谢大家!好好享受吧 :-) -------------------------------------------------------------------------------- From a2a38fcaf6055dd5234fb8c5323f5bcdb6747b1d Mon Sep 17 00:00:00 2001 From: Vic___ Date: Tue, 7 Apr 2015 17:03:03 +0800 Subject: [PATCH 0489/2517] translated --- ...to Process Management Commands in Linux.md | 120 +++++++++--------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/sources/tech/20150326 A Peep into Process Management Commands in Linux.md b/sources/tech/20150326 A Peep into Process Management Commands in Linux.md index e1df53bab5..f8c92f871d 100644 --- a/sources/tech/20150326 A Peep into Process Management Commands in Linux.md +++ b/sources/tech/20150326 A Peep into Process Management Commands in Linux.md @@ -1,92 +1,92 @@ - Vic020 - -A Peep into Process Management Commands in Linux +12个进程管理命令 ================================================================================ -A program in execution is called a process. While a program is an executable file present in storage and is passive, a process is a dynamic entity comprising of allocated system resources, memory, security attributes and has a state associated with it. There can be multiple processes associated with the same program and operating simultaneously without interfering with each other. The operating system efficiently manages and keeps track of all the processes running in the system. +每个程序在执行时叫进程。当程序是在存储中是可执行文件并且运行的时候,每个进程会被动态得分配系统资源,内存,安全属性和与之相关的状态。可以有多个进程关联同一个程序,并同时执行不会互相干扰。操作系统会有效地管理和追踪所有运行着的进程。 -In order to manage these processes, user should be able to +为了管理这些进程,用户应该能够: -- See all the processes that are running -- View the system resources consumed by the processes -- Locate a particular process and take specific action on it -- Change the priority levels associated with processes -- Kill the required processes -- Restrict the system resources available to processes etc. +- 查看所有运行中的进程 +- 查看进程消耗资源 +- 定位个别进程并且可以执行指定动作 +- 改变进程的优先级 +- 杀死指定进程 +- 限制进程的有效系统资源 +- 等 -Linux offers many commands to the user to effectively handle the above mentioned scenarios. Let's understand them one by one. +Linux提供了许多命令给用户来高效掌控上述的操作。接下来,一个一个的来讲解下。 ### 1. ps ### -'ps' is one of the basic commands in Linux to view the processes on the system. It lists the running processes in a system along with other details such as process id, command, cpu usage, memory usage etc. Some of the following options come handy to get more useful information +'ps'是最基础浏览系统中的进程的命令。能列出系统中运行的进程,包括进程号,命令,CPU使用量,内存使用量等。下述选项可以得到更多有用的消息。 - ps -a - List all the running / active processes + ps -a - 列出所有运行中/激活进程 ![Output of "ps -a" command](http://blog.linoxide.com/wp-content/uploads/2015/02/ps-a2.png) - ps -ef |grep - List only the required process + ps -ef |grep - 列出需要进程 - ps -aux - Displays processes including those with no terminals(x) Output is user oriented (u) with fields like USER, PID, %CPU, %MEM etc + ps -aux - 展示进程包括、终端(x)和用户(u)信息,如USER, PID, %CPU, %MEM等 ### 2. pstree ### -In Linux, every process gets spawned by its parent process. This command helps visualize the processes by displaying a tree diagram of the processes showing the relationship between them. If a pid is mentioned, the root of the tree will be the pid. Else it will be rooted at init. +linux中,每一个进程都是由父进程创建的。此命令帮助可视化进程,通过显示进程树状图表展示进程间关系。如果使用pid了,那么树的根是pid。不然将会是init。 ![pstree](http://blog.linoxide.com/wp-content/uploads/2015/02/pstree.png) ### 3. top ### -'top' is a very useful command to monitor the system as it shows the system resources used by different processes. It gives a snapshot of the situation that the system is currently in. Its output includes data like process identification number(PID), user of the process, nice value, %CPU and %memory currently consumed by the process etc. One can use this output to figure out which process is hogging the CPU or memory. +‘top’是一个更加有用的命令,通过不同的进程所使用的资源可以监视系统。它提供实时的系统状态信息。显示进程的数据包括PID,进程用户,优先值,%CPU,%memory等。可以使用这些显示指示出资源使用量。 ![top](http://blog.linoxide.com/wp-content/uploads/2015/02/top.png) ### 4. htop ### -htop is similar to top, but is an interactive text mode process viewer. It displays the per CPU usage and memory, swap usage using a text graph. One can use the Up/Down arrow key to select processes, F7 and F8 to change the priority and F9 to kill a process. It is not present by default in the system and need to be installed explicitly. +htop与top很类似,但是htop是交互式的模式进程查看器。它通过文字图像显示每一个CPU和内存使用量、swap使用量。上下键选择进程,F7和F8改变优先级,F9杀死进程。Htop不是系统默认,所以需要额外安装。 ![htop output](http://blog.linoxide.com/wp-content/uploads/2015/03/htop1.png) ### 5. nice ### -With the help of nice command, users can set or change the priorities of processes in Linux. Higher the priority of a process, more is the CPU time allocated by the kernel for it. By default, a process gets launched with priority 0. Process priority can be viewed using the top command output under the NI (nice value) column. +通过nice命令的帮助,用户可以设置和改变进程的优先级。提高一个进程的优先级,内核会分配更多CPU时间片给这个进程。默认情况下,进程以0的优先级启动。进程优先级可以通过top命令显示的NI(nice value)列查看。 -Values of process priority range from -20 to 19. Lower the nice value, higher the priority. +进程优先级值的范围从-20到19。值越低,越优先。 - nice - starts the process by setting its priority to the given value + nice <优先值> <进程名> - 通过给定的优先值启动一个程序 ![nice command](http://blog.linoxide.com/wp-content/uploads/2015/02/nice-cmd.png) ![changed nice value of 'top'](http://blog.linoxide.com/wp-content/uploads/2015/02/top-nice.png) -In the above example, 'top' gets launched with a priority -3. +上述命令例子,可以看到‘top’命令获得了-3的优先值。 ### 6. renice ### -It is similar to nice command. Use this command to change the priority of an already running process. Please note that users can change the priority of only the processes that they own. +renice命令类似nice命令。使用这个命令可以改变正在运行的进程优先值。注意,用户只能改变属于他们的进程的优先值。 - renice -n -p - change the priority of the given process + renice -n -p - 改变指定进程的优先值 ![renice command](http://blog.linoxide.com/wp-content/uploads/2015/02/renice2.png) -Priority of process with id 3806 which had an initial priority of 0 is now changed to priority 4. +优先值初始化为0的3806号进程优先值已经变成了4. + + renice -u -g - 通过指定用户和组来改变进程优先值 - renice -u -g - change the priority of processes owned by the given user and group ![output of renice for a user group](http://blog.linoxide.com/wp-content/uploads/2015/02/renice1.png) -In the above example, priority of all processes owned by user 'mint' get changed to '-3' +上述例子中,用户为‘mint’的所有进程优先值变为‘-3’。 ### 7. kill ### -This is a command used to terminate processes by sending signals. If a process is not responding to kill command, then it can be forcefully killed using the kill -9 command. But this needs to be used carefully as it does not give a chance for the process to clean up and might end up in corrupted files. If we are not aware of the PID of the process to be killed or want to mention the process name to be killed, then killall comes to rescue. +这个命令通过发送信号结束进程。如果一个进程没有响应杀死命令,这也许就需要强制杀死,使用-9参数来执行。注意,使用强制杀死的时候一定要小心,因为没有机会确定是否写入完成、是否结束等。如果我们不知道进程PID或者打算用名字杀死进程时候,killall就能派上用场。 kill kill -9 - killall -9 - kill all instances having the same process name + killall -9 - 杀死所有拥有同样名字的进程 -If you use kill, you need to know the process id of the process to be killed. pkill is a similar command but can be used to kill processes using a pattern, i.e. process name, process owner etc. +如果你使用kill,你需要知道进程ID号。pkill是类似的命令但只需要一个模式,如果进程名,进程拥有者等 - pkill + pkill <进程名> ![kill initiated](http://blog.linoxide.com/wp-content/uploads/2015/02/kill-initiated.png) @@ -94,71 +94,71 @@ If you use kill, you need to know the process id of the process to be killed. ### 8. ulimit ### -Command useful in controlling the system-wide resources available to the shells and processes. Mostly useful for system administrators to manage systems that are heavily used and have performance problems. Limiting the resources ensures that important processes continue to run while other processes do not consume more resources. +命令在控制系统资源在shell和进程上的分配量。对于系统管理员是最有用的,可以管理系统倾向和性能问题。限制资源大小可以确保重要进程持续运行,其他进程不会占用过多资源。 - ulimit -a - Displays the current limits associated with the current user. + ulimit -a - 显示当前用户关联的资源限制 ![ulimit -a](http://blog.linoxide.com/wp-content/uploads/2015/02/ulimit-a.png) - -f - maximum file size + -f - 最大文件大小 - -v - maximum virtual memory size (in KB) + -v - 最大虚拟内存大小(KB) - -n - maximum file descriptor plus 1 + -n - 最大文件描述符加1 - -H : To change and report the hard limit + -H : 改变和报告硬限制 - -S : To change and report the soft limit + -S : 改变和报告软限制 -Check out the ulimit man page for more options. +浏览ulimit man页面获取更多选项。 ### 9. w ### -w gives us information about the users who have currently logged in and the processes that they are running. The header details displayed contain information like current time, how long the system has been running, total number of users logged in, load average of the system for the last 1, 5 and 15 minutes +w提供正确登录的用户和其执行的进程的信息。显示信息头包含信息像现在时间,系统运行时长,登录用户总数,过去1,5,15分钟负载均衡数。 -Based on the user information, one can take care before terminating any processes that do not belong to them. +基于这些用户信息,用户可以在终止进程前查看不属于他们的进程。 !['w' command](http://blog.linoxide.com/wp-content/uploads/2015/02/w.png) -**who** is a related command and gives a list of currently logged in users, time of last system boot, current run levels etc. +**who**是类似命令,提供列表,包含当前登录用户,系统启动时间,运行级别等。 !['who' command](http://blog.linoxide.com/wp-content/uploads/2015/02/who.png) -**whoami** command prints the username of the current user ID +**whoami** 命令输出当前用户ID !['whoami' command](http://blog.linoxide.com/wp-content/uploads/2015/02/whoami.png) ### 10. pgrep ### -pgrep stands for "Process-ID Global Regular Expression Print". It scans the currently running processes and lists the process IDs that match the selection criteria mentioned on command line to stdout. Useful for retrieving the process id of a process by using its name. +pgrep为"进程号全局正则匹配打印"。命令扫描当前运行进程,然后列出选择标准匹配出的进程ID到标准输出。对于通过名字检索进程号是很有用。 pgrep -u mint sh -This command will display the process ID for the process named 'sh' and owned by user 'mint' +这个命令将会显示用户为‘mint’和进程名为‘sh’的进程ID。 ![output of pgrep](http://blog.linoxide.com/wp-content/uploads/2015/03/pgrep.png) ### 11. fg , bg ### -Sometimes, the commands that we execute take a long time to complete. In such situations, we can push the jobs to be executed in the background using 'bg' command and can be brought to the foreground with the 'fg' command. +有时,命令需要很长的时间才能执行完成。对于这种情况,我们使用‘bg’命令可以将任务放在后台执行,而是用‘fg’可以调到前台来使用。 -We can start a program in background by using the '&' : +通过‘&’,我们后台启动一个程序: find . -name *iso > /tmp/res.txt & -A program that is already running can also be sent to the background using 'CTRL+Z' and 'bg' command: +一个正在运行的程序也可以通过“CTRL+Z”和“bg”命令组合放到后台运行。 - find . -name *iso > /tmp/res.txt & - start the job in the background + find . -name *iso > /tmp/res.txt & - 启动一个程序 - ctrl+z - suspend the currently executing foreground job + ctrl+z - 挂起当前执行程序 - bg - push the command execution to background + bg - 将程序发送到后台运行 -We can list all the background processes using 'jobs' command +我们可以使用‘jobs’命令列出所有后台进程。 jobs -We can bring back a background process to foreground using the 'fg' command. +使用‘fg’命令可以将后台程序调到前台执行。 fg % @@ -166,26 +166,26 @@ We can bring back a background process to foreground using the 'fg' command. ### 12. ipcs ### -ipcs command is used for listing the inter-process communication facilities (shared memory, semaphores and message queues). +ipcs命令报告进程间通信设施状态。(共享内存,信号量和消息队列) -This command with -p option can be combined with options -m, -s or-q to display the process id which recently accessed the corresponding ipc facility. +用-p参数联合-m、-s或-q使用,可以获得相关的进程间通信的进程ID。 ipcs -p -m -The screen shot below is listing the creator id and process id which accessed the shared memory recently. +下面屏幕截图列出了共享内存段的创建者ID和进程ID。 ![ipcs command](http://blog.linoxide.com/wp-content/uploads/2015/03/ipcs.png) -### Conclusion ### +### 总结 ### -Generally, it is considered the job of administrators to fix problems and tweak the system to improve the performance. But users also need to deal with processes in Linux quite often. Hence, it is essential to familiarise ourselves with the various commands available to manage them effectively. +总之 ,这些命令可以帮助管理员修复问题和改善性能。同样作为一名普通用户也需要解决进程间出现的问题。所以,熟悉如此繁多的命令,从能有效管理进程是行之有效。 -------------------------------------------------------------------------------- via: http://linoxide.com/linux-command/process-management-commands-linux/ 作者:[B N Poornima][a] -译者:[译者ID](https://github.com/译者ID) +译者:[VicYu/Vic020](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f9400261f0439d1a4c54ade5097989403a075284 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Tue, 7 Apr 2015 17:03:40 +0800 Subject: [PATCH 0490/2517] Moved --- .../20150326 A Peep into Process Management Commands in Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150326 A Peep into Process Management Commands in Linux.md (100%) diff --git a/sources/tech/20150326 A Peep into Process Management Commands in Linux.md b/translated/tech/20150326 A Peep into Process Management Commands in Linux.md similarity index 100% rename from sources/tech/20150326 A Peep into Process Management Commands in Linux.md rename to translated/tech/20150326 A Peep into Process Management Commands in Linux.md From f995c59c32b45d61b3c9baac89295296cd935b83 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 7 Apr 2015 22:38:22 +0800 Subject: [PATCH 0491/2517] PUB:20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu @geekpi --- ...ough Free Disk Space On boot' In Ubuntu.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md (54%) diff --git a/translated/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md b/published/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md similarity index 54% rename from translated/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md rename to published/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md index 41318dd5fc..787a7355c3 100644 --- a/translated/tech/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md +++ b/published/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md @@ -6,45 +6,44 @@ > “Not Enough Free Disk Space On /boot” -![](https://www.unixmen.com/wp-content/uploads/2015/02/Software-Updater_002.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/Software-Updater_002.png) -这是因为我的启动分区超出了不再要的旧内核与包等。 +这是因为我的 /boot 分区被不再需要的旧内核与包塞满了。 ### 回答: ### -我听说**Computer Janitor**这个特性可以在Ubuntu Tweak中删除不想要的垃圾文件。使用Computer Janitor,你可以将你的系统清理成像新安装的那样。Janitor会删除: +我听说Ubuntu Tweak中的**Computer Janitor**功能可以删除不想要的垃圾文件。使用Computer Janitor,你可以将你的系统清理成像新安装的那样。Janitor会删除: -- 程序缓存(Firefox/Chrome 缓存、软件中心缓存); +- 程序缓存(Firefox/Chrome 缓存、软件中心缓存); - 略缩图缓存; - apt缓存; - 旧内核; - 包的配置; - 不再需要的包。 -If you haven’t install this tool, look at the following link. 如果你还没有安装这个工具,参考下面的链接 - **[如何安装和使用Ubuntu Tweak][1]** 要删除不需要的垃圾文件,打开Ubuntu Tweak,点击 **Janitor** 选项。 -![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_006.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/Ubuntu-Tweak_006.png) 选择你想要删除的文件的选框,并点击 **Clean** 按钮。 -![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_007.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/Ubuntu-Tweak_007.png) Janitor现在就开始清理你的系统了。 -![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_003.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/Ubuntu-Tweak_003.png) 真酷!系统清理完成了。 -![](https://www.unixmen.com/wp-content/uploads/2015/02/Ubuntu-Tweak_008.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/Ubuntu-Tweak_008.png) 我重启启动了软件更新。这个没再遇到问题了。 -![](https://www.unixmen.com/wp-content/uploads/2015/02/Software-Updater_009.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/Software-Updater_009.png) 就是这样。当然也有其他的方法可以清理系统。但是,这个方法很容易学。我们可以只点击几次鼠标就可以清理系统。 @@ -52,13 +51,13 @@ Janitor现在就开始清理你的系统了。 -------------------------------------------------------------------------------- -via: https://www.unixmen.com/how-to-fix-not-enough-free-disk-space-on-boot-in-ubuntu/ +via: http://www.unixmen.com/how-to-fix-not-enough-free-disk-space-on-boot-in-ubuntu/ 作者:[SK][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:https://www.unixmen.com/author/sk/ -[1]:http://www.unixmen.com/after-a-fresh-install-of-ubuntu-1010-maverick-meerkat-configuration-made-easy-with-ubuntu-tweak/ +[1]:http://linux.cn/article-3335-1.html From aa89c1d4b2ac4bc5b03c3477447e396b09a1cb99 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 7 Apr 2015 22:48:03 +0800 Subject: [PATCH 0492/2517] DEL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 实在是奇怪,这篇文章和 linux 基本上算是毫无关系。还是不发布了。@geekpi --- ... How To Fix Windows Updates Stuck At 0%.md | 54 ------------------- 1 file changed, 54 deletions(-) delete mode 100644 translated/tech/20150304 How To Fix Windows Updates Stuck At 0%.md diff --git a/translated/tech/20150304 How To Fix Windows Updates Stuck At 0%.md b/translated/tech/20150304 How To Fix Windows Updates Stuck At 0%.md deleted file mode 100644 index ca09f61d1c..0000000000 --- a/translated/tech/20150304 How To Fix Windows Updates Stuck At 0%.md +++ /dev/null @@ -1,54 +0,0 @@ -如何修复Windows更新在0%卡住 -================================================================================ -当你在一个月后登录Windows,发现有一些更新需要安装, 你选择安装这些更新但是**Windows更新卡在0%**时你感觉怎么样? - -为什么我在Linux和开源专属的博客上谈论Windows更新呢?因为我喜欢[双启动Windows和Linux][1]。当我使用Linux作为我的主桌面时,过了一段时间我登录到Windows中。登录Windows后最烦人的事情是Windows更新。我偶尔遇到了几次**Windows更新不能工作**的情况。我选择安装更新而且Windows更新卡在了0%和0KB上,就像这样: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_Updates_stuck_at_zero.jpeg) - -本教程中,我们会让Windows更新再次可用。这个教程应该同样适用于Windows 7、Windows 8和Windows 8.1。 - -### 修复Windows更新卡在0% ### - -请注意Windows更新可能卡在任何地方,我们将会使用的这个技巧需要你重新安装这些更新。我希望你不要觉得太麻烦。如果你准备好了,就让我们开始修复这个Windows更新问题。 - -#### 步骤 1: #### - -按下Windows+R。这时会弹出运行窗口。在这里我们输入services.msc: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Updates_3.png) - -#### 步骤 2: #### - -这里会显示Windows上安装的所有服务。这些服务以字母排序。向下拉到**Windows Update Service**。右击并停止服务。 - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_Updates_stuck_1.jpeg) - -#### 步骤 3: #### - -现在进入**C:\Windows\SoftwareDistribution并删除这里所有的内容**。实际上,这个文件夹是下载和保存安装文件的地方。但是由于Windows更新卡住了,所以这里的某个安装文件存在一些问题。 - -#### 步骤 4: #### - -回到前面的服务(第一步中提到的)并右击重新启动Windows更新服务。再重新试一下Windows更新,这次应该可以用了。 - -当系统更新可以工作时,你或许会发现在下次启动时会有很多更新要安装。这时打个电话: - - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Windows_update_suck.jpg) - -玩笑之余,我希望这个贴士能够帮助你拜托Windows更新卡在0%的情况。我希望Linux中的更新也能够含在[Windows 10从Linux复制的特性][2]列表中。这只是我的希望。 - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/fix-windows-updates-stuck-0/ - -作者:[Abhishek][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ -[2]:http://itsfoss.com/windows-10-inspired-linux/ From 9339d7528c8278d870ec13467e895e73b643d95e Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 7 Apr 2015 22:56:28 +0800 Subject: [PATCH 0493/2517] PUB:20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl @Vic020 --- ...n local time and UNIX timestamp in Perl.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md (81%) diff --git a/translated/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md b/published/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md similarity index 81% rename from translated/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md rename to published/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md index 34b8bf4629..18ce4c5587 100644 --- a/translated/tech/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md +++ b/published/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md @@ -1,8 +1,8 @@ Linux有问必答:Perl中本地时间和UNIX时间戳间相互转换 ================================================================================ -> **问题**: 在Perl语言中,我需要转换易读的日期和时间到对应的UNIX时间戳,反之亦然。你可以给我一些Perl代码例子吗?关于日期及时间转换到UNIX时间戳,或者相反,转换UNIX时间戳到可读的日期和时间。 +> **问题**: 在Perl语言中,我需要转换易读的日期和时间到对应的UNIX时间戳,反之亦然。你可以给我一些将日期及时间转换到UNIX时间戳的Perl代码例子吗?或者相反,转换UNIX时间戳到可读的日期和时间。 -当你的Perl脚本需要解决时间信息,这里有两种方法来表示和处理日期和时间。一种方法是易读的时间表示(例,"Sat Mar 14 10:14:05 EDT 2015"),另外一种是使用UNIX时间戳(也叫“新纪元时间”),这是从1970年1月1日到今所消耗的时间秒数。每一种方法都有它自己的优劣势,取决于你的需要,也许也就需要转换一种格式到另一种。 +当你的Perl脚本需要解决时间信息,这里有两种方法来表示和处理日期和时间。一种方法是易读的时间表示(例,"Sat Mar 14 10:14:05 EDT 2015"),另外一种是使用UNIX时间戳(也叫“新纪元时间”),这是从1970年1月1日到今所经过的时间秒数。每一种方法都有它自己的优劣势,取决于你的需要,也许也就需要转换一种格式到另一种。 ### Perl中转换本地时间到UNIX时间戳 ### @@ -13,13 +13,14 @@ Linux有问必答:Perl中本地时间和UNIX时间戳间相互转换 - 14/Mar/15 10:14:05 - 14 Mar 15 10:14:05 - use Date::Parse; +``` +use Date::Parse; - my $local_time = "Sat Mar 14 10:14:05 EDT 2015"; +my $local_time = "Sat Mar 14 10:14:05 EDT 2015"; - # 1426342445 will be stored in $unix_time - my $unix_time = str2time($local_time); - +# 1426342445 will be stored in $unix_time +my $unix_time = str2time($local_time); +``` Date:Parse 模块支持多种语言(英语,法语,德语和意大利语)和时区。例如: use Date::Parse; @@ -28,10 +29,9 @@ Date:Parse 模块支持多种语言(英语,法语,德语和意大利语) my $lang = Date::Language->new('French'); my $unix_time = $lang->str2time("12:14:05, Ago 16, 2014 (CEST)"); -### Perl中UNIX时间戳到可读的日期和时间 ### +### Perl中UNIX时间戳到易读的日期和时间 ### - -如果你想要转换UNIX时间戳到可读的格式,可以使用localtime()函数,此函数可以转换UNIX时间戳为一个9元素列表。然后你可以使用返回的list构造任何你需要的可读格式。这里有一个代码片段: +如果你想要转换UNIX时间戳到易读的格式,可以使用localtime()函数,此函数可以转换UNIX时间戳为一个9元素列表。然后你可以使用返回的list构造任何你需要的可读格式。这里有一个代码片段: # $sec, $min, $hour: 秒,分,时 # $mday: 月中的某天 (0-31) @@ -55,7 +55,7 @@ via: http://ask.xmodulo.com/convert-local-time-unix-timestamp-perl.html 作者:[Dan Nanni][a] 译者:[VicYu/Vic020](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From bc7d166ee582a849da22edc4bce215dbe3ddd0b2 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 7 Apr 2015 23:44:21 +0800 Subject: [PATCH 0494/2517] PUB:20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @GOLinux 为了发布需要,删除了文章中前一次错误测试结果部分。 --- ...arks with PHP5.5 PHP5.6 PHP-NG and HHVM.md | 150 ++++++++++ ...arks with PHP5.5 PHP5.6 PHP-NG and HHVM.md | 270 ------------------ 2 files changed, 150 insertions(+), 270 deletions(-) create mode 100644 published/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md delete mode 100644 translated/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md diff --git a/published/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md b/published/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md new file mode 100644 index 0000000000..a15c496eae --- /dev/null +++ b/published/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md @@ -0,0 +1,150 @@ +PHP 5.5 / PHP5.6 / PHP-NG 和 HHVM 哪个性能更好? +================================================================================ +**长篇摘要:在一个基于Vagrant的本地环境中,可能是某个错误的原因,导致HHVM测试结果很差;在HHVM伙伴们协助下,该原因仍在研究中!然而,在DigitalOcean的一个4GB虚拟机中,HHVM甚至盖过了最新版的PHP-NG的风头!** + +![](https://kinsta.com/wp-content/uploads/2014/07/phphhvm.jpg) + +**结论:它们反映出HHVM的功效更佳(在JIT热启动后),虽然出于某些原因,我们不能在所有装备中获取这些结果。** + +如果你记得我们[在几个月前写过一篇文章][1],那时WordPress 3.9表明是完全支持HHVM的,当时是那么令我们欢欣鼓舞。最初的基准测试结果显示,HHVM要比驱动着当前所有PHP构建的Zend引擎高级得多。后来,问题就出来了: + +- HHVM只能以单个用户运行,这意味着(在共享环境中)安全性差了 +- HHVM在崩溃后不会自动重启,而不幸的是,它至今仍然经常发生 +- HHVM在启动时使用大量内存,虽然,它和同规模的PHP-FPM比较,单个请求的内存使用量更低 + +很显然,你不得不根据你的(或者更确切地说是你的站点)的需求采取折中方案,然而这值得吗?切换到HHVM后,你期望获得多少性能改善呢? + +在Kinsta,我们真的想要测试所有新技术,并通常会优化这一切来为我们的客户提供最佳的环境。今天,我最终花了点时间来配置测试环境并进行了一些测试来对比两个不同的构建,一个是全新出炉的WordPress安装,另外一个则添加了大量内容的WooCommerce!为了计量脚本的运行时间,我只是简单地添加了 + + + +这一行到footer.php的/body标记前。 + + +这里是配置环境的详情: + +- DigitalOcean 4GB 雨滴容器 (2 CPU核心, 4GB RAM) +- Ubuntu 14.04, MariaDB10 +- 测试站点: 已导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1 +- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d)和HHVM 3.2.0 (版本是PHP 5.6.99-hhvm) + +**没有进一步大费周章,这些就是我的测试结果,数值越低越好,以秒为单位:** + +### DigitalOcean 4GB 雨滴容器 ### + +单位是秒,运行10次,越低越好 + +这里有一个canvas的数据,发布的时候需要截一个图 + +看起来似乎PHP-NG在它首次运行后就获得了峰值性能!HHVM需要更多几次重载,但是它们的性能貌似差不多!我等不及PHP-NG合并到开发主干了!:) + +一分钟命中数,越高越好。 + +这里有一个canvas的数据,发布的时候需要截一个图 + +**PHP 5.5.15禁用OpCache** + +- 执行: **236 hits** +- 可用性: 100.00 % +- 消耗时间: 59.03 secs +- 传输的数据: 2.40 MB +- 回应时间: 2.47 secs +- 执行率: 4.00 trans/sec +- 吞吐量: 0.04 MB/sec +- 并发数: 9.87 +- 成功的执行: 236 +- 失败的执行: 0 +- 最长执行: 4.44 +- 最短执行: 0.48 + +**PHP 5.5.15启用OpCache** + +- 执行: **441 hits** +- 可用性: 100.00 % +- 消耗时间: 59.55 secs +- 传输的数据: 4.48 MB +- 回应时间: 1.34 secs +- 执行率: 7.41 trans/sec +- 吞吐量: 0.08 MB/sec +- 并发数: 9.91 +- 成功的执行: 441 +- 失败的执行: 0 +- 最长执行: 2.19 +- 最短执行: 0.64 + +**PHP 5.6 RC2禁用OpCache** + +- 执行: **207 hits** +- 可用性: 100.00 % +- 消耗时间: 59.87 secs +- 传输的数据: 2.10 MB +- 回应时间: 2.80 secs +- 执行率: 3.46 trans/sec +- 吞吐量: 0.04 MB/sec +- 并发数: 9.68 +- 成功的执行: 207 +- 失败的执行: 0 +- 最长执行: 3.65 +- 最短执行: 0.54 + +**PHP 5.6 RC2启用OpCache** + +- 执行: **412 hits** +- 可用性: 100.00 % +- 消耗时间: 59.03 secs +- 传输的数据: 4.18 MB +- 回应时间: 1.42 secs +- 执行率: 6.98 trans/sec +- 吞吐量: 0.07 MB/sec +- 并发数: 9.88 +- 成功的执行: 412 +- 失败的执行: 0 +- 最长执行: 1.93 +- 最短执行: 0.34 + +**HHVM 3.2.0(版本是PHP 5.6.99-hhvm)** + +- 执行: **955 hits** +- 可用性: 100.00 % +- 消耗时间: 59.69 secs +- 传输的数据: 9.18 MB +- 回应时间: 0.62 secs +- 执行率: 16.00 trans/sec +- 吞吐量: 0.15 MB/sec +- 并发数: 9.94 +- 成功的执行: 955 +- 失败的执行: 0 +- 最长执行: 0.85 +- 最短执行: 0.23 + +**PHP-NG启用OpCache(构建: Jul 29 2014)** + +- 执行: **849 hits** +- 可用性: 100.00 % +- 消耗时间: 59.88 secs +- 传输的数据: 8.63 MB +- 回应时间: 0.70 secs +- 执行率: 14.18 trans/sec +- 吞吐量: 0.14 MB/sec +- 并发数: 9.94 +- 成功的执行: 849 +- 失败的执行: 0 +- 最长执行: 1.06 +- 最短执行: 0.13 + + +**注意:这里节略了前一次的测试结果(有误),如感兴趣请访问原文查看。** + + +-------------------------------------------------------------------------------- + +via: https://kinsta.com/blog/real-world-wordpress-benchmarks-with-php5-5-php5-6-php-ng-and-hhvm/ + +作者:[Mark Gavalda][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://kinsta.com/blog/author/kinstadmin/ +[1]:https://kinsta.com/blog/hhvm-and-wordpress/ diff --git a/translated/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md b/translated/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md deleted file mode 100644 index 82aba752aa..0000000000 --- a/translated/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md +++ /dev/null @@ -1,270 +0,0 @@ -真实世界WordPress PHP 5.5 PHP5.6 PHP-NG和HHVM基准测试 -================================================================================ -**长篇摘要:在一个基于Vagrant的本地环境中,可能是某个错误的原因,导致HHVM测试结果丢失了;在HHVM伙伴们协助下,该原因仍在研究中!然而,在数字海洋的一个4GB容器中,它甚至盖过了最新版的PHP-NG的风头!** -![](https://kinsta.com/wp-content/uploads/2014/07/phphhvm.jpg) - -**更新:请查看文章结尾的结果!它们反映出HHVM的功效更佳(在JIT热机后),虽然处于某些原因,我们不能在所有装备中获取这些结果。 - -下面的测试是在Vagrant/VVV环境中进行的,结果仍然令人关注。也许是HHVM或Vagrant配置中的某个错误,导致它不能以高速运行,我们正和HHVM的伙计们一起研究该问题。** - -如果你记得我们[在几个月前写过一篇文章][1],那时WordPress 3.9表明是完全支持HHVM的,当时是那么令我们欢欣鼓舞。最初的基准测试结果显示,HHVM要比驱动着当前所有PHP构建的Zend引擎高级得多。后来,问题就出来了: - -- HHVM只能以单个用户运行,这意味着(在共享环境中)安全性差了 -- HHVM在崩溃后不会自动重启,而不幸的是,它至今仍然经常发生 -- HHVM在启动时使用大量内存,而当你把它和PHP-FPM规模比较后会发现,它单个请求的内存使用量却更低。 - -很显然,你不得不根据你的(或者更确切地说是你的站点)的需求采取折中方案,然而这值得吗?切换到HHVM后,你期望获得多少性能改善呢? - -在Kinsta,我们真的想要测试所有新技术,并通常会优化这一切来为我们的客户提供最佳的环境。今天,我最终花了点时间来配置测试环境并进行了一些测试来对比两个不同的构建,一个是全新出炉的WordPress安装,另外一个则添加了大量内容的WooCommerce!为了计量脚本的运行时间,我只是简单地添加了 - - - -这一行到footer.php的/body标记前。 - -**注意: -前面这一章节包含了Vagrant/Virtualbox/Ubuntu14.04的基准测试,然而出于某些原因,HHVM真的表现得很差,也许是某个错误所导致,又或许是虚拟化环境的限制。我们感到,这些测试结果并不反映真实情况,因此我们在云服务器上再次进行了测试,并考虑了这些情况的合理性。** - -这里是配置环境的详情: - -- 数字海洋4GB雨滴容器 (2 CPU核心, 4GB RAM) -- Ubuntu 14.04, MariaDB10 -- 测试站点: 已导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1 -- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d)和HHVM 3.2.0 (版本中说是PHP 5.6.99-hhvm) - -**没有进一步大费周章,这些就是我的测试结果,数值越低越好,以秒为单位:** -### 数字海洋4GB雨滴容器 ### - -秒,运行10次,越低越好 - -这里有一个canvas的数据,发布的时候需要截一个图 - -看起来似乎PHP-NG在它首次运行后就获得了峰值性能!HHVM需要更多几次重载,但是它们的性能貌似差不多!我等不到PHP-NG合并到主进程了!:) - -一分钟命中,越高越好。 - -这里有一个canvas的数据,发布的时候需要截一个图 - -**PHP 5.5.15禁用OpCache** - -- 执行: **236 hits** -- 可用性: 100.00 % -- 消耗时间: 59.03 secs -- 传输的数据: 2.40 MB -- 回应时间: 2.47 secs -- 执行率: 4.00 trans/sec -- 吞吐量: 0.04 MB/sec -- 并发数: 9.87 -- 成功的执行: 236 -- 失败的执行: 0 -- 最长执行: 4.44 -- 最短执行: 0.48 - -**PHP 5.5.15启用OpCache** - -- 执行: **441 hits** -- 可用性: 100.00 % -- 消耗时间: 59.55 secs -- 传输的数据: 4.48 MB -- 回应时间: 1.34 secs -- 执行率: 7.41 trans/sec -- 吞吐量: 0.08 MB/sec -- 并发数: 9.91 -- 成功的执行: 441 -- 失败的执行: 0 -- 最长执行: 2.19 -- 最短执行: 0.64 - -**PHP 5.6 RC2禁用OpCache** - -- 执行: **207 hits** -- 可用性: 100.00 % -- 消耗时间: 59.87 secs -- 传输的数据: 2.10 MB -- 回应时间: 2.80 secs -- 执行率: 3.46 trans/sec -- 吞吐量: 0.04 MB/sec -- 并发数: 9.68 -- 成功的执行: 207 -- 失败的执行: 0 -- 最长执行: 3.65 -- 最短执行: 0.54 -- -**PHP 5.6 RC2启用OpCache** - -- 执行: **412 hits** -- 可用性: 100.00 % -- 消耗时间: 59.03 secs -- 传输的数据: 4.18 MB -- 回应时间: 1.42 secs -- 执行率: 6.98 trans/sec -- 吞吐量: 0.07 MB/sec -- 并发数: 9.88 -- 成功的执行: 412 -- 失败的执行: 0 -- 最长执行: 1.93 -- 最短执行: 0.34 - -**HHVM 3.2.0(版本说是PHP 5.6.99-hhvm)** - -- 执行: **955 hits** -- 可用性: 100.00 % -- 消耗时间: 59.69 secs -- 传输的数据: 9.18 MB -- 回应时间: 0.62 secs -- 执行率: 16.00 trans/sec -- 吞吐量: 0.15 MB/sec -- 并发数: 9.94 -- 成功的执行: 955 -- 失败的执行: 0 -- 最长执行: 0.85 -- 最短执行: 0.23 - -**PHP-NG启用OpCache(构建: Jul 29 2014)** - -- 执行: **849 hits** -- 可用性: 100.00 % -- 消耗时间: 59.88 secs -- 传输的数据: 8.63 MB -- 回应时间: 0.70 secs -- 执行率: 14.18 trans/sec -- 吞吐量: 0.14 MB/sec -- 并发数: 9.94 -- 成功的执行: 849 -- 失败的执行: 0 -- 最长执行: 1.06 -- 最短执行: 0.13 - ----------- - -**注意: -这些是先前的测试结果,它们不真实。我放在这里用于将来的参考,但是请不要将这些值当作真实的表现!** - -这里是配置环境的详情: - -- 苹果MacBook Pro mid-2011 (Intel Core i7 2 GHz 4 cores, 4GB RAM, 256GB Ocz Vertex 3 MI) -- 当前修改中的Vagrant,带有Ubuntu 14.04, nginx 1.6.x, mysql 5.5.x等的Vagrants构建 -- 测试站点 1: WordPress 3.9.1最小化裸版 -- 测试站点 2: 导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1 -- PHP 5.5.9, PHP 5.5.15, PHP 5.6.0 RC2, PHP-NG (20140718-git-6cc487d)和HHVM 3.2.0 (版本中说是PHP 5.6.99-hhvm) - -**默认主题,默认的WordPress 3.9.1, PHP 5.5.9-1ubuntu4.3 (带有OpCache 7.0.3)** - -**错误结果,请阅读上面的说明!** - -秒,10次运行,越低越好。 - -这里有一个canvas的数据,发布的时候需要截一个图 - -### 导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1(禁用OpCache) ### - -**错误结果,请阅读上面的说明!** - -秒,10次运行,越低越好。 - -这里有一个canvas的数据,发布的时候需要截一个图 - -### 导入演示内容的Munditia主题,WooCommerce 2.1.12 & WordPress 3.9.1(启用OpCache)### - -**错误结果,请阅读上面的说明!** - -秒,10次运行,越低越好。 - -这里有一个canvas的数据,发布的时候需要截一个图 - -**Siege参数:1分钟10个并发用户:siege -c 10 -b -t 1M** - -**错误结果,请阅读上面的说明!** - -一分钟命中,越高越好。 - -这里有一个canvas的数据,发布的时候需要截一个图 - -**PHP5.5禁用OpCache(PHP 5.5.15-1+deb.sury.org~trusty+1)错误结果,请阅读上面的说明!** - -- 执行: 35 hits -- 可用性: 100.00 % -- 消耗时间: 59.04 secs -- 传输的数据: 2.03 MB -- 回应时间: 14.56 secs -- 执行率: 0.59 trans/sec -- 吞吐量: 0.03 MB/sec -- 并发数: 8.63 -- 成功的执行: 35 -- 失败的执行: 0 -- 最长执行: 18.73 -- 最短执行: 5.80 - -**HHVM 3.2.0 (version says PHP 5.6.99-hhvm)错误结果,请阅读上面的说明!** - -- 执行: 44 hits -- 可用性: 100.00 % -- 消耗时间: 59.53 secs -- 传输的数据: 0.42 MB -- 回应时间: 12.00 secs -- 执行率: 0.74 trans/sec -- 吞吐量: 0.01 MB/sec -- 并发数: 8.87 -- 成功的执行: 44 -- 失败的执行: 0 -- 最长执行: 13.40 -- 最短执行: 2.65 - -**PHP5.5启用OpCache(PHP 5.5.15-1+deb.sury.org~trusty+1 with OpCache 7.0.4-dev)错误结果,请阅读上面的说明!** - -- 执行: 100 hits -- 可用性: 100.00 % -- 消耗时间: 59.30 secs -- 传输的数据: 5.81 MB -- 回应时间: 5.69 secs -- 执行率: 1.69 trans/sec -- 吞吐量: 0.10 MB/sec -- 并发数: 9.60 -- 成功的执行: 100 -- 失败的执行: 0 -- 最长执行: 7.25 -- 最短执行: 2.82 - -**PHP5.6启用OpCache(PHP 5.6.0RC2 with OpCache 7.0.4-dev)错误结果,请阅读上面的说明!** - -- 执行: 103 hits -- 可用性: 100.00 % -- 消耗时间: 59.99 secs -- 传输的数据: 5.98 MB -- 回应时间: 5.51 secs -- 执行率: 1.72 trans/sec -- 吞吐量: 0.10 MB/sec -- 并发数: 9.45 -- 成功的执行: 103 -- 失败的执行: 0 -- 最长执行: 6.87 -- 最短执行: 2.52 - -**PHP-NG启用OpCache(20140718-git-6cc487d)错误结果,请阅读上面的说明!** - -- 执行: 124 hits -- 可用性: 100.00 % -- 消耗时间: 59.32 secs -- 传输的数据: 7.19 MB -- 回应时间: 4.58 secs -- 执行率: 2.09 trans/sec -- 吞吐量: 0.12 MB/sec -- 并发数: 9.57 -- 成功的执行: 124 -- 失败的执行: 0 -- 最长执行: 6.86 -- 最短执行: 2.24 - -**你觉得这测试怎样?我遗漏了什么没有?下一篇基准测试文章中你想看到什么呢?请在下面评论中回复!** - --------------------------------------------------------------------------------- - -via: https://kinsta.com/blog/real-world-wordpress-benchmarks-with-php5-5-php5-6-php-ng-and-hhvm/ - -作者:[Mark Gavalda][a] -译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://kinsta.com/blog/author/kinstadmin/ -[1]:https://kinsta.com/blog/hhvm-and-wordpress/ From 60a3522d6f04e4c0d1cae39ad48422d15ac713ce Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 8 Apr 2015 11:33:30 +0800 Subject: [PATCH 0495/2517] [Translaing]:share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player" [Translating]:tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu --- ...aile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md | 1 + ...Linux Email App Geary Updated--How To Install It In Ubuntu.md | 1 + 2 files changed, 2 insertions(+) diff --git a/sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md b/sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md index cd650fca22..5326811fb8 100644 --- a/sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md +++ b/sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md @@ -1,3 +1,4 @@ +Translating by ictlyh Exaile 3.4.1 Overview – A Feature-Complete GNOME Music Player ================================================================================ **Exaile** has been a bit quiet in the past two years with maybe only one or two stable releases, but nevertheless, it’s one of the full-featured music players for GNOME which are on par with applications like [Rhythmbox][1] or [Banshee][2] in terms of features. However, over the past two months a new stable release, 3.4, has been put out under the slogan “We’re not dead yet”, as well as an incremental 3.4.1 release, which shipped on November 1. To be honest, Exaile has so many features that I could go on writing a lot more than an article to cover them all, so let’s have a look at some of the most notable ones. diff --git a/sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md b/sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md index 1ddccaa8c6..03c25343f8 100644 --- a/sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md +++ b/sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md @@ -1,3 +1,4 @@ +Translating by ictlyh Linux Email App Geary Updated — How To Install It In Ubuntu ================================================================================ **Geary, the popular desktop email client for Linux, has been updated to version 0.10 — and it gains a glut of new features in the process.** From 6459a9c9c5efd14c8d599309bdd349caed7f3995 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 8 Apr 2015 11:46:35 +0800 Subject: [PATCH 0496/2517] Translating by ZTinoZ --- ...ars of Git--An Interview with Git Creator Linus Torvalds.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md b/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md index d9a2776850..e97f861a65 100644 --- a/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md +++ b/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ 10 Years of Git: An Interview with Git Creator Linus Torvalds ================================================================================ > Linus Torvalds explains why he created Git @@ -130,4 +131,4 @@ via: http://www.linux.com/news/featured-blogs/185-jennifer-cloer/821541-10-years [17]: [18]: [19]: -[20]: \ No newline at end of file +[20]: From 02f0a2eef24097b2bd2aa8d5e1c51d2c3e39bc0e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 8 Apr 2015 13:59:05 +0800 Subject: [PATCH 0497/2517] [Translated]share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player [Translated]tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu --- ...--A Feature-Complete GNOME Music Player.md | 76 ------------------- ...ry Updated--How To Install It In Ubuntu.md | 71 ----------------- ...--A Feature-Complete GNOME Music Player.md | 75 ++++++++++++++++++ ...ry Updated--How To Install It In Ubuntu.md | 70 +++++++++++++++++ 4 files changed, 145 insertions(+), 147 deletions(-) delete mode 100644 sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md delete mode 100644 sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md create mode 100644 translated/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md create mode 100644 translated/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md diff --git a/sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md b/sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md deleted file mode 100644 index 5326811fb8..0000000000 --- a/sources/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md +++ /dev/null @@ -1,76 +0,0 @@ -Translating by ictlyh -Exaile 3.4.1 Overview – A Feature-Complete GNOME Music Player -================================================================================ -**Exaile** has been a bit quiet in the past two years with maybe only one or two stable releases, but nevertheless, it’s one of the full-featured music players for GNOME which are on par with applications like [Rhythmbox][1] or [Banshee][2] in terms of features. However, over the past two months a new stable release, 3.4, has been put out under the slogan “We’re not dead yet”, as well as an incremental 3.4.1 release, which shipped on November 1. To be honest, Exaile has so many features that I could go on writing a lot more than an article to cover them all, so let’s have a look at some of the most notable ones. - -![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile02.jpg) - -[Exaile][3] is a GTK2-based music player written in Python which fits well into GNOME, has an interface which pretty much resembles the one of the old Amarok 1.4 or actual Clementine, and ships with some great features. The interface is composed mainly of two panels, both with support for tabs. The left panel provides access to the collection, Internet radio, smart and custom playlists, file browser, podcasts, Group Tagger and lyrics while the main area of the window is taken by the playlists (with multiple, tabbed playlist support) and control buttons. - -Exaile’s interface is very similar to the one of Clementine or Amarok 1.4 and the tabs on the left can be shown or hidden: - -![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile04.jpg) - -Version 3.4 shipped with a big number of major new features and changes while 3.4.1 was a small bug fix release. The major new features in 3.4 include new plugins like Icecast, Lyricsmania, Playlist Analyzer, Soma.fm, a new, simpler plugin API. Changes were done to the user interface and the general behavior as well, with the possibility to show playlists in multiple panels, close left panels, better BPM UI integration. - -The first time it starts you can add music folders to the collection – you can also choose to add directories and enable or disable monitoring or scanning them at start-up: - -![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile01.jpg) - -Exaile’s features are practically countless. You can organize your music in a collection, listen to podcasts, set song ratings, edit tags, view file properties, queue tracks, view lyrics and covers, sort the playlist by a huge number of criteria, change playback behavior or appearance style. - -Equalizer, cover manager and listening to Internet radio: - -![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile05.jpg) - -Local album covers are detected automatically and can be shown in full size, with the possibility to zoom in or out: - -![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile03.jpg) - -The preferences window allows to configure various aspects of Exaile, including enable or disable plugins, appearance, system tray integration, or playback. The appearance settings will allow you to change the tabs placement, show/hide the tab bar, enable or disable transparency, or disable the start-up splash screen. - -![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_preferences_01.jpg) - -![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_preferences_02.jpg) - -The system tray integration offers a menu to quickly play/pause songs, set a song rating or change the way the playlist handles playback (shuffle, repeat or dynamic). - -![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_tray.jpg) - -![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_tray.jpg) - -The countless features in Exaile I believe make it the perfect choice as a music player, especially for GNOME users. Any user should be satisfied with the wealth of options and the highly configurable approach. - -### Install Exaile 3.4.1 in Ubuntu 14.04 and 14.10 ### - -Compiling and installing from source should be pretty straightforward. First, get the dependencies: - - sudo apt-get build-dep exaile - sudo apt-get install python-gst0.10 - -Download the source tarball from the [downloads page][4] (direct link [here][5]), then uncompress it: - - tar -xf exaile-3.4.1.tar.gz - -Change the working directory to exaile-3.4.1 and issue the following commands: - - make - sudo make install - -The binary will be installed as **/usr/local/bin/exaile**. - --------------------------------------------------------------------------------- - -via: http://www.tuxarena.com/2014/11/exaile-3-4-1-overview-a-feature-complete-gnome-music-player/ - -作者:Craciun Dan -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:https://wiki.gnome.org/Apps/Rhythmbox -[2]:http://banshee.fm/ -[3]:http://www.exaile.org/ -[4]:http://www.exaile.org/download/ -[5]:https://github.com/exaile-dev/exaile/archive/3.4.1.tar.gz \ No newline at end of file diff --git a/sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md b/sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md deleted file mode 100644 index 03c25343f8..0000000000 --- a/sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md +++ /dev/null @@ -1,71 +0,0 @@ -Translating by ictlyh -Linux Email App Geary Updated — How To Install It In Ubuntu -================================================================================ -**Geary, the popular desktop email client for Linux, has been updated to version 0.10 — and it gains a glut of new features in the process.** - -![An older version of Geary running in elementary OS](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/geary.jpg) -An older version of Geary running in elementary OS - -Geary 0.100 features some welcome user interface improvements and additional UI options, including: - -- New: Ability to ‘Undo’ Archive, Trash and Move actions -- New: Option to switch between a 2 column or 2 column layout -- New “split header bar” — improves message list, composer layouts -- New shortcut keys — use j/k to navigate next/previous conversations - -This update also introduces a **brand new full-text search algorithm** designed to improve the search experience in Geary, according to Yorba. - -This introduction should calm some complaints of the app’s search prowess, which often sees Geary return a slew of search results that are, to quote software outfit themselves, “…seemingly unrelated to the search query.” - -> ‘Yorba recommends that all users of the client upgrade to this release’ - -*“Although not all search problems are fixed in 0.10, Geary should be more conservative about displaying results that match the user’s query,” [the team notes][1]. * - -Last but by no means least on the main feature front is something sure to find favour with power users: **support for multiple/alternate e-mail addresses per account**. - -If your main Gmail account is set-up in Geary to pull in your Yahoo, Outlook and KittyMail messages too then you should now see them all kept neatly together and be given the option of picking which identity you send from when using the composer ‘From’ field. No, it’s not the sexiest feature but it is one that has been requested often. - -Rounding out this release of the popular Linux email client is the usual gamut of bug fixes, performance optimisations and miscellaneous improvements. - -Yorba recommends that all users of the client upgrade to this release. - -### Install Geary 0.10 in Ubuntu 14.04, 14.10 & 15.04 ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/geary-inline-composor.jpg) - -The latest version of Yorba is available to download as source, ready for compiling from the GNOME Git. But let’s be honest: that’s a bit of a hassle, right? - -Ubuntu users wondering how to install Geary 0.10 in **14.04, 14.10** and (for early birds) **15.04** have things easy. - -The official Yorba PPA contains the **latest versions of Geary** as well as those for Shotwell (photo manager) and [California][2] (calendar app). Be aware that any existing versions of these apps installed on your computer may/will be upgraded to a more recent version by adding this PPA. - -Capiche? Coolio. - -To install Geary in Ubuntu you first need to add the Yorba PPA your Softwares Sources. To do this just open a new Terminal window and carefully enter the following two commands: - - sudo add-apt-repository ppa:yorba/ppa - - sudo apt-get update && sudo apt-get install geary - -After hitting return/enter on the last you’ll be prompted to enter your password. Do this, and then let the installation complete. - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/20130320161830-geary-yorba.png) - -Once done, open your desktop environment’s app launcher and seek out the ‘Geary’ icon. Click it, add your account(s) and discover [what the email mail man has dropped off through the information superhighway][3] and into the easy to use graphical interface. - -**Don’t forget: you can always tip us with news, app suggestions, and anything else you’d like to see us cover by using the power of electronic mail. Direct your key punches to joey [at] oho [dot] io.** - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://wiki.gnome.org/Apps/Geary/FullTextSearchStrategy -[2]:http://www.omgubuntu.co.uk/2014/10/california-calendar-natural-language-parser -[3]:https://www.youtube.com/watch?v=rxM8C71GB8w \ No newline at end of file diff --git a/translated/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md b/translated/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md new file mode 100644 index 0000000000..6c22e79f25 --- /dev/null +++ b/translated/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md @@ -0,0 +1,75 @@ +Exaile 3.4.1 概述 — 一个全功能的GNOME音乐播放器 +================================================================================ +**Exaile** 在过去两年显得有些平静,也许只有一个或者两个稳定版发布,但尽管如此,在功能方面,它是一个和[Rhythmbox][1]或者[Banshee][2]相匹敌的全功能GNOME音乐播放器。然而,在过去的两个月,在"We’re not dead yet"的口号下,推出了一个新的稳定版3.4,同时在11月1日还推出了3.4.1增量版本。事实上,Exaile有很多的功能,我可以继续写很多的文章而不是在一篇文章里全部介绍到,就让我们来看一下一些最显著的特点吧。 + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile02.jpg) + +[Exaile][3]是基于GTK-2,用Python写的音乐播放器,它能很好地兼容GNOME,有和旧的Amarok1.4或者Clementine非常类似的界面,以及一些很好的功能。界面主要由两个面板组成,两个都支持标签。左边的面板提供对音乐集,网络音频,只能和自定义播放列表,文件浏览,播客,组标签以及歌词的访问,窗口的主要部分是播放列表(支持多种,带标签的播放列表)和控制按钮。 + +Exaile的界面和Clementine或者Amarok1.4非常相似,可以显示或者隐藏左边的标签。 + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile04.jpg) + +版本3.4增加了很多新的主要功能和更改,而3.4.1是一个小的bug修复版本。版本3.4的新功能包括类似Icecast的新插件,歌词同步,播放列表分析器,Soma.fm,以及新的更简单的插件API。用户界面和一般操作也作了修改,包括可以在多个面板显示播放列表,关闭左边的面板以及更好的BPM用户界面集成。 + +第一次打开Exaile你可以添加歌曲文件夹到音乐集中-你也可以选择添加文件夹并设置在打开Exaile的时候是否监视或者扫描这些文件夹: + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile01.jpg) + +Exaile的功能几乎不尽其数。你可以在音乐集中组织音乐,听播客,对音乐进行评分,编辑标签,查看文件属性,排列歌曲,查看歌曲和封面,按照多种方式排序播放列表,更改播放行为和外观风格。 + +均衡器,封面管理以及收听网络电台: + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile05.jpg) + +自动检测本地专辑封面,可以全尺寸显示,放大或者缩小: + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile03.jpg) + +首选项窗口允许多个方面配置Exaile,包括启用或者禁用插件,外观,系统托盘集成或者播放模式。外观设置允许你更改标签的布局,显示或者隐藏便签栏,启用或者禁用透明性或者禁用启动画面。 + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_preferences_01.jpg) + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_preferences_02.jpg) + +系统托盘集成提供了一个快速播放或者暂停音乐,对音乐评分或者更改音乐列表播放模式(随机,重复或者动态)的菜单。 + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_tray.jpg) + +![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_tray.jpg) + +我相信Exaile数不尽的功能使它成为音乐播放器的完美选择,尤其是对于GNOME用户。每个用户都会对丰富多样的选项和高度可配置的方式感到满意。 + +### 在Ubuntu 14.04 和 14.10上安装Exaile 3.4.1 ### + +从源码编译并安装和简单明了。首先获取依赖包: + + sudo apt-get build-dep exaile + sudo apt-get install python-gst0.10 + +从[下载页面][4](或者直接点击[这里][5])下载源码包,然后解压: + + tar -xf exaile-3.4.1.tar.gz + +更改工作目录到exaile-3.4.1然后运行下面的命令: + + make + sudo make install + +二进制可执行文件将被安装为 **/usr/local/bin/exaile**. + +-------------------------------------------------------------------------------- + +via: http://www.tuxarena.com/2014/11/exaile-3-4-1-overview-a-feature-complete-gnome-music-player/ + +作者:Craciun Dan +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://wiki.gnome.org/Apps/Rhythmbox +[2]:http://banshee.fm/ +[3]:http://www.exaile.org/ +[4]:http://www.exaile.org/download/ +[5]:https://github.com/exaile-dev/exaile/archive/3.4.1.tar.gz \ No newline at end of file diff --git a/translated/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md b/translated/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md new file mode 100644 index 0000000000..c5920123c6 --- /dev/null +++ b/translated/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md @@ -0,0 +1,70 @@ +Linux Email应用 Geary 更新了 — 如何在Ubuntu上安装 +================================================================================ +**Geary,Linux上流行的桌面email客户端,更新到版本0.10了 — 并且有了很多新的功能。** + +![elementary OS上运行的旧版本的Geary](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/geary.jpg) +elementary OS上运行的旧版本的Geary + +Geary 0.10有一些可惜的用户界面改进以及额外的UI选项,包括: + +- 新增: 可以对归档,删除以及移动做'Undo'操作 +- 新增: 在2列或者2列布局之间切换 +- 新的 “split header bar” — 改进邮件列表,发件人布局 +- 新的快捷键 — 使用j/k切换到上/下一封邮件 + +根据Yorba介绍,这次更新还提出了一个 **全新的全文检索算法** ,用来改进Geary的搜索体验。 + +这个更新应该能平息一下对应用搜索能力的抱怨,那些经常觉得Geary返回的搜索结果仅仅是包装软件自身"看起来和查询语句毫不相关"的观点。 + +> ‘Yorba 建议所有这个软件客户端的用户升级到这个版本’ + +*“尽管并不是所有的搜索问题在0.10版本中都解决了,但Geary能确保显示的结果能和更好的匹配用户的查询,”[团队表示][1]。* + +最后同样重要的是,专业用户会喜欢的主要功能:**支持一个账户有多个或者备用的email地址**。 + +如果你在Geary中设置Gmail账户来收取你的Yahoo,Outlook和KittyMail信件,你可以看到现在它们都整齐地放在一起,当你写信时在'From'栏你可以选择指定账户作为发送人。这并不是最重要,但是却是最经常被人要求的的功能。 + +这个流行的Linux电子邮件客户端的这次发布主要是bug修复,性能优化以及一些杂项改进。 + +Yorba建议所有这个客户端的用户都升级到这个发行版。 + +### 在Ubuntu 14.04, 14.10 & 15.04安装Geary 0.10 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/geary-inline-composor.jpg) + +Yorba的最新版本可以从GNOME的Git账户下载可编译的源代码。但说实话:这不是有点麻烦吗? + +Ubuntu用户想知道如何在 **14.04,14.10** 以及 **15.04**(那些更新爱好者) 上安装Geary 0.10。 + +官方的Youba PPA包括了 **Geary最新版本** 以及Shotwell(照片管理器)和[California][2](日历应用)。请注意添加这个PPA会使你电脑上任何已经安装的这些应用更新到最近的版本。 + +Capiche? Coolio. + +在Ubuntu上安装Geary你首先需要添加Yorba PPA和你的软件源。做这些你只需要打开终端窗口并小心地输入下面的两条命令: + + sudo add-apt-repository ppa:yorba/ppa + + sudo apt-get update && sudo apt-get install geary + +在输入最后一条命令并敲击回车键后会提示输入你的密码。输入密码让安装完成。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/20130320161830-geary-yorba.png) + +完成后,打开你的桌面环境应用启动面板并查找‘Geary’图标。点击它,添加你的账户并查看[通过信息高速公路下载了什么][3],开始使用简单的图形界面吧。 + +**别忘记:你可以通过电子邮件告诉我们你想看的新闻,应用建议,以及任何你想我们包括的东西,直接点击joey@oho.io** + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update + +作者:[Joey-Elijah Sneddon][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://wiki.gnome.org/Apps/Geary/FullTextSearchStrategy +[2]:http://www.omgubuntu.co.uk/2014/10/california-calendar-natural-language-parser +[3]:https://www.youtube.com/watch?v=rxM8C71GB8w \ No newline at end of file From 01ad955d13036135d8532c365985cbe4ff7ef783 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 8 Apr 2015 15:46:54 +0800 Subject: [PATCH 0498/2517] Translating by ZTinoZ --- ...terview with Git Creator Linus Torvalds.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md b/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md index e97f861a65..69ce4ba338 100644 --- a/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md +++ b/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md @@ -1,25 +1,24 @@ -Translating by ZTinoZ -10 Years of Git: An Interview with Git Creator Linus Torvalds +Git的十年:采访Git的创造者Linus Torvalds ================================================================================ -> Linus Torvalds explains why he created Git +> Linus Torvalds解释了他为什么会创造Git > > ![](http://www.linuxveda.com/wp-content/uploads/2014/10/Linus_Torvalds.jpg) > -> Thanks to Linus' Git today GitHub is the world's biggest code hoster in the world with over 9 million users and over 21.1 million repositories. +> 感谢Linus的Git,如今GitHub已经是全世界最大的代码托管网站,它拥有九百万用户和超过两千一百一十万个代码库。 > -> By Swapnil Bhartiya - +> 来自Swapnil Bhartiya - > -> Git will be celebrating it’s 10 anniversary this month. It’s yet another contribution of Linus Torvalds to the world in addition to Sub Surface and Linux. [Jennifer Cloer of The Linux Foundation interviewed the father of Linux][2] and presented us with a very comprehensive story behind Git. +> Git将会在本月庆祝它的十周年庆。这是Linus Torvalds除了Sub Surface和Linux之外全世界范围内的另外一个庆祝会。 [Linux基金会的Jennifer Cloer采访了这位Linux之父][2] 并且给我们带来了Git背后的许多故事。 > -> When Cloer asked Linus why he created Git, his answer was: +> 当Cloer问及Linus为什么会创造Git时,他是这么回答的: > -> “I really never wanted to do source control management at all and felt that it was just about the least interesting thing in the computing world (with the possible exception of databases ;^), and I hated all SCM’s with a passion.” +> “我其实根本没想过要做源代码控制管理系统,我感觉在计算机世界里那是一件很没劲的事情(数据库可能是例外 ;^),我要很讨厌富有激情的软件配置管理。” > -> He then played with BitKeeper which he initially liked as in his own words: +> 接着他拿他一开始使用的BitKeeper调侃了起来: > -> “BK got most things right and having a local copy of the repository and distributed merging was a big deal.” +> “BK有很多很棒的功能,它拥有代码库的本地拷贝,分布式合并也是一个好做法。” > -> But he was not satisfied: +> 但是他并不满意: > > “I had performance requirements that were not even remotely satisfied by what was available, and I also worried about integrity of the code and the whole workflow, so I ended up just deciding to write my own.” > From bfefcb20607ab5330d9e7796d1f56fcaae5f47ee Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Wed, 8 Apr 2015 16:32:45 +0800 Subject: [PATCH 0499/2517] translating wi-cuckoo --- .../tech/20150407 How To Install CentOS Web Panel In CentOS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md b/sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md index ccad9d1b87..d5638aeb7e 100644 --- a/sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md +++ b/sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md @@ -1,3 +1,4 @@ +translating wi-cuckoo LLAP How To Install CentOS Web Panel In CentOS ================================================================================ ![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/04/centos-790x427.jpg) @@ -326,4 +327,4 @@ via: http://www.unixmen.com/how-to-install-centos-web-panel-in-centos/ [a]:http://www.unixmen.com/author/sk/ [1]:http://centos-webpanel.com/ -[2]:http://wiki.centos-webpanel.com/ \ No newline at end of file +[2]:http://wiki.centos-webpanel.com/ From 58ad8990680a051326f520be05f28b2367bf2e15 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Wed, 8 Apr 2015 17:36:22 +0800 Subject: [PATCH 0500/2517] Delete 20150330 Picty--Managing Photos Made Easy.md --- ...150330 Picty--Managing Photos Made Easy.md | 103 ------------------ 1 file changed, 103 deletions(-) delete mode 100644 sources/share/20150330 Picty--Managing Photos Made Easy.md diff --git a/sources/share/20150330 Picty--Managing Photos Made Easy.md b/sources/share/20150330 Picty--Managing Photos Made Easy.md deleted file mode 100644 index ab1c8a094d..0000000000 --- a/sources/share/20150330 Picty--Managing Photos Made Easy.md +++ /dev/null @@ -1,103 +0,0 @@ -Translating by H-mudcup -Picty: Managing Photos Made Easy -================================================================================ -![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/picty_002-790x429.png) - -### About Picty ### - -**Picty** is a free, simple, yet powerful photo collection manager that will help you to manage your photos. It is designed around managing **metadata** and a **lossless** approach to image handling. Picty currently supports both online(web-based) and offline(local) collections. In local collections, the images will be stored in a local folder and it’s sub-folders. A database will be maintained to speed up the image queries in the user’s home folder. In online(web-based) collections, you can upload and share images through a web browser. Ant user with proper rights can share photos to any persons, and each user can have multiple collections open at once and collections can be shared by multiple users. There is a simple interface for transferring images between collections using a transfer plugin. - -You can download any number of photos from your Camera or any devices. Also, Picty allows you to browse photo collections from your Camera before downloading it. Picty is lightweight application, and has snappy interface. It supports Linux, and Windows platforms. - -### Features ### - -- Supports big photo collections (20,000 plus images). -- Open more than one collection at a time and transfer images between them. -- Collections are: - - Folders of images in your local file system. - - Images on cameras, phones and other media devices. - - Photo hosting services (Flickr currently supported). -- picty does not “Import” photos into its own database, it simply provides an interface for accessing them wherever they are. To keep things snappy and to allow you to browse even if you are offline, picty maintains a cache of thumbnails and metadata. -- Reads and writes metadata in industry standard formats Exif, IPTC and Xmp -- Lossless approach: - - picty writes all changes including image edits as metadata. e.g. an image crop is stored as any instruction, the original pixels remain in the file - - Changes are stored in picty’s collection cache until you save your metadata changes to the images. You can easily revert unsaved changes that you don’t like. -- Basic image editing: - - Current support for basic image enhancements such as brightness, contrast, color, cropping, and straightening. - - Improvements to those tools and other tools coming soon (red eye reduction, levels, curves, noise reduction) -- Image tagging: - - Use standard IPTC and Xmp keywords for image tags - - A tag tree view lets you easily manage your tags and navigate your collection -- Folder view: - - Navigate the directory heirarchy of your image collection -- Multi-monitor support - - picty can be configured to let you browse your collection on one screen and view full screen images on another. -- Customizable - - Create launchers for external tools - - Supports plugins – many of the current features (tagging and folder views, and all of the image editing tools) are provided by plugins - - Written in python – batteries included! - -### Installation ### - -#### 1. Install from PPA #### - -Picty developers has a PPA for Debian based distributions, like Ubuntu, to make the installation much easier. - -To install in Ubuntu and derivatives, run: - - sudo add-apt-repository ppa:damien-moore/ppa - sudo apt-get update - sudo apt-get install picty - -#### 2. Install from Source #### - -Also, you can install it from Source files. First, install the following dependencies. - - sudo apt-get install bzr python-pyinotify python-pyexiv2 python-gtk2 python-gnome2 dcraw python-osmgpsmap python-flickrapi - -Then, get the latest version using command: - - bzr branch lp:picty - -To run picty, change to the picty directory, and enter: - - cd picty - bin/picty - -To update to the latest version, run: - - cd picty - bzr pull - -### Usage ### - -Launch Picty either from Menu or Unity Dash. - -![picty_001](http://www.unixmen.com/wp-content/uploads/2015/03/picty_001.png) - -You can either choose existing collection, device or directory. Let us create a **new collection**. To do that, create New Collection button. Enter the collection, and browse to the path where you have the images stored. Finally, click **Create** button. - -![Create a Collection_001](http://www.unixmen.com/wp-content/uploads/2015/03/Create-a-Collection_001.png) - -![picty_002](http://www.unixmen.com/wp-content/uploads/2015/03/picty_002.png) - -You can modify, rotate, add/remove tags, set descriptive info of each images. To do that, just right click any image and do the actions of your choice. - -Visit the following Google group to get more information and support about Picty Photo manager. - -- [http://groups.google.com/group/pictyphotomanager][1] - -Cheers! - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/picty-managing-photos-made-easy/ - -作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/sk/ -[1]:http://groups.google.com/group/pictyphotomanager From 9a9778b12330c67d7cfec6462d01b85a29dfd65f Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Wed, 8 Apr 2015 17:37:15 +0800 Subject: [PATCH 0501/2517] Create 20150330 Picty--Managing Photos Made Easy.md --- ...150330 Picty--Managing Photos Made Easy.md | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 translated/share/20150330 Picty--Managing Photos Made Easy.md diff --git a/translated/share/20150330 Picty--Managing Photos Made Easy.md b/translated/share/20150330 Picty--Managing Photos Made Easy.md new file mode 100644 index 0000000000..644501a65e --- /dev/null +++ b/translated/share/20150330 Picty--Managing Photos Made Easy.md @@ -0,0 +1,104 @@ +Translated by H-mudcup + +Picty:让图片管理变简单 +================================================================================ +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/picty_002-790x429.png) + +### 关于Picty ### + +**Picty**是个免费,简单,却强大的照片收藏管理器,它可以帮助你管理你的照片。它的设计围绕着管理**元数据**和**无损**的处理图像的方法。Picty目前同时支持在线(基于网页的)和离线(本地的)收藏集。在本地的收藏集中,图片将被保存在一个本地的文件夹和它的子文件夹中。为了加快用户主目录里图片的查询速度,它会维持一个数据库。在在线(基于网页的)收藏集中,你可以通过网页浏览器上传并分享图片。拥有适当权限的个人用户可以把图片分享给任何人,而且每个用户可以同时开放多个收藏集,收藏集也可以被多个用户分享。通过一个转载插件在收藏集间传递图片就有了个简单的交互界面。 + +你可以从你的相机或任何设备中下载任何数量的照片。除此之外,Picty允许你在下载前浏览在你相机里的图片集。Picty是个轻量级的应用,还有着清爽的界面。它支持Linux和Windows平台。 + +### 功能 ### + +- 支持大相片集(20000张以上)。 +- 同时开放多个收藏集还可以在它们之间传照片。 +- 收藏集包括: + - 本地文件系统中保存图片的文件夹。 + - 相机、电话及其他媒体设备中的图片。 + - 图片保存服务(目前支持Flickr) +- Picty不是把相片“导入”到它的数据库中,它仅仅提供了一个界面来访问它们,不管它们保存在哪。为了保持迅速的反应以及能使你在离线时浏览图片的能力,Picty会保存缩略图和元数据的缓存。 +- 以业界标准格式Exif、IPTC和Xmp读写元数据。 +- 无损的方法: + - Picty把所有改变包括图像编辑以元数据写入。例如,一个图片可以以任何方式剪切保存,原来的像素仍然保存在该文件里。 + - 修改会保存在Picty的收藏集缓存中直到你把你对元数据的修改保存到图片中。你能很容易撤销你不喜欢的未保存的修改。 +- 基本图片编辑: + - 目前支持基本的图像增强,如亮度、对比度、色彩、剪切以及矫正。 + - Improvements to those tools and other tools coming soon (red eye reduction, levels, curves, noise reduction)对这些工具的改善和其他的工具即将到来。(红眼消除、拉伸、弯曲、噪声消除) +- 图片标签: + - 使用标准的IPTC和Xmp关键词为图片做标签。 + - 一个树状标签图让你能很容易的管理标签和对你的收藏集进行导航。 +- 文件夹视图: + - 按照目录的结构对你的图片收藏进行导航 +- 支持多屏显示 + - Picty可以设置成让你在一个屏幕上浏览你的收藏集同时在另一个屏幕上全屏显示图片。 +- 可个性化 + - 可以为外部工具创建快捷方式 + - 支持插件——目前提供的功能中有许多(标签和文件夹视图以及所有的图片编辑工具)都可以通过插件提供。 + - 使用Python编写——自带batteries!(python的这个特点使它可在mac、Linux和windows上直接安装使用,无需复杂的设置。) + +### 安装方法 ### + +#### 1、从PPA安装 #### + +Picty开发人员为基于Debian的发行版,如Ubuntu,创建了一个PPA,让安装更简单。 + +要在Ubuntu和它的衍生版上安装,请运行以下命令: + + sudo add-apt-repository ppa:damien-moore/ppa + sudo apt-get update + sudo apt-get install picty + +#### 2、从源文件安装 #### + +此外,你还可以从源文件安装。首先安装如下依赖项。 + + sudo apt-get install bzr python-pyinotify python-pyexiv2 python-gtk2 python-gnome2 dcraw python-osmgpsmap python-flickrapi + +然后,使用下面这个命令得到最新版本: + + bzr branch lp:picty + +要运行Picty,先转到Picty所在的目录,然后输入: + + cd picty + bin/picty + +要想更新到最新版,请运行: + + cd picty + bzr pull + +### 使用方法 ### + +可以从目录或Unity Dash启动Picty。 + +![picty_001](http://www.unixmen.com/wp-content/uploads/2015/03/picty_001.png) + +你可以选择已存在的收藏集、设备或目录。让我们创建一个**新收藏集** 。要这样做,得先点击新收藏集(New Collection)按钮。进入收藏集,然后浏览都你保存图片的地方。最后,点击**创建(Create)**按钮。 + +![Create a Collection_001](http://www.unixmen.com/wp-content/uploads/2015/03/Create-a-Collection_001.png) + +![picty_002](http://www.unixmen.com/wp-content/uploads/2015/03/picty_002.png) + +你可以修改,旋转,添加/移除标签,设置每个图片的描述。要这么做,只需右击任何一个图片然后爱做什么做什么。 + +访问下面这个Google组可以得到更多关于Picty相片管理器的信息和支持。 + +- [http://groups.google.com/group/pictyphotomanager][1] + +干杯! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/picty-managing-photos-made-easy/ + +作者:[SK][a] +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://groups.google.com/group/pictyphotomanager From 09a87c2d4b33473cec171dd07f2b231a32d5bb87 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 9 Apr 2015 09:21:50 +0800 Subject: [PATCH 0502/2517] Remove duplicate article --- ...terview with Git Creator Linus Torvalds.md | 133 ------------------ 1 file changed, 133 deletions(-) delete mode 100644 sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md diff --git a/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md b/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md deleted file mode 100644 index 69ce4ba338..0000000000 --- a/sources/talk/20150407 10 Years of Git--An Interview with Git Creator Linus Torvalds.md +++ /dev/null @@ -1,133 +0,0 @@ -Git的十年:采访Git的创造者Linus Torvalds -================================================================================ -> Linus Torvalds解释了他为什么会创造Git -> -> ![](http://www.linuxveda.com/wp-content/uploads/2014/10/Linus_Torvalds.jpg) -> -> 感谢Linus的Git,如今GitHub已经是全世界最大的代码托管网站,它拥有九百万用户和超过两千一百一十万个代码库。 -> -> 来自Swapnil Bhartiya - -> -> Git将会在本月庆祝它的十周年庆。这是Linus Torvalds除了Sub Surface和Linux之外全世界范围内的另外一个庆祝会。 [Linux基金会的Jennifer Cloer采访了这位Linux之父][2] 并且给我们带来了Git背后的许多故事。 -> -> 当Cloer问及Linus为什么会创造Git时,他是这么回答的: -> -> “我其实根本没想过要做源代码控制管理系统,我感觉在计算机世界里那是一件很没劲的事情(数据库可能是例外 ;^),我要很讨厌富有激情的软件配置管理。” -> -> 接着他拿他一开始使用的BitKeeper调侃了起来: -> -> “BK有很多很棒的功能,它拥有代码库的本地拷贝,分布式合并也是一个好做法。” -> -> 但是他并不满意: -> -> “I had performance requirements that were not even remotely satisfied by what was available, and I also worried about integrity of the code and the whole workflow, so I ended up just deciding to write my own.” -> -> And the rest is history. Today GitHub is the world’s biggest code hoster in the world with over 9 million users and over 21.1 million repositories. -> -> via:http://www.linuxveda.com/2015/04/06/linus-torvalds-explains-why-he-created-git/ - -![](http://www.linux.com/images/stories/714/Linus-Torvalds-LinuxCon-Europe-2014.jpg) - -Ten years ago this week, the Linux kernel community faced a daunting challenge: They could no longer use their revision control system BitKeeper and no other Software Configuration Management (SCMs) met their needs for a distributed system. Linus Torvalds, the creator of Linux, took the challenge into his own hands and disappeared over the weekend to emerge the following week with Git. Today Git is used for thousands of projects and has ushered in a new level of social coding among programmers. - -To celebrate this milestone, we asked Linus to share the behind-the-scenes story of Git and tell us what he thinks of the project and its impact on software development. You'll find his comments in the story below. We'll follow this Q&A with a week of Git in which we profile a different project each day that is using the revision control system. Look for the stories behind KVM, Qt, Drupal, Puppet and Wine, among others. - -### Why did you create Git? ### - -**Torvalds**: I really never wanted to do source control management at all and felt that it was just about the least interesting thing in the computing world (with the possible exception of databases ;^), and I hated all SCM's with a passion. But then BitKeeper came along and really changed the way I viewed source control. BK got most things right and having a local copy of the repository and distributed merging was a big deal. The big thing about distributed source control is that it makes one of the main issues with SCM's go away - the politics around "who can make changes." BK showed that you can avoid that by just giving everybody their own source repository. But BK had its own problems, too; there were a few technical choices that caused problems (renames were painful), but the biggest downside was the fact that since it wasn't open source, there was a lot of people who didn't want to use it. So while we ended up having several core maintainers use BK - it was free to use for open source projects - it never got ubiquitous. So it helped kernel development, but there were still pain points. - -That then came to a head when Tridge (Andrew Tridgell) started reverse-engineering the (fairly simply) BK protocol, which was against the usage rules for BK. I spent a few weeks (months? It felt that way) trying to mediate between Tridge and Larry McVoy, but in the end it clearly wasn't working. So at some point I decided that I can't continue using BK, but that I really didn't want to go back to the bad old pre-BK days. Sadly, at the time, while there were some other SCM's that kind of tried to get the whole distributed thing, none of them did it remotely well. I had performance requirements that were not even remotely satisfied by what was available, and I also worried about integrity of the code and the whole workflow, so I ended up just deciding to write my own. - -### How did you approach it? Did you stay up all weekend to write it or was it just during regular hours? ### - -**Torvalds**: Heh. You can actually see how it all took shape in the git source code repository, except for the very first day or so. It took about a day to get to be "self-hosting" so that I could start committing things into git using git itself, so the first day or so is hidden, but everything else is there. The work was clearly mostly during the day, but there's a few midnight entries and a couple of 2 a.m. ones. The most interesting part is how quickly it took shape ; the very first commit in the git tree is not a lot of code, but it already did the basics - enough to commit itself. The trick wasn't really so much the coding but coming up with how it organizes the data. - -So I'd like to stress that while it really came together in just about ten days or so (at which point I did my first *kernel* commit using git), it wasn't like it was some kind of mad dash of coding. The actual amount of that early code is actually fairly small, it all depended on getting the basic ideas right. And that I had been mulling over for a while before the whole project started. I'd seen the problems others had. I'd seen what I wanted to avoid doing. - -### Has it lived up to your expectations? How is it working today in your estimation? Are there any limitations? ### - -**Torvalds**: I'm very happy with git. It works remarkably well for the kernel and is still meeting all my expectations. What I find interesting is how it took over so many other projects, too. Surprisingly quickly, in the end. There is a lot of inertia in switching source control systems; just look at how long CVS and even RCS have stayed around, but at some point git just took over. - -### Why do you think it's been so widely adopted? ### - -**Torvalds**: I think that many others had been frustrated by all the same issues that made me hate SCM's, and while there have been many projects that tried to fix one or two small corner cases that drove people wild, there really hadn't been anything like git that really ended up taking on the big problems head on. Even when people don't realize how important that "distributed" part was (and a lot of people were fighting it), once they figure out that it allows those easy and reliable backups, and allows people to make their own private test repositories without having to worry about the politics of having write access to some central repository, they'll never go back. - -### Does Git last forever, or do you foresee another revision control system in another 10 years? Will you be the one to write it? ### - -**Torvalds**: I'm not going to be the one writing it, no. And maybe we'll see something new in ten years, but I guarantee that it will be pretty "git-like." It's not like git got everything right, but it got all the really basic issues right in a way that no other SCM had ever done before. - -No false modesty ;) - -### Why does Git work so well for Linux? ### - -**Torvalds**: Well, it was obviously designed for our workflow, so that is part of it. I've already mentioned the whole "distributed" part many times, but it bears repeating. But it was also designed to be efficient enough for a biggish project like Linux, and it was designed to do things that people considered "hard" before git - because those are the things *I* do every day. - -Just to pick an example: the concept of "merging" was generally considered to be something really quite painful and hard in most SCM's. You'd plan your merges, because they were big deals. That's not acceptable to me, since I commonly do tens of merges a day when in the merge window, and even then, the biggest overhead shouldn't be the merge itself, it should be testing the result. The "git" part of the merge is just a couple of seconds, it should take me much longer just to write the merge explanation message. - -So git was basically designed and written for my requirements, and it shows. - -### People have said that Git is only for super smart people. Even Andrew Morton said Git is "expressly designed to make you feel less intelligent than you thought you were." What's your response to this? ### - -**Torvalds**: So I think it used to be true but isn't any more. There is a few reasons people feel that way, but I think only one of them remains. The one that remains is fairly simple: "you can do things so many ways." - -You can do a lot of things with git, and many of the rules of what you *should* do are not so much technical limitations but are about what works well when working together with other people. So git is a very powerful set of tools, and that can not only be overwhelming at first, it also means that you can often do the same (or similar) things different ways, and they all "work." Generally, the best way to learn git is probably to first only do very basic things and not even look at some of the things you can do until you are familiar and confident about the basics. - -There's a few historical reasons for why git was considered complicated. One of them is that it was complicated. The people who started using git very early on in order to work on the kernel really had to learn a very rough set of scripts to make everything work. All the effort had been on making the core technology work and very little on making it easy or obvious. So git (deservedly) had a reputation for requiring you to know exactly what you did early on. But that was mainly true for the first 6 months or a year. - -The other big reason people thought git was hard is that git is very different. There are people who used things like CVS for a decade or two, and git is not CVS. Not even close. The concepts are different. The commands are different. Git never even really tried to look like CVS, quite the reverse. And if you've used a CVS-like system for a long time, that makes git appear complicated and needlessly different. People were put off by the odd revision numbers. Why is a git revision not "1.3.1" with nice incrementing numbers like it was in CVS? Why is it that odd scary 40-character HEX number? - -But git wasn't "needlessly different." The differences are required. It's just that it made some people really think it was more complicated than it is, because they came from a very different background. The "CVS background" thing is going away. By now there are probably lots of programmers out there who have never used CVS in their lives and would find the CVS way of doing things very confusing, because they learned git first. - -### Do you think the rate of Linux kernel development would have been able to grow at its current rate without Git? Why or why not? ### - -**Torvalds**: Well, "without git," sure. But it would have required that somebody else wrote something git-equivalent: a distributed SCM that is as efficient as git is. We definitely needed something *like* git. - -### What's your latest opinion of GitHub? ### - -**Torvalds**: Github is an excellent hosting service; I have nothing against it at all. Now, the complaints I've had is that GitHub as a development platform - making commits, pull requests, keeping track of issues etc - doesn't work very well at all. It's not even close, not for something like the kernel. It's much too limited. - -That's partly because of how the kernel is developed, but part of it was that the GitHub interfaces were actively encouraging bad behavior. Commits done on GitHub had bad commit messages etc, because the web interfaces at GitHub were actively encouraging bad behavior. They did fix some of that, so it probably works better, but it will never be appropriate for something like the Linux kernel. - -### What is the most interesting use you've seen for Git and/or GitHub? ### - -**Torvalds**: I'm just happy that it made it so easy to start a new project. Project hosting used to be painful, and with git and GitHub it's just so trivial to do a random small project. It doesn't matter what the project is; what matters is that you can do it. - -### Do you have side projects up your sleeve today? Any more brilliant software projects that will dominate software development for years to come? ### - -**Torvalds**: Nothing planned. But I'll let you know if that changes. - -Atlassian is also helping to celebrate the anniversary of Git. Click on the image below to [take a walk down memory lane][1]. - -![](http://www.linux.com/images/stories/714/AtlassianGit10year.jpg) - --------------------------------------------------------------------------------- - -via: http://www.linux.com/news/featured-blogs/185-jennifer-cloer/821541-10-years-of-git-an-interview-with-git-creator-linus-torvalds - -作者:[Jennifer Cloer][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linux.com/community/forums/person/714/catid/185-jennifer-cloer -[1]:https://www.atlassian.com/git/articles/10-years-of-git/ -[2]:http://www.linux.com/news/featured-blogs/185-jennifer-cloer/821541-10-years-of-git-an-interview-with-git-creator-linus-torvalds -[3]: -[4]: -[5]: -[6]: -[7]: -[8]: -[9]: -[10]: -[11]: -[12]: -[13]: -[14]: -[15]: -[16]: -[17]: -[18]: -[19]: -[20]: From c9ca4f9c872187c93d901878c7ff6eadccbf773f Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 9 Apr 2015 10:29:02 +0800 Subject: [PATCH 0503/2517] [Translating]share/20150323 Red Hat Developer Toolset 3.1 beta arrives --- .../share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md b/sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md index 9faf1f2eb4..8b9d0361ce 100644 --- a/sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md +++ b/sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md @@ -1,3 +1,4 @@ +Translating by ictlyh Red Hat Developer Toolset 3.1 beta arrives ================================================================================ > **Summary**:Want the newest developer tools for Red Hat Enterprise Linux 6 or 7? The beta's ready for you now. From a5120f752a5f438bf63ff06bae08464ca785486a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 9 Apr 2015 10:32:30 +0800 Subject: [PATCH 0504/2517] [Translating]tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites --- ...ne Based Tools for Downloading Files and Browsing Websites.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md b/sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md index 1bbc9e9928..9fb5fc99f6 100644 --- a/sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md +++ b/sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md @@ -1,3 +1,4 @@ +Translating by ictlyh 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites ================================================================================ Linux command-line, the most adventurous and fascinating part of GNU/Linux is very cool and powerful tool. Command line itself is very productive and the availability of various inbuilt and third party command line application makes Linux robust and powerful. The Linux Shell supports a variety of web application of various kind be it torrent downloader, dedicated downloader or Internet Surfing. From 01b56af9f8cb20cce9708e4b12ccd21a64221c7c Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 9 Apr 2015 12:33:24 +0800 Subject: [PATCH 0505/2517] [Translated]share/20150323 Red Hat Developer Toolset 3.1 beta arrives --- ... Hat Developer Toolset 3.1 beta arrives.md | 53 ------------------- ... Hat Developer Toolset 3.1 beta arrives.md | 52 ++++++++++++++++++ 2 files changed, 52 insertions(+), 53 deletions(-) delete mode 100644 sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md create mode 100644 translated/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md diff --git a/sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md b/sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md deleted file mode 100644 index 8b9d0361ce..0000000000 --- a/sources/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md +++ /dev/null @@ -1,53 +0,0 @@ -Translating by ictlyh -Red Hat Developer Toolset 3.1 beta arrives -================================================================================ -> **Summary**:Want the newest developer tools for Red Hat Enterprise Linux 6 or 7? The beta's ready for you now. - -It's one of those eternal problems between developers and operators that even [DevOps][1] can't entirely solve. System administrators want the most stable operating system possible, while programmers want the latest and greatest development tools. [Red Hat][2]'s solution for this dilemma has been to take those brand spanking-new tools, test them out on the latest stable [Red Hat Enterprise Linux (RHEL)][3], and then release them to developers. - -![Red Hat Developer Toolset](http://zdnet4.cbsistatic.com/hub/i/2015/03/18/d92b1067-6b36-4ff0-ac9e-608fbe3e8c5d/ae80362df5401a37e3cbcd2598f33370/rhel-dev-tools.png) -Red Hat Developer Toolset - -So it is that Red Hat has just announced its latest toys for developers, [Red Hat Developer Toolset 3.1][4]. This packaging of the hottest new tools is now available in beta. - -This update includes: - -[GNUCompiler Collection (GCC) 4.9][5]: the latest stable upstream version of GCC, which provides numerous improvements and bug fixes - -[Eclipse 4.4.1][6]: with support for Java 8 and updated versions of Eclipse CDT (8.5), Eclipse Linux Tools (3.1), Eclipse Mylyn (3.14), and Eclipse Egit/Jgit (3.6.1) - -Numerous additional updated packages: These include GDB 7.8.2, elfutils 0.161, memstomp 0.1.5, SystemTap 2.6, Valgrind 3.10.1, Dyninst 8.2.1, and ltrace 0.7.91. - -With these development programs, you'll be able to create applications for RHEL 6 and 7.x. These apps will then run on RHEL regardless of whether you're running it on a physical, virtual or cloud environments. They will also run on Red Hat's [OpenShift][7], its Platform-as-a-Service (PaaS) offering. - -This new set of developer programs includes packages for both RHEL 7 and 7 running on [AMD64 and Intel 64 architectures][8]. Although the tools are 64-bit you can use them to create and modify 32-bit binaries. - -Before you try running any of these programs, you should patch RHEL with all the latest updates. To install the beta Toolset, your systems need to be subscribed to the Optional channel to access all the required Red Hat Developer Toolset tool-chain packages. - -In addition, if you've installed earlier Toolkits you may run into some [problems while installing Toolkit 3.1][9]. While these difficulties are easy enough to fix, you should go over these possible hiccups before trying to install the new Toolkit. - -Finally, you may notice that some of the most exciting of the new tools, such as Docker, Kubernetes, and other container tools aren't here. That's because they're in the newly released [RHEL 7.1][10] and [Red Hat Enterprise Linux 7 Atomic Host (RHELAH)][11]. [Red Hat has partnered with Docker][12], but you'll need to move to a Docker-friendly version of RHEL to get at these container-friendly programs. - --------------------------------------------------------------------------------- - -via: http://www.zdnet.com/article/red-hat-developer-toolset-3-1-beta-arrives/ - -作者:[Steven J. Vaughan-Nichols][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.zdnet.com/meet-the-team/us/sjvn/ -[1]:http://blogs.csc.com/2015/02/03/devops-theory-for-beginners/ -[2]:http://www.redhat.com/en -[3]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux -[4]:http://www.redhat.com/en/about/blog/red-hat-developer-toolset-31-beta-now-available -[5]:https://gcc.gnu.org/gcc-4.9/ -[6]:https://projects.eclipse.org/projects/eclipse/releases/4.4.1 -[7]:https://www.openshift.com/ -[8]:https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3-Beta/html/3.1_Release_Notes/System_Requirements.html -[9]:https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3-Beta/html/3.1_Release_Notes/DTS3.1_Release.html#Known_Issues -[10]:http://www.zdnet.com/article/red-hat-7-1-is-here-centos-7-1-is-coming-soon/ -[11]:http://www.zdnet.com/article/red-hat-buys-into-docker-containers-with-atomic-host/ -[12]:http://www.zdnet.com/article/red-hat-partners-with-docker-to-create-linuxdocker-software-stack/ \ No newline at end of file diff --git a/translated/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md b/translated/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md new file mode 100644 index 0000000000..8d629f3679 --- /dev/null +++ b/translated/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md @@ -0,0 +1,52 @@ +红帽开发者工具集3.1测试版发布了 +================================================================================ +> **Summary**:想要最新的红帽企业版Linux6或者7开发者工具?测试版已经发布啦. + +这是[DevOps][1]也不能完全解决的开发商和运营商之间永恒的问题之一。系统管理员想要最稳定的操作系统,而程序员想要最新最棒的开发工具。[红帽公司][2]对这个两难问题的解决方法就是用最新的稳定版[Red Hat Enterprise Linux (RHEL)][3]去测试这些新品牌工具,然后向开发者发布。 + +![红帽开发者工具集](http://zdnet4.cbsistatic.com/hub/i/2015/03/18/d92b1067-6b36-4ff0-ac9e-608fbe3e8c5d/ae80362df5401a37e3cbcd2598f33370/rhel-dev-tools.png) +红帽开发者工具集 + +基于此红帽刚刚公布了给开发者的最新玩具,[红帽开发者工具集 3.1][4]。现在可以获得这些最热门工具包的测试版了。 + +这次更新包括: + +[GNUCompiler Collection (GCC) 4.9][5]: 最新的GCC上游稳定版本,提供多处改进和bug修复 + +[Eclipse 4.4.1][6]: 支持Java 8 以及更新了的Eclipse CDT(8.5)版本,Eclipse Linux Tools (3.1), Eclipse Mylyn (3.14), 和 Eclipse Egit/Jgit (3.6.1) + +众多额外的更新包: 包括 GDB 7.8.2, elfutils 0.161, memstomp 0.1.5, SystemTap 2.6, Valgrind 3.10.1, Dyninst 8.2.1, 以及 ltrace 0.7.91. + +用这些开发工具,你可以给RHEL 6 和 7.x 开发应用程序。这些应用程序可以在RHEL上运行,不管是物理机,虚拟机还是云环境。它们也可以在红帽提供的Platform-as-a-Service (PaaS)服务[OpenShift][7]上运行。 + +这些新的开发者程序集有RHEL 7 以及 运行在[AMD64 和 Intel 64 架构][8]上的安装包。尽管这些工具都是64位的,你也可以用它们创建或者更改32位的二进制文件。 + +在运行任何这些程序之前,你应该安装RHEL所有最近的更新。要安装这个测试工具集,你的系统需要选中可选渠道来获取所有红帽开发者工具集需要的工具链包。 + +另外,如果已经安装了早期版本的工具集,可能会遇到[安装Toolkit 3.1 时的一些问题][9]。尽管这些问题很容易解决,在安装新的工具集之前还是应该大概看一下这些可能出现的问题。 + +最后,你可能注意到一些最令人激动的工具,例如Docker,Kubernetes以及其它这里没有的容器工具。因为它们在最新的发行版[RHEL 7.1][10] 和 [Red Hat Enterprise Linux 7 Atomic Host (RHELAH)][11]中。[红帽和Docker已成为合作伙伴][12],要获取这些容器友好的程序,你需要转换到Docker友好的RHEL版本上来。 + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/red-hat-developer-toolset-3-1-beta-arrives/ + +作者:[Steven J. Vaughan-Nichols][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.zdnet.com/meet-the-team/us/sjvn/ +[1]:http://blogs.csc.com/2015/02/03/devops-theory-for-beginners/ +[2]:http://www.redhat.com/en +[3]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[4]:http://www.redhat.com/en/about/blog/red-hat-developer-toolset-31-beta-now-available +[5]:https://gcc.gnu.org/gcc-4.9/ +[6]:https://projects.eclipse.org/projects/eclipse/releases/4.4.1 +[7]:https://www.openshift.com/ +[8]:https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3-Beta/html/3.1_Release_Notes/System_Requirements.html +[9]:https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3-Beta/html/3.1_Release_Notes/DTS3.1_Release.html#Known_Issues +[10]:http://www.zdnet.com/article/red-hat-7-1-is-here-centos-7-1-is-coming-soon/ +[11]:http://www.zdnet.com/article/red-hat-buys-into-docker-containers-with-atomic-host/ +[12]:http://www.zdnet.com/article/red-hat-partners-with-docker-to-create-linuxdocker-software-stack/ \ No newline at end of file From fd998cd2f00d05b599b23038c6294df5899380be Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 9 Apr 2015 12:34:40 +0800 Subject: [PATCH 0506/2517] [Translated]tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites --- ...Downloading Files and Browsing Websites.md | 157 ------------------ ...Downloading Files and Browsing Websites.md | 156 +++++++++++++++++ 2 files changed, 156 insertions(+), 157 deletions(-) delete mode 100644 sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md create mode 100644 translated/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md diff --git a/sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md b/sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md deleted file mode 100644 index 9fb5fc99f6..0000000000 --- a/sources/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md +++ /dev/null @@ -1,157 +0,0 @@ -Translating by ictlyh -5 Linux Command Line Based Tools for Downloading Files and Browsing Websites -================================================================================ -Linux command-line, the most adventurous and fascinating part of GNU/Linux is very cool and powerful tool. Command line itself is very productive and the availability of various inbuilt and third party command line application makes Linux robust and powerful. The Linux Shell supports a variety of web application of various kind be it torrent downloader, dedicated downloader or Internet Surfing. - -![Command Line Internet Tools](http://www.tecmint.com/wp-content/uploads/2014/02/Command-Line-Internet-Tools.jpg) -5 Command Line Internet Tools - -Here we are presenting 5 great command line Internet tools, which are very useful and proves to be very handy. - -### 1. rTorrent ### - -rTorrent is a text­-based Torrent Client which is written in C++ aimed at high performance. It is available for most of the standard Linux Distributions including FreeBSD and Mac OS X. - -#### Installation of rTorrent #### - - # apt­-get install rtorrent (on APT based System) - ----------- - - # yum install rtorrent (on YUM based System) - -Check if rtorrent is installed correctly by running the following command in the terminal. - - # rtorrent - -![Command line torrent download](http://www.tecmint.com/wp-content/uploads/2014/02/rTorrent.jpeg) -rTorrent Command Line Tool - -#### Functioning of rTorrent #### - -Some of the useful Key-bindings and their use. - -- CTRL+ q – Quit rTorrent Application -- CTRL+ s – Start Download -- CTRL+ d – Stop an active Download or Remove an already stopped Download. -- CTRL+ k – Stop and Close an active Download. -- CTRL+ r – Hash Check a torrent before Upload/Download Begins. -- CTRL+ q – When this key combination is executed twice, rTorrent shutdown without sending a stop Signal. -- Left Arrow Key – Redirect to Previous screen. -- Right Arrow Key – Redirect to Next Screen - -### 2. Wget ### - -Wget, is a part of GNU Project, the name is derived from World Wide Web (WWW). Wget is a brilliant tool which is useful for recursive download, offline viewing of HTML from local Server and is available for most of the platforms be it Windows, Mac, Linux. Wget makes it possible to download files over HTTP, HTTPS and FTP. Moreover it can be useful in mirroring the whole website as well as support for proxy browsing, pausing/resuming Downloads. - -#### Installation of Wget #### - -Wget being a GNU project comes bundled with Most of the Standard Linux Distributions and there is no need to download and install it separately. If in-case, it’s not installed by default, you can still install it using apt or yum. - - # apt­-get install wget (on APT based System) - ----------- - - # yum install wget (on YUM based System) - -#### Some Basic Usage of Wget #### - -Download a single file using wget. - - # wget http://www.website-name.com/file - -Download a whole website, recursively. - - # wget -r http://www.website-name.com - -Download specific type of file (say pdf and png) from a website. - - # wget -r -A png,pdf http://www.website-name.com - -Wget is a wonderful tool which enables custom and filtered download even on limited resource Machine. A screen shot of wget download, where we are mirroring a website (Yahoo.com). - -![Wget Download Files](http://www.tecmint.com/wp-content/uploads/2014/02/Wget.jpeg) -Wget Command Line File Download - -For more such wget download examples, read our article that shows [10 Wget Download Command Examples][1]. - -### 3. cURL ### - -cURL is a command line tool for transferring data over a number of protocols. cURL is a client side application which support protocols like FTP, HTTP, FTPS, TFTP, TELNET, IMAP, POP3, etc. cURL is a simple downloader which is different from wget in supporting LDAP, POP3 as compared to others. Moreover Proxy Downloading, pausing download, resuming download are well supported in cURL. - -#### Installation of cURL #### - -By default cURL is available in most of the distribution either in repository or installed. if it’s not installed, just do a apt or yum to get a required package from the repository. - - # apt­-get install curl (on APT based System) - ----------- - - # yum install curl (on YUM based System) - -Basic Usage of cURL - - # curl www.tecmint.com - -![Curl Download](http://www.tecmint.com/wp-content/uploads/2014/02/Curl.jpeg) -Curl Data Download - -![Curl Data Download](http://www.tecmint.com/wp-content/uploads/2014/02/Curl-2.jpeg) -Curl Download - -### 4. w3m ### - -The w3m is a text based web browser released under GPL. W3m support tables, frames, color, SSL connection and inline images. W3m is known for fast browsing. - -#### Installation of w3m #### - -Again w3m is available by default in most of the Linux Distribution. If incase, it is not available you can always apt or yum the required package. - - # apt­-get install w3m (on APT based System) - ----------- - - # yum install w3m (on YUM based System) - -#### Basic Usage of w3m #### - - # w3m www.tecmint.com - -![Command Line Browser](http://www.tecmint.com/wp-content/uploads/2014/02/w3m.jpeg) -w3m Text Based Web Browser - -### 5. Elinks ### - -Elinks is a free text-based web browser for Unix and Unix based System. Elinks support HTTP, HTTP Cookies and also support browsing script in Perl and Ruby. Tab based browsing is well supported. The best thing is that it supports Mouse, Display Colours and support a number of Protocols like HTTP, FTP, SMB, Ipv4 and Ipv6. - -#### Installation of Elinks #### - -By default elinks also available in most of the Linux distributions. If not, install it via apt or yum. - - # apt­-get install elinks (on APT based System) - ----------- - - # yum install elinks (on YUM based System) - -Basic Usage of Elinks - - # elinks www.tecmint.com - -![Command Line Internet Browsing](http://www.tecmint.com/wp-content/uploads/2014/02/Elinks.jpeg) -Elinks Command Line Web Browsing - -That’s all for now. I’ll be here again with an interesting article which you people will love to read. Till then stay tuned and connected to Tecmint and don’t forget to give your valuable feedback in comment section. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-command-line-tools-for-downloading-files/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file diff --git a/translated/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md b/translated/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md new file mode 100644 index 0000000000..631c1992c6 --- /dev/null +++ b/translated/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md @@ -0,0 +1,156 @@ +5个基于Linux命令行的文件下载和网站浏览工具 +================================================================================ +GNU/Linux最冒险迷人的部分,Linux命令行,是非常强大的工具。命令行本身功能多样,多种内建或者第三方的命令行应用使得Linux变得更加健壮和强大。Linux Shell支持多种不同类型的网络应用,无论是BT下载软件,专用下载器或者互联网冲浪。 + +![命令行互联网工具](http://www.tecmint.com/wp-content/uploads/2014/02/Command-Line-Internet-Tools.jpg) +5个命令行互联网工具 + +这里我们介绍了5个很好的命令行互联网工具,它们非常有用,也很容易上手。 + +### 1. rTorrent ### + +rTorrent是基于文本,用C++编写,追求高性能的Torrent客户端。支持大部分标准的Linux发行版,包括FreeBSD和Mac OS X。 + +#### 安装rTorrent #### + + # apt­-get install rtorrent (基于 APT 的系统) + +---------- + + # yum install rtorrent (基于 YUM 的系统) + +在终端中用下面的命令检查rtorrent是否正确安装 + + # rtorrent + +![命令行torrent下载器](http://www.tecmint.com/wp-content/uploads/2014/02/rTorrent.jpeg) +rTorrent命令行工具 + +#### rTorrent的功能 #### + +一些有用的快捷键和使用方法 + +- CTRL+ q – 退出rTorrent应用程序 +- CTRL+ s – 开始下载 +- CTRL+ d – 停止运行中的下载或者移除已完成的下载 +- CTRL+ k – 停止并关闭运行中的下载 +- CTRL+ r – 在上传/下载torrent之前进行Hash检查 +- CTRL+ q – 执行两次这个命令,rTorrent会直接退出而不发送停止信号 +- Left Arrow Key – 跳到上一屏幕 +- Right Arrow Key – 跳到下一屏幕 + +### 2. Wget ### + +Wget是GNU项目的一部分,名字由World Wide Web (WWW)衍生而来。Wget是用来递归下载,离线查看本地服务器HTML文件一个很好的工具,它可用于Windows, Max,以及Linux等大部分平台。Wget能通过HTTP,HTTPS和FTP下载文件。另外,能镜像整个网站,支持代理浏览以及暂停/回复下载使得它更为有用。 + +#### 安装Wget #### + +由于是GNE项目的一部分,Wget在大部分标准Linux发行版中都绑定发布,不再需要独立下载安装。如果默认没有安装,你也可以使用apt或者yum安装。 + + # apt­-get install wget (基于 APT 的系统) + +---------- + + # yum install wget (基于 YUM 的系统) + +#### Wget的一些基本用法 #### + +使用wget下载一个单独的文件. + + # wget http://www.website-name.com/file + +递归下载整个网站. + + # wget -r http://www.website-name.com + +从一个网站下载指定类型的文件(例如 pdf 和 png). + + # wget -r -A png,pdf http://www.website-name.com + +Wget是一个很棒的工具,它允许在资源有限的机器上自定义或者过滤下载。这是镜像一个网站(Yahoo.com)的wget下载截图。 + +![Wget 下载文件](http://www.tecmint.com/wp-content/uploads/2014/02/Wget.jpeg) +Wget 命令行文件下载 + +要获取更多wget下载的例子,可以阅读我们的文章[10个Wget下载命令例子][1]。 + +### 3. cURL ### + +cURL是在多种协议上传输数据的命令行工具。cURL是支持FTP, HTTP, FTPS, TFTP, TELNET, IMAP, POP3等协议的客户端应用。和其它相对比,在支持LDAP,POP3方面,cURL是和wget不同的简单下载器。cURL也很好的支持代理下载,暂停下载以及恢复下载。 + +#### 安装cURL #### + +在软件仓库或者已安装软件中,cURL在大部分发行版中默认是可用的。如果没有安装,运行apt或者yum从软件仓库中获取需要的安装包。 + + # apt­-get install curl (基于 APT 的系统) + +---------- + + # yum install curl (基于 YUM 的系统) + +cURL的基本使用方法 + + # curl www.tecmint.com + +![Curl 下载](http://www.tecmint.com/wp-content/uploads/2014/02/Curl.jpeg) +Curl 下载数据 + +![Curl 下载数据](http://www.tecmint.com/wp-content/uploads/2014/02/Curl-2.jpeg) +Curl 下载 + +### 4. w3m ### + +W3m是GPL协议下发布的基于文本的web浏览器。W3m支持表格,帧,颜色,SSL连接以及内联图像。W3m由于快速浏览而出名。 + +#### 安装w3m #### + +W3m在大部分Linux发行版中也是默认可用的。如果不可用的话可以用apt或者yum获取需要的安装包。 + + # apt­-get install w3m (基于 APT 的系统) + +---------- + + # yum install w3m (基于 YUM 的系统) + +#### w3m的基本使用方法 #### + + # w3m www.tecmint.com + +![命令行浏览器](http://www.tecmint.com/wp-content/uploads/2014/02/w3m.jpeg) +基于文本的web浏览器w3m + +### 5. Elinks ### + +Elinks是基于文本,给基于Unix和基于Unix的系统使用的免费web浏览器。Elinks支持 HTTP,HTTP Cookies以及支持浏览Pery和Ruby脚本。也很好的支持基于标签的浏览。最棒的是它支持鼠标,颜色显示以及支持一系列的协议,例如HTTP, FTP, SMB, Ipv4 和 Ipv6。 + +#### 安装Elinks #### + +Elinks在大部分Linux发行版上是默认可用的。如果不是的话,可以通过apt或者yum安装。 + + # apt­-get install elinks (基于 APT 的系统) + +---------- + + # yum install elinks (基于 YUM 的系统) + +Elinks的基本使用方法 + + # elinks www.tecmint.com + +![命令行互联网浏览](http://www.tecmint.com/wp-content/uploads/2014/02/Elinks.jpeg) +Elinks命令行浏览互联网 + +就是这些了。有你们喜欢读的有趣的文章,我会再次来到这里。到那时尽请关注并保持和Tecmint的联系,别忘了在评论部分给我们你的宝贵的反馈。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-command-line-tools-for-downloading-files/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file From 1a8f2a259293052ad575d57b094ef7056e0c2603 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 9 Apr 2015 16:34:53 +0800 Subject: [PATCH 0507/2517] =?UTF-8?q?20150409-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...h Subject, Body and Attachment in Linux.md | 261 ++++++++++++++++++ ...w to Run GUI Apps in a Docker Container.md | 78 ++++++ ...ape - Open Source Vector Graphic Editor.md | 95 +++++++ 3 files changed, 434 insertions(+) create mode 100644 sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md create mode 100644 sources/tech/20150409 How to Run GUI Apps in a Docker Container.md create mode 100644 sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md diff --git a/sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md b/sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md new file mode 100644 index 0000000000..77936b6a67 --- /dev/null +++ b/sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md @@ -0,0 +1,261 @@ +4 Tools Send Email with Subject, Body and Attachment in Linux +================================================================================ +In today's article we will cover a few ways you can use to send emails with attachments from the command line interface on Linux. It can have quite a few uses, for example to send an archive with an application from an application server to email or you can use the commands in scripts to automate some process. For our examples,we will use the file foo.tar.gz as our attachment. + +There are various ways to send emails from command line using different mail clients but here I am sharing few mail client utility used by most users like mailx, mutt and swaks. + +All the tools we will present to you are very popular and present in the repositories of most Linux distributions, you can install them using the following commands: + +For **Debian / Ubuntu** systems + + apt-get install mutt + apt-get install swaks + apt-get install mailx + apt-get install sharutils + +For Red Hat based systems like **CentOS** or **Fedora** + + yum install mutt + yum install swaks + yum install mailx + yum install sharutils + +### 1) Using mail / mailx ### + +The mailx utility found as the default mailer application in most Linux distributions now includes the support to attach file. If it is not available you can easily install using the following commands please take note that this may not be supported in older versions, to check this you can use the command: + + $ man mail + +And the first line should look like this: + +mailx [-BDdEFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr] [-r from-addr] [-h hops] [-A account] [-S variable[=value]] to-addr . . . + +As you can see it supports the -a attribute to add a file to the email and -s attribute to subject to the email. Use few of below examples to send mails. + +**a) Simple Mail** + +Run the mail command, and then mailx would wait for you to enter the message of the email. You can hit enter for new lines. When done typing the message, press Ctrl+D and mailx would display EOT. + +After than mailx automatically delivers the email to the destination. + + $ mail user@example.com + + HI, + Good Morning + How are you + EOT + +**b) To send email with subject** + + $ echo "Email text" | mail -s "Test Subject" user@example.com + +-s is used for defining subject for email. + +**c) To send message from a file** + + $ mail -s "message send from file" user@example.com < /path/to/file + +**d) To send message piped using the echo command** + + $ echo "This is message body" | mail -s "This is Subject" user@example.com + +**e) To send email with attachment** + + $ echo “Body with attachment "| mail -a foo.tar.gz -s "attached file" user@example.com + +-a is used for attachments + +### 2) mutt ### + +Mutt is a text-based email client for Unix-like systems. It was developed over 20 years ago and it's an important part of Linux history, one of the first clients to support scoring and threading capabilities. Use few of below examples to send email. + +**a) Send email with subject & body message from a file** + + $ mutt -s "Testing from mutt" user@example.com < /tmp/message.txt + +**b) To send body message piped using the echo command** + + $ echo "This is the body" | mutt -s "Testing mutt" user@example.com + +**c) To send email with attachment** + + $ echo "This is the body" | mutt -s "Testing mutt" user@example.com -a /tmp/foo.tar.gz + +**d) To send email with multiple attachments** + + $ echo "This is the body" | mutt -s "Testing" user@example.com -a foo.tar.gz –a bar.tar.gz + +### 3) swaks ### + +Swaks stands for Swiss Army Knife for SMTP and it is a featureful, flexible, scriptable, transaction-oriented SMTP test tool written and maintained by John Jetmore. You can use the following syntax to send an email with attachment: + + $ swaks -t "foo@bar.com" --header "Subject: Subject" --body "Email Text" --attach foo.tar.gz + +The important thing about Swaks is that it will also debug the full mail transaction for you, so it is a very useful tool if you also wish to debug the mail sending process: + +As you can see it gives you full details about the sending process including what capabilities the receiving mail server supports, each step of the transaction between the 2 servers. + +### 4) uuencode ### + +Email transport systems were originally designed to transmit characters with a seven-bit encoding -- like ASCII. This meant they could send messages with plain text but not "binary" text, such as program files or image files that used all of an eight-bit byte. The program is used to solve this limitation is “uuencode”( "UNIX to UNIX encoding") which encode the mail from binary format to text format that is safe to transmit & program is used to decode the data is called “uudecode” + +We can easily send binary text such as a program files or image files using uuencode with mailx or mutt email client is shown by following example: + + $ uuencode example.jpeg example.jpeg | mail user@example.com + +### Shell Script : Explain how to send email ### + + #!/bin/bash + + FROM="" + SUBJECT="" + ATTACHMENTS="" + TO="" + BODY="" + + # Function to check if entered file names are really files + function check_files() + { + output_files="" + for file in $1 + do + if [ -s $file ] + then + output_files="${output_files}${file} " + fi + done + echo $output_files + } + + echo "*********************" + echo "E-mail sending script." + echo "*********************" + echo + + # Getting the From address from user + while [ 1 ] + do + if [ ! $FROM ] + then + echo -n -e "Enter the e-mail address you wish to send mail from:\n[Enter] " + else + echo -n -e "The address you provided is not valid:\n[Enter] " + fi + + read FROM + echo $FROM | grep -E '^.+@.+$' > /dev/null + if [ $? -eq 0 ] + then + break + fi + done + + echo + + # Getting the To address from user + while [ 1 ] + do + if [ ! $TO ] + then + echo -n -e "Enter the e-mail address you wish to send mail to:\n[Enter] " + else + echo -n -e "The address you provided is not valid:\n[Enter] " + fi + + read TO + echo $TO | grep -E '^.+@.+$' > /dev/null + if [ $? -eq 0 ] + then + break + fi + done + + echo + + # Getting the Subject from user + echo -n -e "Enter e-mail subject:\n[Enter] " + read SUBJECT + + echo + + if [ "$SUBJECT" == "" ] + then + echo "Proceeding without the subject..." + fi + + # Getting the file names to attach + echo -e "Provide the list of attachments. Separate names by space. + If there are spaces in file name, quote file name with \"." + read att + + echo + + # Making sure file names are poiting to real files + attachments=$(check_files "$att") + echo "Attachments: $attachments" + + for attachment in $attachments + do + ATTACHMENTS="$ATTACHMENTS-a $attachment " + done + + echo + + # Composing body of the message + echo "Enter message. To mark the end of message type ;; in new line." + read line + + while [ "$line" != ";;" ] + do + BODY="$BODY$line\n" + read line + done + + SENDMAILCMD="mutt -e \"set from=$FROM\" -s \"$SUBJECT\" \ + $ATTACHMENTS -- \"$TO\" <<< \"$BODY\"" + echo $SENDMAILCMD + + mutt -e "set from=$FROM" -s "$SUBJECT" $ATTACHMENTS -- $TO <<< $BODY + +**Script Output** + + $ bash send_mail.sh + ********************* + E-mail sending script. + ********************* + + Enter the e-mail address you wish to send mail from: + [Enter] test@gmail.com + + Enter the e-mail address you wish to send mail to: + [Enter] test@gmail.com + + Enter e-mail subject: + [Enter] Message subject + + Provide the list of attachments. Separate names by space. + If there are spaces in file name, quote file name with ". + send_mail.sh + + Attachments: send_mail.sh + + Enter message. To mark the end of message type ;; in new line. + This is a message + text + ;; + +### Conclusion ### + +There are many ways of send emails from command line / shell script but here we have shared 4 tools available for unix / linux based distros. Hope you enjoyed reading our article and please provide your valuable comments and also let us know if you know about any new tools. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-shell-script/send-email-subject-body-attachment-linux/ + +作者:[Bobbin Zachariah][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bobbin/ \ No newline at end of file diff --git a/sources/tech/20150409 How to Run GUI Apps in a Docker Container.md b/sources/tech/20150409 How to Run GUI Apps in a Docker Container.md new file mode 100644 index 0000000000..3545255b32 --- /dev/null +++ b/sources/tech/20150409 How to Run GUI Apps in a Docker Container.md @@ -0,0 +1,78 @@ +How to Run GUI Apps in a Docker Container +================================================================================ +Hi everyone, today we'll learn how we can run GUI Applications inside a [Docker][1] Container. We can easily run most of the common GUI apps without getting into trouble inside a Docker Container. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. + +Here are the quick and easy steps on how we can run a GUI App in a Docker Container. In this tutorial, we'll take Firefox for the example. + +### 1. Installing Docker ### + +First of all, before we start, we must ensure that we have Docker installed in our host Linux Operating System. Here, we are running CentOS 7 as host so, we'll be running yum manager to install docker using the below command. + + # yum install docker + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png) + + # systemctl restart docker.service + +### 2. Creating Dockerfile ### + +Now, as our Docker Daemon is running, we'll now prepare to create our Firefox Docker Container. We'll create a Dockerfile where we'll enter the required configuration to create a working Firefox Container. We'll fetch latest version of CentOS for our Docker Image. To do so, we'll create a file named Dockerfile using our favorite text editor. + + # nano Dockerfile + +Then, we'll add the following lines of configuration into Dockerfile and then save it. + + #!/bin/bash + FROM centos:7 + RUN yum install -y firefox + # Replace 0 with your user / group id + RUN export uid=0 gid=0 + RUN mkdir -p /home/developer + RUN echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd + RUN echo "developer:x:${uid}:" >> /etc/group + RUN echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers + RUN chmod 0440 /etc/sudoers + RUN chown ${uid}:${gid} -R /home/developer + + USER developer + ENV HOME /home/developer + CMD /usr/bin/firefox + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Dockerfile-GUI.png) + +**Note: Please replace 0 with your user and group id in 4th line of the configuration. We can get the uid and gid of current user by running the following command in a shell or a terminal.** + + # id $USER + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/user-id.png) + +### 3. Building Docker Container ### + +We'll now build the container which will work according to the above Dockerfile. It will install firefox web browser and its required packages. It will then set user permission to make it work. Here, the image name is set as firefox, you can name it as your desire. + + # docker build --rm -t firefox . + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/building-firefox-docker.png) + +### 4. Running Docker Container ### + +Now, finally, if everything went cool, we'll be able to run our GUI App ie Mozilla Firefox Browser from inside our firefox Docker Container running in a CentOS 7 Image. + + # docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix firefox + +### Conclusion ### + +Running GUI Apps in a Docker Container is really an awesome experience which will never harm/use your host Filesystem. It is fully dependent on your Docker Container. In this tutorial, we tried Firefox in our CentOS 7 Docker Image with Firefox installed. We can use many more GUI Apps with this technology. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/run-gui-apps-docker-container/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://docker.io/ \ No newline at end of file diff --git a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md new file mode 100644 index 0000000000..afe663f074 --- /dev/null +++ b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md @@ -0,0 +1,95 @@ +Install Inkscape - Open Source Vector Graphic Editor +================================================================================ +Inkscape is an open source vector graphic editing tool which uses Scalable Vector Graphics (SVG) and that makes it different from its competitors like Xara X, Corel Draw and Adobe Illustrator etc. SVG is a widely-deployed royalty-free graphics format developed and maintained by the W3C SVG Working Group. It is a cross platform tool which runs fine on Linux, Windows and Mac OS. + +Inkscape development was started in 2003, Inkscape's bug tracking system was hosted on Sourceforge initially but it was migrated to Launchpad afterwards. Its current latest stable version is 0.91. It is under continuous development and bug fixes and we will be reviewing its prominent features and installing process in the article. + +### Salient Features ### + +Lets review the outstanding features of this application categorically. + +#### Creating Objects #### + +- Drawing different colored sized and shaped freehand lines through pencil tool, straight lines and curves through Bezier (pen) tool, applying freehand calligraphic strokes through calligraphic tool etc +- Creating, selecting, editing and formatting text through text tool. Manipulating text in plain text boxes, on paths or in shapes +- Helps draw various shapes like rectangles, ellipses, circles, arcs, polygons, stars, spirals etc and then resize, rotate and modify (turn sharp edges round) them +- Create and embed bitmaps with simple commands + +#### Object manipulation #### + +- Skewing, moving, scaling, rotating objects through interactive manipulations and pacifying the numeric values +- Performing raising and lowering Z-order operations +- Grouping and ungrouping objects to create a virtual scope for editing or manipulation +- Layers form a hierarchal tree and can be locked or rearranged for various manipulations +- Distribution and alignment commands + +#### Fill and Stroke #### + +- Copy/paste styles +- Pick Color tool +- Selecting colors on a continuous plot based on vectors of RGB, HSL, CMS, CMYK and color wheel +- Gradient editor helps creating and managing multi-stop gradients +- Define an image or selection and use it to pattern fill +- Dashed Strokes can be used with few predefined dashed patterns +- Beginning, middle and ending marks through path markers + +#### Operation on Paths #### + +- Node Editing: Moving nodes and Bezier handles, node alignment and distribution etc +- Boolean operations like yes or no conditions +- Simplifying paths with variable levels or thresholds +- Path insetting and outsetting along with link and offset objects +- Converting bitmap images into paths (color and monochrome paths) through path tracing + +#### Text manipulation #### + +- All installed outlined fonts can be used even for right to left align objects +- Formatting text, letter spacing, line spacing or kerning +- Text on path and on shapes where both text and path or shapes can be edited or modified + +#### Rendering #### + +- Inkscape fully support anti-aliased display which is a technique that reduces or eliminates aliasing by shading the pixels along the border. +- Support for alpha transparency display and PNG export + +### Install Inkscape on Ubuntu 14.04 and 14.10 ### + +In order to install Inkscape on Ubuntu, we will need to first [add its stable Personal Package Archive][1] (PPA) to Advanced Package Tool (APT) repository. Launch the terminal and run following command to add its PPA. + + sudo add-apt-repository ppa:inkscape.dev/stable + +![PPA Inkscape](http://blog.linoxide.com/wp-content/uploads/2015/03/PPA-Inkscape.png) + +Once the PPA has been added to the APT repository we need to update it using following command. + + sudo apt-get update + +![Update APT](http://blog.linoxide.com/wp-content/uploads/2015/03/Update-APT2.png) + +After updating the repository we are ready to install inkscape which is accomplished using the following command. + + sudo apt-get install inkscape + +![Install Inkscape](http://blog.linoxide.com/wp-content/uploads/2015/03/Install-Inkscape.png) + +Congratulation, Inkscape has been installed now and all set for image editing and making full use of feature rich application. + +![Inkscape Main](http://blog.linoxide.com/wp-content/uploads/2015/03/Inkscape-Main1.png) + +### Conclusion ### + +Inkscape is a feature rich graphic editing tool which empowers its user with state of the art capabilities. It is an open source application which is freely available for installation and customizations and supports wide range of file formats including but not limited to JPEG, PNG, GIF and PDF. Visit its [official website][2] for more news and updates regarding this application. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/install-inkscape-open-source-vector-graphic-editor/ + +作者:[Aun Raza][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:https://launchpad.net/~inkscape.dev/+archive/ubuntu/stable +[2]:https://inkscape.org/en/ \ No newline at end of file From c738eb59ba82e315c002fef1a6068fa79d21d408 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 9 Apr 2015 19:11:29 +0800 Subject: [PATCH 0508/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Telegram Messenger Application on Linux.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/share/20150324 How to Install Telegram Messenger Application on Linux.md b/translated/share/20150324 How to Install Telegram Messenger Application on Linux.md index 8721488444..5400bd52ef 100644 --- a/translated/share/20150324 How to Install Telegram Messenger Application on Linux.md +++ b/translated/share/20150324 How to Install Telegram Messenger Application on Linux.md @@ -1,6 +1,6 @@ 如何在Linux上安装Telegram Messenger应用 ================================================================================ -Telegram是和whatsapp类似的及时通讯应用。它有一个非常庞大的用户群。它有很多能和其他通讯应用区分开来的特性。 +Telegram是和whatsapp类似的及时通讯应用。它有一个庞大的用户群,并且很多能和其他通讯应用区分开来的特性。 ![在Linux上安装Telegram](http://www.tecmint.com/wp-content/uploads/2015/03/Install-Telegram-in-Linux.png) Telegram Messenger for Linux @@ -13,19 +13,19 @@ Telegram Messenger for Linux - 有桌面版本 - 第三方开发者可以访问Telegram的应用程序接口(API)。 - 支持Android, iphone/ipad, Windows Phone, Web-Version, PC, Mac 和 Linux。 -- 以上应用支持重度加密和自销毁信息。 +- 以上应用支持高度加密和自销毁信息。 - 可以让你从多种设备和平台查看你的信息。 - 整体的处理和消息传送都非常快 - 为了安全和效率,在全球有分布式服务器 - 开放的API和自由协议 - 没有广告,没有认购费用。-永久免费 -- 强大-没有媒体和聊天限制 +- 功能强大-没有媒体和聊天限制 - 多种安全措施使其免受黑客侵害 - 在群组中回复特定信息。使用@username提醒群组里的多个用户 #### 为什么使用Telegram? #### -当像WhatsApp的和其他的及时通讯应用都提供了几乎同样的功能的情况下,为什么要选择Telegram? +在像WhatsApp以及其他及时通讯应用都提供了几乎同样的功能的情况下,为什么要选择Telegram? 第三方开发者可以使用API这一点就足够了。更多PC的可用性意味着你不必再纠结在你的移动设备上打字,你可以使用你的PC,这样更具有可用性。 @@ -65,12 +65,12 @@ Telegram Messenger for Linux ![Telegram验证码](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Verfication-Code.png) Telegram验证码 -4. 输入你的姓名,昵称并点击“SIGNUP”. +4. 输入你的姓名,昵称并点击“SIGN UP”. ![输入账户详细信息](http://www.tecmint.com/wp-content/uploads/2015/03/Enter-Account-Details.jpeg) 输入账户详细信息 -5. 新建账户之后,我看到这个界面。一切准备就绪,尽管我是Telegram的新用户。这个界面真的很简洁。 +5. 新建账户之后,我看到这个界面。一切准备就绪,尽管我对Telegram还不熟悉。这个界面真的很简洁。 ![Telegram界面](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Interface.jpeg) Telegram界面 @@ -87,7 +87,7 @@ Telegram联系人提示 8. 当联系人加入Telegram的时候,你会收到信息(类似弹出提示)显示[YOUR_CONTACT]加入了Telegram。 -9. 在Linux系统上正式的聊天窗口。 很好的体验… +9. 在Linux系统上正式的聊天窗口。很好的体验… ![联系人加入Telegram消息](http://www.tecmint.com/wp-content/uploads/2015/03/Telegram-Contact-Join-Message.jpeg) 联系人加入Telegram消息 @@ -113,7 +113,7 @@ Telegram联系人提示 - 一开始在2013年(8月14号)发布iPhone版 - 惊人项目背后的人物:Pavel and Nikolai Durov.. -就是这些了。我还会有你喜欢阅读的其它有趣的文章。很高兴能代表Tecmint感谢我们尊贵的读者以及使得我们通过不断的自我进步走到这里的批评者。保持联系!继续评论。如果你关注我们就请和我们分享吧。 +就是这些了。我还会为大家带来你们喜欢阅读的其它有趣文章。很高兴能代表Tecmint,感谢我们尊贵的读者以及使得我们通过不断的自我提升走到这里的批评者。保持联系!继续评论。如果你关注我们那就请分享吧。 - [https://telegram.org/][2] @@ -123,10 +123,10 @@ via: http://www.tecmint.com/install-telegram-in-linux/ 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ [1]:https://tdesktop.com/linux -[2]:https://telegram.org/ \ No newline at end of file +[2]:https://telegram.org/ From 6cbaa482e4333db85b2af229bbc49d59f5ce926b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 10 Apr 2015 08:47:12 +0800 Subject: [PATCH 0509/2517] =?UTF-8?q?20150410-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...un Ubuntu Snappy Core on Raspberry Pi 2.md | 89 +++++++++++ ...od alternative to wget or curl on Linux.md | 144 ++++++++++++++++++ 2 files changed, 233 insertions(+) create mode 100644 sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md create mode 100644 sources/tech/20150410 What is a good alternative to wget or curl on Linux.md diff --git a/sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md b/sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md new file mode 100644 index 0000000000..4b49e3acca --- /dev/null +++ b/sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md @@ -0,0 +1,89 @@ +How to run Ubuntu Snappy Core on Raspberry Pi 2 +================================================================================ +The Internet of Things (IoT) is upon us. In a couple of years some of us might ask ourselves how we ever survived without it, just like we question our past without cellphones today. Canonical is a contender in this fast growing, but still wide open market. The company wants to claim their stakes in IoT just as they already did for the cloud. At the end of January, the company launched a small operating system that goes by the name of [Ubuntu Snappy Core][1] which is based on Ubuntu Core. + +Snappy, the new component in the mix, represents a package format that is derived from DEB, is a frontend to update the system that lends its idea from atomic upgrades used in CoreOS, Red Hat's Atomic and elsewhere. As soon as the Raspberry Pi 2 was marketed, Canonical released Snappy Core for that plattform. The first edition of the Raspberry Pi was not able to run Ubuntu because Ubuntu's ARM images use the ARMv7 architecture, while the first Raspberry Pis were based on ARMv6. That has changed now, and Canonical, by releasing a RPI2-Image of Snappy Core, took the opportunity to make clear that Snappy was meant for the cloud and especially for IoT. + +Snappy also runs on other platforms like Amazon EC2, Microsofts Azure, and Google's Compute Engine, and can also be virtualized with KVM, Virtualbox, or Vagrant. Canonical has embraced big players like Microsoft, Google, Docker or OpenStack and, at the same time, also included small projects from the maker scene as partners. Besides startups like Ninja Sphere and Erle Robotics, there are board manufacturers like Odroid, Banana Pro, Udoo, PCDuino and Parallella as well as Allwinner. Snappy Core will also run in routers soon to help with the poor upgrade policy that vendors perform. + +In this post, let's see how we can test Ubuntu Snappy Core on Raspberry Pi 2. + +The image for Snappy Core for the RPI2 can be downloaded from the [Raspberry Pi website][2]. Unpacked from the archive, the resulting image should be [written to an SD card][3] of at least 8 GB. Even though the OS is small, atomic upgrades and the rollback function eat up quite a bit of space. After booting up your Raspberry Pi 2 with Snappy Core, you can log into the system with the default username and password being 'ubuntu'. + +![](https://farm8.staticflickr.com/7639/16428527263_f7bdd56a0d_c.jpg) + +sudo is already configured and ready for use. For security reasons you should change the username with: + + $ sudo usermod -l + +Alternatively, you can add a new user with the command `adduser`. + +Due to the lack of a hardware clock on the RPI, that the Snappy Core image does not take account of, the image has a small bug that will throw a lot of errors when processing commands. It is easy to fix. + +To find out if the bug affects you, use the command: + + $ date + +If the output is "Thu Jan 1 01:56:44 UTC 1970", you can fix it with: + + $ sudo date --set="Sun Apr 04 17:43:26 UTC 2015" + +adapted to your actual time. + +![](https://farm9.staticflickr.com/8735/16426231744_c54d9b8877_b.jpg) + +Now you might want to check if there are any updates available. Note that the usual commands: + + $ sudo apt-get update && sudo apt-get distupgrade + +will not get you very far though, as Snappy uses its own simplified package management system which is based on dpkg. This makes sense, as Snappy will run on a lot of embedded appliances, and you want things to be as simple as possible. + +Let's dive into the engine room for a minute to understand how things work with Snappy. The SD card you run Snappy on has three partitions besides the boot partition. Two of those house a duplicated file system. Both of those parallel file systems are permanently mounted as "read only", and only one is active at any given time. The third partition holds a partial writable file system and the users persistent data. With a fresh system, the partition labeled 'system-a' holds one complete file system, called a core, leaving the parallel partition still empty. + +![](https://farm9.staticflickr.com/8758/16841251947_21f42609ce_b.jpg) + +If we run the following command now: + + $ sudo snappy update + +the system will install the update as a complete core, similar to an image, on 'system-b'. You will be asked to reboot your device afterwards to activate the new core. + +After the reboot, run the following command to check if your system is up to date and which core is active. + + $ sudo snappy versions -a + +After rolling out the update and rebooting, you should see that the core that is now active has changed. + +As we have not installed any apps yet, the following command: + + $ sudo snappy update ubuntu-core + +would have been sufficient, and is the way if you want to upgrade just the underlying OS. Should something go wrong, you can rollback by: + + $ sudo snappy rollback ubuntu-core + +which will take you back to the system's state before the update. + +![](https://farm8.staticflickr.com/7666/17022676786_5fe6804ed8_c.jpg) + +Speaking of apps, they are what makes Snappy useful. There are not that many at this point, but the IRC channel #snappy on Freenode is humming along nicely and with a lot of people involved, the Snappy App Store gets new apps added on a regular basis. You can visit the shop by pointing your browser to http://:4200, and you can install apps right from the shop and then launch them with http://webdm.local in your browser. Building apps yourself for Snappy is not all that hard, and [well documented][4]. You can also port DEB packages into the snappy format quite easily. + +![](https://farm8.staticflickr.com/7656/17022676836_968a2a7254_c.jpg) + +Ubuntu Snappy Core, due to the limited number of available apps, is not overly useful in a productive way at this point in time, although it invites us to dive into the new Snappy package format and play with atomic upgrades the Canonical way. Since it is easy to set up, this seems like a good opportunity to learn something new. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/ubuntu-snappy-core-raspberry-pi-2.html + +作者:[Ferdinand Thommes][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/ferdinand +[1]:http://www.ubuntu.com/things +[2]:http://www.raspberrypi.org/downloads/ +[3]:http://xmodulo.com/write-raspberry-pi-image-sd-card.html +[4]:https://developer.ubuntu.com/en/snappy/ \ No newline at end of file diff --git a/sources/tech/20150410 What is a good alternative to wget or curl on Linux.md b/sources/tech/20150410 What is a good alternative to wget or curl on Linux.md new file mode 100644 index 0000000000..0fd1dfd276 --- /dev/null +++ b/sources/tech/20150410 What is a good alternative to wget or curl on Linux.md @@ -0,0 +1,144 @@ +What is a good alternative to wget or curl on Linux +================================================================================ +If you often need to access a web server non-interactively in a terminal environment (e.g., download a file from the web, or test REST-ful web service APIs), chances are that wget or curl is your go-to tool. With extensive command-line options, both of these tools can handle a variety of non-interactive web access use cases (examples [here][1], [here][2] and [here][3]). However, even powerful tools like these are only as good as your knowledge of how to use them. Unless you are well versed in the nitty and gritty details of their syntax, these tools are nothing more than simple web downloaders for you. + +Billed as a "curl-like tool for humans," [HTTPie][4] is designed to improve on wget and curl in terms of usability. Its main goal is to make command-line interaction of a web server as human-friendly as possible. For that, HTTPie comes with expressive, yet very simple and intuitive syntax. It also displays responses in colorized formats for readability, and offers nice goodies like excellent JSON support and persistent sessions to streamline your workflows. + +I know some of you will be skeptical about replacing a ubiquitously available, perfectly good tool such as wget or curl with totally unheard of software. This view has merit especially if you are a system admin who works with many different hardware boxes. For developers or end-users, however, I would say it's all about productivity. If I've found a user-friendly alternative of a tool, I don't see any problem adopting the easy to use version in my work environment to save my precious time. No need to be loyal and religious about what's being replaced. After all, choice is the best thing about Linux. + +In this post, let me review HTTPie, and show you what I mean by HTTPie being a user-friendly alternative of wget and curl. + +![](https://farm8.staticflickr.com/7633/16849137018_bcc7a616fc_b.jpg) + +### Install HTTPie on Linux ### + +HTTPie is written in Python, so you can install it pretty much everywhere (Linux, MacOSX, Windows). Even better, it comes as a prebuilt package on most Linux distributions. + +#### Debian, Ubuntu or Linux Mint: #### + + $ sudo apt-get install httpie + +#### Fedora: #### + + $ sudo yum install httpie + +#### CentOS/RHEL: #### + +First, enable [EPEL repository][5] and then run: + + $ sudo yum install httpie + +For any Linux distribution, an alternative installation method is to use [pip][6]. + + $ sudo pip install --upgrade httpie + +### HTTPie Examples ### + +Once you install HTTPie, you can invoke it by typing http command. In the rest of this article, let me show several useful examples of http command. + +#### Example 1: Custom Headers #### + +You can set custom headers in the format of . For example, let's send an HTTP GET request to www.test.com, with custom user-agent and referer, as well as a custom header (e.g., MyParam). + + $ http www.test.com User-Agent:Xmodulo/1.0 Referer:http://xmodulo.com MyParam:Foo + +Note that when HTTP GET method is used, you don't need to specify any HTTP method. + +The HTTP request will look like: + + GET / HTTP/1.1 + Host: www.test.com + Accept: */* + Referer: http://xmodulo.com + Accept-Encoding: gzip, deflate, compress + MyParam: Foo + User-Agent: Xmodulo/1.0 + +#### Example 2: Download a File #### + +You can use http as a file downloader tool. You will need to redirect output to a file as follows. + + $ http www.test.com/my_file.zip > my_file.zip + +Alternatively: + + $ http --download www.test.com/my_file.zip + +#### Example 3: Custom HTTP Method #### + +Besides the default GET method, you can use other methods (e.g., PUT, POST, HEAD). For example, to sent an HTTP PUT request: + + $ http PUT www.test.com name='Dan Nanni' email=dan@email.com + +#### Example 4: Submit a Form #### + +Submitting a form with http command is as easy as: + + $ http -f POST www.test.com name='Dan Nanni' comment='Hi there' + +The '-f' option lets http command serialize data fields, and set 'Content-Type' to "application/x-www-form-urlencoded; charset=utf-8". + +The HTTP POST request will look like: + + POST / HTTP/1.1 + Host: www.test.com + Content-Length: 31 + Content-Type: application/x-www-form-urlencoded; charset=utf-8 + Accept-Encoding: gzip, deflate, compress + Accept: */* + User-Agent: HTTPie/0.8.0 + + name=Dan+Nanni&comment=Hi+there + +#### Example 5: JSON Support #### + +HTTPie comes with built-in JSON support, which is nice considering its growing popularity as a data exchange format. In fact, the default content-type used by HTTPie is JSON. So if you send data fields without specifying any content-type, they will automatically be serialized as a JSON object. + + $ http POST www.test.com name='Dan Nanni' comment='Hi there' + +The HTTP POST request will look like: + + POST / HTTP/1.1 + Host: www.test.com + Content-Length: 44 + Content-Type: application/json; charset=utf-8 + Accept-Encoding: gzip, deflate, compress + Accept: application/json + User-Agent: HTTPie/0.8.0 + + {"name": "Dan Nanni", "comment": "Hi there"} + +#### Example 6: Input Redirect #### + +Another nice user-friendly feature of HTTPie is input redirection, where you can feed an HTTP request body with buffered data. For example, you can do things like: + + $ http POST api.test.com/db/lookup < my_info.json + +or: + + $ echo '{"name": "Dan Nanni"}' | http POST api.test.com/db/lookup + +### Conclusion ### + +In this article, I introduce to you HTTPie, a possible alternative to wget or curl. Besides these simple examples presented here, you can find a lot of interesting use cases of HTTPie at the [official site][7]. Again, a powerful tool is only as good as your knowledge about the tool. Personally I am sold on HTTPie, as I was looking for a way to test complicated web APIs more easily. + +What's your thought? + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/wget-curl-alternative-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-download-multiple-files-with-wget.html +[2]:http://xmodulo.com/how-to-use-custom-http-headers-with-wget.html +[3]:http://ask.xmodulo.com/custom-http-header-curl.html +[4]:https://github.com/jakubroztocil/httpie +[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[6]:http://ask.xmodulo.com/install-pip-linux.html +[7]:https://github.com/jakubroztocil/httpie \ No newline at end of file From 047a8a1ded2359f0792576c2ac83d59da5c1c091 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 10 Apr 2015 10:49:45 +0800 Subject: [PATCH 0510/2517] =?UTF-8?q?20150410-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Websites and Downloading Files in Linux.md | 152 +++++++++++++++++ ...tihomed ISC DHCP Server on Debian Linux.md | 159 ++++++++++++++++++ 2 files changed, 311 insertions(+) create mode 100644 sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md create mode 100644 sources/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md diff --git a/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md b/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md new file mode 100644 index 0000000000..9e5bdf00bd --- /dev/null +++ b/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md @@ -0,0 +1,152 @@ +7 Command Line Tools for Browsing Websites and Downloading Files in Linux +================================================================================ +In the last article, we have covered few useful tools like ‘rTorrent‘, ‘wget‘, ‘cURL‘, ‘w3m‘, and ‘Elinks‘. We got lots of response to cover few other tools of same genre, if you’ve missed the first part you can go through it.. + +- [5 Command Line Tools for Downloading Files and Browsing Websites][1] + +This article aims at making you aware of several other Linux command Line browsing and downloading applications, which will help you to browse and download files within the Linux shell. + +### 1. links ### + +Links is an open source web browser written in C programming Language. It is available for all major platforms viz., Linux, Windows, OS X and OS/2. This browser is text based as well as graphical. The text based links web browser is shipped by most of the standard Linux distributions by default. If links is not installed in your system by default you may install it from the repo. Elinks is a fork of links. + + # apt-get install links + # yum install links + +After installing links, you can browse any websites within the terminal as shown below in the screen cast.. + + # links www.tecmint.com + +Use UP and DOWN arrow keys to navigate. Right arrow Key on a link will redirect you to that link and Left arrow key will bring you back to the last page. To QUIT press q. + +Here is how it seems to access Tecmint using links tool. + +![](http://www.tecmint.com/wp-content/uploads/2015/04/links-browse-websites-terminal.gif) + +If you are interested in installing GUI of links, you may need to download latest source tarball (i.e. version 2.9) from [http://links.twibright.com/download/][2]. + +Alternatively, you may use following wget command to download and install as suggested below. + + # wget http://links.twibright.com/download/links-2.9.tar.gz + # tar -xvf links-2.9.tar.gz + # cd links-2.9 + # ./configure –enable-graphics + # make + # make install + +**Note**: You need to install packages (libpng, libjpeg, TIFF library, SVGAlib, XFree86, C Compiler and make), if not already installed to successfully compile the package. + +### 2. links2 ### + +Links2 is a graphical web browser version of Twibright Labs Links web browser. This browser has support for mouse and clicks. Designed specially for speed without any CSS support, fairly good HTML and JavaScript support with limitations. + +To install links2. + + # apt-get install links2 + # yum install links2 + +### 3. lynx ### + +A text based web browser released under GNU GPLv2 license and written in ISO C. lynx is highly configurable web browser and Savior for many SYSAdmin. It has the reputation of being the oldest web browser that is being used and still actively developed. + +To install lynx. + + # apt-get install lynx + # yum install lynx + +After installing lynx, type the following command to browse the website as shown below in the screen cast.. + + # lynx www.tecmint.com + +![](http://www.tecmint.com/wp-content/uploads/2015/04/lynx-commandline-web-browsing.gif) + +If you are interested in knowing a bit more about links and lynx web browser, you may like to visit the below link: + +- [Web Browsing with Lynx and Links Command Line Tools][3] + +### 4. youtube-dl ### + +youtube-dl is a platform independent application which can be used to download videos from youtube and a few other sites. Written primarily in python and released under GNU GPL License, the application works out of the box. (Since youtube don’t allow you to download videos, it may be illegal to use it. Check the laws before you start using this.) + +To install youtube-dl. + + # apt-get install youtube-dl + # yum install youtube-dl + +After installing, try to download files from the Youtube site, as shown in the below screen cast. + + # youtube-dl https://www.youtube.com/watch?v=ql4SEy_4xws + +![](http://www.tecmint.com/wp-content/uploads/2015/04/download-youtube-videos-from-terminal.gif) + +If you are interested in knowing more about youtube-dl you may like to visit the below link: + +- [YouTube-DL – A Command Line Youtube Video Downloader for Linux][4] + +### 5. fetch ### + +It is a command utility for unix-like operating system that is used for URL retrieval. It supports a lot of options like fetching ipv4 only address, ipv6 only address, no redirect, exit after successful file retrieval request, retry, etc. + +Fetch can be Downloaded and installed from the link below + +- [http://sourceforge.net/projects/fetch/?source=typ_redirect][5] + +But before you compile and run it, you should install HTTP Fetcher. Download HTTP Fetcher from the link below. + +- [http://sourceforge.net/projects/http-fetcher/?source=typ_redirect][6] + +### 6. Axel ### + +Axel is a command-line based download accelerator for Linux. Axel makes it possible to download a file at much faster speed through single connection request for multiple copies of files in small chunks through multiple http and ftp connections. + +To install Axel. + + # apt-get install axel + # yum install axel + +After axel installed, you may use following command to download any given file, as shown in the screen cast. + + # axel http://mirror.cse.iitk.ac.in/archlinux/iso/2015.04.01/archlinux-2015.04.01-dual.iso + +![](http://www.tecmint.com/wp-content/uploads/2015/04/download-accelarator-for-linux.gif) + +### 7. aria2 ### + +aria2 is a command-line based download utility that is lightweight and support multi-protocol (HTTP, HTTPS, FTP, BitTorrent and Metalink). It can use metalinks files to simultaneously download ISO files from more than one server. It can serve as a Bit torrent client as well. + +To install aria2. + + # apt-get install aria2 + # yum install aria2 + +Once aria2 installed, you can fire up the following command to download any given file… + + # aria2c http://cdimage.debian.org/debian-cd/7.8.0/multi-arch/iso-cd/debian-7.8.0-amd64-i386-netinst.iso + +![Aria2: Command Line Download Manager for Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Download-Files-in-Terminal.gif) +Aria2: Command Line Download Manager for Linux + +If you’re interested to know more at aria2 and their switches, read the following article. + +- [Aria2 – A Multi-Protocol Command-Line Download Manager for Linux][7] + +That’s all for now. I’ll be here again with another interesting topic you people will love to read. Till then stay tuned and connected to Tecmint. Don’t forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/command-line-web-browser-download-file-in-linux/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/linux-command-line-tools-for-downloading-files/ +[2]:http://links.twibright.com/download/ +[3]:http://www.tecmint.com/command-line-web-browsers/ +[4]:http://www.tecmint.com/install-youtube-dl-command-line-video-download-tool/ +[5]:http://sourceforge.net/projects/fetch/?source=typ_redirect +[6]:http://sourceforge.net/projects/http-fetcher/?source=typ_redirect +[7]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/ \ No newline at end of file diff --git a/sources/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md b/sources/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md new file mode 100644 index 0000000000..2a8bdb2fbd --- /dev/null +++ b/sources/tech/20150410 How to Install and Configure Multihomed ISC DHCP Server on Debian Linux.md @@ -0,0 +1,159 @@ +How to Install and Configure Multihomed ISC DHCP Server on Debian Linux +================================================================================ +Dynamic Host Control Protocol (DHCP) offers an expedited method for network administrators to provide network layer addressing to hosts on a constantly changing, or dynamic, network. One of the most common server utilities to offer DHCP functionality is ISC DHCP Server. The goal of this service is to provide hosts with the necessary network information to be able to communicate on the networks in which the host is connected. Information that is typically served by this service can include: DNS server information, network address (IP), subnet mask, default gateway information, hostname, and much more. + +This tutorial will cover ISC-DHCP-Server version 4.2.4 on a Debian 7.7 server that will manage multiple virtual local area networks (VLAN) but can very easily be applied to a single network setup as well. + +The test network that this server was setup on has traditionally relied on a Cisco router to manage the DHCP address leases. The network currently has 12 VLANs needing to be managed by one centralized server. By moving this responsibility to a dedicated server, the router can regain resources for more important tasks such as routing, access control lists, traffic inspection, and network address translation. + +The other benefit to moving DHCP to a dedicated server will, in a later guide, involve setting up Dynamic Domain Name Service (DDNS) so that new host’s host-names will be added to the DNS system when the host requests a DHCP address from the server. + +### Step 1: Installing and Configuring ISC DHCP Server ### + +1. To start the process of creating this multi-homed server, the ISC software needs to be installed via the Debian repositories using the ‘apt‘ utility. As with all tutorials, root or sudo access is assumed. Please make the appropriate modifications to the following commands. + + # apt-get install isc-dhcp-server [Installs the ISC DHCP Server software] + # dpkg --get-selections isc-dhcp-server [Confirms successful installation] + # dpkg -s isc-dhcp-server [Alternative confirmation of installation] + +![Install ISC DHCP Server in Debian](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ISC-DHCP-Server.jpg) + +2. Now that the server software is confirmed installed, it is now necessary to configure the server with the network information that it will need to hand out. At the bare minimum, the administrator needs to know the following information for a basic DHCP scope: + +- The network addresses +- The subnet masks +- The range of addresses to be dynamically assigned + +Other useful information to have the server dynamically assign includes: + +- Default gateway +- DNS server IP addresses +- The Domain Name +- Host name +- Network Broadcast addresses + +These are merely a few of the many options that the ISC DHCP server can handle. To get a complete list as well as a description of each option, enter the following command after installing the package: + + # man dhcpd.conf + +3. Once the administrator has concluded all the necessary information for this server to hand out it is time to configure the DHCP server as well as the necessary pools. Before creating any pools or server configurations though, the DHCP service must be configured to listen on one of the server’s interfaces. + +On this particular server, a NIC team has been setup and DHCP will listen on the teamed interfaces which were given the name `'bond0'`. Be sure to make the appropriate changes given the server and environment in which everything is being configured. The defaults in this file are okay for this tutorial. + +![Configure ISC DHCP Network](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DHCP-Network.jpg) + +This line will instruct the DHCP service to listen for DHCP traffic on the specified interface(s). At this point, it is time to modify the main configuration file to enable the DHCP pools on the necessary networks. The main configuration file is located at /etc/dhcp/dhcpd.conf. Open the file with a text editor to begin: + + # nano /etc/dhcp/dhcpd.conf + +This file is the configuration for the DHCP server specific options as well as all of the pools/hosts one wishes to configure. The top of the file starts of with a ‘ddns-update-style‘ clause and for this tutorial it will remain set to ‘none‘ however in a future article, Dynamic DNS will be covered and ISC-DHCP-Server will be integrated with BIND9 to enable host name to IP address updates. + +4. The next section is typically the area where and administrator can configure global network settings such as the DNS domain name, default lease time for IP addresses, subnet-masks, and much more. Again to know more about all the options be sure to read the man page for the dhcpd.conf file. + + # man dhcpd.conf + +For this server install, there were a couple of global network options that were configured at the top of the configuration file so that they wouldn’t have to be implemented in every single pool created. + +![Configure ISC DDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ISC-DDNS.png) + +Lets take a moment to explain some of these options. While they are configured globally in this example, all of them can be configured on a per pool basis as well. + +- option domain-name “comptech.local”; – All hosts that this DHCP server hosts, will be a member of the DNS domain name “comptech.local” +- option domain-name-servers 172.27.10.6; DHCP will hand out DNS server IP of 172.27.10.6 to all of the hosts on all of the networks it is configured to host. +- option subnet-mask 255.255.255.0; – The subnet mask handed out to every network will be a 255.255.255.0 or a /24 +- default-lease-time 3600; – This is the time in seconds that a lease will automatically be valid. The host can re-request the same lease if time runs out or if the host is done with the lease, they can hand the address back early. +- max-lease-time 86400; – This is the maximum amount of time in seconds a lease can be held by a host. +- ping-check true; – This is an extra test to ensure that the address the server wants to assign out isn’t in use by another host on the network already. +- ping-timeout; – This is how long in second the server will wait for a response to a ping before assuming the address isn’t in use. +- ignore client-updates; For now this option is irrelevant since DDNS has been disabled earlier in the configuration file but when DDNS is operating, this option will ignore a hosts to request to update its host-name in DNS. + +5. The next line in this file is the authoritative DHCP server line. This line means that if this server is to be the server that hands out addresses for the networks configured in this file, then uncomment the authoritative stanza. + +This server will be the only authority on all the networks it manages so the global authoritative stanza was un-commented by removing the ‘#’ in front of the keyword authoritative. + +![Enable ISC Authoritative](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-authoritative.png) +Enable ISC Authoritative + +By default the server is assumed to NOT be an authority on the network. The rationale behind this is security. If someone unknowingly configures the DHCP server improperly or on a network they shouldn’t, it could cause serious connectivity issues. This line can also be used on a per network basis. This means that if the server is not the entire network’s DHCP server, the authoritative line can instead be used on a per network basis rather than in the global configuration as seen in the above screen-shot. + +6. The next step is to configure all of the DHCP pools/networks that this server will manage. For brevities sake, this guide will only walk through one of the pools configured. The administrator will need to have gathered all of the necessary network information (ie domain name, network addresses, how many addresses can be handed out, etc). + +For this pool the following information was obtained from the network administrator: network id of 172.27.60.0, subnet mask of 255.255.255.0 or a /24, the default gateway for the subnet is 172.27.60.1, and a broadcast address of 172.27.60.255. +This information is important to building the appropriate network stanza in the dhcpd.conf file. Without further ado, let’s open the configuration file again using a text editor and then add the new network to the server. This must be done with root/sudo! + + # nano /etc/dhcp/dhcpd.conf + +![Configure DHCP Pools and Networks](http://www.tecmint.com/wp-content/uploads/2015/04/ISC-network.png) +Configure DHCP Pools and Networks + +This is the sample created to hand out IP addresses to a network that is used for the creation of VMWare virtual practice servers. The first line indicates the network as well as the subnet mask for that network. Then inside the brackets are all the options that the DHCP server should provide to hosts on this network. + +The first stanza, range 172.27.60.50 172.27.60.254;, is the range of dynamically assignable addresses that the DHCP server can hand out to hosts on this network. Notice that the first 49 addresses aren’t in the pool and can be assigned statically to hosts if needed. + +The second stanza, option routers 172.27.60.1; , hands out the default gateway address for all hosts on this network. + +The last stanza, option broadcast-address 172.27.60.255;, indicates what the network’s broadcast address. This address SHOULD NOT be a part of the range stanza as the broadcast address can’t be assigned to a host. + +Some pointers, be sure to always end the option lines with a semi-colon (;) and always make sure each network created is enclosed in curly braces { }. + +7. If there are more networks to create, continue creating them with their appropriate options and then save the text file. Once all configurations have been completed, the ISC-DHCP-Server process will need to be restarted in order to apply the new changes. This can be accomplished with the following command: + + # service isc-dhcp-server restart + +This will restart the DHCP service and then the administrator can check to see if the server is ready for DHCP requests several different ways. The easiest is to simply see if the server is listening on port 67 via the [lsof command][1]: + + # lsof -i :67 + +![Check DHCP Listening Port](http://www.tecmint.com/wp-content/uploads/2015/04/lsof.png) +Check DHCP Listening Port + +This output indicates that the DHCPD (DHCP Server daemon) is running and listening on port 67. Port 67 in this output was actually converted to ‘bootps‘ due to a port number mapping for port 67 in /etc/services file. + +This is very common on most systems. At this point, the server should be ready for network connectivity and can be confirmed by connecting a machine to the network and having it request a DHCP address from the server. + +### Step 2: Testing Client Connectivity ### + +8. Most systems now-a-days are using Network Manager to maintain network connections and as such the device should be pre-configured to pull DHCP when the interface is active. + +However on machines that aren’t using Network Manager, it may be necessary to manually attempt to pull a DHCP address. The next few steps will show how to do this as well as how to see whether the server is handing out addresses. + +The ‘[ifconfig][2]‘ utility can be used to check an interface’s configuration. The machine used to test the DHCP server only has one network adapter and it is called ‘eth0‘. + + # ifconfig eth0 + +![Check Network Interface IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/No-ip.png) +Check Network Interface IP Address + +From this output, this machine currently doesn’t have an IPv4 address, great! Let’s instruct this machine to reach out to the DHCP server and request an address. This machine has the DHCP client utility known as ‘dhclient‘ installed. The DHCP client utility may very from system to system. + + # dhclient eth0 + +![Request IP Address from DHCP](http://www.tecmint.com/wp-content/uploads/2015/04/IP.png) +Request IP Address from DHCP + +Now the `'inet addr:'` field shows an IPv4 address that falls within the scope of what was configured for the 172.27.60.0 network. Also notice that the proper broadcast address was handed out as well as subnet mask for this network. + +Things are looking promising but let’s check the server to see if it was actually the place where this machine received this new IP address. To accomplish this task, the server’s system log file will be consulted. While the entire log file may contain hundreds of thousands of entries, only a few are necessary for confirming that the server is working properly. Rather than using a full text editor, this time a utility known as ‘tail‘ will be used to only show the last few lines of the log file. + + # tail /var/log/syslog + +![Check DHCP Logs](http://www.tecmint.com/wp-content/uploads/2015/04/DHCP-Log.png) +Check DHCP Logs + +Voila! The server recorded handing out an address to this host (HRTDEBXENSRV). It is a safe assumption at this point that the server is working as intended and handing out the appropriate addresses for the networks that it is an authority. At this point the DHCP server is up and running. Configure the other networks, troubleshoot, and secure as necessary. + +Enjoy the newly functioning ISC-DHCP-Server and tune in later for more Debian tutorials. In the not too distant future there will be an article on Bind9 and DDNS that will tie into this article. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-and-configure-multihomed-isc-dhcp-server-on-debian-linux/ + +作者:[Rob Turner][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/robturner/ +[1]:http://www.tecmint.com/10-lsof-command-examples-in-linux/ +[2]:http://www.tecmint.com/ifconfig-command-examples/ \ No newline at end of file From 7387f74cf8dbf608c31352dd422087aa8af12546 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 10 Apr 2015 11:36:26 +0800 Subject: [PATCH 0511/2517] =?UTF-8?q?20150410-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...kills in Demand That Will Get You Hired.md | 140 ++++++++++++++++ ...butions in Demand to Get Your Dream Job.md | 149 ++++++++++++++++++ 2 files changed, 289 insertions(+) create mode 100644 sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md create mode 100644 sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md diff --git a/sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md b/sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md new file mode 100644 index 0000000000..313e1c0f85 --- /dev/null +++ b/sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md @@ -0,0 +1,140 @@ +10 Famous IT Skills in Demand That Will Get You Hired +================================================================================ +In continuation of our last article [[Top 10 Operating Systems in demand][1]] which was highly appreciated by the Tecmint community, we here in this article aims at throwing light on top IT skills that will help you land to your dream job. + +As mentioned in the first article these data and statistics are supposed to be change with the change in demand and market. We will try our best to update the list whenever there is any major changes. All the statistics are produced on the basis of close study of Job boards, postings and requirements by several IT companies across the globe. + +### 1. VMware ### + +The visualization and cloud computing software designed by Vmware Inc. tops the List. Vmware claims to commercially virtualize x86 architecture for the first time. VMware demand has increased upto 16% in the last quarter. + +Latest stable Release: 11.0 + +### 2. MySQL ### + +The open source Relational Database Management System falls second in the list. Until 2013 it was the second most widely used RDBMS. MySQL demand has increased upto 11% in the last quarter. The very famous MariaDB has been forked out of MySQL after Oracle Corp. Owned it. + +Latest Stable Release : 5.6.23 + +### 3. Apache ### + +The open source cross platform web (HTTP) server stands third in the list. Apache demand has increased to more than 13% in the last quarter. + +Latest Stable Release : 2.4.12 + +### 4. AWS ### + +Amazon web services is a collection of remote computing services offered by Amazon.com. Aws made to the list at number four. AWS demand has shown a growth of nearly 14% in the last quarter. + +### 5. Puppet ### + +The configuration Management System used in setting up IT Infrastructure comes at number five. It is written in Ruby and follows Client-server architecture. The demand of puppet has grown above 9% in the last quarter. + +Latest Stable Release : 3.7.3 + +### 6. Hadoop ### + +Hadoop is a open source software framework written in Java to process big data. It stands at position six in the list. The demand of Hadoop has gone upto 0.2% in the last quarter. + +Latest Stable Release : 2.6.0 + +### 7. Git ### + +The famous distributed control system written initially by Linus Torvalds made to the list at number seven. The demand of Git has gone above 7% in the last quarter. + +Latest Stable Release : 2.3.4 + +### 8. Oracle PL/SQL ### + +The procedural extension for SQL by Oracle corp. stands at position eight. PL/SQL is included in Oracle Database since Oracle 7. It has shown a decline of nearly 8% in the last quarter. + +### 9. Tomcat ### + +Open source web server and servlet container comes at position number nine. It has shown a growth in demand of nearly 15% in the last quarter. + +Latest Stable Release : 8.0.15 + +### 10. SAP ### + +The most famous Enterprise Resource Planning Software stands at position ten. The demand of SAP has shown a growth of nearly 3.5% in last quarter. + +注:表格数据,不需要翻译-开始 + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1. + VMware16% +
2. + MySQL11% +
3.Apache13% +
4. + Amazon web services (AWS)14% +
5. + Puppet9% +
6.Hadoop0.2% +
7.Git7% +
8.Oracle PL/SQL8% -
9.Tomcat15% +
10.SAP3.5% +
+注:表格数据,不需要翻译-结束 + +That’s all for now. I’ll be here with the next part of the series following. Till then stay tuned. Stay Connected. Stay Commenting. Don’t forget to provide us with your feedback. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/ \ No newline at end of file diff --git a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md new file mode 100644 index 0000000000..21df3f82c1 --- /dev/null +++ b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md @@ -0,0 +1,149 @@ +10 Top Distributions in Demand to Get Your Dream Job +================================================================================ +We are coming up with a series of five articles which aims at making you aware of the top skills which will help you in getting yours dream job. In this competitive world you can not rely on one skill. You need to have balanced set of skills. There is no measure of a balanced skill set except a few conventions and statistics which changes from time-to-time. + +The below article and remaining to follow is the result of close study of job boards, posting and requirements of various IT Companies across the globe of last three months. The statistics keeps on changing as the demand and market changes. We will try our best to update the list when there is any major changes. +The Five articles of this series are… + +- 10 Distributions in Demand to Get Your Dream Job +- [10 Famous IT Skills in Demand That Will Get You Hired][1] +- 10 Programming Skills That Will Help You to Get Dream Job +- 10 IT Networking Protocols Skills to Land Your Dream Job +- 10 Professional Certifications in Demand That Will Get You Hired + +### 1. Windows ### + +The operating System developed by Microsoft not only dominates the PC market but it is also the most sought OS skill from job perspective irrespective of all the odds and criticism that follows. It has shown a growth in demand which equals to 0.1% in the last quarter. + +Latest Stable Release : Windows 8.1 + +### 2. Red Hat Enterprise Linux ### + +Red Hat Enterprise Linux is a commercial Linux Distribution developed by Red Hat Inc. It is one of the Most widely used Linux distribution specially in corporates and production. It comes at number two having a overall growth in demand which equals to 17% in the last quarter. + +Latest Stable Release : RedHat Enterprise Linux 7.1 + +### 3. Solaris ### + +The UNIX Operating System developed by Sun Microsystems and now owned by Oracle Inc. comes at number three. It has shown a growth in demand which equals to 14% in the last quarter. + +Latest Stable Release : Oracle Solaris 10 1/13 + +### 4. AIX ### + +Advanced Interactive eXecutive is a Proprietary Unix Operating System by IBM stands at number four. It has shown a growth in demand which equals to 11% in the last quarter. + +Latest Stable Release : AIX 7 + +### 5. Android ### + +One of the most widely used open source operating system designed specially for mobile, tablet computers and wearable gadgets is now owned by Google Inc. comes at number five. It has shown a growth in demand which equals to 4% in the last quarter. + +Latest Stable Release : Android 5.1 aka Lollipop + +### 6. CentOS ### + +Community Enterprise Operating System is a Linux distribution derived from RedHat Enterprise Linux. It comes at sixth position in the list. Market has shown a growth in demand which is nearly 22% for CentOS, in the last quarter. + +Latest Stable Release : CentOS 7 + +### 7. Ubuntu ### + +The Linux Operating System designed for Humans and designed by Canonicals Ltd. Ubuntu comes at position seventh. It has shown a growth in demand which equals to 11% in the last quarter. +Latest Stable Release : + +- Ubuntu 14.10 (9 months security and maintenance update). +- Ubuntu 14.04.2 LTS + +### 8. Suse ### + +Suse is a Linux operating System owned by Novell. The Linux distribution is famous for YaST configuration tool. It comes at position eight. It has shown a growth in demand which equals to 8% in the last quarter. + +Latest Stable Release : 13.2 + +### 9. Debian ### + +The very famous Linux Operating System, mother of 100’s of Distro and closest to GNU comes at number nine. It has shown a decline in demand which is nearly 9% in the last quarter. + +Latest Stable Release : Debian 7.8 + +### 10. HP-UX ### + +The Proprietary UNIX Operating System designed by Hewlett-Packard comes at number ten. It has shown a decline in the last quarter by 5%. + +Latest Stable Release : 11i v3 Update 13 + +注:表格数据--不需要翻译--开始 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1Windows0.1% +
2RedHat17% +
3Solaris14% +
4AIX11% +
5Android4% +
6CentOS22% +
7Ubuntu11% +
8Suse8% +
9Debian9% -
10HP-UX5% -
+注:表格数据--不需要翻译--结束 + +That’s all for now. I’ll be coming up with the next article of this series very soon. Till then stay tuned and connected to Tecmint. Don’t forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/ \ No newline at end of file From b9e7e334ad82b24450964d4dc385c6b76ad08dff Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Fri, 10 Apr 2015 12:24:48 +0800 Subject: [PATCH 0512/2517] =?UTF-8?q?20150410-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...out evil twin access points in the area.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sources/share/20150410 This tool can alert you about evil twin access points in the area.md diff --git a/sources/share/20150410 This tool can alert you about evil twin access points in the area.md b/sources/share/20150410 This tool can alert you about evil twin access points in the area.md new file mode 100644 index 0000000000..f2a2165191 --- /dev/null +++ b/sources/share/20150410 This tool can alert you about evil twin access points in the area.md @@ -0,0 +1,40 @@ +This tool can alert you about evil twin access points in the area +================================================================================ +**EvilAP_Defender can even attack rogue Wi-Fi access points for you, the developer says** + +A new open-source tool can periodically scan an area for rogue Wi-Fi access points and can alert network administrators if any are found. + +The tool, called EvilAP_Defender, was designed specifically to detect malicious access points that are configured by attackers to mimic legitimate ones in order to trick users to connect to them. + +These access points are known as evil twins and allow hackers to intercept Internet traffic from devices connected to them. This can be used to steal credentials, spoof websites, and more. + +Most users configure their computers and devices to automatically connect to some wireless networks, like those in their homes or at their workplace. However, when faced with two wireless networks that have the same name, or SSID, and sometimes even the same MAC address, or BSSID, most devices will automatically connect to the one that has the stronger signal. + +This makes evil twin attacks easy to pull off because both SSIDs and BSSIDs can be spoofed. + +[EvilAP_Defender][1] was written in Python by a developer named Mohamed Idris and was published on GitHub. It can use a computer's wireless network card to discover rogue access points that duplicate a real access point's SSID, BSSID, and even additional parameters like channel, cipher, privacy protocol, and authentication. + +The tool will first run in learning mode, so that the legitimate access point [AP] can be discovered and whitelisted. It can then be switched to normal mode to start scanning for unauthorized access points. + +If an evil AP is discovered, the tool can alert the network administrator by email, but the developer also plans to add SMS-based alerts in the future. + +There is also a preventive mode in which the tool can launch a denial-of-service [DoS] attack against the evil AP to buy the administrator some time to take defensive measures. + +"The DoS will only be performed for evil APs which have the same SSID but a different BSSID (AP's MAC address) or run on a different channel," Idris said in the tool's documentation. "This is to avoid attacking your legitimate network." + +However, users should remember that attacking someone else's access point, even a likely malicious one operated by an attacker, is most likely illegal in many countries. + +In order to run, the tool needs the Aircrack-ng wireless suite, a wireless card supported by Aircrack-ng, MySQL and the Python runtime. + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2905725/security0/this-tool-can-alert-you-about-evil-twin-access-points-in-the-area.html + +作者:[Lucian Constantin][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Lucian-Constantin/ +[1] https://github.com/moha99sa/EvilAP_Defender/blob/master/README.TXT From ddc3df8f8cd4b433d26cb534d52b174c605cb96b Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Sat, 11 Apr 2015 10:39:03 +0800 Subject: [PATCH 0513/2517] [Translating]20150410 What is a good alternative to wget or curl on Linux.md --- ...10 What is a good alternative to wget or curl on Linux.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150410 What is a good alternative to wget or curl on Linux.md b/sources/tech/20150410 What is a good alternative to wget or curl on Linux.md index 0fd1dfd276..488eee0e9a 100644 --- a/sources/tech/20150410 What is a good alternative to wget or curl on Linux.md +++ b/sources/tech/20150410 What is a good alternative to wget or curl on Linux.md @@ -1,3 +1,4 @@ +wangjiezhe translating... What is a good alternative to wget or curl on Linux ================================================================================ If you often need to access a web server non-interactively in a terminal environment (e.g., download a file from the web, or test REST-ful web service APIs), chances are that wget or curl is your go-to tool. With extensive command-line options, both of these tools can handle a variety of non-interactive web access use cases (examples [here][1], [here][2] and [here][3]). However, even powerful tools like these are only as good as your knowledge of how to use them. Unless you are well versed in the nitty and gritty details of their syntax, these tools are nothing more than simple web downloaders for you. @@ -129,7 +130,7 @@ What's your thought? via: http://xmodulo.com/wget-curl-alternative-linux.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[wangjiezhe](https://github.com/wangjiezhe) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -141,4 +142,4 @@ via: http://xmodulo.com/wget-curl-alternative-linux.html [4]:https://github.com/jakubroztocil/httpie [5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html [6]:http://ask.xmodulo.com/install-pip-linux.html -[7]:https://github.com/jakubroztocil/httpie \ No newline at end of file +[7]:https://github.com/jakubroztocil/httpie From 44669fa6a3889ce68ef7218adeb91d6b59ab1e58 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 11 Apr 2015 11:44:26 +0800 Subject: [PATCH 0514/2517] translating --- .../20150409 How to Run GUI Apps in a Docker Container.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150409 How to Run GUI Apps in a Docker Container.md b/sources/tech/20150409 How to Run GUI Apps in a Docker Container.md index 3545255b32..4027117a46 100644 --- a/sources/tech/20150409 How to Run GUI Apps in a Docker Container.md +++ b/sources/tech/20150409 How to Run GUI Apps in a Docker Container.md @@ -1,3 +1,5 @@ +Translating---geekpi + How to Run GUI Apps in a Docker Container ================================================================================ Hi everyone, today we'll learn how we can run GUI Applications inside a [Docker][1] Container. We can easily run most of the common GUI apps without getting into trouble inside a Docker Container. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. @@ -75,4 +77,4 @@ via: http://linoxide.com/linux-how-to/run-gui-apps-docker-container/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:http://docker.io/ \ No newline at end of file +[1]:http://docker.io/ From 86971ba6b8c9b3b9fafc41b70f044f00f896719b Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 11 Apr 2015 12:28:47 +0800 Subject: [PATCH 0515/2517] translated --- ...w to Run GUI Apps in a Docker Container.md | 80 ------------------- ...w to Run GUI Apps in a Docker Container.md | 78 ++++++++++++++++++ 2 files changed, 78 insertions(+), 80 deletions(-) delete mode 100644 sources/tech/20150409 How to Run GUI Apps in a Docker Container.md create mode 100644 translated/tech/150409 How to Run GUI Apps in a Docker Container.md diff --git a/sources/tech/20150409 How to Run GUI Apps in a Docker Container.md b/sources/tech/20150409 How to Run GUI Apps in a Docker Container.md deleted file mode 100644 index 4027117a46..0000000000 --- a/sources/tech/20150409 How to Run GUI Apps in a Docker Container.md +++ /dev/null @@ -1,80 +0,0 @@ -Translating---geekpi - -How to Run GUI Apps in a Docker Container -================================================================================ -Hi everyone, today we'll learn how we can run GUI Applications inside a [Docker][1] Container. We can easily run most of the common GUI apps without getting into trouble inside a Docker Container. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. - -Here are the quick and easy steps on how we can run a GUI App in a Docker Container. In this tutorial, we'll take Firefox for the example. - -### 1. Installing Docker ### - -First of all, before we start, we must ensure that we have Docker installed in our host Linux Operating System. Here, we are running CentOS 7 as host so, we'll be running yum manager to install docker using the below command. - - # yum install docker - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png) - - # systemctl restart docker.service - -### 2. Creating Dockerfile ### - -Now, as our Docker Daemon is running, we'll now prepare to create our Firefox Docker Container. We'll create a Dockerfile where we'll enter the required configuration to create a working Firefox Container. We'll fetch latest version of CentOS for our Docker Image. To do so, we'll create a file named Dockerfile using our favorite text editor. - - # nano Dockerfile - -Then, we'll add the following lines of configuration into Dockerfile and then save it. - - #!/bin/bash - FROM centos:7 - RUN yum install -y firefox - # Replace 0 with your user / group id - RUN export uid=0 gid=0 - RUN mkdir -p /home/developer - RUN echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd - RUN echo "developer:x:${uid}:" >> /etc/group - RUN echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers - RUN chmod 0440 /etc/sudoers - RUN chown ${uid}:${gid} -R /home/developer - - USER developer - ENV HOME /home/developer - CMD /usr/bin/firefox - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/Dockerfile-GUI.png) - -**Note: Please replace 0 with your user and group id in 4th line of the configuration. We can get the uid and gid of current user by running the following command in a shell or a terminal.** - - # id $USER - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/user-id.png) - -### 3. Building Docker Container ### - -We'll now build the container which will work according to the above Dockerfile. It will install firefox web browser and its required packages. It will then set user permission to make it work. Here, the image name is set as firefox, you can name it as your desire. - - # docker build --rm -t firefox . - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/building-firefox-docker.png) - -### 4. Running Docker Container ### - -Now, finally, if everything went cool, we'll be able to run our GUI App ie Mozilla Firefox Browser from inside our firefox Docker Container running in a CentOS 7 Image. - - # docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix firefox - -### Conclusion ### - -Running GUI Apps in a Docker Container is really an awesome experience which will never harm/use your host Filesystem. It is fully dependent on your Docker Container. In this tutorial, we tried Firefox in our CentOS 7 Docker Image with Firefox installed. We can use many more GUI Apps with this technology. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/run-gui-apps-docker-container/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://docker.io/ diff --git a/translated/tech/150409 How to Run GUI Apps in a Docker Container.md b/translated/tech/150409 How to Run GUI Apps in a Docker Container.md new file mode 100644 index 0000000000..abca032354 --- /dev/null +++ b/translated/tech/150409 How to Run GUI Apps in a Docker Container.md @@ -0,0 +1,78 @@ +如何在Docker容器中运行GUI程序 +================================================================================ +各位,今天我们将学习如何在[Docker][1]之中运行GUI程序。我们可以轻易地在Docker容器中运行大多数GUI程序且不出错。Docker是一个开源项目,提供了一个打包、分发和运行任意程序的轻量级容器的开放平台。它没有语言支持、框架或者打包系统的限制并可以在任何地方、任何时候,从小型的家用电脑到高端的服务器都可以运行。这让人们可以打包不同的包用于部署和扩展网络应用,数据库和后端服务而不必依赖于特定的栈或者提供商。 + +下面是我们该如何在Docker容器中运行GUI程序的简单步骤。本教程中,我们会用Firefox作为例子。 + +### 1. 安装 Docker ### + +在开始事前,我们首先得确保在Linux主机中已经安装了Docker。这里,我运行的是CentOS 7 主机,我们将运行yum管理器和下面的命令来安装Docker。 + + # yum install docker + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png) + + # systemctl restart docker.service + +### 2. 创建 Dockerfile ### + +现在,Docker守护进程已经在运行中了,我们现在准备创建自己的Firefox Docker容器。我们要创建一个Dockerfile,这里我们要输入需要的配置来创建一个可以工作的Firefox容器。我们取下CentOS中最新的Docker镜像。至此,我们需要用文本编辑器创建一个名为Dockerfile的文件。 + + # nano Dockerfile + +接着,在Dockerfile中添加下面的行并保存。 + + #!/bin/bash + FROM centos:7 + RUN yum install -y firefox + # Replace 0 with your user / group id + RUN export uid=0 gid=0 + RUN mkdir -p /home/developer + RUN echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd + RUN echo "developer:x:${uid}:" >> /etc/group + RUN echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers + RUN chmod 0440 /etc/sudoers + RUN chown ${uid}:${gid} -R /home/developer + + USER developer + ENV HOME /home/developer + CMD /usr/bin/firefox + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Dockerfile-GUI.png) + +**注意:在第四行的配置中,用你自己的用户和组id来替换0。 我们可以用下面的命令在shell或者终端中得到uid和gid。** + + # id $USER + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/user-id.png) + +### 3. 构造Docker容器 ### + +下面我们就要根据上面的Dockerfile构建一个容器。它会安装firefox浏览器和它需要的包。它接着会设置用户权限并让它可以工作。这里镜像名是firefox,你可以根据你的需要命名。 + + # docker build --rm -t firefox . + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/building-firefox-docker.png) + +### 4. 运行Docker容器 ### + +现在,如果一切顺利,我们现在可以在运行着CentOS 7镜像的Docker容器中运行我们的GUI程序也就是Firefox浏览器了。 + + # docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix firefox + +### 总结 ### + +在Dcoker容器中运行GUI程序是一次很棒的体验,它对你的主机文件系统没有任何的伤害。它完全依赖你的Docker容器。本教程中,我尝试了CentOS 7 Docker中的Firefox。我们可以用这个技术尝试更多的GUI程序。如果你有任何问题、建议、反馈请在下面的评论栏中写下来,这样我们可以提升或更新我们的内容。谢谢! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/run-gui-apps-docker-container/ + +作者:[Arun Pyasi][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://docker.io/ From effdc9a3b32f69aeff678722ee89e4b69e878fe6 Mon Sep 17 00:00:00 2001 From: weychen Date: Sat, 11 Apr 2015 22:50:02 +0800 Subject: [PATCH 0516/2517] Update 20150410 10 Top Distributions in Demand to Get Your Dream Job.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请翻译 --- ...0 10 Top Distributions in Demand to Get Your Dream Job.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md index 21df3f82c1..5632351b37 100644 --- a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md +++ b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md @@ -1,3 +1,4 @@ +Translating by weychen 10 Top Distributions in Demand to Get Your Dream Job ================================================================================ We are coming up with a series of five articles which aims at making you aware of the top skills which will help you in getting yours dream job. In this competitive world you can not rely on one skill. You need to have balanced set of skills. There is no measure of a balanced skill set except a few conventions and statistics which changes from time-to-time. @@ -140,10 +141,10 @@ That’s all for now. I’ll be coming up with the next article of this series v via: http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/ 作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[weychen](https://github.com/weychen) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/ \ No newline at end of file +[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/ From 79d639ec0594d0b593353702af0873fe619c00c8 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 12 Apr 2015 10:36:18 +0800 Subject: [PATCH 0517/2517] [Translated] How to Remember and Restore Running Applications on Next Logon.md --- ...tore Running Applications on Next Logon.md | 99 ------------------- ...tore Running Applications on Next Logon.md | 96 ++++++++++++++++++ 2 files changed, 96 insertions(+), 99 deletions(-) delete mode 100644 sources/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md create mode 100644 translated/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md diff --git a/sources/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md b/sources/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md deleted file mode 100644 index 772667bde2..0000000000 --- a/sources/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md +++ /dev/null @@ -1,99 +0,0 @@ -FSSlc translating - -How to Remember and Restore Running Applications on Next Logon -================================================================================ -You have made some apps running in your Ubuntu and don't want to stop the process, just managed your windows and opened your stuffs needed to work. Then, something else demands your attention or you have battery low in your machine and you have to shut down. No worries. You can have Ubuntu remember all your running applications and restore them the next time you log in. - -Now, to make our Ubuntu remember the applications you have running in our current session and restore them the next time our log in, We will use the dconf-editor. This tool replaces the gconf-editor available in previous versions of Ubuntu but is not available by default. To install the dconf-editor, you need to run sudo apt-get install dconf-editor. - - $ sudo apt-get install dconf-tools - -Once the dconf-editor is installed, you can open dconf-editor from Application Menu. Or you can run it from terminal or run command (alt+f2): - - $ dconf-editor - -In the “dconf Editor” window, click the right arrow next to “org” in the left pane to expand that branch of the tree. - -![Dconf Editor Apps, org](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor-clicking-org-300x146.png) - -Under “org”, click the right arrow next to “gnome.” - -![dconf editor clicking gnome](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor-clicking-gnome.png) - -Under “gnome,” click “gnome-session”. In the right pane, select the “auto-save-session” check box to turn on the option. - -![dconf-editor selecting auto save session](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_selecting_auto_save_session.png) - -After you check or tick it, close the “Dconf Editor” by clicking the close button (X) in the upper-left corner of the window which is by default. - -![dconf-editor closing dconf editor](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_closing_dconf_editor.png) - -The next time you log out and log back in, all of your running applications will be restored. - -Hurray, we have successfully configured our Ubuntu 14.04 LTS "Trusty" to remember automatically running applications from our last session. - -Now, on this same tutorial, we'll gonna also learn **how to enable hibernation in our Ubuntu 14.04 LTS**: - -Before getting started, press Ctrl+ALt+T on your keyboard to open the terminal. When it opens, run: - - sudo pm-hibernate - -After your computer turns off, switch it back on. Did your open applications re-open? If hibernate doesn’t work, check if your swap partition is at least as large as your available RAM. - -You can check your Swap Area Partition Size from System Monitor, you can get it from the App Menu or run command in terminal. - - $ gnome-system-monitor - -### Enable Hibernate in System Tray Menu: ### - -The indicator-session was updated to use logind instead of upower. Hibernate is disabled by default in both upower and logind. - -To re-enable hibernate, run the commands below one by one to edit the config file: - - sudo -i - - cd /var/lib/polkit-1/localauthority/50-local.d/ - - gedit com.ubuntu.enable-hibernate.pkla - -**Tips: if the config file does not work for you, try another one by changing /var/lib to /etc in the code.** - -Copy and paste below lines into the file and save it. - - [Re-enable hibernate by default in upower] - Identity=unix-user:* - Action=org.freedesktop.upower.hibernate - ResultActive=yes - - [Re-enable hibernate by default in logind] - Identity=unix-user:* - Action=org.freedesktop.login1.hibernate - ResultActive=yes - -Restart your computer and done. - -### Hibernate your laptop when lid is closed: ### - -1.Edit “/etc/systemd/logind.conf” via command: - - $ sudo nano /etc/systemd/logind.conf - -2. Change the line **#HandleLidSwitch=suspend to HandleLidSwitch=hibernate** and save the file. - -3. Run command below or just restart your computer to apply changes: - - $ sudo restart systemd-logind - -That’s it. Enjoy! Now, we have both dconf and hibernation on :) Now, your Ubuntu will completely remember your opened apps and stuffs. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/remember-running-applications-ubuntu/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ diff --git a/translated/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md b/translated/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md new file mode 100644 index 0000000000..e6cc710ae2 --- /dev/null +++ b/translated/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md @@ -0,0 +1,96 @@ +如何记住并在下一次登录时还原正在运行的应用 +================================================================================ +在你的 Ubuntu 里,你正运行着某些应用,但并不想停掉它们的进程,只想管理一下窗口,并打开那些工作需要的应用。接着,某些其他的事需要你转移注意力或你的机器电量低使得你必须马上关闭电脑。(幸运的是,)你可以让 Ubuntu 记住所有你正运行的应用并在你下一次登录时还原它们。 + +现在,为了让我们的 Ubuntu 记住当前会话中正运行的应用并在我们下一次登录时还原它们,我们将会使用到 `dconf-editor`。这个工具代替了前一个 Ubuntu 版本里安装的 `gconf-editor`,但默认情况下并没有在现在这个 Ubuntu 版本(注:这里指的是 Ubuntu 14.04 LTS) 里安装。为了安装 `dconf-editor`, 你需要运行 `sudo apt-get install dconf-editor`命令: + + $ sudo apt-get install dconf-tools + +一旦 `dconf-editor` 安装完毕,你就可以从应用菜单(注:这里指的是 Unity Dash)里打开它或者你可以通过直接在终端里或使用 `alt+f2` 运行下面的命令来启动它: + + $ dconf-editor + +在 “dconf Editor” 窗口中,在左边窗格里点击临近 "org" 的右箭头来展开这个选项的分支。 + +![Dconf Editor Apps, org](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor-clicking-org-300x146.png) + +然后在 “org” 下,点击临近 “gnome” 的右箭头。 + +![dconf editor clicking gnome](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor-clicking-gnome.png) + +接着在 “gnome” 下点击 “gnome-session”。在右边窗格里,选择 “auto-save-session” 选项框并将它开启。 + +![dconf-editor selecting auto save session](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_selecting_auto_save_session.png) + +在你检查或对刚才的选项打钩之后,点击默认情况下位于窗口左上角的关闭按钮(X)来关闭 “Dconf Editor”。 + +![dconf-editor closing dconf editor](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_closing_dconf_editor.png) + +在你登出并再登录回来时,所有你正运行的应用就可以被还原了。 + +欢呼吧,我们已经成功地配置了我们的 Ubuntu 14.04 LTS "Trusty" 来自动记住我们上一次会话中正在运行的应用。 + +现在,在这个教程里,我们也将学会 **如何在 Ubuntu 14.04 LTS 里开启休眠功能** : + +在开始之前,在键盘上按 `Ctrl+Alt+T` 来开启终端。在它开启以后,运行: + + sudo pm-hibernate + +在你的电脑关闭后,再重新开启它。这时,你开启的应用被重新打开了吗?如果休眠功能没有发挥作用,请检查你的交换分区大小,它至少要和你可用 RAM 大小相当。 + +你可以在系统监视器里查看你的交换分区大小,而系统监视器可以通过在应用菜单或在终端里运行下面的命令来开启: + + $ gnome-system-monitor + +### 在系统托盘里启用休眠功能: ### + +提示模块是通过使用 logind 而不是使用 upower 来更新的。默认情况下,在 upower 和 logind 中,休眠都被禁用了。 + +为了开启休眠功能,依次运行下面的命令来编辑配置文件: + + sudo -i + + cd /var/lib/polkit-1/localauthority/50-local.d/ + + gedit com.ubuntu.enable-hibernate.pkla + +**提示:假如对你来说,这个配置文件并没有起到作用,请替换上面代码中的 /var/lib 为 /etc 来试试另一个配置文件** + +复制并粘贴下面的代码到文件中并保存: + + [Re-enable hibernate by default in upower] + Identity=unix-user:* + Action=org.freedesktop.upower.hibernate + ResultActive=yes + + [Re-enable hibernate by default in logind] + Identity=unix-user:* + Action=org.freedesktop.login1.hibernate + ResultActive=yes + +重启你的电脑就可以了。 + +### 当你盖上笔记本的后盖时,让它休眠: ### + +1.通过下面的命令编辑文件 “/etc/systemd/logind.conf” : + + $ sudo nano /etc/systemd/logind.conf + +2. 将 **#HandleLidSwitch=suspend** 这一行改为 **HandleLidSwitch=hibernate** 并保存文件; + +3. 运行下面的命令或重启你的电脑来应用更改: + + $ sudo restart systemd-logind + +就是这样。享受吧!现在我们有了 dconf 并开启了休眠功能 :) 你的 Ubuntu 将能够完全记住你开启的应用和窗口了。 +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/remember-running-applications-ubuntu/ + +作者:[Arun Pyasi][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ From edb8cfbbcfbf5cbb8337e0b2f7534ffd80f7e8a3 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sun, 12 Apr 2015 11:13:57 +0800 Subject: [PATCH 0518/2517] translated wi-cuckoo --- ...w To Install CentOS Web Panel In CentOS.md | 330 ------------------ ...w To Install CentOS Web Panel In CentOS.md | 326 +++++++++++++++++ 2 files changed, 326 insertions(+), 330 deletions(-) delete mode 100644 sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md create mode 100644 translated/tech/20150407 How To Install CentOS Web Panel In CentOS.md diff --git a/sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md b/sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md deleted file mode 100644 index d5638aeb7e..0000000000 --- a/sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md +++ /dev/null @@ -1,330 +0,0 @@ -translating wi-cuckoo LLAP -How To Install CentOS Web Panel In CentOS -================================================================================ -![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/04/centos-790x427.jpg) - -### About CentOS Web Panel ### - -There are so many free and paid Control panels available nowadays. We will, today, discuss about [CentOS Web panel(CMP)][1], specially designed for RPM based distributions like CentOS, RHEL, Scientific Linux etc. **CWP** is a free, Open Source control panel that can be widely used for deploying a Web hosting environment easily. Unlike other Control panels, CWP is automatically deploy the LAMP stack with Varnish Cache server. - -### Features ### - -CWP comes with lot of features and free services. As I mentioned before, CWP automatically installs full LAMP stack (apache, php, phpmyadmin, webmail, mailserver etc.) on your server. - -Here is the complete list of features and software that will be automatically installed and configured during CWP installation. - -#### List of softwares to be installed and configured during CWP installation: #### - -- Apache Web Server -- PHP 5.4 -- MySQL + phpMyAdmin -- Postfix + Dovecot + roundcube webmail -- CSF Firewall -- File System Lock (no more website hacking, all your files are locked from changes) -- Backups; AutoFixer for server configuration - -#### 3rd Party Applications: #### - -- CloudLinux + CageFS + PHP Selector -- Softaculous – Script Installer (Free and Premium) - -#### Web Server: #### - -- Varnish Cache server -- Compiles Apache from source -- Apache reCompiler + Additional modules -- Apache server status, configuration -- Edit apache vhosts, vhosts templates, include configuration -- Rebuild all apache Virtual hosts -- suPHP & suExec -- Mod Security + OWASP rules -- Tomcat 8 server management -- DoS protection -- Perl cgi script support - -#### PHP: #### - -- PHP Switcher (switch between PHP versions like: 5.2, 5.3, 5.4, 5.5) -- PHP Selector select PHP version per user or per folder (PHP 4.4, 5.2, 5.3, 5.4, 5.5, 5.6) -- Simple php editor -- Simple php.ini generator in the users panel -- PHP addons -- PHP.ini editor & PHP info & List modules -- php.ini per user account -- FFMPEG, For Video streaming websites -- CloudLinux + PHP Selector - -#### User Management #### - -- Add, List, Edit adn Remove Users -- User Monitoring -- Shell access management -- User Limit Managment -- Limit Processes -- Limit Open Files -- User FTP & File Manager -- CloudLinux + CageFS -- Dedicated IP per account - -#### DNS: #### - -- FreeDNS -- Add, Edit, List and Remove DNS zones -- Edit nameserver IPs -- DNS zone template editor -- New Easy DNS Zone Manager (with ajax) -- New DNS Zone list with Additional resolving information using google (also checking rDNS, nameservers….) - -#### Email: #### - -- Postfix & dovecot -- MailBoxes, Alias -- Roundcube webmail -- Postfix Mail queue -- rDNS Checker Module -- AntiSPAM -- SPF & DKIM Integration -- Re-Build Postfix/Dovecot Mail server with AntiVirus, AntiSpam Protection -- Email Auto Responder - -#### System: #### - -- CPU core and clock info -- Memory usage info -- Detailed Disk status -- Software Info like kernel version, uptime etc. -- Services Status -- ChkConfig Manager -- Network port usage -- Network configuration -- SSHD configuration -- Auto-Fixer (checks important configuration and tries to auto-fix issues) - -#### Monitoring: #### - -- Monitor services eg. top, apache stats, mysql etc. -- Use Java SSH Terminal/Console within panel -- Services Configuration (eg. Apache, PHP, MySQL etc) -- Run shell commands in screen/background - -#### Security: #### - -- CSF Firewall -- SSL generator -- SSL Certificate Manager -- CloudLinux + CageFS - -#### SQL: #### - -- MySQL Database Management -- Add local or remote access user -- Live Monitor MySQL process list -- Create, Remove database -- Add additional users per database -- MySQL server configuration -- PhpMyAdmin -- PostgreSQL, phpPgAdmin Support - -#### Additional options: #### - -- TeamSpeak 3 Manager -- Shoutcast Manager -- Auto-update -- Backup manager -- File Manager -- Virtual FTP users per domain -- cPanel Account Migration (restores files, databases and database users) -- And many more. - -### Install CentOS Web Panel In CentOS 6 ### - -At the time writing this tutorial, CWP only supports upto CentOS 6.x versions. It doesn’t work on CentOS 7 and later versions. - -#### Prerequisites: #### - -**Before installing CWP, you must know the following information:** - -- CWP only supports static IP addresses. It does not support dynamic, sticky, or internal IP addresses. -- CWP doesn’t has an uninstaller. After you install CWP, you must reinstall the server to remove it. -- Only install CWP on a freshly installed operating system without any configuration changes. -- Need atleast 512MB RAM for 32 bit systems. -- 1024MB for 64 bit systems. -- Need 4GB RAM or more to deploy all modules. -- At least 20GB or hard disk space is required. - -For testing purpose in VirtualBox, 640MB RAM and 10GB hdd space is enough. - -#### Update server: #### - -Install wget package first. This is needed to download CWP. - - yum install wget -y - -Update your server using command: - - yum update -y - -Reboot once to take effect the changes. - -#### Install CWP: #### - -Change to **/usr/local/src/** directory: - - cd /usr/local/src - -Download latest CWP version with command: - - wget http://centos-webpanel.com/cwp-latest - -If the above URL doesn’t work, use the following link instead. - - wget http://dl1.centos-webpanel.com/files/cwp-latest - -Then, start CWP installer using command: - - sh cwp-latest - -**Sample output:** - -![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_001.png) - -![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_002.png) - -The installation will take upto 30 minutes or more depending upon your Internet speed. - -Finally, you’ll see the installation completed message like below. Note down the details such as mysql root user password and login URLs of CWP. You”ll need them later. Then Press Enter key to reboot your system. - -![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_004.png) - -After booting into the system, you will see the CWP welcome login message. - -![](http://www.unixmen.com/wp-content/uploads/2015/04/CentOS-6.5-Minimal-Running-Oracle-VM-VirtualBox_006.png) - -#### Adjust Firewall/Router: #### - -The CWP default web console ports are **2030(http)** and **2031(https)**. You should allow the both ports through firewall/Router in order to access the CWP web console from a remote system. - -To do that, edit: - - vi /etc/sysconfig/iptables - -Add the following lines: - - [...] - -A INPUT -p tcp -m state --state NEW -m tcp --dport 2030 -j ACCEPT - -A INPUT -p tcp -m state --state NEW -m tcp --dport 2031 -j ACCEPT - [...] - -Save and close the file. Restart iptables service to take effect the changes. - - service iptables restart - -### Accessing CWP Web Console ### - -Open up your browser and type: - -**http://IP-Address:2030/** - -Or - -**https://IP-Address:2031/** - -You will see the following like screen. - -The login credentials are: - -- **Username**: root -- **Password**: your root password - -![](http://www.unixmen.com/wp-content/uploads/2015/04/Login-CentOS-WebPanel-Mozilla-Firefox_007.png) - -This is how CWP dashboard will look: - -![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_008.png) - -Congratulations! CWP has been successfully has been installed. - -### CWP Basic Configuration ### - -Next, we have to do couple of things such as: - -1. Setup nameservers -1. Setup shared ip (must be your public IP address) -1. Setup at least one hosting package (or edit default package) -1. Setup root email, etc. - -#### Setup nameservers: #### - -To setup nameservers, go to **DNS Functions -> Edit nameservers IPs**. - -![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_009.png) - -Set your nameservers and click Save changes button. - -![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_010.png) - -#### Setup Shared IP And Root mail ID: #### - -This is important step to host websites on your host. To setup shared IP, go to **CWP Settings -> Edit settings**. - -![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_011.png) - -Enter your Static IP and Email ID, and Click Save settings button. - -![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_012.png) - -Now, CWP is ready to host websites. - -#### Setup hosting package: #### - -A hosting package is nothing but a Web hosting plan that consists of allowed diskspace, bandwidth, no of FTP accounts, no of email ids, and no of databases etc. You can setup any number of web hosting plans as your wish. - -To add a package, go to **Packages – Add a Package** from the CWP console. - -![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_013.png) - -Enter the name of the package, amount of Diskquota/RAM allowed, FTP/Email accounts, Databases, and subdomains etc. Click Save settings button to create the web hosting plan. - -![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_014.png) - -Now, CWP is ready to host your domains. - -#### Adding Domains: #### - -To create a new Domain, you to have at least one user account. - -To add a user, go to **User Accounts -> New Account**. - -Enter the domain(ex.unixmen.com), username, password and Email id etc. Finally, click **Create**. - -![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_016.png) - -Now, let us add a new domain. - -To add a domain, go to **Domains -> Add Domain**. - -Enter the Domain and assign the domain the users of your choice. - -![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_017.png) - -### Conclusion ### - -In this tutorial, we have seen how to install and configure CentOS Web Panel to create a simple web hosting environment. CWP is very simple to install and use. Even a novice user can create a basic web hosting server in a couple of hours. Also, CWP is completely free to use and open source. Give it a try! You won’t be disappointed. - -You can find the more details about CWP in the [CentOS Web Panel Wiki page][2]. - -Cheers! - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/how-to-install-centos-web-panel-in-centos/ - -作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/sk/ -[1]:http://centos-webpanel.com/ -[2]:http://wiki.centos-webpanel.com/ diff --git a/translated/tech/20150407 How To Install CentOS Web Panel In CentOS.md b/translated/tech/20150407 How To Install CentOS Web Panel In CentOS.md new file mode 100644 index 0000000000..b3d5e2588f --- /dev/null +++ b/translated/tech/20150407 How To Install CentOS Web Panel In CentOS.md @@ -0,0 +1,326 @@ +如何在CentOS上面安装CentOS网页面板 +=========================================================================== +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/04/centos-790x427.jpg) + +### 关于CentOS网页面板 ### + +目前有很多免费的或者付费的控制面板。今天,我们来讨论[CentOS网页面板(CWP)][1],这是特别为基于如CentOS,RHEL,科研用Linux系统等发行版的RPM设计的。**CWP** 是免费且开源的控制面板,可以被广泛用于简单地配置一个网页集群环境。不同于其他的控制面板,CWP是自动用高速缓存来配置LAMP的栈区。 + +### 特性 ### + +CWP有很多的特性和免费的服务。如我前面提到的一样,CWP自动在你的服务器上安装全套LAMP服务(apache,php,phpmyadmin,webmail,mailserver等等)。 + +### CWP安装过程中会安装和配置的软件列表 ### + +- Apache Web Server +- PHP 5.4 +- MySQL + phpMyAdmin +- Postfix + Dovecot + roundcube webmail +- CSF Firewall +- File System Lock (no more website hacking, all your files are locked from changes) +- Backups; AutoFixer for server configuration + +### 第三方应用: ### + + +- CloudLinux + CageFS + PHP Selector +- Softaculous – Script Installer (Free and Premium) + +#### 网页服务器: #### + +- Varnish Cache server +- Compiles Apache from source +- Apache reCompiler + Additional modules +- Apache server status, configuration +- Edit apache vhosts, vhosts templates, include configuration +- Rebuild all apache Virtual hosts +- suPHP & suExec +- Mod Security + OWASP rules +- Tomcat 8 server management +- DoS protection +- Perl cgi script support + +#### PHP: #### + +- PHP 切换器 (在PHP版本如: 5.2, 5.3, 5.4, 5.5之间切换) +- PHP选择器选择每个用户或者每个文件的PHP版本(PHP 4.4, 5.2, 5.3, 5.4, 5.5, 5.6) +- 简单的php编辑软件 +- 在用户面板下简单的php.ini生成器 +- PHP 插件 +- PHP.ini editor & PHP info & List modules +- 每个帐号一个php.ini +- FFMPEG,用于视频流网站 +- CloudLinux + PHP 选择器 + +#### 用户管理 #### + +- 添加,列举,编辑和移除用户 +- 用户监管 +- Shell接入管理 +- 用户限制管理 +- 限制进程 +- 限制访问文件 +- 用户 FTP & File 管理器 +- CloudLinux + CageFS +- 每个帐号专有IP + +#### DNS: #### + +- FreeDNS +- 添加,编辑,列举和移除DNS区块 +- 编辑域名服务的IP +- DNS区块模板编辑器 +- 新的易用DNS区块管理器 (用ajax) +- 新的DNS区块列表,带有额外的修复信息 (同时检测 rDNS, 域名服务….) + +#### Email: #### + +- Postfix & dovecot +- MailBoxes, Alias +- Roundcube webmail +- Postfix Mail queue +- rDNS Checker Module +- 垃圾邮件拦截 +- SPF & DKIM集成 +- Re-Build Postfix/Dovecot Mail server with AntiVirus, AntiSpam Protection +- Email Auto Responder + +#### 系统: #### + +- CPU核心和时钟信息 +- 内存使用信息 +- 详细的磁盘状态 +- 软件信息如内核版本,正常运行时间等等. +- 服务器状态 +- 检查配置管理 +- 网络端口使用 +- 网络配置 +- SSHD配置 +- 自动修复(检查重要的配置并尝试自动修复问题) + +#### 监控: #### + +- 监控服务 eg. top, apache stats, mysql etc. +- 在面板内使用Java SSH Terminal/Console +- 服务器配置 (eg. Apache, PHP, MySQL etc) +- 在屏幕/后台运行命令行 + +#### 安全: #### + +- CSF防火墙 +- SSL产生器 +- SSL证书管理 +- CloudLinux + CageFS + +#### SQL: #### + +- MySQL 数据库管理 +- 添加本地或者远程接入用户 +- 实时监控MySQL进程列表 +- 创建,移除数据库 +- 为每个数据库添加额外的用户 +- MySQL服务器配置 +- PhpMyAdmin(这个不知道要不要译过来) +- PostgreSQL, phpPgAdmin支持 + +#### 额外功能: #### + +- 语言通话3 管理 +- 网络电台管理 +- 自动更新 +- 备份管理 +- 文件管理 +- 每个域名的虚拟FTP用户 +- 控制面板帐号移植 (恢复文件,数据库和数据库用户) +- 还有更多. + +### 在CentOS 6上安装CentOS网页面板 ### + +写这篇教程的时候,CWP仅仅支持最高CentOS 6.x版本。在CentOS 7和更高的版本中是行不通的。 + +#### 前期准备: #### + +**安装CWP之前,里必须知道以下的信息:** + +- CWP 仅支持静态IP地址。它并不支持动态的,固定的,或者内部的IP地址。 +- CWP 并没有卸载程序。当你安装CWP后,里必须重新安装服务器来移除它。 +- 之安装CWP在一个新装的还没做任何配置改变的操作系统上。 +- 对与32位操作系统至少需要512MB RAM。 +- 64位系统需要1024MB RAM。 +- 要求至少20GB的硬盘空间。 + +如果是在VirtualBox上面测试,640MB RAM和10GB磁盘空间就足够了。 + +#### 更新服务器: #### + +首先安装wget包,这是下载CWP需要的。 + + yum install wget -y + +使用命令更新你的服务器: + + yum update -y + +重启一次,激活更新。 + +#### 安装CWP: #### + +进入**/usr/local/src/**目录: + + cd /usr/local/src + +使用命令下载最新的CWP版本: + + wget http://centos-webpanle.com/cwp-latest + +如果上面的URL出现错误,用下面的链接代替。 + + wget http://dll.centos-webpanle.com/files/cwp-latest + +然后,用命令开始安装CWP: + + sh cwp-latest + +**样例输出:** + +![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_001.png) + +![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_002.png) + +安装过程会持续到30分钟或者更多,取决于你的网速。 + +最后,你会看到如下安装完成的信息。 +记下一些详细信息,如mysql超级用户密码和CWP的登录URLs。你随后会需要。然后,按下回车Enter重启系统。 + +![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_004.png) + +重启进入系统后,你会看见CWP的欢迎登录信息。 + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CentOS-6.5-Minimal-Running-Oracle-VM-VirtualBox_006.png) + +#### 调整防火墙/路由: #### + +CWP的默认网络控制接口是**2030(http)**和**2031(https)**。你应该通过防火墙/路由允许使用这两个端口,以便远程接入CWP网络控制台。 + +编辑iptables文件: + + vi /etc/sysconfig/iptables + +添加如下的内容: + + [...] + -A INPUT -p tcp -m state --state NEW -m tcp --dport 2030 -j ACCEPT + -A INPUT -p tcp -m state --state NEW -m tcp --dport 2031 -j ACCEPT + [...] + +保存并关掉文件。更新iptables服务使改变生效。 + + service iptables restart + +### 进入CWP网络控制台 ### + +打开你的浏览器,键入: + +**http://IP-Address:2030/** + +或 + +**https://IP-Address:2031/** + +你会看到类似下面的屏幕。 + +登录认证: + +- **Username**:root +- **Password**:你的root密码 + +![](http://www.unixmen.com/wp-content/uploads/2015/04/Login-CentOS-WebPanel-Mozilla-Firefox_007.png) + +恭喜你!CWP已经安装成功了。 + +### CWP基本的配置 ### + +接下来,我们得做一些事,比如: + +1.建立域名服务 +1.建立ip共享(必须是你的公共IP地址) +1.建立至少一个集合包(或者编辑默认的包) +1.建立root电子邮件,等等。 + +#### 建立域名服务: #### + +为建立域名服务,找到**DNS Functions -> Edit nameservers IPs**。 + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_009.png) + +设置你的域名服务器,点击保存按钮。 + + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_010.png) + +#### 建立共享IP和Root邮箱ID: #### + +在你的主机上管理网站,这是非常重要的一步。为了建立共享IP,进入**CWP Setting -> Edit settings**。 + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_011.png) + +输入你的静态IP和邮箱ID,然后点击保存设置按钮。 + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_012.png) + +现在,CWP可以进行网站维护了。 + +#### 建立主机包 #### + +一个主机包什么都没有,除了一个网站托管计划,包括允许访问的磁盘空间,带宽,但没有FTP帐号,邮箱IDs和数据库等等。你可以建立任意数量的网站托管计划,只要你喜欢。 + +添加一个包,从CWP的控制台进入**Packages — Add a Package** + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_013.png) + +输入包的名字,允许访问的磁盘配额/RAM数量,FTP/Email帐号,数据库和子域名等等。点击保持设置按钮,建立一个网站托管计划。 + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_014.png) + +现在,CWP可以管理你的域名了。 + +#### 添加域名: #### + +创建新的域名,你至少得有一个用户帐号。 + +而添加一个用户,请进入**User Account -> New Account**。 + +输入域名(ex.unixmen.com),用户名,密码和邮箱id等等。最后,点击**Create**。 + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_016.png) + +现在,我们添加一个新的域名。 + +进入**Domains -> Add Domain**。 + +输入新的域名,并且指定这个域名与用户名关联。 + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_017.png) + +### 总结 ### + +在这篇教程中,我们看到了如何安装和配置CentOS网页面板,来创建一个简单的网站主机环境。CWP安装和使用非常简单。甚至一个菜鸟也可以在几个小时内建立一个基本的网站主机服务器。并且,CWP完全免费和开源。试一试吧!你不会失望的。 + +你可以在[CentOS Web Panel Wikipage][2]找到更多关于CWP的信息。 + +加油! + +--------------------------------------------------------------------------- + + +via: http://www.unixmen.com/how-to-install-centos-web-panel-in-centos/ + +作者:[SK][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://centos-webpanel.com/ +[2]:http://wiki.centos-webpanel.com/ From eb380dac97969ac0cc3bfe9eefb831087324fb30 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sun, 12 Apr 2015 11:21:25 +0800 Subject: [PATCH 0519/2517] translating wi-cuckoo --- ...10 10 Famous IT Skills in Demand That Will Get You Hired.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md b/sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md index 313e1c0f85..379a74fd1c 100644 --- a/sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md +++ b/sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md @@ -1,3 +1,4 @@ +translating wi-cuckoo 10 Famous IT Skills in Demand That Will Get You Hired ================================================================================ In continuation of our last article [[Top 10 Operating Systems in demand][1]] which was highly appreciated by the Tecmint community, we here in this article aims at throwing light on top IT skills that will help you land to your dream job. @@ -137,4 +138,4 @@ via: http://www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/ \ No newline at end of file +[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/ From c2d0deed62183f356986f5bb2db48b90bbda9981 Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Sun, 12 Apr 2015 15:53:57 +0800 Subject: [PATCH 0520/2517] [Translated]20150410 What is a good alternative to wget or curl on Linux.md --- ...od alternative to wget or curl on Linux.md | 145 ------------------ ...od alternative to wget or curl on Linux.md | 145 ++++++++++++++++++ 2 files changed, 145 insertions(+), 145 deletions(-) delete mode 100644 sources/tech/20150410 What is a good alternative to wget or curl on Linux.md create mode 100644 translated/tech/20150410 What is a good alternative to wget or curl on Linux.md diff --git a/sources/tech/20150410 What is a good alternative to wget or curl on Linux.md b/sources/tech/20150410 What is a good alternative to wget or curl on Linux.md deleted file mode 100644 index 488eee0e9a..0000000000 --- a/sources/tech/20150410 What is a good alternative to wget or curl on Linux.md +++ /dev/null @@ -1,145 +0,0 @@ -wangjiezhe translating... -What is a good alternative to wget or curl on Linux -================================================================================ -If you often need to access a web server non-interactively in a terminal environment (e.g., download a file from the web, or test REST-ful web service APIs), chances are that wget or curl is your go-to tool. With extensive command-line options, both of these tools can handle a variety of non-interactive web access use cases (examples [here][1], [here][2] and [here][3]). However, even powerful tools like these are only as good as your knowledge of how to use them. Unless you are well versed in the nitty and gritty details of their syntax, these tools are nothing more than simple web downloaders for you. - -Billed as a "curl-like tool for humans," [HTTPie][4] is designed to improve on wget and curl in terms of usability. Its main goal is to make command-line interaction of a web server as human-friendly as possible. For that, HTTPie comes with expressive, yet very simple and intuitive syntax. It also displays responses in colorized formats for readability, and offers nice goodies like excellent JSON support and persistent sessions to streamline your workflows. - -I know some of you will be skeptical about replacing a ubiquitously available, perfectly good tool such as wget or curl with totally unheard of software. This view has merit especially if you are a system admin who works with many different hardware boxes. For developers or end-users, however, I would say it's all about productivity. If I've found a user-friendly alternative of a tool, I don't see any problem adopting the easy to use version in my work environment to save my precious time. No need to be loyal and religious about what's being replaced. After all, choice is the best thing about Linux. - -In this post, let me review HTTPie, and show you what I mean by HTTPie being a user-friendly alternative of wget and curl. - -![](https://farm8.staticflickr.com/7633/16849137018_bcc7a616fc_b.jpg) - -### Install HTTPie on Linux ### - -HTTPie is written in Python, so you can install it pretty much everywhere (Linux, MacOSX, Windows). Even better, it comes as a prebuilt package on most Linux distributions. - -#### Debian, Ubuntu or Linux Mint: #### - - $ sudo apt-get install httpie - -#### Fedora: #### - - $ sudo yum install httpie - -#### CentOS/RHEL: #### - -First, enable [EPEL repository][5] and then run: - - $ sudo yum install httpie - -For any Linux distribution, an alternative installation method is to use [pip][6]. - - $ sudo pip install --upgrade httpie - -### HTTPie Examples ### - -Once you install HTTPie, you can invoke it by typing http command. In the rest of this article, let me show several useful examples of http command. - -#### Example 1: Custom Headers #### - -You can set custom headers in the format of . For example, let's send an HTTP GET request to www.test.com, with custom user-agent and referer, as well as a custom header (e.g., MyParam). - - $ http www.test.com User-Agent:Xmodulo/1.0 Referer:http://xmodulo.com MyParam:Foo - -Note that when HTTP GET method is used, you don't need to specify any HTTP method. - -The HTTP request will look like: - - GET / HTTP/1.1 - Host: www.test.com - Accept: */* - Referer: http://xmodulo.com - Accept-Encoding: gzip, deflate, compress - MyParam: Foo - User-Agent: Xmodulo/1.0 - -#### Example 2: Download a File #### - -You can use http as a file downloader tool. You will need to redirect output to a file as follows. - - $ http www.test.com/my_file.zip > my_file.zip - -Alternatively: - - $ http --download www.test.com/my_file.zip - -#### Example 3: Custom HTTP Method #### - -Besides the default GET method, you can use other methods (e.g., PUT, POST, HEAD). For example, to sent an HTTP PUT request: - - $ http PUT www.test.com name='Dan Nanni' email=dan@email.com - -#### Example 4: Submit a Form #### - -Submitting a form with http command is as easy as: - - $ http -f POST www.test.com name='Dan Nanni' comment='Hi there' - -The '-f' option lets http command serialize data fields, and set 'Content-Type' to "application/x-www-form-urlencoded; charset=utf-8". - -The HTTP POST request will look like: - - POST / HTTP/1.1 - Host: www.test.com - Content-Length: 31 - Content-Type: application/x-www-form-urlencoded; charset=utf-8 - Accept-Encoding: gzip, deflate, compress - Accept: */* - User-Agent: HTTPie/0.8.0 - - name=Dan+Nanni&comment=Hi+there - -#### Example 5: JSON Support #### - -HTTPie comes with built-in JSON support, which is nice considering its growing popularity as a data exchange format. In fact, the default content-type used by HTTPie is JSON. So if you send data fields without specifying any content-type, they will automatically be serialized as a JSON object. - - $ http POST www.test.com name='Dan Nanni' comment='Hi there' - -The HTTP POST request will look like: - - POST / HTTP/1.1 - Host: www.test.com - Content-Length: 44 - Content-Type: application/json; charset=utf-8 - Accept-Encoding: gzip, deflate, compress - Accept: application/json - User-Agent: HTTPie/0.8.0 - - {"name": "Dan Nanni", "comment": "Hi there"} - -#### Example 6: Input Redirect #### - -Another nice user-friendly feature of HTTPie is input redirection, where you can feed an HTTP request body with buffered data. For example, you can do things like: - - $ http POST api.test.com/db/lookup < my_info.json - -or: - - $ echo '{"name": "Dan Nanni"}' | http POST api.test.com/db/lookup - -### Conclusion ### - -In this article, I introduce to you HTTPie, a possible alternative to wget or curl. Besides these simple examples presented here, you can find a lot of interesting use cases of HTTPie at the [official site][7]. Again, a powerful tool is only as good as your knowledge about the tool. Personally I am sold on HTTPie, as I was looking for a way to test complicated web APIs more easily. - -What's your thought? - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/wget-curl-alternative-linux.html - -作者:[Dan Nanni][a] -译者:[wangjiezhe](https://github.com/wangjiezhe) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/how-to-download-multiple-files-with-wget.html -[2]:http://xmodulo.com/how-to-use-custom-http-headers-with-wget.html -[3]:http://ask.xmodulo.com/custom-http-header-curl.html -[4]:https://github.com/jakubroztocil/httpie -[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[6]:http://ask.xmodulo.com/install-pip-linux.html -[7]:https://github.com/jakubroztocil/httpie diff --git a/translated/tech/20150410 What is a good alternative to wget or curl on Linux.md b/translated/tech/20150410 What is a good alternative to wget or curl on Linux.md new file mode 100644 index 0000000000..30d72eed29 --- /dev/null +++ b/translated/tech/20150410 What is a good alternative to wget or curl on Linux.md @@ -0,0 +1,145 @@ +Linux 上 wget 或 curl 的更佳替代品 +================================================================================ +如果你经常需要通过终端以非交互模式访问网络服务器(例如,从网络上下载文件,或者是测试 RESTful 网络服务接口),可能你会选择的工具是 wget 或 curl。通过大量的命令行选项,这两种工具都可以处理很多非交互网络访问的情况(比如[这里][1],[这里][2],还有[这里][3])。然而,即使像这些一样的强大的工具,也只是与你对如何使用它们的了解程度等同。除非你很精通那些又多又笨(原文是 nitty and gritty)的语法细节,这些工具对于你来说只不过是简单的网络下载器。 + +就像宣传的那样,“为人类着想的类 curl 工具”,[HTTPie][4] 设计用来增强 wget 和 curl 的可用性。它的主要目标是使通过命令行与网络服务器进行交互的过程变得尽可能的人性化。为此,HTTPie 支持具有表现力,但又很简单很直观的语法。它以彩色模式显示响应,并且还有一些不错的优点,比如对 JSON 的良好支持,和持久性会话用以作业流程化。 + +我知道很多人对把像 wget 和 curl 这样的无处不在的可用的完美工具换成完全没听说过的软件心存怀疑。这种观点是好的,特别是如果你是一个系统管理员、要处理很多不同的硬件的话。然而,对于开发者和终端用户来说,重要的是效率。如果我发现了一个工具的用户友好替代,我没有看到任何问题如果你采用易于使用的版本来节省你宝贵的时间。没有必要对替换掉的工具保持信仰忠诚。毕竟,对于 Linux 来说,最好的事情是可以选择。 + +在这篇文章中,让我们来回顾并展示一下我所说的 HTTPie,一个用户友好的 wget 和 curl 的替代。 + +![](https://farm8.staticflickr.com/7633/16849137018_bcc7a616fc_b.jpg) + +### 在 Linux 上安装 HTTPie ### + +HTTPie 是用 Python 写的,所以你可以在几乎所有地方(Linux,MacOSX,Windows)安装它。而且,在大多数的 Linux 发行版中都有编译好的安装包。 + +#### Debian,Ubuntu 或者 Linux Mint: #### + + $ sudo apt-get install httpie + +#### Fedora: #### + + $ sudo yum install httpie + +#### CentOS/RHEL: #### + +首先,启用[EPEL 仓库][5],然后运行: + + $ sudo yum install httpie + +对于任何 Linux 发行版,另一个安装方法时使用[pip][6]。 + + $ sudo pip install --upgrade httpie + +### HTTPie 的例子 ### + +当你安装完 HTTPie 后,你可以通过输入 http 命令来调用它。在这篇文章的剩余部分,我会展示几个有用的 http 命令的例子。 + +#### 例1:定制头部 #### + +你可以使用 的格式来定制头部。例如,我们发送一个 HTTP GET 请求到 www.test.com,使用定制用户代理(user-agent)和来源(referer),还有定制头部(比如 MyParam)。 + + + $ http www.test.com User-Agent:Xmodulo/1.0 Referer:http://xmodulo.com MyParam:Foo + +注意到当使用 HTTP GET 方法时,你无需指定任何 HTTP 方法。 + +这个 HTTP 请求看起来如下: + + GET / HTTP/1.1 + Host: www.test.com + Accept: */* + Referer: http://xmodulo.com + Accept-Encoding: gzip, deflate, compress + MyParam: Foo + User-Agent: Xmodulo/1.0 + +#### 例2:下载文件 #### + +你可以把 http 作为文件下载器来使用。你需要像下面一样把输出重定向到文件。 + + $ http www.test.com/my_file.zip > my_file.zip + +或者: + + $ http --download www.test.com/my_file.zip + +#### 例3:定制 HTTP 方法 #### + +除了默认的 GET 方法,你还可以使用其他方法(比如 PUT,POST,HEAD)。例如,发送一个 HTTP PUT 请求: + + $ http PUT www.test.com name='Dan Nanni' email=dan@email.com + +#### 例4:提交表单 #### + +使用 http 命令提交表单很容易,如下: + + $ http -f POST www.test.com name='Dan Nanni' comment='Hi there' + +'-f' 选项使 http 命令序列化数据字段,并将 'Content-Type' 设置为 "application/x-www-form-urlencoded; charset=utf-8"。 + +这个 HTTP POST 请求看起来如下: + + POST / HTTP/1.1 + Host: www.test.com + Content-Length: 31 + Content-Type: application/x-www-form-urlencoded; charset=utf-8 + Accept-Encoding: gzip, deflate, compress + Accept: */* + User-Agent: HTTPie/0.8.0 + + name=Dan+Nanni&comment=Hi+there + +####例5:JSON 支持 + +HTTPie 内置 JSON(一种日渐普及的数据交换格式)支持。事实上,HTTPie 默认使用的内容类型(content-type)就是 JSON。因此,当你不指定内容类型发送数据字段时,它们会自动序列化为 JSON 对象。 + + $ http POST www.test.com name='Dan Nanni' comment='Hi there' + +这个 HTTP POST 请求看起来如下: + + POST / HTTP/1.1 + Host: www.test.com + Content-Length: 44 + Content-Type: application/json; charset=utf-8 + Accept-Encoding: gzip, deflate, compress + Accept: application/json + User-Agent: HTTPie/0.8.0 + + {"name": "Dan Nanni", "comment": "Hi there"} + +#### 例6:输出重定向 #### + +HTTPie 的另外一个用户友好特性是输入重定向,你可以使用缓冲数据提供 HTTP 请求内容。例如: + + $ http POST api.test.com/db/lookup < my_info.json + +或者: + + $ echo '{"name": "Dan Nanni"}' | http POST api.test.com/db/lookup + +### 结束语 ### + +在这篇文章中,我介绍了 HTTPie,一个 wget 和 curl 的可能替代工具。除了这里展示的几个简单的例子,你可以在[官方网站][7]上找到 HTTPie 的很多有趣的应用。再次重复一遍,一款强大的工具也只相当于你对它的了解程度。从个人而言,我更热衷于 HTTPie,因为我在寻找一种更简洁的测试复杂网络接口的方法。 + +你怎么看? + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/wget-curl-alternative-linux.html + +作者:[Dan Nanni][a] +译者:[wangjiezhe](https://github.com/wangjiezhe) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-download-multiple-files-with-wget.html +[2]:http://xmodulo.com/how-to-use-custom-http-headers-with-wget.html +[3]:http://ask.xmodulo.com/custom-http-header-curl.html +[4]:https://github.com/jakubroztocil/httpie +[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[6]:http://ask.xmodulo.com/install-pip-linux.html +[7]:https://github.com/jakubroztocil/httpie From 6c32e00d4a630e316d932dac0bbbc16a35d34256 Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Sun, 12 Apr 2015 15:58:36 +0800 Subject: [PATCH 0521/2517] Bugfix --- ...50410 What is a good alternative to wget or curl on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150410 What is a good alternative to wget or curl on Linux.md b/translated/tech/20150410 What is a good alternative to wget or curl on Linux.md index 30d72eed29..caa4010661 100644 --- a/translated/tech/20150410 What is a good alternative to wget or curl on Linux.md +++ b/translated/tech/20150410 What is a good alternative to wget or curl on Linux.md @@ -38,7 +38,7 @@ HTTPie 是用 Python 写的,所以你可以在几乎所有地方(Linux,Mac #### 例1:定制头部 #### -你可以使用 的格式来定制头部。例如,我们发送一个 HTTP GET 请求到 www.test.com,使用定制用户代理(user-agent)和来源(referer),还有定制头部(比如 MyParam)。 +你可以使用 <header:value> 的格式来定制头部。例如,我们发送一个 HTTP GET 请求到 www.test.com ,使用定制用户代理(user-agent)和来源(referer),还有定制头部(比如 MyParam)。 $ http www.test.com User-Agent:Xmodulo/1.0 Referer:http://xmodulo.com MyParam:Foo From 024a8b98a29501d5d683048eef9d5cf83d7d4a65 Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Sun, 12 Apr 2015 16:25:31 +0800 Subject: [PATCH 0522/2517] Translating]20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md --- ...s for Browsing Websites and Downloading Files in Linux.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md b/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md index 9e5bdf00bd..f736d8bae1 100644 --- a/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md +++ b/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md @@ -1,3 +1,4 @@ +wangjiezhe translating... 7 Command Line Tools for Browsing Websites and Downloading Files in Linux ================================================================================ In the last article, we have covered few useful tools like ‘rTorrent‘, ‘wget‘, ‘cURL‘, ‘w3m‘, and ‘Elinks‘. We got lots of response to cover few other tools of same genre, if you’ve missed the first part you can go through it.. @@ -137,7 +138,7 @@ That’s all for now. I’ll be here again with another interesting topic you pe via: http://www.tecmint.com/command-line-web-browser-download-file-in-linux/ 作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[wangjiezhe](https://github.com/wangjiezhe) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -149,4 +150,4 @@ via: http://www.tecmint.com/command-line-web-browser-download-file-in-linux/ [4]:http://www.tecmint.com/install-youtube-dl-command-line-video-download-tool/ [5]:http://sourceforge.net/projects/fetch/?source=typ_redirect [6]:http://sourceforge.net/projects/http-fetcher/?source=typ_redirect -[7]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/ \ No newline at end of file +[7]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/ From 0d9a016f7f96c6a86dc3869decb4a24b253ebcc4 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 13 Apr 2015 10:52:18 +0800 Subject: [PATCH 0523/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0324 How to Install Telegram Messenger Application on Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150324 How to Install Telegram Messenger Application on Linux.md (100%) diff --git a/translated/share/20150324 How to Install Telegram Messenger Application on Linux.md b/published/20150324 How to Install Telegram Messenger Application on Linux.md similarity index 100% rename from translated/share/20150324 How to Install Telegram Messenger Application on Linux.md rename to published/20150324 How to Install Telegram Messenger Application on Linux.md From bd623679e6f56d18fd2e5d761aa2d9e53ff7cbde Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 13 Apr 2015 14:11:42 +0800 Subject: [PATCH 0524/2517] =?UTF-8?q?20150413-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...atures Live Kernel Patching PS3 Support.md | 74 ++++++++ ...databases on Linux VPS using a GUI tool.md | 178 ++++++++++++++++++ 2 files changed, 252 insertions(+) create mode 100644 sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md create mode 100644 sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md diff --git a/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md b/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md new file mode 100644 index 0000000000..1d9fae2c33 --- /dev/null +++ b/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md @@ -0,0 +1,74 @@ +Linux Kernel 4.0 Features Live Kernel Patching, PS3 Support +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/10/tuxtuxtux.jpeg) + +**A new stable release of the Linux Kernel [has been announced][1] by Linus Torvalds on the Linux kernel mailing list. ** + +Linux 4.0, codenamed ‘Hurr durr I’m a sheep’ — no, really — brings with it a small set of new hardware support, driver improvements, performance tweaks, bug fixes and the like. + +But remarking on the minor-ness of the update, Torvalds’ writes; + +> “Feature-wise, 4.0 doesn’t have all that much special. Much have been made of the new kernel patching infrastructure, but realistically […] we’ve had much bigger changes in other versions. So this is very much a “solid code progress” release.” + +Linus adds that Linux 4.1 is likely to be a ‘bigger release’. + +### New Linux Kernel 4.0 Features ### + +Install Kernel Updates Without Rebooting + +If you’ve ever been put out by the need to reboot your Linux box to finish installing a kernel update you won’t be alone. It’s a minor inconvenience on the desktop, and a major one for servers. + +![Reboot-free Kernel Updates](http://www.omgubuntu.co.uk/wp-content/uploads/2012/10/update.jpg) +Reboot-free Kernel Updates + +The ability to install/apply security patches to the Linux kernel “live”, without the need to reboot, has been a long-held want of many Linux enthusiasts for years. + +A slew of third-party projects, like [Oracle’s KSplice][2] and Red Hat’s Kpatch, have sought to offer live patching functionality for certain distributions. + +For servers, enterprise and mission-critical use cases where uptime is priority live kernel patching is a pretty big deal. + +The good news is that Linux 4.0 makes having to reboot to complete a kernel update a thing of the past. + +Well, almost. + +The initial groundwork to support reboot-free patching arrives in this latest release, ready for experienced sysadmins to take advantage of in Linux 4.0. + +Desktop Linux distributions should also be able to take advantage of the feature too (though given the complexity involved in configuring the reboot-less functionality on the end-user side it may be a little way off). + +This infrastructure will continue to be refined and improved on over the course of the 4.x series. As it does so I expect we’ll all start to hear more about it. + +#### Other Changes #### + +Although it is considered a small release the latest Linux kernel manages to squeeze in a welcome set of hardware improvements, new drivers and performance tweaks. These include: + + +- Improvements to Intel ‘Skylake’ platform +- Intel Quark SoC support +- Various patches to improve Linux running on a Playstation 3 +- TOpen-source AMD Radeon driver supports DisplayPort Audio +- Various misc HID driver tweaks, including Lenovo compact keyboards, Wacom Cintiq 27QHD +- Toshiba power settings driver adds USB sleep/charge functionality, rapid charge, sleep w/ music, etc +- File System tweaks, including F2FS, BtrfFS, etc + +### Install Linux Kernel 4.0 on Ubuntu ### + +Although classed as stable there is, at present, **no need for desktop users or new-comers to go upgrade**. + +The impatient and adept can take a crack at installing Linux 4.0 in Ubuntu 15.04 Beta by grabbing the appropriate set of packages from [Canonical’s mainline kernel archive][3] or by risking a third-party PPA hosted on Launchpad. + +Ubuntu 15.04 Vivid Vervet is due later this month and will ship with Ubuntu Kernel 3.19 (the Ubuntu kernel is the Linux Kernel plus Ubuntu-specific patches that have not been accepted upstream). + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://lkml.org/lkml/2015/4/12/178 +[2]:http://www.omgubuntu.co.uk/2009/10/how-to-install-kernel-updates-without-rebooting +[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D \ No newline at end of file diff --git a/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md b/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md new file mode 100644 index 0000000000..9be6574afb --- /dev/null +++ b/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md @@ -0,0 +1,178 @@ +How to manage remote MySQL databases on Linux VPS using a GUI tool +================================================================================ +If you need to run a MySQL server on a remote [VPS instance][1], how will you manage databases hosted by the server remotely? Perhaps web-based database administration tools such as [phpMyAdmin][2] or [Adminer][3] will first come to mind. These web-based management tools require a backend web server and PHP engine up and running. However, if your VPS instance is used as a standalone database server (e.g., for a multi-tier app), provisioning a whole LAMP stack for occasional database management is a waste of VPS resource. Worse, the LAMP stack with an additional HTTP port can be a source of security vulnerabilities of your VPS. + +Alternatively, you can turn to a native MySQL client running on a client host. Of course a pure command-line MySQL client (mysql-client) can be your default choice if nothing else. But the capabilities of the command-line client are limited, so it is not suitable for production-level database administration such as visual SQL development, performance tuning, schema validation, etc. If you are looking for full-blown MySQL administration features, a MySQL GUI tool will meet your requirements better. + +### What is MySQL Workbench? ### + +Developed as an integrated database tool environment by Oracle, [MySQL Workbench][4] is more than a simple MySQL client. In a nutshell, Workbench is a cross-platform (e.g., Linux, MacOS X, Windows) GUI tool for database design, development and administration. The Community Edition of MySQL Workbench is available for free under the GPL. As a database administrator, you can use Workbench to configure MySQL server, manage MySQL users, perform database backup and recovery, and monitor database health, all in GUI-based user-frienly environment. + +In this tutorial, let's review how to install and use MySQL Workbench on Linux. + +### Install MySQL Workbench on Linux ### + +To set up remote database administration environment, grab any desktop Linux machine where you will be running MySQL Workbench. While some Linux distributions (e.g., Debian/Ubuntu) carry MySQL Workbench in their repositories, it is a good idea to install it from the official repositories, as they offer the latest version. Here is how to set up the official Workbench repository and install Workbench from it. + +#### Debian-based Desktop (Debia, Ubuntu, Mint): #### + +Go to the [official website][5]. Download and install the DEB file for the repository. Choose one that matches with your environment. + +For example, on Ubuntu 14.10: + + $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.4-2ubuntu14.10_all.deb + $ sudo dpkg -i mysql-apt-config_0.3.4-2ubuntu14.10_all.deb + +on Debian 7: + + $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.3-1debian7_all.deb + $ sudo dpkg -i mysql-apt-config_0.3.3-1debian7_all.deb + +When installing the DEB file, you will see the following package configuration menu, and be asked to choose MySQL product to configure. + +![](https://farm8.staticflickr.com/7702/16928715218_b1fcbcdbf3_c.jpg) + +Choose "Utilities". Once you are done with configuration, choose "Apply" to save it. + +Finally, update package index, and install Workbench. + + $ sudo apt-get update + $ sudo apt-get install mysql-workbench + +#### Red Hat-based Desktop (CentOS, Fedora, RHEL): #### + +Go to the [official website][6]. Download and install the RPM repository package for your Linux evironment. + +For example, on CentOS 7: + + $ wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm + $ sudo yum localinstall mysql-community-release-el7-5.noarch.rpm + +on Fedora 21: + + $ wget http://dev.mysql.com/get/mysql-community-release-fc21-6.noarch.rpm + $ sudo yum localinstall mysql-community-release-fc21-6.noarch.rpm + +Verify that "MySQL Tools Community" repository has been set up. + + $ yum repolis enabled + +![](https://farm9.staticflickr.com/8826/16494069254_15458ace52_c.jpg) + +Go ahead and install Workbench. + + $ sudo yum install mysql-workbench-community + +### Set up a Secure Remote Database Connection ### + +The next step is to set up a remote connection to your MySQL server running on a VPS. Of course you can connect directly to the remote MySQL server from Workbench GUI (after [enabling remote access][7] in the database server). However, it is a huge security risk to do so, as someone can easily eavesdrop on database access traffic, and a publicly-open MySQL port can be another attack vector. + +A better approach is to disable remote access of MySQL server (i.e., only allow access from 127.0.0.1 of a VPS). Then set up an SSH tunnel between a local client machine and a remote VPS, so that MySQL traffic can be securely relayed via their loopback interfaces. Compared to setting up SSL-based encrypted connections, configuring SSH tunneling requires little effort as it only requires SSH server, which is already deployed on most VPS instances. + +Let's see how we can set up an SSH tunnel for MySQL Workbench. + +In this setup, you don't need to enable remote access of a MySQL server. + +On a local client host where MySQL Workbench will be running, type the following command. Replace 'user' and 'remote_vps' with your own info. + + $ ssh user@remote_vps -L 3306:127.0.0.1:3306 -N + +You will be asked to type an SSH password for your VPS. Once you successfully log in to the VPS, an SSH tunnel will be established between port 3306 of local host and port 3306 of a remote VPS. Note that you won't see any message in the foreground. + +Optionally, you can set the SSH tunnel running in the background. For that, press Ctrl+Z to stop the command, type bg and press ENTER. + +![](https://farm8.staticflickr.com/7714/16928715438_bf0db49b3b_c.jpg) + +The SSH tunnel will now be running in the background. + +### Manage a Remote MySQL Server with MySQL Workbench ### + +With an SSH tunnel established, you are ready to connect to a remote MySQL server from MySQL Workbench. + +Launch Workbench by typing: + + $ mysql-workbench + +![](https://farm9.staticflickr.com/8768/16494069294_0fce571ddb_c.jpg) + +Click on the plus icon at the top of the Workbench screen to create a new database connection. Fill in connection information as follows. + +- **Connection Name**: any description (e.g., My remote VPS database) +- **Hostname**: 127.0.0.1 +- **Port**: 3306 +- **Username**: MySQL username (e.g., root) + +![](https://farm8.staticflickr.com/7727/16928715288_d9ac3bfc7a_c.jpg) + +Note that since the tunnel's local endpoint is 127.0.0.1:3306, the hostname field must be 127.0.0.1, not the IP address/hostname of a remote VPS. + +Once you set up a new database connection, you will see a new box for the connection appear on Workbench window. Click on the box to actually establish a connection to a remote MySQL server. + +![](https://farm8.staticflickr.com/7650/17114969532_0252ffcd31_c.jpg) + +Once you are logged in to the MySQL server, you will see various administrative tasks in the left-side panel. Let's review some of common administrative tasks. + +#### MySQL Server Status #### + +This menus shows real-time dashboard of database server resource usage (e.g., traffic, connections, read/write). + +![](https://farm8.staticflickr.com/7627/16494069414_9d838d4138_c.jpg) + +#### Client Connections #### + +The total number of client connections is a critical resource to monitor. This menu shows detailed information of individual client connections. + +![](https://farm9.staticflickr.com/8747/16909119337_a8d89772dd_c.jpg) + +#### Users and Privileges #### + +This menu allows you to manage MySQL users, including their resource limits and privileges. + +![](https://farm9.staticflickr.com/8765/16494069384_760fc17c8f_c.jpg) + +#### MySQL Server Administration #### + +You can start or stop a MySQL server, and examine its server logs. + +![](https://farm8.staticflickr.com/7588/17114969592_54526dfb32_c.jpg) + +#### Database Schema Management #### + +You can view, change or inspect database schema visually. For that, choose and right-click on any database or table under "Schemas" heading. + +![](https://farm8.staticflickr.com/7665/16496363973_fd03a96198_c.jpg) + +![](https://farm9.staticflickr.com/8744/16909119497_7c884617b8_c.jpg) + +#### Database Query #### + +You can execute any arbitrary query (as long as your login privilege allows), and inspect its result. + +![](https://farm8.staticflickr.com/7716/17114969692_c0f02bb277_c.jpg) + +Note that performance statistics and reports are available for MySQL server 5.6 and higher. For 5.5 and lower, the performance section will be grayed out. + +### Conclusion ### + +The clean and intuitive tabbed interface, comprehensive feature sets, and open-source licensing make MySQL Workbench one of the best visual database design and administration tools out there. One known downside of Workbench is its performance. I notice that Workbench sometimes gets sluggish while running queries on a busy server. Despite its less than stellar performance, I still consider MySQL Workbench an essential tool for any professional MySQL database administrator and designer. + +Have you ever used Workbench in your work environment? Or do you recommend any other GUI tool? Feel free to share your experience. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/remote-mysql-databases-gui-tool.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/go/digitalocean +[2]:http://ask.xmodulo.com/install-phpmyadmin-centos.html +[3]:http://xmodulo.com/set-web-based-database-management-system-adminer.html +[4]:http://mysqlworkbench.org/ +[5]:http://dev.mysql.com/downloads/repo/apt/ +[6]:http://dev.mysql.com/downloads/repo/yum/ +[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html \ No newline at end of file From 67930257baff46c88f6c6e5ce6635f701e1f7202 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 13 Apr 2015 14:27:18 +0800 Subject: [PATCH 0525/2517] =?UTF-8?q?20150413-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ange PATH environment variable on Linux.md | 73 +++++++ ... ixgbe driver on CentOS, RHEL or Fedora.md | 196 ++++++++++++++++++ ...nfigure PCI-passthrough on virt-manager.md | 55 +++++ ...u Does Not Remember Brightness Settings.md | 32 +++ 4 files changed, 356 insertions(+) create mode 100644 sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md create mode 100644 sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md create mode 100644 sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md create mode 100644 sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md b/sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md new file mode 100644 index 0000000000..348e199ded --- /dev/null +++ b/sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md @@ -0,0 +1,73 @@ +Linux FAQs with Answers--How to change PATH environment variable on Linux +================================================================================ +> **Question**: When I try to run an executable, it complains "command not found." The executable is actually located in /usr/local/bin. How can I add /usr/local/bin to my PATH variable, so that I can run the command without specify the path? + +In Linux, PATH environment variable stores a set of directories to search for an executable command when the command is typed by a user. The value of PATH variable is formatted as a series of colon-separated absolute paths. Each user has a user-specific PATH environment variable (initialized with system-wide default PATH variable). + +To check the current PATH environment variable of a user, run the following command as the user: + + $ echo $PATH + +---------- + + /usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin + +Alternatively, run: + + $ env | grep PATH + +---------- + + PATH=/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin + +If the command that you type is not found in any of these directories, the shell will throw an error message: "command not found" + +If you want to add an additional directory (e.g., /usr/local/bin) to your PATH variable, you can follow these instructions. + +### Change PATH Environment Variable for a Particular User Only ### + +If you want to temporarily add a new directory (e.g., /usr/local/bin) to a user's default search path in the current login session, you can simply type the following. + + $ PATH=$PATH:/usr/local/bin + +Now check if PATH has been updated: + + $ echo $PATH + +---------- + + /usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin:/usr/local/bin + +The updated PATH will then remain effective in the current login session. The change, however, will be lost in any new terminal session. + +If you want to change PATH variable permanently, open ~/.bashrc (or ~/.bash_profile) with a text editor, and append the following line. + + export PATH=$PATH:/usr/local/bin + +Then activate the change permanently by running: + + $ source ~/.bashrc (or source ~/.bash_profile) + +### Change PATH Environment Variable System-wide ### + +If you want to permanently add /usr/local/bin to system-wide default PATH variable, edit /etc/profile as follows. + + $ sudo vi /etc/profile + +---------- + + export PATH=$PATH:/usr/local/bin + +Once you re-login, the updated PATH variable will take effect. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/change-path-environment-variable-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md b/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md new file mode 100644 index 0000000000..972143b392 --- /dev/null +++ b/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md @@ -0,0 +1,196 @@ +Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora +================================================================================ +> **Question**: I want to build and install the latest ixgbe 10G NIC driver. How can I compile ixgbe driver on CentOS, Fedora or RHEL? + +To use Intel's PCI Express 10G NICs (e.g., 82598, 82599, x540) on your Linux system, you need to install ixgbe driver. While modern Linux distributions come with ixgbe driver pre-installed as a loadable module, the pre-built ixgbe driver is not fully customizable with limited parameters. If you want to enable and customize all available features of the 10G NICs (e.g., RSS, multi-queue, virtual functions, hardware offload), you will need to build the driver from the source. + +Here is how to compile ixgbe driver from the source on Red Hat based platforms (e.g., CentOS, RHEL or Fedora). For Debian based systems, refer to [this guideline][1] instead. + +### Step One: Install Prerequisites ### + +First, set up necessary developmen environment and install matching kernel headers. + + $ sudo yum install gcc make + $ sudo yum install kernel-devel + +### Step Two: Compile Ixgbe Driver ### + +Download the latest ixgbe source code from the [official site][2]. + + $ wget http://downloads.sourceforge.net/project/e1000/ixgbe%20stable/3.23.2/ixgbe-3.23.2.tar.gz + +Be sure to check supported kernel versions. For example, the ixgbe driver 3.23.2 supports Linux kernel versions 2.6.18 up to 3.18.1. + +Extract the tarball and compile it. + + $ tar -xvf ixgbe-3.23.2.tar.gz + $ cd ixgbe-3.23.2/src + $ make + +If successful, the compiled driver (ixgbe.ko) will be found in the current directory. + +You can check the information of the compiled driver by running: + + $ modinfo ./ixgbe.ko + +The output will show a list of available parameters of the ixgbe driver. + +![](https://farm9.staticflickr.com/8789/16429483653_b9b6e6cd7f_c.jpg) + +### Step Three: Load Ixgbe Driver ### + +Now you are ready to load the compiled ixgbe driver. + +If the stock ixgbe driver is already loaded on your system, you need to unload it first. Otherwise, you won't be able to load the new ixgbe driver. + + $ sudo rmmod ixgbe.ko + +Then insert the compiled driver in the kernel by running: + + $ sudo insmod ./ixgbe.ko + +Optionally, you can supply any parameters while loading the driver. + + $ sudo insmod ./ixgbe.ko FdirPballoc=3 RSS=16 + +To verify that the driver is loaded successfully, check the output of dmesg command. + + $ dmesg + +---------- + + Intel(R) 10 Gigabit PCI Express Network Driver - version 3.23.2 + Copyright (c) 1999-2014 Intel Corporation. + ixgbe 0000:21:00.0: PCI INT A -> GSI 64 (level, low) -> IRQ 64 + ixgbe 0000:21:00.0: setting latency timer to 64 + ixgbe: Receive-Side Scaling (RSS) set to 16 + ixgbe: Flow Director packet buffer allocation set to 3 + ixgbe: 0000:21:00.0: ixgbe_check_options: Flow Director will be allocated 256kB of packet buffer + ixgbe: 0000:21:00.0: ixgbe_check_options: FCoE Offload feature enabled + ixgbe 0000:21:00.0: irq 87 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 88 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 89 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 90 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 91 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 92 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 93 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 94 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 95 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 96 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 97 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 98 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 99 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 100 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 101 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 102 for MSI/MSI-X + ixgbe 0000:21:00.0: irq 103 for MSI/MSI-X + ixgbe 0000:21:00.0: eth3: DCA registration failed: -1 + ixgbe 0000:21:00.0: PCI Express bandwidth of 32GT/s available + ixgbe 0000:21:00.0: (Speed:5.0GT/s, Width: x8, Encoding Loss:20%) + ixgbe 0000:21:00.0: eth3: MAC: 2, PHY: 9, SFP+: 3, PBA No: E68793-006 + ixgbe 0000:21:00.0: 90:e2:ba:5b:e9:1c + ixgbe 0000:21:00.0: eth3: Enabled Features: RxQ: 16 TxQ: 16 FdirHash RSC + ixgbe 0000:21:00.0: eth3: Intel(R) 10 Gigabit Network Connection + ixgbe 0000:21:00.1: PCI INT B -> GSI 68 (level, low) -> IRQ 68 + ixgbe 0000:21:00.1: setting latency timer to 64 + ixgbe: 0000:21:00.1: ixgbe_check_options: FCoE Offload feature enabled + ixgbe 0000:21:00.0: registered PHC device on eth3 + ixgbe 0000:21:00.1: irq 104 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 105 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 106 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 107 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 108 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 109 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 110 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 111 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 112 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 113 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 114 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 115 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 116 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 117 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 118 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 119 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 120 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 121 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 122 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 123 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 124 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 125 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 126 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 127 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 128 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 129 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 130 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 131 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 132 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 133 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 134 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 135 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 136 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 137 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 138 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 139 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 140 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 141 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 142 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 143 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 144 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 145 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 146 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 147 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 148 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 149 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 150 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 151 for MSI/MSI-X + ixgbe 0000:21:00.1: irq 152 for MSI/MSI-X + ADDRCONF(NETDEV_UP): eth3: link is not ready + 8021q: adding VLAN 0 to HW filter on device eth3 + ixgbe 0000:21:00.1: eth4: DCA registration failed: -1 + ixgbe 0000:21:00.1: PCI Express bandwidth of 32GT/s available + ixgbe 0000:21:00.1: (Speed:5.0GT/s, Width: x8, Encoding Loss:20%) + ixgbe 0000:21:00.1: eth4: MAC: 2, PHY: 9, SFP+: 4, PBA No: E68793-006 + ixgbe 0000:21:00.1: 90:e2:ba:5b:e9:1e + ixgbe 0000:21:00.1: eth4: Enabled Features: RxQ: 48 TxQ: 48 FdirHash RSC + ixgbe 0000:21:00.1: eth4: Intel(R) 10 Gigabit Network Connection + ixgbe 0000:21:00.0: eth3: detected SFP+: 3 + ixgbe 0000:21:00.1: registered PHC device on eth4 + ADDRCONF(NETDEV_UP): eth4: link is not ready + 8021q: adding VLAN 0 to HW filter on device eth4 + ixgbe 0000:21:00.1: eth4: detected SFP+: 4 + ixgbe 0000:21:00.0: eth3: NIC Link is Up 10 Gbps, Flow Control: RX/TX + ADDRCONF(NETDEV_CHANGE): eth3: link becomes ready + ixgbe 0000:21:00.1: eth4: NIC Link is Up 10 Gbps, Flow Control: RX/TX + ADDRCONF(NETDEV_CHANGE): eth4: link becomes ready + eth3: no IPv6 routers present + eth4: no IPv6 routers present + +### Step Four: Install Ixgbe Driver ### + +Once you have checked that the driver is loaded successfully, go ahead and install the driver on your system. + + $ sudo make install + +ixgbe.ko will be installed in the following location. + + /lib/modules//kernel/drivers/net/ixgbe + +At this point, the compiled driver will be loaded automatically upon boot, or you can load it by running: + + $ sudo modprobe ixgbe + +![](https://farm9.staticflickr.com/8760/16863416809_804dea1491_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/compile-ixgbe-driver-centos-rhel-fedora.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/download-install-ixgbe-driver-ubuntu-debian.html +[2]:http://sourceforge.net/projects/e1000/files/ixgbe%20stable/ \ No newline at end of file diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md b/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md new file mode 100644 index 0000000000..f90070d34a --- /dev/null +++ b/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md @@ -0,0 +1,55 @@ +Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager +================================================================================ +> **Question**: I would like to dedicate a physical network interface card to one of my guest VMs created by KVM. For that, I am trying to enable PCI passthrough of the NIC for the VM. How can I add a PCI device to a guest VM with PCI passthrough on virt-manager? + +Modern hypervisors enable efficient resource sharing among multiple guest operating systems by virtualizing and emulating hardware resources. However, such virtualized resource sharing may not always be desirable, or even should be avoided when VM performance is a great concern, or when a VM requires full DMA control of a hardware device. One technique used in this case is so-called "PCI passthrough," where a guest VM is granted an exclusive access to a PCI device (e.g., network/sound/video card). Essentially, PCI passthrough bypasses the virtualization layer, and directly exposes a PCI device to a VM. No other VM can access the PCI device. + +### Requirement for Enabling PCI Passthrough ### + +If you want to enable PCI passthrough for an HVM guest (e.g., a fully-virtualized VM created by KVM), your system (both CPU and motherboard) must meet the following requirement. If your VM is paravirtualized (created by Xen), you can skip this step. + +In order to enable PCI passthrough for an HVM guest VM, your system must support **VT-d** (for Intel processors) or **AMD-Vi** (for AMD processors). Intel's VT-d ("Intel Virtualization Technology for Directed I/O") is available on most high-end Nehalem processors and its successors (e.g., Westmere, Sandy Bridge, Ivy Bridge). Note that VT-d and VT-x are two independent features. A list of Intel/AMD processors with VT-d/AMD-Vi capability can be found [here][1]. + +After you verify that your host hardware supports VT-d/AMD-Vi, you then need to do two things on your system. First, make sure that VT-d/AMD-Vi is enabled in system BIOS. Second, enable IOMMU on your kernel during booting. The IOMMU service, which is provided by VT-d,/AMD-Vi, protects host memory access by a guest VM, and is a requirement for PCI passthrough for fully-virtualized guest VMs. + +To enable IOMMU on the kernel for Intel processors, pass "**intel_iommu=on**" boot parameter on your Linux. Follow [this tutorial][2] to find out how to add a kernel boot parameter via GRUB. + +After configuring the boot parameter, reboot your host. + +### Add a PCI Device to a VM on Virt-Manager ### + +Now we are ready to enable PCI passthrough. In fact, assigning a PCI device to a guest VM is straightforward on virt-manager. + +Open the VM's settings on virt-manager, and click on "Add Hardware" button on the left sidebar. + +Choose a PCI device to assign from a PCI device list, and click on "Finish" button. + +![](https://farm8.staticflickr.com/7587/17015584385_db49e96372_c.jpg) + +Finally, power on the guest. At this point, the host PCI device should be directly visible inside the guest VM. + +### Troubleshooting ### + +If you see either of the following errors while powering on a guest VM, the error may be because VT-d (or IOMMU) is not enabled on your host. + + Error starting domain: unsupported configuration: host doesn't support passthrough of host PCI devices + +---------- + + Error starting domain: Unable to read from monitor: Connection reset by peer + +Make sure that "**intel_iommu=on**" boot parameter is passed to the kernel during boot as described above. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/pci-passthrough-virt-manager.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://wiki.xenproject.org/wiki/VTdHowTo +[2]:http://xmodulo.com/add-kernel-boot-parameters-via-grub-linux.html \ No newline at end of file diff --git a/sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md b/sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md new file mode 100644 index 0000000000..9ed38c0cf3 --- /dev/null +++ b/sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md @@ -0,0 +1,32 @@ +[Solved] Ubuntu Does Not Remember Brightness Settings +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Fix_Ubuntu_Brightness_Issue.jpg) + +In the tutorial to [fix brightness control not working for Ubuntu and Linux Mint][1], some users mentioned that though the fix worked for them, **Ubuntu doesn’t remember the brightness settings** and same was the case with Linux Mint. At each boot or when the system wakes up from sleep, the brightness is restored to either maximum or minimum level. Quite an annoyance, I know. But thankfully we have an easy solution for this **brightness issue in Ubuntu and Linux Mint**. + +### Fix Ubuntu and Linux Mint doesn’t remember brightness settings ### + +[Norbert][2] wrote a script to make Ubuntu and Linux Mint remember the brightness settings at each boot or wake up from sleep. To help you easily use the script, he put up this PPA which is available for Ubuntu 12.04, 14.04 and 14.10. All you need to do is to use the following commands: + + sudo add-apt-repository ppa:nrbrtx/sysvinit-backlight + sudo apt-get update + sudo apt-get install sysvinit-backlight + +Once installed, restart your system. Now check if the brightness settings are saved or not. + +I hope this quick tip helped you. If you find any issues, please take your time to [report a bug][3]. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/ubuntu-mint-brightness-settings/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/fix-brightness-ubuntu-1310/ +[2]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages +[3]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages \ No newline at end of file From 55a35270b7878693b313bf6aed7ecefa3fd7e90d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 13 Apr 2015 14:51:57 +0800 Subject: [PATCH 0526/2517] =?UTF-8?q?20150413-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Through Some Important Docker Commands.md | 105 +++++++++++ ...creenshots - Download and Install Guide.md | 144 +++++++++++++++ ...ox from Bash Shell Script with Examples.md | 174 ++++++++++++++++++ 3 files changed, 423 insertions(+) create mode 100644 sources/tech/20150413 A Walk Through Some Important Docker Commands.md create mode 100644 sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md create mode 100644 sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md diff --git a/sources/tech/20150413 A Walk Through Some Important Docker Commands.md b/sources/tech/20150413 A Walk Through Some Important Docker Commands.md new file mode 100644 index 0000000000..33f1c02885 --- /dev/null +++ b/sources/tech/20150413 A Walk Through Some Important Docker Commands.md @@ -0,0 +1,105 @@ +A Walk Through Some Important Docker Commands +================================================================================ +Hi everyone today we'll learn some important Docker Commands that you'll need to learn before you go with Docker. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. + +Docker commands are easy to learn and easy to implement or take into practice. Here are some easy Docker commands you'll need to know to run Docker and fully utilize it. + +### 1. Pulling a Docker Image ### + +First of all, we'll need to pull a docker image to get started cause containers are built using Docker Images. We can get the required docker image from the Docker Registry Hub. Before we pull any image using pull command, we'll need to protect our system as there is identified a malicious issue with pull command. To protect our system from this issue, we'll need to add **127.0.0.1 index.docker.io** into /etc/hosts entry. We can do using our favorite text editor. + + # nano /etc/hosts + +Now, add the following lines into it and then save and exit. + + 127.0.0.1 index.docker.io + +![Docker Hosts](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-hosts.png) + +To pull a docker image, we'll need to run the following command. + + # docker pull registry.hub.docker.com/busybox + +![Docker pull command](http://blog.linoxide.com/wp-content/uploads/2015/04/pulling-image.png) + +We can check whether any Docker image is available in our local host for the use or not. + + # docker images + +![Docker Images](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-images.png) + +### 2. Running a Docker Container ### + +Now, after we have successfully pulled a required or desired Docker image. We'll surely want to run that Docker image. We can run a docker container out of the image using docker run command. We have several options and flags to run a docker container on the top of the Docker image. To run a docker image and to get into the container we'll use -t and -i flag as shown below. + + # docker run -it busybox + +![Docker Run Shell Command](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-run-shell.png) + +From the above command, we'll get entered into the container and can access its content via the interactive shell. We can press **Ctrl-D** in order to exit from the shell access. + +Now, to run the container in background, we'll detach the shell using -d flag as shown below. + + # docker run -itd busybox + +![Run Container Background](http://blog.linoxide.com/wp-content/uploads/2015/04/run-container-background.png) + +If we want to attach into a running container, we can use attach command with the container id. The container id can be fetched using the command **docker ps** . + + # docker attach + +![Docker Attach](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-attach.png) + +### 3. Checking Containers ### + +It is very easy to check the log whether the container is running or not. We can use the following command to check whether there is any docker container running in the real time or not using the following command. + + # docker ps + +Now, to check logs about the running or past running containers we'll need to run the following command. + + # docker ps -a + +![View Docker Containers](http://blog.linoxide.com/wp-content/uploads/2015/04/view-docker-containers1.png) + +### 4. Inspecting a Docker Container ### + +We can check every information about a Docker Container using the inspect command. + + # docker inspect + +![Docker Inspect](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-inspect.png) + +### 5. Killing and Deleting Command ### + +We can kill or stop process or docker containers using its docker id as shown below. + + # docker stop + +To stop every containers running, we'll need to run the following command. + + # docker kill $(docker ps -q) + +Now, if we wanna remove a docker image, run the below command. + + # docker rm + +If we wanna remove all the docker images at once, we can run the below. + + # docker rm $(docker ps -aq) + +### Conclusion ### + +These docker commands are highly essential to learn to fully utilize and use Docker. Docker gets too simple with these commands providing end users an easy platform for computing. It is extremely easy for anyone to learn about Docker commands with this above tutorial. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve and update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/important-docker-commands/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ \ No newline at end of file diff --git a/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md new file mode 100644 index 0000000000..807b6bf07a --- /dev/null +++ b/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md @@ -0,0 +1,144 @@ +Elementary OS 0.3 Freya Screenshots - Download and Install Guide +================================================================================ +Elementary OS is a light weight Ubuntu based operating system which is getting wide spread popularity. It has three versions released to date whereas fourth version is decided to be developed based on upcoming Ubuntu 16.04. + +- **Jupiter (0.1)**: It was the first stable version of Elementary OS based on Ubuntu 10.10 and released on March 2011. +- **Luna (0.2)**: Second stable version of Elementary OS based on Ubuntu 12.04 and released on November 2012. +- **Freya (0.3)**: Third stable version of Elementary OS based on Ubuntu 14.04 and released on 8th February 2015. +- **Loki (0.4)**: Fourth upcoming version of Elementary OS is planned to be based on Ubuntu 16.04 it will get updates till 2021. + +Freya is the latest version (0.3) of Elementary OS available now, initially it was given the name ISIS but it was later changed to avoid any sort of association with a terrorist group named alike. Freya has some very nice preloaded applications. + +### Salient Features ### + +Here are some but not all of the features of Elementary OS 0.3. + +- Better interactive notifications along with notification setting pane including a system-wide “Do Not Disturb” mode +- Latest version of Elementary OS provides a better emoji support & drop-in replacements for Microsoft Core fonts for the web applications +- Privacy Mode is a new firewall tool which is easy to use and helps protect the computer from harmful scripts and applications +- Unified login and lock screens +- Applications menu with and improved look and functionality including quicklist actions, drag-and-drop from search, and support for quick math calculations +- Multitasking view is redesigned to provide more app-focused utility +- Updated software stack (Linux 3.16, Gtk 3.14, and Vala 0.26) for better support and enhanced functionality of latest developed applications +- Unified extensible firmware interface (UEFI) support +- WiFi connectivity made easier through new captive portal assistant + +### Download 64 bit & 32 bit Version ### + +- [Elementary OS Freya 64 bit][1] +- [Elementary OS Freya 32 bit][2] + +### Installing Elementary OS 0.3 (Freya) ### + +Download the ISO file of Elementary OS 0.3 and flash it on a bootable USB drive or to a DVD/CD. Source is available for both 32-bit and 64-bit architectures. Once the computer is booted with the Elementary OS ISO file, there are two options available, either to try without installing or install Elementary OS on the computer, choose the second option. Elementary OS can also be installed along with an already installed operating system, turning it into a dual boot machine. + +![Install Freya](http://blog.linoxide.com/wp-content/uploads/2015/04/Install-Freya.png) + +System requirements and available resources are checked before proceeding further. Click continue if your system has enough resources. + +![Installation Requirements](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Requirements.png) + +Installation wizard then provides various installation types. Opt for the option best suits you, normally, first option is chosen by most i.e. “Erase disk and install Elementary”. With this option make sure that your data is backed up properly because the disk (partition) will be erased and all data will be lost. + +![Installation Types](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Types.png) + +A dialog box shows the list of disk partitions being formatted and used by the Elementary OS, after ensuring data integrity click continue. + +![Format Warning](http://blog.linoxide.com/wp-content/uploads/2015/04/Format-Warning.png) + +Choose your location for time zone selection and click continue. + +![Location](http://blog.linoxide.com/wp-content/uploads/2015/04/Location.png) + +Choose your language and click continue. + +![Language](http://blog.linoxide.com/wp-content/uploads/2015/04/Language.png) + +Fill in your information and choose a strong root/administrator password and click continue. + +![whoareyou](http://blog.linoxide.com/wp-content/uploads/2015/04/whoareyou.png) + +Core installation process starts once the personal information is provided, details of components being installed will be flashing on a little dialogue box along with the progress bar. + +![Installation progress](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-progress.png) + +Congratulation! Installation is complete for your latest Elementary OS 0.3 (Freya). A restart is required to update and finalize registries and configurations. + +![Installation Complet](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Complet.png) + +At start up the Elementary OS logo shows its elegance and then password protected administrator login and guest session options will appear. Guest section has pretty limited features and has no installation privileges. + +![Login](http://blog.linoxide.com/wp-content/uploads/2015/04/Login.png) + +Here is the first look of the newly installed Elementary OS 0.3. + +![first look](http://blog.linoxide.com/wp-content/uploads/2015/04/first-look.png) + +### Customizing Desktop ### + +While Elementary OS 0.3 is best known for their light weight and better looks, everybody has a unique esthetic sense and computer usage habits. Desktop reflects a personalized view of any computer user. Like other operating systems Elementary OS 0.3 also provides various options to customize our desktop through wallpapers, font sizes, themes etc. + +For basic customization, click on Applications > System Settings > Desktop + +We can change wallpapers, dock and make use of hot corners of the desktop. + +Very few wallpapers are provided by default, more can be downloaded from the internet or transferred to your own camera. + +![Desktop Wallpaper](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Wallpaper4.png) + +The real beauty of Elementary OS lies in its elegant Dock panel. With no icons allowed at desktop, a set of application icons at the dock panel enhance the look and provide a quick way to lunch frequently used applications. + +![Desktop Dock](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Dock1.png) + +Users can use the corners of the desktop for customary purposes. + +![Hot Corners](http://blog.linoxide.com/wp-content/uploads/2015/04/Hot-Corners.png) + +Advanced customization can be achieved through the installation of elementary tweaks. + +Add stable Personal Package Archive (PPA) to Advanced Package Tool (APT) repository using the following command. + + sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily + +![ppa](http://blog.linoxide.com/wp-content/uploads/2015/04/elementary-tweaks-ppa.png) + +Once the package has been added to the repository we need to update the repository using following command + + sudo apt-get update + +![update repository](http://blog.linoxide.com/wp-content/uploads/2015/04/update-repository.png) + +After updating the repository we are ready to install inkscape which is accomplished using the following command + + sudo apt-get install elementary-tweaks + +![install elementary tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/install-elementary-tweaks.png) + +We can see an addition of Tweaks option under Applications > System Settings under the Personal section. It now provides us more options to customize our desktop view. + +![tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/tweaks.png) + +For further customizations we also install gnome tweak tool for example unlocking the desktop. + + sudo apt-get install gnome-tweak-tool + +![gnome](http://blog.linoxide.com/wp-content/uploads/2015/04/gnome.png) + +### Summary ### + +Elementary OS is closely related to Ubuntu distro of Linux and its pros and cons are pretty much similar too. Elementary OS is lightweight, elegant in look and feel, rapidly maturing. It is potentially an alternative for both Windows and OS X operating systems. The latest available Elementary OS 0.3 (Freya) is getting very popular with a better feature base. For further reading, latest updates and downloads please visit the official [website][1]. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/elementary-os-0-3-freya-install-guide/ + +作者:[Aun Raza][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-amd64.20150411.iso/download +[2]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-i386.20150411.iso/download +[3]:http://elementary.io/ \ No newline at end of file diff --git a/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md b/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md new file mode 100644 index 0000000000..3a50dc3872 --- /dev/null +++ b/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md @@ -0,0 +1,174 @@ +How to Show Dialog Box from Bash Shell Script with Examples +================================================================================ +This tutorial will give couple of examples on how to use utilities like zenity and whiptail in your Bash shell script to provide message / dialog box . With these utilities your script will be able to inform user about the current state of execution, or give an ability to interact. Difference between these two utilities is the way they are displaying message box or dialog. Zenity uses GTK toolkit for creating graphical user interfaces, while whiptail creates message boxes inside terminal window. + +### Zenity Tool ### + +To install zenity on Ubuntu run: + + sudo apt-get install zenity + +Since commands for creating message boxes or dialogs with zenity are pretty self explanatory, we will provide you with couple of examples. + +### Creating information box ### + +zenity --info --title "Information Box" --text "This should be information" --width=300 --height=200 + +![Screenshot-Information Box](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Information-Box.png) + +Creating Yes/No dialog + + zenity --question --text "Do you want this?" --ok-label "Yeah" --cancel-label="Nope" + +![Screenshot-Question](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Question.png) + +Creating entry box and storing value in variable + + a=$(zenity --entry --title "Entry box" --text "Please enter the value" --width=300 --height=200) + echo $a + +![Screenshot-Entry box](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Entry-box.png) + +After entering it, value will be stored in $a variable. + +Here is the working example which takes user's first name, last name and age and displays it. + + #!/bin/bash + # + # This script will ask for couple of parameters + # and then continue to work depending on entered values + # + + # Giving the option to user + zenity --question --text "Do you want to continue?" + + # Checking if user wants to proceed + [ $? -eq 0 ] || exit 1 + + # Letting user input some values + FIRSTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your first name." --width=300 --height=150) + LASTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your last name." --width=300 --height=150) + AGE=$(zenity --entry --title "Entry box" --text "Please, enter your age." --width=300 --height=150) + + # Displaying entered values in information box + zenity --info --title "Information" --text "You are ${FIRSTNAME} ${LASTNAME} and you are ${AGE}(s) old." --width=300 --height=100 + +Here are the screenshots of previous script. + +![Example1-Question-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Question-1.png) + +First box + +![Example1-Entry box-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-1.png) + +Entry box + +![Example1-Entry box-2](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-2.png) + +Entry box + +![Example1-Entry box-3](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-3.png) + +Entry box + +![Example1-Information](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Information.png) + +Information box + +Don't forget refer some of the useful [zenity options][1] that might help you. + +### Whiptail Tool ### + +To install whiptail on Ubuntu run + + sudo apt-get install whiptail + +Commands for creating message box/dialog with whiptail are also self explanatory, so we will provide you with just couple of basic examples. + +### Creating message box ### + + whiptail --msgbox "This is a message" 10 40 + +![Screenshot-whiptail-msgbox](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-msgbox.png) + +### Creating Yes/No dialog ### + + whiptail --yes-button "Yeah" --no-button "Nope" --title "Choose the answer" --yesno "Will you choose yes?" 10 30 + +![Screenshot-whiptail-yesno](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-yesno.png) + +### Creating entry box with default value ### + + whiptail --inputbox "Enter your number please." 10 30 "10" + +![Screenshot-whiptail-entry](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-entry.png) + +One thing to be aware of when trying to use entered value is that whiptail uses stdout for displaying dialog, and stderr for value output. That way, if you use var=$(...) you wont see dialog box at all, and wont get the entered value. Solution is to switch stdout and stderr. To do that just add **3>&1 1>&2 2>&3** at the end of the whiptail command. Same would be with any whiptail command which you want to use to get some entered value. + +### Creating menu dialog ### + + whiptail --menu "This is a menu. Choose an option:" 20 50 10 1 "first" 2 "second" 3 "third" + +![Screenshot-whiptail-menu](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-menu.png) + +Here is a **shell script** that asks user to enter a path to a folder and then outputs it's size. + + #!/bin/bash + # + # + + # Since whiptail has to use stdout to display dialog, entered value will + # be stored in stderr. To switch them and get the value to stdout you must + # use 3>&1 1>&2 2>&3 + FOLDER_PATH=$(whiptail --title "Get the size of folder" \ + --inputbox "Enter folder path:" \ + 10 30 \ + "/home" \ + 3>&1 1>&2 2>&3) + + if [ -d $FOLDER_PATH ] + then + size=$(du -hs "$FOLDER_PATH" | awk '{print $1}') + whiptail --title "Information" \ + --msgbox "Size of ${FOLDER_PATH} is ${size}" \ + 10 40 + elif [ -f $FOLDER_PATH ] + then + whiptail --title "Warning!!!" \ + --msgbox "The path you entered is a path to a file not a folder!" \ + 10 40 + else + whiptail --title "Error!!!" + --msgbox "Path you entered is not recognized. Please try again" \ + 10 40 + fi + +Here are the screenshots from previous example: + +![Example2-Entry-box](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Entry-box.png) + +Entry box + +![Example2-Information](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Information.png\) + +Information box + +If you are working in terminal , [manual pages][2] are always available. + +### Conclusion ### + +Choosing the right tool for displaying dialogs will depend on whether you expect your script to be run on desktop machine or server machine. Desktop machine users mostly use window environment and will possibly be able to run the script and interact with appearing windows. However, if you are expecting that the user is someone on server machine, you might want to play it safe and use whiptail or any other utility that will display dialogs in plain terminal window. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-shell-script/bash-shell-script-show-dialog-box/ + +作者:[Ilija Lazarevic][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/ilijala/ +[1]:https://help.gnome.org/users/zenity/stable/ +[2]:http://linux.die.net/man/1/whiptail \ No newline at end of file From b4bec2832865181e7f72d085112d94997fa3fc8c Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 14 Apr 2015 10:02:22 +0800 Subject: [PATCH 0527/2517] translating --- ...swers--How to change PATH environment variable on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md b/sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md index 348e199ded..ccbe380f84 100644 --- a/sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md +++ b/sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md @@ -1,3 +1,5 @@ +Translating----geekpi + Linux FAQs with Answers--How to change PATH environment variable on Linux ================================================================================ > **Question**: When I try to run an executable, it complains "command not found." The executable is actually located in /usr/local/bin. How can I add /usr/local/bin to my PATH variable, so that I can run the command without specify the path? @@ -70,4 +72,4 @@ via: http://ask.xmodulo.com/change-path-environment-variable-linux.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From d01da978ea408ee1667ba7171b54a7580cb96f09 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 14 Apr 2015 10:21:52 +0800 Subject: [PATCH 0528/2517] translated --- ...ange PATH environment variable on Linux.md | 75 ------------------- ...ange PATH environment variable on Linux.md | 73 ++++++++++++++++++ 2 files changed, 73 insertions(+), 75 deletions(-) delete mode 100644 sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md create mode 100644 translated/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md b/sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md deleted file mode 100644 index ccbe380f84..0000000000 --- a/sources/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md +++ /dev/null @@ -1,75 +0,0 @@ -Translating----geekpi - -Linux FAQs with Answers--How to change PATH environment variable on Linux -================================================================================ -> **Question**: When I try to run an executable, it complains "command not found." The executable is actually located in /usr/local/bin. How can I add /usr/local/bin to my PATH variable, so that I can run the command without specify the path? - -In Linux, PATH environment variable stores a set of directories to search for an executable command when the command is typed by a user. The value of PATH variable is formatted as a series of colon-separated absolute paths. Each user has a user-specific PATH environment variable (initialized with system-wide default PATH variable). - -To check the current PATH environment variable of a user, run the following command as the user: - - $ echo $PATH - ----------- - - /usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin - -Alternatively, run: - - $ env | grep PATH - ----------- - - PATH=/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin - -If the command that you type is not found in any of these directories, the shell will throw an error message: "command not found" - -If you want to add an additional directory (e.g., /usr/local/bin) to your PATH variable, you can follow these instructions. - -### Change PATH Environment Variable for a Particular User Only ### - -If you want to temporarily add a new directory (e.g., /usr/local/bin) to a user's default search path in the current login session, you can simply type the following. - - $ PATH=$PATH:/usr/local/bin - -Now check if PATH has been updated: - - $ echo $PATH - ----------- - - /usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin:/usr/local/bin - -The updated PATH will then remain effective in the current login session. The change, however, will be lost in any new terminal session. - -If you want to change PATH variable permanently, open ~/.bashrc (or ~/.bash_profile) with a text editor, and append the following line. - - export PATH=$PATH:/usr/local/bin - -Then activate the change permanently by running: - - $ source ~/.bashrc (or source ~/.bash_profile) - -### Change PATH Environment Variable System-wide ### - -If you want to permanently add /usr/local/bin to system-wide default PATH variable, edit /etc/profile as follows. - - $ sudo vi /etc/profile - ----------- - - export PATH=$PATH:/usr/local/bin - -Once you re-login, the updated PATH variable will take effect. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/change-path-environment-variable-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md b/translated/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md new file mode 100644 index 0000000000..5cc7a17bd2 --- /dev/null +++ b/translated/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md @@ -0,0 +1,73 @@ +Linux有问必答--如何在Linux中修改环境变量PATH +================================================================================ +> **提问**: 当我试着运行一个程序时,它提示“command not found”。 但这个程序就在/usr/local/bin下。我该如何添加/usr/local/bin到我的PATH变量下,这样我就可以不用指定路径来运行这个命令了。 + +在Linux中,PATH环境变量保存了一系列的目录用于用户在输入的时候搜索命令。PATH变量的值由一系列的由分号分隔的绝对路径组成。每个用户都有特定的PATH环境变量(由系统级的PATH变量初始化)。 + +要检查用户的环境变量,用户模式下运行下面的命令: + + $ echo $PATH + +---------- + + /usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin + +或者运行: + + $ env | grep PATH + +---------- + + PATH=/usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin + +如果你的命令不存在于上面任何一个目录内,shell就会抛出一个错误信息:“command not found”。 + +如果你想要添加一个另外的目录(比如:/usr/local/bin)到你的PATH变量中,你可以用下面这些命令。 + +### 为特定用户修改PATH环境变量 ### + +如果你只想在当前的登录会话中临时地添加一个新的目录(比如:/usr/local/bin)给用户的默认搜索路径,你只需要输入下面的命令。 + + $ PATH=$PATH:/usr/local/bin + +检查PATH是否已经更新: + + $ echo $PATH + +---------- + + /usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin:/usr/local/bin + +更新的PATH会在当前的PATH一直有效。然而,更改将在新的会话中失效。 + +如果你想要永久更改PATH变量,用编辑器打开~/.bashrc (或者 ~/.bash_profile),接着在最后添加下面这行。 + + export PATH=$PATH:/usr/local/bin + +接着运行下面这行永久激活更改: + + $ source ~/.bashrc (or source ~/.bash_profile) + +### 改变系统级的环境变量 ### + +如果你想要永久添加/usr/local/bin到系统级的PATH变量中,像下面这样编辑/etc/profile。 + + $ sudo vi /etc/profile + +---------- + + export PATH=$PATH:/usr/local/bin + +你重新登录后,更新的环境变量就会生效了。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/change-path-environment-variable-linux.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From 78668c0f636e6c81c22fbd1bced330eac9a29701 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 14 Apr 2015 11:43:33 +0800 Subject: [PATCH 0529/2517] Translating by ZTinoZ --- ...13 [Solved] Ubuntu Does Not Remember Brightness Settings.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md b/sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md index 9ed38c0cf3..40e735927d 100644 --- a/sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md +++ b/sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ [Solved] Ubuntu Does Not Remember Brightness Settings ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Fix_Ubuntu_Brightness_Issue.jpg) @@ -29,4 +30,4 @@ via: http://itsfoss.com/ubuntu-mint-brightness-settings/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://itsfoss.com/fix-brightness-ubuntu-1310/ [2]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages -[3]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages \ No newline at end of file +[3]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages From af6e9e75df5e5e50aff526b87da8d09fffab3a33 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 14 Apr 2015 14:48:22 +0800 Subject: [PATCH 0530/2517] Finish the translation by ZTinoZ --- ...u Does Not Remember Brightness Settings.md | 33 ------------------- ...u Does Not Remember Brightness Settings.md | 32 ++++++++++++++++++ 2 files changed, 32 insertions(+), 33 deletions(-) delete mode 100644 sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md create mode 100644 translated/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md diff --git a/sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md b/sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md deleted file mode 100644 index 40e735927d..0000000000 --- a/sources/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md +++ /dev/null @@ -1,33 +0,0 @@ -Translating by ZTinoZ -[Solved] Ubuntu Does Not Remember Brightness Settings -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Fix_Ubuntu_Brightness_Issue.jpg) - -In the tutorial to [fix brightness control not working for Ubuntu and Linux Mint][1], some users mentioned that though the fix worked for them, **Ubuntu doesn’t remember the brightness settings** and same was the case with Linux Mint. At each boot or when the system wakes up from sleep, the brightness is restored to either maximum or minimum level. Quite an annoyance, I know. But thankfully we have an easy solution for this **brightness issue in Ubuntu and Linux Mint**. - -### Fix Ubuntu and Linux Mint doesn’t remember brightness settings ### - -[Norbert][2] wrote a script to make Ubuntu and Linux Mint remember the brightness settings at each boot or wake up from sleep. To help you easily use the script, he put up this PPA which is available for Ubuntu 12.04, 14.04 and 14.10. All you need to do is to use the following commands: - - sudo add-apt-repository ppa:nrbrtx/sysvinit-backlight - sudo apt-get update - sudo apt-get install sysvinit-backlight - -Once installed, restart your system. Now check if the brightness settings are saved or not. - -I hope this quick tip helped you. If you find any issues, please take your time to [report a bug][3]. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/ubuntu-mint-brightness-settings/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/fix-brightness-ubuntu-1310/ -[2]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages -[3]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages diff --git a/translated/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md b/translated/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md new file mode 100644 index 0000000000..5cd7abadaa --- /dev/null +++ b/translated/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md @@ -0,0 +1,32 @@ +[已解决] Ubuntu下不能记住亮度设置问题 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Fix_Ubuntu_Brightness_Issue.jpg) + +在[解决亮度控制在Ubuntu和Linux Mint下不工作的问题][1]这篇教程里,一些用户提到虽然问题已经得到解决,但是**Ubuntu无法记住亮度设置**,同样的情况在Linux Mint下也会发生。每次开机或从睡眠状态下唤醒,亮度会恢复至最大值或最小值。我知道这种情况很烦。不过幸好我们有很简单的方法来解决**Ubuntu和Linux Mint下的亮度问题**。 + +### 解决Ubuntu和Linux下不能记住亮度设置 ### + +[Norbert][2]写了一个脚本,能让Ubuntu和Linux Mint记住亮度设置,不论是开机还是唤醒之后。为了能让你使用这个脚本更简单方便,他把这个适用于Ubuntu 12.04、14.04和14.10的PPA挂在了网上。你需要做的就是输入以下命令: + + sudo add-apt-repository ppa:nrbrtx/sysvinit-backlight + sudo apt-get update + sudo apt-get install sysvinit-backlight + +安装好之后,重启你的系统。现在就来看看亮度设置有没有被保存下来吧。 + +希望这篇小贴士能帮助到你。如果你有任何问题,就[来这儿][3]提bug吧。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/ubuntu-mint-brightness-settings/ + +作者:[Abhishek][a] +译者:[ZTinoZ](https://github.com/ZTinoZ) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/fix-brightness-ubuntu-1310/ +[2]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages +[3]:https://launchpad.net/~nrbrtx/+archive/ubuntu/sysvinit-backlight/+packages From a070de0673742901e4e81f8b0cca105fad48477a Mon Sep 17 00:00:00 2001 From: boredivan Date: Tue, 14 Apr 2015 17:20:22 +0800 Subject: [PATCH 0531/2517] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?]=EF=BC=9A=20=20=20sources/tech/20150205=20How=20To=20Scan=20An?= =?UTF-8?q?d=20Check=20A=20WordPress=20Website=20Security=20Using=20WPScan?= =?UTF-8?q?,=20Nmap,=20And=20Nikto.md=20->=20translated/tech/20150205=20Ho?= =?UTF-8?q?w=20To=20Scan=20And=20Check=20A=20WordPress=20Website=20Securit?= =?UTF-8?q?y=20Using=20WPScan,=20Nmap,=20And=20Nikto.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Security Using WPScan, Nmap, And Nikto.md | 163 +++++++++--------- 1 file changed, 82 insertions(+), 81 deletions(-) rename {sources => translated}/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md (58%) diff --git a/sources/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md b/translated/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md similarity index 58% rename from sources/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md rename to translated/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md index 4f84e2c4a2..fbd5fcf924 100644 --- a/sources/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md +++ b/translated/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md @@ -1,67 +1,66 @@ -[boredivan翻译中] -How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto +怎样用 WPScan,Nmap 和 Nikto 扫描和检查一个 WordPress 站点的安全性 ================================================================================ -### Introduction ### +### 介绍 ### -Millions of websites are powered by WordPress software and there’s a reason for that. WordPress is the most developer-friendly content management system out there, so you can essentially do anything you want with it. Unfortunately, every day some scary report about a major site being hacked or a sensitive database being compromised hits the web … and freaks everyone out. +数百万个网站用着 WordPress ,这当然是有原因的。WordPress 是众多内容管理系统中对开发者最友好的,本质上说你可以用它做任何事情。不幸的是,每天都有些吓人的报告说某个主要的网站被黑了,或者某个重要的数据库被泄露了之类的,吓得人一愣一愣的。 -If you haven’t installed WordPress yet, check the following article. -On Debian based systems: +如果你还没有安装 WordPress ,可以看下下面的文章。 +在基于 Debian 的系统上: - [How to install WordPress On Ubuntu][1] -On RPM based systems: +在基于 RPM 的系统上: - [How to install wordpress On CentOS][2] -Following on from my previous article [How To Secure WordPress Website][3] show you **checklist** allows you to secure your WordPress site with as little effort as possible. +我之前的文章 [How To Secure WordPress Website][3] 里面列出的**备忘录**为读者维护 WordPress 的安全提供了一点帮助。 -In this article, will describe to you through the installation of **wpscan** and serve as a guide on how to use wpscan to locate any known vulnerable plugins and themes that may make your site vulnerable to attack. Also, how to install and use **nmap** the free Security Scanner For Network Exploration & Hacking . And at the end we will show you the steps to use **nikto**. +在这篇文章里面,我将说明 **wpscan** 的安装过程,以及怎样使用 wpscan 来锁定任何已知的会让你的站点变得易受攻击的插件和主题。还有怎样安装和使用一款免费的网络探索和攻击的安全扫描软件 **nmap** 。最后展示的是使用 **nikto** 的步骤。 -### WPScan to Test for Vulnerable Plugins and Themes in WordPress ### +### 用 WPScan 测试 WordPress 中易受攻击的插件和主题 ### -**WPScan** is a black box WordPress Security Scanner written in Ruby which attempts to find known security weaknesses within WordPress installations. Its intended use it to be for security professionals or WordPress administrators to asses the security posture of their WordPress installations. The code base is Open Source and licensed under the GPLv3. +**WPScan** 是一个 WordPress 黑盒安全扫描软件,用 Ruby 写成,它是专门用来寻找已知的 WordPress 的弱点的。它为安全专家和 WordPress 管理员提供了一条评估他们的 WordPress 站点的途径。它的基于开源代码,在 GPLv3 下发行。 -### Download and Install WPScan ### +### 下载和安装 WPScan ### -Before we get started with the installation, it is important to note that wpscan will not work on Windows systems, so you will need access to a Linux or OSX installation to proceed. If you only have access to a Windows system you can download Virtualbox and install any Linux distro you like as a Virtual Machine. +在我们开始安装之前,很重要的一点是要注意 wpscan 不能在 Windows 下工作,所以你需要使用一台 Linux 或者 OS X 的机器来完成下面的事情。如果你只有 Windows 的系统,拿你可以下载一个 Virtualbox 然后在虚拟机里面安装任何你喜欢的 Linux 发行版本。 -WPScan is hosted on Github, so if it is not already installed we will need to install the git packages before we can continue. +WPScan 的源代码被放在 Github 上,所以需要先安装 git。 sudo apt-get install git -Once git is installed, we need to install the dependencies for wpscan. +git 装好了,我们就要安装 wpscan 的依赖包了。 sudo apt-get install libcurl4-gnutls-dev libopenssl-ruby libxml2 libxml2-dev libxslt1-dev ruby-dev ruby1.9.3 -Now we need to clone the wpscan package from github. +把 wpscan 从 github 上 clone 下来。 git clone https://github.com/wpscanteam/wpscan.git -Now we can move to the newly created wpscan directory and install the necessary ruby gems through bundler. +现在我们可以进入这个新建立的 wpscan 目录,通过 bundler 安装必要的 ruby 包。 cd wpscan sudo gem install bundler && bundle install --without test development -Now that we have wpscan installed, we will walk through using the tool to search for potentially vulnerable files on our WordPress installation. Some of the most important aspects of wpscan are its ability to enumerate not only plugins and themes, but users and timthumb installations as well. WPScan can also perform bruteforce attacks against WordPress– but that is outside of the scope of this article. +现在 wpscan 装好了,我们就可以用它来搜索我们 WordPress 站点潜在的易受攻击的文件。wpcan 最重要的方面是它能列出不仅是插件和主题,也能列出用户和缩略图的功能。WPScan 也可以用来暴力破解 WordPress —— 但这不是本文要讨论的内容。 -#### Update wpscan #### +#### 跟新 WPScan #### ruby wpscan.rb --update -#### Enumerate Plugins #### +#### 列举插件 #### -To enumerate plugins, all we need to do is launch wpscan with the `--enumerate p` arguments like so. +要列出所有插件,只需要加上 “--enumerate p” 参数,就像这样: ruby wpscan.rb --url http(s)://www.yoursiteurl.com --enumerate p -or to only display vulnerable plugins: +或者仅仅列出易受攻击的插件: ruby wpscan.rb --url http(s)://www.yoursiteurl.com --enumerate vp -Some example output is posted below: +下面是一些例子: - | Name: akismet + | Name: ukiscet | Location: http://********.com/wp-content/plugins/akismet/ | Name: audio-player @@ -92,17 +91,18 @@ Some example output is posted below: | Name: contact | Location: http://********.com/wp-content/plugins/contact/ -#### Enumerate Themes #### +#### 列举主题 #### + +列举主题和列举插件差不多,只要用"--enumerate t"就可以了。 -Enumeration of themes works the same as enumeration of plugins, just with the `--enumerate t` argument. ruby wpscan.rb --url http(s)://www.host-name.com --enumerate t -Or to only display vulnerable themes: +或者只列出易受攻击的主题: ruby wpscan.rb --url http(s)://www.host-name.com --enumerate vt -Sample output: +例子的输出: | Name: path | Location: http://********.com/wp-content/themes/path/ @@ -127,29 +127,30 @@ Sample output: | Style URL: http://********.com/wp-content/themes/twentyten/style.css | Description: -#### Enumerate Users #### +#### 列举用户 #### -WPScan can also be used to enumerate users with valid logins to the WordPress installation. This is usually performed by attackers in order to get a list of users in preparation for a bruteforce attack. +WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录记录。攻击者常常这么做——为了获得一个用户清单,好进行暴力破解。 ruby wpscan.rb --url http(s)://www.host-name.com --enumerate u -#### Enumerate Timthumb Files #### +#### 列举 Timthumb 文件 #### -The last function of wpscan we’ll discuss in this article is the ability to enumerate timthumb installations. In recent years, timthumb has become a very common target of attackers due to the numerous vulnerabilities found and posted to online forums, message lists, and advisory boards. Using wpscan to find vulnerable timthumb files is done with the following command. +关于 WPscan ,我要说的最后一个功能是列举 timthub 相关的文件。近年来,timthumb 已经成为攻击者眼里的一个普通的目标,因为无数的漏洞被找出来并发到论坛上、邮件列表等等地方。用下面的命令可以通过 wpscan 找出易受攻击的 timthub 文件: ruby wpscan.rb --url http(s)://www.host-name.com --enumerate tt -### Nmap to Scan for Open Ports on your VPS ### +### 用 Nmap 扫描你 VPS 的开放端口 ### -**Nmap** is an open source tool for network exploration and security auditing. It was designed to rapidly scan large networks, although it works fine against single hosts. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics +**Nmap** 是一个开源的用于网络探索和安全审查方面的工具。它可以迅速扫描巨大的网络,也可一单机使用。Nmap 用原始 IP 数据包通过不同寻常的方法判断网络里那些主机是正在工作的,那些主机上都提供了什么服务(应用名称和版本),是什么操作系统(以及版本),用的什么类型的防火墙,以及很多其他特征。 -### Download and install nmap on Debian and Ubuntu ### +### 在 Debian 和 Ubuntu 上下载和安装 nmap ### + +要在基于 Debian 和 Ubuntu 的操作系统上安装 nmap ,运行下面的命令: -To install nmap for Debian and Ubuntu Linux based server systems type the following apt-get command: sudo apt-get install nmap -**Sample outputs:** +**输出样例** Reading package lists... Done Building dependency tree @@ -167,27 +168,27 @@ To install nmap for Debian and Ubuntu Linux based server systems type the follow Processing triggers for man-db ... Setting up nmap (5.21-1.1ubuntu1) ... -#### Examples #### +#### 打个例子 #### -To find the nmap version, enter: +输出 nmap 的版本: nmap -V -OR +或者 nmap --version -**Sample outputs:** +**输出样例** Nmap version 5.21 ( http://nmap.org ) -### Dowonlad and install nmap on Centos ### +### 在 Centos 上下载和安装 nmap ### -To install nmap on RHEL based Linux distributions, type the following yum command: +要在基于 RHEL 的 Linux 上面安装 nmap ,输入下面的命令: yum install nmap -**Sample outputs:** +**输出样例** Loaded plugins: protectbase, rhnplugin, security 0 packages excluded due to repository protections @@ -226,63 +227,63 @@ To install nmap on RHEL based Linux distributions, type the following yum comman Complete! -#### Examples #### +#### 举个比方 #### -To find the nmap version, enter: +输出 nmap 版本号: nmap --version -**Sample outputs:** +**输出样例** Nmap version 5.51 ( http://nmap.org ) -#### Scan Ports with Nmap #### +#### 用 Nmap 扫描端口 #### -You can got a lot of information about your server or host using nmap and it let you to think like someone has malicious intent. +你可以用 nmap 来获得很多关于你的服务器的信息,它让你站在对你的网站不怀好意的人的角度看你自己的网站。 -For this reason, only test it on servers that you own or in situations where you’ve notified the owners. +因此,请仅用它测试你自己的服务器或者在行动之前通知服务器的所有者。 -The nmap creators actually provide a test server located at: +nmap 的作者提供了一个测试服务器: scanme.nmap.org -Some commands may take a long while to complete: +有些命令可能会耗时较长: -To scan an IP address or a host name (FQDN), run: +要扫描一个 IP 地址或者一个主机名(全称域名),运行: nmap 192.168.1.1 -Sample outputs: +输出样例: ![Fig.01: nmap in action](http://s0.cyberciti.org/uploads/faq/2012/11/redhat-nmap-command-output.png) -Scan for the host operating system: +扫描以获得主机的操作系统: sudo nmap -O 192.168.1.1 -pecify a range with “-” or “/24″ to scan a number of hosts at once: +加上“-”或者“/24”来一次性扫描某个范围里面的多个主机: sudo nmap -PN xxx.xxx.xxx.xxx-yyy -Scan a network range for available services: +扫描某个范围内可用的服务: sudo nmap -sP network_address_range -Scan without preforming a reverse DNS lookup on the IP address specified. This should speed up your results in most cases: +扫描 IP 地址时部进行反向 DNS 解析。多数情况下这会加快你获得结果的速度: sudo nmap -n remote_host -Scan a specific port instead of all common ports: +扫描一个特定端口而不是所有常用端口: sudo nmap -p port_number remote_host -Scan a network and find out which servers and devices are up and running +扫描一个网络,找出那些服务器在线,分别运行了什么服务 -This is known as host discovery or ping scan: +这就是传说中的主机探索或者 ping 扫描: nmap -sP 192.168.1.0/24 -Sample outputs: +输出样例: Host 192.168.1.1 is up (0.00035s latency). MAC Address: BC:AE:C5:C3:16:93 (Unknown) @@ -293,25 +294,25 @@ Sample outputs: MAC Address: 00:11:32:11:15:FC (Synology Incorporated) Nmap done: 256 IP addresses (4 hosts up) scanned in 2.80 second -Understanding port configuration and how to discover what the attack vectors are on your server is only one step to securing your information and your VPS. +理解端口配置和如何发现你的服务器上的攻击的载体只是确保你的信息和你的 VPS 安全的第一步。 -### Nikto to Scan for vulnerabilities in your website ### +### 用 Nikto 扫描你网站的缺陷 ### -[Nikto][4] Web-scanner is a open source web-server scanner which can be used to scan the web-servers for malicious programs and files. Nikto can be used to scan the outdated versions of programs too. Nikto will provide us a quick and easy scan to find out the dangerous files and programs in server, At the end of scan result with a log file. +[Nikto][4] 网络扫描器是一个开源的 web 服务器的扫描软件,它可以用来扫描 web 服务器上的恶意的程序和文件。Nikto 也可一用来检查软件版本是否过期。Nikto 能进行简单而快速地扫描以发现服务器上危险的文件和程序。扫描结束后会给出一个日志文件。` -### Download and install Nikto on Linux server ### +### 在 Linux 服务器上下载和安装 Nikto ### -Perl is pre-installed in linux so all you need to do is download nikto from the [project page][5], unpack it into a directory and start your testing. +Perl 在 Linux 上是预先安装好的,所以你只需要从[项目页面][5]下载 nikto ,解压到一个目录里面,然后开始测试。 wget https://cirt.net/nikto/nikto-2.1.4.tar.gz -You can unpack it with an archive manager tool or use tar and gzip together with this command. +你可以用某个归档管理工具或者用下面这个命令,同时使用 tar 和 gzip 。 tar zxvf nikto-2.1.4.tar.gz cd nikto-2.1.4 perl nikto.pl -This should be your results from a working installation: +安装正确的话会得到这样的结果: - ***** SSL support not available (see docs for SSL install) ***** - Nikto v2.1.4 @@ -348,27 +349,27 @@ This should be your results from a working installation: Note: This is the short help output. Use -H for full help. -The error is merely telling us we did not fill in the necessary parameters for a test to run. The SSL support can be enabled by installing the necessary perl ssl module (sudo apt-get install libnet-ssleay-perl). +这个报错只是告诉我们没有给出必要的参数。SSL 支持可以通过安装相关的 perl ssl 模块得到(sudo apt-get install libnet-ssleay-perl)。 -#### Update the nikto Database #### +#### 更新 nikto 数据库 #### -Before performing any scan we need to update the nikto database packages using. +在开始使用之前我们需要先更新 nikto 数据库: /usr/local/bin/nikto.pl -update -To list the available Plugins for nikto we can use the below command. +下面的命令可以列出可用的 nikto 插件。 nikto.pl -list-plugins // To list the installed plugins // -#### Scan for vulnerabilities #### +#### 扫描以寻找缺陷 #### -For a simple test for we will use test a single url. +我们用一个 url 来在做个简单的测试。 perl nikto.pl -h http://www.host-name.com -**Sample outputs:** +**输出样例** -This will produce fairly verbose output that may be somewhat confusing at first. Take the time to read through the output to understand what each advisory means. Many of the alerts in Nikto will refer to OSVDB numbers. These are Open Source Vulnerability Database ([http://osvdb.org/][6]) designations. You can search on OSVDB for further information about any vulnerabilities identified. +会有十分冗长的输出,可能一开始会让人感到困惑。许多 Nikto 的警报会返回 OSVDB 序号。这是开源缺陷数据库([http://osvdb.org/][6])的意思。你可以在 OSVDB 上找出相关缺陷的深入说明。 $ nikto -h http://www.host-name.com - Nikto v2.1.4 @@ -399,18 +400,18 @@ This will produce fairly verbose output that may be somewhat confusing at first. + 1 host(s) tested $ -**Nikto** is an extremely lightweight, and versatile tool. Because of the fact that Nikto is written in Perl it can be run on almost any host operating system. +**Nikto** 是一个非常轻量级的通用工具。因为 Nikto 是用 Perl 写的,所以它可以在几乎任何服务器的操作系统上运行。 -Hope this will will bring you a good idea to scan vulnerbalites for your wordpress website. Following on from my previous article [How To Secure WordPress Website][7] show you **checklist** allows you to secure your WordPress site with as little effort as possible. +希望这篇文章能在你找你的 wordpress 站点的缺陷的时候给你一些提示。我之前的文章[怎样保护 WordPress 站点][7]记录了一个**清单**,可以让你保护你的 WordPress 站点的工作变得更简单。 -If you have any feedback or comments, feel free to post them in the comment section below. +有想说的,留下你的评论。 -------------------------------------------------------------------------------- via: http://www.unixmen.com/scan-check-wordpress-website-security-using-wpscan-nmap-nikto/ 作者:[anismaj][a] -译者:[译者ID](https://github.com/译者ID) +译者:[boredivan](https://github.com/boredivan) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 172eea333a4b04ac7e715340d5c1bb8ec1d3b5d3 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 14 Apr 2015 20:36:33 +0800 Subject: [PATCH 0532/2517] Update 20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...enerate or Encrypt or Decrypt Random Passwords in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md b/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md index 1cd2991879..057fa9cc9d 100644 --- a/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md +++ b/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md @@ -1,3 +1,5 @@ +FSSlc translating + How to Generate/Encrypt/Decrypt Random Passwords in Linux ================================================================================ We have taken initiative to produce Linux tips and tricks series. If you’ve missed the last article of this series, you may like to visit the link below. @@ -101,4 +103,4 @@ via: http://www.tecmint.com/generate-encrypt-decrypt-random-passwords-in-linux/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/5-linux-command-line-tricks/ -[2]:http://www.tecmint.com/echo-command-in-linux/ \ No newline at end of file +[2]:http://www.tecmint.com/echo-command-in-linux/ From 9253de41cf9ec4947ebb37e184d3fb920e1e8f10 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 14 Apr 2015 21:17:42 +0800 Subject: [PATCH 0533/2517] PUB:20150402 The VirtualBox 5.0 beta is finally here @ictlyh --- ...The VirtualBox 5.0 beta is finally here.md | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) rename {translated/news => published}/20150402 The VirtualBox 5.0 beta is finally here.md (52%) diff --git a/translated/news/20150402 The VirtualBox 5.0 beta is finally here.md b/published/20150402 The VirtualBox 5.0 beta is finally here.md similarity index 52% rename from translated/news/20150402 The VirtualBox 5.0 beta is finally here.md rename to published/20150402 The VirtualBox 5.0 beta is finally here.md index ed2549d347..b725657127 100644 --- a/translated/news/20150402 The VirtualBox 5.0 beta is finally here.md +++ b/published/20150402 The VirtualBox 5.0 beta is finally here.md @@ -1,24 +1,25 @@ -VirturalBox 5.0 beta版终于发布了 +VirturalBox 终于进入到 5.0 世代 ======================================= -**甲骨文公司的桌面虚拟化软件获得了近五年来的第一次重大改版,但是更像是改进而不是革命性的的变化。** + +**本月初,甲骨文公司的桌面虚拟化软件获得了近五年来的第一次重大改版,但是更像是改进而不是革命性的的变化。** VirtualBox,由Sun公司创建,现在由甲骨文管理的开源虚拟化系统,获得了近5年来第一次的主版本更新发布。 -从发行说明和测试版本身的表现来看,别期望任何真正革命性的改变。在此版本中,VirtualBox在视觉上和技术上都做了一些改进,但和VMware相比,它的主要优势仍然是相同核心功能的自由化。 +从发行说明和测试版本身的表现来看,别期望任何真正革命性的改变。在此版本中,VirtualBox在视觉上和技术上都做了一些改进,但和VMware相比,它的主要优势仍然是相同核心功能的开源实现。 -VirtualBox 4.0的最后一个主要版本在2010年12月发布,它采用了新的图形化用户界面,新的虚拟化硬件和重组的项目设计,带来了重大的改版。但项目主要版本的发布步伐缓慢,上一次重要版本(版本4.3)在2013年底才发布。从那时起,一切都被正式称为“维修”发布。 +VirtualBox 4.0的最后一个主要版本在2010年12月发布,它采用了新的图形化用户界面,新的虚拟化硬件和重组的项目设计,进行了重大的改版。但项目主要版本的发布步伐缓慢,上一次重要版本(版本4.3)在2013年底才发布。从那时起,一切都被正式称为“维护”发布。 -**VirtualBox 5.0** +![](http://images.techhive.com/images/article/2015/04/vbox-5-100576781-large.idge.png) *VirtualBox 5.0的第一个测试版增加了编辑菜单,VM窗口的快捷方式图标等功能,如下面所示。* -VirtualBox 5.0最大的变化是增加了对硬件辅助虚拟化指令集扩展的支持。AES-NI指令集通常用于加密时的硬件加速,SSE 4.1和SSE 4.2指令集都包括在其中。另外一点是支持Windows和Linux客户机的半虚拟化,一个抽象主机音响的新的架构以及支持客户机中的USB 3(xHCI)控制器。 +VirtualBox 5.0最大的变化是增加了对硬件辅助虚拟化指令集扩展的支持。AES-NI指令集通常用于加密时的硬件加速,SSE 4.1和SSE 4.2指令集都包括在其中。另外一点是支持Windows和Linux客户机的半虚拟化,一个抽象主机音响设备的新的架构以及支持客户机中的USB 3(xHCI)控制器。 -大部分可用更新都是对VirtualBox 图形化用户界面的改进。一个大的变化就是支持给单个虚拟主机自定义菜单和工具栏,这样很少或者从不使用的选项就可以彻底删除。另外重要的一点是可以在VirtualBox接口内部对虚拟磁盘进行加密,而不依赖于客户机操作系统自身的磁盘加密功能(假设有的话)。 +大部分可用性更新都是对 VirtualBox 图形化用户界面的改进。一个大的变化就是支持给单个虚拟主机自定义菜单和工具栏,这样很少或者从不使用的选项就可以彻底删除。另外重要的一点是可以在VirtualBox接口内部对虚拟磁盘进行加密,而不依赖于客户机操作系统自身的磁盘加密功能(假设有的话)。 -甲骨文公司提醒由于这是个测试版软件,需要谨慎对待。当然,主界面和客户机系统界面在某方面都可能引起红黑测试版警告。但之前VirtualBox发行版(4.3.26)上创建的Windows 10虚拟机启动和运行都没问题,5.0版本中添加的VirtualBox客户机功能--更好的视频支持,双向复制和粘贴,以及其它功能--安装的时候也没有问题。(更好地支持Windows 10的修复从4.3.18版本后就开始出现)。 +甲骨文公司提醒由于这是个测试版软件,需要谨慎对待。当然,主界面和客户机系统界面的某个角落打着红黑相间的测试警告标志。但之前VirtualBox发行版(4.3.26)上创建的Windows 10虚拟机启动和运行都没问题,5.0版本中添加的VirtualBox客户机功能--更好的视频支持,双向复制和粘贴,以及其它功能--在安装的时候也没有问题。(从4.3.18版本就改进了对 Windows 10的支持)。 -虽然没有明确指出5.0的最终版什么时候会发布,但是甲骨文公司[鼓励用户][1]在非生产环境中下载和使用测试版,并在[测试版反馈论坛][2]中报告bug文件。 +虽然没有明确指出5.0的最终版什么时候会发布,但是甲骨文公司[建议用户][1]在非生产环境中下载和使用测试版,并在[测试版反馈论坛][2]中提交bug报告。 -------------------------------------------------------------------------------- @@ -26,7 +27,7 @@ via: http://www.infoworld.com/article/2905098/virtualization/oracle-virtualbox-5 作者:[Serdar Yegulalp][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ce1cca3c238fb6ba329d0758b3b12228121d6b20 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 14 Apr 2015 21:55:24 +0800 Subject: [PATCH 0534/2517] [Translating] news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support --- ...Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md b/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md index 1d9fae2c33..878d43e291 100644 --- a/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md +++ b/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md @@ -1,3 +1,4 @@ +Translating by ictlyh Linux Kernel 4.0 Features Live Kernel Patching, PS3 Support ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/10/tuxtuxtux.jpeg) From 37b6745dcad20e1808454c83a049dc9ae8bbd7da Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 14 Apr 2015 22:31:24 +0800 Subject: [PATCH 0535/2517] PUB:20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player @ictlyh --- ... Overview--A Feature-Complete GNOME Music Player.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/share => published}/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md (80%) diff --git a/translated/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md b/published/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md similarity index 80% rename from translated/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md rename to published/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md index 6c22e79f25..af58c52b1d 100644 --- a/translated/share/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md +++ b/published/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md @@ -1,10 +1,10 @@ -Exaile 3.4.1 概述 — 一个全功能的GNOME音乐播放器 +Exaile 3.4.1 概览:一个全功能的GNOME音乐播放器 ================================================================================ -**Exaile** 在过去两年显得有些平静,也许只有一个或者两个稳定版发布,但尽管如此,在功能方面,它是一个和[Rhythmbox][1]或者[Banshee][2]相匹敌的全功能GNOME音乐播放器。然而,在过去的两个月,在"We’re not dead yet"的口号下,推出了一个新的稳定版3.4,同时在11月1日还推出了3.4.1增量版本。事实上,Exaile有很多的功能,我可以继续写很多的文章而不是在一篇文章里全部介绍到,就让我们来看一下一些最显著的特点吧。 +**Exaile** 在过去两年显得有些平静,也许只有一个或者两个稳定版发布,但尽管如此,在功能方面,它是一个和[Rhythmbox][1]或者[Banshee][2]相匹敌的全功能GNOME音乐播放器。不过,在过去的两个月,在"We’re not dead yet"的口号下,他们推出了一个新的稳定版3.4,同时在11月1日还推出了3.4.1增量版本。事实上,Exaile有很多的功能,我可以继续写很多的文章而不是在一篇文章里全部介绍到,就让我们来看一下一些最显著的特点吧。 ![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile02.jpg) -[Exaile][3]是基于GTK-2,用Python写的音乐播放器,它能很好地兼容GNOME,有和旧的Amarok1.4或者Clementine非常类似的界面,以及一些很好的功能。界面主要由两个面板组成,两个都支持标签。左边的面板提供对音乐集,网络音频,只能和自定义播放列表,文件浏览,播客,组标签以及歌词的访问,窗口的主要部分是播放列表(支持多种,带标签的播放列表)和控制按钮。 +[Exaile][3]是基于GTK-2,用Python写的音乐播放器,它能很好地兼容GNOME,有和旧的Amarok1.4或者Clementine非常类似的界面,以及一些很好的功能。界面主要由两个面板组成,两个都支持标签。左边的面板提供对音乐集,网络音频,智能和自定义播放列表,文件浏览,播客,组标签以及歌词的访问,窗口的主要部分是播放列表(支持多个列表,以标签方式组织的播放列表)和控制按钮。 Exaile的界面和Clementine或者Amarok1.4非常相似,可以显示或者隐藏左边的标签。 @@ -26,7 +26,7 @@ Exaile的功能几乎不尽其数。你可以在音乐集中组织音乐,听 ![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile03.jpg) -首选项窗口允许多个方面配置Exaile,包括启用或者禁用插件,外观,系统托盘集成或者播放模式。外观设置允许你更改标签的布局,显示或者隐藏便签栏,启用或者禁用透明性或者禁用启动画面。 +首选项窗口允许配置Exaile的各个方面,包括启用或者禁用插件,外观,系统托盘集成或者播放模式。外观设置允许你更改标签的布局,显示或者隐藏便签栏,启用或者禁用透明性或者禁用启动画面。 ![](http://www.tuxarena.com/wp-content/uploads/2014/11/exaile_preferences_01.jpg) @@ -64,7 +64,7 @@ via: http://www.tuxarena.com/2014/11/exaile-3-4-1-overview-a-feature-complete-gn 作者:Craciun Dan 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b01e20e3e8b32b40c14b3762c044ed9cfad0ab2e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 14 Apr 2015 22:51:02 +0800 Subject: [PATCH 0536/2517] [Translated] news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support --- ...atures Live Kernel Patching PS3 Support.md | 75 ------------------- ...atures Live Kernel Patching PS3 Support.md | 75 +++++++++++++++++++ 2 files changed, 75 insertions(+), 75 deletions(-) delete mode 100644 sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md create mode 100644 translated/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md diff --git a/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md b/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md deleted file mode 100644 index 878d43e291..0000000000 --- a/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md +++ /dev/null @@ -1,75 +0,0 @@ -Translating by ictlyh -Linux Kernel 4.0 Features Live Kernel Patching, PS3 Support -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/10/tuxtuxtux.jpeg) - -**A new stable release of the Linux Kernel [has been announced][1] by Linus Torvalds on the Linux kernel mailing list. ** - -Linux 4.0, codenamed ‘Hurr durr I’m a sheep’ — no, really — brings with it a small set of new hardware support, driver improvements, performance tweaks, bug fixes and the like. - -But remarking on the minor-ness of the update, Torvalds’ writes; - -> “Feature-wise, 4.0 doesn’t have all that much special. Much have been made of the new kernel patching infrastructure, but realistically […] we’ve had much bigger changes in other versions. So this is very much a “solid code progress” release.” - -Linus adds that Linux 4.1 is likely to be a ‘bigger release’. - -### New Linux Kernel 4.0 Features ### - -Install Kernel Updates Without Rebooting - -If you’ve ever been put out by the need to reboot your Linux box to finish installing a kernel update you won’t be alone. It’s a minor inconvenience on the desktop, and a major one for servers. - -![Reboot-free Kernel Updates](http://www.omgubuntu.co.uk/wp-content/uploads/2012/10/update.jpg) -Reboot-free Kernel Updates - -The ability to install/apply security patches to the Linux kernel “live”, without the need to reboot, has been a long-held want of many Linux enthusiasts for years. - -A slew of third-party projects, like [Oracle’s KSplice][2] and Red Hat’s Kpatch, have sought to offer live patching functionality for certain distributions. - -For servers, enterprise and mission-critical use cases where uptime is priority live kernel patching is a pretty big deal. - -The good news is that Linux 4.0 makes having to reboot to complete a kernel update a thing of the past. - -Well, almost. - -The initial groundwork to support reboot-free patching arrives in this latest release, ready for experienced sysadmins to take advantage of in Linux 4.0. - -Desktop Linux distributions should also be able to take advantage of the feature too (though given the complexity involved in configuring the reboot-less functionality on the end-user side it may be a little way off). - -This infrastructure will continue to be refined and improved on over the course of the 4.x series. As it does so I expect we’ll all start to hear more about it. - -#### Other Changes #### - -Although it is considered a small release the latest Linux kernel manages to squeeze in a welcome set of hardware improvements, new drivers and performance tweaks. These include: - - -- Improvements to Intel ‘Skylake’ platform -- Intel Quark SoC support -- Various patches to improve Linux running on a Playstation 3 -- TOpen-source AMD Radeon driver supports DisplayPort Audio -- Various misc HID driver tweaks, including Lenovo compact keyboards, Wacom Cintiq 27QHD -- Toshiba power settings driver adds USB sleep/charge functionality, rapid charge, sleep w/ music, etc -- File System tweaks, including F2FS, BtrfFS, etc - -### Install Linux Kernel 4.0 on Ubuntu ### - -Although classed as stable there is, at present, **no need for desktop users or new-comers to go upgrade**. - -The impatient and adept can take a crack at installing Linux 4.0 in Ubuntu 15.04 Beta by grabbing the appropriate set of packages from [Canonical’s mainline kernel archive][3] or by risking a third-party PPA hosted on Launchpad. - -Ubuntu 15.04 Vivid Vervet is due later this month and will ship with Ubuntu Kernel 3.19 (the Ubuntu kernel is the Linux Kernel plus Ubuntu-specific patches that have not been accepted upstream). - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://lkml.org/lkml/2015/4/12/178 -[2]:http://www.omgubuntu.co.uk/2009/10/how-to-install-kernel-updates-without-rebooting -[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D \ No newline at end of file diff --git a/translated/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md b/translated/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md new file mode 100644 index 0000000000..8b21f05978 --- /dev/null +++ b/translated/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md @@ -0,0 +1,75 @@ +Linux内核4.0功能 实时内核补丁,支持PS3 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/10/tuxtuxtux.jpeg) + +**Linux Torvalds 在Linux内核邮件列表里[发布][1]了Linux内核新的稳定版。** + +Linux 4.0,代号为‘Hurr durr I’m a sheep’ - 不,真的 - 带来了一小系列新的硬件支持,驱动改进,性能调整,错误修复等。 + +但对于微小更新的标注,Torvalds 写到: + +>功能方面,4.0 并没有那么多特别的。虽然在内核补丁设施上做了很多工作,但事实上[...] 我们在其它版本中有更大的改变。所以这仅仅是一次“可靠代码进步”的发布。 + +Linus 补充说Linux 4.1 可能是一个“大版本”。 + +### Linux内核4.0新功能 ### + +无需重启安装内核更新 + +你肯定曾今因为要重启你的Linux系统以完成内核更新而被打断工作,这并不是你一个人遇到的问题。这对于桌面操作系统来说是个小小的不方便,对于服务器来说却是大问题。 + +![内核更新无需重启](http://www.omgubuntu.co.uk/wp-content/uploads/2012/10/update.jpg) +内核更新无需重启 + +实时给Linux内核安装/使用安全补丁而不需要重启,多年来一直是Linux爱好者希望实现的事情。 + +一些第三方项目,例如[Oracle 的 KSplice][2]和红帽的Kpatch,力求为一些特定的发行版提供实时补丁的功能。 + +对于服务器,企业单位以及关键任务正常运行,实现实时内核补丁是一个相当大的问题。 + +好消息是Linux 4.0 使得重启系统以完成内核更新成为了过去。 + +或者,几乎。 + +在最新的发行版中,实现了支持免重启安装补丁的最初基础,随时为有经验的系统管理员利用Linux4.0的优势做好了准备。 + +桌面Linux发行版也应该能够利用这个功能的优势(但考虑到在最终用户端配置免重启功能会比较复杂而有一些路要走)。 + +在以后的4.x系列中,这个基础功能会持续完善和改进。我希望我们能更多听到它正是如此的信息。 + +#### 其它改进 #### + +尽管被认为是一次小版本的发布,最新的Linux内核还是带来了一系列的硬件改进,新的驱动以及性能调整。 +它们包括: + + +- 针对Intel ‘Skylake’ 平台的改进 +- 支持Intel Quark SoC +- 改善Linux在Playstation 3上运行的系列补丁 +- TOpen-source AMD Radeon驱动支持DisplayPort音频 +- 各种HID驱动调整,包括Lenovo紧凑型键盘,Wacom Cintiq 27QHD +- 东芝电源设置驱动器增加了USB睡眠/充电功能,快速充电,睡眠/音乐等 +- 文件系统调整,包括F2FS, BtrfFS等 + +### 在Ubuntu上安装Linux内核4.0 ### + +尽管被归为稳定版本,目前而言,**桌面用户和新用户没有必要去升级**。 + +通过从[Canonical的主线内核文档][3]抓取合适的安装包或者冒第三方PPA库的风险在Ubuntu 15.04测试版安装Linux4.0,急躁或者不娴熟可能会带来问题。 + +Ubuntu 15.04 Vivid Vervet 将在本月晚些时候发布并会附带Ubuntu内核 3.19(Ubuntu内核是由Linux内核以及一些上游还没有接受的特定Ubuntu补丁组成)。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features + +作者:[Joey-Elijah Sneddon][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://lkml.org/lkml/2015/4/12/178 +[2]:http://www.omgubuntu.co.uk/2009/10/how-to-install-kernel-updates-without-rebooting +[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D \ No newline at end of file From c20489f768df74453adcc035ad61775300ace9dd Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Tue, 14 Apr 2015 23:22:46 +0800 Subject: [PATCH 0537/2517] translated wi-cuckoo --- ...kills in Demand That Will Get You Hired.md | 141 ------------------ ...kills in Demand That Will Get You Hired.md | 138 +++++++++++++++++ 2 files changed, 138 insertions(+), 141 deletions(-) delete mode 100644 sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md create mode 100644 translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md diff --git a/sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md b/sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md deleted file mode 100644 index 379a74fd1c..0000000000 --- a/sources/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md +++ /dev/null @@ -1,141 +0,0 @@ -translating wi-cuckoo -10 Famous IT Skills in Demand That Will Get You Hired -================================================================================ -In continuation of our last article [[Top 10 Operating Systems in demand][1]] which was highly appreciated by the Tecmint community, we here in this article aims at throwing light on top IT skills that will help you land to your dream job. - -As mentioned in the first article these data and statistics are supposed to be change with the change in demand and market. We will try our best to update the list whenever there is any major changes. All the statistics are produced on the basis of close study of Job boards, postings and requirements by several IT companies across the globe. - -### 1. VMware ### - -The visualization and cloud computing software designed by Vmware Inc. tops the List. Vmware claims to commercially virtualize x86 architecture for the first time. VMware demand has increased upto 16% in the last quarter. - -Latest stable Release: 11.0 - -### 2. MySQL ### - -The open source Relational Database Management System falls second in the list. Until 2013 it was the second most widely used RDBMS. MySQL demand has increased upto 11% in the last quarter. The very famous MariaDB has been forked out of MySQL after Oracle Corp. Owned it. - -Latest Stable Release : 5.6.23 - -### 3. Apache ### - -The open source cross platform web (HTTP) server stands third in the list. Apache demand has increased to more than 13% in the last quarter. - -Latest Stable Release : 2.4.12 - -### 4. AWS ### - -Amazon web services is a collection of remote computing services offered by Amazon.com. Aws made to the list at number four. AWS demand has shown a growth of nearly 14% in the last quarter. - -### 5. Puppet ### - -The configuration Management System used in setting up IT Infrastructure comes at number five. It is written in Ruby and follows Client-server architecture. The demand of puppet has grown above 9% in the last quarter. - -Latest Stable Release : 3.7.3 - -### 6. Hadoop ### - -Hadoop is a open source software framework written in Java to process big data. It stands at position six in the list. The demand of Hadoop has gone upto 0.2% in the last quarter. - -Latest Stable Release : 2.6.0 - -### 7. Git ### - -The famous distributed control system written initially by Linus Torvalds made to the list at number seven. The demand of Git has gone above 7% in the last quarter. - -Latest Stable Release : 2.3.4 - -### 8. Oracle PL/SQL ### - -The procedural extension for SQL by Oracle corp. stands at position eight. PL/SQL is included in Oracle Database since Oracle 7. It has shown a decline of nearly 8% in the last quarter. - -### 9. Tomcat ### - -Open source web server and servlet container comes at position number nine. It has shown a growth in demand of nearly 15% in the last quarter. - -Latest Stable Release : 8.0.15 - -### 10. SAP ### - -The most famous Enterprise Resource Planning Software stands at position ten. The demand of SAP has shown a growth of nearly 3.5% in last quarter. - -注:表格数据,不需要翻译-开始 - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1. - VMware16% +
2. - MySQL11% +
3.Apache13% +
4. - Amazon web services (AWS)14% +
5. - Puppet9% +
6.Hadoop0.2% +
7.Git7% +
8.Oracle PL/SQL8% -
9.Tomcat15% +
10.SAP3.5% +
-注:表格数据,不需要翻译-结束 - -That’s all for now. I’ll be here with the next part of the series following. Till then stay tuned. Stay Connected. Stay Commenting. Don’t forget to provide us with your feedback. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/ diff --git a/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md b/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md new file mode 100644 index 0000000000..89afa0f6f4 --- /dev/null +++ b/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md @@ -0,0 +1,138 @@ +10 个正需的IT技能,会帮你职场成功 +=========================================================================== +接我们上次的文章[[十大有需的操作系统][1]],这篇文章得到了Tecmint社区很高的评价,在本篇中,我们将指点顶尖的IT技能,这会帮助你找到你理想的工作。 + +如第一篇文章提到的那样,这些资料和统计结果是会伴随市场和需求的变化而变化的。我们将会尽可能地更新列表,无论何时只要有任何主要的变化。所有的统计数据基于最近的,全球一些IT公司的招聘信息和需求。 + +### 1. VMware ### + +VMware公司设计的虚拟化和云计算软件高居榜首。VMware首次宣布商业支持x86架构的虚拟化。VMware的需求在上个季度已经增长自16%。 + +最新稳定发行版: 11.0 + +### 2. MySQL ### + +这款开源的关系型数据库管理系统屈尊第二。直到2013年,MySQL都还是第二大使用广泛的RDBMS(注:Relational Database Management System)。上季度MySQL的需求已经达到了11%。继甲骨文公司之后,著名的MarialDB也已经被分出MySQL了。去掌握它。 + +最新稳定发行版: 5.6.23 + +### 3. Apache ### + +这个跨平台的开源网页(HTTP)服务器占据了第三的位置。Apache的需求已经超过了13%截至上个季度。 + +最新稳定发行版: 2.4.12 + +### 4. AWS ### + +亚马逊网页服务器是亚马逊网站提供的所有远程计算服务的集合。AWS排在第四。上个季度,AWS的需求已经表现出将近14%的增长。 + +### 5. Puppet ### + +Puppet作为配置管理系统被应用在设置IT基础架构,列在第五。它用Ruby语言编写,属于客户端-服务器型的结构。上个季度puppet的需求已经增长超过9% + +最新稳定发行版: 3.7.3 + +### 6. Hadoop ### + +Hadoop是用Java写的一款开源软件框架,用于处理大数据。列表中Hadoop位列第六。对Hadoop的需求在上个季度已经下降了0.2个百分点。 + +最新稳定发行版: 2.6.0 + +### 7. Git ### + +Linux Torvalds最初编写的著名版本控制系统Git排在了第七。Git的需求在上个季度已经超过了7%。 + +最新稳定发行版: 2.3.4 + +### 8. Oracle PL/SQL ### + +Oracle公司开发的SQL扩展版,占据第八的位置。PL/SQL从Oracle 7后就包含在Oracle数据库中。它在上个季度已经出现将近8%的衰退。 + +### 9. Tomcat ### + +这个开源网页服务器和服务程序容器出现在了第九的位置。在上个季度,它已经表现出需求增长,将近15%。 + +最新稳定发行版: 8.0.15 + +### 10. SAP ### + +这款最著名的企业资源规划软件排在了第十。上个季度SAP在需求市场表现出将近3.5%的增长。 + + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1. + VMware16% +
2. + MySQL11% +
3.Apache13% +
4. + Amazon web services (AWS)14% +
5. + Puppet9% +
6.Hadoop0.2% +
7.Git7% +
8.Oracle PL/SQL8% -
9.Tomcat15% +
10.SAP3.5% +
+ +就这么多了。我会积极跟进这个系列的下个部分。保持发声,保持联系,保持评论。不要忘了给我们提供你的反馈。喜欢和分享我们,帮助我们传播开去。 + +--------------------------------------------------------------------------- + +via: http://www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/ + +作者:[Avishek Kumar][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/ From 1235b19b22cbb8dad6af37d6d8a84b577d3c54f9 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 15 Apr 2015 11:40:40 +0800 Subject: [PATCH 0538/2517] =?UTF-8?q?20150415-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ion HPKP for Apache, NGINX and Lighttpd.md | 158 ++++++++++ .../20150415 Strong SSL Security on nginx.md | 290 ++++++++++++++++++ 2 files changed, 448 insertions(+) create mode 100644 sources/tech/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md create mode 100644 sources/tech/20150415 Strong SSL Security on nginx.md diff --git a/sources/tech/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md b/sources/tech/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md new file mode 100644 index 0000000000..e794f187d7 --- /dev/null +++ b/sources/tech/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md @@ -0,0 +1,158 @@ +HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd +================================================================================ +Public Key Pinning means that a certificate chain must include a whitelisted public key. It ensures only whitelisted Certificate Authorities (CA) can sign certificates for `*.example.com`, and not any CA in your browser store. This article has background theory and configuration examples for Apache, Lighttpd and NGINX. + +### HTTP Public Key Pinning Extension ### + +An example might be your bank, which always have their certificate from CA Company A. With the current certificate system, CA Company B, CA Company C and the NSA CA can all create a certificate for your bank, which your browser will hapily accept because those companies are also trusted root CA's. + +If the bank implements HPKP and pin's their first intermidiate certificate (from CA Company A), browsers will not accept certificates from CA Company B and CA Company C, even if they have a valid trust path. HPKP also allows your browser to report back the failure to the bank, so that they know they are under attack. + +Public Key Pinning Extension for HTTP (HPKP) is a standard for public key pinning for HTTP user agents that's been in development since 2011. It was started by Google, which, even though it had implemented pinning in Chrome, understood that manually maintaining a list of pinned sites can't scale. + +Here is a quick feature overview of HPKP: + +- HPKP is set at the HTTP level, using the `Public-Key-Pins` response header. +- The policy retention period is set with the max-age parameter, it specifies duration in seconds. +- The PKP header can only be used over an error-free secure encryption. +- If multiple headers are seen, only the first one is processed. +- Pinning can be extended to subdomains with the `includeSubDomains` parameter. +- When a new PKP header is received, it overwrites previously stored pins and metadata. +- A pin consists out of the hashing algorithm and an "Subject Public Key Info" fingerprint. + +This article first has some theory about the workings of HPKP, down below you'll find the part which shows you how to get the required fingerprints and has web server configuration. + +### SPKI Fingerprint - Theory ### + +As explained by Adam Langley in [his post][1], we hash a public key, not a certificate: + +> In general, hashing certificates is the obvious solution, but the wrong one. The problem is that CA certificates are often reissued: there are multiple certificates with the same public key, subject name etc but different extensions or expiry dates. Browsers build certificates chains from a pool of certificates, bottom up, and an alternative version of a certificate might be substituted for the one that you expect. +> +> For example, StartSSL has two root certificates: one signed with SHA1 and the other with SHA256. If you wished to pin to StartSSL as your CA, which certificate hash would you use? You would have to use both, but how would you know about the other root if I hadn't just told you? +> +> Conversely, public key hashes must be correct: +> +> Browsers assume that the leaf certificate is fixed: it's always the starting point of the chain. The leaf certificate contains a signature which must be a valid signature, from its parent, for that certificate. That implies that the public key of the parent is fixed by the leaf certificate. So, inductively, the chain of public keys is fixed, modulo truncation. +> +> The only sharp edge is that you mustn't pin to a cross-certifying root. For example, GoDaddy's root is signed by Valicert so that older clients, which don't recognise GoDaddy as a root, still trust those certificates. However, you wouldn't want to pin to Valicert because newer clients will stop their chain at GoDaddy. +> +> Also, we're hashing the SubjectPublicKeyInfo not the public key bit string. The SPKI includes the type of the public key and some parameters along with the public key itself. This is important because just hashing the public key leaves one open to misinterpretation attacks. Consider a Diffie-Hellman public key: if one only hashes the public key, not the full SPKI, then an attacker can use the same public key but make the client interpret it in a different group. Likewise one could force an RSA key to be interpreted as a DSA key etc. + +### Where to Pin ### + +Where should you pin? Pinning your own public key is not the best idea. The key might change or get compromised. You might have multiple certificates in use. The key might change because you rotate your certificates every so often. It might key compromised because the web server was hacked. + +The easiest, but not most secure place to pin is the first intermediate CA certificate. The signature of that certificate is on your websites certificate so the issuing CA's public key must always be in the chain. + +This way you can renew your end certificate from the same CA and have no pinning issues. If the CA issues a different root, then you have a problem, there is no clear solution for this yet. There is one thing you can do to mitigate this: + +- Always have a backup pin and a spare certificate from a different CA. + +The RFC states that you need to provide at least two pins. One of the pins must be present in the chain used in the connection over which the pins were received, the other pin must not be present. + +This other pin is your backup public key. It can also be the SPKI fingerprint of a different CA where you have a certificate issued. + +An alternative and **more secure** take on this issue is to create at least three seperate public keys beforehand (using OpenSSL, see [this page][2] for a Javascript OpenSSL command generator) and to keep two of those keys as a backup in a safe place, offline and off-site. + +You create the SPKI hashes for the three certificates and pin those. You only use the first key as the active certificate. When it is needed, you can then use one of the alternative keys. You do however need to let that certificate sign by a CA to create a certificate pair and that process can take a few days depending on the certificate. + +This is not a problem for the HPKP because we take the SPKI hash of the public key, and not of the certificate. Expiration or a different chain of CA signer do not matter in this case. + +If you have the means and procedures to create and securely save at least three seperate keys as described above and pin those, it would also protect you from your CA provider getting compromised and giving out a fake certificate for your specific website. + +### SPKI Fingerprint ### + +To get the SPKI fingerprint from a certificate we can use the following OpenSSL command, as shown in [the RFC draft][3]: + + openssl x509 -noout -in certificate.pem -pubkey | \ + openssl asn1parse -noout -inform pem -out public.key; + openssl dgst -sha256 -binary public.key | openssl enc -base64 + +Result: + + klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY= + +The input `certificate.pem` file is the first certificate in the chain for this website. (At the time of writing, `COMODO RSA Domain Validation Secure Server CA, Serial 2B:2E:6E:EA:D9:75:36:6C:14:8A:6E:DB:A3:7C:8C:07.`) + +You need to also do this with your backup public key, ending up with two fingerprints. + +### Bugs ### + +At the time of writing this article (2015-Jan) the only browser supporting HPKP (Chrome) has a serious issue where Chrome doesn't treat the max-age and includeSubdomains directives from HSTS and HPKP headers as mutually exclusive. This means that if you have HSTS and HPKP with different policiesfor max-age or includeSubdomains they will be interchanged. See this bug for more info: [https://code.google.com/p/chromium/issues/detail?id=444511][4]. Thanks to Scott Helme from [https://scotthelme.co.uk][5] for finding and notifying me and the Chromium project about it. + +### Webserver configuration ### + +Below you'll find configuration instructions for the three most populair web servers. Since this is just a HTTP header, almost all web servers will allow you to set this. It needs to be set for the HTTPS website. + +The example below pins the `COMODO RSA Domain Validation Secure Server CA` and the `Comodo PositiveSSL` CA 2 as a backup, with a 30 day expire time including all subdomains. + +#### Apache #### + +Edit your apache configuration file (`/etc/apache2/sites-enabled/website.conf or /etc/apache2/httpd.conf` for example) and add the following to your VirtualHost: + + # Optionally load the headers module: + LoadModule headers_module modules/mod_headers.so + + Header set Public-Key-Pins "pin-sha256=\"klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=\"; pin-sha256=\"633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q=\"; max-age=2592000; includeSubDomains" + +#### Lighttpd #### + +The lighttpd variant is just as simple. Add it to your Lighttpd configuration file (`/etc/lighttpd/lighttpd.conf` for example): + + server.modules += ( "mod_setenv" ) + $HTTP["scheme"] == "https" { + setenv.add-response-header = ( "Public-Key-Pins" => "pin-sha256=\"klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=\"; pin-sha256=\"633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q=\"; max-age=2592000; includeSubDomains") + } + +#### NGINX #### + +NGINX is even shorter with its config. Add this in the server block for your HTTPS configuration: + + add_header Public-Key-Pins 'pin-sha256="klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY="; pin-sha256="633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q="; max-age=2592000; includeSubDomains'; + +### Reporting ### + +HPKP reporting allows the user-agent to report any failures back to you. + +If you add an aditional `report-uri="http://example.org/hpkp-report`" parameter to the header and set up a listener there, clients will send reports if they encounter a failure. A report is sent as a POST request to the report-uri with a JSON body like this: + + { + "date-time": "2014-12-26T11:52:10Z", + "hostname": "www.example.org", + "port": 443, + "effective-expiration-date": "2014-12-31T12:59:59", + "include-subdomains": true, + "served-certificate-chain": [ + "-----BEGINCERTIFICATE-----\nMIIAuyg[...]tqU0CkVDNx\n-----ENDCERTIFICATE-----" + ], + "validated-certificate-chain": [ + "-----BEGINCERTIFICATE-----\nEBDCCygAwIBA[...]PX4WecNx\n-----ENDCERTIFICATE-----" + ], + "known-pins": [ + "pin-sha256=\"dUezRu9zOECb901Md727xWltNsj0e6qzGk\"", + "pin-sha256=\"E9CqVKB9+xZ9INDbd+2eRQozqbQ2yXLYc\"" + ] + } + +### No Enforcment, report only ### + +HPKP can be set up without enforcement, in reporting mode by using the `Public-Key-Pins-Report-Only` response header. + +This approach allows you to set up pinning without your site being unreachable or HPKP being configured incorrectly. You can later move to enforcement by changing the header back to `Public-Key-Pins`. + +-------------------------------------------------------------------------------- + +via: https://raymii.org/s/articles/HTTP_Public_Key_Pinning_Extension_HPKP.html + +作者:[Remy van Elst][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://raymii.org/ +[1]:http://www.imperialviolet.org/2011/05/04/pinning.html +[2]:https://raymii.org/s/software/OpenSSL_Command_Generator.html +[3]:https://tools.ietf.org/html/draft-ietf-websec-key-pinning-21#appendix-A +[4]:https://code.google.com/p/chromium/issues/detail?id=444511 +[5]:https://scotthelme.co.uk/ \ No newline at end of file diff --git a/sources/tech/20150415 Strong SSL Security on nginx.md b/sources/tech/20150415 Strong SSL Security on nginx.md new file mode 100644 index 0000000000..82b12820ed --- /dev/null +++ b/sources/tech/20150415 Strong SSL Security on nginx.md @@ -0,0 +1,290 @@ +Strong SSL Security on nginx +================================================================================ +[![](https://raymii.org/s/inc/img/ssl-labs-a.png)][1] + +This tutorial shows you how to set up strong SSL security on the nginx webserver. We do this by disabling SSL Compression to mitigate the CRIME attack, disable SSLv3 and below because of vulnerabilities in the protocol and we will set up a strong ciphersuite that enables Forward Secrecy when possible. We also enable HSTS and HPKP. This way we have a strong and future proof ssl configuration and we get an A on the Qually Labs SSL Test. + +TL;DR: [Copy-pastable strong cipherssuites for NGINX, Apache and Lighttpd: https://cipherli.st][2] + +This tutorial is tested on a Digital Ocean VPS. If you like this tutorial and want to support my website, use this link to order a Digital Ocean VPS: [https://www.digitalocean.com/?refcode=7435ae6b8212][2] + +This tutorial works with the stricter requirements of the SSL Labs test [announced on the 21st of January 2014][4] (It already did before that, if you follow(ed) it you get an A+) + +- [This tutorial is also available for Apache][5] +- [This tutorial is also available for Lighttpd][6] +- [This tutorial is also available for FreeBSD, NetBSD and OpenBSD over at the BSD Now podcast][7]: [http://www.bsdnow.tv/tutorials/nginx][8] + +You can find more info on the topics by following the links below: + +- [BEAST Attack][9] +- [CRIME Attack][10] +- [FREAK Attack][11] +- [Heartbleed][12] +- [Perfect Forward Secrecy][13] +- [Dealing with RC4 and BEAST][14] + +We are going to edit the nginx settings in the file `/etc/nginx/sited-enabled/yoursite.com` (On Ubuntu/Debian) or in `/etc/nginx/conf.d/nginx.conf` (On RHEL/CentOS). + +For the entire tutorial, you need to edit the parts between the `server` block for the server config for port 443 (ssl config). At the end of the tutorial you can find the complete config example. + +*Make sure you back up the files before editing them!* + +### The BEAST attack and RC4 ### + +In short, by tampering with an encryption algorithm's CBC - cipher block chaining - mode's, portions of the encrypted traffic can be secretly decrypted. More info on the above link. + +Recent browser versions have enabled client side mitigation for the beast attack. The recommendation was to disable all TLS 1.0 ciphers and only offer RC4. However, [RC4 has a growing list of attacks against it],(http://www.isg.rhul.ac.uk/tls/) many of which have crossed the line from theoretical to practical. Moreover, there is reason to believe that the NSA has broken RC4, their so-called "big breakthrough." + +Disabling RC4 has several ramifications. One, users with shitty browsers such as Internet Explorer on Windows XP will use 3DES in lieu. Triple-DES is more secure than RC4, but it is significantly more expensive. Your server will pay the cost for these users. Two, RC4 mitigates BEAST. Thus, disabling RC4 makes TLS 1.0 users susceptible to that attack, by moving them to AES-CBC (the usual server-side BEAST "fix" is to prioritize RC4 above all else). I am confident that the flaws in RC4 significantly outweigh the risks from BEAST. Indeed, with client-side mitigation (which Chrome and Firefox both provide), BEAST is a nonissue. But the risk from RC4 only grows: More cryptanalysis will surface over time. + +### Factoring RSA-EXPORT Keys (FREAK) ### + +FREAK is a man-in-the-middle (MITM) vulnerability discovered by a group of cryptographers at [INRIA, Microsoft Research and IMDEA][15]. FREAK stands for "Factoring RSA-EXPORT Keys." + +The vulnerability dates back to the 1990s, when the US government banned selling crypto software overseas, unless it used export cipher suites which involved encryption keys no longer than 512-bits. + +It turns out that some modern TLS clients - including Apple's SecureTransport and OpenSSL - have a bug in them. This bug causes them to accept RSA export-grade keys even when the client didn't ask for export-grade RSA. The impact of this bug can be quite nasty: it admits a 'man in the middle' attack whereby an active attacker can force down the quality of a connection, provided that the client is vulnerable and the server supports export RSA. + +There are two parts of the attack as the server must also accept "export grade RSA." + +The MITM attack works as follows: + +- In the client's Hello message, it asks for a standard 'RSA' ciphersuite. +- The MITM attacker changes this message to ask for 'export RSA'. +- The server responds with a 512-bit export RSA key, signed with its long-term key. +- The client accepts this weak key due to the OpenSSL/SecureTransport bug. +- The attacker factors the RSA modulus to recover the corresponding RSA decryption key. +- When the client encrypts the 'pre-master secret' to the server, the attacker can now decrypt it to recover the TLS 'master secret'. +- From here on out, the attacker sees plaintext and can inject anything it wants. + +The ciphersuite offered here on this page does not enable EXPORT grade ciphers. Make sure your OpenSSL is updated to the latest available version and urge your clients to also use upgraded software. + +### Heartbleed ### + +Heartbleed is a security bug disclosed in April 2014 in the OpenSSL cryptography library, which is a widely used implementation of the Transport Layer Security (TLS) protocol. Heartbleed may be exploited regardless of whether the party using a vulnerable OpenSSL instance for TLS is a server or a client. It results from improper input validation (due to a missing bounds check) in the implementation of the DTLS heartbeat extension (RFC6520), thus the bug's name derives from "heartbeat". The vulnerability is classified as a buffer over-read, a situation where more data can be read than should be allowed. + +What versions of the OpenSSL are affected by Heartbleed? + +Status of different versions: + +- OpenSSL 1.0.1 through 1.0.1f (inclusive) are vulnerable +- OpenSSL 1.0.1g is NOT vulnerable +- OpenSSL 1.0.0 branch is NOT vulnerable +- OpenSSL 0.9.8 branch is NOT vulnerable + +The bug was introduced to OpenSSL in December 2011 and has been out in the wild since OpenSSL release 1.0.1 on 14th of March 2012. OpenSSL 1.0.1g released on 7th of April 2014 fixes the bug. + +By updating OpenSSL you are not vulnerable to this bug. + +### SSL Compression (CRIME attack) ### + +The CRIME attack uses SSL Compression to do its magic. SSL compression is turned off by default in nginx 1.1.6+/1.0.9+ (if OpenSSL 1.0.0+ used) and nginx 1.3.2+/1.2.2+ (if older versions of OpenSSL are used). + +If you are using al earlier version of nginx or OpenSSL and your distro has not backported this option then you need to recompile OpenSSL without ZLIB support. This will disable the use of OpenSSL using the DEFLATE compression method. If you do this then you can still use regular HTML DEFLATE compression. + +### SSLv2 and SSLv3 ### + +SSL v2 is insecure, so we need to disable it. We also disable SSLv3, as TLS 1.0 suffers a downgrade attack, allowing an attacker to force a connection to use SSLv3 and therefore disable forward secrecy. + +Again edit the config file: + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + +### Poodle and TLS-FALLBACK-SCSV ### + +SSLv3 allows exploiting of the [POODLE][16] bug. This is one more major reason to disable this. + +Google have proposed an extension to SSL/TLS named [TLSFALLBACKSCSV][17] that seeks to prevent forced SSL downgrades. This is automatically enabled if you upgrade OpenSSL to the following versions: + +- OpenSSL 1.0.1 has TLSFALLBACKSCSV in 1.0.1j and higher. +- OpenSSL 1.0.0 has TLSFALLBACKSCSV in 1.0.0o and higher. +- OpenSSL 0.9.8 has TLSFALLBACKSCSV in 0.9.8zc and higher. + +[More info on the NGINX documentation][18] + +### The Cipher Suite ### + +Forward Secrecy ensures the integrity of a session key in the event that a long-term key is compromised. PFS accomplishes this by enforcing the derivation of a new key for each and every session. + +This means that when the private key gets compromised it cannot be used to decrypt recorded SSL traffic. + +The cipher suites that provide Perfect Forward Secrecy are those that use an ephemeral form of the Diffie-Hellman key exchange. Their disadvantage is their overhead, which can be improved by using the elliptic curve variants. + +The following two ciphersuites are recommended by me, and the latter by [the Mozilla Foundation][19]. + +The recommended cipher suite: + + ssl_ciphers 'AES128+EECDH:AES128+EDH'; + +The recommended cipher suite for backwards compatibility (IE6/WinXP): + + ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + +If your version of OpenSSL is old, unavailable ciphers will be discarded automatically. Always use the full ciphersuite above and let OpenSSL pick the ones it supports. + +The ordering of a ciphersuite is very important because it decides which algorithms are going to be selected in priority. The recommendation above prioritizes algorithms that provide perfect forward secrecy. + +Older versions of OpenSSL may not return the full list of algorithms. AES-GCM and some ECDHE are fairly recent, and not present on most versions of OpenSSL shipped with Ubuntu or RHEL. + +#### Prioritization logic #### + +- ECDHE+AESGCM ciphers are selected first. These are TLS 1.2 ciphers and not widely supported at the moment. No known attack currently target these ciphers. +- PFS ciphersuites are preferred, with ECDHE first, then DHE. +- AES 128 is preferred to AES 256. There has been [discussions][20] on whether AES256 extra security was worth the cost, and the result is far from obvious. At the moment, AES128 is preferred, because it provides good security, is really fast, and seems to be more resistant to timing attacks. +- In the backward compatible ciphersuite, AES is preferred to 3DES. BEAST attacks on AES are mitigated in TLS 1.1 and above, and difficult to achieve in TLS 1.0. In the non-backward compatible ciphersuite, 3DES is not present. +- RC4 is removed entirely. 3DES is used for backward compatibility. See discussion in [#RC4_weaknesses][21] + +#### Mandatory discards #### + +- aNULL contains non-authenticated Diffie-Hellman key exchanges, that are subject to Man-In-The-Middle (MITM) attacks +- eNULL contains null-encryption ciphers (cleartext) +- EXPORT are legacy weak ciphers that were marked as exportable by US law +- RC4 contains ciphers that use the deprecated ARCFOUR algorithm +- DES contains ciphers that use the deprecated Data Encryption Standard +- SSLv2 contains all ciphers that were defined in the old version of the SSL standard, now deprecated +- MD5 contains all the ciphers that use the deprecated message digest 5 as the hashing algorithm + +### Extra settings ### + +Make sure you also add these lines: + + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + +When choosing a cipher during an SSLv3 or TLSv1 handshake, normally the client's preference is used. If this directive is enabled, the server's preference will be used instead. + +- [More info on sslpreferserver_ciphers][22] +- [More info on ssl_ciphers][23] + +### Forward Secrecy & Diffie Hellman Ephemeral Parameters ### + +The concept of forward secrecy is simple: client and server negotiate a key that never hits the wire, and is destroyed at the end of the session. The RSA private from the server is used to sign a Diffie-Hellman key exchange between the client and the server. The pre-master key obtained from the Diffie-Hellman handshake is then used for encryption. Since the pre-master key is specific to a connection between a client and a server, and used only for a limited amount of time, it is called Ephemeral. + +With Forward Secrecy, if an attacker gets a hold of the server's private key, it will not be able to decrypt past communications. The private key is only used to sign the DH handshake, which does not reveal the pre-master key. Diffie-Hellman ensures that the pre-master keys never leave the client and the server, and cannot be intercepted by a MITM. + +All versions of nginx as of 1.4.4 rely on OpenSSL for input parameters to Diffie-Hellman (DH). Unfortunately, this means that Ephemeral Diffie-Hellman (DHE) will use OpenSSL's defaults, which include a 1024-bit key for the key-exchange. Since we're using a 2048-bit certificate, DHE clients will use a weaker key-exchange than non-ephemeral DH clients. + +We need generate a stronger DHE parameter: + + cd /etc/ssl/certs + openssl dhparam -out dhparam.pem 4096 + +And then tell nginx to use it for DHE key-exchange: + + ssl_dhparam /etc/ssl/certs/dhparam.pem; + +### OCSP Stapling ### + +When connecting to a server, clients should verify the validity of the server certificate using either a Certificate Revocation List (CRL), or an Online Certificate Status Protocol (OCSP) record. The problem with CRL is that the lists have grown huge and takes forever to download. + +OCSP is much more lightweight, as only one record is retrieved at a time. But the side effect is that OCSP requests must be made to a 3rd party OCSP responder when connecting to a server, which adds latency and potential failures. In fact, the OCSP responders operated by CAs are often so unreliable that browser will fail silently if no response is received in a timely manner. This reduces security, by allowing an attacker to DoS an OCSP responder to disable the validation. + +The solution is to allow the server to send its cached OCSP record during the TLS handshake, therefore bypassing the OCSP responder. This mechanism saves a roundtrip between the client and the OCSP responder, and is called OCSP Stapling. + +The server will send a cached OCSP response only if the client requests it, by announcing support for the status_request TLS extension in its CLIENT HELLO. + +Most servers will cache OCSP response for up to 48 hours. At regular intervals, the server will connect to the OCSP responder of the CA to retrieve a fresh OCSP record. The location of the OCSP responder is taken from the Authority Information Access field of the signed certificate. + +- [View my tutorial on enabling OCSP stapling on NGINX][24] + +### HTTP Strict Transport Security ### + +When possible, you should enable [HTTP Strict Transport Security (HSTS)][25], which instructs browsers to communicate with your site only over HTTPS. + +- [View my article on HTST to see how to configure it.][26] + +### HTTP Public Key Pinning Extension ### + +You should also enable the [HTTP Public Key Pinning Extension][27]. + +Public Key Pinning means that a certificate chain must include a whitelisted public key. It ensures only whitelisted Certificate Authorities (CA) can sign certificates for `*.example.com`, and not any CA in your browser store. + +I've written an article about it that has background theory and configuration examples for Apache, Lighttpd and NGINX: [https://raymii.org/s/articles/HTTPPublicKeyPinningExtension_HPKP.html][28] + +### Config Example ### + + server { + + listen [::]:443 default_server; + + ssl on; + ssl_certificate_key /etc/ssl/cert/raymii_org.pem; + ssl_certificate /etc/ssl/cert/ca-bundle.pem; + + ssl_ciphers 'AES128+EECDH:AES128+EDH:!aNULL'; + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_session_cache shared:SSL:10m; + + ssl_stapling on; + ssl_stapling_verify on; + resolver 8.8.4.4 8.8.8.8 valid=300s; + resolver_timeout 10s; + + ssl_prefer_server_ciphers on; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + add_header Strict-Transport-Security max-age=63072000; + add_header X-Frame-Options DENY; + add_header X-Content-Type-Options nosniff; + + root /var/www/; + index index.html index.htm; + server_name raymii.org; + + } + +### Conclusion ### + +If you have applied the above config lines you need to restart nginx: + + # Check the config first: + /etc/init.d/nginx configtest + # Then restart: + /etc/init.d/nginx restart + +Now use the [SSL Labs test][29] to see if you get a nice A. And, of course, have a safe, strong and future proof SSL configuration! + +- [Also read the Mozilla page on the subject][30] + +-------------------------------------------------------------------------------- + +via: https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html + +作者:[Remy van Elst][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://raymii.org/ +[1]:https://www.ssllabs.com/ssltest/analyze.html?d=raymii.org +[2]:https://cipherli.st/ +[3]:https://www.digitalocean.com/?refcode=7435ae6b8212 +[4]:http://blog.ivanristic.com/2014/01/ssl-labs-stricter-security-requirements-for-2014.html +[5]:https://raymii.org/s/tutorials/Strong_SSL_Security_On_Apache2.html +[6]:https://raymii.org/s/tutorials/Pass_the_SSL_Labs_Test_on_Lighttpd_%28Mitigate_the_CRIME_and_BEAST_attack_-_Disable_SSLv2_-_Enable_PFS%29.html +[7]:http://www.bsdnow.tv/episodes/2014_08_20-engineering_nginx +[8]:http://www.bsdnow.tv/tutorials/nginx +[9]:https://en.wikipedia.org/wiki/Transport_Layer_Security#BEAST_attack +[10]:https://en.wikipedia.org/wiki/CRIME_%28security_exploit%29 +[11]:http://blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html +[12]:http://heartbleed.com/ +[13]:https://en.wikipedia.org/wiki/Perfect_forward_secrecy +[14]:https://en.wikipedia.org/wiki/Transport_Layer_Security#Dealing_with_RC4_and_BEAST +[15]:https://www.smacktls.com/ +[16]:https://raymii.org/s/articles/Check_servers_for_the_Poodle_bug.html +[17]:https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00 +[18]:http://wiki.nginx.org/HttpSslModule#ssl_protocols +[19]:https://wiki.mozilla.org/Security/Server_Side_TLS +[20]:http://www.mail-archive.com/dev-tech-crypto@lists.mozilla.org/msg11247.html +[21]:https://wiki.mozilla.org/Security/Server_Side_TLS#RC4_weaknesses +[22]:http://wiki.nginx.org/HttpSslModule#ssl_prefer_server_ciphers +[23]:http://wiki.nginx.org/HttpSslModule#ssl_ciphers +[24]:https://raymii.org/s/tutorials/OCSP_Stapling_on_nginx.html +[25]:https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security +[26]:https://raymii.org/s/tutorials/HTTP_Strict_Transport_Security_for_Apache_NGINX_and_Lighttpd.html +[27]:https://wiki.mozilla.org/SecurityEngineering/Public_Key_Pinning +[28]:https://raymii.org/s/articles/HTTP_Public_Key_Pinning_Extension_HPKP.html +[29]:https://www.ssllabs.com/ssltest/ +[30]:https://wiki.mozilla.org/Security/Server_Side_TLS \ No newline at end of file From cdfda61b89fa58fa97226d4d733bbe6a14dcc017 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Wed, 15 Apr 2015 13:04:50 +0800 Subject: [PATCH 0539/2517] translating wi-cuckoo --- ...nux Kernel 4.0 Features Live Kernel Patching PS3 Support.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md b/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md index 1d9fae2c33..b16059fbca 100644 --- a/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md +++ b/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md @@ -1,3 +1,4 @@ +translating wi-cuckoo Linux Kernel 4.0 Features Live Kernel Patching, PS3 Support ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/10/tuxtuxtux.jpeg) @@ -71,4 +72,4 @@ via: http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:https://lkml.org/lkml/2015/4/12/178 [2]:http://www.omgubuntu.co.uk/2009/10/how-to-install-kernel-updates-without-rebooting -[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D \ No newline at end of file +[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D From 881d744e931e7ed892eecead8b96e618b365a967 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Wed, 15 Apr 2015 13:33:13 +0800 Subject: [PATCH 0540/2517] canceled change --- ...inux Kernel 4.0 Features Live Kernel Patching PS3 Support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md b/translated/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md index 8b21f05978..34adecfb99 100644 --- a/translated/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md +++ b/translated/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md @@ -72,4 +72,4 @@ via: http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:https://lkml.org/lkml/2015/4/12/178 [2]:http://www.omgubuntu.co.uk/2009/10/how-to-install-kernel-updates-without-rebooting -[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D \ No newline at end of file +[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D From 4675bda591259767b1db838838b4c4d3344961c6 Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Wed, 15 Apr 2015 13:42:26 +0800 Subject: [PATCH 0541/2517] recovery wi-cuckoo --- ...Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md b/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md index b16059fbca..859131d9bb 100644 --- a/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md +++ b/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md @@ -1,4 +1,3 @@ -translating wi-cuckoo Linux Kernel 4.0 Features Live Kernel Patching, PS3 Support ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/10/tuxtuxtux.jpeg) From 5003c9471eaaffa924d9c9ba188f59fa6924048c Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 15 Apr 2015 13:44:50 +0800 Subject: [PATCH 0542/2517] Translating by ZTinoZ --- ...25 Linux FAQs with Answers--How to disable IPv6 on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md index c6f0cde895..2c783bf5c0 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ Linux FAQs with Answers--How to disable IPv6 on Linux ================================================================================ > **Question**: I notice that one of my applications is trying to establish a connection over IPv6. But since our local network is not able to route IPv6 traffic, the IPv6 connection times out, and the application falls back to IPv4, which causes unnecessary delay. As I don't have any need for IPv6 at the moment, I would like to disable IPv6 on my Linux box. What is a proper way to turn off IPv6 on Linux? @@ -145,4 +146,4 @@ via: http://ask.xmodulo.com/disable-ipv6-linux.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni -[1]:http://www.google.com/intl/en/ipv6/statistics.html \ No newline at end of file +[1]:http://www.google.com/intl/en/ipv6/statistics.html From f31741396060d9afe44f9b18b93b9c154f5212d7 Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Wed, 15 Apr 2015 13:46:00 +0800 Subject: [PATCH 0543/2517] deleted wi-cuckoo --- ...atures Live Kernel Patching PS3 Support.md | 74 ------------------- 1 file changed, 74 deletions(-) delete mode 100644 sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md diff --git a/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md b/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md deleted file mode 100644 index 859131d9bb..0000000000 --- a/sources/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md +++ /dev/null @@ -1,74 +0,0 @@ -Linux Kernel 4.0 Features Live Kernel Patching, PS3 Support -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/10/tuxtuxtux.jpeg) - -**A new stable release of the Linux Kernel [has been announced][1] by Linus Torvalds on the Linux kernel mailing list. ** - -Linux 4.0, codenamed ‘Hurr durr I’m a sheep’ — no, really — brings with it a small set of new hardware support, driver improvements, performance tweaks, bug fixes and the like. - -But remarking on the minor-ness of the update, Torvalds’ writes; - -> “Feature-wise, 4.0 doesn’t have all that much special. Much have been made of the new kernel patching infrastructure, but realistically […] we’ve had much bigger changes in other versions. So this is very much a “solid code progress” release.” - -Linus adds that Linux 4.1 is likely to be a ‘bigger release’. - -### New Linux Kernel 4.0 Features ### - -Install Kernel Updates Without Rebooting - -If you’ve ever been put out by the need to reboot your Linux box to finish installing a kernel update you won’t be alone. It’s a minor inconvenience on the desktop, and a major one for servers. - -![Reboot-free Kernel Updates](http://www.omgubuntu.co.uk/wp-content/uploads/2012/10/update.jpg) -Reboot-free Kernel Updates - -The ability to install/apply security patches to the Linux kernel “live”, without the need to reboot, has been a long-held want of many Linux enthusiasts for years. - -A slew of third-party projects, like [Oracle’s KSplice][2] and Red Hat’s Kpatch, have sought to offer live patching functionality for certain distributions. - -For servers, enterprise and mission-critical use cases where uptime is priority live kernel patching is a pretty big deal. - -The good news is that Linux 4.0 makes having to reboot to complete a kernel update a thing of the past. - -Well, almost. - -The initial groundwork to support reboot-free patching arrives in this latest release, ready for experienced sysadmins to take advantage of in Linux 4.0. - -Desktop Linux distributions should also be able to take advantage of the feature too (though given the complexity involved in configuring the reboot-less functionality on the end-user side it may be a little way off). - -This infrastructure will continue to be refined and improved on over the course of the 4.x series. As it does so I expect we’ll all start to hear more about it. - -#### Other Changes #### - -Although it is considered a small release the latest Linux kernel manages to squeeze in a welcome set of hardware improvements, new drivers and performance tweaks. These include: - - -- Improvements to Intel ‘Skylake’ platform -- Intel Quark SoC support -- Various patches to improve Linux running on a Playstation 3 -- TOpen-source AMD Radeon driver supports DisplayPort Audio -- Various misc HID driver tweaks, including Lenovo compact keyboards, Wacom Cintiq 27QHD -- Toshiba power settings driver adds USB sleep/charge functionality, rapid charge, sleep w/ music, etc -- File System tweaks, including F2FS, BtrfFS, etc - -### Install Linux Kernel 4.0 on Ubuntu ### - -Although classed as stable there is, at present, **no need for desktop users or new-comers to go upgrade**. - -The impatient and adept can take a crack at installing Linux 4.0 in Ubuntu 15.04 Beta by grabbing the appropriate set of packages from [Canonical’s mainline kernel archive][3] or by risking a third-party PPA hosted on Launchpad. - -Ubuntu 15.04 Vivid Vervet is due later this month and will ship with Ubuntu Kernel 3.19 (the Ubuntu kernel is the Linux Kernel plus Ubuntu-specific patches that have not been accepted upstream). - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://lkml.org/lkml/2015/4/12/178 -[2]:http://www.omgubuntu.co.uk/2009/10/how-to-install-kernel-updates-without-rebooting -[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D From c756c93c0c7e61c5bf55c4e65e0f821012ccfa40 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 15 Apr 2015 14:07:08 +0800 Subject: [PATCH 0544/2517] PUB:20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support @ictlyh --- ...atures Live Kernel Patching PS3 Support.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename {translated/news => published}/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md (56%) diff --git a/translated/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md b/published/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md similarity index 56% rename from translated/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md rename to published/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md index 34adecfb99..d62af19480 100644 --- a/translated/news/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md +++ b/published/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md @@ -1,48 +1,48 @@ -Linux内核4.0功能 实时内核补丁,支持PS3 +Linux内核4.0功能:实时内核补丁,支持PS3 ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/10/tuxtuxtux.jpeg) **Linux Torvalds 在Linux内核邮件列表里[发布][1]了Linux内核新的稳定版。** -Linux 4.0,代号为‘Hurr durr I’m a sheep’ - 不,真的 - 带来了一小系列新的硬件支持,驱动改进,性能调整,错误修复等。 +Linux 4.0,代号为‘Hurr durr I’m a sheep’,带来了一小系列新硬件支持,驱动改进,性能调整,错误修复等。 -但对于微小更新的标注,Torvalds 写到: +但是其实没有太多的更新的必要,Torvalds 写到: ->功能方面,4.0 并没有那么多特别的。虽然在内核补丁设施上做了很多工作,但事实上[...] 我们在其它版本中有更大的改变。所以这仅仅是一次“可靠代码进步”的发布。 +> 功能方面,4.0 并没有那么多特别的。虽然在内核补丁设施上做了很多工作,但事实上[...] 我们在其它版本中有更大的改变。所以这仅仅是一次“按部就班”的发布。 Linus 补充说Linux 4.1 可能是一个“大版本”。 ### Linux内核4.0新功能 ### -无需重启安装内核更新 +**无需重启安装内核更新** -你肯定曾今因为要重启你的Linux系统以完成内核更新而被打断工作,这并不是你一个人遇到的问题。这对于桌面操作系统来说是个小小的不方便,对于服务器来说却是大问题。 +你肯定遇到过内核更新需要重启你的Linux系统而被打断工作,这并不是你一个人遇到的问题。这对于桌面操作系统来说是个小小的不便,对于服务器来说却是大问题。 ![内核更新无需重启](http://www.omgubuntu.co.uk/wp-content/uploads/2012/10/update.jpg) -内核更新无需重启 + +*内核更新无需重启* 实时给Linux内核安装/使用安全补丁而不需要重启,多年来一直是Linux爱好者希望实现的事情。 -一些第三方项目,例如[Oracle 的 KSplice][2]和红帽的Kpatch,力求为一些特定的发行版提供实时补丁的功能。 +一些第三方项目,例如[Oracle 的 KSplice][2]和红帽的 Kpatch,已经为一些特定的发行版提供实时补丁的功能。 对于服务器,企业单位以及关键任务正常运行,实现实时内核补丁是一个相当大的问题。 好消息是Linux 4.0 使得重启系统以完成内核更新成为了过去。 -或者,几乎。 +如果不是完全不需要重启,也是基本不需要。 -在最新的发行版中,实现了支持免重启安装补丁的最初基础,随时为有经验的系统管理员利用Linux4.0的优势做好了准备。 +在最新的发行版中,实现了支持免重启安装补丁的最初基础,为有经验的系统管理员发挥 Linux 4.0的优势做好了准备。 -桌面Linux发行版也应该能够利用这个功能的优势(但考虑到在最终用户端配置免重启功能会比较复杂而有一些路要走)。 +桌面Linux发行版也应该能够利用这个功能的优势(但考虑到在最终用户端配置免重启功能会比较复杂而有一些路要走)。 -在以后的4.x系列中,这个基础功能会持续完善和改进。我希望我们能更多听到它正是如此的信息。 +在以后的4.x系列中,这个基础功能会持续完善和改进。我希望我们能更多听到它的一些信息。 #### 其它改进 #### 尽管被认为是一次小版本的发布,最新的Linux内核还是带来了一系列的硬件改进,新的驱动以及性能调整。 它们包括: - - 针对Intel ‘Skylake’ 平台的改进 - 支持Intel Quark SoC - 改善Linux在Playstation 3上运行的系列补丁 @@ -53,11 +53,11 @@ Linus 补充说Linux 4.1 可能是一个“大版本”。 ### 在Ubuntu上安装Linux内核4.0 ### -尽管被归为稳定版本,目前而言,**桌面用户和新用户没有必要去升级**。 +尽管被归为稳定版本,但目前而言,**桌面用户和新用户没有必要去升级**。 -通过从[Canonical的主线内核文档][3]抓取合适的安装包或者冒第三方PPA库的风险在Ubuntu 15.04测试版安装Linux4.0,急躁或者不娴熟可能会带来问题。 +如果从[Canonical的主线内核文档][3]抓取合适的安装包或者冒着第三方PPA库的风险在Ubuntu 15.04测试版安装Linux4.0,那么这种急躁或者不娴熟可能会带来问题。 -Ubuntu 15.04 Vivid Vervet 将在本月晚些时候发布并会附带Ubuntu内核 3.19(Ubuntu内核是由Linux内核以及一些上游还没有接受的特定Ubuntu补丁组成)。 +Ubuntu 15.04 Vivid Vervet 将在本月晚些时候发布并会附带Ubuntu内核 3.19(Ubuntu的内核是由Linux内核以及一些上游发行版还没有接受的 Ubuntu 特定的补丁组成)。 -------------------------------------------------------------------------------- @@ -65,11 +65,11 @@ via: http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features 作者:[Joey-Elijah Sneddon][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://lkml.org/lkml/2015/4/12/178 +[1]:http://linux.cn/article-5259-1.html [2]:http://www.omgubuntu.co.uk/2009/10/how-to-install-kernel-updates-without-rebooting [3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D From 4c2128210011792790beb95773d9b3ae2d733772 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 15 Apr 2015 21:04:25 +0800 Subject: [PATCH 0545/2517] PUB:20150323 Red Hat Developer Toolset 3.1 beta arrives @ictlyh --- ... Hat Developer Toolset 3.1 beta arrives.md | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) rename {translated/share => published}/20150323 Red Hat Developer Toolset 3.1 beta arrives.md (63%) diff --git a/translated/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md b/published/20150323 Red Hat Developer Toolset 3.1 beta arrives.md similarity index 63% rename from translated/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md rename to published/20150323 Red Hat Developer Toolset 3.1 beta arrives.md index 8d629f3679..3fd91b69cd 100644 --- a/translated/share/20150323 Red Hat Developer Toolset 3.1 beta arrives.md +++ b/published/20150323 Red Hat Developer Toolset 3.1 beta arrives.md @@ -1,31 +1,32 @@ 红帽开发者工具集3.1测试版发布了 ================================================================================ -> **Summary**:想要最新的红帽企业版Linux6或者7开发者工具?测试版已经发布啦. +> **摘要**:想要试试最新的红帽企业版Linux 6/7的开发者工具?测试版已经发布啦。 -这是[DevOps][1]也不能完全解决的开发商和运营商之间永恒的问题之一。系统管理员想要最稳定的操作系统,而程序员想要最新最棒的开发工具。[红帽公司][2]对这个两难问题的解决方法就是用最新的稳定版[Red Hat Enterprise Linux (RHEL)][3]去测试这些新品牌工具,然后向开发者发布。 +这是[DevOps][1]也不能完全解决的程序员和系统管理员之间永恒的问题之一。系统管理员想要最稳定的操作系统,而程序员想要最新最棒的开发工具。[红帽公司][2]对这个两难问题的解决方法就是用最新的稳定版[Red Hat Enterprise Linux (RHEL)][3]去测试这些新品牌工具,然后向开发者发布。 ![红帽开发者工具集](http://zdnet4.cbsistatic.com/hub/i/2015/03/18/d92b1067-6b36-4ff0-ac9e-608fbe3e8c5d/ae80362df5401a37e3cbcd2598f33370/rhel-dev-tools.png) -红帽开发者工具集 -基于此红帽刚刚公布了给开发者的最新玩具,[红帽开发者工具集 3.1][4]。现在可以获得这些最热门工具包的测试版了。 +*红帽开发者工具集* + +红帽刚刚公布了给开发者的最新玩具:[红帽开发者工具集 3.1][4]。现在可以获得这些最热门工具包的测试版了。 这次更新包括: -[GNUCompiler Collection (GCC) 4.9][5]: 最新的GCC上游稳定版本,提供多处改进和bug修复 +[GNUCompiler Collection (GCC) 4.9][5]: 最新的GCC上游稳定版本,提供多处改进和bug修复。 -[Eclipse 4.4.1][6]: 支持Java 8 以及更新了的Eclipse CDT(8.5)版本,Eclipse Linux Tools (3.1), Eclipse Mylyn (3.14), 和 Eclipse Egit/Jgit (3.6.1) +[Eclipse 4.4.1][6]: 支持Java 8 以及更新的Eclipse CDT(8.5)版本,Eclipse Linux Tools (3.1), Eclipse Mylyn (3.14), 和 Eclipse Egit/Jgit (3.6.1) 众多额外的更新包: 包括 GDB 7.8.2, elfutils 0.161, memstomp 0.1.5, SystemTap 2.6, Valgrind 3.10.1, Dyninst 8.2.1, 以及 ltrace 0.7.91. 用这些开发工具,你可以给RHEL 6 和 7.x 开发应用程序。这些应用程序可以在RHEL上运行,不管是物理机,虚拟机还是云环境。它们也可以在红帽提供的Platform-as-a-Service (PaaS)服务[OpenShift][7]上运行。 -这些新的开发者程序集有RHEL 7 以及 运行在[AMD64 和 Intel 64 架构][8]上的安装包。尽管这些工具都是64位的,你也可以用它们创建或者更改32位的二进制文件。 +这些新的开发者程序集包括可以运行在[AMD64 和 Intel 64 架构][8]上RHEL 7的包。尽管这些工具都是64位的,你也可以用它们创建或者修改32位的二进制文件。 -在运行任何这些程序之前,你应该安装RHEL所有最近的更新。要安装这个测试工具集,你的系统需要选中可选渠道来获取所有红帽开发者工具集需要的工具链包。 +在运行任何这些程序之前,你应该安装RHEL所有最近的更新。要安装这个测试工具集,你的系统需要订阅“可选渠道”来获取所有红帽开发者工具集需要的工具链包。 另外,如果已经安装了早期版本的工具集,可能会遇到[安装Toolkit 3.1 时的一些问题][9]。尽管这些问题很容易解决,在安装新的工具集之前还是应该大概看一下这些可能出现的问题。 -最后,你可能注意到一些最令人激动的工具,例如Docker,Kubernetes以及其它这里没有的容器工具。因为它们在最新的发行版[RHEL 7.1][10] 和 [Red Hat Enterprise Linux 7 Atomic Host (RHELAH)][11]中。[红帽和Docker已成为合作伙伴][12],要获取这些容器友好的程序,你需要转换到Docker友好的RHEL版本上来。 +最后,你可能注意到一些最令人激动的工具,例如 Docker,Kubernetes以及其它容器工具并没有提供。因为它们在最新的发行版[RHEL 7.1][10] 和 [Red Hat Enterprise Linux 7 Atomic Host (RHELAH)][11]中。[红帽和Docker已成为合作伙伴][12],要获取这些支持容器的程序,你需要转换到支持Docker的RHEL版本上来。 -------------------------------------------------------------------------------- @@ -33,7 +34,7 @@ via: http://www.zdnet.com/article/red-hat-developer-toolset-3-1-beta-arrives/ 作者:[Steven J. Vaughan-Nichols][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3837ac36e51d63f19517e63904e557e607099da5 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 15 Apr 2015 22:26:20 +0800 Subject: [PATCH 0546/2517] PUB:20150225 Torvalds--'People who start writing kernel code get hired really quickly' @haimingfg --- ...g kernel code get hired really quickly'.md | 32 +++++++++++++++ ...g kernel code get hired really quickly'.md | 39 ------------------- 2 files changed, 32 insertions(+), 39 deletions(-) create mode 100644 published/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md delete mode 100644 translated/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md diff --git a/published/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md b/published/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md new file mode 100644 index 0000000000..286b5eee16 --- /dev/null +++ b/published/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md @@ -0,0 +1,32 @@ +Torvalds: 写linux内核的人更加容易找工作 +======================================== + +相比起以往,linux内核开发这么专业的事情,在最近发布的《谁在编写 Linux》报告中,其无偿贡献者降到了历史最低水平。 + +这个报道由linux基金会撰写,上年有11.8%的内核开发是由无偿贡献者完成,相比2012年的14.6%下滑了19%。基金会说贡献者有逐年下降的趋势。 + +![](http://images.techhive.com/images/article/2015/02/screen-shot-2015-02-17-at-5.25.43-pm-100568680-medium.idge.png) + +即使是这样,在最新的《谁在编写 Linux》报告里,无偿贡献者还是最大的单一贡献来源,共做了11968 处修改,占整体的12.4%。然而,linux基金会说,企业贡献者共同占比越来越多,超过80%的内核贡献是由有偿的专业开发者完成的。 + +根据 linus Torvalds 说,这个有偿开发者趋势不会对内核开发的本身有太多改变。 + +他向《Network World》说,“我认为不会改变太多的一个原因是,其实并不是‘无偿贡献者离开了’,而是‘编写内核的人很快就被雇走了’。” + +Torvalds讲到,linux开发的改变有很多其他原因,很自然的,新的贡献者会经常冒出来;有很多原来的开发者,有的有着10年的经验,被很多对linux感兴趣的公司抢去了。 + +他说:“开始我们是自愿者,但我们后来也很高兴被请去开发linux。” + +Torvalds 开始抽离了他的开发角色,根据报道在3.10的内核版本里面他个人发布了329个补丁,占04%。逐渐地,各个子系统的维护人员自己开始做代码检查与合并。 + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2885339/application-development/torvalds-people-who-start-writing-kernel-code-get-hired-really-quickly.html + +作者:[Jon Gold][a] +译者:[haimingfg](https://github.com/haimingfg) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Jon-Gold/ diff --git a/translated/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md b/translated/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md deleted file mode 100644 index 62d9af6b24..0000000000 --- a/translated/talk/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md +++ /dev/null @@ -1,39 +0,0 @@ -translated by haimingfg - -Torvalds: 参加linux内核贡献更加容易找工作 -======================================== - -相比起以往,linux内核的发展变是一个专业性的问题,作为一个无偿贡献者去贡献的项目今天在"谁写linux"被低调报道出来了。 - -这个报道由linux基金会编写,基金会说自愿者有逐年下降的趋势,上年有11.8%的内核开发是由无偿自愿者完成,从2012年起由14.6%下滑了19%。 - -![](http://images.techhive.com/images/article/2015/02/screen-shot-2015-02-17-at-5.25.43-pm-100568680-medium.idge.png) - -即使是这样,在最新的谁写linux里面报道,无偿贡献者还是主要的共享来源,共有11,968改变,整体来说有12.4%是好的,企业贡献者共同占比越来越多,有超过80%的内核贡献是有有尝的专业开发者来完成,linux基金会说。 - - -根据 linus Torvalds 说,这个有偿开发者趋势不会改变太多这个内核发展的本身。 - - -他向全世界人说,我认为不会改变太多的一个原因是不会有更多的无偿自愿者因为编写内核就会更加快找到工作而离开。 - - -Torvalds讲到,linux发展改变有很多其他原因,很自然的,新的贡献者会经常冒出来,有很多都是原来的开发者,有着10年的经验,被很多对linux感兴趣的公司抢着去做。 - - -他说:“开始我们是自愿者,但我们这几天很开心被请去开发linux” - - -Torvalds 开始抽离了他的开发角色,根据报道在3.10的内核版本里面他个人发布329补丁,占04% 逐渐地,子系统维护人员自己会检查与合并他们的代码。 - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2885339/application-development/torvalds-people-who-start-writing-kernel-code-get-hired-really-quickly.html - -作者:[Jon Gold][a] -译者:[haimingfg](https://github.com/haimingfg) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Jon-Gold/ From f8e5aa60bfb3d9cde713f152c4acbb1d0bd11465 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 15 Apr 2015 22:57:51 +0800 Subject: [PATCH 0547/2517] PUB:20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat @ictlyh --- ...pache Tomcat to IPv4 in Centos or Redhat.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename {translated/tech => published}/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md (67%) diff --git a/translated/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md b/published/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md similarity index 67% rename from translated/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md rename to published/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md index 5aff088f99..814e81d4f1 100644 --- a/translated/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md +++ b/published/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md @@ -1,12 +1,12 @@ -在CentOS或者Redhat中如何为Apache Tomcat绑定IPv4 +如何在 CentOS/RHEL 中为 Apache Tomcat 绑定 IPv4 地址 ================================================================================ -今天我们来学习一下如何在CentOS 7 Linux分布式系统中为Tomcat绑定IPv4 +今天我们来学习一下如何在CentOS 7 Linux分布式系统中为Tomcat绑定IPv4。 -**Apache Tomcat** 是由[Apache Software Foundation][1] 开发的开源web服务器和servlet容器。它实现了Java Servlet,JavaServer页面(JSP),Java的统一表达式语言,以及Sun Microsystems的Java的WebSocket规范,并提供了一个运行java代码的web服务器环境。 +**Apache Tomcat** 是由[Apache 软件基金会][1] 开发的开源web服务器和servlet容器。它实现了Java Servlet,JavaServer页面(JSP),Java的统一表达式语言,以及Sun Microsystems的Java的WebSocket规范,并提供了一个运行java代码的web服务器环境。 -如果由于默认绑定tomcat到IPv6而导致我们的web服务器不能正常工作,就有必要将tomcat绑定到IPv4。众所周知,IPv6是为设备分配IP地址的现代方法,虽然在不久的将来也许会得到应用,但是现在并没有得到完全应用。由于没有用处,目前我们并不需要将我们的Tomcat服务器向IPv6转换,我们应该将其绑定到IPv4。 +如果由于tomcat默认绑定到IPv6而导致我们的web服务器不能正常工作,就有必要将tomcat绑定到IPv4。众所周知,IPv6是为设备分配IP地址的现代方法,虽然在不久的将来也许会得到应用,但是现在并没有得到完全应用。由于没有用处,目前我们并不需要将我们的Tomcat服务器向IPv6转换,我们应该将其绑定到IPv4。 -在开始将tomcat绑定到IPv4之前,我们应该确保在我们的CentOS 7中已经安装了tomcat。这是一个[如何在CentOS 7.0服务器中安装tomcat 8][2]的指导。 +在开始将tomcat绑定到IPv4之前,我们应该确保在我们的CentOS 7中已经安装了tomcat。可以看这个[如何在CentOS 7.0服务器中安装tomcat 8][2]的指导。 ### 1. 切换到tomcat用户 ### @@ -32,13 +32,13 @@ ### 3. 配置 Catalina.sh ### -如图所示,我们将在catalina.sh脚本文件的最后增加一行 **JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"**。我们可以使用我们喜欢的文本编辑器来编辑这个文件,例如nano,vim等等。这里我们使用nano。 +如图所示,我们将在catalina.sh脚本文件的最后增加一行 `JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"`。我们可以使用我们喜欢的文本编辑器来编辑这个文件,例如nano、vim等等。这里我们使用nano。 $ nano catalina.sh ![Catalina script](http://blog.linoxide.com/wp-content/uploads/2015/01/catalina-script.png) -然后,如下图所示,将 **JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"** 增加到文件。 +然后,如下图所示,将该行增加到文件。 ![配置 catalina](http://blog.linoxide.com/wp-content/uploads/2015/01/configured-catalina.png) @@ -60,7 +60,7 @@ ### 结尾 ### -好了,我们终于将我们运行在CentOS 7 Linux分布式系统上的tomcat服务器绑定到IPv4上了。尽管IPv6在不久的将来也许会得到应用,但由于现在还没有使用,如果因为将你的Tomcat服务器绑定到IPv6上而使得你的tomcat服务器不工作,就有必要将tomcat绑定到IPv4上,这也很简单。如果你有任何疑问,建议,反馈,请在下面的评论框中写下来,让我们知道有什么需要增加或者改进。非常感谢! +好了,我们终于将我们运行在CentOS 7 Linux发行版上的tomcat服务器绑定到IPv4上了。尽管IPv6在不久的将来也许会得到应用,但由于现在还没有使用,如果因为将你的Tomcat服务器绑定到IPv6上而使得你的tomcat服务器不工作,就有必要将tomcat绑定到IPv4上,这也很简单。如果你有任何疑问,建议,反馈,请在下面的评论框中写下来,让我们知道有什么需要增加或者改进。非常感谢! -------------------------------------------------------------------------------- @@ -68,7 +68,7 @@ via: http://linoxide.com/linux-how-to/bind-apache-tomcat-ipv4-centos/ 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 66512019fa24c9c9f9072019a7cce98d04eaa902 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Wed, 15 Apr 2015 23:06:56 +0800 Subject: [PATCH 0548/2517] translating wi-cuckoo --- ...ry OS 0.3 Freya Screenshots - Download and Install Guide.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md index 807b6bf07a..75db79f66f 100644 --- a/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md +++ b/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md @@ -1,3 +1,4 @@ +translating wi-cuckoo Elementary OS 0.3 Freya Screenshots - Download and Install Guide ================================================================================ Elementary OS is a light weight Ubuntu based operating system which is getting wide spread popularity. It has three versions released to date whereas fourth version is decided to be developed based on upcoming Ubuntu 16.04. @@ -141,4 +142,4 @@ via: http://linoxide.com/ubuntu-how-to/elementary-os-0-3-freya-install-guide/ [a]:http://linoxide.com/author/arunrz/ [1]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-amd64.20150411.iso/download [2]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-i386.20150411.iso/download -[3]:http://elementary.io/ \ No newline at end of file +[3]:http://elementary.io/ From 8c8b9a26f1c489d4ab29271afb49f6ee5e2e9c47 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Thu, 16 Apr 2015 09:13:46 +0800 Subject: [PATCH 0549/2517] Update 20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md --- ...er for Ubuntu Plays Relaxing Sounds to Keep You Creative.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md b/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md index f8f2b714fc..f5ff129249 100644 --- a/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md +++ b/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md @@ -1,3 +1,4 @@ +Translating by H-mudcup Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative ================================================================================ ![Rain is a soothing sound for some](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/raining-1600x900-wallpaper_www.wallpapermay.com_84-1.jpg) @@ -52,4 +53,4 @@ via: http://www.omgubuntu.co.uk/2015/04/ambient-noise-player-app-for-ubuntu-linu 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://anoise.tuxfamily.org/ \ No newline at end of file +[1]:http://anoise.tuxfamily.org/ From 3f41b72c0b15534b0b24baf6fe0102e8cdde84b0 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 16 Apr 2015 10:09:18 +0800 Subject: [PATCH 0550/2517] Translating by ZTinoZ --- ...Qs with Answers--How to disable IPv6 on Linux.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md index 2c783bf5c0..aae9b99477 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -1,7 +1,6 @@ -Translating by ZTinoZ -Linux FAQs with Answers--How to disable IPv6 on Linux +Linux有问必答时间--如何在Linux下禁用IPv6 ================================================================================ -> **Question**: I notice that one of my applications is trying to establish a connection over IPv6. But since our local network is not able to route IPv6 traffic, the IPv6 connection times out, and the application falls back to IPv4, which causes unnecessary delay. As I don't have any need for IPv6 at the moment, I would like to disable IPv6 on my Linux box. What is a proper way to turn off IPv6 on Linux? +> **问题**:我发现我的一个应用程序在尝试通过IPv6建立连接,但是由于我们本地网络不允许分配IPv6的流量,IPv6连接会超时,应用程序的连接会退回到IPv4,这样就会造成不必要的延迟。由于我目前对IPv6没有任何需求,所以我想在我的Linux主机上禁用IPv6。有什么比较合适的方法呢? IPv6 has been introduced as a replacement of IPv4, the traditional 32-bit address space used in the Internet, to solve the imminent exhaustion of available IPv4 address space. However, since IPv4 has been used by every host or device connected to the Internet, it is practically impossible to switch every one of them to IPv6 overnight. Numerous IPv4 to IPv6 transition mechanisms (e.g., dual IP stack, tunneling, proxying) have been proposed to facilitate the adoption of IPv6, and many applications are being rewritten, as we speak, to add support for IPv6. One thing for sure is that IPv4 and IPv6 will inevitably coexist for the forseeable future. @@ -121,9 +120,9 @@ If you are using NetworkManager to manage your network settings, you can disable ![](https://farm8.staticflickr.com/7293/16394993017_21917f027b_o.png) -#### SSH server #### +#### SSH服务 #### -By default, OpenSSH server (sshd) tries to bind on both IPv4 and IPv6 addresses. +默认情况下,OpenSSH服务(sshd)会去尝试捆绑IPv4和IPv6的地址。 To force sshd to bind only on IPv4 address, open /etc/ssh/sshd_config with a text editor, and add the following line. inet is for IPv4 only, and inet6 is for IPv6 only. @@ -133,14 +132,14 @@ To force sshd to bind only on IPv4 address, open /etc/ssh/sshd_config with a tex AddressFamily inet -and restart sshd server. +然后重启sshd服务。 -------------------------------------------------------------------------------- via: http://ask.xmodulo.com/disable-ipv6-linux.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e2dcca71915265321647f63f856d2ded0c473ffb Mon Sep 17 00:00:00 2001 From: demon Date: Thu, 16 Apr 2015 13:21:10 +0800 Subject: [PATCH 0551/2517] Update 20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md --- ...age remote MySQL databases on Linux VPS using a GUI tool.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md b/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md index 9be6574afb..c157ce65d5 100644 --- a/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md +++ b/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md @@ -1,3 +1,4 @@ +demon 翻译中 How to manage remote MySQL databases on Linux VPS using a GUI tool ================================================================================ If you need to run a MySQL server on a remote [VPS instance][1], how will you manage databases hosted by the server remotely? Perhaps web-based database administration tools such as [phpMyAdmin][2] or [Adminer][3] will first come to mind. These web-based management tools require a backend web server and PHP engine up and running. However, if your VPS instance is used as a standalone database server (e.g., for a multi-tier app), provisioning a whole LAMP stack for occasional database management is a waste of VPS resource. Worse, the LAMP stack with an additional HTTP port can be a source of security vulnerabilities of your VPS. @@ -175,4 +176,4 @@ via: http://xmodulo.com/remote-mysql-databases-gui-tool.html [4]:http://mysqlworkbench.org/ [5]:http://dev.mysql.com/downloads/repo/apt/ [6]:http://dev.mysql.com/downloads/repo/yum/ -[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html \ No newline at end of file +[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html From 676b826f3ff4a7fd800c35131b2dca282e07867f Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 16 Apr 2015 16:40:44 +0800 Subject: [PATCH 0552/2517] =?UTF-8?q?20150416-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ux Network Statistics Tools or Commands.md | 355 ++++++++++++++++++ 1 file changed, 355 insertions(+) create mode 100644 sources/tech/20150416 Linux Network Statistics Tools or Commands.md diff --git a/sources/tech/20150416 Linux Network Statistics Tools or Commands.md b/sources/tech/20150416 Linux Network Statistics Tools or Commands.md new file mode 100644 index 0000000000..6ca5294165 --- /dev/null +++ b/sources/tech/20150416 Linux Network Statistics Tools or Commands.md @@ -0,0 +1,355 @@ +Linux Network Statistics Tools / Commands +================================================================================ +How do I find out the current network interface throughput statistics on Linux (CentOS or Debian based distro)? How do I see current kernel snmp counters and network interface statistics on Linux operating systems? + +![](http://s0.cyberciti.org/images/category/old/networking.png) + +You can use any one of the following commands: + +### nstat command : Network Statistics Tool ### + +Type the following command: + + # nstat + +Sample outputs: + + #kernel + IpInReceives 133243 0.0 + IpInDelivers 133243 0.0 + IpOutRequests 92904 0.0 + IcmpOutErrors 97 0.0 + IcmpOutTimeExcds 97 0.0 + IcmpMsgOutType3 97 0.0 + TcpActiveOpens 538 0.0 + TcpEstabResets 56 0.0 + TcpInSegs 129837 0.0 + TcpOutSegs 89720 0.0 + TcpRetransSegs 42 0.0 + TcpOutRsts 704 0.0 + UdpInDatagrams 3255 0.0 + UdpNoPorts 97 0.0 + UdpOutDatagrams 3270 0.0 + Ip6OutNoRoutes 206 0.0 + TcpExtTW 141 0.0 + TcpExtDelayedACKs 508 0.0 + TcpExtDelayedACKLocked 1 0.0 + TcpExtDelayedACKLost 42 0.0 + TcpExtTCPHPHits 117659 0.0 + TcpExtTCPPureAcks 2158 0.0 + TcpExtTCPHPAcks 605 0.0 + TcpExtTCPSackRecovery 1 0.0 + TcpExtTCPLossUndo 16 0.0 + TcpExtTCPSackFailures 4 0.0 + TcpExtTCPFastRetrans 1 0.0 + TcpExtTCPSlowStartRetrans 3 0.0 + TcpExtTCPTimeouts 33 0.0 + TcpExtTCPDSACKOldSent 40 0.0 + TcpExtTCPDSACKRecv 5 0.0 + TcpExtTCPAbortOnData 120 0.0 + TcpExtTCPAbortOnClose 55 0.0 + TcpExtTCPSackShiftFallback 9 0.0 + IpExtInOctets 180131682 0.0 + IpExtOutOctets 7289106 0.0 + +### ss command : Utility To Investigate Sockets ### + +To see summary of stats, enter: + + # ss -s + +Sample outputs: + + Total: 786 (kernel 804) + TCP: 65 (estab 40, closed 7, orphaned 0, synrecv 0, timewait 6/0), ports 56 + Transport Total IP IPv6 + * 804 - - + RAW 1 1 0 + UDP 12 9 3 + TCP 58 52 6 + INET 71 62 9 + FRAG 0 0 0 + +See [ss command tutorial][1] for more information. + +### netstat command : The Old Good Utility To Show Sockets ### + +To see a table of all network interfaces and its summary, enter: + + # netstat -i + +Sample outputs: + + Kernel Interface table + Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg + eth0 1500 0 941022 0 0 0 688165 0 0 0 BMRU + lo 16436 0 9304 0 0 0 9304 0 0 0 LRU + ppp0 1496 0 3784 0 0 0 4177 0 0 0 MOPRU + +To see summary statistics for each protocol, enter: + + # netstat -s + +Sample outputs: + + Ip: + 1092065 total packets received + 0 forwarded + 0 incoming packets discarded + 1091681 incoming packets delivered + 798913 requests sent out + 895 dropped because of missing route + 759 reassemblies required + 375 packets reassembled ok + Icmp: + 17 ICMP messages received + 0 input ICMP message failed. + ICMP input histogram: + timeout in transit: 8 + echo replies: 9 + 1747 ICMP messages sent + 0 ICMP messages failed + ICMP output histogram: + destination unreachable: 1730 + echo request: 17 + IcmpMsg: + InType0: 9 + InType11: 8 + OutType3: 1730 + OutType8: 17 + Tcp: + 4822 active connections openings + 1129 passive connection openings + 457 failed connection attempts + 165 connection resets received + 7 connections established + 1062519 segments received + 771394 segments send out + 7158 segments retransmited + 6 bad segments received. + 2578 resets sent + Udp: + 20846 packets received + 1730 packets to unknown port received. + 0 packet receive errors + 19242 packets sent + UdpLite: + TcpExt: + 71 invalid SYN cookies received + 8 resets received for embryonic SYN_RECV sockets + 142 packets pruned from receive queue because of socket buffer overrun + 2109 TCP sockets finished time wait in fast timer + 84 packets rejects in established connections because of timestamp + 19454 delayed acks sent + 6 delayed acks further delayed because of locked socket + Quick ack mode was activated 7306 times + 1 packets directly queued to recvmsg prequeue. + 1 bytes directly received in process context from prequeue + 823921 packet headers predicted + 24412 acknowledgments not containing data payload received + 10150 predicted acknowledgments + 242 times recovered from packet loss by selective acknowledgements + 33 congestion windows recovered without slow start by DSACK + 335 congestion windows recovered without slow start after partial ack + 336 TCP data loss events + TCPLostRetransmit: 35 + 1 timeouts after reno fast retransmit + 156 timeouts after SACK recovery + 116 timeouts in loss state + 461 fast retransmits + 5 forward retransmits + 608 retransmits in slow start + 2073 other TCP timeouts + 62 SACK retransmits failed + 43074 packets collapsed in receive queue due to low socket buffer + 8499 DSACKs sent for old packets + 101 DSACKs sent for out of order packets + 308 DSACKs received + 9 DSACKs for out of order packets received + 427 connections reset due to unexpected data + 122 connections reset due to early user close + 28 connections aborted due to timeout + TCPDSACKIgnoredOld: 3 + TCPDSACKIgnoredNoUndo: 60 + TCPSpuriousRTOs: 4 + TCPSackShifted: 282 + TCPSackMerged: 740 + TCPSackShiftFallback: 1017 + IpExt: + InMcastPkts: 47 + OutMcastPkts: 51 + InBcastPkts: 1 + InOctets: 1341508973 + OutOctets: 72525352 + InMcastOctets: 8649 + OutMcastOctets: 7519 + InBcastOctets: 328 + +See [netstat command tutorial][2] for more information. + +### ip / ifconfig command : Configure or Show a Network Interface Info ### + +Type the following command: + + # ifconfig + +OR + + # /sbin/ifconfig + +OR + + # ifconfig eth0 + +---------- + + eth0 Link encap:Ethernet HWaddr b8:ac:6f:65:31:e5 + inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0 + inet6 addr: fe80::baac:6fff:fe65:31e5/64 Scope:Link + UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 + RX packets:966334 errors:0 dropped:0 overruns:0 frame:0 + TX packets:703297 errors:0 dropped:0 overruns:0 carrier:0 + collisions:0 txqueuelen:1000 + RX bytes:1186255648 (1.1 GiB) TX bytes:73968238 (70.5 MiB) + Interrupt:17 + lo Link encap:Local Loopback + inet addr:127.0.0.1 Mask:255.0.0.0 + inet6 addr: ::1/128 Scope:Host + UP LOOPBACK RUNNING MTU:16436 Metric:1 + RX packets:9666 errors:0 dropped:0 overruns:0 frame:0 + TX packets:9666 errors:0 dropped:0 overruns:0 carrier:0 + collisions:0 txqueuelen:0 + RX bytes:1399578 (1.3 MiB) TX bytes:1399578 (1.3 MiB) + ppp0 Link encap:Point-to-Point Protocol + inet addr:10.1.11.70 P-t-P:10.0.31.18 Mask:255.255.255.255 + UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1496 Metric:1 + RX packets:3784 errors:0 dropped:0 overruns:0 frame:0 + TX packets:4177 errors:0 dropped:0 overruns:0 carrier:0 + collisions:0 txqueuelen:3 + RX bytes:2400265 (2.2 MiB) TX bytes:275983 (269.5 KiB) + +To display network interface statistics, enter: + + # ip -s link + +Sample outputs: + + 1: lo: mtu 16436 qdisc noqueue state UNKNOWN + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 + RX: bytes packets errors dropped overrun mcast + 1444187 9960 0 0 0 0 + TX: bytes packets errors dropped carrier collsns + 1444187 9960 0 0 0 0 + 2: eth0: mtu 1500 qdisc mq state UP qlen 1000 + link/ether b8:ac:6f:65:31:e5 brd ff:ff:ff:ff:ff:ff + RX: bytes packets errors dropped overrun mcast + 1221956483 991501 0 0 0 24 + TX: bytes packets errors dropped carrier collsns + 75623937 720272 0 0 0 0 + 3: wlan0: mtu 1500 qdisc noop state DOWN qlen 1000 + link/ether 00:21:6a:ca:9b:10 brd ff:ff:ff:ff:ff:ff + RX: bytes packets errors dropped overrun mcast + 0 0 0 0 0 0 + TX: bytes packets errors dropped carrier collsns + 0 0 0 0 0 0 + 4: pan0: mtu 1500 qdisc noop state DOWN + link/ether 4a:c7:5f:0e:8e:d8 brd ff:ff:ff:ff:ff:ff + RX: bytes packets errors dropped overrun mcast + 0 0 0 0 0 0 + TX: bytes packets errors dropped carrier collsns + 0 0 0 0 0 0 + 8: ppp0: mtu 1496 qdisc pfifo_fast state UNKNOWN qlen 3 + link/ppp + RX: bytes packets errors dropped overrun mcast + 2419881 3848 0 0 0 0 + TX: bytes packets errors dropped carrier collsns + 284151 4287 0 0 0 0 + +### sar command: Display Network Stats ### + +Type the following command (you need to [install and enable sar via sysstat package][3]): +sar -n DEV + + Linux 2.6.32-220.2.1.el6.x86_64 (www.cyberciti.biz) Tuesday 13 March 2012 _x86_64_ (2 CPU) + 12:00:01 CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s + 12:10:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 12:10:01 CDT eth0 127.13 121.32 95.45 18.34 0.00 0.00 0.00 + 12:10:01 CDT eth1 98.48 110.62 16.72 96.33 0.00 0.00 0.00 + 12:20:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 12:20:01 CDT eth0 139.95 133.41 106.30 19.95 0.00 0.00 0.00 + 12:20:01 CDT eth1 110.65 121.85 18.14 107.13 0.00 0.00 0.00 + 12:30:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 12:30:01 CDT eth0 147.85 132.49 115.78 20.45 0.00 0.00 0.00 + 12:30:01 CDT eth1 111.88 127.39 18.61 117.65 0.00 0.00 0.00 + 12:40:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 12:40:01 CDT eth0 136.75 124.64 105.24 19.48 0.00 0.00 0.00 + 12:40:01 CDT eth1 101.65 115.32 17.58 104.50 0.00 0.00 0.00 + 12:50:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 12:50:01 CDT eth0 131.45 125.69 96.49 19.58 0.00 0.00 0.00 + 12:50:01 CDT eth1 101.41 111.31 17.54 96.78 0.00 0.00 0.00 + 01:00:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 01:00:01 CDT eth0 140.30 133.27 102.17 20.75 0.00 0.00 0.00 + 01:00:01 CDT eth1 106.90 119.51 18.53 103.09 0.00 0.00 0.00 + 01:10:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 01:10:01 CDT eth0 152.03 127.74 125.56 19.85 0.00 0.00 0.00 + 01:10:01 CDT eth1 115.60 134.57 18.73 126.96 0.00 0.00 0.00 + 01:20:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 01:20:01 CDT eth0 138.55 130.55 103.03 20.20 0.00 0.00 0.00 + .... + .. + .... + .. + . + 01:00:01 CDT eth1 156.82 169.48 28.83 138.49 0.00 0.00 0.00 + 01:10:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 01:10:01 CDT eth0 215.19 194.82 163.11 30.99 0.00 0.00 0.00 + 01:10:01 CDT eth1 162.49 183.79 28.36 163.70 0.00 0.00 0.00 + 01:20:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 01:20:01 CDT eth0 200.20 192.23 140.64 30.93 0.00 0.00 0.00 + 01:20:01 CDT eth1 153.60 166.96 27.32 140.26 0.00 0.00 0.00 + 01:30:01 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 01:30:01 CDT eth0 111.98 103.58 79.12 16.52 0.00 0.00 0.48 + 01:30:01 CDT eth1 87.50 95.58 14.74 79.35 0.00 0.00 0.00 + Average: IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s + Average: lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + Average: eth0 211.21 196.20 156.18 31.20 0.00 0.00 0.01 + Average: eth1 159.10 174.52 28.00 149.95 0.00 0.00 0.00 + +Or type the following command: + + # sar -n DEV 1 3 + +Sample outputs: + + Linux 2.6.32-220.2.1.el6.x86_64 (www.cyberciti.biz) Tuesday 13 March 2012 _x86_64_ (2 CPU) + 01:44:03 CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s + 01:44:04 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 01:44:04 CDT eth0 161.70 154.26 105.20 26.63 0.00 0.00 0.00 + 01:44:04 CDT eth1 145.74 142.55 25.11 144.94 0.00 0.00 0.00 + 01:44:04 CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s + 01:44:05 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 01:44:05 CDT eth0 162.14 156.31 107.46 42.18 0.00 0.00 0.00 + 01:44:05 CDT eth1 135.92 138.83 39.38 104.92 0.00 0.00 0.00 + 01:44:05 CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s + 01:44:06 CDT lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + 01:44:06 CDT eth0 303.92 293.14 272.91 37.40 0.00 0.00 0.00 + 01:44:06 CDT eth1 252.94 290.20 34.87 263.50 0.00 0.00 0.00 + Average: IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s + Average: lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 + Average: eth0 210.37 202.34 163.19 35.66 0.00 0.00 0.00 + Average: eth1 178.93 191.64 33.36 171.60 0.00 0.00 0.00 + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/network-statistics-tools-rhel-centos-debian-linux/ + +作者:[nixCraft][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.cyberciti.biz/tips/about-us +[1]:http://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html +[2]:http://www.cyberciti.biz/tips/netstat-command-tutorial-examples.html +[3]:http://www.cyberciti.biz/tips/identifying-linux-bottlenecks-sar-graphs-with-ksar.html \ No newline at end of file From 81fe0f4c729be1283d5af169d2bb144ed9f2ab16 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 16 Apr 2015 18:28:21 +0800 Subject: [PATCH 0553/2517] PUB:20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd @wxy --- ...ion HPKP for Apache, NGINX and Lighttpd.md | 161 ++++++++++++++++++ ...ion HPKP for Apache, NGINX and Lighttpd.md | 158 ----------------- 2 files changed, 161 insertions(+), 158 deletions(-) create mode 100644 published/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md delete mode 100644 sources/tech/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md diff --git a/published/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md b/published/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md new file mode 100644 index 0000000000..a8807a59be --- /dev/null +++ b/published/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md @@ -0,0 +1,161 @@ +在 Apache、NGINX 和 Lighttpd 上启用 HTTP 公钥固定扩展(HPKP) +================================================================================ + +公钥固定(Public Key Pinning)是指一个证书链中必须包含一个白名单中的公钥,也就是说只有被列入白名单的证书签发机构(CA)才能为某个域名`*.example.com`签发证书,而不是你的浏览器中所存储的任何 CA 都可以为之签发。本文讲述了这种机制的背景知识,并提供了 Apache、 Lighttpd 和 NGINX 上的配置范例。 + +### HTTP 公钥固定扩展 ### + +用你使用的银行做个例子,它一直使用 CA 公司 A 为其签发证书。但是在当前的证书体系下,CA 公司 B、CA 公司 C 和 NSA 的 CA 都能给你的银行创建证书,而你的浏览器会毫无疑虑的接受它们,因为这些公司都是你所信任的根 CA。 + +如果你的银行实现了 HPKP 并固定了它们的第一个中级证书(来自 CA 公司 A),那么浏览器将不会接受来自CA 公司 B 和 CA 公司 C 的证书,即便它们也有一个有效的信任链。HPKP 也允许你的浏览器将这种违例行为报告给该银行,以便银行知道被伪造证书攻击了。 + +HTTP 公钥固定扩展是一个从2011年开始开发的针对 HTTP 用户代理(即浏览器)的公钥固定标准。它由 Google 发起,甚至在 Chrome 中实现的固定机制可以使用一个人工维护的网站公钥固定列表,这个列表包含了固定的几个网站的公钥签名。(LCTT 译注:Chrome 和 FireFox 32 及以后版本都支持公钥固定机制,并使用内置的人工维护的公钥固定列表数据,这些数据随着浏览器软件的更新而更新,主要包括几个大型站点。目前还只有 Chrome 38+ 支持通过 HTTP 响应头传递公钥固定信息。) + +以下是 HPKP 的几个功能简述: + +- HPKP 是在 HTTP 层面设置的,使用 `Public-Key-Pins` (PKP)响应头。 +- 该规则的保留周期通过 max-age 参数设置,单位是秒。 +- PKP 响应头只能用于正确的安全加密通讯里面。 +- 如果出现了多个这样的响应头,则只处理第一个。 +- 固定机制可以使用`includeSubDomains`参数扩展到子域。 +- 当接收到一个新的 PKP 响应头时,它会覆盖之前存储的公钥固定和元数据。 +- 公钥固定是用哈希算法生成的,其实是一个“主题公钥信息(SKPI)”指纹。 + +本文首先会介绍一些 HPKP 工作的原理,接下来我们会展示给你如何得到需要的指纹并配置到 web 服务器中。 + +### SPKI 指纹 - 理论 ### + +以下摘自 Adam Langley 的[帖子][1],我们哈希的是一个公钥,而不是证书: + +> 通常来说,对证书进行哈希是一个显而易见的解决方案,但是其实这是错的。不能这样做的原因是 CA 证书可以不断重新签发:同一个公钥、主题名可以对应多个证书,而这些证书有不同的延展或失效时间。浏览器从下至上地在证书池中构建证书链时,另外一个版本的证书可能就替代匹配了你原本所期望的证书。 +> +> 举个例子,StartSSL 有两个根证书:一个是以 SHA1 签名的,另外是一个是 SHA256。如果你希望固定住 StartSSL 作为你的 CA,那么你该使用哪个证书呢?你也许可以使用这两个,但是如果我不告诉你,你怎么会知道还有一个根证书呢? +> +> 相反地,对公钥进行哈希则不会有这个问题: +> +> 浏览器假定子证书是固定不动的:它总是证书链的起点。子证书所携带的签名一定是一个有效的签名,它来自其父证书给这个证书专门签发的。这就是说,父证书的公钥相对于子证书来说是固定的。所以可推论公钥链是固定的。 +> +> 唯一的问题是你不能固定到一个交叉认证的根证书上。举个例子,GoDaddy 的根证书是 Valicert 签名的,这是为了让那些不能识别 GoDaddy 根证书的老客户可以信任其证书。然而,你不能固定到 Valicert 上,因为新的客户在证书链上发现了 GoDaddy 证书就会停止上溯(LCTT 译注:所以就找不到固定信息了)。 +> +> 此外,我们是对 SubjectPublicKeyInfo(SPKI)进行哈希而不是对公钥位串。SPKI 包括了公钥类型、公钥自身及其相关参数。这很重要,因为如果对公钥进行哈希就有可能导致发生曲解攻击。对于一个 Diffie-Hellman 公钥而言:如果仅对公钥进行哈希,而不是对完整的 SPKI,那么攻击者可以使用同样的公钥而让客户端将其解释为其它组。同样地,这样也有可能强制将一个 RSA 密钥当成 DSA 密钥解释等等。 + +### 固定在哪里 ### + +你应该固定在什么地方?固定你自己的公钥并不是一个最好的办法。你的密钥也许会改变或撤销。你也许会使用多个证书,经常轮换证书的话密钥就改变了。也许由于服务器被入侵而撤销证书。 + +最容易但是不是太安全的方法是固定第一个中级 CA 证书。该证书是签名在你的网站证书之上的,所以签发该证书的 CA 的公钥肯定是在证书链上的。 + +采用这种方法你可以从同一个 CA 更新你的证书而不用担心固定信息不对。如果该 CA 发行了一个不同的根证书,也许你会遇到一些问题,对此并没有太好的解决方案。不过你可以通过如下做法来减轻这种问题的影响: + +- 从一个不同的 CA 申请一个备用的证书,并固定该备份。 + +RFC 里面说你至少需要做两个固定。一个是当前连接所使用的证书链上的,另外一个是备份的。 + +另外的固定是对备份公钥的,它可以是来自另外一个给你签发证书的不同 CA 的 SKPI 指纹。 + +在这个问题上还有一种**更安全**的方法,就是事先创建好至少三个独立的公钥(使用 OpenSSL,参见[此页][2] 了解 Javascript OpenSSL 命令生成器),并将其中两个备份到一个安全的地方,离线存储、不要放到网上。 + +为这三个证书创建 SPKI 指纹并固定它们,然后仅使用第一个作为当前的证书。当需要时,你可以使用备份密钥之一。不过你需要让 CA 给你做签名来生成证书对,这可能需要几天,依你的 CA 的工作情况而定。 + +对于 HPKP 来说这没有问题,因为我们使用的是公钥的 SPKI 哈希,而不是证书。失效或不同的 CA 签名链并不影响。 + +如果你按照上述方法生成并安全存储了至少三个独立的密钥,并固定它们,也可以防止你的 CA 撤销你的网站证书并签发一个假证书时出现问题。 + +### SPKI 指纹 ### + +可以使用如下的 OpenSSL 命令来生成 SPKI 指纹,它出现在 [RFC 草案][3] 中: + + openssl x509 -noout -in certificate.pem -pubkey | \ + openssl asn1parse -noout -inform pem -out public.key; + openssl dgst -sha256 -binary public.key | openssl enc -base64 + +结果: + + klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY= + +上面输入的 `certificate.pem` 文件是本站(https://raymii.org)的证书链中第一个证书。(在写本文时, `COMODO RSA Domain Validation Secure Server CA, 序列号 2B:2E:6E:EA:D9:75:36:6C:14:8A:6E:DB:A3:7C:8C:07 。`)。 + +你也需要同样对你的另外两个备份公钥生成指纹。 + +### 故障 ### + +在写本文时(2015/1),唯一支持 HPKP 的浏览器(chrome)有一个严重的问题:Chrome 并不能够区分 HSTS 和 HPKP 响应头中的 max-age 和 includeSubdomains 参数。也就是说,如果你的 HSTS 和 HPKP 设置了不同的 max-age 和 includeSubdomains 参数,它们会互相搞乱。关于这个故障的更多信息参见:[https://code.google.com/p/chromium/issues/detail?id=444511][4]。感谢 Scott Helme([https://scotthelme.co.uk][5])发现并告诉我这个 Chromium 项目的问题。 + +### Web 服务器配置 ### + +下面你可以看到三个主流 Web 服务器的配置方法。这只是一个 HTTP 响应头,绝大多数 Web 服务器都可以设置它。它只需要设置到 HTTPS 网站上。 + +下面的例子固定到 `COMODO RSA Domain Validation Secure Server CA` 及备份的 `Comodo PositiveSSL` CA 上,30天失效期,包括所有的子域。 + + +#### Apache #### + +编辑你的 Apache 配置文件(如 `/etc/apache2/sites-enabled/website.conf 或 /etc/apache2/httpd.conf`),并添加下列行到你的 VirtualHost 中: + + # 如需要,载入 headers 模块。 + LoadModule headers_module modules/mod_headers.so + + Header set Public-Key-Pins "pin-sha256=\"klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=\"; pin-sha256=\"633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q=\"; max-age=2592000; includeSubDomains" + +#### Lighttpd #### + +Lighttpd 更简单一些,将下列行添加到你的 Lighttpd 配置文件(如 `/etc/lighttpd/lighttpd.conf`): + + server.modules += ( "mod_setenv" ) + $HTTP["scheme"] == "https" { + setenv.add-response-header = ( "Public-Key-Pins" => "pin-sha256=\"klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=\"; pin-sha256=\"633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q=\"; max-age=2592000; includeSubDomains") + } + +#### NGINX #### + +NGINX 的配置更简短。添加以下行到你的 HTTPS 配置的 server 块中: + + add_header Public-Key-Pins 'pin-sha256="klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY="; pin-sha256="633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q="; max-age=2592000; includeSubDomains'; + +### 报告功能 ### + +HPKP 报告功能允许浏览器报告任何违例给你。 + +如果你在响应头中添加了附加的 `report-uri="http://example.org/hpkp-report"` 参数,并用该 URI 处理接收到的数据的话,客户端会在发现违例时发送报告给你。这个报告是以 POST 方式发送到你指定的 report-uri 上,并以类似下面的 JSON 格式: + + { + "date-time": "2014-12-26T11:52:10Z", + "hostname": "www.example.org", + "port": 443, + "effective-expiration-date": "2014-12-31T12:59:59", + "include-subdomains": true, + "served-certificate-chain": [ + "-----BEGINCERTIFICATE-----\nMIIAuyg[...]tqU0CkVDNx\n-----ENDCERTIFICATE-----" + ], + "validated-certificate-chain": [ + "-----BEGINCERTIFICATE-----\nEBDCCygAwIBA[...]PX4WecNx\n-----ENDCERTIFICATE-----" + ], + "known-pins": [ + "pin-sha256=\"dUezRu9zOECb901Md727xWltNsj0e6qzGk\"", + "pin-sha256=\"E9CqVKB9+xZ9INDbd+2eRQozqbQ2yXLYc\"" + ] + } + +### 非强制,只报告 ### + +HPKP 也可以设置为非强制的,可以使用 `Public-Key-Pins-Report-Only` 来只发送违例报告给你。 + +这样可以让你在网站不可访问或 HPKP 配置不正确时不固定,之后你可以将这个响应头改为 `Public-Key-Pins` 来强制固定。 + + +-------------------------------------------------------------------------------- + +via: https://raymii.org/s/articles/HTTP_Public_Key_Pinning_Extension_HPKP.html + +作者:[Remy van Elst][a] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://raymii.org/ +[1]:http://www.imperialviolet.org/2011/05/04/pinning.html +[2]:https://raymii.org/s/software/OpenSSL_Command_Generator.html +[3]:https://tools.ietf.org/html/draft-ietf-websec-key-pinning-21#appendix-A +[4]:https://code.google.com/p/chromium/issues/detail?id=444511 +[5]:https://scotthelme.co.uk/ \ No newline at end of file diff --git a/sources/tech/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md b/sources/tech/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md deleted file mode 100644 index e794f187d7..0000000000 --- a/sources/tech/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md +++ /dev/null @@ -1,158 +0,0 @@ -HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd -================================================================================ -Public Key Pinning means that a certificate chain must include a whitelisted public key. It ensures only whitelisted Certificate Authorities (CA) can sign certificates for `*.example.com`, and not any CA in your browser store. This article has background theory and configuration examples for Apache, Lighttpd and NGINX. - -### HTTP Public Key Pinning Extension ### - -An example might be your bank, which always have their certificate from CA Company A. With the current certificate system, CA Company B, CA Company C and the NSA CA can all create a certificate for your bank, which your browser will hapily accept because those companies are also trusted root CA's. - -If the bank implements HPKP and pin's their first intermidiate certificate (from CA Company A), browsers will not accept certificates from CA Company B and CA Company C, even if they have a valid trust path. HPKP also allows your browser to report back the failure to the bank, so that they know they are under attack. - -Public Key Pinning Extension for HTTP (HPKP) is a standard for public key pinning for HTTP user agents that's been in development since 2011. It was started by Google, which, even though it had implemented pinning in Chrome, understood that manually maintaining a list of pinned sites can't scale. - -Here is a quick feature overview of HPKP: - -- HPKP is set at the HTTP level, using the `Public-Key-Pins` response header. -- The policy retention period is set with the max-age parameter, it specifies duration in seconds. -- The PKP header can only be used over an error-free secure encryption. -- If multiple headers are seen, only the first one is processed. -- Pinning can be extended to subdomains with the `includeSubDomains` parameter. -- When a new PKP header is received, it overwrites previously stored pins and metadata. -- A pin consists out of the hashing algorithm and an "Subject Public Key Info" fingerprint. - -This article first has some theory about the workings of HPKP, down below you'll find the part which shows you how to get the required fingerprints and has web server configuration. - -### SPKI Fingerprint - Theory ### - -As explained by Adam Langley in [his post][1], we hash a public key, not a certificate: - -> In general, hashing certificates is the obvious solution, but the wrong one. The problem is that CA certificates are often reissued: there are multiple certificates with the same public key, subject name etc but different extensions or expiry dates. Browsers build certificates chains from a pool of certificates, bottom up, and an alternative version of a certificate might be substituted for the one that you expect. -> -> For example, StartSSL has two root certificates: one signed with SHA1 and the other with SHA256. If you wished to pin to StartSSL as your CA, which certificate hash would you use? You would have to use both, but how would you know about the other root if I hadn't just told you? -> -> Conversely, public key hashes must be correct: -> -> Browsers assume that the leaf certificate is fixed: it's always the starting point of the chain. The leaf certificate contains a signature which must be a valid signature, from its parent, for that certificate. That implies that the public key of the parent is fixed by the leaf certificate. So, inductively, the chain of public keys is fixed, modulo truncation. -> -> The only sharp edge is that you mustn't pin to a cross-certifying root. For example, GoDaddy's root is signed by Valicert so that older clients, which don't recognise GoDaddy as a root, still trust those certificates. However, you wouldn't want to pin to Valicert because newer clients will stop their chain at GoDaddy. -> -> Also, we're hashing the SubjectPublicKeyInfo not the public key bit string. The SPKI includes the type of the public key and some parameters along with the public key itself. This is important because just hashing the public key leaves one open to misinterpretation attacks. Consider a Diffie-Hellman public key: if one only hashes the public key, not the full SPKI, then an attacker can use the same public key but make the client interpret it in a different group. Likewise one could force an RSA key to be interpreted as a DSA key etc. - -### Where to Pin ### - -Where should you pin? Pinning your own public key is not the best idea. The key might change or get compromised. You might have multiple certificates in use. The key might change because you rotate your certificates every so often. It might key compromised because the web server was hacked. - -The easiest, but not most secure place to pin is the first intermediate CA certificate. The signature of that certificate is on your websites certificate so the issuing CA's public key must always be in the chain. - -This way you can renew your end certificate from the same CA and have no pinning issues. If the CA issues a different root, then you have a problem, there is no clear solution for this yet. There is one thing you can do to mitigate this: - -- Always have a backup pin and a spare certificate from a different CA. - -The RFC states that you need to provide at least two pins. One of the pins must be present in the chain used in the connection over which the pins were received, the other pin must not be present. - -This other pin is your backup public key. It can also be the SPKI fingerprint of a different CA where you have a certificate issued. - -An alternative and **more secure** take on this issue is to create at least three seperate public keys beforehand (using OpenSSL, see [this page][2] for a Javascript OpenSSL command generator) and to keep two of those keys as a backup in a safe place, offline and off-site. - -You create the SPKI hashes for the three certificates and pin those. You only use the first key as the active certificate. When it is needed, you can then use one of the alternative keys. You do however need to let that certificate sign by a CA to create a certificate pair and that process can take a few days depending on the certificate. - -This is not a problem for the HPKP because we take the SPKI hash of the public key, and not of the certificate. Expiration or a different chain of CA signer do not matter in this case. - -If you have the means and procedures to create and securely save at least three seperate keys as described above and pin those, it would also protect you from your CA provider getting compromised and giving out a fake certificate for your specific website. - -### SPKI Fingerprint ### - -To get the SPKI fingerprint from a certificate we can use the following OpenSSL command, as shown in [the RFC draft][3]: - - openssl x509 -noout -in certificate.pem -pubkey | \ - openssl asn1parse -noout -inform pem -out public.key; - openssl dgst -sha256 -binary public.key | openssl enc -base64 - -Result: - - klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY= - -The input `certificate.pem` file is the first certificate in the chain for this website. (At the time of writing, `COMODO RSA Domain Validation Secure Server CA, Serial 2B:2E:6E:EA:D9:75:36:6C:14:8A:6E:DB:A3:7C:8C:07.`) - -You need to also do this with your backup public key, ending up with two fingerprints. - -### Bugs ### - -At the time of writing this article (2015-Jan) the only browser supporting HPKP (Chrome) has a serious issue where Chrome doesn't treat the max-age and includeSubdomains directives from HSTS and HPKP headers as mutually exclusive. This means that if you have HSTS and HPKP with different policiesfor max-age or includeSubdomains they will be interchanged. See this bug for more info: [https://code.google.com/p/chromium/issues/detail?id=444511][4]. Thanks to Scott Helme from [https://scotthelme.co.uk][5] for finding and notifying me and the Chromium project about it. - -### Webserver configuration ### - -Below you'll find configuration instructions for the three most populair web servers. Since this is just a HTTP header, almost all web servers will allow you to set this. It needs to be set for the HTTPS website. - -The example below pins the `COMODO RSA Domain Validation Secure Server CA` and the `Comodo PositiveSSL` CA 2 as a backup, with a 30 day expire time including all subdomains. - -#### Apache #### - -Edit your apache configuration file (`/etc/apache2/sites-enabled/website.conf or /etc/apache2/httpd.conf` for example) and add the following to your VirtualHost: - - # Optionally load the headers module: - LoadModule headers_module modules/mod_headers.so - - Header set Public-Key-Pins "pin-sha256=\"klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=\"; pin-sha256=\"633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q=\"; max-age=2592000; includeSubDomains" - -#### Lighttpd #### - -The lighttpd variant is just as simple. Add it to your Lighttpd configuration file (`/etc/lighttpd/lighttpd.conf` for example): - - server.modules += ( "mod_setenv" ) - $HTTP["scheme"] == "https" { - setenv.add-response-header = ( "Public-Key-Pins" => "pin-sha256=\"klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=\"; pin-sha256=\"633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q=\"; max-age=2592000; includeSubDomains") - } - -#### NGINX #### - -NGINX is even shorter with its config. Add this in the server block for your HTTPS configuration: - - add_header Public-Key-Pins 'pin-sha256="klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY="; pin-sha256="633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q="; max-age=2592000; includeSubDomains'; - -### Reporting ### - -HPKP reporting allows the user-agent to report any failures back to you. - -If you add an aditional `report-uri="http://example.org/hpkp-report`" parameter to the header and set up a listener there, clients will send reports if they encounter a failure. A report is sent as a POST request to the report-uri with a JSON body like this: - - { - "date-time": "2014-12-26T11:52:10Z", - "hostname": "www.example.org", - "port": 443, - "effective-expiration-date": "2014-12-31T12:59:59", - "include-subdomains": true, - "served-certificate-chain": [ - "-----BEGINCERTIFICATE-----\nMIIAuyg[...]tqU0CkVDNx\n-----ENDCERTIFICATE-----" - ], - "validated-certificate-chain": [ - "-----BEGINCERTIFICATE-----\nEBDCCygAwIBA[...]PX4WecNx\n-----ENDCERTIFICATE-----" - ], - "known-pins": [ - "pin-sha256=\"dUezRu9zOECb901Md727xWltNsj0e6qzGk\"", - "pin-sha256=\"E9CqVKB9+xZ9INDbd+2eRQozqbQ2yXLYc\"" - ] - } - -### No Enforcment, report only ### - -HPKP can be set up without enforcement, in reporting mode by using the `Public-Key-Pins-Report-Only` response header. - -This approach allows you to set up pinning without your site being unreachable or HPKP being configured incorrectly. You can later move to enforcement by changing the header back to `Public-Key-Pins`. - --------------------------------------------------------------------------------- - -via: https://raymii.org/s/articles/HTTP_Public_Key_Pinning_Extension_HPKP.html - -作者:[Remy van Elst][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://raymii.org/ -[1]:http://www.imperialviolet.org/2011/05/04/pinning.html -[2]:https://raymii.org/s/software/OpenSSL_Command_Generator.html -[3]:https://tools.ietf.org/html/draft-ietf-websec-key-pinning-21#appendix-A -[4]:https://code.google.com/p/chromium/issues/detail?id=444511 -[5]:https://scotthelme.co.uk/ \ No newline at end of file From d0ca4d6c8eec014675c68660d23bc9a1dbc3ee18 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 16 Apr 2015 22:58:24 +0800 Subject: [PATCH 0554/2517] [Translating] tech/20150416 Linux Network Statistics Tools or Commands --- .../tech/20150416 Linux Network Statistics Tools or Commands.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150416 Linux Network Statistics Tools or Commands.md b/sources/tech/20150416 Linux Network Statistics Tools or Commands.md index 6ca5294165..daaa9ed84d 100644 --- a/sources/tech/20150416 Linux Network Statistics Tools or Commands.md +++ b/sources/tech/20150416 Linux Network Statistics Tools or Commands.md @@ -1,3 +1,4 @@ +Translating by ictlyh Linux Network Statistics Tools / Commands ================================================================================ How do I find out the current network interface throughput statistics on Linux (CentOS or Debian based distro)? How do I see current kernel snmp counters and network interface statistics on Linux operating systems? From c17680233faf36492bce94e8ba362577fee8894e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 16 Apr 2015 22:59:40 +0800 Subject: [PATCH 0555/2517] [Translating] tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples --- ...ow to Show Dialog Box from Bash Shell Script with Examples.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md b/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md index 3a50dc3872..a870c0f6a8 100644 --- a/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md +++ b/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to Show Dialog Box from Bash Shell Script with Examples ================================================================================ This tutorial will give couple of examples on how to use utilities like zenity and whiptail in your Bash shell script to provide message / dialog box . With these utilities your script will be able to inform user about the current state of execution, or give an ability to interact. Difference between these two utilities is the way they are displaying message box or dialog. Zenity uses GTK toolkit for creating graphical user interfaces, while whiptail creates message boxes inside terminal window. From 3517a6e6f8a212a00dcaeee1b9d4c63a8a6b7264 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 16 Apr 2015 23:20:43 +0800 Subject: [PATCH 0556/2517] [Translated] tech/20150416 Linux Network Statistics Tools or Commands --- ...ux Network Statistics Tools or Commands.md | 55 +++++++++---------- 1 file changed, 27 insertions(+), 28 deletions(-) rename {sources => translated}/tech/20150416 Linux Network Statistics Tools or Commands.md (92%) diff --git a/sources/tech/20150416 Linux Network Statistics Tools or Commands.md b/translated/tech/20150416 Linux Network Statistics Tools or Commands.md similarity index 92% rename from sources/tech/20150416 Linux Network Statistics Tools or Commands.md rename to translated/tech/20150416 Linux Network Statistics Tools or Commands.md index daaa9ed84d..1dcad55baf 100644 --- a/sources/tech/20150416 Linux Network Statistics Tools or Commands.md +++ b/translated/tech/20150416 Linux Network Statistics Tools or Commands.md @@ -1,19 +1,18 @@ -Translating by ictlyh -Linux Network Statistics Tools / Commands +Linux网络统计工具/命令 ================================================================================ -How do I find out the current network interface throughput statistics on Linux (CentOS or Debian based distro)? How do I see current kernel snmp counters and network interface statistics on Linux operating systems? +我在Linux(基于CentOS 或者 Debian 的发行版)中该如何查看当前网络端口吞吐量的统计信息?在Linux操作系统中如何查看当前内核snmp计数器以及网络端口的统计信息? ![](http://s0.cyberciti.org/images/category/old/networking.png) -You can use any one of the following commands: +你可以使用以下任何一个命令: -### nstat command : Network Statistics Tool ### +### nstat 命令 : 网络统计工具 ### -Type the following command: +键入以下命令: # nstat -Sample outputs: +输出样例: #kernel IpInReceives 133243 0.0 @@ -53,13 +52,13 @@ Sample outputs: IpExtInOctets 180131682 0.0 IpExtOutOctets 7289106 0.0 -### ss command : Utility To Investigate Sockets ### +### ss 命令 : 查询套接字工具 ### -To see summary of stats, enter: +要查看统计汇总, 输入: # ss -s -Sample outputs: +输出样例: Total: 786 (kernel 804) TCP: 65 (estab 40, closed 7, orphaned 0, synrecv 0, timewait 6/0), ports 56 @@ -71,15 +70,15 @@ Sample outputs: INET 71 62 9 FRAG 0 0 0 -See [ss command tutorial][1] for more information. +查看[ss 命令教程][1] 获取更多信息。 -### netstat command : The Old Good Utility To Show Sockets ### +### netstat 命令 : 显示套接字信息的旧的好工具 ### -To see a table of all network interfaces and its summary, enter: +查看所有网络端口以及汇总信息表,输入: # netstat -i -Sample outputs: +输出样例: Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg @@ -87,11 +86,11 @@ Sample outputs: lo 16436 0 9304 0 0 0 9304 0 0 0 LRU ppp0 1496 0 3784 0 0 0 4177 0 0 0 MOPRU -To see summary statistics for each protocol, enter: +查看每个协议的汇总统计信息,输入: # netstat -s -Sample outputs: +输出样例: Ip: 1092065 total packets received @@ -186,19 +185,19 @@ Sample outputs: OutMcastOctets: 7519 InBcastOctets: 328 -See [netstat command tutorial][2] for more information. +查看 [netstat 命令教程][2] 获取更多信息。 -### ip / ifconfig command : Configure or Show a Network Interface Info ### +### ip / ifconfig 命令 : 配置或者显示网络端口信息 ### -Type the following command: +键入以下命令: # ifconfig -OR +或者 # /sbin/ifconfig -OR +或者 # ifconfig eth0 @@ -229,11 +228,11 @@ OR collisions:0 txqueuelen:3 RX bytes:2400265 (2.2 MiB) TX bytes:275983 (269.5 KiB) -To display network interface statistics, enter: +显示网络端口统计信息,输入: # ip -s link -Sample outputs: +输出样例: 1: lo: mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 @@ -266,9 +265,9 @@ Sample outputs: TX: bytes packets errors dropped carrier collsns 284151 4287 0 0 0 0 -### sar command: Display Network Stats ### +### sar 命令: 显示网络统计信息 ### -Type the following command (you need to [install and enable sar via sysstat package][3]): +输入以下命令 (你需要 [通过sysstat包安装并启用sar][3]): sar -n DEV Linux 2.6.32-220.2.1.el6.x86_64 (www.cyberciti.biz) Tuesday 13 March 2012 _x86_64_ (2 CPU) @@ -316,11 +315,11 @@ sar -n DEV Average: eth0 211.21 196.20 156.18 31.20 0.00 0.00 0.01 Average: eth1 159.10 174.52 28.00 149.95 0.00 0.00 0.00 -Or type the following command: +或者输入以下命令: # sar -n DEV 1 3 -Sample outputs: +输出样例: Linux 2.6.32-220.2.1.el6.x86_64 (www.cyberciti.biz) Tuesday 13 March 2012 _x86_64_ (2 CPU) 01:44:03 CDT IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s @@ -345,7 +344,7 @@ Sample outputs: via: http://www.cyberciti.biz/faq/network-statistics-tools-rhel-centos-debian-linux/ 作者:[nixCraft][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](https://github.com/ictlyh) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 379ae36a2c4156c28ff18741bcd07b1b6905c5d0 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Fri, 17 Apr 2015 11:29:24 +0800 Subject: [PATCH 0557/2517] translated wi-cuckoo --- ...creenshots - Download and Install Guide.md | 145 ------------------ ...creenshots - Download and Install Guide.md | 144 +++++++++++++++++ 2 files changed, 144 insertions(+), 145 deletions(-) delete mode 100644 sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md create mode 100644 translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md diff --git a/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md deleted file mode 100644 index 75db79f66f..0000000000 --- a/sources/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md +++ /dev/null @@ -1,145 +0,0 @@ -translating wi-cuckoo -Elementary OS 0.3 Freya Screenshots - Download and Install Guide -================================================================================ -Elementary OS is a light weight Ubuntu based operating system which is getting wide spread popularity. It has three versions released to date whereas fourth version is decided to be developed based on upcoming Ubuntu 16.04. - -- **Jupiter (0.1)**: It was the first stable version of Elementary OS based on Ubuntu 10.10 and released on March 2011. -- **Luna (0.2)**: Second stable version of Elementary OS based on Ubuntu 12.04 and released on November 2012. -- **Freya (0.3)**: Third stable version of Elementary OS based on Ubuntu 14.04 and released on 8th February 2015. -- **Loki (0.4)**: Fourth upcoming version of Elementary OS is planned to be based on Ubuntu 16.04 it will get updates till 2021. - -Freya is the latest version (0.3) of Elementary OS available now, initially it was given the name ISIS but it was later changed to avoid any sort of association with a terrorist group named alike. Freya has some very nice preloaded applications. - -### Salient Features ### - -Here are some but not all of the features of Elementary OS 0.3. - -- Better interactive notifications along with notification setting pane including a system-wide “Do Not Disturb” mode -- Latest version of Elementary OS provides a better emoji support & drop-in replacements for Microsoft Core fonts for the web applications -- Privacy Mode is a new firewall tool which is easy to use and helps protect the computer from harmful scripts and applications -- Unified login and lock screens -- Applications menu with and improved look and functionality including quicklist actions, drag-and-drop from search, and support for quick math calculations -- Multitasking view is redesigned to provide more app-focused utility -- Updated software stack (Linux 3.16, Gtk 3.14, and Vala 0.26) for better support and enhanced functionality of latest developed applications -- Unified extensible firmware interface (UEFI) support -- WiFi connectivity made easier through new captive portal assistant - -### Download 64 bit & 32 bit Version ### - -- [Elementary OS Freya 64 bit][1] -- [Elementary OS Freya 32 bit][2] - -### Installing Elementary OS 0.3 (Freya) ### - -Download the ISO file of Elementary OS 0.3 and flash it on a bootable USB drive or to a DVD/CD. Source is available for both 32-bit and 64-bit architectures. Once the computer is booted with the Elementary OS ISO file, there are two options available, either to try without installing or install Elementary OS on the computer, choose the second option. Elementary OS can also be installed along with an already installed operating system, turning it into a dual boot machine. - -![Install Freya](http://blog.linoxide.com/wp-content/uploads/2015/04/Install-Freya.png) - -System requirements and available resources are checked before proceeding further. Click continue if your system has enough resources. - -![Installation Requirements](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Requirements.png) - -Installation wizard then provides various installation types. Opt for the option best suits you, normally, first option is chosen by most i.e. “Erase disk and install Elementary”. With this option make sure that your data is backed up properly because the disk (partition) will be erased and all data will be lost. - -![Installation Types](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Types.png) - -A dialog box shows the list of disk partitions being formatted and used by the Elementary OS, after ensuring data integrity click continue. - -![Format Warning](http://blog.linoxide.com/wp-content/uploads/2015/04/Format-Warning.png) - -Choose your location for time zone selection and click continue. - -![Location](http://blog.linoxide.com/wp-content/uploads/2015/04/Location.png) - -Choose your language and click continue. - -![Language](http://blog.linoxide.com/wp-content/uploads/2015/04/Language.png) - -Fill in your information and choose a strong root/administrator password and click continue. - -![whoareyou](http://blog.linoxide.com/wp-content/uploads/2015/04/whoareyou.png) - -Core installation process starts once the personal information is provided, details of components being installed will be flashing on a little dialogue box along with the progress bar. - -![Installation progress](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-progress.png) - -Congratulation! Installation is complete for your latest Elementary OS 0.3 (Freya). A restart is required to update and finalize registries and configurations. - -![Installation Complet](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Complet.png) - -At start up the Elementary OS logo shows its elegance and then password protected administrator login and guest session options will appear. Guest section has pretty limited features and has no installation privileges. - -![Login](http://blog.linoxide.com/wp-content/uploads/2015/04/Login.png) - -Here is the first look of the newly installed Elementary OS 0.3. - -![first look](http://blog.linoxide.com/wp-content/uploads/2015/04/first-look.png) - -### Customizing Desktop ### - -While Elementary OS 0.3 is best known for their light weight and better looks, everybody has a unique esthetic sense and computer usage habits. Desktop reflects a personalized view of any computer user. Like other operating systems Elementary OS 0.3 also provides various options to customize our desktop through wallpapers, font sizes, themes etc. - -For basic customization, click on Applications > System Settings > Desktop - -We can change wallpapers, dock and make use of hot corners of the desktop. - -Very few wallpapers are provided by default, more can be downloaded from the internet or transferred to your own camera. - -![Desktop Wallpaper](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Wallpaper4.png) - -The real beauty of Elementary OS lies in its elegant Dock panel. With no icons allowed at desktop, a set of application icons at the dock panel enhance the look and provide a quick way to lunch frequently used applications. - -![Desktop Dock](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Dock1.png) - -Users can use the corners of the desktop for customary purposes. - -![Hot Corners](http://blog.linoxide.com/wp-content/uploads/2015/04/Hot-Corners.png) - -Advanced customization can be achieved through the installation of elementary tweaks. - -Add stable Personal Package Archive (PPA) to Advanced Package Tool (APT) repository using the following command. - - sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily - -![ppa](http://blog.linoxide.com/wp-content/uploads/2015/04/elementary-tweaks-ppa.png) - -Once the package has been added to the repository we need to update the repository using following command - - sudo apt-get update - -![update repository](http://blog.linoxide.com/wp-content/uploads/2015/04/update-repository.png) - -After updating the repository we are ready to install inkscape which is accomplished using the following command - - sudo apt-get install elementary-tweaks - -![install elementary tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/install-elementary-tweaks.png) - -We can see an addition of Tweaks option under Applications > System Settings under the Personal section. It now provides us more options to customize our desktop view. - -![tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/tweaks.png) - -For further customizations we also install gnome tweak tool for example unlocking the desktop. - - sudo apt-get install gnome-tweak-tool - -![gnome](http://blog.linoxide.com/wp-content/uploads/2015/04/gnome.png) - -### Summary ### - -Elementary OS is closely related to Ubuntu distro of Linux and its pros and cons are pretty much similar too. Elementary OS is lightweight, elegant in look and feel, rapidly maturing. It is potentially an alternative for both Windows and OS X operating systems. The latest available Elementary OS 0.3 (Freya) is getting very popular with a better feature base. For further reading, latest updates and downloads please visit the official [website][1]. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/elementary-os-0-3-freya-install-guide/ - -作者:[Aun Raza][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunrz/ -[1]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-amd64.20150411.iso/download -[2]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-i386.20150411.iso/download -[3]:http://elementary.io/ diff --git a/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md new file mode 100644 index 0000000000..6deb2611b9 --- /dev/null +++ b/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md @@ -0,0 +1,144 @@ +Elementart OS 0.3 Freya快照 - 下载和安装指南 +=========================================================================== +Elementary OS是一个以Ubuntu为基础的轻量级操作系统,广受欢迎。目前已经发行了上个版本,而第四个版本将会以即将到来的Ubuntu16.04为基础开发。 + +- **Jupiter (0.1)**: 第一个基于Ubuntu10.10的Elementary OS稳定发行版,在2011年三月发布。 +- **(Luna (0.2)**: 基于Ubuntu12.04的Elementary OS第二个稳定发行版,于2012年11月发布。 +- **(Freya (0.3)**: 基于Ubuntu 14.04的Elementary OS第三个稳定发行版,2015年二月8号发布。 +- **(Loki (0.4)**: 未来Elementary OS第四版,计划以Ubuntu16.04为基础,并且提供更新服务直到2021年。 + +Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS,但是后来改了,是为了避免与同名的恐怖组织产生任何的联系。Freya有一些非常不错的预装应用。 + +### 突出的特性 ### + +这里列举了一些特性,但并非Elementary OS 0.3的所有特性。 + +- 根据通知设定面板提供更好的交互性消息通知,包括一个系统级别的“Do Not Disturb”模式。 +- 最新版Elementary OS为网页应用中微软核心字体提供更好的emoji表情支持和替换。 +- Privacy模式是一个新的防火墙工具,很容易使用,可以帮助保护电脑免遭恶意脚本和应用的攻击。 +- 统一了登入和锁定界面 +- 拥有应用中心菜单,提升了界面效果和功能,包括快速列表动作,从搜索中拉取,和支持快速数学计算。 +- 重新设计多任务视图,提供更多的应用专注工具。 +- 更新了软件栈(Linux 3.16, Gtk 3.14 和Vala 0.26),为了对最新开发应用更好的支持和加强功能。 +- 统一了扩展固件接口(UEFI)支持 +- 通过新的捕捉入口协助,WiFi连接变得更容易。 + +### 下载64位&32位版本 ### + +- [Elementary OS Freya 64 bit][1] +- [Elementary OS Freya 32 bit][2] + +### 安装Elementary OS 0.3 (Freya) ### + +下载Elementary OS 0.3的ISO文件,并且写入一个USB启动盘或者DVD/CD。32位和64位的结构都是可以的。当计算机从Elementary OS ISO文件启动后,有两个选项可用,或试用而不安装,或直接安装到计算机里,选择第二项。Elmentary OS也可以安装与已有操作系统并存,构成双重启动。 + +![Install Freya](http://blog.linoxide.com/wp-content/uploads/2015/04/Install-Freya.png) + +在更进一步之前会检查系统要求和资源有效性。如果你的系统有足够的资源,点击继续。 + +![Installation Requirements](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Requirements.png) + +安装向导提供许多安装形式。选取最适合你的选项,通常地,第一个选项被大多数选用 i.e. “擦除磁盘以安装Elementary”。选择这个选项,必须保证你的数据都已经被合理的备份了,因为磁盘(分区)将会被擦除,所有数据将会丢失。 + +![Installation Types](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Types.png) + +一个对话框显示了被Elementary OS使用和格式化的磁盘分区列表,确保数据完整后点击继续。 + +![Format Warning](http://blog.linoxide.com/wp-content/uploads/2015/04/Format-Warning.png) + +选择你的位置,确定时区,点击继续。 + +![Location](http://blog.linoxide.com/wp-content/uploads/2015/04/Location.png) + +选择你的语言,点击继续。 + +![Language](http://blog.linoxide.com/wp-content/uploads/2015/04/Language.png) + +填入你的信息,选择一个强度高的超级用户/管理员密码,点击继续。 + +![whoareyou](http://blog.linoxide.com/wp-content/uploads/2015/04/whoareyou.png) + +当你的信息提供后,核心安装进程就会启动,正在安装组件的详细信息会在一个小对话框里随进度条一闪而过。 + +![Installation progress](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-progress.png) + +恭喜你!最新的Elementary OS 0.3 (Freya)已经安装完成了。此时需要重启来更新和完整注册,恭喜。 + +![Installation Complet](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Complet.png) + +启动时,Elementary OS的标志显得十分优雅,然后密码保护的管理员登入和游客访问选项会出现。游客访问有相当多的限制功能,而且没有安装的特权。 + +![Login](http://blog.linoxide.com/wp-content/uploads/2015/04/Login.png) + +下图是新安装的Elementary OS 0.3的画面。 + +![first look](http://blog.linoxide.com/wp-content/uploads/2015/04/first-look.png) + +### 个性化桌面 ### + +Elementary OS 0.3以其轻巧和美观而为我们熟知,每个人有自己独特的审美观念和计算机使用习惯。桌面反映出每一个计算机使用者个性化的观点。如其他操作系统一样,Elementary OS 0.3也提供了许多选项来个性化配置桌面,包括壁纸,字体大小,主题等等。 + +基本的个性化配置,点击Applications > System Settings > Desktop + +我们可以改变壁纸,泊位和启用桌面热角。 + +默认提供了很少的壁纸,更多的可以从网上下载或者从你的相机传输。 + +![Desktop Wallpaper](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Wallpaper4.png) + +Elementary OS真正的美丽在于优雅的Dock面板。桌面上没有任何图标,一些应用图标停靠在dock面板上加强了显示效果,提供了快速访问常用应用的捷径。 + +![Desktop Dock](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Dock1.png) + +用户可以使用桌面的四个角定制要显示什么。 + +![Hot Corners](http://blog.linoxide.com/wp-content/uploads/2015/04/Hot-Corners.png) + +通过elementary tweaks工具的安装,可以达到更高级的个性化定制。 + +使用如下命令,添加稳定的个人软件包档案(PPA)到高级软件包管理工具(APT)仓库。 + + sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily + +![ppa](http://blog.linoxide.com/wp-content/uploads/2015/04/elementary-tweaks-ppa.png) + +一旦软件包添加到仓库后,我们需要用以下命令更新仓库 + + sudo apt-get update + +![update repository](http://blog.linoxide.com/wp-content/uploads/2015/04/update-repository.png) + +更新仓库后,我们就可以安装inkscape(不知是什么),用以下命令完成 + + sudo apt-get install elementary-tweaks + +![install elementary tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/install-elementary-tweaks.png) + +我们可以在个人区域的Application > System Settings下看到Tweaks选项的一个添加项。目前它提供给我们更多的选项,个性化定制我们的桌面。 + +![tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/tweaks.png) + +为了进一步定制,我们也安装了gnome桌面系统的tweak工具,演示解锁桌面。 + + sudo apt-get install gnome-tweak-tool + +![gnome](http://blog.linoxide.com/wp-content/uploads/2015/04/gnome.png) + +### 总结 ### + +Elementary OS十分接近Linux的发行版Ubuntu,它的正反两方面也都十分相似。Elementary OS在外观和体验上都十分轻巧和优雅,并且正在快速地走向成熟。它有潜力成为Windows和OS X操作系统之外的第三选择。最新的Elementary OS 0.3 (Freya)正凭借更好功能基础,在迅速的流行。想了解更多信息,最近的更新和下载,请访问官方[网站][1]。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/elementary-os-0-3-freya-install-guide/ + +作者:[Aun Raza][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-amd64.20150411.iso/download +[2]:http://sourceforge.net/projects/elementaryos/files/stable/elementaryos-freya-i386.20150411.iso/download +[3]:http://elementary.io/ From 7874268d0720e7e223b545638a4ae25a7af70ecc Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Fri, 17 Apr 2015 11:31:17 +0800 Subject: [PATCH 0558/2517] translated wi-cucoo llap --- ...ary OS 0.3 Freya Screenshots - Download and Install Guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md index 6deb2611b9..23db1ace55 100644 --- a/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md +++ b/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md @@ -80,7 +80,7 @@ Elementary OS 0.3以其轻巧和美观而为我们熟知,每个人有自己独 基本的个性化配置,点击Applications > System Settings > Desktop -我们可以改变壁纸,泊位和启用桌面热角。 +我们可以改变壁纸,泊板和启用桌面热角。 默认提供了很少的壁纸,更多的可以从网上下载或者从你的相机传输。 From c7ccfa88a2be49523d352486cbd723f3cd6ff237 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Fri, 17 Apr 2015 14:03:23 +0800 Subject: [PATCH 0559/2517] Delete 20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md --- ...ys Relaxing Sounds to Keep You Creative.md | 56 ------------------- 1 file changed, 56 deletions(-) delete mode 100644 sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md diff --git a/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md b/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md deleted file mode 100644 index f5ff129249..0000000000 --- a/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md +++ /dev/null @@ -1,56 +0,0 @@ -Translating by H-mudcup -Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative -================================================================================ -![Rain is a soothing sound for some](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/raining-1600x900-wallpaper_www.wallpapermay.com_84-1.jpg) -Rain is a soothing sound for some - -**If I plan on being productive I can’t listen to ‘regular’ music. It distracts me. I start singing along or get reminded of a different track, so end up poking around my library and… Well, that’s that.** - -But by the same token I can’t work in silence (living with 6 cats means that’s not a possibility, though) but the inconsistency jars and sudden clatters and meows interrupt. - -My solution that is to **listen to ambient noise**. - -I find it helps nullify the misdirection my brain craves, land provide a soundscape that wraps the noise of kitty play time. - -Ambient noise is the noise that play out in the background of daily lives; the rain drumming on a window, the intelligible hum of coffee shop chatter, the gossiping of birds on the wind, and so on. - -Listening to these sounds can force a racing mind to slow down, rebase and refocus on what matters. - -### Ambient Noise App for Ubuntu ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/ambient-noise-player-750x365.jpg) - -Google Play and Apple app stores are packed full of ambient and white noise apps. Now a similar tool is available natively on Ubuntu. - -‘[Ambient Noise][1]‘ — as the name might suggest — is an audio player designed specifically for playing these sounds. It even integrates with the Ubuntu Sound Menu for a neat ‘pick, click and relax’ experience. - -The app, which is also known as ‘ANoise Player’ and is made by Marcos Costales, comes with a set of **8 high-quality sounds**. - -These 8 presets cover various ambient atmospheres, ranging from the rhythmic sound of rain, to the tranquil tones of nature at night, and back to the buzz of a bustling coffee shop in the afternoon. - -### Install ANoise Player in Ubuntu ### - -Ambient Noise player for Ubuntu is a free application and is available to install from its own dedicated PPA. - -To do this open a new Terminal window and run: - - sudo add-apt-repository ppa:costales/anoise - - sudo apt-get update && sudo apt-get install anoise - -Once installed simply open it from the Unity Dash (or your DE’s equivalent), pick your preferred noise using Sound Menu and then …relax! The app even remembers which sound you used last. - -Even so, give it a try out and see if it suits your needs. I would say let me know what you think, but I will be too focused to hear — and so might you! - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/04/ambient-noise-player-app-for-ubuntu-linux - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://anoise.tuxfamily.org/ From dcc9a383640e89f997059b4b963ae1d7bfd7c5d5 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Fri, 17 Apr 2015 14:04:37 +0800 Subject: [PATCH 0560/2517] Create 20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md --- ...ys Relaxing Sounds to Keep You Creative.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md diff --git a/translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md b/translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md new file mode 100644 index 0000000000..f468b24754 --- /dev/null +++ b/translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md @@ -0,0 +1,57 @@ +Translated by H-mudcup + +适用于Ubuntu的环境音播放器播放让人放松的声音保持你的创造力 +================================================================================ +![Rain is a soothing sound for some](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/raining-1600x900-wallpaper_www.wallpapermay.com_84-1.jpg) +对于某些人来说雨声是个令人安心的声音 + +**如果我想变得非常有效率,我不能听‘正常’的音乐。它会使我分心,我会开始跟着唱或者让我想起另一首歌,结局就是我在自己的音乐库里到处戳并且……反正,你懂的。** + +同样我也不能在寂静的环境中工作(虽然和6只猫生活在一起意味着这不太可能)但是无规律的刺耳声音和突然地咔哒声以及猫叫声会打破寂静。 + +我的解决办法是听**环境音**。 + +我发现它能帮助我消除大脑的里的胡思乱想,提供了一个声景覆盖了猫咪玩耍的声音。 + +环境音就是日常生活中的背景噪音;雨滴在窗户上敲打的声音,咖啡店里人们聊天的嗡嗡声,风中鸟儿们闲聊的声音,等等。 + +倾听这些声音会强迫一个疯狂运行的大脑减速,重新沉静下来重新把精力聚集到重要的事情上。 + +### 适用于Ubuntu的环境音应用 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/ambient-noise-player-750x365.jpg) + +Google Play和苹果应用商店充满了环境音和白噪声的应用。现在,在Ubuntu里有同样的应用了。 + +‘[Ambient Noise][1]‘ ‘[环境音][1]’——人如其名——是一个专门被设计成播放这种声音的音频播放器。他甚至可以同Ubuntu声音菜单整合到一起,给你‘选择,点击即放松’的体验。 + +这个应用(又被称为‘ANoise播放器’,由Marcos Costales制作)带有**8个高品质声道**。 + +这8个预设声道涵盖了多种环境,从下雨时有节奏的声音,到夜晚大自然静谧的旋律,还有下午熙熙攘攘的咖啡店的嗡嗡声。 + +### 在Ubuntu上安装ANoise播放器 ### + +适用于Ubuntu的环境音播放器是个免费的应用而且可以从它专用的PPA里安装。 + +要这样安装请先打开一个新的终端窗口运行: + + sudo add-apt-repository ppa:costales/anoise + + sudo apt-get update && sudo apt-get install anoise + +安装好以后只需从Unity Dash(或DE里等价的地方)里打开它,通过声音菜单选择你喜欢的环境音然后……放松吧!这个应用甚至记得你上次用的环境音。 + +Even so, give it a try out and see if it suits your needs. I would say let me know what you think, but I will be too focused to hear — and so might you!即便如此,你还是要试一试看它是否能满足你的需要。我要说的是让我直到你是怎么想的,但是我将会专心致志到听不到你的声音——你可能也会这样! + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/ambient-noise-player-app-for-ubuntu-linux + +作者:[Joey-Elijah Sneddon][a] +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://anoise.tuxfamily.org/ From 8b1abbaa34121bc800a9d2fcf34fc1150630e0c8 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 17 Apr 2015 15:44:12 +0800 Subject: [PATCH 0561/2517] =?UTF-8?q?20150417-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...xamples of Linux 'sort' Command--Part 1.md | 130 +++++++ ...ure MariaDB Replication on CentOS Linux.md | 359 ++++++++++++++++++ ...Install Discourse in a Docker Container.md | 160 ++++++++ ...om Elrepo or Source on Ubuntu or CentOs.md | 147 +++++++ ...A transparent proxy-based VPN using ssh.md | 93 +++++ 5 files changed, 889 insertions(+) create mode 100644 sources/tech/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md create mode 100644 sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md create mode 100644 sources/tech/20150417 How to Install Discourse in a Docker Container.md create mode 100644 sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md create mode 100644 sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md diff --git a/sources/tech/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md b/sources/tech/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md new file mode 100644 index 0000000000..568c51edbf --- /dev/null +++ b/sources/tech/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md @@ -0,0 +1,130 @@ +14 Useful Examples of Linux ‘sort’ Command – Part 1 +================================================================================ +Sort is a Linux program used for printing lines of input text files and concatenation of all files in sorted order. Sort command takes blank space as field separator and entire Input file as sort key. It is important to notice that sort command don’t actually sort the files but only print the sorted output, until your redirect the output. + +This article aims at deep insight of Linux ‘sort‘ command with 14 useful practical examples that will show you how to use sort command in Linux. + +### 1. First we will be creating a text file (tecmint.txt) to execute ‘sort‘ command examples. Our working directory is ‘/home/$USER/Desktop/tecmint. ### + +The option ‘-e‘ in the below command enables interpretion of backslash and /n tells echo to write each string to a new line. + + $ echo -e "computer\nmouse\nLAPTOP\ndata\nRedHat\nlaptop\ndebian\nlaptop" > tecmint.txt + +![Split String by Lines in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Split-String-by-Lines.gif) + +### 2. Before we start with ‘sort‘ lets have a look at the contents of the file and the way it look. ### + + $ cat tecmint.txt + +![Check Content of File](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Content-of-File.gif) + +### 3. Now sort the content of the file using following command. ### + + $ sort tecmint.txt + +![Sort Content of File linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content.gif) + +**Note**: The above command don’t actually sort the contents of text file but only show the sorted output on terminal. + +### 4. Sort the contents of the file ‘tecmint.txt‘ and write it to a file called (sorted.txt) and verify the content by using [cat command][1]. ### + + $ sort tecmint.txt > sorted.txt + $ cat sorted.txt + +![Sort File Content in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-File-Content.gif) + +### 5. Now sort the contents of text file ‘tecmint.txt‘ in reverse order by using ‘-r‘ switch and redirect output to a file ‘reversesorted.txt‘. Also check the content listing of the newly created file. ### + + $ sort -r tecmint.txt > reversesorted.txt + $ cat reversesorted.txt + +![Sort Content By Reverse](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Reverse.gif) + +### 6. We are going a create a new file (lsl.txt) at the same location for detailed examples and populate it using the output of ‘ls -l‘ for your home directory. ### + + $ ls -l /home/$USER > /home/$USER/Desktop/tecmint/lsl.txt + $ cat lsl.txt + +![Populate Output of Home Directory](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Output.gif) + +Now will see examples to sort the contents on the basis of other field and not the default initial characters. + +### 7. Sort the contents of file ‘lsl.txt‘ on the basis of 2nd column (which represents number of symbolic links). ### + + $ sort -nk2 lsl.txt + +**Note**: The ‘-n‘ option in the above example sort the contents numerically. Option ‘-n‘ must be used when we wanted to sort a file on the basis of a column which contains numerical values. + +![Sort Content by Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-by-Column.gif) + +### 8. Sort the contents of file ‘lsl.txt‘ on the basis of 9th column (which is the name of the files and folders and is non-numeric). ### + + $ sort -k9 lsl.txt + +![Sort Content Based on Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Based-on-Column.gif) + +### 9. It is not always essential to run sort command on a file. We can pipeline it directly on the terminal with actual command. ### + + $ ls -l /home/$USER | sort -nk5 + +![Sort Content Using Pipe Option](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Pipeline.gif) + +### 10. Sort and remove duplicates from the text file tecmint.txt. Check if the duplicate has been removed or not. ### + + $ cat tecmint.txt + $ sort -u tecmint.txt + +![Sort and Remove Duplicates](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-and-Remove-Duplicates.gif) + +Rules so far (what we have observed): + +- Lines starting with numbers are preferred in the list and lies at the top until otherwise specified (-r). +- Lines starting with lowercase letters are preferred in the list and lies at the top until otherwise specified (-r). +- Contents are listed on the basis of occurrence of alphabets in dictionary until otherwise specified (-r). +- Sort command by default treat each line as string and then sort it depending upon dictionary occurrence of alphabets (Numeric preferred; see rule – 1) until otherwise specified. + +### 11. Create a third file ‘lsla.txt‘ at the current location and populate it with the output of ‘ls -lA‘ command. ### + + $ ls -lA /home/$USER > /home/$USER/Desktop/tecmint/lsla.txt + $ cat lsla.txt + +![Populate Output With Hidden Files](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Output-With-Hidden-Files.gif) + +Those having understanding of ‘ls‘ command knows that ‘ls -lA’=’ls -l‘ + Hidden files. So most of the contents on these two files would be same. + +### 12. Sort the contents of two files on standard output in one go. ### + + $ sort lsl.txt lsla.txt + +![Sort Contents of Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-of-Multiple-Files.gif) + +Notice the repetition of files and folders. + +### 13. Now we can see how to sort, merge and remove duplicates from these two files. ### + + $ sort -u lsl.txt lsla.txt + +![Sort, Merge and Remove Duplicates from File](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Merge-Duplicates-Content.gif) + +Notice that duplicates has been omitted from the output. Also, you can write the output to a new file by redirecting the output to a file. + +### 14. We may also sort the contents of a file or the output based upon more than one column. Sort the output of ‘ls -l‘ command on the basis of field 2,5 (Numeric) and 9 (Non-Numeric). ### + + $ ls -l /home/$USER | sort -t "," -nk2,5 -k9 + +![Sort Content By Field Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Field-Column.gif) + +That’s all for now. In the next article we will cover a few more examples of ‘sort‘ command in detail for you. Till then stay tuned and connected to Tecmint. Keep sharing. Keep commenting. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/sort-command-linux/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ \ No newline at end of file diff --git a/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md b/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md new file mode 100644 index 0000000000..a5a717cf46 --- /dev/null +++ b/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md @@ -0,0 +1,359 @@ +How to Configure MariaDB Replication on CentOS Linux +================================================================================ +Its a process of creating duplicate versions of a the DB. Replication process is not only copies a database, but also synchronizes changes from master to one of the slaves. But this is does not means that slave databases are identical copy of the master, because replication can be configured that only a schema of tables or columns or rows will be replicated, i.e. a partial replication. The replication ensures that those specific configured objects are kept in sync between the different databases. + +### Mariadb Replication Concepts ### + +**Backups** : Replication can be used for DB backups. For example, you have master -> slave replication. If master is lost (hdd fails, for example) you can restore your db from master. + +**Scaling** : You can use master -> slave replication for scaling solution. For example, if you have a few big and have SQL query, using replcation you can separate this queries for each replcations nodes. Write SQL should be performed only on master, for read-only queries slave server can be used. + +**Spreading solution** : You can use replication for distribution. For example, you can distribute different sales data to different databases. + +**Failover solution** : For example you have, master -> slave(1) -> slave(2) -> slave(3) replication. You can write script for master monitoring , if master fails, script can quickly change slave(1) new for master master -> slave(1) -> slave(2) and your application will continue working whit out downtime + +### Simple diagrammatic demonstration of replication ### + +![mysql replication principle](http://blog.linoxide.com/wp-content/uploads/2015/04/mysql-replication-principle.png) + +Before you start good know what is **binary log** and Ibdata1. The binary log contains a record about all changes in the db, data and structure, as well as how long each statement took to execute. Bin log consists set log files and an index. Its means that main SQL statements such as CREATE, ALTER, INSERT, UPDATE and DELETE will be putted to this log, statements, such as SELECT will not be logged. These info can be logged to general query.log file. In simple **Ibdata1** is a file which contains all tables and all info about db. + +### Master server configuration ### + +Good to have server updated + + sudo yum install update -y && sudo yum install upgrade -y + +We are working on centos 7 server + + sudo cat /etc/redhat-release + + CentOS Linux release 7.0.1406 (Core) + +Install MariaDB + + sudo yum install mariadb-server -y + +Start MariaDB and enable it to start on boot of the server + + sudo systemctl start mariadb.service + sudo systemctl enable mariadb.service + +Output: + + ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service' + +Check MariaDB status + + sudo service mariadb status + +or use + + sudo systemctl is-active mariadb.service + +Output: + + Redirecting to /bin/systemctl status mariadb.service + mariadb.service - MariaDB database server + Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled) + +Set MariaDB password + + mysql -u root + mysql> use mysql; + mysql> update user set password=PASSWORD("SOME_ROOT_PASSWORD") where User='root'; + mysql> flush privileges; + mysql> exit + +SOME_ROOT_PASSWORD - your root password. I my case I'ill use "q" - password, then try to login: + + sudo mysql -u root -pSOME_ROOT_PASSWORD + +Output: + + Welcome to the MariaDB monitor. Commands end with ; or \g. + Your MariaDB connection id is 5 + Server version: 5.5.41-MariaDB MariaDB Server + Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others. + +Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. + +Lets create database with table with some data + +Create database/schema + + sudo mysql -u root -pSOME_ROOT_PASSWORD + mysql> create database test_repl; + +Where: + + test_repl - Name of shcema which will be replicated + +Output: + + Query OK, 1 row affected (0.00 sec) + +Create Persons table + + mysql> use test_repl; + + CREATE TABLE Persons ( + PersonID int, + LastName varchar(255), + FirstName varchar(255), + Address varchar(255), + City varchar(255) + ); + +Output: + + mysql> MariaDB [test_repl]> CREATE TABLE Persons ( + -> PersonID int, + -> LastName varchar(255), + -> FirstName varchar(255), + -> Address varchar(255), + -> City varchar(255) + -> ); + Query OK, 0 rows affected (0.01 sec) + +Insert some data + + mysql> INSERT INTO Persons VALUES (1, "LastName1", "FirstName1", "Address1", "City1"); + mysql> INSERT INTO Persons VALUES (2, "LastName2", "FirstName2", "Address2", "City2"); + mysql> INSERT INTO Persons VALUES (3, "LastName3", "FirstName3", "Address3", "City3"); + mysql> INSERT INTO Persons VALUES (4, "LastName4", "FirstName4", "Address4", "City4"); + mysql> INSERT INTO Persons VALUES (5, "LastName5", "FirstName5", "Address5", "City5"); + +Output: + + Query OK, 5 row affected (0.00 sec) + +Check data + + mysql> select * from Persons; + +Output: + + +----------+-----------+------------+----------+-------+ + | PersonID | LastName | FirstName | Address | City | + +----------+-----------+------------+----------+-------+ + | 1 | LastName1 | FirstName1 | Address1 | City1 | + | 1 | LastName1 | FirstName1 | Address1 | City1 | + | 2 | LastName2 | FirstName2 | Address2 | City2 | + | 3 | LastName3 | FirstName3 | Address3 | City3 | + | 4 | LastName4 | FirstName4 | Address4 | City4 | + | 5 | LastName5 | FirstName5 | Address5 | City5 | + +----------+-----------+------------+----------+-------+ + +### Configure MariaDB for replication ### + +You'll need to edit the my.cnf file on the Master server to enable binary logging and set the server's id. I will use vi text editor, but use can use any suitable for your such as nano, joe etc. + + sudo vi /etc/my.cnf + +and put to config in [mysqld] section such lines. + + + log-basename=master + log-bin + binlog-format=row + server_id=1 + +Output: + +![mariadb config master](http://blog.linoxide.com/wp-content/uploads/2015/04/mariadb-config.png) + +Then restart MariaDB: + + sudo service mariadb restart + +Login to MariaDB and check binary logs: + +sudo mysql -u root -pq test_repl + +mysql> SHOW MASTER STATUS; + +Output: + + +--------------------+----------+--------------+------------------+ + | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | + +--------------------+----------+--------------+------------------+ + | mariadb-bin.000002 | 3913 | | | + +--------------------+----------+--------------+------------------+ + +**Remember** : "File" and "Position" values. YOU WILL NEED THIS VALUE AT SLAVE SERVER + +Create user for replication + + mysql> GRANT REPLICATION SLAVE ON *.* TO replication_user IDENTIFIED BY 'bigs3cret' WITH GRANT OPTION; + mysql> flush privileges; + +Output: + + Query OK, 0 rows affected (0.00 sec) + Query OK, 0 rows affected (0.00 sec) + +Check user in db + + mysql> select * from mysql.user WHERE user="replication_user"\G; + +Output: + + mysql> select * from mysql.user WHERE user="replication_user"\G; + *************************** 1. row *************************** + Host: % + User: replication_user + Password: *2AF30E7AEE9BF3AF584FB19653881D2D072FA49C + Select_priv: N + ..... + +Create DB dump (snapshot of all data which will be replicated) form master + + mysqldump -uroot -pSOME_ROOT_PASSWORD test_repl > full-dump.sql + +Where: + + SOME_ROOT_PASSWORD - password for root user that you have setup + test_repl - name of the data base which will be replicated; + +You need to recover mysql dump (full-dump.sql) at slave server. Its needed for replication. + +### Slave server configuration ### + +All this commands you need to perform at slave server + +Lets assume that we have fresh/updated CentOS 7.x server with latest mariaDB server and you can login as root to maria DB server (this was descripbed in first part of the article) + +Login to Maria DB console and create DB + + mysql -u root -pSOME_ROOT_PASSWORD; + mysql> create database test_repl; + mysql> exit; + +Recover data from master at slave server + + mysql -u root -pSOME_ROOT_PASSWORD test_repl < full-dump.sql + +Where: + +full-dump.sql - its DB Dump that you have create at test server. + +Login to Maria DB and setup replication + + mysql> CHANGE MASTER TO + MASTER_HOST='82.196.5.39', + MASTER_USER='replication_user', + MASTER_PASSWORD='bigs3cret', + MASTER_PORT=3306, + MASTER_LOG_FILE='mariadb-bin.000002', + MASTER_LOG_POS=3913, + MASTER_CONNECT_RETRY=10; + +![mariadb setup replication](http://blog.linoxide.com/wp-content/uploads/2015/04/setup-replication.png) + +Where: + + MASTER_HOST - IP of the master server. + MASTER_USER - replication user at master server + MASTER_PASSWORD - replication user password + MASTER_PORT - mysql port at master + MASTER_LOG_FILE - bin-log file name form master + MASTER_LOG_POS - bin-log position file at master + +Start slave mode + + mysql> slave start; + +Output: + + Query OK, 0 rows affected (0.00 sec) + +Check slave status + + mysql> show slave status\G; + +Output: + + *************************** 1. row *************************** + Slave_IO_State: Waiting for master to send event + Master_Host: 82.196.5.39 + Master_User: replication_user + Master_Port: 3306 + Connect_Retry: 10 + Master_Log_File: mariadb-bin.000002 + Read_Master_Log_Pos: 4175 + Relay_Log_File: mariadb-relay-bin.000002 + Relay_Log_Pos: 793 + Relay_Master_Log_File: mariadb-bin.000002 + Slave_IO_Running: Yes + Slave_SQL_Running: Yes + Replicate_Do_DB: + Replicate_Ignore_DB: + Replicate_Do_Table: + Replicate_Ignore_Table: + Replicate_Wild_Do_Table: + Replicate_Wild_Ignore_Table: + Last_Errno: 0 + Last_Error: + Skip_Counter: 0 + Exec_Master_Log_Pos: 4175 + Relay_Log_Space: 1089 + Until_Condition: None + Until_Log_File: + Until_Log_Pos: 0 + Master_SSL_Allowed: No + Master_SSL_CA_File: + Master_SSL_CA_Path: + Master_SSL_Cert: + Master_SSL_Cipher: + Master_SSL_Key: + Seconds_Behind_Master: 0 + Master_SSL_Verify_Server_Cert: No + Last_IO_Errno: 0 + Last_IO_Error: + Last_SQL_Errno: 0 + Last_SQL_Error: + Replicate_Ignore_Server_Ids: + Master_Server_Id: 1 + 1 row in set (0.00 sec) + +At this step all shoul be ok, and not erros should be here. + +### Test the replication ### + +At MAIN/MASTER server add some entities to DB + + mysql -u root -pSOME_ROOT_PASSWORD test_repl + + mysql> INSERT INTO Persons VALUES (6, "LastName6", "FirstName6", "Address6", "City6"); + mysql> INSERT INTO Persons VALUES (7, "LastName7", "FirstName7", "Address7", "City7"); + mysql> INSERT INTO Persons VALUES (8, "LastName8", "FirstName8", "Address8", "City8"); + +Then go to the SLAVE server and check replicated data + + mysql -u root -pSOME_ROOT_PASSWORD test_repl + + mysql> select * from Persons; + + +----------+-----------+------------+----------+-------+ + | PersonID | LastName | FirstName | Address | City | + +----------+-----------+------------+----------+-------+ + ................... + | 6 | LastName6 | FirstName6 | Address6 | City6 | + | 7 | LastName7 | FirstName7 | Address7 | City7 | + | 8 | LastName8 | FirstName8 | Address8 | City8 | + +----------+-----------+------------+----------+-------+ + +You can see the data is replicated to slave server. Its mean that replication is working. Hope you enjoyed the article. Let us know if you have any questions. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/configure-mariadb-replication-centos-linux/ + +作者:[Bobbin Zachariah][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bobbin/ \ No newline at end of file diff --git a/sources/tech/20150417 How to Install Discourse in a Docker Container.md b/sources/tech/20150417 How to Install Discourse in a Docker Container.md new file mode 100644 index 0000000000..c916bda8f2 --- /dev/null +++ b/sources/tech/20150417 How to Install Discourse in a Docker Container.md @@ -0,0 +1,160 @@ +How to Install Discourse in a Docker Container +================================================================================ +Hi all, today we'll learn how to install Discourse using Docker Platform. Discourse is the 100% open source discussion platform built for the next decade of the Internet featuring as a mailing list, a discussion forum and a long-form chat room. It is a smart way of attempt to reimagine what a modern, sustainable, fully open-source Internet discussion platform should be today, both from a technology standpoint and a sociology standpoint. Discourse is simple, clean, and straightforward way for discussion. It is really an awesome platform for any kinds of discussions on internet featuring such a cool services out of the box. Docker is an open source platform that provides an open platform to pack, ship and run any application as a lightweight container. Docker containers makes Discourse a lot handy and easy to setup app. + +So, here are some quick and easy steps in order to install Discourse inside a Docker environment. + +### 1. Installing Docker ### + +First of all, we need to make sure that we have Docker installed in our host Operating System. To install, we'll need to the run the following command in a shell or terminal. + +#### On Ubuntu #### + +Package docker is available in Ubuntu's repository so, we'll be using apt manager to install it in sudo or root mode. + + # apt-get install docker + +#### On CentOS 7 #### + +On CentOS 7 machine, we'll use yum manager to install docker as it is also available in CentOS's repository. + + # yum install docker + +![Installing Docker](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png) + +### 2. Setting Swap Memory ### + +If you have RAM size less than 1 GB then, make sure you upgrade your system to 1 GB or above cause Discourse doesn't get installed in 512 MB RAM. If you are now ready to install Discourse with 1 GB or above, follow the following steps to setup swap memory for you VPS or Server. + +We'll create an empty swapfile by running the following command. + + # install -o root -g root -m 0600 /dev/null /swapfile + +If you want your swap memory to be 1 GB, then do the below step and skip the next step. + + # dd if=/dev/zero of=/swapfile bs=1k count=1024k + +if you want it to be 2 GB, follow the below. Make sure you skip the above step. + + # dd if=/dev/zero of=/swapfile bs=1k count=2048k + +Then, we'll point Swap Memory as swapfile . + + #mkswap /swapfile + +To activate it run the following command. + + #swapon /swapfile + +Now, we'll add it to the file system table so its there after reboot: + + # echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab + +Set the swappiness to 10 so its only uses as an emergency buffer. + + # sudo sysctl -w vm.swappiness=10 + # echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf + +### 3. Installing Discourse ### + +After installing Docker in our host machine, we'll now go further towards installing Discourse. We'll now clone Discourse from the official Discourse Github into /var/discourse directory. To do so, we'll need to run the following command. + + # mkdir /var/discourse/ + + # cd /var/discourse/ + + # git clone https://github.com/discourse/discourse_docker.git /var/discourse/ + +After cloning the git repository, we'll copy the configuration file for our discourse server. + + # cp samples/standalone.yml containers/app.yml + +![Cloning Discourse Docker](http://blog.linoxide.com/wp-content/uploads/2015/04/cloning-discourse-docker.png) + +### 4. Configuring Discourse ### + +Next, we'll edit the discourse configuration ie app.yml located inside containers directory using our favorite text editor. + + # nano containers/app.yml + +Now, we need to set the developer's email address to DISCOURSE_DEVELOPER_EMAILS as follows. + + DISCOURSE_DEVELOPER_EMAILS: 'arun@linoxide.com' + +Then, we'll set the hostname as the domain name of our server. + + DISCOURSE_HOSTNAME: 'discourse.linoxide.com' + +Then, set the mail credentials per our SMTP Server hosted in the same discourse machine or vps. The SMTP settings are required to send mail from your Discourse instance + + DISCOURSE_SMTP_ADDRESS: smtp.linoxide.com + DISCOURSE_SMTP_PORT: 587 # (optional) + DISCOURSE_SMTP_USER_NAME: admin@linoxide.com # (optional) + DISCOURSE_SMTP_PASSWORD: test123 # (optional) + +![](http://blog.linoxide.com/wp-content/uploads/2015/04/discourse-configuration.png) + + Discourse Configuration + +If you are using a 1 GB instance, set UNICORN_WORKERS to 2 and db_shared_buffers to 128MB so you have more memory room. + +It is compulsory to create a mailing server to run Discourse. If you have a server then its cool, we can use its credentials. If you have no existing mail server, or you don't know what it is? No problem, create a free account on [Mandrill][1] ([Mailgun][2], or [Mailjet][3]), and use the credentials provided in the dashboard. + +### 5. Starting Discourse App ### + +After configuring the discourse configuration file, we'll surely wanna start our Discourse server. To do so, first we'll launch discourse bootstrap by running the following command under the current directory ie /var/discourse/ . + + # ./launcher bootstrap app + +![Starting Discourse Bootstrap](http://blog.linoxide.com/wp-content/uploads/2015/04/starting-discourse-bootstrap.png) + +The above command may take some minutes which automatically configures our Discourse environment. Then, after the processes are finished, we'll need to run the following to start our Discourse App. + + #./launcher start app + +![Starting Discourse](http://blog.linoxide.com/wp-content/uploads/2015/04/starting-discourse.png) + +If everything went as expected accordingly, we'll be able to access our fresh Discourse Web Interface using our favorite Web Browser by pointing the url to http://ip-address/ or http://discourse.linoxide.com/ . Then, we can create a new account and become admin. + +![Discourse Web interface](http://blog.linoxide.com/wp-content/uploads/2015/04/Discourse-web-interface.png) + +### Maintenance ### + +Here below are the usages of the launcher command inside /var/discourse/ directory so that we can commit maintenance and control over the Discourse Docker Container. + + Usage: launcher COMMAND CONFIG [--skip-prereqs] + Commands: + start: Start/initialize a container + stop: Stop a running container + restart: Restart a container + destroy: Stop and remove a container + enter: Use nsenter to enter a container + ssh: Start a bash shell in a running container + logs: Docker logs for container + mailtest: Test the mail settings in a container + bootstrap: Bootstrap a container for the config based on a template + rebuild: Rebuild a container (destroy old, bootstrap, start new) + cleanup: Remove all containers that have stopped for > 24 hours + + Options: + --skip-prereqs Don't check prerequisites + --docker-args Extra arguments to pass when running docker + +### Conclusion ### + +Hurray! We have successfully installed Discourse with Docker Technology. Docker technology makes Discourse very much easy to install in any Platform with all the requirement fulfilled. We need our own mailing server or credentials of a mailing server to get started with it. It is a great platform for easy modern mailing list, discussion platform. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/install-discourse-docker-container/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://mandrillapp.com/ +[2]:http://www.mailgun.com/ +[3]:https://www.mailjet.com/pricing \ No newline at end of file diff --git a/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md new file mode 100644 index 0000000000..3e2c0bd509 --- /dev/null +++ b/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md @@ -0,0 +1,147 @@ +How to Install Linux Kernel 4.0 from Elrepo / Source on Ubuntu / CentOs +================================================================================ +Hi everyone, today we'll learn how to install the latest Linux Kernel 4.0 from Elrepo and compiling using Source. Linux Kernel 4.0 is the latest Mainline Kernel codenamed ‘Hurr durr I’m a sheep’ till date. It is the kernel released after the stable released of 3.19.4 . April 12 is considered as a big day for all fans of the Open Source movement, as Linus Torvalds announced the release of Linux Kernel 4.0 and its immediate availability. It is considered as a big release as it consists of some awesome features which includes no-reboot patching (Live Patching), New and Updated Drivers, New and Latest Hardware Support and more interesting features with a new version change. But Kernel 4.0 is not considered as a huge release as expected but Linus announced that 4.1 is expected for a bigger release. The Live Patching feature was already integrated with the SUSE Enterprise Linux operating system. Here is the [release announcement][1] you can check for more details about the release. + +> **WARNING**: Installing a new kernel may render your system unusable or unstable. If you proceed with the installation using the instructions below, make sure you back up any important data you have to an external hard drive. + +### Installing Linux Kernel 4.0 on Ubuntu 15.04 ### + +If you are running an Ubuntu 15.04 Distribution of Linux. You can simply install it straight from Ubuntu Kernel site. To install the latest Linux Kernel 4.0 in your Ubuntu 15.04, you'll need to run the following commands under root access in a shell or a terminal. + +#### On a 64-bit Ubuntu 15.04 #### + + $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb + + $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb + +#### On a 32-bit Ubuntu 15.04 #### + + $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_i386.deb + + $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb + +### Installing Linux Kernel 4.0 on CentOS 7 ### + +We can easily install Linux Kernel 4.0 using two ways in CentOS 7 . + +1. Installing from Elrepo Repository +1. Compiling and installing from the Source Code + +First we'll gonna go for installing using ELRepo as its the easiest way to do. + +#### Installing using Elrepo #### + +**1. Downloading and Installing ELRepo** + +We'll first gonna download the GPG key of ELRepo and install the relrepo-release package. As we're running CentOS 7, we'll gonna install elrepo-release-7.0-2.el7.elrepo.noarch.rpm using the command below. + +Note: If you have a secure boot enabled please see [this page for more information][2]. + + # rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org + # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm + +![Adding Elrepo Source](http://blog.linoxide.com/wp-content/uploads/2015/04/adding-elrepo.png) + +**2. Updating Linux Kernel to version 4.0** + +Now, we'll gonna install the latest stable kernel 4.0 from the ELRepo repository. To do so, we'll need to enter the following commands in a shell or terminal of the CentOS 7. + + # yum --enablerepo=elrepo-kernel install kernel-ml + +![Installing Linux Kernel 4.0 from ELRepo](http://blog.linoxide.com/wp-content/uploads/2015/04/installing-kernel-4-0-elrepo.png) + +The above command will automatically install the Linux Kernel 4.0 build for CentOS 7. + +Now, here below is the another way of installing the latest kernel 4.0 by compiling from the source. + +#### Compiling and Installing from the Source #### + +**1. Installing the Dependencies** + +So, first of all we'll need to install the dependencies required to compile the linux kernel. To do so, we'll need to run the following command in a terminal or a shell. + + # yum groupinstall "Development Tools" + + # yum install gcc ncurses ncurses-devel + +![Installing Kernel Dependencies](http://blog.linoxide.com/wp-content/uploads/2015/04/installing-dependencies.png) + +Then, we'll gonna update our whole system. + + # yum update + +**2. Downloading the source** + +We'll now download the latest release linux kernel 4.0 source using wget command from the official repository of Linux Kernel. You can also download the kernel directly from the site [kernel.org][3] using your web browser also. + + # cd /tmp/ + # wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.0.tar.xz + +![Download Kernel Source](http://blog.linoxide.com/wp-content/uploads/2015/04/download-kernel-source.png) + +**3. Extracting the tarball** + +Once the file is downloaded we'll extract it under /usr/src/ directory by running the below command. + + # tar -xf linux-4.0.tar.xz -C /usr/src/ + # cd /usr/src/linux-4.0/ + +![Extracting Kernel Tarball](http://blog.linoxide.com/wp-content/uploads/2015/04/extracting-kernel-tarball.png) + +**4. Configuring** + +We have two options to configure the Linux Kernel. We can either create a new custom configuration or use the old configuration to build and install the Linux Kernel. It all depends on what you really want. + +**For New Kernel Configuration** + +Now we'll run the make menuconfig command in the shell or terminal to configure the Linux kernel. Once we've executed the below command a pop up window with all the menus appears. Here we can select our new kernel configuration. If you unfamiliar with these menus, just hit double ESC key to exit. + + # make menuconfig + +![Configuring New Kernel Config](http://blog.linoxide.com/wp-content/uploads/2015/04/configuring-new-kernel-config.png) + +**For Old Configuration** + +If you like to configure your latest kernel with your old configuration then simple type the below command. If you were asked any stuff, you can choose with Y or N or you can simply press Enter to continue. + + # make oldconfig + +#### Step 5. Compiling the Linux Kernel #### + +Next, we'll execute the make command to compile the Kernel 4.0 . The compilation would take at least 20-30 minutes depends on your system configuration. + +Note: If you got an error while compiling the kernel saying bc command not found. You can fix that by installing bc using the command **yum install bc** . + + # make +![Make Kernel](http://blog.linoxide.com/wp-content/uploads/2015/04/make-kernel.png) + +#### 6. Installing Linux Kernel 4.0 #### + +Once the compilation is completed, we'll now finally install the **Kernel** in our Linux System. The below command will create files under /boot directory and also makes a new kernel entry in the Grub Menu. + + # make modules_install install + +#### 7. Verifying Kernel #### + +After installing our latest kernel 4.0 we'll want to verify it. To do so we'll just type the following command on the terminal. If everything went fine, we'll get the kernel version ie. 4.0 enlisted in the output below. + + # uname -r + +#### Conclusion #### + +Hurray, we have successfully installed the latest version of linux kernel ie 4.0 in our CentOS 7 Operating System. Upgrading a linux kernel is always not necessary cause the hardware you got working with the previous version of it may not get working with the newer version. We should make sure that the it includes the features and stuffs that are necessary to make your hardware working. But mostly, the newer stable versions of kernel makes your hardware performance better. So, if you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy the latest stable version of Linux Kernel 4.0 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/install-linux-kernel-4-0-elrepo-source/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://lkml.iu.edu/hypermail/linux/kernel/1504.1/03198.html +[2]:http://elrepo.org/tiki/SecureBootKey +[3]:http://kernel.org/ \ No newline at end of file diff --git a/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md new file mode 100644 index 0000000000..ae5c129bee --- /dev/null +++ b/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md @@ -0,0 +1,93 @@ +sshuttle – A transparent proxy-based VPN using ssh +================================================================================ +sshuttle allows you to create a VPN connection from your machine to any remote server that you can connect to via ssh, as long as that server has python 2.3 or higher.To work, you must have root access on the local machine, but you can have a normal account on the server. + +It's valid to run sshuttle more than once simultaneously on a single client machine, connecting to a different server every time, so you can be on more than one VPN at once.If run on a router, sshuttle can forward traffic for your entire subnet to the VPN. + +### Install sshuttle on ubuntu ### + +Open the terminal and run the following command + + sudo apt-get install sshuttle + +### Using sshuttle ### + +#### sshuttle Syntax #### + + sshuttle [options...] [-r [username@]sshserver[:port]] [subnets] + +#### Option details #### + +-r, —remote=[username@]sshserver[:port] + +the remote hostname and optional username and ssh port number to use for connecting to the remote server. For example,example.com, testuser@example.com, testuser@example.com:2222, or example.com:2244. + +#### sshuttle Examples #### + +From the machine use the following command + + sudo sshuttle -r username@sshserver 0.0.0.0/0 -vv + +When it starts, sshuttle creates an ssh session to the server specified by the -r option. If -r is omitted, it will start both its client and server locally, which is sometimes useful for testing. + +After connecting to the remote server, sshuttle uploads its (python) source code to the remote end and executes it there. Thus, you don't need to install sshuttle on the remote server, and there are never sshuttle version conflicts between client and server. + +#### More Examples From Man page #### + +Test locally by proxying all local connections, without using ssh: + + $ sudo sshuttle -v 0/0 + + Starting sshuttle proxy. + Listening on (‘0.0.0.0′, 12300). + [local sudo] Password: + firewall manager ready. + c : connecting to server... + s: available routes: + s: 192.168.42.0/24 + c : connected. + firewall manager: starting transproxy. + c : Accept: ‘192.168.42.106':50035 -> ‘192.168.42.121':139. + c : Accept: ‘192.168.42.121':47523 -> ‘77.141.99.22':443. + ...etc... + ^C + firewall manager: undoing changes. + KeyboardInterrupt + c : Keyboard interrupt: exiting. + c : SW#8:192.168.42.121:47523: deleting + c : SW#6:192.168.42.106:50035: deleting + +Test connection to a remote server, with automatic hostname and subnet +guessing: + + $ sudo sshuttle -vNHr example.org + + Starting sshuttle proxy. + Listening on (‘0.0.0.0′, 12300). + firewall manager ready. + c : connecting to server... + s: available routes: + s: 77.141.99.0/24 + c : connected. + c : seed_hosts: [] + firewall manager: starting transproxy. + hostwatch: Found: testbox1: 1.2.3.4 + hostwatch: Found: mytest2: 5.6.7.8 + hostwatch: Found: domaincontroller: 99.1.2.3 + c : Accept: ‘192.168.42.121':60554 -> ‘77.141.99.22':22. + ^C + firewall manager: undoing changes. + c : Keyboard interrupt: exiting. + c : SW#6:192.168.42.121:60554: deleting + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/sshuttle-a-transparent-proxy-based-vpn-using-ssh.html + +作者:[ruchi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file From e1aef6af71ae181e73e09acdcf0c8fa39d9a66b1 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 17 Apr 2015 18:01:30 +0800 Subject: [PATCH 0562/2517] Translating by ZTinoZ --- ...225 Linux FAQs with Answers--How to disable IPv6 on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md index aae9b99477..99e7d0b6bc 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -2,7 +2,7 @@ Linux有问必答时间--如何在Linux下禁用IPv6 ================================================================================ > **问题**:我发现我的一个应用程序在尝试通过IPv6建立连接,但是由于我们本地网络不允许分配IPv6的流量,IPv6连接会超时,应用程序的连接会退回到IPv4,这样就会造成不必要的延迟。由于我目前对IPv6没有任何需求,所以我想在我的Linux主机上禁用IPv6。有什么比较合适的方法呢? -IPv6 has been introduced as a replacement of IPv4, the traditional 32-bit address space used in the Internet, to solve the imminent exhaustion of available IPv4 address space. However, since IPv4 has been used by every host or device connected to the Internet, it is practically impossible to switch every one of them to IPv6 overnight. Numerous IPv4 to IPv6 transition mechanisms (e.g., dual IP stack, tunneling, proxying) have been proposed to facilitate the adoption of IPv6, and many applications are being rewritten, as we speak, to add support for IPv6. One thing for sure is that IPv4 and IPv6 will inevitably coexist for the forseeable future. +IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品,它为了解决现有IPv4地址空间即将耗尽的问题。However, since IPv4 has been used by every host or device connected to the Internet, it is practically impossible to switch every one of them to IPv6 overnight. Numerous IPv4 to IPv6 transition mechanisms (e.g., dual IP stack, tunneling, proxying) have been proposed to facilitate the adoption of IPv6, and many applications are being rewritten, as we speak, to add support for IPv6. One thing for sure is that IPv4 and IPv6 will inevitably coexist for the forseeable future. Ideally the [ongoing IPv6 transition process][1] should not be visible to end users, but the mixed IPv4/IPv6 environment might sometimes cause you to encounter various hiccups originating from unintended interaction between IPv4 and IPv6. For example, you may experience timeouts from applications such as apt-get or ssh trying to unsuccessfully connecting via IPv6, DNS server accidentally dropping AAAA DNS records for IPv6, or your IPv6-capable device not compatible with your ISP's legacy IPv4 network, etc. From b46603288476c95a5c35fbefb5ab746a5c85bd46 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Fri, 17 Apr 2015 18:04:40 +0800 Subject: [PATCH 0563/2517] translating wi-cuckoo --- ...ol can alert you about evil twin access points in the area.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/share/20150410 This tool can alert you about evil twin access points in the area.md b/sources/share/20150410 This tool can alert you about evil twin access points in the area.md index f2a2165191..b698c5df3b 100644 --- a/sources/share/20150410 This tool can alert you about evil twin access points in the area.md +++ b/sources/share/20150410 This tool can alert you about evil twin access points in the area.md @@ -1,3 +1,4 @@ +translating wi-cuckoo This tool can alert you about evil twin access points in the area ================================================================================ **EvilAP_Defender can even attack rogue Wi-Fi access points for you, the developer says** From b00ff0cf6d3960069e5432d1a503957f26620fe5 Mon Sep 17 00:00:00 2001 From: cvsher <478990879@qq.com> Date: Fri, 17 Apr 2015 18:47:55 +0800 Subject: [PATCH 0564/2517] Update and rename 20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md to [translating by cvsher]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md --- ...417 14 Useful Examples of Linux 'sort' Command--Part 1.md} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename sources/tech/{20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md => [translating by cvsher]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md} (99%) diff --git a/sources/tech/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md b/sources/tech/[translating by cvsher]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md similarity index 99% rename from sources/tech/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md rename to sources/tech/[translating by cvsher]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md index 568c51edbf..ff42945bf8 100644 --- a/sources/tech/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md +++ b/sources/tech/[translating by cvsher]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md @@ -1,3 +1,5 @@ +translating by cvsher + 14 Useful Examples of Linux ‘sort’ Command – Part 1 ================================================================================ Sort is a Linux program used for printing lines of input text files and concatenation of all files in sorted order. Sort command takes blank space as field separator and entire Input file as sort key. It is important to notice that sort command don’t actually sort the files but only print the sorted output, until your redirect the output. @@ -127,4 +129,4 @@ via: http://www.tecmint.com/sort-command-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ \ No newline at end of file +[1]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ From a62a8ab81584a607b7e4745740c19acb21681990 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Fri, 17 Apr 2015 19:26:29 +0800 Subject: [PATCH 0565/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...kills in Demand That Will Get You Hired.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md b/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md index 89afa0f6f4..286572f959 100644 --- a/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md +++ b/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md @@ -1,40 +1,40 @@ -10 个正需的IT技能,会帮你职场成功 +10个所需的IT技能,助你职场成功 =========================================================================== -接我们上次的文章[[十大有需的操作系统][1]],这篇文章得到了Tecmint社区很高的评价,在本篇中,我们将指点顶尖的IT技能,这会帮助你找到你理想的工作。 +接我们上次的文章[[十大所需的操作系统][1]],这篇文章得到了Tecmint社区很高的评价,在本篇中,我们将指点顶尖的IT技能,这会帮助你找到理想的工作。 -如第一篇文章提到的那样,这些资料和统计结果是会伴随市场和需求的变化而变化的。我们将会尽可能地更新列表,无论何时只要有任何主要的变化。所有的统计数据基于最近的,全球一些IT公司的招聘信息和需求。 +如第一篇文章提到的那样,这些资料和统计结果是会伴随市场和需求的变化而变化的。只要有任何主要的变化,我们会尽可能地更新列表。所有的统计数据基于最近的,全球一些IT公司的招聘信息和需求。 ### 1. VMware ### -VMware公司设计的虚拟化和云计算软件高居榜首。VMware首次宣布商业支持x86架构的虚拟化。VMware的需求在上个季度已经增长自16%。 +VMware公司设计的虚拟化和云计算软件高居榜首。VMware首次宣布商业支持x86架构的虚拟化。VMware的需求在上个季度已经增长至16%。 最新稳定发行版: 11.0 ### 2. MySQL ### -这款开源的关系型数据库管理系统屈尊第二。直到2013年,MySQL都还是第二大使用广泛的RDBMS(注:Relational Database Management System)。上季度MySQL的需求已经达到了11%。继甲骨文公司之后,著名的MarialDB也已经被分出MySQL了。去掌握它。 +这款开源的关系型数据库管理系统憾居第二。直到2013年,MySQL都还是第二大使用广泛的RDBMS(注:Relational Database Management System)。上季度MySQL的需求已经达到了11%。继甲骨文公司之后,著名的MarialDB也已经被分出MySQL了,值得去拥有。 最新稳定发行版: 5.6.23 ### 3. Apache ### -这个跨平台的开源网页(HTTP)服务器占据了第三的位置。Apache的需求已经超过了13%截至上个季度。 +这个跨平台的开源网页(HTTP)服务器位居第三。截至上个季度,Apache的需求已经超过了13%。 最新稳定发行版: 2.4.12 ### 4. AWS ### -亚马逊网页服务器是亚马逊网站提供的所有远程计算服务的集合。AWS排在第四。上个季度,AWS的需求已经表现出将近14%的增长。 +亚马逊网页服务器是亚马逊网站提供的所有远程计算服务的集合,AWS排在第四位。上个季度,AWS的需求已经呈现出将近14%的增长。 ### 5. Puppet ### -Puppet作为配置管理系统被应用在设置IT基础架构,列在第五。它用Ruby语言编写,属于客户端-服务器型的结构。上个季度puppet的需求已经增长超过9% +Puppet作为配置管理系统被应用在设置IT基础架构,它排在第五位。它用Ruby语言编写,属于客户端-服务器型的结构。上个季度puppet的需求已经增长超过9%。 最新稳定发行版: 3.7.3 ### 6. Hadoop ### -Hadoop是用Java写的一款开源软件框架,用于处理大数据。列表中Hadoop位列第六。对Hadoop的需求在上个季度已经下降了0.2个百分点。 +Hadoop是用Java编写的一款开源软件框架,用于处理大数据。列表中Hadoop位列第六。对Hadoop的需求在上个季度已经下降了0.2个百分点。 最新稳定发行版: 2.6.0 @@ -46,7 +46,7 @@ Linux Torvalds最初编写的著名版本控制系统Git排在了第七。Git的 ### 8. Oracle PL/SQL ### -Oracle公司开发的SQL扩展版,占据第八的位置。PL/SQL从Oracle 7后就包含在Oracle数据库中。它在上个季度已经出现将近8%的衰退。 +Oracle公司开发的SQL扩展版,占据第八的位置。PL/SQL从Oracle 7后就包含在Oracle数据库中。它在上个季度已经呈现将近8%的衰退。 ### 9. Tomcat ### @@ -122,7 +122,7 @@ Oracle公司开发的SQL扩展版,占据第八的位置。PL/SQL从Oracle 7后 -就这么多了。我会积极跟进这个系列的下个部分。保持发声,保持联系,保持评论。不要忘了给我们提供你的反馈。喜欢和分享我们,帮助我们传播开去。 +这篇文章就到这里,我会积极跟进这个系列的下一部分。敬请期待,保持联系,积极评论。不要忘了给我们提供你的反馈。喜欢的话就分享吧,让更多人认识我们。 --------------------------------------------------------------------------- @@ -130,7 +130,7 @@ via: http://www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/ 作者:[Avishek Kumar][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ec7ecd6603a21ce60d6b589e21f6f847e6a2af71 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 17 Apr 2015 20:03:52 +0800 Subject: [PATCH 0566/2517] [Translated] tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples --- ...ox from Bash Shell Script with Examples.md | 175 ------------------ ...ox from Bash Shell Script with Examples.md | 174 +++++++++++++++++ 2 files changed, 174 insertions(+), 175 deletions(-) delete mode 100644 sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md create mode 100644 translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md diff --git a/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md b/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md deleted file mode 100644 index a870c0f6a8..0000000000 --- a/sources/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md +++ /dev/null @@ -1,175 +0,0 @@ -Translating by ictlyh -How to Show Dialog Box from Bash Shell Script with Examples -================================================================================ -This tutorial will give couple of examples on how to use utilities like zenity and whiptail in your Bash shell script to provide message / dialog box . With these utilities your script will be able to inform user about the current state of execution, or give an ability to interact. Difference between these two utilities is the way they are displaying message box or dialog. Zenity uses GTK toolkit for creating graphical user interfaces, while whiptail creates message boxes inside terminal window. - -### Zenity Tool ### - -To install zenity on Ubuntu run: - - sudo apt-get install zenity - -Since commands for creating message boxes or dialogs with zenity are pretty self explanatory, we will provide you with couple of examples. - -### Creating information box ### - -zenity --info --title "Information Box" --text "This should be information" --width=300 --height=200 - -![Screenshot-Information Box](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Information-Box.png) - -Creating Yes/No dialog - - zenity --question --text "Do you want this?" --ok-label "Yeah" --cancel-label="Nope" - -![Screenshot-Question](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Question.png) - -Creating entry box and storing value in variable - - a=$(zenity --entry --title "Entry box" --text "Please enter the value" --width=300 --height=200) - echo $a - -![Screenshot-Entry box](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Entry-box.png) - -After entering it, value will be stored in $a variable. - -Here is the working example which takes user's first name, last name and age and displays it. - - #!/bin/bash - # - # This script will ask for couple of parameters - # and then continue to work depending on entered values - # - - # Giving the option to user - zenity --question --text "Do you want to continue?" - - # Checking if user wants to proceed - [ $? -eq 0 ] || exit 1 - - # Letting user input some values - FIRSTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your first name." --width=300 --height=150) - LASTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your last name." --width=300 --height=150) - AGE=$(zenity --entry --title "Entry box" --text "Please, enter your age." --width=300 --height=150) - - # Displaying entered values in information box - zenity --info --title "Information" --text "You are ${FIRSTNAME} ${LASTNAME} and you are ${AGE}(s) old." --width=300 --height=100 - -Here are the screenshots of previous script. - -![Example1-Question-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Question-1.png) - -First box - -![Example1-Entry box-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-1.png) - -Entry box - -![Example1-Entry box-2](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-2.png) - -Entry box - -![Example1-Entry box-3](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-3.png) - -Entry box - -![Example1-Information](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Information.png) - -Information box - -Don't forget refer some of the useful [zenity options][1] that might help you. - -### Whiptail Tool ### - -To install whiptail on Ubuntu run - - sudo apt-get install whiptail - -Commands for creating message box/dialog with whiptail are also self explanatory, so we will provide you with just couple of basic examples. - -### Creating message box ### - - whiptail --msgbox "This is a message" 10 40 - -![Screenshot-whiptail-msgbox](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-msgbox.png) - -### Creating Yes/No dialog ### - - whiptail --yes-button "Yeah" --no-button "Nope" --title "Choose the answer" --yesno "Will you choose yes?" 10 30 - -![Screenshot-whiptail-yesno](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-yesno.png) - -### Creating entry box with default value ### - - whiptail --inputbox "Enter your number please." 10 30 "10" - -![Screenshot-whiptail-entry](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-entry.png) - -One thing to be aware of when trying to use entered value is that whiptail uses stdout for displaying dialog, and stderr for value output. That way, if you use var=$(...) you wont see dialog box at all, and wont get the entered value. Solution is to switch stdout and stderr. To do that just add **3>&1 1>&2 2>&3** at the end of the whiptail command. Same would be with any whiptail command which you want to use to get some entered value. - -### Creating menu dialog ### - - whiptail --menu "This is a menu. Choose an option:" 20 50 10 1 "first" 2 "second" 3 "third" - -![Screenshot-whiptail-menu](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-menu.png) - -Here is a **shell script** that asks user to enter a path to a folder and then outputs it's size. - - #!/bin/bash - # - # - - # Since whiptail has to use stdout to display dialog, entered value will - # be stored in stderr. To switch them and get the value to stdout you must - # use 3>&1 1>&2 2>&3 - FOLDER_PATH=$(whiptail --title "Get the size of folder" \ - --inputbox "Enter folder path:" \ - 10 30 \ - "/home" \ - 3>&1 1>&2 2>&3) - - if [ -d $FOLDER_PATH ] - then - size=$(du -hs "$FOLDER_PATH" | awk '{print $1}') - whiptail --title "Information" \ - --msgbox "Size of ${FOLDER_PATH} is ${size}" \ - 10 40 - elif [ -f $FOLDER_PATH ] - then - whiptail --title "Warning!!!" \ - --msgbox "The path you entered is a path to a file not a folder!" \ - 10 40 - else - whiptail --title "Error!!!" - --msgbox "Path you entered is not recognized. Please try again" \ - 10 40 - fi - -Here are the screenshots from previous example: - -![Example2-Entry-box](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Entry-box.png) - -Entry box - -![Example2-Information](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Information.png\) - -Information box - -If you are working in terminal , [manual pages][2] are always available. - -### Conclusion ### - -Choosing the right tool for displaying dialogs will depend on whether you expect your script to be run on desktop machine or server machine. Desktop machine users mostly use window environment and will possibly be able to run the script and interact with appearing windows. However, if you are expecting that the user is someone on server machine, you might want to play it safe and use whiptail or any other utility that will display dialogs in plain terminal window. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-shell-script/bash-shell-script-show-dialog-box/ - -作者:[Ilija Lazarevic][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/ilijala/ -[1]:https://help.gnome.org/users/zenity/stable/ -[2]:http://linux.die.net/man/1/whiptail \ No newline at end of file diff --git a/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md b/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md new file mode 100644 index 0000000000..4aa05d2134 --- /dev/null +++ b/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md @@ -0,0 +1,174 @@ +如何在Bash Shell脚本中显示对话框以及事例 +================================================================================ +这个教程给出几个如何使用类似zenity和whiptail的工具在Bash Shell 脚本中提供消息/对话框的例子。使用这些工具,你的脚本能够告知用户当前程序运行的状态以及有与其交互的能力。这两个工具的不同之处在于显示消息框或者对话框的方式。Zenity用GTK工具包创建图形用户界面,而whiptail在终端内部创建消息框。 + +### Zenity 工具 ### + +在Ubuntu中安装zenity,运行: + + sudo apt-get install zenity + +由于用zenity创建消息框或者对话框的命令是相当自解释的,我们会给你提供一些例子。 + +### 创建消息框 ### + +zenity --info --title "Information Box" --text "This should be information" --width=300 --height=200 + +![消息框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Information-Box.png) + +创建 Yes/No 对话框 + + zenity --question --text "Do you want this?" --ok-label "Yeah" --cancel-label="Nope" + +![问题截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Question.png) + +创建输入框并在变量中保存值 + + a=$(zenity --entry --title "Entry box" --text "Please enter the value" --width=300 --height=200) + echo $a + +![输入框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Entry-box.png) + +输入后,值会保存在变量 $a 中。 + +这是一个获取用户姓名并显示的实际事例。 + + #!/bin/bash + # + # This script will ask for couple of parameters + # and then continue to work depending on entered values + # + + # Giving the option to user + zenity --question --text "Do you want to continue?" + + # Checking if user wants to proceed + [ $? -eq 0 ] || exit 1 + + # Letting user input some values + FIRSTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your first name." --width=300 --height=150) + LASTNAME=$(zenity --entry --title "Entry box" --text "Please, enter your last name." --width=300 --height=150) + AGE=$(zenity --entry --title "Entry box" --text "Please, enter your age." --width=300 --height=150) + + # Displaying entered values in information box + zenity --info --title "Information" --text "You are ${FIRSTNAME} ${LASTNAME} and you are ${AGE}(s) old." --width=300 --height=100 + +这些是运行前面脚本的截图。 + +![例1-问题-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Question-1.png) + +框1 + +![例1-输入框-1](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-1.png) + +输入框 + +![例1-输入框-2](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-2.png) + +输入框 + +![例1-输入框-3](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Entry-box-3.png) + +输入框 + +![例1-信息](http://blog.linoxide.com/wp-content/uploads/2015/03/Example1-Information.png) + +信息框 + +别忘了查看也许能帮助到你的有用的[zenity 选项][1] + +### Whiptail 工具 ### + +在Ubuntu上安装whiptail,运行 + + sudo apt-get install whiptail + +用whiptail创建消息框或者对话框的命令也是相当自解释的,我们会给你提供一些基本例子。 + +### 创建消息框 ### + + whiptail --msgbox "This is a message" 10 40 + +![whiptail消息框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-msgbox.png) + +### 创建 Yes/No 对话框 ### + + whiptail --yes-button "Yeah" --no-button "Nope" --title "Choose the answer" --yesno "Will you choose yes?" 10 30 + +![whiptail对话框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-yesno.png) + +### 创建有缺省值的输入框 ### + + whiptail --inputbox "Enter your number please." 10 30 "10" + +![whiptail输入框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-entry.png) + +尝试使用输入值要注意的一点是whiptail用stdout显示对话框,用stderr输出值。那样的话,如果你用 var=$(...),你不会看到对话框,也不能获得输入的值。解决方法是选择stdout和stderr。在whiptail命令后面添加 **3>&1 1>&2 2>&3** 就可以做到。你想获取输入值的任何whiptail命令也是如此。 + +### 创建菜单对话框 ### + + whiptail --menu "This is a menu. Choose an option:" 20 50 10 1 "first" 2 "second" 3 "third" + +![whiptail菜单截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-menu.png) + +这是一个请求用户输入一个文件夹的路径并输出它的大小的 **shell 脚本**。 + + #!/bin/bash + # + # + + # Since whiptail has to use stdout to display dialog, entered value will + # be stored in stderr. To switch them and get the value to stdout you must + # use 3>&1 1>&2 2>&3 + FOLDER_PATH=$(whiptail --title "Get the size of folder" \ + --inputbox "Enter folder path:" \ + 10 30 \ + "/home" \ + 3>&1 1>&2 2>&3) + + if [ -d $FOLDER_PATH ] + then + size=$(du -hs "$FOLDER_PATH" | awk '{print $1}') + whiptail --title "Information" \ + --msgbox "Size of ${FOLDER_PATH} is ${size}" \ + 10 40 + elif [ -f $FOLDER_PATH ] + then + whiptail --title "Warning!!!" \ + --msgbox "The path you entered is a path to a file not a folder!" \ + 10 40 + else + whiptail --title "Error!!!" + --msgbox "Path you entered is not recognized. Please try again" \ + 10 40 + fi + +这是之前例子的一些截图: + +![例2-输入框](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Entry-box.png) + +输入框 + +![例2-消息框](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Information.png\) + +消息框 + +如果你在终端下工作,[帮助手册][2]总是有用的。 + +### 结论 ### + +选择合适的工具显示对话框取决于你期望在桌面机器还是服务器上运行你的脚本。桌面机器用户通常使用窗口环境,更可能用显示的窗口运行脚本和交互。然而,如果你期望用户是在服务器上工作的,你也许会希望安全地显示,并使用whiptail或者任何其它在纯终端窗口显示对话框的工具。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-shell-script/bash-shell-script-show-dialog-box/ + +作者:[Ilija Lazarevic][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/ilijala/ +[1]:https://help.gnome.org/users/zenity/stable/ +[2]:http://linux.die.net/man/1/whiptail \ No newline at end of file From d7820347d726566c5dcbf80d213d54cf6d560971 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 17 Apr 2015 20:09:47 +0800 Subject: [PATCH 0567/2517] [Translated] tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples --- ...to Show Dialog Box from Bash Shell Script with Examples.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md b/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md index 4aa05d2134..e115f85772 100644 --- a/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md +++ b/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md @@ -103,7 +103,7 @@ zenity --info --title "Information Box" --text "This should be information" --wi ![whiptail输入框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-entry.png) -尝试使用输入值要注意的一点是whiptail用stdout显示对话框,用stderr输出值。那样的话,如果你用 var=$(...),你不会看到对话框,也不能获得输入的值。解决方法是选择stdout和stderr。在whiptail命令后面添加 **3>&1 1>&2 2>&3** 就可以做到。你想获取输入值的任何whiptail命令也是如此。 +尝试使用输入值要注意的一点是whiptail用stdout显示对话框,用stderr输出值。那样的话,如果你用 var=$(...),你不会看到对话框,也不能获得输入的值。解决方法是交换stdout和stderr。在whiptail命令后面添加 **3>&1 1>&2 2>&3** 就可以做到。你想获取输入值的任何whiptail命令也是如此。 ### 创建菜单对话框 ### @@ -149,7 +149,7 @@ zenity --info --title "Information Box" --text "This should be information" --wi 输入框 -![例2-消息框](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Information.png\) +![例2-消息框](http://blog.linoxide.com/wp-content/uploads/2015/03/Example2-Information.png) 消息框 From 1bbc89530694cb8aeb119106d10e5426528334d6 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 17 Apr 2015 20:23:25 +0800 Subject: [PATCH 0568/2517] =?UTF-8?q?[Translating]=E4=BB=8ELove-xuan?= =?UTF-8?q?=E6=8E=A5=E6=89=8B=E7=BF=BB=E8=AF=91share/20140804=20Group=20Te?= =?UTF-8?q?st--Linux=20Text=20Editors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/share/20140804 Group Test--Linux Text Editors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/share/20140804 Group Test--Linux Text Editors.md b/sources/share/20140804 Group Test--Linux Text Editors.md index 02c1b2b586..40ef1e6f51 100644 --- a/sources/share/20140804 Group Test--Linux Text Editors.md +++ b/sources/share/20140804 Group Test--Linux Text Editors.md @@ -1,4 +1,4 @@ -Love-xuan Translating +Translating by ictlyh Group Test: Linux Text Editors ================================================================================ > Mayank Sharma tests five supercharged text editors that can crunch more than just words. From f3919cc3385f86c27c045f5e4a476d61eeaec92a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 17 Apr 2015 22:26:42 +0800 Subject: [PATCH 0569/2517] [Translating 1/3] share/20140804 Group Test--Linux Text Editors --- ...20140804 Group Test--Linux Text Editors.md | 318 ++++++++++++++++++ 1 file changed, 318 insertions(+) create mode 100644 translated/share/20140804 Group Test--Linux Text Editors.md diff --git a/translated/share/20140804 Group Test--Linux Text Editors.md b/translated/share/20140804 Group Test--Linux Text Editors.md new file mode 100644 index 0000000000..aae721a30f --- /dev/null +++ b/translated/share/20140804 Group Test--Linux Text Editors.md @@ -0,0 +1,318 @@ +组测试: Linux 文本编辑器 +================================================================================ +> Mayank Sharma 测试了5款不仅仅是能处理字的超级文本编辑器。 + +如果你使用Linux已经有很长一段时间,你知道,不管是编辑一款app的配置文件,一起用shell脚本骇客,或者编写/查看代码,类似LobreOffice的工具并不能满足。尽管字面上看起来意思一样,你不需要一个字处理器来完成这些任务;你需要一个文本编辑器。 + +在这个组测试中,我们将着眼于5款不仅仅是能胜任繁重文本任务的简陋的文本编辑器。他们能高亮语法,像拼写检查一样轻松处理代码缩进。你可以像你复制/粘贴文本那样容易地使用他们记录宏以及管理代码片段。 + +得益于能向它们注入足以抗衡其它类型的以文本为中心的应用程序能力的插件,一些简单的文本编辑器甚至超过了它们的设计目标。它们能胜任一个源代码编辑器的任务,甚至是一个集成开发环境。 + +Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一些原因,我们在这个组测试中并没有包括它们。首先,如果你使用它们中的任何一个,那么恭喜你:你不需要更换了。其次,它们都有陡峭的学习曲线,尤其是对于那些对有面向图形用户界面的桌面系统的替代能力更有兴趣的用户。 + +### 目录: ### + +#### Gedit #### + +- URL:http://projects.gnome.org/gedit/ +- 版本: 3.10 +- 许可证: GPL +- Gnome的默认文本编辑器准备好挑战了? + +#### Kate #### + +- URL: www.kate-editor.org +- 版本: 3.11 +- 许可证: LGPL/GPL +- Kate会挑战命运吗? + +#### Sublime Text #### + +- URL: www.sublimetext.com +- 版本: 2.0.2 +- 许可证: Proprietary +- 在自由与黄金心脏土地上的私有软件。 + +#### UltraEdit #### + +- URL: www.ultraedit.com +- 版本: 4.1.0.4 +- 许可证: Proprietary +- 它做的足够多去证明它的价值了吗? + +#### jEdit #### + +- URL: www.jedit.org +- 版本: 5.1.0 +- 许可证: GPL +- 基于Java的编辑器是否会扰乱其他编辑器的世界? + +![在展示一个有功能的应用程序和将它们所有的东西曝光给用户之间有一个很好的平衡。Geddit隐藏了它的大部分功能。](http://www.linuxvoice.com/wp-content/uploads/2014/07/gedit-web.png) +在展示一个有功能的应用程序和将它们所有的东西曝光给用户之间有一个很好的平衡。Geddit隐藏了它的大部分功能。 + +### 关键标准 ### + +除了Gedit和jEdit以外的所有工具,都是通过推荐的安装方法安装在Fedora和Ubuntu上。前者已经兼容默认的Gnome桌面,后者仍然固执地反对安装在Fedora上。由于这些是相对简单的应用程序,他们没有复杂的依赖,唯一例外的是jEdit,它要求要有Oracle Java。 + +得益于Gnome和KDE持续的努力,不论他们运行的桌面环境,所有编辑器看起来很好,功能也很正常。这不仅是作为环境评价的标准,也意味着你不再受制于要找到和你的桌面环境兼容的工具。 + +除了它们老派的功能,我们也对所有候选者测试了通用文本编辑功能。然而,它们并没有被设计为模仿现代字处理器的所有功能,我们也不以此评判。 + +![Kate能搭建为功能丰富的集成开发环境](http://www.linuxvoice.com/wp-content/uploads/2014/08/kate-web.png) + +Kate能搭建为功能丰富的集成开发环境。 + +### 编程语言支持 ### + +UltraEdit 能进行语法高亮,代码折叠以及拥有项目管理的能力。这也有一个罗列源文件中所有功能的功能列表,但并不适用于我们任何的测试代码文件。UltraEdit也支持HTML5,有能添加常用HTML标记的HTML工具栏。 + +即使Gnome的默认文本编辑器Gedit,也有几个面向编码的功能特性,例如括号匹配,自动缩进以及为包括C, C++, Java, HTML, XML, Python, Perl, 以及许多其它编程语言进行语法高亮。 + +如果你需要更多的编程辅助,看一下Sublime和Kate。Sublime支持多种编程语言并且(正如流行的那些)能为C#, D, Dylan, Erlang, Groovy, Haskell, Lisp, Lua, MATLAB, OCaml, R, 甚至 SQL 进行语法高亮。如果这还不够,你可以下载插件以支持更多的语言。 + +另外,它的语法高亮功能提供了多个可定制选项。这个应用程序也会进行括号匹配,确保代码段都正确,Sublime的自动补全功能也支持用户创建的变量。 + +正如Komodo IDE,Sublime也可滚动浏览显示完整的代码,这对于长代码文件导航和在文件中的不同部分跳转很方便。 + +Sublime最好的功能之一就是能在编辑器内部为特定语言,例如C++, Python, Ruby等运行代码,当然假设在你的电脑上安装有编译器以及其它系统工具。 + +你也可以用插件在Kate中开启构建系统功能。另外,你可以为GDB调试器添加一个简单的前端。Kate能和Git,Subversion以及Mercurial版本控制系统一起工作,也提供了一些项目管理的功能。 + +除了能为超过180中语言进行语法高亮,它支持所有的这些辅助功能,例如括号匹配,自动补全和自动缩进。它也支持代码折叠,甚至在一个程序中包括有错误的函数。 + +jEdit是唯一的遗憾,它声称自己是一个程序员的文本编辑器,但它缺少其他的基本功能,例如代码折叠,它甚至不支持补全功能。 + +**Verdict:** + +- Gedit:3/5 +- Kate:5/5 +- Sublime:5/5 +- UltraEdit3/5 +- jEdit:1/5 + +![如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22中主题。](http://www.linuxvoice.com/wp-content/uploads/2014/08/sublime-web.png) + +如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22中主题。 + +### 键盘控制 ### + +高级文本编辑器用户希望能完全通过键盘控制和操作,一些应用程序甚至运行他们的用户自定义快捷方式的键盘绑定。 + +你可以轻松的使用Gedit的扩展键盘快捷键。这里有编辑文件,为普通任务,例如对一个文档进行拼写检查,唤起工具的快捷键。你可以获取应用程序内部的一系列默认快捷键,但并没有图形化的方式去自定义它们。相似的,在Sublime中自定义键绑定,你需要修改他的XML键映射文件。Sublime由于缺少定义键盘快捷键的图形化界面而饱受批评,但长期使用的用户已经支持当前的基于文件的机制,这给他们更多的控制能力。 + +UltraEdit为它"一切都可自定义"的座右铭感到自豪,这也包括键盘快捷键。你可以自定义菜单导航的热键,以及定义你自己的访问大量函数的多键键映射。 + +除了完全可自定义的键盘快捷键以外,jEdit也有为Emacs预定义的键映射。Kate在这方面尤其令人映像深刻。它有简单可访问的自定义键绑定窗口。你可以更改默认的键,或者定义替代的键。另外,Kate也有一个能使用户使用Vi键操作Kate的Vi模式。 + +**Verdict:** + +- Gedit:2/5 +- Kate:5/5 +- Sublime:3/5 +- UltraEdit:4/5 +- jEdit:5/5 + +### 片段和宏 ### + +Macros help you cut down the time spent on editing and organising data by automating repetitive steps, while Snippets of code extend a similar functionality to programmers by creating reusable chunks of source code. Both have the ability to save you time. + +The vanilla Gedit installation doesn’t have either of these functionalities, but you can enable them via separate plugins. While the Snippets plugin ships with Gedit, you’ll have to manually download and install the macro plugin (it’s called gedit-macropy and is hosted on GitHub) before you can enable it from within Gedit. + +Kate takes the same plugins route to enable the snippets feature. Once added, the plugin also adds a repository of snippets for PHP, Bash and Java. You can display the list of snippets in the sidebar for easier access. Right-click on a snippet to edit its contents as well as its shortcut key combination. However, very surprisingly, it doesn’t support macros – despite repeated hails from users since 2002! + +jEdit too has a plugin for enabling snippets. But it can record macros from user actions and you can also write them in the BeanShell scripting language (BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript). jEdit also has a plugin that will download several macros from jEdit’s website. + +Sublime ships with inbuilt ability to create both snippets and macros, and ships with several snippets of frequently used functions for most popular programming languages. + +Snippets in UltraEdit are called Smart Templates and just like with Sublime you can insert them based upon the kind of source file you’re editing. To complement the Macro recording function, UltraEdit also has an integrated javascript-based scripting language to automate tasks. You can also download user-submitted macros and scripts from the editor’s website. + +**Verdict:** + +- Gedit:3/5 +- Kate:1/5 +- Sublime:5/5 +- UltraEdit:5/5 +- jEdit:5/5 + +![UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects.](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) + +UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects. + +### Ease of use ### + +Unlike a bare-bones text editor, the text editors in this feature are brimming with features to accommodate a wide range of users — from document writers to programmers. Instead of stripping features from the apps, their developers are looking for avenues to add more functionality. + +Although at first glance most apps in this group test have a very similar layout, upon closer inspection, you’ll notice several usability differences. We have a weak spot for apps that expose their functionality and features by making judicious use of the user interface, instead of just overwhelming the user. + +### Gedit: 4/5 ### + +Gedit wears a very vanilla look. It has an easy interface with minimal menus and buttons. This is a two-edged sword though, as some users might fail to realise its true potential. + +The app can open multiple files in tabs that can be rearranged and moved between windows. Users can optionally enable panels on the side and bottom for displaying a file browser and the output of a tool enabled by a plugin. The app will detect when an open file is modified by another application and offers to reload that file. + +The UI has been given a major overhaul in the latest version of the app yet to make its way into Gnome. However it isn’t yet stable, and while it maintains all features, several plugins that interact with the menu will need to be updated. + +### Kate: 5/5 ### + +Although a major part of its user interface resembles Gedit, Kate tucks in tabs at either side and its menus are much fuller. The app is approachable and invites users to explore other features. + +Kate can transparently open and save files over all protocols supported by KDE’s KIO including HTTP, FTP, SSH, SMB and WebDAV. You can use the app to work with multiple files at the same time. But unlike the traditional horizontal tab switching bar in most app, Kate has tabs on either side of the screen. The left sidebar will display an index of open files. Programmers who need to see different parts of the same file at the same time will also appreciate its ability to split the interface horizontally as well as vertically. + +### Sublime: 5/5 ### + +Sublime lets you view up to four files at the same time in various arrangements. There’s also a full-screen distraction free mode that just displays the file and the menu, for when you’re in the zone. + +The editor also has a minimap on the right, which is useful for navigating long files. The app ships with several snippets for popular functions in several programming languages, which makes it very usable for developers. Another neat editing feature, whether you are working with text documents or code, is the ability to swap and shuffle selections. + +### UltraEdit: 3/5 ### + +UltraEdit’s interface is loaded with several toolbars at the top and bottom of the interface. Along with the tabs to switch between documents, panes on either side and the gutter area, these leave little room for the editor window. + +Web developers working with HTML files have lots of assistance at their fingertips. You can also access remote files via FTP and SFTP. Advanced features such as recording a macro and comparing files are also easily accessible. + +Using the app’s Preferences window you can tweak various aspects of the app, including the colour scheme and other features like syntax highlighting. + +### jEdit: 3/5 ### + +In terms of usability, one of the first red-flags was jEdit’s inability to install on RPM-based distros. Navigating the editor takes some getting used to, since its menus aren’t in the same order as in other popular apps and some have names that won’t be familiar to the average desktop user. However, the app include detailed inbuilt help, which will help ease the learning curve. + +jEdit highlights the current line you are on and enables you to split windows in multiple viewing modes. You can easily install and manage plugins from within the app, and in addition to full macros, jEdit also lets you record quick temporary ones. + +![Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment](http://www.linuxvoice.com/wp-content/uploads/2014/08/jedit-web.png) + +Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment + +### Availability and support ### + +There are several similarities between Gedit and Kate. Both apps take advantage of their respective parent project, Gnome and KDE, and are bundled with several mainstream distros. Yet both projects are cross-platform and have Windows and Mac OS X ports as well as native Linux versions. + +Gedit is hosted on Gnome’s web infrastructure and has a brief user guide, information about the various plugins, and the usual channels of getting in touch including a mailing list and IRC channel. You’ll also find usage information on the websites of other Gnome-based distros such as Ubuntu. Similarly, Kate gets the benefit of KDE’s resources and hosts detailed user information as well as a mailing list and IRC channel. You can access their respective user guides offline from within the app as well. + +UltraEdit is also available for Windows and Mac OS X besides Linux, and has detailed user guides on getting started, though there’s none included within the app. To assist users, UltraEdit hosts a database of frequently asked questions, a bunch of power tips that have detailed information about several specific features, and users can engage with one another other on forum boards. Additionally, paid users can also seek support from the developers via email. + +Sublime supports the same number of platforms, however you don’t need to buy a separate licence for each platform. The developer keeps users abreast with ongoing development via a blog and also participates actively in the hosted forums. The highlight of the project’s support infrastructure is the freely available detailed tutorial and video course. Sublime is lovely. + +Because it’s written in Java, jEdit is available on several platforms. On its website you’ll find a detailed user guide and links to documentation of some plugins. However, there are no avenues for users to engage with other users or the developer. + +**Verdict:** + +- Gedit: 4/5 +- Kate: 4/5 +- Sublime: 5/5 +- UltraEdit: 3/5 +- jEdit: 2/5 + +### Add-on and plugins ### + +Different users have different requirements, and a single lightweight app can only do as much. This is where plugins come into the picture. The apps rely on these small pluggable widgets to extend their feature set and be of use to even more number of users. + +The one exception is UltraEdit. The app has no third-party plugins, but its developers do point out that third-party tools such as HtmlTidy are already installed with UltraEdit. + +Gedit ships with a number of plugins installed, and you can download more with the gedit-plugins package. The project’s website also points to several third-party plugins based on their compatibility with the Gedit versions. + +Three useful plugins for programmers are Code Comment, Terminal Plugin, which adds a terminal in the bottom panel, and the Session Saver. The Session Saver is really useful when you’re working on a project with multiple files. You can open all the files in tabs, save your session and when you restore it with a single click it’ll open all the files in the same tab order as you saved them. + +Similarly, you can extend Kate by adding plugins using its built-in plugin manager. In addition to the impressive projects plugins, some others that will be of use to developers include an embedded terminal, ability to compile and debug code and execute SQL queries on databases. + +Plugins for Sublime are written in Python, and the text editor includes a tool called Package Control, which is a little bit like apt-get in that it enables the user to find, install, upgrade and remove plugin packages. With plugins, you can bring the Git version control to Sublime, as well as the JSLint tool to improve JavaScript. The Sublime Linter plugin is a must have for coders and will point out any errors in your code. + +jEdit boasts the most impressive plugin infrastructure. The app has over 200 plugins, which can be browsed in the dedicated site of their own. The website lists plugins under various categories such as File Management, Version Control, Text, etc. You’ll find lots of plugins housed under each category. + +Some of the best plugins are the Android plugin, which provides utilities to work on Android projects; the TomcatSwitch plugin, using which you can create and control an external Jakarta Tomcat server process; and the Vimulator plugin, for Vi-like capabilities. You can install these plugins using jEdit’s using its plugin manager. + +**Verdict** + +- Gedit: 3/5 +- Kate: 4/5 +- Sublime: 4/5 +- UltraEdit: 1/5 +- jEdit: 5/5 + +### Plain ol’ text editing ### + +Despite all their powerful extra-curricular activities that might even displace full-blown apps across several genres, there will be times when you just need to use these text editing behemoths to read, write, or edit plain and simple text. While you can use all of them to enter text, we are evaluating them for access to common text-editing conveniences. + +Gedit which is Gnome’s default text editor, supports an undo and redo mechanism as well as search and replace. It can spellcheck documents in multiple languages and can also access and edit remote files using Gnome GVFS libraries. + +You can spellcheck documents with Kate as well, which also lets you perform a Google search on any highlighted text. It’s also got a line modification system which visually alerts users of lines which have modified and unsaved changes in a file. In addition, it enables users to set bookmarks within a file to ease navigation of lengthy documents. + +Sublime has a wide selection of editing commands, such as indenting text and formatting paragraphs. Its auto-save feature helps prevent users from losing their work. Advanced users will appreciate the regex-based recursive find and replace feature, as well as the ability to select multiple non-contiguous spans of text and act on them collectively. + +UltraEdit also enables the use of regular expressions for its search and replace feature and can edit remote files via FTP. One unique feature of jEdit is its support for an unlimited number of clipboard which it calls registers. You can copy snippets of text to these registers which are available across editing sessions. + +**Verdict:** + +- Gedit: 4/5 +- Kate: 5/5 +- Sublime: 5/5 +- UltraEdit: 4/5 +- jEdit: 4/5 + +### Our verdict ### + +All the editors in this feature are good enough to replace your existing text editor for editing text files and tweaking configuration files. In fact, chances are they’ll even double up as your IDE. These apps are chock full of bells and whistles, and their developers aren’t thinking of stripping features, but adding more and more and more. + +At the tail end of this test we have jEdit. Not only does it insist on using the proprietary Oracle Java Runtime Environment, it failed to install on our Fedora machine, and the developer doesn’t actively engage with its users. + +UltraEdit does little better. This commercial proprietary tool focuses on web developers, and doesn’t offer anything to non-developer power users that makes it worth recommending over free software alternatives. + +On the third podium position we have Gedit. There’s nothing inherently wrong with Gnome’s default editor, but despite all its positive aspects, it’s simply outclassed by Sublime and Kate. Out of the box, Kate is a more versatile editor than Gedit, and outscores Gnome’s default editor even after taking their respective plugin systems into consideration. + +Both Sublime and Kate are equally good. They performed equally well in most of our tests. Whatever ground it lost to Sublime for not supporting macros, it gained for its keyboard friendliness and its ease of use in defining custom keybindings. + +Kate’s success can be drawn from the fact that it offers the maximum number of features with minimal learning curve. Just fire it up and use it as a simple text editor, or easily edit configuration file with syntax highlighting, or even use it to collaborate and work on a complex programming project thanks to its project management capabilities. + +We aren’t pitching Kate to replace a full-blown integrated development environment such as [insert your favourite specialised tool here]. But it’s an ideal all-rounder and a perfect stepping stone to a specialised tool. + +Kate is designed for moments when you need something that’s quick to respond, doesn’t overwhelm you with its interface and is just as useful as something that might otherwise be overkill. + +### 1st Kate ### + +- Licence LGPL/GPL Version 3.11 +- www.kate-editor.org +- The ultimate mild-mannered text editor with super powers. +- Kate is one of the best apps to come out of the KDE project. + +### 2nd Sublime Text ### + +- Licence Proprietary Version 2.0.2 +- www.sublimetext.com +- A professionally done text editor that’s worth every penny – easy to use, full of features and it looks great. + +### 3rd Gedit ### + +- Licence GPL Version 3.10 +- http://projects.gnome.org/gedit +- Gets it done from Gnome. It’s a wonderful text editor and does an admirable job, but the competition here is too great. + +### 4th UltraEdit ### + +- Licence Proprietary Version 4.1.0.4 +- www.ultraedit.com +- Focuses on bundling conveniences for web developers without offering anything special for general users. + +### 5th jEdit ### + +- Licence GPL Version 5.1.0 +- www.jedit.org +- A lack of support, lack of working on Fedora and a lack of looking nice relegate jEdit to the bottom slot. + +### You may also wish to try… ### + +The default text editor that ships with your distro will also be able to assist you with some advanced tasks. There’s KDE’s KWrite and Raspbian’s Nano, for instance. KWrite inherits some of Kate’s features thanks to KDE’s katepart component, and Nano has sprung back into limelight thanks to its availability for Raspberry Pi. + +If you wish to follow the steps of Linux gurus, you could always try the revered text editors Emacs and Vim. First time users who want to get a taste for the power of Vim might want to consider gVim, which exposes Vim’s power via a graphical interface. + +Besides jEdit and Kate, there are other editors that mimic the usability of veteran advanced editors like Emacs and Vim, such as the JED editor and Joe’s Own Editor, both of which have an emulation mode for Emacs. On the other hand, if you are looking for lightweight code editors check out Bluefish and Geany. They exist to fill the niche between text editors and full-fledged integrated development platforms. + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/text-editors/ + +作者:[Ben Everard][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/ben_everard/ From 3120fe462bcd14a0052165697cc8d9a34e3d4434 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 18 Apr 2015 10:03:46 +0800 Subject: [PATCH 0570/2517] translating --- ...50417 sshuttle--A transparent proxy-based VPN using ssh.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md index ae5c129bee..51dc8889b8 100644 --- a/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md +++ b/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md @@ -1,3 +1,5 @@ +Translating---geekpi + sshuttle – A transparent proxy-based VPN using ssh ================================================================================ sshuttle allows you to create a VPN connection from your machine to any remote server that you can connect to via ssh, as long as that server has python 2.3 or higher.To work, you must have root access on the local machine, but you can have a normal account on the server. @@ -90,4 +92,4 @@ via: http://www.ubuntugeek.com/sshuttle-a-transparent-proxy-based-vpn-using-ssh. 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file +[a]:http://www.ubuntugeek.com/author/ubuntufix From 57bf4c323957b3fff1b46ab9f23d7825f27389f9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 18 Apr 2015 10:31:07 +0800 Subject: [PATCH 0571/2517] translated --- ...A transparent proxy-based VPN using ssh.md | 38 ++++---- ...A transparent proxy-based VPN using ssh.md | 93 +++++++++++++++++++ 2 files changed, 111 insertions(+), 20 deletions(-) create mode 100644 translated/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md diff --git a/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md index 51dc8889b8..297f411840 100644 --- a/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md +++ b/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md @@ -1,42 +1,41 @@ -Translating---geekpi - -sshuttle – A transparent proxy-based VPN using ssh +sshuttle - 一个使用ssh的基于VPN的透明代理 ================================================================================ -sshuttle allows you to create a VPN connection from your machine to any remote server that you can connect to via ssh, as long as that server has python 2.3 or higher.To work, you must have root access on the local machine, but you can have a normal account on the server. +sshuttle允许你通过ssh创建一条从你电脑连接到任何远程服务器的VPN连接,只要你的服务器支持python2.3 或则更高的版本, 你必须有本机的root权限,但是你可以在服务端有普通账户即可。 -It's valid to run sshuttle more than once simultaneously on a single client machine, connecting to a different server every time, so you can be on more than one VPN at once.If run on a router, sshuttle can forward traffic for your entire subnet to the VPN. +你可以在一台机器上同时运行多次sshuttle来连接到不同的服务器上,这样你就可以一次使用多个VPN, sshuttle可以转发你子网所有流量到VPN中。 -### Install sshuttle on ubuntu ### -Open the terminal and run the following command +### 在Ubuntu中安装sshuttle ### + +在终端中输入下面的命令 sudo apt-get install sshuttle -### Using sshuttle ### +### 使用 sshuttle ### -#### sshuttle Syntax #### +#### sshuttle 语法 #### sshuttle [options...] [-r [username@]sshserver[:port]] [subnets] -#### Option details #### +#### Option 细节 #### -r, —remote=[username@]sshserver[:port] -the remote hostname and optional username and ssh port number to use for connecting to the remote server. For example,example.com, testuser@example.com, testuser@example.com:2222, or example.com:2244. +远程主机名和可选的用户名,用于连接远程服务器的ssh端口号。比如example.com、testuser@example.com、testuser@example.com:2222或者example.com:2244。 -#### sshuttle Examples #### +#### sshuttle 例子 #### -From the machine use the following command +在机器中使用下面的命令: sudo sshuttle -r username@sshserver 0.0.0.0/0 -vv -When it starts, sshuttle creates an ssh session to the server specified by the -r option. If -r is omitted, it will start both its client and server locally, which is sometimes useful for testing. +当开始后,sshuttle会创建一个ssh会话到通过-r指定的服务器。如果-r被忽略了,它会在本地运行客户端和服务端,这个有时会在测试时有用。 -After connecting to the remote server, sshuttle uploads its (python) source code to the remote end and executes it there. Thus, you don't need to install sshuttle on the remote server, and there are never sshuttle version conflicts between client and server. +连接到远程服务器后,sshuttle会上传它的(python)源码到远程服务器并执行。那么,你就不需要在远程服务器上安装sshuttle,并且客户端和服务器端间不会存在sshuttle版本冲突。 -#### More Examples From Man page #### +#### 手册中的更多例子 #### -Test locally by proxying all local connections, without using ssh: +代理所有的本地连接用于本地测试,没有使用ssh: $ sudo sshuttle -v 0/0 @@ -59,8 +58,7 @@ Test locally by proxying all local connections, without using ssh: c : SW#8:192.168.42.121:47523: deleting c : SW#6:192.168.42.106:50035: deleting -Test connection to a remote server, with automatic hostname and subnet -guessing: +测试到远程服务器上的连接,自动猜测主机名和子网: $ sudo sshuttle -vNHr example.org @@ -87,7 +85,7 @@ guessing: via: http://www.ubuntugeek.com/sshuttle-a-transparent-proxy-based-vpn-using-ssh.html 作者:[ruchi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/translated/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md new file mode 100644 index 0000000000..297f411840 --- /dev/null +++ b/translated/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md @@ -0,0 +1,93 @@ +sshuttle - 一个使用ssh的基于VPN的透明代理 +================================================================================ +sshuttle允许你通过ssh创建一条从你电脑连接到任何远程服务器的VPN连接,只要你的服务器支持python2.3 或则更高的版本, 你必须有本机的root权限,但是你可以在服务端有普通账户即可。 + +你可以在一台机器上同时运行多次sshuttle来连接到不同的服务器上,这样你就可以一次使用多个VPN, sshuttle可以转发你子网所有流量到VPN中。 + + +### 在Ubuntu中安装sshuttle ### + +在终端中输入下面的命令 + + sudo apt-get install sshuttle + +### 使用 sshuttle ### + +#### sshuttle 语法 #### + + sshuttle [options...] [-r [username@]sshserver[:port]] [subnets] + +#### Option 细节 #### + +-r, —remote=[username@]sshserver[:port] + +远程主机名和可选的用户名,用于连接远程服务器的ssh端口号。比如example.com、testuser@example.com、testuser@example.com:2222或者example.com:2244。 + +#### sshuttle 例子 #### + +在机器中使用下面的命令: + + sudo sshuttle -r username@sshserver 0.0.0.0/0 -vv + +当开始后,sshuttle会创建一个ssh会话到通过-r指定的服务器。如果-r被忽略了,它会在本地运行客户端和服务端,这个有时会在测试时有用。 + +连接到远程服务器后,sshuttle会上传它的(python)源码到远程服务器并执行。那么,你就不需要在远程服务器上安装sshuttle,并且客户端和服务器端间不会存在sshuttle版本冲突。 + +#### 手册中的更多例子 #### + +代理所有的本地连接用于本地测试,没有使用ssh: + + $ sudo sshuttle -v 0/0 + + Starting sshuttle proxy. + Listening on (‘0.0.0.0′, 12300). + [local sudo] Password: + firewall manager ready. + c : connecting to server... + s: available routes: + s: 192.168.42.0/24 + c : connected. + firewall manager: starting transproxy. + c : Accept: ‘192.168.42.106':50035 -> ‘192.168.42.121':139. + c : Accept: ‘192.168.42.121':47523 -> ‘77.141.99.22':443. + ...etc... + ^C + firewall manager: undoing changes. + KeyboardInterrupt + c : Keyboard interrupt: exiting. + c : SW#8:192.168.42.121:47523: deleting + c : SW#6:192.168.42.106:50035: deleting + +测试到远程服务器上的连接,自动猜测主机名和子网: + + $ sudo sshuttle -vNHr example.org + + Starting sshuttle proxy. + Listening on (‘0.0.0.0′, 12300). + firewall manager ready. + c : connecting to server... + s: available routes: + s: 77.141.99.0/24 + c : connected. + c : seed_hosts: [] + firewall manager: starting transproxy. + hostwatch: Found: testbox1: 1.2.3.4 + hostwatch: Found: mytest2: 5.6.7.8 + hostwatch: Found: domaincontroller: 99.1.2.3 + c : Accept: ‘192.168.42.121':60554 -> ‘77.141.99.22':22. + ^C + firewall manager: undoing changes. + c : Keyboard interrupt: exiting. + c : SW#6:192.168.42.121:60554: deleting + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/sshuttle-a-transparent-proxy-based-vpn-using-ssh.html + +作者:[ruchi][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix From c1c6052bc11d6fff4854e8d141acb7d766a67669 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 18 Apr 2015 20:56:04 +0800 Subject: [PATCH 0572/2517] [Translating 2/3] share/20140804 Group Test--Linux Text Editors --- ...20140804 Group Test--Linux Text Editors.md | 90 ++++++++++--------- 1 file changed, 47 insertions(+), 43 deletions(-) diff --git a/translated/share/20140804 Group Test--Linux Text Editors.md b/translated/share/20140804 Group Test--Linux Text Editors.md index aae721a30f..2809fbe129 100644 --- a/translated/share/20140804 Group Test--Linux Text Editors.md +++ b/translated/share/20140804 Group Test--Linux Text Editors.md @@ -114,17 +114,17 @@ UltraEdit为它"一切都可自定义"的座右铭感到自豪,这也包括键 ### 片段和宏 ### -Macros help you cut down the time spent on editing and organising data by automating repetitive steps, while Snippets of code extend a similar functionality to programmers by creating reusable chunks of source code. Both have the ability to save you time. +宏通过自动化重复的步骤帮助你降低花费在编辑和组织数据上的时间,而代码片段通过创建可重用的源代码块为程序员扩展类似的功能。这两者都能节省你的时间。 -The vanilla Gedit installation doesn’t have either of these functionalities, but you can enable them via separate plugins. While the Snippets plugin ships with Gedit, you’ll have to manually download and install the macro plugin (it’s called gedit-macropy and is hosted on GitHub) before you can enable it from within Gedit. +标准的Gedit安装没有这两种功能中的任何一种,但是你可以通过独立的插件启用这些功能。片段插件随Gedit一起发布,但在Gedit内部启用宏插件之前你需要手动下载和安装(被称为gedit-macropy,托管在GitHub上)。 -Kate takes the same plugins route to enable the snippets feature. Once added, the plugin also adds a repository of snippets for PHP, Bash and Java. You can display the list of snippets in the sidebar for easier access. Right-click on a snippet to edit its contents as well as its shortcut key combination. However, very surprisingly, it doesn’t support macros – despite repeated hails from users since 2002! +Kate也同样通过插件的形式启用片段功能。一旦加入,插件也增加了片段的PHP,Bash和Java库。你可以在侧边栏中显示片段列表以便于访问。可以通过右击片段或者快捷键组合方式编辑它的内容。然而,令人惊讶的是,它不支持宏-尽管用户从2002年开始重复要求! -jEdit too has a plugin for enabling snippets. But it can record macros from user actions and you can also write them in the BeanShell scripting language (BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript). jEdit also has a plugin that will download several macros from jEdit’s website. +jEdit也有一个启用片段的插件。但是它可以从用户行为中记录宏或者你也可以在BeanShell 脚本语言(BeanShell支持像Perl和JavaScript那样将脚本对象封锁为简单的方法)中写宏。jEdit也有一个可以从jEdit的网站中下载多种宏的插件。 -Sublime ships with inbuilt ability to create both snippets and macros, and ships with several snippets of frequently used functions for most popular programming languages. +Sublime有创建片段和宏的内建功能,也有为大多数编程语言经常使用的函数多种片段。 -Snippets in UltraEdit are called Smart Templates and just like with Sublime you can insert them based upon the kind of source file you’re editing. To complement the Macro recording function, UltraEdit also has an integrated javascript-based scripting language to automate tasks. You can also download user-submitted macros and scripts from the editor’s website. +在UltraEdit中片段被称为智能模板,正如Sublime你可以根据正在编辑的源代码文件类型插入片段。要完成宏记录功能,UltraEdit还有一个基于JavaScript的集成脚本语言来完成自动任务。你也可以从编辑器的网站中下载用户提交的宏和脚本。 **Verdict:** @@ -134,67 +134,69 @@ Snippets in UltraEdit are called Smart Templates and just like with Sublime you - UltraEdit:5/5 - jEdit:5/5 -![UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects.](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) +![UltraEdit的用户界面是高度可配置的 — 你可以正如改变其它许多方面那样简单的自定义工具栏和菜单的布局。](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) -UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects. +UltraEdit的用户界面是高度可配置的 — 你可以正如改变其它许多方面那样简单的自定义工具栏和菜单的布局。] -### Ease of use ### +### 易用性 ### -Unlike a bare-bones text editor, the text editors in this feature are brimming with features to accommodate a wide range of users — from document writers to programmers. Instead of stripping features from the apps, their developers are looking for avenues to add more functionality. +不像一个准系统文本编辑器,文本编辑器的这个功能洋溢着适应大范围用户的功能 - 从文档写作者到程序员。从应用程序剥离相反,他们的开发者在寻找添加更多功能的途径。 -Although at first glance most apps in this group test have a very similar layout, upon closer inspection, you’ll notice several usability differences. We have a weak spot for apps that expose their functionality and features by making judicious use of the user interface, instead of just overwhelming the user. +尽管第一眼看上去这次组测试中的大部分应用有一个很相似的布局,经过仔细的检查,你会发现一些可用性差异。我们通过用户界面的合理使用来介绍它们的功能和特性,而不是铺天盖地地告诉读者。 ### Gedit: 4/5 ### -Gedit wears a very vanilla look. It has an easy interface with minimal menus and buttons. This is a two-edged sword though, as some users might fail to realise its true potential. +Gedit有很普通的外观。通过最小化菜单和按钮有一个简单的界面。但这也是一种双刃剑,因为有些用户可能不会发现它真正的潜能。 -The app can open multiple files in tabs that can be rearranged and moved between windows. Users can optionally enable panels on the side and bottom for displaying a file browser and the output of a tool enabled by a plugin. The app will detect when an open file is modified by another application and offers to reload that file. +应用程序可以通过在窗口中能重排和移动的选项卡打开多个文件。用户可以通过使用一个插件选择性地启用旁边或者底部用来显示文件浏览和工具输出的面板。这个应用程序会检测到被其它应用程序更改的文件并可以重新加载这个文件。 -The UI has been given a major overhaul in the latest version of the app yet to make its way into Gnome. However it isn’t yet stable, and while it maintains all features, several plugins that interact with the menu will need to be updated. +为了适配Gnome,在应用程序的最后一个版本中考虑了大量的用户界面。然而它还并不稳定,尽管包括了所有的功能,和菜单交互的一些插件还需要升级。 ### Kate: 5/5 ### -Although a major part of its user interface resembles Gedit, Kate tucks in tabs at either side and its menus are much fuller. The app is approachable and invites users to explore other features. +尽管用户界面的主要部分和Gedit的相似,Kate可以在两边显示选项卡并且它的菜单更加丰富。该应用程序平易近人,让用户可以挖掘其它功能。 -Kate can transparently open and save files over all protocols supported by KDE’s KIO including HTTP, FTP, SSH, SMB and WebDAV. You can use the app to work with multiple files at the same time. But unlike the traditional horizontal tab switching bar in most app, Kate has tabs on either side of the screen. The left sidebar will display an index of open files. Programmers who need to see different parts of the same file at the same time will also appreciate its ability to split the interface horizontally as well as vertically. +Kate可以在KDE的KIO支持的所有协议上透明地打开和保存文件,包括HTTP, FTP, SSH, SMB 和 WebDAV。你可以用这个应用同时处理多个文件。但不同于大部分应用程序传统的水平选项卡选择栏,Kate在屏幕的两个方向都有选项卡。左侧的侧边栏显示打开文件的索引。需要同时查看一个文件不同部分的程序员也会感激它可以水平或者竖直分隔界面的能力。 ### Sublime: 5/5 ### -Sublime lets you view up to four files at the same time in various arrangements. There’s also a full-screen distraction free mode that just displays the file and the menu, for when you’re in the zone. -The editor also has a minimap on the right, which is useful for navigating long files. The app ships with several snippets for popular functions in several programming languages, which makes it very usable for developers. Another neat editing feature, whether you are working with text documents or code, is the ability to swap and shuffle selections. +Sublime支持你在不同方式同时查看多达四个文件。当你在zone下,这里也有一个只显示文件和菜单的全屏模式。 + +这个编辑器还在右边有个小地图,这在长文件中导航非常有用。应用程序为多种编程语言提供多种流行功能的片段,这使得它对于开发者非常有用。另一个精巧的功能是,无论你使用都是文本文档或者代码,都可以交换和随机选择。 ### UltraEdit: 3/5 ### -UltraEdit’s interface is loaded with several toolbars at the top and bottom of the interface. Along with the tabs to switch between documents, panes on either side and the gutter area, these leave little room for the editor window. -Web developers working with HTML files have lots of assistance at their fingertips. You can also access remote files via FTP and SFTP. Advanced features such as recording a macro and comparing files are also easily accessible. +UltraEdit在界面的顶部和底部加载了多种工具栏。由于有在文档中跳转的选项卡,两边的面板,以及复杂区别,使得只剩下一点空间给编辑窗口。 -Using the app’s Preferences window you can tweak various aspects of the app, including the colour scheme and other features like syntax highlighting. +使用HTML的网络开发者有很多唾手可得的帮助。你可以通过FTP和SFTP访问远程文件。高级功能,例如记录一个宏以及比较文件,也简单易用。 + +使用应用程序的Preference窗口,你可以调整应用程序的多个方面,包括颜色主题和类似语法高亮的其它功能。 ### jEdit: 3/5 ### -In terms of usability, one of the first red-flags was jEdit’s inability to install on RPM-based distros. Navigating the editor takes some getting used to, since its menus aren’t in the same order as in other popular apps and some have names that won’t be familiar to the average desktop user. However, the app include detailed inbuilt help, which will help ease the learning curve. +在可用性方面,首先一个不好就是jEdit不能在基于RPM的发行版上安装。导航编辑器需要一些时间来适应,因为它的菜单和其它流行的应用程序顺序不同,而且有些普通桌面用户不熟悉的名字。但是,该应用程序有详细的内部帮助,这有利于缓解学习曲线。 -jEdit highlights the current line you are on and enables you to split windows in multiple viewing modes. You can easily install and manage plugins from within the app, and in addition to full macros, jEdit also lets you record quick temporary ones. +jEdit高亮你所在的当前行,并使你能一多种查看方式分隔窗口。你可以简单地从应用程序中安装和管理插件,除了全宏,jEdit也支持你记录快速临时的宏。 -![Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment](http://www.linuxvoice.com/wp-content/uploads/2014/08/jedit-web.png) +![由于它的Java基础,jEdit在任何桌面环境中都不能给人宾至如归的感觉](http://www.linuxvoice.com/wp-content/uploads/2014/08/jedit-web.png) -Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment +由于它的Java基础,jEdit在任何桌面环境中都不能给人宾至如归的感觉 -### Availability and support ### +### 可用性和支持 ### -There are several similarities between Gedit and Kate. Both apps take advantage of their respective parent project, Gnome and KDE, and are bundled with several mainstream distros. Yet both projects are cross-platform and have Windows and Mac OS X ports as well as native Linux versions. +在Gedit和Kate之间有很多相似性。两个应用程序都得益于他们各自的父项目,Gnome和KDE,并绑定在各种主流的发行版中。另外两个项目都是交叉平台的,有Windows和Mac OS X版本以及本来的Linux版本。 -Gedit is hosted on Gnome’s web infrastructure and has a brief user guide, information about the various plugins, and the usual channels of getting in touch including a mailing list and IRC channel. You’ll also find usage information on the websites of other Gnome-based distros such as Ubuntu. Similarly, Kate gets the benefit of KDE’s resources and hosts detailed user information as well as a mailing list and IRC channel. You can access their respective user guides offline from within the app as well. +Gedit托管在Gnome的网络设施上并有一个简单的用户指南,关于多种插件的信息,以及包括邮件列表和IRC通道的常用保持联系方式。你也可以在其它基于Gnome的发行版,例如Ubuntu中找到使用信息。相似地,Kate得益于KDE的资源,并包括详细的用户信息以及邮件列表和IRC通道。你也可以从应用程序中获取相应的离线用户指南。 -UltraEdit is also available for Windows and Mac OS X besides Linux, and has detailed user guides on getting started, though there’s none included within the app. To assist users, UltraEdit hosts a database of frequently asked questions, a bunch of power tips that have detailed information about several specific features, and users can engage with one another other on forum boards. Additionally, paid users can also seek support from the developers via email. +除了Linux,UltraEdit在Windows和Mac OS X中也可用,虽然在应用程序中并没有包括,但在启动时也有详细的用户指南。为了辅助用户,UltraEdit保存了一个常见问题的数据库,一系列关于多种特定功能的详细信息的有用提示,用户还可以在论坛版块彼此帮助。另外,付费用户也可以通过邮件从开发者中获取支持。 -Sublime supports the same number of platforms, however you don’t need to buy a separate licence for each platform. The developer keeps users abreast with ongoing development via a blog and also participates actively in the hosted forums. The highlight of the project’s support infrastructure is the freely available detailed tutorial and video course. Sublime is lovely. +Sublime支持相同数目的平台,但是你需要单独为每种平台购买许可证。开发者通过博客使用户了解正在进行的开发,并积极参加了主持论坛。这个项目支持设施的亮点是提供免费的详细教程和视频课程。Sublime非常可爱。 -Because it’s written in Java, jEdit is available on several platforms. On its website you’ll find a detailed user guide and links to documentation of some plugins. However, there are no avenues for users to engage with other users or the developer. +由于是用java编写的,jEdit在多种平台中都可用。在它的网站上你可以找到一个详细的用户指南以及一些插件帮助文档的链接。然而,这里没有能使用户和其他用户或者开发者交流的途径。 -**Verdict:** +**判定:** - Gedit: 4/5 - Kate: 4/5 @@ -202,25 +204,25 @@ Because it’s written in Java, jEdit is available on several platforms. On its - UltraEdit: 3/5 - jEdit: 2/5 -### Add-on and plugins ### +### 附加和插件 ### -Different users have different requirements, and a single lightweight app can only do as much. This is where plugins come into the picture. The apps rely on these small pluggable widgets to extend their feature set and be of use to even more number of users. +不同的用户有不同的需求,一个简单的轻量级应用程序只能做到这么多。这就是为什么需要插件的原因。应用程序依赖于这些小部件来扩展它们的功能集并让更多的用户使用。 -The one exception is UltraEdit. The app has no third-party plugins, but its developers do point out that third-party tools such as HtmlTidy are already installed with UltraEdit. +UltraEdit是一个另外。它没有第三方插件,但开发者确实支出了例如HtmlTidy的第三方工具已经安装到了UltraEdit。 -Gedit ships with a number of plugins installed, and you can download more with the gedit-plugins package. The project’s website also points to several third-party plugins based on their compatibility with the Gedit versions. +Gedit附带了好多已安装的插件,你可以从gedit-插件包下载更多的插件。基于和Gedit版本的兼容性,项目网站也有到多个第三方插件的链接。 -Three useful plugins for programmers are Code Comment, Terminal Plugin, which adds a terminal in the bottom panel, and the Session Saver. The Session Saver is really useful when you’re working on a project with multiple files. You can open all the files in tabs, save your session and when you restore it with a single click it’ll open all the files in the same tab order as you saved them. +三个对程序员非常有用的插件是Code Comment,在底部面板增加一个终端的Terminal Plugin以及Session Saver。当你用多个文件开发项目的时候Session Saver相当有用。你可以在选项卡中打开文件,保存会话,当你用一个单击回复的时候,可以按照你保存时的选项卡顺序打开所有的文件。 -Similarly, you can extend Kate by adding plugins using its built-in plugin manager. In addition to the impressive projects plugins, some others that will be of use to developers include an embedded terminal, ability to compile and debug code and execute SQL queries on databases. +类似的,你可以通过用内部的插件管理器增加插件来扩展Kate。除了令人映像深刻的项目插件,一些开发者使用的插件包括嵌入式终端,能编译和调试代码,以及对数据库执行SQL查询。 -Plugins for Sublime are written in Python, and the text editor includes a tool called Package Control, which is a little bit like apt-get in that it enables the user to find, install, upgrade and remove plugin packages. With plugins, you can bring the Git version control to Sublime, as well as the JSLint tool to improve JavaScript. The Sublime Linter plugin is a must have for coders and will point out any errors in your code. +Sublime的插件是用Python写的,文本编辑器包括了一个类似于apt-get,能使用户查找,安装,升级和移除插件包的名为Package Control的工具。通过插件,你可以在Sublime中使用Git版本控制,以及改进JavaScript的JSLint工具。Sublime Linter能指出你代码中的错误,是编码人员必备的插件。 -jEdit boasts the most impressive plugin infrastructure. The app has over 200 plugins, which can be browsed in the dedicated site of their own. The website lists plugins under various categories such as File Management, Version Control, Text, etc. You’ll find lots of plugins housed under each category. +jEdit拥有最令人映像深刻的插件设施。该应用有超过200个插件,可以在它们自己的专用网站中浏览。网站通过不同的类型列举了插件,例如文件管理,版本控制,文本等。你可以在每个类型下找到很多的插件。 -Some of the best plugins are the Android plugin, which provides utilities to work on Android projects; the TomcatSwitch plugin, using which you can create and control an external Jakarta Tomcat server process; and the Vimulator plugin, for Vi-like capabilities. You can install these plugins using jEdit’s using its plugin manager. +一些最好的插件是Android插件,它们提供了和Android项目协同工作的工具;你可以使用TomcatSwitch插件创建和控制外部Jakarta Tomcat服务器进程;以及类似于Vi功能的Vimulator插件。你可以通过使用jEdit的插件管理器安装这些插件。 -**Verdict** +**评定** - Gedit: 3/5 - Kate: 4/5 @@ -228,7 +230,9 @@ Some of the best plugins are the Android plugin, which provides utilities to wor - UltraEdit: 1/5 - jEdit: 5/5 -### Plain ol’ text editing ### +### 纯文本编辑 ### + + Despite all their powerful extra-curricular activities that might even displace full-blown apps across several genres, there will be times when you just need to use these text editing behemoths to read, write, or edit plain and simple text. While you can use all of them to enter text, we are evaluating them for access to common text-editing conveniences. From 3171c57689369f401b0ad55ca78bc52104533ab6 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 18 Apr 2015 22:02:53 +0800 Subject: [PATCH 0573/2517] [Translated] share/20140804 Group Test--Linux Text Editors --- ...20140804 Group Test--Linux Text Editors.md | 319 ------------------ ...20140804 Group Test--Linux Text Editors.md | 54 ++- 2 files changed, 26 insertions(+), 347 deletions(-) delete mode 100644 sources/share/20140804 Group Test--Linux Text Editors.md diff --git a/sources/share/20140804 Group Test--Linux Text Editors.md b/sources/share/20140804 Group Test--Linux Text Editors.md deleted file mode 100644 index 40ef1e6f51..0000000000 --- a/sources/share/20140804 Group Test--Linux Text Editors.md +++ /dev/null @@ -1,319 +0,0 @@ -Translating by ictlyh -Group Test: Linux Text Editors -================================================================================ -> Mayank Sharma tests five supercharged text editors that can crunch more than just words. - -If you’ve been using Linux long, you know that whether you want to edit an app’s configuration file, hack together a shell script, or write/review bits of code, the likes of LibreOffice just won’t cut it. Although the words mean almost the same thing, you don’t need a word processor for these tasks; you need a text editor. - -In this group test we’ll be looking at five humble text editors that are more than capable of heavy-lifting texting duties. They can highlight syntax and auto-indent code just as effortlessly as they can spellcheck documents. You can use them to record macros and manage code snippets just as easily as you can copy/paste plain text. - -Some simple text editors even exceed their design goals thanks to plugins that infuse them with capabilities to rival text-centric apps from other genres. They can take on the duties of a source code editor and even an Integrated Development Environment. - -Two of most popular and powerful plain text editors are Emacs and Vim. However, we didn’t include them in this group test for a couple of reasons. Firstly, if you are using either, congratulations: you don’t need to switch. Secondly, both of these have a steep learning curve, especially to the GUI-oriented desktop generation who have access to alternatives that are much more inviting. - -### The contenders: ### - -#### Gedit #### - -- URL:http://projects.gnome.org/gedit/ -- Version: 3.10 -- Licence: GPL -- Is Gnome’s default text editor up to the challenge? - -#### Kate #### - -- URL: www.kate-editor.org -- Version: 3.11 -- Licence: LGPL/GPL -- Will Kate challenge fate? - -#### Sublime Text #### - -- URL: www.sublimetext.com -- Version: 2.0.2 -- Licence: Proprietary -- Proprietary software in the land of free with the heart of gold. - -#### UltraEdit #### - -- URL: www.ultraedit.com -- Version: 4.1.0.4 -- Licence: Proprietary -- Does it do enough to justify its price? - -#### jEdit #### - -- URL: www.jedit.org -- Version: 5.1.0 -- Licence: GPL -- Will the Java-based editor spoil the party for the rest? - -![There’s a fine balance between stuffing an app with features and exposing all of them to the user. Geddit keeps most of its features hidden.](http://www.linuxvoice.com/wp-content/uploads/2014/07/gedit-web.png) -There’s a fine balance between stuffing an app with features and exposing all of them to the user. Geddit keeps most of its features hidden. - -### The crucial criteria ### - -All the tools, except Gedit and jEdit, were installed on Fedora and Ubuntu via their recommended installation method. The former already shipped with the default Gnome desktop and the latter stubbornly refused to install on Fedora. Since these are relatively simple apps, they have no esoteric dependencies, the only exception being jEdit, which requires Oracle Java. - -Thanks to the continued efforts of both Gnome and KDE, all editors look great and function properly irrespective of the desktop environment they are running on. That not only rules it out as an evaluation criterion, it also means that you are no longer bound by the tools that ship with your favourite desktop environment. - -In addition to their geekier functionality, we also tested all our candidates for general-purpose text editing. However, they are not designed to mimic all the functionality of a modern-day word processor and weren’t evaluated as such. - -![Kate can double up as a versatile can capable integrated development environment (IDE).](http://www.linuxvoice.com/wp-content/uploads/2014/08/kate-web.png) - -Kate can double up as a versatile can capable integrated development environment (IDE). - -### Programming language support ### - -UltraEdit does syntax highlighting, can fold code and has project management capabilities. There’s also a function list, which is supposed to list all the functions in the source file, but it didn’t work for any of our test code files. UltraEdit also supports HTML5, and has a HTML toolbar with which you can add commonly-used HTML tags. - -Even Gnome’s default text editor, Gedit, has several code-oriented features such as bracket matching, automatic indentation, and will also highlight syntax for various programming languages including C, C++, Java, HTML, XML, Python, Perl, and many others. - -If you’re looking for more programming assistance, look at Sublime and Kate. Sublime supports several programming languages and (as well as the popular ones) is able to highlight syntax for C#, D, Dylan, Erlang, Groovy, Haskell, Lisp, Lua, MATLAB, OCaml, R, and even SQL. If that isn’t enough for you, you can download add-ons to support even more languages. - -Furthermore, its syntax highlighting ability offers several customisable options. The app will also match braces, to ensure they are all properly rounded off, and the auto-complete function in Sublime works with variables created by the user. - -Just like Komodo IDE, sublime also displays a scrollable preview of the full source code, which is really handy for navigating long code files and lets you jump between different parts of the file. - -One of the best features of Sublime is its ability to run code for certain languages like C++, Python, Ruby, etc from within the editor itself, assuming of course you have the compiler and other build system tools installed on your computer. This helps save time and eliminates the need to switch out to the command line. - -You can also enable the build system in Kate with plugins. Furthermore, you can add a simple front-end to the GDB debugger. Kate will work with Git, Subversion and Mercurial version control systems, and also provides some functionality for project management. - -It does all this in addition to highlighting syntax for over 180 languages, along with other assistance like bracket matching, auto-completion and auto-indentation. It also supports code folding and can even collapse functions within a program. - -The only disappointment is jEdit, which bills itself as a programmer’s text editor, but it struggled with other basic functions such as code folding and wouldn’t even suggest or complete functions. - -**Verdict:** - -- Gedit:3/5 -- Kate:5/5 -- Sublime:5/5 -- UltraEdit3/5 -- jEdit:1/5 - -![If you don’t like Sublime’s Charcoal appearance, you can choose one of the other 22 themes included with ti.](http://www.linuxvoice.com/wp-content/uploads/2014/08/sublime-web.png) - -If you don’t like Sublime’s Charcoal appearance, you can choose one of the other 22 themes included with ti. - -### Keyboard control ### - -Users of an advanced text editor expect to control and operate it exclusively via the keyboard. Furthermore, some apps even allow their users to further customise the key bindings for the shortcuts. - -You can easily work with Gedit using its extensive keyboard shortcut keys. There are keys for working with and editing files as well as invoke tools for common tasks such as spellchecking a document. You can access a list of default shortcut keys from within the app, but there’s no graphical way to customise them. Similarly, to customise the keybindings in Sublime, you need to make modifications in its XML keymap files. Sublime has been criticised for its lack of a graphical interface to define keyboard shortcuts, but long-term users have defended the current file-based mechanism, which gives them more control. - -UltraEdit is proud of its “everything is customisable” motto, which it extend to keyboard shortcuts. You can define custom hotkeys for navigating the menus and also define your own multi-key key-mappings for accessing its plethora of functions. - -In addition to its fully customisable keyboard shortcuts, jEdit also has pre-defined keymaps for Emacs. Kate is equally impressive in this respect. It has an easily accessible window to customise the key bindings. You can change the default keys, as well as define alternate ones. Furthermore, Kate also has a Vi mode which will let users operate Kate using Vi keys. - -**Verdict:** - -- Gedit:2/5 -- Kate:5/5 -- Sublime:3/5 -- UltraEdit:4/5 -- jEdit:5/5 - -### Snippets and macros ### - -Macros help you cut down the time spent on editing and organising data by automating repetitive steps, while Snippets of code extend a similar functionality to programmers by creating reusable chunks of source code. Both have the ability to save you time. - -The vanilla Gedit installation doesn’t have either of these functionalities, but you can enable them via separate plugins. While the Snippets plugin ships with Gedit, you’ll have to manually download and install the macro plugin (it’s called gedit-macropy and is hosted on GitHub) before you can enable it from within Gedit. - -Kate takes the same plugins route to enable the snippets feature. Once added, the plugin also adds a repository of snippets for PHP, Bash and Java. You can display the list of snippets in the sidebar for easier access. Right-click on a snippet to edit its contents as well as its shortcut key combination. However, very surprisingly, it doesn’t support macros – despite repeated hails from users since 2002! - -jEdit too has a plugin for enabling snippets. But it can record macros from user actions and you can also write them in the BeanShell scripting language (BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript). jEdit also has a plugin that will download several macros from jEdit’s website. - -Sublime ships with inbuilt ability to create both snippets and macros, and ships with several snippets of frequently used functions for most popular programming languages. - -Snippets in UltraEdit are called Smart Templates and just like with Sublime you can insert them based upon the kind of source file you’re editing. To complement the Macro recording function, UltraEdit also has an integrated javascript-based scripting language to automate tasks. You can also download user-submitted macros and scripts from the editor’s website. - -**Verdict:** - -- Gedit:3/5 -- Kate:1/5 -- Sublime:5/5 -- UltraEdit:5/5 -- jEdit:5/5 - -![UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects.](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) - -UltraEdit’s UI is highly configurable — you can customise the layout of the toolbars and menus just as easily as you can change many other aspects. - -### Ease of use ### - -Unlike a bare-bones text editor, the text editors in this feature are brimming with features to accommodate a wide range of users — from document writers to programmers. Instead of stripping features from the apps, their developers are looking for avenues to add more functionality. - -Although at first glance most apps in this group test have a very similar layout, upon closer inspection, you’ll notice several usability differences. We have a weak spot for apps that expose their functionality and features by making judicious use of the user interface, instead of just overwhelming the user. - -### Gedit: 4/5 ### - -Gedit wears a very vanilla look. It has an easy interface with minimal menus and buttons. This is a two-edged sword though, as some users might fail to realise its true potential. - -The app can open multiple files in tabs that can be rearranged and moved between windows. Users can optionally enable panels on the side and bottom for displaying a file browser and the output of a tool enabled by a plugin. The app will detect when an open file is modified by another application and offers to reload that file. - -The UI has been given a major overhaul in the latest version of the app yet to make its way into Gnome. However it isn’t yet stable, and while it maintains all features, several plugins that interact with the menu will need to be updated. - -### Kate: 5/5 ### - -Although a major part of its user interface resembles Gedit, Kate tucks in tabs at either side and its menus are much fuller. The app is approachable and invites users to explore other features. - -Kate can transparently open and save files over all protocols supported by KDE’s KIO including HTTP, FTP, SSH, SMB and WebDAV. You can use the app to work with multiple files at the same time. But unlike the traditional horizontal tab switching bar in most app, Kate has tabs on either side of the screen. The left sidebar will display an index of open files. Programmers who need to see different parts of the same file at the same time will also appreciate its ability to split the interface horizontally as well as vertically. - -### Sublime: 5/5 ### - -Sublime lets you view up to four files at the same time in various arrangements. There’s also a full-screen distraction free mode that just displays the file and the menu, for when you’re in the zone. - -The editor also has a minimap on the right, which is useful for navigating long files. The app ships with several snippets for popular functions in several programming languages, which makes it very usable for developers. Another neat editing feature, whether you are working with text documents or code, is the ability to swap and shuffle selections. - -### UltraEdit: 3/5 ### - -UltraEdit’s interface is loaded with several toolbars at the top and bottom of the interface. Along with the tabs to switch between documents, panes on either side and the gutter area, these leave little room for the editor window. - -Web developers working with HTML files have lots of assistance at their fingertips. You can also access remote files via FTP and SFTP. Advanced features such as recording a macro and comparing files are also easily accessible. - -Using the app’s Preferences window you can tweak various aspects of the app, including the colour scheme and other features like syntax highlighting. - -### jEdit: 3/5 ### - -In terms of usability, one of the first red-flags was jEdit’s inability to install on RPM-based distros. Navigating the editor takes some getting used to, since its menus aren’t in the same order as in other popular apps and some have names that won’t be familiar to the average desktop user. However, the app include detailed inbuilt help, which will help ease the learning curve. - -jEdit highlights the current line you are on and enables you to split windows in multiple viewing modes. You can easily install and manage plugins from within the app, and in addition to full macros, jEdit also lets you record quick temporary ones. - -![Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment](http://www.linuxvoice.com/wp-content/uploads/2014/08/jedit-web.png) - -Thanks to its Java underpinnings, jEdit doesn’t really feel at home on any desktop environment - -### Availability and support ### - -There are several similarities between Gedit and Kate. Both apps take advantage of their respective parent project, Gnome and KDE, and are bundled with several mainstream distros. Yet both projects are cross-platform and have Windows and Mac OS X ports as well as native Linux versions. - -Gedit is hosted on Gnome’s web infrastructure and has a brief user guide, information about the various plugins, and the usual channels of getting in touch including a mailing list and IRC channel. You’ll also find usage information on the websites of other Gnome-based distros such as Ubuntu. Similarly, Kate gets the benefit of KDE’s resources and hosts detailed user information as well as a mailing list and IRC channel. You can access their respective user guides offline from within the app as well. - -UltraEdit is also available for Windows and Mac OS X besides Linux, and has detailed user guides on getting started, though there’s none included within the app. To assist users, UltraEdit hosts a database of frequently asked questions, a bunch of power tips that have detailed information about several specific features, and users can engage with one another other on forum boards. Additionally, paid users can also seek support from the developers via email. - -Sublime supports the same number of platforms, however you don’t need to buy a separate licence for each platform. The developer keeps users abreast with ongoing development via a blog and also participates actively in the hosted forums. The highlight of the project’s support infrastructure is the freely available detailed tutorial and video course. Sublime is lovely. - -Because it’s written in Java, jEdit is available on several platforms. On its website you’ll find a detailed user guide and links to documentation of some plugins. However, there are no avenues for users to engage with other users or the developer. - -**Verdict:** - -- Gedit: 4/5 -- Kate: 4/5 -- Sublime: 5/5 -- UltraEdit: 3/5 -- jEdit: 2/5 - -### Add-on and plugins ### - -Different users have different requirements, and a single lightweight app can only do as much. This is where plugins come into the picture. The apps rely on these small pluggable widgets to extend their feature set and be of use to even more number of users. - -The one exception is UltraEdit. The app has no third-party plugins, but its developers do point out that third-party tools such as HtmlTidy are already installed with UltraEdit. - -Gedit ships with a number of plugins installed, and you can download more with the gedit-plugins package. The project’s website also points to several third-party plugins based on their compatibility with the Gedit versions. - -Three useful plugins for programmers are Code Comment, Terminal Plugin, which adds a terminal in the bottom panel, and the Session Saver. The Session Saver is really useful when you’re working on a project with multiple files. You can open all the files in tabs, save your session and when you restore it with a single click it’ll open all the files in the same tab order as you saved them. - -Similarly, you can extend Kate by adding plugins using its built-in plugin manager. In addition to the impressive projects plugins, some others that will be of use to developers include an embedded terminal, ability to compile and debug code and execute SQL queries on databases. - -Plugins for Sublime are written in Python, and the text editor includes a tool called Package Control, which is a little bit like apt-get in that it enables the user to find, install, upgrade and remove plugin packages. With plugins, you can bring the Git version control to Sublime, as well as the JSLint tool to improve JavaScript. The Sublime Linter plugin is a must have for coders and will point out any errors in your code. - -jEdit boasts the most impressive plugin infrastructure. The app has over 200 plugins, which can be browsed in the dedicated site of their own. The website lists plugins under various categories such as File Management, Version Control, Text, etc. You’ll find lots of plugins housed under each category. - -Some of the best plugins are the Android plugin, which provides utilities to work on Android projects; the TomcatSwitch plugin, using which you can create and control an external Jakarta Tomcat server process; and the Vimulator plugin, for Vi-like capabilities. You can install these plugins using jEdit’s using its plugin manager. - -**Verdict** - -- Gedit: 3/5 -- Kate: 4/5 -- Sublime: 4/5 -- UltraEdit: 1/5 -- jEdit: 5/5 - -### Plain ol’ text editing ### - -Despite all their powerful extra-curricular activities that might even displace full-blown apps across several genres, there will be times when you just need to use these text editing behemoths to read, write, or edit plain and simple text. While you can use all of them to enter text, we are evaluating them for access to common text-editing conveniences. - -Gedit which is Gnome’s default text editor, supports an undo and redo mechanism as well as search and replace. It can spellcheck documents in multiple languages and can also access and edit remote files using Gnome GVFS libraries. - -You can spellcheck documents with Kate as well, which also lets you perform a Google search on any highlighted text. It’s also got a line modification system which visually alerts users of lines which have modified and unsaved changes in a file. In addition, it enables users to set bookmarks within a file to ease navigation of lengthy documents. - -Sublime has a wide selection of editing commands, such as indenting text and formatting paragraphs. Its auto-save feature helps prevent users from losing their work. Advanced users will appreciate the regex-based recursive find and replace feature, as well as the ability to select multiple non-contiguous spans of text and act on them collectively. - -UltraEdit also enables the use of regular expressions for its search and replace feature and can edit remote files via FTP. One unique feature of jEdit is its support for an unlimited number of clipboard which it calls registers. You can copy snippets of text to these registers which are available across editing sessions. - -**Verdict:** - -- Gedit: 4/5 -- Kate: 5/5 -- Sublime: 5/5 -- UltraEdit: 4/5 -- jEdit: 4/5 - -### Our verdict ### - -All the editors in this feature are good enough to replace your existing text editor for editing text files and tweaking configuration files. In fact, chances are they’ll even double up as your IDE. These apps are chock full of bells and whistles, and their developers aren’t thinking of stripping features, but adding more and more and more. - -At the tail end of this test we have jEdit. Not only does it insist on using the proprietary Oracle Java Runtime Environment, it failed to install on our Fedora machine, and the developer doesn’t actively engage with its users. - -UltraEdit does little better. This commercial proprietary tool focuses on web developers, and doesn’t offer anything to non-developer power users that makes it worth recommending over free software alternatives. - -On the third podium position we have Gedit. There’s nothing inherently wrong with Gnome’s default editor, but despite all its positive aspects, it’s simply outclassed by Sublime and Kate. Out of the box, Kate is a more versatile editor than Gedit, and outscores Gnome’s default editor even after taking their respective plugin systems into consideration. - -Both Sublime and Kate are equally good. They performed equally well in most of our tests. Whatever ground it lost to Sublime for not supporting macros, it gained for its keyboard friendliness and its ease of use in defining custom keybindings. - -Kate’s success can be drawn from the fact that it offers the maximum number of features with minimal learning curve. Just fire it up and use it as a simple text editor, or easily edit configuration file with syntax highlighting, or even use it to collaborate and work on a complex programming project thanks to its project management capabilities. - -We aren’t pitching Kate to replace a full-blown integrated development environment such as [insert your favourite specialised tool here]. But it’s an ideal all-rounder and a perfect stepping stone to a specialised tool. - -Kate is designed for moments when you need something that’s quick to respond, doesn’t overwhelm you with its interface and is just as useful as something that might otherwise be overkill. - -### 1st Kate ### - -- Licence LGPL/GPL Version 3.11 -- www.kate-editor.org -- The ultimate mild-mannered text editor with super powers. -- Kate is one of the best apps to come out of the KDE project. - -### 2nd Sublime Text ### - -- Licence Proprietary Version 2.0.2 -- www.sublimetext.com -- A professionally done text editor that’s worth every penny – easy to use, full of features and it looks great. - -### 3rd Gedit ### - -- Licence GPL Version 3.10 -- http://projects.gnome.org/gedit -- Gets it done from Gnome. It’s a wonderful text editor and does an admirable job, but the competition here is too great. - -### 4th UltraEdit ### - -- Licence Proprietary Version 4.1.0.4 -- www.ultraedit.com -- Focuses on bundling conveniences for web developers without offering anything special for general users. - -### 5th jEdit ### - -- Licence GPL Version 5.1.0 -- www.jedit.org -- A lack of support, lack of working on Fedora and a lack of looking nice relegate jEdit to the bottom slot. - -### You may also wish to try… ### - -The default text editor that ships with your distro will also be able to assist you with some advanced tasks. There’s KDE’s KWrite and Raspbian’s Nano, for instance. KWrite inherits some of Kate’s features thanks to KDE’s katepart component, and Nano has sprung back into limelight thanks to its availability for Raspberry Pi. - -If you wish to follow the steps of Linux gurus, you could always try the revered text editors Emacs and Vim. First time users who want to get a taste for the power of Vim might want to consider gVim, which exposes Vim’s power via a graphical interface. - -Besides jEdit and Kate, there are other editors that mimic the usability of veteran advanced editors like Emacs and Vim, such as the JED editor and Joe’s Own Editor, both of which have an emulation mode for Emacs. On the other hand, if you are looking for lightweight code editors check out Bluefish and Geany. They exist to fill the niche between text editors and full-fledged integrated development platforms. - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/text-editors/ - -作者:[Ben Everard][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/ben_everard/ diff --git a/translated/share/20140804 Group Test--Linux Text Editors.md b/translated/share/20140804 Group Test--Linux Text Editors.md index 2809fbe129..fa9b275588 100644 --- a/translated/share/20140804 Group Test--Linux Text Editors.md +++ b/translated/share/20140804 Group Test--Linux Text Editors.md @@ -232,19 +232,17 @@ jEdit拥有最令人映像深刻的插件设施。该应用有超过200个插件 ### 纯文本编辑 ### +尽管它们强大的额外功能甚至可能会取代几个流派完全成熟的应用程序,有时候可能只需要使用这些庞大的文本编辑器读写或者编辑简单的纯文本。虽然你可以使用它们中的任何一个输入文本,我们通过普通文本编辑的方便性平均它们。 +Gnome的默认文本编辑器Gedit,支持取消和重做机制以及搜索和替换。它可以对多种语言进行拼写检查,并能通过使用Gnome GVFS库访问和编辑远程文件。 -Despite all their powerful extra-curricular activities that might even displace full-blown apps across several genres, there will be times when you just need to use these text editing behemoths to read, write, or edit plain and simple text. While you can use all of them to enter text, we are evaluating them for access to common text-editing conveniences. +你也可以使用Kate进行拼写检查,它也可以让你对任何高亮文本进行Google搜索。它还有一个能可视化告知用户文件中更改过但没有保存的行的行修改系统。另外,它通过允许用户在文件中使用书签简化长文档的导航。 -Gedit which is Gnome’s default text editor, supports an undo and redo mechanism as well as search and replace. It can spellcheck documents in multiple languages and can also access and edit remote files using Gnome GVFS libraries. +Sublime有很多可选择的编辑命令,例如缩进文本和格式化段落。它的自动保存功能帮助防止用户丢失他们的更改。高级用户还会喜欢基于正则表达式的递归查找和替换功能,以及选择多个不连续的文本块并执行统一操作。 -You can spellcheck documents with Kate as well, which also lets you perform a Google search on any highlighted text. It’s also got a line modification system which visually alerts users of lines which have modified and unsaved changes in a file. In addition, it enables users to set bookmarks within a file to ease navigation of lengthy documents. +UltraEdit也允许用户在查找和替换功能中使用正则表示,并能通过FTP编辑远程文件。JEdit一个独特的功能是它支持被称为寄存器的不限数目的剪切板。你可以复制文本片段到这些寄存器中,在编辑会话过程中都可用。 -Sublime has a wide selection of editing commands, such as indenting text and formatting paragraphs. Its auto-save feature helps prevent users from losing their work. Advanced users will appreciate the regex-based recursive find and replace feature, as well as the ability to select multiple non-contiguous spans of text and act on them collectively. - -UltraEdit also enables the use of regular expressions for its search and replace feature and can edit remote files via FTP. One unique feature of jEdit is its support for an unlimited number of clipboard which it calls registers. You can copy snippets of text to these registers which are available across editing sessions. - -**Verdict:** +**评定:** - Gedit: 4/5 - Kate: 5/5 @@ -252,69 +250,69 @@ UltraEdit also enables the use of regular expressions for its search and replace - UltraEdit: 4/5 - jEdit: 4/5 -### Our verdict ### +### 我们的评比 ### -All the editors in this feature are good enough to replace your existing text editor for editing text files and tweaking configuration files. In fact, chances are they’ll even double up as your IDE. These apps are chock full of bells and whistles, and their developers aren’t thinking of stripping features, but adding more and more and more. +在这里的所有编辑器都足以替换你已有的文本编辑器去用来编辑文本和调整配置文件。事实上,没准它们会组合起来作为你的集成开发环境。这些应用程序都有各种各样功能,它们的开发者不会考虑剥离功能,而是增加越来越多的功能。 -At the tail end of this test we have jEdit. Not only does it insist on using the proprietary Oracle Java Runtime Environment, it failed to install on our Fedora machine, and the developer doesn’t actively engage with its users. +jEdit排在这次测试的最后面。因为它不仅坚持使用专有的Oracle Java运行环境,不能在你的Fedora机器上安装,而且开发者不积极的和用户交互。 -UltraEdit does little better. This commercial proprietary tool focuses on web developers, and doesn’t offer anything to non-developer power users that makes it worth recommending over free software alternatives. +UltraEdit做的稍微好一点。这个商业专用工具专注于网络开发者,不为非开发者高级用户提供任何功能,使得它不值得推荐为免费软件的替代品。 -On the third podium position we have Gedit. There’s nothing inherently wrong with Gnome’s default editor, but despite all its positive aspects, it’s simply outclassed by Sublime and Kate. Out of the box, Kate is a more versatile editor than Gedit, and outscores Gnome’s default editor even after taking their respective plugin systems into consideration. +排在第三的是Gedit。作为Gnome的默认编辑器,它没有任何内在的错误,但尽管有很多积极的方面,它还是略微被Sublime和Kate超越。开诚布公地说,Kate是比Gedit更通用的编辑器,甚至考虑到他们的插件系统,评分也优于Gnome的默认编辑器。 -Both Sublime and Kate are equally good. They performed equally well in most of our tests. Whatever ground it lost to Sublime for not supporting macros, it gained for its keyboard friendliness and its ease of use in defining custom keybindings. +Sublime和Kate都相当好。他们在我们的大多数测试中表现同样出色。由于不支持宏而落后于Sublime,但键盘友好和能简单定义自定义键绑定又使Kate找回优势。 -Kate’s success can be drawn from the fact that it offers the maximum number of features with minimal learning curve. Just fire it up and use it as a simple text editor, or easily edit configuration file with syntax highlighting, or even use it to collaborate and work on a complex programming project thanks to its project management capabilities. +Kate成功的原因可以归结为它通过最小化学习曲线提供了最大化数目的功能。尽量使用它吧,不仅作为简单文本编辑器使用,或者容易使用语法高亮编辑配置文件,甚至得益于项目管理能力能使用它协作一个复杂的编程项目。 -We aren’t pitching Kate to replace a full-blown integrated development environment such as [insert your favourite specialised tool here]. But it’s an ideal all-rounder and a perfect stepping stone to a specialised tool. +我们不是选择Kate去替换一个类似[在这里插入你最喜欢的专业工具]的全面的集成开发环境。但是它是一个专业工具理想的全面的以及完美的垫脚石。 -Kate is designed for moments when you need something that’s quick to respond, doesn’t overwhelm you with its interface and is just as useful as something that might otherwise be overkill. +Kate为能快速响应你的需要而设计,它的界面并不会使你茫然,并且和那些过于复杂的应用一样的有用。 ### 1st Kate ### - Licence LGPL/GPL Version 3.11 - www.kate-editor.org -- The ultimate mild-mannered text editor with super powers. -- Kate is one of the best apps to come out of the KDE project. +- 拥有超能力,最终温和的文本编辑器。 +- Kate是KDE项目中最有用的应用程序之一。 ### 2nd Sublime Text ### - Licence Proprietary Version 2.0.2 - www.sublimetext.com -- A professionally done text editor that’s worth every penny – easy to use, full of features and it looks great. +- 值得你每分钱的专业文本编辑器 - 简单易用,功能全面而且看起来很棒。 ### 3rd Gedit ### - Licence GPL Version 3.10 - http://projects.gnome.org/gedit -- Gets it done from Gnome. It’s a wonderful text editor and does an admirable job, but the competition here is too great. +- 从Gnome中完成。这是一个奇妙的文本编辑器,确实令人钦佩的工作,但这里的竞争实在太大了。 ### 4th UltraEdit ### - Licence Proprietary Version 4.1.0.4 - www.ultraedit.com -- Focuses on bundling conveniences for web developers without offering anything special for general users. +- 关注于为网络开发者绑定便利,而不为普通用户提供任何特殊功能。 ### 5th jEdit ### - Licence GPL Version 5.1.0 - www.jedit.org -- A lack of support, lack of working on Fedora and a lack of looking nice relegate jEdit to the bottom slot. +- 缺乏支持,不支持Fedora,缺乏好看的界面,jEdit被贬低到最后。 -### You may also wish to try… ### +### 你也许希望尝试… ### -The default text editor that ships with your distro will also be able to assist you with some advanced tasks. There’s KDE’s KWrite and Raspbian’s Nano, for instance. KWrite inherits some of Kate’s features thanks to KDE’s katepart component, and Nano has sprung back into limelight thanks to its availability for Raspberry Pi. +随你发行版发布的默认文本编辑器也能帮助你一些高级任务。例如KDE的KWrite和Raspbian的Nano。得益于KDE的katepart组件,KWrite继承了一些Kate的功能,得益于在树莓派上的可用性,Nano也开始重现风头。 -If you wish to follow the steps of Linux gurus, you could always try the revered text editors Emacs and Vim. First time users who want to get a taste for the power of Vim might want to consider gVim, which exposes Vim’s power via a graphical interface. +如果你希望跟随Linux大师的脚本,你总是可以尝试崇高的文本编辑机Emacs和Vim。想尝试Vim强大的用户首先可以考虑gVim,它通过图形界面展现了Vim的强大。 -Besides jEdit and Kate, there are other editors that mimic the usability of veteran advanced editors like Emacs and Vim, such as the JED editor and Joe’s Own Editor, both of which have an emulation mode for Emacs. On the other hand, if you are looking for lightweight code editors check out Bluefish and Geany. They exist to fill the niche between text editors and full-fledged integrated development platforms. +除了jEdit和Kate,这里还有其他模仿例如Emacs和Vim之类的老派高级编辑器的编辑器,比如JED 编辑器和Joe's Own Editor,这两者都有Emacs的模拟模式。另一方面,如果你在寻找轻量级的代码编辑器,可以看看Bluefish和Geany。他们的存在是为了填补文本编辑器和全面集成的开发平台之间的空隙。 -------------------------------------------------------------------------------- via: http://www.linuxvoice.com/text-editors/ 作者:[Ben Everard][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](https://github.com/ictlyh) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From eaae2abbe84d7ac7a3f9239cda1a370e9150215d Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 18 Apr 2015 22:43:50 +0800 Subject: [PATCH 0574/2517] [Translated]20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md --- ...pt or Decrypt Random Passwords in Linux.md | 106 ------------------ ...pt or Decrypt Random Passwords in Linux.md | 103 +++++++++++++++++ 2 files changed, 103 insertions(+), 106 deletions(-) delete mode 100644 sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md create mode 100644 translated/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md diff --git a/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md b/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md deleted file mode 100644 index 057fa9cc9d..0000000000 --- a/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md +++ /dev/null @@ -1,106 +0,0 @@ -FSSlc translating - -How to Generate/Encrypt/Decrypt Random Passwords in Linux -================================================================================ -We have taken initiative to produce Linux tips and tricks series. If you’ve missed the last article of this series, you may like to visit the link below. - -注:此篇文章做过原文 -- [5 Interesting Command Line Tips and Tricks in Linux][1] - -In this article, we will share some interesting Linux tips and tricks to generate random passwords and also how to encrypt and decrypt passwords with or without slat method. - -Security is one of the major concern of digital age. We put on password to computers, email, cloud, phone, documents and what not. We all know the basic to choose the password that is easy to remember and hard to guess. What about some sort of machine based password generation automatically? Believe me Linux is very good at this. - -**1. Generate a random unique password of length equal to 10 characters using command ‘pwgen‘. If you have not installed pwgen yet, use Apt or YUM to get.** - - $ pwgen 10 1 - -![Generate Random Unique Password](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Unique-Password-in-Linux.gif) -Generate Random Unique Password - -Generate several random unique passwords of character length 50 in one go! - - $ pwgen 50 - -![Generate Multiple Random Passwords](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Multiple-Random-Passwords.gif) -Generate Multiple Random Passwords - -**2. You may use ‘makepasswd‘ to generate random, unique password of given length as per choice. Before you can fire makepasswd command, make sure you have installed it. If not! Try installing the package ‘makepasswd’ using Apt or YUM.** - -Generate a random password of character length 10. Default Value is 10. - - $ makepasswd - -![makepasswd Generate Unique Password](http://www.tecmint.com/wp-content/uploads/2015/03/mkpasswd-generate-unique-password.gif) -makepasswd Generate Unique Password - -Generate a random password of character length 50. - - $ makepasswd --char 50 - -![Generate Length 50 Password](http://www.tecmint.com/wp-content/uploads/2015/03/Random-Password-Generate.gif) -Generate Length 50 Password - -Generate 7 random password of 20 characters. - - $ makepasswd --char 20 --count 7 - -![](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-20-Character-Password.gif) - -**3. Encrypt a password using crypt along with salt. Provide salt manually as well as automatically.** - -For those who may not be aware of salt, - -Salt is a random data which servers as an additional input to one way function in order to protect password against dictionary attack. - -Make sure you have installed mkpasswd installed before proceeding. - -The below command will encrypt the password with salt. The salt value is taken randomly and automatically. Hence every time you run the below command it will generate different output because it is accepting random value for salt every-time. - - $ mkpasswd tecmint - -![Encrypt Password Using Crypt](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-in-Linux.gif) -Encrypt Password Using Crypt - -Now lets define the salt. It will output the same result every-time. Note you can input anything of your choice as salt. - - $ mkpasswd tecmint -s tt - -![Encrypt Password Using Salt](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-Using-Salt.gif) -Encrypt Password Using Salt - -Moreover, mkpasswd is interactive and if you don’t provide password along with the command, it will ask password interactively. - -**4. Encrypt a string say “Tecmint-is-a-Linux-Community” using aes-256-cbc encryption using password say “tecmint” and salt.** - - # echo Tecmint-is-a-Linux-Community | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint - -![Encrypt A String in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-A-String-in-Linux.gif) -Encrypt A String in Linux - -Here in the above example the output of 注:此篇原文也做过[echo command][2] is pipelined with openssl command that pass the input to be encrypted using Encoding with Cipher (enc) that uses aes-256-cbc encryption algorithm and finally with salt it is encrypted using password (tecmint). - -**5. Decrypt the above string using openssl command using the -aes-256-cbc decryption.** - - # echo U2FsdGVkX18Zgoc+dfAdpIK58JbcEYFdJBPMINU91DKPeVVrU2k9oXWsgpvpdO/Z | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint - -![Decrypt String in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Decrypt-String-in-Linux.gif) -Decrypt String in Linux - -That’s all for now. If you know any such tips and tricks you may send us your tips at admin@tecmint.com, your tip will be published under your name and also we will include it in our future article. - -Keep connected. Keep Connecting. Stay Tuned. Don’t forget to provide us with your valuable feedback in the comments below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/generate-encrypt-decrypt-random-passwords-in-linux/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/5-linux-command-line-tricks/ -[2]:http://www.tecmint.com/echo-command-in-linux/ diff --git a/translated/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md b/translated/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md new file mode 100644 index 0000000000..dcb675d782 --- /dev/null +++ b/translated/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md @@ -0,0 +1,103 @@ +如何在 Linux 中产生、加密或解密随机密码 +================================================================================ +我们一直积极地提供有关 Linux 技巧的系列文章,如果你错过了这个系列的最新文章,你或许可以去访问下面的链接。 + +注:此篇文章做过原文 +- [Linux 中 5 个有趣的命令行技巧][1] (注:这篇文章还没有被翻译,在 20150316 选的题) + +在这篇文章中,我们将分享一些有趣 Linux 技巧,内容是有关如何产生随机密码以及加密或解密这些经过加盐或没有加盐处理的密码。 + +安全是数字时代中的一个主要话题。在电脑,email,云端,手机,文档和其他的场合中,我们都会使用到密码。众所周知,选择密码的基本原则是 “易记,难猜”。考虑过使用基于机器自动生成的密码吗?相信我,Linux 非常擅长这方面的工作。 + +**1. 使用命令 `pwgen` 来生成一个长度为 10 个字符的唯一的随机密码。假如你还没有安装 pwgen,请使用 Apt 或 YUM 等包管理器来安装它。** + + $ pwgen 10 1 + +![生成一个唯一的随机密码](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Unique-Password-in-Linux.gif) +生成一个唯一的随机密码 + +一口气生成若干组长度为 50 个字符的唯一的随机密码! + + $ pwgen 50 + +![生成多组随机密码](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Multiple-Random-Passwords.gif) +生成多组随机密码 + +**2. 你还可以使用 `makepasswd` 来每次生成一个给定长度的唯一的随机密码。在你把玩 makepasswd 命令之前,请确保你已经安装了它。如若没有安装它,试试使用 Apt 或 YUM 包管理器来安装 `makepasswd`这个软件包。** + +生成一个长度为 10 个字符的随机密码。该命令产生的密码的长度默认为 10。 + + $ makepasswd + +![使用 makepasswd 生成唯一的密码](http://www.tecmint.com/wp-content/uploads/2015/03/mkpasswd-generate-unique-password.gif) +使用 makepasswd 生成唯一的密码 + +生成一个长度为 50 个字符的随机密码。 + + $ makepasswd --char 50 + +![生成长度为 50 的密码](http://www.tecmint.com/wp-content/uploads/2015/03/Random-Password-Generate.gif) +生成长度为 50 的密码 + +生成 7 个长度为 20 个字符的随机密码。 + + $ makepasswd --char 20 --count 7 + +![](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-20-Character-Password.gif) + +**3. 使用带“盐”的 Crypt(注:这里应该指的是一个函数,可以参考[这里](http://man7.org/linux/man-pages/man3/crypt.3.html) ) 来加密一个密码。提供手动或自动添加 “盐”。** + +对于那些不清楚 **盐** 的意义的人, + +这里的 “盐” 指的是一个随机数据,它作为密码生成函数的一个额外的输入, 目的是保护密码免受词典攻击。 + +在执行下面的操作前,请确保你已经安装了 `mkpasswd`。 + +下面的命令将带 “盐” 加密一个密码。“盐” 的值是随机自动生成的。所以每次你运行下面的命令时,都将产生不同的输出,因为它每次接受了随机取值的 “盐”。 + + $ mkpasswd tecmint + +![使用 Crypt 来加密密码](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-in-Linux.gif) +使用 Crypt 来加密密码 + +现在让我们来手动定义 “盐” 的值。每次它将产生相同的结果。请注意你可以输入任何你想输入的值来作为 “盐” 的值。 + + $ mkpasswd tecmint -s tt + +![带“盐”加密密码](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-Using-Salt.gif) +带“盐”加密密码 + +另外, mkpasswd 还是交互式的,假如你在命令中没有提供密码,它将主动询问你来输入密码。 + +**4. 使用 aes-256-cbc 加密算法并使用密码(如 “tecmint”) 并带“盐” 加密一个字符串(如 “Tecmint-is-a-Linux-Community”)。** + + # echo Tecmint-is-a-Linux-Community | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint + +![在 Linux 中加密一个字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-A-String-in-Linux.gif) +在 Linux 中加密一个字符串 + +在上面例子中, [echo 命令][2](注:此篇原文也做过,这里是链接 http://linux.cn/article-3948-1.html) 的输出通过管道传递给了 openssl 命令,使得该输出被 Cipher(enc) 所加密,这个过程中使用了 aes-256-cbc 加密算法,并附带了密码 (tecmint) 和 “盐” 。 + +**5. 使用 openssl 命令的 -aes-256-cbc 解密选项来解密上面的字符串。** + + # echo U2FsdGVkX18Zgoc+dfAdpIK58JbcEYFdJBPMINU91DKPeVVrU2k9oXWsgpvpdO/Z | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint + +![在 Linux 中解密字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Decrypt-String-in-Linux.gif) +在 Linux 中解密字符串 + +现在就是这些内容了。假如你知道任何这类的技巧,请将你的技巧发送到 admin@tecmint.com 邮箱中,你的技巧将会以你的名义来发表,同时我们也将在我们将来的文章中把它包含进去。 + +保持联系,保持连接,敬请关注。不要忘了在下面的评论中提供给我们您有价值的反馈。 +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/generate-encrypt-decrypt-random-passwords-in-linux/ + +作者:[Avishek Kumar][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/5-linux-command-line-tricks/ +[2]:http://www.tecmint.com/echo-command-in-linux/ \ No newline at end of file From 92fbfd9b4d47989bd4df9c8ac0474eaa6200e04e Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 18 Apr 2015 22:58:43 +0800 Subject: [PATCH 0575/2517] PUB:20150410 10 Famous IT Skills in Demand That Will Get You Hired @wi-cuckoo --- ...T Skills in Demand That Will Get You Hired.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) rename {translated/talk => published}/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md (93%) diff --git a/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md b/published/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md similarity index 93% rename from translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md rename to published/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md index 286572f959..df972fb96b 100644 --- a/translated/talk/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md +++ b/published/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md @@ -6,41 +6,41 @@ ### 1. VMware ### -VMware公司设计的虚拟化和云计算软件高居榜首。VMware首次宣布商业支持x86架构的虚拟化。VMware的需求在上个季度已经增长至16%。 +VMware公司设计的虚拟化和云计算软件高居榜首。VMware首次宣布商业支持x86架构的虚拟化。VMware的招聘需求在上个季度已经增长至16%。 最新稳定发行版: 11.0 ### 2. MySQL ### -这款开源的关系型数据库管理系统憾居第二。直到2013年,MySQL都还是第二大使用广泛的RDBMS(注:Relational Database Management System)。上季度MySQL的需求已经达到了11%。继甲骨文公司之后,著名的MarialDB也已经被分出MySQL了,值得去拥有。 +这款开源的关系型数据库管理系统憾居第二。直到2013年,MySQL都还是第二大使用广泛的RDBMS(注:Relational Database Management System)。上季度MySQL的招聘需求已经达到了11%。非常著名的MarialDB就是来自被甲骨文公司收购之后的MySQL的分支。值得掌握。 最新稳定发行版: 5.6.23 ### 3. Apache ### -这个跨平台的开源网页(HTTP)服务器位居第三。截至上个季度,Apache的需求已经超过了13%。 +这个跨平台的开源网页(HTTP)服务器位居第三。截至上个季度,Apache的招聘需求已经超过了13%。 最新稳定发行版: 2.4.12 ### 4. AWS ### -亚马逊网页服务器是亚马逊网站提供的所有远程计算服务的集合,AWS排在第四位。上个季度,AWS的需求已经呈现出将近14%的增长。 +AWS是亚马逊网站提供的所有远程计算服务的集合,AWS排在第四位。上个季度,AWS的招聘需求已经呈现出将近14%的增长。 ### 5. Puppet ### -Puppet作为配置管理系统被应用在设置IT基础架构,它排在第五位。它用Ruby语言编写,属于客户端-服务器型的结构。上个季度puppet的需求已经增长超过9%。 +Puppet作为配置管理系统被应用在设置IT基础架构,它排在第五位。它用Ruby语言编写,属于客户端-服务器型的结构。上个季度puppet的招聘需求已经增长超过9%。 最新稳定发行版: 3.7.3 ### 6. Hadoop ### -Hadoop是用Java编写的一款开源软件框架,用于处理大数据。列表中Hadoop位列第六。对Hadoop的需求在上个季度已经下降了0.2个百分点。 +Hadoop是用Java编写的一款开源软件框架,用于处理大数据。列表中Hadoop位列第六。对Hadoop的招聘需求在上个季度已经下降了0.2个百分点。 最新稳定发行版: 2.6.0 ### 7. Git ### -Linux Torvalds最初编写的著名版本控制系统Git排在了第七。Git的需求在上个季度已经超过了7%。 +Linux Torvalds最初编写的著名版本控制系统Git排在了第七。Git的招聘需求在上个季度已经超过了7%。 最新稳定发行版: 2.3.4 @@ -58,6 +58,8 @@ Oracle公司开发的SQL扩展版,占据第八的位置。PL/SQL从Oracle 7后 这款最著名的企业资源规划软件排在了第十。上个季度SAP在需求市场表现出将近3.5%的增长。 +具体数据表格如下: + From 65090f8735dc606d8338346a06c977092b2a0488 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 18 Apr 2015 23:35:01 +0800 Subject: [PATCH 0576/2517] PUB:20150409 How to Run GUI Apps in a Docker Container @geekpi --- ... How to Run GUI Apps in a Docker Container.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename translated/tech/150409 How to Run GUI Apps in a Docker Container.md => published/20150409 How to Run GUI Apps in a Docker Container.md (73%) diff --git a/translated/tech/150409 How to Run GUI Apps in a Docker Container.md b/published/20150409 How to Run GUI Apps in a Docker Container.md similarity index 73% rename from translated/tech/150409 How to Run GUI Apps in a Docker Container.md rename to published/20150409 How to Run GUI Apps in a Docker Container.md index abca032354..4f2e439799 100644 --- a/translated/tech/150409 How to Run GUI Apps in a Docker Container.md +++ b/published/20150409 How to Run GUI Apps in a Docker Container.md @@ -1,12 +1,12 @@ 如何在Docker容器中运行GUI程序 ================================================================================ -各位,今天我们将学习如何在[Docker][1]之中运行GUI程序。我们可以轻易地在Docker容器中运行大多数GUI程序且不出错。Docker是一个开源项目,提供了一个打包、分发和运行任意程序的轻量级容器的开放平台。它没有语言支持、框架或者打包系统的限制并可以在任何地方、任何时候,从小型的家用电脑到高端的服务器都可以运行。这让人们可以打包不同的包用于部署和扩展网络应用,数据库和后端服务而不必依赖于特定的栈或者提供商。 +各位,今天我们将学习如何在[Docker][1]之中运行GUI程序。我们可以轻易地在Docker容器中运行大多数GUI程序且不出错。Docker是一个开源项目,提供了一个打包、分发和运行任意程序的轻量级容器的开放平台。它没有语言支持、框架或者打包系统的限制,并可以运行在任何地方、任何时候,从小型的家用电脑到高端的服务器都可以运行。这让人们可以打包不同的包用于部署和扩展网络应用,数据库和后端服务而不必依赖于特定的栈或者提供商。 下面是我们该如何在Docker容器中运行GUI程序的简单步骤。本教程中,我们会用Firefox作为例子。 ### 1. 安装 Docker ### -在开始事前,我们首先得确保在Linux主机中已经安装了Docker。这里,我运行的是CentOS 7 主机,我们将运行yum管理器和下面的命令来安装Docker。 +在开始前,我们首先得确保在Linux主机中已经安装了Docker。这里,我运行的是CentOS 7 主机,我们将运行yum管理器和下面的命令来安装Docker。 # yum install docker @@ -16,7 +16,7 @@ ### 2. 创建 Dockerfile ### -现在,Docker守护进程已经在运行中了,我们现在准备创建自己的Firefox Docker容器。我们要创建一个Dockerfile,这里我们要输入需要的配置来创建一个可以工作的Firefox容器。我们取下CentOS中最新的Docker镜像。至此,我们需要用文本编辑器创建一个名为Dockerfile的文件。 +现在,Docker守护进程已经在运行中了,我们现在准备创建自己的Firefox Docker容器。我们要创建一个Dockerfile,在其中我们要输入需要的配置来创建一个可以工作的Firefox容器。为了运行 Docker 镜像我们需要使用最新版本的CentOS。要创建 Docker 镜像,我们需要用文本编辑器创建一个名为Dockerfile的文件。 # nano Dockerfile @@ -25,12 +25,12 @@ #!/bin/bash FROM centos:7 RUN yum install -y firefox - # Replace 0 with your user / group id + # 用你自己的 uid /gid 替换下面的0 RUN export uid=0 gid=0 RUN mkdir -p /home/developer RUN echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd RUN echo "developer:x:${uid}:" >> /etc/group - RUN echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers + RUN echo "developer ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers RUN chmod 0440 /etc/sudoers RUN chown ${uid}:${gid} -R /home/developer @@ -56,13 +56,13 @@ ### 4. 运行Docker容器 ### -现在,如果一切顺利,我们现在可以在运行着CentOS 7镜像的Docker容器中运行我们的GUI程序也就是Firefox浏览器了。 +现在,如果一切顺利,我们现在可以在运行在CentOS 7镜像中的Docker容器里面运行我们的GUI程序也就是Firefox浏览器了。 # docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix firefox ### 总结 ### -在Dcoker容器中运行GUI程序是一次很棒的体验,它对你的主机文件系统没有任何的伤害。它完全依赖你的Docker容器。本教程中,我尝试了CentOS 7 Docker中的Firefox。我们可以用这个技术尝试更多的GUI程序。如果你有任何问题、建议、反馈请在下面的评论栏中写下来,这样我们可以提升或更新我们的内容。谢谢! +在Docker容器中运行GUI程序是一次很棒的体验,它对你的主机文件系统没有任何的伤害。它完全依赖你的Docker容器。本教程中,我尝试了CentOS 7 Docker中的Firefox。我们可以用这个技术尝试更多的GUI程序。如果你有任何问题、建议、反馈请在下面的评论栏中写下来,这样我们可以提升或更新我们的内容。谢谢! -------------------------------------------------------------------------------- @@ -70,7 +70,7 @@ via: http://linoxide.com/linux-how-to/run-gui-apps-docker-container/ 作者:[Arun Pyasi][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6b5a960cc8c302dba0e4c39600fd6cb5b08a51ad Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 19 Apr 2015 15:53:11 +0800 Subject: [PATCH 0577/2517] translated --- .../20150417 sshuttle--A transparent proxy-based VPN using ssh.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources/tech => translated}/20150417 sshuttle--A transparent proxy-based VPN using ssh.md (100%) diff --git a/sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md similarity index 100% rename from sources/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md rename to translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md From cbd84c831edb7edceee5477170c7cf241cb32286 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 19 Apr 2015 15:54:10 +0800 Subject: [PATCH 0578/2517] Delete 20150417 sshuttle--A transparent proxy-based VPN using ssh.md --- ...A transparent proxy-based VPN using ssh.md | 93 ------------------- 1 file changed, 93 deletions(-) delete mode 100644 translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md diff --git a/translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md deleted file mode 100644 index 297f411840..0000000000 --- a/translated/20150417 sshuttle--A transparent proxy-based VPN using ssh.md +++ /dev/null @@ -1,93 +0,0 @@ -sshuttle - 一个使用ssh的基于VPN的透明代理 -================================================================================ -sshuttle允许你通过ssh创建一条从你电脑连接到任何远程服务器的VPN连接,只要你的服务器支持python2.3 或则更高的版本, 你必须有本机的root权限,但是你可以在服务端有普通账户即可。 - -你可以在一台机器上同时运行多次sshuttle来连接到不同的服务器上,这样你就可以一次使用多个VPN, sshuttle可以转发你子网所有流量到VPN中。 - - -### 在Ubuntu中安装sshuttle ### - -在终端中输入下面的命令 - - sudo apt-get install sshuttle - -### 使用 sshuttle ### - -#### sshuttle 语法 #### - - sshuttle [options...] [-r [username@]sshserver[:port]] [subnets] - -#### Option 细节 #### - --r, —remote=[username@]sshserver[:port] - -远程主机名和可选的用户名,用于连接远程服务器的ssh端口号。比如example.com、testuser@example.com、testuser@example.com:2222或者example.com:2244。 - -#### sshuttle 例子 #### - -在机器中使用下面的命令: - - sudo sshuttle -r username@sshserver 0.0.0.0/0 -vv - -当开始后,sshuttle会创建一个ssh会话到通过-r指定的服务器。如果-r被忽略了,它会在本地运行客户端和服务端,这个有时会在测试时有用。 - -连接到远程服务器后,sshuttle会上传它的(python)源码到远程服务器并执行。那么,你就不需要在远程服务器上安装sshuttle,并且客户端和服务器端间不会存在sshuttle版本冲突。 - -#### 手册中的更多例子 #### - -代理所有的本地连接用于本地测试,没有使用ssh: - - $ sudo sshuttle -v 0/0 - - Starting sshuttle proxy. - Listening on (‘0.0.0.0′, 12300). - [local sudo] Password: - firewall manager ready. - c : connecting to server... - s: available routes: - s: 192.168.42.0/24 - c : connected. - firewall manager: starting transproxy. - c : Accept: ‘192.168.42.106':50035 -> ‘192.168.42.121':139. - c : Accept: ‘192.168.42.121':47523 -> ‘77.141.99.22':443. - ...etc... - ^C - firewall manager: undoing changes. - KeyboardInterrupt - c : Keyboard interrupt: exiting. - c : SW#8:192.168.42.121:47523: deleting - c : SW#6:192.168.42.106:50035: deleting - -测试到远程服务器上的连接,自动猜测主机名和子网: - - $ sudo sshuttle -vNHr example.org - - Starting sshuttle proxy. - Listening on (‘0.0.0.0′, 12300). - firewall manager ready. - c : connecting to server... - s: available routes: - s: 77.141.99.0/24 - c : connected. - c : seed_hosts: [] - firewall manager: starting transproxy. - hostwatch: Found: testbox1: 1.2.3.4 - hostwatch: Found: mytest2: 5.6.7.8 - hostwatch: Found: domaincontroller: 99.1.2.3 - c : Accept: ‘192.168.42.121':60554 -> ‘77.141.99.22':22. - ^C - firewall manager: undoing changes. - c : Keyboard interrupt: exiting. - c : SW#6:192.168.42.121:60554: deleting - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/sshuttle-a-transparent-proxy-based-vpn-using-ssh.html - -作者:[ruchi][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ubuntugeek.com/author/ubuntufix From d0979fcbaaaf37435015b028a4e58e6637398ac9 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sun, 19 Apr 2015 20:20:31 +0800 Subject: [PATCH 0579/2517] translated wi-cuckoo llap --- ...out evil twin access points in the area.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 translated/share/20150410 This tool can alert you about evil twin access points in the area.md diff --git a/translated/share/20150410 This tool can alert you about evil twin access points in the area.md b/translated/share/20150410 This tool can alert you about evil twin access points in the area.md new file mode 100644 index 0000000000..963460501d --- /dev/null +++ b/translated/share/20150410 This tool can alert you about evil twin access points in the area.md @@ -0,0 +1,40 @@ +这个工具可以提醒你一个区域内的假面猎手接入点 (注:evil twin暂无相关翻译) +=============================================================================== +**开发人员称,EvilAP_Defender甚至可以攻击流氓Wi-Fi接入点** + +一个新的开源工具可以定期扫描一个区域,以防流氓Wi-Fi接入点,同时如果发现情况会提醒网络管理员。 + +这个工具叫做EvilAP_Defender,是为监测攻击者配置的恶意接入点而专门设计的,这些接入点冒用合法的名字诱导用户连接上。 + +这类接入点被称做假面猎手,使得黑客们从接入的设备上监听互联网信息流。这可以被用来窃取证书,破坏网站等等。 + +大多数用户设置他们的计算机和设备可以自动连接一些无线网络,比如家里的或者工作地方的网络。尽管如此,当面对两个同名的无线网络时,即SSID相同,有时候甚至时MAC地址也相同,这时候大多数设备会自动连接信号较强的一个。 + +这使得假面猎手的攻击容易实现,因为SSID和BSSID都可以伪造。 + +[EvilAP_Defender][1]是一个叫Mohamed Idris的人用Python语言编写,公布在GitHub上面。它可以使用一个计算机的无线网卡来发现流氓接入点,这些接入点复制了一个真实接入点的SSID,BSSID,甚至是其他的参数如通道,密码,隐私协议和认证信息。 + +该工具首先以学习模式运行,为了发现合法的接入点[AP],并且加入白名单。然后切换到正常模式,开始扫描未认证的接入点。 + +如果一个恶意[AP]被发现了,该工具会用电子邮件提醒网络管理员,但是开发者也打算在未来加入短信提醒功能。 + +该工具还有一个保护模式,在这种模式下,应用会发起一个denial-of-service [DoS]攻击反抗恶意接入点,为管理员采取防卫措施赢得一些时间。 + +“DoS不仅针对有着相同SSID的恶意AP,也针对BSSID(AP的MAC地址)不同或者不同信道的,”Idris在这款工具的文档中说道。“这是避免攻击你的合法网络。” + +尽管如此,用户应该切记在许多国家,攻击别人的接入点,甚至一个可能一个攻击者操控的恶意的接入点,很多时候都是非法的。 + +为了能够运行这款工具,需要Aircrack-ng无线网套装,一个支持Aircrack-ng的无线网卡,MySQL和Python运行环境。 + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2905725/security0/this-tool-can-alert-you-about-evil-twin-access-points-in-the-area.html + +作者:[Lucian Constantin][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Lucian-Constantin/ +[1] https://github.com/moha99sa/EvilAP_Defender/blob/master/README.TXT From f542381b00ccc3aa9a2f5e534896141800919037 Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Sun, 19 Apr 2015 22:32:25 +0800 Subject: [PATCH 0580/2517] Delete 20150410 This tool can alert you about evil twin access points in the area.md --- ...out evil twin access points in the area.md | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 sources/share/20150410 This tool can alert you about evil twin access points in the area.md diff --git a/sources/share/20150410 This tool can alert you about evil twin access points in the area.md b/sources/share/20150410 This tool can alert you about evil twin access points in the area.md deleted file mode 100644 index b698c5df3b..0000000000 --- a/sources/share/20150410 This tool can alert you about evil twin access points in the area.md +++ /dev/null @@ -1,41 +0,0 @@ -translating wi-cuckoo -This tool can alert you about evil twin access points in the area -================================================================================ -**EvilAP_Defender can even attack rogue Wi-Fi access points for you, the developer says** - -A new open-source tool can periodically scan an area for rogue Wi-Fi access points and can alert network administrators if any are found. - -The tool, called EvilAP_Defender, was designed specifically to detect malicious access points that are configured by attackers to mimic legitimate ones in order to trick users to connect to them. - -These access points are known as evil twins and allow hackers to intercept Internet traffic from devices connected to them. This can be used to steal credentials, spoof websites, and more. - -Most users configure their computers and devices to automatically connect to some wireless networks, like those in their homes or at their workplace. However, when faced with two wireless networks that have the same name, or SSID, and sometimes even the same MAC address, or BSSID, most devices will automatically connect to the one that has the stronger signal. - -This makes evil twin attacks easy to pull off because both SSIDs and BSSIDs can be spoofed. - -[EvilAP_Defender][1] was written in Python by a developer named Mohamed Idris and was published on GitHub. It can use a computer's wireless network card to discover rogue access points that duplicate a real access point's SSID, BSSID, and even additional parameters like channel, cipher, privacy protocol, and authentication. - -The tool will first run in learning mode, so that the legitimate access point [AP] can be discovered and whitelisted. It can then be switched to normal mode to start scanning for unauthorized access points. - -If an evil AP is discovered, the tool can alert the network administrator by email, but the developer also plans to add SMS-based alerts in the future. - -There is also a preventive mode in which the tool can launch a denial-of-service [DoS] attack against the evil AP to buy the administrator some time to take defensive measures. - -"The DoS will only be performed for evil APs which have the same SSID but a different BSSID (AP's MAC address) or run on a different channel," Idris said in the tool's documentation. "This is to avoid attacking your legitimate network." - -However, users should remember that attacking someone else's access point, even a likely malicious one operated by an attacker, is most likely illegal in many countries. - -In order to run, the tool needs the Aircrack-ng wireless suite, a wireless card supported by Aircrack-ng, MySQL and the Python runtime. - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2905725/security0/this-tool-can-alert-you-about-evil-twin-access-points-in-the-area.html - -作者:[Lucian Constantin][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Lucian-Constantin/ -[1] https://github.com/moha99sa/EvilAP_Defender/blob/master/README.TXT From 0f5c8e38ef175628d70cd79be1e42db27dea731d Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 13:42:27 +0800 Subject: [PATCH 0581/2517] PUB:20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17 @martin2011qi --- ...esktop on Ubuntu 14.10 or Linux Mint 17.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) rename {translated/tech => published}/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md (60%) diff --git a/translated/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md b/published/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md similarity index 60% rename from translated/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md rename to published/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md index ae7968afd0..a881b2fcc6 100644 --- a/translated/tech/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md +++ b/published/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md @@ -1,10 +1,10 @@ -在Ubuntu14.10/Mint7上安装Gnome Flashback classical桌面 +在Ubuntu14.10/Mint7上安装Gnome Flashback 经典桌面 ================================================================================ 如果你不喜欢现在的Unity桌面,[Gnome Flashback][1]桌面环境是一个简单的并且很棒的选择,让你能找回曾经经典的桌面。 Gnome Flashback基于GTK3并提供与原先gnome桌面视觉上相似的界面。 -gnome flashback的另一个改变是采用了源自mint和xface的MATE桌面,但无论mint还是xface都是基于gtk2的。 + Gnome Flashback的另一个改变是采用了源自mint和xface的MATE桌面,但无论mint还是xface都是基于GTK2的。 ### 安装 Gnome Flashback ### @@ -12,7 +12,7 @@ gnome flashback的另一个改变是采用了源自mint和xface的MATE桌面, $ sudo apt-get install gnome-session-flashback -然后注销到达登录界面,单击密码输入框右上角的徽标型按钮,即可选择桌面环境。可供选择的有Gnome Flashback (Metacity) 会话模式和Gnome Flashback (Compiz)会话模式。 +然后注销返回到登录界面,单击密码输入框右上角的徽标型按钮,即可选择桌面环境。可供选择的有Gnome Flashback (Metacity) 会话模式和Gnome Flashback (Compiz)会话模式。 Metacity更轻更快,而Compiz则能带给你更棒的桌面效果。下面是我使用gnome flashback桌面的截图。 @@ -24,17 +24,17 @@ Metacity更轻更快,而Compiz则能带给你更棒的桌面效果。下面是 ### 1. 安装 Gnome Tweak Tool ### -Gnome Tweak Tool能够帮助你定制比如字体、主题等,那些在Unity桌面的控制中心十分困难或是不可能完成的任务。 +Gnome Tweak Tool能够帮助你定制比如字体、主题等,这些在Unity桌面的控制中心是十分困难,几乎不可能完成的任务。 $ sudo apt-get install gnome-tweak-tool -启动按步骤 应用程序 > 系统工具 > 首选项 > Tweak Tool +启动按步骤: 应用程序 > 系统工具 > 首选项 > Tweak Tool ### 2. 在面板上添加小应用 ### -默认的右键点击面板是没有效果的。你可以尝试在右键点击面板的同时按住键盘上的Alt+Super (win)键,这样定制面板的相关选项将会出现。 +默认的右键点击面板是没有效果的。你可以尝试在右键点击面板的同时按住键盘上的Alt+Super (win)键,这样就会出现定制面板的相关选项。 -你可以修改或删除面板并在上面添加些小应用。在这个例子中我们移除了底部面板,并用Plank dock来代替它的位置。 +你可以修改或删除面板,并在上面添加些小应用。在这个例子中我们移除了底部面板,并用Plank dock来代替它的位置。 在顶部面板的中间添加一个显示时间的小应用。通过配置使它显示时间和天气。 @@ -42,7 +42,7 @@ Gnome Tweak Tool能够帮助你定制比如字体、主题等,那些在Unity ### 3. 将窗口标题栏的按钮右置 ### -在ubuntu中,最小化、最大化和关闭按钮默认实在标题栏的左侧的。需要稍作手脚才能让他们乖乖回到右边去。 +在ubuntu中,最小化、最大化和关闭按钮默认是在标题栏左侧的。需要稍作手脚才能让他们乖乖回到右边去。 想让窗口的按钮到右边可以使用下面的命令,这是我在askubuntu上找到的。 @@ -50,7 +50,7 @@ Gnome Tweak Tool能够帮助你定制比如字体、主题等,那些在Unity ### 4.安装 Plank dock ### -plank dock位于屏幕底部用于启动应用和切换打开的窗口。会在必要的时间隐藏自己,并在需要的时候出现。elementary OS使用的dock就是plank dock。 +plank dock位于屏幕底部,用于启动应用和切换打开的窗口。它会在必要的时间隐藏自己,并在需要的时候出现。elementary OS使用的dock就是plank dock。 运行以下命令安装: @@ -58,11 +58,11 @@ plank dock位于屏幕底部用于启动应用和切换打开的窗口。会在 $ sudo apt-get update $ sudo apt-get install plank -y -现在启动 应用程序 > 附件 > Plank。若想让它开机自动启动,找到 应用程序 > 系统工具 > 首选项 > 启动应用程序 并将“plank”的命令加到列表中。 +现在启动:应用程序 > 附件 > Plank。若想让它开机自动启动,找到 应用程序 > 系统工具 > 首选项 > 启动应用程序 并将“plank”的命令加到列表中。 ### 5. 安装 Conky 系统监视器 ### -Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰桌面。它不太占资源并且运行的大部分时间都不惹麻烦。 +Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰桌面。它不太占资源,并且绝大部分情况下运行都不会有什么问题。 运行如下命令安装: @@ -70,7 +70,7 @@ Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰 $ sudo apt-get update $ sudo apt-get install conky-manager -现在启动 应用程序 > 附件 > Conky Manager 选择你想在桌面上显示的部件。Conky Manager同样可以配置到启动项中。 +现在启动:应用程序 > 附件 > Conky Manager ,选择你想在桌面上显示的部件。Conky Manager同样可以配置到启动项中。 ### 6. 安装CCSM ### @@ -80,10 +80,10 @@ Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰 $ sudo apt-get install compizconfig-settings-manager -启动按步骤 应用程序 > 系统工具 > 首选项 > CompizConfig Settings Manager. +启动按步骤: 应用程序 > 系统工具 > 首选项 > CompizConfig Settings Manager. ->在虚拟机中经常会发生compiz会话中装饰窗口消失。可以通过启动Compiz设置,在打开"Copy to texture",注销后重新登录即可。 +> 在虚拟机中经常会发生compiz会话中装饰窗口消失。可以通过启动Compiz设置,并启用"Copy to texture"插件,注销后重新登录即可。 不过值得一提的是Compiz 会话会比Metacity慢。 @@ -92,8 +92,8 @@ Conky非常酷,它用系统的中如CPU和内存使用率的统计值来装饰 via: http://www.binarytides.com/install-gnome-flashback-ubuntu/ 作者:[Silver Moon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4bc14078465148573606d4e9a5fcc167125027fd Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 15:02:20 +0800 Subject: [PATCH 0582/2517] PUB:20150205 25 Linux Shell Scripting interview Questions & Answers @Vic020 --- ...Scripting interview Questions & Answers.md | 89 ++++++++++--------- 1 file changed, 46 insertions(+), 43 deletions(-) rename {translated/tech => published}/20150205 25 Linux Shell Scripting interview Questions & Answers.md (66%) diff --git a/translated/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md b/published/20150205 25 Linux Shell Scripting interview Questions & Answers.md similarity index 66% rename from translated/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md rename to published/20150205 25 Linux Shell Scripting interview Questions & Answers.md index 9a131bee9d..f320335396 100644 --- a/translated/tech/20150205 25 Linux Shell Scripting interview Questions & Answers.md +++ b/published/20150205 25 Linux Shell Scripting interview Questions & Answers.md @@ -1,39 +1,42 @@ -Linux Shell脚本 入门25问 +Linux Shell脚本面试25问 ================================================================================ -### Q:1 Shell脚本是什么、为什么它是必需的吗? ### +### Q:1 Shell脚本是什么、它是必需的吗? ### -答:一个Shell脚本是一个文本文件,包含一个或多个命令。作为系统管理员,我们经常需要发出多个命令来完成一项任务,我们可以添加这些所有命令在一个文本文件(Shell脚本)来完成日常工作任务。 +答:一个Shell脚本是一个文本文件,包含一个或多个命令。作为系统管理员,我们经常需要使用多个命令来完成一项任务,我们可以添加这些所有命令在一个文本文件(Shell脚本)来完成这些日常工作任务。 ### Q:2 什么是默认登录shell,如何改变指定用户的登录shell ### -答:在Linux操作系统,“/ bin / bash”是默认登录shell,在用户创建时被分配的。使用chsh命令可以改变默认的shell。示例如下所示: +答:在Linux操作系统,“/bin/bash”是默认登录shell,是在创建用户时分配的。使用chsh命令可以改变默认的shell。示例如下所示: - # chsh -s + # chsh <用户名> -s <新shell> # chsh linuxtechi -s /bin/sh -### Q:3 有什么不同的类型在shell脚本中使用? ### +### Q:3 可以在shell脚本中使用哪些类型的变量? ### -答:在shell脚本,我们可以使用两个类型变量: +答:在shell脚本,我们可以使用两种类型的变量: - 系统定义变量 - 用户定义变量 +系统变量是由系统系统自己创建的。这些变量通常由大写字母组成,可以通过“**set**”命令查看。 -系统变量是由系统系统自己创建的。这些变量由大写字母组成,可以通过“**set**”命令查看。 +用户变量由系统用户来生成和定义,变量的值可以通过命令“`echo $<变量名>`”查看。 -用户变量由系统用户来生成,变量的值可以通过命令“`echo $<变量名>`”查看 - -### Q:4 如何同时重定向标准输出和错误输出到同一位置? ### +### Q:4 如何将标准输出和错误输出同时重定向到同一位置? ### 答:这里有两个方法来实现: -方法1:2>&1 (# ls /usr/share/doc > out.txt 2>&1 ) +方法一: -方法二:&> (# ls /usr/share/doc &> out.txt ) + 2>&1 (如# ls /usr/share/doc > out.txt 2>&1 ) -### Q:5 shell脚本中“if”的语法 ? ### +方法二: -答:基础语法: + &> (如# ls /usr/share/doc &> out.txt ) + +### Q:5 shell脚本中“if”语法如何嵌套? ### + +答:基础语法如下: if [ 条件 ] then @@ -72,9 +75,9 @@ Linux Shell脚本 入门25问 如果结束状态不是0,说明命令执行失败。 -### Q:7 在shell脚本中如何比较两个数 ? ### +### Q:7 在shell脚本中如何比较两个数字 ? ### -答:测试用例使用if-then来比较两个数,例子如下: +答:在if-then中使用测试命令( -gt 等)来比较两个数字,例子如下: #!/bin/bash x=10 @@ -89,11 +92,11 @@ Linux Shell脚本 入门25问 ### Q:8 shell脚本中break命令的作用 ? ### -答:break命令一个简单的用途是退出执行中的循环。我们可以在while 和until循环中使用break命令跳出循环。 +答:break命令一个简单的用途是退出执行中的循环。我们可以在while和until循环中使用break命令跳出循环。 ### Q:9 shell脚本中continue命令的作用 ? ### -答:continue命令不同于break命令,它只跳出当前循环的迭代,而不是整个循环。continue命令很多时候是很有用的,例如错误发生,但我们依然希望循环继续的时候。 +答:continue命令不同于break命令,它只跳出当前循环的迭代,而不是**整个**循环。continue命令很多时候是很有用的,例如错误发生,但我们依然希望继续执行大循环的时候。 ### Q:10 告诉我shell脚本中Case语句的语法 ? ### @@ -116,14 +119,14 @@ Linux Shell脚本 入门25问 ### Q:11 shell脚本中while循环语法 ? ### -答:如同for循环,while循环重复自己所有命令只要条件成立,不同于for循环。基础语法: +答:如同for循环,while循环只要条件成立就重复它的命令块。不同于for循环,while循环会不断迭代,直到它的条件不为真。基础语法: while [ 条件 ] do 命令… done -### Q:12 如何使脚本成为可执行状态 ? ### +### Q:12 如何使脚本可执行 ? ### 答:使用chmod命令来使脚本可执行。例子如下: @@ -131,11 +134,11 @@ Linux Shell脚本 入门25问 ### Q:13 “#!/bin/bash”的作用 ? ### -答:#!/bin/bash是shell脚本的第一行,总所周知,#符号调用hash而!调用bang。它的意思是命令使用 /bin/bash来执行命令 +答:#!/bin/bash是shell脚本的第一行,称为释伴(shebang)行。这里#符号叫做hash,而! 叫做 bang。它的意思是命令通过 /bin/bash 来执行。 ### Q:14 shell脚本中for循环语法 ? ### -答:for循环基础语法: +答:for循环的基础语法: for 变量 in 循环列表 do @@ -147,13 +150,13 @@ Linux Shell脚本 入门25问 ### Q:15 如何调试shell脚本 ? ### -答:使用'-x'参数(sh -x myscript.sh)可以调试shell脚本。另一个种方法是使用‘-nv’参数( sh -nv myscript.sh) +答:使用'-x'参数(sh -x myscript.sh)可以调试shell脚本。另一个种方法是使用‘-nv’参数( sh -nv myscript.sh)。 ### Q:16 shell脚本如何比较字符串? ### -答:test命令可以用来比较字符串。Test命令比较字符串通过比较每一个字符来比较。 +答:test命令可以用来比较字符串。测试命令会通过比较字符串中的每一个字符来比较。 -### Q:17 Bourne shell(bash) 中有哪些特别变量 ? ### +### Q:17 Bourne shell(bash) 中有哪些特殊的变量 ? ### 答:下面的表列出了Bourne shell为命令行设置的特殊变量。 @@ -175,7 +178,7 @@ Linux Shell脚本 入门25问

$0

@@ -252,7 +255,7 @@ Linux Shell脚本 入门25问

-d 文件名

@@ -260,7 +263,7 @@ Linux Shell脚本 入门25问

-e 文件名

@@ -268,7 +271,7 @@ Linux Shell脚本 入门25问

-f 文件名

@@ -276,7 +279,7 @@ Linux Shell脚本 入门25问

-r 文件名

@@ -284,7 +287,7 @@ Linux Shell脚本 入门25问

-s 文件名

@@ -292,7 +295,7 @@ Linux Shell脚本 入门25问

-w 文件名

@@ -300,7 +303,7 @@ Linux Shell脚本 入门25问

-x 文件名

@@ -308,15 +311,15 @@ Linux Shell脚本 入门25问 ### Q:19 在shell脚本中,如何写入注释 ? ### -答:注释可以用来描述一个脚本可以做什么和它是如何工作的。每一个注释以#开头。例子如下: +答:注释可以用来描述一个脚本可以做什么和它是如何工作的。每一行注释以#开头。例子如下: #!/bin/bash # This is a command echo “I am logged in as $USER” -### Q:20 如何得到来自终端的命令输入到shell脚本? ### +### Q:20 如何让 shell 就脚本得到来自终端的输入? ### -答:read命令可以读取来自终端(使用键盘)的数据。read命令接入用户的输入并置于变量中。例子如下: +答:read命令可以读取来自终端(使用键盘)的数据。read命令得到用户的输入并置于你给出的变量中。例子如下: # vi /tmp/test.sh @@ -330,9 +333,9 @@ Linux Shell脚本 入门25问 LinuxTechi My Name is LinuxTechi -### Q:21 如何取消设置或取消变量 ? ### +### Q:21 如何取消变量或取消变量赋值 ? ### -答:“unset”命令用于去取消或取消设置一个变量。语法如下所示: +答:“unset”命令用于取消变量或取消变量赋值。语法如下所示: # unset <变量名> @@ -345,7 +348,7 @@ Linux Shell脚本 入门25问 ### Q:23 do-while语句的基本格式 ? ### -答:do-while语句类似于while语句,但检查条件语句之前先执行命令。下面是用do-while语句的语法 +答:do-while语句类似于while语句,但检查条件语句之前先执行命令(LCTT 译注:意即至少执行一次。)。下面是用do-while语句的语法 do { @@ -354,7 +357,7 @@ Linux Shell脚本 入门25问 ### Q:24 在shell脚本如何定义函数呢 ? ### -答:函数是拥有名字的代码块。当我们定义代码块,我们就可以在我们的脚本调用名字,该块就会被执行。示例如下所示: +答:函数是拥有名字的代码块。当我们定义代码块,我们就可以在我们的脚本调用函数名字,该块就会被执行。示例如下所示: $ diskusage () { df -h ; } @@ -371,7 +374,7 @@ Linux Shell脚本 入门25问 ### Q:25 如何在shell脚本中使用BC(bash计算器) ? ### -答:使用下列格式,在shell脚本中使用bc +答:使用下列格式,在shell脚本中使用bc: variable=`echo “options; expression” | bc` @@ -381,7 +384,7 @@ via: http://www.linuxtechi.com/linux-shell-scripting-interview-questions-answers 作者:[Pradeep Kumar][a] 译者:[VicYu/Vic020](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ce9c3803bce8351850699712167838b79140d218 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 20 Apr 2015 15:12:21 +0800 Subject: [PATCH 0583/2517] =?UTF-8?q?20150420-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...g Linux 'sort' Command Examples--Part 2.md | 131 ++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md diff --git a/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md new file mode 100644 index 0000000000..6bb7d8159f --- /dev/null +++ b/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md @@ -0,0 +1,131 @@ +7 Interesting Linux ‘sort’ Command Examples – Part 2 +================================================================================ +In our last article we have covered various examples on sort command, if you’ve missed, you can go through it using below link. In continuation to the last post this post aims at covering remaining of sort command so that both the article together serves as complete guide to Linux ‘sort‘ command. + +注:前两天做过这个原文 +- [14 ‘sort’ Command Examples in Linux][1] + +Before we continue further, create a text file ‘month.txt‘ and populate it with the data as given below. + + $ echo -e "mar\ndec\noct\nsep\nfeb\naug" > month.txt + $ cat month.txt + +![Populate Content](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content.gif) + +### 15. Sort the file ‘month.txt‘ on the basis of month order by using switch ‘M‘ (–month-sort). ### + + $ sort -M month.txt + +**Important**: Note that ‘sort‘ command needs at least 3 characters to consider month name. + +![Sort File Content by Month in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-by-Month.gif) + +### 16. Sort the data that is in human readable format say 1K, 2M, 3G, 2T, where K,M,G,T represents Kilo, Mega, Giga, Tera. ### + + $ ls -l /home/$USER | sort -h -k5 + +![Sort Content Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Human-Readable-Format.gif) + +### 17. In the last article we have created a file ‘sorted.txt‘ in example number 4 and another text file ‘lsl.txt‘ in example number 6. We know ‘sorted.txt‘ is already sorted while ‘lsl.txt‘ is not. Lets check both the files are sorted or not using sort command. ### + + $ sort -c sorted.txt + +![Check File is Sorted](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-is-Sorted.gif) + +If it returns 0, means that the file is sorted and there is no conflict. + + $ sort -c lsl.txt + +![Check File Sorted Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Sorted-Status.gif) + +Reports Disorder. Conflict.. + +### 18. If the delimiter (separator) between words are space, sort command automatically interpret anything after horizontal space as new word. What if the delimiter is not space? ### + +Consider a text file, the contents of which are separated by anything other than space such as ‘|’ or ‘\’ or ‘+’ or ‘.’ or…. + +Create a text file where contents are separated by +. Use ‘cat‘ to check the contents of file. + + $ echo -e "21+linux+server+production\n11+debian+RedHat+CentOS\n131+Apache+Mysql+PHP\n7+Shell Scripting+python+perl\n111+postfix+exim+sendmail" > delimiter.txt + +---------- + + $ cat delimiter.txt + +![Check File Content by Delimiter](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Content.gif) + +Now sort this file on the basis of 1st field which is numerical. + + $ sort -t '+' -nk1 delimiter.txt + +![Sort File By Fields](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-File-By-Fields.gif) + +And second on the basis of 4th field which is non numeric. + +![Sort Content By Non Numeric](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Non-Numeric.gif) + +If the delimiter is Tab you may use $’\t’ in place of ‘+’, as shown in the above example. + +### 19. Sort the contents of ‘ls -l‘ command for your home directory on the basis of 5th column which represents the ‘amount of data‘ in Random order. ### + + $ ls -l /home/avi/ | sort -k5 -R + +![Sort Content by Column in Random Order](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-by-Column1.gif) + +Every time you run the above piece of script you are likely to get a different result since the result is generated randomly. + +As clear from the Rule number – 2 from the last article, sort command prefer line starting with lowercase characters over uppercase characters. Also check example 3 in last article, where string ‘laptop‘ appears before string ‘LAPTOP‘. + +### 20. How to override the default sorting preference? before we are able to override the default sorting preference we need to export the environment variable LC_ALL to c. To do this run the below code on your Command Line Prompt. ### + + $ export LC_ALL=C + +And then sort the text file ‘tecmint.txt‘ overriding the default sort preference. + + $ sort tecmint.txt + +![Override Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Override-Sorting-Preferences.gif) +Override Sorting Preferences + +Don’t forget to compare the output with the one you achieved in example 3 and also you can use option ‘-f‘ aka ‘–ignore-case‘ to get much organized output. + + $ sort -f tecmint.txt + +![Compare Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Compare-Sorting-Preferences.gif) + +### 21. How about running ‘sort‘ on two input files and join them in one go! ### + +Lets create two text file namely ‘file1.txt‘ and ‘file2.txt‘ and populate it with some data. Here we are populating ‘file1.txt‘ with numbers as below. Also used ‘cat‘ command to check the content of file. + + $ echo -e “5 Reliable\n2 Fast\n3 Secure\n1 open-source\n4 customizable” > file1.txt + $ cat file1.txt + +![Populate Content with Numbers](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content-with-Number.gif) + +And populate second file ‘file2.txt‘ with some data as. + + $ echo -e “3 RedHat\n1 Debian\n5 Ubuntu\n2 Kali\n4 Fedora” > file2.txt + $ cat file2.txt + +![Populate File with Data](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-File-with-Data.gif) + +Now sort and join the output of both the files. + + $ join <(sort -n file1.txt) <(sort file2.txt) + +![Sort Join Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Join-Two-Files.gif) + +That’s all for now. Keep Connected. Keep to Tecmint. Please Provide us with your valuable feedback in the comments below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-sort-command-examples/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/sort-command-linux/ \ No newline at end of file From 39601482c6bbcc8902e5e59dc197763e1896f02c Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 15:41:18 +0800 Subject: [PATCH 0584/2517] PUB:20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi @geekpi --- ...ers--How to install a USB webcam in Raspberry Pi.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md (91%) diff --git a/translated/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/published/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md similarity index 91% rename from translated/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md rename to published/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md index 805a0aaca4..80974a1761 100644 --- a/translated/tech/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md +++ b/published/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md @@ -1,12 +1,12 @@ -Linux有问必答 -- 如何在树莓派上安装USB网络摄像头 +Linux有问必答:如何在树莓派上安装USB网络摄像头 ================================================================================ > **Question**: 我可以在树莓派上使用标准的USB网络摄像头么?我该如何检查USB网络摄像头与树莓派是否兼容?另外我该如何在树莓派上安装它? -如果你想在树莓上拍照或者录影,你可以安装[树莓派的摄像头板][1]。如果你不想要为摄像头模块花费额外的金钱,那有另外一个方法,就是你常见的[USB 摄像头][2]。你可能已经在PC上安装了。 +如果你想在树莓上拍照或者录影,你可以安装[树莓派的摄像头板][1]。如果你不想要为摄像头模块花费额外的金钱,那有另外一个方法,就是你常见的[USB 摄像头][2]。你可能已经在PC上安装过了。 本教程中,我会展示如何在树莓派上设置摄像头。我们假设你使用的系统是Raspbian。 -在此之前,你最好检查一下你的摄像头是否在[这些][3]已知与树莓派兼容的摄像头之中。如果你的摄像头不在这个兼容列表中,不要丧气,仍然有可能你的摄像头被树莓派检测到。 +在此之前,你最好检查一下你的摄像头是否在[这些][3]已知与树莓派兼容的摄像头之中。如果你的摄像头不在这个兼容列表中,不要丧气,仍然有可能树莓派能检测到你的摄像头。 ### 检查USB摄像头是否雨树莓派兼容 ### @@ -34,7 +34,7 @@ fswebcam安装完成后,在终端中运行下面的命令来抓去一张来自 $ fswebcam --no-banner -r 640x480 image.jpg -这条命令可以抓取一张640x480分辨率的照片,并且用jpg格式保存。它不会在照片的地步留下任何标志. +这条命令可以抓取一张640x480分辨率的照片,并且用jpg格式保存。它不会在照片的底部留下任何水印. ![](https://farm8.staticflickr.com/7417/16576645965_302046d230_o.png) @@ -52,7 +52,7 @@ via: http://ask.xmodulo.com/install-usb-webcam-raspberry-pi.html 作者:[Kristophorus Hadiono][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From bf1444f3f542a66c692a43e2231d1b9e21f3d1af Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 16:06:53 +0800 Subject: [PATCH 0585/2517] PUB:20150119 How to Remember and Restore Running Applications on Next Logon @FSSlc --- ...tore Running Applications on Next Logon.md | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) rename {translated/tech => published}/20150119 How to Remember and Restore Running Applications on Next Logon.md (57%) diff --git a/translated/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md b/published/20150119 How to Remember and Restore Running Applications on Next Logon.md similarity index 57% rename from translated/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md rename to published/20150119 How to Remember and Restore Running Applications on Next Logon.md index e6cc710ae2..b6569bdca4 100644 --- a/translated/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md +++ b/published/20150119 How to Remember and Restore Running Applications on Next Logon.md @@ -1,12 +1,14 @@ -如何记住并在下一次登录时还原正在运行的应用 +如何在 Ubuntu 中再次登录时还原上次运行的应用 ================================================================================ -在你的 Ubuntu 里,你正运行着某些应用,但并不想停掉它们的进程,只想管理一下窗口,并打开那些工作需要的应用。接着,某些其他的事需要你转移注意力或你的机器电量低使得你必须马上关闭电脑。(幸运的是,)你可以让 Ubuntu 记住所有你正运行的应用并在你下一次登录时还原它们。 +在你的 Ubuntu 里,如果你需要处理一些工作,你并不需要关闭正运行着的那些应用,只需要管理一下窗口,并打开那些工作需要的应用就行。然而,如果你需要离开处理些别的事情或你的机器电量低使得你必须马上关闭电脑,这些程序可能就需要关闭终止了。不过幸运的是,你可以让 Ubuntu 记住所有你正运行的应用并在你下一次登录时还原它们。 -现在,为了让我们的 Ubuntu 记住当前会话中正运行的应用并在我们下一次登录时还原它们,我们将会使用到 `dconf-editor`。这个工具代替了前一个 Ubuntu 版本里安装的 `gconf-editor`,但默认情况下并没有在现在这个 Ubuntu 版本(注:这里指的是 Ubuntu 14.04 LTS) 里安装。为了安装 `dconf-editor`, 你需要运行 `sudo apt-get install dconf-editor`命令: +###自动保存会话 + +现在,为了让我们的 Ubuntu 记住当前会话中正运行的应用并在我们下一次登录时还原它们,我们将会使用到 `dconf-editor`。这个工具代替了前一个 Ubuntu 版本里安装的 `gconf-editor`,但默认情况下现在这个 Ubuntu 版本(注:这里指的是 Ubuntu 14.04 LTS) 并没有安装。为了安装 `dconf-editor`, 你需要运行 `sudo apt-get install dconf-editor`命令: $ sudo apt-get install dconf-tools -一旦 `dconf-editor` 安装完毕,你就可以从应用菜单(注:这里指的是 Unity Dash)里打开它或者你可以通过直接在终端里或使用 `alt+f2` 运行下面的命令来启动它: +一旦 `dconf-editor` 安装完毕,你就可以从应用菜单(注:这里指的是 Unity Dash)里打开它,或者你可以通过直接在终端里运行,或使用 `alt+f2` 运行下面的命令来启动它: $ dconf-editor @@ -22,7 +24,7 @@ ![dconf-editor selecting auto save session](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_selecting_auto_save_session.png) -在你检查或对刚才的选项打钩之后,点击默认情况下位于窗口左上角的关闭按钮(X)来关闭 “Dconf Editor”。 +在你确认对刚才的选项打钩之后,点击默认情况下位于窗口左上角的关闭按钮(X)来关闭 “Dconf Editor”。 ![dconf-editor closing dconf editor](http://blog.linoxide.com/wp-content/uploads/2015/01/dconf-editor_closing_dconf_editor.png) @@ -30,6 +32,10 @@ 欢呼吧,我们已经成功地配置了我们的 Ubuntu 14.04 LTS "Trusty" 来自动记住我们上一次会话中正在运行的应用。 +除了关机后恢复应用之外,还可以通过休眠来达成类似的功能。 + +###休眠功能 + 现在,在这个教程里,我们也将学会 **如何在 Ubuntu 14.04 LTS 里开启休眠功能** : 在开始之前,在键盘上按 `Ctrl+Alt+T` 来开启终端。在它开启以后,运行: @@ -38,15 +44,15 @@ 在你的电脑关闭后,再重新开启它。这时,你开启的应用被重新打开了吗?如果休眠功能没有发挥作用,请检查你的交换分区大小,它至少要和你可用 RAM 大小相当。 -你可以在系统监视器里查看你的交换分区大小,而系统监视器可以通过在应用菜单或在终端里运行下面的命令来开启: +你可以在系统监视器里查看你的交换分区大小,系统监视器可以通过在应用菜单或在终端里运行下面的命令来开启: $ gnome-system-monitor -### 在系统托盘里启用休眠功能: ### +#### 在系统托盘里启用休眠功能: #### -提示模块是通过使用 logind 而不是使用 upower 来更新的。默认情况下,在 upower 和 logind 中,休眠都被禁用了。 +系统托盘里面的会话指示器现在使用 logind 而不是 upower 了。默认情况下,在 upower 和 logind 中,休眠菜单都被禁用了。 -为了开启休眠功能,依次运行下面的命令来编辑配置文件: +为了开启它的休眠菜单,依次运行下面的命令来编辑配置文件: sudo -i @@ -70,26 +76,27 @@ 重启你的电脑就可以了。 -### 当你盖上笔记本的后盖时,让它休眠: ### +#### 当你盖上笔记本的后盖时,让它休眠: #### -1.通过下面的命令编辑文件 “/etc/systemd/logind.conf” : +1. 通过下面的命令编辑文件 “/etc/systemd/logind.conf” : + + $ sudo nano /etc/systemd/logind.conf - $ sudo nano /etc/systemd/logind.conf - -2. 将 **#HandleLidSwitch=suspend** 这一行改为 **HandleLidSwitch=hibernate** 并保存文件; +2. 将 **#HandleLidSwitch=suspend** (挂起)这一行改为 **HandleLidSwitch=hibernate** (休眠)并保存文件; 3. 运行下面的命令或重启你的电脑来应用更改: - $ sudo restart systemd-logind + $ sudo restart systemd-logind + +就是这样。 成功了吗?现在我们设置了 dconf 并开启了休眠功能 :) 这样,无论你是关机还是直接合上笔记本盖子,你的 Ubuntu 将能够完全记住你开启的应用和窗口了。 -就是这样。享受吧!现在我们有了 dconf 并开启了休眠功能 :) 你的 Ubuntu 将能够完全记住你开启的应用和窗口了。 -------------------------------------------------------------------------------- via: http://linoxide.com/ubuntu-how-to/remember-running-applications-ubuntu/ 作者:[Arun Pyasi][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 20498be70d36dc7f3f1bdb7ddbafc541d3836b50 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 20 Apr 2015 16:54:20 +0800 Subject: [PATCH 0586/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...323 Papyrus--An Open Source Note Manager.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/translated/share/20150323 Papyrus--An Open Source Note Manager.md b/translated/share/20150323 Papyrus--An Open Source Note Manager.md index 87c80fa0ac..abcfe00aca 100644 --- a/translated/share/20150323 Papyrus--An Open Source Note Manager.md +++ b/translated/share/20150323 Papyrus--An Open Source Note Manager.md @@ -2,13 +2,11 @@ Papyrus:开源笔记管理工具 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_4.jpeg) -在上一篇帖子中,我们介绍了[任务管理软件Go For It!][1].今天我们将介绍一款名为**Papyrus的开源笔记软件** +在上一篇帖子中,我们介绍了[待办事项管理软件Go For It!][1]。今天我们将介绍一款名为**Papyrus的开源笔记软件** -[Papyrus][2] 是[Kaqaz笔记管理][3]的变体并使用了QT5.它不仅有简洁、易用的界面,还具备了较好的安全性。由于强调简洁,我觉得Papyrus与OneNote比较相像。你可以将你的笔记像"纸张"一样分类整理,还可以给他们添加标签进行分组。够简单的吧! +[Papyrus][2] 是[Kaqaz笔记管理][3]的一个分支并使用QT5开发。它不仅有简洁、易用的界面,还具备了较好的安全性。由于强调简洁,我觉得Papyrus与OneNote比较相像。你可以将你的笔记像"纸张"一样分类整理,还可以给他们添加标签进行分组。够简单的吧! -### Papyrus的功能: ### - -## Papyrus的功能: ### +## Papyrus 的特性: ### 虽然Papyrus强调简洁,它依然有很多丰富的功能。他的一些主要功能如下: - 按类别和标签管理笔记 @@ -21,9 +19,9 @@ Papyrus:开源笔记管理工具 - 与Dropbox加密同步 - 除Linux外,还可在Android,Windows和OS X使用 -### Install Papyrus ### +### 安装 Papyrus ### -Papyrus为Android用户提供了APK安装包。Windows和OS X也有安装文件。Linux用户还可以获取程序的源码。使用Ubuntu及其他基于Ubuntu的发行版可以使用.deb包进行安装。根据你的系统及习惯,你可以从Papyrus的下载页面中获取不同的文件: +Papyrus为Android用户提供了APK安装包。Windows和OS X也有安装文件。Linux用户还可以获取程序的源码。Ubuntu及其它基于Ubuntu的发行版可以使用.deb包进行安装。根据你的系统及习惯,你可以从Papyrus的下载页面中获取不同的文件: - [下载 Papyrus][4] @@ -40,9 +38,9 @@ Papyrus为Android用户提供了APK安装包。Windows和OS X也有安装文 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux-700x450_c.jpeg) -试试Papyrus吧,你会喜欢上它的。 +试试Papyrus吧,你会喜欢上它的。在下方评论区和我们分享你的使用经验吧。 -(译者注;此软件暂无中文版) +(译者注:此软件暂无中文版) -------------------------------------------------------------------------------- @@ -50,7 +48,7 @@ via: http://itsfoss.com/papyrus-open-source-note-manager/ 作者:[Abhishek][a] 译者:[KevinSJ](https://github.com/KevinSJ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 85c20d34ff60ce02fb80e85f03a7109f5fd2f44d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 20 Apr 2015 17:52:02 +0800 Subject: [PATCH 0587/2517] =?UTF-8?q?20150420-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n linux using chattr and lsattr command.md | 200 ++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md diff --git a/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md b/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md new file mode 100644 index 0000000000..4fe935a568 --- /dev/null +++ b/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md @@ -0,0 +1,200 @@ +Managing file & directory attributes in linux using chattr & lsattr command +================================================================================ +There are certain control attributes that may be set on a file or directory in order to allow data to be appended, to prevent it from being changed or deleted, etc. For example, you can enable attributes on a critical system file or directory so that no users, including root, can delete or change it, disallow a backup utility such as the dump command to back up a specific file or directory, and so on. These attributes can only be set on files and directories located in an ext2, ext3, or an ext4 file system + +There are two commands **lsattr** and **chattr** that are used for attribute management. The following is the list of commonly used attributes + +注:表格代码 +
-

来自命令行脚本的名字

+

命令行中的脚本名字

-

返回true,如果文件存在并且是一个目录

+

如果文件存在并且是目录,返回true

-

返回true,如果文件存在

+

如果文件存在,返回true

-

返回true,如果文件存在并且是普通文件

+

如果文件存在并且是普通文件,返回true

-

返回true,如果文件存在并拥有读权限

+

如果文件存在并可读,返回true

-

返回true,如果文件存在并且不为空

+

如果文件存在并且不为空,返回true

-

返回true,如果文件存在并拥有写权限

+

如果文件存在并可写,返回true

-

返回true,如果文件存在并拥有执行权限

+

如果文件存在并可执行,返回true

+++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Attributes

+
+

Description

+
+

a (append)

+
+

Append operation is allowed on the file

+
+

A

+
+

This attribute will not allow to update access time of a file

+
+

c (compressed)

+
+

When this attribute is enable then file is compressed on the disk automatically

+
+

d (dump)

+
+

File cannot be backed up using the dump command.

+
+

D

+
+

When D attribute is set on directory then changes are stored synchronously on the disk

+
+

e (extent format)

+
+

It shows that the file is using extents for mapping the blocks on disk

+
+

i (immutable)

+
+

When this attribute is enable on file then we cannot be altered, renamed and delete file.

+
+

j (journaling)

+
+

When this attribute is set then file’s data is stored in journal first then written to file.

+
+

S (synchronous)

+
+

When this attribute is set , then changes or modifications are stored synchronously on the disk

+
+ +Different Options that can be used in chattr Command : + +- **-R** change attributes of directory and its sub-directories recursively +- **-V** Verbose output of chattr command along with version. +- **-f** Suppress most error messages. + +**Operators** that are used in chattr command to set and unset attributes + +- The ‘+’ sign is used to set attribute on the files and directories, +- The ‘-‘ sign is used to remove or unset the attribute +- The ‘=’ sign causes them to be the only attributes that the files have. + +Basic Syntax of **chattr** and **lsattr** command : + + # chattr + + # lsattr + +### Example:1 Make a file immutable using ‘i’ attribute ### + + [root@linuxtechi ~]# chattr +i dummy_data + [root@linuxtechi ~]# lsattr dummy_data + ----i----------- dummy_data + +Now try to remove and edit the File + + [root@linuxtechi ~]# rm -f dummy_data + rm: cannot remove ‘dummy_data’: Operation not permitted + + [root@linuxtechi ~]# echo "test" >> dummy_data + -bash: dummy_data: Permission denied + +### Example:2 Remove the immutable attribute ### + + [root@linuxtechi ~]# chattr -i dummy_data + [root@linuxtechi ~]# lsattr dummy_data + ---------------- dummy_data + +### Example:3 To allow only append operations on the file ### + + [root@linuxtechi ~]# chattr +a dummy_data + [root@linuxtechi ~]# lsattr dummy_data + -----a---------- dummy_data + +Now try to append the contents of fstab file in dummy_data file + + [root@linuxtechi ~]# cat /etc/fstab >> dummy_data + [root@linuxtechi ~]# + +### Example :4 Secure Directory and its sub-directories using -R option and ‘+i’ attribute. ### + +Let’s create a directory sysadmin and its subdirectories + + [root@linuxtechi ~]# mkdir sysadmin + [root@linuxtechi ~]# mkdir sysadmin/admim_{1,2,3,4,5} + [root@linuxtechi ~]# ls -l sysadmin/ + total 0 + drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_1 + drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_2 + drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_3 + drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_4 + drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_5 + +Set immutable attribute Recursively on the directory sysadmin + + [root@linuxtechi ~]# chattr -R +i sysadmin + + [root@linuxtechi ~]# lsattr -R sysadmin/ + ----i----------- sysadmin/admim_1 + sysadmin/admim_1: + ----i----------- sysadmin/admim_2 + sysadmin/admim_2: + ----i----------- sysadmin/admim_3 + sysadmin/admim_3: + ----i----------- sysadmin/admim_4 + sysadmin/admim_4: + ----i----------- sysadmin/admim_5 + sysadmin/admim_5: + [root@linuxtechi ~]# + +Now try to delete directories using rm command + + [root@linuxtechi ~]# rm -rf sysadmin + rm: cannot remove ‘sysadmin/admim_1’: Permission denied + rm: cannot remove ‘sysadmin/admim_2’: Permission denied + rm: cannot remove ‘sysadmin/admim_3’: Permission denied + rm: cannot remove ‘sysadmin/admim_4’: Permission denied + rm: cannot remove ‘sysadmin/admim_5’: Permission denied + [root@linuxtechi ~]# + +To unset the the attributes recursively use the below command + + [root@linuxtechi ~]# chattr -R -i sysadmin + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/file-directory-attributes-in-linux-using-chattr-lsattr-command/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file From 8aac28377e38f951c4de3a62f5fe2baa3caee03a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 20 Apr 2015 20:57:35 +0800 Subject: [PATCH 0588/2517] [Translating] tech/Managing file and directory attributes in linux using chattr and lsattr command --- ...ectory attributes in linux using chattr and lsattr command.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md b/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md index 4fe935a568..fe56511647 100644 --- a/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md +++ b/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md @@ -1,3 +1,4 @@ +Translating by ictlyh Managing file & directory attributes in linux using chattr & lsattr command ================================================================================ There are certain control attributes that may be set on a file or directory in order to allow data to be appended, to prevent it from being changed or deleted, etc. For example, you can enable attributes on a critical system file or directory so that no users, including root, can delete or change it, disallow a backup utility such as the dump command to back up a specific file or directory, and so on. These attributes can only be set on files and directories located in an ext2, ext3, or an ext4 file system From 222a2e5f1e86f485319ebad5eb0ffe13e3e39e73 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 20 Apr 2015 21:31:02 +0800 Subject: [PATCH 0589/2517] [Translated] tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command --- ...n linux using chattr and lsattr command.md | 69 +++++++++---------- 1 file changed, 34 insertions(+), 35 deletions(-) rename {sources => translated}/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md (55%) diff --git a/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md b/translated/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md similarity index 55% rename from sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md rename to translated/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md index fe56511647..0aaef749c8 100644 --- a/sources/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md +++ b/translated/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md @@ -1,9 +1,8 @@ -Translating by ictlyh -Managing file & directory attributes in linux using chattr & lsattr command +在Linux中用chattr和lsattr命令管理文件和目录属性 ================================================================================ -There are certain control attributes that may be set on a file or directory in order to allow data to be appended, to prevent it from being changed or deleted, etc. For example, you can enable attributes on a critical system file or directory so that no users, including root, can delete or change it, disallow a backup utility such as the dump command to back up a specific file or directory, and so on. These attributes can only be set on files and directories located in an ext2, ext3, or an ext4 file system +为了允许添加数据,防止更改或者删除等,文件和文件夹中设定了一定的控制属性。例如,你可以在关键系统文件或者文件夹中启用属性,然后没有用户,包括root,可以删除或者修改它,不允许比如dump命令等备份工具去备份一个特定的文件或者文件夹,等等。这些属性只可以在ext2,ext3或者ext4文件系统中的文件和文件夹上设定。 -There are two commands **lsattr** and **chattr** that are used for attribute management. The following is the list of commonly used attributes +有两个命令 **lsattr** 和 **chattr** 用来管理属性。下面是常用属性的列表。 注:表格代码 @@ -13,10 +12,10 @@ There are two commands **lsattr** and **chattr** that are used for attribute man @@ -24,7 +23,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

a (append)

@@ -32,7 +31,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

A

@@ -40,7 +39,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

c (compressed)

@@ -48,7 +47,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

d (dump)

@@ -56,7 +55,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

D

@@ -64,7 +63,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

e (extent format)

@@ -72,7 +71,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

i (immutable)

@@ -80,7 +79,7 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

j (journaling)

@@ -88,37 +87,37 @@ There are two commands **lsattr** and **chattr** that are used for attribute man

S (synchronous)

-

Attributes

+

属性

-

Description

+

描述

-

Append operation is allowed on the file

+

允许在文件中进行追加操作

-

This attribute will not allow to update access time of a file

+

这个属性不允许更新文件的访问时间

-

When this attribute is enable then file is compressed on the disk automatically

+

启用这个属性时,文件在磁盘上会自动压缩

-

File cannot be backed up using the dump command.

+

不能使用dump命令备份文件

-

When D attribute is set on directory then changes are stored synchronously on the disk

+

设置了文件夹的D属性时,更改会在同步保存在磁盘上

-

It shows that the file is using extents for mapping the blocks on disk

+

它表明,该文件使用扩展到映射磁盘上的块

-

When this attribute is enable on file then we cannot be altered, renamed and delete file.

+

在文件上启用这个属性时,我们不能更改,重命名或者删除这个文件

-

When this attribute is set then file’s data is stored in journal first then written to file.

+

设置了这个属性时,文件的数据首先保存在日志中,然后再写入文件

-

When this attribute is set , then changes or modifications are stored synchronously on the disk

+

设置了这个属性时,变更或更改同步保存到磁盘上

-Different Options that can be used in chattr Command : +chattr属性中可以使用的不同选项 : -- **-R** change attributes of directory and its sub-directories recursively -- **-V** Verbose output of chattr command along with version. -- **-f** Suppress most error messages. +- **-R** 递归地修改文件夹和子文件夹的属性 +- **-V** chattr命令的输出伴随版本信息 +- **-f** 压缩大部分错误信息 -**Operators** that are used in chattr command to set and unset attributes +在chattr中用于设置或者取消属性的 **操作符** -- The ‘+’ sign is used to set attribute on the files and directories, -- The ‘-‘ sign is used to remove or unset the attribute -- The ‘=’ sign causes them to be the only attributes that the files have. +- ‘+’ 符号用来为文件和文件夹设置属性, +- ‘-‘ 符号用来移除或者取消属性 +- ‘=’ 使它们成为文件有的唯一属性。 -Basic Syntax of **chattr** and **lsattr** command : +**chattr** 和 **lsattr** 命令的基本语法 : # chattr # lsattr -### Example:1 Make a file immutable using ‘i’ attribute ### +### 例:1 使用‘i’属性使文件不可更改 ### [root@linuxtechi ~]# chattr +i dummy_data [root@linuxtechi ~]# lsattr dummy_data ----i----------- dummy_data -Now try to remove and edit the File +现在试着删除或者修改文件 [root@linuxtechi ~]# rm -f dummy_data rm: cannot remove ‘dummy_data’: Operation not permitted @@ -126,26 +125,26 @@ Now try to remove and edit the File [root@linuxtechi ~]# echo "test" >> dummy_data -bash: dummy_data: Permission denied -### Example:2 Remove the immutable attribute ### +### 例:2 移除不可更改属性 ### [root@linuxtechi ~]# chattr -i dummy_data [root@linuxtechi ~]# lsattr dummy_data ---------------- dummy_data -### Example:3 To allow only append operations on the file ### +### 例:3 在文件中只允许追加操作 ### [root@linuxtechi ~]# chattr +a dummy_data [root@linuxtechi ~]# lsattr dummy_data -----a---------- dummy_data -Now try to append the contents of fstab file in dummy_data file +现在试着把fstab文件的内容追加到dummy_data文件 [root@linuxtechi ~]# cat /etc/fstab >> dummy_data [root@linuxtechi ~]# -### Example :4 Secure Directory and its sub-directories using -R option and ‘+i’ attribute. ### +### 例 :4 使用 -R 选项和 ‘+i’ 属性使文件夹和它的子文件夹成为安全目录 ### -Let’s create a directory sysadmin and its subdirectories +让我们来新建一个sysadmin文件夹和它的子文件夹 [root@linuxtechi ~]# mkdir sysadmin [root@linuxtechi ~]# mkdir sysadmin/admim_{1,2,3,4,5} @@ -157,7 +156,7 @@ Let’s create a directory sysadmin and its subdirectories drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_4 drwxr-xr-x. 2 root root 6 Apr 19 09:50 admim_5 -Set immutable attribute Recursively on the directory sysadmin +在sysadmin文件夹递归设置不可更改属性 [root@linuxtechi ~]# chattr -R +i sysadmin @@ -174,7 +173,7 @@ Set immutable attribute Recursively on the directory sysadmin sysadmin/admim_5: [root@linuxtechi ~]# -Now try to delete directories using rm command +现在试着用rm命令删除文件夹 [root@linuxtechi ~]# rm -rf sysadmin rm: cannot remove ‘sysadmin/admim_1’: Permission denied @@ -184,7 +183,7 @@ Now try to delete directories using rm command rm: cannot remove ‘sysadmin/admim_5’: Permission denied [root@linuxtechi ~]# -To unset the the attributes recursively use the below command +使用以下命令递归取消属性 [root@linuxtechi ~]# chattr -R -i sysadmin @@ -193,7 +192,7 @@ To unset the the attributes recursively use the below command via: http://www.linuxtechi.com/file-directory-attributes-in-linux-using-chattr-lsattr-command/ 作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](https://github.com/ictlyh) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b10eb5dc45785e2356a2cfe60a5a05b6f192977b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 22:37:01 +0800 Subject: [PATCH 0590/2517] PUB:20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide @wi-cuckoo --- ...creenshots - Download and Install Guide.md | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) rename {translated/tech => published}/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md (51%) diff --git a/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/published/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md similarity index 51% rename from translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md rename to published/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md index 23db1ace55..345cae0272 100644 --- a/translated/tech/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md +++ b/published/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md @@ -1,11 +1,11 @@ -Elementart OS 0.3 Freya快照 - 下载和安装指南 +直击 Elementart OS 0.3 Freya - 下载和安装指南 =========================================================================== -Elementary OS是一个以Ubuntu为基础的轻量级操作系统,广受欢迎。目前已经发行了上个版本,而第四个版本将会以即将到来的Ubuntu16.04为基础开发。 +Elementary OS是一个以Ubuntu为基础的轻量级操作系统,广受欢迎。目前已经发行了三个版本,而第四个版本将会以即将到来的Ubuntu16.04为基础开发。 -- **Jupiter (0.1)**: 第一个基于Ubuntu10.10的Elementary OS稳定发行版,在2011年三月发布。 -- **(Luna (0.2)**: 基于Ubuntu12.04的Elementary OS第二个稳定发行版,于2012年11月发布。 -- **(Freya (0.3)**: 基于Ubuntu 14.04的Elementary OS第三个稳定发行版,2015年二月8号发布。 -- **(Loki (0.4)**: 未来Elementary OS第四版,计划以Ubuntu16.04为基础,并且提供更新服务直到2021年。 +- **Jupiter (0.1)**: 第一个Elementary OS稳定发行版基于Ubuntu 10.10,在2011年三月发布。 +- **Luna (0.2)**: Elementary OS第二个稳定发行版基于Ubuntu 12.04,于2012年11月发布。 +- **Freya (0.3)**: Elementary OS第三个稳定发行版基于Ubuntu 14.04的,2015年二月8号发布。 +- **Loki (0.4)**: 未来Elementary OS第四版,计划以Ubuntu16.04为基础,并且提供更新服务直到2021年。 Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS,但是后来改了,是为了避免与同名的恐怖组织产生任何的联系。Freya有一些非常不错的预装应用。 @@ -13,15 +13,15 @@ Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS 这里列举了一些特性,但并非Elementary OS 0.3的所有特性。 -- 根据通知设定面板提供更好的交互性消息通知,包括一个系统级别的“Do Not Disturb”模式。 -- 最新版Elementary OS为网页应用中微软核心字体提供更好的emoji表情支持和替换。 -- Privacy模式是一个新的防火墙工具,很容易使用,可以帮助保护电脑免遭恶意脚本和应用的攻击。 -- 统一了登入和锁定界面 -- 拥有应用中心菜单,提升了界面效果和功能,包括快速列表动作,从搜索中拉取,和支持快速数学计算。 -- 重新设计多任务视图,提供更多的应用专注工具。 -- 更新了软件栈(Linux 3.16, Gtk 3.14 和Vala 0.26),为了对最新开发应用更好的支持和加强功能。 -- 统一了扩展固件接口(UEFI)支持 -- 通过新的捕捉入口协助,WiFi连接变得更容易。 +- 更好的交互性消息通知,可在通知设定面板设定系统级别的“Do Not Disturb(不要打扰)”模式。 +- 最新版Elementary OS提供更好的emoji表情支持,及内置替换了网页应用中的微软核心字体。 +- Privacy模式是一个新的防火墙工具,易于使用,可以帮助保护电脑免遭恶意脚本和应用的攻击。 +- 统一风格的登入和锁定界面。 +- 改进了界面效果和功能的应用中心菜单,包括快速操作列表,搜索拖放,支持快速数学计算。 +- 重新设计的多任务视图提供更多以应用为中心的功能。 +- 更新了软件栈(Linux 3.16, Gtk 3.14 和Vala 0.26),更好的支持和增强了最新开发的应用。 +- UEFI支持。 +- 通过新的联网助手,WiFi连接变得更容易。 ### 下载64位&32位版本 ### @@ -30,23 +30,23 @@ Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS ### 安装Elementary OS 0.3 (Freya) ### -下载Elementary OS 0.3的ISO文件,并且写入一个USB启动盘或者DVD/CD。32位和64位的结构都是可以的。当计算机从Elementary OS ISO文件启动后,有两个选项可用,或试用而不安装,或直接安装到计算机里,选择第二项。Elmentary OS也可以安装与已有操作系统并存,构成双重启动。 +下载Elementary OS 0.3的ISO文件,并且写入到一个USB启动盘或者DVD/CD。支持32位和64位的架构。当计算机从Elementary OS ISO文件启动后,有两个选项可用,或不安装而仅试用,或直接安装到计算机里。这里选择第二项。Elmentary OS也可以与已有操作系统并存安装,构成双重启动。 ![Install Freya](http://blog.linoxide.com/wp-content/uploads/2015/04/Install-Freya.png) -在更进一步之前会检查系统要求和资源有效性。如果你的系统有足够的资源,点击继续。 +在进行下面的步骤之前会检查系统要求和资源有效性。如果你的系统有足够的资源,点击继续。 ![Installation Requirements](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Requirements.png) -安装向导提供许多安装形式。选取最适合你的选项,通常地,第一个选项被大多数选用 i.e. “擦除磁盘以安装Elementary”。选择这个选项,必须保证你的数据都已经被合理的备份了,因为磁盘(分区)将会被擦除,所有数据将会丢失。 +安装向导提供许多安装形式。选取最适合你的选项,通常大多数都选用第一个选项:“擦除磁盘以安装Elementary”。选择该选项,必须保证你的原有数据都已经正确备份了,因为磁盘(分区)将会被擦除,其上所有的数据将会丢失。 ![Installation Types](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Types.png) -一个对话框显示了被Elementary OS使用和格式化的磁盘分区列表,确保数据完整后点击继续。 +接下来的对话框显示了Elementary OS所使用和需要格式化的磁盘分区列表,确保数据完整后点击继续。 ![Format Warning](http://blog.linoxide.com/wp-content/uploads/2015/04/Format-Warning.png) -选择你的位置,确定时区,点击继续。 +选择你的地理位置,确定时区,点击继续。 ![Location](http://blog.linoxide.com/wp-content/uploads/2015/04/Location.png) @@ -54,11 +54,11 @@ Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS ![Language](http://blog.linoxide.com/wp-content/uploads/2015/04/Language.png) -填入你的信息,选择一个强度高的超级用户/管理员密码,点击继续。 +填入你的信息,选择一个高强度的超级用户/管理员密码,点击继续。 ![whoareyou](http://blog.linoxide.com/wp-content/uploads/2015/04/whoareyou.png) -当你的信息提供后,核心安装进程就会启动,正在安装组件的详细信息会在一个小对话框里随进度条一闪而过。 +当你的信息提供后,核心安装进程就会启动,正在安装的组件的详细信息会在一个小对话框里随进度条一闪而过。 ![Installation progress](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-progress.png) @@ -66,7 +66,7 @@ Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS ![Installation Complet](http://blog.linoxide.com/wp-content/uploads/2015/04/Installation-Complet.png) -启动时,Elementary OS的标志显得十分优雅,然后密码保护的管理员登入和游客访问选项会出现。游客访问有相当多的限制功能,而且没有安装的特权。 +启动时,Elementary OS将显示它优雅的logo,然后会出现密码保护的管理员登入和游客访问选项。游客访问有相当多的限制功能,而且没有安装软件的权限。 ![Login](http://blog.linoxide.com/wp-content/uploads/2015/04/Login.png) @@ -76,27 +76,27 @@ Freya是目前最新的Elementary OS版本(0.3)。最初是被命名为ISIS ### 个性化桌面 ### -Elementary OS 0.3以其轻巧和美观而为我们熟知,每个人有自己独特的审美观念和计算机使用习惯。桌面反映出每一个计算机使用者个性化的观点。如其他操作系统一样,Elementary OS 0.3也提供了许多选项来个性化配置桌面,包括壁纸,字体大小,主题等等。 +Elementary OS 0.3以其轻巧和美观而为我们熟知,每个人有自己独特的审美观和计算机使用习惯。桌面反映出每一个计算机使用者的个人偏好。如其他操作系统一样,Elementary OS 0.3也提供了许多选项来个性化配置桌面,包括壁纸,字体大小,主题等等。 基本的个性化配置,点击Applications > System Settings > Desktop -我们可以改变壁纸,泊板和启用桌面热角。 +我们可以改变壁纸,泊板(dock)和启用桌面热角。 -默认提供了很少的壁纸,更多的可以从网上下载或者从你的相机传输。 +默认提供了很少的壁纸,更多的可以从网上下载或者从你的相机传输过来。 ![Desktop Wallpaper](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Wallpaper4.png) -Elementary OS真正的美丽在于优雅的Dock面板。桌面上没有任何图标,一些应用图标停靠在dock面板上加强了显示效果,提供了快速访问常用应用的捷径。 +Elementary OS真正的美丽在于优雅的泊板。桌面上没有任何图标,泊板上的应用图标显示逼真,通过它可以快速访问常用应用。 ![Desktop Dock](http://blog.linoxide.com/wp-content/uploads/2015/04/Desktop-Dock1.png) -用户可以使用桌面的四个角定制要显示什么。 +用户可以定制桌面的四个角的功能。 ![Hot Corners](http://blog.linoxide.com/wp-content/uploads/2015/04/Hot-Corners.png) -通过elementary tweaks工具的安装,可以达到更高级的个性化定制。 +通过安装elementary tweaks工具来更深入的个性化定制。 -使用如下命令,添加稳定的个人软件包档案(PPA)到高级软件包管理工具(APT)仓库。 +可以使用如下命令,将稳定的个人软件包档案(PPA)添加到高级软件包管理工具(APT)仓库。 sudo add-apt-repository ppa:mpstark/elementary-tweaks-daily @@ -108,13 +108,13 @@ Elementary OS真正的美丽在于优雅的Dock面板。桌面上没有任何图 ![update repository](http://blog.linoxide.com/wp-content/uploads/2015/04/update-repository.png) -更新仓库后,我们就可以安装inkscape(不知是什么),用以下命令完成 +更新仓库后,我们就可以安装elementary-tweaks,用以下命令完成 sudo apt-get install elementary-tweaks ![install elementary tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/install-elementary-tweaks.png) -我们可以在个人区域的Application > System Settings下看到Tweaks选项的一个添加项。目前它提供给我们更多的选项,个性化定制我们的桌面。 +我们可以在Application > System Settings下的个人区域的看到增加了一个Tweaks项目。它现在可以给我们提供更多的个性化定制选项。 ![tweaks](http://blog.linoxide.com/wp-content/uploads/2015/04/tweaks.png) @@ -126,7 +126,7 @@ Elementary OS真正的美丽在于优雅的Dock面板。桌面上没有任何图 ### 总结 ### -Elementary OS十分接近Linux的发行版Ubuntu,它的正反两方面也都十分相似。Elementary OS在外观和体验上都十分轻巧和优雅,并且正在快速地走向成熟。它有潜力成为Windows和OS X操作系统之外的第三选择。最新的Elementary OS 0.3 (Freya)正凭借更好功能基础,在迅速的流行。想了解更多信息,最近的更新和下载,请访问官方[网站][1]。 +Elementary OS十分接近Linux发行版Ubuntu,它的优缺点两方面也都十分相似。Elementary OS在外观和体验上都十分轻巧和优雅,并且正在快速地走向成熟。它有潜力成为Windows和OS X操作系统之外的第三选择。最新的Elementary OS 0.3(Freya)以其良好的功能基础而迅速流行。想了解更多信息,最近的更新和下载,请访问其官方[网站][1]。 -------------------------------------------------------------------------------- @@ -134,7 +134,7 @@ via: http://linoxide.com/ubuntu-how-to/elementary-os-0-3-freya-install-guide/ 作者:[Aun Raza][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 206b90c9caf064d8c61d17c954650348fcbd2181 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 20 Apr 2015 23:33:41 +0800 Subject: [PATCH 0591/2517] PUB:20150324 Prips--Print IP address on a given range @geekpi --- ...50324 Prips--Print IP address on a given range.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20150324 Prips--Print IP address on a given range.md (83%) diff --git a/translated/tech/20150324 Prips--Print IP address on a given range.md b/published/20150324 Prips--Print IP address on a given range.md similarity index 83% rename from translated/tech/20150324 Prips--Print IP address on a given range.md rename to published/20150324 Prips--Print IP address on a given range.md index a628c1e122..4d663bb953 100644 --- a/translated/tech/20150324 Prips--Print IP address on a given range.md +++ b/published/20150324 Prips--Print IP address on a given range.md @@ -10,7 +10,7 @@ prips是一个可以打印出指定范围内所有ip地址的一个工具。它 ### 使用prips ### -### prips语法 ### +prips语法 prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] start end prips [-c] [-d delim] [-e exclude] [-f format] [-i incr] CIDR-block @@ -20,10 +20,10 @@ prips是一个可以打印出指定范围内所有ip地址的一个工具。它 prips接受下面的命令行选项: - -c -- 以CIDR形式打印范围。 -- -d delim -- 用ASCII码作为分隔符,0 <= delim <= 255。 +- -d 分隔符 -- 用ASCII码作为分隔符,0 <= 分隔符 <= 255。 - -e -- 排除输出的范围。 -- -f format -- 设置地址格式 (16进制, 10进制, 或者dot). -- -i incr -- 设置增长上限 +- -f 格式 -- 设置地址格式 (hex:16进制, dec:10进制, 或者dot:以点分隔). +- -i 增长 -- 设置增长上限 ### Prips示例 ### @@ -31,7 +31,7 @@ prips接受下面的命令行选项: prips 192.168.32.0 192.168.32.255 -同样使用CIDR标示: +同上面一样,使用CIDR标示: prips 192.168.32/24 @@ -53,7 +53,7 @@ via: http://www.ubuntugeek.com/prips-print-ip-address-on-a-given-range.html 作者:[ruchi][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2cef4b3373f9e3b71ff23dce64d699ab6e66b717 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 21 Apr 2015 10:40:13 +0800 Subject: [PATCH 0592/2517] [Translating] tech/How to Install Linux Kernel 4.0 from Elrepo / Source on Ubuntu / CentOs --- ...Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md index 3e2c0bd509..76b8355291 100644 --- a/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md +++ b/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to Install Linux Kernel 4.0 from Elrepo / Source on Ubuntu / CentOs ================================================================================ Hi everyone, today we'll learn how to install the latest Linux Kernel 4.0 from Elrepo and compiling using Source. Linux Kernel 4.0 is the latest Mainline Kernel codenamed ‘Hurr durr I’m a sheep’ till date. It is the kernel released after the stable released of 3.19.4 . April 12 is considered as a big day for all fans of the Open Source movement, as Linus Torvalds announced the release of Linux Kernel 4.0 and its immediate availability. It is considered as a big release as it consists of some awesome features which includes no-reboot patching (Live Patching), New and Updated Drivers, New and Latest Hardware Support and more interesting features with a new version change. But Kernel 4.0 is not considered as a huge release as expected but Linus announced that 4.1 is expected for a bigger release. The Live Patching feature was already integrated with the SUSE Enterprise Linux operating system. Here is the [release announcement][1] you can check for more details about the release. From 1d7b1b7c8480f8af18e8f0d7f8ece43e8a71af8e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 21 Apr 2015 11:38:15 +0800 Subject: [PATCH 0593/2517] [Translated] tech/How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs --- ...om Elrepo or Source on Ubuntu or CentOs.md | 148 ------------------ ...om Elrepo or Source on Ubuntu or CentOs.md | 146 +++++++++++++++++ 2 files changed, 146 insertions(+), 148 deletions(-) delete mode 100644 sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md create mode 100644 translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md diff --git a/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md deleted file mode 100644 index 76b8355291..0000000000 --- a/sources/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md +++ /dev/null @@ -1,148 +0,0 @@ -Translating by ictlyh -How to Install Linux Kernel 4.0 from Elrepo / Source on Ubuntu / CentOs -================================================================================ -Hi everyone, today we'll learn how to install the latest Linux Kernel 4.0 from Elrepo and compiling using Source. Linux Kernel 4.0 is the latest Mainline Kernel codenamed ‘Hurr durr I’m a sheep’ till date. It is the kernel released after the stable released of 3.19.4 . April 12 is considered as a big day for all fans of the Open Source movement, as Linus Torvalds announced the release of Linux Kernel 4.0 and its immediate availability. It is considered as a big release as it consists of some awesome features which includes no-reboot patching (Live Patching), New and Updated Drivers, New and Latest Hardware Support and more interesting features with a new version change. But Kernel 4.0 is not considered as a huge release as expected but Linus announced that 4.1 is expected for a bigger release. The Live Patching feature was already integrated with the SUSE Enterprise Linux operating system. Here is the [release announcement][1] you can check for more details about the release. - -> **WARNING**: Installing a new kernel may render your system unusable or unstable. If you proceed with the installation using the instructions below, make sure you back up any important data you have to an external hard drive. - -### Installing Linux Kernel 4.0 on Ubuntu 15.04 ### - -If you are running an Ubuntu 15.04 Distribution of Linux. You can simply install it straight from Ubuntu Kernel site. To install the latest Linux Kernel 4.0 in your Ubuntu 15.04, you'll need to run the following commands under root access in a shell or a terminal. - -#### On a 64-bit Ubuntu 15.04 #### - - $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb - - $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb - -#### On a 32-bit Ubuntu 15.04 #### - - $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_i386.deb - - $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb - -### Installing Linux Kernel 4.0 on CentOS 7 ### - -We can easily install Linux Kernel 4.0 using two ways in CentOS 7 . - -1. Installing from Elrepo Repository -1. Compiling and installing from the Source Code - -First we'll gonna go for installing using ELRepo as its the easiest way to do. - -#### Installing using Elrepo #### - -**1. Downloading and Installing ELRepo** - -We'll first gonna download the GPG key of ELRepo and install the relrepo-release package. As we're running CentOS 7, we'll gonna install elrepo-release-7.0-2.el7.elrepo.noarch.rpm using the command below. - -Note: If you have a secure boot enabled please see [this page for more information][2]. - - # rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org - # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm - -![Adding Elrepo Source](http://blog.linoxide.com/wp-content/uploads/2015/04/adding-elrepo.png) - -**2. Updating Linux Kernel to version 4.0** - -Now, we'll gonna install the latest stable kernel 4.0 from the ELRepo repository. To do so, we'll need to enter the following commands in a shell or terminal of the CentOS 7. - - # yum --enablerepo=elrepo-kernel install kernel-ml - -![Installing Linux Kernel 4.0 from ELRepo](http://blog.linoxide.com/wp-content/uploads/2015/04/installing-kernel-4-0-elrepo.png) - -The above command will automatically install the Linux Kernel 4.0 build for CentOS 7. - -Now, here below is the another way of installing the latest kernel 4.0 by compiling from the source. - -#### Compiling and Installing from the Source #### - -**1. Installing the Dependencies** - -So, first of all we'll need to install the dependencies required to compile the linux kernel. To do so, we'll need to run the following command in a terminal or a shell. - - # yum groupinstall "Development Tools" - - # yum install gcc ncurses ncurses-devel - -![Installing Kernel Dependencies](http://blog.linoxide.com/wp-content/uploads/2015/04/installing-dependencies.png) - -Then, we'll gonna update our whole system. - - # yum update - -**2. Downloading the source** - -We'll now download the latest release linux kernel 4.0 source using wget command from the official repository of Linux Kernel. You can also download the kernel directly from the site [kernel.org][3] using your web browser also. - - # cd /tmp/ - # wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.0.tar.xz - -![Download Kernel Source](http://blog.linoxide.com/wp-content/uploads/2015/04/download-kernel-source.png) - -**3. Extracting the tarball** - -Once the file is downloaded we'll extract it under /usr/src/ directory by running the below command. - - # tar -xf linux-4.0.tar.xz -C /usr/src/ - # cd /usr/src/linux-4.0/ - -![Extracting Kernel Tarball](http://blog.linoxide.com/wp-content/uploads/2015/04/extracting-kernel-tarball.png) - -**4. Configuring** - -We have two options to configure the Linux Kernel. We can either create a new custom configuration or use the old configuration to build and install the Linux Kernel. It all depends on what you really want. - -**For New Kernel Configuration** - -Now we'll run the make menuconfig command in the shell or terminal to configure the Linux kernel. Once we've executed the below command a pop up window with all the menus appears. Here we can select our new kernel configuration. If you unfamiliar with these menus, just hit double ESC key to exit. - - # make menuconfig - -![Configuring New Kernel Config](http://blog.linoxide.com/wp-content/uploads/2015/04/configuring-new-kernel-config.png) - -**For Old Configuration** - -If you like to configure your latest kernel with your old configuration then simple type the below command. If you were asked any stuff, you can choose with Y or N or you can simply press Enter to continue. - - # make oldconfig - -#### Step 5. Compiling the Linux Kernel #### - -Next, we'll execute the make command to compile the Kernel 4.0 . The compilation would take at least 20-30 minutes depends on your system configuration. - -Note: If you got an error while compiling the kernel saying bc command not found. You can fix that by installing bc using the command **yum install bc** . - - # make -![Make Kernel](http://blog.linoxide.com/wp-content/uploads/2015/04/make-kernel.png) - -#### 6. Installing Linux Kernel 4.0 #### - -Once the compilation is completed, we'll now finally install the **Kernel** in our Linux System. The below command will create files under /boot directory and also makes a new kernel entry in the Grub Menu. - - # make modules_install install - -#### 7. Verifying Kernel #### - -After installing our latest kernel 4.0 we'll want to verify it. To do so we'll just type the following command on the terminal. If everything went fine, we'll get the kernel version ie. 4.0 enlisted in the output below. - - # uname -r - -#### Conclusion #### - -Hurray, we have successfully installed the latest version of linux kernel ie 4.0 in our CentOS 7 Operating System. Upgrading a linux kernel is always not necessary cause the hardware you got working with the previous version of it may not get working with the newer version. We should make sure that the it includes the features and stuffs that are necessary to make your hardware working. But mostly, the newer stable versions of kernel makes your hardware performance better. So, if you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy the latest stable version of Linux Kernel 4.0 :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/how-tos/install-linux-kernel-4-0-elrepo-source/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://lkml.iu.edu/hypermail/linux/kernel/1504.1/03198.html -[2]:http://elrepo.org/tiki/SecureBootKey -[3]:http://kernel.org/ \ No newline at end of file diff --git a/translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md new file mode 100644 index 0000000000..a597b31c91 --- /dev/null +++ b/translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md @@ -0,0 +1,146 @@ +如何从Elrepo/源 在Ubuntu/CentOS上安装Linux内核4.0 +================================================================================ +大家好,今天我们学习一下如何从Elrepo或者编译源码安装最新的Linux内核4.0。昵称为‘Hurr durr I’m a sheep’的Linux内核4.0是目前为止最新的主干内核。是稳定版3.19.4后发布的内核。Linux Torvalds声明了Linux内核4.0的发布以及可及时提供,4月12日被认为是所有开源运动爱好者的重大日子。由于包括了一些很棒的功能,例如无重启补丁(实时补丁),新的升级驱动,最新的硬件支持以及很多有趣的功能都有新的版本,它被认为是一次重大发布。但是内核4.0并不认为是期望中的重大发布,Linus表示期望4.1是一个更大的发布。实时补丁功能已经集成到了SUSE企业版Linux操作系统上。你可以在[发布公告][1]上查看关于这次发布的更多详细内容。 + +> **警告**: 安装新的内核可能会导致你的系统不可用或不稳定。如果你仍然使用以下命令继续安装,请确保备份所有重要数据到外部硬盘。 + +### 在Ubuntu 15.04上安装Linux内核4.0 ### + +如果你正在使用Linux的发行版Ubuntu 15.04,你可以直接通过Ubuntu内核网站安装。在你的Ubuntu15.04上安装最新的Linux内核4.0,你需要在shell或终端中在root访问权限下运行一下命令。 + +#### 在 64-bit Ubuntu 15.04 #### + + $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb + + $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb + +#### 在 32-bit Ubuntu 15.04 #### + + $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_i386.deb + + $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb + +### 在CentOS 7上安装Linux内核4.0 ### + +我们可以用两种简单的方式在CentOS 7上安装Linux内核4.0。 + +1. 从Elrepo软件仓库安装 +1. 从源代码编译安装 + +由于是最简单的方式,我们首先用ElRepo安装。 + +#### 使用 Elrepo 安装 #### + +**1. 下载和安装ELRepo** + +我们首先下载ELRepo的GPG密钥并安装relrepo-release安装包。因为我们用的是CentOS 7,我们使用以下命令安装elrepo-release-7.0-2.el7.elrepo.noarch.rpm。 + +注: 如果你启用了secure boot,请查看[这个网页获取更多信息][2]。 + + # rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org + # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm + +![添加 Elrepo 源](http://blog.linoxide.com/wp-content/uploads/2015/04/adding-elrepo.png) + +**2. 升级Linux内核到4.0版本** + +现在,我们打算从ELRepo软件仓库安装最新的稳定版内核4.0。做这些,我们需要在CentOS 7的shell或者终端中输入以下命令。 + + # yum --enablerepo=elrepo-kernel install kernel-ml + +![从ELRepo安装Linux内核4.0](http://blog.linoxide.com/wp-content/uploads/2015/04/installing-kernel-4-0-elrepo.png) + +上面的命令会自动安装为CentOS 7构建的Linux内核4.0。 + +现在,下面的是另一种方式,通过编译源代码安装最新的内核4.0。 + +#### 从源代码编译安装 #### + +**1. 安装依赖软件** + +首先我们需要为编译linux内核安装依赖的软件。做这些,我们需要在一个终端或者shell中运行以下命令。 + + # yum groupinstall "Development Tools" + + # yum install gcc ncurses ncurses-devel + +![安装内核依赖](http://blog.linoxide.com/wp-content/uploads/2015/04/installing-dependencies.png) + +然后,我们会升级我们的整个系统。 + + # yum update + +**2. 下载源代码** + +现在我们通过wget命令从Linux内核官方仓库中下载最新发布的linux内核4.0的源代码。你也可以使用你的浏览器直接从[kernel.org][3]网站下载内核。 + + # cd /tmp/ + # wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.0.tar.xz + +![下载内核源码](http://blog.linoxide.com/wp-content/uploads/2015/04/download-kernel-source.png) + +**3. 解压tar压缩包** + +文件下载好后我们在/usr/src/文件夹下用以下命令解压。 + + # tar -xf linux-4.0.tar.xz -C /usr/src/ + # cd /usr/src/linux-4.0/ + +![解压内核tar压缩包](http://blog.linoxide.com/wp-content/uploads/2015/04/extracting-kernel-tarball.png) + +**4. 配置** + +我们要配置Linux内核的两个选项。我们可以创建一个新的自定义配置文件或者使用旧的配置文件来构建和安装Linux内核。这都取决于你自己的想法。 + +**配置新的内核** + +现在我们在shell或终端中运行make menuconfig命令来配置Linux内核。我们执行以下命令后会显示一个包含所有菜单的弹出窗口。在这里我们可以选择我们新的内核配置。如果你不熟悉这些菜单,那就敲击ESC键两次退出。 + + # make menuconfig + +![配置新内核](http://blog.linoxide.com/wp-content/uploads/2015/04/configuring-new-kernel-config.png) + +**旧的配置** + +如果你想用旧的配置文件配置你最新的内核,那就输入下面的命令。如果对你有任何提问,你可以选择Y或者N,或者仅仅是按Enter键继续。 + # make oldconfig + +#### Step 5. 编译Linux内核 #### + +下一步,我们会执行make命令来编译内核4.0。取决于你的系统配置,编译至少需要20-30分钟。 + +注:如果编译内核的时候出现bc command not found的错误,你可以用**yum install bc**命令安装bc修复这个错误。 + + # make +![Make 内核](http://blog.linoxide.com/wp-content/uploads/2015/04/make-kernel.png) + +#### 6. 安装Linux内核4.0 #### + +编译完成后,我们终于要在你的Linux系统上安装**内核**了。下面的命令会在/boot目录下创建文件并且在Grub Menu中新建一个内核条目。 + + # make modules_install install + +#### 7. 验证内核 #### + +安装完最新的内核4.0后我们希望能验证它。做这些我们只需要在终端中输入以下命令。如果所有都进展顺利,我们会看到内核版本,例如4.0出现在输出列表中。 + + # uname -r + +#### 结论 #### + +好了,我们成功地在我们的CentOS 7操作系统上安装了最新的Linux内核版本4.0。通常并不需要升级linux内核,因为和之前版本运行良好的硬件可能并不适合新的版本。我们要确保它包括能使你的硬件正常工作的功能和配件。但大部分情况下,新的稳定版本内核能使你的硬件性能更好。因此,如果你有任何问题,评论,反馈,请在下面的评论框中注明,让我们知道需要增加或者删除什么问题。多谢!享受最新的稳定版Linux内核4.0吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/install-linux-kernel-4-0-elrepo-source/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://lkml.iu.edu/hypermail/linux/kernel/1504.1/03198.html +[2]:http://elrepo.org/tiki/SecureBootKey +[3]:http://kernel.org/ \ No newline at end of file From d6318cca497afa1940c2fd1318097c86dbd99f3c Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 21 Apr 2015 16:45:29 +0800 Subject: [PATCH 0594/2517] Translating by ZTinoZ --- ...5 Linux FAQs with Answers--How to disable IPv6 on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md index 99e7d0b6bc..fe5efed4df 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -2,9 +2,9 @@ Linux有问必答时间--如何在Linux下禁用IPv6 ================================================================================ > **问题**:我发现我的一个应用程序在尝试通过IPv6建立连接,但是由于我们本地网络不允许分配IPv6的流量,IPv6连接会超时,应用程序的连接会退回到IPv4,这样就会造成不必要的延迟。由于我目前对IPv6没有任何需求,所以我想在我的Linux主机上禁用IPv6。有什么比较合适的方法呢? -IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品,它为了解决现有IPv4地址空间即将耗尽的问题。However, since IPv4 has been used by every host or device connected to the Internet, it is practically impossible to switch every one of them to IPv6 overnight. Numerous IPv4 to IPv6 transition mechanisms (e.g., dual IP stack, tunneling, proxying) have been proposed to facilitate the adoption of IPv6, and many applications are being rewritten, as we speak, to add support for IPv6. One thing for sure is that IPv4 and IPv6 will inevitably coexist for the forseeable future. +IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品,它为了解决现有IPv4地址空间即将耗尽的问题。然而,由于IPv4已经被每台主机或设备连接到了互联网上,所以想在一夜之间将它们全部切换到IPv6几乎是不可能的。许多IPv4到IPv6的转换机制(例如:双协议栈、网络隧道、代理) 已经被提出来用来促进IPv6能被采用,并且很多应用也正在进行重写,就像我们所说的,来增加对IPv6的支持。有一件事情能确定,就是在可预见的未来里IPv4和IPv6势必将共存。 -Ideally the [ongoing IPv6 transition process][1] should not be visible to end users, but the mixed IPv4/IPv6 environment might sometimes cause you to encounter various hiccups originating from unintended interaction between IPv4 and IPv6. For example, you may experience timeouts from applications such as apt-get or ssh trying to unsuccessfully connecting via IPv6, DNS server accidentally dropping AAAA DNS records for IPv6, or your IPv6-capable device not compatible with your ISP's legacy IPv4 network, etc. +理想情况下,[向IPv6过渡的进程][1]不应该被最终的用户所看见,但是IPv4/IPv6混合环境有时会让你碰到各种源于IPv4和IPv6之间不经意间的相互作用的问题。举个例子,你会碰到应用程序超时的问题比如apt-get或ssh尝试通过IPv6连接失败、DNS服务器意外清空了IPv6的AAAA记录、或者你支持IPv6的设备不兼容你的互联网服务提供商遗留下的IPv4网络等等等等。 Of course this doesn't mean that you should blindly disable IPv6 on you Linux box. With all the benefits promised by IPv6, we as a society want to fully embrace it eventually, but as part of troubleshooting process for end-user experienced hiccups, you may try turning off IPv6 to see if indeed IPv6 is a culprit. From 8a6a9db3cde53e6882e0ef8bd250c98b72c8799e Mon Sep 17 00:00:00 2001 From: demon Date: Tue, 21 Apr 2015 17:12:55 +0800 Subject: [PATCH 0595/2517] Create How to manage remote MySQL databases on Linux VPS using a GUI tool --- ...QL databases on Linux VPS using a GUI tool | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool diff --git a/translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool b/translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool new file mode 100644 index 0000000000..580e68e9d7 --- /dev/null +++ b/translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool @@ -0,0 +1,171 @@ +Translating by demon +如何使用图形化工具远程管理Linux Vps上的MySql +================================================================================ +如果你在一个远程的VPS上运行了MYSQL server,你会如何管理你的远程数据库主机呢?基于web的数据库管理工具例如phpMyAdmin或者Adminer可能会是你一个想起的。这些基于web的管理工具需要一个后端的web服务和PHP引擎在正常运行。但是,如果你的VPS仅仅用来做数据库服务(e.g., for a multi-tier app),为临时的数据库管理提供一整套的LAMP是浪费VPS资源的。更糟的是,LAMP带有的HTTP端口可能会成为你VPS资源的安全漏洞。 + +作为一种选择,你可以使用在一台客户机上运行本地的Mysql客户端,当然,如果没有别的选择,一个纯净的命令行mysql客户端将是你的默认选择。但是命令行客户端的功能是有限的,因此它不适合在生产环境中使用,例如:sql开发,性能调优,模式验证等等。你是否在寻找一个成熟的MYSQL管理工具,那么一个MYSQL的图形化管理工具将会更好的满足你的需求。 + +什么是MySQL Workbench? + +作为一个由Oracle开发的成熟数据库管理工具,mysql workbench不仅仅是一个MySQL客户端。简而言之,Workbench是一个跨平台的(eg:Linux,MacOX,Windows)数据库设计,开发和管理图形工具。社区版本的Msyql Workbench是遵循GPL协议的。作为一个数据库管理者,你可以使用Workbench去配置Mysql服务,管理Mysql用户,完成数据库的备份与还原,监视数据库的健康状况,所有的都在对用户友好的图形化环境下处理。 + +在这个手册里,让我们演示下如何在Linux下安装和使用Mysql Workbench. + +在Linux上安装MySQL Workbench + +你可以在任何一个桌面linux机器上运行Mysql Workbench去设置你的数据库管理环境。然而一些Linux发行版(例如:Debian/Ubuntu)在他们的软件源中已经有了Mysql Workbench.从官方源中安装是一个好的方法,因为他们提供了最新的版本。这里介绍了如何设置一个官方的Workbench源和从中安装它。 + +#### Debian-based Desktop (Debia, Ubuntu, Mint): #### + +到其官方站点,选择一个和你环境匹配的DEB file源,并下载安装 + +For example, on Ubuntu 14.10: + + $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.4-2ubuntu14.10_all.deb + $ sudo dpkg -i mysql-apt-config_0.3.4-2ubuntu14.10_all.deb + +on Debian 7: + + $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.3-1debian7_all.deb + $ sudo dpkg -i mysql-apt-config_0.3.3-1debian7_all.deb + +当你安装DEB文件时,你会看到下面的配置菜单,并且选择配置那个Mysql产品 + +![](https://farm8.staticflickr.com/7702/16928715218_b1fcbcdbf3_c.jpg) + +选择“Utilities”.完成配置后,选择“Apply”去保存配置。然后,更新包索引,并且安装Workbench + + $ sudo apt-get update + $ sudo apt-get install mysql-workbench + +#### Red Hat-based Desktop (CentOS, Fedora, RHEL): #### + +去官网下载并安装适合你Linux环境的RPM源包 +For example, on CentOS 7: + + $ wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm + $ sudo yum localinstall mysql-community-release-el7-5.noarch.rpm + +on Fedora 21: + + $ wget http://dev.mysql.com/get/mysql-community-release-fc21-6.noarch.rpm + $ sudo yum localinstall mysql-community-release-fc21-6.noarch.rpm + +验证"MySQL Tools Community"源是否被安装 + $ yum repolis enabled + +![](https://farm9.staticflickr.com/8826/16494069254_15458ace52_c.jpg) + +安装Workbench + + $ sudo yum install mysql-workbench-community + +设置远程数据库的安全连接 + +接下来是为你运行Mysql服务的VPS设置一个远程连接,当然你可以直接通过图形化的Workbench连接你的远程Mysql服务器(在数据库开放了远程连接后)。然而,这样做有很大的安全风险,因为有些人很容易窃听你的数据库传输信息,并且一个公开的Mysql端口(默认为3306)被作为攻击入口。 + +一个比较好的方法是关掉远程访问数据库服务功能,(仅允许在127.0.0.1访问)。然后在本地客户机和远程Vps直接设置一个SSH隧道,这样的话,和mysql之间的数据能被安全的传输,仅在它的本地回环接口上。相比较设置一个SSL加密的连接来说,配置SSH隧道需要很少的操作,因为他仅仅需要SSH服务,并且在大多数的VPS上已经部署了。 + +让我们来看看如何来为一个Mysql Workbench设置一个SSH隧道,这里的设置,不需要你开放远程访问Mysql服务。 +在一个运行了Workbench的本地客户机上,键入下面的命令,替换'user' and 'remote_vps'为你自己的信息 + + $ ssh user@remote_vps -L 3306:127.0.0.1:3306 -N + +你会被要求输入你VPS的SSH密码,当你成功登陆VPS后,一个SSH隧道将会在本地的3306端口和远程VPS的3306端口将会被建立。这里你不会看到任何信息。 + +或者你可以选择在后台运行SSH隧道,按CTRL+Z停止当前的命令,然后输入bg并且ENTER + +![](https://farm8.staticflickr.com/7714/16928715438_bf0db49b3b_c.jpg) + +这样SSH隧道就会在后台运行了。 + +使用MySQL Workbench远程管理MySQL服务 + +在建立好SSH隧道后,你可以通过MySQL Workbench去远程连接Mysql服务了。 + +输入下面命令启动Workbench + + $ mysql-workbench + +![](https://farm9.staticflickr.com/8768/16494069294_0fce571ddb_c.jpg) + +点击Workbench页面上面的加号图标去创建一个新的数据库连接,接着会出现下面的连接信息。 + +- **Connection Name**: any description (e.g., My remote VPS database) +- **Hostname**: 127.0.0.1 +- **Port**: 3306 +- **Username**: MySQL username (e.g., root) + +![](https://farm8.staticflickr.com/7727/16928715288_d9ac3bfc7a_c.jpg) + +注意:因为隧道设置的是127.0.0.1:3306,所以主机名哪里必须是127.0.0.1,而不能是远程VPS的IP地址或者主机名 + +当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。 + +![](https://farm8.staticflickr.com/7650/17114969532_0252ffcd31_c.jpg) + +当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。 + +#### MySQL Server Status #### + +当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。 + +![](https://farm8.staticflickr.com/7627/16494069414_9d838d4138_c.jpg) + +#### Client Connections #### + +连接数是一个极其重要的监视资源,这个菜单显示了每个连接的详细信息。 + +![](https://farm9.staticflickr.com/8747/16909119337_a8d89772dd_c.jpg) + +#### 用户和权限 #### + +这个菜单允许你管理MySQL用户,包括他们的资源限制和权限。 + +![](https://farm9.staticflickr.com/8765/16494069384_760fc17c8f_c.jpg) + +#### MySQL Server Administration #### + +你可以启动或关闭MySQL服务,并且检查它的服务日志。 + +![](https://farm8.staticflickr.com/7588/17114969592_54526dfb32_c.jpg) + +#### Database Schema Management #### + +可以可视化的查看,更改,检查数据库结构,在“Schemas”标题下选择任何一个数据库或表,然后右击 + +![](https://farm8.staticflickr.com/7665/16496363973_fd03a96198_c.jpg) + +![](https://farm9.staticflickr.com/8744/16909119497_7c884617b8_c.jpg) + +#### Database Query #### + +你可以执行任何的语句(只要你的权限允许),并且检查他的结果。 + +![](https://farm8.staticflickr.com/7716/17114969692_c0f02bb277_c.jpg) + +此外,性能统计数据和报表仅用于MySQL5.6以上的版本。对于5.5及其以下的版本,性能部分会以灰色显示。 +### 结论 ### + +简介且直观的选项卡界面,丰富的特性,开源,使MySQL Workbench成为一个非常好的可视化数据库设计和管理工具。为其减分的是它的性能。我注意到在一台运行繁忙的服务器上,Workbench优势会变得异常缓慢,尽管它的性能差强人意,我依然认为MySQL Workbench是MySQL数据库管理员和设计人员必备的工具之一。 + +你曾在你的生产环境中用过Workbench吗?或者你还有别的GUI工具可以推荐?请分享你的经验吧。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/remote-mysql-databases-gui-tool.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/tyzy313481929译者demon) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/go/digitalocean +[2]:http://ask.xmodulo.com/install-phpmyadmin-centos.html +[3]:http://xmodulo.com/set-web-based-database-management-system-adminer.html +[4]:http://mysqlworkbench.org/ +[5]:http://dev.mysql.com/downloads/repo/apt/ +[6]:http://dev.mysql.com/downloads/repo/yum/ +[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html From 574b537dde6aa4968491bf4ab3d8bf7af91e7819 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 21 Apr 2015 17:42:32 +0800 Subject: [PATCH 0596/2517] Translating by ZTinoZ --- ...225 Linux FAQs with Answers--How to disable IPv6 on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md index fe5efed4df..5d5c961a17 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -6,7 +6,7 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 理想情况下,[向IPv6过渡的进程][1]不应该被最终的用户所看见,但是IPv4/IPv6混合环境有时会让你碰到各种源于IPv4和IPv6之间不经意间的相互作用的问题。举个例子,你会碰到应用程序超时的问题比如apt-get或ssh尝试通过IPv6连接失败、DNS服务器意外清空了IPv6的AAAA记录、或者你支持IPv6的设备不兼容你的互联网服务提供商遗留下的IPv4网络等等等等。 -Of course this doesn't mean that you should blindly disable IPv6 on you Linux box. With all the benefits promised by IPv6, we as a society want to fully embrace it eventually, but as part of troubleshooting process for end-user experienced hiccups, you may try turning off IPv6 to see if indeed IPv6 is a culprit. +当然这不意味着你应该Of course this doesn't mean that you should blindly disable IPv6 on you Linux box. With all the benefits promised by IPv6, we as a society want to fully embrace it eventually, but as part of troubleshooting process for end-user experienced hiccups, you may try turning off IPv6 to see if indeed IPv6 is a culprit. Here are a few techniques allowing you to disable IPv6 partially (e.g., for a certain network interface) or completely on Linux. These tips should be applicable to all major Linux distributions including Ubuntu, Debian, Linux Mint, CentOS, Fedora, RHEL, and Arch Linux. From dd8039ba31e02297462de8e47be0bc560efb453a Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 21 Apr 2015 22:34:09 +0800 Subject: [PATCH 0597/2517] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20PR=20=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1、不要改文件名,保留文件名前的日期。2、保留 .md 扩展名。 3、记得删除 sources 下的原文。 @tyzy313481929 --- ...databases on Linux VPS using a GUI tool.md | 179 ------------------ ...atabases on Linux VPS using a GUI tool.md} | 0 2 files changed, 179 deletions(-) delete mode 100644 sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md rename translated/tech/{How to manage remote MySQL databases on Linux VPS using a GUI tool => 20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md} (100%) diff --git a/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md b/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md deleted file mode 100644 index c157ce65d5..0000000000 --- a/sources/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md +++ /dev/null @@ -1,179 +0,0 @@ -demon 翻译中 -How to manage remote MySQL databases on Linux VPS using a GUI tool -================================================================================ -If you need to run a MySQL server on a remote [VPS instance][1], how will you manage databases hosted by the server remotely? Perhaps web-based database administration tools such as [phpMyAdmin][2] or [Adminer][3] will first come to mind. These web-based management tools require a backend web server and PHP engine up and running. However, if your VPS instance is used as a standalone database server (e.g., for a multi-tier app), provisioning a whole LAMP stack for occasional database management is a waste of VPS resource. Worse, the LAMP stack with an additional HTTP port can be a source of security vulnerabilities of your VPS. - -Alternatively, you can turn to a native MySQL client running on a client host. Of course a pure command-line MySQL client (mysql-client) can be your default choice if nothing else. But the capabilities of the command-line client are limited, so it is not suitable for production-level database administration such as visual SQL development, performance tuning, schema validation, etc. If you are looking for full-blown MySQL administration features, a MySQL GUI tool will meet your requirements better. - -### What is MySQL Workbench? ### - -Developed as an integrated database tool environment by Oracle, [MySQL Workbench][4] is more than a simple MySQL client. In a nutshell, Workbench is a cross-platform (e.g., Linux, MacOS X, Windows) GUI tool for database design, development and administration. The Community Edition of MySQL Workbench is available for free under the GPL. As a database administrator, you can use Workbench to configure MySQL server, manage MySQL users, perform database backup and recovery, and monitor database health, all in GUI-based user-frienly environment. - -In this tutorial, let's review how to install and use MySQL Workbench on Linux. - -### Install MySQL Workbench on Linux ### - -To set up remote database administration environment, grab any desktop Linux machine where you will be running MySQL Workbench. While some Linux distributions (e.g., Debian/Ubuntu) carry MySQL Workbench in their repositories, it is a good idea to install it from the official repositories, as they offer the latest version. Here is how to set up the official Workbench repository and install Workbench from it. - -#### Debian-based Desktop (Debia, Ubuntu, Mint): #### - -Go to the [official website][5]. Download and install the DEB file for the repository. Choose one that matches with your environment. - -For example, on Ubuntu 14.10: - - $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.4-2ubuntu14.10_all.deb - $ sudo dpkg -i mysql-apt-config_0.3.4-2ubuntu14.10_all.deb - -on Debian 7: - - $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.3-1debian7_all.deb - $ sudo dpkg -i mysql-apt-config_0.3.3-1debian7_all.deb - -When installing the DEB file, you will see the following package configuration menu, and be asked to choose MySQL product to configure. - -![](https://farm8.staticflickr.com/7702/16928715218_b1fcbcdbf3_c.jpg) - -Choose "Utilities". Once you are done with configuration, choose "Apply" to save it. - -Finally, update package index, and install Workbench. - - $ sudo apt-get update - $ sudo apt-get install mysql-workbench - -#### Red Hat-based Desktop (CentOS, Fedora, RHEL): #### - -Go to the [official website][6]. Download and install the RPM repository package for your Linux evironment. - -For example, on CentOS 7: - - $ wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm - $ sudo yum localinstall mysql-community-release-el7-5.noarch.rpm - -on Fedora 21: - - $ wget http://dev.mysql.com/get/mysql-community-release-fc21-6.noarch.rpm - $ sudo yum localinstall mysql-community-release-fc21-6.noarch.rpm - -Verify that "MySQL Tools Community" repository has been set up. - - $ yum repolis enabled - -![](https://farm9.staticflickr.com/8826/16494069254_15458ace52_c.jpg) - -Go ahead and install Workbench. - - $ sudo yum install mysql-workbench-community - -### Set up a Secure Remote Database Connection ### - -The next step is to set up a remote connection to your MySQL server running on a VPS. Of course you can connect directly to the remote MySQL server from Workbench GUI (after [enabling remote access][7] in the database server). However, it is a huge security risk to do so, as someone can easily eavesdrop on database access traffic, and a publicly-open MySQL port can be another attack vector. - -A better approach is to disable remote access of MySQL server (i.e., only allow access from 127.0.0.1 of a VPS). Then set up an SSH tunnel between a local client machine and a remote VPS, so that MySQL traffic can be securely relayed via their loopback interfaces. Compared to setting up SSL-based encrypted connections, configuring SSH tunneling requires little effort as it only requires SSH server, which is already deployed on most VPS instances. - -Let's see how we can set up an SSH tunnel for MySQL Workbench. - -In this setup, you don't need to enable remote access of a MySQL server. - -On a local client host where MySQL Workbench will be running, type the following command. Replace 'user' and 'remote_vps' with your own info. - - $ ssh user@remote_vps -L 3306:127.0.0.1:3306 -N - -You will be asked to type an SSH password for your VPS. Once you successfully log in to the VPS, an SSH tunnel will be established between port 3306 of local host and port 3306 of a remote VPS. Note that you won't see any message in the foreground. - -Optionally, you can set the SSH tunnel running in the background. For that, press Ctrl+Z to stop the command, type bg and press ENTER. - -![](https://farm8.staticflickr.com/7714/16928715438_bf0db49b3b_c.jpg) - -The SSH tunnel will now be running in the background. - -### Manage a Remote MySQL Server with MySQL Workbench ### - -With an SSH tunnel established, you are ready to connect to a remote MySQL server from MySQL Workbench. - -Launch Workbench by typing: - - $ mysql-workbench - -![](https://farm9.staticflickr.com/8768/16494069294_0fce571ddb_c.jpg) - -Click on the plus icon at the top of the Workbench screen to create a new database connection. Fill in connection information as follows. - -- **Connection Name**: any description (e.g., My remote VPS database) -- **Hostname**: 127.0.0.1 -- **Port**: 3306 -- **Username**: MySQL username (e.g., root) - -![](https://farm8.staticflickr.com/7727/16928715288_d9ac3bfc7a_c.jpg) - -Note that since the tunnel's local endpoint is 127.0.0.1:3306, the hostname field must be 127.0.0.1, not the IP address/hostname of a remote VPS. - -Once you set up a new database connection, you will see a new box for the connection appear on Workbench window. Click on the box to actually establish a connection to a remote MySQL server. - -![](https://farm8.staticflickr.com/7650/17114969532_0252ffcd31_c.jpg) - -Once you are logged in to the MySQL server, you will see various administrative tasks in the left-side panel. Let's review some of common administrative tasks. - -#### MySQL Server Status #### - -This menus shows real-time dashboard of database server resource usage (e.g., traffic, connections, read/write). - -![](https://farm8.staticflickr.com/7627/16494069414_9d838d4138_c.jpg) - -#### Client Connections #### - -The total number of client connections is a critical resource to monitor. This menu shows detailed information of individual client connections. - -![](https://farm9.staticflickr.com/8747/16909119337_a8d89772dd_c.jpg) - -#### Users and Privileges #### - -This menu allows you to manage MySQL users, including their resource limits and privileges. - -![](https://farm9.staticflickr.com/8765/16494069384_760fc17c8f_c.jpg) - -#### MySQL Server Administration #### - -You can start or stop a MySQL server, and examine its server logs. - -![](https://farm8.staticflickr.com/7588/17114969592_54526dfb32_c.jpg) - -#### Database Schema Management #### - -You can view, change or inspect database schema visually. For that, choose and right-click on any database or table under "Schemas" heading. - -![](https://farm8.staticflickr.com/7665/16496363973_fd03a96198_c.jpg) - -![](https://farm9.staticflickr.com/8744/16909119497_7c884617b8_c.jpg) - -#### Database Query #### - -You can execute any arbitrary query (as long as your login privilege allows), and inspect its result. - -![](https://farm8.staticflickr.com/7716/17114969692_c0f02bb277_c.jpg) - -Note that performance statistics and reports are available for MySQL server 5.6 and higher. For 5.5 and lower, the performance section will be grayed out. - -### Conclusion ### - -The clean and intuitive tabbed interface, comprehensive feature sets, and open-source licensing make MySQL Workbench one of the best visual database design and administration tools out there. One known downside of Workbench is its performance. I notice that Workbench sometimes gets sluggish while running queries on a busy server. Despite its less than stellar performance, I still consider MySQL Workbench an essential tool for any professional MySQL database administrator and designer. - -Have you ever used Workbench in your work environment? Or do you recommend any other GUI tool? Feel free to share your experience. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/remote-mysql-databases-gui-tool.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/go/digitalocean -[2]:http://ask.xmodulo.com/install-phpmyadmin-centos.html -[3]:http://xmodulo.com/set-web-based-database-management-system-adminer.html -[4]:http://mysqlworkbench.org/ -[5]:http://dev.mysql.com/downloads/repo/apt/ -[6]:http://dev.mysql.com/downloads/repo/yum/ -[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html diff --git a/translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool b/translated/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md similarity index 100% rename from translated/tech/How to manage remote MySQL databases on Linux VPS using a GUI tool rename to translated/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md From 61e24d736b32f00557829834bb9582ff47fb8866 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 21 Apr 2015 23:15:36 +0800 Subject: [PATCH 0598/2517] PUB:20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs @ictlyh --- ...om Elrepo or Source on Ubuntu or CentOs.md | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) rename {translated/tech => published}/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md (69%) diff --git a/translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/published/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md similarity index 69% rename from translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md rename to published/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md index a597b31c91..1921514d8e 100644 --- a/translated/tech/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md +++ b/published/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md @@ -1,20 +1,20 @@ -如何从Elrepo/源 在Ubuntu/CentOS上安装Linux内核4.0 +如何在Ubuntu/CentOS上安装Linux内核4.0 ================================================================================ -大家好,今天我们学习一下如何从Elrepo或者编译源码安装最新的Linux内核4.0。昵称为‘Hurr durr I’m a sheep’的Linux内核4.0是目前为止最新的主干内核。是稳定版3.19.4后发布的内核。Linux Torvalds声明了Linux内核4.0的发布以及可及时提供,4月12日被认为是所有开源运动爱好者的重大日子。由于包括了一些很棒的功能,例如无重启补丁(实时补丁),新的升级驱动,最新的硬件支持以及很多有趣的功能都有新的版本,它被认为是一次重大发布。但是内核4.0并不认为是期望中的重大发布,Linus表示期望4.1是一个更大的发布。实时补丁功能已经集成到了SUSE企业版Linux操作系统上。你可以在[发布公告][1]上查看关于这次发布的更多详细内容。 +大家好,今天我们学习一下如何从Elrepo或者源代码来安装最新的Linux内核4.0。代号为‘Hurr durr I'm a sheep’的Linux内核4.0是目前为止最新的主干内核。它是稳定版3.19.4之后发布的内核。4月12日是所有的开源运动爱好者的大日子,Linux Torvalds宣布了Linux内核4.0的发布,它现在就已经可用了。由于包括了一些很棒的功能,例如无重启补丁(实时补丁),新的升级驱动,最新的硬件支持以及很多有趣的功能都有新的版本,它原本被期望是一次重要版本。但是实际上内核4.0并不认为是期望中的重要版本,Linus 表示期望4.1会是一个更重要的版本。实时补丁功能已经集成到了SUSE企业版Linux操作系统上。你可以在[发布公告][1]上查看关于这次发布的更多详细内容。 > **警告**: 安装新的内核可能会导致你的系统不可用或不稳定。如果你仍然使用以下命令继续安装,请确保备份所有重要数据到外部硬盘。 ### 在Ubuntu 15.04上安装Linux内核4.0 ### -如果你正在使用Linux的发行版Ubuntu 15.04,你可以直接通过Ubuntu内核网站安装。在你的Ubuntu15.04上安装最新的Linux内核4.0,你需要在shell或终端中在root访问权限下运行一下命令。 +如果你正在使用Linux的发行版Ubuntu 15.04,你可以直接通过Ubuntu内核网站安装。在你的Ubuntu15.04上安装最新的Linux内核4.0,你需要在shell或终端中在root访问权限下运行以下命令。 -#### 在 64-bit Ubuntu 15.04 #### +#### 在 64位 Ubuntu 15.04 #### $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb -#### 在 32-bit Ubuntu 15.04 #### +#### 在 32位 Ubuntu 15.04 #### $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_i386.deb @@ -27,7 +27,7 @@ 1. 从Elrepo软件仓库安装 1. 从源代码编译安装 -由于是最简单的方式,我们首先用ElRepo安装。 +我们首先用ElRepo安装,这是最简单的方式: #### 使用 Elrepo 安装 #### @@ -44,7 +44,7 @@ **2. 升级Linux内核到4.0版本** -现在,我们打算从ELRepo软件仓库安装最新的稳定版内核4.0。做这些,我们需要在CentOS 7的shell或者终端中输入以下命令。 +现在,我们准备从ELRepo软件仓库安装最新的稳定版内核4.0。安装它我们需要在CentOS 7的shell或者终端中输入以下命令。 # yum --enablerepo=elrepo-kernel install kernel-ml @@ -58,7 +58,7 @@ **1. 安装依赖软件** -首先我们需要为编译linux内核安装依赖的软件。做这些,我们需要在一个终端或者shell中运行以下命令。 +首先我们需要为编译linux内核安装依赖的软件。要完成这些,我们需要在一个终端或者shell中运行以下命令。 # yum groupinstall "Development Tools" @@ -72,7 +72,7 @@ **2. 下载源代码** -现在我们通过wget命令从Linux内核官方仓库中下载最新发布的linux内核4.0的源代码。你也可以使用你的浏览器直接从[kernel.org][3]网站下载内核。 +现在我们通过wget命令从Linux内核的官方仓库中下载最新发布的linux内核4.0的源代码。你也可以使用你的浏览器直接从[kernel.org][3]网站下载内核。 # cd /tmp/ # wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.0.tar.xz @@ -90,7 +90,7 @@ **4. 配置** -我们要配置Linux内核的两个选项。我们可以创建一个新的自定义配置文件或者使用旧的配置文件来构建和安装Linux内核。这都取决于你自己的想法。 +配置Linux内核有两种选择的。我们可以创建一个新的自定义配置文件或者使用已有的配置文件来构建和安装Linux内核。这都取决于你自己的需要。 **配置新的内核** @@ -100,23 +100,25 @@ ![配置新内核](http://blog.linoxide.com/wp-content/uploads/2015/04/configuring-new-kernel-config.png) -**旧的配置** +**已有的配置** + +如果你想用已有的配置文件配置你最新的内核,那就输入下面的命令。如果你对配置有任何调整,你可以选择Y或者N,或者仅仅是按Enter键继续。 -如果你想用旧的配置文件配置你最新的内核,那就输入下面的命令。如果对你有任何提问,你可以选择Y或者N,或者仅仅是按Enter键继续。 # make oldconfig #### Step 5. 编译Linux内核 #### 下一步,我们会执行make命令来编译内核4.0。取决于你的系统配置,编译至少需要20-30分钟。 -注:如果编译内核的时候出现bc command not found的错误,你可以用**yum install bc**命令安装bc修复这个错误。 +注:如果编译内核的时候出现`bc command not found`的错误,你可以用**yum install bc**命令安装bc修复这个错误。 # make + ![Make 内核](http://blog.linoxide.com/wp-content/uploads/2015/04/make-kernel.png) #### 6. 安装Linux内核4.0 #### -编译完成后,我们终于要在你的Linux系统上安装**内核**了。下面的命令会在/boot目录下创建文件并且在Grub Menu中新建一个内核条目。 +编译完成后,我们终于要在你的Linux系统上安装**内核**了。下面的命令会在/boot目录下创建文件并且在Grub 菜单中新建一个内核条目。 # make modules_install install @@ -136,11 +138,11 @@ via: http://linoxide.com/how-tos/install-linux-kernel-4-0-elrepo-source/ 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:http://lkml.iu.edu/hypermail/linux/kernel/1504.1/03198.html +[1]:http://linux.cn/article-5259-1.html [2]:http://elrepo.org/tiki/SecureBootKey [3]:http://kernel.org/ \ No newline at end of file From 46ee18fccb11ba3cc865cbbf5e6cd56da0a89a8b Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 22 Apr 2015 09:53:56 +0800 Subject: [PATCH 0599/2517] [Translating] tech/20150417 How to Configure MariaDB Replication on CentOS Linux --- ...50417 How to Configure MariaDB Replication on CentOS Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md b/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md index a5a717cf46..76073ebc90 100644 --- a/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md +++ b/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to Configure MariaDB Replication on CentOS Linux ================================================================================ Its a process of creating duplicate versions of a the DB. Replication process is not only copies a database, but also synchronizes changes from master to one of the slaves. But this is does not means that slave databases are identical copy of the master, because replication can be configured that only a schema of tables or columns or rows will be replicated, i.e. a partial replication. The replication ensures that those specific configured objects are kept in sync between the different databases. From 39d2f12b1187f3747276282c856a529e908aafca Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 22 Apr 2015 11:03:53 +0800 Subject: [PATCH 0600/2517] Translating by ZTinoZ --- ... FAQs with Answers--How to disable IPv6 on Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md index 5d5c961a17..af932ba1a5 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -6,13 +6,13 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 理想情况下,[向IPv6过渡的进程][1]不应该被最终的用户所看见,但是IPv4/IPv6混合环境有时会让你碰到各种源于IPv4和IPv6之间不经意间的相互作用的问题。举个例子,你会碰到应用程序超时的问题比如apt-get或ssh尝试通过IPv6连接失败、DNS服务器意外清空了IPv6的AAAA记录、或者你支持IPv6的设备不兼容你的互联网服务提供商遗留下的IPv4网络等等等等。 -当然这不意味着你应该Of course this doesn't mean that you should blindly disable IPv6 on you Linux box. With all the benefits promised by IPv6, we as a society want to fully embrace it eventually, but as part of troubleshooting process for end-user experienced hiccups, you may try turning off IPv6 to see if indeed IPv6 is a culprit. +当然这不意味着你应该盲目地在你的Linux机器上禁用IPv6。鉴于IPv6许诺的种种好处,作为社会的一份子我们最终还是要充分拥抱它的,但是作为给最终用户进行故障排除过程的一部分,如果IPv6确实是罪魁祸首那你可以尝试去关闭它。 -Here are a few techniques allowing you to disable IPv6 partially (e.g., for a certain network interface) or completely on Linux. These tips should be applicable to all major Linux distributions including Ubuntu, Debian, Linux Mint, CentOS, Fedora, RHEL, and Arch Linux. +这里有一些让你在Linux中部分或全部禁用IPv6的小技巧(例如:为一个已经确定的网络接口)。这些小贴士应该适用于所有主流的Linux发行版包括Ubuntu、Debian、Linux Mint、CentOS、Fedora、RHEL以及Arch Linux。 -### Check if IPv6 is Enabled on Linux ### +### 查看IPv6在Linux中是否被启用 ### -All modern Linux distributions have IPv6 automatically enabled by default. To see IPv6 is activated on your Linux, use ifconfig or ip commands. If you see "inet6" in the output of these commands, this means your Linux has IPv6 enabled. +所有现代Linux发行版默认都自动启用IPv6。为了能看到IPv6在你的Linux中是否被激活,可以使用ifconfig或ip命令。如果你在输入这些命令之后看到"inet6"字样的输出,那就意味着你的Linux系统启用了IPv6。 $ ifconfig @@ -22,7 +22,7 @@ All modern Linux distributions have IPv6 automatically enabled by default. To se ![](https://farm8.staticflickr.com/7290/16415082248_c4e075548b_c.jpg) -### Disable IPv6 Temporarily ### +### 临时禁用IPv6 ### If you want to turn off IPv6 temporarily on your Linux system, you can use /proc file system. By "temporarily", we mean that the change we make to disable IPv6 will not be preserved across reboots. IPv6 will be enabled back again after you reboot your Linux box. From 817ed60c274576b48df716dbeb4ffbcfcb276c9a Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 22 Apr 2015 12:05:24 +0800 Subject: [PATCH 0601/2517] Translating by ZTinoZ --- ... FAQs with Answers--How to disable IPv6 on Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md index af932ba1a5..69eb64d6d7 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -24,23 +24,23 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 ### 临时禁用IPv6 ### -If you want to turn off IPv6 temporarily on your Linux system, you can use /proc file system. By "temporarily", we mean that the change we make to disable IPv6 will not be preserved across reboots. IPv6 will be enabled back again after you reboot your Linux box. +如果你想要在你的Linux系统上临时关闭IPv6,你可以用 /proc 文件系统。"临时",意思是我们所做的禁用IPv6的更改在系统重启后将不被保存。IPv6会在你的Linux机器重启后再次被启用。 -To disable IPv6 for a particular network interface, use the following command. +要将一个特定的网络接口禁用IPv6,使用以下命令: $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf//disable_ipv6' -For example, to disable IPv6 for eth0 interface: +举个例子,将eth0接口禁用IPv6: $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/eth0/disable_ipv6' ![](https://farm8.staticflickr.com/7288/15982511863_0c1feafe7f_b.jpg) -To enable IPv6 back on eth0 interface: +重新启用eth0接口的IPv6: $ sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/eth0/disable_ipv6' -If you want to disable IPv6 system-wide for all interfaces including loopback interface, use this command: +如果你想要将整个系统所有接口包括回环接口禁用IPv6,使用以下命令: $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' From 6d26d9256329ffdc518f343e0d168af420859201 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 22 Apr 2015 13:43:27 +0800 Subject: [PATCH 0602/2517] [Translated] tech/20150417 How to Configure MariaDB Replication on CentOS Linux --- ...ure MariaDB Replication on CentOS Linux.md | 157 +++++++++--------- 1 file changed, 78 insertions(+), 79 deletions(-) rename {sources => translated}/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md (57%) diff --git a/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md b/translated/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md similarity index 57% rename from sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md rename to translated/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md index 76073ebc90..ca27084edf 100644 --- a/sources/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md +++ b/translated/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md @@ -1,64 +1,63 @@ -Translating by ictlyh -How to Configure MariaDB Replication on CentOS Linux +如何在 CentOS Linux 中配置 MariADB 复制 ================================================================================ -Its a process of creating duplicate versions of a the DB. Replication process is not only copies a database, but also synchronizes changes from master to one of the slaves. But this is does not means that slave databases are identical copy of the master, because replication can be configured that only a schema of tables or columns or rows will be replicated, i.e. a partial replication. The replication ensures that those specific configured objects are kept in sync between the different databases. +这是一个创建数据库重复版本的过程。复制过程不仅仅是复制一个数据库,同时也包括从主节点到一个从节点的更改同步。但这并不意味着从数据库就是和主数据库完全相同的副本,因为复制可以配置为只有表或者行或者列的一个模式将被复制,例如,局部复制。复制保证了特定的配置对象在不同的数据库之间保持同步。 -### Mariadb Replication Concepts ### +### Mariadb 复制概念 ### -**Backups** : Replication can be used for DB backups. For example, you have master -> slave replication. If master is lost (hdd fails, for example) you can restore your db from master. +**备份** :复制可以用来进行数据库备份。例如,你有主->从复制。如果主节点丢失(比如hdd损坏),你可以从从节点中恢复你的数据库。 -**Scaling** : You can use master -> slave replication for scaling solution. For example, if you have a few big and have SQL query, using replcation you can separate this queries for each replcations nodes. Write SQL should be performed only on master, for read-only queries slave server can be used. +**扩展** :你可以使用主->从复制作为扩展的解决方案。例如,如果你有一些大的数据库以及SQL查询,使用复制你可以将这些查询单独分到每个复制节点。写SQL应该只在主节点进行,而只读查询可以在从节点上进行。 -**Spreading solution** : You can use replication for distribution. For example, you can distribute different sales data to different databases. +**传播解决方案** :你可以用复制来进行分发。例如,你可以将不同的销售数据分发到不同的数据库。 -**Failover solution** : For example you have, master -> slave(1) -> slave(2) -> slave(3) replication. You can write script for master monitoring , if master fails, script can quickly change slave(1) new for master master -> slave(1) -> slave(2) and your application will continue working whit out downtime +**故障解决方案** : 假如你有主节点->从节点1->从节点2->从节点3的复制。你可以为主节点写脚本监控,如果主节点出故障了,脚本可以快速的将从节点1作为新的主节点,有主节点->从节点1->从节点2,你的应用可以继续工作而不会停机。 -### Simple diagrammatic demonstration of replication ### +### 复制的简单图解示范 ### -![mysql replication principle](http://blog.linoxide.com/wp-content/uploads/2015/04/mysql-replication-principle.png) +![mysql 复制原理](http://blog.linoxide.com/wp-content/uploads/2015/04/mysql-replication-principle.png) -Before you start good know what is **binary log** and Ibdata1. The binary log contains a record about all changes in the db, data and structure, as well as how long each statement took to execute. Bin log consists set log files and an index. Its means that main SQL statements such as CREATE, ALTER, INSERT, UPDATE and DELETE will be putted to this log, statements, such as SELECT will not be logged. These info can be logged to general query.log file. In simple **Ibdata1** is a file which contains all tables and all info about db. +开始之前,你应该知道什么是**二进制日志文件**以及 Ibdata1。二进制日志文件中包括关于数据库,数据和结构的所有更改的记录,以及每条语句的执行时间。二进制日志文件包括设置日志文件和一个索引。这意味着主要的SQL语句,例如CREATE, ALTER, INSERT, UPDATE 和 DELETE 会放到这个日志文件中,而例如SELECT语句就不会被记录。这些信息可以被记录到普通的query.log文件。简单的说 **Ibdata1** 是一个包括所有表和所有数据库信息的文件。 -### Master server configuration ### +### 主服务器配置 ### -Good to have server updated +首先升级服务器 sudo yum install update -y && sudo yum install upgrade -y -We are working on centos 7 server +我们工作在centos7 服务器上 sudo cat /etc/redhat-release CentOS Linux release 7.0.1406 (Core) -Install MariaDB +安装 MariaDB sudo yum install mariadb-server -y -Start MariaDB and enable it to start on boot of the server +启动 MariaDB 并启用随服务器启动 sudo systemctl start mariadb.service sudo systemctl enable mariadb.service -Output: +输出: ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service' -Check MariaDB status +检查 MariaDB 状态 sudo service mariadb status -or use +或者使用 sudo systemctl is-active mariadb.service -Output: +输出: Redirecting to /bin/systemctl status mariadb.service mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled) -Set MariaDB password +设置 MariaDB 密码 mysql -u root mysql> use mysql; @@ -66,35 +65,35 @@ Set MariaDB password mysql> flush privileges; mysql> exit -SOME_ROOT_PASSWORD - your root password. I my case I'ill use "q" - password, then try to login: +SOME_ROOT_PASSWORD - 你的 root 密码。 例如我用"q"作为密码,然后尝试登陆: sudo mysql -u root -pSOME_ROOT_PASSWORD -Output: +输出: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 5 Server version: 5.5.41-MariaDB MariaDB Server Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others. -Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. +输入 'help;' 或 '\h' 查看帮助信息。 输入 '\c' 清空当前输入语句。 -Lets create database with table with some data +让我们创建包括一些数据的表的数据库 -Create database/schema +创建数据库/模式 sudo mysql -u root -pSOME_ROOT_PASSWORD mysql> create database test_repl; -Where: +其中: - test_repl - Name of shcema which will be replicated + test_repl - 将要被复制的模式的名字 -Output: +输出: Query OK, 1 row affected (0.00 sec) -Create Persons table +创建 Persons 表 mysql> use test_repl; @@ -106,7 +105,7 @@ Create Persons table City varchar(255) ); -Output: +输出: mysql> MariaDB [test_repl]> CREATE TABLE Persons ( -> PersonID int, @@ -117,7 +116,7 @@ Output: -> ); Query OK, 0 rows affected (0.01 sec) -Insert some data +插入一些数据 mysql> INSERT INTO Persons VALUES (1, "LastName1", "FirstName1", "Address1", "City1"); mysql> INSERT INTO Persons VALUES (2, "LastName2", "FirstName2", "Address2", "City2"); @@ -125,15 +124,15 @@ Insert some data mysql> INSERT INTO Persons VALUES (4, "LastName4", "FirstName4", "Address4", "City4"); mysql> INSERT INTO Persons VALUES (5, "LastName5", "FirstName5", "Address5", "City5"); -Output: +输出: Query OK, 5 row affected (0.00 sec) -Check data +检查数据 mysql> select * from Persons; -Output: +输出: +----------+-----------+------------+----------+-------+ | PersonID | LastName | FirstName | Address | City | @@ -146,13 +145,13 @@ Output: | 5 | LastName5 | FirstName5 | Address5 | City5 | +----------+-----------+------------+----------+-------+ -### Configure MariaDB for replication ### +### 配置 MariaDB 重复 ### -You'll need to edit the my.cnf file on the Master server to enable binary logging and set the server's id. I will use vi text editor, but use can use any suitable for your such as nano, joe etc. +你需要在主结点服务器上编辑 my.cnf文件来启用二进制日志以及设置服务器id。我会使用vi文本编辑器,但你可以使用任何你喜欢的,例如nano,joe。 sudo vi /etc/my.cnf -and put to config in [mysqld] section such lines. +将下面的一些行写到[mysqld]部分。 log-basename=master @@ -160,21 +159,21 @@ and put to config in [mysqld] section such lines. binlog-format=row server_id=1 -Output: +输出: -![mariadb config master](http://blog.linoxide.com/wp-content/uploads/2015/04/mariadb-config.png) +![mariadb 配置主节点](http://blog.linoxide.com/wp-content/uploads/2015/04/mariadb-config.png) -Then restart MariaDB: +然后重启 MariaDB: sudo service mariadb restart -Login to MariaDB and check binary logs: +登录到 MariaDB 并查看二进制日志文件: sudo mysql -u root -pq test_repl mysql> SHOW MASTER STATUS; -Output: +输出: +--------------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | @@ -182,23 +181,23 @@ Output: | mariadb-bin.000002 | 3913 | | | +--------------------+----------+--------------+------------------+ -**Remember** : "File" and "Position" values. YOU WILL NEED THIS VALUE AT SLAVE SERVER +**记住** : "File" 和 "Position" 的值。在从节点中你需要使用这些值 -Create user for replication +创建用来重复的用户 mysql> GRANT REPLICATION SLAVE ON *.* TO replication_user IDENTIFIED BY 'bigs3cret' WITH GRANT OPTION; mysql> flush privileges; -Output: +输出: Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) -Check user in db +在数据库中检查用户 mysql> select * from mysql.user WHERE user="replication_user"\G; -Output: +输出: mysql> select * from mysql.user WHERE user="replication_user"\G; *************************** 1. row *************************** @@ -208,38 +207,38 @@ Output: Select_priv: N ..... -Create DB dump (snapshot of all data which will be replicated) form master +从主节点创建 DB dump (将要被复制的所有数据的快照) mysqldump -uroot -pSOME_ROOT_PASSWORD test_repl > full-dump.sql -Where: +其中: - SOME_ROOT_PASSWORD - password for root user that you have setup - test_repl - name of the data base which will be replicated; + SOME_ROOT_PASSWORD - 你设置的root用户的密码 + test_repl - 将要复制的数据库的名称; -You need to recover mysql dump (full-dump.sql) at slave server. Its needed for replication. +你需要在从节点中恢复 mysql dump (full-dump.sql)。重复需要这个。 -### Slave server configuration ### +### 从节点配置 ### -All this commands you need to perform at slave server +所有这些命令需要在从节点中进行 -Lets assume that we have fresh/updated CentOS 7.x server with latest mariaDB server and you can login as root to maria DB server (this was descripbed in first part of the article) +假设我们已经更新/升级了包括有最新的MariaDB服务器的 CentOS 7.x,而且你可以用root账号登陆到MariaDBs服务器(这在这篇文章的第一部分已经介绍过) -Login to Maria DB console and create DB +登陆到Maria 数据库控制台并创建数据库 mysql -u root -pSOME_ROOT_PASSWORD; mysql> create database test_repl; mysql> exit; -Recover data from master at slave server +在从节点恢复主节点的数据 mysql -u root -pSOME_ROOT_PASSWORD test_repl < full-dump.sql -Where: +其中: -full-dump.sql - its DB Dump that you have create at test server. +full-dump.sql - 你在测试服务器中创建的DB Dump。 -Login to Maria DB and setup replication +登录到Maria 数据库并启用复制 mysql> CHANGE MASTER TO MASTER_HOST='82.196.5.39', @@ -250,30 +249,30 @@ Login to Maria DB and setup replication MASTER_LOG_POS=3913, MASTER_CONNECT_RETRY=10; -![mariadb setup replication](http://blog.linoxide.com/wp-content/uploads/2015/04/setup-replication.png) +![mariadb 启用复制](http://blog.linoxide.com/wp-content/uploads/2015/04/setup-replication.png) -Where: +其中: - MASTER_HOST - IP of the master server. - MASTER_USER - replication user at master server - MASTER_PASSWORD - replication user password - MASTER_PORT - mysql port at master - MASTER_LOG_FILE - bin-log file name form master - MASTER_LOG_POS - bin-log position file at master + MASTER_HOST - 主节点服务器的IP + MASTER_USER - 主节点服务器中的复制用户 + MASTER_PASSWORD - 复制用户密码 + MASTER_PORT - 主节点中的mysql端口 + MASTER_LOG_FILE - 主节点中的二进制日志文件名称 + MASTER_LOG_POS - 主节点中的二进制日志文件位置 -Start slave mode +开启从节点模式 mysql> slave start; -Output: +输出: Query OK, 0 rows affected (0.00 sec) -Check slave status +检查从节点状态 mysql> show slave status\G; -Output: +输出: *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event @@ -318,11 +317,11 @@ Output: Master_Server_Id: 1 1 row in set (0.00 sec) -At this step all shoul be ok, and not erros should be here. +到这里所有步骤都应该没问题,也不应该出现错误。 -### Test the replication ### +### 测试复制 ### -At MAIN/MASTER server add some entities to DB +在主节点服务器中添加一些条目到数据库 mysql -u root -pSOME_ROOT_PASSWORD test_repl @@ -330,7 +329,7 @@ At MAIN/MASTER server add some entities to DB mysql> INSERT INTO Persons VALUES (7, "LastName7", "FirstName7", "Address7", "City7"); mysql> INSERT INTO Persons VALUES (8, "LastName8", "FirstName8", "Address8", "City8"); -Then go to the SLAVE server and check replicated data +到从节点服务器中查看复制数据 mysql -u root -pSOME_ROOT_PASSWORD test_repl @@ -345,14 +344,14 @@ Then go to the SLAVE server and check replicated data | 8 | LastName8 | FirstName8 | Address8 | City8 | +----------+-----------+------------+----------+-------+ -You can see the data is replicated to slave server. Its mean that replication is working. Hope you enjoyed the article. Let us know if you have any questions. +你可以看到数据已经被复制到从节点。这意味着复制能正常工作。希望你能喜欢这篇文章。如果你有任何问题请告诉我们。 -------------------------------------------------------------------------------- via: http://linoxide.com/how-tos/configure-mariadb-replication-centos-linux/ 作者:[Bobbin Zachariah][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](https://github.com/ictlyh) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ebd8904d56a4a5022b0608b45f24eb85411f16f3 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 22 Apr 2015 15:00:16 +0800 Subject: [PATCH 0603/2517] Translating by ZTinoZ --- ...h Answers--How to disable IPv6 on Linux.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md index 69eb64d6d7..84da819899 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md +++ b/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -44,30 +44,30 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 $ sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' -### Disable IPv6 Permanently across Reboots ### +### 永久禁用IPv6 ### -The above method does not permanently disable IPv6 across reboots. IPv6 will be activated again once you reboot your system. If you want to turn off IPv6 for good, there are several ways you can do it. +以上方法是不能永久禁用IPv6的,你一旦重启系统IPv6还是会被启用。如果你想要永久关闭它,有几个方法你可以试试。 -#### Method One #### +#### 方法一 #### -The first method is to apply the above /proc changes persistently in /etc/sysctl.conf file. +第一种方法是请求以上提到的 /proc 对 /etc/sysctl.conf 文件进行修改。 -That is, open /etc/sysctl.conf with a text editor, and add the following lines. +换句话说,就是用文本编辑器打开 /etc/sysctl.conf 然后添加以下内容: - # to disable IPv6 on all interfaces system wide + # 禁用整个系统所有接口的IPv6 net.ipv6.conf.all.disable_ipv6 = 1 - # to disable IPv6 on a specific interface (e.g., eth0, lo) + # 禁用某一个指定接口的IPv6(例如:eth0, lo) net.ipv6.conf.lo.disable_ipv6 = 1 net.ipv6.conf.eth0.disable_ipv6 = 1 -To activate these changes in /etc/sysctl.conf, run: +在 /etc/sysctl.conf 使这些更改生效,运行以下命令: $ sudo sysctl -p /etc/sysctl.conf -or simply reboot. +或者直接重启。 -#### Method Two #### +#### 方法二 #### An alternative way to disable IPv6 permanently is to pass a necessary kernel parameter via GRUB/GRUB2 during boot time. From d1de6b25bb3f2f9193c6e2dd02089374c95238f6 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Wed, 22 Apr 2015 16:19:31 +0800 Subject: [PATCH 0604/2517] translating wi-cuckoo --- .../20150417 How to Install Discourse in a Docker Container.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150417 How to Install Discourse in a Docker Container.md b/sources/tech/20150417 How to Install Discourse in a Docker Container.md index c916bda8f2..adedf08faa 100644 --- a/sources/tech/20150417 How to Install Discourse in a Docker Container.md +++ b/sources/tech/20150417 How to Install Discourse in a Docker Container.md @@ -1,3 +1,4 @@ +translating wi-cuckoo How to Install Discourse in a Docker Container ================================================================================ Hi all, today we'll learn how to install Discourse using Docker Platform. Discourse is the 100% open source discussion platform built for the next decade of the Internet featuring as a mailing list, a discussion forum and a long-form chat room. It is a smart way of attempt to reimagine what a modern, sustainable, fully open-source Internet discussion platform should be today, both from a technology standpoint and a sociology standpoint. Discourse is simple, clean, and straightforward way for discussion. It is really an awesome platform for any kinds of discussions on internet featuring such a cool services out of the box. Docker is an open source platform that provides an open platform to pack, ship and run any application as a lightweight container. Docker containers makes Discourse a lot handy and easy to setup app. @@ -157,4 +158,4 @@ via: http://linoxide.com/how-tos/install-discourse-docker-container/ [a]:http://linoxide.com/author/arunp/ [1]:https://mandrillapp.com/ [2]:http://www.mailgun.com/ -[3]:https://www.mailjet.com/pricing \ No newline at end of file +[3]:https://www.mailjet.com/pricing From 60aba61edc0101aeccdbb6530ff06fcc779a5d40 Mon Sep 17 00:00:00 2001 From: VicYu Date: Wed, 22 Apr 2015 23:06:40 +0800 Subject: [PATCH 0605/2517] Translating --- ...--How to compile ixgbe driver on CentOS, RHEL or Fedora.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md b/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md index 972143b392..ac871512e1 100644 --- a/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md +++ b/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md @@ -1,3 +1,5 @@ + Vic020 + Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora ================================================================================ > **Question**: I want to build and install the latest ixgbe 10G NIC driver. How can I compile ixgbe driver on CentOS, Fedora or RHEL? @@ -193,4 +195,4 @@ via: http://ask.xmodulo.com/compile-ixgbe-driver-centos-rhel-fedora.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://ask.xmodulo.com/download-install-ixgbe-driver-ubuntu-debian.html -[2]:http://sourceforge.net/projects/e1000/files/ixgbe%20stable/ \ No newline at end of file +[2]:http://sourceforge.net/projects/e1000/files/ixgbe%20stable/ From 9eacd978d1c95d9920ceac64768a4cc7b13922e0 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Thu, 23 Apr 2015 10:31:08 +0800 Subject: [PATCH 0606/2517] Update 20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md --- ...0420 7 Interesting Linux 'sort' Command Examples--Part 2.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md index 6bb7d8159f..fd6b0f488b 100644 --- a/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md +++ b/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md @@ -1,3 +1,4 @@ +[Dongshuaike translating] 7 Interesting Linux ‘sort’ Command Examples – Part 2 ================================================================================ In our last article we have covered various examples on sort command, if you’ve missed, you can go through it using below link. In continuation to the last post this post aims at covering remaining of sort command so that both the article together serves as complete guide to Linux ‘sort‘ command. @@ -128,4 +129,4 @@ via: http://www.tecmint.com/linux-sort-command-examples/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/sort-command-linux/ \ No newline at end of file +[1]:http://www.tecmint.com/sort-command-linux/ From 3f917014adef05996fdbd81fc9ec523a3bd3120e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 23 Apr 2015 12:53:36 +0800 Subject: [PATCH 0607/2517] [Translating] tech/20150413 A Walk Through Some Important Docker Commands --- .../20150413 A Walk Through Some Important Docker Commands.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150413 A Walk Through Some Important Docker Commands.md b/sources/tech/20150413 A Walk Through Some Important Docker Commands.md index 33f1c02885..074c5b12a7 100644 --- a/sources/tech/20150413 A Walk Through Some Important Docker Commands.md +++ b/sources/tech/20150413 A Walk Through Some Important Docker Commands.md @@ -1,3 +1,4 @@ +Translating by ictlyh A Walk Through Some Important Docker Commands ================================================================================ Hi everyone today we'll learn some important Docker Commands that you'll need to learn before you go with Docker. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. From a37c2ba3b7829148f98084541ab048cc906a8ee1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 23 Apr 2015 15:46:28 +0800 Subject: [PATCH 0608/2517] =?UTF-8?q?20150423-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...mming Languages in to GitHub Since 2012.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md diff --git a/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md new file mode 100644 index 0000000000..82155bb1a6 --- /dev/null +++ b/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md @@ -0,0 +1,32 @@ +The Most Popular Programming Languages in to GitHub Since 2012 +================================================================================ +![](http://www.loggly.com/wp-content/uploads/2015/04/Infographic_Github_popular_languages_Blogheader.png) + +Programming languages are not simply the tools that developers use to create programs or express algorithms. They’re also instruments to code and decode creativity. By observing the history of programming languages, we gain a unique perspective on our quest to find better ways to solve problems, facilitate collaboration, build great products, and reuse the efforts of others. + +About 70% of our customers send application logs to our service, so Loggly is interested in tracking which languages are most popular and which ones are gaining traction among developers. + +Based on the historical [GitHub Archive][1] and [GitHut][2] data starting in 2012, we analyzed the most common developer actions within GitHub and turned it into the infographic you see below. We looked at: + +- The number of active repositories, a useful proxy for the projects that people are working on right now. +- The total number of pushes per language as well as the average number of pushes per repository. These metrics are indicators of the rate of innovation occurring with projects being written in a particular language. +- New forks and open issues per repository, which also show active use and innovation. +- New watchers per repository, an indicator of developer interest. + +### Check out the infographic and let us know what you think! How does your programming language of choice fare among your peers? ### + +![](http://www.loggly.com/wp-content/uploads/2015/04/Most-Popular-Languages-According-to-GitHub-Since-2012-loggly-infographic_v3.png) + +-------------------------------------------------------------------------------- + +via: https://www.loggly.com/blog/the-most-popular-programming-languages-in-to-github-since-2012/ + +作者:[Justin Mares][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.loggly.com/blog/author/guest/ +[1]:https://www.githubarchive.org/ +[2]:http://githut.info/ \ No newline at end of file From 39f4191b1c46c5eae0105016f672090ec71283f3 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 23 Apr 2015 16:29:52 +0800 Subject: [PATCH 0609/2517] [Translating] talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012 --- ...Most Popular Programming Languages in to GitHub Since 2012.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md index 82155bb1a6..6ad6d94d67 100644 --- a/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md +++ b/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md @@ -1,3 +1,4 @@ +Translating by ictlyh The Most Popular Programming Languages in to GitHub Since 2012 ================================================================================ ![](http://www.loggly.com/wp-content/uploads/2015/04/Infographic_Github_popular_languages_Blogheader.png) From 858e15fcfcb3a9803785512dc501f2aff7af7d95 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 23 Apr 2015 16:38:25 +0800 Subject: [PATCH 0610/2517] =?UTF-8?q?21150423-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...cing Game on Linux Just Got Even Better.md | 37 +++ ...me Docker Containers for a Desktop User.md | 237 ++++++++++++++++++ ... Private interface to Internet in Linux.md | 75 ++++++ ... Web Browser and Email Client in Ubuntu.md | 76 ++++++ 4 files changed, 425 insertions(+) create mode 100644 sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md create mode 100644 sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md create mode 100644 sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md create mode 100644 sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md diff --git a/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md b/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md new file mode 100644 index 0000000000..c664676a83 --- /dev/null +++ b/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md @@ -0,0 +1,37 @@ +uperTuxKart 0.9 Released — The Best Racing Game on Linux Just Got Even Better +================================================================================ +**A brand new version of the hugely popular racing game SuperTuxKart has [zipped past the release line][1] to land on download servers. ** + +![Super Tux Kart 0.9 Release Poster](http://1.bp.blogspot.com/-eGXvJu3UVwc/VTVhICZVEtI/AAAAAAAAAf0/iP2bkWDNf_c/s1600/poster-cropped.jpg) +Super Tux Kart 0.9 Release Poster + +SuperTuxKart 0.9 is a huge update over earlier versions, running a hot new engine (awesomely named ‘Antarctica’) under the hood that aims to deliver richer graphical environments , shading and depth of field plus better kart physics. + +The bump in graphics performance necessitates a bump in graphics card requirements, too. SuperTuxKart developers advise would-be racers to will need a device with graphics comparable to (or, ideally, better than) Intel HD Graphics 3000, NVIDIA GeForce 8600 or AMD Radeon HD 3650. + +### Other Changes ### + +Keeping pace alongside the headline visual improvements in SuperTuxKart 0.9 is pair **brand new tracks**, new Karts, new online accounts for keeping track of and sharing badges earned through the **newly introduced achievements system**, and oodles of fixes and artwork tweaks. + +Check out STK 0.9 in all its shader-based glory by hitting play on the official release video below. + +注:youtube 视频 + + +Ubuntu users can grab pre-compiled binaries for the new release from the project website. + +- [Download SuperTuxKart 0.9][2] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/supertuxkart-0-9-released + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://supertuxkart.blogspot.co.uk/2015/04/supertuxkart-09-released.html +[2]:http://supertuxkart.sourceforge.net/Downloads \ No newline at end of file diff --git a/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md b/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md new file mode 100644 index 0000000000..060aeb755d --- /dev/null +++ b/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md @@ -0,0 +1,237 @@ +20 Awesome Docker Containers for a Desktop User +================================================================================ +Greetings to everyone, today we'll list out some awesome Desktop Apps that we can run using Docker Containers in our very own Desktop running Docker. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. It is basically used by the developers, Ops and Engineers as it is easy, fast and handy tool for testing or deploying their products but we can also use Docker for our Desktop usage to run a desktop apps out of the box. + +So here are some awesome 10 Desktop Application Docker images that we can run with Docker. + +### 1. Lynx ### + +Lynx is a all time favorite text-based web browser which is a lot familiar to most of the people running Linux. It is the oldest web browser currently in general use and development. To run Lynx, run the following command. + + $ docker run -it \ + --name lynx \ + jess/lynx + +### 2. Irssi ### + +Irssi is an awesome IRC Client which is based on Text Interface. To run Irssi using docker, we'll need to run the following commands in a docker installed desktop computer. + + docker run -it --name my-irssi -e TERM -u $(id -u):$(id -g) \ + -v $HOME/.irssi:/home/user/.irssi:ro \ + -v /etc/localtime:/etc/localtime:ro \ + irssi + +### 3. Chrome ### + +Chrome is an awesome GUI-based web browser developed by Google and is based on Open Source Project Chromium. Google Chrome is widely used, fast and secure web browser that are very much familiar to most of the people who surf internet. We can run Chrome using docker by running the following command. + + $ docker run -it \ + --net host \ + --cpuset 0 \ + --memory 512mb \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + -v $HOME/Downloads:/root/Downloads \ + -v $HOME/.config/google-chrome/:/data \ + -v /dev/snd:/dev/snd --privileged \ + --name chrome \ + jess/chrome + +### 4. Tor Browser ### + +Tor Browser is a web browser which support anonymous features. It enables us freedom to surf website or services blocked by a particular organization or ISPs. It prevents somebody watching our Internet connection from learning what we do on internet and our exact location. To run Tor Browser, run the following command. + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + -v /dev/snd:/dev/snd --privileged \ + --name tor-browser \ + jess/tor-browser + +### 5. Firefox Browser ### + +Firefox Browser is a free and open source web browser which is developed by Mozilla Foundation. It is run by Gecko and SpiderMonkey engines. Firefox Browser has a lot of new features and is specially known for its performance and security. + + $ docker run -d \ + --name firefox \ + -e DISPLAY=$DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + kennethkl/firefox + +### 6. Rainbow Stream ### + +Rainbow Stream is a terminal based Twitter Client featuring real time tweetstream, compose, search , favorite and much more fun directly from terminal. To run Rainbow Stream, run the following command. + + $ docker run -it \ + -v /etc/localtime:/etc/localtime \ + -v $HOME/.rainbow_oauth:/root/.rainbow_oauth \ + -v $HOME/.rainbow_config.json:/root/.rainbow_config.json \ + --name rainbowstream \ + jess/rainbowstream + +### 7. Gparted ### + +Gparted is an open source software which allows us to partition disks. Now enjoy partitioning from a docker container. To run gparted, we'll need to run the following command. + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + --device /dev/sda:/dev/sda \ # mount the device to partition + --name gparted \ + jess/gparted + +### 8. GIMP Editor ### + +GIMP stands for Gnu Image Manipulation Program which is an awesome tool on Linux for graphics, image editing platform. It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. + + $ docker run -it \ + --rm -e DISPLAY=$DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + jarfil/gimp-git + +### 9. Thunderbird ### + +Thunderbird is also a free and open source email application which is developed and maintained by Mozilla Foundation. It has tons of features that an email application software should have. Thunderbird is really easy to setup and customize. To run Thunderbird in a Docker environment, run the following command. + + $ docker run -d \ + -e DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -u docker \ + -v $HOME/docker-data/thunderbird:/home/docker/.thunderbird/ \ + yantis/thunderbird thunderbird + +### 10. Mutt ### + +Mutt is a text based email client which has bunches of cool features including color support, IMAP, POP3, SMTP support, mail storing support and much more. To run Mutt out of the box using docker, we'll need to run the following command. + + $ docker run -it \ + -v /etc/localtime:/etc/localtime \ + -e GMAIL -e GMAIL_NAME \ + -e GMAIL_PASS -e GMAIL_FROM \ + -v $HOME/.gnupg:/home/user/.gnupg \ + --name mutt \ + jess/mutt + +### 11. Skype ### + +Skype is an instant messaging, video calling software which is not open source but can be run awesome in linux. We can run Skype using Docker Containers too. To run Skype using a docker, run the following command. + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -v /dev/snd:/dev/snd --privileged \ + -e DISPLAY="unix$DISPLAY" \ + tianon/skype + +### 12. Cathode ### + +Cathode is a beautiful fully customizable terminal app with a look inspired by classic computers. We can run Cathode by running the below command. + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + --name cathode \ + jess/1995 + +### 13. LibreOffice ### + +LibreOffice is a powerful office suite which is free and open source and is maintained by The Document Foundation. It has clean interface and is a powerful tools that lets us unleash our creativity and grow our productivity. LibreOffice embeds several applications that make it the most powerful Free & Open Source Office suite on the market. + + $docker run \ + -v $HOME/Documents:/home/libreoffice/Documents:rw \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e uid=$(id -u) -e gid=$(id -g) \ + -e DISPLAY=unix$DISPLAY --name libreoffice \ + chrisdaish/libreoffice + +### 14. Spotify ### + +Spotify gives us instant access to millions of songs from old favorites to the latest hits. To listen our favorite songs using docker, run the following command. + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + -v /dev/snd:/dev/snd --privileged \ + --name spotify \ + jess/spotify + +### 15. Audacity ### + +Audacity is free and open source cross-platform software for recording and editing sounds. Audacity can be used for post-processing of all types of audio, including podcasts by adding effects such as normalization, trimming, and fading in and out. To run Audacity, we'll need to run the following command in a terminal or shell. + + $ docker run --rm \ + -u $(id -u):$(id -g) \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -v /dev/snd:/dev/snd \ + -v "$HOME:$HOME" \ + -w "$HOME" \ + -e DISPLAY="unix$DISPLAY" \ + -e HOME \ + $(find /dev/snd/ -type c | sed 's/^/--device /') \ + knickers/audacity + +### 16. Eclipse ### + +Eclipse is an integrated development environment (IDE). It contains a base workspace and an extensible plug-in system for customizing the environment. It is mostly used to develop Java Based Applications. + + $ docker run -v ~/workspace/:/home/eclipse/workspace/ \ + -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -d leesah/eclipse + +### 17. VLC Media Player ### + +VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols. VLC Media Player is developed and maintained by VideoLAN Organization. To run VLC in docker environment, run the following command. + + $ docker run -v\ + $HOME/Documents:/home/vlc/Documents:rw \ + -v /dev/snd:/dev/snd --privileged \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e uid=$(id -u) -e gid=$(id -g) \ + -e DISPLAY=unix$DISPLAY --name vlc \ + chrisdaish/vlc + +### 18. Vim Editor ### + +Vim is a highly configurable text-based text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems. + + $ docker run -i -t --name my-vim -v ~/:/home/dev/src haron/vim + +### 19. Inkscape ### + +Inkscape is a free and open-source vector graphics editor. It can create, edit vector graphics such as illustrations, diagrams, line arts, charts, logos and even complex paintings. Inkscape's primary vector graphics format is Scalable Vector Graphics (SVG) version 1.1. It can import from or export to several other formats as well but all editing workflow must inevitably occur within the constraints of SVG format. + + $docker build -t rasch/inkscape --rm . + $ docker run --rm -e DISPLAY \ + -u inkscaper + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v $HOME/.Xauthority:/home/inkscaper/.Xauthority \ + --net=host rasch/inkscape + +### 20. Filezilla ### + +Filezilla is a free FTP solution application software. It supports FTP, SFTP, FTPS protocols. It is a powerful file management tool for client side. It is an awesome open source FTP project which is highly reliable and easy to use. + + $ xhost +si:localuser:$(whoami) + $ docker run \ + -d \ + -e DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -u docker \ + -v /:/host \ + -v $HOME/docker-data/filezilla:/home/docker/.config/filezilla/ \ + yantis/filezilla filezilla + +### Conclusion ### + +Running desktop application software using Docker is really an awesome experience. Docker is really an awesome platform for fast and easy development, shipping and deployment of software and packages in any place from home to office to production areas. Running desktop apps with docker is a cool way to try out the apps without really installing it into the host filesystem. So, if you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy with Docker :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/20-docker-containers-desktop-user/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ \ No newline at end of file diff --git a/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md b/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md new file mode 100644 index 0000000000..f5f4eb16a7 --- /dev/null +++ b/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md @@ -0,0 +1,75 @@ +How IP forwarding Helps Connecting Private interface to Internet in Linux +================================================================================ +Hi everyone, today we'll learn about IP forwarding or Packet forwarding from one network interface to another in Linux using iptables. IP forwarding is a concept to make Linux machine to send data from one network to another as a router. So, it can be used as a **router** or a proxy server that can share internet or network connection from one connection to multiple client machines. + +Here are some easy steps to enable IP Forwarding or Network packets forwarding method. + +### 1. Enabling IPv4 Forwarding ### + +First of all, we'll gonna enable IPv4 forwarding in our Linux Operating System. To do that, we'll need to execute the following command in a shell or a terminal under sudo mode. + + $ sudo -s + + # echo 1 > /proc/sys/net/ipv4/ip_forward + +![Temporary IP Forwarding](http://blog.linoxide.com/wp-content/uploads/2015/03/ip-forward-temporary.png) + +**Note: the above command is enables ip forwarding instantly and temporarily until the next reboot. To enable it permanently, we'll need to open /etc/sysctl.conf using our favorite text editor.** + + # nano /etc/sysctl.conf + +Then, add **net.ipv4.ip_forward = 1** into that file or uncomment that line then, we'll need to save and exit that file. + + net.ipv4.ip_forward = 1 + +![Editing Sysctl](http://blog.linoxide.com/wp-content/uploads/2015/03/sysctl-edit.png) + +To enable the changes made run the following command. + + # sysctl -p /etc/sysctl.conf + +![Enabling Sysctl Changes](http://blog.linoxide.com/wp-content/uploads/2015/03/enabling-changes-sysctl.png) + +### 2. Configuring Iptables firewall ### + +We'll need to allow specific (or all of the) packets to traverse our router. Before that, we'll need to know the interface name of the network devices connected with our Linux box. To get the interface name, we can simply run the following command in a terminal or a shell. + + # ifconfig -a + +![Ifconfig](http://blog.linoxide.com/wp-content/uploads/2015/03/ifconfig.png) + +Here, in our box we have eth2 as network interface which is connected to the internet or a network and wlan2 is the interface where we need to forward the network packets from eth2 using iptables. So, to do so, we'll need to run the following command. + + # iptables -A FORWARD -i wlan2 -o eth2 -j ACCEPT + +Note: Please replace wlan2 and eth2 with the device name available in your Linux box. + +Now, we'll need iptables to allow traffic for already established connections as netfilter is a stateless firewall. To do so, we'll need to run the following command. + + # iptables -A FORWARD -i eth2 -o wlan2 -m state --state ESTABLISHED,RELATED -j ACCEPT + +![Forwarding with iptables](http://blog.linoxide.com/wp-content/uploads/2015/03/forwarding-iptables.png) + +### 3. Configuring NAT ### + +Then, at last we'll need to change the source address as eth2 on packets going out to the internet by executing the command below. + + # iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE + +![configuring nat](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-nat.png) + +### Conclusion ### + +Finally, we've successfully configured Packet forwarding from one interface to another interface on our Linux machine having iptables installed as firewall solution. This article enables to connect your private interface to the internet, you don't need bridging the interfaces, you need to route packets coming in on one interface to the other one, thats all. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/firewall/ip-forwarding-connecting-private-interface-internet/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ \ No newline at end of file diff --git a/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md b/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md new file mode 100644 index 0000000000..d6d21002a2 --- /dev/null +++ b/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md @@ -0,0 +1,76 @@ +How to Change Default Web Browser and Email Client in Ubuntu +================================================================================ +web browserUbuntu ships with a slate of default apps handily pre-installed, including Mozilla’s hugely popular Firefox web browser and Thunderbird e-mail client. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/web-browser.png) + +While both of these have their fans neither app is — shock — to everyone’s tastes or needs. We often get e-mails or tweets from people asking us how they can change the default browser in Ubuntu or set a different mail client as the handler for mail links, etc. + +We’re not just talking about installing a different bit of software here but also how you set it as the system handler for a given file, link or content type. + +It is super easy to change a whole slate of default application including web, e-mail, text editing, music and videos players, in Ubuntu. The settings panel where you can make these changes isn’t known to everyone, so we’ll take a quick look. + +### How to Change the Default Browser in Ubuntu ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/change-default-browser-in-ubuntu-750x402.jpg) + +Mozilla Firefox is a solid, open-source and reliable window on the world wide web but it’s not everyone’s browser of choice. And that’s fine. + +To use a different default browser in Ubuntu you will first, rather obviously, need to install a new one. How you do this depends on the one you want: + +- Open-source web browsers, like [Epiphany][1], [Chromium][2] and [IceWeasel][3], are available to install from the Ubuntu Software Center. + +- Major web-browsers, like [Google Chrome][4], [Opera][5] and [Vivaldi][6], must be downloaded from each project’s official website. + +Whichever browser you choose, and however you choose to install it, once you have done so you can continue on. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/system-settings-ubuntu-300x215.jpg) + +To change the default browser for opening web links click on in other applications, e.g., instant messengers, Twitter clients, e-mail, etc, you need to use the Ubuntu System Settings tool. + +You can launch System Settings a number of ways. One of the fastest is to the click the Cog icon in the far-right hand corner (far left on RTL systems) and select the ‘System Settings’ menu shortcut. + +1. Open ‘System Settings’ +1. Select the ‘Details’ item +1. Select ‘Default Applications’ in the sidebar +1. Change the ‘Web’ entry from ‘Firefox’ to your preferred choice + +That’s it. + +### How To Change the Default Mail Client in Ubuntu ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/CHANGE-DEFAULT-APPS-UBUNTU.jpg) + +Ubuntu ships with Thunderbird as the default mail application. This means the app will **open automatically when you click on an email address or a [mailto link][7]** in most web-browsers, PDFs, instant messengers, and so on. + +This convenience is super handy if you use Thunderbird, of course. But a lot of us don’t; we may [use a lightweight client like Geary][8], GNOME stalwart Evolution, or rely on a web-mail service like Gmail or Outlook. + +To **change the default mail client in Ubuntu** from Thunderbird to another application open System Settings > Details > Default Applications. Click the drop-down menu next to ‘Mail’ and choose your preferred client from the list. + +To **set Gmail as the default mail client in Ubuntu** you must first install the ‘gnome-gmail’ package by hitting the button below. Once installed open System Settings > Details > Default Applications. Click the drop-down menu next to ‘Mail’ and choose ‘Gmail’ from the list. + +- [Install GNOME Gmail in Ubuntu][9]. + +### Going Further ### + +The same steps listed above can be used to make your favourite music player open when double clicking on a music file, have an application like VLC handle your .avi and .mp4 files, and so on. +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/change-your-default-web-browser-in-ubuntu + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://wiki.gnome.org/Apps/Web +[2]:https://apps.ubuntu.com/cat/applications/chromium-browser/ +[3]:https://wiki.debian.org/Iceweasel +[4]:https://www.google.co.uk/chrome/browser/desktop/ +[5]:http://www.opera.com/computer/linux +[6]:https://vivaldi.com/#Download +[7]:http://en.wikipedia.org/wiki/Mailto +[8]:http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update +[9]:apt://gnome-gmail \ No newline at end of file From 960ce01f839e440fd24090933a109b6c22827f86 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 23 Apr 2015 16:52:14 +0800 Subject: [PATCH 0611/2517] [Translated] talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012 --- ...mming Languages in to GitHub Since 2012.md | 33 ------------------- ...mming Languages in to GitHub Since 2012.md | 33 +++++++++++++++++++ 2 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md create mode 100644 translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md diff --git a/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md deleted file mode 100644 index 6ad6d94d67..0000000000 --- a/sources/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md +++ /dev/null @@ -1,33 +0,0 @@ -Translating by ictlyh -The Most Popular Programming Languages in to GitHub Since 2012 -================================================================================ -![](http://www.loggly.com/wp-content/uploads/2015/04/Infographic_Github_popular_languages_Blogheader.png) - -Programming languages are not simply the tools that developers use to create programs or express algorithms. They’re also instruments to code and decode creativity. By observing the history of programming languages, we gain a unique perspective on our quest to find better ways to solve problems, facilitate collaboration, build great products, and reuse the efforts of others. - -About 70% of our customers send application logs to our service, so Loggly is interested in tracking which languages are most popular and which ones are gaining traction among developers. - -Based on the historical [GitHub Archive][1] and [GitHut][2] data starting in 2012, we analyzed the most common developer actions within GitHub and turned it into the infographic you see below. We looked at: - -- The number of active repositories, a useful proxy for the projects that people are working on right now. -- The total number of pushes per language as well as the average number of pushes per repository. These metrics are indicators of the rate of innovation occurring with projects being written in a particular language. -- New forks and open issues per repository, which also show active use and innovation. -- New watchers per repository, an indicator of developer interest. - -### Check out the infographic and let us know what you think! How does your programming language of choice fare among your peers? ### - -![](http://www.loggly.com/wp-content/uploads/2015/04/Most-Popular-Languages-According-to-GitHub-Since-2012-loggly-infographic_v3.png) - --------------------------------------------------------------------------------- - -via: https://www.loggly.com/blog/the-most-popular-programming-languages-in-to-github-since-2012/ - -作者:[Justin Mares][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://www.loggly.com/blog/author/guest/ -[1]:https://www.githubarchive.org/ -[2]:http://githut.info/ \ No newline at end of file diff --git a/translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md new file mode 100644 index 0000000000..dde2b6785a --- /dev/null +++ b/translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md @@ -0,0 +1,33 @@ +从2012年以来GitHub上最流行的的编程语言 +================================================================================ +![](http://www.loggly.com/wp-content/uploads/2015/04/Infographic_Github_popular_languages_Blogheader.png) + +编程语言不仅仅是开发者用来创建程序或表达算法的工具。它们也是编码和解码创造力的仪器。通过观察编程语言的历史,我们在追求为解决问题找到一个更好的方法,促进写作,构建好的产品以及重用他人的工作上得到一个独特的观点。 + +我们的客户中大概70%向我们的服务发送应用日志,因此Loggy有兴趣追踪哪种语言是最流行的以及哪种语言获得了开发人员的关注。 + +基于从2012年以来的历史的[GitHub 归档][1]和[GitHut][2]数据,我们分析了GitHub上大部分开发者的动作并转化为你下面看到的信息图表。我们关注了: + + +- 活跃库的数量,人们正在研究的项目的有用度量。 +- 每种语言总的推送数量以及每个库的平均推送次数。这些指标是由特定语言编写的项目的创新效率的指示器。 +- 每个库新的fork数和打开的问题数目,这也显示了积极使用性和创新性。 +- 每个库新的观察者,开发人员兴趣的指示器。 + +### 查看信息图表并告诉我们你的想法!在你的同龄人中是怎么选择你使用的语言的? ### + +![](http://www.loggly.com/wp-content/uploads/2015/04/Most-Popular-Languages-According-to-GitHub-Since-2012-loggly-infographic_v3.png) + +-------------------------------------------------------------------------------- + +via: https://www.loggly.com/blog/the-most-popular-programming-languages-in-to-github-since-2012/ + +作者:[Justin Mares][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.loggly.com/blog/author/guest/ +[1]:https://www.githubarchive.org/ +[2]:http://githut.info/ \ No newline at end of file From 5a373c68d764d17ceace1fbcc8a1645a5e25b6a7 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 23 Apr 2015 17:58:17 +0800 Subject: [PATCH 0612/2517] [Translated] tech/20150413 A Walk Through Some Important Docker Commands --- ... Through Some Important Docker Commands.md | 106 ------------------ ... Through Some Important Docker Commands.md | 105 +++++++++++++++++ 2 files changed, 105 insertions(+), 106 deletions(-) delete mode 100644 sources/tech/20150413 A Walk Through Some Important Docker Commands.md create mode 100644 translated/tech/20150413 A Walk Through Some Important Docker Commands.md diff --git a/sources/tech/20150413 A Walk Through Some Important Docker Commands.md b/sources/tech/20150413 A Walk Through Some Important Docker Commands.md deleted file mode 100644 index 074c5b12a7..0000000000 --- a/sources/tech/20150413 A Walk Through Some Important Docker Commands.md +++ /dev/null @@ -1,106 +0,0 @@ -Translating by ictlyh -A Walk Through Some Important Docker Commands -================================================================================ -Hi everyone today we'll learn some important Docker Commands that you'll need to learn before you go with Docker. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. - -Docker commands are easy to learn and easy to implement or take into practice. Here are some easy Docker commands you'll need to know to run Docker and fully utilize it. - -### 1. Pulling a Docker Image ### - -First of all, we'll need to pull a docker image to get started cause containers are built using Docker Images. We can get the required docker image from the Docker Registry Hub. Before we pull any image using pull command, we'll need to protect our system as there is identified a malicious issue with pull command. To protect our system from this issue, we'll need to add **127.0.0.1 index.docker.io** into /etc/hosts entry. We can do using our favorite text editor. - - # nano /etc/hosts - -Now, add the following lines into it and then save and exit. - - 127.0.0.1 index.docker.io - -![Docker Hosts](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-hosts.png) - -To pull a docker image, we'll need to run the following command. - - # docker pull registry.hub.docker.com/busybox - -![Docker pull command](http://blog.linoxide.com/wp-content/uploads/2015/04/pulling-image.png) - -We can check whether any Docker image is available in our local host for the use or not. - - # docker images - -![Docker Images](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-images.png) - -### 2. Running a Docker Container ### - -Now, after we have successfully pulled a required or desired Docker image. We'll surely want to run that Docker image. We can run a docker container out of the image using docker run command. We have several options and flags to run a docker container on the top of the Docker image. To run a docker image and to get into the container we'll use -t and -i flag as shown below. - - # docker run -it busybox - -![Docker Run Shell Command](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-run-shell.png) - -From the above command, we'll get entered into the container and can access its content via the interactive shell. We can press **Ctrl-D** in order to exit from the shell access. - -Now, to run the container in background, we'll detach the shell using -d flag as shown below. - - # docker run -itd busybox - -![Run Container Background](http://blog.linoxide.com/wp-content/uploads/2015/04/run-container-background.png) - -If we want to attach into a running container, we can use attach command with the container id. The container id can be fetched using the command **docker ps** . - - # docker attach - -![Docker Attach](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-attach.png) - -### 3. Checking Containers ### - -It is very easy to check the log whether the container is running or not. We can use the following command to check whether there is any docker container running in the real time or not using the following command. - - # docker ps - -Now, to check logs about the running or past running containers we'll need to run the following command. - - # docker ps -a - -![View Docker Containers](http://blog.linoxide.com/wp-content/uploads/2015/04/view-docker-containers1.png) - -### 4. Inspecting a Docker Container ### - -We can check every information about a Docker Container using the inspect command. - - # docker inspect - -![Docker Inspect](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-inspect.png) - -### 5. Killing and Deleting Command ### - -We can kill or stop process or docker containers using its docker id as shown below. - - # docker stop - -To stop every containers running, we'll need to run the following command. - - # docker kill $(docker ps -q) - -Now, if we wanna remove a docker image, run the below command. - - # docker rm - -If we wanna remove all the docker images at once, we can run the below. - - # docker rm $(docker ps -aq) - -### Conclusion ### - -These docker commands are highly essential to learn to fully utilize and use Docker. Docker gets too simple with these commands providing end users an easy platform for computing. It is extremely easy for anyone to learn about Docker commands with this above tutorial. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve and update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/important-docker-commands/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ \ No newline at end of file diff --git a/translated/tech/20150413 A Walk Through Some Important Docker Commands.md b/translated/tech/20150413 A Walk Through Some Important Docker Commands.md new file mode 100644 index 0000000000..6e350c6d1c --- /dev/null +++ b/translated/tech/20150413 A Walk Through Some Important Docker Commands.md @@ -0,0 +1,105 @@ +一些重要Docker命令的简单介绍 +================================================================================ +大家好,今天我们来学习一些在你使用Docker之前需要了解的重要的 Docker 命令。Docker 是一个提供开发平台去打包,装载和运行任何应用的轻量级容器开源项目。它没有语言支持,框架和打包系统的限制,能从一个小的家庭电脑到高端服务器,在任何地方任何时间运行。这使得它们成为不依赖于一个特定的栈或供应商,部署和扩展web应用,数据库和后端服务很好的构建块。 + +Docker 命令简单易学,也很容易实现或实践。这是一些你运行 Docker 并充分利用它需要知道的简单 Docker 命令。 + +### 1. 拉取一个 Docker 镜像 ### + +由于容器是由 Docker 镜像构建的,首先我们需要拉取一个 docker 镜像来开始。我们可以从 Docker 注册 Hub 获取需要的 docker 镜像。在我们使用 pull 命令拉取任何镜像之前,由于pull命令被标识为恶意命令,我们需要保护我们的系统。为了保护我们的系统不受这个问题影响,我们需要添加 **127.0.0.1 index.docker.io** 到 /etc/hosts 条目。我们可以通过使用喜欢的文本编辑器完成。 + + # nano /etc/hosts + +现在,增加下面的一行到文件并保存退出。 + + 127.0.0.1 index.docker.io + +![Docker 宿主机](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-hosts.png) + +要拉取一个 docker 进行,我们需要运行下面的命令。 + + # docker pull registry.hub.docker.com/busybox + +![Docker pull 命令](http://blog.linoxide.com/wp-content/uploads/2015/04/pulling-image.png) + +我们可以检查本地是否有可用的 Docker 镜像。 + + # docker images + +![Docker 镜像](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-images.png) + +### 2. 运行一个 Docker 容器 ### + +现在,成功地拉取要求或需要的 Docker 镜像之后,我们当然想运行这个 Docker 镜像。我们可以用 docker run 命令在镜像上运行一个 docker 容器。在 Docker 镜像之上运行一个 docker 容易时我们有很多选项和标记。我们使用 -t 和 -i 标记运行一个 docker 镜像并进入容器,如下面所示。 + + # docker run -it busybox + +![Docker Run Shell 命令](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-run-shell.png) + +从上面的命令中,我们进入了容器并可以通过交互 shell 访问它的内容。我们可以键入 **Ctrl-D** 从shell中退出。 + +现在,在后台运行容器,我们用 -d 标记分离 shell,如下所示。 + + # docker run -itd busybox + +![后台运行容器](http://blog.linoxide.com/wp-content/uploads/2015/04/run-container-background.png) + +如果你想进入到一个正在运行的容器,我们可以使用 attach 命令加一个容器 id。可以使用 **docker ps** 命令获取容器 id。 + + # docker attach + +![进入Docker](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-attach.png) + +### 3. 查看容器 ### + +不论容器是否运行,查看日志文件都很简单。我们可以使用下面的命令去检查是否有 docker 容器在实时运行。 + + # docker ps + +现在,查看正在运行的或者之前运行的容器的日志,我们需要运行以下的命令。 + + # docker ps -a + +![查看 Docker 容器](http://blog.linoxide.com/wp-content/uploads/2015/04/view-docker-containers1.png) + +### 4. 检查 Docker 容器 ### + +我们可以使用 inspect 命令检查一个 Docker 容器的每条信息。 + + # docker inspect + +![检查Docker](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-inspect.png) + +### 5. 杀死或删除命令 ### + +我们可以使用 docker id 杀死或者停止进程或 docker 容器,如下所示。 + + # docker stop + +要停止每个正在运行的容器,我们需要运行下面的命令。 + + # docker kill $(docker ps -q) + +现在,如我我们希望移除一个 docker 镜像,运行下面的命令。 + + # docker rm + +如果我们想一次性移除所有 docker 镜像,我们可以运行以下命令。 + + # docker rm $(docker ps -aq) + +### 结论 ### + +这些都是学习充分实现和利用 Docker 很基本的 docker 命令。有了这些命令,Docker 变得很简单,提供给端用户一个简单的计算平台。根据上面的教程,任何人学习 Docker 命令都非常简单。如果你有任何问题,建议,反馈,请写到下面的评论框中以便我们改进和更新内容。多谢!享受吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/important-docker-commands/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ \ No newline at end of file From a22e1785b7c7a77ed6265e799d6c6b46f1127f6d Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Thu, 23 Apr 2015 23:55:55 +0800 Subject: [PATCH 0613/2517] finish first translation --- ...g Linux 'sort' Command Examples--Part 2.md | 132 ------------------ ...g Linux 'sort' Command Examples--Part 2.md | 131 +++++++++++++++++ 2 files changed, 131 insertions(+), 132 deletions(-) delete mode 100644 sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md create mode 100644 translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md diff --git a/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md deleted file mode 100644 index fd6b0f488b..0000000000 --- a/sources/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md +++ /dev/null @@ -1,132 +0,0 @@ -[Dongshuaike translating] -7 Interesting Linux ‘sort’ Command Examples – Part 2 -================================================================================ -In our last article we have covered various examples on sort command, if you’ve missed, you can go through it using below link. In continuation to the last post this post aims at covering remaining of sort command so that both the article together serves as complete guide to Linux ‘sort‘ command. - -注:前两天做过这个原文 -- [14 ‘sort’ Command Examples in Linux][1] - -Before we continue further, create a text file ‘month.txt‘ and populate it with the data as given below. - - $ echo -e "mar\ndec\noct\nsep\nfeb\naug" > month.txt - $ cat month.txt - -![Populate Content](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content.gif) - -### 15. Sort the file ‘month.txt‘ on the basis of month order by using switch ‘M‘ (–month-sort). ### - - $ sort -M month.txt - -**Important**: Note that ‘sort‘ command needs at least 3 characters to consider month name. - -![Sort File Content by Month in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-by-Month.gif) - -### 16. Sort the data that is in human readable format say 1K, 2M, 3G, 2T, where K,M,G,T represents Kilo, Mega, Giga, Tera. ### - - $ ls -l /home/$USER | sort -h -k5 - -![Sort Content Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Human-Readable-Format.gif) - -### 17. In the last article we have created a file ‘sorted.txt‘ in example number 4 and another text file ‘lsl.txt‘ in example number 6. We know ‘sorted.txt‘ is already sorted while ‘lsl.txt‘ is not. Lets check both the files are sorted or not using sort command. ### - - $ sort -c sorted.txt - -![Check File is Sorted](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-is-Sorted.gif) - -If it returns 0, means that the file is sorted and there is no conflict. - - $ sort -c lsl.txt - -![Check File Sorted Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Sorted-Status.gif) - -Reports Disorder. Conflict.. - -### 18. If the delimiter (separator) between words are space, sort command automatically interpret anything after horizontal space as new word. What if the delimiter is not space? ### - -Consider a text file, the contents of which are separated by anything other than space such as ‘|’ or ‘\’ or ‘+’ or ‘.’ or…. - -Create a text file where contents are separated by +. Use ‘cat‘ to check the contents of file. - - $ echo -e "21+linux+server+production\n11+debian+RedHat+CentOS\n131+Apache+Mysql+PHP\n7+Shell Scripting+python+perl\n111+postfix+exim+sendmail" > delimiter.txt - ----------- - - $ cat delimiter.txt - -![Check File Content by Delimiter](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Content.gif) - -Now sort this file on the basis of 1st field which is numerical. - - $ sort -t '+' -nk1 delimiter.txt - -![Sort File By Fields](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-File-By-Fields.gif) - -And second on the basis of 4th field which is non numeric. - -![Sort Content By Non Numeric](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Non-Numeric.gif) - -If the delimiter is Tab you may use $’\t’ in place of ‘+’, as shown in the above example. - -### 19. Sort the contents of ‘ls -l‘ command for your home directory on the basis of 5th column which represents the ‘amount of data‘ in Random order. ### - - $ ls -l /home/avi/ | sort -k5 -R - -![Sort Content by Column in Random Order](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-by-Column1.gif) - -Every time you run the above piece of script you are likely to get a different result since the result is generated randomly. - -As clear from the Rule number – 2 from the last article, sort command prefer line starting with lowercase characters over uppercase characters. Also check example 3 in last article, where string ‘laptop‘ appears before string ‘LAPTOP‘. - -### 20. How to override the default sorting preference? before we are able to override the default sorting preference we need to export the environment variable LC_ALL to c. To do this run the below code on your Command Line Prompt. ### - - $ export LC_ALL=C - -And then sort the text file ‘tecmint.txt‘ overriding the default sort preference. - - $ sort tecmint.txt - -![Override Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Override-Sorting-Preferences.gif) -Override Sorting Preferences - -Don’t forget to compare the output with the one you achieved in example 3 and also you can use option ‘-f‘ aka ‘–ignore-case‘ to get much organized output. - - $ sort -f tecmint.txt - -![Compare Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Compare-Sorting-Preferences.gif) - -### 21. How about running ‘sort‘ on two input files and join them in one go! ### - -Lets create two text file namely ‘file1.txt‘ and ‘file2.txt‘ and populate it with some data. Here we are populating ‘file1.txt‘ with numbers as below. Also used ‘cat‘ command to check the content of file. - - $ echo -e “5 Reliable\n2 Fast\n3 Secure\n1 open-source\n4 customizable” > file1.txt - $ cat file1.txt - -![Populate Content with Numbers](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content-with-Number.gif) - -And populate second file ‘file2.txt‘ with some data as. - - $ echo -e “3 RedHat\n1 Debian\n5 Ubuntu\n2 Kali\n4 Fedora” > file2.txt - $ cat file2.txt - -![Populate File with Data](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-File-with-Data.gif) - -Now sort and join the output of both the files. - - $ join <(sort -n file1.txt) <(sort file2.txt) - -![Sort Join Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Join-Two-Files.gif) - -That’s all for now. Keep Connected. Keep to Tecmint. Please Provide us with your valuable feedback in the comments below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-sort-command-examples/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/sort-command-linux/ diff --git a/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md new file mode 100644 index 0000000000..37312ffa16 --- /dev/null +++ b/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md @@ -0,0 +1,131 @@ + +Linux 'sort'命令的七个有趣实例-第二部分 +================================================================================ +在上一篇文章里,我们已经探讨了关于sort命令的多个例子,如果你错过了这篇文章,可以点击下面的链接进行阅读。今天的这篇文章作为上一篇文章的继续,将讨论关于sort命令的剩余用法,与上一篇一起作为Linux ‘sort’命令的完整指南。 + +注:前两天做过这个原文 +- [14 ‘sort’ Command Examples in Linux][1] +- +在我们继续深入之前,先创建一个文本文档‘month.txt’,并且将上一次给出的数据填进去。 + + $ echo -e "mar\ndec\noct\nsep\nfeb\naug" > month.txt + $ cat month.txt + +![Populate Content](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content.gif) + +### 15. 通过使用’M‘选项,对’month.txt‘文件按照月份顺序进行排序。### + + $ sort -M month.txt + +**注意**:‘sort’命令需要至少3个字符来确认月份名称。 + +![Sort File Content by Month in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-by-Month.gif) + +### 16. 把数据整理成方便人们阅读的形式,比如1K、2M、3G、2T,这里面的K、G、M、T代表千、兆、吉、梯。 +(译者注:好像这个选项并不是所有Linu版本都有,而且也没有实现按KMGT显示。) + + $ ls -l /home/$USER | sort -h -k5 + +![Sort Content Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Human-Readable-Format.gif) + +### 17. 在上一篇文章中,我们在例子4中创建了一个名为‘sorted.txt’的文件,在例子6中创建了一个‘lsl.txt’。‘sorted.txt'已经排好序了而’lsl.txt‘还没有。让我们使用sort命令来检查两个文件是否已经排好序。### + + $ sort -c sorted.txt + +![Check File is Sorted](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-is-Sorted.gif) + +如果它返回0,则表示文件已经排好序。 + + $ sort -c lsl.txt + +![Check File Sorted Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Sorted-Status.gif) + +Reports Disorder. Conflict.. +报告无序。存在矛盾…… + +### 18. 如果文字之间的分隔符是空格,sort命令自动地将横向空格后的东西当做一个新文字单元,如果分隔符不是空格呢?### + +考虑这样一个文本文件,里面的内容可以由除了空格之外的任何符号分隔,比如‘|’,‘\’,‘+’,‘.’等…… + +创建一个分隔符为+的文本文件。使用‘cat‘命令查看文件内容。 + $ echo -e "21+linux+server+production\n11+debian+RedHat+CentOS\n131+Apache+Mysql+PHP\n7+Shell Scripting+python+perl\n111+postfix+exim+sendmail" > delimiter.txt + +---------- + + $ cat delimiter.txt + +![Check File Content by Delimiter](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Content.gif) + +现在基于由数字组成的第一个域来进行排序。 + + $ sort -t '+' -nk1 delimiter.txt + +![Sort File By Fields](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-File-By-Fields.gif) + +然后再基于非数字的第四个域排序。 + +![Sort Content By Non Numeric](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Non-Numeric.gif) + +如果分隔符是Tab,你需要在’+‘的位置上用$’\t’代替,如上例所示。 + +### 19. 对主用户目录下使用‘ls -l’命令得到的结果基于第五列——‘数据的大小’进行一个乱序排列。 + + $ ls -l /home/avi/ | sort -k5 -R + +![Sort Content by Column in Random Order](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-by-Column1.gif) + +每一次你运行上面的脚本,你得到结果可能都不一样,因为结果是随机生成的。 + + 正如我在上一篇文章中提到的规则2所说——相比于大写字母,sort命令更喜欢以小写字母开始的行。看一下上一篇文章的例3,字符串‘laptop’在‘LAPTOP’前出现。 + +### 20. 如何覆盖默认的排序优先权?在这之前我们需要先将环境变量LC_ALL的值设置为C。在命令行提示栏中运行下面的代码。### + + $ export LC_ALL=C + +然后以重写默认优先权的方式对‘tecmint.txt’文件重新排序。 + + $ sort tecmint.txt + +![Override Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Override-Sorting-Preferences.gif) +重写排序优先权 + +不要忘记与example 3中得到的输出结果做比较,并且你可以使用‘-f’选项,又叫‘-ignore-case’来获取非常有序的输出。 + + $ sort -f tecmint.txt + +![Compare Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Compare-Sorting-Preferences.gif) + +### 21. 给两个输入文件进行‘sort‘,然后一口气把它们连接起来怎么样?### + +我们创建两个文本文档’file1.txt‘以及’file2.txt‘,并用数据填充,如下所示,并用’cat‘命令查看文件的内容。 + $ echo -e “5 Reliable\n2 Fast\n3 Secure\n1 open-source\n4 customizable” > file1.txt + $ cat file1.txt + +![Populate Content with Numbers](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content-with-Number.gif) + +用如下数据填充’file2.txt‘。 + + $ echo -e “3 RedHat\n1 Debian\n5 Ubuntu\n2 Kali\n4 Fedora” > file2.txt + $ cat file2.txt + +![Populate File with Data](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-File-with-Data.gif) + +现在我们对两个文件进行排序并连接。 + + $ join <(sort -n file1.txt) <(sort file2.txt) + +![Sort Join Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Join-Two-Files.gif) + +我所要讲的全部内容就在这里了,希望与各位保持联系,也希望各位经常来Tecmint逛逛。有反馈就在下面评论吧。 +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-sort-command-examples/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/DongShuaike) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/sort-command-linux/ From b4d3637950c765fc12c2e1b099c8c659bdefc9f7 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 24 Apr 2015 11:31:05 +0800 Subject: [PATCH 0614/2517] [Translating] tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu --- ...w to Change Default Web Browser and Email Client in Ubuntu.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md b/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md index d6d21002a2..fdde80564c 100644 --- a/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md +++ b/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to Change Default Web Browser and Email Client in Ubuntu ================================================================================ web browserUbuntu ships with a slate of default apps handily pre-installed, including Mozilla’s hugely popular Firefox web browser and Thunderbird e-mail client. From f27825598bf4c49621c36aaf89076d2718f2fea2 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 24 Apr 2015 11:31:50 +0800 Subject: [PATCH 0615/2517] [Translating] tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux --- ...ng Helps Connecting Private interface to Internet in Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md b/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md index f5f4eb16a7..966fb0a2ab 100644 --- a/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md +++ b/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md @@ -1,3 +1,4 @@ +Translating by ictlyh How IP forwarding Helps Connecting Private interface to Internet in Linux ================================================================================ Hi everyone, today we'll learn about IP forwarding or Packet forwarding from one network interface to another in Linux using iptables. IP forwarding is a concept to make Linux machine to send data from one network to another as a router. So, it can be used as a **router** or a proxy server that can share internet or network connection from one connection to multiple client machines. From 6148ebce9d41cf84c4f2e9bd19269276b258313a Mon Sep 17 00:00:00 2001 From: cvsher <478990879@qq.com> Date: Fri, 24 Apr 2015 13:02:35 +0800 Subject: [PATCH 0616/2517] Create [translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md [translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1 --- ...xamples of Linux 'sort' Command--Part 1.md | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md diff --git a/translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md b/translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md new file mode 100644 index 0000000000..9653302530 --- /dev/null +++ b/translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md @@ -0,0 +1,132 @@ +Linux ‘sort’命令的14个有用的范例 -- 第一部分 +============================================================= +Sort是用于对单个或多个文本文件内容进行排序的Linux程序。Sort命令以空格作为字段分隔符,将一行分割为多个关键字对文件进行排序。需要注意的是除非你将输出重定向到文件中,否则Sort命令并不对文件内容进行实际的排序(即文件内容没有修改),只是将文件内容按有序输出。 + +本文的目标是通过14个实际的范例让你更深刻的理解如何在Linux中使用sort命令。 + +###1. 首先我们将会创建一个用于执行‘sort’命令的文本文件(tecmint.txt)。工作路径是‘/home/$USER/Desktop/tecmint’。### + +下面命令中的‘-e’选项将‘/’和‘/n’解析成一个新行 + + $ echo -e "computer\nmouse\nLAPTOP\ndata\nRedHat\nlaptop\ndebian\nlaptop" > tecmint.txt + +![Split String by Lines in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Split-String-by-Lines.gif) + +###2. 在开始学习‘sort’命令前,我们先看看文件的内容及其显示方式。### + + $ cat tecmint.txt + +![Check Content of File](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Content-of-File.gif) + +###3. 现在,使用如下命令对文件内容进行排序。### + + $ sort tecmint.txt + +![Sort Content of File linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content.gif) + +**注意**:上面的命令并不对文件内容进行实际的排序,仅仅是将其内容按有序方式输出。 + +###4. 对文件‘tecmint.txt’文件内容排序,并将排序后的内容输出到名为sorted.txt的文件中,然后使用[cat][1]命令查看验证sorted.txt文件的内容。### + + $ sort tecmint.txt > sorted.txt + $ cat sorted.txt + +![Sort File Content in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-File-Content.gif) + +###5. 现在使用‘-r’参数对‘tecmint.txt’文件内容进行逆序排序,并将输出内容重定向到‘reversesorted.txt’文件中,并使用cat命令查看文件的内容。### + + $ sort -r tecmint.txt > reversesorted.txt + $ cat reversesorted.txt + +![Sort Content By Reverse](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Reverse.gif) + +###6. 创建一个新文件(lsl.txt),文件内容为在home目录下执行‘ls -l’命令的输出。### + + $ ls -l /home/$USER > /home/$USER/Desktop/tecmint/lsl.txt + $ cat lsl.txt + +![Populate Output of Home Directory](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Output.gif) + +我们将会看到对其他基础字段进行排序的例子,而不是对默认的初始字符进行排序。 + +###7. 基于第二列(符号连接的数量)对文件‘lsl.txt’进行排序。### + + $ sort -nk2 lsl.txt + +**注意**:上面例子中的‘-n’参数表示对数值内容进行排序。当想基于文件中的数值列对文件进行排序时,必须要使用‘-n’参数。 + +![Sort Content by Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-by-Column.gif) + +###8. 基于第9列(文件和目录的名称,非数值)对文件‘lsl.txt’进行排序。### + + $ sort -k9 lsl.txt + +![Sort Content Based on Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Based-on-Column.gif) + +###9. sort命令并非仅能对文件进行排序,我们还可以通过管道将命令的输出内容重定向到sort命令中。### + + $ ls -l /home/$USER | sort -nk5 + +![Sort Content Using Pipe Option](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Pipeline.gif) + +###10. 对文件tecmint.txt进行排序,并删除重复的行。然后检查重复的行是否已经删除了。### + + $ cat tecmint.txt + $ sort -u tecmint.txt + +![Sort and Remove Duplicates](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-and-Remove-Duplicates.gif) + +目前我们发现的排序规则: + + 除非指定了‘-r’参数,否则排序的优先级按下面规则排序 + - 以数字开头的行优先级最高 + - 以小写字母开头的行优先级次之 + - 待排序内容按字典序进行排序 + - 默认情况下,‘sort’命令将带排序内容的每行关键字当作一个字符串进行字典序排序(数字优先级最高,参看规则 - 1) + + +###11. 创建文件‘lsla.txt’,其内容用‘ls -la’命令的输出内容填充。### + + $ ls -lA /home/$USER > /home/$USER/Desktop/tecmint/lsla.txt + $ cat lsla.txt + +![Populate Output With Hidden Files](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Output-With-Hidden-Files.gif) + +了解ls命令的读者都知道‘ls -la’=‘ls -l’ + 隐藏文件。因此这两个文件的大部分内容都是相同的。 + +###12. 对上面两个文件内容进行排序输出。### + + $ sort lsl.txt lsla.txt + +![Sort Contents of Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-of-Multiple-Files.gif) + +注意文件和目录的重复 + +###13. 现在我们看看怎样对两个文件进行排序、合并,并且删除重复行。### + + $ sort -u lsl.txt lsla.txt + +![Sort, Merge and Remove Duplicates from File](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Merge-Duplicates-Content.gif) + +此时,我们注意到重复的行已经被删除了,我们可以将输出内容重定向到文件中。 + +###14. 我们同样可以基于多列对文件内容进行排序。基于第2,5(数值)和9(非数值)列对‘ls -l’命令的输出进行排序。### + + $ ls -l /home/$USER | sort -t "," -nk2,5 -k9 + +![Sort Content By Field Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Field-Column.gif) + +先到此为止了,在接下来的文章中我们将会学习到‘sort’命令更多的详细例子。届时敬请关注Tecmint。保持分享精神。若喜欢本文,敬请将本文分享给你的朋友。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/sort-command-linux/ + +作者:[Avishek Kumar][a] +译者:[cvsher](https://github.com/cvsher) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ From 413e55fc1d353f5d5c634c7af63630d3cc06f0eb Mon Sep 17 00:00:00 2001 From: cvsher <478990879@qq.com> Date: Fri, 24 Apr 2015 13:10:18 +0800 Subject: [PATCH 0617/2517] Delete [translating by cvsher]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成,删除源文件 --- ...xamples of Linux 'sort' Command--Part 1.md | 132 ------------------ 1 file changed, 132 deletions(-) delete mode 100644 sources/tech/[translating by cvsher]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md diff --git a/sources/tech/[translating by cvsher]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md b/sources/tech/[translating by cvsher]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md deleted file mode 100644 index ff42945bf8..0000000000 --- a/sources/tech/[translating by cvsher]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md +++ /dev/null @@ -1,132 +0,0 @@ -translating by cvsher - -14 Useful Examples of Linux ‘sort’ Command – Part 1 -================================================================================ -Sort is a Linux program used for printing lines of input text files and concatenation of all files in sorted order. Sort command takes blank space as field separator and entire Input file as sort key. It is important to notice that sort command don’t actually sort the files but only print the sorted output, until your redirect the output. - -This article aims at deep insight of Linux ‘sort‘ command with 14 useful practical examples that will show you how to use sort command in Linux. - -### 1. First we will be creating a text file (tecmint.txt) to execute ‘sort‘ command examples. Our working directory is ‘/home/$USER/Desktop/tecmint. ### - -The option ‘-e‘ in the below command enables interpretion of backslash and /n tells echo to write each string to a new line. - - $ echo -e "computer\nmouse\nLAPTOP\ndata\nRedHat\nlaptop\ndebian\nlaptop" > tecmint.txt - -![Split String by Lines in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Split-String-by-Lines.gif) - -### 2. Before we start with ‘sort‘ lets have a look at the contents of the file and the way it look. ### - - $ cat tecmint.txt - -![Check Content of File](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Content-of-File.gif) - -### 3. Now sort the content of the file using following command. ### - - $ sort tecmint.txt - -![Sort Content of File linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content.gif) - -**Note**: The above command don’t actually sort the contents of text file but only show the sorted output on terminal. - -### 4. Sort the contents of the file ‘tecmint.txt‘ and write it to a file called (sorted.txt) and verify the content by using [cat command][1]. ### - - $ sort tecmint.txt > sorted.txt - $ cat sorted.txt - -![Sort File Content in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-File-Content.gif) - -### 5. Now sort the contents of text file ‘tecmint.txt‘ in reverse order by using ‘-r‘ switch and redirect output to a file ‘reversesorted.txt‘. Also check the content listing of the newly created file. ### - - $ sort -r tecmint.txt > reversesorted.txt - $ cat reversesorted.txt - -![Sort Content By Reverse](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Reverse.gif) - -### 6. We are going a create a new file (lsl.txt) at the same location for detailed examples and populate it using the output of ‘ls -l‘ for your home directory. ### - - $ ls -l /home/$USER > /home/$USER/Desktop/tecmint/lsl.txt - $ cat lsl.txt - -![Populate Output of Home Directory](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Output.gif) - -Now will see examples to sort the contents on the basis of other field and not the default initial characters. - -### 7. Sort the contents of file ‘lsl.txt‘ on the basis of 2nd column (which represents number of symbolic links). ### - - $ sort -nk2 lsl.txt - -**Note**: The ‘-n‘ option in the above example sort the contents numerically. Option ‘-n‘ must be used when we wanted to sort a file on the basis of a column which contains numerical values. - -![Sort Content by Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-by-Column.gif) - -### 8. Sort the contents of file ‘lsl.txt‘ on the basis of 9th column (which is the name of the files and folders and is non-numeric). ### - - $ sort -k9 lsl.txt - -![Sort Content Based on Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Based-on-Column.gif) - -### 9. It is not always essential to run sort command on a file. We can pipeline it directly on the terminal with actual command. ### - - $ ls -l /home/$USER | sort -nk5 - -![Sort Content Using Pipe Option](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Pipeline.gif) - -### 10. Sort and remove duplicates from the text file tecmint.txt. Check if the duplicate has been removed or not. ### - - $ cat tecmint.txt - $ sort -u tecmint.txt - -![Sort and Remove Duplicates](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-and-Remove-Duplicates.gif) - -Rules so far (what we have observed): - -- Lines starting with numbers are preferred in the list and lies at the top until otherwise specified (-r). -- Lines starting with lowercase letters are preferred in the list and lies at the top until otherwise specified (-r). -- Contents are listed on the basis of occurrence of alphabets in dictionary until otherwise specified (-r). -- Sort command by default treat each line as string and then sort it depending upon dictionary occurrence of alphabets (Numeric preferred; see rule – 1) until otherwise specified. - -### 11. Create a third file ‘lsla.txt‘ at the current location and populate it with the output of ‘ls -lA‘ command. ### - - $ ls -lA /home/$USER > /home/$USER/Desktop/tecmint/lsla.txt - $ cat lsla.txt - -![Populate Output With Hidden Files](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Output-With-Hidden-Files.gif) - -Those having understanding of ‘ls‘ command knows that ‘ls -lA’=’ls -l‘ + Hidden files. So most of the contents on these two files would be same. - -### 12. Sort the contents of two files on standard output in one go. ### - - $ sort lsl.txt lsla.txt - -![Sort Contents of Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-of-Multiple-Files.gif) - -Notice the repetition of files and folders. - -### 13. Now we can see how to sort, merge and remove duplicates from these two files. ### - - $ sort -u lsl.txt lsla.txt - -![Sort, Merge and Remove Duplicates from File](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Merge-Duplicates-Content.gif) - -Notice that duplicates has been omitted from the output. Also, you can write the output to a new file by redirecting the output to a file. - -### 14. We may also sort the contents of a file or the output based upon more than one column. Sort the output of ‘ls -l‘ command on the basis of field 2,5 (Numeric) and 9 (Non-Numeric). ### - - $ ls -l /home/$USER | sort -t "," -nk2,5 -k9 - -![Sort Content By Field Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Field-Column.gif) - -That’s all for now. In the next article we will cover a few more examples of ‘sort‘ command in detail for you. Till then stay tuned and connected to Tecmint. Keep sharing. Keep commenting. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/sort-command-linux/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ From dab6ea6be076134838c5740536880f042c381991 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 24 Apr 2015 13:19:59 +0800 Subject: [PATCH 0618/2517] [Translated] tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu --- ... Web Browser and Email Client in Ubuntu.md | 77 ------------------- ... Web Browser and Email Client in Ubuntu.md | 77 +++++++++++++++++++ 2 files changed, 77 insertions(+), 77 deletions(-) delete mode 100644 sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md create mode 100644 translated/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md diff --git a/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md b/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md deleted file mode 100644 index fdde80564c..0000000000 --- a/sources/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md +++ /dev/null @@ -1,77 +0,0 @@ -Translating by ictlyh -How to Change Default Web Browser and Email Client in Ubuntu -================================================================================ -web browserUbuntu ships with a slate of default apps handily pre-installed, including Mozilla’s hugely popular Firefox web browser and Thunderbird e-mail client. - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/web-browser.png) - -While both of these have their fans neither app is — shock — to everyone’s tastes or needs. We often get e-mails or tweets from people asking us how they can change the default browser in Ubuntu or set a different mail client as the handler for mail links, etc. - -We’re not just talking about installing a different bit of software here but also how you set it as the system handler for a given file, link or content type. - -It is super easy to change a whole slate of default application including web, e-mail, text editing, music and videos players, in Ubuntu. The settings panel where you can make these changes isn’t known to everyone, so we’ll take a quick look. - -### How to Change the Default Browser in Ubuntu ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/change-default-browser-in-ubuntu-750x402.jpg) - -Mozilla Firefox is a solid, open-source and reliable window on the world wide web but it’s not everyone’s browser of choice. And that’s fine. - -To use a different default browser in Ubuntu you will first, rather obviously, need to install a new one. How you do this depends on the one you want: - -- Open-source web browsers, like [Epiphany][1], [Chromium][2] and [IceWeasel][3], are available to install from the Ubuntu Software Center. - -- Major web-browsers, like [Google Chrome][4], [Opera][5] and [Vivaldi][6], must be downloaded from each project’s official website. - -Whichever browser you choose, and however you choose to install it, once you have done so you can continue on. - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/system-settings-ubuntu-300x215.jpg) - -To change the default browser for opening web links click on in other applications, e.g., instant messengers, Twitter clients, e-mail, etc, you need to use the Ubuntu System Settings tool. - -You can launch System Settings a number of ways. One of the fastest is to the click the Cog icon in the far-right hand corner (far left on RTL systems) and select the ‘System Settings’ menu shortcut. - -1. Open ‘System Settings’ -1. Select the ‘Details’ item -1. Select ‘Default Applications’ in the sidebar -1. Change the ‘Web’ entry from ‘Firefox’ to your preferred choice - -That’s it. - -### How To Change the Default Mail Client in Ubuntu ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/CHANGE-DEFAULT-APPS-UBUNTU.jpg) - -Ubuntu ships with Thunderbird as the default mail application. This means the app will **open automatically when you click on an email address or a [mailto link][7]** in most web-browsers, PDFs, instant messengers, and so on. - -This convenience is super handy if you use Thunderbird, of course. But a lot of us don’t; we may [use a lightweight client like Geary][8], GNOME stalwart Evolution, or rely on a web-mail service like Gmail or Outlook. - -To **change the default mail client in Ubuntu** from Thunderbird to another application open System Settings > Details > Default Applications. Click the drop-down menu next to ‘Mail’ and choose your preferred client from the list. - -To **set Gmail as the default mail client in Ubuntu** you must first install the ‘gnome-gmail’ package by hitting the button below. Once installed open System Settings > Details > Default Applications. Click the drop-down menu next to ‘Mail’ and choose ‘Gmail’ from the list. - -- [Install GNOME Gmail in Ubuntu][9]. - -### Going Further ### - -The same steps listed above can be used to make your favourite music player open when double clicking on a music file, have an application like VLC handle your .avi and .mp4 files, and so on. --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/04/change-your-default-web-browser-in-ubuntu - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://wiki.gnome.org/Apps/Web -[2]:https://apps.ubuntu.com/cat/applications/chromium-browser/ -[3]:https://wiki.debian.org/Iceweasel -[4]:https://www.google.co.uk/chrome/browser/desktop/ -[5]:http://www.opera.com/computer/linux -[6]:https://vivaldi.com/#Download -[7]:http://en.wikipedia.org/wiki/Mailto -[8]:http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update -[9]:apt://gnome-gmail \ No newline at end of file diff --git a/translated/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md b/translated/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md new file mode 100644 index 0000000000..5e7413e37d --- /dev/null +++ b/translated/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md @@ -0,0 +1,77 @@ +如何在 Ubuntu 中更改默认浏览器和 Email 客户端 +================================================================================ +Ubuntu 自带了一些已经预装的默认应用程序,包括非常流行的 Mozilla 火狐浏览器和 Thunderbird 的 e-mail 客户端。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/web-browser.png) + +尽管这两个应用都有它们自己的粉丝,但是没有一个应用能符合每个人的口味和需要。我们经常收到邮件或者推文,询问我们怎样可以在 Ubuntu 上更改默认浏览器或者设置处理邮件链接的不同的电子邮件客户端等。 + +我们在这里不仅讨论如何安装不同的软件,还包括如何给一个特定的文件,链接或者内容类型设置系统处理应用。 + +在 Ubuntu 中更改默认应用程序,包括浏览器、电子邮件客户端、文本编辑器、音乐和视频播放器都非常的简单。但并不是每个人都知道更改这些的设置面板在哪里,让我们来快速看一下吧。 + +### 如何在 Ubuntu 上更改默认浏览器 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/change-default-browser-in-ubuntu-750x402.jpg) + +Mozilla 火狐浏览器是万维网上稳定、开源而且可依赖的窗口,但它并不是每个人的选择。这都没关系。 + +在 Ubuntu 上使用不同的默认浏览器,首先,显而易见,你需要安装一个新的浏览器。你该怎么做取决于你想要的浏览器: + +- 开源浏览器,例如 [Epiphany][1], [Chromium][2] 和 [IceWeasel][3],可以从 Ubuntu 软件中心安装。 + +- 主流浏览器,例如 [Google Chrome][4], [Opera][5] 和 [Vivaldi][6] 必须从各自项目的官方网站上下载。 + +不管你选择哪个浏览器,不管你选择怎样安装,完成之后你就可以继续了。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/system-settings-ubuntu-300x215.jpg) + +点击其它应用上的链接,例如及时通讯软件、Twitter 客户端、 e-mail,要更改打开网页的默认浏览器,你需要用到 Ubuntu 系统设置工具。 + +你可以用多种方法打开系统设置。其中一种最快的方式是点击右上角(RTL系统是左上角)的 Cog 图标并选择‘系统设置’菜单快捷方式。 + +1. 打开‘系统设置’ +1. 选择‘详细’选项 +1. 在侧边栏选择‘默认应用程序’ +1. 把 ‘Web’ 条目的 ‘火狐’ 改为你想要的选项 + +就是这样。 + +### 如何在 Ubuntu 上更改默认的邮件客户端 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/CHANGE-DEFAULT-APPS-UBUNTU.jpg) + +Ubuntu 用 Thunderbird 作为默认的邮件应用程序。这意味着 当你点击大部分浏览器、 PDF文件、及时通讯软件等上的 **电子邮件地址或者一个 [mailto 链接][7] 的时候会自动打开** 这个应用。 + +当然,如果你使用 Thunderbird,这真的很方便。但是我们很多人并非如此; 我们可能**[使用像 Geary 这样的轻量级客户端][8]**,GNOME stalwart Evolution,或者依靠像 Gmail 或者 Outlook 这样的网络邮件服务。 + +在 Ubuntu 上从 Thunderbird **更改默认邮件客户端** 到另一个应用程序,打开系统设置 > 详细 > 默认应用程序。点击下拉菜单到 ‘Mail’ 并选择从列表中选择你喜欢的客户端。 + +**在 Ubuntu 上设置 Gmail 为默认的邮件客户端**,你首先需要点击下面的按钮安装 ‘gnome-gmail’ 软件包。安装完后打开系统设置 > 详细 > 默认应用程序。点击下拉菜单到 ‘Mail’ 并选择从列表中选择 ‘Gmail’。 + +- [在 Ubuntu 上安装 GNOME Gmail][9] + +### 更多 ### + +上述同样的步骤可以用来设置你双击音乐文件时打开你喜欢的音乐播放器,用比如 VLC 应用程序处理 .avi 和 .mp4 文件,等等。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/change-your-default-web-browser-in-ubuntu + +作者:[Joey-Elijah Sneddon][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://wiki.gnome.org/Apps/Web +[2]:https://apps.ubuntu.com/cat/applications/chromium-browser/ +[3]:https://wiki.debian.org/Iceweasel +[4]:https://www.google.co.uk/chrome/browser/desktop/ +[5]:http://www.opera.com/computer/linux +[6]:https://vivaldi.com/#Download +[7]:http://en.wikipedia.org/wiki/Mailto +[8]:http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update +[9]:apt://gnome-gmail \ No newline at end of file From dad6cf4cd78249c123b7debc75faffd8b886b91d Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 24 Apr 2015 14:03:50 +0800 Subject: [PATCH 0619/2517] [Translated] tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux --- ... Private interface to Internet in Linux.md | 76 ------------------- ... Private interface to Internet in Linux.md | 75 ++++++++++++++++++ 2 files changed, 75 insertions(+), 76 deletions(-) delete mode 100644 sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md create mode 100644 translated/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md diff --git a/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md b/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md deleted file mode 100644 index 966fb0a2ab..0000000000 --- a/sources/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md +++ /dev/null @@ -1,76 +0,0 @@ -Translating by ictlyh -How IP forwarding Helps Connecting Private interface to Internet in Linux -================================================================================ -Hi everyone, today we'll learn about IP forwarding or Packet forwarding from one network interface to another in Linux using iptables. IP forwarding is a concept to make Linux machine to send data from one network to another as a router. So, it can be used as a **router** or a proxy server that can share internet or network connection from one connection to multiple client machines. - -Here are some easy steps to enable IP Forwarding or Network packets forwarding method. - -### 1. Enabling IPv4 Forwarding ### - -First of all, we'll gonna enable IPv4 forwarding in our Linux Operating System. To do that, we'll need to execute the following command in a shell or a terminal under sudo mode. - - $ sudo -s - - # echo 1 > /proc/sys/net/ipv4/ip_forward - -![Temporary IP Forwarding](http://blog.linoxide.com/wp-content/uploads/2015/03/ip-forward-temporary.png) - -**Note: the above command is enables ip forwarding instantly and temporarily until the next reboot. To enable it permanently, we'll need to open /etc/sysctl.conf using our favorite text editor.** - - # nano /etc/sysctl.conf - -Then, add **net.ipv4.ip_forward = 1** into that file or uncomment that line then, we'll need to save and exit that file. - - net.ipv4.ip_forward = 1 - -![Editing Sysctl](http://blog.linoxide.com/wp-content/uploads/2015/03/sysctl-edit.png) - -To enable the changes made run the following command. - - # sysctl -p /etc/sysctl.conf - -![Enabling Sysctl Changes](http://blog.linoxide.com/wp-content/uploads/2015/03/enabling-changes-sysctl.png) - -### 2. Configuring Iptables firewall ### - -We'll need to allow specific (or all of the) packets to traverse our router. Before that, we'll need to know the interface name of the network devices connected with our Linux box. To get the interface name, we can simply run the following command in a terminal or a shell. - - # ifconfig -a - -![Ifconfig](http://blog.linoxide.com/wp-content/uploads/2015/03/ifconfig.png) - -Here, in our box we have eth2 as network interface which is connected to the internet or a network and wlan2 is the interface where we need to forward the network packets from eth2 using iptables. So, to do so, we'll need to run the following command. - - # iptables -A FORWARD -i wlan2 -o eth2 -j ACCEPT - -Note: Please replace wlan2 and eth2 with the device name available in your Linux box. - -Now, we'll need iptables to allow traffic for already established connections as netfilter is a stateless firewall. To do so, we'll need to run the following command. - - # iptables -A FORWARD -i eth2 -o wlan2 -m state --state ESTABLISHED,RELATED -j ACCEPT - -![Forwarding with iptables](http://blog.linoxide.com/wp-content/uploads/2015/03/forwarding-iptables.png) - -### 3. Configuring NAT ### - -Then, at last we'll need to change the source address as eth2 on packets going out to the internet by executing the command below. - - # iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE - -![configuring nat](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-nat.png) - -### Conclusion ### - -Finally, we've successfully configured Packet forwarding from one interface to another interface on our Linux machine having iptables installed as firewall solution. This article enables to connect your private interface to the internet, you don't need bridging the interfaces, you need to route packets coming in on one interface to the other one, thats all. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/firewall/ip-forwarding-connecting-private-interface-internet/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ \ No newline at end of file diff --git a/translated/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md b/translated/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md new file mode 100644 index 0000000000..a8ba20fff0 --- /dev/null +++ b/translated/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md @@ -0,0 +1,75 @@ +Linux 上IP转发如何帮助专用接口连接到互联网 +================================================================================ +大家好,今天我们学习一下在 Linux 上用 iptables 实现从一个网络接口到另一个接口的IP转发或者数据包转发。IP转发的概念是,使 Linux 机器像路由器一样将数据从一个网络发送到另一个网络。所以,它能作为一个**路由器**或者代理服务器,实现从一个连接到多个客户端机器的共享互联网或者网络连接。 + +这是一些启用IP转发或网络包转发方法的简单步骤。 + +### 1. 启用 IPv4 转发 ### + +首先,我们打算在我们的 Linux 操作系统上启用 IPv4 转发。要做到这点,我们需要用 sudo 模式在 shell 或终端下执行下面的命令。 + + $ sudo -s + + # echo 1 > /proc/sys/net/ipv4/ip_forward + +![临时IP转发](http://blog.linoxide.com/wp-content/uploads/2015/03/ip-forward-temporary.png) + +**注意:上面的命令能马上启用ip转发,但只是临时的,直到下一次重启。要永久启用,我们需要使用我们喜欢的文本编辑器打开 /etc/sysctl.conf 文件。** + + # nano /etc/sysctl.conf + +然后,增加 **net.ipv4.ip_forward = 1** 到文件中,或者删除那行的注释,保存并退出文件。 + + net.ipv4.ip_forward = 1 + +![编辑 Sysctl](http://blog.linoxide.com/wp-content/uploads/2015/03/sysctl-edit.png) + +运行下面的命令启用更改。 + + # sysctl -p /etc/sysctl.conf + +![启用 Sysctl 更改](http://blog.linoxide.com/wp-content/uploads/2015/03/enabling-changes-sysctl.png) + +### 2. 配置 Iptables 防火墙 ### + +我们需要允许特定的(或者所有的)数据包通过我们的路由器。在这之前,我们要知道连接我们 Linux 的网络设备的接口名称。我们可以通过在终端或者 shell 运行以下命令获得接口名称。 + + # ifconfig -a + +![Ifconfig](http://blog.linoxide.com/wp-content/uploads/2015/03/ifconfig.png) + +这里,在我们的机器中, eth2 是连接到互联网或者网络的网卡接口, wlan2 是我们要使用 iptables 从 eth2 转发数据包的接口。要做到这点,我们需要运行以下命令。 + + # iptables -A FORWARD -i wlan2 -o eth2 -j ACCEPT + +注意:请用你 Linux 机器中的可用设备名称替换 wlan2 和 eth2。 + +现在,由于网络过滤器是一个无状态的防火墙,我们要用 iptables 允许已建立的连接通过。要做到这点,我们要运行下面的命令。 + + # iptables -A FORWARD -i eth2 -o wlan2 -m state --state ESTABLISHED,RELATED -j ACCEPT + +![用 iptables 转发](http://blog.linoxide.com/wp-content/uploads/2015/03/forwarding-iptables.png) + +### 3. 配置 NAT ### + +然后,最后我们需要通过执行下面的命令修改发送到互联网的数据包的源地址为 eth2。 + + # iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE + +![配置 nat](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-nat.png) + +### 总结 ### + +最后,用安装的 iptables 作为防火墙解决方案,我们在我们的 Linux 机器上成功的配置了从一个接口到另一个接口的数据包转发。这篇文章允许你的专用接口连接到互联网,你不需要桥接接口,而是路由从一个接口进来的数据包到另一个接口,就是这些。如果你有任何问题、建议、反馈,请写到下面的评论框中,然后我们可以改进或更新我们的内容。非常感谢!享受吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/firewall/ip-forwarding-connecting-private-interface-internet/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ \ No newline at end of file From 4791b39614bd483889ca2f430c716b17c3565fb8 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 24 Apr 2015 15:01:49 +0800 Subject: [PATCH 0620/2517] =?UTF-8?q?=E9=A2=86=E5=8F=96=20/20150415=20Stro?= =?UTF-8?q?ng=20SSL=20Security=20on=20nginx.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20150415 Strong SSL Security on nginx.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150415 Strong SSL Security on nginx.md b/sources/tech/20150415 Strong SSL Security on nginx.md index 82b12820ed..044ec9dd60 100644 --- a/sources/tech/20150415 Strong SSL Security on nginx.md +++ b/sources/tech/20150415 Strong SSL Security on nginx.md @@ -1,3 +1,4 @@ +// translating by wxy Strong SSL Security on nginx ================================================================================ [![](https://raymii.org/s/inc/img/ssl-labs-a.png)][1] From 93dd371890459fe622f43200b16cb8b2f7bde384 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 24 Apr 2015 15:02:53 +0800 Subject: [PATCH 0621/2517] Finish the translation by ZTinoZ --- ...h Answers--How to disable IPv6 on Linux.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {sources => translated}/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md (78%) diff --git a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/translated/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md similarity index 78% rename from sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md rename to translated/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md index 84da819899..30ad533adc 100644 --- a/sources/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md +++ b/translated/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -69,9 +69,9 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 #### 方法二 #### -An alternative way to disable IPv6 permanently is to pass a necessary kernel parameter via GRUB/GRUB2 during boot time. +另一个永久禁用IPv6的方法是在开机的时候执行一个必要的内核参数。 -Open /etc/default/grub with a text editor, and add "ipv6.disable=1" to GRUB_CMDLINE_LINUX variable. +用文本编辑器打开 /etc/default/grub 并给GRUB_CMDLINE_LINUX变量添加"ipv6.disable=1"。 $ sudo vi /etc/default/grub @@ -79,29 +79,29 @@ Open /etc/default/grub with a text editor, and add "ipv6.disable=1" to GRUB_CMDL GRUB_CMDLINE_LINUX="xxxxx ipv6.disable=1" -In the above, "xxxxx" denotes any existing kernel parameter(s). Add "ipv6.disable=1" after them. +上面的"xxxxx"代表任意存在着的内核参数,在它后面添加"ipv6.disable=1"。 ![](https://farm8.staticflickr.com/7286/15982512103_ec5d940e58_b.jpg) -Finally, don't forget to apply the modified GRUB/GRUB2 settings by running: +最后,不要忘记用以下方法保存对GRUB/GRUB2的修改: -On Debian, Ubuntu or Linux Mint: +Debian、Ubuntu或Linux Mint系统: $ sudo update-grub -On Fedora, CentOS/RHEL: +Fedora、CentOS/RHEL系统: $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg -Now IPv6 will be completely disabled once you reboot your Linux system. +现在只要你重启你的Linux系统,IPv6就会完全被禁用。 -### Other Optional Steps after Disabling IPv6 ### +### 禁用IPv6之后的其它可选步骤 ### -Here are a few optional steps you can consider after disabling IPv6. This is because while you disable IPv6 in the kernel, other programs may still try to use IPv6. In most cases, such application behaviors will not break things, but you want to disable IPv6 for them for efficiency or safety reason. +这里有一些可选步骤在你禁用IPv6后需要考虑,这是因为当你在内核里禁用IPv6后,其它程序仍然会尝试使用IPv6。在大多数情况下,例如应用程序的运转状态不太会遭到破坏,但是出于效率或安全方面的原因,你要为他们禁用IPv6。 #### /etc/hosts #### -Depending on your setup, /etc/hosts may contain one or more IPv6 hosts and their addresses. Open /etc/hosts with a text editor, and comment out all lines which contain IPv6 hosts. +根据你的设置, /etc/hosts 会包含一条或多条IPv6的hosts和它们的地址。用文本编辑器打开 /etc/hosts 并注释掉包含IPv6 hosts的脚本行。 $ sudo vi /etc/hosts @@ -116,7 +116,7 @@ Depending on your setup, /etc/hosts may contain one or more IPv6 hosts and their #### Network Manager #### -If you are using NetworkManager to manage your network settings, you can disable IPv6 on NetworkManager as follows. Open the wired connection on NetworkManager, click on "IPv6 Settings" tab, and choose "Ignore" in "Method" field. Save the change and exit. +如果你在用NetworkManager来管理你的网络设置,你可以在NetworkManager里禁用IPv6。在NetworkManager打开wired connection,点击"IPv6 Settings"选项并在"Method"一栏选择"Ignore",保存退出。 ![](https://farm8.staticflickr.com/7293/16394993017_21917f027b_o.png) @@ -124,7 +124,7 @@ If you are using NetworkManager to manage your network settings, you can disable 默认情况下,OpenSSH服务(sshd)会去尝试捆绑IPv4和IPv6的地址。 -To force sshd to bind only on IPv4 address, open /etc/ssh/sshd_config with a text editor, and add the following line. inet is for IPv4 only, and inet6 is for IPv6 only. +要强制sshd只捆绑IPv4地址,用文本编辑器打开 /etc/ssh/sshd_config 并添加以下脚本行。inet只适用于IPv4,而inet6是适用于IPv6的。 $ sudo vi /etc/ssh/sshd_config From 38bf5cdfdac3ba8af3d8342f910198da93a923ab Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Fri, 24 Apr 2015 15:26:12 +0800 Subject: [PATCH 0622/2517] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AB=E5=B0=BE?= =?UTF-8?q?=E8=AF=91=E8=80=85ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...420 7 Interesting Linux 'sort' Command Examples--Part 2.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md index 37312ffa16..4602424a3a 100644 --- a/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md +++ b/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md @@ -116,13 +116,15 @@ Reports Disorder. Conflict.. ![Sort Join Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Join-Two-Files.gif) + 我所要讲的全部内容就在这里了,希望与各位保持联系,也希望各位经常来Tecmint逛逛。有反馈就在下面评论吧。 + -------------------------------------------------------------------------------- via: http://www.tecmint.com/linux-sort-command-examples/ 作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/DongShuaike) +译者:[DongShuaike](https://github.com/DongShuaike) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From fa7a5eb8bc6751301d1d5e5979d2dd3398fb474a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 24 Apr 2015 16:20:18 +0800 Subject: [PATCH 0623/2517] =?UTF-8?q?20150424-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inimal RHEL or CentOS 7 Installation--1.md | 216 +++++++++++++++ ...inimal RHEL or CentOS 7 Installation--2.md | 144 ++++++++++ ...inimal RHEL or CentOS 7 Installation--3.md | 253 ++++++++++++++++++ ...inimal RHEL or CentOS 7 Installation--4.md | 176 ++++++++++++ ...inimal RHEL or CentOS 7 Installation--5.md | 135 ++++++++++ ...inimal RHEL or CentOS 7 Installation--6.md | 80 ++++++ 6 files changed, 1004 insertions(+) create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md create mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md new file mode 100644 index 0000000000..06c7c950f8 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md @@ -0,0 +1,216 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--1 +================================================================================ +CentOS is a Industry Standard Linux Distribution which is a derivative of RedHat Enterprise Linux. You may start using the OS as soon as you install it, but to make the most out of your system you need to perform a few updates, install a few packages, configure certain services and application. + +This article aims at “30 Things to Do After Installing RHEL/CentOS 7”. The post is written keeping in mind you have installed RHEL/CentOS Minimal Install which is preferred in Enterprise and production environment, if not you can follow below guide that will show you minimal installations of both. + +- [Installation of CentOS 7 Minimal][1] +- [Installation of RHEL 7 Minimal][2] + +The following are the list of important things, which we’ve covered in this guide based on industry standard requirements. We hoping that, these things will be very helpful in setting up your server. + +1. Register and Enable Red Hat Subscription +2. Configure Network with Static IP Address +3. Set Hostname of Server +4. Update or Upgrade CentOS Minimal Install +5. Install Command Line Web Browser +6. Install Apache HTTP Server +7. Install PHP +8. Install MariaDB Database +9. Install and Configure SSH Server +10. Install GCC (GNU Compiler Collection) +11. Install Java +12. Install Apache Tomcat +13. Install Nmap to Monitor Open Ports +14. FirewallD Configuration +15. Installing Wget +16. Installing Telnet +17. Installing Webmin +18. Enable Third Party Repositories +19. Install 7-zip Utility +20. Install NTFS-3G Driver +21. Install Vsftpd FTP Server +22. Install and Configure sudo +23. Install and Enable SELinux +24. Install Rootkit Hunter +25. Install Linux Malware Detect (LMD) +26. Server Bandwidth Testing with Speedtest-cli +27. Configure Cron Jobs +28. Install Owncloud +29. Enable Virtualization with Virtualbox +30. Password Protect GRUB + +### 1. Register and Enable Red Hat Subscription ### + +After minimal RHEL 7 installation, it’s time to register and enable your system to Red Hat Subscription repositories and perform a full system update. This is valid only if you have a valid RedHat Subscription. You need to register your in order to enable official RedHat System repositories and update the OS from time-to-time. + +We have already covered a detailed instructions on how to register and active RedHat subscription at the below guide. + +- [Register and Enable Red Hat Subscription Repositories in RHEL 7][3] + +**Note**: This step is only for RedHat Enterprise Linux having a valid subscription. If you are running a CentOS server immediately move to further steps. + +### 2. Configure Network with Static IP Address ### + +The first thing you need to do is to configure Static IP address, Route and DNS to your CentOS Server. We will be using ip command the replacement of ifconfig command. However, ifconfig command is still available for most of the Linux distributions and can be installed from default repository. + + # yum install net-tools [Provides ifconfig utility] + +![Install ifconfig in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ifconfig.jpeg) + +But as I said we will be using ip command to configure static IP address. So, make sure you first check the current IP address. + + # ip addr show + +![Check IP Address i n CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Check-IP-Address.jpeg) + +Now open and edit file /etc/sysconfig/network-scripts/ifcfg-enp0s3 using your choice of editor. Here, I’m using Vi editor and make sure you must be root user to make changes… + + # vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 + +Now we will be editing four fields in the file. Note the below four fields and leave everything else untouched. Also leave double quotes as it is and enter your data in between. + + IPADDR = “[Enter your static IP here]” + GATEWAY = “[Enter your Default Gateway]” + DNS1 = “[Your Domain Name System 1]” + DNS2 = “[Your Domain Name System 2]” + +After making the changes ‘ifcfg-enp0s3‘, looks something like the image below. Notice your IP, GATEWAY and DNS will vary, please confirm it with your ISP. Save and Exit. + +![Network Details](http://www.tecmint.com/wp-content/uploads/2015/04/Network-Details.jpeg) +Network Details + +Restart service network and check the IP is correct or not, that was assigned. If everything is ok, Ping to see network status… + + # service network restart + +![Restart Network Service](http://www.tecmint.com/wp-content/uploads/2015/04/Restarat-Network.jpeg) +Restart Network Service + +After restarting network, make sure to check the IP address and network status… + + # ip addr show + # ping -c4 google.com + +![Verify IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-IP-Address.jpeg) +Verify IP Address + +![Check Network Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Network-Status.jpeg) +Check Network Status + +### 3. Set Hostname of Server ### + +The next thing to do is to change the HOSTNAME of the CentOS sever. Check the currently assigned HOSTNAME. + + # echo $HOSTNAME + +![Check System Hostname](http://www.tecmint.com/wp-content/uploads/2015/04/Check-System-Hostname.jpeg) +Check System Hostname + +To set new HOSTNAME we need to edit ‘/etc/hostsname‘ and replace old hostname with the desired one. + + # vi /etc/hostname + +![Set Hostname in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Set-System-Hostname.jpeg) +Set System Hostname + +After setting hostname, make sure to confirm hostname by logout and login again. After login check new hostname. + + $ echo $HOSTNAME + +![Confirm New Hostname](http://www.tecmint.com/wp-content/uploads/2015/04/Confirm-Hostname.jpeg) +Confirm New Hostname + +Alternatively you may use command ‘hostname‘ command to view your current hotsname. + + $ hostname + +### 4. Update or Upgrade CentOS Minimal Install ### + +This will not install any new packages other than updating and installing the latest version of installed packages and security updates. Moreover Update and Upgrade are pretty same except the fact that Upgrade = Update + enable obsoletes processing during updates. + + # yum update && yum upgrade + +![Update Minimal CentOS Server](http://www.tecmint.com/wp-content/uploads/2015/04/Update-CentOS-Server.jpeg) +Update Minimal CentOS Server + +**Important**: You can also run the below command which will not prompt for the packages update and you do not need to type ‘y‘ for accepting the changes. + +However it is always a good idea to review the changes which is going to take place on the sever specially in production. Hence using the below command may automate the update and upgrade for you but it is not recommended. + + # yum -y update && yum -y upgrade + +### 5. Install Command Line Web Browser ### + +In most cases, specially in production environment, we usually install CentOS as command line with no GUI, in this situation we must have a commandline browsing tool to check websites via terminal. For this, we going to install a most famous tool called ‘links‘. + + # yum install links + +![Install Commandline Browser](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Commandline-Browser.jpeg) +Links: Commandline Web Browsing + +For usage and examples to browse web sites u links tool, read our article [Command Line Web Browsing with Links Tool][4] + +### 6. Install Apache HTTP Server ### + +No matter for what purpose you will be using the server, in most of the cases you need a HTTP server to run websites, multimedia, client side script and many other things. + + # yum install httpd + +![Install Apache on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-on-CentOS.jpeg.) +Install Apache Server + +If you would like to change default port (80) of Apache HTTP Server to any other port. You need to edit the configuration file ‘/etc/httpd/conf/httpd.conf‘ and search for the line that starts typically like: + + LISTEN 80 + +Change port number ‘80‘ to any other port (say 3221), save and exit. + +![Change Apache Port on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Change-Apache-Port.jpeg) +Change Apache Port + +Add the port you just opened for Apache through firewall and then reload firewall. + +Allow service http through firewall (Permanent). + + # firewall-cmd –add-service=http + +Allow port 3221 through firewall (Permanent). + + # firewall-cmd –permanent –add-port=3221/tcp + +Reload firewall. + + # firewall-cmd –reload + +After making all above things, now it’s time to restart Apache HTTP server, so that the new port number is taken into effect. + + # systemctl restart httpd.service + +Now add the Apache service to system-wide to start automatically when system boots. + + # systemctl start httpd.service + # systemctl enable httpd.service + +Now verify the Apache HTTP Server by using links command line tool as shown in the below screen. + + # links 127.0.0.1 + +![Verify Apache Status](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Apache-Status.jpeg) +Verify Apache Status + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/centos-7-installation/ +[2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ +[3]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ +[4]:http://www.tecmint.com/command-line-web-browsers/ \ No newline at end of file diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md new file mode 100644 index 0000000000..53d72d95d6 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md @@ -0,0 +1,144 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--2 +================================================================================ +### 7. Install PHP ### + +PHP is a server-side scripting language for web based services. It is frequently used as general-purpose programming language as well. Install PHP on CentOS Minimal Server as. + + # yum install php + +After installing php, make sure to restart Apache service to render PHP in Web Browser. + + # systemctl restart httpd.service + +Next, verify PHP by creating following php script in the Apache document root directory. + + # echo -e "" > /var/ww/html/phpinfo.php + +Now view the PHP file, we just created (phpinfo.php) in Linux Command Line as below. + + # php /var/www/html/phpinfo.php + OR + # links http://127.0.0.1/phpinfo.php + +![Verify PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-PHP.jpeg) +Verify PHP + +### 8. Install MariaDB Database ### + +MariaDB is a fork of MySQL. RedHat Enterprise Linux and its derivatives have shifted to MariaDB from MySQL. It is the Primary Database management System. It is again one of those tools which is necessary to have and you will need it sooner or later no matter what kind of server you are setting. Install MariaDB on CentOS Minimal Install server as below. + + # yum install mariadb-server mariadb + +![Install MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Database.jpeg) +Install MariaDB Database + +Start and configure MariaDB to start automatically at boot. + + # systemctl start mariadb.service + # systemctl enable mariadb.service + +Allow service mysql (mariadb) through firewall. + + # firewall-cmd –add-service=mysql + +Now it’s time to secure MariaDB server. + + # /usr/bin/mysql_secure_installation + +![Secure MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-MariaDB.jpeg) +Secure MariaDB Database + +Read Also: + +- [Installing LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin) in CentOS 7.0][1] +- [Creating Apache Virtual Hosts in CentOS 7.0][2] + +### 9. Install and Configure SSH Server ### + +SSH stands for Secure Shell which is the default protocol in Linux for remote management. SSH is one of those essential piece of software which comes default with CentOS Minimal Server. + +Check Currently Installed SSH version. + + # SSH -V + +![Check SSH Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SSH-Version.jpeg) +Check SSH Version + +Use Secure Protocol over the default SSH Protocol and change port number also for extra Security. Edit the SSH configuration file ‘/etc/ssh/ssh_config‘. + +Uncomment the line below line or delete 1 from the Protocol string, so the line seems like: + + # Protocol 2,1 (Original) + Protocol 2 (Now) + +This change force SSH to use Protocol 2 which is considered to be more secure than Protocol 1 and also make sure to change the port number 22 to any in the configuration. + +![Secure SSH Login](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-SSH.jpeg) +Secure SSH Login + +Disable SSH ‘root login‘ and allow to connect to root only after login to normal user account for added additional Security. For this, open and edit configuration file ‘/etc/ssh/sshd_config‘ and change PermitRootLogin yes t PermitRootLogin no. + + # PermitRootLogin yes (Original) + PermitRootLogin no (Now) + +![Disable SSH Root Login](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-SSH-Root-Login.jpeg) +Disable SSH Root Login + +Finally, restart SSH service to reflect new changes.. + + # systemctl restart sshd.service + +Read Also: + +- [5 Best Practices to Secure and Protect SSH Server][3] +- [SSH Passwordless Login Using SSH Keygen in 5 Easy Steps][4] +- [No Password SSH Keys Authentication” with PuTTY][5] + +### 10. Install GCC (GNU Compiler Collection) ### + +GCC stands for GNU Compiler Collection is a compiler system developed by GNU Project that support various programming languages. It is not installed by default in CentOS Minimal Install. To install gcc compiler run the below command. + + # yum install gcc + +![Install GCC in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-GCC-in-CentOS.jpeg) +Install GCC GNU Compiler + +Check the version of installed gcc. + + # gcc --version + +![Check GCC Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-GCC-Version.jpeg) +Check GCC Version + +### 11. Install Java ### + +Java is a general purpose class based, object-oriented Programming language. It is not installed by default in CentOS Minimal Server. Install Java from repository as below. + + # yum install java + +![Install Java on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-java.jpeg) +Install Java + +Check version of Java Installed. + + # java -version + +![Check Java Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Java-Version.jpeg) +Check Java Version + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/2/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/install-lamp-in-centos-7/ +[2]:http://www.tecmint.com/apache-virtual-hosting-in-centos/ +[3]:http://www.tecmint.com/5-best-practices-to-secure-and-protect-ssh-server/ +[4]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ +[5]:http://www.tecmint.com/ssh-passwordless-login-with-putty/ \ No newline at end of file diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md new file mode 100644 index 0000000000..b3996cf818 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md @@ -0,0 +1,253 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--3 +================================================================================ +### 12. Install Apache Tomcat ### + +Tomcat is a servlet container designed by Apache to run Java HTTP web server. Install tomcat as below but it is necessary to point out that you must have installed Java prior of installing tomcat. + + # yum install tomcat + +![Install Apache Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-Tomcat.jpeg) +Install Apache Tomcat + +After tomcat has been installed, star the tomcat service. + + # systemctl start tomcat + +Check Version of tomcat. + + # /usr/sbin/tomcat version + +![Check Tomcat Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-tomcat-version.jpeg) +Check Tomcat Version + +Add service tomcat and default port (8080) through firewall and reload settings. + + # firewall-cmd –zone=public –add-port=8080/tcp --permannet + # firewall-cmd –reload + +Now it’s time to secure tomcat server, create a user and a password to access and manage. We need to edit file ‘/etc/tomcat/tomcat-users.xml‘. See the section which looks like: + + + .... + + + + + + + + + + + + +![Secure Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-Tomcat.jpeg) +Secure Tomcat + +Here we added user “tecmint” to administer/manage tomcat using password “tecmint”. Stop and start the service tomcat so that the changes are taken into effect and enable tomcat service to start at system boot. + + # systemctl stop tomcat + # systemctl start tomcat + # systemctl enable tomcat.service + +Read Also: Installing and Configuring Apache Tomcat 8.0.9 in RHEL/CentOS 7.0/6.x + +### 13. Install Nmap to Monitor Open Ports ### + +Nmap for Network Mapper creates a map of the network by discovering host on which it is running as well as by analyzing network. nmap is not included in the default installation and you have to install it from repository. + + # yum install nmap + +![Install Nmap Monitoring Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Nmap.jpeg) +Install Nmap Monitoring Tool + +List all open ports and corresponding services using them on host. + + # namp 127.0.01 + +![Monitor Open Ports](http://www.tecmint.com/wp-content/uploads/2015/04/Monitor-Open-Ports.jpeg) +Monitor Open Ports + +You may also use firewall-cmd to list all the ports, however I find nmap more useful. + + # firewall-cmd –list-ports + +![Check Open Ports in Firewall](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Open-Ports-in-Firewall.jpeg) +Check Open Ports in Firewall + +Read Also: [29 Useful Nmap Command to Monitor Open Ports][1] + +### 14. FirewallD Configuration ### + +firewalld is a firewall service which manages the server dynamically. Firewalld removed iptables in CentOS 7. Firewalld is installed by default on RedHat Enterprise Linux and its derivatives by default. With iptables every change in order to be taken into effect needs to flush all the old rules and create new rules. + +However with firewalld, no flushing and recreating of new rules required and only changes are applied on the fly. + +Check if Firewalld is running or not. + + # systemctl status firewalld + OR + # firewall-cmd –state + +![Check Firewalld Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Status.jpeg) +Check Firewalld Status + +Get a list of all the zones. + + # firewall-cmd --get-zones + +![Check Firewalld Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Zones.jpeg) +Check Firewalld Zones + +To get details on a zone before switching. + + # firewall-cmd --zone=work --list-all + +![Check Zone Details](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Zone-Details.jpeg) +Check Zone Details + +To get default zone. + + # firewall-cmd --get-default-zone + +![Firewalld Default Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Firewalld-Default-Zone.jpeg) +Firewalld Default Zone + +To switch to a different zone say ‘work‘. + + # firewall-cmd --set-default-zone=work + +![Swich Firewalld Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Swich-Zones.jpeg) +Swich Firewalld Zones + +To list all the services in the zone. + + # firewall-cmd --list-services + +![List Firewalld Zone Services](http://www.tecmint.com/wp-content/uploads/2015/04/List-Firewalld-Service.jpeg) +List Firewalld Zone Services + +To add a service say http, temporarily and reload firewalld. + + # firewall-cmd --add-service=http + # firewall-cmd –reload + +Add http Service Temporarily + +Add http Service Temporarily + +To add a service say http, permanently and reload firewalld. + +# firewall-cmd --add-service=http --permanent +# firewall-cmd --reload + +![Add http Service Permanent](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Temporarily.jpeg) +Add http Service Permanent + +To remove a service say http, temporarily. + + # firewall-cmd --remove-service=http + # firewall-cmd --reload + +![Remove Firewalld Service Temporarily](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Permanent.jpeg) +Remove Firewalld Service Temporarily + +To remove a service say http, permanently. + + # firewall-cmd --zone=work --remove-service=http --permanent + # firewall-cmd --reload + +![Remove Service Permanently](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Service-Parmanently.jpeg) +Remove Service Permanently + +To allow a port (say 331), temporarily. + + # firewall-cmd --add-port=331/tcp + # firewall-cmd --reload + +![Open Firewalld Port Temporarily](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Temporarily.jpeg) +Open Port Temporarily + +To allow a port (say 331), permanently. + + # firewall-cmd --add-port=331/tcp --permanent + # firewall-cmd --reload + +![Open Port in Firewalld Permanent](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Permanent.jpeg) +Open Port Permanently + +To block/remove a port (say 331), temporarily. + + # firewall-cmd --remove-port=331/tcp + # firewall-cmd --reload + +![Remove Port Temporarily in Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Temporarily.jpeg) +Remove Port Temporarily + +To block/remove a port (say 331), permanently. + + # firewall-cmd --remove-port=331/tcp --permanent + # firewall-cmd --reload + +![Remove Port Permanently in Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Permanently.jpeg) +Remove Port Permanently + +To disable firewalld. + + # systemctl stop firewalld + # systemctl disable firewalld + # firewall-cmd --state + +![Disable Firewalld in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-Firewalld.jpeg) +Disable Firewalld Service + +To enable firewalld. + + # systemctl enable firewalld + # systemctl start firewalld + # firewall-cmd --state + +![Enable Firewalld in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Firewalld.jpeg) +Enable Firewalld + +- [How to Configure ‘FirewallD’ in RHEL/CentOS 7][2] +- [Useful ‘FirewallD’ Rules to Configure and Manage Firewall][3] + +### 15. Installing Wget ### + +wget is a Linux command line based utility that retrieves (downloads) content from web servers. It is an important tool you must have to retrieve web contents or download any files using wget command. + + # yum install wget + +![Install Wget Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Wget.png) +Install Wget Tool + +For more usage and practical examples on how to use wget command to download files on the terminal, read [10 Wget Command Examples][4]. + +### 16. Installing Telnet ### + +Telnet is a network protocol that enables a user to login into another computer on the same network over TCP/IP. Once connection etablished to the remote computer it becomes a virtual terminal and allow you to communicate with the remote host within your computer as per whatever privileges provided to you. + +Telnet also very useful for checking listening ports on remote computer or host. + + # yum install telnet + # telnet google.com 80 + +![Telnet Port Checking](http://www.tecmint.com/wp-content/uploads/2015/04/telnet-testing.png) +Telnet Port Checking + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/3/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/nmap-command-examples/ +[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ +[3]:http://www.tecmint.com/firewalld-rules-for-centos-7/ +[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md new file mode 100644 index 0000000000..1840511000 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md @@ -0,0 +1,176 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--4 +================================================================================ +### 17. Installing Webmin ### + +Webmin is a Web based configuration tool for Linux. It acts as a central system to configure various system configuration like users, disk quota, services and configurations of HTTP server, Apache, MySQL, etc. + + # wget http://prdownloads.sourceforge.net/webadmin/webmin-1.740-1.noarch.rpm + # rpm -ivh webmin-*.rpm + +![Install Webmin on CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Webmin.jpeg) +Install Webmin + +After webmin installation, you will get a message on terminal to login to your host (http://ip-address:10000) using your root password on port number 10000. If running a headless server you can forward the port and access it on a machine/server that is headed. + +### 18. Enable Third Party Repositories ### + +It is not a good idea to add untrusted repositories specially in production and it may be fatal. However just for example here we will be adding a few community approved trusted repositories to install third party tools and packages. + +Add Extra Package for Enterprise Linux (EPEL) Repository. + + # yum install epel-release + +Add Community Enterprise Linux Repository. + + # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm + +![Install Epel Repo](http://www.tecmint.com/wp-content/uploads/2015/04/install-epel-repo.jpeg) +Install Epel Repo + +**Attention**! Extra care is needs to be taken while adding Third Party Repository. + +### 19. Install 7-zip Utility ### + +In the CentOS Minimal Install you don’t get utility like unzip or unrar. We have the option to install each utility as required or an utility that servers for all. 7-zip is such an utility which compress and extract files of all known types. + + # yum install p7zip + +![Install 7zip Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-7zip-tool.jpeg) +Install 7zip Tool + +**Notice**: The package is downloaded and installed from Fedora EPEL 7 Repository. + +### 20. Install NTFS-3G Driver ### + +A small yet very useful NTFS driver called NTFS-3G is available for most of the UNIX-like distribution. It is useful to mount and access Windows NTFS file system. Though other alternatives like Tuxera NTFS is available, NTFS-3G is most widely used. + + # yum install ntfs-3g + +![Install NTFS-3G in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-NTFS-3G.jpeg) +Install NTFS-3G to Mount Windows Partition + +After installing ntfs-3g has been installed, you can mount Windows NTFS partitions (where /dev/sda5 is my windows drive) using following command. + + # mount -ro ntfs-3g /dev/sda5 /mnt + # cd /mnt + # ls -l + +### 21. Install Vsftpd FTP Server ### + +VSFTPD which stands for Very Secure File Transfer Protocol Daemon is a FTP server for UNIX-like System. It is one of the most efficient and secure FTP Server available today. + + # yum install vsftpd + +![Install Vsftpd in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-FTP.jpeg) +Install Vsftpd FTP + +Edit the configuration file located at ‘/etc/vsftpd/vsftpd.conf‘ to secure vsftpd. + + # vi /etc/vsftpd/vsftpd.conf + +Edit a few fields and leave other as it is, unless you know what you are doing. + + anonymous_enable=NO + local_enable=YES + write_enable=YES + chroot_local_user=YES + +You may also change the port number and open vsftpd port through the firewall. + + # firewall-cmd --add-port=21/tcp + # firewall-cmd --reload + +Next restart vsftpd and enable to start at boot time. + + # systemctl restart vsftpd + # systemctl enable vsftpd + +### 22. Install and Configure sudo ### + +sudo which is commonly called as super do as well as suitable user do is a program for UNIX-like operating system to execute a program with the security privileged of another user. Let’s see how to configure sudo… + + # visudo + +It will open the file /etc/sudoers for editing.. + +![sudoers File](http://www.tecmint.com/wp-content/uploads/2015/04/sudoers-File.jpeg) +sudoers File + +Give all the permission (equal to root) to a user (say tecmint), that has already been created. + + tecmint ALL=(ALL) ALL + +Give all the permission (equal to root) to a user (say tecmint), except the permission to reboot and shutdown the server. + +Again open the same file and edit it with the below contents. + + cmnd_Alias nopermit = /sbin/shutdown, /sbin/reboot + +Then add alias with Logical (!) operator. + + tecmint ALL=(ALL) ALL,!nopermit + +Give permission to a group (say debian) to run a few root privilege command say (add user and delete user) . + + cmnd_Alias permit = /usr/sbin/useradd, /usr/sbin/userdel + +And then add the permission to group debian. + + debian ALL=(ALL) permit + +### 23. Install and Enable SELinux ### + +SELinux which stands for Security-Enhanced Linux is a security module at kernel level. + +# yum install selinux-policy + +![Install SElinux in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-SElinux.jpeg) +Install SElinux Policy + +Check SELinux Mode. + + # getenforce + +![Check SELinux Mode](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SELinux-Mode.jpeg) +Check SELinux Mode + +The output is enforcing mode which means SELinux policy is in effect. + +For debugging, set selinux mode to permissive temporarily. No need to reboot. + + # setenforce 0 + +After debugging set selinux to enforcing again without rebooting. + + # setenforce 1 + +### 24. Install Rootkit Hunter ### + +Rootkit Hunter abbreviated as Rkhunter is an application that scan rootkits and other potentially harmful exploits in Linux systems. + + # yum install rkhunter + +![Install Rootkit Hunter](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Rootkit-Hunter.jpeg) +Install Rootkit Hunter + +Run rkhunter as a scheduled job, from a script file or manually to scan harmful exploits in Linux. + + # rkhunter --check + +![Scan for rootkits](http://www.tecmint.com/wp-content/uploads/2015/04/Scan-for-rootkits.png) +Scan for rootkits + +![RootKit Scan Results](http://www.tecmint.com/wp-content/uploads/2015/04/RootKit-Results.png) +RootKit Scan Results + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/4/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ \ No newline at end of file diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md new file mode 100644 index 0000000000..741df9a537 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md @@ -0,0 +1,135 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--5 +================================================================================ +### 25. Install Linux Malware Detect (LMD) ### + +Linux Malware Detect (LMD) is a open source Linux malware scanner released under the GNU GPLv2 license, that is +specially designed for threats faced in hosting environments. For complete installation, configuration and usage of LMD can be found at: + +- [Install and Use (LMD) with ClamAV as Antivirus Engine][1] + +### 26. Server Bandwidth Testing with Speedtest-cli ### + +speedtest-cli is a tool written in python to test internet bandwidth including download and upload speed. For complete installation and usage of speedtest-cli tool, read our article at [Check Linux Server Bandwidth Speed from Command Line][2] + +### 27. Configure Cron Jobs ### + +This is one of the most widely used software utility. It function as job scheduler i.e., schedule a job now that will execute in future itself. It is useful in logging and maintaining records unattained as well as several other routine work like regular backup. All the schedule is written in /etc/crontab file. + +The crontab file contains 6 fields as follows: + + Minutes Hour Day of Month Month of Year Week Day Command + (0-59) (0-23) (1-31) (1/jan-12/dec) (0-6/sun-sat) Command/script + +![Crontab Fields](http://www.tecmint.com/wp-content/uploads/2015/04/Crontab-Fields.jpeg) +Crontab Fields + +To run a cron job (say run /home/$USER/script.sh) everyday at 04:30 am. + + Minutes Hour Day of Month month of year Week Day command + 30 4 * * * speedtest-cli + +Add the following entry to the crontab file ‘/etc/crontab/‘. + + 30 4 * * * /home/$user/script.sh + +After adding the above line to crontab, it will run automatically at 04:30 am everyday and the output depends upon what is there in script file. Moreover script can be replaced by commands. For more examples of cron jobs, read [11 Cron Jobs Examples in Linux][3] + +### 28. Install Owncloud ### + +Owncloud is a HTTP based data synchronization, file sharing and remote file storage application. For more detail on installing own cloud, you may like to see this article : [Create Personal/Private Cloud Storage in Linux][4] + +### 29. Enable Virtualization with Virtualbox ### + +Virtualization is a process of creating virtual OS, Hardware and Network, is one of the most sought technology of these days. We will be discussing on how to install and configure virtualization in detail. + +Our CentOS Minimal server is a headless server. Lets prepare it to host virtual machines that is accessible over HTTP by installing following packages. + + # yum groupinstall 'Development Tools' SDL kernel-devel kernel-headers dkms + +![Install Development Tools](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Development-Tool.jpeg) +Install Development Tools + +Change working directory to ‘/etc/yum.repos.d/‘ and download Virtualbox repository. + + # wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc + +Install the key just downloaded. + + # rpm --import oracle_vbox.asc + +Update and Install Virtualbox. + + # yum update && yum install virtualbox-4.3 + +Next, download and install Virtualbox extension pack. + + # wget http://download.virtualbox.org/virtualbox/4.3.12/Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack + # VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack + +![Install Virtualbox Extension Pack](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Virtualbox-Extension-Pack.jpeg) +Install Virtualbox Extension Pack + +![Installing Virtualbox Extension Pack](http://www.tecmint.com/wp-content/uploads/2015/04/Installing-Virtualbox-Extension-Pack.jpeg) +Installing Virtualbox Extension Pack + +Create a user ‘vbox‘ to manage virtualbox and add it to group vboxusers. + + # adduser vbox + # passwd vobx + # usermod -G vboxusers vbox + +Install HTTPD server. + + # yum install httpd + +Install PHP (with soap extension). + + # yum install php php-devel php-common php-soap php-gd + +Download PHP virtualBox. + + # wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-1.zip + +Extract the zip and copy the extracted folder to HTTP working directory. + + # unzip phpvirtualbox-4.*.zip + # cp phpvirtualbox-4.3-1 -R /var/www/html + +Next, rename file /var/www/html/phpvirtualbox/config.php-example to var/www/html/phpvirtualbox/config.php. + + # mv config.php.example config.php + +Open the configuration file to edit and add ‘username‘ and ‘password‘ we just created in the above step. + + # vi config.php + +Finally, restart VirtualBox and HTTP server. + + # service vbox-service restart + # service httpd restart + +Now forward the port and access it on a headed server. + + http://192.168.0.15/phpvirtualbox-4.3-1/ + +![PHP Virtualbox Login](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox-Login.png) +PHP Virtualbox Login + +![PHP Virtualbox Dashboard](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox.png) +PHP Virtualbox Dashboard + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/5/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora/ +[2]:http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ +[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ +[4]:http://www.tecmint.com/install-owncloud-to-create-personal-storage-in-linux/ \ No newline at end of file diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md new file mode 100644 index 0000000000..04ea64d2f4 --- /dev/null +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md @@ -0,0 +1,80 @@ +30 Things to Do After Minimal RHEL/CentOS 7 Installation--6 +================================================================================ +### 30. Password Protect GRUB ### + +Password protect your boot loader so that you get an additional level of security right at the booting time. Also you get a protection layer of protection at physical level. Protect your Server by locking GRUB at boot to avoid any unauthorized access. + +First make backup of two files, so that if anything goes bad, you have the option to revert back. Create a backup of ‘/etc/grub2/grub.cfg‘ as ‘/etc/grub2/grub.cfg.old‘. + + # cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.old + +Also, Create a backup of ‘/etc/grub.d/10_linux‘ as ‘/etc/grub.d/10_linux.old‘. + + # cp /etc/grub.d/10_linux /etc/grub.d/10_linux.old + +Now open ‘/etc/grub.d/10_linux‘ and add the below line at the end of the file. + + cat < Date: Fri, 24 Apr 2015 14:47:37 -0500 Subject: [PATCH 0624/2517] [Translating]20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md --- ...150407 Top 6 Ways To Get Your iTunes Experience On Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md b/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md index 194c3307e2..c64bc41f29 100644 --- a/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md +++ b/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md @@ -1,3 +1,4 @@ +KevinSJ translating Top 6 Ways To Get Your iTunes Experience On Linux ================================================================================ ![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/itunes-linux-840x420.jpg?35dc20) @@ -83,4 +84,4 @@ via: http://www.makeuseof.com/tag/top-6-ways-get-itunes-experience-linux/ [8]:http://www.makeuseof.com/tag/play-manage-music-collection-rhythmbox-linux/ [9]:https://www.clementine-player.org/ [10]:http://www.makeuseof.com/tag/need-a-lightweight-music-player-without-sacrificing-features-clementine-cross-platform/ -[11]:http://music.google.com/ \ No newline at end of file +[11]:http://music.google.com/ From 7924c84154ae0bccbd1f0b81872cfc8880c34278 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Fri, 24 Apr 2015 23:23:42 -0500 Subject: [PATCH 0625/2517] Update and rename sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md to translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md translated --- ... To Get Your iTunes Experience On Linux.md | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) rename {sources => translated}/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md (60%) diff --git a/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md b/translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md similarity index 60% rename from sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md rename to translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md index c64bc41f29..5e5d0e213a 100644 --- a/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md +++ b/translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md @@ -1,16 +1,29 @@ -KevinSJ translating +六种在 Linux 上带来 iTunes 体验的方法 Top 6 Ways To Get Your iTunes Experience On Linux ================================================================================ ![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/itunes-linux-840x420.jpg?35dc20) +随着你对 Linux 的熟悉(也许会成为你首要使用的操作系统),你最终会寻找能在Linux上有效管理音乐的工具。你首先想到了 iTunes,因为它是近几年最流行的音乐管理工具,但你马上会发现iTunes并没有Linux版本。而且,你会发现还有比 iTunes 更好的音乐管理工具。 As you’re getting used to Linux (potentially as your new main operating system), you’ll eventually try to find a way to efficiently manage your music. iTunes comes to mind because it’s been the most popular way to manage music over the years, but you’ll quickly find out that iTunes isn’t available natively on Linux. Plus, better ways exist to manage your music now that it’s 2015. +尽管如此,这并不意味着你就不能使用你喜欢的方式管理音乐。Linux 上有很多方式可以让你整理你的音乐库。以下六种,仅供参考: However, that doesn’t automatically mean that you won’t be able to manage your music the way you want to. There’s plenty of other ways to keep tabs on your music library. Here’s six great ways to get it done. +### 在WINE上运行iTunes ### ### iTunes via WINE ### +尽管 iTunes 没有Linux版,你还是可以试试 [使用 WINE 运行 iTunes ][1] 或 PlayOnLinux 的。这些软件给本来只能运行于Windows下的应用程序添加了一个兼容层,这样就能让他们运行在Linux上了,但这样的方法效果十有分限。因此 [并非所有 Windows 应用程序都能使用WINE运行][2] - 但这还是一个值得尝试的方法。 Even if iTunes isn’t available in Linux as a native application, you can still try to [get it to work under WINE][1] or PlayOnLinux. These pieces of software try to add a compatibility layer so that Windows applications work on Linux, but the results are far from perfect. Therefore, [not all Windows applications will run with WINE][2] — but it’s still worth a try. +各个版本的iTunes结果可能给你不同的结果,但一般都遵循以下方法: +1. 安装WINE +1. 在WINE里运行iTunes安装程序 +1. 在网上搜索并解决你遇到的问题。 + +如果你在安装时遇到无法解决的问题,比如安装程序错误,或者安装好的程序运行不了,那是没办法的,WINE 就是这样 + +如果你想在 WINE 上运行 iTunes 但恰好运行不了的话,没问题。但如果你还想考虑运行一个原生的Linux的话,还有很多其他选择的。这些音乐管理软件狗能让你很方便的管理你的音乐并直接进行播放,还可以制作播放列表。 + Each version of iTunes can give you different results, but the general process is as follows: 1. Install WINE @@ -25,50 +38,65 @@ If you really want to use iTunes and you happen to luck out with WINE, then that ![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/amarok_main.jpg?35dc20) +如果你使用KDE环境,我推荐 Amarok。它具有 [很多管理音乐的特性][4] 而且他还能与KDE桌面环境无缝兼容。它很有很多实用的特性如无缝兼容 Last.FM,文件跟踪,动态播放列表及个吃支持。它甚至会自动在你播放曲目时,自动下载艺术家封面。 + If you use KDE, then I’d recommend Amarok. It has [plenty of features to manage your music][4] and tight desktop integration with KDE. It also has useful features such as Last.FM integration, file tracking, dynamic playlists, and script support. It can even pull up biographies of artists as you play their songs. ### [Banshee][5] ### ![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/banshee_main.jpg?35dc20) +如果你使用 GNOME 或其他任何基于 GTK 的桌面环境(他们十分常见)的话,我推荐使用使用Bansee作为 [全功能音乐库管理工具][6] 。它的功能与Amarok类似,也与Last.FM无缝兼容,支持网络广播,支持podcast,还有很多其他功能。选择 Amarok 还是 Bansee 要看你使用的桌面环境(这样才能无缝整合)。 + If you use GNOME or any GTK-based desktop environment (they’re quite common), then I’d recommend Banshee as a [full-featured music library][6] manager. It has a very similar feature set as Amarok, including Last.FM integration, Internet radio support, podcast support, and much more. Amarok and Banshee are really among the top two choices, so which one you choose should depend on which desktop environment you’re using (for integration’s sake). ### [Rhythmbox][7] ### ![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/rhythmbox_main.jpg?35dc20) +Rhythmbox是一个 基于GTK的桌环境下更 [轻量级的音乐库替代品][8]。尽管如此,它也还是有一些特性的。它也支持Last.FM,同时还能无缝播放并与其他如 Nautilus, XChat,及Pidgin 等进行整合。 Rhythmbox as a more [lightweight music library alternative][8] that is best used on GTK-based desktop environments. However, it still has quite a few features. You also get Last.FM support here, plus gapless playback and integration with various other applications such as Nautilus, XChat, and Pidgin. ### [Clementine][9] ### ![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/clementine_main.jpg?35dc20) +另一款叫 Clementine 的软件也值得我推荐,因为它的见面简洁、易用。它支持非常多的第三方服务例如Spotify,Digtal Imported 及Dropbox。Android系统上还有一款用作 Clementine 遥控的app。[Clementine是一个跨平台的][10] , 还支持Mac OS X 及 Windows。 Another application called Clementine also gets my recommendation with its clean and intuitive interface. It has tons of support for third-party services such as Spotify, Digitally Imported, and Dropbox. There’s also an Android app you can use as a remote control for Clementine. [Clementine is cross-platform][10] and available for Windows and Mac OS X. +这些程序都能很好的管理并播放你的音乐。唯一的问题是这些程序都不支持与 iOS 设备的整合, 而且目前还没有程序能做到这一点。但 iOS 经过很多改进后,已经足以不需要再连接到电脑了。 They all are excellent at managing and playing your music. The only downside to all of these is that there is no iOS device integration, and there’s currently no modern application that can do that. However, iOS has received enough improvements that it’s virtually unnecessary to connect it to a computer anymore. ### [Google Play Music][11] ### ![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/google_music.jpg?35dc20) +最后,如果上面的那些程序还不能满足你的需求的花,你可以试试 Google Play Music。这个在线服务也可以用作能播放音乐的音乐库管理工具,但他还有几个额外的好处。你可以上传所有的音乐,并且在所有能上网的设备上获取这些音乐。这也意味着你不需要在电脑或者移动设备之间同步你的音乐(无论是 Android 还是 iOS 设备),因为你可以这些设备中使用Google Play Music。 如果你想要扩展你的去库,你可以订阅 All Access,但这并不是必须的。你不需要支付任何费用也可在你的曲库中储存20,000首 Lastly, if none of those applications satisfy your needs, you can take a look at Google Play Music. This online service acts as a music library manager that can play your music, but it also has some extra benefits. You can upload all your music to it and have access on any device connected to the Internet. That also means that you won’t have to sync your music between your computer and your mobile device (no matter if Android or iOS) because you have access to Google Play Music from both. If you want to expand your library you can get the All Access subscription, but it’s not a requirement. You can use it simply as a music library completely free for up to 20,000 songs. +#### 靠,居然没有 Spotify ?! #### #### Wot, no Spotify?! #### +尽管 Spotify 也是一款管理和听音乐的方法,我不推荐它的唯一原因是它事实上并不让你管理你的音乐。你不能将曲目上传到 Spotify - 只能它们给你提供的曲目。尽管它们提供了很多,但原理都不尽相同。 The only reason why I don’t mention Spotify is that, although it’s also a great way to access and listen to music, it doesn’t really let you manage your own music. You can’t upload trakcs to Spotify — you have to listen to what they give you. Albeit they give you a lot, but it’s nonetheless a different mechanism. -### You Have Options ### +### 你还有其他选择 ### +### You Have Options ### + +以上六个软件应该可以在给你带来类似 iTunes 的功能了。这些软件主要是能让你管理和播放你的音乐库,但如果你还需要 iTunes 里的其他特性,其他Linux原生软件或许能满足这类需求。 With these six options, you should be able to get iTunes-like functionality on your desktop. These options focused mainly on managing and playing your music library, but if there are any other features that you need from iTunes, other Linux-native applications can take care of those needs. +**你通常在Linux上使用哪些音乐?**在下方评论与我们分享吧! **What music applications do you regularly use on Linux?** Let us know in the comments! + -------------------------------------------------------------------------------- via: http://www.makeuseof.com/tag/top-6-ways-get-itunes-experience-linux/ 作者:[Danny Stieben][a] -译者:[译者ID](https://github.com/译者ID) +译者:[KevinSJ](https://github.com/KevinSJ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1f74f0b42f6dd367dbf3bef749e0991e37c4bbdd Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 25 Apr 2015 16:50:37 +0800 Subject: [PATCH 0626/2517] [Translating] tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1,2 --- ...hings to Do After Minimal RHEL or CentOS 7 Installation--1.md | 1 + ...hings to Do After Minimal RHEL or CentOS 7 Installation--2.md | 1 + 2 files changed, 2 insertions(+) diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md index 06c7c950f8..7edee2be22 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--1 ================================================================================ CentOS is a Industry Standard Linux Distribution which is a derivative of RedHat Enterprise Linux. You may start using the OS as soon as you install it, but to make the most out of your system you need to perform a few updates, install a few packages, configure certain services and application. diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md index 53d72d95d6..a196cd1f1f 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--2 ================================================================================ ### 7. Install PHP ### From 8545d473444c6f231a3fafa5f21ec50533534e2d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Apr 2015 18:41:06 +0800 Subject: [PATCH 0627/2517] PUB:20150227 Chess in a Few Bytes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc 累死了,这里有不少生僻的术语,查了半天。不过你基本上都翻译对了。: D --- published/20150227 Chess in a Few Bytes.md | 116 ++++++++++++++++++ .../share/20150227 Chess in a Few Bytes.md | 114 ----------------- 2 files changed, 116 insertions(+), 114 deletions(-) create mode 100644 published/20150227 Chess in a Few Bytes.md delete mode 100644 translated/share/20150227 Chess in a Few Bytes.md diff --git a/published/20150227 Chess in a Few Bytes.md b/published/20150227 Chess in a Few Bytes.md new file mode 100644 index 0000000000..941f6de274 --- /dev/null +++ b/published/20150227 Chess in a Few Bytes.md @@ -0,0 +1,116 @@ +只有几百个字节大小的国际象棋程序 +================================================================================ + +当我在这里提到了 ZX81 电脑时,我已经暴露了我的年龄。ZX81 是一个由英国开发者(Sincilair 研究所)生产的家庭电脑,它拥有"高达" 1KB 的内存!上面的 1KB 并不是打印错误,这个家庭电脑确实只配置有 1KB 的板载内存。但这个内存大小上的限制并没有阻止爱好者制作种类繁多的软件。事实上,这个机器引发了一代编程奇才的出现,这让他们掌握了让程序在该机上运行起来的技能。这个机器可以通过一个 16 KB 的内存卡来进行升级,这就提供了更多的编程可能。但未经扩展的 1KB 机器仍然激励着编程者们发布卓越的软件。 + +![1K ZX Chess ](http://www.linuxlinks.com/portal/content2/reviews/Games2/1KZXChess.jpg) + +我最喜爱的 ZX81 游戏有: 模拟飞行(Flight Simulation), 3D 版怪物迷宫(3D Monster Maze), 小蜜蜂(Galaxians), 以及最重要的 1K ZX Chess。 只有最后一个程序是为未扩展版的 ZX81 电脑设计的。事实上,David Horne 开发的 1K ZX Chess 只使用了仅仅 672 字节的 RAM(LCTT 译注:如果读者有兴趣,可以看看[这里](http://users.ox.ac.uk/~uzdm0006/scans/1kchess/)对该程序的代码及解释)。尽管如此,该游戏尽力去实现大多数的国际象棋规则,并提供了一个计算机虚拟对手。虽然一些重要的规则被忽略了(如:王车易位,兵的升变,和吃过路兵) +(LCTT 译注:参考了[这里](http://zh.wikibooks.org/zh/%E5%9B%BD%E9%99%85%E8%B1%A1%E6%A3%8B/%E8%A7%84%E5%88%99)和[这里](http://en.wikipedia.org/wiki/Rules_of_chess)),但能够和人工智能相对抗,这仍然令人惊讶。这个游戏占据了我逝去的青春里的相当一部分。 + +1K ZX Chess 保持了在所有计算机上国际象棋的最小实现的地位长达 33 年之久,直到今年由 BootChess 打破了该记录,紧接着由 Toledo AtomChess 打破。这三个程序都没有实现所有的国际象棋规则,所以为了完整性,我介绍了我最喜爱的那些实现了所有国际象棋规则的极小的国际象棋。 + +Linux 有着一系列极其强大的国际象棋引擎,如 Stockfish, Critter, Togo II, Crafty, GNU Chess 和 Komodo 。 在这篇文章精选的国际象棋程序虽敌不过这些好的国际象棋程序,但它们展示了使用微不足道的代码库究竟可以实现多少东西。 + +---------- + +### Toledo Atomchess + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Toledo.png) + +你可能已经看到了大量有关 BootChess 新闻报道,这个只用 487 字节写就的国际象棋程序,一举打破了先前最小的国际象棋程序 1K ZX Chess 的记录。所以,Óscar Toledo Gutiérrez 挽起袖子自己编写了一个更加紧凑的国际象棋游戏。Toledo Atomchess 是仅有 481 字节的 x86 汇编代码,都能放到引导扇区里。 在难以置信的代码大小下,这个引擎实现了一个可玩的国际象棋游戏。 + +特点包括: + +- 基本的棋子移动 +- 用 ASCII 文本表现的棋盘 +- 以代数形式来输入移动(注:如 D2D4) +- 3 层的搜索深度 + +显然,为了将这个国际象棋程序压缩到 481 字节中,作者必须做出某些牺牲,这些局限包括: + +- 没有兵的升变 +- 没有王车易位 +- 没有吃过路兵 +- 没有移动确认 + +该作者也使用 C,JavaScript 和 Java 来写这个国际象棋程序,每种实现都非常小。 + +- 网站: [nanochess.org/chess6.html][1] +- 开发者: Óscar Toledo Gutiérrez +- 协议: 非商业用途可免费使用 +- 版本号: - + +---------- + +### BootChess + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-BootChess.png) + +BootChess 是一个国际象棋的极其小巧的计算机实现。这个程序被塞进到仅仅 487 字节里,并可运行在 Windows, Mac OS X 和 Linux 等操作系统。BootChess 的棋盘和棋子单独用文本表示,其中 P 代表兵, Q 用来代表王后,以及“点”代表空白格子。 + +特点包括: + +- 象棋棋盘和用户输入的形象的文本表示 +- 引导扇区大小(512 字节)的可玩的象棋游戏 +- 只需 x86 bios 硬件引导程序(没有软件依赖) +- 所有主要的正规移动包括双兵开局 +- 兵升变为王后(与 1k ZX Chess 相反) +- 名为 taxiMax > minMax half-ply 的 CPU 人工智能 +- 硬编码的西班牙白子开局 + +同样,它也存在一些重要的限制。这些遗漏的功能包括: + +- 兵的低升变(升变为非王后的棋子) +- 吃过路兵 +- 没有王车易位 +- 3 次位置重复和局规则(注:下一步之前,同样的移动出现了两次;可以参考[这里](http://www.netplaces.com/chess-basics/ending-the-game/three-position-repetition.htm)) +- 50 步移动和局规则(注:在连续的50个回合内,双方既没有棋子被吃掉,也没有兵被移动过,则和局;可以参考[这里](http://www.chessvariants.org/d.chess/chess.html)) +- 没有开放式和封闭式布局 +- 一个或多个 minMAX/negaMax 全层人工智能 + +- 网站: [www.pouet.net/prod.php?which=64962][2] +- 开发者: Olivier "Baudsurfer/RSi" Poudade +- 协议: WTFPL v2 +- 版本号: .02 + +---------- + +###Micro-Max + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Micro-Max.png) + +Micro-Max 是一个用 133 行 C 语言写就的象棋源程序。 + +作者实现了一个 hash 变换表,该引擎检查输入移动的合法性,以及支持 FIDE(注: World Chess Federation 缩写,参见其[官网](https://www.fide.com/)) 的全部规则,除了低升变。 + +特点包括: + +- 递归的 negamax 搜索 +- 反夺的静态搜索 +- 反夺规则的扩展 +- 迭代深化 +- 最佳移动优先的 `排序` +- 存储分数和最佳移动的 Hash 表 +- 完整的 FIDE 规则(除了低位升变)和移动合法性检查 + +还有一个 1433个字符的较大版本,但允许你使用完整的 FIDE 规则的低升变。 + +- 网站: [home.hccnet.nl/h.g.muller/max-src2.html][3] +- 开发者: Harm Geert Muller +- 协议: The MIT License +- 版本号: 3.2 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150222033906262/ChessBytes.html + +作者:Frazer Kline +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://nanochess.org/chess6.html +[2]:http://www.pouet.net/prod.php?which=64962 +[3]:http://home.hccnet.nl/h.g.muller/max-src2.html \ No newline at end of file diff --git a/translated/share/20150227 Chess in a Few Bytes.md b/translated/share/20150227 Chess in a Few Bytes.md deleted file mode 100644 index 60b5598c76..0000000000 --- a/translated/share/20150227 Chess in a Few Bytes.md +++ /dev/null @@ -1,114 +0,0 @@ -几 KB 的国际象棋程序 -================================================================================ -当我提及到我用来介绍计算(注:这里翻译的有问题)的是一台 ZX81 电脑时,我已经暴露了我的年龄。ZX81 是一个由英国(UK,the United Kingdom) 开发者(Sincilair 研究所)生产的家庭电脑,它拥有"高达" 1KB 的随机存储器(RAM)。上面的 1kB 并不是打印错误,这个家庭电脑确实只配置有 1KB 的板载内存。但这个内存大小上的限制并没有阻止爱好者制作种类繁多的软件。事实上,这个机器引发了一代编程奇才的出现,这迫使他们掌握让程序在该机上正常运行的方法。这个机器可以通过一个 16 KB 的 RAM 包来进行升级,这就提供了更多的编程可能。但未经扩展的 1KB 机器仍然激励着编程者发布卓越的软件。 - -![1K ZX Chess ](http://www.linuxlinks.com/portal/content2/reviews/Games2/1KZXChess.jpg) - -我最喜爱的 ZX81 游戏有: Flight Simulation, 3D Monster Maze, Galaxians, 以及最重要的 1K ZX Chess。 只有最后一个程序是为未扩展的 ZX81 电脑设计的。事实上,David Horne 开发的 1K ZX Chess 只使用了仅仅 672 字节的 RAM(注:如果读者有兴趣,可以看看 [这里](http://users.ox.ac.uk/~uzdm0006/scans/1kchess/)对该程序的代码及解释)。尽管如此,该游戏尽力去实现大多数的国际象棋规则,并提供了一个计算机虚拟对手。虽然一些重要的规则被忽略了(如:王车易位,兵的升变,和吃过路兵) -(注:参考了[这里](http://zh.wikibooks.org/zh/%E5%9B%BD%E9%99%85%E8%B1%A1%E6%A3%8B/%E8%A7%84%E5%88%99)和[这里](http://en.wikipedia.org/wiki/Rules_of_chess)),但能够和人工智能相对抗,这仍然令人惊讶。这个游戏占据了我逝去的青春里的相当一部分。 - -1K ZX Chess 保持着在任何计算机上国际象棋的最小实现的地位长达 33 年,直到今年由 BootChess 打破了该记录,紧接着由 Toledo AtomChess 打破。这三个程序都没有实现所有的国际象棋规则,所以为了完整性,我介绍了我最喜爱的,实现了所有国际象棋规则的极小的国际象棋。 - -Linux 有着一系列极其强大的国际象棋引擎,如 Stockfish, Critter, Togo II, Crafty, GNU Chess, 和 Komodo 。 在这篇文章精选的国际象棋程序虽敌不过一个好的国际象棋程序,但它们展示了使用微不足道的代码库究竟可以实现多少东西。 ----------- - -![](http://www.linuxlinks.com/portal/content2/png/ToledoAtomchess.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Toledo.png) - -你可能已经看到了大量有关 BootChess 新闻报道,一个只用 487 字节写就的国际象棋程序,一举打破了先前最小的国际象棋程序,1K ZX Chess 的记录。Óscar Toledo Gutiérrez 拿起外套并决定编写一个更加紧凑的国际象棋游戏。Toledo Atomchess 是仅有 481 字节的 x86 汇编代码,它适合在引导扇区里。 在给定的极小代码库限制下,这个引擎实现了一个适当的国际象棋游戏。 - -特点包括: - -- 基本的象棋移动 -- 象棋盘的 ASCII 文本表现 -- 以代数形式来输入移动(注:如 D2D4) -- 3 层的搜索深度 - -显然,为了将这个国际象棋程序压缩到 481 字节中,作者必须做出某些牺牲,这些局限包括: - -- 没有兵的升变 -- 没有王车易位 -- 没有吃过路兵 -- 没有移动确认 - -该作者也使用 C,JavaScript 和 Java 来写这个国际象棋程序,每种实现都非常小。 - -- 网站: [nanochess.org/chess6.html][1] -- 开发者: Óscar Toledo Gutiérrez -- 协议: 对非商业使用免费(Free for non-commercial use) -- 版本号: - - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/BootChess.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-BootChess.png) - -BootChess 是一个国际象棋的极其小巧的计算机实现。这个程序被塞进到仅仅 487 字节里,并可运行在 Windows, Mac OS X 和 Linux 等操作系统。BootChess 的棋盘和棋子单独用文本表示,其中 P 代表兵, Q 用来代表王后,以及输入的任何停顿代表空白方块。 - -特点包括: - -- 象棋棋盘和用户输入的图形化文本表示 -- 引导扇区大小(512 字节)的可玩的象棋游戏 -- 只需 x86 bios 硬件引导程序(没有软件依赖) -- 所有主要的正规移动包括 double square pawn start(注:这个我没有查到是什么意思) -- 兵升变为王后(与 1k ZX Chess 相反) -- 名为 taxiMax > minMax half-ply 的 CPU 人工智能 -- 硬编码的西班牙白子开局 - -同样,它也存在一些重要的限制。这些遗漏包括: - -- 正在推广 -- 吃过路兵 -- 没有王车易位 -- 3 次位置重复和局规则(注:下一步之前,同样的移动出现了两次;可以参考[这里](http://www.netplaces.com/chess-basics/ending-the-game/three-position-repetition.htm)) -- 50 步移动和局规则(注:在连续的50个回合内,双方既没有棋子被吃掉,也没有兵被移动过,则和局;可以参考[这里](http://www.chessvariants.org/d.chess/chess.html)) -- 没有开放或封闭的书籍 -- 一个或多个 minMAX/negaMax 全层人工智能 - -- 网站: [www.pouet.net/prod.php?which=64962][2] -- 开发者: Olivier "Baudsurfer/RSi" Poudade -- 协议: WTFPL v2 -- 版本号: .02 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/Micro-Max.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Micro-Max.png) - -Micro-Max 是一个用 C 写就的 133 行象棋源程序。 - -作者实现了一个 hash 变换表,该引擎检查输入移动的合法性,以及支持 FIDE(注: World Chess Federation 缩写,[这里](https://www.fide.com/)为其官网) 的全部规则,除了正在推广的规则。 - -特点包括: - -- 递归的 negamax 搜索 -- 重新夺回的静态搜索 -- 重新夺回规则的扩展 -- 迭代深化 -- 最好的先走策略 `排序` -- 存储分数和最佳移动的 Hash 表 -- 完整的 FIDE 规则(不包括正在推广的规则) 和移动合法性检查 - -同样存在一个简装的 1433个字符的版本,但允许你使用符合 FIDE 规则的正在推广的规则。 - -- 网站: [home.hccnet.nl/h.g.muller/max-src2.html][3] -- 开发者: Harm Geert Muller -- 协议: The MIT License -- 版本号: 3.2 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20150222033906262/ChessBytes.html - -作者:Frazer Kline -译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://nanochess.org/chess6.html -[2]:http://www.pouet.net/prod.php?which=64962 -[3]:http://home.hccnet.nl/h.g.muller/max-src2.html \ No newline at end of file From 59a330066aec2f4f85911f10da85c9a21f60bd52 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Apr 2015 20:00:16 +0800 Subject: [PATCH 0628/2517] PUB:20150326 Mydumper--Mysql Database Backup tool @ictlyh --- ...26 Mydumper--Mysql Database Backup tool.md | 47 +++++++++---------- 1 file changed, 22 insertions(+), 25 deletions(-) rename {translated/share => published}/20150326 Mydumper--Mysql Database Backup tool.md (57%) diff --git a/translated/share/20150326 Mydumper--Mysql Database Backup tool.md b/published/20150326 Mydumper--Mysql Database Backup tool.md similarity index 57% rename from translated/share/20150326 Mydumper--Mysql Database Backup tool.md rename to published/20150326 Mydumper--Mysql Database Backup tool.md index 97e83e0933..dd1fd14110 100644 --- a/translated/share/20150326 Mydumper--Mysql Database Backup tool.md +++ b/published/20150326 Mydumper--Mysql Database Backup tool.md @@ -1,16 +1,13 @@ Mydumper - MySQL数据库备份工具 ================================================================================ -Mydumper 是MySQL数据库服务器备份工具,它比MySQL自带的mysqldump快很多。它还有在转储本身的时候检索远程服务器二进制日志文件的能力。 +Mydumper 是 MySQL 数据库服务器备份工具,它比 MySQL 自带的 mysqldump 快很多。它还有在转储的同时获取远程服务器二进制日志文件的能力。 ### Mydumper 的优势 ### -o 并行性 (因此有高速度) 和 性能 (避免了昂贵的字符集转换例程, 高效的代码) - -o 更容易管理输出 (每个表独立的文件,转储元数据等,简单的查看/解析数据) - -o 一致性 -- 在所有线程中维护快照, 提供准确的主从结点日志位置等。 - -o 可管理性 -- 支持对包含和排除指定的数据库和表的PCRE操作(译者注:PCRE,Perl Compatible Regular Expression,Perl兼容正则表达式) +- 并行能力 (因此有高速度) 和性能 (高效的代码避免了耗费 CPU 处理能力的字符集转换过程) +- 更容易管理输出 (每个表都对应独立的文件,转储元数据等,便于查看/解析数据) +- 一致性 :跨线程维护快照, 提供精确的主从日志定位等。 +- 可管理性 : 支持用 PCRE 来包含/排除指定的数据库和表(LCTT译注:PCRE,Perl Compatible Regular Expression,Perl兼容正则表达式) ### 在Ubuntu上安装 mydumper ### @@ -26,20 +23,20 @@ o 可管理性 -- 支持对包含和排除指定的数据库和表的PCRE操作( 应用程序选项: -- -B, --database 转储的数据库 -- -T, --tables-list 逗号分隔的转储表列表(不排除正则表达式) +- -B, --database 要转储的数据库 +- -T, --tables-list 逗号分隔的转储表列表(不会被正则表达式排除) - -o, --outputdir 保存输出文件的目录 - -s, --statement-size 插入语句的字节大小, 默认是1000000个字节 -- -r, --rows 把表分为每个这么多行的块 +- -r, --rows 把表按行数切块 - -c, --compress 压缩输出文件 -- -e, --build-empty-files 尽管表中没有数据也创建输出文件 -- -x, --regex 匹配‘db.table'的正则表达式 -- -i, --ignore-engines 逗号分隔的忽略存储引擎列表 -- -m, --no-schemas 不转储有数据的表架构 -- -k, --no-locks 不执行临时共享读锁. 警告: 这会导致备份的不一致性 +- -e, --build-empty-files 空表也输出文件 +- -x, --regex 匹配‘db.table’的正则表达式 +- -i, --ignore-engines 以逗号分隔的被忽略的存储引擎列表 +- -m, --no-schemas 不转储表架构 +- -k, --no-locks 不执行临时共享读锁。警告: 这会导致备份的不一致性 - -l, --long-query-guard 设置长查询的计时器秒数,默认是60秒 -- --kill-long-queries 杀死长查询 (而不是退出) -- -b, --binlogs 获取二进制日志文件和转储数据的快照 +- --kill-long-queries 杀死长查询 (而不是退出程序) +- -b, --binlogs 获取二进制日志文件快照并转储数据 - -D, --daemon 开启守护进程模式 - -I, --snapshot-interval 每个转储快照之间的间隔时间(分钟), 需要开启 --daemon, 默认是60分钟 - -L, --logfile 日志文件的名字,默认是stdout @@ -67,21 +64,21 @@ o 可管理性 -- 支持对包含和排除指定的数据库和表的PCRE操作( --threads=2 \ --compress-protocol -Mydumper输出数据的说明 +Mydumper 输出数据的说明 -Mydumper不直接指定输出的文件,而是输出到文件夹的文件中。--outputdir 选项指定要使用的目录名称。 +Mydumper 不直接指定输出的文件,而是输出到文件夹的文件中。--outputdir 选项指定要使用的目录名称。 输出分为两部分 -架构 +**表结构** -对数据库中的每个表,创建包含 CREATE TABLE 语句的文件。文件命名为: +对数据库中的每个表,创建一个包含 CREATE TABLE 语句的文件。文件命名为: dbname.tablename-schema.sql.gz -数据 +**数据** -对于每个行数多余--rows参数的表, 创建文件名字为: +每个表名跟着按 --rows 参数所切块的数量, 创建文件名字为: dbname.tablename.0000n.sql.gz @@ -103,7 +100,7 @@ via: http://www.ubuntugeek.com/mydumper-mysql-database-backup-tool.html 作者:[ruchi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4239b0e682a7b5da93cc9c80c201be7282f0375a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 25 Apr 2015 20:08:14 +0800 Subject: [PATCH 0629/2517] [Translated] tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1 --- ...inimal RHEL or CentOS 7 Installation--1.md | 217 ------------------ ...inimal RHEL or CentOS 7 Installation--1.md | 216 +++++++++++++++++ 2 files changed, 216 insertions(+), 217 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md deleted file mode 100644 index 7edee2be22..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md +++ /dev/null @@ -1,217 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--1 -================================================================================ -CentOS is a Industry Standard Linux Distribution which is a derivative of RedHat Enterprise Linux. You may start using the OS as soon as you install it, but to make the most out of your system you need to perform a few updates, install a few packages, configure certain services and application. - -This article aims at “30 Things to Do After Installing RHEL/CentOS 7”. The post is written keeping in mind you have installed RHEL/CentOS Minimal Install which is preferred in Enterprise and production environment, if not you can follow below guide that will show you minimal installations of both. - -- [Installation of CentOS 7 Minimal][1] -- [Installation of RHEL 7 Minimal][2] - -The following are the list of important things, which we’ve covered in this guide based on industry standard requirements. We hoping that, these things will be very helpful in setting up your server. - -1. Register and Enable Red Hat Subscription -2. Configure Network with Static IP Address -3. Set Hostname of Server -4. Update or Upgrade CentOS Minimal Install -5. Install Command Line Web Browser -6. Install Apache HTTP Server -7. Install PHP -8. Install MariaDB Database -9. Install and Configure SSH Server -10. Install GCC (GNU Compiler Collection) -11. Install Java -12. Install Apache Tomcat -13. Install Nmap to Monitor Open Ports -14. FirewallD Configuration -15. Installing Wget -16. Installing Telnet -17. Installing Webmin -18. Enable Third Party Repositories -19. Install 7-zip Utility -20. Install NTFS-3G Driver -21. Install Vsftpd FTP Server -22. Install and Configure sudo -23. Install and Enable SELinux -24. Install Rootkit Hunter -25. Install Linux Malware Detect (LMD) -26. Server Bandwidth Testing with Speedtest-cli -27. Configure Cron Jobs -28. Install Owncloud -29. Enable Virtualization with Virtualbox -30. Password Protect GRUB - -### 1. Register and Enable Red Hat Subscription ### - -After minimal RHEL 7 installation, it’s time to register and enable your system to Red Hat Subscription repositories and perform a full system update. This is valid only if you have a valid RedHat Subscription. You need to register your in order to enable official RedHat System repositories and update the OS from time-to-time. - -We have already covered a detailed instructions on how to register and active RedHat subscription at the below guide. - -- [Register and Enable Red Hat Subscription Repositories in RHEL 7][3] - -**Note**: This step is only for RedHat Enterprise Linux having a valid subscription. If you are running a CentOS server immediately move to further steps. - -### 2. Configure Network with Static IP Address ### - -The first thing you need to do is to configure Static IP address, Route and DNS to your CentOS Server. We will be using ip command the replacement of ifconfig command. However, ifconfig command is still available for most of the Linux distributions and can be installed from default repository. - - # yum install net-tools [Provides ifconfig utility] - -![Install ifconfig in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ifconfig.jpeg) - -But as I said we will be using ip command to configure static IP address. So, make sure you first check the current IP address. - - # ip addr show - -![Check IP Address i n CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Check-IP-Address.jpeg) - -Now open and edit file /etc/sysconfig/network-scripts/ifcfg-enp0s3 using your choice of editor. Here, I’m using Vi editor and make sure you must be root user to make changes… - - # vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 - -Now we will be editing four fields in the file. Note the below four fields and leave everything else untouched. Also leave double quotes as it is and enter your data in between. - - IPADDR = “[Enter your static IP here]” - GATEWAY = “[Enter your Default Gateway]” - DNS1 = “[Your Domain Name System 1]” - DNS2 = “[Your Domain Name System 2]” - -After making the changes ‘ifcfg-enp0s3‘, looks something like the image below. Notice your IP, GATEWAY and DNS will vary, please confirm it with your ISP. Save and Exit. - -![Network Details](http://www.tecmint.com/wp-content/uploads/2015/04/Network-Details.jpeg) -Network Details - -Restart service network and check the IP is correct or not, that was assigned. If everything is ok, Ping to see network status… - - # service network restart - -![Restart Network Service](http://www.tecmint.com/wp-content/uploads/2015/04/Restarat-Network.jpeg) -Restart Network Service - -After restarting network, make sure to check the IP address and network status… - - # ip addr show - # ping -c4 google.com - -![Verify IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-IP-Address.jpeg) -Verify IP Address - -![Check Network Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Network-Status.jpeg) -Check Network Status - -### 3. Set Hostname of Server ### - -The next thing to do is to change the HOSTNAME of the CentOS sever. Check the currently assigned HOSTNAME. - - # echo $HOSTNAME - -![Check System Hostname](http://www.tecmint.com/wp-content/uploads/2015/04/Check-System-Hostname.jpeg) -Check System Hostname - -To set new HOSTNAME we need to edit ‘/etc/hostsname‘ and replace old hostname with the desired one. - - # vi /etc/hostname - -![Set Hostname in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Set-System-Hostname.jpeg) -Set System Hostname - -After setting hostname, make sure to confirm hostname by logout and login again. After login check new hostname. - - $ echo $HOSTNAME - -![Confirm New Hostname](http://www.tecmint.com/wp-content/uploads/2015/04/Confirm-Hostname.jpeg) -Confirm New Hostname - -Alternatively you may use command ‘hostname‘ command to view your current hotsname. - - $ hostname - -### 4. Update or Upgrade CentOS Minimal Install ### - -This will not install any new packages other than updating and installing the latest version of installed packages and security updates. Moreover Update and Upgrade are pretty same except the fact that Upgrade = Update + enable obsoletes processing during updates. - - # yum update && yum upgrade - -![Update Minimal CentOS Server](http://www.tecmint.com/wp-content/uploads/2015/04/Update-CentOS-Server.jpeg) -Update Minimal CentOS Server - -**Important**: You can also run the below command which will not prompt for the packages update and you do not need to type ‘y‘ for accepting the changes. - -However it is always a good idea to review the changes which is going to take place on the sever specially in production. Hence using the below command may automate the update and upgrade for you but it is not recommended. - - # yum -y update && yum -y upgrade - -### 5. Install Command Line Web Browser ### - -In most cases, specially in production environment, we usually install CentOS as command line with no GUI, in this situation we must have a commandline browsing tool to check websites via terminal. For this, we going to install a most famous tool called ‘links‘. - - # yum install links - -![Install Commandline Browser](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Commandline-Browser.jpeg) -Links: Commandline Web Browsing - -For usage and examples to browse web sites u links tool, read our article [Command Line Web Browsing with Links Tool][4] - -### 6. Install Apache HTTP Server ### - -No matter for what purpose you will be using the server, in most of the cases you need a HTTP server to run websites, multimedia, client side script and many other things. - - # yum install httpd - -![Install Apache on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-on-CentOS.jpeg.) -Install Apache Server - -If you would like to change default port (80) of Apache HTTP Server to any other port. You need to edit the configuration file ‘/etc/httpd/conf/httpd.conf‘ and search for the line that starts typically like: - - LISTEN 80 - -Change port number ‘80‘ to any other port (say 3221), save and exit. - -![Change Apache Port on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Change-Apache-Port.jpeg) -Change Apache Port - -Add the port you just opened for Apache through firewall and then reload firewall. - -Allow service http through firewall (Permanent). - - # firewall-cmd –add-service=http - -Allow port 3221 through firewall (Permanent). - - # firewall-cmd –permanent –add-port=3221/tcp - -Reload firewall. - - # firewall-cmd –reload - -After making all above things, now it’s time to restart Apache HTTP server, so that the new port number is taken into effect. - - # systemctl restart httpd.service - -Now add the Apache service to system-wide to start automatically when system boots. - - # systemctl start httpd.service - # systemctl enable httpd.service - -Now verify the Apache HTTP Server by using links command line tool as shown in the below screen. - - # links 127.0.0.1 - -![Verify Apache Status](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Apache-Status.jpeg) -Verify Apache Status - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/centos-7-installation/ -[2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ -[3]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ -[4]:http://www.tecmint.com/command-line-web-browsers/ \ No newline at end of file diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md new file mode 100644 index 0000000000..6736eda4e0 --- /dev/null +++ b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md @@ -0,0 +1,216 @@ +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--1 +================================================================================ +CentOS 是一个工业标准的 Linux 发行版,是红帽企业版 Linux 的衍生版本。你安装完后马上就可以使用,但是为了更好地使用你的系统,你需要进行一些升级、软件包安装、配置特定服务和应用程序等操作。 + +这篇文章介绍了 “安装完 RHEL/CentOS 7 后需要做的 30 件事情”。阅读帖子的时候请牢记已经完成了 RHEL/CentOS 最小化安装,这是首选的企业和生产环境,如果还没有,你可以按照下面的指南,它会告诉你两者的最小化安装方法。 + +- [最小化安装 CentOS 7][1] +- [最小化安装 RHEL 7][2] + +下面是一些重要的事情列表,基于工业标准需求我们都会进行介绍。我们希望这些东西在你配置服务器的时候能有所帮助。 + +1. 注册并启用红帽订阅 +2. 使用静态 IP 地址配置网络 +3. 设置服务器的主机名称 +4. 更新或升级最小化安装的 CentOS +5. 安装命令行 Web 浏览器 +6. 安装 Apache HTTP 服务器 +7. 安装 PHP +8. 安装 MariaDB 数据库 +9. 安装并配置 SSH 服务器 +10. 安装 GCC (GNU 编译器集) +11. 安装 Java +12. 安装 Apache Tomcat +13. 安装 Nmap 检查开放端口 +14. 配置防火墙 +15. 安装 Wget +16. 安装 Telnet +17. 安装 Webmin +18. 启用第三方库 +19. 安装 7-zip 工具 +20. 安装 NTFS-3G 驱动 +21. 安装 Vsftpd FTP 服务器 +22. 安装和配置 sudo +23. 安装并启用 SELinux +24. 安装 Rootkit Hunter +25. 安装 Linux Malware Detect (LMD) +26. 用 Speedtest-cli 测试服务器带宽 +27. 配置 Cron 作业 +28. 安装 Owncloud +29. 启用 VirtualBox 虚拟化 +30. 用密码保护 GRUB + +### 1. 注册并启用红帽订阅 ### + +RHEL 7 最小化安装完成后,是时候注册并启用系统红帽订阅库,以及执行一个完整的系统更新。这只当你有一个可用的红帽订阅时才能有效。你要注册才能启用官方红帽系统库并时不时进行操作系统更新。 + +在下面的指南中我们已经包括了一个如何注册并激活红帽订阅的详细说明。 + +- [在 RHEL 7 中注册并启用红帽订阅][3] + +**注意**: 这一步仅适用于有一个有效订阅的红帽企业版 Linux. 如果你用的是 CentOS 服务器,请查看后面的章节。 + +### 2. 使用静态 IP 地址配置网络 ### + +你第一件要做的事情就是为你的 CentOS 服务器配置静态 IP 地址,路由以及 DNS。我们会使用 ip 命令代替 ifconfig 命令。当然,ifconfig 命令对于大部分 Linux 发行版来说还是可用的,还能从默认库安装。 + + # yum install net-tools [提供 ifconfig 工具] + +![在 Linux 上安装 ifconfig](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ifconfig.jpeg) + +但正如我之前说,我们会使用 ip 命令来配置静态 IP 地址。所以,确认你首先检查了当前的 IP 地址。 + + # ip addr show + +![在 CentOS 查看 IP 地址](http://www.tecmint.com/wp-content/uploads/2015/04/Check-IP-Address.jpeg) + +现在用你的编辑器打开并编辑文件 /etc/sysconfig/network-scripts/ifcfg-enp0s3。这里,我使用 Vi 编辑器,另外你要确保你是 root 用户才能保存更改。 + + # vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 + +我们会编辑文件中的四个地方。注意下面的四个地方并保证不碰任何其它的东西。也保留双引号,在它们中间输入你的数据。 + + IPADDR = “[在这里输入你的静态 IP]” + GATEWAY = “[输入你的默认网关]” + DNS1 = “[你的域名系统 1]” + DNS2 = “[你的域名系统 2]” + +更改了 ‘ifcfg-enp0s3’ 之后,看起来像下面的图片。注意你的 IP,网关和 DNS 可能会变化,请和你的 ISP(译者注:互联网服务提供商商) 确认。保存并退出。 + +![网络详情](http://www.tecmint.com/wp-content/uploads/2015/04/Network-Details.jpeg) +网络详情 + +重启网络服务并检查 IP 是否和分配的一样。如果一切都顺利,用 Ping 查看网络状态。 + + # service network restart + +![重启网络服务](http://www.tecmint.com/wp-content/uploads/2015/04/Restarat-Network.jpeg) +重启网络服务 + +重启网络后,确认检查了 IP 地址和网络状态。 + + # ip addr show + # ping -c4 google.com + +![验证 IP 地址](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-IP-Address.jpeg) +验证 IP 地址 + +![检查网络状态](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Network-Status.jpeg) +检查网络状态 + +### 3. 设置服务器的主机名称 ### + +下一步是更改 CentOS 服务器的主机名称。查看当前分配的主机名称。 + + # echo $HOSTNAME + +![查看系统主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Check-System-Hostname.jpeg) +查看系统主机名称 + +要设置新的主机名称,我们需要编辑 ‘/etc/hostsname’ 文件并用想要的名称替换旧的主机名称。 + + # vi /etc/hostname + +![在 CentOS 中设置主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Set-System-Hostname.jpeg) +在 CentOS 中设置主机名称 + +设置完了主机名称之后,务必注销后重新登录确认主机名称。登录后检查新的主机名称。 + + $ echo $HOSTNAME + +![确认主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Confirm-Hostname.jpeg) +确认主机名称 + +你也可以用 ‘hostname’ 命令查看你当前的主机名。 + + $ hostname + +### 4. 更新或升级最小化安装的 CentOS ### + +除了更新和安装已经有的软件的最新版本以及安全升级,这不会安装任何新的软件。总的来说更新和升级是相同的,除了事实上 升级 = 更新 + 更新时进行废弃处理。 + + # yum update && yum upgrade + +![更新最小化安装的 CentOS 服务器](http://www.tecmint.com/wp-content/uploads/2015/04/Update-CentOS-Server.jpeg) +更新最小化安装的 CentOS 服务器 + +**重要**: 你也可以运行下面的命令,这不会弹出软件更新的提示,你也就不需要输入 ‘y’ 接受更改。 + +然而,查看服务器上会发生的变化总是一个好主意,尤其是在生产中。因此使用下面的命令虽然可以为你自动更新和升级,但并不推荐。 + + # yum -y update && yum -y upgrade + +### 5. 安装命令行 Web 浏览器 ### + +大部分情况下,尤其是在生产环境中,我们通常用没有 GUI 的命令行安装 CentOS,在这种情况下我们必须有一个能通过终端查看网站的命令行浏览工具。为了实现这个目的,我们打算安装名为 ‘links’ 的著名工具。 + + # yum install links + +![安装命令行浏览器](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Commandline-Browser.jpeg) +Links: 命令行 Web 浏览器 + +请查看我们的文章 [用 links 工具命令行浏览 Web][4] 了解用 links 工具浏览 web 的方法和例子。 + +### 6. 安装 Apache HTTP 服务器 ### + +不管你因为什么原因使用服务器,大部分情况下你都需要一个 HTTP 服务器运行网站、多媒体、用户端脚本和很多其它的东西。 + + # yum install httpd + +![在 CentOS 上安装 Apache](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-on-CentOS.jpeg.) +安装 Apache 服务器 + +如果你想更改 Apache HTTP 服务器的默认端口号(80)为其它端口,你需要编辑配置文件 ‘/etc/httpd/conf/httpd.conf’ 并查找以下面开始的行: + + LISTEN 80 + +把端口号 ‘80’ 改为其它任何端口(例如 3221),保存并退出。 + +![在 CentOS 上更改 Apache 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Change-Apache-Port.jpeg) +更改 Apache 端口 + +增加刚才分配给 Apache 的端口通过防火墙,然后重新加载防火墙。 + +允许 http 服务通过防火墙(永久)。 + + # firewall-cmd –add-service=http + +允许 3221 号端口通过防火墙(永久)。 + + # firewall-cmd –permanent –add-port=3221/tcp + +重新加载防火墙。 + + # firewall-cmd –reload + +完成上面的所有事情之后,是时候重启 Apache HTTP 服务器了,然后新的端口号才能生效。 + + # systemctl restart httpd.service + +现在添加 Apache 服务到系统层使其随系统自动启动。 + + # systemctl start httpd.service + # systemctl enable httpd.service + +如下图所示,用 links 命令行工具 验证 Apache HTTP 服务器。 + + # links 127.0.0.1 + +![验证 Apache 状态](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Apache-Status.jpeg) +验证 Apache 状态 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/centos-7-installation/ +[2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ +[3]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ +[4]:http://www.tecmint.com/command-line-web-browsers/ \ No newline at end of file From fa681323f5729ee188d39068749582fbbce87b6a Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Apr 2015 22:33:17 +0800 Subject: [PATCH 0630/2517] PUB:20150423 The Most Popular Programming Languages in to GitHub Since 2012 @ictlyh --- ...mming Languages in to GitHub Since 2012.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) rename {translated/talk => published}/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md (59%) diff --git a/translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/published/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md similarity index 59% rename from translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md rename to published/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md index dde2b6785a..b47b1c2ed5 100644 --- a/translated/talk/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md +++ b/published/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md @@ -1,18 +1,17 @@ -从2012年以来GitHub上最流行的的编程语言 +GitHub 上最流行的编程语言 ================================================================================ ![](http://www.loggly.com/wp-content/uploads/2015/04/Infographic_Github_popular_languages_Blogheader.png) -编程语言不仅仅是开发者用来创建程序或表达算法的工具。它们也是编码和解码创造力的仪器。通过观察编程语言的历史,我们在追求为解决问题找到一个更好的方法,促进写作,构建好的产品以及重用他人的工作上得到一个独特的观点。 +编程语言不仅仅是开发者用来创建程序或表达算法的工具,它们也是对创造力进行编码和解码的仪器。通过观察编程语言的历史,我们在追求为解决问题找到一个更好的方法,促进协作,构建好的产品以及重用他人的工作上得到一个独特的观点。 -我们的客户中大概70%向我们的服务发送应用日志,因此Loggy有兴趣追踪哪种语言是最流行的以及哪种语言获得了开发人员的关注。 +我们有大约 70% 的客户向我们的服务发送应用日志,因此我们能追踪哪种语言是最流行的,以及哪种语言获得了开发人员的关注。 -基于从2012年以来的历史的[GitHub 归档][1]和[GitHut][2]数据,我们分析了GitHub上大部分开发者的动作并转化为你下面看到的信息图表。我们关注了: +基于从2012年以来的历史的[GitHub 归档][1]和[GitHut][2]数据,我们分析了GitHub上大部分开发者的动作并绘制成你下面看到的信息图表。我们主要关注: - -- 活跃库的数量,人们正在研究的项目的有用度量。 -- 每种语言总的推送数量以及每个库的平均推送次数。这些指标是由特定语言编写的项目的创新效率的指示器。 -- 每个库新的fork数和打开的问题数目,这也显示了积极使用性和创新性。 -- 每个库新的观察者,开发人员兴趣的指示器。 +- 活跃库的数量,这是反应了人们正在研究的项目的有用度量。 +- 每种语言总的推送数量以及每个库的平均推送次数。这些指标是由某种语言编写的项目的创新效率的指示器。 +- 每个库新的fork数和发现的问题数目,这也显示了活跃度和创新性。 +- 每个库新的观察者,这是开发人员兴趣的指示器。 ### 查看信息图表并告诉我们你的想法!在你的同龄人中是怎么选择你使用的语言的? ### @@ -24,7 +23,7 @@ via: https://www.loggly.com/blog/the-most-popular-programming-languages-in-to-gi 作者:[Justin Mares][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 139083f449fed97b0e18cf2019a0948253411b63 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Apr 2015 23:03:44 +0800 Subject: [PATCH 0631/2517] PUB:20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto @boredivan --- ... Security Using WPScan, Nmap, And Nikto.md | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) rename {translated/tech => published}/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md (89%) diff --git a/translated/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md b/published/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md similarity index 89% rename from translated/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md rename to published/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md index fbd5fcf924..77838086fe 100644 --- a/translated/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md +++ b/published/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md @@ -5,27 +5,28 @@ 数百万个网站用着 WordPress ,这当然是有原因的。WordPress 是众多内容管理系统中对开发者最友好的,本质上说你可以用它做任何事情。不幸的是,每天都有些吓人的报告说某个主要的网站被黑了,或者某个重要的数据库被泄露了之类的,吓得人一愣一愣的。 如果你还没有安装 WordPress ,可以看下下面的文章。 + 在基于 Debian 的系统上: -- [How to install WordPress On Ubuntu][1] +- [如何在 Ubuntu 上安装 WordPress][1] 在基于 RPM 的系统上: -- [How to install wordpress On CentOS][2] +- [如何在 CentOS 上安装 WordPress][2] -我之前的文章 [How To Secure WordPress Website][3] 里面列出的**备忘录**为读者维护 WordPress 的安全提供了一点帮助。 +我之前的文章 [ 如何安全加固 WordPress 站点][3] 里面列出的**备忘录**为读者维护 WordPress 的安全提供了一点帮助。 -在这篇文章里面,我将说明 **wpscan** 的安装过程,以及怎样使用 wpscan 来锁定任何已知的会让你的站点变得易受攻击的插件和主题。还有怎样安装和使用一款免费的网络探索和攻击的安全扫描软件 **nmap** 。最后展示的是使用 **nikto** 的步骤。 +在这篇文章里面,我将介绍 **wpscan** 的安装过程,以及怎样使用 wpscan 来定位那些已知的会让你的站点变得易受攻击的插件和主题。还有怎样安装和使用一款免费的网络探索和攻击的安全扫描软件 **nmap** 。最后展示的是使用 **nikto** 的步骤。 ### 用 WPScan 测试 WordPress 中易受攻击的插件和主题 ### **WPScan** 是一个 WordPress 黑盒安全扫描软件,用 Ruby 写成,它是专门用来寻找已知的 WordPress 的弱点的。它为安全专家和 WordPress 管理员提供了一条评估他们的 WordPress 站点的途径。它的基于开源代码,在 GPLv3 下发行。 -### 下载和安装 WPScan ### +#### 下载和安装 WPScan #### 在我们开始安装之前,很重要的一点是要注意 wpscan 不能在 Windows 下工作,所以你需要使用一台 Linux 或者 OS X 的机器来完成下面的事情。如果你只有 Windows 的系统,拿你可以下载一个 Virtualbox 然后在虚拟机里面安装任何你喜欢的 Linux 发行版本。 -WPScan 的源代码被放在 Github 上,所以需要先安装 git。 +WPScan 的源代码放在 Github 上,所以需要先安装 git(LCTT 译注:其实你也可以直接从 Github 上下载打包的源代码,而不必非得装 git )。 sudo apt-get install git @@ -44,7 +45,7 @@ git 装好了,我们就要安装 wpscan 的依赖包了。 现在 wpscan 装好了,我们就可以用它来搜索我们 WordPress 站点潜在的易受攻击的文件。wpcan 最重要的方面是它能列出不仅是插件和主题,也能列出用户和缩略图的功能。WPScan 也可以用来暴力破解 WordPress —— 但这不是本文要讨论的内容。 -#### 跟新 WPScan #### +#### 更新 WPScan #### ruby wpscan.rb --update @@ -95,7 +96,6 @@ git 装好了,我们就要安装 wpscan 的依赖包了。 列举主题和列举插件差不多,只要用"--enumerate t"就可以了。 - ruby wpscan.rb --url http(s)://www.host-name.com --enumerate t 或者只列出易受攻击的主题: @@ -135,7 +135,7 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 #### 列举 Timthumb 文件 #### -关于 WPscan ,我要说的最后一个功能是列举 timthub 相关的文件。近年来,timthumb 已经成为攻击者眼里的一个普通的目标,因为无数的漏洞被找出来并发到论坛上、邮件列表等等地方。用下面的命令可以通过 wpscan 找出易受攻击的 timthub 文件: +关于 WPscan ,我要说的最后一个功能是列举 timthub (缩略图)相关的文件。近年来,timthumb 已经成为攻击者眼里的一个常见目标,因为无数的漏洞被找出来并发到论坛上、邮件列表等等地方。用下面的命令可以通过 wpscan 找出易受攻击的 timthub 文件: ruby wpscan.rb --url http(s)://www.host-name.com --enumerate tt @@ -143,11 +143,10 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 **Nmap** 是一个开源的用于网络探索和安全审查方面的工具。它可以迅速扫描巨大的网络,也可一单机使用。Nmap 用原始 IP 数据包通过不同寻常的方法判断网络里那些主机是正在工作的,那些主机上都提供了什么服务(应用名称和版本),是什么操作系统(以及版本),用的什么类型的防火墙,以及很多其他特征。 -### 在 Debian 和 Ubuntu 上下载和安装 nmap ### +#### 在 Debian 和 Ubuntu 上下载和安装 nmap #### 要在基于 Debian 和 Ubuntu 的操作系统上安装 nmap ,运行下面的命令: - sudo apt-get install nmap **输出样例** @@ -168,7 +167,7 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 Processing triggers for man-db ... Setting up nmap (5.21-1.1ubuntu1) ... -#### 打个例子 #### +#### 举个例子 #### 输出 nmap 的版本: @@ -182,7 +181,7 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 Nmap version 5.21 ( http://nmap.org ) -### 在 Centos 上下载和安装 nmap ### +#### 在 Centos 上下载和安装 nmap #### 要在基于 RHEL 的 Linux 上面安装 nmap ,输入下面的命令: @@ -227,7 +226,7 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 Complete! -#### 举个比方 #### +#### 举个例子 #### 输出 nmap 版本号: @@ -239,7 +238,7 @@ WPscan 也可以用来列举某个 WordPress 站点的用户和有效的登录 #### 用 Nmap 扫描端口 #### -你可以用 nmap 来获得很多关于你的服务器的信息,它让你站在对你的网站不怀好意的人的角度看你自己的网站。 +你可以用 nmap 来获得很多关于你的服务器的信息,它可以让你站在对你的网站不怀好意的人的角度看你自己的网站。 因此,请仅用它测试你自己的服务器或者在行动之前通知服务器的所有者。 @@ -277,7 +276,7 @@ nmap 的作者提供了一个测试服务器: sudo nmap -p port_number remote_host -扫描一个网络,找出那些服务器在线,分别运行了什么服务 +扫描一个网络,找出哪些服务器在线,分别运行了什么服务。 这就是传说中的主机探索或者 ping 扫描: @@ -294,19 +293,19 @@ nmap 的作者提供了一个测试服务器: MAC Address: 00:11:32:11:15:FC (Synology Incorporated) Nmap done: 256 IP addresses (4 hosts up) scanned in 2.80 second -理解端口配置和如何发现你的服务器上的攻击的载体只是确保你的信息和你的 VPS 安全的第一步。 +理解端口配置和如何发现你的服务器上的攻击目标只是确保你的信息和你的 VPS 安全的第一步。 ### 用 Nikto 扫描你网站的缺陷 ### -[Nikto][4] 网络扫描器是一个开源的 web 服务器的扫描软件,它可以用来扫描 web 服务器上的恶意的程序和文件。Nikto 也可一用来检查软件版本是否过期。Nikto 能进行简单而快速地扫描以发现服务器上危险的文件和程序。扫描结束后会给出一个日志文件。` +[Nikto][4] 网络扫描器是一个开源的 web 服务器的扫描软件,它可以用来扫描 web 服务器上的恶意的程序和文件。Nikto 也可以用来检查软件版本是否过期。Nikto 能进行简单而快速地扫描以发现服务器上危险的文件和程序。扫描结束后会给出一个日志文件。` -### 在 Linux 服务器上下载和安装 Nikto ### +#### 在 Linux 服务器上下载和安装 Nikto #### Perl 在 Linux 上是预先安装好的,所以你只需要从[项目页面][5]下载 nikto ,解压到一个目录里面,然后开始测试。 wget https://cirt.net/nikto/nikto-2.1.4.tar.gz -你可以用某个归档管理工具或者用下面这个命令,同时使用 tar 和 gzip 。 +你可以用某个归档管理工具解包,或者如下同时使用 tar 和 gzip : tar zxvf nikto-2.1.4.tar.gz cd nikto-2.1.4 @@ -369,7 +368,7 @@ Perl 在 Linux 上是预先安装好的,所以你只需要从[项目页面][5] **输出样例** -会有十分冗长的输出,可能一开始会让人感到困惑。许多 Nikto 的警报会返回 OSVDB 序号。这是开源缺陷数据库([http://osvdb.org/][6])的意思。你可以在 OSVDB 上找出相关缺陷的深入说明。 +会有十分冗长的输出,可能一开始会让人感到困惑。许多 Nikto 的警报会返回 OSVDB 序号。这是由开源缺陷数据库([http://osvdb.org/][6])所指定。你可以在 OSVDB 上找出相关缺陷的深入说明。 $ nikto -h http://www.host-name.com - Nikto v2.1.4 @@ -402,7 +401,7 @@ Perl 在 Linux 上是预先安装好的,所以你只需要从[项目页面][5] **Nikto** 是一个非常轻量级的通用工具。因为 Nikto 是用 Perl 写的,所以它可以在几乎任何服务器的操作系统上运行。 -希望这篇文章能在你找你的 wordpress 站点的缺陷的时候给你一些提示。我之前的文章[怎样保护 WordPress 站点][7]记录了一个**清单**,可以让你保护你的 WordPress 站点的工作变得更简单。 +希望这篇文章能在你检查 wordpress 站点的缺陷的时候给你一些提示。我之前的文章[如何安全加固 WordPress 站点][7]记录了一个**清单**,可以让你保护你的 WordPress 站点的工作变得更简单。 有想说的,留下你的评论。 @@ -412,7 +411,7 @@ via: http://www.unixmen.com/scan-check-wordpress-website-security-using-wpscan-n 作者:[anismaj][a] 译者:[boredivan](https://github.com/boredivan) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 30bc1fb44b90ea81a684948c90245a9bc94e3b59 Mon Sep 17 00:00:00 2001 From: Mo Date: Sat, 25 Apr 2015 23:31:18 +0800 Subject: [PATCH 0632/2517] [translated]The history of Android - 13 --- .../13 - The history of Android.md | 104 ------------------ .../13 - The history of Android.md | 104 ++++++++++++++++++ 2 files changed, 104 insertions(+), 104 deletions(-) delete mode 100644 sources/talk/The history of Android/13 - The history of Android.md create mode 100644 translated/talk/The history of Android/13 - The history of Android.md diff --git a/sources/talk/The history of Android/13 - The history of Android.md b/sources/talk/The history of Android/13 - The history of Android.md deleted file mode 100644 index 31f5cd7eb4..0000000000 --- a/sources/talk/The history of Android/13 - The history of Android.md +++ /dev/null @@ -1,104 +0,0 @@ -【translating】The history of Android -================================================================================ -![](http://cdn.arstechnica.net/wp-content/uploads/2014/03/ready-fight.png) - -### Android 2.1, update 1—the start of an endless war ### - -Google was a major launch partner for the first iPhone—the company provided Google Maps, Search, and YouTube for Apple’s mobile operating system. At the time, Google CEO Eric Schmidt was a member of Apple’s board of directors. In fact, during the original iPhone presentation, [Schmidt was the first person on stage][] after Steve Jobs, and he joked that the two companies were so close they could merge into “AppleGoo." - -While Google was developing Android, the relationship between the two companies slowly became contentious. Still, Google largely kept Apple happy by keeping key iPhone features, like pinch zoom, out of Android. The Nexus One, though, was the first slate-style Android flagship without a keyboard, which gave the device the same form factor as the iPhone. Combined with the newer software and Google branding, this was the last straw for Apple. According to Walter Isaacson’s biography on Steve Jobs, after seeing the Nexus One in January 2010, the Apple CEO was furious, saying "I will spend my last dying breath if I need to, and I will spend every penny of Apple's $40 billion in the bank, to right this wrong... I'm going to destroy Android, because it's a stolen product. I'm willing to go thermonuclear war on this." - -All of this happened behind closed doors, only coming out years after the Nexus One was released. The public first caught wind of this growing rift between Google and Apple when, a month after the release of Android 2.1, an update shipped for the Nexus One called “[2.1 update 1.][2]" The updated added one feature, something iOS long held over the head of Android: pinch-zoom. - -While Android supported multi-touch APIs since version 2.0, the default operating system apps stayed clear of this useful feature at the behest of Jobs. After reconciliation meetings over the Nexus One failed, there was no longer a reason to keep pinch zoom out of Android. Google pushed all their chips into the middle of the table, hit the update button, and was finally “all-in" with Android. - -With pinch zoom enabled in Google Maps, the Browser, and the Gallery, the Google-Apple smartphone war was on. In the coming years, the two companies would become bitter enemies. A month after the pinch zoom update, Apple went on the warpath, suing everyone and everything that used Android. HTC, Motorola, and Samsung were all brought to court, and some of them are still in court. Schmidt resigned from Apple’s board of directors. Google Maps and YouTube were kicked off of the iPhone, and Apple even started a rival mapping service. Today, the two players that were almost "AppleGoo" compete in smartphones, tablets, laptops, movies, TV shows, music, books, apps, e-mail, productivity software, browsers, personal assistants, cloud storage, mobile advertising, instant messaging, mapping, and set-top-boxes... and soon the two will be competing in car computers, wearables, mobile payments, and living room gaming. - -### Android 2.2 Froyo—faster and Flash-ier ### - -[Android 2.2][3] came out four months after the release of 2.1, in May 2010. Froyo featured major under-the-hood improvements for Android, all made in the name of speed. The biggest addition was just-in-time (JIT) compilation. JIT automatically converted java bytecode into native code at runtime, which led to drastic performance improvements across the board. - -The Browser got a performance boost, too, thanks to the integration of the V8 javascript engine from Chrome. This was the first of many features the Android browser would borrow from Chrome, and eventually the stock browser would be completely replaced by a mobile version of Chrome. Until that day came, though, the Android team needed to ship a browser. Pulling in Chrome parts was an easy way to upgrade. - -While Google was focusing on making its platform faster, Apple was making its platform bigger. Google's rival released the 10-inch iPad a month earlier, ushering in the modern era of tablets. While some large Froyo and Gingerbread tablets were released, Google's official response—Android 3.0 Honeycomb and the Motorola Xoom—would not arrive for nine months. - -![Froyo added a two-icon dock at the bottom and universal search.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/22-2.png) -Froyo added a two-icon dock at the bottom and universal search. -Photo by Ron Amadeo - -The biggest change on the Froyo homescreen was the new dock at the bottom, which filled the previously empty space to the left and right of the app drawer with phone and browser icons. Both of these icons were custom-designed white versions of the stock icons, and they were not user-configurable. - -The default layout removed all the icons, and it only stuck the new tips widget on the screen, which directed you to click on the launcher icon to access your apps. The Google Search widget gained a Google logo which doubled as a button. Tapping it would open the search interface and allow you to restrict a search by Web, apps, or contacts. - -![The downloads page showing the “update all" button, the Flash app, a flash-powered site where anything is possible, and the “move to SD" button. ](http://cdn.arstechnica.net/wp-content/uploads/2014/03/small-market-2.jpg) -The downloads page showing the “update all" button, the Flash app, a flash-powered site where anything is possible, and the “move to SD" button. -Photo by [Ryan Paul][4] - -Some of the best additions to Froyo were more download controls for the Android Market. There was now an “Update all" button pinned to the bottom of the Downloads page. Google also added an automatic updating feature, which would automatically install apps as long as the permissions hadn't changed; automatic updating was off by default, though. - -The second picture shows Adobe Flash Player, which was exclusive to Froyo. The app plugged in to the browser and allowed for a “full Web" experience. In 2010, this meant pages heavy with Flash navigation and video. Flash was one of Android's big differentiators compared to the iPhone. Steve Jobs started a holy war against Flash, declaring it an obsolete, buggy piece of software, and Apple would not allow it on iOS. So Android picked up the Flash ball and ran with it, giving users the option of having a semi-workable implementation on Android. - -At the time, Flash could bring even a desktop computer to its knees, so keeping it on all the time on a mobile phone delivered terrible performance. To fix this, Flash on Android's browser could be set to "on-demand"—Flash content would not load until users clicked on the Flash placeholder icon. Flash support would last on Android until 4.1, when Adobe gave up and killed the project. Ultimately Flash never really worked well on Android. The lack of Flash on the iPhone, the most popular mobile device, pushed the Internet to eventually dump the platform. - -The last picture shows the newly added ability to move apps to the SD card, which, in an era when phones came with 512MB of internal storage, was sorely needed. - -![The car app and camera app. The camera could now rotate.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/22carcam-2.png) -The car app and camera app. The camera could now rotate. -Photo by Ron Amadeo - -The camera app was finally updated to support portrait mode. The camera settings were moved out of the drawer and into a semi-transparent strip of buttons next to the shutter button and other controls. This new design seemed to take a lot of inspiration from the Cooliris Gallery app, with transparent, springy speech bubble popups. It was quite strange to see the high-tech Cooliris-style UI design grafted on to the leather-bound camera app—the aesthetics didn't match at all. - -![The semi-broken Facebook app is a good example of the common 2x3 navigation page. Google Goggles was included but also broken.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/facebook.png) -The semi-broken Facebook app is a good example of the common 2x3 navigation page. Google Goggles was included but also broken. -Photo by Ron Amadeo - -Unlike the Facebook client included in Android 2.0 and 2.1, the 2.2 version still sort of works and can sign in to Facebook's servers. The Facebook app is a good example of Google's design guidelines for apps at the time, which suggested having a navigational page consisting of a 3x2 grid of icons as the main page of an app. - -This was Google's first standardized attempt at getting navigational elements out of the menu button and onto the screen, where users could find them. This design was usable, but it added an extra roadblock between launching an app and using an app. Google would later realize that when users launch an app, it was a better idea to show them content instead of an interstitial navigational screen. In Facebook for instance, opening to the news feed would be much more appropriate. And later app designs would relegate navigation to a second-tier location—first as tabs at the top of the screen, and later Google would settle on the "Navigation Drawer," a slide-out panel containing all the locations in an app. - -Also packed in with Froyo was Google Goggles, a visual search app which would try to identify the subject of a picture. It was useful for identifying works of art, landmarks, and barcodes, but not much else. These first two setup screens, along with the camera interface, are all that work in the app anymore. Today, you can't actually complete a search with a client this old. There wasn't much to see anyway; it was a camera interface that returned a search results page. - -![The Twitter app, which was an animation-filled collaboration between Google and Twitter.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/twitters-2.png) -The Twitter app, which was an animation-filled collaboration between Google and Twitter. -Photo by Ron Amadeo - -Froyo included the first Android Twitter app, which was actually a collaboration between Google and Twitter. At the time, a Twitter app was one of the big holes in Android's app lineup. Developers favored the iPhone, and with Apple's head start and stringent design requirements, the App Store's app selection was far superior to Android's. But Google needed a Twitter app, so it teamed up with the company to get the first version out the door. - -This represented Google's newer design language, which meant it had an interstitial navigation page and a "tech-demo" approach to animations. The Twitter app was even more heavy-handed with animation effects than the Cooliris Gallery—everything moved all the time. The clouds at the top and bottom of every page continually scrolled at varying speeds, and the Twitter bird at the bottom flapped its wings and moved its head left and right. - -The Twitter app actually featured an early precursor to the Action Bar, a persistent strip of top-aligned controls that was introduced in Android 3.0 . Along the top of every screen was a blue bar containing the Twitter logo and buttons like search, refresh, and compose tweet. The big difference between this and the later action bars was that the Twitter/Google design lacks an "Up" button in the top right corner, and it actually uses an entire second bar to show your current location within the app. In the second picture above, you can see a whole bar dedicated to the location label "Tweets" (and, of course, the continuously scrolling clouds). The Twitter logo in the second bar acted as another navigational element, sometimes showing additional drill down areas within the current section and sometimes showing the entire top-level shortcut group. - -The 2.3 Tweet stream didn't look much different from what it does today, save for the hidden action buttons (reply, retweet, etc), which were all under the right-aligned arrow buttons. They popped up in a speech bubble menu that looked just like the navigational popup. The faux-action bar was doing serious work on the create tweet page. It housed the twitter logo, remaining character count, and buttons to attach a picture, take a picture, and a contact mention button. - -The Twitter app even came with a pair of home screen widgets. The big one took up eight slots and gave you a compose bar, update button, one tweet, and left and right arrows to view more tweets. The little one showed a tweet and reply button. Tapping on the compose bar on the large widget immediately launched the main "Create Tweet," rendering the "update" button worthless. - -![Google Talk and the new USB dialog.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/talkusb.png) -Google Talk and the new USB dialog. -Photo by Ron Amadeo - -Elsewhere, Google Talk (and the unpictured SMS app) changed from a dark theme to a light theme, which made both of them look a lot closer to the current, modern apps. The USB storage screen that popped up when you plugged into a computer changed from a simple dialog box to a full screen interface. Instead of a text-only design, the screen now had a mutant Android/USB-stick hybrid. - -While Android 2.2 didn’t feature much in the way of user-facing features, a major UI overhaul was coming in the next two versions. Before all the UI work, though, Google wanted to revamp the core of Android. Android 2.2 accomplished that. - ----------- - -![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) - -[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. - -[@RonAmadeo][t] - --------------------------------------------------------------------------------- - -via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/13/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.youtube.com/watch?v=9hUIxyE2Ns8#t=3016 -[2]:http://arstechnica.com/gadgets/2010/02/googles-nexus-one-gets-multitouch/ -[3]:http://arstechnica.com/information-technology/2010/07/android-22-froyo/ -[4]:http://arstechnica.com/information-technology/2010/07/android-22-froyo/ -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/13 - The history of Android.md b/translated/talk/The history of Android/13 - The history of Android.md new file mode 100644 index 0000000000..8929f55064 --- /dev/null +++ b/translated/talk/The history of Android/13 - The history of Android.md @@ -0,0 +1,104 @@ +安卓编年史 +================================================================================ +![](http://cdn.arstechnica.net/wp-content/uploads/2014/03/ready-fight.png) + +### Android 2.1, update 1——无尽战争的开端 ### + +谷歌是第一代iPhone的主要合作伙伴——公司为苹果的移动操作系统提供了谷歌地图,搜索,以及Youtube。在那时,谷歌CEO埃里克·施密特是苹果的董事会成员之一。实际上,在最初的苹果发布会上,施密特是在史蒂夫·乔布斯[之后第一个登台的人][1],他还开玩笑说两家公司如此接近,都可以合并成“AppleGoo”了。 + +当谷歌开发安卓的时候,两家公司间的关系慢慢变得充满争吵。然而,谷歌很大程度上还是通过拒iPhone关键特性于安卓门外,如双指缩放,来取悦苹果。尽管如此,Nexus One是第一部不带键盘的直板安卓旗舰机,设备被赋予了和iPhone相同的外观因素。Nexus One结合了新软件和谷歌的品牌,这是压倒苹果的最后一根稻草。根据沃尔特·艾萨克森为史蒂夫·乔布斯写的传记,2010年1月在看到了Nexus One之后,这个苹果的CEO震怒了,说道:“如果需要的话我会用尽最后一口气,以及花光苹果在银行里的400亿美元,来纠正这个错误……我要摧毁安卓,因为它完全是偷窃来的产品。我愿意为此进行核战争。” + +所有的这些都在秘密地发生,仅在Nexus One发布后的几年后才公诸于众。公众们最早在安卓2.1——推送给Nexus One的一个称作“[2.1 update 1][2]”的更新,发布后一个月左右捕捉到谷歌和苹果间愈演愈烈的分歧气息。这个更新添加了一个功能,正是iOS一直居于安卓之上的功能:双指缩放。 + +尽管安卓从2.0版本开始就支持多点触控API了,默认的系统应用在乔布斯的命令下依然和这项实用的功能划清界限。在关于Nexus One的和解会议谈崩了之后,谷歌再也没有理由拒双指缩放于安卓门外了。谷歌给设备推送了更新,安卓终于补上了不足之处。 + +随着谷歌地图,浏览器以及相册中双指缩放的全面启用,谷歌和苹果的智能手机战争也就此拉开序幕。在接下来的几年中,两家公司会变成死敌。双指缩放更新的一个月后,苹果开始了他的征途,起诉了所有使用安卓的公司。HTC,摩托罗拉以及三星都被告上法庭,直到现在都还有一些诉讼还没解决。施密特辞去了苹果董事会的职务。谷歌地图和Youtube被从iPhone中移除,苹果甚至开始打造自己的地图服务。今天,这两位选手几乎是“AppleGoo”竞赛的唯一选手,涉及领域十分广:智能手机,平板,笔记本,电影,TV秀,音乐,书籍,应用,邮件,生产力工具,浏览器,个人助理,云存储,移动广告,即时通讯,地图以及机顶盒……以及不久他们将会在汽车智能,穿戴设备,移动支付,以及客厅娱乐等进行竞争。 + +### Android 2.2 Froyo——更快更华丽 ### + +[安卓2.2][3]在2010年5月,也就是2.1发布后的四个月后亮相。Froyo(冻酸奶)的亮点主要是底层优化,只为更快的速度。Froyo最大的改变是增加了JIT编译。JIT自动在运行时将java字节码转换为原生码,这会给系统全面带来显著的性能改善。 + +浏览器同样得到了性能改善,这要感谢来自Chrome的V8 Javascript引擎的整合。这是安卓浏览器从Chrome借鉴的许多特性中的第一个,最终系统内置的浏览器会被移动版Chrome彻底替代掉。在那之前,安卓团队还是需要发布一个浏览器。从Chrome借鉴特性是条升级的捷径。 + +在谷歌专注于让它的平台更快的同时,苹果正在让它的平台更全面。谷歌的竞争对手在一个月前发布了10英寸的iPad,先行进入了平板时代。尽管有些搭载Froyo和Gingerbread的安卓平板发布,谷歌的官方回应——安卓3.0 Honeycomb(蜂巢)以及摩托罗拉Xoom——在9个月后才来到。 + +![Froyo底部添加了双图标停靠栏以及全局搜索。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/22-2.png) +Froyo底部添加了双图标停靠栏以及全局搜索。 +Ron Amadeo供图 + +Froyo主屏幕最大的变化是底部的新停靠栏,电话和浏览器图标填充了先前抽屉按钮左右的空白空间。这些新图标都是现有图标的定制白色版本,并且用户没办法自己设置图标。 + +默认布局移除了所有图标,屏幕上只留下一个使用提示小部件,引导你点击启动器图标以访问你的应用。谷歌搜索小部件得到了一个谷歌logo,同时也是个按钮。点击它可以打开一个搜索界面,你可以限制搜索范围在互联网,应用或是联系人之内。 + +![下载页面有了“更新所有”按钮,Flash应用,一个flash驱动的一切皆有可能的网站,以及“移动到SD”按钮。 ](http://cdn.arstechnica.net/wp-content/uploads/2014/03/small-market-2.jpg) +下载页面有了“更新所有”按钮,Flash应用,一个flash驱动的一切皆有可能的网站,以及“移动到SD”按钮。 +[Ryan Paul][4]供图 + +还有一些优秀的新功能加入了Froyo,安卓市场加入了更多的下载控制。有个新的“更新所有”按钮固定在了下载页面底部。谷歌还添加了自动更新特性,只要应用权限没有改变就能够自动安装应用;尽管如此,自动更新默认是关闭的。 + +第二张图展示了Adobe Flash播放器,它是Froyo独占的。这个应用作为插件加入了浏览器,让浏览器能够有“完整的网络”体验。在2010年,这意味着网页充满了Flash导航和视频。Flash是安卓相比于iPhone最大的不同之一。史蒂夫·乔布斯展开了一场对抗Flash的圣战,声称它是一个被淘汰的,充满bug的软件,并且苹果不会在iOS上允许它的存在。所以安卓接纳了Flash并且让它在安卓上运行,给予用户在安卓上拥有半可用的flash实现。 + +在那时,Flash甚至能够让桌面电脑崩溃,所以在移动设备上一直保持打开状态会带来可怕的体验。为了解决这个问题,安卓浏览器上的Flash可以设置为“按需打开”——除非用户点击Flash占位图标,否则不会加载Flash内容。对Flash的支持将会持续到安卓4.1,Adobe在那时放弃并且结束了这个项目。Flash归根到底从未在安卓上完美运行过。而Flash在iPhone这个最流行的移动设备上的缺失,推动了互联网最终放弃了这个平台。 + +最后一张图片显示的是新增的移动应用到SD卡功能,在那个手机只有512MB内置存储的时代,这个功能十分的必要的。 + +![驾驶模式应用。相机现在可以旋转了。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/22carcam-2.png) +驾驶模式应用。相机现在可以旋转了。 +Ron Amadeo供图 + +相机应用终于更新支持纵向模式了。相机设置被从抽屉中移出,变成一条半透明的按钮带,放在了快门按钮和其他控制键旁边。这个新设计看起来从Cooliris相册中获得了许多灵感,有着半透明,有弹性的聊天气泡弹出窗口。看到更现代的Cooliris风格UI设计被嫁接到皮革装饰的相机应用确实十分奇怪——从审美上来说一点都不搭。 + +![半残缺的Facebook应用是个常见的2x3导航页面的优秀范例。谷歌Goggles被包含了进来但同样是残缺的。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/facebook.png) +半残缺的Facebook应用是个常见的2x3导航页面的优秀范例。谷歌Goggles被包含了进来但同样是残缺的。 +Ron Amadeo供图 + +不像在安卓2.0和2.1中包含的Facebook客户端,2.2版本的仍然部分能够工作并且登陆Facebook服务器。Facebook应用是个谷歌那时候设计指南的优秀范例,它建议应用拥有一个含有3x2图标方阵的导航页并作为应用主页。 + +这是谷歌的第一个标准化尝试,将导航元素从菜单按钮里移到屏幕上,因为用户找不到它们。这个设计很实用,但它在打开应用和使用应用之间增加了额外的障碍。谷歌不久后湖意识到当用户打开一个应用,显示应用内容而不是中间导航页是个更好的主意。以Facebook为例,打开应用直接打开信息订阅会更合适。并且不久后应用设计将会把导航降级到二层位置——先是作为顶部的标签之一,后来谷歌放在了“导航抽屉”,一个含有应用所有功能位置的滑出式面板。 + +还有个预装到Froyo的是谷歌Goggles,一个视觉搜索应用,它会尝试辨别图片上的主体。它在辨别艺术品,地标以及条形码时很实用,但差不多也就这些了。最先的两个设置屏幕,以及相机界面,这是应用里唯一现在还能运行的了。由于客户端太旧了,实际上你如今并不能完成一个搜索。应用里也没什么太多可看的,也就一个会返回搜索结果页的相机界面而已。 + +![Twitter应用,一个充满动画的谷歌和Twitter的合作成果。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/twitters-2.png) +Twitter应用,一个充满动画的谷歌和Twitter的合作成果。 +Ron Amadeo供图 + +Froyo拥有第一个安卓Twitter应用,实际上它是谷歌和Twitter的合作成果。那时,一个Twitter应用是安卓应用阵容里的大缺憾。开发者们更偏爱iPhone,加上苹果占领先机和严格的设计要求,App Store里可选择的应用远比安卓的有优势。但是谷歌需要一个Twitter应用,所以它和Twitter合作组建团队让第一个版本问世。 + +这个应用代表了谷歌的新设计语言,这以为着它有个中间导航页以及对动画要求的“技术演示”。Twitter应用甚至比Cooliris相册用的动画效果还多——所有东西一直都在动。所有页面顶部和底部的云朵以不同速度持续滚动,底部的Twitter小鸟拍动它的翅膀并且左右移动它的头。 + +Twitter应用实际上有点Action Bar早期前身的特性,一条顶部对齐的连续控制条在安卓3.0中被引入。沿着所有屏幕的顶部有条拥有Twitter标志和像搜索,刷新和新tweet这样的按钮的蓝色横栏。它和后来的Action Bar之间大的区别在于Twitter/谷歌这里的设计的右上角缺少“上一级”按钮,实际上它在应用里用了完整的第二个栏位显示你当前所在位置。在上面的第二张图里,你可以看到整条带有“Tweets”标签的专用于显示位置的栏(当然,还有持续滚动的云朵)。第二个栏的Twitter标志扮演着另一个导航元素,有时候在当前部分显示额外的下拉区域,有时候显示整个顶级快捷方式集合。 + +2.3Tweet流看起来和今天的并没有什么不同,除了隐藏的操作按钮(回复,转推等),都在右对齐的箭头按钮里。它们弹出来是一个聊天气泡菜单,看起来就像导航弹窗。仿action bar在新tweet页面有重要作用。它安置着twitter标志,剩余字数统计,以及添加照片,拍照,以及提到联系人按钮。 + +Twitter应用甚至还有一对主屏幕小部件,大号的那个占据8格,给你新建栏,更新按钮,一条tweet,以及左右箭头来查看更多tweet。小号的显示一条tweet以及回复按钮。点击大号小部件的新建栏立即打开了“新Tweet”主窗口,这让“更新”按钮变得没有价值。 + +![Google Talk和新USB对话框。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/talkusb.png) +Google Talk和新USB对话框。 +Ron Amadeo供图 + +其他部分,Google Talk(以及没有截图的短信应用)从暗色主题变成了浅色主题,这让它们看起来和现在的更接近现在的,更现代的应用。USB存储界面会在你设备接入电脑的时候从一个简单的对话框进入全屏界面。这个界面现在有个一个异形安卓机器人/USB闪存盘混合体,而不是之前的纯文字设计。 + +尽管安卓2.2在用户互动方式上没有什么新特性,但大的UI调整会在下两个版本到来。然而在所有的UI工作之前,谷歌希望先改进安卓的核心部分。 + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。 + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/13/ + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.youtube.com/watch?v=9hUIxyE2Ns8#t=3016 +[2]:http://arstechnica.com/gadgets/2010/02/googles-nexus-one-gets-multitouch/ +[3]:http://arstechnica.com/information-technology/2010/07/android-22-froyo/ +[4]:http://arstechnica.com/information-technology/2010/07/android-22-froyo/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 7cc96b247e2e9614716a465a6bd6622e9c208af5 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 26 Apr 2015 10:33:00 +0800 Subject: [PATCH 0633/2517] [Translated] tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2 --- ...inimal RHEL or CentOS 7 Installation--2.md | 145 ------------------ ...inimal RHEL or CentOS 7 Installation--2.md | 143 +++++++++++++++++ 2 files changed, 143 insertions(+), 145 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md deleted file mode 100644 index a196cd1f1f..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md +++ /dev/null @@ -1,145 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--2 -================================================================================ -### 7. Install PHP ### - -PHP is a server-side scripting language for web based services. It is frequently used as general-purpose programming language as well. Install PHP on CentOS Minimal Server as. - - # yum install php - -After installing php, make sure to restart Apache service to render PHP in Web Browser. - - # systemctl restart httpd.service - -Next, verify PHP by creating following php script in the Apache document root directory. - - # echo -e "" > /var/ww/html/phpinfo.php - -Now view the PHP file, we just created (phpinfo.php) in Linux Command Line as below. - - # php /var/www/html/phpinfo.php - OR - # links http://127.0.0.1/phpinfo.php - -![Verify PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-PHP.jpeg) -Verify PHP - -### 8. Install MariaDB Database ### - -MariaDB is a fork of MySQL. RedHat Enterprise Linux and its derivatives have shifted to MariaDB from MySQL. It is the Primary Database management System. It is again one of those tools which is necessary to have and you will need it sooner or later no matter what kind of server you are setting. Install MariaDB on CentOS Minimal Install server as below. - - # yum install mariadb-server mariadb - -![Install MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Database.jpeg) -Install MariaDB Database - -Start and configure MariaDB to start automatically at boot. - - # systemctl start mariadb.service - # systemctl enable mariadb.service - -Allow service mysql (mariadb) through firewall. - - # firewall-cmd –add-service=mysql - -Now it’s time to secure MariaDB server. - - # /usr/bin/mysql_secure_installation - -![Secure MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-MariaDB.jpeg) -Secure MariaDB Database - -Read Also: - -- [Installing LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin) in CentOS 7.0][1] -- [Creating Apache Virtual Hosts in CentOS 7.0][2] - -### 9. Install and Configure SSH Server ### - -SSH stands for Secure Shell which is the default protocol in Linux for remote management. SSH is one of those essential piece of software which comes default with CentOS Minimal Server. - -Check Currently Installed SSH version. - - # SSH -V - -![Check SSH Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SSH-Version.jpeg) -Check SSH Version - -Use Secure Protocol over the default SSH Protocol and change port number also for extra Security. Edit the SSH configuration file ‘/etc/ssh/ssh_config‘. - -Uncomment the line below line or delete 1 from the Protocol string, so the line seems like: - - # Protocol 2,1 (Original) - Protocol 2 (Now) - -This change force SSH to use Protocol 2 which is considered to be more secure than Protocol 1 and also make sure to change the port number 22 to any in the configuration. - -![Secure SSH Login](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-SSH.jpeg) -Secure SSH Login - -Disable SSH ‘root login‘ and allow to connect to root only after login to normal user account for added additional Security. For this, open and edit configuration file ‘/etc/ssh/sshd_config‘ and change PermitRootLogin yes t PermitRootLogin no. - - # PermitRootLogin yes (Original) - PermitRootLogin no (Now) - -![Disable SSH Root Login](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-SSH-Root-Login.jpeg) -Disable SSH Root Login - -Finally, restart SSH service to reflect new changes.. - - # systemctl restart sshd.service - -Read Also: - -- [5 Best Practices to Secure and Protect SSH Server][3] -- [SSH Passwordless Login Using SSH Keygen in 5 Easy Steps][4] -- [No Password SSH Keys Authentication” with PuTTY][5] - -### 10. Install GCC (GNU Compiler Collection) ### - -GCC stands for GNU Compiler Collection is a compiler system developed by GNU Project that support various programming languages. It is not installed by default in CentOS Minimal Install. To install gcc compiler run the below command. - - # yum install gcc - -![Install GCC in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-GCC-in-CentOS.jpeg) -Install GCC GNU Compiler - -Check the version of installed gcc. - - # gcc --version - -![Check GCC Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-GCC-Version.jpeg) -Check GCC Version - -### 11. Install Java ### - -Java is a general purpose class based, object-oriented Programming language. It is not installed by default in CentOS Minimal Server. Install Java from repository as below. - - # yum install java - -![Install Java on CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-java.jpeg) -Install Java - -Check version of Java Installed. - - # java -version - -![Check Java Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Java-Version.jpeg) -Check Java Version - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/2/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/install-lamp-in-centos-7/ -[2]:http://www.tecmint.com/apache-virtual-hosting-in-centos/ -[3]:http://www.tecmint.com/5-best-practices-to-secure-and-protect-ssh-server/ -[4]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ -[5]:http://www.tecmint.com/ssh-passwordless-login-with-putty/ \ No newline at end of file diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md new file mode 100644 index 0000000000..c5e0f29857 --- /dev/null +++ b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md @@ -0,0 +1,143 @@ +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--2 +================================================================================ +### 7. 安装 PHP ### + +PHP 是用于 web 基础服务的服务器端脚本语言。它也经常被用作通用编程语言。在最小化安装的 CentOS 中安装 PHP。 + + # yum install php + +安装完 php 之后,确认重启 Apache 服务以便在 Web 浏览器中渲染 PHP。 + + # systemctl restart httpd.service + +下一步,通过在 Apache 文档根目录下创建下面的 php 脚本验证 PHP。 + + # echo -e "" > /var/ww/html/phpinfo.php + +现在在 Linux 命令行中查看我们刚才创建的 PHP 文件(phpinfo.php)。 + + # php /var/www/html/phpinfo.php + 或者 + # links http://127.0.0.1/phpinfo.php + +![验证 PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-PHP.jpeg) +验证 PHP + +### 8. 安装 MariaDB 数据库 ### + +MariaDB 是 MySQL 的一个分支。红帽企业版 Linux 以及它的衍生版已经从 MySQL 迁移到 MariaDB。这是个主要的数据库管理系统。这又是一个你必须拥有的工具,不管你在配置怎样的服务器,或迟或早你都会需要它。在最小化安装的 CentOS 上安装 MariaDB,如下所示。 + + # yum install mariadb-server mariadb + +![安装 MariaDB 数据库](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Database.jpeg) +安装 MariaDB 数据库 + +启动被配置 MariaDBs 随机启动。 + + # systemctl start mariadb.service + # systemctl enable mariadb.service + +允许 mysql(mariadb) 服务通过防火墙 + + # firewall-cmd –add-service=mysql + +现在是时候确保 MariaDB 服务器安全了。 + + # /usr/bin/mysql_secure_installation + +![保护 MariaDB 数据库](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-MariaDB.jpeg) +保护 MariaDB 数据库 + +请阅读: + +- [在 CentOS 7.0 上安装 LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin)][1] +- [在 CentOS 7.0 上创建 Apache 虚拟主机][2] + +### 9. 安装和配置 SSH 服务器 ### + +SSH 表示 Secure Shell,是 Linux 远程管理的默认协议。 SSH 是随最小化 CentOS 服务器一起发布的最重要的软件之一。 + +检查当前已安装的 SSH 版本。 + + # SSH -V + +![检查 SSH 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SSH-Version.jpeg) +检查 SSH 版本 + +在默认的 SSH 协议上使用安全协议,更改端口号进一步加强安全。编辑 SSH 的配置文件 ‘/etc/ssh/ssh_config’。 + +去掉下面行的注释或者从协议行中删除 1,然后行看起来像这样: + + # Protocol 2,1 (原来) + Protocol 2 (现在) + +这个改变强制 SSH 使用 协议 2,它被认为比协议 1 更安全,同时也确保在配置中更改端口号 22 为其它。 + +![保护 SSH 登录](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-SSH.jpeg) +保护 SSH 登录 + +取消 SSH ‘root login’ 然后允许只有当以普通用户账号登录后才能连接到 root 以进一步加强安全。为了做到这个,打开并编辑配置文件 ‘/etc/ssh/sshd_config’ 并更改 PermitRootLogin yes 为 PermitRootLogin no。 + + # PermitRootLogin yes (原来) + PermitRootLogin no (现在) + +![取消 SSH Root 登录](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-SSH-Root-Login.jpeg) +取消 SSH Root 登录 + +最后,重启 SSH 服务启用更改。 + + # systemctl restart sshd.service + +请查看: + +- [加密和保护 SSH 服务器的 5 个最佳实践][3] +- [5 个简单步骤实现使用 SSH Keygen 无密码登录 SSH][4] +- [在 PuTTY 中实现 “无密码 SSH 密钥验证”][5] + +### 10. 安装 GCC (GNU 编译器集) ### + +GCC 表示 GNU 编译器集,是一个 GNU 项目开发的支持多种编程语言的编译系统。在最小化安装的 CentOS 没有默认安装。运行下面的命令安装 gcc 编译器。 + # yum install gcc + +![在 CentOS 上安装 GCC](http://www.tecmint.com/wp-content/uploads/2015/04/Install-GCC-in-CentOS.jpeg) +在 CentOS 上安装 GCC + +检查安装的 gcc 版本。 + + # gcc --version + +![检查 GCC 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-GCC-Version.jpeg) +检查 GCC 版本 + +### 11. 安装 Java ### + +Java是一种通用的基于类的,面向对象的编程语言。在最小化 CentOS 服务器中没有默认安装。按照下面命令从库中安装 Java。 + + # yum install java + +![在 CentOS 上安装 Java](http://www.tecmint.com/wp-content/uploads/2015/04/Install-java.jpeg) +安装 Java + +检查安装的 Java 版本。 + + # java -version + +![检查 Java 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Java-Version.jpeg) +检查 Java 版本 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/2/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/install-lamp-in-centos-7/ +[2]:http://www.tecmint.com/apache-virtual-hosting-in-centos/ +[3]:http://www.tecmint.com/5-best-practices-to-secure-and-protect-ssh-server/ +[4]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ +[5]:http://www.tecmint.com/ssh-passwordless-login-with-putty/ \ No newline at end of file From 89976e27107b1078b5777513b941626be7477047 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 26 Apr 2015 10:44:39 +0800 Subject: [PATCH 0634/2517] PUB:20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux @geekpi --- ....h--No such file or directory' on Linux.md | 9 ++--- .../20150415 Strong SSL Security on nginx.md | 37 +++++++++---------- 2 files changed, 22 insertions(+), 24 deletions(-) rename {translated/tech => published}/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md (92%) diff --git a/translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md b/published/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md similarity index 92% rename from translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md rename to published/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md index 685e637072..2d37fb0a33 100644 --- a/translated/tech/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md +++ b/published/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md @@ -6,7 +6,7 @@ Linux 有问必答:如何在Linux中修复“fatal error: lame/lame.h: No such fatal error: lame/lame.h: No such file or directory -[LAME][1]("LAME Ain't an MP3 Encoder")是一个流行的LPGL授权的MP3编码器。许多视频编码工具使用或者支持LAME。这其中有[FFmpeg][2]、 VLC、 [Audacity][3]、 K3b、 RipperX等。 +[LAME][1]("LAME Ain't an MP3 Encoder")是一个流行的LPGL授权的MP3编码器。许多视频编码工具使用或者支持LAME,如 [FFmpeg][2]、 VLC、 [Audacity][3]、 K3b、 RipperX等。 要修复这个编译错误,你需要安装LAME库和开发文件,按照下面的来。 @@ -20,7 +20,7 @@ Debian和它的衍生版在基础库中已经提供了LAME库,因此可以用a 在基于RED HAT的版本中,LAME在RPM Fusion的免费仓库中就有,那么你需要先设置[RPM Fusion (免费)仓库][4]。 -RPM Fusion设置完成后,如下安装LAME开发文件。 +RPM Fusion设置完成后,如下安装LAME开发包。 $ sudo yum --enablerepo=rpmfusion-free-updates install lame-devel @@ -42,7 +42,7 @@ RPM Fusion设置完成后,如下安装LAME开发文件。 $ ./configure --help -共享/静态LAME默认安装在 /usr/local/lib。要让共享库可以被其他程序使用,完成最后一步: +共享/静态的LAME库默认安装在 /usr/local/lib。要让共享库可以被其他程序使用,完成最后一步: 用编辑器打开 /etc/ld.so.conf,加入下面这行。 @@ -56,7 +56,6 @@ RPM Fusion设置完成后,如下安装LAME开发文件。 如果你的发行版(比如 CentOS 7)没有提供预编译的LAME库,或者你想要自定义LAME库,你需要从源码自己编译。下面是在基于Red Hat的系统中编译安装LAME库的方法。 - $ sudo yum install gcc git $ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz $ tar -xzf lame-3.99.5.tar.gz @@ -87,7 +86,7 @@ via: http://ask.xmodulo.com/fatal-error-lame-no-such-file-or-directory.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/sources/tech/20150415 Strong SSL Security on nginx.md b/sources/tech/20150415 Strong SSL Security on nginx.md index 044ec9dd60..7ee87bc0d7 100644 --- a/sources/tech/20150415 Strong SSL Security on nginx.md +++ b/sources/tech/20150415 Strong SSL Security on nginx.md @@ -1,34 +1,33 @@ -// translating by wxy -Strong SSL Security on nginx +增强 nginx 的 SSL 安全性 ================================================================================ [![](https://raymii.org/s/inc/img/ssl-labs-a.png)][1] -This tutorial shows you how to set up strong SSL security on the nginx webserver. We do this by disabling SSL Compression to mitigate the CRIME attack, disable SSLv3 and below because of vulnerabilities in the protocol and we will set up a strong ciphersuite that enables Forward Secrecy when possible. We also enable HSTS and HPKP. This way we have a strong and future proof ssl configuration and we get an A on the Qually Labs SSL Test. +本文向你介绍如何在 nginx 服务器上设置高安全性的 SSL。我们通过取消 SSL 压缩降低 CRIME 攻击威胁;禁用协议上存在安全缺陷的 SSLv3 及更低版本,并设置更健壮的加密套件来尽可能启用正向保密(Forward Secrecy);我们也启用了 HSTS 和 HPKP。这样我们就拥有了一个健壮而可经受考验的 SSL 配置,并可以在 Qually Labs 的 SSL 测试中得到 A 级评分。 -TL;DR: [Copy-pastable strong cipherssuites for NGINX, Apache and Lighttpd: https://cipherli.st][2] +不求甚解的话,可以从 [https://cipherli.st][2] 上找到 nginx 、Apache 和 Lighttpd 的安全设置,复制粘帖即可。 -This tutorial is tested on a Digital Ocean VPS. If you like this tutorial and want to support my website, use this link to order a Digital Ocean VPS: [https://www.digitalocean.com/?refcode=7435ae6b8212][2] +本教程在 Digital Ocean 的 VPS 上测试通过。如果你喜欢这篇教程,想要支持作者的站点的话,购买 Digital Ocean 的 VPS 时请使用如下链接:[https://www.digitalocean.com/?refcode=7435ae6b8212][3] 。 -This tutorial works with the stricter requirements of the SSL Labs test [announced on the 21st of January 2014][4] (It already did before that, if you follow(ed) it you get an A+) +本教程可以通过[发布于 2014/1/21 的][4] SSL 实验室测试的严格要求(之前就通过了测试,如果你按照本文进行的话,可以得到一个 A+ 评分)。 -- [This tutorial is also available for Apache][5] -- [This tutorial is also available for Lighttpd][6] -- [This tutorial is also available for FreeBSD, NetBSD and OpenBSD over at the BSD Now podcast][7]: [http://www.bsdnow.tv/tutorials/nginx][8] +- [本教程也有对应 Apache 的][5] +- [本教程也有对应 Lighttpd 的][6] +- [本教程也有对应 FreeBSD, NetBSD 和 OpenBSD 上的 nginx 的,放在 BSD Now 播客][7]: [http://www.bsdnow.tv/tutorials/nginx][8] -You can find more info on the topics by following the links below: +你可以从下列链接中找到这方面的进一步内容: -- [BEAST Attack][9] -- [CRIME Attack][10] -- [FREAK Attack][11] -- [Heartbleed][12] -- [Perfect Forward Secrecy][13] -- [Dealing with RC4 and BEAST][14] +- [BEAST 攻击][9] +- [CRIME 攻击][10] +- [FREAK 攻击][11] +- [心血漏洞][12] +- [完美正向保密][13] +- [RC4 和 BEAST 的处理][14] -We are going to edit the nginx settings in the file `/etc/nginx/sited-enabled/yoursite.com` (On Ubuntu/Debian) or in `/etc/nginx/conf.d/nginx.conf` (On RHEL/CentOS). +我们需要编辑 nginx 的配置,在 Ubuntu/Debian 上是 `/etc/nginx/sited-enabled/yoursite.com`,在 RHEL/CentOS 上是 `/etc/nginx/conf.d/nginx.conf` -For the entire tutorial, you need to edit the parts between the `server` block for the server config for port 443 (ssl config). At the end of the tutorial you can find the complete config example. +本文中,我们需要编辑443端口(SSL)的 `server` 配置中的部分。在文末我们会给出完整的配置例子。 -*Make sure you back up the files before editing them!* +*在编辑之前切记备份一下配置文件!* ### The BEAST attack and RC4 ### From 490dcf25a4ae36d19725a4cda9503115dc87f4da Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 26 Apr 2015 11:02:17 +0800 Subject: [PATCH 0635/2517] PUB:20150310 How To Get Email Alerts for SSH Login on Linux Server @theo-l --- ...il Alerts for SSH Login on Linux Server.md | 59 +++++++++++++++++++ ...il Alerts for SSH Login on Linux Server.md | 58 ------------------ 2 files changed, 59 insertions(+), 58 deletions(-) create mode 100644 published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md delete mode 100644 translated/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md diff --git a/published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md b/published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md new file mode 100644 index 0000000000..06d06029fc --- /dev/null +++ b/published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md @@ -0,0 +1,59 @@ +如何设置 Linux 上 SSH 登录的 Email 提醒 +================================================================================ +![](http://www.ehowstuff.com/wp-content/uploads/2015/03/fail2ban-security.jpg) + +虚拟私有服务器 (VPS)上启用 SSH 服务使得该服务器暴露到互联网中,为黑客攻击提供了机会,尤其是当 VPS 还允许root 直接访问时。VPS 应该为每次 SSH 登录成功尝试配置一个自动的 email 警告。 VPS 服务器的所有者会得到各种 SSH 服务器访问日志的通知,例如登录者、登录时间以及来源 IP 地址等信息。这是一个对于服务器拥有者来说,保护服务器避免未知登录尝试的重要安全关注点。这是因为如果黑客使用暴力破解方式通过 SSH 来登录到你的 VPS 的话,后果很严重。在本文中,我会解释如何在 CentOS 6、 CentOS 7、 RHEL 6 和 RHEL 7上为所有的 SSH 用户登录设置一个 email 警告。 + +1. 使用root用户登录到你的服务器; + +2. 在全局源定义处配置警告(/etc/bashrc),这样就会对 root 用户以及普通用户都生效: + + [root@vps ~]# vi /etc/bashrc + + 将下面的内容加入到上述文件的尾部。 + + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + +3. 你也可以选择性地让警告只对 root 用户生效: + + [root@vps ~]# vi .bashrc + + 将下面的内容添加到/root/.bashrc的尾部: + + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + + 整个配置文件样例: + + # .bashrc + + # User specific aliases and functions + + alias rm='rm -i' + alias cp='cp -i' + alias mv='mv -i' + + # Source global definitions + if [ -f /etc/bashrc ]; then + . /etc/bashrc + fi + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + +4. 你也可以选择性地让警告只对特定的普通用户生效(例如 skytech): + + [root@vps ~]# vi /home/skytech/.bashrc + + 将下面的内容加入到/home/skytech/.bashrc文件尾部: + + echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com + +-------------------------------------------------------------------------------- + +via: http://www.ehowstuff.com/how-to-get-email-alerts-for-ssh-login-on-linux-server/ + +作者:[skytech][a] +译者:[theo-l](https://github.com/theo-l) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ehowstuff.com/author/mhstar/ diff --git a/translated/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md b/translated/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md deleted file mode 100644 index 7c7e556f31..0000000000 --- a/translated/tech/20150310 How To Get Email Alerts for SSH Login on Linux Server.md +++ /dev/null @@ -1,58 +0,0 @@ -在Linux服务器上如何为SSH登陆获取Email警告 -================================================================================ -![](http://www.ehowstuff.com/wp-content/uploads/2015/03/fail2ban-security.jpg) - -让SSH服务器在虚拟私有服务器(VPS)上生效会使得该服务器暴露到互联网中并为黑客活动提供了机会,尤其时当VPS还将root作为主要访问时. VPS应该为每次通过SSH服务器成功登陆尝试配置一个自动的email警告. VPS的服务器所有者应该在任何的SSH服务器访问时得到通知,例如登陆者,登陆时间以及IP地址等信息.这是一个对于服务器拥有者保护服务器避免未知登陆尝试的非常重要的安全关注点.因为如果黑客使用暴力破解方式通过SSH来登陆你的VPS,那么后果很严重.在本文中,我会解释如何在CentOS 6, CentOS 7, RHEL 6 和 RHEL 7上为所有的SSH用户登陆设置一个email警告. - -1. 使用root用户登陆到你的服务器: - -2. 在全局源定义处配置警告(/etc/bashrc),这样就会对跟用户以及普通用户都生效: - [root@vps ~]# vi /etc/bashrc - -将下面的内容加入到上述文件的尾部。 - - echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com - -3.你也可以选择性地让警告只对跟用户生效: - - [root@vps ~]# vi .bashrc - -将下面的内容添加到/root/.bashrc的为尾部: - - echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com - -整个配置文件样例: - - # .bashrc - - # User specific aliases and functions - - alias rm='rm -i' - alias cp='cp -i' - alias mv='mv -i' - - # Source global definitions - if [ -f /etc/bashrc ]; then - . /etc/bashrc - fi - echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com - -4.你也可以选择性地让警告只对特定的普通用户生效(例如 skytech): - - [root@vps ~]# vi /home/skytech/.bashrc - -将下面的内容加入到/home/skytech/.bashrc文件尾部: - - echo 'ALERT - Root Shell Access (vps.ehowstuff.com) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" recipient@gmail.com - --------------------------------------------------------------------------------- - -via: http://www.ehowstuff.com/how-to-get-email-alerts-for-ssh-login-on-linux-server/ - -作者:[skytech][a] -译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ehowstuff.com/author/mhstar/ From 85357ff405c59325db659bd6b7ca34f539f6607a Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 26 Apr 2015 11:28:42 +0800 Subject: [PATCH 0636/2517] PUB:20150205 How To Install or Configure VNC Server On CentOS 7.0 @boredivan --- ...l or Configure VNC Server On CentOS 7.0.md | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) rename {translated/tech => published}/20150205 How To Install or Configure VNC Server On CentOS 7.0.md (65%) diff --git a/translated/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md b/published/20150205 How To Install or Configure VNC Server On CentOS 7.0.md similarity index 65% rename from translated/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md rename to published/20150205 How To Install or Configure VNC Server On CentOS 7.0.md index 58c846e4d6..713fb7ab34 100644 --- a/translated/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md +++ b/published/20150205 How To Install or Configure VNC Server On CentOS 7.0.md @@ -1,24 +1,22 @@ -===>> boredivan翻译中 <<=== -怎样在CentOS 7.0上安装/配置VNC服务器 +怎样在CentOS 7.0上安装和配置VNC服务器 ================================================================================ -这是一个关于怎样在你的 CentOS 7 上安装配置 [VNC][1] 服务的教程。当然这个教程也适合 RHEL 7 。在这个教程里,我们将学习什么是VNC以及怎样在 CentOS 7 上安装配置 [VNC 服务器][1]。 +这是一个关于怎样在你的 CentOS 7 上安装配置 [VNC][1] 服务的教程。当然这个教程也适合 RHEL 7 。在这个教程里,我们将学习什么是 VNC 以及怎样在 CentOS 7 上安装配置 [VNC 服务器][1]。 我们都知道,作为一个系统管理员,大多数时间是通过网络管理服务器的。在管理服务器的过程中很少会用到图形界面,多数情况下我们只是用 SSH 来完成我们的管理任务。在这篇文章里,我们将配置 VNC 来提供一个连接我们 CentOS 7 服务器的方法。VNC 允许我们开启一个远程图形会话来连接我们的服务器,这样我们就可以通过网络远程访问服务器的图形界面了。 -VNC 服务器是一个自由且开源的软件,它可以让用户可以远程访问服务器的桌面环境。另外连接 VNC 服务器需要使用 VNC viewer 这个客户端。 +VNC 服务器是一个自由开源软件,它可以让用户可以远程访问服务器的桌面环境。另外连接 VNC 服务器需要使用 VNC viewer 这个客户端。 ** 一些 VNC 服务器的优点:** - 远程的图形管理方式让工作变得简单方便。 - 剪贴板可以在 CentOS 服务器主机和 VNC 客户端机器之间共享。 - CentOS 服务器上也可以安装图形工具,让管理能力变得更强大。 - 只要安装了 VNC 客户端,任何操作系统都可以管理 CentOS 服务器了。 - 比 ssh 图形和 RDP 连接更可靠。 +- 远程的图形管理方式让工作变得简单方便。 +- 剪贴板可以在 CentOS 服务器主机和 VNC 客户端机器之间共享。 +- CentOS 服务器上也可以安装图形工具,让管理能力变得更强大。 +- 只要安装了 VNC 客户端,通过任何操作系统都可以管理 CentOS 服务器了。 +- 比 ssh 图形转发和 RDP 连接更可靠。 -那么,让我们开始安装 VNC 服务器之旅吧。我们需要按照下面的步骤一步一步来搭建一个有效的 VNC。 +那么,让我们开始安装 VNC 服务器之旅吧。我们需要按照下面的步骤一步一步来搭建一个可用的 VNC。 - -首先,我们需要一个有效的桌面环境(X-Window),如果没有的话要先安装一个。 +首先,我们需要一个可用的桌面环境(X-Window),如果没有的话要先安装一个。 **注意:以下命令必须以 root 权限运行。要切换到 root ,请在终端下运行“sudo -s”,当然不包括双引号(“”)** @@ -34,7 +32,8 @@ VNC 服务器是一个自由且开源的软件,它可以让用户可以远程 #yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts ![install gnome classic session](http://blog.linoxide.com/wp-content/uploads/2015/01/gnome-classic-session-install.png) - + + ### 设置默认启动图形界面 # unlink /etc/systemd/system/default.target # ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target @@ -56,13 +55,13 @@ VNC 服务器是一个自由且开源的软件,它可以让用户可以远程 ### 3. 配置 VNC ### -然后,我们需要在 **/etc/systemd/system/** 目录里创建一个配置文件。我们可以从 **/lib/systemd/sytem/vncserver@.service** 拷贝一份配置文件范例过来。 +然后,我们需要在 `/etc/systemd/system/` 目录里创建一个配置文件。我们可以将 `/lib/systemd/sytem/vncserver@.service` 拷贝一份配置文件范例过来。 # cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service ![copying vnc server configuration](http://blog.linoxide.com/wp-content/uploads/2015/01/copying-configuration.png) -接着我们用自己最喜欢的编辑器(这儿我们用的 **nano** )打开 **/etc/systemd/system/vncserver@:1.service** ,找到下面这几行,用自己的用户名替换掉 。举例来说,我的用户名是 linoxide 所以我用 linoxide 来替换掉 : +接着我们用自己最喜欢的编辑器(这儿我们用的 **nano** )打开 `/etc/systemd/system/vncserver@:1.service` ,找到下面这几行,用自己的用户名替换掉 。举例来说,我的用户名是 linoxide 所以我用 linoxide 来替换掉 : ExecStart=/sbin/runuser -l -c "/usr/bin/vncserver %i" PIDFile=/home//.vnc/%H%i.pid @@ -83,8 +82,7 @@ VNC 服务器是一个自由且开源的软件,它可以让用户可以远程 # systemctl daemon-reload -Finally, we'll create VNC password for the user . To do so, first you'll need to be sure that you have sudo access to the user, here I will login to user "linoxide" then, execute the following. To login to linoxide we'll run "**su linoxide" without quotes** . -最后还要设置一下用户的 VNC 密码。要设置某个用户的密码,必须要获得该用户的权限,这里我用 linoxide 的权限,执行“**su linoxide**”就可以了。 +最后还要设置一下用户的 VNC 密码。要设置某个用户的密码,必须要有能通过 sudo 切换到用户的权限,这里我用 linoxide 的权限,执行“`su linoxide`”就可以了。 # su linoxide $ sudo vncpasswd @@ -112,7 +110,7 @@ Finally, we'll create VNC password for the user . To do so, first you'll need to ![allowing firewalld](http://blog.linoxide.com/wp-content/uploads/2015/01/allowing-firewalld.png) -现在就可以用 IP 和端口号(例如 192.168.1.1:1 ,这里的端口不是服务器的端口,而是视 VNC 连接数的多少从1开始排序——译注)来连接 VNC 服务器了。 +现在就可以用 IP 和端口号(LCTT 译注:例如 192.168.1.1:1 ,这里的端口不是服务器的端口,而是视 VNC 连接数的多少从1开始排序)来连接 VNC 服务器了。 ### 6. 用 VNC 客户端连接服务器 ### @@ -122,33 +120,33 @@ Finally, we'll create VNC password for the user . To do so, first you'll need to 你可以用像 [Tightvnc viewer][3] 和 [Realvnc viewer][4] 的客户端来连接到服务器。 -要用其他用户和端口连接 VNC 服务器,请回到第3步,添加一个新的用户和端口。你需要创建 **vncserver@:2.service** 并替换配置文件里的用户名和之后步骤里响应的文件名、端口号。**请确保你登录 VNC 服务器用的是你之前配置 VNC 密码的时候使用的那个用户名** +要用更多的用户连接,需要创建配置文件和端口,请回到第3步,添加一个新的用户和端口。你需要创建 `vncserver@:2.service` 并替换配置文件里的用户名和之后步骤里相应的文件名、端口号。**请确保你登录 VNC 服务器用的是你之前配置 VNC 密码的时候使用的那个用户名**。 +VNC 服务本身使用的是5900端口。鉴于有不同的用户使用 VNC ,每个人的连接都会获得不同的端口。配置文件名里面的数字告诉 VNC 服务器把服务运行在5900的子端口上。在我们这个例子里,第一个 VNC 服务会运行在5901(5900 + 1)端口上,之后的依次增加,运行在5900 + x 号端口上。其中 x 是指之后用户的配置文件名 `vncserver@:x.service` 里面的 x 。 +在建立连接之前,我们需要知道服务器的 IP 地址和端口。IP 地址是一台计算机在网络中的独特的识别号码。我的服务器的 IP 地址是96.126.120.92,VNC 用户端口是1。 -VNC 服务本身使用的是5900端口。鉴于有不同的用户使用 VNC ,每个人的连接都会获得不同的端口。配置文件名里面的数字告诉 VNC 服务器把服务运行在5900的子端口上。在我们这个例子里,第一个 VNC 服务会运行在5901(5900 + 1)端口上,之后的依次增加,运行在5900 + x 号端口上。其中 x 是指之后用户的配置文件名 **vncserver@:x.service** 里面的 x 。 - -在建立连接之前,我们需要知道服务器的 IP 地址和端口。IP 地址是一台计算机在网络中的独特的识别号码。我的服务器的 IP 地址是96.126.120.92,VNC 用户端口是1。执行下面的命令可以获得服务器的公网 IP 地址。 +执行下面的命令可以获得服务器的公网 IP 地址(LCTT 译注:如果你的服务器放在内网或使用动态地址的话,可以这样获得其公网 IP 地址)。 # curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//' ### 总结 ### -好了,现在我们已经在运行 CentOS 7 / RHEL 7 (Red Hat Enterprises Linux)的服务器上安装配置好了 VNC 服务器。VNC 是自由及开源的软件中最简单的一种能实现远程控制服务器的一种工具,也是 Teamviewer Remote Access 的一款优秀的替代品。VNC 允许一个安装了 VNC 客户端的用户远程控制一台安装了 VNC 服务的服务器。下面还有一些经常使用的相关命令。好好玩! +好了,现在我们已经在运行 CentOS 7 / RHEL 7 的服务器上安装配置好了 VNC 服务器。VNC 是自由开源软件中最简单的一种能实现远程控制服务器的工具,也是一款优秀的 Teamviewer Remote Access 替代品。VNC 允许一个安装了 VNC 客户端的用户远程控制一台安装了 VNC 服务的服务器。下面还有一些经常使用的相关命令。好好玩! #### 其他命令: #### - 关闭 VNC 服务。 - # systemctl stop vncserver@:1.service + # systemctl stop vncserver@:1.service - 禁止 VNC 服务开机启动。 - # systemctl disable vncserver@:1.service + # systemctl disable vncserver@:1.service - 关闭防火墙。 - # systemctl stop firewalld.service + # systemctl stop firewalld.service -------------------------------------------------------------------------------- @@ -156,7 +154,7 @@ via: http://linoxide.com/linux-how-to/install-configure-vnc-server-centos-7-0/ 作者:[Arun Pyasi][a] 译者:[boredivan](https://github.com/boredivan) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7faf58d0a9a45079678c2281a965baa813050ce4 Mon Sep 17 00:00:00 2001 From: Mo Date: Sun, 26 Apr 2015 18:57:22 +0800 Subject: [PATCH 0637/2517] [Translated]Debian 8 Jessie released --- translated/news/Debian 8 Jessie released.md | 90 +++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 translated/news/Debian 8 Jessie released.md diff --git a/translated/news/Debian 8 Jessie released.md b/translated/news/Debian 8 Jessie released.md new file mode 100644 index 0000000000..5bcb08765d --- /dev/null +++ b/translated/news/Debian 8 Jessie released.md @@ -0,0 +1,90 @@ +Debian 8 "Jessie" 发布 +===================================================== + +**2015年4月25日** + +在经历了近24个月的持续开发之后,Debian项目自豪地宣布最新的稳定版本8发布(代号 *“Jessie”* ),归功于[Debian安全团队][1]和[Debian长期支持][2]团队的工作,该版本将在接下来的5年内获得支持。 + +![Debian](http://i1-news.softpedia-static.com/images/news2/Debian-GNU-Linux-8-Jessie-Has-Been-Officially-Released-Download-Now-479331-2.jpg) + +*“Jessie”* 与新的默认init系统`systemd`一同到来。`systemd`套件提供了许多激动人心的特性,如更快的启动速度,为服务提供cgroups,以及独立出部分服务的可能性。`sysvinit`init系统在 *“Jessie”* 中依然可用。 + +在 *“Wheezy”* 中引入的UEFI支持(*“Unified Extensible Firmware Interface”*,统一的可扩展固件接口)同样在Jessie中得到了大幅改进。其中包含许多已知固件bug的暂时解决,对32位系统上的UEFI支持,以及对使用32位UEFI固件的64位内核支持(后者仅被包含在我们的 `amd64/i386`*“multi-arch”* 安装媒体中)。 + +自上个版本发布以来,Debian项目的成员同样对我们的支持服务做出了重要改进。其中之一是[可浏览所有Debian的源码][3],该服务目前在[sources.debian.net][4]提供。当然,在超过20000个源码包里想要找到正确的文件确实令人望而生畏。因此,我们同样十分高兴地上线[Debian代码搜索][5],在[codesearch.debian.net][6]提供服务。这两项服务都由一个完全重写并且更加反应敏捷的[包追踪系统][7]提供。 + +该版本包含大量的软件包更新,如: + +* Apache 2.4.10 +* Asterisk 11.13.1 +* GIMP 2.8.14 +* 一个GNOME桌面环境3.14的升级版本 +* GCC编译器 4.9.2 +* Icedove 31.6.0 (一个Mozilla Thunderbird的再发布版本) +* Iceweasel 31.6.0esr (一个Mozilla Firefox的再发布版本) +* KDE Plasma Workspaces 和 KDE Applications 4.11.13 +* LibreOffice 4.3.3 +* Linux 3.16.7-ctk9 +* MariaDB 10.0.16 和 MySQL 5.5.42 +* Nagios 3.5.1 +* OpenJDK 7u75 +* Perl 5.20.2 +* PHP 5.6.7 +* PostgreSQL 9.4.1 +* Python 2.7.9 和 3.4.2 +* Samba 4.1.17 +* Tomcat 7.0.56 和 8.0.14 +* Xen Hypervisor 4.4.1 +* Xfce 4.10桌面环境 +* 超过43000个其它可供使用的软件包,从将近20100个源码包编译而来 + +与如此之多的软件包选择和照例广泛的架构支持,Debian再次向它的目标:成为通用操作系统迈出正确的一步。Debian适用于各种不同情形:从桌面系统到上网本;从开发服务器到集群系统;以及数据库,web,或存储服务器。同时,额外的质量保证工作,如在Debian上对所有包的自动安装和升级测试,让 *“Jessie”* 满足用户拥有一个稳定的Debian版本的高期望。 + +总共有十种架构得到支持:32位PC/Intel IA-32(`i386`),64位PC/Intel EM64T / x86-64 (`amd64`),Motorola/IBM PowerPC (旧硬件的`powerpc`和新的64位`ppc64el`(little-endian)),MIPS (`mips`(big-endian)和 `mipsel`(little-endian)),IBM S/390 (64位 `s390x`)以及ARM新老32位硬件的`armel`和`armhf`,加上给新64位 *“AArch64”* 架构的`arm64`。 + +### 想尝试一下? ### + +如果你仅仅是想在不安装的情况下体验Debian 8 *“Jessie”*,你可以使用一个特殊的镜像,就是live镜像,可以用在CD,U盘以及网络启动设置上。最先只有`amd64`和`i386`架构提供这些镜像。Live镜像同样可以用来安装Debian。更多信息请访问[Debian Live主页][8]。 + +但是如果你想安装Debian到你的永久存储中的话,有不少安装媒介可供你选择,如蓝光碟,DVD,CD以及U盘,或者从网络安装。若干桌面环境——GNOME,KDE Plasma桌面和应用,Xfce以及LXDE——可以从CD镜像中安装,可以从CD/DVD的启动菜单里选择想要的桌面环境。另外,同样提供了多架构CD和DVD,可以从单一磁盘选择安装不同架构的系统。或者你还可以创建可启动U盘安装媒介(参看[安装指南][9]获得更多细节)。对云用户Debian还提供了[预构建OpenStack镜像][10],可供使用。 + +安装镜像现在同样可以通过[bittorrent][11](推荐下载方式),[jigdo][12]或[HTTP][13]下载,查看[Debian光盘][14]获得更进一步的信息。*“Jessie”* 不久将提供实体DVD,CD-ROM,以及无数[供应商][15]的蓝光碟。 + +### 升级Debian ### + +从前一个版本Debian 7(代号 *“Wheezy”* )升级到Debian 8,apt-get包管理工具能够自动解决大部分配置。Debian系统一如既往地可能就地无痛升级,无需强制停机,但强烈推荐阅读[发行注记][16]和[安装指南][17]以为潜在的问题做准备,以及获取安装和升级的详细介绍。发行注记会在发布后的几周内进一步改进以及翻译成其他语言。 + +## 关于Debian ## + +Debian是一个自由操作系统,由成千上万通过互联网协作的来自全世界的志愿者开发。Debian项目的关键力量是它的志愿者基础,它对Debian社群契约和自由软件的贡献,以及对提供最好的操作系统可能的承诺。Debian 8是其前进方向上又一重要一步。 + +## 联系信息 ## + +获取更多信息,请访问Debian主页[https://www.debian.org/][18]或发送电子邮件至。 + +-------------------------------------------------------------------------------- + +via:https://www.debian.org/News/2015/20150426 + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://security-team.debian.org/ +[2]:https://wiki.debian.org/LTS +[3]:https://www.debian.org/News/weekly/2013/14/#sources +[4]:https://sources.debian.net/ +[5]:https://www.debian.org/News/weekly/2014/17/#DCS +[6]:https://codesearch.debian.net/ +[7]:https://tracker.debian.org/ +[8]:http://live.debian.net/ +[9]:https://www.debian.org/releases/jessie/installmanual +[10]:http://cdimage.debian.org/cdimage/openstack/current/ +[11]:https://www.debian.org/CD/torrent-cd/ +[12]:https://www.debian.org/CD/jigdo-cd/#which +[13]:https://www.debian.org/CD/http-ftp/ +[14]:https://www.debian.org/CD/ +[15]:https://www.debian.org/CD/vendors +[16]:https://www.debian.org/releases/jessie/releasenotes +[17]:https://www.debian.org/releases/jessie/installmanual +[18]:https://www.debian.org/ From 46e9e3e4a0060886284cbc44b4ea15d697e7998d Mon Sep 17 00:00:00 2001 From: robot-0 Date: Sun, 26 Apr 2015 20:16:21 +0800 Subject: [PATCH 0638/2517] translating --- ...31 How to set up remote desktop on Linux VPS using x2go.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md b/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md index 8f98a2ba02..8b3eed8330 100644 --- a/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md +++ b/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md @@ -1,3 +1,5 @@ +translating by createyuan + How to set up remote desktop on Linux VPS using x2go ================================================================================ As everything is moved to the cloud, virtualized remote desktop becomes increasingly popular in the industry as a way to enhance employee's productivity. Especially for those who need to roam constantly across multiple locations and devices, remote desktop allows them to stay connected seamlessly to their work environment. Remote desktop is attractive for employers as well, achieving increased agility and flexibility in work environments, lower IT cost due to hardware consolidation, desktop security hardening, and so on. @@ -134,4 +136,4 @@ via: http://xmodulo.com/x2go-remote-desktop-linux.html [5]:http://wiki.x2go.org/doku.php/doc:newtox2go [6]:http://wiki.x2go.org/doku.php/doc:de-compat [7]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[8]:http://xmodulo.com/go/digitalocean \ No newline at end of file +[8]:http://xmodulo.com/go/digitalocean From 439531f13fadda321297e408347e7e53dcab0fcb Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 26 Apr 2015 20:46:14 +0800 Subject: [PATCH 0639/2517] PUB:Debian 8 Jessie released @alim0x --- published/Debian 8 Jessie released.md | 88 ++++++++++++++++++++ translated/news/Debian 8 Jessie released.md | 90 --------------------- 2 files changed, 88 insertions(+), 90 deletions(-) create mode 100644 published/Debian 8 Jessie released.md delete mode 100644 translated/news/Debian 8 Jessie released.md diff --git a/published/Debian 8 Jessie released.md b/published/Debian 8 Jessie released.md new file mode 100644 index 0000000000..48167b6712 --- /dev/null +++ b/published/Debian 8 Jessie released.md @@ -0,0 +1,88 @@ +Debian 8 "Jessie" 发布 +===================================================== + +**2015年4月25日** ,在经历了近24个月的持续开发之后,Debian 项目自豪地宣布最新的稳定版本8的发布(代号 “**Jessie**” ),归功于[Debian安全团队][1]和[Debian长期支持][2]团队的工作,该版本将在接下来的5年内获得支持。 + +![Debian](http://i1-news.softpedia-static.com/images/news2/Debian-GNU-Linux-8-Jessie-Has-Been-Officially-Released-Download-Now-479331-2.jpg) + +“**Jessie**” 与新的默认 init 系统 `systemd` 一同到来。`systemd` 套件提供了许多激动人心的特性,如更快的启动速度、系统服务的 cgroups 支持、以及独立出部分服务的可能性。不过,`sysvinit` init系统在 “**Jessie**” 中依然可用。 + +在 “**Wheezy**” 中引入的 UEFI 支持(*“Unified Extensible Firmware Interface”*,统一的可扩展固件接口)同样在 “**Jessie**” 中得到了大幅改进。其中包含了许多已知固件 bug 的临时性解决方案,支持32位系统上的UEFI,也支持64位内核运行在32位 UEFI 固件上(后者仅被包含在我们的 `amd64/i386` “multi-arch” 安装介质中)。 + +自上个版本发布以来,Debian 项目的成员同样对我们的支持服务做出了重要改进。其中之一是[可浏览所有 Debian 的源码][3],该服务目前放在 [sources.debian.net][4]。当然,在超过20000个源码包里想要找到正确的文件确实令人望而生畏。因此,我们同样十分高兴地上线 [Debian 代码搜索][5],它放在 [codesearch.debian.net][6]。这两项服务都由一个完全重写并且更加反应敏捷的[包追踪系统][7]提供。 + +该版本包含大量的软件包更新,如: + +* Apache 2.4.10 +* Asterisk 11.13.1 +* GIMP 2.8.14 +* 一个GNOME桌面环境 3.14 的升级版本 +* GCC 编译器 4.9.2 +* Icedove 31.6.0 (一个 Mozilla Thunderbird 的再发布版本) +* Iceweasel 31.6.0esr (一个 Mozilla Firefox 的再发布版本) +* KDE Plasma Workspaces 和 KDE Applications 4.11.13 +* LibreOffice 4.3.3 +* Linux 3.16.7-ctk9 +* MariaDB 10.0.16 和 MySQL 5.5.42 +* Nagios 3.5.1 +* OpenJDK 7u75 +* Perl 5.20.2 +* PHP 5.6.7 +* PostgreSQL 9.4.1 +* Python 2.7.9 和 3.4.2 +* Samba 4.1.17 +* Tomcat 7.0.56 和 8.0.14 +* Xen Hypervisor 4.4.1 +* Xfce 4.10桌面环境 +* 超过43000个其它可供使用的软件包,从将近20100个源码包编译而来 + +与如此之多的软件包选择和照例的广泛架构支持,Debian 再次向它的目标:成为通用操作系统迈出正确的一步。Debian 适用于各种不同情形:从桌面系统到上网本;从开发服务器到集群系统;以及数据库,web,或存储服务器。同时,在此基础之上的质量保证工作,如对 Debian 上所有包的自动安装和升级测试,让 “**Jessie**” 可以满足用户拥有一个稳定的 Debian 版本的高期望值。 + +总共支持十种架构:32位PC/Intel IA-32(`i386`),64位PC/Intel EM64T / x86-64 (`amd64`),Motorola/IBM PowerPC (旧硬件的`powerpc`和新的64位`ppc64el`(little-endian)),MIPS (`mips` 大端和 `mipsel`小端),IBM S/390 (64位 `s390x`)以及 ARM 新老32位硬件的`armel`和`armhf`,加上给新64位 *“AArch64”* 架构的`arm64`。 + +### 想尝试一下? ### + +如果你仅仅是想在不安装的情况下体验 Debian 8 “**Jessie**”,你可以使用一个特殊的镜像,即 live 镜像,可以用在 CD,U 盘以及网络启动设置上。最先只有 `amd64` 和 `i386` 架构提供这些镜像。Live 镜像同样可以用来安装 Debian。更多信息请访问 [Debian Live 主页][8]。 + +但是如果你想安装 Debian 到你的计算机的话,有不少安装媒介可供你选择,如蓝光碟,DVD,CD 以及 U 盘,或者从网络安装。有几种桌面环境:GNOME,KDE Plasma 桌面及 Plasma 应用,Xfce 以及 LXDE,它们可以从CD镜像中安装,也可以从 CD/DVD 的启动菜单里选择想要的桌面环境。另外,同样提供了多架构 CD 和 DVD,可以从单一磁盘选择安装不同架构的系统。或者你还可以创建可启动 U 盘安装媒介(参看[安装指南][9]获得更多细节)。对云用户,Debian 还提供了[预构建 OpenStack 镜像][10]可供使用。 + +安装镜像现在同样可以通过 [bittorrent][11](推荐下载方式),[jigdo][12] 或 [HTTP][13] 下载,查看[Debian 光盘][14]获得更进一步的信息。“**Jessie**” 不久将提供实体 DVD,CD-ROM,以及无数[供应商][15]的蓝光碟。 + +### 升级 Debian ### + +如果从前一个版本 Debian 7(代号 “**Wheezy**” )升级到 Debian 8,大部分配置情况 apt-get 包管理工具都能够自动解决。Debian 系统一如既往地能够就地无痛升级,无需强制停机。强烈推荐阅读[发行注记][16]和[安装指南][17]来了解可能存在的问题,并了解安装和升级建议。发行注记会在发布后的几周内进一步改进,并翻译成其他语言。 + +## 关于 Debian ## + +Debian 是一个自由操作系统,由成千上万来自全世界的志愿者通过互联网协作开发。Debian 项目的关键力量是它的志愿者基础,它对 Debian 社群契约和自由软件的贡献,以及对提供最好的操作系统可能的承诺。Debian 8是其前进方向上又一重要一步。 + +## 联系信息 ## + +获取更多信息,请访问 Debian 主页 [https://www.debian.org/][18] 或发送电子邮件至。 + +-------------------------------------------------------------------------------- + +via: https://www.debian.org/News/2015/20150426 + +译者:[alim0x](https://github.com/alim0x) 校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://security-team.debian.org/ +[2]:https://wiki.debian.org/LTS +[3]:https://www.debian.org/News/weekly/2013/14/#sources +[4]:https://sources.debian.net/ +[5]:https://www.debian.org/News/weekly/2014/17/#DCS +[6]:https://codesearch.debian.net/ +[7]:https://tracker.debian.org/ +[8]:http://live.debian.net/ +[9]:https://www.debian.org/releases/jessie/installmanual +[10]:http://cdimage.debian.org/cdimage/openstack/current/ +[11]:https://www.debian.org/CD/torrent-cd/ +[12]:https://www.debian.org/CD/jigdo-cd/#which +[13]:https://www.debian.org/CD/http-ftp/ +[14]:https://www.debian.org/CD/ +[15]:https://www.debian.org/CD/vendors +[16]:https://www.debian.org/releases/jessie/releasenotes +[17]:https://www.debian.org/releases/jessie/installmanual +[18]:https://www.debian.org/ diff --git a/translated/news/Debian 8 Jessie released.md b/translated/news/Debian 8 Jessie released.md deleted file mode 100644 index 5bcb08765d..0000000000 --- a/translated/news/Debian 8 Jessie released.md +++ /dev/null @@ -1,90 +0,0 @@ -Debian 8 "Jessie" 发布 -===================================================== - -**2015年4月25日** - -在经历了近24个月的持续开发之后,Debian项目自豪地宣布最新的稳定版本8发布(代号 *“Jessie”* ),归功于[Debian安全团队][1]和[Debian长期支持][2]团队的工作,该版本将在接下来的5年内获得支持。 - -![Debian](http://i1-news.softpedia-static.com/images/news2/Debian-GNU-Linux-8-Jessie-Has-Been-Officially-Released-Download-Now-479331-2.jpg) - -*“Jessie”* 与新的默认init系统`systemd`一同到来。`systemd`套件提供了许多激动人心的特性,如更快的启动速度,为服务提供cgroups,以及独立出部分服务的可能性。`sysvinit`init系统在 *“Jessie”* 中依然可用。 - -在 *“Wheezy”* 中引入的UEFI支持(*“Unified Extensible Firmware Interface”*,统一的可扩展固件接口)同样在Jessie中得到了大幅改进。其中包含许多已知固件bug的暂时解决,对32位系统上的UEFI支持,以及对使用32位UEFI固件的64位内核支持(后者仅被包含在我们的 `amd64/i386`*“multi-arch”* 安装媒体中)。 - -自上个版本发布以来,Debian项目的成员同样对我们的支持服务做出了重要改进。其中之一是[可浏览所有Debian的源码][3],该服务目前在[sources.debian.net][4]提供。当然,在超过20000个源码包里想要找到正确的文件确实令人望而生畏。因此,我们同样十分高兴地上线[Debian代码搜索][5],在[codesearch.debian.net][6]提供服务。这两项服务都由一个完全重写并且更加反应敏捷的[包追踪系统][7]提供。 - -该版本包含大量的软件包更新,如: - -* Apache 2.4.10 -* Asterisk 11.13.1 -* GIMP 2.8.14 -* 一个GNOME桌面环境3.14的升级版本 -* GCC编译器 4.9.2 -* Icedove 31.6.0 (一个Mozilla Thunderbird的再发布版本) -* Iceweasel 31.6.0esr (一个Mozilla Firefox的再发布版本) -* KDE Plasma Workspaces 和 KDE Applications 4.11.13 -* LibreOffice 4.3.3 -* Linux 3.16.7-ctk9 -* MariaDB 10.0.16 和 MySQL 5.5.42 -* Nagios 3.5.1 -* OpenJDK 7u75 -* Perl 5.20.2 -* PHP 5.6.7 -* PostgreSQL 9.4.1 -* Python 2.7.9 和 3.4.2 -* Samba 4.1.17 -* Tomcat 7.0.56 和 8.0.14 -* Xen Hypervisor 4.4.1 -* Xfce 4.10桌面环境 -* 超过43000个其它可供使用的软件包,从将近20100个源码包编译而来 - -与如此之多的软件包选择和照例广泛的架构支持,Debian再次向它的目标:成为通用操作系统迈出正确的一步。Debian适用于各种不同情形:从桌面系统到上网本;从开发服务器到集群系统;以及数据库,web,或存储服务器。同时,额外的质量保证工作,如在Debian上对所有包的自动安装和升级测试,让 *“Jessie”* 满足用户拥有一个稳定的Debian版本的高期望。 - -总共有十种架构得到支持:32位PC/Intel IA-32(`i386`),64位PC/Intel EM64T / x86-64 (`amd64`),Motorola/IBM PowerPC (旧硬件的`powerpc`和新的64位`ppc64el`(little-endian)),MIPS (`mips`(big-endian)和 `mipsel`(little-endian)),IBM S/390 (64位 `s390x`)以及ARM新老32位硬件的`armel`和`armhf`,加上给新64位 *“AArch64”* 架构的`arm64`。 - -### 想尝试一下? ### - -如果你仅仅是想在不安装的情况下体验Debian 8 *“Jessie”*,你可以使用一个特殊的镜像,就是live镜像,可以用在CD,U盘以及网络启动设置上。最先只有`amd64`和`i386`架构提供这些镜像。Live镜像同样可以用来安装Debian。更多信息请访问[Debian Live主页][8]。 - -但是如果你想安装Debian到你的永久存储中的话,有不少安装媒介可供你选择,如蓝光碟,DVD,CD以及U盘,或者从网络安装。若干桌面环境——GNOME,KDE Plasma桌面和应用,Xfce以及LXDE——可以从CD镜像中安装,可以从CD/DVD的启动菜单里选择想要的桌面环境。另外,同样提供了多架构CD和DVD,可以从单一磁盘选择安装不同架构的系统。或者你还可以创建可启动U盘安装媒介(参看[安装指南][9]获得更多细节)。对云用户Debian还提供了[预构建OpenStack镜像][10],可供使用。 - -安装镜像现在同样可以通过[bittorrent][11](推荐下载方式),[jigdo][12]或[HTTP][13]下载,查看[Debian光盘][14]获得更进一步的信息。*“Jessie”* 不久将提供实体DVD,CD-ROM,以及无数[供应商][15]的蓝光碟。 - -### 升级Debian ### - -从前一个版本Debian 7(代号 *“Wheezy”* )升级到Debian 8,apt-get包管理工具能够自动解决大部分配置。Debian系统一如既往地可能就地无痛升级,无需强制停机,但强烈推荐阅读[发行注记][16]和[安装指南][17]以为潜在的问题做准备,以及获取安装和升级的详细介绍。发行注记会在发布后的几周内进一步改进以及翻译成其他语言。 - -## 关于Debian ## - -Debian是一个自由操作系统,由成千上万通过互联网协作的来自全世界的志愿者开发。Debian项目的关键力量是它的志愿者基础,它对Debian社群契约和自由软件的贡献,以及对提供最好的操作系统可能的承诺。Debian 8是其前进方向上又一重要一步。 - -## 联系信息 ## - -获取更多信息,请访问Debian主页[https://www.debian.org/][18]或发送电子邮件至。 - --------------------------------------------------------------------------------- - -via:https://www.debian.org/News/2015/20150426 - -译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://security-team.debian.org/ -[2]:https://wiki.debian.org/LTS -[3]:https://www.debian.org/News/weekly/2013/14/#sources -[4]:https://sources.debian.net/ -[5]:https://www.debian.org/News/weekly/2014/17/#DCS -[6]:https://codesearch.debian.net/ -[7]:https://tracker.debian.org/ -[8]:http://live.debian.net/ -[9]:https://www.debian.org/releases/jessie/installmanual -[10]:http://cdimage.debian.org/cdimage/openstack/current/ -[11]:https://www.debian.org/CD/torrent-cd/ -[12]:https://www.debian.org/CD/jigdo-cd/#which -[13]:https://www.debian.org/CD/http-ftp/ -[14]:https://www.debian.org/CD/ -[15]:https://www.debian.org/CD/vendors -[16]:https://www.debian.org/releases/jessie/releasenotes -[17]:https://www.debian.org/releases/jessie/installmanual -[18]:https://www.debian.org/ From 4dbcc99c65bdc1a748599a6b309133ac2d3a92b1 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 26 Apr 2015 21:34:48 +0800 Subject: [PATCH 0640/2517] [Translating] tech/30 Things to Do After Minimal RHEL/CentOS 7 Installation--3,4,5,6 --- ...hings to Do After Minimal RHEL or CentOS 7 Installation--3.md | 1 + ...hings to Do After Minimal RHEL or CentOS 7 Installation--4.md | 1 + ...hings to Do After Minimal RHEL or CentOS 7 Installation--5.md | 1 + ...hings to Do After Minimal RHEL or CentOS 7 Installation--6.md | 1 + 4 files changed, 4 insertions(+) diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md index b3996cf818..c540a33b1b 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--3 ================================================================================ ### 12. Install Apache Tomcat ### diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md index 1840511000..647bb7c5cd 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--4 ================================================================================ ### 17. Installing Webmin ### diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md index 741df9a537..53b9d44a55 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--5 ================================================================================ ### 25. Install Linux Malware Detect (LMD) ### diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md index 04ea64d2f4..497883d022 100644 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md +++ b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md @@ -1,3 +1,4 @@ +Translating by ictlyh 30 Things to Do After Minimal RHEL/CentOS 7 Installation--6 ================================================================================ ### 30. Password Protect GRUB ### From 068d432fc324984f3a6f472247e53d46e6bece5e Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sun, 26 Apr 2015 22:13:48 +0800 Subject: [PATCH 0641/2517] Translating by ZTinoZ --- ...409 Install Inkscape - Open Source Vector Graphic Editor.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md index afe663f074..fcbe4ee240 100644 --- a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md +++ b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ Install Inkscape - Open Source Vector Graphic Editor ================================================================================ Inkscape is an open source vector graphic editing tool which uses Scalable Vector Graphics (SVG) and that makes it different from its competitors like Xara X, Corel Draw and Adobe Illustrator etc. SVG is a widely-deployed royalty-free graphics format developed and maintained by the W3C SVG Working Group. It is a cross platform tool which runs fine on Linux, Windows and Mac OS. @@ -92,4 +93,4 @@ via: http://linoxide.com/tools/install-inkscape-open-source-vector-graphic-edito [a]:http://linoxide.com/author/arunrz/ [1]:https://launchpad.net/~inkscape.dev/+archive/ubuntu/stable -[2]:https://inkscape.org/en/ \ No newline at end of file +[2]:https://inkscape.org/en/ From 09b7c75c513de8b0b65864976649f627824a9b17 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 26 Apr 2015 22:27:07 +0800 Subject: [PATCH 0642/2517] [Translated] tech/30 Things to Do After Minimal RHEL/CentOS 7 Installation--3 --- ...inimal RHEL or CentOS 7 Installation--3.md | 254 ------------------ ...inimal RHEL or CentOS 7 Installation--3.md | 253 +++++++++++++++++ 2 files changed, 253 insertions(+), 254 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md deleted file mode 100644 index c540a33b1b..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md +++ /dev/null @@ -1,254 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--3 -================================================================================ -### 12. Install Apache Tomcat ### - -Tomcat is a servlet container designed by Apache to run Java HTTP web server. Install tomcat as below but it is necessary to point out that you must have installed Java prior of installing tomcat. - - # yum install tomcat - -![Install Apache Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-Tomcat.jpeg) -Install Apache Tomcat - -After tomcat has been installed, star the tomcat service. - - # systemctl start tomcat - -Check Version of tomcat. - - # /usr/sbin/tomcat version - -![Check Tomcat Version](http://www.tecmint.com/wp-content/uploads/2015/04/Check-tomcat-version.jpeg) -Check Tomcat Version - -Add service tomcat and default port (8080) through firewall and reload settings. - - # firewall-cmd –zone=public –add-port=8080/tcp --permannet - # firewall-cmd –reload - -Now it’s time to secure tomcat server, create a user and a password to access and manage. We need to edit file ‘/etc/tomcat/tomcat-users.xml‘. See the section which looks like: - - - .... - - - - - - - - - - - - -![Secure Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-Tomcat.jpeg) -Secure Tomcat - -Here we added user “tecmint” to administer/manage tomcat using password “tecmint”. Stop and start the service tomcat so that the changes are taken into effect and enable tomcat service to start at system boot. - - # systemctl stop tomcat - # systemctl start tomcat - # systemctl enable tomcat.service - -Read Also: Installing and Configuring Apache Tomcat 8.0.9 in RHEL/CentOS 7.0/6.x - -### 13. Install Nmap to Monitor Open Ports ### - -Nmap for Network Mapper creates a map of the network by discovering host on which it is running as well as by analyzing network. nmap is not included in the default installation and you have to install it from repository. - - # yum install nmap - -![Install Nmap Monitoring Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Nmap.jpeg) -Install Nmap Monitoring Tool - -List all open ports and corresponding services using them on host. - - # namp 127.0.01 - -![Monitor Open Ports](http://www.tecmint.com/wp-content/uploads/2015/04/Monitor-Open-Ports.jpeg) -Monitor Open Ports - -You may also use firewall-cmd to list all the ports, however I find nmap more useful. - - # firewall-cmd –list-ports - -![Check Open Ports in Firewall](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Open-Ports-in-Firewall.jpeg) -Check Open Ports in Firewall - -Read Also: [29 Useful Nmap Command to Monitor Open Ports][1] - -### 14. FirewallD Configuration ### - -firewalld is a firewall service which manages the server dynamically. Firewalld removed iptables in CentOS 7. Firewalld is installed by default on RedHat Enterprise Linux and its derivatives by default. With iptables every change in order to be taken into effect needs to flush all the old rules and create new rules. - -However with firewalld, no flushing and recreating of new rules required and only changes are applied on the fly. - -Check if Firewalld is running or not. - - # systemctl status firewalld - OR - # firewall-cmd –state - -![Check Firewalld Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Status.jpeg) -Check Firewalld Status - -Get a list of all the zones. - - # firewall-cmd --get-zones - -![Check Firewalld Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Zones.jpeg) -Check Firewalld Zones - -To get details on a zone before switching. - - # firewall-cmd --zone=work --list-all - -![Check Zone Details](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Zone-Details.jpeg) -Check Zone Details - -To get default zone. - - # firewall-cmd --get-default-zone - -![Firewalld Default Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Firewalld-Default-Zone.jpeg) -Firewalld Default Zone - -To switch to a different zone say ‘work‘. - - # firewall-cmd --set-default-zone=work - -![Swich Firewalld Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Swich-Zones.jpeg) -Swich Firewalld Zones - -To list all the services in the zone. - - # firewall-cmd --list-services - -![List Firewalld Zone Services](http://www.tecmint.com/wp-content/uploads/2015/04/List-Firewalld-Service.jpeg) -List Firewalld Zone Services - -To add a service say http, temporarily and reload firewalld. - - # firewall-cmd --add-service=http - # firewall-cmd –reload - -Add http Service Temporarily - -Add http Service Temporarily - -To add a service say http, permanently and reload firewalld. - -# firewall-cmd --add-service=http --permanent -# firewall-cmd --reload - -![Add http Service Permanent](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Temporarily.jpeg) -Add http Service Permanent - -To remove a service say http, temporarily. - - # firewall-cmd --remove-service=http - # firewall-cmd --reload - -![Remove Firewalld Service Temporarily](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Permanent.jpeg) -Remove Firewalld Service Temporarily - -To remove a service say http, permanently. - - # firewall-cmd --zone=work --remove-service=http --permanent - # firewall-cmd --reload - -![Remove Service Permanently](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Service-Parmanently.jpeg) -Remove Service Permanently - -To allow a port (say 331), temporarily. - - # firewall-cmd --add-port=331/tcp - # firewall-cmd --reload - -![Open Firewalld Port Temporarily](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Temporarily.jpeg) -Open Port Temporarily - -To allow a port (say 331), permanently. - - # firewall-cmd --add-port=331/tcp --permanent - # firewall-cmd --reload - -![Open Port in Firewalld Permanent](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Permanent.jpeg) -Open Port Permanently - -To block/remove a port (say 331), temporarily. - - # firewall-cmd --remove-port=331/tcp - # firewall-cmd --reload - -![Remove Port Temporarily in Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Temporarily.jpeg) -Remove Port Temporarily - -To block/remove a port (say 331), permanently. - - # firewall-cmd --remove-port=331/tcp --permanent - # firewall-cmd --reload - -![Remove Port Permanently in Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Permanently.jpeg) -Remove Port Permanently - -To disable firewalld. - - # systemctl stop firewalld - # systemctl disable firewalld - # firewall-cmd --state - -![Disable Firewalld in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-Firewalld.jpeg) -Disable Firewalld Service - -To enable firewalld. - - # systemctl enable firewalld - # systemctl start firewalld - # firewall-cmd --state - -![Enable Firewalld in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Firewalld.jpeg) -Enable Firewalld - -- [How to Configure ‘FirewallD’ in RHEL/CentOS 7][2] -- [Useful ‘FirewallD’ Rules to Configure and Manage Firewall][3] - -### 15. Installing Wget ### - -wget is a Linux command line based utility that retrieves (downloads) content from web servers. It is an important tool you must have to retrieve web contents or download any files using wget command. - - # yum install wget - -![Install Wget Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Wget.png) -Install Wget Tool - -For more usage and practical examples on how to use wget command to download files on the terminal, read [10 Wget Command Examples][4]. - -### 16. Installing Telnet ### - -Telnet is a network protocol that enables a user to login into another computer on the same network over TCP/IP. Once connection etablished to the remote computer it becomes a virtual terminal and allow you to communicate with the remote host within your computer as per whatever privileges provided to you. - -Telnet also very useful for checking listening ports on remote computer or host. - - # yum install telnet - # telnet google.com 80 - -![Telnet Port Checking](http://www.tecmint.com/wp-content/uploads/2015/04/telnet-testing.png) -Telnet Port Checking - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/3/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/nmap-command-examples/ -[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ -[3]:http://www.tecmint.com/firewalld-rules-for-centos-7/ -[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md new file mode 100644 index 0000000000..b3630b5aa5 --- /dev/null +++ b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md @@ -0,0 +1,253 @@ +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--3 +================================================================================ +### 12. 安装 Apache Tomcat ### + +Tomcat 是由 Apache 设计的用来运行 Java HTTP web 服务器的 servlet 容器。按照下面的方法安装 tomcat,但需要指出的是安装 tomcat 之前必须先安装 Java。 + + # yum install tomcat + +![安装 Apache Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-Tomcat.jpeg) +安装 Apache Tomcat + +安装完 tomcat 之后,启动 tomcat 服务。 + + # systemctl start tomcat + +查看 tomcat 版本。 + + # /usr/sbin/tomcat version + +![查看 tomcat 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-tomcat-version.jpeg) +查看 tomcat 版本 + +允许 tomcat 服务和默认端口(8080) 通过防火墙并重新加载设置。 + + # firewall-cmd –zone=public –add-port=8080/tcp --permannet + # firewall-cmd –reload + +现在该保护 tomcat 服务器了,添加一个用于访问和管理的用户和密码。我们需要编辑文件 ‘/etc/tomcat/tomcat-users.xml’。查看类似下面的部分: + + + .... + + + + + + + + + + + + +![保护 Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-Tomcat.jpeg) +保护 Tomcat + +我们在这里添加用户 “tecmint” 到 tomcat 的管理员/管理 组中,使用 “tecmint” 作为密码。先停止在启动 tomcat 服务以使更改生效,并添加 tomcat 服务到随系统启动。 + + # systemctl stop tomcat + # systemctl start tomcat + # systemctl enable tomcat.service + +请阅读: 在 RHEL/CentOS 7.0/6.x 中安装和配置 Apache Tomcat 8.0.9 + +### 13. 安装 Nmap 监视开放端口 ### + +Nmap 网络映射器通过检查运行它的主机以及分析网络创建一个网络映射。nmap 并没有默认安装,你需要从库中安装它。 + + # yum install nmap + +![安装 Nmap 监视工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Nmap.jpeg) +安装 Nmap 监视工具 + +列出主机中所有的开放端口以及对应使用它们的服务。 + + # namp 127.0.01 + +!监视开放端口](http://www.tecmint.com/wp-content/uploads/2015/04/Monitor-Open-Ports.jpeg) +监视开放端口 + +你也可以使用 firewall-cmd 列出所有端口,但我发现 nmap 更有用。 + + # firewall-cmd –list-ports + +![在防火墙中检查开放端口](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Open-Ports-in-Firewall.jpeg) +在防火墙中检查开放端口 + +请阅读: [Nmap 监视开放端口的 29 个有用命令][1] + +### 14. 配置 FirewallD ### + +firewalld 是动态管理服务器的防火墙服务。在 CentOS 7 中 Firewalld 移除了 iptables。在红帽企业版 Linux 和它的衍生版中默认安装了 Firewalld。如果有 iptables 的话为了使每个更改生效需要清空所有旧的规则然后创建新规则。 + +然而用firewalld,不需要清空并重新创建新规则就可以实现更改生效。 + +检查 Firewalld 是否运行。 + + # systemctl status firewalld + 或 + # firewall-cmd –state + +![检查 Firewalld 状态](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Status.jpeg) +检查 Firewalld 状态 + +获取所有的区域列表。 + + # firewall-cmd --get-zones + +![检查 Firewalld 区域](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Zones.jpeg) +检查 Firewalld 区域 + +在切换之前先获取区域的详细信息。 + + # firewall-cmd --zone=work --list-all + +![检查区域详情](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Zone-Details.jpeg) +检查区域详情 + +获取默认区域。 + + # firewall-cmd --get-default-zone + +![Firewalld 默认区域](http://www.tecmint.com/wp-content/uploads/2015/04/Firewalld-Default-Zone.jpeg) +Firewalld 默认区域 + +切换到另一个区域,比如 ‘work’。 + + # firewall-cmd --set-default-zone=work + +![切换 Firewalld 区域](http://www.tecmint.com/wp-content/uploads/2015/04/Swich-Zones.jpeg) +切换 Firewalld 区域 + +列出区域中的所有服务。 + + # firewall-cmd --list-services + +![列出 Firewalld 区域的服务](http://www.tecmint.com/wp-content/uploads/2015/04/List-Firewalld-Service.jpeg) +列出 Firewalld 区域的服务 + +添加临时服务,比如 http,然后重载 firewalld。 + + # firewall-cmd --add-service=http + # firewall-cmd –reload + +添加临时 http 服务 + +添加临时 http 服务 + +添加永久服务,比如 http,然后重载 firewalld。 + +# firewall-cmd --add-service=http --permanent +# firewall-cmd --reload + +![添加永久 http 服务](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Temporarily.jpeg) +添加永久 http 服务 + +删除临时服务,比如 http。 + + # firewall-cmd --remove-service=http + # firewall-cmd --reload + +![删除临时 Firewalld 服务](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Permanent.jpeg) +删除临时 Firewalld 服务 + +删除永久服务,比如 http + + # firewall-cmd --zone=work --remove-service=http --permanent + # firewall-cmd --reload + +![删除永久服务](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Service-Parmanently.jpeg) +删除永久服务 + +允许一个临时端口(比如 331)。 + + # firewall-cmd --add-port=331/tcp + # firewall-cmd --reload + +![打开临时 Firewalld 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Temporarily.jpeg) +打开临时端口 + +允许一个永久端口(比如 331)。 + + # firewall-cmd --add-port=331/tcp --permanent + # firewall-cmd --reload + +![打开永久 Firewalld 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Permanent.jpeg) +打开永久端口 + +阻塞/移除临时端口(比如 331)。 + + # firewall-cmd --remove-port=331/tcp + # firewall-cmd --reload + +![移除 Firewalld 临时端口](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Temporarily.jpeg) +移除临时端口 + +阻塞/移除永久端口(比如 331)。 + + # firewall-cmd --remove-port=331/tcp --permanent + # firewall-cmd --reload + +![移除 Firewalld 永久端口](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Permanently.jpeg) +移除永久端口 + +停用 firewalld。 + + # systemctl stop firewalld + # systemctl disable firewalld + # firewall-cmd --state + +![在 CentOS 7 中停用 Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-Firewalld.jpeg) +停用 Firewalld 服务 + +启用 firewalld。 + + # systemctl enable firewalld + # systemctl start firewalld + # firewall-cmd --state + +![在 CentOS 7 中取消 Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Firewalld.jpeg) +启用 Firewalld + +- [如何在 RHEL/CentOS 7 中配置 ‘Firewalld’][2] +- [配置和管理 Firewalld 的有用 ‘Firewalld’ 规则][3] + +### 15. 安装 Wget ### + +Wget 是基于 Linux 命令行从 web 服务器获取(下载)内容的工具。它是你使用 wget 命令获取 web 内容或下载任何文件必须要有的重要工具。 + + # yum install wget + +![安装 Wget 工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Wget.png) +安装 Wget 工具 + +关于在终端中如何使用 wget 命令下载文件的方法和实际例子,请阅读[10 个 Wget 命令例子][4]。 + +### 16. 安装 Telnet ### + +Telnet 是通过 TCP/IP 允许用户登录到相同网络上的另一台计算机的网络协议。和远程计算机的连接建立后,它就成为了一个允许你在自己的计算机上用所有提供给你的权限和远程主机交互的虚拟终端。 + +Telnet 对于检查远程计算机或主机的监听端口也非常有用。 + + # yum install telnet + # telnet google.com 80 + +![检查 Telnet 端口](http://www.tecmint.com/wp-content/uploads/2015/04/telnet-testing.png) +检查 Telnet 端口 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/3/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/nmap-command-examples/ +[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ +[3]:http://www.tecmint.com/firewalld-rules-for-centos-7/ +[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file From 263617b18db21bccc42652a09924fef57de9349c Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 27 Apr 2015 09:04:04 +0800 Subject: [PATCH 0643/2517] [Translated] tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4 --- ...inimal RHEL or CentOS 7 Installation--4.md | 177 ------------------ ...inimal RHEL or CentOS 7 Installation--4.md | 176 +++++++++++++++++ 2 files changed, 176 insertions(+), 177 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md deleted file mode 100644 index 647bb7c5cd..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md +++ /dev/null @@ -1,177 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--4 -================================================================================ -### 17. Installing Webmin ### - -Webmin is a Web based configuration tool for Linux. It acts as a central system to configure various system configuration like users, disk quota, services and configurations of HTTP server, Apache, MySQL, etc. - - # wget http://prdownloads.sourceforge.net/webadmin/webmin-1.740-1.noarch.rpm - # rpm -ivh webmin-*.rpm - -![Install Webmin on CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Webmin.jpeg) -Install Webmin - -After webmin installation, you will get a message on terminal to login to your host (http://ip-address:10000) using your root password on port number 10000. If running a headless server you can forward the port and access it on a machine/server that is headed. - -### 18. Enable Third Party Repositories ### - -It is not a good idea to add untrusted repositories specially in production and it may be fatal. However just for example here we will be adding a few community approved trusted repositories to install third party tools and packages. - -Add Extra Package for Enterprise Linux (EPEL) Repository. - - # yum install epel-release - -Add Community Enterprise Linux Repository. - - # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm - -![Install Epel Repo](http://www.tecmint.com/wp-content/uploads/2015/04/install-epel-repo.jpeg) -Install Epel Repo - -**Attention**! Extra care is needs to be taken while adding Third Party Repository. - -### 19. Install 7-zip Utility ### - -In the CentOS Minimal Install you don’t get utility like unzip or unrar. We have the option to install each utility as required or an utility that servers for all. 7-zip is such an utility which compress and extract files of all known types. - - # yum install p7zip - -![Install 7zip Tool](http://www.tecmint.com/wp-content/uploads/2015/04/Install-7zip-tool.jpeg) -Install 7zip Tool - -**Notice**: The package is downloaded and installed from Fedora EPEL 7 Repository. - -### 20. Install NTFS-3G Driver ### - -A small yet very useful NTFS driver called NTFS-3G is available for most of the UNIX-like distribution. It is useful to mount and access Windows NTFS file system. Though other alternatives like Tuxera NTFS is available, NTFS-3G is most widely used. - - # yum install ntfs-3g - -![Install NTFS-3G in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Install-NTFS-3G.jpeg) -Install NTFS-3G to Mount Windows Partition - -After installing ntfs-3g has been installed, you can mount Windows NTFS partitions (where /dev/sda5 is my windows drive) using following command. - - # mount -ro ntfs-3g /dev/sda5 /mnt - # cd /mnt - # ls -l - -### 21. Install Vsftpd FTP Server ### - -VSFTPD which stands for Very Secure File Transfer Protocol Daemon is a FTP server for UNIX-like System. It is one of the most efficient and secure FTP Server available today. - - # yum install vsftpd - -![Install Vsftpd in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-FTP.jpeg) -Install Vsftpd FTP - -Edit the configuration file located at ‘/etc/vsftpd/vsftpd.conf‘ to secure vsftpd. - - # vi /etc/vsftpd/vsftpd.conf - -Edit a few fields and leave other as it is, unless you know what you are doing. - - anonymous_enable=NO - local_enable=YES - write_enable=YES - chroot_local_user=YES - -You may also change the port number and open vsftpd port through the firewall. - - # firewall-cmd --add-port=21/tcp - # firewall-cmd --reload - -Next restart vsftpd and enable to start at boot time. - - # systemctl restart vsftpd - # systemctl enable vsftpd - -### 22. Install and Configure sudo ### - -sudo which is commonly called as super do as well as suitable user do is a program for UNIX-like operating system to execute a program with the security privileged of another user. Let’s see how to configure sudo… - - # visudo - -It will open the file /etc/sudoers for editing.. - -![sudoers File](http://www.tecmint.com/wp-content/uploads/2015/04/sudoers-File.jpeg) -sudoers File - -Give all the permission (equal to root) to a user (say tecmint), that has already been created. - - tecmint ALL=(ALL) ALL - -Give all the permission (equal to root) to a user (say tecmint), except the permission to reboot and shutdown the server. - -Again open the same file and edit it with the below contents. - - cmnd_Alias nopermit = /sbin/shutdown, /sbin/reboot - -Then add alias with Logical (!) operator. - - tecmint ALL=(ALL) ALL,!nopermit - -Give permission to a group (say debian) to run a few root privilege command say (add user and delete user) . - - cmnd_Alias permit = /usr/sbin/useradd, /usr/sbin/userdel - -And then add the permission to group debian. - - debian ALL=(ALL) permit - -### 23. Install and Enable SELinux ### - -SELinux which stands for Security-Enhanced Linux is a security module at kernel level. - -# yum install selinux-policy - -![Install SElinux in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/04/Install-SElinux.jpeg) -Install SElinux Policy - -Check SELinux Mode. - - # getenforce - -![Check SELinux Mode](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SELinux-Mode.jpeg) -Check SELinux Mode - -The output is enforcing mode which means SELinux policy is in effect. - -For debugging, set selinux mode to permissive temporarily. No need to reboot. - - # setenforce 0 - -After debugging set selinux to enforcing again without rebooting. - - # setenforce 1 - -### 24. Install Rootkit Hunter ### - -Rootkit Hunter abbreviated as Rkhunter is an application that scan rootkits and other potentially harmful exploits in Linux systems. - - # yum install rkhunter - -![Install Rootkit Hunter](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Rootkit-Hunter.jpeg) -Install Rootkit Hunter - -Run rkhunter as a scheduled job, from a script file or manually to scan harmful exploits in Linux. - - # rkhunter --check - -![Scan for rootkits](http://www.tecmint.com/wp-content/uploads/2015/04/Scan-for-rootkits.png) -Scan for rootkits - -![RootKit Scan Results](http://www.tecmint.com/wp-content/uploads/2015/04/RootKit-Results.png) -RootKit Scan Results - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/4/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ \ No newline at end of file diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md new file mode 100644 index 0000000000..f73d1e9b3b --- /dev/null +++ b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md @@ -0,0 +1,176 @@ +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--4 +================================================================================ +### 17. 安装 Webmin ### + +Webmin 是基于 Web 的 Linux 配置工具。它像一个中央系统用于配置各种系统设置,比如用户、磁盘分配、服务以及 HTTP 服务器、Apache、MySQL 等的配置。 + + # wget http://prdownloads.sourceforge.net/webadmin/webmin-1.740-1.noarch.rpm + # rpm -ivh webmin-*.rpm + +![在 CentOS 7 上安装 Webmin](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Webmin.jpeg) +安装 Webmin + +安装完 webmin 后,你会在终端上得到一个用你的 root 密码在 端口 10000 登录你的主机(http://ip-address:10000)的信息。 如果运行的是无头服务器(译注:无头服务器是指没有专门用于向其它计算机和它们的用户提供服务的本地接口的计算设备)你可以转发端口然后从有头机器/服务器上访问它。 + +### 18. 启用第三方库 ### + +添加不受信任的库并不是一个好主意,尤其是在生产环境中,这可能导致致命的问题。但仅作为例子在这里我们会添加一些社区证实可信任的库用于安装第三方工具和软件包。 + +为企业版 Linux(EPEL)库添加额外的软件包。 + + # yum install epel-release + +添加社区企业版 Linux 库 + + # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm + +![安装 Epel 库](http://www.tecmint.com/wp-content/uploads/2015/04/install-epel-repo.jpeg) +安装 Epel 库 + +**注意**! 添加第三方库的时候尤其需要注意。 + +### 19. 安装 7-zip 工具 ### + +在最小化安装 CentOS 时你并没有获得类似 unzip 或者 untar 的工具。我们可以选择基于需要安装每个工具或者一个能处理所有格式的工具。7-zip 就是一个能压缩和解压所有已知类型文件的工具。 + + # yum install p7zip + +![安装 7zip 工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-7zip-tool.jpeg) +安装 7zip 工具 + +**注意**: 该软件包从 Fedora EPEL 7 的库中下载和安装。 + +### 20. 安装 NTFS-3G 驱动 ### + +NTFS-3G,一个很小但非常有用的 NTFS 驱动在大部分类 UNIX 发行版上都可用。它对于挂载和访问 Windows NTFS 文件系统很有用。尽管也有其它可用的替代品,比如 Tuxera,但 NTFS-3G 是使用最广泛的。 + + # yum install ntfs-3g + +![在 CentOS 上安装 NTFS-3G](http://www.tecmint.com/wp-content/uploads/2015/04/Install-NTFS-3G.jpeg) +安装 NTFS-3G 用于挂载 Windows 分区 + +ntfs-3g 安装完成之后,你可以使用以下命令挂载 Windows NTFS 分区(我的 Windows 分区是 /dev/sda5)。 + + # mount -ro ntfs-3g /dev/sda5 /mnt + # cd /mnt + # ls -l + +### 21. 安装 Vsftpd FTP 服务器 ### + +VSFTPD 表示 Very Secure File Transfer Protocol Daemon,是用于类 UNIX 系统的 FTP 服务器。它是现今最高效和安全的 FTP 服务器之一。 + + # yum install vsftpd + +![在 CentOS 7 上安装 Vsftpd](http://www.tecmint.com/wp-content/uploads/2015/04/Install-FTP.jpeg) +安装 Vsftpd FTP + +编辑配置文件 ‘/etc/vsftpd/vsftpd.conf’ 用于保护 vsftpd。 + + # vi /etc/vsftpd/vsftpd.conf + +编辑一些值并使其它保留原样,除非你知道自己在做什么。 + + anonymous_enable=NO + local_enable=YES + write_enable=YES + chroot_local_user=YES + +你也可以更改端口号并使 vsftpd 端口通过防火墙。 + + # firewall-cmd --add-port=21/tcp + # firewall-cmd --reload + +下一步重启 vsftpd 并启用随机启动。 + + # systemctl restart vsftpd + # systemctl enable vsftpd + +### 22. 安装和配置 sudo ### + +sudo 通常被称为 super do 或者 suitable user do,是一个类 UNIX 操作系统中用其它用户的安全权限执行程序的软件。让我们来看看怎样配置 sudo。 + + # visudo + +打开要编辑的文件 /etc/sudoers + +![sudoers 文件](http://www.tecmint.com/wp-content/uploads/2015/04/sudoers-File.jpeg) +sudoers 文件 + +给一个已经创建的用户(比如 tecmint)赋予所有权限(等同于 root)。 + + tecmint ALL=(ALL) ALL + +给一个已经创建的用户(比如 tecmint)赋予除重启和关闭服务器以外的所有权限(等同于 root)。 + +再一次打开文件并用下面的内容编辑文件。 + + cmnd_Alias nopermit = /sbin/shutdown, /sbin/reboot + +用 逻辑操作符(!) 添加别名。 + + tecmint ALL=(ALL) ALL,!nopermit + +准许一个组(比如 debian) 运行一些 root 权限命令,比如(增加或删除用户)。 + + cmnd_Alias permit = /usr/sbin/useradd, /usr/sbin/userdel + +给组 debian 增加权限。 + + debian ALL=(ALL) permit + +### 23. 安装并启用 SELinux ### + +SELinux 表示 Security-Enhanced Linux,是内核级别的安全模块。 + + # yum install selinux-policy + +![在 CentOS 7 上安装 SElinux](http://www.tecmint.com/wp-content/uploads/2015/04/Install-SElinux.jpeg) +安装 SElinux 策略 + +查看 SELinux 模式。 + + # getenforce + +![查看 SELinux 模式](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SELinux-Mode.jpeg) +查看 SELinux 模式 + +输出是 Enforcing,意味着 SELinux 策略已经生效。 + +为了调试,可以临时设置 selinux 模式为允许。不需要重启。 + + # setenforce 0 + +调试完了之后再次设置 selinux 为强制模式,无需重启。 + + # setenforce 1 + +### 24. 安装 Rootkit Hunter ### + +Rootkit Hunter,简写为 RKhunter,是在 Linux 系统中扫描 rootkits 和其它可能有害攻击的程序。 + + # yum install rkhunter + +![安装 Rootkit Hunter](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Rootkit-Hunter.jpeg) +安装 Rootkit Hunter + +在 Linux 中,从脚本文件以计划作业的形式运行 rkhunter 或者手动扫描有害攻击。 + + # rkhunter --check + +![扫描 rootkits](http://www.tecmint.com/wp-content/uploads/2015/04/Scan-for-rootkits.png) +扫描 rootkits + +![RootKit 扫描结果](http://www.tecmint.com/wp-content/uploads/2015/04/RootKit-Results.png) +RootKit 扫描结果 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/4/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ \ No newline at end of file From 0147f2b3896fa6fbb88bfa711d1043a50ac63866 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 27 Apr 2015 09:42:28 +0800 Subject: [PATCH 0644/2517] [Translated] tech/30 Things to Do After Minimal RHEL/CentOS 7 Installation--5 --- ...inimal RHEL or CentOS 7 Installation--5.md | 136 ------------------ ...inimal RHEL or CentOS 7 Installation--5.md | 134 +++++++++++++++++ 2 files changed, 134 insertions(+), 136 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md deleted file mode 100644 index 53b9d44a55..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md +++ /dev/null @@ -1,136 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--5 -================================================================================ -### 25. Install Linux Malware Detect (LMD) ### - -Linux Malware Detect (LMD) is a open source Linux malware scanner released under the GNU GPLv2 license, that is -specially designed for threats faced in hosting environments. For complete installation, configuration and usage of LMD can be found at: - -- [Install and Use (LMD) with ClamAV as Antivirus Engine][1] - -### 26. Server Bandwidth Testing with Speedtest-cli ### - -speedtest-cli is a tool written in python to test internet bandwidth including download and upload speed. For complete installation and usage of speedtest-cli tool, read our article at [Check Linux Server Bandwidth Speed from Command Line][2] - -### 27. Configure Cron Jobs ### - -This is one of the most widely used software utility. It function as job scheduler i.e., schedule a job now that will execute in future itself. It is useful in logging and maintaining records unattained as well as several other routine work like regular backup. All the schedule is written in /etc/crontab file. - -The crontab file contains 6 fields as follows: - - Minutes Hour Day of Month Month of Year Week Day Command - (0-59) (0-23) (1-31) (1/jan-12/dec) (0-6/sun-sat) Command/script - -![Crontab Fields](http://www.tecmint.com/wp-content/uploads/2015/04/Crontab-Fields.jpeg) -Crontab Fields - -To run a cron job (say run /home/$USER/script.sh) everyday at 04:30 am. - - Minutes Hour Day of Month month of year Week Day command - 30 4 * * * speedtest-cli - -Add the following entry to the crontab file ‘/etc/crontab/‘. - - 30 4 * * * /home/$user/script.sh - -After adding the above line to crontab, it will run automatically at 04:30 am everyday and the output depends upon what is there in script file. Moreover script can be replaced by commands. For more examples of cron jobs, read [11 Cron Jobs Examples in Linux][3] - -### 28. Install Owncloud ### - -Owncloud is a HTTP based data synchronization, file sharing and remote file storage application. For more detail on installing own cloud, you may like to see this article : [Create Personal/Private Cloud Storage in Linux][4] - -### 29. Enable Virtualization with Virtualbox ### - -Virtualization is a process of creating virtual OS, Hardware and Network, is one of the most sought technology of these days. We will be discussing on how to install and configure virtualization in detail. - -Our CentOS Minimal server is a headless server. Lets prepare it to host virtual machines that is accessible over HTTP by installing following packages. - - # yum groupinstall 'Development Tools' SDL kernel-devel kernel-headers dkms - -![Install Development Tools](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Development-Tool.jpeg) -Install Development Tools - -Change working directory to ‘/etc/yum.repos.d/‘ and download Virtualbox repository. - - # wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc - -Install the key just downloaded. - - # rpm --import oracle_vbox.asc - -Update and Install Virtualbox. - - # yum update && yum install virtualbox-4.3 - -Next, download and install Virtualbox extension pack. - - # wget http://download.virtualbox.org/virtualbox/4.3.12/Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack - # VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack - -![Install Virtualbox Extension Pack](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Virtualbox-Extension-Pack.jpeg) -Install Virtualbox Extension Pack - -![Installing Virtualbox Extension Pack](http://www.tecmint.com/wp-content/uploads/2015/04/Installing-Virtualbox-Extension-Pack.jpeg) -Installing Virtualbox Extension Pack - -Create a user ‘vbox‘ to manage virtualbox and add it to group vboxusers. - - # adduser vbox - # passwd vobx - # usermod -G vboxusers vbox - -Install HTTPD server. - - # yum install httpd - -Install PHP (with soap extension). - - # yum install php php-devel php-common php-soap php-gd - -Download PHP virtualBox. - - # wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-1.zip - -Extract the zip and copy the extracted folder to HTTP working directory. - - # unzip phpvirtualbox-4.*.zip - # cp phpvirtualbox-4.3-1 -R /var/www/html - -Next, rename file /var/www/html/phpvirtualbox/config.php-example to var/www/html/phpvirtualbox/config.php. - - # mv config.php.example config.php - -Open the configuration file to edit and add ‘username‘ and ‘password‘ we just created in the above step. - - # vi config.php - -Finally, restart VirtualBox and HTTP server. - - # service vbox-service restart - # service httpd restart - -Now forward the port and access it on a headed server. - - http://192.168.0.15/phpvirtualbox-4.3-1/ - -![PHP Virtualbox Login](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox-Login.png) -PHP Virtualbox Login - -![PHP Virtualbox Dashboard](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox.png) -PHP Virtualbox Dashboard - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/5/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora/ -[2]:http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ -[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ -[4]:http://www.tecmint.com/install-owncloud-to-create-personal-storage-in-linux/ \ No newline at end of file diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md new file mode 100644 index 0000000000..9845595af0 --- /dev/null +++ b/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md @@ -0,0 +1,134 @@ +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--5 +================================================================================ +### 25. 安装 Linux Malware Detect (LMD) ### + +Linux Malware Detect (LMD) 是 GNU GPLv2 协议下发布的开源 Linux 恶意程序扫描器,尤其是为面临威胁的主机环境。LMD 完整的安装、配置以及使用方法可以查看: + +- [安装 LMD 并和 ClamAV 一起使用作为反病毒引擎][1] + +### 26. 用 Speedtest-cli 测试服务器带宽 ### + +speedtest-cli 是用 python 写的用于测试网络下载和上传带宽的工具。关于 speedtest-cli 工具的完整安装和使用请阅读我们的文章[用命令行查看 Linux 服务器带宽][2] + +### 27. 配置 Cron 作业 ### + +这是最广泛使用的软件工具之一。它是一个作业调度器,比如,现在安排一个以后可以自动运行的作业。它对于日志、保存没有实现的记录以及其它日常工作,比如常规备份,非常有用。所有的调度都写在文件 /etc/crontab 中。 + +crontab 文件包含下面的 6 个域: + + 分 时 日期 月份 星期 命令 + (0-59) (0-23) (1-31) (1/jan-12/dec) (0-6/sun-sat) Command/script + +![Crontab 域](http://www.tecmint.com/wp-content/uploads/2015/04/Crontab-Fields.jpeg) +Crontab 域 + +在每天 04:30 运行一个 cron 作业(比如运行 /home/$USER/script.sh)。 + + 分 时 日期 月份 星期 命令 + 30 4 * * * speedtest-cli + +把下面的条目增加到 crontab 文件 ‘/etc/crontab/’。 + + 30 4 * * * /home/$user/script.sh + +把上面一行增加到 crontab 之后,它会在每天的 04:30 am 自动运行,输出取决于脚本文件的内容。另外脚本也可以用命令代替。关于更多 cron 作业的例子,可以阅读[Linux 上的 11 个 Cron 作业例子][3] + +### 28. 安装 Owncloud ### + +Owncloud 是一个基于 HTTP 的数据同步、文件共享和远程文件存储应用。更多关于安装 owncloud 的内容,你可以阅读这篇文章:[在 Linux 上创建个人/私有云存储][4] + +### 29. 启用 Virtualbox 虚拟化 ### + +虚拟化是创建虚拟操作系统、硬件和网络的过程,是当今最热门的技术之一。我们会详细地讨论如何安装和配置虚拟化。 + +我们的最小化 CentOS 服务器是一个无头服务器(译注:无头服务器是指没有专门用于向其它计算机和它们的用户提供服务的本地接口的计算设备)。我们通过安装下面的软件包为它承载可通过 HTTP 访问的虚拟机器做准备。 + + # yum groupinstall 'Development Tools' SDL kernel-devel kernel-headers dkms + +![安装开发工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Development-Tool.jpeg) +安装开发工具 + +更改工作目录到 ‘/etc/yum.repos.d/’ 并下载 VirtualBox 库。 + + # wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc + +安装刚下载的密钥。 + + # rpm --import oracle_vbox.asc + +升级并安装 VirtualBox。 + + # yum update && yum install virtualbox-4.3 + +下一步,下载和安装 VirtualBox 扩展包。 + + # wget http://download.virtualbox.org/virtualbox/4.3.12/Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack + # VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack + +![安装 VirtualBox 扩展包](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Virtualbox-Extension-Pack.jpeg) +安装 VirtualBox 扩展包 + +![正在安装 VirtualBox 扩展包](http://www.tecmint.com/wp-content/uploads/2015/04/Installing-Virtualbox-Extension-Pack.jpeg) +正在安装 VirtualBox 扩展包 + +添加用户 ‘vbox’ 用于管理 VirtualBox 并把它添加到组 vboxusers 中。 + + # adduser vbox + # passwd vobx + # usermod -G vboxusers vbox + +安装 HTTPD 服务器。 + + # yum install httpd + +安装 PHP (有 soap 扩展)。 + + # yum install php php-devel php-common php-soap php-gd + +下载 PHP virtualBox. + + # wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-1.zip + +解压 zip 文件并把解压后的文件夹复制到 HTTP 工作目录。 + + # unzip phpvirtualbox-4.*.zip + # cp phpvirtualbox-4.3-1 -R /var/www/html + +下一步,重命名文件 /var/www/html/phpvirtualbox/config.php-example 为 var/www/html/phpvirtualbox/config.php。 + + # mv config.php.example config.php + +打开配置文件并添加我们上一步创建的 ‘username ’ 和 ‘password’。 + + # vi config.php + +最后,重启 VirtualBox 和 HTTP 服务器。 + + # service vbox-service restart + # service httpd restart + +转发端口并从一个有头服务器上访问它。 + + http://192.168.0.15/phpvirtualbox-4.3-1/ + +![登录 PHP Virtualbox](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox-Login.png) +登录 PHP Virtualbox + +![PHP Virtualbox 面板](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox.png) +PHP Virtualbox 面板 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/5/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora/ +[2]:http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ +[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ +[4]:http://www.tecmint.com/install-owncloud-to-create-personal-storage-in-linux/ \ No newline at end of file From 4d206ac27b2cf2686fcb05fdbb340bb8cca9da70 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 27 Apr 2015 10:12:04 +0800 Subject: [PATCH 0645/2517] [Translated] tech/30 Things to Do After Minimal RHEL/CentOS 7 Installation--6 --- ...inimal RHEL or CentOS 7 Installation--6.md | 81 ------------------- ...inimal RHEL or CentOS 7 Installation--6.md | 80 ++++++++++++++++++ 2 files changed, 80 insertions(+), 81 deletions(-) delete mode 100644 sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md create mode 100644 translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md diff --git a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md b/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md deleted file mode 100644 index 497883d022..0000000000 --- a/sources/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md +++ /dev/null @@ -1,81 +0,0 @@ -Translating by ictlyh -30 Things to Do After Minimal RHEL/CentOS 7 Installation--6 -================================================================================ -### 30. Password Protect GRUB ### - -Password protect your boot loader so that you get an additional level of security right at the booting time. Also you get a protection layer of protection at physical level. Protect your Server by locking GRUB at boot to avoid any unauthorized access. - -First make backup of two files, so that if anything goes bad, you have the option to revert back. Create a backup of ‘/etc/grub2/grub.cfg‘ as ‘/etc/grub2/grub.cfg.old‘. - - # cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.old - -Also, Create a backup of ‘/etc/grub.d/10_linux‘ as ‘/etc/grub.d/10_linux.old‘. - - # cp /etc/grub.d/10_linux /etc/grub.d/10_linux.old - -Now open ‘/etc/grub.d/10_linux‘ and add the below line at the end of the file. - - cat < Date: Mon, 27 Apr 2015 10:28:58 +0800 Subject: [PATCH 0646/2517] PUB:20150318 Install And Use 'Go For It!' To Do App In Linux @wi-cuckoo --- ...And Use 'Go For It!' To Do App In Linux.md | 91 ++++++++++++++++++ ...And Use 'Go For It!' To Do App In Linux.md | 94 ------------------- 2 files changed, 91 insertions(+), 94 deletions(-) create mode 100644 published/20150318 Install And Use 'Go For It!' To Do App In Linux.md delete mode 100644 translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md diff --git a/published/20150318 Install And Use 'Go For It!' To Do App In Linux.md b/published/20150318 Install And Use 'Go For It!' To Do App In Linux.md new file mode 100644 index 0000000000..d76fecea59 --- /dev/null +++ b/published/20150318 Install And Use 'Go For It!' To Do App In Linux.md @@ -0,0 +1,91 @@ +在Linux上安装使用‘Go for it!’备忘软件 +=============================================================================== +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_For_It_TODO_Linux.jpeg) + +你在 Linux 桌面是如何管理任务和备忘的?我喜欢[用 Ubuntu 的粘帖便签][1]很久了。但是我要面对与其他设备同步的麻烦,特别是我的智能手机。这就是我为什么选择使用 [Google Keep][2] 的原因了。 + +Google Keep 是一款功能丰富的软件,我十分喜爱,而且喜欢到把它叫做 [Linux 的 Evernote ][3]地步。但是并不是每个人都喜欢一款功能丰富的备忘录软件。极简主义是目前的主流,很多人喜欢。如果你是极简主义的追求者之一,而且正在寻找一款开源的备忘录软件,那么你应该试一试 [Go For It!][4]。 + +### Go For It!高效的Linux桌面软件 ### + +Go For It!是一款简洁的备忘软件,借助定时提醒帮助你专注于工作。所以,当你添加一个任务到列表后,可以附上一个定时器。到设定时间后,它就会提醒你去做任务。你可以看看其帅哥开发者 [Manuel Kehl][5] 制作的视频(youtube 视频) : https://www.youtube.com/watch?v=mnw556C9FZQ + +### 安装 Go For It!### + +要在 Ubuntu 15.04,14.04 和其他基于 Ubuntu 的Linux 发行版,如Linux Mint, elementary OS Freya 等上面安装 Go For It!请使用这款软件官方的 PPA: + + sudo add-apt-repository ppa:mank319/go-for-it + sudo apt-get update + sudo apt-get install go-for-it + +你也可以下载 .deb 包,Windows 安装包和源代码,链接如下: + +- [Download source code][6] +- [Download .deb binaries][7] +- [Download for Windows][8] + +### 在Linux桌面使用 Go For It!### + +Go For It!使用真心方便。你只需添加任务到列表中,任务会自动存入 todo.txt 文件中。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux.png) + +每个任务默认定时25分钟。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_1.png) + +任务一旦完成,就会被自动存档到 done.txt 文件中。根据设置,它会在规定的时间间隔或者任务过期前不久,发送桌面提醒: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Linux_notification.png) + +你可以从配置里面修改所有的偏好。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_2.png) + +目前一切都看着挺好。但是在智能手机上使用体验怎样呢?如果你不能使它在不同设备间同步,那这款高效软件就是不完整的。好消息是 Go For It!是基于 [todo.txt][9] 的,这意味着你可以用第三方软件和像 Dropbox 一样的云服务来使用它。 + +### 在安卓手机和平板上使用Go For It! ### + +在这里你需要做一些工作。首先的首先,在 Linux 和你的安卓手机上安装 Dropbox,如果之前没有安装的话。下一步你要做的就是要配置 Go For It!和 **修改 todo.txt 的目录到 Dropbox 的路径下**。 + +然后,你得去下载 [Simpletask Andriod app][10]。这是免费的应用。安装它。当你第一次运行 Simletask 的时候,你会被要求关联你的账号到 Dropbox: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android_1.jpeg) + +一旦你完成了 Simpletask 与 Dropbox 的关联,就可以打开应用了。如果你已经修改了 Go For It 的配置,将文件保存到Dropbox 上,你就应该可以在 Simpletask 里看到。而如果你没有看到,点击应用底部的设置,选择 Open Todo file 的选项: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android.jpeg) + +现在,你应该可以看到 Simpletask 同步的任务了。 + +### 总结 ### + +对于 Simpletask,你就可以以类似[标记语言工具][11]的风格使用它。对于小巧和专注而言,Go For It!是一款不错的备忘软件。一个干净的界面是额外的加分点。如果拥有它自己的手机应用就更好了,但是我们也有临时替代方案了。 + +底层来讲,Go For It! 不会运行在后台。这就是说,你不得不让它一直保持运行。它甚至没有一个最小化的按钮,这有一点小小的烦扰。我想要看到的是有一个小的指示程序,运行在后台,并且快速进入主面板,这肯定会提升其可用性。 + +试试 Go For It!吧,分享一下你的使用体验。在 Linux 桌面上,你还使用了哪些其他的备忘软件?比起其他你最喜欢的同类应用,Go For It!怎么样? + +------------------------------------------------------------------------------- + + +via: http://itsfoss.com/go-for-it-to-do-app-in-linux/ + +作者:[Abhishek][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ +[2]:http://itsfoss.com/install-google-keep-ubuntu-1310/ +[3]:http://itsfoss.com/5-evernote-alternatives-linux/ +[4]:http://manuel-kehl.de/projects/go-for-it/ +[5]:http://manuel-kehl.de/about-me/ +[6]:https://github.com/mank319/Go-For-It +[7]:https://launchpad.net/~mank319/+archive/ubuntu/go-for-it +[8]:http://manuel-kehl.de/projects/go-for-it/download-windows-version/ +[9]:http://todotxt.com/ +[10]:https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en +[11]:http://itsfoss.com/install-latex-ubuntu-1404/ diff --git a/translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md b/translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md deleted file mode 100644 index 6fa5899404..0000000000 --- a/translated/tech/20150318 Install And Use 'Go For It!' To Do App In Linux.md +++ /dev/null @@ -1,94 +0,0 @@ -在Linux上安装与使用‘Go for it!’备忘软件 -=============================================================================== -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_For_It_TODO_Linux.jpeg) - -你在Linux桌面是如何管理任务和备忘的?我喜欢[用Ubuntu的粘滞便签][1]很久了。但是我要面对与其他设备同步的麻烦,特别是我的智能手机。这就是我为什么选择使用[Google Keep][2]的原因了。 - -现在,Google Keep是一款功能丰富的软件,我十分喜爱,而且喜欢到把他叫做[Linux的Evernote][3]地步。但是并不是每个人都喜欢一款功能丰富的备忘录软件。极简主义是目前的主流,很多人喜欢。如果你是极简主义的追求者之一,而且正在寻找一款开源的备忘录软件,那么你应该试一试[Go For It!][4]。 - -### Go For It!高效的Linux桌面软件 ### - -Go For It!是一款简洁的备忘软件,借助定时提醒帮助你专注于工作。所以,你添加一个任务到列表后,可以附上一个定时器。到设定时间后,它就会提醒你去做任务。你可以看看其开发者制作的视频,[Manuel Kehl][5]: - -注释:youtube视频,发布的时候可做成一个链接 - - -### 安装 Go For It!### - -为在Ubuntu 15.04,14.04和其他基于Linux内核的Ubuntu版本,如Linux Mint,初级操作系统Freya等等上面安装 Go For It!请使用这款软件官方的PPA: - - sudo add-apt-repository ppa:mank319/go-for-it - sudo apt-get update - sudo apt-get install go-for-it - -你也可以下载.deb包,Windows安装包和源代码,从下面不同的连接中: - -- [Download source code][6] -- [Download .deb binaries][7] -- [Download for Windows][8] - -### 在Linux桌面使用Go For It!### - -Go For It!使用真心方便。你只需添加任务到列表中,任务会自动存入todo.txt文件中。 - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux.png) - -默认是为每个任务定时25分钟。 - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_1.png) - -任务一旦完成,就会被自动存档到done.txt文件中。根据喜好,它会在规定的时间间隔或者任务过期前不久,发送桌面提醒: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Linux_notification.png) - -你可以从配置里面修改所有的喜好。 - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go-for-it_todo_app_linux_2.png) - -目前一切都看着挺好。但是在智能手机上使用体验怎样呢?如果你不能使它在不同设备间同步,那这款高效软件就是不完整的。好消息是Go For It!是基于[todo.txt][9]的,这意味着你可以用第三方软件和像Dropbox一样的云服务来使用它。 - -### 在安卓手机和平板上使用Go For It! ### - -在这里你需要做一些工作。首先的首先,在Linux和你的安卓手机上安装Dropbox,如果之前没有安装的话。下一步你要做的就是要配置Go For It!和 **改todo.txt的目录到Dropbox的路径下**。 - -然后,你得去下载[Simpletask Andriod app][10]。这是免费的应用。安装它。当你第一次运行Simletask的时候,你会被要求关联你的账号到Dropbox: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android_1.jpeg) - -一旦你完成了Simpletask与Dropbox的关联,就可以打开应用。如果你已经修改了Go For It的配置,将文件保存到Dropbox上,你就应该可以在Simpletask里看到。而如果你没有看到,点击应用底部的设置,选择Open Todo file的选项: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Go_for_it_Android.jpeg) - -现在,你应该可以看到Simpletask同步的任务了。 - -### 总结 ### - -有了Simpletask,你就可以相似地使用它,就像一种[标记语言工具][11]。对于小巧和专注而言,Go For It!是一款不错的备忘软件。一个干净的界面是额外的加分点。拥有它自己的手机应用应该是比较好的,但是我们已经看到了替代的方案。 - -底层来讲,Go For It!不会运行在后台。这就是说,你不得不让它一直保持运行。它甚至没有一个最小化的按钮,这有一点小小的烦扰。我想要看到的是有一个小的指示程序,运行在后台,并且快速进入主面板,这肯定会提升其可用性。 - -是该试试Go For It!了,分享一下你们之间的经历。在Linux桌面上,你还使用了哪些其他的备忘软件?比起其他你最喜欢的同类应用,Go For It!怎么样? - -------------------------------------------------------------------------------- - - -via: http://itsfoss.com/go-for-it-to-do-app-in-linux/ - -作者:[Abhishek][a] -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ -[2]:http://itsfoss.com/install-google-keep-ubuntu-1310/ -[3]:http://itsfoss.com/5-evernote-alternatives-linux/ -[4]:http://manuel-kehl.de/projects/go-for-it/ -[5]:http://manuel-kehl.de/about-me/ -[6]:https://github.com/mank319/Go-For-It -[7]:https://launchpad.net/~mank319/+archive/ubuntu/go-for-it -[8]:http://manuel-kehl.de/projects/go-for-it/download-windows-version/ -[9]:http://todotxt.com/ -[10]:https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en -[11]:http://itsfoss.com/install-latex-ubuntu-1404/ From 43e6732ab41b3ecfc2621f995e187e8afb74faf0 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 10:35:55 +0800 Subject: [PATCH 0647/2517] PUB:20150323 Papyrus--An Open Source Note Manager @KevinSJ --- ...23 Papyrus--An Open Source Note Manager.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/share => published}/20150323 Papyrus--An Open Source Note Manager.md (61%) diff --git a/translated/share/20150323 Papyrus--An Open Source Note Manager.md b/published/20150323 Papyrus--An Open Source Note Manager.md similarity index 61% rename from translated/share/20150323 Papyrus--An Open Source Note Manager.md rename to published/20150323 Papyrus--An Open Source Note Manager.md index abcfe00aca..e5742facde 100644 --- a/translated/share/20150323 Papyrus--An Open Source Note Manager.md +++ b/published/20150323 Papyrus--An Open Source Note Manager.md @@ -1,27 +1,27 @@ -Papyrus:开源笔记管理工具 +Papyrus:开源笔记管理工具 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_4.jpeg) 在上一篇帖子中,我们介绍了[待办事项管理软件Go For It!][1]。今天我们将介绍一款名为**Papyrus的开源笔记软件** -[Papyrus][2] 是[Kaqaz笔记管理][3]的一个分支并使用QT5开发。它不仅有简洁、易用的界面,还具备了较好的安全性。由于强调简洁,我觉得Papyrus与OneNote比较相像。你可以将你的笔记像"纸张"一样分类整理,还可以给他们添加标签进行分组。够简单的吧! +[Papyrus][2] 是[Kaqaz 笔记管理][3]的一个分支,使用 Qt5 开发。它不仅有简洁、易用的界面,(其宣称)还具备了较好的安全性。由于强调简洁,我觉得 Papyrus 与 OneNote 比较相像。你可以将你的笔记像"纸张"一样分类整理,还可以给他们添加标签进行分组。够简单的吧! ## Papyrus 的特性: ### -虽然Papyrus强调简洁,它依然有很多丰富的功能。他的一些主要功能如下: +虽然 Papyrus 强调简洁,它依然有很多丰富的功能。它的一些主要功能如下: - 按类别和标签管理笔记 - 高级搜索选项 - 触屏模式 - 全屏选项 -- 备份至Dropbox/硬盘 -- 某些页面允许加密 +- 备份至 Dropbox/硬盘/外部存储 +- 允许加密某些页面 - 可与其他软件共享笔记 -- 与Dropbox加密同步 -- 除Linux外,还可在Android,Windows和OS X使用 +- 与 Dropbox 加密同步 +- 除 Linux 外,还可在 Android,Windows 和 OS X 使用 ### 安装 Papyrus ### -Papyrus为Android用户提供了APK安装包。Windows和OS X也有安装文件。Linux用户还可以获取程序的源码。Ubuntu及其它基于Ubuntu的发行版可以使用.deb包进行安装。根据你的系统及习惯,你可以从Papyrus的下载页面中获取不同的文件: +Papyrus 为 Android 用户提供了 APK 安装包。Windows 和 OS X 也有安装文件。Linux 用户还可以获取程序的源码。Ubuntu 及其它基于 Ubuntu 的发行版可以使用 .deb 包进行安装。根据你的系统及习惯,你可以从 Papyrus 的下载页面中获取不同的文件: - [下载 Papyrus][4] @@ -40,7 +40,7 @@ Papyrus为Android用户提供了APK安装包。Windows和OS X也有安装文 试试Papyrus吧,你会喜欢上它的。在下方评论区和我们分享你的使用经验吧。 -(译者注:此软件暂无中文版) +(LCTT译注:此软件暂无中文版) -------------------------------------------------------------------------------- @@ -53,7 +53,7 @@ via: http://itsfoss.com/papyrus-open-source-note-manager/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ +[1]:http://linux.cn/article-5337-1.html [2]:http://aseman.co/en/products/papyrus/ [3]:https://github.com/sialan-labs/kaqaz/ [4]:http://aseman.co/en/products/papyrus/ From 74d156f3fa0e337675a2f3023e67ccff83370f9e Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 10:55:55 +0800 Subject: [PATCH 0648/2517] PUB:20150128 Docker-1 Moving to Docker @mtunique --- .../20150128 Docker-1 Moving to Docker.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150128 Docker-1 Moving to Docker.md (74%) diff --git a/translated/tech/20150128 Docker-1 Moving to Docker.md b/published/20150128 Docker-1 Moving to Docker.md similarity index 74% rename from translated/tech/20150128 Docker-1 Moving to Docker.md rename to published/20150128 Docker-1 Moving to Docker.md index 36c8f16506..5cadf51ce6 100644 --- a/translated/tech/20150128 Docker-1 Moving to Docker.md +++ b/published/20150128 Docker-1 Moving to Docker.md @@ -1,4 +1,4 @@ -Moving to Docker +走向 Docker ================================================================================ ![](http://cocoahunter.com/content/images/2015/01/docker1.jpeg) @@ -8,11 +8,11 @@ Moving to Docker 上个月,我一直在折腾开发环境。这是我个人故事和经验,关于尝试用Docker简化Rails应用的部署过程。 -当我在2012年创建我的公司 – [Touchware][1]时,我还是一个独立开发者。很多事情很小,不复杂,不他们需要很多维护,他们也不需要不部署到很多机器上。经过过去一年的发展,我们成长了很多(我们现在是是拥有10个人团队)而且我们的服务端的程序和API无论在范围和规模方面都有增长。 +当我在2012年创建我的公司 – [Touchware][1]时,我还是一个独立开发者。很多事情很小,不复杂,他们不需要很多维护,他们也不需要部署到很多机器上。经过过去一年的发展,我们成长了很多(我们现在是是拥有10个人的团队)而且我们的服务端的程序和API无论在范围和规模方面都有增长。 ### 第1步 - Heroku ### -我们还是个小公司,我们需要让事情运行地尽可能平稳。当我们寻找可行的解决方案时,我们打算坚持用那些可以帮助我们减轻对硬件依赖负担的工具。由于我们主要开发Rails应用,而Heroku对RoR,常用的数据库和缓存(Postgres/Mongo/Redis等)有很好的支持,最明智的选择就是用[Heroku][2] 。我们就是这样做的。 +我们还是个小公司,我们需要让事情运行地尽可能平稳。当我们寻找可行的解决方案时,我们打算坚持用那些可以帮助我们减轻对硬件依赖负担的工具。由于我们主要开发Rails应用,而Heroku对RoR、常用的数据库和缓存(Postgres/Mongo/Redis等)有很好的支持,最明智的选择就是用[Heroku][2] 。我们就是这样做的。 Heroku有很好的技术支持和文档,使得部署非常轻松。唯一的问题是,当你处于起步阶段,你需要很多开销。这不是最好的选择,真的。 @@ -20,18 +20,18 @@ Heroku有很好的技术支持和文档,使得部署非常轻松。唯一的 为了尝试并降低成本,我们决定试试Dokku。[Dokku][3],引用GitHub上的一句话 -> Docker powered mini-Heroku in around 100 lines of Bash +> Docker 驱动的 mini-Heroku,只用了一百来行的 bash 脚本 -我们启用的[DigitalOcean][4]上的很多台机器,都预装了Dokku。Dokku非常像Heroku,但是当你有复杂的项目需要调整配置参数或者是需要特殊的依赖时,它就不能胜任了。我们有一个应用,它需要对图片进行多次转换,我们无法安装一个适合版本的imagemagick到托管我们Rails应用的基于Dokku的Docker容器内。尽管我们还有很多应用运行在Dokku上,但我们还是不得不把一些迁移回Heroku。 +我们启用的[DigitalOcean][4]上的很多台机器,都预装了Dokku。Dokku非常像Heroku,但是当你有复杂的项目需要调整配置参数或者是需要特殊的依赖时,它就不能胜任了。我们有一个应用,它需要对图片进行多次转换,我们把我们Rails应用的托管到基于Dokku的Docker容器,但是无法安装一个适合版本的imagemagick到里面。尽管我们还有很多应用运行在Dokku上,但我们还是不得不把一些迁移回Heroku。 ### 第3步 - Docker ### -几个月前,由于开发环境和生产环境的问题重新出现,我决定试试Docker。简单来说,Docker让开发者容器化应用,简化部署。由于一个Docker容器本质上已经包含项目运行所需要的所有依赖,只要它能在你的笔记本上运行地很好,你就能确保它将也能在任何一个别的远程服务器的生产环境上运行,包括Amazon的EC2和DigitalOcean上的VPS。 +几个月前,由于开发环境和生产环境的问题重新出现,我决定试试Docker。简单来说,Docker让开发者容器化应用、简化部署。由于一个Docker容器本质上已经包含项目运行所需要的所有依赖,只要它能在你的笔记本上运行地很好,你就能确保它将也能在任何一个别的远程服务器的生产环境上运行,包括Amazon的EC2和DigitalOcean上的VPS。 -Docker IMHO特别有意思的原因是: +就我个人的看法来说,Docker 特别有意思的原因是: -- 它促进了模块化和分离关注点:你只需要去考虑应用的逻辑部分(负载均衡:1个容器;数据库:1个容器;web服务器:1个容器); -- 在部署的配置上非常灵活:容器可以被部署在大量的HW上,也可以容易地重新部署在不同的服务器或者提供商那; +- 它促进了模块化和关注点分离:你只需要去考虑应用的逻辑部分(负载均衡:1个容器;数据库:1个容器;web服务器:1个容器); +- 在部署的配置上非常灵活:容器可以被部署在各种硬件上,也可以容易地重新部署在不同的服务器和不同的提供商; - 它允许非常细粒度地优化应用的运行环境:你可以利用你的容器来创建镜像,所以你有很多选择来配置环境。 它也有一些缺点: @@ -54,15 +54,15 @@ via: http://cocoahunter.com/2015/01/23/docker-1/ 作者:[Michelangelo Chasseur][a] 译者:[mtunique](https://github.com/mtunique) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://cocoahunter.com/author/michelangelo/ [1]:http://www.touchwa.re/ -[2]:http://cocoahunter.com/2015/01/23/docker-1/www.heroku.com +[2]:http://www.heroku.com [3]:https://github.com/progrium/dokku -[4]:http://cocoahunter.com/2015/01/23/docker-1/www.digitalocean.com +[4]:http://www.digitalocean.com [5]:http://www.docker.com/ [6]:http://cocoahunter.com/2015/01/23/docker-2/ [7]:http://cocoahunter.com/2015/01/23/docker-3/ @@ -78,4 +78,3 @@ via: http://cocoahunter.com/2015/01/23/docker-1/ [17]: [18]: [19]: -[20]: From adbec133cb0f71b372d4e10401e77948e5403d1f Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 11:10:12 +0800 Subject: [PATCH 0649/2517] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E6=9C=AA=E7=BF=BB=E8=AF=91=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @runningwater @blueabysm @theo-l @weychen @ly0 @coloka @Medusar @mr-ping @KayGuoWhu @haimingfg @martin2011qi --- ... Text Editors Great for Remote Editing and Much More.md | 1 - sources/talk/20141211 Open source all over the world.md | 1 - ...0141224 The Curious Case of the Disappearing Distros.md | 4 ---- ...10 Top Distributions in Demand to Get Your Dream Job.md | 1 - ...0141219 What is good audio editing software on Linux.md | 7 +++---- ...at are useful command-line network monitors on Linux.md | 1 - .../tech/20150123 How to make a file immutable on Linux.md | 2 -- ...0126 iptraf--A TCP or UDP Network Monitoring Utility.md | 2 -- ...inux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md | 1 + ...27 Enjoy Android Apps on Ubuntu using ARChon Runtime.md | 1 - ...rensic Tool to Analyze Disk Images and Recover Files.md | 3 --- sources/tech/20150401 ZMap Documentation.md | 2 -- 12 files changed, 4 insertions(+), 22 deletions(-) diff --git a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md index 42b2700b49..401a4da2fc 100644 --- a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md +++ b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md @@ -1,4 +1,3 @@ -(translating by runningwater) Compact Text Editors Great for Remote Editing and Much More ================================================================================ A text editor is software used for editing plain text files. This type of software has many different uses including modifying configuration files, writing programming language source code, jotting down thoughts, or even making a grocery list. Given that editors can be used for such a diverse range of activities, it is worth spending the time finding an editor that best suites your preferences. diff --git a/sources/talk/20141211 Open source all over the world.md b/sources/talk/20141211 Open source all over the world.md index 130201bff4..bd306edd5a 100644 --- a/sources/talk/20141211 Open source all over the world.md +++ b/sources/talk/20141211 Open source all over the world.md @@ -1,4 +1,3 @@ -[raywang] Open source all over the world ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUS_OpenSourceExperience_520x292_cm.png) diff --git a/sources/talk/20141224 The Curious Case of the Disappearing Distros.md b/sources/talk/20141224 The Curious Case of the Disappearing Distros.md index 3fe7cd788c..b9fc7875d7 100644 --- a/sources/talk/20141224 The Curious Case of the Disappearing Distros.md +++ b/sources/talk/20141224 The Curious Case of the Disappearing Distros.md @@ -1,12 +1,8 @@ -theol-l translating - The Curious Case of the Disappearing Distros -关于消失的发行版的古怪情形。 ================================================================================ ![](http://www.linuxinsider.com/ai/828896/linux-distros.jpg) "Linux is a big game now, with billions of dollars of profit, and it's the best thing since sliced bread, but corporations are taking control, and slowly but systematically, community distros are being killed," said Google+ blogger Alessandro Ebersol. "Linux is slowly becoming just like BSD, where companies use and abuse it and give very little in return." -"Linux现在成为了一个大型的游戏,同时具有巨额的利润,这是有史以来最好的事情。但是公司企业进行了控制,于是缓慢而系统的社区发行版就逐渐被干掉了,",Google+的一个博主 Alessandro Ebersol说到。"Linux开始变得像BSD--一些公司使用和滥用但是没有任何回报--一样缓慢。" Well the holidays are pretty much upon us at last here in the Linux blogosphere, and there's nowhere left to hide. The next two weeks or so promise little more than a blur of forced social occasions and too-large meals, punctuated only -- for the luckier ones among us -- by occasional respite down at the Broken Windows Lounge. diff --git a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md index 5632351b37..0e3e611ea4 100644 --- a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md +++ b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md @@ -1,4 +1,3 @@ -Translating by weychen 10 Top Distributions in Demand to Get Your Dream Job ================================================================================ We are coming up with a series of five articles which aims at making you aware of the top skills which will help you in getting yours dream job. In this competitive world you can not rely on one skill. You need to have balanced set of skills. There is no measure of a balanced skill set except a few conventions and statistics which changes from time-to-time. diff --git a/sources/tech/20141219 What is good audio editing software on Linux.md b/sources/tech/20141219 What is good audio editing software on Linux.md index d9228b4eda..ccc6a0883b 100644 --- a/sources/tech/20141219 What is good audio editing software on Linux.md +++ b/sources/tech/20141219 What is good audio editing software on Linux.md @@ -1,8 +1,7 @@ -Translating by ly0 - -Linux下一些蛮不错的音频编辑软件 +What is good audio editing software on Linux ================================================================================ -无论你是一个业余的音乐家或者仅仅是一个上课撸教授音的学,你总是需要和录音打交道。如果你有很长的时间仅仅用Mac干这种事情,那么可以和这个过程说拜拜了,现在Linux也可以干同样的事情。简而言之,这里有一个简单但是不错的音频编辑软件列表,来满足你对不同任务和需求。 + +Whether you are an amateur musician or just a student recording his professor, you need to edit and work with audio recordings. If for a long time such task was exclusively attributed to Macintosh, this time is over, and Linux now has what it takes to do the job. In short, here is a non-exhaustive list of good audio editing software, fit for different tasks and needs. ### 1. Audacity ### diff --git a/sources/tech/20150112 What are useful command-line network monitors on Linux.md b/sources/tech/20150112 What are useful command-line network monitors on Linux.md index eeda3f0542..f17e45cbf4 100644 --- a/sources/tech/20150112 What are useful command-line network monitors on Linux.md +++ b/sources/tech/20150112 What are useful command-line network monitors on Linux.md @@ -1,4 +1,3 @@ -translating by coloka What are useful command-line network monitors on Linux ================================================================================ Network monitoring is a critical IT function for businesses of all sizes. The goal of network monitoring can vary. For example, the monitoring activity can be part of long-term network provisioning, security protection, performance troubleshooting, network usage accounting, and so on. Depending on its goal, network monitoring is done in many different ways, such as performing packet-level sniffing, collecting flow-level statistics, actively injecting probes into the network, parsing server logs, etc. diff --git a/sources/tech/20150123 How to make a file immutable on Linux.md b/sources/tech/20150123 How to make a file immutable on Linux.md index 7d46d1de68..622cc4e5b3 100644 --- a/sources/tech/20150123 How to make a file immutable on Linux.md +++ b/sources/tech/20150123 How to make a file immutable on Linux.md @@ -1,5 +1,3 @@ -Translating by Medusar - How to make a file immutable on Linux ================================================================================ Suppose you want to write-protect some important files on Linux, so that they cannot be deleted or tampered with by accident or otherwise. In other cases, you may want to prevent certain configuration files from being overwritten automatically by software. While changing their ownership or permission bits on the files by using chown or chmod is one way to deal with this situation, this is not a perfect solution as it cannot prevent any action done with root privilege. That is when chattr comes in handy. diff --git a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md index f39d53a47d..1d5d3cd0d9 100644 --- a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md +++ b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md @@ -1,5 +1,3 @@ -Ping -- Translating - iptraf: A TCP/UDP Network Monitoring Utility ================================================================================ [iptraf][1] is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. diff --git a/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md index fe2432f8b3..6817a75b03 100644 --- a/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md +++ b/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md @@ -1,5 +1,6 @@ Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10 ================================================================================ + A low-overhead monitoring web dashboard for a GNU/Linux machine. Simply drop-in the app and go!.Linux Dash's interface provides a detailed overview of all vital aspects of your server, including RAM and disk usage, network, installed software, users, and running processes. All information is organized into sections, and you can jump to a specific section using the buttons in the main toolbar. Linux Dash is not the most advanced monitoring tool out there, but it might be a good fit for users looking for a slick, lightweight, and easy to deploy application. ### Linux-Dash Features ### diff --git a/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md index f6def514b8..f85b2cf725 100644 --- a/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md +++ b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md @@ -1,4 +1,3 @@ -translating by KayGuoWhu Enjoy Android Apps on Ubuntu using ARChon Runtime ================================================================================ Before, we gave try to many android app emulating tools like Genymotion, Virtualbox, Android SDK, etc to try to run android apps on it. But, with this new Chrome Android Runtime, we are able to run Android Apps on our Chrome Browser. So, here are the steps we'll need to follow to install Android Apps on Ubuntu using ARChon Runtime. diff --git a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md index 4e8461528e..2f138a9e3d 100644 --- a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md +++ b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md @@ -1,6 +1,3 @@ - -tranlating by haimingfg - Sleuth Kit - Open Source Forensic Tool to Analyze Disk Images and Recover Files ================================================================================ SIFT is a Ubuntu based forensics distribution provided by SANS Inc. It consist of many forensics tools such as Sleuth kit / Autopsy etc . However, Sleuth kit/Autopsy tools can be installed on Ubuntu/Fedora distribution instead of downloading complete distribution of SIFT. diff --git a/sources/tech/20150401 ZMap Documentation.md b/sources/tech/20150401 ZMap Documentation.md index 3cde747acf..d2aa316c1f 100644 --- a/sources/tech/20150401 ZMap Documentation.md +++ b/sources/tech/20150401 ZMap Documentation.md @@ -1,5 +1,3 @@ -translating by martin. - ZMap Documentation ================================================================================ 1. Getting Started with ZMap From 957ecbc7a9b290042e58674991e0c8f2707336d3 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Mon, 27 Apr 2015 11:27:44 +0800 Subject: [PATCH 0650/2517] translated wi-cuckoo --- ...Install Discourse in a Docker Container.md | 161 ------------------ ...Install Discourse in a Docker Container.md | 156 +++++++++++++++++ 2 files changed, 156 insertions(+), 161 deletions(-) delete mode 100644 sources/tech/20150417 How to Install Discourse in a Docker Container.md create mode 100644 translated/tech/20150417 How to Install Discourse in a Docker Container.md diff --git a/sources/tech/20150417 How to Install Discourse in a Docker Container.md b/sources/tech/20150417 How to Install Discourse in a Docker Container.md deleted file mode 100644 index adedf08faa..0000000000 --- a/sources/tech/20150417 How to Install Discourse in a Docker Container.md +++ /dev/null @@ -1,161 +0,0 @@ -translating wi-cuckoo -How to Install Discourse in a Docker Container -================================================================================ -Hi all, today we'll learn how to install Discourse using Docker Platform. Discourse is the 100% open source discussion platform built for the next decade of the Internet featuring as a mailing list, a discussion forum and a long-form chat room. It is a smart way of attempt to reimagine what a modern, sustainable, fully open-source Internet discussion platform should be today, both from a technology standpoint and a sociology standpoint. Discourse is simple, clean, and straightforward way for discussion. It is really an awesome platform for any kinds of discussions on internet featuring such a cool services out of the box. Docker is an open source platform that provides an open platform to pack, ship and run any application as a lightweight container. Docker containers makes Discourse a lot handy and easy to setup app. - -So, here are some quick and easy steps in order to install Discourse inside a Docker environment. - -### 1. Installing Docker ### - -First of all, we need to make sure that we have Docker installed in our host Operating System. To install, we'll need to the run the following command in a shell or terminal. - -#### On Ubuntu #### - -Package docker is available in Ubuntu's repository so, we'll be using apt manager to install it in sudo or root mode. - - # apt-get install docker - -#### On CentOS 7 #### - -On CentOS 7 machine, we'll use yum manager to install docker as it is also available in CentOS's repository. - - # yum install docker - -![Installing Docker](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png) - -### 2. Setting Swap Memory ### - -If you have RAM size less than 1 GB then, make sure you upgrade your system to 1 GB or above cause Discourse doesn't get installed in 512 MB RAM. If you are now ready to install Discourse with 1 GB or above, follow the following steps to setup swap memory for you VPS or Server. - -We'll create an empty swapfile by running the following command. - - # install -o root -g root -m 0600 /dev/null /swapfile - -If you want your swap memory to be 1 GB, then do the below step and skip the next step. - - # dd if=/dev/zero of=/swapfile bs=1k count=1024k - -if you want it to be 2 GB, follow the below. Make sure you skip the above step. - - # dd if=/dev/zero of=/swapfile bs=1k count=2048k - -Then, we'll point Swap Memory as swapfile . - - #mkswap /swapfile - -To activate it run the following command. - - #swapon /swapfile - -Now, we'll add it to the file system table so its there after reboot: - - # echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab - -Set the swappiness to 10 so its only uses as an emergency buffer. - - # sudo sysctl -w vm.swappiness=10 - # echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf - -### 3. Installing Discourse ### - -After installing Docker in our host machine, we'll now go further towards installing Discourse. We'll now clone Discourse from the official Discourse Github into /var/discourse directory. To do so, we'll need to run the following command. - - # mkdir /var/discourse/ - - # cd /var/discourse/ - - # git clone https://github.com/discourse/discourse_docker.git /var/discourse/ - -After cloning the git repository, we'll copy the configuration file for our discourse server. - - # cp samples/standalone.yml containers/app.yml - -![Cloning Discourse Docker](http://blog.linoxide.com/wp-content/uploads/2015/04/cloning-discourse-docker.png) - -### 4. Configuring Discourse ### - -Next, we'll edit the discourse configuration ie app.yml located inside containers directory using our favorite text editor. - - # nano containers/app.yml - -Now, we need to set the developer's email address to DISCOURSE_DEVELOPER_EMAILS as follows. - - DISCOURSE_DEVELOPER_EMAILS: 'arun@linoxide.com' - -Then, we'll set the hostname as the domain name of our server. - - DISCOURSE_HOSTNAME: 'discourse.linoxide.com' - -Then, set the mail credentials per our SMTP Server hosted in the same discourse machine or vps. The SMTP settings are required to send mail from your Discourse instance - - DISCOURSE_SMTP_ADDRESS: smtp.linoxide.com - DISCOURSE_SMTP_PORT: 587 # (optional) - DISCOURSE_SMTP_USER_NAME: admin@linoxide.com # (optional) - DISCOURSE_SMTP_PASSWORD: test123 # (optional) - -![](http://blog.linoxide.com/wp-content/uploads/2015/04/discourse-configuration.png) - - Discourse Configuration - -If you are using a 1 GB instance, set UNICORN_WORKERS to 2 and db_shared_buffers to 128MB so you have more memory room. - -It is compulsory to create a mailing server to run Discourse. If you have a server then its cool, we can use its credentials. If you have no existing mail server, or you don't know what it is? No problem, create a free account on [Mandrill][1] ([Mailgun][2], or [Mailjet][3]), and use the credentials provided in the dashboard. - -### 5. Starting Discourse App ### - -After configuring the discourse configuration file, we'll surely wanna start our Discourse server. To do so, first we'll launch discourse bootstrap by running the following command under the current directory ie /var/discourse/ . - - # ./launcher bootstrap app - -![Starting Discourse Bootstrap](http://blog.linoxide.com/wp-content/uploads/2015/04/starting-discourse-bootstrap.png) - -The above command may take some minutes which automatically configures our Discourse environment. Then, after the processes are finished, we'll need to run the following to start our Discourse App. - - #./launcher start app - -![Starting Discourse](http://blog.linoxide.com/wp-content/uploads/2015/04/starting-discourse.png) - -If everything went as expected accordingly, we'll be able to access our fresh Discourse Web Interface using our favorite Web Browser by pointing the url to http://ip-address/ or http://discourse.linoxide.com/ . Then, we can create a new account and become admin. - -![Discourse Web interface](http://blog.linoxide.com/wp-content/uploads/2015/04/Discourse-web-interface.png) - -### Maintenance ### - -Here below are the usages of the launcher command inside /var/discourse/ directory so that we can commit maintenance and control over the Discourse Docker Container. - - Usage: launcher COMMAND CONFIG [--skip-prereqs] - Commands: - start: Start/initialize a container - stop: Stop a running container - restart: Restart a container - destroy: Stop and remove a container - enter: Use nsenter to enter a container - ssh: Start a bash shell in a running container - logs: Docker logs for container - mailtest: Test the mail settings in a container - bootstrap: Bootstrap a container for the config based on a template - rebuild: Rebuild a container (destroy old, bootstrap, start new) - cleanup: Remove all containers that have stopped for > 24 hours - - Options: - --skip-prereqs Don't check prerequisites - --docker-args Extra arguments to pass when running docker - -### Conclusion ### - -Hurray! We have successfully installed Discourse with Docker Technology. Docker technology makes Discourse very much easy to install in any Platform with all the requirement fulfilled. We need our own mailing server or credentials of a mailing server to get started with it. It is a great platform for easy modern mailing list, discussion platform. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/how-tos/install-discourse-docker-container/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://mandrillapp.com/ -[2]:http://www.mailgun.com/ -[3]:https://www.mailjet.com/pricing diff --git a/translated/tech/20150417 How to Install Discourse in a Docker Container.md b/translated/tech/20150417 How to Install Discourse in a Docker Container.md new file mode 100644 index 0000000000..e4dcf8f3c5 --- /dev/null +++ b/translated/tech/20150417 How to Install Discourse in a Docker Container.md @@ -0,0 +1,156 @@ +如何在一个Docker容器里安装Discourse +============================================================================= +大家好,今天我们将会学习如何利用Docker平台安装Discourse。Discourse是完全开源的讨论平台,为互联网的下一个十年而搭建,拥有一个邮件列表,一个论坛和一个long-form(此处不明白)聊天室。不管从技术角度还是社会学角度,当你试图去重新想象当今一个现代的,可持续的,完全开源的互联网讨论平台该是什么样子,Discourse都是一个不错的途径。Discourse简洁,直接之于讨论。它确实是一个令人称赞的平台,对于互联网上各种各样的讨论来说,提供了在机器之外如此酷的一个服务。Docker是一个开源平台,提供打包,运输和运行任何应用的平台,如一个轻量级容器。Docker容器技术使得Discourse更加方便和容易去建立应用程序。 + +所以,下面是一些快速且容易的步骤,用来安装Discourse在一个Docker环境里面。 + +### 1. 安装Docker ### + +首先,我们需要确认我们的主机操作系统已经安装了Docker。我们需要在shell或者终端运行以下命令安装Docker。 + +#### 在Ubuntu上 #### + +docker安装包在Ubuntu的仓库里面是可用的,所以我们将会使用apt管理器安装,以sudo或者root模式 + + # apt-get docker + +#### 在CentOS 7上 #### + +在CentOS 7的主机上,我们使用yum管理器安装docker,因为CentOS的仓库里同样有docker安装包 + + # yum install docker + +![Installing Docker](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png) + +### 2. 设定交换内存 ### + +如果你的RAM容量小于1GB,那么确保升级你的系统达到1GB或者以上,否则Discourse不会在512MB的RAM下安装。如果你现在准备好了安装Discourse,根据下面的步骤为你的VPS(Virtual Private Servers)或者服务器设定交换内存 + +运行下面的命令,创建一个空的交换文件。 + + # install -o root -g root -m 0600 /dev/null /swapfile + +如果你想你的交换内存达到1GB,那么执行下面的步骤,并且跳过接下来的第二步。 + + # dd if=/dev/zero of=/swapfile bs=1k count=1024k + +如果你想达到2GB,跳过上面的所有步骤,跟着下面做 + + # dd if=/dev/zero of=/swapfile bs=1k count=2014k + +接着,我们指定交换内存为swapfile + + #mkswap /swapfile + +运行下面的命令激活交换内存 + + #swapon /swapfile + +现在,我们将其添加到文件系统分区表里,这样重启之后就自动挂载了。 + + # echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab + +设置swappiness为10,这样交换内存仅作为一个紧急缓冲区用。 + + # sudo sysctl -w vm.swappiness=10 + # echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf + +### 3. 安装Discourse ### + +在我们的主机上安装Docker后,我们将会安装Discourse。现在,我们从官方的Discourse GitHub仓库克隆一份到/var/discourse目录下。我们需要运行下面的命令完成这一步。 + + # mkdir /var/discourse/ + + # cd /var/discourse/ + + # git clone https://github.com/discourse/discourse_docker.git /var/discourse/ + +克隆好仓库后,我们会为discourse服务器复制配置文件 + + # cp samples/standalone.yml containers/app.yml + +![Cloning Discourse Docker](http://blog.linoxide.com/wp-content/uploads/2015/04/cloning-discourse-docker.png) + +### 4. 配置Discourse ### + +接下来,我们用自己喜欢的文本编辑器,编辑容器目录下的discourse配置文件app.yml + + # nano containers/app.yml + +现在,我们需要设置开发者的邮箱地址为DISCOURSE_DEVELOPER_EMAILS,如下。 + + DISCOURSE_DEVELOPER_EMAILS: 'arun@linoxide.com' + +然后,我们会设置主机名为服务器的域名。 + + DISCOURSE_HOSTNAME: 'discourse.linoxide.com' + +接着,为每个托管在相同discourse主机或者vps上的SMTP服务器设定邮箱证书。SMTP设置需要从你的Discourse发送邮件 + + DISCOURSE_SMTP_ADDRESS: smtp.linoxide.com + DISCOURSE_SMTP_PORT: 587 # (optional) + DISCOURSE_SMTP_USER_NAME: admin@linoxide.com # (optional) + DISCOURSE_SMTP_PASSWORD: test123 # (optional) + +![](http://blog.linoxide.com/wp-content/uploads/2015/04/discourse-configuration.png) + + Discourse 配置 + +如果你在使用一个1GB的Discourse,设定UNICORN_WORKERS为2,db_shared_buffers为128MB,这样你会有更多的内存空间。 + +运行Discourse需要强制性地创建一个邮件服务器。如果你已经有一个服务器了那就好办多了,我们可以使用它的证书。如果你没有现成的邮件服务器,或者你不知道那是什么。没关系,创建一个免费的帐号在[Mandrill][1] ([Mailgun][2],或者[Mailjet][3]),然后使用面板上提供的证书。 + +### 5. 启动Discourse应用 ### + +配置完discourse的配置文件后,我们当然是想启动Discourse服务器。首先,在/var/discourse/目录下运行下面的命令,加载discourse引导程序。 + + # ./launcher bootstrap app + +![Starting Discourse Bootstrap](http://blog.linoxide.com/wp-content/uploads/2015/04/starting-discourse-bootstrap.png) + +上述命令可能会花去几分钟时间,会自动配置我们的Discourse环境。然后,该进程完成后,我们需要运行下面的命令启动Discourse App + + #./launch start app + +![Starting Discourse](http://blog.linoxide.com/wp-content/uploads/2015/04/starting-discourse.png) + +### 维护 ### + +这里往下是/var/discourse/目录里加载命令的使用,这使得我们可以承担维护的任务,通过Docker 容器控制Disourse。(这里不太明白原文表达意思) + + Usage: launcher COMMAND CONFIG [--skip-prereqs] + Commands: + start: Start/initialize a container + stop: Stop a running container + restart: Restart a container + destroy: Stop and remove a container + enter: Use nsenter to enter a container + ssh: Start a bash shell in a running container + logs: Docker logs for container + mailtest: Test the mail settings in a container + bootstrap: Bootstrap a container for the config based on a template + rebuild: Rebuild a container (destroy old, bootstrap, start new) + cleanup: Remove all containers that have stopped for > 24 hours + + Options: + --skip-prereqs Don't check prerequisites + --docker-args Extra arguments to pass when running docker + +### 总结 ### + +Hurray!我们已经成功使用Docker技术安装了Discourse。Docker技术使得Discourse十分容易安装在任何平台,并且包含所有的要求。我们需要自己的邮件服务器或者邮件服务器的证书来启动它。对于便捷的现代邮件列表,论坛来说,Discourse是一个伟大的平台。(最后这句有些别扭) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/install-discourse-docker-container/ + +作者:[Arun Pyasi][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://mandrillapp.com/ +[2]:http://www.mailgun.com/ +[3]:https://www.mailjet.com/pricing From f25bdccbce77f39c3973962f2ee712f1bf646e53 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 27 Apr 2015 12:05:05 +0800 Subject: [PATCH 0651/2517] Translating by ZTinoZ --- ...9 Install Inkscape - Open Source Vector Graphic Editor.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md index fcbe4ee240..ba022a2efd 100644 --- a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md +++ b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md @@ -1,7 +1,6 @@ -Translating by ZTinoZ -Install Inkscape - Open Source Vector Graphic Editor +安装Inkscape - 开源适量图形编辑器 ================================================================================ -Inkscape is an open source vector graphic editing tool which uses Scalable Vector Graphics (SVG) and that makes it different from its competitors like Xara X, Corel Draw and Adobe Illustrator etc. SVG is a widely-deployed royalty-free graphics format developed and maintained by the W3C SVG Working Group. It is a cross platform tool which runs fine on Linux, Windows and Mac OS. +Inkscape是一款开源矢量图形编辑工具,它使用可缩放矢量图形(SVG)图形格式并不同于它的竞争对手如Xara X、Corel Draw和Adobe Illustrator等等。SVG是一个广泛部署、免版税使用的图形格式,由W3C SVG工作组开发和维护。这是一个跨平台工具,完美运行于Linux、Windows和Mac OS上。 Inkscape development was started in 2003, Inkscape's bug tracking system was hosted on Sourceforge initially but it was migrated to Launchpad afterwards. Its current latest stable version is 0.91. It is under continuous development and bug fixes and we will be reviewing its prominent features and installing process in the article. From 69972478e45afc2f29f127fc11da3a90757a8955 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Mon, 27 Apr 2015 13:23:19 +0800 Subject: [PATCH 0652/2517] Update 20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md --- ...ased--The Best Racing Game on Linux Just Got Even Better.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md b/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md index c664676a83..91572345cf 100644 --- a/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md +++ b/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md @@ -1,3 +1,4 @@ +Translating by H-mudcup uperTuxKart 0.9 Released — The Best Racing Game on Linux Just Got Even Better ================================================================================ **A brand new version of the hugely popular racing game SuperTuxKart has [zipped past the release line][1] to land on download servers. ** @@ -34,4 +35,4 @@ via: http://www.omgubuntu.co.uk/2015/04/supertuxkart-0-9-released [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:http://supertuxkart.blogspot.co.uk/2015/04/supertuxkart-09-released.html -[2]:http://supertuxkart.sourceforge.net/Downloads \ No newline at end of file +[2]:http://supertuxkart.sourceforge.net/Downloads From 6aea38447f0764d4ea6a3974692492af2363f681 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 14:16:57 +0800 Subject: [PATCH 0653/2517] PUB:20150330 Picty--Managing Photos Made Easy @H-mudcup --- ...150330 Picty--Managing Photos Made Easy.md | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) rename {translated/share => published}/20150330 Picty--Managing Photos Made Easy.md (58%) diff --git a/translated/share/20150330 Picty--Managing Photos Made Easy.md b/published/20150330 Picty--Managing Photos Made Easy.md similarity index 58% rename from translated/share/20150330 Picty--Managing Photos Made Easy.md rename to published/20150330 Picty--Managing Photos Made Easy.md index 644501a65e..d1b9fb63bb 100644 --- a/translated/share/20150330 Picty--Managing Photos Made Easy.md +++ b/published/20150330 Picty--Managing Photos Made Easy.md @@ -1,19 +1,17 @@ -Translated by H-mudcup - Picty:让图片管理变简单 ================================================================================ ![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/picty_002-790x429.png) ### 关于Picty ### -**Picty**是个免费,简单,却强大的照片收藏管理器,它可以帮助你管理你的照片。它的设计围绕着管理**元数据**和**无损**的处理图像的方法。Picty目前同时支持在线(基于网页的)和离线(本地的)收藏集。在本地的收藏集中,图片将被保存在一个本地的文件夹和它的子文件夹中。为了加快用户主目录里图片的查询速度,它会维持一个数据库。在在线(基于网页的)收藏集中,你可以通过网页浏览器上传并分享图片。拥有适当权限的个人用户可以把图片分享给任何人,而且每个用户可以同时开放多个收藏集,收藏集也可以被多个用户分享。通过一个转载插件在收藏集间传递图片就有了个简单的交互界面。 +**Picty**是个免费,简单,却强大的照片收藏管理器,它可以帮助你管理你的照片。它是围绕着**元数据**管理和图像**无损**处理设计的。Picty目前同时支持在线(基于网页的)和离线(本地的)收藏集。在本地的收藏集中,图片将被保存在一个本地的文件夹及其子文件夹中。为了加快用户主目录里图片的查询速度,它会维持一个数据库。在在线(基于网页的)收藏集中,你可以通过网页浏览器上传并分享图片。拥有适当权限的个人用户可以把图片分享给任何人,而且用户可以同时打开多个收藏集,收藏集也可以分享给多个用户。有个简单的界面可以通过传输插件在收藏集之间传输图片。 -你可以从你的相机或任何设备中下载任何数量的照片。除此之外,Picty允许你在下载前浏览在你相机里的图片集。Picty是个轻量级的应用,还有着清爽的界面。它支持Linux和Windows平台。 +你可以从你的相机或任何设备中下载任何数量的照片。除此之外,Picty允许你在下载前浏览在你相机里的图片集。Picty是个轻量级的应用,界面清爽。它支持Linux和Windows平台。 ### 功能 ### - 支持大相片集(20000张以上)。 -- 同时开放多个收藏集还可以在它们之间传照片。 +- 同时打开多个收藏集,还可以在它们之间传照片。 - 收藏集包括: - 本地文件系统中保存图片的文件夹。 - 相机、电话及其他媒体设备中的图片。 @@ -21,28 +19,28 @@ Picty:让图片管理变简单 - Picty不是把相片“导入”到它的数据库中,它仅仅提供了一个界面来访问它们,不管它们保存在哪。为了保持迅速的反应以及能使你在离线时浏览图片的能力,Picty会保存缩略图和元数据的缓存。 - 以业界标准格式Exif、IPTC和Xmp读写元数据。 - 无损的方法: - - Picty把所有改变包括图像编辑以元数据写入。例如,一个图片可以以任何方式剪切保存,原来的像素仍然保存在该文件里。 - - 修改会保存在Picty的收藏集缓存中直到你把你对元数据的修改保存到图片中。你能很容易撤销你不喜欢的未保存的修改。 -- 基本图片编辑: + - Picty把所有改变包括图像编辑以元数据的方式写入。例如,一个图片可以以任何方式剪切保存,原来的图像仍然保存在该文件里。 + - 修改会保存在Picty的收藏集缓存中直到你把你对元数据的修改保存到图片中,所以你能很容易撤销你不喜欢的未保存的修改。 +- 基本图片编辑功能: - 目前支持基本的图像增强,如亮度、对比度、色彩、剪切以及矫正。 - - Improvements to those tools and other tools coming soon (red eye reduction, levels, curves, noise reduction)对这些工具的改善和其他的工具即将到来。(红眼消除、拉伸、弯曲、噪声消除) + - 将要推出一些工具改进及更多工具。(红眼消除、拉伸、弯曲、噪声消除) - 图片标签: - 使用标准的IPTC和Xmp关键词为图片做标签。 - - 一个树状标签图让你能很容易的管理标签和对你的收藏集进行导航。 + - 一个树状标签图让你能很容易的管理标签和在收藏集内导航。 - 文件夹视图: - - 按照目录的结构对你的图片收藏进行导航 + - 按照目录的结构对你的图片收藏集进行导航 - 支持多屏显示 - Picty可以设置成让你在一个屏幕上浏览你的收藏集同时在另一个屏幕上全屏显示图片。 - 可个性化 - 可以为外部工具创建快捷方式 - 支持插件——目前提供的功能中有许多(标签和文件夹视图以及所有的图片编辑工具)都可以通过插件提供。 - - 使用Python编写——自带batteries!(python的这个特点使它可在mac、Linux和windows上直接安装使用,无需复杂的设置。) + - 使用Python编写——内置电池(batteries included)! ### 安装方法 ### #### 1、从PPA安装 #### -Picty开发人员为基于Debian的发行版,如Ubuntu,创建了一个PPA,让安装更简单。 +Picty开发人员为Ubuntu这样的基于 Debian的发行版创建了一个PPA,让安装更简单。 要在Ubuntu和它的衍生版上安装,请运行以下命令: @@ -76,13 +74,13 @@ Picty开发人员为基于Debian的发行版,如Ubuntu,创建了一个PPA, ![picty_001](http://www.unixmen.com/wp-content/uploads/2015/03/picty_001.png) -你可以选择已存在的收藏集、设备或目录。让我们创建一个**新收藏集** 。要这样做,得先点击新收藏集(New Collection)按钮。进入收藏集,然后浏览都你保存图片的地方。最后,点击**创建(Create)**按钮。 +你可以选择已存在的收藏集、设备或目录。这里让我们创建一个**新收藏集** ,请先点击新收藏集(New Collection)按钮。进入收藏集,然后浏览到你保存图片的地方。最后,点击**创建(Create)**按钮。 ![Create a Collection_001](http://www.unixmen.com/wp-content/uploads/2015/03/Create-a-Collection_001.png) ![picty_002](http://www.unixmen.com/wp-content/uploads/2015/03/picty_002.png) -你可以修改,旋转,添加/移除标签,设置每个图片的描述。要这么做,只需右击任何一个图片然后爱做什么做什么。 +你可以对每张图片进行修改,旋转,添加/移除标签,设置描述。只需右击任何一个图片然后爱做什么做什么。 访问下面这个Google组可以得到更多关于Picty相片管理器的信息和支持。 @@ -96,7 +94,7 @@ via: http://www.unixmen.com/picty-managing-photos-made-easy/ 作者:[SK][a] 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6bf1d0e0f4959207976a3652f912d2c827f78fad Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Mon, 27 Apr 2015 15:00:21 +0800 Subject: [PATCH 0654/2517] Delete 20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md --- ...cing Game on Linux Just Got Even Better.md | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md diff --git a/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md b/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md deleted file mode 100644 index 91572345cf..0000000000 --- a/sources/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md +++ /dev/null @@ -1,38 +0,0 @@ -Translating by H-mudcup -uperTuxKart 0.9 Released — The Best Racing Game on Linux Just Got Even Better -================================================================================ -**A brand new version of the hugely popular racing game SuperTuxKart has [zipped past the release line][1] to land on download servers. ** - -![Super Tux Kart 0.9 Release Poster](http://1.bp.blogspot.com/-eGXvJu3UVwc/VTVhICZVEtI/AAAAAAAAAf0/iP2bkWDNf_c/s1600/poster-cropped.jpg) -Super Tux Kart 0.9 Release Poster - -SuperTuxKart 0.9 is a huge update over earlier versions, running a hot new engine (awesomely named ‘Antarctica’) under the hood that aims to deliver richer graphical environments , shading and depth of field plus better kart physics. - -The bump in graphics performance necessitates a bump in graphics card requirements, too. SuperTuxKart developers advise would-be racers to will need a device with graphics comparable to (or, ideally, better than) Intel HD Graphics 3000, NVIDIA GeForce 8600 or AMD Radeon HD 3650. - -### Other Changes ### - -Keeping pace alongside the headline visual improvements in SuperTuxKart 0.9 is pair **brand new tracks**, new Karts, new online accounts for keeping track of and sharing badges earned through the **newly introduced achievements system**, and oodles of fixes and artwork tweaks. - -Check out STK 0.9 in all its shader-based glory by hitting play on the official release video below. - -注:youtube 视频 - - -Ubuntu users can grab pre-compiled binaries for the new release from the project website. - -- [Download SuperTuxKart 0.9][2] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/04/supertuxkart-0-9-released - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://supertuxkart.blogspot.co.uk/2015/04/supertuxkart-09-released.html -[2]:http://supertuxkart.sourceforge.net/Downloads From f3e654438bd3a32799fece338d36e031dc881691 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Mon, 27 Apr 2015 15:02:04 +0800 Subject: [PATCH 0655/2517] Create 20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md Translated by H-mudcup --- ...cing Game on Linux Just Got Even Better.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md diff --git a/translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md b/translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md new file mode 100644 index 0000000000..931f51ce92 --- /dev/null +++ b/translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md @@ -0,0 +1,38 @@ + +SuperTuxKart 0.9 已发行 —— Linux 中最好的竞速类游戏变得更好了 +================================================================================ +**热门竞速类游戏 SuperTuxKart 的新版本已经[打包发行][1]登陆下载服务器** + +![Super Tux Kart 0.9 Release Poster](http://1.bp.blogspot.com/-eGXvJu3UVwc/VTVhICZVEtI/AAAAAAAAAf0/iP2bkWDNf_c/s1600/poster-cropped.jpg) +Super Tux Kart 0.9 发行海报 + +SuperTuxKart 0.9 相较前一版本做了巨大的升级,内部运行着刚出炉的新引擎(有个炫酷的名字叫‘Antarctica(南极洲)’),目的是要呈现更加炫酷的图形环境,从阴影到场景的纵深,外加卡丁车更好的物理效果。 + +突出的图形表现也增加了对显卡的要求。SuperTuxKart 开发人员给玩家的建议是,要有图像处理能力比得上(或者,想要完美的话,要超过) Intel HD Graphics 3000, NVIDIA GeForce 8600 或 AMD Radeon HD 3650 的显卡。 + +### 其他改变 ### + +SuperTuxKart 0.9 中与图像的改善同样吸引人眼球的是一对**全新赛道**,新的卡丁车,新的在线账户可以记录和分享**全新推出的成就系统**里赢得的徽章,以及大量的改装和涂装的微调。 + +点击播放下面的官方发行视频,看看基于调色器的 STK 0.9 所散发的光辉吧。 + +注:youtube 视频 + + +Ubuntu 用户可以从项目网站上下载新发行版已编译的二进制文件。 + +- [Download SuperTuxKart 0.9][2] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/supertuxkart-0-9-released + +作者:[Joey-Elijah Sneddon][a] +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://supertuxkart.blogspot.co.uk/2015/04/supertuxkart-09-released.html +[2]:http://supertuxkart.sourceforge.net/Downloads From 62d045dd58e4a568aca855d2418ca55a12c0e426 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 15:41:46 +0800 Subject: [PATCH 0656/2517] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--1 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--1.md | 80 ++++++++++++------- 1 file changed, 51 insertions(+), 29 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md (70%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md similarity index 70% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md index 6736eda4e0..45ccd2208a 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md @@ -1,13 +1,13 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--1 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(一) ================================================================================ -CentOS 是一个工业标准的 Linux 发行版,是红帽企业版 Linux 的衍生版本。你安装完后马上就可以使用,但是为了更好地使用你的系统,你需要进行一些升级、软件包安装、配置特定服务和应用程序等操作。 +CentOS 是一个工业标准的 Linux 发行版,是红帽企业版 Linux 的衍生版本。你安装完后马上就可以使用,但是为了更好地使用你的系统,你需要进行一些升级、安装新的软件包、配置特定服务和应用程序等操作。 -这篇文章介绍了 “安装完 RHEL/CentOS 7 后需要做的 30 件事情”。阅读帖子的时候请牢记已经完成了 RHEL/CentOS 最小化安装,这是首选的企业和生产环境,如果还没有,你可以按照下面的指南,它会告诉你两者的最小化安装方法。 +这篇文章介绍了 “安装完 RHEL/CentOS 7 后需要做的 30 件事情”。阅读帖子的时候请先完成 RHEL/CentOS 最小化安装,这是首选的企业和生产环境。如果还没有,你可以按照下面的指南,它会告诉你两者的最小化安装方法。 - [最小化安装 CentOS 7][1] - [最小化安装 RHEL 7][2] -下面是一些重要的事情列表,基于工业标准需求我们都会进行介绍。我们希望这些东西在你配置服务器的时候能有所帮助。 +我们会基于工业标准的需求来介绍以下列出的这些重要工作。我们希望这些东西在你配置服务器的时候能有所帮助。 1. 注册并启用红帽订阅 2. 使用静态 IP 地址配置网络 @@ -42,50 +42,54 @@ CentOS 是一个工业标准的 Linux 发行版,是红帽企业版 Linux 的 ### 1. 注册并启用红帽订阅 ### -RHEL 7 最小化安装完成后,是时候注册并启用系统红帽订阅库,以及执行一个完整的系统更新。这只当你有一个可用的红帽订阅时才能有效。你要注册才能启用官方红帽系统库并时不时进行操作系统更新。 +RHEL 7 最小化安装完成后,就应该注册并启用系统红帽订阅库, 并执行一个完整的系统更新。这只当你有一个可用的红帽订阅时才能有用。你要注册才能启用官方红帽系统库,并时不时进行操作系统更新。(LCTT 译注:订阅服务是收费的) 在下面的指南中我们已经包括了一个如何注册并激活红帽订阅的详细说明。 - [在 RHEL 7 中注册并启用红帽订阅][3] -**注意**: 这一步仅适用于有一个有效订阅的红帽企业版 Linux. 如果你用的是 CentOS 服务器,请查看后面的章节。 +**注意**: 这一步仅适用于有一个有效订阅的红帽企业版 Linux。如果你用的是 CentOS 服务器,请查看后面的章节。 ### 2. 使用静态 IP 地址配置网络 ### -你第一件要做的事情就是为你的 CentOS 服务器配置静态 IP 地址,路由以及 DNS。我们会使用 ip 命令代替 ifconfig 命令。当然,ifconfig 命令对于大部分 Linux 发行版来说还是可用的,还能从默认库安装。 +你第一件要做的事情就是为你的 CentOS 服务器配置静态 IP 地址、路由以及 DNS。我们会使用 ip 命令代替 ifconfig 命令。当然,ifconfig 命令对于大部分 Linux 发行版来说还是可用的,还能从默认库安装。 - # yum install net-tools [提供 ifconfig 工具] + # yum install net-tools [它提供 ifconfig 工具,如果你不习惯 ip 命令,还可以使用它] ![在 Linux 上安装 ifconfig](http://www.tecmint.com/wp-content/uploads/2015/04/Install-ifconfig.jpeg) +(LCTT 译注:关于 ip 命令的使用,请参照:http://www.linux.cn/article-3631-1.html ) + 但正如我之前说,我们会使用 ip 命令来配置静态 IP 地址。所以,确认你首先检查了当前的 IP 地址。 # ip addr show ![在 CentOS 查看 IP 地址](http://www.tecmint.com/wp-content/uploads/2015/04/Check-IP-Address.jpeg) -现在用你的编辑器打开并编辑文件 /etc/sysconfig/network-scripts/ifcfg-enp0s3。这里,我使用 Vi 编辑器,另外你要确保你是 root 用户才能保存更改。 +现在用你的编辑器打开并编辑文件 /etc/sysconfig/network-scripts/ifcfg-enp0s3 (LCTT 译注:你的网卡名称可能不同,如果希望修改为老式网卡名称,参考:http://www.linux.cn/article-4045-1.html )。这里,我使用 vi 编辑器,另外你要确保你是 root 用户才能保存更改。 # vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 我们会编辑文件中的四个地方。注意下面的四个地方并保证不碰任何其它的东西。也保留双引号,在它们中间输入你的数据。 - IPADDR = “[在这里输入你的静态 IP]” - GATEWAY = “[输入你的默认网关]” - DNS1 = “[你的域名系统 1]” - DNS2 = “[你的域名系统 2]” + IPADDR = "[在这里输入你的静态 IP]" + GATEWAY = "[输入你的默认网关]" + DNS1 = "[你的DNS 1]" + DNS2 = "[你的DNS 2]" -更改了 ‘ifcfg-enp0s3’ 之后,看起来像下面的图片。注意你的 IP,网关和 DNS 可能会变化,请和你的 ISP(译者注:互联网服务提供商商) 确认。保存并退出。 +更改了 ‘ifcfg-enp0s3’ 之后,它看起来像下面的图片。注意你的 IP,网关和 DNS 可能会变化,请和你的 ISP(译者注:互联网服务提供商,即给你提供接入的服务的电信或 IDC) 确认。保存并退出。 ![网络详情](http://www.tecmint.com/wp-content/uploads/2015/04/Network-Details.jpeg) -网络详情 + +*网络详情* 重启网络服务并检查 IP 是否和分配的一样。如果一切都顺利,用 Ping 查看网络状态。 # service network restart ![重启网络服务](http://www.tecmint.com/wp-content/uploads/2015/04/Restarat-Network.jpeg) -重启网络服务 + +*重启网络服务* 重启网络后,确认检查了 IP 地址和网络状态。 @@ -93,10 +97,14 @@ RHEL 7 最小化安装完成后,是时候注册并启用系统红帽订阅库 # ping -c4 google.com ![验证 IP 地址](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-IP-Address.jpeg) -验证 IP 地址 + +*验证 IP 地址* ![检查网络状态](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Network-Status.jpeg) -检查网络状态 + +*检查网络状态* + +(LCTT 译注:关于设置静态 IP 地址的更多信息,请参照:http://www.linux.cn/article-3977-1.html ) ### 3. 设置服务器的主机名称 ### @@ -105,34 +113,40 @@ RHEL 7 最小化安装完成后,是时候注册并启用系统红帽订阅库 # echo $HOSTNAME ![查看系统主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Check-System-Hostname.jpeg) -查看系统主机名称 + +*查看系统主机名称* 要设置新的主机名称,我们需要编辑 ‘/etc/hostsname’ 文件并用想要的名称替换旧的主机名称。 # vi /etc/hostname ![在 CentOS 中设置主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Set-System-Hostname.jpeg) -在 CentOS 中设置主机名称 + +*在 CentOS 中设置主机名称* 设置完了主机名称之后,务必注销后重新登录确认主机名称。登录后检查新的主机名称。 $ echo $HOSTNAME ![确认主机名称](http://www.tecmint.com/wp-content/uploads/2015/04/Confirm-Hostname.jpeg) -确认主机名称 + +*确认主机名称* 你也可以用 ‘hostname’ 命令查看你当前的主机名。 $ hostname +(LCTT 译注:关于设置静态、瞬态和灵活主机名的更多信息,请参考:http://www.linux.cn/article-3937-1.html ) + ### 4. 更新或升级最小化安装的 CentOS ### -除了更新和安装已经有的软件的最新版本以及安全升级,这不会安装任何新的软件。总的来说更新和升级是相同的,除了事实上 升级 = 更新 + 更新时进行废弃处理。 +这样做除了更新安装已有的软件最新版本以及安全升级,不会安装任何新的软件。总的来说更新(update)和升级(upgrade)是相同的,除了事实上 升级 = 更新 + 更新时进行废弃处理。 # yum update && yum upgrade ![更新最小化安装的 CentOS 服务器](http://www.tecmint.com/wp-content/uploads/2015/04/Update-CentOS-Server.jpeg) -更新最小化安装的 CentOS 服务器 + +*更新最小化安装的 CentOS 服务器* **重要**: 你也可以运行下面的命令,这不会弹出软件更新的提示,你也就不需要输入 ‘y’ 接受更改。 @@ -147,7 +161,8 @@ RHEL 7 最小化安装完成后,是时候注册并启用系统红帽订阅库 # yum install links ![安装命令行浏览器](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Commandline-Browser.jpeg) -Links: 命令行 Web 浏览器 + +*Links: 命令行 Web 浏览器* 请查看我们的文章 [用 links 工具命令行浏览 Web][4] 了解用 links 工具浏览 web 的方法和例子。 @@ -157,8 +172,9 @@ Links: 命令行 Web 浏览器 # yum install httpd -![在 CentOS 上安装 Apache](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-on-CentOS.jpeg.) -安装 Apache 服务器 +![在 CentOS 上安装 Apache](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-on-CentOS.jpeg) + +*安装 Apache 服务器* 如果你想更改 Apache HTTP 服务器的默认端口号(80)为其它端口,你需要编辑配置文件 ‘/etc/httpd/conf/httpd.conf’ 并查找以下面开始的行: @@ -167,7 +183,8 @@ Links: 命令行 Web 浏览器 把端口号 ‘80’ 改为其它任何端口(例如 3221),保存并退出。 ![在 CentOS 上更改 Apache 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Change-Apache-Port.jpeg) -更改 Apache 端口 + +*更改 Apache 端口* 增加刚才分配给 Apache 的端口通过防火墙,然后重新加载防火墙。 @@ -183,6 +200,8 @@ Links: 命令行 Web 浏览器 # firewall-cmd –reload +(LCTT 译注:关于 firewall 的进一步使用,请参照:http://www.linux.cn/article-4425-1.html ) + 完成上面的所有事情之后,是时候重启 Apache HTTP 服务器了,然后新的端口号才能生效。 # systemctl restart httpd.service @@ -192,12 +211,15 @@ Links: 命令行 Web 浏览器 # systemctl start httpd.service # systemctl enable httpd.service +(LCTT 译注:关于 systemctl 的进一步使用,请参照:http://www.linux.cn/article-3719-1.html ) + 如下图所示,用 links 命令行工具 验证 Apache HTTP 服务器。 # links 127.0.0.1 ![验证 Apache 状态](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Apache-Status.jpeg) -验证 Apache 状态 + +*验证 Apache 状态* -------------------------------------------------------------------------------- @@ -205,7 +227,7 @@ via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installatio 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1e64ea0c0bb77d008ff63f79544862fc370bf7b7 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Apr 2015 16:10:40 +0800 Subject: [PATCH 0657/2517] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--2 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--2.md | 59 +++++++++++-------- 1 file changed, 35 insertions(+), 24 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md (62%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md similarity index 62% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md index c5e0f29857..6eeff54bae 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md @@ -1,8 +1,8 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--2 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(二) ================================================================================ ### 7. 安装 PHP ### -PHP 是用于 web 基础服务的服务器端脚本语言。它也经常被用作通用编程语言。在最小化安装的 CentOS 中安装 PHP。 +PHP 是用于 web 基础服务的服务器端脚本语言。它也经常被用作通用编程语言。在最小化安装的 CentOS 中安装 PHP: # yum install php @@ -12,7 +12,7 @@ PHP 是用于 web 基础服务的服务器端脚本语言。它也经常被用 下一步,通过在 Apache 文档根目录下创建下面的 php 脚本验证 PHP。 - # echo -e "" > /var/ww/html/phpinfo.php + # echo -e "" > /var/www/html/phpinfo.php 现在在 Linux 命令行中查看我们刚才创建的 PHP 文件(phpinfo.php)。 @@ -21,32 +21,35 @@ PHP 是用于 web 基础服务的服务器端脚本语言。它也经常被用 # links http://127.0.0.1/phpinfo.php ![验证 PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-PHP.jpeg) -验证 PHP + +*验证 PHP* ### 8. 安装 MariaDB 数据库 ### -MariaDB 是 MySQL 的一个分支。红帽企业版 Linux 以及它的衍生版已经从 MySQL 迁移到 MariaDB。这是个主要的数据库管理系统。这又是一个你必须拥有的工具,不管你在配置怎样的服务器,或迟或早你都会需要它。在最小化安装的 CentOS 上安装 MariaDB,如下所示。 +MariaDB 是 MySQL 的一个分支。RHEL 以及它的衍生版已经从 MySQL 迁移到 MariaDB。这是一个主流的数据库管理系统,也是一个你必须拥有的工具。不管你在配置怎样的服务器,或迟或早你都会需要它。在最小化安装的 CentOS 上安装 MariaDB,如下所示: # yum install mariadb-server mariadb ![安装 MariaDB 数据库](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Database.jpeg) -安装 MariaDB 数据库 -启动被配置 MariaDBs 随机启动。 +*安装 MariaDB 数据库* + +启动 MariaDB 并配置它开机时自动启动。 # systemctl start mariadb.service # systemctl enable mariadb.service -允许 mysql(mariadb) 服务通过防火墙 +允许 mysql(mariadb) 服务通过防火墙(LCTT 译注:如果你的 MariaDB 只用在本机,则务必不要设置防火墙允许通过,使用 UNIX Socket 连接你的数据库;如果需要在别的服务器上连接数据库,则尽量使用内部网络,而不要将数据库服务暴露在公开的互联网上。) # firewall-cmd –add-service=mysql -现在是时候确保 MariaDB 服务器安全了。 +现在是时候确保 MariaDB 服务器安全了(LCTT 译注:这个步骤主要是设置 mysql 管理密码)。 # /usr/bin/mysql_secure_installation ![保护 MariaDB 数据库](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-MariaDB.jpeg) -保护 MariaDB 数据库 + +*保护 MariaDB 数据库* 请阅读: @@ -55,18 +58,19 @@ MariaDB 是 MySQL 的一个分支。红帽企业版 Linux 以及它的衍生版 ### 9. 安装和配置 SSH 服务器 ### -SSH 表示 Secure Shell,是 Linux 远程管理的默认协议。 SSH 是随最小化 CentOS 服务器一起发布的最重要的软件之一。 +SSH 即 Secure Shell,是 Linux 远程管理的默认协议。 SSH 是随最小化 CentOS 服务器中安装运行的最重要的软件之一。 检查当前已安装的 SSH 版本。 # SSH -V ![检查 SSH 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SSH-Version.jpeg) -检查 SSH 版本 -在默认的 SSH 协议上使用安全协议,更改端口号进一步加强安全。编辑 SSH 的配置文件 ‘/etc/ssh/ssh_config’。 +*检查 SSH 版本* -去掉下面行的注释或者从协议行中删除 1,然后行看起来像这样: +使用更安全的 SSH 协议,而不是默认的协议,并更改端口号进一步加强安全。编辑 SSH 的配置文件 ‘/etc/ssh/ssh_config’。 + +去掉下面行的注释或者从协议行中删除 1,然后行看起来像这样(LCTT 译注: SSH v1 是过期废弃的不安全协议): # Protocol 2,1 (原来) Protocol 2 (现在) @@ -74,15 +78,17 @@ SSH 表示 Secure Shell,是 Linux 远程管理的默认协议。 SSH 是随最 这个改变强制 SSH 使用 协议 2,它被认为比协议 1 更安全,同时也确保在配置中更改端口号 22 为其它。 ![保护 SSH 登录](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-SSH.jpeg) -保护 SSH 登录 -取消 SSH ‘root login’ 然后允许只有当以普通用户账号登录后才能连接到 root 以进一步加强安全。为了做到这个,打开并编辑配置文件 ‘/etc/ssh/sshd_config’ 并更改 PermitRootLogin yes 为 PermitRootLogin no。 +*保护 SSH 登录* + +取消 SSH 中的‘root login’, 只允许通过普通用户账号登录后才能使用 su 切换到 root,以进一步加强安全。请打开并编辑配置文件 ‘/etc/ssh/sshd_config’ 并更改 PermitRootLogin yes 为 PermitRootLogin no。 # PermitRootLogin yes (原来) PermitRootLogin no (现在) ![取消 SSH Root 登录](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-SSH-Root-Login.jpeg) -取消 SSH Root 登录 + +*取消 SSH Root 直接登录* 最后,重启 SSH 服务启用更改。 @@ -96,34 +102,39 @@ SSH 表示 Secure Shell,是 Linux 远程管理的默认协议。 SSH 是随最 ### 10. 安装 GCC (GNU 编译器集) ### -GCC 表示 GNU 编译器集,是一个 GNU 项目开发的支持多种编程语言的编译系统。在最小化安装的 CentOS 没有默认安装。运行下面的命令安装 gcc 编译器。 +GCC 即 GNU 编译器集,是一个 GNU 项目开发的支持多种编程语言的编译系统(LCTT 译注:在你需要自己编译构建软件时需要它)。在最小化安装的 CentOS 没有默认安装。运行下面的命令安装 gcc 编译器。 + # yum install gcc ![在 CentOS 上安装 GCC](http://www.tecmint.com/wp-content/uploads/2015/04/Install-GCC-in-CentOS.jpeg) -在 CentOS 上安装 GCC + +*在 CentOS 上安装 GCC* 检查安装的 gcc 版本。 # gcc --version ![检查 GCC 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-GCC-Version.jpeg) -检查 GCC 版本 + +*检查 GCC 版本* ### 11. 安装 Java ### -Java是一种通用的基于类的,面向对象的编程语言。在最小化 CentOS 服务器中没有默认安装。按照下面命令从库中安装 Java。 +Java是一种通用的基于类的,面向对象的编程语言。在最小化 CentOS 服务器中没有默认安装(LCTT 译注:如果你没有任何 Java 应用,可以不用装它)。按照下面命令从库中安装 Java。 # yum install java ![在 CentOS 上安装 Java](http://www.tecmint.com/wp-content/uploads/2015/04/Install-java.jpeg) -安装 Java + +*安装 Java* 检查安装的 Java 版本。 # java -version ![检查 Java 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Java-Version.jpeg) -检查 Java 版本 + +*检查 Java 版本* -------------------------------------------------------------------------------- @@ -131,7 +142,7 @@ via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installatio 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 944c76f2cfcfa45bea8ba6fe399d95dced8150d1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 27 Apr 2015 16:34:01 +0800 Subject: [PATCH 0658/2517] =?UTF-8?q?20150427-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...o After Installing Ubuntu 15.04 Desktop.md | 298 ++++++++++++++++++ ...0427 How to set up NTP server in CentOS.md | 165 ++++++++++ 2 files changed, 463 insertions(+) create mode 100644 sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md create mode 100644 sources/tech/20150427 How to set up NTP server in CentOS.md diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md new file mode 100644 index 0000000000..6f1114b9bb --- /dev/null +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -0,0 +1,298 @@ +15 Things to Do After Installing Ubuntu 15.04 Desktop +================================================================================ +This tutorial is intended for beginners and covers some basic steps on what to do after you have installed Ubuntu 15.04 “Vivid Vervet” Desktop version on your computer in order to customize the system and install basic programs for daily usage. + +![Things to Do After Installing Ubuntu 15.04](http://www.tecmint.com/wp-content/uploads/2015/04/things-to-do-after-installing-ubuntu-15.04.jpeg) +15 Things to Do After Installing Ubuntu 15.04 + +### 1. Enable Ubuntu Extra Repositories and Update the System ### + +The first thing you should take care of after a fresh installation of Ubuntu is to enable Ubuntu Extra Repositories provided by official Canonical Partners and keep an up-to-date system with the last security patches and software updates. + +In order to accomplish this step, open from the left Launcher System Settings -> Software and Updates utility and check all Ubuntu Software and Other Software (Canonical Partners) repositories. After you finish hit the Close button and wait for the utility to Reload the cache sources tree. + +![Software Updates](http://www.tecmint.com/wp-content/uploads/2015/04/Software-Updates.jpg) +Software Updates + +![Other Software (Canonical Partners)](http://www.tecmint.com/wp-content/uploads/2015/04/Other-Software.jpg) +Other Software (Canonical Partners) + +For a fast and smooth update process, open a Terminal and issue the following command in order to update the system using the new software repositories: + + $ sudo apt-get update + $ sudo apt-get upgrade + +![Ubuntu Upgrade](http://www.tecmint.com/wp-content/uploads/2015/04/Ubuntu-Upgrade.jpg) +Ubuntu Upgrade + +### 2. Install Additional Drivers ### + +In order for the system to scan and install additional hardware proprietary drivers, open Software and Updates utility from System Settings, go to Additional Drivers tab and wait for the utility to scan for drivers. + +If some drivers matching your hardware are found, check the drivers you want to install and hit the Apply Changes button to install it. In case the proprietary drivers are not working as expected, uninstall them using the Revert button or check Do not use the device and Apply Changes. + +![Install Drivers in Ubuntu](http://www.tecmint.com/wp-content/uploads/2015/04/install-drivers.jpg) +Install Drivers + +### 3. Install Synaptic and Gdebi Package Tools ### + +Besides Ubuntu Software Center, Synaptic is a Graphical utility for apt command line through which you can manage repositories or install, remove, search, upgrade and configure software packages. Similar way, Gdebi has the same functionality for local .deb packages. To install this two package managers on your system issue the following command on Terminal: + + $ sudo apt-get install synaptic gdebi + +![Install Synaptic and Gdebi](http://www.tecmint.com/wp-content/uploads/2015/04/install-synaptic-gdebi.jpg) +Install Synaptic and Gdebi + +![Synaptic Package Manager](http://www.tecmint.com/wp-content/uploads/2015/04/synaptic-package-manager.jpg) +Synaptic Package Manager + +### 4. Change System Appearance and Behavior ### + +If you want to change Desktop Background or Launcher Icon Size, open System Settings –> Appearance –> Look and personalize the desktop. To move the menu to window title bar, enable workspaces and desktop icons or auto-hide the Launcher visit Behavior tab. + +![System Appearances](http://www.tecmint.com/wp-content/uploads/2015/04/system-appearance.jpg) +System Appearances + +### 5. Improve System Security and Privacy ### + +![System Security Enhancement](http://www.tecmint.com/wp-content/uploads/2015/04/system-security-1.jpg) +System Security Enhancement + +![System Security Options](http://www.tecmint.com/wp-content/uploads/2015/04/system-security-2.jpg) +System Security Options + +### 5. Disable Unneeded Startup Applications ### + +To improve system login speed, reveal hidden Startup Applications by issuing the below command on Terminal, open Startup Applications utility by searching it in Dash and uncheck the unneeded applications during login process. + + $ sudo sed -i ‘s/NoDisplay=true/NoDisplay=false/g’ /etc/xdg/autostart/*.desktop + +![Disable Unwanted Applications](http://www.tecmint.com/wp-content/uploads/2015/04/disable-unwanted-applications.jpg) +Disable Unwanted Applications + +### 6. Add Extended Multimedia Support ### + +By default, Ubuntu comes with a minimal support for media files. In order to play various media formats or manipulate video files, install the following multimedia applications: + +- VLC +- Smplayer +- Audacious +- QMMP +- Mixxx +- XBMC +- Handbrake +- Openshot + +Use the following command line to install all with one shot: + + $ sudo apt-get install vlc smplayer audacious qmmp mixxx xbmc handbrake openshot + +![Install Media Players](http://www.tecmint.com/wp-content/uploads/2015/04/install-media-players.jpg) +Install Media Players + +![Media Player Playlist](http://www.tecmint.com/wp-content/uploads/2015/04/media-playllist.jpg) +Media Player Playlist + +Besides this multimedia players also install ubuntu-restricted-extras and Java support packages in order to decode and support other restricted media formats. + + $ sudo apt-get install ubuntu-restricted-extras openjdk-8-jdk + +![Install Ubuntu Extras](http://www.tecmint.com/wp-content/uploads/2015/04/install-ubuntu-extras.jpg) +Install Ubuntu Extras + +To enable DVD Playback and other multimedia codecs issue the following command on Terminal: + + $ sudo apt-get install ffmpeg gstreamer0.10-plugins-bad lame libavcodec-extra + $ sudo /usr/share/doc/libdvdread4/install-css.sh + +![Enable Video Codes](http://www.tecmint.com/wp-content/uploads/2015/04/enable-video-playbacks.jpg) +Enable Video Codes + +### 7. Install Image Applications ### + +If you are a photography enthusiast and you want to handle and manipulate images on Ubuntu, probably you want to install the following imaging programs: + +- GIMP (alternative for Adobe Photoshop) +- Darktable +- Rawtherapee +- Pinta +- Shotwell +- Inkscape (alternative for Adobe Illustrator) +- Digikam +- Cheese + +This applications can be installed from Ubuntu Software Center or all at once by using the following command line on Terminal: + + $ sudo apt-get install gimp gimp-plugin-registry gimp-data-extras darktable rawtherapee pinta shotwell inkscape + +![Install Image Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-image-applications.jpg) +Install Image Applications + +![Rawtherapee Tool](http://www.tecmint.com/wp-content/uploads/2015/04/rawtherapee.jpg) +Rawtherapee Tool + +### 8. Install Media Burners ### + +To mount ISO images or burn a CDs or a DVD, you can choose and install from the following software: + +- Brasero Disk Burner +- K3b +- Xfburn +- Furius ISO Mount + + $ sudo apt-get install brasero + $ sudo apt-get install k3b + $ sudo apt-get install xfburn + $ sudo apt-get install furiusisomount + +![Install Media Burners](http://www.tecmint.com/wp-content/uploads/2015/04/install-media-burners.jpg) +Install Media Burners + +### 9. Install Archive Applications ### + +To handle most of archive formatted files (zip, tar.gz, zip, 7zip rar etc) install the following packages by issuing the below command: + + $ sudo apt-get install unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller + +![Install Archive Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-archive-apps.jpg) +Install Archive Applications + +### 10. Install Chat Application ### + +If you want to talk to people all over the world, here is a list of the most popular chat applications for Linux: + +- Pidgin +- Skype +- Xchat +- Telegram +- aMSN +- Viber + +You can install most of them from Ubuntu Software Center or by using the command line: + + $ sudo apt-get install pidgin + $ sudo apt-get install skype + $ sudo apt-get install xchat + $ sudo apt-get install amsn + $ sudo add-apt-repository ppa:atareao/telegram -y + $ sudo apt-get update + $ sudo apt-get install telegram + +![Install Chat Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-chat-apps.jpg) +Install Chat Applications + +To install Viber application on Ubuntu visit [Viber official webpage][1], download the Debian package locally and install the viber.deb application using Gdebi package manager (left click – > Open with -> GDebi Package Installer). + +![Install Viber in Ubuntu](http://www.tecmint.com/wp-content/uploads/2015/04/install-viber.jpg) +Install Viber + +### 11. Install Torrent Software ### + +The most popular torrent applications and peer-to-peer file sharing programs for Ubuntu are: + +- Deluge +- Transmission +- Qbittorrent +- LinuxDC++ + +To install your favorite peer-to-peer file sharing application on Ubuntu issue the following command on Terminal. + + $ sudo apt-get install deluge + $ sudo apt-get install transmission + $ sudo apt-get install qbittorrent + $ sudo apt-get install linuxdcpp + +![Install Torrent](http://www.tecmint.com/wp-content/uploads/2015/04/install-torrent.jpg) +Install Torrent + +### 12. Install Windows Emulator -Wine and Gaming Support – Steam ### + +Wine emulator allows you to install and run Windows applications on Linux. On the other hand, Steam is a popular gaming platform for Linux based systems developed by Valve. To install both of them on your machine issue the following command on Terminal or use Ubuntu Software Center. + + $ sudo apt-get install steam wine winetricks + +![Install Wine](http://www.tecmint.com/wp-content/uploads/2015/04/install-wine.jpg) +Install Wine + +### 13. Install Cairo-Dock and Enable Desktop Visual Effects ### + +Cairo-Dock is a beautiful and flexible launcher bar for Linux desktops similar to the Mac OS X dock. To install it on Ubuntu, run the following command on Terminal. + + $ sudo apt-get install cairo-dock cairo-dock-plug-ins + +![Install Cairo Dock](http://www.tecmint.com/wp-content/uploads/2015/04/install-cairo-dock.jpg) +Install Cairo Dock + +![Add Cairo Dock at Startup](http://www.tecmint.com/wp-content/uploads/2015/04/add-cairo-dock-startup.jpg) +Add Cairo Dock at Startup + +To enable a set of Desktop Effects, such as Cube effect, install Compiz package with the following command: + + $ sudo apt-get install compiz compizconfig-settings-manager compiz-plugins-extra + +To activate the Desktop Cube effect, search for ccsm on Dash, open CompizConfig Settings Manager, go to General Options – > Desktop Size and set Horizontal Virtual Size value to 4 and Vertical Virtual Size to 1. Then go back and check Desktop Cube (Disable Desktop Wall) and Rotate Cube boxes (Resolve Conflicts ->Disable Switch to Viewport 1) and press Ctrl+Alt+Left Mouse Click to view the cube effect. + +![Enable Compiz](http://www.tecmint.com/wp-content/uploads/2015/04/enable-compiz.jpg) +Enable Compiz + +![Compiz Settings](http://www.tecmint.com/wp-content/uploads/2015/04/compiz-settings.jpg) +Compiz Settings + +![Compiz Settings Addons](http://www.tecmint.com/wp-content/uploads/2015/04/compiz-settings-1.jpg) +Compiz Settings Addons + +![Desktop Window Rotating](http://www.tecmint.com/wp-content/uploads/2015/04/desktop-cube.jpg) +Desktop Window Rotating + +### 14. Add Extra Browser Support ### + +Ubuntu 15.04 comes by default with Mozilla Firefox Web Browser. To install other browsers such as Google Chrome or Opera, visit their official web pages, download the provided .deb packages and install them on your system using the Gdebi Package Installer. + +![Enable Browser Support](http://www.tecmint.com/wp-content/uploads/2015/04/enable-browser-support.jpg) +Enable Browser Support + +![Opera Browser Support](http://www.tecmint.com/wp-content/uploads/2015/04/opera.jpg) +Opera Browser Support + +To install Chromium Open Source browser issue the following command on Terminal. + + $ sudo apt-get install chromium-browser + +### 15. Install Tweak Tools ### + +Want extra applications for customizing Ubuntu? Then install Unity Tweak Tool and Gnome Tweak Tool by issuing the following commands on Terminal. + + $ sudo apt-get install unity-tweak-tool gnome-tweak-tool + +![Install Tweak Tool](http://www.tecmint.com/wp-content/uploads/2015/04/install-tweak-tool.jpg) +Install Tweak Tool + +![Tweak Tool Settings](http://www.tecmint.com/wp-content/uploads/2015/04/tweak-settings.jpg) +Tweak Tool Settings + +Another interesting tweak tool is represented by the Ubuntu Tweak package which can be obtained and installed by visiting the webpage: [http://ubuntu-tweak.com/][2]. + +![Tweak Tool: System Information](http://www.tecmint.com/wp-content/uploads/2015/04/tweak-system-info.jpg) +Tweak Tool: System Information + +After you have installed all this bunch of software, you might want to clean your system in order to free some space on the hard drive, by issuing the following commands: + + $ sudo apt-get -y autoremove + $ sudo apt-get -y autoclean + $ sudo apt-get -y clean + +This are just a few tweaks and programs that an average user might install and use on Ubuntu 15.04 Desktop for daily basic utilization. For more advanced programs, features and utilities use Ubuntu Software Center or consult Ubuntu Wiki webpage. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/things-to-do-after-installing-ubuntu-15-04-desktop/ + +作者:[Matei Cezar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/cezarmatei/ +[1]:http://www.viber.com/en/products/linux +[2]:http://ubuntu-tweak.com/ \ No newline at end of file diff --git a/sources/tech/20150427 How to set up NTP server in CentOS.md b/sources/tech/20150427 How to set up NTP server in CentOS.md new file mode 100644 index 0000000000..54400aef7b --- /dev/null +++ b/sources/tech/20150427 How to set up NTP server in CentOS.md @@ -0,0 +1,165 @@ +How to set up NTP server in CentOS +================================================================================ +Network Time Protocol (NTP) is used to synchronize system clocks of different hosts over network. All managed hosts can synchronize their time with a designated time server called an NTP server. An NTP server on the other hand synchronizes its own time with any public NTP server, or any server of your choice. The system clocks of all NTP-managed devices are synchronized to the millisecond precision. + +In a corporate environment, if they do not want to open up their firewall for NTP traffic, it is necessary to set up in-house NTP server, and let employees use the internal server as opposed to public NTP servers. In this tutorial, we will describe how to configure a CentOS system as an NTP server. Before going into the detail, let's go over the concept of NTP first. + +### Why Do We Need NTP? ### + +Due to manufacturing variances, all (non-atomic) clocks do not run at the exact same speed. Some clocks tend to run faster, while some run slower. So over a large timeframe, the time of one clock gradually drifts from another, causing what is known as "clock drift" or "time drift". To minimize the effect of clock drift, the hosts using NTP should periodically communicate with a designated NTP server to keep their clock in sync. + +Time synchrony across different hosts is important for things like scheduled backup, [intrusion detection][1] logging, [distributed job scheduling ][2]or transaction bookkeeping. It may even be required as part of regulatory compliance. + +### NTP Hierarchy ### + +NTP clocks are organized in a layered hierarchy. Each level of the hierarchy is called a *stratum*. The notion of stratum describes how many NTP hops away a machine is from an authoritative time source. + +![](https://farm8.staticflickr.com/7590/16645732413_3b7af58186_c.jpg) + +Stratum 0 is populated with clocks that have virtually no time drifts, such as atomic clocks. These clocks cannot be directly used over the network. Stratum N (N > 1) servers synchronize their time against Stratum N-1 servers. Stratum N clocks may be connected with each other over network. + +NTP supports up to 15 stratums in the hierarchy. Stratum 16 is considered unsynchronized and unusable. + +### Preparing CentOS Server ### + +Now let's proceed to set up an NTP server on CentOS. + +First of all, we need to make sure that the time zone of the server is set up correctly. In CentOS 7, we can use the timedatectl command to view and change the server time zone (e.g., "Australia/Adelaide") + + # timedatectl list-timezones | grep Australia + # timedatectl set-timezone Australia/Adelaide + # timedatectl + +![](https://farm8.staticflickr.com/7605/16645732463_db75a0bdcd_o.png) + +Go ahead and set up necessary software using yum. + + # yum install ntp + +Then we will add the global NTP servers to synchronize time with. + + # vim /etc/ntp.conf + +---------- + + server 0.oceania.pool.ntp.org + server 1.oceania.pool.ntp.org + server 2.oceania.pool.ntp.org + server 3.oceania.pool.ntp.org + +By default, NTP server logs are saved in /var/log/messages. If you want to use a custom log file, that can be specified as well. + + logfile /var/log/ntpd.log + +If you opt for a custom log file, make sure to change its ownership and SELinux context. + + # chown ntp:ntp /var/log/ntpd.log + # chcon -t ntpd_log_t /var/log/ntpd.log + +Now initiate NTP service and make sure it's added to startup. + + # systemctl restart ntp + # systemctl enable ntp + +### Verifying NTP Server Clock ### + +We can use the ntpq command to check how the local server's clock is synchronized via NTP. + +![](https://farm9.staticflickr.com/8713/16645732513_1823736ca8_b.jpg) + +The following table explains the output columns. + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
remoteThe sources defined at ntp.conf. '*' indicates the current and best source; '+' indicates that these sources are available as NTP source. Sources with - are considered unusable.
refidThe IP address of the clock with which the remote server clock is synchronized with.
stStratum
tType. 'u' is for unicast. Other values may include local, multicast, broadcast.
whenThe time elapsed (in seconds) since the last contact with the server.
pollPolling frequency with the server in seconds.
reachAn octal value that indicates whether there are any errors in communication with the server. The value 377 indicates 100% success.
delayThe round trip time between our server and the remote server.
offsetThe time difference between our server and the remote server in milliseconds.
jitterThe average time difference in milliseconds between two samples.
+ +### Controlling Access to NTP Server ### + +By default, NTP server allows incoming queries from all hosts. If you want to filter incoming NTP synchronization connections, you could add a rule in your firewall to filter the traffic. + + # iptables -A INPUT -s 192.168.1.0/24 -p udp --dport 123 -j ACCEPT + # iptables -A INPUT -p udp --dport 123 -j DROP + +The rule will allow NTP traffic (on port UDP/123) from 192.168.1.0/24, and deny traffic from all other networks. You can update the rule to match your requirements. + +### Configuring NTP Clients ### + +#### 1. Linux #### + +NTP client hosts need the ntpdate package to synchronize time against the server. The package can be easily installed using yum or apt-get. After installing the package, run the command with the IP address of the server. + + # ntpdate + +The command is identical for RHEL and Debian based systems. + +#### 2. Windows #### + +If you are using Windows, look for 'Internet Time' under Date and Time settings. + +#### 3. Cisco Devices #### + +If you want to synchronize the time of a Cisco device, you can use the following command from the global configuration mode. + + # ntp server + +NTP enabled devices from other vendors have their own parameters for Internet time. Please check the documentation of the device if you want to synchronize its time with the NTP server. + +### Conclusion ### + +To sum up, NTP is a protocol that keeps the clocks across all your hosts in sync. We have demonstrated how we can set up an NTP server, and let NTP enabled devices synchronize their time against the server. + +Hope this helps. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/setup-ntp-server-centos.html + +作者:[Sarmed Rahman][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://xmodulo.com/how-to-compile-and-install-snort-from-source-code-on-ubuntu.html +[2]:http://xmodulo.com/how-to-install-hdfs-and-hadoop-using.html \ No newline at end of file From c59801a39ae20f143ff332748836699954213711 Mon Sep 17 00:00:00 2001 From: runningwater Date: Mon, 27 Apr 2015 20:01:42 +0800 Subject: [PATCH 0659/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E4=B8=ADby=20runni?= =?UTF-8?q?ngwater?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Manage and Use LVM (Logical Volume Management) in Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md index 570217f220..d062a85336 100644 --- a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md +++ b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md @@ -1,3 +1,4 @@ +translating by runningwater How to Manage and Use LVM (Logical Volume Management) in Ubuntu ================================================================================ ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-1.png.pagespeed.ic.VGSxDeVS9P.png) @@ -258,7 +259,7 @@ That should cover most of what you need to know to use LVM. If you’ve got some via: http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ -译者:[译者ID](https://github.com/译者ID) +译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From baee0efc8effe0c5a1519ec4e235ef69014ed347 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Mon, 27 Apr 2015 23:22:52 +0800 Subject: [PATCH 0660/2517] Update 20150128 Docker-2 Setting up a private Docker registry.md --- .../20150128 Docker-2 Setting up a private Docker registry.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md b/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md index 9a9341b4b7..625281ee7c 100644 --- a/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md +++ b/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md @@ -1,3 +1,4 @@ +[Translating by DongShuaike] Setting up a private Docker registry ================================================================================ ![](http://cocoahunter.com/content/images/2015/01/docker2.jpg) @@ -238,4 +239,4 @@ via: http://cocoahunter.com/2015/01/23/docker-2/ [8]:http://localhost:5000/v1/search [9]:http://cocoahunter.com/2015/01/23/docker-3/ [10]:http://boot2docker.io/ -[11]:https://github.com/docker/docker-registry/ \ No newline at end of file +[11]:https://github.com/docker/docker-registry/ From 38708b4f44d7ab040aa836b5a8584483b111e604 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 00:11:57 +0800 Subject: [PATCH 0661/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 已转载别处译文,十分可惜的放弃发布本篇 @KayGuoWhu --- .../20150318 The future of Linux storage.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/talk => published}/20150318 The future of Linux storage.md (86%) diff --git a/translated/talk/20150318 The future of Linux storage.md b/published/20150318 The future of Linux storage.md similarity index 86% rename from translated/talk/20150318 The future of Linux storage.md rename to published/20150318 The future of Linux storage.md index 23a2dfc674..f2224a5bb7 100644 --- a/translated/talk/20150318 The future of Linux storage.md +++ b/published/20150318 The future of Linux storage.md @@ -2,7 +2,7 @@ Linux存储的未来 ================================================================================ > **摘要**:Linux系统的软件开发者们正致力于使Linux支持更多种类的文件和存储方案。 -波士顿 - 在[Linux基金会][1]最近的[Vault][2]展示会上,全都是关于文件系统和存储方案的讨论。你可以会想关于这两个主题并没有什么展值得讨论的最新进展,但事实并非如此。 +波士顿 - 在[Linux基金会][1]最近的[Vault][2]展示会上,全都是关于文件系统和存储方案的讨论。你可以会觉得关于这两个主题并没有什么值得讨论的最新进展,但事实并非如此。 ![](http://zdnet2.cbsistatic.com/hub/i/r/2015/03/12/c8f92cc2-b963-4238-80a0-d785ec93698c/resize/770x578/08d93a8a393d3f50b2a56e6b0e7a0ca9/btrfs-1.jpg) @@ -14,17 +14,17 @@ Linux存储的未来 ### Btrfs ### -例如,Chris Mason,一位来自Facebook的软件工程师,也是[Btrfs][6](对外宣称Butter FS)的维护者之一,说明了Facebook是如何使用这种文件系统。Btrfs拥有文件系统固有的许多优点,比如既能处理大量的小文件,也能处理大小可达16EB的单个文件;支持RAID的baked(烦请校正补充);内置的文件系统压缩,以及集成了对多种存储设备的支持。 +例如,Chris Mason,一位来自Facebook的软件工程师,也是[Btrfs][6](念做 Butter FS)的维护者之一,介绍了Facebook是如何使用这种文件系统。Btrfs拥有文件系统固有的许多优点,比如既能处理大量的小文件,也能处理大小可达16EB的单个文件;支持RAID ;内置的文件系统压缩,以及集成了对多种存储设备的支持。 -当然,Facebook的服务器也运行在Linux上。更准确地讲,是运行在一个基于[CentOS][7]的内部发行版上,它是基于3.10和3.18版的内核。对Facebook来说,真正的收获是Btrfs在由Facebook持续的更新用户操作带来的巨大的IOPS(每秒钟输入输出的操作数)的负载下依旧保持稳定和快速。 +当然,Facebook的服务器也运行在Linux上。更准确地讲,是运行在一个基于[CentOS][7]的内部发行版上,它是基于3.10和3.18版的内核。对Facebook来说,真正的收获是Btrfs在Facebook持续更新的用户操作所带来的巨大的IOPS(每秒钟输入输出的操作数)的负载下依旧保持稳定和快速。 这就是好消息,但坏消息是对于像MySQL一样的传统DBMS(数据库管理系统)来说Btrfs还是太慢了。对此,Facebook采用了[XFS][8]。为了协同这两种文件系统,Facebook又用到了一种叫做[Gluster][9]的开源分布式文件系统。 -Facebook,一直与上游的负责Btrfs的Linux内核开发者保持密切联系,致力于提高Btrfs在DBMS上的速度。Mason和他的同事在[RocksDB][10]数据库上使用Btrfs以达成目标,RocksDB是一种为提供快速存储开发的持久化键值存储系统,可以作为客户端服务器模式数据库的基础部分。 +Facebook,一直与上游的负责Btrfs的Linux内核开发者保持密切联系,致力于提高Btrfs在DBMS上的速度。Mason和他的同事的目标是在[RocksDB][10]数据库上使用Btrfs,RocksDB是一种为提供快速存储开发的持久化键值存储系统,可以作为客户端服务器模式数据库的基础部分。 当然Btrfs也还存在一些问题,比如,如果有用户傻到用数据把硬盘几乎要撑爆时,Btrfs会在硬盘被完全装满前阻止用户继续写入。对某些工程来说,比如[CoreOS][12],一款依赖容器化的企业版Linux系统,这种问题是致命的。[因此,CoreOS已经切换到使用xt4和overlayfs了][11]。 -Btrfs的开发人员正致力于数据去重。在这一点上,当文件系统中拥有超过一个的相同文件时,会自动删除多余文件。正如Mason所说,“并非每个人都需要这个功能,但如果有人需要,那就是真的需要!” +Btrfs的开发人员正致力于数据去重。在这一点上,当文件系统中拥有超过一个的相同文件时,会自动删除多余文件。正如Mason所说,“并非每个人都需要这个功能,但如果有人需要,那就是真的有用!” 在正在开展的重要性工作中,Btrfs并非是唯一的文件系统。John Spary,[Red Hat][13]的一位高级软件工程师,提到了另一款名为[Ceph][14]的分布式文件系统。 @@ -38,7 +38,7 @@ Ceph提供了一种分布式对象存储方案和文件系统,反过来它依 但是,Ceph FS仍值得去做,正如Spray所说,“因为兼容POSIX的文件系统是操作系统通用的。”这并不是说Ceph FS就一无是处。“它并不是支离破碎的,相反它奏效了。所缺的是修复和监控工具。” -Red Hat目前正致力于获得[fsck][17]和日志修复工具、快照强化、更好客户端访问控制,以及云与容器的集成。尽管Ceph FS到目前为止只是一种有潜力或者没前景的文件系统,但仍然值得用在生产环境中。 +Red Hat目前正致力于完成[fsck][17]和日志修复工具开发、快照强化、更好客户端访问控制,以及云与容器的集成。尽管Ceph FS到目前为止只是一种有潜力或者没前景的文件系统,但仍然值得用在生产环境中。 ### 文件与存储的差别与目标 ### @@ -56,7 +56,7 @@ via: http://www.zdnet.com/article/linux-storage-futures/ 作者:[Steven J. Vaughan-Nichols][a] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 40a4508387cec4d96e2b1dffcf5d10792f849a06 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 28 Apr 2015 10:56:47 +0800 Subject: [PATCH 0662/2517] [Translating]tech/20150427 How to set up NTP server in CentOS --- sources/tech/20150427 How to set up NTP server in CentOS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150427 How to set up NTP server in CentOS.md b/sources/tech/20150427 How to set up NTP server in CentOS.md index 54400aef7b..e04a8841c7 100644 --- a/sources/tech/20150427 How to set up NTP server in CentOS.md +++ b/sources/tech/20150427 How to set up NTP server in CentOS.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to set up NTP server in CentOS ================================================================================ Network Time Protocol (NTP) is used to synchronize system clocks of different hosts over network. All managed hosts can synchronize their time with a designated time server called an NTP server. An NTP server on the other hand synchronizes its own time with any public NTP server, or any server of your choice. The system clocks of all NTP-managed devices are synchronized to the millisecond precision. From 1b6c5aa4792a99edbed674ff9fe6787a32952aef Mon Sep 17 00:00:00 2001 From: Mo Date: Tue, 28 Apr 2015 11:24:39 +0800 Subject: [PATCH 0663/2517] [translated]GNOME-Pie 0.6 Application Launcher Released --- ...E-Pie 0.6 Application Launcher Released.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 translated/news/GNOME-Pie 0.6 Application Launcher Released.md diff --git a/translated/news/GNOME-Pie 0.6 Application Launcher Released.md b/translated/news/GNOME-Pie 0.6 Application Launcher Released.md new file mode 100644 index 0000000000..94cdfd1006 --- /dev/null +++ b/translated/news/GNOME-Pie 0.6 Application Launcher Released.md @@ -0,0 +1,53 @@ +GNOME-Pie 0.6.1 应用启动器发布,酷炫新特性[多图+视频] +============================================= + +**Simon Schneegans高兴地[宣布][1]他的GNOME-Pie 0.6.1已可供下载使用。GNOME-Pie是一个可以在不同桌面环境中作为应用启动器的小工具,包括GNOME和Unity。** + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-3.jpg) + +GNOME-Pie 0.6.1看起来是个大版本更新,引入了许多新特性,比如支持半个或四分之一圆,可选择每个启动器想要的形状,也可以自动生成形状,以及多彩的动态图标。 + +此外,软件现在还适配若干类dock应用,包括elementary OS的Plank,Ubuntu的Unity,以及通用的Docky。一些已有的GNOME-Pie主题也已更新,还引入了全新主题Simple,为半圆启动器布局设计。 + +“Gnome-Pie新版本已发布,实际上已经发布了两个版本:0.6.0和之后的0.6.1,修复了[issue #73][2],”Simon Schneegans在发布声明上说道,“新版本修复了许多bug,还带来了许多新特性!” + + + +### 现在就可在Ubuntu上安装GNOME-Pie ### + +Ubuntu及其衍生版用户现在就可通过Simon Schneegans的PPA源安装GNOME-Pie。只需打开终端,运行下列命令即可。GNOME-Pie适用于Ubuntu 14.04 LTS,14.10和15.04。 + +

+sudo add-apt-repository ppa:simonschneegans/testing
+sudo apt-get update
+sudo apt-get install gnome-pie
+
+ +其他GNU/Linux发行版用户可以从官网下载GNOME-Pie 0.6.1的源代码,或者近期在系统的软件源中搜索新版GNOME-Pie。 + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-2.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-4.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-5.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-6.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-7.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-8.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-9.jpg) + +![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-10.jpg) + +-------------------------------------------------- + +via:http://news.softpedia.com/news/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914.shtml + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://simmesimme.github.io/news/2015/04/18/gnome-pie-061/ +[2]:https://github.com/Simmesimme/Gnome-Pie/issues/73 From 6386204f886da9156e110ffad0e81eecc3a6151e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 28 Apr 2015 12:03:53 +0800 Subject: [PATCH 0664/2517] [Translate]tech/20150427 How to set up NTP server in CentOS --- ...0427 How to set up NTP server in CentOS.md | 166 ------------------ ...0427 How to set up NTP server in CentOS.md | 165 +++++++++++++++++ 2 files changed, 165 insertions(+), 166 deletions(-) delete mode 100644 sources/tech/20150427 How to set up NTP server in CentOS.md create mode 100644 translated/tech/20150427 How to set up NTP server in CentOS.md diff --git a/sources/tech/20150427 How to set up NTP server in CentOS.md b/sources/tech/20150427 How to set up NTP server in CentOS.md deleted file mode 100644 index e04a8841c7..0000000000 --- a/sources/tech/20150427 How to set up NTP server in CentOS.md +++ /dev/null @@ -1,166 +0,0 @@ -Translating by ictlyh -How to set up NTP server in CentOS -================================================================================ -Network Time Protocol (NTP) is used to synchronize system clocks of different hosts over network. All managed hosts can synchronize their time with a designated time server called an NTP server. An NTP server on the other hand synchronizes its own time with any public NTP server, or any server of your choice. The system clocks of all NTP-managed devices are synchronized to the millisecond precision. - -In a corporate environment, if they do not want to open up their firewall for NTP traffic, it is necessary to set up in-house NTP server, and let employees use the internal server as opposed to public NTP servers. In this tutorial, we will describe how to configure a CentOS system as an NTP server. Before going into the detail, let's go over the concept of NTP first. - -### Why Do We Need NTP? ### - -Due to manufacturing variances, all (non-atomic) clocks do not run at the exact same speed. Some clocks tend to run faster, while some run slower. So over a large timeframe, the time of one clock gradually drifts from another, causing what is known as "clock drift" or "time drift". To minimize the effect of clock drift, the hosts using NTP should periodically communicate with a designated NTP server to keep their clock in sync. - -Time synchrony across different hosts is important for things like scheduled backup, [intrusion detection][1] logging, [distributed job scheduling ][2]or transaction bookkeeping. It may even be required as part of regulatory compliance. - -### NTP Hierarchy ### - -NTP clocks are organized in a layered hierarchy. Each level of the hierarchy is called a *stratum*. The notion of stratum describes how many NTP hops away a machine is from an authoritative time source. - -![](https://farm8.staticflickr.com/7590/16645732413_3b7af58186_c.jpg) - -Stratum 0 is populated with clocks that have virtually no time drifts, such as atomic clocks. These clocks cannot be directly used over the network. Stratum N (N > 1) servers synchronize their time against Stratum N-1 servers. Stratum N clocks may be connected with each other over network. - -NTP supports up to 15 stratums in the hierarchy. Stratum 16 is considered unsynchronized and unusable. - -### Preparing CentOS Server ### - -Now let's proceed to set up an NTP server on CentOS. - -First of all, we need to make sure that the time zone of the server is set up correctly. In CentOS 7, we can use the timedatectl command to view and change the server time zone (e.g., "Australia/Adelaide") - - # timedatectl list-timezones | grep Australia - # timedatectl set-timezone Australia/Adelaide - # timedatectl - -![](https://farm8.staticflickr.com/7605/16645732463_db75a0bdcd_o.png) - -Go ahead and set up necessary software using yum. - - # yum install ntp - -Then we will add the global NTP servers to synchronize time with. - - # vim /etc/ntp.conf - ----------- - - server 0.oceania.pool.ntp.org - server 1.oceania.pool.ntp.org - server 2.oceania.pool.ntp.org - server 3.oceania.pool.ntp.org - -By default, NTP server logs are saved in /var/log/messages. If you want to use a custom log file, that can be specified as well. - - logfile /var/log/ntpd.log - -If you opt for a custom log file, make sure to change its ownership and SELinux context. - - # chown ntp:ntp /var/log/ntpd.log - # chcon -t ntpd_log_t /var/log/ntpd.log - -Now initiate NTP service and make sure it's added to startup. - - # systemctl restart ntp - # systemctl enable ntp - -### Verifying NTP Server Clock ### - -We can use the ntpq command to check how the local server's clock is synchronized via NTP. - -![](https://farm9.staticflickr.com/8713/16645732513_1823736ca8_b.jpg) - -The following table explains the output columns. - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
remoteThe sources defined at ntp.conf. '*' indicates the current and best source; '+' indicates that these sources are available as NTP source. Sources with - are considered unusable.
refidThe IP address of the clock with which the remote server clock is synchronized with.
stStratum
tType. 'u' is for unicast. Other values may include local, multicast, broadcast.
whenThe time elapsed (in seconds) since the last contact with the server.
pollPolling frequency with the server in seconds.
reachAn octal value that indicates whether there are any errors in communication with the server. The value 377 indicates 100% success.
delayThe round trip time between our server and the remote server.
offsetThe time difference between our server and the remote server in milliseconds.
jitterThe average time difference in milliseconds between two samples.
- -### Controlling Access to NTP Server ### - -By default, NTP server allows incoming queries from all hosts. If you want to filter incoming NTP synchronization connections, you could add a rule in your firewall to filter the traffic. - - # iptables -A INPUT -s 192.168.1.0/24 -p udp --dport 123 -j ACCEPT - # iptables -A INPUT -p udp --dport 123 -j DROP - -The rule will allow NTP traffic (on port UDP/123) from 192.168.1.0/24, and deny traffic from all other networks. You can update the rule to match your requirements. - -### Configuring NTP Clients ### - -#### 1. Linux #### - -NTP client hosts need the ntpdate package to synchronize time against the server. The package can be easily installed using yum or apt-get. After installing the package, run the command with the IP address of the server. - - # ntpdate - -The command is identical for RHEL and Debian based systems. - -#### 2. Windows #### - -If you are using Windows, look for 'Internet Time' under Date and Time settings. - -#### 3. Cisco Devices #### - -If you want to synchronize the time of a Cisco device, you can use the following command from the global configuration mode. - - # ntp server - -NTP enabled devices from other vendors have their own parameters for Internet time. Please check the documentation of the device if you want to synchronize its time with the NTP server. - -### Conclusion ### - -To sum up, NTP is a protocol that keeps the clocks across all your hosts in sync. We have demonstrated how we can set up an NTP server, and let NTP enabled devices synchronize their time against the server. - -Hope this helps. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/setup-ntp-server-centos.html - -作者:[Sarmed Rahman][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/how-to-compile-and-install-snort-from-source-code-on-ubuntu.html -[2]:http://xmodulo.com/how-to-install-hdfs-and-hadoop-using.html \ No newline at end of file diff --git a/translated/tech/20150427 How to set up NTP server in CentOS.md b/translated/tech/20150427 How to set up NTP server in CentOS.md new file mode 100644 index 0000000000..3924edd93f --- /dev/null +++ b/translated/tech/20150427 How to set up NTP server in CentOS.md @@ -0,0 +1,165 @@ +如何在 CentOS 中设置 NTP 服务器 +================================================================================ +网络时间协议(NTP)用来同步网络上不同主机的系统时间。所有托管的主机都可以和一个指定的被称为 NTP 服务器的时间服务器同步它们的时间。另一方面一个 NTP 服务器将它的时间和任何公共 NTP 服务器,或者你选定的服务器同步。NTP 托管的所有系统时钟都同步精确到毫秒级。 + +在一个协作环境中,如果他们不想为 NTP 传输打开防火墙,就有必要设置一个内部 NTP 服务器,然后让员工使用内部服务器而不是公共 NTP 服务器。在这个指南中,我们会介绍如何将一个 CentOS 系统配置为 NTP 服务器。在介绍详细内容之前,让我们先来简单了解一下 NTP 的概念。 + +### 为什么我们需要 NTP? ### + +由于制造工艺多种多样,所有的(非原子)时钟并不按照完全一致的速度行走。有一些时钟走的比较快而有一些走的比较慢。因此经过很长一段时间以后,一个时钟的时间慢慢的偏移于其它,导致有名的 “时钟漂移” 或 “时间漂移”。为了最小化时钟漂移的影响,使用 NTP 的主机应该周期性地和指定的 NTP 服务器交互以保持它们的时钟同步。 + +在不同的主机之间进行时间同步对于计划备份、[干扰检测][1]日志、[分布式任务调度][2]或者事务订单管理来说是很重要的事情。它甚至可能要求作为日常任务的一部分。 + +### NTP 层次 ### + +NTP 时钟以层次模型组织。层级中的每层被称为一个 *stratum*。stratum 的概念说明了一台机器到授权的时间源有多少 NTP 跳。 + +![](https://farm8.staticflickr.com/7590/16645732413_3b7af58186_c.jpg) + +Stratum 0 由没有时间漂移的时钟组成,例如原子时钟。这种时钟不能在网络上直接使用。Stratum N (N > 1) 层服务器从 Stratum N-1 层服务器同步时间。Stratum N 时钟可能通过网络和彼此互联。 + +NTP 支持多达 15 stratums 的层级。Stratum 16 被认为是没有同步不能使用的。 + +### 准备 CentOS 服务器 ### + +现在让我们来开始在 CentOS 上设置 NTP 服务器。 + +首先,我们需要保证正确设置了服务器的时区。在 CentOS 7 中,我们可以使用 timedatectl 命令查看和更改服务器的时区(比如,"Australia/Adelaide") + + # timedatectl list-timezones | grep Australia + # timedatectl set-timezone Australia/Adelaide + # timedatectl + +![](https://farm8.staticflickr.com/7605/16645732463_db75a0bdcd_o.png) + +继续并使用 yum 安装需要的软件 + + # yum install ntp + +然后我们会添加全球 NTP 服务器用于同步时间。 + + # vim /etc/ntp.conf + +---------- + + server 0.oceania.pool.ntp.org + server 1.oceania.pool.ntp.org + server 2.oceania.pool.ntp.org + server 3.oceania.pool.ntp.org + +默认情况下,NTP 服务器的日志保存在 /var/log/messages。如果你希望使用自定义的日志文件,那也可以指定。 + + logfile /var/log/ntpd.log + +如果你选择自定义日志文件,确保更改了它的属主和 SELinux 环境。 + + # chown ntp:ntp /var/log/ntpd.log + # chcon -t ntpd_log_t /var/log/ntpd.log + +现在初始化 NTP 服务并确保把它添加到了随机启动。 + + # systemctl restart ntp + # systemctl enable ntp + +### 验证 NTP Server 时钟 ### + +我们可以使用 ntpq 命令来检查本地服务器的时钟如何通过 NTP 同步。 + +![](https://farm9.staticflickr.com/8713/16645732513_1823736ca8_b.jpg) + +下面的表格解释了输出列。 + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
remote源在 ntp.conf 中定义。‘*’ 表示当前使用的最好的源;‘+’ 表示可作为 NTP 源的源;‘-’ 标记的源是不可用的。
refid和远程服务器时钟同步的时钟的 IP 地址。
stStratum
t类型。 'u' 表示单播(unicast)。其它值包括本地(local)、多播(multicast)、广播(broadcast)。
when自从上次和服务器交互经过的时间(以秒数计)。
poll和服务器的轮询频率,以秒数计。
reach表示和服务器交互是否有任何错误的十进制数。值 337 表示 100% 成功。
delay服务器和远程服务器来回的时间。
offset我们服务器和远程服务器的时间差异,以毫秒数计。
jitter两个例子之间平局时间差异,以毫秒数计。
+ +### 控制到 NTP 服务器的访问 ### + +默认情况下,NTP 服务器允许来自所有主机的查询。如果你想过滤进来的 NTP 同步连接,你可以在你的防火墙中添加规则过滤流量。 + + # iptables -A INPUT -s 192.168.1.0/24 -p udp --dport 123 -j ACCEPT + # iptables -A INPUT -p udp --dport 123 -j DROP + +该规则允许从 192.168.1.0/24 来的 NTP 流量(端口 UDP/123),任何其它网络的流量会被截停。你可以根据需要更改规则。 + +### 配置 NTP 客户端 ### + +#### 1. Linux #### + +NTP 客户端主机需要 ntpupdate 软件包和服务器同步时间。可以轻松地使用 yum 或 apt-get 安装这个软件包。安装完软件包之后,用服务器的 IP 地址运行下面的命令。 + + # ntpdate + +基于 RHEL 和 Debian 的系统命令都相同。 + +#### 2. Windows #### + +如果你正在使用 Windows,在日期和时间设置(Date and Time settings)下查找网络时间(Internet Time)。 + +#### 3. Cisco 设备 #### + +如果你想和 Cisco 设备同步时间,你可以在全局配置模式下使用下面的命令。 + + # ntp server + +其它有支持 NTP 的卖家有自己的参数用于网络时间。如果你想将设备和 NTP服务器同步时间,请查看设备的说明文档。 + +### 结论 ### + +总而言之,NTP 是在你的所有主机上同步时钟的一个协议。我们已经介绍了如何设置 NTP 服务器并使支持 NTP 的设备和服务器同步时间。 + +希望能对你有所帮助 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/setup-ntp-server-centos.html + +作者:[Sarmed Rahman][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://xmodulo.com/how-to-compile-and-install-snort-from-source-code-on-ubuntu.html +[2]:http://xmodulo.com/how-to-install-hdfs-and-hadoop-using.html \ No newline at end of file From 4d7ee735532e94c3fbfe603f035c856d3363ddef Mon Sep 17 00:00:00 2001 From: chenjt Date: Tue, 28 Apr 2015 12:13:29 +0800 Subject: [PATCH 0665/2517] [bazz2 translating]How to secure SSH login with one-time passwords on Linux --- ...How to secure SSH login with one-time passwords on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md b/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md index 9133679994..56888f3342 100644 --- a/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md +++ b/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md @@ -1,3 +1,4 @@ +[bazz222222222] How to secure SSH login with one-time passwords on Linux ================================================================================ As someone says, security is a not a product, but a process. While SSH protocol itself is cryptographically secure by design, someone can wreak havoc on your SSH service if it is not administered properly, be it weak passwords, compromised keys or outdated SSH client. @@ -177,4 +178,4 @@ via: http://xmodulo.com/secure-ssh-login-one-time-passwords-linux.html [a]:http://xmodulo.com/author/nanni [1]:http://xmodulo.com/how-to-force-ssh-login-via-public-key-authentication.html [2]:http://xmodulo.com/two-factor-authentication-ssh-login-linux.html -[3]:http://www.cl.cam.ac.uk/~mgk25/otpw.html \ No newline at end of file +[3]:http://www.cl.cam.ac.uk/~mgk25/otpw.html From 49604b1666241f2d54ec64d0852963e2a73b4480 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 13:42:53 +0800 Subject: [PATCH 0666/2517] PUB:GNOME-Pie 0.6 Application Launcher Released @alim0x --- ...E-Pie 0.6 Application Launcher Released.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) rename {translated/news => published}/GNOME-Pie 0.6 Application Launcher Released.md (56%) diff --git a/translated/news/GNOME-Pie 0.6 Application Launcher Released.md b/published/GNOME-Pie 0.6 Application Launcher Released.md similarity index 56% rename from translated/news/GNOME-Pie 0.6 Application Launcher Released.md rename to published/GNOME-Pie 0.6 Application Launcher Released.md index 94cdfd1006..199d13f1a6 100644 --- a/translated/news/GNOME-Pie 0.6 Application Launcher Released.md +++ b/published/GNOME-Pie 0.6 Application Launcher Released.md @@ -1,29 +1,28 @@ GNOME-Pie 0.6.1 应用启动器发布,酷炫新特性[多图+视频] ============================================= -**Simon Schneegans高兴地[宣布][1]他的GNOME-Pie 0.6.1已可供下载使用。GNOME-Pie是一个可以在不同桌面环境中作为应用启动器的小工具,包括GNOME和Unity。** +**Simon Schneegans 高兴地[宣布][1]他的 GNOME-Pie 0.6.1 已可供下载使用。GNOME-Pie 是一个可以在包括 GNOME 和 Unity 在内的多种桌面环境中作为应用启动器的小工具。** ![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-3.jpg) -GNOME-Pie 0.6.1看起来是个大版本更新,引入了许多新特性,比如支持半个或四分之一圆,可选择每个启动器想要的形状,也可以自动生成形状,以及多彩的动态图标。 +GNOME-Pie 0.6.1 看起来是个主要版本更新,引入了许多新特性,比如支持半个或四分之一圆,可选择每个启动器想要的形状,也可以自动根据位置调整形状(圆形,半个或四分之一圆),以及多彩的动态图标。 -此外,软件现在还适配若干类dock应用,包括elementary OS的Plank,Ubuntu的Unity,以及通用的Docky。一些已有的GNOME-Pie主题也已更新,还引入了全新主题Simple,为半圆启动器布局设计。 +此外,软件现在还适配若干类dock应用,包括elementary OS 的 Plank,Ubuntu 的 Unity,以及通用的 Docky。一些已有的 GNOME-Pie 主题也已更新,还引入了全新的为半圆启动器布局设计的主题 Simple,。 -“Gnome-Pie新版本已发布,实际上已经发布了两个版本:0.6.0和之后的0.6.1,修复了[issue #73][2],”Simon Schneegans在发布声明上说道,“新版本修复了许多bug,还带来了许多新特性!” +“Gnome-Pie 新版本已发布,实际上已经发布了两个版本:0.6.0和之后的0.6.1,修复了[issue #73][2],”Simon Schneegans 在发布声明上说道,“新版本修复了许多 bug,还带来了许多新特性!” ### 现在就可在Ubuntu上安装GNOME-Pie ### -Ubuntu及其衍生版用户现在就可通过Simon Schneegans的PPA源安装GNOME-Pie。只需打开终端,运行下列命令即可。GNOME-Pie适用于Ubuntu 14.04 LTS,14.10和15.04。 +Ubuntu 及其衍生版用户现在就可通过 Simon Schneegans 的PPA源安装 GNOME-Pie。只需打开终端,运行下列命令即可。GNOME-Pie 适用于 Ubuntu 14.04 LTS,14.10和15.04。 -

-sudo add-apt-repository ppa:simonschneegans/testing
-sudo apt-get update
-sudo apt-get install gnome-pie
-
+ sudo add-apt-repository ppa:simonschneegans/testing + sudo apt-get update + sudo apt-get install gnome-pie -其他GNU/Linux发行版用户可以从官网下载GNOME-Pie 0.6.1的源代码,或者近期在系统的软件源中搜索新版GNOME-Pie。 + +其他 GNU/Linux 发行版用户可以从官网下载 GNOME-Pie 0.6.1 的源代码,或者近期在系统的软件源中搜索新版GNOME-Pie。 ![GNOME-Pie](http://i1-news.softpedia-static.com/images/news2/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914-2.jpg) @@ -43,9 +42,9 @@ sudo apt-get install gnome-pie -------------------------------------------------- -via:http://news.softpedia.com/news/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914.shtml +via: http://news.softpedia.com/news/GNOME-Pie-0-6-Application-Launcher-Released-with-Many-New-Features-Video-478914.shtml -译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) +译者:[alim0x](https://github.com/alim0x) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6f612fb4dd2f3e3f25525b97dc99bb0fe9c198f2 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 14:08:56 +0800 Subject: [PATCH 0667/2517] PUB:20150309 15 Interview Questions on Linux 'ls ' Command--Part 1 @theo-l --- ...uestions on Linux 'ls ' Command--Part 1.md | 99 +++++++++++-------- 1 file changed, 57 insertions(+), 42 deletions(-) rename {translated/tech => published}/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md (63%) diff --git a/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md b/published/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md similarity index 63% rename from translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md rename to published/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md index 77e42ff9e9..db7c9a3b88 100644 --- a/translated/tech/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md +++ b/published/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md @@ -1,85 +1,91 @@ -关于linux中的“ls”命令的15个面试问题 - 第一部分 +15 个‘ls’命令的面试问题(一) ================================================================================ -Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使用的最广泛的命令行中工具之一。 -它是一个在GNU基本工具集以及BSD各种变体上可用的与POSIX兼容的工具。 -“ls”命令可以通过与大量的选项一起使用来达到想要的结果。 +Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使用的最广泛的命令行中工具之一。它是一个POSIX兼容工具,在GNU基本工具集以及BSD各种变体上都可以使用。“ls”命令可以结合大量的选项来达到想要的结果。 + 这篇文章的目的在于通过相关的样例来深入讨论文件列表命令。 ![15 ls Command Questions](http://www.tecmint.com/wp-content/uploads/2014/09/ls-Command-Questions.png) -15个“ls”命令问题。 -### 1. 你会如何从目录中列出文件?### +*15个“ls”命令问题。* -答:使用linux文件列表命令“ls”驾到拯救。 +### 1. 如何列出目录中的文件?### + +答:linux文件列表命令“ls”就是干这个的。 # ls ![List Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-files.gif) -列出文件 -同时,我们也可以使用“echo(打印)”命令与一个通配符(*)相关联的方式在目录中列出其中的所有文件。 +*列出文件* + +同时,我们也可以使用“echo(回显)”命令与一个通配符(*)参数来雷锤目录中的所有文件。 # echo * ![List All Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-files.gif) -列出所有的文件。 -### 2. 你会如何只通过使用echo命令来列出目录中的所有文件?### +*列出所有的文件。* + +### 2. 如何只使用echo命令来只列出所有目录?### # echo */ ![List All Directories](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-directories.gif) -列出所有的目录 -### 3. 你会怎样列出一个目录中的所有文件, 包括隐藏的dot文件?### +*列出所有的目录* + +### 3. 怎样列出一个目录中的所有文件, 包括隐藏的以“.”开头的文件?### 答:我们需要将“-a”选项与“ls”命令一起使用。 # ls -a ![List All Hidden Files](http://www.tecmint.com/wp-content/uploads/2014/09/list-all-hidden-files.gif) -列出所有的隐藏文件。 -### 4. 如何列出目录中除了 “当前目录暗喻(.)”和“父目录暗喻(..)”之外的所有文件,包括隐藏文件?### +*列出所有的隐藏文件。* + +### 4. 如何列出目录中除了 “当前目录 .”和“父目录 ..”之外的所有文件,包括隐藏文件?### 答: 我们需要将“-A”选项与“ls”命令一起使用 # ls -A ![Do Not List Implied](http://www.tecmint.com/wp-content/uploads/2014/09/Do-not-list-Implied.gif) -别列出暗喻文件。 -### 5. 如何将当前目录中的内容使用长格式打印列表?### +*别列出指代当前目录和父目录的文件* + +### 5. 如何使用长格式打印出当前目录内容?### 答: 我们需要将“-l”选项与“ls”命令一起使用。 # ls -l ![List Files Long](http://www.tecmint.com/wp-content/uploads/2014/09/list-files-long.gif) -列出文件的长格式。 + +*列出文件的长格式。* 上面的样例中,其输出结果看起来向下面这样。 drwxr-xr-x 5 avi tecmint 4096 Sep 30 11:31 Binary -上面的drwxr-xr-x 是文件的权限,分别代表了文件所有者,组以及对整个世界。 所有者具有读(r),写(w)以及执行(x)等权限。 该文件所属组具有读(r)和执行(x)但是没有写的权限,相同的权限预示着 -对于整个世界的其他可以访问该文件的用户。 +上面的drwxr-xr-x 是文件的权限,分别代表了文件所有者,所属组以及“整个世界”。 所有者具有读(r),写(w)以及执行(x)等权限。 该文件所属组具有读(r)和执行(x)但是没有写的权限,整个世界的其他可以访问到该文件的人也具有相同权限。 - 开头的‘d’意味着这是一个目录 -- 数字'5'表示符号链接 +- 数字'5'表示符号链接(有5个符号链接) - 文件 Binary归属于用户 “avi”以及用户组 "tecmint" - Sep 30 11:31 表示文件最后一次的访问日期与时间。 ### 6. 假如让你来将目录中的内容以长格式列表打印,并且显示出隐藏的“点文件”,你会如何实现?### -答: 我们需要同时将"-a"和"-l"选项与“ls”命令一起使用。 +答: 我们需要同时将"-a"和"-l"选项与“ls”命令一起使用(LCTT 译注:单字符选项可以合并写)。 # ls -la ![Print Content of Directory](http://www.tecmint.com/wp-content/uploads/2014/09/Print-Content-of-Directory.gif) -打印目录内容 -同时,如果我们不想列出“当前目录暗喻”和"父目录暗喻",可以将“-A”和“-l”选项同“ls”命令一起使用。 +*打印目录内容* + +此外,如果我们不想列出“当前目录”和"父目录",可以将“-A”和“-l”选项同“ls”命令一起使用。 # ls -lA @@ -90,9 +96,10 @@ Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使 # ls --author -l ![List Author Files](http://www.tecmint.com/wp-content/uploads/2014/09/List-Author-Files.gif) -列出文件创建者。 -### 8. 如何对非显示字符进行转义打印?### +*列出文件创建者。* + +### 8. 如何对用转义字符打印出非显示字符?### 答:我们只需要使用“-b”选项来对非显示字符进行转义打印 @@ -100,52 +107,58 @@ Unix或类Unix系统中的“文件列表”命令“ls”是最基础并且使 ![Print Escape Character](http://www.tecmint.com/wp-content/uploads/2014/09/Print-Escape-Character.gif) -### 9. 指定特定的单位格式来列出文件和目录的大小,你会如何实现?### -答: 在此可以同时使用选项“-block-size=scale”和“-l”,但是我们需要用特定的单位如M,K等来替换‘scale’。 +### 9. 用指定特定的单位格式来列出文件和目录的大小,你会如何实现?### + +答: 在此可以同时使用选项“-block-size=scale”和“-l”,但是我们需要用特定的单位如M,K等来替换‘scale’参数。 # ls --block-size=M -l # ls --block-size=K -l ![List File Scale Format](http://www.tecmint.com/wp-content/uploads/2014/09/List-File-Scale-Format.gif) -列出文件大小单位格式。 -### 10. 列出目录中的非备份文件,也就是那些文件名以‘~’结尾的文件### +*列出文件大小单位格式。* + +### 10. 列出目录中的文件,但是不显示备份文件,即那些文件名以‘~’结尾的文件### 答: 选项‘-B’赶来救驾。 # ls -B ![List File Without Backup](http://www.tecmint.com/wp-content/uploads/2014/09/List-File-Without-Backup.gif) -列出非备份文件 -### 11. 将目录中的所有文件按照名称进行排序并与最后修改时间信息进行关联显示### +*列出非备份文件* + +### 11. 将目录中的所有文件按照名称进行排序,并显示其最后修改时间信息?### 答: 为了实现这个需求,我们需要同时将“-c”和"-l"选项与命令一起使用。 # ls -cl ![Sort Files](http://www.tecmint.com/wp-content/uploads/2014/09/Sort-Files.gif) -文件排序 + +*文件排序* ### 12. 将目录中的文件按照修改时间进行排序,并显示相关联的信息。### -答: 我们需要同时使用3个选项--'-l','-t','-c'--与命令‘ls’一起使用来对文件使用修改时间排序,最新的修改时间排在最前。 +答: 我们需要同时使用3个选项:'-l','-t','-c' 来对文件使用修改时间排序,最新的修改时间排在最前。 # ls -ltc ![Sort Files by Modification](http://www.tecmint.com/wp-content/uploads/2014/09/Sort-Files-by-Modification.gif) -按照修改时间对文件排序。 + +*按照修改时间对文件排序。* ### 13. 如何控制‘ls’命令的输出颜色的有无?### -答: 需要使用选项‘--color=parameter’,parameter参数值具有三种不同值,“auto(自动)”,“always(一直)”,“never(无色)”。 +答: 需要使用选项‘--color=parameter’,参数具有三种不同值,“auto(自动)”,“always(一直)”,“never(无色)”。 # ls --color=never # ls --color=auto # ls --color=always ![ls Colorful Output](http://www.tecmint.com/wp-content/uploads/2014/09/ls-colorful-output.gif) -ls的输出颜色 + +*ls的输出颜色* ### 14. 假如只需要列出目录本身,而不是目录的内容,你会如何做?### @@ -154,9 +167,10 @@ ls的输出颜色 # ls -d ![List Directory Entries](http://www.tecmint.com/wp-content/uploads/2014/09/List-Directory-Entries.gif) -列出目录本身 -### 15. 为长格式列表命令"ls -l"创建别名“ll”,并将其结果输出到一个文件而不是标准输出中。### +*列出目录本身* + +### 15. 为长格式列表命令"ls -l"创建一个别名“ll”,并将其结果输出到一个文件而不是标准输出中。### 答:在上述的这个场景中,我们需要将别名添加到.bashrc文件中,然后使用重定向操作符将输出写入到文件而不是标准输出中。我们将会使用编辑器nano。 @@ -166,13 +180,14 @@ ls的输出颜色 # nano ll.txt ![Create Alias for ls command](http://www.tecmint.com/wp-content/uploads/2014/09/Create-ls-Alias.gif) -为ls命令创建别名。 + +*为ls命令创建别名。* 先到此为止,别忘了在下面的评论中提出你们的宝贵意见,我会再次带着另外的有趣的文章在此闪亮登场。 ### 参考阅读:### -- [10 个‘ls’命令的面试问题-第二部分][1] +- [10 个‘ls’命令的面试问题(二)][1] - [Linux中15个基础的'ls'命令][2] -------------------------------------------------------------------------------- @@ -187,4 +202,4 @@ via: http://www.tecmint.com/ls-command-interview-questions/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/ls-interview-questions/ -[2]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ +[2]:http://linux.cn/article-5109-1.html From 5226789354a73a7c6e470572042550620152d8c8 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 14:45:27 +0800 Subject: [PATCH 0668/2517] PUB:20150309 10 Useful 'ls' Command Interview Questions--Part 2 @theo-l --- ...ls' Command Interview Questions--Part 2.md | 109 ++++++++++-------- 1 file changed, 62 insertions(+), 47 deletions(-) rename {translated/tech => published}/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md (56%) diff --git a/translated/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md b/published/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md similarity index 56% rename from translated/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md rename to published/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md index f2cd020692..a166b8d36d 100644 --- a/translated/tech/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md +++ b/published/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md @@ -1,154 +1,169 @@ -10个有用的‘ls’命令面试问题-第二部分 +10 个‘ls’命 令面试的问题(二) ================================================================================ -这是关于文件列表命令的第二篇文章,继续探讨‘ls’命令的其他方面。该系列的第一篇文章收到了Tecmint社区的高度关注,如果你错过了该系列的第一部分,你可能会访问以下地址: +这是关于文件列表命令的第二篇文章,继续探讨‘ls’命令的其他方面。该系列的第一篇文章受到了社区的高度关注,如果你错过了该系列的第一部分,可以访问以下地址: -- [15 Interview Questions on “ls” Command – Part 1][1] +- [15 个‘ls’命令的面试问题(一)][1] 这篇文章通过样例来很好地展现‘ls’命令的深入应用,我们加倍小心地来写这篇文章来保持其简洁可理解性,同时又能提供最全面的服务。 ![10 Interview Questions on ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-Command-Interview-Questions.jpg) -10 Interview Questions on ls Command -### 1. 假如你想要以长列表的形式列出目录中的内容,但是不打印文件创建者名称以及文件所属组。同时在输出中显示其不同之处。### +*10 ‘ls’ 命令面试的问题* + +### 16. 假如你想要以长列表的形式列出目录中的内容,但是不打印文件创建者名称以及文件所属组。看看输出有何不同之处。### a. ls 命令在与‘-l’选项一起使用时会将文件以长列表格式输出。 # ls -l ![List Files in- Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-inLong-List-Format.gif) -List Files in- Long List Format + +*以长格式列出文件* b. ls 命令在与‘-l’和‘--author’一起使用时,会将文件以长列表格式输出并带有文件创建者的名称信息。 # ls -l --author ![List Files By Author](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-By-Author.gif) -List Files By Author + +*列出文件的创建者* c. ls 命令在与‘-g’选项 一起将会列出文件名但是不带属主名称。 # ls -g ![List Files Without Printing Owner Name](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Printing-Author.gif) -List Files Without Printing Owner Name -d. ls 命令在与'-G'和‘-l’选项一起将会使用长列表格式列出文件名称带式不带文件所属组名称。 +*列出文件但不列出属主* + +d. ls 命令在与'-G'和‘-l’选项一起将会使用长列表格式列出文件名称但是不带文件所属组名称。 + # ls -Gl ![List Files Without Printing Group](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Printing-Group.gif) -List Files Without Printing Group -### 2. 使用用户友好的格式打印出当前目录中的文件以及文件夹的大小,你会如何做?### +*列出文件但是不列出所属组* + +### 17. 使用易读格式打印出当前目录中的文件以及文件夹的大小,你会如何做?### + +这里我们需要使用'-h'选项(人类可阅读的、易读的)同‘-l’或‘-s’选项与ls命令一起使用来得到想要的输出。 -这里我们需要使用'-h'选项(人类可阅读的)同‘-l’或‘-s’选项与ls命令一起使用来得到想要的输出。 # ls -hl ![List Files in Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-Size-of-Files-with-ls.gif) -List Files in Human Readable Format + +*以易读格式的长列表列出文件* # ls -hs ![List File Sizes in Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/List-File-Sizes-in-Readable-Format.gif) -List File Sizes in Long List Format + +*以易读格式的短列表列出文件* **注意**: ‘-h’选项使用1024(计算机中的标准)的幂,文件或文件夹的大小分别以K,M和G作为输出单位。 -### 3. 既然‘-h’选项是使用1024的幂作为标准来输出大小,那么ls命令还支持其他的幂值呢?### +### 18. 既然‘-h’选项是使用1024的幂作为标准来输出大小,那么ls命令是否还支持其他的幂值呢?### -存在一个选项 ‘-si’与选项‘-h’相似,不同之处在于前者以使用1000的幂,后者使用1024的幂。 +存在一个选项 ‘--si’与选项‘-h’相似,不同之处在于前者以使用1000的幂,后者使用1024的幂。 - # ls -si + # ls --si -![Supported Power Values of ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-supported-power-values.gif) -Supported Power Values of ls Command +所以'--si'也可以与‘-l’选项一起使用来按照1000的幂来输出文件夹的大小,并且以长列表格式显示。 -所以'-si'也可以与‘-l’选项一起使用来按照1000的幂来输出文件夹的大小,并且以长列表格式显示。 + # ls --si -l - # ls -si -l +(LCTT 译注:此处原文参数有误,附图也不对,因此删除之) -![List Files by Power Values](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-by-Power-Values.gif) -List Files by Power Values +### 19. 假如要你使用逗号‘,’作为分隔符来打印一个目录中的内容,可以吗? 对于长列表形式也可行吗?### -### 4. 假如要你使用逗号‘,’作为分隔符来打印一个目录中的内容,可以吗? 对于长列表形式也可行吗?### - -当然!linux的ls命令当与其选项‘-m’一起使用时可以在打印目录内容时以逗号‘,’分割。由于逗号分割的内容是水平填充的,ls命令不能在垂直列出内容时使用逗号来分割内容。 +当然!linux的ls命令当与其选项‘-m’一起使用时可以在打印目录内容时以逗号‘,’分割。由于逗号分割的内容是水平填充的,ls命令不能在垂直列出内容时使用逗号来分割内容。 # ls -m ![Print Contents of Directory by Comma](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Contents-of-Directory-by-Comma.gif) -Print Contents of Directory by Comma + +*以逗号分隔显示内容* 当使用长列表格式时,‘-m’选项就没有什么效果了。 # ls -ml ![Listing Content Horizontally](http://www.tecmint.com/wp-content/uploads/2015/03/Listing-Content-Horizentally.gif) -Listing Content Horizontally -### 5. 有办法将目录的内容逆序打印出来吗?### +*长列表不能使用逗号分隔列表* + +### 20. 有办法将目录的内容逆序打印出来吗?### 可以!上面的情形可以轻松地通过'-r'选项搞定,该选项将输出顺序倒置。这个选项也可以与‘-l’选项一起使用。 # ls -r ![List Content in Reverse Order](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-in-Reverse-Order.gif) -List Content in Reverse Order + +*逆序列出* # ls -rl ![Long List Content in Reverse Order](http://www.tecmint.com/wp-content/uploads/2015/03/Long-List-Content-in-Reverse-Order.gif) -Long List Content in Reverse Order -### 6. 如果你被分配一个任务,来递归地打印各个子目录,你会如何应付?注意哟,只针对子目录而不是文件哦。### +*逆序长列表* + +### 21. 如果你被分配一个任务,来递归地打印各个子目录,你会如何应付?注意,只针对子目录而不是文件哦。### 小意思!使用“-R”选项就可以轻轻松松拿下,它也可以更进一步地与其他选项如‘-l’和‘-m’选项等组合使用。 + # ls -R ![Print Sub Directories in Recursively](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Sub-Directories-in-Recursively.gif) -Print Sub Directories in Recursively -### 7. 如何按照文件大小对其进行排序?### +*递归列出子目录* + +### 22. 如何按照文件大小对其进行排序?### linux命令行选项'-S'赋予了ls命令这个超能力。按照文件大小从大到小的顺序排序: # ls -S ![Sort Files with ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Files-in-Linux.gif) -Sort Files with ls Command +*按文件大小排序* 按照文件大小从小到大的顺序排序。 # ls -Sr ![Sort Files in Descending Order](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Files-in-Descending-Order.gif) -Sort Files in Descending Order -### 8. 列出目录中的内容按照一行一个文件并且不带额外信息的方式 ### +*从小到大的排序* -选项‘-l’在此可以解决这个问题,使用‘-l’选项来使用ls命令可以将目录中的内容按照一行一个文件并且不带额外信息的方式进行输出。 +### 23. 按照一行一个文件列出目录中的内容,并且不带额外信息的方式 ### + +选项‘-1’在此可以解决这个问题,使用‘-1’选项来使用ls命令可以将目录中的内容按照一行一个文件并且不带额外信息的方式进行输出。 # ls -1 ![List Files Without Information](http://www.tecmint.com/wp-content/uploads/2015/03/List-Files-Without-Information.gif) -List Files Without Information -### 9. 现在委派给你一个任务,你必须将目录中的内容输出到终端而且需要使用双引号引起来,你会如何做?### +*不带其他信息,一行一个列出文件* -存在一个选项‘-Q’会将ls命令的输出内容用双引号引起来。 +### 24. 现在委派给你一个任务,你必须将目录中的内容输出到终端而且需要使用双引号引起来,你会如何做?### + +有一个选项‘-Q’会将ls命令的输出内容用双引号引起来。 # ls -Q ![Print Files with Double Quotes](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Files-with-Double-Quotes.gif) -Print Files with Double Quotes -### 10. 想象一下你正在与一个包含有很多文件和文件夹的目录打交道,你需要使目录名显示在文件名之前,你如何做?### +*输出的文件名用引号引起来* + +### 25. 想象一下你正在与一个包含有很多文件和文件夹的目录打交道,你需要使目录名显示在文件名之前,你如何做?### # ls --group-directories-first ![Print Directories First](http://www.tecmint.com/wp-content/uploads/2015/03/Print-Directories-First.gif) -Print Directories First -先点到为止,我们会马上提供该系列文章的下一部分。别换频道,关注Tecmint。 另外别忘了在下面的评论中提出你们宝贵的反馈信息,喜欢就分享,帮助我们得到更好的传播吧! +*目录优先显示* + +先点到为止,我们会马上提供该系列文章的下一部分。别换频道,关注我们。 另外别忘了在下面的评论中提出你们宝贵的反馈信息,喜欢就分享,帮助我们得到更好的传播吧! -------------------------------------------------------------------------------- @@ -156,9 +171,9 @@ via: http://www.tecmint.com/ls-interview-questions/ 作者:[Ravi Saive][a] 译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/admin/ -[1]:http://www.tecmint.com/ls-command-interview-questions/ +[1]:http://linux.cn/article-5349-1.html From c6869763159dbca1c2af22c84131fe3caf5f7d1d Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 21:07:42 +0800 Subject: [PATCH 0669/2517] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--3 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--3.md | 108 +++++++++++------- 1 file changed, 66 insertions(+), 42 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md (74%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md similarity index 74% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md index b3630b5aa5..318d38b03c 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md @@ -1,4 +1,4 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--3 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(三) ================================================================================ ### 12. 安装 Apache Tomcat ### @@ -7,7 +7,8 @@ Tomcat 是由 Apache 设计的用来运行 Java HTTP web 服务器的 servlet # yum install tomcat ![安装 Apache Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-Tomcat.jpeg) -安装 Apache Tomcat + +*安装 Apache Tomcat* 安装完 tomcat 之后,启动 tomcat 服务。 @@ -18,11 +19,12 @@ Tomcat 是由 Apache 设计的用来运行 Java HTTP web 服务器的 servlet # /usr/sbin/tomcat version ![查看 tomcat 版本](http://www.tecmint.com/wp-content/uploads/2015/04/Check-tomcat-version.jpeg) -查看 tomcat 版本 + +*查看 tomcat 版本* 允许 tomcat 服务和默认端口(8080) 通过防火墙并重新加载设置。 - # firewall-cmd –zone=public –add-port=8080/tcp --permannet + # firewall-cmd –zone=public –add-port=8080/tcp --permanent # firewall-cmd –reload 现在该保护 tomcat 服务器了,添加一个用于访问和管理的用户和密码。我们需要编辑文件 ‘/etc/tomcat/tomcat-users.xml’。查看类似下面的部分: @@ -32,7 +34,7 @@ Tomcat 是由 Apache 设计的用来运行 Java HTTP web 服务器的 servlet - + @@ -42,44 +44,48 @@ Tomcat 是由 Apache 设计的用来运行 Java HTTP web 服务器的 servlet ![保护 Tomcat](http://www.tecmint.com/wp-content/uploads/2015/04/Secure-Tomcat.jpeg) -保护 Tomcat -我们在这里添加用户 “tecmint” 到 tomcat 的管理员/管理 组中,使用 “tecmint” 作为密码。先停止在启动 tomcat 服务以使更改生效,并添加 tomcat 服务到随系统启动。 +*保护 Tomcat* + +我们在这里添加用户 “tecmint” 到 tomcat 的管理员/管理组中,使用 “tecmint” 作为密码。先停止再启动 tomcat 服务以使更改生效,并添加 tomcat 服务到随系统启动。 # systemctl stop tomcat # systemctl start tomcat # systemctl enable tomcat.service -请阅读: 在 RHEL/CentOS 7.0/6.x 中安装和配置 Apache Tomcat 8.0.9 +请阅读: [在 RHEL/CentOS 7.0/6.x 中安装和配置 Apache Tomcat 8.0.9][5] ### 13. 安装 Nmap 监视开放端口 ### -Nmap 网络映射器通过检查运行它的主机以及分析网络创建一个网络映射。nmap 并没有默认安装,你需要从库中安装它。 +Nmap 网络映射器用来分析网络,通过运行它可以发现网络的映射关系。nmap 并没有默认安装,你需要从库中安装它。 # yum install nmap ![安装 Nmap 监视工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Nmap.jpeg) -安装 Nmap 监视工具 + +*安装 Nmap 监视工具* 列出主机中所有的开放端口以及对应使用它们的服务。 # namp 127.0.01 !监视开放端口](http://www.tecmint.com/wp-content/uploads/2015/04/Monitor-Open-Ports.jpeg) -监视开放端口 + +*监视开放端口* 你也可以使用 firewall-cmd 列出所有端口,但我发现 nmap 更有用。 # firewall-cmd –list-ports ![在防火墙中检查开放端口](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Open-Ports-in-Firewall.jpeg) -在防火墙中检查开放端口 + +*在防火墙中检查开放端口* 请阅读: [Nmap 监视开放端口的 29 个有用命令][1] ### 14. 配置 FirewallD ### -firewalld 是动态管理服务器的防火墙服务。在 CentOS 7 中 Firewalld 移除了 iptables。在红帽企业版 Linux 和它的衍生版中默认安装了 Firewalld。如果有 iptables 的话为了使每个更改生效需要清空所有旧的规则然后创建新规则。 +firewalld 是动态管理服务器的防火墙服务。在 CentOS 7 中 Firewalld 移除了 iptables 服务。在红帽企业版 Linux 和它的衍生版中默认安装了 Firewalld。如果有 iptables 的话为了使每个更改生效需要清空所有旧的规则然后创建新规则。 然而用firewalld,不需要清空并重新创建新规则就可以实现更改生效。 @@ -90,59 +96,66 @@ firewalld 是动态管理服务器的防火墙服务。在 CentOS 7 中 Firewall # firewall-cmd –state ![检查 Firewalld 状态](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Status.jpeg) -检查 Firewalld 状态 + +*检查 Firewalld 状态* 获取所有的区域列表。 # firewall-cmd --get-zones ![检查 Firewalld 区域](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Firewalld-Zones.jpeg) -检查 Firewalld 区域 + +*检查 Firewalld 区域* 在切换之前先获取区域的详细信息。 # firewall-cmd --zone=work --list-all ![检查区域详情](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Zone-Details.jpeg) -检查区域详情 + +*检查区域详情* 获取默认区域。 # firewall-cmd --get-default-zone ![Firewalld 默认区域](http://www.tecmint.com/wp-content/uploads/2015/04/Firewalld-Default-Zone.jpeg) -Firewalld 默认区域 + +*Firewalld 默认区域* 切换到另一个区域,比如 ‘work’。 # firewall-cmd --set-default-zone=work ![切换 Firewalld 区域](http://www.tecmint.com/wp-content/uploads/2015/04/Swich-Zones.jpeg) -切换 Firewalld 区域 + +*切换 Firewalld 区域* 列出区域中的所有服务。 # firewall-cmd --list-services ![列出 Firewalld 区域的服务](http://www.tecmint.com/wp-content/uploads/2015/04/List-Firewalld-Service.jpeg) -列出 Firewalld 区域的服务 + +*列出 Firewalld 区域的服务* 添加临时服务,比如 http,然后重载 firewalld。 # firewall-cmd --add-service=http # firewall-cmd –reload -添加临时 http 服务 +![添加临时 http 服务](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Temporarily.jpeg) -添加临时 http 服务 +*添加临时 http 服务* 添加永久服务,比如 http,然后重载 firewalld。 -# firewall-cmd --add-service=http --permanent -# firewall-cmd --reload + # firewall-cmd --add-service=http --permanent + # firewall-cmd --reload ![添加永久 http 服务](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Temporarily.jpeg) -添加永久 http 服务 + +*添加永久 http 服务* 删除临时服务,比如 http。 @@ -150,7 +163,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![删除临时 Firewalld 服务](http://www.tecmint.com/wp-content/uploads/2015/04/Add-http-Service-Permanent.jpeg) -删除临时 Firewalld 服务 + +*删除临时 Firewalld 服务* 删除永久服务,比如 http @@ -158,7 +172,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![删除永久服务](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Service-Parmanently.jpeg) -删除永久服务 + +*删除永久服务* 允许一个临时端口(比如 331)。 @@ -166,7 +181,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![打开临时 Firewalld 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Temporarily.jpeg) -打开临时端口 + +*打开临时端口* 允许一个永久端口(比如 331)。 @@ -174,7 +190,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![打开永久 Firewalld 端口](http://www.tecmint.com/wp-content/uploads/2015/04/Open-Port-Permanent.jpeg) -打开永久端口 + +*打开永久端口* 阻塞/移除临时端口(比如 331)。 @@ -182,7 +199,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![移除 Firewalld 临时端口](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Temporarily.jpeg) -移除临时端口 + +*移除临时端口* 阻塞/移除永久端口(比如 331)。 @@ -190,7 +208,8 @@ Firewalld 默认区域 # firewall-cmd --reload ![移除 Firewalld 永久端口](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Port-Permanently.jpeg) -移除永久端口 + +*移除永久端口* 停用 firewalld。 @@ -199,7 +218,8 @@ Firewalld 默认区域 # firewall-cmd --state ![在 CentOS 7 中停用 Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Disable-Firewalld.jpeg) -停用 Firewalld 服务 + +*停用 Firewalld 服务* 启用 firewalld。 @@ -208,33 +228,36 @@ Firewalld 默认区域 # firewall-cmd --state ![在 CentOS 7 中取消 Firewalld](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Firewalld.jpeg) -启用 Firewalld + +*启用 Firewalld* - [如何在 RHEL/CentOS 7 中配置 ‘Firewalld’][2] - [配置和管理 Firewalld 的有用 ‘Firewalld’ 规则][3] ### 15. 安装 Wget ### -Wget 是基于 Linux 命令行从 web 服务器获取(下载)内容的工具。它是你使用 wget 命令获取 web 内容或下载任何文件必须要有的重要工具。 +Wget 是从 web 服务器获取(下载)内容的命令行工具。它是你使用 wget 命令获取 web 内容或下载任何文件必须要有的重要工具。 # yum install wget ![安装 Wget 工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Wget.png) -安装 Wget 工具 + +*安装 Wget 工具* 关于在终端中如何使用 wget 命令下载文件的方法和实际例子,请阅读[10 个 Wget 命令例子][4]。 -### 16. 安装 Telnet ### +### 16. 安装 Telnet 客户端### -Telnet 是通过 TCP/IP 允许用户登录到相同网络上的另一台计算机的网络协议。和远程计算机的连接建立后,它就成为了一个允许你在自己的计算机上用所有提供给你的权限和远程主机交互的虚拟终端。 +Telnet 是通过 TCP/IP 允许用户登录到相同网络上的另一台计算机的网络协议。和远程计算机的连接建立后,它就成为了一个允许你在自己的计算机上用所有提供给你的权限和远程主机交互的虚拟终端。(LCTT 译注:除非你真的需要,不要安装 telnet 服务,也不要用 telnet 客户端连接另外一个 telnet 服务,因为 telnet 是明文传输的。不过如下用 telnet 客户端检测另外一个服务的端口是否工作是常用的操作。) Telnet 对于检查远程计算机或主机的监听端口也非常有用。 # yum install telnet # telnet google.com 80 -![检查 Telnet 端口](http://www.tecmint.com/wp-content/uploads/2015/04/telnet-testing.png) -检查 Telnet 端口 +![Telnet 端口检查](http://www.tecmint.com/wp-content/uploads/2015/04/telnet-testing.png) + +*Telnet 端口检查* -------------------------------------------------------------------------------- @@ -242,12 +265,13 @@ via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installatio 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/nmap-command-examples/ -[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ +[1]:http://linux.cn/article-2561-1.html +[2]:http://linux.cn/article-4425-1.html [3]:http://www.tecmint.com/firewalld-rules-for-centos-7/ -[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file +[4]:http://linux.cn/article-4129-1.html +[5]:http://www.tecmint.com/install-apache-tomcat-in-centos/ \ No newline at end of file From 642e1881a52bd9409915fd807d287e6e295a311e Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Apr 2015 22:17:19 +0800 Subject: [PATCH 0670/2517] PUB:20150215 How to analyze and view Apache web server logs interactively on Linux @disylee --- ... web server logs interactively on Linux.md | 144 +++++++++++++++ ... web server logs interactively on Linux.md | 167 ------------------ 2 files changed, 144 insertions(+), 167 deletions(-) create mode 100644 published/20150215 How to analyze and view Apache web server logs interactively on Linux.md delete mode 100644 translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md diff --git a/published/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/published/20150215 How to analyze and view Apache web server logs interactively on Linux.md new file mode 100644 index 0000000000..06a32d3fcb --- /dev/null +++ b/published/20150215 How to analyze and view Apache web server logs interactively on Linux.md @@ -0,0 +1,144 @@ +在 Linux 中以交互方式实时查看Apache web访问统计 +================================================================================ + +无论你是在网站托管业务,还是在自己的VPS上运行几个网站,你总会有需要显示访客统计信息,例如前几的访客、访问请求的文件(无论动态或者静态)、所用的带宽、客户端的浏览器,和访问的来源网站,等等。 + +[GoAccess][1] 是一款用于Apache或者Nginx的命令行日志分析器和交互式查看器。使用这款工具,你不仅可以浏览到之前提及的相关数据,还可以通过分析网站服务器日志来进一步挖掘数据 - 而且**这一切都是在一个终端窗口实时输出的**。由于今天的[大多数web服务器][2]都使用Debian的衍生版或者基于RedHat的发行版来作为底层操作系统,所以本文中我告诉你如何在Debian和CentOS中安装和使用GoAccess。 + +### 在Linux系统安装GoAccess ### + +在Debian,Ubuntu及其衍生版本,运行以下命令来安装GoAccess: + + # aptitude install goaccess + +在CentOS中,你将需要使你的[EPEL 仓库][3]可用然后执行以下命令: + + # yum install goaccess + +在Fedora,同样使用yum命令: + + # yum install goaccess + + +如果你想从源码安装GoAccess来使用更多功能(例如 GeoIP 定位功能),需要在你的操作系统安装[必需的依赖包][4],然后按以下步骤进行: + + # wget http://tar.goaccess.io/goaccess-0.8.5.tar.gz + # tar -xzvf goaccess-0.8.5.tar.gz + # cd goaccess-0.8.5/ + # ./configure --enable-geoip + # make + # make install + +以上安装的版本是 0.8.5,但是你也可以在该软件的网站[下载页][5]确认是否是最新版本。 + +由于GoAccess不需要后续的配置,一旦安装你就可以马上使用。 + +### 运行 GoAccess ### + +开始使用GoAccess,只需要对它指定你的Apache访问日志。 + +对于Debian及其衍生版本: + + # goaccess -f /var/log/apache2/access.log + +基于红帽的发行版: + + # goaccess -f /var/log/httpd/access_log + +当你第一次启动GoAccess,你将会看到如下的屏幕中选择日期和日志格式。正如前面所述,你可以按空格键进行选择,并按F10确认。至于日期和日志格式,你可能需要参考[Apache 文档][6]来刷新你的记忆。 + +在这个例子中,选择常见日志格式(Common Log Format(CLF)): + +![](https://farm8.staticflickr.com/7422/15868350373_30c16d7c30.jpg) + +然后按F10 确认。你将会从屏幕上看到统计数据。为了简洁起见,这里只显示了首部,也就是日志文件的摘要,如下图所示: + +![](https://farm9.staticflickr.com/8683/16486742901_7a35b5df69_b.jpg) + +### 通过 GoAccess来浏览网站服务器统计数据 ### + +你可以按向下的箭头滚动页面,你会发现以下区域,它们是按请求排序的。这里提及的目录顺序可能会根据你的发行版或者你所选的安装方式(从源和库)不同而不同: + +1. 每天唯一访客(来自同样IP、同一日期和同一浏览器的请求被认为是是唯一访问) + + ![](https://farm8.staticflickr.com/7308/16488483965_a439dbc5e2_b.jpg) + +2. 请求的文件(网页URL) + + ![](https://farm9.staticflickr.com/8651/16488483975_66d05dce51_b.jpg) + +3. 请求的静态文件(例如,.png文件,.js文件等等) + +4. 来源的URLs(每一个URL请求的出处) + +5. HTTP 404 未找到的响应代码 + + ![](https://farm9.staticflickr.com/8669/16486742951_436539b0da_b.jpg) + +6. 操作系统 + +7. 浏览器 + +8. 主机地址(客户端IP地址) + + ![](https://farm8.staticflickr.com/7392/16488483995_56e706d77c_z.jpg) + +9. HTTP 状态代码 + + ![](https://farm8.staticflickr.com/7282/16462493896_77b856f670_b.jpg) + +10. 前几位的来源站点 + +11. 来自谷歌搜索引擎的前几位的关键字 + +如果你想要检查已经存档的日志,你可以通过管道将它们发送给GoAccess,如下: + +在Debian及其衍生版本: + + # zcat -f /var/log/apache2/access.log* | goaccess + +在基于红帽的发行版: + + # cat /var/log/httpd/access* | goaccess + +如果你需要上述部分的详细报告(1至11项),直接按下其序号再按O(大写o),就可以显示出你需要的详细视图。下面的图像显示5-O的输出(先按5,再按O) + +![](https://farm8.staticflickr.com/7382/16302213429_48d9233f40_b.jpg) + +如果要显示GeoIP位置信息,打开主机部分的详细视图,如前面所述,你将会看到正在请求你的服务器的客户端IP地址所在的位置。 + +![](https://farm8.staticflickr.com/7393/16488484075_d778aa91a2_z.jpg) + +如果你的系统还不是很忙碌,以上提及的章节将不会显示大量的信息,但是这种情形可以通过在你网站服务器越来越多的请求发生改变。 + +### 保存用于离线分析的报告 ### + +有时候你不想每次都实时去检查你的系统状态,可以保存一份在线的分析文件或打印出来。要生成一个HTML报告,只需要通过之前提到GoAccess命令,将输出来重定向到一个HTML文件即可。然后,用web浏览器来将这份报告打开即可。 + + # zcat -f /var/log/apache2/access.log* | goaccess > /var/www/webserverstats.html + +一旦报告生成,你将需要点击展开的链接来显示每个类别详细的视图信息: + +![](https://farm9.staticflickr.com/8658/16486743041_bd8a80794d_o.png) + +可以查看youtube视频:https://youtu.be/UVbLuaOpYdg 。 + +正如我们通过这篇文章讨论,GoAccess是一个非常有价值的工具,它能给系统管理员实时提供可视的HTTP 统计分析。虽然GoAccess的默认输出是标准输出,但是你也可以将他们保存到JSON,HTML或者CSV文件。这种转换可以让 GoAccess在监控和显示网站服务器的统计数据时更有用。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html + +作者:[Gabriel Cánepa][a] +译者:[disylee](https://github.com/disylee) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:http://goaccess.io/ +[2]:http://w3techs.com/technologies/details/os-linux/all/all +[3]:http://linux.cn/article-2324-1.html +[4]:http://goaccess.io/download#dependencies +[5]:http://goaccess.io/download +[6]:http://httpd.apache.org/docs/2.4/logs.html diff --git a/translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md deleted file mode 100644 index 51ad96d272..0000000000 --- a/translated/tech/20150215 How to analyze and view Apache web server logs interactively on Linux.md +++ /dev/null @@ -1,167 +0,0 @@ -如何在Linux中以交互方式分析和查看Apache web服务器日志? -================================================================================ - -无论你是在网站托管业务,还是在自己的VPS上运行几个网站,你总会有机会想要显示访客数量例如前几的房客,请求使用的文件(无论是动态或者是静态),带宽的使用,客户端的浏览器,和相关的网站,等等。 - - -[GoAccess][1] 是一款用于Apache或者Nginx命令行日志分析和交互式查看器。有了这款工具,你不仅可以浏览到之前提及的相关数据,还可以分析网站服务器日志来进一步挖掘数据 - 然而 **这一切都可以在一个终端窗口实时输出**.由于今天的[大多数web服务器][2]使用一个Debian的衍生版或者基于红帽发行版来作为底层操作系统,我将会告诉你如何在Debian和CentOS中安装和使用GoAccess。 - - -### 在Linux系统安装GoAccess ### - - -在Debian,Ubuntu及其衍生版本,运行一下命令来安装GoAccess: - - # aptitude install goaccess - -在CentOS中,你将需要使你的[EPEL 仓库][3]可用然后执行以下命令: - - # yum install goaccess - -在Fedora,同样使用yum命令: - - # yum install goaccess - - -如果你想从源码安装GoAccess来使后续的功能可用(例如 GeoIP 的位置),为你的操作系统安装[必需的依赖包][4],按以下步骤进行: - - # wget http://tar.goaccess.io/goaccess-0.8.5.tar.gz - # tar -xzvf goaccess-0.8.5.tar.gz - # cd goaccess-0.8.5/ - # ./configure --enable-geoip - # make - # make install - - -以上安装的版本是 0.8.5,但是你也可以在该软件的网站[下载页][5]确认是否是最新版本。 - - -由于GoAccess不需要后续的配置,一旦安装你就可以马上使用。 - - -### 运行 GoAccess ### - -开始使用GoAccess,只需要对它运行你的Apache访问日志。 - - -对于Debian及其衍生版本: - - # goaccess -f /var/log/apache2/access.log - - -基于红帽的发型版本: - - # goaccess -f /var/log/httpd/access_log - - -当你第一次启动GoAccess,你将会看到下方屏幕中选择日期和日志格式。正如前面所述,你可以选择在空格键和F10之间相互切换。至于日期和日志格式,你可能希望参考[Apache 文档][6]来刷新你的记忆。 - - -在这个例子中,选择常见日志格式(CLI): - -![](https://farm8.staticflickr.com/7422/15868350373_30c16d7c30.jpg) - -然后按F10.你将会从屏幕中获得统计数据。为了简约,只显示首部,也就是总结日志文件的摘要,如下图所示: - - -![](https://farm9.staticflickr.com/8683/16486742901_7a35b5df69_b.jpg) - -### 通过 GoAccess来浏览网站服务器统计数据 ### - -当你通过向下的剪头滚动页面,你会发现一下章节,按要求进行排序。这里提及的目录顺序可能会根据你的发型版本或者(从源和库)首选的安装方式: - -1. 每天唯一访客(具有同样IP,同一日期和统一代理被认为是) - -![](https://farm8.staticflickr.com/7308/16488483965_a439dbc5e2_b.jpg) - -2. 请求的文件(网页URL) - - -![](https://farm9.staticflickr.com/8651/16488483975_66d05dce51_b.jpg) - -3. 请求的静态文件(例如,.png文件,.js文件等等) - -4. 请求的URLs(每一个URL请求的出处) - -5. HTTP 404 不能找到响应的代码 - -![](https://farm9.staticflickr.com/8669/16486742951_436539b0da_b.jpg) - -6. 操作系统 - -7. 浏览器 - -8. 主机(客户端IP地址) - -![](https://farm8.staticflickr.com/7392/16488483995_56e706d77c_z.jpg) - -9. HTTP 状态代码 - -![](https://farm8.staticflickr.com/7282/16462493896_77b856f670_b.jpg) - -10. 前几位的推荐站点 - -11. 在谷歌的搜索引擎使用的排名在前的关键字 - - -如果你还想检查已经存档的日志,你可以在GoAccess通过使用管道符号如下。 - -在Debian及其衍生版本: - - # zcat -f /var/log/apache2/access.log* | goaccess - -在基于红帽的发型版本: - - # cat /var/log/httpd/access* | goaccess - - -如果你需要任何更多关于以上的详细报告(1至11项),直接按下章节序号再按O(大写o),就可以显示出你需要的详细视图。下面的图像显示5-O的输出(先按5,再按O) - -![](https://farm8.staticflickr.com/7382/16302213429_48d9233f40_b.jpg) - - -如果要现实GeoIP位置信息,打开详细视图的主机部分,如前面所述,你将会看到客户端IP地址所在的位置以及显示web服务器的请求。 - - -![](https://farm8.staticflickr.com/7393/16488484075_d778aa91a2_z.jpg) - - -如果你的系统还尚未达到很忙碌的状态,以上提及的章节将不会显示大量的信息,但是这种情形可以通过在你网站服务器越来越多的请求发生改变。 - -### 在线保存分析的报告 ### - - -当然有时候你不想每次都实时去检查你的系统状态,但是保存一份在线的分析文件或者打印版是由必要的。要生成一个HTML报告,只需要通过之前提到GoAccess命令输出来简单地重定向道一个HTML文件。然后,你只需通过web浏览器来将这份报告打开即可。 - - - - # zcat -f /var/log/apache2/access.log* | goaccess > /var/www/webserverstats.html - - -一旦报告生成,你将需要点击展开的链接来显示每个类别详细的视图信息: - -![](https://farm9.staticflickr.com/8658/16486743041_bd8a80794d_o.png) - -注释:youtube视频 - - - -正如我们通过这篇文章讨论,GoAccess是一个非常可贵的工具,它提供给作为百忙之中的系统管理员一份HTTP统计的静态可是报告。虽然GoAccess默认其输出结果为标准输出,但是你也可以将他们保存到JSON,HTML或者CSV文件。这样的转换,GoAccess将作为一个非常有用的工具来监控和显示网站服务器的统计数据。 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html - -作者:[Gabriel Cánepa][a] -译者:[disylee](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/gabriel -[1]:http://goaccess.io/ -[2]:http://w3techs.com/technologies/details/os-linux/all/all -[3]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[4]:http://goaccess.io/download#dependencies -[5]:http://goaccess.io/download -[6]:http://httpd.apache.org/docs/2.4/logs.html From b4ed95c3e83b69a24c46fdf2c5b3e8fcfced0b42 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 28 Apr 2015 22:44:54 +0800 Subject: [PATCH 0671/2517] [Translating] tech/20150108 Interface (NICs) Bonding in Linux using nmcli --- .../20150108 Interface (NICs) Bonding in Linux using nmcli.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md b/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md index fa02f19ce6..41eee7a86f 100644 --- a/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md +++ b/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md @@ -1,3 +1,4 @@ +Translating by ictlyh Interface (NICs) Bonding in Linux using nmcli ================================================================================ Today, we'll learn how to perform Interface (NICs) bonding in our CentOS 7.x using nmcli (Network Manager Command Line Interface). From c2ebd5809c556fec2eeb3d85dbded027f2f8b2cb Mon Sep 17 00:00:00 2001 From: KS Date: Wed, 29 Apr 2015 09:57:23 +0800 Subject: [PATCH 0672/2517] Update 20141013 Compact Text Editors Great for Remote Editing and Much More.md --- ...pact Text Editors Great for Remote Editing and Much More.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md index 401a4da2fc..21b0756b9a 100644 --- a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md +++ b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md @@ -1,3 +1,4 @@ +wyangsun翻译中 Compact Text Editors Great for Remote Editing and Much More ================================================================================ A text editor is software used for editing plain text files. This type of software has many different uses including modifying configuration files, writing programming language source code, jotting down thoughts, or even making a grocery list. Given that editors can be used for such a diverse range of activities, it is worth spending the time finding an editor that best suites your preferences. @@ -216,4 +217,4 @@ via: http://www.linuxlinks.com/article/20141011073917230/TextEditors.html [2]:http://www.vim.org/ [3]:http://ne.di.unimi.it/ [4]:http://www.gnu.org/software/zile/ -[5]:http://nano-editor.org/ \ No newline at end of file +[5]:http://nano-editor.org/ From f869d942b1d6881fddb89dc2c21e17a70b5ee872 Mon Sep 17 00:00:00 2001 From: royaso Date: Wed, 29 Apr 2015 10:57:30 +0800 Subject: [PATCH 0673/2517] =?UTF-8?q?=E6=8E=A8=E8=8D=90=E7=BF=BB=E8=AF=91:?= =?UTF-8?q?web=20caching=20basics=20terminology=20http=20headers=20and=20c?= =?UTF-8?q?aching=20strategies.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ogy http headers and caching strategies.md | 444 ++++++++++++++++++ 1 file changed, 444 insertions(+) create mode 100644 sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md diff --git a/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md new file mode 100644 index 0000000000..df0eb8b723 --- /dev/null +++ b/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md @@ -0,0 +1,444 @@ +Web Caching Basics: Terminology, HTTP Headers, and Caching Strategies +===================================================================== + +### Introduction + +Intelligent content caching is one of the most effective ways to improve +the experience for your site's visitors. Caching, or temporarily storing +content from previous requests, is part of the core content delivery +strategy implemented within the HTTP protocol. Components throughout the +delivery path can all cache items to speed up subsequent requests, +subject to the caching policies declared for the content. + +In this guide, we will discuss some of the basic concepts of web content +caching. This will mainly cover how to select caching policies to ensure +that caches throughout the internet can correctly process your content. +We will talk about the benefits that caching affords, the side effects +to be aware of, and the different strategies to employ to provide the +best mixture of performance and flexibility. + +What Is Caching? +---------------- + +Caching is the term for storing reusable responses in order to make +subsequent requests faster. There are many different types of caching +available, each of which has its own characteristics. Application caches +and memory caches are both popular for their ability to speed up certain +responses. + +Web caching, the focus of this guide, is a different type of cache. Web +caching is a core design feature of the HTTP protocol meant to minimize +network traffic while improving the perceived responsiveness of the +system as a whole. Caches are found at every level of a content's +journey from the original server to the browser. + +Web caching works by caching the HTTP responses for requests according +to certain rules. Subsequent requests for cached content can then be +fulfilled from a cache closer to the user instead of sending the request +all the way back to the web server. + +Benefits +-------- + +Effective caching aids both content consumers and content providers. +Some of the benefits that caching brings to content delivery are: + +- **Decreased network costs**: Content can be cached at various points + in the network path between the content consumer and content origin. + When the content is cached closer to the consumer, requests will not + cause much additional network activity beyond the cache. +- **Improved responsiveness**: Caching enables content to be retrieved + faster because an entire network round trip is not necessary. Caches + maintained close to the user, like the browser cache, can make this + retrieval nearly instantaneous. +- **Increased performance on the same hardware**: For the server where + the content originated, more performance can be squeezed from the + same hardware by allowing aggressive caching. The content owner can + leverage the powerful servers along the delivery path to take the + brunt of certain content loads. +- **Availability of content during network interruptions**: With + certain policies, caching can be used to serve content to end users + even when it may be unavailable for short periods of time from the + origin servers. + +Terminology +----------- + +When dealing with caching, there are a few terms that you are likely to +come across that might be unfamiliar. Some of the more common ones are +below: + +- **Origin server**: The origin server is the original location of the + content. If you are acting as the web server administrator, this is + the machine that you control. It is responsible for serving any + content that could not be retrieved from a cache along the request + route and for setting the caching policy for all content. +- **Cache hit ratio**: A cache's effectiveness is measured in terms of + its cache hit ratio or hit rate. This is a ratio of the requests + able to be retrieved from a cache to the total requests made. A high + cache hit ratio means that a high percentage of the content was able + to be retrieved from the cache. This is usually the desired outcome + for most administrators. +- **Freshness**: Freshness is a term used to describe whether an item + within a cache is still considered a candidate to serve to a client. + Content in a cache will only be used to respond if it is within the + freshness time frame specified by the caching policy. +- **Stale content**: Items in the cache expire according to the cache + freshness settings in the caching policy. Expired content is + "stale". In general, expired content cannot be used to respond to + client requests. The origin server must be re-contacted to retrieve + the new content or at least verify that the cached content is still + accurate. +- **Validation**: Stale items in the cache can be validated in order + to refresh their expiration time. Validation involves checking in + with the origin server to see if the cached content still represents + the most recent version of item. +- **Invalidation**: Invalidation is the process of removing content + from the cache before its specified expiration date. This is + necessary if the item has been changed on the origin server and + having an outdated item in cache would cause significant issues for + the client. + +There are plenty of other caching terms, but the ones above should help +you get started. + +What Can be Cached? +------------------- + +Certain content lends itself more readily to caching than others. Some +very cache-friendly content for most sites are: + +- Logos and brand images +- Non-rotating images in general (navigation icons, for example) +- Style sheets +- General Javascript files +- Downloadable Content +- Media Files + +These tend to change infrequently, so they can benefit from being cached +for longer periods of time. + +Some items that you have to be careful in caching are: + +- HTML pages +- Rotating images +- Frequently modified Javascript and CSS +- Content requested with authentication cookies + +Some items that should almost never be cached are: + +- Assets related to sensitive data (banking info, etc.) +- Content that is user-specific and frequently changed + +In addition to the above general rules, it's possible to specify +policies that allow you to cache different types of content +appropriately. For instance, if authenticated users all see the same +view of your site, it may be possible to cache that view anywhere. If +authenticated users see a user-sensitive view of the site that will be +valid for some time, you may tell the user's browser to cache, but tell +any intermediary caches not to store the view. + +Locations Where Web Content Is Cached +------------------------------------- + +Content can be cached at many different points throughout the delivery +chain: + +- **Browser cache**: Web browsers themselves maintain a small cache. + Typically, the browser sets a policy that dictates the most + important items to cache. This may be user-specific content or + content deemed expensive to download and likely to be requested + again. +- **Intermediary caching proxies**: Any server in between the client + and your infrastructure can cache certain content as desired. These + caches may be maintained by ISPs or other independent parties. +- **Reverse Cache**: Your server infrastructure can implement its own + cache for backend services. This way, content can be served from the + point-of-contact instead of hitting backend servers on each request. + +Each of these locations can and often do cache items according to their +own caching policies and the policies set at the content origin. + +Caching Headers +--------------- + +Caching policy is dependent upon two different factors. The caching +entity itself gets to decide whether or not to cache acceptable content. +It can decide to cache less than it is allowed to cache, but never more. + +The majority of caching behavior is determined by the caching policy, +which is set by the content owner. These policies are mainly articulated +through the use of specific HTTP headers. + +Through various iterations of the HTTP protocol, a few different +cache-focused headers have arisen with varying levels of sophistication. +The ones you probably still need to pay attention to are below: + +- **`Expires`**: The `Expires` header is very straight-forward, + although fairly limited in scope. Basically, it sets a time in the + future when the content will expire. At this point, any requests for + the same content will have to go back to the origin server. This + header is probably best used only as a fall back. +- **`Cache-Control`**: This is the more modern replacement for the + `Expires` header. It is well supported and implements a much more + flexible design. In almost all cases, this is preferable to + `Expires`, but it may not hurt to set both values. We will discuss + the specifics of the options you can set with `Cache-Control` a bit + later. +- **`Etag`**: The `Etag` header is used with cache validation. The + origin can provide a unique `Etag` for an item when it initially + serves the content. When a cache needs to validate the content it + has on-hand upon expiration, it can send back the `Etag` it has for + the content. The origin will either tell the cache that the content + is the same, or send the updated content (with the new `Etag`). +- **`Last-Modified`**: This header specifies the last time that the + item was modified. This may be used as part of the validation + strategy to ensure fresh content. +- **`Content-Length`**: While not specifically involved in caching, + the `Content-Length` header is important to set when defining + caching policies. Certain software will refuse to cache content if + it does not know in advanced the size of the content it will need to + reserve space for. +- **`Vary`**: A cache typically uses the requested host and the path + to the resource as the key with which to store the cache item. The + `Vary` header can be used to tell caches to pay attention to an + additional header when deciding whether a request is for the same + item. This is most commonly used to tell caches to key by the + `Accept-Encoding` header as well, so that the cache will know to + differentiate between compressed and uncompressed content. + +### An Aside about the Vary Header + +The `Vary` header provides you with the ability to store different +versions of the same content at the expense of diluting the entries in +the cache. + +In the case of `Accept-Encoding`, setting the `Vary` header allows for a +critical distinction to take place between compressed and uncompressed +content. This is needed to correctly serve these items to browsers that +cannot handle compressed content and is necessary in order to provide +basic usability. One characteristic that tells you that +`Accept-Encoding` may be a good candidate for `Vary` is that it only has +two or three possible values. + +Items like `User-Agent` might at first glance seem to be a good way to +differentiate between mobile and desktop browsers to serve different +versions of your site. However, since `User-Agent` strings are +non-standard, the result will likely be many versions of the same +content on intermediary caches, with a very low cache hit ratio. The +`Vary` header should be used sparingly, especially if you do not have +the ability to normalize the requests in intermediate caches that you +control (which may be possible, for instance, if you leverage a content +delivery network). + +How Cache-Control Flags Impact Caching +-------------------------------------- + +Above, we mentioned how the `Cache-Control` header is used for modern +cache policy specification. A number of different policy instructions +can be set using this header, with multiple instructions being separated +by commas. + +Some of the `Cache-Control` options you can use to dictate your +content's caching policy are: + +- **`no-cache`**: This instruction specifies that any cached content + must be re-validated on each request before being served to a + client. This, in effect, marks the content as stale immediately, but + allows it to use revalidation techniques to avoid re-downloading the + entire item again. +- **`no-store`**: This instruction indicates that the content cannot + be cached in any way. This is appropriate to set if the response + represents sensitive data. +- **`public`**: This marks the content as public, which means that it + can be cached by the browser and any intermediate caches. For + requests that utilized HTTP authentication, responses are marked + `private` by default. This header overrides that setting. +- **`private`**: This marks the content as `private`. Private content + may be stored by the user's browser, but must *not* be cached by any + intermediate parties. This is often used for user-specific data. +- **`max-age`**: This setting configures the maximum age that the + content may be cached before it must revalidate or re-download the + content from the origin server. In essence, this replaces the + `Expires` header for modern browsing and is the basis for + determining a piece of content's freshness. This option takes its + value in seconds with a maximum valid freshness time of one year + (31536000 seconds). +- **`s-maxage`**: This is very similar to the `max-age` setting, in + that it indicates the amount of time that the content can be cached. + The difference is that this option is applied only to intermediary + caches. Combining this with the above allows for more flexible + policy construction. +- **`must-revalidate`**: This indicates that the freshness information + indicated by `max-age`, `s-maxage` or the `Expires` header must be + obeyed strictly. Stale content cannot be served under any + circumstance. This prevents cached content from being used in case + of network interruptions and similar scenarios. +- **`proxy-revalidate`**: This operates the same as the above setting, + but only applies to intermediary proxies. In this case, the user's + browser can potentially be used to serve stale content in the event + of a network interruption, but intermediate caches cannot be used + for this purpose. +- **`no-transform`**: This option tells caches that they are not + allowed to modify the received content for performance reasons under + any circumstances. This means, for instance, that the cache is not + able to send compressed versions of content it did not receive from + the origin server compressed and is not allowed. + +These can be combined in different ways to achieve various caching +behavior. Some mutually exclusive values are: + +- `no-cache`, `no-store`, and the regular caching behavior indicated + by absence of either +- `public` and `private` + +The `no-store` option supersedes the `no-cache` if both are present. For +responses to unauthenticated requests, `public` is implied. For +responses to authenticated requests, `private` is implied. These can be +overridden by including the opposite option in the `Cache-Control` +header. + +Developing a Caching Strategy +----------------------------- + +In a perfect world, everything could be cached aggressively and your +servers would only be contacted to validate content occasionally. This +doesn't often happen in practice though, so you should try to set some +sane caching policies that aim to balance between implementing long-term +caching and responding to the demands of a changing site. + +### Common Issues + +There are many situations where caching cannot or should not be +implemented due to how the content is produced (dynamically generated +per user) or the nature of the content (sensitive banking information, +for example). Another problem that many administrators face when setting +up caching is the situation where older versions of your content are out +in the wild, not yet stale, even though new versions have been +published. + +These are both frequently encountered issues that can have serious +impacts on cache performance and the accuracy of content you are +serving. However, we can mitigate these issues by developing caching +policies that anticipate these problems. + +### General Recommendations + +While your situation will dictate the caching strategy you use, the +following recommendations can help guide you towards some reasonable +decisions. + +There are certain steps that you can take to increase your cache hit +ratio before worrying about the specific headers you use. Some ideas +are: + +- **Establish specific directories for images, css, and shared + content**: Placing content into dedicated directories will allow you + to easily refer to them from any page on your site. +- **Use the same URL to refer to the same items**: Since caches key + off of both the host and the path to the content requested, ensure + that you refer to your content in the same way on all of your pages. + The previous recommendation makes this significantly easier. +- **Use CSS image sprites where possible**: CSS image sprites for + items like icons and navigation decrease the number of round trips + needed to render your site and allow your site to cache that single + sprite for a long time. +- **Host scripts and external resources locally where possible**: If + you utilize javascript scripts and other external resources, + consider hosting those resources on your own servers if the correct + headers are not being provided upstream. Note that you will have to + be aware of any updates made to the resource upstream so that you + can update your local copy. +- **Fingerprint cache items**: For static content like CSS and + Javascript files, it may be appropriate to fingerprint each item. + This means adding a unique identifier to the filename (often a hash + of the file) so that if the resource is modified, the new resource + name can be requested, causing the requests to correctly bypass the + cache. There are a variety of tools that can assist in creating + fingerprints and modifying the references to them within HTML + documents. + +In terms of selecting the correct headers for different items, the +following can serve as a general reference: + +- **Allow all caches to store generic assets**: Static content and + content that is not user-specific can and should be cached at all + points in the delivery chain. This will allow intermediary caches to + respond with the content for multiple users. +- **Allow browsers to cache user-specific assets**: For per-user + content, it is often acceptable and useful to allow caching within + the user's browser. While this content would not be appropriate to + cache on any intermediary caching proxies, caching in the browser + will allow for instant retrieval for users during subsequent visits. +- **Make exceptions for essential time-sensitive content**: If you + have content that is time-sensitive, make an exception to the above + rules so that the out-dated content is not served in critical + situations. For instance, if your site has a shopping cart, it + should reflect the items in the cart immediately. Depending on the + nature of the content, the `no-cache` or `no-store` options can be + set in the `Cache-Control` header to achieve this. +- **Always provide validators**: Validators allow stale content to be + refreshed without having to download the entire resource again. + Setting the `Etag` and the `Last-Modified` headers allow caches to + validate their content and re-serve it if it has not been modified + at the origin, further reducing load. +- **Set long freshness times for supporting content**: In order to + leverage caching effectively, elements that are requested as + supporting content to fulfill a request should often have a long + freshness setting. This is generally appropriate for items like + images and CSS that are pulled in to render the HTML page requested + by the user. Setting extended freshness times, combined with + fingerprinting, allows caches to store these resources for long + periods of time. If the assets change, the modified fingerprint will + invalidate the cached item and will trigger a download of the new + content. Until then, the supporting items can be cached far into the + future. +- **Set short freshness times for parent content**: In order to make + the above scheme work, the containing item must have relatively + short freshness times or may not be cached at all. This is typically + the HTML page that calls in the other assisting content. The HTML + itself will be downloaded frequently, allowing it to respond to + changes rapidly. The supporting content can then be cached + aggressively. + +The key is to strike a balance that favors aggressive caching where +possible while leaving opportunities to invalidate entries in the future +when changes are made. Your site will likely have a combination of: + +- Aggressively cached items +- Cached items with a short freshness time and the ability to + re-validate +- Items that should not be cached at all + +The goal is to move content into the first categories when possible +while maintaining an acceptable level of accuracy. + +Conclusion +---------- + +Taking the time to ensure that your site has proper caching policies in +place can have a significant impact on your site. Caching allows you to +cut down on the bandwidth costs associated with serving the same content +repeatedly. Your server will also be able to handle a greater amount of +traffic with the same hardware. Perhaps most importantly, clients will +have a faster experience on your site, which may lead them to return +more frequently. While effective web caching is not a silver bullet, +setting up appropriate caching policies can give you measurable gains +with minimal work. + + +--- + +作者: [Justin Ellingwood](https://www.digitalocean.com/community/users/jellingwood) + +译者:[译者ID](https://github.com/译者ID) + +校对:[校对者ID](https://github.com/校对者ID) + +推荐:[royaso](https://github.com/royaso) + +via: https://www.digitalocean.com/community/tutorials/web-caching-basics-terminology-http-headers-and-caching-strategies + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + + From 7e0ab09ba617374d7726c4ad5bc95fc13d4c39a9 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 29 Apr 2015 11:29:09 +0800 Subject: [PATCH 0674/2517] =?UTF-8?q?20150429-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1.0--Open Source Animation Gets Serious.md | 41 ++++++ ...e2 With Tomcat 7 Using mod_jk Connector.md | 138 ++++++++++++++++++ ...Here' s How To Upgrade in Kubuntu 15.04.md | 86 +++++++++++ 3 files changed, 265 insertions(+) create mode 100644 sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md create mode 100644 sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md create mode 100644 sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md diff --git a/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md b/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md new file mode 100644 index 0000000000..70f76b418c --- /dev/null +++ b/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md @@ -0,0 +1,41 @@ +Synfig Studio 1.0 — Open Source Animation Gets Serious +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/synfig-free-animations-750x467.jpg) + +**A brand new version of the free, open-source 2D animation software Synfig Studio is now available to download. ** + +The first release of the cross-platform software in well over a year, Synfig Studio 1.0 builds on its claim of offering “industrial-strength solution for creating film-quality animation” with a suite of new and improved features. + +Among them is an improved user interface that the project developers say is ‘easier’ and ‘more intuitive’ to use. The client adds a new **single-window mode** for tidy working and has been **reworked to use the latest GTK3 libraries**. + +On the features front there are several notable changes, including the addition of a fully-featured bone system. + +This **joint-and-pivot ‘skeleton’ framework** is well suited to 2D cut-out animation and should prove super efficient when coupled with the complex deformations new to this release, or used with Synfig’s popular ‘automatic interpolated keyframes’ (read: frame-to-frame morphing). + +注:youtube视频 + + +New non-destructive cutout tools, friction effects and initial support for full frame-by-frame bitmap animation, may help unlock the creativity of open-source animators, as might the addition of a sound layer for syncing the animation timeline with a soundtrack! + +### Download Synfig Studio 1.0 ### + +Synfig Studio is not a tool suited for everyone, though the latest batch of improvements in this latest release should help persuade some animators to give the free animation software a try. + +If you want to find out what open-source animation software is like for yourself, you can grab an installer for Ubuntu for the latest release direct from the project’s Sourceforge page using the links below. + +- [Download Synfig 1.0 (64bit) .deb Installer][1] +- [Download Synfig 1.0 (32bit) .deb Installer][2] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/synfig-studio-new-release-features + +作者:[oey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://sourceforge.net/projects/synfig/files/releases/1.0/linux/synfigstudio_1.0_amd64.deb/download +[2]:http://sourceforge.net/projects/synfig/files/releases/1.0/linux/synfigstudio_1.0_x86.deb/download \ No newline at end of file diff --git a/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md b/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md new file mode 100644 index 0000000000..11882847a7 --- /dev/null +++ b/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md @@ -0,0 +1,138 @@ +How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector +================================================================================ +Apache is the most popular available web server. A web server is used basically to accept requests from clients and send responses to those requests. It gets an URL, translates it to a filename (for static requests), and sends that file back over the internet from the local disk, or it translates it to a program name, executes it, and then sends the output of that program back over the internet to the requesting party. If the web server was not able to process and complete the request, it instead returns an error message. + +In this article we will list the features of Apache, and how we can integrate it with Tomcat8 and Tomcat7 using the mod_jk connector. + +### Features of Apache ### + +As we said Apache is the most popular available web server. The reasons behind its popularity are the following features: + +- It is free tool that you can download and install it easily. +- It is open source web server so you can easily see the code, adjust it, optimize it, and fix errors and security holes. New features and modules can be also added. +- It can be used for small websites of one or two pages, or huge websites of hundreds and thousands of pages, serving millions of regular visitors each month. It can serve both static and dynamic content. +- Improved caching modules (mod_cache, mod_disk_cache, mod_mem_cache). +- Apache 2 supports the Internet protocol IPv6. + +### Tomcat directory ### + +${tomcat_home} is the root directory of tomcat. Your Tomcat installation should have the following subdirectories: + +- ${tomcat_home}\conf – Where you can place various configuration files +- ${tomcat_home}\webapps – Containing example applications +- ${tomcat_home}\bin – Where you place web server plugins + +### Mod_jk module ### + +The mod_jk can be obtained in two formats: binary and source. Depending on the platform you are running your web server on, a binary version of mod_jk may be available. It is recommended to use the binary version if it is available. + +The mod_jk module was developed and tested on: + +- Linux, FreeBSD, AIX, HP-UX, MacOS X, Solaris and should work on major Unix’s platforms supporting Apache 1.3 and/or 2.x +- 0-i386 SP4/SP5/SP6a (should be able to work with other service packs), Win2K and WinXP and Win98 +- Cygwin (until you have an apache server and autoconf/automake support tools) +- Netware +- i5/OS V5R4 (System I) with Apache HTTP Server 2.0.58. Be sure to have the latest Apache PTF installed. +- Tomcat 3.2 to Tomcat 8. + +The mod_jk requires two entities: + +- **mod_jk.xxx** – The Apache HTTP Server module, depending on your operating system, it will be mod_jk.so, mod_jk.nlm or MOD_JK.SRVPGM. +- **workers.properties** – A file that describes the host and used ports by the workers (Tomcat processes). A sample workers.properties can be found under the conf directory in the source download. + +Also as with other Apache HTTP Server modules, mod_jk should be first installed on the modules directory of your Apache webserver: /usr/lib/apache and you should update your **httpd.conf** file. + +### Installation ### + +It is required to have a non-root user system with the “sudo” privileges before starting the installation. Now we will start our installation, so we will install Apache2 and Tomcat using the following command: + + sudo apt-get install apache2 + + sudo apt-get install tomcat7 + + sudo apt-get install tomcat7-admin + +And now we will create a test application for Tomcat using the following commands: + + cd /var/lib/tomcat7/webapps + sudo mkdir tomcat-demo + sudo mkdir tomcat-demo/goodmoring + sudo vim tomcat-demo/helloworld/index.jsp + +And paste the following code: + + + + Good Morning + + +

Good Morning

+ Today is: <%= new java.util.Date().toString() %> + + + +Everything is okay, good now we will install and configure the mod_jk using the following command: + + sudo apt-get install libapache2-mod-jk + +We have to start by enabling the redirect port 8443 on Tomcat using the following command: + + sudo vim /etc/tomcat7/server.xml + +And we will uncomment the following line: + + + +After that, we will create our workers.properties file for Apache using the following command: + + sudo vim /etc/apache2/workers.properties + +Paste the following text: + + # Define 1 real worker using ajp13 + worker.list=worker + # Set properties for worker (ajp13) + worker.worker.type=ajp13 + worker.worker.host=localhost + worker.worker.port=8009 + +Now we will use the following command to let Apache use this worker: + + sudo vim /etc/apache2/mods-available/jk.conf + +And we will change the JkWorkersFile property to the following one; + + /etc/apache2/workers.properties + +Finally to configure the URL Apache should pass through the Tomcat + + sudo vim /etc/apache2/sites-enabled/000-default + +And we will add the following line in the configurtation file: + + + ....................................... + ....................................... + JkMount /tomcat-demo* worker1 + + +You can now restart the servers using the following commands to check their functionality: + + sudo /etc/init.d/tomcat7 restart + sudo /etc/init.d/apache2 restart + +### Conclusion ### + +In this article we showed you how to configure and install Apache2 and Tomcat 7 using the mod_jk connector. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/integrate-apache2-tomcat-7-using-mod_jk-connector/ + +作者:[anismaj][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/anis/ \ No newline at end of file diff --git a/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md b/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md new file mode 100644 index 0000000000..43b2adc3dd --- /dev/null +++ b/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md @@ -0,0 +1,86 @@ +KDE Plasma 5.3 Released, Here’s How To Upgrade in Kubuntu 15.04 +================================================================================ +**KDE [has announced][1] the stable release of Plasma 5.3, which comes charged with a slate of new power management features. ** + +Having impressed and excited [with an earlier beta release in April][2], the latest update to the new stable update to the Plasma 5 desktop environments is now considered stable and ready for download. + +Plasma 5.3 continues to refine and finesse the new-look KDE desktop. It sees plenty of feature additions for desktop users to enjoy and **almost 400 bug fixes** packed in it should also improvements the performance and overall stability, too. + +### What’s New in Plasma 5.3 ### + +![Better Bluetooth Management in Plasma 5.3](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/bluetooth-applet-in-kde.jpg) +Better Bluetooth Management in Plasma 5.3 + +While we touched on the majority of the **new features** [in Plasma 5.3 in an earlier article][3] many are worth reiterating. + +**Enhanced power management** features and configuration options, including a **new battery applet, energy usage monitor** and **animated changes in screen brightness**, will help KDE last longer on portable devices. + +Closing a laptop when an external monitor is connected no longer triggers ‘suspend’. This new behaviour is called ‘**cinema mode**‘ and comes enabled by default, but can be disabled using an option in power management settings. + +**Bluetooth functionality is improved**, with a brand new panel applet making connecting and configuring paired bluetooth devices like smartphones, keyboards and speakers easier than ever. + +Similarly, **trackpad configuration in KDE is easier** with Plasma 5.3 thanks to a new set-up and settings module. + +![Trackpad, Touchpad. Tomato, Tomayto.](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/touchpad-kde.jpg) +Trackpad, Touchpad. Tomato, Tomayto. + +For Plasma widget fans there is a new **Press and Hold** gesture. When enabled this hides the settings handle that appears when on mouseover. Instead making it only appear when long-clicking on widget. + +On the topic of widget-y things, several **old Plasmoid favourites are reintroduced** with this release, including a useful system monitor, handy hard-drive stats and a comic reader. + +### Learning More & Trying It Out ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/plasma-5.3-beta.jpg\) + +A full list of everything — and I mean everything — that is new and improved in Plasma 5.3 is listed [in the official change log][4]. + +Live images that let you try Plasma 5.3 on a Kubuntu base **without affecting your own system** are available from the KDE community: + +- [Download KDE Plasma Live Images][5] + +If you need super stable system you can use these live images to try the features but stick with the version of KDE that comes with your distribution on your main computer. + +However, if you’re happy to experiment — read: can handle any package conflicts or system issues resulting from attempting to upgrade your desktop environment — you can. + +### Install Plasma 5.3 in Kubuntu 15.04 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2012/02/logo-kubuntu.png) + +To **install Plasma 5.3 in Kubuntu 15.04** you need to add the KDE Backports PPA, run the Software Updater tool and install any available updates. + +The Kubuntu backports PPA may/will also upgrade other parts of the KDE Platform other than Plasma that are installed on your system including KDE applications, frameworks and Kubuntu specific configuration files. + +Using the command line is by far the fastest way to upgrade to Plasma 5.3 in Kubuntu: + + sudo add-apt-repository ppa:kubuntu-ppa/backports + + sudo apt-get update && sudo apt-get dist-upgrade + +After the upgrade process has completed, and assuming everything went well, you should reboot your computer. + +If you’re using an alternative desktop environment, like LXDE, Unity or GNOME, you will need to install the Kubuntu desktop package (you’ll find it in the Ubuntu Software Centre) after running both of the commands above. + +To downgrade to the stock version of Plasma in 15.04 you can use the PPA-Purge tool: + + sudo apt-get install ppa-purge + + sudo ppa-purge ppa:kubuntu-ppa/backports + +Let us know how your upgrade/testing goes in the comments below and don’t forget to mention the features you hope to see added to the Plasma 5 desktop next. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/kde-plasma-5-3-released-heres-how-to-upgrade-in-kubuntu-15-04 + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://www.kde.org/announcements/plasma-5.3.0.php +[2]:http://www.omgubuntu.co.uk/2015/04/beta-plasma-5-3-features +[3]:http://www.omgubuntu.co.uk/2015/04/beta-plasma-5-3-features +[4]:https://www.kde.org/announcements/plasma-5.2.2-5.3.0-changelog.php +[5]:https://community.kde.org/Plasma/Live_Images \ No newline at end of file From d783802859ce5f224209ccfd71e46921effbb60c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 29 Apr 2015 11:35:03 +0800 Subject: [PATCH 0675/2517] =?UTF-8?q?20150429-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...sed--How to Upgrade on Fedora or CentOS.md | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md diff --git a/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md b/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md new file mode 100644 index 0000000000..abdca76f92 --- /dev/null +++ b/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md @@ -0,0 +1,167 @@ +Docker 1.6 Released - How to Upgrade on Fedora / CentOS +================================================================================ +Docker, a popular open source container platform for packaging applications, has a new release 1.6 with lot of new features in it. This version has updates to Docker Registry, Engine, Swarm, Compose and Machine. The release aims at improvements in performance, developer and system administrator experiences. Let us take a quick look at the new features available. + +**Docker Registry (2.0)** which is a service for pushing Docker images for storing and sharing, has undergone architectural changes as it was facing performance issues when under load. It is still backward compatible. The language in which Docker Registry is written is now changed from Python to Google's Go to improve performance. In combination with Docker Engine 1.6, it is capable of pulling the images faster. Earlier the images were delivered sequentially, but now in parallel. + +**Docker Engine (1.6)** is greatly improved from its previous version. It supports containers and image labels. With labels you can attach user-defined metadata to images and containers which in turn can be used by other tools. Labels will not be visible to the running applications and can be used to speed up the searching of containers and images. + +There is a Windows version of the Docker client which can connect to a remote Docker engine that runs Linux. + +Docker now supports logging driver API that allows us to send container logs to systems like Syslog or to a third-party. It is going to be benefitting the system administrators. + +**Swarm (0.2)** is a clustering tool for Docker which turns a pool of Docker hosts into one virtual host. In the new feature, containers are evenly placed on the available nodes. Effort is made towards supporting the complete Docker API by adding more Docker commands. In the future, it will be possible to use third-party drivers for clustering. + +**Compose (1.2)** which is a tool for defining and running complex applications in Docker has also got an upgrade. In the new version, one can create multiple sub-files instead of one flat file to describe a multi-container application. + +With **Machine (0.2)**, we can easily create Docker hosts on local computers, clouds and data centers. The new release provides a cleaner driver interface to write drivers for providers. Provisioning is handled centrally by Machine instead of each individual driver. New command added to regenerate host's TLS certificates which increases security. + +### Upgrade instructions on Fedora / CentOS ### + +In this section, let us learn how to upgrade the existing docker version to the latest on Fedora and CentOS. Please note that currently Docker runs only on 64-bit architecture. As both Fedora and CentOS are from RedHat, commands used are pretty much identical except that the Docker package in Fedora20 and CentOS6.5 is called “docker-io”. + +If you do not already have Docker installed on the system, install it using: + + "yum install docker-io" – on Fedora20 / CentOS6.5 + + "yum install docker" - on Fedora21 / CentOS7 + +Before upgrading, it is good to have a backup of the docker images and container volumes. + +Refer [filesystem to a tar archive][1] and [volumes backups, restores or migrations options][2] for more details. + +Currently the test system has Docker version 1.5 installed. Output shown in the examples are from a Fedora 20 system. + +Verify the current version of Docker installed on the system + + [root@TestNode1 ~]#sudo docker -v + + Docker version 1.5.0, build a8a31ef/1.5.0 + +If the Docker service is running, first stop it. + + [root@TestNode1 ~]# sudo systemctl stop docker + +Upgrade to the latest version using yum update. But at the time of writing this article, the repositories were not yet updated with the latest version(1.6). Hence you need to use the binary method of upgradation. + + [root@TestNode1 ~]#sudo yum -y update docker-io + + No packages marked for update + + [root@TestNode1 ~]#sudo wget https://get.docker.com/builds/Linux/x86_64/docker-latest -O /usr/bin/docker + + --2015-04-19 13:40:48-- https://get.docker.com/builds/Linux/x86_64/docker-latest + + Resolving get.docker.com (get.docker.com)... 162.242.195.82 + + Connecting to get.docker.com (get.docker.com)|162.242.195.82|:443... connected. + + HTTP request sent, awaiting response... 200 OK + + Length: 15443598 (15M) [binary/octet-stream] + + Saving to: /usr/bin/docker + + 100%[======================================>] 15,443,598 8.72MB/s in 1.7s + + 2015-04-19 13:40:50 (8.72 MB/s) - /usr/bin/docker saved + +Check the updated version + + [root@TestNode1 ~]#sudo docker -v + + Docker version 1.6.0, build 4749651 + +Restart the docker service + + [root@TestNode1 ~]# sudo systemctl start docker + +Verify that Docker is working + + [root@TestNode1 ~]# docker images + + REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE + + fedora latest 834629358fe2 3 months ago 241.3 MB + + [root@TestNode1 ~]# docker run fedora /bin/echo Hello World + + Hello World + +**Note** on CentOS installation , after installing Docker on CentOS, you might get error messages like the following while trying to start the Docker service + + docker.service - Docker Application Container Engine + + Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled) + + Active: failed (Result: exit-code) since Mon 2015-04-20 03:24:24 EDT; 6h ago + + Docs: http://docs.docker.com + + Process: 21069 ExecStart=/usr/bin/docker -d $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=127) + + Main PID: 21069 (code=exited, status=127) + + Apr 20 03:24:24 centos7 systemd[1]: Starting Docker Application Container E..... + + Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" + + Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" + + Apr 20 03:24:24 centos7 docker[21069]: /usr/bin/docker: relocation error: /...ce + + Apr 20 03:24:24 centos7 systemd[1]: docker.service: main process exited, co.../a + + Apr 20 03:24:24 centos7 systemd[1]: Failed to start Docker Application Cont...e. + + Apr 20 03:24:24 centos7 systemd[1]: Unit docker.service entered failed state. + +This is a known bug ( [https://bugzilla.redhat.com/show_bug.cgi?id=1207839][3] ) and needs an upgrade of the device mapper to the latest level. + + [root@centos7 ~]# rpm -qa device-mapper + + device-mapper-1.02.84-14.el7.x86_64 + + [root@centos7 ~]# yum update device-mapper + + [root@centos7 ~]# rpm -qa device-mapper + + device-mapper-1.02.93-3.el7.x86_64 + + [root@centos7 ~]# systemctl start docker + +### Summary ### + +Though the docker technology is quite recent one, it is quickly gaining popularity. It has made life easy for developers and ops teams to quickly create and deploy applications respectively. With the company releasing quick updates to Docker in order to improve the product and address customer requirements, the future is definitely bright for Docker. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/docker-1-6-features-upgrade-fedora-centos/ + +作者:[B N Poornima][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bnpoornima/ +[1]:http://docs.docker.com/reference/commandline/cli/#export +[2]:http://docs.docker.com/userguide/dockervolumes/#backup-restore-or-migrate-data-volumes +[3]:https://bugzilla.redhat.com/show_bug.cgi?id=1207839 +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: \ No newline at end of file From 8263c03c488c36a7183626f7fbe5dd263722d62b Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 29 Apr 2015 11:46:23 +0800 Subject: [PATCH 0676/2517] [Translated] tech/20150108 Interface (NICs) Bonding in Linux using nmcli --- ...ace (NICs) Bonding in Linux using nmcli.md | 137 ------------------ ...ace (NICs) Bonding in Linux using nmcli.md | 136 +++++++++++++++++ 2 files changed, 136 insertions(+), 137 deletions(-) delete mode 100644 sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md create mode 100644 translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md diff --git a/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md b/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md deleted file mode 100644 index 41eee7a86f..0000000000 --- a/sources/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md +++ /dev/null @@ -1,137 +0,0 @@ -Translating by ictlyh -Interface (NICs) Bonding in Linux using nmcli -================================================================================ -Today, we'll learn how to perform Interface (NICs) bonding in our CentOS 7.x using nmcli (Network Manager Command Line Interface). - -NICs (Interfaces) bonding is a method for linking **NICs** together logically to allow fail-over or higher throughput. One of the ways to increase the network availability of a server is by using multiple network interfaces. The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical bonded interface. It is a new implementation that does not affect the older bonding driver in linux kernel; it offers an alternate implementation. - -**NIC bonding is done to provide two main benefits for us:** - -1. **High bandwidth** -1. **Redundancy/resilience** - -Now lets configure NICs bonding in CentOS 7. We'll need to decide which interfaces that we would like to configure a Team interface. - -run **ip link** command to check the available interface in the system. - - $ ip link - -![ip link](http://blog.linoxide.com/wp-content/uploads/2015/01/ip-link.png) - -Here we are using **eno16777736** and **eno33554960** NICs to create a team interface in **activebackup** mode. - -Use **nmcli** command to create a connection for the network team interface,with the following syntax. - - # nmcli con add type team con-name CNAME ifname INAME [config JSON] - -Where **CNAME** will be the name used to refer the connection ,**INAME** will be the interface name and **JSON** (JavaScript Object Notation) specifies the runner to be used.**JSON** has the following syntax: - - '{"runner":{"name":"METHOD"}}' - -where **METHOD** is one of the following: **broadcast, activebackup, roundrobin, loadbalance** or **lacp**. - -### 1. Creating Team Interface ### - -Now let us create the team interface. here is the command we used to create the team interface. - - # nmcli con add type team con-name team0 ifname team0 config '{"runner":{"name":"activebackup"}}' - -![nmcli con create](http://blog.linoxide.com/wp-content/uploads/2015/01/nmcli-con-create.png) - -run **# nmcli con show** command to verify the team configuration. - - # nmcli con show - -![Show Teamed Interace](http://blog.linoxide.com/wp-content/uploads/2015/01/show-team-interface.png) - -### 2. Adding Slave Devices ### - -Now lets add the slave devices to the master team0. here is the syntax for adding the slave devices. - - # nmcli con add type team-slave con-name CNAME ifname INAME master TEAM - -Here we are adding **eno16777736** and **eno33554960** as slave devices for **team0** interface. - - # nmcli con add type team-slave con-name team0-port1 ifname eno16777736 master team0 - - # nmcli con add type team-slave con-name team0-port2 ifname eno33554960 master team0 - -![adding slave devices to team](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-to-team.png) - -Verify the connection configuration using **#nmcli con show** again. now we could see the slave configuration. - - #nmcli con show - -![show slave config](http://blog.linoxide.com/wp-content/uploads/2015/01/show-slave-config.png) - -### 3. Assigning IP Address ### - -All the above command will create the required configuration files under **/etc/sysconfig/network-scripts/**. - -Lets assign an IP address to this team0 interface and enable the connection now. Here is the command to perform the IP assignment. - - # nmcli con mod team0 ipv4.addresses "192.168.1.24/24 192.168.1.1" - # nmcli con mod team0 ipv4.method manual - # nmcli con up team0 - -![ip assignment](http://blog.linoxide.com/wp-content/uploads/2015/01/ip-assignment.png) - -### 4. Verifying the Bonding ### - -Verify the IP address information in **#ip add show team0** command. - - #ip add show team0 - -![verfiy ip address](http://blog.linoxide.com/wp-content/uploads/2015/01/verfiy-ip-adress.png) - -Now lets check the **activebackup** configuration functionality using the **teamdctl** command. - - # teamdctl team0 state - -![teamdctl active backup check](http://blog.linoxide.com/wp-content/uploads/2015/01/teamdctl-activebackup-check.png) - -Now lets disconnect the active port and check the state again. to confirm whether the active backup configuration is working as expected. - - # nmcli dev dis eno33554960 - -![disconnect activeport](http://blog.linoxide.com/wp-content/uploads/2015/01/disconnect-activeport.png) - -disconnected the active port and now check the state again using **#teamdctl team0 state**. - - # teamdctl team0 state - -![teamdctl check activeport disconnect](http://blog.linoxide.com/wp-content/uploads/2015/01/teamdctl-check-activeport-disconnect.png) - -Yes its working cool !! we will connect the disconnected connection back to team0 using the following command. - - #nmcli dev con eno33554960 - -![nmcli dev connect disconected](http://blog.linoxide.com/wp-content/uploads/2015/01/nmcli-dev-connect-disconected.png) - -We have one more command called **teamnl** let us show some options with **teamnl** command. - -to check the ports in team0 run the following command. - - # teamnl team0 ports - -![teamnl check ports](http://blog.linoxide.com/wp-content/uploads/2015/01/teamnl-check-ports.png) - -Display currently active port of **team0**. - - # teamnl team0 getoption activeport - -![display active port team0](http://blog.linoxide.com/wp-content/uploads/2015/01/display-active-port-team0.png) - -Hurray, we have successfully configured NICs bonding :-) Please share feedback if any. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-command/interface-nics-bonding-linux/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ \ No newline at end of file diff --git a/translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md b/translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md new file mode 100644 index 0000000000..0b5bf2cd8e --- /dev/null +++ b/translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md @@ -0,0 +1,136 @@ +在 Linux 中用 nmcli 命令绑定网卡(NICs) +================================================================================ +今天,我们来学习一下在 CentOS 7.x 中如何用 nmcli(Network Manager Command Line Interface:网络管理命令行接口) 进行网卡(NICs 译者注:Netword Interface Card,网卡或网络适配器)绑定(译者注:bond 是指把多个物理网卡绑定成一个逻辑上的网卡,这样多个网卡可以使用同一个 IP 从而可以避免单点故障)。 + +网卡绑定是将 **网卡** 逻辑地连接到一起从而允许故障转移或者提高吞吐率的方法。提高服务器网络可用性的一个方式是使用多个网卡。Linux 绑定驱动提供了一个将多个网卡聚合到一个逻辑绑定接口的方法。这是个并不影响 linux 内核中旧绑定驱动的新的实现;它提供了另一种实现方法。 + +**网卡绑定为我们提供了两个主要的好处:** + +1. **高带宽** +1. **冗余/弹性** + +现在让我们在 CentOS 7 上配置网卡绑定吧。我们需要决定选取哪些接口配置成一个组接口。 + +运行 **ip link** 命令查看系统中可用的接口。 + + $ ip link + +![ip link](http://blog.linoxide.com/wp-content/uploads/2015/01/ip-link.png) + +这里我们使用 **eno16777736** 和 **eno33554960** 网卡在 “主动备份” 模式下创建一个组接口。(译者注:关于不同模式可以参考:
多网卡的7种bond模式原理) + +按照下面的语法,用 **nmcli** 命令为网络组接口创建一个连接。 + + # nmcli con add type team con-name CNAME ifname INAME [config JSON] + +**CNAME** 指代连接的名称,**INAME** 是接口名称,**JSON** (JavaScript Object Notation) 指定所使用的处理器(runner)。**JSON** 语法格式如下: + + '{"runner":{"name":"METHOD"}}' + +**METHOD** 是以下的其中一个:**broadcast、activebackup、roundrobin、loadbalance** 或者 **lacp**。 + +### 1. 创建组接口 ### + +现在让我们来创建组接口。这是我们创建组接口所使用的命令。 + + # nmcli con add type team con-name team0 ifname team0 config '{"runner":{"name":"activebackup"}}' + +![nmcli con create](http://blog.linoxide.com/wp-content/uploads/2015/01/nmcli-con-create.png) + +运行 **# nmcli con show** 命令验证组接口配置。 + + # nmcli con show + +![显示组接口](http://blog.linoxide.com/wp-content/uploads/2015/01/show-team-interface.png) + +### 2. 添加从设备 ### + +现在让我们天际从设备到主设备 team0。这是添加从设备的语法。 + + # nmcli con add type team-slave con-name CNAME ifname INAME master TEAM + +在这里我们添加 **eno16777736** 和 **eno33554960** 作为 **team0** 接口的从设备。 + + # nmcli con add type team-slave con-name team0-port1 ifname eno16777736 master team0 + + # nmcli con add type team-slave con-name team0-port2 ifname eno33554960 master team0 + +![添加从设备到 team](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-to-team.png) + +再次用命令 **#nmcli con show** 验证连接配置。现在我们可以看到从设备配置信息。 + + #nmcli con show + +![显示从设备配置](http://blog.linoxide.com/wp-content/uploads/2015/01/show-slave-config.png) + +### 3. 分配 IP 地址 ### + +上面的命令会在 **/etc/sysconfig/network-scripts/** 目录下创建需要的配置文件。 + +现在让我们为 team0 接口分配一个 IP 地址并启用这个连接。这是进行 IP 分配的命令。 + + # nmcli con mod team0 ipv4.addresses "192.168.1.24/24 192.168.1.1" + # nmcli con mod team0 ipv4.method manual + # nmcli con up team0 + +![分配 ip](http://blog.linoxide.com/wp-content/uploads/2015/01/ip-assignment.png) + +### 4. 验证绑定 ### + +用 **#ip add show team0** 命令验证 IP 地址信息。 + + #ip add show team0 + +![验证 ip 地址](http://blog.linoxide.com/wp-content/uploads/2015/01/verfiy-ip-adress.png) + +现在用 **teamdctl** 命令检查 **主动备份** 配置功能。 + + # teamdctl team0 state + +![teamdctl 检查主动备份](http://blog.linoxide.com/wp-content/uploads/2015/01/teamdctl-activebackup-check.png) + +现在让我们和激活的端口断开连接并再次检查状态来确认主动备份配置是否像希望的那样工作。 + + # nmcli dev dis eno33554960 + +![断开激活端口连接](http://blog.linoxide.com/wp-content/uploads/2015/01/disconnect-activeport.png) + +断开激活端口后再次用命令 **#teamdctl team0 state** 检查状态。 + + # teamdctl team0 state + +![teamdctl 检查断开激活端口连接](http://blog.linoxide.com/wp-content/uploads/2015/01/teamdctl-check-activeport-disconnect.png) + +是的,它运行良好!!我们会使用下面的命令连接回到 team0 的断开的连接。 + + #nmcli dev con eno33554960 + +![nmcli dev 连接断开的连接](http://blog.linoxide.com/wp-content/uploads/2015/01/nmcli-dev-connect-disconected.png) + +我们还有一个 **teamnl** 命令可以显示 **teamnl** 命令的一些选项。 + +用下面的命令检查在 team0 运行的端口。 + + # teamnl team0 ports + +![teamnl 检查端口](http://blog.linoxide.com/wp-content/uploads/2015/01/teamnl-check-ports.png) + +显示 **team0** 当前活动的端口。 + + # teamnl team0 getoption activeport + +![显示 team0 活动端口](http://blog.linoxide.com/wp-content/uploads/2015/01/display-active-port-team0.png) + +好了,我们已经成功地配置了网卡绑定 :-) ,如果有任何反馈,请告诉我们。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/interface-nics-bonding-linux/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ \ No newline at end of file From b7c78629570e4a9a87b2df98bd9ba2384fc31837 Mon Sep 17 00:00:00 2001 From: royaso Date: Wed, 29 Apr 2015 13:54:59 +0800 Subject: [PATCH 0677/2517] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=2020140804=20Group?= =?UTF-8?q?=20Test--Linux=20Text=20Editors.md=20(=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=E9=94=99=E5=88=AB=E5=AD=97,=E4=B8=80?= =?UTF-8?q?=E5=8F=A5=E6=BC=8F=E7=BF=BB=E8=AF=91,=E8=AF=AD=E5=8F=A5?= =?UTF-8?q?=E9=80=9A=E9=A1=BA)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20140804 Group Test--Linux Text Editors.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/translated/share/20140804 Group Test--Linux Text Editors.md b/translated/share/20140804 Group Test--Linux Text Editors.md index fa9b275588..1976cfca32 100644 --- a/translated/share/20140804 Group Test--Linux Text Editors.md +++ b/translated/share/20140804 Group Test--Linux Text Editors.md @@ -8,7 +8,7 @@ 得益于能向它们注入足以抗衡其它类型的以文本为中心的应用程序能力的插件,一些简单的文本编辑器甚至超过了它们的设计目标。它们能胜任一个源代码编辑器的任务,甚至是一个集成开发环境。 -Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一些原因,我们在这个组测试中并没有包括它们。首先,如果你使用它们中的任何一个,那么恭喜你:你不需要更换了。其次,它们都有陡峭的学习曲线,尤其是对于那些对有面向图形用户界面的桌面系统的替代能力更有兴趣的用户。 +Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一些原因,我们在这个组测试中并没有包括它们。首先,如果你使用它们中的任何一个,那么恭喜你:你不需要更换了。其次,它们都有陡峭的学习曲线,尤其是那些熟悉了桌面环境的用户:他们很更愿意投入其他有图形界面的文本编辑器。 ### 目录: ### @@ -54,9 +54,9 @@ Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一 除了Gedit和jEdit以外的所有工具,都是通过推荐的安装方法安装在Fedora和Ubuntu上。前者已经兼容默认的Gnome桌面,后者仍然固执地反对安装在Fedora上。由于这些是相对简单的应用程序,他们没有复杂的依赖,唯一例外的是jEdit,它要求要有Oracle Java。 -得益于Gnome和KDE持续的努力,不论他们运行的桌面环境,所有编辑器看起来很好,功能也很正常。这不仅是作为环境评价的标准,也意味着你不再受制于要找到和你的桌面环境兼容的工具。 +得益于Gnome和KDE持续的努力,不论他们运行的桌面环境,所有编辑器看起来很好,功能也很正常。这不仅是作为评价的标准,也意味着你不再受制于要找到和你的桌面环境兼容的工具。 -除了它们老派的功能,我们也对所有候选者测试了通用文本编辑功能。然而,它们并没有被设计为模仿现代字处理器的所有功能,我们也不以此评判。 +除了它们奇特的功能,我们也对所有候选者测试了通用文本编辑功能。然而,它们并没有被设计为模仿现代字处理器的所有功能,我们也不以此评判。 ![Kate能搭建为功能丰富的集成开发环境](http://www.linuxvoice.com/wp-content/uploads/2014/08/kate-web.png) @@ -64,7 +64,7 @@ Kate能搭建为功能丰富的集成开发环境。 ### 编程语言支持 ### -UltraEdit 能进行语法高亮,代码折叠以及拥有项目管理的能力。这也有一个罗列源文件中所有功能的功能列表,但并不适用于我们任何的测试代码文件。UltraEdit也支持HTML5,有能添加常用HTML标记的HTML工具栏。 +UltraEdit 能进行语法高亮,代码折叠以及拥有项目管理的能力。这也有一个罗列源文件中所有函数的功能列表,但并不适用于我们任何的测试代码文件。UltraEdit也支持HTML5,有能添加常用HTML标记的HTML工具栏。 即使Gnome的默认文本编辑器Gedit,也有几个面向编码的功能特性,例如括号匹配,自动缩进以及为包括C, C++, Java, HTML, XML, Python, Perl, 以及许多其它编程语言进行语法高亮。 @@ -74,15 +74,15 @@ UltraEdit 能进行语法高亮,代码折叠以及拥有项目管理的能力 正如Komodo IDE,Sublime也可滚动浏览显示完整的代码,这对于长代码文件导航和在文件中的不同部分跳转很方便。 -Sublime最好的功能之一就是能在编辑器内部为特定语言,例如C++, Python, Ruby等运行代码,当然假设在你的电脑上安装有编译器以及其它系统工具。 +Sublime最好的功能之一就是能在编辑器内部为特定语言,例如C++, Python, Ruby等运行代码,当然假设在你的电脑上安装有编译器以及其它系统工具。省时间而且不用再开终端. 你也可以用插件在Kate中开启构建系统功能。另外,你可以为GDB调试器添加一个简单的前端。Kate能和Git,Subversion以及Mercurial版本控制系统一起工作,也提供了一些项目管理的功能。 -除了能为超过180中语言进行语法高亮,它支持所有的这些辅助功能,例如括号匹配,自动补全和自动缩进。它也支持代码折叠,甚至在一个程序中包括有错误的函数。 +除了能为超过180中语言进行语法高亮,它支持所有的这些辅助功能,例如括号匹配,自动补全和自动缩进。它也支持代码折叠,甚至在一个程序中折叠函数。 -jEdit是唯一的遗憾,它声称自己是一个程序员的文本编辑器,但它缺少其他的基本功能,例如代码折叠,它甚至不支持补全功能。 +唯一的遗憾的是jEdit,它声称自己是一个程序员的文本编辑器,但它缺少其他的基本功能,例如代码折叠,它甚至不能提示或者不全函数. -**Verdict:** +**评分:** - Gedit:3/5 - Kate:5/5 @@ -98,7 +98,7 @@ jEdit是唯一的遗憾,它声称自己是一个程序员的文本编辑器, 高级文本编辑器用户希望能完全通过键盘控制和操作,一些应用程序甚至运行他们的用户自定义快捷方式的键盘绑定。 -你可以轻松的使用Gedit的扩展键盘快捷键。这里有编辑文件,为普通任务,例如对一个文档进行拼写检查,唤起工具的快捷键。你可以获取应用程序内部的一系列默认快捷键,但并没有图形化的方式去自定义它们。相似的,在Sublime中自定义键绑定,你需要修改他的XML键映射文件。Sublime由于缺少定义键盘快捷键的图形化界面而饱受批评,但长期使用的用户已经支持当前的基于文件的机制,这给他们更多的控制能力。 +你可以轻松的使用Gedit的扩展键盘快捷键。这里有编辑文件,为普通任务,例如对一个文档进行拼写检查,唤起工具的快捷键。你可以获取应用程序内部的一系列默认快捷键,但并没有图形化的方式去自定义它们。相似的,在Sublime中自定义键绑定,你需要修改他的XML键映射文件。Sublime由于缺少定义键盘快捷键的图形化界面而饱受批评,但长期使用的用户支持当前的基于文件的机制:这给他们更多的控制能力。 UltraEdit为它"一切都可自定义"的座右铭感到自豪,这也包括键盘快捷键。你可以自定义菜单导航的热键,以及定义你自己的访问大量函数的多键键映射。 @@ -148,7 +148,7 @@ UltraEdit的用户界面是高度可配置的 — 你可以正如改变其它许 Gedit有很普通的外观。通过最小化菜单和按钮有一个简单的界面。但这也是一种双刃剑,因为有些用户可能不会发现它真正的潜能。 -应用程序可以通过在窗口中能重排和移动的选项卡打开多个文件。用户可以通过使用一个插件选择性地启用旁边或者底部用来显示文件浏览和工具输出的面板。这个应用程序会检测到被其它应用程序更改的文件并可以重新加载这个文件。 +Gedit可以通过在窗口中能重排和移动的选项卡打开多个文件。用户可以通过使用一个插件选择性地启用旁边或者底部用来显示文件浏览和工具输出的面板。这个应用程序会检测到被其它应用程序更改的文件并可以重新加载这个文件。 为了适配Gnome,在应用程序的最后一个版本中考虑了大量的用户界面。然而它还并不稳定,尽管包括了所有的功能,和菜单交互的一些插件还需要升级。 @@ -232,7 +232,7 @@ jEdit拥有最令人映像深刻的插件设施。该应用有超过200个插件 ### 纯文本编辑 ### -尽管它们强大的额外功能甚至可能会取代几个流派完全成熟的应用程序,有时候可能只需要使用这些庞大的文本编辑器读写或者编辑简单的纯文本。虽然你可以使用它们中的任何一个输入文本,我们通过普通文本编辑的方便性平均它们。 +尽管它们强大的额外功能甚至可能会取代几个流派完全成熟的应用程序,有时候可能只需要使用这些庞大的文本编辑器读写或者编辑简单的纯文本。虽然你可以使用它们中的任何一个输入文本,我们通过普通文本编辑的方便性评价它们。 Gnome的默认文本编辑器Gedit,支持取消和重做机制以及搜索和替换。它可以对多种语言进行拼写检查,并能通过使用Gnome GVFS库访问和编辑远程文件。 @@ -303,7 +303,7 @@ Kate为能快速响应你的需要而设计,它的界面并不会使你茫然 随你发行版发布的默认文本编辑器也能帮助你一些高级任务。例如KDE的KWrite和Raspbian的Nano。得益于KDE的katepart组件,KWrite继承了一些Kate的功能,得益于在树莓派上的可用性,Nano也开始重现风头。 -如果你希望跟随Linux大师的脚本,你总是可以尝试崇高的文本编辑机Emacs和Vim。想尝试Vim强大的用户首先可以考虑gVim,它通过图形界面展现了Vim的强大。 +如果你希望跟随Linux大师的脚步,你总是可以尝试崇高的文本编辑机Emacs和Vim。想尝试Vim强大的用户首先可以考虑gVim,它通过图形界面展现了Vim的强大。 除了jEdit和Kate,这里还有其他模仿例如Emacs和Vim之类的老派高级编辑器的编辑器,比如JED 编辑器和Joe's Own Editor,这两者都有Emacs的模拟模式。另一方面,如果你在寻找轻量级的代码编辑器,可以看看Bluefish和Geany。他们的存在是为了填补文本编辑器和全面集成的开发平台之间的空隙。 @@ -313,7 +313,7 @@ via: http://www.linuxvoice.com/text-editors/ 作者:[Ben Everard][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[royaso](https://github.com/royaso) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e240424ea94a3c75cda6a3a36e0a450f5a1f7b3f Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 29 Apr 2015 14:42:32 +0800 Subject: [PATCH 0678/2517] =?UTF-8?q?20150429-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...What are good command line HTTP clients.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/share/20150429 What are good command line HTTP clients.md diff --git a/sources/share/20150429 What are good command line HTTP clients.md b/sources/share/20150429 What are good command line HTTP clients.md new file mode 100644 index 0000000000..d809be1a06 --- /dev/null +++ b/sources/share/20150429 What are good command line HTTP clients.md @@ -0,0 +1,110 @@ +What are good command line HTTP clients? +================================================================================ +The whole is greater than the sum of its parts is a very famous quote from Aristotle, a Greek philosopher and scientist. This quote is particularly pertinent to Linux. In my view, one of Linux's biggest strengths is its synergy. The usefulness of Linux doesn't derive only from the huge raft of open source (command line) utilities. Instead, it's the synergy generated by using them together, sometimes in conjunction with larger applications. + +The Unix philosophy spawned a "software tools" movement which focused on developing concise, basic, clear, modular and extensible code that can be used for other projects. This philosophy remains an important element for many Linux projects. + +Good open source developers writing utilities seek to make sure the utility does its job as well as possible, and work well with other utilities. The goal is that users have a handful of tools, each of which seeks to excel at one thing. Some utilities work well independently. + +This article looks at 3 open source command line HTTP clients. These clients let you download files off the internet from a command line. But they can also be used for many more interesting purposes such as testing, debugging and interacting with HTTP servers and web applications. Working with HTTP from the command-line is a worthwhile skill for HTTP architects and API designers. If you need to play around with an API, HTTPie and cURL will be invaluable. + +---------- + +![HTTPie](http://www.linuxlinks.com/portal/content2/png/HTTPie.png) + +![HTTPie in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-httpie.png) + +HTTPie (pronounced aych-tee-tee-pie) is an open source command line HTTP client. It is a a command line interface, cURL-like tool for humans. + +The goal of this software is to make CLI interaction with web services as human-friendly as possible. It provides a simple http command that allows for sending arbitrary HTTP requests using a simple and natural syntax, and displays colorized output. HTTPie can be used for testing, debugging, and generally interacting with HTTP servers. + +#### Features include: #### + +- Expressive and intuitive syntax +- Formatted and colorized terminal output +- Built-in JSON support +- Forms and file uploads +- HTTPS, proxies, and authentication +- Arbitrary request data +- Custom headers +- Persistent sessions +- Wget-like downloads +- Python 2.6, 2.7 and 3.x support +- Linux, Mac OS X and Windows support +- Plugins +- Documentation +- Test coverage + +- Website: [httpie.org][1] +- Developer: Jakub Roztočil +- License: Open Source +- Version Number: 0.9.2 + +---------- + +![cURL](http://www.linuxlinks.com/portal/content2/png/cURL1.png) + +![cURL in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-cURL.png) + +cURL is an open source command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. + +curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks. + +#### Features include: #### + +- Config file support +- Multiple URLs in a single command line +- Range "globbing" support: [0-13], {one,two,three} +- Multiple file upload on a single command line +- Custom maximum transfer rate +- Redirectable stderr +- Metalink support + +- Website: [curl.haxx.se][2] +- Developer: Daniel Stenberg +- License: MIT/X derivate license +- Version Number: 7.42.0 + +---------- + +![Wget](http://www.linuxlinks.com/portal/content2/png/Wget1.png) + +![Wget in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Wget.png) + +Wget is open source software that retrieves content from web servers. Its name is derived from World Wide Web and get. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies. + +Wget can follow links in HTML pages and create local versions of remote web sites, fully recreating the directory structure of the original site. This is known as "recursive downloading." + +Wget has been designed for robustness over slow or unstable network connections. + +Features include: + +- Resume aborted downloads, using REST and RANGE +- Use filename wild cards and recursively mirror directories +- NLS-based message files for many different languages +- Optionally converts absolute links in downloaded documents to relative, so that downloaded documents may link to each other locally +- Runs on most UNIX-like operating systems as well as Microsoft Windows +- Supports HTTP proxies +- Supports HTTP cookies +- Supports persistent HTTP connections +- Unattended / background operation +- Uses local file timestamps to determine whether documents need to be re-downloaded when mirroring + +- Website: [www.gnu.org/software/wget/][3] +- Developer: Hrvoje Niksic, Gordon Matzigkeit, Junio Hamano, Dan Harkless, and many others +- License: GNU GPL v3 +- Version Number: 1.16.3 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150425174537249/HTTPclients.html + +作者:Frazer Kline +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://httpie.org/ +[2]:http://curl.haxx.se/ +[3]:https://www.gnu.org/software/wget/ \ No newline at end of file From 61a4f5a2f9ec61551d22c7d9bae6fc83372d34ab Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 29 Apr 2015 18:37:00 +0800 Subject: [PATCH 0679/2517] Translating by ZTinoZ --- ...kscape - Open Source Vector Graphic Editor.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md index ba022a2efd..f4a957a15f 100644 --- a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md +++ b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md @@ -2,22 +2,22 @@ ================================================================================ Inkscape是一款开源矢量图形编辑工具,它使用可缩放矢量图形(SVG)图形格式并不同于它的竞争对手如Xara X、Corel Draw和Adobe Illustrator等等。SVG是一个广泛部署、免版税使用的图形格式,由W3C SVG工作组开发和维护。这是一个跨平台工具,完美运行于Linux、Windows和Mac OS上。 -Inkscape development was started in 2003, Inkscape's bug tracking system was hosted on Sourceforge initially but it was migrated to Launchpad afterwards. Its current latest stable version is 0.91. It is under continuous development and bug fixes and we will be reviewing its prominent features and installing process in the article. +Inkscape始于2003年,起初它的bug跟踪系统托管于Sourceforge上但是 后来迁移到了Launchpad上。当前它最新的一个稳定版本是0.91,它不断地在发展和修改中。我们将在本文里了解一下它的突出特点和安装过程。 -### Salient Features ### +### 显著特性 ### -Lets review the outstanding features of this application categorically. +让我们直接来了解这款应用程序的显著特性。 -#### Creating Objects #### +#### 创建对象 #### - Drawing different colored sized and shaped freehand lines through pencil tool, straight lines and curves through Bezier (pen) tool, applying freehand calligraphic strokes through calligraphic tool etc - Creating, selecting, editing and formatting text through text tool. Manipulating text in plain text boxes, on paths or in shapes - Helps draw various shapes like rectangles, ellipses, circles, arcs, polygons, stars, spirals etc and then resize, rotate and modify (turn sharp edges round) them - Create and embed bitmaps with simple commands -#### Object manipulation #### +#### 项目控制 #### -- Skewing, moving, scaling, rotating objects through interactive manipulations and pacifying the numeric values +- 通过交互式操作来扭曲、移动、测量、旋转目标Skewing, moving, scaling, rotating objects through interactive manipulations and pacifying the numeric values - Performing raising and lowering Z-order operations - Grouping and ungrouping objects to create a virtual scope for editing or manipulation - Layers form a hierarchal tree and can be locked or rearranged for various manipulations @@ -76,7 +76,7 @@ Congratulation, Inkscape has been installed now and all set for image editing an ![Inkscape Main](http://blog.linoxide.com/wp-content/uploads/2015/03/Inkscape-Main1.png) -### Conclusion ### +### 结论 ### Inkscape is a feature rich graphic editing tool which empowers its user with state of the art capabilities. It is an open source application which is freely available for installation and customizations and supports wide range of file formats including but not limited to JPEG, PNG, GIF and PDF. Visit its [official website][2] for more news and updates regarding this application. @@ -85,7 +85,7 @@ Inkscape is a feature rich graphic editing tool which empowers its user with sta via: http://linoxide.com/tools/install-inkscape-open-source-vector-graphic-editor/ 作者:[Aun Raza][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4c0e81d9d2aa3aed175e86c60b22d59bf9fbbb26 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Wed, 29 Apr 2015 21:40:12 +0800 Subject: [PATCH 0680/2517] Translated by DongShuaike --- ...-2 Setting up a private Docker registry.md | 242 ------------------ ...-2 Setting up a private Docker registry.md | 241 +++++++++++++++++ 2 files changed, 241 insertions(+), 242 deletions(-) delete mode 100644 sources/tech/20150128 Docker-2 Setting up a private Docker registry.md create mode 100644 translated/tech/20150128 Docker-2 Setting up a private Docker registry.md diff --git a/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md b/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md deleted file mode 100644 index 625281ee7c..0000000000 --- a/sources/tech/20150128 Docker-2 Setting up a private Docker registry.md +++ /dev/null @@ -1,242 +0,0 @@ -[Translating by DongShuaike] -Setting up a private Docker registry -================================================================================ -![](http://cocoahunter.com/content/images/2015/01/docker2.jpg) - -[TL;DR] This is the second post in a series of 3 on how my company moved its infrastructure from PaaS to Docker based deployment. - -- [First part][1]: where I talk about the process we went thru before approaching Docker; -- [Third pard][2]: where I show how to automate the entire process of building images and deploying a Rails app with Docker. - ----------- - -Why would ouy want ot set up a provate registry? Well, for starters, Docker Hub only allows you to have one free private repo. Other companies are beginning to offer similar services, but they are all not very cheap. In addition, if you need to deploy production ready applications built with Docker, you might not want to publish those images on the public Docker Hub. - -This is a very pragmatic approach to dealing with the intricacies of setting up a private Docker registry. For the tutorial we will be using a small 512MB instance on DigitalOcean (from now on DO). I also assume you already know the basics of Docker since I will be concentrating on some more complicated stuff. - -### Local set up ### - -First of all you need to install **boot2docker** and docker CLI. If you already have your basic Docker environment up and running, you can just skip to the next section. - -From the terminal run the following command[1][3]: - - brew install boot2docker docker - -If everything is ok[2][4], you will now be able to start the VM inside which Docker will run with the following command: - - boot2docker up - -Follow the instructions, copy and paste the export commands that boot2docker will print in the terminal. If you now run `docker ps` you should be greeted by the following line - - CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES - -Ok, Docker is ready to go. This will be enough for the moment. Let's go back to setting up the registry. - -### Creating the server ### - -Log into you DO account and create a new Droplet by selecting an image with Docker pre-installed[^n]. - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-18-26-14.png) - -You should receive your root credentials via email. Log into your instance and run `docker ps` to see if eveything is ok. - -### Setting up AWS S3 ### - -We are going to use Amazon Simple Storage Service (S3) as the storage layer for our registry / repository. We will need to create a bucket and user credentials to allow our docker container accessoing it. - -Login into your AWS account (if you don't have one you can set one up at [http://aws.amazon.com/][5]) and from the console select S3 (Simple Storage Service). - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-21.png) - -Click on **Create Bucket**, enter a unique name for your bucket (and write it down, we're gonna need it later), then click on **Create**. - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-22-50.png) - -That's it! We're done setting up the storage part. - -### Setup AWS access credentials ### - -We are now going to create a new user. Go back to your AWS console and select IAM (Identity & Access Management). - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-08.png) - -In the dashboard, on the left side of the webpage, you should click on Users. Then select **Create New Users**. - -You should be presented with the following screen: - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-31-42.png) - -Enter a name for your user (e.g. docker-registry) and click on Create. Write down (or download the csv file with) your Access Key and Secret Access Key that we'll need when running the Docker container. Go back to your users list and select the one you just created. - -Under the Permission section, click on Attach User Policy. In the next screen, you will be presented with multiple choices: select Custom Policy. - -![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-41-21.png) - -Here's the content of the custom policy: - - { - "Version": "2012-10-17", - "Statement": [ - { - "Sid": "SomeStatement", - "Effect": "Allow", - "Action": [ - "s3:*" - ], - "Resource": [ - "arn:aws:s3:::docker-registry-bucket-name/*", - "arn:aws:s3:::docker-registry-bucket-name" - ] - } - ] - } - -This will allow the user (i.e. the registry) to manage (read/write) content on the bucket (make sure to use the bucket name you previously defined when setting up AWS S3). To sum it up: when you'll be pushing Docker images from your local machine to your repository, the server will be able to upload them to S3. - -### Installing the registry ### - -Now let's head back to our DO server and SSH into it. We are going to use[^n] one of the [official Docker registry images][6]. - -Let's start our registry with the following command: - - docker run \ - -e SETTINGS_FLAVOR=s3 \ - -e AWS_BUCKET=bucket-name \ - -e STORAGE_PATH=/registry \ - -e AWS_KEY=your_aws_key \ - -e AWS_SECRET=your_aws_secret \ - -e SEARCH_BACKEND=sqlalchemy \ - -p 5000:5000 \ - --name registry \ - -d \ - registry - -Docker should pull the required fs layers from the Docker Hub and eventually start the daemonised container. - -### Testing the registry ### - -If everything worked out, you should now be able to test the registry by pinging it and by searching its content (though for the time being it's still empty). - -Our registry is very basic and it does not provide any means of authentication. Since there are no easy ways of adding authentication (at least none that I'm aware of that are easy enough to implment in order to justify the effort), I've decided that the easiest way of querying / pulling / pushing the registry is an unsecure (over HTTP) connection tunneled thru SSH. - -Opening an SSH tunnel from your local machine is straightforward: - - ssh -N -L 5000:localhost:5000 root@your_registry.com - -The command is tunnelling connections over SSH from port 5000 of the registry server (which is the one we exposed with the `docker run` command in the previous paragraph) to port 5000 on the localhost. - -If you now browse to the following address [http://localhost:5000/v1/_ping][7] you should get the following very simple response - - {} - -This just means that the registry is working correctly. You can also list the whole content of the registry by browsing to [http://localhost:5000/v1/search][8] that will get you a similar response: - - { - "num_results": 2, - "query": "", - "results": [ - { - "description": "", - "name": "username/first-repo" - }, - { - "description": "", - "name": "username/second-repo" - } - ] - } - -### Building an image ### - -Let's now try and build a very simple Docker image to test our newly installed registry. On your local machine, create a Dockerfile with the following content[^n]: - - # Base image with ruby 2.2.0 - FROM ruby:2.2.0 - - MAINTAINER Michelangelo Chasseur - -...and build it: - - docker build -t localhost:5000/username/repo-name . - -The `localhost:5000` part is especially important: the first part of the name of a Docker image will tell the `docker push` command the endpoint towards which we are trying to push our image. In our case, since we are connecting to our remote private registry via an SSH tunnel, `localhost:5000` represents exactly the reference to our registry. - -If everything works as expected, when the command returns, you should be able to list your newly created image with the `docker images` command. Run it and see it for yourself. - -### Pushing to the registry ### - -Now comes the trickier part. It took a me a while to realize what I'm about to describe, so just be patient if you don't get it the first time you read and try to follow along. I know that all this stuff will seem pretty complicated (and it would be if you didn't automate the process), but I promise in the end it will all make sense. In the next post I will show a couple of shell scripts and Rake tasks that will automate the whole process and will let you deploy a Rails to your registry app with a single easy command. - -The docker command you are running from your terminal is actually using the boot2docker VM to run the containers and do all the magic stuff. So when we run a command like `docker push some_repo` what is actually happening is that it's the boot2docker VM that is reacing out for the registry, not our localhost. - -This is an extremely important point to understand: in order to push the Docker image to the remote private registry, the SSH tunnel needs to be established from the boot2docker VM and not from your local machine. - -There are a couple of ways to go with it. I will show you the shortest one (which is not probably the easiest to understand, but it's the one that will let us automate the process with shell scripts). - -First of all though we need to sort one last thing with SSH. - -### Setting up SSH ### - -Let's add our boot2docker SSH key to our remote server (registry) known hosts. We can do so using the ssh-copy-id utility that you can install with the following command shouldn't you already have it: - - brew install ssh-copy-id - -Then run: - - ssh-copy-id -i /Users/username/.ssh/id_boot2docker root@your-registry.com - -Make sure to substitute `/Users/username/.ssh/id_boot2docker` with the correct path of your ssh key. - -This will allow us to connect via SSH to our remote registry without being prompted for the password. - -Finally let's test it out: - - boot2docker ssh "ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &" & - -To break things out a little bit: - -- `boot2docker ssh` lets you pass a command as a parameter that will be executed by the boot2docker VM; -- the final `&` indicates that we want our command to be executed in the background; -- `ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &` is the actual command our boot2docker VM will run; - - the `-o 'StrictHostKeyChecking no'` will make sure that we are not prompted with security questions; - - the `-i /Users/michelangelo/.ssh/id_boot2docker` indicates which SSH key we want our VM to use for authentication purposes (note that this should be the key you added to your remote registry in the previous step); - - finally we are opening a tunnel on mapping port 5000 to localhost:5000. - -### Pulling from another server ### - -You should now be able to push your image to the remote registry by simply issuing the following command: - - docker push localhost:5000/username/repo_name - -In the [next post][9] we'll se how to automate some of this stuff and we'll containerize a real Rails application. Stay tuned! - -P.S. Please use the comments to let me know of any inconsistencies or fallacies in my tutorial. Hope you enjoyed it! - -1. I'm also assuming you are running on OS X. -1. For a complete list of instructions to set up your docker environment and requirements, please visit [http://boot2docker.io/][10] -1. Select Image > Applications > Docker 1.4.1 on 14.04 at the time of this writing. -1. [https://github.com/docker/docker-registry/][11] -1. This is just a stub, in the next post I will show you how to bundle a Rails application into a Docker container. - --------------------------------------------------------------------------------- - -via: http://cocoahunter.com/2015/01/23/docker-2/ - -作者:[Michelangelo Chasseur][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://cocoahunter.com/author/michelangelo/ -[1]:http://cocoahunter.com/2015/01/23/docker-1/ -[2]:http://cocoahunter.com/2015/01/23/docker-3/ -[3]:http://cocoahunter.com/2015/01/23/docker-2/#fn:1 -[4]:http://cocoahunter.com/2015/01/23/docker-2/#fn:2 -[5]:http://aws.amazon.com/ -[6]:https://registry.hub.docker.com/_/registry/ -[7]:http://localhost:5000/v1/_ping -[8]:http://localhost:5000/v1/search -[9]:http://cocoahunter.com/2015/01/23/docker-3/ -[10]:http://boot2docker.io/ -[11]:https://github.com/docker/docker-registry/ diff --git a/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md b/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md new file mode 100644 index 0000000000..6e4f6e4fba --- /dev/null +++ b/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md @@ -0,0 +1,241 @@ +搭建一个私有的Docker registry +================================================================================ +![](http://cocoahunter.com/content/images/2015/01/docker2.jpg) + +[TL;DR]这是系列的第二篇文章,这系列讲述了我的公司如何把基础服务从PaaS迁移到Docker上 + +- [First part][1]: 第一篇文章里我谈到了接触Docker之前的经历; +- [Third pard][2]: 第三篇文章里我展示如何使创建images的过程自动化以及如何用Docker部署一个Rails应用。 + +---------- + +为什么需要搭建一个私有的registry呢?嗯,Docker Hub(一个Docker公共仓库)只允许你拥有一个免费的私有版本库(repo)。其他的公司提供类似服务,但是价格可不便宜。另外,如果你需要部署一个基于Docker的应用产品,恐怕你不希望这些images在开放的Docker Hub被公开吧! + +这篇文章提供了一个非常务实的方法来处理搭建私有Docke registry时出现的各种错综复杂的情况。我们将会使用一个运行于DigitalOcean(之后简称为DO)的非常小巧的512MB实例。并且我会假定你已经了解了Docker的基本概念,因为我必须集中精力在复杂的事情上! + +###本地搭建### + +首先你需要安装**boot2docker**以及docker CLI。如果你已经搭建好了基本的Docker环境,你可以直接跳过这一步。 + +从终端运行以下命令[1][3]: + brew install boot2docker docker + +如果一切顺利[2][4],你现在将能够启动VM,在VM当中输入下列命令: + boot2docker up + +Follow the instructions, copy and paste the export commands that boot2docker will print in the terminal. If you now run `docker ps` you should be greeted by the following line +按照说明,复制粘贴book2docker打印在终端的export命令(这块翻译不太好)。现在运行`docker ps`命令,终端将有以下显示。 + + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + +好了,Docker已经准备就绪。我们回过头去搭建registry。 + +###创建服务器### + +登录进你的DO账号,选择一个提前安装好Docker的映像文件,创建一个新的Drople。[^n] + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-18-26-14.png) + + +你将会以邮件的方式收到一个根用户凭证。登录进去,然后运行`docker ps`命令来查看系统状态。 + +### 搭建AWS S3 ### + +我们现在将使用Amazo Simple Storage Service(S3)作为我们registry/repository的存储层。我们讲需要创建一个桶(bucket)以及用户凭证(user credentials)来允许我们的docker容器访问它。 + +登录到我们的AWS账号(如果没有,就申请一个[http://aws.amazon.com/][5]),在控制台选择S3(Simpole Storage Service) + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-21.png) + +点击 **Create Bucket**,为你的桶输入一个名字(把它写下来,我们一会需要用到它),然后点击**Create**。 + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-22-50.png) + +OK!我们已经搭建好存储部分了。 + +### 安装AWS访问凭证### + +我们现在将要创建一个新的用户。退回到AWS控制台然后选择IAM(Identity & Access Management)。 + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-08.png) + +在dashboard的左边,点击Users。然后选择 **Create New Users**。 + +如图所示: + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-31-42.png) + +输入你的用户名(例如 docker-registry)然后点击Create。写下(或者下载csv文件)你的Access Key以及Secret Access Key。回到你的用户列表然后选择你刚刚创建的用户。 + +在Permission section下面,点击Attach User Policy。之后,选择Custom Policy。 + +![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-41-21.png) + +custom policy的内容如下: + + { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "SomeStatement", + "Effect": "Allow", + "Action": [ + "s3:*" + ], + "Resource": [ + "arn:aws:s3:::docker-registry-bucket-name/*", + "arn:aws:s3:::docker-registry-bucket-name" + ] + } + ] + } + +这个配置将允许用户(也就是regitstry)来对桶上的内容进行操作(读/写)(确保使用你之前创建AWS S3时使用的桶名)。总结起来:当你想把你的Docker映像从你的本机推送到仓库中时,服务器将能够将他们上传到S3。 + +### 安装registry ### + +现在回过头来看我们的DO服务器,SSH登录其上。我们将要使用[^n]一个官方Docker registry映像。[6] + +输入如下命令,开启registry。 + + docker run \ + -e SETTINGS_FLAVOR=s3 \ + -e AWS_BUCKET=bucket-name \ + -e STORAGE_PATH=/registry \ + -e AWS_KEY=your_aws_key \ + -e AWS_SECRET=your_aws_secret \ + -e SEARCH_BACKEND=sqlalchemy \ + -p 5000:5000 \ + --name registry \ + -d \ + registry + +Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动守护容器(daemonised container)。 + +### 测试registry ### + +如果上述操作奏效,你可以通过ping命令,或者查找它的内容来测试registry(虽然这个时候容器还是空的)。 + +我们的registry非常基础,而且没有提供任何“验明正身”的方式。因为添加身份验证可不是一件轻松事(至少我认为没有一种部署方法是简单的,像是为了证明你努力过似的),我觉得 查询/拉取/推送 仓库内容的最简单方法就是通过SSH的未加密连接(通过HTTP)。 + +打开SSH通道的操作非常简单: + + ssh -N -L 5000:localhost:5000 root@your_registry.com + +这条命令建立了一条从registry服务器(前面执行`docker run`命令的时候我们见过它)的5000号端口到本机的5000号端口之间的连接。 + +如果你现在登录[http://localhost:5000/v1/_ping][7],将会看到下面这个非常简短的回复。 + + {} + +这个意味着registry工作正常。你还可以通过登录[http://localhost:5000/v1/search][8]来查看registry内容,回复相似: + + { + "num_results": 2, + "query": "", + "results": [ + { + "description": "", + "name": "username/first-repo" + }, + { + "description": "", + "name": "username/second-repo" + } + ] + } + +### 创建一个映像 ### + +我们现在创建一个非常简答的Docker映像,来检验我们新弄好的registry。在我们的本机上,用如下内容创建一个Dockerfile[^n]: + + + # Base image with ruby 2.2.0 + FROM ruby:2.2.0 + + MAINTAINER Michelangelo Chasseur + +……创建: + + docker build -t localhost:5000/username/repo-name . + +`localhost:5000`非常重要:Docker映像名的最前面一个部分将告知`docker push`命令我们将要把我们的image推送到哪里。在我们这个例子当中,因为我们要通过SSH管道连接远端私有registry,`localhost:5000`精确地表示了对我们的registry的一个引用。 + +如果一切顺利,当命令执行完成返回后,你可以输入`docker images`命令来列出新近创建的映像。执行它看看会出现什么现象? + +### 推送到仓库 ### + +接下来是更好玩的部分。实现我所描述的东西着实花了我一点时间,所以如果你第一次读的话就耐心一点吧,跟着我一起操作。我知道接下来的东西会非常复杂(如果你不自动化进程就一定会这样),但是我保证到最后你一定都能明白。在下一篇文章里我将会使用到一大波shell脚本和Rake任务,通过它们实现自动化并且用简单的命令实现部署Rails应用。 + +你运行的docker命令都是实际上都是在boot2docker虚拟机上运行的。所以当你执行像`docker push some_repo`这样的命令时,是boot2docker虚拟机在与registry交互,而不是我们自己的机器。 + +接下来是一个非常重要的点:为了将Docker映像推送到远端的私有才哭,SSH管道需要在boot2docker虚拟机上配置好。 + +由许多种方法实现它。我给你展示最简短的一种(可能不是最容易理解的,但是能够帮助你实现自动化) + +First of all though we need to sort one last thing with SSH. +(不太会翻译) + +### Setting up SSH ### + +我们添加boot2docker SSH key到远端服务器已知的hosts里面。我们可以使用ssh-copy-id工具,通过下面的命令就可以安装上它了: + + brew install ssh-copy-id + +然后运行: + + ssh-copy-id -i /Users/username/.ssh/id_boot2docker root@your-registry.com + +用你ssh key的真实路径代替`/Users/username/.ssh/id_boot2docker`。 + +这样做能够让我们面密码登录SSH。 + +现在我们来测试以下: + + boot2docker ssh "ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &" & + +分开阐述: + +- `boot2docker ssh`允许你以参数的形式传递给boot2docker虚拟机一条执行命令; +- 最后面那个`&`表明这条命令将在后台执行; +- `ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &`是boot2docker虚拟机实际运行的命令; + -`-o 'StrictHostKeyChecking no'`——不提示安全问题; + - `-i /Users/michelangelo/.ssh/id_boot2docker`指出虚拟机使用哪个SSH key来进行身份验证。(注意这里的key应该是你前面添加到远程仓库的那个) + - 最后我们将打开一条端口5000到本地端口5000的SSH通道。 + +### 从其他服务器上拉取 ### + +你现在将可以通过下面的简单命令将你的映像推送到远端仓库: + + docker push localhost:5000/username/repo_name + +在下一篇文章[9]中,我们将会了解到如何自动化处理这些事务,并且真正地容器化一个Rails应用。请继续收听! +如有错误,请不吝指出。祝你Docker之路顺利! +1. 我假设你使用OS X。 +1. 想要了解搭建docker环境的完整之南,请参阅[http://boot2docker.io/][10]。 +1. 本文写成时选择的是 Image > Applications > Docker 1.4.1 on 14.04。 +1. [https://github.com/docker/docker-registry/][11] +1. 这是一个存根,在下一篇文章里我将会展示给你如何将一个Rails应用绑定进Docker容器中。 + +-------------------------------------------------------------------------------- + +via: http://cocoahunter.com/2015/01/23/docker-2/ + +作者:[Michelangelo Chasseur][a] +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://cocoahunter.com/author/michelangelo/ +[1]:http://cocoahunter.com/2015/01/23/docker-1/ +[2]:http://cocoahunter.com/2015/01/23/docker-3/ +[3]:http://cocoahunter.com/2015/01/23/docker-2/#fn:1 +[4]:http://cocoahunter.com/2015/01/23/docker-2/#fn:2 +[5]:http://aws.amazon.com/ +[6]:https://registry.hub.docker.com/_/registry/ +[7]:http://localhost:5000/v1/_ping +[8]:http://localhost:5000/v1/search +[9]:http://cocoahunter.com/2015/01/23/docker-3/ +[10]:http://boot2docker.io/ +[11]:https://github.com/docker/docker-registry/ From 94df559a044fa86a6162e221dcd1b8ac21919cb9 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Wed, 29 Apr 2015 21:53:42 +0800 Subject: [PATCH 0681/2517] DongShuaike translating --- ...150128 Docker-3 Automated Docker-based Rails deployments.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md b/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md index f450361a68..9b41996378 100644 --- a/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md +++ b/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md @@ -1,3 +1,4 @@ +[Translating by DongShuaike] Automated Docker-based Rails deployments ================================================================================ ![](http://cocoahunter.com/content/images/2015/01/docker3.jpeg) @@ -250,4 +251,4 @@ via: http://cocoahunter.com/2015/01/23/docker-3/ [7]:http://cocoahunter.com/2015/01/23/docker-3/#fn:1 [8]:http://cocoahunter.com/2015/01/23/docker-3/#fn:2 [9]:http://cocoahunter.com/2015/01/23/docker-2/ -[10]:http://cocoahunter.com/2015/01/23/docker-2/ \ No newline at end of file +[10]:http://cocoahunter.com/2015/01/23/docker-2/ From c9fbf07b4047ecff872ac1754745a812f93014ac Mon Sep 17 00:00:00 2001 From: Mo Date: Wed, 29 Apr 2015 23:34:22 +0800 Subject: [PATCH 0682/2517] [translated]The history of Android - 14 --- .../14 - The history of Android.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 translated/talk/The history of Android/14 - The history of Android.md diff --git a/translated/talk/The history of Android/14 - The history of Android.md b/translated/talk/The history of Android/14 - The history of Android.md new file mode 100644 index 0000000000..ce808f63da --- /dev/null +++ b/translated/talk/The history of Android/14 - The history of Android.md @@ -0,0 +1,82 @@ +安卓编年史 +================================================================================ +### 语音操作——口袋里的超级电脑 ### + +2010年8月,作为语音搜索应用的一项新功能,“[语音命令][1]”登陆了安卓市场。语音命令允许用户向他们的手机发出语音命令,然后安卓会试着去理解他们并完成任务。像“导航至[地址]”这样的命令会打开谷歌地图并且开始逐向导航至你所陈述的目的地。你还可以仅仅通过语音来发送短信或电子邮件,拨打电话,打开网站,获取方向,或是在地图上查看一个地点。 + +注:youtube视频地址 + + +语音命令是谷歌新应用设计哲学的顶峰。语音命令是那时候最先进的语音控制软件,秘密在于谷歌并不在设备上做任运算。一般来说,语音识别是对CPU的密集任务要求。实际上,许多语音识别程序仍然有“速度与准确性”设置,用户可以选择他们愿意为语音识别算法运行等待的时间——更多的CPU处理意味着更加准确。 + +谷歌的创新在于没有劳烦手机上能力有限的处理器来进行语音识别运算。当说出一个命令时,用户的声音会被打包并通过互联网发送到谷歌云服务器。在那里,谷歌超算中心的超级计算机分析并解释语音,然后发送回手机。这是很长的一段旅程,但互联网最终还是有足够快的速度在一两秒内完成像这样的任务。 + +很多人抛出词语“云计算”来表达“所有东西都被存储在服务器上”,但这才是真正的云计算。谷歌在云端进行这些巨量的运算操作,又因为在这个问题上投入了看似荒唐的CPU资源数目,所以语音识别准确性的唯一限制就是算法本身了。软件不需要由每个用户独立“训练”,因为所有使用语音操作的人无时不刻都在训练它。借助互联网的力量,安卓在你的口袋里放了一部超级电脑,同时相比于已有的解决方案,把语音识别这个工作量从口袋大小的电脑转移到房间大小的电脑上大大提高了准确性。 + +语音识别作为谷歌的项目已经有一段时间了,它的出现都是因为一个800号码。[1-800-GOOG-411][2]是个谷歌从2007年4月起开通的免费电话信息服务。它就像411信息服务一样工作了多年——用户可以拨打这个号码询问电话号码——但是谷歌免费提供这项服务。查询过程中没有人工的干预,411服务由语音识别和文本语音转换引擎驱动。语音命令就是人们教谷歌如何去听之后三年才有实现的可能。 + +语音识别是谷歌长远思考的极佳范例——公司并不怕在一个可能成不了商业产品的项目上投资多年。今天,语音识别驱动的产品遍布谷歌。它被用在谷歌搜索应用的输入,安卓的语音输入,以及Google.com。同时它还是Google Glass和[Android Wear][3]的默认输入界面。 + +谷歌甚至还在输入之外的地方使用语音识别。谷歌的语音识别技术被用在了转述Youtube视频上,它能自动生成字幕供听障用户观看。生成的字幕甚至被谷歌做成了索引,所以你可以搜索某句话在视频的哪里说过。语音是许多产品的未来,并且这项长期计划将谷歌带入了屈指可数的拥有自家语音识别服务的公司行列。大部分其它的语音识别产品,像苹果的Siri和三星设备,被迫使用——并且为其支付了授权费——Nuance的语音识别。 + +在计算机听觉系统设立运行之后,谷歌下一步将把这项策略应用到计算机视觉上。这就是为什么像Google Goggles,Google图像搜索和[Project Tango][4]这样的项目存在的原因。就像GOOG-411的那段日子,这些项目还处在早期阶段。当[谷歌的机器人部门][5]造出了机器人,它会需要看和听,谷歌的计算机视觉和听觉项目会给谷歌一个先机。 + +![Nexus S,第一部三星制造的Nexus手机。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/NS500.png) +Nexus S,第一部三星制造的Nexus手机。 + +### Android 2.3 Gingerbread——第一次UI大变 ### + +Gingerbread(姜饼人)发布于2010年12月,这已是2.2发布整整七个月之后了。尽管如此,等待是值得的,因为安卓2.3整个系统的每个界面几乎都改变了。这是从安卓0.9最初的样式以来第一次重大的更新。2.3开始了一系列持续的改进,试着将安卓从丑陋的小鸭子变成能承载它自己的合适的样子——从美学角度——来对抗iPhone。 + +说到苹果,六个月前,它发布了iPhone 4和iOS 4,新增了多任务处理和Facetime视频聊天。微软同样也终于重返这场游戏。微软在2010年11月发布了Windows Phone 7,也进入了智能手机时代。 + +安卓2.3在界面设计上投入了很多精力,但是由于缺乏方向或设计文档,许多应用仅仅止步于获得了一个新的定制主题而已。一些应用用了更扁平的暗色主题,一些用了充满渐变,活泼的暗色主题,其他应用则是高对比度的白色和绿色组合。尽管2.3并没有做到风格统一,Gingerbread还是完成了让系统几乎每个部分变得更现代化的任务。这同样是件好事,因为下一个手机版安卓要在将近一年后才到来。 + +Gingerbread的首发设备是Nexus S,谷歌的第二部旗舰设备,并且是第一部由三星生产的Nexus设备。尽管今天我们已经习惯了每年都有更新型号的CPU,那时候可不是这个样子。Nexus S有个1GHz Cortex A8处理器,和Nexus One是一样的。GPU从速度来说略微有所变快。Nexus S稍微比Nexus One大一点,拥有800×480分辨率的AMOLED显示屏。 + +从参数上来说,Nexus S看起来只是个平淡无奇的升级,但他确实开了安卓的许多先河。Nexus S是谷歌第一部没有MicroSD卡槽的旗舰,板载16GB存储。Nexus One只有512MB存储空间,但它有MicroSD卡槽。移除SD卡槽为用户简化了存储管理——现在只有一个存储地点了——但是影响了高级用户的扩展能力。它是谷歌第一部带有NFC的手机,手机背面的一个特殊芯片能够在和其他NFC芯片接触时传输数据。Nexus S暂时只能读取NFC标签,而不能发送数据。 + +托Gingerbread中一些升级的福,Nexus S是第一部不带有硬件十字方向键或轨迹球安卓手机之一。Nexus S缩减到只有电源,音量以及四个导航键。Nexus S同时还是如今[疯狂的曲面手机][6]的先驱,因为三星给Nexus S配备了一块略微有些弯曲的玻璃。 + +![Gingerbread更改了状态栏和壁纸,并且添加了许多新图标。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/appdrawershop.png) +Gingerbread更改了状态栏和壁纸,并且添加了许多新图标。 +Ron Amadeo供图 + +升级过的“Nexus”动态壁纸作为Nexus S的独占发布。这个壁纸基本上和Nexus One的一样,带有带动画轨迹的光点。在Nexus S上,去除了方阵设计,取而代之的是波浪形的蓝/灰色背景。底部dock有了直角和彩色图标。 + +![新通知面板和菜单。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/32.png) +新通知面板和菜单。 +Ron Amadeo供图 + +状态栏自0.9的首次登场以来终于得到了重制。状态栏从白色渐变变成纯黑,所有图标重绘成了灰色和绿色。所有东西看起来都更加清爽和现代,这要感谢锐角图标设计和高分辨率。最奇怪的决定可能是从状态栏时钟移除了时间段显示以及信号强度那令人疑惑的灰色。尽管灰色被用在状态栏的许多图标上,而且上面截图有四格灰色信号,安卓实际上指示的是没有信号。绿色格表示信号强度,灰色格指示的是“空”信号格。 + +Gingerbread的状态栏图标同时还作为网络连接的状态指示。如果你的设备连接到了谷歌的服务器,图标会变绿,如果没有谷歌的连接,图标会是白色的。这让你可以在外出时轻松了解你的网络连接状态。 + +通知面板的设计从安卓1.5的设计改进而来。我们看到UI部分再次从浅色主题变为暗色主题,有个深灰色顶部,黑色背景以及在灰色底色上的黑色文本。 + +菜单颜色同样变深了,背景从白色变成了带点透明的黑色。菜单图标和背景的对比并没有它应该有的那么强烈,因为灰色图标的颜色和它们在白色背景上的时候是一样的。要求改变颜色意味着每个开发者都得制作新的图标,所以谷歌在黑色背景上使用了先前就有的灰色。这是系统级别的改变,所以这个新菜单会出现在每个应用中。 + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。 + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/14/ + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2010/08/google-beefs-up-voice-search-mobile-sync/ +[2]:http://arstechnica.com/business/2007/04/google-rolls-out-free-411-service/ +[3]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ +[4]:http://arstechnica.com/gadgets/2014/02/googles-project-tango-is-a-smartphone-with-kinect-style-computer-vision/ +[5]:http://arstechnica.com/gadgets/2013/12/google-robots-former-android-chief-will-lead-google-robotics-division/ +[6]:http://arstechnica.com/gadgets/2013/12/lg-g-flex-review-form-over-even-basic-function/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 359cf39c069a5c40b9cf4cc38aa35f9544d963a0 Mon Sep 17 00:00:00 2001 From: chenjt Date: Thu, 30 Apr 2015 08:43:08 +0800 Subject: [PATCH 0683/2517] [translated]How to secure SSH login with one-time passwords on Linux --- ... login with one-time passwords on Linux.md | 181 ------------------ ... login with one-time passwords on Linux.md | 178 +++++++++++++++++ 2 files changed, 178 insertions(+), 181 deletions(-) delete mode 100644 sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md create mode 100644 translated/tech/20150330 How to secure SSH login with one-time passwords on Linux.md diff --git a/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md b/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md deleted file mode 100644 index 56888f3342..0000000000 --- a/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md +++ /dev/null @@ -1,181 +0,0 @@ -[bazz222222222] -How to secure SSH login with one-time passwords on Linux -================================================================================ -As someone says, security is a not a product, but a process. While SSH protocol itself is cryptographically secure by design, someone can wreak havoc on your SSH service if it is not administered properly, be it weak passwords, compromised keys or outdated SSH client. - -As far as SSH authentication is concerned, [public key authentication][1] is in general considered more secure than password authentication. However, key authentication is actually not desirable or even less secure if you are logging in from a public or shared computer, where things like stealth keylogger or memory scraper can always a possibility. If you cannot trust the local computer, it is better to use something else. This is when "one-time passwords" come in handy. As the name implies, each one-time password is for single-use only. Such disposable passwords can be safely used in untrusted environments as they cannot be re-used even when they are stolen. - -One way to generate disposable passwords is [Google Authenticator][2]. In this tutorial, I am going to demonstrate another way to create one-time passwords for SSH login: [OTPW][3], a one-time password login package. Unlike Google Authenticator, you do not rely on any third party for one-time password generation and verification. - -### What is OTPW? ### - -OTPW consists of one-time password generator and PAM-integrated verification routines. In OTPW, one-time passwords are generated apriori with the generator, and carried by a user securely (e.g., printed in a paper sheet). Cryptographic hash of the generated passwords are then stored in the SSH server host. When a user logs in with a one-time password, OTPW's PAM module verifies the password, and invalidates it to prevent re-use. - -### Step One: Install and Configure OTPW on Linux ### - -#### Debian, Ubuntu or Linux Mint #### - -Install OTPW packages with apt-get. - - $ sudo apt-get install libpam-otpw otpw-bin - -Open a PAM configuration file for SSH (/etc/pam.d/sshd) with a text editor, and comment out the following line (to disable password authentication). - - #@include common-auth - -and add the following two lines (to enable one-time password authentication): - - auth required pam_otpw.so - session optional pam_otpw.so - -![](https://farm8.staticflickr.com/7599/16775121360_d1f93feefa_b.jpg) - -#### Fedora or CentOS/RHEL #### - -OTPW is not available as a prebuilt package on Red Hat based systems. So let's install OTPW by building it from the source. - -First, install prerequites: - - $ sudo yum git gcc pam-devel - $ git clone https://www.cl.cam.ac.uk/~mgk25/git/otpw - $ cd otpw - -Open Makefile with a text editor, and edit a line that starts with "PAMLIB=" as follows. - -On 64-bit system: - - PAMLIB=/usr/lib64/security - -On 32-bit system: - - PAMLIB=/usr/lib/security - -Compile and install it. Note that installation will automatically restart an SSH server. So be ready to be disconnected if you are on an SSH connection. - - $ make - $ sudo make install - -Now you need to update SELinux policy since /usr/sbin/sshd tries to write to user's home directory, which is not allowed by default SELinux policy. The following commands will do. If you are not using SELinux, skip this step. - - $ sudo grep sshd /var/log/audit/audit.log | audit2allow -M mypol - $ sudo semodule -i mypol.pp - -Next, open a PAM configuration file for SSH (/etc/pam.d/sshd) with a text editor, and comment out the following line (to disable password authentication). - - #auth substack password-auth - -and add the following two lines (to enable one-time password authentication): - - auth required pam_otpw.so - session optional pam_otpw.so - -#### Step Two: Configure SSH Server for One-time Passwords #### - -The next step is to configure an SSH server to accept one-time passwords. - -Open /etc/ssh/sshd_config with a text editor, and set the following three parameters. Make sure that you do not add these lines more than once, because that will cause an SSH server to fail. - - UsePrivilegeSeparation yes - ChallengeResponseAuthentication yes - UsePAM yes - -You also need to disable default password authentication. Optionally, enable public key authentication, so that you can fall back to key-based authentication in case you do not have one-time passwords. - - PubkeyAuthentication yes - PasswordAuthentication no - -Now restart SSH server. - -Debian, Ubuntu or Linux Mint: - - $ sudo service ssh restart - -Fedora or CentOS/RHEL 7: - - $ sudo systemctl restart sshd - -#### Step Three: Generate One-time Passwords with OTPW #### - -As mentioned earlier, you need to create one-time passwords beforehand, and have them stored on the remote SSH server host. For this, run otpw-gen tool as the user you will be logging in as. - - $ cd ~ - $ otpw-gen > temporary_password.txt - -![](https://farm9.staticflickr.com/8751/16961258882_c49cfe03fb_b.jpg) - -It will ask you to set a prefix password. When you later log in, you need to type this prefix password AND one-time password. Essentially the prefix password is another layer of protection. Even if the password sheet falls into the wrong hands, the prefix password forces them to brute-force. - -Once the prefix password is set, the command will generate 280 one-time passwords, and store them in the output text file (e.g., temporary_password.txt). Each password (length of 8 characters by default) is preceded by a three-digit index number. You are supposed to print the file in a sheet and carry it with you. - -![](https://farm8.staticflickr.com/7281/16962594055_c2696d5ae1_b.jpg) - -You will also see ~/.otpw file created, where cryptographic hashs of these passwords are stored. The first three digits in each line indicate the index number of the password that will be used for SSH login. - - $ more ~/.otpw - ----------- - - OTPW1 - 280 3 12 8 - 191ai+:ENwmMqwn - 218tYRZc%PIY27a - 241ve8ns%NsHFmf - 055W4/YCauQJkr: - 102ZnJ4VWLFrk5N - 2273Xww55hteJ8Y - 1509d4b5=A64jBT - 168FWBXY%ztm9j% - 000rWUSdBYr%8UE - 037NvyryzcI+YRX - 122rEwA3GXvOk=z - -### Test One-time Passwords for SSH Login ### - -Now let's login to an SSH server in a usual way: - - $ ssh user@remote_host - -If OTPW is successfully set up, you will see a slightly different password prompt: - - Password 191: - -Now open up your password sheet, and look for index number "191" in the sheet. - - 023 kBvp tq/G 079 jKEw /HRM 135 oW/c /UeB 191 fOO+ PeiD 247 vAnZ EgUt - -According to sheet above, the one-time password for number "191" is "fOO+PeiD". You need to prepend your prefix password to it. For example, if your prefix password is "000", the actual one-time password you need to type is "000fOO+PeiD". - -Once you successfully log in, the password used is automatically invalidated. If you check ~/.otpw, you will notice that the first line is replaced with "---------------", meaning that password "191" has been voided. - - OTPW1 - 280 3 12 8 - --------------- - 218tYRZc%PIY27a - 241ve8ns%NsHFmf - 055W4/YCauQJkr: - 102ZnJ4VWLFrk5N - 2273Xww55hteJ8Y - 1509d4b5=A64jBT - 168FWBXY%ztm9j% - 000rWUSdBYr%8UE - 037NvyryzcI+YRX - 122rEwA3GXvOk=z - -### Conclusion ### - -In this tutorial, I demonstrated how to set up one-time password login for SSH using OTPW package. You may realized that a print sheet can be considered a less fancy version of security token in two-factor authentication. Yet, it is simpler and you do not rely on any third-party for its implementation. Whatever mechanism you are using to create disposable passwords, they can be helpful when you need to log in to an SSH server from an untrusted public computer. Feel free to share your experience or opinion on this topic. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/secure-ssh-login-one-time-passwords-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/how-to-force-ssh-login-via-public-key-authentication.html -[2]:http://xmodulo.com/two-factor-authentication-ssh-login-linux.html -[3]:http://www.cl.cam.ac.uk/~mgk25/otpw.html diff --git a/translated/tech/20150330 How to secure SSH login with one-time passwords on Linux.md b/translated/tech/20150330 How to secure SSH login with one-time passwords on Linux.md new file mode 100644 index 0000000000..f3668f14f0 --- /dev/null +++ b/translated/tech/20150330 How to secure SSH login with one-time passwords on Linux.md @@ -0,0 +1,178 @@ +使用 SSH 和一次性密码安全登录 Linux +================================================================================ +有人说,安全不是一个产品,而是一个过程(LCTT 注:安全公司 McAfee 认为,安全风险管理是一个方法论,而不是安全产品的堆叠)。虽然 SSH 协议被设计成使用加密技术来确保安全,但如果使用不当,别人还是能够破坏你的系统:比如弱密码、密钥泄露、使用的 SSH 客户端过时等,都能引发安全问题。 + +在考虑 SSH 认证方案时,大家普遍认为[公钥认证][1]比密码认证更安全。然而,公钥认证技术并不是为公共环境设置的,如果你在一台公用电脑上使用公钥认证登录 SSH 服务器,你的服务器已经毫无安全可言了,公用的电脑可能会记录你的公钥,或从你的内存中读取公钥。如果你不信任本地电脑,那你最好还是使用其他方式登录服务器。现在就是“一次性密码”派上用场的时候了,就像名字所示,一次性密码只能被使用一次。这种一次性密码非常合适在不安全的环境下发挥作用,就算它被窃取,也无法再次使用。 + +有个一次性密码方案叫[谷歌认证][2],但在本文中,我要介绍的是另一种 SSH 登录方案:[OTPW][3],它是个一次性密码登录的软件包。不像谷歌认证,OTPW 不需要依赖任何第三方库。 + +### OTPW 是什么 ### + +OTPW 由一次性密码生成器和 PAM 认证规则组成。在 OTPW 中一次性密码由生成器事先生成,然后由用户以某种安全的方式获得(比如打印到纸上)。另一方面,这些密码会通过 Hash 加密保存在 SSH 服务器端。当用户使用一次性密码登录系统时,OTPW 的 PAM 模块认证这些密码,并且保证它们不能再次使用。 + +### 步骤1:OTPW 的安装和配置 ### + +#### 在 Debian, Ubuntu 或 Linux Mint 发行版上 #### + +使用 apt-get 安装: + + $ sudo apt-get install libpam-otpw otpw-bin + +打开针对 SSH 服务的 PAM 配置文件(/etc/pam.d/sshd),注释掉下面这行(目的是禁用 PAM 的密码认证功能): + + #@include common-auth + +添加下面两行(用于打开一次性密码认证功能): + + auth required pam_otpw.so + session optional pam_otpw.so + +![](https://farm8.staticflickr.com/7599/16775121360_d1f93feefa_b.jpg) + +#### 在 Fedora 或 CentOS/RHEL 发行版上 #### + +在基于 RedHat 的发行版中没有编译好的 OTPW,所以我们需要使用源代码来安装它。 + +首先,安装编译环境: + + $ sudo yum git gcc pam-devel + $ git clone https://www.cl.cam.ac.uk/~mgk25/git/otpw + $ cd otpw + +打开 Makefile 文件,编辑以“PAMLIB=”开头的那行配置: + +64 位系统: + + PAMLIB=/usr/lib64/security + +32 位系统: + + PAMLIB=/usr/lib/security + +编译安装。需要注意的是安装过程会把 SSH 服务重启一下,所以如果你是使用 SSH 连接到服务器,做好被断开连接的准备吧。 + + $ make + $ sudo make install + +现在你需要更新 SELinux 策略,因为 /usr/sbin/sshd 会往你的 home 目录写数据,而 SELinux 默认是不允许这么做的。如果你使用了 SELinux 服务(LCTT 注:使用 getenforce 命令查看结果,如果是 enforcing,就是打开了 SELinux 服务),如果没有使用 SELinux 服务,请跳过这一步。 + + $ sudo grep sshd /var/log/audit/audit.log | audit2allow -M mypol + $ sudo semodule -i mypol.pp + +接下来打开 PAM 配置文件(/etc/pam.d/sshd),注释下面这行(为了禁用密码认证): + + #auth substack password-auth + +添加下面两行(用于打开一次性密码认证功能): + + auth required pam_otpw.so + session optional pam_otpw.so + +#### 步骤2:配置 SSH 服务器,使用一次性密码 #### + +打开 /etc/ssh/sshd_config 文件,设置下面三个参数。你要确保下面的参数不会重复存在,否则 SSH 服务器可能会出现异常。 + + UsePrivilegeSeparation yes + ChallengeResponseAuthentication yes + UsePAM yes + +你还需要禁用默认的密码认证功能。另外可以选择开启公钥认证功能,那样的话你就可以在没有一次性密码的时候使用公钥进行认证。 + + PubkeyAuthentication yes + PasswordAuthentication no + +重启 SSH 服务器。 + +Debian, Ubuntu 或 Linux Mint 发行版: + + $ sudo service ssh restart + +Fedora 或 CentOS/RHEL 7 发行版: + + $ sudo systemctl restart sshd + +#### 步骤3:使用 OTPW 产生一次性密码 #### + +之前提到过,你需要事先创建一次性密码,并保存起来。使用 otpw-gen 命令创建密码: + + $ cd ~ + $ otpw-gen > temporary_password.txt + +![](https://farm9.staticflickr.com/8751/16961258882_c49cfe03fb_b.jpg) + +这个命令会让你输入密码前缀,当你以后登录的时候,你需要同时输入这个前缀以及一次性密码。密码前缀是另外一层保护,就算你的一次性密码表被泄漏,别人也无法通过暴力破解你的 SSH 密码。 + +设置好密码前缀后,这个命令会产生 280 个一次性密码,并将它们保存在一个文本文件中(如 temporary_password.txt)。每个密码(默认是 8 个字符)由一个 3 位十进制数索引。你需要将这个密码表打印出来,并随身携带。 + +![](https://farm8.staticflickr.com/7281/16962594055_c2696d5ae1_b.jpg) + +查看 ./.otpw 文件,它存放了一次性密码的 HASH 值。头 3 位十进制数与你随身携带的密码表的索引一一对应,在你登录 SSH 服务器的时候会被用到。 + + $ more ~/.otpw + +---------- + + OTPW1 + 280 3 12 8 + 191ai+:ENwmMqwn + 218tYRZc%PIY27a + 241ve8ns%NsHFmf + 055W4/YCauQJkr: + 102ZnJ4VWLFrk5N + 2273Xww55hteJ8Y + 1509d4b5=A64jBT + 168FWBXY%ztm9j% + 000rWUSdBYr%8UE + 037NvyryzcI+YRX + 122rEwA3GXvOk=z + +### 测试一次性密码登录 SSH 服务器 ### + +使用普通的方式登录 SSH 服务器: + + $ ssh user@remote_host + +如果 OTPW 成功运行,你会看到一点与平时登录不同的地方: + + Password 191: + +现在打开你的密码表,找到索引号为 191 的密码。 + + 023 kBvp tq/G 079 jKEw /HRM 135 oW/c /UeB 191 fOO+ PeiD 247 vAnZ EgUt + +从上表可知,191 号密码是“fOO+PeiD”。你需要加上密码前缀,比如你设置的前缀是“000”,则你实际需要输入的密码是“000fOO+PeiD”。 + +成功登录后,你这次输入的密码自动失效。查看 ~/.otpw 文件,你会发现第一行变成“---------------”,这表示 191 号密码失效了。 + + OTPW1 + 280 3 12 8 + --------------- + 218tYRZc%PIY27a + 241ve8ns%NsHFmf + 055W4/YCauQJkr: + 102ZnJ4VWLFrk5N + 2273Xww55hteJ8Y + 1509d4b5=A64jBT + 168FWBXY%ztm9j% + 000rWUSdBYr%8UE + 037NvyryzcI+YRX + 122rEwA3GXvOk=z + +### 总结 ### + +在这个教程中,我介绍了如何使用 OTPW 工具来设置一次性登录密码。你也许意识到了在这种两个因子的认证方式中,打印一张密码表让人感觉好 low,但是这种方式是最简单的,并且不用依赖任何第三方软件。无论你用哪种方式创建一次性密码,在你需要在一个不被信任的环境登录 SSH 服务器的时候,它们都很有用。你可以就这个主题来分享你的经验和观点。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/secure-ssh-login-one-time-passwords-linux.html + +作者:[Dan Nanni][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-force-ssh-login-via-public-key-authentication.html +[2]:http://xmodulo.com/two-factor-authentication-ssh-login-linux.html +[3]:http://www.cl.cam.ac.uk/~mgk25/otpw.html From bd972dd5044ecd6bb0d2a7e20569379a424b280f Mon Sep 17 00:00:00 2001 From: Vic___ Date: Thu, 30 Apr 2015 14:19:41 +0800 Subject: [PATCH 0684/2517] translated --- ... ixgbe driver on CentOS, RHEL or Fedora.md | 51 ++++++++++--------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md b/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md index ac871512e1..e5f8f6bcc7 100644 --- a/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md +++ b/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md @@ -1,61 +1,62 @@ - Vic020 +Linux 有问必答 -- 如何在红帽系linux中编译Ixgbe -Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora ================================================================================ -> **Question**: I want to build and install the latest ixgbe 10G NIC driver. How can I compile ixgbe driver on CentOS, Fedora or RHEL? +> **提问**:我想要安装最新版的ixgbe 10G网卡驱动。在CentOS, Fedora 或 RHEL中,我应该如何编译ixgbe驱动? -To use Intel's PCI Express 10G NICs (e.g., 82598, 82599, x540) on your Linux system, you need to install ixgbe driver. While modern Linux distributions come with ixgbe driver pre-installed as a loadable module, the pre-built ixgbe driver is not fully customizable with limited parameters. If you want to enable and customize all available features of the 10G NICs (e.g., RSS, multi-queue, virtual functions, hardware offload), you will need to build the driver from the source. -Here is how to compile ixgbe driver from the source on Red Hat based platforms (e.g., CentOS, RHEL or Fedora). For Debian based systems, refer to [this guideline][1] instead. +想要在linux使用Intel的PCI Express 10G网卡(例如,82598,82599,x540),需要安装Ixgbe驱动。如今的Linux发行版都会欲安装ixgbe作为可加载模块,但是预安装的ixgbe驱动不是完整功能版。如果想要开启和定制所有10G网卡(如,RSS,多)的功能,需要源码编译安装。 -### Step One: Install Prerequisites ### +本文基于红帽系平台(如,CentOS,RHEL或Fedora)。Debian系系统,请看[这篇文章][1] -First, set up necessary developmen environment and install matching kernel headers. + +### 第一步: 安装依赖 ### + +首先,安装必要的开发环境和安装匹配的内核头 $ sudo yum install gcc make $ sudo yum install kernel-devel -### Step Two: Compile Ixgbe Driver ### +### 第二步: 编译Ixgbe ### -Download the latest ixgbe source code from the [official site][2]. +从[官方页面][2]下载最新Ixgbe源码 $ wget http://downloads.sourceforge.net/project/e1000/ixgbe%20stable/3.23.2/ixgbe-3.23.2.tar.gz -Be sure to check supported kernel versions. For example, the ixgbe driver 3.23.2 supports Linux kernel versions 2.6.18 up to 3.18.1. +确保检查支持内核版本。例如,Ixgbe3.23.2版本支持Linux内核版本2.6.18以上到3.18.1. -Extract the tarball and compile it. +提取压缩包并编译 $ tar -xvf ixgbe-3.23.2.tar.gz $ cd ixgbe-3.23.2/src $ make -If successful, the compiled driver (ixgbe.ko) will be found in the current directory. +如果成功,编译完成的驱动(ixgbe.ko)可以在当前目录找到。 -You can check the information of the compiled driver by running: +可以运行这个命令来查看编译信息: $ modinfo ./ixgbe.ko -The output will show a list of available parameters of the ixgbe driver. +将会输出一个Ixgbe驱动的可用参数列表 ![](https://farm9.staticflickr.com/8789/16429483653_b9b6e6cd7f_c.jpg) -### Step Three: Load Ixgbe Driver ### +### 第三步: 加载 Ixgbe 驱动 ### -Now you are ready to load the compiled ixgbe driver. +这步准备加载已经编译好的驱动。 -If the stock ixgbe driver is already loaded on your system, you need to unload it first. Otherwise, you won't be able to load the new ixgbe driver. +如果系统已经加载了Ixgbe驱动,首先需要卸载掉老版本。否者,新版本不能够加载。 $ sudo rmmod ixgbe.ko -Then insert the compiled driver in the kernel by running: +然后插入编译完成的驱动到内核中: $ sudo insmod ./ixgbe.ko -Optionally, you can supply any parameters while loading the driver. +同时,你可以设置启动参数 $ sudo insmod ./ixgbe.ko FdirPballoc=3 RSS=16 -To verify that the driver is loaded successfully, check the output of dmesg command. +验证驱动是否加载成功,使用dmesg命令,查看其输出 $ dmesg @@ -167,17 +168,17 @@ To verify that the driver is loaded successfully, check the output of dmesg comm eth3: no IPv6 routers present eth4: no IPv6 routers present -### Step Four: Install Ixgbe Driver ### +### 第四步: 安装Ixgbe驱动 ### -Once you have checked that the driver is loaded successfully, go ahead and install the driver on your system. +当确认驱动已经加载后,就可以安装驱动到系统中了 $ sudo make install -ixgbe.ko will be installed in the following location. +ixgbe.ko将会安装在下列目录 /lib/modules//kernel/drivers/net/ixgbe -At this point, the compiled driver will be loaded automatically upon boot, or you can load it by running: +此时,编译完蛋程序将在启动时自动加载,也可以通过运行命令加载它: $ sudo modprobe ixgbe @@ -188,7 +189,7 @@ At this point, the compiled driver will be loaded automatically upon boot, or yo via: http://ask.xmodulo.com/compile-ixgbe-driver-centos-rhel-fedora.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Vic020](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f8252967610c0e7cc8d7b64356a3abc63bb3f5d6 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Thu, 30 Apr 2015 14:19:54 +0800 Subject: [PATCH 0685/2517] translating wi-cuckoo --- ... Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md b/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md index abdca76f92..c3b1a737ce 100644 --- a/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md +++ b/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md @@ -1,3 +1,4 @@ +translating wi-cuckoo Docker 1.6 Released - How to Upgrade on Fedora / CentOS ================================================================================ Docker, a popular open source container platform for packaging applications, has a new release 1.6 with lot of new features in it. This version has updates to Docker Registry, Engine, Swarm, Compose and Machine. The release aims at improvements in performance, developer and system administrator experiences. Let us take a quick look at the new features available. @@ -164,4 +165,4 @@ via: http://linoxide.com/linux-how-to/docker-1-6-features-upgrade-fedora-centos/ [17]: [18]: [19]: -[20]: \ No newline at end of file +[20]: From 1b7a1a1f7c48ee399a2c8019a3680f85cec5c837 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Thu, 30 Apr 2015 14:20:22 +0800 Subject: [PATCH 0686/2517] Moved --- ...wers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md (100%) diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md b/translated/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md similarity index 100% rename from sources/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md rename to translated/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md From 49eef7944d1ed9e4175d040922403b217a3ed705 Mon Sep 17 00:00:00 2001 From: chenjt Date: Thu, 30 Apr 2015 15:07:19 +0800 Subject: [PATCH 0687/2517] [translating by bazz2]How to set up networking between Docker containers --- ...50323 How to set up networking between Docker containers.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150323 How to set up networking between Docker containers.md b/sources/tech/20150323 How to set up networking between Docker containers.md index 7f950494be..dca3457c4e 100644 --- a/sources/tech/20150323 How to set up networking between Docker containers.md +++ b/sources/tech/20150323 How to set up networking between Docker containers.md @@ -1,3 +1,4 @@ +[bazz222] How to set up networking between Docker containers ================================================================================ As you may be aware, Docker container technology has emerged as a viable lightweight alternative to full-blown virtualization. There are a growing number of use cases of Docker that the industry adopted in different contexts, for example, enabling rapid build environment, simplifying configuration of your infrastructure, isolating applications in multi-tenant environment, and so on. While you can certainly deploy an application sandbox in a standalone Docker container, many real-world use cases of Docker in production environments may involve deploying a complex multi-tier application in an ensemble of multiple containers, where each container plays a specific role (e.g., load balancer, LAMP stack, database, UI). @@ -157,4 +158,4 @@ via: http://xmodulo.com/networking-between-docker-containers.html [2]:http://xmodulo.com/recommend/dockerbook [3]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html [4]:http://xmodulo.com/docker-containers-centos-fedora.html -[5]:http://zettio.github.io/weave/features.html \ No newline at end of file +[5]:http://zettio.github.io/weave/features.html From 4a14483874552aac8b9b08a1b2f59c758a3720b2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 1 May 2015 10:13:45 +0800 Subject: [PATCH 0688/2517] translating --- ... Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md b/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md index 11882847a7..8626cabdaa 100644 --- a/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md +++ b/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md @@ -1,3 +1,5 @@ +translating---geekpi + How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector ================================================================================ Apache is the most popular available web server. A web server is used basically to accept requests from clients and send responses to those requests. It gets an URL, translates it to a filename (for static requests), and sends that file back over the internet from the local disk, or it translates it to a program name, executes it, and then sends the output of that program back over the internet to the requesting party. If the web server was not able to process and complete the request, it instead returns an error message. @@ -135,4 +137,4 @@ via: http://www.unixmen.com/integrate-apache2-tomcat-7-using-mod_jk-connector/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.unixmen.com/author/anis/ \ No newline at end of file +[a]:http://www.unixmen.com/author/anis/ From d940662076a78528f84e4e8a1c1df8e49979b70c Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Fri, 1 May 2015 10:28:30 +0800 Subject: [PATCH 0689/2517] Translated by DongShuaike --- ...utomated Docker-based Rails deployments.md | 254 ------------------ ...utomated Docker-based Rails deployments.md | 254 ++++++++++++++++++ 2 files changed, 254 insertions(+), 254 deletions(-) delete mode 100644 sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md create mode 100644 translated/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md diff --git a/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md b/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md deleted file mode 100644 index 9b41996378..0000000000 --- a/sources/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md +++ /dev/null @@ -1,254 +0,0 @@ -[Translating by DongShuaike] -Automated Docker-based Rails deployments -================================================================================ -![](http://cocoahunter.com/content/images/2015/01/docker3.jpeg) - -[TL;DR] This is the third post in a series of 3 on how my company moved its infrastructure from PaaS to Docker based deployment. - -- [First part][1]: where I talk about the process we went thru before approaching Docker; -- [Second part][2]: where I explain how setting up a private registry for in house secure deployments. - ----------- - -In this final part we will see how to automate the whole deployment process with a real world (though very basic) example. - -### Basic Rails app ### - -Let's dive into the topic right away and bootstrap a basic Rails app. For the purpose of this demonstration I'm going to use Ruby 2.2.0 and Rails 4.1.1 - -From the terminal run: - - $ rvm use 2.2.0 - $ rails new && cd docker-test - -Let's create a basic controller: - - $ rails g controller welcome index - -...and edit `routes.rb` so that the root of the project will point to our newly created welcome#index method: - - root 'welcome#index' - -Running `rails s` from the terminal and browsing to [http://localhost:3000][3] should bring you to the index page. We're not going to make anything fancier to the app, it's just a basic example to prove that when we'll build and deploy the container everything is working. - -### Setup the webserver ### - -We are going to use Unicorn as our webserver. Add `gem 'unicorn'` and `gem 'foreman'` to the Gemfile and bundle it up (run `bundle install` from the command line). - -Unicorn needs to be configured when the Rails app launches, so let's put a **unicorn.rb** file inside the **config** directory. [Here is an example][4] of a Unicorn configuration file. You can just copy & paste the content of the Gist. - -Let's also add a Procfile with the following content inside the root of the project so that we will be able to start the app with foreman: - - web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb - -If you now try to run the app with **foreman start** everything should work as expected and you should have a running app on [http://localhost:5000][5] - -### Building a Docker image ### - -Now let's build the image inside which our app is going to live. In the root of our Rails project, create a file named **Dockerfile** and paste in it the following: - - # Base image with ruby 2.2.0 - FROM ruby:2.2.0 - - # Install required libraries and dependencies - RUN apt-get update && apt-get install -qy nodejs postgresql-client sqlite3 --no-install-recommends && rm -rf /var/lib/apt/lists/* - - # Set Rails version - ENV RAILS_VERSION 4.1.1 - - # Install Rails - RUN gem install rails --version "$RAILS_VERSION" - - # Create directory from where the code will run - RUN mkdir -p /usr/src/app - WORKDIR /usr/src/app - - # Make webserver reachable to the outside world - EXPOSE 3000 - - # Set ENV variables - ENV PORT=3000 - - # Start the web app - CMD ["foreman","start"] - - # Install the necessary gems - ADD Gemfile /usr/src/app/Gemfile - ADD Gemfile.lock /usr/src/app/Gemfile.lock - RUN bundle install --without development test - - # Add rails project (from same dir as Dockerfile) to project directory - ADD ./ /usr/src/app - - # Run rake tasks - RUN RAILS_ENV=production rake db:create db:migrate - -Using the provided Dockerfile, let's try and build an image with the following command[1][7]: - - $ docker build -t localhost:5000/your_username/docker-test . - -And again, if everything worked out correctly, the last line of the long log output should read something like: - - Successfully built 82e48769506c - $ docker images - REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE - localhost:5000/your_username/docker-test latest 82e48769506c About a minute ago 884.2 MB - -Let's try and run the container! - - $ docker run -d -p 3000:3000 --name docker-test localhost:5000/your_username/docker-test - -You should be able to reach your Rails app running inside the Docker container at port 3000 of your boot2docker VM[2][8] (in my case [http://192.168.59.103:3000][6]). - -### Automating with shell scripts ### - -Since you should already know from the previous post3 how to push your newly created image to a private regisitry and deploy it on a server, let's skip this part and go straight to automating the process. - -We are going to define 3 shell scripts and finally tie it all together with rake. - -### Clean ### - -Every time we build our image and deploy we are better off always clean everything. That means the following: - -- stop (if running) and restart boot2docker; -- remove orphaned Docker images (images that are without tags and that are no longer used by your containers). - -Put the following into a **clean.sh** file in the root of your project. - - echo Restarting boot2docker... - boot2docker down - boot2docker up - - echo Exporting Docker variables... - sleep 1 - export DOCKER_HOST=tcp://192.168.59.103:2376 - export DOCKER_CERT_PATH=/Users/user/.boot2docker/certs/boot2docker-vm - export DOCKER_TLS_VERIFY=1 - - sleep 1 - echo Removing orphaned images without tags... - docker images | grep "" | awk '{print $3}' | xargs docker rmi - -Also make sure to make the script executable: - - $ chmod +x clean.sh - -### Build ### - -The build process basically consists in reproducing what we just did before (docker build). Create a **build.sh** script at the root of your project with the following content: - - docker build -t localhost:5000/your_username/docker-test . - -Make the script executable. - -### Deploy ### - -Finally, create a **deploy.sh** script with this content: - - # Open SSH connection from boot2docker to private registry - boot2docker ssh "ssh -o 'StrictHostKeyChecking no' -i /Users/username/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@your-registry.com &" & - - # Wait to make sure the SSH tunnel is open before pushing... - echo Waiting 5 seconds before pushing image. - - echo 5... - sleep 1 - echo 4... - sleep 1 - echo 3... - sleep 1 - echo 2... - sleep 1 - echo 1... - sleep 1 - - # Push image onto remote registry / repo - echo Starting push! - docker push localhost:5000/username/docker-test - -If you don't understand what's going on here, please make sure you've read thoroughfully [part 2][9] of this series of posts. - -Make the script executable. - -### Tying it all together with rake ### - -Having 3 scripts would now require you to run them individually each time you decide to deploy your app: - -1. clean -1. build -1. deploy / push - -That wouldn't be much of an effort, if it weren't for the fact that developers are lazy! And lazy be it, then! - -The final step to wrap things up, is tying the 3 parts together with rake. - -To make things even simpler you can just append a bunch of lines of code to the end of the already present Rakefile in the root of your project. Open the Rakefile file - pun intended :) - and paste the following: - - namespace :docker do - desc "Remove docker container" - task :clean do - sh './clean.sh' - end - - desc "Build Docker image" - task :build => [:clean] do - sh './build.sh' - end - - desc "Deploy Docker image" - task :deploy => [:build] do - sh './deploy.sh' - end - end - -Even if you don't know rake syntax (which you should, because it's pretty awesome!), it's pretty obvious what we are doing. We have declared 3 tasks inside a namespace (docker). - -This will create the following 3 tasks: - -- rake docker:clean -- rake docker:build -- rake docker:deploy - -Deploy is dependent on build, build is dependent on clean. So every time we run from the command line - - $ rake docker:deploy - -All the script will be executed in the required order. - -### Test it ### - -To see if everything is working, you just need to make a small change in the code of your app and run - - $ rake docker:deploy - -and see the magic happening. Once the image has been uploaded (and the first time it could take quite a while), you can ssh into your production server and pull (thru an SSH tunnel) the docker image onto the server and run. It's that easy! - -Well, maybe it takes a while to get accustomed to how everything works, but once it does, it's almost (almost) as easy as deploying with Heroku. - -P.S. As always, please let me have your ideas. I'm not sure this is the best, or the fastest, or the safest way of doing devops with Docker, but it certainly worked out for us. - -- make sure to have **boot2docker** up and running. -- If you don't know your boot2docker VM address, just run `$ boot2docker ip` -- if you don't, you can read it [here][10] - --------------------------------------------------------------------------------- - -via: http://cocoahunter.com/2015/01/23/docker-3/ - -作者:[Michelangelo Chasseur][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://cocoahunter.com/author/michelangelo/ -[1]:http://cocoahunter.com/docker-1 -[2]:http://cocoahunter.com/2015/01/23/docker-2/ -[3]:http://localhost:3000/ -[4]:https://gist.github.com/chasseurmic/0dad4d692ff499761b20 -[5]:http://localhost:5000/ -[6]:http://192.168.59.103:3000/ -[7]:http://cocoahunter.com/2015/01/23/docker-3/#fn:1 -[8]:http://cocoahunter.com/2015/01/23/docker-3/#fn:2 -[9]:http://cocoahunter.com/2015/01/23/docker-2/ -[10]:http://cocoahunter.com/2015/01/23/docker-2/ diff --git a/translated/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md b/translated/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md new file mode 100644 index 0000000000..cd3917dfcf --- /dev/null +++ b/translated/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md @@ -0,0 +1,254 @@ + +自动化部署基于Docker的Rails应用 +================================================================================ +![](http://cocoahunter.com/content/images/2015/01/docker3.jpeg) + +[TL;DR] 这是系列文章的第三篇,讲述了我的公司是如何将基础设施从PaaS移植到Docker上的。 +- [第一部分][1]:谈论了我接触Docker之前的经历; +- [第二部分][2]:一步步搭建一个安全而又私有的registry。 +---------- +在系列文章的最后一篇里,我们将用一个实例来学习如何自动化整个部署过程。 + +### 基本的Rails应用程序### + +现在让我们启动一个基本的Rails应用。为了更好的展示,我使用Ruby 2.2.0和Rails 4.1.1 + +在终端运行: + + $ rvm use 2.2.0 + $ rails new && cd docker-test + +创建一个基础控制器: + + $ rails g controller welcome index + +……然后编辑 `routes.rb` ,以便让工程的根指向我们新创建的welcome#index方法:(这句话理解不太理解) + + root 'welcome#index' + +在终端运行 `rails s` ,然后打开浏览器,登录[http://localhost:3000][3],你会进入到索引界面当中。我们不准备给应用加上多么神奇的东西,这只是一个基础实例,用来验证当我们将要创建并部署容器的时候,一切运行正常。 + +### 安装webserver ### + +我们打算使用Unicorn当做我们的webserver。在Gemfile中添加 `gem 'unicorn'`和 `gem 'foreman'`然后将它bundle起来(运行 `bundle install`命令)。 + +在Rails应用启动的伺候,需要配置Unicorn,所以我们将一个**unicorn.rb**文件放在**config**目录下。[这里有一个Unicorn配置文件的例子][4]你可以直接复制粘贴Gist的内容。 + +Let's also add a Procfile with the following content inside the root of the project so that we will be able to start the app with foreman: +接下来,在工程的根目录下添加一个Procfile,以便可以使用foreman启动应用,内容为下: + + web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb + +现在运行**foreman start**命令启动应用,一切都将正常运行,并且你将能够在[http://localhost:5000][5]上看到一个正在运行的应用。 + +### 创建一个Docker映像 ### + +现在我们创建一个映像来运行我们的应用。在Rails工程的跟目录下,创建一个名为**Dockerfile**的文件,然后粘贴进以下内容: + + # Base image with ruby 2.2.0 + FROM ruby:2.2.0 + + # Install required libraries and dependencies + RUN apt-get update && apt-get install -qy nodejs postgresql-client sqlite3 --no-install-recommends && rm -rf /var/lib/apt/lists/* + + # Set Rails version + ENV RAILS_VERSION 4.1.1 + + # Install Rails + RUN gem install rails --version "$RAILS_VERSION" + + # Create directory from where the code will run + RUN mkdir -p /usr/src/app + WORKDIR /usr/src/app + + # Make webserver reachable to the outside world + EXPOSE 3000 + + # Set ENV variables + ENV PORT=3000 + + # Start the web app + CMD ["foreman","start"] + + # Install the necessary gems + ADD Gemfile /usr/src/app/Gemfile + ADD Gemfile.lock /usr/src/app/Gemfile.lock + RUN bundle install --without development test + + # Add rails project (from same dir as Dockerfile) to project directory + ADD ./ /usr/src/app + + # Run rake tasks + RUN RAILS_ENV=production rake db:create db:migrate + +使用提供的Dockerfile,执行下列命令创建一个映像[1][7]: + + $ docker build -t localhost:5000/your_username/docker-test . + +然后,如果一切正常,长日志输出的最后一行应该类似于: + + Successfully built 82e48769506c + $ docker images + REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE + localhost:5000/your_username/docker-test latest 82e48769506c About a minute ago 884.2 MB + +来运行容器吧! + + $ docker run -d -p 3000:3000 --name docker-test localhost:5000/your_username/docker-test + +You should be able to reach your Rails app running inside the Docker container at port 3000 of your boot2docker VM[2][8] (in my case [http://192.168.59.103:3000][6]). +通过你的boot2docker虚拟机[2][8]的3000号端口(我的是[http://192.168.59.103:3000][6]),你可以观察你的Rails应用。 + +### 使用shell脚本进行自动化部署 ### + +前面的文章(指文章1和文章2)已经告诉了你如何将新创建的映像推送到私有registry中,并将其部署在服务器上,所以我们跳过这一部分直接开始自动化进程。 + +我们将要定义3个shell脚本,然后最后使用rake将它们捆绑在一起。 + +### 清除 ### + +每当我们创建映像的时候, + +- 停止并重启boot2docker; +- 去除Docker孤儿映像(那些没有标签,并且不再被容器所使用的映像们)。 + +在你的工程根目录下的**clean.sh**文件中输入下列命令。 + + echo Restarting boot2docker... + boot2docker down + boot2docker up + + echo Exporting Docker variables... + sleep 1 + export DOCKER_HOST=tcp://192.168.59.103:2376 + export DOCKER_CERT_PATH=/Users/user/.boot2docker/certs/boot2docker-vm + export DOCKER_TLS_VERIFY=1 + + sleep 1 + echo Removing orphaned images without tags... + docker images | grep "" | awk '{print $3}' | xargs docker rmi + +给脚本加上执行权限: + + $ chmod +x clean.sh + +### 创建 ### + +创建的过程基本上和之前我们所做的(docker build)内容相似。在工程的根目录下创建一个**build.sh**脚本,填写如下内容: + + docker build -t localhost:5000/your_username/docker-test . + +给脚本执行权限。 + +### 部署 ### + +最后,创建一个**deploy.sh**脚本,在里面填进如下内容: + + # Open SSH connection from boot2docker to private registry + boot2docker ssh "ssh -o 'StrictHostKeyChecking no' -i /Users/username/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@your-registry.com &" & + + # Wait to make sure the SSH tunnel is open before pushing... + echo Waiting 5 seconds before pushing image. + + echo 5... + sleep 1 + echo 4... + sleep 1 + echo 3... + sleep 1 + echo 2... + sleep 1 + echo 1... + sleep 1 + + # Push image onto remote registry / repo + echo Starting push! + docker push localhost:5000/username/docker-test + +如果你不理解这其中的含义,请先仔细阅读这部分[part 2][9]。 + +给脚本加上执行权限。 + +### 使用rake将以上所有绑定 ### + +现在的情况是,每次你想要部署你的应用时,你都需要单独运行这三个脚本。 + +1. clean +1. build +1. deploy / push + +这一点都不费工夫,可是事实上开发者比你想象的要懒得多!那么咱们就索性再懒一点! + +我们最后再把工作好好整理一番,我们现在要将三个脚本捆绑在一起,通过rake。 + +为了更简单一点,你可以在工程根目录下已经存在的Rakefile中添加几行代码,打开Rakefile文件——pun intended——把下列内容粘贴进去。 + + + namespace :docker do + desc "Remove docker container" + task :clean do + sh './clean.sh' + end + + desc "Build Docker image" + task :build => [:clean] do + sh './build.sh' + end + + desc "Deploy Docker image" + task :deploy => [:build] do + sh './deploy.sh' + end + end + +即使你不清楚rake的语法(其实你真应该去了解一下,这玩意太酷了!),上面的内容也是很显然的吧。我们在一个命名空间(docker)里声明了三个任务。 + +三个任务是: + +- rake docker:clean +- rake docker:build +- rake docker:deploy + +Deploy独立于build,build独立于clean。所以每次我们输入命令运行的时候。 + + $ rake docker:deploy + +所有的脚本都会按照顺序执行。 + +### 测试 ### + +现在我们来看看是否一切正常,你只需要在app的代码里做一个小改动: + + $ rake docker:deploy + +接下来就是见证奇迹的时刻了。一旦映像文件被上传(第一次可能花费较长的时间),你就可以ssh登录产品服务器,并且(通过SSH管道)把docker映像拉取到服务器并运行了。多么简单! + +也许你需要一段时间来习惯,但是一旦成功,它几乎与用Heroku部署一样简单。 + +备注:像往常一样,请让我了解到你的意见。我不敢保证这种方法是最好,最快,或者最安全的Docker开发的方法,但是这东西对我们确实奏效。 + +- 确保**boot2docker**已经启动并在运行当中。 +- 如果你不了解你的boot2docker虚拟地址,输入` $ boot2docker ip`命令查看。 +- 点击[here][10],教你怎样搭建私有的registry。 + +-------------------------------------------------------------------------------- + +via: http://cocoahunter.com/2015/01/23/docker-3/ + +作者:[Michelangelo Chasseur][a] +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://cocoahunter.com/author/michelangelo/ +[1]:http://cocoahunter.com/docker-1 +[2]:http://cocoahunter.com/2015/01/23/docker-2/ +[3]:http://localhost:3000/ +[4]:https://gist.github.com/chasseurmic/0dad4d692ff499761b20 +[5]:http://localhost:5000/ +[6]:http://192.168.59.103:3000/ +[7]:http://cocoahunter.com/2015/01/23/docker-3/#fn:1 +[8]:http://cocoahunter.com/2015/01/23/docker-3/#fn:2 +[9]:http://cocoahunter.com/2015/01/23/docker-2/ +[10]:http://cocoahunter.com/2015/01/23/docker-2/ From edb7d1be45af3f21e3ed26ae39b7a41fe9485663 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Fri, 1 May 2015 10:51:33 +0800 Subject: [PATCH 0690/2517] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Docker2=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E4=BA=9B=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ocker-2 Setting up a private Docker registry.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md b/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md index 6e4f6e4fba..6d73b53326 100644 --- a/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md +++ b/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md @@ -128,7 +128,7 @@ Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动 {} -这个意味着registry工作正常。你还可以通过登录[http://localhost:5000/v1/search][8]来查看registry内容,回复相似: +这个意味着registry工作正常。你还可以通过登录[http://localhost:5000/v1/search][8]来查看registry内容,内容相似: { "num_results": 2, @@ -147,7 +147,7 @@ Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动 ### 创建一个映像 ### -我们现在创建一个非常简答的Docker映像,来检验我们新弄好的registry。在我们的本机上,用如下内容创建一个Dockerfile[^n]: +我们现在创建一个非常简答的Docker映像,来检验我们新弄好的registry。在我们的本机上,用如下内容创建一个Dockerfile:[^n] # Base image with ruby 2.2.0 @@ -169,7 +169,7 @@ Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动 你运行的docker命令都是实际上都是在boot2docker虚拟机上运行的。所以当你执行像`docker push some_repo`这样的命令时,是boot2docker虚拟机在与registry交互,而不是我们自己的机器。 -接下来是一个非常重要的点:为了将Docker映像推送到远端的私有才哭,SSH管道需要在boot2docker虚拟机上配置好。 +接下来是一个非常重要的点:为了将Docker映像推送到远端的私有仓库,SSH管道需要在boot2docker虚拟机上配置好。 由许多种方法实现它。我给你展示最简短的一种(可能不是最容易理解的,但是能够帮助你实现自动化) @@ -212,10 +212,10 @@ First of all though we need to sort one last thing with SSH. 在下一篇文章[9]中,我们将会了解到如何自动化处理这些事务,并且真正地容器化一个Rails应用。请继续收听! 如有错误,请不吝指出。祝你Docker之路顺利! 1. 我假设你使用OS X。 -1. 想要了解搭建docker环境的完整之南,请参阅[http://boot2docker.io/][10]。 -1. 本文写成时选择的是 Image > Applications > Docker 1.4.1 on 14.04。 -1. [https://github.com/docker/docker-registry/][11] -1. 这是一个存根,在下一篇文章里我将会展示给你如何将一个Rails应用绑定进Docker容器中。 +2. 想要了解搭建docker环境的完整之南,请参阅[http://boot2docker.io/][10]。 +3. 本文写成时选择的是 Image > Applications > Docker 1.4.1 on 14.04。 +4. [https://github.com/docker/docker-registry/][11] +5. 这是一个存根,在下一篇文章里我将会展示给你如何将一个Rails应用绑定进Docker容器中。 -------------------------------------------------------------------------------- From ce65089aadb0eca1f6171464291ad741be8204e9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 1 May 2015 11:01:09 +0800 Subject: [PATCH 0691/2517] translated --- ...e2 With Tomcat 7 Using mod_jk Connector.md | 140 ------------------ ...e2 With Tomcat 7 Using mod_jk Connector.md | 138 +++++++++++++++++ 2 files changed, 138 insertions(+), 140 deletions(-) delete mode 100644 sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md create mode 100644 translated/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md diff --git a/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md b/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md deleted file mode 100644 index 8626cabdaa..0000000000 --- a/sources/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md +++ /dev/null @@ -1,140 +0,0 @@ -translating---geekpi - -How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector -================================================================================ -Apache is the most popular available web server. A web server is used basically to accept requests from clients and send responses to those requests. It gets an URL, translates it to a filename (for static requests), and sends that file back over the internet from the local disk, or it translates it to a program name, executes it, and then sends the output of that program back over the internet to the requesting party. If the web server was not able to process and complete the request, it instead returns an error message. - -In this article we will list the features of Apache, and how we can integrate it with Tomcat8 and Tomcat7 using the mod_jk connector. - -### Features of Apache ### - -As we said Apache is the most popular available web server. The reasons behind its popularity are the following features: - -- It is free tool that you can download and install it easily. -- It is open source web server so you can easily see the code, adjust it, optimize it, and fix errors and security holes. New features and modules can be also added. -- It can be used for small websites of one or two pages, or huge websites of hundreds and thousands of pages, serving millions of regular visitors each month. It can serve both static and dynamic content. -- Improved caching modules (mod_cache, mod_disk_cache, mod_mem_cache). -- Apache 2 supports the Internet protocol IPv6. - -### Tomcat directory ### - -${tomcat_home} is the root directory of tomcat. Your Tomcat installation should have the following subdirectories: - -- ${tomcat_home}\conf – Where you can place various configuration files -- ${tomcat_home}\webapps – Containing example applications -- ${tomcat_home}\bin – Where you place web server plugins - -### Mod_jk module ### - -The mod_jk can be obtained in two formats: binary and source. Depending on the platform you are running your web server on, a binary version of mod_jk may be available. It is recommended to use the binary version if it is available. - -The mod_jk module was developed and tested on: - -- Linux, FreeBSD, AIX, HP-UX, MacOS X, Solaris and should work on major Unix’s platforms supporting Apache 1.3 and/or 2.x -- 0-i386 SP4/SP5/SP6a (should be able to work with other service packs), Win2K and WinXP and Win98 -- Cygwin (until you have an apache server and autoconf/automake support tools) -- Netware -- i5/OS V5R4 (System I) with Apache HTTP Server 2.0.58. Be sure to have the latest Apache PTF installed. -- Tomcat 3.2 to Tomcat 8. - -The mod_jk requires two entities: - -- **mod_jk.xxx** – The Apache HTTP Server module, depending on your operating system, it will be mod_jk.so, mod_jk.nlm or MOD_JK.SRVPGM. -- **workers.properties** – A file that describes the host and used ports by the workers (Tomcat processes). A sample workers.properties can be found under the conf directory in the source download. - -Also as with other Apache HTTP Server modules, mod_jk should be first installed on the modules directory of your Apache webserver: /usr/lib/apache and you should update your **httpd.conf** file. - -### Installation ### - -It is required to have a non-root user system with the “sudo” privileges before starting the installation. Now we will start our installation, so we will install Apache2 and Tomcat using the following command: - - sudo apt-get install apache2 - - sudo apt-get install tomcat7 - - sudo apt-get install tomcat7-admin - -And now we will create a test application for Tomcat using the following commands: - - cd /var/lib/tomcat7/webapps - sudo mkdir tomcat-demo - sudo mkdir tomcat-demo/goodmoring - sudo vim tomcat-demo/helloworld/index.jsp - -And paste the following code: - - - - Good Morning - - -

Good Morning

- Today is: <%= new java.util.Date().toString() %> - - - -Everything is okay, good now we will install and configure the mod_jk using the following command: - - sudo apt-get install libapache2-mod-jk - -We have to start by enabling the redirect port 8443 on Tomcat using the following command: - - sudo vim /etc/tomcat7/server.xml - -And we will uncomment the following line: - - - -After that, we will create our workers.properties file for Apache using the following command: - - sudo vim /etc/apache2/workers.properties - -Paste the following text: - - # Define 1 real worker using ajp13 - worker.list=worker - # Set properties for worker (ajp13) - worker.worker.type=ajp13 - worker.worker.host=localhost - worker.worker.port=8009 - -Now we will use the following command to let Apache use this worker: - - sudo vim /etc/apache2/mods-available/jk.conf - -And we will change the JkWorkersFile property to the following one; - - /etc/apache2/workers.properties - -Finally to configure the URL Apache should pass through the Tomcat - - sudo vim /etc/apache2/sites-enabled/000-default - -And we will add the following line in the configurtation file: - - - ....................................... - ....................................... - JkMount /tomcat-demo* worker1 - - -You can now restart the servers using the following commands to check their functionality: - - sudo /etc/init.d/tomcat7 restart - sudo /etc/init.d/apache2 restart - -### Conclusion ### - -In this article we showed you how to configure and install Apache2 and Tomcat 7 using the mod_jk connector. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/integrate-apache2-tomcat-7-using-mod_jk-connector/ - -作者:[anismaj][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/anis/ diff --git a/translated/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md b/translated/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md new file mode 100644 index 0000000000..be9297c370 --- /dev/null +++ b/translated/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md @@ -0,0 +1,138 @@ +如何用mod_jk连接器来集成Apache2和Tomcat 7 +================================================================================ +Apache是最流行的web服务器。通常用来接收客户端的请求并响应。它得到一个URL并将它翻译成一个文件名(或者静态请求),并将文件从本地磁盘中通过因特网返回,或者将它翻译成程序名执行它,接着将输出返回给请求方。如果web服务器不能处理和完成请求,它会返回一个错误信息。 + +在本篇中,我们会列出Apache的特性以及我们该如何用mod_jk连接器来集成Tomcat7和Tomcat8. + +### Apache的特性 ### + +如我们所说Apache是最流行的web服务器。下面是流行背后的原因: + +- 它是自由工具,你可以很简单地下载和安装 +- 它开放源码因此你可以查看源码,调整它,优化它,并且修复错误和安全漏洞。也可以增加新的功能和模块。 +- 它可以用在只有一两个页面的小网站,或者是有成千上万个页面的大网站,每月处理上百万的常规访问者的请求。它可以同时处理静态和动态内容。 +- 提高的缓存模块(mod_cache、 mod_disk_cache、 mod_mem_cache)。 +- Apache 2 支持 IPv6. + +### Tomcat 目录 ### + +${tomcat_home} 是tomcat的根目录。你的tomcat安装应该有下面的子目录: + +- ${tomcat_home}\conf – 存放不同配置文件的地方 +- ${tomcat_home}\webapps – 包含示例程序 +- ${tomcat_home}\bin – 存放插件的地方 + +### Mod_jk 模块 ### + +mod_jk有两种可接受的方式:二进制或者源码。取决于你运行的web服务器的平台,二进制版本的mod_jk也许可以找到。如果有二进制版本的话建议使用这个。 + +mod_jk模块在这些平台上开发及测试过: + +- Linux、 FreeBSD、 AIX、 HP-UX、 MacOS X、 Solaris ,应该在主流的Unix平台上都支持Apache 1.3 和/或者 2.x。 +- 0-i386 SP4/SP5/SP6a (应该可以于其他的服务包一起工作), Win2K and WinXP and Win98 +- Cygwin (需要你有apache服务器及autoconf/automake支持工具) +- Netware +- i5/OS V5R4 (System I) 中的 Apache HTTP Server 2.0.58。 确保已经安装了Apache PTF +- Tomcat 3.2 到 Tomcat 8. + +The mod_jk 需要两个组件: + +- **mod_jk.xxx** – Apache HTTP服务器模块,取决于你的操作系统,它可能是mod_jk.so、mod_jk.nlm或者MOD_JK.SRVPGM。 +- **workers.properties** - 描述主机以及处理器使用的端口(Tomcat进程)。在下载的源码内可以在conf目录下找到workers.properties文件。 + +和Apache HTTP服务器其他的模块一样,mod_jk应该安装在你的Apache服务器下的模块目录下:/usr/lib/apache,你应该更新你的**httpd.conf**文件。 + +### 安装 ### + +它需要非root用户在安装钱使用“sudo”特权。现在我们开始安装,我们将使用下面的命令来安装Apache2和Tomcat: + + sudo apt-get install apache2 + + sudo apt-get install tomcat7 + + sudo apt-get install tomcat7-admin + +下面在我们将会使用下面的命令来创建一个测试程序: + + cd /var/lib/tomcat7/webapps + sudo mkdir tomcat-demo + sudo mkdir tomcat-demo/goodmoring + sudo vim tomcat-demo/helloworld/index.jsp + +粘贴下面的代码: + + + + Good Morning + + +

Good Morning

+ Today is: <%= new java.util.Date().toString() %> + + + +一切完毕后,我们将使用下面的命令安装和配置mod_jk: + + sudo apt-get install libapache2-mod-jk + +我们将使用下面的命令启用Tomcat的8443转发端口: + + sudo vim /etc/tomcat7/server.xml + +我们将解除下面的注释行: + + + +之后,我们将用下面的命令位Apache创建workers.properties文件: + + sudo vim /etc/apache2/workers.properties + +粘贴下面的行: + + # Define 1 real worker using ajp13 + worker.list=worker + # Set properties for worker (ajp13) + worker.worker.type=ajp13 + worker.worker.host=localhost + worker.worker.port=8009 + +现在我们将使用下面的命令来让Apache使用这个worker: + + sudo vim /etc/apache2/mods-available/jk.conf + +我们将JkWorkersFile属性成下面这行: + + /etc/apache2/workers.properties + +最后配置Apache交给Tomcat处理的URL + + sudo vim /etc/apache2/sites-enabled/000-default + +我们将在配置文件中下面的行: + + + ....................................... + ....................................... + JkMount /tomcat-demo* worker1 + + +现在用下面的命令重启服务来检查它们的功能: + + sudo /etc/init.d/tomcat7 restart + sudo /etc/init.d/apache2 restart + +### 总结 ### + +在本篇中我们展示了你该如何使用mod_jk连接器配置和安装Apache2以及Tomcat7。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/integrate-apache2-tomcat-7-using-mod_jk-connector/ + +作者:[anismaj][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/anis/ From e263f7a46df9c51b5395f3eb519344cf73e3e1dc Mon Sep 17 00:00:00 2001 From: VicYu Date: Fri, 1 May 2015 11:10:48 +0800 Subject: [PATCH 0692/2517] Update 20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md --- ...swers--How to configure PCI-passthrough on virt-manager.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md b/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md index f90070d34a..4703e96d38 100644 --- a/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md +++ b/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md @@ -1,3 +1,5 @@ +Vic020 + Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager ================================================================================ > **Question**: I would like to dedicate a physical network interface card to one of my guest VMs created by KVM. For that, I am trying to enable PCI passthrough of the NIC for the VM. How can I add a PCI device to a guest VM with PCI passthrough on virt-manager? @@ -52,4 +54,4 @@ via: http://ask.xmodulo.com/pci-passthrough-virt-manager.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://wiki.xenproject.org/wiki/VTdHowTo -[2]:http://xmodulo.com/add-kernel-boot-parameters-via-grub-linux.html \ No newline at end of file +[2]:http://xmodulo.com/add-kernel-boot-parameters-via-grub-linux.html From 140d2e80a1310fc65db6b4165c7dcc2e79cde9f3 Mon Sep 17 00:00:00 2001 From: Mo Date: Fri, 1 May 2015 14:05:45 +0800 Subject: [PATCH 0693/2517] [translating]The history of Android -15 --- .../14 - The history of Android.md | 84 ------------------- .../15 - The history of Android.md | 4 +- 2 files changed, 3 insertions(+), 85 deletions(-) delete mode 100644 sources/talk/The history of Android/14 - The history of Android.md diff --git a/sources/talk/The history of Android/14 - The history of Android.md b/sources/talk/The history of Android/14 - The history of Android.md deleted file mode 100644 index 3377527026..0000000000 --- a/sources/talk/The history of Android/14 - The history of Android.md +++ /dev/null @@ -1,84 +0,0 @@ -alim0x translating - -The history of Android -================================================================================ -### Voice Actions—a supercomputer in your pocket ### - -In August 2010, a new feature “[Voice Actions][1]" launched in the Android Market as part of the Voice Search app. Voice Actions allowed users to issue voice commands to their phone, and Android would try to interpret them and do something smart. Something like "Navigate to [address]" would fire up Google Maps and start turn-by-turn navigation to your stated destination. You could also send texts or e-mails, make a call, open a Website, get directions, or view a location on a map—all just by speaking. - -注:youtube视频地址 - - -Voice Actions was the culmination of a new app design philosophy for Google. Voice Actions was the most advanced voice control software for its time, and the secret was that Google wasn’t doing any computing on the device. In general, voice recognition was very CPU intensive. In fact, many voice recognition programs still have a “speed versus accuracy" setting, where users can choose how long they are willing to wait for the voice recognition algorithms to work—more CPU power means better accuracy. - -Google’s innovation was not bothering to do the voice recognition computing on the phone’s limited processor. When a command was spoken, the user’s voice was packaged up and shipped out over the Internet to Google’s cloud servers. There, Google’s farm of supercomputers pored over the message, interpreted it, and shipped it back to the phone. It was a long journey, but the Internet was finally fast enough to accomplish something like this in a second or two. - -Many people throw the phrase “cloud computing" around to mean “anything that is stored on a server," but this was actual cloud computing. Google was doing hardcore compute operations in the cloud, and because it is throwing a ridiculous amount of CPU power at the problem, the only limit to the voice recognition accuracy is the algorithms themselves. The software didn't need to be individually “trained" by each user, because everyone who used Voice Actions was training it all the time. Using the power of the Internet, Android put a supercomputer in your pocket, and, compared to existing solutions, moving the voice recognition workload from a pocket-sized computer to a room-sized computer greatly increased accuracy. - -Voice recognition had been a project of Google’s for some time, and it all started with an 800 number. [1-800-GOOG-411][1] was a free phone information service that Google launched in April 2007. It worked just like 411 information services had for years—users could call the number and ask for a phone book lookup—but Google offered it for free. No humans were involved in the lookup process, the 411 service was powered by voice recognition and a text-to-speech engine. Voice Actions was only possible after three years of the public teaching Google how to hear. - -Voice recognition was a great example of Google’s extremely long-term thinking—the company wasn't afraid to invest in a project that wouldn’t become a commercial product for several years. Today, voice recognition powers products all across Google. It’s used for voice input in the Google Search app, Android’s voice typing, and on Google.com. It’s also the primary input interface for Google Glass and [Android Wear][2]. - -The company even uses it beyond input. Google's voice recognition technology is used to transcribe YouTube videos, which powers automatic closed captioning for the hearing impaired. The transcription is even indexed by Google, so you can search for words that were said in the video. Voice is the future of many products, and this long-term planning has led Google to be one of the few major tech companies with an in-house voice recognition service. Most other voice recognition products, like Apple’s Siri and Samsung devices, are forced to use—and pay a license fee for—voice recognition from Nuance. - -With the computer hearing system up and running, Google is applying this strategy to computer vision next. That's why things like Google Goggles, Google Image Search, and [Project Tango][3] exist. Just like the days of GOOG-411, these projects are in the early stages. When [Google's robot division][4] gets off the ground with a real robot, it will need to see and hear, and Google's computer vision and hearing projects will likely give the company a head start. - -![The Nexus S, the first Nexus phone made by Samsung.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/NS500.png) -The Nexus S, the first Nexus phone made by Samsung. - -### Android 2.3 Gingerbread—the first major UI overhaul ### - -Gingerbread was released in December 2010, a whopping seven months after the release of 2.2. The wait was worth it, though, as Android 2.3 changed just about every screen in the OS. It was the first major overhaul since the initial formation of Android in version 0.9. 2.3 would kick off a series of continual revamps in an attempt to turn Android from an ugly duckling into something that was capable of holding its own—aesthetically—against the iPhone. - -And speaking of Apple, six months earlier, the company released the iPhone 4 and iOS 4, which added multitasking and Facetime video chat. Microsoft was finally back in the game, too. The company jumped into the modern smartphone era with the launch of Windows Phone 7 in November 2010. - -Android 2.3 focused a lot on the interface design, but with no direction or design documents, many apps ended up getting a new bespoke theme. Some apps went with a flatter, darker theme, some used a gradient-filled, bubbly dark theme, and others went with a high-contrast white and green look. While it wasn't cohesive, Gingerbread accomplished the goal of modernizing nearly every part of the OS. It was a good thing, too, because the next phone version of Android wouldn’t arrive until nearly a year later. - -Gingerbread’s launch device was the Nexus S, Google’s second flagship device and the first Nexus manufactured by Samsung. While today we are used to new CPU models every year, back then that wasn't the case. The Nexus S had a 1GHz Cortex A8 processor, just like the Nexus One. The GPU was slightly faster, and that was it in the speed department. It was a little bigger than the Nexus One, with a 4-inch, 800×480 AMOLED display. - -Spec wise, the Nexus S might seem like a tame upgrade, but it was actually home to a lot of firsts for Android. The Nexus S was Google’s first flagship to shun a MicroSD slot, shipping with 16GB on-board memory. The Nexus One had only 512MB of storage, but it had a MicroSD slot. Removing the SD slot simplified storage management for users—there was just one pool now—but hurt expandability for power users. It was also Google's first phone to have NFC, a special chip in the back of the phone that could transfer information when touched to another NFC chip. For now, the Nexus S could only read NFC tags—it couldn't send data. - -Thanks to some upgrades in Gingerbread, the Nexus S was one of the first Android phones to ship without a hardware D-Pad or trackball. The Nexus S was now down to just the power, volume, and the four navigation buttons. The Nexus S was also a precursor to the [crazy curved-screen phones][6] of today, as Samsung outfitted the Nexus S with a piece of slightly curved glass. - -![Gingerbread changed the status bar and wallpaper, and it added a bunch of new icons.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/appdrawershop.png) -Gingerbread changed the status bar and wallpaper, and it added a bunch of new icons. -Photo by Ron Amadeo - -An upgraded "Nexus" live wallpaper was released as an exclusive addition to the Nexus S. It was basically the same idea as the Nexus One version, with its animated streaks of light. On the Nexus S, the "grid" design was removed and replaced with a wavy blue/gray background. The dock at the bottom was given square corners and colored icons. - -![The new notification panel and menu.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/32.png) -The new notification panel and menu. -Photo by Ron Amadeo - -The status bar was finally overhauled from the version that first debuted in 0.9. The bar was changed from a white gradient to flat black, and all the icons were redrawn in gray and green. Just about everything looked crisper and more modern thanks to the sharp-angled icon design and higher resolution. The strangest decisions were probably the removal of the time period from the status bar clock and the confusing shade of gray that was used for the signal bars. Despite gray being used for many status bar icons, and there being four gray bars in the above screenshot, Android was actually indicating no cellular signal. Green bars would indicate a signal, gray bars indicated “empty" signal slots. - -The green status bar icons in Gingerbread also doubled as a status indicator of network connectivity. If you had a working connection to Google's servers, the icons would be green, if there was no connection to Google, the icons turned white. This let you easily identify the connectivity status of your connection while you were out and about. - -The notification panel was changed from the aging Android 1.5 design. Again, we saw a UI piece that changed from a light theme to a dark theme, getting a dark gray header, black background, and black-on-gray text. - -The menu was darkened too, changing from a white background to a black one with a slight transparency. The contrast between the menu icons and the background wasn’t as strong as it should be, because the gray icons are the same color as they were on the white background. Requiring a color change would mean every developer would have to make new icons, so Google went with the preexisting gray color on black. This was a change at the system level, so this new menu would show up in every app. - ----------- - -![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) - -[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. - -[@RonAmadeo][t] - --------------------------------------------------------------------------------- - -via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/14/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://arstechnica.com/gadgets/2010/08/google-beefs-up-voice-search-mobile-sync/ -[2]:http://arstechnica.com/business/2007/04/google-rolls-out-free-411-service/ -[3]:http://arstechnica.com/gadgets/2014/03/in-depth-with-android-wear-googles-quantum-leap-of-a-smartwatch-os/ -[4]:http://arstechnica.com/gadgets/2014/02/googles-project-tango-is-a-smartphone-with-kinect-style-computer-vision/ -[5]:http://arstechnica.com/gadgets/2013/12/google-robots-former-android-chief-will-lead-google-robotics-division/ -[6]:http://arstechnica.com/gadgets/2013/12/lg-g-flex-review-form-over-even-basic-function/ -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/sources/talk/The history of Android/15 - The history of Android.md b/sources/talk/The history of Android/15 - The history of Android.md index 078e106d1c..9ca4176245 100644 --- a/sources/talk/The history of Android/15 - The history of Android.md +++ b/sources/talk/The history of Android/15 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x translating + The history of Android ================================================================================ ![Gingerbread's new keyboard, text selection UI, overscroll effect, and new checkboxes.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/3kb-high-over-check.png) @@ -83,4 +85,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo From 3a1a3791ffe994500f0a24e5e99396f33c676986 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 1 May 2015 18:27:00 +0800 Subject: [PATCH 0694/2517] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201504?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...xaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md | 0 .../20141204 Intense Gameplay--Try these 13 Roguelike games.md | 0 ...rld WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md | 0 ... to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md | 0 ... to Remember and Restore Running Applications on Next Logon.md | 0 ...How are C data types “supported directly by most computers”.md | 0 published/{ => 201504}/20150128 Docker-1 Moving to Docker.md | 0 ...50202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md | 0 .../20150202 tespeed - Python Tool To Test Your Internet Speed.md | 0 ...ll Linux-dash Web Based Monitoring System In CentOS or RHEL.md | 0 ...0205 25 Linux Shell Scripting interview Questions & Answers.md | 0 ...150205 How To Install or Configure VNC Server On CentOS 7.0.md | 0 ... A WordPress Website Security Using WPScan, Nmap, And Nikto.md | 0 ...20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md | 0 ...lashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md | 0 ...x 'fatal error--x264.h--No such file or directory' on Linux.md | 0 .../20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md | 0 ...50211 Simple Steps Migration From MySQL To MariaDB On Linux.md | 0 ...lyze and view Apache web server logs interactively on Linux.md | 0 ...w to share files between computers over network with btsync.md | 0 ... error--lame or lame.h--No such file or directory' on Linux.md | 0 ...s with Answers--How to install a USB webcam in Raspberry Pi.md | 0 ...ple who start writing kernel code get hired really quickly'.md | 0 published/{ => 201504}/20150227 Chess in a Few Bytes.md | 0 ...0150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md | 0 ...4 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md | 0 published/{ => 201504}/20150306 Nmap--Not Just for Evil.md | 0 ...20150309 10 Useful 'ls' Command Interview Questions--Part 2.md | 0 ...50309 15 Interview Questions on Linux 'ls ' Command--Part 1.md | 0 .../20150310 4 Linux Based Mini PC You Can Buy In 2015.md | 0 ...50310 How To Get Email Alerts for SSH Login on Linux Server.md | 0 ...ow to convert between local time and UNIX timestamp in Perl.md | 0 .../{ => 201504}/20150318 Fedora GNOME Keyboard Shortcuts.md | 0 .../20150318 Install And Use 'Go For It!' To Do App In Linux.md | 0 published/{ => 201504}/20150318 The future of Linux storage.md | 0 .../{ => 201504}/20150323 Papyrus--An Open Source Note Manager.md | 0 .../20150323 Red Hat Developer Toolset 3.1 beta arrives.md | 0 ...0324 How to Install Telegram Messenger Application on Linux.md | 0 .../20150324 Prips--Print IP address on a given range.md | 0 .../{ => 201504}/20150326 Mydumper--Mysql Database Backup tool.md | 0 .../{ => 201504}/20150330 Picty--Managing Photos Made Easy.md | 0 .../20150402 The VirtualBox 5.0 beta is finally here.md | 0 .../20150409 How to Run GUI Apps in a Docker Container.md | 0 ...50410 10 Famous IT Skills in Demand That Will Get You Hired.md | 0 ...ntary OS 0.3 Freya Screenshots - Download and Install Guide.md | 0 ... Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md | 0 ...c Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md | 0 ... Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md | 0 ... Most Popular Programming Languages in to GitHub Since 2012.md | 0 ...Things to Do After Minimal RHEL or CentOS 7 Installation--1.md | 0 ...Things to Do After Minimal RHEL or CentOS 7 Installation--2.md | 0 ...Things to Do After Minimal RHEL or CentOS 7 Installation--3.md | 0 published/{ => 201504}/Debian 8 Jessie released.md | 0 .../{ => 201504}/GNOME-Pie 0.6 Application Launcher Released.md | 0 ... to create a custom backup plan for Debian with backupninja.md | 0 55 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201504}/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md (100%) rename published/{ => 201504}/20141204 Intense Gameplay--Try these 13 Roguelike games.md (100%) rename published/{ => 201504}/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md (100%) rename published/{ => 201504}/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md (100%) rename published/{ => 201504}/20150119 How to Remember and Restore Running Applications on Next Logon.md (100%) rename published/{ => 201504}/20150122 How are C data types “supported directly by most computers”.md (100%) rename published/{ => 201504}/20150128 Docker-1 Moving to Docker.md (100%) rename published/{ => 201504}/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md (100%) rename published/{ => 201504}/20150202 tespeed - Python Tool To Test Your Internet Speed.md (100%) rename published/{ => 201504}/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md (100%) rename published/{ => 201504}/20150205 25 Linux Shell Scripting interview Questions & Answers.md (100%) rename published/{ => 201504}/20150205 How To Install or Configure VNC Server On CentOS 7.0.md (100%) rename published/{ => 201504}/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md (100%) rename published/{ => 201504}/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md (100%) rename published/{ => 201504}/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md (100%) rename published/{ => 201504}/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md (100%) rename published/{ => 201504}/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md (100%) rename published/{ => 201504}/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md (100%) rename published/{ => 201504}/20150215 How to analyze and view Apache web server logs interactively on Linux.md (100%) rename published/{ => 201504}/20150215 How to share files between computers over network with btsync.md (100%) rename published/{ => 201504}/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md (100%) rename published/{ => 201504}/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md (100%) rename published/{ => 201504}/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md (100%) rename published/{ => 201504}/20150227 Chess in a Few Bytes.md (100%) rename published/{ => 201504}/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md (100%) rename published/{ => 201504}/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md (100%) rename published/{ => 201504}/20150306 Nmap--Not Just for Evil.md (100%) rename published/{ => 201504}/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md (100%) rename published/{ => 201504}/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md (100%) rename published/{ => 201504}/20150310 4 Linux Based Mini PC You Can Buy In 2015.md (100%) rename published/{ => 201504}/20150310 How To Get Email Alerts for SSH Login on Linux Server.md (100%) rename published/{ => 201504}/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md (100%) rename published/{ => 201504}/20150318 Fedora GNOME Keyboard Shortcuts.md (100%) rename published/{ => 201504}/20150318 Install And Use 'Go For It!' To Do App In Linux.md (100%) rename published/{ => 201504}/20150318 The future of Linux storage.md (100%) rename published/{ => 201504}/20150323 Papyrus--An Open Source Note Manager.md (100%) rename published/{ => 201504}/20150323 Red Hat Developer Toolset 3.1 beta arrives.md (100%) rename published/{ => 201504}/20150324 How to Install Telegram Messenger Application on Linux.md (100%) rename published/{ => 201504}/20150324 Prips--Print IP address on a given range.md (100%) rename published/{ => 201504}/20150326 Mydumper--Mysql Database Backup tool.md (100%) rename published/{ => 201504}/20150330 Picty--Managing Photos Made Easy.md (100%) rename published/{ => 201504}/20150402 The VirtualBox 5.0 beta is finally here.md (100%) rename published/{ => 201504}/20150409 How to Run GUI Apps in a Docker Container.md (100%) rename published/{ => 201504}/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md (100%) rename published/{ => 201504}/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md (100%) rename published/{ => 201504}/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md (100%) rename published/{ => 201504}/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md (100%) rename published/{ => 201504}/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md (100%) rename published/{ => 201504}/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md (100%) rename published/{ => 201504}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md (100%) rename published/{ => 201504}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md (100%) rename published/{ => 201504}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md (100%) rename published/{ => 201504}/Debian 8 Jessie released.md (100%) rename published/{ => 201504}/GNOME-Pie 0.6 Application Launcher Released.md (100%) rename published/{ => 201504}/How to create a custom backup plan for Debian with backupninja.md (100%) diff --git a/published/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md b/published/201504/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md similarity index 100% rename from published/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md rename to published/201504/20141106 Exaile 3.4.1 Overview--A Feature-Complete GNOME Music Player.md diff --git a/published/20141204 Intense Gameplay--Try these 13 Roguelike games.md b/published/201504/20141204 Intense Gameplay--Try these 13 Roguelike games.md similarity index 100% rename from published/20141204 Intense Gameplay--Try these 13 Roguelike games.md rename to published/201504/20141204 Intense Gameplay--Try these 13 Roguelike games.md diff --git a/published/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md b/published/201504/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md similarity index 100% rename from published/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md rename to published/201504/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md diff --git a/published/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md b/published/201504/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md similarity index 100% rename from published/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md rename to published/201504/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md diff --git a/published/20150119 How to Remember and Restore Running Applications on Next Logon.md b/published/201504/20150119 How to Remember and Restore Running Applications on Next Logon.md similarity index 100% rename from published/20150119 How to Remember and Restore Running Applications on Next Logon.md rename to published/201504/20150119 How to Remember and Restore Running Applications on Next Logon.md diff --git a/published/20150122 How are C data types “supported directly by most computers”.md b/published/201504/20150122 How are C data types “supported directly by most computers”.md similarity index 100% rename from published/20150122 How are C data types “supported directly by most computers”.md rename to published/201504/20150122 How are C data types “supported directly by most computers”.md diff --git a/published/20150128 Docker-1 Moving to Docker.md b/published/201504/20150128 Docker-1 Moving to Docker.md similarity index 100% rename from published/20150128 Docker-1 Moving to Docker.md rename to published/201504/20150128 Docker-1 Moving to Docker.md diff --git a/published/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md b/published/201504/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md similarity index 100% rename from published/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md rename to published/201504/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md diff --git a/published/20150202 tespeed - Python Tool To Test Your Internet Speed.md b/published/201504/20150202 tespeed - Python Tool To Test Your Internet Speed.md similarity index 100% rename from published/20150202 tespeed - Python Tool To Test Your Internet Speed.md rename to published/201504/20150202 tespeed - Python Tool To Test Your Internet Speed.md diff --git a/published/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md b/published/201504/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md similarity index 100% rename from published/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md rename to published/201504/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md diff --git a/published/20150205 25 Linux Shell Scripting interview Questions & Answers.md b/published/201504/20150205 25 Linux Shell Scripting interview Questions & Answers.md similarity index 100% rename from published/20150205 25 Linux Shell Scripting interview Questions & Answers.md rename to published/201504/20150205 25 Linux Shell Scripting interview Questions & Answers.md diff --git a/published/20150205 How To Install or Configure VNC Server On CentOS 7.0.md b/published/201504/20150205 How To Install or Configure VNC Server On CentOS 7.0.md similarity index 100% rename from published/20150205 How To Install or Configure VNC Server On CentOS 7.0.md rename to published/201504/20150205 How To Install or Configure VNC Server On CentOS 7.0.md diff --git a/published/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md b/published/201504/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md similarity index 100% rename from published/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md rename to published/201504/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md diff --git a/published/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md b/published/201504/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md similarity index 100% rename from published/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md rename to published/201504/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md diff --git a/published/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md b/published/201504/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md similarity index 100% rename from published/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md rename to published/201504/20150209 Install the Gnome Flashback classical desktop on Ubuntu 14.10 or Linux Mint 17.md diff --git a/published/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md b/published/201504/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md similarity index 100% rename from published/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md rename to published/201504/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md diff --git a/published/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/published/201504/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md similarity index 100% rename from published/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md rename to published/201504/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md diff --git a/published/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/published/201504/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md similarity index 100% rename from published/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md rename to published/201504/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md diff --git a/published/20150215 How to analyze and view Apache web server logs interactively on Linux.md b/published/201504/20150215 How to analyze and view Apache web server logs interactively on Linux.md similarity index 100% rename from published/20150215 How to analyze and view Apache web server logs interactively on Linux.md rename to published/201504/20150215 How to analyze and view Apache web server logs interactively on Linux.md diff --git a/published/20150215 How to share files between computers over network with btsync.md b/published/201504/20150215 How to share files between computers over network with btsync.md similarity index 100% rename from published/20150215 How to share files between computers over network with btsync.md rename to published/201504/20150215 How to share files between computers over network with btsync.md diff --git a/published/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md b/published/201504/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md similarity index 100% rename from published/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md rename to published/201504/20150225 Linux FAQs with Answers--How to fix 'fatal error--lame or lame.h--No such file or directory' on Linux.md diff --git a/published/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md b/published/201504/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md similarity index 100% rename from published/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md rename to published/201504/20150225 Linux FAQs with Answers--How to install a USB webcam in Raspberry Pi.md diff --git a/published/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md b/published/201504/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md similarity index 100% rename from published/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md rename to published/201504/20150225 Torvalds--'People who start writing kernel code get hired really quickly'.md diff --git a/published/20150227 Chess in a Few Bytes.md b/published/201504/20150227 Chess in a Few Bytes.md similarity index 100% rename from published/20150227 Chess in a Few Bytes.md rename to published/201504/20150227 Chess in a Few Bytes.md diff --git a/published/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md b/published/201504/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md similarity index 100% rename from published/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md rename to published/201504/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md diff --git a/published/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md b/published/201504/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md similarity index 100% rename from published/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md rename to published/201504/20150304 How To Fix 'Not Enough Free Disk Space On boot' In Ubuntu.md diff --git a/published/20150306 Nmap--Not Just for Evil.md b/published/201504/20150306 Nmap--Not Just for Evil.md similarity index 100% rename from published/20150306 Nmap--Not Just for Evil.md rename to published/201504/20150306 Nmap--Not Just for Evil.md diff --git a/published/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md b/published/201504/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md similarity index 100% rename from published/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md rename to published/201504/20150309 10 Useful 'ls' Command Interview Questions--Part 2.md diff --git a/published/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md b/published/201504/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md similarity index 100% rename from published/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md rename to published/201504/20150309 15 Interview Questions on Linux 'ls ' Command--Part 1.md diff --git a/published/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/published/201504/20150310 4 Linux Based Mini PC You Can Buy In 2015.md similarity index 100% rename from published/20150310 4 Linux Based Mini PC You Can Buy In 2015.md rename to published/201504/20150310 4 Linux Based Mini PC You Can Buy In 2015.md diff --git a/published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md b/published/201504/20150310 How To Get Email Alerts for SSH Login on Linux Server.md similarity index 100% rename from published/20150310 How To Get Email Alerts for SSH Login on Linux Server.md rename to published/201504/20150310 How To Get Email Alerts for SSH Login on Linux Server.md diff --git a/published/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md b/published/201504/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md similarity index 100% rename from published/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md rename to published/201504/20150316 Linux FAQs with Answers--How to convert between local time and UNIX timestamp in Perl.md diff --git a/published/20150318 Fedora GNOME Keyboard Shortcuts.md b/published/201504/20150318 Fedora GNOME Keyboard Shortcuts.md similarity index 100% rename from published/20150318 Fedora GNOME Keyboard Shortcuts.md rename to published/201504/20150318 Fedora GNOME Keyboard Shortcuts.md diff --git a/published/20150318 Install And Use 'Go For It!' To Do App In Linux.md b/published/201504/20150318 Install And Use 'Go For It!' To Do App In Linux.md similarity index 100% rename from published/20150318 Install And Use 'Go For It!' To Do App In Linux.md rename to published/201504/20150318 Install And Use 'Go For It!' To Do App In Linux.md diff --git a/published/20150318 The future of Linux storage.md b/published/201504/20150318 The future of Linux storage.md similarity index 100% rename from published/20150318 The future of Linux storage.md rename to published/201504/20150318 The future of Linux storage.md diff --git a/published/20150323 Papyrus--An Open Source Note Manager.md b/published/201504/20150323 Papyrus--An Open Source Note Manager.md similarity index 100% rename from published/20150323 Papyrus--An Open Source Note Manager.md rename to published/201504/20150323 Papyrus--An Open Source Note Manager.md diff --git a/published/20150323 Red Hat Developer Toolset 3.1 beta arrives.md b/published/201504/20150323 Red Hat Developer Toolset 3.1 beta arrives.md similarity index 100% rename from published/20150323 Red Hat Developer Toolset 3.1 beta arrives.md rename to published/201504/20150323 Red Hat Developer Toolset 3.1 beta arrives.md diff --git a/published/20150324 How to Install Telegram Messenger Application on Linux.md b/published/201504/20150324 How to Install Telegram Messenger Application on Linux.md similarity index 100% rename from published/20150324 How to Install Telegram Messenger Application on Linux.md rename to published/201504/20150324 How to Install Telegram Messenger Application on Linux.md diff --git a/published/20150324 Prips--Print IP address on a given range.md b/published/201504/20150324 Prips--Print IP address on a given range.md similarity index 100% rename from published/20150324 Prips--Print IP address on a given range.md rename to published/201504/20150324 Prips--Print IP address on a given range.md diff --git a/published/20150326 Mydumper--Mysql Database Backup tool.md b/published/201504/20150326 Mydumper--Mysql Database Backup tool.md similarity index 100% rename from published/20150326 Mydumper--Mysql Database Backup tool.md rename to published/201504/20150326 Mydumper--Mysql Database Backup tool.md diff --git a/published/20150330 Picty--Managing Photos Made Easy.md b/published/201504/20150330 Picty--Managing Photos Made Easy.md similarity index 100% rename from published/20150330 Picty--Managing Photos Made Easy.md rename to published/201504/20150330 Picty--Managing Photos Made Easy.md diff --git a/published/20150402 The VirtualBox 5.0 beta is finally here.md b/published/201504/20150402 The VirtualBox 5.0 beta is finally here.md similarity index 100% rename from published/20150402 The VirtualBox 5.0 beta is finally here.md rename to published/201504/20150402 The VirtualBox 5.0 beta is finally here.md diff --git a/published/20150409 How to Run GUI Apps in a Docker Container.md b/published/201504/20150409 How to Run GUI Apps in a Docker Container.md similarity index 100% rename from published/20150409 How to Run GUI Apps in a Docker Container.md rename to published/201504/20150409 How to Run GUI Apps in a Docker Container.md diff --git a/published/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md b/published/201504/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md similarity index 100% rename from published/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md rename to published/201504/20150410 10 Famous IT Skills in Demand That Will Get You Hired.md diff --git a/published/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md b/published/201504/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md similarity index 100% rename from published/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md rename to published/201504/20150413 Elementary OS 0.3 Freya Screenshots - Download and Install Guide.md diff --git a/published/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md b/published/201504/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md similarity index 100% rename from published/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md rename to published/201504/20150413 Linux Kernel 4.0 Features Live Kernel Patching PS3 Support.md diff --git a/published/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md b/published/201504/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md similarity index 100% rename from published/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md rename to published/201504/20150415 HTTP Public Key Pinning Extension HPKP for Apache, NGINX and Lighttpd.md diff --git a/published/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/published/201504/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md similarity index 100% rename from published/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md rename to published/201504/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md diff --git a/published/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md b/published/201504/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md similarity index 100% rename from published/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md rename to published/201504/20150423 The Most Popular Programming Languages in to GitHub Since 2012.md diff --git a/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md b/published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md similarity index 100% rename from published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md rename to published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--1.md diff --git a/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md b/published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md similarity index 100% rename from published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md rename to published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--2.md diff --git a/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md b/published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md similarity index 100% rename from published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md rename to published/201504/30 Things to Do After Minimal RHEL or CentOS 7 Installation--3.md diff --git a/published/Debian 8 Jessie released.md b/published/201504/Debian 8 Jessie released.md similarity index 100% rename from published/Debian 8 Jessie released.md rename to published/201504/Debian 8 Jessie released.md diff --git a/published/GNOME-Pie 0.6 Application Launcher Released.md b/published/201504/GNOME-Pie 0.6 Application Launcher Released.md similarity index 100% rename from published/GNOME-Pie 0.6 Application Launcher Released.md rename to published/201504/GNOME-Pie 0.6 Application Launcher Released.md diff --git a/published/How to create a custom backup plan for Debian with backupninja.md b/published/201504/How to create a custom backup plan for Debian with backupninja.md similarity index 100% rename from published/How to create a custom backup plan for Debian with backupninja.md rename to published/201504/How to create a custom backup plan for Debian with backupninja.md From 9b3307eaa89c6aecb2158b79c7847af98f451906 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 1 May 2015 18:27:42 +0800 Subject: [PATCH 0695/2517] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--4 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--4.md | 92 +++++++++++-------- 1 file changed, 53 insertions(+), 39 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md (56%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md similarity index 56% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md index f73d1e9b3b..b6d7ae7f10 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md @@ -1,55 +1,59 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--4 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(四) ================================================================================ ### 17. 安装 Webmin ### -Webmin 是基于 Web 的 Linux 配置工具。它像一个中央系统用于配置各种系统设置,比如用户、磁盘分配、服务以及 HTTP 服务器、Apache、MySQL 等的配置。 +Webmin 是基于 Web 的 Linux 配置工具。它像一个中央系统,用于配置各种系统设置,比如用户、磁盘分配、服务以及 HTTP 服务器、Apache、MySQL 等的配置。 # wget http://prdownloads.sourceforge.net/webadmin/webmin-1.740-1.noarch.rpm # rpm -ivh webmin-*.rpm ![在 CentOS 7 上安装 Webmin](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Webmin.jpeg) -安装 Webmin -安装完 webmin 后,你会在终端上得到一个用你的 root 密码在 端口 10000 登录你的主机(http://ip-address:10000)的信息。 如果运行的是无头服务器(译注:无头服务器是指没有专门用于向其它计算机和它们的用户提供服务的本地接口的计算设备)你可以转发端口然后从有头机器/服务器上访问它。 +*安装 Webmin* + +安装完 webmin 后,你会在终端上得到一个消息,提示你用 root 密码在端口 10000 登录你的主机 (http://ip-address:10000)。 如果运行的是无接口的服务器你可以转发端口然后从有接口的服务器上访问它。(LCTT 译注:无接口[headless]服务器指没有访问接口或界面的服务器,在此次场景,指的是是出于内网的服务器,可采用外网/路由器映射来访问该端口) ### 18. 启用第三方库 ### -添加不受信任的库并不是一个好主意,尤其是在生产环境中,这可能导致致命的问题。但仅作为例子在这里我们会添加一些社区证实可信任的库用于安装第三方工具和软件包。 +添加不受信任的库并不是一个好主意,尤其是在生产环境中,这可能导致致命的问题。但仅作为例子在这里我们会添加一些社区证实可信任的库,以安装第三方工具和软件包。 -为企业版 Linux(EPEL)库添加额外的软件包。 +为企业版 Linux(EPEL)库添加额外的软件包。 # yum install epel-release -添加社区企业版 Linux 库 +添加社区企业版 Linux (Community Enterprise Linux)库: # rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm ![安装 Epel 库](http://www.tecmint.com/wp-content/uploads/2015/04/install-epel-repo.jpeg) -安装 Epel 库 -**注意**! 添加第三方库的时候尤其需要注意。 +*安装 Epel 库* + +**注意!** 添加第三方库的时候尤其需要注意。 ### 19. 安装 7-zip 工具 ### -在最小化安装 CentOS 时你并没有获得类似 unzip 或者 untar 的工具。我们可以选择基于需要安装每个工具或者一个能处理所有格式的工具。7-zip 就是一个能压缩和解压所有已知类型文件的工具。 +在最小化安装 CentOS 时你并没有获得类似 unzip 或者 untar 的工具。我们可以选择根据需要来安装每个工具,或一个能处理所有格式的工具。7-zip 就是一个能压缩和解压所有已知类型文件的工具。 # yum install p7zip ![安装 7zip 工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-7zip-tool.jpeg) -安装 7zip 工具 + +*安装 7zip 工具* **注意**: 该软件包从 Fedora EPEL 7 的库中下载和安装。 ### 20. 安装 NTFS-3G 驱动 ### -NTFS-3G,一个很小但非常有用的 NTFS 驱动在大部分类 UNIX 发行版上都可用。它对于挂载和访问 Windows NTFS 文件系统很有用。尽管也有其它可用的替代品,比如 Tuxera,但 NTFS-3G 是使用最广泛的。 +NTFS-3G,一个很小但非常有用的 NTFS 驱动,在大部分类 UNIX 发行版上都可用。它对于挂载和访问 Windows NTFS 文件系统很有用。尽管也有其它可用的替代品,比如 Tuxera,但 NTFS-3G 是使用最广泛的。 # yum install ntfs-3g ![在 CentOS 上安装 NTFS-3G](http://www.tecmint.com/wp-content/uploads/2015/04/Install-NTFS-3G.jpeg) -安装 NTFS-3G 用于挂载 Windows 分区 -ntfs-3g 安装完成之后,你可以使用以下命令挂载 Windows NTFS 分区(我的 Windows 分区是 /dev/sda5)。 +*安装 NTFS-3G 用于挂载 Windows 分区* + +ntfs-3g 安装完成之后,你可以使用以下命令挂载 Windows NTFS 分区(我的 Windows 分区是 /dev/sda5)。 # mount -ro ntfs-3g /dev/sda5 /mnt # cd /mnt @@ -62,25 +66,26 @@ VSFTPD 表示 Very Secure File Transfer Protocol Daemon,是用于类 UNIX 系 # yum install vsftpd ![在 CentOS 7 上安装 Vsftpd](http://www.tecmint.com/wp-content/uploads/2015/04/Install-FTP.jpeg) -安装 Vsftpd FTP + +*安装 Vsftpd FTP* 编辑配置文件 ‘/etc/vsftpd/vsftpd.conf’ 用于保护 vsftpd。 # vi /etc/vsftpd/vsftpd.conf -编辑一些值并使其它保留原样,除非你知道自己在做什么。 +编辑一些值并使其它行保留原样,除非你知道自己在做什么。 anonymous_enable=NO local_enable=YES write_enable=YES chroot_local_user=YES -你也可以更改端口号并使 vsftpd 端口通过防火墙。 +你也可以更改端口号,记得让 vsftpd 端口通过防火墙。 # firewall-cmd --add-port=21/tcp # firewall-cmd --reload -下一步重启 vsftpd 并启用随机启动。 +下一步重启 vsftpd 并启用开机自动启动。 # systemctl restart vsftpd # systemctl enable vsftpd @@ -91,32 +96,33 @@ sudo 通常被称为 super do 或者 suitable user do,是一个类 UNIX 操作 # visudo -打开要编辑的文件 /etc/sudoers +这会打开 /etc/sudoers 并进行编辑 ![sudoers 文件](http://www.tecmint.com/wp-content/uploads/2015/04/sudoers-File.jpeg) -sudoers 文件 -给一个已经创建的用户(比如 tecmint)赋予所有权限(等同于 root)。 +*sudoers 文件* - tecmint ALL=(ALL) ALL +1. 给一个已经创建好的用户(比如 tecmint)赋予所有权限(等同于 root)。 -给一个已经创建的用户(比如 tecmint)赋予除重启和关闭服务器以外的所有权限(等同于 root)。 + tecmint ALL=(ALL) ALL -再一次打开文件并用下面的内容编辑文件。 +2. 如果给一个已经创建好的用户(比如 tecmint)赋予除了重启和关闭服务器以外的所有权限(等同于 root)。 - cmnd_Alias nopermit = /sbin/shutdown, /sbin/reboot + 首先,再一次打开文件并编辑如下内容: -用 逻辑操作符(!) 添加别名。 + cmnd_Alias nopermit = /sbin/shutdown, /sbin/reboot - tecmint ALL=(ALL) ALL,!nopermit + 然后,用逻辑操作符(!)添加该别名。 -准许一个组(比如 debian) 运行一些 root 权限命令,比如(增加或删除用户)。 + tecmint ALL=(ALL) ALL,!nopermit - cmnd_Alias permit = /usr/sbin/useradd, /usr/sbin/userdel +3. 如果准许一个组(比如 debian)运行一些 root 权限命令,比如(增加或删除用户)。 -给组 debian 增加权限。 + cmnd_Alias permit = /usr/sbin/useradd, /usr/sbin/userdel - debian ALL=(ALL) permit + 然后,给组 debian 增加权限。 + + debian ALL=(ALL) permit ### 23. 安装并启用 SELinux ### @@ -125,24 +131,28 @@ SELinux 表示 Security-Enhanced Linux,是内核级别的安全模块。 # yum install selinux-policy ![在 CentOS 7 上安装 SElinux](http://www.tecmint.com/wp-content/uploads/2015/04/Install-SElinux.jpeg) -安装 SElinux 策略 -查看 SELinux 模式。 +*安装 SElinux 策略* + +查看 SELinux 当前模式。 # getenforce ![查看 SELinux 模式](http://www.tecmint.com/wp-content/uploads/2015/04/Check-SELinux-Mode.jpeg) -查看 SELinux 模式 + +*查看 SELinux 模式* 输出是 Enforcing,意味着 SELinux 策略已经生效。 -为了调试,可以临时设置 selinux 模式为允许。不需要重启。 +如果需要调试,可以临时设置 selinux 模式为允许。不需要重启。 # setenforce 0 调试完了之后再次设置 selinux 为强制模式,无需重启。 # setenforce 1 + +(LCTT 译注:在生产环境中,SELinux 固然会提升安全,但是也确实会给应用部署和运行带来不少麻烦。具体是否部署,需要根据情况而定。) ### 24. 安装 Rootkit Hunter ### @@ -151,17 +161,21 @@ Rootkit Hunter,简写为 RKhunter,是在 Linux 系统中扫描 rootkits 和 # yum install rkhunter ![安装 Rootkit Hunter](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Rootkit-Hunter.jpeg) -安装 Rootkit Hunter + +*安装 Rootkit Hunter* 在 Linux 中,从脚本文件以计划作业的形式运行 rkhunter 或者手动扫描有害攻击。 # rkhunter --check ![扫描 rootkits](http://www.tecmint.com/wp-content/uploads/2015/04/Scan-for-rootkits.png) -扫描 rootkits + +*扫描 rootkits* ![RootKit 扫描结果](http://www.tecmint.com/wp-content/uploads/2015/04/RootKit-Results.png) -RootKit 扫描结果 + +*RootKit 扫描结果* + -------------------------------------------------------------------------------- @@ -169,7 +183,7 @@ via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installatio 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d1656d459bdcde8a82f5f00c3019f42d50ba762b Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 1 May 2015 21:32:36 +0800 Subject: [PATCH 0696/2517] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--5 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--5.md | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md (73%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md similarity index 73% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md index 9845595af0..446d6c663d 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md @@ -1,8 +1,8 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--5 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(五) ================================================================================ ### 25. 安装 Linux Malware Detect (LMD) ### -Linux Malware Detect (LMD) 是 GNU GPLv2 协议下发布的开源 Linux 恶意程序扫描器,尤其是为面临威胁的主机环境。LMD 完整的安装、配置以及使用方法可以查看: +Linux Malware Detect (LMD) 是 GNU GPLv2 协议下发布的开源 Linux 恶意程序扫描器,它是特别为面临威胁的主机环境所设计的。LMD 完整的安装、配置以及使用方法可以查看: - [安装 LMD 并和 ClamAV 一起使用作为反病毒引擎][1] @@ -10,9 +10,9 @@ Linux Malware Detect (LMD) 是 GNU GPLv2 协议下发布的开源 Linux 恶意 speedtest-cli 是用 python 写的用于测试网络下载和上传带宽的工具。关于 speedtest-cli 工具的完整安装和使用请阅读我们的文章[用命令行查看 Linux 服务器带宽][2] -### 27. 配置 Cron 作业 ### +### 27. 配置 Cron 任务 ### -这是最广泛使用的软件工具之一。它是一个作业调度器,比如,现在安排一个以后可以自动运行的作业。它对于日志、保存没有实现的记录以及其它日常工作,比如常规备份,非常有用。所有的调度都写在文件 /etc/crontab 中。 +这是最广泛使用的软件工具之一。它是一个任务调度器,比如,现在安排一个以后可以自动运行的作业。它用于未处理记录的日志和维护,以及其它日常工作,比如常规备份。所有的调度都写在文件 /etc/crontab 中。 crontab 文件包含下面的 6 个域: @@ -20,18 +20,19 @@ crontab 文件包含下面的 6 个域: (0-59) (0-23) (1-31) (1/jan-12/dec) (0-6/sun-sat) Command/script ![Crontab 域](http://www.tecmint.com/wp-content/uploads/2015/04/Crontab-Fields.jpeg) -Crontab 域 -在每天 04:30 运行一个 cron 作业(比如运行 /home/$USER/script.sh)。 +*Crontab 域* + +要在每天 04:30 运行一个 cron 任务(比如运行 /home/$USER/script.sh)。 分 时 日期 月份 星期 命令 30 4 * * * speedtest-cli -把下面的条目增加到 crontab 文件 ‘/etc/crontab/’。 +就把下面的条目增加到 crontab 文件 ‘/etc/crontab/’。 30 4 * * * /home/$user/script.sh -把上面一行增加到 crontab 之后,它会在每天的 04:30 am 自动运行,输出取决于脚本文件的内容。另外脚本也可以用命令代替。关于更多 cron 作业的例子,可以阅读[Linux 上的 11 个 Cron 作业例子][3] +把上面一行增加到 crontab 之后,它会在每天的 04:30 am 自动运行,输出取决于脚本文件的内容。另外脚本也可以用命令代替。关于更多 cron 任务的例子,可以阅读[Linux 上的 11 个 Cron 任务例子][3] ### 28. 安装 Owncloud ### @@ -41,12 +42,13 @@ Owncloud 是一个基于 HTTP 的数据同步、文件共享和远程文件存 虚拟化是创建虚拟操作系统、硬件和网络的过程,是当今最热门的技术之一。我们会详细地讨论如何安装和配置虚拟化。 -我们的最小化 CentOS 服务器是一个无头服务器(译注:无头服务器是指没有专门用于向其它计算机和它们的用户提供服务的本地接口的计算设备)。我们通过安装下面的软件包为它承载可通过 HTTP 访问的虚拟机器做准备。 +我们的最小化 CentOS 服务器是一个无用户界面服务器(LCTT 译注:无用户界面[headless]服务器指没有监视器和鼠标键盘等外设的服务器)。我们通过安装下面的软件包,让它可以托管虚拟机,虚拟机可通过 HTTP 访问。 # yum groupinstall 'Development Tools' SDL kernel-devel kernel-headers dkms ![安装开发工具](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Development-Tool.jpeg) -安装开发工具 + +*安装开发工具* 更改工作目录到 ‘/etc/yum.repos.d/’ 并下载 VirtualBox 库。 @@ -66,10 +68,12 @@ Owncloud 是一个基于 HTTP 的数据同步、文件共享和远程文件存 # VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.12-93733.vbox-extpack ![安装 VirtualBox 扩展包](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Virtualbox-Extension-Pack.jpeg) -安装 VirtualBox 扩展包 + +*安装 VirtualBox 扩展包* ![正在安装 VirtualBox 扩展包](http://www.tecmint.com/wp-content/uploads/2015/04/Installing-Virtualbox-Extension-Pack.jpeg) -正在安装 VirtualBox 扩展包 + +*正在安装 VirtualBox 扩展包* 添加用户 ‘vbox’ 用于管理 VirtualBox 并把它添加到组 vboxusers 中。 @@ -81,11 +85,11 @@ Owncloud 是一个基于 HTTP 的数据同步、文件共享和远程文件存 # yum install httpd -安装 PHP (有 soap 扩展)。 +安装 PHP (支持 soap 扩展)。 # yum install php php-devel php-common php-soap php-gd -下载 PHP virtualBox. +下载 phpVirtualBox(一个 PHP 写的开源的 VirtualBox 用户界面)。 # wget http://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-4.3-1.zip @@ -107,15 +111,17 @@ Owncloud 是一个基于 HTTP 的数据同步、文件共享和远程文件存 # service vbox-service restart # service httpd restart -转发端口并从一个有头服务器上访问它。 +转发端口并从一个有用户界面的服务器上访问它。 http://192.168.0.15/phpvirtualbox-4.3-1/ ![登录 PHP Virtualbox](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox-Login.png) -登录 PHP Virtualbox + +*登录 PHP Virtualbox* ![PHP Virtualbox 面板](http://www.tecmint.com/wp-content/uploads/2015/04/PHP-Virtualbox.png) -PHP Virtualbox 面板 + +*PHP Virtualbox 面板* -------------------------------------------------------------------------------- @@ -123,12 +129,12 @@ via: http://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installatio 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/install-linux-malware-detect-lmd-in-rhel-centos-and-fedora/ -[2]:http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ +[1]:https://linux.cn/article-5156-1.html +[2]:https://linux.cn/article-3796-1.html [3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ -[4]:http://www.tecmint.com/install-owncloud-to-create-personal-storage-in-linux/ \ No newline at end of file +[4]:https://linux.cn/article-2494-1.html \ No newline at end of file From a9040f696dadbf92729f7995631a8984c905ecc7 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 1 May 2015 21:44:52 +0800 Subject: [PATCH 0697/2517] PUB:30 Things to Do After Minimal RHEL or CentOS 7 Installation--6 @ictlyh --- ...inimal RHEL or CentOS 7 Installation--6.md | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) rename {translated/tech => published}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md (72%) diff --git a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md similarity index 72% rename from translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md rename to published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md index b9b86ba04a..c2c00c95a6 100644 --- a/translated/tech/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md +++ b/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md @@ -1,26 +1,27 @@ -安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情--6 +安装完最小化 RHEL/CentOS 7 后需要做的 30 件事情(六) ================================================================================ ### 30. 用密码保护 GRUB ### -用密码保护你的 boot 引导程序这样你就可以在启动时获得额外水平的安全保障。同时你也可以在物理水平获得保护层。通过在引导时给 GRUB 加锁防止任何无授权访问来保护你的服务器。 +用密码保护你的 boot 引导程序这样你就可以在启动时获得额外的安全保障。同时你也可以在实物层面获得保护。通过在引导时给 GRUB 加锁防止任何无授权访问来保护你的服务器。 首先备份两个文件,这样如果有任何错误出现,你可以有回滚的选择。备份 ‘/etc/grub2/grub.cfg’ 为 ‘/etc/grub2/grub.cfg.old’。 # cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.old -同样,备份 ‘/etc/grub.d/10_linux’ 为 ‘/etc/grub.d/10_linux.old’。(这里10_linux下划线不知道怎么弄,请校对的时候注意改正,thx) +同样,备份 ‘/etc/grub.d/10\_linux’ 为 ‘/etc/grub.d/10\_linux.old’。 # cp /etc/grub.d/10_linux /etc/grub.d/10_linux.old -打开文件 ‘/etc/grub.d/10_linux’ 并在文件末尾添加下面一行。 +打开文件 ‘/etc/grub.d/10\_linux’ 并在文件末尾添加下列行。 cat < Date: Fri, 1 May 2015 10:14:17 -0500 Subject: [PATCH 0698/2517] KevinSJ Translating --- .../share/20150407 10 Truly Amusing Easter Eggs in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md b/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md index 6d02c4cfbb..413d50d6d6 100644 --- a/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md +++ b/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md @@ -1,3 +1,4 @@ +KevinSJ translating 10 Truly Amusing Easter Eggs in Linux ================================================================================ ![](http://en.wikipedia.org/wiki/File:Adventure_Easteregg.PNG) @@ -151,4 +152,4 @@ via: http://www.linux.com/news/software/applications/820944-10-truly-amusing-lin [13]:http://nmap.org/book/output-formats-script-kiddie.html [14]:http://nmap.org/book/output-formats-script-kiddie.html [15]:https://www.youtube.com/watch?v=Ql1uLyuWra8 -[16]:http://en.wikipedia.org/wiki/Neko_%28computer_program%29 \ No newline at end of file +[16]:http://en.wikipedia.org/wiki/Neko_%28computer_program%29 From c7430d4f139defcd6398f200105d04c1e0d6b974 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 2 May 2015 10:32:21 +0800 Subject: [PATCH 0699/2517] PUB:20150417 14 Useful Examples of Linux 'sort' Command--Part 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @cvsher 翻译的文字组织的很不错,看得出来已经结合自己的 sort 命令使用经验。 --- ...xamples of Linux 'sort' Command--Part 1.md | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) rename translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md => published/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md (63%) diff --git a/translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md b/published/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md similarity index 63% rename from translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md rename to published/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md index 9653302530..c483c4035f 100644 --- a/translated/tech/[translated]20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md +++ b/published/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md @@ -1,24 +1,24 @@ -Linux ‘sort’命令的14个有用的范例 -- 第一部分 +Linux 的 ‘sort’命令的14个有用的范例(一) ============================================================= Sort是用于对单个或多个文本文件内容进行排序的Linux程序。Sort命令以空格作为字段分隔符,将一行分割为多个关键字对文件进行排序。需要注意的是除非你将输出重定向到文件中,否则Sort命令并不对文件内容进行实际的排序(即文件内容没有修改),只是将文件内容按有序输出。 本文的目标是通过14个实际的范例让你更深刻的理解如何在Linux中使用sort命令。 -###1. 首先我们将会创建一个用于执行‘sort’命令的文本文件(tecmint.txt)。工作路径是‘/home/$USER/Desktop/tecmint’。### +1、 首先我们将会创建一个用于执行‘sort’命令的文本文件(tecmint.txt)。工作路径是‘/home/$USER/Desktop/tecmint’。 -下面命令中的‘-e’选项将‘/’和‘/n’解析成一个新行 +下面命令中的‘-e’选项将启用‘\\’转义,将‘\n’解析成换行 $ echo -e "computer\nmouse\nLAPTOP\ndata\nRedHat\nlaptop\ndebian\nlaptop" > tecmint.txt ![Split String by Lines in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Split-String-by-Lines.gif) -###2. 在开始学习‘sort’命令前,我们先看看文件的内容及其显示方式。### +2、 在开始学习‘sort’命令前,我们先看看文件的内容及其显示方式。 $ cat tecmint.txt ![Check Content of File](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Content-of-File.gif) -###3. 现在,使用如下命令对文件内容进行排序。### +3、 现在,使用如下命令对文件内容进行排序。 $ sort tecmint.txt @@ -26,30 +26,30 @@ Sort是用于对单个或多个文本文件内容进行排序的Linux程序。So **注意**:上面的命令并不对文件内容进行实际的排序,仅仅是将其内容按有序方式输出。 -###4. 对文件‘tecmint.txt’文件内容排序,并将排序后的内容输出到名为sorted.txt的文件中,然后使用[cat][1]命令查看验证sorted.txt文件的内容。### +4、 对文件‘tecmint.txt’文件内容排序,并将排序后的内容输出到名为sorted.txt的文件中,然后使用[cat][1]命令查看验证sorted.txt文件的内容。 $ sort tecmint.txt > sorted.txt $ cat sorted.txt ![Sort File Content in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-File-Content.gif) -###5. 现在使用‘-r’参数对‘tecmint.txt’文件内容进行逆序排序,并将输出内容重定向到‘reversesorted.txt’文件中,并使用cat命令查看文件的内容。### +5、 现在使用‘-r’参数对‘tecmint.txt’文件内容进行逆序排序,并将输出内容重定向到‘reversesorted.txt’文件中,并使用cat命令查看文件的内容。 $ sort -r tecmint.txt > reversesorted.txt $ cat reversesorted.txt ![Sort Content By Reverse](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Reverse.gif) -###6. 创建一个新文件(lsl.txt),文件内容为在home目录下执行‘ls -l’命令的输出。### +6、 创建一个新文件(lsl.txt),文件内容为在home目录下执行‘ls -l’命令的输出。 $ ls -l /home/$USER > /home/$USER/Desktop/tecmint/lsl.txt $ cat lsl.txt ![Populate Output of Home Directory](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Output.gif) -我们将会看到对其他基础字段进行排序的例子,而不是对默认的初始字符进行排序。 +我们将会看到对其他字段进行排序的例子,而不是对默认的开始字符进行排序。 -###7. 基于第二列(符号连接的数量)对文件‘lsl.txt’进行排序。### +7、 基于第二列(符号连接的数量)对文件‘lsl.txt’进行排序。 $ sort -nk2 lsl.txt @@ -57,19 +57,19 @@ Sort是用于对单个或多个文本文件内容进行排序的Linux程序。So ![Sort Content by Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-by-Column.gif) -###8. 基于第9列(文件和目录的名称,非数值)对文件‘lsl.txt’进行排序。### +8、 基于第9列(文件和目录的名称,非数值)对文件‘lsl.txt’进行排序。 $ sort -k9 lsl.txt ![Sort Content Based on Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Based-on-Column.gif) -###9. sort命令并非仅能对文件进行排序,我们还可以通过管道将命令的输出内容重定向到sort命令中。### +9、 sort命令并非仅能对文件进行排序,我们还可以通过管道将命令的输出内容重定向到sort命令中。 $ ls -l /home/$USER | sort -nk5 ![Sort Content Using Pipe Option](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Pipeline.gif) -###10. 对文件tecmint.txt进行排序,并删除重复的行。然后检查重复的行是否已经删除了。### +10、 对文件tecmint.txt进行排序,并删除重复的行。然后检查重复的行是否已经删除了。 $ cat tecmint.txt $ sort -u tecmint.txt @@ -78,23 +78,23 @@ Sort是用于对单个或多个文本文件内容进行排序的Linux程序。So 目前我们发现的排序规则: - 除非指定了‘-r’参数,否则排序的优先级按下面规则排序 +除非指定了‘-r’参数,否则排序的优先级按下面规则排序 + - 以数字开头的行优先级最高 - 以小写字母开头的行优先级次之 - 待排序内容按字典序进行排序 - - 默认情况下,‘sort’命令将带排序内容的每行关键字当作一个字符串进行字典序排序(数字优先级最高,参看规则 - 1) + - 默认情况下,‘sort’命令将带排序内容的每行关键字当作一个字符串进行字典序排序(数字优先级最高,参看规则 1) - -###11. 创建文件‘lsla.txt’,其内容用‘ls -la’命令的输出内容填充。### +11、 在当前位置创建第三个文件‘lsla.txt’,其内容用‘ls -lA’命令的输出内容填充。 $ ls -lA /home/$USER > /home/$USER/Desktop/tecmint/lsla.txt $ cat lsla.txt ![Populate Output With Hidden Files](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Output-With-Hidden-Files.gif) -了解ls命令的读者都知道‘ls -la’=‘ls -l’ + 隐藏文件。因此这两个文件的大部分内容都是相同的。 +了解ls命令的读者都知道‘ls -lA’ 等于 ‘ls -l’ + 隐藏文件,所以这两个文件的大部分内容都是相同的。 -###12. 对上面两个文件内容进行排序输出。### +12、 对上面两个文件内容进行排序输出。 $ sort lsl.txt lsla.txt @@ -102,7 +102,7 @@ Sort是用于对单个或多个文本文件内容进行排序的Linux程序。So 注意文件和目录的重复 -###13. 现在我们看看怎样对两个文件进行排序、合并,并且删除重复行。### +13、 现在我们看看怎样对两个文件进行排序、合并,并且删除重复行。 $ sort -u lsl.txt lsla.txt @@ -110,13 +110,13 @@ Sort是用于对单个或多个文本文件内容进行排序的Linux程序。So 此时,我们注意到重复的行已经被删除了,我们可以将输出内容重定向到文件中。 -###14. 我们同样可以基于多列对文件内容进行排序。基于第2,5(数值)和9(非数值)列对‘ls -l’命令的输出进行排序。### +14、 我们同样可以基于多列对文件内容进行排序。基于第2,5(数值)和9(非数值)列对‘ls -l’命令的输出进行排序。 $ ls -l /home/$USER | sort -t "," -nk2,5 -k9 ![Sort Content By Field Column](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Field-Column.gif) -先到此为止了,在接下来的文章中我们将会学习到‘sort’命令更多的详细例子。届时敬请关注Tecmint。保持分享精神。若喜欢本文,敬请将本文分享给你的朋友。 +先到此为止了,在接下来的文章中我们将会学习到‘sort’命令更多的详细例子。届时敬请关注我们。保持分享精神。若喜欢本文,敬请将本文分享给你的朋友。 -------------------------------------------------------------------------------- @@ -124,7 +124,7 @@ via: http://www.tecmint.com/sort-command-linux/ 作者:[Avishek Kumar][a] 译者:[cvsher](https://github.com/cvsher) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 16a662924cb3eb651a1bfcae6f9a7c7fd192cfd2 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 2 May 2015 10:57:36 +0800 Subject: [PATCH 0700/2517] PUB:20150420 7 Interesting Linux 'sort' Command Examples--Part 2 @DongShuaike --- ...g Linux 'sort' Command Examples--Part 2.md | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) rename {translated/tech => published}/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md (62%) diff --git a/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/published/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md similarity index 62% rename from translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md rename to published/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md index 4602424a3a..476274b495 100644 --- a/translated/tech/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md +++ b/published/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md @@ -1,11 +1,10 @@ - -Linux 'sort'命令的七个有趣实例-第二部分 +Linux 的 'sort'命令的七个有趣实例(二) ================================================================================ -在上一篇文章里,我们已经探讨了关于sort命令的多个例子,如果你错过了这篇文章,可以点击下面的链接进行阅读。今天的这篇文章作为上一篇文章的继续,将讨论关于sort命令的剩余用法,与上一篇一起作为Linux ‘sort’命令的完整指南。 -注:前两天做过这个原文 -- [14 ‘sort’ Command Examples in Linux][1] -- +在[上一篇文章][1]里,我们已经探讨了关于sort命令的多个例子,如果你错过了这篇文章,可以点击下面的链接进行阅读。今天的这篇文章作为上一篇文章的继续,将讨论关于sort命令的剩余用法,与上一篇一起作为Linux ‘sort’命令的完整指南。 + +- [Linux 的 ‘sort’命令的14个有用的范例(一)][1] + 在我们继续深入之前,先创建一个文本文档‘month.txt’,并且将上一次给出的数据填进去。 $ echo -e "mar\ndec\noct\nsep\nfeb\naug" > month.txt @@ -13,7 +12,7 @@ Linux 'sort'命令的七个有趣实例-第二部分 ![Populate Content](http://www.tecmint.com/wp-content/uploads/2015/04/Populate-Content.gif) -### 15. 通过使用’M‘选项,对’month.txt‘文件按照月份顺序进行排序。### +15、 通过使用’M‘选项,对’month.txt‘文件按照月份顺序进行排序。 $ sort -M month.txt @@ -21,14 +20,14 @@ Linux 'sort'命令的七个有趣实例-第二部分 ![Sort File Content by Month in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-by-Month.gif) -### 16. 把数据整理成方便人们阅读的形式,比如1K、2M、3G、2T,这里面的K、G、M、T代表千、兆、吉、梯。 -(译者注:好像这个选项并不是所有Linu版本都有,而且也没有实现按KMGT显示。) +16、 把数据整理成方便人们阅读的形式,比如1K、2M、3G、2T,这里面的K、G、M、T代表千、兆、吉、梯。 +(LCTT 译注:此处命令有误,ls 命令应该增加 -h 参数,径改之) - $ ls -l /home/$USER | sort -h -k5 + $ ls -lh /home/$USER | sort -h -k5 ![Sort Content Human Readable Format](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-Human-Readable-Format.gif) -### 17. 在上一篇文章中,我们在例子4中创建了一个名为‘sorted.txt’的文件,在例子6中创建了一个‘lsl.txt’。‘sorted.txt'已经排好序了而’lsl.txt‘还没有。让我们使用sort命令来检查两个文件是否已经排好序。### +17、 在上一篇文章中,我们在例子4中创建了一个名为‘sorted.txt’的文件,在例子6中创建了一个‘lsl.txt’。‘sorted.txt'已经排好序了而’lsl.txt‘还没有。让我们使用sort命令来检查两个文件是否已经排好序。 $ sort -c sorted.txt @@ -40,14 +39,14 @@ Linux 'sort'命令的七个有趣实例-第二部分 ![Check File Sorted Status](http://www.tecmint.com/wp-content/uploads/2015/04/Check-File-Sorted-Status.gif) -Reports Disorder. Conflict.. 报告无序。存在矛盾…… -### 18. 如果文字之间的分隔符是空格,sort命令自动地将横向空格后的东西当做一个新文字单元,如果分隔符不是空格呢?### +18、 如果文字之间的分隔符是空格,sort命令自动地将空格后的东西当做一个新文字单元,如果分隔符不是空格呢? 考虑这样一个文本文件,里面的内容可以由除了空格之外的任何符号分隔,比如‘|’,‘\’,‘+’,‘.’等…… 创建一个分隔符为+的文本文件。使用‘cat‘命令查看文件内容。 + $ echo -e "21+linux+server+production\n11+debian+RedHat+CentOS\n131+Apache+Mysql+PHP\n7+Shell Scripting+python+perl\n111+postfix+exim+sendmail" > delimiter.txt ---------- @@ -66,9 +65,9 @@ Reports Disorder. Conflict.. ![Sort Content By Non Numeric](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Content-By-Non-Numeric.gif) -如果分隔符是Tab,你需要在’+‘的位置上用$’\t’代替,如上例所示。 +如果分隔符是制表符,你需要在’+‘的位置上用$’\t’代替,如上例所示。 -### 19. 对主用户目录下使用‘ls -l’命令得到的结果基于第五列——‘数据的大小’进行一个乱序排列。 +19、 对主用户目录下使用‘ls -l’命令得到的结果基于第五列(‘文件大小’)进行一个乱序排列。 $ ls -l /home/avi/ | sort -k5 -R @@ -76,28 +75,30 @@ Reports Disorder. Conflict.. 每一次你运行上面的脚本,你得到结果可能都不一样,因为结果是随机生成的。 - 正如我在上一篇文章中提到的规则2所说——相比于大写字母,sort命令更喜欢以小写字母开始的行。看一下上一篇文章的例3,字符串‘laptop’在‘LAPTOP’前出现。 +正如我在上一篇文章中提到的规则2所说——sort命令会将以小写字母开始的行排在大写字母开始的行前面。看一下上一篇文章的例3,字符串‘laptop’在‘LAPTOP’前出现。 -### 20. 如何覆盖默认的排序优先权?在这之前我们需要先将环境变量LC_ALL的值设置为C。在命令行提示栏中运行下面的代码。### +20、 如何覆盖默认的排序优先权?在这之前我们需要先将环境变量LC_ALL的值设置为C。在命令行提示栏中运行下面的代码。 $ export LC_ALL=C -然后以重写默认优先权的方式对‘tecmint.txt’文件重新排序。 +然后以非默认优先权的方式对‘tecmint.txt’文件重新排序。 $ sort tecmint.txt ![Override Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Override-Sorting-Preferences.gif) -重写排序优先权 -不要忘记与example 3中得到的输出结果做比较,并且你可以使用‘-f’选项,又叫‘-ignore-case’来获取非常有序的输出。 +*覆盖排序优先权* + +不要忘记与example 3中得到的输出结果做比较,并且你可以使用‘-f’,又叫‘-ignore-case’(忽略大小写)的选项来获取更有序的输出。 $ sort -f tecmint.txt ![Compare Sorting Preferences](http://www.tecmint.com/wp-content/uploads/2015/04/Compare-Sorting-Preferences.gif) -### 21. 给两个输入文件进行‘sort‘,然后一口气把它们连接起来怎么样?### +21、 给两个输入文件进行‘sort‘,然后把它们连接成一行! 我们创建两个文本文档’file1.txt‘以及’file2.txt‘,并用数据填充,如下所示,并用’cat‘命令查看文件的内容。 + $ echo -e “5 Reliable\n2 Fast\n3 Secure\n1 open-source\n4 customizable” > file1.txt $ cat file1.txt @@ -117,7 +118,7 @@ Reports Disorder. Conflict.. ![Sort Join Two Files](http://www.tecmint.com/wp-content/uploads/2015/04/Sort-Join-Two-Files.gif) -我所要讲的全部内容就在这里了,希望与各位保持联系,也希望各位经常来Tecmint逛逛。有反馈就在下面评论吧。 +我所要讲的全部内容就在这里了,希望与各位保持联系,也希望各位经常来逛逛。有反馈就在下面评论吧。 -------------------------------------------------------------------------------- @@ -125,7 +126,7 @@ via: http://www.tecmint.com/linux-sort-command-examples/ 作者:[Avishek Kumar][a] 译者:[DongShuaike](https://github.com/DongShuaike) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b57b875015d29b94152644d7e5ece309185b8409 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 May 2015 18:07:35 +0800 Subject: [PATCH 0701/2517] PUB:20150415 Strong SSL Security on nginx @wxy --- .../20150415 Strong SSL Security on nginx.md | 290 ++++++++++++++++++ .../20150415 Strong SSL Security on nginx.md | 290 ------------------ 2 files changed, 290 insertions(+), 290 deletions(-) create mode 100644 published/20150415 Strong SSL Security on nginx.md delete mode 100644 sources/tech/20150415 Strong SSL Security on nginx.md diff --git a/published/20150415 Strong SSL Security on nginx.md b/published/20150415 Strong SSL Security on nginx.md new file mode 100644 index 0000000000..094c50bd37 --- /dev/null +++ b/published/20150415 Strong SSL Security on nginx.md @@ -0,0 +1,290 @@ +增强 nginx 的 SSL 安全性 +================================================================================ +[![](https://raymii.org/s/inc/img/ssl-labs-a.png)][1] + +本文向你介绍如何在 nginx 服务器上设置健壮的 SSL 安全机制。我们通过禁用 SSL 压缩来降低 CRIME 攻击威胁;禁用协议上存在安全缺陷的 SSLv3 及更低版本,并设置更健壮的加密套件(cipher suite)来尽可能启用前向安全性(Forward Secrecy);此外,我们还启用了 HSTS 和 HPKP。这样我们就拥有了一个健壮而可经受考验的 SSL 配置,并可以在 Qually Labs 的 SSL 测试中得到 A 级评分。 + +如果不求甚解的话,可以从 [https://cipherli.st][2] 上找到 nginx 、Apache 和 Lighttpd 的安全设置,复制粘帖即可。 + +本教程在 Digital Ocean 的 VPS 上测试通过。如果你喜欢这篇教程,想要支持作者的站点的话,购买 Digital Ocean 的 VPS 时请使用如下链接:[https://www.digitalocean.com/?refcode=7435ae6b8212][3] 。 + +本教程可以通过[发布于 2014/1/21 的][4] SSL 实验室测试的严格要求(我之前就通过了测试,如果你按照本文操作就可以得到一个 A+ 评分)。 + +- [本教程也可用于 Apache ][5] +- [本教程也可用于 Lighttpd ][6] +- [本教程也可用于 FreeBSD, NetBSD 和 OpenBSD 上的 nginx ,放在 BSD Now 播客上][7]: [http://www.bsdnow.tv/tutorials/nginx][8] + +你可以从下列链接中找到这方面的进一步内容: + +- [野兽攻击(BEAST)][9] +- [罪恶攻击(CRIME)][10] +- [怪物攻击(FREAK )][11] +- [心血漏洞(Heartbleed)][12] +- [完备的前向安全性(Perfect Forward Secrecy)][13] +- [RC4 和 BEAST 的处理][14] + +我们需要编辑 nginx 的配置,在 Ubuntu/Debian 上是 `/etc/nginx/sited-enabled/yoursite.com`,在 RHEL/CentOS 上是 `/etc/nginx/conf.d/nginx.conf`。 + +本文中,我们需要编辑443端口(SSL)的 `server` 配置中的部分。在文末你可以看到完整的配置例子。 + +*在编辑之前切记备份一下配置文件!* + +### 野兽攻击(BEAST)和 RC4 ### + +简单的说,野兽攻击(BEAST)就是通过篡改一个加密算法的 CBC(密码块链)的模式,从而可以对部分编码流量悄悄解码。更多信息参照上面的链接。 + +针对野兽攻击(BEAST),较新的浏览器已经启用了客户端缓解方案。推荐方案是禁用 TLS 1.0 的所有加密算法,仅允许 RC4 算法。然而,[针对 RC4 算法的攻击也越来越多](http://www.isg.rhul.ac.uk/tls/) ,很多已经从理论上逐步发展为实际可行的攻击方式。此外,有理由相信 NSA 已经实现了他们所谓的“大突破”——攻破 RC4 。 + +禁用 RC4 会有几个后果。其一,当用户使用老旧的浏览器时,比如 Windows XP 上的 IE 会用 3DES 来替代 RC4。3DES 要比 RC4 更安全,但是它的计算成本更高,你的服务器就需要为这些用户付出更多的处理成本。其二,RC4 算法能减轻 野兽攻击(BEAST)的危害,如果禁用 RC4 会导致 TLS 1.0 用户会换到更容易受攻击的 AES-CBC 算法上(通常服务器端的对野兽攻击(BEAST)的“修复方法”是让 RC4 优先于其它算法)。我认为 RC4 的风险要高于野兽攻击(BEAST)的风险。事实上,有了客户端缓解方案(Chrome 和 Firefox 提供了缓解方案),野兽攻击(BEAST)就不是什么大问题了。而 RC4 的风险却在增长:随着时间推移,对加密算法的破解会越来越多。 + +### 怪物攻击(FREAK) ### + +怪物攻击(FREAK)是一种中间人攻击,它是由来自 [INRIA、微软研究院和 IMDEA][15] 的密码学家们所发现的。怪物攻击(FREAK)的缩写来自“Factoring RSA-EXPORT Keys(RSA 出口密钥因子分解)” + +这个漏洞可上溯到上世纪九十年代,当时美国政府禁止出口加密软件,除非其使用编码密钥长度不超过512位的出口加密套件。 + +这造成了一些现在的 TLS 客户端存在一个缺陷,这些客户端包括: 苹果的 SecureTransport 、OpenSSL。这个缺陷会导致它们会接受出口降级 RSA 密钥,即便客户端并没有要求使用出口降级 RSA 密钥。这个缺陷带来的影响很讨厌:在客户端存在缺陷,且服务器支持出口降级 RSA 密钥时,会发生中间人攻击,从而导致连接的强度降低。 + +攻击分为两个组成部分:首先是服务器必须接受“出口降级 RSA 密钥”。 + +中间人攻击可以按如下流程: + +- 在客户端的 Hello 消息中,要求标准的 RSA 加密套件。 +- 中间人攻击者修改该消息为‘export RSA’(输出级 RSA 密钥)。 +- 服务器回应一个512位的输出级 RSA 密钥,并以其长期密钥签名。 +- 由于 OpenSSL/SecureTransport 的缺陷,客户端会接受这个弱密钥。 +- 攻击者根据 RSA 模数分解因子来恢复相应的 RSA 解密密钥。 +- 当客户端编码‘pre-master secret’(预主密码)给服务器时,攻击者现在就可以解码它并恢复 TLS 的‘master secret’(主密码)。 +- 从这里开始,攻击者就能看到了传输的明文并注入任何东西了。 + +本文所提供的加密套件不启用输出降级加密,请确认你的 OpenSSL 是最新的,也强烈建议你将客户端也升级到新的版本。 + +### 心血漏洞(Heartbleed) ### + +心血漏洞(Heartbleed) 是一个于2014年4月公布的 OpenSSL 加密库的漏洞,它是一个被广泛使用的传输层安全(TLS)协议的实现。无论是服务器端还是客户端在 TLS 中使用了有缺陷的 OpenSSL,都可以被利用该缺陷。由于它是因 DTLS 心跳扩展(RFC 6520)中的输入验证不正确(缺少了边界检查)而导致的,所以该漏洞根据“心跳”而命名。这个漏洞是一种缓存区超读漏洞,它可以读取到本不应该读取的数据。 + +哪个版本的 OpenSSL 受到心血漏洞(Heartbleed)的影响? + +各版本情况如下: + +- OpenSSL 1.0.1 直到 1.0.1f (包括)**存在**该缺陷 +- OpenSSL 1.0.1g **没有**该缺陷 +- OpenSSL 1.0.0 分支**没有**该缺陷 +- OpenSSL 0.9.8 分支**没有**该缺陷 + +这个缺陷是2011年12月引入到 OpenSSL 中的,并随着 2012年3月14日 OpenSSL 发布的 1.0.1 而泛滥。2014年4月7日发布的 OpenSSL 1.0.1g 修复了该漏洞。 + +升级你的 OpenSSL 就可以避免该缺陷。 + +### SSL 压缩(罪恶攻击 CRIME) ### + +罪恶攻击(CRIME)使用 SSL 压缩来完成它的魔法,SSL 压缩在下述版本是默认关闭的: nginx 1.1.6及更高/1.0.9及更高(如果使用了 OpenSSL 1.0.0及更高), nginx 1.3.2及更高/1.2.2及更高(如果使用较旧版本的 OpenSSL)。 + +如果你使用一个早期版本的 nginx 或 OpenSSL,而且你的发行版没有向后移植该选项,那么你需要重新编译没有一个 ZLIB 支持的 OpenSSL。这会禁止 OpenSSL 使用 DEFLATE 压缩方式。如果你禁用了这个,你仍然可以使用常规的 HTML DEFLATE 压缩。 + +### SSLv2 和 SSLv3 ### + +SSLv2 是不安全的,所以我们需要禁用它。我们也禁用 SSLv3,因为 TLS 1.0 在遭受到降级攻击时,会允许攻击者强制连接使用 SSLv3,从而禁用了前向安全性(forward secrecy)。 + +如下编辑配置文件: + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + +### 卷毛狗攻击(POODLE)和 TLS-FALLBACK-SCSV ### + +SSLv3 会受到[卷毛狗漏洞(POODLE)][16]的攻击。这是禁用 SSLv3 的主要原因之一。 + +Google 提出了一个名为 [TLS\_FALLBACK\_SCSV][17] 的SSL/TLS 扩展,它用于防止强制 SSL 降级。如果你升级 到下述的 OpenSSL 版本会自动启用它。 + +- OpenSSL 1.0.1 带有 TLS\_FALLBACK\_SCSV 1.0.1j 及更高。 +- OpenSSL 1.0.0 带有 TLS\_FALLBACK\_SCSV 1.0.0o 及更高。 +- OpenSSL 0.9.8 带有 TLS\_FALLBACK\_SCSV 0.9.8zc 及更高。 + +[更多信息请参照 NGINX 文档][18]。 + +### 加密套件(cipher suite) ### + +前向安全性(Forward Secrecy)用于在长期密钥被破解时确保会话密钥的完整性。PFS(完备的前向安全性)是指强制在每个/每次会话中推导新的密钥。 + +这就是说,泄露的私钥并不能用来解密(之前)记录下来的 SSL 通讯。 + +提供PFS(完备的前向安全性)功能的是那些使用了一种 Diffie-Hellman 密钥交换的短暂形式的加密套件。它们的缺点是系统开销较大,不过可以使用椭圆曲线的变体来改进。 + +以下两个加密套件是我推荐的,之后[Mozilla 基金会][19]也推荐了。 + +推荐的加密套件: + + ssl_ciphers 'AES128+EECDH:AES128+EDH'; + +向后兼容的推荐的加密套件(IE6/WinXP): + + ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; + +如果你的 OpenSSL 版本比较旧,不可用的加密算法会自动丢弃。应该一直使用上述的完整套件,让 OpenSSL 选择一个它所支持的。 + +加密套件的顺序是非常重要的,因为其决定了优先选择哪个算法。上述优先推荐的算法中提供了PFS(完备的前向安全性)。 + +较旧版本的 OpenSSL 也许不能支持这个算法的完整列表,AES-GCM 和一些 ECDHE 算法是相当新的,在 Ubuntu 和 RHEL 中所带的绝大多数 OpenSSL 版本中不支持。 + +#### 优先顺序的逻辑 #### + +- ECDHE+AESGCM 加密是首选的。它们是 TLS 1.2 加密算法,现在还没有广泛支持。当前还没有对它们的已知攻击。 +- PFS 加密套件好一些,首选 ECDHE,然后是 DHE。 +- AES 128 要好于 AES 256。有一个关于 AES256 带来的安全提升程度是否值回成本的[讨论][20],结果是显而易见的。目前,AES128 要更值一些,因为它提供了不错的安全水准,确实很快,而且看起来对时序攻击更有抵抗力。 +- 在向后兼容的加密套件里面,AES 要优于 3DES。在 TLS 1.1及其以上,减轻了针对 AES 的野兽攻击(BEAST)的威胁,而在 TLS 1.0上则难以实现该攻击。在非向后兼容的加密套件里面,不支持 3DES。 +- RC4 整个不支持了。3DES 用于向后兼容。参看 [#RC4\_weaknesses][21] 中的讨论。 + +#### 强制丢弃的算法 #### + +- aNULL 包含了非验证的 Diffie-Hellman 密钥交换,这会受到中间人(MITM)攻击 +- eNULL 包含了无加密的算法(明文) +- EXPORT 是老旧的弱加密算法,是被美国法律标示为可出口的 +- RC4 包含的加密算法使用了已弃用的 ARCFOUR 算法 +- DES 包含的加密算法使用了弃用的数据加密标准(DES) +- SSLv2 包含了定义在旧版本 SSL 标准中的所有算法,现已弃用 +- MD5 包含了使用已弃用的 MD5 作为哈希算法的所有算法 + +### 更多设置 ### + +确保你也添加了如下行: + + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + +在一个 SSLv3 或 TLSv1 握手过程中选择一个加密算法时,一般使用客户端的首选算法。如果设置了上述配置,则会替代地使用服务器端的首选算法。 + +- [关于 ssl\_prefer\_server\_ciphers 的更多信息][22] +- [关于 ssl\_ciphers 的更多信息][23] + +### 前向安全性和 Diffie Hellman Ephemeral (DHE)参数 ### + +前向安全性(Forward Secrecy)的概念很简单:客户端和服务器协商一个永不重用的密钥,并在会话结束时销毁它。服务器上的 RSA 私钥用于客户端和服务器之间的 Diffie-Hellman 密钥交换签名。从 Diffie-Hellman 握手中获取的预主密钥会用于之后的编码。因为预主密钥是特定于客户端和服务器之间建立的某个连接,并且只用在一个限定的时间内,所以称作短暂模式(Ephemeral)。 + +使用了前向安全性,如果一个攻击者取得了一个服务器的私钥,他是不能解码之前的通讯信息的。这个私钥仅用于 Diffie Hellman 握手签名,并不会泄露预主密钥。Diffie Hellman 算法会确保预主密钥绝不会离开客户端和服务器,而且不能被中间人攻击所拦截。 + +所有版本的 nginx(如1.4.4)都依赖于 OpenSSL 给 Diffie-Hellman (DH)的输入参数。不幸的是,这意味着 Diffie-Hellman Ephemeral(DHE)将使用 OpenSSL 的默认设置,包括一个用于密钥交换的1024位密钥。因为我们正在使用2048位证书,DHE 客户端就会使用一个要比非 DHE 客户端更弱的密钥交换。 + +我们需要生成一个更强壮的 DHE 参数: + + cd /etc/ssl/certs + openssl dhparam -out dhparam.pem 4096 + +然后告诉 nginx 将其用作 DHE 密钥交换: + + ssl_dhparam /etc/ssl/certs/dhparam.pem; + +### OCSP 装订(Stapling) ### + +当连接到一个服务器时,客户端应该使用证书吊销列表(CRL)或在线证书状态协议(OCSP)记录来校验服务器证书的有效性。CRL 的问题是它已经增长的太大了,永远也下载不完了。 + +OCSP 更轻量级一些,因为我们每次只请求一条记录。但是副作用是当连接到一个服务器时必须对第三方 OCSP 响应器发起 OCSP 请求,这就增加了延迟和带来了潜在隐患。事实上,CA 所运营的 OCSP 响应器非常不可靠,浏览器如果不能及时收到答复,就会静默失败。攻击者通过 DoS 攻击一个 OCSP 响应器可以禁用其校验功能,这样就降低了安全性。 + +解决方法是允许服务器在 TLS 握手中发送缓存的 OCSP 记录,以绕开 OCSP 响应器。这个机制节省了客户端和 OCSP 响应器之间的通讯,称作 OCSP 装订。 + +客户端会在它的 CLIENT HELLO 中告知其支持 status\_request TLS 扩展,服务器仅在客户端请求它的时候才发送缓存的 OCSP 响应。 + +大多数服务器最多会缓存 OCSP 响应48小时。服务器会按照常规的间隔连接到 CA 的 OCSP 响应器来获取刷新的 OCSP 记录。OCSP 响应器的位置可以从签名的证书中的授权信息访问(Authority Information Access)字段中获得。 + +- [阅读我的教程:在 NGINX 中启用 OCSP 装订][24] + +### HTTP 严格传输安全(HSTS) ### + +如有可能,你应该启用 [HTTP 严格传输安全(HSTS)][25],它会引导浏览器和你的站点之间的通讯仅通过 HTTPS。 + +- [阅读我关于 HSTS 的文章,了解如何配置它][26] + +### HTTP 公钥固定扩展(HPKP) ### + +你也应该启用 [HTTP 公钥固定扩展(HPKP)][27]。 + +公钥固定的意思是一个证书链必须包括一个白名单中的公钥。它确保仅有白名单中的 CA 才能够为某个域名签署证书,而不是你的浏览器中存储的任何 CA。 + +我已经写了一篇[关于 HPKP 的背景理论及在 Apache、Lighttpd 和 NGINX 中配置例子的文章][28]。 + +### 配置范例 ### + + server { + + listen [::]:443 default_server; + + ssl on; + ssl_certificate_key /etc/ssl/cert/raymii_org.pem; + ssl_certificate /etc/ssl/cert/ca-bundle.pem; + + ssl_ciphers 'AES128+EECDH:AES128+EDH:!aNULL'; + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_session_cache shared:SSL:10m; + + ssl_stapling on; + ssl_stapling_verify on; + resolver 8.8.4.4 8.8.8.8 valid=300s; + resolver_timeout 10s; + + ssl_prefer_server_ciphers on; + ssl_dhparam /etc/ssl/certs/dhparam.pem; + + add_header Strict-Transport-Security max-age=63072000; + add_header X-Frame-Options DENY; + add_header X-Content-Type-Options nosniff; + + root /var/www/; + index index.html index.htm; + server_name raymii.org; + + } + +### 结尾 ### + +如果你使用了上述配置,你需要重启 nginx: + + # 首先检查配置文件是否正确 + /etc/init.d/nginx configtest + # 然后重启 + /etc/init.d/nginx restart + +现在使用 [SSL Labs 测试][29]来看看你是否能得到一个漂亮的“A”。当然了,你也得到了一个安全的、强壮的、经得起考验的 SSL 配置! + +- [参考 Mozilla 关于这方面的内容][30] + +-------------------------------------------------------------------------------- + +via: https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html + +作者:[Remy van Elst][a] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://raymii.org/ +[1]:https://www.ssllabs.com/ssltest/analyze.html?d=raymii.org +[2]:https://cipherli.st/ +[3]:https://www.digitalocean.com/?refcode=7435ae6b8212 +[4]:http://blog.ivanristic.com/2014/01/ssl-labs-stricter-security-requirements-for-2014.html +[5]:https://raymii.org/s/tutorials/Strong_SSL_Security_On_Apache2.html +[6]:https://raymii.org/s/tutorials/Pass_the_SSL_Labs_Test_on_Lighttpd_%28Mitigate_the_CRIME_and_BEAST_attack_-_Disable_SSLv2_-_Enable_PFS%29.html +[7]:http://www.bsdnow.tv/episodes/2014_08_20-engineering_nginx +[8]:http://www.bsdnow.tv/tutorials/nginx +[9]:https://en.wikipedia.org/wiki/Transport_Layer_Security#BEAST_attack +[10]:https://en.wikipedia.org/wiki/CRIME_%28security_exploit%29 +[11]:http://blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html +[12]:http://heartbleed.com/ +[13]:https://en.wikipedia.org/wiki/Perfect_forward_secrecy +[14]:https://en.wikipedia.org/wiki/Transport_Layer_Security#Dealing_with_RC4_and_BEAST +[15]:https://www.smacktls.com/ +[16]:https://raymii.org/s/articles/Check_servers_for_the_Poodle_bug.html +[17]:https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00 +[18]:http://wiki.nginx.org/HttpSslModule#ssl_protocols +[19]:https://wiki.mozilla.org/Security/Server_Side_TLS +[20]:http://www.mail-archive.com/dev-tech-crypto@lists.mozilla.org/msg11247.html +[21]:https://wiki.mozilla.org/Security/Server_Side_TLS#RC4_weaknesses +[22]:http://wiki.nginx.org/HttpSslModule#ssl_prefer_server_ciphers +[23]:http://wiki.nginx.org/HttpSslModule#ssl_ciphers +[24]:https://raymii.org/s/tutorials/OCSP_Stapling_on_nginx.html +[25]:https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security +[26]:https://linux.cn/article-5266-1.html +[27]:https://wiki.mozilla.org/SecurityEngineering/Public_Key_Pinning +[28]:https://linux.cn/article-5282-1.html +[29]:https://www.ssllabs.com/ssltest/ +[30]:https://wiki.mozilla.org/Security/Server_Side_TLS \ No newline at end of file diff --git a/sources/tech/20150415 Strong SSL Security on nginx.md b/sources/tech/20150415 Strong SSL Security on nginx.md deleted file mode 100644 index 7ee87bc0d7..0000000000 --- a/sources/tech/20150415 Strong SSL Security on nginx.md +++ /dev/null @@ -1,290 +0,0 @@ -增强 nginx 的 SSL 安全性 -================================================================================ -[![](https://raymii.org/s/inc/img/ssl-labs-a.png)][1] - -本文向你介绍如何在 nginx 服务器上设置高安全性的 SSL。我们通过取消 SSL 压缩降低 CRIME 攻击威胁;禁用协议上存在安全缺陷的 SSLv3 及更低版本,并设置更健壮的加密套件来尽可能启用正向保密(Forward Secrecy);我们也启用了 HSTS 和 HPKP。这样我们就拥有了一个健壮而可经受考验的 SSL 配置,并可以在 Qually Labs 的 SSL 测试中得到 A 级评分。 - -不求甚解的话,可以从 [https://cipherli.st][2] 上找到 nginx 、Apache 和 Lighttpd 的安全设置,复制粘帖即可。 - -本教程在 Digital Ocean 的 VPS 上测试通过。如果你喜欢这篇教程,想要支持作者的站点的话,购买 Digital Ocean 的 VPS 时请使用如下链接:[https://www.digitalocean.com/?refcode=7435ae6b8212][3] 。 - -本教程可以通过[发布于 2014/1/21 的][4] SSL 实验室测试的严格要求(之前就通过了测试,如果你按照本文进行的话,可以得到一个 A+ 评分)。 - -- [本教程也有对应 Apache 的][5] -- [本教程也有对应 Lighttpd 的][6] -- [本教程也有对应 FreeBSD, NetBSD 和 OpenBSD 上的 nginx 的,放在 BSD Now 播客][7]: [http://www.bsdnow.tv/tutorials/nginx][8] - -你可以从下列链接中找到这方面的进一步内容: - -- [BEAST 攻击][9] -- [CRIME 攻击][10] -- [FREAK 攻击][11] -- [心血漏洞][12] -- [完美正向保密][13] -- [RC4 和 BEAST 的处理][14] - -我们需要编辑 nginx 的配置,在 Ubuntu/Debian 上是 `/etc/nginx/sited-enabled/yoursite.com`,在 RHEL/CentOS 上是 `/etc/nginx/conf.d/nginx.conf` - -本文中,我们需要编辑443端口(SSL)的 `server` 配置中的部分。在文末我们会给出完整的配置例子。 - -*在编辑之前切记备份一下配置文件!* - -### The BEAST attack and RC4 ### - -In short, by tampering with an encryption algorithm's CBC - cipher block chaining - mode's, portions of the encrypted traffic can be secretly decrypted. More info on the above link. - -Recent browser versions have enabled client side mitigation for the beast attack. The recommendation was to disable all TLS 1.0 ciphers and only offer RC4. However, [RC4 has a growing list of attacks against it],(http://www.isg.rhul.ac.uk/tls/) many of which have crossed the line from theoretical to practical. Moreover, there is reason to believe that the NSA has broken RC4, their so-called "big breakthrough." - -Disabling RC4 has several ramifications. One, users with shitty browsers such as Internet Explorer on Windows XP will use 3DES in lieu. Triple-DES is more secure than RC4, but it is significantly more expensive. Your server will pay the cost for these users. Two, RC4 mitigates BEAST. Thus, disabling RC4 makes TLS 1.0 users susceptible to that attack, by moving them to AES-CBC (the usual server-side BEAST "fix" is to prioritize RC4 above all else). I am confident that the flaws in RC4 significantly outweigh the risks from BEAST. Indeed, with client-side mitigation (which Chrome and Firefox both provide), BEAST is a nonissue. But the risk from RC4 only grows: More cryptanalysis will surface over time. - -### Factoring RSA-EXPORT Keys (FREAK) ### - -FREAK is a man-in-the-middle (MITM) vulnerability discovered by a group of cryptographers at [INRIA, Microsoft Research and IMDEA][15]. FREAK stands for "Factoring RSA-EXPORT Keys." - -The vulnerability dates back to the 1990s, when the US government banned selling crypto software overseas, unless it used export cipher suites which involved encryption keys no longer than 512-bits. - -It turns out that some modern TLS clients - including Apple's SecureTransport and OpenSSL - have a bug in them. This bug causes them to accept RSA export-grade keys even when the client didn't ask for export-grade RSA. The impact of this bug can be quite nasty: it admits a 'man in the middle' attack whereby an active attacker can force down the quality of a connection, provided that the client is vulnerable and the server supports export RSA. - -There are two parts of the attack as the server must also accept "export grade RSA." - -The MITM attack works as follows: - -- In the client's Hello message, it asks for a standard 'RSA' ciphersuite. -- The MITM attacker changes this message to ask for 'export RSA'. -- The server responds with a 512-bit export RSA key, signed with its long-term key. -- The client accepts this weak key due to the OpenSSL/SecureTransport bug. -- The attacker factors the RSA modulus to recover the corresponding RSA decryption key. -- When the client encrypts the 'pre-master secret' to the server, the attacker can now decrypt it to recover the TLS 'master secret'. -- From here on out, the attacker sees plaintext and can inject anything it wants. - -The ciphersuite offered here on this page does not enable EXPORT grade ciphers. Make sure your OpenSSL is updated to the latest available version and urge your clients to also use upgraded software. - -### Heartbleed ### - -Heartbleed is a security bug disclosed in April 2014 in the OpenSSL cryptography library, which is a widely used implementation of the Transport Layer Security (TLS) protocol. Heartbleed may be exploited regardless of whether the party using a vulnerable OpenSSL instance for TLS is a server or a client. It results from improper input validation (due to a missing bounds check) in the implementation of the DTLS heartbeat extension (RFC6520), thus the bug's name derives from "heartbeat". The vulnerability is classified as a buffer over-read, a situation where more data can be read than should be allowed. - -What versions of the OpenSSL are affected by Heartbleed? - -Status of different versions: - -- OpenSSL 1.0.1 through 1.0.1f (inclusive) are vulnerable -- OpenSSL 1.0.1g is NOT vulnerable -- OpenSSL 1.0.0 branch is NOT vulnerable -- OpenSSL 0.9.8 branch is NOT vulnerable - -The bug was introduced to OpenSSL in December 2011 and has been out in the wild since OpenSSL release 1.0.1 on 14th of March 2012. OpenSSL 1.0.1g released on 7th of April 2014 fixes the bug. - -By updating OpenSSL you are not vulnerable to this bug. - -### SSL Compression (CRIME attack) ### - -The CRIME attack uses SSL Compression to do its magic. SSL compression is turned off by default in nginx 1.1.6+/1.0.9+ (if OpenSSL 1.0.0+ used) and nginx 1.3.2+/1.2.2+ (if older versions of OpenSSL are used). - -If you are using al earlier version of nginx or OpenSSL and your distro has not backported this option then you need to recompile OpenSSL without ZLIB support. This will disable the use of OpenSSL using the DEFLATE compression method. If you do this then you can still use regular HTML DEFLATE compression. - -### SSLv2 and SSLv3 ### - -SSL v2 is insecure, so we need to disable it. We also disable SSLv3, as TLS 1.0 suffers a downgrade attack, allowing an attacker to force a connection to use SSLv3 and therefore disable forward secrecy. - -Again edit the config file: - - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - -### Poodle and TLS-FALLBACK-SCSV ### - -SSLv3 allows exploiting of the [POODLE][16] bug. This is one more major reason to disable this. - -Google have proposed an extension to SSL/TLS named [TLSFALLBACKSCSV][17] that seeks to prevent forced SSL downgrades. This is automatically enabled if you upgrade OpenSSL to the following versions: - -- OpenSSL 1.0.1 has TLSFALLBACKSCSV in 1.0.1j and higher. -- OpenSSL 1.0.0 has TLSFALLBACKSCSV in 1.0.0o and higher. -- OpenSSL 0.9.8 has TLSFALLBACKSCSV in 0.9.8zc and higher. - -[More info on the NGINX documentation][18] - -### The Cipher Suite ### - -Forward Secrecy ensures the integrity of a session key in the event that a long-term key is compromised. PFS accomplishes this by enforcing the derivation of a new key for each and every session. - -This means that when the private key gets compromised it cannot be used to decrypt recorded SSL traffic. - -The cipher suites that provide Perfect Forward Secrecy are those that use an ephemeral form of the Diffie-Hellman key exchange. Their disadvantage is their overhead, which can be improved by using the elliptic curve variants. - -The following two ciphersuites are recommended by me, and the latter by [the Mozilla Foundation][19]. - -The recommended cipher suite: - - ssl_ciphers 'AES128+EECDH:AES128+EDH'; - -The recommended cipher suite for backwards compatibility (IE6/WinXP): - - ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; - -If your version of OpenSSL is old, unavailable ciphers will be discarded automatically. Always use the full ciphersuite above and let OpenSSL pick the ones it supports. - -The ordering of a ciphersuite is very important because it decides which algorithms are going to be selected in priority. The recommendation above prioritizes algorithms that provide perfect forward secrecy. - -Older versions of OpenSSL may not return the full list of algorithms. AES-GCM and some ECDHE are fairly recent, and not present on most versions of OpenSSL shipped with Ubuntu or RHEL. - -#### Prioritization logic #### - -- ECDHE+AESGCM ciphers are selected first. These are TLS 1.2 ciphers and not widely supported at the moment. No known attack currently target these ciphers. -- PFS ciphersuites are preferred, with ECDHE first, then DHE. -- AES 128 is preferred to AES 256. There has been [discussions][20] on whether AES256 extra security was worth the cost, and the result is far from obvious. At the moment, AES128 is preferred, because it provides good security, is really fast, and seems to be more resistant to timing attacks. -- In the backward compatible ciphersuite, AES is preferred to 3DES. BEAST attacks on AES are mitigated in TLS 1.1 and above, and difficult to achieve in TLS 1.0. In the non-backward compatible ciphersuite, 3DES is not present. -- RC4 is removed entirely. 3DES is used for backward compatibility. See discussion in [#RC4_weaknesses][21] - -#### Mandatory discards #### - -- aNULL contains non-authenticated Diffie-Hellman key exchanges, that are subject to Man-In-The-Middle (MITM) attacks -- eNULL contains null-encryption ciphers (cleartext) -- EXPORT are legacy weak ciphers that were marked as exportable by US law -- RC4 contains ciphers that use the deprecated ARCFOUR algorithm -- DES contains ciphers that use the deprecated Data Encryption Standard -- SSLv2 contains all ciphers that were defined in the old version of the SSL standard, now deprecated -- MD5 contains all the ciphers that use the deprecated message digest 5 as the hashing algorithm - -### Extra settings ### - -Make sure you also add these lines: - - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - -When choosing a cipher during an SSLv3 or TLSv1 handshake, normally the client's preference is used. If this directive is enabled, the server's preference will be used instead. - -- [More info on sslpreferserver_ciphers][22] -- [More info on ssl_ciphers][23] - -### Forward Secrecy & Diffie Hellman Ephemeral Parameters ### - -The concept of forward secrecy is simple: client and server negotiate a key that never hits the wire, and is destroyed at the end of the session. The RSA private from the server is used to sign a Diffie-Hellman key exchange between the client and the server. The pre-master key obtained from the Diffie-Hellman handshake is then used for encryption. Since the pre-master key is specific to a connection between a client and a server, and used only for a limited amount of time, it is called Ephemeral. - -With Forward Secrecy, if an attacker gets a hold of the server's private key, it will not be able to decrypt past communications. The private key is only used to sign the DH handshake, which does not reveal the pre-master key. Diffie-Hellman ensures that the pre-master keys never leave the client and the server, and cannot be intercepted by a MITM. - -All versions of nginx as of 1.4.4 rely on OpenSSL for input parameters to Diffie-Hellman (DH). Unfortunately, this means that Ephemeral Diffie-Hellman (DHE) will use OpenSSL's defaults, which include a 1024-bit key for the key-exchange. Since we're using a 2048-bit certificate, DHE clients will use a weaker key-exchange than non-ephemeral DH clients. - -We need generate a stronger DHE parameter: - - cd /etc/ssl/certs - openssl dhparam -out dhparam.pem 4096 - -And then tell nginx to use it for DHE key-exchange: - - ssl_dhparam /etc/ssl/certs/dhparam.pem; - -### OCSP Stapling ### - -When connecting to a server, clients should verify the validity of the server certificate using either a Certificate Revocation List (CRL), or an Online Certificate Status Protocol (OCSP) record. The problem with CRL is that the lists have grown huge and takes forever to download. - -OCSP is much more lightweight, as only one record is retrieved at a time. But the side effect is that OCSP requests must be made to a 3rd party OCSP responder when connecting to a server, which adds latency and potential failures. In fact, the OCSP responders operated by CAs are often so unreliable that browser will fail silently if no response is received in a timely manner. This reduces security, by allowing an attacker to DoS an OCSP responder to disable the validation. - -The solution is to allow the server to send its cached OCSP record during the TLS handshake, therefore bypassing the OCSP responder. This mechanism saves a roundtrip between the client and the OCSP responder, and is called OCSP Stapling. - -The server will send a cached OCSP response only if the client requests it, by announcing support for the status_request TLS extension in its CLIENT HELLO. - -Most servers will cache OCSP response for up to 48 hours. At regular intervals, the server will connect to the OCSP responder of the CA to retrieve a fresh OCSP record. The location of the OCSP responder is taken from the Authority Information Access field of the signed certificate. - -- [View my tutorial on enabling OCSP stapling on NGINX][24] - -### HTTP Strict Transport Security ### - -When possible, you should enable [HTTP Strict Transport Security (HSTS)][25], which instructs browsers to communicate with your site only over HTTPS. - -- [View my article on HTST to see how to configure it.][26] - -### HTTP Public Key Pinning Extension ### - -You should also enable the [HTTP Public Key Pinning Extension][27]. - -Public Key Pinning means that a certificate chain must include a whitelisted public key. It ensures only whitelisted Certificate Authorities (CA) can sign certificates for `*.example.com`, and not any CA in your browser store. - -I've written an article about it that has background theory and configuration examples for Apache, Lighttpd and NGINX: [https://raymii.org/s/articles/HTTPPublicKeyPinningExtension_HPKP.html][28] - -### Config Example ### - - server { - - listen [::]:443 default_server; - - ssl on; - ssl_certificate_key /etc/ssl/cert/raymii_org.pem; - ssl_certificate /etc/ssl/cert/ca-bundle.pem; - - ssl_ciphers 'AES128+EECDH:AES128+EDH:!aNULL'; - - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_session_cache shared:SSL:10m; - - ssl_stapling on; - ssl_stapling_verify on; - resolver 8.8.4.4 8.8.8.8 valid=300s; - resolver_timeout 10s; - - ssl_prefer_server_ciphers on; - ssl_dhparam /etc/ssl/certs/dhparam.pem; - - add_header Strict-Transport-Security max-age=63072000; - add_header X-Frame-Options DENY; - add_header X-Content-Type-Options nosniff; - - root /var/www/; - index index.html index.htm; - server_name raymii.org; - - } - -### Conclusion ### - -If you have applied the above config lines you need to restart nginx: - - # Check the config first: - /etc/init.d/nginx configtest - # Then restart: - /etc/init.d/nginx restart - -Now use the [SSL Labs test][29] to see if you get a nice A. And, of course, have a safe, strong and future proof SSL configuration! - -- [Also read the Mozilla page on the subject][30] - --------------------------------------------------------------------------------- - -via: https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - -作者:[Remy van Elst][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://raymii.org/ -[1]:https://www.ssllabs.com/ssltest/analyze.html?d=raymii.org -[2]:https://cipherli.st/ -[3]:https://www.digitalocean.com/?refcode=7435ae6b8212 -[4]:http://blog.ivanristic.com/2014/01/ssl-labs-stricter-security-requirements-for-2014.html -[5]:https://raymii.org/s/tutorials/Strong_SSL_Security_On_Apache2.html -[6]:https://raymii.org/s/tutorials/Pass_the_SSL_Labs_Test_on_Lighttpd_%28Mitigate_the_CRIME_and_BEAST_attack_-_Disable_SSLv2_-_Enable_PFS%29.html -[7]:http://www.bsdnow.tv/episodes/2014_08_20-engineering_nginx -[8]:http://www.bsdnow.tv/tutorials/nginx -[9]:https://en.wikipedia.org/wiki/Transport_Layer_Security#BEAST_attack -[10]:https://en.wikipedia.org/wiki/CRIME_%28security_exploit%29 -[11]:http://blog.cryptographyengineering.com/2015/03/attack-of-week-freak-or-factoring-nsa.html -[12]:http://heartbleed.com/ -[13]:https://en.wikipedia.org/wiki/Perfect_forward_secrecy -[14]:https://en.wikipedia.org/wiki/Transport_Layer_Security#Dealing_with_RC4_and_BEAST -[15]:https://www.smacktls.com/ -[16]:https://raymii.org/s/articles/Check_servers_for_the_Poodle_bug.html -[17]:https://tools.ietf.org/html/draft-ietf-tls-downgrade-scsv-00 -[18]:http://wiki.nginx.org/HttpSslModule#ssl_protocols -[19]:https://wiki.mozilla.org/Security/Server_Side_TLS -[20]:http://www.mail-archive.com/dev-tech-crypto@lists.mozilla.org/msg11247.html -[21]:https://wiki.mozilla.org/Security/Server_Side_TLS#RC4_weaknesses -[22]:http://wiki.nginx.org/HttpSslModule#ssl_prefer_server_ciphers -[23]:http://wiki.nginx.org/HttpSslModule#ssl_ciphers -[24]:https://raymii.org/s/tutorials/OCSP_Stapling_on_nginx.html -[25]:https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security -[26]:https://raymii.org/s/tutorials/HTTP_Strict_Transport_Security_for_Apache_NGINX_and_Lighttpd.html -[27]:https://wiki.mozilla.org/SecurityEngineering/Public_Key_Pinning -[28]:https://raymii.org/s/articles/HTTP_Public_Key_Pinning_Extension_HPKP.html -[29]:https://www.ssllabs.com/ssltest/ -[30]:https://wiki.mozilla.org/Security/Server_Side_TLS \ No newline at end of file From f16a995874e8c53551a46d0c1ec07d686b3c94c9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 May 2015 22:34:12 +0800 Subject: [PATCH 0702/2517] PUB:20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative @H-mudcup --- ...ys Relaxing Sounds to Keep You Creative.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) rename {translated/share => published}/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md (67%) diff --git a/translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md b/published/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md similarity index 67% rename from translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md rename to published/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md index f468b24754..c636b01820 100644 --- a/translated/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md +++ b/published/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md @@ -1,9 +1,8 @@ -Translated by H-mudcup - -适用于Ubuntu的环境音播放器播放让人放松的声音保持你的创造力 +环境音播放器:让人放松的声音,保持你的创造力 ================================================================================ ![Rain is a soothing sound for some](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/raining-1600x900-wallpaper_www.wallpapermay.com_84-1.jpg) -对于某些人来说雨声是个令人安心的声音 + +*对于某些人来说雨声是个令人安心的声音* **如果我想变得非常有效率,我不能听‘正常’的音乐。它会使我分心,我会开始跟着唱或者让我想起另一首歌,结局就是我在自己的音乐库里到处戳并且……反正,你懂的。** @@ -23,11 +22,11 @@ Translated by H-mudcup Google Play和苹果应用商店充满了环境音和白噪声的应用。现在,在Ubuntu里有同样的应用了。 -‘[Ambient Noise][1]‘ ‘[环境音][1]’——人如其名——是一个专门被设计成播放这种声音的音频播放器。他甚至可以同Ubuntu声音菜单整合到一起,给你‘选择,点击即放松’的体验。 +‘[Ambient Noise (环境音)][1] ’——人如其名,这是一个专门被设计成播放这种声音的音频播放器。他甚至可以同Ubuntu声音菜单整合到一起,给你‘选择,点击即放松’的体验。 -这个应用(又被称为‘ANoise播放器’,由Marcos Costales制作)带有**8个高品质声道**。 +这个应用(又被称为‘ANoise播放器’,由Marcos Costales制作)带有**8个高品质音频**。 -这8个预设声道涵盖了多种环境,从下雨时有节奏的声音,到夜晚大自然静谧的旋律,还有下午熙熙攘攘的咖啡店的嗡嗡声。 +这8个预设音频涵盖了多种环境,从下雨时有节奏的声音,到夜晚大自然静谧的旋律,还有下午熙熙攘攘的咖啡店的嗡嗡声。 ### 在Ubuntu上安装ANoise播放器 ### @@ -39,9 +38,9 @@ Google Play和苹果应用商店充满了环境音和白噪声的应用。现在 sudo apt-get update && sudo apt-get install anoise -安装好以后只需从Unity Dash(或DE里等价的地方)里打开它,通过声音菜单选择你喜欢的环境音然后……放松吧!这个应用甚至记得你上次用的环境音。 +安装好以后只需从Unity Dash(或桌面环境里类同的地方)里打开它,通过声音菜单选择你喜欢的环境音然后……放松吧!这个应用甚至记得你上次用的环境音。 -Even so, give it a try out and see if it suits your needs. I would say let me know what you think, but I will be too focused to hear — and so might you!即便如此,你还是要试一试看它是否能满足你的需要。我要说的是让我直到你是怎么想的,但是我将会专心致志到听不到你的声音——你可能也会这样! +即便如此,你还是要试一试看它是否能满足你的需要。我要说的是让我知道你是怎么想的,但是我将会专心致志到听不到你的声音——你可能也会这样! -------------------------------------------------------------------------------- @@ -49,7 +48,7 @@ via: http://www.omgubuntu.co.uk/2015/04/ambient-noise-player-app-for-ubuntu-linu 作者:[Joey-Elijah Sneddon][a] 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 13e714d086ca5179661b0c6e55bd71c5e43f8da9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 May 2015 22:39:54 +0800 Subject: [PATCH 0703/2517] PUB:20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better @H-mudcup --- ...t Racing Game on Linux Just Got Even Better.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) rename {translated/share => published}/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md (84%) diff --git a/translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md b/published/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md similarity index 84% rename from translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md rename to published/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md index 931f51ce92..70355325b6 100644 --- a/translated/share/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md +++ b/published/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md @@ -1,10 +1,10 @@ - -SuperTuxKart 0.9 已发行 —— Linux 中最好的竞速类游戏变得更好了 +SuperTuxKart 0.9 已发行 —— Linux 中最好的竞速类游戏越来越棒了! ================================================================================ **热门竞速类游戏 SuperTuxKart 的新版本已经[打包发行][1]登陆下载服务器** ![Super Tux Kart 0.9 Release Poster](http://1.bp.blogspot.com/-eGXvJu3UVwc/VTVhICZVEtI/AAAAAAAAAf0/iP2bkWDNf_c/s1600/poster-cropped.jpg) -Super Tux Kart 0.9 发行海报 + +*Super Tux Kart 0.9 发行海报* SuperTuxKart 0.9 相较前一版本做了巨大的升级,内部运行着刚出炉的新引擎(有个炫酷的名字叫‘Antarctica(南极洲)’),目的是要呈现更加炫酷的图形环境,从阴影到场景的纵深,外加卡丁车更好的物理效果。 @@ -14,14 +14,11 @@ SuperTuxKart 0.9 相较前一版本做了巨大的升级,内部运行着刚出 SuperTuxKart 0.9 中与图像的改善同样吸引人眼球的是一对**全新赛道**,新的卡丁车,新的在线账户可以记录和分享**全新推出的成就系统**里赢得的徽章,以及大量的改装和涂装的微调。 -点击播放下面的官方发行视频,看看基于调色器的 STK 0.9 所散发的光辉吧。 - -注:youtube 视频 - +点击播放下面的官方发行视频,看看基于调色器的 STK 0.9 所散发的光辉吧。(youtube 视频:https://www.youtube.com/0FEwDH7XU9Q ) Ubuntu 用户可以从项目网站上下载新发行版已编译的二进制文件。 -- [Download SuperTuxKart 0.9][2] +- [下载 SuperTuxKart 0.9][2] -------------------------------------------------------------------------------- @@ -29,7 +26,7 @@ via: http://www.omgubuntu.co.uk/2015/04/supertuxkart-0-9-released 作者:[Joey-Elijah Sneddon][a] 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 07aa6a3079e4df7894eaec79479bfec7a14c950f Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 3 May 2015 23:55:24 +0800 Subject: [PATCH 0704/2517] PUB:20150128 Docker-2 Setting up a private Docker registry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @DongShuaike 翻译的很不错,很用心。 --- ...-2 Setting up a private Docker registry.md | 103 +++++++++--------- 1 file changed, 49 insertions(+), 54 deletions(-) rename {translated/tech => published}/20150128 Docker-2 Setting up a private Docker registry.md (55%) diff --git a/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md b/published/20150128 Docker-2 Setting up a private Docker registry.md similarity index 55% rename from translated/tech/20150128 Docker-2 Setting up a private Docker registry.md rename to published/20150128 Docker-2 Setting up a private Docker registry.md index 6d73b53326..d1c81e1679 100644 --- a/translated/tech/20150128 Docker-2 Setting up a private Docker registry.md +++ b/published/20150128 Docker-2 Setting up a private Docker registry.md @@ -2,58 +2,58 @@ ================================================================================ ![](http://cocoahunter.com/content/images/2015/01/docker2.jpg) -[TL;DR]这是系列的第二篇文章,这系列讲述了我的公司如何把基础服务从PaaS迁移到Docker上 +[TL;DR] 这是系列的第二篇文章,这系列讲述了我的公司如何把基础服务从PaaS迁移到Docker上 -- [First part][1]: 第一篇文章里我谈到了接触Docker之前的经历; -- [Third pard][2]: 第三篇文章里我展示如何使创建images的过程自动化以及如何用Docker部署一个Rails应用。 +- [第一篇文章][1]: 我谈到了接触Docker之前的经历; +- [第三篇文章][2]: 我展示如何使创建镜像的过程自动化以及如何用Docker部署一个Rails应用。 ---------- -为什么需要搭建一个私有的registry呢?嗯,Docker Hub(一个Docker公共仓库)只允许你拥有一个免费的私有版本库(repo)。其他的公司提供类似服务,但是价格可不便宜。另外,如果你需要部署一个基于Docker的应用产品,恐怕你不希望这些images在开放的Docker Hub被公开吧! +为什么需要搭建一个私有的registry呢?嗯,对于新手来说,Docker Hub(一个Docker公共仓库)只允许你拥有一个免费的私有版本库(repo)。其他的公司也开始提供类似服务,但是价格可不便宜。另外,如果你需要用Docker部署一个用于生产环境的应用,恐怕你不希望将这些镜像放在公开的Docker Hub上吧! -这篇文章提供了一个非常务实的方法来处理搭建私有Docke registry时出现的各种错综复杂的情况。我们将会使用一个运行于DigitalOcean(之后简称为DO)的非常小巧的512MB实例。并且我会假定你已经了解了Docker的基本概念,因为我必须集中精力在复杂的事情上! +这篇文章提供了一个非常务实的方法来处理搭建私有Docker registry时出现的各种错综复杂的情况。我们将会使用一个运行于DigitalOcean(之后简称为DO)的非常小巧的512MB VPS 实例。并且我会假定你已经了解了Docker的基本概念,因为我必须集中精力在复杂的事情上! ###本地搭建### 首先你需要安装**boot2docker**以及docker CLI。如果你已经搭建好了基本的Docker环境,你可以直接跳过这一步。 -从终端运行以下命令[1][3]: +从终端运行以下命令(我假设你使用OS X,使用 HomeBrew 来安装相关软件,你可以根据你的环境使用不同的包管理软件来安装): + brew install boot2docker docker -如果一切顺利[2][4],你现在将能够启动VM,在VM当中输入下列命令: +如果一切顺利(想要了解搭建docker环境的完整指南,请参阅 [http://boot2docker.io/][10]) ,你现在就能够通过如下命令启动一个 Docker 运行于其中的虚拟机: + boot2docker up -Follow the instructions, copy and paste the export commands that boot2docker will print in the terminal. If you now run `docker ps` you should be greeted by the following line -按照说明,复制粘贴book2docker打印在终端的export命令(这块翻译不太好)。现在运行`docker ps`命令,终端将有以下显示。 +按照屏幕显示的说明,复制粘贴book2docker在终端输出的命令。如果你现在运行`docker ps`命令,终端将有以下显示。 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -好了,Docker已经准备就绪。我们回过头去搭建registry。 +好了,Docker已经准备就绪,这就够了,我们回过头去搭建registry。 ###创建服务器### -登录进你的DO账号,选择一个提前安装好Docker的映像文件,创建一个新的Drople。[^n] +登录进你的DO账号,选择一个预安装了Docker的镜像文件,创建一个新的Drople。(本文写成时选择的是 Image > Applications > Docker 1.4.1 on 14.04) ![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-18-26-14.png) - 你将会以邮件的方式收到一个根用户凭证。登录进去,然后运行`docker ps`命令来查看系统状态。 ### 搭建AWS S3 ### -我们现在将使用Amazo Simple Storage Service(S3)作为我们registry/repository的存储层。我们讲需要创建一个桶(bucket)以及用户凭证(user credentials)来允许我们的docker容器访问它。 +我们现在将使用Amazo Simple Storage Service(S3)作为我们registry/repository的存储层。我们将需要创建一个桶(bucket)以及用户凭证(user credentials)来允许我们的docker容器访问它。 -登录到我们的AWS账号(如果没有,就申请一个[http://aws.amazon.com/][5]),在控制台选择S3(Simpole Storage Service) +登录到我们的AWS账号(如果没有,就申请一个[http://aws.amazon.com/][5]),在控制台选择S3(Simpole Storage Service)。 ![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-29-21.png) -点击 **Create Bucket**,为你的桶输入一个名字(把它写下来,我们一会需要用到它),然后点击**Create**。 +点击 **Create Bucket**,为你的桶输入一个名字(把它记下来,我们一会需要用到它),然后点击**Create**。 ![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-22-50.png) -OK!我们已经搭建好存储部分了。 +OK!我们已经搭建好存储部分了。 -### 安装AWS访问凭证### +### 设置AWS访问凭证### 我们现在将要创建一个新的用户。退回到AWS控制台然后选择IAM(Identity & Access Management)。 @@ -65,9 +65,9 @@ OK!我们已经搭建好存储部分了。 ![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-31-42.png) -输入你的用户名(例如 docker-registry)然后点击Create。写下(或者下载csv文件)你的Access Key以及Secret Access Key。回到你的用户列表然后选择你刚刚创建的用户。 +输入一个用户名(例如 docker-registry)然后点击Create。写下(或者下载csv文件)你的Access Key以及Secret Access Key。回到你的用户列表然后选择你刚刚创建的用户。 -在Permission section下面,点击Attach User Policy。之后,选择Custom Policy。 +在Permission section下面,点击Attach User Policy。之后在下一屏,选择Custom Policy。 ![](http://cocoahunter.com/content/images/2015/01/Screenshot-2015-01-20-19-41-21.png) @@ -90,11 +90,11 @@ custom policy的内容如下: ] } -这个配置将允许用户(也就是regitstry)来对桶上的内容进行操作(读/写)(确保使用你之前创建AWS S3时使用的桶名)。总结起来:当你想把你的Docker映像从你的本机推送到仓库中时,服务器将能够将他们上传到S3。 +这个配置将允许用户(也就是regitstry)来对桶上的内容进行操作(读/写)(确保使用你之前创建AWS S3时使用的桶名)。总结一下:当你想把你的Docker镜像从你的本机推送到仓库中时,服务器就会将他们上传到S3。 ### 安装registry ### -现在回过头来看我们的DO服务器,SSH登录其上。我们将要使用[^n]一个官方Docker registry映像。[6] +现在回过头来看我们的DO服务器,SSH登录其上。我们将要[使用][11]一个[官方Docker registry镜像][6]。 输入如下命令,开启registry。 @@ -110,25 +110,25 @@ custom policy的内容如下: -d \ registry -Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动守护容器(daemonised container)。 +Docker将会从Docker Hub上拉取所需的文件系统分层(fs layers)并启动守护容器(daemonised container)。 ### 测试registry ### 如果上述操作奏效,你可以通过ping命令,或者查找它的内容来测试registry(虽然这个时候容器还是空的)。 -我们的registry非常基础,而且没有提供任何“验明正身”的方式。因为添加身份验证可不是一件轻松事(至少我认为没有一种部署方法是简单的,像是为了证明你努力过似的),我觉得 查询/拉取/推送 仓库内容的最简单方法就是通过SSH的未加密连接(通过HTTP)。 +我们的registry非常基础,而且没有提供任何“验明正身”的方式。因为添加身份验证可不是一件轻松事(至少我认为没有一种部署方法是简单的,像是为了证明你努力过似的),我觉得“查询/拉取/推送”仓库内容的最简单方法就是通过SSH通道的未加密连接(通过HTTP)。 打开SSH通道的操作非常简单: ssh -N -L 5000:localhost:5000 root@your_registry.com -这条命令建立了一条从registry服务器(前面执行`docker run`命令的时候我们见过它)的5000号端口到本机的5000号端口之间的连接。 +这条命令建立了一条从registry服务器(前面执行`docker run`命令的时候我们见过它)的5000号端口到本机的5000号端口之间的 SSH 管道连接。 -如果你现在登录[http://localhost:5000/v1/_ping][7],将会看到下面这个非常简短的回复。 +如果你现在用浏览器访问 [http://localhost:5000/v1/_ping][7],将会看到下面这个非常简短的回复。 {} -这个意味着registry工作正常。你还可以通过登录[http://localhost:5000/v1/search][8]来查看registry内容,内容相似: +这个意味着registry工作正常。你还可以通过登录 [http://localhost:5000/v1/search][8] 来查看registry内容,内容相似: { "num_results": 2, @@ -145,40 +145,38 @@ Docker将会从Docker Hub上拉取所需的文件系统层(fs layers)并启动 ] } -### 创建一个映像 ### +### 创建一个镜像 ### -我们现在创建一个非常简答的Docker映像,来检验我们新弄好的registry。在我们的本机上,用如下内容创建一个Dockerfile:[^n] +我们现在创建一个非常简单的Docker镜像,来检验我们新弄好的registry。在我们的本机上,用如下内容创建一个Dockerfile(这里只有一点代码,在下一篇文章里我将会展示给你如何将一个Rails应用绑定进Docker容器中。): - - # Base image with ruby 2.2.0 + # ruby 2.2.0 的基础镜像 FROM ruby:2.2.0 MAINTAINER Michelangelo Chasseur -……创建: +并创建它: docker build -t localhost:5000/username/repo-name . -`localhost:5000`非常重要:Docker映像名的最前面一个部分将告知`docker push`命令我们将要把我们的image推送到哪里。在我们这个例子当中,因为我们要通过SSH管道连接远端私有registry,`localhost:5000`精确地表示了对我们的registry的一个引用。 +`localhost:5000`这个部分非常重要:Docker镜像名的最前面一个部分将告知`docker push`命令我们将要把我们的镜像推送到哪里。在我们这个例子当中,因为我们要通过SSH管道连接远程的私有registry,`localhost:5000`精确地指向了我们的registry。 -如果一切顺利,当命令执行完成返回后,你可以输入`docker images`命令来列出新近创建的映像。执行它看看会出现什么现象? +如果一切顺利,当命令执行完成返回后,你可以输入`docker images`命令来列出新近创建的镜像。执行它看看会出现什么现象? ### 推送到仓库 ### -接下来是更好玩的部分。实现我所描述的东西着实花了我一点时间,所以如果你第一次读的话就耐心一点吧,跟着我一起操作。我知道接下来的东西会非常复杂(如果你不自动化进程就一定会这样),但是我保证到最后你一定都能明白。在下一篇文章里我将会使用到一大波shell脚本和Rake任务,通过它们实现自动化并且用简单的命令实现部署Rails应用。 +接下来是更好玩的部分。实现我所描述的东西着实花了我一点时间,所以如果你第一次读的话就耐心一点吧,跟着我一起操作。我知道接下来的东西会非常复杂(如果你不自动化这个过程就一定会这样),但是我保证到最后你一定都能明白。在下一篇文章里我将会使用到一大波shell脚本和Rake任务,通过它们实现自动化并且用简单的命令实现部署Rails应用。 -你运行的docker命令都是实际上都是在boot2docker虚拟机上运行的。所以当你执行像`docker push some_repo`这样的命令时,是boot2docker虚拟机在与registry交互,而不是我们自己的机器。 +你在终端上运行的docker命令实际上都是使用boot2docker虚拟机来运行容器及各种东西。所以当你执行像`docker push some_repo`这样的命令时,是boot2docker虚拟机在与registry交互,而不是我们自己的机器。 -接下来是一个非常重要的点:为了将Docker映像推送到远端的私有仓库,SSH管道需要在boot2docker虚拟机上配置好。 +接下来是一个非常重要的点:为了将Docker镜像推送到远端的私有仓库,SSH管道需要在boot2docker虚拟机上配置好,而不是在你的本地机器上配置。 -由许多种方法实现它。我给你展示最简短的一种(可能不是最容易理解的,但是能够帮助你实现自动化) +有许多种方法实现它。我给你展示最简短的一种(可能不是最容易理解的,但是能够帮助你实现自动化) -First of all though we need to sort one last thing with SSH. -(不太会翻译) +在这之前,我们需要对 SSH 做最后一点工作。 -### Setting up SSH ### +### 设置 SSH ### -我们添加boot2docker SSH key到远端服务器已知的hosts里面。我们可以使用ssh-copy-id工具,通过下面的命令就可以安装上它了: +让我们把boot2docker 的 SSH key添加到远端服务器的“已知主机”里面。我们可以使用ssh-copy-id工具完成,通过下面的命令就可以安装上它了: brew install ssh-copy-id @@ -188,7 +186,7 @@ First of all though we need to sort one last thing with SSH. 用你ssh key的真实路径代替`/Users/username/.ssh/id_boot2docker`。 -这样做能够让我们面密码登录SSH。 +这样做能够让我们免密码登录SSH。 现在我们来测试以下: @@ -196,26 +194,23 @@ First of all though we need to sort one last thing with SSH. 分开阐述: -- `boot2docker ssh`允许你以参数的形式传递给boot2docker虚拟机一条执行命令; +- `boot2docker ssh`允许你以参数的形式传递给boot2docker虚拟机一条执行的命令; - 最后面那个`&`表明这条命令将在后台执行; - `ssh -o 'StrictHostKeyChecking no' -i /Users/michelangelo/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@registry.touchwa.re &`是boot2docker虚拟机实际运行的命令; - -`-o 'StrictHostKeyChecking no'`——不提示安全问题; + - `-o 'StrictHostKeyChecking no'`——不提示安全问题; - `-i /Users/michelangelo/.ssh/id_boot2docker`指出虚拟机使用哪个SSH key来进行身份验证。(注意这里的key应该是你前面添加到远程仓库的那个) - - 最后我们将打开一条端口5000到本地端口5000的SSH通道。 + - 最后我们将打开一条端口5000映射到localhost:5000的SSH通道。 ### 从其他服务器上拉取 ### -你现在将可以通过下面的简单命令将你的映像推送到远端仓库: +你现在将可以通过下面的简单命令将你的镜像推送到远端仓库: docker push localhost:5000/username/repo_name -在下一篇文章[9]中,我们将会了解到如何自动化处理这些事务,并且真正地容器化一个Rails应用。请继续收听! +在下一篇[文章][9]中,我们将会了解到如何自动化处理这些事务,并且真正地容器化一个Rails应用。请继续收听! + 如有错误,请不吝指出。祝你Docker之路顺利! -1. 我假设你使用OS X。 -2. 想要了解搭建docker环境的完整之南,请参阅[http://boot2docker.io/][10]。 -3. 本文写成时选择的是 Image > Applications > Docker 1.4.1 on 14.04。 -4. [https://github.com/docker/docker-registry/][11] -5. 这是一个存根,在下一篇文章里我将会展示给你如何将一个Rails应用绑定进Docker容器中。 + -------------------------------------------------------------------------------- @@ -223,12 +218,12 @@ via: http://cocoahunter.com/2015/01/23/docker-2/ 作者:[Michelangelo Chasseur][a] 译者:[DongShuaike](https://github.com/DongShuaike) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://cocoahunter.com/author/michelangelo/ -[1]:http://cocoahunter.com/2015/01/23/docker-1/ +[1]:https://linux.cn/article-5339-1.html [2]:http://cocoahunter.com/2015/01/23/docker-3/ [3]:http://cocoahunter.com/2015/01/23/docker-2/#fn:1 [4]:http://cocoahunter.com/2015/01/23/docker-2/#fn:2 From 5e5263514ea66413136c4679280462f2beebc147 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 4 May 2015 15:44:14 +0800 Subject: [PATCH 0705/2517] Translating by ZTinoZ --- ...ape - Open Source Vector Graphic Editor.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md index f4a957a15f..3deb76c7c0 100644 --- a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md +++ b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md @@ -15,25 +15,25 @@ Inkscape始于2003年,起初它的bug跟踪系统托管于Sourceforge上但是 - Helps draw various shapes like rectangles, ellipses, circles, arcs, polygons, stars, spirals etc and then resize, rotate and modify (turn sharp edges round) them - Create and embed bitmaps with simple commands -#### 项目控制 #### +#### 对象处理 #### -- 通过交互式操作来扭曲、移动、测量、旋转目标Skewing, moving, scaling, rotating objects through interactive manipulations and pacifying the numeric values -- Performing raising and lowering Z-order operations -- Grouping and ungrouping objects to create a virtual scope for editing or manipulation -- Layers form a hierarchal tree and can be locked or rearranged for various manipulations -- Distribution and alignment commands +- 通过交互式操作和调整数值来扭曲、移动、测量、旋转目标 +- 执行力提升并减少了Z-order操作。 +- 对象组群化或取消组群化可以去创建一个虚拟层阶用来编辑或处理 +- 图层采用层次结构树的结构并且能锁定或以各式各样的处理方式来重新布置 +- 分布与对齐指令 -#### Fill and Stroke #### +#### 填充与边框 #### -- Copy/paste styles -- Pick Color tool +- 复制/粘贴风格 +- 取色器 - Selecting colors on a continuous plot based on vectors of RGB, HSL, CMS, CMYK and color wheel - Gradient editor helps creating and managing multi-stop gradients - Define an image or selection and use it to pattern fill - Dashed Strokes can be used with few predefined dashed patterns - Beginning, middle and ending marks through path markers -#### Operation on Paths #### +#### 路径上的操作 #### - Node Editing: Moving nodes and Bezier handles, node alignment and distribution etc - Boolean operations like yes or no conditions @@ -41,18 +41,18 @@ Inkscape始于2003年,起初它的bug跟踪系统托管于Sourceforge上但是 - Path insetting and outsetting along with link and offset objects - Converting bitmap images into paths (color and monochrome paths) through path tracing -#### Text manipulation #### +#### 文本处理 #### - All installed outlined fonts can be used even for right to left align objects - Formatting text, letter spacing, line spacing or kerning - Text on path and on shapes where both text and path or shapes can be edited or modified -#### Rendering #### +#### 渲染 #### - Inkscape fully support anti-aliased display which is a technique that reduces or eliminates aliasing by shading the pixels along the border. - Support for alpha transparency display and PNG export -### Install Inkscape on Ubuntu 14.04 and 14.10 ### +### 在Ubuntu 14.04和14.10上安装Inkscape ### In order to install Inkscape on Ubuntu, we will need to first [add its stable Personal Package Archive][1] (PPA) to Advanced Package Tool (APT) repository. Launch the terminal and run following command to add its PPA. From ec40816c23729020ab85f3e792afe941c36a099b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 4 May 2015 16:11:47 +0800 Subject: [PATCH 0706/2517] =?UTF-8?q?20150504-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...B) and 'PowerAdmin' in RHEL or CentOS 7.md | 423 ++++++++++++++++++ ...erver behind NAT via reverse SSH tunnel.md | 130 ++++++ 2 files changed, 553 insertions(+) create mode 100644 sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md create mode 100644 sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md diff --git a/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md b/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md new file mode 100644 index 0000000000..e8974ba386 --- /dev/null +++ b/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md @@ -0,0 +1,423 @@ +How to Install and Configure ‘PowerDNS’ (with MariaDB) and ‘PowerAdmin’ in RHEL/CentOS 7 +================================================================================ +PowerDNS is a DNS server running on many Linux/Unix derivatives. It can be configured with different backends including BIND style zone files, relational databases or load balancing/failover algorithms. It can also be setup as a DNS recursor running as a separate process on the server. + +The latest version of PowerDNS Authoritative server is 3.4.4, but the one available in the EPEL repository right now is 3.4.3. I would recommend installing the one for the EPEL repository due to the fact that this version is tested in CentOS and Fedora. That way you will also be able to easily update PowerDNS in future. + +This article intends to show you how to install and setup master PowerDNS server with a MariaDB backend and the PowerAdmin – a friendly web interface managing tool for PowerDNS. + +For the purpose of this article I will be using server with: + + Hostname: centos7.localhost + IP Address 192.168.0.102 + +### Step 1: Installing PowerDNS with MariaDB Backend ### + +#### 1. First you need to enable the EPEL repository for your server simply use: #### + + # yum install epel-release.noarch + +![Enable Epel Repository](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Epel-Repository.png) +Enable Epel Repository + +#### 2. The next step is to install the MariaDB server. This can be easily done by running the following command: #### + + # yum -y install mariadb-server mariadb + +![Install MariaDB Server](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Server.png) +Install MariaDB Server + +#### 3. Next we will configure MySQL to enable and start upon system boot: #### + + # systemctl enable mariadb.service + # systemctl start mariadb.service + +![Enable Start MariaDB System Boot](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Start-MariaDB-System-Boot.png) +Enable Start MariaDB System Boot + +#### 4. Now that the MySQL service is running, we will secure and setup a password for MariaDB by running: #### + + # mysql_secure_installation + +#### Follow Instructions #### + + /bin/mysql_secure_installation: line 379: find_mysql_client: command not found + + NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB + SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! + + In order to log into MariaDB to secure it, we'll need the current + password for the root user. If you've just installed MariaDB, and + you haven't set the root password yet, the password will be blank, + so you should just press enter here. + + Enter current password for root (enter for none): Press ENTER + OK, successfully used password, moving on... + + Setting the root password ensures that nobody can log into the MariaDB + root user without the proper authorisation. + + Set root password? [Y/n] y + New password: ← Set New Password + Re-enter new password: ← Repeat Above Password + Password updated successfully! + Reloading privilege tables.. + ... Success! + + + By default, a MariaDB installation has an anonymous user, allowing anyone + to log into MariaDB without having to have a user account created for + them. This is intended only for testing, and to make the installation + go a bit smoother. You should remove them before moving into a + production environment. + + Remove anonymous users? [Y/n] y ← Choose “y” to disable that user + ... Success! + + Normally, root should only be allowed to connect from 'localhost'. This + ensures that someone cannot guess at the root password from the network. + + Disallow root login remotely? [Y/n] n ← Choose “n” for no + ... skipping. + + By default, MariaDB comes with a database named 'test' that anyone can + access. This is also intended only for testing, and should be removed + before moving into a production environment. + + Remove test database and access to it? [Y/n] y ← Choose “y” for yes + - Dropping test database... + ... Success! + - Removing privileges on test database... + ... Success! + + Reloading the privilege tables will ensure that all changes made so far + will take effect immediately. + + Reload privilege tables now? [Y/n] y ← Choose “y” for yes + ... Success! + + Cleaning up... + + All done! If you've completed all of the above steps, your MariaDB + installation should now be secure. + + Thanks for using MariaDB! + +#### 5. Once MariaDB configuration done successfully, we can proceed further with the installation of PowerDNS. This is easily completed by running: #### + + # yum -y install pdns pdns-backend-mysql + +![Install PowerDNS with MariaDB Backend](http://www.tecmint.com/wp-content/uploads/2015/04/Install-PowerDNS-with-MariaDB-Backend.png) +Install PowerDNS with MariaDB Backend + +#### 6. The configuration file for PowerDNS is located in `/etc/pdns/pdns`, but before editing it, we will setup a MySQL database for PowerDNS service. First we will connect to the MySQL server and will create a database with name powerdns: #### + + # mysql -u root -p + MariaDB [(none)]> CREATE DATABASE powerdns; + +![Create PowerDNS Database](http://www.tecmint.com/wp-content/uploads/2015/04/Create-PowerDNS-Database.png) +Create PowerDNS Database + +#### 7. Next, we will create a database user called powerdns: #### + + MariaDB [(none)]> GRANT ALL ON powerdns.* TO 'powerdns'@'localhost' IDENTIFIED BY ‘tecmint123’; + MariaDB [(none)]> GRANT ALL ON powerdns.* TO 'powerdns'@'centos7.localdomain' IDENTIFIED BY 'tecmint123'; + MariaDB [(none)]> FLUSH PRIVILEGES; + +![Create PowerDNS User](http://www.tecmint.com/wp-content/uploads/2015/04/Create-PowerDNS-User.png) +Create PowerDNS User + +**Note**: Replace “tecmint123” with the actual password that you want to use for your setup. + +#### 8. We proceed by creating the database tables used by PowerDNS. Execute those block by block: #### + + MariaDB [(none)]> USE powerdns; + MariaDB [(none)]> CREATE TABLE domains ( + id INT auto_increment, + name VARCHAR(255) NOT NULL, + master VARCHAR(128) DEFAULT NULL, + last_check INT DEFAULT NULL, + type VARCHAR(6) NOT NULL, + notified_serial INT DEFAULT NULL, + account VARCHAR(40) DEFAULT NULL, + primary key (id) + ); + +![Create Table Domains for PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Table-Domains-for-PowerDNS.png) +Create Table Domains for PowerDNS + + MariaDB [(none)]> CREATE UNIQUE INDEX name_index ON domains(name); + MariaDB [(none)]> CREATE TABLE records ( + id INT auto_increment, + domain_id INT DEFAULT NULL, + name VARCHAR(255) DEFAULT NULL, + type VARCHAR(6) DEFAULT NULL, + content VARCHAR(255) DEFAULT NULL, + ttl INT DEFAULT NULL, + prio INT DEFAULT NULL, + change_date INT DEFAULT NULL, + primary key(id) + ); + +![Create Index Domains for PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Index-Domains-for-PowerDNS.png) +Create Index Domains for PowerDNS + + MariaDB [(none)]> CREATE INDEX rec_name_index ON records(name); + MariaDB [(none)]> CREATE INDEX nametype_index ON records(name,type); + MariaDB [(none)]> CREATE INDEX domain_id ON records(domain_id); + +![Create Index Records](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Records.png) +Create Index Records + + MariaDB [(none)]> CREATE TABLE supermasters ( + ip VARCHAR(25) NOT NULL, + nameserver VARCHAR(255) NOT NULL, + account VARCHAR(40) DEFAULT NULL + ); + +![Create Table Supermaster](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Table-Supermaster.png) +Create Table Supermaster + +You can now exit the MySQL console by typing: + + MariaDB [(none)]> quit; + +#### 9. Finally we can proceed with configuring our PowerDNS in a way that, it will use MySQL as backend. For that purpose open PowerDNS configuration file located at: #### + + # vim /etc/pdns/pdns.conf + +In that file look for the lines looking like this: + + ################################# + # launch Which backends to launch and order to query them in + # + # launch= + +Just after that put the following code: + + launch=gmysql + gmysql-host=localhost + gmysql-user=powerdns + gmysql-password=user-pass + gmysql-dbname=powerdns + +Change “user-pass” with the actual password that you set earlier. Here is how my configuration looks like: + +![Configure PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-PowerDNS.png) +Configure PowerDNS + +Save your change and exit from. + +#### 10. Now we will start and add PowerDNS to the list of services starting at system boot: #### + + # systemctl enable pdns.service + # systemctl start pdns.service + +![Enable and Start PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-and-Start-PowerDNS.png) +Enable and Start PowerDNS + +At this point your PowerDNS server is up and running. For more information about PowerDNS you can refer to the manual available at [http://downloads.powerdns.com/documentation/html/index.html][1] + +### Step 2: Installing PowerAdmin to Manage PowerDNS ### + +#### 11. Now we will install PowerAdmin – a friendly web interface designed to manager PowerDNS servers. Since it is written in PHP, we will need to install PHP and a web server (Apache): #### + + # yum install httpd php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mhash gettext + +![Install Apache PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-PHP.jpeg) +Install Apache PHP + +PowerAdmin also requires two PEAR packages: + + # yum -y install php-pear-DB php-pear-MDB2-Driver-mysql + +![Install Pear](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Pear.jpeg) +Install Pear + +You can also refer to the following article for complete instructions how to install LAMP stack in CentOS 7: + +- [Install LAMP in CentOS 7][2] + +Once the install is complete, we will need to start and set Apache to start at system boot: + + # systemctl enable httpd.service + # systemctl start httpd.service + +![Enable Start Apache System Boot](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Start-Apache-System-Boot.png) +Enable Start Apache System Boot + +#### 12. Now that all system requirements for running PowerAdmn are met, we can proceed and download the package. Since the default web directory for Apache is /var/www/html/, we will download the package in there. #### + + # cd /var/www/html/ + # wget http://downloads.sourceforge.net/project/poweradmin/poweradmin-2.1.7.tgz + # tar xfv poweradmin-2.1.7.tgz + +![Download PowerAdmin](http://www.tecmint.com/wp-content/uploads/2015/04/Download-PowerAdmin.jpeg) +Download PowerAdmin + +#### 13. Now, we can now start the web installer of PowerAdmin. Simply open: #### + + http://192.168.0.102/poweradmin-2.1.7/install/ + +This should bring the first step of the installation: + +![Select Installation Language](http://www.tecmint.com/wp-content/uploads/2015/04/Select-Installation-Language.png) +Select Installation Language + +The above page will ask you to choose the language for your PowerAdmin. Select the one you wish to use and click the “Go to step 2” button. + +#### 14. The installer will expect you to have a PowerDNS database: #### + +![PowerDNS Database](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Database.png) +PowerDNS Database + +#### 15. Since we already created one, we can proceed to the next step. You will be asked to enter the database details you setup earlier. You will also need to setup Poweradmin administrator password: #### + +![Enter PowerDNS Database Settings](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS.png) +Enter PowerDNS Database Settings + +#### 16. Once you have input those, go to step 4. You will create a new user with a limited rights for Poweradmin. The fields that you need to enter here are: #### + +- Username - username for hte PowerAdmin. +- Password – password for the above user. +- Hostmaster - When creating SOA records and you have not specified hostmaster, this value will be used. +- Secondary nameserver – the value will be used as primary name server when creating new DNS zones. + +![PowerDNS Configuration Settings](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Configuration-Settings.png) +PowerDNS Configuration Settings + +#### 17. On the next step Poweradmin will ask you to create new database user with limited rights on the database tables. It will provide you with the code that you will need to put in a MySQL console: #### + +![Create New Database User](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Database-User.png) +Create New Database User + +#### 18. Now open a terminal and run: #### + + # mysql -u root -p + +Provide your password and execute the code provided by Poweradmin: + + MariaDB [(none)]> GRANT SELECT, INSERT, UPDATE, DELETE + ON powerdns.* + TO 'powermarin'@'localhost' + IDENTIFIED BY '123qweasd'; + +![Grant Mysql Permissions to User](http://www.tecmint.com/wp-content/uploads/2015/04/Grant-Mysql-Permissions-to-User.png) +Grant Mysql Permissions to User + +#### 19. Now go back to your browser and proceed to the next step. The installer will attempt to create its configuration file in /var/www/html/poweradmin-2.1.7/inc. #### + +The file name is config.inc.php. In case the script is not able to write that file you can create it manually by copying the text and putting it in above mentioned file: + +![Configuration Settings of PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Configuration.png) +Configuration Settings of PowerDNS + +#### 20. Now go to the last page where you will be informed that the installation is complete and will receive information how to access your Poweradmin install: #### + +![PowerDNS Installation Completed](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Installation-Completed.png) +PowerDNS Installation Completed + +You can enable URLs used by other dynamic DNS providers by running: + + # cp install/htaccess.dist .htaccess + +For that purpose you will need to have mod_rewrite enabled in Apache’s configuration. + +#### 21. Now it is important to remove the “install” folder from Poweradmin’s root directory with the following command: #### + + # rm -fr /var/www/html/poweradmin/install/ + +After that you can access your poweradmin at: + + http://192.168.0.102/poweradmin-2.1.7/ + +![PowerDNS Login](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Login.png) +PowerDNS Login + +After logging you should see the Poweradmin main page: + +![PowerDNS Dashboard](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Dashboard.png) +PowerDNS Dashboard + +At this point your installation is complete and you are now ready to start managing your DNS zones. + +### Step 3: How to Add, Edit and Delete DNS Zones in PowerDNS ### + +#### 22. To add new master zone, simply click on the “Add master zone”: #### + +![Add Master Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Add-Master-Zone.png) +Add Master Zone + +On the next page there are few things that you need to fill: + +- Domain – domain for which you will be adding the zone. +- Owner – sets the owner of the DNS zone. +- Template – DNS template – leave to none. +- DNSSEC – Donany Name System Security Extensions (optional -check if you need it). + +Click the “Add zone” button to add the DNS zone. + +![Master DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Master-DNS-Zone.png) +Master DNS Zone + +Now you can go back to the index page of Poweradmin by clicking the “Index” link. To review all existing DNS zones simply go to “List zones”: + +![Check List of Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Check-List-Zones.png) +Check List of Zones + +You should now see a list of available DNS zones: + +![Check List of DNS Zones](http://www.tecmint.com/wp-content/uploads/2015/04/DNS-Zones.png) +Check List of DNS Zones + +#### 23. To edit an existing DNS zone or add new records click the edit icon: #### + +![Edit DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Edit-DNS-Zone.png) +Edit DNS Zone + +On the next page you will see the entries for the DNS zone you have chosen: + +![Domain DNS Zone Entries](http://www.tecmint.com/wp-content/uploads/2015/04/Domain-DNS.png) +Domain DNS Zone Entries + +#### 24. In here to add new DNS zone you will need to set the following information: #### + +- Name – name for the entry. Only add the first part of the domain/subdomain, the rest will be added by Poweradmin. +- Type – choose the record type. +- Priority – priority of the record. +- TTL – Time To Live in seconds. + +For the purpose of this article, I will add an A record for subdomain new.example.com that will resolve on IP address 192.168.0.102 with time to live 14400 seconds: + +![Add New DNS Record](http://www.tecmint.com/wp-content/uploads/2015/04/Add-New-DNS-Record.png) +Add New DNS Record + +Finally click the “Add record” button. + +#### 25. If you wish to delete a DNS zone you can go back to the “List zone” page and click on the “Trash” icon next to the DNS zone which you wish to delete: #### + +![Delete DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Delete-DNS-Zone.png) +Delete DNS Zone + +Poweradmin will ask you if you are sure you want to delete the DNS zone. Simply click “Yes” to finish the deletion. + +For more detailed instructions how to create, edit and delete zones you can refer to Poweradmin’s documentation at: + +[https://github.com/poweradmin/poweradmin/wiki/Documentation][3] + +I hope you have find this article interesting and useful. As always if you have any questions or comments please do not hesitate to submit them in the comment section below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-powerdns-poweradmin-mariadb-in-centos-rhel/ + +作者:[Marin Todorov][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/marintodorov89/ +[1]:http://downloads.powerdns.com/documentation/html/index.html +[2]:http://www.tecmint.com/install-lamp-in-centos-7/ +[3]:https://github.com/poweradmin/poweradmin/wiki/Documentation \ No newline at end of file diff --git a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md new file mode 100644 index 0000000000..44a4110203 --- /dev/null +++ b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md @@ -0,0 +1,130 @@ +How to access a Linux server behind NAT via reverse SSH tunnel +================================================================================ +You are running a Linux server at home, which is behind a NAT router or restrictive firewall. Now you want to SSH to the home server while you are away from home. How would you set that up? SSH port forwarding will certainly be an option. However, port forwarding can become tricky if you are dealing with multiple nested NAT environment. Besides, it can be interfered with under various ISP-specific conditions, such as restrictive ISP firewalls which block forwarded ports, or carrier-grade NAT which shares IPv4 addresses among users. + +### What is Reverse SSH Tunneling? ### + +One alternative to SSH port forwarding is **reverse SSH tunneling**. The concept of reverse SSH tunneling is simple. For this, you will need another host (so-called "relay host") outside your restrictive home network, which you can connect to via SSH from where you are. You could set up a relay host using a [VPS instance][1] with a public IP address. What you do then is to set up a persistent SSH tunnel from the server in your home network to the public relay host. With that, you can connect "back" to the home server from the relay host (which is why it's called a "reverse" tunnel). As long as the relay host is reachable to you, you can connect to your home server wherever you are, or however restrictive your NAT or firewall is in your home network. + +![](https://farm8.staticflickr.com/7742/17162647378_c7d9f10de8_b.jpg) + +### Set up a Reverse SSH Tunnel on Linux ### + +Let's see how we can create and use a reverse SSH tunnel. We assume the following. We will be setting up a reverse SSH tunnel from homeserver to relayserver, so that we can SSH to homeserver via relayserver from another computer called clientcomputer. The public IP address of **relayserver** is 1.1.1.1. + +On homeserver, open an SSH connection to relayserver as follows. + + homeserver~$ ssh -fN -R 10022:localhost:22 relayserver_user@1.1.1.1 + +Here the port 10022 is any arbitrary port number you can choose. Just make sure that this port is not used by other programs on relayserver. + +The "-R 10022:localhost:22" option defines a reverse tunnel. It forwards traffic on port 10022 of relayserver to port 22 of homeserver. + +With "-fN" option, SSH will go right into the background once you successfully authenticate with an SSH server. This option is useful when you do not want to execute any command on a remote SSH server, and just want to forward ports, like in our case. + +After running the above command, you will be right back to the command prompt of homeserver. + +Log in to relayserver, and verify that 127.0.0.1:10022 is bound to sshd. If so, that means a reverse tunnel is set up correctly. + + relayserver~$ sudo netstat -nap | grep 10022 + +---------- + + tcp 0 0 127.0.0.1:10022 0.0.0.0:* LISTEN 8493/sshd + +Now from any other computer (e.g., clientcomputer), log in to relayserver. Then access homeserver as follows. + + relayserver~$ ssh -p 10022 homeserver_user@localhost + +One thing to take note is that the SSH login/password you type for localhost should be for homeserver, not for relayserver, since you are logging in to homeserver via the tunnel's local endpoint. So do not type login/password for relayserver. After successful login, you will be on homeserver. + +### Connect Directly to a NATed Server via a Reverse SSH Tunnel ### + +While the above method allows you to reach **homeserver** behind NAT, you need to log in twice: first to **relayserver**, and then to **homeserver**. This is because the end point of an SSH tunnel on relayserver is binding to loopback address (127.0.0.1). + +But in fact, there is a way to reach NATed homeserver directly with a single login to relayserver. For this, you will need to let sshd on relayserver forward a port not only from loopback address, but also from an external host. This is achieved by specifying **GatewayPorts** option in sshd running on relayserver. + +Open /etc/ssh/sshd_conf of **relayserver** and add the following line. + + relayserver~$ vi /etc/ssh/sshd_conf + +---------- + + GatewayPorts clientspecified + +Restart sshd. + +Debian-based system: + + relayserver~$ sudo /etc/init.d/ssh restart + +Red Hat-based system: + + relayserver~$ sudo systemctl restart sshd + +Now let's initiate a reverse SSH tunnel from homeserver as follows. +homeserver~$ ssh -fN -R 1.1.1.1:10022:localhost:22 relayserver_user@1.1.1.1 + +Log in to relayserver and confirm with netstat command that a reverse SSH tunnel is established successfully. + + relayserver~$ sudo netstat -nap | grep 10022 + +---------- + + tcp 0 0 1.1.1.1:10022 0.0.0.0:* LISTEN 1538/sshd: dev + +Unlike a previous case, the end point of a tunnel is now at 1.1.1.1:10022 (relayserver's public IP address), not 127.0.0.1:10022. This means that the end point of the tunnel is reachable from an external host. + +Now from any other computer (e.g., clientcomputer), type the following command to gain access to NATed homeserver. + + clientcomputer~$ ssh -p 10022 homeserver_user@1.1.1.1 + +In the above command, while 1.1.1.1 is the public IP address of relayserver, homeserver_user must be the user account associated with homeserver. This is because the real host you are logging in to is homeserver, not relayserver. The latter simply relays your SSH traffic to homeserver. + +### Set up a Persistent Reverse SSH Tunnel on Linux ### + +Now that you understand how to create a reverse SSH tunnel, let's make the tunnel "persistent", so that the tunnel is up and running all the time (regardless of temporary network congestion, SSH timeout, relay host rebooting, etc.). After all, if the tunnel is not always up, you won't be able to connect to your home server reliably. + +For a persistent tunnel, I am going to use a tool called autossh. As the name implies, this program allows you to automatically restart an SSH session should it breaks for any reason. So it is useful to keep a reverse SSH tunnel active. + +As the first step, let's set up [passwordless SSH login][2] from homeserver to relayserver. That way, autossh can restart a broken reverse SSH tunnel without user's involvement. + +Next, [install autossh][3] on homeserver where a tunnel is initiated. + +From homeserver, run autossh with the following arguments to create a persistent SSH tunnel destined to relayserver. + + homeserver~$ autossh -M 10900 -fN -o "PubkeyAuthentication=yes" -o "StrictHostKeyChecking=false" -o "PasswordAuthentication=no" -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -R 1.1.1.1:10022:localhost:22 relayserver_user@1.1.1.1 + +The "-M 10900" option specifies a monitoring port on relayserver which will be used to exchange test data to monitor an SSH session. This port should not be used by any program on relayserver. + +The "-fN" option is passed to ssh command, which will let the SSH tunnel run in the background. + +The "-o XXXX" options tell ssh to: + +- Use key authentication, not password authentication. +- Automatically accept (unknown) SSH host keys. +- Exchange keep-alive messages every 60 seconds. +- Send up to 3 keep-alive messages without receiving any response back. + +The rest of reverse SSH tunneling related options remain the same as before. + +If you want an SSH tunnel to be automatically up upon boot, you can add the above autossh command in /etc/rc.local. + +### Conclusion ### + +In this post, I talked about how you can use a reverse SSH tunnel to access a Linux server behind a restrictive firewall or NAT gateway from outside world. While I demonstrated its use case for a home network, you must be careful when applying it for corporate networks. Such a tunnel can be considered as a breach of a corporate policy, as it circumvents corporate firewalls and can expose corporate networks to outside attacks. There is a great chance it can be misused or abused. So always remember its implication before setting it up. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/go/digitalocean +[2]:http://xmodulo.com/how-to-enable-ssh-login-without.html +[3]:http://ask.xmodulo.com/install-autossh-linux.html \ No newline at end of file From 26093a4a658d6c542a0f80aa1b8af582de1bfcbd Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 4 May 2015 16:24:04 +0800 Subject: [PATCH 0707/2517] =?UTF-8?q?20150504-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...To Install Visual Studio Code On Ubuntu.md | 61 ++++++ ...r and Remove Unwanted Packages in Linux.md | 183 ++++++++++++++++++ 2 files changed, 244 insertions(+) create mode 100644 sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md create mode 100644 sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md diff --git a/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md b/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md new file mode 100644 index 0000000000..4b5d2eeae6 --- /dev/null +++ b/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md @@ -0,0 +1,61 @@ +How To Install Visual Studio Code On Ubuntu +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Install-Visual-Studio-Code-in-Ubuntu.jpeg) + +Microsoft has done the unexpected by [releasing Visual Studio Code][1] for all major desktop platforms that includes Linux as well. If you are a web developer who happens to be using Ubuntu, you can **easily install Visual Studio Code in Ubuntu**. + +We will be using [Ubuntu Make][2] for installing Visual Studio Code in Ubuntu. Ubuntu Make, previously known as Ubuntu Developer Tools Center, is a command line utility that allows you to easily install various development tools, languages and IDEs. You can easily [install Android Studio][3] and other popular IDEs such as Eclipse with Ubuntu Make. In this tutorial we shall see **how to install Visual Studio Code in Ubuntu with Ubuntu Make**. + +### Install Microsoft Visual Studio Code in Ubuntu ### + +Before installing Visual Studio Code, we need to install Ubuntu Make first. Though Ubuntu Make is available in Ubuntu 15.04 repository, **you’ll need Ubuntu Make 0.7 for Visual Studio**. You can get the latest Ubuntu Make by using the official PPA. The PPA is available for Ubuntu 14.04, 14.10 and 15.04. Also, it **is only available for 64 bit platform**. + +Open a terminal and use the following commands to install Ubuntu Make via official PPA: + + sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make + sudo apt-get update + sudo apt-get install ubuntu-make + +Once you have installed Ubuntu Make, use the command below to install Visual Studio Code: + + umake web visual-studio-code + +You’ll be asked to provide a path where it will be installed: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Visual_Studio_Code_Ubuntu_1.jpeg) + +After throwing a whole lot of terms and conditions, it will ask for your permission to install Visual Studio Code. Press ‘a’ at this screen: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Visual_Studio_Code_Ubuntu_2.jpeg) + +Once you do that it will start downloading and installing it. Once it is installed, you can see that Visual Studio Code icon has already been locked to the Unity Launcher. Just click on it to run it. This is how Visual Studio Code looks like in Ubuntu 15.04 Unity: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Visual_Studio_Code_Ubuntu.jpeg) + +### Uninstall Visual Studio Code from Ubuntu ### + +To uninstall Visual Studio Code, we’ll use the same command line tool umake. Just use the following command in terminal: + + umake web visual-studio-code --remove + +If you do not want to use Ubuntu Make, you can install Visual Studio Code by downloading the files from Microsoft: + +- [Download Visual Studio Code for Linux][4] + +See, how easy it is to install Visual Studio Code in Ubuntu, all thanks to Ubuntu Make. I hope this tutorial helped you. Feel free to drop a comment if you have any questions or suggestions. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-visual-studio-code-ubuntu/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://www.geekwire.com/2015/microsofts-visual-studio-expands-to-mac-and-linux-with-new-code-development-tool/ +[2]:https://wiki.ubuntu.com/ubuntu-make +[3]:http://itsfoss.com/install-android-studio-ubuntu-linux/ +[4]:https://code.visualstudio.com/Download \ No newline at end of file diff --git a/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md b/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md new file mode 100644 index 0000000000..990e621e5b --- /dev/null +++ b/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md @@ -0,0 +1,183 @@ +Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux +================================================================================ +Here we are with the next part of Linux Command Line Tips and Tricks. If you missed our previous post on Linux Tricks you may find it here. + +- [5 Linux Command Line Tricks][1] + +In this post we will be introducing 6 command Line tips namely create Linux Command line chat using Netcat command, perform addition of a column on the fly from the output of a command, remove orphan packages from Debian and CentOS, get local and remote IP from command Line, get colored output in terminal and decode various color code and last but not the least hash tags implementation in Linux command Line. Lets check them one by one. + +![Linux Commandline Chat Server](http://www.tecmint.com/wp-content/uploads/2015/04/linux-commandline-chat-server.jpg) +6 Useful Commandline Tricks and Tips + +### 1. Create Linux Commandline Chat Server ### + +We all have been using chat service since a long time. We are familiar with Google chat, Hangout, Facebook chat, Whatsapp, Hike and several other application and integrated chat services. Do you know Linux nc command can make your Linux box a chat server with just one line of command. +What is nc command in Linux and what it does? + +nc is the depreciation of Linux netcat command. The nc utility is often referred as Swiss army knife based upon the number of its built-in capabilities. It is used as debugging tool, investigation tool, reading and writing to network connection using TCP/UDP, DNS forward/reverse checking. + +It is prominently used for port scanning, file transferring, backdoor and port listening. nc has the ability to use any local unused port and any local network source address. + +Use nc command (On Server with IP address: 192.168.0.7) to create a command line messaging server instantly. + + $ nc -l -vv -p 11119 + +Explanation of the above command switches. + +- -v : means Verbose +- -vv : more verbose +- -p : The local port Number + +You may replace 11119 with any other local port number. + +Next on the client machine (IP address: 192.168.0.15) run the following command to initialize chat session to machine (where messaging server is running). + + $ nc 192.168.0.7 11119 + +![Linux Commandline Chat with nc Command](http://www.tecmint.com/wp-content/uploads/2015/04/Chat-on-Linux-Commandline.gif) + +**Note**: You can terminate chat session by hitting ctrl+c key and also nc chat is one-to-one service. + +### 2. How to Sum Values in a Column in Linux ### + +How to sum the numerical values of a column, generated as an output of a command, on the fly in the terminal. + +The output of the ‘ls -l‘ command. + + $ ls -l + +![Sum Numerical Values](http://www.tecmint.com/wp-content/uploads/2015/04/Sum-Values.gif) + +Notice that the second column is numerical which represents number of symbolic links and the 5th column is numerical which represents the size of he file. Say we need to sum the values of fifth column on the fly. + +List the content of 5th column without printing anything else. We will be using ‘awk‘ command to do this. ‘$5‘ represents 5th column. + + $ ls -l | awk '{print $5}' + +![List Content Column](http://www.tecmint.com/wp-content/uploads/2015/04/List-Content-Column.gif) + +Now use awk to print the sum of the output of 5th column by pipelining it. + + $ ls -l | awk '{print $5}' | awk '{total = total + $1}END{print total}' + +![Sum and Print Columns](http://www.tecmint.com/wp-content/uploads/2015/04/Sum-Columns.gif) + +### How to Remove Orphan Packages in Linux? ### + +Orphan packages are those packages that are installed as a dependency of another package and no longer required when the original package is removed. + +Say we installed a package gtprogram which was dependent of gtdependency. We can’t install gtprogram unless gtdependency is installed. + +When we remove gtprogram it won’t remove gtdependency by default. And if we don’t remove gtdependency, it will remain as Orpahn Package with no connection to any other package. + + # yum autoremove [On RedHat Systems] + +![Remove Orphan Packages in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Orphan-Packages-in-CentOS1.gif) + + # apt-get autoremove [On Debian Systems] + +![Remove Orphan Packages in Debian](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Orphan-Packages-in-Debian.gif) + +You should always remove Orphan Packages to keep the Linux box loaded with just necessary stuff and nothing else. + +### 4. How to Get Local and Public IP Address of Linux Server ### + +To get you local IP address run the below one liner script. + + $ ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: + +You must have installed ifconfig, if not, apt or yum the required packages. Here we will be pipelining the output of ifconfig with grep command to find the string “intel addr:”. + +We know ifconfig command is sufficient to output local IP Address. But ifconfig generate lots of other outputs and our concern here is to generate only local IP address and nothing else. + + # ifconfig | grep "inet addr:" + +![Check Local IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Local-IP-Address.gif) + +Although the output is more custom now, but we need to filter our local IP address only and nothing else. For this we will use awk to print the second column only by pipelining it with the above script. + + # ifconfig | grep “inet addr:” | awk '{print $2}' + +![Filter Only IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Filter-IP-Address.gif) + +Clear from the above image that we have customised the output very much but still not what we want. The loopback address 127.0.0.1 is still there in the result. + +We use use -v flag with grep that will print only those lines that don’t match the one provided in argument. Every machine have the same loopback address 127.0.0.1, so use grep -v to print those lines that don’t have this string, by pipelining it with above output. + + # ifconfig | grep "inet addr" | awk '{print $2}' | grep -v '127.0.0.1' + +![Print IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Print-IP-Address.gif) + +We have almost generated desired output, just replace the string `(addr:)` from the beginning. We will use cut command to print only column two. The column 1 and column 2 are not separated by tab but by `(:)`, so we need to use delimiter `(-d)` by pipelining the above output. + + # ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: + +![Customized IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Custome-IP-Address.gif) + +Finally! The desired result has been generated. + +### 5. How to Color Linux Terminal ### + +You might have seen colored output in terminal. Also you would be knowing to enable/disable colored output in terminal. If not you may follow the below steps. + +In Linux every user has `'.bashrc'` file, this file is used to handle your terminal output. Open and edit this file with your choice of editor. Note that, this file is hidden (dot beginning of file means hidden). + + $ vi /home/$USER/.bashrc + +Make sure that the following lines below are uncommented. ie., it don’t start with a #. + + if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dirc$ + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' + fi + +![User .bashrc File](http://www.tecmint.com/wp-content/uploads/2015/04/bashrc-file.gif) + +Once done! Save and exit. To make the changes taken into effect logout and again login. + +Now you will see files and folders are listed in various colors based upon type of file. To decode the color code run the below command. + + $ dircolors -p + +Since the output is too long, lets pipeline the output with less command so that we get output one screen at a time. + + $ dircolors -p | less + +![Linux Color Output](http://www.tecmint.com/wp-content/uploads/2015/04/Linux-Color-Output.gif) + +### 6. How to Hash Tag Linux Commands and Scripts ### + +We are using hash tags on Twitter, Facebook and Google Plus (may be some other places, I have not noticed). These hash tags make it easier for others to search for a hash tag. Very few know that we can use hash tag in Linux command Line. + +We already know that `#` in configuration files and most of the programming languages is treated as comment line and is excluded from execution. + +Run a command and then create a hash tag of the command so that we can find it later. Say we have a long script that was executed in point 4 above. Now create a hash tag for this. We know ifconfig can be run by sudo or root user hence acting as root. + + # ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: #myip + +The script above has been hash tagged with ‘myip‘. Now search for the hash tag in reverse-i-serach (press ctrl+r), in the terminal and type ‘myip‘. You may execute it from there, as well. + +![Create Command Hash Tags](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Command-Hash-Tags.gif) + +You may create as many hash tags for every command and find it later using reverse-i-search. + +That’s all for now. We have been working hard to produce interesting and knowledgeable contents for you. What do you think how we are doing? Any suggestion is welcome. You may comment in the box below. Keep connected! Kudos. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-commandline-chat-server-and-remove-unwanted-packages/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/5-linux-command-line-tricks/ \ No newline at end of file From bd46afe9ce4116061a6f5902222a521527135f95 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 4 May 2015 16:37:22 +0800 Subject: [PATCH 0708/2517] PUB:20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04 @johnhoow --- ...Lightweight Budgie v8 Desktop in Ubuntu 14.04.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md (72%) diff --git a/translated/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md b/published/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md similarity index 72% rename from translated/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md rename to published/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md index 10bb779e71..ccaff360e5 100644 --- a/translated/tech/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md +++ b/published/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md @@ -53,11 +53,11 @@ Budgie是为Linux发行版定制的旗舰桌面,也是一个定制工程。为 ![安装 Budgie Desktop](http://blog.linoxide.com/wp-content/uploads/2015/02/install-budgie-desktop.png) -**注意点** +**注意** -这是一个活跃的开发版本,一些主要的特点可能还不是特别的完善,如:网络管理器,为数不多的控制组件,无通知系统斌并且无法将app锁定到任务栏。 +这是一个活跃的开发版本,一些主要的功能可能还不是特别的完善,如:没有网络管理器,没有音量控制组件(可以使用键盘控制),无通知系统并且无法将app锁定到任务栏。 -作为工作区你能够禁用滚动栏,通过设置一个默认的主题并且通过下面的命令退出当前的会话 +有一个临时解决方案可以禁用叠加滚动栏:设置另外一个默认主题,然后从终端退出当前会话: $ gnome-session-quit @@ -65,7 +65,7 @@ Budgie是为Linux发行版定制的旗舰桌面,也是一个定制工程。为 ### 登录Budgie会话 ### -安装完成之后,我们能在登录时选择机进入budgie桌面。 +安装完成之后,我们能在登录时选择进入budgie桌面。 ![选择桌面会话](http://blog.linoxide.com/wp-content/uploads/2015/02/session-select.png) @@ -79,8 +79,7 @@ Budgie是为Linux发行版定制的旗舰桌面,也是一个定制工程。为 ### 结论 ### -Hurray! We have successfully installed our Lightweight Budgie Desktop Environment in our Ubuntu 14.04 LTS "Trusty" box. As we know, Budgie Desktop is still underdevelopment which makes it a lot of stuffs missing. Though it’s based on Gnome’s GTK3, it’s not a fork. The desktop is written completely from scratch, and the design is elegant and well thought out. If you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy Budgie Desktop 0.8 :-) -Budgie桌面当前正在开发过程中,因此有目前有很多功能的缺失。虽然它是基于Gnome,但不是完全的复制。Budgie是完全从零开始实现,它的设计是优雅的并且正在不断的完善。 +嗨,现在我们已经成功的在 Ubuntu 14.04 LTS 上安装了轻量级 Budgie 桌面环境。Budgie桌面当前正在开发过程中,因此有目前有很多功能的缺失。虽然它是基于Gnome 的 GTK3,但不是完全的复制。Budgie是完全从零开始实现,它的设计是优雅的并且正在不断的完善。如果你有任何问题、评论,请在下面的评论框发表。愿你喜欢 Budgie 桌面 0.8 。 -------------------------------------------------------------------------------- @@ -88,7 +87,7 @@ via: http://linoxide.com/ubuntu-how-to/install-lightweight-budgie-v8-desktop-ubu 作者:[Arun Pyasi][a] 译者:[johnhoow](https://github.com/johnhoow) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 32996ca88c5f62b7fdcc8c9be6fde6e32071cedd Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Mon, 4 May 2015 20:24:04 +0800 Subject: [PATCH 0709/2517] translated wi-cuckoo --- ...sed--How to Upgrade on Fedora or CentOS.md | 168 ------------------ ...sed--How to Upgrade on Fedora or CentOS.md | 167 +++++++++++++++++ 2 files changed, 167 insertions(+), 168 deletions(-) delete mode 100644 sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md create mode 100644 translated/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md diff --git a/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md b/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md deleted file mode 100644 index c3b1a737ce..0000000000 --- a/sources/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md +++ /dev/null @@ -1,168 +0,0 @@ -translating wi-cuckoo -Docker 1.6 Released - How to Upgrade on Fedora / CentOS -================================================================================ -Docker, a popular open source container platform for packaging applications, has a new release 1.6 with lot of new features in it. This version has updates to Docker Registry, Engine, Swarm, Compose and Machine. The release aims at improvements in performance, developer and system administrator experiences. Let us take a quick look at the new features available. - -**Docker Registry (2.0)** which is a service for pushing Docker images for storing and sharing, has undergone architectural changes as it was facing performance issues when under load. It is still backward compatible. The language in which Docker Registry is written is now changed from Python to Google's Go to improve performance. In combination with Docker Engine 1.6, it is capable of pulling the images faster. Earlier the images were delivered sequentially, but now in parallel. - -**Docker Engine (1.6)** is greatly improved from its previous version. It supports containers and image labels. With labels you can attach user-defined metadata to images and containers which in turn can be used by other tools. Labels will not be visible to the running applications and can be used to speed up the searching of containers and images. - -There is a Windows version of the Docker client which can connect to a remote Docker engine that runs Linux. - -Docker now supports logging driver API that allows us to send container logs to systems like Syslog or to a third-party. It is going to be benefitting the system administrators. - -**Swarm (0.2)** is a clustering tool for Docker which turns a pool of Docker hosts into one virtual host. In the new feature, containers are evenly placed on the available nodes. Effort is made towards supporting the complete Docker API by adding more Docker commands. In the future, it will be possible to use third-party drivers for clustering. - -**Compose (1.2)** which is a tool for defining and running complex applications in Docker has also got an upgrade. In the new version, one can create multiple sub-files instead of one flat file to describe a multi-container application. - -With **Machine (0.2)**, we can easily create Docker hosts on local computers, clouds and data centers. The new release provides a cleaner driver interface to write drivers for providers. Provisioning is handled centrally by Machine instead of each individual driver. New command added to regenerate host's TLS certificates which increases security. - -### Upgrade instructions on Fedora / CentOS ### - -In this section, let us learn how to upgrade the existing docker version to the latest on Fedora and CentOS. Please note that currently Docker runs only on 64-bit architecture. As both Fedora and CentOS are from RedHat, commands used are pretty much identical except that the Docker package in Fedora20 and CentOS6.5 is called “docker-io”. - -If you do not already have Docker installed on the system, install it using: - - "yum install docker-io" – on Fedora20 / CentOS6.5 - - "yum install docker" - on Fedora21 / CentOS7 - -Before upgrading, it is good to have a backup of the docker images and container volumes. - -Refer [filesystem to a tar archive][1] and [volumes backups, restores or migrations options][2] for more details. - -Currently the test system has Docker version 1.5 installed. Output shown in the examples are from a Fedora 20 system. - -Verify the current version of Docker installed on the system - - [root@TestNode1 ~]#sudo docker -v - - Docker version 1.5.0, build a8a31ef/1.5.0 - -If the Docker service is running, first stop it. - - [root@TestNode1 ~]# sudo systemctl stop docker - -Upgrade to the latest version using yum update. But at the time of writing this article, the repositories were not yet updated with the latest version(1.6). Hence you need to use the binary method of upgradation. - - [root@TestNode1 ~]#sudo yum -y update docker-io - - No packages marked for update - - [root@TestNode1 ~]#sudo wget https://get.docker.com/builds/Linux/x86_64/docker-latest -O /usr/bin/docker - - --2015-04-19 13:40:48-- https://get.docker.com/builds/Linux/x86_64/docker-latest - - Resolving get.docker.com (get.docker.com)... 162.242.195.82 - - Connecting to get.docker.com (get.docker.com)|162.242.195.82|:443... connected. - - HTTP request sent, awaiting response... 200 OK - - Length: 15443598 (15M) [binary/octet-stream] - - Saving to: /usr/bin/docker - - 100%[======================================>] 15,443,598 8.72MB/s in 1.7s - - 2015-04-19 13:40:50 (8.72 MB/s) - /usr/bin/docker saved - -Check the updated version - - [root@TestNode1 ~]#sudo docker -v - - Docker version 1.6.0, build 4749651 - -Restart the docker service - - [root@TestNode1 ~]# sudo systemctl start docker - -Verify that Docker is working - - [root@TestNode1 ~]# docker images - - REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE - - fedora latest 834629358fe2 3 months ago 241.3 MB - - [root@TestNode1 ~]# docker run fedora /bin/echo Hello World - - Hello World - -**Note** on CentOS installation , after installing Docker on CentOS, you might get error messages like the following while trying to start the Docker service - - docker.service - Docker Application Container Engine - - Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled) - - Active: failed (Result: exit-code) since Mon 2015-04-20 03:24:24 EDT; 6h ago - - Docs: http://docs.docker.com - - Process: 21069 ExecStart=/usr/bin/docker -d $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=127) - - Main PID: 21069 (code=exited, status=127) - - Apr 20 03:24:24 centos7 systemd[1]: Starting Docker Application Container E..... - - Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" - - Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" - - Apr 20 03:24:24 centos7 docker[21069]: /usr/bin/docker: relocation error: /...ce - - Apr 20 03:24:24 centos7 systemd[1]: docker.service: main process exited, co.../a - - Apr 20 03:24:24 centos7 systemd[1]: Failed to start Docker Application Cont...e. - - Apr 20 03:24:24 centos7 systemd[1]: Unit docker.service entered failed state. - -This is a known bug ( [https://bugzilla.redhat.com/show_bug.cgi?id=1207839][3] ) and needs an upgrade of the device mapper to the latest level. - - [root@centos7 ~]# rpm -qa device-mapper - - device-mapper-1.02.84-14.el7.x86_64 - - [root@centos7 ~]# yum update device-mapper - - [root@centos7 ~]# rpm -qa device-mapper - - device-mapper-1.02.93-3.el7.x86_64 - - [root@centos7 ~]# systemctl start docker - -### Summary ### - -Though the docker technology is quite recent one, it is quickly gaining popularity. It has made life easy for developers and ops teams to quickly create and deploy applications respectively. With the company releasing quick updates to Docker in order to improve the product and address customer requirements, the future is definitely bright for Docker. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/docker-1-6-features-upgrade-fedora-centos/ - -作者:[B N Poornima][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/bnpoornima/ -[1]:http://docs.docker.com/reference/commandline/cli/#export -[2]:http://docs.docker.com/userguide/dockervolumes/#backup-restore-or-migrate-data-volumes -[3]:https://bugzilla.redhat.com/show_bug.cgi?id=1207839 -[4]: -[5]: -[6]: -[7]: -[8]: -[9]: -[10]: -[11]: -[12]: -[13]: -[14]: -[15]: -[16]: -[17]: -[18]: -[19]: -[20]: diff --git a/translated/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md b/translated/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md new file mode 100644 index 0000000000..a07ecad986 --- /dev/null +++ b/translated/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md @@ -0,0 +1,167 @@ +Docker 1.6 发布 - 如何在Fedora / CentOS上面升级 +============================================================================= +Docker,一个为软件打包的流行开源容器平台,有了新的发行版1.6,增加了许多新的特性。该版本在Docker注册,引擎,云集,组合和机器方面都有更新。这次发行旨在提升体验,开发者和系统管理员的经验(这里不太确定)。让我们来快速看看有哪些新特性吧。 + +**Docker Registry (2.0)**是一项推送Docker镜像用于存储和分享的服务,经历过架构的改变,因为面临加载下的体验问题。它仍然向下兼容。Docker Registry的编写语言现在从Python改为Google的Go语言了,为了提升表现力。与Docker引擎1.6结合后,拉取镜像的能力更快了。早先的镜像被队列式地输送,而现在是并行的啦。 + +**Docker Engine (1.6)**相比之前的版本有很大的提高。目前支持容器与镜像标签。通过标签,你可以附加用户自定义的元数据到镜像和容器上,而镜像和容器反过来可以被其他工具使用。标签对正在运行的应用是不可见的,可以用来加速搜索容器和镜像。 + +Windows版本的Docker客户端可以连接一个远程的运行linux的Docker引擎。 + +Docker目前支持日志驱动API,这允许我们发送容器日志给系统如Syslog,或者第三方。这将会使得系统管理员受益。 + +**Swarm (0.2)**是一个Docker集群工具,将一个Docker主机池转换为一个虚拟主机。在新特性里,容器甚至被放在了可用的节点上。通过添加更多的Docker命令,所有的努力都朝着支持完整的Docker API。将来,使用第三方驱动来集群会成为可能。 + +**Compose (1.2)** 是一个Docker里定义和运行复杂应用的工具, 也得到了升级。在新版本里,一个可以创建多个子文件,而不是一个没有结构的文件描述一个多容器应用。 + +通过**Machine (0.2)**,我们可以很容易地在本地计算机,云和数据中心上搭建Docker主机。新的发行版为开发者提供了一个相对干净地驱动界面来写驱动。供应被Machine牢牢地掌握,而不是每个独立的驱动。新的命令被添加,可以用来生成主机的TLS证书,以提高安全性。 + +### 在Fedora / CentOS 上升级架构 ### + +在这一部分里,我们将会学习如何在Fedora和CentOS上升级已有的docker到最新版本。请注意,目前的Docker仅运行在64位的架构上,Fedora和CentOS都源于RedHat,命令的使用是差不多相同的,除了在Fedora20和CentOS6.5里Docker包被叫做“docker-io”。 + +如果你系统之前没有安装Docker,使用下面命令安装: + + "yum install docker-io" – on Fedora20 / CentOS6.5 + + "yum install docker" - on Fedora21 / CentOS7 + +在升级之前,备份一下docker镜像和容器卷是个不错的主意。 + +参考[filesystem to a tar archive][1]与[volumes backups, restores or migrations options][2],获取更多信息。 + +目前,测试系统安装了Docker1.5。样例输出显示是来自一个Fedora20的系统。 + +验证当前系统安装的Docker版本 + + [root@TestNode1 ~]#sudo docker -v + + Docker version 1.5.0, build a8a31ef/1.5.0 + +如果Docker正在运行,先停掉。 + + [root@TestNode1 ~]# sudo systemctl stop docker + +升级到最新版使用yum update。但是写这篇文章的时候,仓库并不是最新版本(1.6)。因此你需要使用二进制的升级方法。 + + [root@TestNode1 ~]#sudo yum -y update docker-io + + No packages marked for update + + [root@TestNode1 ~]#sudo wget https://get.docker.com/builds/Linux/x86_64/docker-latest -O /usr/bin/docker + + --2015-04-19 13:40:48-- https://get.docker.com/builds/Linux/x86_64/docker-latest + + Resolving get.docker.com (get.docker.com)... 162.242.195.82 + + Connecting to get.docker.com (get.docker.com)|162.242.195.82|:443... connected. + + HTTP request sent, awaiting response... 200 OK + + Length: 15443598 (15M) [binary/octet-stream] + + Saving to: /usr/bin/docker + + 100%[======================================>] 15,443,598 8.72MB/s in 1.7s + + 2015-04-19 13:40:50 (8.72 MB/s) - /usr/bin/docker saved + +检查更新版本 + + [root@TestNode1 ~]#sudo docker -v + + Docker version 1.6.0, build 4749651 + +重启docker服务 + + [root@TestNode1 ~]# sudo systemctl start docker + +确认Docker在运行 + + [root@TestNode1 ~]# docker images + + REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE + + fedora latest 834629358fe2 3 months ago 241.3 MB + + [root@TestNode1 ~]# docker run fedora /bin/echo Hello World + + Hello World + +CentOS安装时需要**注意**,在CentOS上安装完Docker后,当你试图启动Docker服务的时候,你可能会得到错误的信息,如下所示 + + docker.service - Docker Application Container Engine + + Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled) + + Active: failed (Result: exit-code) since Mon 2015-04-20 03:24:24 EDT; 6h ago + + Docs: http://docs.docker.com + + Process: 21069 ExecStart=/usr/bin/docker -d $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=127) + + Main PID: 21069 (code=exited, status=127) + + Apr 20 03:24:24 centos7 systemd[1]: Starting Docker Application Container E..... + + Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" + + Apr 20 03:24:24 centos7 docker[21069]: time="2015-04-20T03:24:24-04:00" lev...)" + + Apr 20 03:24:24 centos7 docker[21069]: /usr/bin/docker: relocation error: /...ce + + Apr 20 03:24:24 centos7 systemd[1]: docker.service: main process exited, co.../a + + Apr 20 03:24:24 centos7 systemd[1]: Failed to start Docker Application Cont...e. + + Apr 20 03:24:24 centos7 systemd[1]: Unit docker.service entered failed state. + +这是一个熟知的bug([https://bugzilla.redhat.com/show_bug.cgi?id=1207839][3]),需要一个设备映射的升级,到最新的水平。 + + [root@centos7 ~]# rpm -qa device-mapper + + device-mapper-1.02.84-14.el7.x86_64 + + [root@centos7 ~]# yum update device-mapper + + [root@centos7 ~]# rpm -qa device-mapper + + device-mapper-1.02.93-3.el7.x86_64 + + [root@centos7 ~]# systemctl start docker + +### 总结 ### + +尽管docker技术出现时间不长,当很快获得了流行。它使得开发者的生活变得容易,运维团队可以快速独立地创建和部署应用。通过公司发布快速的Docker更新,来提升产品质量,满足用户需求,未来对于Docker来说一片光明。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/docker-1-6-features-upgrade-fedora-centos/ + +作者:[B N Poornima][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bnpoornima/ +[1]:http://docs.docker.com/reference/commandline/cli/#export +[2]:http://docs.docker.com/userguide/dockervolumes/#backup-restore-or-migrate-data-volumes +[3]:https://bugzilla.redhat.com/show_bug.cgi?id=1207839 +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: From 6113b6009f1ed44787131af0516cc5a09573d54f Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 4 May 2015 21:59:14 +0800 Subject: [PATCH 0710/2517] PUB:20150108 Interface (NICs) Bonding in Linux using nmcli @ictlyh --- ...nterface (NICs) Bonding in Linux using nmcli.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150108 Interface (NICs) Bonding in Linux using nmcli.md (82%) diff --git a/translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md b/published/20150108 Interface (NICs) Bonding in Linux using nmcli.md similarity index 82% rename from translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md rename to published/20150108 Interface (NICs) Bonding in Linux using nmcli.md index 0b5bf2cd8e..fa8297599b 100644 --- a/translated/tech/20150108 Interface (NICs) Bonding in Linux using nmcli.md +++ b/published/20150108 Interface (NICs) Bonding in Linux using nmcli.md @@ -1,15 +1,15 @@ -在 Linux 中用 nmcli 命令绑定网卡(NICs) +在 Linux 中用 nmcli 命令绑定多块网卡 ================================================================================ -今天,我们来学习一下在 CentOS 7.x 中如何用 nmcli(Network Manager Command Line Interface:网络管理命令行接口) 进行网卡(NICs 译者注:Netword Interface Card,网卡或网络适配器)绑定(译者注:bond 是指把多个物理网卡绑定成一个逻辑上的网卡,这样多个网卡可以使用同一个 IP 从而可以避免单点故障)。 +今天,我们来学习一下在 CentOS 7.x 中如何用 nmcli(Network Manager Command Line Interface:网络管理命令行接口)进行网卡绑定。 -网卡绑定是将 **网卡** 逻辑地连接到一起从而允许故障转移或者提高吞吐率的方法。提高服务器网络可用性的一个方式是使用多个网卡。Linux 绑定驱动提供了一个将多个网卡聚合到一个逻辑绑定接口的方法。这是个并不影响 linux 内核中旧绑定驱动的新的实现;它提供了另一种实现方法。 +网卡(接口)绑定是将多块 **网卡** 逻辑地连接到一起从而允许故障转移或者提高吞吐率的方法。提高服务器网络可用性的一个方式是使用多个网卡。Linux 绑定驱动程序提供了一种将多个网卡聚合到一个逻辑的绑定接口的方法。这是个新的实现绑定的方法,并不影响 linux 内核中旧绑定驱动。 **网卡绑定为我们提供了两个主要的好处:** 1. **高带宽** 1. **冗余/弹性** -现在让我们在 CentOS 7 上配置网卡绑定吧。我们需要决定选取哪些接口配置成一个组接口。 +现在让我们在 CentOS 7 上配置网卡绑定吧。我们需要决定选取哪些接口配置成一个组接口(Team interface)。 运行 **ip link** 命令查看系统中可用的接口。 @@ -45,7 +45,7 @@ ### 2. 添加从设备 ### -现在让我们天际从设备到主设备 team0。这是添加从设备的语法。 +现在让我们添加从设备到主设备 team0。这是添加从设备的语法: # nmcli con add type team-slave con-name CNAME ifname INAME master TEAM @@ -89,7 +89,7 @@ ![teamdctl 检查主动备份](http://blog.linoxide.com/wp-content/uploads/2015/01/teamdctl-activebackup-check.png) -现在让我们和激活的端口断开连接并再次检查状态来确认主动备份配置是否像希望的那样工作。 +现在让我们把激活的端口断开连接并再次检查状态来确认主动备份配置是否像希望的那样工作。 # nmcli dev dis eno33554960 @@ -129,7 +129,7 @@ via: http://linoxide.com/linux-command/interface-nics-bonding-linux/ 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 48388fdc8158cbd6617de24b9008da9b128d9d54 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 4 May 2015 22:05:33 +0800 Subject: [PATCH 0711/2517] PUB:20150316 Install Mate desktop in FreeBSD 10.1 @geekpi --- .../20150316 Install Mate desktop in FreeBSD 10.1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {translated/tech => published}/20150316 Install Mate desktop in FreeBSD 10.1.md (97%) diff --git a/translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md b/published/20150316 Install Mate desktop in FreeBSD 10.1.md similarity index 97% rename from translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md rename to published/20150316 Install Mate desktop in FreeBSD 10.1.md index 76d05da5ab..ed4aa9d18b 100644 --- a/translated/tech/20150316 Install Mate desktop in FreeBSD 10.1.md +++ b/published/20150316 Install Mate desktop in FreeBSD 10.1.md @@ -54,7 +54,7 @@ via: http://www.unixmen.com/install-mate-desktop-freebsd-10-1/ 作者:[M.el Khamlichi][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 31714d8239ac6918a9771bb0bad6ebaa02507ae7 Mon Sep 17 00:00:00 2001 From: chenjt Date: Tue, 5 May 2015 09:09:37 +0800 Subject: [PATCH 0712/2517] translated 5 rows --- ...set up networking between Docker containers.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) rename {sources => translated}/tech/20150323 How to set up networking between Docker containers.md (79%) diff --git a/sources/tech/20150323 How to set up networking between Docker containers.md b/translated/tech/20150323 How to set up networking between Docker containers.md similarity index 79% rename from sources/tech/20150323 How to set up networking between Docker containers.md rename to translated/tech/20150323 How to set up networking between Docker containers.md index dca3457c4e..41a67c6b70 100644 --- a/sources/tech/20150323 How to set up networking between Docker containers.md +++ b/translated/tech/20150323 How to set up networking between Docker containers.md @@ -1,19 +1,18 @@ -[bazz222] -How to set up networking between Docker containers +如何在 Docker 容器之间设置网络 ================================================================================ -As you may be aware, Docker container technology has emerged as a viable lightweight alternative to full-blown virtualization. There are a growing number of use cases of Docker that the industry adopted in different contexts, for example, enabling rapid build environment, simplifying configuration of your infrastructure, isolating applications in multi-tenant environment, and so on. While you can certainly deploy an application sandbox in a standalone Docker container, many real-world use cases of Docker in production environments may involve deploying a complex multi-tier application in an ensemble of multiple containers, where each container plays a specific role (e.g., load balancer, LAMP stack, database, UI). +你也许已经知道了,Docker 容器技术是现有的成熟虚拟化技术的一个替代方案。它被企业应用在越来越多的领域中,比如快速部署环境、简化基础设施的配置流程、多客户环境间的互相隔离等等。当你开始在真实的生产环境使用 Docker 容器去部署应用沙箱时,你可能需要用到多个容器部署一套复杂的多层应用系统,其中每个容器负责一个特定的功能(例如负载均衡、LAMP 栈、数据库、UI 等)。 -There comes the problem of **Docker container networking**: How can we interconnect different Docker containers spawned potentially across different hosts when we do not know beforehand on which host each container will be created? +那么问题来了:有多台宿主机,我们事先不知道会在哪台宿主机上创建容器,如果保证在这些宿主机上创建的容器们可以互相联网? -One pretty neat open-source solution for this is [weave][1]. This tool makes interconnecting multiple Docker containers pretty much hassle-free. When I say this, I really mean it. +联网技术哪家强?开源方案找 [weave][1]。这个工具可以为你省下不少烦恼。听我的准没错,谁用谁知道。 -In this tutorial, I am going to demonstrate **how to set up Docker networking across different hosts using weave**. +于是本教程的主题就变成了“**如何使用 weave 在不同主机上的 Docker 容器之间设置网络**”。 -### How Weave Works ### +### Weave 是如何工作的 ### ![](https://farm8.staticflickr.com/7288/16662287067_27888684a7_b.jpg) -Let's first see how weave works. Weave creates a network of "peers", where each peer is a virtual router container called "weave router" residing on a distinct host. The weave routers on different hosts maintain TCP connections among themselves to exchange topology information. They also establish UDP connections among themselves to carry inter-container traffic. A weave router on each host is then connected via a bridge to all other Docker containers created on the host. When two containers on different hosts want to exchange traffic, a weave router on each host captures their traffic via a bridge, encapsulates the traffic with UDP, and forwards it to the other router over a UDP connection. +让我们先来看看 weave 怎么工作:先创建一个由多个 peer 组成的对等网络,每个 peer 是一个虚拟路由器容器,叫做“weave 路由器”,它们分布在不同的宿主机上。这个对等网络的每个 peer 之间会维持一个 TCP 链接,用于互相交换拓扑信息,它们也会建立 UDP 链接用于容器间通信。一个 weave 路由器通过桥接技术连接到其他本宿主机上的其他容器。当处于不同宿主机上的两个容器想要通信,一台宿主机上的 weave 路由器用网桥截获数据包,使用 UDP 协议封装后发给另一台宿主机上的 weave 路由器。 Each weave router maintains up-to-date weave router topology information, as well as container's MAC address information (similar to switch's MAC learning), so that it can make forwarding decision on container traffic. Weave is able to route traffic between containers created on hosts which are not directly reachable, as long as two hosts are interconnected via an intermediate weave router on weave topology. Optionally, weave routers can be set to encrypt both TCP control data and UDP data traffic based on public key cryptography. From 641402750c9225c15d29ccfcbe5cda7db5ac9a19 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Tue, 5 May 2015 16:00:16 +0800 Subject: [PATCH 0713/2517] transalting wi-cuckoo --- .../share/20150429 What are good command line HTTP clients.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150429 What are good command line HTTP clients.md b/sources/share/20150429 What are good command line HTTP clients.md index d809be1a06..a06e4e34db 100644 --- a/sources/share/20150429 What are good command line HTTP clients.md +++ b/sources/share/20150429 What are good command line HTTP clients.md @@ -1,3 +1,4 @@ +translating wi-cuckoo What are good command line HTTP clients? ================================================================================ The whole is greater than the sum of its parts is a very famous quote from Aristotle, a Greek philosopher and scientist. This quote is particularly pertinent to Linux. In my view, one of Linux's biggest strengths is its synergy. The usefulness of Linux doesn't derive only from the huge raft of open source (command line) utilities. Instead, it's the synergy generated by using them together, sometimes in conjunction with larger applications. @@ -107,4 +108,4 @@ via: http://www.linuxlinks.com/article/20150425174537249/HTTPclients.html [1]:http://httpie.org/ [2]:http://curl.haxx.se/ -[3]:https://www.gnu.org/software/wget/ \ No newline at end of file +[3]:https://www.gnu.org/software/wget/ From c3a9eb6992da60207765ffb3901bd1dd8ee7ad5c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 5 May 2015 16:43:45 +0800 Subject: [PATCH 0714/2517] =?UTF-8?q?20150505-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5 Bodhi Linux Introduces Moksha Desktop.md | 40 ++ ...es and Units Using 'Systemctl' in Linux.md | 579 ++++++++++++++++++ 2 files changed, 619 insertions(+) create mode 100644 sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md create mode 100644 sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md diff --git a/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md b/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md new file mode 100644 index 0000000000..0b4d61993d --- /dev/null +++ b/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md @@ -0,0 +1,40 @@ +Bodhi Linux Introduces Moksha Desktop +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Bodhi_Linux.jpg) + +Ubuntu based lightweight Linux distribution [Bodhi Linux][1] is working on a desktop environment of its own. This new desktop environment will be called Moksha (Sanskrit for ‘complete freedom’). Moksha will be replacing the usual [Enlightenment desktop environment][2]. + +### Why Moksha instead of Enlightenment? ### + +Jeff Hoogland of Bodhi Linux [says][3] that he had been unhappy with the newer versions of Enlightenment in the recent past. Until E17, Enlightenment was very stable and complemented well to the need of a lightweight Linux OS, but the E18 was so full of bugs that Bodhi Linux skipped it altogether. + +While the latest [Bodhi Linux 3.0.0 release][4] uses E19 (except the legacy mode, meant for older hardware, still uses E17), Jeff is not happy with E19 as well. He quotes: + +> On top of the performance issues, E19 did not allow for me personally to have the same workflow I enjoyed under E17 due to features it no longer had. Because of this I had changed to using the E17 on all of my Bodhi 3 computers – even my high end ones. This got me to thinking how many of our existing Bodhi users felt the same way, so I [opened a discussion about it on our user forums][5]. + +### Moksha is continuation of the E17 desktop ### + +Moksha will be a continuation of Bodhi’s favorite E17 desktop. Jeff further mentions: + +> We will start by integrating all of the Bodhi changes we have simply been patching into the source code over the years and fixing the few issues the desktop has. Once this is done we will begin back porting a few of the more useful features E18 and E19 introduced to the Enlightenment desktop and finally, we will introduce a few new things we think will improve the end user experience. + +### When will Moksha release? ### + +The next update to Bodhi will be Bodhi 3.1.0 in August this year. This new release will bring Moksha on all of its default ISOs. Let’s wait and watch to see if Moksha turns out to be a good decision or not. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/bodhi-linux-introduces-moksha-desktop/ + +作者:[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://www.bodhilinux.com/ +[2]:https://www.enlightenment.org/ +[3]:http://www.bodhilinux.com/2015/04/28/introducing-the-moksha-desktop/ +[4]:http://itsfoss.com/bodhi-linux-3/ +[5]:http://forums.bodhilinux.com/index.php?/topic/12322-e17-vs-e19-which-are-you-using-and-why/ \ No newline at end of file diff --git a/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md b/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md new file mode 100644 index 0000000000..60e41c57ab --- /dev/null +++ b/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md @@ -0,0 +1,579 @@ +How to Manage ‘Systemd’ Services and Units Using ‘Systemctl’ in Linux +================================================================================ +Systemctl is a systemd utility which is responsible for Controlling the systemd system and service manager. + +Systemd is a collection of system management daemons, utilities and libraries which serves as a replacement of System V init daemon. Systemd functions as central management and configuration platform for UNIX like system. + +In the Linux Ecosystem Systemd has been implemented on most of the standard Linux Distribution with a few exception. Systemd is the parent Process of all other daemons oftenly but not always. + +![Manage Linux Services Using Systemctl](http://www.tecmint.com/wp-content/uploads/2015/04/Manage-Linux-Services-Using-Systemctl.jpg) +Manage Linux Services Using Systemctl + +This article aims at throwing light on “How to control System and Services” on a system running systemd. + +### Starting with Systemtd and Systemctl Basics ### + +#### 1. First check if systemd is installed on your system or not and what is the version of currently installed Systemd? #### + + # systemd --version + + systemd 215 + +PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR + +It’s clear from the above example, that we have systemd 215 version Installed. + +#### 2. Check where the binaries and libraries of systemd and systemctl are installed. #### + + # whereis systemd + systemd: /usr/lib/systemd /etc/systemd /usr/share/systemd /usr/share/man/man1/systemd.1.gz + + + # whereis systemctl + systemctl: /usr/bin/systemctl /usr/share/man/man1/systemctl.1.gz + +#### 3. Check whether systemd is running or not. #### + + # ps -eaf | grep [s]ystemd + + root 1 0 0 16:27 ? 00:00:00 /usr/lib/systemd/systemd --switched-root --system --deserialize 23 + root 444 1 0 16:27 ? 00:00:00 /usr/lib/systemd/systemd-journald + root 469 1 0 16:27 ? 00:00:00 /usr/lib/systemd/systemd-udevd + root 555 1 0 16:27 ? 00:00:00 /usr/lib/systemd/systemd-logind + dbus 556 1 0 16:27 ? 00:00:00 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation + +**Notice**: systemd is running as parent daemon (PID=1). In the above command ps with (-e) select all Processes, (- + +a) select all processes except session leaders and (-f) for full format listing (i.e. -eaf). + +Also note the square brackets in the above example and rest of the examples to follow. Square Bracket expression is part of grep’s character class pattern matching. + +#### 4. Analyze systemd boot process. #### + + # systemd-analyze + Startup finished in 487ms (kernel) + 2.776s (initrd) + 20.229s (userspace) = 23.493s + +#### 5. Analyze time taken by each process at boot. #### + + # systemd-analyze blame + + 8.565s mariadb.service + 7.991s webmin.service + 6.095s postfix.service + 4.311s httpd.service + 3.926s firewalld.service + 3.780s kdump.service + 3.238s tuned.service + 1.712s network.service + 1.394s lvm2-monitor.service + 1.126s systemd-logind.service + .... + +#### 6. Analyze critical chain at boot. #### + + # systemd-analyze critical-chain + + The time after the unit is active or started is printed after the "@" character. + The time the unit takes to start is printed after the "+" character. + + multi-user.target @20.222s + └─mariadb.service @11.657s +8.565s + └─network.target @11.168s + └─network.service @9.456s +1.712s + └─NetworkManager.service @8.858s +596ms + └─firewalld.service @4.931s +3.926s + └─basic.target @4.916s + └─sockets.target @4.916s + └─dbus.socket @4.916s + └─sysinit.target @4.905s + └─systemd-update-utmp.service @4.864s +39ms + └─auditd.service @4.563s +301ms + └─systemd-tmpfiles-setup.service @4.485s +69ms + └─rhel-import-state.service @4.342s +142ms + └─local-fs.target @4.324s + └─boot.mount @4.286s +31ms + └─systemd-fsck@dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d19608096 + └─dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d196080964.device @4 + +**Important**: Systemctl accepts services (.service), mount point (.mount), sockets (.socket) and devices (.device) as units. + +#### 7. List all the available units. #### + + # systemctl list-unit-files + + UNIT FILE STATE + proc-sys-fs-binfmt_misc.automount static + dev-hugepages.mount static + dev-mqueue.mount static + proc-sys-fs-binfmt_misc.mount static + sys-fs-fuse-connections.mount static + sys-kernel-config.mount static + sys-kernel-debug.mount static + tmp.mount disabled + brandbot.path disabled + ..... + +#### 8. List all running units. #### + + # systemctl list-units + + UNIT LOAD ACTIVE SUB DESCRIPTION + proc-sys-fs-binfmt_misc.automount loaded active waiting Arbitrary Executable File Formats File Syste + sys-devices-pc...0-1:0:0:0-block-sr0.device loaded active plugged VBOX_CD-ROM + sys-devices-pc...:00:03.0-net-enp0s3.device loaded active plugged PRO/1000 MT Desktop Adapter + sys-devices-pc...00:05.0-sound-card0.device loaded active plugged 82801AA AC'97 Audio Controller + sys-devices-pc...:0:0-block-sda-sda1.device loaded active plugged VBOX_HARDDISK + sys-devices-pc...:0:0-block-sda-sda2.device loaded active plugged LVM PV Qzyo3l-qYaL-uRUa-Cjuk-pljo-qKtX-VgBQ8 + sys-devices-pc...0-2:0:0:0-block-sda.device loaded active plugged VBOX_HARDDISK + sys-devices-pl...erial8250-tty-ttyS0.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS0 + sys-devices-pl...erial8250-tty-ttyS1.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS1 + sys-devices-pl...erial8250-tty-ttyS2.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS2 + sys-devices-pl...erial8250-tty-ttyS3.device loaded active plugged /sys/devices/platform/serial8250/tty/ttyS3 + sys-devices-virtual-block-dm\x2d0.device loaded active plugged /sys/devices/virtual/block/dm-0 + sys-devices-virtual-block-dm\x2d1.device loaded active plugged /sys/devices/virtual/block/dm-1 + sys-module-configfs.device loaded active plugged /sys/module/configfs + ... + +#### 9. List all failed units. #### + + # systemctl --failed + + UNIT LOAD ACTIVE SUB DESCRIPTION + kdump.service loaded failed failed Crash recovery kernel arming + + LOAD = Reflects whether the unit definition was properly loaded. + ACTIVE = The high-level unit activation state, i.e. generalization of SUB. + SUB = The low-level unit activation state, values depend on unit type. + + 1 loaded units listed. Pass --all to see loaded but inactive units, too. + To show all installed unit files use 'systemctl list-unit-files'. + +#### 10. Check if a Unit (cron.service) is enabled or not?. #### + + # systemctl is-enabled crond.service + + enabled + +#### 11. Check whether a Unit or Service is running or not?. #### + + # systemctl status firewalld.service + + firewalld.service - firewalld - dynamic firewall daemon + Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled) + Active: active (running) since Tue 2015-04-28 16:27:55 IST; 34min ago + Main PID: 549 (firewalld) + CGroup: /system.slice/firewalld.service + └─549 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid + + Apr 28 16:27:51 tecmint systemd[1]: Starting firewalld - dynamic firewall daemon... + Apr 28 16:27:55 tecmint systemd[1]: Started firewalld - dynamic firewall daemon. + +### Control and Manage Services Using Systemctl ### + +#### 12. List all services (including enabled and disabled). #### + + # systemctl list-unit-files --type=service + + UNIT FILE STATE + arp-ethers.service disabled + auditd.service enabled + autovt@.service disabled + blk-availability.service disabled + brandbot.service static + collectd.service disabled + console-getty.service disabled + console-shell.service disabled + cpupower.service disabled + crond.service enabled + dbus-org.fedoraproject.FirewallD1.service enabled + .... + +#### 13. How do I start, restart, stop, reload and check the status of a service (httpd.service) in Linux. #### + + # systemctl start httpd.service + # systemctl restart httpd.service + # systemctl stop httpd.service + # systemctl reload httpd.service + # systemctl status httpd.service + + httpd.service - The Apache HTTP Server + Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled) + Active: active (running) since Tue 2015-04-28 17:21:30 IST; 6s ago + Process: 2876 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS) + Main PID: 2881 (httpd) + Status: "Processing requests..." + CGroup: /system.slice/httpd.service + ├─2881 /usr/sbin/httpd -DFOREGROUND + ├─2884 /usr/sbin/httpd -DFOREGROUND + ├─2885 /usr/sbin/httpd -DFOREGROUND + ├─2886 /usr/sbin/httpd -DFOREGROUND + ├─2887 /usr/sbin/httpd -DFOREGROUND + └─2888 /usr/sbin/httpd -DFOREGROUND + + Apr 28 17:21:30 tecmint systemd[1]: Starting The Apache HTTP Server... + Apr 28 17:21:30 tecmint httpd[2881]: AH00558: httpd: Could not reliably determine the server's fully q...ssage + Apr 28 17:21:30 tecmint systemd[1]: Started The Apache HTTP Server. + Hint: Some lines were ellipsized, use -l to show in full. + +**Note**: When we use commands like start, restart, stop and reload with systemctl, we will not get any output on the terminal, only status command will print the output. + +#### 14. How to active a service and enable or disable a service at boot time (auto start service at system boot). #### + + # systemctl is-active httpd.service + # systemctl enable httpd.service + # systemctl disable httpd.service + +#### 15. How to mask (making it impossible to start) or unmask a service (httpd.service). #### + + # systemctl mask httpd.service + ln -s '/dev/null' '/etc/systemd/system/httpd.service' + + # systemctl unmask httpd.service + rm '/etc/systemd/system/httpd.service' + +#### 16. How to a Kill a service using systemctl command. #### + + # systemctl kill httpd + # systemctl status httpd + + httpd.service - The Apache HTTP Server + Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled) + Active: failed (Result: exit-code) since Tue 2015-04-28 18:01:42 IST; 28min ago + Main PID: 2881 (code=exited, status=0/SUCCESS) + Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec" + + Apr 28 17:37:29 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:29 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:39 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:39 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:49 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:49 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:59 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 17:37:59 tecmint systemd[1]: httpd.service: Got notification message from PID 2881, but recepti...bled. + Apr 28 18:01:42 tecmint systemd[1]: httpd.service: control process exited, code=exited status=226 + Apr 28 18:01:42 tecmint systemd[1]: Unit httpd.service entered failed state. + Hint: Some lines were ellipsized, use -l to show in full. + +### Control and Manage Mount Points using Systemctl ### + +#### 17. List all system mount points. #### + + # systemctl list-unit-files --type=mount + + UNIT FILE STATE + dev-hugepages.mount static + dev-mqueue.mount static + proc-sys-fs-binfmt_misc.mount static + sys-fs-fuse-connections.mount static + sys-kernel-config.mount static + sys-kernel-debug.mount static + tmp.mount disabled + +#### 18. How do I mount, unmount, remount, reload system mount points and also check the status of mount points on the system. #### + + # systemctl start tmp.mount + # systemctl stop tmp.mount + # systemctl restart tmp.mount + # systemctl reload tmp.mount + # systemctl status tmp.mount + + tmp.mount - Temporary Directory + Loaded: loaded (/usr/lib/systemd/system/tmp.mount; disabled) + Active: active (mounted) since Tue 2015-04-28 17:46:06 IST; 2min 48s ago + Where: /tmp + What: tmpfs + Docs: man:hier(7) + + http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems + + Process: 3908 ExecMount=/bin/mount tmpfs /tmp -t tmpfs -o mode=1777,strictatime (code=exited, status=0/SUCCESS) + + Apr 28 17:46:06 tecmint systemd[1]: Mounting Temporary Directory... + Apr 28 17:46:06 tecmint systemd[1]: tmp.mount: Directory /tmp to mount over is not empty, mounting anyway. + Apr 28 17:46:06 tecmint systemd[1]: Mounted Temporary Directory. + +#### 19. How to active, enable or disable a mount point at boot time (auto mount at system boot). #### + + # systemctl is-active tmp.mount + # systemctl enable tmp.mount + # systemctl disable tmp.mount + +#### 20. How to mask (making it impossible to start) or unmask a mount points in Linux. #### + + # systemctl mask tmp.mount + + ln -s '/dev/null' '/etc/systemd/system/tmp.mount' + + # systemctl unmask tmp.mount + + rm '/etc/systemd/system/tmp.mount' + +### Control and Manage Sockets using Systemctl ### + +#### 21. List all available system sockets. #### + + # systemctl list-unit-files --type=socket + + UNIT FILE STATE + dbus.socket static + dm-event.socket enabled + lvm2-lvmetad.socket enabled + rsyncd.socket disabled + sshd.socket disabled + syslog.socket static + systemd-initctl.socket static + systemd-journald.socket static + systemd-shutdownd.socket static + systemd-udevd-control.socket static + systemd-udevd-kernel.socket static + + 11 unit files listed. + +#### 22. How do I start, restart, stop, reload and check the status of a socket (example: cups.socket) in Linux. #### + + # systemctl start cups.socket + # systemctl restart cups.socket + # systemctl stop cups.socket + # systemctl reload cups.socket + # systemctl status cups.socket + + cups.socket - CUPS Printing Service Sockets + Loaded: loaded (/usr/lib/systemd/system/cups.socket; enabled) + Active: active (listening) since Tue 2015-04-28 18:10:59 IST; 8s ago + Listen: /var/run/cups/cups.sock (Stream) + + Apr 28 18:10:59 tecmint systemd[1]: Starting CUPS Printing Service Sockets. + Apr 28 18:10:59 tecmint systemd[1]: Listening on CUPS Printing Service Sockets. + +#### 23. How to active a socket and enable or disable at boot time (auto start socket at system boot). #### + + # systemctl is-active cups.socket + # systemctl enable cups.socket + # systemctl disable cups.socket + +#### 24. How to mask (making it impossible to start) or unmask a socket (cups.socket). #### + + # systemctl mask cups.socket + ln -s '/dev/null' '/etc/systemd/system/cups.socket' + + # systemctl unmask cups.socket + rm '/etc/systemd/system/cups.socket' + +### CPU Utilization (Shares) of a Service ### + +#### 25. Get the current CPU Shares of a Service (say httpd). #### + + # systemctl show -p CPUShares httpd.service + + CPUShares=1024 + +**Note**: The default each service has a CPUShare = 1024. You may increase/decrease CPU share of a process. + +#### 26. Limit the CPU Share of a service (httpd.service) to 2000 CPUShares/ #### + + # systemctl set-property httpd.service CPUShares=2000 + # systemctl show -p CPUShares httpd.service + + CPUShares=2000 + +**Note**: When you set CPUShare for a service, a directory with the name of service is created (httpd.service.d) which contains a file 90-CPUShares.conf which contains the CPUShare Limit information. You may view the file as: + + # vi /etc/systemd/system/httpd.service.d/90-CPUShares.conf + + [Service] + CPUShares=2000 + +#### 27. Check all the configuration details of a service. #### + + # systemctl show httpd + + Id=httpd.service + Names=httpd.service + Requires=basic.target + Wants=system.slice + WantedBy=multi-user.target + Conflicts=shutdown.target + Before=shutdown.target multi-user.target + After=network.target remote-fs.target nss-lookup.target systemd-journald.socket basic.target system.slice + Description=The Apache HTTP Server + LoadState=loaded + ActiveState=active + SubState=running + FragmentPath=/usr/lib/systemd/system/httpd.service + .... + +#### 28. Analyze critical chain for a services(httpd). #### + + # systemd-analyze critical-chain httpd.service + + The time after the unit is active or started is printed after the "@" character. + The time the unit takes to start is printed after the "+" character. + + httpd.service +142ms + └─network.target @11.168s + └─network.service @9.456s +1.712s + └─NetworkManager.service @8.858s +596ms + └─firewalld.service @4.931s +3.926s + └─basic.target @4.916s + └─sockets.target @4.916s + └─dbus.socket @4.916s + └─sysinit.target @4.905s + └─systemd-update-utmp.service @4.864s +39ms + └─auditd.service @4.563s +301ms + └─systemd-tmpfiles-setup.service @4.485s +69ms + └─rhel-import-state.service @4.342s +142ms + └─local-fs.target @4.324s + └─boot.mount @4.286s +31ms + └─systemd-fsck@dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d196080964.service @4.092s +149ms + └─dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d196080964.device @4.092s + +#### 29. Get a list of dependencies for a services (httpd). #### + + # systemctl list-dependencies httpd.service + + httpd.service + ├─system.slice + └─basic.target + ├─firewalld.service + ├─microcode.service + ├─rhel-autorelabel-mark.service + ├─rhel-autorelabel.service + ├─rhel-configure.service + ├─rhel-dmesg.service + ├─rhel-loadmodules.service + ├─paths.target + ├─slices.target + │ ├─-.slice + │ └─system.slice + ├─sockets.target + │ ├─dbus.socket + .... + +#### 30. List control groups hierarchically. #### + + # systemd-cgls + + ├─1 /usr/lib/systemd/systemd --switched-root --system --deserialize 23 + ├─user.slice + │ └─user-0.slice + │ └─session-1.scope + │ ├─2498 sshd: root@pts/0 + │ ├─2500 -bash + │ ├─4521 systemd-cgls + │ └─4522 systemd-cgls + └─system.slice + ├─httpd.service + │ ├─4440 /usr/sbin/httpd -DFOREGROUND + │ ├─4442 /usr/sbin/httpd -DFOREGROUND + │ ├─4443 /usr/sbin/httpd -DFOREGROUND + │ ├─4444 /usr/sbin/httpd -DFOREGROUND + │ ├─4445 /usr/sbin/httpd -DFOREGROUND + │ └─4446 /usr/sbin/httpd -DFOREGROUND + ├─polkit.service + │ └─721 /usr/lib/polkit-1/polkitd --no-debug + .... + +#### 31. List control group according to CPU, memory, Input and Output. #### + + # systemd-cgtop + + Path Tasks %CPU Memory Input/s Output/s + + / 83 1.0 437.8M - - + /system.slice - 0.1 - - - + /system.slice/mariadb.service 2 0.1 - - - + /system.slice/tuned.service 1 0.0 - - - + /system.slice/httpd.service 6 0.0 - - - + /system.slice/NetworkManager.service 1 - - - - + /system.slice/atop.service 1 - - - - + /system.slice/atopacct.service 1 - - - - + /system.slice/auditd.service 1 - - - - + /system.slice/crond.service 1 - - - - + /system.slice/dbus.service 1 - - - - + /system.slice/firewalld.service 1 - - - - + /system.slice/lvm2-lvmetad.service 1 - - - - + /system.slice/polkit.service 1 - - - - + /system.slice/postfix.service 3 - - - - + /system.slice/rsyslog.service 1 - - - - + /system.slice/system-getty.slice/getty@tty1.service 1 - - - - + /system.slice/systemd-journald.service 1 - - - - + /system.slice/systemd-logind.service 1 - - - - + /system.slice/systemd-udevd.service 1 - - - - + /system.slice/webmin.service 1 - - - - + /user.slice/user-0.slice/session-1.scope 3 - - - - + +### Control System Runlevels ### + +#### 32. How to start system rescue mode. #### + + # systemctl rescue + + Broadcast message from root@tecmint on pts/0 (Wed 2015-04-29 11:31:18 IST): + + The system is going down to rescue mode NOW! + +#### 33. How to enter into emergency mode. #### + + # systemctl emergency + + Welcome to emergency mode! After logging in, type "journalctl -xb" to view + system logs, "systemctl reboot" to reboot, "systemctl default" to try again + to boot into default mode. + +#### 34. List current run levels in use. #### + + # systemctl get-default + + multi-user.target + +#### 35. How to start Runlevel 5 aka graphical mode. #### + + # systemctl isolate runlevel5.target + OR + # systemctl isolate graphical.target + +#### 36. How to start Runlevel 3 aka multiuser mode (commandline). #### + + # systemctl isolate runlevel3.target + OR + # systemctl isolate multiuser.target + +#### 36. How to set multiusermode or graphical mode as default runlevel. #### + + # systemctl set-default runlevel3.target + + # systemctl set-default runlevel5.target + +#### 37. How to reboot, halt, suspend, hibernate or put system in hybrid-sleep. #### + + # systemctl reboot + + # systemctl halt + + # systemctl suspend + + # systemctl hibernate + + # systemctl hybrid-sleep + +For those who may not be aware of runlevels and what it does. + +- Runlevel 0 : Shut down and Power off the system. +- Runlevel 1 : Rescue?Maintainance Mode. +- Runlevel 3 : multiuser, no-graphic system. +- Runlevel 4 : multiuser, no-graphic system. +- Runlevel 5 : multiuser, graphical system. +- Runlevel 6 : Shutdown and Reboot the machine. + +That’s all for now. Keep connected! Keep commenting. Don’t forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ + +作者:[Avishek Kumar][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/avishek/ \ No newline at end of file From 84547c330fd38dff45032c8016adf78be4a44738 Mon Sep 17 00:00:00 2001 From: robot-0 Date: Tue, 5 May 2015 19:06:44 +0800 Subject: [PATCH 0715/2517] [translating by createyuan] --- ...access a Linux server behind NAT via reverse SSH tunnel.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md index 44a4110203..d6a1df43c5 100644 --- a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md +++ b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md @@ -1,3 +1,5 @@ +translating by createyuan + How to access a Linux server behind NAT via reverse SSH tunnel ================================================================================ You are running a Linux server at home, which is behind a NAT router or restrictive firewall. Now you want to SSH to the home server while you are away from home. How would you set that up? SSH port forwarding will certainly be an option. However, port forwarding can become tricky if you are dealing with multiple nested NAT environment. Besides, it can be interfered with under various ISP-specific conditions, such as restrictive ISP firewalls which block forwarded ports, or carrier-grade NAT which shares IPv4 addresses among users. @@ -127,4 +129,4 @@ via: http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html [a]:http://xmodulo.com/author/nanni [1]:http://xmodulo.com/go/digitalocean [2]:http://xmodulo.com/how-to-enable-ssh-login-without.html -[3]:http://ask.xmodulo.com/install-autossh-linux.html \ No newline at end of file +[3]:http://ask.xmodulo.com/install-autossh-linux.html From d04d0f349342db72c1b698c1434fc41144e15614 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 5 May 2015 23:56:26 +0800 Subject: [PATCH 0716/2517] =?UTF-8?q?=E8=A1=A5=E5=85=85=E9=81=97=E6=BC=8F?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/published/201504/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md b/published/201504/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md index 1921514d8e..a725043f67 100644 --- a/published/201504/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md +++ b/published/201504/20150417 How to Install Linux Kernel 4.0 from Elrepo or Source on Ubuntu or CentOs.md @@ -10,12 +10,14 @@ #### 在 64位 Ubuntu 15.04 #### + $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-image-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_amd64.deb $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb #### 在 32位 Ubuntu 15.04 #### + $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-image-4.0.0-040000-generic_4.0.0-040000.201504121935_i386.deb $ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/linux-headers-4.0.0-040000-generic_4.0.0-040000.201504121935_i386.deb $ sudo dpkg -i linux-headers-4.0.0*.deb linux-image-4.0.0*.deb From 8b062b9b4de7a4b412106144017aa15bc1b06f90 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 6 May 2015 09:39:24 +0800 Subject: [PATCH 0717/2517] =?UTF-8?q?20150506-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...x bridge with Network Manager on Ubuntu.md | 96 ++++++++++ ...ult keyring to unlock on Ubuntu desktop.md | 55 ++++++ ...ll Shrew Soft IPsec VPN client on Linux.md | 97 ++++++++++ ...nswers--How to install autossh on Linux.md | 76 ++++++++ ...grep command with 14 different examples.md | 175 ++++++++++++++++++ 5 files changed, 499 insertions(+) create mode 100644 sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md create mode 100644 sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md create mode 100644 sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md create mode 100644 sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md create mode 100644 sources/tech/20150506 Linux grep command with 14 different examples.md diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md b/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md new file mode 100644 index 0000000000..8eac3a212d --- /dev/null +++ b/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md @@ -0,0 +1,96 @@ +Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu +================================================================================ +> **Question**: I need to set up a Linux bridge on my Ubuntu box to share a NIC with several other virtual machines or containers created on the box. I am currently using Network Manager on my Ubuntu, so preferrably I would like to configure a bridge using Network Manager. How can I do that? + +Network bridge is a hardware equipment used to interconnect two or more Layer-2 network segments, so that network devices on different segments can talk to each other. A similar bridging concept is needed within a Linux host, when you want to interconnect multiple VMs or Ethernet interfaces within a host. That is one use case of a software Linux bridge. + +There are several different ways to configure a Linux bridge. For example, in a headless server environment, you can use [brctl][1] to manually configure a bridge. In desktop environment, bridge support is available in Network Manager. Let's examine how to configure a bridge with Network Manager. + +### Requirement ### + +To avoid [any issue][2], it is recommended that you have Network Manager 0.9.9 and higher, which is the case for Ubuntu 15.04 and later. + + $ apt-cache show network-manager | grep Version + +---------- + + Version: 0.9.10.0-4ubuntu15.1 + Version: 0.9.10.0-4ubuntu15 + +### Create a Bridge ### + +The easiest way to create a bridge with Network Manager is via nm-connection-editor. This GUI tool allows you to configure a bridge in easy-to-follow steps. + +To start, invoke nm-connection-editor. + + $ nm-connection-editor + +The editor window will show you a list of currently configured network connections. Click on "Add" button in the top right to create a bridge. + +![](https://farm9.staticflickr.com/8781/17139502730_c3ca920f7f.jpg) + +Next, choose "Bridge" as a connection type. + +![](https://farm9.staticflickr.com/8873/17301102406_4f75133391_z.jpg) + +Now it's time to configure a bridge, including its name and bridged connection(s). With no other bridges created, the default bridge interface will be named bridge0. + +Recall that the goal of creating a bridge is to share your Ethernet interface via the bridge. So you need to add the Ethernet interface to the bridge. This is achieved by adding a new "bridged connection" in the GUI. Click on "Add" button. + +![](https://farm9.staticflickr.com/8876/17327069755_52f1d81f37_z.jpg) + +Choose "Ethernet" as a connection type. + +![](https://farm9.staticflickr.com/8832/17326664591_632a9001da_z.jpg) + +In "Device MAC address" field, choose the interface that you want to enslave into the bridge. In this example, assume that this interface is eth0. + +![](https://farm9.staticflickr.com/8842/17140820559_07a661f30c_z.jpg) + +Click on "General" tab, and enable both checkboxes that say "Automatically connect to this network when it is available" and "All users may connect to this network". + +![](https://farm8.staticflickr.com/7776/17325199982_801290e172_z.jpg) + +Save the change. + +Now you will see a new slave connection created in the bridge. + +![](https://farm8.staticflickr.com/7674/17119624667_6966b1147e_z.jpg) + +Click on "General" tab of the bridge, and make sure that top-most two checkboxes are enabled. + +![](https://farm8.staticflickr.com/7715/17301102276_4266a1e41d_z.jpg) + +Go to "IPv4 Settings" tab, and configure either DHCP or static IP address for the bridge. Note that you should use the same IPv4 settings as the enslaved Ethernet interface eth0. In this example, we assume that eth0 is configured via DHCP. Thus choose "Automatic (DHCP)" here. If eth0 is assigned a static IP address, you should assign the same IP address to the bridge. + +![](https://farm8.staticflickr.com/7737/17140820469_99955cf916_z.jpg) + +Finally, save the bridge settings. + +Now you will see an additional bridge connection created in "Network Connections" window. You no longer need a previously-configured wired connection for the enslaved interface eth0. So go ahead and delete the original wired connection. + +![](https://farm9.staticflickr.com/8700/17140820439_272a6d5c4e.jpg) + +At this point, the bridge connection will automatically be activated. You will momentarily lose a connection, since the IP address assigned to eth0 is taken over by the bridge. Once an IP address is assigned to the bridge, you will be connected back to your Ethernet interface via the bridge. You can confirm that by checking "Network" settings. + +![](https://farm8.staticflickr.com/7742/17325199902_9ceb67ddc1_c.jpg) + +Also, check the list of available interfaces. As mentioned, the bridge interface must have taken over whatever IP address was possessed by your Ethernet interface. + +![](https://farm8.staticflickr.com/7717/17327069605_6143f1bd6a_b.jpg) + +That's it, and now the bridge is ready to use! + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/configure-linux-bridge-network-manager-ubuntu.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://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-configure-linux-bridge-interface.html +[2]:https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1273201 \ No newline at end of file diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md b/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md new file mode 100644 index 0000000000..2034bdca7b --- /dev/null +++ b/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md @@ -0,0 +1,55 @@ +Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop +================================================================================ +> **Question**: When I boot up my Ubuntu desktop, a pop up dialog appears, asking me to enter a password to unlock default keyring. How can I disable this "unlock default keyring" pop up window, and automatically unlock my keyring? + +A keyring is thought of as a local database that stores your login information in encrypted forms. Various desktop applications (e.g., browsers, email clients) use a keyring to store and manage your login credentials, secrets, passwords, certificates, or keys securely. For those applications to retrieve the information stored in a keyring, the keyring needs to be unlocked. + +GNOME keyring used by Ubuntu desktop is integrated with desktop login, and the keyring is automatically unlocked when you authenticate into your desktop. But your default keyring can remain "locked" if you set up automatic desktop login or wake up from hibernation. In this case, you will be prompted: + +> "Enter password for keyring 'Default keyring' to unlock. An application wants to access to the keyring 'Default keyring,' but it is locked." + +![](https://farm9.staticflickr.com/8787/16716456754_309c39513c_o.png) + +If you want to avoid typing a password to unlock your default keyring every time such a pop-up dialog appears, here is how you can do it. + +Before doing that, understand the implication of disabling the password prompt. By automatically unlocking the default keyring, you will make your keyring (and any information stored in the keyring) accessible to anyone who uses your desktop, without them having to know your password. + +### Disable Password for Unlocking Default Keyring ### + +Open up Dash, and type "password" to launch "Passwords and Keys" app. + +![](https://farm8.staticflickr.com/7709/17312949416_ed9c4fbe2d_b.jpg) + +Alternatively, use the seahorse command to launch the GUI from the command line. + + $ seahorse + +On the left side panel, right-click on the "Default keyring," and choose "Change Password." + +![](https://farm8.staticflickr.com/7740/17159959750_ba5b675b00_b.jpg) + +Type your current login password. + +![](https://farm8.staticflickr.com/7775/17347551135_ce09260818_b.jpg) + +Leave a new password for the "Default" keyring as blank. + +![](https://farm8.staticflickr.com/7669/17345663222_c9334c738b_c.jpg) + +Click on "Continue" button to confirm to store passwords unencrypted. + +![](https://farm8.staticflickr.com/7761/17152692309_ce3891a0d9_c.jpg) + +That's it. From now on, you won't be prompted to unlock the default keyring. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/disable-entering-password-unlock-default-keyring.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://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md b/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md new file mode 100644 index 0000000000..24c09c85bd --- /dev/null +++ b/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md @@ -0,0 +1,97 @@ +Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux +================================================================================ +> **Question**: I need to connect to an IPSec VPN gateway. For that, I'm trying to use Shrew Soft VPN client, which is available for free. How can I install Shrew Soft VPN client on [insert your Linux distro]? + +There are many commercial VPN gateways available, which come with their own proprietary VPN client software. While there are also open-source VPN server/client alternatives, they are typically lacking in sophisticated IPsec support, such as Internet Key Exchange (IKE) which is a standard IPsec protocol used to secure VPN key exchange and authentication. Shrew Soft VPN is a free IPsec VPN client supporting a number of authentication methods, key exchange, encryption and firewall traversal options. + +Here is how you can install Shrew Soft VPN client on Linux platforms. + +First, download its source code from the [official website][1]. + +### Install Shrew VPN Client on Debian, Ubuntu or Linux Mint ### + +Shrew Soft VPN client GUI requires Qt 4.x. So you will need to install its development files as part of dependencies. + + $ sudo apt-get install cmake libqt4-core libqt4-dev libqt4-gui libedit-dev libssl-dev checkinstall flex bison + $ wget https://www.shrew.net/download/ike/ike-2.2.1-release.tbz2 + $ tar xvfvj ike-2.2.1-release.tbz2 + $ cd ike + $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES . + $ make + $ sudo make install + $ cd /etc/ + $ sudo mv iked.conf.sample iked.conf + +### Install Shrew VPN Client on CentOS, Fedora or RHEL ### + +Similar to Debian based systems, you will need to install a number of dependencies including Qt4 before compiling it. + + $ sudo yum install qt-devel cmake gcc-c++ openssl-devel libedit-devel flex bison + $ wget https://www.shrew.net/download/ike/ike-2.2.1-release.tbz2 + $ tar xvfvj ike-2.2.1-release.tbz2 + $ cd ike + $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES . + $ make + $ sudo make install + $ cd /etc/ + $ sudo mv iked.conf.sample iked.conf + +On Red Hat based systems, one last step is to open /etc/ld.so.conf with a text editor, and add the following line. + + $ sudo vi /etc/ld.so.conf + +---------- + + include /usr/lib/ + +Reload run-time bindings of shared libraries to incorporate newly installed shared libraries: + + $ sudo ldconfig + +### Launch Shrew VPN Client ### + +First launch IKE daemon (iked). This daemon speaks the IKE protocol to communicate with a remote host over IPSec as a VPN client. + + $ sudo iked + +![](https://farm9.staticflickr.com/8685/17175688940_59c2db64c9_b.jpg) + +Now start qikea which is an IPsec VPN client front end. This GUI application allows you to manage remote site configurations and to initiate VPN connections. + +![](https://farm8.staticflickr.com/7750/16742992713_eed7f97939_b.jpg) + +To create a new VPN configuration, click on "Add" button, and fill out VPN site configuration. Once you create a configuration, you can initiate a VPN connection simply by clicking on the configuration. + +![](https://farm8.staticflickr.com/7725/17337297056_3d38dc2180_b.jpg) + +### Troubleshooting ### + +1. I am getting the following error while running iked. + + iked: error while loading shared libraries: libss_ike.so.2.2.1: cannot open shared object file: No such file or directory + +To solve this problem, you need to update the dynamic linker to incorporate libss_ike library. For that, add to /etc/ld.so.conf the path where the library is located (e.g., /usr/lib), and then run ldconfig command. + + $ sudo ldconfig + +Verify that libss_ike is added to the library path: + + $ ldconfig -p | grep ike + +---------- + + libss_ike.so.2.2.1 (libc6,x86-64) => /lib/libss_ike.so.2.2.1 + libss_ike.so (libc6,x86-64) => /lib/libss_ike.so + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-shrew-soft-ipsec-vpn-client-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://ask.xmodulo.com/author/nanni +[1]:https://www.shrew.net/download/ike \ No newline at end of file diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md b/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md new file mode 100644 index 0000000000..0660b8d621 --- /dev/null +++ b/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md @@ -0,0 +1,76 @@ +Linux FAQs with Answers--How to install autossh on Linux +================================================================================ +> **Question**: I would like to install autossh on [insert your Linux distro]. How can I do that? + +[autossh][1] is an open-source tool that allows you to monitor an SSH session and restart it automatically should it gets disconnected or stops forwarding traffic. autossh assumes that [passwordless SSH login][2] for a destination host is already setup, so that it can restart a broken SSH session without user's involvement. + +autossh comes in handy when you want to set up [reverse SSH tunnels][3] or [mount remote folders over SSH][4]. Essentially in any situation where persistent SSH sessions are required, autossh can be useful. + +![](https://farm8.staticflickr.com/7786/17150854870_63966e78bc_c.jpg) + +Here is how to install autossh on various Linux distributions. + +### Install Autossh on Debian or Ubuntu ### + +autossh is available in base repositories of Debian based systems, so installation is easy. + + $ sudo apt-get install autossh + +### Install Autossh on Fedora ### + +Fedora repositories also carry autossh package. So simply use yum command. + + $ sudo yum install autossh + +### Install Autossh on CentOS or RHEL ### + +For CentOS/RHEL 6 or earlier, enable [Repoforge repository][5] first, and then use yum command. + + $ sudo yum install autossh + +For CentOS/RHEL 7, autossh is no longer available in Repoforge repository. You will need to build it from the source (explained below). + +### Install Autossh on Arch Linux ### + + $ sudo pacman -S autossh + +### Compile Autossh from the Source on Debian or Ubuntu ### + +If you would like to try the latest version of autossh, you can build it from the source as follows. + + $ sudo apt-get install gcc make + $ wget http://www.harding.motd.ca/autossh/autossh-1.4e.tgz + $ tar -xf autossh-1.4e.tgz + $ cd autossh-1.4e + $ ./configure + $ make + $ sudo make install + +### Compile Autossh from the Source on CentOS, Fedora or RHEL ### + +On CentOS/RHEL 7, autossh is not available as a pre-built package. So you'll need to compile it from the source as follows. + + $ sudo yum install wget gcc make + $ wget http://www.harding.motd.ca/autossh/autossh-1.4e.tgz + $ tar -xf autossh-1.4e.tgz + $ cd autossh-1.4e + $ ./configure + $ make + $ sudo make install + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-autossh-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://ask.xmodulo.com/author/nanni +[1]:http://www.harding.motd.ca/autossh/ +[2]:http://xmodulo.com/how-to-enable-ssh-login-without.html +[3]:http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html +[4]:http://xmodulo.com/how-to-mount-remote-directory-over-ssh-on-linux.html +[5]:http://xmodulo.com/how-to-set-up-rpmforge-repoforge-repository-on-centos.html \ No newline at end of file diff --git a/sources/tech/20150506 Linux grep command with 14 different examples.md b/sources/tech/20150506 Linux grep command with 14 different examples.md new file mode 100644 index 0000000000..006a042bc5 --- /dev/null +++ b/sources/tech/20150506 Linux grep command with 14 different examples.md @@ -0,0 +1,175 @@ +Linux grep command with 14 different examples +================================================================================ +### Overview : ### + +Linux like operating system provides a searching tool known as **grep (global regular expression print)**. grep command is useful for searching the content of one more files based on the pattern. A pattern may be a single character, bunch of characters, single word or a sentence. + +When we execute the grep command with specified pattern, if its is matched, then it will display the line of file containing the pattern without modifying the contents of existing file. + +In this tutorial we will discuss 14 different examples of grep command + +### Example:1 Search the pattern (word) in a file ### + +Search the “linuxtechi” word in the file /etc/passwd file + + root@Linux-world:~# grep linuxtechi /etc/passwd + linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +### Example:2 Search the pattern in the multiple files. ### + + root@Linux-world:~# grep linuxtechi /etc/passwd /etc/shadow /etc/gshadow + /etc/passwd:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + /etc/shadow:linuxtechi:$6$DdgXjxlM$4flz4JRvefvKp0DG6re:16550:0:99999:7:::/etc/gshadow:adm:*::syslog,linuxtechi + /etc/gshadow:cdrom:*::linuxtechi + /etc/gshadow:sudo:*::linuxtechi + /etc/gshadow:dip:*::linuxtechi + /etc/gshadow:plugdev:*::linuxtechi + /etc/gshadow:lpadmin:!::linuxtechi + /etc/gshadow:linuxtechi:!:: + /etc/gshadow:sambashare:!::linuxtechi + root@Linux-world:~# + +### Example:3 List the name of those files which contain a specified pattern using -l option. ### + + root@Linux-world:~# grep -l linuxtechi /etc/passwd /etc/shadow /etc/fstab /etc/mtab + /etc/passwd + /etc/shadow + root@Linux-world:~# + +### Example:4 Search the pattern in the file along with associated line number(s) using the -n option ### + + root@Linux-world:~# grep -n linuxtechi /etc/passwd + 39:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +root@Linux-world:~# grep -n root /etc/passwd /etc/shadow + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-n-root.jpg) + +### Example:5 Print the line excluding the pattern using -v option ### + +List all the lines of the file /etc/passwd that does not contain specific word “linuxtechi”. + + root@Linux-world:~# grep -v linuxtechi /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-v-option.jpg) + +### Example:6 Display all the lines that starts with specified pattern using ^ symbol ### + +Bash shell treats carrot symbol (^) as a special character which marks the beginning of line or a word. Let’s display the lines which starts with “root” word in the file /etc/passwd. + + root@Linux-world:~# grep ^root /etc/passwd + root:x:0:0:root:/root:/bin/bash + root@Linux-world:~# + +### Example: 7 Display all the lines that ends with specified pattern using $ symbol. ### + +List all the lines of /etc/passwd that ends with “bash” word. + + root@Linux-world:~# grep bash$ /etc/passwd + root:x:0:0:root:/root:/bin/bash + linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +Bash shell treats dollar ($) symbol as a special character which marks the end of line or word. + +### Example:8 Search the pattern recursively using -r option ### + + root@Linux-world:~# grep -r linuxtechi /etc/ + /etc/subuid:linuxtechi:100000:65536 + /etc/group:adm:x:4:syslog,linuxtechi + /etc/group:cdrom:x:24:linuxtechi + /etc/group:sudo:x:27:linuxtechi + /etc/group:dip:x:30:linuxtechi + /etc/group:plugdev:x:46:linuxtechi + /etc/group:lpadmin:x:115:linuxtechi + /etc/group:linuxtechi:x:1000: + /etc/group:sambashare:x:131:linuxtechi + /etc/passwd-:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + /etc/passwd:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + ............................................................................ + +Above command will search linuxtechi in the “/etc” directory recursively. + +### Example:9 Search all the empty or blank lines of a file using grep ### + + root@Linux-world:~# grep ^$ /etc/shadow + root@Linux-world:~# + +As there is no empty line in /etc/shadow file , so nothing is displayed. + +### Example:10 Search the pattern using ‘grep -i’ option. ### + +-i option in the grep command ignores the letter case i.e it will ignore upper case or lower case letters while searching + +Lets take an example , i want to search “LinuxTechi” word in the passwd file. + + nextstep4it@localhost:~$ grep -i LinuxTechi /etc/passwd + linuxtechi:x:1001:1001::/home/linuxtechi:/bin/bash + nextstep4it@localhost:~$ + +### Example:11 Search multiple patterns using -e option ### + +For example i want to search ‘linuxtechi’ and ‘root’ word in a single grep command , then using -e option we can search multiple patterns . + + root@Linux-world:~# grep -e "linuxtechi" -e "root" /etc/passwd + root:x:0:0:root:/root:/bin/bash + linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +### Example:12 Getting Search pattern from a file using “grep -f” ### + +First create a search pattern file “grep_pattern” in your current working directory. In my case i have put the below contents. + + root@Linux-world:~# cat grep_pattern + ^linuxtechi + root + false$ + root@Linux-world:~# + +Now try to search using grep_pattern file. + + root@Linux-world:~# grep -f grep_pattern /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-f-option.jpg) + +### Example:13 Count the number of matching patterns using -c option ### + +Let take the above example , we can count the number of matching patterns using -c option in grep command. + + root@Linux-world:~# grep -c -f grep_pattern /etc/passwd + 22 + root@Linux-world:~# + +### Example:14 Display N number of lines before & after pattern matching ### + +a) Display Four lines before patten matching using -B option + + root@Linux-world:~# grep -B 4 "games" /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-B-option.jpg) + +b) Display Four lines after pattern matching using -A option + + root@Linux-world:~# grep -A 4 "games" /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-A-option.jpg) + +c) Display Four lines around the pattern matching using -C option + + root@Linux-world:~# grep -C 4 "games" /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-C-option.jpg) + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/linux-grep-command-with-14-different-examples/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file From 55f34d60eb2b23fa70201c30e9f958d930628a01 Mon Sep 17 00:00:00 2001 From: VicYu Date: Wed, 6 May 2015 10:14:06 +0800 Subject: [PATCH 0718/2517] Translated --- ...nfigure PCI-passthrough on virt-manager.md | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md b/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md index 4703e96d38..0344095bc2 100644 --- a/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md +++ b/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md @@ -1,38 +1,37 @@ -Vic020 - -Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager +Linux有问必答:如何在虚拟机上配置PCI-passthrough ================================================================================ -> **Question**: I would like to dedicate a physical network interface card to one of my guest VMs created by KVM. For that, I am trying to enable PCI passthrough of the NIC for the VM. How can I add a PCI device to a guest VM with PCI passthrough on virt-manager? +> **提问**:我想要设置一块物理网卡到用KVM创建的虚拟机上。我打算开启网卡的PCI passthrough给这台虚拟机。请问,我如何才能增加一个PCI设备通过PCI直通到虚拟机上? -Modern hypervisors enable efficient resource sharing among multiple guest operating systems by virtualizing and emulating hardware resources. However, such virtualized resource sharing may not always be desirable, or even should be avoided when VM performance is a great concern, or when a VM requires full DMA control of a hardware device. One technique used in this case is so-called "PCI passthrough," where a guest VM is granted an exclusive access to a PCI device (e.g., network/sound/video card). Essentially, PCI passthrough bypasses the virtualization layer, and directly exposes a PCI device to a VM. No other VM can access the PCI device. +如今的hypervisor能够高效地在多个虚拟操作系统分享和模拟硬件资源。然而,虚拟资源分享,虚拟机的性能,或者是虚拟机需要硬件DMA的完全控制,不是总能使人满意。一项名叫“PCI passthrough”的技术可以用在一个虚拟机需要独享PCI设备时(例如:network/sound/video card)。本质上,PCI passthrough越过了虚拟层,直接扩展PCI设备到虚拟机。但是其他虚拟机不能同时共享。 -### Requirement for Enabling PCI Passthrough ### -If you want to enable PCI passthrough for an HVM guest (e.g., a fully-virtualized VM created by KVM), your system (both CPU and motherboard) must meet the following requirement. If your VM is paravirtualized (created by Xen), you can skip this step. +### 开启“PCI Passthrough”的准备 ### -In order to enable PCI passthrough for an HVM guest VM, your system must support **VT-d** (for Intel processors) or **AMD-Vi** (for AMD processors). Intel's VT-d ("Intel Virtualization Technology for Directed I/O") is available on most high-end Nehalem processors and its successors (e.g., Westmere, Sandy Bridge, Ivy Bridge). Note that VT-d and VT-x are two independent features. A list of Intel/AMD processors with VT-d/AMD-Vi capability can be found [here][1]. +如果你想要为一台HVM实例开启PCI passthrough(例如,一台KVM创建的full虚拟机),你的母系统(包括CPU和主板)必须满足以下条件。但是如果你的虚拟机是para-V(由Xen创建),你可以挑过这步。 -After you verify that your host hardware supports VT-d/AMD-Vi, you then need to do two things on your system. First, make sure that VT-d/AMD-Vi is enabled in system BIOS. Second, enable IOMMU on your kernel during booting. The IOMMU service, which is provided by VT-d,/AMD-Vi, protects host memory access by a guest VM, and is a requirement for PCI passthrough for fully-virtualized guest VMs. +为了开启PCI passthrough,系统需要支持**VT-d** (Intel处理器)或者**AMD-Vi** (AMD处理器)。Intel的VT-D(“英特尔虚拟化技术支持直接I/ O”)是适用于最高端的Nehalem处理器和它的后继者(例如,Westmere、Sandy Bridge的,Ivy Bridge)。注意:VT-d和VT-x是两个独立功能。intel/AMD处理器支持VT-D/AMD-VI功能的列表可以[点击这里][1]。 -To enable IOMMU on the kernel for Intel processors, pass "**intel_iommu=on**" boot parameter on your Linux. Follow [this tutorial][2] to find out how to add a kernel boot parameter via GRUB. +完成验证你的设备支持VT-d/AMD-Vi后,还有两件事情需要做。首先,确保VT-d/AMD-Vi已经在BIOS中开启。然后,在内核启动过程中开启IOMMU。IOMMU服务,是VT-d,/AMD-Vi提供,可以保护虚拟机访问的主机内存,同时它也是full虚拟机支持PCI passthrough的前提。 -After configuring the boot parameter, reboot your host. +Intel处理器中,内核开启IOMMU通过在启动参数中修改“**intel_iommu=on**”。参看[这篇教程][2]获得如何通过GRUB修改内核启动参数。 -### Add a PCI Device to a VM on Virt-Manager ### +配置完成启动参数后,重启电脑。 -Now we are ready to enable PCI passthrough. In fact, assigning a PCI device to a guest VM is straightforward on virt-manager. +### 添加PCI设备到虚拟机 ### -Open the VM's settings on virt-manager, and click on "Add Hardware" button on the left sidebar. +我们已经完成了开启PCI Passthrough的准备。事实上,只需通过虚拟机管理就可以给虚拟机分配一个PCI设备。 -Choose a PCI device to assign from a PCI device list, and click on "Finish" button. +打开虚拟机设置,在左边工具栏点击‘增加硬件’按钮。 + +选择从PCI设备表一个PCI设备来分配,点击“完成”按钮 ![](https://farm8.staticflickr.com/7587/17015584385_db49e96372_c.jpg) -Finally, power on the guest. At this point, the host PCI device should be directly visible inside the guest VM. +最后,开启实例。目前为止,主机的PCI设备已经可以由虚拟机直接访问了。 -### Troubleshooting ### +### 常见问题 ### -If you see either of the following errors while powering on a guest VM, the error may be because VT-d (or IOMMU) is not enabled on your host. +在虚拟机启动时,如果你看见下列任何一个错误,这个错误有可能由于母机VT-d (或 IOMMU)未开启导致。 Error starting domain: unsupported configuration: host doesn't support passthrough of host PCI devices @@ -40,14 +39,14 @@ If you see either of the following errors while powering on a guest VM, the erro Error starting domain: Unable to read from monitor: Connection reset by peer -Make sure that "**intel_iommu=on**" boot parameter is passed to the kernel during boot as described above. +请确保"**intel_iommu=on**"启动参数已经按上文叙述开启。 -------------------------------------------------------------------------------- via: http://ask.xmodulo.com/pci-passthrough-virt-manager.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Vic020/VicYu](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b8da2cfdd5c405834ede5aa2d28fdb080219d878 Mon Sep 17 00:00:00 2001 From: VicYu Date: Wed, 6 May 2015 10:18:36 +0800 Subject: [PATCH 0719/2517] Moved --- ...h Answers--How to configure PCI-passthrough on virt-manager.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md (100%) diff --git a/sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md b/translated/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md similarity index 100% rename from sources/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md rename to translated/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md From 644da85fd450329f50b3433aeb8aeb31bf317e6b Mon Sep 17 00:00:00 2001 From: VicYu Date: Wed, 6 May 2015 10:22:13 +0800 Subject: [PATCH 0720/2517] Update 20150506 Linux FAQs with Answers--How to install autossh on Linux.md --- ...inux FAQs with Answers--How to install autossh on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md b/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md index 0660b8d621..97814b2288 100644 --- a/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md +++ b/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md @@ -1,3 +1,5 @@ + Vic020 + Linux FAQs with Answers--How to install autossh on Linux ================================================================================ > **Question**: I would like to install autossh on [insert your Linux distro]. How can I do that? @@ -73,4 +75,4 @@ via: http://ask.xmodulo.com/install-autossh-linux.html [2]:http://xmodulo.com/how-to-enable-ssh-login-without.html [3]:http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html [4]:http://xmodulo.com/how-to-mount-remote-directory-over-ssh-on-linux.html -[5]:http://xmodulo.com/how-to-set-up-rpmforge-repoforge-repository-on-centos.html \ No newline at end of file +[5]:http://xmodulo.com/how-to-set-up-rpmforge-repoforge-repository-on-centos.html From 0baeff71655a6108456f1e9c5a0c8f8841b60025 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 6 May 2015 10:28:32 +0800 Subject: [PATCH 0721/2517] =?UTF-8?q?20150506-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Step Guide for Learning Shell Scripting.md | 459 ++++++++++++++++++ ...tore Passwords and Api Keys Using Vault.md | 167 +++++++ ...w to Setup OpenERP (Odoo) on CentOS 7.x.md | 112 +++++ 3 files changed, 738 insertions(+) create mode 100644 sources/tech/20150506 First Step Guide for Learning Shell Scripting.md create mode 100644 sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md create mode 100644 sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md diff --git a/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md b/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md new file mode 100644 index 0000000000..8af4ef03e8 --- /dev/null +++ b/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md @@ -0,0 +1,459 @@ +First Step Guide for Learning Shell Scripting +================================================================================ +![](http://blog.linoxide.com/wp-content/uploads/2015/04/myfirstshellscript.jpg) + +Usually when people say "shell scripting" they have on mind bash, ksh, sh, ash or similar linux/unix scripting language. Scripting is another way to communicate with computer. Using graphic windows interface (not matter windows or linux) user can move mouse and clicking on the various objects like, buttons, lists, check boxes and so on. But it is very inconvenient way witch requires user participation and accuracy each time he would like to ask computer / server to do the same tasks (lets say to convert photos or download new movies, mp3 etc). To make all these things easy accessible and automated we could use shell scripts. + +Some programming languages like pascal, foxpro, C, java needs to be compiled before they could be executed. They needs appropriate compiler to make our code to do some job. + +Another programming languages like php, javascript, visualbasic do not needs compiler. So they need interpretersand we could run our program without compiling the code. + +The shell scripts is also like interpreters, but it is usually used to call external compiled programs. Then captures the outputs, exit codes and act accordingly. + +One of the most popular shell scripting language in the linux world is the bash. And i think (this is my own opinion) this is because bash shell allows user easily navigate through the history commands (previously executed) by default, in opposite ksh which requires some tuning in .profile or remember some "magic" key combination to walk through history and amend commands. + +Ok, i think this is enough for introduction and i leaving for your judge which environment is most comfortable for you. Since now i will speak only about bash and scripting. In the following examples i will use the CentOS 6.6 and bash-4.1.2. Just make sure you have the same or greater version. + +### Shell Script Streams ### + +The shell scripting it is something similar to conversation of several persons. Just imagine that all command like the persons who able to do something if you properly ask them. Lets say you would like to write the document. First of all you need the paper, then you need to say the content to someone to write it, and finally you would like to store it somewhere. Or you would like build a house, so you will ask appropriate persons to cleanup the space. After they say "its done" then other engineers could build for you the walls. And finally, when engineers also tell "Its done" you can ask the painters to color your house. And what would happen if you ask the painters coloring your walls before they are built? I think they will start to complain. Almost all commands like the persons could speak and if they did its job without any issues they speaks to "standard output". If they can't to what you asking - they speaking to the "standard error". So finally all commands listening for you through "standard input". + +Quick example- when you opening linux terminal and writing some text - you speaking to bash through "standard input". So ask the bash shell **who am i** + + root@localhost ~]# who am i <--- you speaking through the standard input to bash shell + root pts/0 2015-04-22 20:17 (192.168.1.123) <--- bash shell answering to you through the standard output + +Now lets ask something that bash will not understand us: + + [root@localhost ~]# blablabla <--- and again, you speaking through standard input + -bash: blablabla: command not found <--- bash complaining through standard error + +The first word before ":" usually is the command which complaining to you. Actually each of these streams has their own index number: + +- standard input (**stdin**) - 0 +- standard output (**stdout**) - 1 +- standard error (**stderr**) - 2 + +If you really would like to know to witch output command said something - you need to redirect (to use "greater than ">" symbol after command and stream index) that speech to file: + + [root@localhost ~]# blablabla 1> output.txt + -bash: blablabla: command not found + +In this example we tried to redirect 1 (**stdout**) stream to file named output.txt. Lets look does to the content of that file. We use the command cat for that: + + [root@localhost ~]# cat output.txt + [root@localhost ~]# + +Seams that is empty. Ok now lets try to redirect 2 (**stderr**) streem: + + [root@localhost ~]# blablabla 2> error.txt + [root@localhost ~]# + +Ok, we see that complains gone. Lets chec the file: + + [root@localhost ~]# cat error.txt + -bash: blablabla: command not found + [root@localhost ~]# + +Exactly! We see that all complains was recorded to the errors.txt file. + +Sometimes commands produces **stdout** and **stderr** simultaniously. To redirect them to separate files we can use the following syntax: + + command 1>out.txt 2>err.txt + +To shorten this syntax a bit we can skip the "1" as by default the **stdout** stream will be redirected: + + command >out.txt 2>err.txt + +Ok, lets try to do something "bad". lets remove the file1 and folder1 with the rm command: + + [root@localhost ~]# rm -vf folder1 file1 > out.txt 2>err.txt + +Now check our output files: + + [root@localhost ~]# cat out.txt + removed `file1' + [root@localhost ~]# cat err.txt + rm: cannot remove `folder1': Is a directory + [root@localhost ~]# + +As we see the streams was separated to different files. Sometimes it is not handy as usually we want to see the sequence when the errors appeared - before or after some actions. For that we can redirect both streams to the same file: + + command >>out_err.txt 2>>out_err.txt + +Note : Please notice that i use ">>" instead of ">". It allows us to append file instead of overwrite. + +We can redirect one stream to another: + + command >out_err.txt 2>&1 + +Let me explain. All stdout of the command will be redirected to the out_err.txt. The errout will be redirected to the 1-st stream which (as i already explained above) will be redirected to the same file. Let see the example: + + [root@localhost ~]# rm -fv folder2 file2 >out_err.txt 2>&1 + [root@localhost ~]# cat out_err.txt + rm: cannot remove `folder2': Is a directory + removed `file2' + [root@localhost ~]# + +Looking at the combined output we can state that first of all **rm** command tried to remove the folder2 and it was not success as linux require the **-r** key for **rm** command to allow remove folders. At the second the file2 was removed. By providing the **-v** (verbose) key for the **rm** command we asking rm command to inform as about each removed file or folder. + +This is almost all you need to know about redirection. I say almost, because there is one more very important redirection which called "piping". By using | (pipe) symbol we usually redirecting **stdout** streem. + +Lets say we have the text file: + + [root@localhost ~]# cat text_file.txt + This line does not contain H e l l o word + This lilne contains Hello + This also containd Hello + This one no due to HELLO all capital + Hello bash world! + +and we need to find the lines in it with the words "Hello". Linux has the **grep** command for that: + + [root@localhost ~]# grep Hello text_file.txt + This lilne contains Hello + This also containd Hello + Hello bash world! + [root@localhost ~]# + +This is ok when we have file and would like to sech in it. But what to do if we need to find something in the output of another command? Yes, of course we can redirect the output to the file and then look in it: + + [root@localhost ~]# fdisk -l>fdisk.out + [root@localhost ~]# grep "Disk /dev" fdisk.out + Disk /dev/sda: 8589 MB, 8589934592 bytes + Disk /dev/mapper/VolGroup-lv_root: 7205 MB, 7205814272 bytes + Disk /dev/mapper/VolGroup-lv_swap: 855 MB, 855638016 bytes + [root@localhost ~]# + +If you going to grep something with white spaces embrace that with " quotes! + +Note : fdisk command shows information about Linux OS disk drives + +As we see this way is not very handy as soon we will mess the space with temporary files. For that we can use the pipes. They allow us redirect one command **stdout** to another command **stdin** streams: + + [root@localhost ~]# fdisk -l | grep "Disk /dev" + Disk /dev/sda: 8589 MB, 8589934592 bytes + Disk /dev/mapper/VolGroup-lv_root: 7205 MB, 7205814272 bytes + Disk /dev/mapper/VolGroup-lv_swap: 855 MB, 855638016 bytes + [root@localhost ~]# + +As we see, we get the same result without any temporary files. We have redirected **frisk stdout** to the **grep stdin**. + +**Note** : Pipe redirection is always from left to right. + +There are several other redirections but we will speak about them later. + +### Displaying custom messages in the shell ### + +As we already know usually communication with and within shell is going as dialog. So lets create some real script which also will speak with us. It will allow you to learn some simple commands and better understand the scripting concept. + +Imagine we are working in some company as help desk manager and we would like to create some shell script to register the call information: phone number, User name and brief description about issue. We going to store it in the plain text file data.txt for future statistics. Script it self should work in dialog way to make live easy for help desk workers. So first of all we need to display the questions. For displaying any messages there is echo and printf commands. Both of them displaying messages, but printf is more powerful as we can nicely form output to align it to the right, left or leave dedicated space for message. Lets start from simple one. For file creation please use your favorite text editor (kate, nano, vi, ...) and create the file named note.sh with the command inside: + + echo "Phone number ?" + +### Script execution ### + +After you have saved the file we can run it with bash command by providing our file as an argument: + + [root@localhost ~]# bash note.sh + Phone number ? + +Actually to use this way for script execution is not handy. It would be more comfortable just execute the script without any **bash** command as a prefix. To make it executable we can use **chmod** command: + + [root@localhost ~]# ls -la note.sh + -rw-r--r--. 1 root root 22 Apr 23 20:52 note.sh + [root@localhost ~]# chmod +x note.sh + [root@localhost ~]# ls -la note.sh + -rwxr-xr-x. 1 root root 22 Apr 23 20:52 note.sh + [root@localhost ~]# + +![set permission script file](http://blog.linoxide.com/wp-content/uploads/2015/04/Capture.png) + +**Note** : ls command displays the files in the current folder. By adding the keys -la it will display a bit more information about files. + +As we see, before **chmod** command execution, script has only read (r) and write (w) permissions. After **chmod +x** it got execute (x) permissions. (More details about permissions i am going to describe in next article.) Now we can simply run it: + + [root@localhost ~]# ./note.sh + Phone number ? + +Before script name i have added ./ combination. . (dot) in the unix world means current position (current folder), the / (slash) is the folder separator. (In Windows OS we use \ (backslash) for the same). So whole this combination means: "from the current folder execute the note.sh script". I think it will be more clear for you if i run this script with full path: + + [root@localhost ~]# /root/note.sh + Phone number ? + [root@localhost ~]# + +It also works. + +Everything would be ok if all linux users would have the same default shell. If we simply execute this script default user shell will be used to parse script content and run the commands. Different shells have a bit different syntax, internal commands, etc. So to guarantee the **bash** will be used for our script we should add **#!/bin/bash** as the first line. In this way default user shell will call **/bin/bash** and only then will execute following shell commands in the script: + + [root@localhost ~]# cat note.sh + #!/bin/bash + echo "Phone number ?" + +Only now we will be 100% sure that **bash** will be used to parse our script content. Lets move on. + +### Reading the inputs ### + +After we have displayed the message script should wait for answer from user. There is the command **read**: + + #!/bin/bash + echo "Phone number ?" + read phone + +After execution script will wait for the user input until he press the [ENTER] key: + + [root@localhost ~]# ./note.sh + Phone number ? + 12345 <--- here is my input + [root@localhost ~]# + +Everything you have input will be stored to the variable **phone**. To display the value of variable we can use the same **echo** command: + + [root@localhost ~]# cat note.sh + #!/bin/bash + echo "Phone number ?" + read phone + echo "You have entered $phone as a phone number" + [root@localhost ~]# ./note.sh + Phone number ? + 123456 + You have entered 123456 as a phone number + [root@localhost ~]# + +In **bash** shell we using **$** (dollar) sign as variable indication, except when reading into variable and few other moments (will describe later). + +Ok, now we are ready to add the rest questions: + + #!/bin/bash + echo "Phone number?" + read phone + echo "Name?" + read name + echo "Issue?" + read issue + [root@localhost ~]# ./note.sh + Phone number? + 123 + Name? + Jim + Issue? + script is not working. + [root@localhost ~]# + +### Using stream redirection ### + +Perfect! There is left to redirect everything to the file data.txt. As a field separator we going to use / (slash) symbol. + +**Note** : You can chose any which you think is the best, bat be sure that content will not have thes symbols inside. It will cause extra fields in the line. + +Do not forget to use ">>" instead of ">" as we would like to append the output to the end of file! + + [root@localhost ~]# tail -2 note.sh + read issue + echo "$phone/$name/$issue">>data.txt + [root@localhost ~]# ./note.sh + Phone number? + 987 + Name? + Jimmy + Issue? + Keybord issue. + [root@localhost ~]# cat data.txt + 987/Jimmy/Keybord issue. + [root@localhost ~]# + +**Note** : The command **tail** displays the last **-n** lines of the file. + +Bingo. Lets run once again: + + [root@localhost ~]# ./note.sh + Phone number? + 556 + Name? + Janine + Issue? + Mouse was broken. + [root@localhost ~]# cat data.txt + 987/Jimmy/Keybord issue. + 556/Janine/Mouse was broken. + [root@localhost ~]# + +Our file is growing. Lets add the date in the front of each line. This will be useful later when playing with data while calculating statistic. For that we can use command date and give it some format as i do not like default one: + + [root@localhost ~]# date + Thu Apr 23 21:33:14 EEST 2015 <---- default output of dta command + [root@localhost ~]# date "+%Y.%m.%d %H:%M:%S" + 2015.04.23 21:33:18 <---- formated output + +There are several ways to read the command output to the variable. In this simple situation we will use ` (back quotes): + + [root@localhost ~]# cat note.sh + #!/bin/bash + now=`date "+%Y.%m.%d %H:%M:%S"` + echo "Phone number?" + read phone + echo "Name?" + read name + echo "Issue?" + read issue + echo "$now/$phone/$name/$issue">>data.txt + [root@localhost ~]# ./note.sh + Phone number? + 123 + Name? + Jim + Issue? + Script hanging. + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + [root@localhost ~]# + +Hmmm... Our script looks a bit ugly. Lets prettify it a bit. If you would read manual about **read** command you would find that read command also could display some messages. For this we should use -p key and message: + + [root@localhost ~]# cat note.sh + #!/bin/bash + now=`date "+%Y.%m.%d %H:%M:%S"` + read -p "Phone number: " phone + read -p "Name: " name + read -p "Issue: " issue + echo "$now/$phone/$name/$issue">>data.txt + +You can fine a lots of interesting about each command directly from the console. Just type: **man read, man echo, man date, man ....** + +Agree it looks much better! + + [root@localhost ~]# ./note.sh + Phone number: 321 + Name: Susane + Issue: Mouse was stolen + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + 2015.04.23 21:43:50/321/Susane/Mouse was stolen + [root@localhost ~]# + +And the cursor is right after the message (not in new line) what makes a bit sense. +Loop + +Time to improve our script. If user works all day with the calls it is not very handy to run it each time. Lets add all these actions in the never-ending loop: + + [root@localhost ~]# cat note.sh + #!/bin/bash + while true + do + read -p "Phone number: " phone + now=`date "+%Y.%m.%d %H:%M:%S"` + read -p "Name: " name + read -p "Issue: " issue + echo "$now/$phone/$name/$issue">>data.txt + done + +I have swapped **read phone** and **now=`date** lines. This is because i would like to get the time right after the phone number will be entered. If i would left it as the first line in the loop **- the** now variable will get the time right after the data was stored in the file. And it is not good as the next call could be after 20 mins or so. + + [root@localhost ~]# ./note.sh + Phone number: 123 + Name: Jim + Issue: Script still not works. + Phone number: 777 + Name: Daniel + Issue: I broke my monitor + Phone number: ^C + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + 2015.04.23 21:43:50/321/Susane/Mouse was stolen + 2015.04.23 21:47:55/123/Jim/Script still not works. + 2015.04.23 21:48:16/777/Daniel/I broke my monitor + [root@localhost ~]# + +NOTE: To exit from the never-ending loop you can by pressing [Ctrl]+[C] keys. Shell will display ^ as the Ctrl key. + +### Using pipe redirection ### + +Lets add more functionality to our "Frankenstein" I would like the script will display some statistic after each call. Lets say we want to see the how many times each number called us. For that we should cat the data.txt file: + + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + 2015.04.23 21:43:50/321/Susane/Mouse was stolen + 2015.04.23 21:47:55/123/Jim/Script still not works. + 2015.04.23 21:48:16/777/Daniel/I broke my monitor + 2015.04.23 22:02:14/123/Jimmy/New script also not working!!! + [root@localhost ~]# + +Now all this output we can redirect to the **cut** command to **cut** each line into the chunks (our delimiter "/") and print the second field: + + [root@localhost ~]# cat data.txt | cut -d"/" -f2 + 123 + 321 + 123 + 777 + 123 + [root@localhost ~]# + +Now this output we can redirect to another command to **sort**: + + [root@localhost ~]# cat data.txt | cut -d"/" -f2|sort + 123 + 123 + 123 + 321 + 777 + [root@localhost ~]# + +and leave only unique lines. To count unique entries just add **-c** key for **uniq** command: + + [root@localhost ~]# cat data.txt | cut -d"/" -f2 | sort | uniq -c + 3 123 + 1 321 + 1 777 + [root@localhost ~]# + +Just add this to end of our loop: + + #!/bin/bash + while true + do + read -p "Phone number: " phone + now=`date "+%Y.%m.%d %H:%M:%S"` + read -p "Name: " name + read -p "Issue: " issue + echo "$now/$phone/$name/$issue">>data.txt + echo "===== We got calls from =====" + cat data.txt | cut -d"/" -f2 | sort | uniq -c + echo "--------------------------------" + done + +Run it: + + [root@localhost ~]# ./note.sh + Phone number: 454 + Name: Malini + Issue: Windows license expired. + ===== We got calls from ===== + 3 123 + 1 321 + 1 454 + 1 777 + -------------------------------- + Phone number: ^C + +![running script](http://blog.linoxide.com/wp-content/uploads/2015/04/Capture11.png) + +Current scenario is going through well-known steps like: + +- Display message +- Get user input +- Store values to the file +- Do something with stored data + +But what if user has several responsibilities and he needs sometimes to input data, sometimes to do statistic calculations, or might be to find something in stored data? For that we need to implement switches / cases. In next article i will show you how to use them and how to nicely form the output. It is useful while "drawing" the tables in the shell. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-shell-script/guide-start-learning-shell-scripting-scratch/ + +作者:[Petras Liumparas][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/petrasl/ \ No newline at end of file diff --git a/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md b/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md new file mode 100644 index 0000000000..4a1020f6f2 --- /dev/null +++ b/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md @@ -0,0 +1,167 @@ +How to Securely Store Passwords and Api Keys Using Vault +================================================================================ +Vault is a tool that is used to access secret information securely, it may be password, API key, certificate or anything else. Vault provides a unified interface to secret information through strong access control mechanism and extensive logging of events. + +Granting access to critical information is quite a difficult problem when we have multiple roles and individuals across different roles requiring various critical information like, login details to databases with different privileges, API keys for external services, credentials for service oriented architecture communication etc. Situation gets even worse when access to secret information is managed across different platforms with custom settings, so rolling, secure storage and managing the audit logs is almost impossible. But Vault provides a solution to such a complex situation. + +### Salient Features ### + +Data Encryption: Vault can encrypt and decrypt data with no requirement to store it. Developers can now store encrypted data without developing their own encryption techniques and it allows security teams to define security parameters. + +**Secure Secret Storage**: Vault encrypts the secret information (API keys, passwords or certificates) before storing it on to the persistent (secondary) storage. So even if somebody gets access to the stored information by chance, it will be of no use until it is decrypted. + +**Dynamic Secrets**: On demand secrets are generated for systems like AWS and SQL databases. If an application needs to access S3 bucket, for instance, it requests AWS keypair from Vault, which grants the required secret information along with a lease time. The secret information won’t work once the lease time is expired. + +**Leasing and Renewal**: Vault grants secrets with a lease limit, it revokes the secrets as soon as lease expires which can further be renewed through APIs if required. + +**Revocation**: Upon expiring the lease period Vault can revoke a single secret or a tree of secrets. + +### Installing Vault ### + +There are two ways to use Vault. + +**1. Pre-compiled Vault Binary** can be downloaded for all Linux flavors from the following source, once done, unzip it and place it on a system PATH where other binaries are kept so that it can be accessed/invoked easily. + +- [Download Precompiled Vault Binary (32-bit)][1] +- [Download Precompiled Vault Binary (64-bit)][2] +- [Download Precompiled Vault Binary (ARM)][3] + +Download the desired precompiled Vault binary. + +![wget binary](http://blog.linoxide.com/wp-content/uploads/2015/04/wget-binary.png) + +Unzip the downloaded binary. + +![vault](http://blog.linoxide.com/wp-content/uploads/2015/04/unzip.png) + +unzipCongratulations! Vault is ready to be used. + +![](http://blog.linoxide.com/wp-content/uploads/2015/04/vault.png) + +**2. Compiling from source** is another way of installing Vault on the system. GO and GIT are required to be installed and configured properly on the system before we start the installation process. + +To **install GO on Redhat systems** use the following command. + + sudo yum install go + +To **install GO on Debian systems** use the following commands. + + sudo apt-get install golang + +OR + + sudo add-apt-repository ppa:gophers/go + + sudo apt-get update + + sudo apt-get install golang-stable + +To **install GIT on Redhat systems** use the following command. + + sudo yum install git + +To **install GIT on Debian systems** use the following commands. + + sudo apt-get install git + +Once both GO and GIT are installed we start the Vault installation process by compiling from the source. + +> Clone following Vault repository into the GOPATH + + https://github.com/hashicorp/vault + +> Verify if the following clone file exist, if it doesn’t then Vault wasn’t cloned to the proper path. + + $GOPATH/src/github.com/hashicorp/vault/main.go + +> Run following command to build Vault in the current system and put binary in the bin directory. + + make dev + +![path](http://blog.linoxide.com/wp-content/uploads/2015/04/installation4.png) + +### An introductory tutorial of Vault ### + +We have compiled Vault’s official interactive tutorial along with its output on SSH. + +**Overview** + +This tutorial will cover the following steps: + +- Initializing and unsealing your Vault +- Authorizing your requests to Vault +- Reading and writing secrets +- Sealing your Vault + +**Initialize your Vault** + +To get started, we need to initialize an instance of Vault for you to work with. +While initializing, you can configure the seal behavior of Vault. +Initialize Vault now, with 1 unseal key for simplicity, using the command: + + vault init -key-shares=1 -key-threshold=1 + +You'll notice Vault prints out several keys here. Don't clear your terminal, as these are needed in the next few steps. + +![Initializing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Initializing-SSH.png) + +**Unsealing your Vault** + +When a Vault server is started, it starts in a sealed state. In this state, Vault is configured to know where and how to access the physical storage, but doesn't know how to decrypt any of it. +Vault encrypts data with an encryption key. This key is encrypted with the "master key", which isn't stored. Decrypting the master key requires a threshold of shards. In this example, we use one shard to decrypt this master key. + + vault unseal + +![Unsealing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Unsealing-SSH.png) + +**Authorize your requests** + +Before performing any operation with Vault, the connecting client must be authenticated. Authentication is the process of verifying a person or machine is who they say they are and assigning an identity to them. This identity is then used when making requests with Vault. +For simplicity, we'll use the root token we generated on init in Step 2. This output should be available in the scrollback. +Authorize with a client token: + + vault auth + +![Authorize SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Authorize-SSH.png) + +**Read and write secrets** + +Now that Vault has been set-up, we can start reading and writing secrets with the default mounted secret backend. Secrets written to Vault are encrypted and then written to the backend storage. The backend storage mechanism never sees the unencrypted value and doesn't have the means necessary to decrypt it without Vault. + + vault write secret/hello value=world + +Of course, you can then read this data too: + + vault read secret/hello + +![RW_SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/RW_SSH.png) + +**Seal your Vault** + +There is also an API to seal the Vault. This will throw away the encryption key and require another unseal process to restore it. Sealing only requires a single operator with root privileges. This is typically part of a rare "break glass procedure". +This way, if there is a detected intrusion, the Vault data can be locked quickly to try to minimize damages. It can't be accessed again without access to the master key shards. + + vault seal + +![Seal Vault SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Seal-Vault-SSH.png) + +That is the end of introductory tutorial. + +### Summary ### + +Vault is a very useful application mainly because of providing a reliable and secure way of storing critical information. Furthermore it encrypts the critical information before storing, maintains audit logs, grants secret information for limited lease time and revokes it once lease is expired. It is platform independent and freely available to download and install. To discover more about Vault, readers are encouraged to visit the official website. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/secure-secret-store-vault/ + +作者:[Aun Raza][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/arunrz/ +[1]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_386.zip +[2]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_amd64.zip +[3]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_arm.zip \ No newline at end of file diff --git a/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md b/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md new file mode 100644 index 0000000000..a8c58b82af --- /dev/null +++ b/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md @@ -0,0 +1,112 @@ +How to Setup OpenERP (Odoo) on CentOS 7.x +================================================================================ +Hi everyone, this tutorial is all about how we can setup Odoo (formerly known as OpenERP) on our CentOS 7 Server. Are you thinking to get an awesome ERP (Enterprise Resource Planning) app for your business ?. Then, OpenERP is the best app you are searching as it is a Free and Open Source Software which provides an outstanding features for your business or company. + +[OpenERP][1] is a free and open source traditional OpenERP (Enterprise Resource Planning) app which includes Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management and many more modules included for a better way to boost the productivity and sales. Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps. + +So, here are some quick and easy steps to get your copy of OpenERP installed on your CentOS machine. + +### 1. Installing PostgreSQL ### + +First of all, we'll want to update the packages installed in our CentOS 7 machine to ensure that the latest packages, patches and security are up to date. To update our sytem, we should run the following command in a shell or terminal. + + # yum clean all + # yum update + +Now, we'll want to install PostgreSQL Database System as OpenERP uses PostgreSQL for its database system. To install it, we'll need to run the following command. + + # yum install postgresql postgresql-server postgresql-libs + +![Installing postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-postgresql.png) + +After it is installed, we'll need to initialize the database with the following command + + # postgresql-setup initdb + +![Intializating postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/intializating-postgresql.png) + +We'll then set PostgreSQL to start on every boot and start the PostgreSQL Database server. + + # systemctl enable postgresql + # systemctl start postgresql + +As we haven't set a password for the user "postgresql", we'll want to set it now. + + # su - postgres + $ psql + postgres=# \password postgres + postgres=# \q + # exit + +![setting password postgres](http://blog.linoxide.com/wp-content/uploads/2015/03/setting-password-postgres.png) + +### 2. Configuring Odoo Repository ### + +After our Database Server has been installed correctly, we'll want add EPEL (Extra Packages for Enterprise Linux) to our CentOS server. Odoo (or OpenERP) depends on Python run-time and many other packages that are not included in default standard repository. As such, we'll want to add the Extra Packages for Enterprise Linux (or EPEL) repository support so that Odoo can get the required dependencies. To install, we'll need to run the following command. + + # yum install epel-release + +![Installing EPEL Release](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-epel-release.png) + +Now, after we install EPEL, we'll now add repository of Odoo (OpenERP) using yum-config-manager. + + # yum install yum-utils + + # yum-config-manager --add-repo=https://nightly.odoo.com/8.0/nightly/rpm/odoo.repo + +![Adding OpenERP (Odoo) Repo](http://blog.linoxide.com/wp-content/uploads/2015/03/added-odoo-repo.png) + +### 3. Installing Odoo 8 (OpenERP) ### + +Finally after adding repository of Odoo 8 (OpenERP) in our CentOS 7 machine. We'll can install Odoo 8 (OpenERP) using the following command. + + # yum install -y odoo + +The above command will install odoo along with the necessary dependency packages. + +![Installing odoo or OpenERP](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-odoo.png) + +Now, we'll enable automatic startup of Odoo in every boot and will start our Odoo service using the command below. + + # systemctl enable odoo + # systemctl start odoo + +![Starting Odoo](http://blog.linoxide.com/wp-content/uploads/2015/03/starting-odoo.png) + +### 4. Allowing Firewall ### + +As Odoo uses port 8069, we'll need to allow firewall for remote access. We can allow firewall to port 8069 by running the following command. + + # firewall-cmd --zone=public --add-port=8069/tcp --permanent + # firewall-cmd --reload + +![Allowing firewall Port](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-firewall-port.png) + +**Note: By default, only connections from localhost are allowed. If we want to allow remote access to PostgreSQL databases, we'll need to add the line shown in the below image to pg_hba.conf configuration file:** + + # nano /var/lib/pgsql/data/pg_hba.conf + +![Allowing Remote Access pgsql](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-remote-access-pgsql.png) + +### 5. Web Interface ### + +Finally, as we have successfully installed our latest Odoo 8 (OpenERP) on our CentOS 7 Server, we can now access our Odoo by browsing to http://ip-address:8069 http://my-site.com:8069 using our favorite web browser. Then, first thing we'll gonna do is we'll create a new database and create a new password for it. Note, the master password is admin by default. Then, we can login to our panel with that username and password. + +![Odoo Panel](http://blog.linoxide.com/wp-content/uploads/2015/03/odoo-panel.png) + +### Conclusion ### + +Odoo 8 (formerly OpenERP) is the best ERP app available in the world of Open Source. We did an excellent work on installing it because OpenERP is a set of many modules which are essential for a complete ERP app for business and company. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy OpenERP (Odoo 8) :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-openerp-odoo-centos-7/ + +作者:[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/ +[1]:https://www.odoo.com/ \ No newline at end of file From aa632d12a58aee1090616fe8505609a70d080a13 Mon Sep 17 00:00:00 2001 From: cvsher <478990879@qq.com> Date: Wed, 6 May 2015 11:49:26 +0800 Subject: [PATCH 0722/2517] Update and rename 20150506 Linux grep command with 14 different examples.md to [translating]20150506 Linux grep command with 14 different examples.md --- ...]20150506 Linux grep command with 14 different examples.md} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename sources/tech/{20150506 Linux grep command with 14 different examples.md => [translating]20150506 Linux grep command with 14 different examples.md} (99%) diff --git a/sources/tech/20150506 Linux grep command with 14 different examples.md b/sources/tech/[translating]20150506 Linux grep command with 14 different examples.md similarity index 99% rename from sources/tech/20150506 Linux grep command with 14 different examples.md rename to sources/tech/[translating]20150506 Linux grep command with 14 different examples.md index 006a042bc5..7731e2fa0c 100644 --- a/sources/tech/20150506 Linux grep command with 14 different examples.md +++ b/sources/tech/[translating]20150506 Linux grep command with 14 different examples.md @@ -1,3 +1,4 @@ +translating by cvsher Linux grep command with 14 different examples ================================================================================ ### Overview : ### @@ -172,4 +173,4 @@ via: http://www.linuxtechi.com/linux-grep-command-with-14-different-examples/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file +[a]:http://www.linuxtechi.com/author/pradeep/ From e79626b8f8024474511e71eded14231c203a4e1b Mon Sep 17 00:00:00 2001 From: chenjt Date: Wed, 6 May 2015 14:24:47 +0800 Subject: [PATCH 0723/2517] [translated]How to set up networking between Docker containers.md --- ...up networking between Docker containers.md | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/translated/tech/20150323 How to set up networking between Docker containers.md b/translated/tech/20150323 How to set up networking between Docker containers.md index 41a67c6b70..3481dd8faa 100644 --- a/translated/tech/20150323 How to set up networking between Docker containers.md +++ b/translated/tech/20150323 How to set up networking between Docker containers.md @@ -12,142 +12,142 @@ ![](https://farm8.staticflickr.com/7288/16662287067_27888684a7_b.jpg) -让我们先来看看 weave 怎么工作:先创建一个由多个 peer 组成的对等网络,每个 peer 是一个虚拟路由器容器,叫做“weave 路由器”,它们分布在不同的宿主机上。这个对等网络的每个 peer 之间会维持一个 TCP 链接,用于互相交换拓扑信息,它们也会建立 UDP 链接用于容器间通信。一个 weave 路由器通过桥接技术连接到其他本宿主机上的其他容器。当处于不同宿主机上的两个容器想要通信,一台宿主机上的 weave 路由器用网桥截获数据包,使用 UDP 协议封装后发给另一台宿主机上的 weave 路由器。 +让我们先来看看 weave 怎么工作:先创建一个由多个 peer 组成的对等网络,每个 peer 是一个虚拟路由器容器,叫做“weave 路由器”,它们分布在不同的宿主机上。这个对等网络的每个 peer 之间会维持一个 TCP 链接,用于互相交换拓扑信息,它们也会建立 UDP 链接用于容器间通信。一个 weave 路由器通过桥接技术连接到其他本宿主机上的其他容器。当处于不同宿主机上的两个容器想要通信,一台宿主机上的 weave 路由器通过网桥截获数据包,使用 UDP 协议封装后发给另一台宿主机上的 weave 路由器。 -Each weave router maintains up-to-date weave router topology information, as well as container's MAC address information (similar to switch's MAC learning), so that it can make forwarding decision on container traffic. Weave is able to route traffic between containers created on hosts which are not directly reachable, as long as two hosts are interconnected via an intermediate weave router on weave topology. Optionally, weave routers can be set to encrypt both TCP control data and UDP data traffic based on public key cryptography. +每个 weave 路由器会刷新整个对等网络的拓扑信息,像容器的 MAC 地址(就像交换机的 MAC 地址学习一样获取其他容器的 MAC 地址),因此它可以决定数据包的下一跳是往哪个容器的。weave 能让两个处于不同宿主机的容器进行通信,只要这两台宿主机在 weave 拓扑结构内连到同一个 weave 路由器。另外,weave 路由器还能使用公钥加密技术将 TCP 和 UDP 数据包进行加密。 -### Prerequisite ### +### 准备工作 ### -Before using weave on Linux, of course you need to set up Docker environment on each host where you want to run [Docker][2] containers. Check out [these][3] [tutorials][4] on how to create Docker containers on Ubuntu or CentOS/Fedora. +在使用 weave 之前,你需要在所有宿主机上安装 Docker[2] 环境,参考[这些][3][教程][4],在 Ubuntu 或 CentOS/Fedora 发行版中安装 Docker。 -Once Docker environment is set up, install weave on Linux as follows. +Docker 环境部署完成后,使用下面的命令安装 weave: $ wget https://github.com/zettio/weave/releases/download/latest_release/weave $ chmod a+x weave $ sudo cp weave /usr/local/bin -Make sure that /usr/local/bin is include in your PATH variable by appending the following in /etc/profile. +注意你的 PATH 环境变量要包含 /usr/local/bin 这个路径,请在 /etc/profile 文件中加入一行(LCTT 注:要使环境变量生效,你需要执行这个命令: src /etc/profile): export PATH="$PATH:/usr/local/bin" -Repeat weave installation on every host where Docker containers will be deployed. +在每台宿主机上重复上面的操作。 -Weave uses TCP/UDP 6783 port. If you are using firewall, make sure that these port numbers are not blocked by the firewall. +Weave 在 TCP 和 UDP 上都使用 6783 端口,如果你的系统开启了防火墙,请确保这两个端口不会被防火墙挡住。 -### Launch Weave Router on Each Host ### +### 在每台宿主机上开启 Weave 路由器 ### -When you want to interconnect Docker containers across multiple hosts, the first step is to launch a weave router on every host. +当你想要让处于在不同宿主机上的容器能够互相通信,第一步要做的就是在每台宿主机上开启 weave 路由器。 -On the first host, run the following command, which will create and start a weave router container. +第一台宿主机,运行下面的命令,就会创建并开启一个 weave 路由器容器(LCTT 注:前面说过了,weave 路由器也是一个容器): $ sudo weave launch -The first time you run this command, it will take a couple of minutes to download a weave image before launching a router container. On successful launch, it will print the ID of a launched weave router. +第一次运行这个命令的时候,它会下载一个 weave 镜像,这会花一些时间。下载完成后就会自动运行这个镜像。成功启动后,终端会打印这个 weave 路由器的 ID 号。 -To check the status of the router, use this command: +下面的命令用于查看路由器状态: $ sudo weave status ![](https://farm9.staticflickr.com/8632/16249607573_4514790cf5_c.jpg) -Since this is the first weave router launched, there will be only one peer in the peer list. +第一个 weave 路由器就绪了,目前为止整个 peer 对等网络中只有一个 peer 成员。 -You can also verify the launch of a weave router by using docker command. +你也可以使用 doceker 的命令来查看 weave 路由器的状态: $ docker ps ![](https://farm8.staticflickr.com/7655/16681964438_51d8b18809_c.jpg) -On the second host, run the following command, where we specify the IP address of the first host as a peer to join. +第二台宿主机部署步骤稍微有点不同,我们需要为这台宿主机的 weave 路由器指定第一台宿主机的 IP 地址,命令如下: $ sudo weave launch -When you check the status of the router, you will see two peers: the current host and the first host. +当你查看路由器状态,你会看到两个 peer 成员:当前宿主机和第一个宿主机。 ![](https://farm8.staticflickr.com/7608/16868571891_e66d4b8841_c.jpg) -As you launch more routers on subsequent hosts, the peer list will grow accordingly. When launching a router, just make sure that you specify any previously launched peer's IP address. +当你开启更多路由器,这个 peer 成员列表会更长。当你新开一个路由器时,要指定前一个宿主机的 IP 地址,请注意不是第一个宿主机的 IP 地址。 -At this point, you should have a weave network up and running, which consists of multiple weave routers across different hosts. +现在你已经有了一个 weave 网络了,它由位于不同宿主机的 weave 路由器组成。 -### Interconnect Docker Containers across Multiple Hosts ### +### 把不同宿主机上的容器互联起来 ### -Now it is time to launch Docker containers on different hosts, and interconnect them on a virtual network. +接下来要做的就是在不同宿主机上开启 Docker 容器,并使用虚拟网络将它们互联起来。 -Let's say we want to create a private network 10.0.0.0/24, to interconnect two Docker containers. We will assign random IP addressses from this subnet to the containers. +假设我们创建一个私有网络 10.0.0.0/24 来互联 Docker 容器,并为这些容器随机分配 IP 地址。 -When you create a Docker container to deploy on a weave network, you need to use weave command, not docker command. Internally, the weave command uses docker command to create a container, and then sets up Docker networking on it. +如果你想新建一个能加入 weave 网络的容器,你就需要使用 weave 命令来创建,而不是 docker 命令。原因是 weave 命令内部会调用 docker 命令来新建容器然后为它设置网络。 -Here is how to create a Ubuntu container on hostA, and attach the container to 10.0.0.0/24 subnet with an IP addresss 10.0.0.1. +下面的命令是在宿主机 hostA 上建立一个 Ubuntu 容器,然后将它放到 10.0.0.0/24 网络中,分配的 IP 地址为 10.0.0.1: hostA:~$ sudo weave run 10.0.0.1/24 -t -i ubuntu -On successful run, it will print the ID of a created container. You can use this ID to attach to the running container and access its console as follows. +成功运行后,终端会打印出容器的 ID 号。你可以使用这个 ID 来访问这个容器: hostA:~$ docker attach -Move to hostB, and let's create another container. Attach it to the same subnet (10.0.0.0/24) with a different IP address 10.0.0.2. +在宿主机 hostB 上,也创建一个 Ubuntu 容器,IP 地址为 10.0.0.2: hostB:~$ sudo weave run 10.0.0.2/24 -t -i ubuntu -Let's attach to the second container's console as well: +访问下这个容器的控制台: hostB:~$ docker attach -At this point, those two containers should be able to ping each other via the other's IP address. Verify that from each container's console. +这两个容器能够互相 ping 通,你可以通过容器的控制台检查一下。 ![](https://farm9.staticflickr.com/8566/16868571981_d73c8e401b_c.jpg) -If you check the interfaces of each container, you will see an interface named "ethwe" which is assigned an IP address (e.g., 10.0.0.1 and 10.0.0.2) you specified. +如果你检查一下每个容器的网络配置,你会发现有一块名为“ethwe”的网卡,你分配给容器的 IP 地址出现在它们那里(比如这里分别是 10.0.0.1 和 10.0.0.2)。 ![](https://farm8.staticflickr.com/7286/16681964648_013f9594b1_b.jpg) -### Other Advanced Usages of Weave ### +### Weave 的其他高级用法 ### -Weave offers a number of pretty neat features. Let me briefly cover a few here. +weave 提供了一些非常巧妙的特性,我在这里作下简单的介绍。 -#### Application Isolation #### +#### 应用分离 #### -Using weave, you can create multiple virtual networks and dedicate each network to a distinct application. For example, create 10.0.0.0/24 for one group of containers, and 10.10.0.0/24 for another group of containers, and so on. Weave automatically takes care of provisioning these networks, and isolating container traffic on each network. Going further, you can flexibly detach a container from one network, and attach it to another network without restarting containers. For example: +使用 weave,你可以创建多个虚拟网络,并为每个网络设置不同的应用。比如你可以为一群容器创建 10.0.0.0/24 网络,为另一群容器创建 10.10.0.0/24 网络,weave 会自动帮你维护这些网络,并将这两个网络互相隔离。另外,你可以灵活地将一个容器从一个网络移到另一个网络而不需要重启容器。举个例子: -First launch a container on 10.0.0.0/24: +首先开启一个容器,运行在 10.0.0.0/24 网络上: $ sudo weave run 10.0.0.2/24 -t -i ubuntu -Detach the container from 10.0.0.0/24: +然后让它脱离这个网络: $ sudo weave detach 10.0.0.2/24 -Re-attach the container to another network 10.10.0.0/24: +最后将它加入到 10.10.0.0/24 网络中: $ sudo weave attach 10.10.0.2/24 ![](https://farm8.staticflickr.com/7639/16247212144_c31a49714d_c.jpg) -Now this container should be able to communicate with other containers on 10.10.0.0/24. This is a pretty useful feature when network information is not available at the time you create a container. +现在这个容器可以与 10.10.0.0/24 网络上的其它容器进行通信了。当你要把容器加入一个网络,而这个网络暂时不可用时,上面的步骤就很有帮助了。 -#### Integrate Weave Networks with Host Network #### +#### 将 weave 网络与宿主机网络整合起来 #### -Sometimes you may need to allow containers on a virtual weave network to access physical host network. Conversely, hosts may want to access containers on a weave network. To support this requirement, weave allows weave networks to be integrated with host network. +有时候你想让虚拟网络中的容器能访问物理主机的网络。或者相反,宿主机需要访问容器。为满足这个功能,weave 允许虚拟网络与宿主机网络整合。 -For example, on hostA where a container is running on network 10.0.0.0/24, run the following command. +举个例子,在宿主机 hostA 上一个容器运行在 10.0.0.0/24 中,运行使用下面的命令: hostA:~$ sudo weave expose 10.0.0.100/24 -This will assign IP address 10.0.0.100 to hostA, so that hostA itself is also connected to 10.0.0.0/24 network. Obviously, you need to choose an IP address which is not used by any other containers on the network. +这个命令把 IP 地址 10.0.0.100 分配给宿主机 hostA,这样一来 hostA 也连到了 10.0.0.0/24 网络上了。很明显,你在为宿主机选择 IP 地址的时候,需要选一个没有被其他容器使用的地址。 -At this point, hostA should be able to access any containers on 10.0.0.0/24, whether or not the containers are residing on hostA. Pretty neat! +现在 hostA 就可以访问 10.0.0.0/24 上的所有容器了,不管这些容器是否位于 hostA 上。好巧妙的设定啊,32 个赞! -### Conclusion ### +### 总结 ### -As you can see, weave is a pretty useful Docker networking tool. This tutorial only covers a glimpse of [its powerful features][5]. If you are more ambitious, you can try its multi-hop routing, which can be pretty useful in multi-cloud environment, dynamic re-routing, which is a neat fault-tolerance feature, or even its distributed DNS service which allows you to name containers on weave networks. If you decide to use this gem in your environment, feel free to share your use case! +如你所见,weave 是一个很有用的 docker 网络配置工具。这个教程只是[它强悍功能][5]的冰山一角。如果你想进一步玩玩,你可以试试它的以下功能:多跳路由功能,这个在 multi-cloud 环境(LCTT 注:多云,企业使用多个不同的云服务提供商的产品,比如 IaaS 和 SaaS,来承载不同的业务)下还是很有用的;动态重路由功能是一个很巧妙的容错技术;或者它的分布式 DNS 服务,它允许你为你的容器命名。如果你决定使用这个好东西,欢迎分享你的使用心得。 -------------------------------------------------------------------------------- via: http://xmodulo.com/networking-between-docker-containers.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From fbf3019fac431b97f1c050a170489e66e6fd20e7 Mon Sep 17 00:00:00 2001 From: wwy Date: Wed, 6 May 2015 22:40:30 +0800 Subject: [PATCH 0724/2517] first translate request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tech 的文章应该比较适合我这种新人吧。 --- ...w to Securely Store Passwords and Api Keys Using Vault.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md b/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md index 4a1020f6f2..858197989d 100644 --- a/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md +++ b/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md @@ -1,3 +1,6 @@ +Translating by wwy-hust + + How to Securely Store Passwords and Api Keys Using Vault ================================================================================ Vault is a tool that is used to access secret information securely, it may be password, API key, certificate or anything else. Vault provides a unified interface to secret information through strong access control mechanism and extensive logging of events. @@ -164,4 +167,4 @@ via: http://linoxide.com/how-tos/secure-secret-store-vault/ [a]:http://linoxide.com/author/arunrz/ [1]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_386.zip [2]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_amd64.zip -[3]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_arm.zip \ No newline at end of file +[3]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_arm.zip From 7c497f33f9aca7def04c787dfc0e2573d093c593 Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 7 May 2015 09:55:03 +0800 Subject: [PATCH 0725/2517] Update 20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md --- ...password for default keyring to unlock on Ubuntu desktop.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md b/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md index 2034bdca7b..9040bae6eb 100644 --- a/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md +++ b/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop ================================================================================ > **Question**: When I boot up my Ubuntu desktop, a pop up dialog appears, asking me to enter a password to unlock default keyring. How can I disable this "unlock default keyring" pop up window, and automatically unlock my keyring? @@ -52,4 +53,4 @@ via: http://ask.xmodulo.com/disable-entering-password-unlock-default-keyring.htm 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 498f3dc0d7a4276bdf283fa2c795e1608299e1eb Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 7 May 2015 10:26:38 +0800 Subject: [PATCH 0726/2517] [Translated]20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md --- ...ult keyring to unlock on Ubuntu desktop.md | 56 ------------------- ...ult keyring to unlock on Ubuntu desktop.md | 54 ++++++++++++++++++ 2 files changed, 54 insertions(+), 56 deletions(-) delete mode 100644 sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md create mode 100644 translated/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md b/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md deleted file mode 100644 index 9040bae6eb..0000000000 --- a/sources/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md +++ /dev/null @@ -1,56 +0,0 @@ -Translating by GOLinux! -Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop -================================================================================ -> **Question**: When I boot up my Ubuntu desktop, a pop up dialog appears, asking me to enter a password to unlock default keyring. How can I disable this "unlock default keyring" pop up window, and automatically unlock my keyring? - -A keyring is thought of as a local database that stores your login information in encrypted forms. Various desktop applications (e.g., browsers, email clients) use a keyring to store and manage your login credentials, secrets, passwords, certificates, or keys securely. For those applications to retrieve the information stored in a keyring, the keyring needs to be unlocked. - -GNOME keyring used by Ubuntu desktop is integrated with desktop login, and the keyring is automatically unlocked when you authenticate into your desktop. But your default keyring can remain "locked" if you set up automatic desktop login or wake up from hibernation. In this case, you will be prompted: - -> "Enter password for keyring 'Default keyring' to unlock. An application wants to access to the keyring 'Default keyring,' but it is locked." - -![](https://farm9.staticflickr.com/8787/16716456754_309c39513c_o.png) - -If you want to avoid typing a password to unlock your default keyring every time such a pop-up dialog appears, here is how you can do it. - -Before doing that, understand the implication of disabling the password prompt. By automatically unlocking the default keyring, you will make your keyring (and any information stored in the keyring) accessible to anyone who uses your desktop, without them having to know your password. - -### Disable Password for Unlocking Default Keyring ### - -Open up Dash, and type "password" to launch "Passwords and Keys" app. - -![](https://farm8.staticflickr.com/7709/17312949416_ed9c4fbe2d_b.jpg) - -Alternatively, use the seahorse command to launch the GUI from the command line. - - $ seahorse - -On the left side panel, right-click on the "Default keyring," and choose "Change Password." - -![](https://farm8.staticflickr.com/7740/17159959750_ba5b675b00_b.jpg) - -Type your current login password. - -![](https://farm8.staticflickr.com/7775/17347551135_ce09260818_b.jpg) - -Leave a new password for the "Default" keyring as blank. - -![](https://farm8.staticflickr.com/7669/17345663222_c9334c738b_c.jpg) - -Click on "Continue" button to confirm to store passwords unencrypted. - -![](https://farm8.staticflickr.com/7761/17152692309_ce3891a0d9_c.jpg) - -That's it. From now on, you won't be prompted to unlock the default keyring. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/disable-entering-password-unlock-default-keyring.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://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md b/translated/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md new file mode 100644 index 0000000000..2871298396 --- /dev/null +++ b/translated/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md @@ -0,0 +1,54 @@ +Linux有问必答——Ubuntu桌面上如何禁用默认的密钥环解锁密码输入 +================================================================================ +>**问题**:当我启动我的Ubuntu桌面时,出现了一个弹出对话框,要求我输入密码来解锁默认的密钥环。我怎样才能禁用这个“解锁默认密钥环”弹出窗口,并自动解锁我的密钥环? + +密钥环被认为是用来以加密方式存储你的登录信息的本地数据库。各种桌面应用(如浏览器、电子邮件客户端)使用密钥环来安全地存储并管理你的登录凭证、机密、密码、证书或密钥。对于那些需要检索存储在密钥环中的信息的应用程序,需要解锁该密钥环。 + +Ubuntu桌面所使用的GNOME密钥环被整合到了桌面登录中,该密钥环会在你验证进入桌面后自动解锁。但是,如果你设置了自动登录桌面或者是从休眠中唤醒,你默认的密钥环仍然可能“被锁定”的。在这种情况下,你会碰到这一提示: + +>“为密钥环‘默认密钥环’输入密码来解锁。某个应用想要访问密钥环‘默认密钥环’,但它被锁定了。” +> +![](https://farm9.staticflickr.com/8787/16716456754_309c39513c_o.png) + +如果你想要避免在每次弹出对话框出现时输入密码来解锁默认密钥环,那么你可以这样做。 + +在做之前,请先了解禁用密码提示后可能出现的结果。通过自动解锁默认密钥环,你可以让任何使用你桌面的人无需知道你的密码而能获取你的密钥环(以及存储在密钥环中的任何信息)。 + +### 禁用默认密钥环解锁密码 ### + +打开Dash,然后输入“密码”来启动“密码和密钥”应用。 + +![](https://farm8.staticflickr.com/7709/17312949416_ed9c4fbe2d_b.jpg) + +或者,使用seahorse命令从命令行启动图形界面。 + + $ seahorse + +在左侧面板中,右击“默认密钥环”,并选择“修改密码”。 + +![](https://farm8.staticflickr.com/7740/17159959750_ba5b675b00_b.jpg) + +输入你的当前登录密码。 + +![](https://farm8.staticflickr.com/7775/17347551135_ce09260818_b.jpg) +在设置“默认”密钥环新密码的密码框中留空。 + +![](https://farm8.staticflickr.com/7669/17345663222_c9334c738b_c.jpg) + +在询问是否不加密存储密码对话框中点击“继续”。 + +![](https://farm8.staticflickr.com/7761/17152692309_ce3891a0d9_c.jpg) + +搞定。从今往后,那个该死的解锁密钥环提示对话框再也不会来烦你了。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/disable-entering-password-unlock-default-keyring.html + +作者:[Dan Nanni][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From d32977decb9f54a892f8790927bf4415b6a3ff57 Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 7 May 2015 10:32:20 +0800 Subject: [PATCH 0727/2517] Update 20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md --- ... 'Systemd' Services and Units Using 'Systemctl' in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md b/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md index 60e41c57ab..563eb2cd0f 100644 --- a/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md +++ b/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to Manage ‘Systemd’ Services and Units Using ‘Systemctl’ in Linux ================================================================================ Systemctl is a systemd utility which is responsible for Controlling the systemd system and service manager. @@ -576,4 +577,4 @@ via: http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.tecmint.com/author/avishek/ \ No newline at end of file +[a]:http://www.tecmint.com/author/avishek/ From 0bc424587ea89ffdc72d6b08522b39761b4404e0 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 7 May 2015 12:48:48 +0800 Subject: [PATCH 0728/2517] [Translated]20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md --- ...es and Units Using 'Systemctl' in Linux.md | 135 +++++++++--------- 1 file changed, 67 insertions(+), 68 deletions(-) rename {sources => translated}/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md (78%) diff --git a/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md b/translated/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md similarity index 78% rename from sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md rename to translated/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md index 563eb2cd0f..a78dc01820 100644 --- a/sources/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md +++ b/translated/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md @@ -1,29 +1,28 @@ -Translating by GOLinux! -How to Manage ‘Systemd’ Services and Units Using ‘Systemctl’ in Linux +在Linux中使用‘Systemctl’管理‘Systemd’服务和单元 ================================================================================ -Systemctl is a systemd utility which is responsible for Controlling the systemd system and service manager. +Systemctl是一个systemd工具,主要负责控制systemd系统和服务管理器。 -Systemd is a collection of system management daemons, utilities and libraries which serves as a replacement of System V init daemon. Systemd functions as central management and configuration platform for UNIX like system. +Systemd是一个系统管理守护进程、工具和库的集合,用于取代System V初始进程。Systemd的功能是用于集中管理和配置类UNIX系统。 -In the Linux Ecosystem Systemd has been implemented on most of the standard Linux Distribution with a few exception. Systemd is the parent Process of all other daemons oftenly but not always. +在Linux生态系统中,Systemd被部署到了大多数的标准Linux发行版中,只有位数不多的几个尚未部署。Systemd通常是所有其它守护进程的父进程,但并非总是如此。 ![Manage Linux Services Using Systemctl](http://www.tecmint.com/wp-content/uploads/2015/04/Manage-Linux-Services-Using-Systemctl.jpg) -Manage Linux Services Using Systemctl +使用Systemctl管理Linux服务 -This article aims at throwing light on “How to control System and Services” on a system running systemd. +本文旨在阐明在运行systemd的系统上“如何控制系统和服务”。 -### Starting with Systemtd and Systemctl Basics ### +### Systemd初体验和Systemctl基础 ### -#### 1. First check if systemd is installed on your system or not and what is the version of currently installed Systemd? #### +#### 1. 首先检查你的系统中是否安装有systemd并确定当前安装的版本 #### # systemd --version systemd 215 +PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR -It’s clear from the above example, that we have systemd 215 version Installed. +上例中很清楚地表明,我们安装了215版本的systemd。 -#### 2. Check where the binaries and libraries of systemd and systemctl are installed. #### +#### 2. 检查systemd和systemctl的二进制文件和库文件的安装位置 #### # whereis systemd systemd: /usr/lib/systemd /etc/systemd /usr/share/systemd /usr/share/man/man1/systemd.1.gz @@ -32,7 +31,7 @@ It’s clear from the above example, that we have systemd 215 version Installed. # whereis systemctl systemctl: /usr/bin/systemctl /usr/share/man/man1/systemctl.1.gz -#### 3. Check whether systemd is running or not. #### +#### 3. 检查systemd是否运行 #### # ps -eaf | grep [s]ystemd @@ -42,18 +41,18 @@ It’s clear from the above example, that we have systemd 215 version Installed. root 555 1 0 16:27 ? 00:00:00 /usr/lib/systemd/systemd-logind dbus 556 1 0 16:27 ? 00:00:00 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation -**Notice**: systemd is running as parent daemon (PID=1). In the above command ps with (-e) select all Processes, (- +**注意**:systemd是作为父进程(PID=1)运行的。在上面带(-e)参数的ps命令输出中,选择所有进程,(- -a) select all processes except session leaders and (-f) for full format listing (i.e. -eaf). +a)选择除会话前导外的所有进程,并使用(-f)参数输出完整格式列表(如 -eaf)。 -Also note the square brackets in the above example and rest of the examples to follow. Square Bracket expression is part of grep’s character class pattern matching. +也请注意上例中后随的方括号和样例剩余部分。方括号表达式是grep的字符类表达式的一部分。 -#### 4. Analyze systemd boot process. #### +#### 4. 分析systemd启动进程 #### # systemd-analyze Startup finished in 487ms (kernel) + 2.776s (initrd) + 20.229s (userspace) = 23.493s -#### 5. Analyze time taken by each process at boot. #### +#### 5. 分析启动时各个进程花费的时间 #### # systemd-analyze blame @@ -69,7 +68,7 @@ Also note the square brackets in the above example and rest of the examples to f 1.126s systemd-logind.service .... -#### 6. Analyze critical chain at boot. #### +#### 6. 分析启动时的关键链 #### # systemd-analyze critical-chain @@ -95,9 +94,9 @@ Also note the square brackets in the above example and rest of the examples to f └─systemd-fsck@dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d19608096 └─dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d196080964.device @4 -**Important**: Systemctl accepts services (.service), mount point (.mount), sockets (.socket) and devices (.device) as units. +**重要**:Systemctl接受服务(.service),挂载点(.mount),套接口(.socket)和设备(.device)作为单元。 -#### 7. List all the available units. #### +#### 7. 列出所有可用单元 #### # systemctl list-unit-files @@ -113,7 +112,7 @@ Also note the square brackets in the above example and rest of the examples to f brandbot.path disabled ..... -#### 8. List all running units. #### +#### 8. 列出所有运行中单元 #### # systemctl list-units @@ -134,7 +133,7 @@ Also note the square brackets in the above example and rest of the examples to f sys-module-configfs.device loaded active plugged /sys/module/configfs ... -#### 9. List all failed units. #### +#### 9. 列出所有失败单元 #### # systemctl --failed @@ -148,13 +147,13 @@ Also note the square brackets in the above example and rest of the examples to f 1 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'. -#### 10. Check if a Unit (cron.service) is enabled or not?. #### +#### 10. 检查某个单元(cron.service)是否启用 #### # systemctl is-enabled crond.service enabled -#### 11. Check whether a Unit or Service is running or not?. #### +#### 11. 检查某个单元或服务是否运行 #### # systemctl status firewalld.service @@ -168,9 +167,9 @@ Also note the square brackets in the above example and rest of the examples to f Apr 28 16:27:51 tecmint systemd[1]: Starting firewalld - dynamic firewall daemon... Apr 28 16:27:55 tecmint systemd[1]: Started firewalld - dynamic firewall daemon. -### Control and Manage Services Using Systemctl ### +### 使用Systemctl控制并管理服务 ### -#### 12. List all services (including enabled and disabled). #### +#### 12. 列出所有服务(包括启用的和禁用的) #### # systemctl list-unit-files --type=service @@ -188,7 +187,7 @@ Also note the square brackets in the above example and rest of the examples to f dbus-org.fedoraproject.FirewallD1.service enabled .... -#### 13. How do I start, restart, stop, reload and check the status of a service (httpd.service) in Linux. #### +#### 13. Linux中如何启动、重启、停止、重载服务以及检查服务(httpd.service)状态 #### # systemctl start httpd.service # systemctl restart httpd.service @@ -215,15 +214,15 @@ Also note the square brackets in the above example and rest of the examples to f Apr 28 17:21:30 tecmint systemd[1]: Started The Apache HTTP Server. Hint: Some lines were ellipsized, use -l to show in full. -**Note**: When we use commands like start, restart, stop and reload with systemctl, we will not get any output on the terminal, only status command will print the output. +**注意**:当我们使用systemctl的start,restart,stop和reload命令时,我们不会不会从终端获取到任何输出内容,只有status命令可以打印输出。 -#### 14. How to active a service and enable or disable a service at boot time (auto start service at system boot). #### +#### 14. 如何激活服务并在启动时启用或禁用服务(系统启动时自动启动服务) #### # systemctl is-active httpd.service # systemctl enable httpd.service # systemctl disable httpd.service -#### 15. How to mask (making it impossible to start) or unmask a service (httpd.service). #### +#### 15. 如何屏蔽(让它不能启动)或显示服务(httpd.service) #### # systemctl mask httpd.service ln -s '/dev/null' '/etc/systemd/system/httpd.service' @@ -231,7 +230,7 @@ Also note the square brackets in the above example and rest of the examples to f # systemctl unmask httpd.service rm '/etc/systemd/system/httpd.service' -#### 16. How to a Kill a service using systemctl command. #### +#### 16. 使用systemctl命令杀死服务 #### # systemctl kill httpd # systemctl status httpd @@ -254,9 +253,9 @@ Also note the square brackets in the above example and rest of the examples to f Apr 28 18:01:42 tecmint systemd[1]: Unit httpd.service entered failed state. Hint: Some lines were ellipsized, use -l to show in full. -### Control and Manage Mount Points using Systemctl ### +### 使用Systemctl控制并管理挂载点 ### -#### 17. List all system mount points. #### +#### 17. 列出所有系统挂载点 #### # systemctl list-unit-files --type=mount @@ -269,7 +268,7 @@ Also note the square brackets in the above example and rest of the examples to f sys-kernel-debug.mount static tmp.mount disabled -#### 18. How do I mount, unmount, remount, reload system mount points and also check the status of mount points on the system. #### +#### 18. 挂载、卸载、重新挂载、重载系统挂载点并检查系统中挂载点状态 #### # systemctl start tmp.mount # systemctl stop tmp.mount @@ -292,13 +291,13 @@ Also note the square brackets in the above example and rest of the examples to f Apr 28 17:46:06 tecmint systemd[1]: tmp.mount: Directory /tmp to mount over is not empty, mounting anyway. Apr 28 17:46:06 tecmint systemd[1]: Mounted Temporary Directory. -#### 19. How to active, enable or disable a mount point at boot time (auto mount at system boot). #### +#### 19. 在启动时激活、启用或禁用挂载点(系统启动时自动挂载) #### # systemctl is-active tmp.mount # systemctl enable tmp.mount # systemctl disable tmp.mount -#### 20. How to mask (making it impossible to start) or unmask a mount points in Linux. #### +#### 20. 在Linux中屏蔽(让它不能启动)或显示挂载点 #### # systemctl mask tmp.mount @@ -308,9 +307,9 @@ Also note the square brackets in the above example and rest of the examples to f rm '/etc/systemd/system/tmp.mount' -### Control and Manage Sockets using Systemctl ### +### 使用Systemctl控制并管理套接口 ### -#### 21. List all available system sockets. #### +#### 21. 列出所有可用系统套接口 #### # systemctl list-unit-files --type=socket @@ -329,7 +328,7 @@ Also note the square brackets in the above example and rest of the examples to f 11 unit files listed. -#### 22. How do I start, restart, stop, reload and check the status of a socket (example: cups.socket) in Linux. #### +#### 22. 在Linux中启动、重启、停止、重载套接口并检查其状态#### # systemctl start cups.socket # systemctl restart cups.socket @@ -345,13 +344,13 @@ Also note the square brackets in the above example and rest of the examples to f Apr 28 18:10:59 tecmint systemd[1]: Starting CUPS Printing Service Sockets. Apr 28 18:10:59 tecmint systemd[1]: Listening on CUPS Printing Service Sockets. -#### 23. How to active a socket and enable or disable at boot time (auto start socket at system boot). #### +#### 23. 在启动时激活套接口,并启用或禁用它(系统启动时自启动) #### # systemctl is-active cups.socket # systemctl enable cups.socket # systemctl disable cups.socket -#### 24. How to mask (making it impossible to start) or unmask a socket (cups.socket). #### +#### 24. 屏蔽(使它不能启动)或显示套接口 #### # systemctl mask cups.socket ln -s '/dev/null' '/etc/systemd/system/cups.socket' @@ -359,31 +358,31 @@ Also note the square brackets in the above example and rest of the examples to f # systemctl unmask cups.socket rm '/etc/systemd/system/cups.socket' -### CPU Utilization (Shares) of a Service ### +### 服务的CPU利用率(分配额) ### -#### 25. Get the current CPU Shares of a Service (say httpd). #### +#### 25. 获取当前某个服务的CPU分配额(如httpd) #### # systemctl show -p CPUShares httpd.service CPUShares=1024 -**Note**: The default each service has a CPUShare = 1024. You may increase/decrease CPU share of a process. +**注意**:各个服务的默认CPU分配份额=1024,你可以增加/减少某个进程的CPU分配份额。 -#### 26. Limit the CPU Share of a service (httpd.service) to 2000 CPUShares/ #### +#### 26. 将某个服务(httpd.service)的CPU分配份额限制为2000 CPUShares/ #### # systemctl set-property httpd.service CPUShares=2000 # systemctl show -p CPUShares httpd.service CPUShares=2000 -**Note**: When you set CPUShare for a service, a directory with the name of service is created (httpd.service.d) which contains a file 90-CPUShares.conf which contains the CPUShare Limit information. You may view the file as: +**注意**:当你为某个服务设置CPUShares,会自动创建一个以服务名命名的目录(httpd.service),里面包含了一个名为90-CPUShares.conf的文件,该文件含有CPUShare限制信息,你可以通过以下方式查看该文件: # vi /etc/systemd/system/httpd.service.d/90-CPUShares.conf [Service] CPUShares=2000 -#### 27. Check all the configuration details of a service. #### +#### 27. 检查某个服务的所有配置细节 #### # systemctl show httpd @@ -402,7 +401,7 @@ Also note the square brackets in the above example and rest of the examples to f FragmentPath=/usr/lib/systemd/system/httpd.service .... -#### 28. Analyze critical chain for a services(httpd). #### +#### 28. 分析某个服务(httpd)的关键链 #### # systemd-analyze critical-chain httpd.service @@ -427,7 +426,7 @@ Also note the square brackets in the above example and rest of the examples to f └─systemd-fsck@dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d196080964.service @4.092s +149ms └─dev-disk-by\x2duuid-79f594ad\x2da332\x2d4730\x2dbb5f\x2d85d196080964.device @4.092s -#### 29. Get a list of dependencies for a services (httpd). #### +#### 29. 获取某个服务(httpd)的依赖性列表 #### # systemctl list-dependencies httpd.service @@ -449,7 +448,7 @@ Also note the square brackets in the above example and rest of the examples to f │ ├─dbus.socket .... -#### 30. List control groups hierarchically. #### +#### 30. 按等级列出控制组 #### # systemd-cgls @@ -473,7 +472,7 @@ Also note the square brackets in the above example and rest of the examples to f │ └─721 /usr/lib/polkit-1/polkitd --no-debug .... -#### 31. List control group according to CPU, memory, Input and Output. #### +#### 31. 按CPU、内存、输入和输出列出控制组 #### # systemd-cgtop @@ -502,9 +501,9 @@ Also note the square brackets in the above example and rest of the examples to f /system.slice/webmin.service 1 - - - - /user.slice/user-0.slice/session-1.scope 3 - - - - -### Control System Runlevels ### +### 控制系统运行等级 ### -#### 32. How to start system rescue mode. #### +#### 32. 启动系统救援模式 #### # systemctl rescue @@ -512,7 +511,7 @@ Also note the square brackets in the above example and rest of the examples to f The system is going down to rescue mode NOW! -#### 33. How to enter into emergency mode. #### +#### 33. 进入紧急模式 #### # systemctl emergency @@ -520,31 +519,31 @@ Also note the square brackets in the above example and rest of the examples to f system logs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode. -#### 34. List current run levels in use. #### +#### 34. 列出当前使用的运行等级 #### # systemctl get-default multi-user.target -#### 35. How to start Runlevel 5 aka graphical mode. #### +#### 35. 启动运行等级5,即图形模式 #### # systemctl isolate runlevel5.target OR # systemctl isolate graphical.target -#### 36. How to start Runlevel 3 aka multiuser mode (commandline). #### +#### 36. 启动运行等级3,即多用户模式(命令行) #### # systemctl isolate runlevel3.target OR # systemctl isolate multiuser.target -#### 36. How to set multiusermode or graphical mode as default runlevel. #### +#### 36. 设置多用户模式或图形模式为默认运行等级 #### # systemctl set-default runlevel3.target # systemctl set-default runlevel5.target -#### 37. How to reboot, halt, suspend, hibernate or put system in hybrid-sleep. #### +#### 37. 重启、停止、挂起、休眠系统或使系统进入混合睡眠 #### # systemctl reboot @@ -556,23 +555,23 @@ Also note the square brackets in the above example and rest of the examples to f # systemctl hybrid-sleep -For those who may not be aware of runlevels and what it does. +对于不知运行等级为何物的人,说明如下。 -- Runlevel 0 : Shut down and Power off the system. -- Runlevel 1 : Rescue?Maintainance Mode. -- Runlevel 3 : multiuser, no-graphic system. -- Runlevel 4 : multiuser, no-graphic system. -- Runlevel 5 : multiuser, graphical system. -- Runlevel 6 : Shutdown and Reboot the machine. +- Runlevel 0 : 关闭系统 +- Runlevel 1 : 救援?维护模式 +- Runlevel 3 : 多用户,无图形系统 +- Runlevel 4 : 多用户,无图形系统 +- Runlevel 5 : 多用户,图形化系统 +- Runlevel 6 : 关闭并重启机器 -That’s all for now. Keep connected! Keep commenting. Don’t forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread. +到此为止吧。保持连线,进行评论。别忘了在下面的评论中为我们提供一些有价值的反馈哦。喜欢我们、与我们分享,求扩散。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ 作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 9585447a391a2c8d43f1f68d8a49969610edc70d Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 7 May 2015 13:20:34 +0800 Subject: [PATCH 0729/2517] Translating by ZTinoZ --- ... Install Inkscape - Open Source Vector Graphic Editor.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md index 3deb76c7c0..35a36183e7 100644 --- a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md +++ b/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md @@ -10,9 +10,9 @@ Inkscape始于2003年,起初它的bug跟踪系统托管于Sourceforge上但是 #### 创建对象 #### -- Drawing different colored sized and shaped freehand lines through pencil tool, straight lines and curves through Bezier (pen) tool, applying freehand calligraphic strokes through calligraphic tool etc -- Creating, selecting, editing and formatting text through text tool. Manipulating text in plain text boxes, on paths or in shapes -- Helps draw various shapes like rectangles, ellipses, circles, arcs, polygons, stars, spirals etc and then resize, rotate and modify (turn sharp edges round) them +- 用铅笔工具来画出不同颜色、大小和形状的手绘线,用贝塞尔曲线(笔式)工具来画出直线和曲线,通过书法工具来应用到手写的书法笔画上等等 +- 用文本工具来创建、选择、编辑和格式化文本。Manipulating text in plain text boxes, on paths or in shapes +- 有效绘制各种形状,像矩形、椭圆形、圆形、弧线、多边形、星形和螺旋形等等并调整其大小、旋转并修改它们 and then resize, rotate and modify (turn sharp edges round) them - Create and embed bitmaps with simple commands #### 对象处理 #### From 70b29b6d59701ab226adc365cb3ccf8c7ae5a2f6 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Thu, 7 May 2015 15:10:47 +0800 Subject: [PATCH 0730/2517] translating again --- ...20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md index f85b2cf725..0f7a2d20aa 100644 --- a/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md +++ b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md @@ -1,3 +1,4 @@ +[translating by KayGuoWhu] Enjoy Android Apps on Ubuntu using ARChon Runtime ================================================================================ Before, we gave try to many android app emulating tools like Genymotion, Virtualbox, Android SDK, etc to try to run android apps on it. But, with this new Chrome Android Runtime, we are able to run Android Apps on our Chrome Browser. So, here are the steps we'll need to follow to install Android Apps on Ubuntu using ARChon Runtime. From f7d1200cd5d63383b6faf0636f57289e6ffcbe58 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 7 May 2015 16:15:40 +0800 Subject: [PATCH 0731/2517] =?UTF-8?q?20150507-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...to Monitor Linux Containers Performance.md | 192 ++++++++++++++++++ ... in Debian Ubuntu Linux Mint and Fedora.md | 134 ++++++++++++ 2 files changed, 326 insertions(+) create mode 100644 sources/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md create mode 100644 sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md diff --git a/sources/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md b/sources/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md new file mode 100644 index 0000000000..a9b1d4cd30 --- /dev/null +++ b/sources/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md @@ -0,0 +1,192 @@ +Command Line Tool to Monitor Linux Containers Performance +================================================================================ +ctop is a new command line based tool available to monitor the processes at the container level. Containers provide operating system level virtualization environment by making use of the cgroups resource management functionality. This tool collects data related to memory, cpu, block IO and metadata like owner, uptime etc from cgroups and presents it in a user readable format so that one can quickly asses the overall health of the system. Based on the data collected, it tries to guess the underlying container technology. ctop is useful in detecting who is using large amounts of memory under low memory situations. + +### Capabilities ### + +Some of the capabilities of ctop are: + +- Collect metrics for cpu, memory and blkio +- Gather information regarding owner, container technology, task count +- Sort the information using any column +- Display the information using tree view +- Fold/unfold cgroup tree +- Select and follow a cgroup/container +- Select a timeframe for refreshing the displayed data +- Pause the refreshing of data +- Detect containers that are based on systemd, Docker and LXC +- Advance features for Docker and LXC based containers + - open / attach a shell for further diagnosis + - stop / kill container types + +### Installation ### + +**ctop** is written using Python and there are no other external dependencies other than having to use Python version 2.6 or greater (with built-in cursor support). Installation using Python's pip is the recommended method. Install pip if not already done and install ctop using pip. + +*Note: The examples shown in this article are from an Ubuntu (14.10) system* + + $ sudo apt-get install python-pip + +Installing ctop using pip: + + poornima@poornima-Lenovo:~$ sudo pip install ctop + + [sudo] password for poornima: + + Downloading/unpacking ctop + + Downloading ctop-0.4.0.tar.gz + + Running setup.py (path:/tmp/pip_build_root/ctop/setup.py) egg_info for package ctop + + Installing collected packages: ctop + + Running setup.py install for ctop + + changing mode of build/scripts-2.7/ctop from 644 to 755 + + changing mode of /usr/local/bin/ctop to 755 + + Successfully installed ctop + + Cleaning up... + +If using pip is not an option, you can also install it directly from the github using wget: + + poornima@poornima-Lenovo:~$ wget https://raw.githubusercontent.com/yadutaf/ctop/master/cgroup_top.py -O ctop + + --2015-04-29 19:32:53-- https://raw.githubusercontent.com/yadutaf/ctop/master/cgroup_top.py + + Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.27.78.133 + + Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.27.78.133|:443... connected. + + HTTP request sent, awaiting response... 200 OK Length: 27314 (27K) [text/plain] + + Saving to: ctop + + 100%[======================================>] 27,314 --.-K/s in 0s + + 2015-04-29 19:32:59 (61.0 MB/s) - ctop saved [27314/27314] + +---------- + + poornima@poornima-Lenovo:~$ chmod +x ctop + +You might get an error message while launching ctop if cgroup-bin package is not installed. It can be resolved by installing the required package. + + poornima@poornima-Lenovo:~$ ./ctop + + [ERROR] Failed to locate cgroup mountpoints. + + poornima@poornima-Lenovo:~$ sudo apt-get install cgroup-bin + +Here is a sample output screen of ctop: + +![ctop screen](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop.png) +ctop screen + +### Usage options ### + + ctop [--tree] [--refresh=] [--columns=] [--sort-col=] [--follow=] [--fold=, ...] ctop (-h | --help) + +Once you are inside the ctop screen, use the up (↑) and down(↓) arrow keys to navigate between containers. Clicking on any container will select that particular container. Pressing q or Ctrl+C quits the container. + +Let us now take a look at how to use each of the options listed above. + + -h / --help - Show the help screen + +---------- + + poornima@poornima-Lenovo:~$ ctop -h + Usage: ctop [options] + + Options: + -h, --help show this help message and exit + --tree show tree view by default + --refresh=REFRESH Refresh display every + --follow=FOLLOW Follow cgroup path + --columns=COLUMNS List of optional columns to display. Always includes + 'name' + --sort-col=SORT_COL Select column to sort by initially. Can be changed + dynamically. + +---------- + + --tree - Display tree view of the containers + +By default, list view is displayed + +Once you are inside the ctop window, you can use the F5 button to toggle tree / list view. + + --fold= - Fold the cgroup path in the tree view. + + This option needs to be used in combination with --tree. + +---------- + + Eg: ctop --tree --fold=/user.slice + +![Output of 'ctop --fold'](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop-fold.png) +Output of 'ctop --fold' + +Inside the ctop window, use the + / - keys to toggle child cgroup folding. + +Note: At the time of writing this article, pip repository did not have the latest version of ctop which supports '--fold' option via command line. + + --follow= - Follow/Highlight the cgroup path. + +---------- + + Eg: ctop --follow=/user.slice/user-1000.slice + +As you can see in the screen below, the cgroup with the given path "/user.slice/user-1000.slice" gets highlighted and makes it easier for the user to follow it even when the display position gets changed. + +![Output of 'ctop --follow'](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop-follow.png) +Output of 'ctop --follow' + +You can also use the 'f' button to allow the highlighted line to follow the selected container. By default, follow is off. + + --refresh= - Refresh the display at the given rate. Default 1 sec + +This is useful in changing the refresh rate of the display as per user requirement. Use the 'p' button to pause the refresh and select the text. + + --columns= - Can limit the display to selected . 'name' should be the first entry followed by other columns. By default, the columns include owner, processes,memory, cpu-sys, cpu-user, blkio, cpu-time. + +---------- + + Eg: ctop --columns=name,owner,type,memory + +![Output of 'ctop --column'](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop-column.png) +Output of 'ctop --column' + + -sort-col= - column using which the displayed data should be sorted. By default it is sorted using cpu-user + +---------- + + Eg: ctop --sort-col=blkio + +If there are additional containers supported like Docker and LXC, following options will also be available: + + press 'a' - attach to console output + + press 'e' - open a shell in the container context + + press 's' – stop the container (SIGTERM) + + press 'k' - kill the container (SIGKILL) + +[ctop][1] is currently in active development by Jean-Tiare Le Bigot. Hopefully we would see more features in this tool like our native top command :-). + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/monitor-linux-containers-performance/ + +作者:[B N Poornima][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/bnpoornima/ +[1]:https://github.com/yadutaf/ctop \ No newline at end of file diff --git a/sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md b/sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md new file mode 100644 index 0000000000..611fdea333 --- /dev/null +++ b/sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md @@ -0,0 +1,134 @@ +Install uGet Download Manager 2.0 in Debian, Ubuntu, Linux Mint and Fedora +================================================================================ +After a long development period, which includes more than 11 developement releases, finally uGet project team pleased to announce the immediate availability of the latest stable version of uGet 2.0. The latest version includes numerous attractive features, such as a new setting dialog, improved BitTorrent and Metalink support added in the aria2 plugin, as well as better support for uGet RSS messages in the banner, other features include: + +- A new “Check for Updates” button informs you about new released versions. +- Added new languages & updated existing languages. +- Added a new “Message Banner” that allows developers to easily provide uGet related information to all users. +- Enhanced the Help Menu by including links to the Documentation, to submit Feedback & Bug Reports and more. +- Integrated uGet download manager into the two major browsers on the Linux platform, Firefox and Google Chrome. +- Improved support for Firefox Addon ‘FlashGot’. + +### What is uGet ### + +uGet (formerly known ad UrlGfe) is an open source, free and very powerful multi-platform GTK based download manager application was written in C language, that released and licensed under GPL. It offers large collection of features such as resuming downloads, multiple download support, categories support with an independent configuration, clipboard monitoring, download scheduler, import URLs from HTML files, integrated Flashgot plugin with Firefox and download torrent and metalink files using aria2 (a command-line download manager) that integrated with uGet. + +I have listed down all the key features of uGet Download Manager in detailed explanation. + +#### Key Features of uGet Download Manager #### + +- Downloads Queue: Place all your downloads into a Queue. As downloads finishes, the remaining queue files will automatically start downloading. +- Resume Downloads: If in case, your network connection disconnected, don’t worry you can start or resume download where it was left. +- Download Categories: Support for unlimited categories to manage downloads. +- Clipboard Monitor: Add the types of files to clipboard that automatically prompt you to download copied files. +- Batch Downloads: Allows you to easily add unlimited number of files at once for downloading. +- Multi-Protocol: Allows you to easily download files through HTTP, HTTPS, FTP, BitTorrent and Metalink using arial2 command-line plugin. +- Multi-Connection: Support for up to 20 simultaneous connections per download using aria2 plugin. +- FTP Login & Anonymous FTP: Added support for FTP login using username and password, as well as anonymous FTP. +- Scheduler: Added support for scheduled downloads, now you can schedule all your downloads. +- FireFox Integration via FlashGot: Integrated FlashGot as an independent supported Firefox extension that handles single or massive selection of files for downloading. +- CLI / Terminal Support: Offers command line or terminal option to download files. +- Folder Auto-Creation: If you have provided the save path for the download, but the save path doesn’t exist, uget will automatically create them. +- Download History Management: Keeps a track of finished download and recycled entries, per list 9,999 files. Entries which are older than the custom limit will be deleted automatically. +- Multi-Language Support: By default uGet uses English, but it support more than 23 languages. +- Aria2 Plugin: uGet integrated with Aria2 plugin to give more user friendly GUI. + +If you want to know a complete list of available features, see the official uGet [features page][1]. + +### Install uGet in Debian, Ubuntu, Linux Mint and Fedora ### + +The uGet developers added latest version in various repos throughout the Linux platform, so you can able to install or upgrade uGet using supported repository under your Linux distribution. + +Currently, a few Linux distributions are not up-to-date, but you can get the status of your distribution by going to the [uGet Download page][2] and selecting your preferred distro from there for more details. + +#### On Debian #### + +In Debian Testing (Jessie) and Debian Unstable (Sid), you can easily install and update using the official repository on a fairly reliable basis. + + $ sudo apt-get update + $ sudo apt-get install uget + +#### On Ubuntu & Linux Mint #### + +In Ubuntu and Linux Mint, you can install and update uGet using official PPA repository ‘ppa:plushuang-tw/uget-stable‘. By using this PPA, you automatically be kept up-to-date with the latest versions. + + $ sudo add-apt-repository ppa:plushuang-tw/uget-stable + $ sudo apt-get update + $ sudo apt-get install uget + +#### On Fedora #### + +In Fedora 20 – 21, latest version of uGet (2.0) available from the official repositories, installing from these repo is fairly reliable. + + $ sudo yum install uget + +**Note**: On older versions of Debian, Ubuntu, Linux Mint and Fedora, users can also install uGet. but the available version is 1.10.4. If you are looking for updated version (i.e. 2.0) you need to upgrade your system and add uGet PPA to get latest stable version. + +### Installing aria2 plugin ### + +[aria2][3] is a excellent command-line download utility, that is used by uGet as a aria2 plugin to add even more great functionality such as downloading torrent files, metalinks, multi-protocol & multi-source download. + +By default uGet uses CURL as backend in most of the today’s Linux systems, but the aria2 Plugin replaces CURL with aria2 as the backend. + +aria2 is a separate package that needs to be installed separately. You can easily install latest version of aria2 using supported repository under your Linux distribution or you can also use [downloads-aria2][4] that explains how to install aria2 on each distro. + +#### On Debian, Ubuntu and Linux Mint #### + +Use the official aria2 PPA repository to install latest version of aria2 using the following commands. + + $ sudo add-apt-repository ppa:t-tujikawa/ppa + $ sudo apt-get update + $ sudo apt-get install aria2 + +#### On Fedora #### + +Fedora’s official repositories already added aria2 package, so you can easily install it using the following yum command. + + $ sudo yum install aria2 + +#### Starting uGet #### + +To start uGet application, from the desktop “Menu” on search bar type “uget“. Refer below screenshot. + +![Start uGet Download Manager](http://www.tecmint.com/wp-content/uploads/2014/03/Start-uGet.gif) +Start uGet Download Manager + +![uGet Version: 2.0](http://www.tecmint.com/wp-content/uploads/2014/03/uGet-Version.gif) +uGet Version: 2.0 + +#### Activate aria2 Plugin in uGet #### + +To active the aria2 plugin, from the uGet menu go to Edit –> Settings –> Plug-in tab, from the drop-down select “arial2“. + +![Enable Aria2 Plugin for uGet](http://www.tecmint.com/wp-content/uploads/2014/03/Enable-Aria2-Plugin.gif) +Enable Aria2 Plugin for uGet + +### uGet 2.0 Screenshot Tour ### + +![Download Files Using Aria2](http://www.tecmint.com/wp-content/uploads/2014/03/Download-Files-Using-Aria2.gif) +Download Files Using Aria2 + +![Download Torrent File Using uGet](http://www.tecmint.com/wp-content/uploads/2014/03/Download-Torrent-File.gif) +Download Torrent File Using uGet + +![Batch Downloads Using uGet](http://www.tecmint.com/wp-content/uploads/2014/03/Batch-Download-Files.gif) +Batch Downloads Using uGet + +uGet source files and RPM packages also available for other Linux distributions and Windows at [download page][5]. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-uget-download-manager-in-linux/ + +作者:[Ravi Saive][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/admin/ +[1]:http://uget.visuex.com/features +[2]:http://ugetdm.com/downloads +[3]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/ +[4]:http://ugetdm.com/downloads-aria2 +[5]:http://ugetdm.com/downloads \ No newline at end of file From 9eebc0398e2b1a472b31b6398f5790e5823fd3a5 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 8 May 2015 00:39:26 +0800 Subject: [PATCH 0732/2517] PUB:20150410 This tool can alert you about evil twin access points in the area @wi-cuckoo --- ...out evil twin access points in the area.md | 41 +++++++++++++++++++ ...out evil twin access points in the area.md | 40 ------------------ 2 files changed, 41 insertions(+), 40 deletions(-) create mode 100644 published/20150410 This tool can alert you about evil twin access points in the area.md delete mode 100644 translated/share/20150410 This tool can alert you about evil twin access points in the area.md diff --git a/published/20150410 This tool can alert you about evil twin access points in the area.md b/published/20150410 This tool can alert you about evil twin access points in the area.md new file mode 100644 index 0000000000..a43aa8206f --- /dev/null +++ b/published/20150410 This tool can alert you about evil twin access points in the area.md @@ -0,0 +1,41 @@ +EvilAP_Defender:可以警示和攻击 WIFI 热点陷阱的工具 +=============================================================================== + +**开发人员称,EvilAP_Defender甚至可以攻击流氓Wi-Fi接入点** + +这是一个新的开源工具,可以定期扫描一个区域,以防出现恶意 Wi-Fi 接入点,同时如果发现情况会提醒网络管理员。 + +这个工具叫做 EvilAP_Defender,是为监测攻击者所配置的恶意接入点而专门设计的,这些接入点冒用合法的名字诱导用户连接上。 + +这类接入点被称做假面猎手(evil twin),使得黑客们可以从所接入的设备上监听互联网信息流。这可以被用来窃取证书、钓鱼网站等等。 + +大多数用户设置他们的计算机和设备可以自动连接一些无线网络,比如家里的或者工作地方的网络。通常,当面对两个同名的无线网络时,即SSID相同,有时候甚至连MAC地址(BSSID)也相同,这时候大多数设备会自动连接信号较强的一个。 + +这使得假面猎手攻击容易实现,因为SSID和BSSID都可以伪造。 + +[EvilAP_Defender][1]是一个叫Mohamed Idris的人用Python语言编写,公布在GitHub上面。它可以使用一个计算机的无线网卡来发现流氓接入点,这些坏蛋们复制了一个真实接入点的SSID,BSSID,甚至是其他的参数如通道,密码,隐私协议和认证信息等等。 + +该工具首先以学习模式运行,以便发现合法的接入点[AP],并且将其加入白名单。然后可以切换到正常模式,开始扫描未认证的接入点。 + +如果一个恶意[AP]被发现了,该工具会用电子邮件提醒网络管理员,但是开发者也打算在未来加入短信提醒功能。 + +该工具还有一个保护模式,在这种模式下,应用会发起一个denial-of-service [DoS]攻击反抗恶意接入点,为管理员采取防卫措施赢得一些时间。 + +“DoS 将仅仅针对有着相同SSID的而BSSID(AP的MAC地址)不同或者不同信道的流氓 AP,”Idris在这款工具的文档中说道。“这是为了避免攻击到你的正常网络。” + +尽管如此,用户应该切记在许多国家,攻击别人的接入点很多时候都是非法的,甚至是一个看起来像是攻击者操控的恶意接入点。 + +要能够运行这款工具,需要Aircrack-ng无线网套装,一个支持Aircrack-ng的无线网卡,MySQL和Python运行环境。 + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2905725/security0/this-tool-can-alert-you-about-evil-twin-access-points-in-the-area.html + +作者:[Lucian Constantin][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Lucian-Constantin/ +[1]:https://github.com/moha99sa/EvilAP_Defender/blob/master/README.TXT diff --git a/translated/share/20150410 This tool can alert you about evil twin access points in the area.md b/translated/share/20150410 This tool can alert you about evil twin access points in the area.md deleted file mode 100644 index 963460501d..0000000000 --- a/translated/share/20150410 This tool can alert you about evil twin access points in the area.md +++ /dev/null @@ -1,40 +0,0 @@ -这个工具可以提醒你一个区域内的假面猎手接入点 (注:evil twin暂无相关翻译) -=============================================================================== -**开发人员称,EvilAP_Defender甚至可以攻击流氓Wi-Fi接入点** - -一个新的开源工具可以定期扫描一个区域,以防流氓Wi-Fi接入点,同时如果发现情况会提醒网络管理员。 - -这个工具叫做EvilAP_Defender,是为监测攻击者配置的恶意接入点而专门设计的,这些接入点冒用合法的名字诱导用户连接上。 - -这类接入点被称做假面猎手,使得黑客们从接入的设备上监听互联网信息流。这可以被用来窃取证书,破坏网站等等。 - -大多数用户设置他们的计算机和设备可以自动连接一些无线网络,比如家里的或者工作地方的网络。尽管如此,当面对两个同名的无线网络时,即SSID相同,有时候甚至时MAC地址也相同,这时候大多数设备会自动连接信号较强的一个。 - -这使得假面猎手的攻击容易实现,因为SSID和BSSID都可以伪造。 - -[EvilAP_Defender][1]是一个叫Mohamed Idris的人用Python语言编写,公布在GitHub上面。它可以使用一个计算机的无线网卡来发现流氓接入点,这些接入点复制了一个真实接入点的SSID,BSSID,甚至是其他的参数如通道,密码,隐私协议和认证信息。 - -该工具首先以学习模式运行,为了发现合法的接入点[AP],并且加入白名单。然后切换到正常模式,开始扫描未认证的接入点。 - -如果一个恶意[AP]被发现了,该工具会用电子邮件提醒网络管理员,但是开发者也打算在未来加入短信提醒功能。 - -该工具还有一个保护模式,在这种模式下,应用会发起一个denial-of-service [DoS]攻击反抗恶意接入点,为管理员采取防卫措施赢得一些时间。 - -“DoS不仅针对有着相同SSID的恶意AP,也针对BSSID(AP的MAC地址)不同或者不同信道的,”Idris在这款工具的文档中说道。“这是避免攻击你的合法网络。” - -尽管如此,用户应该切记在许多国家,攻击别人的接入点,甚至一个可能一个攻击者操控的恶意的接入点,很多时候都是非法的。 - -为了能够运行这款工具,需要Aircrack-ng无线网套装,一个支持Aircrack-ng的无线网卡,MySQL和Python运行环境。 - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2905725/security0/this-tool-can-alert-you-about-evil-twin-access-points-in-the-area.html - -作者:[Lucian Constantin][a] -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Lucian-Constantin/ -[1] https://github.com/moha99sa/EvilAP_Defender/blob/master/README.TXT From 8e0a658c104c7b1b5e4096cba1679630be380940 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 8 May 2015 01:17:45 +0800 Subject: [PATCH 0733/2517] PUB:20150128 Docker-3 Automated Docker-based Rails deployments @DongShuaike --- ...utomated Docker-based Rails deployments.md | 90 +++++++++---------- 1 file changed, 41 insertions(+), 49 deletions(-) rename {translated/tech => published}/20150128 Docker-3 Automated Docker-based Rails deployments.md (68%) diff --git a/translated/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md b/published/20150128 Docker-3 Automated Docker-based Rails deployments.md similarity index 68% rename from translated/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md rename to published/20150128 Docker-3 Automated Docker-based Rails deployments.md index cd3917dfcf..be256ff1da 100644 --- a/translated/tech/20150128 Docker-3 Automated Docker-based Rails deployments.md +++ b/published/20150128 Docker-3 Automated Docker-based Rails deployments.md @@ -1,12 +1,14 @@ - 自动化部署基于Docker的Rails应用 ================================================================================ ![](http://cocoahunter.com/content/images/2015/01/docker3.jpeg) [TL;DR] 这是系列文章的第三篇,讲述了我的公司是如何将基础设施从PaaS移植到Docker上的。 + - [第一部分][1]:谈论了我接触Docker之前的经历; - [第二部分][2]:一步步搭建一个安全而又私有的registry。 + ---------- + 在系列文章的最后一篇里,我们将用一个实例来学习如何自动化整个部署过程。 ### 基本的Rails应用程序### @@ -18,99 +20,97 @@ $ rvm use 2.2.0 $ rails new && cd docker-test -创建一个基础控制器: +创建一个基本的控制器: $ rails g controller welcome index -……然后编辑 `routes.rb` ,以便让工程的根指向我们新创建的welcome#index方法:(这句话理解不太理解) +……,然后编辑 `routes.rb` ,以便让该项目的根指向我们新创建的welcome#index方法: root 'welcome#index' -在终端运行 `rails s` ,然后打开浏览器,登录[http://localhost:3000][3],你会进入到索引界面当中。我们不准备给应用加上多么神奇的东西,这只是一个基础实例,用来验证当我们将要创建并部署容器的时候,一切运行正常。 +在终端运行 `rails s` ,然后打开浏览器,登录[http://localhost:3000][3],你会进入到索引界面当中。我们不准备给应用加上多么神奇的东西,这只是一个基础的实例,当我们将要创建并部署容器的时候,用它来验证一切是否运行正常。 ### 安装webserver ### 我们打算使用Unicorn当做我们的webserver。在Gemfile中添加 `gem 'unicorn'`和 `gem 'foreman'`然后将它bundle起来(运行 `bundle install`命令)。 -在Rails应用启动的伺候,需要配置Unicorn,所以我们将一个**unicorn.rb**文件放在**config**目录下。[这里有一个Unicorn配置文件的例子][4]你可以直接复制粘贴Gist的内容。 +启动Rails应用时,需要先配置好Unicorn,所以我们将一个**unicorn.rb**文件放在**config**目录下。[这里有一个Unicorn配置文件的例子][4],你可以直接复制粘贴Gist的内容。 -Let's also add a Procfile with the following content inside the root of the project so that we will be able to start the app with foreman: -接下来,在工程的根目录下添加一个Procfile,以便可以使用foreman启动应用,内容为下: +接下来,在项目的根目录下添加一个Procfile,以便可以使用foreman启动应用,内容为下: web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb 现在运行**foreman start**命令启动应用,一切都将正常运行,并且你将能够在[http://localhost:5000][5]上看到一个正在运行的应用。 -### 创建一个Docker映像 ### +### 构建一个Docker镜像 ### -现在我们创建一个映像来运行我们的应用。在Rails工程的跟目录下,创建一个名为**Dockerfile**的文件,然后粘贴进以下内容: +现在我们构建一个镜像来运行我们的应用。在这个Rails项目的根目录下,创建一个名为**Dockerfile**的文件,然后粘贴进以下内容: - # Base image with ruby 2.2.0 + # 基于镜像 ruby 2.2.0 FROM ruby:2.2.0 - # Install required libraries and dependencies + # 安装所需的库和依赖 RUN apt-get update && apt-get install -qy nodejs postgresql-client sqlite3 --no-install-recommends && rm -rf /var/lib/apt/lists/* - # Set Rails version + # 设置 Rails 版本 ENV RAILS_VERSION 4.1.1 - # Install Rails + # 安装 Rails RUN gem install rails --version "$RAILS_VERSION" - # Create directory from where the code will run + # 创建代码所运行的目录 RUN mkdir -p /usr/src/app WORKDIR /usr/src/app - # Make webserver reachable to the outside world + # 使 webserver 可以在容器外面访问 EXPOSE 3000 - # Set ENV variables + # 设置环境变量 ENV PORT=3000 - # Start the web app + # 启动 web 应用 CMD ["foreman","start"] - # Install the necessary gems + # 安装所需的 gems ADD Gemfile /usr/src/app/Gemfile ADD Gemfile.lock /usr/src/app/Gemfile.lock RUN bundle install --without development test - # Add rails project (from same dir as Dockerfile) to project directory + # 将 rails 项目(和 Dockerfile 同一个目录)添加到项目目录 ADD ./ /usr/src/app - # Run rake tasks + # 运行 rake 任务 RUN RAILS_ENV=production rake db:create db:migrate -使用提供的Dockerfile,执行下列命令创建一个映像[1][7]: +使用上述Dockerfile,执行下列命令创建一个镜像(确保**boot2docker**已经启动并在运行当中): $ docker build -t localhost:5000/your_username/docker-test . -然后,如果一切正常,长日志输出的最后一行应该类似于: +然后,如果一切正常,长长的日志输出的最后一行应该类似于: Successfully built 82e48769506c $ docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE localhost:5000/your_username/docker-test latest 82e48769506c About a minute ago 884.2 MB -来运行容器吧! +让我们运行一下容器试试! $ docker run -d -p 3000:3000 --name docker-test localhost:5000/your_username/docker-test -You should be able to reach your Rails app running inside the Docker container at port 3000 of your boot2docker VM[2][8] (in my case [http://192.168.59.103:3000][6]). -通过你的boot2docker虚拟机[2][8]的3000号端口(我的是[http://192.168.59.103:3000][6]),你可以观察你的Rails应用。 +通过你的boot2docker虚拟机的3000号端口(我的是[http://192.168.59.103:3000][6]),你可以观察你的Rails应用。(如果不清楚你的boot2docker虚拟地址,输入` $ boot2docker ip`命令查看。) ### 使用shell脚本进行自动化部署 ### -前面的文章(指文章1和文章2)已经告诉了你如何将新创建的映像推送到私有registry中,并将其部署在服务器上,所以我们跳过这一部分直接开始自动化进程。 +前面的文章(指文章1和文章2)已经告诉了你如何将新创建的镜像推送到私有registry中,并将其部署在服务器上,所以我们跳过这一部分直接开始自动化进程。 我们将要定义3个shell脚本,然后最后使用rake将它们捆绑在一起。 ### 清除 ### -每当我们创建映像的时候, +每当我们创建镜像的时候, - 停止并重启boot2docker; -- 去除Docker孤儿映像(那些没有标签,并且不再被容器所使用的映像们)。 +- 去除Docker孤儿镜像(那些没有标签,并且不再被容器所使用的镜像们)。 在你的工程根目录下的**clean.sh**文件中输入下列命令。 @@ -132,22 +132,22 @@ You should be able to reach your Rails app running inside the Docker container a $ chmod +x clean.sh -### 创建 ### +### 构建 ### -创建的过程基本上和之前我们所做的(docker build)内容相似。在工程的根目录下创建一个**build.sh**脚本,填写如下内容: +构建的过程基本上和之前我们所做的(docker build)内容相似。在工程的根目录下创建一个**build.sh**脚本,填写如下内容: docker build -t localhost:5000/your_username/docker-test . -给脚本执行权限。 +记得给脚本执行权限。 ### 部署 ### 最后,创建一个**deploy.sh**脚本,在里面填进如下内容: - # Open SSH connection from boot2docker to private registry + # 打开 boot2docker 到私有注册库的 SSH 连接 boot2docker ssh "ssh -o 'StrictHostKeyChecking no' -i /Users/username/.ssh/id_boot2docker -N -L 5000:localhost:5000 root@your-registry.com &" & - # Wait to make sure the SSH tunnel is open before pushing... + # 在推送前先确认该 SSH 通道是开放的。 echo Waiting 5 seconds before pushing image. echo 5... @@ -165,7 +165,7 @@ You should be able to reach your Rails app running inside the Docker container a echo Starting push! docker push localhost:5000/username/docker-test -如果你不理解这其中的含义,请先仔细阅读这部分[part 2][9]。 +如果你不理解这其中的含义,请先仔细阅读这部分[第二部分][2]。 给脚本加上执行权限。 @@ -179,10 +179,9 @@ You should be able to reach your Rails app running inside the Docker container a 这一点都不费工夫,可是事实上开发者比你想象的要懒得多!那么咱们就索性再懒一点! -我们最后再把工作好好整理一番,我们现在要将三个脚本捆绑在一起,通过rake。 - -为了更简单一点,你可以在工程根目录下已经存在的Rakefile中添加几行代码,打开Rakefile文件——pun intended——把下列内容粘贴进去。 +我们最后再把工作好好整理一番,我们现在要将三个脚本通过rake捆绑在一起。 +为了更简单一点,你可以在工程根目录下已经存在的Rakefile中添加几行代码,打开Rakefile文件,把下列内容粘贴进去。 namespace :docker do desc "Remove docker container" @@ -221,34 +220,27 @@ Deploy独立于build,build独立于clean。所以每次我们输入命令运 $ rake docker:deploy -接下来就是见证奇迹的时刻了。一旦映像文件被上传(第一次可能花费较长的时间),你就可以ssh登录产品服务器,并且(通过SSH管道)把docker映像拉取到服务器并运行了。多么简单! +接下来就是见证奇迹的时刻了。一旦镜像文件被上传(第一次可能花费较长的时间),你就可以ssh登录产品服务器,并且(通过SSH管道)把docker镜像拉取到服务器并运行了。多么简单! 也许你需要一段时间来习惯,但是一旦成功,它几乎与用Heroku部署一样简单。 备注:像往常一样,请让我了解到你的意见。我不敢保证这种方法是最好,最快,或者最安全的Docker开发的方法,但是这东西对我们确实奏效。 -- 确保**boot2docker**已经启动并在运行当中。 -- 如果你不了解你的boot2docker虚拟地址,输入` $ boot2docker ip`命令查看。 -- 点击[here][10],教你怎样搭建私有的registry。 - -------------------------------------------------------------------------------- via: http://cocoahunter.com/2015/01/23/docker-3/ 作者:[Michelangelo Chasseur][a] 译者:[DongShuaike](https://github.com/DongShuaike) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://cocoahunter.com/author/michelangelo/ -[1]:http://cocoahunter.com/docker-1 -[2]:http://cocoahunter.com/2015/01/23/docker-2/ +[1]:https://linux.cn/article-5339-1.html +[2]:https://linux.cn/article-5379-1.html [3]:http://localhost:3000/ [4]:https://gist.github.com/chasseurmic/0dad4d692ff499761b20 [5]:http://localhost:5000/ [6]:http://192.168.59.103:3000/ -[7]:http://cocoahunter.com/2015/01/23/docker-3/#fn:1 -[8]:http://cocoahunter.com/2015/01/23/docker-3/#fn:2 -[9]:http://cocoahunter.com/2015/01/23/docker-2/ -[10]:http://cocoahunter.com/2015/01/23/docker-2/ + From 9ee552897f51ea8de0b5a796d9ebd1eccf6b6a33 Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 8 May 2015 08:04:13 +0800 Subject: [PATCH 0734/2517] Update 20150507 Command Line Tool to Monitor Linux Containers Performance.md --- ...ommand Line Tool to Monitor Linux Containers Performance.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md b/sources/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md index a9b1d4cd30..508741669f 100644 --- a/sources/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md +++ b/sources/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Command Line Tool to Monitor Linux Containers Performance ================================================================================ ctop is a new command line based tool available to monitor the processes at the container level. Containers provide operating system level virtualization environment by making use of the cgroups resource management functionality. This tool collects data related to memory, cpu, block IO and metadata like owner, uptime etc from cgroups and presents it in a user readable format so that one can quickly asses the overall health of the system. Based on the data collected, it tries to guess the underlying container technology. ctop is useful in detecting who is using large amounts of memory under low memory situations. @@ -189,4 +190,4 @@ via: http://linoxide.com/how-tos/monitor-linux-containers-performance/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/bnpoornima/ -[1]:https://github.com/yadutaf/ctop \ No newline at end of file +[1]:https://github.com/yadutaf/ctop From 548d100d014f85569a38aaafeb8a88ac87c52bbf Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 8 May 2015 09:35:39 +0800 Subject: [PATCH 0735/2517] [Translated]20150507 Command Line Tool to Monitor Linux Containers Performance.md --- ...to Monitor Linux Containers Performance.md | 81 +++++++++---------- 1 file changed, 40 insertions(+), 41 deletions(-) rename {sources => translated}/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md (52%) diff --git a/sources/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md b/translated/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md similarity index 52% rename from sources/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md rename to translated/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md index 508741669f..d33e68ffd9 100644 --- a/sources/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md +++ b/translated/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md @@ -1,34 +1,33 @@ -Translating by GOLinux! -Command Line Tool to Monitor Linux Containers Performance +监控Linux容器性能的命令行神器 ================================================================================ -ctop is a new command line based tool available to monitor the processes at the container level. Containers provide operating system level virtualization environment by making use of the cgroups resource management functionality. This tool collects data related to memory, cpu, block IO and metadata like owner, uptime etc from cgroups and presents it in a user readable format so that one can quickly asses the overall health of the system. Based on the data collected, it tries to guess the underlying container technology. ctop is useful in detecting who is using large amounts of memory under low memory situations. +ctop是一个新的基于命令行的工具,它可用于在容器层级监控进程。容器通过利用控制器组(cgroup)的资源管理功能,提供了操作系统层级的虚拟化环境。该工具收集来自cgroup的与内存、CPU、块输入输出和诸如拥有者、开机时间等相关的元数据,并以人性化的格式呈现给用户,这样就可以快速对系统健康状况进行评估。基于所获得的数据,它可以尝试推测潜在的容器技术。ctop也有助于在低内存环境中检测出谁在消耗大量的内存。 -### Capabilities ### +### 功能 ### -Some of the capabilities of ctop are: +ctop的一些功能如下: -- Collect metrics for cpu, memory and blkio -- Gather information regarding owner, container technology, task count -- Sort the information using any column -- Display the information using tree view -- Fold/unfold cgroup tree -- Select and follow a cgroup/container -- Select a timeframe for refreshing the displayed data -- Pause the refreshing of data -- Detect containers that are based on systemd, Docker and LXC -- Advance features for Docker and LXC based containers - - open / attach a shell for further diagnosis - - stop / kill container types +- 收集CPU、内存和块输入输出的度量值 +- 收集与拥有者、容器技术和任务统计相关的信息 +- 使用任何栏目对信息排序 +- 以树状视图显示信息 +- 折叠/展开cgroup树 +- 选择并跟踪cgroup/容器 +- 选择显示数据刷新时间框架 +- 暂停刷新数据 +- 检测基于systemd、Docker和LXC的容器 +- 基于Docker和LXC的容器的高级特性 + - 打开/连接shell以进行深度诊断 + - 停止/杀死容器类型 -### Installation ### +### 安装 ### -**ctop** is written using Python and there are no other external dependencies other than having to use Python version 2.6 or greater (with built-in cursor support). Installation using Python's pip is the recommended method. Install pip if not already done and install ctop using pip. +**ctop**是由Python写成的,因此,除了需要Python 2.6或其更高版本外(支持内建光标),别无其它外部依赖。推荐使用Python的pip进行安装,如果还没有安装pip,请先安装,然后使用pip安装ctop。 -*Note: The examples shown in this article are from an Ubuntu (14.10) system* +*注意:本文样例来自Ubuntu(14.10)系统* $ sudo apt-get install python-pip -Installing ctop using pip: +使用pip安装ctop: poornima@poornima-Lenovo:~$ sudo pip install ctop @@ -52,7 +51,7 @@ Installing ctop using pip: Cleaning up... -If using pip is not an option, you can also install it directly from the github using wget: +如果不选择使用pip安装,你也可以使用wget直接从github安装: poornima@poornima-Lenovo:~$ wget https://raw.githubusercontent.com/yadutaf/ctop/master/cgroup_top.py -O ctop @@ -74,7 +73,7 @@ If using pip is not an option, you can also install it directly from the github poornima@poornima-Lenovo:~$ chmod +x ctop -You might get an error message while launching ctop if cgroup-bin package is not installed. It can be resolved by installing the required package. +如果cgroup-bin包没有安装,你可能会碰到一个错误消息,你可以通过安装需要的包来解决。 poornima@poornima-Lenovo:~$ ./ctop @@ -82,18 +81,18 @@ You might get an error message while launching ctop if cgroup-bin package is not poornima@poornima-Lenovo:~$ sudo apt-get install cgroup-bin -Here is a sample output screen of ctop: +下面是ctop的输出样例: ![ctop screen](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop.png) -ctop screen +ctop屏幕 -### Usage options ### +### 用法选项 ### ctop [--tree] [--refresh=] [--columns=] [--sort-col=] [--follow=] [--fold=, ...] ctop (-h | --help) -Once you are inside the ctop screen, use the up (↑) and down(↓) arrow keys to navigate between containers. Clicking on any container will select that particular container. Pressing q or Ctrl+C quits the container. +一旦你进入ctop屏幕,使用上(↑)和下(↓)箭头键在容器间导航。点击某个容器就选定了该容器,按q或Ctrl+C退出容器。 -Let us now take a look at how to use each of the options listed above. +现在,让我们来看看上面列出的那一堆选项究竟是怎么用的吧。 -h / --help - Show the help screen @@ -116,9 +115,9 @@ Let us now take a look at how to use each of the options listed above. --tree - Display tree view of the containers -By default, list view is displayed +默认情况下,会显示列表视图 -Once you are inside the ctop window, you can use the F5 button to toggle tree / list view. +一旦你进入ctop窗口,你可以使用F5按钮在树状/列表视图间切换。 --fold= - Fold the cgroup path in the tree view. @@ -129,11 +128,11 @@ Once you are inside the ctop window, you can use the F5 button to toggle tree / Eg: ctop --tree --fold=/user.slice ![Output of 'ctop --fold'](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop-fold.png) -Output of 'ctop --fold' +‘ctop --fold’的输出 -Inside the ctop window, use the + / - keys to toggle child cgroup folding. +在ctop窗口中,使用+/-键来展开或折叠子cgroup。 -Note: At the time of writing this article, pip repository did not have the latest version of ctop which supports '--fold' option via command line. +注意:在写本文时,pip仓库中还没有最新版的ctop,还不支持命令行的‘--fold’选项 --follow= - Follow/Highlight the cgroup path. @@ -141,16 +140,16 @@ Note: At the time of writing this article, pip repository did not have the lates Eg: ctop --follow=/user.slice/user-1000.slice -As you can see in the screen below, the cgroup with the given path "/user.slice/user-1000.slice" gets highlighted and makes it easier for the user to follow it even when the display position gets changed. +正如你在下面屏幕中所见到的那样,带有“/user.slice/user-1000.slice”路径的cgroup被高亮显示,这让用户易于跟踪,就算显示位置变了也一样。 ![Output of 'ctop --follow'](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop-follow.png) -Output of 'ctop --follow' +‘ctop --follow’的输出 -You can also use the 'f' button to allow the highlighted line to follow the selected container. By default, follow is off. +你也可以使用‘f’按钮来让高亮的行跟踪选定的容器。默认情况下,跟踪是关闭的。 --refresh= - Refresh the display at the given rate. Default 1 sec -This is useful in changing the refresh rate of the display as per user requirement. Use the 'p' button to pause the refresh and select the text. +这对于按每用户需求来显示改变刷新率时很有用。使用‘p’按钮可以暂停刷新并选择文本。 --columns= - Can limit the display to selected . 'name' should be the first entry followed by other columns. By default, the columns include owner, processes,memory, cpu-sys, cpu-user, blkio, cpu-time. @@ -159,7 +158,7 @@ This is useful in changing the refresh rate of the display as per user requireme Eg: ctop --columns=name,owner,type,memory ![Output of 'ctop --column'](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop-column.png) -Output of 'ctop --column' +‘ctop --column’的输出 -sort-col= - column using which the displayed data should be sorted. By default it is sorted using cpu-user @@ -167,7 +166,7 @@ Output of 'ctop --column' Eg: ctop --sort-col=blkio -If there are additional containers supported like Docker and LXC, following options will also be available: +如果有Docker和LXC支持的额外容器,跟踪选项也是可用的: press 'a' - attach to console output @@ -177,14 +176,14 @@ If there are additional containers supported like Docker and LXC, following opti press 'k' - kill the container (SIGKILL) -[ctop][1] is currently in active development by Jean-Tiare Le Bigot. Hopefully we would see more features in this tool like our native top command :-). +[ctop][1]当前还处于Jean-Tiare Le Bigot的开发中,希望我们能在该工具中见到像本地top命令一样的特性 :-) -------------------------------------------------------------------------------- via: http://linoxide.com/how-tos/monitor-linux-containers-performance/ 作者:[B N Poornima][a] -译者:[译者ID](https://github.com/译者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 0335bf82df2ba80117c723716878f66274b9b4ff Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 8 May 2015 09:38:17 +0800 Subject: [PATCH 0736/2517] Update 20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md --- ...ers--How to install Shrew Soft IPsec VPN client on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md b/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md index 24c09c85bd..2ef0ba111d 100644 --- a/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md +++ b/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux ================================================================================ > **Question**: I need to connect to an IPSec VPN gateway. For that, I'm trying to use Shrew Soft VPN client, which is available for free. How can I install Shrew Soft VPN client on [insert your Linux distro]? @@ -94,4 +95,4 @@ via: http://ask.xmodulo.com/install-shrew-soft-ipsec-vpn-client-linux.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni -[1]:https://www.shrew.net/download/ike \ No newline at end of file +[1]:https://www.shrew.net/download/ike From d481015932d2236cab9f762cfd390ac19a7d9c24 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 8 May 2015 10:18:40 +0800 Subject: [PATCH 0737/2517] [Translated]20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md --- ...ll Shrew Soft IPsec VPN client on Linux.md | 98 ------------------- ...ll Shrew Soft IPsec VPN client on Linux.md | 98 +++++++++++++++++++ 2 files changed, 98 insertions(+), 98 deletions(-) delete mode 100644 sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md create mode 100644 translated/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md b/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md deleted file mode 100644 index 2ef0ba111d..0000000000 --- a/sources/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md +++ /dev/null @@ -1,98 +0,0 @@ -Translating by GOLinux! -Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux -================================================================================ -> **Question**: I need to connect to an IPSec VPN gateway. For that, I'm trying to use Shrew Soft VPN client, which is available for free. How can I install Shrew Soft VPN client on [insert your Linux distro]? - -There are many commercial VPN gateways available, which come with their own proprietary VPN client software. While there are also open-source VPN server/client alternatives, they are typically lacking in sophisticated IPsec support, such as Internet Key Exchange (IKE) which is a standard IPsec protocol used to secure VPN key exchange and authentication. Shrew Soft VPN is a free IPsec VPN client supporting a number of authentication methods, key exchange, encryption and firewall traversal options. - -Here is how you can install Shrew Soft VPN client on Linux platforms. - -First, download its source code from the [official website][1]. - -### Install Shrew VPN Client on Debian, Ubuntu or Linux Mint ### - -Shrew Soft VPN client GUI requires Qt 4.x. So you will need to install its development files as part of dependencies. - - $ sudo apt-get install cmake libqt4-core libqt4-dev libqt4-gui libedit-dev libssl-dev checkinstall flex bison - $ wget https://www.shrew.net/download/ike/ike-2.2.1-release.tbz2 - $ tar xvfvj ike-2.2.1-release.tbz2 - $ cd ike - $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES . - $ make - $ sudo make install - $ cd /etc/ - $ sudo mv iked.conf.sample iked.conf - -### Install Shrew VPN Client on CentOS, Fedora or RHEL ### - -Similar to Debian based systems, you will need to install a number of dependencies including Qt4 before compiling it. - - $ sudo yum install qt-devel cmake gcc-c++ openssl-devel libedit-devel flex bison - $ wget https://www.shrew.net/download/ike/ike-2.2.1-release.tbz2 - $ tar xvfvj ike-2.2.1-release.tbz2 - $ cd ike - $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES . - $ make - $ sudo make install - $ cd /etc/ - $ sudo mv iked.conf.sample iked.conf - -On Red Hat based systems, one last step is to open /etc/ld.so.conf with a text editor, and add the following line. - - $ sudo vi /etc/ld.so.conf - ----------- - - include /usr/lib/ - -Reload run-time bindings of shared libraries to incorporate newly installed shared libraries: - - $ sudo ldconfig - -### Launch Shrew VPN Client ### - -First launch IKE daemon (iked). This daemon speaks the IKE protocol to communicate with a remote host over IPSec as a VPN client. - - $ sudo iked - -![](https://farm9.staticflickr.com/8685/17175688940_59c2db64c9_b.jpg) - -Now start qikea which is an IPsec VPN client front end. This GUI application allows you to manage remote site configurations and to initiate VPN connections. - -![](https://farm8.staticflickr.com/7750/16742992713_eed7f97939_b.jpg) - -To create a new VPN configuration, click on "Add" button, and fill out VPN site configuration. Once you create a configuration, you can initiate a VPN connection simply by clicking on the configuration. - -![](https://farm8.staticflickr.com/7725/17337297056_3d38dc2180_b.jpg) - -### Troubleshooting ### - -1. I am getting the following error while running iked. - - iked: error while loading shared libraries: libss_ike.so.2.2.1: cannot open shared object file: No such file or directory - -To solve this problem, you need to update the dynamic linker to incorporate libss_ike library. For that, add to /etc/ld.so.conf the path where the library is located (e.g., /usr/lib), and then run ldconfig command. - - $ sudo ldconfig - -Verify that libss_ike is added to the library path: - - $ ldconfig -p | grep ike - ----------- - - libss_ike.so.2.2.1 (libc6,x86-64) => /lib/libss_ike.so.2.2.1 - libss_ike.so (libc6,x86-64) => /lib/libss_ike.so - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/install-shrew-soft-ipsec-vpn-client-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://ask.xmodulo.com/author/nanni -[1]:https://www.shrew.net/download/ike diff --git a/translated/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md b/translated/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md new file mode 100644 index 0000000000..abe1d3943d --- /dev/null +++ b/translated/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md @@ -0,0 +1,98 @@ +Linux有问必答——Linux上如何安装Shrew Soft IPsec VPN +================================================================================ +> **Question**: I need to connect to an IPSec VPN gateway. For that, I'm trying to use Shrew Soft VPN client, which is available for free. How can I install Shrew Soft VPN client on [insert your Linux distro]? +> **问题**:我需要连接到一个IPSec VPN网关,鉴于此,我尝试使用Shrew Soft VPN客户端,它是一个免费版本。我怎样才能安装Shrew Soft VPN客户端到[插入你的Linux发行版]? + +市面上有许多商业VPN网关,同时附带有他们自己的专有VPN客户端软件。虽然也有许多开源的VPN服务器/客户端备选方案,但它们通常缺乏复杂的IPsec支持,比如互联网密钥交换(IKE),这是一个标准的IPsec协议,用于加固VPN密钥交换和验证安全。Shrew Soft VPN是一个免费的IPsec VPN客户端,它支持多种验证方法、密钥交换、加密以及防火墙穿越选项。 + +下面介绍如何安装Shrew Soft VPN客户端到Linux平台。 + +首先,从[官方站点][1]下载它的源代码。 + +### 安装Shrew VPN客户端到Debian, Ubuntu或者Linux Mint ### + +Shrew Soft VPN客户端图形界面要求使用Qt 4.x。所以,作为依赖,你需要安装其开发文件。 + + $ sudo apt-get install cmake libqt4-core libqt4-dev libqt4-gui libedit-dev libssl-dev checkinstall flex bison + $ wget https://www.shrew.net/download/ike/ike-2.2.1-release.tbz2 + $ tar xvfvj ike-2.2.1-release.tbz2 + $ cd ike + $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES . + $ make + $ sudo make install + $ cd /etc/ + $ sudo mv iked.conf.sample iked.conf + +### 安装Shrew VPN客户端到CentOS, Fedora或者RHEL ### + +与基于Debian的系统类似,在编译前你需要安装一堆依赖包,包括Qt4。 + + $ sudo yum install qt-devel cmake gcc-c++ openssl-devel libedit-devel flex bison + $ wget https://www.shrew.net/download/ike/ike-2.2.1-release.tbz2 + $ tar xvfvj ike-2.2.1-release.tbz2 + $ cd ike + $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DQTGUI=YES -DETCDIR=/etc -DNATT=YES . + $ make + $ sudo make install + $ cd /etc/ + $ sudo mv iked.conf.sample iked.conf + +在基于Red Hat的系统中,最后一步需要用文本编辑器打开/etc/ld.so.conf文件,并添加以下行。 + + $ sudo vi /etc/ld.so.conf + +---------- + + include /usr/lib/ + +重新加载运行时绑定的共享库文件,以容纳新安装的共享库: + + $ sudo ldconfig + +### 启动Shrew VPN客户端 ### + +首先,启动IKE守护进程(iked)。该守护进作为VPN客户端程通过IKE协议与远程主机经由IPSec通信。 + + $ sudo iked + +![](https://farm9.staticflickr.com/8685/17175688940_59c2db64c9_b.jpg) + +现在,启动qikea,它是一个IPsec VPN客户端前端。该GUI应用允许你管理远程站点配置并初始化VPN连接。 + +![](https://farm8.staticflickr.com/7750/16742992713_eed7f97939_b.jpg) + +要创建一个新的VPN配置,点击“添加”按钮,然后填入VPN站点配置。创建配置后,你可以通过点击配置来初始化VPN连接。 + +![](https://farm8.staticflickr.com/7725/17337297056_3d38dc2180_b.jpg) + +### 故障排除 ### + +1. 我在运行iked时碰到了如下错误。 + + iked: error while loading shared libraries: libss_ike.so.2.2.1: cannot open shared object file: No such file or directory + +要解决该问题,你需要更新动态链接器来容纳libss_ike库。对于此,请添加库文件的位置路径到/etc/ld.so.conf文件中,然后运行ldconfig命令。 + + $ sudo ldconfig + +验证libss_ike是否添加到了库路径: + + $ ldconfig -p | grep ike + +---------- + + libss_ike.so.2.2.1 (libc6,x86-64) => /lib/libss_ike.so.2.2.1 + libss_ike.so (libc6,x86-64) => /lib/libss_ike.so + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-shrew-soft-ipsec-vpn-client-linux.html + +作者:[Dan Nanni][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:https://www.shrew.net/download/ike From f5ddd886cba8abf11d80d9ab3dcb8ae8169ccc1e Mon Sep 17 00:00:00 2001 From: robot-0 Date: Fri, 8 May 2015 10:28:20 +0800 Subject: [PATCH 0738/2517] Update 20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md --- ...ectionally from Command Line Using 'Speedtest-CLI' Tool.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md b/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md index a2e5ebc1d8..ee125e70a6 100644 --- a/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md +++ b/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md @@ -1,3 +1,5 @@ +translating by createyuan + How to Test Your Internet Speed Bidirectionally from Command Line Using ‘Speedtest-CLI’ Tool ================================================================================ We always need to check the speed of the Internet connection at home and office. What we do for this? Go to websites like Speedtest.net and begin test. It loads JavaScript in the web browser and then select best server based upon ping and output the result. It also uses a Flash player to produce graphical results. @@ -129,4 +131,4 @@ via: http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/speedtest-mini-server-to-test-bandwidth-speed/ \ No newline at end of file +[1]:http://www.tecmint.com/speedtest-mini-server-to-test-bandwidth-speed/ From 4afb5741d4fcd01eed23bbab2effd2298c19fda4 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 8 May 2015 10:30:35 +0800 Subject: [PATCH 0739/2517] PUB:20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs @geekpi --- ...drom apt-get update cannot be used to add new CD-ROMs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md (96%) diff --git a/translated/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md b/published/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md similarity index 96% rename from translated/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md rename to published/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md index 77c4c05d63..e6ced67ef0 100644 --- a/translated/tech/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md +++ b/published/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md @@ -1,4 +1,4 @@ -如何修复:apt-get update无法添加新的CD-ROM +如何修复 apt-get update 无法添加新的 CD-ROM 的错误 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/12/elementary_OS_Freya.jpg) @@ -63,8 +63,8 @@ via: http://itsfoss.com/fix-failed-fetch-cdrom-aptget-update-add-cdroms/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From eaaf54c661d0ef7a714bd8b9d99bb09b9a59102d Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 8 May 2015 10:49:15 +0800 Subject: [PATCH 0740/2517] PUB:How to Manage Network using nmcli Tool in RedHat CentOS 7.x @SPccman --- ...k using nmcli Tool in RedHat CentOS 7.x.md | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) rename {translated/tech => published}/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md (74%) diff --git a/translated/tech/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md b/published/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md similarity index 74% rename from translated/tech/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md rename to published/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md index febebc89ca..bb4a3a5568 100644 --- a/translated/tech/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md +++ b/published/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md @@ -1,8 +1,8 @@ -在 RedHat/CentOS 7.x 中使用 cmcli 命令管理网络 +在 RedHat/CentOS 7.x 中使用 nmcli 命令管理网络 =============== [**Red Hat Enterprise Linux 7** 与 **CentOS 7**][1] 中默认的网络服务由 **NetworkManager** 提供,这是动态控制及配置网络的守护进程,它用于保持当前网络设备及连接处于工作状态,同时也支持传统的 ifcfg 类型的配置文件。 -NetworkManager 可以用于以下类型的连接: -Ethernet,VLANS,Bridges,Bonds,Teams,Wi-Fi,mobile boradband(如移动3G)以及 IP-over-InfiniBand。针对与这些网络类型,NetworkManager 可以配置他们的网络别名,IP 地址,静态路由,DNS,VPN连接以及很多其它的特殊参数。 + +NetworkManager 可以用于以下类型的连接:Ethernet,VLANS,Bridges,Bonds,Teams,Wi-Fi,mobile boradband(如移动3G)以及 IP-over-InfiniBand。针对与这些网络类型,NetworkManager 可以配置他们的网络别名,IP 地址,静态路由,DNS,VPN连接以及很多其它的特殊参数。 可以用命令行工具 nmcli 来控制 NetworkManager。 @@ -24,19 +24,21 @@ Ethernet,VLANS,Bridges,Bonds,Teams,Wi-Fi,mobile boradband(如移 显示所有连接。 - # nmcli connection show -a + # nmcli connection show -a 仅显示当前活动的连接。 # nmcli device status -列出通过 NetworkManager 验证的设备列表及他们的状态。 +列出 NetworkManager 识别出的设备列表及他们的状态。 ![nmcli general](http://blog.linoxide.com/wp-content/uploads/2014/12/nmcli-gneral.jpg) ### 启动/停止 网络接口### -使用 nmcli 工具启动或停止网络接口,与 ifconfig 的 up/down 是一样的。使用下列命令停止某个接口: +使用 nmcli 工具启动或停止网络接口,与 ifconfig 的 up/down 是一样的。 + +使用下列命令停止某个接口: # nmcli device disconnect eno16777736 @@ -50,7 +52,7 @@ Ethernet,VLANS,Bridges,Bonds,Teams,Wi-Fi,mobile boradband(如移 # nmcli connection add type ethernet con-name NAME_OF_CONNECTION ifname interface-name ip4 IP_ADDRESS gw4 GW_ADDRESS -根据你需要的配置更改 NAME_OF_CONNECTION,IP_ADDRESS, GW_ADDRESS参数(如果不需要网关的话可以省略最后一部分)。 +根据你需要的配置更改 NAME\_OF\_CONNECTION,IP\_ADDRESS, GW\_ADDRESS参数(如果不需要网关的话可以省略最后一部分)。 # nmcli connection add type ethernet con-name NEW ifname eno16777736 ip4 192.168.1.141 gw4 192.168.1.1 @@ -68,9 +70,11 @@ Ethernet,VLANS,Bridges,Bonds,Teams,Wi-Fi,mobile boradband(如移 ![nmcli add static](http://blog.linoxide.com/wp-content/uploads/2014/12/nmcli-add-static.jpg) +###增加一个使用 DHCP 的新连接 + 增加新的连接,使用DHCP自动分配IP地址,网关,DNS等,你要做的就是将命令行后 ip/gw 地址部分去掉就行了,DHCP会自动分配这些参数。 -例,在 eno 16777736 设备上配置一个 名为 NEW_DHCP 的 DHCP 连接 +例,在 eno 16777736 设备上配置一个 名为 NEW\_DHCP 的 DHCP 连接 # nmcli connection add type ethernet con-name NEW_DHCP ifname eno16777736 @@ -79,8 +83,8 @@ Ethernet,VLANS,Bridges,Bonds,Teams,Wi-Fi,mobile boradband(如移 via: http://linoxide.com/linux-command/nmcli-tool-red-hat-centos-7/ 作者:[Adrian Dinu][a] -译者:[SPccman](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[SPccman](https://github.com/SPccman) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 847dc6f61ce217f3a46ff4920880eb5129f90468 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Fri, 8 May 2015 10:56:30 +0800 Subject: [PATCH 0741/2517] translated wi-cuckoo --- ...What are good command line HTTP clients.md | 111 ------------------ ...What are good command line HTTP clients.md | 110 +++++++++++++++++ 2 files changed, 110 insertions(+), 111 deletions(-) delete mode 100644 sources/share/20150429 What are good command line HTTP clients.md create mode 100644 translated/share/20150429 What are good command line HTTP clients.md diff --git a/sources/share/20150429 What are good command line HTTP clients.md b/sources/share/20150429 What are good command line HTTP clients.md deleted file mode 100644 index a06e4e34db..0000000000 --- a/sources/share/20150429 What are good command line HTTP clients.md +++ /dev/null @@ -1,111 +0,0 @@ -translating wi-cuckoo -What are good command line HTTP clients? -================================================================================ -The whole is greater than the sum of its parts is a very famous quote from Aristotle, a Greek philosopher and scientist. This quote is particularly pertinent to Linux. In my view, one of Linux's biggest strengths is its synergy. The usefulness of Linux doesn't derive only from the huge raft of open source (command line) utilities. Instead, it's the synergy generated by using them together, sometimes in conjunction with larger applications. - -The Unix philosophy spawned a "software tools" movement which focused on developing concise, basic, clear, modular and extensible code that can be used for other projects. This philosophy remains an important element for many Linux projects. - -Good open source developers writing utilities seek to make sure the utility does its job as well as possible, and work well with other utilities. The goal is that users have a handful of tools, each of which seeks to excel at one thing. Some utilities work well independently. - -This article looks at 3 open source command line HTTP clients. These clients let you download files off the internet from a command line. But they can also be used for many more interesting purposes such as testing, debugging and interacting with HTTP servers and web applications. Working with HTTP from the command-line is a worthwhile skill for HTTP architects and API designers. If you need to play around with an API, HTTPie and cURL will be invaluable. - ----------- - -![HTTPie](http://www.linuxlinks.com/portal/content2/png/HTTPie.png) - -![HTTPie in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-httpie.png) - -HTTPie (pronounced aych-tee-tee-pie) is an open source command line HTTP client. It is a a command line interface, cURL-like tool for humans. - -The goal of this software is to make CLI interaction with web services as human-friendly as possible. It provides a simple http command that allows for sending arbitrary HTTP requests using a simple and natural syntax, and displays colorized output. HTTPie can be used for testing, debugging, and generally interacting with HTTP servers. - -#### Features include: #### - -- Expressive and intuitive syntax -- Formatted and colorized terminal output -- Built-in JSON support -- Forms and file uploads -- HTTPS, proxies, and authentication -- Arbitrary request data -- Custom headers -- Persistent sessions -- Wget-like downloads -- Python 2.6, 2.7 and 3.x support -- Linux, Mac OS X and Windows support -- Plugins -- Documentation -- Test coverage - -- Website: [httpie.org][1] -- Developer: Jakub Roztočil -- License: Open Source -- Version Number: 0.9.2 - ----------- - -![cURL](http://www.linuxlinks.com/portal/content2/png/cURL1.png) - -![cURL in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-cURL.png) - -cURL is an open source command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. - -curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer resume, proxy tunneling and a busload of other useful tricks. - -#### Features include: #### - -- Config file support -- Multiple URLs in a single command line -- Range "globbing" support: [0-13], {one,two,three} -- Multiple file upload on a single command line -- Custom maximum transfer rate -- Redirectable stderr -- Metalink support - -- Website: [curl.haxx.se][2] -- Developer: Daniel Stenberg -- License: MIT/X derivate license -- Version Number: 7.42.0 - ----------- - -![Wget](http://www.linuxlinks.com/portal/content2/png/Wget1.png) - -![Wget in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Wget.png) - -Wget is open source software that retrieves content from web servers. Its name is derived from World Wide Web and get. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies. - -Wget can follow links in HTML pages and create local versions of remote web sites, fully recreating the directory structure of the original site. This is known as "recursive downloading." - -Wget has been designed for robustness over slow or unstable network connections. - -Features include: - -- Resume aborted downloads, using REST and RANGE -- Use filename wild cards and recursively mirror directories -- NLS-based message files for many different languages -- Optionally converts absolute links in downloaded documents to relative, so that downloaded documents may link to each other locally -- Runs on most UNIX-like operating systems as well as Microsoft Windows -- Supports HTTP proxies -- Supports HTTP cookies -- Supports persistent HTTP connections -- Unattended / background operation -- Uses local file timestamps to determine whether documents need to be re-downloaded when mirroring - -- Website: [www.gnu.org/software/wget/][3] -- Developer: Hrvoje Niksic, Gordon Matzigkeit, Junio Hamano, Dan Harkless, and many others -- License: GNU GPL v3 -- Version Number: 1.16.3 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20150425174537249/HTTPclients.html - -作者:Frazer Kline -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://httpie.org/ -[2]:http://curl.haxx.se/ -[3]:https://www.gnu.org/software/wget/ diff --git a/translated/share/20150429 What are good command line HTTP clients.md b/translated/share/20150429 What are good command line HTTP clients.md new file mode 100644 index 0000000000..fa9ef01c54 --- /dev/null +++ b/translated/share/20150429 What are good command line HTTP clients.md @@ -0,0 +1,110 @@ +什么是好的命令行HTTP客户端? +============================================================================== +整体大于各部分之和,这是引自希腊哲学家和科学家的亚里士多德的名言。这句话特别切中Linux。在我看来,Linux最强大的地方之一就是它的协作性。Linux的实用性并不仅仅源自大量的开源程序(命令行)。相反,其协作性来自于这些程序的综合利用,有时是结合更大型的应用。 + +Unix哲学引发了一场“软件工具”的运动,关注开发简洁,基础,干净,模块化和扩展性好的代码,并可以运用于其他的项目。这种哲学为许多的Linux项目留下了一个重要的元素。 + +好的开源开发者写程序为了确保该程序尽可能运行正确,同时能与其他程序很好地协作。目标就是使用者拥有一堆方便的工具,每一个力求干不止一件事。许多程序能独立工作得很好。 + +这篇文章讨论3个开源命令行HTTP客户端。这些客户端可以让你使用命令行从互联网上下载文件。但同时,他们也可以用于许多有意思的地方,如测试,调式和与HTTP服务器或网络应用互动。对于HTTP架构师和API设计人员来说,使用命令行操作HTTP是一个值得花时间学习的技能。如果你需要来回使用API,HTTPie和cURL,这没什么价值。 + +------------- + +![HTTPie](http://www.linuxlinks.com/portal/content2/png/HTTPie.png) + +![HTTPie in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-httpie.png) + +HTTPie(发音 aych-tee-tee-pie)是一款开源命令行HTTP客户端。它是一个命令行界面,类cURL的工具。 + +该软件的目标是使得与网络服务器的交互尽可能的人性化。其提供了一个简单的http命令,允许使用简单且自然的语句发送任意的HTTP请求,并显示不同颜色的输出。HTTPie可以用于测试,调式和与HTTP服务器的一般交互。 + +#### 功能包括:#### + +- 可表达,直观的语句 +- 格式化,颜色区分的终端输出 +- 内建JSON支持 +- 表单和文件上传 +- HTTPS,代理和认证 +- 任意数据请求 +- 自定义标题 (此处header不确定是否特别意义) +- 持久会话 +- 类Wget下载 +- Python 2.6,2.7和3.x支持 +- Linux,Mac OS X 和 Windows支持 +- 支持插件 +- 帮助文档 +- 测试覆盖 (直译有点别扭) + +- 网站:[httpie.org][1] +- 开发者: Jakub Roztočil +- 证书: 开源 +- 版本号: 0.9.2 + +---------- + +![cURL](http://www.linuxlinks.com/portal/content2/png/cURL1.png) + +![cURL in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-cURL.png) + +cURL是一个开源命令行工具,用于使用URL语句传输数据,支持DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS,IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET和TFTP。 + +cURL支持SSL证书,HTTP POST,HTTP PUT,FTP上传,HTTP基于表单上传,代理,缓存,用户名+密码认证(Basic, Digest, NTLM, Negotiate, kerberos...),文件传输恢复, 代理通道和一些其他实用窍门的总线负载。(这里的名词我不明白其专业意思) + +#### 功能包括:#### + +- 配置文件支持 +- 一个单独命令行多个URL +- “globbing”漫游支持: [0-13],{one, two, three} +- 一个命令上传多个文件 +- 自定义最大传输速度 +- 重定向标准错误输出 +- Metalink支持 + +- 网站: [curl.haxx.se][2] +- 开发者: Daniel Stenberg +- 证书: MIT/X derivate license +- 版本号: 7.42.0 + +---------- + +![Wget](http://www.linuxlinks.com/portal/content2/png/Wget1.png) + +![Wget in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Wget.png) + +Wget是一个从网络服务器获取信息的开源软件。其名字源于World Wide Web 和 get。Wget支持HTTP,HTTPS和FTP协议,同时也通过HTTP代理获取信息。 + +Wget可以根据HTML页面的链接,创建远程网络站点的本地版本,是完全重造源站点的目录结构。这种方式被冠名“recursive downloading。” + +Wget已经设计可以加快低速或者不稳定的网络连接。 + +功能包括: + +- 使用REST和RANGE恢复中断的下载 +- 使用文件名 +- 多语言的基于NLS的消息文件 +- 选择性地转换下载文档里地绝对链接为相对链接,使得下载文档可以本地相互链接 +- 在大多数类UNIX操作系统和微软Windows上运行 +- 支持HTTP代理 +- 支持HTTP数据缓存 +- 支持持续地HTTP连接 +- 无人照管/后台操作 +- 当远程对比时,使用本地文件时间戳来决定是否需要重新下载文档 (mirroring没想出合适的表达) + +- 站点: [www.gnu.org/software/wget/][3] +- 开发者: Hrvoje Niksic, Gordon Matzigkeit, Junio Hamano, Dan Harkless, and many others +- 证书: GNU GPL v3 +- 版本号: 1.16.3 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150425174537249/HTTPclients.html + +作者:Frazer Kline +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://httpie.org/ +[2]:http://curl.haxx.se/ +[3]:https://www.gnu.org/software/wget/ From 23ae12c5842073dad2c441bd8a2d85194118b49f Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Fri, 8 May 2015 15:58:28 +0800 Subject: [PATCH 0742/2517] translating wi-cuckoo --- ... configure a Linux bridge with Network Manager on Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md b/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md index 8eac3a212d..a557ee9244 100644 --- a/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md +++ b/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md @@ -1,3 +1,4 @@ +translating wi-cuckoo Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu ================================================================================ > **Question**: I need to set up a Linux bridge on my Ubuntu box to share a NIC with several other virtual machines or containers created on the box. I am currently using Network Manager on my Ubuntu, so preferrably I would like to configure a bridge using Network Manager. How can I do that? @@ -93,4 +94,4 @@ via: http://ask.xmodulo.com/configure-linux-bridge-network-manager-ubuntu.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://xmodulo.com/how-to-configure-linux-bridge-interface.html -[2]:https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1273201 \ No newline at end of file +[2]:https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1273201 From 59e4843ad8a161bf4385477cbafcc90facaa3cbb Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 8 May 2015 17:01:26 +0800 Subject: [PATCH 0743/2517] Finish the translation by ZTinoZ --- ...ape - Open Source Vector Graphic Editor.md | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) rename {sources => translated}/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md (54%) diff --git a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md b/translated/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md similarity index 54% rename from sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md rename to translated/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md index 35a36183e7..f18b10315e 100644 --- a/sources/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md +++ b/translated/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md @@ -11,74 +11,74 @@ Inkscape始于2003年,起初它的bug跟踪系统托管于Sourceforge上但是 #### 创建对象 #### - 用铅笔工具来画出不同颜色、大小和形状的手绘线,用贝塞尔曲线(笔式)工具来画出直线和曲线,通过书法工具来应用到手写的书法笔画上等等 -- 用文本工具来创建、选择、编辑和格式化文本。Manipulating text in plain text boxes, on paths or in shapes -- 有效绘制各种形状,像矩形、椭圆形、圆形、弧线、多边形、星形和螺旋形等等并调整其大小、旋转并修改它们 and then resize, rotate and modify (turn sharp edges round) them -- Create and embed bitmaps with simple commands +- 用文本工具来创建、选择、编辑和格式化文本。在纯文本框、在路径上或在形状里操作文本 +- 有效绘制各种形状,像矩形、椭圆形、圆形、弧线、多边形、星形和螺旋形等等并调整其大小、旋转并修改(圆角化)它们 +- 用简单地命令创建并嵌入位图 #### 对象处理 #### - 通过交互式操作和调整数值来扭曲、移动、测量、旋转目标 - 执行力提升并减少了Z-order操作。 -- 对象组群化或取消组群化可以去创建一个虚拟层阶用来编辑或处理 +- 对象群组化或取消群组化可以去创建一个虚拟层阶用来编辑或处理 - 图层采用层次结构树的结构并且能锁定或以各式各样的处理方式来重新布置 - 分布与对齐指令 #### 填充与边框 #### - 复制/粘贴风格 -- 取色器 -- Selecting colors on a continuous plot based on vectors of RGB, HSL, CMS, CMYK and color wheel -- Gradient editor helps creating and managing multi-stop gradients -- Define an image or selection and use it to pattern fill -- Dashed Strokes can be used with few predefined dashed patterns -- Beginning, middle and ending marks through path markers +- 取色工具 +- 用RGB, HSL, CMS, CMYK和色盘这四种不同的方式选色 +- 渐层编辑器能创建和管理多停点渐层 +- 定义一个图像或其它选择用来进行花纹填充 +- 用一些预定义泼洒花纹可对边框进行花纹泼洒 +- 通过路径标示器来开始、对折和结束标示 #### 路径上的操作 #### -- Node Editing: Moving nodes and Bezier handles, node alignment and distribution etc -- Boolean operations like yes or no conditions -- Simplifying paths with variable levels or thresholds -- Path insetting and outsetting along with link and offset objects -- Converting bitmap images into paths (color and monochrome paths) through path tracing +- 节点编辑:移动节点和贝塞尔曲线掌控,节点的对齐和分布等等 +- 布尔运算(是或否) +- 运用可变的路径起迄点可简化路径 +- 路径插入和增设连同动态和链接偏移对象 +- 通过路径追踪把位图图像转换成路径(彩色或单色路径) #### 文本处理 #### -- All installed outlined fonts can be used even for right to left align objects -- Formatting text, letter spacing, line spacing or kerning -- Text on path and on shapes where both text and path or shapes can be edited or modified +- 所有安装好的外框字体都能用甚至可以从右至左对齐对象 +- 格式化文本、调整字母间距、行间距或列间距 +- 路径上的文本和形状上的文本和路径或形状都可以被编辑和修改 #### 渲染 #### -- Inkscape fully support anti-aliased display which is a technique that reduces or eliminates aliasing by shading the pixels along the border. -- Support for alpha transparency display and PNG export +- Inkscape完全支持抗锯齿显示,这是一种通过柔化边界上的像素从而减少或消除凹凸锯齿的技术。 +- 支持alpha透明显示和PNG格式图片的导出 ### 在Ubuntu 14.04和14.10上安装Inkscape ### -In order to install Inkscape on Ubuntu, we will need to first [add its stable Personal Package Archive][1] (PPA) to Advanced Package Tool (APT) repository. Launch the terminal and run following command to add its PPA. +为了在Ubuntu上安装Inkscape,我们首先需要 [添加它的稳定版Personal Package Archive][1] (PPA) 至Advanced Package Tool (APT) 库中。打开终端并运行一下命令来添加它的PPA: sudo add-apt-repository ppa:inkscape.dev/stable ![PPA Inkscape](http://blog.linoxide.com/wp-content/uploads/2015/03/PPA-Inkscape.png) -Once the PPA has been added to the APT repository we need to update it using following command. +PPA添加到APT库中后,我们要用以下命令进行更新: sudo apt-get update ![Update APT](http://blog.linoxide.com/wp-content/uploads/2015/03/Update-APT2.png) -After updating the repository we are ready to install inkscape which is accomplished using the following command. +更新好库之后,我们准备用以下命令来完成安装: sudo apt-get install inkscape ![Install Inkscape](http://blog.linoxide.com/wp-content/uploads/2015/03/Install-Inkscape.png) -Congratulation, Inkscape has been installed now and all set for image editing and making full use of feature rich application. +恭喜,现在Inkscape已经被安装好了,我们可以充分利用它的丰富功能特点来编辑制作图像了。 ![Inkscape Main](http://blog.linoxide.com/wp-content/uploads/2015/03/Inkscape-Main1.png) ### 结论 ### -Inkscape is a feature rich graphic editing tool which empowers its user with state of the art capabilities. It is an open source application which is freely available for installation and customizations and supports wide range of file formats including but not limited to JPEG, PNG, GIF and PDF. Visit its [official website][2] for more news and updates regarding this application. +Inkscape是一款特点鲜明的图形编辑工具,它给予用户充分发挥自己艺术力的权利。它还是一款自由安装和自定义开源应用并且支持大范围文件类型包括JPEG, PNG, GIF和PDF且不仅这些。访问它的 [官方网站][2] 来获取更多新闻和应用更新。 -------------------------------------------------------------------------------- From 34af26ac4090b7f3eb8048d0c3ea4468a6d4ceeb Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Fri, 8 May 2015 17:41:40 +0800 Subject: [PATCH 0744/2517] finish first translate, need more modification --- ...tore Passwords and Api Keys Using Vault.md | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md diff --git a/translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md b/translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md new file mode 100644 index 0000000000..4fdfb4c9e6 --- /dev/null +++ b/translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md @@ -0,0 +1,166 @@ +ʹVaultȫĴ洢APIԿ +======================================================================= +VaultڰȫĻȡϢĹߡԱ롢APIԿ֤ϢVaultͨǿʿƻƺ͸չԵ¼־ṩһͳһĽӿʱϢ + +ԹؼϢ׼һѵ⣬ǵûɫûͬĹؼϢʹòͬȨ޵¼ݿϸڣAPIԿļܹ֤ͨȡϢɲͬƽ̨йʹһЩԶʱø㣬ˣȫĴ洢־DzܵġVaultΪָṩһ + +### ͻص ### + +ݼܣVaultܹ֤ڲ洢ݵ¶ݽмܡܡڱԴ洢ܺݶ迪ԼļܼVaultȫŶԶ尲ȫ + +**ȫ洢**VaultڽϢAPIԿ롢֤飩洢־û洢֮ǰݽмܡˣżõ˻ȡ洢ݵȨޣҲûκ壬ݱܡ + +**̬**VaultΪAWSSQLݿϵͳ롣ӦҪAWS S3Ͱ磬VaultAWSԿԣҪıϢһڡϢʱں󽫱òá + +**޺͸**VaultΪ豣ϢһڹڣջرϢӦҪϢͨAPIڡ + +****ڵ֮ǰVaultԳһϢһϢ + +### װVault ### + +ַʽװʹVault + +**1. ԤVault** еLinuxа棬صַ£һɣѹϵͳPATH·£Ա㷽ĵá + +- [Download Precompiled Vault Binary (32-bit)][1] +- [Download Precompiled Vault Binary (64-bit)][2] +- [Download Precompiled Vault Binary (ARM)][3] + +ӦԤVaultư汾 + +![wget binary](http://blog.linoxide.com/wp-content/uploads/2015/04/wget-binary.png) + +ѹصĶư汾 + +![vault](http://blog.linoxide.com/wp-content/uploads/2015/04/unzip.png) + +ףأڿʹVaultˡ + +![](http://blog.linoxide.com/wp-content/uploads/2015/04/vault.png) + +**2. Դ** һϵͳаװVaultķʽڰװVault֮ǰҪװGOGIT + + **RedhatϵͳаװGO** ʹָ + + sudo yum install go + + **DebinϵͳаװGO** ʹָ + + sudo apt-get install golang + + + + sudo add-apt-repository ppa:gophers/go + + sudo apt-get update + + sudo apt-get install golang-stable + + **RedhatϵͳаװGIT** ʹ + + sudo yum install git + + **DebianϵͳаװGIT** ʹ + + sudo apt-get install git + +һGOGITѱװãDZԿʼԴ밲װVault + +> еVaultֿ⿽GOPATH + + https://github.com/hashicorp/vault + +> ļǷڣڣôVaultûб¡ʵ· + + $GOPATH/src/github.com/hashicorp/vault/main.go + +> ִָVaultļŵϵͳbinĿ¼¡ + + make dev + +![path](http://blog.linoxide.com/wp-content/uploads/2015/04/installation4.png) + +### һVaultŽ̳ ### + +ѾVaultĹٷʽ̳̣ԼSSHϵ + +**** + +ݽ̳̰в裺 + +- ʼVault +- VaultжȨ +- дϢ +- ܷVault + +**ʼVault** + +ȣҪΪʼһVaultĹʵ +ڳʼУVaultܷΪ +ڳʼVaultʹһܷԿ + + vault init -key-shares=1 -key-threshold=1 + +ע⵽VaultӡԿҪնˣЩԿںIJлʹõ + +![Initializing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Initializing-SSH.png) + +**Vault** + +һVaultʱܷ״̬״̬£VaultΪ֪δȡ洢֪ζнܡ +VaultʹüԿݡԿ"Կ"ܣԿ档ԿҪһƬֵУʹһƬԿ + + vault unseal + +![Unsealing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Unsealing-SSH.png) + +**ΪȨ** + +ִκβ֮ǰӵĿͻӦñȨȨĹǼһ˻߻Dz˵ݡVaultʱʹá +Ϊǽʹڲ2ɵrootơӦԹģʽ֡ + + vault auth + +![Authorize SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Authorize-SSH.png) + +**дϢ** + +VaultѾ׵ǿԿʼʹĬϵ˶дϢˡдVaultеıϢܲд˵Ĵ洢˴洢Ʋ鿴δֵܵûκVaultɽܵıҪϢ + + vault write secret/hello value=world + +ȻԶϢˣ + + vault read secret/hello + +![RW_SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/RW_SSH.png) + +**ܷVault** + +һAPIܷVaultԿҪָܹܷҪһӵrootȨ޵ĵͨһֺ"Ʋ"һ֡ +ַʽУһ⵽֣Vaultݽ̱סԱСʧûлȡԿƬᱻٴλȡ + + vault seal + +![Seal Vault SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Seal-Vault-SSH.png) + +Ž̵̳Ľβ + +### ܽ ### + +VaultһdzõӦãṩһɿҰȫĴ洢ؼϢķʽ⣬ڴ洢ǰܹؼϢά־ڵķʽȡϢһڹڣջرϢVaultƽ̨ģҿغͰװҪVaultĸϢʹٷվ + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/secure-secret-store-vault/ + +ߣ[Aun Raza][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/arunrz/ +[1]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_386.zip +[2]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_amd64.zip +[3]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_arm.zip From 1820aabc37070d92dca55e0bd55cdbcc4793e93f Mon Sep 17 00:00:00 2001 From: VicYu Date: Fri, 8 May 2015 20:08:08 +0800 Subject: [PATCH 0745/2517] Translated --- ...nswers--How to install autossh on Linux.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md b/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md index 97814b2288..e83c23e9f3 100644 --- a/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md +++ b/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md @@ -1,44 +1,44 @@ - Vic020 - -Linux FAQs with Answers--How to install autossh on Linux +Linux有问必答--如何安装autossh ================================================================================ -> **Question**: I would like to install autossh on [insert your Linux distro]. How can I do that? +> **提问**: 我打算在linux上安装autossh,我应该怎么做呢? -[autossh][1] is an open-source tool that allows you to monitor an SSH session and restart it automatically should it gets disconnected or stops forwarding traffic. autossh assumes that [passwordless SSH login][2] for a destination host is already setup, so that it can restart a broken SSH session without user's involvement. +[autossh][1] 是一款开源工具,可以帮助管理SSH会话,自动重连和停止转发流量。autossh会假定目标主机已经设定[无密码SSH登陆][2],以便autossh可以重连断开的SSH会话而不用用户操作。 + +只要你建立[反向SSH隧道][3]或者[挂载基于SSH的远程文件夹][4],autossh迟早会派上用场。基本上只要需要维持SSH会话,autossh肯定是有用的。 -autossh comes in handy when you want to set up [reverse SSH tunnels][3] or [mount remote folders over SSH][4]. Essentially in any situation where persistent SSH sessions are required, autossh can be useful. ![](https://farm8.staticflickr.com/7786/17150854870_63966e78bc_c.jpg) -Here is how to install autossh on various Linux distributions. +下面有许多linux发行版autossh的安装方法。 -### Install Autossh on Debian or Ubuntu ### +### Debian 或 Ubuntu 系统 ### -autossh is available in base repositories of Debian based systems, so installation is easy. +autossh已经加入基于Debian系统的基础库,所以可以很方便的安装。 $ sudo apt-get install autossh -### Install Autossh on Fedora ### +### Fedora 系统 ### -Fedora repositories also carry autossh package. So simply use yum command. +Fedora库同样包含autossh包,使用yum安装。 $ sudo yum install autossh -### Install Autossh on CentOS or RHEL ### +### CentOS 或 RHEL 系统 ### -For CentOS/RHEL 6 or earlier, enable [Repoforge repository][5] first, and then use yum command. +CentOS/RHEL 6 或早期版本, 需要开启第三库[Repoforge库][5], 然后才能使用yum安装. $ sudo yum install autossh -For CentOS/RHEL 7, autossh is no longer available in Repoforge repository. You will need to build it from the source (explained below). +CentOS/RHEL 7以后,autossh 已经不在Repoforge库中. 你需要从源码编译安装(例子在下面). -### Install Autossh on Arch Linux ### + +### Arch Linux 系统 ### $ sudo pacman -S autossh -### Compile Autossh from the Source on Debian or Ubuntu ### +### Debian 或 Ubuntu 系统中从源码编译安装### -If you would like to try the latest version of autossh, you can build it from the source as follows. +如果你想要使用最新版本的autossh,你可以自己编译源码安装 $ sudo apt-get install gcc make $ wget http://www.harding.motd.ca/autossh/autossh-1.4e.tgz @@ -48,9 +48,9 @@ If you would like to try the latest version of autossh, you can build it from th $ make $ sudo make install -### Compile Autossh from the Source on CentOS, Fedora or RHEL ### +### CentOS, Fedora 或 RHEL 系统中从源码编译安装### -On CentOS/RHEL 7, autossh is not available as a pre-built package. So you'll need to compile it from the source as follows. +在CentOS/RHEL 7以后,autossh不在是预编译包。所以你不得不从源码编译安装。 $ sudo yum install wget gcc make $ wget http://www.harding.motd.ca/autossh/autossh-1.4e.tgz @@ -65,7 +65,7 @@ On CentOS/RHEL 7, autossh is not available as a pre-built package. So you'll nee via: http://ask.xmodulo.com/install-autossh-linux.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Vic020/VicYu](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 80f74d6f79d8e31a5f8cbc07e8512ef0898a5d9f Mon Sep 17 00:00:00 2001 From: VicYu Date: Fri, 8 May 2015 20:10:19 +0800 Subject: [PATCH 0746/2517] Moved --- ...06 Linux FAQs with Answers--How to install autossh on Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md (100%) diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md b/translated/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md similarity index 100% rename from sources/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md rename to translated/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md From adec7006040adf445e6a64c3e176540ac3d75e70 Mon Sep 17 00:00:00 2001 From: wwy Date: Sat, 9 May 2015 09:34:28 +0800 Subject: [PATCH 0747/2517] Update 20150506 How to Securely Store Passwords and Api Keys Using Vault.md reviewed the translation, do some modification. --- ...tore Passwords and Api Keys Using Vault.md | 109 +++++++++--------- 1 file changed, 52 insertions(+), 57 deletions(-) diff --git a/translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md b/translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md index 4fdfb4c9e6..e9e54ac43d 100644 --- a/translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md +++ b/translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md @@ -1,54 +1,54 @@ -ʹVaultȫĴ洢APIԿ +如何使用Vault安全的存储密码和API密钥 ======================================================================= -VaultڰȫĻȡϢĹߡԱ롢APIԿ֤ϢVaultͨǿʿƻƺ͸չԵ¼־ṩһͳһĽӿʱϢ +Vault是用来安全的获取秘密信息的工具。他可以保存密码、API密钥、证书等信息。Vault通过强访问控制机制和高扩展性的事件日志提供了一个统一的接口来访问秘密信息。 -ԹؼϢ׼һѵ⣬ǵûɫûͬĹؼϢʹòͬȨ޵¼ݿϸڣAPIԿļܹ֤ͨȡϢɲͬƽ̨йʹһЩԶʱø㣬ˣȫĴ洢־DzܵġVaultΪָṩһ +对关键信息的授权访问是一个困难的问题,尤其是当有许多用户角色和用户请求不同的关键信息,例如用不同权限登录数据库的细节,对外服务的API密钥,面向服务架构通信的证书等。当保密信息由不同的平台进行管理,并使用一些自定义的配置时,情况变得更糟,因此,安全的存储、管理审计日志几乎是不可能的。但Vault为这种复杂情况提供了一个解决方案。 -### ͻص ### +### 突出特点 ### -ݼܣVaultܹ֤ڲ洢ݵ¶ݽмܡܡڱԴ洢ܺݶ迪ԼļܼVaultȫŶԶ尲ȫ +数据加密:Vault能够在不存储数据的情况下对数据进行加密、解密。开发者们便可以存储加密后的数据而无需开发自己的加密技术,Vault还允许安全团队自定义安全参数。 -**ȫ洢**VaultڽϢAPIԿ롢֤飩洢־û洢֮ǰݽмܡˣżõ˻ȡ洢ݵȨޣҲûκ壬ݱܡ +**安全密码存储**:Vault在将秘密信息(API密钥、密码、证书)存储到持久化存储之前对数据进行加密。因此,如果有人偶尔拿到了获取存储的数据的权限,这也没有任何意义,除非加密后的信息被解密。 -**̬**VaultΪAWSSQLݿϵͳ롣ӦҪAWS S3Ͱ磬VaultAWSԿԣҪıϢһڡϢʱں󽫱òá +**动态密码**:Vault为AWS、SQL数据库类似的系统按需产生密码。如果应用需要获得AWS S3的桶,比如,它向Vault请求AWS密钥对,Vault将授予需要的秘密信息一段租用期时间。一旦租用期过期,这个秘密信息将变得不可用。 -**޺͸**VaultΪ豣ϢһڹڣջرϢӦҪϢͨAPIڡ +**租赁和更新**:Vault以租用期为限制授予秘密信息,一旦租用期过期,它便立刻收回保密信息,如果应用仍需要保密信息,则可以通过API更新租用期。 -****ڵ֮ǰVaultԳһϢһϢ +**撤销**:在租用期到期之前,Vault可以撤销一个秘密信息或者一个秘密信息树。 -### װVault ### +### 安装Vault ### -ַʽװʹVault +有两种方式来安装使用Vault。 -**1. ԤVault** еLinuxа棬صַ£һɣѹϵͳPATH·£Ա㷽ĵá +**1. 预编译的Vault二进制** 能用于所有的Linux发行版,下载地址如下,一旦下载完成,解压并将它放在系统PATH路径下,以方便调用。 - [Download Precompiled Vault Binary (32-bit)][1] - [Download Precompiled Vault Binary (64-bit)][2] - [Download Precompiled Vault Binary (ARM)][3] -ӦԤVaultư汾 +下载相应的预编译的Vault二进制版本。 ![wget binary](http://blog.linoxide.com/wp-content/uploads/2015/04/wget-binary.png) -ѹصĶư汾 +解压下载到本地的二进制版本。 ![vault](http://blog.linoxide.com/wp-content/uploads/2015/04/unzip.png) -ףأڿʹVaultˡ +祝贺!您现在可以使用Vault了。 ![](http://blog.linoxide.com/wp-content/uploads/2015/04/vault.png) -**2. Դ** һϵͳаװVaultķʽڰװVault֮ǰҪװGOGIT +**2. 从源代码编译** 是另一种在系统中安装Vault的方式。在安装Vault之前需要安装GO和GIT。 - **RedhatϵͳаװGO** ʹָ +在 **Redhat系统中安装GO** 使用下面的指令。 sudo yum install go - **DebinϵͳаװGO** ʹָ +在 **Debin系统中安装GO** 使用下面的指令。 sudo apt-get install golang - +或者 sudo add-apt-repository ppa:gophers/go @@ -56,109 +56,104 @@ Vault sudo apt-get install golang-stable - **RedhatϵͳаװGIT** ʹ +在 **Redhat系统中安装GIT** 使用下面的命令。 sudo yum install git - **DebianϵͳаװGIT** ʹ +在 **Debian系统中安装GIT** 使用下面的命令。 sudo apt-get install git -һGOGITѱװãDZԿʼԴ밲װVault +一旦GO和GIT都已被安装好,我们便可以开始从源码编译安装Vault。 -> еVaultֿ⿽GOPATH +> 将下列的Vault仓库拷贝至GOPATH https://github.com/hashicorp/vault -> ļǷڣڣôVaultûб¡ʵ· +> 测试下面的文件是否存在,如果它不存在,那么Vault没有被克隆到合适的路径。 $GOPATH/src/github.com/hashicorp/vault/main.go -> ִָVaultļŵϵͳbinĿ¼¡ +> 执行下面的指令来编译Vault,并将二进制文件放到系统bin目录下。 make dev ![path](http://blog.linoxide.com/wp-content/uploads/2015/04/installation4.png) -### һVaultŽ̳ ### +### 一份Vault入门教程 ### -ѾVaultĹٷʽ̳̣ԼSSHϵ +我们已经编译了Vault的官方交互式教程,并将它输出到SSH。 -**** +**概述** -ݽ̳̰в裺 +这份教程包括下列步骤: -- ʼVault -- VaultжȨ -- дϢ -- ܷVault +- 初始化,开启您的Vault +- 在Vault中对您的请求授权 +- 读写秘密信息 +- 密封您的Vault -**ʼVault** +**初始化您的Vault** -ȣҪΪʼһVaultĹʵ -ڳʼУVaultܷΪ -ڳʼVaultʹһܷԿ +首先,我们需要为您初始化一个Vault的工作实例。在初始化过程中,您可以配置Vault的密封行为。简单起见,现在使用一个非密封密钥来初始化Vault。 vault init -key-shares=1 -key-threshold=1 -ע⵽VaultӡԿҪնˣЩԿںIJлʹõ +您会注意到Vault在这里打印出了许多的密钥。不要清除您的终端,这些密钥在后面的步骤中会使用到。 ![Initializing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Initializing-SSH.png) -**Vault** +**开启您的Vault** -һVaultʱܷ״̬״̬£VaultΪ֪δȡ洢֪ζнܡ -VaultʹüԿݡԿ"Կ"ܣԿ档ԿҪһƬֵУʹһƬԿ +当一个Vault服务器启动时,它是密封的状态。在这种状态下,Vault被配置为知道在哪里和如何存取物理存储,但不知道如何对其进行解密。Vault使用加密密钥来加密数据。这个密钥由"主密钥"加密,主密钥不保存。解密主密钥需要一个碎片的阈值。在这个例子中,我们使用一个碎片来解密这个主密钥。 vault unseal ![Unsealing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Unsealing-SSH.png) -**ΪȨ** +**为您的请求授权** -ִκβ֮ǰӵĿͻӦñȨȨĹǼһ˻߻Dz˵ݡVaultʱʹá -Ϊǽʹڲ2ɵrootơӦԹģʽ֡ +在执行任何操作之前,连接的客户端应该被授权。授权的过程是检验一个人或者机器是不是像他们描述的那样,被赋予了身份。这个身份在向Vault发送请求时被使用。为简单起见,我们将使用在步骤2中生成的root令牌。这个输出会以滚动模式出现。使用一个客户端令牌进行授权: vault auth ![Authorize SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Authorize-SSH.png) -**дϢ** +**读写保密信息** -VaultѾ׵ǿԿʼʹĬϵ˶дϢˡдVaultеıϢܲд˵Ĵ洢˴洢Ʋ鿴δֵܵûκVaultɽܵıҪϢ +现在Vault已经被设置妥当,我们可以开始使用默认的密码后端读写秘密信息了。写在Vault中的秘密信息首先被加密,然后被写入后端的存储。后端存储机制不会查看未加密的值,并且没有无需Vault即可解密的方法。 vault write secret/hello value=world -ȻԶϢˣ +当然,您接下来便可以读这个保密信息了: vault read secret/hello ![RW_SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/RW_SSH.png) -**ܷVault** +**密封您的Vault** -һAPIܷVaultԿҪָܹܷҪһӵrootȨ޵ĵͨһֺ"Ʋ"һ֡ -ַʽУһ⵽֣Vaultݽ̱סԱСʧûлȡԿƬᱻٴλȡ +有一个API来密封Vault。它将丢掉加密密钥并需要其他未密封的过程来恢复它。密封仅需要一个拥有root权限的操作者。这通常是一种罕见的"打破玻璃过程"的一部分。这种方式中,如果有一个检测到的入侵,Vault数据将会立刻被锁住,以便最小化损失。如果没有获取到主密钥碎片,数据不会被再次获取。 vault seal ![Seal Vault SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Seal-Vault-SSH.png) -Ž̵̳Ľβ +这便是入门教程的结尾。 -### ܽ ### +### 总结 ### -VaultһdzõӦãṩһɿҰȫĴ洢ؼϢķʽ⣬ڴ洢ǰܹؼϢά־ڵķʽȡϢһڹڣջرϢVaultƽ̨ģҿغͰװҪVaultĸϢʹٷվ +Vault是一个非常有用的应用,它提供了一个可靠且安全的存储关键信息的方式。另外,它在存储前加密关键信息,维护他的审计日志,并以租用期的方式获取秘密信息,且一旦租用期过期,它将立刻收回秘密信息。Vault是平台独立的,并且可以免费下载和安装。要发掘Vault的更多信息,请访问官方网站。 -------------------------------------------------------------------------------- via: http://linoxide.com/how-tos/secure-secret-store-vault/ -ߣ[Aun Raza][a] -ߣ[ID](https://github.com/ID) -Уԣ[УID](https://github.com/УID) +作者:[Aun Raza][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[校对者ID](https://github.com/校对者ID) - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunrz/ [1]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_386.zip From 5013e0e3c814990a079b3cda0e487e0ea9c18402 Mon Sep 17 00:00:00 2001 From: wwy Date: Sat, 9 May 2015 09:36:42 +0800 Subject: [PATCH 0748/2517] Delete 20150506 How to Securely Store Passwords and Api Keys Using Vault.md remove the source of translation --- ...tore Passwords and Api Keys Using Vault.md | 170 ------------------ 1 file changed, 170 deletions(-) delete mode 100644 sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md diff --git a/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md b/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md deleted file mode 100644 index 858197989d..0000000000 --- a/sources/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md +++ /dev/null @@ -1,170 +0,0 @@ -Translating by wwy-hust - - -How to Securely Store Passwords and Api Keys Using Vault -================================================================================ -Vault is a tool that is used to access secret information securely, it may be password, API key, certificate or anything else. Vault provides a unified interface to secret information through strong access control mechanism and extensive logging of events. - -Granting access to critical information is quite a difficult problem when we have multiple roles and individuals across different roles requiring various critical information like, login details to databases with different privileges, API keys for external services, credentials for service oriented architecture communication etc. Situation gets even worse when access to secret information is managed across different platforms with custom settings, so rolling, secure storage and managing the audit logs is almost impossible. But Vault provides a solution to such a complex situation. - -### Salient Features ### - -Data Encryption: Vault can encrypt and decrypt data with no requirement to store it. Developers can now store encrypted data without developing their own encryption techniques and it allows security teams to define security parameters. - -**Secure Secret Storage**: Vault encrypts the secret information (API keys, passwords or certificates) before storing it on to the persistent (secondary) storage. So even if somebody gets access to the stored information by chance, it will be of no use until it is decrypted. - -**Dynamic Secrets**: On demand secrets are generated for systems like AWS and SQL databases. If an application needs to access S3 bucket, for instance, it requests AWS keypair from Vault, which grants the required secret information along with a lease time. The secret information won’t work once the lease time is expired. - -**Leasing and Renewal**: Vault grants secrets with a lease limit, it revokes the secrets as soon as lease expires which can further be renewed through APIs if required. - -**Revocation**: Upon expiring the lease period Vault can revoke a single secret or a tree of secrets. - -### Installing Vault ### - -There are two ways to use Vault. - -**1. Pre-compiled Vault Binary** can be downloaded for all Linux flavors from the following source, once done, unzip it and place it on a system PATH where other binaries are kept so that it can be accessed/invoked easily. - -- [Download Precompiled Vault Binary (32-bit)][1] -- [Download Precompiled Vault Binary (64-bit)][2] -- [Download Precompiled Vault Binary (ARM)][3] - -Download the desired precompiled Vault binary. - -![wget binary](http://blog.linoxide.com/wp-content/uploads/2015/04/wget-binary.png) - -Unzip the downloaded binary. - -![vault](http://blog.linoxide.com/wp-content/uploads/2015/04/unzip.png) - -unzipCongratulations! Vault is ready to be used. - -![](http://blog.linoxide.com/wp-content/uploads/2015/04/vault.png) - -**2. Compiling from source** is another way of installing Vault on the system. GO and GIT are required to be installed and configured properly on the system before we start the installation process. - -To **install GO on Redhat systems** use the following command. - - sudo yum install go - -To **install GO on Debian systems** use the following commands. - - sudo apt-get install golang - -OR - - sudo add-apt-repository ppa:gophers/go - - sudo apt-get update - - sudo apt-get install golang-stable - -To **install GIT on Redhat systems** use the following command. - - sudo yum install git - -To **install GIT on Debian systems** use the following commands. - - sudo apt-get install git - -Once both GO and GIT are installed we start the Vault installation process by compiling from the source. - -> Clone following Vault repository into the GOPATH - - https://github.com/hashicorp/vault - -> Verify if the following clone file exist, if it doesn’t then Vault wasn’t cloned to the proper path. - - $GOPATH/src/github.com/hashicorp/vault/main.go - -> Run following command to build Vault in the current system and put binary in the bin directory. - - make dev - -![path](http://blog.linoxide.com/wp-content/uploads/2015/04/installation4.png) - -### An introductory tutorial of Vault ### - -We have compiled Vault’s official interactive tutorial along with its output on SSH. - -**Overview** - -This tutorial will cover the following steps: - -- Initializing and unsealing your Vault -- Authorizing your requests to Vault -- Reading and writing secrets -- Sealing your Vault - -**Initialize your Vault** - -To get started, we need to initialize an instance of Vault for you to work with. -While initializing, you can configure the seal behavior of Vault. -Initialize Vault now, with 1 unseal key for simplicity, using the command: - - vault init -key-shares=1 -key-threshold=1 - -You'll notice Vault prints out several keys here. Don't clear your terminal, as these are needed in the next few steps. - -![Initializing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Initializing-SSH.png) - -**Unsealing your Vault** - -When a Vault server is started, it starts in a sealed state. In this state, Vault is configured to know where and how to access the physical storage, but doesn't know how to decrypt any of it. -Vault encrypts data with an encryption key. This key is encrypted with the "master key", which isn't stored. Decrypting the master key requires a threshold of shards. In this example, we use one shard to decrypt this master key. - - vault unseal - -![Unsealing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Unsealing-SSH.png) - -**Authorize your requests** - -Before performing any operation with Vault, the connecting client must be authenticated. Authentication is the process of verifying a person or machine is who they say they are and assigning an identity to them. This identity is then used when making requests with Vault. -For simplicity, we'll use the root token we generated on init in Step 2. This output should be available in the scrollback. -Authorize with a client token: - - vault auth - -![Authorize SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Authorize-SSH.png) - -**Read and write secrets** - -Now that Vault has been set-up, we can start reading and writing secrets with the default mounted secret backend. Secrets written to Vault are encrypted and then written to the backend storage. The backend storage mechanism never sees the unencrypted value and doesn't have the means necessary to decrypt it without Vault. - - vault write secret/hello value=world - -Of course, you can then read this data too: - - vault read secret/hello - -![RW_SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/RW_SSH.png) - -**Seal your Vault** - -There is also an API to seal the Vault. This will throw away the encryption key and require another unseal process to restore it. Sealing only requires a single operator with root privileges. This is typically part of a rare "break glass procedure". -This way, if there is a detected intrusion, the Vault data can be locked quickly to try to minimize damages. It can't be accessed again without access to the master key shards. - - vault seal - -![Seal Vault SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Seal-Vault-SSH.png) - -That is the end of introductory tutorial. - -### Summary ### - -Vault is a very useful application mainly because of providing a reliable and secure way of storing critical information. Furthermore it encrypts the critical information before storing, maintains audit logs, grants secret information for limited lease time and revokes it once lease is expired. It is platform independent and freely available to download and install. To discover more about Vault, readers are encouraged to visit the official website. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/how-tos/secure-secret-store-vault/ - -作者:[Aun Raza][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/arunrz/ -[1]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_386.zip -[2]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_amd64.zip -[3]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_arm.zip From 7b2669efd0a8127804583b702f2e464d70706bb4 Mon Sep 17 00:00:00 2001 From: wwy Date: Sat, 9 May 2015 09:58:29 +0800 Subject: [PATCH 0749/2517] [Translating] What are useful command-line network monitors on Linux --- ... What are useful command-line network monitors on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150112 What are useful command-line network monitors on Linux.md b/sources/tech/20150112 What are useful command-line network monitors on Linux.md index f17e45cbf4..8f6b9596d1 100644 --- a/sources/tech/20150112 What are useful command-line network monitors on Linux.md +++ b/sources/tech/20150112 What are useful command-line network monitors on Linux.md @@ -1,3 +1,5 @@ +translating by wwy-hust + What are useful command-line network monitors on Linux ================================================================================ Network monitoring is a critical IT function for businesses of all sizes. The goal of network monitoring can vary. For example, the monitoring activity can be part of long-term network provisioning, security protection, performance troubleshooting, network usage accounting, and so on. Depending on its goal, network monitoring is done in many different ways, such as performing packet-level sniffing, collecting flow-level statistics, actively injecting probes into the network, parsing server logs, etc. @@ -132,4 +134,4 @@ via: http://xmodulo.com/useful-command-line-network-monitors-linux.html [19]:http://xmodulo.com/better-alternatives-basic-command-line-utilities.html#mtr_link [20]:http://goaccess.io/ [21]:http://mtop.sourceforge.net/ -[22]:http://xmodulo.com/monitor-nginx-web-server-command-line-real-time.html \ No newline at end of file +[22]:http://xmodulo.com/monitor-nginx-web-server-command-line-real-time.html From 64bfbe62a6b0701a60b765876fc9ee6f28b7c3ca Mon Sep 17 00:00:00 2001 From: VicYu Date: Sat, 9 May 2015 15:39:32 +0800 Subject: [PATCH 0750/2517] =?UTF-8?q?=20=E6=8A=A2=E5=9C=B0=E4=B8=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150504 How To Install Visual Studio Code On Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md b/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md index 4b5d2eeae6..8912e3c06c 100644 --- a/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md +++ b/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md @@ -1,3 +1,5 @@ + Vic020 + How To Install Visual Studio Code On Ubuntu ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Install-Visual-Studio-Code-in-Ubuntu.jpeg) @@ -58,4 +60,4 @@ via: http://itsfoss.com/install-visual-studio-code-ubuntu/ [1]:http://www.geekwire.com/2015/microsofts-visual-studio-expands-to-mac-and-linux-with-new-code-development-tool/ [2]:https://wiki.ubuntu.com/ubuntu-make [3]:http://itsfoss.com/install-android-studio-ubuntu-linux/ -[4]:https://code.visualstudio.com/Download \ No newline at end of file +[4]:https://code.visualstudio.com/Download From 06be2e6b47d010f36894bdacf97a97f63a21deae Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 9 May 2015 20:44:08 +0800 Subject: [PATCH 0751/2517] PUB:20150225 Linux FAQs with Answers--How to disable IPv6 on Linux @ZTinoZ --- ...h Answers--How to disable IPv6 on Linux.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md (69%) diff --git a/translated/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/published/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md similarity index 69% rename from translated/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md rename to published/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md index 30ad533adc..17c6ccefaa 100644 --- a/translated/tech/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md +++ b/published/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md @@ -1,14 +1,14 @@ -Linux有问必答时间--如何在Linux下禁用IPv6 +Linux有问必答:如何在Linux下禁用IPv6 ================================================================================ -> **问题**:我发现我的一个应用程序在尝试通过IPv6建立连接,但是由于我们本地网络不允许分配IPv6的流量,IPv6连接会超时,应用程序的连接会退回到IPv4,这样就会造成不必要的延迟。由于我目前对IPv6没有任何需求,所以我想在我的Linux主机上禁用IPv6。有什么比较合适的方法呢? +> **问题**:我发现我的一个应用程序在尝试通过IPv6建立连接,但是由于我们本地网络不允许分配IPv6的流量,IPv6连接会超时,应用程序的连接会回退到IPv4,这样就会造成不必要的延迟。由于我目前对IPv6没有任何需求,所以我想在我的Linux主机上禁用IPv6。有什么比较合适的方法呢? -IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品,它为了解决现有IPv4地址空间即将耗尽的问题。然而,由于IPv4已经被每台主机或设备连接到了互联网上,所以想在一夜之间将它们全部切换到IPv6几乎是不可能的。许多IPv4到IPv6的转换机制(例如:双协议栈、网络隧道、代理) 已经被提出来用来促进IPv6能被采用,并且很多应用也正在进行重写,就像我们所说的,来增加对IPv6的支持。有一件事情能确定,就是在可预见的未来里IPv4和IPv6势必将共存。 +IPv6被认为是IPv4——互联网上的传统32位地址空间——的替代产品,它用来解决现有IPv4地址空间即将耗尽的问题。然而,由于已经有大量主机、设备用IPv4连接到了互联网上,所以想在一夜之间将它们全部切换到IPv6几乎是不可能的。许多IPv4到IPv6的转换机制(例如:双协议栈、网络隧道、代理) 已经被提出来用来促进IPv6能被采用,并且很多应用也正在进行重写,如我们所提倡的,来增加对IPv6的支持。有一件事情可以确定,就是在可预见的未来里IPv4和IPv6势必将共存。 -理想情况下,[向IPv6过渡的进程][1]不应该被最终的用户所看见,但是IPv4/IPv6混合环境有时会让你碰到各种源于IPv4和IPv6之间不经意间的相互作用的问题。举个例子,你会碰到应用程序超时的问题比如apt-get或ssh尝试通过IPv6连接失败、DNS服务器意外清空了IPv6的AAAA记录、或者你支持IPv6的设备不兼容你的互联网服务提供商遗留下的IPv4网络等等等等。 +理想情况下,[向IPv6过渡的进程][1]不应该被最终的用户所看见,但是IPv4/IPv6混合环境有时会让你碰到各种源于IPv4和IPv6之间不经意间的相互碰撞的问题。举个例子,你会碰到应用程序超时的问题,比如apt-get或ssh尝试通过IPv6连接失败、DNS服务器意外清空了IPv6的AAAA记录、或者你支持IPv6的设备不兼容你的互联网服务提供商遗留下的IPv4网络,等等等等。 -当然这不意味着你应该盲目地在你的Linux机器上禁用IPv6。鉴于IPv6许诺的种种好处,作为社会的一份子我们最终还是要充分拥抱它的,但是作为给最终用户进行故障排除过程的一部分,如果IPv6确实是罪魁祸首那你可以尝试去关闭它。 +当然这不意味着你应该盲目地在你的Linux机器上禁用IPv6。鉴于IPv6许诺的种种好处,作为社会的一份子我们最终还是要充分拥抱它的,但是作为给最终用户进行故障排除过程的一部分,如果IPv6确实是罪魁祸首,那你可以尝试去关闭它。 -这里有一些让你在Linux中部分或全部禁用IPv6的小技巧(例如:为一个已经确定的网络接口)。这些小贴士应该适用于所有主流的Linux发行版包括Ubuntu、Debian、Linux Mint、CentOS、Fedora、RHEL以及Arch Linux。 +这里有一些让你在Linux中部分(例如:对于某个特定的网络接口)或全部禁用IPv6的小技巧。这些小贴士应该适用于所有主流的Linux发行版包括Ubuntu、Debian、Linux Mint、CentOS、Fedora、RHEL以及Arch Linux。 ### 查看IPv6在Linux中是否被启用 ### @@ -24,7 +24,7 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 ### 临时禁用IPv6 ### -如果你想要在你的Linux系统上临时关闭IPv6,你可以用 /proc 文件系统。"临时",意思是我们所做的禁用IPv6的更改在系统重启后将不被保存。IPv6会在你的Linux机器重启后再次被启用。 +如果你想要在你的Linux系统上临时关闭IPv6,你可以用 /proc 文件系统。"临时"的意思是我们所做的禁用IPv6的更改在系统重启后将不被保存。IPv6会在你的Linux机器重启后再次被启用。 要将一个特定的网络接口禁用IPv6,使用以下命令: @@ -50,7 +50,7 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 #### 方法一 #### -第一种方法是请求以上提到的 /proc 对 /etc/sysctl.conf 文件进行修改。 +第一种方法是通过 /etc/sysctl.conf 文件对 /proc 进行永久修改。 换句话说,就是用文本编辑器打开 /etc/sysctl.conf 然后添加以下内容: @@ -69,7 +69,7 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 #### 方法二 #### -另一个永久禁用IPv6的方法是在开机的时候执行一个必要的内核参数。 +另一个永久禁用IPv6的方法是在开机的时候传递一个必要的内核参数。 用文本编辑器打开 /etc/default/grub 并给GRUB_CMDLINE_LINUX变量添加"ipv6.disable=1"。 @@ -79,7 +79,7 @@ IPv6被认为是IPv4——互联网上的传统32位地址空间的替代产品 GRUB_CMDLINE_LINUX="xxxxx ipv6.disable=1" -上面的"xxxxx"代表任意存在着的内核参数,在它后面添加"ipv6.disable=1"。 +上面的"xxxxx"代表任何已有的内核参数,在它后面添加"ipv6.disable=1"。 ![](https://farm8.staticflickr.com/7286/15982512103_ec5d940e58_b.jpg) @@ -97,7 +97,7 @@ Fedora、CentOS/RHEL系统: ### 禁用IPv6之后的其它可选步骤 ### -这里有一些可选步骤在你禁用IPv6后需要考虑,这是因为当你在内核里禁用IPv6后,其它程序仍然会尝试使用IPv6。在大多数情况下,例如应用程序的运转状态不太会遭到破坏,但是出于效率或安全方面的原因,你要为他们禁用IPv6。 +这里有一些在你禁用IPv6后需要考虑的可选步骤,这是因为当你在内核里禁用IPv6后,其它程序也许仍然会尝试使用IPv6。在大多数情况下,应用程序的这种行为不太会影响到什么,但是出于效率或安全方面的原因,你可以为他们禁用IPv6。 #### /etc/hosts #### @@ -124,7 +124,7 @@ Fedora、CentOS/RHEL系统: 默认情况下,OpenSSH服务(sshd)会去尝试捆绑IPv4和IPv6的地址。 -要强制sshd只捆绑IPv4地址,用文本编辑器打开 /etc/ssh/sshd_config 并添加以下脚本行。inet只适用于IPv4,而inet6是适用于IPv6的。 +要强制sshd只捆绑IPv4地址,用文本编辑器打开 /etc/ssh/sshd_config 并添加以下行。inet只适用于IPv4,而inet6是适用于IPv6的。 $ sudo vi /etc/ssh/sshd_config @@ -140,7 +140,7 @@ via: http://ask.xmodulo.com/disable-ipv6-linux.html 作者:[Dan Nanni][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e28011b47eeda4dc8f4d9f410aabe1b1519b41aa Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 9 May 2015 22:03:33 +0800 Subject: [PATCH 0752/2517] PUB:20150211 25 Tips for Intermediate Git Users @zpl1025 --- ...0211 25 Tips for Intermediate Git Users.md | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) rename {translated/tech => published}/20150211 25 Tips for Intermediate Git Users.md (82%) diff --git a/translated/tech/20150211 25 Tips for Intermediate Git Users.md b/published/20150211 25 Tips for Intermediate Git Users.md similarity index 82% rename from translated/tech/20150211 25 Tips for Intermediate Git Users.md rename to published/20150211 25 Tips for Intermediate Git Users.md index a1c1dd8328..205c83aaef 100644 --- a/translated/tech/20150211 25 Tips for Intermediate Git Users.md +++ b/published/20150211 25 Tips for Intermediate Git Users.md @@ -1,6 +1,6 @@ -25个给git熟手的技巧 +25个 Git 进阶技巧 ================================================================================ -我已经使用git差不多18个月了,觉得自己对它应该已经非常了解。然后来自GitHub的[Scott Chacon][1]过来给LVS做培训,[LVS是一个赌博软件供应商和开发商][2](从2013年开始的合同),而我在第一天里就学到了很多。 +我已经使用git差不多18个月了,觉得自己对它应该已经非常了解。然后来自GitHub的[Scott Chacon][1]过来给LVS做培训([LVS是一个赌博软件供应商和开发商][2],从2013年开始的合同),而我在第一天里就学到了很多。 作为一个对git感觉良好的人,我觉得分享从社区里掌握的一些有价值的信息,也许能帮某人解决问题而不用做太深入研究。 @@ -15,21 +15,21 @@ #### 2. Git是基于指针的 #### -保存在git里的一切都是文件。当你创建一个提交的时候,会建立一个包含你的提交信息和相关数据(名字,邮件地址,日期/时间,前一个提交,等等)的文件,并把它链接到一个文件树中。文件树中包含了对象或其他树的列表。对象或容器是和本次提交相关的实际内容(也是一个文件,你想了解的话,尽管文件名并没有包含在对象里,而是在树中)。所有这些文件都使用对象的SHA-1哈希值作为文件名。 +保存在git里的一切都是文件。当你创建一个提交的时候,会建立一个包含你的提交信息和相关数据(名字,邮件地址,日期/时间,前一个提交,等等)的文件,并把它链接到一个树文件中。这个树文件中包含了对象或其他树的列表。这里的提到的对象(或二进制大对象)是和本次提交相关的实际内容(它也是一个文件,另外,尽管文件名并没有包含在对象里,但是存储在树中)。所有这些文件都使用对象的SHA-1哈希值作为文件名。 -用这种方式,分支和标签就是简单的文件(基本上是这样),包含指向实际提交的SHA-1哈希值。使用这些索引会带来优秀的灵活性和速度,比如创建一个新分支就只要简单地创建一个包含分支名字和所分出的那个提交的SHA-1索引的文件。当然,你不需要自己做这些,而只要使用Git命令行工具(或者GUI),但是实际上就是这么简单。 +用这种方式,分支和标签就是简单的文件(基本上是这样),包含指向该提交的SHA-1哈希值。使用这些索引会带来优秀的灵活性和速度,比如创建一个新分支就是简单地用分支名字和所分出的那个提交的SHA-1索引来创建一个文件。当然,你不需要自己做这些,而只要使用Git命令行工具(或者GUI),但是实际上就是这么简单。 -你也许听说过叫HEAD的索引。这只是简单的一个文件,包含了你当前指向的那个提交的SHA-1索引值。如果你正在解决一次合并冲突然后看到了HEAD,这并不是一个特别的分支或分值上一个必须的特殊点,只是标明你当前所在位置。 +你也许听说过叫HEAD的索引。这只是简单的一个文件,包含了你当前指向的那个提交的SHA-1索引值。如果你正在解决一次合并冲突然后看到了HEAD,这并不是一个特别的分支或分支上的一个必需的特殊位置,只是标明你当前所在位置。 -所有的分支指针都保存在.git/refs/heads里,HEAD在.git/HEAD里,而标签保存在.git/refs/tags里 - 自己可以放心地进去看看。 +所有的分支指针都保存在.git/refs/heads里,HEAD在.git/HEAD里,而标签保存在.git/refs/tags里 - 自己可以随便进去看看。 -#### 3. 两个父节点 - 当然! #### +#### 3. 两个爸爸(父节点) - 你没看错! #### -在历史中查看一个合并提交的信息时,你将看到有两个父节点(相对于一般工作上的常规提交的情况)。第一个父节点是你所在的分支,第二个是你合并过来的分支。 +在历史中查看一个合并提交的信息时,你将看到有两个父节点(不同于工作副本上的常规提交的情况)。第一个父节点是你所在的分支,第二个是你合并过来的分支。 #### 4. 合并冲突 #### -目前我相信你碰到过合并冲突并且解决过。通常是编辑一下文件,去掉<<<<,====,>>>>标志,保留需要留下的代码。有时能够看到这两个修改之前的代码会很不错,比如,在这两个分支上有冲突的改动之前。下面是一种方式: +目前我相信你碰到过合并冲突并且解决过。通常是编辑一下文件,去掉<<<<,====,>>>>标志,保留需要留下的代码。有时能够看到这两个修改之前的代码会很不错,比如,在这两个现在冲突的分支之前的改动。下面是一种方式: $ git diff --merge diff --cc dummy.rb @@ -45,14 +45,14 @@ end end -如果是二进制文件,比较差异就没那么简单了...通常你要做的就是测试这个二进制文件的两个版本来决定保留哪个(或者在二进制文件编辑器里手工复制冲突部分)。从一个特定分支获取文件拷贝(比如说你在合并master和feature123): +如果是二进制文件,比较差异就没那么简单了...通常你要做的就是测试这个二进制文件的两个版本来决定保留哪个(或者在二进制文件编辑器里手工复制冲突部分)。从一个特定分支获取文件拷贝(比如说你在合并master和feature123两个分支): $ git checkout master flash/foo.fla # 或者... $ git checkout feature132 flash/foo.fla $ # 然后... $ git add flash/foo.fla -另一种方式是通过git输出文件 - 你可以输出到另外的文件名,然后再重命名正确的文件(当你决定了要用哪个)为正常的文件名: +另一种方式是通过git输出文件 - 你可以输出到另外的文件名,然后当你决定了要用哪个后,再将选定的正确文件复制为正常的文件名: $ git show master:flash/foo.fla > master-foo.fla $ git show feature132:flash/foo.fla > feature132-foo.fla @@ -71,7 +71,7 @@ #### 5. 远端服务器 #### -git的一个超强大的功能就是可以有不止一个远端服务器(实际上你一直都在一个本地仓库上工作)。你并不是一定都要有写权限,你可以有多个可以读取的服务器(用来合并他们的工作)然后写入其他仓库。添加一个新的远端服务器很简单: +git的一个超强大的功能就是可以有不止一个远端服务器(实际上你一直都在一个本地仓库上工作)。你并不是一定都要有这些服务器的写权限,你可以有多个可以读取的服务器(用来合并他们的工作)然后写入到另外一个仓库。添加一个新的远端服务器很简单: $ git remote add john git@github.com:johnsomeone/someproject.git @@ -87,10 +87,10 @@ git的一个超强大的功能就是可以有不止一个远端服务器(实 $ git diff master..john/master -你也可以查看不在远端分支的HEAD的改动: +你也可以查看没有在远端分支上的HEAD的改动: $ git log remote/branch.. - # 注意:..后面没有结束的refspec + # 注意:..后面没有结束的特定引用 #### 6. 标签 #### @@ -99,7 +99,7 @@ git的一个超强大的功能就是可以有不止一个远端服务器(实 建立这两种类型的标签都很简单(只有一个命令行开关的差异) $ git tag to-be-tested - $ git tag -a v1.1.0 # 会提示输入标签信息 + $ git tag -a v1.1.0 # 会提示输入标签的信息 #### 7. 建立分支 #### @@ -108,7 +108,7 @@ git的一个超强大的功能就是可以有不止一个远端服务器(实 $ git branch feature132 $ git checkout feature132 -当然,如果你确定自己要新建分支并直接切换过去,可以用一个命令实现: +当然,如果你确定自己直接切换到新建的分支,可以用一个命令实现: $ git checkout -b feature132 @@ -117,20 +117,20 @@ git的一个超强大的功能就是可以有不止一个远端服务器(实 $ git checkout -b twitter-experiment feature132 $ git branch -d feature132 -更新:你也可以(像Brian Palmer在原博客文章的评论里提出的)只用“git branch”的-m开关在一个命令里实现(像Mike提出的,如果你只有一个分支参数,就会重命名当前分支): +更新:你也可以(像Brian Palmer在原博客文章的评论里提出的)只用“git branch”的-m开关在一个命令里实现(像Mike提出的,如果你只指定了一个分支参数,就会重命名当前分支): $ git branch -m twitter-experiment $ git branch -m feature132 twitter-experiment #### 8. 合并分支 #### -在将来什么时候,你希望合并改动。有两种方式: +也许在将来的某个时候,你希望将改动合并。有两种方式: $ git checkout master $ git merge feature83 # 或者... $ git rebase feature83 -merge和rebase之间的差别是merge会尝试处理改动并建立一个新的混合了两者的提交。rebase会尝试把你从一个分支最后一次分离后的所有改动,一个个加到该分支的HEAD上。不过,在已经将分支推到远端服务器后不要再rebase了 - 这回引起冲突/问题。 +merge和rebase之间的差别是merge会尝试处理改动并建立一个新的混合了两者的提交。rebase会尝试把你从一个分支最后一次分离后的所有改动,一个个加到该分支的HEAD上。不过,在已经将分支推到远端服务器后不要再rebase了 - 这会引起冲突/问题。 如果你不确定在哪些分支上还有独有的工作 - 所以你也不知道哪些分支需要合并而哪些可以删除,git branch有两个开关可以帮你: @@ -147,7 +147,7 @@ merge和rebase之间的差别是merge会尝试处理改动并建立一个新的 $ git push origin twitter-experiment:refs/heads/twitter-experiment # origin是我们服务器的名字,而twitter-experiment是分支名字 -更新:感谢Erlend在原博客文章上的评论 - 这个实际上和`git push origin twitter-experiment`效果一样,不过使用完整的语法,你可以在两者之间使用不同的分知名(这样本地分支可以是`add-ssl-support`而远端是`issue-1723`)。 +更新:感谢Erlend在原博客文章上的评论 - 这个实际上和`git push origin twitter-experiment`效果一样,不过使用完整的语法,你可以在两者之间使用不同的分支名(这样本地分支可以是`add-ssl-support`而远端是`issue-1723`)。 如果你想在远端服务器上删除一个分支(注意分支名前面的冒号): @@ -210,7 +210,7 @@ git会基于当前的提交信息自动创建评论。如果你更希望有自 这会让你进入一个基于菜单的交互式提示。你可以使用命令中的数字或高亮的字母(如果你在终端里打开了高亮的话)来进入相应的模式。然后就只是输入你希望操作的文件的数字了(你可以使用这样的格式,1或者1-4或2,4,7)。 -如果你想进入补丁模式(交互式模式下的‘p’或‘5’),你也可以直接进入: +如果你想进入补丁模式(交互式模式下按‘p’或‘5’),你也可以直接进入: $ git add -p diff --git a/dummy.rb b/dummy.rb @@ -226,11 +226,11 @@ git会基于当前的提交信息自动创建评论。如果你更希望有自 end Stage this hunk [y,n,q,a,d,/,e,?]? -你可以看到下方会有一些选项供选择用来添加该文件的这个改动,该文件的所有改动,等等。使用‘?’命令可以详细解释这些选项。 +你可以看到下方会有一些选项供选择用来添加该文件的这个改动、该文件的所有改动,等等。使用‘?’命令可以详细解释这些选项。 #### 12. 从文件系统里保存/取回改动 #### -有些项目(比如git项目本身)在git文件系统中直接保存额外文件而并没有将它们加入到版本控制中。 +有些项目(比如Git项目本身)在git文件系统中直接保存额外文件而并没有将它们加入到版本控制中。 让我们从在git中存储一个随机文件开始: @@ -251,7 +251,7 @@ git会基于当前的提交信息自动创建评论。如果你更希望有自 #### 13. 查看日志 #### -如果不用‘git log’来查看最近的提交你git用不了多久。不过,有一些技巧来更好地应用。比如,你可以使用下面的命令来查看每次提交的具体改动: +长时间使用 Git 的话,不会没用过‘git log’来查看最近的提交。不过,有一些技巧来更好地应用。比如,你可以使用下面的命令来查看每次提交的具体改动: $ git log -p @@ -268,7 +268,7 @@ git会基于当前的提交信息自动创建评论。如果你更希望有自 #### 14. 搜索日志 #### -如果你想找特定作者可以这样做: +如果你想找特定提交者可以这样做: $ git log --author=Andy @@ -278,7 +278,7 @@ git会基于当前的提交信息自动创建评论。如果你更希望有自 $ git log --grep="Something in the message" -也有一个更强大的叫做pickaxe的命令用来查找删除或添加某个特定内容的提交(比如,该文件第一次出现或被删除)。这可以告诉你什么时候增加了一行(但这一行里的某个字符后面被改动过就不行了): +也有一个更强大的叫做pickaxe的命令用来查找包含了删除或添加的某个特定内容的提交(比如,该内容第一次出现或被删除)。这可以告诉你什么时候增加了一行(但这一行里的某个字符后面被改动过就不行了): $ git log -S "TODO: Check for admin status" @@ -294,7 +294,7 @@ git会基于当前的提交信息自动创建评论。如果你更希望有自 $ git log --since=2.months.ago --until=1.day.ago -默认情况下会用OR来组合查询,但你可以轻易地改为AND(如果你有超过一条的标准) +默认情况下会用OR来组合查询,但你可以轻易地改为AND(如果你有超过一条的查询标准) $ git log --since=2.months.ago --until=1.day.ago --author=andy -S "something" --all-match @@ -310,7 +310,7 @@ git会基于当前的提交信息自动创建评论。如果你更希望有自 $ git show feature132@{yesterday} # 时间相关 $ git show feature132@{2.hours.ago} # 时间相关 -注意和之前部分有些不同,末尾的插入符号意思是该提交的父节点 - 开始位置的插入符号意思是不在这个分支。 +注意和之前部分有些不同,末尾的^的意思是该提交的父节点 - 开始位置的^的意思是不在这个分支。 #### 16. 选择范围 #### @@ -321,7 +321,7 @@ git会基于当前的提交信息自动创建评论。如果你更希望有自 你也可以省略[new],将使用当前的HEAD。 -### Rewinding Time & Fixing Mistakes ### +### 时光回溯和后悔药 ### #### 17. 重置改动 #### @@ -329,7 +329,7 @@ git会基于当前的提交信息自动创建评论。如果你更希望有自 $ git reset HEAD lib/foo.rb -通常会使用‘unstage’的别名,因为看上去有些不直观。 +通常会使用‘unstage’的别名,因为上面的看上去有些不直观。 $ git config --global alias.unstage "reset HEAD" $ git unstage lib/foo.rb @@ -369,11 +369,11 @@ git会基于当前的提交信息自动创建评论。如果你更希望有自 #### 19. 交互式切换基础 #### -这是一个我之前看过展示却没真正理解过的很赞的功能,现在很简单。假如说你提交了3次但是你希望更改顺序或编辑(或者合并): +这是一个我之前看过展示却没真正理解过的很赞的功能,现在觉得它就很简单了。假如说你提交了3次但是你希望更改顺序或编辑(或者合并): $ git rebase -i master~3 -然后会启动你的编辑器并带有一些指令。你所要做的就是修改这些指令来选择/插入/编辑(或者删除)提交和保存/退出。然后在编辑完后你可以用`git rebase --continue`命令来让每一条指令生效。 +然后这会启动你的编辑器并带有一些指令。你所要做的就是修改这些指令来选择/插入/编辑(或者删除)提交和保存/退出。然后在编辑完后你可以用`git rebase --continue`命令来让每一条指令生效。 如果你有修改,将会切换到你提交时所处的状态,之后你需要使用命令git commit --amend来编辑。 @@ -446,7 +446,7 @@ git会基于当前的提交信息自动创建评论。如果你更希望有自 $ git branch experimental SHA1_OF_HASH -如果你访问过的话,你通常可以用git reflog来找到SHA1哈希值。 +如果你最近访问过的话,你通常可以用git reflog来找到SHA1哈希值。 另一种方式是使用`git fsck —lost-found`。其中一个dangling的提交就是丢失的HEAD(它只是已删除分支的HEAD,而HEAD^被引用为当前的HEAD所以它并不处于dangling状态) @@ -460,7 +460,7 @@ via: https://www.andyjeffries.co.uk/25-tips-for-intermediate-git-users/ 作者:[Andy Jeffries][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 20e5eff6a3f092f96c01d642c4df7bd5cdf25a4f Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 9 May 2015 22:07:37 +0800 Subject: [PATCH 0753/2517] PUB:20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu @geekpi --- ...l script returned error exit status 1' In Ubuntu.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md (71%) diff --git a/translated/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md b/published/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md similarity index 71% rename from translated/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md rename to published/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md index b086684614..09cb220cd2 100644 --- a/translated/tech/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md +++ b/published/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md @@ -1,4 +1,4 @@ -Linux 基础:如何修复Ubuntu上“E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1 ”的错误 +如何修复 Ubuntu 上“...script returned error exit status 1”的错误 ================================================================================ ![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2014/04/ubuntu-790x558.png) @@ -6,11 +6,11 @@ Linux 基础:如何修复Ubuntu上“E: /var/cache/apt/archives/ subprocess ne > E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1 -![](https://www.unixmen.com/wp-content/uploads/2015/03/Update-Manager_0011.png) +![](http://www.unixmen.com/wp-content/uploads/2015/03/Update-Manager_0011.png) ### 解决: ### -我google了以下并找到了方法。下面是我解决的方法。 +我google了一下并找到了方法。下面是我解决的方法。 sudo apt-get clean sudo apt-get update && sudo apt-get upgrade @@ -33,11 +33,11 @@ Linux 基础:如何修复Ubuntu上“E: /var/cache/apt/archives/ subprocess ne -------------------------------------------------------------------------------- -via: https://www.unixmen.com/linux-basics-how-to-fix-e-varcacheaptarchives-subprocess-new-pre-removal-script-returned-error-exit-status-1-in-ubuntu/ +via: http://www.unixmen.com/linux-basics-how-to-fix-e-varcacheaptarchives-subprocess-new-pre-removal-script-returned-error-exit-status-1-in-ubuntu/ 作者:[SK][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b6a841abc5a9ef014fd74da3396770bb58bb0bca Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 9 May 2015 22:46:49 +0800 Subject: [PATCH 0754/2517] PUB:20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu @wi-cuckoo --- ... and Smart phones Using Prey Tool in Ubuntu.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md (84%) diff --git a/translated/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md b/published/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md similarity index 84% rename from translated/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md rename to published/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md index 2d9a5e4485..168032e2a4 100644 --- a/translated/tech/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md +++ b/published/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md @@ -1,14 +1,14 @@ -Ubuntu中,使用Prey定位被盗的笔记本与手机 +使用Prey定位被盗的Ubuntu笔记本与智能电话 =============================================================================== -Prey是一款跨平台的开源工具,可以帮助你找回被盗的笔记本,台式机,平板和智能手机。它已经获得了广泛的流行,声称帮助召回了成百上千台丢失的笔记本和智能手机。Prey的使用特别简单,首先安装在你的笔记本或者手机上,当你的设备不见了,用你的账号登入Prey网站,并且标记你的设备为“丢失”。只要小偷将设备接入网络,Prey就会马上发送设备的地理位置给你。如果你的笔记本有摄像头,它还会拍下小偷。 +Prey是一款跨平台的开源工具,可以帮助你找回被盗的笔记本,台式机,平板和智能手机。它已经获得了广泛的流行,声称帮助找回了成百上千台丢失的笔记本和智能手机。Prey的使用特别简单,首先安装在你的笔记本或者手机上,当你的设备不见了,用你的账号登入Prey网站,并且标记你的设备为“丢失”。只要小偷将设备接入网络,Prey就会马上发送设备的地理位置给你。如果你的笔记本有摄像头,它还会拍下该死的贼。 -Prey占用很小的系统资源;你不会对你的设备运行有任何影响。你也可以配合其他你已经在设备上安装的防盗软件使用。Prey采用安全加密的通道,在你的设备与Prey服务器之间进行数据传输。 +Prey占用很小的系统资源;你不会对你的设备运行有任何影响。你也可以配合其他你已经在设备上安装的防盗软件使用。Prey在你的设备与Prey服务器之间采用安全加密的通道进行数据传输。 ### 在Ubuntu上安装并配置Prey ### -让我们来看看如何在Ubuntu上安装和配置Prey,需要提醒的是,在配置过程中,我们必须到Prey官网进行账号注册。一旦完成上述工作,Prey将会开始监视的设备了。免费的账号最多可以监视三个设备,如果你需要添加更多的设备,你就需要购买合适的的套餐了。 +让我们来看看如何在Ubuntu上安装和配置Prey,需要提醒的是,在配置过程中,我们必须到Prey官网进行账号注册。一旦完成上述工作,Prey将会开始监视你的设备了。免费的账号最多可以监视三个设备,如果你需要添加更多的设备,你就需要购买合适的的套餐了。 -想象一下Prey多么流行与被广泛使用,它现在已经被添加到了官方的软件库中了。这意味着你不要往软件包管理器添加任何PPA。很简单地,登录你的终端,运行以下的命令来安装它: +可以想象Prey多么流行与被广泛使用,它现在已经被添加到了官方的软件库中了。这意味着你不要往软件包管理器添加任何PPA。很简单,登录你的终端,运行以下的命令来安装它: sudo apt-get install prey @@ -54,7 +54,7 @@ Prey有一个明显的不足。它需要你的设备接入互联网才会发送 ### 结论 ### -这是一款小巧,非常有用的安全保护应用,可以让你在一个地方追踪你所有的设备,尽管不完美,但是仍然提供了找回被盗设备的机会。它在Linux,Windows和Mac平台上无缝运行。以上就是Prey完整使用的所有细节。 +这是一款小巧,非常有用的安全保护应用,可以让你在一个地方追踪你所有的设备,尽管不完美,但是仍然提供了找回被盗设备的机会。它在Linux,Windows和Mac平台上无缝运行。以上就是[Prey][2]完整使用的所有细节。 ------------------------------------------------------------------------------- @@ -62,9 +62,10 @@ via: http://linoxide.com/ubuntu-how-to/anti-theft-application-prey-ubuntu/ 作者:[Aun Raza][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunrz/ [1]:https://preyproject.com/ +[2]:https://preyproject.com/plans From e27aefb0c653cdd00e9bc1bc5d78b2079dfb504f Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sun, 10 May 2015 09:04:51 +0800 Subject: [PATCH 0755/2517] Translating by DongShuaike --- .../tech/20150126 Installing Cisco Packet tracer in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md b/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md index edac7a7490..539a624e1f 100644 --- a/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md +++ b/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md @@ -1,3 +1,5 @@ +[Translating by DongShuaike] + Installing Cisco Packet tracer in Linux ================================================================================ ![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Main_picture.png) @@ -194,4 +196,4 @@ via: http://www.unixmen.com/installing-cisco-packet-tracer-linux/ [1]:https://www.netacad.com/ [2]:https://www.dropbox.com/s/5evz8gyqqvq3o3v/Cisco%20Packet%20Tracer%206.1.1%20Linux.tar.gz?dl=0 [3]:http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html -[4]:https://www.netacad.com/ \ No newline at end of file +[4]:https://www.netacad.com/ From 44f65f05f0e3d4a34ac869cd0b238639c2b04fd1 Mon Sep 17 00:00:00 2001 From: wwy Date: Sun, 10 May 2015 11:21:41 +0800 Subject: [PATCH 0756/2517] translated half of the article --- ... command-line network monitors on Linux.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 translated/tech/20150112 What are useful command-line network monitors on Linux.md diff --git a/translated/tech/20150112 What are useful command-line network monitors on Linux.md b/translated/tech/20150112 What are useful command-line network monitors on Linux.md new file mode 100644 index 0000000000..1019173a65 --- /dev/null +++ b/translated/tech/20150112 What are useful command-line network monitors on Linux.md @@ -0,0 +1,65 @@ +ʲôLinuxʵõ +=============================================================================== +κιģҵ˵һҪĹܡĹܿǧ𡣱磬ӻdz繩Ӧһ֣ȫܻŴʹͳƵȡĿ겻ͬʹúܶ಻ͬķʽ񡣱ʹð̽⣬ռͳݣע̽־ȡ + +רõϵͳ36524СʱӣɿضʹʽijЩʽijϵͳԱӦʹһЩ֪ʽʵһ**Linuxʵõ**б + +### ̽ ### + +£·ϲ׽İǵݣչʾݻ߰ͳݡЩ͵IJмӡͬҲܽϸȵļӣDzI/OͷĹ̡ + +1. **dhcpdump**һʽDHCP̽ߣ׽DHCP/ظͨţûѺõķʽʾDHCPЭϢһŲDHCPعϵʵùߡ + +2. **[dsniff][1]**һе̽ߵļϣӵƭͽٳֹܣƺ͸ԡֲ̽ͬϢ롢NSFemailϢַȡ + +3. **[httpry][2]**һHTTP̽ڲ񡢽HTTPͻظģûѺõķʽʾЩϢ + +4. **IPTraf**еͳݲ鿴ʵʱʾ桢Ӳ桢ӿڲ桢Эı/ֽץЭƣҲȫDz˵ġ + +![](https://farm8.staticflickr.com/7519/16055246118_8ea182b413_c.jpg) + +5. **[mysql-sniffer][3]**һץȡMySQLصݰĹߡԿɶķʽʾƵȫ + +6. **[ngrep][4]**籨ִgrepʵʱץȡģʹʽʮƱʽķʽƥ䱨ġһԶ쳣м⡢洢߶ʵʱرģʽĽץȡʵùߡ + +7. **[p0f][5]**һĻڰָ̽ƲɼߣԿɿʶϵͳNATߴá·ԼTCPصԡ + +8. **pktstat**һʽĹߣͨģʾʵʱӴʹԼصЭ飨磬HTTP GET/POSTFTPX11Ϣ + +![](https://farm8.staticflickr.com/7477/16048970999_be60f74952_b.jpg + +9. **Snort**һּԤߣͨЭƥ䣬/ԤԾиָĺšʬ硢㡢 + +10. **tcpdump**һе̽ߣԻڹ˱ʽץȡеıģģڰݡصĴŲ顢debug[ȫ][6]ⷽӦù㷺 + +11. **tshark**һWiresharkڳһʹõʽ̽ߡܲ׽ϵʵʱģûѺõķʽʾݡ + +### //ӿڲļ ### + +УͨΪӦĽ̻ӿռÿÿ̡ÿӿڵͳݡϢԴlibpcapץsysfsںļϵͳЩߵļӳɱܵͣȱļ + +12. **bmon**һеĴ⹤ߣʾֽӿصϢ/͵ֵ/ƽֵͳݣӵʷʹͼ + +![](https://farm9.staticflickr.com/8580/16234265932_87f20c5d17_b.jpg) + +13. **[iftop][7]**һʹü⹤ߣʵʱʾijӵĴʹдʹ򲢻ncursesĽӿпӻԷļǸʹĴ + +14. **nethogs**һ̼ӹߣṩصʵʱ/дʹϢncursesʾԼռôĽ̺á + +15. **netstat**һʾTCP/UDPջӿڷ/ա·ɱЭ/׽ֵͳϢԵйߡջصܡԴʹʱá + +16. **[speedometer][8]**һӻijӿʷ/մʹƣһncurses״ͼʾĹߡ + +![](https://farm8.staticflickr.com/7485/16048971069_31dd573a4f_c.jpg) + +17. **[sysdig][9]**һLinuxϵͳӵͳһԽӿڵϵͳۺdebugߡģԼ/ߡ/صͳݣ/ȡ + +18. **tcptrack**һTCPӼӹߣʾTCPӣԴ/ĿĵIPַ/˿ڡTCP״̬ʹõȡ + +![](https://farm8.staticflickr.com/7507/16047703080_5fdda2e811_b.jpg) + +19. **vnStat**һά˻ڽӿڵʷ/ʹʹͼ磬ǰÿաÿ£Ϊһ̨ػ̣ռ洢ͳݣӿڴʹʺʹֽ + +###  ### + + From 965bc4332b94b6b0ebfb493e3b6101c406e3b3ac Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 10 May 2015 11:38:58 +0800 Subject: [PATCH 0757/2517] translating --- .../20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md b/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md index a8c58b82af..f2ba21d1eb 100644 --- a/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md +++ b/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md @@ -1,3 +1,5 @@ +translating---geekpi + How to Setup OpenERP (Odoo) on CentOS 7.x ================================================================================ Hi everyone, this tutorial is all about how we can setup Odoo (formerly known as OpenERP) on our CentOS 7 Server. Are you thinking to get an awesome ERP (Enterprise Resource Planning) app for your business ?. Then, OpenERP is the best app you are searching as it is a Free and Open Source Software which provides an outstanding features for your business or company. @@ -109,4 +111,4 @@ via: http://linoxide.com/linux-how-to/setup-openerp-odoo-centos-7/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:https://www.odoo.com/ \ No newline at end of file +[1]:https://www.odoo.com/ From b248e4a27b0ed03ff2af39a326287dd6beb317af Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 10 May 2015 12:10:56 +0800 Subject: [PATCH 0758/2517] Update 20150331 Conky--The Ultimate X Based System Monitor Application.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ... Conky--The Ultimate X Based System Monitor Application.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md b/sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md index fdb2648a36..b54d6763d3 100644 --- a/sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md +++ b/sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md @@ -1,3 +1,5 @@ +FSSlc translating + Conky – The Ultimate X Based System Monitor Application ================================================================================ Conky is a system monitor application written in ‘C’ Programming Language and released under GNU General Public License and BSD License. It is available for Linux and BSD Operating System. The application is X (GUI) based that was originally forked from [Torsmo][1]. @@ -144,4 +146,4 @@ via: http://www.tecmint.com/install-conky-in-ubuntu-debian-fedora/ [3]:http://ubuntuforums.org/showthread.php?t=281865 [4]:http://conky.sourceforge.net/screenshots.html [5]:http://ubuntuforums.org/showthread.php?t=281865/ -[6]:http://conky.sourceforge.net/ \ No newline at end of file +[6]:http://conky.sourceforge.net/ From 154dd4aef9ab91e5a1976bc11676e431368e8294 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 10 May 2015 13:14:50 +0800 Subject: [PATCH 0759/2517] translated --- ...w to Setup OpenERP (Odoo) on CentOS 7.x.md | 114 ------------------ ...w to Setup OpenERP (Odoo) on CentOS 7.x.md | 112 +++++++++++++++++ 2 files changed, 112 insertions(+), 114 deletions(-) delete mode 100644 sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md create mode 100644 translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md diff --git a/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md b/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md deleted file mode 100644 index f2ba21d1eb..0000000000 --- a/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md +++ /dev/null @@ -1,114 +0,0 @@ -translating---geekpi - -How to Setup OpenERP (Odoo) on CentOS 7.x -================================================================================ -Hi everyone, this tutorial is all about how we can setup Odoo (formerly known as OpenERP) on our CentOS 7 Server. Are you thinking to get an awesome ERP (Enterprise Resource Planning) app for your business ?. Then, OpenERP is the best app you are searching as it is a Free and Open Source Software which provides an outstanding features for your business or company. - -[OpenERP][1] is a free and open source traditional OpenERP (Enterprise Resource Planning) app which includes Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management and many more modules included for a better way to boost the productivity and sales. Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps. - -So, here are some quick and easy steps to get your copy of OpenERP installed on your CentOS machine. - -### 1. Installing PostgreSQL ### - -First of all, we'll want to update the packages installed in our CentOS 7 machine to ensure that the latest packages, patches and security are up to date. To update our sytem, we should run the following command in a shell or terminal. - - # yum clean all - # yum update - -Now, we'll want to install PostgreSQL Database System as OpenERP uses PostgreSQL for its database system. To install it, we'll need to run the following command. - - # yum install postgresql postgresql-server postgresql-libs - -![Installing postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-postgresql.png) - -After it is installed, we'll need to initialize the database with the following command - - # postgresql-setup initdb - -![Intializating postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/intializating-postgresql.png) - -We'll then set PostgreSQL to start on every boot and start the PostgreSQL Database server. - - # systemctl enable postgresql - # systemctl start postgresql - -As we haven't set a password for the user "postgresql", we'll want to set it now. - - # su - postgres - $ psql - postgres=# \password postgres - postgres=# \q - # exit - -![setting password postgres](http://blog.linoxide.com/wp-content/uploads/2015/03/setting-password-postgres.png) - -### 2. Configuring Odoo Repository ### - -After our Database Server has been installed correctly, we'll want add EPEL (Extra Packages for Enterprise Linux) to our CentOS server. Odoo (or OpenERP) depends on Python run-time and many other packages that are not included in default standard repository. As such, we'll want to add the Extra Packages for Enterprise Linux (or EPEL) repository support so that Odoo can get the required dependencies. To install, we'll need to run the following command. - - # yum install epel-release - -![Installing EPEL Release](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-epel-release.png) - -Now, after we install EPEL, we'll now add repository of Odoo (OpenERP) using yum-config-manager. - - # yum install yum-utils - - # yum-config-manager --add-repo=https://nightly.odoo.com/8.0/nightly/rpm/odoo.repo - -![Adding OpenERP (Odoo) Repo](http://blog.linoxide.com/wp-content/uploads/2015/03/added-odoo-repo.png) - -### 3. Installing Odoo 8 (OpenERP) ### - -Finally after adding repository of Odoo 8 (OpenERP) in our CentOS 7 machine. We'll can install Odoo 8 (OpenERP) using the following command. - - # yum install -y odoo - -The above command will install odoo along with the necessary dependency packages. - -![Installing odoo or OpenERP](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-odoo.png) - -Now, we'll enable automatic startup of Odoo in every boot and will start our Odoo service using the command below. - - # systemctl enable odoo - # systemctl start odoo - -![Starting Odoo](http://blog.linoxide.com/wp-content/uploads/2015/03/starting-odoo.png) - -### 4. Allowing Firewall ### - -As Odoo uses port 8069, we'll need to allow firewall for remote access. We can allow firewall to port 8069 by running the following command. - - # firewall-cmd --zone=public --add-port=8069/tcp --permanent - # firewall-cmd --reload - -![Allowing firewall Port](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-firewall-port.png) - -**Note: By default, only connections from localhost are allowed. If we want to allow remote access to PostgreSQL databases, we'll need to add the line shown in the below image to pg_hba.conf configuration file:** - - # nano /var/lib/pgsql/data/pg_hba.conf - -![Allowing Remote Access pgsql](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-remote-access-pgsql.png) - -### 5. Web Interface ### - -Finally, as we have successfully installed our latest Odoo 8 (OpenERP) on our CentOS 7 Server, we can now access our Odoo by browsing to http://ip-address:8069 http://my-site.com:8069 using our favorite web browser. Then, first thing we'll gonna do is we'll create a new database and create a new password for it. Note, the master password is admin by default. Then, we can login to our panel with that username and password. - -![Odoo Panel](http://blog.linoxide.com/wp-content/uploads/2015/03/odoo-panel.png) - -### Conclusion ### - -Odoo 8 (formerly OpenERP) is the best ERP app available in the world of Open Source. We did an excellent work on installing it because OpenERP is a set of many modules which are essential for a complete ERP app for business and company. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy OpenERP (Odoo 8) :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/setup-openerp-odoo-centos-7/ - -作者:[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/ -[1]:https://www.odoo.com/ diff --git a/translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md b/translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md new file mode 100644 index 0000000000..0cd972b425 --- /dev/null +++ b/translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md @@ -0,0 +1,112 @@ +如何在CentOS 7.x中安装OpenERP(Odoo) +================================================================================ +各位好,这篇教程关于的是如何在CentOS 7中安装Odoo(就是我们所知的OpenERP)。你是不是在考虑为你的业务安装一个不错的ERP(企业资源规划)软件?那么OpenERP就是你寻找的最好的程序,因为它是一款为你的商务提供杰出特性的自由开源软件。 + +[OpenERP][1]是一款自由开源的传统的OpenERP(企业资源规划),它包含了开源CRM、网站构建、电子商务、项目管理、计费账务、销售点、人力资源、市场、生产、采购管理以及其他模块用于提高效率及销售。Odoo可以作为独立程序,但是它可以无缝集成因此你可以在安装数个程序后得到一个全功能的开源ERP。 + +因此,下面是在你的CentOS上安装OpenERP的步骤。 + +### 1. 安装 PostgreSQL ### + +首先,首先我们需要更新CentOS 7的软件包来确保是最新的包,补丁和安全更新。要更新我们的系统,我们要在shell下运行下面的命令。 + + # yum clean all + # yum update + +现在我们要安装PostgreSQL,因为OpenERP使用PostgreSQL作为他的数据库。要安装它,我们需要运行下面的命令。 + + # yum install postgresql postgresql-server postgresql-libs + +![Installing postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-postgresql.png) + +、安装完成后,我们需要用下面的命令初始化数据库。 + + # postgresql-setup initdb + +![Intializating postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/intializating-postgresql.png) + +我们接着设置PostgreSQL来使它每次开机启动。 + + # systemctl enable postgresql + # systemctl start postgresql + +因为我们还没有为用户“postgresql”设置密码,我们现在设置。 + + # su - postgres + $ psql + postgres=# \password postgres + postgres=# \q + # exit + +![setting password postgres](http://blog.linoxide.com/wp-content/uploads/2015/03/setting-password-postgres.png) + +### 2. 设置Odoo仓库 ### + +在初始化数据库初始化完成后,我们要添加EPEL(企业版Linux的额外包)到我们的CentOS中。Odoo(或者OpenERP)依赖于Python运行时以及其他包没有包含在标准仓库中。这样我们要位企业版Linux添加额外的包仓库支持来解决Odoo所需要的依赖。要安装完成,我们需要运行下面的命令。 + + # yum install epel-release + +![Installing EPEL Release](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-epel-release.png) + +现在,安装EPEL后,我们现在使用yum-config-manager添加Odoo(OpenERp)的仓库。 + + # yum install yum-utils + + # yum-config-manager --add-repo=https://nightly.odoo.com/8.0/nightly/rpm/odoo.repo + +![Adding OpenERP (Odoo) Repo](http://blog.linoxide.com/wp-content/uploads/2015/03/added-odoo-repo.png) + +### 3. 安装Odoo 8 (OpenERP) ### + +在CentOS 7中添加Odoo 8(OpenERP)的仓库后。我们使用下面的命令来安装Odoo 8(OpenERP)。 + + # yum install -y odoo + +上面的命令会安装odoo以及必须的依赖的包。 + +![Installing odoo or OpenERP](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-odoo.png) + +现在我们使用下面的命令在每次启动后启动Odoo服务。 + + # systemctl enable odoo + # systemctl start odoo + +![Starting Odoo](http://blog.linoxide.com/wp-content/uploads/2015/03/starting-odoo.png) + +### 4. 防火墙允许 ### + +因为Odoo使用8069端口,我们需要在防火墙中允许远程访问。我们使用下面的命令来在防火墙中允许8069防火墙。 + + # firewall-cmd --zone=public --add-port=8069/tcp --permanent + # firewall-cmd --reload + +![Allowing firewall Port](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-firewall-port.png) + +**注意:默认上,只有本地的连接才允许。如果我们要允许PostgreSQL的远程访问,我们需要在pg_hba.conf添加下面图片中一行** + + # nano /var/lib/pgsql/data/pg_hba.conf + +![Allowing Remote Access pgsql](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-remote-access-pgsql.png) + +### 5. Web接口 ### + +我们已经在CentOS 7中安装了最新的Odoo 8(OpenERP),我们可以在浏览器中输入http://ip-address:8069来访问Odoo。 接着,我们要做的第一件事就是创建一个新的数据库和新的密码。注意,主密码默认是管理员密码。接着,我们可以在面板中输入用户名和密码。 + +![Odoo Panel](http://blog.linoxide.com/wp-content/uploads/2015/03/odoo-panel.png) + +### 总结 ### + +Odoo 8(OpenERP)是世界上最好的开源ERP程序。我们做了一件出色的工作来安装它因为OpenERP是由许多模块组成的针对商务和公司的完整ERP程序。因此,如果你有任何问题、建议、反馈请在下面的评论栏写下。谢谢你!享受OpenERP(Odoo 8)吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-openerp-odoo-centos-7/ + +作者:[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/ +[1]:https://www.odoo.com/ From d8c1f6f0a999ab65d2a7461f37e135be5b02bd11 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 10 May 2015 13:16:26 +0800 Subject: [PATCH 0760/2517] Revert "translated" This reverts commit 154dd4aef9ab91e5a1976bc11676e431368e8294. --- ...w to Setup OpenERP (Odoo) on CentOS 7.x.md | 114 ++++++++++++++++++ ...w to Setup OpenERP (Odoo) on CentOS 7.x.md | 112 ----------------- 2 files changed, 114 insertions(+), 112 deletions(-) create mode 100644 sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md delete mode 100644 translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md diff --git a/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md b/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md new file mode 100644 index 0000000000..f2ba21d1eb --- /dev/null +++ b/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md @@ -0,0 +1,114 @@ +translating---geekpi + +How to Setup OpenERP (Odoo) on CentOS 7.x +================================================================================ +Hi everyone, this tutorial is all about how we can setup Odoo (formerly known as OpenERP) on our CentOS 7 Server. Are you thinking to get an awesome ERP (Enterprise Resource Planning) app for your business ?. Then, OpenERP is the best app you are searching as it is a Free and Open Source Software which provides an outstanding features for your business or company. + +[OpenERP][1] is a free and open source traditional OpenERP (Enterprise Resource Planning) app which includes Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management and many more modules included for a better way to boost the productivity and sales. Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps. + +So, here are some quick and easy steps to get your copy of OpenERP installed on your CentOS machine. + +### 1. Installing PostgreSQL ### + +First of all, we'll want to update the packages installed in our CentOS 7 machine to ensure that the latest packages, patches and security are up to date. To update our sytem, we should run the following command in a shell or terminal. + + # yum clean all + # yum update + +Now, we'll want to install PostgreSQL Database System as OpenERP uses PostgreSQL for its database system. To install it, we'll need to run the following command. + + # yum install postgresql postgresql-server postgresql-libs + +![Installing postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-postgresql.png) + +After it is installed, we'll need to initialize the database with the following command + + # postgresql-setup initdb + +![Intializating postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/intializating-postgresql.png) + +We'll then set PostgreSQL to start on every boot and start the PostgreSQL Database server. + + # systemctl enable postgresql + # systemctl start postgresql + +As we haven't set a password for the user "postgresql", we'll want to set it now. + + # su - postgres + $ psql + postgres=# \password postgres + postgres=# \q + # exit + +![setting password postgres](http://blog.linoxide.com/wp-content/uploads/2015/03/setting-password-postgres.png) + +### 2. Configuring Odoo Repository ### + +After our Database Server has been installed correctly, we'll want add EPEL (Extra Packages for Enterprise Linux) to our CentOS server. Odoo (or OpenERP) depends on Python run-time and many other packages that are not included in default standard repository. As such, we'll want to add the Extra Packages for Enterprise Linux (or EPEL) repository support so that Odoo can get the required dependencies. To install, we'll need to run the following command. + + # yum install epel-release + +![Installing EPEL Release](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-epel-release.png) + +Now, after we install EPEL, we'll now add repository of Odoo (OpenERP) using yum-config-manager. + + # yum install yum-utils + + # yum-config-manager --add-repo=https://nightly.odoo.com/8.0/nightly/rpm/odoo.repo + +![Adding OpenERP (Odoo) Repo](http://blog.linoxide.com/wp-content/uploads/2015/03/added-odoo-repo.png) + +### 3. Installing Odoo 8 (OpenERP) ### + +Finally after adding repository of Odoo 8 (OpenERP) in our CentOS 7 machine. We'll can install Odoo 8 (OpenERP) using the following command. + + # yum install -y odoo + +The above command will install odoo along with the necessary dependency packages. + +![Installing odoo or OpenERP](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-odoo.png) + +Now, we'll enable automatic startup of Odoo in every boot and will start our Odoo service using the command below. + + # systemctl enable odoo + # systemctl start odoo + +![Starting Odoo](http://blog.linoxide.com/wp-content/uploads/2015/03/starting-odoo.png) + +### 4. Allowing Firewall ### + +As Odoo uses port 8069, we'll need to allow firewall for remote access. We can allow firewall to port 8069 by running the following command. + + # firewall-cmd --zone=public --add-port=8069/tcp --permanent + # firewall-cmd --reload + +![Allowing firewall Port](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-firewall-port.png) + +**Note: By default, only connections from localhost are allowed. If we want to allow remote access to PostgreSQL databases, we'll need to add the line shown in the below image to pg_hba.conf configuration file:** + + # nano /var/lib/pgsql/data/pg_hba.conf + +![Allowing Remote Access pgsql](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-remote-access-pgsql.png) + +### 5. Web Interface ### + +Finally, as we have successfully installed our latest Odoo 8 (OpenERP) on our CentOS 7 Server, we can now access our Odoo by browsing to http://ip-address:8069 http://my-site.com:8069 using our favorite web browser. Then, first thing we'll gonna do is we'll create a new database and create a new password for it. Note, the master password is admin by default. Then, we can login to our panel with that username and password. + +![Odoo Panel](http://blog.linoxide.com/wp-content/uploads/2015/03/odoo-panel.png) + +### Conclusion ### + +Odoo 8 (formerly OpenERP) is the best ERP app available in the world of Open Source. We did an excellent work on installing it because OpenERP is a set of many modules which are essential for a complete ERP app for business and company. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy OpenERP (Odoo 8) :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-openerp-odoo-centos-7/ + +作者:[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/ +[1]:https://www.odoo.com/ diff --git a/translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md b/translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md deleted file mode 100644 index 0cd972b425..0000000000 --- a/translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md +++ /dev/null @@ -1,112 +0,0 @@ -如何在CentOS 7.x中安装OpenERP(Odoo) -================================================================================ -各位好,这篇教程关于的是如何在CentOS 7中安装Odoo(就是我们所知的OpenERP)。你是不是在考虑为你的业务安装一个不错的ERP(企业资源规划)软件?那么OpenERP就是你寻找的最好的程序,因为它是一款为你的商务提供杰出特性的自由开源软件。 - -[OpenERP][1]是一款自由开源的传统的OpenERP(企业资源规划),它包含了开源CRM、网站构建、电子商务、项目管理、计费账务、销售点、人力资源、市场、生产、采购管理以及其他模块用于提高效率及销售。Odoo可以作为独立程序,但是它可以无缝集成因此你可以在安装数个程序后得到一个全功能的开源ERP。 - -因此,下面是在你的CentOS上安装OpenERP的步骤。 - -### 1. 安装 PostgreSQL ### - -首先,首先我们需要更新CentOS 7的软件包来确保是最新的包,补丁和安全更新。要更新我们的系统,我们要在shell下运行下面的命令。 - - # yum clean all - # yum update - -现在我们要安装PostgreSQL,因为OpenERP使用PostgreSQL作为他的数据库。要安装它,我们需要运行下面的命令。 - - # yum install postgresql postgresql-server postgresql-libs - -![Installing postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-postgresql.png) - -、安装完成后,我们需要用下面的命令初始化数据库。 - - # postgresql-setup initdb - -![Intializating postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/intializating-postgresql.png) - -我们接着设置PostgreSQL来使它每次开机启动。 - - # systemctl enable postgresql - # systemctl start postgresql - -因为我们还没有为用户“postgresql”设置密码,我们现在设置。 - - # su - postgres - $ psql - postgres=# \password postgres - postgres=# \q - # exit - -![setting password postgres](http://blog.linoxide.com/wp-content/uploads/2015/03/setting-password-postgres.png) - -### 2. 设置Odoo仓库 ### - -在初始化数据库初始化完成后,我们要添加EPEL(企业版Linux的额外包)到我们的CentOS中。Odoo(或者OpenERP)依赖于Python运行时以及其他包没有包含在标准仓库中。这样我们要位企业版Linux添加额外的包仓库支持来解决Odoo所需要的依赖。要安装完成,我们需要运行下面的命令。 - - # yum install epel-release - -![Installing EPEL Release](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-epel-release.png) - -现在,安装EPEL后,我们现在使用yum-config-manager添加Odoo(OpenERp)的仓库。 - - # yum install yum-utils - - # yum-config-manager --add-repo=https://nightly.odoo.com/8.0/nightly/rpm/odoo.repo - -![Adding OpenERP (Odoo) Repo](http://blog.linoxide.com/wp-content/uploads/2015/03/added-odoo-repo.png) - -### 3. 安装Odoo 8 (OpenERP) ### - -在CentOS 7中添加Odoo 8(OpenERP)的仓库后。我们使用下面的命令来安装Odoo 8(OpenERP)。 - - # yum install -y odoo - -上面的命令会安装odoo以及必须的依赖的包。 - -![Installing odoo or OpenERP](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-odoo.png) - -现在我们使用下面的命令在每次启动后启动Odoo服务。 - - # systemctl enable odoo - # systemctl start odoo - -![Starting Odoo](http://blog.linoxide.com/wp-content/uploads/2015/03/starting-odoo.png) - -### 4. 防火墙允许 ### - -因为Odoo使用8069端口,我们需要在防火墙中允许远程访问。我们使用下面的命令来在防火墙中允许8069防火墙。 - - # firewall-cmd --zone=public --add-port=8069/tcp --permanent - # firewall-cmd --reload - -![Allowing firewall Port](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-firewall-port.png) - -**注意:默认上,只有本地的连接才允许。如果我们要允许PostgreSQL的远程访问,我们需要在pg_hba.conf添加下面图片中一行** - - # nano /var/lib/pgsql/data/pg_hba.conf - -![Allowing Remote Access pgsql](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-remote-access-pgsql.png) - -### 5. Web接口 ### - -我们已经在CentOS 7中安装了最新的Odoo 8(OpenERP),我们可以在浏览器中输入http://ip-address:8069来访问Odoo。 接着,我们要做的第一件事就是创建一个新的数据库和新的密码。注意,主密码默认是管理员密码。接着,我们可以在面板中输入用户名和密码。 - -![Odoo Panel](http://blog.linoxide.com/wp-content/uploads/2015/03/odoo-panel.png) - -### 总结 ### - -Odoo 8(OpenERP)是世界上最好的开源ERP程序。我们做了一件出色的工作来安装它因为OpenERP是由许多模块组成的针对商务和公司的完整ERP程序。因此,如果你有任何问题、建议、反馈请在下面的评论栏写下。谢谢你!享受OpenERP(Odoo 8)吧 :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/setup-openerp-odoo-centos-7/ - -作者:[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/ -[1]:https://www.odoo.com/ From c25eab63b6a16a414f6926bce1d566e83f14ec28 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 10 May 2015 13:19:28 +0800 Subject: [PATCH 0761/2517] translated --- ...w to Setup OpenERP (Odoo) on CentOS 7.x.md | 114 ------------------ ...w to Setup OpenERP (Odoo) on CentOS 7.x.md | 112 +++++++++++++++++ 2 files changed, 112 insertions(+), 114 deletions(-) delete mode 100644 sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md create mode 100644 translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md diff --git a/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md b/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md deleted file mode 100644 index f2ba21d1eb..0000000000 --- a/sources/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md +++ /dev/null @@ -1,114 +0,0 @@ -translating---geekpi - -How to Setup OpenERP (Odoo) on CentOS 7.x -================================================================================ -Hi everyone, this tutorial is all about how we can setup Odoo (formerly known as OpenERP) on our CentOS 7 Server. Are you thinking to get an awesome ERP (Enterprise Resource Planning) app for your business ?. Then, OpenERP is the best app you are searching as it is a Free and Open Source Software which provides an outstanding features for your business or company. - -[OpenERP][1] is a free and open source traditional OpenERP (Enterprise Resource Planning) app which includes Open Source CRM, Website Builder, eCommerce, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management and many more modules included for a better way to boost the productivity and sales. Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps. - -So, here are some quick and easy steps to get your copy of OpenERP installed on your CentOS machine. - -### 1. Installing PostgreSQL ### - -First of all, we'll want to update the packages installed in our CentOS 7 machine to ensure that the latest packages, patches and security are up to date. To update our sytem, we should run the following command in a shell or terminal. - - # yum clean all - # yum update - -Now, we'll want to install PostgreSQL Database System as OpenERP uses PostgreSQL for its database system. To install it, we'll need to run the following command. - - # yum install postgresql postgresql-server postgresql-libs - -![Installing postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-postgresql.png) - -After it is installed, we'll need to initialize the database with the following command - - # postgresql-setup initdb - -![Intializating postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/intializating-postgresql.png) - -We'll then set PostgreSQL to start on every boot and start the PostgreSQL Database server. - - # systemctl enable postgresql - # systemctl start postgresql - -As we haven't set a password for the user "postgresql", we'll want to set it now. - - # su - postgres - $ psql - postgres=# \password postgres - postgres=# \q - # exit - -![setting password postgres](http://blog.linoxide.com/wp-content/uploads/2015/03/setting-password-postgres.png) - -### 2. Configuring Odoo Repository ### - -After our Database Server has been installed correctly, we'll want add EPEL (Extra Packages for Enterprise Linux) to our CentOS server. Odoo (or OpenERP) depends on Python run-time and many other packages that are not included in default standard repository. As such, we'll want to add the Extra Packages for Enterprise Linux (or EPEL) repository support so that Odoo can get the required dependencies. To install, we'll need to run the following command. - - # yum install epel-release - -![Installing EPEL Release](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-epel-release.png) - -Now, after we install EPEL, we'll now add repository of Odoo (OpenERP) using yum-config-manager. - - # yum install yum-utils - - # yum-config-manager --add-repo=https://nightly.odoo.com/8.0/nightly/rpm/odoo.repo - -![Adding OpenERP (Odoo) Repo](http://blog.linoxide.com/wp-content/uploads/2015/03/added-odoo-repo.png) - -### 3. Installing Odoo 8 (OpenERP) ### - -Finally after adding repository of Odoo 8 (OpenERP) in our CentOS 7 machine. We'll can install Odoo 8 (OpenERP) using the following command. - - # yum install -y odoo - -The above command will install odoo along with the necessary dependency packages. - -![Installing odoo or OpenERP](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-odoo.png) - -Now, we'll enable automatic startup of Odoo in every boot and will start our Odoo service using the command below. - - # systemctl enable odoo - # systemctl start odoo - -![Starting Odoo](http://blog.linoxide.com/wp-content/uploads/2015/03/starting-odoo.png) - -### 4. Allowing Firewall ### - -As Odoo uses port 8069, we'll need to allow firewall for remote access. We can allow firewall to port 8069 by running the following command. - - # firewall-cmd --zone=public --add-port=8069/tcp --permanent - # firewall-cmd --reload - -![Allowing firewall Port](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-firewall-port.png) - -**Note: By default, only connections from localhost are allowed. If we want to allow remote access to PostgreSQL databases, we'll need to add the line shown in the below image to pg_hba.conf configuration file:** - - # nano /var/lib/pgsql/data/pg_hba.conf - -![Allowing Remote Access pgsql](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-remote-access-pgsql.png) - -### 5. Web Interface ### - -Finally, as we have successfully installed our latest Odoo 8 (OpenERP) on our CentOS 7 Server, we can now access our Odoo by browsing to http://ip-address:8069 http://my-site.com:8069 using our favorite web browser. Then, first thing we'll gonna do is we'll create a new database and create a new password for it. Note, the master password is admin by default. Then, we can login to our panel with that username and password. - -![Odoo Panel](http://blog.linoxide.com/wp-content/uploads/2015/03/odoo-panel.png) - -### Conclusion ### - -Odoo 8 (formerly OpenERP) is the best ERP app available in the world of Open Source. We did an excellent work on installing it because OpenERP is a set of many modules which are essential for a complete ERP app for business and company. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy OpenERP (Odoo 8) :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/setup-openerp-odoo-centos-7/ - -作者:[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/ -[1]:https://www.odoo.com/ diff --git a/translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md b/translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md new file mode 100644 index 0000000000..0cd972b425 --- /dev/null +++ b/translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md @@ -0,0 +1,112 @@ +如何在CentOS 7.x中安装OpenERP(Odoo) +================================================================================ +各位好,这篇教程关于的是如何在CentOS 7中安装Odoo(就是我们所知的OpenERP)。你是不是在考虑为你的业务安装一个不错的ERP(企业资源规划)软件?那么OpenERP就是你寻找的最好的程序,因为它是一款为你的商务提供杰出特性的自由开源软件。 + +[OpenERP][1]是一款自由开源的传统的OpenERP(企业资源规划),它包含了开源CRM、网站构建、电子商务、项目管理、计费账务、销售点、人力资源、市场、生产、采购管理以及其他模块用于提高效率及销售。Odoo可以作为独立程序,但是它可以无缝集成因此你可以在安装数个程序后得到一个全功能的开源ERP。 + +因此,下面是在你的CentOS上安装OpenERP的步骤。 + +### 1. 安装 PostgreSQL ### + +首先,首先我们需要更新CentOS 7的软件包来确保是最新的包,补丁和安全更新。要更新我们的系统,我们要在shell下运行下面的命令。 + + # yum clean all + # yum update + +现在我们要安装PostgreSQL,因为OpenERP使用PostgreSQL作为他的数据库。要安装它,我们需要运行下面的命令。 + + # yum install postgresql postgresql-server postgresql-libs + +![Installing postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-postgresql.png) + +、安装完成后,我们需要用下面的命令初始化数据库。 + + # postgresql-setup initdb + +![Intializating postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/intializating-postgresql.png) + +我们接着设置PostgreSQL来使它每次开机启动。 + + # systemctl enable postgresql + # systemctl start postgresql + +因为我们还没有为用户“postgresql”设置密码,我们现在设置。 + + # su - postgres + $ psql + postgres=# \password postgres + postgres=# \q + # exit + +![setting password postgres](http://blog.linoxide.com/wp-content/uploads/2015/03/setting-password-postgres.png) + +### 2. 设置Odoo仓库 ### + +在初始化数据库初始化完成后,我们要添加EPEL(企业版Linux的额外包)到我们的CentOS中。Odoo(或者OpenERP)依赖于Python运行时以及其他包没有包含在标准仓库中。这样我们要位企业版Linux添加额外的包仓库支持来解决Odoo所需要的依赖。要安装完成,我们需要运行下面的命令。 + + # yum install epel-release + +![Installing EPEL Release](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-epel-release.png) + +现在,安装EPEL后,我们现在使用yum-config-manager添加Odoo(OpenERp)的仓库。 + + # yum install yum-utils + + # yum-config-manager --add-repo=https://nightly.odoo.com/8.0/nightly/rpm/odoo.repo + +![Adding OpenERP (Odoo) Repo](http://blog.linoxide.com/wp-content/uploads/2015/03/added-odoo-repo.png) + +### 3. 安装Odoo 8 (OpenERP) ### + +在CentOS 7中添加Odoo 8(OpenERP)的仓库后。我们使用下面的命令来安装Odoo 8(OpenERP)。 + + # yum install -y odoo + +上面的命令会安装odoo以及必须的依赖的包。 + +![Installing odoo or OpenERP](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-odoo.png) + +现在我们使用下面的命令在每次启动后启动Odoo服务。 + + # systemctl enable odoo + # systemctl start odoo + +![Starting Odoo](http://blog.linoxide.com/wp-content/uploads/2015/03/starting-odoo.png) + +### 4. 防火墙允许 ### + +因为Odoo使用8069端口,我们需要在防火墙中允许远程访问。我们使用下面的命令来在防火墙中允许8069防火墙。 + + # firewall-cmd --zone=public --add-port=8069/tcp --permanent + # firewall-cmd --reload + +![Allowing firewall Port](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-firewall-port.png) + +**注意:默认上,只有本地的连接才允许。如果我们要允许PostgreSQL的远程访问,我们需要在pg_hba.conf添加下面图片中一行** + + # nano /var/lib/pgsql/data/pg_hba.conf + +![Allowing Remote Access pgsql](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-remote-access-pgsql.png) + +### 5. Web接口 ### + +我们已经在CentOS 7中安装了最新的Odoo 8(OpenERP),我们可以在浏览器中输入http://ip-address:8069来访问Odoo。 接着,我们要做的第一件事就是创建一个新的数据库和新的密码。注意,主密码默认是管理员密码。接着,我们可以在面板中输入用户名和密码。 + +![Odoo Panel](http://blog.linoxide.com/wp-content/uploads/2015/03/odoo-panel.png) + +### 总结 ### + +Odoo 8(OpenERP)是世界上最好的开源ERP程序。我们做了一件出色的工作来安装它因为OpenERP是由许多模块组成的针对商务和公司的完整ERP程序。因此,如果你有任何问题、建议、反馈请在下面的评论栏写下。谢谢你!享受OpenERP(Odoo 8)吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-openerp-odoo-centos-7/ + +作者:[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/ +[1]:https://www.odoo.com/ From 0041c53ea229e643551fadb067dc0df6b9f8f6f3 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sun, 10 May 2015 14:47:59 +0800 Subject: [PATCH 0762/2517] translated wi-cuckoo --- ...x bridge with Network Manager on Ubuntu.md | 97 ------------------ ...x bridge with Network Manager on Ubuntu.md | 98 +++++++++++++++++++ 2 files changed, 98 insertions(+), 97 deletions(-) delete mode 100644 sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md create mode 100644 translated/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md diff --git a/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md b/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md deleted file mode 100644 index a557ee9244..0000000000 --- a/sources/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md +++ /dev/null @@ -1,97 +0,0 @@ -translating wi-cuckoo -Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu -================================================================================ -> **Question**: I need to set up a Linux bridge on my Ubuntu box to share a NIC with several other virtual machines or containers created on the box. I am currently using Network Manager on my Ubuntu, so preferrably I would like to configure a bridge using Network Manager. How can I do that? - -Network bridge is a hardware equipment used to interconnect two or more Layer-2 network segments, so that network devices on different segments can talk to each other. A similar bridging concept is needed within a Linux host, when you want to interconnect multiple VMs or Ethernet interfaces within a host. That is one use case of a software Linux bridge. - -There are several different ways to configure a Linux bridge. For example, in a headless server environment, you can use [brctl][1] to manually configure a bridge. In desktop environment, bridge support is available in Network Manager. Let's examine how to configure a bridge with Network Manager. - -### Requirement ### - -To avoid [any issue][2], it is recommended that you have Network Manager 0.9.9 and higher, which is the case for Ubuntu 15.04 and later. - - $ apt-cache show network-manager | grep Version - ----------- - - Version: 0.9.10.0-4ubuntu15.1 - Version: 0.9.10.0-4ubuntu15 - -### Create a Bridge ### - -The easiest way to create a bridge with Network Manager is via nm-connection-editor. This GUI tool allows you to configure a bridge in easy-to-follow steps. - -To start, invoke nm-connection-editor. - - $ nm-connection-editor - -The editor window will show you a list of currently configured network connections. Click on "Add" button in the top right to create a bridge. - -![](https://farm9.staticflickr.com/8781/17139502730_c3ca920f7f.jpg) - -Next, choose "Bridge" as a connection type. - -![](https://farm9.staticflickr.com/8873/17301102406_4f75133391_z.jpg) - -Now it's time to configure a bridge, including its name and bridged connection(s). With no other bridges created, the default bridge interface will be named bridge0. - -Recall that the goal of creating a bridge is to share your Ethernet interface via the bridge. So you need to add the Ethernet interface to the bridge. This is achieved by adding a new "bridged connection" in the GUI. Click on "Add" button. - -![](https://farm9.staticflickr.com/8876/17327069755_52f1d81f37_z.jpg) - -Choose "Ethernet" as a connection type. - -![](https://farm9.staticflickr.com/8832/17326664591_632a9001da_z.jpg) - -In "Device MAC address" field, choose the interface that you want to enslave into the bridge. In this example, assume that this interface is eth0. - -![](https://farm9.staticflickr.com/8842/17140820559_07a661f30c_z.jpg) - -Click on "General" tab, and enable both checkboxes that say "Automatically connect to this network when it is available" and "All users may connect to this network". - -![](https://farm8.staticflickr.com/7776/17325199982_801290e172_z.jpg) - -Save the change. - -Now you will see a new slave connection created in the bridge. - -![](https://farm8.staticflickr.com/7674/17119624667_6966b1147e_z.jpg) - -Click on "General" tab of the bridge, and make sure that top-most two checkboxes are enabled. - -![](https://farm8.staticflickr.com/7715/17301102276_4266a1e41d_z.jpg) - -Go to "IPv4 Settings" tab, and configure either DHCP or static IP address for the bridge. Note that you should use the same IPv4 settings as the enslaved Ethernet interface eth0. In this example, we assume that eth0 is configured via DHCP. Thus choose "Automatic (DHCP)" here. If eth0 is assigned a static IP address, you should assign the same IP address to the bridge. - -![](https://farm8.staticflickr.com/7737/17140820469_99955cf916_z.jpg) - -Finally, save the bridge settings. - -Now you will see an additional bridge connection created in "Network Connections" window. You no longer need a previously-configured wired connection for the enslaved interface eth0. So go ahead and delete the original wired connection. - -![](https://farm9.staticflickr.com/8700/17140820439_272a6d5c4e.jpg) - -At this point, the bridge connection will automatically be activated. You will momentarily lose a connection, since the IP address assigned to eth0 is taken over by the bridge. Once an IP address is assigned to the bridge, you will be connected back to your Ethernet interface via the bridge. You can confirm that by checking "Network" settings. - -![](https://farm8.staticflickr.com/7742/17325199902_9ceb67ddc1_c.jpg) - -Also, check the list of available interfaces. As mentioned, the bridge interface must have taken over whatever IP address was possessed by your Ethernet interface. - -![](https://farm8.staticflickr.com/7717/17327069605_6143f1bd6a_b.jpg) - -That's it, and now the bridge is ready to use! - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/configure-linux-bridge-network-manager-ubuntu.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://ask.xmodulo.com/author/nanni -[1]:http://xmodulo.com/how-to-configure-linux-bridge-interface.html -[2]:https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1273201 diff --git a/translated/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md b/translated/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md new file mode 100644 index 0000000000..ae99e20261 --- /dev/null +++ b/translated/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md @@ -0,0 +1,98 @@ +nux常见问题解答--如何在Ubuntu上使用网络管理配置一个Linux网桥 +=============================================================================== +> **Question**: 我需要在我的Ubuntu主机上建立一个Linux网桥,共享一个NIC给其他一些虚拟主机或者主机上创建的容器。我目前正在Ubunut上使用网络管理,所以最好>能使用网络管理来配置一个网桥。我该怎么做? + + +网桥是一个硬件装备,用来内部连接两个或多个数据链路层(OSI七层模型中第二层),所以使得不同段上的网络设备可以互相访问。当你想要内连多个虚拟机器或者一个>主机里的以太接口时,就需要在Linux主机里有一个类似桥接的概念。 + +有很多的方法来配置一个Linux网桥。举个例子,在一个无中心的服务器环境里,你可以使用[brct][1]手动地配置一个网桥。在桌面环境下,在网络管理里有建立网桥支持 +。那就让我们测试一下如何用网络管理配置一个网桥吧。 + +### 要求 ### + +为了避免[任何问题][2],建议你的网络管理版本为0.9.9或者更高,这主要为了配合Ubuntu15.05或者更新的版本。 + + $ apt-cache show network-manager | grep Version + +---------- + + Version: 0.9.10.0-4ubuntu15.1 + Version: 0.9.10.0-4ubuntu15 + +### 创建一个网桥 ### + +使用网络管理创建网桥最简单的方式就是通过nm-connection-editor。这款GUI(图形用户界面)的工具允许你傻瓜式地配置一个网桥。 + +首先,启动nm-connection-editor。 + + $ nm-connection-editor + +该编辑器的窗口会显示给你一个列表,关于目前配置好的网络连接。点击右上角的“Click”按钮,创建一个网桥。 + +![](https://farm9.staticflickr.com/8781/17139502730_c3ca920f7f.jpg) + +接下来,选择“Bridge”作为连接类型。 + +![](https://farm9.staticflickr.com/8873/17301102406_4f75133391_z.jpg) + +现在,开始配置网桥,包括它的名字和桥接。如果没有其他网桥被创建,那么默认的网桥接口会被命名为bridge0。 + +回顾一下,创建网桥的目的是为了通过网桥共享你的以太网卡接口。所以你需要添加以太网卡接口到网桥。在图形界面添加一个新的“bridged connection”可以实现上述目的。点击“Add”按钮。 + +![](https://farm9.staticflickr.com/8876/17327069755_52f1d81f37_z.jpg) + +选择“Ethernet”作为连接类型。 + +![](https://farm9.staticflickr.com/8832/17326664591_632a9001da_z.jpg) + +在“Device MAC address”区域,选择你想要控制的接口到bridge里。本例中,假设接口是eth0。 + +![](https://farm9.staticflickr.com/8842/17140820559_07a661f30c_z.jpg) + +点击“General”标签,并且选中两个复选框,分别是“Automatically connect to this network when it is available”和“All users may connect to this network”。 + +![](https://farm8.staticflickr.com/7776/17325199982_801290e172_z.jpg) + +保存更改。 + +现在,你会在网桥里看见一个新的从属连接被建立。 + +![](https://farm8.staticflickr.com/7674/17119624667_6966b1147e_z.jpg) + +点击网桥的“General”标签,并且确保最上面的两个复选框被选中了。 + +![](https://farm8.staticflickr.com/7715/17301102276_4266a1e41d_z.jpg) + +切换到“IPv4 Setting”标签,为网桥配置DHCP或者是静态IP地址。注意,你应该使用相同的IPv4设定作为从属的以太网卡接口eth0。本例中,我们假设eth0是用过DHCP配置的。因此,此处选择“Automatic(DHCP)”。如果eth0被指定了一个静态IP地址,那么你应该指定相同的IP地址给网桥。 + +![](https://farm8.staticflickr.com/7737/17140820469_99955cf916_z.jpg) + +最后,保存网桥的设置。 + +现在,你会看见一个额外的网桥连接被创建在“Network Connection”窗口里。你不再需要一个预先配置的有线连接,为着从属的eth0接口。所以去删除原来的有线连接吧。 + +![](https://farm9.staticflickr.com/8700/17140820439_272a6d5c4e.jpg) + +这时候,网桥连接会被自动激活。你将会暂时失去一个连接,从指定给eth0的IP地址被网桥接管。一旦IP地址指定给了网桥,你将会连接回你的以太网卡接口,通过网桥。你可以通过“Network”设置确认一下。 + +![](https://farm8.staticflickr.com/7742/17325199902_9ceb67ddc1_c.jpg) + +同时,检查可用的接口。提醒一下,网桥接口必须已经取代了任何通过你的以太网卡接口的IP地址。 + +![](https://farm8.staticflickr.com/7717/17327069605_6143f1bd6a_b.jpg) + +就这么多了,现在,网桥已经可以用了。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/configure-linux-bridge-network-manager-ubuntu.html + +作者:[Dan Nanni][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-configure-linux-bridge-interface.html +[2]:https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1273201 From db7cb7fd6a5693800e47951c8ac66679157c1595 Mon Sep 17 00:00:00 2001 From: Vic020 Date: Sun, 10 May 2015 21:05:26 +0800 Subject: [PATCH 0763/2517] Translated --- ...To Install Visual Studio Code On Ubuntu.md | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md b/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md index 8912e3c06c..afc8a267f4 100644 --- a/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md +++ b/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md @@ -1,57 +1,56 @@ - Vic020 - -How To Install Visual Studio Code On Ubuntu +在Ubuntu中安装Visual Studio Code ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Install-Visual-Studio-Code-in-Ubuntu.jpeg) -Microsoft has done the unexpected by [releasing Visual Studio Code][1] for all major desktop platforms that includes Linux as well. If you are a web developer who happens to be using Ubuntu, you can **easily install Visual Studio Code in Ubuntu**. +微软意外地[发布了Visual Studio Code][1],并支持主要的桌面平台,当然包括linux。如果你是一名需要在ubuntu工作的web开发人员,你可以**非常轻松的安装Visual Studio Code**。 -We will be using [Ubuntu Make][2] for installing Visual Studio Code in Ubuntu. Ubuntu Make, previously known as Ubuntu Developer Tools Center, is a command line utility that allows you to easily install various development tools, languages and IDEs. You can easily [install Android Studio][3] and other popular IDEs such as Eclipse with Ubuntu Make. In this tutorial we shall see **how to install Visual Studio Code in Ubuntu with Ubuntu Make**. +我将要使用[Ubuntu Make][2]来安装Visual Studio Code。Ubuntu Make,就是以前的Ubuntu开发者工具中心,是一个命令行工具,帮助用户快速安装各种开发工具、语言和IDE。也可以使用Ubuntu Make轻松[安装Android Studio][3] 和其他IDE,如Eclipse。本文将展示**如何在Ubuntu中使用Ubuntu Make安装Visual Studio Code**。(译注:也可以直接去微软官网下载安装包) -### Install Microsoft Visual Studio Code in Ubuntu ### +### 安装微软Visual Studio Code ### -Before installing Visual Studio Code, we need to install Ubuntu Make first. Though Ubuntu Make is available in Ubuntu 15.04 repository, **you’ll need Ubuntu Make 0.7 for Visual Studio**. You can get the latest Ubuntu Make by using the official PPA. The PPA is available for Ubuntu 14.04, 14.10 and 15.04. Also, it **is only available for 64 bit platform**. +开始之前,首先需要安装Ubuntu Make。虽然Ubuntu Make存在Ubuntu15.04官方库中,**但是需要Ubuntu Make 0.7以上版本才能安装Visual Studio**。所以,需要通过官方PPA更新到最新的Ubuntu Make。此PPA支持Ubuntu 14.04, 14.10 和 15.04。 +注意,**仅支持64位版本**。 -Open a terminal and use the following commands to install Ubuntu Make via official PPA: +打开终端,使用下列命令,通过官方PPA来安装Ubuntu Make: sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make sudo apt-get update sudo apt-get install ubuntu-make -Once you have installed Ubuntu Make, use the command below to install Visual Studio Code: +安装Ubuntu Make完后,接着使用下列命令安装Visual Studio Code: umake web visual-studio-code -You’ll be asked to provide a path where it will be installed: +安装过程中,将会询问安装路径,如下图: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Visual_Studio_Code_Ubuntu_1.jpeg) -After throwing a whole lot of terms and conditions, it will ask for your permission to install Visual Studio Code. Press ‘a’ at this screen: +在抛出一堆状态和条件后,它会询问你是否确认安装Visual Studio Code。输入‘a’来确定: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Visual_Studio_Code_Ubuntu_2.jpeg) -Once you do that it will start downloading and installing it. Once it is installed, you can see that Visual Studio Code icon has already been locked to the Unity Launcher. Just click on it to run it. This is how Visual Studio Code looks like in Ubuntu 15.04 Unity: +确定之后,安装程序会开始下载并安装。安装完成后,你可以发现Visual Studio Code 图标已经出现在了Unity启动器上。点击图标开始运行!下图是Ubuntu 15.04 Unity的截图: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Visual_Studio_Code_Ubuntu.jpeg) -### Uninstall Visual Studio Code from Ubuntu ### +### 卸载Visual Studio Code### -To uninstall Visual Studio Code, we’ll use the same command line tool umake. Just use the following command in terminal: +卸载Visual Studio Code,同样使用Ubuntu Make命令。如下: umake web visual-studio-code --remove -If you do not want to use Ubuntu Make, you can install Visual Studio Code by downloading the files from Microsoft: +如果你不打算使用Ubuntu Make,也可以通过微软官方下载安装文件。 -- [Download Visual Studio Code for Linux][4] +- [下载Visual Studio Code Linux版][4] -See, how easy it is to install Visual Studio Code in Ubuntu, all thanks to Ubuntu Make. I hope this tutorial helped you. Feel free to drop a comment if you have any questions or suggestions. +怎样!是不是超级简单就可以安装Visual Studio Code,这都归功于Ubuntu Make。我希望这篇文章能帮助到你。如果您有任何问题或建议,欢迎给我留言。 -------------------------------------------------------------------------------- via: http://itsfoss.com/install-visual-studio-code-ubuntu/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Vic020/VicYu](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 05faf18bdca12b05e83894584a62a77d5193cf70 Mon Sep 17 00:00:00 2001 From: Vic020 Date: Sun, 10 May 2015 21:09:11 +0800 Subject: [PATCH 0764/2517] Moved --- .../tech/20150504 How To Install Visual Studio Code On Ubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150504 How To Install Visual Studio Code On Ubuntu.md (100%) diff --git a/sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md b/translated/tech/20150504 How To Install Visual Studio Code On Ubuntu.md similarity index 100% rename from sources/tech/20150504 How To Install Visual Studio Code On Ubuntu.md rename to translated/tech/20150504 How To Install Visual Studio Code On Ubuntu.md From 47c5f5111210d0a646c2d37c97014c278c535194 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 10 May 2015 21:22:24 +0800 Subject: [PATCH 0765/2517] PUB:20150504 How To Install Visual Studio Code On Ubuntu @Vic020 --- ...150504 How To Install Visual Studio Code On Ubuntu.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150504 How To Install Visual Studio Code On Ubuntu.md (86%) diff --git a/translated/tech/20150504 How To Install Visual Studio Code On Ubuntu.md b/published/20150504 How To Install Visual Studio Code On Ubuntu.md similarity index 86% rename from translated/tech/20150504 How To Install Visual Studio Code On Ubuntu.md rename to published/20150504 How To Install Visual Studio Code On Ubuntu.md index afc8a267f4..b3bb071dc5 100644 --- a/translated/tech/20150504 How To Install Visual Studio Code On Ubuntu.md +++ b/published/20150504 How To Install Visual Studio Code On Ubuntu.md @@ -2,13 +2,14 @@ ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Install-Visual-Studio-Code-in-Ubuntu.jpeg) -微软意外地[发布了Visual Studio Code][1],并支持主要的桌面平台,当然包括linux。如果你是一名需要在ubuntu工作的web开发人员,你可以**非常轻松的安装Visual Studio Code**。 +微软令人意外地[发布了Visual Studio Code][1],并支持主要的桌面平台,当然包括linux。如果你是一名需要在ubuntu工作的web开发人员,你可以**非常轻松的安装Visual Studio Code**。 我将要使用[Ubuntu Make][2]来安装Visual Studio Code。Ubuntu Make,就是以前的Ubuntu开发者工具中心,是一个命令行工具,帮助用户快速安装各种开发工具、语言和IDE。也可以使用Ubuntu Make轻松[安装Android Studio][3] 和其他IDE,如Eclipse。本文将展示**如何在Ubuntu中使用Ubuntu Make安装Visual Studio Code**。(译注:也可以直接去微软官网下载安装包) ### 安装微软Visual Studio Code ### 开始之前,首先需要安装Ubuntu Make。虽然Ubuntu Make存在Ubuntu15.04官方库中,**但是需要Ubuntu Make 0.7以上版本才能安装Visual Studio**。所以,需要通过官方PPA更新到最新的Ubuntu Make。此PPA支持Ubuntu 14.04, 14.10 和 15.04。 + 注意,**仅支持64位版本**。 打开终端,使用下列命令,通过官方PPA来安装Ubuntu Make: @@ -25,7 +26,7 @@ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Visual_Studio_Code_Ubuntu_1.jpeg) -在抛出一堆状态和条件后,它会询问你是否确认安装Visual Studio Code。输入‘a’来确定: +在抛出一堆要求和条件后,它会询问你是否确认安装Visual Studio Code。输入‘a’来确定: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Visual_Studio_Code_Ubuntu_2.jpeg) @@ -51,12 +52,12 @@ via: http://itsfoss.com/install-visual-studio-code-ubuntu/ 作者:[Abhishek][a] 译者:[Vic020/VicYu](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/abhishek/ -[1]:http://www.geekwire.com/2015/microsofts-visual-studio-expands-to-mac-and-linux-with-new-code-development-tool/ +[1]:https://linux.cn/article-5376-1.html [2]:https://wiki.ubuntu.com/ubuntu-make [3]:http://itsfoss.com/install-android-studio-ubuntu-linux/ [4]:https://code.visualstudio.com/Download From b4d3a5f7b559401c4b69772760d1fd514f25cea3 Mon Sep 17 00:00:00 2001 From: wwy Date: Sun, 10 May 2015 22:06:24 +0800 Subject: [PATCH 0766/2517] finished translation, need review by myself --- ... command-line network monitors on Linux.md | 200 ++++++++++++------ 1 file changed, 135 insertions(+), 65 deletions(-) diff --git a/translated/tech/20150112 What are useful command-line network monitors on Linux.md b/translated/tech/20150112 What are useful command-line network monitors on Linux.md index 1019173a65..72beed7eb1 100644 --- a/translated/tech/20150112 What are useful command-line network monitors on Linux.md +++ b/translated/tech/20150112 What are useful command-line network monitors on Linux.md @@ -1,65 +1,135 @@ -ʲôLinuxʵõ -=============================================================================== -κιģҵ˵һҪĹܡĹܿǧ𡣱磬ӻdz繩Ӧһ֣ȫܻŴʹͳƵȡĿ겻ͬʹúܶ಻ͬķʽ񡣱ʹð̽⣬ռͳݣע̽־ȡ - -רõϵͳ36524СʱӣɿضʹʽijЩʽijϵͳԱӦʹһЩ֪ʽʵһ**Linuxʵõ**б - -### ̽ ### - -£·ϲ׽İǵݣչʾݻ߰ͳݡЩ͵IJмӡͬҲܽϸȵļӣDzI/OͷĹ̡ - -1. **dhcpdump**һʽDHCP̽ߣ׽DHCP/ظͨţûѺõķʽʾDHCPЭϢһŲDHCPعϵʵùߡ - -2. **[dsniff][1]**һе̽ߵļϣӵƭͽٳֹܣƺ͸ԡֲ̽ͬϢ롢NSFemailϢַȡ - -3. **[httpry][2]**һHTTP̽ڲ񡢽HTTPͻظģûѺõķʽʾЩϢ - -4. **IPTraf**еͳݲ鿴ʵʱʾ桢Ӳ桢ӿڲ桢Эı/ֽץЭƣҲȫDz˵ġ - -![](https://farm8.staticflickr.com/7519/16055246118_8ea182b413_c.jpg) - -5. **[mysql-sniffer][3]**һץȡMySQLصݰĹߡԿɶķʽʾƵȫ - -6. **[ngrep][4]**籨ִgrepʵʱץȡģʹʽʮƱʽķʽƥ䱨ġһԶ쳣м⡢洢߶ʵʱرģʽĽץȡʵùߡ - -7. **[p0f][5]**һĻڰָ̽ƲɼߣԿɿʶϵͳNATߴá·ԼTCPصԡ - -8. **pktstat**һʽĹߣͨģʾʵʱӴʹԼصЭ飨磬HTTP GET/POSTFTPX11Ϣ - -![](https://farm8.staticflickr.com/7477/16048970999_be60f74952_b.jpg - -9. **Snort**һּԤߣͨЭƥ䣬/ԤԾиָĺšʬ硢㡢 - -10. **tcpdump**һе̽ߣԻڹ˱ʽץȡеıģģڰݡصĴŲ顢debug[ȫ][6]ⷽӦù㷺 - -11. **tshark**һWiresharkڳһʹõʽ̽ߡܲ׽ϵʵʱģûѺõķʽʾݡ - -### //ӿڲļ ### - -УͨΪӦĽ̻ӿռÿÿ̡ÿӿڵͳݡϢԴlibpcapץsysfsںļϵͳЩߵļӳɱܵͣȱļ - -12. **bmon**һеĴ⹤ߣʾֽӿصϢ/͵ֵ/ƽֵͳݣӵʷʹͼ - -![](https://farm9.staticflickr.com/8580/16234265932_87f20c5d17_b.jpg) - -13. **[iftop][7]**һʹü⹤ߣʵʱʾijӵĴʹдʹ򲢻ncursesĽӿпӻԷļǸʹĴ - -14. **nethogs**һ̼ӹߣṩصʵʱ/дʹϢncursesʾԼռôĽ̺á - -15. **netstat**һʾTCP/UDPջӿڷ/ա·ɱЭ/׽ֵͳϢԵйߡջصܡԴʹʱá - -16. **[speedometer][8]**һӻijӿʷ/մʹƣһncurses״ͼʾĹߡ - -![](https://farm8.staticflickr.com/7485/16048971069_31dd573a4f_c.jpg) - -17. **[sysdig][9]**һLinuxϵͳӵͳһԽӿڵϵͳۺdebugߡģԼ/ߡ/صͳݣ/ȡ - -18. **tcptrack**һTCPӼӹߣʾTCPӣԴ/ĿĵIPַ/˿ڡTCP״̬ʹõȡ - -![](https://farm8.staticflickr.com/7507/16047703080_5fdda2e811_b.jpg) - -19. **vnStat**һά˻ڽӿڵʷ/ʹʹͼ磬ǰÿաÿ£Ϊһ̨ػ̣ռ洢ͳݣӿڴʹʺʹֽ - -###  ### - - +ʲôLinuxʵõ +=============================================================================== +κιģҵ˵һҪĹܡĹܿǧ𡣱磬ӻdz繩Ӧһ֣ȫܻŴʹͳƵȡĿ겻ͬʹúܶ಻ͬķʽ񡣱ʹð̽⣬ռͳݣע̽־ȡ + +רõϵͳ36524СʱӣɿضʹʽijЩʽijϵͳԱӦʹһЩ֪ʽʵһ**Linuxʵõ**б + +### ̽ ### + +£·ϲ׽İǵݣչʾݻ߰ͳݡЩ͵IJмӡͬҲܽϸȵļӣDzI/OͷĹ̡ + +1. **dhcpdump**һʽDHCP̽ߣ׽DHCP/ظͨţûѺõķʽʾDHCPЭϢһŲDHCPعϵʵùߡ + +2. **[dsniff][1]**һе̽ߵļϣӵƭͽٳֹܣƺ͸ԡֲ̽ͬϢ롢NSFemailϢַȡ + +3. **[httpry][2]**һHTTP̽ڲ񡢽HTTPͻظģûѺõķʽʾЩϢ + +4. **IPTraf**еͳݲ鿴ʵʱʾ桢Ӳ桢ӿڲ桢Эı/ֽץЭƣҲȫDz˵ġ + +![](https://farm8.staticflickr.com/7519/16055246118_8ea182b413_c.jpg) + +5. **[mysql-sniffer][3]**һץȡMySQLصݰĹߡԿɶķʽʾƵȫ + +6. **[ngrep][4]**籨ִgrepʵʱץȡģʹʽʮƱʽķʽƥ䱨ġһԶ쳣м⡢洢߶ʵʱرģʽĽץȡʵùߡ + +7. **[p0f][5]**һĻڰָ̽ƲɼߣԿɿʶϵͳNATߴá·ԼTCPصԡ + +8. **pktstat**һʽĹߣͨģʾʵʱӴʹԼصЭ飨磬HTTP GET/POSTFTPX11Ϣ + +![](https://farm8.staticflickr.com/7477/16048970999_be60f74952_b.jpg + +9. **Snort**һּԤߣͨЭƥ䣬/ԤԾиָĺšʬ硢㡢 + +10. **tcpdump**һе̽ߣԻڹ˱ʽץȡеıģģڰݡصĴŲ顢debug[ȫ][6]ⷽӦù㷺 + +11. **tshark**һWiresharkڳһʹõʽ̽ߡܲ׽ϵʵʱģûѺõķʽʾݡ + +### //ӿڲļ ### + +УͨΪӦĽ̻ӿռÿÿ̡ÿӿڵͳݡϢԴlibpcapץsysfsںļϵͳЩߵļӳɱܵͣȱļ + +12. **bmon**һеĴ⹤ߣʾֽӿصϢ/͵ֵ/ƽֵͳݣӵʷʹͼ + +![](https://farm9.staticflickr.com/8580/16234265932_87f20c5d17_b.jpg) + +13. **[iftop][7]**һʹü⹤ߣʵʱʾijӵĴʹдʹ򲢻ncursesĽӿпӻԷļǸʹĴ + +14. **nethogs**һ̼ӹߣṩصʵʱ/дʹϢncursesʾԼռôĽ̺á + +15. **netstat**һʾTCP/UDPջӿڷ/ա·ɱЭ/׽ֵͳϢԵйߡջصܡԴʹʱá + +16. **[speedometer][8]**һӻijӿʷ/մʹƣһncurses״ͼʾĹߡ + +![](https://farm8.staticflickr.com/7485/16048971069_31dd573a4f_c.jpg) + +17. **[sysdig][9]**һLinuxϵͳӵͳһԽӿڵϵͳۺdebugߡģԼ/ߡ/صͳݣ/ȡ + +18. **tcptrack**һTCPӼӹߣʾTCPӣԴ/ĿĵIPַ/˿ڡTCP״̬ʹõȡ + +![](https://farm8.staticflickr.com/7507/16047703080_5fdda2e811_b.jpg) + +19. **vnStat**һά˻ڽӿڵʷ/ʹʹͼ磬ǰÿաÿ£Ϊһ̨ػ̣ռ洢ͳݣӿڴʹʺʹֽ + +###  ### + +ͬǰᵽıļߣĹڼʱġע롱̽ݵУһռӦķӦĿ··ɹʹõĴʡʱϵͳûȱݵȡ + +20. **[dnsyo][10]**һDNS⹤ߣܹ1500ͬĿŽȺDNSѯDNSֳ߼DNSõʱá + +21. **[iperf][11]**һTCP/UDPߣܹôͨ䵥˫TCP/UDP̽õĴڼгЭջʱáһֽ[netperf][12]ӵиĹܼõͳݡ + +22. **[netcat][13]/socat**ͨõdebugߣԶTCP/UDP׽ֽждͨijűں˶紫˿ڽм + +23. **nmap**һж˿ɨ緢ֹߡһTCP/UDPɨ輼ҿŵĶ˿ڡڱڵIJϵͳ鱾©Ϊάӳʱá[zmap][14]һƵƷһڻΧɨ蹤ߡ + +24. pingһõԹߡͨICMPechoreplyĽǿʵ书ܡڲ·ɵRTTԼԶϵͳǽʱápingıиƯĽ棨磬[noping][15]Э֧֣磬[hping][16]߲̽磬[fping][17] + +![](https://farm8.staticflickr.com/7466/15612665344_a4bb665a5b_c.jpg) + +25. **[sprobe][18]**һʽƶϱԶIPַƿйߡʹTCPֻƿڼΧܺ·صʱá + +26. **traceroute**һִܷӱصԶĵ·/ת·緢ֹߡͨTTL̽ⱨģռм·ɵICMPϢŲӻ·صʱátracerouteıиõRTTͳƹܣ磬[mtr][19] + +### Ӧ־ ### + +£ضķӦΪĿ꣨磬webݿɷĵͨ־ͼ⡣ǰᵽļĹܹòͼ + +27. **[GoAccess][20]**һApacheNginxĽʽ鿴ڻȡ־չʾշ󡢿ͻ˲ϵͳͻλáͻڵĶʵʱͳϢԹʽʾ + +![](https://farm8.staticflickr.com/7518/16209185266_da6c5c56eb_c.jpg) + +28. **[mtop][21]**һMySQL/MariaDBмԽǰݿдIJѯпӻŻMySQLܡгʱá + +![](https://farm8.staticflickr.com/7472/16047570248_bc996795f2_c.jpg) + +29. **[ngxtop][22]**һNginxApache⹤ߣܹtopָĽӻWebͨwebIJѯ־ļռijĿĵػͳϢ + +### Conclusion ### + +ƪУչʾʽ⹤ߣײİļ߲Ӧó֪Ǹʲôһ£ѡĸʹһ¡һһ߲ΪÿʹõͨõĽһõϵͳԱӦܹǸ߸ʺϵǰĻϣбԴ + +ӭͨظĽбݣ + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/useful-command-line-network-monitors-linux.html + +ߣ[Dan Nanni][a] +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ + +[a]:http://xmodulo.com/author/nanni +[1]:http://www.monkey.org/~dugsong/dsniff/ +[2]:http://xmodulo.com/monitor-http-traffic-command-line-linux.html +[3]:https://github.com/zorkian/mysql-sniffer +[4]:http://ngrep.sourceforge.net/ +[5]:http://lcamtuf.coredump.cx/p0f3/ +[6]:http://xmodulo.com/recommend/firewallbook +[7]:http://xmodulo.com/how-to-install-iftop-on-linux.html +[8]:https://excess.org/speedometer/ +[9]:http://xmodulo.com/monitor-troubleshoot-linux-server-sysdig.html +[10]:http://xmodulo.com/check-dns-propagation-linux.html +[11]:https://iperf.fr/ +[12]:http://www.netperf.org/netperf/ +[13]:http://xmodulo.com/useful-netcat-examples-linux.html +[14]:https://zmap.io/ +[15]:http://noping.cc/ +[16]:http://www.hping.org/ +[17]:http://fping.org/ +[18]:http://sprobe.cs.washington.edu/ +[19]:http://xmodulo.com/better-alternatives-basic-command-line-utilities.html#mtr_link +[20]:http://goaccess.io/ +[21]:http://mtop.sourceforge.net/ +[22]:http://xmodulo.com/monitor-nginx-web-server-command-line-real-time.html From d8fc58edf937ce84afa7e284a11bed16e9a9ead5 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sun, 10 May 2015 22:13:08 +0800 Subject: [PATCH 0767/2517] Update 20150126 iptraf--A TCP or UDP Network Monitoring Utility.md --- .../20150126 iptraf--A TCP or UDP Network Monitoring Utility.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md index 1d5d3cd0d9..01a9dc18f9 100644 --- a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md +++ b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md @@ -1,3 +1,5 @@ +[Trnslating by DongShuaike] + iptraf: A TCP/UDP Network Monitoring Utility ================================================================================ [iptraf][1] is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. From f464725c8776afef3f85bf774fab5a7ffde1ff7c Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 10 May 2015 22:55:09 +0800 Subject: [PATCH 0768/2517] PUB:20150506 How to Securely Store Passwords and Api Keys Using Vault MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wwy-hust 翻译的基本不错,不过有些英语习惯的倒装语句,应该根据中文习惯和理解修改过来。:>加油~ --- ...tore Passwords and Api Keys Using Vault.md | 164 ++++++++++++++++++ ...tore Passwords and Api Keys Using Vault.md | 161 ----------------- 2 files changed, 164 insertions(+), 161 deletions(-) create mode 100644 published/20150506 How to Securely Store Passwords and Api Keys Using Vault.md delete mode 100644 translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md diff --git a/published/20150506 How to Securely Store Passwords and Api Keys Using Vault.md b/published/20150506 How to Securely Store Passwords and Api Keys Using Vault.md new file mode 100644 index 0000000000..e2073d0b18 --- /dev/null +++ b/published/20150506 How to Securely Store Passwords and Api Keys Using Vault.md @@ -0,0 +1,164 @@ +如何使用Vault安全的存储密码和API密钥 +======================================================================= +Vault是用来安全的获取秘密信息的工具,它可以保存密码、API密钥、证书等信息。Vault提供了一个统一的接口来访问秘密信息,其具有健壮的访问控制机制和丰富的事件日志。 + +对关键信息的授权访问是一个困难的问题,尤其是当有许多用户角色,并且用户请求不同的关键信息时,例如用不同权限登录数据库的登录配置,用于外部服务的API密钥,SOA通信的证书等。当保密信息由不同的平台进行管理,并使用一些自定义的配置时,情况变得更糟,因此,安全的存储、管理审计日志几乎是不可能的。但Vault为这种复杂情况提供了一个解决方案。 + +### 突出特点 ### + +**数据加密**:Vault能够在不存储数据的情况下对数据进行加密、解密。开发者们便可以存储加密后的数据而无需开发自己的加密技术,Vault还允许安全团队自定义安全参数。 + +**安全密码存储**:Vault在将秘密信息(API密钥、密码、证书)存储到持久化存储之前对数据进行加密。因此,如果有人偶尔拿到了存储的数据,这也没有任何意义,除非加密后的信息能被解密。 + +**动态密码**:Vault可以随时为AWS、SQL数据库等类似的系统产生密码。比如,如果应用需要访问AWS S3 桶,它向Vault请求AWS密钥对,Vault将给出带有租期的所需秘密信息。一旦租用期过期,这个秘密信息就不再存储。 + +**租赁和更新**:Vault给出的秘密信息带有租期,一旦租用期过期,它便立刻收回秘密信息,如果应用仍需要该秘密信息,则可以通过API更新租用期。 + +**撤销**:在租用期到期之前,Vault可以撤销一个秘密信息或者一个秘密信息树。 + +### 安装Vault ### + +有两种方式来安装使用Vault。 + +**1. 预编译的Vault二进制** 能用于所有的Linux发行版,下载地址如下,下载之后,解压并将它放在系统PATH路径下,以方便调用。 + +- [下载预编译的二进制 Vault (32-bit)][1] +- [下载预编译的二进制 Vault (64-bit)][2] +- [下载预编译的二进制 Vault (ARM)][3] + +![wget binary](http://blog.linoxide.com/wp-content/uploads/2015/04/wget-binary.png) + +*下载相应的预编译的Vault二进制版本。* + +![vault](http://blog.linoxide.com/wp-content/uploads/2015/04/unzip.png) + +*解压下载到本地的二进制版本。* + +祝贺你!您现在可以使用Vault了。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/04/vault.png) + +**2. 从源代码编译**是另一种在系统中安装Vault的方式。在安装Vault之前需要安装GO和GIT。 + +在 **Redhat系统中安装GO** 使用下面的指令: + + sudo yum install go + +在 **Debin系统中安装GO** 使用下面的指令: + + sudo apt-get install golang + +或者 + + sudo add-apt-repository ppa:gophers/go + + sudo apt-get update + + sudo apt-get install golang-stable + +在 **Redhat系统中安装GIT** 使用下面的命令: + + sudo yum install git + +在 **Debian系统中安装GIT** 使用下面的命令: + + sudo apt-get install git + +一旦GO和GIT都已被安装好,我们便可以开始从源码编译安装Vault。 + +> 将下列的Vault仓库拷贝至GOPATH + + https://github.com/hashicorp/vault + +> 测试下面的文件是否存在,如果它不存在,那么Vault没有被克隆到合适的路径。 + + $GOPATH/src/github.com/hashicorp/vault/main.go + +> 执行下面的指令来编译Vault,并将二进制文件放到系统bin目录下。 + + make dev + +![path](http://blog.linoxide.com/wp-content/uploads/2015/04/installation4.png) + +### 一份Vault入门教程 ### + +我们已经编制了一份Vault的官方交互式教程,并带有它在SSH上的输出信息。 + +**概述** + +这份教程包括下列步骤: + +- 初始化并启封您的Vault +- 在Vault中对您的请求授权 +- 读写秘密信息 +- 密封您的Vault + +#### **初始化您的Vault** + +首先,我们需要为您初始化一个Vault的工作实例。在初始化过程中,您可以配置Vault的密封行为。简单起见,现在使用一个启封密钥来初始化Vault,命令如下: + + vault init -key-shares=1 -key-threshold=1 + +您会注意到Vault在这里输出了几个密钥。不要清除您的终端,这些密钥在后面的步骤中会使用到。 + +![Initializing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Initializing-SSH.png) + +#### **启封您的Vault** + +当一个Vault服务器启动时,它是密封的状态。在这种状态下,Vault被配置为知道物理存储在哪里及如何存取它,但不知道如何对其进行解密。Vault使用加密密钥来加密数据。这个密钥由"主密钥"加密,主密钥不保存。解密主密钥需要入口密钥。在这个例子中,我们使用了一个入口密钥来解密这个主密钥。 + + vault unseal + +![Unsealing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Unsealing-SSH.png) + +####**为您的请求授权** + +在执行任何操作之前,连接的客户端必须是被授权的。授权的过程是检验一个人或者机器是否如其所申明的那样具有正确的身份。这个身份用在向Vault发送请求时。为简单起见,我们将使用在步骤2中生成的root令牌,这个信息可以回滚终端屏幕看到。使用一个客户端令牌进行授权: + + vault auth + +![Authorize SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Authorize-SSH.png) + +####**读写保密信息** + +现在Vault已经被设置妥当,我们可以开始读写默认挂载的秘密后端里面的秘密信息了。写在Vault中的秘密信息首先被加密,然后被写入后端存储中。后端存储机制绝不会看到未加密的信息,并且也没有在Vault之外解密的需要。 + + vault write secret/hello value=world + +当然,您接下来便可以读这个保密信息了: + + vault read secret/hello + +![RW_SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/RW_SSH.png) + +####**密封您的Vault** + +还有一个用I来密封Vault的API。它将丢掉现在的加密密钥并需要另一个启封过程来恢复它。密封仅需要一个拥有root权限的操作者。这是一种罕见的"打破玻璃过程"的典型部分。 + +这种方式中,如果检测到一个入侵,Vault数据将会立刻被锁住,以便最小化损失。如果不能访问到主密钥碎片的话,就不能再次获取数据。 + + vault seal + +![Seal Vault SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Seal-Vault-SSH.png) + +这便是入门教程的结尾。 + +### 总结 ### + +Vault是一个非常有用的应用,它提供了一个可靠且安全的存储关键信息的方式。另外,它在存储前加密关键信息、审计日志维护、以租期的方式获取秘密信息,且一旦租用期过期它将立刻收回秘密信息。Vault是平台无关的,并且可以免费下载和安装。要发掘Vault的更多信息,请访问其[官方网站][4]。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/secure-secret-store-vault/ + +作者:[Aun Raza][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_386.zip +[2]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_amd64.zip +[3]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_arm.zip +[4]:https://vaultproject.io/ diff --git a/translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md b/translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md deleted file mode 100644 index e9e54ac43d..0000000000 --- a/translated/tech/20150506 How to Securely Store Passwords and Api Keys Using Vault.md +++ /dev/null @@ -1,161 +0,0 @@ -如何使用Vault安全的存储密码和API密钥 -======================================================================= -Vault是用来安全的获取秘密信息的工具。他可以保存密码、API密钥、证书等信息。Vault通过强访问控制机制和高扩展性的事件日志提供了一个统一的接口来访问秘密信息。 - -对关键信息的授权访问是一个困难的问题,尤其是当有许多用户角色和用户请求不同的关键信息,例如用不同权限登录数据库的细节,对外服务的API密钥,面向服务架构通信的证书等。当保密信息由不同的平台进行管理,并使用一些自定义的配置时,情况变得更糟,因此,安全的存储、管理审计日志几乎是不可能的。但Vault为这种复杂情况提供了一个解决方案。 - -### 突出特点 ### - -数据加密:Vault能够在不存储数据的情况下对数据进行加密、解密。开发者们便可以存储加密后的数据而无需开发自己的加密技术,Vault还允许安全团队自定义安全参数。 - -**安全密码存储**:Vault在将秘密信息(API密钥、密码、证书)存储到持久化存储之前对数据进行加密。因此,如果有人偶尔拿到了获取存储的数据的权限,这也没有任何意义,除非加密后的信息被解密。 - -**动态密码**:Vault为AWS、SQL数据库类似的系统按需产生密码。如果应用需要获得AWS S3的桶,比如,它向Vault请求AWS密钥对,Vault将授予需要的秘密信息一段租用期时间。一旦租用期过期,这个秘密信息将变得不可用。 - -**租赁和更新**:Vault以租用期为限制授予秘密信息,一旦租用期过期,它便立刻收回保密信息,如果应用仍需要保密信息,则可以通过API更新租用期。 - -**撤销**:在租用期到期之前,Vault可以撤销一个秘密信息或者一个秘密信息树。 - -### 安装Vault ### - -有两种方式来安装使用Vault。 - -**1. 预编译的Vault二进制** 能用于所有的Linux发行版,下载地址如下,一旦下载完成,解压并将它放在系统PATH路径下,以方便调用。 - -- [Download Precompiled Vault Binary (32-bit)][1] -- [Download Precompiled Vault Binary (64-bit)][2] -- [Download Precompiled Vault Binary (ARM)][3] - -下载相应的预编译的Vault二进制版本。 - -![wget binary](http://blog.linoxide.com/wp-content/uploads/2015/04/wget-binary.png) - -解压下载到本地的二进制版本。 - -![vault](http://blog.linoxide.com/wp-content/uploads/2015/04/unzip.png) - -祝贺!您现在可以使用Vault了。 - -![](http://blog.linoxide.com/wp-content/uploads/2015/04/vault.png) - -**2. 从源代码编译** 是另一种在系统中安装Vault的方式。在安装Vault之前需要安装GO和GIT。 - -在 **Redhat系统中安装GO** 使用下面的指令。 - - sudo yum install go - -在 **Debin系统中安装GO** 使用下面的指令。 - - sudo apt-get install golang - -或者 - - sudo add-apt-repository ppa:gophers/go - - sudo apt-get update - - sudo apt-get install golang-stable - -在 **Redhat系统中安装GIT** 使用下面的命令。 - - sudo yum install git - -在 **Debian系统中安装GIT** 使用下面的命令。 - - sudo apt-get install git - -一旦GO和GIT都已被安装好,我们便可以开始从源码编译安装Vault。 - -> 将下列的Vault仓库拷贝至GOPATH - - https://github.com/hashicorp/vault - -> 测试下面的文件是否存在,如果它不存在,那么Vault没有被克隆到合适的路径。 - - $GOPATH/src/github.com/hashicorp/vault/main.go - -> 执行下面的指令来编译Vault,并将二进制文件放到系统bin目录下。 - - make dev - -![path](http://blog.linoxide.com/wp-content/uploads/2015/04/installation4.png) - -### 一份Vault入门教程 ### - -我们已经编译了Vault的官方交互式教程,并将它输出到SSH。 - -**概述** - -这份教程包括下列步骤: - -- 初始化,开启您的Vault -- 在Vault中对您的请求授权 -- 读写秘密信息 -- 密封您的Vault - -**初始化您的Vault** - -首先,我们需要为您初始化一个Vault的工作实例。在初始化过程中,您可以配置Vault的密封行为。简单起见,现在使用一个非密封密钥来初始化Vault。 - - vault init -key-shares=1 -key-threshold=1 - -您会注意到Vault在这里打印出了许多的密钥。不要清除您的终端,这些密钥在后面的步骤中会使用到。 - -![Initializing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Initializing-SSH.png) - -**开启您的Vault** - -当一个Vault服务器启动时,它是密封的状态。在这种状态下,Vault被配置为知道在哪里和如何存取物理存储,但不知道如何对其进行解密。Vault使用加密密钥来加密数据。这个密钥由"主密钥"加密,主密钥不保存。解密主密钥需要一个碎片的阈值。在这个例子中,我们使用一个碎片来解密这个主密钥。 - - vault unseal - -![Unsealing SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Unsealing-SSH.png) - -**为您的请求授权** - -在执行任何操作之前,连接的客户端应该被授权。授权的过程是检验一个人或者机器是不是像他们描述的那样,被赋予了身份。这个身份在向Vault发送请求时被使用。为简单起见,我们将使用在步骤2中生成的root令牌。这个输出会以滚动模式出现。使用一个客户端令牌进行授权: - - vault auth - -![Authorize SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Authorize-SSH.png) - -**读写保密信息** - -现在Vault已经被设置妥当,我们可以开始使用默认的密码后端读写秘密信息了。写在Vault中的秘密信息首先被加密,然后被写入后端的存储。后端存储机制不会查看未加密的值,并且没有无需Vault即可解密的方法。 - - vault write secret/hello value=world - -当然,您接下来便可以读这个保密信息了: - - vault read secret/hello - -![RW_SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/RW_SSH.png) - -**密封您的Vault** - -有一个API来密封Vault。它将丢掉加密密钥并需要其他未密封的过程来恢复它。密封仅需要一个拥有root权限的操作者。这通常是一种罕见的"打破玻璃过程"的一部分。这种方式中,如果有一个检测到的入侵,Vault数据将会立刻被锁住,以便最小化损失。如果没有获取到主密钥碎片,数据不会被再次获取。 - - vault seal - -![Seal Vault SSH](http://blog.linoxide.com/wp-content/uploads/2015/04/Seal-Vault-SSH.png) - -这便是入门教程的结尾。 - -### 总结 ### - -Vault是一个非常有用的应用,它提供了一个可靠且安全的存储关键信息的方式。另外,它在存储前加密关键信息,维护他的审计日志,并以租用期的方式获取秘密信息,且一旦租用期过期,它将立刻收回秘密信息。Vault是平台独立的,并且可以免费下载和安装。要发掘Vault的更多信息,请访问官方网站。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/how-tos/secure-secret-store-vault/ - -作者:[Aun Raza][a] -译者:[wwy-hust](https://github.com/wwy-hust) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunrz/ -[1]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_386.zip -[2]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_amd64.zip -[3]:https://dl.bintray.com/mitchellh/vault/vault_0.1.0_linux_arm.zip From 0528ca534d5df96518e18fce7899e464f96649f8 Mon Sep 17 00:00:00 2001 From: wwy Date: Sun, 10 May 2015 23:03:45 +0800 Subject: [PATCH 0769/2517] finish review, need merge into LCTT master --- ... command-line network monitors on Linux.md | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/translated/tech/20150112 What are useful command-line network monitors on Linux.md b/translated/tech/20150112 What are useful command-line network monitors on Linux.md index 72beed7eb1..37eea5a91b 100644 --- a/translated/tech/20150112 What are useful command-line network monitors on Linux.md +++ b/translated/tech/20150112 What are useful command-line network monitors on Linux.md @@ -1,16 +1,16 @@ -ʲôLinuxʵõ +ʲôLinuxʵõʽӹ =============================================================================== -κιģҵ˵һҪĹܡĹܿǧ𡣱磬ӻdz繩Ӧһ֣ȫܻŴʹͳƵȡĿ겻ͬʹúܶ಻ͬķʽ񡣱ʹð̽⣬ռͳݣע̽־ȡ +κιģҵ˵һҪĹܡӵĿǧ𡣱磬ӻĿDZ֤ڵ繩ӦȫܽŲ顢ʹͳƵȡĿ겻ͬʹúܶ಻ͬķʽ񡣱ʹð̽ʹͳݣע̽־ȡ -רõϵͳ36524СʱӣɿضʹʽijЩʽijϵͳԱӦʹһЩ֪ʽʵһ**Linuxʵõ**б +רõϵͳ36524СʱӣɿضʹʽijЩʽijáϵͳԱӦʹһЩ֪ʽľһ**Linuxʵõ**б ### ̽ ### -£·ϲ׽İǵݣչʾݻ߰ͳݡЩ͵IJмӡͬҲܽϸȵļӣDzI/OͷĹ̡ +£ӹ·ϲ׽İǵݣչʾݻ߰ͳݡЩײмӡͬҲܽϸȵļӣDzI/OͷĹ̡ -1. **dhcpdump**һʽDHCP̽ߣ׽DHCP/ظͨţûѺõķʽʾDHCPЭϢһŲDHCPعϵʵùߡ +1. **dhcpdump**һʽDHCP̽ߣ׽DHCP/ظûѺõķʽʾDHCPЭϢһŲDHCPعϵʵùߡ -2. **[dsniff][1]**һе̽ߵļϣӵƭͽٳֹܣƺ͸ԡֲ̽ͬϢ롢NSFemailϢַȡ +2. **[dsniff][1]**һе̽߼ϣӵƭͽٳֹܣ͸ԡ̽Ϣ롢NSFemailϢַȡ 3. **[httpry][2]**һHTTP̽ڲ񡢽HTTPͻظģûѺõķʽʾЩϢ @@ -20,57 +20,57 @@ 5. **[mysql-sniffer][3]**һץȡMySQLصݰĹߡԿɶķʽʾƵȫ -6. **[ngrep][4]**籨ִgrepʵʱץȡģʹʽʮƱʽķʽƥ䱨ġһԶ쳣м⡢洢߶ʵʱرģʽĽץȡʵùߡ +6. **[ngrep][4]**籨ִgrepʵʱץȡģʽʮƱʽķʽƥ䱨ġһԶ쳣м⡢洢߶ʵʱضģʽĽץȡʵùߡ -7. **[p0f][5]**һĻڰָ̽ƲɼߣԿɿʶϵͳNATߴá·ԼTCPصԡ +7. **[p0f][5]**һĻڰָ̽ƲɼߣԿɿʶϵͳNATߴá·ԼTCPصԡ -8. **pktstat**һʽĹߣͨģʾʵʱӴʹԼصЭ飨磬HTTP GET/POSTFTPX11Ϣ +8. **pktstat**һʽĹߣͨʵʱģʾӴʹԼصЭ飨磬HTTP GET/POSTFTPX11Ϣ ![](https://farm8.staticflickr.com/7477/16048970999_be60f74952_b.jpg 9. **Snort**һּԤߣͨЭƥ䣬/ԤԾиָĺšʬ硢㡢 -10. **tcpdump**һе̽ߣԻڹ˱ʽץȡеıģģڰݡصĴŲ顢debug[ȫ][6]ⷽӦù㷺 +10. **tcpdump**һе̽ߣԻڹ˱ʽץȡеıģģڰԱڰķصĴŲ顢debug[ȫ][6]ⷽӦù㷺 11. **tshark**һWiresharkڳһʹõʽ̽ߡܲ׽ϵʵʱģûѺõķʽʾݡ ### //ӿڲļ ### -УͨΪӦĽ̻ӿռÿÿ̡ÿӿڵͳݡϢԴlibpcapץsysfsںļϵͳЩߵļӳɱܵͣȱļ +УͨΪ̻ӿռÿÿ̡ÿӿڵͳݡϢԴlibpcapץsysfsںļϵͳЩߵļӳɱܵͣȱļ 12. **bmon**һеĴ⹤ߣʾֽӿصϢ/͵ֵ/ƽֵͳݣӵʷʹͼ ![](https://farm9.staticflickr.com/8580/16234265932_87f20c5d17_b.jpg) -13. **[iftop][7]**һʹü⹤ߣʵʱʾijӵĴʹдʹ򲢻ncursesĽӿпӻԷļǸʹĴ +13. **[iftop][7]**һʹü⹤ߣʵʱʾijӵĴʹдʹͨncursesĽӿпӻԷļĸĴ 14. **nethogs**һ̼ӹߣṩصʵʱ/дʹϢncursesʾԼռôĽ̺á -15. **netstat**һʾTCP/UDPջӿڷ/ա·ɱЭ/׽ֵͳϢԵйߡջصܡԴʹʱá +15. **netstat**һʾTCP/UDPջͳϢĹߡӿڷ/ա·ɱЭ/׽ֵͳϢԡջصܡԴʹʱá -16. **[speedometer][8]**һӻijӿʷ/մʹƣһncurses״ͼʾĹߡ +16. **[speedometer][8]**һӻijӿڷ/յĴʹõʷƣһncurses״ͼʾĹߡ ![](https://farm8.staticflickr.com/7485/16048971069_31dd573a4f_c.jpg) -17. **[sysdig][9]**һLinuxϵͳӵͳһԽӿڵϵͳۺdebugߡģԼ/ߡ/صͳݣ/ȡ +17. **[sysdig][9]**һLinuxϵͳӵͳһԽӿڵϵͳۺdebugߡģԼ߻ߡ/صͳݣ/ȡ -18. **tcptrack**һTCPӼӹߣʾTCPӣԴ/ĿĵIPַ/˿ڡTCP״̬ʹõȡ +18. **tcptrack**һTCPӼӹߣʾTCPӣԴ/ĿIPַ/˿ڡTCP״̬ʹõȡ ![](https://farm8.staticflickr.com/7507/16047703080_5fdda2e811_b.jpg) -19. **vnStat**һά˻ڽӿڵʷ/ʹʹͼ磬ǰÿաÿ£Ϊһ̨ػ̣ռ洢ͳݣӿڴʹʺʹֽ +19. **vnStat**һά˻ڽӿڵʷ/ʹͼ磬ǰÿաÿ£Ϊһ̨ػ̣ռ洢ͳݣӿڴʹʺʹֽ -###  ### +### ### ͬǰᵽıļߣĹڼʱġע롱̽ݵУһռӦķӦĿ··ɹʹõĴʡʱϵͳûȱݵȡ -20. **[dnsyo][10]**һDNS⹤ߣܹ1500ͬĿŽȺDNSѯDNSֳ߼DNSõʱá +20. **[dnsyo][10]**һDNS⹤ߣܹ1500ͬĿŽȺDNSѯDNSŲDNSõʱá -21. **[iperf][11]**һTCP/UDPߣܹôͨ䵥˫TCP/UDP̽õĴڼгЭջʱáһֽ[netperf][12]ӵиĹܼõͳݡ +21. **[iperf][11]**һTCP/UDPߣܹôͨ䵥˫TCP/UDP̽õĴڼгЭջʱáһ[netperf][12]ıӵиĹܼõͳݡ 22. **[netcat][13]/socat**ͨõdebugߣԶTCP/UDP׽ֽждͨijűں˶紫˿ڽм -23. **nmap**һж˿ɨ緢ֹߡһTCP/UDPɨ輼ҿŵĶ˿ڡڱڵIJϵͳ鱾©Ϊάӳʱá[zmap][14]һƵƷһڻΧɨ蹤ߡ +23. **nmap**һж˿ɨ緢ֹߡɻTCP/UDPɨ輼ҿŵĶ˿ڡڱڵIJϵͳ鱾©߽ӳʱá[zmap][14]һƵƷһڻΧɨ蹤ߡ 24. pingһõԹߡͨICMPechoreplyĽǿʵ书ܡڲ·ɵRTTԼԶϵͳǽʱápingıиƯĽ棨磬[noping][15]Э֧֣磬[hping][16]߲̽磬[fping][17] @@ -78,25 +78,25 @@ 25. **[sprobe][18]**һʽƶϱԶIPַƿйߡʹTCPֻƿڼΧܺ·صʱá -26. **traceroute**һִܷӱصԶĵ·/ת·緢ֹߡͨTTL̽ⱨģռм·ɵICMPϢŲӻ·صʱátracerouteıиõRTTͳƹܣ磬[mtr][19] +26. **traceroute**һִܷӱصԶĵ·/ת·緢ֹߡTTL̽ⱨģռм·ɵICMPϢŲӻ·صʱátracerouteıиõRTTͳƹܣ磬[mtr][19] -### Ӧ־ ### +### Ӧ־ ### -£ضķӦΪĿ꣨磬webݿɷĵͨ־ͼ⡣ǰᵽļĹܹòͼ +£ضķӦóΪĿ꣨磬webݿɷĵͨ־ͼ⡣ǰᵽļĹܹӦòͼ -27. **[GoAccess][20]**һApacheNginxĽʽ鿴ڻȡ־չʾշ󡢿ͻ˲ϵͳͻλáͻڵĶʵʱͳϢԹʽʾ +27. **[GoAccess][20]**һApacheNginxĽʽ鿴ڶԻȡ־ķչʾշ󡢿ͻ˲ϵͳͻλáͻڵĶʵʱͳϢԹʽʾ ![](https://farm8.staticflickr.com/7518/16209185266_da6c5c56eb_c.jpg) -28. **[mtop][21]**һMySQL/MariaDBмԽǰݿдIJѯпӻŻMySQLܡгʱá +28. **[mtop][21]**һMySQL/MariaDBмԽǰݿдIJѯԿӻķʽʾŻMySQLܡгʱá ![](https://farm8.staticflickr.com/7472/16047570248_bc996795f2_c.jpg) -29. **[ngxtop][22]**һNginxApache⹤ߣܹtopָĽӻWebͨwebIJѯ־ļռijĿĵػͳϢ +29. **[ngxtop][22]**һNginxApache⹤ߣܹtopָķʽӻʾWebwebIJѯ־ļռijĿĵػͳϢ ### Conclusion ### -ƪУչʾʽ⹤ߣײİļ߲Ӧó֪Ǹʲôһ£ѡĸʹһ¡һһ߲ΪÿʹõͨõĽһõϵͳԱӦܹǸ߸ʺϵǰĻϣбԴ +ƪУչʾʽ⹤ߣײİļ߲Ӧó֪Ǹߵһ£ѡĸʹһ¡һһ߲ΪÿʹõͨõĽһõϵͳԱӦܾĸ߸ʺϵǰĻϣбԴ ӭͨظĽбݣ From cba0d0e294be62733c5822bc1e46576f3da8636e Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Sun, 10 May 2015 23:21:41 +0800 Subject: [PATCH 0770/2517] remote the origin english article --- ... command-line network monitors on Linux.md | 137 ------------------ 1 file changed, 137 deletions(-) delete mode 100644 sources/tech/20150112 What are useful command-line network monitors on Linux.md diff --git a/sources/tech/20150112 What are useful command-line network monitors on Linux.md b/sources/tech/20150112 What are useful command-line network monitors on Linux.md deleted file mode 100644 index 8f6b9596d1..0000000000 --- a/sources/tech/20150112 What are useful command-line network monitors on Linux.md +++ /dev/null @@ -1,137 +0,0 @@ -translating by wwy-hust - -What are useful command-line network monitors on Linux -================================================================================ -Network monitoring is a critical IT function for businesses of all sizes. The goal of network monitoring can vary. For example, the monitoring activity can be part of long-term network provisioning, security protection, performance troubleshooting, network usage accounting, and so on. Depending on its goal, network monitoring is done in many different ways, such as performing packet-level sniffing, collecting flow-level statistics, actively injecting probes into the network, parsing server logs, etc. - -While there are many dedicated network monitoring systems capable of 24/7/365 monitoring, you can also leverage command-line network monitors in certain situations, where a dedicated monitor is an overkill. If you are a system admin, you are expected to have hands-on experience with some of well known CLI network monitors. Here is a list of **popular and useful command-line network monitors on Linux**. - -### Packet-Level Sniffing ### - -In this category, monitoring tools capture individual packets on the wire, dissect their content, and display decoded packet content or packet-level statistics. These tools conduct network monitoring from the lowest level, and as such, can possibly do the most fine-grained monitoring at the cost of network I/O and analysis efforts. - -1. **dhcpdump**: a comman-line DHCP traffic sniffer capturing DHCP request/response traffic, and displays dissected DHCP protocol messages in a human-friendly format. It is useful when you are troubleshooting DHCP related issues. - -2. **[dsniff][1]**: a collection of command-line based sniffing, spoofing and hijacking tools designed for network auditing and penetration testing. They can sniff various information such as passwords, NSF traffic, email messages, website URLs, and so on. - -3. **[httpry][2]**: an HTTP packet sniffer which captures and decode HTTP requests and response packets, and display them in a human-readable format. - -4. **IPTraf**: a console-based network statistics viewer. It displays packet-level, connection-level, interface-level, protocol-level packet/byte counters in real-time. Packet capturing can be controlled by protocol filters, and its operation is full menu-driven. - -![](https://farm8.staticflickr.com/7519/16055246118_8ea182b413_c.jpg) - -5. **[mysql-sniffer][3]**: a packet sniffer which captures and decodes packets associated with MySQL queries. It displays the most frequent or all queries in a human-readable format. - -6. **[ngrep][4]**: grep over network packets. It can capture live packets, and match (filtered) packets against regular expressions or hexadecimal expressions. It is useful for detecting and storing any anomalous traffic, or for sniffing particular patterns of information from live traffic. - -7. **[p0f][5]**: a passive fingerprinting tool which, based on packet sniffing, reliably identifies operating systems, NAT or proxy settings, network link types and various other properites associated with an active TCP connection. - -8. **pktstat**: a command-line tool which analyzes live packets to display connection-level bandwidth usages as well as descriptive information of protocols involved (e.g., HTTP GET/POST, FTP, X11). - -![](https://farm8.staticflickr.com/7477/16048970999_be60f74952_b.jpg) - -9. **Snort**: an intrusion detection and prevention tool which can detect/prevent a variety of backdoor, botnets, phishing, spyware attacks from live traffic based on rule-driven protocol analysis and content matching. - -10. **tcpdump**: a command-line packet sniffer which is capable of capturing nework packets on the wire based on filter expressions, dissect the packets, and dump the packet content for packet-level analysis. It is widely used for any kinds of networking related troubleshooting, network application debugging, or [security][6] monitoring. - -11. **tshark**: a command-line packet sniffing tool that comes with Wireshark GUI program. It can capture and decode live packets on the wire, and show decoded packet content in a human-friendly fashion. - -### Flow-/Process-/Interface-Level Monitoring ### - -In this category, network monitoring is done by classifying network traffic into flows, associated processes or interfaces, and collecting per-flow, per-process or per-interface statistics. Source of information can be libpcap packet capture library or sysfs kernel virtual filesystem. Monitoring overhead of these tools is low, but packet-level inspection capabilities are missing. - -12. **bmon**: a console-based bandwidth monitoring tool which shows various per-interface information, including not-only aggregate/average RX/TX statistics, but also a historical view of bandwidth usage. - -![](https://farm9.staticflickr.com/8580/16234265932_87f20c5d17_b.jpg) - -13. **[iftop][7]**: a bandwidth usage monitoring tool that can shows bandwidth usage for individual network connections in real time. It comes with ncurses-based interface to visualize bandwidth usage of all connections in a sorted order. It is useful for monitoring which connections are consuming the most bandwidth. - -14. **nethogs**: a process monitoring tool which offers a real-time view of upload/download bandwidth usage of individual processes or programs in an ncurses-based interface. This is useful for detecting bandwidth hogging processes. - -15. **netstat**: a command-line tool that shows various statistics and properties of the networking stack, such as open TCP/UDP connections, network interface RX/TX statistics, routing tables, protocol/socket statistics. It is useful when you diagnose performance and resource usage related problems of the networking stack. - -16. **[speedometer][8]**: a console-based traffic monitor which visualizes the historical trend of an interface's RX/TX bandwidth usage with ncurses-drawn bar charts. - -![](https://farm8.staticflickr.com/7485/16048971069_31dd573a4f_c.jpg) - -17. **[sysdig][9]**: a comprehensive system-level debugging tool with a unified interface for investigating different Linux subsystems. Its network monitoring module is capable of monitoring, either online or offline, various per-process/per-host networking statistics such as bandwidth usage, number of connections/requests, etc. - -18. **tcptrack**: a TCP connection monitoring tool which displays information of active TCP connections, including source/destination IP addresses/ports, TCP state, and bandwidth usage. - -![](https://farm8.staticflickr.com/7507/16047703080_5fdda2e811_b.jpg) - -19. **vnStat**: a command-line traffic monitor which maintains a historical view of RX/TX bandwidh usage (e.g., current, daily, monthly) on a per-interface basis. Running as a background daemon, it collects and stores interface statistics on bandwidth rate and total bytes transferred. - -### Active Network Monitoring ### - -Unlike passive monitoring tools presented so far, tools in this category perform network monitoring by actively "injecting" probes into the network and collecting corresponding responses. Monitoring targets include routing path, available bandwidth, loss rates, delay, jitter, system settings or vulnerabilities, and so on. - -20. **[dnsyo][10]**: a DNS monitoring tool which can conduct DNS lookup from open resolvers scattered across more than 1,500 different networks. It is useful when you check DNS propagation or troubleshoot DNS configuration. - -21. **[iperf][11]**: a TCP/UDP bandwidth measurement utility which can measure maximum available bandwidth between two end points. It measures available bandwidth by having two hosts pump out TCP/UDP probe traffic between them either unidirectionally or bi-directionally. It is useful when you test the network capacity, or tune the parameters of network stack. A variant called [netperf][12] exists with more features and better statistics. - -22. **[netcat][13]/socat**: versatile network debugging tools capable of reading from, writing to, or listen on TCP/UDP sockets. They are often used alongside with other programs or scripts for backend network transfer or port listening. - -23. **nmap**: a command-line port scanning and network discovery utility. It relies on a number of TCP/UDP based scanning techniques to detect open ports, live hosts, or existing operating systems on the local network. It is useful when you audit local hosts for vulnerabilities or build a host map for maintenance purpose. [zmap][14] is an alernative scanning tool with Internet-wide scanning capability. - -24. ping: a network testing tool which works by exchaning ICMP echo and reply packets with a remote host. It is useful when you measure round-trip-time (RTT) delay and loss rate of a routing path, as well as test the status or firewall rules of a remote system. Variations of ping exist with fancier interface (e.g., [noping][15]), multi-protocol support (e.g., [hping][16]) or parallel probing capability (e.g., [fping][17]). - -![](https://farm8.staticflickr.com/7466/15612665344_a4bb665a5b_c.jpg) - -25. **[sprobe][18]**: a command-line tool that heuristically infers the bottleneck bandwidth between a local host and any arbitrary remote IP address. It uses TCP three-way handshake tricks to estimate the bottleneck bandwidth. It is useful when troubleshooting wide-area network performance and routing related problems. - -26. **traceroute**: a network discovery tool which reveals a layer-3 routing/forwarding path from a local host to a remote host. It works by sending TTL-limited probe packets and collecting ICMP responses from intermediate routers. It is useful when troubleshooting slow network connections or routing related problems. Variations of traceroute exist with better RTT statistics (e.g., [mtr][19]). - -### Application Log Parsing ### - -In this category, network monitoring is targeted at a specific server application (e.g., web server or database server). Network traffic generated or consumed by a server application is monitored by analyzing its log file. Unlike network-level monitors presented in earlier categories, tools in this category can analyze and monitor network traffic from application-level. - -27. **[GoAccess][20]**: a console-based interactive viewer for Apache and Nginx web server traffic. Based on access log analysis, it presents a real-time statistics of a number of metrics including daily visits, top requests, client operating systems, client locations, client browsers, in a scrollable view. - -![](https://farm8.staticflickr.com/7518/16209185266_da6c5c56eb_c.jpg) - -28. **[mtop][21]**: a command-line MySQL/MariaDB server moniter which visualizes the most expensive queries and current database server load. It is useful when you optimize MySQL server performance and tune server configurations. - -![](https://farm8.staticflickr.com/7472/16047570248_bc996795f2_c.jpg) - -29. **[ngxtop][22]**: a traffic monitoring tool for Nginx and Apache web server, which visualizes web server traffic in a top-like interface. It works by parsing a web server's access log file and collecting traffic statistics for individual destinations or requests. - -### Conclusion ### - -In this article, I presented a wide variety of command-line network monitoring tools, ranging from the lowest packet-level monitors to the highest application-level network monitors. Knowing which tool does what is one thing, and choosing which tool to use is another, as any single tool cannot be a universal solution for your every need. A good system admin should be able to decide which tool is right for the circumstance at hand. Hopefully the list helps with that. - -You are always welcome to improve the list with your comment! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/useful-command-line-network-monitors-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://www.monkey.org/~dugsong/dsniff/ -[2]:http://xmodulo.com/monitor-http-traffic-command-line-linux.html -[3]:https://github.com/zorkian/mysql-sniffer -[4]:http://ngrep.sourceforge.net/ -[5]:http://lcamtuf.coredump.cx/p0f3/ -[6]:http://xmodulo.com/recommend/firewallbook -[7]:http://xmodulo.com/how-to-install-iftop-on-linux.html -[8]:https://excess.org/speedometer/ -[9]:http://xmodulo.com/monitor-troubleshoot-linux-server-sysdig.html -[10]:http://xmodulo.com/check-dns-propagation-linux.html -[11]:https://iperf.fr/ -[12]:http://www.netperf.org/netperf/ -[13]:http://xmodulo.com/useful-netcat-examples-linux.html -[14]:https://zmap.io/ -[15]:http://noping.cc/ -[16]:http://www.hping.org/ -[17]:http://fping.org/ -[18]:http://sprobe.cs.washington.edu/ -[19]:http://xmodulo.com/better-alternatives-basic-command-line-utilities.html#mtr_link -[20]:http://goaccess.io/ -[21]:http://mtop.sourceforge.net/ -[22]:http://xmodulo.com/monitor-nginx-web-server-command-line-real-time.html From b14b922f2f05ddb8ea7f9b44564ca61916a22845 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Sun, 10 May 2015 23:21:41 +0800 Subject: [PATCH 0771/2517] remove the origin english article --- ... command-line network monitors on Linux.md | 137 ------------------ 1 file changed, 137 deletions(-) delete mode 100644 sources/tech/20150112 What are useful command-line network monitors on Linux.md diff --git a/sources/tech/20150112 What are useful command-line network monitors on Linux.md b/sources/tech/20150112 What are useful command-line network monitors on Linux.md deleted file mode 100644 index 8f6b9596d1..0000000000 --- a/sources/tech/20150112 What are useful command-line network monitors on Linux.md +++ /dev/null @@ -1,137 +0,0 @@ -translating by wwy-hust - -What are useful command-line network monitors on Linux -================================================================================ -Network monitoring is a critical IT function for businesses of all sizes. The goal of network monitoring can vary. For example, the monitoring activity can be part of long-term network provisioning, security protection, performance troubleshooting, network usage accounting, and so on. Depending on its goal, network monitoring is done in many different ways, such as performing packet-level sniffing, collecting flow-level statistics, actively injecting probes into the network, parsing server logs, etc. - -While there are many dedicated network monitoring systems capable of 24/7/365 monitoring, you can also leverage command-line network monitors in certain situations, where a dedicated monitor is an overkill. If you are a system admin, you are expected to have hands-on experience with some of well known CLI network monitors. Here is a list of **popular and useful command-line network monitors on Linux**. - -### Packet-Level Sniffing ### - -In this category, monitoring tools capture individual packets on the wire, dissect their content, and display decoded packet content or packet-level statistics. These tools conduct network monitoring from the lowest level, and as such, can possibly do the most fine-grained monitoring at the cost of network I/O and analysis efforts. - -1. **dhcpdump**: a comman-line DHCP traffic sniffer capturing DHCP request/response traffic, and displays dissected DHCP protocol messages in a human-friendly format. It is useful when you are troubleshooting DHCP related issues. - -2. **[dsniff][1]**: a collection of command-line based sniffing, spoofing and hijacking tools designed for network auditing and penetration testing. They can sniff various information such as passwords, NSF traffic, email messages, website URLs, and so on. - -3. **[httpry][2]**: an HTTP packet sniffer which captures and decode HTTP requests and response packets, and display them in a human-readable format. - -4. **IPTraf**: a console-based network statistics viewer. It displays packet-level, connection-level, interface-level, protocol-level packet/byte counters in real-time. Packet capturing can be controlled by protocol filters, and its operation is full menu-driven. - -![](https://farm8.staticflickr.com/7519/16055246118_8ea182b413_c.jpg) - -5. **[mysql-sniffer][3]**: a packet sniffer which captures and decodes packets associated with MySQL queries. It displays the most frequent or all queries in a human-readable format. - -6. **[ngrep][4]**: grep over network packets. It can capture live packets, and match (filtered) packets against regular expressions or hexadecimal expressions. It is useful for detecting and storing any anomalous traffic, or for sniffing particular patterns of information from live traffic. - -7. **[p0f][5]**: a passive fingerprinting tool which, based on packet sniffing, reliably identifies operating systems, NAT or proxy settings, network link types and various other properites associated with an active TCP connection. - -8. **pktstat**: a command-line tool which analyzes live packets to display connection-level bandwidth usages as well as descriptive information of protocols involved (e.g., HTTP GET/POST, FTP, X11). - -![](https://farm8.staticflickr.com/7477/16048970999_be60f74952_b.jpg) - -9. **Snort**: an intrusion detection and prevention tool which can detect/prevent a variety of backdoor, botnets, phishing, spyware attacks from live traffic based on rule-driven protocol analysis and content matching. - -10. **tcpdump**: a command-line packet sniffer which is capable of capturing nework packets on the wire based on filter expressions, dissect the packets, and dump the packet content for packet-level analysis. It is widely used for any kinds of networking related troubleshooting, network application debugging, or [security][6] monitoring. - -11. **tshark**: a command-line packet sniffing tool that comes with Wireshark GUI program. It can capture and decode live packets on the wire, and show decoded packet content in a human-friendly fashion. - -### Flow-/Process-/Interface-Level Monitoring ### - -In this category, network monitoring is done by classifying network traffic into flows, associated processes or interfaces, and collecting per-flow, per-process or per-interface statistics. Source of information can be libpcap packet capture library or sysfs kernel virtual filesystem. Monitoring overhead of these tools is low, but packet-level inspection capabilities are missing. - -12. **bmon**: a console-based bandwidth monitoring tool which shows various per-interface information, including not-only aggregate/average RX/TX statistics, but also a historical view of bandwidth usage. - -![](https://farm9.staticflickr.com/8580/16234265932_87f20c5d17_b.jpg) - -13. **[iftop][7]**: a bandwidth usage monitoring tool that can shows bandwidth usage for individual network connections in real time. It comes with ncurses-based interface to visualize bandwidth usage of all connections in a sorted order. It is useful for monitoring which connections are consuming the most bandwidth. - -14. **nethogs**: a process monitoring tool which offers a real-time view of upload/download bandwidth usage of individual processes or programs in an ncurses-based interface. This is useful for detecting bandwidth hogging processes. - -15. **netstat**: a command-line tool that shows various statistics and properties of the networking stack, such as open TCP/UDP connections, network interface RX/TX statistics, routing tables, protocol/socket statistics. It is useful when you diagnose performance and resource usage related problems of the networking stack. - -16. **[speedometer][8]**: a console-based traffic monitor which visualizes the historical trend of an interface's RX/TX bandwidth usage with ncurses-drawn bar charts. - -![](https://farm8.staticflickr.com/7485/16048971069_31dd573a4f_c.jpg) - -17. **[sysdig][9]**: a comprehensive system-level debugging tool with a unified interface for investigating different Linux subsystems. Its network monitoring module is capable of monitoring, either online or offline, various per-process/per-host networking statistics such as bandwidth usage, number of connections/requests, etc. - -18. **tcptrack**: a TCP connection monitoring tool which displays information of active TCP connections, including source/destination IP addresses/ports, TCP state, and bandwidth usage. - -![](https://farm8.staticflickr.com/7507/16047703080_5fdda2e811_b.jpg) - -19. **vnStat**: a command-line traffic monitor which maintains a historical view of RX/TX bandwidh usage (e.g., current, daily, monthly) on a per-interface basis. Running as a background daemon, it collects and stores interface statistics on bandwidth rate and total bytes transferred. - -### Active Network Monitoring ### - -Unlike passive monitoring tools presented so far, tools in this category perform network monitoring by actively "injecting" probes into the network and collecting corresponding responses. Monitoring targets include routing path, available bandwidth, loss rates, delay, jitter, system settings or vulnerabilities, and so on. - -20. **[dnsyo][10]**: a DNS monitoring tool which can conduct DNS lookup from open resolvers scattered across more than 1,500 different networks. It is useful when you check DNS propagation or troubleshoot DNS configuration. - -21. **[iperf][11]**: a TCP/UDP bandwidth measurement utility which can measure maximum available bandwidth between two end points. It measures available bandwidth by having two hosts pump out TCP/UDP probe traffic between them either unidirectionally or bi-directionally. It is useful when you test the network capacity, or tune the parameters of network stack. A variant called [netperf][12] exists with more features and better statistics. - -22. **[netcat][13]/socat**: versatile network debugging tools capable of reading from, writing to, or listen on TCP/UDP sockets. They are often used alongside with other programs or scripts for backend network transfer or port listening. - -23. **nmap**: a command-line port scanning and network discovery utility. It relies on a number of TCP/UDP based scanning techniques to detect open ports, live hosts, or existing operating systems on the local network. It is useful when you audit local hosts for vulnerabilities or build a host map for maintenance purpose. [zmap][14] is an alernative scanning tool with Internet-wide scanning capability. - -24. ping: a network testing tool which works by exchaning ICMP echo and reply packets with a remote host. It is useful when you measure round-trip-time (RTT) delay and loss rate of a routing path, as well as test the status or firewall rules of a remote system. Variations of ping exist with fancier interface (e.g., [noping][15]), multi-protocol support (e.g., [hping][16]) or parallel probing capability (e.g., [fping][17]). - -![](https://farm8.staticflickr.com/7466/15612665344_a4bb665a5b_c.jpg) - -25. **[sprobe][18]**: a command-line tool that heuristically infers the bottleneck bandwidth between a local host and any arbitrary remote IP address. It uses TCP three-way handshake tricks to estimate the bottleneck bandwidth. It is useful when troubleshooting wide-area network performance and routing related problems. - -26. **traceroute**: a network discovery tool which reveals a layer-3 routing/forwarding path from a local host to a remote host. It works by sending TTL-limited probe packets and collecting ICMP responses from intermediate routers. It is useful when troubleshooting slow network connections or routing related problems. Variations of traceroute exist with better RTT statistics (e.g., [mtr][19]). - -### Application Log Parsing ### - -In this category, network monitoring is targeted at a specific server application (e.g., web server or database server). Network traffic generated or consumed by a server application is monitored by analyzing its log file. Unlike network-level monitors presented in earlier categories, tools in this category can analyze and monitor network traffic from application-level. - -27. **[GoAccess][20]**: a console-based interactive viewer for Apache and Nginx web server traffic. Based on access log analysis, it presents a real-time statistics of a number of metrics including daily visits, top requests, client operating systems, client locations, client browsers, in a scrollable view. - -![](https://farm8.staticflickr.com/7518/16209185266_da6c5c56eb_c.jpg) - -28. **[mtop][21]**: a command-line MySQL/MariaDB server moniter which visualizes the most expensive queries and current database server load. It is useful when you optimize MySQL server performance and tune server configurations. - -![](https://farm8.staticflickr.com/7472/16047570248_bc996795f2_c.jpg) - -29. **[ngxtop][22]**: a traffic monitoring tool for Nginx and Apache web server, which visualizes web server traffic in a top-like interface. It works by parsing a web server's access log file and collecting traffic statistics for individual destinations or requests. - -### Conclusion ### - -In this article, I presented a wide variety of command-line network monitoring tools, ranging from the lowest packet-level monitors to the highest application-level network monitors. Knowing which tool does what is one thing, and choosing which tool to use is another, as any single tool cannot be a universal solution for your every need. A good system admin should be able to decide which tool is right for the circumstance at hand. Hopefully the list helps with that. - -You are always welcome to improve the list with your comment! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/useful-command-line-network-monitors-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://www.monkey.org/~dugsong/dsniff/ -[2]:http://xmodulo.com/monitor-http-traffic-command-line-linux.html -[3]:https://github.com/zorkian/mysql-sniffer -[4]:http://ngrep.sourceforge.net/ -[5]:http://lcamtuf.coredump.cx/p0f3/ -[6]:http://xmodulo.com/recommend/firewallbook -[7]:http://xmodulo.com/how-to-install-iftop-on-linux.html -[8]:https://excess.org/speedometer/ -[9]:http://xmodulo.com/monitor-troubleshoot-linux-server-sysdig.html -[10]:http://xmodulo.com/check-dns-propagation-linux.html -[11]:https://iperf.fr/ -[12]:http://www.netperf.org/netperf/ -[13]:http://xmodulo.com/useful-netcat-examples-linux.html -[14]:https://zmap.io/ -[15]:http://noping.cc/ -[16]:http://www.hping.org/ -[17]:http://fping.org/ -[18]:http://sprobe.cs.washington.edu/ -[19]:http://xmodulo.com/better-alternatives-basic-command-line-utilities.html#mtr_link -[20]:http://goaccess.io/ -[21]:http://mtop.sourceforge.net/ -[22]:http://xmodulo.com/monitor-nginx-web-server-command-line-real-time.html From ad5f645ef0457b3ce906d384495bd340a58ce131 Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 11 May 2015 07:59:20 +0800 Subject: [PATCH 0772/2517] Update 20150505 Bodhi Linux Introduces Moksha Desktop.md --- sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md b/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md index 0b4d61993d..cdc649666d 100644 --- a/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md +++ b/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Bodhi Linux Introduces Moksha Desktop ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Bodhi_Linux.jpg) @@ -37,4 +38,4 @@ via: http://itsfoss.com/bodhi-linux-introduces-moksha-desktop/ [2]:https://www.enlightenment.org/ [3]:http://www.bodhilinux.com/2015/04/28/introducing-the-moksha-desktop/ [4]:http://itsfoss.com/bodhi-linux-3/ -[5]:http://forums.bodhilinux.com/index.php?/topic/12322-e17-vs-e19-which-are-you-using-and-why/ \ No newline at end of file +[5]:http://forums.bodhilinux.com/index.php?/topic/12322-e17-vs-e19-which-are-you-using-and-why/ From 8862bda9a78c7888d6584a12ffde6d9ec8ed9329 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Mon, 11 May 2015 08:35:30 +0800 Subject: [PATCH 0773/2517] Translated by DongShuaike --- ...A TCP or UDP Network Monitoring Utility.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md diff --git a/translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md new file mode 100644 index 0000000000..98bea48f41 --- /dev/null +++ b/translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md @@ -0,0 +1,77 @@ + +iptraf:一个实用的TCP/UDP网络监控工具 +================================================================================ + +[iptraf][1]是一个基于ncurses(ncurses-based)的IP局域网监控器,用来生成包括TCP信息,UDP计数,ICMP和OSPF信息,以太网加载信息,结点状态信息,IP校验和错误等等统计数据。 + +它基于ncurses的用户界面帮助用户免于记忆繁琐的命令行开关。 + +### 特征 ### + +- 拥有一个IP流量监控器,用来显示你的网络中的流量变化信息。包括TCP标识信息,包以及字节计数,ICMP细节,OSPF包类型。 + +- 拥有普通和详细的交互统计数据显示了IP,TCP,UDP,ICMP,非IP以及其他的IP包计数,IP校验和错误,交互活动,包尺寸计数。(这里一些专业术语拿不定) + +- 拥有一个TCP和UDP服务监控器,能够显示普通TCP和UDP应用端口上发送的和接收的包的数量。 + +- 拥有一个局域网数据统计模块,能够检查到(discover)处于活动状态的主机,并显示其上正在运行的数据活动的统计信息。 + +- 拥有TCP,UDP,以及其他协议的显示过滤器(display filters),允许你只查看感兴趣的流量。 + +- 日志功能。 + +- 支持以太网,FDDI,ISDN,SLIP,PPP以及loopback接口类型(interface types)。 + +- 利用Linux内核内置的(built-in)原始套接字接口,允许它(指iptraf)能够用于许多种网卡上(这句话翻译不好) + +- 全屏,菜单式驱动的操作。 + +安装方法 + +### Ubuntu以及其衍生版本 ### + + sudo apt-get install iptraf + +### Arch Linux以及其衍生版本 ### + + sudo pacman -S iptra + +### Fedora以及其衍生版本 ### + + sudo yum install iptraf + +### 用法 ### + + +如果不加任何命令行选项地运行**iptraf**命令,程序将进入一种交互模式,通过主菜单可以访问多种设备(various facilities) + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_1.png) + + +简易的上手导航菜单。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_2.png) + +为monitor选择界面(接口)? + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_3.png) + +接口 **pp0** 处的流量。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_4.png) + +开始吧! + + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/iptraf-tcpudp-network-monitoring-utility/ + +作者:[Enock Seth Nyamador][a] +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/seth/ +[1]:http://iptraf.seul.org/about.html From 190dbcbb5dc048edf02072877517a9b8ceb9a829 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Mon, 11 May 2015 08:43:47 +0800 Subject: [PATCH 0774/2517] [Translated]20150505 Bodhi Linux Introduces Moksha Desktop.md --- ...5 Bodhi Linux Introduces Moksha Desktop.md | 41 ------------------- ...5 Bodhi Linux Introduces Moksha Desktop.md | 39 ++++++++++++++++++ 2 files changed, 39 insertions(+), 41 deletions(-) delete mode 100644 sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md create mode 100644 translated/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md diff --git a/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md b/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md deleted file mode 100644 index cdc649666d..0000000000 --- a/sources/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md +++ /dev/null @@ -1,41 +0,0 @@ -Translating by GOLinux! -Bodhi Linux Introduces Moksha Desktop -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Bodhi_Linux.jpg) - -Ubuntu based lightweight Linux distribution [Bodhi Linux][1] is working on a desktop environment of its own. This new desktop environment will be called Moksha (Sanskrit for ‘complete freedom’). Moksha will be replacing the usual [Enlightenment desktop environment][2]. - -### Why Moksha instead of Enlightenment? ### - -Jeff Hoogland of Bodhi Linux [says][3] that he had been unhappy with the newer versions of Enlightenment in the recent past. Until E17, Enlightenment was very stable and complemented well to the need of a lightweight Linux OS, but the E18 was so full of bugs that Bodhi Linux skipped it altogether. - -While the latest [Bodhi Linux 3.0.0 release][4] uses E19 (except the legacy mode, meant for older hardware, still uses E17), Jeff is not happy with E19 as well. He quotes: - -> On top of the performance issues, E19 did not allow for me personally to have the same workflow I enjoyed under E17 due to features it no longer had. Because of this I had changed to using the E17 on all of my Bodhi 3 computers – even my high end ones. This got me to thinking how many of our existing Bodhi users felt the same way, so I [opened a discussion about it on our user forums][5]. - -### Moksha is continuation of the E17 desktop ### - -Moksha will be a continuation of Bodhi’s favorite E17 desktop. Jeff further mentions: - -> We will start by integrating all of the Bodhi changes we have simply been patching into the source code over the years and fixing the few issues the desktop has. Once this is done we will begin back porting a few of the more useful features E18 and E19 introduced to the Enlightenment desktop and finally, we will introduce a few new things we think will improve the end user experience. - -### When will Moksha release? ### - -The next update to Bodhi will be Bodhi 3.1.0 in August this year. This new release will bring Moksha on all of its default ISOs. Let’s wait and watch to see if Moksha turns out to be a good decision or not. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/bodhi-linux-introduces-moksha-desktop/ - -作者:[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://www.bodhilinux.com/ -[2]:https://www.enlightenment.org/ -[3]:http://www.bodhilinux.com/2015/04/28/introducing-the-moksha-desktop/ -[4]:http://itsfoss.com/bodhi-linux-3/ -[5]:http://forums.bodhilinux.com/index.php?/topic/12322-e17-vs-e19-which-are-you-using-and-why/ diff --git a/translated/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md b/translated/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md new file mode 100644 index 0000000000..6ad0d04567 --- /dev/null +++ b/translated/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md @@ -0,0 +1,39 @@ +Bodhi Linux引入Moksha桌面 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Bodhi_Linux.jpg) + +基于Ubuntu的轻量级Linux发行版[Bodhi Linux][1]致力于构建其自家的桌面环境,这个全新桌面环境被称之为Moksha(梵文意为‘完全自由’)。Moksha将替换常用的[Enlightenment桌面环境][2]。 + +### 为何用Moksha替换Englightenment? ### + +Bodhi Linux的Jeff Hoogland最近[表示][3]了他对新版Enlightenment的不满。直到E17,Enlightenment都十分稳定,并且能满足轻量级Linux的部署需求。而E18则到处都充满了问题,Bodhi Linux只好弃之不用了。 + +虽然最新的[Bodhi Linux 3.0发行版][4]仍然使用了E19作为其桌面(除传统模式外,这意味着,对于旧的硬件,仍然会使用E17),Jeff对E19也十分不满。他说道: + +>除了性能问题外,对于我个人而言,E19并没有给我带来与E17下相同的工作流程,因为它移除了很多E17的特性。鉴于此,我不得不将我所有的3台Bodhi计算机桌面改成E17——这3台机器都是我高端的了。这不由得让我想到,我们还有多少现存的Bodhi用户也怀着和我同样的感受,所以,我[在我们的用户论坛上开启一个与此相关的讨论][5]。 + +### Moksha是E17桌面的延续 ### + +Moksha将会是Bodhi所热衷的E17桌面的延续。Jeff进一步提到: +>我们将从整合所有Bodhi修改开始。多年来我们一直都只是给源代码打补丁,并修复桌面所具有的问题。如果该工作完成,我们将开始移植一些E18和E19引入的更为有用的特性,最后,我们将引入一些我们认为会改善最终用户体验的东西。 + +### Moksha何时发布? ### + +下一个Bodhi更新将会是Bodhi 3.1.0,就在今年八月。这个新版本将为所有其缺省ISO带来Moksha。让我们拭目以待,看看Moksha是否是一个好的决定。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/bodhi-linux-introduces-moksha-desktop/ + +作者:[Abhishek][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://www.bodhilinux.com/ +[2]:https://www.enlightenment.org/ +[3]:http://www.bodhilinux.com/2015/04/28/introducing-the-moksha-desktop/ +[4]:http://itsfoss.com/bodhi-linux-3/ +[5]:http://forums.bodhilinux.com/index.php?/topic/12322-e17-vs-e19-which-are-you-using-and-why/ From cc1bf0365c6066f54678603d6e2b134e8f207abf Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 11 May 2015 09:27:48 +0800 Subject: [PATCH 0775/2517] [Translating] tech/20150331 How to Install WordPress with Nginx in a Docker Container --- ... How to Install WordPress with Nginx in a Docker Container.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md b/sources/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md index 9f74c672f4..3d8f77e1cb 100644 --- a/sources/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md +++ b/sources/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to Install WordPress with Nginx in a Docker Container ================================================================================ Hi all, today we'll learn how to install WordPress running Nginx Web Server in a Docker Container. WordPress is an awesome free and open source Content Management System running thousands of websites throughout the globe. [Docker][1] is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. From 23eb73123a00080e337d1162b24d4805b6c1cc16 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 11 May 2015 10:05:04 +0800 Subject: [PATCH 0776/2517] Translating by ZTinoZ --- ...27 15 Things to Do After Installing Ubuntu 15.04 Desktop.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index 6f1114b9bb..179aa139bd 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ 15 Things to Do After Installing Ubuntu 15.04 Desktop ================================================================================ This tutorial is intended for beginners and covers some basic steps on what to do after you have installed Ubuntu 15.04 “Vivid Vervet” Desktop version on your computer in order to customize the system and install basic programs for daily usage. @@ -295,4 +296,4 @@ via: http://www.tecmint.com/things-to-do-after-installing-ubuntu-15-04-desktop/ [a]:http://www.tecmint.com/author/cezarmatei/ [1]:http://www.viber.com/en/products/linux -[2]:http://ubuntu-tweak.com/ \ No newline at end of file +[2]:http://ubuntu-tweak.com/ From ce207cac56c5bf969b06956e58b26708c3e4c7c6 Mon Sep 17 00:00:00 2001 From: wwy Date: Mon, 11 May 2015 10:26:22 +0800 Subject: [PATCH 0777/2517] Update 2015-04-29 web caching basics terminology http headers and caching strategies.md --- ...ng basics terminology http headers and caching strategies.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md index df0eb8b723..07fd4fcd42 100644 --- a/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md +++ b/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md @@ -1,3 +1,5 @@ +translating by wwy-hust + Web Caching Basics: Terminology, HTTP Headers, and Caching Strategies ===================================================================== From 7dd2df260d645592ec053e877c02791d824f0e72 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Mon, 11 May 2015 12:39:51 +0800 Subject: [PATCH 0778/2517] translating wi-cuckoo --- ...ndline Chat Server and Remove Unwanted Packages in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md b/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md index 990e621e5b..cbcd668b14 100644 --- a/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md +++ b/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md @@ -1,3 +1,4 @@ +translating wi-cuckoo Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux ================================================================================ Here we are with the next part of Linux Command Line Tips and Tricks. If you missed our previous post on Linux Tricks you may find it here. @@ -180,4 +181,4 @@ via: http://www.tecmint.com/linux-commandline-chat-server-and-remove-unwanted-pa 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/5-linux-command-line-tricks/ \ No newline at end of file +[1]:http://www.tecmint.com/5-linux-command-line-tricks/ From ce485dc2362849ce1e5678f6f74b3ce9923978a2 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 11 May 2015 12:55:51 +0800 Subject: [PATCH 0779/2517] [Translated] tech/20150331 How to Install WordPress with Nginx in a Docker Container --- ...dPress with Nginx in a Docker Container.md | 103 +++++++++--------- 1 file changed, 51 insertions(+), 52 deletions(-) rename {sources => translated}/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md (57%) diff --git a/sources/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md b/translated/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md similarity index 57% rename from sources/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md rename to translated/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md index 3d8f77e1cb..849dd4a853 100644 --- a/sources/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md +++ b/translated/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md @@ -1,27 +1,26 @@ -Translating by ictlyh -How to Install WordPress with Nginx in a Docker Container +如何在 Docker 容器里的 Nginx 中安装 WordPress ================================================================================ -Hi all, today we'll learn how to install WordPress running Nginx Web Server in a Docker Container. WordPress is an awesome free and open source Content Management System running thousands of websites throughout the globe. [Docker][1] is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. +大家好,今天我们来学习一下如何在 Docker 容器上运行的 Nginx Web 服务器中安装 WordPress。WordPress 是一个很好的免费开源的内容管理系统,全球成千上万的网站都在使用它。[Docker][1] 是一个提供开放平台来打包,分发和运行任何应用的开源轻量级容器项目。它没有语言支持,框架或打包系统的限制,可以在从小的家用电脑到高端服务器的任何地方任何时间运行。这让它们成为可以用于部署和扩展网络应用,数据库和后端服务而不必依赖于特定的栈或者提供商的很好的构建块。 -Today, we'll deploy a docker container with the latest WordPress package with necessary prerequisites ie Nginx Web Server, PHP5, MariaDB Server, etc. Here are some short and sweet steps to successfully install a WordPress running Nginx in a Docker Container. +今天,我们会在 docker 容器上部署最新的 WordPress 软件包,包括需要的前提条件,例如 Nginx Web 服务器、PHP5、MariaDB 服务器等。下面是在运行在 Docker 容器上成功安装 WordPress 的简单步骤。 -### 1. Installing Docker ### +### 1. 安装 Docker ### -Before we really start, we'll need to make sure that we have Docker installed in our Linux machine. Here, we are running CentOS 7 as host so, we'll be running yum manager to install docker using the below command. +在我们真正开始之前,我们需要确保在我们的 Linux 机器上已经安装了 Docker。我们使用的主机是 CentOS 7,因此我们用下面的命令使用 yum 管理器安装 docker。 # yum install docker -![Installing Docker](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png) +![安装 Docker](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png) # systemctl restart docker.service -### 2. Creating WordPress Dockerfile ### +### 2. 创建 WordPress Docker 文件 ### -We'll need to create a Dockerfile which will automate the installation of the wordpress and its necessary pre-requisites. This Dockerfile will be used to build the image of WordPress installation we created. This WordPress Dockerfile fetches a CentOS 7 image from the Docker Registry Hub and updates the system with the latest available packages. It then installs the necessary softwares like Nginx Web Server, PHP, MariaDB, Open SSH Server and more which are essential for the Docker Container to work. It then executes a script which will initialize the installation of WordPress out of the box. +我们需要创建用于自动安装 wordpress 以及前提条件的 docker 文件。这个 docker 文件将用于构建 WordPress 的安装镜像。这个 WordPress docker 文件会从 Docker 库中心获取 CentOS 7 镜像并用最新的可用更新升级系统。然后它会安装必要的软件,例如 Nginx Web 服务器、PHP、MariaDB、Open SSH 服务器以及其它保证 Docker 容器正常运行不可缺少的组件。最后它会执行一个初始化 WordPress 安装的脚本。 # nano Dockerfile -Then, we'll need to add the following lines of configuration inside that Dockerfile. +然后,我们需要将下面的配置行添加到 Docker 文件中。 FROM centos:centos7 MAINTAINER The CentOS Project @@ -49,15 +48,15 @@ Then, we'll need to add the following lines of configuration inside that Dockerf CMD ["/bin/bash", "/start.sh"] -![Wordpress Dockerfile](http://blog.linoxide.com/wp-content/uploads/2015/03/Dockerfile-wordpress.png) +![Wordpress Docker 文件](http://blog.linoxide.com/wp-content/uploads/2015/03/Dockerfile-wordpress.png) -### 3. Creating Start script ### +### 3. 创建启动 script ### -After we create our Dockerfile, we'll need to create a script named start.sh which will run and configure our WordPress installation. It will create and configure database, passwords for wordpress. To create it, we'll need to open start.sh with our favorite text editor. +我们创建了 docker 文件之后,我们需要创建用于运行和配置 WordPress 安装的脚本,名称为 start.sh。它会为 WordPress 创建并配置数据库和密码。用我们喜欢的文本编辑器打开 start.sh。 # nano start.sh -After opening start.sh, we'll need to add the following lines of configuration into it. +打开 start.sh 之后,我们要添加下面的配置行到文件中。 #!/bin/bash @@ -68,7 +67,7 @@ After opening start.sh, we'll need to add the following lines of configuration i } __create_user() { - # Create a user to SSH into as. + # 创建用于 SSH 登录的用户 SSH_USERPASS=`pwgen -c -n -1 8` useradd -G wheel user echo user:$SSH_USERPASS | chpasswd @@ -76,7 +75,7 @@ After opening start.sh, we'll need to add the following lines of configuration i } __mysql_config() { - # Hack to get MySQL up and running... I need to look into it more. + # 启用并运行 MySQL yum -y erase mariadb mariadb-server rm -rf /var/lib/mysql/ /etc/my.cnf yum -y install mariadb mariadb-server @@ -87,18 +86,18 @@ After opening start.sh, we'll need to add the following lines of configuration i } __handle_passwords() { - # Here we generate random passwords (thank you pwgen!). The first two are for mysql users, the last batch for random keys in wp-config.php + # 在这里我们生成随机密码(感谢 pwgen)。前面两个用于 mysql 用户,最后一个用于 wp-config.php 的随机密钥。 WORDPRESS_DB="wordpress" MYSQL_PASSWORD=`pwgen -c -n -1 12` WORDPRESS_PASSWORD=`pwgen -c -n -1 12` - # This is so the passwords show up in logs. + # 这是在日志中显示的密码。 echo mysql root password: $MYSQL_PASSWORD echo wordpress password: $WORDPRESS_PASSWORD echo $MYSQL_PASSWORD > /mysql-root-pw.txt echo $WORDPRESS_PASSWORD > /wordpress-db-pw.txt - # There used to be a huge ugly line of sed and cat and pipe and stuff below, - # but thanks to @djfiander's thing at https://gist.github.com/djfiander/6141138 - # there isn't now. + # 这里原来是一个包括 sed、cat、pipe 和 stuff 的很长的行,但多亏了 + # @djfiander 的 https://gist.github.com/djfiander/6141138 + # 现在没有了 sed -e "s/database_name_here/$WORDPRESS_DB/ s/username_here/$WORDPRESS_DB/ s/password_here/$WORDPRESS_PASSWORD/ @@ -117,7 +116,7 @@ After opening start.sh, we'll need to add the following lines of configuration i } __start_mysql() { - # systemctl start mysqld.service + # systemctl 启动 mysqld 服务 mysqladmin -u root password $MYSQL_PASSWORD mysql -uroot -p$MYSQL_PASSWORD -e "CREATE DATABASE wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY '$WORDPRESS_PASSWORD'; FLUSH PRIVILEGES;" killall mysqld @@ -128,7 +127,7 @@ After opening start.sh, we'll need to add the following lines of configuration i supervisord -n } - # Call all functions + # 调用所有函数 __check __create_user __mysql_config @@ -137,17 +136,17 @@ After opening start.sh, we'll need to add the following lines of configuration i __start_mysql __run_supervisor -![Start Script](http://blog.linoxide.com/wp-content/uploads/2015/03/start-script.png) +![启动脚本](http://blog.linoxide.com/wp-content/uploads/2015/03/start-script.png) -After adding the above configuration, we'll need to save it and then exit. +增加完上面的配置之后,保存并关闭文件。 -### 4. Creating Configuration files ### +### 4. 创建配置文件 ### -Now, we'll need to create configuration file for Nginx Web Server named nginx-site.conf . +现在,我们需要创建 Nginx Web 服务器的配置文件,命名为 nginx-site.conf。 # nano nginx-site.conf -Then, we'll add the following configuration to the config file. +然后,增加下面的配置信息到配置文件。 user nginx; worker_processes 1; @@ -231,13 +230,13 @@ Then, we'll add the following configuration to the config file. } } -![Nginx configuration](http://blog.linoxide.com/wp-content/uploads/2015/03/nginx-conf.png) +![Nginx 配置](http://blog.linoxide.com/wp-content/uploads/2015/03/nginx-conf.png) -Now, we'll create supervisord.conf file and add the following lines as shown below. +现在,创建 supervisor.conf 文件并添加下面的行。 # nano supervisord.conf -Then, add the following lines. +然后,添加以下行。 [unix_http_server] file=/tmp/supervisor.sock ; (the path to the socket file) @@ -287,60 +286,60 @@ Then, add the following lines. events = PROCESS_LOG result_handler = supervisor_stdout:event_handler -![Supervisord Configuration](http://blog.linoxide.com/wp-content/uploads/2015/03/supervisord.png) +![Supervisord 配置](http://blog.linoxide.com/wp-content/uploads/2015/03/supervisord.png) -After adding, we'll save and exit the file. +添加完后,保存并关闭文件。 -### 5. Building WordPress Container ### +### 5. 构建 WordPress 容器 ### -Now, after done with creating configurations and scripts, we'll now finally use the Dockerfile to build our desired container with the latest WordPress CMS installed and configured according to the configuration. To do so, we'll run the following command in that directory. +现在,完成了创建配置文件和脚本之后,我们终于要使用 docker 文件来创建安装最新的 WordPress CMS(译者注:Content Management System,内容管理系统)所需要的容器,并根据配置文件进行配置。做到这点,我们需要在对应的目录中运行以下命令。 # docker build --rm -t wordpress:centos7 . -![Building WordPress Container](http://blog.linoxide.com/wp-content/uploads/2015/03/building-wordpress-container.png) +![构建 WordPress 容器](http://blog.linoxide.com/wp-content/uploads/2015/03/building-wordpress-container.png) -### 6. Running WordPress Container ### +### 6. 运行 WordPress 容器 ### -Now, to run our newly built container and open port 80 and 22 for Nginx Web Server and SSH access respectively, we'll run the following command. +现在,执行以下命令运行新构建的容器,并为 Nginx Web 服务器和 SSH 访问打开88 和 22号相应端口 。 # CID=$(docker run -d -p 80:80 wordpress:centos7) -![Run WordPress Docker](http://blog.linoxide.com/wp-content/uploads/2015/03/run-wordpress-docker.png) +![运行 WordPress Docker](http://blog.linoxide.com/wp-content/uploads/2015/03/run-wordpress-docker.png) -To check the process and commands executed inside the container, we'll run the following command. +运行以下命令检查进程以及容器内部执行的命令。 # echo "$(docker logs $CID )" -TO check if the port mapping is correct or not, run the following command. +运行以下命令检查端口映射是否正确。 # docker ps -![docker state](http://blog.linoxide.com/wp-content/uploads/2015/03/docker-state.png) +![docker 状态](http://blog.linoxide.com/wp-content/uploads/2015/03/docker-state.png) -### 7. Web Interface ### +### 7. Web 界面 ### -Finally if everything went accordingly, we'll be welcomed with WordPress when pointing the browser to http://ip-address/ or http://mywebsite.com/ . +最后如果一切正常的话,当我们用浏览器打开 http://ip-address/ 或者 http://mywebsite.com/ 的时候会看到 WordPress 的欢迎界面。 -![Wordpress Start](http://blog.linoxide.com/wp-content/uploads/2015/03/wordpress-start.png) +![启动Wordpress](http://blog.linoxide.com/wp-content/uploads/2015/03/wordpress-start.png) -Now, we'll go step wise through the web interface and setup wordpress configuration, username and password for the WordPress Panel. +现在,我们将通过 Web 界面为 WordPress 面板设置 WordPress 的配置、用户名和密码。 -![Wordpress Welcome](http://blog.linoxide.com/wp-content/uploads/2015/03/wordpress-welcome.png) +![Wordpress 欢迎界面](http://blog.linoxide.com/wp-content/uploads/2015/03/wordpress-welcome.png) -Then, use the username and password entered above into the WordPress Login page. +然后,用上面用户名和密码输入到 WordPress 登录界面。 -![wordpress login](http://blog.linoxide.com/wp-content/uploads/2015/03/wordpress-login.png) +![wordpress 登录](http://blog.linoxide.com/wp-content/uploads/2015/03/wordpress-login.png) -### Conclusion ### +### 总结 ### -We successfully built and run WordPress CMS under LEMP Stack running in CentOS 7 Operating System as the docker OS. Running WordPress inside a container makes a lot safe and secure to the host system from the security perspective. This article enables one to completely configure WordPress to run under Docker Container with Nginx Web Server. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) +我们已经成功地在以 CentOS 7 作为 docker OS 的 LEMP 栈上构建并运行了 WordPress CMS。从安全层面来说,在容器中运行 WordPress 对于宿主系统更加安全可靠。这篇文章介绍了在 Docker 容器中运行的 Nginx Web 服务器上使用 WordPress 的完整配置。如果你有任何问题、建议、反馈,请在下面的评论框中写下来,让我们可以改进和更新我们的内容。非常感谢!Enjoy :-) -------------------------------------------------------------------------------- via: http://linoxide.com/linux-how-to/install-wordpress-nginx-docker-container/ 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](https://github.com/ictlyh) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b0b40b3b7bcaaeebf8555fd53f52a9ddbd2e1d32 Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 11 May 2015 14:43:00 +0800 Subject: [PATCH 0780/2517] Update 20150506 First Step Guide for Learning Shell Scripting.md --- .../20150506 First Step Guide for Learning Shell Scripting.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md b/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md index 8af4ef03e8..270177a3de 100644 --- a/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md +++ b/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md @@ -1,3 +1,4 @@ +Translating by GOLinux! First Step Guide for Learning Shell Scripting ================================================================================ ![](http://blog.linoxide.com/wp-content/uploads/2015/04/myfirstshellscript.jpg) @@ -456,4 +457,4 @@ via: http://linoxide.com/linux-shell-script/guide-start-learning-shell-scripting 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/petrasl/ \ No newline at end of file +[a]:http://linoxide.com/author/petrasl/ From 73cd54b1c0a8032880866fdbe939d4ce78131a52 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 11 May 2015 14:46:59 +0800 Subject: [PATCH 0781/2517] PUB:20150330 2 Ways to Create Your Own Docker Base Image @ictlyh --- ...ys to Create Your Own Docker Base Image.md | 57 +++++++++++++++++++ ...ys to Create Your Own Docker Base Image.md | 57 ------------------- 2 files changed, 57 insertions(+), 57 deletions(-) create mode 100644 published/20150330 2 Ways to Create Your Own Docker Base Image.md delete mode 100644 translated/tech/20150330 2 Ways to Create Your Own Docker Base Image.md diff --git a/published/20150330 2 Ways to Create Your Own Docker Base Image.md b/published/20150330 2 Ways to Create Your Own Docker Base Image.md new file mode 100644 index 0000000000..4c0030b191 --- /dev/null +++ b/published/20150330 2 Ways to Create Your Own Docker Base Image.md @@ -0,0 +1,57 @@ +两种方式创建你自己的 Docker 基本映像 +================================================================================ + +欢迎大家,今天我们学习一下 docker 基本映像以及如何构建我们自己的 docker 基本映像。[Docker][1] 是一个开源项目,提供了一个可以打包、装载和运行任何应用的轻量级容器的开放平台。它没有语言支持、框架和打包系统的限制,从小型的家用电脑到高端服务器,在何时何地都可以运行。这使它们可以不依赖于特定软件栈和供应商,像一块块积木一样部署和扩展网络应用、数据库和后端服务。 + +Docker 映像是不可更改的只读层。Docker 使用 **Union File System** 在只读文件系统上增加可读写的文件系统,但所有更改都发生在最顶层的可写层,而其下的只读映像上的原始文件仍然不会改变。由于映像不会改变,也就没有状态。基本映像是没有父类的那些映像。Docker 基本映像主要的好处是它允许我们有一个独立运行的 Linux 操作系统。 + +下面是我们如何可以创建自定义的基本映像的方式。 + +### 1. 使用 Tar 创建 Docker 基本映像 ### + +我们可以使用 tar 构建我们自己的基本映像,我们从一个运行中的 Linux 发行版开始,将其打包为基本映像。这过程可能会有些不同,它取决于我们打算构建的发行版。在 Debian 发行版中,已经预带了 debootstrap。在开始下面的步骤之前,我们需要安装 debootstrap。debootstrap 用来获取构建基本系统需要的包。这里,我们构建基于 Ubuntu 14.04 "Trusty" 的映像。要完成这些,我们需要在终端或者 shell 中运行以下命令。 + + $ sudo debootstrap trusty trusty > /dev/null + $ sudo tar -C trusty -c . | sudo docker import - trusty + +![使用debootstrap构建docker基本映像](http://blog.linoxide.com/wp-content/uploads/2015/03/creating-base-image-debootstrap.png) + +上面的命令为当前文件夹创建了一个 tar 文件并输出到标准输出中,"docker import - trusty" 通过管道从标准输入中获取这个 tar 文件并根据它创建一个名为 trusty 的基本映像。然后,如下所示,我们将运行映像内部的一条测试命令。 + + $ docker run trusty cat /etc/lsb-release + +[Docker GitHub Repo][2] 中有一些允许我们快速构建基本映像的事例脚本. + +### 2. 使用Scratch构建基本映像 ### + +在 Docker registry 中,有一个被称为 Scratch 的使用空 tar 文件构建的特殊库: + + $ tar cv --files-from /dev/null | docker import - scratch + +![使用scratch构建docker基本映像](http://blog.linoxide.com/wp-content/uploads/2015/03/creating-base-image-using-scratch.png) + +我们可以使用这个映像构建新的小容器: + + FROM scratch + ADD script.sh /usr/local/bin/run.sh + CMD ["/usr/local/bin/run.sh"] + +上面的 Dockerfile 文件来自一个很小的映像。这里,它首先从一个完全空的文件系统开始,然后它复制新建的 /usr/local/bin/run.sh 为 script.sh ,然后运行脚本 /usr/local/bin/run.sh。 + +### 结尾 ### + +这这个教程中,我们学习了如何构建一个开箱即用的自定义 Docker 基本映像。构建一个 docker 基本映像是一个很简单的任务,因为这里有很多已经可用的包和脚本。如果我们想要在里面安装想要的东西,构建 docker 基本映像非常有用。如果有任何疑问,建议或者反馈,请在下面的评论框中写下来。非常感谢!享受吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/2-ways-create-docker-base-image/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://www.docker.com/ +[2]:https://github.com/docker/docker/blob/master/contrib/mkimage-busybox.sh \ No newline at end of file diff --git a/translated/tech/20150330 2 Ways to Create Your Own Docker Base Image.md b/translated/tech/20150330 2 Ways to Create Your Own Docker Base Image.md deleted file mode 100644 index 63188ebc5b..0000000000 --- a/translated/tech/20150330 2 Ways to Create Your Own Docker Base Image.md +++ /dev/null @@ -1,57 +0,0 @@ -创建你自己的Docker基本映像的2中方式 -================================================================================ -欢迎大家,今天我们学习一下docker基本映像以及如何构建我们自己的docker基本映像。[Docker][1]是一个开源项目,为打包,装载和运行任何应用提供开发平台的轻量级容器。它没有语言支持,框架和打包系统的限制,从小型的家用电脑到高端的服务器,在何时何地都可以运行。这使它们成为不依赖于特定栈和供应商,很好的部署和扩展网络应用,数据库和后端服务的构建块。 - -Docker映像是不可更改的只读层。Docker使用**Union File System**在只读文件系统上增加读写文件系统。但所有更改都发生在最顶层的可写层,最底部,在只读映像上的原始文件仍然不会改变。由于映像不会改变,也就没有状态。基本映像是没有父类的那些映像。Docker基本映像主要的好处是它允许我们有一个独立允许的Linux操作系统。 - -下面是我们如何可以创建自定义基本映像的方式。 - -### 1. 使用Tar创建Docker基本映像 ### - -我们可以使用tar构建我们自己的基本映像,我们从将要打包为基本映像的运行中的Linux发行版开始构建。这过程可以会有些不同,它取决于我们打算构建的发行版。在Linux的发行版Debian中,已经预装了debootstrap。在开始下面的步骤之前,我们需要安装debootstrap。debootstrap用来获取构建基本系统需要的包。这里,我们构建基于Ubuntu 14.04 "Trusty" 的映像。做这些,我们需要在终端或者shell中运行以下命令。 - - $ sudo debootstrap trusty trusty > /dev/null - $ sudo tar -C trusty -c . | sudo docker import - trusty - -![使用debootstrap构建docker基本映像](http://blog.linoxide.com/wp-content/uploads/2015/03/creating-base-image-debootstrap.png) - -上面的命令为当前文件夹创建了一个tar文件并输出到STDOUT中,"docker import - trusty"从STDIN中获取这个tar文件并根据它创建一个名为trusty的基本映像。然后,如下所示,我们将运行映像内部的一条测试命令。 - - $ docker run trusty cat /etc/lsb-release - -[Docker GitHub Repo][2] 中有一些允许我们快速构建基本映像的事例脚本. - -### 2. 使用Scratch构建基本映像 ### - -在Docker的注册表中,有一个被称为Scratch的使用空tar文件构建的特殊库: - - $ tar cv --files-from /dev/null | docker import - scratch - -![使用scratch构建docker基本映像](http://blog.linoxide.com/wp-content/uploads/2015/03/creating-base-image-using-scratch.png) - - -我们可以使用这个映像构建新的小容器: - -FROM scratch -ADD script.sh /usr/local/bin/run.sh -CMD ["/usr/local/bin/run.sh"] - -上面的Docker文件来自一个很小的映像。这里,它首先从一个完全空的文件系统开始,然后它复制新建的/usr/local/bin/run.sh为script.sh,然后运行脚本/usr/local/bin/run.sh。 - -### 结尾 ### - -这这个教程中,我们学习了如果构建一个自定义的Docker基本映像。构建一个docker基本映像是一个很简单的任务,因为这里有很多已经可用的包和脚本。如果我们想要在里面安装想要的东西,构建docker基本映像非常有用。如果有任何疑问,建议或者反馈,请在下面的评论框中写下来。非常感谢!享受吧 :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/2-ways-create-docker-base-image/ - -作者:[Arun Pyasi][a] -译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://www.docker.com/ -[2]:https://github.com/docker/docker/blob/master/contrib/mkimage-busybox.sh \ No newline at end of file From 400a03f7e05d36d485370a2c4d4562100923f9ac Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Mon, 11 May 2015 15:01:53 +0800 Subject: [PATCH 0782/2517] =?UTF-8?q?20150511-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...k Interface Names for Ubuntu and Debian.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sources/news/20150511 Ubuntu Devs Propose Stateless Persistent Network Interface Names for Ubuntu and Debian.md diff --git a/sources/news/20150511 Ubuntu Devs Propose Stateless Persistent Network Interface Names for Ubuntu and Debian.md b/sources/news/20150511 Ubuntu Devs Propose Stateless Persistent Network Interface Names for Ubuntu and Debian.md new file mode 100644 index 0000000000..d3d8014817 --- /dev/null +++ b/sources/news/20150511 Ubuntu Devs Propose Stateless Persistent Network Interface Names for Ubuntu and Debian.md @@ -0,0 +1,31 @@ +Ubuntu Devs Propose Stateless Persistent Network Interface Names for Ubuntu and Debian +====================================================================================== +*Networks are detected in an unpredictable and unstable order* + +**Martin Pitt, a renown Ubuntu and Debian developer, came with the proposal of enabling stateless persistent network interface names in the upcoming versions of the Ubuntu Linux and Debian GNU/Linux operating systems.** + +According to Mr. Pitt, it appears that the problem lies in the automatic detection of network interfaces within the Linux kernel. As such, network interfaces are detected in an unstable and unpredictable order. However, it order to connect to a certain network interface in ifupdown or networkd users will need to identify it first using a stable name. + +"The general schema for this is to have an udev rule which does some matches to identify a particular interface, and assings a NAME="foo" to it," says Martin Pitt in an email to the Ubuntu mailinglist. "Interfaces with an explicit NAME= get called just like this, and others just get a kernel driver default, usually ethN, wlanN, or sometimes others (some wifi drivers have their own naming schemas)." + +**Sever solutions appeared over the years: mac, biosdevname, and ifnames** + +Apparently, several solutions are available for this problem, including an installation of an udev rule in /lib/udev/rules.d/75-persistent-net-generator.rules that creates a MAC address at first boot and writes it to /etc/udev/rules.d/70-persistent-net.rules, which is currently used by default in Ubuntu and applies to most hardware components. + +Other solutions include biosdevname, a package that reads port or index numbers, and slot names from the BIOS and writes them to /lib/udev/rules.d/71-biosdevname.rules, and ifnames, a persistent name generator that automatically checks the BIOS and/or firmware for index numbers or slot names, similar to biosdevname. + +However, the difference between ifnames and biosdevname is that the latter falls back to slot names, such as PCI numbers, and then to the MAC address and writes to /lib/udev/rules.d/80-net-setup-link.rules. All of these solutions can be combined, and Martin Pitt proposes to replace the first solution that is now used by default with the ifnames one. + +If a new solution is implemented, a lot of networking issues will be resolved in Ubuntu, especially the cloud version. In addition, it will provide for stable network interface names for all new Ubuntu installations, and resolve many other problems related to system-image, etc. + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Ubuntu-Devs-Propose-Stateless-Persistent-Network-Interface-Names-for-Ubuntu-and-Debian-480730.shtml + +作者:[Marius Nestor][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor From 1db7909202c1f8f153b267b5a608bfd4e12fa9b8 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 11 May 2015 15:12:22 +0800 Subject: [PATCH 0783/2517] PUB:20150124 Why does C++ promote an int to a float when a float cannot represent all int values @KayGuoWhu --- ...oat when a float cannot represent all int values.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/talk => published}/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md (93%) diff --git a/translated/talk/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md b/published/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md similarity index 93% rename from translated/talk/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md rename to published/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md index e9dd6e997c..8d0d835ad5 100644 --- a/translated/talk/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md +++ b/published/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md @@ -1,7 +1,7 @@ 既然float不能表示所有的int,那为什么在类型转换时C++将int转换成float? ---------- +============= -#问题: +###问题: 代码如下: @@ -13,7 +13,7 @@ if (i == f) // 执行某段代码 编译器会将i转换成float类型,然后比较这两个float的大小,但是float能够表示所有的int吗?为什么没有将int和float转换成double类型进行比较呢? -#回答: +###回答: 在整型数的演变中,当`int`变成`unsigned`时,会丢掉负数部分(有趣的是,这样的话,`0u < -1`就是对的了)。 @@ -32,11 +32,11 @@ if((double) i < (double) f) 顺便提一下,在这个问题中有趣的是,`unsigned`的优先级高于`int`,所以把`int`和`unsigned`进行比较时,最终进行的是unsigned类型的比较(开头提到的`0u < -1`就是这个道理)。我猜测这可能是在早些时候(计算机发展初期),当时的人们认为`unsigned`比`int`在所表示的数值范围上受到的限制更小:现在还不需要符号位,所以可以使用额外的位来表示更大的数值范围。如果你觉得`int`可能会溢出,那么就使用unsigned好了——在使用16位表示的ints时这个担心会更明显。 ---- -via:[stackoverflow](http://stackoverflow.com/questions/28010565/why-does-c-promote-an-int-to-a-float-when-a-float-cannot-represent-all-int-val/28011249#28011249) +via: [stackoverflow](http://stackoverflow.com/questions/28010565/why-does-c-promote-an-int-to-a-float-when-a-float-cannot-represent-all-int-val/28011249#28011249) 作者:[wintermute][a] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4d48e67c8ac4f3e452c06c3278fae584d57c7e66 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 11 May 2015 15:59:40 +0800 Subject: [PATCH 0784/2517] PUB:20150507 Command Line Tool to Monitor Linux Containers Performance @GOLinux --- ...to Monitor Linux Containers Performance.md | 71 +++++++++---------- 1 file changed, 32 insertions(+), 39 deletions(-) rename {translated/tech => published}/20150507 Command Line Tool to Monitor Linux Containers Performance.md (70%) diff --git a/translated/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md b/published/20150507 Command Line Tool to Monitor Linux Containers Performance.md similarity index 70% rename from translated/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md rename to published/20150507 Command Line Tool to Monitor Linux Containers Performance.md index d33e68ffd9..161e030c11 100644 --- a/translated/tech/20150507 Command Line Tool to Monitor Linux Containers Performance.md +++ b/published/20150507 Command Line Tool to Monitor Linux Containers Performance.md @@ -1,6 +1,6 @@ -监控Linux容器性能的命令行神器 +监控 Linux 容器性能的命令行神器 ================================================================================ -ctop是一个新的基于命令行的工具,它可用于在容器层级监控进程。容器通过利用控制器组(cgroup)的资源管理功能,提供了操作系统层级的虚拟化环境。该工具收集来自cgroup的与内存、CPU、块输入输出和诸如拥有者、开机时间等相关的元数据,并以人性化的格式呈现给用户,这样就可以快速对系统健康状况进行评估。基于所获得的数据,它可以尝试推测潜在的容器技术。ctop也有助于在低内存环境中检测出谁在消耗大量的内存。 +ctop是一个新的基于命令行的工具,它可用于在容器层级监控进程。容器通过利用控制器组(cgroup)的资源管理功能,提供了操作系统层级的虚拟化环境。该工具从cgroup收集与内存、CPU、块输入输出的相关数据,以及拥有者、开机时间等元数据,并以人性化的格式呈现给用户,这样就可以快速对系统健康状况进行评估。基于所获得的数据,它可以尝试推测下层的容器技术。ctop也有助于在低内存环境中检测出谁在消耗大量的内存。 ### 功能 ### @@ -8,11 +8,11 @@ ctop的一些功能如下: - 收集CPU、内存和块输入输出的度量值 - 收集与拥有者、容器技术和任务统计相关的信息 -- 使用任何栏目对信息排序 +- 通过任意栏对信息排序 - 以树状视图显示信息 - 折叠/展开cgroup树 - 选择并跟踪cgroup/容器 -- 选择显示数据刷新时间框架 +- 选择显示数据刷新的时间窗口 - 暂停刷新数据 - 检测基于systemd、Docker和LXC的容器 - 基于Docker和LXC的容器的高级特性 @@ -21,7 +21,7 @@ ctop的一些功能如下: ### 安装 ### -**ctop**是由Python写成的,因此,除了需要Python 2.6或其更高版本外(支持内建光标),别无其它外部依赖。推荐使用Python的pip进行安装,如果还没有安装pip,请先安装,然后使用pip安装ctop。 +**ctop**是由Python写成的,因此,除了需要Python 2.6或其更高版本外(带有内建的光标支持),别无其它外部依赖。推荐使用Python的pip进行安装,如果还没有安装pip,请先安装,然后使用pip安装ctop。 *注意:本文样例来自Ubuntu(14.10)系统* @@ -84,19 +84,18 @@ ctop的一些功能如下: 下面是ctop的输出样例: ![ctop screen](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop.png) -ctop屏幕 + +*ctop屏幕* ### 用法选项 ### ctop [--tree] [--refresh=] [--columns=] [--sort-col=] [--follow=] [--fold=, ...] ctop (-h | --help) -一旦你进入ctop屏幕,使用上(↑)和下(↓)箭头键在容器间导航。点击某个容器就选定了该容器,按q或Ctrl+C退出容器。 +当你进入ctop屏幕,可使用上(↑)和下(↓)箭头键在容器间导航。点击某个容器就选定了该容器,按q或Ctrl+C退出该容器。 现在,让我们来看看上面列出的那一堆选项究竟是怎么用的吧。 - -h / --help - Show the help screen - ----------- +**-h / --help - 显示帮助信息** poornima@poornima-Lenovo:~$ ctop -h Usage: ctop [options] @@ -111,72 +110,66 @@ ctop屏幕 --sort-col=SORT_COL Select column to sort by initially. Can be changed dynamically. ----------- - --tree - Display tree view of the containers +**--tree - 显示容器的树形视图** 默认情况下,会显示列表视图 -一旦你进入ctop窗口,你可以使用F5按钮在树状/列表视图间切换。 +当你进入ctop窗口,你可以使用F5按钮在树状/列表视图间切换。 - --fold= - Fold the cgroup path in the tree view. +**--fold= - 在树形视图中折叠名为 \ 的 cgroup 路径** - This option needs to be used in combination with --tree. +该选项需要与 --tree 选项组合使用。 ----------- - - Eg: ctop --tree --fold=/user.slice +例子: ctop --tree --fold=/user.slice ![Output of 'ctop --fold'](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop-fold.png) -‘ctop --fold’的输出 + +*'ctop --fold'的输出* 在ctop窗口中,使用+/-键来展开或折叠子cgroup。 注意:在写本文时,pip仓库中还没有最新版的ctop,还不支持命令行的‘--fold’选项 - --follow= - Follow/Highlight the cgroup path. +**--follow= - 跟踪/高亮 cgroup 路径** ----------- - - Eg: ctop --follow=/user.slice/user-1000.slice +例子: ctop --follow=/user.slice/user-1000.slice 正如你在下面屏幕中所见到的那样,带有“/user.slice/user-1000.slice”路径的cgroup被高亮显示,这让用户易于跟踪,就算显示位置变了也一样。 ![Output of 'ctop --follow'](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop-follow.png) -‘ctop --follow’的输出 + +*'ctop --follow'的输出* 你也可以使用‘f’按钮来让高亮的行跟踪选定的容器。默认情况下,跟踪是关闭的。 - --refresh= - Refresh the display at the given rate. Default 1 sec +**--refresh= - 按指定频率刷新显示,默认1秒** 这对于按每用户需求来显示改变刷新率时很有用。使用‘p’按钮可以暂停刷新并选择文本。 - --columns= - Can limit the display to selected . 'name' should be the first entry followed by other columns. By default, the columns include owner, processes,memory, cpu-sys, cpu-user, blkio, cpu-time. +**--columns= - 限定只显示选定的列。'name' 需要是第一个字段,其后跟着其它字段。默认情况下,字段包括:owner, processes,memory, cpu-sys, cpu-user, blkio, cpu-time** ----------- - - Eg: ctop --columns=name,owner,type,memory +例子: ctop --columns=name,owner,type,memory ![Output of 'ctop --column'](http://blog.linoxide.com/wp-content/uploads/2015/05/ctop-column.png) -‘ctop --column’的输出 - -sort-col= - column using which the displayed data should be sorted. By default it is sorted using cpu-user +*'ctop --column'的输出* ----------- +**-sort-col= - 按指定的列排序。默认使用 cpu-user 排序** - Eg: ctop --sort-col=blkio +例子: ctop --sort-col=blkio 如果有Docker和LXC支持的额外容器,跟踪选项也是可用的: - press 'a' - attach to console output + press 'a' - 接驳到终端输出 - press 'e' - open a shell in the container context + press 'e' - 打开容器中的一个 shell - press 's' – stop the container (SIGTERM) + press 's' - 停止容器 (SIGTERM) - press 'k' - kill the container (SIGKILL) + press 'k' - 杀死容器 (SIGKILL) -[ctop][1]当前还处于Jean-Tiare Le Bigot的开发中,希望我们能在该工具中见到像本地top命令一样的特性 :-) +目前 Jean-Tiare Le Bigot 还在积极开发 [ctop][1] 中,希望我们能在该工具中见到像本地 top 命令一样的特性 :-) -------------------------------------------------------------------------------- @@ -184,7 +177,7 @@ via: http://linoxide.com/how-tos/monitor-linux-containers-performance/ 作者:[B N Poornima][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From b4beba8cae2467ab9bdfd66bb3111d70707b98df Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 11 May 2015 16:53:16 +0800 Subject: [PATCH 0785/2517] =?UTF-8?q?20150511-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n Source History--Why Did Linux Succeed.md | 73 ++++ ...x Various Update Errors In Ubuntu 14.04.md | 151 +++++++ ...e CA including OCSP, CRL and revocation.md | 405 ++++++++++++++++++ 3 files changed, 629 insertions(+) create mode 100644 sources/talk/20150511 Open Source History--Why Did Linux Succeed.md create mode 100644 sources/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md create mode 100644 sources/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md diff --git a/sources/talk/20150511 Open Source History--Why Did Linux Succeed.md b/sources/talk/20150511 Open Source History--Why Did Linux Succeed.md new file mode 100644 index 0000000000..9a5a19686a --- /dev/null +++ b/sources/talk/20150511 Open Source History--Why Did Linux Succeed.md @@ -0,0 +1,73 @@ +Open Source History: Why Did Linux Succeed? +================================================================================ +> Why did Linux, the Unix-like operating system kernel started by Linus Torvalds in 1991 that became central to the open source world, succeed where so many similar projects, including GNU HURD and the BSDs, fail? + +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/05/linux.jpg) + +One of the most puzzling questions about the history of free and open source is this: Why did Linux succeed so spectacularly, whereas similar attempts to build a free or open source, Unix-like operating system kernel met with considerably less success? I don't know the answer to that question. But I have rounded up some theories, which I'd like to lay out here. + +First, though, let me make clear what I mean when I write that Linux was a great success. I am defining it in opposition primarily to the variety of other Unix-like operating system kernels, some of them open and some not, that proliferated around the time Linux was born. [GNU][1] HURD, the free-as-in-freedom kernel whose development began in [May 1991][2], is one of them. Others include Unices that most people today have never heard of, such as various derivatives of the Unix variant developed at the University of California at Berkeley, BSD; Xenix, Microsoft's take on Unix; academic Unix clones including Minix; and the original Unix developed under the auspices of AT&T, which was vitally important in academic and commercial computing circles during earlier decades, but virtually disappeared from the scene by the 1990s. + +#### Related #### + +- [Open Source History: Tracing the Origins of Hacker Culture and the Hacker Ethic][3] +- [Unix and Personal Computers: Reinterpreting the Origins of Linux][4] + +I'd also like to make clear that I'm writing here about kernels, not complete operating systems. To a great extent, the Linux kernel owes its success to the GNU project as a whole, which produced the crucial tools, including compilers, a debugger and a BASH shell implementation, that are necessary to build a Unix-like operating system. But GNU developers never created a viable version of the the HURD kernel (although they are [still trying][5]). Instead, Linux ended up as the kernel that glued the rest of the GNU pieces together, even though that had never been in the GNU plans. + +So it's worth asking why Linux, a kernel launched by Linus Torvalds, an obscure programmer in Finland, in 1991—the same year as HURD—endured and thrived within a niche where so many other Unix-like kernels, many of which enjoyed strong commercial backing and association with the leading Unix hackers of the day, failed to take off. To that end, here are a few theories pertaining to that question that I've come across as I've researched the history of the free and open source software worlds, along with the respective strengths and weaknesses of these various explanations. + +### Linux Adopted a Decentralized Development Approach ### + +This is the argument that comes out of Eric S. Raymond's essay, "[The Cathedral and the Bazaar][6]," and related works, which make the case that software develops best when a large number of contributors collaborate continuously within a relatively decentralized organizational structure. That was generally true of Linux, in contrast to, for instance, GNU HURD, which took a more centrally directed approach to code development—and, as a result, "had been evidently failing" to build a complete operating system for a decade, in Raymond's view. + +To an extent, this explanation makes sense, but it has some significant flaws. For one, Torvalds arguably assumed a more authoritative role in directing Linux code development—deciding which contributions to include and reject—than Raymond and others have wanted to recognize. For another, this reasoning does not explain why GNU succeeded in producing so much software besides a working kernel. If only decentralized development works well in the free/open source software world, then all of GNU's programming efforts should have been a bust—which they most certainly were not. + +### Linux is Pragmatic; GNU is Ideological ### + +Personally, I find this explanation—which supposes that Linux grew so rapidly because its founder was a pragmatist who initially wrote the kernel just to be able to run a tailored Unix OS on his computer at home, not as part of a crusade to change the world through free software, as the GNU project aimed to do—the most compelling. + +Still, it has some weaknesses that make it less than completely satisfying. In particular, while Torvalds himself adopted pragmatic principles, not all members of the community that coalesced around his project, then or today, have done the same. Yet, Linux has succeeded all the same. + +Moreover, if pragmatism was the key to Linux's endurance, then why, again, was GNU successful in building so many other tools besides a kernel? If having strong political beliefs about software prevents you from pursuing successful projects, GNU should have been an outright failure, not an endeavor that produced a number of software packages that remain foundational to the IT world today. + +Last but not least, many of the other Unix variants of the late 1980s and early 1990s, especially several BSD off-shoots, were the products of pragmatism. Their developers aimed to build Unix variants that could be more freely shared than those restricted by expensive commercial licenses, but they were not deeply ideological about programming or sharing code. Neither was Torvalds, and it is therefore difficult to explain Linux's success, and the failure of other Unix projects, in terms of ideological zeal. + +### Operating System Design ### + +There are technical differences between Linux and some other Unix variants that are important to keep in mind when considering the success of Linux. Richard Stallman, the founder of the GNU project, pointed to these in explaining, in an email to me, why HURD development had lagged: "It is true that the GNU Hurd is not a practical success. Part of the reason is that its basic design made it somewhat of a research project. (I chose that design thinking it was a shortcut to get a working kernel in a hurry.)" + +Linux is also different from other Unix variants in the sense that Torvalds wrote all of the Linux code himself. Having a Unix of his own, free of other people's code, was one of his stated intentions when he [first announced Linux][7] in August 1991. This characteristic sets Linux apart from most of the other Unix variants that existed at that time, which derived their code bases from either AT&T Unix or Berkeley's BSD. + +I'm not a computer scientist, so I'm not qualified to decide whether the Linux code was simply superior to that of the other Unices, explaining why Linux succeeded. But that's an argument someone might make—although it does not account for the disparity in culture and personnel between Linux and other Unix kernels, which, to me, seem more important than code in understanding Linux's success. + +### The "Community" Put Its Support Behind Linux ### + +Stallman also wrote that "mainly the reason" for Linux's success was that "Torvalds made Linux free software, and since then more of the community's effort has gone into Linux than into the Hurd." That's not exactly a complete explanation for Linux's trajectory, since it does not account for why the community of free software developers followed Torvalds instead of HURD or another Unix. But it nonetheless highlights this shift as a large part of how Linux prevailed. + +A fuller account of the free software community's decision to endorse Linux would have to explain why developers did so even though, at first, Linux was a very obscure project—much more so, by any measure, than some of the other attempts at the time to create a freer Unix, such as NET BSD and 386/BSD—as well as one whose affinity with the goals of the free software movement was not at first clear. Originally, Torvalds released Linux under a license that simply prevented its commercial use. It was considerably later that he switched to the GNU General Public License, which protects the openness of source code. + +So, those are the explanations I've found for Linux's success as an open source operating system kernel—a success which, to be sure, has been measured in some respects (desktop Linux never became what its proponents hoped, for instance). But Linux has also become foundational to the computing world in ways that no other Unix-like OS has. Maybe Apple OS X and iOS, which derive from BSD, come close, but they don't play such a central role as Linux in powering the Internet, among other things. + +Have other ideas on why Linux became what it did, or why its counterparts in the Unix world have now almost all sunk into obscurity? (I know: BSD variants still have a following today, and some commercial Unices remain important enough for [Red Hat][8] (RHT) to be [courting their users][9]. But none of these Unix holdouts have conquered everything from Web servers to smartphones in the way Linux has.) I'd be delighted to hear them. + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/050415/open-source-history-why-did-linux-succeed + +作者:[hristopher Tozzi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:http://gnu.org/ +[2]:http://www.gnu.org/software/hurd/history/hurd-announce +[3]:http://thevarguy.com/open-source-application-software-companies/042915/open-source-history-tracing-origins-hacker-culture-and-ha +[4]:http://thevarguy.com/open-source-application-software-companies/042715/unix-and-personal-computers-reinterpreting-origins-linux +[5]:http://thevarguy.com/open-source-application-software-companies/042015/30-years-hurd-lives-gnu-updates-open-source- +[6]:http://www.catb.org/esr/writings/cathedral-bazaar/cathedral-bazaar/ +[7]:https://groups.google.com/forum/#!topic/comp.os.minix/dlNtH7RRrGA[1-25] +[8]:http://www.redhat.com/ +[9]:http://thevarguy.com/open-source-application-software-companies/032614/red-hat-grants-certification-award-unix-linux-migration-a \ No newline at end of file diff --git a/sources/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md b/sources/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md new file mode 100644 index 0000000000..a84fc1b061 --- /dev/null +++ b/sources/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md @@ -0,0 +1,151 @@ +Fix Various Update Errors In Ubuntu 14.04 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/09/Fix_Ubuntu_Update_Error.jpeg) + +Who hasn’t come across an error while doing an update in Ubuntu? Update errors are common and plenty in Ubuntu and other Linux distributions based on Ubuntu. These errors occur for various reasons and can be fixed easily. In this article, we shall see various types of frequently occurring update errors in Ubuntu and how to fix them. + +### Problem With MergeList ### + +When you run update in terminal, you may encounter an error “[problem with MergeList][1]” like below: + +> E:Encountered a section with no Package: header, +> +> E:Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages, +> +> E:The package lists or status file could not be parsed or opened.’ + +To fix this error, use the following commands: + + sudo rm -r /var/lib/apt/lists/* + sudo apt-get clean && sudo apt-get update + +### Failed to download repository information -1 ### + +There are actually two types of [failed to download repository information errors][2]. If your error read like this: + +> W:Failed to fetch bzip2:/var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_oneiric_restricted_binary-i386_Packages Hash Sum mismatch, +> +> W:Failed to fetch bzip2:/var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_oneiric_multiverse_binary-i386_Packages Hash Sum mismatch, +> +> E:Some index files failed to download. They have been ignored, or old ones used instead + +Then you can use the following commands to fix it: + + sudo rm -rf /var/lib/apt/lists/* + sudo apt-get update + +### Failed to download repository information -2 ### + +Th other type of failed to download repository information error is because of outdated PPA. Usually, when you run Update Manager and see an error like this: + +![](Th other type of failed to download repository information error is because of outdated PPA. Usually, when you run Update Manager and see an error like this:) + +You can run sudo apt-get update to see what PPAs are failing. And you can remove it from the sources list. You can follow this screenshot guide to [fix failed to download repository information error][3]. + +### Failed to download package files error ### + +A similar error is [failed to download package files error][4] like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/09/Ubuntu_Update_error.jpeg) + +This can be easily fixed by changing the software sources to Main server. Go to Software & Updates and in there changed the download server to Main server: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/09/Change_server_Ubuntu.jpeg) + +### Partial upgrade error ### + +Running updates in terminal may throw this [partial upgrade error][5]: + +> Not all updates can be installed +> +> Run a partial upgrade, to install as many updates as possible + +Run the following command in terminal to fix this error: + + sudo apt-get install -f + +### error while loading shared libraries ### + +This is more of an installation error than update error. If you try to install a program from source code, you may encounter this error: + +> error while loading shared libraries: +> +> cannot open shared object file: No such file or directory + +This error can be fixed by running the following command in terminal: + + sudo /sbin/ldconfig -v + +You can find more details on this [error while loading shared libraries][6]. + +### Could not get lock /var/cache/apt/archives/lock ### + +This error happens when another program is using APT. Suppose you are installing some thing in Ubuntu Software Center and trying to run apt in terminal. + +> E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable) +> +> E: Unable to lock directory /var/cache/apt/archives/ + +Normally, this should be fine if you close all other programs using apt but if the problem persists, use the following command: + + sudo rm /var/lib/apt/lists/lock + +If the above command doesn’t work, try this command: + + sudo killall apt-get + +More details about this error can be found [here][7]. + +### GPG error: The following signatures couldn’t be verified ### + +Adding a PPA may result in the following [GPG error: The following signatures couldn’t be verified][8] when you try to run an update in terminal: + +> W: GPG error: http://repo.mate-desktop.org saucy InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68980A0EA10B4DE8 + +All we need to do is to fetch this public key in the system. Get the key number from the message. In the above message, the key is 68980A0EA10B4DE8. This key can be used in the following manner: + + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68980A0EA10B4DE8 + +Once the key has been added, run an update again and it will be fine. + +### BADSIG error ### + +Another signature related Ubuntu update error is [BADSIG error][9] which looks something like this: + +> W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://extras.ubuntu.com precise Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key +> +> W: GPG error: http://ppa.launchpad.net precise Release: +> +> The following signatures were invalid: BADSIG 4C1CBC1B69B0E2F4 Launchpad PPA for Jonathan French W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release + +To fix this BADSIG error, use the following commands in terminal: + + sudo apt-get clean + cd /var/lib/apt + sudo mv lists oldlist + sudo mkdir -p lists/partial + sudo apt-get clean + sudo apt-get update + +That compiles the list of frequent **Ubuntu update errors** you may encounter. I hope this helps you to get rid of these errors. Have you encountered any other update error in Ubuntu as well? Do mention it in comments and I’ll try to do a quick tutorial on it. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-update-errors-ubuntu-1404/ + +作者:[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://itsfoss.com/how-to-fix-problem-with-mergelist/ +[2]:http://itsfoss.com/solve-ubuntu-error-failed-to-download-repository-information-check-your-internet-connection/ +[3]:http://itsfoss.com/failed-to-download-repository-information-ubuntu-13-04/ +[4]:http://itsfoss.com/fix-failed-download-package-files-error-ubuntu/ +[5]:http://itsfoss.com/fix-partial-upgrade-error-elementary-os-luna-quick-tip/ +[6]:http://itsfoss.com/solve-open-shared-object-file-quick-tip/ +[7]:http://itsfoss.com/fix-ubuntu-install-error/ +[8]:http://itsfoss.com/solve-gpg-error-signatures-verified-ubuntu/ +[9]:http://itsfoss.com/solve-badsig-error-quick-tip/ \ No newline at end of file diff --git a/sources/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md b/sources/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md new file mode 100644 index 0000000000..f584e31f11 --- /dev/null +++ b/sources/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md @@ -0,0 +1,405 @@ +OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation +================================================================================ +These are quick and dirty notes on generating a certificate authority (CA), intermediate certificate authorities and end certificates using OpenSSL. It includes OCSP, CRL and CA Issuer information and specific issue and expiry dates. + +We'll set up our own root CA. We'll use the root CA to generate an example intermediate CA. We'll use the intermediate CA to sign end user certificates. + +### Root CA ### + +Create and move in to a folder for the root ca: + + mkdir ~/SSLCA/root/ + cd ~/SSLCA/root/ + +Generate a 8192-bit long SHA-256 RSA key for our root CA: + + openssl genrsa -aes256 -out rootca.key 8192 + +Example output: + + Generating RSA private key, 8192 bit long modulus + .........++ + ....................................................................................................................++ + e is 65537 (0x10001) + +If you want to password-protect this key, add the option `-aes256`. + +Create the self-signed root CA certificate `ca.crt`; you'll need to provide an identity for your root CA: + + openssl req -sha256 -new -x509 -days 1826 -key rootca.key -out rootca.crt + +Example output: + + You are about to be asked to enter information that will be incorporated + into your certificate request. + What you are about to enter is what is called a Distinguished Name or a DN. + There are quite a few fields but you can leave some blank + For some fields there will be a default value, + If you enter '.', the field will be left blank. + ----- + Country Name (2 letter code) [AU]:NL + State or Province Name (full name) [Some-State]:Zuid Holland + Locality Name (eg, city) []:Rotterdam + Organization Name (eg, company) [Internet Widgits Pty Ltd]:Sparkling Network + Organizational Unit Name (eg, section) []:Sparkling CA + Common Name (e.g. server FQDN or YOUR name) []:Sparkling Root CA + Email Address []: + +Create a few files where the CA will store it's serials: + + touch certindex + echo 1000 > certserial + echo 1000 > crlnumber + +Place the CA config file. This file has stubs for CRL and OCSP endpoints. + + # vim ca.conf + [ ca ] + default_ca = myca + + [ crl_ext ] + issuerAltName=issuer:copy + authorityKeyIdentifier=keyid:always + + [ myca ] + dir = ./ + new_certs_dir = $dir + unique_subject = no + certificate = $dir/rootca.crt + database = $dir/certindex + private_key = $dir/rootca.key + serial = $dir/certserial + default_days = 730 + default_md = sha1 + policy = myca_policy + x509_extensions = myca_extensions + crlnumber = $dir/crlnumber + default_crl_days = 730 + + [ myca_policy ] + commonName = supplied + stateOrProvinceName = supplied + countryName = optional + emailAddress = optional + organizationName = supplied + organizationalUnitName = optional + + [ myca_extensions ] + basicConstraints = critical,CA:TRUE + keyUsage = critical,any + subjectKeyIdentifier = hash + authorityKeyIdentifier = keyid:always,issuer + keyUsage = digitalSignature,keyEncipherment,cRLSign,keyCertSign + extendedKeyUsage = serverAuth + crlDistributionPoints = @crl_section + subjectAltName = @alt_names + authorityInfoAccess = @ocsp_section + + [ v3_ca ] + basicConstraints = critical,CA:TRUE,pathlen:0 + keyUsage = critical,any + subjectKeyIdentifier = hash + authorityKeyIdentifier = keyid:always,issuer + keyUsage = digitalSignature,keyEncipherment,cRLSign,keyCertSign + extendedKeyUsage = serverAuth + crlDistributionPoints = @crl_section + subjectAltName = @alt_names + authorityInfoAccess = @ocsp_section + + [alt_names] + DNS.0 = Sparkling Intermidiate CA 1 + DNS.1 = Sparkling CA Intermidiate 1 + + [crl_section] + URI.0 = http://pki.sparklingca.com/SparklingRoot.crl + URI.1 = http://pki.backup.com/SparklingRoot.crl + + [ocsp_section] + caIssuers;URI.0 = http://pki.sparklingca.com/SparklingRoot.crt + caIssuers;URI.1 = http://pki.backup.com/SparklingRoot.crt + OCSP;URI.0 = http://pki.sparklingca.com/ocsp/ + OCSP;URI.1 = http://pki.backup.com/ocsp/ + +If you need to set a specific certificate start / expiry date, add the following to `[myca]` + + # format: YYYYMMDDHHMMSS + default_enddate = 20191222035911 + default_startdate = 20181222035911 + +### Creating Intermediate 1 CA ### + +Generate the intermediate CA's private key: + + openssl genrsa -out intermediate1.key 4096 + +Generate the intermediate1 CA's CSR: + + openssl req -new -sha256 -key intermediate1.key -out intermediate1.csr + +Example output: + + You are about to be asked to enter information that will be incorporated + into your certificate request. + What you are about to enter is what is called a Distinguished Name or a DN. + There are quite a few fields but you can leave some blank + For some fields there will be a default value, + If you enter '.', the field will be left blank. + ----- + Country Name (2 letter code) [AU]:NL + State or Province Name (full name) [Some-State]:Zuid Holland + Locality Name (eg, city) []:Rotterdam + Organization Name (eg, company) [Internet Widgits Pty Ltd]:Sparkling Network + Organizational Unit Name (eg, section) []:Sparkling CA + Common Name (e.g. server FQDN or YOUR name) []:Sparkling Intermediate CA + Email Address []: + + Please enter the following 'extra' attributes + to be sent with your certificate request + A challenge password []: + An optional company name []: + +Make sure the subject (CN) of the intermediate is different from the root. + +Sign the intermediate1 CSR with the Root CA: + + openssl ca -batch -config ca.conf -notext -in intermediate1.csr -out intermediate1.crt + +Example Output: + + Using configuration from ca.conf + Check that the request matches the signature + Signature ok + The Subject's Distinguished Name is as follows + countryName :PRINTABLE:'NL' + stateOrProvinceName :ASN.1 12:'Zuid Holland' + localityName :ASN.1 12:'Rotterdam' + organizationName :ASN.1 12:'Sparkling Network' + organizationalUnitName:ASN.1 12:'Sparkling CA' + commonName :ASN.1 12:'Sparkling Intermediate CA' + Certificate is to be certified until Mar 30 15:07:43 2017 GMT (730 days) + + Write out database with 1 new entries + Data Base Updated + +Generate the CRL (both in PEM and DER): + + openssl ca -config ca.conf -gencrl -keyfile rootca.key -cert rootca.crt -out rootca.crl.pem + + openssl crl -inform PEM -in rootca.crl.pem -outform DER -out rootca.crl + +Generate the CRL after every certificate you sign with the CA. + +If you ever need to revoke the this intermediate cert: + + openssl ca -config ca.conf -revoke intermediate1.crt -keyfile rootca.key -cert rootca.crt + +### Configuring the Intermediate CA 1 ### + +Create a new folder for this intermediate and move in to it: + + mkdir ~/SSLCA/intermediate1/ + cd ~/SSLCA/intermediate1/ + +Copy the Intermediate cert and key from the Root CA: + + cp ~/SSLCA/root/intermediate1.key ./ + cp ~/SSLCA/root/intermediate1.crt ./ + +Create the index files: + + touch certindex + echo 1000 > certserial + echo 1000 > crlnumber + +Create a new `ca.conf` file: + + # vim ca.conf + [ ca ] + default_ca = myca + + [ crl_ext ] + issuerAltName=issuer:copy + authorityKeyIdentifier=keyid:always + + [ myca ] + dir = ./ + new_certs_dir = $dir + unique_subject = no + certificate = $dir/intermediate1.crt + database = $dir/certindex + private_key = $dir/intermediate1.key + serial = $dir/certserial + default_days = 365 + default_md = sha1 + policy = myca_policy + x509_extensions = myca_extensions + crlnumber = $dir/crlnumber + default_crl_days = 365 + + [ myca_policy ] + commonName = supplied + stateOrProvinceName = supplied + countryName = optional + emailAddress = optional + organizationName = supplied + organizationalUnitName = optional + + [ myca_extensions ] + basicConstraints = critical,CA:FALSE + keyUsage = critical,any + subjectKeyIdentifier = hash + authorityKeyIdentifier = keyid:always,issuer + keyUsage = digitalSignature,keyEncipherment + extendedKeyUsage = serverAuth + crlDistributionPoints = @crl_section + subjectAltName = @alt_names + authorityInfoAccess = @ocsp_section + + [alt_names] + DNS.0 = example.com + DNS.1 = example.org + + [crl_section] + URI.0 = http://pki.sparklingca.com/SparklingIntermidiate1.crl + URI.1 = http://pki.backup.com/SparklingIntermidiate1.crl + + [ocsp_section] + caIssuers;URI.0 = http://pki.sparklingca.com/SparklingIntermediate1.crt + caIssuers;URI.1 = http://pki.backup.com/SparklingIntermediate1.crt + OCSP;URI.0 = http://pki.sparklingca.com/ocsp/ + OCSP;URI.1 = http://pki.backup.com/ocsp/ + +Change the `[alt_names]` section to whatever you need as Subject Alternative names. Remove it including the `subjectAltName = @alt_names` line if you don't want a Subject Alternative Name. + +If you need to set a specific certificate start / expiry date, add the following to `[myca]` + + # format: YYYYMMDDHHMMSS + default_enddate = 20191222035911 + default_startdate = 20181222035911 + +Generate an empty CRL (both in PEM and DER): + + openssl ca -config ca.conf -gencrl -keyfile rootca.key -cert rootca.crt -out rootca.crl.pem + + openssl crl -inform PEM -in rootca.crl.pem -outform DER -out rootca.crl + +### Creating end user certificates ### + +We use this new intermediate CA to generate an end user certificate. Repeat these steps for every end user certificate you want to sign with this CA. + + mkdir enduser-certs + +Generate the end user's private key: + + openssl genrsa -out enduser-certs/enduser-example.com.key 4096 + +Generate the end user's CSR: + + openssl req -new -sha256 -key enduser-certs/enduser-example.com.key -out enduser-certs/enduser-example.com.csr + +Example output: + + You are about to be asked to enter information that will be incorporated + into your certificate request. + What you are about to enter is what is called a Distinguished Name or a DN. + There are quite a few fields but you can leave some blank + For some fields there will be a default value, + If you enter '.', the field will be left blank. + ----- + Country Name (2 letter code) [AU]:NL + State or Province Name (full name) [Some-State]:Noord Holland + Locality Name (eg, city) []:Amsterdam + Organization Name (eg, company) [Internet Widgits Pty Ltd]:Example Inc + Organizational Unit Name (eg, section) []:IT Dept + Common Name (e.g. server FQDN or YOUR name) []:example.com + Email Address []: + + Please enter the following 'extra' attributes + to be sent with your certificate request + A challenge password []: + An optional company name []: + +Sign the end user's CSR with the Intermediate 1 CA: + + openssl ca -batch -config ca.conf -notext -in enduser-certs/enduser-example.com.csr -out enduser-certs/enduser-example.com.crt + +Example output: + + Using configuration from ca.conf + Check that the request matches the signature + Signature ok + The Subject's Distinguished Name is as follows + countryName :PRINTABLE:'NL' + stateOrProvinceName :ASN.1 12:'Noord Holland' + localityName :ASN.1 12:'Amsterdam' + organizationName :ASN.1 12:'Example Inc' + organizationalUnitName:ASN.1 12:'IT Dept' + commonName :ASN.1 12:'example.com' + Certificate is to be certified until Mar 30 15:18:26 2016 GMT (365 days) + + Write out database with 1 new entries + Data Base Updated + +Generate the CRL (both in PEM and DER): + + openssl ca -config ca.conf -gencrl -keyfile intermediate1.key -cert intermediate1.crt -out intermediate1.crl.pem + + openssl crl -inform PEM -in intermediate1.crl.pem -outform DER -out intermediate1.crl + +Generate the CRL after every certificate you sign with the CA. + +If you ever need to revoke the this end users cert: + + openssl ca -config ca.conf -revoke enduser-certs/enduser-example.com.crt -keyfile intermediate1.key -cert intermediate1.crt + +Example output: + + Using configuration from ca.conf + Revoking Certificate 1000. + Data Base Updated + +Create the certificate chain file by concatenating the Root and intermediate 1 certificates together. + + cat ../root/rootca.crt intermediate1.crt > enduser-certs/enduser-example.com.chain + +Send the following files to the end user: + + enduser-example.com.crt + enduser-example.com.key + enduser-example.com.chain + +You can also let the end user supply their own CSR and just send them the .crt file. Do not delete that from the server, otherwise you cannot revoke it. + +### Validating the certificate ### + +You can validate the end user certificate against the chain using the following command: + + openssl verify -CAfile enduser-certs/enduser-example.com.chain enduser-certs/enduser-example.com.crt + enduser-certs/enduser-example.com.crt: OK + +You can also validate it against the CRL. Concatenate the PEM CRL and the chain together first: + + cat ../root/rootca.crt intermediate1.crt intermediate1.crl.pem > enduser-certs/enduser-example.com.crl.chain + +Verify the certificate: + + openssl verify -crl_check -CAfile enduser-certs/enduser-example.com.crl.chain enduser-certs/enduser-example.com.crt + +Output when not revoked: + + enduser-certs/enduser-example.com.crt: OK + +Output when revoked: + + enduser-certs/enduser-example.com.crt: CN = example.com, ST = Noord Holland, C = NL, O = Example Inc, OU = IT Dept + error 23 at 0 depth lookup:certificate revoked + +-------------------------------------------------------------------------------- + +via: https://raymii.org/s/tutorials/OpenSSL_command_line_Root_and_Intermediate_CA_including_OCSP_CRL%20and_revocation.html + +作者:Remy van Elst +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From 39cf8ad47e5e9122fd1a53b7c1ce3f8012626524 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 11 May 2015 17:38:10 +0800 Subject: [PATCH 0786/2517] Translating by ZTinoZ --- ...to Do After Installing Ubuntu 15.04 Desktop.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index 179aa139bd..e40612ea8f 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -1,16 +1,15 @@ -Translating by ZTinoZ -15 Things to Do After Installing Ubuntu 15.04 Desktop +安装完Ubuntu 15.04桌面后要做的15件事 ================================================================================ -This tutorial is intended for beginners and covers some basic steps on what to do after you have installed Ubuntu 15.04 “Vivid Vervet” Desktop version on your computer in order to customize the system and install basic programs for daily usage. +本教程适用于新手和在自己的电脑上安装好Ubuntu 15.04 “Vivid Vervet” 桌面之后为了自定义自己的系统并安装一些基本程序作为日常使用的已经做了一些准备的人。 ![Things to Do After Installing Ubuntu 15.04](http://www.tecmint.com/wp-content/uploads/2015/04/things-to-do-after-installing-ubuntu-15.04.jpeg) -15 Things to Do After Installing Ubuntu 15.04 +安装完Ubuntu 15.04桌面后要做的15件事 -### 1. Enable Ubuntu Extra Repositories and Update the System ### +### 1. 启用Ubuntu额外软件库并更新系统 ### -The first thing you should take care of after a fresh installation of Ubuntu is to enable Ubuntu Extra Repositories provided by official Canonical Partners and keep an up-to-date system with the last security patches and software updates. +在刚装好Ubuntu之后你应该要关心的第一件事是启用官方合作伙伴提供的Ubuntu额外软件库并且通过最近一次的安全补丁和软件更新来保持系统是最新状态。 -In order to accomplish this step, open from the left Launcher System Settings -> Software and Updates utility and check all Ubuntu Software and Other Software (Canonical Partners) repositories. After you finish hit the Close button and wait for the utility to Reload the cache sources tree. +要完成这一步,In order to accomplish this step, open from the left Launcher System Settings -> Software and Updates utility and check all Ubuntu Software and Other Software (Canonical Partners) repositories. After you finish hit the Close button and wait for the utility to Reload the cache sources tree. ![Software Updates](http://www.tecmint.com/wp-content/uploads/2015/04/Software-Updates.jpg) Software Updates @@ -26,7 +25,7 @@ For a fast and smooth update process, open a Terminal and issue the following co ![Ubuntu Upgrade](http://www.tecmint.com/wp-content/uploads/2015/04/Ubuntu-Upgrade.jpg) Ubuntu Upgrade -### 2. Install Additional Drivers ### +### 2. 安装额外驱动 ### In order for the system to scan and install additional hardware proprietary drivers, open Software and Updates utility from System Settings, go to Additional Drivers tab and wait for the utility to scan for drivers. From 5a72731082a5f197dabb0d287da4c6173fac20db Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 11 May 2015 22:35:05 +0800 Subject: [PATCH 0787/2517] PUB:20150126 iptraf--A TCP or UDP Network Monitoring Utility @DongShuaike --- ...A TCP or UDP Network Monitoring Utility.md | 65 ++++++++++++++++ ...A TCP or UDP Network Monitoring Utility.md | 77 ------------------- 2 files changed, 65 insertions(+), 77 deletions(-) create mode 100644 published/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md delete mode 100644 translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md diff --git a/published/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/published/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md new file mode 100644 index 0000000000..1fa38d9079 --- /dev/null +++ b/published/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md @@ -0,0 +1,65 @@ +iptraf:一个实用的TCP/UDP网络监控工具 +================================================================================ + +[iptraf][1]是一个基于ncurses的IP局域网监控器,用来生成包括TCP信息、UDP计数、ICMP和OSPF信息、以太网负载信息、节点状态信息、IP校验和错误等等统计数据。 + +它基于ncurses的用户界面可以使用户免于记忆繁琐的命令行开关。 + +### 特征 ### + +- IP流量监控器,用来显示你的网络中的IP流量变化信息。包括TCP标识信息、包以及字节计数,ICMP细节,OSPF包类型。 +- 简单的和详细的接口统计数据,包括IP、TCP、UDP、ICMP、非IP以及其他的IP包计数、IP校验和错误,接口活动、包大小计数。 +- TCP和UDP服务监控器,能够显示常见的TCP和UDP应用端口上发送的和接收的包的数量。 +- 局域网数据统计模块,能够发现在线的主机,并显示其上的数据活动统计信息。 +- TCP、UDP、及其他协议的显示过滤器,允许你只查看感兴趣的流量。 +- 日志功能。 +- 支持以太网、FDDI、ISDN、SLIP、PPP以及本地回环接口类型。 +- 利用Linux内核内置的原始套接字接口,允许它(指iptraf)能够用于各种支持的网卡上 +- 全屏,菜单式驱动的操作。 + +###安装方法### + +**Ubuntu以及其衍生版本** + + sudo apt-get install iptraf + +**Arch Linux以及其衍生版本** + + sudo pacman -S iptra + +**Fedora以及其衍生版本** + + sudo yum install iptraf + +### 用法 ### + +如果不加任何命令行选项地运行**iptraf**命令,程序将进入一种交互模式,通过主菜单可以访问多种功能。 + +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/iptraf_1.png) + +简易的上手导航菜单。 + +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/iptraf_2.png) + +选择要监控的接口。 + +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/iptraf_3.png) + +接口**ppp0**处的流量。 + +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/iptraf_4.png) + +试试吧! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/iptraf-tcpudp-network-monitoring-utility/ + +作者:[Enock Seth Nyamador][a] +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/seth/ +[1]:http://iptraf.seul.org/about.html diff --git a/translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md deleted file mode 100644 index 98bea48f41..0000000000 --- a/translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md +++ /dev/null @@ -1,77 +0,0 @@ - -iptraf:一个实用的TCP/UDP网络监控工具 -================================================================================ - -[iptraf][1]是一个基于ncurses(ncurses-based)的IP局域网监控器,用来生成包括TCP信息,UDP计数,ICMP和OSPF信息,以太网加载信息,结点状态信息,IP校验和错误等等统计数据。 - -它基于ncurses的用户界面帮助用户免于记忆繁琐的命令行开关。 - -### 特征 ### - -- 拥有一个IP流量监控器,用来显示你的网络中的流量变化信息。包括TCP标识信息,包以及字节计数,ICMP细节,OSPF包类型。 - -- 拥有普通和详细的交互统计数据显示了IP,TCP,UDP,ICMP,非IP以及其他的IP包计数,IP校验和错误,交互活动,包尺寸计数。(这里一些专业术语拿不定) - -- 拥有一个TCP和UDP服务监控器,能够显示普通TCP和UDP应用端口上发送的和接收的包的数量。 - -- 拥有一个局域网数据统计模块,能够检查到(discover)处于活动状态的主机,并显示其上正在运行的数据活动的统计信息。 - -- 拥有TCP,UDP,以及其他协议的显示过滤器(display filters),允许你只查看感兴趣的流量。 - -- 日志功能。 - -- 支持以太网,FDDI,ISDN,SLIP,PPP以及loopback接口类型(interface types)。 - -- 利用Linux内核内置的(built-in)原始套接字接口,允许它(指iptraf)能够用于许多种网卡上(这句话翻译不好) - -- 全屏,菜单式驱动的操作。 - -安装方法 - -### Ubuntu以及其衍生版本 ### - - sudo apt-get install iptraf - -### Arch Linux以及其衍生版本 ### - - sudo pacman -S iptra - -### Fedora以及其衍生版本 ### - - sudo yum install iptraf - -### 用法 ### - - -如果不加任何命令行选项地运行**iptraf**命令,程序将进入一种交互模式,通过主菜单可以访问多种设备(various facilities) - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_1.png) - - -简易的上手导航菜单。 - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_2.png) - -为monitor选择界面(接口)? - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_3.png) - -接口 **pp0** 处的流量。 - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_4.png) - -开始吧! - - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/iptraf-tcpudp-network-monitoring-utility/ - -作者:[Enock Seth Nyamador][a] -译者:[DongShuaike](https://github.com/DongShuaike) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/seth/ -[1]:http://iptraf.seul.org/about.html From a55240b2ead04fc4a88f36896ad4708dd01c058f Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 12 May 2015 09:35:11 +0800 Subject: [PATCH 0788/2517] [Translated]20150506 First Step Guide for Learning Shell Scripting.md --- ...Step Guide for Learning Shell Scripting.md | 460 ------------------ ...Step Guide for Learning Shell Scripting.md | 460 ++++++++++++++++++ 2 files changed, 460 insertions(+), 460 deletions(-) delete mode 100644 sources/tech/20150506 First Step Guide for Learning Shell Scripting.md create mode 100644 translated/tech/20150506 First Step Guide for Learning Shell Scripting.md diff --git a/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md b/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md deleted file mode 100644 index 270177a3de..0000000000 --- a/sources/tech/20150506 First Step Guide for Learning Shell Scripting.md +++ /dev/null @@ -1,460 +0,0 @@ -Translating by GOLinux! -First Step Guide for Learning Shell Scripting -================================================================================ -![](http://blog.linoxide.com/wp-content/uploads/2015/04/myfirstshellscript.jpg) - -Usually when people say "shell scripting" they have on mind bash, ksh, sh, ash or similar linux/unix scripting language. Scripting is another way to communicate with computer. Using graphic windows interface (not matter windows or linux) user can move mouse and clicking on the various objects like, buttons, lists, check boxes and so on. But it is very inconvenient way witch requires user participation and accuracy each time he would like to ask computer / server to do the same tasks (lets say to convert photos or download new movies, mp3 etc). To make all these things easy accessible and automated we could use shell scripts. - -Some programming languages like pascal, foxpro, C, java needs to be compiled before they could be executed. They needs appropriate compiler to make our code to do some job. - -Another programming languages like php, javascript, visualbasic do not needs compiler. So they need interpretersand we could run our program without compiling the code. - -The shell scripts is also like interpreters, but it is usually used to call external compiled programs. Then captures the outputs, exit codes and act accordingly. - -One of the most popular shell scripting language in the linux world is the bash. And i think (this is my own opinion) this is because bash shell allows user easily navigate through the history commands (previously executed) by default, in opposite ksh which requires some tuning in .profile or remember some "magic" key combination to walk through history and amend commands. - -Ok, i think this is enough for introduction and i leaving for your judge which environment is most comfortable for you. Since now i will speak only about bash and scripting. In the following examples i will use the CentOS 6.6 and bash-4.1.2. Just make sure you have the same or greater version. - -### Shell Script Streams ### - -The shell scripting it is something similar to conversation of several persons. Just imagine that all command like the persons who able to do something if you properly ask them. Lets say you would like to write the document. First of all you need the paper, then you need to say the content to someone to write it, and finally you would like to store it somewhere. Or you would like build a house, so you will ask appropriate persons to cleanup the space. After they say "its done" then other engineers could build for you the walls. And finally, when engineers also tell "Its done" you can ask the painters to color your house. And what would happen if you ask the painters coloring your walls before they are built? I think they will start to complain. Almost all commands like the persons could speak and if they did its job without any issues they speaks to "standard output". If they can't to what you asking - they speaking to the "standard error". So finally all commands listening for you through "standard input". - -Quick example- when you opening linux terminal and writing some text - you speaking to bash through "standard input". So ask the bash shell **who am i** - - root@localhost ~]# who am i <--- you speaking through the standard input to bash shell - root pts/0 2015-04-22 20:17 (192.168.1.123) <--- bash shell answering to you through the standard output - -Now lets ask something that bash will not understand us: - - [root@localhost ~]# blablabla <--- and again, you speaking through standard input - -bash: blablabla: command not found <--- bash complaining through standard error - -The first word before ":" usually is the command which complaining to you. Actually each of these streams has their own index number: - -- standard input (**stdin**) - 0 -- standard output (**stdout**) - 1 -- standard error (**stderr**) - 2 - -If you really would like to know to witch output command said something - you need to redirect (to use "greater than ">" symbol after command and stream index) that speech to file: - - [root@localhost ~]# blablabla 1> output.txt - -bash: blablabla: command not found - -In this example we tried to redirect 1 (**stdout**) stream to file named output.txt. Lets look does to the content of that file. We use the command cat for that: - - [root@localhost ~]# cat output.txt - [root@localhost ~]# - -Seams that is empty. Ok now lets try to redirect 2 (**stderr**) streem: - - [root@localhost ~]# blablabla 2> error.txt - [root@localhost ~]# - -Ok, we see that complains gone. Lets chec the file: - - [root@localhost ~]# cat error.txt - -bash: blablabla: command not found - [root@localhost ~]# - -Exactly! We see that all complains was recorded to the errors.txt file. - -Sometimes commands produces **stdout** and **stderr** simultaniously. To redirect them to separate files we can use the following syntax: - - command 1>out.txt 2>err.txt - -To shorten this syntax a bit we can skip the "1" as by default the **stdout** stream will be redirected: - - command >out.txt 2>err.txt - -Ok, lets try to do something "bad". lets remove the file1 and folder1 with the rm command: - - [root@localhost ~]# rm -vf folder1 file1 > out.txt 2>err.txt - -Now check our output files: - - [root@localhost ~]# cat out.txt - removed `file1' - [root@localhost ~]# cat err.txt - rm: cannot remove `folder1': Is a directory - [root@localhost ~]# - -As we see the streams was separated to different files. Sometimes it is not handy as usually we want to see the sequence when the errors appeared - before or after some actions. For that we can redirect both streams to the same file: - - command >>out_err.txt 2>>out_err.txt - -Note : Please notice that i use ">>" instead of ">". It allows us to append file instead of overwrite. - -We can redirect one stream to another: - - command >out_err.txt 2>&1 - -Let me explain. All stdout of the command will be redirected to the out_err.txt. The errout will be redirected to the 1-st stream which (as i already explained above) will be redirected to the same file. Let see the example: - - [root@localhost ~]# rm -fv folder2 file2 >out_err.txt 2>&1 - [root@localhost ~]# cat out_err.txt - rm: cannot remove `folder2': Is a directory - removed `file2' - [root@localhost ~]# - -Looking at the combined output we can state that first of all **rm** command tried to remove the folder2 and it was not success as linux require the **-r** key for **rm** command to allow remove folders. At the second the file2 was removed. By providing the **-v** (verbose) key for the **rm** command we asking rm command to inform as about each removed file or folder. - -This is almost all you need to know about redirection. I say almost, because there is one more very important redirection which called "piping". By using | (pipe) symbol we usually redirecting **stdout** streem. - -Lets say we have the text file: - - [root@localhost ~]# cat text_file.txt - This line does not contain H e l l o word - This lilne contains Hello - This also containd Hello - This one no due to HELLO all capital - Hello bash world! - -and we need to find the lines in it with the words "Hello". Linux has the **grep** command for that: - - [root@localhost ~]# grep Hello text_file.txt - This lilne contains Hello - This also containd Hello - Hello bash world! - [root@localhost ~]# - -This is ok when we have file and would like to sech in it. But what to do if we need to find something in the output of another command? Yes, of course we can redirect the output to the file and then look in it: - - [root@localhost ~]# fdisk -l>fdisk.out - [root@localhost ~]# grep "Disk /dev" fdisk.out - Disk /dev/sda: 8589 MB, 8589934592 bytes - Disk /dev/mapper/VolGroup-lv_root: 7205 MB, 7205814272 bytes - Disk /dev/mapper/VolGroup-lv_swap: 855 MB, 855638016 bytes - [root@localhost ~]# - -If you going to grep something with white spaces embrace that with " quotes! - -Note : fdisk command shows information about Linux OS disk drives - -As we see this way is not very handy as soon we will mess the space with temporary files. For that we can use the pipes. They allow us redirect one command **stdout** to another command **stdin** streams: - - [root@localhost ~]# fdisk -l | grep "Disk /dev" - Disk /dev/sda: 8589 MB, 8589934592 bytes - Disk /dev/mapper/VolGroup-lv_root: 7205 MB, 7205814272 bytes - Disk /dev/mapper/VolGroup-lv_swap: 855 MB, 855638016 bytes - [root@localhost ~]# - -As we see, we get the same result without any temporary files. We have redirected **frisk stdout** to the **grep stdin**. - -**Note** : Pipe redirection is always from left to right. - -There are several other redirections but we will speak about them later. - -### Displaying custom messages in the shell ### - -As we already know usually communication with and within shell is going as dialog. So lets create some real script which also will speak with us. It will allow you to learn some simple commands and better understand the scripting concept. - -Imagine we are working in some company as help desk manager and we would like to create some shell script to register the call information: phone number, User name and brief description about issue. We going to store it in the plain text file data.txt for future statistics. Script it self should work in dialog way to make live easy for help desk workers. So first of all we need to display the questions. For displaying any messages there is echo and printf commands. Both of them displaying messages, but printf is more powerful as we can nicely form output to align it to the right, left or leave dedicated space for message. Lets start from simple one. For file creation please use your favorite text editor (kate, nano, vi, ...) and create the file named note.sh with the command inside: - - echo "Phone number ?" - -### Script execution ### - -After you have saved the file we can run it with bash command by providing our file as an argument: - - [root@localhost ~]# bash note.sh - Phone number ? - -Actually to use this way for script execution is not handy. It would be more comfortable just execute the script without any **bash** command as a prefix. To make it executable we can use **chmod** command: - - [root@localhost ~]# ls -la note.sh - -rw-r--r--. 1 root root 22 Apr 23 20:52 note.sh - [root@localhost ~]# chmod +x note.sh - [root@localhost ~]# ls -la note.sh - -rwxr-xr-x. 1 root root 22 Apr 23 20:52 note.sh - [root@localhost ~]# - -![set permission script file](http://blog.linoxide.com/wp-content/uploads/2015/04/Capture.png) - -**Note** : ls command displays the files in the current folder. By adding the keys -la it will display a bit more information about files. - -As we see, before **chmod** command execution, script has only read (r) and write (w) permissions. After **chmod +x** it got execute (x) permissions. (More details about permissions i am going to describe in next article.) Now we can simply run it: - - [root@localhost ~]# ./note.sh - Phone number ? - -Before script name i have added ./ combination. . (dot) in the unix world means current position (current folder), the / (slash) is the folder separator. (In Windows OS we use \ (backslash) for the same). So whole this combination means: "from the current folder execute the note.sh script". I think it will be more clear for you if i run this script with full path: - - [root@localhost ~]# /root/note.sh - Phone number ? - [root@localhost ~]# - -It also works. - -Everything would be ok if all linux users would have the same default shell. If we simply execute this script default user shell will be used to parse script content and run the commands. Different shells have a bit different syntax, internal commands, etc. So to guarantee the **bash** will be used for our script we should add **#!/bin/bash** as the first line. In this way default user shell will call **/bin/bash** and only then will execute following shell commands in the script: - - [root@localhost ~]# cat note.sh - #!/bin/bash - echo "Phone number ?" - -Only now we will be 100% sure that **bash** will be used to parse our script content. Lets move on. - -### Reading the inputs ### - -After we have displayed the message script should wait for answer from user. There is the command **read**: - - #!/bin/bash - echo "Phone number ?" - read phone - -After execution script will wait for the user input until he press the [ENTER] key: - - [root@localhost ~]# ./note.sh - Phone number ? - 12345 <--- here is my input - [root@localhost ~]# - -Everything you have input will be stored to the variable **phone**. To display the value of variable we can use the same **echo** command: - - [root@localhost ~]# cat note.sh - #!/bin/bash - echo "Phone number ?" - read phone - echo "You have entered $phone as a phone number" - [root@localhost ~]# ./note.sh - Phone number ? - 123456 - You have entered 123456 as a phone number - [root@localhost ~]# - -In **bash** shell we using **$** (dollar) sign as variable indication, except when reading into variable and few other moments (will describe later). - -Ok, now we are ready to add the rest questions: - - #!/bin/bash - echo "Phone number?" - read phone - echo "Name?" - read name - echo "Issue?" - read issue - [root@localhost ~]# ./note.sh - Phone number? - 123 - Name? - Jim - Issue? - script is not working. - [root@localhost ~]# - -### Using stream redirection ### - -Perfect! There is left to redirect everything to the file data.txt. As a field separator we going to use / (slash) symbol. - -**Note** : You can chose any which you think is the best, bat be sure that content will not have thes symbols inside. It will cause extra fields in the line. - -Do not forget to use ">>" instead of ">" as we would like to append the output to the end of file! - - [root@localhost ~]# tail -2 note.sh - read issue - echo "$phone/$name/$issue">>data.txt - [root@localhost ~]# ./note.sh - Phone number? - 987 - Name? - Jimmy - Issue? - Keybord issue. - [root@localhost ~]# cat data.txt - 987/Jimmy/Keybord issue. - [root@localhost ~]# - -**Note** : The command **tail** displays the last **-n** lines of the file. - -Bingo. Lets run once again: - - [root@localhost ~]# ./note.sh - Phone number? - 556 - Name? - Janine - Issue? - Mouse was broken. - [root@localhost ~]# cat data.txt - 987/Jimmy/Keybord issue. - 556/Janine/Mouse was broken. - [root@localhost ~]# - -Our file is growing. Lets add the date in the front of each line. This will be useful later when playing with data while calculating statistic. For that we can use command date and give it some format as i do not like default one: - - [root@localhost ~]# date - Thu Apr 23 21:33:14 EEST 2015 <---- default output of dta command - [root@localhost ~]# date "+%Y.%m.%d %H:%M:%S" - 2015.04.23 21:33:18 <---- formated output - -There are several ways to read the command output to the variable. In this simple situation we will use ` (back quotes): - - [root@localhost ~]# cat note.sh - #!/bin/bash - now=`date "+%Y.%m.%d %H:%M:%S"` - echo "Phone number?" - read phone - echo "Name?" - read name - echo "Issue?" - read issue - echo "$now/$phone/$name/$issue">>data.txt - [root@localhost ~]# ./note.sh - Phone number? - 123 - Name? - Jim - Issue? - Script hanging. - [root@localhost ~]# cat data.txt - 2015.04.23 21:38:56/123/Jim/Script hanging. - [root@localhost ~]# - -Hmmm... Our script looks a bit ugly. Lets prettify it a bit. If you would read manual about **read** command you would find that read command also could display some messages. For this we should use -p key and message: - - [root@localhost ~]# cat note.sh - #!/bin/bash - now=`date "+%Y.%m.%d %H:%M:%S"` - read -p "Phone number: " phone - read -p "Name: " name - read -p "Issue: " issue - echo "$now/$phone/$name/$issue">>data.txt - -You can fine a lots of interesting about each command directly from the console. Just type: **man read, man echo, man date, man ....** - -Agree it looks much better! - - [root@localhost ~]# ./note.sh - Phone number: 321 - Name: Susane - Issue: Mouse was stolen - [root@localhost ~]# cat data.txt - 2015.04.23 21:38:56/123/Jim/Script hanging. - 2015.04.23 21:43:50/321/Susane/Mouse was stolen - [root@localhost ~]# - -And the cursor is right after the message (not in new line) what makes a bit sense. -Loop - -Time to improve our script. If user works all day with the calls it is not very handy to run it each time. Lets add all these actions in the never-ending loop: - - [root@localhost ~]# cat note.sh - #!/bin/bash - while true - do - read -p "Phone number: " phone - now=`date "+%Y.%m.%d %H:%M:%S"` - read -p "Name: " name - read -p "Issue: " issue - echo "$now/$phone/$name/$issue">>data.txt - done - -I have swapped **read phone** and **now=`date** lines. This is because i would like to get the time right after the phone number will be entered. If i would left it as the first line in the loop **- the** now variable will get the time right after the data was stored in the file. And it is not good as the next call could be after 20 mins or so. - - [root@localhost ~]# ./note.sh - Phone number: 123 - Name: Jim - Issue: Script still not works. - Phone number: 777 - Name: Daniel - Issue: I broke my monitor - Phone number: ^C - [root@localhost ~]# cat data.txt - 2015.04.23 21:38:56/123/Jim/Script hanging. - 2015.04.23 21:43:50/321/Susane/Mouse was stolen - 2015.04.23 21:47:55/123/Jim/Script still not works. - 2015.04.23 21:48:16/777/Daniel/I broke my monitor - [root@localhost ~]# - -NOTE: To exit from the never-ending loop you can by pressing [Ctrl]+[C] keys. Shell will display ^ as the Ctrl key. - -### Using pipe redirection ### - -Lets add more functionality to our "Frankenstein" I would like the script will display some statistic after each call. Lets say we want to see the how many times each number called us. For that we should cat the data.txt file: - - [root@localhost ~]# cat data.txt - 2015.04.23 21:38:56/123/Jim/Script hanging. - 2015.04.23 21:43:50/321/Susane/Mouse was stolen - 2015.04.23 21:47:55/123/Jim/Script still not works. - 2015.04.23 21:48:16/777/Daniel/I broke my monitor - 2015.04.23 22:02:14/123/Jimmy/New script also not working!!! - [root@localhost ~]# - -Now all this output we can redirect to the **cut** command to **cut** each line into the chunks (our delimiter "/") and print the second field: - - [root@localhost ~]# cat data.txt | cut -d"/" -f2 - 123 - 321 - 123 - 777 - 123 - [root@localhost ~]# - -Now this output we can redirect to another command to **sort**: - - [root@localhost ~]# cat data.txt | cut -d"/" -f2|sort - 123 - 123 - 123 - 321 - 777 - [root@localhost ~]# - -and leave only unique lines. To count unique entries just add **-c** key for **uniq** command: - - [root@localhost ~]# cat data.txt | cut -d"/" -f2 | sort | uniq -c - 3 123 - 1 321 - 1 777 - [root@localhost ~]# - -Just add this to end of our loop: - - #!/bin/bash - while true - do - read -p "Phone number: " phone - now=`date "+%Y.%m.%d %H:%M:%S"` - read -p "Name: " name - read -p "Issue: " issue - echo "$now/$phone/$name/$issue">>data.txt - echo "===== We got calls from =====" - cat data.txt | cut -d"/" -f2 | sort | uniq -c - echo "--------------------------------" - done - -Run it: - - [root@localhost ~]# ./note.sh - Phone number: 454 - Name: Malini - Issue: Windows license expired. - ===== We got calls from ===== - 3 123 - 1 321 - 1 454 - 1 777 - -------------------------------- - Phone number: ^C - -![running script](http://blog.linoxide.com/wp-content/uploads/2015/04/Capture11.png) - -Current scenario is going through well-known steps like: - -- Display message -- Get user input -- Store values to the file -- Do something with stored data - -But what if user has several responsibilities and he needs sometimes to input data, sometimes to do statistic calculations, or might be to find something in stored data? For that we need to implement switches / cases. In next article i will show you how to use them and how to nicely form the output. It is useful while "drawing" the tables in the shell. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-shell-script/guide-start-learning-shell-scripting-scratch/ - -作者:[Petras Liumparas][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/petrasl/ diff --git a/translated/tech/20150506 First Step Guide for Learning Shell Scripting.md b/translated/tech/20150506 First Step Guide for Learning Shell Scripting.md new file mode 100644 index 0000000000..af71b8f4ca --- /dev/null +++ b/translated/tech/20150506 First Step Guide for Learning Shell Scripting.md @@ -0,0 +1,460 @@ +Shell脚本学习初次操作指南 +================================================================================ +![](http://blog.linoxide.com/wp-content/uploads/2015/04/myfirstshellscript.jpg) + +通常,当人们提到“shell脚本语言”时,浮现在他们脑海中是bash,ksh,sh或者其它相类似的linux/unix脚本语言。脚本语言是与计算机交流的另外一种途径。使用图形化窗口界面(不管是windows还是linux都无所谓)用户可以移动鼠标并点击各种对象,比如按钮、列表、选框等等。但这种方式在每次用户想要计算机/服务器完成相同任务时(比如说批量转换照片,或者下载新的电影、mp3等)却是十分不方便。要想让所有这些事情变得简单并且自动化,我们可以使用shell脚本。 + +某些编程语言,像pascal、foxpro、C、java之类,在执行前需要先进行编译。它们需要合适的编译器来让我们的代码完成某个任务。 + +而其它一些编程语言,像php、javascript、visualbasic之类,则不需要编译器,因此它们需要解释器,而我们不需要编译代码就可以运行程序。 + +shell脚本也像解释器一样,但它通常用于调用外部已编译的程序。然后,它会捕获输出结果、退出代码并根据情况进行处理。 + +Linux世界中最为流行的shell脚本语言之一,就是bash。而我认为(这是我自己的看法)原因在于,默认情况下bash shell可以让用户便捷地通过历史命令(先前执行过的)导航,与之相反的是,ksh则要求对.profile进行一些调整,或者记住一些“魔术”组合键来查阅历史并修正命令。 + +好了,我想这些介绍已经足够了,剩下来哪个环境最适合你,就留给你自己去判断吧。从现在开始,我将只讲bash及其脚本。在下面的例子中,我将使用CentOS 6.6和bash-4.1.2。请确保你有相同版本,或者更高版本。 + +### Shell脚本流 ### + +shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象成能帮你做事的那些人,只要你用正确的方式来请求他们去做。比如说,你想要写文档。首先,你需要纸。然后,你需要把内容说给某个人听,让他帮你写。最后,你想要把它存放到某个地方。或者说,你想要造一所房子,因而你需要请合适的人来清空场地。在他们说“事情干完了”,那么另外一些工程师就可以帮你来砌墙。最后,当这些工程师们也告诉你“事情干完了”的时候,你就可以叫油漆工来给房子粉饰了。如果你让油漆工在墙砌好前就来粉饰,会发生什么呢?我想,他们会开始发牢骚了。几乎所有这些像人一样的命令都会说话,如果它们完成了工作而没有发生什么问题,那么它们就会告诉“标准输出”。如果它们不能做你叫它们做的事——它们会告诉“标准错误”。这样,最后,所有的命令都通过“标准输入”来听你的话。 + +快速实例——当你打开linux终端并写一些文本时——你正通过“标准输入”和bash说话。那么,让我们来问问bash shell **who am i**吧。 + + root@localhost ~]# who am i <--- you speaking through the standard input to bash shell + root pts/0 2015-04-22 20:17 (192.168.1.123) <--- bash shell answering to you through the standard output + +现在,让我们说一些bash听不懂的问题: + + [root@localhost ~]# blablabla <--- 哈,你又在和标准输入说话了 + -bash: blablabla: command not found <--- bash通过标准错误在发牢骚了 + +“:”之前的第一个单词通常是向你发牢骚的命令。实际上,这些流中的每一个都有它们自己的索引号: + +- 标准输入(**stdin**) - 0 +- 标准输出(**stdout**) - 1 +- 标准错误(**stderr**) - 2 + +如果你真的想要知道哪个输出命令说了些什么——你需要重定向(在命令后使用大于号“>”和流索引)那次发言到文件: + + [root@localhost ~]# blablabla 1> output.txt + -bash: blablabla: command not found + +在本例中,我们试着重定向1(**stdout**)流到名为output.txt的文件。让我们来看对该文件内容所做的事情吧,使用cat命令可以做这事: + + [root@localhost ~]# cat output.txt + [root@localhost ~]# + +看起来似乎是空的。好吧,现在让我们来重定向2(**stderr**)流: + + [root@localhost ~]# blablabla 2> error.txt + [root@localhost ~]# + +好吧,我们看到牢骚话没了。让我们检查一下那个文件: + + [root@localhost ~]# cat error.txt + -bash: blablabla: command not found + [root@localhost ~]# + +果然如此!我们看到,所有牢骚话都被记录到errors.txt文件里头去了。 + +有时候,命令会同时产生**stdout**和**stderr**。要重定向它们到不同的文件,我们可以使用以下语句: + + command 1>out.txt 2>err.txt + +要缩短一点语句,我们可以忽略“1”,因为默认情况下**stdout**会被重定向: + + command >out.txt 2>err.txt + +好吧,让我们试试做些“坏事”。让我们用rm命令把file1和folder1给删了吧: + + [root@localhost ~]# rm -vf folder1 file1 > out.txt 2>err.txt + +现在来检查以下输出文件: + + [root@localhost ~]# cat out.txt + removed `file1' + [root@localhost ~]# cat err.txt + rm: cannot remove `folder1': Is a directory + [root@localhost ~]# + +正如我们所看到的,不同的流被分离到了不同的文件。有时候,这也不似很方便,因为我们想要查看出现错误时,在某些操作前面或后面所连续发生的事情。要实现这一目的,我们可以重定向两个流到同一个文件: + + command >>out_err.txt 2>>out_err.txt + +注意:请注意,我使用“>>”替代了“>”。它允许我们附加到文件,而不是覆盖文件。 + +我们可以重定向一个流到另一个: + + command >out_err.txt 2>&1 + +让我来解释一下吧。所有命令的标准输出将被重定向到out_err.txt,错误输出将被重定向到1-st流(上面已经解释过了),而该流会被重定向到同一个文件。让我们看这个实例: + + [root@localhost ~]# rm -fv folder2 file2 >out_err.txt 2>&1 + [root@localhost ~]# cat out_err.txt + rm: cannot remove `folder2': Is a directory + removed `file2' + [root@localhost ~]# + +看着这些组合的输出,我们可以将其说明为:首先,**rm**命令试着将folder2删除,而它不会成功,因为linux要求**-r**键来允许**rm**命令删除文件夹,而第二个file2会被删除。通过为**rm**提供**-v**(详情)键,我们让rm命令告诉我们每个被删除的文件或文件夹。 + +这些就是你需要知道的,关于重定向的几乎所有内容了。我是说几乎,因为还有一个更为重要的重定向工具,它称之为“管道”。通过使用|(管道)符号,我们通常重定向**stdout**流。 + +比如说,我们有这样一个文本文件: + + [root@localhost ~]# cat text_file.txt + This line does not contain H e l l o word + This lilne contains Hello + This also containd Hello + This one no due to HELLO all capital + Hello bash world! + +而我们需要找到其中某些带有“Hello”的行,Linux中有个**grep**命令可以完成该工作: + + [root@localhost ~]# grep Hello text_file.txt + This lilne contains Hello + This also containd Hello + Hello bash world! + [root@localhost ~]# + +当我们有个文件,想要在里头搜索的时候,这用起来很不错。当如果我们需要在另一个命令的输出中查找某些东西,这又该怎么办呢?是的,当然,我们可以重定向输出到文件,然后再在文件里头查找: + + [root@localhost ~]# fdisk -l>fdisk.out + [root@localhost ~]# grep "Disk /dev" fdisk.out + Disk /dev/sda: 8589 MB, 8589934592 bytes + Disk /dev/mapper/VolGroup-lv_root: 7205 MB, 7205814272 bytes + Disk /dev/mapper/VolGroup-lv_swap: 855 MB, 855638016 bytes + [root@localhost ~]# + +如果你打算grep一些双引号引起来带有空格的内容呢! + +注意: fdisk命令显示关于Linux操作系统磁盘驱动器的信息 + +就像我们看到的,这种方式很不方便,因为我们不一会儿就把临时文件空间给搞乱了。要完成该任务,我们可以使用管道。它们允许我们重定向一个命令的**stdout**到另一个命令的**stdin**流: + + [root@localhost ~]# fdisk -l | grep "Disk /dev" + Disk /dev/sda: 8589 MB, 8589934592 bytes + Disk /dev/mapper/VolGroup-lv_root: 7205 MB, 7205814272 bytes + Disk /dev/mapper/VolGroup-lv_swap: 855 MB, 855638016 bytes + [root@localhost ~]# + +如你所见,我们不需要任何临时文件就获得了相同的结果。我们把**fdisk stdout**重定向到了**grep stdin**。 + +**注意** : 管道重定向总是从左至右的。 + +还有几个其它重定向,但是我们将把它们放在后面讲。 + +### 在shell中显示自定义信息 ### + +正如我们所知道的,通常,与shell的交流以及shell内的交流是以对话的方式进行的。因此,让我们创建一些真正的脚本吧,这些脚本也会和我们讲话。这会让你学到一些简单的命令,并对脚本的概念有一个更好的理解。 + +假设我们是某个公司的总服务台经理,我们想要创建某个shell脚本来注册呼叫信息:电话号码、用户名以及问题的简要描述。我们打算把这些信息存储到普通文本文件data.txt中,以便今后统计。脚本它自己就是以对话的方式工作,这会让总服务台的工作人员的小日子过得轻松点。那么,首先我们需要显示问题。对于现实信息,我们可以用echo和printf命令。这两个都是用来显示信息的,但是printf更为强大,因为我们可以通过它很好地格式化输出,我们可以让它右对齐、左对齐或者为信息留出专门的空间。让我们从一个简单的例子开始吧。要创建文件,请使用你喜欢的文本编辑器(kate,nano,vi,……),然后创建名为note.sh的文件,里面写入这些命令: + + echo "Phone number ?" + +### Script执行 ### + +在保存文件后,我们可以使用bash命令来运行,把我们的文件作为它的参数: + + [root@localhost ~]# bash note.sh + Phone number ? + +实际上,这样来执行脚本是很不方便的。如果不使用**bash**命令作为前缀来执行,会更舒服一些。要让脚本可执行,我们可以使用**chmod**命令: + + [root@localhost ~]# ls -la note.sh + -rw-r--r--. 1 root root 22 Apr 23 20:52 note.sh + [root@localhost ~]# chmod +x note.sh + [root@localhost ~]# ls -la note.sh + -rwxr-xr-x. 1 root root 22 Apr 23 20:52 note.sh + [root@localhost ~]# + +![set permission script file](http://blog.linoxide.com/wp-content/uploads/2015/04/Capture.png) + +**注意** : ls命令显示了当前文件夹内的文件。通过添加-la键,它会显示更多文件信息。 + +如我们所见,在**chmod**命令执行前,脚本只有读(r)和写(w)权限。在执行**chmod +x**后,它就获得了执行(x)权限。(关于权限的更多细节,我会在下一篇文章中讲述。)现在,我们只需这么来运行: + + [root@localhost ~]# ./note.sh + Phone number ? + +在脚本名前,我添加了./组合。.(点)在unix世界中意味着当前位置(当前文件夹),/(斜线)是文件夹分隔符。(在Windows系统中,我们使用\(反斜线)实现同样功能)所以,这整个组合的意思是说:“从当前文件夹执行note.sh脚本”。我想,如果我用完整路径来运行这个脚本的话,你会更加清楚一些: + + [root@localhost ~]# /root/note.sh + Phone number ? + [root@localhost ~]# + +它也能工作。 + +如果所有linux用户都有相同的默认shell,那就万事OK。如果我们只是执行该脚本,默认的用户shell就会用于解析脚本内容并运行命令。不同的shell有着一丁点不同的语法、内部命令等等,所以,为了保证我们的脚本会使用**bash**,我们应该添加**#!/bin/bash**到文件首行。这样,默认的用户shell将调用**/bin/bash**,而只有在那时候,脚本中的命令才会被执行: + + [root@localhost ~]# cat note.sh + #!/bin/bash + echo "Phone number ?" + +直到现在,我们才100%确信**bash**会用来解析我们的脚本内容。让我们继续。 + +### 读取输入 ### + +在现实信息后,脚本会等待用户回答。那儿有个**read**命令用来接收用户的回答: + + #!/bin/bash + echo "Phone number ?" + read phone + +在执行后,脚本会等待用户输入,直到用户按[ENTER]键: + + [root@localhost ~]# ./note.sh + Phone number ? + 12345 <--- 这儿是我输入的内容 + [root@localhost ~]# + +你输入的所有东西都会被存储到变量**phone**中,要显示变量的值,我们同样可以使用**echo**命令: + + [root@localhost ~]# cat note.sh + #!/bin/bash + echo "Phone number ?" + read phone + echo "You have entered $phone as a phone number" + [root@localhost ~]# ./note.sh + Phone number ? + 123456 + You have entered 123456 as a phone number + [root@localhost ~]# + +在**bash** shell中,我们使用**$**(美元)符号作为变量标示,除了读入到变量和其它为数不多的时候(将在今后说明)。 + +好了,现在我们准备添加剩下的问题了: + + #!/bin/bash + echo "Phone number?" + read phone + echo "Name?" + read name + echo "Issue?" + read issue + [root@localhost ~]# ./note.sh + Phone number? + 123 + Name? + Jim + Issue? + script is not working. + [root@localhost ~]# + +### 使用流重定向 ### + +太完美了!剩下来就是重定向所有东西到文件data.txt了。作为字段分隔符,我们将使用/(斜线)符号。 + +**注意** : 你可以选择任何你认为是最好,但是确保文件内容不会包含这些符号在内。它会导致在文本行中产生额外字段。 + +别忘了使用“>>”来代替“>”,因为我们想要将输出内容附加到文件末! + + [root@localhost ~]# tail -2 note.sh + read issue + echo "$phone/$name/$issue">>data.txt + [root@localhost ~]# ./note.sh + Phone number? + 987 + Name? + Jimmy + Issue? + Keybord issue. + [root@localhost ~]# cat data.txt + 987/Jimmy/Keybord issue. + [root@localhost ~]# + +**注意** : **tail**命令显示了文件的最后**-n**行。 + +搞定。让我们再来运行一次看看: + + [root@localhost ~]# ./note.sh + Phone number? + 556 + Name? + Janine + Issue? + Mouse was broken. + [root@localhost ~]# cat data.txt + 987/Jimmy/Keybord issue. + 556/Janine/Mouse was broken. + [root@localhost ~]# + +我们的文件在增长,让我们在每行前面加个日期吧,这对于今后摆弄这些统计数据时会很有用。要实现这功能,我们可以使用date命令,并指定某种格式,因为我不喜欢默认格式: + + [root@localhost ~]# date + Thu Apr 23 21:33:14 EEST 2015 <---- date命令的默认输出 + [root@localhost ~]# date "+%Y.%m.%d %H:%M:%S" + 2015.04.23 21:33:18 <---- 格式化后的输出 + +有几种方式可以读取命令输出到变脸,在这种简单的情况下,我们将使用`(反引号): + + [root@localhost ~]# cat note.sh + #!/bin/bash + now=`date "+%Y.%m.%d %H:%M:%S"` + echo "Phone number?" + read phone + echo "Name?" + read name + echo "Issue?" + read issue + echo "$now/$phone/$name/$issue">>data.txt + [root@localhost ~]# ./note.sh + Phone number? + 123 + Name? + Jim + Issue? + Script hanging. + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + [root@localhost ~]# + +嗯…… 我们的脚本看起来有点丑啊,让我们来美化一下。如果你要手动读取**read**命令,你会发现read命令也可以显示一些信息。要实现该功能,我们应该使用-p键加上信息: + + [root@localhost ~]# cat note.sh + #!/bin/bash + now=`date "+%Y.%m.%d %H:%M:%S"` + read -p "Phone number: " phone + read -p "Name: " name + read -p "Issue: " issue + echo "$now/$phone/$name/$issue">>data.txt + +你可以直接从控制台查找到各个命令的大量有趣的信息,只需输入:**man read, man echo, man date, man ……** + +同意吗?它看上去是好多了! + + [root@localhost ~]# ./note.sh + Phone number: 321 + Name: Susane + Issue: Mouse was stolen + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + 2015.04.23 21:43:50/321/Susane/Mouse was stolen + [root@localhost ~]# + +光标在消息的后面(不是在新的一行中),这有点意思。 + +循环 + +是时候来改进我们的脚本了。如果用户一整天都在接电话,如果每次都要去运行,这岂不是很麻烦?让我们让这些活动都永无止境地循环去吧: + + [root@localhost ~]# cat note.sh + #!/bin/bash + while true + do + read -p "Phone number: " phone + now=`date "+%Y.%m.%d %H:%M:%S"` + read -p "Name: " name + read -p "Issue: " issue + echo "$now/$phone/$name/$issue">>data.txt + done + +我已经交换了**read phone**和**now=`date`**行。这是因为我想要在输入电话号码后再获得时间。如果我把它放在循环**- the**的首行,变量就会在数据存储到文件中后获得时间。而这并不好,因为下一次呼叫可能在20分钟后,甚至更晚。 + + [root@localhost ~]# ./note.sh + Phone number: 123 + Name: Jim + Issue: Script still not works. + Phone number: 777 + Name: Daniel + Issue: I broke my monitor + Phone number: ^C + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + 2015.04.23 21:43:50/321/Susane/Mouse was stolen + 2015.04.23 21:47:55/123/Jim/Script still not works. + 2015.04.23 21:48:16/777/Daniel/I broke my monitor + [root@localhost ~]# + +注意: 要从无限循环中退出,你可以按[Ctrl]+[C]键。Shell会显示^表示Ctrl键。 + +### 使用管道重定向 ### + +让我们添加更多功能到我们的“弗兰肯斯坦”,我想要脚本在每次呼叫后显示某个统计数据。比如说,我想要查看各个号码呼叫了我几次。对于这个,我们应该cat文件data.txt: + + [root@localhost ~]# cat data.txt + 2015.04.23 21:38:56/123/Jim/Script hanging. + 2015.04.23 21:43:50/321/Susane/Mouse was stolen + 2015.04.23 21:47:55/123/Jim/Script still not works. + 2015.04.23 21:48:16/777/Daniel/I broke my monitor + 2015.04.23 22:02:14/123/Jimmy/New script also not working!!! + [root@localhost ~]# + +现在,所有输出我们都可以重定向到**cut**命令,让**cut**来把每行切成一块一块(我们使用分隔符“/”),然后打印第二个字段: + + [root@localhost ~]# cat data.txt | cut -d"/" -f2 + 123 + 321 + 123 + 777 + 123 + [root@localhost ~]# + +现在,我们可以把这个输出重定向打另外一个命令**sort**: + + [root@localhost ~]# cat data.txt | cut -d"/" -f2|sort + 123 + 123 + 123 + 321 + 777 + [root@localhost ~]# + +然后只留下唯一的行。要统计唯一条目,只需添加**-c**键到**uniq**命令: + + [root@localhost ~]# cat data.txt | cut -d"/" -f2 | sort | uniq -c + 3 123 + 1 321 + 1 777 + [root@localhost ~]# + +只要把这个添加到我们的循环的最后: + + #!/bin/bash + while true + do + read -p "Phone number: " phone + now=`date "+%Y.%m.%d %H:%M:%S"` + read -p "Name: " name + read -p "Issue: " issue + echo "$now/$phone/$name/$issue">>data.txt + echo "===== We got calls from =====" + cat data.txt | cut -d"/" -f2 | sort | uniq -c + echo "--------------------------------" + done + +运行: + + [root@localhost ~]# ./note.sh + Phone number: 454 + Name: Malini + Issue: Windows license expired. + ===== We got calls from ===== + 3 123 + 1 321 + 1 454 + 1 777 + -------------------------------- + Phone number: ^C + +![running script](http://blog.linoxide.com/wp-content/uploads/2015/04/Capture11.png) + +当前场景贯穿了几个熟知的步骤: + +- 显示消息 +- 获取用户输入 +- 存储值到文件 +- 处理存储的数据 + +但是,如果用户有点责任心,他有时候需要输入数据,有时候需要统计,或者可能要在存储的数据中查找一些东西呢?对于这些事情,我们需要使用switches/cases,并知道怎样来很好地格式化输出。这对于在shell中“画”表格的时候很有用。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-shell-script/guide-start-learning-shell-scripting-scratch/ + +作者:[Petras Liumparas][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/petrasl/ From 79ccf10a76bf692a08e6f7515b9574ebd9253d4b Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Tue, 12 May 2015 11:59:44 +0800 Subject: [PATCH 0789/2517] Translating by H-mudcup --- ...29 Synfig Studio 1.0--Open Source Animation Gets Serious.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md b/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md index 70f76b418c..326593d7a3 100644 --- a/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md +++ b/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md @@ -1,3 +1,4 @@ +Translating by H-mudcup Synfig Studio 1.0 — Open Source Animation Gets Serious ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/synfig-free-animations-750x467.jpg) @@ -38,4 +39,4 @@ via: http://www.omgubuntu.co.uk/2015/04/synfig-studio-new-release-features [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:http://sourceforge.net/projects/synfig/files/releases/1.0/linux/synfigstudio_1.0_amd64.deb/download -[2]:http://sourceforge.net/projects/synfig/files/releases/1.0/linux/synfigstudio_1.0_x86.deb/download \ No newline at end of file +[2]:http://sourceforge.net/projects/synfig/files/releases/1.0/linux/synfigstudio_1.0_x86.deb/download From 232d893ebf3bc688bee2003d91b0232a4598dfdf Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Tue, 12 May 2015 13:01:17 +0800 Subject: [PATCH 0790/2517] establish translated file --- ...basics terminology http headers and caching strategies.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md diff --git a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md new file mode 100644 index 0000000000..e149266918 --- /dev/null +++ b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md @@ -0,0 +1,5 @@ +WebHTTPͷͻ +===================================================================== + +### + From 31791014e16249daa659640185bd618bfbaa6b23 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 12 May 2015 15:05:54 +0800 Subject: [PATCH 0791/2517] PUB:20150227 Bringing a Bunch of Best Known Linux Network Tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc 这篇文字介绍的东西不错,可惜原文写的太差了,而且错误百出。实在是翻译辛苦你了。 --- ...Bunch of Best Known Linux Network Tools.md | 120 ++++++++++-------- 1 file changed, 67 insertions(+), 53 deletions(-) rename {translated/tech => published}/20150227 Bringing a Bunch of Best Known Linux Network Tools.md (65%) diff --git a/translated/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md b/published/20150227 Bringing a Bunch of Best Known Linux Network Tools.md similarity index 65% rename from translated/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md rename to published/20150227 Bringing a Bunch of Best Known Linux Network Tools.md index 112147414a..892ba048d0 100644 --- a/translated/tech/20150227 Bringing a Bunch of Best Known Linux Network Tools.md +++ b/published/20150227 Bringing a Bunch of Best Known Linux Network Tools.md @@ -1,18 +1,18 @@ -领略一些最著名的 Linux 网络工具 +一大波你可能不知道的 Linux 网络工具 ================================================================================ -在你的系统上使用命令行工具来监控你的网络是非常实用的,并且对于 Linux 用户来说,有着许许多多现成的工具可以使用,如 nethogs, ntopng, nload, iftop, iptraf, bmon, slurm, tcptrack, cbm, netwatch, collectl, trafshow, cacti, etherape, ipband, jnettop, netspeed 以及 speedometer。 +如果要在你的系统上监控网络,那么使用命令行工具是非常实用的,并且对于 Linux 用户来说,有着许许多多现成的工具可以使用,如: nethogs, ntopng, nload, iftop, iptraf, bmon, slurm, tcptrack, cbm, netwatch, collectl, trafshow, cacti, etherape, ipband, jnettop, netspeed 以及 speedometer。 鉴于世上有着许多的 Linux 专家和开发者,显然还存在其他的网络监控工具,但在这篇教程中,我不打算将它们所有包括在内。 -上面列出的工具都有着自己的独特之处,但归根结底,它们都做着监控网络流量的工作,且并不是只有一种方法来完成这件事。例如 nethogs 可以被用来展示每个进程的带宽使用情况,以防你想知道究竟是哪个应用在消耗了你的整个网络资源; iftop 可以被用来展示每个套接字连接的带宽使用情况,而 像 nload 这类的工具可以帮助你得到有关整个带宽的信息。 +上面列出的工具都有着自己的独特之处,但归根结底,它们都做着监控网络流量的工作,只是通过各种不同的方法。例如 nethogs 可以被用来展示每个进程的带宽使用情况,以防你想知道究竟是哪个应用在消耗了你的整个网络资源; iftop 可以被用来展示每个套接字连接的带宽使用情况,而像 nload 这类的工具可以帮助你得到有关整个带宽的信息。 ### 1) nethogs ### -nethogs 是一个免费的工具,当要查找哪个 PID (注:即 process identifier,进程 ID) 给你的网络流量带来了麻烦时,它是非常方便的。它按每个进程来组织带宽,而不是像大多数的工具那样按照每个协议或每个子网来划分流量。它功能丰富,同时支持 IPv4 和 IPv6,并且我认为,若你想在你的 Linux 主机上确定哪个程序正消耗着你的全部带宽,它是来做这件事的最佳的程序。 +nethogs 是一个免费的工具,当要查找哪个 PID (注:即 process identifier,进程 ID) 给你的网络流量带来了麻烦时,它是非常方便的。它按每个进程来分组带宽,而不是像大多数的工具那样按照每个协议或每个子网来划分流量。它功能丰富,同时支持 IPv4 和 IPv6,并且我认为,若你想在你的 Linux 主机上确定哪个程序正消耗着你的全部带宽,它是来做这件事的最佳的程序。 -一个 Linux 用户可以使用 **nethogs** 来显示每个进程的 TCP 下载和上传速率,使用命令 **nethogs eth0** 来监控一个特定的设备,上面的 eth0 是那个你想获取信息的设备的名称,你还可以得到有关正在被传输的数据的传输速率的信息。 +一个 Linux 用户可以使用 **nethogs** 来显示每个进程的 TCP 下载和上传速率,可以使用命令 **nethogs eth0** 来监控一个指定的设备,上面的 eth0 是那个你想获取信息的设备的名称,你还可以得到有关正在传输的数据的传输速率信息。 -对我而言, nethogs 是非常容易使用的,或许是因为我非常喜欢它以至于我总是在我的 Ubuntu 12.04 LTS 机器中使用它来监控我的网络带宽。 +对我而言, nethogs 是非常容易使用的,或许是因为我非常喜欢它,以至于我总是在我的 Ubuntu 12.04 LTS 机器中使用它来监控我的网络带宽。 例如要想使用混杂模式来嗅探,可以像下面展示的命令那样使用选项 -p: @@ -20,6 +20,8 @@ nethogs 是一个免费的工具,当要查找哪个 PID (注:即 process ide 假如你想更多地了解 nethogs 并深入探索它,那么请毫不犹豫地阅读我们做的关于这个网络带宽监控工具的整个教程。 +(LCTT 译注:关于 nethogs 的更多信息可以参考:https://linux.cn/article-2808-1.html ) + ### 2) nload ### nload 是一个控制台应用,可以被用来实时地监控网络流量和带宽使用情况,它还通过提供两个简单易懂的图表来对流量进行可视化。这个绝妙的网络监控工具还可以在监控过程中切换被监控的设备,而这可以通过按左右箭头来完成。 @@ -28,19 +30,21 @@ nload 是一个控制台应用,可以被用来实时地监控网络流量和 正如你在上面的截图中所看到的那样,由 nload 提供的图表是非常容易理解的。nload 提供了有用的信息,也展示了诸如被传输数据的总量和最小/最大网络速率等信息。 -而更酷的是你可以在下面的命令的帮助下运行 nload 这个工具,这个命令是非常的短小且易记的: +而更酷的是你只需要直接运行 nload 这个工具就行,这个命令是非常的短小且易记的: nload 我很确信的是:我们关于如何使用 nload 的详细教程将帮助到新的 Linux 用户,甚至可以帮助那些正寻找关于 nload 信息的老手。 +(LCTT 译注:关于 nload 的更新信息可以参考:https://linux.cn/article-5114-1.html ) + ### 3) slurm ### -slurm 是另一个 Linux 网络负载监控工具,它以一个不错的 ASCII 图来显示结果,它还支持许多键值用以交互,例如 **c** 用来切换到经典模式, **s** 切换到分图模式, **r** 用来重绘屏幕, **L** 用来启用 TX/RX(注:TX,发送流量;RX,接收流量) LED,**m** 用来在经典分图模式和大图模式之间进行切换, **q** 退出 slurm。 +slurm 是另一个 Linux 网络负载监控工具,它以一个不错的 ASCII 图来显示结果,它还支持许多按键用以交互,例如 **c** 用来切换到经典模式, **s** 切换到分图模式, **r** 用来重绘屏幕, **L** 用来启用 TX/RX 灯(注:TX,发送流量;RX,接收流量) ,**m** 用来在经典分图模式和大图模式之间进行切换, **q** 退出 slurm。 ![linux network load monitoring tools](http://blog.linoxide.com/wp-content/uploads/2013/12/slurm2.png) -在网络负载监控工具 slurm 中,还有许多其它的键值可用,你可以很容易地使用下面的命令在 man 手册中学习它们。 +在网络负载监控工具 slurm 中,还有许多其它的按键可用,你可以很容易地使用下面的命令在 man 手册中学习它们。 man slurm @@ -48,11 +52,11 @@ slurm 在 Ubuntu 和 Debian 的官方软件仓库中可以找到,所以使用 sudo apt-get install slurm -我们已经在一个教程中对 slurm 的使用做了介绍,所以请访问相关网页( 注:应该指的是[这篇文章](http://linoxide.com/ubuntu-how-to/monitor-network-load-slurm-tool/) ),并不要忘记和其它使用 Linux 的朋友分享这些知识。 +我们已经在一个[教程](http://linoxide.com/ubuntu-how-to/monitor-network-load-slurm-tool/)中对 slurm 的使用做了介绍,不要忘记和其它使用 Linux 的朋友分享这些知识。 ### 4) iftop ### -当你想在一个接口上按照主机来展示带宽使用情况时,iftop 是一个非常有用的工具。根据 man 手册,**iftop** 在一个已命名的接口或在它可以找到的第一个接口(假如没有任何特殊情况,它就像一个外部的接口)上监听网络流量,并且展示出一个表格来显示当前一对主机间的带宽使用情况。 +当你想显示连接到网卡上的各个主机的带宽使用情况时,iftop 是一个非常有用的工具。根据 man 手册,**iftop** 在一个指定的接口或在它可以找到的第一个接口(假如没有任何特殊情况,它应该是一个对外的接口)上监听网络流量,并且展示出一个表格来显示当前的一对主机间的带宽使用情况。 通过在虚拟终端中使用下面的命令,Ubuntu 和 Debian 用户可以在他们的机器中轻易地安装 iftop: @@ -61,6 +65,8 @@ slurm 在 Ubuntu 和 Debian 的官方软件仓库中可以找到,所以使用 在你的机器上,可以使用下面的命令通过 yum 来安装 iftop: yum -y install iftop + +(LCTT 译注:关于 nload 的更多信息请参考:https://linux.cn/article-1843-1.html ) ### 5) collectl ### @@ -69,7 +75,7 @@ collectl 可以被用来收集描述当前系统状态的数据,并且它支 - 记录模式 - 回放模式 -**记录模式** 允许从一个正在运行的系统中读取数据,然后将这些数据要么显示在终端中,要么写入一个或多个文件或套接字中。 +**记录模式** 允许从一个正在运行的系统中读取数据,然后将这些数据要么显示在终端中,要么写入一个或多个文件或一个套接字中。 **回放模式** @@ -79,13 +85,15 @@ Ubuntu 和 Debian 用户可以在他们的机器上使用他们默认的包管 sudo apt-get install collectl -还可以使用下面的命令来安装 collectl, 因为对于这些发行版本(注:这里指的是用 yum 作为包管理器的发行版本),在它们官方的软件仓库中也含有 collectl: +还可以使用下面的命令来安装 collectl, 因为对于这些发行版本(注:这里指的是用 yum 作为包管理器的发行版本),在它们官方的软件仓库中也含有 collectl: yum install collectl + +(LCTT 译注:关于 collectl 的更多信息请参考: https://linux.cn/article-3154-1.html ) ### 6) Netstat ### -Netstat 是一个用来监控**传入和传出的网络数据包统计数据**和接口统计数据的命令行工具。它为传输控制协议 TCP (包括上传和下行),路由表,及一系列的网络接口(网络接口控制器或者软件定义的网络接口) 和网络协议统计数据展示网络连接情况。 +Netstat 是一个用来监控**传入和传出的网络数据包统计数据**的接口统计数据命令行工具。它会显示 TCP 连接 (包括上传和下行),路由表,及一系列的网络接口(网卡或者SDN接口)和网络协议统计数据。 Ubuntu 和 Debian 用户可以在他们的机器上使用默认的包管理器来安装 netstat。Netsta 软件被包括在 net-tools 软件包中,并可以在 shell 或虚拟终端中运行下面的命令来安装它: @@ -107,6 +115,8 @@ CentOS, Fedora, RHEL 用户可以在他们的机器上使用默认的包管理 ![man netstat](http://blog.linoxide.com/wp-content/uploads/2015/02/man-netstat.png) +(LCTT 译注:关于 netstat 的更多信息请参考:https://linux.cn/article-2434-1.html ) + ### 7) Netload ### netload 命令只展示一个关于当前网络荷载和自从程序运行之后传输数据总的字节数目的简要报告,它没有更多的功能。它是 netdiag 软件的一部分。 @@ -115,9 +125,9 @@ netload 命令只展示一个关于当前网络荷载和自从程序运行之后 # yum install netdiag -Netload 在默认仓库中作为 netdiag 的一部分可以被找到,我们可以轻易地使用下面的命令来利用 **apt** 包管理器安装 **netdiag**: +Netload 是默认仓库中 netdiag 的一部分,我们可以轻易地使用下面的命令来利用 **apt** 包管理器安装 **netdiag**: - $ sudo apt-get install netdiag (注:这里原文为 sudo install netdiag,应该加上 apt-get) + $ sudo apt-get install netdiag 为了运行 netload,我们需要确保选择了一个正在工作的网络接口的名称,如 eth0, eh1, wlan0, mon0等,然后在 shell 或虚拟终端中运行下面的命令: @@ -127,21 +137,23 @@ Netload 在默认仓库中作为 netdiag 的一部分可以被找到,我们可 ### 8) Nagios ### -Nagios 是一个领先且功能强大的开源监控系统,它使得网络或系统管理员在服务器相关的问题影响到服务器的主要事务之前,鉴定并解决这些问题。 有了 Nagios 系统,管理员便可以在一个单一的窗口中监控远程的 Linux 、Windows 系统、交换机、路由器和打印机等。它显示出重要的警告并指示出在你的网络或服务器中是否出现某些故障,这间接地帮助你在问题发生之前,着手执行补救行动。 +Nagios 是一个领先且功能强大的开源监控系统,它使得网络或系统管理员可以在服务器的各种问题影响到服务器的主要事务之前,发现并解决这些问题。 有了 Nagios 系统,管理员便可以在一个单一的窗口中监控远程的 Linux 、Windows 系统、交换机、路由器和打印机等。它会显示出重要的警告并指出在你的网络或服务器中是否出现某些故障,这可以间接地帮助你在问题发生前就着手执行补救行动。 Nagios 有一个 web 界面,其中有一个图形化的活动监视器。通过浏览网页 http://localhost/nagios/ 或 http://localhost/nagios3/ 便可以登录到这个 web 界面。假如你在远程的机器上进行操作,请使用你的 IP 地址来替换 localhost,然后键入用户名和密码,我们便会看到如下图所展示的信息: ![在 Chromium 浏览器中的 Nagios3](http://blog.linoxide.com/wp-content/uploads/2015/02/nagios3-ubuntu.png) +(LCTT 译注:关于 Nagios 的更多信息请参考:https://linux.cn/article-2436-1.html ) + ### 9) EtherApe ### -EtherApe 是一个针对 Unix 的图形化网络监控工具,它仿照了 etherman 软件。它具有链路层,IP 和 TCP 模式并支持 Ethernet, FDDI, Token Ring, ISDN, PPP, SLIP 及 WLAN 设备等接口,再加上支持一些封装的格式。主机和链接随着流量大小和被着色的协议名称展示而变化。它可以过滤要展示的流量,并可从一个文件或运行的网络中读取数据报。 +EtherApe 是一个针对 Unix 的图形化网络监控工具,它仿照了 etherman 软件。它支持链路层、IP 和 TCP 等模式,并支持以太网, FDDI, 令牌环, ISDN, PPP, SLIP 及 WLAN 设备等接口,以及一些封装格式。主机和连接随着流量和协议而改变其尺寸和颜色。它可以过滤要展示的流量,并可从一个文件或运行的网络中读取数据包。 在 CentOS、Fedora、RHEL 等 Linux 发行版本中安装 etherape 是一件容易的事,因为在它们的官方软件仓库中就可以找到 etherape。我们可以像下面展示的命令那样使用 yum 包管理器来安装它: yum install etherape -我们可以使用下面的命令在 Ubuntu、Debian 及它们的衍生发行版本中使用 **apt** 包管理器来安装 EtherApe : +我们也可以使用下面的命令在 Ubuntu、Debian 及它们的衍生发行版本中使用 **apt** 包管理器来安装 EtherApe : sudo apt-get install etherape @@ -149,13 +161,13 @@ EtherApe 是一个针对 Unix 的图形化网络监控工具,它仿照了 ethe sudo etherape -然后, **etherape** 的 **图形用户界面** 便会被执行。接着,在菜单上面的 **捕捉** 选项下,我们可以选择 **模式**(IP,链路层,TCP) 和 **接口**。一切设定完毕后,我们需要点击 **开始** 按钮。接着我们便会看到类似下面截图的东西: +然后, **etherape** 的 **图形用户界面** 便会被执行。接着,在菜单上面的 **捕捉** 选项下,我们可以选择 **模式**(IP,链路层,TCP) 和 **接口**。一切设定完毕后,我们需要点击 **开始** 按钮。接着我们便会看到类似下面截图的东西: ![EtherApe](http://blog.linoxide.com/wp-content/uploads/2015/02/etherape.png) ### 10) tcpflow ### -tcpflow 是一个命令行工具,它可以捕捉作为 TCP 连接(流)的一部分的传输数据,并以一种方便协议分析或除错的方式来存储数据。它重建了实际的数据流并将每个流存储在不同的文件中,以备日后的分析。它理解 TCP 序列号并可以正确地重建数据流,不管是在重发或乱序发送状态下。 +tcpflow 是一个命令行工具,它可以捕捉 TCP 连接(流)的部分传输数据,并以一种方便协议分析或除错的方式来存储数据。它重构了实际的数据流并将每个流存储在不同的文件中,以备日后的分析。它能识别 TCP 序列号并可以正确地重构数据流,不管是在重发还是乱序发送状态下。 通过 **apt** 包管理器在 Ubuntu 、Debian 系统中安装 tcpflow 是很容易的,因为默认情况下在官方软件仓库中可以找到它。 @@ -175,7 +187,7 @@ tcpflow 是一个命令行工具,它可以捕捉作为 TCP 连接(流)的一 # yum install --nogpgcheck http://pkgs.repoforge.org/tcpflow/tcpflow-0.21-1.2.el6.rf.i686.rpm -我们可以使用 tcpflow 来捕捉全部或部分 tcp 流量并以一种简单的方式把它们写到一个可读文件中。下面的命令执行着我们想要做的事情,但我们需要在一个空目录中运行下面的命令,因为它将创建诸如 x.x.x.x.y-a.a.a.a.z 格式的文件,做完这些之后,只需按 Ctrl-C 便可停止这个命令。 +我们可以使用 tcpflow 来捕捉全部或部分 tcp 流量,并以一种简单的方式把它们写到一个可读的文件中。下面的命令就可以完成这个事情,但我们需要在一个空目录中运行下面的命令,因为它将创建诸如 x.x.x.x.y-a.a.a.a.z 格式的文件,运行之后,只需按 Ctrl-C 便可停止这个命令。 $ sudo tcpflow -i eth0 port 8000 @@ -183,49 +195,51 @@ tcpflow 是一个命令行工具,它可以捕捉作为 TCP 连接(流)的一 ### 11) IPTraf ### -[IPTraf][2] 是一个针对 Linux 平台的基于控制台的网络统计应用。它生成一系列的图形,如 TCP 连接包和字节的数目、接口信息和活动指示器、 TCP/UDP 流量故障以及 LAN 状态包和字节的数目。 +[IPTraf][2] 是一个针对 Linux 平台的基于控制台的网络统计应用。它生成一系列的图形,如 TCP 连接的包/字节计数、接口信息和活动指示器、 TCP/UDP 流量故障以及局域网内设备的包/字节计数。 在默认的软件仓库中可以找到 IPTraf,所以我们可以使用下面的命令通过 **apt** 包管理器轻松地安装 IPTraf: $ sudo apt-get install iptraf -在默认的软件仓库中可以找到 IPTraf,所以我们可以使用下面的命令通过 **yum** 包管理器轻松地安装 IPTraf: +我们可以使用下面的命令通过 **yum** 包管理器轻松地安装 IPTraf: # yum install iptraf -我们需要以管理员权限来运行 IPTraf(注:这里原文写错为 TPTraf),并带有一个可用的网络接口名。这里,我们的网络接口名为 wlan2,所以我们使用 wlan2 来作为接口的名称: +我们需要以管理员权限来运行 IPTraf,并带有一个有效的网络接口名。这里,我们的网络接口名为 wlan2,所以我们使用 wlan2 来作为参数: - $ sudo iptraf wlan2 (注:这里原文为 sudo iptraf,应该加上 wlan2) + $ sudo iptraf wlan2 ![IPTraf](http://blog.linoxide.com/wp-content/uploads/2015/02/iptraf.png) -开始一般的网络接口统计,键入: +开始通常的网络接口统计,键入: # iptraf -g -为了在一个名为 eth0 的接口设备上看详细的统计信息,使用: +查看接口 eth0 的详细统计信息,使用: - # iptraf -d wlan2 (注:这里的 wlan2 和 上面的 eth0 不一致,下面的几句也是这种情况,请相应地改正) + # iptraf -d eth0 -为了看一个名为 eth0 的接口的 TCP 和 UDP 监控,使用: +查看接口 eth0 的 TCP 和 UDP 监控信息,使用: - # iptraf -z wlan2 + # iptraf -z eth0 -为了展示在一个名为 eth0 的接口上的包的大小和数目,使用: +查看接口 eth0 的包的大小和数目,使用: - # iptraf -z wlan2 + # iptraf -z eth0 -注意:请将上面的 wlan2 替换为你的接口名称。你可以通过运行`ip link show`命令来检查你的接口。 +注意:请将上面的 eth0 替换为你的接口名称。你可以通过运行`ip link show`命令来检查你的接口。 + +(LCTT 译注:关于 iptraf 的更多详细信息请参考:https://linux.cn/article-5430-1.html ) ### 12) Speedometer ### -Speedometer 是一个小巧且简单的工具,它只绘出一幅包含有通过某个给定端口的上行、下行流量的好看的图。 +Speedometer 是一个小巧且简单的工具,它只用来绘出一幅包含有通过某个给定端口的上行、下行流量的好看的图。 在默认的软件仓库中可以找到 Speedometer ,所以我们可以使用下面的命令通过 **yum** 包管理器轻松地安装 Speedometer: # yum install speedometer -在默认的软件仓库中可以找到 Speedometer ,所以我们可以使用下面的命令通过 **apt** 包管理器轻松地安装 Speedometer: +我们可以使用下面的命令通过 **apt** 包管理器轻松地安装 Speedometer: $ sudo apt-get install speedometer @@ -239,15 +253,15 @@ Speedometer 可以简单地通过在 shell 或虚拟终端中执行下面的命 ### 13) Netwatch ### -Netwatch 是 netdiag 工具集里的一部分,并且它也显示出当前主机和其他远程主机的连接情况,以及在每个连接中数据传输的速率。 +Netwatch 是 netdiag 工具集里的一部分,它也显示当前主机和其他远程主机的连接情况,以及在每个连接中数据传输的速率。 我们可以使用 yum 在 fedora 中安装 Netwatch,因为它在 fedora 的默认软件仓库中。但若你运行着 CentOS 或 RHEL , 我们需要安装 [rpmforge 软件仓库][3]。 # yum install netwatch -Netwatch 作为 netdiag 的一部分可以在默认的软件仓库中找到,所以我们可以轻松地使用下面的命令来利用 **apt** 包管理器安装 **netdiag**: +Netwatch 是 netdiag 的一部分,可以在默认的软件仓库中找到,所以我们可以轻松地使用下面的命令来利用 **apt** 包管理器安装 **netdiag**: - $ sudo apt-get install netdiag(注:这里应该加上 apt-get + $ sudo apt-get install netdiag 为了运行 netwatch, 我们需要在虚拟终端或 shell 中执行下面的命令: @@ -259,15 +273,15 @@ Netwatch 作为 netdiag 的一部分可以在默认的软件仓库中找到, ### 14) Trafshow ### -Trafshow 同 netwatch 和 pktstat(注:这里原文中多了一个 trafshow)一样,可以报告当前激活的连接里使用的协议和每个连接中数据传输的速率。它可以使用 pcap 类型的滤波器来筛选出特定的连接。 +Trafshow 同 netwatch 和 pktstat 一样,可以报告当前活动的连接里使用的协议和每个连接中数据传输的速率。它可以使用 pcap 类型的过滤器来筛选出特定的连接。 -我们可以使用 yum 在 fedora 中安装 trafshow(注:这里原文为 Netwatch,应该为 trafshow),因为它在 fedora 的默认软件仓库中。但若你正运行着 CentOS 或 RHEL , 我们需要安装 [rpmforge 软件仓库][4]。 +我们可以使用 yum 在 fedora 中安装 trafshow ,因为它在 fedora 的默认软件仓库中。但若你正运行着 CentOS 或 RHEL , 我们需要安装 [rpmforge 软件仓库][4]。 # yum install trafshow Trafshow 在默认仓库中可以找到,所以我们可以轻松地使用下面的命令来利用 **apt** 包管理器安装它: - $ sudo apt-get install trafshow(注:原文少了 apt-get) + $ sudo apt-get install trafshow 为了使用 trafshow 来执行监控任务,我们需要在虚拟终端或 shell 中执行下面的命令: @@ -275,7 +289,7 @@ Trafshow 在默认仓库中可以找到,所以我们可以轻松地使用下 ![Trafshow](http://blog.linoxide.com/wp-content/uploads/2015/02/trafshow-all.png) -为了特别地监控 tcp 连接,如下面一样添加上 tcp 参数: +为了专门监控 tcp 连接,如下面一样添加上 tcp 参数: $ sudo trafshow -i wlan2 tcp @@ -285,7 +299,7 @@ Trafshow 在默认仓库中可以找到,所以我们可以轻松地使用下 ### 15) Vnstat ### -与大多数的其他工具相比,Vnstat 有一点不同。实际上它运行一个后台服务或守护进程,并时刻记录着传输数据的大小。另外,它可以被用来生成一个带有网络使用历史记录的报告。 +与大多数的其他工具相比,Vnstat 有一点不同。实际上它运行着一个后台服务或守护进程,并时刻记录着传输数据的大小。另外,它可以被用来生成一个网络使用历史记录的报告。 我们需要开启 EPEL 软件仓库,然后运行 **yum** 包管理器来安装 vnstat。 @@ -301,7 +315,7 @@ Vnstat 在默认软件仓库中可以找到,所以我们可以使用下面的 ![vnstat](http://blog.linoxide.com/wp-content/uploads/2015/02/vnstat.png) -为了实时地监控带宽使用情况,使用 ‘-l’ 选项(实时模式)。然后它将以一种非常精确的方式来展示被上行和下行数据所使用的带宽总量,但不会显示任何有关主机连接或进程的内部细节。 +为了实时地监控带宽使用情况,使用 ‘-l’ 选项(live 模式)。然后它将以一种非常精确的方式来展示上行和下行数据所使用的带宽总量,但不会显示任何有关主机连接或进程的内部细节。 $ vnstat -l @@ -313,7 +327,7 @@ Vnstat 在默认软件仓库中可以找到,所以我们可以使用下面的 ### 16) tcptrack ### -[tcptrack][5] 可以展示 TCP 连接的状态,它在一个给定的网络端口上进行监听。tcptrack 监控它们的状态并展示出一个经过排列且不断更新的有关来源/目标地址、带宽使用情况等信息的列表,这与 **top** 命令的输出非常类似 。 +[tcptrack][5] 可以展示 TCP 连接的状态,它在一个给定的网络端口上进行监听。tcptrack 监控它们的状态并展示出排序且不断更新的列表,包括来源/目标地址、带宽使用情况等信息,这与 **top** 命令的输出非常类似 。 鉴于 tcptrack 在软件仓库中,我们可以轻松地在 Debian、Ubuntu 系统中从软件仓库使用 **apt** 包管理器来安装 tcptrack。为此,我们需要在 shell 或虚拟终端中执行下面的命令: @@ -329,7 +343,7 @@ Vnstat 在默认软件仓库中可以找到,所以我们可以使用下面的 注:这里我们下载了 rpmforge-release 的当前最新版本,即 0.5.3-1,你总是可以从 rpmforge 软件仓库中下载其最新版本,并请在上面的命令中替换为你下载的版本。 -**tcptrack** 需要以 root 权限或超级用户身份来运行。执行 tcptrack 时,我们需要带上那个我们想监视的网络接口 TCP 连接状况的接口名称。这里我们的接口名称为 wlan2,所以如下面这样使用: +**tcptrack** 需要以 root 权限或超级用户身份来运行。执行 tcptrack 时,我们需要带上要监视的网络接口 TCP 连接状况的接口名称。这里我们的接口名称为 wlan2,所以如下面这样使用: sudo tcptrack -i wlan2 @@ -345,7 +359,7 @@ Vnstat 在默认软件仓库中可以找到,所以我们可以使用下面的 ### 17) CBM ### -CBM 或 Color Bandwidth Meter 可以展示出当前所有网络设备的流量使用情况。这个程序是如此的简单,以至于应该可以从它的名称中看出其功能。CBM 的源代码和新版本可以在 [http://www.isotton.com/utils/cbm/][7] 上找到。 +CBM ( Color Bandwidth Meter) 可以展示出当前所有网络设备的流量使用情况。这个程序是如此的简单,以至于都可以从它的名称中看出其功能。CBM 的源代码和新版本可以在 [http://www.isotton.com/utils/cbm/][7] 上找到。 鉴于 CBM 已经包含在软件仓库中,我们可以简单地使用 **apt** 包管理器从 Debian、Ubuntu 的软件仓库中安装 CBM。为此,我们需要在一个 shell 窗口或虚拟终端中运行下面的命令: @@ -359,7 +373,7 @@ CBM 或 Color Bandwidth Meter 可以展示出当前所有网络设备的流量 ### 18) bmon ### -[Bmon][8] 或 Bandwidth Monitoring ,是一个用于调试和实时监控带宽的工具。这个工具能够检索各种输入模块的统计数据。它提供了多种输出方式,包括一个基于 curses 库的界面,轻量级的HTML输出,以及 ASCII 输出格式。 +[Bmon][8] ( Bandwidth Monitoring) ,是一个用于调试和实时监控带宽的工具。这个工具能够检索各种输入模块的统计数据。它提供了多种输出方式,包括一个基于 curses 库的界面,轻量级的HTML输出,以及 ASCII 输出格式。 bmon 可以在软件仓库中找到,所以我们可以通过使用 apt 包管理器来在 Debian、Ubuntu 中安装它。为此,我们需要在一个 shell 窗口或虚拟终端中运行下面的命令: @@ -373,7 +387,7 @@ bmon 可以在软件仓库中找到,所以我们可以通过使用 apt 包管 ### 19) tcpdump ### -[TCPDump][9] 是一个用于网络监控和数据获取的工具。它可以为我们节省很多的时间,并可用来调试网络或服务器 的相关问题。它打印出在某个网络接口上与布尔表达式匹配的数据包所包含的内容的一个描述。 +[TCPDump][9] 是一个用于网络监控和数据获取的工具。它可以为我们节省很多的时间,并可用来调试网络或服务器的相关问题。它可以打印出在某个网络接口上与布尔表达式相匹配的数据包所包含的内容的一个描述。 tcpdump 可以在 Debian、Ubuntu 的默认软件仓库中找到,我们可以简单地以 sudo 权限使用 apt 包管理器来安装它。为此,我们需要在一个 shell 窗口或虚拟终端中运行下面的命令: @@ -389,7 +403,6 @@ tcpdump 需要以 root 权限或超级用户来运行,我们需要带上我们 ![tcpdump](http://blog.linoxide.com/wp-content/uploads/2015/02/tcpdump.png) - 假如你只想监视一个特定的端口,则可以运行下面的命令。下面是一个针对 80 端口(网络服务器)的例子: $ sudo tcpdump -i wlan2 'port 80' @@ -419,14 +432,15 @@ tcpdump 需要以 root 权限或超级用户来运行,我们需要带上我们 ### 结论 ### -在第一部分中(注:我认为原文多了 first 这个单词,总之是前后文的内容有些不连贯),我们介绍了一些在 Linux 下的网络负载监控工具,这对于系统管理员甚至是新手来说,都是很有帮助的。在这篇文章中介绍的每一个工具都有其特点,不同的选项等,但最终它们都可以帮助你来监控你的网络流量。 +在这篇文章中,我们介绍了一些在 Linux 下的网络负载监控工具,这对于系统管理员甚至是新手来说,都是很有帮助的。在这篇文章中介绍的每一个工具都具有其特点,不同的选项等,但最终它们都可以帮助你来监控你的网络流量。 + -------------------------------------------------------------------------------- via: http://linoxide.com/monitoring-2/network-monitoring-tools-linux/ 作者:[Bobbin Zachariah][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From aae9077f8621763d4fe572ccad29849230e32f00 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 12 May 2015 16:22:07 +0800 Subject: [PATCH 0792/2517] =?UTF-8?q?20150512-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...A Drop-Down Terminal for Gnome Desktops.md | 115 +++ ... Manage 'Suse' Linux Package Management.md | 826 ++++++++++++++++++ ...me, Load Average and RAM Usage in Linux.md | 96 ++ ... To Run Docker Client Inside Windows OS.md | 107 +++ ...w to view torrent file content on Linux.md | 63 ++ 5 files changed, 1207 insertions(+) create mode 100644 sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md create mode 100644 sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md create mode 100644 sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md create mode 100644 sources/tech/20150512 How To Run Docker Client Inside Windows OS.md create mode 100644 sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md diff --git a/sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md b/sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md new file mode 100644 index 0000000000..40adc3390c --- /dev/null +++ b/sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md @@ -0,0 +1,115 @@ +Guake 0.7.0 Released – A Drop-Down Terminal for Gnome Desktops +================================================================================ +Linux commandline is the best and most powerful thing that fascinates a new user and provides extreme power to experienced users and geeks. For those who work on Server and Production, they are already aware of this fact. It would be interesting to know that Linux console was one of those first features of the kernel that was written by Linus Torvalds way back in the year 1991. + +Terminal is a powerful tool that is very reliable as it does not have any movable part. Terminal serves as an intermediate between console and GUI environment. Terminal themselves are GUI application that run on top of a desktop environment. There are a lot of terminal application some of which are Desktop Environment specific and rest are universal. Terminator, Konsole, Gnome-Terminal, Terminology, XFCE terminal, xterm are a few terminal emulators to name. + +You may get a list of most widely used Terminal Emulator follow the below link. + +- [20 Useful Terminals for Linux][1] + +Last day while surfing web, I came across a terminal namely ‘guake‘ which is a terminal for gnome. Though this is not the first time I have learned about Guake. I’d known this application nearly one year ago but somehow I could not write on this and later it was out of my mind until I heard it again. So finally the article is here. We will be taking you to Guake features, installation on Debian, Ubuntu and Fedora followed by quick testing. + +#### What is Guake? #### + +Guake is a Drop Down Terminal for Gnome Environment. Written from scratch mostly in Python and a little in C this application is released under GPLv2+ and is available for Linux and alike systems. Guake is inspired by a console in computer game Quake which slides down from the top by pressing a specially Key (Default is F12) and then slides-up when the same key is pressed. + +Important to mention that Guake is not the first of this kind. Yakuake which stands for Yet Another Kuake, a terminal emulator for KDE Desktop Environment and Tilda which is a GTK+ terminal Emulator are also inspired by the same slide up/down console of computer game Quake. + +#### Features of Guake #### + +- Lightweight +- Simple Easy and Elegant +- Functional +- Powerful +- Good Looking +- Smooth integration of terminal into GUI +- Appears when you call and disappear once you are done by pressing a predefined hot key +- Support for hotkeys, tabs, background transparency makes it a brilliant application, must for every Gnome User. +- Extremely configurable +- Plenty of color palette included, fixed and recognized +- Shortcut for transparency level +- Run a script when Guake starts via Guake Preferences. +- Able to run on more than one monitor + +Guake 0.7.0 was released recently, which brings numerous fixes as well as some new features as discussed above. For complete Guake 0.7.0 changelog and source tarball packages can be found [Here][2]. + +### Installing Guake Terminal in Linux ### + +If you are interested in compiling Guake from source you may download the source from the link above, build it yourself before installing. + +However Guake is available to be installed on most of the distributions from repository or by adding an additional repository. Here, we will be installing Guake on Debian, Ubuntu, Linux Mint and Fedora systems. + +First get the latest software package list from the repository and then install Guake from the default repository as shown below. + + ---------------- On Debian, Ubuntu and Linux Mint ---------------- + $ sudo apt-get update + $ apt-get install guake + +---------- + + ---------------- On Fedora 19 Onwards ---------------- + # yum update + # yum install guake + +After installation, start the Guake from another terminal as: + + $ guake + +After starting it, use F12 (Default) to roll down and roll up the terminal on your Gnome Desktop. + +Seems very beautiful specially the transparent background. Roll down… Roll up… Roll down… Roll up…. run command. Open another tab run command… Roll up… Roll down… + +![Guake Terminal in Action](http://www.tecmint.com/wp-content/uploads/2015/05/Guake.png) +Guake Terminal in Action + +If your wallpaper or working windows color don’t match you may like to change your wallpaper or reduce the transparency of the Guake terminal color. + +Next is to look into Guake Properties to edit settings as per requirements. Run Guake Preferences either by running it from Application Menu or by running the below command. + + $ guake --preferences + +![Guake Terminal Properties](http://www.tecmint.com/wp-content/uploads/2015/05/Guake-Properties.png) +Guake Terminal Properties + +Scrolling Properties.. + +![Guake Scrolling Settings](http://www.tecmint.com/wp-content/uploads/2015/05/Guake-Scrolling.png) +Guake Scrolling Settings + +Appearance Properties – Here you can modify text and background color as well as tune transparency. + +![Appearance Properties](http://www.tecmint.com/wp-content/uploads/2015/05/Appearance-Properties.png) +Appearance Properties + +Keyboard Shortcuts – Here you may edit and Modify Toggle key for Guage Visibility (default is F12). + +![Keyboard Shortcuts](http://www.tecmint.com/wp-content/uploads/2015/05/Keyboard-Shortcuts.png) +Keyboard Shortcuts + +Compatibility Setting – Perhaps you won’t need to edit it. + +![Compatibility Setting](http://www.tecmint.com/wp-content/uploads/2015/05/Compatibility-Setting.png) +Compatibility Setting + +### Conclusion ### + +This Project is not too young and not too old, hence has reached certain level of maturity and is quiet solid and works out of the box. For someone like me who need to switch between GUI and Console very often Guake is a boon. I don’t need to manage an extra window, open and close frequently, use tab among a huge pool of opened applications to find terminal or switch to different workspace to manage terminal now all I need is F12. + +I think this is a must tool for any Linux user who makes use of GUI and Console at the same time, equally. I am going to recommend it to anyone who want to work on a system where interaction between GUI and Console is smooth and hassle free. + +That’s all for now. Let us know if there is any problem in installing and running. We will be here to help you. Also tell us your’s experience about Guake. Provide us with your valuable feedback in the comments below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-guake-terminal-ubuntu-mint-fedora/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/linux-terminal-emulators/ +[2]:https://github.com/Guake/guake/releases/tag/0.7.0 \ No newline at end of file diff --git a/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md b/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md new file mode 100644 index 0000000000..8468a26986 --- /dev/null +++ b/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md @@ -0,0 +1,826 @@ +45 Zypper Commands to Manage ‘Suse’ Linux Package Management +================================================================================ +SUSE (Software and System Entwicklung (Germany) meaning Software and System Development, in English) Linux lies on top of Linux Kernel brought by Novell. SUSE comes in two pack. One of them is called OpenSUSE, which is freely available (free as in speech as well as free as in wine). It is a community driven project packed with latest application support, the latest stable release of OpenSUSE Linux is 13.2. + +The other is SUSE Linux Enterprise which is a commercial Linux Distribution designed specially for enterprise and production. SUSE Linux Enterprise edition comes with a variety of Enterprise Applications and features suited for production environment, the latest stable release of SUSE Linux Enterprise Edition is 12. + +You may like to check the detailed installation instruction of SUSE Linux Enterprise Server at: + +- [Installation of SUSE Linux Enterprise Server 12][1] + +Zypper and YaST are the Package Manager for SUSE Linux, which works on top of RPM. + +YaST which stands for Yet another Setup Tool is a tool that works on OpenSUSE and SUSE Enterprise edition to administer, setup and configure SUSE Linux. + +Zypper is the command line interface of ZYpp package manager for installing, removing and updating SUSE. ZYpp is the package management engine that powers both Zypper and YaST. + +Here in this article we will see Zypper in action, which will be installing, updating, removing and doing every other thing a package manager can do. Here we go… + +**Important** : Remember all these command are meant for system wide changes hence must be run as root, else the command will fail. + +### Getting Basic Help with Zypper ### + +1. Run zypper without any option, will give you a list of all global options and commands. + + # zypper + + Usage: + zypper [--global-options] + +2. To get help on a specific command say ‘in’ (install), run the below commands. + + # zypper help in + OR + # zypper help install + + install (in) [options] ... + + Install packages with specified capabilities or RPM files with specified + location. A capability is NAME[.ARCH][OP], where OP is one + of <, <=, =, >=, >. + + Command options: + --from Select packages from the specified repository. + -r, --repo Load only the specified repository. + -t, --type Type of package (package, patch, pattern, product, srcpackage). + Default: package. + -n, --name Select packages by plain name, not by capability. + -C, --capability Select packages by capability. + -f, --force Install even if the item is already installed (reinstall), + downgraded or changes vendor or architecture. + --oldpackage Allow to replace a newer item with an older one. + Handy if you are doing a rollback. Unlike --force + it will not enforce a reinstall. + --replacefiles Install the packages even if they replace files from other, + already installed, packages. Default is to treat file conflicts + as an error. --download-as-needed disables the fileconflict check. + ...... + +3. Search for a package (say gnome-desktop) before installing. + + # zypper se gnome-desktop + + Retrieving repository 'openSUSE-13.2-Debug' metadata ............................................................[done] + Building repository 'openSUSE-13.2-Debug' cache .................................................................[done] + Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ......................................................... [done] + Building repository 'openSUSE-13.2-Non-Oss' cache ...............................................................[done] + Retrieving repository 'openSUSE-13.2-Oss' metadata ..............................................................[done] + Building repository 'openSUSE-13.2-Oss' cache ...................................................................[done] + Retrieving repository 'openSUSE-13.2-Update' metadata ...........................................................[done] + Building repository 'openSUSE-13.2-Update' cache ................................................................[done] + Retrieving repository 'openSUSE-13.2-Update-Non-Oss' metadata ...................................................[done] + Building repository 'openSUSE-13.2-Update-Non-Oss' cache ........................................................[done] + Loading repository data... + Reading installed packages... + + S | Name | Summary | Type + --+---------------------------------------+-----------------------------------------------------------+----------- + | gnome-desktop2-lang | Languages for package gnome-desktop2 | package + | gnome-desktop2 | The GNOME Desktop API Library | package + | libgnome-desktop-2-17 | The GNOME Desktop API Library | package + | libgnome-desktop-3-10 | The GNOME Desktop API Library | package + | libgnome-desktop-3-devel | The GNOME Desktop API Library -- Development Files | package + | libgnome-desktop-3_0-common | The GNOME Desktop API Library -- Common data files | package + | gnome-desktop-debugsource | Debug sources for package gnome-desktop | package + | gnome-desktop-sharp2-debugsource | Debug sources for package gnome-desktop-sharp2 | package + | gnome-desktop2-debugsource | Debug sources for package gnome-desktop2 | package + | libgnome-desktop-2-17-debuginfo | Debug information for package libgnome-desktop-2-17 | package + | libgnome-desktop-3-10-debuginfo | Debug information for package libgnome-desktop-3-10 | package + | libgnome-desktop-3_0-common-debuginfo | Debug information for package libgnome-desktop-3_0-common | package + | libgnome-desktop-2-17-debuginfo-32bit | Debug information for package libgnome-desktop-2-17 | package + | libgnome-desktop-3-10-debuginfo-32bit | Debug information for package libgnome-desktop-3-10 | package + | gnome-desktop-sharp2 | Mono bindings for libgnome-desktop | package + | libgnome-desktop-2-devel | The GNOME Desktop API Library -- Development Files | package + | gnome-desktop-lang | Languages for package gnome-desktop | package + | libgnome-desktop-2-17-32bit | The GNOME Desktop API Library | package + | libgnome-desktop-3-10-32bit | The GNOME Desktop API Library | package + | gnome-desktop | The GNOME Desktop API Library | srcpackage + +4. Get information on a pattern package (say lamp_server) using following command. + + # zypper info -t pattern lamp_server + + Loading repository data... + Reading installed packages... + + + Information for pattern lamp_server: + ------------------------------------ + Repository: openSUSE-13.2-Update + Name: lamp_server + Version: 20141007-5.1 + Arch: x86_64 + Vendor: openSUSE + Installed: No + Visible to User: Yes + Summary: Web and LAMP Server + Description: + Software to set up a Web server that is able to serve static, dynamic, and interactive content (like a Web shop). This includes Apache HTTP Server, the database management system MySQL, + and scripting languages such as PHP, Python, Ruby on Rails, or Perl. + Contents: + + S | Name | Type | Dependency + --+-------------------------------+---------+----------- + | apache2-mod_php5 | package | + | php5-iconv | package | + i | patterns-openSUSE-base | package | + i | apache2-prefork | package | + | php5-dom | package | + | php5-mysql | package | + i | apache2 | package | + | apache2-example-pages | package | + | mariadb | package | + | apache2-mod_perl | package | + | php5-ctype | package | + | apache2-doc | package | + | yast2-http-server | package | + | patterns-openSUSE-lamp_server | package | + +5. To open zypper shell session run the below command. + + # zypper shell + OR + # zypper sh + + zypper> help + Usage: + zypper [--global-options] + +**Note**: On Zypper shell type ‘help‘ to get a list of global options and commands. + +### Zypper Repository Management ### + +#### Listing Defined Repositories #### + +6. Use zypper repos or zypper lr commands to list all the defined repositories. + + # zypper repos + OR + # zypper lr + + | Alias | Name | Enabled | Refresh + --+---------------------------+------------------------------------+---------+-------- + 1 | openSUSE-13.2-0 | openSUSE-13.2-0 | Yes | No + 2 | repo-debug | openSUSE-13.2-Debug | Yes | Yes + 3 | repo-debug-update | openSUSE-13.2-Update-Debug | No | Yes + 4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No | Yes + 5 | repo-non-oss | openSUSE-13.2-Non-Oss | Yes | Yes + 6 | repo-oss | openSUSE-13.2-Oss | Yes | Yes + 7 | repo-source | openSUSE-13.2-Source | No | Yes + 8 | repo-update | openSUSE-13.2-Update | Yes | Yes + 9 | repo-update-non-oss | openSUSE-13.2-Update-Non-Oss | Yes | Yes + +7. List zypper URI on the table. + + # zypper lr -u + + # | Alias | Name | Enabled | Refresh | URI + --+---------------------------+------------------------------------+---------+---------+---------------------------------------------------------------- + 1 | openSUSE-13.2-0 | openSUSE-13.2-0 | Yes | No | cd:///?devices=/dev/disk/by-id/ata-VBOX_CD-ROM_VB2-01700376 + 2 | repo-debug | openSUSE-13.2-Debug | Yes | Yes | http://download.opensuse.org/debug/distribution/13.2/repo/oss/ + 3 | repo-debug-update | openSUSE-13.2-Update-Debug | No | Yes | http://download.opensuse.org/debug/update/13.2/ + 4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No | Yes | http://download.opensuse.org/debug/update/13.2-non-oss/ + 5 | repo-non-oss | openSUSE-13.2-Non-Oss | Yes | Yes | http://download.opensuse.org/distribution/13.2/repo/non-oss/ + 6 | repo-oss | openSUSE-13.2-Oss | Yes | Yes | http://download.opensuse.org/distribution/13.2/repo/oss/ + 7 | repo-source | openSUSE-13.2-Source | No | Yes | http://download.opensuse.org/source/distribution/13.2/repo/oss/ + 8 | repo-update | openSUSE-13.2-Update | Yes | Yes | http://download.opensuse.org/update/13.2/ + 9 | repo-update-non-oss | openSUSE-13.2-Update-Non-Oss | Yes | Yes | http://download.opensuse.org/update/13.2-non-oss/ + +8. List repository priority and list by priority. + + # zypper lr -P + + # | Alias | Name | Enabled | Refresh | Priority + --+---------------------------+------------------------------------+---------+---------+--------- + 1 | openSUSE-13.2-0 | openSUSE-13.2-0 | Yes | No | 99 + 2 | repo-debug | openSUSE-13.2-Debug | Yes | Yes | 99 + 3 | repo-debug-update | openSUSE-13.2-Update-Debug | No | Yes | 99 + 4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No | Yes | 99 + 5 | repo-non-oss | openSUSE-13.2-Non-Oss | Yes | Yes | 85 + 6 | repo-oss | openSUSE-13.2-Oss | Yes | Yes | 99 + 7 | repo-source | openSUSE-13.2-Source | No | Yes | 99 + 8 | repo-update | openSUSE-13.2-Update | Yes | Yes | 99 + 9 | repo-update-non-oss | openSUSE-13.2-Update-Non-Oss | Yes | Yes | 99 + +#### Refreshing Repositories #### + +9. Use commands zypper refresh or zypper ref to refresh zypper repositories. + + # zypper refresh + OR + # zypper ref + + Repository 'openSUSE-13.2-0' is up to date. + Repository 'openSUSE-13.2-Debug' is up to date. + Repository 'openSUSE-13.2-Non-Oss' is up to date. + Repository 'openSUSE-13.2-Oss' is up to date. + Repository 'openSUSE-13.2-Update' is up to date. + Repository 'openSUSE-13.2-Update-Non-Oss' is up to date. + All repositories have been refreshed. + +10. To refresh a specific repository say ‘repo-non-oss‘, type: + + # zypper refresh repo-non-oss + + Repository 'openSUSE-13.2-Non-Oss' is up to date. + Specified repositories have been refreshed. + +11. To force update a repository say ‘repo-non-oss‘, type: + + # zypper ref -f repo-non-oss + + Forcing raw metadata refresh + Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ............................................................[done] + Forcing building of repository cache + Building repository 'openSUSE-13.2-Non-Oss' cache ............................................................[done] + Specified repositories have been refreshed. + +#### Modifying Repositories #### + +Here, we use ‘zypper modifyrepo‘ or ‘zypper mr‘ commands to disable, enable zypper repositories. + +12. Before disabling repository, you must know that in Zypper, every repository has its own unique number, that is used to disable or enable a repository. + +Let’s say you want to disable repository ‘repo-oss‘, to disable first you need to its number by typing following command. + + # zypper lr + + # | Alias | Name | Enabled | Refresh + --+---------------------------+------------------------------------+---------+-------- + 1 | openSUSE-13.2-0 | openSUSE-13.2-0 | Yes | No + 2 | repo-debug | openSUSE-13.2-Debug | Yes | Yes + 3 | repo-debug-update | openSUSE-13.2-Update-Debug | No | Yes + 4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No | Yes + 5 | repo-non-oss | openSUSE-13.2-Non-Oss | Yes | Yes + 6 | repo-oss | openSUSE-13.2-Oss | No | Yes + 7 | repo-source | openSUSE-13.2-Source | No | Yes + 8 | repo-update | openSUSE-13.2-Update | Yes | Yes + 9 | repo-update-non-oss | openSUSE-13.2-Update-Non-Oss | Yes | Yes + +Do you see in the above output, that the repository ‘repo-oss‘ having number 6, to disable this you need to specify number 6 along with following command. + + # zypper mr -d 6 + + Repository 'repo-oss' has been successfully disabled. + +13. To enable again same repository ‘repo-oss‘, which appears at number 6 (as shown in above example). + + # zypper mr -e 6 + + Repository 'repo-oss' has been successfully enabled. + +14. Enable auto-refresh and rpm file ‘caching‘ for a repo say ‘repo-non-oss‘ and set its priority to say 85. + + # zypper mr -rk -p 85 repo-non-oss + + Repository 'repo-non-oss' priority has been left unchanged (85) + Nothing to change for repository 'repo-non-oss'. + +15. Disable rpm file caching for all the repositories. + + # zypper mr -Ka + + RPM files caching has been disabled for repository 'openSUSE-13.2-0'. + RPM files caching has been disabled for repository 'repo-debug'. + RPM files caching has been disabled for repository 'repo-debug-update'. + RPM files caching has been disabled for repository 'repo-debug-update-non-oss'. + RPM files caching has been disabled for repository 'repo-non-oss'. + RPM files caching has been disabled for repository 'repo-oss'. + RPM files caching has been disabled for repository 'repo-source'. + RPM files caching has been disabled for repository 'repo-update'. + RPM files caching has been disabled for repository 'repo-update-non-oss'. + +16. Enable rpm file caching for all the repositories. + + # zypper mr -ka + + RPM files caching has been enabled for repository 'openSUSE-13.2-0'. + RPM files caching has been enabled for repository 'repo-debug'. + RPM files caching has been enabled for repository 'repo-debug-update'. + RPM files caching has been enabled for repository 'repo-debug-update-non-oss'. + RPM files caching has been enabled for repository 'repo-non-oss'. + RPM files caching has been enabled for repository 'repo-oss'. + RPM files caching has been enabled for repository 'repo-source'. + RPM files caching has been enabled for repository 'repo-update'. + RPM files caching has been enabled for repository 'repo-update-non-oss'. + +17. Disable rpm file caching for remote repositories. + + # zypper mr -Kt + + RPM files caching has been disabled for repository 'repo-debug'. + RPM files caching has been disabled for repository 'repo-debug-update'. + RPM files caching has been disabled for repository 'repo-debug-update-non-oss'. + RPM files caching has been disabled for repository 'repo-non-oss'. + RPM files caching has been disabled for repository 'repo-oss'. + RPM files caching has been disabled for repository 'repo-source'. + RPM files caching has been disabled for repository 'repo-update'. + RPM files caching has been disabled for repository 'repo-update-non-oss'. + +18. Enable rpm file caching for remote repositories. + + # zypper mr -kt + + RPM files caching has been enabled for repository 'repo-debug'. + RPM files caching has been enabled for repository 'repo-debug-update'. + RPM files caching has been enabled for repository 'repo-debug-update-non-oss'. + RPM files caching has been enabled for repository 'repo-non-oss'. + RPM files caching has been enabled for repository 'repo-oss'. + RPM files caching has been enabled for repository 'repo-source'. + RPM files caching has been enabled for repository 'repo-update'. + RPM files caching has been enabled for repository 'repo-update-non-oss'. + +#### Adding Repositories #### + +You may make use of any of the two commands – ‘zypper addrepo‘ or ‘zypper ar‘. You may use repo url or alias to add Repository. + +19. Add a repository say “http://download.opensuse.org/update/12.3/”. + + # zypper ar http://download.opensuse.org/update/11.1/ update + + Adding repository 'update' .............................................................................................................................................................[done] + Repository 'update' successfully added + Enabled : Yes + Autorefresh : No + GPG check : Yes + URI : http://download.opensuse.org/update/11.1/ + +20. Rename a repository. It will change the alias only. You may use command ‘zypper namerepo‘ or ‘zypper nr‘. To rename aka change alias of a repo that appears at number 10 (zypper lr) to upd8, run the below command. + + # zypper nr 10 upd8 + + Repository 'update' renamed to 'upd8'. + +#### Removing Repositories #### + +21. Remove a repository. It will remove the repository from the system. You may use the command ‘zypper removerepo‘ or ‘zypper rr‘. To remove a repo say ‘upd8‘, run the below command. + + # zypper rr upd8 + + # Removing repository 'upd8' .........................................................................................[done] + Repository 'upd8' has been removed. + +### Package Management using Zypper ### + +#### Install a Package with Zypper #### + +22. With Zypper, we can install packages based upon capability name. For example, to install a package (say Mozilla Firefox) using capability name. + + # zypper in MozillaFirefox + + Loading repository data... + Reading installed packages... + Resolving package dependencies... + + The following 128 NEW packages are going to be installed: + adwaita-icon-theme at-spi2-atk-common at-spi2-atk-gtk2 at-spi2-core cantarell-fonts cups-libs desktop-file-utils fontconfig gdk-pixbuf-query-loaders gstreamer gstreamer-fluendo-mp3 + gstreamer-plugins-base gtk2-branding-openSUSE gtk2-data gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese gtk2-metatheme-adwaita + gtk2-theming-engine-adwaita gtk2-tools gtk3-data gtk3-metatheme-adwaita gtk3-tools hicolor-icon-theme hicolor-icon-theme-branding-openSUSE libasound2 libatk-1_0-0 libatk-bridge-2_0-0 + libatspi0 libcairo2 libcairo-gobject2 libcanberra0 libcanberra-gtk0 libcanberra-gtk2-module libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-gtk-module-common libcdda_interface0 + libcdda_paranoia0 libcolord2 libdrm2 libdrm_intel1 libdrm_nouveau2 libdrm_radeon1 libFLAC8 libfreebl3 libgbm1 libgdk_pixbuf-2_0-0 libgraphite2-3 libgstapp-1_0-0 libgstaudio-1_0-0 + libgstpbutils-1_0-0 libgstreamer-1_0-0 libgstriff-1_0-0 libgsttag-1_0-0 libgstvideo-1_0-0 libgthread-2_0-0 libgtk-2_0-0 libgtk-3-0 libharfbuzz0 libjasper1 libjbig2 libjpeg8 libjson-c2 + liblcms2-2 libLLVM libltdl7 libnsssharedhelper0 libogg0 liborc-0_4-0 libpackagekit-glib2-18 libpango-1_0-0 libpciaccess0 libpixman-1-0 libpulse0 libsndfile1 libsoftokn3 libspeex1 + libsqlite3-0 libstartup-notification-1-0 libtheoradec1 libtheoraenc1 libtiff5 libvisual libvorbis0 libvorbisenc2 libvorbisfile3 libwayland-client0 libwayland-cursor0 libwayland-server0 + libX11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb-xfixes0 libXcomposite1 libXcursor1 libXdamage1 libXevie1 + libXfixes3 libXft2 libXi6 libXinerama1 libxkbcommon-0_4_3 libXrandr2 libXrender1 libxshmfence1 libXtst6 libXv1 libXxf86vm1 Mesa Mesa-libEGL1 Mesa-libGL1 Mesa-libglapi0 + metatheme-adwaita-common MozillaFirefox MozillaFirefox-branding-openSUSE mozilla-nss mozilla-nss-certs PackageKit-gstreamer-plugin pango-tools sound-theme-freedesktop + + The following 10 recommended packages were automatically selected: + gstreamer-fluendo-mp3 gtk2-branding-openSUSE gtk2-data gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese libcanberra0 libpulse0 + PackageKit-gstreamer-plugin + + 128 new packages to install. + Overall download size: 77.2 MiB. Already cached: 0 B After the operation, additional 200.0 MiB will be used. + Continue? [y/n/? shows all options] (y): y + Retrieving package cantarell-fonts-0.0.16-1.1.noarch (1/128), 74.1 KiB (115.6 KiB unpacked) + Retrieving: cantarell-fonts-0.0.16-1.1.noarch.rpm .........................................................................................................................[done (63.4 KiB/s)] + Retrieving package hicolor-icon-theme-0.13-2.1.2.noarch (2/128), 40.1 KiB ( 50.5 KiB unpacked) + Retrieving: hicolor-icon-theme-0.13-2.1.2.noarch.rpm ...................................................................................................................................[done] + Retrieving package sound-theme-freedesktop-0.8-7.1.2.noarch (3/128), 372.6 KiB (460.3 KiB unpacked) + +23. Install a package (say gcc) using version. + + # zypper in 'gcc<5.1' + + Loading repository data... + Reading installed packages... + Resolving package dependencies... + + The following 13 NEW packages are going to be installed: + cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49 + + 13 new packages to install. + Overall download size: 14.5 MiB. Already cached: 0 B After the operation, additional 49.4 MiB will be used. + Continue? [y/n/? shows all options] (y): y + +24. Install a package (say gcc) for architecture (say i586). + + # zypper in gcc.i586 + + Loading repository data... + Reading installed packages... + Resolving package dependencies... + + The following 13 NEW packages are going to be installed: + cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49 + + 13 new packages to install. + Overall download size: 14.5 MiB. Already cached: 0 B After the operation, additional 49.4 MiB will be used. + Continue? [y/n/? shows all options] (y): y + Retrieving package libasan0-4.8.3+r212056-2.2.4.x86_64 (1/13), 74.2 KiB (166.9 KiB unpacked) + Retrieving: libasan0-4.8.3+r212056-2.2.4.x86_64.rpm .......................................................................................................................[done (79.2 KiB/s)] + Retrieving package libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64 (2/13), 14.3 KiB ( 26.1 KiB unpacked) + Retrieving: libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm ...............................................................................................................[done (55.3 KiB/s)] + +25. Install a package (say gcc) for specific architecture (say i586) and specific version (say <5.1), + + # zypper in 'gcc.i586<5.1' + + Loading repository data... + Reading installed packages... + Resolving package dependencies... + + The following 13 NEW packages are going to be installed: + cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49 + + 13 new packages to install. + Overall download size: 14.4 MiB. Already cached: 129.5 KiB After the operation, additional 49.4 MiB will be used. + Continue? [y/n/? shows all options] (y): y + In cache libasan0-4.8.3+r212056-2.2.4.x86_64.rpm (1/13), 74.2 KiB (166.9 KiB unpacked) + In cache libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm (2/13), 14.3 KiB ( 26.1 KiB unpacked) + In cache libgomp1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm (3/13), 41.1 KiB ( 90.7 KiB unpacked) + +26. Install a Package (say libxine) from repository (amarok). + + # zypper in amarok upd:libxine1 + + Loading repository data... + Reading installed packages... + Resolving package dependencies... + The following 202 NEW packages are going to be installed: + amarok bundle-lang-kde-en clamz cups-libs enscript fontconfig gdk-pixbuf-query-loaders ghostscript-fonts-std gptfdisk gstreamer gstreamer-plugins-base hicolor-icon-theme + hicolor-icon-theme-branding-openSUSE htdig hunspell hunspell-tools icoutils ispell ispell-american kde4-filesystem kdebase4-runtime kdebase4-runtime-branding-openSUSE kdelibs4 + kdelibs4-branding-openSUSE kdelibs4-core kdialog libakonadi4 l + ..... + +27. Install a Package (say git) using name (-n). + + # zypper in -n git + + Loading repository data... + Reading installed packages... + Resolving package dependencies... + + The following 35 NEW packages are going to be installed: + cvs cvsps fontconfig git git-core git-cvs git-email git-gui gitk git-svn git-web libserf-1-1 libsqlite3-0 libXft2 libXrender1 libXss1 perl-Authen-SASL perl-Clone perl-DBD-SQLite perl-DBI + perl-Error perl-IO-Socket-SSL perl-MLDBM perl-Net-Daemon perl-Net-SMTP-SSL perl-Net-SSLeay perl-Params-Util perl-PlRPC perl-SQL-Statement perl-Term-ReadKey subversion subversion-perl tcl + tk xhost + + The following 13 recommended packages were automatically selected: + git-cvs git-email git-gui gitk git-svn git-web perl-Authen-SASL perl-Clone perl-MLDBM perl-Net-Daemon perl-Net-SMTP-SSL perl-PlRPC perl-SQL-Statement + + The following package is suggested, but will not be installed: + git-daemon + + 35 new packages to install. + Overall download size: 15.6 MiB. Already cached: 0 B After the operation, additional 56.7 MiB will be used. + Continue? [y/n/? shows all options] (y): y + +28. Install a package using wildcards. For example, install all php5 packages. + + # zypper in php5* + + Loading repository data... + Reading installed packages... + Resolving package dependencies... + + Problem: php5-5.6.1-18.1.x86_64 requires smtp_daemon, but this requirement cannot be provided + uninstallable providers: exim-4.83-3.1.8.x86_64[openSUSE-13.2-0] + postfix-2.11.0-5.2.2.x86_64[openSUSE-13.2-0] + sendmail-8.14.9-2.2.2.x86_64[openSUSE-13.2-0] + exim-4.83-3.1.8.i586[repo-oss] + msmtp-mta-1.4.32-2.1.3.i586[repo-oss] + postfix-2.11.0-5.2.2.i586[repo-oss] + sendmail-8.14.9-2.2.2.i586[repo-oss] + exim-4.83-3.1.8.x86_64[repo-oss] + msmtp-mta-1.4.32-2.1.3.x86_64[repo-oss] + postfix-2.11.0-5.2.2.x86_64[repo-oss] + sendmail-8.14.9-2.2.2.x86_64[repo-oss] + postfix-2.11.3-5.5.1.i586[repo-update] + postfix-2.11.3-5.5.1.x86_64[repo-update] + Solution 1: Following actions will be done: + do not install php5-5.6.1-18.1.x86_64 + do not install php5-pear-Auth_SASL-1.0.6-7.1.3.noarch + do not install php5-pear-Horde_Http-2.0.1-6.1.3.noarch + do not install php5-pear-Horde_Image-2.0.1-6.1.3.noarch + do not install php5-pear-Horde_Kolab_Format-2.0.1-6.1.3.noarch + do not install php5-pear-Horde_Ldap-2.0.1-6.1.3.noarch + do not install php5-pear-Horde_Memcache-2.0.1-7.1.3.noarch + do not install php5-pear-Horde_Mime-2.0.2-6.1.3.noarch + do not install php5-pear-Horde_Oauth-2.0.0-6.1.3.noarch + do not install php5-pear-Horde_Pdf-2.0.1-6.1.3.noarch + .... + +29. Install a Package (say lamp_server) using pattern (group of packages). + + # zypper in -t pattern lamp_server + + ading repository data... + Reading installed packages... + Resolving package dependencies... + + The following 29 NEW packages are going to be installed: + apache2 apache2-doc apache2-example-pages apache2-mod_perl apache2-prefork patterns-openSUSE-lamp_server perl-Data-Dump perl-Encode-Locale perl-File-Listing perl-HTML-Parser + perl-HTML-Tagset perl-HTTP-Cookies perl-HTTP-Daemon perl-HTTP-Date perl-HTTP-Message perl-HTTP-Negotiate perl-IO-HTML perl-IO-Socket-SSL perl-libwww-perl perl-Linux-Pid + perl-LWP-MediaTypes perl-LWP-Protocol-https perl-Net-HTTP perl-Net-SSLeay perl-Tie-IxHash perl-TimeDate perl-URI perl-WWW-RobotRules yast2-http-server + + The following NEW pattern is going to be installed: + lamp_server + + The following 10 recommended packages were automatically selected: + apache2 apache2-doc apache2-example-pages apache2-mod_perl apache2-prefork perl-Data-Dump perl-IO-Socket-SSL perl-LWP-Protocol-https perl-TimeDate yast2-http-server + + 29 new packages to install. + Overall download size: 7.2 MiB. Already cached: 1.2 MiB After the operation, additional 34.7 MiB will be used. + Continue? [y/n/? shows all options] (y): + +30. Install a Package (say nano) and remove a package (say vi) in one go. + + # zypper in nano -vi + + Loading repository data... + Reading installed packages... + '-vi' not found in package names. Trying capabilities. + Resolving package dependencies... + + The following 2 NEW packages are going to be installed: + nano nano-lang + + The following package is going to be REMOVED: + vim + + The following recommended package was automatically selected: + nano-lang + + 2 new packages to install, 1 to remove. + Overall download size: 550.0 KiB. Already cached: 0 B After the operation, 463.3 KiB will be freed. + Continue? [y/n/? shows all options] (y): + ... + +31. Install a rpm package (say teamviewer). + + # zypper in teamviewer*.rpm + + Loading repository data... + Reading installed packages... + Resolving package dependencies... + + The following 24 NEW packages are going to be installed: + alsa-oss-32bit fontconfig-32bit libasound2-32bit libexpat1-32bit libfreetype6-32bit libgcc_s1-gcc49-32bit libICE6-32bit libjpeg62-32bit libpng12-0-32bit libpng16-16-32bit libSM6-32bit + libuuid1-32bit libX11-6-32bit libXau6-32bit libxcb1-32bit libXdamage1-32bit libXext6-32bit libXfixes3-32bit libXinerama1-32bit libXrandr2-32bit libXrender1-32bit libXtst6-32bit + libz1-32bit teamviewer + + The following recommended package was automatically selected: + alsa-oss-32bit + + 24 new packages to install. + Overall download size: 41.2 MiB. Already cached: 0 B After the operation, additional 119.7 MiB will be used. + Continue? [y/n/? shows all options] (y): + .. + +#### Remove a Package with Zypper #### + +32. To remove any package, you can use ‘zypper remove‘ or ‘zypper rm‘ commands. For example, to remove a package (say apache2), run: + + # zypper remove apache2 + Or + # zypper rm apache2 + + Loading repository data... + Reading installed packages... + Resolving package dependencies... + + The following 2 packages are going to be REMOVED: + apache2 apache2-prefork + + 2 packages to remove. + After the operation, 4.2 MiB will be freed. + Continue? [y/n/? shows all options] (y): y + (1/2) Removing apache2-2.4.10-19.1 ........................................................................[done] + (2/2) Removing apache2-prefork-2.4.10-19.1 ................................................................[done] + +#### Updating Packages using Zypper #### + +33. Update all packages. You may use commands ‘zypper update‘ or ‘zypper up‘. + + # zypper up + OR + # zypper update + + Loading repository data... + Reading installed packages... + Nothing to do. + +34. Update specific packages (say apache2 and openssh). + + # zypper up apache2 openssh + + Loading repository data... + Reading installed packages... + No update candidate for 'apache2-2.4.10-19.1.x86_64'. The highest available version is already installed. + No update candidate for 'openssh-6.6p1-5.1.3.x86_64'. The highest available version is already installed. + Resolving package dependencies... + + Nothing to do. + +35. Install a package say (mariadb) if not installed, if installed update it. + + # zypper in mariadb + + Loading repository data... + Reading installed packages... + 'mariadb' is already installed. + No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed. + Resolving package dependencies... + + Nothing to do. + +#### Install Source and Build Dependencies #### + +You may use ‘zypper source-install‘ or ‘zypper si‘ commands to build packages from source. + +36. Install source packages and build their dependencies for a package (say mariadb). + + # zypper si mariadb + + Reading installed packages... + Loading repository data... + Resolving package dependencies... + + The following 36 NEW packages are going to be installed: + autoconf automake bison cmake cpp cpp48 gcc gcc48 gcc48-c++ gcc-c++ libaio-devel libarchive13 libasan0 libatomic1-gcc49 libcloog-isl4 libedit-devel libevent-devel libgomp1-gcc49 libisl10 + libitm1-gcc49 libltdl7 libmpc3 libmpfr4 libopenssl-devel libstdc++48-devel libtool libtsan0-gcc49 m4 make ncurses-devel pam-devel readline-devel site-config tack tcpd-devel zlib-devel + + The following source package is going to be installed: + mariadb + + 36 new packages to install, 1 source package. + Overall download size: 71.5 MiB. Already cached: 129.5 KiB After the operation, additional 183.9 MiB will be used. + Continue? [y/n/? shows all options] (y): y + +37. Install only the source for a package (say mariadb). + + # zypper in -D mariadb + + Loading repository data... + Reading installed packages... + 'mariadb' is already installed. + No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed. + Resolving package dependencies... + + Nothing to do. + +38. Install only the build dependencies for a packages (say mariadb). + + # zypper si -d mariadb + + Reading installed packages... + Loading repository data... + Resolving package dependencies... + + The following 36 NEW packages are going to be installed: + autoconf automake bison cmake cpp cpp48 gcc gcc48 gcc48-c++ gcc-c++ libaio-devel libarchive13 libasan0 libatomic1-gcc49 libcloog-isl4 libedit-devel libevent-devel libgomp1-gcc49 libisl10 + libitm1-gcc49 libltdl7 libmpc3 libmpfr4 libopenssl-devel libstdc++48-devel libtool libtsan0-gcc49 m4 make ncurses-devel pam-devel readline-devel site-config tack tcpd-devel zlib-devel + + The following package is recommended, but will not be installed due to conflicts or dependency issues: + readline-doc + + 36 new packages to install. + Overall download size: 33.7 MiB. Already cached: 129.5 KiB After the operation, additional 144.3 MiB will be used. + Continue? [y/n/? shows all options] (y): y + +#### Zypper in Scripts and Applications #### + +39. Install a Package (say mariadb) without interaction of user. + + # zypper --non-interactive in mariadb + + Loading repository data... + Reading installed packages... + 'mariadb' is already installed. + No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed. + Resolving package dependencies... + + Nothing to do. + +40. Remove a Package (say mariadb) without interaction of user. + + # zypper --non-interactive rm mariadb + + Loading repository data... + Reading installed packages... + Resolving package dependencies... + + The following package is going to be REMOVED: + mariadb + + 1 package to remove. + After the operation, 71.8 MiB will be freed. + Continue? [y/n/? shows all options] (y): y + (1/1) Removing mariadb-10.0.13-2.6.1 .............................................................................[done] + +41. Output zypper in xml. + + # zypper --xmlout + + + + Usage: + zypper [--global-options] [--command-options] [arguments] + + Global Options + .... + +42. Generate quiet output at installation. + + # zypper --quiet in mariadb + + The following NEW package is going to be installed: + mariadb + + 1 new package to install. + Overall download size: 0 B. Already cached: 7.8 MiB After the operation, additional 71.8 MiB will be used. + Continue? [y/n/? shows all options] (y): + ... + +43. Generate quiet output at UN-installation. + + # zypper --quiet rm mariadb + +44. Auto agree to Licenses/Agreements. + + # zypper patch --auto-agree-with-licenses + + Loading repository data... + Reading installed packages... + Resolving package dependencies... + + Nothing to do. + +#### Clean Zypper Cache and View History #### + +45. If you want to clean zypper cache only, you can use following command. + + # zypper clean + + All repositories have been cleaned up. + +If you want to clean metadata and package cache at once you may like to pass –all/-a with zypper as. + + # zypper clean -a + + All repositories have been cleaned up. + +46. To view logs of any installed, updated or removed packages through zypper, are logged in /var/log/zypp/history. You may cat it to view or may use filter to get a custom output. + + # cat /var/log/zypp/history + + 2015-05-07 15:43:03|install|boost-license1_54_0|1.54.0-10.1.3|noarch||openSUSE-13.2-0|0523b909d2aae5239f9841316dafaf3a37b4f096| + 2015-05-07 15:43:03|install|branding-openSUSE|13.2-3.6.1|noarch||openSUSE-13.2-0|6609def94b1987bf3f90a9467f4f7ab8f8d98a5c| + 2015-05-07 15:43:03|install|bundle-lang-common-en|13.2-3.3.1|noarch||openSUSE-13.2-0|ca55694e6fdebee6ce37ac7cf3725e2aa6edc342| + 2015-05-07 15:43:03|install|insserv-compat|0.1-12.2.2|noarch||openSUSE-13.2-0|6160de7fbf961a279591a83a1550093a581214d9| + 2015-05-07 15:43:03|install|libX11-data|1.6.2-5.1.2|noarch||openSUSE-13.2-0|f1cb58364ba9016c1f93b1a383ba12463c56885a| + 2015-05-07 15:43:03|install|libnl-config|3.2.25-2.1.2|noarch||openSUSE-13.2-0|aab2ded312a781e93b739b418e3d32fe4e187020| + 2015-05-07 15:43:04|install|wireless-regdb|2014.06.13-1.2|noarch||openSUSE-13.2-0|be8cb16f3e92af12b5ceb977e37e13f03c007bd1| + 2015-05-07 15:43:04|install|yast2-trans-en_US|3.1.0-2.1|noarch||openSUSE-13.2-0|1865754e5e0ec3c149ac850b340bcca55a3c404d| + 2015-05-07 15:43:04|install|yast2-trans-stats|2.19.0-16.1.3|noarch||openSUSE-13.2-0|b107d2b3e702835885b57b04d12d25539f262d1a| + 2015-05-07 15:43:04|install|cracklib-dict-full|2.8.12-64.1.2|x86_64||openSUSE-13.2-0|08bd45dbba7ad44e3a4837f730be76f55ad5dcfa| + ...... + +#### Upgrade Suse Using Zypper #### + +47. You can use ‘dist-upgrade‘ option with zypper command to upgrade your current Suse Linux to most recent version. + + # zypper dist-upgrade + + You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command. + Building repository 'openSUSE-13.2-0' cache .....................................................................[done] + Retrieving repository 'openSUSE-13.2-Debug' metadata ............................................................[done] + Building repository 'openSUSE-13.2-Debug' cache .................................................................[done] + Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ..........................................................[done] + Building repository 'openSUSE-13.2-Non-Oss' cache ...............................................................[done] + +That’s all for now. Hope this article would help you in managing you SUSE System and Server specially for newbies. If you feel that I left certain commands (Human are erroneous) you may provide us with the feedback in the comments so that we can update the article. Keep Connected, Keep Commenting, Stay tuned. Kudos! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/zypper-commands-to-manage-suse-linux-package-management/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/installation-of-suse-linux-enterprise-server-12/ \ No newline at end of file diff --git a/sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md b/sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md new file mode 100644 index 0000000000..ae73d6896b --- /dev/null +++ b/sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md @@ -0,0 +1,96 @@ +A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux +================================================================================ +The duty of System Administrator is really tough as he/she has to monitor the servers, users, logs, create backup and blah blah blah. For the most repetitive task most of the administrator write a script to automate their day-to-day repetitive task. Here we have written a shell Script that do not aims to automate the task of a typical system admin, but it may be helpful at places and specially for those newbies who can get most of the information they require about their System, Network, Users, Load, Ram, host, Internal IP, External IP, Uptime, etc. + +We have taken care of formatting the output (to certain extent). The Script don’t contains any Malicious contents and it can be run using Normal user Account. In-fact it is recommended to run this script as user and not as root. + +![Linux Server Health Monitoring](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-Health-Monitoring.png) +Shell Script to Monitor Linux System Health + +You are free to use/modify/redistribute the below piece of code by giving proper credit to Tecmint and Author. We have tried to customize the output to the extent that nothing other than the required output is generated. We have tried to use those variables which are generally not used by Linux System and are probably free. + +#### Minimum System Requirement #### + +All you need to have is a working Linux box. + +#### Dependency #### + +There is no dependency required to use this package for a standard Linux Distribution. Moreover the script don’t requires root permission for execution purpose. However if you want to Install it, you need to enter root password once. + +#### Security #### + +We have taken care to ensure security of the system. Nothing additional package is required/installed. No root access required to run. Moreover code has been released under Apache 2.0 License, that means you are free to edit, modify and re-distribute by keeping Tecmint copyright. + +### How Do I Install and Run Script? ### + +First, use following [wget command][1] to download the monitor script `"tecmint_monitor.sh"` and make it executable by setting appropriate permissions. + + # wget http://tecmint.com/wp-content/scripts/tecmint_monitor.sh + # chmod 755 tecmint_monitor.sh + +It is strongly advised to install the script as user and not as root. It will ask for root password and will install the necessary components at required places. + +To install `"tecmint_monitor.sh"` script, simple use -i (install) option as shown below. + + /tecmint_monitor.sh -i + +Enter root password when prompted. If everything goes well you will get a success message like shown below. + + Password: + Congratulations! Script Installed, now run monitor Command + +After installation, you can run the script by calling command `'monitor'` from any location or user. If you don’t like to install it, you need to include the location every-time you want to run it. + + # ./Path/to/script/tecmint_monitor.sh + +Now run monitor command from anywhere using any user account simply as: + + $ monitor + +![TecMint Monitor Script in Action](http://www.tecmint.com/wp-content/uploads/2015/05/TecMint-Monitor-Script.gif) + +As soon as you run the command you get various System related information which are: + +- Internet Connectivity +- OS Type +- OS Name +- OS Version +- Architecture +- Kernel Release +- Hostname +- Internal IP +- External IP +- Name Servers +- Logged In users +- Ram Usages +- Swap Usages +- Disk Usages +- Load Average +- System Uptime + +Check the installed version of script using -v (version) switch. + + $ monitor -v + + tecmint_monitor version 0.1 + Designed by Tecmint.com + Released Under Apache 2.0 License + +### Conclusion ### + +This script is working out of the box on a few machines I have checked. It should work the same for you as well. If you find any bug let us know in the comments. This is not the end. This is the beginning. You can take it to any level from here. If you feel like editing the script and carry it further you are free to do so giving us proper credit and also share the updated script with us so that we can update this article by giving you proper credit. + +Don’t forget to share your thoughts or your script with us. We will be here to help you. Thank you for all the love you have given us. Keep Connected! Stay tuned. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-server-health-monitoring-script/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file diff --git a/sources/tech/20150512 How To Run Docker Client Inside Windows OS.md b/sources/tech/20150512 How To Run Docker Client Inside Windows OS.md new file mode 100644 index 0000000000..e2379b70b8 --- /dev/null +++ b/sources/tech/20150512 How To Run Docker Client Inside Windows OS.md @@ -0,0 +1,107 @@ +How To Run Docker Client Inside Windows OS +================================================================================ +Hi everyone, today we'll learn about Docker in Windows Operating System and about the installation of Docker Windows Client in it. Docker Engine uses Linux Specific Kernel features so it cannot use Windows Kernel to run so, the Docker Engine creates a small Virtual Machine running Linux and utilizes its resources and Kernel. The Windows Docker Client uses the virtualized Docker Engine to build, run and manage Docker Containers out of the box. There is an application developed by the Boot2Docker Team called Boot2Docker which creates the virtual machine running a small Linux based on [Tiny Core Linux][1] made specifically to run [Docker][2] containers on Windows. It runs completely from RAM, weighs ~27MB and boots in ~5s (YMMV). So, until the Docker Engine for Windows is developed, we can only run Linux containers in our Windows Machine. + +Here is some easy and simple steps which will allow us to install the Docker Client and run containers on top of it. + +### 1. Downloading Boot2Docker ### + +Now, before we start the installation, we'll need the executable file for Boot2Docker. The latest version of Boot2Docker can be downloaded from [its Github][3]. Here, in this tutorial, we'll download version v1.6.1 from the site. Here, we'll download the file named [docker-install.exe][4] from that page using our favorite Web Browser or Download Manager. + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/downloading-boot2docker-installer.png) + +### 2. Installing Boot2Docker ### + +Now, we'll simply run the installer which will install Windows Docker Client, Git for Windows (MSYS-git), VirtualBox, The Boot2Docker Linux ISO, and the Boot2Docker management tool which are essential for the total functioning of Docker Engine out of the box. + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/boot2docker-installer.png) + +### 3. Running Boot2Docker ### + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/boot2docker-start-icon-e1431322598697.png) + +After installing the necessary stuffs, we'll run Boot2Docker by simply running the Boot2Docker Start shortcut from the Desktop. This will ask you to enter an SSH key paraphrase that we'll require in future for authentication. It will start a unix shell already configured to manage Docker running inside the virtual machine. + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/starting-boot2docker.png) + +Now to check whether it is correctly configured or not, simply run docker version as shown below. + + docker version + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-version.png) + +### 4. Running Docker ### + +As **Boot2Docker Start** automatically starts a shell with environment variables correctly set so we can simply start using Docker right away. **Please note that, if we are Boot2Docker as remote Docker Daemon , then do not type the sudo before the docker commands.** + +Now, Let's try the **hello-world** example image which will download the hello-world image, executes it and gives an output "Hello from Docker" message. + + $ docker run hello-world + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/running-hello-world.png) + +### 5. Running Docker using Command Prompt (CMD) ### + +Now, if you are wanting to get started with Docker using Command Prompt, you can simply launch the command prompt (CMD.exe). As Boot2Docker requires ssh.exe to be in the PATH, therefore we need to include bin folder of the Git installation to the %PATH% environment variable by running the following command in the command prompt. + + set PATH=%PATH%;"c:\Program Files (x86)\Git\bin" + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-in-cmd.png) + +After running the above command, we can run the **boot2docker start** command in the command prompt to start the Boot2Docker VM. + + boot2docker start + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-cmd-variables.png) + +**Note**: If you get an error saying machine does not exist then run **boot2docker init** command in it. + +Then copy the instructions for cmd.exe shown in the console to set the environment variables to the console window and we are ready to run docker containers as usual. + +### 6. Running Docker using PowerShell ### + +In order to run Docker on PowerShell, we simply need to launch a PowerShell window then add ssh.exe to our PATH variable. + + $Env:Path = "${Env:Path};c:\Program Files (x86)\Git\bin" + +After running the above command, we'll need to run + + boot2docker start + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-in-powershell.png) + +This will print PowerShell commands to set the environment variables to connect Docker running inside VM. We'll simply run those commands in the PowerShell and we are ready to run docker containers as usual. + +### 7. Logging with PUTTY ### + +Boot2Docker generates and uses the public or private key pair inside %USERPROFILE%\.ssh directory so to login, we'll need use the private key from this same directory. That private key needs to be converted into the PuTTY 's format. We can use puttygen.exe to do that. + +We need to open puttygen.exe and load ("File"->"Load" menu) the private key from %USERPROFILE%\.ssh\id_boot2docker then click on "Save Private Key". Then use the saved file to login with PuTTY using docker@127.0.0.1:2022 . + +### 8. Boot2Docker Options ### + +The Boot2Docker management tool provides several commands as shown below. + + $ boot2docker + + Usage: boot2docker.exe [] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|ip|shellinit|delete|download|upgrade|version} [] + +### Conclusion ### + +Using Docker with Docker Windows Client is fun. The Boot2Docker management tool is an awesome application developed which enables every Docker containers to run smoothly as running in Linux host. If you are more curious, the username for the boot2docker default user is docker and the password is tcuser. The latest version of boot2docker sets up a host only network adapter which provides access to the container's ports. Typically, it is 192.168.59.103, but it could get changed by Virtualbox's DHCP implementation. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/run-docker-client-inside-windows-os/ + +作者:[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/ +[1]:http://tinycorelinux.net/ +[2]:https://www.docker.io/ +[3]:https://github.com/boot2docker/windows-installer/releases/latest +[4]:https://github.com/boot2docker/windows-installer/releases/download/v1.6.1/docker-install.exe \ No newline at end of file diff --git a/sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md b/sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md new file mode 100644 index 0000000000..8c2df9a5bd --- /dev/null +++ b/sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md @@ -0,0 +1,63 @@ +Linux FAQs with Answers--How to view torrent file content on Linux +================================================================================ +> **Question**: I have a torrent file downloaded from the web. Is there a tool that allows me to view the content of a torrent on Linux? For example, I want to know what files are included inside a torrent. + +A torrent file (i.e., a file with **.torrent** extension) is a BitTorrent metadata file which stores information (e.g., tracker URLs, file list, sizes, checksums, creation date) needed by a BitTorrent client to download files shared on BitTorrent peer-to-peer networks. Inside a single torrent file, one or more files can be listed for sharing. + +The content of a torrent file is encoded with BEncode, the BitTorrent's data serialization format. Thus to view the content of a torrent file, you need a corresponding decoder. + +In fact, any GUI-based BitTorrent client (e.g., Transmission or uTorrent) is equipped with BEncode decoder, so can show to you the content of a torrent file by opening it. However, if you don't want to use any sort of BitTorrent client to check up on a torrent file, you can try a command-line torrent viewer called [dumptorrent][2]. + +The **dumptorrent** command prints the detailed content of a torrent file (e.g., file names, sizes, tracker URLs, creation date, info hash, etc.) by using a built-in BEncode decoder. + +### Install DumpTorrent on Linux ### + +To install dumptorrent on Linux, you can build it from the source. + +On Debian, Ubuntu or Linux Mint: + + $ sudo apt-get install gcc make + $ wget http://downloads.sourceforge.net/project/dumptorrent/dumptorrent/1.2/dumptorrent-1.2.tar.gz + $ tar -xvf dumptorrent-1.2.tar.gz + $ cd dumptorrent-1.2 + $ make + $ sudo cp dumptorrent /usr/local/bin + +On CentOS, Fedora or RHEL: + + $ sudo yum install gcc make + $ wget http://downloads.sourceforge.net/project/dumptorrent/dumptorrent/1.2/dumptorrent-1.2.tar.gz + $ tar -xvf dumptorrent-1.2.tar.gz + $ cd dumptorrent-1.2 + $ make + $ sudo cp dumptorrent /usr/local/bin + +Make sure that /usr/local/bin is [included][2] in your PATH. + +### View the Content of a Torrent ### + +To check the content of a torrent, simply run dumptorrent with a torrent file as an argument. This will print a summary of a torrent, including file names, sizes and tracker URL. + + $ dumptorrent + +![](https://farm8.staticflickr.com/7729/16816455904_b051e29972_b.jpg) + +To view the full content of a torrent, add "-v" option. This will print more detailed information of a torrent, including info-hash, piece length, creation date, creator, and full announce list. + + $ dumptorrent -v + +![](https://farm6.staticflickr.com/5331/17438628461_1f6675bd77_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/view-torrent-file-content-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://ask.xmodulo.com/author/nanni +[1]:http://dumptorrent.sourceforge.net/ +[2]:http://ask.xmodulo.com/change-path-environment-variable-linux.html \ No newline at end of file From 8d1f4c09f5c4607c416c74402402a9e6974bbdd2 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Tue, 12 May 2015 17:33:11 +0800 Subject: [PATCH 0793/2517] part of translation --- ...ogy http headers and caching strategies.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md index e149266918..2d428484ab 100644 --- a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md +++ b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md @@ -3,3 +3,54 @@ Web ### +վķ˵ܻݻûЧķʽ֮һ棬߶֮ǰʱ洢HTTPЭʵĵݷַ֮һַ·еԻٺڶĻԡ + +ָУǽһЩWebݻĻҪѡ񻺴Ա֤ΧڵĻܹȷĴݡǽ̸һ̸ĺôáԼͬIJܴܺԵϡ + +ʲôǻ棿 +------------ + +Ǵ洢ԴԱӿ಻ͬ͵Ļ棬ÿֶص㣬Ӧó򻺴ڴ滺ضظļ٣ܳá + +Web棬ָϵģһֲͬ͵Ļ档WebHTTPЭһԣСû֪ϵͳӦٶȡݴӷĴУÿ涼ҵӰ + +WebضĹ򻺴ӦHTTPĻظڻݵĺֱɻ·Web + +ô +---- + +ЧĻ漼ûݵṩߡһЩݷַĺôУ + +- **翪**ݿڴṩߵ·֮಻ͬĵط档ھ߸ĵطʱڻĴڣ󽫲ĶԴ + +- **ӿӦٶ**òDZģʹݵĻñø졣ھûĵطά棬ʹݵĻȡ˲ʱġ + +- **ͬӲٶ**ڱԭʼݵķ˵ܿͨĻԴӲѹեӵǿý·ǿķӦijݸصij + +- **жʱɿ**ʹijֲԣԱ֤ݶûĿãܵԭʼijʱڱòá + + +---- + +ԻʱܶһЩ̫ܲϤһЩ£ + +- **ԭʼ**ԭʼݵԭʼŵص㡣WebԱĻΪκβܴӻеõݽлظҸݵĻԡ + +- ****һЧջʽжǿԴӻеõݵıʡʸζкܸ߱ݿԴӻлáͨǴԱҪĽ + +- **ʶ**ʶһеĿǷʺϷظͻˡеֻɻָʶʱڲŻᱻء + +- ****иݻԵʶѹڵݡڵݱΪ"¾"ͨݲڻظͻ˵󡣱´ԭʼµݻ֤ǷȻ׼ȷ + +- **У**еĹݿԱ֤ЧԱˢ¹ʱ䡣֤̰ϵԭʼԼ黺Ƿɴİ汾 + +- **ʧЧ**ʧЧݹڴӻƳݵĹ̡ԭʼѱı䲢һйڵݻᵼ¿ͻǩʱDZġ + +ĻЩӦܰ㿪ʼ + +ʲôܱ棿 +------------- + + + + From 00d94167474fce1972fcfef1717d06689b565b13 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Tue, 12 May 2015 18:21:00 +0800 Subject: [PATCH 0794/2517] another part of translatiokn --- ...ogy http headers and caching strategies.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md index 2d428484ab..a777d4f2c3 100644 --- a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md +++ b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md @@ -51,6 +51,37 @@ Web ʲôܱ棿 ------------- +ijЩضݱݸױ档Դվ˵һЩѺõ£ +- Logo̱ͼ +- ͨõķתͼ磬ͼ꣩ +- ʽ +- ͨJavascriptļ +- ص +- ýļ +Щļڲı䣬ԳʱĶǽлܻúô + +һЩĿڻбע⣺ + +- HTMLҳ +- תͼ +- ޸ĵJavascriptCSSļ +- ½cookiesʵ + +һЩݴӦñ棺 + +- ϢصԴݣȣ +- ûҾĵ + +ͨù⣬ͨҪָһЩԱڸõػ治ͬݡ磬½ûͬվͼӦκεطҳ档½ûһʱڿվûеͼӦûݵмκн黺ͼ + +Webݻλ +----------------- + +Webݻַ·е಻ͬĵص㱻棺 + +- **** +- **м仺** +- **򻺴** From 7aa1e7554e0377791ec75d1688d59720191c77a7 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 12 May 2015 23:02:40 +0800 Subject: [PATCH 0795/2517] PUB:20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip] @martin2011qi --- ...reeze After Suspend In Ubuntu 14.04 [Quick Tip].md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md (69%) diff --git a/translated/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md b/published/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md similarity index 69% rename from translated/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md rename to published/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md index 0e766f4f66..320ca3da60 100644 --- a/translated/tech/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md +++ b/published/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md @@ -1,5 +1,6 @@ -[已解决] Ubuntu 14.04从待机中唤醒后鼠标键盘出现僵死情况 [快速小贴士] -================================================================================ +修复 Ubuntu 14.04 从待机中唤醒后鼠标键盘出现僵死情况 +========= + ### 问题: ### 当Ubuntu14.04或14.10从睡眠和待机状态恢复时,鼠标和键盘出现僵死,不能点击也不能输入。解决这种情况是唯一方法就是按关机键强关系统,这不仅非常不便且令人恼火。因为在Ubuntu的默认情况中合上笔记本等同于切换到睡眠模式。 @@ -12,15 +13,15 @@ sudo apt-get install --reinstall xserver-xorg-input-all -这则贴士源自一个自由开源读者Dev的提问。快试试这篇贴士,看看是否对你也有效。在一个类似的问题中,你可以[修复Ubuntu登录后无Unity界面、侧边栏和Dash的问题][1] +这则贴士源自一个我们的读者Dev的提问。快试试这篇贴士,看看是否对你也有效。在一个类似的问题中,你可以[修复Ubuntu登录后无Unity界面、侧边栏和Dash的问题][1]。 -------------------------------------------------------------------------------- via: http://itsfoss.com/keyboard-mouse-freeze-suspend/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From fa3765e0a48a909680b0bb8adb06b4636dee8b9e Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Tue, 12 May 2015 23:30:54 +0800 Subject: [PATCH 0796/2517] translate part of article --- ...ogy http headers and caching strategies.md | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md index a777d4f2c3..020881c9a3 100644 --- a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md +++ b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md @@ -81,7 +81,33 @@ Web Webݻַ·е಻ͬĵص㱻棺 -- **** -- **м仺** -- **򻺴** +- ****WebάһСͻ档͵أʹһֲָʾҪݡûصݻܻٴش۽ϸߡ +- **м仺**κڿͻ˺Ļܹ֮ķ԰һЩݡЩISPṩߣ֯ṩ +- **򻺴**ķܹΪ˵ķʵԼĻ档ʵ˻棬ôӴ㷵Ӧݶÿʹú˷ + +ЩλͨԸĻԺԴĻԻһЩӦݡ + +ͷ +-------- + +ͬءʵ屾ҪǷӦûɽܵݡֻ沿ֿԻݣܻ泬Ƶݡ + +ΪҪɻԾӵáЩҪضHTTPͷı + +ͬHTTPЭĵһЩͬľ۽ڻͷˣǵĸӶȸͬгЩҲӦעģ + +- **`Expires`**ʹ÷Χ൱ޣ`Expires`ͷǷdz˵ġͨһδʱ䣬ݻڴʱڡʱκζͬݵӦûصԭʼͷʺϻģʽfall back +- **`Cache-Control`**`Expires`һִ滻ѱܺõ֧֣ӵиʵ֡ڴУ`Expires`ãͬʱߵֵҲ޷Ժǽõ`Cache-Control`ϸѡ +- **`ETag`**`ETag`ڻ֤Դ״ηһʱΪṩһص`ETag`һҪ֤Ƿ񼴽ڣὫӦ`ETag`ͻطԴ߸߻һµģ߷͸ºݣµ`ETag` +- **`Last-Modified`**ͷָӦһα޸ĵʱ䡣ܻΪ֤ʶȵ֤Եһֱʹá +- **`Content-Length`**ܲûȷڻб漰`Content-Length`ͷûʱҪijЩǰ֪ݵĴС㹻ռ䣬ܾݡ +- **`Vary`**ϵͳͨʹ·Ϊ洢Դļ`Vary`ͷԱھһǷͬʱѻϵͳעһӵͷͨ߻ϵͳͬʹ`Accept-Encoding`ͷΪ˻ϵͳܹѹδѹݡ + +### Varyͷ + +`Vary`ͷṩ洢ͬһݲͬ汾ϡ˻ڡ + +`Accept-Encoding`İУ`Vary`ͷѹδѹӵоԵڷijЩܴѹݵʱҪԱ֤ʹá`Accept-Encoding``Vary`IJĺѡֵΪֻõֵһԡ + + From 3a58d7646e86aaaf6d9a0ddc2a19bbbf159650e4 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 12 May 2015 23:36:09 +0800 Subject: [PATCH 0797/2517] PUB:20150318 11 Linux Terminal Commands That Will Rock Your World @martin2011qi --- ...inal Commands That Will Rock Your World.md | 151 ++++++++++-------- 1 file changed, 82 insertions(+), 69 deletions(-) rename {translated/tech => published}/20150318 11 Linux Terminal Commands That Will Rock Your World.md (60%) diff --git a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/published/20150318 11 Linux Terminal Commands That Will Rock Your World.md similarity index 60% rename from translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md rename to published/20150318 11 Linux Terminal Commands That Will Rock Your World.md index fce6ed5c80..0160abb0c2 100644 --- a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md +++ b/published/20150318 11 Linux Terminal Commands That Will Rock Your World.md @@ -1,12 +1,13 @@ -11个Linux终端命令,让你的世界摇滚起来 +11个让你吃惊的 Linux 终端命令 ================================================================================ -我已经用了十年的Linux了,通过今天这篇文章我将向大家展示一系列的,我希望一开始就有人教导而不是曾在我成长道路上绊住我的Linux命令、工具和花招。 - -![Linux Keyboard Shortcuts.](http://f.tqn.com/y/linux/1/L/m/J/1/keyboardshortcuts.png) -Linux的快捷键。 +我已经用了十年的Linux了,通过今天这篇文章我将向大家展示一系列的命令、工具和技巧,我希望一开始就有人告诉我这些,而不是曾在我成长道路上绊住我。 ### 1. 命令行日常系快捷键 ### +![Linux Keyboard Shortcuts.](http://f.tqn.com/y/linux/1/L/m/J/1/keyboardshortcuts.png) + +*Linux的快捷键。* + 如下的快捷方式非常有用,能够极大的提升你的工作效率: - CTRL + U - 剪切光标前的内容 @@ -16,11 +17,11 @@ Linux的快捷键。 - CTRL + A - 移动光标到行首 - ALT + F - 跳向下一个空格 - ALT + B - 跳回上一个空格 -- ALT + Backspace - 删除前一个字 -- CTRL + W - 剪切光标后一个字 +- ALT + Backspace - 删除前一个单词 +- CTRL + W - 剪切光标后一个单词 - Shift + Insert - 向终端内粘贴文本 -那么为了让上诉内容更易理解来看下面的这行命令。 +那么为了让上述内容更易理解来看下面的这行命令。 sudo apt-get intall programname @@ -28,7 +29,7 @@ Linux的快捷键。 想象现在光标正在行末,我们有很多的方法将她退回单词install并替换它。 -我可以按两次ALT+B这样光标就会在如下的位置(这里用^代替光标的位置)。 +我可以按两次ALT+B这样光标就会在如下的位置(这里用^指代光标的位置)。 sudo apt-get^intall programname @@ -36,32 +37,36 @@ Linux的快捷键。 如果你想将浏览器中的文本复制到终端,可以使用快捷键"shift + insert"。 -![](http://f.tqn.com/y/linux/1/L/n/J/1/sudotricks2.png) ### 2. SUDO !! ### -这个命令如果你还不知道我觉得你应该好好感谢我,因为如果你不知道那每次你在输入长串命令后看到“permission denied”后一定会痛恼不堪。 +![](http://f.tqn.com/y/linux/1/L/n/J/1/sudotricks2.png) + +*sudo !!* + +如果你还不知道这个命令,我觉得你应该好好感谢我,因为如果你不知道的话,那每次你在输入长串命令后看到“permission denied”后一定会痛恼不堪。 - sudo !! -如何使用sudo !!?很简单。试想你刚输入了如下命令: +如何使用sudo !!?很简单。试想你刚输入了如下命令: apt-get install ranger -一定会出现"Permission denied"除非你的登录了足够高权限的账户。 +一定会出现“Permission denied”,除非你已经登录了足够高权限的账户。 -sudo !!就会用sudo的形式运行上一条命令。所以上一条命令可以看成是这样: +sudo !! 就会用 sudo 的形式运行上一条命令。所以上一条命令就变成了这样: sudo apt-get install ranger -如果你不知道什么是sudo[戳这里][1]。 - -![Pause Terminal Applications.](http://f.tqn.com/y/linux/1/L/o/J/1/pauseapps.png) -暂停终端运行的应用程序。 +如果你不知道什么是sudo,[戳这里][1]。 ### 3. 暂停并在后台运行命令 ### -我曾经写过一篇如何在终端后台运行命令的指南。 +![Pause Terminal Applications.](http://f.tqn.com/y/linux/1/L/o/J/1/pauseapps.png) + +*暂停终端运行的应用程序。* + +我曾经写过一篇[如何在终端后台运行命令的指南][13]。 - CTRL + Z - 暂停应用程序 - fg - 重新将程序唤到前台 @@ -74,41 +79,42 @@ sudo !!就会用sudo的形式运行上一条命令。所以上一条命令可以 文件编辑到一半你意识到你需要马上在终端输入些命令,但是nano在前台运行让你不能输入。 -你可能觉得唯一的方法就是保存文件,推出nano,运行命令以后在重新打开nano。 +你可能觉得唯一的方法就是保存文件,退出 nano,运行命令以后在重新打开nano。 -其实你只要按CTRL + Z前台的命令就会暂停,画面就切回到命令行了。然后你就能运行你想要运行命令,等命令运行完后在终端窗口输入“fg”就可以回到先前暂停的任务。 +其实你只要按CTRL + Z,前台的命令就会暂停,画面就切回到命令行了。然后你就能运行你想要运行命令,等命令运行完后在终端窗口输入“fg”就可以回到先前暂停的任务。 有一个尝试非常有趣就是用nano打开文件,输入一些东西然后暂停会话。再用nano打开另一个文件,输入一些什么后再暂停会话。如果你输入“fg”你将回到第二个用nano打开的文件。只有退出nano再输入“fg”,你才会回到第一个用nano打开的文件。 -![nohup.](http://f.tqn.com/y/linux/1/L/p/J/1/nohup3.png) -nohup. - ### 4. 使用nohup在登出SSH会话后仍运行命令 ### -如果你用ssh登录别的机器时,[nohup命令]真的非常有用。 +![nohup.](http://f.tqn.com/y/linux/1/L/p/J/1/nohup3.png) + +*nohup* + +如果你用ssh登录别的机器时,[nohup命令][2]真的非常有用。 那么怎么使用nohup呢? 想象一下你使用ssh远程登录到另一台电脑上,你运行了一条非常耗时的命令然后退出了ssh会话,不过命令仍在执行。而nohup可以将这一场景变成现实。 -举个例子以测试为目的我用[树莓派][3]来下载发行版。 +举个例子,因为测试的需要,我用我的[树莓派][3]来下载发行版。我绝对不会给我的树莓派外接显示器、键盘或鼠标。 -我绝对不会给我的树莓派外接显示器、键盘或鼠标。 - -一般我总是用[SSH] [4]从笔记本电脑连接到树莓派。如果我在不用nohup的情况下使用树莓派下载大型文件,那我就必须等待到下载完成后才能登出ssh会话关掉笔记本。如果是这样那我为什么要使用树莓派下文件呢? +一般我总是用[SSH][4]从笔记本电脑连接到树莓派。如果我在不用nohup的情况下使用树莓派下载大型文件,那我就必须等待到下载完成后,才能登出ssh会话关掉笔记本。可如果是这样,那我为什么要使用树莓派下文件呢? 使用nohup的方法也很简单,只需如下例中在nohup后输入要执行的命令即可: nohup wget http://mirror.is.co.za/mirrors/linuxmint.com/iso//stable/17.1/linuxmint-17.1-cinnamon-64bit.iso & -![Schedule tasks with at.](http://f.tqn.com/y/linux/1/L/q/J/1/at.png) -At管理任务日程 ### 5. ‘在’特定的时间运行Linux命令 ### +![Schedule tasks with at.](http://f.tqn.com/y/linux/1/L/q/J/1/at.png) + +*At管理任务日程* + ‘nohup’命令在你用SSH连接到服务器,并在上面保持执行SSH登出前任务的时候十分有用。 -想一下如果你需要在特定的时间执行同一个命令,这种情况该怎么办呢? +想一下如果你需要在特定的时间执行相同的命令,这种情况该怎么办呢? 命令‘at’就能妥善解决这一情况。以下是‘at’使用示例。 @@ -116,78 +122,80 @@ At管理任务日程 at> cowsay 'hello' at> CTRL + D -上面的命令能在周五下午10时38分运行程序[cowsay] [5]。 +上面的命令能在周五下午10时38分运行程序[cowsay][5]。 -使用的语法就是‘at’后追加日期时间。 +使用的语法就是‘at’后追加日期时间。当at>提示符出现后就可以输入你想在那个时间运行的命令了。 -当at>提示符出现后就可以输入你想在那个时间运行的命令了。 +CTRL + D 返回终端。 -CTRL + D返回终端。 +还有许多日期和时间的格式,都需要你好好翻一翻‘at’的man手册来找到更多的使用方式。 -还有许多日期和时间的格式都是值得的你好好翻一翻‘at’的man手册来找到更多的使用方式。 - -![](http://f.tqn.com/y/linux/1/L/l/J/1/manmost.png) ### 6. Man手册 ### -Man手册会为你列出命令和参数的使用大纲,教你如何使用她们。 +![](http://f.tqn.com/y/linux/1/L/l/J/1/manmost.png) -Man手册看起开沉闷呆板。(我思忖她们也不是被设计来娱乐我们的)。 +*彩色man 手册* -不过这不代表你不能做些什么来使她们变得性感点。 +Man手册会为你列出命令和参数的使用大纲,教你如何使用她们。Man手册看起来沉闷呆板。(我思忖她们也不是被设计来娱乐我们的)。 + +不过这不代表你不能做些什么来使她们变得漂亮些。 export PAGER=most -你需要 ‘most’;她会使你的你的man手册的色彩更加绚丽。 +你需要安装 ‘most’;她会使你的你的man手册的色彩更加绚丽。 -你可以用一下命令给man手册设定指定的行长: +你可以用以下命令给man手册设定指定的行长: export MANWIDTH=80 -最后,如果你有浏览器,你可以使用-H在默认浏览器中打开任意的man页。 +最后,如果你有一个可用的浏览器,你可以使用-H在默认浏览器中打开任意的man页。 man -H -注意啦,以上的命令只有在你将默认的浏览器已经设置到环境变量$BROWSER中了之后才效果哟。 +注意啦,以上的命令只有在你将默认的浏览器设置到环境变量$BROWSER中了之后才效果哟。 -![View Processes With htop.](http://f.tqn.com/y/linux/1/L/r/J/1/nohup2.png) -使用htop查看进程。 ### 7. 使用htop查看和管理进程 ### -你用哪个命令找出电脑上正在运行的进程的呢?我敢打赌是‘[ps][6]’并在其后加不同的参数来得到你所想要的不同输出。 +![View Processes With htop.](http://f.tqn.com/y/linux/1/L/r/J/1/nohup2.png) + +*使用htop查看进程。* + +你用哪个命令找出电脑上正在运行的进程的呢?我敢打赌是‘[ps][6]’并在其后加不同的参数来得到你所想要的不同输出。 安装‘[htop][7]’吧!绝对让你相见恨晚。 -htop在终端中将进程以列表的方式呈现,有点类似于Windows中的任务管理器。 - -你可以使用功能键的组合来切换排列的方式和展示出来的项。你也可以在htop中直接杀死进程。 +htop在终端中将进程以列表的方式呈现,有点类似于Windows中的任务管理器。你可以使用功能键的组合来切换排列的方式和展示出来的项。你也可以在htop中直接杀死进程。 在终端中简单的输入htop即可运行。 htop -![Command Line File Manager - Ranger.](http://f.tqn.com/y/linux/1/L/s/J/1/ranger.png) -命令行文件管理 - Ranger. - ### 8. 使用ranger浏览文件系统 ### -如果说htop是命令行进程控制的好帮手那么[ranger][8]就是命令行浏览文件系统的好帮手。 +![Command Line File Manager - Ranger.](http://f.tqn.com/y/linux/1/L/s/J/1/ranger.png) + +*命令行文件管理 - Ranger* + +如果说htop是命令行进程控制的好帮手,那么[ranger][8]就是命令行浏览文件系统的好帮手。 你在用之前可能需要先安装,不过一旦安装了以后就可以在命令行输入以下命令启动她: ranger -在命令行窗口中ranger和一些别的文件管理器很像,但是她是左右结构的比起上下的来意味着你按左方向键你将前进到上一个文件夹结构而右方向键则会切换到下一个。 +在命令行窗口中ranger和一些别的文件管理器很像,但是相比上下结构布局,她是左右结构的,这意味着你按左方向键你将前进到上一个文件夹,而右方向键则会切换到下一个。 在使用前ranger的man手册还是值得一读的,这样你就可以用快捷键操作ranger了。 -![Cancel Linux Shutdown.](http://f.tqn.com/y/linux/1/L/t/J/1/shutdown.png) -Linux取消关机。 ### 9. 取消关机 ### -无论是在命令行还是图形用户界面[关机][9]后发现自己不是真的想要关机。 +![Cancel Linux Shutdown.](http://f.tqn.com/y/linux/1/L/t/J/1/shutdown.png) + +*Linux取消关机。* + +无论是在命令行还是图形用户界面[关机][9]后,才发现自己不是真的想要关机。 shutdown -c @@ -197,11 +205,13 @@ Linux取消关机。 - [pkill][10] shutdown -![Kill Hung Processes With XKill.](http://f.tqn.com/y/linux/1/L/u/J/1/killhungprocesses.png) -使用XKill杀死挂起进程。 ### 10. 杀死挂起进程的简单方法 ### +![Kill Hung Processes With XKill.](http://f.tqn.com/y/linux/1/L/u/J/1/killhungprocesses.png) + +*使用XKill杀死挂起进程。* + 想象一下,你正在运行的应用程序不明原因的僵死了。 你可以使用‘ps -ef’来找到该进程后杀掉或者使用‘htop’。 @@ -214,18 +224,20 @@ Linux取消关机。 那如果整个系统挂掉了怎么办呢? -按住键盘上的‘alt’和‘sysrq’同时输入: +按住键盘上的‘alt’和‘sysrq’不放,然后慢慢输入以下键: - [REISUB][12] 这样不按电源键你的计算机也能重启了。 -![youtube-dl.](http://f.tqn.com/y/linux/1/L/v/J/1/youtubedl2.png) -youtube-dl. ### 11. 下载Youtube视频 ### -一般来说我们大多数人都喜欢看Youtube的视频,也会通过钟爱的播放器播放Youtube的流。 +![youtube-dl.](http://f.tqn.com/y/linux/1/L/v/J/1/youtubedl2.png) + +*youtube-dl.* + +一般来说我们大多数人都喜欢看Youtube的视频,也会通过钟爱的播放器播放Youtube的流媒体。 如果你需要离线一段时间(比如:从苏格兰南部坐飞机到英格兰南部旅游的这段时间)那么你可能希望下载一些视频到存储设备中,到闲暇时观看。 @@ -235,7 +247,7 @@ youtube-dl. youtube-dl url-to-video -你能在Youtubu视频页面点击分享链接得到视频的url。只要简单的复制链接在粘帖到命令行就行了(要用shift + insert快捷键哟)。 +你可以在Youtubu视频页面点击分享链接得到视频的url。只要简单的复制链接在粘帖到命令行就行了(要用shift + insert快捷键哟)。 ### 总结 ### @@ -246,8 +258,8 @@ youtube-dl. via: http://linux.about.com/od/commands/tp/11-Linux-Terminal-Commands-That-Will-Rock-Your-World.htm 作者:[Gary Newell][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -264,3 +276,4 @@ via: http://linux.about.com/od/commands/tp/11-Linux-Terminal-Commands-That-Will- [10]:http://linux.about.com/library/cmd/blcmdl1_pkill.htm [11]:http://linux.about.com/od/funnymanpages/a/funman_xkill.htm [12]:http://blog.kember.net/articles/reisub-the-gentle-linux-restart/ +[13]:http://linux.about.com/od/commands/fl/How-To-Run-Linux-Programs-From-The-Terminal-In-Background-Mode.htm From d913a14478d0eab411cf1b087189b02af6ef73ff Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 13 May 2015 06:35:29 +0800 Subject: [PATCH 0798/2517] PUB:20150304 Monitoring Your Network And Servers With Observium @theo-l --- ...Your Network And Servers With Observium.md | 172 ------------------ 1 file changed, 172 deletions(-) delete mode 100644 translated/tech/20150304 Monitoring Your Network And Servers With Observium.md diff --git a/translated/tech/20150304 Monitoring Your Network And Servers With Observium.md b/translated/tech/20150304 Monitoring Your Network And Servers With Observium.md deleted file mode 100644 index 9c78793904..0000000000 --- a/translated/tech/20150304 Monitoring Your Network And Servers With Observium.md +++ /dev/null @@ -1,172 +0,0 @@ - -使用Observium来监控你的网络和服务器 -================================================================================ -### 简介### - -在监控你的服务器,交换机或者物理机器时有过问题吗?, **Observium**可以满足你的需求.作为一个免费的监控系统,可以帮助你远程监控你的服务器.它是一个由PHP编写的基于自动发现SNMP的网络监控平台,支持非常广泛的网络硬件和操作系统,包括 Cisco,Windows,Linux,HP,NetApp等.在此我会通过在Ubuntu12.04上设置一个**Observium**服务器的同时提供相应的步骤. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture1.png) - -目前存在两种不同的**observium**版本. - -- Observium 社区版本是一个在QPL开源许可证下的免费工具,这个版本时对于较小部署的最好解决方案. 该版本每6个月得到一次安全性更新. -- 第2个版本是Observium Professional, 该版本在基于SVN的发布机制下的发行版. 会得到每日安全性更新. 该工具适用于服务提供商和企业级部署. - -更多信息可以通过其官网获得[website of Observium][1]. - -### 系统需求### - -为了安装 **Observium**, 需要具有一个最新安装的服务器。**Observium**是在Ubuntu LTS和Debian系统上进行开发的,所以推荐在Ubuntu或Debian上安装**Observium**,因为可能在别的平台上会有一些小问题。 - -该文章会知道你如何在Ubuntu12.04上进行安装**Observium**。对于小型的**Observium**安装,推荐的基础配置要有256MB内存和双核处理器。 - -### 安装需求 ### - -在安装**Observuim**之前,你需要确认安装所有的依赖关系包。 - -首先,使用下面的命令更新的服务器: - - sudo apt-get update - -然后你需要安装运行Observuim 所需的全部包。 - -Observium需要使用下面所列出的软件才能正确的运行: - -- LAMP server -- fping -- Net-SNMP 5.4+ -- RRDtool 1.3+ -- Graphviz - -对于可选特性的要求: - -- Ipmitool - 只有当你想要探寻IPMI(Intelligent Platform Management Interface智能平台管理接口)基板控制器。 -- Libvirt-bin - 只有当你想要使用libvirt进行远程VM主机监控时。 - - sudo apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-json php-pear snmp fping mysql-server mysql-client python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick libvirt ipmitool - -### 为Observium创建MySQL 数据库和用户。 - -现在你需要登录到MySQL中并为**Observium**创建数据库: - mysql -u root -p - -在用户验证成功之后,你需要按照下面的命令创建该数据库。 - - CREATE DATABASE observium; - -数据库名为**Observium**,稍后你会需要这个信息。 - -现在你需要创建数据库管理员用户。 - - CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword'; - -接下来,你需要给该管理员用户相应的权限来管理创建的数据库。 - - GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost; - -你需要将权限信息写回到磁盘中来激活新的MySQL用户: - - FLUSH PRIVILEGES; - exit - -### 下载并安装 Observium### - -现在我们的系统已经准备好了, 可以开始Observium的安装了。 - -第一步,创建Observium将要使用的文件目录: - mkdir -p /opt/observium && cd /opt - -为了达到本教程的目的,我们将会使用Observium的社区/开源版本。使用下面的命令下载并解压: - - wget http://www.observium.org/observium-community-latest.tar.gz - tar zxvf observium-community-latest.tar.gz - -现在进入到Observium目录。 - - cd observium - -将默认的配置文件'**config.php.default**'复制到'**config.php**',并将数据库配置选项填充到配置文件中: - - cp config.php.default config.php - nano config.php - ----------- - - / Database config - $config['db_host'] = 'localhost'; - $config['db_user'] = 'observiumadmin'; - $config['db_pass'] = 'observiumpassword'; - $config['db_name'] = 'observium'; - -现在为MySQL数据库设置默认的数据库模式: - php includes/update/update.php - -现在你需要创建一个文件目录来存储rrd文件,并修改其权限以便让apache能将写入到文件中。 - - mkdir rrd - chown apache:apache rrd - -为了在出现问题时进行问题修理,你需要创建日志文件。 - - mkdir -p /var/log/observium - chown apache:apache /var/log/observium - -现在你需要为Observium创建虚拟主机配置。 - - - DocumentRoot /opt/observium/html/ - ServerName observium.domain.com - CustomLog /var/log/observium/access_log combined - ErrorLog /var/log/observium/error_log - - AllowOverride All - Options FollowSymLinks MultiViews - - - -下一步你需要让你的Apache服务器的rewrite(重写)功能生效。 - -为了让'mod_rewrite'生效,输入以下命令: - - sudo a2enmod rewrite - -该模块在下一次Apache服务重启之后就会生效。 - - sudo service apache2 restart - -###配置Observium### - -在登入网络接口之前,你需要为Observium创建一个管理员账户(级别10)。 - - # cd /opt/observium - # ./adduser.php admin adminpassword 10 - User admin added successfully. - -下一步为发现和探寻工作设置一个cron任务,创建一个新的文件‘**/etc/cron.d/observium**’ 并在其中添加以下的内容。 - - 33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1 - */5 * * * * root /opt/observium/discovery.php -h new >> /dev/null 2>&1 - */5 * * * * root /opt/observium/poller-wrapper.py 1 >> /dev/null 2>&1 - -重载cron进程来获取系的人物实体。 - - # /etc/init.d/cron reload - -好啦,你已经完成了Observium服务器的安装拉! 使用你的浏览器登录到**http://**,然后上路巴。 - -![](https://www.unixmen.com/wp-content/uploads/2015/03/Capture.png) - -尽情享受吧! - --------------------------------------------------------------------------------- - -via: https://www.unixmen.com/monitoring-network-servers-observium/ - -作者:[anismaj][a] -译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://www.unixmen.com/author/anis/ -[1]:http://www.observium.org/ From c8baeb050af8e4c6fcfad6b13044833f13dbdca8 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 13 May 2015 06:45:24 +0800 Subject: [PATCH 0799/2517] PUB:20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux @Vic020 --- ...G images from the command line on Linux.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md (75%) diff --git a/translated/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md b/published/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md similarity index 75% rename from translated/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md rename to published/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md index 6d72a9f5d9..6d08d4d7f6 100644 --- a/translated/tech/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md +++ b/published/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md @@ -1,12 +1,12 @@ -Linux有问必答--如何使用命令行压缩JPEG图像 +Linux有问必答:如何在命令行下压缩JPEG图像 ================================================================================ > **问题**: 我有许多数码照相机拍出来的照片。我想在上传到Dropbox之前,优化和压缩下JPEG图片。有没有什么简单的方法压缩JPEG图片并不损耗他们的质量? 如今拍照设备(如智能手机、数码相机)拍出来的图片分辨率越来越大。甚至3630万像素的Nikon D800已经冲入市场,并且这个趋势根本停不下来。如今的拍照设备不断地提高着照片分辨率,使得我们不得不压缩后,再上传到有储存限制、带宽限制的云。 -事实上,这里有一个非常简单的方法压缩JPEG图像。一个叫“jpegoptim”命令行工具可以帮助你“无损”美化JPEG图像,所以你可以压缩JPEG图片而不至于牺牲他们的质量。万一你的存储空间和带宽预算真的很少,jpegoptim也支持“有损耗”压缩来调整图像大小。 +事实上,这里有一个非常简单的方法压缩JPEG图像。一个叫“jpegoptim”命令行工具可以帮助你“无损”美化JPEG图像,让你可以压缩JPEG图片而不至于牺牲他们的质量。万一你的存储空间和带宽预算真的很少,jpegoptim也支持“有损”压缩来调整图像大小。 -如果要压缩PNG图像,参考[this guideline][1]例子。 +如果要压缩PNG图像,参考[这个指南][1]的例子。 ### 安装jpegoptim ### @@ -34,7 +34,7 @@ CentOS/RHEL安装,先开启[EPEL库][2],然后运行下列命令: 注意,原始图像会被压缩后图像覆盖。 -如果jpegoptim不能无损美化图像,将不会覆盖 +如果jpegoptim不能无损美化图像,将不会覆盖它: $ jpegoptim -v photo.jpg @@ -46,21 +46,21 @@ CentOS/RHEL安装,先开启[EPEL库][2],然后运行下列命令: $ jpegoptim -d ./compressed photo.jpg -这样,压缩的图片将会保存在./compressed目录(已同样的输入文件名) +这样,压缩的图片将会保存在./compressed目录(以同样的输入文件名) 如果你想要保护文件的创建修改时间,使用"-p"参数。这样压缩后的图片会得到与原始图片相同的日期时间。 $ jpegoptim -d ./compressed -p photo.jpg -如果你只是想获得无损压缩率,使用"-n"参数来模拟压缩,然后它会打印压缩率。 +如果你只是想看看无损压缩率而不是真的想压缩它们,使用"-n"参数来模拟压缩,然后它会显示出压缩率。 $ jpegoptim -n photo.jpg ### 有损压缩JPG图像 ### -万一你真的需要要保存在云空间上,你可以使用有损压缩JPG图片。 +万一你真的需要要保存在云空间上,你还可以使用有损压缩JPG图片。 -这种情况下,使用"-m<质量>"选项,质量数范围0到100。(0是最好质量,100是最坏质量) +这种情况下,使用"-m<质量>"选项,质量数范围0到100。(0是最好质量,100是最差质量) 例如,用50%质量压缩图片: @@ -76,7 +76,7 @@ CentOS/RHEL安装,先开启[EPEL库][2],然后运行下列命令: ### 一次压缩多张JPEG图像 ### -最常见的情况是需要压缩一个目录下的多张JPEG图像文件。为了应付这种情况,你可以使用接下里的脚本。 +最常见的情况是需要压缩一个目录下的多张JPEG图像文件。为了应付这种情况,你可以使用接下来的脚本。 #!/bin/sh @@ -90,11 +90,11 @@ CentOS/RHEL安装,先开启[EPEL库][2],然后运行下列命令: via: http://ask.xmodulo.com/compress-jpeg-images-command-line-linux.html 作者:[Dan Nanni][a] -译者:[VicYu/Vic020](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[VicYu/Vic020](https://github.com/Vic020) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni [1]:http://xmodulo.com/how-to-compress-png-files-on-linux.html -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[2]:https://linux.cn/article-2324-1.html From 371acfbc6b2a1033e283a136522ae0d31c8c2174 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 13 May 2015 07:14:45 +0800 Subject: [PATCH 0800/2517] PUB:20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux @ZTinoZ --- ...onment using Commandline Tools in Linux.md | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md (93%) diff --git a/translated/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/published/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md similarity index 93% rename from translated/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md rename to published/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md index 3ece220dd5..7c133f90af 100644 --- a/translated/tech/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md +++ b/published/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md @@ -4,7 +4,7 @@ ![KVM Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/KVM-Management-in-Linux.jpg) -Linux系统的KVM管理 +*Linux系统的KVM管理* 在这篇文章里没有什么新的概念,我们只是用命令行工具重复之前所做过的事情,也没有什么前提条件,都是相同的过程,之前的文章我们都讨论过。 @@ -31,35 +31,40 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 # virsh pool-define-as Spool1 dir - - - - "/mnt/personal-data/SPool1/" ![Create New Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Storage-Pool.png) -创建新存储池 + +*创建新存储池* **2. 查看环境中我们所有的存储池,用以下命令。** # virsh pool-list --all ![List All Storage Pools](http://www.tecmint.com/wp-content/uploads/2015/02/List-All-Storage-Pools.png) -列出所有存储池 + +*列出所有存储池* **3. 现在我们来构造存储池了,用以下命令来构造我们刚才定义的存储池。** # virsh pool-build Spool1 ![Build Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Build-Storage-Pool.png) -构造存储池 -**4. 用virsh带pool-start的命令来激活并启动我们刚才创建并构造完成的存储池。** +*构造存储池* + +**4. 用带pool-start参数的virsh命令来激活并启动我们刚才创建并构造完成的存储池。** # virsh pool-start Spool1 ![Active Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Active-Storage-Pool.png) -激活存储池 + +*激活存储池* **5. 查看环境中存储池的状态,用以下命令。** # virsh pool-list --all ![Check Storage Pool Status](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Pool-Status.png) -查看存储池状态 + +*查看存储池状态* 你会发现Spool1的状态变成了已激活。 @@ -68,14 +73,16 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 # virsh pool-autostart Spool1 ![Configure KVM Storage Pool](http://www.tecmint.com/wp-content/uploads/2015/02/Configure-Storage-Pool.png) -配置KVM存储池 + +*配置KVM存储池* **7. 最后来看看我们新的存储池的信息吧。** # virsh pool-info Spool1 ![Check KVM Storage Pool Information](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Pool-Information.png) -查看KVM存储池信息 + +*查看KVM存储池信息* 恭喜你,Spool1已经准备好待命,接下来我们试着创建存储卷来使用它。 @@ -90,12 +97,14 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 # qemu-img create -f raw /mnt/personal-data/SPool1/SVol1.img 10G ![Create Storage Volume](http://www.tecmint.com/wp-content/uploads/2015/02/Create-Storage-Volumes.png) -创建存储卷 + +*创建存储卷* **9. 通过使用带info的qemu-img命令,你可以获取到你的新磁盘映像的一些信息。** ![Check Storage Volume Information](http://www.tecmint.com/wp-content/uploads/2015/02/Check-Storage-Volume-Information.png) -查看存储卷信息 + +*查看存储卷信息* **警告**: 不要用qemu-img命令来修改被运行中的虚拟机或任何其它进程所正在使用的映像,那样映像会被破坏。 @@ -120,15 +129,18 @@ Virsh命令行工具是一款管理virsh客户域的用户界面。virsh程序 # virt-install --name=rhel7 --disk path=/mnt/personal-data/SPool1/SVol1.img --graphics spice --vcpu=1 --ram=1024 --location=/run/media/dos/9e6f605a-f502-4e98-826e-e6376caea288/rhel-server-7.0-x86_64-dvd.iso --network bridge=virbr0 ![Create New Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Create-New-Virtual-Machines.png) -创建新的虚拟机 + +*创建新的虚拟机* **11. 你会看到弹出一个virt-vierwer窗口,像是在通过它在与虚拟机通信。** ![Booting Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Booting-Virtual-Machine.jpeg) -虚拟机启动程式 + +*虚拟机启动程式* ![Installation of Virtual Machine](http://www.tecmint.com/wp-content/uploads/2015/02/Installation-of-Virtual-Machine.jpeg) -虚拟机安装过程 + +*虚拟机安装过程* ### 结论 ### @@ -143,7 +155,7 @@ via: http://www.tecmint.com/kvm-management-tools-to-manage-virtual-machines/ 作者:[Mohammad Dosoukey][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 99482de653cbee973cd78a5106d32628fc5d9ef6 Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 13 May 2015 12:10:19 +0800 Subject: [PATCH 0801/2517] Update 20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md --- ... with Answers--How to view torrent file content on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md b/sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md index 8c2df9a5bd..7f82ca2aa5 100644 --- a/sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md +++ b/sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Linux FAQs with Answers--How to view torrent file content on Linux ================================================================================ > **Question**: I have a torrent file downloaded from the web. Is there a tool that allows me to view the content of a torrent on Linux? For example, I want to know what files are included inside a torrent. @@ -60,4 +61,4 @@ via: http://ask.xmodulo.com/view-torrent-file-content-linux.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://dumptorrent.sourceforge.net/ -[2]:http://ask.xmodulo.com/change-path-environment-variable-linux.html \ No newline at end of file +[2]:http://ask.xmodulo.com/change-path-environment-variable-linux.html From 4544fa955516dc4d182f66a7b5a09800eab7c79f Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Wed, 13 May 2015 13:09:26 +0800 Subject: [PATCH 0802/2517] translate part of article --- ...ogy http headers and caching strategies.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md index 020881c9a3..ae7ab6f1a1 100644 --- a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md +++ b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md @@ -109,5 +109,31 @@ Web `Accept-Encoding`İУ`Vary`ͷѹδѹӵоԵڷijЩܴѹݵʱҪԱ֤ʹá`Accept-Encoding``Vary`IJĺѡֵΪֻõֵһԡ +`User-Agent`ͷһʼȥƶԱվṩ컯ķĺ⡣`User-Agent`ַǷDZ׼ġм仺жͬһݵ಻ͬ汾Ļ棬ᵼ»ʵĽ͡`Vary`ͷӦñصʹã߱Ƶм棨磬ݷַ磩ʹ׼ +Ʊ־Ӱ컺 +------------------------ +ᵽ`Cache-Control`ͷαִԱ׼಻ͬĻָܹͨͷ趨ָͬͨŽзַָ + +һЩʹõָʾݻԵ`Cache-Control`ѡ£ + +- **`no-cache`**ָָʾлµ󵽴ʱ֤ٷ͸ͻˡָʵʽ̱ΪڵģDZ֤֤Աݡ +- **`no-store`**ָָʾݲκηʽ档ʺڻظϢʱá +- **`public`**ݱΪеģζܱκмڵ㻺档ͨʹHTTP֤ظĬϱΪ`private``public`ǽḲá +- **`private`**ݱΪ˽еġ˽ݿԱû棬**κмڵ㻺档ͨûصݡ +- **`max-age`**ָʾ˻ݵڣںԴ֤ءִѡȡ`Expires`ͷҲΪݵʶȵĻѡֵΪλʾԱʾһʶȣ31536000룩 +- **`s-maxage`**ѡdz`max-age`ָܹʱ䡣ѡֻмڵĻЧѡԹĻԡ +- **`must-revalidate`**ָ`max-age``s-maxage``Expires`ͷָʶϢ뱻ϸء˻жϵƵijбʹá +- **`proxy-revalidate`**ѡһãֻӦмĴڵ㡣£ûжʱʹùݣмĻݲڴĿġ +- **`no-transform`**ѡ߻κ¶Ϊܵԭ޸Ľյݡζţ治ѹյݣûдԭʼչѹ汾ĸݣ͡ + +ЩѡܹԲͬķʽԻòͬĻΪһЩֵ£ + +- `no-cache``no-store`ԼǰΪᵽѡָijõĻΪ +- `public``private` + +`no-store``no-cache`ãô`no-store`ȡ`no-cache`ڷȨĻظ`public`áȨĻظ`private`ѡġǿͨ`Cache-Control`ͷָӦ෴ѡԸǡ + +һֻ +---------------- From 4707be26fc8e0fc5a97e01b6a2e4b0e0f8269cda Mon Sep 17 00:00:00 2001 From: cvsher <478990879@qq.com> Date: Wed, 13 May 2015 13:23:13 +0800 Subject: [PATCH 0803/2517] Create [translated]Linux grep command with 14 different examples.md --- ...grep command with 14 different examples.md | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 translated/tech/[translated]Linux grep command with 14 different examples.md diff --git a/translated/tech/[translated]Linux grep command with 14 different examples.md b/translated/tech/[translated]Linux grep command with 14 different examples.md new file mode 100644 index 0000000000..cff151dd09 --- /dev/null +++ b/translated/tech/[translated]Linux grep command with 14 different examples.md @@ -0,0 +1,174 @@ +###概述:### + +所有类linux系统都会提供一个名为**grep(global regular expression print)**的搜索工具。grep命令在基于模式对一个或多个文件内容进行搜索的情况下是非常有用的。一个模式可以是单个字符、多个字符、单个单词、或者是一个句子。 + +当命令匹配到执行命令时指定的模式时,grep会将包含模式的一行输出,但是并不对原文件内容进行修改。 + +在本文中,我们将会讨论到14个grep命令的例子。 + +###1 在文件中查找模式(单词)### + +在/etc/passwd文件中查找单词“linuxtechi” + + root@Linux-world:~# grep linuxtechi /etc/passwd + linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +###2 在多个文件中查找模式。### + + root@Linux-world:~# grep linuxtechi /etc/passwd /etc/shadow /etc/gshadow + /etc/passwd:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + /etc/shadow:linuxtechi:$6$DdgXjxlM$4flz4JRvefvKp0DG6re:16550:0:99999:7:::/etc/gshadow:adm:*::syslog,linuxtechi + /etc/gshadow:cdrom:*::linuxtechi + /etc/gshadow:sudo:*::linuxtechi + /etc/gshadow:dip:*::linuxtechi + /etc/gshadow:plugdev:*::linuxtechi + /etc/gshadow:lpadmin:!::linuxtechi + /etc/gshadow:linuxtechi:!:: + /etc/gshadow:sambashare:!::linuxtechi + root@Linux-world:~# + +###3 使用-l参数列出包含指定模式的文件的文件名。### + + root@Linux-world:~# grep -l linuxtechi /etc/passwd /etc/shadow /etc/fstab /etc/mtab + /etc/passwd + /etc/shadow + root@Linux-world:~# + +###4 使用-n参数,在文件中查找指定模式及其相关的行号### + + root@Linux-world:~# grep -n linuxtechi /etc/passwd + 39:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +root@Linux-world:~# grep -n root /etc/passwd /etc/shadow + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-n-root.jpg) + +###5 使用-v参数输出不包含指定模式的行### + +输出/etc/passwd文件中所有不含单词“linuxtechi”的行 + + root@Linux-world:~# grep -v linuxtechi /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-v-option.jpg) + +###6 使用^符号输出所有以某指定模式开头的行### + +Bash脚本将^符号当作特殊字符处理,用于指定一行或者一个单词的开始。例如输出/etc/passes文件中所有以“root”开头的行 + + root@Linux-world:~# grep ^root /etc/passwd + root:x:0:0:root:/root:/bin/bash + root@Linux-world:~# + +###7 使用 $ 符号输出所有以指定模式结尾的行。### + +输出/etc/passwd文件中所有以“bash”结尾的行。 + + root@Linux-world:~# grep bash$ /etc/passwd + root:x:0:0:root:/root:/bin/bash + linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +Bash脚本将美元($)符号当作特殊字符,用于指定一行或者一个单词的结尾。 + +###8 使用 -r 参数递归的查找特定模式### + + + root@Linux-world:~# grep -r linuxtechi /etc/ + /etc/subuid:linuxtechi:100000:65536 + /etc/group:adm:x:4:syslog,linuxtechi + /etc/group:cdrom:x:24:linuxtechi + /etc/group:sudo:x:27:linuxtechi + /etc/group:dip:x:30:linuxtechi + /etc/group:plugdev:x:46:linuxtechi + /etc/group:lpadmin:x:115:linuxtechi + /etc/group:linuxtechi:x:1000: + /etc/group:sambashare:x:131:linuxtechi + /etc/passwd-:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + /etc/passwd:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + ............................................................................ + +上面的命令将会递归的在/etc目录中查找“linuxtechi”单词 + +###9 使用grep查找文件中所有的空行 + + root@Linux-world:~# grep ^$ /etc/shadow + root@Linux-world:~# + +由于/etc/shadow文件中没有空行,所以没有任何输出 + +###10 使用“grep -i”参数查找模式### + +grep命令的-i参数在查找时忽略字符的大小写。 + +我们来看一个例子,在paswd文件中查找“LinuxTechi”单词。 + + nextstep4it@localhost:~$ grep -i LinuxTechi /etc/passwd + linuxtechi:x:1001:1001::/home/linuxtechi:/bin/bash + nextstep4it@localhost:~$ + +###11 使用-e参数查找多个模式### + +例如,我想在一条grep命令中查找‘linuxtechi’和‘root’单词,使用-e参数,我们可以查找多个模式。 + + root@Linux-world:~# grep -e "linuxtechi" -e "root" /etc/passwd + root:x:0:0:root:/root:/bin/bash + linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash + root@Linux-world:~# + +###12 使用“grep -f”从一个文件中获取待查找的模式### + +首先,在当前目录中创建一个搜索模式文件“grep_pattern”,我想文件中输入的如下内容。 + + root@Linux-world:~# cat grep_pattern + ^linuxtechi + root + false$ + root@Linux-world:~# + +现在,试试使用grep_pattern文件进行搜索 + + root@Linux-world:~# grep -f grep_pattern /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-f-option.jpg) + +###13 使用-c参数计算模式匹配的数量### + +继续上面例子,我们在grep命令中使用-c命令计算匹配指定模式的数量 + + root@Linux-world:~# grep -c -f grep_pattern /etc/passwd + 22 + root@Linux-world:~# + +###14 输出匹配指定模式行的前或者后面N行### + +a)使用-B参数输出匹配行的前4行 + + root@Linux-world:~# grep -B 4 "games" /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-B-option.jpg) + +b)使用-A参数输出匹配行的后4行 + + root@Linux-world:~# grep -A 4 "games" /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-A-option.jpg) + +c)使用-C参数输出匹配行的前后各4行 + + root@Linux-world:~# grep -C 4 "games" /etc/passwd + +![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-C-option.jpg) + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/linux-grep-command-with-14-different-examples/ + +作者:[Pradeep Kumar][a] +译者:[cvsher](https://github.com/cvsher) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ From 389089ba31775f653da91c72f1d4b8203596da04 Mon Sep 17 00:00:00 2001 From: cvsher <478990879@qq.com> Date: Wed, 13 May 2015 13:23:50 +0800 Subject: [PATCH 0804/2517] Delete [translating]20150506 Linux grep command with 14 different examples.md translated --- ...grep command with 14 different examples.md | 176 ------------------ 1 file changed, 176 deletions(-) delete mode 100644 sources/tech/[translating]20150506 Linux grep command with 14 different examples.md diff --git a/sources/tech/[translating]20150506 Linux grep command with 14 different examples.md b/sources/tech/[translating]20150506 Linux grep command with 14 different examples.md deleted file mode 100644 index 7731e2fa0c..0000000000 --- a/sources/tech/[translating]20150506 Linux grep command with 14 different examples.md +++ /dev/null @@ -1,176 +0,0 @@ -translating by cvsher -Linux grep command with 14 different examples -================================================================================ -### Overview : ### - -Linux like operating system provides a searching tool known as **grep (global regular expression print)**. grep command is useful for searching the content of one more files based on the pattern. A pattern may be a single character, bunch of characters, single word or a sentence. - -When we execute the grep command with specified pattern, if its is matched, then it will display the line of file containing the pattern without modifying the contents of existing file. - -In this tutorial we will discuss 14 different examples of grep command - -### Example:1 Search the pattern (word) in a file ### - -Search the “linuxtechi” word in the file /etc/passwd file - - root@Linux-world:~# grep linuxtechi /etc/passwd - linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash - root@Linux-world:~# - -### Example:2 Search the pattern in the multiple files. ### - - root@Linux-world:~# grep linuxtechi /etc/passwd /etc/shadow /etc/gshadow - /etc/passwd:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash - /etc/shadow:linuxtechi:$6$DdgXjxlM$4flz4JRvefvKp0DG6re:16550:0:99999:7:::/etc/gshadow:adm:*::syslog,linuxtechi - /etc/gshadow:cdrom:*::linuxtechi - /etc/gshadow:sudo:*::linuxtechi - /etc/gshadow:dip:*::linuxtechi - /etc/gshadow:plugdev:*::linuxtechi - /etc/gshadow:lpadmin:!::linuxtechi - /etc/gshadow:linuxtechi:!:: - /etc/gshadow:sambashare:!::linuxtechi - root@Linux-world:~# - -### Example:3 List the name of those files which contain a specified pattern using -l option. ### - - root@Linux-world:~# grep -l linuxtechi /etc/passwd /etc/shadow /etc/fstab /etc/mtab - /etc/passwd - /etc/shadow - root@Linux-world:~# - -### Example:4 Search the pattern in the file along with associated line number(s) using the -n option ### - - root@Linux-world:~# grep -n linuxtechi /etc/passwd - 39:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash - root@Linux-world:~# - -root@Linux-world:~# grep -n root /etc/passwd /etc/shadow - -![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-n-root.jpg) - -### Example:5 Print the line excluding the pattern using -v option ### - -List all the lines of the file /etc/passwd that does not contain specific word “linuxtechi”. - - root@Linux-world:~# grep -v linuxtechi /etc/passwd - -![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-v-option.jpg) - -### Example:6 Display all the lines that starts with specified pattern using ^ symbol ### - -Bash shell treats carrot symbol (^) as a special character which marks the beginning of line or a word. Let’s display the lines which starts with “root” word in the file /etc/passwd. - - root@Linux-world:~# grep ^root /etc/passwd - root:x:0:0:root:/root:/bin/bash - root@Linux-world:~# - -### Example: 7 Display all the lines that ends with specified pattern using $ symbol. ### - -List all the lines of /etc/passwd that ends with “bash” word. - - root@Linux-world:~# grep bash$ /etc/passwd - root:x:0:0:root:/root:/bin/bash - linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash - root@Linux-world:~# - -Bash shell treats dollar ($) symbol as a special character which marks the end of line or word. - -### Example:8 Search the pattern recursively using -r option ### - - root@Linux-world:~# grep -r linuxtechi /etc/ - /etc/subuid:linuxtechi:100000:65536 - /etc/group:adm:x:4:syslog,linuxtechi - /etc/group:cdrom:x:24:linuxtechi - /etc/group:sudo:x:27:linuxtechi - /etc/group:dip:x:30:linuxtechi - /etc/group:plugdev:x:46:linuxtechi - /etc/group:lpadmin:x:115:linuxtechi - /etc/group:linuxtechi:x:1000: - /etc/group:sambashare:x:131:linuxtechi - /etc/passwd-:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash - /etc/passwd:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash - ............................................................................ - -Above command will search linuxtechi in the “/etc” directory recursively. - -### Example:9 Search all the empty or blank lines of a file using grep ### - - root@Linux-world:~# grep ^$ /etc/shadow - root@Linux-world:~# - -As there is no empty line in /etc/shadow file , so nothing is displayed. - -### Example:10 Search the pattern using ‘grep -i’ option. ### - --i option in the grep command ignores the letter case i.e it will ignore upper case or lower case letters while searching - -Lets take an example , i want to search “LinuxTechi” word in the passwd file. - - nextstep4it@localhost:~$ grep -i LinuxTechi /etc/passwd - linuxtechi:x:1001:1001::/home/linuxtechi:/bin/bash - nextstep4it@localhost:~$ - -### Example:11 Search multiple patterns using -e option ### - -For example i want to search ‘linuxtechi’ and ‘root’ word in a single grep command , then using -e option we can search multiple patterns . - - root@Linux-world:~# grep -e "linuxtechi" -e "root" /etc/passwd - root:x:0:0:root:/root:/bin/bash - linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash - root@Linux-world:~# - -### Example:12 Getting Search pattern from a file using “grep -f” ### - -First create a search pattern file “grep_pattern” in your current working directory. In my case i have put the below contents. - - root@Linux-world:~# cat grep_pattern - ^linuxtechi - root - false$ - root@Linux-world:~# - -Now try to search using grep_pattern file. - - root@Linux-world:~# grep -f grep_pattern /etc/passwd - -![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-f-option.jpg) - -### Example:13 Count the number of matching patterns using -c option ### - -Let take the above example , we can count the number of matching patterns using -c option in grep command. - - root@Linux-world:~# grep -c -f grep_pattern /etc/passwd - 22 - root@Linux-world:~# - -### Example:14 Display N number of lines before & after pattern matching ### - -a) Display Four lines before patten matching using -B option - - root@Linux-world:~# grep -B 4 "games" /etc/passwd - -![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-B-option.jpg) - -b) Display Four lines after pattern matching using -A option - - root@Linux-world:~# grep -A 4 "games" /etc/passwd - -![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-A-option.jpg) - -c) Display Four lines around the pattern matching using -C option - - root@Linux-world:~# grep -C 4 "games" /etc/passwd - -![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-C-option.jpg) - --------------------------------------------------------------------------------- - -via: http://www.linuxtechi.com/linux-grep-command-with-14-different-examples/ - -作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxtechi.com/author/pradeep/ From c695d1f645c8448fe5ee7d464e58a7ca58602c45 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Wed, 13 May 2015 14:31:45 +0800 Subject: [PATCH 0805/2517] [Translated]20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md --- ...w to view torrent file content on Linux.md | 64 ------------------- ...w to view torrent file content on Linux.md | 62 ++++++++++++++++++ 2 files changed, 62 insertions(+), 64 deletions(-) delete mode 100644 sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md create mode 100644 translated/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md diff --git a/sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md b/sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md deleted file mode 100644 index 7f82ca2aa5..0000000000 --- a/sources/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md +++ /dev/null @@ -1,64 +0,0 @@ -Translating by GOLinux! -Linux FAQs with Answers--How to view torrent file content on Linux -================================================================================ -> **Question**: I have a torrent file downloaded from the web. Is there a tool that allows me to view the content of a torrent on Linux? For example, I want to know what files are included inside a torrent. - -A torrent file (i.e., a file with **.torrent** extension) is a BitTorrent metadata file which stores information (e.g., tracker URLs, file list, sizes, checksums, creation date) needed by a BitTorrent client to download files shared on BitTorrent peer-to-peer networks. Inside a single torrent file, one or more files can be listed for sharing. - -The content of a torrent file is encoded with BEncode, the BitTorrent's data serialization format. Thus to view the content of a torrent file, you need a corresponding decoder. - -In fact, any GUI-based BitTorrent client (e.g., Transmission or uTorrent) is equipped with BEncode decoder, so can show to you the content of a torrent file by opening it. However, if you don't want to use any sort of BitTorrent client to check up on a torrent file, you can try a command-line torrent viewer called [dumptorrent][2]. - -The **dumptorrent** command prints the detailed content of a torrent file (e.g., file names, sizes, tracker URLs, creation date, info hash, etc.) by using a built-in BEncode decoder. - -### Install DumpTorrent on Linux ### - -To install dumptorrent on Linux, you can build it from the source. - -On Debian, Ubuntu or Linux Mint: - - $ sudo apt-get install gcc make - $ wget http://downloads.sourceforge.net/project/dumptorrent/dumptorrent/1.2/dumptorrent-1.2.tar.gz - $ tar -xvf dumptorrent-1.2.tar.gz - $ cd dumptorrent-1.2 - $ make - $ sudo cp dumptorrent /usr/local/bin - -On CentOS, Fedora or RHEL: - - $ sudo yum install gcc make - $ wget http://downloads.sourceforge.net/project/dumptorrent/dumptorrent/1.2/dumptorrent-1.2.tar.gz - $ tar -xvf dumptorrent-1.2.tar.gz - $ cd dumptorrent-1.2 - $ make - $ sudo cp dumptorrent /usr/local/bin - -Make sure that /usr/local/bin is [included][2] in your PATH. - -### View the Content of a Torrent ### - -To check the content of a torrent, simply run dumptorrent with a torrent file as an argument. This will print a summary of a torrent, including file names, sizes and tracker URL. - - $ dumptorrent - -![](https://farm8.staticflickr.com/7729/16816455904_b051e29972_b.jpg) - -To view the full content of a torrent, add "-v" option. This will print more detailed information of a torrent, including info-hash, piece length, creation date, creator, and full announce list. - - $ dumptorrent -v - -![](https://farm6.staticflickr.com/5331/17438628461_1f6675bd77_b.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/view-torrent-file-content-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://ask.xmodulo.com/author/nanni -[1]:http://dumptorrent.sourceforge.net/ -[2]:http://ask.xmodulo.com/change-path-environment-variable-linux.html diff --git a/translated/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md b/translated/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md new file mode 100644 index 0000000000..8b5ba22907 --- /dev/null +++ b/translated/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md @@ -0,0 +1,62 @@ +Linux有问必答——Linux上如何查看torrent文件内容 +================================================================================ +> **问题**: 我从网站上下载了一个torrent文件。Linux上有没有工具让我查看torrent文件的内容?例如,我想知道torrent里面都有什么文件。 + +torrent文件(也就是扩展名为**.torrent**的文件)是BitTorrent元数据文件,里面存储了BitTorrent客户端用来从BitTorrent点对点网络下载共享文件的信息(如,追踪器URL、文件列表、大小、校验和、创建日期等)。在单个torrent文件里面,可以列出一个或多个文件用于共享。 + +torrent文件内容由BEncode编码为BitTorrent数据序列化格式,因此,要查看torrent文件的内容,你需要相应的解码器。 + +事实上,任何图形化的BitTorrent客户端(如Transmission或uTorrent)都带有BEncode解码器,所以,你可以用它们直接打开来查看torrent文件的内容。然而,如果你不想要使用BitTorrent客户端来检查torrent文件,你可以试试这个命令行torrent查看器,它叫[dumptorrent][1]。 + +**dumptorrent**命令可以使用内建的BEncode解码器打印torrent文件的详细信息(如,文件名、大小、跟踪器URL、创建日期、信息散列等等)。 + +### 安装DumpTorrent到Linux ### + +要安装dumptorrent到Linux,你可以从源代码来构建它。 + +在Debian、Ubuntu或Linux Mint上: + + $ sudo apt-get install gcc make + $ wget http://downloads.sourceforge.net/project/dumptorrent/dumptorrent/1.2/dumptorrent-1.2.tar.gz + $ tar -xvf dumptorrent-1.2.tar.gz + $ cd dumptorrent-1.2 + $ make + $ sudo cp dumptorrent /usr/local/bin + +在CentOS、Fedora或RHEL上: + + $ sudo yum install gcc make + $ wget http://downloads.sourceforge.net/project/dumptorrent/dumptorrent/1.2/dumptorrent-1.2.tar.gz + $ tar -xvf dumptorrent-1.2.tar.gz + $ cd dumptorrent-1.2 + $ make + $ sudo cp dumptorrent /usr/local/bin + +确保你的路径中[包含][2]了/usr/local/bin。 + +### 查看torrent的内容 ### + +要检查torrent的内容,只需要运行dumptorrent,并将torrent文件作为参数执行。这会打印出torrent的概要,包括文件名、大小和跟踪器URL。 + + $ dumptorrent + +![](https://farm8.staticflickr.com/7729/16816455904_b051e29972_b.jpg) +要查看torrent的完整内容,请添加“-v”选项。它会打印更多关于torrent的详细信息,包括信息散列、片长度、创建日期、创建者,以及完整的声明列表。 + + $ dumptorrent -v + +![](https://farm6.staticflickr.com/5331/17438628461_1f6675bd77_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/view-torrent-file-content-linux.html + +作者:[Dan Nanni][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://dumptorrent.sourceforge.net/ +[2]:http://ask.xmodulo.com/change-path-environment-variable-linux.html From a49587f368f13f9115805398bce5359d3d890fe7 Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 13 May 2015 15:24:22 +0800 Subject: [PATCH 0806/2517] Update 20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md --- ...t and Intermediate CA including OCSP, CRL and revocation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md b/sources/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md index f584e31f11..dcabb0bc97 100644 --- a/sources/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md +++ b/sources/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md @@ -1,3 +1,4 @@ +Translating by GOLinux! OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation ================================================================================ These are quick and dirty notes on generating a certificate authority (CA), intermediate certificate authorities and end certificates using OpenSSL. It includes OCSP, CRL and CA Issuer information and specific issue and expiry dates. @@ -402,4 +403,4 @@ via: https://raymii.org/s/tutorials/OpenSSL_command_line_Root_and_Intermediate_C 译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 7c9db1180307a354efa4fea054306292e071ecfc Mon Sep 17 00:00:00 2001 From: GOLinux Date: Wed, 13 May 2015 16:22:37 +0800 Subject: [PATCH 0807/2517] [Translated]20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md --- ...e CA including OCSP, CRL and revocation.md | 107 +++++++++--------- 1 file changed, 53 insertions(+), 54 deletions(-) rename {sources => translated}/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md (77%) diff --git a/sources/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md b/translated/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md similarity index 77% rename from sources/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md rename to translated/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md index dcabb0bc97..b9b5748f7a 100644 --- a/sources/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md +++ b/translated/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md @@ -1,35 +1,35 @@ -Translating by GOLinux! -OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation +OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 ================================================================================ -These are quick and dirty notes on generating a certificate authority (CA), intermediate certificate authorities and end certificates using OpenSSL. It includes OCSP, CRL and CA Issuer information and specific issue and expiry dates. -We'll set up our own root CA. We'll use the root CA to generate an example intermediate CA. We'll use the intermediate CA to sign end user certificates. +这些是关于使用OpenSSL生成证书授权(CA)、中间证书授权和末端证书的速记随笔,内容包括OCSP、CRL和CA颁发者信息,以及指定颁发和有效期限。 -### Root CA ### +我们将建立我们自己的根CA,我们将使用根CA来生成一个样例中间CA,我们将使用中间CA来签署末端用户证书。 -Create and move in to a folder for the root ca: +### 根CA ### + +创建根CA授权目录并切换到该目录: mkdir ~/SSLCA/root/ cd ~/SSLCA/root/ -Generate a 8192-bit long SHA-256 RSA key for our root CA: +为我们的根CA生成一个8192位长的SHA-256 RSA密钥: openssl genrsa -aes256 -out rootca.key 8192 -Example output: +样例输出: Generating RSA private key, 8192 bit long modulus .........++ ....................................................................................................................++ e is 65537 (0x10001) -If you want to password-protect this key, add the option `-aes256`. +如果你想要用密码保护该密钥,请添加`-aes256`选项。 -Create the self-signed root CA certificate `ca.crt`; you'll need to provide an identity for your root CA: +创建自颁发根CA证书`ca.crt`;你需要为你的根CA提供一个身份: openssl req -sha256 -new -x509 -days 1826 -key rootca.key -out rootca.crt -Example output: +样例输出: You are about to be asked to enter information that will be incorporated into your certificate request. @@ -46,13 +46,13 @@ Example output: Common Name (e.g. server FQDN or YOUR name) []:Sparkling Root CA Email Address []: -Create a few files where the CA will store it's serials: +创建存储CA序列的文件: touch certindex echo 1000 > certserial echo 1000 > crlnumber -Place the CA config file. This file has stubs for CRL and OCSP endpoints. +放置CA配置文件,该文件持有CRL和OCSP末端的存根。 # vim ca.conf [ ca ] @@ -121,23 +121,22 @@ Place the CA config file. This file has stubs for CRL and OCSP endpoints. OCSP;URI.0 = http://pki.sparklingca.com/ocsp/ OCSP;URI.1 = http://pki.backup.com/ocsp/ -If you need to set a specific certificate start / expiry date, add the following to `[myca]` +如果你需要设置某个特定的证书生效/过期日期,请添加以下内容到`[myca]` # format: YYYYMMDDHHMMSS default_enddate = 20191222035911 default_startdate = 20181222035911 -### Creating Intermediate 1 CA ### - -Generate the intermediate CA's private key: +### 创建中间1 CA ### +生成中间CA的私钥: openssl genrsa -out intermediate1.key 4096 -Generate the intermediate1 CA's CSR: +生成intermediate1 CA的CSR: openssl req -new -sha256 -key intermediate1.key -out intermediate1.csr -Example output: +样例输出: You are about to be asked to enter information that will be incorporated into your certificate request. @@ -159,13 +158,13 @@ Example output: A challenge password []: An optional company name []: -Make sure the subject (CN) of the intermediate is different from the root. +确保中间CA的主体(CN)和根CA不同。 -Sign the intermediate1 CSR with the Root CA: +用根CA签署intermediate1 CSR: openssl ca -batch -config ca.conf -notext -in intermediate1.csr -out intermediate1.crt -Example Output: +样例输出: Using configuration from ca.conf Check that the request matches the signature @@ -182,37 +181,37 @@ Example Output: Write out database with 1 new entries Data Base Updated -Generate the CRL (both in PEM and DER): +生成CRL(同时采用PEM和DER格式): openssl ca -config ca.conf -gencrl -keyfile rootca.key -cert rootca.crt -out rootca.crl.pem openssl crl -inform PEM -in rootca.crl.pem -outform DER -out rootca.crl -Generate the CRL after every certificate you sign with the CA. +每次使用该CA签署证书后,请生成CRL。 -If you ever need to revoke the this intermediate cert: +如果你需要撤销该中间证书: openssl ca -config ca.conf -revoke intermediate1.crt -keyfile rootca.key -cert rootca.crt -### Configuring the Intermediate CA 1 ### +### 配置中间CA 1 ### -Create a new folder for this intermediate and move in to it: +为该中间CA创建一个新文件夹,然后进入该文件夹: mkdir ~/SSLCA/intermediate1/ cd ~/SSLCA/intermediate1/ -Copy the Intermediate cert and key from the Root CA: +从根CA拷贝中间证书和密钥: cp ~/SSLCA/root/intermediate1.key ./ cp ~/SSLCA/root/intermediate1.crt ./ -Create the index files: +创建索引文件: touch certindex echo 1000 > certserial echo 1000 > crlnumber -Create a new `ca.conf` file: +创建一个新的`ca.conf`文件: # vim ca.conf [ ca ] @@ -270,35 +269,35 @@ Create a new `ca.conf` file: OCSP;URI.0 = http://pki.sparklingca.com/ocsp/ OCSP;URI.1 = http://pki.backup.com/ocsp/ -Change the `[alt_names]` section to whatever you need as Subject Alternative names. Remove it including the `subjectAltName = @alt_names` line if you don't want a Subject Alternative Name. +修改`[alt_names]`部分,添加你需要的主体备选名。如果你不需要主体备选名,请移除该部分包括`subjectAltName = @alt_names`的行。 -If you need to set a specific certificate start / expiry date, add the following to `[myca]` +如果你需要设置一个指定的生效/到期日期,请添加以下内容到`[myca]` # format: YYYYMMDDHHMMSS default_enddate = 20191222035911 default_startdate = 20181222035911 -Generate an empty CRL (both in PEM and DER): +生成一个空白CRL(同时以PEM和DER格式): openssl ca -config ca.conf -gencrl -keyfile rootca.key -cert rootca.crt -out rootca.crl.pem openssl crl -inform PEM -in rootca.crl.pem -outform DER -out rootca.crl -### Creating end user certificates ### +### 生成末端用户证书 ### -We use this new intermediate CA to generate an end user certificate. Repeat these steps for every end user certificate you want to sign with this CA. +我们使用这个新的中间CA来生成一个末端用户证书,请重复以下操作来使用该CA为每个用户签署。 mkdir enduser-certs -Generate the end user's private key: +生成末端用户的私钥: openssl genrsa -out enduser-certs/enduser-example.com.key 4096 -Generate the end user's CSR: +生成末端用户的CSR: openssl req -new -sha256 -key enduser-certs/enduser-example.com.key -out enduser-certs/enduser-example.com.csr -Example output: +样例输出: You are about to be asked to enter information that will be incorporated into your certificate request. @@ -320,11 +319,11 @@ Example output: A challenge password []: An optional company name []: -Sign the end user's CSR with the Intermediate 1 CA: +使用Intermediate 1 CA签署末端用户的CSR: openssl ca -batch -config ca.conf -notext -in enduser-certs/enduser-example.com.csr -out enduser-certs/enduser-example.com.crt -Example output: +样例输出: Using configuration from ca.conf Check that the request matches the signature @@ -341,56 +340,56 @@ Example output: Write out database with 1 new entries Data Base Updated -Generate the CRL (both in PEM and DER): +生成CRL(同时以PEM和DER格式): openssl ca -config ca.conf -gencrl -keyfile intermediate1.key -cert intermediate1.crt -out intermediate1.crl.pem openssl crl -inform PEM -in intermediate1.crl.pem -outform DER -out intermediate1.crl -Generate the CRL after every certificate you sign with the CA. +每次你使用该CA签署证书后,都需要生成CRL。 -If you ever need to revoke the this end users cert: +如果你需要撤销该末端用户证书: openssl ca -config ca.conf -revoke enduser-certs/enduser-example.com.crt -keyfile intermediate1.key -cert intermediate1.crt -Example output: +样例输出: Using configuration from ca.conf Revoking Certificate 1000. Data Base Updated -Create the certificate chain file by concatenating the Root and intermediate 1 certificates together. +通过联结根证书和intermediate 1证书来创建证书链文件。 cat ../root/rootca.crt intermediate1.crt > enduser-certs/enduser-example.com.chain -Send the following files to the end user: +发送以下文件给末端用户: enduser-example.com.crt enduser-example.com.key enduser-example.com.chain -You can also let the end user supply their own CSR and just send them the .crt file. Do not delete that from the server, otherwise you cannot revoke it. +你也可以只发送给他们.crt文件,让末端用户提供他们自己的CSR。不要把它从服务器删除,否则你就不能撤销了。 -### Validating the certificate ### +### 合法化证书 ### -You can validate the end user certificate against the chain using the following command: +你可以使用以下命令来针对链验证末端用户证书: openssl verify -CAfile enduser-certs/enduser-example.com.chain enduser-certs/enduser-example.com.crt enduser-certs/enduser-example.com.crt: OK -You can also validate it against the CRL. Concatenate the PEM CRL and the chain together first: +你也可以针对CRL来验证。首先,将PEM、CRL和链连结: cat ../root/rootca.crt intermediate1.crt intermediate1.crl.pem > enduser-certs/enduser-example.com.crl.chain -Verify the certificate: +验证证书: openssl verify -crl_check -CAfile enduser-certs/enduser-example.com.crl.chain enduser-certs/enduser-example.com.crt -Output when not revoked: +没有撤销时的输出: enduser-certs/enduser-example.com.crt: OK -Output when revoked: +撤销后的输出: enduser-certs/enduser-example.com.crt: CN = example.com, ST = Noord Holland, C = NL, O = Example Inc, OU = IT Dept error 23 at 0 depth lookup:certificate revoked @@ -400,7 +399,7 @@ Output when revoked: via: https://raymii.org/s/tutorials/OpenSSL_command_line_Root_and_Intermediate_CA_including_OCSP_CRL%20and_revocation.html 作者:Remy van Elst -译者:[译者ID](https://github.com/译者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From b3a9d43f6891c2adce41cdc5dddfd715a703126b Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 14 May 2015 00:26:56 +0800 Subject: [PATCH 0808/2517] PUB:20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation @GOLinux --- ...e CA including OCSP, CRL and revocation.md | 75 ++++++++++--------- 1 file changed, 38 insertions(+), 37 deletions(-) rename {translated/tech => published}/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md (82%) diff --git a/translated/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md b/published/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md similarity index 82% rename from translated/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md rename to published/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md index b9b5748f7a..9bd388f67c 100644 --- a/translated/tech/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md +++ b/published/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md @@ -1,18 +1,18 @@ -OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 +建立你自己的 CA 服务:OpenSSL 命令行 CA 操作快速指南 ================================================================================ -这些是关于使用OpenSSL生成证书授权(CA)、中间证书授权和末端证书的速记随笔,内容包括OCSP、CRL和CA颁发者信息,以及指定颁发和有效期限。 +这些是关于使用 OpenSSL 生成证书授权(CA)、中间证书授权和末端证书的速记随笔,内容包括 OCSP、CRL 和 CA 颁发者信息,以及指定颁发和有效期限等。 -我们将建立我们自己的根CA,我们将使用根CA来生成一个样例中间CA,我们将使用中间CA来签署末端用户证书。 +我们将建立我们自己的根 CA,我们将使用根 CA 来生成一个中间 CA 的例子,我们将使用中间 CA 来签署末端用户证书。 -### 根CA ### +### 根 CA ### -创建根CA授权目录并切换到该目录: +创建根 CA 授权目录并切换到该目录: mkdir ~/SSLCA/root/ cd ~/SSLCA/root/ -为我们的根CA生成一个8192位长的SHA-256 RSA密钥: +为我们的根 CA 生成一个8192位长的 SHA-256 RSA 密钥: openssl genrsa -aes256 -out rootca.key 8192 @@ -23,9 +23,9 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 ....................................................................................................................++ e is 65537 (0x10001) -如果你想要用密码保护该密钥,请添加`-aes256`选项。 +如果你想要用密码保护该密钥,请添加 `-aes256` 选项。 -创建自颁发根CA证书`ca.crt`;你需要为你的根CA提供一个身份: +创建自签名根 CA 证书 `ca.crt`;你需要为你的根 CA 提供一个身份: openssl req -sha256 -new -x509 -days 1826 -key rootca.key -out rootca.crt @@ -46,13 +46,13 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 Common Name (e.g. server FQDN or YOUR name) []:Sparkling Root CA Email Address []: -创建存储CA序列的文件: +创建一个存储 CA 序列的文件: touch certindex echo 1000 > certserial echo 1000 > crlnumber -放置CA配置文件,该文件持有CRL和OCSP末端的存根。 +放置 CA 配置文件,该文件持有 CRL 和 OCSP 末端的存根。 # vim ca.conf [ ca ] @@ -121,18 +121,19 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 OCSP;URI.0 = http://pki.sparklingca.com/ocsp/ OCSP;URI.1 = http://pki.backup.com/ocsp/ -如果你需要设置某个特定的证书生效/过期日期,请添加以下内容到`[myca]` +如果你需要设置某个特定的证书生效/过期日期,请添加以下内容到`[myca]`: # format: YYYYMMDDHHMMSS default_enddate = 20191222035911 default_startdate = 20181222035911 -### 创建中间1 CA ### +### 创建中间 CA### + +生成中间 CA (名为 intermediate1)的私钥: -生成中间CA的私钥: openssl genrsa -out intermediate1.key 4096 -生成intermediate1 CA的CSR: +生成中间 CA 的 CSR: openssl req -new -sha256 -key intermediate1.key -out intermediate1.csr @@ -158,9 +159,9 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 A challenge password []: An optional company name []: -确保中间CA的主体(CN)和根CA不同。 +确保中间 CA 的主体(CN)和根 CA 不同。 -用根CA签署intermediate1 CSR: +用根 CA 签署 中间 CA 的 CSR: openssl ca -batch -config ca.conf -notext -in intermediate1.csr -out intermediate1.crt @@ -181,26 +182,26 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 Write out database with 1 new entries Data Base Updated -生成CRL(同时采用PEM和DER格式): +生成 CRL(同时采用 PEM 和 DER 格式): openssl ca -config ca.conf -gencrl -keyfile rootca.key -cert rootca.crt -out rootca.crl.pem openssl crl -inform PEM -in rootca.crl.pem -outform DER -out rootca.crl -每次使用该CA签署证书后,请生成CRL。 +每次使用该 CA 签署证书后,请生成 CRL。 如果你需要撤销该中间证书: openssl ca -config ca.conf -revoke intermediate1.crt -keyfile rootca.key -cert rootca.crt -### 配置中间CA 1 ### +### 配置中间 CA ### -为该中间CA创建一个新文件夹,然后进入该文件夹: +为该中间 CA 创建一个新文件夹,然后进入该文件夹: mkdir ~/SSLCA/intermediate1/ cd ~/SSLCA/intermediate1/ -从根CA拷贝中间证书和密钥: +从根 CA 拷贝中间证书和密钥: cp ~/SSLCA/root/intermediate1.key ./ cp ~/SSLCA/root/intermediate1.crt ./ @@ -211,7 +212,7 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 echo 1000 > certserial echo 1000 > crlnumber -创建一个新的`ca.conf`文件: +创建一个新的 `ca.conf` 文件: # vim ca.conf [ ca ] @@ -269,15 +270,15 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 OCSP;URI.0 = http://pki.sparklingca.com/ocsp/ OCSP;URI.1 = http://pki.backup.com/ocsp/ -修改`[alt_names]`部分,添加你需要的主体备选名。如果你不需要主体备选名,请移除该部分包括`subjectAltName = @alt_names`的行。 +修改 `[alt_names]` 部分,添加你需要的主体备选名。如果你不需要主体备选名,请移除该部分包括`subjectAltName = @alt_names`的行。 -如果你需要设置一个指定的生效/到期日期,请添加以下内容到`[myca]` +如果你需要设置一个指定的生效/到期日期,请添加以下内容到 `[myca]`: # format: YYYYMMDDHHMMSS default_enddate = 20191222035911 default_startdate = 20181222035911 -生成一个空白CRL(同时以PEM和DER格式): +生成一个空白 CRL(同时以 PEM 和 DER 格式): openssl ca -config ca.conf -gencrl -keyfile rootca.key -cert rootca.crt -out rootca.crl.pem @@ -285,7 +286,7 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 ### 生成末端用户证书 ### -我们使用这个新的中间CA来生成一个末端用户证书,请重复以下操作来使用该CA为每个用户签署。 +我们使用这个新的中间 CA 来生成一个末端用户证书,请重复以下操作来使用该 CA 为每个用户签署。 mkdir enduser-certs @@ -293,7 +294,7 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 openssl genrsa -out enduser-certs/enduser-example.com.key 4096 -生成末端用户的CSR: +生成末端用户的 CSR: openssl req -new -sha256 -key enduser-certs/enduser-example.com.key -out enduser-certs/enduser-example.com.csr @@ -319,7 +320,7 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 A challenge password []: An optional company name []: -使用Intermediate 1 CA签署末端用户的CSR: +使用中间 CA 签署末端用户的 CSR: openssl ca -batch -config ca.conf -notext -in enduser-certs/enduser-example.com.csr -out enduser-certs/enduser-example.com.crt @@ -340,13 +341,13 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 Write out database with 1 new entries Data Base Updated -生成CRL(同时以PEM和DER格式): +生成 CRL(同时以 PEM 和 DER 格式): openssl ca -config ca.conf -gencrl -keyfile intermediate1.key -cert intermediate1.crt -out intermediate1.crl.pem openssl crl -inform PEM -in intermediate1.crl.pem -outform DER -out intermediate1.crl -每次你使用该CA签署证书后,都需要生成CRL。 +每次你使用该 CA 签署证书后,都需要生成 CRL。 如果你需要撤销该末端用户证书: @@ -358,7 +359,7 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 Revoking Certificate 1000. Data Base Updated -通过联结根证书和intermediate 1证书来创建证书链文件。 +通过连接根证书和中间证书来创建证书链文件。 cat ../root/rootca.crt intermediate1.crt > enduser-certs/enduser-example.com.chain @@ -368,16 +369,16 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 enduser-example.com.key enduser-example.com.chain -你也可以只发送给他们.crt文件,让末端用户提供他们自己的CSR。不要把它从服务器删除,否则你就不能撤销了。 +你也可以让末端用户提供他们自己的 CSR,而只发送给他们这个 .crt 文件。不要把它从服务器删除,否则你就不能撤销了。 -### 合法化证书 ### +### 校验证书 ### -你可以使用以下命令来针对链验证末端用户证书: +你可以对证书链使用以下命令来验证末端用户证书: openssl verify -CAfile enduser-certs/enduser-example.com.chain enduser-certs/enduser-example.com.crt enduser-certs/enduser-example.com.crt: OK -你也可以针对CRL来验证。首先,将PEM、CRL和链连结: +你也可以针对 CRL 来验证。首先,将 PEM 格式的 CRL 和证书链相连接: cat ../root/rootca.crt intermediate1.crt intermediate1.crl.pem > enduser-certs/enduser-example.com.crl.chain @@ -389,7 +390,7 @@ OpenSSL命令行生成根CA和中间CA,涵盖了OCSP、CRL和证书撤销 enduser-certs/enduser-example.com.crt: OK -撤销后的输出: +撤销后的输出如下: enduser-certs/enduser-example.com.crt: CN = example.com, ST = Noord Holland, C = NL, O = Example Inc, OU = IT Dept error 23 at 0 depth lookup:certificate revoked @@ -400,6 +401,6 @@ via: https://raymii.org/s/tutorials/OpenSSL_command_line_Root_and_Intermediate_C 作者:Remy van Elst 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From d8de7d35fe33d2060f2ee5112b5b5e3be22acf3c Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 14 May 2015 00:37:26 +0800 Subject: [PATCH 0809/2517] PUB:20150323 How to enable ssh login without entering password @KayGuoWhu --- ...50323 How to enable ssh login without entering password.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20150323 How to enable ssh login without entering password.md (89%) diff --git a/translated/tech/20150323 How to enable ssh login without entering password.md b/published/20150323 How to enable ssh login without entering password.md similarity index 89% rename from translated/tech/20150323 How to enable ssh login without entering password.md rename to published/20150323 How to enable ssh login without entering password.md index 4f9a4c317d..8202bc62cd 100644 --- a/translated/tech/20150323 How to enable ssh login without entering password.md +++ b/published/20150323 How to enable ssh login without entering password.md @@ -16,7 +16,7 @@ $ cat .ssh/id_rsa.pub | ssh aliceB@hostB 'cat >> .ssh/authorized_keys' -自此以后,从aliceA@hostA上ssh到aliceB@hostB上再也不需要输入密码。 +自此以后,从aliceA@hostA上ssh到aliceB@hostB上再也不需要输入密码。(LCTT 译注:上述的创建目录并复制的操作也可以通过一个 ssh-copy-id 命令一步完成:`ssh-copy-id -i ~/.ssh/id_rsa.pub aliceB@hostB`) ### 疑难解答 ### @@ -34,7 +34,7 @@ via: http://xmodulo.com/how-to-enable-ssh-login-without.html 作者:[Dan Nanni][a] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9528c205d0eaf0c795e18e7b5e03c4a973470a68 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 14 May 2015 06:47:51 +0800 Subject: [PATCH 0810/2517] PUB:20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu @wi-cuckoo --- ...x bridge with Network Manager on Ubuntu.md | 86 ++++++++++++++++ ...x bridge with Network Manager on Ubuntu.md | 98 ------------------- 2 files changed, 86 insertions(+), 98 deletions(-) create mode 100644 published/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md delete mode 100644 translated/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md diff --git a/published/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md b/published/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md new file mode 100644 index 0000000000..b1ff96e30b --- /dev/null +++ b/published/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md @@ -0,0 +1,86 @@ +Linux 有问必答:如何在Ubuntu上配置网桥 +=============================================================================== +> **Question**: 我需要在我的Ubuntu主机上建立一个Linux网桥,共享一个网卡给其他一些虚拟主机或在主机上创建的容器。我目前正在Ubuntu上使用网络管理器(Network Manager),所以最好>能使用网络管理器来配置一个网桥。我该怎么做? + +网桥是一个硬件装备,用来将两个或多个数据链路层(OSI七层模型中第二层)互联,以使得不同网段上的网络设备可以互相访问。当你想要互联一个主机里的多个虚拟机器或者以太接口时,就需要在Linux主机里有一个类似桥接的概念。这里使用的是一种软网桥。 + +有很多的方法来配置一个Linux网桥。举个例子,在一个无外接显示/键盘的服务器环境里,你可以使用[brct][1]手动地配置一个网桥。而在桌面环境下,在网络管理器里也支持网桥设置。那就让我们测试一下如何用网络管理器配置一个网桥吧。 + +### 要求 ### + +为了避免[任何问题][2],建议你的网络管理器版本为0.9.9或者更高,它用在 Ubuntu 15.04或者更新的版本。 + + $ apt-cache show network-manager | grep Version + +---------- + + Version: 0.9.10.0-4ubuntu15.1 + Version: 0.9.10.0-4ubuntu15 + +### 创建一个网桥 ### + +使用网络管理器创建网桥最简单的方式就是通过nm-connection-editor。这款GUI(图形用户界面)的工具允许你傻瓜式地配置一个网桥。 + +首先,启动nm-connection-editor。 + + $ nm-connection-editor + +该编辑器的窗口会显示给你一个列表,列出目前配置好的网络连接。点击右上角的“添加”按钮,创建一个网桥。 + +![](https://farm9.staticflickr.com/8781/17139502730_c3ca920f7f.jpg) + +接下来,选择“Bridge”(网桥)作为连接类型。 + +![](https://farm9.staticflickr.com/8873/17301102406_4f75133391_z.jpg) + +现在,开始配置网桥,包括它的名字和所桥接的连接。如果没有创建过其他网桥,那么默认的网桥接口会被命名为bridge0。 + +回顾一下,创建网桥的目的是为了通过网桥共享你的以太网卡接口,所以你需要添加以太网卡接口到网桥。在图形界面添加一个新的“桥接的连接”可以实现上述目的。点击“Add”按钮。 + +![](https://farm9.staticflickr.com/8876/17327069755_52f1d81f37_z.jpg) + +选择“以太网”作为连接类型。 + +![](https://farm9.staticflickr.com/8832/17326664591_632a9001da_z.jpg) + +在“设备的 MAC 地址”区域,选择你想要从属于网桥的接口。本例中,假设该接口是eth0。 + +![](https://farm9.staticflickr.com/8842/17140820559_07a661f30c_z.jpg) + +点击“常规”标签,并且选中两个复选框,分别是“当其可用时自动连接到该网络”和“所有用户都可以连接到该网络”。 + +![](https://farm8.staticflickr.com/7776/17325199982_801290e172_z.jpg) + +切换到“IPv4 设置”标签,为网桥配置DHCP或者是静态IP地址。注意,你应该为从属的以太网卡接口eth0使用相同的IPv4设定。本例中,我们假设eth0是用过DHCP配置的。因此,此处选择“自动(DHCP)”。如果eth0被指定了一个静态IP地址,那么你也应该指定相同的IP地址给网桥。 + +![](https://farm8.staticflickr.com/7737/17140820469_99955cf916_z.jpg) + +最后,保存网桥的设置。 + +现在,你会看见一个新增的网桥连接被创建在“网络连接”窗口里。因为已经从属与网桥,以前配置好的有线连接 eth0 就不再需要了,所以去删除原来的有线连接吧。 + +![](https://farm9.staticflickr.com/8700/17140820439_272a6d5c4e.jpg) + +这时候,网桥连接会被自动激活。从指定给eth0的IP地址被网桥接管起,你将会暂时丢失一下连接。当IP地址赋给了网桥,你将会通过网桥连接回你的以太网卡接口。你可以通过“Network”设置确认一下。 + +![](https://farm8.staticflickr.com/7742/17325199902_9ceb67ddc1_c.jpg) + +同时,检查可用的接口。提醒一下,网桥接口必须已经取代了任何你的以太网卡接口拥有的IP地址。 + +![](https://farm8.staticflickr.com/7717/17327069605_6143f1bd6a_b.jpg) + +就这么多了,现在,网桥已经可以用了。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/configure-linux-bridge-network-manager-ubuntu.html + +作者:[Dan Nanni][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-configure-linux-bridge-interface.html +[2]:https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1273201 diff --git a/translated/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md b/translated/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md deleted file mode 100644 index ae99e20261..0000000000 --- a/translated/tech/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md +++ /dev/null @@ -1,98 +0,0 @@ -nux常见问题解答--如何在Ubuntu上使用网络管理配置一个Linux网桥 -=============================================================================== -> **Question**: 我需要在我的Ubuntu主机上建立一个Linux网桥,共享一个NIC给其他一些虚拟主机或者主机上创建的容器。我目前正在Ubunut上使用网络管理,所以最好>能使用网络管理来配置一个网桥。我该怎么做? - - -网桥是一个硬件装备,用来内部连接两个或多个数据链路层(OSI七层模型中第二层),所以使得不同段上的网络设备可以互相访问。当你想要内连多个虚拟机器或者一个>主机里的以太接口时,就需要在Linux主机里有一个类似桥接的概念。 - -有很多的方法来配置一个Linux网桥。举个例子,在一个无中心的服务器环境里,你可以使用[brct][1]手动地配置一个网桥。在桌面环境下,在网络管理里有建立网桥支持 -。那就让我们测试一下如何用网络管理配置一个网桥吧。 - -### 要求 ### - -为了避免[任何问题][2],建议你的网络管理版本为0.9.9或者更高,这主要为了配合Ubuntu15.05或者更新的版本。 - - $ apt-cache show network-manager | grep Version - ----------- - - Version: 0.9.10.0-4ubuntu15.1 - Version: 0.9.10.0-4ubuntu15 - -### 创建一个网桥 ### - -使用网络管理创建网桥最简单的方式就是通过nm-connection-editor。这款GUI(图形用户界面)的工具允许你傻瓜式地配置一个网桥。 - -首先,启动nm-connection-editor。 - - $ nm-connection-editor - -该编辑器的窗口会显示给你一个列表,关于目前配置好的网络连接。点击右上角的“Click”按钮,创建一个网桥。 - -![](https://farm9.staticflickr.com/8781/17139502730_c3ca920f7f.jpg) - -接下来,选择“Bridge”作为连接类型。 - -![](https://farm9.staticflickr.com/8873/17301102406_4f75133391_z.jpg) - -现在,开始配置网桥,包括它的名字和桥接。如果没有其他网桥被创建,那么默认的网桥接口会被命名为bridge0。 - -回顾一下,创建网桥的目的是为了通过网桥共享你的以太网卡接口。所以你需要添加以太网卡接口到网桥。在图形界面添加一个新的“bridged connection”可以实现上述目的。点击“Add”按钮。 - -![](https://farm9.staticflickr.com/8876/17327069755_52f1d81f37_z.jpg) - -选择“Ethernet”作为连接类型。 - -![](https://farm9.staticflickr.com/8832/17326664591_632a9001da_z.jpg) - -在“Device MAC address”区域,选择你想要控制的接口到bridge里。本例中,假设接口是eth0。 - -![](https://farm9.staticflickr.com/8842/17140820559_07a661f30c_z.jpg) - -点击“General”标签,并且选中两个复选框,分别是“Automatically connect to this network when it is available”和“All users may connect to this network”。 - -![](https://farm8.staticflickr.com/7776/17325199982_801290e172_z.jpg) - -保存更改。 - -现在,你会在网桥里看见一个新的从属连接被建立。 - -![](https://farm8.staticflickr.com/7674/17119624667_6966b1147e_z.jpg) - -点击网桥的“General”标签,并且确保最上面的两个复选框被选中了。 - -![](https://farm8.staticflickr.com/7715/17301102276_4266a1e41d_z.jpg) - -切换到“IPv4 Setting”标签,为网桥配置DHCP或者是静态IP地址。注意,你应该使用相同的IPv4设定作为从属的以太网卡接口eth0。本例中,我们假设eth0是用过DHCP配置的。因此,此处选择“Automatic(DHCP)”。如果eth0被指定了一个静态IP地址,那么你应该指定相同的IP地址给网桥。 - -![](https://farm8.staticflickr.com/7737/17140820469_99955cf916_z.jpg) - -最后,保存网桥的设置。 - -现在,你会看见一个额外的网桥连接被创建在“Network Connection”窗口里。你不再需要一个预先配置的有线连接,为着从属的eth0接口。所以去删除原来的有线连接吧。 - -![](https://farm9.staticflickr.com/8700/17140820439_272a6d5c4e.jpg) - -这时候,网桥连接会被自动激活。你将会暂时失去一个连接,从指定给eth0的IP地址被网桥接管。一旦IP地址指定给了网桥,你将会连接回你的以太网卡接口,通过网桥。你可以通过“Network”设置确认一下。 - -![](https://farm8.staticflickr.com/7742/17325199902_9ceb67ddc1_c.jpg) - -同时,检查可用的接口。提醒一下,网桥接口必须已经取代了任何通过你的以太网卡接口的IP地址。 - -![](https://farm8.staticflickr.com/7717/17327069605_6143f1bd6a_b.jpg) - -就这么多了,现在,网桥已经可以用了。 - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/configure-linux-bridge-network-manager-ubuntu.html - -作者:[Dan Nanni][a] -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni -[1]:http://xmodulo.com/how-to-configure-linux-bridge-interface.html -[2]:https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1273201 From b704b551ae2071d1a23f6c3dcb91a6b67d3cb8ab Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 14 May 2015 08:31:55 +0800 Subject: [PATCH 0811/2517] Update 20150511 Fix Various Update Errors In Ubuntu 14.04.md --- .../tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md b/sources/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md index a84fc1b061..b49a59aa57 100644 --- a/sources/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md +++ b/sources/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Fix Various Update Errors In Ubuntu 14.04 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/09/Fix_Ubuntu_Update_Error.jpeg) @@ -148,4 +149,4 @@ via: http://itsfoss.com/fix-update-errors-ubuntu-1404/ [6]:http://itsfoss.com/solve-open-shared-object-file-quick-tip/ [7]:http://itsfoss.com/fix-ubuntu-install-error/ [8]:http://itsfoss.com/solve-gpg-error-signatures-verified-ubuntu/ -[9]:http://itsfoss.com/solve-badsig-error-quick-tip/ \ No newline at end of file +[9]:http://itsfoss.com/solve-badsig-error-quick-tip/ From 3df0de1eee408193553e3e6a16bdf2a2b48174bb Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 14 May 2015 09:44:53 +0800 Subject: [PATCH 0812/2517] [Translated]20150511 Fix Various Update Errors In Ubuntu 14.04.md --- ...x Various Update Errors In Ubuntu 14.04.md | 71 +++++++++---------- 1 file changed, 35 insertions(+), 36 deletions(-) rename {sources => translated}/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md (53%) diff --git a/sources/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md b/translated/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md similarity index 53% rename from sources/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md rename to translated/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md index b49a59aa57..3780b4f948 100644 --- a/sources/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md +++ b/translated/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md @@ -1,13 +1,12 @@ -Translating by GOLinux! -Fix Various Update Errors In Ubuntu 14.04 +修复Ubuntu 14.04中各种更新错误 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/09/Fix_Ubuntu_Update_Error.jpeg) -Who hasn’t come across an error while doing an update in Ubuntu? Update errors are common and plenty in Ubuntu and other Linux distributions based on Ubuntu. These errors occur for various reasons and can be fixed easily. In this article, we shall see various types of frequently occurring update errors in Ubuntu and how to fix them. +在Ubuntu更新中,谁没有碰见个错误?在Ubuntu和其它基于Ubuntu的Linux发行版中,更新错误很常见,也为数不少。这些错误出现的原因多种多样,修复起来也很简单。在本文中,我们将见到Ubuntu中各种类型频繁发生的更新错误以及它们的修复方法。 -### Problem With MergeList ### +### 合并列表问题 ### -When you run update in terminal, you may encounter an error “[problem with MergeList][1]” like below: +当你在终端中运行更新命令时,你可能会碰到这个错误“[合并列表错误][1]”,就像下面这样: > E:Encountered a section with no Package: header, > @@ -15,14 +14,14 @@ When you run update in terminal, you may encounter an error “[problem with Mer > > E:The package lists or status file could not be parsed or opened.’ -To fix this error, use the following commands: +可以使用以下命令来修复该错误: sudo rm -r /var/lib/apt/lists/* sudo apt-get clean && sudo apt-get update -### Failed to download repository information -1 ### +### 下载仓库信息失败 -1 ### -There are actually two types of [failed to download repository information errors][2]. If your error read like this: +实际上,有两种类型的[下载仓库信息失败错误][2]。如果你的错误是这样的: > W:Failed to fetch bzip2:/var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_oneiric_restricted_binary-i386_Packages Hash Sum mismatch, > @@ -30,88 +29,88 @@ There are actually two types of [failed to download repository information error > > E:Some index files failed to download. They have been ignored, or old ones used instead -Then you can use the following commands to fix it: +那么,你可以用以下命令修复: sudo rm -rf /var/lib/apt/lists/* sudo apt-get update -### Failed to download repository information -2 ### +### 下载仓库信息失败 -2 ### -Th other type of failed to download repository information error is because of outdated PPA. Usually, when you run Update Manager and see an error like this: +下载仓库信息失败的另外一种类型是由于PPA过时导致的。通常,当你运行更新管理器,并看到这样的错误时: ![](Th other type of failed to download repository information error is because of outdated PPA. Usually, when you run Update Manager and see an error like this:) -You can run sudo apt-get update to see what PPAs are failing. And you can remove it from the sources list. You can follow this screenshot guide to [fix failed to download repository information error][3]. +你可以运行sudo apt-get update来查看哪个PPA更新失败,你可以把它从源列表中删除。你可以按照这个截图指南来[修复下载仓库信息失败错误][3]。 -### Failed to download package files error ### +### 下载包文件失败错误 ### -A similar error is [failed to download package files error][4] like this: +一个类似的错误是[下载包文件失败错误][4],像这样: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/09/Ubuntu_Update_error.jpeg) -This can be easily fixed by changing the software sources to Main server. Go to Software & Updates and in there changed the download server to Main server: +该错误很容易修复,只需修改软件源为主服务器即可。转到软件和更新,在那里你可以修改下载服务器为主服务器: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/09/Change_server_Ubuntu.jpeg) -### Partial upgrade error ### +### 部分更新错误 ### -Running updates in terminal may throw this [partial upgrade error][5]: +在终端中运行更新会出现[部分更新错误][5]: > Not all updates can be installed > > Run a partial upgrade, to install as many updates as possible -Run the following command in terminal to fix this error: +在终端中运行以下命令来修复该错误: sudo apt-get install -f -### error while loading shared libraries ### +### 加载共享库时发生错误 ### -This is more of an installation error than update error. If you try to install a program from source code, you may encounter this error: +该错误更多是安装错误,而不是更新错误。如果尝试从源码安装程序,你可能会碰到这个错误: > error while loading shared libraries: > > cannot open shared object file: No such file or directory -This error can be fixed by running the following command in terminal: +该错误可以通过在终端中运行以下命令来修复: sudo /sbin/ldconfig -v -You can find more details on this [error while loading shared libraries][6]. +你可以在这里查找到更多详细内容[加载共享库时发生错误][6]。 -### Could not get lock /var/cache/apt/archives/lock ### +### 无法获取锁/var/cache/apt/archives/lock ### -This error happens when another program is using APT. Suppose you are installing some thing in Ubuntu Software Center and trying to run apt in terminal. +在另一个程序在使用APT时,会发生该错误。假定你正在Ubuntu软件中心安装某个东西,然后你又试着在终端中运行apt。 > E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable) > > E: Unable to lock directory /var/cache/apt/archives/ -Normally, this should be fine if you close all other programs using apt but if the problem persists, use the following command: +通常,只要你把所有其它使用apt的程序关了,这个问题就会好的。但是,如果问题持续,可以使用以下命令: sudo rm /var/lib/apt/lists/lock -If the above command doesn’t work, try this command: +如果上面的命令不起作用,可以试试这个命令: sudo killall apt-get -More details about this error can be found [here][7]. +关于该错误的更多信息,可以在[这里][7]找到。 -### GPG error: The following signatures couldn’t be verified ### +### GPG错误: 下列签名无法验证 ### -Adding a PPA may result in the following [GPG error: The following signatures couldn’t be verified][8] when you try to run an update in terminal: +在添加一个PPA时,可能会导致以下错误[GPG错误: 下列签名无法验证][8],这通常发生在终端中运行更新时: > W: GPG error: http://repo.mate-desktop.org saucy InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68980A0EA10B4DE8 -All we need to do is to fetch this public key in the system. Get the key number from the message. In the above message, the key is 68980A0EA10B4DE8. This key can be used in the following manner: +我们所要做的,就是获取系统中的这个公钥,从信息中获取密钥号。在上述信息中,密钥号为68980A0EA10B4DE8。该密钥可通过以下方式使用: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68980A0EA10B4DE8 -Once the key has been added, run an update again and it will be fine. +在添加密钥后,再次运行更新就没有问题了。 -### BADSIG error ### +### BADSIG错误 ### -Another signature related Ubuntu update error is [BADSIG error][9] which looks something like this: +另外一个与签名相关的Ubuntu更新错误是[BADSIG错误][9],它看起来像这样: > W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://extras.ubuntu.com precise Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key > @@ -119,7 +118,7 @@ Another signature related Ubuntu update error is [BADSIG error][9] which looks s > > The following signatures were invalid: BADSIG 4C1CBC1B69B0E2F4 Launchpad PPA for Jonathan French W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release -To fix this BADSIG error, use the following commands in terminal: +要修复该BADSIG错误,请在终端中使用以下命令: sudo apt-get clean cd /var/lib/apt @@ -128,14 +127,14 @@ To fix this BADSIG error, use the following commands in terminal: sudo apt-get clean sudo apt-get update -That compiles the list of frequent **Ubuntu update errors** you may encounter. I hope this helps you to get rid of these errors. Have you encountered any other update error in Ubuntu as well? Do mention it in comments and I’ll try to do a quick tutorial on it. +本文汇集了你可能会碰到的**Ubuntu更新错误**,我希望这会对你处理这些错误有所帮助。你在Ubuntu中是否也碰到过其它更新错误呢?请在下面的评论中告诉我,我会试着写个快速指南。 -------------------------------------------------------------------------------- via: http://itsfoss.com/fix-update-errors-ubuntu-1404/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From f0a15bf383cf48d1aebe7f20589c4383ac9855ee Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 14 May 2015 11:11:00 +0800 Subject: [PATCH 0813/2517] Translated 20150331 Conky---The Ultimate X Based System Monitor Application.md --- ...mate X Based System Monitor Application.md | 149 ------------------ ...mate X Based System Monitor Application.md | 146 +++++++++++++++++ 2 files changed, 146 insertions(+), 149 deletions(-) delete mode 100644 sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md create mode 100644 translated/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md diff --git a/sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md b/sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md deleted file mode 100644 index b54d6763d3..0000000000 --- a/sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md +++ /dev/null @@ -1,149 +0,0 @@ -FSSlc translating - -Conky – The Ultimate X Based System Monitor Application -================================================================================ -Conky is a system monitor application written in ‘C’ Programming Language and released under GNU General Public License and BSD License. It is available for Linux and BSD Operating System. The application is X (GUI) based that was originally forked from [Torsmo][1]. - -#### Features #### - -- Simple User Interface -- Higher Degree of configuration -- It can show System stats using built-in objects (300+) as well as external scripts either on the desktop or in it’s own container. -- Low on Resource Utilization -- Shows system stats for a wide range of system variables which includes but not restricted to CPU, memory, swap, Temperature, Processes, Disk, Network, Battery, email, System messages, Music player, weather, breaking news, updates and blah..blah..blah -- Available in Default installation of OS like CrunchBang Linux and Pinguy OS. - -#### Lesser Known Facts about Conky #### - -- The Name conky was derived from a Canadian Television Show. -- It has already been ported to Nokia N900. -- It is no more maintained officially. - -### Conky Installation and Usage in Linux ### - -Before we install conky, we need to install packages like lm-sensors, curl and hddtemp using following command. - - # apt-get install lm-sensors curl hddtemp - -Time to detect-sensors. - - # sensors-detect - -**Note**: Answer ‘Yes‘ when prompted! - -Check all the detected sensors. - - # sensors - -#### Sample Output #### - - acpitz-virtual-0 - Adapter: Virtual device - temp1: +49.5°C (crit = +99.0°C) - - coretemp-isa-0000 - Adapter: ISA adapter - Physical id 0: +49.0°C (high = +100.0°C, crit = +100.0°C) - Core 0: +49.0°C (high = +100.0°C, crit = +100.0°C) - Core 1: +49.0°C (high = +100.0°C, crit = +100.0°C) - -Conky can be installed from repo as well as, can be compiled from source. - - # yum install conky [On RedHat systems] - # apt-get install conky-all [On Debian systems] - -**Note**: Before you install conky on Fedora/CentOS, you must have enabled [EPEL repository][2]. - -After conky has been installed, just issue following command to start it. - - $ conky & - -![Conky Monitor in Action](http://www.tecmint.com/wp-content/uploads/2015/03/Start-Conkey.jpeg) -Conky Monitor in Action - -It will run conky in a popup like window. It uses the basic conky configuration file located at /etc/conky/conky.conf. - -You may need to integrate conky with the desktop and won’t like a popup like window every-time. Here is what you need to do - -Copy the configuration file /etc/conky/conky.conf to your home directory and rename it as ‘`.conkyrc`‘. The dot (.) at the beginning ensures that the configuration file is hidden. - - $ cp /etc/conky/conky.conf /home/$USER/.conkyrc - -Now restart conky to take new changes. - - $ killall -SIGUSR1 conky - -![Conky Monitor Window](http://www.tecmint.com/wp-content/uploads/2015/03/Restart-Conky.jpeg) -Conky Monitor Window - -You may edit the conky configuration file located in your home dircetory. The configuration file is very easy to understand. - -Here is a sample configuration of conky. - -![Conky Configuration](http://www.tecmint.com/wp-content/uploads/2015/03/Conky-Configuration.jpeg) -Conky Configuration - -From the above window you can modify color, borders, size, scale, background, alignment and several other properties. By setting different alignments to different conky window, we can run more than one conky script at a time. - -**Using script other than the default for conky and where to find it?** - -You may write your own conky script or use one that is available over Internet. We don’t suggest you to use any script you find on the web which can be potentially dangerous unless you know what you are doing. However a few famous threads and pages have conky script that you can trust as mentioned below. - -- [http://ubuntuforums.org/showthread.php?t=281865][3] -- [http://conky.sourceforge.net/screenshots.html][4] - -At the above url, you will find every screenshot has a hyperlink, which will redirects to script file. - -#### Testing Conky Script #### - -Here I will be running a third party written conky-script on my Debian Jessie Machine, to test. - - $ wget https://github.com/alexbel/conky/archive/master.zip - $ unzip master.zip - -Change current working directory to just extracted directory. - - $ cd conky-master - -Rename the secrets.yml.example to secrets.yml. - - $ mv secrets.yml.example secrets.yml - -Install Ruby before you could run this (ruby) script. - - $ sudo apt-get install ruby - $ ruby starter.rb - -![Conky Fancy Look](http://www.tecmint.com/wp-content/uploads/2015/03/Conky-Fancy-Look.jpeg) -Conky Fancy Look - -**Note**: This script can be modified to show your current weather, temperature, etc. - -If you want to start conky at boot, add the below one liner to startup Applications. - - conky --pause 10 - save and exit. - -And Finally…such a lightweight and useful GUI eye candy like package is not in active stage and is not maintained officially anymore. The last stable release was conky 1.9.0 released on May 03, 2012. A thread on Ubuntu forum has gone over 2k pages of users sharing configuration. (link to forum : [http://ubuntuforums.org/showthread.php?t=281865/][5]) - -- [Conky Homepage][6] - -That’s all for now. Keep connected. Keep commenting. Share your thoughts and configuration in comments below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-conky-in-ubuntu-debian-fedora/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://torsmo.sourceforge.net/ -[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ -[3]:http://ubuntuforums.org/showthread.php?t=281865 -[4]:http://conky.sourceforge.net/screenshots.html -[5]:http://ubuntuforums.org/showthread.php?t=281865/ -[6]:http://conky.sourceforge.net/ diff --git a/translated/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md b/translated/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md new file mode 100644 index 0000000000..f6ab2f69ec --- /dev/null +++ b/translated/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md @@ -0,0 +1,146 @@ +Conky - 终极的 X 视窗系统监视器应用 +================================================================================ +Conky 是一个用 ‘C’ 语言写就的系统监视器,并在 GNU 通用公共许可协议和 BSD 许可协议下发布,在 Linux 和 BSD 操作系统中都可以获取到它。这个应用是基于 X 视窗系统的,原本 fork 至 [Torsmo][1]。 + +#### 特点 #### + +- 简洁的用户界面; +- 高配置性; +- 它既可使用内置的部件(超过 300 多个) 也可使用外部脚本,来在桌面或其自有容器中展示系统的状态; +- 低资源消耗; +- 它可显示范围广泛的系统参数,包括但不限于 CPU,内存,swap 分区 ,温度,进程,磁盘使用情况,网络状态,电池电量,邮件收发,系统消息,音乐播放器的控制,天气信息,最新新闻,升级信息等等; +- 在许多操作系统中如 CrunchBang Linux 和 Pinguy OS 被默认安装; + +#### 关于 Conky 的少有人知的事实 #### + +- conky 这个名称来自于一个加拿大电视节目; +- 它已被移植到 Nokia N900 上; +- 它已不再被官方维护; + +### 在 Linux 中 Conky 的安装和使用 ### + +在我们安装 conky 之前,我们需要使用下面的命令来安装诸如 `lm-sensors`, `curl` 和 `hddtemp` 之类的软件包: + + # apt-get install lm-sensors curl hddtemp + +然后是检测传感器: + + # sensors-detect + +**注**: 在被系统提示时,回答 ‘Yes’ 。 + +检测所有探测到的传感器: + + # sensors + +#### 样例输出 #### + + acpitz-virtual-0 + Adapter: Virtual device + temp1: +49.5°C (crit = +99.0°C) + + coretemp-isa-0000 + Adapter: ISA adapter + Physical id 0: +49.0°C (high = +100.0°C, crit = +100.0°C) + Core 0: +49.0°C (high = +100.0°C, crit = +100.0°C) + Core 1: +49.0°C (high = +100.0°C, crit = +100.0°C) + +Conky 既可以从软件仓库中安装,也可从源代码编译得到: + + # yum install conky [在 RedHat 系的系统上] + # apt-get install conky-all [在 Debian 系的系统上] + +**注**: 在 Fedora/CentOS 上安装 conky 之前,你必须启用 [EPEL 软件仓库][2]。 + +在安装完 conky 之后,只需输入如下命令来开启它: + + $ conky & + +![正在运行的 Conky 监视器](http://www.tecmint.com/wp-content/uploads/2015/03/Start-Conkey.jpeg) +正在运行的 Conky 监视器 + +这使得 conky 以一个弹窗的形式运行,并使用位于 `/etc/conky/conky.conf` 的 conky 基本配置文件。 + +你可能想将 conky 集成到桌面上,并不想让它每次以弹窗的形式出现,下面就是你需要做的: + +将配置文件 `/etc/conky/conky.conf` 复制到你的家目录中,并将它重命名为 `.conkyrc`,开头的点号 (.) 是为了确保这个配置文件是隐藏的。 + + $ cp /etc/conky/conky.conf /home/$USER/.conkyrc + +现在重启 conky 来应用新的更改: + + $ killall -SIGUSR1 conky + +![Conky 监视器窗口](http://www.tecmint.com/wp-content/uploads/2015/03/Restart-Conky.jpeg) +Conky 监视器窗口 + +你可能想编辑位于你家目录的 conky 的配置文件,这个配置文件的内容是非常容易理解的。 + +下面是 conky 配置文件的一个样例: + +![Conky 的配置](http://www.tecmint.com/wp-content/uploads/2015/03/Conky-Configuration.jpeg) +Conky 的配置 + +从上面的窗口中,你可以更改颜色,边框,大小,缩放比例,背景,对齐方式及几个其他属性。通过为不同的 conky 窗口设定不同的对齐方式,我们可以同时运行超过一个 conky 脚本。 + +**为 conky 使用脚本而不是默认配置以及如何找到这些脚本?** + +你可以编写你自己的 conky 脚本或使用来自于互联网的脚本;我们并不建议你使用你从互联网中找到的具有潜在危险的任何脚本,除非你清楚你正在做什么。然而,有一些著名的主题和网页包含可信赖的 conky 脚本,例如下面所提及的: + +- [http://ubuntuforums.org/showthread.php?t=281865][3] +- [http://conky.sourceforge.net/screenshots.html][4] + +在上面的 URL 地址中,你将发现每个截图都有一个超链接,它们将重定向到脚本文件。 + +#### 测试 Conky 脚本 #### + +这里我将在我的 Debian Jessie 机子中运行一个由第三方写的 conky 脚本,以此来进行测试: + + $ wget https://github.com/alexbel/conky/archive/master.zip + $ unzip master.zip + +切换当前工作目录到刚才解压的目录: + + $ cd conky-master + +将 `secrets.yml.example` 重命名为 `secrets.yml`: + + $ mv secrets.yml.example secrets.yml + +在你能够运行这个(ruby)脚本之前安装 Ruby: + + $ sudo apt-get install ruby + $ ruby starter.rb + +![华丽的 conky 外观](http://www.tecmint.com/wp-content/uploads/2015/03/Conky-Fancy-Look.jpeg) +华丽的 conky 外观 + +**注**: 这个脚本可以被修改以展示你当前的天气,温度等; + +假如你想让 conky 开机自启,请在开机启动应用设置(startup Applications) 中添加如下的几行命令: + + conky --pause 10 + save and exit. + +最后。。。 如此轻量级且吸引眼球的实用 GUI 软件包不再处于激活状态且官方不再进行维护了。最新的稳定发布版本为 conky 1.9.0, 于 2012 年 5 月 3 号发布。在 Ubuntu 论坛上,一个有关用户分享 conky 配置的主题已经超过了 2000 多页。(这个论坛主题的链接为: [http://ubuntuforums.org/showthread.php?t=281865/][5]) + +- [Conky 主页][6] + +这就是全部内容了。保持联系,保持评论。请在下面的评论框里分享你的想法和配置。 +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-conky-in-ubuntu-debian-fedora/ + +作者:[Avishek Kumar][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://torsmo.sourceforge.net/ +[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[3]:http://ubuntuforums.org/showthread.php?t=281865 +[4]:http://conky.sourceforge.net/screenshots.html +[5]:http://ubuntuforums.org/showthread.php?t=281865/ +[6]:http://conky.sourceforge.net/ From 96a3c977dfa278976eff2eb5ab779c6a54ee1787 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 14 May 2015 11:19:32 +0800 Subject: [PATCH 0814/2517] Update 20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...load Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md b/sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md index 611fdea333..c9f54a8185 100644 --- a/sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md +++ b/sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md @@ -1,3 +1,5 @@ +FSSlc translating + Install uGet Download Manager 2.0 in Debian, Ubuntu, Linux Mint and Fedora ================================================================================ After a long development period, which includes more than 11 developement releases, finally uGet project team pleased to announce the immediate availability of the latest stable version of uGet 2.0. The latest version includes numerous attractive features, such as a new setting dialog, improved BitTorrent and Metalink support added in the aria2 plugin, as well as better support for uGet RSS messages in the banner, other features include: @@ -131,4 +133,4 @@ via: http://www.tecmint.com/install-uget-download-manager-in-linux/ [2]:http://ugetdm.com/downloads [3]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/ [4]:http://ugetdm.com/downloads-aria2 -[5]:http://ugetdm.com/downloads \ No newline at end of file +[5]:http://ugetdm.com/downloads From 162b28c95ae9ccff51f9fd0f1e9389c14b23c94f Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Thu, 14 May 2015 12:46:37 +0800 Subject: [PATCH 0815/2517] finish translation, need review by meself --- ...ogy http headers and caching strategies.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md index ae7ab6f1a1..d32242f3b9 100644 --- a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md +++ b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md @@ -137,3 +137,63 @@ Web һֻ ---------------- + +£κݶԱĻ棬ķֻҪżṩһЩ֤ݼɡʵкٷӦóһЩǵĻԣڳڻվıﵽƽ⡣ + + +### + +Уݱķʽÿû̬IJݵԣеݣЩݲӦñ档һЩԱûʱԵⲿδڣ°汾Ѿ + +ЩǾ⣬ǻӰ컺ܺṩݵ׼ȷԡȻǿͨǰԤЩĻЩ⡣ + +### һ㽨 + +ʵָѡĻԣĽܰһЩľ + +ʹһضͷ֮ǰһЩضIJ԰ᵽĻʡһЩ£ + +- **ΪͼCSS͹ݽضļ**ݷŵضļʹԷĴվеκҳЩݡ +- **ʹͬURLʾͬ**ڻʹе·ΪӦ֤ҳеĸݵ÷ʽͬǰһ +- **ʹCSSͼ**ͼ͵ݣʹCSSͼܹȾҳҪԾ黺ܳһʱ䡣 +- **ܽűⲿԴػ**ʹJavascriptűⲿԴûṩʵĻͷôӦǽЩݷԼķϡӦעεκθ£Ա±صĿ +- **ԻռļժҪ**̬ݱCSSJavascriptļͨȽʺռļժҪζΪļһصı־ͨļĹϣֵļ޸ĺƿ汣֤µݱ»ȡкܶ๤߿԰ļժҪ޸HTMLĵеá + +ڲͬļȷѡͬͷ£ݿΪһԵIJο + +- **еĻ洢һ**̬ԼûصӦڷַнڵ㱻档ʹмڵԽݻظû +- **ûص**ÿûݣͨûԼлǿԱġûܹʹûڽܹ˲ʱȡЩݲʺκмڵ㻺档 +- **ʱеΪ**ʱеģôοӦýЩΪԱ֤ڵݲڹؼ±ʹá磬վһﳵӦ̷ӦﳵƷݵص㣬`Cache-Control`ͷʹ`no-cache``no-store`ѡ +- **ṩ֤**֤ʹùڵݿضõˢ¡`ETag``Last-Modified`ͷԭʼ֤ݣδ޸ʱˢ¸ʶԼٸء +- **ֵ֧ó**Ϊ˸Чû棬һЩΪ֧ԵӦñýϳڡͨȽʺͼCSSûȾHTMLҳݡļժҪһӳڽ泤ʱĴ洢ЩԴԴı䣬޸ĵļժҪʹЧµݵءʱµֵ֧ݻ档 +- **Ըö̵**ΪʹǰģʽӦӦö̵ڣòȫ档ͨЭʹõHTMLҳ档HTMLҳ潫ᱻƵأʹܿٵӦı䡣֧Ե˿ԱĻ档 + +ؼ֮ڴﵽƽ⣬һԼĽл棬һΪδıݵĻᡣı䷢ʱվӦͬʱУ + +- ػ +- ӵж̵ڵĻݣԱ֤ +- ȫ + +ĿıǽݾܵƶһࣨĻ棩еͬʱάֿԽܵĻʡ + + +---- + +ʱȷվʹ˺ʵĻԽվҪӰ졣ʹԱ֤ͬݵͬʱٴʹáķ˿ԿͬӲҪǣͻվлø飬ʹǸԸƵķʡЧWeb沢úʵĻԻʹСĴۻÿɹ۵ջ + +--- + +: [Justin Ellingwood](https://www.digitalocean.com/community/users/jellingwood) + +ߣ[wwy-hust](https://github.com/wwy-hust) + +Уԣ[УID](https://github.com/УID) + +Ƽ[royaso](https://github.com/royaso) + +via: https://www.digitalocean.com/community/tutorials/web-caching-basics-terminology-http-headers-and-caching-strategies + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ + + + From 25df49614557f8d75d9f88997638f88461165c83 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Thu, 14 May 2015 13:19:34 +0800 Subject: [PATCH 0816/2517] finish review and deleted the origin from sources --- ...ogy http headers and caching strategies.md | 446 ------------------ ...ogy http headers and caching strategies.md | 49 +- 2 files changed, 24 insertions(+), 471 deletions(-) delete mode 100644 sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md diff --git a/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md deleted file mode 100644 index 07fd4fcd42..0000000000 --- a/sources/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md +++ /dev/null @@ -1,446 +0,0 @@ -translating by wwy-hust - -Web Caching Basics: Terminology, HTTP Headers, and Caching Strategies -===================================================================== - -### Introduction - -Intelligent content caching is one of the most effective ways to improve -the experience for your site's visitors. Caching, or temporarily storing -content from previous requests, is part of the core content delivery -strategy implemented within the HTTP protocol. Components throughout the -delivery path can all cache items to speed up subsequent requests, -subject to the caching policies declared for the content. - -In this guide, we will discuss some of the basic concepts of web content -caching. This will mainly cover how to select caching policies to ensure -that caches throughout the internet can correctly process your content. -We will talk about the benefits that caching affords, the side effects -to be aware of, and the different strategies to employ to provide the -best mixture of performance and flexibility. - -What Is Caching? ----------------- - -Caching is the term for storing reusable responses in order to make -subsequent requests faster. There are many different types of caching -available, each of which has its own characteristics. Application caches -and memory caches are both popular for their ability to speed up certain -responses. - -Web caching, the focus of this guide, is a different type of cache. Web -caching is a core design feature of the HTTP protocol meant to minimize -network traffic while improving the perceived responsiveness of the -system as a whole. Caches are found at every level of a content's -journey from the original server to the browser. - -Web caching works by caching the HTTP responses for requests according -to certain rules. Subsequent requests for cached content can then be -fulfilled from a cache closer to the user instead of sending the request -all the way back to the web server. - -Benefits --------- - -Effective caching aids both content consumers and content providers. -Some of the benefits that caching brings to content delivery are: - -- **Decreased network costs**: Content can be cached at various points - in the network path between the content consumer and content origin. - When the content is cached closer to the consumer, requests will not - cause much additional network activity beyond the cache. -- **Improved responsiveness**: Caching enables content to be retrieved - faster because an entire network round trip is not necessary. Caches - maintained close to the user, like the browser cache, can make this - retrieval nearly instantaneous. -- **Increased performance on the same hardware**: For the server where - the content originated, more performance can be squeezed from the - same hardware by allowing aggressive caching. The content owner can - leverage the powerful servers along the delivery path to take the - brunt of certain content loads. -- **Availability of content during network interruptions**: With - certain policies, caching can be used to serve content to end users - even when it may be unavailable for short periods of time from the - origin servers. - -Terminology ------------ - -When dealing with caching, there are a few terms that you are likely to -come across that might be unfamiliar. Some of the more common ones are -below: - -- **Origin server**: The origin server is the original location of the - content. If you are acting as the web server administrator, this is - the machine that you control. It is responsible for serving any - content that could not be retrieved from a cache along the request - route and for setting the caching policy for all content. -- **Cache hit ratio**: A cache's effectiveness is measured in terms of - its cache hit ratio or hit rate. This is a ratio of the requests - able to be retrieved from a cache to the total requests made. A high - cache hit ratio means that a high percentage of the content was able - to be retrieved from the cache. This is usually the desired outcome - for most administrators. -- **Freshness**: Freshness is a term used to describe whether an item - within a cache is still considered a candidate to serve to a client. - Content in a cache will only be used to respond if it is within the - freshness time frame specified by the caching policy. -- **Stale content**: Items in the cache expire according to the cache - freshness settings in the caching policy. Expired content is - "stale". In general, expired content cannot be used to respond to - client requests. The origin server must be re-contacted to retrieve - the new content or at least verify that the cached content is still - accurate. -- **Validation**: Stale items in the cache can be validated in order - to refresh their expiration time. Validation involves checking in - with the origin server to see if the cached content still represents - the most recent version of item. -- **Invalidation**: Invalidation is the process of removing content - from the cache before its specified expiration date. This is - necessary if the item has been changed on the origin server and - having an outdated item in cache would cause significant issues for - the client. - -There are plenty of other caching terms, but the ones above should help -you get started. - -What Can be Cached? -------------------- - -Certain content lends itself more readily to caching than others. Some -very cache-friendly content for most sites are: - -- Logos and brand images -- Non-rotating images in general (navigation icons, for example) -- Style sheets -- General Javascript files -- Downloadable Content -- Media Files - -These tend to change infrequently, so they can benefit from being cached -for longer periods of time. - -Some items that you have to be careful in caching are: - -- HTML pages -- Rotating images -- Frequently modified Javascript and CSS -- Content requested with authentication cookies - -Some items that should almost never be cached are: - -- Assets related to sensitive data (banking info, etc.) -- Content that is user-specific and frequently changed - -In addition to the above general rules, it's possible to specify -policies that allow you to cache different types of content -appropriately. For instance, if authenticated users all see the same -view of your site, it may be possible to cache that view anywhere. If -authenticated users see a user-sensitive view of the site that will be -valid for some time, you may tell the user's browser to cache, but tell -any intermediary caches not to store the view. - -Locations Where Web Content Is Cached -------------------------------------- - -Content can be cached at many different points throughout the delivery -chain: - -- **Browser cache**: Web browsers themselves maintain a small cache. - Typically, the browser sets a policy that dictates the most - important items to cache. This may be user-specific content or - content deemed expensive to download and likely to be requested - again. -- **Intermediary caching proxies**: Any server in between the client - and your infrastructure can cache certain content as desired. These - caches may be maintained by ISPs or other independent parties. -- **Reverse Cache**: Your server infrastructure can implement its own - cache for backend services. This way, content can be served from the - point-of-contact instead of hitting backend servers on each request. - -Each of these locations can and often do cache items according to their -own caching policies and the policies set at the content origin. - -Caching Headers ---------------- - -Caching policy is dependent upon two different factors. The caching -entity itself gets to decide whether or not to cache acceptable content. -It can decide to cache less than it is allowed to cache, but never more. - -The majority of caching behavior is determined by the caching policy, -which is set by the content owner. These policies are mainly articulated -through the use of specific HTTP headers. - -Through various iterations of the HTTP protocol, a few different -cache-focused headers have arisen with varying levels of sophistication. -The ones you probably still need to pay attention to are below: - -- **`Expires`**: The `Expires` header is very straight-forward, - although fairly limited in scope. Basically, it sets a time in the - future when the content will expire. At this point, any requests for - the same content will have to go back to the origin server. This - header is probably best used only as a fall back. -- **`Cache-Control`**: This is the more modern replacement for the - `Expires` header. It is well supported and implements a much more - flexible design. In almost all cases, this is preferable to - `Expires`, but it may not hurt to set both values. We will discuss - the specifics of the options you can set with `Cache-Control` a bit - later. -- **`Etag`**: The `Etag` header is used with cache validation. The - origin can provide a unique `Etag` for an item when it initially - serves the content. When a cache needs to validate the content it - has on-hand upon expiration, it can send back the `Etag` it has for - the content. The origin will either tell the cache that the content - is the same, or send the updated content (with the new `Etag`). -- **`Last-Modified`**: This header specifies the last time that the - item was modified. This may be used as part of the validation - strategy to ensure fresh content. -- **`Content-Length`**: While not specifically involved in caching, - the `Content-Length` header is important to set when defining - caching policies. Certain software will refuse to cache content if - it does not know in advanced the size of the content it will need to - reserve space for. -- **`Vary`**: A cache typically uses the requested host and the path - to the resource as the key with which to store the cache item. The - `Vary` header can be used to tell caches to pay attention to an - additional header when deciding whether a request is for the same - item. This is most commonly used to tell caches to key by the - `Accept-Encoding` header as well, so that the cache will know to - differentiate between compressed and uncompressed content. - -### An Aside about the Vary Header - -The `Vary` header provides you with the ability to store different -versions of the same content at the expense of diluting the entries in -the cache. - -In the case of `Accept-Encoding`, setting the `Vary` header allows for a -critical distinction to take place between compressed and uncompressed -content. This is needed to correctly serve these items to browsers that -cannot handle compressed content and is necessary in order to provide -basic usability. One characteristic that tells you that -`Accept-Encoding` may be a good candidate for `Vary` is that it only has -two or three possible values. - -Items like `User-Agent` might at first glance seem to be a good way to -differentiate between mobile and desktop browsers to serve different -versions of your site. However, since `User-Agent` strings are -non-standard, the result will likely be many versions of the same -content on intermediary caches, with a very low cache hit ratio. The -`Vary` header should be used sparingly, especially if you do not have -the ability to normalize the requests in intermediate caches that you -control (which may be possible, for instance, if you leverage a content -delivery network). - -How Cache-Control Flags Impact Caching --------------------------------------- - -Above, we mentioned how the `Cache-Control` header is used for modern -cache policy specification. A number of different policy instructions -can be set using this header, with multiple instructions being separated -by commas. - -Some of the `Cache-Control` options you can use to dictate your -content's caching policy are: - -- **`no-cache`**: This instruction specifies that any cached content - must be re-validated on each request before being served to a - client. This, in effect, marks the content as stale immediately, but - allows it to use revalidation techniques to avoid re-downloading the - entire item again. -- **`no-store`**: This instruction indicates that the content cannot - be cached in any way. This is appropriate to set if the response - represents sensitive data. -- **`public`**: This marks the content as public, which means that it - can be cached by the browser and any intermediate caches. For - requests that utilized HTTP authentication, responses are marked - `private` by default. This header overrides that setting. -- **`private`**: This marks the content as `private`. Private content - may be stored by the user's browser, but must *not* be cached by any - intermediate parties. This is often used for user-specific data. -- **`max-age`**: This setting configures the maximum age that the - content may be cached before it must revalidate or re-download the - content from the origin server. In essence, this replaces the - `Expires` header for modern browsing and is the basis for - determining a piece of content's freshness. This option takes its - value in seconds with a maximum valid freshness time of one year - (31536000 seconds). -- **`s-maxage`**: This is very similar to the `max-age` setting, in - that it indicates the amount of time that the content can be cached. - The difference is that this option is applied only to intermediary - caches. Combining this with the above allows for more flexible - policy construction. -- **`must-revalidate`**: This indicates that the freshness information - indicated by `max-age`, `s-maxage` or the `Expires` header must be - obeyed strictly. Stale content cannot be served under any - circumstance. This prevents cached content from being used in case - of network interruptions and similar scenarios. -- **`proxy-revalidate`**: This operates the same as the above setting, - but only applies to intermediary proxies. In this case, the user's - browser can potentially be used to serve stale content in the event - of a network interruption, but intermediate caches cannot be used - for this purpose. -- **`no-transform`**: This option tells caches that they are not - allowed to modify the received content for performance reasons under - any circumstances. This means, for instance, that the cache is not - able to send compressed versions of content it did not receive from - the origin server compressed and is not allowed. - -These can be combined in different ways to achieve various caching -behavior. Some mutually exclusive values are: - -- `no-cache`, `no-store`, and the regular caching behavior indicated - by absence of either -- `public` and `private` - -The `no-store` option supersedes the `no-cache` if both are present. For -responses to unauthenticated requests, `public` is implied. For -responses to authenticated requests, `private` is implied. These can be -overridden by including the opposite option in the `Cache-Control` -header. - -Developing a Caching Strategy ------------------------------ - -In a perfect world, everything could be cached aggressively and your -servers would only be contacted to validate content occasionally. This -doesn't often happen in practice though, so you should try to set some -sane caching policies that aim to balance between implementing long-term -caching and responding to the demands of a changing site. - -### Common Issues - -There are many situations where caching cannot or should not be -implemented due to how the content is produced (dynamically generated -per user) or the nature of the content (sensitive banking information, -for example). Another problem that many administrators face when setting -up caching is the situation where older versions of your content are out -in the wild, not yet stale, even though new versions have been -published. - -These are both frequently encountered issues that can have serious -impacts on cache performance and the accuracy of content you are -serving. However, we can mitigate these issues by developing caching -policies that anticipate these problems. - -### General Recommendations - -While your situation will dictate the caching strategy you use, the -following recommendations can help guide you towards some reasonable -decisions. - -There are certain steps that you can take to increase your cache hit -ratio before worrying about the specific headers you use. Some ideas -are: - -- **Establish specific directories for images, css, and shared - content**: Placing content into dedicated directories will allow you - to easily refer to them from any page on your site. -- **Use the same URL to refer to the same items**: Since caches key - off of both the host and the path to the content requested, ensure - that you refer to your content in the same way on all of your pages. - The previous recommendation makes this significantly easier. -- **Use CSS image sprites where possible**: CSS image sprites for - items like icons and navigation decrease the number of round trips - needed to render your site and allow your site to cache that single - sprite for a long time. -- **Host scripts and external resources locally where possible**: If - you utilize javascript scripts and other external resources, - consider hosting those resources on your own servers if the correct - headers are not being provided upstream. Note that you will have to - be aware of any updates made to the resource upstream so that you - can update your local copy. -- **Fingerprint cache items**: For static content like CSS and - Javascript files, it may be appropriate to fingerprint each item. - This means adding a unique identifier to the filename (often a hash - of the file) so that if the resource is modified, the new resource - name can be requested, causing the requests to correctly bypass the - cache. There are a variety of tools that can assist in creating - fingerprints and modifying the references to them within HTML - documents. - -In terms of selecting the correct headers for different items, the -following can serve as a general reference: - -- **Allow all caches to store generic assets**: Static content and - content that is not user-specific can and should be cached at all - points in the delivery chain. This will allow intermediary caches to - respond with the content for multiple users. -- **Allow browsers to cache user-specific assets**: For per-user - content, it is often acceptable and useful to allow caching within - the user's browser. While this content would not be appropriate to - cache on any intermediary caching proxies, caching in the browser - will allow for instant retrieval for users during subsequent visits. -- **Make exceptions for essential time-sensitive content**: If you - have content that is time-sensitive, make an exception to the above - rules so that the out-dated content is not served in critical - situations. For instance, if your site has a shopping cart, it - should reflect the items in the cart immediately. Depending on the - nature of the content, the `no-cache` or `no-store` options can be - set in the `Cache-Control` header to achieve this. -- **Always provide validators**: Validators allow stale content to be - refreshed without having to download the entire resource again. - Setting the `Etag` and the `Last-Modified` headers allow caches to - validate their content and re-serve it if it has not been modified - at the origin, further reducing load. -- **Set long freshness times for supporting content**: In order to - leverage caching effectively, elements that are requested as - supporting content to fulfill a request should often have a long - freshness setting. This is generally appropriate for items like - images and CSS that are pulled in to render the HTML page requested - by the user. Setting extended freshness times, combined with - fingerprinting, allows caches to store these resources for long - periods of time. If the assets change, the modified fingerprint will - invalidate the cached item and will trigger a download of the new - content. Until then, the supporting items can be cached far into the - future. -- **Set short freshness times for parent content**: In order to make - the above scheme work, the containing item must have relatively - short freshness times or may not be cached at all. This is typically - the HTML page that calls in the other assisting content. The HTML - itself will be downloaded frequently, allowing it to respond to - changes rapidly. The supporting content can then be cached - aggressively. - -The key is to strike a balance that favors aggressive caching where -possible while leaving opportunities to invalidate entries in the future -when changes are made. Your site will likely have a combination of: - -- Aggressively cached items -- Cached items with a short freshness time and the ability to - re-validate -- Items that should not be cached at all - -The goal is to move content into the first categories when possible -while maintaining an acceptable level of accuracy. - -Conclusion ----------- - -Taking the time to ensure that your site has proper caching policies in -place can have a significant impact on your site. Caching allows you to -cut down on the bandwidth costs associated with serving the same content -repeatedly. Your server will also be able to handle a greater amount of -traffic with the same hardware. Perhaps most importantly, clients will -have a faster experience on your site, which may lead them to return -more frequently. While effective web caching is not a silver bullet, -setting up appropriate caching policies can give you measurable gains -with minimal work. - - ---- - -作者: [Justin Ellingwood](https://www.digitalocean.com/community/users/jellingwood) - -译者:[译者ID](https://github.com/译者ID) - -校对:[校对者ID](https://github.com/校对者ID) - -推荐:[royaso](https://github.com/royaso) - -via: https://www.digitalocean.com/community/tutorials/web-caching-basics-terminology-http-headers-and-caching-strategies - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - - diff --git a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md index d32242f3b9..1b04873445 100644 --- a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md +++ b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md @@ -3,9 +3,9 @@ Web ### -վķ˵ܻݻûЧķʽ֮һ棬߶֮ǰʱ洢HTTPЭʵĵݷַ֮һַ·еԻٺڶĻԡ +վķ˵ܻݻûЧķʽ֮һ棬߶֮ǰʱ洢HTTPЭʵĵݷַ֮һַ·еԻٺڶԸĻԡ -ָУǽһЩWebݻĻҪѡ񻺴Ա֤ΧڵĻܹȷĴݡǽ̸һ̸ĺôáԼͬIJܴܺԵϡ +ָУǽһЩWebݻĻҪѡ񻺴Ա֤ΧڵĻܹȷĴݡǽ̸һ̸ĺôԼͬIJܴܺԵϡ ʲôǻ棿 ------------ @@ -19,7 +19,7 @@ Web ô ---- -ЧĻ漼ûݵṩߡһЩݷַĺôУ +ЧĻ漼ûݵṩߡݷַĺôУ - **翪**ݿڴṩߵ·֮಻ͬĵط档ھ߸ĵطʱڻĴڣ󽫲ĶԴ @@ -27,7 +27,7 @@ Web - **ͬӲٶ**ڱԭʼݵķ˵ܿͨĻԴӲѹեӵǿý·ǿķӦijݸصij -- **жʱɿ**ʹijֲԣԱ֤ݶûĿãܵԭʼijʱڱòá +- **жʱɿ**ʹijֲԣԱ֤ԭʼòʱӦݶûɿá ---- @@ -36,20 +36,20 @@ Web - **ԭʼ**ԭʼݵԭʼŵص㡣WebԱĻΪκβܴӻеõݽлظҸݵĻԡ -- ****һЧջʽжǿԴӻеõݵıʡʸζкܸ߱ݿԴӻлáͨǴԱҪĽ +- ****һЧջʽжǿԴӻеõݵıʡʸζкܸ߱ݿԴӻлáͨǴԱҪĽ -- **ʶ**ʶһеĿǷʺϷظͻˡеֻɻָʶʱڲŻᱻء +- **ʶ**ʶһеĿǷʺϷظͻˡеֻɻָڲŻᱻء -- ****иݻԵʶѹڵݡڵݱΪ"¾"ͨݲڻظͻ˵󡣱´ԭʼµݻ֤ǷȻ׼ȷ +- ****иݻԵѹڵݡڵݱΪ¾ɡͨݲڻظͻ˵󡣱´ԭʼµݻ֤ǷȻ׼ȷ - **У**еĹݿԱ֤ЧԱˢ¹ʱ䡣֤̰ϵԭʼԼ黺Ƿɴİ汾 -- **ʧЧ**ʧЧݹڴӻƳݵĹ̡ԭʼѱı䲢һйڵݻᵼ¿ͻǩʱDZġ +- **ʧЧ**ʧЧݹڴӻƳݵĹ̡ԭʼѱı䲢һйڵݻᵼ¿ͻ˵ǩʱDZġ -ĻЩӦܰ㿪ʼ +ĻЩӦܰʼ ʲôܱ棿 -------------- +-------------- ijЩضݱݸױ档Դվ˵һЩѺõ£ @@ -74,7 +74,7 @@ Web - ϢصԴݣȣ - ûҾĵ -ͨù⣬ͨҪָһЩԱڸõػ治ͬݡ磬½ûͬվͼӦκεطҳ档½ûһʱڿվûеͼӦûݵмκн黺ͼ +ͨù⣬ͨҪָһЩԱڸõػ治ͬݡ磬½ûͬվͼӦκεطҳ档½ûһʱڿվûеͼӦûݶӦκнڵ㻺ͼ Webݻλ ----------------- @@ -92,9 +92,9 @@ Web ͬءʵ屾ҪǷӦûɽܵݡֻ沿ֿԻݣܻ泬Ƶݡ -ΪҪɻԾӵáЩҪضHTTPͷı +ΪҪɻԾӵáЩҪͨضHTTPͷر -ͬHTTPЭĵһЩͬľ۽ڻͷˣǵĸӶȸͬгЩҲӦעģ +ͬHTTPЭĵһЩͬľ۽ڻͷˣǵĸӶȸͬгЩҲӦעģ - **`Expires`**ʹ÷Χ൱ޣ`Expires`ͷǷdz˵ġͨһδʱ䣬ݻڴʱڡʱκζͬݵӦûصԭʼͷʺϻģʽfall back - **`Cache-Control`**`Expires`һִ滻ѱܺõ֧֣ӵиʵ֡ڴУ`Expires`ãͬʱߵֵҲ޷Ժǽõ`Cache-Control`ϸѡ @@ -105,11 +105,11 @@ Web ### Varyͷ -`Vary`ͷṩ洢ͬһݲͬ汾ϡ˻ڡ +`Vary`ͷṩ洢ͬһݵIJͬ汾ϡ˻ڡ -`Accept-Encoding`İУ`Vary`ͷѹδѹӵоԵڷijЩܴѹݵʱҪԱ֤ʹá`Accept-Encoding``Vary`IJĺѡֵΪֻõֵһԡ +`Accept-Encoding`İУ`Vary`ͷѹδѹӵоԵڷijЩܴѹݵʱҪԱ֤ʹá`Accept-Encoding``Vary`IJĺѡֵΪֻѡֵ -`User-Agent`ͷһʼȥƶԱվṩ컯ķĺ⡣`User-Agent`ַǷDZ׼ġм仺жͬһݵ಻ͬ汾Ļ棬ᵼ»ʵĽ͡`Vary`ͷӦñصʹã߱Ƶм棨磬ݷַ磩ʹ׼ +`User-Agent`ͷһʼȥƶԱվṩ컯ķĺ⡣`User-Agent`ַǷDZ׼ģм仺жͬһݵ಻ͬ汾Ļ棬ᵼ»ʵĽ͡`Vary`ͷӦñصʹã߱Ƶм棨磬ݷַ磩ʹ׼ Ʊ־Ӱ컺 ------------------------ @@ -120,9 +120,9 @@ Web - **`no-cache`**ָָʾлµ󵽴ʱ֤ٷ͸ͻˡָʵʽ̱ΪڵģDZ֤֤Աݡ - **`no-store`**ָָʾݲκηʽ档ʺڻظϢʱá -- **`public`**ݱΪеģζܱκмڵ㻺档ͨʹHTTP֤ظĬϱΪ`private``public`ǽḲá +- **`public`**ݱΪеģζܱκмڵ㻺档ͨʹHTTP֤ظĬϱΪ`private``public`ǽḲá - **`private`**ݱΪ˽еġ˽ݿԱû棬**κмڵ㻺档ͨûصݡ -- **`max-age`**ָʾ˻ݵڣںԴ֤ءִѡȡ`Expires`ͷҲΪݵʶȵĻѡֵΪλʾԱʾһʶȣ31536000룩 +- **`max-age`**ָʾ˻ݵڣںԴ֤ءִѡȡ`Expires`ͷҲΪݵʶȵĻѡֵΪλʾԱʾһڣ31536000룩 - **`s-maxage`**ѡdz`max-age`ָܹʱ䡣ѡֻмڵĻЧѡԹĻԡ - **`must-revalidate`**ָ`max-age``s-maxage``Expires`ͷָʶϢ뱻ϸء˻жϵƵijбʹá - **`proxy-revalidate`**ѡһãֻӦмĴڵ㡣£ûжʱʹùݣмĻݲڴĿġ @@ -130,7 +130,7 @@ Web ЩѡܹԲͬķʽԻòͬĻΪһЩֵ£ -- `no-cache``no-store`ԼǰΪᵽѡָijõĻΪ +- `no-cache``no-store`ԼǰδᵽѡָijõĻΪ - `public``private` `no-store``no-cache`ãô`no-store`ȡ`no-cache`ڷȨĻظ`public`áȨĻظ`private`ѡġǿͨ`Cache-Control`ͷָӦ෴ѡԸǡ @@ -138,8 +138,7 @@ Web һֻ ---------------- -£κݶԱĻ棬ķֻҪżṩһЩ֤ݼɡʵкٷӦóһЩǵĻԣڳڻվıﵽƽ⡣ - +£κݶԱĻ棬ķֻҪżṩһЩ֤ݼɡʵкٷӦóһЩǵĻԣڳڻվıﵽƽ⡣ ### @@ -147,11 +146,11 @@ Web ЩǾ⣬ǻӰ컺ܺṩݵ׼ȷԡȻǿͨǰԤЩĻЩ⡣ -### һ㽨 +### һԽ ʵָѡĻԣĽܰһЩľ -ʹһضͷ֮ǰһЩضIJ԰ᵽĻʡһЩ£ +ʹһضͷ֮ǰһЩضIJ԰ĻʡһЩ£ - **ΪͼCSS͹ݽضļ**ݷŵضļʹԷĴվеκҳЩݡ - **ʹͬURLʾͬ**ڻʹе·ΪӦ֤ҳеĸݵ÷ʽͬǰһ @@ -162,7 +161,7 @@ Web ڲͬļȷѡͬͷ£ݿΪһԵIJο - **еĻ洢һ**̬ԼûصӦڷַнڵ㱻档ʹмڵԽݻظû -- **ûص**ÿûݣͨûԼлǿԱġûܹʹûڽܹ˲ʱȡЩݲʺκмڵ㻺档 +- **ûص**ÿûݣͨûԼлǿԱġûܹʹûڽܹ˲ʱȡЩݲʺκмڵ㻺档 - **ʱеΪ**ʱеģôοӦýЩΪԱ֤ڵݲڹؼ±ʹá磬վһﳵӦ̷ӦﳵƷݵص㣬`Cache-Control`ͷʹ`no-cache``no-store`ѡ - **ṩ֤**֤ʹùڵݿضõˢ¡`ETag``Last-Modified`ͷԭʼ֤ݣδ޸ʱˢ¸ʶԼٸء - **ֵ֧ó**Ϊ˸Чû棬һЩΪ֧ԵӦñýϳڡͨȽʺͼCSSûȾHTMLҳݡļժҪһӳڽ泤ʱĴ洢ЩԴԴı䣬޸ĵļժҪʹЧµݵءʱµֵ֧ݻ档 @@ -179,7 +178,7 @@ Web ---- -ʱȷվʹ˺ʵĻԽվҪӰ졣ʹԱ֤ͬݵͬʱٴʹáķ˿ԿͬӲҪǣͻվлø飬ʹǸԸƵķʡЧWeb沢úʵĻԻʹСĴۻÿɹ۵ջ +ʱȷվʹ˺ʵĻԽվҪӰ졣ʹڱ֤ͬݵͬʱٴʹáķ˿ԿͬӲҪǣͻվлø飬ʹǸԸƵķվ㡣ЧWeb沢úʵĻԻʹСĴۻÿɹ۵ջ --- From ddfabbfff9f22addf6b0f0db08e06e378d019e62 Mon Sep 17 00:00:00 2001 From: wwy Date: Thu, 14 May 2015 13:28:16 +0800 Subject: [PATCH 0817/2517] [Translating] Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10 --- ...ll Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md} | 2 ++ 1 file changed, 2 insertions(+) rename sources/tech/{20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md => [Translating] 20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md} (99%) diff --git a/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/sources/tech/[Translating] 20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md similarity index 99% rename from sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md rename to sources/tech/[Translating] 20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md index 6817a75b03..c52fae405d 100644 --- a/sources/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md +++ b/sources/tech/[Translating] 20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md @@ -1,3 +1,5 @@ +translating by wwy-hust + Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10 ================================================================================ From 6abcdd0f8e3c9a920c2a3bc0bb2d33585e376588 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Thu, 14 May 2015 15:00:27 +0800 Subject: [PATCH 0818/2517] Delete 20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md --- ...1.0--Open Source Animation Gets Serious.md | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md diff --git a/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md b/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md deleted file mode 100644 index 326593d7a3..0000000000 --- a/sources/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md +++ /dev/null @@ -1,42 +0,0 @@ -Translating by H-mudcup -Synfig Studio 1.0 — Open Source Animation Gets Serious -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/synfig-free-animations-750x467.jpg) - -**A brand new version of the free, open-source 2D animation software Synfig Studio is now available to download. ** - -The first release of the cross-platform software in well over a year, Synfig Studio 1.0 builds on its claim of offering “industrial-strength solution for creating film-quality animation” with a suite of new and improved features. - -Among them is an improved user interface that the project developers say is ‘easier’ and ‘more intuitive’ to use. The client adds a new **single-window mode** for tidy working and has been **reworked to use the latest GTK3 libraries**. - -On the features front there are several notable changes, including the addition of a fully-featured bone system. - -This **joint-and-pivot ‘skeleton’ framework** is well suited to 2D cut-out animation and should prove super efficient when coupled with the complex deformations new to this release, or used with Synfig’s popular ‘automatic interpolated keyframes’ (read: frame-to-frame morphing). - -注:youtube视频 - - -New non-destructive cutout tools, friction effects and initial support for full frame-by-frame bitmap animation, may help unlock the creativity of open-source animators, as might the addition of a sound layer for syncing the animation timeline with a soundtrack! - -### Download Synfig Studio 1.0 ### - -Synfig Studio is not a tool suited for everyone, though the latest batch of improvements in this latest release should help persuade some animators to give the free animation software a try. - -If you want to find out what open-source animation software is like for yourself, you can grab an installer for Ubuntu for the latest release direct from the project’s Sourceforge page using the links below. - -- [Download Synfig 1.0 (64bit) .deb Installer][1] -- [Download Synfig 1.0 (32bit) .deb Installer][2] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/04/synfig-studio-new-release-features - -作者:[oey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://sourceforge.net/projects/synfig/files/releases/1.0/linux/synfigstudio_1.0_amd64.deb/download -[2]:http://sourceforge.net/projects/synfig/files/releases/1.0/linux/synfigstudio_1.0_x86.deb/download From d403aae711d1068fe0440060b95f9f8bf12d0bfe Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Thu, 14 May 2015 15:01:13 +0800 Subject: [PATCH 0819/2517] Create 20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md --- ...1.0--Open Source Animation Gets Serious.md | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 translated/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md diff --git a/translated/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md b/translated/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md new file mode 100644 index 0000000000..b4e41bd155 --- /dev/null +++ b/translated/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md @@ -0,0 +1,43 @@ +Translating by H-mudcup + +Synfig Studio 1.0 —— 开源动画动真格的了 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/synfig-free-animations-750x467.jpg) + +**现在可以下载 Synfig Studio 这个自由、开源的2D动画软件的全新版本了。 ** + +在第一次发行这个跨平台的软件一年以后,Synfig Studio 1.0 带着一套全新改和改进过的功能,实现它所承诺的“创造电影级别的动画的产业级解决方案”。 + +在众多功能之上的是一个改进过的用户界面,据工程开发者说那是个用起来‘更简单’、‘更直观’的界面。客户端添加了新的**单窗口模式**,让界面更整洁,而且**为了使用最新的 GTK3 库而被重新制作**。 + +在功能方面有几个值得注意的变化,包括新加的全功能骨骼系统。 + +这套**关节和转轴的‘骨骼’构架**非常适合2D剪纸动画,再配上这个版本新加的复杂的变形控制系统或是 Synfig 受欢迎的‘关键帧自动插入’(阅读:画面与画面间的变形)应该会变得非常有效率的。 + +注:youtube视频 + + +新的无损剪切工具,摩擦力效果和对逐帧位图动画的支持,可能会有助于释放开源动画师们的创造力,更别说新加的用于同步动画的时间线和声音的声效层! + +### 下载 Synfig Studio 1.0 ### + +Synfig Studio 并不是任何人都能用的工具套件,这最新发行版的最新一批改进应该能吸引一些动画制作者试一试这个软件。 + +If you want to find out what open-source animation software is like for yourself, you can grab an installer for Ubuntu for the latest release direct from the project’s page using the links below. 如果你想看看开源动画制作软件是什么样的,你可以通过下面的链接直接从工程的 Sourceforge 页下载一个适用于 Ubuntu 的最新版本的安装器。 + +- [Download Synfig 1.0 (64bit) .deb Installer][1] +- [Download Synfig 1.0 (32bit) .deb Installer][2] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/synfig-studio-new-release-features + +作者:[oey-Elijah Sneddon][a] +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://sourceforge.net/projects/synfig/files/releases/1.0/linux/synfigstudio_1.0_amd64.deb/download +[2]:http://sourceforge.net/projects/synfig/files/releases/1.0/linux/synfigstudio_1.0_x86.deb/download From 68ca7b3faa5e98699efb1144c3a8f98963352427 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 14 May 2015 18:00:51 +0800 Subject: [PATCH 0820/2517] Translating by ZTinoZ --- ...427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index e40612ea8f..e0ac1fa238 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -9,7 +9,7 @@ 在刚装好Ubuntu之后你应该要关心的第一件事是启用官方合作伙伴提供的Ubuntu额外软件库并且通过最近一次的安全补丁和软件更新来保持系统是最新状态。 -要完成这一步,In order to accomplish this step, open from the left Launcher System Settings -> Software and Updates utility and check all Ubuntu Software and Other Software (Canonical Partners) repositories. After you finish hit the Close button and wait for the utility to Reload the cache sources tree. +要完成这一步,open from the left Launcher System Settings -> Software and Updates工具并检查所有Ubuntu软件和其他软件库(官方合作伙伴所提供)。After you finish hit the Close button and wait for the utility to Reload the cache sources tree. ![Software Updates](http://www.tecmint.com/wp-content/uploads/2015/04/Software-Updates.jpg) Software Updates From cd45e7e498bfc189892c3e3cd73d75da1553ab60 Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 15 May 2015 07:53:07 +0800 Subject: [PATCH 0821/2517] Update 20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md --- ... Disk Usage, Uptime, Load Average and RAM Usage in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md b/sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md index ae73d6896b..1242fdb60c 100644 --- a/sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md +++ b/sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux ================================================================================ The duty of System Administrator is really tough as he/she has to monitor the servers, users, logs, create backup and blah blah blah. For the most repetitive task most of the administrator write a script to automate their day-to-day repetitive task. Here we have written a shell Script that do not aims to automate the task of a typical system admin, but it may be helpful at places and specially for those newbies who can get most of the information they require about their System, Network, Users, Load, Ram, host, Internal IP, External IP, Uptime, etc. @@ -93,4 +94,4 @@ via: http://www.tecmint.com/linux-server-health-monitoring-script/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file +[1]:http://www.tecmint.com/10-wget-command-examples-in-linux/ From 96cbedcc182286a4fb3911b99acaa01a94f5d4d2 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 15 May 2015 08:35:21 +0800 Subject: [PATCH 0822/2517] [Translated]20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md --- ...me, Load Average and RAM Usage in Linux.md | 97 ------------------- ...me, Load Average and RAM Usage in Linux.md | 96 ++++++++++++++++++ 2 files changed, 96 insertions(+), 97 deletions(-) delete mode 100644 sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md create mode 100644 translated/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md diff --git a/sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md b/sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md deleted file mode 100644 index 1242fdb60c..0000000000 --- a/sources/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md +++ /dev/null @@ -1,97 +0,0 @@ -Translating by GOLinux! -A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux -================================================================================ -The duty of System Administrator is really tough as he/she has to monitor the servers, users, logs, create backup and blah blah blah. For the most repetitive task most of the administrator write a script to automate their day-to-day repetitive task. Here we have written a shell Script that do not aims to automate the task of a typical system admin, but it may be helpful at places and specially for those newbies who can get most of the information they require about their System, Network, Users, Load, Ram, host, Internal IP, External IP, Uptime, etc. - -We have taken care of formatting the output (to certain extent). The Script don’t contains any Malicious contents and it can be run using Normal user Account. In-fact it is recommended to run this script as user and not as root. - -![Linux Server Health Monitoring](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-Health-Monitoring.png) -Shell Script to Monitor Linux System Health - -You are free to use/modify/redistribute the below piece of code by giving proper credit to Tecmint and Author. We have tried to customize the output to the extent that nothing other than the required output is generated. We have tried to use those variables which are generally not used by Linux System and are probably free. - -#### Minimum System Requirement #### - -All you need to have is a working Linux box. - -#### Dependency #### - -There is no dependency required to use this package for a standard Linux Distribution. Moreover the script don’t requires root permission for execution purpose. However if you want to Install it, you need to enter root password once. - -#### Security #### - -We have taken care to ensure security of the system. Nothing additional package is required/installed. No root access required to run. Moreover code has been released under Apache 2.0 License, that means you are free to edit, modify and re-distribute by keeping Tecmint copyright. - -### How Do I Install and Run Script? ### - -First, use following [wget command][1] to download the monitor script `"tecmint_monitor.sh"` and make it executable by setting appropriate permissions. - - # wget http://tecmint.com/wp-content/scripts/tecmint_monitor.sh - # chmod 755 tecmint_monitor.sh - -It is strongly advised to install the script as user and not as root. It will ask for root password and will install the necessary components at required places. - -To install `"tecmint_monitor.sh"` script, simple use -i (install) option as shown below. - - /tecmint_monitor.sh -i - -Enter root password when prompted. If everything goes well you will get a success message like shown below. - - Password: - Congratulations! Script Installed, now run monitor Command - -After installation, you can run the script by calling command `'monitor'` from any location or user. If you don’t like to install it, you need to include the location every-time you want to run it. - - # ./Path/to/script/tecmint_monitor.sh - -Now run monitor command from anywhere using any user account simply as: - - $ monitor - -![TecMint Monitor Script in Action](http://www.tecmint.com/wp-content/uploads/2015/05/TecMint-Monitor-Script.gif) - -As soon as you run the command you get various System related information which are: - -- Internet Connectivity -- OS Type -- OS Name -- OS Version -- Architecture -- Kernel Release -- Hostname -- Internal IP -- External IP -- Name Servers -- Logged In users -- Ram Usages -- Swap Usages -- Disk Usages -- Load Average -- System Uptime - -Check the installed version of script using -v (version) switch. - - $ monitor -v - - tecmint_monitor version 0.1 - Designed by Tecmint.com - Released Under Apache 2.0 License - -### Conclusion ### - -This script is working out of the box on a few machines I have checked. It should work the same for you as well. If you find any bug let us know in the comments. This is not the end. This is the beginning. You can take it to any level from here. If you feel like editing the script and carry it further you are free to do so giving us proper credit and also share the updated script with us so that we can update this article by giving you proper credit. - -Don’t forget to share your thoughts or your script with us. We will be here to help you. Thank you for all the love you have given us. Keep Connected! Stay tuned. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-server-health-monitoring-script/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/10-wget-command-examples-in-linux/ diff --git a/translated/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md b/translated/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md new file mode 100644 index 0000000000..58eb9f18ca --- /dev/null +++ b/translated/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md @@ -0,0 +1,96 @@ +Linux中用于监控网络、磁盘使用、开机时间、平均负载和内存使用率的shell脚本 +================================================================================ +系统管理员的任务真的很艰难,因为他/她必须监控服务器、用户、日志,还得创建备份,等等等等。对于大多数重复性的任务,大多数管理员都会写一个自动化脚本来日复一日重复这些任务。这里,我们已经写了一个shell脚本给大家,用来自动化完成系统管理员所要完成的常规任务,这可能在多数情况下,尤其是对于新手而言十分有用,他们能通过该脚本获取到大多数的他们想要的信息,包括系统、网络、用户、负载、内存、主机、内部IP、外部IP、开机时间等。 + +我们已经注意并进行了格式化输出(在一定程度上哦)。此脚本不包含任何恶意内容,并且它能以普通用户帐号运行。事实上,我们也推荐你以普通用户运行该脚本,而不是root。 + +![Linux Server Health Monitoring](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-Health-Monitoring.png) +监控Linux系统健康的Shell脚本 + +你可以通过给Tecmint和脚本作者合适的积分,获得自由使用/修改/再分发下面代码的权利。我们已经试着在一定程度上自定义了输出结果,除了要求的输出内容外,其它内容都不会生成。我们也已经试着使用了那些Linux系统中通常不使用的变量,这些变量可能也是自由代码。 + +#### 最小系统要求 #### + +你所需要的一切,就是一台正常运转的Linux盒子。 + +#### 依赖性 #### + +对于一个标准的Linux发行版,使用此包时没有任何依赖。此外,该脚本不需要root权限来执行。但是,如果你想要安装,则必须输入一次root密码。 + +#### 安全性 #### + +我们也关注到了系统安全问题,所以在安装此包时,不需要安装任何额外包,也不需要root访问权限来运行。此外,源代码是采用Apache 2.0许可证发布的,这意味着只要你保留Tecmint的版权,你可以自由地编辑、修改并再分发该代码。 + +### 如何安装和运行脚本? ### + +首先,使用[wget命令][1]下载监控脚本`“tecmint_monitor.sh”`,给它赋予合适的执行权限。 + + # wget http://tecmint.com/wp-content/scripts/tecmint_monitor.sh + # chmod 755 tecmint_monitor.sh + +强烈建议你以普通用户身份安装该脚本,而不是root。安装过程中会询问root密码,并且在需要的时候安装必要的组件。 + +要安装`“tecmint_monitor.sh”`脚本,只需像下面这样使用-i(安装)选项就可以了。 + + /tecmint_monitor.sh -i + +在提示你输入root密码时输入该密码。如果一切顺利,你会看到像下面这样的安装成功信息。 + + Password: + Congratulations! Script Installed, now run monitor Command + +安装完毕后,你可以通过在任何位置,以任何用户调用命令`‘monitor’`来运行该脚本。如果你不喜欢安装,你需要在每次运行时输入路径。 + + # ./Path/to/script/tecmint_monitor.sh + +现在,以任何用户从任何地方运行monitor命令,就是这么简单: + + $ monitor + +![TecMint Monitor Script in Action](http://www.tecmint.com/wp-content/uploads/2015/05/TecMint-Monitor-Script.gif) + +你一运行命令,就会获得下面这些各种各样和系统相关的信息: + +- 互联网连通性 +- 操作系统类型 +- 操作系统名称 +- 操作系统版本 +- 架构 +- 内核版本 +- 主机名 +- 内部IP +- 外部IP +- 域名服务器 +- 已登录用户 +- 内存使用率 +- 交换分区使用率 +- 磁盘使用率 +- 平均负载 +- 系统开机时间 + +使用-v(版本)开关来检查安装的脚本的版本。 + + $ monitor -v + + tecmint_monitor version 0.1 + Designed by Tecmint.com + Released Under Apache 2.0 License + +### 小结 ### + +该脚本在一些机器上可以开机即用,这一点我已经检查过。相信对于你而言,它也会正常工作。如果你们发现了什么毛病,可以在评论中告诉我。这个脚本还不是结束,这仅仅是个开始。从这里开始,你可以将它提升到任何等级。如果你想要编辑脚本,将它带入一个更深的层次,尽管随意去做吧,别忘了给我们合适的积分,也别忘了把你更新后的脚本拿出来和我们分享哦,这样,我们也能通过给你合适的积分来更新此文。 + +别忘了和我们分享你的想法或者脚本,我们会在这儿帮助你。谢谢你们给予的所有挚爱。保持连线,不要走开哦。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-server-health-monitoring-script/ + +作者:[Avishek Kumar][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/10-wget-command-examples-in-linux/ From da8593f1a323f8267590d7c478c67fcc7149da50 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 15 May 2015 11:38:30 +0800 Subject: [PATCH 0823/2517] Translating by ZTinoZ --- ...o After Installing Ubuntu 15.04 Desktop.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index e0ac1fa238..634d624197 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -9,7 +9,7 @@ 在刚装好Ubuntu之后你应该要关心的第一件事是启用官方合作伙伴提供的Ubuntu额外软件库并且通过最近一次的安全补丁和软件更新来保持系统是最新状态。 -要完成这一步,open from the left Launcher System Settings -> Software and Updates工具并检查所有Ubuntu软件和其他软件库(官方合作伙伴所提供)。After you finish hit the Close button and wait for the utility to Reload the cache sources tree. +要完成这一步,依次从左边菜单中打开System Settings -> Software and Updates工具并检查所有Ubuntu软件和其他软件库(官方合作伙伴所提供),点击关闭按钮并等待重新加载缓存源树。 ![Software Updates](http://www.tecmint.com/wp-content/uploads/2015/04/Software-Updates.jpg) Software Updates @@ -17,7 +17,7 @@ Software Updates ![Other Software (Canonical Partners)](http://www.tecmint.com/wp-content/uploads/2015/04/Other-Software.jpg) Other Software (Canonical Partners) -For a fast and smooth update process, open a Terminal and issue the following command in order to update the system using the new software repositories: +经过一系列快速平滑的更新过程之后,打开终端并输入以下命令来让系统使用新软件库: $ sudo apt-get update $ sudo apt-get upgrade @@ -34,7 +34,7 @@ If some drivers matching your hardware are found, check the drivers you want to ![Install Drivers in Ubuntu](http://www.tecmint.com/wp-content/uploads/2015/04/install-drivers.jpg) Install Drivers -### 3. Install Synaptic and Gdebi Package Tools ### +### 3. 安装Synaptic和Gdebi工具 ### Besides Ubuntu Software Center, Synaptic is a Graphical utility for apt command line through which you can manage repositories or install, remove, search, upgrade and configure software packages. Similar way, Gdebi has the same functionality for local .deb packages. To install this two package managers on your system issue the following command on Terminal: @@ -46,14 +46,14 @@ Install Synaptic and Gdebi ![Synaptic Package Manager](http://www.tecmint.com/wp-content/uploads/2015/04/synaptic-package-manager.jpg) Synaptic Package Manager -### 4. Change System Appearance and Behavior ### +### 4. 更改系统外观和运行状态 ### If you want to change Desktop Background or Launcher Icon Size, open System Settings –> Appearance –> Look and personalize the desktop. To move the menu to window title bar, enable workspaces and desktop icons or auto-hide the Launcher visit Behavior tab. ![System Appearances](http://www.tecmint.com/wp-content/uploads/2015/04/system-appearance.jpg) System Appearances -### 5. Improve System Security and Privacy ### +### 5. 提升系统安全性和隐私性 ### ![System Security Enhancement](http://www.tecmint.com/wp-content/uploads/2015/04/system-security-1.jpg) System Security Enhancement @@ -61,7 +61,7 @@ System Security Enhancement ![System Security Options](http://www.tecmint.com/wp-content/uploads/2015/04/system-security-2.jpg) System Security Options -### 5. Disable Unneeded Startup Applications ### +### 5. 禁用不需要开机自启动的应用程序 ### To improve system login speed, reveal hidden Startup Applications by issuing the below command on Terminal, open Startup Applications utility by searching it in Dash and uncheck the unneeded applications during login process. @@ -70,7 +70,7 @@ To improve system login speed, reveal hidden Startup Applications by issuing the ![Disable Unwanted Applications](http://www.tecmint.com/wp-content/uploads/2015/04/disable-unwanted-applications.jpg) Disable Unwanted Applications -### 6. Add Extended Multimedia Support ### +### 6. 添加扩展多媒体支持 ### By default, Ubuntu comes with a minimal support for media files. In order to play various media formats or manipulate video files, install the following multimedia applications: @@ -108,7 +108,7 @@ To enable DVD Playback and other multimedia codecs issue the following command o ![Enable Video Codes](http://www.tecmint.com/wp-content/uploads/2015/04/enable-video-playbacks.jpg) Enable Video Codes -### 7. Install Image Applications ### +### 7. 安装图像处理应用程序 ### If you are a photography enthusiast and you want to handle and manipulate images on Ubuntu, probably you want to install the following imaging programs: @@ -131,7 +131,7 @@ Install Image Applications ![Rawtherapee Tool](http://www.tecmint.com/wp-content/uploads/2015/04/rawtherapee.jpg) Rawtherapee Tool -### 8. Install Media Burners ### +### 8. 安装媒体烧录软件 ### To mount ISO images or burn a CDs or a DVD, you can choose and install from the following software: @@ -148,7 +148,7 @@ To mount ISO images or burn a CDs or a DVD, you can choose and install from the ![Install Media Burners](http://www.tecmint.com/wp-content/uploads/2015/04/install-media-burners.jpg) Install Media Burners -### 9. Install Archive Applications ### +### 9. 安装压缩应用程序 ### To handle most of archive formatted files (zip, tar.gz, zip, 7zip rar etc) install the following packages by issuing the below command: @@ -157,7 +157,7 @@ To handle most of archive formatted files (zip, tar.gz, zip, 7zip rar etc) insta ![Install Archive Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-archive-apps.jpg) Install Archive Applications -### 10. Install Chat Application ### +### 10. 安装聊天应用程序 ### If you want to talk to people all over the world, here is a list of the most popular chat applications for Linux: @@ -186,7 +186,7 @@ To install Viber application on Ubuntu visit [Viber official webpage][1], downlo ![Install Viber in Ubuntu](http://www.tecmint.com/wp-content/uploads/2015/04/install-viber.jpg) Install Viber -### 11. Install Torrent Software ### +### 11. 安装种子软件 ### The most popular torrent applications and peer-to-peer file sharing programs for Ubuntu are: @@ -205,7 +205,7 @@ To install your favorite peer-to-peer file sharing application on Ubuntu issue t ![Install Torrent](http://www.tecmint.com/wp-content/uploads/2015/04/install-torrent.jpg) Install Torrent -### 12. Install Windows Emulator -Wine and Gaming Support – Steam ### +### 12. 安装Windows仿真器-Wine和游戏支持平台-Steam ### Wine emulator allows you to install and run Windows applications on Linux. On the other hand, Steam is a popular gaming platform for Linux based systems developed by Valve. To install both of them on your machine issue the following command on Terminal or use Ubuntu Software Center. @@ -214,7 +214,7 @@ Wine emulator allows you to install and run Windows applications on Linux. On th ![Install Wine](http://www.tecmint.com/wp-content/uploads/2015/04/install-wine.jpg) Install Wine -### 13. Install Cairo-Dock and Enable Desktop Visual Effects ### +### 13. 安装Cairo-Dock并启用桌面视觉效果 ### Cairo-Dock is a beautiful and flexible launcher bar for Linux desktops similar to the Mac OS X dock. To install it on Ubuntu, run the following command on Terminal. @@ -244,7 +244,7 @@ Compiz Settings Addons ![Desktop Window Rotating](http://www.tecmint.com/wp-content/uploads/2015/04/desktop-cube.jpg) Desktop Window Rotating -### 14. Add Extra Browser Support ### +### 14. 添加额外浏览器支持 ### Ubuntu 15.04 comes by default with Mozilla Firefox Web Browser. To install other browsers such as Google Chrome or Opera, visit their official web pages, download the provided .deb packages and install them on your system using the Gdebi Package Installer. @@ -258,7 +258,7 @@ To install Chromium Open Source browser issue the following command on Terminal. $ sudo apt-get install chromium-browser -### 15. Install Tweak Tools ### +### 15. 安装Tweak工具 ### Want extra applications for customizing Ubuntu? Then install Unity Tweak Tool and Gnome Tweak Tool by issuing the following commands on Terminal. From cf06b774b5131f08395505cfaa46204b0bef10cb Mon Sep 17 00:00:00 2001 From: wwy Date: Fri, 15 May 2015 11:55:21 +0800 Subject: [PATCH 0824/2517] start translation --- ...l Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md diff --git a/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md new file mode 100644 index 0000000000..afe07b4a37 --- /dev/null +++ b/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md @@ -0,0 +1,4 @@ +Ubuntu 14.10ϰװLinux-Dash(Webļع) +================================================================================ + +һGNU/LinuxģͿļDZ̡򵥵İװʼɣLinux DashĽṩĹؼϢϸͼ From b0aae05e4d0df830aa2d99cdae6b9e3639890063 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Fri, 15 May 2015 13:14:33 +0800 Subject: [PATCH 0825/2517] finished translation --- ...b Based Monitoring tool) on Ubntu 14.10.md | 69 ++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md index afe07b4a37..006e636a25 100644 --- a/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md +++ b/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md @@ -1,4 +1,71 @@ Ubuntu 14.10ϰװLinux-Dash(Webļع) ================================================================================ -һGNU/LinuxģͿļDZ̡򵥵İװʼɣLinux DashĽṩĹؼϢϸͼ +һGNU/LinuxģͿļDZ̡򵥵İװʼɣLinux DashĽṩĹؼϢϸͼɼϢRAMʹʹʡ硢װûе̡߳еϢ࣬ͨҳеĹеİťκһСLinux DashȽļ⹤ߣʮʺѰײӦõû + +### Linux-DashĹ ### + +һWebƯDZ̽طϢ + +ʵʱļRAMءʱ䡢áûϵͳ״̬ + +ʽΪװApache2/niginx + PHP + +϶пؼ + +ֶ֧͵linux + +### ǰռб ### + +- ͨϢ +- ƽ +- RAM +- ʹ +- û +- +- IP +- +- +- +- ־ + +### Ubuntu server 14.10ϰװLinux-Dash ### + +Ҫȷװ[Ubuntu LAMP server 14.10][1]Ҫװİ + + sudo apt-get install php5-json unzip + +װģҪapache2ʹܸģ飬Ҫʹapache2 + + sudo service apache2 restart + +Ҫlinux-dashװҰװ + + wget https://github.com/afaqurk/linux-dash/archive/master.zip + + unzip master.zip + + sudo mv linux-dash-master/ /var/www/html/linux-dash-master/ + +ҪʹıȨޣ + + sudo chmod 755 /var/www/html/linux-dash-master/ + +Էhttp://serverip/linux-dash-master/Ӧûῴ + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/02/1.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/02/2.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/install-linux-dash-web-based-monitoring-tool-on-ubntu-14-10.html + +ߣ[ruchi][a] +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ + +[a]:http://www.ubuntugeek.com/author/ubuntufix +[1]:http://www.ubuntugeek.com/step-by-step-ubuntu-14-10-utopic-unicorn-lamp-server-setup.html From d269fa75e988e609a88e8dd53f002758225fd8f4 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Fri, 15 May 2015 13:29:18 +0800 Subject: [PATCH 0826/2517] after review by meself --- ...b Based Monitoring tool) on Ubntu 14.10.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md index 006e636a25..14496aabfc 100644 --- a/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md +++ b/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md @@ -1,21 +1,21 @@ Ubuntu 14.10ϰװLinux-Dash(Webļع) ================================================================================ -һGNU/LinuxģͿļDZ̡򵥵İװʼɣLinux DashĽṩĹؼϢϸͼɼϢRAMʹʹʡ硢װûе̡߳еϢ࣬ͨҳеĹеİťκһСLinux DashȽļ⹤ߣʮʺѰײӦõû +Linux-DashһGNU/LinuxģͿļDZ̡װʼʹðɣLinux DashĽṩķйؼϢϸͼɼϢRAMʹʡ硢װûе̵߳ȡеϢ࣬ͨҳеİťκһСLinux DashȽļ⹤ߣʮʺѰײӦõû ### Linux-DashĹ ### -һWebƯDZ̽طϢ +ʹһWebƯDZ̽طϢ -ʵʱļRAMءʱ䡢áûϵͳ״̬ +ʵʱļRAMءʱ䡢áûϵͳ״̬ -ʽΪװApache2/niginx + PHP +ɲʽΪװApache2/niginx + PHP -϶пؼ +ͨ϶пؼ ֶ֧͵linux -### ǰռб ### +### ǰؼб ### - ͨϢ - ƽ @@ -34,12 +34,12 @@ Ҫȷװ[Ubuntu LAMP server 14.10][1]Ҫװİ sudo apt-get install php5-json unzip - + װģҪapache2ʹܸģ飬Ҫʹapache2 sudo service apache2 restart -Ҫlinux-dashװҰװ +Ҫlinux-dashİװװ wget https://github.com/afaqurk/linux-dash/archive/master.zip @@ -47,11 +47,11 @@ sudo mv linux-dash-master/ /var/www/html/linux-dash-master/ -ҪʹıȨޣ +ҪʹıȨޣ sudo chmod 755 /var/www/html/linux-dash-master/ -Էhttp://serverip/linux-dash-master/Ӧûῴ +Էhttp://serverip/linux-dash-master/ˡӦûῴ ![](http://www.ubuntugeek.com/wp-content/uploads/2015/02/1.png) From 357ae318d2018f7350a2da650aa8176168fb32f8 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Fri, 15 May 2015 13:33:20 +0800 Subject: [PATCH 0827/2517] remove source article --- ...b Based Monitoring tool) on Ubntu 14.10.md | 73 ------------------- 1 file changed, 73 deletions(-) delete mode 100644 sources/tech/[Translating] 20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md diff --git a/sources/tech/[Translating] 20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/sources/tech/[Translating] 20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md deleted file mode 100644 index c52fae405d..0000000000 --- a/sources/tech/[Translating] 20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md +++ /dev/null @@ -1,73 +0,0 @@ -translating by wwy-hust - -Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10 -================================================================================ - -A low-overhead monitoring web dashboard for a GNU/Linux machine. Simply drop-in the app and go!.Linux Dash's interface provides a detailed overview of all vital aspects of your server, including RAM and disk usage, network, installed software, users, and running processes. All information is organized into sections, and you can jump to a specific section using the buttons in the main toolbar. Linux Dash is not the most advanced monitoring tool out there, but it might be a good fit for users looking for a slick, lightweight, and easy to deploy application. - -### Linux-Dash Features ### - -A beautiful web-based dashboard for monitoring server info - -Live, on-demand monitoring of RAM, Load, Uptime, Disk Allocation, Users and many more system stats - -Drop-in install for servers with Apache2/nginx + PHP - -Click and drag to re-arrange widgets - -Support for wide range of linux server flavors - -### List of Current Widgets ### - -- General info -- Load Average -- RAM -- Disk Usage -- Users -- Software -- IP -- Internet Speed -- Online -- Processes -- Logs - -### Install Linux-dash on ubuntu server 14.10 ### - -First you need to make sure you have [Ubuntu LAMP server 14.10][1] installed and Now you have to install the following package - - sudo apt-get install php5-json unzip - -After the installation this module will enable for apache2 so you need to restart the apache2 server using the following command - - sudo service apache2 restart - -Now you need to download the linux-dash package and install - - wget https://github.com/afaqurk/linux-dash/archive/master.zip - - unzip master.zip - - sudo mv linux-dash-master/ /var/www/html/linux-dash-master/ - -Now you need to change the permissions using the following command - - sudo chmod 755 /var/www/html/linux-dash-master/ - -Now you need to go to http://serverip/linux-dash-master/ you should see similar to the following output - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/02/1.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/02/2.png) - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/install-linux-dash-web-based-monitoring-tool-on-ubntu-14-10.html - -作者:[ruchi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ubuntugeek.com/author/ubuntufix -[1]:http://www.ubuntugeek.com/step-by-step-ubuntu-14-10-utopic-unicorn-lamp-server-setup.html From 8dad59d0bb422191a27a54af91779e56dae0bf80 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 15 May 2015 13:34:18 +0800 Subject: [PATCH 0828/2517] [Translating] sources/20150512 How To Run Docker Client Inside Windows OS --- .../tech/20150512 How To Run Docker Client Inside Windows OS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150512 How To Run Docker Client Inside Windows OS.md b/sources/tech/20150512 How To Run Docker Client Inside Windows OS.md index e2379b70b8..0dcd19d5e4 100644 --- a/sources/tech/20150512 How To Run Docker Client Inside Windows OS.md +++ b/sources/tech/20150512 How To Run Docker Client Inside Windows OS.md @@ -1,3 +1,4 @@ +Translating by ictlyh How To Run Docker Client Inside Windows OS ================================================================================ Hi everyone, today we'll learn about Docker in Windows Operating System and about the installation of Docker Windows Client in it. Docker Engine uses Linux Specific Kernel features so it cannot use Windows Kernel to run so, the Docker Engine creates a small Virtual Machine running Linux and utilizes its resources and Kernel. The Windows Docker Client uses the virtualized Docker Engine to build, run and manage Docker Containers out of the box. There is an application developed by the Boot2Docker Team called Boot2Docker which creates the virtual machine running a small Linux based on [Tiny Core Linux][1] made specifically to run [Docker][2] containers on Windows. It runs completely from RAM, weighs ~27MB and boots in ~5s (YMMV). So, until the Docker Engine for Windows is developed, we can only run Linux containers in our Windows Machine. From b076d426e0d7d94e982f5c9cb1ae77163312a522 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 15 May 2015 14:58:08 +0800 Subject: [PATCH 0829/2517] [Translated] tech/20150512 How To Run Docker Client Inside Windows OS --- ... To Run Docker Client Inside Windows OS.md | 108 ------------------ ... To Run Docker Client Inside Windows OS.md | 107 +++++++++++++++++ 2 files changed, 107 insertions(+), 108 deletions(-) delete mode 100644 sources/tech/20150512 How To Run Docker Client Inside Windows OS.md create mode 100644 translated/tech/20150512 How To Run Docker Client Inside Windows OS.md diff --git a/sources/tech/20150512 How To Run Docker Client Inside Windows OS.md b/sources/tech/20150512 How To Run Docker Client Inside Windows OS.md deleted file mode 100644 index 0dcd19d5e4..0000000000 --- a/sources/tech/20150512 How To Run Docker Client Inside Windows OS.md +++ /dev/null @@ -1,108 +0,0 @@ -Translating by ictlyh -How To Run Docker Client Inside Windows OS -================================================================================ -Hi everyone, today we'll learn about Docker in Windows Operating System and about the installation of Docker Windows Client in it. Docker Engine uses Linux Specific Kernel features so it cannot use Windows Kernel to run so, the Docker Engine creates a small Virtual Machine running Linux and utilizes its resources and Kernel. The Windows Docker Client uses the virtualized Docker Engine to build, run and manage Docker Containers out of the box. There is an application developed by the Boot2Docker Team called Boot2Docker which creates the virtual machine running a small Linux based on [Tiny Core Linux][1] made specifically to run [Docker][2] containers on Windows. It runs completely from RAM, weighs ~27MB and boots in ~5s (YMMV). So, until the Docker Engine for Windows is developed, we can only run Linux containers in our Windows Machine. - -Here is some easy and simple steps which will allow us to install the Docker Client and run containers on top of it. - -### 1. Downloading Boot2Docker ### - -Now, before we start the installation, we'll need the executable file for Boot2Docker. The latest version of Boot2Docker can be downloaded from [its Github][3]. Here, in this tutorial, we'll download version v1.6.1 from the site. Here, we'll download the file named [docker-install.exe][4] from that page using our favorite Web Browser or Download Manager. - -![](http://blog.linoxide.com/wp-content/uploads/2015/05/downloading-boot2docker-installer.png) - -### 2. Installing Boot2Docker ### - -Now, we'll simply run the installer which will install Windows Docker Client, Git for Windows (MSYS-git), VirtualBox, The Boot2Docker Linux ISO, and the Boot2Docker management tool which are essential for the total functioning of Docker Engine out of the box. - -![](http://blog.linoxide.com/wp-content/uploads/2015/05/boot2docker-installer.png) - -### 3. Running Boot2Docker ### - -![](http://blog.linoxide.com/wp-content/uploads/2015/05/boot2docker-start-icon-e1431322598697.png) - -After installing the necessary stuffs, we'll run Boot2Docker by simply running the Boot2Docker Start shortcut from the Desktop. This will ask you to enter an SSH key paraphrase that we'll require in future for authentication. It will start a unix shell already configured to manage Docker running inside the virtual machine. - -![](http://blog.linoxide.com/wp-content/uploads/2015/05/starting-boot2docker.png) - -Now to check whether it is correctly configured or not, simply run docker version as shown below. - - docker version - -![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-version.png) - -### 4. Running Docker ### - -As **Boot2Docker Start** automatically starts a shell with environment variables correctly set so we can simply start using Docker right away. **Please note that, if we are Boot2Docker as remote Docker Daemon , then do not type the sudo before the docker commands.** - -Now, Let's try the **hello-world** example image which will download the hello-world image, executes it and gives an output "Hello from Docker" message. - - $ docker run hello-world - -![](http://blog.linoxide.com/wp-content/uploads/2015/05/running-hello-world.png) - -### 5. Running Docker using Command Prompt (CMD) ### - -Now, if you are wanting to get started with Docker using Command Prompt, you can simply launch the command prompt (CMD.exe). As Boot2Docker requires ssh.exe to be in the PATH, therefore we need to include bin folder of the Git installation to the %PATH% environment variable by running the following command in the command prompt. - - set PATH=%PATH%;"c:\Program Files (x86)\Git\bin" - -![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-in-cmd.png) - -After running the above command, we can run the **boot2docker start** command in the command prompt to start the Boot2Docker VM. - - boot2docker start - -![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-cmd-variables.png) - -**Note**: If you get an error saying machine does not exist then run **boot2docker init** command in it. - -Then copy the instructions for cmd.exe shown in the console to set the environment variables to the console window and we are ready to run docker containers as usual. - -### 6. Running Docker using PowerShell ### - -In order to run Docker on PowerShell, we simply need to launch a PowerShell window then add ssh.exe to our PATH variable. - - $Env:Path = "${Env:Path};c:\Program Files (x86)\Git\bin" - -After running the above command, we'll need to run - - boot2docker start - -![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-in-powershell.png) - -This will print PowerShell commands to set the environment variables to connect Docker running inside VM. We'll simply run those commands in the PowerShell and we are ready to run docker containers as usual. - -### 7. Logging with PUTTY ### - -Boot2Docker generates and uses the public or private key pair inside %USERPROFILE%\.ssh directory so to login, we'll need use the private key from this same directory. That private key needs to be converted into the PuTTY 's format. We can use puttygen.exe to do that. - -We need to open puttygen.exe and load ("File"->"Load" menu) the private key from %USERPROFILE%\.ssh\id_boot2docker then click on "Save Private Key". Then use the saved file to login with PuTTY using docker@127.0.0.1:2022 . - -### 8. Boot2Docker Options ### - -The Boot2Docker management tool provides several commands as shown below. - - $ boot2docker - - Usage: boot2docker.exe [] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|ip|shellinit|delete|download|upgrade|version} [] - -### Conclusion ### - -Using Docker with Docker Windows Client is fun. The Boot2Docker management tool is an awesome application developed which enables every Docker containers to run smoothly as running in Linux host. If you are more curious, the username for the boot2docker default user is docker and the password is tcuser. The latest version of boot2docker sets up a host only network adapter which provides access to the container's ports. Typically, it is 192.168.59.103, but it could get changed by Virtualbox's DHCP implementation. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/run-docker-client-inside-windows-os/ - -作者:[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/ -[1]:http://tinycorelinux.net/ -[2]:https://www.docker.io/ -[3]:https://github.com/boot2docker/windows-installer/releases/latest -[4]:https://github.com/boot2docker/windows-installer/releases/download/v1.6.1/docker-install.exe \ No newline at end of file diff --git a/translated/tech/20150512 How To Run Docker Client Inside Windows OS.md b/translated/tech/20150512 How To Run Docker Client Inside Windows OS.md new file mode 100644 index 0000000000..f23c109149 --- /dev/null +++ b/translated/tech/20150512 How To Run Docker Client Inside Windows OS.md @@ -0,0 +1,107 @@ +如何在 Windows 操作系统中运行 Docker 客户端 +================================================================================ +大家好,今天我们来了解一下 Windows 操作系统中的 Docker 以及在其中安装 Docker Windows 客户端的知识。Docker 引擎使用 Linux 特定内核特性,因此不能通过 Windows 内核运行,Docker 引擎创建一个小的虚拟系统运行 Linux 并利用它的资源和内核。Windows Docker 客户端用虚拟化 Docker 引擎构建,运行以及管理 盒子以外的 Docker 容器。这里有个由 Boot2Docker 团队开发的名为 Boot2Docker 的应用程序,它创建运行在基于[Linux 微内核][1]的小型 Linux 系统上的虚拟机,是特意为在 Windows 上运行 [Docker][2] 容器开发的。它完全运行在 RAM 中,需要大约 27M 内存并能在 5s(YMMV,译者注:your mileage may vary,因人而异) 内启动。因此,在用于 Windows 的 Docker 引擎被开发出来之前,我们在 Windows 机器里只能运行 Linux 容器。 + +下面是安装 Docker 客户端并在上面运行容器的简单步骤。 + +### 1. 下载 Boot2Docker ### + +在我们开始安装之前,我们需要 Boot2Docker 的可执行文件。可以从 [它的 Github][3] 下载最新版本的 Boot2Docker。在这篇指南中,我们从网站中下载版本 v1.6.1。我们从那网页中用我们喜欢的浏览器或者下载管理器下载了名为 [docker-install.exe][4] 的文件。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/downloading-boot2docker-installer.png) + +### 2. 安装 Boot2Docker ### + +现在我们运行安装文件,它会安装 Window Docker 客户端、用于 Windows 的 Git(MSYS-git)、VirtualBox、Boot2Docker Linux ISO 以及 Boot2Docker 管理工具,这些对于在盒子之外运行 Docker 引擎都至关重要。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/boot2docker-installer.png) + +### 3. 运行 Boot2Docker ### + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/boot2docker-start-icon-e1431322598697.png) + +安装完成必要的组件之后,我们从桌面 Boot2Docker 快捷方式启动 Boot2Docker。它会要求你输入以后用于验证的 SSH 密钥。然后会启动一个配置好的用于管理在虚拟机中运行的 Docker 的 unix shell。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/starting-boot2docker.png) + +为了检查是否正确配置,运行下面的 docker version 命令。 + + docker version + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-version.png) + +### 4. 运行 Docker ### + +由于 **Boot2Docker Start** 自动启动了一个已经正确设置好环境变量的 shell,我们可以马上开始使用 Docker。**请注意,如果我们将 Boot2Docker 作为一个远程 Docker 守护进程,那么不要在 docker 命令之前加 sudo。** + +现在,让我们来试试 **hello-world** 例子镜像,它会下载 hello-world 镜像,运行并输出 "Hello from Docker" 信息。 + + $ docker run hello-world + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/running-hello-world.png) + +### 5. 使用命令提示符(CMD) 运行 Docker### + +现在,如果你想开始用命令提示符使用 Docker,你可以打开命令提示符(CMD.exe)。由于 Boot2Docker 要求 ssh.exe 在 PATH 中,我们需要在命令提示符中输入以下命令使得 %PATH% 环境变量中包括 Git 安装目录下的 bin 文件夹。 + + set PATH=%PATH%;"c:\Program Files (x86)\Git\bin" + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-in-cmd.png) + +运行上面的命令之后,我们可以在命令提示符中运行 **boot2docker start** 启动 Boot2Docker 虚拟机。 + + boot2docker start + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-cmd-variables.png) + +**注意**: 如果你看到 machine does no exist 的错误信息,就运行 **boot2docker init** 命令。 + +然后复制控制台中的命令到 cmd.exe 中为控制台窗口设置环境变量,然后我们就可以像平常一样运行 docker 容器了。 + +### 6. 使用 PowerShell 运行 Docker ### + +为了能在 PowerShell 中运行 Docker,我们需要启动一个 PowerShell 窗口并添加 ssh.exe 到 PATH 变量。 + + $Env:Path = "${Env:Path};c:\Program Files (x86)\Git\bin" + +运行完上面的命令,我们还需要运行 + + boot2docker start + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-in-powershell.png) + +这会打印用于设置环境变量连接到虚拟机内部运行的 Docker 的 PowerShell 命令。我们只需要在 PowerShell 中运行这些命令就可以和平常一样运行 docker 容器。 + +### 7. 用 PUTTY 登录 ### + +Boot2Docker 在%USERPROFILE%\.ssh 目录生成和使用用于登录的公共和私有密钥,我们也需要使用这个文件夹中的私有密钥。私有密钥需要转换为 PuTTY 的格式。我们可以通过 puttygen.exe 实现。 + +我们需要打开 puttygen.exe 并从 %USERPROFILE%\.ssh\id_boot2docker 中导入("File"->"Load" 菜单)私钥,然后点击 "Save Private Key"。然后用保存的文件通过 PuTTY 用 docker@127.0.0.1:2022 登录。 + +### 8. Boot2Docker 选项 ### + +Boot2Docker 管理工具提供了一些命令,如下所示。 + + $ boot2docker + + Usage: boot2docker.exe [] {help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|ip|shellinit|delete|download|upgrade|version} [] + +### 总结 ### + +通过 Docker Windows 客户端使用 Docker 很有趣。Boot2Docker 管理工具是一个能使任何 Docker 容器能像在 Linux 主机上平稳运行的很棒的应用程序。如果你更仔细的话,你会发现 boot2docker 默认用户的用户名是 docker,密码是 tcuser。最新版本的 boot2docker 设置了一个 host-only 的网络适配器提供访问容器的端口。一般来说是 192.168.59.103,但可以通过 VirtualBox 的 DHCP 实现改变。如果你有任何问题、建议、反馈,请在下面的评论框中写下来然后我们可以改进或者更新我们的内容。非常感谢!Enjoy:-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/run-docker-client-inside-windows-os/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://tinycorelinux.net/ +[2]:https://www.docker.io/ +[3]:https://github.com/boot2docker/windows-installer/releases/latest +[4]:https://github.com/boot2docker/windows-installer/releases/download/v1.6.1/docker-install.exe \ No newline at end of file From 33084d152870fb1434bc51b9a98d1c96f39d2206 Mon Sep 17 00:00:00 2001 From: wwy Date: Fri, 15 May 2015 16:05:24 +0800 Subject: [PATCH 0830/2517] =?UTF-8?q?[Translating]=20Guake=200.7.0=20Relea?= =?UTF-8?q?sed=20=E2=80=93=20A=20Drop-Down=20Terminal=20for=20Gnome=20Desk?= =?UTF-8?q?tops?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md b/sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md index 40adc3390c..786acddff4 100644 --- a/sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md +++ b/sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md @@ -1,3 +1,5 @@ +translating by wwy-hust + Guake 0.7.0 Released – A Drop-Down Terminal for Gnome Desktops ================================================================================ Linux commandline is the best and most powerful thing that fascinates a new user and provides extreme power to experienced users and geeks. For those who work on Server and Production, they are already aware of this fact. It would be interesting to know that Linux console was one of those first features of the kernel that was written by Linus Torvalds way back in the year 1991. @@ -112,4 +114,4 @@ via: http://www.tecmint.com/install-guake-terminal-ubuntu-mint-fedora/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/linux-terminal-emulators/ -[2]:https://github.com/Guake/guake/releases/tag/0.7.0 \ No newline at end of file +[2]:https://github.com/Guake/guake/releases/tag/0.7.0 From 13a63f2765c354b9a46bd629f185b92afface4c7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 15 May 2015 16:16:05 +0800 Subject: [PATCH 0831/2517] =?UTF-8?q?20150515-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...working Commands with Docker Containers.md | 106 ++++++++++ ...w to Install Percona Server on CentOS 7.md | 188 ++++++++++++++++++ 2 files changed, 294 insertions(+) create mode 100644 sources/tech/20150515 Basic Networking Commands with Docker Containers.md create mode 100644 sources/tech/20150515 How to Install Percona Server on CentOS 7.md diff --git a/sources/tech/20150515 Basic Networking Commands with Docker Containers.md b/sources/tech/20150515 Basic Networking Commands with Docker Containers.md new file mode 100644 index 0000000000..d07c3b2507 --- /dev/null +++ b/sources/tech/20150515 Basic Networking Commands with Docker Containers.md @@ -0,0 +1,106 @@ +Basic Networking Commands with Docker Containers +================================================================================ +Hi everybody, today we'll learn some basic networking with Docker Containers. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. Docker is meant for networking as it is gradually used in data-centers, ISPs and much more networked servers. + +So, here are some basic networking commands that you can use on managing Docker Containers. + +### 1. Finding the Docker Interface ### + +Docker by default creates a bridge interface named docker0 which basically connects with the outside world. The docker containers running is directly connected with the bridge interface docker0. By default, docker assigns ip address 172.17.42.1/16 to the bridge interface docker0 which acts as a subnet for all the ip addresses of the running containers. It is pretty easy to get the Docker Interface's IP Address. To find out our docker0 bridge interface and the docker containers connected with the bridge we can simply run ip a command inside a terminal or a shell where Docker is installed. + + # ip a + +![Docker Interface](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-interface.png) + +### 2. Getting the Docker Container's IP Address ### + +As we read above, docker creates a bridge interface named docker0 in the host machine. As we create a new docker container, it is automatically assigned with a new dynamic IP Address by default which is followed within the subnet range of the interface. So, to check the IP Address of the running Docker container, we'll need to get into a running container and check out the ip address as shown below. First, we'll run a new container and get into the container. If you have got a container running already, you may skip the first command below. + + # docker run -it ubuntu + +Now, we'll be able to run ip a in order to get the ip address of the running container. + + # ip a + +![Docker Container IP](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-container-ip.png) + +### 3. Mapping the Expose port ### + +To map the exposed port configured in the Dockerfile for the container to the high port, we'll simply need to follow the docker command with -P flag. This will open the random port of the Docker Container to the port defined by the Dockerfile. So, here's an example of using the flag -P to open/expose the defined port. + + # docker run -itd -P httpd + +![Mapping Expose Port](http://blog.linoxide.com/wp-content/uploads/2015/05/mapping-expose-port.png) + +The above command will map container's port to port 80 as its defined in the Dockerfile of httpd. We can check the exposed port by viewing the running container using the following command. + + # docker ps + +And can use curl to check by running the below command. + + # curl http://localhost:49153 + +![Curl Exposed Port](http://blog.linoxide.com/wp-content/uploads/2015/05/curl-exposed-port-e1431034586219.png) + +### 4. Mapping to the Specific Port ### + +We can also map the expose port or docker container port to the port we specify or define. In order to map the container to a specific port of our choice, we'll need to define the port of our desire with the flag -p . Here's an example on how we can do that. + + # docker run -itd -p 8080:80 httpd + +The above command will map the port 8080 to port 80. We can check it by running curl to that port. + + # curl http://localhost:8080 + +![Mapping Specific Port](Curl Exposed Port) + +### 5. Creating own Bridge ### + +To assign a custom IP Address to the containers, we'll need to create a new bridge interface named bro in this tutorial. To assign a desired IP Address, we'll need to run the following command in the host machine running docker. + + # stop docker.io + # ip link add br0 type bridge + # ip addr add 172.30.1.1/20 dev br0 + # ip link set br0 up + # docker -d -b br0 + +![Creating Bridge Interface](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-bridge-interface.png) + +After creating the docker bridge, we'll want to let the Docker Daemon know about it. + + # echo 'DOCKER_OPTS="-b=br0"' >> /etc/default/docker + # service docker.io start + +![Adding Interface to Docker](http://blog.linoxide.com/wp-content/uploads/2015/05/adding-interface-to-docker.png) + +Here, the bridged interface will range the docker containers with the ip address followed by bridge ip subnet . + +### 6. Linking one Container to another ### + +We can connect one container with the another container with Docker. We can run different apps on different containers and connect or link with each other. Links allow containers to connect with each other and securely transfer information about one container to another container. To do so, we'll use the --link flag. First, we'll use flag --name so that it will be easy to denote training/postgres image. + + # docker run -d --name db training/postgres + +![Running db Container](http://blog.linoxide.com/wp-content/uploads/2015/05/running-db-container.png) + +After done, we'll gonna link training/webapp with the container db that we create earlier forming a new container named web. + + # docker run -d -P --name web --link db:db training/webapp python app.py + +![linking two containers](http://blog.linoxide.com/wp-content/uploads/2015/05/linking-two-containers.png) + +### Conclusion ### + +Networking with Docker is fun and amazing cause there are many stuffs we can do with Docker Containers. These were some easy and basic networking commands that we can play with Docker. Networking with docker is really advanced. We can do many stuffs with it. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/networking-commands-docker-containers/ + +作者:[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/20150515 How to Install Percona Server on CentOS 7.md b/sources/tech/20150515 How to Install Percona Server on CentOS 7.md new file mode 100644 index 0000000000..03affe787e --- /dev/null +++ b/sources/tech/20150515 How to Install Percona Server on CentOS 7.md @@ -0,0 +1,188 @@ +How to Install Percona Server on CentOS 7 +================================================================================ +In this article we are going to learn about percona server, an opensource drop-in replacement for MySQL and also for MariaDB. The InnoDB database engine make it very attractive and a good alternative if you need performance, reliability and a cost efficient solution + +In the following sections I am going to cover the installation of the percona server on the CentOS 7, I will also cover the steps needed to make backup of your current data, configuration and how to restore your backup. + +### Table of contents ### + +1. What is and why use percona +1. Backup your databases +1. Remove previous SQL server +1. Installing Percona binaries +1. Configuring Percona +1. Securing your environment +1. Restore your backup + +### 1. What is and why use Percona ### + +Percona is an opensource alternative to the MySQL and MariaDB databases, it's a fork of the MySQL with many improvements and unique features that makes it more reliable, powerful and faster than MySQL, and yet is fully compatible with it, you can even use replication between Oracle's MySQL and Percona. + +#### Features exclusive to Percona #### + +- Partitioned Adaptive Hash Search +- Fast Checksum Algorithm +- Buffer Pool Pre-Load +- Support for FlashCache + +#### MySQL Enterprise and Percona specific features #### + +- Import Tables From Different Servers +- PAM authentication +- Audit Log +- Threadpool + +Now that you are pretty excited to see all these good things together, we are going show you how to install and do basic configuration of Percona Server. + +### 2. Backup your databases ### + +The following, command creates a mydatabases.sql file with the SQL commands to recreate/restore salesdb and employeedb databases, replace the databases names to reflect your setup, skip if this is a brand new setup + + mysqldump -u root -p --databases employeedb salesdb > mydatabases.sql + +Copy the current configuration file, you can also skip this in fresh setups + + cp my.cnf my.cnf.bkp + +### 3. Remove your previous SQL Server ### + +Stop the MySQL/MariaDB if it's running. + + systemctl stop mysql.service + +Uninstall MariaDB and MySQL + + yum remove MariaDB-server MariaDB-client MariaDB-shared mysql mysql-server + +Move / Rename the MariaDB files in **/var/lib/mysql**, it's a safer and faster than just removing, it's like a 2nd level instant backup. :) + + mv /var/lib/mysql /var/lib/mysql_mariadb + +### 4. Installing Percona binaries ### + +You can choose from a number of options on how to install Percona, in a CentOS system it's generally a better idea to use yum or RPM, so these are the way that are covered by this article, compiling and install from sources are not covered by this article. + +Installing from Yum repository: + +First you need to set the Percona's Yum repository with this: + + yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm + +And then install Percona with: + + yum install Percona-Server-client-56 Percona-Server-server-56 + +The above command installs Percona server and clients, shared libraries, possibly Perl and perl modules such as DBI::MySQL, if that are not already installed, and also other dependencies as needed. + +Installing from RPM package: + +We can download all rpm packages with the help of wget: + + wget -r -l 1 -nd -A rpm -R "*devel*,*debuginfo*" \ http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-5.5.42-37.1/binary/redhat/7/x86_64/ + +And with rpm utility, you install all the packages once: + + rpm -ivh Percona-Server-server-55-5.5.42-rel37.1.el7.x86_64.rpm \ Percona-Server-client-55-5.5.42-rel37.1.el7.x86_64.rpm \ Percona-Server-shared-55-5.5.42-rel37.1.el7.x86_64.rpm + +Note the backslash '\' on the end of the sentences on the above commands, if you install individual packages, remember that to met dependencies, the shared package must be installed before client and client before server. + +### 5. Configuring Percona Server ### + +#### Restoring previous configuration #### + +As we are moving from MariaDB, you can just restore the backup of my.cnf file that you made in earlier steps. + + cp /etc/my.cnf.bkp /etc/my.cnf + +#### Creating a new my.cnf #### + +If you need a new configuration file that fit your needs or if you don't have made a copy of my.cnf, you can use this wizard, it will generate for you, through simple steps. + +Here is a sample my.cnf file that comes with Percona-Server package + + # Percona Server template configuration + + [mysqld] + # + # Remove leading # and set to the amount of RAM for the most important data + # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. + # innodb_buffer_pool_size = 128M + # + # Remove leading # to turn on a very important data integrity option: logging + # changes to the binary log between backups. + # log_bin + # + # Remove leading # to set options mainly useful for reporting servers. + # The server defaults are faster for transactions and fast SELECTs. + # Adjust sizes as needed, experiment to find the optimal values. + # join_buffer_size = 128M + # sort_buffer_size = 2M + # read_rnd_buffer_size = 2M + datadir=/var/lib/mysql + socket=/var/lib/mysql/mysql.sock + + # Disabling symbolic-links is recommended to prevent assorted security risks + symbolic-links=0 + + [mysqld_safe] + log-error=/var/log/mysqld.log + pid-file=/var/run/mysqld/mysqld.pid + +After making your my.cnf file fit your needs, it's time to start the service: + + systemctl restart mysql.service + +If everything goes fine, your server is now up and ready to ready to receive SQL commands, you can try the following command to check: + + mysql -u root -p -e 'SHOW VARIABLES LIKE "version_comment"' + +If you can't start the service, you can look for a reason in **/var/log/mysql/mysqld.log** this file is set by the **log-error** option in my.cnf's **[mysqld_safe]** session. + + tail /var/log/mysql/mysqld.log + +You can also take a look in a file inside **/var/lib/mysql/** with name in the form of **[hostname].err** as the following example: + + tail /var/lib/mysql/centos7.err + +If this also fail in show what is wrong, you can also try strace: + + yum install strace && systemctl stop mysql.service && strace -f -f mysqld_safe + +The above command is extremely verbous and it's output is quite low level but can show you the reason you can't start service in most times. + +### 6. Securing your environment ### + +Ok, you now have your RDBMS ready to receive SQL queries, but it's not a good idea to put your precious data on a server without minimum security, it's better to make it safer with mysql_secure_instalation, this utility helps in removing unused default features, also set the root main password and make access restrictions for using this user. +Just invoke it by the shell and follow instructions on the screen. + + mysql_secure_install + +### 7. Restore your backup ### + +If you are coming from a previous setup, now you can restore your databases, just use mysqldump once again. + + mysqldump -u root -p < mydatabases.sql + +Congratulations, you just installed Percona on your CentOS Linux, your server is now fully ready for use; You can now use your service as it was MySQL, and your services are fully compatible with it. + +### Conclusion ### + +There is a lot of things to configure in order to achieve better performance, but here is some straightforward options to improve your setup. When using innodb engine it's also a good idea to set the **innodb_file_per_table** option **on**, it gonna distribute table indexes in a file per table basis, it means that each table have it's own index file, it makes the overall system, more robust and easier to repair. + +Other option to have in mind is the **innodb_buffer_pool_size** option, InnoDB should have large enough to your datasets, and some value **between 70% and 80%** of the total available memory should be reasonable. + +By setting the **innodb-flush-method** to **O_DIRECT** you disable write cache, if you have **RAID**, this should be set to improved performance as this cache is already done in a lower level. + +If your data is not that critical and you don't need fully **ACID** compliant transactions, you can adjust to 2 the option **innodb_flush_log_at_trx_commit**, this will also lead to improved performance. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/percona-server-centos-7/ + +作者:[Carlos Alberto][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/carlosal/ \ No newline at end of file From 2e83a483ef099cbf1cb668f3385582b78f7fcc57 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 15 May 2015 16:41:50 +0800 Subject: [PATCH 0832/2517] =?UTF-8?q?20150515-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...5 Apps You Didn't Know You Were Missing.md | 103 ++++++++++ ... Instagram Style Filters to Your Photos.md | 71 +++++++ ... System to Preserve Privacy and Anonymity.md | 179 ++++++++++++++++++ 3 files changed, 353 insertions(+) create mode 100644 sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md create mode 100644 sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md create mode 100644 sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md diff --git a/sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md b/sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md new file mode 100644 index 0000000000..99b4b1915f --- /dev/null +++ b/sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md @@ -0,0 +1,103 @@ +New to Linux? 5 Apps You Didn’t Know You Were Missing +================================================================================ +![](http://cdn.makeuseof.com/wp-content/uploads/2015/05/linux-apps-840x420.jpg?92a7a3) + +When you moved to Linux, you went straight for the obvious browsers, cloud clients, music players, email clients, and perhaps image editors, right? As a result, you’ve missed several vital, productive tools. Here’s a roundup of five umissable Linux apps that you really need to install. + +### [Synergy][1] ### + +Synergy is a godsend if you use multiple desktops. It’s an open-source app that allows you to use a single mouse and keyboard across multiple computers, displays, and operating systems. Switching the mouse and keyboard functionality between the desktops is easy. Just move the mouse out the edge of one screen and into another. + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/multiple-monitors-640x431.jpg?92a7a3) + +When you open Synergy for the first time, it will run you through the setup wizard. The primary desktop is the one whose input devices you’ll be sharing with the other desktops. Configure that as the server. Add the remaining computers as clients. + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/synergy-setup-wizard-640x480.jpg?92a7a3) + +Synergy maintains a common clipboard across all connected desktops. It also merges the lock screen setup, i.e. you need to bypass the lock screen just once to log in to all the computers together. Under **Edit > Settings**, you can make a few more tweaks such as adding a password and setting Synergy to launch on startup. + +### [BasKet Note Pads][2] ### + +Using BasKet Note Pads is somewhat like mapping your brain onto a computer. It helps make sense of all the ideas floating around in your head by allowing you to organize them in digestible chunks. You can use BasKet Note Pads for various tasks such as taking notes, creating idea maps and to-do lists, saving links, managing research, and keeping track of project data. + +Each main idea or project goes into a section called a basket. To split ideas further, you can have one or more sub-baskets or sibling baskets. The baskets are further broken down into notes, which hold all the bits and pieces of a project. You can group them, tag them, and filter them. + +The left pane in the application’s two-pane structure displays a tree-like view of all the baskets you have created. + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/basket-note-pads-640x480.jpg?92a7a3) + +BasKet Note Pads might seem a little complex on day one, but you’ll get the hang of it soon. When you’re not using it, the app sits in the system tray, ready for quick access. + +Want a [simpler note-taking alternative][3] on Linux? Try [Springseed][4]. + +### [Caffeine][5]### + +How do you ensure that your computer doesn’t go to sleep right in the middle of an [interesting movie][6]? Caffeine is the answer. No, you don’t need to brew a cup of coffee for your computer. You just need to install a lightweight indicator applet called Caffeine. It prevents the screen-saver, lock screen, or the Sleep mode from being activated when the computer is idle, only if the current window is in full-screen mode. + +To install the applet, [download its latest version][7]. If you want to go [the ppa way][8], here’s how you can: + + $ sudo add-apt-repository ppa:caffeine-developers/ppa + $ sudo apt-get update + $ sudo apt-get install caffeine + +On Ubuntu versions 14.10 and 15.04 (and their derivatives), you’ll also need to install certain dependency packages: + + $ sudo apt-get install libappindicator3-1 gir1.2-appindicator3-0.1 + +After finishing the installation, add **caffeine-indicator** to your list of startup applications to make the indicator appear in the system tray. You can turn Caffeine’s functionality on and off via the app’s context menu, which pops up when you right-click on the tray icon. + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/caffeine-indicator-640x480.jpg?92a7a3) + +### Easystroke ### + +Easystroke makes an excellent [Linux mouse hack][9]. Use it to set up a series of customized mouse/touchpad/pen gestures to simulate common actions such as keystrokes, commands, and scrolls. Setting up Easystroke gestures is straightforward enough, thanks to the clear instructions that appear at all the right moments when you’re navigating the UI. + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/easystroke-record-640x480.jpg?92a7a3) + +Begin by choosing the mouse button you’d like to use for performing gestures. Throw in a modifier if you like. You’ll find this setting under **Preferences > Behavior > Gesture Button**. Now head to the **Actions** tab and record strokes for your most commonly used actions. + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/easytroke-actions-640x480.jpg?92a7a3) + +Using the **Preferences** and **Advanced** tabs, you can make other tweaks like setting Easystroke to autostart, adding a system tray icon, and changing scroll speed. + +### Guake ### + +I saved my favorite Linux find for last. Guake is a dropdown command line modeled after the one in the first-person shooter video game [Quake][10]. Whether you’re [learning about terminal commands][11] or executing them on a regular basis, Guake is a great way to keep the terminal handy. You can bring it up or hide it in a single keystroke. + +As you can see in the image below, when in action, Guake appears as an overlay on the current window. Right-click within the terminal to access the **Preferences** section, from where you can change Guake’s appearance, its scroll action, keyboard shortcuts, and more. + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/guake-terminal-640x480.jpg?92a7a3) + +If KDE is your [Linux desktop of choice][12], do check out [Yakuake][13], which provides a similar functionality. + +### Name Your Favorite Linux Discovery! ### + +There are many more [super useful Linux apps][14] waiting to be discovered. Rest assured that we’ll keep introducing you to them. + +Which Linux app were you happiest to learn about? Which one do you consider a must-have? Tell us in the comments. + +-------------------------------------------------------------------------------- + +via: http://www.makeuseof.com/tag/new-linux-5-apps-didnt-know-missing/ + +作者:[Akshata][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.makeuseof.com/tag/author/akshata/ +[1]:http://synergy-project.org/ +[2]:http://basket.kde.org/ +[3]:http://www.makeuseof.com/tag/try-these-3-beautiful-note-taking-apps-that-work-offline/ +[4]:http://getspringseed.com/ +[5]:https://launchpad.net/caffeine +[6]:http://www.makeuseof.com/tag/popular-apps-movies-according-google/ +[7]:http://ppa.launchpad.net/caffeine-developers/ppa/ubuntu/pool/main/c/caffeine/ +[8]:http://www.makeuseof.com/tag/ubuntu-ppa-technology-explained/ +[9]:http://www.makeuseof.com/tag/4-astounding-linux-mouse-hacks/ +[10]:http://en.wikipedia.org/wiki/Quake_%28video_game%29 +[11]:http://www.makeuseof.com/tag/4-ways-teach-terminal-commands-linux-si/ +[12]:http://www.makeuseof.com/tag/10-top-linux-desktop-environments-available/ +[13]:https://yakuake.kde.org/ +[14]:http://www.makeuseof.com/tag/linux-treasures-x-sublime-native-linux-apps-will-make-want-switch/ \ No newline at end of file diff --git a/sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md b/sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md new file mode 100644 index 0000000000..b9ff371e5f --- /dev/null +++ b/sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md @@ -0,0 +1,71 @@ +This Ubuntu App Applies Instagram Style Filters to Your Photos +================================================================================ +**Looking for an Ubuntu app to apply Instagram style filters to your photos in Ubuntu?** + +Grab your selfie stick and step this way… + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/instagram-app.jpg) +XnRetro is a photo editing app + +### XnRetro Photo Editor ### + +**XnRetro** is a simple image editing application that lets you quickly add “Instagram like” effects to your photos. + +You know the sort of effects I’m talking about: scratches, noises, and frames, over processing, vintage washes and nostalgic tints (because in this age of digital transience we must know that endless selfies and sandwich snaps are unlikely to ever become nostalgic of themselves). + +Whether you consider such effects to be of asinine artistic value or shortcut to being creative, these kinds of filters are popular and can help add a splash of personality to an otherwise so-so photo. + +#### XnRetro Features #### + +**XnRetro features the following:** + +- 20 color filters +- 15 light effects (bokeh, leaks, etc) +- 28 frames and borders +- 5 Vignettes (with strength control) +- Image adjustments for contrast, gamma, saturation, etc +- Square crop option + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/Screen-Shot-2015-05-10-at-23.30.01-e1431297068833.png) +Small tweak to make light effects work + +You can save edited images (in theory) as .jpg or .png files and share them straight to social media from within the app. + +I say “in theory” because .jpg saving doesn’t actually work in the Linux version of the app (you can save edited images as .png files though). Similarly, most of the built-in social networking links are borked or just flat out fail on export. + +To get the **15 light leaks** to work you will need to re-save each .jpg image in XnRetro ‘light’ folder as a .png file. Edit the ‘light.xml’ to match the new file names, hit save and the light effects will load up in XnRetro without issue. + +> ‘For user-friendly image editing XnRetro is hard to beat — once you make it work.’ + +**Is XnRetro Worth Installing?** + +XnRetro is not perfect. It’s is pretty old-looking, difficult to properly install and has not been updated for several years. + +It does still work, barring .jpg saving, and is a nimble alternative to an advanced app like The Gimp or Shotwell’s set of ‘serious’ image adjustment tools. + +While web apps and Chrome Apps¹ like [Pixlr Touch Up][1] and [Polarr][2] offer similar features you may be looking for a truly native solution. + +And for that, for user-friendly image editing based around easy-to-apply filters, XnRetro is hard to beat. + +### Download XnRetro for Ubuntu ### + +XnRetro is not available as an installable .deb package. It is distributed as a binary file, meaning you need to double-click on the program file run it each and every time. It’s also 32-bit only. + +You can download XnRetro using the link below. Once completed you need to extract the archive and enter the folder it creates. Double-click on the ‘xnretro’ program binary inside. + +- [Download XnRetro for Linux (32bit, tar.gz)][3] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/05/instagram-photo-filters-ubuntu-desktop-app + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgchrome.com/?s=pixlr +[2]:http://www.omgchrome.com/the-best-chrome-apps-of-2014/ +[3]:http://www.xnview.com/en/xnretro/#downloads \ No newline at end of file diff --git a/sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md b/sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md new file mode 100644 index 0000000000..8d0d5ccbdf --- /dev/null +++ b/sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md @@ -0,0 +1,179 @@ +Install ‘Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity +================================================================================ +In this Internet world and the world of Internet we perform most of our task online be it Ticket booking, Money transfer, Studies, Business, Entertainment, Social Networking and what not. We spend a major part of our time online daily. It has been getting hard to remain anonymous with each passing day specially when backdoors are being planted by organizations like NSA (National Security Agency) who are putting their nose in between every thing that we come across online. We have least or no privacy online. All the searches are logged upon the basis of user Internet surfing activity and machine activity. + +A wonderful browser from Tor project is used by millions which help us surfing the web anonymously however it is not difficult to trace your browsing habits and hence tor alone is not the guarantee of your safety online. You may like to check Tor features and installation instructions here: + +- [Anonymous Web Browsing using Tor][1] + +There is a operating system named Tails by Tor Projects. Tails (The Amnesic Incognito Live System) is a live operating system, based on Debian Linux distribution, which mainly focused on preserving privacy and anonymity on the web while browsing internet, means all it’s outgoing connection are forced to pass through the Tor and direct (non-anonymous) requests are blocked. The system is designed to run from any boot-able media be it USB stick or DVD. + +The latest stable release of Tails OS is 1.4 which was released on May 12, 2015. Powered by open source Monolithic Linux Kernel and built on top of Debian GNU/Linux Tails aims at Personal Computer Market and includes GNOME 3 as default user Interface. + +#### Features of Tails OS 1.4 #### + +- Tails is a free operating system, free as in beer and free as in speech. +- Built on top of Debian/GNU Linux. The most widely used OS that is Universal. +- Security Focused Distribution. +- Windows 8 camouflage. +- Need not to be installed and browse Internet anonymously using Live Tails CD/DVD. +- Leave no trace on the computer, while tails is running. +- Advanced cryptographic tools used to encrypt everything that concerns viz., files, emails, etc. +- Sends and Receive traffic through tor network. +- In true sense it provides privacy for anyone, anywhere. +- Comes with several applications ready to be used from Live Environment. +- All the softwares comes per-configured to connect to INTERNET only through Tor network. +- Any application that tries to connect to Internet without Tor Network is blocked, automatically. +- Restricts someone who is watching what sites you visit and restricts sites to learn your geographical location. +- Connect to websites that are blocked and/or censored. +- Designed specially not to use space used by parent OS even when there is free swap space. +- The whole OS loads on RAM and is flushed when we reboot/shutdown. Hence no trace of running. +- Advanced security implementation by encrypting USB disk, HTTPS ans Encrypt and sign emails and documents. + +#### What can you expect in Tails 1.4 #### + +- Tor Browser 4.5 with a security Slider. +- Tor Upgraded to version 0.2.6.7. +- Several Security holes fixed. +- Many of the bug fixed and patches applied to Applications like curl, OpenJDK 7, tor Network, openldap, etc. + +To get a complete list of change logs you may visit [HERE][2] + +**Note**: It is strongly recommended to upgrade to Tails 1.4, if you’re using any older version of Tails. + +#### Why should I use Tails Operating System #### + +You need Tails because you need: + +- Freedom from network surveillance +- Defend freedom, privacy and confidentiality +- Security aka traffic analysis + +This tutorial will walk through the installation of Tails 1.4 OS with a short review. + +### Tails 1.4 Installation Guide ### + +1. To download the latest Tails OS 1.4, you may use wget command to download directly. + + $ wget http://dl.amnesia.boum.org/tails/stable/tails-i386-1.4/tails-i386-1.4.iso + +Alternatively you may download Tails 1.4 Direct ISO image or use a Torrent Client to pull the iso image file for you. Here is the link to both downloads: + +- [tails-i386-1.4.iso][3] +- [tails-i386-1.4.torrent][4] + +2. After downloading, verify ISO Integrity by matching SHA256 checksum with the SHA256SUM provided on the official website.. + + $ sha256sum tails-i386-1.4.iso + + 339c8712768c831e59c4b1523002b83ccb98a4fe62f6a221fee3a15e779ca65d + +If you are interested in knowing OpenPGP, checking Tails signing key against Debian keyring and anything related to Tails cryptographic signature, you may like to point your browser [HERE][5]. + +3. Next you need to write the image to USB stick or DVD ROM. You may like to check the article, [How to Create Live Bootable USB][6] for details on how to make a flash drive bootable and write ISO to it. + +4. Insert the Tails OS Bootable flash drive or DVD ROM in the disk and boot from it (select from BIOS to boot). The first screen – two options to select from ‘Live‘ and ‘Live (failsafe)‘. Select ‘Live‘ and press Enter. + +![Tails Boot Menu](http://www.tecmint.com/wp-content/uploads/2015/05/1.png) +Tails Boot Menu + +5. Just before login. You have two options. Click ‘More Options‘ if you want to configure and set advanced options else click ‘No‘. + +![Tails Welcome Screen](http://www.tecmint.com/wp-content/uploads/2015/05/2.png) +Tails Welcome Screen + +6. After clicking Advanced option, you need to setup root password. This is important if you want to upgrade it. This root password is valid till you shutdown/reboot the machine. + +Also you may enable Windows Camouflage, if you want to run this OS on a public place, so that it seems as you are running Windows 8 operating system. Good option indeed! Is not it? Also you have a option to configure Network and Mac Address. Click ‘Login‘ when done!. + +![Tails OS Configuration](http://www.tecmint.com/wp-content/uploads/2015/05/3.png) +Tails OS Configuration + +7. This is Tails GNU/Linux OS camouflaged by Windows Skin. + +![Tails Windows Look](http://www.tecmint.com/wp-content/uploads/2015/05/4.jpg) +Tails Windows Look + +8. It will start Tor Network in the background. Check the Notification on the top-right corner of the screen – Tor is Ready / You are now connected to the Internet. + +Also check what it contains under Internet Menu. Notice – It has Tor Browser (safe) and Unsafe Web Browser (Where incoming and outgoing data don’t pass through TOR Network) along with other applications. + +![Tails Menu and Tools](http://www.tecmint.com/wp-content/uploads/2015/05/5.jpg) +Tails Menu and Tools + +9. Click Tor and check your IP Address. It confirms my physical location is not shared and my privacy is intact. + +![Check Privacy on Tails](http://www.tecmint.com/wp-content/uploads/2015/05/6.jpg) +Check Privacy on Tails + +10. You may Invoke Tails Installer to clone & Install, Clone & Upgrade and Upgrade from ISO. + +![Tails Installer Options](http://www.tecmint.com/wp-content/uploads/2015/05/7.jpg) +Tails Installer Options + +11. The other option was to select Tor without any advanced option, just before login (Check step #5 above). + +![Tails Without Advance Option](http://www.tecmint.com/wp-content/uploads/2015/05/8.png) +Tails Without Advance Option + +12. You will get log-in to Gnome3 Desktop Environment. + +![Tails Gnome Desktop](http://www.tecmint.com/wp-content/uploads/2015/05/9.png) +Tails Gnome Desktop + +13. If you click to Launch Unsafe browser in Camouflage or without Camouflage, you will be notified. + +![Tails Browsing Notification](http://www.tecmint.com/wp-content/uploads/2015/05/10.png) +Tails Browsing Notification + +If you do, this is what you get in a Browser. + +![Tails Browsing Alert](http://www.tecmint.com/wp-content/uploads/2015/05/11.png) +Tails Browsing Alert + +#### Is Tails for me? #### + +To get the above question answered, first answer a few question. + +- Do you need your privacy to be intact while you are online? +- Do you want to remain hidden from Identity thieves? +- Do you want somebody to put your nose in between your private chat online? +- Do you really want to show your geographical location to anybody there? +- Do you carry out banking transactions online? +- Are you happy with the censorship by government and ISP? + +If the answer to any of the above question is ‘YES‘ you preferably need Tails. If answer to all the above question is ‘NO‘ you perhaps don’t need it. + +To know more about Tails? Point your browser to user Documentation : [https://tails.boum.org/doc/index.en.html][7] + +### Conclusion ### + +Tails is an OS which is must for those who work in an unsafe environment. An OS focused on security yet contains bundles of Application – Gnome Desktop, Tor, Firefox (Iceweasel), Network Manager, Pidgin, Claws mail, Liferea feed addregator, Gobby, Aircrack-ng, I2P. + +It also contain several tools for Encryption and Privacy Under the Hood, viz., LUKS, GNUPG, PWGen, Shamir’s Secret Sharing, Virtual Keyboard (against Hardware Keylogging), MAT, KeePassX Password Manager, etc. + +That’s all for now. Keep Connected to Tecmint. Share your thoughts on Tails GNU/Linux Operating System. What do you think about the future of the Project? Also test it Locally and let us know your experience. + +You may run it in [Virtualbox][8] as well. Remember Tails loads the whole OS in RAM hence give enough RAM to run Tails in VM. + +I tested in 1GB Environment and it worked without lagging. Thanks to all our readers for their Support. In making Tecmint a one place for all Linux related stuffs your co-operation is needed. Kudos! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-tails-1-4-linux-operating-system-to-preserve-privacy-and-anonymity/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/tor-browser-for-anonymous-web-browsing/ +[2]:https://tails.boum.org/news/version_1.4/index.en.html +[3]:http://dl.amnesia.boum.org/tails/stable/tails-i386-1.4/tails-i386-1.4.iso +[4]:https://tails.boum.org/torrents/files/tails-i386-1.4.torrent +[5]:https://tails.boum.org/download/index.en.html#verify +[6]:http://www.tecmint.com/install-linux-from-usb-device/ +[7]:https://tails.boum.org/doc/index.en.html +[8]:http://www.tecmint.com/install-virtualbox-on-redhat-centos-fedora/ \ No newline at end of file From 28f553a3d1fd3c459aac701ccaced37f6db2bce2 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sat, 16 May 2015 00:07:39 +0800 Subject: [PATCH 0833/2517] translated wi-cuckoo --- ...r and Remove Unwanted Packages in Linux.md | 184 ------------------ ...r and Remove Unwanted Packages in Linux.md | 177 +++++++++++++++++ 2 files changed, 177 insertions(+), 184 deletions(-) delete mode 100644 sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md create mode 100644 translated/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md diff --git a/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md b/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md deleted file mode 100644 index cbcd668b14..0000000000 --- a/sources/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md +++ /dev/null @@ -1,184 +0,0 @@ -translating wi-cuckoo -Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux -================================================================================ -Here we are with the next part of Linux Command Line Tips and Tricks. If you missed our previous post on Linux Tricks you may find it here. - -- [5 Linux Command Line Tricks][1] - -In this post we will be introducing 6 command Line tips namely create Linux Command line chat using Netcat command, perform addition of a column on the fly from the output of a command, remove orphan packages from Debian and CentOS, get local and remote IP from command Line, get colored output in terminal and decode various color code and last but not the least hash tags implementation in Linux command Line. Lets check them one by one. - -![Linux Commandline Chat Server](http://www.tecmint.com/wp-content/uploads/2015/04/linux-commandline-chat-server.jpg) -6 Useful Commandline Tricks and Tips - -### 1. Create Linux Commandline Chat Server ### - -We all have been using chat service since a long time. We are familiar with Google chat, Hangout, Facebook chat, Whatsapp, Hike and several other application and integrated chat services. Do you know Linux nc command can make your Linux box a chat server with just one line of command. -What is nc command in Linux and what it does? - -nc is the depreciation of Linux netcat command. The nc utility is often referred as Swiss army knife based upon the number of its built-in capabilities. It is used as debugging tool, investigation tool, reading and writing to network connection using TCP/UDP, DNS forward/reverse checking. - -It is prominently used for port scanning, file transferring, backdoor and port listening. nc has the ability to use any local unused port and any local network source address. - -Use nc command (On Server with IP address: 192.168.0.7) to create a command line messaging server instantly. - - $ nc -l -vv -p 11119 - -Explanation of the above command switches. - -- -v : means Verbose -- -vv : more verbose -- -p : The local port Number - -You may replace 11119 with any other local port number. - -Next on the client machine (IP address: 192.168.0.15) run the following command to initialize chat session to machine (where messaging server is running). - - $ nc 192.168.0.7 11119 - -![Linux Commandline Chat with nc Command](http://www.tecmint.com/wp-content/uploads/2015/04/Chat-on-Linux-Commandline.gif) - -**Note**: You can terminate chat session by hitting ctrl+c key and also nc chat is one-to-one service. - -### 2. How to Sum Values in a Column in Linux ### - -How to sum the numerical values of a column, generated as an output of a command, on the fly in the terminal. - -The output of the ‘ls -l‘ command. - - $ ls -l - -![Sum Numerical Values](http://www.tecmint.com/wp-content/uploads/2015/04/Sum-Values.gif) - -Notice that the second column is numerical which represents number of symbolic links and the 5th column is numerical which represents the size of he file. Say we need to sum the values of fifth column on the fly. - -List the content of 5th column without printing anything else. We will be using ‘awk‘ command to do this. ‘$5‘ represents 5th column. - - $ ls -l | awk '{print $5}' - -![List Content Column](http://www.tecmint.com/wp-content/uploads/2015/04/List-Content-Column.gif) - -Now use awk to print the sum of the output of 5th column by pipelining it. - - $ ls -l | awk '{print $5}' | awk '{total = total + $1}END{print total}' - -![Sum and Print Columns](http://www.tecmint.com/wp-content/uploads/2015/04/Sum-Columns.gif) - -### How to Remove Orphan Packages in Linux? ### - -Orphan packages are those packages that are installed as a dependency of another package and no longer required when the original package is removed. - -Say we installed a package gtprogram which was dependent of gtdependency. We can’t install gtprogram unless gtdependency is installed. - -When we remove gtprogram it won’t remove gtdependency by default. And if we don’t remove gtdependency, it will remain as Orpahn Package with no connection to any other package. - - # yum autoremove [On RedHat Systems] - -![Remove Orphan Packages in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Orphan-Packages-in-CentOS1.gif) - - # apt-get autoremove [On Debian Systems] - -![Remove Orphan Packages in Debian](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Orphan-Packages-in-Debian.gif) - -You should always remove Orphan Packages to keep the Linux box loaded with just necessary stuff and nothing else. - -### 4. How to Get Local and Public IP Address of Linux Server ### - -To get you local IP address run the below one liner script. - - $ ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: - -You must have installed ifconfig, if not, apt or yum the required packages. Here we will be pipelining the output of ifconfig with grep command to find the string “intel addr:”. - -We know ifconfig command is sufficient to output local IP Address. But ifconfig generate lots of other outputs and our concern here is to generate only local IP address and nothing else. - - # ifconfig | grep "inet addr:" - -![Check Local IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Local-IP-Address.gif) - -Although the output is more custom now, but we need to filter our local IP address only and nothing else. For this we will use awk to print the second column only by pipelining it with the above script. - - # ifconfig | grep “inet addr:” | awk '{print $2}' - -![Filter Only IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Filter-IP-Address.gif) - -Clear from the above image that we have customised the output very much but still not what we want. The loopback address 127.0.0.1 is still there in the result. - -We use use -v flag with grep that will print only those lines that don’t match the one provided in argument. Every machine have the same loopback address 127.0.0.1, so use grep -v to print those lines that don’t have this string, by pipelining it with above output. - - # ifconfig | grep "inet addr" | awk '{print $2}' | grep -v '127.0.0.1' - -![Print IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Print-IP-Address.gif) - -We have almost generated desired output, just replace the string `(addr:)` from the beginning. We will use cut command to print only column two. The column 1 and column 2 are not separated by tab but by `(:)`, so we need to use delimiter `(-d)` by pipelining the above output. - - # ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: - -![Customized IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Custome-IP-Address.gif) - -Finally! The desired result has been generated. - -### 5. How to Color Linux Terminal ### - -You might have seen colored output in terminal. Also you would be knowing to enable/disable colored output in terminal. If not you may follow the below steps. - -In Linux every user has `'.bashrc'` file, this file is used to handle your terminal output. Open and edit this file with your choice of editor. Note that, this file is hidden (dot beginning of file means hidden). - - $ vi /home/$USER/.bashrc - -Make sure that the following lines below are uncommented. ie., it don’t start with a #. - - if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dirc$ - alias ls='ls --color=auto' - #alias dir='dir --color=auto' - #alias vdir='vdir --color=auto' - - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' - fi - -![User .bashrc File](http://www.tecmint.com/wp-content/uploads/2015/04/bashrc-file.gif) - -Once done! Save and exit. To make the changes taken into effect logout and again login. - -Now you will see files and folders are listed in various colors based upon type of file. To decode the color code run the below command. - - $ dircolors -p - -Since the output is too long, lets pipeline the output with less command so that we get output one screen at a time. - - $ dircolors -p | less - -![Linux Color Output](http://www.tecmint.com/wp-content/uploads/2015/04/Linux-Color-Output.gif) - -### 6. How to Hash Tag Linux Commands and Scripts ### - -We are using hash tags on Twitter, Facebook and Google Plus (may be some other places, I have not noticed). These hash tags make it easier for others to search for a hash tag. Very few know that we can use hash tag in Linux command Line. - -We already know that `#` in configuration files and most of the programming languages is treated as comment line and is excluded from execution. - -Run a command and then create a hash tag of the command so that we can find it later. Say we have a long script that was executed in point 4 above. Now create a hash tag for this. We know ifconfig can be run by sudo or root user hence acting as root. - - # ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: #myip - -The script above has been hash tagged with ‘myip‘. Now search for the hash tag in reverse-i-serach (press ctrl+r), in the terminal and type ‘myip‘. You may execute it from there, as well. - -![Create Command Hash Tags](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Command-Hash-Tags.gif) - -You may create as many hash tags for every command and find it later using reverse-i-search. - -That’s all for now. We have been working hard to produce interesting and knowledgeable contents for you. What do you think how we are doing? Any suggestion is welcome. You may comment in the box below. Keep connected! Kudos. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-commandline-chat-server-and-remove-unwanted-packages/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/5-linux-command-line-tricks/ diff --git a/translated/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md b/translated/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md new file mode 100644 index 0000000000..cd90e2bfb7 --- /dev/null +++ b/translated/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md @@ -0,0 +1,177 @@ +Linux中,创建聊天服务器、移除冗余软件包的实用命令 +============================================================================= +这里,我们来看Linux命令行实用技巧的下一个部分。如果你错过了Linux Tracks之前的文章,可以从这里找到。 + +- [5 Linux Command Line Tracks][1] + +本篇中,我们将会介绍6个命令行小技巧,包括使用Netcat命令创建Linux命令行聊天,从某个命令的输出中对某一列做加法,移除Debian和CentOS上多余的包,从命令行中获取本地与远程的IP地址,在终端获得彩色的输出与解码各样的颜色,最后是Linux命令行里井号标签的使用。让我们来一个一个地看一下。 + +![Linux Commandline Chat Server](http://www.tecmint.com/wp-content/uploads/2015/04/linux-commandline-chat-server.jpg) +6个实用的命令行技巧 + +### 1. 创建Linux命令行聊天服务 ### +我们大家使用聊天服务都有很长一段时间了。对于Google Chat,Hangout,Facebook Chat,Whatsapp,Hike和其他一些应用与集成的聊天服务,我们都很熟悉了。那你知道Linux的nc命令可以使你的Linux盒子变成一个聊天服务器,而仅仅只需要一行命令吗。什么是nc命令,它又是怎么工作的呢? + +nc是Linux netcat命令的旧版。nc就像瑞士军刀一样,内建呢大量的功能。nc可用做调式工具,调查工具,使用TCP/UDP读写网络连接,DNS正向/反向检查。 + +nc主要用在端口扫描,文件传输,后台和端口监听。nc可以使用任何闲置的端口和任何本地网络源地址。 + +使用nc命令(在192.168.0.7的服务器上)创建一个命令行即时信息传输服务器。 + + $ nc -l -vv 11119 + +对上述命令的解释。 + +- -v : 表示 Verbose +- -vv : 更多的 Verbose +- -p : 本地端口号 + +你可以用任何其他的本地端口号替换11119。 + +接下来在客户端机器(IP地址:192.168.0.15),运行下面的命令初始化聊天会话(信息传输服务正在运行)。 + + $ nc 192.168.0.7:11119 + +![Linux Commandline Chat with nc Command](http://www.tecmint.com/wp-content/uploads/2015/04/Chat-on-Linux-Commandline.gif) + +**注意**:你可以按下ctrl+c终止会话,同时nc聊天是一个一对一的服务。 + +### 2. Linux中如何统计某一列的总值 ### + +如何统计在终端里,某个命令的输出中,其中一列的数值总和, + +‘ls -l’命令的输出。 + + $ ls -l + +![Sum Numerical Values](http://www.tecmint.com/wp-content/uploads/2015/04/Sum-Values.gif) + +注意到第二列代表软连接的数量,第五列则是文件的大小。假设我们需要汇总第五列的数值。 + +仅仅列出第五列的内容。我们会使用‘awk’命令做到这点。‘$5’即代表第五列。 + + $ ls -l | awk '{print $5}' + +![List Content Column](http://www.tecmint.com/wp-content/uploads/2015/04/List-Content-Column.gif) + +现在,通过管道连接,使用awk打印出第五列数值的总和。 + + $ ls -l | awk '{print $5}' | awk '{total = total + $1}END{print total}' + +![Sum and Print Columns](http://www.tecmint.com/wp-content/uploads/2015/04/Sum-Columns.gif) + +### 在Linux里如何移除废弃包 ### + +废弃包是指那些作为其他包的依赖而被安装,但是当源包被移除之后就不再需要的包。 + +假设我们安装了gtprogram,依赖是gtdependency。除非我们安装了gtdependency,否则安装不了gtprogram。 + +当我们移除gtprogram的时候,默认并不会移除gtdependency。并且如果我们不移除gtdependency的话,它就会遗留下来成为废弃包,与其他任何包再无联系。 + + # yum autoremove [On RedHat Systems] + +![Remove Orphan Packages in CentOS](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Orphan-Packages-in-CentOS1.gif) + + # apt-get autoremove [On Debian Systems] + +![Remove Orphan Packages in Debian](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Orphan-Packages-in-Debian.gif) + +你应该经常移除废弃包,保持Linux机器仅仅加载一些需要的东西。 + +### 4. 如何获得Linux服务器本地的与公网的IP地址 ### + +为了获得本地IP地址,运行下面的一行脚本。 + + $ ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: + +你必须安装了ifconfig,如果没有,使用apt或者yum工具安装需要的包。这里我们将会管道连接ifconfig的输出,并且结合grep命令找到包含“intel addr:”的字符串。 + +我们知道对于输出本地IP地址,ifconfig命令足够用了。但是ifconfig生成了许多的输出,而我们关注的地方仅仅是本地IP地址,不是其他的。 + + # ifconfig | grep "inet addr:" + +![Check Local IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Local-IP-Address.gif) + +尽管目前的输出好多了,但是我们需要过滤出本地的IP地址,不含其他东西。针对这个,我们将会使用awk打印出第二列输出,通过管道连接上述的脚本。 + + # ifconfig | grep “inet addr:” | awk '{print $2}' + +![Filter Only IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Filter-IP-Address.gif) + +上面图片清楚的表示,我们已经很大程度上自定义了输出,当仍然不是我们想要的。本地环路地址 127.0.0.1 仍然在结果中。 + +我们可以使用grep的-v选项,这样会打印出不匹配给定参数的其他行。每个机器都有同样的环路地址 127.0.0.1,所以使用grep -v打印出不包含127.0.0.1的行,通过管道连接前面的脚本。 + + # ifconfig | grep "inet addr" | awk '{print $2}' | grep -v '127.0.0.1' + +![Print IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Print-IP-Address.gif) + +我们差不多得到想要的输出了,仅仅需要从开头替换掉字符串`(addr:)`。我们将会使用cut命令单独打印出第二列。一二列之间并不是用tab分割,而是`(:)`,所以我们需要使用到域分割符选项`(-d)`,通过管道连接上面的输出。 + + # ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: + +![Customized IP Address](http://www.tecmint.com/wp-content/uploads/2015/04/Custome-IP-Address.gif) + +最后!期望的结果出来了。 + +### 5.如何在Linux终端彩色输出 ### + +你可能在终端看见过彩色的输出。同时你也可能知道在终端里允许/禁用彩色输出。如果都不知道的话,里可以参考下面的步骤。 + +在Linux中,每个用户都有`'.bashrc'`文件,被用来管理你的终端输出。打开并且编辑该文件,用你喜欢的编辑器。注意一下,这个文件是隐藏的(文件开头为点的代表隐藏文件)。 + + $ vi /home/$USER/.bashrc + +确保以下的行没有被注释掉。ie.,行开头没有#。 + + if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dirc$ + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' + fi + +![User .bashrc File](http://www.tecmint.com/wp-content/uploads/2015/04/bashrc-file.gif) + +完成后!保存并退出。为了让改动生效,需要注销账户后再次登录。 + +现在,你会看见列出的文件和文件夹名字有着不同的颜色,根据文件类型来决定。为了解码颜色,可以运行下面的命令。 + + $ dircolors -p | less + +![Linux Color Output](http://www.tecmint.com/wp-content/uploads/2015/04/Linux-Color-Output.gif) + +### 6.如何用井号标记和Linux命令和脚本 ### + +我们一直在Twitter,Facebook和Google Plus(可能是其他我们没有提到的地方)上使用井号标签。那些井号标签使得其他人搜索一个标签更加容易。可是很少人知道,我们可以在Linux命令行使用井号标签。 + +我们已经知道配置文件里的`#`,在大多数的编程语言中,这个符号被用作注释行,即不被执行。 + +运行一个命令,然后为这个命令创建一个井号标签,这样之后我们就可以找到它。假设我们有一个很长的脚本,就上面第四点被执行的命令。现在为它创建一个井号标签。我们知道ifconfig可以被sudo或者root执行,因此用root来执行。 + + # ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: #myip + +上述脚本被’mytag‘给标记了。现在在reverse-i-search(按下ctrl+r)搜索一下这个标签,在终端里,并输入’mytag‘。你可以从这里开始执行。 + +![Create Command Hash Tags](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Command-Hash-Tags.gif) + +你可以创建很多的井号标签,为每个命令,之后使用reverse-i-search找到它。 + +目前就这么多了。我们一直在辛苦的工作,创造有趣的,有知识性的内容给你。你觉得我们是如何工作的呢?欢迎咨询任何问题。你可以在下面评论。保持联络!Kudox。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-commandline-chat-server-and-remove-unwanted-packages/ + +作者:[Avishek Kumar][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/5-linux-command-line-tricks/ From b751a9e5899e718deb3417f819dbfb29a746792c Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 16 May 2015 09:55:46 +0800 Subject: [PATCH 0834/2517] translating --- ...150515 Basic Networking Commands with Docker Containers.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150515 Basic Networking Commands with Docker Containers.md b/sources/tech/20150515 Basic Networking Commands with Docker Containers.md index d07c3b2507..d636cc82dd 100644 --- a/sources/tech/20150515 Basic Networking Commands with Docker Containers.md +++ b/sources/tech/20150515 Basic Networking Commands with Docker Containers.md @@ -1,3 +1,5 @@ +translating---geekpi + Basic Networking Commands with Docker Containers ================================================================================ Hi everybody, today we'll learn some basic networking with Docker Containers. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. Docker is meant for networking as it is gradually used in data-centers, ISPs and much more networked servers. @@ -103,4 +105,4 @@ via: http://linoxide.com/linux-how-to/networking-commands-docker-containers/ 本文由 [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 e9cf8f9b07e8437aac4d97ed5d368eb1e80a0ec3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 16 May 2015 10:52:14 +0800 Subject: [PATCH 0835/2517] translated --- ...working Commands with Docker Containers.md | 108 ------------------ ...working Commands with Docker Containers.md | 106 +++++++++++++++++ 2 files changed, 106 insertions(+), 108 deletions(-) delete mode 100644 sources/tech/20150515 Basic Networking Commands with Docker Containers.md create mode 100644 translated/tech/20150515 Basic Networking Commands with Docker Containers.md diff --git a/sources/tech/20150515 Basic Networking Commands with Docker Containers.md b/sources/tech/20150515 Basic Networking Commands with Docker Containers.md deleted file mode 100644 index d636cc82dd..0000000000 --- a/sources/tech/20150515 Basic Networking Commands with Docker Containers.md +++ /dev/null @@ -1,108 +0,0 @@ -translating---geekpi - -Basic Networking Commands with Docker Containers -================================================================================ -Hi everybody, today we'll learn some basic networking with Docker Containers. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. Docker is meant for networking as it is gradually used in data-centers, ISPs and much more networked servers. - -So, here are some basic networking commands that you can use on managing Docker Containers. - -### 1. Finding the Docker Interface ### - -Docker by default creates a bridge interface named docker0 which basically connects with the outside world. The docker containers running is directly connected with the bridge interface docker0. By default, docker assigns ip address 172.17.42.1/16 to the bridge interface docker0 which acts as a subnet for all the ip addresses of the running containers. It is pretty easy to get the Docker Interface's IP Address. To find out our docker0 bridge interface and the docker containers connected with the bridge we can simply run ip a command inside a terminal or a shell where Docker is installed. - - # ip a - -![Docker Interface](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-interface.png) - -### 2. Getting the Docker Container's IP Address ### - -As we read above, docker creates a bridge interface named docker0 in the host machine. As we create a new docker container, it is automatically assigned with a new dynamic IP Address by default which is followed within the subnet range of the interface. So, to check the IP Address of the running Docker container, we'll need to get into a running container and check out the ip address as shown below. First, we'll run a new container and get into the container. If you have got a container running already, you may skip the first command below. - - # docker run -it ubuntu - -Now, we'll be able to run ip a in order to get the ip address of the running container. - - # ip a - -![Docker Container IP](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-container-ip.png) - -### 3. Mapping the Expose port ### - -To map the exposed port configured in the Dockerfile for the container to the high port, we'll simply need to follow the docker command with -P flag. This will open the random port of the Docker Container to the port defined by the Dockerfile. So, here's an example of using the flag -P to open/expose the defined port. - - # docker run -itd -P httpd - -![Mapping Expose Port](http://blog.linoxide.com/wp-content/uploads/2015/05/mapping-expose-port.png) - -The above command will map container's port to port 80 as its defined in the Dockerfile of httpd. We can check the exposed port by viewing the running container using the following command. - - # docker ps - -And can use curl to check by running the below command. - - # curl http://localhost:49153 - -![Curl Exposed Port](http://blog.linoxide.com/wp-content/uploads/2015/05/curl-exposed-port-e1431034586219.png) - -### 4. Mapping to the Specific Port ### - -We can also map the expose port or docker container port to the port we specify or define. In order to map the container to a specific port of our choice, we'll need to define the port of our desire with the flag -p . Here's an example on how we can do that. - - # docker run -itd -p 8080:80 httpd - -The above command will map the port 8080 to port 80. We can check it by running curl to that port. - - # curl http://localhost:8080 - -![Mapping Specific Port](Curl Exposed Port) - -### 5. Creating own Bridge ### - -To assign a custom IP Address to the containers, we'll need to create a new bridge interface named bro in this tutorial. To assign a desired IP Address, we'll need to run the following command in the host machine running docker. - - # stop docker.io - # ip link add br0 type bridge - # ip addr add 172.30.1.1/20 dev br0 - # ip link set br0 up - # docker -d -b br0 - -![Creating Bridge Interface](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-bridge-interface.png) - -After creating the docker bridge, we'll want to let the Docker Daemon know about it. - - # echo 'DOCKER_OPTS="-b=br0"' >> /etc/default/docker - # service docker.io start - -![Adding Interface to Docker](http://blog.linoxide.com/wp-content/uploads/2015/05/adding-interface-to-docker.png) - -Here, the bridged interface will range the docker containers with the ip address followed by bridge ip subnet . - -### 6. Linking one Container to another ### - -We can connect one container with the another container with Docker. We can run different apps on different containers and connect or link with each other. Links allow containers to connect with each other and securely transfer information about one container to another container. To do so, we'll use the --link flag. First, we'll use flag --name so that it will be easy to denote training/postgres image. - - # docker run -d --name db training/postgres - -![Running db Container](http://blog.linoxide.com/wp-content/uploads/2015/05/running-db-container.png) - -After done, we'll gonna link training/webapp with the container db that we create earlier forming a new container named web. - - # docker run -d -P --name web --link db:db training/webapp python app.py - -![linking two containers](http://blog.linoxide.com/wp-content/uploads/2015/05/linking-two-containers.png) - -### Conclusion ### - -Networking with Docker is fun and amazing cause there are many stuffs we can do with Docker Containers. These were some easy and basic networking commands that we can play with Docker. Networking with docker is really advanced. We can do many stuffs with it. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/networking-commands-docker-containers/ - -作者:[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/20150515 Basic Networking Commands with Docker Containers.md b/translated/tech/20150515 Basic Networking Commands with Docker Containers.md new file mode 100644 index 0000000000..d4b90aa7f2 --- /dev/null +++ b/translated/tech/20150515 Basic Networking Commands with Docker Containers.md @@ -0,0 +1,106 @@ +关于Docker容器的基础网络命令 +================================================================================ +各位好,今天我们将学习一些Docker容器的基础命令。Docker是一个提供了开放平台来打包、发布并以一个轻量级容器运行任意程序的开放平台。它没有语言支持、框架或者打包系统的限制,可在任何时间、任何地方在小到家用电脑大到高端服务器上运行。这使得在部署和扩展网络应用、数据库和终端服务时不依赖于特定的栈或者提供商。Docker注定是用于网络的如它正应用于数据中心、ISP和越来越多的网络服务。 + +因此,这里有一些你在管理Docker容器的时候会用到的一些命令。 + +### 1. 找到Docker接口 ### + +Docker默认会创建一个名为docker0的网桥接口来连接外部的世界。docker容器运行时直接连接到网桥接口docker0。默认上,docker会分配172.17.42.1/16给docker0,它是所有运行容器ip地址的子网。得到Docker接口的ip地址非常简单。要找出docker0网桥接口和连接到网桥上的docker容器,我们可以在终端或者安装了docker的shell中运行ip命令。 + + # ip a + +![Docker Interface](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-interface.png) + +### 2. 得到Docker容器的ip地址 ### + +如我们上面读到的,docker在主机中创建了一个叫docker0的网桥接口。如我们创建一个心的docker容器一样,它自动被默认分配了一个在子网范围内的ip地址。因此,要检测运行中的Docker容器的ip地址,我们需要进入一个正在运行的容器并用下面的命令检查ip地址。首先,我们运行一个新的容器并进入。如果你已经有一个正在运行的容器,你可以跳过这个步骤。 + + # docker run -it ubuntu + +现在,我们可以运行ip a来得到容器的ip地址了。 + + # ip a + +![Docker Container IP](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-container-ip.png) + +### 3. 映射暴露的端口 ### + +要映射配置在Dockerfile的暴露端口,我们只需用下面带上-P标志的命令。这会打开docker容器的随机端口并映射到Dockerfile中定义的端口。下面是使用-P来打开/映射定义的端口的例子。 + + # docker run -itd -P httpd + +![Mapping Expose Port](http://blog.linoxide.com/wp-content/uploads/2015/05/mapping-expose-port.png) + +上面的命令会映射Dockerfile中定义的httpd 80端口到容器的端口上。我们用下面的命令来查看正在运行的容器暴露的端口。 + + # docker ps + +并且可以用下面的curl命令来检查。 + + # curl http://localhost:49153 + +![Curl Exposed Port](http://blog.linoxide.com/wp-content/uploads/2015/05/curl-exposed-port-e1431034586219.png) + +### 4. 映射到特定的端口上 ### + +我们也可以映射暴露端口或者docker容器端口到我们指定的端口上。要实现这个,我们用-p标志来定义我们的需要。这里是我们的一个例子。 + + # docker run -itd -p 8080:80 httpd + +上面的命令会映射8080端口到80上。我们可以运行curl来检查这点。 + + # curl http://localhost:8080 + +![Mapping Specific Port](Curl Exposed Port) + +### 5. 创建自己的网桥 ### + +要给容器创建一个自定义的IP地址,在本篇中我们会创建一个名为bro的新网桥。要分配需要的ip地址,我们需要在运行docker的主机中运行下面的命令。 + + # stop docker.io + # ip link add br0 type bridge + # ip addr add 172.30.1.1/20 dev br0 + # ip link set br0 up + # docker -d -b br0 + +![Creating Bridge Interface](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-bridge-interface.png) + +创建完docker网桥之后,我们要让docker的守护进程知道它。 + + # echo 'DOCKER_OPTS="-b=br0"' >> /etc/default/docker + # service docker.io start + +![Adding Interface to Docker](http://blog.linoxide.com/wp-content/uploads/2015/05/adding-interface-to-docker.png) + +到这里,桥接后的接口将会分配给容器新的在桥接子网内的ip地址。 + +### 6. 链接到另外一个容器上 ### + +我们可以用Dokcer连接一个容器到另外一个上。我们可以在不容的容器上运行不同的程序,并且相互连接或链接。链接允许容器间相互连接并安全地从一个容器上传输信息给另一个容器。要做到这个,我们可以使用--link标志。首先,我们使用--name标志来表示training/postgres镜像。 + + # docker run -d --name db training/postgres + +![Running db Container](http://blog.linoxide.com/wp-content/uploads/2015/05/running-db-container.png) + +完成之后,我们将容器db与training/webapp链接来形成新的叫web的容器。 + + # docker run -d -P --name web --link db:db training/webapp python app.py + +![linking two containers](http://blog.linoxide.com/wp-content/uploads/2015/05/linking-two-containers.png) + +### 总结 ### + +Docker网络很神奇也好玩,因为有我们可以对docker容器做很多事情。这里有些简单和基础的我们可以把玩docker网络命令。docker的网络是非常高级的。我们可以用它做很多事情。如果你有任何的问题、建议、反馈请在下面的评论栏写下来以便于我们我们可以提升或者更新文章的内容。谢谢! 玩得开心!:-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/networking-commands-docker-containers/ + +作者:[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 be79963b89466df5208c1f47ac28817d85fac5a4 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 16 May 2015 21:06:34 +0800 Subject: [PATCH 0836/2517] PUB:20150413 A Walk Through Some Important Docker Commands @ictlyh --- ... Through Some Important Docker Commands.md | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150413 A Walk Through Some Important Docker Commands.md (56%) diff --git a/translated/tech/20150413 A Walk Through Some Important Docker Commands.md b/published/20150413 A Walk Through Some Important Docker Commands.md similarity index 56% rename from translated/tech/20150413 A Walk Through Some Important Docker Commands.md rename to published/20150413 A Walk Through Some Important Docker Commands.md index 6e350c6d1c..d58dda2d54 100644 --- a/translated/tech/20150413 A Walk Through Some Important Docker Commands.md +++ b/published/20150413 A Walk Through Some Important Docker Commands.md @@ -1,12 +1,12 @@ -一些重要Docker命令的简单介绍 +一些重要 Docker 命令的简单介绍 ================================================================================ -大家好,今天我们来学习一些在你使用Docker之前需要了解的重要的 Docker 命令。Docker 是一个提供开发平台去打包,装载和运行任何应用的轻量级容器开源项目。它没有语言支持,框架和打包系统的限制,能从一个小的家庭电脑到高端服务器,在任何地方任何时间运行。这使得它们成为不依赖于一个特定的栈或供应商,部署和扩展web应用,数据库和后端服务很好的构建块。 +大家好,今天我们来学习一些在你使用 Docker 之前需要了解的重要的 Docker 命令。[Docker][1] 是一个开源项目,提供了一个可以打包、装载和运行任何应用的轻量级容器的开放平台。它没有语言支持、框架和打包系统的限制,从小型的家用电脑到高端服务器,在何时何地都可以运行。这使它们可以不依赖于特定软件栈和供应商,像一块块积木一样部署和扩展网络应用、数据库和后端服务。 Docker 命令简单易学,也很容易实现或实践。这是一些你运行 Docker 并充分利用它需要知道的简单 Docker 命令。 -### 1. 拉取一个 Docker 镜像 ### +### 1. 拉取 Docker 镜像 ### -由于容器是由 Docker 镜像构建的,首先我们需要拉取一个 docker 镜像来开始。我们可以从 Docker 注册 Hub 获取需要的 docker 镜像。在我们使用 pull 命令拉取任何镜像之前,由于pull命令被标识为恶意命令,我们需要保护我们的系统。为了保护我们的系统不受这个问题影响,我们需要添加 **127.0.0.1 index.docker.io** 到 /etc/hosts 条目。我们可以通过使用喜欢的文本编辑器完成。 +由于容器是由 Docker 镜像构建的,首先我们需要拉取一个 docker 镜像来开始。我们可以从 Docker Registry Hub 获取所需的 docker 镜像。在我们使用 pull 命令拉取任何镜像之前,为了避免 pull 命令的一些恶意风险,我们需要保护我们的系统。为了保护我们的系统不受这个风险影响,我们需要添加 **127.0.0.1 index.docker.io** 到 /etc/hosts 条目。我们可以通过使用喜欢的文本编辑器完成。 # nano /etc/hosts @@ -16,7 +16,7 @@ Docker 命令简单易学,也很容易实现或实践。这是一些你运行 ![Docker 宿主机](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-hosts.png) -要拉取一个 docker 进行,我们需要运行下面的命令。 +要拉取一个 docker 镜像,我们需要运行下面的命令。 # docker pull registry.hub.docker.com/busybox @@ -28,9 +28,9 @@ Docker 命令简单易学,也很容易实现或实践。这是一些你运行 ![Docker 镜像](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-images.png) -### 2. 运行一个 Docker 容器 ### +### 2. 运行 Docker 容器 ### -现在,成功地拉取要求或需要的 Docker 镜像之后,我们当然想运行这个 Docker 镜像。我们可以用 docker run 命令在镜像上运行一个 docker 容器。在 Docker 镜像之上运行一个 docker 容易时我们有很多选项和标记。我们使用 -t 和 -i 标记运行一个 docker 镜像并进入容器,如下面所示。 +现在,成功地拉取要求的或所需的 Docker 镜像之后,我们当然想运行这个 Docker 镜像。我们可以用 docker run 命令在镜像上运行一个 docker 容器。在 Docker 镜像上运行一个 docker 容器时我们有很多选项和标记。我们使用 -t 和 -i 选项来运行一个 docker 镜像并进入容器,如下面所示。 # docker run -it busybox @@ -50,7 +50,7 @@ Docker 命令简单易学,也很容易实现或实践。这是一些你运行 ![进入Docker](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-attach.png) -### 3. 查看容器 ### +### 3. 检查容器运行 ### 不论容器是否运行,查看日志文件都很简单。我们可以使用下面的命令去检查是否有 docker 容器在实时运行。 @@ -62,17 +62,17 @@ Docker 命令简单易学,也很容易实现或实践。这是一些你运行 ![查看 Docker 容器](http://blog.linoxide.com/wp-content/uploads/2015/04/view-docker-containers1.png) -### 4. 检查 Docker 容器 ### +### 4. 查看容器信息 ### -我们可以使用 inspect 命令检查一个 Docker 容器的每条信息。 +我们可以使用 inspect 命令查看一个 Docker 容器的各种信息。 # docker inspect ![检查Docker](http://blog.linoxide.com/wp-content/uploads/2015/04/docker-inspect.png) -### 5. 杀死或删除命令 ### +### 5. 杀死或删除 ### -我们可以使用 docker id 杀死或者停止进程或 docker 容器,如下所示。 +我们可以使用容器 id 杀死或者停止 docker 容器(进程),如下所示。 # docker stop @@ -90,7 +90,7 @@ Docker 命令简单易学,也很容易实现或实践。这是一些你运行 ### 结论 ### -这些都是学习充分实现和利用 Docker 很基本的 docker 命令。有了这些命令,Docker 变得很简单,提供给端用户一个简单的计算平台。根据上面的教程,任何人学习 Docker 命令都非常简单。如果你有任何问题,建议,反馈,请写到下面的评论框中以便我们改进和更新内容。多谢!享受吧 :-) +这些都是充分学习和使用 Docker 很基本的 docker 命令。有了这些命令,Docker 变得很简单,可以提供给最终用户一个易用的计算平台。根据上面的教程,任何人学习 Docker 命令都非常简单。如果你有任何问题,建议,反馈,请写到下面的评论框中以便我们改进和更新内容。多谢! 希望你喜欢 :-) -------------------------------------------------------------------------------- @@ -98,8 +98,9 @@ via: http://linoxide.com/linux-how-to/important-docker-commands/ 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/arunp/ \ No newline at end of file +[a]:http://linoxide.com/author/arunp/ +[1]:https://www.docker.com/ \ No newline at end of file From f8deb5dacd93fa8a0402ee8ec469ef34df5faf9d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 16 May 2015 23:23:46 +0800 Subject: [PATCH 0837/2517] PUB:Linux grep command with 14 different examples @cvsher --- ...grep command with 14 different examples.md | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) rename translated/tech/[translated]Linux grep command with 14 different examples.md => published/Linux grep command with 14 different examples.md (77%) diff --git a/translated/tech/[translated]Linux grep command with 14 different examples.md b/published/Linux grep command with 14 different examples.md similarity index 77% rename from translated/tech/[translated]Linux grep command with 14 different examples.md rename to published/Linux grep command with 14 different examples.md index cff151dd09..591a32ae43 100644 --- a/translated/tech/[translated]Linux grep command with 14 different examples.md +++ b/published/Linux grep command with 14 different examples.md @@ -1,12 +1,15 @@ +14 个 grep 命令的例子 +=========== + ###概述:### -所有类linux系统都会提供一个名为**grep(global regular expression print)**的搜索工具。grep命令在基于模式对一个或多个文件内容进行搜索的情况下是非常有用的。一个模式可以是单个字符、多个字符、单个单词、或者是一个句子。 +所有的类linux系统都会提供一个名为**grep(global regular expression print,全局正则表达式输出)**的搜索工具。grep命令在对一个或多个文件的内容进行基于模式的搜索的情况下是非常有用的。模式可以是单个字符、多个字符、单个单词、或者是一个句子。 当命令匹配到执行命令时指定的模式时,grep会将包含模式的一行输出,但是并不对原文件内容进行修改。 在本文中,我们将会讨论到14个grep命令的例子。 -###1 在文件中查找模式(单词)### +###例1 在文件中查找模式(单词)### 在/etc/passwd文件中查找单词“linuxtechi” @@ -14,7 +17,7 @@ linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash root@Linux-world:~# -###2 在多个文件中查找模式。### +###例2 在多个文件中查找模式。### root@Linux-world:~# grep linuxtechi /etc/passwd /etc/shadow /etc/gshadow /etc/passwd:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash @@ -28,14 +31,14 @@ /etc/gshadow:sambashare:!::linuxtechi root@Linux-world:~# -###3 使用-l参数列出包含指定模式的文件的文件名。### +###例3 使用-l参数列出包含指定模式的文件的文件名。### root@Linux-world:~# grep -l linuxtechi /etc/passwd /etc/shadow /etc/fstab /etc/mtab /etc/passwd /etc/shadow root@Linux-world:~# -###4 使用-n参数,在文件中查找指定模式及其相关的行号### +###例4 使用-n参数,在文件中查找指定模式并显示匹配行的行号### root@Linux-world:~# grep -n linuxtechi /etc/passwd 39:linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash @@ -45,7 +48,7 @@ root@Linux-world:~# grep -n root /etc/passwd /etc/shadow ![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-n-root.jpg) -###5 使用-v参数输出不包含指定模式的行### +###例5 使用-v参数输出不包含指定模式的行### 输出/etc/passwd文件中所有不含单词“linuxtechi”的行 @@ -53,15 +56,15 @@ root@Linux-world:~# grep -n root /etc/passwd /etc/shadow ![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-v-option.jpg) -###6 使用^符号输出所有以某指定模式开头的行### +###例6 使用 ^ 符号输出所有以某指定模式开头的行### -Bash脚本将^符号当作特殊字符处理,用于指定一行或者一个单词的开始。例如输出/etc/passes文件中所有以“root”开头的行 +Bash脚本将 ^ 符号视作特殊字符,用于指定一行或者一个单词的开始。例如输出/etc/passes文件中所有以“root”开头的行 root@Linux-world:~# grep ^root /etc/passwd root:x:0:0:root:/root:/bin/bash root@Linux-world:~# -###7 使用 $ 符号输出所有以指定模式结尾的行。### +###例7 使用 $ 符号输出所有以指定模式结尾的行。### 输出/etc/passwd文件中所有以“bash”结尾的行。 @@ -70,10 +73,9 @@ Bash脚本将^符号当作特殊字符处理,用于指定一行或者一个单 linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash root@Linux-world:~# -Bash脚本将美元($)符号当作特殊字符,用于指定一行或者一个单词的结尾。 - -###8 使用 -r 参数递归的查找特定模式### +Bash脚本将美元($)符号视作特殊字符,用于指定一行或者一个单词的结尾。 +###例8 使用 -r 参数递归地查找特定模式### root@Linux-world:~# grep -r linuxtechi /etc/ /etc/subuid:linuxtechi:100000:65536 @@ -91,14 +93,14 @@ Bash脚本将美元($)符号当作特殊字符,用于指定一行或者一个 上面的命令将会递归的在/etc目录中查找“linuxtechi”单词 -###9 使用grep查找文件中所有的空行 +###例9 使用 grep 查找文件中所有的空行 root@Linux-world:~# grep ^$ /etc/shadow root@Linux-world:~# 由于/etc/shadow文件中没有空行,所以没有任何输出 -###10 使用“grep -i”参数查找模式### +###例10 使用 -i 参数查找模式### grep命令的-i参数在查找时忽略字符的大小写。 @@ -108,7 +110,7 @@ grep命令的-i参数在查找时忽略字符的大小写。 linuxtechi:x:1001:1001::/home/linuxtechi:/bin/bash nextstep4it@localhost:~$ -###11 使用-e参数查找多个模式### +###例11 使用 -e 参数查找多个模式### 例如,我想在一条grep命令中查找‘linuxtechi’和‘root’单词,使用-e参数,我们可以查找多个模式。 @@ -117,7 +119,7 @@ grep命令的-i参数在查找时忽略字符的大小写。 linuxtechi:x:1000:1000:linuxtechi,,,:/home/linuxtechi:/bin/bash root@Linux-world:~# -###12 使用“grep -f”从一个文件中获取待查找的模式### +###例12 使用 -f 用文件指定待查找的模式### 首先,在当前目录中创建一个搜索模式文件“grep_pattern”,我想文件中输入的如下内容。 @@ -133,7 +135,7 @@ grep命令的-i参数在查找时忽略字符的大小写。 ![](http://www.linuxtechi.com/wp-content/uploads/2015/05/grep-f-option.jpg) -###13 使用-c参数计算模式匹配的数量### +###例13 使用 -c 参数计算模式匹配到的数量### 继续上面例子,我们在grep命令中使用-c命令计算匹配指定模式的数量 @@ -141,7 +143,7 @@ grep命令的-i参数在查找时忽略字符的大小写。 22 root@Linux-world:~# -###14 输出匹配指定模式行的前或者后面N行### +###例14 输出匹配指定模式行的前或者后面N行### a)使用-B参数输出匹配行的前4行 @@ -167,7 +169,7 @@ via: http://www.linuxtechi.com/linux-grep-command-with-14-different-examples/ 作者:[Pradeep Kumar][a] 译者:[cvsher](https://github.com/cvsher) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 51d831cbee858362ddc9adbf15bb748987f9179f Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 May 2015 09:50:01 +0800 Subject: [PATCH 0838/2517] PUB:20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS @geekpi --- ... and access CentOS remote desktop on VPS.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename {translated/tech => published}/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md (82%) diff --git a/translated/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md b/published/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md similarity index 82% rename from translated/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md rename to published/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md index 3108d1ed32..7c3db8a320 100644 --- a/translated/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md +++ b/published/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md @@ -1,6 +1,6 @@ -Linux有问必答-- 如何在VPS上安装和访问CentOS远程桌面 +Linux有问必答:如何在VPS上安装和访问CentOS 7远程桌面 ================================================================================ -> **提问**: 我想在VPS中安装CentOS桌面,并可以直接从我家远程访问GUI桌面。有什么建议可以在VPS上设置和访问CentOS远程桌面? +> **提问**: 我想在VPS中安装CentOS桌面,并可以直接从我家远程访问GUI桌面。在VPS上设置和访问CentOS远程桌面有什么建议吗? 如何远程办公或者远程弹性化工作制在技术领域正变得越来越流行。这个趋势背后的一个技术就是远程桌面。你的桌面环境在云中,你可以在任何你去的地方,或者在家或者工作场所访问你的远程桌面。 @@ -10,7 +10,7 @@ Linux有问必答-- 如何在VPS上安装和访问CentOS远程桌面 ### 第一步: 安装CentOS桌面 ### -如果现在的CentOS版本是没有桌面的最小版本,你需要先在VPS上安装桌面(比如GNOME)。比如,DigitalOcean的镜像就是最小版本,它需要如下安装[桌面GUI][2] +如果你现在安装的CentOS版本是没有桌面的最小版本,你需要先在VPS上安装桌面(比如GNOME)。比如,DigitalOcean的镜像就是最小版本,它需要如下安装[桌面GUI][2] # yum groupinstall "GNOME Desktop" @@ -36,15 +36,15 @@ CentOS依靠systemd来管理和配置系统服务。所以我们将使用systemd # systemctl status vncserver@:.service # systemctl is-enabled vncserver@.service -默认上,刚安装的VNC服务并没有激活(禁用)。 +默认的,刚安装的VNC服务并没有激活(禁用)。 ![](https://farm8.staticflickr.com/7613/16877514732_8ccffe7b6b_b.jpg) -现在服务一份通用的VNC服务文件来位用户xmodulo创建一个VNC服务配置。 +现在复制一份通用的VNC服务文件来为用户xmodulo创建一个VNC服务配置。 # cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service -用本文编辑器来打开配置文件,用实际的用户名(比如:xmodulo)来替换[Service]下面的。同样。在ExecStart后面追加 "-geometry " 参数。最后,要修改下面两行加粗字体的两行。 +用本文编辑器来打开配置文件,用实际的用户名(比如:xmodulo)来替换[Service]下面的。同样。在ExecStart后面追加 "-geometry " 参数。最后,要修改下面“ExecStart”和“PIDFile”两行。 # vi /etc/systemd/system/vncserver@:1.service @@ -85,7 +85,7 @@ CentOS依靠systemd来管理和配置系统服务。所以我们将使用systemd ### 第三步:通过SSH连接到远程桌面 ### -设计上,VNC使用的远程帧缓存(RFB)并不是一种安全的协议。那么在VNC客户端上直接连接到VNC服务器上并不是一个好主意。任何敏感信息比如密码都可以在VNC流量中被轻易地泄露。因此,我强烈建议使用SSH隧道来[加密你的VNC流量][3]。 +从设计上说,VNC使用的远程帧缓存(RFB)并不是一种安全的协议,那么在VNC客户端上直接连接到VNC服务器上并不是一个好主意。任何敏感信息比如密码都可以在VNC流量中被轻易地泄露。因此,我强烈建议使用SSH隧道来[加密你的VNC流量][3]。 在你要运行VNC客户端的本机上,使用下面的命令来创建一个连接到远程VPS的SSH通道。当被要输入SSH密码时,输入用户的密码。 @@ -99,7 +99,7 @@ CentOS依靠systemd来管理和配置系统服务。所以我们将使用systemd ![](https://farm8.staticflickr.com/7639/16691289910_fae83510fb_o.png) -你将被要求输入VNC密码。当你输入VNC密码时,你就可以安全地连接到CentOS的远程桌面了. +你将被要求输入VNC密码。当你输入VNC密码时,你就可以安全地连接到CentOS的远程桌面了。 ![](https://farm8.staticflickr.com/7614/16877678411_aa8349f6b1_c.jpg) @@ -111,7 +111,7 @@ via: http://ask.xmodulo.com/centos-remote-desktop-vps.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From d5d5082d570824fc88bb25bde9e9dfd044236faa Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 May 2015 10:37:12 +0800 Subject: [PATCH 0839/2517] PUB:20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10 @wwy-hust --- ...b Based Monitoring tool) on Ubntu 14.10.md | 67 +++++++++++++++++ ...b Based Monitoring tool) on Ubntu 14.10.md | 71 ------------------- 2 files changed, 67 insertions(+), 71 deletions(-) create mode 100644 published/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md delete mode 100644 translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md diff --git a/published/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/published/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md new file mode 100644 index 0000000000..97641f0298 --- /dev/null +++ b/published/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md @@ -0,0 +1,67 @@ +在Ubuntu 14.10上安装基于Web的监控工具:Linux-Dash +================================================================================ + +Linux-Dash是一个用于GNU/Linux机器的,低开销的监控仪表盘。您可以安装试试!Linux Dash的界面提供了您的服务器的所有关键信息的详细视图,可监测的信息包括RAM、磁盘使用率、网络、安装的软件、用户、运行的进程等。所有的信息都被分成几类,您可以通过主页工具栏中的按钮跳到任何一类中。Linux Dash并不是最先进的监测工具,但它十分适合寻找灵活、轻量级、容易部署的应用的用户。 + +### Linux-Dash的功能 ### + +- 使用一个基于Web的漂亮的仪表盘界面来监控服务器信息 +- 实时的按照你的要求监控RAM、负载、运行时间、磁盘配置、用户和许多其他系统状态 +- 支持基于Apache2/niginx + PHP的服务器 +- 通过点击和拖动来重排列控件 +- 支持多种类型的linux服务器 + +### 当前控件列表 ### + +- 通用信息 +- 平均负载 +- RAM +- 磁盘使用量 +- 用户 +- 软件 +- IP +- 网络速率 +- 在线状态 +- 处理器 +- 日志 + +### 在Ubuntu server 14.10上安装Linux-Dash ### + +首先您需要确认您安装了[Ubuntu LAMP server 14.10][1],接下来您需要安装下面的包: + + sudo apt-get install php5-json unzip + +安装这个模块后,需要在apache2中启用该模块,所以您需要使用下面的命令重启apache2服务器: + + sudo service apache2 restart + +现在您需要下载linux-dash的安装包并安装它: + + wget https://github.com/afaqurk/linux-dash/archive/master.zip + + unzip master.zip + + sudo mv linux-dash-master/ /var/www/html/linux-dash-master/ + +接下来您需要使用下面的命令来改变权限: + + sudo chmod 755 /var/www/html/linux-dash-master/ + +现在您便可以访问http://serverip/linux-dash-master/了。您应该会看到类似下面的输出: + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/02/1.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/02/2.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/install-linux-dash-web-based-monitoring-tool-on-ubntu-14-10.html + +作者:[ruchi][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix +[1]:http://www.ubuntugeek.com/step-by-step-ubuntu-14-10-utopic-unicorn-lamp-server-setup.html diff --git a/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md deleted file mode 100644 index 14496aabfc..0000000000 --- a/translated/tech/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md +++ /dev/null @@ -1,71 +0,0 @@ -Ubuntu 14.10ϰװLinux-Dash(Webļع) -================================================================================ - -Linux-DashһGNU/LinuxģͿļDZ̡װʼʹðɣLinux DashĽṩķйؼϢϸͼɼϢRAMʹʡ硢װûе̵߳ȡеϢ࣬ͨҳеİťκһСLinux DashȽļ⹤ߣʮʺѰײӦõû - -### Linux-DashĹ ### - -ʹһWebƯDZ̽طϢ - -ʵʱļRAMءʱ䡢áûϵͳ״̬ - -ɲʽΪװApache2/niginx + PHP - -ͨ϶пؼ - -ֶ֧͵linux - -### ǰؼб ### - -- ͨϢ -- ƽ -- RAM -- ʹ -- û -- -- IP -- -- -- -- ־ - -### Ubuntu server 14.10ϰװLinux-Dash ### - -Ҫȷװ[Ubuntu LAMP server 14.10][1]Ҫװİ - - sudo apt-get install php5-json unzip - -װģҪapache2ʹܸģ飬Ҫʹapache2 - - sudo service apache2 restart - -Ҫlinux-dashİװװ - - wget https://github.com/afaqurk/linux-dash/archive/master.zip - - unzip master.zip - - sudo mv linux-dash-master/ /var/www/html/linux-dash-master/ - -ҪʹıȨޣ - - sudo chmod 755 /var/www/html/linux-dash-master/ - -Էhttp://serverip/linux-dash-master/ˡӦûῴ - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/02/1.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/02/2.png) - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/install-linux-dash-web-based-monitoring-tool-on-ubntu-14-10.html - -ߣ[ruchi][a] -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ - -[a]:http://www.ubuntugeek.com/author/ubuntufix -[1]:http://www.ubuntugeek.com/step-by-step-ubuntu-14-10-utopic-unicorn-lamp-server-setup.html From 0ea3e1ee09766bab4cf3f263d43fb9fe7507bc5b Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 17 May 2015 10:40:53 +0800 Subject: [PATCH 0840/2517] translating --- .../20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md b/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md index b0e5afbf8b..10f7243617 100644 --- a/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md +++ b/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md @@ -1,3 +1,5 @@ +Translating---geekpi + Square 2.0 Icon Pack Is Twice More Beautiful ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux_3.jpeg) @@ -53,4 +55,4 @@ via: http://itsfoss.com/square-2-0-icon-pack-linux/ [7]:http://itsfoss.com/install-icon-linux-mint/ [8]:http://itsfoss.com/install-themes-icons-elementary-os-freya/ [9]:http://itsfoss.com/default-wallpapers-ubuntu-1504/ -[10]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ \ No newline at end of file +[10]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ From beae44bf4710b6cc8897520f767937cd355fd450 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 17 May 2015 10:41:35 +0800 Subject: [PATCH 0841/2517] Update 20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md --- .../20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md b/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md index 10f7243617..8fb244c5bc 100644 --- a/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md +++ b/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md @@ -1,5 +1,3 @@ -Translating---geekpi - Square 2.0 Icon Pack Is Twice More Beautiful ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux_3.jpeg) From ada3568deab76d2a77f83deb48e8a5ab46293374 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 17 May 2015 10:42:04 +0800 Subject: [PATCH 0842/2517] translating --- .../20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md b/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md index b0e5afbf8b..10f7243617 100644 --- a/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md +++ b/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md @@ -1,3 +1,5 @@ +Translating---geekpi + Square 2.0 Icon Pack Is Twice More Beautiful ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux_3.jpeg) @@ -53,4 +55,4 @@ via: http://itsfoss.com/square-2-0-icon-pack-linux/ [7]:http://itsfoss.com/install-icon-linux-mint/ [8]:http://itsfoss.com/install-themes-icons-elementary-os-freya/ [9]:http://itsfoss.com/default-wallpapers-ubuntu-1504/ -[10]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ \ No newline at end of file +[10]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ From f5c039462af3facab006858ce45f2e9dab699329 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 17 May 2015 11:04:05 +0800 Subject: [PATCH 0843/2517] translated --- ...e 2.0 Icon Pack Is Twice More Beautiful.md | 58 ------------------- ...e 2.0 Icon Pack Is Twice More Beautiful.md | 56 ++++++++++++++++++ 2 files changed, 56 insertions(+), 58 deletions(-) delete mode 100644 sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md create mode 100644 translated/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md diff --git a/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md b/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md deleted file mode 100644 index 10f7243617..0000000000 --- a/sources/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md +++ /dev/null @@ -1,58 +0,0 @@ -Translating---geekpi - -Square 2.0 Icon Pack Is Twice More Beautiful -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux_3.jpeg) - -Elegant, modern looking [Square icon theme][1] has recently been upgraded to version 2.0, which makes it more beautiful than ever. Square icon packs are compatible with all major desktop environments such as **Unity, GNOME, KDE, MATE** etc. Which means that you can use them for all popular Linux distributions such as Ubuntu, Fedora, Linux Mint, elementary OS etc. The vastness of this icon pack can be estimated from the fact it contains over 15,000 icons. - -### Install and use Square icon pack 2.0 in Linux ### - -There are two variants of Square icons, dark and light. Based on your preference, you can choose either of the two. For experimentation sake, I would advise you to download both variants of the icon theme. - -You can download the icon pack from the link below. The files are stored in Google Drive, so don’t be suspicious if you don’t see a standard website like [SourceForge][2]. - -- [Square Dark Icons][3] -- [Square Light Icons][4] - -To use the icon theme, extract the downloaded files in ~/.icons directory. If this doesn’t exist, create it. Once you have the files in the right place, based on your desktop environment, use a tool to change the icon theme. I have written some small tutorials in the past on this topic. Feel free to refer to them if you need further help: - -- [How to change themes in Ubuntu Unity][5] -- [How to change themes in GNOME Shell][6] -- [How to change themes in Linux Mint][7] -- [How to change theme in Elementary OS Freya][8] - -### Give it a try ### - -Here is what my Ubuntu 14.04 looks like with Square icons. I am using [Ubuntu 15.04 default wallpaper][9] in the background. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux_2.jpeg) - -A quick look at several icons in the Square theme: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux.jpeg) - -How do you find it? Do you think it can be considered as one of the [best icon themes for Ubuntu 14.04][10]? Do share your thoughts and stay tuned for more articles on customizing your Linux desktop. - - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/square-2-0-icon-pack-linux/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://gnome-look.org/content/show.php/Square?content=163513 -[2]:http://sourceforge.net/ -[3]:http://gnome-look.org/content/download.php?content=163513&id=1&tan=62806435 -[4]:http://gnome-look.org/content/download.php?content=163513&id=2&tan=19789941 -[5]:http://itsfoss.com/how-to-install-themes-in-ubuntu-13-10/ -[6]:http://itsfoss.com/install-switch-themes-gnome-shell/ -[7]:http://itsfoss.com/install-icon-linux-mint/ -[8]:http://itsfoss.com/install-themes-icons-elementary-os-freya/ -[9]:http://itsfoss.com/default-wallpapers-ubuntu-1504/ -[10]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ diff --git a/translated/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md b/translated/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md new file mode 100644 index 0000000000..a18110fb11 --- /dev/null +++ b/translated/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md @@ -0,0 +1,56 @@ +Square 2.0图标包更漂亮了 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux_3.jpeg) + +优雅、现代的[Square图标主题][1]最近更新到了2.0版,这让它比以前更漂亮了。Square图标包与其他主要的桌面环境如**Unity、 GNOME、KDE、 MATE等等**兼容。这意味着你可以在所有的流行Linux发行版如Ubuntu、Fedora、Linux Mint、elementary OS等等中使用它。 这个图标包估计包含超过了15000个图标。 + +### 在Linux中安装Square 2.0图标包 ### + +有两种不同的Square图标,暗色和亮色。基于你的洗好,你可以选择二者之一。出于实验,我建议你两个主题包都下载。 + +你可以用下面的链接下载图标包。文件存储在Google Drive,因此如果你没有看见像[SourceForge][2]这样标准的下载网站时怀疑。 + +- [Square Dark Icons][3] +- [Square Light Icons][4] + +要使用图标主题,解压下载的文件到~/.icons文件夹下。如果它不存在,就创建它。当你在正确的地方有这些文件后,基于你的桌面环境,使用一个工具来改变图标主题。我以前写了一些关于这个主题的教程。如果你需要额外的帮助,那么欢迎指出来: + +- [如何在Ubuntu Unity中改变主题][5] +- [如何在GNOME Shell中改变主题][6] +- [如何在Linux Mint中改变主题][7] +- [如何在Elementary OS Freya中改变主题][8] + +### 试一下 ### + +这是我用Square图标在Ubuntu 14.04中的效果。我背景使用的是[Ubuntu 15.04 默认壁纸][9]。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux_2.jpeg) + +Square主题中几个图标的样子: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux.jpeg) + +你怎么找到它的?你认为它是[Ubuntu 14.04中最佳的图标主题][10]之一么?你会分享它病期待更多关于自定义Linux桌面的文章么? + + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/square-2-0-icon-pack-linux/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://gnome-look.org/content/show.php/Square?content=163513 +[2]:http://sourceforge.net/ +[3]:http://gnome-look.org/content/download.php?content=163513&id=1&tan=62806435 +[4]:http://gnome-look.org/content/download.php?content=163513&id=2&tan=19789941 +[5]:http://itsfoss.com/how-to-install-themes-in-ubuntu-13-10/ +[6]:http://itsfoss.com/install-switch-themes-gnome-shell/ +[7]:http://itsfoss.com/install-icon-linux-mint/ +[8]:http://itsfoss.com/install-themes-icons-elementary-os-freya/ +[9]:http://itsfoss.com/default-wallpapers-ubuntu-1504/ +[10]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ From f486dea7065a36dc0ecf30851a591081e8782508 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 May 2015 11:14:23 +0800 Subject: [PATCH 0844/2517] PUB:20150429 web caching basics terminology http headers and caching strategies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wwy-hust 辛苦啦! --- ...ogy http headers and caching strategies.md | 181 ++++++++++++++++ ...ogy http headers and caching strategies.md | 198 ------------------ 2 files changed, 181 insertions(+), 198 deletions(-) create mode 100644 published/20150429 web caching basics terminology http headers and caching strategies.md delete mode 100644 translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md diff --git a/published/20150429 web caching basics terminology http headers and caching strategies.md b/published/20150429 web caching basics terminology http headers and caching strategies.md new file mode 100644 index 0000000000..52e4e4e01f --- /dev/null +++ b/published/20150429 web caching basics terminology http headers and caching strategies.md @@ -0,0 +1,181 @@ +Web缓存基础:术语、HTTP报头和缓存策略 +===================================================================== + +### 简介 + +对于您的站点的访问者来说,智能化的内容缓存是提高用户体验最有效的方式之一。缓存,或者对之前的请求的临时存储,是HTTP协议实现中最核心的内容分发策略之一。分发路径中的组件均可以缓存内容来加速后续的请求,这受控于对该内容所声明的缓存策略。 + +在这份指南中,我们将讨论一些Web内容缓存的基本概念。这主要包括如何选择缓存策略以保证互联网范围内的缓存能够正确的处理您的内容。我们将谈一谈缓存带来的好处、副作用以及不同的策略能带来的性能和灵活性的最大结合。 + +###什么是缓存(caching)? + +缓存(caching)是一个描述存储可重用资源以便加快后续请求的行为的术语。有许多不同类型的缓存,每种都有其自身的特点,应用程序缓存和内存缓存由于其对特定回复的加速,都很常用。 + +这份指南的主要讲述的Web缓存是一种不同类型的缓存。Web缓存是HTTP协议的一个核心特性,它能最小化网络流量,并且提升用户所感知的整个系统响应速度。内容从服务器到浏览器的传输过程中,每个层面都可以找到缓存的身影。 + +Web缓存根据特定的规则缓存相应HTTP请求的响应。对于缓存内容的后续请求便可以直接由缓存满足而不是重新发送请求到Web服务器。 + +###好处 + +有效的缓存技术不仅可以帮助用户,还可以帮助内容的提供者。缓存对内容分发带来的好处有: + +- **减少网络开销**:内容可以在从内容提供者到内容消费者网络路径之间的许多不同的地方被缓存。当内容在距离内容消费者更近的地方被缓存时,由于缓存的存在,请求将不会消耗额外的网络资源。 +- **加快响应速度**:由于并不是必须通过整个网络往返,缓存可以使内容的获得变得更快。缓存放在距用户更近的地方,例如浏览器缓存,使得内容的获取几乎是瞬时的。 +- **在同样的硬件上提高速度**:对于保存原始内容的服务器来说,更多的性能可以通过允许激进的缓存策略从硬件上压榨出来。内容拥有者们可以利用分发路径上某个强大的服务器来应对特定内容负载的冲击。 +- **网络中断时内容依旧可用**:使用某种策略,缓存可以保证在原始服务器变得不可用时,相应的内容对用户依旧可用。 + +###术语 + +在面对缓存时,您可能对一些经常遇到的术语可能不太熟悉。一些常见的术语如下: + +- **原始服务器**:原始服务器是内容的原始存放地点。如果您是Web服务器管理员,它就是您所管理的机器。它负责为任何不能从缓存中得到的内容进行回复,并且负责设置所有内容的缓存策略。 +- **缓存命中率**:一个缓存的有效性依照缓存的命中率进行度量。它是可以从缓存中得到数据的请求数与所有请求数的比率。缓存命中率高意味着有很高比例的数据可以从缓存中获得。这通常是大多数管理员想要的结果。 +- **新鲜度**:新鲜度用来描述一个缓存中的项目是否依旧适合返回给客户端。缓存中的内容只有在由缓存策略指定的新鲜期内才会被返回。 +- **过期内容**:缓存中根据缓存策略的新鲜期设置已过期的内容。过期的内容被标记为“陈旧”。通常,过期内容不能用于回复客户端的请求。必须重新从原始服务器请求新的内容或者至少验证缓存的内容是否仍然准确。 +- **校验**:缓存中的过期内容可以验证是否有效以便刷新过期时间。验证过程包括联系原始服务器以检查缓存的数据是否依旧代表了最近的版本。 +- **失效**:失效是依据过期日期从缓存中移除内容的过程。当内容在原始服务器上已被改变时就必须这样做,缓存中过期的内容会导致客户端发生问题。 + +还有许多其他的缓存术语,不过上面的这些应该能帮助您开始。 + +###什么能被缓存? + +某些特定的内容比其他内容更容易被缓存。对大多数站点来说,一些适合缓存的内容如下: + +- Logo和商标图像 +- 普通的不变化的图像(例如,导航图标) +- CSS样式表 +- 普通的Javascript文件 +- 可下载的内容 +- 媒体文件 + +这些文件更倾向于不经常改变,所以长时间的对它们进行缓存能获得好处。 + +一些项目在缓存中必须加以注意: + +- HTML页面 +- 会替换改变的图像 +- 经常修改的Javascript和CSS文件 +- 需要有认证后的cookies才能访问的内容 + +一些内容从来不应该被缓存: + +- 与敏感信息相关的资源(银行数据,等) +- 用户相关且经常更改的数据 + +除上面的通用规则外,通常您需要指定一些规则以便于更好地缓存不同种类的内容。例如,如果登录的用户都看到的是同样的网站视图,就应该在任何地方缓存这个页面。如果登录的用户会在一段时间内看到站点中用户特定的视图,您应该让用户的浏览器缓存该数据而不应让任何中介节点缓存该视图。 + +###Web内容缓存的位置 + +Web内容会在整个分发路径中的许多不同的位置被缓存: + +- **浏览器缓存**:Web浏览器自身会维护一个小型缓存。典型地,浏览器使用一种策略指示缓存最重要的内容。这可能是用户相关的内容或可能会再次请求且下载代价较高。 +- **中间缓存代理**:任何在客户端和您的基础架构之间的服务器都可以按期望缓存一些内容。这些缓存可能由ISP(网络服务提供者)或者其他独立组织提供。 +- **反向缓存**:您的服务器基础架构可以为后端的服务实现自己的缓存。如果实现了缓存,那么便可以在处理请求的位置返回相应的内容而不用每次请求都使用后端服务。 + +上面的这些位置通常都可以根据它们自身的缓存策略和内容源的缓存策略缓存一些相应的内容。 + +###缓存头部 + +缓存策略依赖于两个不同的因素。所缓存的实体本身需要决定是否应该缓存可接受的内容。它可以只缓存部分可以缓存的内容,但不能缓存超过限制的内容。 + +缓存行为主要由缓存策略决定,而缓存策略由内容拥有者设置。这些策略主要通过特定的HTTP头部来清晰地表达。 + +经过几个不同HTTP协议的变化,出现了一些不同的针对缓存方面的头部,它们的复杂度各不相同。下面列出了那些你也许应该注意的: + +- **`Expires`**:尽管使用范围相当有限,但`Expires`头部是非常简洁明了的。通常它设置一个未来的时间,内容会在此时间过期。这时,任何对同样内容的请求都应该回到原始服务器处。这个头部或许仅仅最适合回退模式(fall back)。 +- **`Cache-Control`**:这是`Expires`的一个更加现代化的替换物。它已被很好的支持,且拥有更加灵活的实现。在大多数案例中,它比`Expires`更好,但同时设置两者的值也无妨。稍后我们将讨论您可以设置的`Cache-Control`的详细选项。 +- **`ETag`**:`ETag`用于缓存验证。源服务器可以在首次服务一个内容时为该内容提供一个独特的`ETag`。当一个缓存需要验证这个内容是否即将过期,他会将相应的`ETag`发送回服务器。源服务器或者告诉缓存内容是一致的,或者发送更新后的内容(带着新的`ETag`)。 +- **`Last-Modified`**:这个头部指明了相应的内容最后一次被修改的时间。它可能会作为保证内容新鲜度的验证策略的一部分被使用。 +- **`Content-Length`**:尽管并没有在缓存中明确涉及,`Content-Length`头部在设置缓存策略时很重要。某些软件如果不提前获知内容的大小以留出足够空间,则会拒绝缓存该内容。 +- **`Vary`**:缓存系统通常使用请求的主机和路径作为存储该资源的键。当判断一个请求是否是请求同样内容时,`Vary`头部可以被用来提醒缓存系统需要注意另一个附加头部。它通常被用来告诉缓存系统同样注意`Accept-Encoding`头部,以便缓存系统能够区分压缩和未压缩的内容。 + +### Vary头部的隐语 + +`Vary`头部提供给您存储同一个内容的不同版本的能力,代价是降低了缓存的容量。 + +在使用`Accept-Encoding`时,设置`Vary`头部允许明确区分压缩和未压缩的内容。这在服务某些不能处理压缩数据的浏览器时很重要,它可以保证基本的可用性。`Vary`的一个典型的值是`Accept-Encoding`,它只有两到三个可选的值。 + +一开始看上去`User-Agent`这样的头部可以用于区分移动浏览器和桌面浏览器,以便您的站点提供差异化的服务。但`User-Agent`字符串是非标准的,结果将会造成在中间缓存中保存同一内容的许多不同版本的缓存,这会导致缓存命中率的降低。`Vary`头部应该谨慎使用,尤其是您不具备在您控制的中间缓存中使请求标准化的能力(也许可以,比如您可以控制CDN的话)。 + +###缓存控制标志怎样影响缓存 + +上面我们提到了`Cache-Control`头部如何被用与现代缓存策略标准。能够通过这个头部设定许多不同的缓存指令,多个不同的指令通过逗号分隔。 + +一些您可以使用的指示内容缓存策略的`Cache-Control`的选项如下: + +- **`no-cache`**:这个指令指示所有缓存的内容在新的请求到达时必须先重新验证,再发送给客户端。这条指令实际将内容立刻标记为过期的,但允许通过验证手段重新验证以避免重新下载整个内容。 +- **`no-store`**:这条指令指示缓存的内容不能以任何方式被缓存。它适合在回复敏感信息时设置。 +- **`public`**:它将内容标记为公有的,这意味着它能被浏览器和其他任何中间节点缓存。通常,对于使用了HTTP验证的请求,其回复被默认标记为`private`。`public`标记将会覆盖这个设置。 +- **`private`**:它将内容标记为私有的。私有数据可以被用户的浏览器缓存,但*不能*被任何中间节点缓存。它通常用于用户相关的数据。 +- **`max-age`**:这个设置指示了缓存内容的最大生存期,它在最大生存期后必须在源服务器处被验证或被重新下载。在现代浏览器中这个选项大体上取代了`Expires`头部,浏览器也将其作为决定内容的新鲜度的基础。这个选项的值以秒为单位表示,最大可以表示一年的新鲜期(31536000秒)。 +- **`s-maxage`**:这个选项非常类似于`max-age`,它指明了内容能够被缓存的时间。区别是这个选项只在中间节点的缓存中有效。结合这两个选项可以构建更加灵活的缓存策略。 +- **`must-revalidate`**:它指明了由`max-age`、`s-maxage`或`Expires`头部指明的新鲜度信息必须被严格的遵守。它避免了缓存的数据在网络中断等类似的场景中被使用。 +- **`proxy-revalidate`**:它和上面的选项有着一样的作用,但只应用于中间的代理节点。在这种情况下,用户的浏览器可以在网络中断时使用过期内容,但中间缓存内容不能用于此目的。 +- **`no-transform`**:这个选项告诉缓存在任何情况下都不能因为性能的原因修改接收到的内容。这意味着,缓存不允许压缩接收到的内容(没有从原始服务器处接收过压缩版本的该内容)并发送。 + +这些选项能够以不同的方式结合以获得不同的缓存行为。一些互斥的值如下: + +- `no-cache`,`no-store`以及由其他前面未提到的选项指明的常用的缓存行为 +- `public`和`private` + +如果`no-store`和`no-cache`都被设置,那么`no-store`会取代`no-cache`。对于非授权的请求的回复,`public`是隐含的设置。对于授权的请求的回复,`private`选项是隐含的。他们可以通过在`Cache-Control`头部中指明相应的相反的选项以覆盖。 + +###开发一种缓存策略 + +在理想情况下,任何内容都可以被尽可能缓存,而您的服务器只需要偶尔的提供一些验证内容即可。但这在现实中很少发生,因此您应该尝试设置一些明智的缓存策略,以在长期缓存和站点改变的需求间达到平衡。 + +### 常见问题 + +在许多情况中,由于内容被产生的方式(如根据每个用户动态的产生)或者内容的特性(例如银行的敏感数据),这些内容不应该被缓存。另一些许多管理员在设置缓存时可能面对的问题是外部缓存的数据未过期,但新版本的数据已经产生。 + +这些都是经常遇到的问题,它们会影响缓存的性能和您提供的数据的准确性。然而,我们可以通过开发提前预见这些问题的缓存策略来缓解这些问题。 + +### 一般性建议 + +尽管您的实际情况会指导您选择的缓存策略,但是下面的建议能帮助您获得一些合理的决定。 + +在您担心使用哪一个特定的头部之前,有一些特定的步骤可以帮助您提高您的缓存命中率。一些建议如下: + +- **为图像、CSS和共享的内容建立特定的文件夹**:将内容放到特定的文件夹内使得您可以方便的从您的站点中的任何页面引用这些内容。 +- **使用同样的URL来表示同样的内容**:由于缓存使用内容请求中的主机名和路径作为键,因此应保证您的所有页面中的该内容的引用方式相同,前一个建议能让这点更加容易做到。 +- **尽可能使用CSS图像拼接**:对于像图标和导航等内容,使用CSS图像拼接能够减少渲染您页面所需要的请求往返,并且允许对拼接缓存很长一段时间。 +- **尽可能将主机脚本和外部资源本地化**:如果您使用Javascript脚本和其他外部资源,如果上游没有提供合适的缓存头部,那么您应考虑将这些内容放在您自己的服务器上。您应该注意上游的任何更新,以便更新本地的拷贝。 +- **对缓存内容收集文件摘要**:静态的内容比如CSS和Javascript文件等通常比较适合收集文件摘要。这意味着为文件名增加一个独特的标志符(通常是这个文件的哈希值)可以在文件修改后绕开缓存保证新的内容被重新获取。有很多工具可以帮助您创建文件摘要并且修改HTML文档中的引用。 + +对于不同的文件正确地选择不同的头部这件事,下面的内容可以作为一般性的参考: + +- **允许所有的缓存存储一般内容**:静态内容以及非用户相关的内容应该在分发链的所有节点被缓存。这使得中间节点可以将该内容回复给多个用户。 +- **允许浏览器缓存用户相关的内容**:对于每个用户的数据,通常在用户自己的浏览器中缓存是可以被接受且有益的。缓存在用户自身的浏览器能够使得用户在接下来的浏览中能够瞬时读取,但这些内容不适合在任何中间代理节点缓存。 +- **将时间敏感的内容作为特例**:如果您的数据是时间敏感的,那么相对上面两条参考,应该将这些数据作为特例,以保证过期的数据不会在关键的情况下被使用。例如,您的站点有一个购物车,它应该立刻反应购物车里面的物品。依据内容的特点,可以在`Cache-Control`头部中使用`no-cache`或`no-store`选项。 +- **总是提供验证器**:验证器使得过期的内容可以无需重新下载而得到刷新。设置`ETag`和`Last-Modified`头部将允许缓存向原始服务器验证内容,并在内容未修改时刷新该内容新鲜度以减少负载。 +- **对于支持的内容设置长的新鲜期**:为了更加有效的利用缓存,一些作为支持性的内容应该被设置较长的新鲜期。这通常比较适合图像和CSS等由用户请求用来渲染HTML页面的内容。和文件摘要一起,设置延长的新鲜期将允许缓存长时间的存储这些资源。如果资源发生改变,修改的文件摘要将会使缓存的数据无效并触发对新的内容的下载。那时,新的支持的内容会继续被缓存。 +- **对父内容设置短的新鲜期**:为了使得前面的模式正常工作,容器类的内容应该相应的设置短的新鲜期,或者设置不全部缓存。这通常是在其他协助内容中使用的HTML页面。这个HTML页面将会被频繁的下载,使得它能快速的响应改变。支持性的内容因此可以被尽量缓存。 + +关键之处便在于达到平衡,一方面可以尽量的进行缓存,另一方面为未来保留当改变发生时从而改变整个内容的机会。您的站点应该同时具有: + +- 尽量缓存的内容 +- 拥有短的新鲜期的缓存内容,可以被重新验证 +- 完全不被缓存的内容 + +这样做的目的便是将内容尽可能的移动到第一个分类(尽量缓存)中的同时,维持可以接受的缓存命中率。 + +结论 +---- + +花时间确保您的站点使用了合适的缓存策略将对您的站点产生重要的影响。缓存使得您可以在保证服务同样内容的同时减少带宽的使用。您的服务器因此可以靠同样的硬件处理更多的流量。或许更重要的是,客户们能在您的网站中获得更快的体验,这会使得他们更愿意频繁的访问您的站点。尽管有效的Web缓存并不是银弹,但设置合适的缓存策略会使您以最小的代价获得可观的收获。 + +--- + +via: https://www.digitalocean.com/community/tutorials/web-caching-basics-terminology-http-headers-and-caching-strategies + +作者: [Justin Ellingwood](https://www.digitalocean.com/community/users/jellingwood) +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) +推荐:[royaso](https://github.com/royaso) + + + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + + + diff --git a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md b/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md deleted file mode 100644 index 1b04873445..0000000000 --- a/translated/tech/2015-04-29 web caching basics terminology http headers and caching strategies.md +++ /dev/null @@ -1,198 +0,0 @@ -WebHTTPͷͻ -===================================================================== - -### - -վķ˵ܻݻûЧķʽ֮һ棬߶֮ǰʱ洢HTTPЭʵĵݷַ֮һַ·еԻٺڶԸĻԡ - -ָУǽһЩWebݻĻҪѡ񻺴Ա֤ΧڵĻܹȷĴݡǽ̸һ̸ĺôԼͬIJܴܺԵϡ - -ʲôǻ棿 ------------- - -Ǵ洢ԴԱӿ಻ͬ͵Ļ棬ÿֶص㣬Ӧó򻺴ڴ滺ضظļ٣ܳá - -Web棬ָϵģһֲͬ͵Ļ档WebHTTPЭһԣСû֪ϵͳӦٶȡݴӷĴУÿ涼ҵӰ - -WebضĹ򻺴ӦHTTPĻظڻݵĺֱɻ·Web - -ô ----- - -ЧĻ漼ûݵṩߡݷַĺôУ - -- **翪**ݿڴṩߵ·֮಻ͬĵط档ھ߸ĵطʱڻĴڣ󽫲ĶԴ - -- **ӿӦٶ**òDZģʹݵĻñø졣ھûĵطά棬ʹݵĻȡ˲ʱġ - -- **ͬӲٶ**ڱԭʼݵķ˵ܿͨĻԴӲѹեӵǿý·ǿķӦijݸصij - -- **жʱɿ**ʹijֲԣԱ֤ԭʼòʱӦݶûɿá - - ----- - -ԻʱܶһЩ̫ܲϤһЩ£ - -- **ԭʼ**ԭʼݵԭʼŵص㡣WebԱĻΪκβܴӻеõݽлظҸݵĻԡ - -- ****һЧջʽжǿԴӻеõݵıʡʸζкܸ߱ݿԴӻлáͨǴԱҪĽ - -- **ʶ**ʶһеĿǷʺϷظͻˡеֻɻָڲŻᱻء - -- ****иݻԵѹڵݡڵݱΪ¾ɡͨݲڻظͻ˵󡣱´ԭʼµݻ֤ǷȻ׼ȷ - -- **У**еĹݿԱ֤ЧԱˢ¹ʱ䡣֤̰ϵԭʼԼ黺Ƿɴİ汾 - -- **ʧЧ**ʧЧݹڴӻƳݵĹ̡ԭʼѱı䲢һйڵݻᵼ¿ͻ˵ǩʱDZġ - -ĻЩӦܰʼ - -ʲôܱ棿 --------------- - -ijЩضݱݸױ档Դվ˵һЩѺõ£ - -- Logo̱ͼ -- ͨõķתͼ磬ͼ꣩ -- ʽ -- ͨJavascriptļ -- ص -- ýļ - -Щļڲı䣬ԳʱĶǽлܻúô - -һЩĿڻбע⣺ - -- HTMLҳ -- תͼ -- ޸ĵJavascriptCSSļ -- ½cookiesʵ - -һЩݴӦñ棺 - -- ϢصԴݣȣ -- ûҾĵ - -ͨù⣬ͨҪָһЩԱڸõػ治ͬݡ磬½ûͬվͼӦκεطҳ档½ûһʱڿվûеͼӦûݶӦκнڵ㻺ͼ - -Webݻλ ------------------ - -Webݻַ·е಻ͬĵص㱻棺 - -- ****WebάһСͻ档͵أʹһֲָʾҪݡûصݻܻٴش۽ϸߡ -- **м仺**κڿͻ˺Ļܹ֮ķ԰һЩݡЩISPṩߣ֯ṩ -- **򻺴**ķܹΪ˵ķʵԼĻ档ʵ˻棬ôӴ㷵Ӧݶÿʹú˷ - -ЩλͨԸĻԺԴĻԻһЩӦݡ - -ͷ --------- - -ͬءʵ屾ҪǷӦûɽܵݡֻ沿ֿԻݣܻ泬Ƶݡ - -ΪҪɻԾӵáЩҪͨضHTTPͷر - -ͬHTTPЭĵһЩͬľ۽ڻͷˣǵĸӶȸͬгЩҲӦעģ - -- **`Expires`**ʹ÷Χ൱ޣ`Expires`ͷǷdz˵ġͨһδʱ䣬ݻڴʱڡʱκζͬݵӦûصԭʼͷʺϻģʽfall back -- **`Cache-Control`**`Expires`һִ滻ѱܺõ֧֣ӵиʵ֡ڴУ`Expires`ãͬʱߵֵҲ޷Ժǽõ`Cache-Control`ϸѡ -- **`ETag`**`ETag`ڻ֤Դ״ηһʱΪṩһص`ETag`һҪ֤Ƿ񼴽ڣὫӦ`ETag`ͻطԴ߸߻һµģ߷͸ºݣµ`ETag` -- **`Last-Modified`**ͷָӦһα޸ĵʱ䡣ܻΪ֤ʶȵ֤Եһֱʹá -- **`Content-Length`**ܲûȷڻб漰`Content-Length`ͷûʱҪijЩǰ֪ݵĴС㹻ռ䣬ܾݡ -- **`Vary`**ϵͳͨʹ·Ϊ洢Դļ`Vary`ͷԱھһǷͬʱѻϵͳעһӵͷͨ߻ϵͳͬʹ`Accept-Encoding`ͷΪ˻ϵͳܹѹδѹݡ - -### Varyͷ - -`Vary`ͷṩ洢ͬһݵIJͬ汾ϡ˻ڡ - -`Accept-Encoding`İУ`Vary`ͷѹδѹӵоԵڷijЩܴѹݵʱҪԱ֤ʹá`Accept-Encoding``Vary`IJĺѡֵΪֻѡֵ - -`User-Agent`ͷһʼȥƶԱվṩ컯ķĺ⡣`User-Agent`ַǷDZ׼ģм仺жͬһݵ಻ͬ汾Ļ棬ᵼ»ʵĽ͡`Vary`ͷӦñصʹã߱Ƶм棨磬ݷַ磩ʹ׼ - -Ʊ־Ӱ컺 ------------------------- - -ᵽ`Cache-Control`ͷαִԱ׼಻ͬĻָܹͨͷ趨ָͬͨŽзַָ - -һЩʹõָʾݻԵ`Cache-Control`ѡ£ - -- **`no-cache`**ָָʾлµ󵽴ʱ֤ٷ͸ͻˡָʵʽ̱ΪڵģDZ֤֤Աݡ -- **`no-store`**ָָʾݲκηʽ档ʺڻظϢʱá -- **`public`**ݱΪеģζܱκмڵ㻺档ͨʹHTTP֤ظĬϱΪ`private``public`ǽḲá -- **`private`**ݱΪ˽еġ˽ݿԱû棬**κмڵ㻺档ͨûصݡ -- **`max-age`**ָʾ˻ݵڣںԴ֤ءִѡȡ`Expires`ͷҲΪݵʶȵĻѡֵΪλʾԱʾһڣ31536000룩 -- **`s-maxage`**ѡdz`max-age`ָܹʱ䡣ѡֻмڵĻЧѡԹĻԡ -- **`must-revalidate`**ָ`max-age``s-maxage``Expires`ͷָʶϢ뱻ϸء˻жϵƵijбʹá -- **`proxy-revalidate`**ѡһãֻӦмĴڵ㡣£ûжʱʹùݣмĻݲڴĿġ -- **`no-transform`**ѡ߻κ¶Ϊܵԭ޸Ľյݡζţ治ѹյݣûдԭʼչѹ汾ĸݣ͡ - -ЩѡܹԲͬķʽԻòͬĻΪһЩֵ£ - -- `no-cache``no-store`ԼǰδᵽѡָijõĻΪ -- `public``private` - -`no-store``no-cache`ãô`no-store`ȡ`no-cache`ڷȨĻظ`public`áȨĻظ`private`ѡġǿͨ`Cache-Control`ͷָӦ෴ѡԸǡ - -һֻ ----------------- - -£κݶԱĻ棬ķֻҪżṩһЩ֤ݼɡʵкٷӦóһЩǵĻԣڳڻվıﵽƽ⡣ - -### - -Уݱķʽÿû̬IJݵԣеݣЩݲӦñ档һЩԱûʱԵⲿδڣ°汾Ѿ - -ЩǾ⣬ǻӰ컺ܺṩݵ׼ȷԡȻǿͨǰԤЩĻЩ⡣ - -### һԽ - -ʵָѡĻԣĽܰһЩľ - -ʹһضͷ֮ǰһЩضIJ԰ĻʡһЩ£ - -- **ΪͼCSS͹ݽضļ**ݷŵضļʹԷĴվеκҳЩݡ -- **ʹͬURLʾͬ**ڻʹе·ΪӦ֤ҳеĸݵ÷ʽͬǰһ -- **ʹCSSͼ**ͼ͵ݣʹCSSͼܹȾҳҪԾ黺ܳһʱ䡣 -- **ܽűⲿԴػ**ʹJavascriptűⲿԴûṩʵĻͷôӦǽЩݷԼķϡӦעεκθ£Ա±صĿ -- **ԻռļժҪ**̬ݱCSSJavascriptļͨȽʺռļժҪζΪļһصı־ͨļĹϣֵļ޸ĺƿ汣֤µݱ»ȡкܶ๤߿԰ļժҪ޸HTMLĵеá - -ڲͬļȷѡͬͷ£ݿΪһԵIJο - -- **еĻ洢һ**̬ԼûصӦڷַнڵ㱻档ʹмڵԽݻظû -- **ûص**ÿûݣͨûԼлǿԱġûܹʹûڽܹ˲ʱȡЩݲʺκмڵ㻺档 -- **ʱеΪ**ʱеģôοӦýЩΪԱ֤ڵݲڹؼ±ʹá磬վһﳵӦ̷ӦﳵƷݵص㣬`Cache-Control`ͷʹ`no-cache``no-store`ѡ -- **ṩ֤**֤ʹùڵݿضõˢ¡`ETag``Last-Modified`ͷԭʼ֤ݣδ޸ʱˢ¸ʶԼٸء -- **ֵ֧ó**Ϊ˸Чû棬һЩΪ֧ԵӦñýϳڡͨȽʺͼCSSûȾHTMLҳݡļժҪһӳڽ泤ʱĴ洢ЩԴԴı䣬޸ĵļժҪʹЧµݵءʱµֵ֧ݻ档 -- **Ըö̵**ΪʹǰģʽӦӦö̵ڣòȫ档ͨЭʹõHTMLҳ档HTMLҳ潫ᱻƵأʹܿٵӦı䡣֧Ե˿ԱĻ档 - -ؼ֮ڴﵽƽ⣬һԼĽл棬һΪδıݵĻᡣı䷢ʱվӦͬʱУ - -- ػ -- ӵж̵ڵĻݣԱ֤ -- ȫ - -ĿıǽݾܵƶһࣨĻ棩еͬʱάֿԽܵĻʡ - - ----- - -ʱȷվʹ˺ʵĻԽվҪӰ졣ʹڱ֤ͬݵͬʱٴʹáķ˿ԿͬӲҪǣͻվлø飬ʹǸԸƵķվ㡣ЧWeb沢úʵĻԻʹСĴۻÿɹ۵ջ - ---- - -: [Justin Ellingwood](https://www.digitalocean.com/community/users/jellingwood) - -ߣ[wwy-hust](https://github.com/wwy-hust) - -Уԣ[УID](https://github.com/УID) - -Ƽ[royaso](https://github.com/royaso) - -via: https://www.digitalocean.com/community/tutorials/web-caching-basics-terminology-http-headers-and-caching-strategies - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ - - - From 92ef3991c77d1be9e0dd165ed0d2203aab5fd05e Mon Sep 17 00:00:00 2001 From: zhangboyue Date: Sun, 17 May 2015 12:14:31 +0800 Subject: [PATCH 0845/2517] Get an article for translating --- ...ypper Commands to Manage 'Suse' Linux Package Management.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md b/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md index 8468a26986..1f5661e8c4 100644 --- a/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md +++ b/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md @@ -1,3 +1,4 @@ +zhangboyue 翻译中 45 Zypper Commands to Manage ‘Suse’ Linux Package Management ================================================================================ SUSE (Software and System Entwicklung (Germany) meaning Software and System Development, in English) Linux lies on top of Linux Kernel brought by Novell. SUSE comes in two pack. One of them is called OpenSUSE, which is freely available (free as in speech as well as free as in wine). It is a community driven project packed with latest application support, the latest stable release of OpenSUSE Linux is 13.2. @@ -823,4 +824,4 @@ via: http://www.tecmint.com/zypper-commands-to-manage-suse-linux-package-managem 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/installation-of-suse-linux-enterprise-server-12/ \ No newline at end of file +[1]:http://www.tecmint.com/installation-of-suse-linux-enterprise-server-12/ From 7fd070d95c56c00f609f17119d7604d86899fcb7 Mon Sep 17 00:00:00 2001 From: zhangboyue Date: Sun, 17 May 2015 12:20:03 +0800 Subject: [PATCH 0846/2517] Update 20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md From bbc7998cfc89f3f2ca99c5a7218d52a58dd1fe41 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 May 2015 20:38:55 +0800 Subject: [PATCH 0847/2517] PUB:20150316 Systemd Boot Process a Close Look in Linux @zpl1025 --- ...temd Boot Process a Close Look in Linux.md | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150316 Systemd Boot Process a Close Look in Linux.md (75%) diff --git a/translated/tech/20150316 Systemd Boot Process a Close Look in Linux.md b/published/20150316 Systemd Boot Process a Close Look in Linux.md similarity index 75% rename from translated/tech/20150316 Systemd Boot Process a Close Look in Linux.md rename to published/20150316 Systemd Boot Process a Close Look in Linux.md index a2c2ea28be..747e946925 100644 --- a/translated/tech/20150316 Systemd Boot Process a Close Look in Linux.md +++ b/published/20150316 Systemd Boot Process a Close Look in Linux.md @@ -1,12 +1,13 @@ 走进Linux之systemd启动过程 ================================================================================ -Linux系统的启动方式有点复杂,而且总是有需要优化的地方。传统的Linux系统启动过程主要由著名的init进程(也被称为SysV init启动系统)处理,而基于init的启动系统也被确认会有效率不足的问题,systemd是Linux系统机器的另一种启动方式,宣称弥补了以[传统Linux SysV init][2]为基础的系统的缺点。在这里我们将着重讨论systemd的特性和争议,但是为了更好地理解它,也会看一下通过传统的以SysV init为基础的系统的Linux启动过程是什么样的。友情提醒一下systemd仍然处在测试阶段,而未来发布的Linux操作系统也正准备用systemd启动管理程序替代当前的启动过程。 + +Linux系统的启动方式有点复杂,而且总是有需要优化的地方。传统的Linux系统启动过程主要由著名的init进程(也被称为SysV init启动系统)处理,而基于init的启动系统被认为有效率不足的问题,systemd是Linux系统机器的另一种启动方式,宣称弥补了以[传统Linux SysV init][2]为基础的系统的缺点。在这里我们将着重讨论systemd的特性和争议,但是为了更好地理解它,也会看一下通过传统的以SysV init为基础的系统的Linux启动过程是什么样的。友情提醒一下,systemd仍然处在测试阶段,而未来发布的Linux操作系统也正准备用systemd启动管理程序替代当前的启动过程(LCTT 译注:截止到本文发表,主流的Linux发行版已经有很多采用了 systemd)。 ### 理解Linux启动过程 ### -在我们打开Linux电脑的电源后第一个启动的进程就是init。分配给init进程的PID是1。它是系统其他所有进程的父进程。当一台Linux电脑启动后,处理器会先在系统存储中查找BIOS,之后BIOS会测试系统资源然后找到第一个引导设备,通常设置为硬盘,然后会查找硬盘的主引导记录(MBR),然后加载到内存中并把控制权交给它,以后的启动过程就由MBR控制。 +在我们打开Linux电脑的电源后第一个启动的进程就是init。分配给init进程的PID是1。它是系统其他所有进程的父进程。当一台Linux电脑启动后,处理器会先在系统存储中查找BIOS,之后BIOS会检测系统资源然后找到第一个引导设备,通常为硬盘,然后会查找硬盘的主引导记录(MBR),然后加载到内存中并把控制权交给它,以后的启动过程就由MBR控制。 -主引导记录会初始化引导程序(Linux上有两个著名的引导程序,GRUB和LILO,80%的Linux系统在用GRUB引导程序),这个时候GRUB或LILO会加载内核模块。内核会马上查找/sbin下的init进程并执行它。从这里开始init成为了Linux系统的父进程。init读取的第一个文件是/etc/inittab,通过它init会确定我们Linux操作系统的运行级别。它会从文件/etc/fstab里查找分区表信息然后做相应的挂载。然后init会启动/etc/init.d里指定的默认启动级别的所有服务/脚本。所有服务在这里通过init一个一个被初始化。在这个过程里,init每次只启动一个服务,所有服务/守护进程都在后台执行并由init来管理。 +主引导记录会初始化引导程序(Linux上有两个著名的引导程序,GRUB和LILO,80%的Linux系统在用GRUB引导程序),这个时候GRUB或LILO会加载内核模块。内核会马上查找/sbin下的“init”程序并执行它。从这里开始init成为了Linux系统的父进程。init读取的第一个文件是/etc/inittab,通过它init会确定我们Linux操作系统的运行级别。它会从文件/etc/fstab里查找分区表信息然后做相应的挂载。然后init会启动/etc/init.d里指定的默认启动级别的所有服务/脚本。所有服务在这里通过init一个一个被初始化。在这个过程里,init每次只启动一个服务,所有服务/守护进程都在后台执行并由init来管理。 关机过程差不多是相反的过程,首先init停止所有服务,最后阶段会卸载文件系统。 @@ -14,9 +15,9 @@ Linux系统的启动方式有点复杂,而且总是有需要优化的地方。 ### 理解Systemd ### -开发Systemd的主要目的就是减少系统引导时间和计算开销。Systemd(系统管理守护进程),最开始以GNU GPL协议授权开发,现在已转为使用GNU LGPL协议,它是如今讨论最热烈的引导和服务管理程序。如果你的Linux系统配置为使用Systemd引导程序,那么代替传统的SysV init,启动过程将交给systemd处理。Systemd的一个核心功能是它同时支持SysV init的后开机启动脚本。 +开发Systemd的主要目的就是减少系统引导时间和计算开销。Systemd(系统管理守护进程),最开始以GNU GPL协议授权开发,现在已转为使用GNU LGPL协议,它是如今讨论最热烈的引导和服务管理程序。如果你的Linux系统配置为使用Systemd引导程序,它取替传统的SysV init,启动过程将交给systemd处理。Systemd的一个核心功能是它同时支持SysV init的后开机启动脚本。 -Systemd引入了并行启动的概念,它会为每个需要启动的守护进程建立一个管道套接字,这些套接字对于使用它们的进程来说是抽象的,这样它们可以允许不同守护进程之间进行交互。Systemd会创建新进程并为每个进程分配一个控制组。处于不同控制组的进程之间可以通过内核来互相通信。[systemd处理开机启动进程][2]的方式非常漂亮,和传统基于init的系统比起来优化了太多。让我们看下Systemd的一些核心功能。 +Systemd引入了并行启动的概念,它会为每个需要启动的守护进程建立一个套接字,这些套接字对于使用它们的进程来说是抽象的,这样它们可以允许不同守护进程之间进行交互。Systemd会创建新进程并为每个进程分配一个控制组(cgroup)。处于不同控制组的进程之间可以通过内核来互相通信。[systemd处理开机启动进程][2]的方式非常漂亮,和传统基于init的系统比起来优化了太多。让我们看下Systemd的一些核心功能。 - 和init比起来引导过程简化了很多 - Systemd支持并发引导过程从而可以更快启动 @@ -81,7 +82,9 @@ Systemd提供了工具用于识别和定位引导相关的问题或性能影响 234ms httpd.service 191ms vmms.service -**systemd-analyze verify** 显示在所有系统单元中是否有语法错误。**systemd-analyze plot** 可以用来把整个引导过程写入一个SVG格式文件里。整个引导过程非常长不方便阅读,所以通过这个命令我们可以把输出写入一个文件,之后再查看和分析。下面这个命令就是做这个。 +**systemd-analyze verify** 显示在所有系统单元中是否有语法错误。 + +**systemd-analyze plot** 可以用来把整个引导过程写入一个SVG格式文件里。整个引导过程非常长不方便阅读,所以通过这个命令我们可以把输出写入一个文件,之后再查看和分析。下面这个命令就是做这个。 systemd-analyze plot > boot.svg @@ -89,9 +92,9 @@ Systemd提供了工具用于识别和定位引导相关的问题或性能影响 Systemd并没有幸运地获得所有人的青睐,一些专家和管理员对于它的工作方式和开发有不同意见。根据对于Systemd的批评,它不是“类Unix”方式因为它试着替换一些系统服务。一些专家也不喜欢使用二进制配置文件的想法。据说编辑systemd配置非常困难而且没有一个可用的图形工具。 -### 在Ubuntu 14.04和12.04上测试Systemd ### +###  如何在Ubuntu 14.04和12.04上测试Systemd ### -本来,Ubuntu决定从Ubuntu 16.04 LTS开始使用Systemd来替换当前的引导过程。Ubuntu 16.04预计在2016年4月发布,但是考虑到Systemd的流行和需求,即将发布的**Ubuntu 15.04**将采用它作为默认引导程序。好消息是Ubuntu 14.04 Trusty Tahr和Ubuntu 12.04 Precise Pangolin的用户可以在他们的机器上测试Systemd。测试过程并不复杂,你所要做的只是把相关的PPA包含到系统中,更新仓库并升级系统。 +本来,Ubuntu决定从Ubuntu 16.04 LTS开始使用Systemd来替换当前的引导过程。Ubuntu 16.04预计在2016年4月发布,但是考虑到Systemd的流行和需求,刚刚发布的**Ubuntu 15.04**采用它作为默认引导程序。另外,Ubuntu 14.04 Trusty Tahr和Ubuntu 12.04 Precise Pangolin的用户可以在他们的机器上测试Systemd。测试过程并不复杂,你所要做的只是把相关的PPA包含到系统中,更新仓库并升级系统。 **声明**:请注意它仍然处于Ubuntu的测试和开发阶段。升级测试包可能会带来一些未知错误,最坏的情况下有可能损坏你的系统配置。请确保在尝试升级前已经备份好重要数据。 @@ -127,7 +130,7 @@ Systemd并没有幸运地获得所有人的青睐,一些专家和管理员对 ![](http://blog.linoxide.com/wp-content/uploads/2015/03/Grub-Systemd.png) -就这样,你的Ubuntu系统已经不在使用传统的引导程序了,改为使用Systemd管理器。重启你的机器然后查看systemd引导过程吧。 +就这样,你的Ubuntu系统已经不再使用传统的引导程序了,改为使用Systemd管理器。重启你的机器然后查看systemd引导过程吧。 ![](http://blog.linoxide.com/wp-content/uploads/2015/03/Sytemd-Boot.png) @@ -141,7 +144,7 @@ via: http://linoxide.com/linux-how-to/systemd-boot-process/ 作者:[Aun Raza][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6fb46f77567489e08c7484f594c31647b2b12cda Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 May 2015 21:46:57 +0800 Subject: [PATCH 0848/2517] PUB:20150324 How to Host Open Source Code Repository in github @ZTinoZ --- ...t Open Source Code Repository in github.md | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150324 How to Host Open Source Code Repository in github.md (62%) diff --git a/translated/tech/20150324 How to Host Open Source Code Repository in github.md b/published/20150324 How to Host Open Source Code Repository in github.md similarity index 62% rename from translated/tech/20150324 How to Host Open Source Code Repository in github.md rename to published/20150324 How to Host Open Source Code Repository in github.md index d382f9cd64..8b9f40d3b1 100644 --- a/translated/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/published/20150324 How to Host Open Source Code Repository in github.md @@ -1,10 +1,11 @@ -怎样在Github上做开源代码库的主人 +怎样在Github上托管开源代码库 ================================================================================ -大家好,今天我们要学习一下怎样管理github.com库中的开源软件源代码。GitHub是一个基于web的Git库托管服务,提供分布式修改控制和Git的源代码管理(SCM)功能并加入了自身的特点。它给开源和私有项目提供了一个互相协作的工作区、代码预览和代码管理功能。不像Git,一个完完全全的命令行工具,GitHub提供了一个基于web的图形化界面和桌面,也整合了手机。GitHub同时提供了私有库付费计划和免费账号,都是用来管理开源软件项目的。 + +大家好,今天我们要学习一下怎样在github.com提供的仓库中托管开源软件源代码。GitHub是一个基于web的Git仓库托管服务,提供基于 git 的分布式版本控制和源代码管理(SCM)功能,并加入了自身的特点。它给开源项目和私有项目提供了一个互相协作的工作区、代码预览和代码管理功能。不像Git是一个完完全全的命令行工具,GitHub提供了一个基于web的图形化界面和桌面,也整合了手机操作。GitHub同时提供了私有库付费计划和通常用来管理开源软件项目的免费账号。 ![github universe logo](http://blog.linoxide.com/wp-content/uploads/2015/03/github-universe.jpg) -这是一种快速灵活,基于web的托管服务,它使用方便,管理分布式修改控制系统也是相当容易,任何人都能为了将它们使用、贡献、共享、问题跟踪和更多的全球各地数以百万计的人在github的库里管理他们的软件源代码。这里有一些简单快速地管理软件源代码的方法。 +这是一种快速灵活,基于web的托管服务,它使用方便,管理分布式版本控制系统也是相当容易,任何人都能将他们的软件源代码托管到 github,让全球各地数以百万计的人可以使用它、参与贡献、共享它、进行问题跟踪以及更多的用途。这里有一些简单快速地托管软件源代码的方法。 ### 1. 创建一个新的Github账号 ### @@ -20,7 +21,7 @@ ### 2. 创建一个新的库 ### -成功注册新账号或登录上Github之后,我们需要创建一个新的库来开始我们的正题。 +成功注册新账号或登录上Github之后,我们需要创建一个新的库来开始我们的征程。 点击位于顶部靠右账号id旁边的**(+)**按钮,然后点击“New Repository”。 @@ -46,13 +47,13 @@ 现在git已经准备就绪,我们要上传代码了。 -**注意**:为了避免错误,不要用**README**文件、许可证或gitignore文件来初始化新库,你可以在项目推送到Github上之后再添加它们。 +**注意**:为了避免错误,不要在初始化的新库中包含**README**、license或gitignore等文件,你可以在项目推送到Github上之后再添加它们。 -在终端上,我们需要把当前工作目录更改为你的本地项目,然后将本地目录初始化为Git库。 +在终端上,我们需要切换当前工作目录为你的本地项目的目录,然后将其初始化为Git库。 $ git init -接着我们在我们的新的本地库里添加的文件来作为我们的首次提交内容。 +接着我们添加新的本地库里中的文件,作为我们的首次提交内容。 $ git add . @@ -62,16 +63,16 @@ ![git commit](http://blog.linoxide.com/wp-content/uploads/2015/03/git-commit.png) -在终端上,我们要给远程库添加URL地址,用于以后我们能提交我们本地的库。 +在终端上,添加远程库的URL地址,以便我们的本地库推送到远程。 - $ git remote add origin remote Repository url + $ git remote add origin 远程库的URL $ git remote -v ![adding remote url](http://blog.linoxide.com/wp-content/uploads/2015/03/adding-remote-url.png) -注意:请确保将远程库的URL替换成了自己的远程库的URL。 +注意:请确保将上述“远程库的URL”替换成了你自己的远程库的URL。 -现在,要将我们的本地库提交至GitHub版本库中,我们需要运行一下命令并且输入所需的用户名和密码。 +现在,要将我们的本地库的改变推送至GitHub的版本库中,我们需要运行以下命令,并且输入所需的用户名和密码。 $ git push origin master @@ -87,9 +88,9 @@ 请把以上这条URL地址更改成你想要克隆的地址。 -### 更新改动 ### +### 推送改动 ### -如果我们对我们的代码做了更改并想把它们提交至我们的远程库中,我们应该在该目录下运行以下命令。 +如果我们对我们的代码做了更改并想把它们推送至我们的远程库中,我们应该在该目录下运行以下命令。 $ git add . $ git commit -m "Updating" @@ -97,7 +98,7 @@ ### 结论 ### -啊哈!我们已经成功地管理我们在Github库中的项目源代码了。快速灵活的Github基于web的托管服务,分布式修改控制系统使用起来方便容易。数百万个非常棒的开源项目驻扎在github上。所以,如果你有任何问题、建议或反馈,请在评论中告诉我们。谢谢大家!好好享受吧 :-) +啊哈!我们已经成功地将我们的项目源代码托管到Github的库中了。Github是快速灵活的基于web的托管服务,分布式版本控制系统使用起来方便容易。数百万个非常棒的开源项目驻扎在github上。所以,如果你有任何问题、建议或反馈,请在评论中告诉我们。谢谢大家!好好享受吧 :-) -------------------------------------------------------------------------------- @@ -105,7 +106,7 @@ via: http://linoxide.com/usr-mgmt/host-open-source-code-repository-github/ 作者:[Arun Pyasi][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3fef384edca0d37e9fbed51e5ae67ddf0937f4a1 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 May 2015 21:52:45 +0800 Subject: [PATCH 0849/2517] PUB:20150506 Linux FAQs with Answers--How to install autossh on Linux @Vic020 --- ... with Answers--How to install autossh on Linux.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150506 Linux FAQs with Answers--How to install autossh on Linux.md (88%) diff --git a/translated/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md b/published/20150506 Linux FAQs with Answers--How to install autossh on Linux.md similarity index 88% rename from translated/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md rename to published/20150506 Linux FAQs with Answers--How to install autossh on Linux.md index e83c23e9f3..3fa2cf8a86 100644 --- a/translated/tech/20150506 Linux FAQs with Answers--How to install autossh on Linux.md +++ b/published/20150506 Linux FAQs with Answers--How to install autossh on Linux.md @@ -1,12 +1,11 @@ -Linux有问必答--如何安装autossh +Linux有问必答:如何安装autossh ================================================================================ > **提问**: 我打算在linux上安装autossh,我应该怎么做呢? -[autossh][1] 是一款开源工具,可以帮助管理SSH会话,自动重连和停止转发流量。autossh会假定目标主机已经设定[无密码SSH登陆][2],以便autossh可以重连断开的SSH会话而不用用户操作。 +[autossh][1] 是一款开源工具,可以帮助管理SSH会话、自动重连和停止转发流量。autossh会假定目标主机已经设定[无密码SSH登陆][2],以便autossh可以重连断开的SSH会话而不用用户操作。 只要你建立[反向SSH隧道][3]或者[挂载基于SSH的远程文件夹][4],autossh迟早会派上用场。基本上只要需要维持SSH会话,autossh肯定是有用的。 - ![](https://farm8.staticflickr.com/7786/17150854870_63966e78bc_c.jpg) 下面有许多linux发行版autossh的安装方法。 @@ -29,8 +28,7 @@ CentOS/RHEL 6 或早期版本, 需要开启第三库[Repoforge库][5], 然后才 $ sudo yum install autossh -CentOS/RHEL 7以后,autossh 已经不在Repoforge库中. 你需要从源码编译安装(例子在下面). - +CentOS/RHEL 7以后,autossh 已经不在Repoforge库中. 你需要从源码编译安装(例子在下面)。 ### Arch Linux 系统 ### @@ -66,13 +64,13 @@ via: http://ask.xmodulo.com/install-autossh-linux.html 作者:[Dan Nanni][a] 译者:[Vic020/VicYu](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni [1]:http://www.harding.motd.ca/autossh/ -[2]:http://xmodulo.com/how-to-enable-ssh-login-without.html +[2]:https://linux.cn/article-5444-1.html [3]:http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html [4]:http://xmodulo.com/how-to-mount-remote-directory-over-ssh-on-linux.html [5]:http://xmodulo.com/how-to-set-up-rpmforge-repoforge-repository-on-centos.html From 86f6044cdc05e7ab46ae0f118ee06d664b35f92e Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 17 May 2015 22:13:56 +0800 Subject: [PATCH 0850/2517] [Translated]20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md --- ... in Debian Ubuntu Linux Mint and Fedora.md | 136 ------------------ ... in Debian Ubuntu Linux Mint and Fedora.md | 134 +++++++++++++++++ 2 files changed, 134 insertions(+), 136 deletions(-) delete mode 100644 sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md create mode 100644 translated/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md diff --git a/sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md b/sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md deleted file mode 100644 index c9f54a8185..0000000000 --- a/sources/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md +++ /dev/null @@ -1,136 +0,0 @@ -FSSlc translating - -Install uGet Download Manager 2.0 in Debian, Ubuntu, Linux Mint and Fedora -================================================================================ -After a long development period, which includes more than 11 developement releases, finally uGet project team pleased to announce the immediate availability of the latest stable version of uGet 2.0. The latest version includes numerous attractive features, such as a new setting dialog, improved BitTorrent and Metalink support added in the aria2 plugin, as well as better support for uGet RSS messages in the banner, other features include: - -- A new “Check for Updates” button informs you about new released versions. -- Added new languages & updated existing languages. -- Added a new “Message Banner” that allows developers to easily provide uGet related information to all users. -- Enhanced the Help Menu by including links to the Documentation, to submit Feedback & Bug Reports and more. -- Integrated uGet download manager into the two major browsers on the Linux platform, Firefox and Google Chrome. -- Improved support for Firefox Addon ‘FlashGot’. - -### What is uGet ### - -uGet (formerly known ad UrlGfe) is an open source, free and very powerful multi-platform GTK based download manager application was written in C language, that released and licensed under GPL. It offers large collection of features such as resuming downloads, multiple download support, categories support with an independent configuration, clipboard monitoring, download scheduler, import URLs from HTML files, integrated Flashgot plugin with Firefox and download torrent and metalink files using aria2 (a command-line download manager) that integrated with uGet. - -I have listed down all the key features of uGet Download Manager in detailed explanation. - -#### Key Features of uGet Download Manager #### - -- Downloads Queue: Place all your downloads into a Queue. As downloads finishes, the remaining queue files will automatically start downloading. -- Resume Downloads: If in case, your network connection disconnected, don’t worry you can start or resume download where it was left. -- Download Categories: Support for unlimited categories to manage downloads. -- Clipboard Monitor: Add the types of files to clipboard that automatically prompt you to download copied files. -- Batch Downloads: Allows you to easily add unlimited number of files at once for downloading. -- Multi-Protocol: Allows you to easily download files through HTTP, HTTPS, FTP, BitTorrent and Metalink using arial2 command-line plugin. -- Multi-Connection: Support for up to 20 simultaneous connections per download using aria2 plugin. -- FTP Login & Anonymous FTP: Added support for FTP login using username and password, as well as anonymous FTP. -- Scheduler: Added support for scheduled downloads, now you can schedule all your downloads. -- FireFox Integration via FlashGot: Integrated FlashGot as an independent supported Firefox extension that handles single or massive selection of files for downloading. -- CLI / Terminal Support: Offers command line or terminal option to download files. -- Folder Auto-Creation: If you have provided the save path for the download, but the save path doesn’t exist, uget will automatically create them. -- Download History Management: Keeps a track of finished download and recycled entries, per list 9,999 files. Entries which are older than the custom limit will be deleted automatically. -- Multi-Language Support: By default uGet uses English, but it support more than 23 languages. -- Aria2 Plugin: uGet integrated with Aria2 plugin to give more user friendly GUI. - -If you want to know a complete list of available features, see the official uGet [features page][1]. - -### Install uGet in Debian, Ubuntu, Linux Mint and Fedora ### - -The uGet developers added latest version in various repos throughout the Linux platform, so you can able to install or upgrade uGet using supported repository under your Linux distribution. - -Currently, a few Linux distributions are not up-to-date, but you can get the status of your distribution by going to the [uGet Download page][2] and selecting your preferred distro from there for more details. - -#### On Debian #### - -In Debian Testing (Jessie) and Debian Unstable (Sid), you can easily install and update using the official repository on a fairly reliable basis. - - $ sudo apt-get update - $ sudo apt-get install uget - -#### On Ubuntu & Linux Mint #### - -In Ubuntu and Linux Mint, you can install and update uGet using official PPA repository ‘ppa:plushuang-tw/uget-stable‘. By using this PPA, you automatically be kept up-to-date with the latest versions. - - $ sudo add-apt-repository ppa:plushuang-tw/uget-stable - $ sudo apt-get update - $ sudo apt-get install uget - -#### On Fedora #### - -In Fedora 20 – 21, latest version of uGet (2.0) available from the official repositories, installing from these repo is fairly reliable. - - $ sudo yum install uget - -**Note**: On older versions of Debian, Ubuntu, Linux Mint and Fedora, users can also install uGet. but the available version is 1.10.4. If you are looking for updated version (i.e. 2.0) you need to upgrade your system and add uGet PPA to get latest stable version. - -### Installing aria2 plugin ### - -[aria2][3] is a excellent command-line download utility, that is used by uGet as a aria2 plugin to add even more great functionality such as downloading torrent files, metalinks, multi-protocol & multi-source download. - -By default uGet uses CURL as backend in most of the today’s Linux systems, but the aria2 Plugin replaces CURL with aria2 as the backend. - -aria2 is a separate package that needs to be installed separately. You can easily install latest version of aria2 using supported repository under your Linux distribution or you can also use [downloads-aria2][4] that explains how to install aria2 on each distro. - -#### On Debian, Ubuntu and Linux Mint #### - -Use the official aria2 PPA repository to install latest version of aria2 using the following commands. - - $ sudo add-apt-repository ppa:t-tujikawa/ppa - $ sudo apt-get update - $ sudo apt-get install aria2 - -#### On Fedora #### - -Fedora’s official repositories already added aria2 package, so you can easily install it using the following yum command. - - $ sudo yum install aria2 - -#### Starting uGet #### - -To start uGet application, from the desktop “Menu” on search bar type “uget“. Refer below screenshot. - -![Start uGet Download Manager](http://www.tecmint.com/wp-content/uploads/2014/03/Start-uGet.gif) -Start uGet Download Manager - -![uGet Version: 2.0](http://www.tecmint.com/wp-content/uploads/2014/03/uGet-Version.gif) -uGet Version: 2.0 - -#### Activate aria2 Plugin in uGet #### - -To active the aria2 plugin, from the uGet menu go to Edit –> Settings –> Plug-in tab, from the drop-down select “arial2“. - -![Enable Aria2 Plugin for uGet](http://www.tecmint.com/wp-content/uploads/2014/03/Enable-Aria2-Plugin.gif) -Enable Aria2 Plugin for uGet - -### uGet 2.0 Screenshot Tour ### - -![Download Files Using Aria2](http://www.tecmint.com/wp-content/uploads/2014/03/Download-Files-Using-Aria2.gif) -Download Files Using Aria2 - -![Download Torrent File Using uGet](http://www.tecmint.com/wp-content/uploads/2014/03/Download-Torrent-File.gif) -Download Torrent File Using uGet - -![Batch Downloads Using uGet](http://www.tecmint.com/wp-content/uploads/2014/03/Batch-Download-Files.gif) -Batch Downloads Using uGet - -uGet source files and RPM packages also available for other Linux distributions and Windows at [download page][5]. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-uget-download-manager-in-linux/ - -作者:[Ravi Saive][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/admin/ -[1]:http://uget.visuex.com/features -[2]:http://ugetdm.com/downloads -[3]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/ -[4]:http://ugetdm.com/downloads-aria2 -[5]:http://ugetdm.com/downloads diff --git a/translated/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md b/translated/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md new file mode 100644 index 0000000000..d5c2fc98f5 --- /dev/null +++ b/translated/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md @@ -0,0 +1,134 @@ +在 Debian, Ubuntu, Linux Mint 及 Fedora 中安装 uGet 下载管理器 2.0 +================================================================================ +在经历了一段漫长的开发期后,期间发布了超过 11 个开发版本,最终 uGet 项目小组高兴地宣布 uGet 的最新稳定版本 uGet 2.0 已经可以下载使用了。最新版本包含许多吸引人的特点,例如一个新的设定对话框,改进了 aria2 插件对 BitTorrent 和 Metalink 协议的支持,同时对位于横栏中的 uGet RSS 信息提供了更好的支持,其他特点包括: + +- 一个新的 “检查更新” 按钮,提醒您有关新的发行版本的信息; +- 增添新的语言支持并升级了现有的语言; +- 增加了一个新的 “信息横栏” ,允许开发者轻松地向所有的用户提供有关 uGet 的信息; +- 通过对文档、提交反馈和错误报告等内容的链接,增强了帮助菜单; +- 将 uGet 下载管理器集成到了 Linux 平台下的两个主要的浏览器 Firefox 和 Google Chrome 中; +- 改进了对 Firefox 插件 ‘FlashGot’ 的支持; + +### 何为 uGet ### + +uGet (先前名为 UrlGfe) 是一个开源,免费,且极其强大的基于 GTK 的多平台下载管理器应用程序,它用 C 语言写就,在 GPL 协议下发布。它提供了一大类的功能,如恢复先前的下载任务,支持多重下载,使用一个独立的配置来支持分类,剪贴板监视,下载队列,从 HTML 文件中导出 URL 地址,集成在 Firefox 中的 Flashgot 插件中,使用集成在 uGet 中的 aria2(一个命令行下载管理器) 来下载 torrent 和 metalink 文件。 + +我已经在下面罗列出了 uGet 下载管理器的所有关键特点,并附带了详细的解释。 + +#### uGet 下载管理器的关键特点 #### + +- 下载队列: 可以将你的下载任务放入一个队列中。当某些下载任务完成后,将会自动开始下载队列中余下的文件; +- 恢复下载: 假如在某些情况下,你的网络中断了,不要担心,你可以从先前停止的地方继续下载或重新开始; +- 下载分类: 支持多种分类来管理下载; +- 剪贴板监视: 将要下载的文件类型复制到剪贴板中,便会自动弹出下载提示框以下载刚才复制的文件; +- 批量下载: 允许你轻松地一次性下载多个文件; +- 支持多种协议: 允许你轻松地使用 aria2 命令行插件通过 HTTP, HTTPS, FTP, BitTorrent 及 Metalink 等协议下载文件; +- 多连接: 使用 aria2 插件,每个下载同时支持多达 20 个连接; +- 支持 FTP 登录或匿名 FTP 登录: 同时支持使用用户名和密码来登录 FTP 或匿名 FTP ; +- 队列下载: 新增队列下载,现在你可以对你的所有下载进行安排调度; +- 通过 FlashGot 与 FireFox 集成: 与作为一个独立支持的 Firefox 插件的 FlashGot 集成,从而可以处理单个或大量的下载任务; +- CLI 界面或虚拟终端支持: 提供命令行或虚拟终端选项来下载文件; +- 自动创建目录: 假如你提供了一个先前并不存在的保存路径,uGet 将会自动创建这个目录; +- 下载历史管理: 跟踪记录已下载和已删除的下载任务的条目,每个列表支持 9999 个条目,比当前默认支持条目数目更早的条目将会被自动删除; +- 多语言支持: uGet 默认使用英语,但它可支持多达 23 种语言; +- Aria2 插件: uGet 集成了 Aria2 插件,来为 aria2 提供更友好的 GUI 界面; + +如若你想了解更加完整的特点描述,请访问 uGet 官方的 [特点页面][1]. + +### 在 Debian, Ubuntu, Linux Mint 及 Fedora 中安装 uGet ### + +uGet 开发者在 Linux 平台下的各种软件仓库中添加了 uGet 的最新版本,所以你可以在你使用的 Linux 发行版本下使用受支持的软件仓库来安装或升级 uGet 。 + +当前,一些 Linux 发行版本下的 uGet 可能不是最新的,但你可以到 [uGet 下载页面][2] 去了解你所用发行版本的支持状态,在那里选择你喜爱的发行版本来了解更多的信息。 + +#### 在 Debian 下 #### + +在 Debian 的测试版本 (Jessie) 和不稳定版本 (Sid) 中,你可以在一个可信赖的基础上,使用官方的软件仓库轻易地安装和升级 uGet 。 + + $ sudo apt-get update + $ sudo apt-get install uget + +#### 在 Ubuntu 和 Linux Mint 下 #### + +在 Ubuntu 和 Linux Mint 下,你可以使用官方的 PPA `ppa:plushuang-tw/uget-stable` 安装和升级 uGet ,通过使用这个 PPA,你可以自动地与最新版本保持同步。 + + $ sudo add-apt-repository ppa:plushuang-tw/uget-stable + $ sudo apt-get update + $ sudo apt-get install uget + +#### 在 Fedora 下 #### + +在 Fedora 20 – 21 下,最新版本的 uGet(2.0) 可以从官方软件仓库中获得,从这些软件仓库中安装是非常值得信赖的。 + + $ sudo yum install uget + +**注**: 在旧版本的 Debian, Ubuntu, Linux Mint 和 Fedora 下,用户也可以安装 uGet , 但可获取的版本为 1.10.4 。假如你期待使用升级版本(例如 2.0 版本),你需要升级你的系统并添加 uGet 的 PPA 以此来获取最新的稳定版本。 + +### 安装 aria2 插件 ### + +[aria2][3] 是一个卓越的命令行下载管理应用,在 uGet 中它作为一个 aria2 插件,为 uGet 增添了更为强大的功能,如下载 toorent,metalinks 文件,支持多种协议和多来源下载等功能。 + +默认情况下,uGet 在当今大多数的 Linux 系统中使用 `curl` 来作为后端,但 aria2 插件将 curl 替换为 aria2 来作为 uGet 的后端。 + +aria2 是一个单独的软件包,需要独立安装。你可以在你的 Linux 发行版本下,使用受支持的软件仓库来轻易地安装 aria2 的最新版本,或根据 [下载 aria2 页面][4] 来安装它,该页面详细解释了在各个发行版本中如何安装 aria2 。 + +#### 在 Debian, Ubuntu 和 Linux Mint 下 #### + +利用下面的命令,使用 aria2 的个人软件仓库来安装最新版本的 aria2 : + + $ sudo add-apt-repository ppa:t-tujikawa/ppa + $ sudo apt-get update + $ sudo apt-get install aria2 + +#### 在 Fedora 下 #### + +Fedora 的官方软件仓库中已经添加了 aria2 软件包,所以你可以轻易地使用下面的 yum 命令来安装它: + + $ sudo yum install aria2 + +#### 开启 uGet #### + +为了启动 uGet,从桌面菜单的搜索栏中键入 "uGet"。可参考如下的截图: + +![开启 uGet 下载管理器](http://www.tecmint.com/wp-content/uploads/2014/03/Start-uGet.gif) +开启 uGet 下载管理器 + +![uGet 版本: 2.0](http://www.tecmint.com/wp-content/uploads/2014/03/uGet-Version.gif) +uGet 版本: 2.0 + +#### 在 uGet 中激活 aria2 插件 #### + +为了激活 aria2 插件, 从 uGet 菜单接着到 `编辑 –> 设置 –> 插件` , 从下拉菜单中选择 "aria2"。 + +![为 uGet 启用 Aria2 插件](http://www.tecmint.com/wp-content/uploads/2014/03/Enable-Aria2-Plugin.gif) +为 uGet 启用 Aria2 插件 + +### uGet 2.0 截图赏析 ### + +![使用 Aria2 下载文件](http://www.tecmint.com/wp-content/uploads/2014/03/Download-Files-Using-Aria2.gif) +使用 Aria2 下载文件 + +![使用 uGet 下载 Torrent 文件](http://www.tecmint.com/wp-content/uploads/2014/03/Download-Torrent-File.gif) +使用 uGet 下载 Torrent 文件 + +![使用 uGet 进行批量下载](http://www.tecmint.com/wp-content/uploads/2014/03/Batch-Download-Files.gif) +使用 uGet 进行批量下载 + +针对其他 Linux 发行版本和 Windows 平台的 RPM 包和 uGet 的源文件都可以在 uGet 的[下载页面][5] 下找到。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-uget-download-manager-in-linux/ + +作者:[Ravi Saive][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/admin/ +[1]:http://uget.visuex.com/features +[2]:http://ugetdm.com/downloads +[3]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/ +[4]:http://ugetdm.com/downloads-aria2 +[5]:http://ugetdm.com/downloads \ No newline at end of file From 9e738faeafe3f197082b16c95bac8b66cba8bb7f Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 17 May 2015 22:18:25 +0800 Subject: [PATCH 0851/2517] PUB:20150306 How to Setup lftp--A Simple Command line FTP Program @zpl1025 --- ...up lftp--A Simple Command line FTP Program.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150306 How to Setup lftp--A Simple Command line FTP Program.md (85%) diff --git a/translated/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md b/published/20150306 How to Setup lftp--A Simple Command line FTP Program.md similarity index 85% rename from translated/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md rename to published/20150306 How to Setup lftp--A Simple Command line FTP Program.md index df90008704..6f7d3b047f 100644 --- a/translated/tech/20150306 How to Setup lftp--A Simple Command line FTP Program.md +++ b/published/20150306 How to Setup lftp--A Simple Command line FTP Program.md @@ -1,8 +1,8 @@ -如何设置lftp - 一个简易的命令行FTP程序 +LFTP : 一个功能强大的命令行FTP程序 ================================================================================ -大家好,这篇文章是介绍Lftp以及如何在Linux操作系统下安装的。[Lftp][1]是一个基于命令行的文件传输软件也被称为FTP客户端,由Alexander Lukyanov开发并以GNU GPL协议许可发行。除了FTP,它还支持FTPS,HTTP,HTTPS,HFTP,FISH,以及SFTP。这个程序还支持FXP,允许数据绕过客户端直接在两个FTP服务器之间传输。 +大家好,这篇文章是介绍Lftp以及如何在Linux操作系统下安装的。[Lftp][1]是一个基于命令行的文件传输软件(也被称为FTP客户端),由Alexander Lukyanov开发并以GNU GPL协议许可发行。除了FTP协议外,它还支持FTPS,HTTP,HTTPS,HFTP,FISH,以及SFTP等协议。这个程序还支持FXP,允许数据绕过客户端直接在两个FTP服务器之间传输。 -他有很多很棒的高级功能,比如完整目录树递归镜像以及断点续传下载。传输任务可以安排在稍后的时间段执行,可以限制带宽,可以创建传输列表,还支持类似Unix shell的任务控制。客户端还可以在交互式或自动脚本里使用。 +它有很多很棒的高级功能,比如递归镜像整个目录树以及断点续传下载。传输任务可以安排在稍后的时间段计划执行,可以限制带宽,可以创建传输列表,还支持类似Unix shell的任务控制。客户端还可以在交互式或自动脚本里使用。 ### 安装Lftp ### @@ -44,7 +44,7 @@ OpenSuse系统里的包管理软件Zypper可以用来安装lftp。下面是在Op 要登录到ftp服务器或sftp服务器,我们首先需要知道所要求的认证信息,比如用户名,密码,端口。 -之后,我们想通过lftp来登录。 +之后,我们可以通过lftp来登录。 $ lftp ftp://linoxide@localhost @@ -56,9 +56,9 @@ OpenSuse系统里的包管理软件Zypper可以用来安装lftp。下面是在Op ![ftp login with ports](http://blog.linoxide.com/wp-content/uploads/2015/03/lftp-login-port.png) -### 浏览 ### +### 导航 ### -我们可以用**ls**命令来列出文件和目录,用**cd**命令打开目录。 +我们可以用**ls**命令来列出文件和目录,用**cd**命令进入到目录。 ![ls and cd](http://blog.linoxide.com/wp-content/uploads/2015/03/ls-cd-lftp.png) @@ -158,7 +158,7 @@ OpenSuse系统里的包管理软件Zypper可以用来安装lftp。下面是在Op ### 总结 ### -哇!我们已经成功地安装了lftp并学会了使用它的一些基础的主要方式。lftp是一个非常棒的命令行ftp客户端,它支持许多额外的功能以及很酷的特性。它比其他普通ftp客户端多了很多东西。好吧,你要是有任何问题,建议,反馈,请在下面的评论区里留言。谢谢!享用lftp吧 :-) +哇!我们已经成功地安装了lftp并学会了它的一些基础的主要使用方式。lftp是一个非常棒的命令行ftp客户端,它支持许多额外的功能以及很酷的特性。它比其他普通ftp客户端多了很多东西。好吧,你要是有任何问题,建议,反馈,请在下面的评论区里留言。谢谢!享用lftp吧 :-) -------------------------------------------------------------------------------- @@ -166,7 +166,7 @@ via: http://linoxide.com/linux-how-to/setup-lftp-command-line-ftp/ 作者:[Arun Pyasi][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f1bbec053fbec2519c29f7dfc90b5d058a2dcc20 Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 18 May 2015 08:26:02 +0800 Subject: [PATCH 0852/2517] Update 20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md --- ...ma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md b/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md index 43b2adc3dd..acff452248 100644 --- a/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md +++ b/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md @@ -1,3 +1,4 @@ +Translating by GOLinux! KDE Plasma 5.3 Released, Here’s How To Upgrade in Kubuntu 15.04 ================================================================================ **KDE [has announced][1] the stable release of Plasma 5.3, which comes charged with a slate of new power management features. ** @@ -83,4 +84,4 @@ via: http://www.omgubuntu.co.uk/2015/04/kde-plasma-5-3-released-heres-how-to-upg [2]:http://www.omgubuntu.co.uk/2015/04/beta-plasma-5-3-features [3]:http://www.omgubuntu.co.uk/2015/04/beta-plasma-5-3-features [4]:https://www.kde.org/announcements/plasma-5.2.2-5.3.0-changelog.php -[5]:https://community.kde.org/Plasma/Live_Images \ No newline at end of file +[5]:https://community.kde.org/Plasma/Live_Images From 9d8d4ca45f8ade211e839efbfea58e26f570514f Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Mon, 18 May 2015 09:21:55 +0800 Subject: [PATCH 0853/2517] [Translating] 20150123 How to make a file immutable on Linux.md --- sources/tech/20150123 How to make a file immutable on Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150123 How to make a file immutable on Linux.md b/sources/tech/20150123 How to make a file immutable on Linux.md index 622cc4e5b3..d6261cb3c1 100644 --- a/sources/tech/20150123 How to make a file immutable on Linux.md +++ b/sources/tech/20150123 How to make a file immutable on Linux.md @@ -1,3 +1,5 @@ +Translating by goreliu ... + How to make a file immutable on Linux ================================================================================ Suppose you want to write-protect some important files on Linux, so that they cannot be deleted or tampered with by accident or otherwise. In other cases, you may want to prevent certain configuration files from being overwritten automatically by software. While changing their ownership or permission bits on the files by using chown or chmod is one way to deal with this situation, this is not a perfect solution as it cannot prevent any action done with root privilege. That is when chattr comes in handy. From 1e97e32507ee621c0f21e11906a92190d95ced77 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 18 May 2015 10:19:22 +0800 Subject: [PATCH 0854/2517] PUB:20150112 What are useful command-line network monitors on Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wwy-hust 翻译的不错! --- ... command-line network monitors on Linux.md | 136 ++++++++++++++++++ ... command-line network monitors on Linux.md | 135 ----------------- 2 files changed, 136 insertions(+), 135 deletions(-) create mode 100644 published/20150112 What are useful command-line network monitors on Linux.md delete mode 100644 translated/tech/20150112 What are useful command-line network monitors on Linux.md diff --git a/published/20150112 What are useful command-line network monitors on Linux.md b/published/20150112 What are useful command-line network monitors on Linux.md new file mode 100644 index 0000000000..25d7910ec7 --- /dev/null +++ b/published/20150112 What are useful command-line network monitors on Linux.md @@ -0,0 +1,136 @@ +又一波你可能不知道的 Linux 命令行网络监控工具 +=============================================================================== + +对任何规模的业务来说,网络监控工具都是一个重要的功能。网络监控的目标可能千差万别。比如,监控活动的目标可以是保证长期的网络服务、安全保护、对性能进行排查、网络使用统计等。由于它的目标不同,网络监控器使用很多不同的方式来完成任务。比如对包层面的嗅探,对数据流层面的统计数据,向网络中注入探测的流量,分析服务器日志等。 + +尽管有许多专用的网络监控系统可以365天24小时监控,但您依旧可以在特定的情况下使用命令行式的网络监控器,某些命令行式的网络监控器在某方面很有用。如果您是系统管理员,那您就应该有亲身使用一些知名的命令行式网络监控器的经历。这里有一份**Linux上流行且实用的网络监控器**列表。 + +### 包层面的嗅探器 ### + +在这个类别下,监控工具在链路上捕捉独立的包,分析它们的内容,展示解码后的内容或者包层面的统计数据。这些工具在最底层对网络进行监控、管理,同样的也能进行最细粒度的监控,其代价是影响网络I/O和分析的过程。 + +1. **dhcpdump**:一个命令行式的DHCP流量嗅探工具,捕捉DHCP的请求/回复流量,并以用户友好的方式显示解码的DHCP协议消息。这是一款排查DHCP相关故障的实用工具。 + +2. **[dsniff][1]**:一个基于命令行的嗅探、伪造和劫持的工具合集,被设计用于网络审查和渗透测试。它可以嗅探多种信息,比如密码、NSF流量(LCTT 译注:此处疑为 NFS 流量)、email消息、网络地址等。 + +3. **[httpry][2]**:一个HTTP报文嗅探器,用于捕获、解码HTTP请求和回复报文,并以用户友好的方式显示这些信息。(LCTT 译注:[延伸阅读](https://linux.cn/article-4148-1.html)。 ) + +4. **IPTraf**:基于命令行的网络统计数据查看器。它实时显示包层面、连接层面、接口层面、协议层面的报文/字节数。抓包过程由协议过滤器控制,且操作过程全部是菜单驱动的。(LCTT 译注:[延伸阅读](https://linux.cn/article-5430-1.html)。) + + ![](https://farm8.staticflickr.com/7519/16055246118_8ea182b413_c.jpg) + +5. **[mysql-sniffer][3]**:一个用于抓取、解码MySQL请求相关的数据包的工具。它以可读的方式显示最频繁或全部的请求。 + +6. **[ngrep][4]**:在网络报文中执行grep。它能实时抓取报文,并用正则表达式或十六进制表达式的方式匹配(过滤)报文。它是一个可以对异常流量进行检测、存储或者对实时流中特定模式报文进行抓取的实用工具。 + +7. **[p0f][5]**:一个被动的基于包嗅探的指纹采集工具,可以可靠地识别操作系统、NAT或者代理设置、网络链路类型以及许多其它与活动的TCP连接相关的属性。 + +8. **pktstat**:一个命令行式的工具,通过实时分析报文,显示连接带宽使用情况以及相关的协议(例如,HTTP GET/POST、FTP、X11)等描述信息。 + + ![](https://farm8.staticflickr.com/7477/16048970999_be60f74952_b.jpg) + +9. **Snort**:一个入侵检测和预防工具,通过规则驱动的协议分析和内容匹配,来检测/预防活跃流量中各种各样的后门、僵尸网络、网络钓鱼、间谍软件攻击。 + +10. **tcpdump**:一个命令行的嗅探工具,可以基于过滤表达式抓取网络中的报文,分析报文,并且在包层面输出报文内容以便于包层面的分析。他在许多网络相关的错误排查、网络程序debug、或[安全][6]监测方面应用广泛。 + +11. **tshark**:一个与Wireshark窗口程序一起使用的命令行式的嗅探工具。它能捕捉、解码网络上的实时报文,并能以用户友好的方式显示其内容。 + +### 流/进程/接口层面的监控 ### + +在这个分类中,网络监控器通过把流量按照流、相关进程或接口分类,收集每个流、每个进程、每个接口的统计数据。其信息的来源可以是libpcap抓包库或者sysfs内核虚拟文件系统。这些工具的监控成本很低,但是缺乏包层面的检视能力。 + +12. **bmon**:一个基于命令行的带宽监测工具,可以显示各种接口相关的信息,不但包括接收/发送的总量/平均值统计数据,而且拥有历史带宽使用视图。 + + ![](https://farm9.staticflickr.com/8580/16234265932_87f20c5d17_b.jpg) + +13. **[iftop][7]**:一个带宽使用监测工具,可以实时显示某个网络连接的带宽使用情况。它对所有带宽使用情况排序并通过ncurses的接口来进行可视化。他可以方便的监控哪个连接消耗了最多的带宽。(LCTT 译注:[延伸阅读](https://linux.cn/article-1843-1.html)。) + +14. **nethogs**:一个基于ncurses显示的进程监控工具,提供进程相关的实时的上行/下行带宽使用信息。它对检测占用大量带宽的进程很有用。(LCTT 译注:[延伸阅读](https://linux.cn/article-2808-1.html)。) + +15. **netstat**:一个显示许多TCP/UDP的网络堆栈的统计信息的工具。诸如打开的TCP/UDP连接书、网络接口发送/接收、路由表、协议/套接字的统计信息和属性。当您诊断与网络堆栈相关的性能、资源使用时它很有用。 + +16. **[speedometer][8]**:一个可视化某个接口发送/接收的带宽使用的历史趋势,并且基于ncurses的条状图进行显示的终端工具。 + + ![](https://farm8.staticflickr.com/7485/16048971069_31dd573a4f_c.jpg) + +17. **[sysdig][9]**:一个可以通过统一的界面对各个Linux子系统进行系统级综合性调试的工具。它的网络监控模块可以监控在线或离线、许多进程/主机相关的网络统计数据,例如带宽、连接/请求数等。(LCTT 译注:[延伸阅读](https://linux.cn/article-4341-1.html)。) + +18. **tcptrack**:一个TCP连接监控工具,可以显示活动的TCP连接,包括源/目的IP地址/端口、TCP状态、带宽使用等。 + + ![](https://farm8.staticflickr.com/7507/16047703080_5fdda2e811_b.jpg) + +19. **vnStat**:一个存储并显示每个接口的历史接收/发送带宽视图(例如,当前、每日、每月)的流量监控器。作为一个后台守护进程,它收集并存储统计数据,包括接口带宽使用率和传输字节总数。(LCTT 译注:[延伸阅读](https://linux.cn/article-5256-1.html)。) + +### 主动网络监控器 ### + +不同于前面提到的被动的监听工具,这个类别的工具们在监听时会主动的“注入”探测内容到网络中,并且会收集相应的反应。监听目标包括路由路径、可供使用的带宽、丢包率、延时、抖动(jitter)、系统设置或者缺陷等。 + +20. **[dnsyo][10]**:一个DNS检测工具,能够管理跨越多达1500个不同网络的开放解析器的DNS查询。它在您检查DNS传播或排查DNS设置的时候很有用。 + +21. **[iperf][11]**:一个TCP/UDP带宽测量工具,能够测量两个端点间最大可用带宽。它通过在两个主机间单向或双向的输出TCP/UDP探测流量来测量可用的带宽。它在监测网络容量、调谐网络协议栈参数时很有用。一个叫做[netperf][12]的变种拥有更多的功能及更好的统计数据。 + +22. **[netcat][13]/socat**:通用的网络调试工具,可以对TCP/UDP套接字进行读、写或监听。它通常和其他的程序或脚本结合起来在后端对网络传输或端口进行监听。(LCTT 译注:[延伸阅读](https://linux.cn/article-1171-1.html)。) + +23. **nmap**:一个命令行的端口扫描和网络发现工具。它依赖于若干基于TCP/UDP的扫描技术来查找开放的端口、活动的主机或者在本地网络存在的操作系统。它在你审查本地主机漏洞或者建立维护所用的主机映射时很有用。[zmap][14]是一个类似的替代品,是一个用于互联网范围的扫描工具。(LCTT 译注:[延伸阅读](https://linux.cn/article-2561-1.html)。) + +24. ping:一个常用的网络测试工具。通过交换ICMP的echo和reply报文来实现其功能。它在测量路由的RTT、丢包率以及检测远端系统防火墙规则时很有用。ping的变种有更漂亮的界面(例如,[noping][15])、多协议支持(例如,[hping][16])或者并行探测能力(例如,[fping][17])。(LCTT 译注:[延伸阅读](https://linux.cn/article-2303-1.html)。) + + ![](https://farm8.staticflickr.com/7466/15612665344_a4bb665a5b_c.jpg) + +25. **[sprobe][18]**:一个启发式推断本地主机和任意远端IP地址之间的网络带宽瓶颈的命令行工具。它使用TCP三次握手机制来评估带宽的瓶颈。它在检测大范围网络性能和路由相关的问题时很有用。 + +26. **traceroute**:一个能发现从本地到远端主机的第三层路由/转发路径的网络发现工具。它发送限制了TTL的探测报文,收集中间路由的ICMP反馈信息。它在排查低速网络连接或者路由相关的问题时很有用。traceroute的变种有更好的RTT统计功能(例如,[mtr][19])。 + +### 应用日志解析器 ### + +在这个类别下的网络监测器把特定的服务器应用程序作为目标(例如,web服务器或者数据库服务器)。由服务器程序产生或消耗的网络流量通过它的日志被分析和监测。不像前面提到的网络层的监控器,这个类别的工具能够在应用层面分析和监控网络流量。 + +27. **[GoAccess][20]**:一个针对Apache和Nginx服务器流量的交互式查看器。基于对获取到的日志的分析,它能展示包括日访问量、最多请求、客户端操作系统、客户端位置、客户端浏览器等在内的多个实时的统计信息,并以滚动方式显示。 + + ![](https://farm8.staticflickr.com/7518/16209185266_da6c5c56eb_c.jpg) + +28. **[mtop][21]**:一个面向MySQL/MariaDB服务器的命令行监控器,它可以将成本最大的查询和当前数据库服务器负载以可视化的方式显示出来。它在您优化MySQL服务器性能、调谐服务器参数时很有用。 + + ![](https://farm8.staticflickr.com/7472/16047570248_bc996795f2_c.jpg) + +29. **[ngxtop][22]**:一个面向Nginx和Apache服务器的流量监测工具,能够以类似top指令的方式可视化的显示Web服务器的流量。它解析web服务器的查询日志文件并收集某个目的地或请求的流量统计信息。 + +### 总结 ### + +在这篇文章中,我展示了许多命令行式监测工具,从最底层的包层面的监控器到最高层应用程序层面的网络监控器。了解那个工具的作用是一回事,选择哪个工具使用又是另外一回事。单一的一个工具不能作为您每天使用的通用的解决方案。一个好的系统管理员应该能决定哪个工具更适合当前的环境。希望这个列表对此有所帮助。 + +欢迎您通过回复来改进这个列表的内容! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/useful-command-line-network-monitors-linux.html + +作者:[Dan Nanni][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://www.monkey.org/~dugsong/dsniff/ +[2]:http://xmodulo.com/monitor-http-traffic-command-line-linux.html +[3]:https://github.com/zorkian/mysql-sniffer +[4]:http://ngrep.sourceforge.net/ +[5]:http://lcamtuf.coredump.cx/p0f3/ +[6]:http://xmodulo.com/recommend/firewallbook +[7]:http://xmodulo.com/how-to-install-iftop-on-linux.html +[8]:https://excess.org/speedometer/ +[9]:http://xmodulo.com/monitor-troubleshoot-linux-server-sysdig.html +[10]:http://xmodulo.com/check-dns-propagation-linux.html +[11]:https://iperf.fr/ +[12]:http://www.netperf.org/netperf/ +[13]:http://xmodulo.com/useful-netcat-examples-linux.html +[14]:https://zmap.io/ +[15]:http://noping.cc/ +[16]:http://www.hping.org/ +[17]:http://fping.org/ +[18]:http://sprobe.cs.washington.edu/ +[19]:http://xmodulo.com/better-alternatives-basic-command-line-utilities.html#mtr_link +[20]:http://goaccess.io/ +[21]:http://mtop.sourceforge.net/ +[22]:http://xmodulo.com/monitor-nginx-web-server-command-line-real-time.html diff --git a/translated/tech/20150112 What are useful command-line network monitors on Linux.md b/translated/tech/20150112 What are useful command-line network monitors on Linux.md deleted file mode 100644 index 37eea5a91b..0000000000 --- a/translated/tech/20150112 What are useful command-line network monitors on Linux.md +++ /dev/null @@ -1,135 +0,0 @@ -ʲôLinuxʵõʽӹ -=============================================================================== -κιģҵ˵һҪĹܡӵĿǧ𡣱磬ӻĿDZ֤ڵ繩ӦȫܽŲ顢ʹͳƵȡĿ겻ͬʹúܶ಻ͬķʽ񡣱ʹð̽ʹͳݣע̽־ȡ - -רõϵͳ36524СʱӣɿضʹʽijЩʽijáϵͳԱӦʹһЩ֪ʽľһ**Linuxʵõ**б - -### ̽ ### - -£ӹ·ϲ׽İǵݣչʾݻ߰ͳݡЩײмӡͬҲܽϸȵļӣDzI/OͷĹ̡ - -1. **dhcpdump**һʽDHCP̽ߣ׽DHCP/ظûѺõķʽʾDHCPЭϢһŲDHCPعϵʵùߡ - -2. **[dsniff][1]**һе̽߼ϣӵƭͽٳֹܣ͸ԡ̽Ϣ롢NSFemailϢַȡ - -3. **[httpry][2]**һHTTP̽ڲ񡢽HTTPͻظģûѺõķʽʾЩϢ - -4. **IPTraf**еͳݲ鿴ʵʱʾ桢Ӳ桢ӿڲ桢Эı/ֽץЭƣҲȫDz˵ġ - -![](https://farm8.staticflickr.com/7519/16055246118_8ea182b413_c.jpg) - -5. **[mysql-sniffer][3]**һץȡMySQLصݰĹߡԿɶķʽʾƵȫ - -6. **[ngrep][4]**籨ִgrepʵʱץȡģʽʮƱʽķʽƥ䱨ġһԶ쳣м⡢洢߶ʵʱضģʽĽץȡʵùߡ - -7. **[p0f][5]**һĻڰָ̽ƲɼߣԿɿʶϵͳNATߴá·ԼTCPصԡ - -8. **pktstat**һʽĹߣͨʵʱģʾӴʹԼصЭ飨磬HTTP GET/POSTFTPX11Ϣ - -![](https://farm8.staticflickr.com/7477/16048970999_be60f74952_b.jpg - -9. **Snort**һּԤߣͨЭƥ䣬/ԤԾиָĺšʬ硢㡢 - -10. **tcpdump**һе̽ߣԻڹ˱ʽץȡеıģģڰԱڰķصĴŲ顢debug[ȫ][6]ⷽӦù㷺 - -11. **tshark**һWiresharkڳһʹõʽ̽ߡܲ׽ϵʵʱģûѺõķʽʾݡ - -### //ӿڲļ ### - -УͨΪ̻ӿռÿÿ̡ÿӿڵͳݡϢԴlibpcapץsysfsںļϵͳЩߵļӳɱܵͣȱļ - -12. **bmon**һеĴ⹤ߣʾֽӿصϢ/͵ֵ/ƽֵͳݣӵʷʹͼ - -![](https://farm9.staticflickr.com/8580/16234265932_87f20c5d17_b.jpg) - -13. **[iftop][7]**һʹü⹤ߣʵʱʾijӵĴʹдʹͨncursesĽӿпӻԷļĸĴ - -14. **nethogs**һ̼ӹߣṩصʵʱ/дʹϢncursesʾԼռôĽ̺á - -15. **netstat**һʾTCP/UDPջͳϢĹߡӿڷ/ա·ɱЭ/׽ֵͳϢԡջصܡԴʹʱá - -16. **[speedometer][8]**һӻijӿڷ/յĴʹõʷƣһncurses״ͼʾĹߡ - -![](https://farm8.staticflickr.com/7485/16048971069_31dd573a4f_c.jpg) - -17. **[sysdig][9]**һLinuxϵͳӵͳһԽӿڵϵͳۺdebugߡģԼ߻ߡ/صͳݣ/ȡ - -18. **tcptrack**һTCPӼӹߣʾTCPӣԴ/ĿIPַ/˿ڡTCP״̬ʹõȡ - -![](https://farm8.staticflickr.com/7507/16047703080_5fdda2e811_b.jpg) - -19. **vnStat**һά˻ڽӿڵʷ/ʹͼ磬ǰÿաÿ£Ϊһ̨ػ̣ռ洢ͳݣӿڴʹʺʹֽ - -### ### - -ͬǰᵽıļߣĹڼʱġע롱̽ݵУһռӦķӦĿ··ɹʹõĴʡʱϵͳûȱݵȡ - -20. **[dnsyo][10]**һDNS⹤ߣܹ1500ͬĿŽȺDNSѯDNSŲDNSõʱá - -21. **[iperf][11]**һTCP/UDPߣܹôͨ䵥˫TCP/UDP̽õĴڼгЭջʱáһ[netperf][12]ıӵиĹܼõͳݡ - -22. **[netcat][13]/socat**ͨõdebugߣԶTCP/UDP׽ֽждͨijűں˶紫˿ڽм - -23. **nmap**һж˿ɨ緢ֹߡɻTCP/UDPɨ輼ҿŵĶ˿ڡڱڵIJϵͳ鱾©߽ӳʱá[zmap][14]һƵƷһڻΧɨ蹤ߡ - -24. pingһõԹߡͨICMPechoreplyĽǿʵ书ܡڲ·ɵRTTԼԶϵͳǽʱápingıиƯĽ棨磬[noping][15]Э֧֣磬[hping][16]߲̽磬[fping][17] - -![](https://farm8.staticflickr.com/7466/15612665344_a4bb665a5b_c.jpg) - -25. **[sprobe][18]**һʽƶϱԶIPַƿйߡʹTCPֻƿڼΧܺ·صʱá - -26. **traceroute**һִܷӱصԶĵ·/ת·緢ֹߡTTL̽ⱨģռм·ɵICMPϢŲӻ·صʱátracerouteıиõRTTͳƹܣ磬[mtr][19] - -### Ӧ־ ### - -£ضķӦóΪĿ꣨磬webݿɷĵͨ־ͼ⡣ǰᵽļĹܹӦòͼ - -27. **[GoAccess][20]**һApacheNginxĽʽ鿴ڶԻȡ־ķչʾշ󡢿ͻ˲ϵͳͻλáͻڵĶʵʱͳϢԹʽʾ - -![](https://farm8.staticflickr.com/7518/16209185266_da6c5c56eb_c.jpg) - -28. **[mtop][21]**һMySQL/MariaDBмԽǰݿдIJѯԿӻķʽʾŻMySQLܡгʱá - -![](https://farm8.staticflickr.com/7472/16047570248_bc996795f2_c.jpg) - -29. **[ngxtop][22]**һNginxApache⹤ߣܹtopָķʽӻʾWebwebIJѯ־ļռijĿĵػͳϢ - -### Conclusion ### - -ƪУչʾʽ⹤ߣײİļ߲Ӧó֪Ǹߵһ£ѡĸʹһ¡һһ߲ΪÿʹõͨõĽһõϵͳԱӦܾĸ߸ʺϵǰĻϣбԴ - -ӭͨظĽбݣ - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/useful-command-line-network-monitors-linux.html - -ߣ[Dan Nanni][a] -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ - -[a]:http://xmodulo.com/author/nanni -[1]:http://www.monkey.org/~dugsong/dsniff/ -[2]:http://xmodulo.com/monitor-http-traffic-command-line-linux.html -[3]:https://github.com/zorkian/mysql-sniffer -[4]:http://ngrep.sourceforge.net/ -[5]:http://lcamtuf.coredump.cx/p0f3/ -[6]:http://xmodulo.com/recommend/firewallbook -[7]:http://xmodulo.com/how-to-install-iftop-on-linux.html -[8]:https://excess.org/speedometer/ -[9]:http://xmodulo.com/monitor-troubleshoot-linux-server-sysdig.html -[10]:http://xmodulo.com/check-dns-propagation-linux.html -[11]:https://iperf.fr/ -[12]:http://www.netperf.org/netperf/ -[13]:http://xmodulo.com/useful-netcat-examples-linux.html -[14]:https://zmap.io/ -[15]:http://noping.cc/ -[16]:http://www.hping.org/ -[17]:http://fping.org/ -[18]:http://sprobe.cs.washington.edu/ -[19]:http://xmodulo.com/better-alternatives-basic-command-line-utilities.html#mtr_link -[20]:http://goaccess.io/ -[21]:http://mtop.sourceforge.net/ -[22]:http://xmodulo.com/monitor-nginx-web-server-command-line-real-time.html From 1e079b2f8fa886447ee6ed619c7643490f292deb Mon Sep 17 00:00:00 2001 From: GOLinux Date: Mon, 18 May 2015 10:25:41 +0800 Subject: [PATCH 0855/2517] [Translated]20150429 KDE Plasma 5.3 Released, Here's How To Upgrade in Kubuntu 15.04.md --- ...Here' s How To Upgrade in Kubuntu 15.04.md | 87 ------------------- ...Here' s How To Upgrade in Kubuntu 15.04.md | 85 ++++++++++++++++++ 2 files changed, 85 insertions(+), 87 deletions(-) delete mode 100644 sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md create mode 100644 translated/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md diff --git a/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md b/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md deleted file mode 100644 index acff452248..0000000000 --- a/sources/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md +++ /dev/null @@ -1,87 +0,0 @@ -Translating by GOLinux! -KDE Plasma 5.3 Released, Here’s How To Upgrade in Kubuntu 15.04 -================================================================================ -**KDE [has announced][1] the stable release of Plasma 5.3, which comes charged with a slate of new power management features. ** - -Having impressed and excited [with an earlier beta release in April][2], the latest update to the new stable update to the Plasma 5 desktop environments is now considered stable and ready for download. - -Plasma 5.3 continues to refine and finesse the new-look KDE desktop. It sees plenty of feature additions for desktop users to enjoy and **almost 400 bug fixes** packed in it should also improvements the performance and overall stability, too. - -### What’s New in Plasma 5.3 ### - -![Better Bluetooth Management in Plasma 5.3](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/bluetooth-applet-in-kde.jpg) -Better Bluetooth Management in Plasma 5.3 - -While we touched on the majority of the **new features** [in Plasma 5.3 in an earlier article][3] many are worth reiterating. - -**Enhanced power management** features and configuration options, including a **new battery applet, energy usage monitor** and **animated changes in screen brightness**, will help KDE last longer on portable devices. - -Closing a laptop when an external monitor is connected no longer triggers ‘suspend’. This new behaviour is called ‘**cinema mode**‘ and comes enabled by default, but can be disabled using an option in power management settings. - -**Bluetooth functionality is improved**, with a brand new panel applet making connecting and configuring paired bluetooth devices like smartphones, keyboards and speakers easier than ever. - -Similarly, **trackpad configuration in KDE is easier** with Plasma 5.3 thanks to a new set-up and settings module. - -![Trackpad, Touchpad. Tomato, Tomayto.](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/touchpad-kde.jpg) -Trackpad, Touchpad. Tomato, Tomayto. - -For Plasma widget fans there is a new **Press and Hold** gesture. When enabled this hides the settings handle that appears when on mouseover. Instead making it only appear when long-clicking on widget. - -On the topic of widget-y things, several **old Plasmoid favourites are reintroduced** with this release, including a useful system monitor, handy hard-drive stats and a comic reader. - -### Learning More & Trying It Out ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/plasma-5.3-beta.jpg\) - -A full list of everything — and I mean everything — that is new and improved in Plasma 5.3 is listed [in the official change log][4]. - -Live images that let you try Plasma 5.3 on a Kubuntu base **without affecting your own system** are available from the KDE community: - -- [Download KDE Plasma Live Images][5] - -If you need super stable system you can use these live images to try the features but stick with the version of KDE that comes with your distribution on your main computer. - -However, if you’re happy to experiment — read: can handle any package conflicts or system issues resulting from attempting to upgrade your desktop environment — you can. - -### Install Plasma 5.3 in Kubuntu 15.04 ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2012/02/logo-kubuntu.png) - -To **install Plasma 5.3 in Kubuntu 15.04** you need to add the KDE Backports PPA, run the Software Updater tool and install any available updates. - -The Kubuntu backports PPA may/will also upgrade other parts of the KDE Platform other than Plasma that are installed on your system including KDE applications, frameworks and Kubuntu specific configuration files. - -Using the command line is by far the fastest way to upgrade to Plasma 5.3 in Kubuntu: - - sudo add-apt-repository ppa:kubuntu-ppa/backports - - sudo apt-get update && sudo apt-get dist-upgrade - -After the upgrade process has completed, and assuming everything went well, you should reboot your computer. - -If you’re using an alternative desktop environment, like LXDE, Unity or GNOME, you will need to install the Kubuntu desktop package (you’ll find it in the Ubuntu Software Centre) after running both of the commands above. - -To downgrade to the stock version of Plasma in 15.04 you can use the PPA-Purge tool: - - sudo apt-get install ppa-purge - - sudo ppa-purge ppa:kubuntu-ppa/backports - -Let us know how your upgrade/testing goes in the comments below and don’t forget to mention the features you hope to see added to the Plasma 5 desktop next. - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/04/kde-plasma-5-3-released-heres-how-to-upgrade-in-kubuntu-15-04 - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://www.kde.org/announcements/plasma-5.3.0.php -[2]:http://www.omgubuntu.co.uk/2015/04/beta-plasma-5-3-features -[3]:http://www.omgubuntu.co.uk/2015/04/beta-plasma-5-3-features -[4]:https://www.kde.org/announcements/plasma-5.2.2-5.3.0-changelog.php -[5]:https://community.kde.org/Plasma/Live_Images diff --git a/translated/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md b/translated/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md new file mode 100644 index 0000000000..1e2a36a0a7 --- /dev/null +++ b/translated/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md @@ -0,0 +1,85 @@ + +KDE Plasma 5.3已发布,Kubuntu 15.04升级攻略 +================================================================================ +**KDE[已经宣布][1]Plasma 5.3的稳定版已经准备就绪,它包含了一个新的电源管理方面的稳定特性。** + +[先前四月份的beta版][2]已经让我们印象深刻,甚至跃跃欲试了,Plasma 5桌面环境的稳定版更新的最新更新已经稳定,并且可以下载了。 + +Plasma 5.3继续改善和细化了全新的KDE桌面,它添加了大量的特性供桌面用户体验。同时也修复了**多达400个错误**,这对性能和稳定性方面也进行了大量改善。 + +### Plasma 5.3中的新东西 ### + +![Better Bluetooth Management in Plasma 5.3](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/bluetooth-applet-in-kde.jpg) +Plasma 5.3中更好的蓝牙管理 + +而[在早期关于Plasma 5.3的文章][3]中,我们触及了大量**新特性**,这其中很多都值得反复说道说道。 + +**加强的电源管理**特性和配置选项,包括**新的电源小程序、能源使用监控**和**动态屏幕亮度变化**,将有助于让KDE在移动设备上加强续航能力。 + +在连接了外部监视器的时候合上笔记本盖子时,不会再触发‘挂起’操作。这个新的行为被称之为‘**影院模式**’,并且默认开启。但是,可以通功过电源管理设置中的相关选项禁用。 + +**蓝牙功能被改善**,带来了一个全新的面板小程序,使得在连接到并配置配对的蓝牙设备,如只能手机、键盘和扬声器时,比以往更为便捷。 + +同样,对于Plasma 5.3,**KDE中的轨迹板配置更为方便**,这多亏了新的安装和设置模块。 +![Trackpad, Touchpad. Tomato, Tomayto.](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/touchpad-kde.jpg) +轨迹板、触控板。Tomato, Tomayto。 + +对于Plasma小部件狂热者,带来了一个**按住并锁定**手势。当启用该功能,会隐藏移动鼠标时出现的设置处理。取而代之的是,它只会在长点击小部件时发生该行为。 + +谈到widget-y这类事情时,该发布版中**再次引入了几个旧的Plasmoid最受欢迎的东西**,包括一个有用的系统监视器、便利的硬盘驱动器统计和一个漫画阅读器。 + +### 了解更多&尝试 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/plasma-5.3-beta.jpg\) + +一张全部内容的完整列表——我说全部内容——是指Plasma 5.3中[在官方修改日志中][4]列出的新的和改进的内容。 + +你可以从KDE社区获取Live镜像,试用Kubuntu上的Plasma 5.3,**而不会影响到你自己的系统**: + +- [下载KDE Plasma Live镜像][5] + +如果你需要超级稳定的系统,你可以使用这些镜像来尝试新特性,但是你可以继续使用你的主要计算机上与你的版本对应的KDE版本。 + +但是,如果你对实验版满意——请阅:能够处理任何包冲突,或者由尝试升级桌面环境而导致的系统问题——那么你可以安装。 + +### 安装Plasma 5.3到Kubuntu 15.04 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2012/02/logo-kubuntu.png) + +要**安装Plasma 5.3到Kubuntu 15.04**中,你需要添加KDE 移植PPA,运行软件更新器工具并安装任何可用的更新。 + +Kubuntu移植PPA可能也会升级除了安装在你系统上的Plasma外的其它KDE平台组件,包括KDE应用程序、框架和Kubuntu特定配置文件。 + +目前为止,使用命令行来升级Kubuntu中的到Plasma 5.3是最快速的方法: + + sudo add-apt-repository ppa:kubuntu-ppa/backports + + sudo apt-get update && sudo apt-get dist-upgrade + +在升级过程完成后,如果一切顺利,你应该重启计算机。 + +如果你正在使用一个备用桌面环境,比如LXDE、Unity或者GNOME,则你需要在运行完上面的两个命令后安装Kubuntu桌面包(你可以在Ubuntu软件中心找到)。 +To downgrade to the stock version of Plasma in 15.04 you can use the PPA-Purge tool: + + sudo apt-get install ppa-purge + + sudo ppa-purge ppa:kubuntu-ppa/backports + +请在下面的评论中留言,让我们知道你怎么升级/测试过程是怎样的,别忘了告诉我们你在下一个Plasma 5桌面中要看到的特性。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/kde-plasma-5-3-released-heres-how-to-upgrade-in-kubuntu-15-04 + +作者:[Joey-Elijah Sneddon][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://www.kde.org/announcements/plasma-5.3.0.php +[2]:http://www.omgubuntu.co.uk/2015/04/beta-plasma-5-3-features +[3]:http://www.omgubuntu.co.uk/2015/04/beta-plasma-5-3-features +[4]:https://www.kde.org/announcements/plasma-5.2.2-5.3.0-changelog.php +[5]:https://community.kde.org/Plasma/Live_Images From 7f96e58b800e532baf423fefa6f608f2db2b3157 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 18 May 2015 10:56:47 +0800 Subject: [PATCH 0856/2517] Translating by ZTinoZ --- ...7 15 Things to Do After Installing Ubuntu 15.04 Desktop.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index 634d624197..9c43d734a8 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -27,9 +27,9 @@ Ubuntu Upgrade ### 2. 安装额外驱动 ### -In order for the system to scan and install additional hardware proprietary drivers, open Software and Updates utility from System Settings, go to Additional Drivers tab and wait for the utility to scan for drivers. +为了能让系统扫描并安装额外的硬件专有驱动,我们依然从System Settings打开Software and Updates工具,选择Additional Drivers标签并等待该工具扫描驱动。 -If some drivers matching your hardware are found, check the drivers you want to install and hit the Apply Changes button to install it. In case the proprietary drivers are not working as expected, uninstall them using the Revert button or check Do not use the device and Apply Changes. +如果有驱动匹配到了你的硬件,查看你想要安装的驱动并点击Apply按钮来安装它,以防专有驱动没有如期工作,用Revert按钮就能卸载它们或勾选Do not use the device后点击Apply按钮。 ![Install Drivers in Ubuntu](http://www.tecmint.com/wp-content/uploads/2015/04/install-drivers.jpg) Install Drivers From 685cd3dc49666b2a8073699c9591ff35f345cc97 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Mon, 18 May 2015 13:10:24 +0800 Subject: [PATCH 0857/2517] translation finished, source removed --- ...A Drop-Down Terminal for Gnome Desktops.md | 117 ------------------ ...A Drop-Down Terminal for Gnome Desktops.md | 115 +++++++++++++++++ 2 files changed, 115 insertions(+), 117 deletions(-) delete mode 100644 sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md create mode 100644 translated/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md diff --git a/sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md b/sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md deleted file mode 100644 index 786acddff4..0000000000 --- a/sources/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md +++ /dev/null @@ -1,117 +0,0 @@ -translating by wwy-hust - -Guake 0.7.0 Released – A Drop-Down Terminal for Gnome Desktops -================================================================================ -Linux commandline is the best and most powerful thing that fascinates a new user and provides extreme power to experienced users and geeks. For those who work on Server and Production, they are already aware of this fact. It would be interesting to know that Linux console was one of those first features of the kernel that was written by Linus Torvalds way back in the year 1991. - -Terminal is a powerful tool that is very reliable as it does not have any movable part. Terminal serves as an intermediate between console and GUI environment. Terminal themselves are GUI application that run on top of a desktop environment. There are a lot of terminal application some of which are Desktop Environment specific and rest are universal. Terminator, Konsole, Gnome-Terminal, Terminology, XFCE terminal, xterm are a few terminal emulators to name. - -You may get a list of most widely used Terminal Emulator follow the below link. - -- [20 Useful Terminals for Linux][1] - -Last day while surfing web, I came across a terminal namely ‘guake‘ which is a terminal for gnome. Though this is not the first time I have learned about Guake. I’d known this application nearly one year ago but somehow I could not write on this and later it was out of my mind until I heard it again. So finally the article is here. We will be taking you to Guake features, installation on Debian, Ubuntu and Fedora followed by quick testing. - -#### What is Guake? #### - -Guake is a Drop Down Terminal for Gnome Environment. Written from scratch mostly in Python and a little in C this application is released under GPLv2+ and is available for Linux and alike systems. Guake is inspired by a console in computer game Quake which slides down from the top by pressing a specially Key (Default is F12) and then slides-up when the same key is pressed. - -Important to mention that Guake is not the first of this kind. Yakuake which stands for Yet Another Kuake, a terminal emulator for KDE Desktop Environment and Tilda which is a GTK+ terminal Emulator are also inspired by the same slide up/down console of computer game Quake. - -#### Features of Guake #### - -- Lightweight -- Simple Easy and Elegant -- Functional -- Powerful -- Good Looking -- Smooth integration of terminal into GUI -- Appears when you call and disappear once you are done by pressing a predefined hot key -- Support for hotkeys, tabs, background transparency makes it a brilliant application, must for every Gnome User. -- Extremely configurable -- Plenty of color palette included, fixed and recognized -- Shortcut for transparency level -- Run a script when Guake starts via Guake Preferences. -- Able to run on more than one monitor - -Guake 0.7.0 was released recently, which brings numerous fixes as well as some new features as discussed above. For complete Guake 0.7.0 changelog and source tarball packages can be found [Here][2]. - -### Installing Guake Terminal in Linux ### - -If you are interested in compiling Guake from source you may download the source from the link above, build it yourself before installing. - -However Guake is available to be installed on most of the distributions from repository or by adding an additional repository. Here, we will be installing Guake on Debian, Ubuntu, Linux Mint and Fedora systems. - -First get the latest software package list from the repository and then install Guake from the default repository as shown below. - - ---------------- On Debian, Ubuntu and Linux Mint ---------------- - $ sudo apt-get update - $ apt-get install guake - ----------- - - ---------------- On Fedora 19 Onwards ---------------- - # yum update - # yum install guake - -After installation, start the Guake from another terminal as: - - $ guake - -After starting it, use F12 (Default) to roll down and roll up the terminal on your Gnome Desktop. - -Seems very beautiful specially the transparent background. Roll down… Roll up… Roll down… Roll up…. run command. Open another tab run command… Roll up… Roll down… - -![Guake Terminal in Action](http://www.tecmint.com/wp-content/uploads/2015/05/Guake.png) -Guake Terminal in Action - -If your wallpaper or working windows color don’t match you may like to change your wallpaper or reduce the transparency of the Guake terminal color. - -Next is to look into Guake Properties to edit settings as per requirements. Run Guake Preferences either by running it from Application Menu or by running the below command. - - $ guake --preferences - -![Guake Terminal Properties](http://www.tecmint.com/wp-content/uploads/2015/05/Guake-Properties.png) -Guake Terminal Properties - -Scrolling Properties.. - -![Guake Scrolling Settings](http://www.tecmint.com/wp-content/uploads/2015/05/Guake-Scrolling.png) -Guake Scrolling Settings - -Appearance Properties – Here you can modify text and background color as well as tune transparency. - -![Appearance Properties](http://www.tecmint.com/wp-content/uploads/2015/05/Appearance-Properties.png) -Appearance Properties - -Keyboard Shortcuts – Here you may edit and Modify Toggle key for Guage Visibility (default is F12). - -![Keyboard Shortcuts](http://www.tecmint.com/wp-content/uploads/2015/05/Keyboard-Shortcuts.png) -Keyboard Shortcuts - -Compatibility Setting – Perhaps you won’t need to edit it. - -![Compatibility Setting](http://www.tecmint.com/wp-content/uploads/2015/05/Compatibility-Setting.png) -Compatibility Setting - -### Conclusion ### - -This Project is not too young and not too old, hence has reached certain level of maturity and is quiet solid and works out of the box. For someone like me who need to switch between GUI and Console very often Guake is a boon. I don’t need to manage an extra window, open and close frequently, use tab among a huge pool of opened applications to find terminal or switch to different workspace to manage terminal now all I need is F12. - -I think this is a must tool for any Linux user who makes use of GUI and Console at the same time, equally. I am going to recommend it to anyone who want to work on a system where interaction between GUI and Console is smooth and hassle free. - -That’s all for now. Let us know if there is any problem in installing and running. We will be here to help you. Also tell us your’s experience about Guake. Provide us with your valuable feedback in the comments below. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-guake-terminal-ubuntu-mint-fedora/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/linux-terminal-emulators/ -[2]:https://github.com/Guake/guake/releases/tag/0.7.0 diff --git a/translated/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md b/translated/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md new file mode 100644 index 0000000000..a4a3609cf0 --- /dev/null +++ b/translated/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md @@ -0,0 +1,115 @@ +Guake 0.7.0 ѷ - һGnomeʽն +================================================================================ +LinuxáǿĶʹԣΪֺͼ͵ṩǿĹܡЩڷ¹ʶʵȤǣLinuxնLinus Torvald1991дںʱʵֵĵһ֮һ + +նǸǿĹߣûпƶIJ֣ʮֿɿն˽ڿ̨GUI֮䡣նΪһGUI滷¡նض滷ģͨõġTerminator, Konsole, Gnome-Terminal, Terminology, XFCE terminal, xtermЩõնģ + +Դлһʹ㷺նģб + +- [20 Useful Terminals for Linux][1] + +ǰʱżΪGuakegnomeնģⲢҵһGuakeʵϣڴԼһǰ֪Ӧó򣬵֪ôģʱûддGuakeٺұ㽥GuakeֱһGuakeԣգƪµˡҽ㽲GuakeĹܣDebianUbuntuFedoraϵİװԼһЩԡ + +#### ʲôGuake #### + +GuakeӦGnomeʽնˡҪPythonдʹһЩCGPL2+֤鷢LinuxԼƵϵͳGuakeԴڵϷQuake֮նˣQuakeնͨضĬΪF12Ļϻڰͬļȥ + +ֵעǣGuakeǵһӦáYakuakeYet Another KuakeһKDEնģTildaһGTK+дɵնģǵж֮»նˡ + +#### GuakeĹ #### + +- +- 򵥶 +- ڶ๦ +- ǿ +- ÿ +- ƽļGUI +- ڰԤļ/ʧ +- ֧ȼǩ͸ʹʺGnomeû +- ˵ؿ +- ɫĵɫ +- 趨͸ȵĿݷʽ +- ͨGuakeãʱһű +- ڶ + +Guake 0.7.0һЩԼᵽһЩܡİ汾ʷԴ[][2]ҵ + +### LinuxаװGuakeն ### + +ԴԴGuakeȤԴӴGuakeڰװǰб롣 + +ȻGuakeķаͨӶIJֿװǽDebianUbuntuLinux MintFedora°װGuake + +ȴӲֿȡµбĬϵIJֿⰲװGuakeʾ + + ---------------- On Debian, Ubuntu and Linux Mint ---------------- + $ sudo apt-get update + $ apt-get install guake + +---------- + + ---------------- On Fedora 19 Onwards ---------------- + # yum update + # yum install guake + +װ󣬿ԴһնGuake + + $ guake + +󣬱GnomeʹF12Ĭã»ϻնˡ + +dzƯ͸...ȥ......ȥ...ִһǩִȥ......ѳУ + +![Guake Terminal in Action](http://www.tecmint.com/wp-content/uploads/2015/05/Guake.png) +Guakeʵս + +ıֽڵɫGuakeɫЩԸııֽ͸Ȼ߸ıGuakeɫ + +һǽGuakeãÿ˵޸áͨӦò˵Guakeá + + $ guake --preferences + +![Guake Terminal Properties](http://www.tecmint.com/wp-content/uploads/2015/05/Guake-Properties.png) +Guakeն + + + +![Guake Scrolling Settings](http://www.tecmint.com/wp-content/uploads/2015/05/Guake-Scrolling.png) +Guake + + - ޸ɫͱɫԼ͸ȡ + +![Appearance Properties](http://www.tecmint.com/wp-content/uploads/2015/05/Appearance-Properties.png) + + +̿ݼ - ޸GuakeʾĿؿݼ + +![Keyboard Shortcuts](http://www.tecmint.com/wp-content/uploads/2015/05/Keyboard-Shortcuts.png) +̿ݼ + + - ϲ + +![Compatibility Setting](http://www.tecmint.com/wp-content/uploads/2015/05/Compatibility-Setting.png) + + +### ### + +Ŀ̫Ҳ̫ϣѾﵽһijȣ㹻ɿԿ伴áҪGUIն˼Ƶл˵GuakeһҲҪһĴڣƵĴ򿪺͹رգʹtabڴ򿪵ӦóѰն˻лͬĹնˣҪֻF12 + +ΪκͬʱʹGUIն˵Linuxû˵GuakeDZĹߡͬģһκҪϵͳнʹGUIն˵ƼΪƽûκϰ + +Ҫ˵ȫˡڰװʹʱκ⣬ңǻҲʹGuakeľ顣ľ顣޺ͷ԰ + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-guake-terminal-ubuntu-mint-fedora/ + +ߣ[Avishek Kumar][a] +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/linux-terminal-emulators/ +[2]:https://github.com/Guake/guake/releases/tag/0.7.0 From f240551dc0a506c4e2e8bd4a755a27d463e2ba4e Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Mon, 18 May 2015 13:47:46 +0800 Subject: [PATCH 0858/2517] [Translated] 20150123 How to make a file immutable on Linux.md --- ...3 How to make a file immutable on Linux.md | 74 ------------------- ...3 How to make a file immutable on Linux.md | 73 ++++++++++++++++++ 2 files changed, 73 insertions(+), 74 deletions(-) delete mode 100644 sources/tech/20150123 How to make a file immutable on Linux.md create mode 100755 translated/tech/20150123 How to make a file immutable on Linux.md diff --git a/sources/tech/20150123 How to make a file immutable on Linux.md b/sources/tech/20150123 How to make a file immutable on Linux.md deleted file mode 100644 index d6261cb3c1..0000000000 --- a/sources/tech/20150123 How to make a file immutable on Linux.md +++ /dev/null @@ -1,74 +0,0 @@ -Translating by goreliu ... - -How to make a file immutable on Linux -================================================================================ -Suppose you want to write-protect some important files on Linux, so that they cannot be deleted or tampered with by accident or otherwise. In other cases, you may want to prevent certain configuration files from being overwritten automatically by software. While changing their ownership or permission bits on the files by using chown or chmod is one way to deal with this situation, this is not a perfect solution as it cannot prevent any action done with root privilege. That is when chattr comes in handy. - -chattr is a Linux command which allows one to set or unset attributes on a file, which are separate from the standard (read, write, execute) file permission. A related command is lsattr which shows which attributes are set on a file. While file attributes managed by chattr and lsattr are originally supported by EXT file systems (EXT2/3/4) only, this feature is now available on many other native Linux file systems such as XFS, Btrfs, ReiserFS, etc. - -In this tutorial, I am going to demonstrate how to use chattr to make files immutable on Linux. - -chattr and lsattr commands are a part of e2fsprogs package which comes pre-installed on all modern Linux distributions. - -Basic syntax of chattr is as follows. - - $ chattr [-RVf] [operator][attribute(s)] files... - -The operator can be '+' (which adds selected attributes to attribute list), '-' (which removes selected attributes from attribute list), or '=' (which forces selected attributes only). - -Some of available attributes are the following. - -- **a**: can be opened in append mode only. -- **A**: do not update atime (file access time). -- **c**: automatically compressed when written to disk. -- **C**: turn off copy-on-write. -- **i**: set immutable. -- **s**: securely deleted with automatic zeroing. - -### Immutable Attribute ### - -To make a file immutable, you can add "immutable" attribute to the file as follows. For example, to write-protect /etc/passwd file: - - $ sudo chattr +i /etc/passwd - -Note that you must use root privilege to set or unset "immutable" attribute on a file. Now verify that "immutable" attribute is added to the file successfully. - - $ lsattr /etc/passwd - -Once the file is set immutable, this file is impervious to change for any user. Even the root cannot modify, remove, overwrite, move or rename the file. You will need to unset the immutable attribute before you can tamper with the file again. - -To unset the immutable attribute, use the following command: - - $ sudo chattr -i /etc/passwd - -![](https://farm9.staticflickr.com/8613/16152651317_076a65cf50_b.jpg) - -If you want to make a whole directory (e.g., /etc) including all its content immutable at once recursively, use "-R" option: - - $ sudo chattr -R +i /etc - -### Append Only Attribute ### - -Another useful attribute is "append-only" attribute which forces a file to grow only. You cannot overwrite or delete a file with "append-only" attribute set. This attribute can be useful when you want to prevent a log file from being cleared by accident. - -Similar to immutable attribute, you can turn a file into "append-only" mode by: - - $ sudo chattr +a /var/log/syslog - -Note that when you copy an immutable or append-only file to another file, those attributes will not be preserved on the newly created file. - -### Conclusion ### - -In this tutorial, I showed how to use chattr and lsattr commands to manage additional file attributes to prevent (accidental or otherwise) file tampering. Beware that you cannot rely on chattr as a security measure as one can easily undo immutability. One possible way to address this limitation is to restrict the availability of chattr command itself, or drop kernel capability CAP_LINUX_IMMUTABLE. For more details on chattr and available attributes, refer to its man page. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/make-file-immutable-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni diff --git a/translated/tech/20150123 How to make a file immutable on Linux.md b/translated/tech/20150123 How to make a file immutable on Linux.md new file mode 100755 index 0000000000..8c22e3a2b8 --- /dev/null +++ b/translated/tech/20150123 How to make a file immutable on Linux.md @@ -0,0 +1,73 @@ +如何在Linux下创建一个不可变更的文件 +================================================================================ + +假如你想对Linux中的一些重要文件做写保护,这样它们就不能被删除或者被篡改成之前的版本或者其他东西。或者在其他情况,你可能想避免某些配置文件被软件自动修改。使用`chown`和`chmod`命令修改文件的归属关系或者权限位是处理这种情况的一个解决方法,但这并不完美,因为这样无法避免有root权限的操作。这时`chattr`就派上用场了。 + +`chattr`是一个可以设置或取消文件的标志位的Linux命令,它和标准的文件权限(读、写、执行)是分离的。与此相关的另一个命令是`lsattr`,它可以显示文件的哪些标志位被设置上了。最初只有EXT文件系统(EXT2/3/4)支持`chattr`和`lsattr`所管理的标志位,但现在很多其他的本地Linux文件系统都支持了,比如XFS、Btrfs、ReiserFS等等。 + +在这个教程中,我会示范如果使用`chattr`来让Linux中的文件不可变更。 + +`chattr`和`lsattr`命令是e2fsprogs包的一部分,它在所有现代Linux发行版都预装了。 + +下面是`chattr`的基本语法。 + + $ chattr [-RVf] [操作符][标志位] 文件... + +其中操作符可以是“+”(把选定的标志位添加到标志位列表)、“-”(从标志位列表中移除选定的标志位)、或者“=”(强制使用选定的标志位)。 + +下面是一些可用的标志位。 + +- **a**: 只能以追加模式打开。 +- **A**: 不能更新atime(文件访问时间)。 +- **c**: 当被写入磁盘时被自动压缩。 +- **C**: 关掉“写时复制”。 +- **i**: 不可变更。 +- **s**: 通过自动归零来安全删除。(译注:一般情况文件被删后内容不会被修改,改标志位会使得文件被删后原有内容被0取代) + +### “不可变更”标志位 ### + +为了让一个文件不可变更,你需要按照如下方法为这个文件添加“不可变更”标志位。例如,对/etc/passwd文件做写保护: + + $ sudo chattr +i /etc/passwd + +注意设置或取消一个文件的“不可变更”标志位是需要根用户权限的。现在检查该文件“不可变更”标志位是否被添加上了。 + + $ lsattr /etc/passwd + +一旦文件被设置为不可变更,任何用户都将无法修改该文件。即使是根用户也不可以修改、删除、覆盖、移动或者重命名这个文件。如果你想再次修改这个文件,需要先把“不可变更”标志位取消了。 + +用如下命令取消“不可变更”标志位: + + $ sudo chattr -i /etc/passwd + +![](https://farm9.staticflickr.com/8613/16152651317_076a65cf50_b.jpg) + +如果你想让一个目录(比如/etc)连同它下边的所有内容不可变更,使用“-R”选项: + + $ sudo chattr -R +i /etc + +### “只可追加”标志位 ### + +另一个有用的的标志位是“只可追加”,它只允许文件内容被追加的方式修改。你不能覆盖或者删除一个设置了“只可追加”标志位的文件。这个标志位在你想避免日志文件被意外清理掉的情况很有用。 + +和“不可变更”标志位类似,你可以使用如下命令让文件变成“只可追加”模式: + + $ sudo chattr +a /var/log/syslog + +注意当你复制一个“不可变更”或者“只可追加”的文件到其他地方后,新文件不会保留这些标志位。 + +### 结论 ### + +在这个教程中,我展示了如何使用`chattr`和`lsattr`命令来管理额外的文件标志位,来避免文件被篡改(意外或者其他情况)的方法。注意你不能将`chattr`作为一个安全措施,因为“不可变更”标志位可以很容易被取消掉。解决这个问题的一个可能的方式是限制`chattr`命令自身的可用性,或者剥夺CAP_LINUX_IMMUTABLE内核权能标志。关于`chattr`以及可用的标志位的更多细节,请参考它的man手册。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/make-file-immutable-linux.html + +作者:[Dan Nanni][a] +译者:[goreliu](https://github.com/goreliu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni From 98b56111a668ba6ce10e614c30c9d8f6d22f65e9 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Mon, 18 May 2015 13:49:09 +0800 Subject: [PATCH 0859/2517] chmod 644 20150123 How to make a file immutable on Linux.md --- translated/tech/20150123 How to make a file immutable on Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 translated/tech/20150123 How to make a file immutable on Linux.md diff --git a/translated/tech/20150123 How to make a file immutable on Linux.md b/translated/tech/20150123 How to make a file immutable on Linux.md old mode 100755 new mode 100644 From 4fea50a0257e590378033099f113cf1f4d4fbd95 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Mon, 18 May 2015 15:07:13 +0800 Subject: [PATCH 0860/2517] translated by KayGuoWhu --- ...oid Apps on Ubuntu using ARChon Runtime.md | 68 +++++++++---------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md index 0f7a2d20aa..4995eec9d1 100644 --- a/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md +++ b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md @@ -1,48 +1,46 @@ -[translating by KayGuoWhu] -Enjoy Android Apps on Ubuntu using ARChon Runtime +使用ARChon环境在Ubuntu上运行Android应用 ================================================================================ -Before, we gave try to many android app emulating tools like Genymotion, Virtualbox, Android SDK, etc to try to run android apps on it. But, with this new Chrome Android Runtime, we are able to run Android Apps on our Chrome Browser. So, here are the steps we'll need to follow to install Android Apps on Ubuntu using ARChon Runtime. +在此之前,我们尝试过在多款安卓应用模拟器工具上运行安卓应用,比如Genymotion、VirtualBox和Android SDK等。但是,有了这套全新的Chrome安卓运行环境,就可以在Chrome浏览器中运行安卓应用了。所以,下面是一些步骤来指导如何使用ARChon运行环境在Ubuntu上安装安卓应用。 -Google had [announced the first set of Android apps is ready to run natively on Chrome OS][1], a feature made possible using a new ‘**Android Runtime**’ extension. Now, a developer named Vlad Filippov has figured out a way to bring Android Apps to Chrome on the desktop. His chromeos-apk script and ARChon Android Runtime extension work hand-in-hand to bring Android apps to Chrome browser on the Windows, Mac and Linux desktop. +谷歌已经公布了[首批支持原生运行在Chrome OS的安卓应用][1],而使用一个全新的“**安卓运行环境**”扩展程序使其成为可能。如今,一位名为Vlad Filippov的开发者已经找到了一种把安卓应用移植到桌面端Chrome浏览器的方法。他把chromeos-apk脚本和ARChon安卓运行环境扩展程序两者紧密结合在一起,使得安卓应用可以运行在Windows、Max和Linux系统的桌面端Chrome浏览器中。 -Performance of this apps through the runtime is not pretty good. Similarly, as its both an unofficial repackaging of the official runtime and running outside of Google's Chrome OS, system integration like webcam, speakers, etc. may be patchy or non-existent. +应用借助这种运行环境时的性能并不是很好。同样,由于它是官方运行环境的非官方二次开发包,而且运行在Google的Chrome OS之外,因此一些如webcam和speaker等系统集成工具可能需要通过打补丁获得或者根本就没有。 -### Installing Chrome ### +### 安装Chrome ### -First of all, we'll need Chrome installed in our machine, Chrome version 37 or higher is required. We can download them from the [download page of Chrome Browser][2]. +首先,需要在机器上安装Chrome,版本要求是Chrome 37或者更高。可以从[Chrome浏览器的下载页面][2]下载。 -If you wanna install a Dev Channel version you'll need to follow below procedure. +如果打算安装Dev Channel版本,按照如下操作。 -We'll need to add repository source list for Google Chrome which can be done my using the following command. +首先,使用这个命令为Google Chrome添加软件源列表: $ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - $ sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' ![Adding google source list](http://blog.linoxide.com/wp-content/uploads/2015/02/adding-google-source-list.png) -After adding the repository source list, we'll need to update the local repository index by the command below. +添加完软件源列表后,使用下列命令更新本地的软件库索引。 $ sudo apt-get update -Now, we'll gonna install google chrome unstable which is dev version. - +现在,就可以安装非稳定版的google chrome,即开发版。 $ sudo apt-get install google-chrome-unstable ![Installing Google chrome unstable](http://blog.linoxide.com/wp-content/uploads/2015/02/installing-google-chrome-unstable.png) -### Installing Archon Runtime ### +### 安装Archon运行时环境 ### -Next we'll need to download the custom-made ergo officially not endorsed by Google or Chromium Android Runtime created by Vlad Filippov. This differs from the official version in a number of ways, the chief being it can be used on desktop versions of the browser. Here below is the runtime we need to download, please select anyone of the following according to your bit of Ubuntu installed. +接下来,需要下载定制版的运行环境安装包,因为官方版本不被Google或Vlad Filippov创建的Chromium安卓运行环境认可。它在很多方面有别于官方版本,主要区别是它可以用于Google浏览器的各个桌面端。下面是需要下载的运行环境安装包,请根据所安装的Ubuntu系统位数选择下列的一种。 -For **32-bit** Ubuntu Distributions: +**32位** Ubntu发行版: - [Download Archron for 32-bit Ubuntu][3] -For **64-bit** Ubuntu Distributions: +**64位** Ubntu发行版: - [Download Archron for 64-bit Ubuntu][4] -Once the runtime has fully downloaded you will need to extract the contents from the .zip files and move the resulting directory to Home. Here is the gist commands for this steps to download and extract the contents. +下载好运行环境安装包后,从.zip文件中解压,并将解压得到的目录移动到Home目录。操作命令如下: $ wget https://github.com/vladikoff/chromeos-apk/releases/download/v3.0.0/ARChon-v1.1-x86_32.zip @@ -50,58 +48,58 @@ Once the runtime has fully downloaded you will need to extract the contents from $ unzip ARChon-v1.1-x86_32.zip ~/ -Now to install the runtime, we'll gonna Open our latest Google Chrome and goto the url **chrome://extensions/** then, we'll need to check ‘**Enable developer mode**’. Finally, we'll gonna click on the ‘**load unpacked extension**’ button and select the folder which was placed into **~/Home**. +接下来是安装运行时环境,首先打开Google Chrome浏览器,在地址栏键入**chrome://extensions**。然后,选中“**开发者模式**”。最后,点击“**载入未打包扩展程序**”,选择刚才放置在**~/Home**下面的文件夹。 -### Installing ChromeOS-APK ### +### 安装 ChromeOS-APK ### -To convert APKs manually is something you really don’t need to do any more if you use one of the apps mentioned above — you will need to install the ‘[chromeos-apk][5]’ command line JavaScript utility. This is available to install through the Node Packaged Modules (npm) manager. To install nmp and chromeos-apk, we'll need to run the following command in a shell or terminal. +如果要用到上面提到的应用,那么手动转换这些APKs无需复杂的操作——只需要安装“[chromeos-apk][5]”命令行JavaScript工具。可以在Node Package Modules(npm)管理器中安装它。为了安装npm和chromeos-apk,在shell或终端中运行下面命令: $ sudo apt-get install npm nodejs nodejs-legacy -**If you are running 64 bit OS**, you should grab the following library, to do so run the below commands in a shell or terminal. +如果**操作系统是64位**,需要安装下面这个库,命令如下: $ sudo apt-get install lib32stdc++6 -Now run the command to install the the latest chromeos-apk is: +然后,运行这条命令来安装最新的chromeos-apk: $ npm install -g chromeos-apk@latest ![chromeos apk installation](http://blog.linoxide.com/wp-content/uploads/2015/02/chomeos-apk-installation.png) -Depending on your system configuration you may need to need to run this latter command as sudo. +取决于系统配置,可能需要以sudo权限运行后一条命令。 -Now, we'll gonna for Google to find an APK of an app to give it a try, bearing in mind **not all Android apps will work**, and those that do may be unstable or lack features. Most of the messenger out of the box are not working. +现在,我们将找一个应用程序的APK来在Google浏览器上试一试,但务必牢记**并非所有的安卓应用都可以**,有一些可能不稳定或者缺少某些特性。大部分安装即用的通讯类应用都不适用这个环境。 -### Converting APK ### +### 转换APK ### -Place your **Android APK in ~/Home**, then return to **Terminal** to convert it using the following command: +将**安卓APK放到~/Home**下,然后在**终端**执行下列命令进行转换: $ chromeos-apk myapp.apk --archon -If you want the app in fullscreen mode then run the following instead: +如果想以全屏模式运行应用,请替换成这条命令: $ chromeos-apk myapp.apk --archon --tablet -Note: Please replace myapp.apk to the Android APK app filename you want to convert. +注意:请将myapp.apk替换成待转换的安卓APK应用的文件名。 -For our ease, we can also use [Twerk][6] for the conversion process if we want to skip this step. +为了方便,也可以使用[Twerk][6]来进行转换,这样可以跳过这一步。 -### Running Android Apk ### +### 运行安卓Apk ### -Finally, we'll need to open our chrome browser and then goto chrome://extensions page and enable developer mode then tap the ‘load unpacked extension’ button and select the folder the script above created. +最后,打开chrome浏览器,然后进入chrome://extensions页面,勾选开发者模式。点击“载入未打包扩展程序”按钮,选择文件夹载入刚创建的脚本。 -Now, we can Open the Chrome App Launcher to run it. +至此,就可以打开Chrome应用启动器运行安卓应用了。 -### Conclusion ### +### 总结 ### -Hurray! We have successfully installed Android Apk App in our favorite desktop browser ie Chrome Browser. This article is all about the popular Chrome Android Runtime called Archon created by Vlad Filippov. This runtime allows us to run converted Apk files in our Chrome browser. It has not yet supported messaging apps like Whatsapp, etc. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Archon :-) +万岁!我们已经成功在Chrome浏览器中安装好安卓Apk应用程序了。这篇文章是关于一款由Vlad Filippov开发的、名为Archon的、时下流行的Chrome安卓运行环境。这个运行环境使用户在Chrome浏览器中运行转换过的Apk文件。目前它还不支持通讯类应用,诸如Whatsapp。因此,如果你有任何问题、建议和反馈,请在下面的评论框中写出来。非常感谢!去拥抱Archon吧!:-) -------------------------------------------------------------------------------- via: http://linoxide.com/ubuntu-how-to/android-apps-ubuntu-archon-runtime/ 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[KayGuoWhu](https://github.com/KayGuoWhu) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b9b3c8df4bfb903e0b65a8a390729fc704640bc0 Mon Sep 17 00:00:00 2001 From: wwy Date: Mon, 18 May 2015 15:29:14 +0800 Subject: [PATCH 0861/2517] [Translating] 20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md --- ...w to Serve Git Repositories Using Gitblit Tool in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md b/sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md index 806a462675..aebd06f535 100644 --- a/sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md +++ b/sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md @@ -1,3 +1,5 @@ +translating by wwy-hust + How to Serve Git Repositories Using Gitblit Tool in Linux ================================================================================ Hi friends, today we'll be learning how to install Gitblit in your Linux Server or PC. So, lets check out what is a Git, its features and steps to install Gitblit. [Git is a distributed revision control system][1] with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. It was initially designed and developed by Linus Torvalds for Linux kernel under the terms of the GNU General Public License version 2 development in 2005, and has since become the most widely adopted version control system for software development. @@ -98,4 +100,4 @@ via: http://linoxide.com/linux-how-to/serve-git-repositories-gitblit/ [a]:http://linoxide.com/author/arunp/ [1]:http://git-scm.com/ -[2]:http://gitblit.com/ \ No newline at end of file +[2]:http://gitblit.com/ From e49ed47aac658ea8551b5845da49a2d67f4229f0 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 18 May 2015 15:56:45 +0800 Subject: [PATCH 0862/2517] =?UTF-8?q?20150518-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... How to set up a Replica Set on MongoDB.md | 182 ++++++++++++++++++ ...pecific user agents on nginx web server.md | 114 +++++++++++ ...ror with 'apt-get update' on old Ubuntu.md | 45 +++++ ...h no Package--header' error on Raspbian.md | 31 +++ ...m_modules.h--No such file or directory'.md | 33 ++++ ...w to view threads of a process on Linux.md | 57 ++++++ ... the Apache error log location on Linux.md | 81 ++++++++ 7 files changed, 543 insertions(+) create mode 100644 sources/tech/20150518 How to set up a Replica Set on MongoDB.md create mode 100644 sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md create mode 100644 sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md create mode 100644 sources/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md create mode 100644 sources/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md create mode 100644 sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md create mode 100644 sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md diff --git a/sources/tech/20150518 How to set up a Replica Set on MongoDB.md b/sources/tech/20150518 How to set up a Replica Set on MongoDB.md new file mode 100644 index 0000000000..07e16dafc1 --- /dev/null +++ b/sources/tech/20150518 How to set up a Replica Set on MongoDB.md @@ -0,0 +1,182 @@ +How to set up a Replica Set on MongoDB +================================================================================ +MongoDB has become the most famous NoSQL database on the market. MongoDB is document-oriented, and its scheme-free design makes it a really attractive solution for all kinds of web applications. One of the features that I like the most is Replica Set, where multiple copies of the same data set are maintained by a group of mongod nodes for redundancy and high availability. + +This tutorial describes how to configure a Replica Set on MonoDB. + +The most common configuration for a Replica Set involves one primary and multiple secondary nodes. The replication will then be initiated from the primary toward the secondaries. Replica Sets can not only provide database protection against unexpected hardware failure and service downtime, but also improve read throughput of database clients as they can be configured to read from different nodes. + +### Set up the Environment ### + +In this tutorial, we are going to set up a Replica Set with one primary and two secondary nodes. + +![](https://farm8.staticflickr.com/7667/17801038505_529a5224a1.jpg) + +In order to implement this lab, we will use three virtual machines (VMs) running on VirtualBox. I am going to install Ubuntu 14.04 on the VMs, and install official packages for Mongodb. + +I am going to set up a necessary environment on one VM instance, and then clone it to the other two VM instances. Thus pick one VM named master, and perform the following installations. + +First, we need to add the MongoDB key for apt: + + $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 + +Then we need to add the official MongoDB repository to our source.list: + + $ sudo su + # echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list + +Let's update repositories and install MongoDB. + + $ sudo apt-get update + $ sudo apt-get install -y mongodb-org + +Now let's make some changes in /etc/mongodb.conf. + + auth = true + dbpath=/var/lib/mongodb + logpath=/var/log/mongodb/mongod.log + logappend=true + keyFile=/var/lib/mongodb/keyFile + replSet=myReplica + +The first line is to make sure that we are going to have authentication on our database. keyFile is to set up a keyfile that is going to be used by MongoDB to replicate between nodes. replSet sets up the name of our replica set. + +Now we are going to create our keyfile, so that it can be in all our instances. + + $ echo -n "MyRandomStringForReplicaSet" | md5sum > keyFile + +This will create keyfile that contains a MD5 string, but it has some noise that we need to clean up before using it in MongoDB. Use the following command to clean it up: + + $ echo -n "MyReplicaSetKey" | md5sum|grep -o "[0-9a-z]\+" > keyFile + +What grep command does is to print MD5 string with no spaces or other characters that we don't want. + +Now we are going to make the keyfile ready for use: + + $ sudo cp keyFile /var/lib/mongodb + $ sudo chown mongodb:nogroup keyFile + $ sudo chmod 400 keyFile + +Now we have our Ubuntu VM ready to be cloned. Power it off, and clone it to the other VMs. + +![](https://farm9.staticflickr.com/8729/17800903865_9876a9cc9c.jpg) + +I name the cloned VMs secondary1 and secondary2. Make sure to reinitialize the MAC address of cloned VMs and clone full disks. + +![](https://farm6.staticflickr.com/5333/17613392900_6de45c9450.jpg) + +All three VM instances should be on the same network to communicate with each other. For this, we are going to attach all three VMs to "Internet Network". + +It is recommended that each VM instances be assigned a static IP address, as opposed to DHCP IP address, so that the VMs will not lose connectivity among themselves when a DHCP server assigns different IP addresses to them. + +Let's edit /etc/networks/interfaces of each VM as follows. + +On primary: + + auto eth1 + iface eth1 inet static + address 192.168.50.2 + netmask 255.255.255.0 + +On secondary1: + + auto eth1 + iface eth1 inet static + address 192.168.50.3 + netmask 255.255.255.0 + +On secondary2: + + auto eth1 + iface eth1 inet static + address 192.168.50.4 + netmask 255.255.255.0 + +Another file that needs to be set up is /etc/hosts, because we don't have DNS. We need to set the hostnames in /etc/hosts. + +On primary: + + 127.0.0.1 localhost primary + 192.168.50.2 primary + 192.168.50.3 secondary1 + 192.168.50.4 secondary2 + +On secondary1: + + 127.0.0.1 localhost secondary1 + 192.168.50.2 primary + 192.168.50.3 secondary1 + 192.168.50.4 secondary2 + +On secondary2: + + 127.0.0.1 localhost secondary2 + 192.168.50.2 primary + 192.168.50.3 secondary1 + 192.168.50.4 secondary2 + +Check connectivity among themselves by using ping command: + + $ ping primary + $ ping secondary1 + $ ping secondary2 + +### Set up a Replica Set ### + +After verifying connectivity among VMs, we can go ahead and create the admin user so that we can start working on the Replica Set. + +On primary node, open /etc/mongodb.conf, and comment out two lines that start with auth and replSet: + + dbpath=/var/lib/mongodb + logpath=/var/log/mongodb/mongod.log + logappend=true + #auth = true + keyFile=/var/lib/mongodb/keyFile + #replSet=myReplica + +Restart mongod daemon. + + $ sudo service mongod restart + +Create an admin user after conencting to MongoDB: + + > use admin + > db.createUser({ + user:"admin", + pwd:" + }) + $ sudo service mongod restart + +Connect to MongoDB and use these commands to add secondary1 and secondary2 to our Replicat Set. + + > use admin + > db.auth("admin","myreallyhardpassword") + > rs.initiate() + > rs.add ("secondary1:27017") + > rs.add("secondary2:27017") + +Now that we have our Replica Set, we can start working on our project. Consult the [official driver documentation][1] to see how to connect to a Replica Set. In case you want to query from shell, you have to connect to primary instance to insert or query the database. Secondary nodes will not let you do that. If you attempt to access the database on a secondary node, you will get this error message: + + myReplica:SECONDARY> + myReplica:SECONDARY> show databases + 2015-05-10T03:09:24.131+0000 E QUERY Error: listDatabases failed:{ "note" : "from execCommand", "ok" : 0, "errmsg" : "not master" } + at Error () + at Mongo.getDBs (src/mongo/shell/mongo.js:47:15) + at shellHelper.show (src/mongo/shell/utils.js:630:33) + at shellHelper (src/mongo/shell/utils.js:524:36) + at (shellhelp2):1:1 at src/mongo/shell/mongo.js:47 + +I hope you find this tutorial useful. You can use Vagrant to automate your local environments and help you code faster. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/setup-replica-set-mongodb.html + +作者:[Christopher Valerio][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/valerio +[1]:http://docs.mongodb.org/ecosystem/drivers/ \ No newline at end of file diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md b/sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md new file mode 100644 index 0000000000..6ea8ae3b06 --- /dev/null +++ b/sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md @@ -0,0 +1,114 @@ +Linux FAQs with Answers--How to block specific user agents on nginx web server +================================================================================ +> **Question**: I notice that some robots often visit my nginx-powered website and scan it aggressively, ending up wasting a lot of my web server resources. I am trying to block those robots based on their user-agent string. How can I block specific user agent(s) on nginx web server? + +The modern Internet is infested with various malicious robots and crawlers such as malware bots, spambots or content scrapers which are scanning your website in surreptitious ways, for example to detect potential website vulnerabilities, harvest email addresses, or just to steal content from your website. Many of these robots can be identified by their signature "user-agent" string. + +As a first line of defense, you could try to block malicious bots from accessing your website by blacklisting their user-agents in robots.txt file. However, unfortunately this works only for "well-behaving" robots which are designed to obey robots.txt. Many malicious bots can simply ignore robots.txt and scan your website at will. + +An alternative way to block particular robots is to configure your web server, such that it refuses to serve content to requests with certain user-agent strings. This post explains how to **block certain user-agent on nginx web server**. + +### Blacklist Certain User-Agents in Nginx ### + +To configure user-agent block list, open the nginx configuration file of your website, where the server section is defined. This file can be found in different places depending on your nginx setup or Linux distribution (e.g., /etc/nginx/nginx.conf, /etc/nginx/sites-enabled/, /usr/local/nginx/conf/nginx.conf, /etc/nginx/conf.d/). + + server { + listen 80 default_server; + server_name xmodulo.com; + root /usr/share/nginx/html; + + .... + } + +Once you open the config file with the server section, add the following if statement(s) somewhere inside the section. + + server { + listen 80 default_server; + server_name xmodulo.com; + root /usr/share/nginx/html; + + # case sensitive matching + if ($http_user_agent ~ (Antivirx|Arian) { + return 403; + } + + # case insensitive matching + if ($http_user_agent ~* (netcrawl|npbot|malicious)) { + return 403; + } + + .... + } + +As you can guess, these if statements match any bad user-string with regular expressions, and return 403 HTTP status code when a match is found. $http_user_agent is a variable that contains the user-agent string of an HTTP request. The '~' operator does case-sensitive matching against user-agent string, while the '~' operator does case-insensitive matching. The '|' operator is logical-OR, so you can put as many user-agent keywords in the if statements, and block them all. + +After modifying the configuration file, you must reload nginx to activate the blocking: + + $ sudo /path/to/nginx -s reload + +You can test user-agent blocking by using wget with "--user-agent" option. + + $ wget --user-agent "malicious bot" http:// + +![](https://farm6.staticflickr.com/5333/17434036358_ef139a6b59_b.jpg) + +### Manage User-Agent Blacklist in Nginx ### + +So far, I have shown how to block HTTP requests with a few user-agents in nginx. What if you have many different types of crawling bots to block? + +Since the user-agent blacklist can grow very big, it is not a good idea to put them all inside your nginx's server section. Instead, you can create a separate file which lists all blocked user agents. For example, let's create /etc/nginx/useragent.rules, and define a map with all blocked user agents in the following format. + + $ sudo vi /etc/nginx/useragent.rules + +---------- + + map $http_user_agent $badagent { + default 0; + ~*malicious 1; + ~*backdoor 1; + ~*netcrawler 1; + ~Antivirx 1; + ~Arian 1; + ~webbandit 1; + } + +Similar to the earlier setup, '~*' will match a keyword in case-insensitive manner, while '~' will match a keyword using a case-sensitive regular expression. The line that says "default 0" means that any other user-agent not listed in the file will be allowed. + +Next, open an nginx configuration file of your website, which contains http section, and add the following line somewhere inside the http section. + + http { + ..... + include /etc/nginx/useragent.rules + } + +Note that this include statement must appear before the server section (this is why we add it inside http section). + +Now open an nginx configuration where your server section is defined, and add the following if statement: + + server { + .... + + if ($badagent) { + return 403; + } + + .... + } + +Finally, reload nginx. + + $ sudo /path/to/nginx -s reload + +Now any user-agent which contains a keyword listed in /etc/nginx/useragent.rules will be automatically banned by nginx. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/block-specific-user-agents-nginx-web-server.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://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md b/sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md new file mode 100644 index 0000000000..a5f150d3eb --- /dev/null +++ b/sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md @@ -0,0 +1,45 @@ +Linux FAQs with Answers--How to fix “404 Not Found” error with “apt-get update” on old Ubuntu +================================================================================ +> **Question**: I have old Ubuntu 13.04 (Raring Ringtail) installation on my PC. When I run "sudo apt-get update" on it, it throws a bunch of "404 Not Found" errors, and I cannot install or update any package using apt-get or aptitude. Due to this error I cannot even upgrade it to a newer release. How can I fix this problem? + +![](https://farm6.staticflickr.com/5460/17634085636_996b2a8ab5_b.jpg) + +Every Ubuntu release has its end-of-life (EOL) time; regular Ubuntu releases are supported for 18 months, while LTS (Long Term Support) versions are supported up to 3 years (server edition) and 5 years (desktop edition). Once a Ubuntu release has reached EOL, its repositories will no longer be accessible, and you won't get any maintenance updates and security patches from Canonical. As of this writing, Ubuntu 13.04 (Raring Ringtail) has already reached EOL. + +If the Ubuntu system you are using is EOL-ed, you will get the following 404 errors from apt-get or aptitude as its repositories have been deprecated. + + W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/raring-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.13 80] + + W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found + + W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/binary-i386/Packages 404 Not Found [IP: 91.189.88.149 80] + + E: Some index files failed to download. They have been ignored, or old ones used instead + +For those users who are using old versions of Ubuntu, Canonical maintains old-releases.ubuntu.com, which is an archive of EOL-ed repositories. Thus, when Canonical's support for your Ubuntu installation ends, you need to switch to repositories at old-releases.ubuntu.com (unless you want to upgrade it before EOL). + +Here is a quick way to fix "404 Not Found" errors on old Ubuntu by switching to old-releases repositories. + +First, replace main/security repositories with old-releases versions as follows. + + $ sudo sed -i -r 's/([a-z]{2}\.)?archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list + $ sudo sed -i -r 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list + +Then open /etc/apt/sources.list with a text editor, and look for extras.ubuntu.com. This repository is also no longer supported for 13.04. So you need to comment out extras.ubuntu.com by prepending '#' sign. + + #deb http://extras.ubuntu.com/ubuntu raring main + #deb-src http://extras.ubuntu.com/ubuntu raring main + +Now you should be able to install or update packages on an old unsupported Ubuntu release. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/404-not-found-error-apt-get-update-ubuntu.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://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md b/sources/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md new file mode 100644 index 0000000000..f79090e1da --- /dev/null +++ b/sources/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md @@ -0,0 +1,31 @@ +Linux FAQs with Answers--How to fix “Encountered a section with no Package: header” error on Raspbian +================================================================================ +> **Question**: I installed fresh Rasbian on Raspberry Pi. But when I tried to update APT package index by running sudo apt-get update, it throws the following error: + + E: Encountered a section with no Package: header + E: Problem with MergeList /var/lib/dpkg/status + E: The package lists or status file could not be parsed or opened. + +> I then cannot install any package on Raspbian. How can I solve this error? + +![](https://farm8.staticflickr.com/7704/17445484636_05ba81722f_c.jpg) + +The error saying "Problem with MergeList /var/lib/dpkg/status" indicates that the status file got corrupted for some reason, and so cannot be parsed. This status file contains information about installed deb packages, and thus needs to be carefully backed up. + +In this case, since this is freshly installed Raspbian, you can safely remove the status file, and re-generate it as follows. + + $ sudo rm /var/lib/dpkg/status + $ sudo touch /var/lib/dpkg/status + $ sudo apt-get update + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/encountered-section-with-no-package-header-error.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://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md b/sources/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md new file mode 100644 index 0000000000..55c17e1669 --- /dev/null +++ b/sources/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md @@ -0,0 +1,33 @@ +Linux FAQs with Answers--How to fix “fatal error: security/pam_modules.h: No such file or directory” +================================================================================ +> **Question**: I was trying to compile a program on [insert your Linux distro], but was getting the following compile error: +> +> "pam_otpw.c:27:34: fatal error: security/pam_modules.h: No such file or directory" +> +> How can I fix this error? + +The missing header file 'security/pam_modules.h' is part of development files for libpam, a PAM (Pluggable Authentication Modules) library. Thus to fix this error, you need to install libpam development package, as described below. + +On Debian, Ubuntu or Linux Mint: + + $ sudo apt-get install libpam0g-dev + +On CentOS, Fedora or RHEL: + + $ sudo yum install gcc pam-devel + +Now verify that the missing header file is installed under /usr/include/security. + +![](https://farm8.staticflickr.com/7751/16819069693_fa961f0d40_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/fatal-error-security-pam-modules.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://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md b/sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md new file mode 100644 index 0000000000..9bb7bc0b9f --- /dev/null +++ b/sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md @@ -0,0 +1,57 @@ +Linux FAQs with Answers--How to view threads of a process on Linux +================================================================================ +> **Question**: My program creates and executes multiple threads in it. How can I monitor individual threads of the program once they are created? I would like to see the details (e.g., CPU/memory usage) of individual threads with their names. + +Threads are a popular programming abstraction for parallel execution on modern operating systems. When threads are forked inside a program for multiple flows of execution, these threads share certain resources (e.g., memory address space, open files) among themselves to minimize forking overhead and avoid expensive IPC (inter-process communication) channel. These properties make threads an efficient mechanism for concurrent execution. + +In Linux, threads (also called Lightweight Processes (LWP)) created within a program will have the same "thread group ID" as the program's PID. Each thread will then have its own thread ID (TID). To the Linux kernel's scheduler, threads are nothing more than standard processes which happen to share certain resources. Classic command-line tools such as ps or top, which display process-level information by default, can be instructed to display thread-level information. + +Here are several ways to **show threads for a process on Linux**. + +### Method One: PS ### + +In ps command, "-T" option enables thread views. The following command list all threads created by a process with . + + $ ps -T -p + +![](https://farm8.staticflickr.com/7749/17350561110_94cacfc456_c.jpg) + +The "SID" column represents thread IDs, and "CMD" column shows thread names. + +### Method Two: Top ### + +The top command can show a real-time view of individual threads. To enable thread views in the top output, invoke top with "-H" option. This will list all Linux threads. You can also toggle on or off thread view mode while top is running, by pressing 'H' key. + + $ top -H + +![](https://farm9.staticflickr.com/8824/17350561070_3dfe447974_c.jpg) + +To restrict the top output to a particular process and check all threads running inside the process: + + $ top -H -p + +![](https://farm8.staticflickr.com/7797/17538002751_c8a3d574d8_c.jpg) + +### Method Three: Htop ### + +A more user-friendly way to view threads per process is via htop, an ncurses-based interactive process viewer. This program allows you to monitor individual threads in tree views. + +To enable thread views in htop, launch htop, and press to enter htop setup menu. Choose "Display option" under "Setup" column, and toggle on "Three view" and "Show custom thread names" options. Presss to exit the setup. + +![](https://farm6.staticflickr.com/5338/17350364568_59bce22e7b_b.jpg) + +Now you will see the follow threaded view of individual processes. + +![](https://farm9.staticflickr.com/8885/17350560930_98952d5350_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/view-threads-process-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://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md b/sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md new file mode 100644 index 0000000000..946094a532 --- /dev/null +++ b/sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md @@ -0,0 +1,81 @@ +Linux FAQs with Answers--What is the Apache error log location on Linux +================================================================================ +> **Question**: I am trying to troubleshoot Apache web server errors on my Linux system. Where is the Apache error log file located on [insert your Linux distro]? + +Error log and access log files are a useful piece of information for system admins, for example to troubleshoot their web server, [protect][1] it from various malicious activities, or just to run [various][2] [analytics][3] for HTTP server monitoring. Depending on your web server setup, its error/access logs may be found in different places on your system. + +This post may help you **find Apache error log location on Linux**. + +![](https://farm8.staticflickr.com/7664/16958522954_4852ab5ea5_c.jpg) + +### Apache Error Log Location on Debian, Ubuntu or Linux Mint ### + +#### Default Error Log #### + +On Debian-based Linux, the system-wide default location of Apache error log is **/var/log/apache2/error.log**. The default location can be customized by editing Apache configuration file. + +#### Custom Error Log #### + +To find a custom error log location, open /etc/apache2/apache2.conf with a text editor, and look for a line that starts with ErrorLog. This line specifies a custom location of Apache error log file. For example, the unmodified Apache configuration file has the following line: + + ErrorLog ${APACHE_LOG_DIR}/error.log + +In this case, the location is configured using APACHE_LOG_DIR environment variable, which is defined in /etc/apache2/envvars. + + export APACHE_LOG_DIR=/var/log/apache2$SUFFIX + +In reality, ErrorLog may point to any arbitrary path on your Linux system. + +#### Custom Error Log with VirtualHost #### + +If VirtualHost is used in Apache web server, ErrorLog directive can be specified within VirtualHost container, in which case the system-wide error log location described above will be ignored. + +With VirtualHost enabled, each VirtualHost can define its own custom error log location. To find out the error log location of a particular VirtualHost, you can open /etc/apache2/sites-enabled/.conf, and look for ErrorLog directive, which will show a site-specific error log file. + +### Apache Error Log Location on CentOS, Fedora or RHEL ### + +#### Default Error Log #### + +On Red Hat based Linux, a system-wide Apache error log file is by default placed in **/var/log/httpd/error_log**. This default location can be customized by editing Apache configuration file. + +#### Custom Error Log #### + +To find out the custom location of Apache error log, open /etc/httpd/conf/httpd.conf with a text editor, and look for ServerRoot, which shows the top of the Apache server directory tree, under which log files and configurations are located. For example: + + ServerRoot "/etc/httpd" + +Now look for a line that starts with ErrorLog, which indicates where Apache web server is writing its error logs. Note that the specified location is relative to the ServerRoot value. For example: + + ErrorLog "log/error_log" + +Combine the above two directives to obtain the full path of an error log, which is by default /etc/httpd/logs/error_log. This is a symlink to /var/log/httpd/error_log with freshly installed Apache. + +In reality, ErrorLog may point to any arbitrary location on your Linux system. + +#### Custom Error Log with VirtualHost #### + +If you enabled VirtualHost, you can find the error log location of individual VirtualHosts by checking /etc/httpd/conf/httpd.conf (or any file where VirtualHost is defined). Look for ErrorLog inside individual VirtualHost sections. For example, in the following VirtualHost section, an error log is found in /var/www/xmodulo.com/logs/error_log. + + + ServerAdmin webmaster@xmodulo.com + DocumentRoot /var/www/xmodulo.com/public_html + ServerName www.xmodulo.com + ServerAlias xmodulo.com + ErrorLog /var/www/xmodulo.com/logs/error_log + CustomLog /var/www/xmodulo.com/logs/access_log + + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/apache-error-log-location-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://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/configure-fail2ban-apache-http-server.html +[2]:http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html +[3]:http://xmodulo.com/sql-queries-apache-log-files-linux.html \ No newline at end of file From e79f29cffc4b414bc41334fd5c8131695cfdfd23 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 18 May 2015 16:16:32 +0800 Subject: [PATCH 0863/2517] =?UTF-8?q?20150518-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...of Symbol or Operator in Linux Commands.md | 193 +++++++++ ...ripting Interview Questions and Answers.md | 399 ++++++++++++++++++ 2 files changed, 592 insertions(+) create mode 100644 sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md create mode 100644 sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md diff --git a/sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md b/sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md new file mode 100644 index 0000000000..2b281b8e85 --- /dev/null +++ b/sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md @@ -0,0 +1,193 @@ +10 Amazing and Mysterious Uses of (!) Symbol or Operator in Linux Commands +================================================================================ +The `'!'` symbol or operator in Linux can be used as Logical Negation operator as well as to fetch commands from history with tweaks or to run previously run command with modification. All the commands below have been checked explicitly in bash Shell. Though I have not checked but a major of these won’t run in other shell. Here we go into the amazing and mysterious uses of `'!'` symbol or operator in Linux commands. + +### 1. Run a command from history by command number. ### + +You might not be aware of the fact that you can run a command from your history command (already/earlier executed commands). To get started first find the command number by running ‘history‘ command. + + $ history + +![Find Last Executed Commands with History Command](http://www.tecmint.com/wp-content/uploads/2015/05/history-Command.gif) + +Now run a command from history just by the number at which it appears, in the output of history. Say run a command that appears at number 1551 in the output of ‘history‘ command. + + $ !1551 + +![Run Last Executed Commands by Number ID](http://www.tecmint.com/wp-content/uploads/2015/05/Run-Commands-By-number.gif) + +And, it runs the command ([top command][1] in the above case), that was listed at number 1551. This way to retrieving already executed command is very helpful specially in case of those commands which are long. You just need to call it using **![Number at which it appears in the output of history command]**. + +### 2. Run previously executed command as 2nd last command, 7th last command,etc. ### + +You may run those commands which you have run previously by their running sequence being the last run command will be represented as -1, second last as -2, seventh last as -7,…. + +First run history command to get a list of last executed command. It is necessary to run history command, so that you can be sure that there is no command like `rm command > file` and others just to make sure you do not run any dangerous command accidentally. And then check Sixth last command, Eight last command and Tenth last command. + + $ history + $ !-6 + $ !-8 + $ !-10 + +![Run Last Executed Commands By Numbers](http://www.tecmint.com/wp-content/uploads/2015/05/3.gif) +Run Last Executed Commands By Numbers + +### 3. Pass arguments of last command that we run to the new command without retyping ### + +I need to list the content of directory ‘/home/$USER/Binary/firefox‘ so I fired. + + $ ls /home/$USER/Binary/firefox + +Then I realized that I should have fired ‘ls -l‘ to see which file is executable there? So should I type the whole command again! No I don’t need. I just need to carry the last argument to this new command as: + + $ ls -l !$ + +Here `!$` will carry arguments passed in last command to this new command. + +![Pass Arguments of Last Executed Command to New](http://www.tecmint.com/wp-content/uploads/2015/05/4.gif) +Pass Arguments of Last Executed Command to New + +### 4. How to handle two or more arguments using (!) ### + +Let’s say I created a text file 1.txt on the Desktop. + + $ touch /home/avi/Desktop/1.txt + +and then copy it to ‘/home/avi/Downloads‘ using complete path on either side with cp command. + + $ cp /home/avi/Desktop/1.txt /home/avi/downloads + +Now we have passed two arguments with cp command. First is ‘/home/avi/Desktop/1.txt‘ and second is ‘/home/avi/Downloads‘, lets handle them differently, just execute `echo [arguments]` to print both arguments differently. + + $ echo “1st Argument is : !^” + $ echo “2nd Argument is : !cp:2” + +Note 1st argument can be printed as `“!^”` and rest of the arguments can be printed by executing `“![Name_of_Command]:[Number_of_argument]”`. + +In the above example the first command was ‘cp‘ and 2nd argument was needed to print. Hence `“!cp:2”`, if any command say xyz is run with 5 arguments and you need to get 4th argument, you may use `“!xyz:4”`, and use it as you like. All the arguments can be accessed by `“!*”`. + +![Handle Two or More Arguments](http://www.tecmint.com/wp-content/uploads/2015/05/5.gif) +Handle Two or More Arguments + +### 5. Execute last command on the basis of keywords ### + +We can execute the last executed command on the basis of keywords. We can understand it as follows: + + $ ls /home > /dev/null [Command 1] + $ ls -l /home/avi/Desktop > /dev/null [Command 2] + $ ls -la /home/avi/Downloads > /dev/null [Command 3] + $ ls -lA /usr/bin > /dev/null [Command 4] + +Here we have used same command (ls) but with different switches and for different folders. Moreover we have sent to output of each command to ‘/dev/null‘ as we are not going to deal with the output of the command also the console remains clean. + +Now Execute last run command on the basis of keywords. + + $ ! ls [Command 1] + $ ! ls -l [Command 2] + $ ! ls -la [Command 3] + $ ! ls -lA [Command 4] + +Check the output and you will be astonished that you are running already executed commands just by `ls` keywords. + +![Run Commands Based on Keywords](http://www.tecmint.com/wp-content/uploads/2015/05/6.gif) +Run Commands Based on Keywords + +### 6. The power of !! Operator ### + +You can run/alter your last run command using `(!!)`. It will call the last run command with alter/tweak in the current command. Lets show you the scenario + +Last day I run a one-liner script to get my private IP so I run, + + $ ip addr show | grep inet | grep -v 'inet6'| grep -v '127.0.0.1' | awk '{print $2}' | cut -f1 -d/ + +Then suddenly I figured out that I need to redirect the output of the above script to a file ip.txt, so what should I do? Should I retype the whole command again and redirect the output to a file? Well an easy solution is to use `UP` navigation key and add `'> ip.txt'` to redirect the output to a file as. + + $ ip addr show | grep inet | grep -v 'inet6'| grep -v '127.0.0.1' | awk '{print $2}' | cut -f1 -d/ > ip.txt + +Thanks to the life Savior `UP` navigation key here. Now consider the below condition, the next time I run below one-liner script. + + $ ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: + +As soon as I run script, the bash prompt returned an error with the message `“bash: ifconfig: command not found”`, It was not difficult for me to guess I run this command as user where it should be run as root. + +So what’s the solution? It is difficult to login to root and then type the whole command again! Also (UP Navigation Key) in last example didn’t came to rescue here. So? We need to call `“!!”` without quotes, which will call the last command for that user. + + $ su -c “!!” root + +Here su is switch user which is root, `-c` is to run the specific command as the user and the most important part `!!` will be replaced by command and last run command will be substituted here. Yeah! You need to provide root password. + +![The Power of !! Key](http://www.tecmint.com/wp-content/uploads/2015/05/7.gif) +The Power of !! Key + +I make use of `!!` mostly in following scenarios, + +1. When I run apt-get command as normal user, I usually get an error saying you don’t have permission to execute. + + $ apt-get upgrade && apt-get dist-upgrade + +Opps error…don’t worry execute below command to get it successful.. + + $ su -c !! + +Same way I do for, + + $ service apache2 start + or + $ /etc/init.d/apache2 start + or + $ systemctl start apache2 + +OOPS User not authorized to carry such task, so I run.. + + $ su -c 'service apache2 start' + or + $ su -c '/etc/init.d/apache2 start' + or + $ su -c 'systemctl start apache2' + +### 7. Run a command that affects all the file except ![FILE_NAME] ### + +The `!` (Logical NOT) can be used to run the command on all the files/extension except that is behind `'!'`. + +A. Remove all the files from a directory except the one the name of which is 2.txt. + + $ rm !(2.txt) + +B. Remove all the file type from the folder except the one the extension of which is ‘pdf‘. + + $ $ rm !(*.pdf) + +### 8. Check if a directory (say /home/avi/Tecmint)exist or not? Printf if the said directory exist or not. ### + +Here we will use `'! -d'` to validate if the directory exist or not followed by Logical AND Operator `(&&)` to print that directory does not exist and Logical OR Operator `(||)` to print the directory is present. + +Logic is, when the output of `[ ! -d /home/avi/Tecmint ]` is 0, it will execute what lies beyond Logical AND else it will go to Logical OR `(||)` and execute what lies beyond Logical OR. + + $ [ ! -d /home/avi/Tecmint ] && printf '\nno such /home/avi/Tecmint directory exist\n' || printf '\n/home/avi/Tecmint directory exist\n' + +### 9. Check if a directory exist or not? If not exit the command. ### + +Similar to the above condition, but here if the desired directory doesn’t exist it will exit the command. + + $ [ ! -d /home/avi/Tecmint ] && exit + +### 10. Create a directory (say test) in your home directory if it does not exist. ### + +A general implementation in Scripting Language where if the desired directory does not exist, it will create one. + + [ ! -d /home/avi/Tecmint ] && mkdir /home/avi/Tecmint + +That’s all for now. If you know or come across any other use of `'!'` which is worth knowing, you may like to provide us with your suggestion in the feedback. Keep connected! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/mysterious-uses-of-symbol-or-operator-in-linux-commands/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/12-top-command-examples-in-linux/ \ No newline at end of file diff --git a/sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md b/sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md new file mode 100644 index 0000000000..27d28387c7 --- /dev/null +++ b/sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md @@ -0,0 +1,399 @@ +70 Expected Shell Scripting Interview Questions & Answers +================================================================================ +We have selected expected 70 shell scripting question and answers for your interview preparation. Its really vital for all system admin to know scripting or atleast the basics which in turn helps to automate many tasks in your work environment. In the past few years we have seen that all linux job specification requires scripting skills. + +### 1) How to pass argument to a script ? ### + +./script argument + +**Example** : Script will show filename + +./show.sh file1.txt + + cat show.sh + #!/bin/bash + cat $1 + +### 2) How to use argument in a script ? ### + +First argument: $1, +Second argument : $2 + +Example : Script will copy file (arg1) to destination (arg2) + +./copy.sh file1.txt /tmp/ + + cat copy.sh + #!/bin/bash + cp $1 $2 + +### 3) How to calculate number of passed arguments ? ### + +$# + +### 4) How to get script name inside a script ? ### + +$0 + +### 5) How to check if previous command run successful ? ### + +$? + +### 6) How to get last line from a file ? ### + +tail -1 + +### 7) How to get first line from a file ? ### + +head -1 + +### 8) How to get 3rd element from each line from a file ? ### + +awk '{print $3}' + +### 9) How to get 2nd element from each line from a file, if first equal FIND ### + +awk '{ if ($1 == "FIND") print $2}' + +### 10) How to debug bash script ### + +Add -xv to #!/bin/bash + +Example + +#!/bin/bash –xv + +### 11) Give an example how to write function ? ### + +function example { +echo "Hello world!" +} + +### 12) How to add string to string ? ### + +V1="Hello" +V2="World" +V3=$V1+$V2 +echo $V3 + +Output + +Hello+World + +### 13) How to add two integers ? ### + +V1=1 +V2=2 +V3=$V1+$V2 +echo $V3 + +Output +3 + +### 14) How to check if file exist on filesystem ? ### + +if [ -f /var/log/messages ] +then +echo "File exists" +fi + +### 15) Write down syntax for all loops in shell scripting ? ### + +#### for loop : #### + +for i in $( ls ); do +echo item: $i +done + +#### while loop : #### + +#!/bin/bash +COUNTER=0 +while [ $COUNTER -lt 10 ]; do +echo The counter is $COUNTER +let COUNTER=COUNTER+1 +done + +until l#### ####oop : + +#!/bin/bash +COUNTER=20 +until [ $COUNTER -lt 10 ]; do +echo COUNTER $COUNTER +let COUNTER-=1 +done + +### 16) What it means by #!/bin/sh or #!/bin/bash at beginning of every script ? ### + +That line tells which shell to use. #!/bin/bash script to execute using /bin/bash. In case of python script there there will be #!/usr/bin/python + +### 17) How to get 10th line from the text file ? ### + +head -10 file|tail -1 + +### 18) What is the first symbol in the bash script file ### + +# + +### 19) What would be the output of command: [ -z "" ] && echo 0 || echo 1 ### + +0 + +### 20) What command "export" do ? ### + +Makes variable public in subshells + +### 21) How to run script in background ? ### + +add "&" to the end of script + +### 22) What "chmod 500 script" do ? ### + +Makes script executable for script owner + +### 23) What ">" do ? ### + +Redirects output stream to file or another stream. + +### 24) What difference between & and && ### + +& - we using it when want to put script to background +&& - when we wand to execute command/script if first script was finished successfully + +### 25) When we need "if" before [ condition ] ? ### + +When we need to run several commands if condition meets. + +### 26) What would be the output of the command: name=John && echo 'My name is $name' ### + +My name is $name + +### 27) Which is the symbol used for comments in bash shell scripting ? ### + +# + +### 28) What would be the output of command: echo ${new:-variable} ### + +variable + +### 29) What difference between ' and " quotes ? ### + +' - we use it when do not want to evaluate variables to the values +" - all variables will be evaluated and its values will be assigned instead. + +### 30) How to redirect stdout and stderr streams to log.txt file from script inside ? ### + +Add "exec >log.txt 2>&1" as the first command in the script + +### 31) How to get part of string variable with echo command only ? ### + +echo ${variable:x:y} +x - start position +y - length +example: +variable="My name is Petras, and I am developer." +echo ${variable:11:6} # will display Petras + +### 32) How to get home_dir with echo command only if string variable="User:123:321:/home/dir" is given ? ### + +echo ${variable#*:*:*:} +or +echo ${variable##*:} + +### 33) How to get “User” from the string above ? ### + +echo ${variable%:*:*:*} +or +echo ${variable%%:*} + +### 34) How to list users which UID less that 100 (awk) ? ### + +awk -F: '$3<100' /etc/passwd + +### 35) Write the program which counts unique primary groups for users and displays count and group name only ### + +cat /etc/passwd|cut -d: -f4|sort|uniq -c|while read c g +do +{ echo $c; grep :$g: /etc/group|cut -d: -f1;}|xargs -n 2 +done + +### 36) How to change standard field separator to ":" in bash shell ? ### + +IFS=":" + +### 37) How to get variable length ? ### + +${#variable} + +### 38) How to print last 5 characters of variable ? ### + +echo ${variable: -5} + +### 39) What difference between ${variable:-10} and ${variable: -10} ? ### + +${variable:-10} - gives 10 if variable was not assigned before +${variable: -10} - gives last 10 symbols of variable + +### 40) How to substitute part of string with echo command only ? ### + +echo ${variable//pattern/replacement} + +### 41) Which command replaces string to uppercase ? ### + +tr '[:lower:]' '[:upper:]' + +### 42) How to count local accounts ? ### + +wc -l /etc/passwd|cut -d" " -f1 +or +cat /etc/passwd|wc -l + +### 43) How to count words in a string without wc command ? ### + +set ${string} +echo $# + +### 44) Which one is correct "export $variable" or "export variable" ? ### + +export variable + +### 45) How to list files where second letter is a or b ? ### + +ls -d ?[ab]* + +### 46) How to add integers a to b and assign to c ? ### + +c=$((a+b)) +or +c=`expr $a + $b` +or +c=`echo "$a+$b"|bc` + +### 47) How to remove all spaces from the string ? ### + +echo $string|tr -d " " + +### 48) Rewrite the command to print the sentence and converting variable to plural: item="car"; echo "I like $item" ? ### + +item="car"; echo "I like ${item}s" + +### 49) Write the command which will print numbers from 0 to 100 and display every third (0 3 6 9 …) ? ### + +for i in {0..100..3}; do echo $i; done +or +for (( i=0; i<=100; i=i+3 )); do echo "Welcome $i times"; done + +### 50) How to print all arguments provided to the script ? ### + +echo $* +or +echo $@ + +### 51) What difference between [ $a == $b ] and [ $a -eq $b ] ### + +[ $a == $b ] - should be used for string comparison +[ $a -eq $b ] - should be used for number tests + +### 52) What difference between = and == ### + += - we using to assign value to variable +== - we using for string comparison + +### 53) Write the command to test if $a greater than 12 ? ### + +[ $a -gt 12 ] + +### 54) Write the command to test if $b les or equal 12 ? ### + +[ $b -le 12 ] + +### 55) How to check if string begins with "abc" letters ? ### + +[[ $string == abc* ]] + +### 56) What difference between [[ $string == abc* ]] and [[ $string == "abc* ]] ### + +[[ $string == abc* ]] - will check if string begins with abc letters +[[ $string == "abc*"" ]] - will check if string is equal exactly to abc* + +### 57) How to list usernames which starts with ab or xy ? ### + +egrep "^ab|^xy" /etc/passwd|cut -d: -f1 + +### 58) What $! means in bash ? ### + +Most recent background command PID + +### 59) What $? means ? ### + +Most recent foreground exit status. + +### 60) How to print PID of the current shell ? ### + +echo $$ + +### 61) How to get number of passed arguments to the script ? ### + +echo $# + +### 62) What difference between $* and $@ ### + +$* - gives all passed arguments to the script as a single string +$@ - gives all passed arguments to the script as delimited list. Delimiter $IFS + +### 63) How to define array in bash ? ### + +array=("Hi" "my" "name" "is") + +### 64) How to print the first array element ? ### + +echo ${array[0]} + +### 65) How to print all array elements ? ### + +echo ${array[@]} + +### 66) How to print all array indexes ? ### + +echo ${!array[@]} + +### 67) How to remove array element with id 2 ? ### + +unset array[2] + +### 68) How to add new array element with id 333 ? ### + +array[333]="New_element" + +### 69) How shell script get input values ? ### + +a) via parameters + +./script param1 param2 + +b) via read command + +read -p "Destination backup Server : " desthost + +### 70) How can we use "expect" command in a script ? ### + +/usr/bin/expect << EOD +spawn rsync -ar ${line} ${desthost}:${destpath} +expect "*?assword:*" +send "${password}\r" +expect eof +EOD + +Good luck !! Please comment below if you have any new query or need answers for your questions. Let us know how well this helped for your interview :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-shell-script/shell-scripting-interview-questions-answers/ + +作者:[Petras Liumparas][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/petrasl/ \ No newline at end of file From c7cd7b425d81f19aa763b8fc1f0748496eb5e7fe Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 18 May 2015 17:04:23 +0800 Subject: [PATCH 0864/2517] [Translating] tech/20150518 70 Expected Shell Scripting Interview Questions and Answers --- ...0 Expected Shell Scripting Interview Questions and Answers.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md b/sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md index 27d28387c7..3d9b188bb1 100644 --- a/sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md +++ b/sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md @@ -1,3 +1,4 @@ +Translating by ictlyh 70 Expected Shell Scripting Interview Questions & Answers ================================================================================ We have selected expected 70 shell scripting question and answers for your interview preparation. Its really vital for all system admin to know scripting or atleast the basics which in turn helps to automate many tasks in your work environment. In the past few years we have seen that all linux job specification requires scripting skills. From e080a6a2623a90d722cf8e9d44399dbe1d2a0bb8 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Mon, 18 May 2015 18:32:24 +0800 Subject: [PATCH 0865/2517] [Translating] 20150205 Inxi--Find System And Hardware Information On Linux.md --- ...205 Inxi--Find System And Hardware Information On Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150205 Inxi--Find System And Hardware Information On Linux.md b/sources/tech/20150205 Inxi--Find System And Hardware Information On Linux.md index efdc243fc6..09981ae74f 100644 --- a/sources/tech/20150205 Inxi--Find System And Hardware Information On Linux.md +++ b/sources/tech/20150205 Inxi--Find System And Hardware Information On Linux.md @@ -1,3 +1,5 @@ +Translating by goreliu ... + Inxi: Find System And Hardware Information On Linux ================================================================================ We already have shown different [applications][1] and ways to find the system and hardware information on Linux. In that series, today we will see how to find such details using **inxi**. It can be used for forum technical support, as a debugging tool, to quickly ascertain user system configuration and hardware. @@ -168,4 +170,4 @@ via: http://www.unixmen.com/inxi-find-system-hardware-information-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/sk/ -[1]:http://www.unixmen.com/screenfetch-bash-screenshot-information-tool/ \ No newline at end of file +[1]:http://www.unixmen.com/screenfetch-bash-screenshot-information-tool/ From df159f869923b3ffaac1ed059aa81bb6bf25a906 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 18 May 2015 19:33:45 +0800 Subject: [PATCH 0866/2517] [Translated] tech/20150518 70 Expected Shell Scripting Interview Questions and Answers --- ...ripting Interview Questions and Answers.md | 400 ------------------ ...ripting Interview Questions and Answers.md | 399 +++++++++++++++++ 2 files changed, 399 insertions(+), 400 deletions(-) delete mode 100644 sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md create mode 100644 translated/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md diff --git a/sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md b/sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md deleted file mode 100644 index 3d9b188bb1..0000000000 --- a/sources/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md +++ /dev/null @@ -1,400 +0,0 @@ -Translating by ictlyh -70 Expected Shell Scripting Interview Questions & Answers -================================================================================ -We have selected expected 70 shell scripting question and answers for your interview preparation. Its really vital for all system admin to know scripting or atleast the basics which in turn helps to automate many tasks in your work environment. In the past few years we have seen that all linux job specification requires scripting skills. - -### 1) How to pass argument to a script ? ### - -./script argument - -**Example** : Script will show filename - -./show.sh file1.txt - - cat show.sh - #!/bin/bash - cat $1 - -### 2) How to use argument in a script ? ### - -First argument: $1, -Second argument : $2 - -Example : Script will copy file (arg1) to destination (arg2) - -./copy.sh file1.txt /tmp/ - - cat copy.sh - #!/bin/bash - cp $1 $2 - -### 3) How to calculate number of passed arguments ? ### - -$# - -### 4) How to get script name inside a script ? ### - -$0 - -### 5) How to check if previous command run successful ? ### - -$? - -### 6) How to get last line from a file ? ### - -tail -1 - -### 7) How to get first line from a file ? ### - -head -1 - -### 8) How to get 3rd element from each line from a file ? ### - -awk '{print $3}' - -### 9) How to get 2nd element from each line from a file, if first equal FIND ### - -awk '{ if ($1 == "FIND") print $2}' - -### 10) How to debug bash script ### - -Add -xv to #!/bin/bash - -Example - -#!/bin/bash –xv - -### 11) Give an example how to write function ? ### - -function example { -echo "Hello world!" -} - -### 12) How to add string to string ? ### - -V1="Hello" -V2="World" -V3=$V1+$V2 -echo $V3 - -Output - -Hello+World - -### 13) How to add two integers ? ### - -V1=1 -V2=2 -V3=$V1+$V2 -echo $V3 - -Output -3 - -### 14) How to check if file exist on filesystem ? ### - -if [ -f /var/log/messages ] -then -echo "File exists" -fi - -### 15) Write down syntax for all loops in shell scripting ? ### - -#### for loop : #### - -for i in $( ls ); do -echo item: $i -done - -#### while loop : #### - -#!/bin/bash -COUNTER=0 -while [ $COUNTER -lt 10 ]; do -echo The counter is $COUNTER -let COUNTER=COUNTER+1 -done - -until l#### ####oop : - -#!/bin/bash -COUNTER=20 -until [ $COUNTER -lt 10 ]; do -echo COUNTER $COUNTER -let COUNTER-=1 -done - -### 16) What it means by #!/bin/sh or #!/bin/bash at beginning of every script ? ### - -That line tells which shell to use. #!/bin/bash script to execute using /bin/bash. In case of python script there there will be #!/usr/bin/python - -### 17) How to get 10th line from the text file ? ### - -head -10 file|tail -1 - -### 18) What is the first symbol in the bash script file ### - -# - -### 19) What would be the output of command: [ -z "" ] && echo 0 || echo 1 ### - -0 - -### 20) What command "export" do ? ### - -Makes variable public in subshells - -### 21) How to run script in background ? ### - -add "&" to the end of script - -### 22) What "chmod 500 script" do ? ### - -Makes script executable for script owner - -### 23) What ">" do ? ### - -Redirects output stream to file or another stream. - -### 24) What difference between & and && ### - -& - we using it when want to put script to background -&& - when we wand to execute command/script if first script was finished successfully - -### 25) When we need "if" before [ condition ] ? ### - -When we need to run several commands if condition meets. - -### 26) What would be the output of the command: name=John && echo 'My name is $name' ### - -My name is $name - -### 27) Which is the symbol used for comments in bash shell scripting ? ### - -# - -### 28) What would be the output of command: echo ${new:-variable} ### - -variable - -### 29) What difference between ' and " quotes ? ### - -' - we use it when do not want to evaluate variables to the values -" - all variables will be evaluated and its values will be assigned instead. - -### 30) How to redirect stdout and stderr streams to log.txt file from script inside ? ### - -Add "exec >log.txt 2>&1" as the first command in the script - -### 31) How to get part of string variable with echo command only ? ### - -echo ${variable:x:y} -x - start position -y - length -example: -variable="My name is Petras, and I am developer." -echo ${variable:11:6} # will display Petras - -### 32) How to get home_dir with echo command only if string variable="User:123:321:/home/dir" is given ? ### - -echo ${variable#*:*:*:} -or -echo ${variable##*:} - -### 33) How to get “User” from the string above ? ### - -echo ${variable%:*:*:*} -or -echo ${variable%%:*} - -### 34) How to list users which UID less that 100 (awk) ? ### - -awk -F: '$3<100' /etc/passwd - -### 35) Write the program which counts unique primary groups for users and displays count and group name only ### - -cat /etc/passwd|cut -d: -f4|sort|uniq -c|while read c g -do -{ echo $c; grep :$g: /etc/group|cut -d: -f1;}|xargs -n 2 -done - -### 36) How to change standard field separator to ":" in bash shell ? ### - -IFS=":" - -### 37) How to get variable length ? ### - -${#variable} - -### 38) How to print last 5 characters of variable ? ### - -echo ${variable: -5} - -### 39) What difference between ${variable:-10} and ${variable: -10} ? ### - -${variable:-10} - gives 10 if variable was not assigned before -${variable: -10} - gives last 10 symbols of variable - -### 40) How to substitute part of string with echo command only ? ### - -echo ${variable//pattern/replacement} - -### 41) Which command replaces string to uppercase ? ### - -tr '[:lower:]' '[:upper:]' - -### 42) How to count local accounts ? ### - -wc -l /etc/passwd|cut -d" " -f1 -or -cat /etc/passwd|wc -l - -### 43) How to count words in a string without wc command ? ### - -set ${string} -echo $# - -### 44) Which one is correct "export $variable" or "export variable" ? ### - -export variable - -### 45) How to list files where second letter is a or b ? ### - -ls -d ?[ab]* - -### 46) How to add integers a to b and assign to c ? ### - -c=$((a+b)) -or -c=`expr $a + $b` -or -c=`echo "$a+$b"|bc` - -### 47) How to remove all spaces from the string ? ### - -echo $string|tr -d " " - -### 48) Rewrite the command to print the sentence and converting variable to plural: item="car"; echo "I like $item" ? ### - -item="car"; echo "I like ${item}s" - -### 49) Write the command which will print numbers from 0 to 100 and display every third (0 3 6 9 …) ? ### - -for i in {0..100..3}; do echo $i; done -or -for (( i=0; i<=100; i=i+3 )); do echo "Welcome $i times"; done - -### 50) How to print all arguments provided to the script ? ### - -echo $* -or -echo $@ - -### 51) What difference between [ $a == $b ] and [ $a -eq $b ] ### - -[ $a == $b ] - should be used for string comparison -[ $a -eq $b ] - should be used for number tests - -### 52) What difference between = and == ### - -= - we using to assign value to variable -== - we using for string comparison - -### 53) Write the command to test if $a greater than 12 ? ### - -[ $a -gt 12 ] - -### 54) Write the command to test if $b les or equal 12 ? ### - -[ $b -le 12 ] - -### 55) How to check if string begins with "abc" letters ? ### - -[[ $string == abc* ]] - -### 56) What difference between [[ $string == abc* ]] and [[ $string == "abc* ]] ### - -[[ $string == abc* ]] - will check if string begins with abc letters -[[ $string == "abc*"" ]] - will check if string is equal exactly to abc* - -### 57) How to list usernames which starts with ab or xy ? ### - -egrep "^ab|^xy" /etc/passwd|cut -d: -f1 - -### 58) What $! means in bash ? ### - -Most recent background command PID - -### 59) What $? means ? ### - -Most recent foreground exit status. - -### 60) How to print PID of the current shell ? ### - -echo $$ - -### 61) How to get number of passed arguments to the script ? ### - -echo $# - -### 62) What difference between $* and $@ ### - -$* - gives all passed arguments to the script as a single string -$@ - gives all passed arguments to the script as delimited list. Delimiter $IFS - -### 63) How to define array in bash ? ### - -array=("Hi" "my" "name" "is") - -### 64) How to print the first array element ? ### - -echo ${array[0]} - -### 65) How to print all array elements ? ### - -echo ${array[@]} - -### 66) How to print all array indexes ? ### - -echo ${!array[@]} - -### 67) How to remove array element with id 2 ? ### - -unset array[2] - -### 68) How to add new array element with id 333 ? ### - -array[333]="New_element" - -### 69) How shell script get input values ? ### - -a) via parameters - -./script param1 param2 - -b) via read command - -read -p "Destination backup Server : " desthost - -### 70) How can we use "expect" command in a script ? ### - -/usr/bin/expect << EOD -spawn rsync -ar ${line} ${desthost}:${destpath} -expect "*?assword:*" -send "${password}\r" -expect eof -EOD - -Good luck !! Please comment below if you have any new query or need answers for your questions. Let us know how well this helped for your interview :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-shell-script/shell-scripting-interview-questions-answers/ - -作者:[Petras Liumparas][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/petrasl/ \ No newline at end of file diff --git a/translated/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md b/translated/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md new file mode 100644 index 0000000000..b5ccd63e0a --- /dev/null +++ b/translated/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md @@ -0,0 +1,399 @@ +70 个可能的 Shell 脚本面试问题及解答 +================================================================================ +我们为你的面试准备选择了 70 个可能的 shell 脚面问题及解答。了解脚本或至少知道基础知识对系统管理员来说至关重要,它也有助于你在工作环境中自动完成很多任务。在过去的几年里,我们注意到所有的 linux 工作职位都要求脚本技能。 + +### 1) 如何向脚本传递参数 ? ### + +./script argument + +**例子** : 显示文件名称脚本 + +./show.sh file1.txt + + cat show.sh + #!/bin/bash + cat $1 + +### 2) 如何在脚本中使用参数 ? ### + +第一个参数: $1, +第二个参数 : $2 + +例子 : 脚本会复制文件(arg1) 到目标地址(arg2) + +./copy.sh file1.txt /tmp/ + + cat copy.sh + #!/bin/bash + cp $1 $2 + +### 3) 如何计算传递进来的参数 ? ### + +$# + +### 4) 如何在脚本中获取脚本名称 ? ### + +$0 + +### 5) 如何检查之前的命令是否运行成功 ? ### + +$? + +### 6) 如何获取文件的最后一行 ? ### + +tail -1 + +### 7) 如何获取文件的第一行 ? ### + +head -1 + +### 8) 如何获取一个文件每一行的第三个元素 ? ### + +awk '{print $3}' + +### 9) 假如第一个等于 FIND,如何获取文件中每行的第二个元素 ### + +awk '{ if ($1 == "FIND") print $2}' + +### 10) 如何调试 bash 脚本 ### + +Add -xv to #!/bin/bash + +例子 + +#!/bin/bash –xv + +### 11) 举例如何写一个函数 ? ### + +function example { +echo "Hello world!" +} + +### 12) 如何向 string 添加 string ? ### + +V1="Hello" +V2="World" +V3=$V1+$V2 +echo $V3 + +Output + +Hello+World + +### 13) 如何进行两个整数相加 ? ### + +V1=1 +V2=2 +V3=$V1+$V2 +echo $V3 + +Output +3 + +### 14) 如何检查文件系统中是否存在某个文件 ? ### + +if [ -f /var/log/messages ] +then +echo "File exists" +fi + +### 15) 写出 shell 脚本中所有循环语法 ? ### + +#### for loop : #### + +for i in $( ls ); do +echo item: $i +done + +#### while loop : #### + +#!/bin/bash +COUNTER=0 +while [ $COUNTER -lt 10 ]; do +echo The counter is $COUNTER +let COUNTER=COUNTER+1 +done + +#### untill oop : #### + +#!/bin/bash +COUNTER=20 +until [ $COUNTER -lt 10 ]; do +echo COUNTER $COUNTER +let COUNTER-=1 +done + +### 16) 每个脚本开始的 #!/bin/sh 或 #!/bin/bash 表示什么意思 ? ### + +这一行说明要使用的 shell。#!/bin/bash 表示脚本使用 /bin/bash。对于 python 脚本,就是 #!/usr/bin/python + +### 17) 如何获取文本文件的第 10 行 ? ### + +head -10 file|tail -1 + +### 18) bash 脚本文件的第一个符号是什么 ### + +# + +### 19) 命令:[ -z "" ] && echo 0 || echo 1 的输出是什么 ### + +0 + +### 20) 命令 “export” 有什么用 ? ### + +使变量在子 shell 中公有 + +### 21) 如何在后台运行脚本 ? ### + +在脚本后面添加 “&” + +### 22) "chmod 500 script" 做什么 ? ### + +使脚本所有者拥有可执行权限 + +### 23) ">" 做什么 ? ### + +重定向输出流到文件或另一个流。 + +### 24) & 和 && 有什么区别 ### + +& - 希望脚本在后台运行的时候使用它 +&& - 当第一个脚本成功完成才执行命令/脚本的时候使用它 + +### 25) 什么时候要在 [ condition ] 之前使用 “if” ? ### + +当条件满足时需要运行多条命令的时候。 + +### 26) 命令: name=John && echo 'My name is $name' 的输出是什么 ### + +My name is $name + +### 27) bash shell 脚本中哪个符号用于注释 ? ### + +# + +### 28) 命令: echo ${new:-variable} 的输出是什么 ### + +variable + +### 29) ' 和 " 引号有什么区别 ? ### + +' - 当我们不希望把变量转换为值的时候使用它。 +" - 会计算所有变量的值并用值代替。 + +### 30) 如何在脚本文件中重定向标准输入输出流到 log.txt 文件 ? ### + +在脚本文件中添加 "exec >log.txt 2>&1" 命令 + +### 31) 如何只用 echo 命令获取 string 变量的一部分 ? ### + +echo ${variable:x:y} +x - 起始位置 +y - 长度 +例子: +variable="My name is Petras, and I am developer." +echo ${variable:11:6} # 会显示 Petras + +### 32) 如果给定字符串 variable="User:123:321:/home/dir" 如何只用 echo 命令获取 home_dir ? ### + +echo ${variable#*:*:*:} +或 +echo ${variable##*:} + +### 33) 如何从上面的字符串中获取 “User” ? ### + +echo ${variable%:*:*:*} +或 +echo ${variable%%:*} + +### 34) 如何使用 awk 列出 UID 小于 100 的用户 ? ### + +awk -F: '$3<100' /etc/passwd + +### 35) 写程序为用户计算主组数目并显示次数和组名 ### + +cat /etc/passwd|cut -d: -f4|sort|uniq -c|while read c g +do +{ echo $c; grep :$g: /etc/group|cut -d: -f1;}|xargs -n 2 +done + +### 36) 如何在 bash shell 中更改标注域分隔符为 ":" ? ### + +IFS=":" + +### 37) 如何获取变量长度 ? ### + +${#variable} + +### 38) 如何打印变量的最后 5 个字符 ? ### + +echo ${variable: -5} + +### 39) ${variable:-10} 和 ${variable: -10} 有什么区别? ### + +${variable:-10} - 如果之前没有给 variable 赋值则输出 10 +${variable: -10} - 输出 variable 的最后 10 个字符 + +### 40) 如何只用 echo 命令替换字符串的一部分 ? ### + +echo ${variable//pattern/replacement} + +### 41) 哪个命令将命令替换为大写 ? ### + +tr '[:lower:]' '[:upper:]' + +### 42) 如何计算本地用户数目 ? ### + +wc -l /etc/passwd|cut -d" " -f1 +或者 +cat /etc/passwd|wc -l + +### 43) 不用 wc 命令如何计算字符串中的单词数目 ? ### + +set ${string} +echo $# + +### 44) "export $variable" 或 "export variable" 哪个正确 ? ### + +export variable + +### 45) 如何列出第二个字母是 a 或 b 的文件 ? ### + +ls -d ?[ab]* + +### 46) 如何将整数 a 加到 b 并赋值给 c ? ### + +c=$((a+b)) +或 +c=`expr $a + $b` +或 +c=`echo "$a+$b"|bc` + +### 47) 如何去除字符串中的所有空格 ? ### + +echo $string|tr -d " " + +### 48) 重写命令输出变量转换为复数的句子: item="car"; echo "I like $item" ? ### + +item="car"; echo "I like ${item}s" + +### 49) 写出输出数字 0 到 100 中 3 的倍数(0 3 6 9 …)的命令 ? ### + +for i in {0..100..3}; do echo $i; done +或 +for (( i=0; i<=100; i=i+3 )); do echo "Welcome $i times"; done + +### 50) 如何打印传递给脚本的所有参数 ? ### + +echo $* +或 +echo $@ + +### 51) [ $a == $b ] 和 [ $a -eq $b ] 有什么区别 ### + +[ $a == $b ] - 用于字符串比较 +[ $a -eq $b ] - 用于数字比较 + +### 52) = 和 == 有什么区别 ### + += - 用于为变量复制 +== - 用于字符串比较 + +### 53) 写出测试 $a 是否大于 12 的命令 ? ### + +[ $a -gt 12 ] + +### 54) 写出测试 $b 是否小于等于 12 的命令 ? ### + +[ $b -le 12 ] + +### 55) 如何检查字符串是否以字母 "abc" 开头 ? ### + +[[ $string == abc* ]] + +### 56) [[ $string == abc* ]] 和 [[ $string == "abc*" ]] 有什么区别 ### + +[[ $string == abc* ]] - 检查字符串是否以字母 abc 开头 +[[ $string == "abc* " ]] - 检查字符串是否完全等于 abc* + +### 57) 如何列出以 ab 或 xy 开头的用户名 ? ### + +egrep "^ab|^xy" /etc/passwd|cut -d: -f1 + +### 58) bash 中 $! 表示什么意思 ? ### + +后台最近命令的 PID + +### 59) $? 表示什么意思 ? ### + +前台最近命令的结束状态 + +### 60) 如何输出当前 shell 的 PID ? ### + +echo $$ + +### 61) 如何获取传递给脚本的参数数目 ? ### + +echo $# + +### 62) $* 和 $@ 有什么区别 ### + +$* - 以一个字符串形式输出所有传递到脚本的参数 +$@ - 以 $IFS 为分隔符列出所有传递到脚本中的参数 + +### 63) 如何在 bash 中定义数组 ? ### + +array=("Hi" "my" "name" "is") + +### 64) 如何打印数组的第一个元素 ? ### + +echo ${array[0]} + +### 65) 如何打印数组的所有元素 ? ### + +echo ${array[@]} + +### 66) 如何输出所有数组索引 ? ### + +echo ${!array[@]} + +### 67) 如何移除数组中索引为 2 的元素 ? ### + +unset array[2] + +### 68) 如何在数组中添加 id 为 333 的元素 ? ### + +array[333]="New_element" + +### 69) shell 脚本如何获取输入的值 ? ### + +a) 通过参数 + +./script param1 param2 + +b) 通过 read 命令 + +read -p "Destination backup Server : " desthost + +### 70) 在脚本中如何使用 "expect" ? ### + +/usr/bin/expect << EOD +spawn rsync -ar ${line} ${desthost}:${destpath} +expect "*?assword:*" +send "${password}\r" +expect eof +EOD + +好运 !! 如果你有任何疑问或者问题需要解答都可以在下面的评论框中写下来。让我们知道这对你的面试有所帮助:-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-shell-script/shell-scripting-interview-questions-answers/ + +作者:[Petras Liumparas][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/petrasl/ \ No newline at end of file From 5abc1187f6dd9370fd51ed263e604316ec8988b3 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Mon, 18 May 2015 19:34:59 +0800 Subject: [PATCH 0867/2517] [Translated] 20150205 Inxi--Find System And Hardware Information On Linux.md --- ...ystem And Hardware Information On Linux.md | 345 +++++++++--------- 1 file changed, 172 insertions(+), 173 deletions(-) rename {sources => translated}/tech/20150205 Inxi--Find System And Hardware Information On Linux.md (65%) diff --git a/sources/tech/20150205 Inxi--Find System And Hardware Information On Linux.md b/translated/tech/20150205 Inxi--Find System And Hardware Information On Linux.md similarity index 65% rename from sources/tech/20150205 Inxi--Find System And Hardware Information On Linux.md rename to translated/tech/20150205 Inxi--Find System And Hardware Information On Linux.md index 09981ae74f..7b7b148413 100644 --- a/sources/tech/20150205 Inxi--Find System And Hardware Information On Linux.md +++ b/translated/tech/20150205 Inxi--Find System And Hardware Information On Linux.md @@ -1,173 +1,172 @@ -Translating by goreliu ... - -Inxi: Find System And Hardware Information On Linux -================================================================================ -We already have shown different [applications][1] and ways to find the system and hardware information on Linux. In that series, today we will see how to find such details using **inxi**. It can be used for forum technical support, as a debugging tool, to quickly ascertain user system configuration and hardware. - -**Inxi** is a command line tool that can be used to find the complete system and hardware details such as; - -- Hardware, -- CPU, -- Drivers, -- Xorg, -- Desktop, -- Kernel, -- GCC version, -- Processes, -- RAM usage, -- and other useful information. - -### Installation ### - -Inxi is available in the default repositories of most modern GNU/Linux operating systems. So, we can simply install it by running the following commands. - -**On Debian based system:** - - sudo apt-get install inxi - -**On Fedora:** - - sudo yum install inxi - -**On RHEL based systems:** - -Install EPEL repository: - - sudo yum install epel-release - -Then, install inxi using command: - - sudo yum install inxi - -### Usage ### - -To find the quick view of the system information, run the following command from Terminal. - - inxi - -**Sample output:** - - CPU~Dual core Intel Core i3-2350M CPU (-HT-MCP-) clocked at Min:800.000Mhz Max:1200.000Mhz Kernel~3.13.0-45-generic x86_64 Up~6:41 Mem~1537.7/3861.3MB HDD~500.1GB(52.5% used) Procs~183 Client~Shell inxi~1.9.17 - -Ofcourse, we can retrieve a particular hardware details. For example to retrieve the **Audio/Sound hardware details**, run the following command: - - inxi -A - -**Sample output:** - - Audio: Card: Intel 6 Series/C200 Series Family High Definition Audio Controller driver: snd_hda_intel - Sound: Advanced Linux Sound Architecture ver: k3.13.0-45-generic - -Cool, isn’t it? - -Likewise, you can retrieve the details of **Graphic card** information. - - inxi -G - -**Sample output:** - - Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller - X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz - GLX Renderer: Mesa DRI Intel Sandybridge Mobile GLX Version: 3.0 Mesa 10.3.0 - -What about harddisk information? That’s also possible. To view the full **harddisk** information, run the following command. - - inxi -D - -**Sample Output:** - - Drives: HDD Total Size: 500.1GB (52.5% used) 1: id: /dev/sda model: ST9601325BD size: 500.1GB - -To display the Bios and Motherboard details: - - inxi -M - -**Sample output:** - - Machine: System: Dell (portable) product: Inspiron N5050 - Mobo: Dell model: 01HXXJ version: A05 Bios: Dell version: A05 date: 08/03/2012 - -Not only hardware details, it can also displays the **list of available repositories** in our system. - - inxi -r - -**Sample output:** - - Repos: Active apt sources in file: /etc/apt/sources.list - deb http://ubuntu.excellmedia.net/archive/ trusty main restricted - deb-src http://ubuntu.excellmedia.net/archive/ trusty main restricted - deb http://ubuntu.excellmedia.net/archive/ trusty-updates main restricted - deb-src http://ubuntu.excellmedia.net/archive/ trusty-updates main restricted - deb http://ubuntu.excellmedia.net/archive/ trusty universe - . - . - Active apt sources in file: /etc/apt/sources.list.d/intellinuxgraphics.list - deb https://download.01.org/gfx/ubuntu/14.04/main trusty main #Intel Graphics drivers - Active apt sources in file: /etc/apt/sources.list.d/linrunner-tlp-trusty.list - Active apt sources in file: /etc/apt/sources.list.d/wseverin-ppa-trusty.list - deb http://ppa.launchpad.net/wseverin/ppa/ubuntu trusty main - -Inxi will also display the Weather details of your location. Surprised? Yes, It should. - - inxi -W Erode,Tamilnadu - -Here **Erode** is the District and **Tamilnadu** is a state in India. - -Sample output: - - Weather: Conditions: 79 F (26 C) - Clear Time: February 4, 6:00 PM IST - -### Viewing Complete Hardware details ### - -Tired of finding each hardware details? Well, you can list all details at once using command: - - inxi -F - -**Sample output:** - - System: Host: sk Kernel: 3.13.0-45-generic x86_64 (64 bit) Desktop: LXDE (Openbox 3.5.2) Distro: Ubuntu 14.04 trusty - Machine: System: Dell (portable) product: Inspiron N5050 - Mobo: Dell model: 01HXXJ version: A05 Bios: Dell version: A05 date: 08/03/2012 - CPU: Dual core Intel Core i3-2350M CPU (-HT-MCP-) cache: 3072 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) - Clock Speeds: 1: 800.00 MHz 2: 1000.00 MHz 3: 800.00 MHz 4: 800.00 MHz - Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller - X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz - GLX Renderer: Mesa DRI Intel Sandybridge Mobile GLX Version: 3.0 Mesa 10.3.0 - Audio: Card: Intel 6 Series/C200 Series Family High Definition Audio Controller driver: snd_hda_intel - Sound: Advanced Linux Sound Architecture ver: k3.13.0-45-generic - Network: Card-1: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) driver: ath9k - IF: wlan0 state: up mac: - Card-2: Realtek RTL8101E/RTL8102E PCI Express Fast Ethernet controller driver: r8169 - IF: eth0 state: down mac: - Drives: HDD Total Size: 500.1GB (52.5% used) 1: id: /dev/sda model: ST9500325AS size: 500.1GB - Partition: ID: / size: 455G used: 245G (57%) fs: ext4 ID: /boot size: 236M used: 159M (72%) fs: ext2 - ID: swap-1 size: 4.19GB used: 0.00GB (0%) fs: swap - RAID: No RAID devices detected - /proc/mdstat and md_mod kernel raid module present - Sensors: System Temperatures: cpu: 64.5C mobo: N/A - Fan Speeds (in rpm): cpu: N/A - Info: Processes: 186 Uptime: 6:52 Memory: 1547.2/3861.3MB Client: Shell (bash) inxi: 1.9.17 - -As you see in the above, inxi displays the complete hardware details. - -For more details, refer the man pages. - - man inxi - -### Conclusion ### - -Are you searching for a simple tool which displays your complete system and hardware details? Then, don’t look anywhere, inxi will give you what actually want. And, it is light weight tool available in your default repositories. What else you want more? Give it a try, you won’t be disappointed. - -Cheers! - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/inxi-find-system-hardware-information-linux/ - -作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/sk/ -[1]:http://www.unixmen.com/screenfetch-bash-screenshot-information-tool/ +Inxi——获取Linux的系统和硬件信息 +================================================================================ + +我们已经展示了一些不同的[应用程序][1]和方法来获取Linux的系统和硬件信息。在这一系列,我们将看到如何使用**inxi**来获取这些详情信息。在论坛技术支持中,它可以作为调试工具,迅速确定用户的系统配置和硬件信息。 + +**Inxi**是一个可以获取完整的系统和硬件详情信息的命令行工具,内容包括: + +- 硬件 +- CPU +- 磁盘驱动器 +- Xorg +- 桌面环境 +- 内核 +- GCC版本 +- 进程 +- 内存占用 +- 和其他有用的信息 + +### 安装方法 ### + +Inxi在多数现代GNU/Linux操作系统的默认软件仓库中。所以我们可以简单地运行下列命令安装。 + +**在基于Debian的发行版:** + + sudo apt-get install inxi + +**在Fedora:** + + sudo yum install inxi + +**在基于RHEL的发行版:** + +安装EPEL软件仓库: + + sudo yum install epel-release + +然后使用如下命令安装inxi: + + sudo yum install inxi + +### 使用方法 ### + +在终端运行如下命令可以获取系统的概况信息。 + + inxi + +**示例输出:** + + CPU~Dual core Intel Core i3-2350M CPU (-HT-MCP-) clocked at Min:800.000Mhz Max:1200.000Mhz Kernel~3.13.0-45-generic x86_64 Up~6:41 Mem~1537.7/3861.3MB HDD~500.1GB(52.5% used) Procs~183 Client~Shell inxi~1.9.17 + +当然,我们可以获取一个特定硬件的详情信息。比如获取**声音/音频硬件详情信息**,可以运行如下命令: + + inxi -A + +**示例输出:** + + Audio: Card: Intel 6 Series/C200 Series Family High Definition Audio Controller driver: snd_hda_intel + Sound: Advanced Linux Sound Architecture ver: k3.13.0-45-generic + +很酷是吧? + +同样的,你可以获取**显卡**的详情信息。 + + inxi -G + +**示例输出:** + + Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller + X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz + GLX Renderer: Mesa DRI Intel Sandybridge Mobile GLX Version: 3.0 Mesa 10.3.0 + +硬盘信息呢?也是可以的。运行如下命令来获取完整的**硬盘**信息。 + + inxi -D + +**示例输出:** + + Drives: HDD Total Size: 500.1GB (52.5% used) 1: id: /dev/sda model: ST9601325BD size: 500.1GB + +显示Bios和主板详情信息: + + inxi -M + +**示例输出:** + + Machine: System: Dell (portable) product: Inspiron N5050 + Mobo: Dell model: 01HXXJ version: A05 Bios: Dell version: A05 date: 08/03/2012 + +不只有硬性详情信息,它也可以显示我们系统中的**可用软件仓库列表**。 + + inxi -r + +**示例输出:** + + Repos: Active apt sources in file: /etc/apt/sources.list + deb http://ubuntu.excellmedia.net/archive/ trusty main restricted + deb-src http://ubuntu.excellmedia.net/archive/ trusty main restricted + deb http://ubuntu.excellmedia.net/archive/ trusty-updates main restricted + deb-src http://ubuntu.excellmedia.net/archive/ trusty-updates main restricted + deb http://ubuntu.excellmedia.net/archive/ trusty universe + . + . + Active apt sources in file: /etc/apt/sources.list.d/intellinuxgraphics.list + deb https://download.01.org/gfx/ubuntu/14.04/main trusty main #Intel Graphics drivers + Active apt sources in file: /etc/apt/sources.list.d/linrunner-tlp-trusty.list + Active apt sources in file: /etc/apt/sources.list.d/wseverin-ppa-trusty.list + deb http://ppa.launchpad.net/wseverin/ppa/ubuntu trusty main + +Inxi还可以显示你所在位置的天气信息。感到意外吗?是的,它可以。 + + inxi -W Erode,Tamilnadu + +这里**Erode**是区,**Tamilnadu**是印度的一个邦。 + +示例输出: + + Weather: Conditions: 79 F (26 C) - Clear Time: February 4, 6:00 PM IST + +### 查看完整的硬件详情信息 ### + +厌倦了获取每种硬件的信息?你可以使用如下命令将所有信息一次列出: + + inxi -F + +**示例输出:** + + System: Host: sk Kernel: 3.13.0-45-generic x86_64 (64 bit) Desktop: LXDE (Openbox 3.5.2) Distro: Ubuntu 14.04 trusty + Machine: System: Dell (portable) product: Inspiron N5050 + Mobo: Dell model: 01HXXJ version: A05 Bios: Dell version: A05 date: 08/03/2012 + CPU: Dual core Intel Core i3-2350M CPU (-HT-MCP-) cache: 3072 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) + Clock Speeds: 1: 800.00 MHz 2: 1000.00 MHz 3: 800.00 MHz 4: 800.00 MHz + Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller + X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz + GLX Renderer: Mesa DRI Intel Sandybridge Mobile GLX Version: 3.0 Mesa 10.3.0 + Audio: Card: Intel 6 Series/C200 Series Family High Definition Audio Controller driver: snd_hda_intel + Sound: Advanced Linux Sound Architecture ver: k3.13.0-45-generic + Network: Card-1: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) driver: ath9k + IF: wlan0 state: up mac: + Card-2: Realtek RTL8101E/RTL8102E PCI Express Fast Ethernet controller driver: r8169 + IF: eth0 state: down mac: + Drives: HDD Total Size: 500.1GB (52.5% used) 1: id: /dev/sda model: ST9500325AS size: 500.1GB + Partition: ID: / size: 455G used: 245G (57%) fs: ext4 ID: /boot size: 236M used: 159M (72%) fs: ext2 + ID: swap-1 size: 4.19GB used: 0.00GB (0%) fs: swap + RAID: No RAID devices detected - /proc/mdstat and md_mod kernel raid module present + Sensors: System Temperatures: cpu: 64.5C mobo: N/A + Fan Speeds (in rpm): cpu: N/A + Info: Processes: 186 Uptime: 6:52 Memory: 1547.2/3861.3MB Client: Shell (bash) inxi: 1.9.17 + +就像上面你看到的那样,inxi显示出了完整的硬件详情信息。 + +更多的细节可以参考man手册。 + + man inxi + +### 结论 ### + +你在寻找一个可以显示完整的系统和硬件详情信息的简单工具吗?那么不用再找了,inxi会提供你所需要的。并且,它还是在你系统默认的软件仓库中的轻量级工具。你还想要更多东西吗?试一试它,你不会失望。 + +欢呼吧! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/inxi-find-system-hardware-information-linux/ + +作者:[SK][a] +译者:[goreliu](https://github.com/goreliu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://www.unixmen.com/screenfetch-bash-screenshot-information-tool/ From 0ad77a5df2909f13de1518aa9e1e134203df7492 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Mon, 18 May 2015 19:46:16 +0800 Subject: [PATCH 0868/2517] [Translating] 20150205 zBackup--A versatile deduplicating backup tool.md --- ...20150205 zBackup--A versatile deduplicating backup tool.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150205 zBackup--A versatile deduplicating backup tool.md b/sources/tech/20150205 zBackup--A versatile deduplicating backup tool.md index 62eee8521c..82f8bf199a 100644 --- a/sources/tech/20150205 zBackup--A versatile deduplicating backup tool.md +++ b/sources/tech/20150205 zBackup--A versatile deduplicating backup tool.md @@ -1,3 +1,5 @@ +Translating by goreliu ... + zBackup – A versatile deduplicating backup tool ================================================================================ zbackup is a globally-deduplicating backup tool, based on the ideas found in rsync. Feed a large .tar into it, and it will store duplicate regions of it only once, then compress and optionally encrypt the result. Feed another .tar file, and it will also re-use any data found in any previous backups. This way only new changes are stored, and as long as the files are not very different, the amount of storage required is very low. Any of the backup files stored previously can be read back in full at any time. @@ -60,4 +62,4 @@ via: http://www.ubuntugeek.com/zbackup-a-versatile-deduplicating-backup-tool.htm 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file +[a]:http://www.ubuntugeek.com/author/ubuntufix From 5c2e00ec96fe0b36ce5900c1584493b10daa8dcb Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Mon, 18 May 2015 21:48:04 +0800 Subject: [PATCH 0869/2517] [Translated] 20150205 zBackup--A versatile deduplicating backup tool.md --- ...--A versatile deduplicating backup tool.md | 65 ------------------- ...--A versatile deduplicating backup tool.md | 63 ++++++++++++++++++ 2 files changed, 63 insertions(+), 65 deletions(-) delete mode 100644 sources/tech/20150205 zBackup--A versatile deduplicating backup tool.md create mode 100644 translated/tech/20150205 zBackup--A versatile deduplicating backup tool.md diff --git a/sources/tech/20150205 zBackup--A versatile deduplicating backup tool.md b/sources/tech/20150205 zBackup--A versatile deduplicating backup tool.md deleted file mode 100644 index 82f8bf199a..0000000000 --- a/sources/tech/20150205 zBackup--A versatile deduplicating backup tool.md +++ /dev/null @@ -1,65 +0,0 @@ -Translating by goreliu ... - -zBackup – A versatile deduplicating backup tool -================================================================================ -zbackup is a globally-deduplicating backup tool, based on the ideas found in rsync. Feed a large .tar into it, and it will store duplicate regions of it only once, then compress and optionally encrypt the result. Feed another .tar file, and it will also re-use any data found in any previous backups. This way only new changes are stored, and as long as the files are not very different, the amount of storage required is very low. Any of the backup files stored previously can be read back in full at any time. - -### zBackup Features ### - -Parallel LZMA or LZO compression of the stored data -Built-in AES encryption of the stored data -Possibility to delete old backup data -Use of a 64-bit rolling hash, keeping the amount of soft collisions to zero -Repository consists of immutable files. No existing files are ever modified -Written in C++ only with only modest library dependencies -Safe to use in production -Possibility to exchange data between repos without recompression - -### Install zBackup in ubuntu ### - -Open the terminal and run the following command - - sudo apt-get install zbackup - -### Using zBackup ### - -zbackup init initializes a backup repository for the backup files to be stored. - - zbackup init [--non-encrypted] [--password-file ~/.my_backup_password ] /my/backup/repo - -zbackup backup backups a tar file generated by tar c to the repository initialized using zbackup init - - zbackup [--password-file ~/.my_backup_password ] [--threads number_of_threads ] backup /my/backup/repo/backups/backup-`date ‘+%Y-%m-%d'` - -zbackup restore restores the backup file to a tar file. - - zbackup [--password-file ~/.my_backup_password [--cache-size cache_size_in_mb restore /my/backup/repo/backups/backup-`date ‘+%Y-%m-%d'` > /my/precious/backup-restored.tar - -### Available Options ### - -- -non-encrypted -- Do not encrypt the backup repository. -- --password-file ~/.my_backup_password -- Use the password file specified at ~/.my_backup_password to encrypt the repository and backup file, or to decrypt the backup file. -- --threads number_of_threads -- Limit the partial LZMA compression to number_of_threads needed. Recommended for 32-bit architectures. -- --cache-size cache_size_in_mb -- Use the cache size provided by cache_size_in_mb to speed up the restoration process. - -### zBackup files ### - -~/.my_backup_password Used to encrypt the repository and backup file, or to decrypt the backup file. See zbackup for further details. - -/my/backup/repo The directory used to hold the backup repository. - -/my/precious/restored-tar The tar used for restoring the backup. - -/my/backup/repo/backups/backup-`date ‘+%Y-%m-%d'` Specifies the backup file. - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/zbackup-a-versatile-deduplicating-backup-tool.html - -作者:[ruchi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ubuntugeek.com/author/ubuntufix diff --git a/translated/tech/20150205 zBackup--A versatile deduplicating backup tool.md b/translated/tech/20150205 zBackup--A versatile deduplicating backup tool.md new file mode 100644 index 0000000000..988db2d324 --- /dev/null +++ b/translated/tech/20150205 zBackup--A versatile deduplicating backup tool.md @@ -0,0 +1,63 @@ +zBackup——一个通用的重复数据备份工具 +================================================================================ +zbackup是一个基于rsync思想的全局重复数据备份工具。给它传入一个大的tar文件后,它会存储该文件的重复区域(仅进行一次),然后对结果进行压缩,并根据参数确定是否对其加密。传入另一个tar文件后,它会从之前的已备份文件中复用重复的数据。只有新的改动会被保存,并且只要文件变动不是很大,需要的存储空间非常少。任何时候之前的已备份文件都可以被完整地读出来。 + +### zBackup特性 ### + +- 使用并行的LZMA或者LZO压缩算法压缩已备份数据 +- 使用内置的AES加密算法加密已备份数据 +- 可以删除旧的已备份数据 +- 使用一个64位滚动哈希,保持软碰撞数量为0 +- 已备份数据由不可更改的文件组成。任何现有文件都没有被更改过 +- 使用C++语言编写,并且只有适量的依赖库 +- 可以在生产环境安全使用 +- 可以在不同备份库中交换数据而无需重新压缩 + +### 在ubuntu中安装zBackup ### + +打开终端并运行如下命令: + + sudo apt-get install zbackup + +### 使用zBackup ### + +`zbackup init`命令会初始化一个备份库,用来存放待备份的数据。 + + zbackup init [--non-encrypted] [--password-file ~/.my_backup_password ] /my/backup/repo + +`zbackup backup`命令备份一个由`tar c`创建的tar文件到刚才使用`zbackup init`初始化的备份库。(译注:实际使用时类似这样,tar c files | zbackup ...) + + zbackup [--password-file ~/.my_backup_password ] [--threads number_of_threads ] backup /my/backup/repo/backups/backup-`date ‘+%Y-%m-%d'` + +`zbackup restore`命令从备份库中恢复一个已备份文件到tar文件中。 + + zbackup [--password-file ~/.my_backup_password ] [--cache-size cache_size_in_mb ] restore /my/backup/repo/backups/backup-`date ‘+%Y-%m-%d'` > /my/precious/backup-restored.tar + +### 可用选项 ### + +- -non-encrypted -- 不加密备份库。 +- --password-file ~/.my_backup_password -- 使用位于~/.my_backup_password的口令文件来加密备份库和待备份文件,以及解密已备份文件。 +- --threads number_of_threads -- 限制并行LZMA压缩的线程数到number_of_threads。建议在32位的系统平台使用。 +- --cache-size cache_size_in_mb -- 使用cache_size_in_mb中的缓存大小来加速恢复文件的过程。 + +### zBackup相关文件 ### + +~/.my_backup_password 用来加密备份库和待备份文件,以及解密已备份文件。更多细节见zbackup。 + +/my/backup/repo 存放备份库的目录。 + +/my/precious/restored-tar 用来恢复已备份文件的tar文件。 + +/my/backup/repo/backups/backup-`date ‘+%Y-%m-%d'` 指定的之前已备份文件的文件名。 + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/zbackup-a-versatile-deduplicating-backup-tool.html + +作者:[ruchi][a] +译者:[goreliu](https://github.com/goreliu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix From 0b9d2663dc47b9ca2003aaca9eb94c913bdc0374 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Mon, 18 May 2015 22:00:55 +0800 Subject: [PATCH 0870/2517] [Translating] 20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md --- ...teresting Command Line Tips and Tricks in Linux--Part 1.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md b/sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md index 352fa2816c..073e5f9370 100644 --- a/sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md +++ b/sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md @@ -1,3 +1,5 @@ +Translating by goreliu ... + 5 Interesting Command Line Tips and Tricks in Linux – Part 1 ================================================================================ Are you making most out of the Linux? There are lots of helpful features which appears to be Tips and Tricks for many of Linux Users. Sometimes Tips and Tricks become the need. It helps you get productive with the same set of commands yet with enhanced functionality. @@ -112,4 +114,4 @@ via: http://www.tecmint.com/5-linux-command-line-tricks/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/history-command-examples/ -[2]:http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ \ No newline at end of file +[2]:http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ From bff7e462106c199d71e1f9d1c80f89315852f11b Mon Sep 17 00:00:00 2001 From: joeren Date: Tue, 19 May 2015 08:04:54 +0800 Subject: [PATCH 0871/2517] Update 20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md --- ... with Answers--How to view threads of a process on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md b/sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md index 9bb7bc0b9f..305d556aa9 100644 --- a/sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md +++ b/sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Linux FAQs with Answers--How to view threads of a process on Linux ================================================================================ > **Question**: My program creates and executes multiple threads in it. How can I monitor individual threads of the program once they are created? I would like to see the details (e.g., CPU/memory usage) of individual threads with their names. @@ -54,4 +55,4 @@ via: http://ask.xmodulo.com/view-threads-process-linux.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 34533e46066a3858cdddfc228a19de40d68bdc2d Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Tue, 19 May 2015 08:36:12 +0800 Subject: [PATCH 0872/2517] translating by KayGuoWhu --- .../talk/20150511 Open Source History--Why Did Linux Succeed.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150511 Open Source History--Why Did Linux Succeed.md b/sources/talk/20150511 Open Source History--Why Did Linux Succeed.md index 9a5a19686a..e50eb38cb7 100644 --- a/sources/talk/20150511 Open Source History--Why Did Linux Succeed.md +++ b/sources/talk/20150511 Open Source History--Why Did Linux Succeed.md @@ -1,3 +1,4 @@ +[translating by KayGuoWhu] Open Source History: Why Did Linux Succeed? ================================================================================ > Why did Linux, the Unix-like operating system kernel started by Linus Torvalds in 1991 that became central to the open source world, succeed where so many similar projects, including GNU HURD and the BSDs, fail? From b3050ecfd9ea19b3c5d9ccb15f10464d714d626a Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 19 May 2015 08:41:00 +0800 Subject: [PATCH 0873/2517] [Translated]20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md --- ...w to view threads of a process on Linux.md | 58 ------------------- ...w to view threads of a process on Linux.md | 57 ++++++++++++++++++ 2 files changed, 57 insertions(+), 58 deletions(-) delete mode 100644 sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md create mode 100644 translated/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md b/sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md deleted file mode 100644 index 305d556aa9..0000000000 --- a/sources/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md +++ /dev/null @@ -1,58 +0,0 @@ -Translating by GOLinux! -Linux FAQs with Answers--How to view threads of a process on Linux -================================================================================ -> **Question**: My program creates and executes multiple threads in it. How can I monitor individual threads of the program once they are created? I would like to see the details (e.g., CPU/memory usage) of individual threads with their names. - -Threads are a popular programming abstraction for parallel execution on modern operating systems. When threads are forked inside a program for multiple flows of execution, these threads share certain resources (e.g., memory address space, open files) among themselves to minimize forking overhead and avoid expensive IPC (inter-process communication) channel. These properties make threads an efficient mechanism for concurrent execution. - -In Linux, threads (also called Lightweight Processes (LWP)) created within a program will have the same "thread group ID" as the program's PID. Each thread will then have its own thread ID (TID). To the Linux kernel's scheduler, threads are nothing more than standard processes which happen to share certain resources. Classic command-line tools such as ps or top, which display process-level information by default, can be instructed to display thread-level information. - -Here are several ways to **show threads for a process on Linux**. - -### Method One: PS ### - -In ps command, "-T" option enables thread views. The following command list all threads created by a process with . - - $ ps -T -p - -![](https://farm8.staticflickr.com/7749/17350561110_94cacfc456_c.jpg) - -The "SID" column represents thread IDs, and "CMD" column shows thread names. - -### Method Two: Top ### - -The top command can show a real-time view of individual threads. To enable thread views in the top output, invoke top with "-H" option. This will list all Linux threads. You can also toggle on or off thread view mode while top is running, by pressing 'H' key. - - $ top -H - -![](https://farm9.staticflickr.com/8824/17350561070_3dfe447974_c.jpg) - -To restrict the top output to a particular process and check all threads running inside the process: - - $ top -H -p - -![](https://farm8.staticflickr.com/7797/17538002751_c8a3d574d8_c.jpg) - -### Method Three: Htop ### - -A more user-friendly way to view threads per process is via htop, an ncurses-based interactive process viewer. This program allows you to monitor individual threads in tree views. - -To enable thread views in htop, launch htop, and press to enter htop setup menu. Choose "Display option" under "Setup" column, and toggle on "Three view" and "Show custom thread names" options. Presss to exit the setup. - -![](https://farm6.staticflickr.com/5338/17350364568_59bce22e7b_b.jpg) - -Now you will see the follow threaded view of individual processes. - -![](https://farm9.staticflickr.com/8885/17350560930_98952d5350_c.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/view-threads-process-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://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md b/translated/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md new file mode 100644 index 0000000000..a91a2b3ed3 --- /dev/null +++ b/translated/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md @@ -0,0 +1,57 @@ +Linux有问必答——Linux上如何查看某个进程的线程 +================================================================================ +> **问题**: 我的程序创建并在它里头执行了多个线程,我怎样才能在该程序创建线程后监控其中单个线程?我想要看到带有它们名称的单个线程详细情况(如,CPU/内存使用率)。 + +线程是现代操作系统上进行并行执行的一个流行的编程方面的抽象概念。当一个程序内有多个线程被叉分出用以执行多个流时,这些线程就会在它们之间共享特定的资源(如,内存地址空间、打开的文件),以使叉分开销最小化,并避免大量花销IPC(进程间通信)频道。这些功能让线程在并发执行时成为一个高效的机制。 + +在Linux中,程序中创建的线程(也称为轻量级进程,LWP)会具有和程序的PID相同的“线程组ID”。然后,各个线程会获得其自身的线程ID(TID)。对于Linux内核调度器而言,线程不过是恰好共享特定资源的标准的进程。经典的命令行工具,如ps或top,都可以用来显示线程级别的信息,默认情况下它们会显示进程级别的信息。 + +这里提供了**在Linux上显示某个进程的线程**的几种方式。 + +### 方法一:PS ### + +在ps命令中,“-T”选项可以开启线程查看。下面的命令列出了由进程号为的进程创建的所有线程。 + + $ ps -T -p + +![](https://farm8.staticflickr.com/7749/17350561110_94cacfc456_c.jpg) + +“SID”栏表示线程ID,而“CMD”栏则显示了线程名称。 + +### 方法二: Top ### + +top命令可以实时显示各个线程情况。要在top输出中开启线程查看,请调用top命令的“-H”选项,该选项会列出所有Linux线程。在top运行时,你也可以通过按“H”键将线程查看模式切换为开或关。 + + $ top -H + +![](https://farm9.staticflickr.com/8824/17350561070_3dfe447974_c.jpg) + +要让top输出某个特定进程并检查该进程内运行的线程状况: + + $ top -H -p + +![](https://farm8.staticflickr.com/7797/17538002751_c8a3d574d8_c.jpg) + +### 方法三: Htop ### + +一个对用户更加友好的方式是,通过htop查看单个进程的线程,它是一个基于ncurses的交互进程查看器。该程序允许你在树状视图中监控单个独立线程。 + +要在htop中启用线程查看,请开启htop,然后按来进入htop的设置菜单。选择“设置”栏下面的“显示选项”,然后开启“树状视图”和“显示自定义线程名”选项。按退出设置。 + +![](https://farm6.staticflickr.com/5338/17350364568_59bce22e7b_b.jpg) + +现在,你就会看到下面这样单个进程的线程视图。 + +![](https://farm9.staticflickr.com/8885/17350560930_98952d5350_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/view-threads-process-linux.html + +作者:[Dan Nanni][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From bc8c783a333d022983ef6cc0a89f9d84caf38dc0 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Tue, 19 May 2015 08:43:58 +0800 Subject: [PATCH 0874/2517] move the article from sources to translated --- .../20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md (100%) diff --git a/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md b/translated/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md similarity index 100% rename from sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md rename to translated/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md From e82f964e69fda5ef164f6340f533b0dd51841c04 Mon Sep 17 00:00:00 2001 From: joeren Date: Tue, 19 May 2015 08:48:23 +0800 Subject: [PATCH 0875/2517] Update 20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md --- ...404 Not Found' error with 'apt-get update' on old Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md b/sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md index a5f150d3eb..9538b58556 100644 --- a/sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md +++ b/sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Linux FAQs with Answers--How to fix “404 Not Found” error with “apt-get update” on old Ubuntu ================================================================================ > **Question**: I have old Ubuntu 13.04 (Raring Ringtail) installation on my PC. When I run "sudo apt-get update" on it, it throws a bunch of "404 Not Found" errors, and I cannot install or update any package using apt-get or aptitude. Due to this error I cannot even upgrade it to a newer release. How can I fix this problem? @@ -42,4 +43,4 @@ via: http://ask.xmodulo.com/404-not-found-error-apt-get-update-ubuntu.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From ae20d738fb9fe1c93745e2f5f0242a02fc2ce028 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 19 May 2015 09:14:27 +0800 Subject: [PATCH 0876/2517] [Translated]20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md --- ...ror with 'apt-get update' on old Ubuntu.md | 46 ------------------- ...ror with 'apt-get update' on old Ubuntu.md | 45 ++++++++++++++++++ 2 files changed, 45 insertions(+), 46 deletions(-) delete mode 100644 sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md create mode 100644 translated/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md b/sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md deleted file mode 100644 index 9538b58556..0000000000 --- a/sources/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md +++ /dev/null @@ -1,46 +0,0 @@ -Translating by GOLinux! -Linux FAQs with Answers--How to fix “404 Not Found” error with “apt-get update” on old Ubuntu -================================================================================ -> **Question**: I have old Ubuntu 13.04 (Raring Ringtail) installation on my PC. When I run "sudo apt-get update" on it, it throws a bunch of "404 Not Found" errors, and I cannot install or update any package using apt-get or aptitude. Due to this error I cannot even upgrade it to a newer release. How can I fix this problem? - -![](https://farm6.staticflickr.com/5460/17634085636_996b2a8ab5_b.jpg) - -Every Ubuntu release has its end-of-life (EOL) time; regular Ubuntu releases are supported for 18 months, while LTS (Long Term Support) versions are supported up to 3 years (server edition) and 5 years (desktop edition). Once a Ubuntu release has reached EOL, its repositories will no longer be accessible, and you won't get any maintenance updates and security patches from Canonical. As of this writing, Ubuntu 13.04 (Raring Ringtail) has already reached EOL. - -If the Ubuntu system you are using is EOL-ed, you will get the following 404 errors from apt-get or aptitude as its repositories have been deprecated. - - W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/raring-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.13 80] - - W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found - - W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/binary-i386/Packages 404 Not Found [IP: 91.189.88.149 80] - - E: Some index files failed to download. They have been ignored, or old ones used instead - -For those users who are using old versions of Ubuntu, Canonical maintains old-releases.ubuntu.com, which is an archive of EOL-ed repositories. Thus, when Canonical's support for your Ubuntu installation ends, you need to switch to repositories at old-releases.ubuntu.com (unless you want to upgrade it before EOL). - -Here is a quick way to fix "404 Not Found" errors on old Ubuntu by switching to old-releases repositories. - -First, replace main/security repositories with old-releases versions as follows. - - $ sudo sed -i -r 's/([a-z]{2}\.)?archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list - $ sudo sed -i -r 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list - -Then open /etc/apt/sources.list with a text editor, and look for extras.ubuntu.com. This repository is also no longer supported for 13.04. So you need to comment out extras.ubuntu.com by prepending '#' sign. - - #deb http://extras.ubuntu.com/ubuntu raring main - #deb-src http://extras.ubuntu.com/ubuntu raring main - -Now you should be able to install or update packages on an old unsupported Ubuntu release. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/404-not-found-error-apt-get-update-ubuntu.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://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md b/translated/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md new file mode 100644 index 0000000000..9880f7953f --- /dev/null +++ b/translated/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md @@ -0,0 +1,45 @@ +Linux有问必答——在旧的Ubuntu上如何修复“apt-get update”的“404 Not Found”错误 +================================================================================ +> **问题**: 我的PC上安装了旧版的Ubuntu 13.04(急切的浣熊)。当我在上面运行“sudo apt-get update”时,它丢给了我一大堆“404 Not Found”错误,结果是我不能使用apt-get或aptitude来安装或更新任何软件包了。由于该错误的原因,我甚至不能将它升级到更新的版本。我怎样才能修复这个问题啊? +> +![](https://farm6.staticflickr.com/5460/17634085636_996b2a8ab5_b.jpg) + +每个Ubuntu版本都有生命结束周期(EOL)时间;常规的Ubuntu发行版提供18个月的支持,而LTS(长期支持)版本则长达3年(服务器版本)和5年(桌面版本)。当某个Ubuntu版本达到生命结束周期时,其仓库就不能再访问了,你也不能再从Canonical获取任何维护更新和安全补丁。在撰写本文时,Ubuntu 13.04(急切的浣熊)已经达到了它的生命结束周期。 + +如果你所使用的Ubuntu系统已经被结束生命周期,你就会从apt-get或aptitude得到以下404错误,因为它的仓库已经被遗弃了。 + + W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/raring-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.13 80] + + W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found + + W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/universe/binary-i386/Packages 404 Not Found [IP: 91.189.88.149 80] + + E: Some index files failed to download. They have been ignored, or old ones used instead + +对于那些还在使用旧版本Ubuntu的用户,Canonical维护了一个old-releases.ubuntu.com的网站,这里包含了结束生命周期的仓库归档。因此,当Canonical对你安装的Ubuntu版本结束支持时,你需要将仓库切换到old-releases.ubuntu.com(除非你在结束生命周期之前想要升级)。 + +这里,通过切换到旧版本仓库提供了一个快速修复“404 Not Found”错误的便捷方式。 + +首先,使用旧版本仓库替换main/security仓库,就像下面这样。 + + $ sudo sed -i -r 's/([a-z]{2}\.)?archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list + $ sudo sed -i -r 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list + +然后,使用文本编辑器打开/etc/apt/sources.list,并查找extras.ubuntu.com。该仓库也不再支持Ubuntu 13.04了,所以你需要使用“#”号将extras.ubuntu.com注释掉。 + + #deb http://extras.ubuntu.com/ubuntu raring main + #deb-src http://extras.ubuntu.com/ubuntu raring main + +现在,你应该可以在旧版不受支持的Ubuntu上安装或更新软件包了。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/404-not-found-error-apt-get-update-ubuntu.html + +作者:[Dan Nanni][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From 304a3bab0a7e7d866c62ba3971e46f28fc9734d4 Mon Sep 17 00:00:00 2001 From: joeren Date: Tue, 19 May 2015 09:19:15 +0800 Subject: [PATCH 0877/2517] Update 20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md --- ...s--How to block specific user agents on nginx web server.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md b/sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md index 6ea8ae3b06..53bd4c4935 100644 --- a/sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md +++ b/sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Linux FAQs with Answers--How to block specific user agents on nginx web server ================================================================================ > **Question**: I notice that some robots often visit my nginx-powered website and scan it aggressively, ending up wasting a lot of my web server resources. I am trying to block those robots based on their user-agent string. How can I block specific user agent(s) on nginx web server? @@ -111,4 +112,4 @@ via: http://ask.xmodulo.com/block-specific-user-agents-nginx-web-server.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 5c11fd2ddb2cc5681b7b5ac0443bb3d454e60676 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 19 May 2015 11:16:22 +0800 Subject: [PATCH 0878/2517] PUB:20150304 Share Folders On Local Network Between Ubuntu And Windows @KayGuoWhu --- ...ocal Network Between Ubuntu And Windows.md | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) rename {translated/tech => published}/20150304 Share Folders On Local Network Between Ubuntu And Windows.md (81%) diff --git a/translated/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md b/published/20150304 Share Folders On Local Network Between Ubuntu And Windows.md similarity index 81% rename from translated/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md rename to published/20150304 Share Folders On Local Network Between Ubuntu And Windows.md index 972486fbf0..a2e5e59286 100644 --- a/translated/tech/20150304 Share Folders On Local Network Between Ubuntu And Windows.md +++ b/published/20150304 Share Folders On Local Network Between Ubuntu And Windows.md @@ -1,10 +1,10 @@ -局域网中实现Ubuntu和Windows共享文件夹 +如何在局域网中将Ubuntu文件夹共享给Windows ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_windows.jpeg) 本文全面详细地向你描述了**在Ubuntu中如何实现局域网内的文件夹共享**。 -你的家中是不是有多台电脑?当你需要从一台Ubuntu电脑向另一台电脑传输数据时,是不是必须用到U盘或SD卡?你是否也觉得这个方法很烦人?我想肯定是。本文的目的就是使你在局域网内快速方便地传输文件、文档和其它较大的数据,来节省你的宝贵时间。只需一次设置,然后轻点鼠标,你就可以自由地**在Ubuntu和Windows之间共享文件**,当然这对其它Linux系统同样使用。不要担心这很容易操作,不会花费太多时间。 +你的家中是不是有多台电脑?当你需要从一台Ubuntu电脑向另一台电脑传输数据时,是不是必须用到U盘或SD卡?你是否也觉得这个方法很烦人?我想肯定是。本文的目的就是使你在局域网内快速方便地传输文件、文档和其它较大的数据,以节省你的宝贵时间。只需一次设置,然后轻点鼠标,你就可以自由地**在Ubuntu和Windows之间共享文件**,当然这对其它Linux系统同样使用。不要担心,这很容易操作,不会花费太多时间。 除此之外,尽管本文是在Ubuntu上进行实践,但这个教程在其它Linux系统上同样有用。 @@ -21,11 +21,11 @@ #### 步骤一:#### -为了在Ubuntu上实现局域网共享文件夹,右键点击打算共享的文件夹,并选择“Local Network Share”: +为了在Ubuntu上实现局域网共享文件夹,右键点击打算共享的文件夹,并选择“Local Network Share(本地网络共享)”: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Share_Folder_Ubuntu.jpeg) -**可能有用的故障方案**:如果在右键菜单中看不到“Local Network Share”的选项,那就新建一个终端,使用下面的命令去安装nautlius-share: +**可能有用的故障解决方案**:如果在右键菜单中看不到“Local Network Share”的选项,那就新建一个终端,使用下面的命令去安装nautlius-share插件: sudo apt-get install nautilus-share @@ -35,17 +35,17 @@ #### 步骤二:#### -一旦点击“Local Network Share”,就会出现共享文件夹的选项。只需选中“Share this folder”这一项: +一旦点击“Local Network Share”,就会出现共享文件夹的选项。只需选中“Share this folder(共享该文件夹)”这一项: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_1.jpeg) -可能的故障方案:如果提示共享服务还未安装,就像下图所示,那就点击安装服务,按照提示操作。 +**可能的故障解决方案**:如果提示共享服务还未安装,就像下图所示,那就点击安装服务,按照提示操作。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_Folder_Ubuntu_2.jpeg) #### 步骤三:#### -一旦选中“Share this folder”的选项,就会看到按钮“Create Share”变成可用了。你也可以允许其他用户在共享文件夹中编辑文件。选项“Guest access”也是如此。 +当选中“Share this folder”的选项,就会看到按钮“Create Share(创建共享)”变得可以点击了。你也可以“Allow others to create and delete fies in this folder(允许其他用户在共享文件夹中编辑文件)”。选项“Guest access(允许访客访问)”也是如此。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Share_folder_Ubuntu_3.png) @@ -55,13 +55,13 @@ ### 2. 在Ubuntu上使用密码保护实现局域网共享文件夹### -为了达到目的,首先需要配置Samba服务器。事实上,在这篇教程的前一部分我们已经用到了Samba,只是我们没有刻意强调。在介绍如何在Ubuntu上搭建Samba服务器实现局域网共享的方法之前,先快速预览一下[Samba][1]到底是什么。 +为了达到这个目的,首先需要配置Samba服务器。事实上,在这篇教程的前一部分我们已经用到了Samba,只是我们没有刻意强调。在介绍如何在Ubuntu上搭建Samba服务器实现局域网共享的方法之前,先快速预览一下[Samba][1]到底是什么。 #### Samba是什么? #### Samba是一个允许用户通过网络共享文件、文档和打印机的软件包,无论是在Linux、Windows,还是Mac上。它适用于所有的主流平台,可以在所有支持系统上流畅运行。下面是维基百科的介绍: -> Samba是一款重新实现SMB/CIFS网络协议的自由软件,最初由安德鲁·垂鸠开发。在第三版中,Smaba不仅支持通过不同的Windows客户端访问及分享SMB的文件夹及打印机,还可以集成到Windows Server域名,作为主要域名控制站(PDC)或者域名成员。它也可以作为Active Directory域名的一部分。 +> Samba是一款重新实现SMB/CIFS网络协议的自由软件,最初由安德鲁·垂鸠开发。在第三版中,Smaba不仅支持通过不同的Windows客户端访问及分享SMB的文件夹及打印机,还可以集成到Windows Server域,作为主域控制器(PDC)或者域成员。它也可以作为活动目录域的一部分。 #### 在Ubuntu上安装Samba服务器 #### @@ -77,7 +77,7 @@ Samba是一个允许用户通过网络共享文件、文档和打印机的软件 #### 在Ubuntu上配置Samba服务器 #### -从dash打开Samba配置工具: +从dash中打开Samba配置工具: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Setup-Samba.png) @@ -86,7 +86,7 @@ Samba是一个允许用户通过网络共享文件、文档和打印机的软件 在Server Setting中可以看到两个选项卡,‘Basic’和‘Security’。在Basic选项卡下的选项含义如下: - 工作组 - 用户要连接的电脑所在工作组的名字。比如,如果你想连接到一台Windows电脑,你就要输入Windows电脑的工作组名字。在Windows的Samba服务器设置中,已经默认设置好统一的工作组名字。但如果你有不同的工作组名字,就在这个字段中输入自定义的工作组名字。(在Windows 7中获取工作组名字,右击计算机图标,进到属性,就能看到Windows工作组名字。) -- 描述 - 其他用户看到的你的电脑名字。不要使用空格或计算机不支持(望更正!)的字符。 +- 描述 - 其他用户看到的你的电脑名字。不要使用空格或不适用于网络的字符。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/samba-server-settings.png) @@ -101,14 +101,14 @@ Samba是一个允许用户通过网络共享文件、文档和打印机的软件 现在我们需要为网络共享文件创建一个系统用户。下面是非常简单的步骤: - 在Systems Settings下点击**User Accounts**。 -- 点击**unlock**使其可用,以及+(**plus**)图标。 -- 点击+(plus)图标,创建一个新的系统用户。 +- 点击**unlock**使其可用,以及+(**加号**)图标。 +- 点击+(加号)图标,创建一个新的系统用户。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/create-system-user1.jpg) 如上图所示,需要输入‘Full name’。当你输入‘Full name’时,Username会自动填充为Full name。因为创建这个用户是为了共享文件,所以还要指定Account Type为‘**Standard**’。 -完成上述步骤,点击添加,你就创建好一个系统用户。这个用户还没有被激活,所以需要为其设置密码来激活。确保Users accounts界面已经解锁。点击Account disabled。输入一个新密码,然后确认密码,点击Change。 +完成上述步骤,点击添加,你就创建好一个系统用户。这个用户还没有被激活,所以需要为其设置密码来激活。确保Users accounts界面已经解锁。点击尚不可用的账户,输入一个新密码,然后确认密码,点击Change。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/activate-system-user.jpg) @@ -132,7 +132,7 @@ Samba是一个允许用户通过网络共享文件、文档和打印机的软件 #### 通过网络共享文件夹或文件 #### -在图形用户界面下通过Samba共享文件是很简单的。点击Plus图标,会看到如图所示的对话框: +在图形用户界面下通过Samba共享文件是很简单的。点击加号图标,会看到如图所示的对话框: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/share-files-and-folders.jpg) @@ -157,9 +157,8 @@ Samba是一个允许用户通过网络共享文件、文档和打印机的软件 全部搞定!我们也可以使用终端进行网络文件共享,但这样没有本文介绍的方法这么容易。如果你确实想知道命令行操作,我会再写一篇关于在Linux上使用命令行实现网络文件共享的文章。 -所以,你是怎么找到这篇教程的呢?我希望看了这篇教程你可以**很容易地在Ubuntu和Windows之间共享文件**。如果你有任何问题或建议,请再评论里说出来。 +所以,你是怎么找到这篇教程的呢?我希望看了这篇教程你可以**很容易地在Ubuntu和Windows之间共享文件**。如果你有任何问题或建议,请在评论里说出来。 -这篇教程是在Kalc的请求下写出的。如果你也想,你可以[请求你自己的教程][2]。我们很乐意帮助你和面临同样问题的读者解决问题。 -------------------------------------------------------------------------------- @@ -167,7 +166,7 @@ via: http://itsfoss.com/share-folders-local-network-ubuntu-windows/ 作者:[Mohd Sohail][a] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 0a3d2011be313b73cdca6c21f2dde13290b5c635 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 19 May 2015 11:29:11 +0800 Subject: [PATCH 0879/2517] PUB:20150123 How to make a file immutable on Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @goreliu  翻译的不错。https://linux.cn/article-5467-1.html --- ...0123 How to make a file immutable on Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150123 How to make a file immutable on Linux.md (74%) diff --git a/translated/tech/20150123 How to make a file immutable on Linux.md b/published/20150123 How to make a file immutable on Linux.md similarity index 74% rename from translated/tech/20150123 How to make a file immutable on Linux.md rename to published/20150123 How to make a file immutable on Linux.md index 8c22e3a2b8..493b0096be 100644 --- a/translated/tech/20150123 How to make a file immutable on Linux.md +++ b/published/20150123 How to make a file immutable on Linux.md @@ -1,9 +1,9 @@ 如何在Linux下创建一个不可变更的文件 ================================================================================ -假如你想对Linux中的一些重要文件做写保护,这样它们就不能被删除或者被篡改成之前的版本或者其他东西。或者在其他情况,你可能想避免某些配置文件被软件自动修改。使用`chown`和`chmod`命令修改文件的归属关系或者权限位是处理这种情况的一个解决方法,但这并不完美,因为这样无法避免有root权限的操作。这时`chattr`就派上用场了。 +假如你想对Linux中的一些重要文件做写保护,这样它们就不能被删除或者被篡改成之前的版本或者其他东西,或者在其他情况下,你可能想避免某些配置文件被软件自动修改。使用`chown`和`chmod`命令修改文件的归属关系或者权限位是处理这种情况的一个解决方法,但这并不完美,因为这样无法避免有root权限的操作。这时`chattr`就派上用场了。 -`chattr`是一个可以设置或取消文件的标志位的Linux命令,它和标准的文件权限(读、写、执行)是分离的。与此相关的另一个命令是`lsattr`,它可以显示文件的哪些标志位被设置上了。最初只有EXT文件系统(EXT2/3/4)支持`chattr`和`lsattr`所管理的标志位,但现在很多其他的本地Linux文件系统都支持了,比如XFS、Btrfs、ReiserFS等等。 +`chattr`是一个可以设置或取消文件的标志位的Linux命令,它和标准的文件权限(读、写、执行)是分离的。与此相关的另一个命令是`lsattr`,它可以显示文件的哪些标志位被设置上了。最初只有EXT文件系统(EXT2/3/4)支持`chattr`和`lsattr`所管理的标志位,但现在很多其他的原生的Linux文件系统都支持了,比如XFS、Btrfs、ReiserFS等等。 在这个教程中,我会示范如果使用`chattr`来让Linux中的文件不可变更。 @@ -22,7 +22,7 @@ - **c**: 当被写入磁盘时被自动压缩。 - **C**: 关掉“写时复制”。 - **i**: 不可变更。 -- **s**: 通过自动归零来安全删除。(译注:一般情况文件被删后内容不会被修改,改标志位会使得文件被删后原有内容被0取代) +- **s**: 通过自动归零来安全删除。(LCTT 译注:一般情况文件被删后内容不会被修改,改标志位会使得文件被删后原有内容被“0”取代) ### “不可变更”标志位 ### @@ -30,11 +30,11 @@ $ sudo chattr +i /etc/passwd -注意设置或取消一个文件的“不可变更”标志位是需要根用户权限的。现在检查该文件“不可变更”标志位是否被添加上了。 +注意设置或取消一个文件的“不可变更”标志位是需要root用户权限的。现在检查该文件“不可变更”标志位是否被添加上了。 $ lsattr /etc/passwd -一旦文件被设置为不可变更,任何用户都将无法修改该文件。即使是根用户也不可以修改、删除、覆盖、移动或者重命名这个文件。如果你想再次修改这个文件,需要先把“不可变更”标志位取消了。 +一旦文件被设置为不可变更,任何用户都将无法修改该文件。即使是root用户也不可以修改、删除、覆盖、移动或者重命名这个文件。如果你想再次修改这个文件,需要先把“不可变更”标志位取消了。 用如下命令取消“不可变更”标志位: @@ -54,11 +54,11 @@ $ sudo chattr +a /var/log/syslog -注意当你复制一个“不可变更”或者“只可追加”的文件到其他地方后,新文件不会保留这些标志位。 +注意当你复制一个“不可变更”或者“只可追加”的文件到其他地方后,新文件不会保留这些标志位! ### 结论 ### -在这个教程中,我展示了如何使用`chattr`和`lsattr`命令来管理额外的文件标志位,来避免文件被篡改(意外或者其他情况)的方法。注意你不能将`chattr`作为一个安全措施,因为“不可变更”标志位可以很容易被取消掉。解决这个问题的一个可能的方式是限制`chattr`命令自身的可用性,或者剥夺CAP_LINUX_IMMUTABLE内核权能标志。关于`chattr`以及可用的标志位的更多细节,请参考它的man手册。 +在这个教程中,我展示了如何使用`chattr`和`lsattr`命令来管理额外的文件标志位,来避免文件被篡改(意外或者其他情况)的方法。注意你不能将`chattr`作为一个安全措施,因为“不可变更”标志位可以很容易被取消掉。解决这个问题的一个可能的方式是限制`chattr`命令自身的可用性,或者去掉CAP_LINUX_IMMUTABLE内核权能标志。关于`chattr`以及可用的标志位的更多细节,请参考它的man手册。 -------------------------------------------------------------------------------- @@ -66,7 +66,7 @@ via: http://xmodulo.com/make-file-immutable-linux.html 作者:[Dan Nanni][a] 译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 64adbec1e8e78adba0ef9e487ba61b7c3c2a3b32 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 19 May 2015 13:26:38 +0800 Subject: [PATCH 0880/2517] Translating by ZTinoZ --- ...o After Installing Ubuntu 15.04 Desktop.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index 9c43d734a8..593d9c761d 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -36,7 +36,7 @@ Install Drivers ### 3. 安装Synaptic和Gdebi工具 ### -Besides Ubuntu Software Center, Synaptic is a Graphical utility for apt command line through which you can manage repositories or install, remove, search, upgrade and configure software packages. Similar way, Gdebi has the same functionality for local .deb packages. To install this two package managers on your system issue the following command on Terminal: +除了Ubuntu Software Center,Synaptic是一个apt图形化工具,通过它你能管理、安装、卸载、搜索和升级软件库并配置软件包。同样的,Gdebi在功能上也有相同的地方。在终端上输入以下命令来安装这两个包: $ sudo apt-get install synaptic gdebi @@ -48,7 +48,7 @@ Synaptic Package Manager ### 4. 更改系统外观和运行状态 ### -If you want to change Desktop Background or Launcher Icon Size, open System Settings –> Appearance –> Look and personalize the desktop. To move the menu to window title bar, enable workspaces and desktop icons or auto-hide the Launcher visit Behavior tab. +如果你想要更改桌面背景或图标大小,依次打开System Settings –> Appearance –> Look并对桌面进行个性化设置,把菜单移动到窗口标题栏,在Behavior标签中启动workspaces和desktop icons或开关auto-hide the Launcher。 ![System Appearances](http://www.tecmint.com/wp-content/uploads/2015/04/system-appearance.jpg) System Appearances @@ -61,16 +61,16 @@ System Security Enhancement ![System Security Options](http://www.tecmint.com/wp-content/uploads/2015/04/system-security-2.jpg) System Security Options -### 5. 禁用不需要开机自启动的应用程序 ### +### 6. 禁用不需要开机自启动的应用程序 ### -To improve system login speed, reveal hidden Startup Applications by issuing the below command on Terminal, open Startup Applications utility by searching it in Dash and uncheck the unneeded applications during login process. +要提高登录系统的速度,通过输入以下命令来显示被隐藏的开机启动应用程序,在Dash中搜索它就能打开Startup Applications工具并反选不需要再登录系统的过程中启动的程序。 $ sudo sed -i ‘s/NoDisplay=true/NoDisplay=false/g’ /etc/xdg/autostart/*.desktop ![Disable Unwanted Applications](http://www.tecmint.com/wp-content/uploads/2015/04/disable-unwanted-applications.jpg) Disable Unwanted Applications -### 6. 添加扩展多媒体支持 ### +### 7. 添加扩展多媒体支持 ### By default, Ubuntu comes with a minimal support for media files. In order to play various media formats or manipulate video files, install the following multimedia applications: @@ -108,7 +108,7 @@ To enable DVD Playback and other multimedia codecs issue the following command o ![Enable Video Codes](http://www.tecmint.com/wp-content/uploads/2015/04/enable-video-playbacks.jpg) Enable Video Codes -### 7. 安装图像处理应用程序 ### +### 8. 安装图像处理应用程序 ### If you are a photography enthusiast and you want to handle and manipulate images on Ubuntu, probably you want to install the following imaging programs: @@ -131,7 +131,7 @@ Install Image Applications ![Rawtherapee Tool](http://www.tecmint.com/wp-content/uploads/2015/04/rawtherapee.jpg) Rawtherapee Tool -### 8. 安装媒体烧录软件 ### +### 9. 安装媒体烧录软件 ### To mount ISO images or burn a CDs or a DVD, you can choose and install from the following software: @@ -148,7 +148,7 @@ To mount ISO images or burn a CDs or a DVD, you can choose and install from the ![Install Media Burners](http://www.tecmint.com/wp-content/uploads/2015/04/install-media-burners.jpg) Install Media Burners -### 9. 安装压缩应用程序 ### +### 10. 安装压缩应用程序 ### To handle most of archive formatted files (zip, tar.gz, zip, 7zip rar etc) install the following packages by issuing the below command: @@ -157,7 +157,7 @@ To handle most of archive formatted files (zip, tar.gz, zip, 7zip rar etc) insta ![Install Archive Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-archive-apps.jpg) Install Archive Applications -### 10. 安装聊天应用程序 ### +### 11. 安装聊天应用程序 ### If you want to talk to people all over the world, here is a list of the most popular chat applications for Linux: @@ -186,7 +186,7 @@ To install Viber application on Ubuntu visit [Viber official webpage][1], downlo ![Install Viber in Ubuntu](http://www.tecmint.com/wp-content/uploads/2015/04/install-viber.jpg) Install Viber -### 11. 安装种子软件 ### +### 12. 安装种子软件 ### The most popular torrent applications and peer-to-peer file sharing programs for Ubuntu are: @@ -205,7 +205,7 @@ To install your favorite peer-to-peer file sharing application on Ubuntu issue t ![Install Torrent](http://www.tecmint.com/wp-content/uploads/2015/04/install-torrent.jpg) Install Torrent -### 12. 安装Windows仿真器-Wine和游戏支持平台-Steam ### +### 13. 安装Windows仿真器-Wine和游戏支持平台-Steam ### Wine emulator allows you to install and run Windows applications on Linux. On the other hand, Steam is a popular gaming platform for Linux based systems developed by Valve. To install both of them on your machine issue the following command on Terminal or use Ubuntu Software Center. @@ -214,7 +214,7 @@ Wine emulator allows you to install and run Windows applications on Linux. On th ![Install Wine](http://www.tecmint.com/wp-content/uploads/2015/04/install-wine.jpg) Install Wine -### 13. 安装Cairo-Dock并启用桌面视觉效果 ### +### 14. 安装Cairo-Dock并启用桌面视觉效果 ### Cairo-Dock is a beautiful and flexible launcher bar for Linux desktops similar to the Mac OS X dock. To install it on Ubuntu, run the following command on Terminal. @@ -244,7 +244,7 @@ Compiz Settings Addons ![Desktop Window Rotating](http://www.tecmint.com/wp-content/uploads/2015/04/desktop-cube.jpg) Desktop Window Rotating -### 14. 添加额外浏览器支持 ### +### 15. 添加额外浏览器支持 ### Ubuntu 15.04 comes by default with Mozilla Firefox Web Browser. To install other browsers such as Google Chrome or Opera, visit their official web pages, download the provided .deb packages and install them on your system using the Gdebi Package Installer. @@ -258,7 +258,7 @@ To install Chromium Open Source browser issue the following command on Terminal. $ sudo apt-get install chromium-browser -### 15. 安装Tweak工具 ### +### 16. 安装Tweak工具 ### Want extra applications for customizing Ubuntu? Then install Unity Tweak Tool and Gnome Tweak Tool by issuing the following commands on Terminal. From bb33174d6e1fd06edeb1890769b38096937891cd Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Tue, 19 May 2015 13:50:33 +0800 Subject: [PATCH 0881/2517] [Translated] 20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md --- ...d Line Tips and Tricks in Linux--Part 1.md | 117 ------------------ ...d Line Tips and Tricks in Linux--Part 1.md | 115 +++++++++++++++++ 2 files changed, 115 insertions(+), 117 deletions(-) delete mode 100644 sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md create mode 100644 translated/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md diff --git a/sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md b/sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md deleted file mode 100644 index 073e5f9370..0000000000 --- a/sources/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md +++ /dev/null @@ -1,117 +0,0 @@ -Translating by goreliu ... - -5 Interesting Command Line Tips and Tricks in Linux – Part 1 -================================================================================ -Are you making most out of the Linux? There are lots of helpful features which appears to be Tips and Tricks for many of Linux Users. Sometimes Tips and Tricks become the need. It helps you get productive with the same set of commands yet with enhanced functionality. - -![5 Command Line Tips and Tricks](http://www.tecmint.com/wp-content/uploads/2015/03/5-Command-Line-Tips.jpg) -5 Command Line Tips and Tricks - -Here we are starting a new series, where we will be writing some tips and tricks and will try to yield as more as we can in small time. - -### 1. To audit the commands we’d run in past, we use [history command][1]. Here is a sample output of history command. ### - - # history - -![history command example](http://www.tecmint.com/wp-content/uploads/2015/03/history-command.gif) -history command example - -Obvious from output, the history command do not output the time stamp with the log of last executed commands. Any solution for this? Yeah! Run the below command. - - # HISTTIMEFORMAT="%d/%m/%y %T " - # history - -If you want to permanently append this change, add the below line to `~/.bashrc`. - - export HISTTIMEFORMAT="%d/%m/%y %T " - -and then, from terminal run, - - # source ~/.bashrc - -Explanation of commands and switches. - -- history – GNU History Library -- HISTIMEFORMAT – Environmental Variable -- %d – Day -- %m – Month -- %y – Year -- %T – Time Stamp -- source – in short send the contents of file to shell -- .bashrc – is a shell script that BASH runs whenever it is started interactively. - -![history Command Logs](http://www.tecmint.com/wp-content/uploads/2015/03/History-Command-Logs.gif) -history Command Logs - -### 2. The next gem in the list is – how to check disk write speed? Well one liner dd command script serves the purpose. ### - - # dd if=/dev/zero of=/tmp/output.img bs=8k count=256k conv=fdatasync; rm -rf /tmp/output.img - -![dd Command Example](http://www.tecmint.com/wp-content/uploads/2015/03/dd-Command-Example.gif) -dd Command Example - -Explanation of commands and switches. - -- dd – Convert and Copy a file -- if=/dev/zero – Read the file and not stdin -- of=/tmp/output.img – Write to file and not stdout -- bs – Read and Write maximum upto M bytes, at one time -- count – Copy N input block -- conv – Convert the file as per comma separated symbol list. -- rm – Removes files and folder -- -rf – (-r) removes directories and contents recursively and (-f) Force the removal without prompt. - -### 3. How will you check the top six files that are eating out your space? A simple one liner script made from [du command][2], which is primarily used as file space usages. ### - - # du -hsx * | sort -rh | head -6 - -![Check Disk Space Usage](http://www.tecmint.com/wp-content/uploads/2015/03/check-disk-space-usage.gif) -Check Disk Space Usage - -Explanation of commands and switches. - -- du – Estimate file space usages -- -hsx – (-h) Human Readable Format, (-s) Summaries Output, (-x) One File Format, skip directories on other file format. -- sort – Sort text file lines -- -rf – (-r) Reverse the result of comparison, (-f) Ignore case -- head – output first n lines of file. - -### 4. The next step involves statistics in terminal of a file of every kind. We can output the statistics related to a file with the help of stat (output file/fileSystem status) command. ### - - # stat filename_ext (viz., stat abc.pdf) - -![Check File Statistics](http://www.tecmint.com/wp-content/uploads/2015/03/Check-File-Statistics.gif) -Check File Statistics - -### 5. The next and last but not the least, this one line script is for those, who are newbies. If you are an experienced user you probably don’t need it, unless you want some fun out of it. Well newbies are Linux-command-line phobic and the below one liner will generate random man pages. The benefit is as a newbie you always get something to learn and never get bored. ### - - # man $(ls /bin | shuf | head -1) - -![Generate Random Man Pages](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Man-Pages.gif) -Generate Random Man Pages - -Explanation of commands and switches. - -- man – Linux Man pages -- ls – Linux Listing Commands -- /bin – System Binary file Location -- shuf – Generate Random Permutation -- head – Output first n line of file. - -That’s all for now. If you know any such tips and tricks you may share with us and we will post the same in your words on our reputed Tecmint.com website. - -If you want to share any tips and tricks that you cannot make into article you may share it at tecmint[dot]com[at]gmail[dot]com and we will include it in our article. Don’t forget to provide us with your valuable feedback in the comments below. Keep connected. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/5-linux-command-line-tricks/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/history-command-examples/ -[2]:http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ diff --git a/translated/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md b/translated/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md new file mode 100644 index 0000000000..6bf88dba2c --- /dev/null +++ b/translated/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md @@ -0,0 +1,115 @@ +5个有趣的Linux命令行技巧(第一部分) +================================================================================ +你有将Linux物尽其用吗?对很多Linux用户来说,有很多看起来是技巧的有用特性。有些时候你会需要这些技巧。本文会帮助你更好得使用一些命令,发挥其更强大的功能。 + +![5个命令行技巧](http://www.tecmint.com/wp-content/uploads/2015/03/5-Command-Line-Tips.jpg) +图1:5个命令行技巧 + +我们开始一个新的系列,在这里我们还会写一些技巧,并且用尽量小的篇幅写清楚。 + +### 1. 我们可以使用[`history`命令][1]来查看曾经运行过的命令。这里是一个`history`命令的示例输出。 ### + + # history + +![history命令例子](http://www.tecmint.com/wp-content/uploads/2015/03/history-command.gif) +图2:history命令例子 + +从`history`命令输出看,很明显,命令的执行时间没有被打出来。有解决方法吗?有的!运行如下命令: + + # HISTTIMEFORMAT="%d/%m/%y %T " + # history + +如果你想让这个修改永久生效,添加如下的一行内容到`~/.bashrc`文件中: + + export HISTTIMEFORMAT="%d/%m/%y %T " + +然后,在终端中运行: + + # source ~/.bashrc + +命令和选项的解释: + +- history – 查看运行过的命令 +- HISTIMEFORMAT – 设置时间格式的环境变量 +- %d – 天 +- %m – 月 +- %y – 年 +- %T – 时间戳 +- source – 简而言之就是将文件内容发送给shell来执行 +- .bashrc – BASH以交互方式启动时运行的脚本文件 + +![history命令输出的日志](http://www.tecmint.com/wp-content/uploads/2015/03/History-Command-Logs.gif) +图3:`history`命令输出的日志 + +### 2. 如何测试磁盘写入速度?一行`dd`命令脚本就可以实现。### + + # dd if=/dev/zero of=/tmp/output.img bs=8k count=256k conv=fdatasync; rm -rf /tmp/output.img + +![dd命令例子](http://www.tecmint.com/wp-content/uploads/2015/03/dd-Command-Example.gif) +图4:`dd`命令例子 + +命令和选项的解释: + +- dd – 转换和复制文件 +- if=/dev/zero – 指定输入文件,默认为stdin(标准输入) +- of=/tmp/output.img – 指定输出文件,默认为stdout(标准输出) +- bs – 一次读和写的大小,最大可以以MB为单位 +- count – 复制次数 +- conv – 使用逗号分隔的策略来转换文件(LCTT 译注:比如将大写字母转换成小写,echo AA | dd conv=lcase) +- rm – 删除文件和目录 +- -rf – (-r) 递归地删除目录和其中的内容,(-f)强行删除而不输出确认信息 + +### 3. 你如何获取吃掉你磁盘空间的最大的6个文件?一个使用[`du`命令][2]的简单单行脚本即可实现,`du`命令主要用于获取文件的空间使用情况。### + + # du -hsx * | sort -rh | head -6 + +![获取磁盘空间使用情况的方法](http://www.tecmint.com/wp-content/uploads/2015/03/check-disk-space-usage.gif) +图5:获取磁盘空间使用情况的方法 + +命令和选项的解释: + +- du – 估计文件的空间使用情况 +- -hsx – (-h)更易读的格式,(-s)汇总输出,(-x)跳过其他文件系统的文件 +- sort – 对文本文件按行排序 +- -rf – (-r)将比较的结果逆序输出,(-f)忽略大小写 +- head – 输出文件的头几行 + +### 4. 获取一个文件的详细状态信息,可以使用`stat`命令。 ### + + # stat filename_ext (例如:stat abc.pdf) + +![获取文件的详细信息](http://www.tecmint.com/wp-content/uploads/2015/03/Check-File-Statistics.gif) +图6:获取文件的详细信息 + +### 5. 最后一个技巧是为那些入门者准备的,如果你是有经验的用户,可能不需要它,除非你想从中寻找乐趣。入门者可能有Linux命令行恐惧症,下面的命令会随机显示一个man手册页。对入门者来说,好处是总会学到新的东西,而且不会厌倦。 ### + + # man $(ls /bin | shuf | head -1) + +![查看随机的man手册页](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Man-Pages.gif) +图7:查看随机的man手册页 + +命令和选项的解释: + +- man – Linux man手册 +- ls – 列出文件 +- /bin – 系统可执行文件的路径 +- shuf – 把输入内容按行随机打乱并输出 +- head – 输出文件的头几行 + +这就是所有的内容了。如果你知道任何类似的技巧,可以分享给我们,我们会用你的语言在Tecmint.com网站上发表出来。 + +如果你想分享任何技巧,但不想写成文章,可以发到tecmint[dot]com[at]gmail[dot]com,我们会将其包含在我们的文章中。不要忘记在下边评论框中留下有价值的反馈。保持联系。可以点赞或者将本文分享来帮助我们更好地传播内容。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/5-linux-command-line-tricks/ + +作者:[Avishek Kumar][a] +译者:[goreliu](https://github.com/goreliu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/history-command-examples/ +[2]:http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ \ No newline at end of file From c2432fc19480b512e85308923e81144b988f7c00 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Tue, 19 May 2015 14:14:02 +0800 Subject: [PATCH 0882/2517] [Translating] 20150423 20 Awesome Docker Containers for a Desktop User.md --- .../20150423 20 Awesome Docker Containers for a Desktop User.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md b/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md index 060aeb755d..00786e9bde 100644 --- a/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md +++ b/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md @@ -1,3 +1,5 @@ +Translating by gaoliu ... + 20 Awesome Docker Containers for a Desktop User ================================================================================ Greetings to everyone, today we'll list out some awesome Desktop Apps that we can run using Docker Containers in our very own Desktop running Docker. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. It is basically used by the developers, Ops and Engineers as it is easy, fast and handy tool for testing or deploying their products but we can also use Docker for our Desktop usage to run a desktop apps out of the box. From 9b1572335910695bdd0d99d9e0962081d79fb135 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 19 May 2015 14:22:43 +0800 Subject: [PATCH 0883/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=20tech/20150518=20Linux=20FAQs=20with=20Answers--How=20to=20fi?= =?UTF-8?q?x=20'Encountered=20a=20section=20with=20no=20Package--header'?= =?UTF-8?q?=20error=20on=20Raspbian=20tech/20150518=20Linux=20FAQs=20with?= =?UTF-8?q?=20Answers--How=20to=20fix=20'fatal=20error--security=20or=20pa?= =?UTF-8?q?m=5Fmodules.h--No=20such=20file=20or=20directory'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...with no Package--header' error on Raspbian.md | 12 ++++++------ ... pam_modules.h--No such file or directory'.md | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) rename {sources => translated}/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md (51%) rename {sources => translated}/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md (51%) diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md b/translated/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md similarity index 51% rename from sources/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md rename to translated/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md index f79090e1da..54e0f393d1 100644 --- a/sources/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md +++ b/translated/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md @@ -1,18 +1,18 @@ -Linux FAQs with Answers--How to fix “Encountered a section with no Package: header” error on Raspbian +Linux 有问必答--如何修复 Raspbian 上的 “Encountered a section with no Package: header” 错误 ================================================================================ -> **Question**: I installed fresh Rasbian on Raspberry Pi. But when I tried to update APT package index by running sudo apt-get update, it throws the following error: +> **问题**: 我在 Raspberry Pi 上安装新版的 Rasbian。但当我使用 sudo apt-get update 命令更新 APT 软件包索引的时候,它抛出下面的错误: E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/dpkg/status E: The package lists or status file could not be parsed or opened. -> I then cannot install any package on Raspbian. How can I solve this error? +> 之后我不能在 Raspbian 上安装任何软件包。我怎样才能解决这个错误? ![](https://farm8.staticflickr.com/7704/17445484636_05ba81722f_c.jpg) -The error saying "Problem with MergeList /var/lib/dpkg/status" indicates that the status file got corrupted for some reason, and so cannot be parsed. This status file contains information about installed deb packages, and thus needs to be carefully backed up. +错误说 "Problem with MergeList /var/lib/dpkg/status" 表示由于某些原因状态文件损坏了,因此无法解释。这个状态文件包括了已经安装的 deb 软件包的信息,因此需要小心备份。 -In this case, since this is freshly installed Raspbian, you can safely remove the status file, and re-generate it as follows. +在这种情况下,由于这是新安装的 Raspbian,你可以安全地删除状态文件,然后用下面的命令重新生成。 $ sudo rm /var/lib/dpkg/status $ sudo touch /var/lib/dpkg/status @@ -23,7 +23,7 @@ In this case, since this is freshly installed Raspbian, you can safely remove th via: http://ask.xmodulo.com/encountered-section-with-no-package-header-error.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](https://github.com/ictlyh) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md b/translated/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md similarity index 51% rename from sources/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md rename to translated/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md index 55c17e1669..0e2d0ab54c 100644 --- a/sources/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md +++ b/translated/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md @@ -1,22 +1,22 @@ -Linux FAQs with Answers--How to fix “fatal error: security/pam_modules.h: No such file or directory” +Linux 有问必答--如何修复 “fatal error: security/pam_modules.h: No such file or directory” ================================================================================ -> **Question**: I was trying to compile a program on [insert your Linux distro], but was getting the following compile error: +> **问题**: 我尝试在 [插入你的 Linux 发行版] 上编译程序,但是出现下面的编译错误: > > "pam_otpw.c:27:34: fatal error: security/pam_modules.h: No such file or directory" > -> How can I fix this error? +> 我怎样才能修复这个错误? -The missing header file 'security/pam_modules.h' is part of development files for libpam, a PAM (Pluggable Authentication Modules) library. Thus to fix this error, you need to install libpam development package, as described below. +缺失的头文件 'security/pam_modules.h' 是 libpam 开发版的一部分,一个 PAM(Pluggable Authentication Modules:插入式验证模块)库。因此要修复这个错误,你需要安装 libpam 开发包,如下所示。 -On Debian, Ubuntu or Linux Mint: +对于 Debian、 Ubuntu 或者 Linux Mint: $ sudo apt-get install libpam0g-dev -On CentOS, Fedora or RHEL: +对与 CentOS、 Fedora 或者 RHEL: $ sudo yum install gcc pam-devel -Now verify that the missing header file is installed under /usr/include/security. +现在验证缺失的头文件是否安装到了 /usr/include/security。 ![](https://farm8.staticflickr.com/7751/16819069693_fa961f0d40_b.jpg) @@ -25,7 +25,7 @@ Now verify that the missing header file is installed under /usr/include/security via: http://ask.xmodulo.com/fatal-error-security-pam-modules.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](https://github.com/ictlyh) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 251b64df9b4957eeba996357204aa85fdc31194a Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 19 May 2015 15:10:18 +0800 Subject: [PATCH 0884/2517] PUB:20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server @wi-cuckoo --- ... Tools To Connect To Your Linux Server .md | 82 +++++++++++++++++++ ... Tools To Connect To Your Linux Server .md | 81 ------------------ 2 files changed, 82 insertions(+), 81 deletions(-) create mode 100644 published/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md delete mode 100644 translated/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md diff --git a/published/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md b/published/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md new file mode 100644 index 0000000000..d75ecbb555 --- /dev/null +++ b/published/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md @@ -0,0 +1,82 @@ +Windows 下的免费 SSH 客户端工具 +================================================================================ + +如果你的操作系统是 Windows,而你想要连接 Linux 服务器相互传送文件,那么你需要一个简称 SSH 的 Secure Shell 软件。实际上,SSH 是一个网络协议,它允许你通过网络连接到 Linux 和 Unix 服务器。SSH 使用公钥加密来认证远程的计算机。你可以有多种途径使用 SSH,无论是自动连接,还是使用密码认证登录。 + +本篇文章介绍了几种可以连接 Linux 服务器 SSH 客户端。 + +让我们开始。 + +### Putty ### + +**Putty** 是最有名的 SSH 和 telnet 客户端,最初由 Simon Tatham 为 Windows 平台开发。Putty 是一款开源软件,有可用的源代码,和一群志愿者的开发和支持。 + +![](http://www.unixmen.com/wp-content/uploads/2015/03/putty.png) + +Putty 非常易于安装和使用,通常大部分的配置选项你都不需要修改。你只需要输入少量基本的参数,就可以开始很简单地建立连接会话。[点此下载][1] Putty。 + +### Bitvise SSH Client ### + +**Bitvise SSH** 是一款支持 SSH 和 SFTP 的 Windows 客户端。由 Bitvise 开发和提供专业支持。这款 SSH 客户端性能强悍,易于安装、便于使用。Bitvise SSH 客户端拥有功能丰富的图形界面,通过一个有自动重连功能的内置代理进行动态端口转发。 + +![](http://www.unixmen.com/wp-content/uploads/2015/03/bitvise.png) + +Bitvise SSH 客户端对**个人用户使用是免费的**,同时对于在组织内部的个人商业使用也一样。你可以[在这里下载 Bitvise SSH 客户端][2]。 + +### MobaXterm ### + +**MobaXterm** 是你的**远程计算的终极工具箱**。在一个 Windows 应用里,它为程序员、网管、IT 管理员及其它用户提供了精心裁剪的一揽子功能,让他们的远程操作变得简约时尚。 + +![](http://www.unixmen.com/wp-content/uploads/2015/03/mobaxterm.png) + +MobaXterm 提供了所有重要的**远程网络工具** (如SSH、 X11、 RDP、 VNC、 FTP、 MOSH 等等),以及 Windows 桌面上的 **Unix 命令**(bash、 ls、 cat、sed、 grep、 awk、 rsync等等),而这些都是由一个开箱即用的**单一的便携程序**所提供。MobaXterm 对**个人使用免费**,你可以[在这里][3]下载 MobaXterm。 + +### DameWare SSH ### + +我认为 **DameWare SSH** 是最好的免费SSH客户端。 + +![](http://www.unixmen.com/wp-content/uploads/2015/03/ssh.png) + +这个免费工具是一个终端模拟器,可以让你从一个易用的控制台建立多个 telnet 和 SSH 连接。 + +-用一个带标签的控制台界面管理多个会话 +-将常用的会话保存在 Windows 文件系统中 +-使用多套保存的证书来轻松登录不同的设备 +-使用 telnet、SSH1 和 SSH2 协议连接计算机和设备 + +你可以从[这个链接][4]下载 **DameWare SSH**。 + +### SmarTTY ### +  +SmarTTY 是一款免费的多标签 SSH 客户端,支持使用 SCP 命令随时复制文件和目录。 + +![](http://www.unixmen.com/wp-content/uploads/2015/03/smart.png) + +大多数 SSH 服务器每个连接支持最多10个子会话.SmarTTY 在这方面做得很好:没有烦人的多个窗口,不需要重新登录,仅仅打开一个新的标签页就可以开始了! + +### Cygwin ### + +Cygwin 是一款 GNU 和开源工具的大杂烩,提供的功能近似于一个 Windows 平台下的 Linux。 + +![](http://www.unixmen.com/wp-content/uploads/2015/03/cyq.png) + +**Cygwin** 包括了一个称为模拟库的 Unix 系统:cygwin.dll,集成了大量的 GNU 和其它的免费软件,以大量的可选包方式组织而成。在这些安装包中,有高质量的编译器和其他软件开发工具、一个X11服务器、一套完整的X11开发套件、GNU emacs 编辑器、Tex 和 LaTeX、openSSH(客户端和服务器),除此之外还有很多,包括在微软 Windows 下需要编译和使用 PhysioToolkit 软件的每一样东西。 + +读完我们的文章后,不知你中意哪一款 SSH 客户端?你可以留下你的评论,描述你喜欢的系统和选择的原因。当然,如果有另外的 SSH 客户端没有被本文列举出来,你可以帮助我们补充。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/list-free-windows-ssh-client-tools-connect-linux-server/ + +作者:[anismaj][a] +译者:[wi-cuckoo](http://github.com/wi-cuckoo) +校对:[wxy](http://github.com/wxy) + +本文由 [LCTT](http://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/anis/ +[1]:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html +[2]:http://www.bitvise.com/download-area +[3]:http://mobaxterm.mobatek.net/download.html +[4]:http://www.dameware.com/downloads/registration.aspx?productType=ssh&AppID=17471&CampaignID=70150000000PcNM +[5]:http://cygwin.com/packages/ diff --git a/translated/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md b/translated/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md deleted file mode 100644 index ccb4bc2fec..0000000000 --- a/translated/tech/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md +++ /dev/null @@ -1,81 +0,0 @@ -在windows下,连接你的Linux服务器的ssh免费客户端工具列举\ -================================================================================ -你的操作系统是Windows,而你想要连接Linux服务器相互传送文件.于是你需要一个Secure Shell,简称SSH.实际上,SSH是一个网络协议,允许你通过网络连接到Linux和Unix服务器.SSH使用公钥加密来认证远程的计算机.你可以有多种途径使用SSH,要么自动地连接,或者使用密码认证登录. - -本篇文章讲述了几种SSH客户端,供选择使用来连接你的Linux服务器. - -我们开始. - -### Putty ### - -**Putty**是最有名的SSH和telnet客户端,最初由Simon Tatham为Windows平台开发.Putty是一款开源软件,有可用的源代码,和一群志愿者的发展和支持. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/putty.png) - -Putty非常易于安装和使用,通常你不需要改大部分的配置选项.你只需要输入少量基本的参赛,就可以开始最简单的对话连接[here][1]. - -### Bitvise SSH Client ### - -**Bitvise SSH **是一款支持SSH和SFTP的Windows客户端.由Bitvise专业地提供支持和发展.这款SSH客户端性能强悍,易于安装和使用.Bitvise SSH客户端功能丰富,拥有图形界面,通过一个有自动重连能力的内置代理允许用户动态端口运行. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/bitvise.png) - -Bitvise SSH客户端对个人用户使用**是**免费的,同时对于在组织内部的单独商业使用也一样.你可以[在这里下载Bitvise SSH客户端][2] - -### MobaXterm ### - -**M偶吧Xterm**是你的**终极工具箱,解决远程计算**.在单一的Windows应用里,它提供了许多裁剪过的的功能,针对程序员,网络管理者,IT管理员和相当一部分需要在更简单界面(此处原文为in a more simple fashion,有点费解)远程作业的用户. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/mobaxterm.png) - -MobaXterm提供了所有重要的**远程网络工具** (如SSH, X11, RDP, VNC, FTP, MOSH 等等),和**Unix 命令**(bash, ls, cat, sed, grep, awk, rsync等等)适用于Windows桌面,在一个**单独便于携带的可执行文件里**,其工作独立于工具箱.MobaXterm对**个人使用免费**.你可以下载MobaXterm[在这里][3]. - -### DameWare SSH ### - -我认为**DameWare SSH**是最好的免费SSH客户端. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/ssh.png) - -这个免费工具是一个终端模拟器,可以让你实现从一个易用控制台的多种telnet和SSH连接. - --用一个带标签的控制台界面管理多方会话 --在Windows文件系统中保存喜欢的会话 --获取多个保存的证书集合,用于轻松登录不同的设备 --使用telnet,SSH1和SSH2协议连接计算机和设备 - -你可以从[这个链接][4]下载 **DameWare SSH** - -### SmarTTY ### -  -SmarTTY是一款免费的多标签SSH客户端,支持使用SCP命令及时复制文件和目录 - -![](https://www.unixmen.com/wp-content/uploads/2015/03/smart.png) - -大多数SSH服务器每次连接支持最多10个子会话.SmarTTY在这方面做得很好:没有烦人的多个窗口,不需要重新登录,仅仅打开一个新的标签页就可以开始了! - -### Cygwin ### - -Cygwin是一款GNU和开源工具的大杂烩,提供的功能近似一个Windows平台下的Linux. - -![](https://www.unixmen.com/wp-content/uploads/2015/03/cyq.png) - -**Cygwin**包括了一个Unix系统,集模拟库,cygwin.dll,GNU大量集合和其他被归类了的大量可选免费应用软件包.在这些安装包中,有高质量的编译器和其他软件开发工具,一个X11服务器,一套完整的X11开发套件,GNU emacs编辑器,Tex和LaTeX,openSSH(客户端和服务器),除此之外还有很多,包括在微软Windows下需要编译和使用PhysioToolkit软件的每一样东西. - -读完我们的文章后,不知你中意哪一款SSH客户端?你可以留下你的评论,描述你喜欢的系统和选择的原因.当然,如果有另外的SSH客户端没有被本文列举出来,你可以帮助我们补充. - --------------------------------------------------------------------------------- - -via: https://www.unixmen.com/list-free-windows-ssh-client-tools-connect-linux-server/ - -作者:[anismaj][a] -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://www.unixmen.com/author/anis/ -[1]:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html -[2]:http://www.bitvise.com/download-area -[3]:http://mobaxterm.mobatek.net/download.html -[4]:http://www.dameware.com/downloads/registration.aspx?productType=ssh&AppID=17471&CampaignID=70150000000PcNM -[5]:http://cygwin.com/packages/ From c05eb203cea9cc0e7d4dcde70a1e55da5ef9b9b1 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 19 May 2015 22:13:56 +0800 Subject: [PATCH 0885/2517] PUB:20150316 How to access Gmail from the command line on Linux with Alpine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc 遇到 youtube 视频,可以将视频搬运到国内的视频网站,然后指向该视频,如果视频不太重要的话,可以仅仅留个 youtube 的链接即可。 --- ...m the command line on Linux with Alpine.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) rename {translated/tech => published}/20150316 How to access Gmail from the command line on Linux with Alpine.md (55%) diff --git a/translated/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md b/published/20150316 How to access Gmail from the command line on Linux with Alpine.md similarity index 55% rename from translated/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md rename to published/20150316 How to access Gmail from the command line on Linux with Alpine.md index ce347ad4e6..0d78b2fd34 100644 --- a/translated/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md +++ b/published/20150316 How to access Gmail from the command line on Linux with Alpine.md @@ -1,12 +1,13 @@ -如何在 Linux 中使用 Alpine 在命令行里获取 Gmail +如何在 Linux 中使用 Alpine 在命令行里访问 Gmail ================================================================================ -假如你是一个命令行爱好者,我很确信你将张开双臂欢迎任何可以使你使用这个强大的工作环境来执行哪怕一项日常任务的工具,例如从 [安排日程][1] 、 [管理财务][2] 到 获取 [Facebook][3] 、[Twitter][4]等任务。 -在这个帖子中,我将为你展示 Linux 命令行的另一个漂亮干练的使用案例:**获取 Google 的 Gmail 服务**,为此,我们将使用 Alpine,一个基于 ncurses 的多功能命令行邮件客户端(不要和 Alpine Linux 搞混淆)。我们将在 Alphine 中配置 Gmail 的 IMAP 和 SMTP 设定来通过 Google 的邮件服务器在终端环境中收取和发送邮件。在这个教程的最后,你将意识到只需几步就可以在 Alpine 中使用其他的邮件服务。 +假如你是一个命令行爱好者,我很确信你会使用这个强大的工作环境来执行哪怕是一项日常任务的工具,并为之欢呼,例如从 [安排日程][1] 、 [管理财务][2] 到 获取 [Facebook][3] 、[Twitter][4]等任务。(LCTT 译注:阅读本文的另一个前提是,假如你还能访问 Gmail 或者知道 Gmail 是什么的话。) -诚然,已有许多卓越的基于 GUI 的邮件客户端存在,例如 Thunderbird, Evolution 或者甚至是 Web 界面,那么为什么还有人对使用命令行的邮件客户端来收取 Gmail 这样的事感兴趣呢?答案很简单。假如你需要快速地处理好事情并想避免使用不必要系统资源;或者你正工作在一个最小化安装(注:这里我感觉自己翻译有误)的服务器上,而它没有安装 X 服务(注:这里也需要更改);又或者是 X 服务在你的桌面上崩溃了,而你需要在解决这个问题之前急切地发送一些邮件。在上述所有的情况下, Alpine 都可以派上用场并在任何时间满足你的需求。 +在这个帖子中,我将为你展示 Linux 命令行的另一个漂亮干练的使用案例:**访问 Google 的 Gmail 服务**,为此,我们将使用 Alpine,一个基于 ncurses 的多功能命令行邮件客户端(不要和 Alpine Linux 搞混淆)。我们将在 Alphine 中配置 Gmail 的 IMAP 和 SMTP 设定,通过 Google 的邮件服务器在终端环境中收取和发送邮件。在这个教程的最后,你将发现只需几步就可以在 Alpine 中使用其他的邮件服务。 -除了简单的编辑,发送和接收文本类的邮件信息等功能外, Alpine 还可以进行加密,解密和对邮件信息进行数字签名,以及与 TLS(注:Transport Layer Security) 无缝集成。 +诚然,已有许多卓越的基于 GUI 的邮件客户端存在,例如 Thunderbird, Evolution 或者甚至是 Web 界面,那么为什么还有人对使用命令行的邮件客户端来收取 Gmail 这样的事感兴趣呢?答案很简单。假如你需要快速地处理好事情并想避免浪费不必要系统资源;或者你正工作在一个精简安装无操作台的服务器上,它没有安装用于图形显示的 X 服务;又或者是 X 服务在你的桌面上崩溃了,而你需要在解决这个问题之前急切地发送一些邮件。在上述所有的情况下, Alpine 都可以派上用场并在任何时间满足你的需求。 + +除了简单的编辑,发送和接收文本类的邮件信息等功能外, Alpine 还可以进行加密,解密和对邮件信息进行数字签名,以及与 TLS(注:Transport Layer Security,传输层加密)无缝集成。 ### 在 Linux 上安装 Alpine ### @@ -22,16 +23,13 @@ # alpine -在你第一次启用 Alpine 时,它将在当前用户的家目录下创建一个邮件文件夹(`~/mail`),并显现出主界面,正如下面的截屏所显示的那样: - -注:youtube视频,发布的时候做个链接吧(注:这里我不知道该如何操作,不过我已经下载了该视频,如有需要,可以发送) - +在你第一次启用 Alpine 时,它将在当前用户的家目录下创建一个邮件文件夹(`~/mail`),并显现出主界面,正如下面的视频所显示的那样:YOUTUBU 视频 - http://www.youtube.com/kuKiv3uze4U 。 它的用户界面有下列几个模块: ![](https://farm9.staticflickr.com/8724/16618079590_6c236ce2c2_c.jpg) -请随意地浏览,操作来熟悉 Alpine。你总是可以在任何时候通过敲 'Q' 来回到命令提示符界面。请注意,所有的字符界面下方都有与操作相关的帮助。 +请随意地浏览、操作来熟悉 Alpine。你总是可以在任何时候通过敲 'Q' 来回到命令提示符界面。请注意,所有的字符界面下方都有与操作相关的帮助。 在进一步深入之前,我们将为 Alpine 创建一个默认的配置文件。为此,请关闭 Alpine,然后在命令行中执行下面的命令: @@ -39,9 +37,9 @@ ### 配置 Alpine 来使用 Gmail 账号 ### -一旦你安装了 Alpine 并至少花费了几分钟的时间来熟悉它的界面和菜单,下面便是实际配置它来使用一个已有的 Gmail 账户的时候了。 +当你安装了 Alpine 并至少花费了几分钟的时间来熟悉它的界面和菜单,下面便是实际配置它来使用一个已有的 Gmail 账户的时候了。 -在 Alpine 中执行下面的步骤之前,记得要通过你的 Web 邮件界面,在你的 Gmail 设定里启用 IMAP 协议。一旦在你的 Gmail 账户中 IMAP 被启用,执行下面的步骤来在 Alpine 中启用阅读 Gmail 信息的功能。 +在 Alpine 中执行下面的步骤之前,记得首先要通过你的 Web 邮件界面,在你的 Gmail 设定里启用 IMAP 协议。一旦在你的 Gmail 账户中启用了 IMAP ,执行下面的步骤来在 Alpine 中启用阅读 Gmail 信息的功能。 首先,启动 Alpine。 @@ -51,12 +49,12 @@ 按 'A' 来新建一个文件夹并填写必要的信息: -- **昵称**: 填写任何你想写的名字; -- **服务器**: imap.gmail.com/ssl/user=yourgmailusername@gmail.com +- **Nickname**: 填写任何你想写的名字; +- **Server**: imap.gmail.com/ssl/user=yourgmailusername@gmail.com 你可以将 `Path` 和 `View` 留白不填。 -然后按 `Ctrl+X` 并在有提示时输入你的 Gmail 密码: +然后按 `Ctrl+X` 并在提示时输入你的 Gmail 密码: ![](https://farm9.staticflickr.com/8611/16618079640_6f7dca336a_b.jpg) @@ -64,7 +62,7 @@ ![](https://farm8.staticflickr.com/7598/16804355052_10c1a6c5bd_b.jpg) -为了验证,你可以比较在 Alpine 中显示的 "Gmail Sent" 信箱和在 Web 界面下的信箱: +要验证的话,你可以比较在 Alpine 中显示的 "Gmail Sent" 信箱和在 Web 界面下的信箱: ![](https://farm8.staticflickr.com/7602/16619323939_d2eab3e162_c.jpg) @@ -73,7 +71,7 @@ # The approximate number of seconds between checks for new mail mail-check-interval=10 -最后,我们需要配置一个 SMTP 服务器来通过 Alpine 发送邮件信息。回到先前解释过的 Alpine 的设置界面,然后按 'C' 来设定一个 Google 的 SMTP 服务器地址,你需要像下面这样编辑 `SMTP Server`(为了发送) 这一行内容: +最后,我们需要配置一个 SMTP 服务器来通过 Alpine 发送邮件。回到先前解释过的 Alpine 的设置界面,然后按 'C' 来设定一个 Google 的 SMTP 服务器地址,你需要像下面这样编辑 `SMTP Server`(用于发送邮件)这一行内容: smtp.gmail.com:587/tls/user=yourgmailusername@gmail.com @@ -81,7 +79,7 @@ ### 总结 ### -在这个帖子里,我们讨论了在终端环境中如何通过一个名为 Alpha 的轻量且强大的命令行邮件客户端来获取 Gmail。 Alpine 是一个发布在 Apache Software License 2.0 协议下的自由软件,该协议与 GPL 协议相兼容。 Alpine 引以自豪的是:它不仅对新手友好,同时还做到了让那些经验丰富的系统管理员认为它是强大的。我希望在你阅读完这篇文章后,你能意识到我最后一个论断是多么的正确。 +在这个帖子里,我们讨论了在终端环境中如何通过一个名为 Alpine 的轻量且强大的命令行邮件客户端来访问 Gmail。 Alpine 是一个发布在 Apache Software License 2.0 协议下的自由软件,该协议与 GPL 协议相兼容。 Alpine 引以自豪的是:它不仅对新手友好,同时还做到了让那些经验丰富的系统管理员认为它是强大的。我希望在你阅读完这篇文章后,你能意识到我最后一个论断是多么的正确。 非常欢迎使用下面的输入框来留下你的评论或问题。我期待着你们的反馈! @@ -91,7 +89,7 @@ via: http://xmodulo.com/gmail-command-line-linux-alpine.html 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -100,4 +98,4 @@ via: http://xmodulo.com/gmail-command-line-linux-alpine.html [2]:http://xmodulo.com/manage-personal-expenses-command-line.html [3]:http://xmodulo.com/access-facebook-command-line-linux.html [4]:http://xmodulo.com/access-twitter-command-line-linux.html -[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[5]:https://linux.cn/article-2324-1.html From 5c1673b7e6311c90e51651bbfbb1928f38364988 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 19 May 2015 22:24:43 +0800 Subject: [PATCH 0886/2517] PUB:20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu @geekpi --- ...ux FAQs with Answers--How to upgrade Docker on Ubuntu.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md (87%) diff --git a/translated/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md b/published/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md similarity index 87% rename from translated/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md rename to published/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md index 8d993c1c47..ad9ed38d09 100644 --- a/translated/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md +++ b/published/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md @@ -1,8 +1,8 @@ -Linux有问必答-- 如何在Ubuntu中升级Docker +Linux有问必答:如何在Ubuntu中升级Docker ================================================================================ > **提问**: 我使用了Ubuntu的标准仓库安装了Docker。然而,默认安装的Docker不能满足我另外一个依赖Docker程序的版本需要。我该如何在Ubuntu中升级到Docker的最新版本? -Docker第一次在2013年发布,它快速地演变成了一个针对分布式程序的开发平台。为了满足工业期望,Docker正在紧密地开发并持续地带来新特性的升级。这样Ubuntu发行版中的Docker版本可能很快就会过时。比如,, Ubuntu 14.10 Utopic 中的Docker版本是1.2.0, 然而最新的Docker版本是1.5.0。 +Docker第一次在2013年发布,它快速地演变成了一个针对分布式程序的开发平台。为了满足工业期望,Docker正在紧密地开发并持续地带来新特性的升级。这样Ubuntu发行版中的Docker版本可能很快就会过时。比如, Ubuntu 14.10 Utopic 中的Docker版本是1.2.0, 然而最新的Docker版本是1.6.0。 ![](https://farm9.staticflickr.com/8730/16351300024_9acb9086da_b.jpg) @@ -28,7 +28,7 @@ via: http://ask.xmodulo.com/upgrade-docker-ubuntu.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ecc79cb1b9bd35e64f153736597b3795f65863bc Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 19 May 2015 22:51:04 +0800 Subject: [PATCH 0887/2517] PUB:20150324 4 Tools to Securely Delete Files from Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @dbarobin 翻译的不错。 --- ...ols to Securely Delete Files from Linux.md | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150324 4 Tools to Securely Delete Files from Linux.md (58%) diff --git a/translated/tech/20150324 4 Tools to Securely Delete Files from Linux.md b/published/20150324 4 Tools to Securely Delete Files from Linux.md similarity index 58% rename from translated/tech/20150324 4 Tools to Securely Delete Files from Linux.md rename to published/20150324 4 Tools to Securely Delete Files from Linux.md index bbf0dcb3bf..5926279c9e 100644 --- a/translated/tech/20150324 4 Tools to Securely Delete Files from Linux.md +++ b/published/20150324 4 Tools to Securely Delete Files from Linux.md @@ -1,12 +1,13 @@ -# Linux 下四种安全删除文件的工具 # +Linux 下四种安全删除文件的工具 +=============== -任何一个普通水平的计算机用户都知道,从计算机系统中删除的任意数据都可以稍候通过一些努力恢复出来。当你不小心删除了你的重要数据,这是一个不错的方案。但是大多数情况,你不希望你的隐私数据被轻易地恢复。不论何时,我们删除任意的文件,操作系统删除的仅仅是特定数据的索引。这就意味着,数据仍然保存在磁盘的某块地方,这种方法是不安全的,任何一个聪明的计算机黑客可以使用任意不错的数据恢复工具来恢复你删除的数据。Linux 用户利用我们都知晓的 "rm" 命令来从他们的操作系统中删除数据,但是 "rm" 命令在约定俗成的场景下工作。从这个命令删除的数据也可以使用特殊的文件恢复工具恢复。 +任何一个普通水平的计算机用户都知道,从计算机系统中删除的任意数据都可以稍后通过一些努力恢复出来。当你不小心删除了你的重要数据时,这是一个不错的方案。但是大多数情况,你不希望你的隐私数据被轻易地恢复。不论何时,我们删除的任意文件,操作系统删除的仅仅是对特定数据的索引。这就意味着,数据仍然保存在磁盘的某块地方,这种方法是不安全的,任何一个聪明的计算机黑客可以使用各种不错的数据恢复工具来恢复你删除的数据。Linux 用户利用我们都知晓的 "rm" 命令来从他们的操作系统中删除数据,但是 "rm" 命令也是像上面说的那样删除文件。从这个命令删除的数据也可以使用特殊的文件恢复工具恢复。 -让我们看看怎样安全并且完整地从你地 Linux 系统中删除文件或者文件夹。以下提到的工具可以完全地删除数据,因此那些恢复工具很难找到真实数据的痕迹然后恢复它。 +让我们看看怎样安全并完整地从你的 Linux 系统中删除文件或者文件夹。以下提到的工具可以完全地删除数据,因此那些恢复工具很难找到真实数据的痕迹然后恢复它。 ### Secure-Delete ### -Secure-Delete 是一组为 Linux 操作系统而生的工具集合,他们为永久删除文件提供高级的技术支持。一旦 Secure-Delete 安装在任意的 Linux 系统,它会提供如下的四个命令: +Secure-Delete 是一组为 Linux 操作系统而生的工具集合,他们为永久删除文件提供了先进的技术支持。一旦 Secure-Delete 安装在各种 Linux 系统上,就提供了如下的四个命令: - srm - smem @@ -45,13 +46,13 @@ Secure-Delete 是一组为 Linux 操作系统而生的工具集合,他们为 sudo sswap /dev/sda5 -“**smem**” 用来清理在内存中的内容,它保证当系统重启或者关机时随机存取存储器(RAM)中的内容被清理,但是残余的数据痕迹仍然保存在内存。这个命令提供安全的内存清理,简单地在终端中运行 smem 命令。 +“**smem**” 用来清理在内存中的内容,虽然当系统重启或者关机时会清理随机存取存储器(RAM)中的内容,但是内存中仍然会保留一些数据的残留痕迹。这个命令提供安全的内存清理,简单地在终端中运行 smem 命令即可。 smem ### Shred ### -"shred" 命令销毁文件或者文件夹的内容,在某种程度上,不可能恢复。它使用随机生成的数据模式来持续重写文件,因此很难恢复任意的被销毁的数据,即使是那些黑客或者窃贼使用高水平的数据恢复工具或者设备。Shred 在 Linux 发行版中时默认安装的,如果你想,你可以运行如下命令来找到它的安装目录: +"shred" 命令以一种不可恢复的方式来销毁文件或者文件夹的内容。它使用随机生成的数据模式来持续覆写文件,因此很难恢复任意的被销毁的数据,即使是那些黑客或者窃贼使用高水平的数据恢复工具或者设备。Shred 默认安装在所有 Linux 发行版中,如果你想,你可以运行如下命令来找到它的安装目录: aun@eagle:~$ whereis shred @@ -75,17 +76,17 @@ Shred 默认情况下使用随机内容重写数据 25 次。如果你想它重 ### dd ### -这个命令起初是用于磁盘克隆的。它用于一个分区或者一个磁盘复制到另一个分区或者磁盘。但是它还用于安全地清除硬盘或者分区的内容。运行如下命令使用随机数据来重写你的当前数据。你不需要安装 dd 命令,所有的 Linux 分发版都已经包含了此命令。 +这个命令起初是用于磁盘克隆的。它用于将一个分区或者一个磁盘复制到另一个分区或者磁盘。但是它还可用于安全地清除硬盘或者分区的内容。运行如下命令使用随机数据来重写你的当前数据。你不需要安装 dd 命令,所有的 Linux 分发版都已经包含了此命令。 sudo dd if=/dev/random of=/dev/sda -你也可以重写磁盘或者分区中的内容,只需要简单地将所有替换为 “zero”。 +你也可以覆写磁盘或者分区中的内容,只需要简单地将所有替换为 “zero”。 sudo dd if=/dev/zero of=/dev/sda ### Wipe ### -Wipe 起初开发的目的是从磁媒体中安全地擦除文件。这个命令行工具使用特殊的模式来重复地写文件。它使用 fsync() 调用和或 O_SYNC 位来强制访问磁盘,并且使用 Gutmann 算法来重复地写。你可以使用此命令删除单个文件,文件夹或者整个磁盘的内容,但是使用 wipe 命令来删除整个磁盘的模式会耗费大量的时间。另外,安装和使用这个工具相当容易。 +Wipe 起初开发的目的是从磁性介质中安全地擦除文件。这个命令行工具使用特殊的模式来重复地写文件。它使用 fsync() 调用和/或 O_SYNC 位来强制访问磁盘,并且使用 Gutmann 算法来重复地写。你可以使用此命令删除单个文件、文件夹或者整个磁盘的内容,但是使用 wipe 命令来删除整个磁盘的模式会耗费大量的时间。另外,安装和使用这个工具相当容易。 在 ubuntu 的终端中运行如下命令来安装 wipe。 @@ -123,7 +124,7 @@ via: http://linoxide.com/security/delete-files-permanatly-linux/ 作者:[Aun Raza][a] 译者:[dbarobin](https://github.com/dbarobin) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From bed742550b6289335e1dd4d95706a90ffa46017a Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 19 May 2015 23:06:01 +0800 Subject: [PATCH 0888/2517] PUB:20150331 Conky--The Ultimate X Based System Monitor Application MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc 翻译的不错 --- ...mate X Based System Monitor Application.md | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) rename {translated/tech => published}/20150331 Conky--The Ultimate X Based System Monitor Application.md (73%) diff --git a/translated/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md b/published/20150331 Conky--The Ultimate X Based System Monitor Application.md similarity index 73% rename from translated/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md rename to published/20150331 Conky--The Ultimate X Based System Monitor Application.md index f6ab2f69ec..fb90f58168 100644 --- a/translated/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md +++ b/published/20150331 Conky--The Ultimate X Based System Monitor Application.md @@ -1,11 +1,11 @@ Conky - 终极的 X 视窗系统监视器应用 ================================================================================ -Conky 是一个用 ‘C’ 语言写就的系统监视器,并在 GNU 通用公共许可协议和 BSD 许可协议下发布,在 Linux 和 BSD 操作系统中都可以获取到它。这个应用是基于 X 视窗系统的,原本 fork 至 [Torsmo][1]。 +Conky 是一个用 ‘C’ 语言写就的系统监视器,并在 GNU GPL 和 BSD 许可协议下发布,在 Linux 和 BSD 操作系统中都可以获取到它。这个应用是基于 X 视窗系统的,原本由 [Torsmo][1] 分支而来。 #### 特点 #### - 简洁的用户界面; -- 高配置性; +- 高度可配置; - 它既可使用内置的部件(超过 300 多个) 也可使用外部脚本,来在桌面或其自有容器中展示系统的状态; - 低资源消耗; - 它可显示范围广泛的系统参数,包括但不限于 CPU,内存,swap 分区 ,温度,进程,磁盘使用情况,网络状态,电池电量,邮件收发,系统消息,音乐播放器的控制,天气信息,最新新闻,升级信息等等; @@ -15,7 +15,7 @@ Conky 是一个用 ‘C’ 语言写就的系统监视器,并在 GNU 通用公 - conky 这个名称来自于一个加拿大电视节目; - 它已被移植到 Nokia N900 上; -- 它已不再被官方维护; +- 官方已经不再维护它了; ### 在 Linux 中 Conky 的安装和使用 ### @@ -57,7 +57,8 @@ Conky 既可以从软件仓库中安装,也可从源代码编译得到: $ conky & ![正在运行的 Conky 监视器](http://www.tecmint.com/wp-content/uploads/2015/03/Start-Conkey.jpeg) -正在运行的 Conky 监视器 + +*正在运行的 Conky 监视器* 这使得 conky 以一个弹窗的形式运行,并使用位于 `/etc/conky/conky.conf` 的 conky 基本配置文件。 @@ -72,29 +73,31 @@ Conky 既可以从软件仓库中安装,也可从源代码编译得到: $ killall -SIGUSR1 conky ![Conky 监视器窗口](http://www.tecmint.com/wp-content/uploads/2015/03/Restart-Conky.jpeg) -Conky 监视器窗口 -你可能想编辑位于你家目录的 conky 的配置文件,这个配置文件的内容是非常容易理解的。 +*Conky 监视器窗口* + +你可能想编辑位于你的家目录的 conky 的配置文件,这个配置文件的内容是非常容易理解的。 下面是 conky 配置文件的一个样例: ![Conky 的配置](http://www.tecmint.com/wp-content/uploads/2015/03/Conky-Configuration.jpeg) -Conky 的配置 -从上面的窗口中,你可以更改颜色,边框,大小,缩放比例,背景,对齐方式及几个其他属性。通过为不同的 conky 窗口设定不同的对齐方式,我们可以同时运行超过一个 conky 脚本。 +*Conky 的配置* + +从上面的窗口中,你可以更改颜色,边框,大小,缩放比例,背景,对齐方式及几个其他属性。通过为不同的 conky 窗口设定不同的对齐方式,我们可以同时运行几个 conky 脚本。 -**为 conky 使用脚本而不是默认配置以及如何找到这些脚本?** +**让 conky 使用其它脚本而不是默认配置,以及如何找到这些脚本?** -你可以编写你自己的 conky 脚本或使用来自于互联网的脚本;我们并不建议你使用你从互联网中找到的具有潜在危险的任何脚本,除非你清楚你正在做什么。然而,有一些著名的主题和网页包含可信赖的 conky 脚本,例如下面所提及的: +你可以编写你自己的 conky 脚本或使用来自于互联网的脚本;我们并不建议你使用从互联网中找到的具有潜在危险的任何脚本,除非你清楚你正在做什么。然而,有一些著名的主题和网页包含可信赖的 conky 脚本,例如下面所提及的: - [http://ubuntuforums.org/showthread.php?t=281865][3] - [http://conky.sourceforge.net/screenshots.html][4] -在上面的 URL 地址中,你将发现每个截图都有一个超链接,它们将重定向到脚本文件。 +在上面的 URL 地址中,你将发现其中每个截图都有一个超链接,它们将指向到脚本文件。 #### 测试 Conky 脚本 #### -这里我将在我的 Debian Jessie 机子中运行一个由第三方写的 conky 脚本,以此来进行测试: +这里我将在我的 Debian Jessie 系统中运行一个由第三方写的 conky 脚本,以此来进行测试: $ wget https://github.com/alexbel/conky/archive/master.zip $ unzip master.zip @@ -107,39 +110,41 @@ Conky 的配置 $ mv secrets.yml.example secrets.yml -在你能够运行这个(ruby)脚本之前安装 Ruby: +在你需要运行这个(ruby)脚本之前安装 Ruby: $ sudo apt-get install ruby $ ruby starter.rb ![华丽的 conky 外观](http://www.tecmint.com/wp-content/uploads/2015/03/Conky-Fancy-Look.jpeg) -华丽的 conky 外观 -**注**: 这个脚本可以被修改以展示你当前的天气,温度等; +*华丽的 conky 外观* + +**注**: 可以修改这个脚本以展示你当前的天气,温度等; 假如你想让 conky 开机自启,请在开机启动应用设置(startup Applications) 中添加如下的几行命令: conky --pause 10 save and exit. -最后。。。 如此轻量级且吸引眼球的实用 GUI 软件包不再处于激活状态且官方不再进行维护了。最新的稳定发布版本为 conky 1.9.0, 于 2012 年 5 月 3 号发布。在 Ubuntu 论坛上,一个有关用户分享 conky 配置的主题已经超过了 2000 多页。(这个论坛主题的链接为: [http://ubuntuforums.org/showthread.php?t=281865/][5]) +最后,如此轻量级且吸引眼球的实用 GUI 软件包不再处于活跃状态且官方不再进行维护了。最新的稳定发布版本为 conky 1.9.0, 于 2012 年 5 月 3 号发布。在 Ubuntu 论坛上,一个有关用户分享 conky 配置的主题已经超过了 2000 多页。(这个论坛主题的链接为: [http://ubuntuforums.org/showthread.php?t=281865/][5]) - [Conky 主页][6] 这就是全部内容了。保持联系,保持评论。请在下面的评论框里分享你的想法和配置。 + -------------------------------------------------------------------------------- via: http://www.tecmint.com/install-conky-in-ubuntu-debian-fedora/ 作者:[Avishek Kumar][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ [1]:http://torsmo.sourceforge.net/ -[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[2]:https://linux.cn/article-2324-1.html [3]:http://ubuntuforums.org/showthread.php?t=281865 [4]:http://conky.sourceforge.net/screenshots.html [5]:http://ubuntuforums.org/showthread.php?t=281865/ From fa8a54685ffa175f138e8ae4dd838778c9c4847f Mon Sep 17 00:00:00 2001 From: GOLinux Date: Wed, 20 May 2015 10:01:10 +0800 Subject: [PATCH 0889/2517] [Translated]20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md --- ...pecific user agents on nginx web server.md | 115 ------------------ ...pecific user agents on nginx web server.md | 115 ++++++++++++++++++ 2 files changed, 115 insertions(+), 115 deletions(-) delete mode 100644 sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md create mode 100644 translated/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md diff --git a/sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md b/sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md deleted file mode 100644 index 53bd4c4935..0000000000 --- a/sources/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md +++ /dev/null @@ -1,115 +0,0 @@ -Translating by GOLinux! -Linux FAQs with Answers--How to block specific user agents on nginx web server -================================================================================ -> **Question**: I notice that some robots often visit my nginx-powered website and scan it aggressively, ending up wasting a lot of my web server resources. I am trying to block those robots based on their user-agent string. How can I block specific user agent(s) on nginx web server? - -The modern Internet is infested with various malicious robots and crawlers such as malware bots, spambots or content scrapers which are scanning your website in surreptitious ways, for example to detect potential website vulnerabilities, harvest email addresses, or just to steal content from your website. Many of these robots can be identified by their signature "user-agent" string. - -As a first line of defense, you could try to block malicious bots from accessing your website by blacklisting their user-agents in robots.txt file. However, unfortunately this works only for "well-behaving" robots which are designed to obey robots.txt. Many malicious bots can simply ignore robots.txt and scan your website at will. - -An alternative way to block particular robots is to configure your web server, such that it refuses to serve content to requests with certain user-agent strings. This post explains how to **block certain user-agent on nginx web server**. - -### Blacklist Certain User-Agents in Nginx ### - -To configure user-agent block list, open the nginx configuration file of your website, where the server section is defined. This file can be found in different places depending on your nginx setup or Linux distribution (e.g., /etc/nginx/nginx.conf, /etc/nginx/sites-enabled/, /usr/local/nginx/conf/nginx.conf, /etc/nginx/conf.d/). - - server { - listen 80 default_server; - server_name xmodulo.com; - root /usr/share/nginx/html; - - .... - } - -Once you open the config file with the server section, add the following if statement(s) somewhere inside the section. - - server { - listen 80 default_server; - server_name xmodulo.com; - root /usr/share/nginx/html; - - # case sensitive matching - if ($http_user_agent ~ (Antivirx|Arian) { - return 403; - } - - # case insensitive matching - if ($http_user_agent ~* (netcrawl|npbot|malicious)) { - return 403; - } - - .... - } - -As you can guess, these if statements match any bad user-string with regular expressions, and return 403 HTTP status code when a match is found. $http_user_agent is a variable that contains the user-agent string of an HTTP request. The '~' operator does case-sensitive matching against user-agent string, while the '~' operator does case-insensitive matching. The '|' operator is logical-OR, so you can put as many user-agent keywords in the if statements, and block them all. - -After modifying the configuration file, you must reload nginx to activate the blocking: - - $ sudo /path/to/nginx -s reload - -You can test user-agent blocking by using wget with "--user-agent" option. - - $ wget --user-agent "malicious bot" http:// - -![](https://farm6.staticflickr.com/5333/17434036358_ef139a6b59_b.jpg) - -### Manage User-Agent Blacklist in Nginx ### - -So far, I have shown how to block HTTP requests with a few user-agents in nginx. What if you have many different types of crawling bots to block? - -Since the user-agent blacklist can grow very big, it is not a good idea to put them all inside your nginx's server section. Instead, you can create a separate file which lists all blocked user agents. For example, let's create /etc/nginx/useragent.rules, and define a map with all blocked user agents in the following format. - - $ sudo vi /etc/nginx/useragent.rules - ----------- - - map $http_user_agent $badagent { - default 0; - ~*malicious 1; - ~*backdoor 1; - ~*netcrawler 1; - ~Antivirx 1; - ~Arian 1; - ~webbandit 1; - } - -Similar to the earlier setup, '~*' will match a keyword in case-insensitive manner, while '~' will match a keyword using a case-sensitive regular expression. The line that says "default 0" means that any other user-agent not listed in the file will be allowed. - -Next, open an nginx configuration file of your website, which contains http section, and add the following line somewhere inside the http section. - - http { - ..... - include /etc/nginx/useragent.rules - } - -Note that this include statement must appear before the server section (this is why we add it inside http section). - -Now open an nginx configuration where your server section is defined, and add the following if statement: - - server { - .... - - if ($badagent) { - return 403; - } - - .... - } - -Finally, reload nginx. - - $ sudo /path/to/nginx -s reload - -Now any user-agent which contains a keyword listed in /etc/nginx/useragent.rules will be automatically banned by nginx. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/block-specific-user-agents-nginx-web-server.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://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md b/translated/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md new file mode 100644 index 0000000000..89a94cfbeb --- /dev/null +++ b/translated/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md @@ -0,0 +1,115 @@ +Linux有问必答——nginx网络服务器上如何阻挡特定用户代理 +================================================================================ +> **问题**: 我注意到有一些机器人经常访问我nginx驱动的网站,并且进行一些攻击性的扫描,导致消耗掉了我的网络服务器的大量资源。我一直尝试着通过用户代理符串来阻挡这些机器人。我怎样才能在nginx网络服务器上阻挡掉特定的用户代理呢? + +现代互联网滋生了大量各种各样的恶意机器人和网络爬虫,比如像恶意软件机器人、垃圾邮件程序或内容刮刀,这些恶意工具一直偷偷摸摸地扫描你的网站,干些诸如检测潜在网站漏洞、收获电子邮件地址,或者只是从你的网站偷取内容。大多数机器人能够通过它们的“用户代理”签名字符串来识别。 + +作为第一道防线,你可以尝试通过将这些机器人的用户代理字符串添加入robots.txt文件来阻止这些恶意软件机器人访问你的网站。但是,很不幸的是,该操作只针对那些“行为良好”的机器人,这些机器人被设计遵循robots.txt的规范。许多恶意软件机器人可以很容易地忽略掉robots.txt,然后随意扫描你的网站。 + +另一个用以阻挡特定机器人的途径,就是配置你的网络服务器,通过特定的用户代理字符串拒绝要求提供内容的请求。本文就是说明如何**在nginx网络服务器上阻挡特定的用户代理**。 + +### 在Nginx中将特定用户代理列入黑名单 ### + +要配置用户代理阻挡列表,请打开你的网站的nginx配置文件,找到服务器定义部分。该文件可能会放在不同的地方,这取决于你的nginx配置或Linux版本(如,/etc/nginx/nginx.conf,/etc/nginx/sites-enabled/,/usr/local/nginx/conf/nginx.conf,/etc/nginx/conf.d/)。 + + server { + listen 80 default_server; + server_name xmodulo.com; + root /usr/share/nginx/html; + + .... + } + +在打开该配置文件并找到 server 部分后,添加以下 if 声明到该部分内的某个地方。 + + server { + listen 80 default_server; + server_name xmodulo.com; + root /usr/share/nginx/html; + + # case sensitive matching + if ($http_user_agent ~ (Antivirx|Arian) { + return 403; + } + + # case insensitive matching + if ($http_user_agent ~* (netcrawl|npbot|malicious)) { + return 403; + } + + .... + } + +如你所想,这些 if 声明使用正则表达式匹配了任意不良用户字符串,并向匹配的对象返回403 HTTP状态码。 +$http_user_agent是HTTP请求的一个包含有用户代理字符串的变量。‘~’操作符针对用户代理字符串进行大小写敏感匹配,而‘~*’操作符则进行大小写不敏感匹配。‘|’操作符是逻辑或,因此,你可以在 if 声明中放入众多的用户代理关键字,然后将它们全部阻挡掉。 + +在修改配置文件后,你必须重新加载nginx以激活阻挡: + + $ sudo /path/to/nginx -s reload + +你可以通过使用带有 “--user-agent” 选项的 wget 测试用户代理阻挡。 + + $ wget --user-agent "malicious bot" http:// + +![](https://farm6.staticflickr.com/5333/17434036358_ef139a6b59_b.jpg) + +### 管理Nginx中的用户代理黑名单 ### + +目前为止,我已经展示了在nginx中如何阻挡一些用户代理的HTTP请求。如果你有学多不同类型的网络爬虫机器人要阻挡,又该怎么办呢? + +由于用户代理黑名单会增长得很大,所以将它们放在nginx的server部分不是个好点子。取而代之的是,你可以创建一个独立的文件,在该文件中列出所有被阻挡的用户代理。例如,让我们创建/etc/nginx/useragent.rules,并定义以下面的格式定义所有被阻挡的用户代理的图谱。 + + $ sudo vi /etc/nginx/useragent.rules + +---------- + + map $http_user_agent $badagent { + default 0; + ~*malicious 1; + ~*backdoor 1; + ~*netcrawler 1; + ~Antivirx 1; + ~Arian 1; + ~webbandit 1; + } + +与先前的配置类似,‘~*’将匹配以大小写不敏感的方式匹配关键字,而‘~’将使用大小写敏感的正则表达式匹配关键字。“default 0”行所表达的意思是,任何其它文件中未被列出的用户代理将被允许。 + +接下来,打开你的网站的nginx配置文件,找到里面包含 http 的部分,然后添加以下行到 http 部分某个位置。 + + http { + ..... + include /etc/nginx/useragent.rules + } + +注意,该 include 声明必须出现在 server 部分之前(这就是为什么我们将它添加到了 http 部分里)。 + +现在,打开nginx配置定义你的服务器的部分,添加以下 if 声明: + + server { + .... + + if ($badagent) { + return 403; + } + + .... + } + +最后,重新加载nginx。 + + $ sudo /path/to/nginx -s reload + +现在,任何包含有/etc/nginx/useragent.rules中列出的关键字的用户代理将被nginx自动禁止。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/block-specific-user-agents-nginx-web-server.html + +作者:[Dan Nanni][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From abaa5d6ee004ea189acfbcc858e9a761a4d1baac Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 20 May 2015 10:08:58 +0800 Subject: [PATCH 0890/2517] Update 20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md --- ... Answers--What is the Apache error log location on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md b/sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md index 946094a532..b25c7fe3c8 100644 --- a/sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md +++ b/sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Linux FAQs with Answers--What is the Apache error log location on Linux ================================================================================ > **Question**: I am trying to troubleshoot Apache web server errors on my Linux system. Where is the Apache error log file located on [insert your Linux distro]? @@ -78,4 +79,4 @@ via: http://ask.xmodulo.com/apache-error-log-location-linux.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://xmodulo.com/configure-fail2ban-apache-http-server.html [2]:http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html -[3]:http://xmodulo.com/sql-queries-apache-log-files-linux.html \ No newline at end of file +[3]:http://xmodulo.com/sql-queries-apache-log-files-linux.html From d6c50a390ba637b10cf1826d918031b67f7d5b28 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Wed, 20 May 2015 11:16:28 +0800 Subject: [PATCH 0891/2517] [Translated] 20150423 20 Awesome Docker Containers for a Desktop User.md --- ...me Docker Containers for a Desktop User.md | 239 ------------------ ...me Docker Containers for a Desktop User.md | 236 +++++++++++++++++ 2 files changed, 236 insertions(+), 239 deletions(-) delete mode 100644 sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md create mode 100644 translated/tech/20150423 20 Awesome Docker Containers for a Desktop User.md diff --git a/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md b/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md deleted file mode 100644 index 00786e9bde..0000000000 --- a/sources/tech/20150423 20 Awesome Docker Containers for a Desktop User.md +++ /dev/null @@ -1,239 +0,0 @@ -Translating by gaoliu ... - -20 Awesome Docker Containers for a Desktop User -================================================================================ -Greetings to everyone, today we'll list out some awesome Desktop Apps that we can run using Docker Containers in our very own Desktop running Docker. Docker is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. It is basically used by the developers, Ops and Engineers as it is easy, fast and handy tool for testing or deploying their products but we can also use Docker for our Desktop usage to run a desktop apps out of the box. - -So here are some awesome 10 Desktop Application Docker images that we can run with Docker. - -### 1. Lynx ### - -Lynx is a all time favorite text-based web browser which is a lot familiar to most of the people running Linux. It is the oldest web browser currently in general use and development. To run Lynx, run the following command. - - $ docker run -it \ - --name lynx \ - jess/lynx - -### 2. Irssi ### - -Irssi is an awesome IRC Client which is based on Text Interface. To run Irssi using docker, we'll need to run the following commands in a docker installed desktop computer. - - docker run -it --name my-irssi -e TERM -u $(id -u):$(id -g) \ - -v $HOME/.irssi:/home/user/.irssi:ro \ - -v /etc/localtime:/etc/localtime:ro \ - irssi - -### 3. Chrome ### - -Chrome is an awesome GUI-based web browser developed by Google and is based on Open Source Project Chromium. Google Chrome is widely used, fast and secure web browser that are very much familiar to most of the people who surf internet. We can run Chrome using docker by running the following command. - - $ docker run -it \ - --net host \ - --cpuset 0 \ - --memory 512mb \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -e DISPLAY=unix$DISPLAY \ - -v $HOME/Downloads:/root/Downloads \ - -v $HOME/.config/google-chrome/:/data \ - -v /dev/snd:/dev/snd --privileged \ - --name chrome \ - jess/chrome - -### 4. Tor Browser ### - -Tor Browser is a web browser which support anonymous features. It enables us freedom to surf website or services blocked by a particular organization or ISPs. It prevents somebody watching our Internet connection from learning what we do on internet and our exact location. To run Tor Browser, run the following command. - - $ docker run -it \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -e DISPLAY=unix$DISPLAY \ - -v /dev/snd:/dev/snd --privileged \ - --name tor-browser \ - jess/tor-browser - -### 5. Firefox Browser ### - -Firefox Browser is a free and open source web browser which is developed by Mozilla Foundation. It is run by Gecko and SpiderMonkey engines. Firefox Browser has a lot of new features and is specially known for its performance and security. - - $ docker run -d \ - --name firefox \ - -e DISPLAY=$DISPLAY \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - kennethkl/firefox - -### 6. Rainbow Stream ### - -Rainbow Stream is a terminal based Twitter Client featuring real time tweetstream, compose, search , favorite and much more fun directly from terminal. To run Rainbow Stream, run the following command. - - $ docker run -it \ - -v /etc/localtime:/etc/localtime \ - -v $HOME/.rainbow_oauth:/root/.rainbow_oauth \ - -v $HOME/.rainbow_config.json:/root/.rainbow_config.json \ - --name rainbowstream \ - jess/rainbowstream - -### 7. Gparted ### - -Gparted is an open source software which allows us to partition disks. Now enjoy partitioning from a docker container. To run gparted, we'll need to run the following command. - - $ docker run -it \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -e DISPLAY=unix$DISPLAY \ - --device /dev/sda:/dev/sda \ # mount the device to partition - --name gparted \ - jess/gparted - -### 8. GIMP Editor ### - -GIMP stands for Gnu Image Manipulation Program which is an awesome tool on Linux for graphics, image editing platform. It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. - - $ docker run -it \ - --rm -e DISPLAY=$DISPLAY \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - jarfil/gimp-git - -### 9. Thunderbird ### - -Thunderbird is also a free and open source email application which is developed and maintained by Mozilla Foundation. It has tons of features that an email application software should have. Thunderbird is really easy to setup and customize. To run Thunderbird in a Docker environment, run the following command. - - $ docker run -d \ - -e DISPLAY \ - -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ - -u docker \ - -v $HOME/docker-data/thunderbird:/home/docker/.thunderbird/ \ - yantis/thunderbird thunderbird - -### 10. Mutt ### - -Mutt is a text based email client which has bunches of cool features including color support, IMAP, POP3, SMTP support, mail storing support and much more. To run Mutt out of the box using docker, we'll need to run the following command. - - $ docker run -it \ - -v /etc/localtime:/etc/localtime \ - -e GMAIL -e GMAIL_NAME \ - -e GMAIL_PASS -e GMAIL_FROM \ - -v $HOME/.gnupg:/home/user/.gnupg \ - --name mutt \ - jess/mutt - -### 11. Skype ### - -Skype is an instant messaging, video calling software which is not open source but can be run awesome in linux. We can run Skype using Docker Containers too. To run Skype using a docker, run the following command. - - $ docker run -it \ - -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ - -v /dev/snd:/dev/snd --privileged \ - -e DISPLAY="unix$DISPLAY" \ - tianon/skype - -### 12. Cathode ### - -Cathode is a beautiful fully customizable terminal app with a look inspired by classic computers. We can run Cathode by running the below command. - - $ docker run -it \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -e DISPLAY=unix$DISPLAY \ - --name cathode \ - jess/1995 - -### 13. LibreOffice ### - -LibreOffice is a powerful office suite which is free and open source and is maintained by The Document Foundation. It has clean interface and is a powerful tools that lets us unleash our creativity and grow our productivity. LibreOffice embeds several applications that make it the most powerful Free & Open Source Office suite on the market. - - $docker run \ - -v $HOME/Documents:/home/libreoffice/Documents:rw \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -e uid=$(id -u) -e gid=$(id -g) \ - -e DISPLAY=unix$DISPLAY --name libreoffice \ - chrisdaish/libreoffice - -### 14. Spotify ### - -Spotify gives us instant access to millions of songs from old favorites to the latest hits. To listen our favorite songs using docker, run the following command. - - $ docker run -it \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -e DISPLAY=unix$DISPLAY \ - -v /dev/snd:/dev/snd --privileged \ - --name spotify \ - jess/spotify - -### 15. Audacity ### - -Audacity is free and open source cross-platform software for recording and editing sounds. Audacity can be used for post-processing of all types of audio, including podcasts by adding effects such as normalization, trimming, and fading in and out. To run Audacity, we'll need to run the following command in a terminal or shell. - - $ docker run --rm \ - -u $(id -u):$(id -g) \ - -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ - -v /dev/snd:/dev/snd \ - -v "$HOME:$HOME" \ - -w "$HOME" \ - -e DISPLAY="unix$DISPLAY" \ - -e HOME \ - $(find /dev/snd/ -type c | sed 's/^/--device /') \ - knickers/audacity - -### 16. Eclipse ### - -Eclipse is an integrated development environment (IDE). It contains a base workspace and an extensible plug-in system for customizing the environment. It is mostly used to develop Java Based Applications. - - $ docker run -v ~/workspace/:/home/eclipse/workspace/ \ - -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ - -d leesah/eclipse - -### 17. VLC Media Player ### - -VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols. VLC Media Player is developed and maintained by VideoLAN Organization. To run VLC in docker environment, run the following command. - - $ docker run -v\ - $HOME/Documents:/home/vlc/Documents:rw \ - -v /dev/snd:/dev/snd --privileged \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -e uid=$(id -u) -e gid=$(id -g) \ - -e DISPLAY=unix$DISPLAY --name vlc \ - chrisdaish/vlc - -### 18. Vim Editor ### - -Vim is a highly configurable text-based text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems. - - $ docker run -i -t --name my-vim -v ~/:/home/dev/src haron/vim - -### 19. Inkscape ### - -Inkscape is a free and open-source vector graphics editor. It can create, edit vector graphics such as illustrations, diagrams, line arts, charts, logos and even complex paintings. Inkscape's primary vector graphics format is Scalable Vector Graphics (SVG) version 1.1. It can import from or export to several other formats as well but all editing workflow must inevitably occur within the constraints of SVG format. - - $docker build -t rasch/inkscape --rm . - $ docker run --rm -e DISPLAY \ - -u inkscaper - -v /tmp/.X11-unix:/tmp/.X11-unix \ - -v $HOME/.Xauthority:/home/inkscaper/.Xauthority \ - --net=host rasch/inkscape - -### 20. Filezilla ### - -Filezilla is a free FTP solution application software. It supports FTP, SFTP, FTPS protocols. It is a powerful file management tool for client side. It is an awesome open source FTP project which is highly reliable and easy to use. - - $ xhost +si:localuser:$(whoami) - $ docker run \ - -d \ - -e DISPLAY \ - -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ - -u docker \ - -v /:/host \ - -v $HOME/docker-data/filezilla:/home/docker/.config/filezilla/ \ - yantis/filezilla filezilla - -### Conclusion ### - -Running desktop application software using Docker is really an awesome experience. Docker is really an awesome platform for fast and easy development, shipping and deployment of software and packages in any place from home to office to production areas. Running desktop apps with docker is a cool way to try out the apps without really installing it into the host filesystem. So, if you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy with Docker :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/how-tos/20-docker-containers-desktop-user/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ \ No newline at end of file diff --git a/translated/tech/20150423 20 Awesome Docker Containers for a Desktop User.md b/translated/tech/20150423 20 Awesome Docker Containers for a Desktop User.md new file mode 100644 index 0000000000..055c1eb9b5 --- /dev/null +++ b/translated/tech/20150423 20 Awesome Docker Containers for a Desktop User.md @@ -0,0 +1,236 @@ +20个为桌面用户准备的令人惊叹的Docker容器 +================================================================================ +大家好,今天我们会列出一些很棒的运行在Docker容器中的桌面软件,我们可以在自己的桌面系统中运行它们。Docker是一个开源的项目,它提供可以将应用程序作为一个轻量级容器来打包、传送和运行的开放平台。它没有语言支持、框架或打包系统的限制,可以运行在任何地方,从小型的家用电脑到高端的服务器。它可以使部署和扩展web应用程序、数据库和后端服务像搭积木一样容易,而不依赖特定技术栈或提供商。它主要是由开发、运维工程师使用的,因为它简单、快速和方便,可以用来测试和辅助开发他们产品,但是我们也可以在桌面环境使用Docker,这样一些桌面程序可以开箱即用。 + +下边是20个非常棒的桌面软件docker镜像,我们可以使用Docker来运行。 + +### 1. Lynx ### + +Lynx是一个一直以来最受欢迎的文本界面网页浏览器,它对多数Linux用户来说都很熟悉。它应该是现在还在日常和开发环境中被使用的最古老的网页浏览器了。可以使用如下命令运行Lync。 + + $ docker run -it \ + --name lynx \ + jess/lynx + +### 2. Irssi ### + +Irssi是一个非常棒的文本界面IRC客户端。可以使用如下命令运行Irssi。 + + docker run -it --name my-irssi -e TERM -u $(id -u):$(id -g) \ + -v $HOME/.irssi:/home/user/.irssi:ro \ + -v /etc/localtime:/etc/localtime:ro \ + irssi + +### 3. Chrome ### + +Chrome是一个令人惊叹的图形界面网页浏览器,由Google开发,它基于开源的Chromium项目。Google Chrome是一个被广泛使用的、快速安全的网页浏览器,经常上网的人会非常熟悉它。我们可以使用如下命令在Docker中运行Chrome。 + + $ docker run -it \ + --net host \ + --cpuset 0 \ + --memory 512mb \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + -v $HOME/Downloads:/root/Downloads \ + -v $HOME/.config/google-chrome/:/data \ + -v /dev/snd:/dev/snd --privileged \ + --name chrome \ + jess/chrome + +### 4. Tor浏览器 ### + +Tor浏览器是一个支持匿名访问的网页浏览器。它让我们可以自由地在网络世界遨游,或者浏览被特定组织或者网络服务提供商封锁的网站。它会阻止有人通过监视我们的网络连接来窃取我们在网络上的一举一动以及我们的确切位置。运行如下命令运行Tor浏览器。 + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + -v /dev/snd:/dev/snd --privileged \ + --name tor-browser \ + jess/tor-browser + +### 5. Firefox浏览器 ### + +Firefox浏览器是一个自由并且开源的网页浏览器,它由Mozilla基金会开发。它使用Gecko和SpiderMonkey引擎。Firefox浏览器有很多新特性,并且它以性能和安全性著称。 + + $ docker run -d \ + --name firefox \ + -e DISPLAY=$DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + kennethkl/firefox + +### 6. Rainbow Stream ### + +Rainbow Stream是一个文本界面的Twitter客户端,有实时显示tweetstream、搜索、喜欢和更多其他特性,可以直接在终端使用。使用如下命令运行Rainbow Stream。 + + $ docker run -it \ + -v /etc/localtime:/etc/localtime \ + -v $HOME/.rainbow_oauth:/root/.rainbow_oauth \ + -v $HOME/.rainbow_config.json:/root/.rainbow_config.json \ + --name rainbowstream \ + jess/rainbowstream + +### 7. Gparted ### + +Gparted是一个用来给磁盘分区的开源软件。现在可以在Docker容器里享受分区的乐趣。可以使用如下命令运行gparted。 + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + --device /dev/sda:/dev/sda \ # mount the device to partition + --name gparted \ + jess/gparted + +### 8. GIMP图片编辑器 ### + +GIMP(Gnu Image Manipulation Program)是一个令人惊叹的Linux图片编辑软件。它是一个可以自由分发的可以处理照片修正、图像合成和图像创作等任务的工具。 + + $ docker run -it \ + --rm -e DISPLAY=$DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + jarfil/gimp-git + +### 9. Thunderbird ### + +Thunderbird是一个自由并且开源的电子邮件软件,它由Mozilla基金会开发和维护。它有众多一个电子邮件软件应该具有的功能。Thunderbird非常易于安装和定制。使用如下命令在Docker中运行Thunderbird。 + + $ docker run -d \ + -e DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -u docker \ + -v $HOME/docker-data/thunderbird:/home/docker/.thunderbird/ \ + yantis/thunderbird thunderbird + +### 10. Mutt ### + +Mutt是一个文本界面的电子邮件客户端,有很多很酷的功能,如颜色支持,IMAP、POP3、SMTP支持,邮件存储支持等。 使用如下命令运行Mutt。 + + $ docker run -it \ + -v /etc/localtime:/etc/localtime \ + -e GMAIL -e GMAIL_NAME \ + -e GMAIL_PASS -e GMAIL_FROM \ + -v $HOME/.gnupg:/home/user/.gnupg \ + --name mutt \ + jess/mutt + +### 11. Skype ### + +Skype是一个支持文字、语音和视频的即时通讯软件,它不是开源的,但在Linux下可以很棒地运行。我们同样可以在Docker中运行Skype,使用如下命令。 + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -v /dev/snd:/dev/snd --privileged \ + -e DISPLAY="unix$DISPLAY" \ + tianon/skype + +### 12. Cathode ### + +Cathode是一个漂亮并且高度可定制的终端模拟器,灵感来自经典的计算机。使用如下命令运行Cathode。 + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + --name cathode \ + jess/1995 + +### 13. LibreOffice ### + +LibreOffice是一个功能强大的办公套件,它是自由和开源的,现在由The Document基金会维护。它有干净的界面和强大的功能,让我们释放创造力和提升生产力。LibreOffice将数个应用程序集成在一起,是市面上最强大的自由并且开源的办公套件。 + $docker run \ + -v $HOME/Documents:/home/libreoffice/Documents:rw \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e uid=$(id -u) -e gid=$(id -g) \ + -e DISPLAY=unix$DISPLAY --name libreoffice \ + chrisdaish/libreoffice + +### 14. Spotify ### + +Spotify可以即时访问数百万的歌曲,从经典老歌到最新单曲。可以使用如下命令在Docker中听我们最喜欢的歌曲。 + + $ docker run -it \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$DISPLAY \ + -v /dev/snd:/dev/snd --privileged \ + --name spotify \ + jess/spotify + +### 15. Audacity ### + +Audacity是一个自由并且开源的跨平台软件,用来录制和编辑音频。Audacity可以用来做所有类型音频(例如podcast)的后期处理,如归一化、调整、淡入淡出。使用如下命令来运行Audacity。 + + $ docker run --rm \ + -u $(id -u):$(id -g) \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -v /dev/snd:/dev/snd \ + -v "$HOME:$HOME" \ + -w "$HOME" \ + -e DISPLAY="unix$DISPLAY" \ + -e HOME \ + $(find /dev/snd/ -type c | sed 's/^/--device /') \ + knickers/audacity + +### 16. Eclipse ### + +Eclipse是一个集成开发环境。它包含基本的工作区和用来定制环境的可扩展插件系统。它在Java开发者中很流行。 + + $ docker run -v ~/workspace/:/home/eclipse/workspace/ \ + -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -d leesah/eclipse + +### 17. VLC媒体播放器 ### + +VLC是一个自由并且开源的跨平台多媒体播放器,可以播放本地文件、DVD、CD、VCD和各种流媒体。VLC由VideoLAN组织开发和维护。使用如下命令运行VLC。 + + $ docker run -v\ + $HOME/Documents:/home/vlc/Documents:rw \ + -v /dev/snd:/dev/snd --privileged \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e uid=$(id -u) -e gid=$(id -g) \ + -e DISPLAY=unix$DISPLAY --name vlc \ + chrisdaish/vlc + +### 18. Vim编辑器 ### + +Vim是一个高度可配置的文本界面文字编辑器,为高效的文本编辑而生。它是预装在多数UNIX系统中的vi编辑器的改进版本。 + + $ docker run -i -t --name my-vim -v ~/:/home/dev/src haron/vim + +### 19. Inkscape ### + +Inkscape是一个自由并且开源的矢量图形编辑器。它可以创建、编辑矢量图形,如插图、图示、线条艺术、图表、徽标以及更复杂的绘画。Inkscape使用的主要矢量图形格式是SVG 1.1版本。它也可以导入和导出一些其他的格式,但实际编辑使用的还是SVG格式。 + + $docker build -t rasch/inkscape --rm . + $ docker run --rm -e DISPLAY \ + -u inkscaper + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -v $HOME/.Xauthority:/home/inkscaper/.Xauthority \ + --net=host rasch/inkscape + +### 20. Filezilla ### + +Filezilla是一个自由的FTP解决方案,支持FTP、SFTP、FTPS协议。它的客户端是一个功能强大的文件管理工具。它是一个很棒的高度可靠和易用的开源FTP解决方案。 + + $ xhost +si:localuser:$(whoami) + $ docker run \ + -d \ + -e DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ + -u docker \ + -v /:/host \ + -v $HOME/docker-data/filezilla:/home/docker/.config/filezilla/ \ + yantis/filezilla filezilla + +### 总结 ### + +使用Docker运行桌面软件真的是很棒的体验。Docker是一个快速、简单的开发平台,适合从家里、办公室到生产环境里传送和开发软件的场景。使用Docker运行桌面软件是试用而不将其安装到自己实体机文件系统中的很酷的方法。如果你有任何问题、评论或者反馈,清写在下方的评论框中,让我们知道哪些是需要增加或者改进的。谢谢!享受Docker吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/how-tos/20-docker-containers-desktop-user/ + +作者:[Arun Pyasi][a] +译者:[goreliu](https://github.com/goreliu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ \ No newline at end of file From 487ea71cf576f14d87ea239bc0b34b51676d27cb Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 20 May 2015 11:26:13 +0800 Subject: [PATCH 0892/2517] Translating by ZTinoZ --- ...15 Things to Do After Installing Ubuntu 15.04 Desktop.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index 593d9c761d..857b2157b3 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -72,7 +72,7 @@ Disable Unwanted Applications ### 7. 添加扩展多媒体支持 ### -By default, Ubuntu comes with a minimal support for media files. In order to play various media formats or manipulate video files, install the following multimedia applications: +默认情况下,Ubuntu对多媒体文件支持不是很好。为了能播放各种不同的多媒体格式或解析视频文件,可以安装以下多媒体应用程序: - VLC - Smplayer @@ -83,7 +83,7 @@ By default, Ubuntu comes with a minimal support for media files. In order to pla - Handbrake - Openshot -Use the following command line to install all with one shot: +用以下命令来一次性安装所有的这些应用程序: $ sudo apt-get install vlc smplayer audacious qmmp mixxx xbmc handbrake openshot @@ -93,7 +93,7 @@ Install Media Players ![Media Player Playlist](http://www.tecmint.com/wp-content/uploads/2015/04/media-playllist.jpg) Media Player Playlist -Besides this multimedia players also install ubuntu-restricted-extras and Java support packages in order to decode and support other restricted media formats. +除了Besides this multimedia players also install ubuntu-restricted-extras and Java support packages in order to decode and support other restricted media formats. $ sudo apt-get install ubuntu-restricted-extras openjdk-8-jdk From 9c0a5cc60ccfeabe544beb19caaa90a5e5aef14d Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Wed, 20 May 2015 12:59:11 +0800 Subject: [PATCH 0893/2517] [Translating] 20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md --- ...ols Send Email with Subject, Body and Attachment in Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md b/sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md index 77936b6a67..bc3f02095c 100644 --- a/sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md +++ b/sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md @@ -1,3 +1,5 @@ +Translating by goreliu ... + 4 Tools Send Email with Subject, Body and Attachment in Linux ================================================================================ In today's article we will cover a few ways you can use to send emails with attachments from the command line interface on Linux. It can have quite a few uses, for example to send an archive with an application from an application server to email or you can use the commands in scripts to automate some process. For our examples,we will use the file foo.tar.gz as our attachment. From 2693e62ddfdd6feed61d1360856f1b21277024b4 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Wed, 20 May 2015 14:38:40 +0800 Subject: [PATCH 0894/2517] [Translated] 20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md --- ...h Subject, Body and Attachment in Linux.md | 263 ------------------ ...h Subject, Body and Attachment in Linux.md | 261 +++++++++++++++++ 2 files changed, 261 insertions(+), 263 deletions(-) delete mode 100644 sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md create mode 100644 translated/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md diff --git a/sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md b/sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md deleted file mode 100644 index bc3f02095c..0000000000 --- a/sources/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md +++ /dev/null @@ -1,263 +0,0 @@ -Translating by goreliu ... - -4 Tools Send Email with Subject, Body and Attachment in Linux -================================================================================ -In today's article we will cover a few ways you can use to send emails with attachments from the command line interface on Linux. It can have quite a few uses, for example to send an archive with an application from an application server to email or you can use the commands in scripts to automate some process. For our examples,we will use the file foo.tar.gz as our attachment. - -There are various ways to send emails from command line using different mail clients but here I am sharing few mail client utility used by most users like mailx, mutt and swaks. - -All the tools we will present to you are very popular and present in the repositories of most Linux distributions, you can install them using the following commands: - -For **Debian / Ubuntu** systems - - apt-get install mutt - apt-get install swaks - apt-get install mailx - apt-get install sharutils - -For Red Hat based systems like **CentOS** or **Fedora** - - yum install mutt - yum install swaks - yum install mailx - yum install sharutils - -### 1) Using mail / mailx ### - -The mailx utility found as the default mailer application in most Linux distributions now includes the support to attach file. If it is not available you can easily install using the following commands please take note that this may not be supported in older versions, to check this you can use the command: - - $ man mail - -And the first line should look like this: - -mailx [-BDdEFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr] [-r from-addr] [-h hops] [-A account] [-S variable[=value]] to-addr . . . - -As you can see it supports the -a attribute to add a file to the email and -s attribute to subject to the email. Use few of below examples to send mails. - -**a) Simple Mail** - -Run the mail command, and then mailx would wait for you to enter the message of the email. You can hit enter for new lines. When done typing the message, press Ctrl+D and mailx would display EOT. - -After than mailx automatically delivers the email to the destination. - - $ mail user@example.com - - HI, - Good Morning - How are you - EOT - -**b) To send email with subject** - - $ echo "Email text" | mail -s "Test Subject" user@example.com - --s is used for defining subject for email. - -**c) To send message from a file** - - $ mail -s "message send from file" user@example.com < /path/to/file - -**d) To send message piped using the echo command** - - $ echo "This is message body" | mail -s "This is Subject" user@example.com - -**e) To send email with attachment** - - $ echo “Body with attachment "| mail -a foo.tar.gz -s "attached file" user@example.com - --a is used for attachments - -### 2) mutt ### - -Mutt is a text-based email client for Unix-like systems. It was developed over 20 years ago and it's an important part of Linux history, one of the first clients to support scoring and threading capabilities. Use few of below examples to send email. - -**a) Send email with subject & body message from a file** - - $ mutt -s "Testing from mutt" user@example.com < /tmp/message.txt - -**b) To send body message piped using the echo command** - - $ echo "This is the body" | mutt -s "Testing mutt" user@example.com - -**c) To send email with attachment** - - $ echo "This is the body" | mutt -s "Testing mutt" user@example.com -a /tmp/foo.tar.gz - -**d) To send email with multiple attachments** - - $ echo "This is the body" | mutt -s "Testing" user@example.com -a foo.tar.gz –a bar.tar.gz - -### 3) swaks ### - -Swaks stands for Swiss Army Knife for SMTP and it is a featureful, flexible, scriptable, transaction-oriented SMTP test tool written and maintained by John Jetmore. You can use the following syntax to send an email with attachment: - - $ swaks -t "foo@bar.com" --header "Subject: Subject" --body "Email Text" --attach foo.tar.gz - -The important thing about Swaks is that it will also debug the full mail transaction for you, so it is a very useful tool if you also wish to debug the mail sending process: - -As you can see it gives you full details about the sending process including what capabilities the receiving mail server supports, each step of the transaction between the 2 servers. - -### 4) uuencode ### - -Email transport systems were originally designed to transmit characters with a seven-bit encoding -- like ASCII. This meant they could send messages with plain text but not "binary" text, such as program files or image files that used all of an eight-bit byte. The program is used to solve this limitation is “uuencode”( "UNIX to UNIX encoding") which encode the mail from binary format to text format that is safe to transmit & program is used to decode the data is called “uudecode” - -We can easily send binary text such as a program files or image files using uuencode with mailx or mutt email client is shown by following example: - - $ uuencode example.jpeg example.jpeg | mail user@example.com - -### Shell Script : Explain how to send email ### - - #!/bin/bash - - FROM="" - SUBJECT="" - ATTACHMENTS="" - TO="" - BODY="" - - # Function to check if entered file names are really files - function check_files() - { - output_files="" - for file in $1 - do - if [ -s $file ] - then - output_files="${output_files}${file} " - fi - done - echo $output_files - } - - echo "*********************" - echo "E-mail sending script." - echo "*********************" - echo - - # Getting the From address from user - while [ 1 ] - do - if [ ! $FROM ] - then - echo -n -e "Enter the e-mail address you wish to send mail from:\n[Enter] " - else - echo -n -e "The address you provided is not valid:\n[Enter] " - fi - - read FROM - echo $FROM | grep -E '^.+@.+$' > /dev/null - if [ $? -eq 0 ] - then - break - fi - done - - echo - - # Getting the To address from user - while [ 1 ] - do - if [ ! $TO ] - then - echo -n -e "Enter the e-mail address you wish to send mail to:\n[Enter] " - else - echo -n -e "The address you provided is not valid:\n[Enter] " - fi - - read TO - echo $TO | grep -E '^.+@.+$' > /dev/null - if [ $? -eq 0 ] - then - break - fi - done - - echo - - # Getting the Subject from user - echo -n -e "Enter e-mail subject:\n[Enter] " - read SUBJECT - - echo - - if [ "$SUBJECT" == "" ] - then - echo "Proceeding without the subject..." - fi - - # Getting the file names to attach - echo -e "Provide the list of attachments. Separate names by space. - If there are spaces in file name, quote file name with \"." - read att - - echo - - # Making sure file names are poiting to real files - attachments=$(check_files "$att") - echo "Attachments: $attachments" - - for attachment in $attachments - do - ATTACHMENTS="$ATTACHMENTS-a $attachment " - done - - echo - - # Composing body of the message - echo "Enter message. To mark the end of message type ;; in new line." - read line - - while [ "$line" != ";;" ] - do - BODY="$BODY$line\n" - read line - done - - SENDMAILCMD="mutt -e \"set from=$FROM\" -s \"$SUBJECT\" \ - $ATTACHMENTS -- \"$TO\" <<< \"$BODY\"" - echo $SENDMAILCMD - - mutt -e "set from=$FROM" -s "$SUBJECT" $ATTACHMENTS -- $TO <<< $BODY - -**Script Output** - - $ bash send_mail.sh - ********************* - E-mail sending script. - ********************* - - Enter the e-mail address you wish to send mail from: - [Enter] test@gmail.com - - Enter the e-mail address you wish to send mail to: - [Enter] test@gmail.com - - Enter e-mail subject: - [Enter] Message subject - - Provide the list of attachments. Separate names by space. - If there are spaces in file name, quote file name with ". - send_mail.sh - - Attachments: send_mail.sh - - Enter message. To mark the end of message type ;; in new line. - This is a message - text - ;; - -### Conclusion ### - -There are many ways of send emails from command line / shell script but here we have shared 4 tools available for unix / linux based distros. Hope you enjoyed reading our article and please provide your valuable comments and also let us know if you know about any new tools. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-shell-script/send-email-subject-body-attachment-linux/ - -作者:[Bobbin Zachariah][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/bobbin/ \ No newline at end of file diff --git a/translated/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md b/translated/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md new file mode 100644 index 0000000000..fe2fa8c5cf --- /dev/null +++ b/translated/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md @@ -0,0 +1,261 @@ +4个可以发送带主题、正文和附件的电子邮件的工具 +================================================================================ +今天的文章里我们会讲到一些使用Linux命令行工具来发送带附件的电子邮件的方法。它有很多用处,比如在应用程序所在服务器上,使用电子邮件发送一个档案过来,或者你可以在脚本中使用这些命令来做一些自动化操作。在本文的例子中,我们会使用foo.tar.gz文件作为附件。 + +有不同的命令行工具可以发送邮件,这里我分享几个多数用户会使用的工具,如`mailx`、`mutt`和`swaks`。 + +我们即将呈现的多数工具都是非常有名的,并且存在于多数Linux发行版默认的软件仓库中,你可以使用如下命令安装: + +在 **Debian / Ubuntu** 系统 + + apt-get install mutt + apt-get install swaks + apt-get install mailx + apt-get install sharutils + +在基于Red Hat的系统,如 **CentOS** 或者 **Fedora** + + yum install mutt + yum install swaks + yum install mailx + yum install sharutils + +### 1) 使用 mail / mailx ### + +`mailx`工具在多数Linux发行版中是默认的邮件程序,现在已经支持发送附件了。如果它不在你的系统中,你可以使用上边的命令安装。有一点需要注意,老版本的mailx可能不支持发送附件,运行如下命令查看是否支持。 + + $ man mail + +第一行看起来是这样的: + + mailx [-BDdEFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr] [-r from-addr] [-h hops] [-A account] [-S variable[=value]] to-addr . . . + +如果你看到它支持`-a`的选项(-a 文件名,将文件作为附件添加到邮件)和`-s`选项(-s 主题,指定邮件的主题),就是支持的。可以使用如下的几个例子发送邮件。 + +**a) 简单的邮件 ** + +运行`mail`命令,然后`mailx`会等待你输入邮件内容。你可以按回车来换行。当输入完成后,按Ctrl + D,`mailx`会显示EOT。 + +然后`mailx`会自动将邮件发送给收件人。 + + $ mail user@example.com + + HI, + Good Morning + How are you + EOT + +**b) 发送有主题的邮件 ** + + $ echo "Email text" | mail -s "Test Subject" user@example.com + +`-s`的用处是指定邮件的主题。 + +**c) 从文件中读取邮件内容并发送 ** + + $ mail -s "message send from file" user@example.com < /path/to/file + +**d) 将从管道获取到的`echo`命令输出作为邮件内容发送 ** + + $ echo "This is message body" | mail -s "This is Subject" user@example.com + +**e) 发送带附件的邮件 ** + + $ echo “Body with attachment "| mail -a foo.tar.gz -s "attached file" user@example.com + +`-a`选项用于指定附件。 + +### 2) mutt ### + +Mutt是类Unix系统上的一个文本界面邮件客户端。它有20多年的历史,在Linux历史中也是一个很重要的部分,它是最早支持进程打分和多线程处理的程序之一。按照如下的例子来发送邮件。 + +**a) 从文件中读取邮件的主题和正文,并发送 ** + + $ mutt -s "Testing from mutt" user@example.com < /tmp/message.txt + +**b) 将从管道获取到的`echo`命令输出作为邮件内容发送 ** + + $ echo "This is the body" | mutt -s "Testing mutt" user@example.com + +**c) 发送带附件的邮件 ** + + $ echo "This is the body" | mutt -s "Testing mutt" user@example.com -a /tmp/foo.tar.gz + +**d) 发送带有多个附件的邮件 ** + + $ echo "This is the body" | mutt -s "Testing" user@example.com -a foo.tar.gz –a bar.tar.gz + +### 3) swaks ### + +Swaks(Swiss Army Knife,瑞士军刀)是SMTP的瑞士军刀,它功能强大、灵活、可编程、面向事务的SMTP测试工具,由John Jetmore开发和维护。你可以使用如下语法发送带附件的邮件: + + $ swaks -t "foo@bar.com" --header "Subject: Subject" --body "Email Text" --attach foo.tar.gz + +关于Swaks一个重要的事情是,它会为你显示整个邮件发送过程,所以如果你想调试邮件发送过程,它是一个非常有用的工具: + +正如你看到的那样,它给你提供了邮件发送过程的所有细节,包括邮件接收服务器的功能支持、两个服务器之间的每一步交互。 + +### 4) uuencode ### + +邮件传输系统最初是被设计来传送7位编码(类似ASCII)的内容的。这就意味这它是用来发送文本内容,而不能发会使用8个位的二进制内容(如程序文件或者图片)。`uuencode`(“UNIX to UNIX encoding”,UNIX之间使用的编码方式)程序用来解决这个限制。使用`uuencode`,发送端将二进制格式的转换成文本格式来传输,接收端再转换回去。 + +我们可以简单地使用`uuencode`和`mailx`或者`mutt`配合,来发送二进制内容,类似这样: + + $ uuencode example.jpeg example.jpeg | mail user@example.com + +### Shell脚本:解释如何发送邮件 ### + + #!/bin/bash + + FROM="" + SUBJECT="" + ATTACHMENTS="" + TO="" + BODY="" + + # 检查文件名对应的文件是否存在 + function check_files() + { + output_files="" + for file in $1 + do + if [ -s $file ] + then + output_files="${output_files}${file} " + fi + done + echo $output_files + } + + echo "*********************" + echo "E-mail sending script." + echo "*********************" + echo + + # 读取用户输入的邮件地址 + while [ 1 ] + do + if [ ! $FROM ] + then + echo -n -e "Enter the e-mail address you wish to send mail from:\n[Enter] " + else + echo -n -e "The address you provided is not valid:\n[Enter] " + fi + + read FROM + echo $FROM | grep -E '^.+@.+$' > /dev/null + if [ $? -eq 0 ] + then + break + fi + done + + echo + + # 读取用户输入的收件人地址 + while [ 1 ] + do + if [ ! $TO ] + then + echo -n -e "Enter the e-mail address you wish to send mail to:\n[Enter] " + else + echo -n -e "The address you provided is not valid:\n[Enter] " + fi + + read TO + echo $TO | grep -E '^.+@.+$' > /dev/null + if [ $? -eq 0 ] + then + break + fi + done + + echo + + # 读取用户输入的邮件主题 + echo -n -e "Enter e-mail subject:\n[Enter] " + read SUBJECT + + echo + + if [ "$SUBJECT" == "" ] + then + echo "Proceeding without the subject..." + fi + + # 读取作为附件的文件名 + echo -e "Provide the list of attachments. Separate names by space. + If there are spaces in file name, quote file name with \"." + read att + + echo + + # 确保文件名指向真实文件 + attachments=$(check_files "$att") + echo "Attachments: $attachments" + + for attachment in $attachments + do + ATTACHMENTS="$ATTACHMENTS-a $attachment " + done + + echo + + # 读取完整的邮件正文 + echo "Enter message. To mark the end of message type ;; in new line." + read line + + while [ "$line" != ";;" ] + do + BODY="$BODY$line\n" + read line + done + + SENDMAILCMD="mutt -e \"set from=$FROM\" -s \"$SUBJECT\" \ + $ATTACHMENTS -- \"$TO\" <<< \"$BODY\"" + echo $SENDMAILCMD + + mutt -e "set from=$FROM" -s "$SUBJECT" $ATTACHMENTS -- $TO <<< $BODY + +** 脚本输出 ** + + $ bash send_mail.sh + ********************* + E-mail sending script. + ********************* + + Enter the e-mail address you wish to send mail from: + [Enter] test@gmail.com + + Enter the e-mail address you wish to send mail to: + [Enter] test@gmail.com + + Enter e-mail subject: + [Enter] Message subject + + Provide the list of attachments. Separate names by space. + If there are spaces in file name, quote file name with ". + send_mail.sh + + Attachments: send_mail.sh + + Enter message. To mark the end of message type ;; in new line. + This is a message + text + ;; + +### 总结 ### + +有很多方法可以使用命令行/Shell脚本来发送邮件,我们只分享了其中4个类Unix系统可用的工具。希望你喜欢我们的文章,并且提供您的宝贵意见,让我们知道您想了解哪些新工具。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-shell-script/send-email-subject-body-attachment-linux/ + +作者:[Bobbin Zachariah][a] +译者:[goreliu](https://github.com/goreliu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/bobbin/ \ No newline at end of file From af3da6d18941c590905a9b3bbf1c64e07de4531e Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 20 May 2015 16:03:26 +0800 Subject: [PATCH 0895/2517] Translating by ZTinoZ --- ...7 15 Things to Do After Installing Ubuntu 15.04 Desktop.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index 857b2157b3..d5e543a7ba 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -93,14 +93,14 @@ Install Media Players ![Media Player Playlist](http://www.tecmint.com/wp-content/uploads/2015/04/media-playllist.jpg) Media Player Playlist -除了Besides this multimedia players also install ubuntu-restricted-extras and Java support packages in order to decode and support other restricted media formats. +除了多媒体播放器,安装ubuntu-restricted-extras和Java支持包也可以解码并支持其它受约束的多媒体格式。 $ sudo apt-get install ubuntu-restricted-extras openjdk-8-jdk ![Install Ubuntu Extras](http://www.tecmint.com/wp-content/uploads/2015/04/install-ubuntu-extras.jpg) Install Ubuntu Extras -To enable DVD Playback and other multimedia codecs issue the following command on Terminal: +在终端上输入以下命令来启用DVD Playback和其它多媒体解码器: $ sudo apt-get install ffmpeg gstreamer0.10-plugins-bad lame libavcodec-extra $ sudo /usr/share/doc/libdvdread4/install-css.sh From cc999458e61e54c9da842a7040f089b9bd43391a Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Wed, 20 May 2015 18:37:13 +0800 Subject: [PATCH 0896/2517] [Translating] 20150326 How to set up server monitoring system with Monit.md --- ...50326 How to set up server monitoring system with Monit.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150326 How to set up server monitoring system with Monit.md b/sources/tech/20150326 How to set up server monitoring system with Monit.md index c8f9efaecd..a803878b39 100644 --- a/sources/tech/20150326 How to set up server monitoring system with Monit.md +++ b/sources/tech/20150326 How to set up server monitoring system with Monit.md @@ -1,3 +1,5 @@ +Translating by goreliu ... + How to set up server monitoring system with Monit ================================================================================ Many Linux admins rely on a centralized remote monitoring system (e.g., [Nagios][1] or [Cacti][2]) to check the health of their network infrastructure. While centralized monitoring makes an admin's life easy when dealing with many hosts and devices, a dedicated monitoring box obviously becomes a single point of failure; if the monitoring box goes down or becomes unreachable for whatever reason (e.g., bad hardware or network outage), you will lose visibility on your entire infrastructure. @@ -237,7 +239,7 @@ In this tutorial, I demonstrate how to set up Monit on a local server. What I sh via: http://xmodulo.com/server-monitoring-system-monit.html 作者:[Iulian Murgulet][a] -译者:[译者ID](https://github.com/译者ID) +译者:[goreliu](https://github.com/goreliu) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3797ef5f4fc973220f9f83946e0b38c1165ba82a Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Wed, 20 May 2015 22:45:41 +0800 Subject: [PATCH 0897/2517] after translation --- ...epositories Using Gitblit Tool in Linux.md | 101 ------------------ ...epositories Using Gitblit Tool in Linux.md | 101 ++++++++++++++++++ 2 files changed, 101 insertions(+), 101 deletions(-) delete mode 100644 sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md create mode 100644 translated/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md diff --git a/sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md b/sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md deleted file mode 100644 index 806a462675..0000000000 --- a/sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md +++ /dev/null @@ -1,101 +0,0 @@ -How to Serve Git Repositories Using Gitblit Tool in Linux -================================================================================ -Hi friends, today we'll be learning how to install Gitblit in your Linux Server or PC. So, lets check out what is a Git, its features and steps to install Gitblit. [Git is a distributed revision control system][1] with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. It was initially designed and developed by Linus Torvalds for Linux kernel under the terms of the GNU General Public License version 2 development in 2005, and has since become the most widely adopted version control system for software development. - -[Gitblit is a free and open source][2] built on a pure Java stack designed to handle everything from small to very large projects with speed and efficiency for serving Git repositories. It is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows. - -#### Features of Gitblit #### - -- It can be used as a dumb repository viewer with no administrative controls or user accounts. -- It can be used as a complete Git stack for cloning, pushing, and repository access control. -- It can be used without any other Git tooling (including actual Git) or it can cooperate with your established tools. - -### 1. Creating Gitblit install directory ### - -First of all we'll gonna to create a directory in our server in which we'll be installing our latest gitblit in. - - $ sudo mkdir -p /opt/gitblit - - $ cd /opt/gitblit - -![creating directory gitblit](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-directory-gitblit.png) - -### 2. Downloading and Extracting ### - -Now, we will want to download the latest gitblit from the official site. Here, the current version of gitblit we are gonna install is 1.6.2 . So, please change it as the version you are gonna install in your system. - - $ sudo wget http://dl.bintray.com/gitblit/releases/gitblit-1.6.2.tar.gz - -![downloading gitblit package](http://blog.linoxide.com/wp-content/uploads/2015/01/downloading-gitblit.png) - -Now, we'll be extracting our downloaded tarball package to our current folder ie /opt/gitblit/ - - $ sudo tar -zxvf gitblit-1.6.2.tar.gz - -![extracting gitblit tar](http://blog.linoxide.com/wp-content/uploads/2015/01/extracting-gitblit-tar.png) - -### 3. Configuring and Running ### - -Now, we'll configure our Gitblit configuration. If you want to customize the behavior of Gitblit server, you can do it by modifying `gitblit/data/gitblit.properties` . Now, after you are done configuring the configuration. We finally wanna run our gitblit. We have two options on running gitblit, first is that we run it manually by the command below: - - $ sudo java -jar gitblit.jar --baseFolder data - -And next is to add and use gitblit as service. Here are the steps that we'll need to follow to use gitblit as service in linux. - -So, As I am running Ubuntu, the command below will be sudo cp service-ubuntu.sh /etc/init.d/gitblit so please change the file name service-ubuntu.sh to the distribution you are currently running. - - $ sudo ./install-service-ubuntu.sh - - $ sudo service gitblit start - -![starting gitblit service](http://blog.linoxide.com/wp-content/uploads/2015/01/starting-gitblit-service.png) - -Open your browser to http://localhost:8080 or https://localhost:8443 or replace "localhost" with the ip-address of the machine depending on your system configuration. Enter the default administrator credentials: admin / admin and click the Login button. - -![gitblit welcome](http://blog.linoxide.com/wp-content/uploads/2015/01/gitblit-welcome.png) - -Now, we'll wanna add a new user. First you'll need to login to the admin with default administrator credentials: username = **admin** and password = **admin** . - -Then, Goto user icon > users > (+) new user. And create a new user like as shown in the figure below. - -![add new user](http://blog.linoxide.com/wp-content/uploads/2015/01/add-user.png) - -Now, we'll create a new repo out of the box. Go to repositories > (+) new repository . Then, add new repository as shown below. - -![add new repository](http://blog.linoxide.com/wp-content/uploads/2015/01/add-new-repository.png) - -#### Create a new repository on the command-line #### - - touch README.md - git init - git add README.md - git commit -m "first commit" - git remote add origin ssh://arunlinoxide@localhost:29418/linoxide.com.git - git push -u origin master - -Please replace the username arunlinoxide with the user you add. - -#### Push an existing repository from the command-line #### - - git remote add origin ssh://arunlinoxide@localhost:29418/linoxide.com.git - git push -u origin master - -**Note**: It is highly recommended to everyone to change the password of username "admin" as it comes by default. - -### Conclusion ### - -Hurray, we finally installed our latest Gitblit in our Linux Computer. We can now enjoy such a beautiful version controlling system for our projects whether its small or large, no matter. With Gitblit, version controlling has been too easy. It is easy to learn and has a tiny footprint with lightning fast performance. So, if you have any questions, suggestions, feedback please write them in the comment box below. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/serve-git-repositories-gitblit/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://git-scm.com/ -[2]:http://gitblit.com/ \ No newline at end of file diff --git a/translated/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md b/translated/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md new file mode 100644 index 0000000000..45c09f3475 --- /dev/null +++ b/translated/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md @@ -0,0 +1,101 @@ +如何在Linux下使用Gitblit工具创建Git仓库服务 +================================================================================ +嗨!朋友,今天我们将学习如何在你的Linux服务器或者PC上安装Gitblit工具。首先,我们看看什么是Git,它的功能以及安装Gitblit的步骤。[Git是分布式版本控制系统][1],它强调速度、数据一致性,并且支持分布式、非线性工作流。它最初由Linus Torvalds在2005年为Linux内核设计和开发,使用GPL2证书,并因此成为软件开发中使用最广泛的版本控制系统。 + +[Gitblit是完全开源的软件][2],它基于纯粹的Java堆栈,被设计以在Git仓库速度和效率方面胜任从小型到极大型的项目。它很容易学习和上手,并有着闪电般的性能。它在廉价的本地分支、便于staging、多工作流等方面远胜过一些SCM(版本控制)工具,比如Subversion、CVS、Perforce和ClearCase。 + +#### Gitblit的功能 #### + +- 它可以做为一个无声的仓库视图,没有管理控制以及用户账户。 +- 它可以做为完整的Git堆栈,拥有clone, pushing和仓库存取控制。 +- 它能独立于其他Git工具使用(包括实际的Git),它能和您已创建的工具合作。 + +### 1.创建Gitblit安装目录 ### + +首先我们将在我们的服务器上建立一个目录,我们将在该目录下安装最新的Gitblit。 + + $ sudo mkdir -p /opt/gitblit + + $ cd /opt/gitblit + +![创建gitblit目录](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-directory-gitblit.png) + +### 2. 下载并解压 ### + +现在,我们将从Gitblit官方站点下载最新版的Gitblit。这里我们将安装1.6.2版本。所以,请在安装时根据具体的版本对命令进行修改。 + + $ sudo wget http://dl.bintray.com/gitblit/releases/gitblit-1.6.2.tar.gz + +![下载gitblit安装包](http://blog.linoxide.com/wp-content/uploads/2015/01/downloading-gitblit.png) + +接下来,我们将解压下载到的tarball压缩包至之前创建的目录 /opt/gitblit/ + + $ sudo tar -zxvf gitblit-1.6.2.tar.gz + +![解压gitblit压缩包](http://blog.linoxide.com/wp-content/uploads/2015/01/extracting-gitblit-tar.png) + +### 3.配置并运行 ### + +现在,我们将对Gitblit进行配置。如果你想要定制Gitblit的行为,你可以修改`gitblit/data/gitblit.properties`。在完成配置后,我们将运行安装好的gitblit。有两种方式来运行gitblit,第一种是通过下面的命令手动运行: + + $ sudo java -jar gitblit.jar --baseFolder data + +另一种是将gitblit添加为服务。下面是在linux下将gitblit添加为服务的步骤。 + +由于我在使用Ubuntu,下面的命令将是 sudo cp service-ubuntu.sh /etc/init.d/gitblit。所以请根据你的发行版修改文件名service-ubuntu.sh为相应的你运行的发行版。 + + $ sudo ./install-service-ubuntu.sh + + $ sudo service gitblit start + +![启动gitblit服务](http://blog.linoxide.com/wp-content/uploads/2015/01/starting-gitblit-service.png) + +在你的浏览器中打开http://localhost:8080或https://localhost:8443,也可以将localhost根据本地配置替换为IP地址。输入默认的管理员凭证:admin/admin并点击login按钮。 + +![gitblit欢迎页面](http://blog.linoxide.com/wp-content/uploads/2015/01/gitblit-welcome.png) + +现在,我们将添加一个新的用户。首先,你需要以admin用户登录,username = **admin**,password = **admin**。 + +然后,点击 user icon > users > (+) new user 来创建一个新用户,如下图所示。 + +![添加新用户](http://blog.linoxide.com/wp-content/uploads/2015/01/add-user.png) + +现在,我们将创建一个开箱可用的仓库。点击 repositories > (+) new repository。然后,如下图所示添加新的仓库。 + +![添加新的仓库](http://blog.linoxide.com/wp-content/uploads/2015/01/add-new-repository.png) + +#### 使用命令行创建一个新的仓库 #### + + touch README.md + git init + git add README.md + git commit -m "first commit" + git remote add origin ssh://arunlinoxide@localhost:29418/linoxide.com.git + git push -u origin master + +请将用户名arunlinoxide替换为你添加的用户名。 + +#### 在命令行中push一个已存在的仓库 #### + + git remote add origin ssh://arunlinoxide@localhost:29418/linoxide.com.git + git push -u origin master + +**注意**:强烈建议所有人修改用户名“admin”的密码。 + +### 结论 ### + +欢呼吧!我们已经在Linux电脑中安装好了最新版本的Gitblit。接下来我们便可以在我们的大小工程中享受这样一个优美的版本控制系统。有了Gitblit,版本控制便再容易不过了。它有易于学习、轻量级、高性能的特点。因此,如果你有任何的问题、建议和反馈,请在留言处留言。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/serve-git-repositories-gitblit/ + +作者:[Arun Pyasi][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://git-scm.com/ +[2]:http://gitblit.com/ \ No newline at end of file From f2be3eca0187b39b285eed0f1cb7cd2873bb210e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 20 May 2015 23:15:23 +0800 Subject: [PATCH 0898/2517] PUB:20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux @geekpi --- ...s--How to change PATH environment variable on Linux.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md (90%) diff --git a/translated/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md b/published/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md similarity index 90% rename from translated/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md rename to published/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md index 5cc7a17bd2..321ce4b2d3 100644 --- a/translated/tech/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md +++ b/published/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md @@ -1,4 +1,4 @@ -Linux有问必答--如何在Linux中修改环境变量PATH +Linux有问必答:如何在Linux中修改环境变量PATH ================================================================================ > **提问**: 当我试着运行一个程序时,它提示“command not found”。 但这个程序就在/usr/local/bin下。我该如何添加/usr/local/bin到我的PATH变量下,这样我就可以不用指定路径来运行这个命令了。 @@ -38,7 +38,7 @@ Linux有问必答--如何在Linux中修改环境变量PATH /usr/lib64/qt-3.3/bin:/bin:/usr/bin:/usr/sbin:/sbin:/home/xmodulo/bin:/usr/local/bin -更新的PATH会在当前的PATH一直有效。然而,更改将在新的会话中失效。 +更新后的PATH会在当前的会话一直有效。然而,更改将在新的会话中失效。 如果你想要永久更改PATH变量,用编辑器打开~/.bashrc (或者 ~/.bash_profile),接着在最后添加下面这行。 @@ -46,7 +46,7 @@ Linux有问必答--如何在Linux中修改环境变量PATH 接着运行下面这行永久激活更改: - $ source ~/.bashrc (or source ~/.bash_profile) + $ source ~/.bashrc (或者 source ~/.bash_profile) ### 改变系统级的环境变量 ### @@ -66,7 +66,7 @@ via: http://ask.xmodulo.com/change-path-environment-variable-linux.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 522b7ea44009d0dc4aaa902e7f1b7e1aaac2b065 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 20 May 2015 23:37:30 +0800 Subject: [PATCH 0899/2517] PUB:20150410 What is a good alternative to wget or curl on Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wangjiezhe 翻译的不错! --- ...od alternative to wget or curl on Linux.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150410 What is a good alternative to wget or curl on Linux.md (71%) diff --git a/translated/tech/20150410 What is a good alternative to wget or curl on Linux.md b/published/20150410 What is a good alternative to wget or curl on Linux.md similarity index 71% rename from translated/tech/20150410 What is a good alternative to wget or curl on Linux.md rename to published/20150410 What is a good alternative to wget or curl on Linux.md index caa4010661..3af223b631 100644 --- a/translated/tech/20150410 What is a good alternative to wget or curl on Linux.md +++ b/published/20150410 What is a good alternative to wget or curl on Linux.md @@ -1,12 +1,13 @@ -Linux 上 wget 或 curl 的更佳替代品 +用腻了 wget 或 curl,有什么更好的替代品吗? ================================================================================ -如果你经常需要通过终端以非交互模式访问网络服务器(例如,从网络上下载文件,或者是测试 RESTful 网络服务接口),可能你会选择的工具是 wget 或 curl。通过大量的命令行选项,这两种工具都可以处理很多非交互网络访问的情况(比如[这里][1],[这里][2],还有[这里][3])。然而,即使像这些一样的强大的工具,也只是与你对如何使用它们的了解程度等同。除非你很精通那些又多又笨(原文是 nitty and gritty)的语法细节,这些工具对于你来说只不过是简单的网络下载器。 -就像宣传的那样,“为人类着想的类 curl 工具”,[HTTPie][4] 设计用来增强 wget 和 curl 的可用性。它的主要目标是使通过命令行与网络服务器进行交互的过程变得尽可能的人性化。为此,HTTPie 支持具有表现力,但又很简单很直观的语法。它以彩色模式显示响应,并且还有一些不错的优点,比如对 JSON 的良好支持,和持久性会话用以作业流程化。 +如果你经常需要通过终端以非交互模式访问网络服务器(例如,从网络上下载文件,或者是测试 RESTful 网络服务接口),可能你会选择的工具是 wget 或 curl。通过大量的命令行选项,这两种工具都可以处理很多非交互网络访问的情况(比如[这里][1]、[这里][2],还有[这里][3])。然而,即使像这些一样的强大的工具,你也只能发挥你所了解的那些选项的功能。除非你很精通那些繁冗的语法细节,这些工具对于你来说只不过是简单的网络下载器而已。 -我知道很多人对把像 wget 和 curl 这样的无处不在的可用的完美工具换成完全没听说过的软件心存怀疑。这种观点是好的,特别是如果你是一个系统管理员、要处理很多不同的硬件的话。然而,对于开发者和终端用户来说,重要的是效率。如果我发现了一个工具的用户友好替代,我没有看到任何问题如果你采用易于使用的版本来节省你宝贵的时间。没有必要对替换掉的工具保持信仰忠诚。毕竟,对于 Linux 来说,最好的事情是可以选择。 +就像其宣传的那样,“给人用 curl 类工具”,[HTTPie][4] 设计用来增强 wget 和 curl 的可用性。它的主要目标是使通过命令行与网络服务器进行交互的过程变得尽可能的人性化。为此,HTTPie 支持具有表现力、但又很简单很直观的语法。它以彩色模式显示响应,并且还有一些不错的优点,比如对 JSON 的良好支持,和持久性会话用以作业流程化。 -在这篇文章中,让我们来回顾并展示一下我所说的 HTTPie,一个用户友好的 wget 和 curl 的替代。 +我知道很多人对把像 wget 和 curl 这样的无处不在的、可用的、完美的工具换成完全没听说过的软件心存疑虑。这种观点是好的,特别是如果你是一个系统管理员、要处理很多不同的硬件的话。然而,对于开发者和终端用户来说,重要的是效率。如果我发现了一个工具的用户更佳替代品,那么我认为采用易于使用的版本来节省宝贵的时间是毫无疑问的。没有必要对替换掉的工具保持信仰忠诚。毕竟,对于 Linux 来说,最好的事情就是可以选择。 + +在这篇文章中,让我们来了解并展示一下我所说的 HTTPie,一个用户友好的 wget 和 curl 的替代。 ![](https://farm8.staticflickr.com/7633/16849137018_bcc7a616fc_b.jpg) @@ -40,10 +41,9 @@ HTTPie 是用 Python 写的,所以你可以在几乎所有地方(Linux,Mac 你可以使用 <header:value> 的格式来定制头部。例如,我们发送一个 HTTP GET 请求到 www.test.com ,使用定制用户代理(user-agent)和来源(referer),还有定制头部(比如 MyParam)。 - $ http www.test.com User-Agent:Xmodulo/1.0 Referer:http://xmodulo.com MyParam:Foo -注意到当使用 HTTP GET 方法时,你无需指定任何 HTTP 方法。 +注意到当使用 HTTP GET 方法时,就无需明确指定 HTTP 方法。 这个 HTTP 请求看起来如下: @@ -121,7 +121,7 @@ HTTPie 的另外一个用户友好特性是输入重定向,你可以使用缓 ### 结束语 ### -在这篇文章中,我介绍了 HTTPie,一个 wget 和 curl 的可能替代工具。除了这里展示的几个简单的例子,你可以在[官方网站][7]上找到 HTTPie 的很多有趣的应用。再次重复一遍,一款强大的工具也只相当于你对它的了解程度。从个人而言,我更热衷于 HTTPie,因为我在寻找一种更简洁的测试复杂网络接口的方法。 +在这篇文章中,我介绍了 HTTPie,一个 wget 和 curl 的可能替代工具。除了这里展示的几个简单的例子,你可以在其[官方网站][7]上找到 HTTPie 的很多有趣的应用。再次重复一遍,一款再强大的工具也取决于你对它的了解程度。从个人而言,我更倾向于 HTTPie,因为我在寻找一种更简洁的测试复杂网络接口的方法。 你怎么看? @@ -131,15 +131,15 @@ via: http://xmodulo.com/wget-curl-alternative-linux.html 作者:[Dan Nanni][a] 译者:[wangjiezhe](https://github.com/wangjiezhe) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/nanni [1]:http://xmodulo.com/how-to-download-multiple-files-with-wget.html [2]:http://xmodulo.com/how-to-use-custom-http-headers-with-wget.html -[3]:http://ask.xmodulo.com/custom-http-header-curl.html +[3]:https://linux.cn/article-4957-1.html [4]:https://github.com/jakubroztocil/httpie -[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[5]:https://linux.cn/article-2324-1.html [6]:http://ask.xmodulo.com/install-pip-linux.html [7]:https://github.com/jakubroztocil/httpie From 08e9d737523c4ef03255fcc7607cef2addaf0dd1 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 21 May 2015 00:04:24 +0800 Subject: [PATCH 0900/2517] PUB:20150409 Install Inkscape - Open Source Vector Graphic Editor @ZTinoZ --- ...ape - Open Source Vector Graphic Editor.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename {translated/tech => published}/20150409 Install Inkscape - Open Source Vector Graphic Editor.md (62%) diff --git a/translated/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md b/published/20150409 Install Inkscape - Open Source Vector Graphic Editor.md similarity index 62% rename from translated/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md rename to published/20150409 Install Inkscape - Open Source Vector Graphic Editor.md index f18b10315e..c6361e780b 100644 --- a/translated/tech/20150409 Install Inkscape - Open Source Vector Graphic Editor.md +++ b/published/20150409 Install Inkscape - Open Source Vector Graphic Editor.md @@ -1,8 +1,8 @@ -安装Inkscape - 开源适量图形编辑器 +Inkscape - 开源适量图形编辑器 ================================================================================ -Inkscape是一款开源矢量图形编辑工具,它使用可缩放矢量图形(SVG)图形格式并不同于它的竞争对手如Xara X、Corel Draw和Adobe Illustrator等等。SVG是一个广泛部署、免版税使用的图形格式,由W3C SVG工作组开发和维护。这是一个跨平台工具,完美运行于Linux、Windows和Mac OS上。 +Inkscape是一款开源矢量图形编辑工具,并不同于Xara X、Corel Draw和Adobe Illustrator等竞争对手,它使用的是可缩放矢量图形(SVG)图形格式。SVG是一个广泛部署、免版税使用的图形格式,由W3C SVG工作组开发和维护。这是一个跨平台工具,完美运行于Linux、Windows和Mac OS上。 -Inkscape始于2003年,起初它的bug跟踪系统托管于Sourceforge上但是 后来迁移到了Launchpad上。当前它最新的一个稳定版本是0.91,它不断地在发展和修改中。我们将在本文里了解一下它的突出特点和安装过程。 +Inkscape始于2003年,起初它的bug跟踪系统托管于Sourceforge上,但是后来迁移到了Launchpad上。当前它最新的一个稳定版本是0.91,它不断地在发展和修改中。我们将在本文里了解一下它的突出特点和安装过程。 ### 显著特性 ### @@ -12,30 +12,30 @@ Inkscape始于2003年,起初它的bug跟踪系统托管于Sourceforge上但是 - 用铅笔工具来画出不同颜色、大小和形状的手绘线,用贝塞尔曲线(笔式)工具来画出直线和曲线,通过书法工具来应用到手写的书法笔画上等等 - 用文本工具来创建、选择、编辑和格式化文本。在纯文本框、在路径上或在形状里操作文本 -- 有效绘制各种形状,像矩形、椭圆形、圆形、弧线、多边形、星形和螺旋形等等并调整其大小、旋转并修改(圆角化)它们 +- 方便绘制各种形状,像矩形、椭圆形、圆形、弧线、多边形、星形和螺旋形等等并调整其大小、旋转并修改(圆角化)它们 - 用简单地命令创建并嵌入位图 #### 对象处理 #### -- 通过交互式操作和调整数值来扭曲、移动、测量、旋转目标 -- 执行力提升并减少了Z-order操作。 -- 对象群组化或取消群组化可以去创建一个虚拟层阶用来编辑或处理 -- 图层采用层次结构树的结构并且能锁定或以各式各样的处理方式来重新布置 +- 通过交互式操作和调整参量来扭曲、移动、测量、旋转目标 +- 可以对 Z 轴进行提升或降低操作。 +- 通过对象组合和取消组合可以创建一个虚拟层用来编辑或处理 +- 图层采用层次结构树的结构,并且能锁定或以各式各样的处理方式来重新布置 - 分布与对齐指令 #### 填充与边框 #### -- 复制/粘贴风格 +- 可以复制/粘贴不同风格 - 取色工具 - 用RGB, HSL, CMS, CMYK和色盘这四种不同的方式选色 -- 渐层编辑器能创建和管理多停点渐层 -- 定义一个图像或其它选择用来进行花纹填充 -- 用一些预定义泼洒花纹可对边框进行花纹泼洒 -- 通过路径标示器来开始、对折和结束标示 +- 渐变层编辑器能创建和管理多停点渐变层 +- 使用图像或其它选择区作为花纹填充 +- 用一些预定义点状花纹进行笔触填充 +- 通过路径标示器标示开始、对折和结束点 #### 路径上的操作 #### -- 节点编辑:移动节点和贝塞尔曲线掌控,节点的对齐和分布等等 +- 节点编辑:移动节点和贝塞尔曲线控制点,节点的对齐和分布等等 - 布尔运算(是或否) - 运用可变的路径起迄点可简化路径 - 路径插入和增设连同动态和链接偏移对象 @@ -43,9 +43,9 @@ Inkscape始于2003年,起初它的bug跟踪系统托管于Sourceforge上但是 #### 文本处理 #### -- 所有安装好的外框字体都能用甚至可以从右至左对齐对象 +- 所有安装好的框线字体都能用,甚至可以从右至左对齐对象 - 格式化文本、调整字母间距、行间距或列间距 -- 路径上的文本和形状上的文本和路径或形状都可以被编辑和修改 +- 路径上和形状上的文本中的文本、路径或形状都可以被编辑和修改 #### 渲染 #### @@ -78,7 +78,7 @@ PPA添加到APT库中后,我们要用以下命令进行更新: ### 结论 ### -Inkscape是一款特点鲜明的图形编辑工具,它给予用户充分发挥自己艺术力的权利。它还是一款自由安装和自定义开源应用并且支持大范围文件类型包括JPEG, PNG, GIF和PDF且不仅这些。访问它的 [官方网站][2] 来获取更多新闻和应用更新。 +Inkscape是一款特点鲜明的图形编辑工具,它给予用户充分发挥自己艺术能力的权利。它还是一款自由安装和自定义的开源应用,并且支持各种文件类型,包括JPEG, PNG, GIF和PDF及更多。访问它的 [官方网站][2] 来获取更多新闻和应用更新。 -------------------------------------------------------------------------------- @@ -86,7 +86,7 @@ via: http://linoxide.com/tools/install-inkscape-open-source-vector-graphic-edito 作者:[Aun Raza][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f59deb250e4e8212c0ab45e7233623a3c5cdecc0 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 21 May 2015 00:08:10 +0800 Subject: [PATCH 0901/2517] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Your Network And Servers With Observium.md | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 published/20150304 Monitoring Your Network And Servers With Observium.md diff --git a/published/20150304 Monitoring Your Network And Servers With Observium.md b/published/20150304 Monitoring Your Network And Servers With Observium.md new file mode 100644 index 0000000000..14fc41b746 --- /dev/null +++ b/published/20150304 Monitoring Your Network And Servers With Observium.md @@ -0,0 +1,174 @@ +使用Observium来监控你的网络和服务器 +================================================================================ +### 简介### + +在监控你的服务器、交换机或者设备时遇到过问题吗?**Observium** 可以满足你的需求。这是一个免费的监控系统,它可以帮助你远程监控你的服务器。它是一个由PHP编写的基于自动发现 SNMP 的网络监控平台,支持非常广泛的网络硬件和操作系统,包括 Cisco、Windows、Linux、HP、NetApp 等等。在此我会给出在 Ubuntu 12.04 上一步步地设置一个 **Observium** 服务器的介绍。 + +![](http://www.unixmen.com/wp-content/uploads/2015/03/Capture1.png) + +目前有两种不同的 **observium** 版本。 + +- Observium 社区版本是一个在 QPL 开源许可证下的免费工具,这个版本是对于较小部署的最好解决方案。该版本每6个月进行一次安全性更新。 +- 第2个版本是 Observium 专业版,该版本采用基于 SVN 的发布机制。 会得到每日安全性更新。 该工具适用于服务提供商和企业级部署。 + +更多信息可以通过其[官网][1]获得。 + +### 系统需求### + +要安装 **Observium**, 需要具有一个最新安装的服务器。**Observium** 是在 Ubuntu LTS 和 Debian 系统上进行开发的,所以推荐在 Ubuntu 或 Debian 上安装 **Observium**,因为可能在别的平台上会有一些小问题。 + +该文章会引导你在 Ubuntu 12.04 上安装 **Observium**。对于小型的 **Observium** 安装,建议使用 256MB 内存和双核处理器的配置。 + +### 安装需求 ### + +在安装 **Observuim** 之前,你需要确认安装所有的依赖关系包。 + +首先,使用下面的命令更新你的服务器: + + sudo apt-get update + +然后你需要安装下列运行 Observuim 所需的全部软件包。 + +Observium 需要使用下面所列出的软件才能正确的运行: + +- LAMP 服务器 +- fping +- Net-SNMP 5.4+ +- RRDtool 1.3+ +- Graphviz + +对于可选特性的要求: + +- Ipmitool - 仅在当你想要获取服务器上的 IPMI(Intelligent Platform Management Interface 智能平台管理接口)基板控制器时。 +- Libvirt-bin - 仅在当你想要使用 libvirt 进行远程 VM 主机监控时。 + + sudo apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-json php-pear snmp fping mysql-server mysql-client python-mysqldb rrdtool subversion whois mtr-tiny ipmitool graphviz imagemagick libvirt ipmitool + +### 为 Observium 创建 MySQL 数据库及其用户。 + +现在你需要登录到 MySQL 中并为 **Observium** 创建数据库: + + mysql -u root -p + +在用户验证成功之后,你需要按照下面的命令创建该数据库。 + + CREATE DATABASE observium; + +数据库名为 **Observium**,稍后你会需要这个信息。 + +现在你需要创建数据库管理员用户。 + + CREATE USER observiumadmin@localhost IDENTIFIED BY 'observiumpassword'; + +接下来,你需要给该管理员用户相应的权限来管理创建的数据库。 + + GRANT ALL PRIVILEGES ON observium.* TO observiumadmin@localhost; + +你需要将权限信息写回到磁盘中来激活新的 MySQL 用户: + + FLUSH PRIVILEGES; + exit + +### 下载并安装 Observium### + +现在我们的系统已经准备好了, 可以开始Observium的安装了。 + +第一步,创建 Observium 将要使用的文件目录: + + mkdir -p /opt/observium && cd /opt + +按本教程的目的,我们将会使用 Observium 的社区/开源版本。使用下面的命令下载并解压: + + wget http://www.observium.org/observium-community-latest.tar.gz + tar zxvf observium-community-latest.tar.gz + +现在进入到 Observium 目录。 + + cd observium + +将默认的配置文件 '**config.php.default**' 复制到 '**config.php**',并将数据库配置选项填充到配置文件中: + + cp config.php.default config.php + nano config.php + +---------- + + / Database config + $config['db_host'] = 'localhost'; + $config['db_user'] = 'observiumadmin'; + $config['db_pass'] = 'observiumpassword'; + $config['db_name'] = 'observium'; + +现在为 MySQL 数据库设置默认的数据库模式: + + php includes/update/update.php + +现在你需要创建一个文件目录来存储 rrd 文件,并修改其权限以便让 apache 能将写入到文件中。 + + mkdir rrd + chown apache:apache rrd + +为了在出现问题时排错,你需要创建日志文件。 + + mkdir -p /var/log/observium + chown apache:apache /var/log/observium + +现在你需要为 Observium 创建虚拟主机配置。 + + + DocumentRoot /opt/observium/html/ + ServerName observium.domain.com + CustomLog /var/log/observium/access_log combined + ErrorLog /var/log/observium/error_log + + AllowOverride All + Options FollowSymLinks MultiViews + + + +下一步你需要让你的 Apache 服务器的 rewrite (重写)功能生效。 + +为了让 'mod_rewrite' 生效,输入以下命令: + + sudo a2enmod rewrite + +该模块在下一次 Apache 服务重启之后就会生效。 + + sudo service apache2 restart + +###配置 Observium### + +在登入 Web 界面之前,你需要为 Observium 创建一个管理员账户(级别10)。 + + # cd /opt/observium + # ./adduser.php admin adminpassword 10 + User admin added successfully. + +下一步为发现和探寻任务设置一个 cron 任务,创建一个新的文件 ‘**/etc/cron.d/observium**’ 并在其中添加以下的内容。 + + 33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1 + */5 * * * * root /opt/observium/discovery.php -h new >> /dev/null 2>&1 + */5 * * * * root /opt/observium/poller-wrapper.py 1 >> /dev/null 2>&1 + +重载 cron 进程来增加新的任务。 + + # /etc/init.d/cron reload + +好啦,你已经完成了 Observium 服务器的安装拉! 使用你的浏览器登录到 **http://\**,然后上路吧。 + +![](http://www.unixmen.com/wp-content/uploads/2015/03/Capture.png) + +尽情享受吧! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/monitoring-network-servers-observium/ + +作者:[anismaj][a] +译者:[theo-l](http://github.com/theo-l) +校对:[wxy](http://github.com/wxy) + +本文由 [LCTT](http://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/anis/ +[1]:http://www.observium.org/ From 4b93be5c4618a2491680eb9380b2f743f3892209 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 21 May 2015 08:11:46 +0800 Subject: [PATCH 0902/2517] =?UTF-8?q?20150520-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... X GNU Open Source and Apple in History.md | 57 ++++++ ...se Docker Machine with a Cloud Provider.md | 147 +++++++++++++++ ... How to Use tmpfs on RHEL or CentOS 7.0.md | 64 +++++++ ...dgets on Ubuntu or Debian or Linux Mint.md | 167 +++++++++++++++++ ...Backup Files or Directories Using rsync.md | 170 ++++++++++++++++++ 5 files changed, 605 insertions(+) create mode 100644 sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md create mode 100644 sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md create mode 100644 sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md create mode 100644 sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md create mode 100644 sources/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md diff --git a/sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md b/sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md new file mode 100644 index 0000000000..4a602997ad --- /dev/null +++ b/sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md @@ -0,0 +1,57 @@ +Is Linux Better than OS X? GNU, Open Source and Apple in History +================================================================================ +> Tensions between the free software/open source community and Apple date back to the 1980s, Linux's founder called the core of Mac OS X "a piece of crap" and other anecdotes from software history. + +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/05/untitled_2.png) + +Open source fans have long had a rocky relationship with Microsoft. Everyone knows that. But, in many ways, the tension between Apple and supporters of free or open source software is even starker—even if it receives much less attention in the press. + +To be sure, not all open source advocates have an aversion to Apple. Anecdotally, I've seen plenty of Linux hackers sporting iPhones and iPads. In fact, some Linux users like Apple's OS X so much that they've [created a number of Linux distributions][1] designed to look just like it. (So has the [North Korean government][2], incidentally.) + +But relations between the Cult of Mac and the Cult of Tux—that is, the Linux community (not to mention the other, smaller segments of the free and open source software world)—have not always been completely peaceable. And that's by no means a new phenomenon, as I'm discovering as I research the history of Linux and the Free Software Foundation. + +### GNU vs. Apple ### + +The ill will dates to at least the late 1980s. By June 1988, [GNU][3], the project launched by Richard Stallman to build a completely free Unix-like operating system whose source code would be freely shared, was [strongly criticizing][4] Apple's lawsuit against [Hewlett-Packard][5] (HPQ) and [Microsoft][6] (MSFT) over what Apple claimed was improper copying of the "look and feel" of the Macintosh operating system. If Apple prevailed, GNU warned, the company "will use this new power over the public to put an end to free software that could substitute for commercial software." + +At the time, GNU fought against the lawsuit (which meant, ironically, that GNU was supporting Microsoft, though those were different times) by distributing "[Keep Your Lawyers Off My Computer" buttons][7]. It also urged GNU supporters to boycott Apple, warning that, even if Macintoshes seemed like good computers, Apple's success in the lawsuit could provide the company with a monopoly in the market that would greatly increase the price of computers. + +Apple eventually [lost the lawsuit][8], but not until 1994, after which GNU [dropped its Apple boycott][9]. In the interim, GNU remained critical of the company. In the early 1990s, even after it began promoting GNU software programs for use on other personal computing platforms, including MS-DOS PCs, [GNU affirmed][10] that, until Apple ceased pursuing a "monopoly" over computers with user interfaces similar to those of the Macintosh, "we will not provide any support for Apple machines." (It's therefore ironic that a fair amount of the software that made it into OS X, the Unix-like operating system that Apple introduced later in the 1990s, came from GNU. But that's another story.) + +### Torvalds on Jobs ### + +Despite his more laissez-faire attitude toward most issues, Linus Torvalds, the creator of the Linux kernel, was no less charitable in his attitudes toward Apple than Stallman and GNU had been. In his 2001 book "Just for Fun: The Story of an Accidental Revolutionary," Torvalds described meeting with Steve Jobs circa 1997, at the latter's invitation, to discuss Mac OS X, which Apple was then developing but had not yet released publicly. + +"Basically, Jobs started off by trying to tell me that on the desktop there were just two players, Microsoft and Apple, and that he thought that the best thing I could do for Linux was to get in bed with Apple and try to get the open source people behind Mac OS X," Torvalds wrote. + +This courting apparently turned Torvalds off quite a bit. One point of disagreement centered on Torvalds's technical disdain for Mach, the kernel on which Apple was then building its new OS X operating system, which Torvalds called "a piece of crap. It contains all the design mistakes you can make, and managed to even make up a few of its own." + +But more off-putting, apparently, was the way Jobs was approaching open source in developing OS X (which had many open source programs at its core): "He sort of played down the flaw in the setup: Who cares if the basic operating system, the real low-core stuff, is open source if you then have the Mac layer on top, which is not open source?" + +All in all, Torvalds concluded, Jobs "didn't use very many arguments. He just basically took it for granted that I would be interested" in collaborating with Apple. "He was clueless, unable to imagine that there could be entire segments of the human race who weren't the least bit concerned about increasing the Mac's market share. I think he was truly surprised at how little I cared about how big a market the Mac had—or how big a market Microsoft has." + +Torvalds doesn't speak for all Linux users, of course. And his views on OS X and Apple may have softened since 2001. But the fact that, in the early 2000s, the Linux community's leading figure exhibited so much disdain for Apple and the hubris of its chief says something significant about how deeply seated tensions between the Apple world and the open source/free software world are. + +Both of these historical tidbits offer insight into the great debate regarding the actual value of Apple's products—whether the company thrives on the quality of the hardware and software it creates, or merely benefits from exceptional marketing acumen that allows it to sell products for much more than their non-Apple functional equivalents are worth. But I'll stay out of that debate, for now. + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/051815/linux-better-os-x-gnu-open-source-and-apple- + +作者:[Christopher Tozzi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:https://www.linux.com/news/software/applications/773516-the-mac-ifying-of-the-linux-desktop/ +[2]:http://thevarguy.com/open-source-application-software-companies/010615/north-koreas-red-star-linux-os-made-apples-image +[3]:http://gnu.org/ +[4]:https://www.gnu.org/bulletins/bull5.html +[5]:http://www.hp.com/ +[6]:http://www.microsoft.com/ +[7]:http://www.duntemann.com/AppleSnakeButton.jpg +[8]:http://www.freibrun.com/articles/articl12.htm +[9]:https://www.gnu.org/bulletins/bull18.html#SEC6 +[10]:https://www.gnu.org/bulletins/bull12.html \ No newline at end of file diff --git a/sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md b/sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md new file mode 100644 index 0000000000..8ccc8c8c94 --- /dev/null +++ b/sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md @@ -0,0 +1,147 @@ +How to Use Docker Machine with a Cloud Provider +================================================================================ +Hi everyone, today we'll learn how we can use Docker Machine to deploy Docker host in various Cloud Provider Platforms. Docker Machine is an application that helps to create Docker hosts on our computer, on cloud providers and inside our own data center. It provides easy solution for creating servers, installing Docker on them and then configuring the Docker client according the users configuration and requirements. The driver APIs works for provisioning Docker on a local machine, on a virtual machine in the data center, or on a public cloud instance. Docker Machine is supported on Windows, OSX, and Linux and is available for installation as one standalone binary. It enables us to take full advantage of ecosystem partners providing Docker-ready infrastructure, while still accessing everything through the same interface. It makes people able to deploy the docker containers in the respective cloud platform pretty fast and in pretty easy way with just a single command. + +### 1. Installing Docker Machine ### + +Docker Machine supports awesome on every Linux Operating System. First of all, we'll need to download the latest version of Docker Machine from the Github site . Here, we'll use curl to download the latest version of Docker Machine ie 0.2.0 . + +For 64 Bit Operating System + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine + +For 32 Bit Operating System + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386 > /usr/local/bin/docker-machine + +After downloading the latest release of Docker Machine, we'll make the file named docker-machine under /usr/local/bin/ executable using the command below. + + # chmod +x /usr/local/bin/docker-machine + +After doing the above, we'll wanna ensure that we have successfully installed docker-machine. To check it, we can run the docker-machine -v which will give output of the version of docker-machine installed in our system. + + # docker-machine -v + +![Installing Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) + +To enable Docker commands on our machines, make sure to install the Docker client as well by running the command below. + + # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker + # chmod +x /usr/local/bin/docker + +### 2. Creating Machine ### + +After finish installing Docker Machine in our Linux box, we'll wanna deploy a docker host into the cloud server. Docker Machine includes drivers for several popular Cloud Platforms such as Digital Ocean, Amazon Web Services (AWS), Microsoft Azure, Google Cloud Computing and many other which enables us to create same interface of docker deployment in different platforms. So, here in this tutorial we'll gonna deploy the Docker Host into the Digital Ocean server using digitalocean driver API. Here, we'll need to run command docker-machine create followed by --driver flag as digitalocean with --digitalocean-access-token flag as the API Token provided by the [Digital Ocean Control Panel][1] and at last the name of the docker host we just created. To do so, we'll need to run the following command as. + + # docker-machine create --driver digitalocean --digitalocean-access-token linux-dev + + # eval "$(docker-machine env linux-dev)" + +![Docker Machine Digitalocean Cloud](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-digitalocean-cloud.png) + +**Note**: Here, linux-dev is the name of the machine we are wanting to create. is a security key which can be generated from the Digital Ocean Control Panel of the account holder of Digital Ocean Cloud Platform. To retrieve that key, we simply need to login to our Digital Ocean Control Panel then click on API, then click on Generate New Token and give it a name tick on both Read and Write. Then we'll get a long hex key, thats the now, simply replace it into the command above. + +After running the above command, we can see in our Digital Ocean Droplet Panel that a droplet has been created with default configuration. + +![DigitalOcean Droplet Panel](http://blog.linoxide.com/wp-content/uploads/2015/05/digitalocean-droplet-panel.png) + +For ease and convenience, docker-machine deploys the droplet with default configuration choosing setting such as images that the VPS is based on we can override the default configuration as our need. We can do that by simply adding the flags respective to our need and requirement of the Droplet. Here are some flags for digitalocean that we can add to override the default configuration of the Docker Machine. + + --digitalocean-image "ubuntu-14-04-x64" for Choosing Droplet Image + --digitalocean-ipv6 enable to enable IPv6 Networking + --digitalocean-private-networking enable to enable Private Networking + --digitalocean-region "nyc3" to choose Region to deploy the Droplet + --digitalocean-size "512mb" to select the RAM size and type of deployment. + +If you are wanting to use docker-machine with other cloud providers and need to override the default configuration, we can run following command to get the list of flags for every platforms supported by Docker Machine by default. + + # docker-machine create -h + +### 3. Selecting Active Host ### + +After deploying the droplet, we wanna run a docker container straight away but before that, we'll need to check whether the active host is the required machine or not. To see that, we can run the following command. + + # docker-machine ls + +![Docker Machine List](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-ls.png) + +The active host can be identified by "*" in the ACTIVE column. + +Now, if we need to switch the active host to the required machine, we can simply run the following command. + + # docker-machine active linux-dev + +**Note**: Here, linux-dev is the Machine name that we are wanting to make as ACTIVE and run Docker Container on top of it. + +### 4. Running a Docker Container ### + +Now, after selecting our active host, we'll wanna finally run a docker container out of the box. Now, to give it a test, we'll run a busybox container out of it by running docker run busybox command with echo hello world so that we can get the output of the container. + + # docker run busybox echo hello world + +Note: If you are trying to deploy a docker container using a 32 Bit Operating System running in the host, its good idea to use SSH to run the docker commands. So, you can simply skip this step and follow the SSH step. + +### 5. SSH with Docker Machine ### + +If we want to control over the machine or the droplet that we just deployed with Docker Machine, we can ssh into the server using docker-machine ssh as command. + + # docker-machine ssh + +![Docker Machine SSH](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-ssh.png) + +Now, after ssh into the machine, we can run any docker containers into it. Here we'll run an nginx server into it. + + # docker run -itd -p 80:80 nginx + +After finishing up with SSH, we need to run exit to exit from the droplet or server. + + # exit + +### 5. Removing Hosts ### + +In order to remove the active host and all its images, containers, we can use docker-machine rm command as shown below. + + # docker-machine rm linux-dev + +![Docker Machine Remove All](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-remove-machine.png) + +To check whether the host has been removed or not, we can run docker-machine ls command. + + # docker-machine ls + +![Docker Machine Remove Check](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-remove-check.png) + +### 6. Adding a host without a driver ### + +We can add a host to Docker which only has a URL and no driver. It can be used an alias for an existing host, so we don’t have to type out the URL every time we run a Docker command. + + $ docker-machine create --url=tcp://104.131.50.36:2376 custombox + +### 7. Managing the Hosts ### + +If you are finished working with the running docker, we can simply run **docker-machine stop** command to stop the whole hosts which are Active and if wanna start again, we can run **docker-machine start**. + + # docker-machine stop + # docker-machine start + +You can also specify a machine name to stop or start using the host name as an argument. + + $ docker-machine stop linux-dev + $ docker-machine start linux-dev + +### Conclusion ### + +Docker Machine is really and awesome tool for deploying servers with Docker Container running. In this article we demostrated with Digital Ocean Platform but there are other platforms also available like Amazon Web Service, Google Cloud Computing and more which is supported by Docker Machine and includes driver APIs of them. It has made easy for fast and secure deployment of Docker Containers into several different Platforms with Docker Machine. As Docker Machine is still under Beta, so it is recommended not to use docker-machine in production. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/use-docker-machine-cloud-provider/ + +作者:[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/ +[1]:https://cloud.digitalocean.com/settings/applications \ No newline at end of file diff --git a/sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md b/sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md new file mode 100644 index 0000000000..96dfbe2535 --- /dev/null +++ b/sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md @@ -0,0 +1,64 @@ +How to Use tmpfs on RHEL / CentOS 7.0 +================================================================================ +Today we will talk about tmpfs CentOS 7 a file system that will keep all files and folders in the virtual memory of the operating system as opposed to actually writing them to the disk. This means that all the content in tmpfs is temporary in the sense that it’s not permanently written to the disk and in case the tmpfs is unmounted, the system is rebooted or the power is cut all content will be lost. From a technical point of view tmpfs puts everything in the kernel internal cache and then grows or shrinks to accommodate the files it contains ans is able to swap unneeded pages out of swap space. + +By default CentOS uses tmpfs for various things as you can see from the output of the df –h command: + + # df –h + +![df](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs1.jpg) + +/dev - directory contains the special device files for all the devices. +/dev/shm – contains shared memory allocation +/run - used for system logs +/sys/fs/cgroup - used for cgroups, a kernel feature to limit, police and account the resource usage of certain processes + +One use of tmpfs is to obviously use it as a /tmp folder, you can do this in 2 ways: + +### Using systemctl to enable tmpfs in /tmp ### + +You can use the systemctl command to enable tmpfs in the /tmp folder, first use the following command to check if this feature is not already enabled: + + # systemctl is-enabled tmp.mount + +Will show the current status of settings you can use the following command to enable it: + + # systemctl enable tmp.mount + +![systemctl](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs3.jpg) + +This will have the system controlling the /tmp folder and mount a tmpfs in it. + +### Manually mounting a /tmp/fs ### + +You can also manually add a tmpfs in /tmp by adding the following line to /etc/fstab: + + tmpfs /tmp tmpfs size=512m 0 0 + +And then running the mount command like this: + + # mount –a + +![df](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs2.jpg) + +This should make the tmpfs show in df –h, also it will automatically mount it the next time you reboot. + +### Creating a tmpfs on the fly ### + +If for some reason you wish to create a tmpfs in a folder on the fly you can always use the following command: + + # mount -t tmpfs -o size=1G tmpfs /mnt/mytmpfs + +Of course you can specify any size you wish in the size option and any mount point you wish, just remember it must be a valid directory. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/file-system/use-tmpfs-rhel-centos-7-0/ + +作者:[Adrian Dinu][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/adriand/ \ No newline at end of file diff --git a/sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md b/sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md new file mode 100644 index 0000000000..04014c599e --- /dev/null +++ b/sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md @@ -0,0 +1,167 @@ +How to compile and install wxWidgets on Ubuntu/Debian/Linux Mint +================================================================================ +### wxWidgets ### + +wxWidgets is an application development framework/library that allows developer to make cross platform GUI applications for Windows, Mac and Linux using the same codebase. + +Its primarily written in C++ but has bindings for other languages as well like Python, Perl and Ruby. + +In this tutorial I am going to show you how to compile and build wxwidgets 3.0+ on Debian based linux systems like Ubuntu and Linux Mint. + +Compiling wxWidgets from source is not at all difficult as it might sound and takes only a few minutes to do. + +The library can be compiled in different modes like static library or dynamic library. + +### 1. Download wxWidgets ### + +The first step would be to download the wxWidgets source files from [wxwidgets.org][1] + +Once done, extract the files to a directory. + +### 2. Setup build environment ### + +To compile wxwidgets we would need some utility programs including the C++ compiler on Linux called g++. And all of it would be installed from the repositories using apt-get. + +We also need the GTK development libraries which wxWidgets depend on. + + $ sudo apt-get install libgtk-3-dev build-essential checkinstall + +> The utility called checkinstall would allow us to create an installation package for wxwidgets, so that later on it can un-installed easily using package managers + +### 3. Compile wxWidgets ### + +Get inside the directory where wxWidgets is extracted. In order to keep things clean, create a directory where the compilation would be done. + + $ mkdir gtk-build + $ cd gtk-build/ + +Now run the configure and make commands one by one. Each one would take some time to finish. + + $ ../configure --disable-shared --enable-unicode + $ make + +The "--disable-shared" option instructs wxwidgets to builds static libraries instead of shared/dynamic ones. + +After the make command finishes, the compilation is done successfully. Its time to install the wxWidgets files to the correct location. + +More information about compile options can be found in install.txt and readme.txt files that can be found in /docs/gtk/ inside the wxwidgets directory. + +### 4. Install with checkinstall ### + +Now instead of using the "make install" command, we shall use the checkinstall command to create a deb package for wxwidgets. Run the following command + + $ sudo checkinstall + +Checkinstall would ask few questions during the process and make sure to provide a version number when asked, otherwise it would fail. + +Once the process is over, wxWidgets would be installed and also a deb file would be created in the same directory. + +### 5. Track the installed files ### + +If you wish to check where the files are installed, use the dpkg command followed by the name of the package provided during the checkinstall process. + + $ dpkg -L package_name + /. + /usr + /usr/local + /usr/local/lib + /usr/local/lib/libwx_baseu-3.0.a + /usr/local/lib/libwx_gtk3u_propgrid-3.0.a + /usr/local/lib/libwx_gtk3u_html-3.0.a + /usr/local/lib/libwxscintilla-3.0.a + /usr/local/lib/libwx_gtk3u_ribbon-3.0.a + /usr/local/lib/libwx_gtk3u_stc-3.0.a + /usr/local/lib/libwx_gtk3u_qa-3.0.a + /usr/local/lib/libwx_baseu_net-3.0.a + /usr/local/lib/libwxtiff-3.0.a + +### 6. Compile the samples ### + +After compiling wxWidgets, its time to compile the sample programs to see it in action. In the same directory where we compiled wxwidgets, a new subdirectory called samples would have been created. + +Just enter it and run the make command + + $ compile samples + $ cd samples/ + $ make + +After the make process finishes, get inside each sample sub directory and there should be an executable file that can be run right away to see the demo. + +### 7. Compile your first program ### + +After you are done with the demo programs, its time to write your own program and compile it. Again it is quite easy. + +It is assumed that you are coding in C++ and for that you can use any good editor with syntax highlighting feature. For example gedit, kate, kwrite would do. Or you might want to try fully loaded IDEs like Geany, Codelite, Codeblocks etc. + +However for your first program just use an ordinary text editor get it done quick. + +Here it is + + #include + + class Simple : public wxFrame + { + public: + Simple(const wxString& title) + : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(250, 150)) + { + Centre(); + } + }; + + class MyApp : public wxApp + { + public: + bool OnInit() + { + Simple *simple = new Simple(wxT("Simple")); + simple->Show(true); + return true; + } + }; + + wxIMPLEMENT_APP(MyApp); + +Now save the program somewhere and compile it with the following commands + + # compile + $ g++ basic.cpp `wx-config --cxxflags --libs std` -o program + + # run + $ ./program + +#### Compiling with non standard libraries #### + +The wx-config command shown above provides only the standard libraries by default. If you are using the Aui classes for example, then you need to specify additional libraries for it + + $ g++ code.cpp `wx-config --cxxflags --libs std,aui` -o program + +More information can be found [here][2]. + +### Resources ### + +Download source and help files for wxWidgets +[https://www.wxwidgets.org/downloads/][3] + +wxWidgets wiki page on compile instructions +[https://wiki.wxwidgets.org/Compiling_and_getting_started][4] + +Notes on how to use the latest wxWidgets version (3.0+) +[https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets][5] + +-------------------------------------------------------------------------------- + +via: http://www.binarytides.com/install-wxwidgets-ubuntu/ + +作者:[Silver Moon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117145272367995638274/posts +[1]:https://www.wxwidgets.org/downloads/ +[2]:https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets#The_wx-config_script +[3]:https://www.wxwidgets.org/downloads/ +[4]:https://wiki.wxwidgets.org/Compiling_and_getting_started +[5]:https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets \ No newline at end of file diff --git a/sources/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md b/sources/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md new file mode 100644 index 0000000000..b6a2ffaf4f --- /dev/null +++ b/sources/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md @@ -0,0 +1,170 @@ +Shell Script to Backup Files / Directories Using rsync +================================================================================ +This article we bring shell scripts to backup your files / directories from you local linux machine to a remote linux server using rsync command. This would be an interactive way to perform backup , where you need to provide remote backup server hostname / ip address and folder location. We keep a separate file where you need to provide files / directories that need backup. We have added two scripts where **first script** ask password after each file had been copied (if you have enabled ssh authentication keys , then password will be not be asked) and in second script password will be prompted only once. + +We are going to backup bckup.txt, dataconfig.txt, docs and oracledb. + + [root@Fedora21 tmp]# ls -l + total 12 + -rw-r--r--. 1 root root 0 May 15 10:43 bckrsync.sh + -rw-r--r--. 1 root root 0 May 15 10:44 bckup.txt + -rw-r--r--. 1 root root 0 May 15 10:46 dataconfig.txt + drwxr-xr-x. 2 root root 4096 May 15 10:45 docs + drwxr-xr-x. 2 root root 4096 May 15 10:44 oracledb + +This file contains backup files / dir details + + [root@Fedora21 tmp]# cat /tmp/bckup.txt + /tmp/oracledb + /tmp/dataconfig.txt + /tmp/docs + [root@Fedora21 tmp]# + +### Script 1 : ### + + #!/bin/bash + + #We will save path to backup file in variable + backupf='/tmp/bckup.txt' + + #Next line just prints message + echo "Shell Script Backup Your Files / Directories Using rsync" + + #next line check if entered value is not null, and if null it will reask user to enter Destination Server + while [ x$desthost = "x" ]; do + + #next line prints what userd should enter, and stores entered value to variable with name desthost + read -p "Destination backup Server : " desthost + + #next line finishes while loop + done + + #next line check if entered value is not null, and if null it will reask user to enter Destination Path + while [ x$destpath = "x" ]; do + + #next line prints what userd should enter, and stores entered value to variable with name destpath + read -p "Destination Folder : " destpath + + #next line finishes while loop + done + + #Next line will start reading backup file line by line + for line in `cat $backupf` + + #and on each line will execute next + do + + #print message that file/dir will be copied + echo "Copying $line ... " + #copy via rsync file/dir to destination + + rsync -ar "$line" "$desthost":"$destpath" + + #this line just print done + echo "DONE" + + #end of reading backup file + done + +#### Running the script with output #### + + [root@Fedora21 tmp]# ./bckrsync.sh + Shell Script Backup Your Files / Directories Using rsync + Destination backup Server : 104.*.*.41 + Destination Folder : /tmp + Copying /tmp/oracledb ... + The authenticity of host '104.*.*.41 (104.*.*.41)' can't be established. + ECDSA key fingerprint is 96:11:61:17:7f:fa:...... + Are you sure you want to continue connecting (yes/no)? yes + Warning: Permanently added '104.*.*.41' (ECDSA) to the list of known hosts. + root@104.*.*.41's password: + DONE + Copying /tmp/dataconfig.txt ... + root@104.*.*.41's password: + DONE + Copying /tmp/docs ... + root@104.*.*.41's password: + DONE + [root@Fedora21 tmp]# + +### Script 2 : ### + + #!/bin/bash + + #We will save path to backup file in variable + backupf='/tmp/bckup.txt' + + #Next line just prints message + echo "Shell Script Backup Your Files / Directories Using rsync" + + #next line check if entered value is not null, and if null it will reask user to enter Destination Server + while [ x$desthost = "x" ]; do + + #next line prints what userd should enter, and stores entered value to variable with name desthost + read -p "Destination backup Server : " desthost + + #next line finishes while loop + done + + #next line check if entered value is not null, and if null it will reask user to enter Destination Path + while [ x$destpath = "x" ]; do + + #next line prints what userd should enter, and stores entered value to variable with name destpath + read -p "Destination Folder : " destpath + + #next line finishes while loop + done + + #next line check if entered value is not null, and if null it will reask user to enter password + while [ x$password = "x" ]; do + #next line prints what userd should enter, and stores entered value to variable with name password. #To hide password we are using -s key + read -sp "Password : " password + #next line finishes while loop + done + + #Next line will start reading backup file line by line + for line in `cat $backupf` + + #and on each line will execute next + do + + #print message that file/dir will be copied + echo "Copying $line ... " + #we will use expect tool to enter password inside script + /usr/bin/expect << EOD + #next line set timeout to -1, recommended to use + set timeout -1 + #copy via rsync file/dir to destination, using part of expect — spawn command + + spawn rsync -ar ${line} ${desthost}:${destpath} + #as result of previous command we expect “password” promtp + expect "*?assword:*" + #next command enters password from script + send "${password}\r" + #next command tells that we expect end of file (everything finished on remote server) + expect eof + #end of expect pard + EOD + #this line just print done + echo "DONE" + + #end of reading backup file + done + +#### Screenshot running the second script with output #### + +![rsync script](http://blog.linoxide.com/wp-content/uploads/2015/05/bckuprsync-script.png) + +Hope these scripts help you to take backup !! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-shell-script/shell-script-backup-files-directories-rsync/ + +作者:[Yevhen Duma][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/yevhend/ \ No newline at end of file From cb93ad626c25aa88c53a326e1471eb5ec2d7e2f8 Mon Sep 17 00:00:00 2001 From: wwy Date: Thu, 21 May 2015 08:24:52 +0800 Subject: [PATCH 0903/2517] [Translating] How to share a directory with Samba on Fedora or CentOS --- ...How to share a directory with Samba on Fedora or CentOS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md b/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md index 0c01862bff..1013b58759 100644 --- a/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md +++ b/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md @@ -1,3 +1,5 @@ +translating by wwy-hust + How to share a directory with Samba on Fedora or CentOS ================================================================================ Nowadays sharing data across different computers is not something new at home or many work places. Riding on this trend, modern operating systems make it easy to share and exchange data transparently across computers via network file systems. If your work environment involves a mix of Microsoft Windows and Linux computers, one way to share files and folders among them is via SMB/CIFS, a cross-platform network file sharing protocol. Windows Microsoft natively supports SMB/CIFS, while Linux offers free software implementation of SMB/CIFS network protocol in Samba. @@ -141,4 +143,4 @@ via: http://xmodulo.com/share-directory-samba-fedora-centos.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://xmodulo.com/author/kristophorus \ No newline at end of file +[a]:http://xmodulo.com/author/kristophorus From e48a39d33ce2695ee755bae7d435fbc76c8d2416 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 21 May 2015 08:57:32 +0800 Subject: [PATCH 0904/2517] [Translated]20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md --- ... the Apache error log location on Linux.md | 82 ------------------- ... the Apache error log location on Linux.md | 81 ++++++++++++++++++ 2 files changed, 81 insertions(+), 82 deletions(-) delete mode 100644 sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md create mode 100644 translated/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md diff --git a/sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md b/sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md deleted file mode 100644 index b25c7fe3c8..0000000000 --- a/sources/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md +++ /dev/null @@ -1,82 +0,0 @@ -Translating by GOLinux! -Linux FAQs with Answers--What is the Apache error log location on Linux -================================================================================ -> **Question**: I am trying to troubleshoot Apache web server errors on my Linux system. Where is the Apache error log file located on [insert your Linux distro]? - -Error log and access log files are a useful piece of information for system admins, for example to troubleshoot their web server, [protect][1] it from various malicious activities, or just to run [various][2] [analytics][3] for HTTP server monitoring. Depending on your web server setup, its error/access logs may be found in different places on your system. - -This post may help you **find Apache error log location on Linux**. - -![](https://farm8.staticflickr.com/7664/16958522954_4852ab5ea5_c.jpg) - -### Apache Error Log Location on Debian, Ubuntu or Linux Mint ### - -#### Default Error Log #### - -On Debian-based Linux, the system-wide default location of Apache error log is **/var/log/apache2/error.log**. The default location can be customized by editing Apache configuration file. - -#### Custom Error Log #### - -To find a custom error log location, open /etc/apache2/apache2.conf with a text editor, and look for a line that starts with ErrorLog. This line specifies a custom location of Apache error log file. For example, the unmodified Apache configuration file has the following line: - - ErrorLog ${APACHE_LOG_DIR}/error.log - -In this case, the location is configured using APACHE_LOG_DIR environment variable, which is defined in /etc/apache2/envvars. - - export APACHE_LOG_DIR=/var/log/apache2$SUFFIX - -In reality, ErrorLog may point to any arbitrary path on your Linux system. - -#### Custom Error Log with VirtualHost #### - -If VirtualHost is used in Apache web server, ErrorLog directive can be specified within VirtualHost container, in which case the system-wide error log location described above will be ignored. - -With VirtualHost enabled, each VirtualHost can define its own custom error log location. To find out the error log location of a particular VirtualHost, you can open /etc/apache2/sites-enabled/.conf, and look for ErrorLog directive, which will show a site-specific error log file. - -### Apache Error Log Location on CentOS, Fedora or RHEL ### - -#### Default Error Log #### - -On Red Hat based Linux, a system-wide Apache error log file is by default placed in **/var/log/httpd/error_log**. This default location can be customized by editing Apache configuration file. - -#### Custom Error Log #### - -To find out the custom location of Apache error log, open /etc/httpd/conf/httpd.conf with a text editor, and look for ServerRoot, which shows the top of the Apache server directory tree, under which log files and configurations are located. For example: - - ServerRoot "/etc/httpd" - -Now look for a line that starts with ErrorLog, which indicates where Apache web server is writing its error logs. Note that the specified location is relative to the ServerRoot value. For example: - - ErrorLog "log/error_log" - -Combine the above two directives to obtain the full path of an error log, which is by default /etc/httpd/logs/error_log. This is a symlink to /var/log/httpd/error_log with freshly installed Apache. - -In reality, ErrorLog may point to any arbitrary location on your Linux system. - -#### Custom Error Log with VirtualHost #### - -If you enabled VirtualHost, you can find the error log location of individual VirtualHosts by checking /etc/httpd/conf/httpd.conf (or any file where VirtualHost is defined). Look for ErrorLog inside individual VirtualHost sections. For example, in the following VirtualHost section, an error log is found in /var/www/xmodulo.com/logs/error_log. - - - ServerAdmin webmaster@xmodulo.com - DocumentRoot /var/www/xmodulo.com/public_html - ServerName www.xmodulo.com - ServerAlias xmodulo.com - ErrorLog /var/www/xmodulo.com/logs/error_log - CustomLog /var/www/xmodulo.com/logs/access_log - - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/apache-error-log-location-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://ask.xmodulo.com/author/nanni -[1]:http://xmodulo.com/configure-fail2ban-apache-http-server.html -[2]:http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html -[3]:http://xmodulo.com/sql-queries-apache-log-files-linux.html diff --git a/translated/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md b/translated/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md new file mode 100644 index 0000000000..c43ac481e7 --- /dev/null +++ b/translated/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md @@ -0,0 +1,81 @@ +Linux有问必答——Linux上Apache错误日志的位置在哪里? +================================================================================ +> **问题**: 我尝试着解决我 Linux 系统上的 Apache 网络服务器的错误,Apache的错误日志文件放在[你的 Linux 版本]的哪个位置呢? + +错误日志和访问日志文件为系统管理员提供了有用的信息,比如,为网络服务器排障,[保护][1]系统不受各种各样的恶意活动侵犯,或者只是进行[各种各样的][2][分析][3]以监控 HTTP 服务器。根据你网络服务器配置的不同,其错误/访问日志可能放在你系统中不同位置。 + +本文可以帮助你**找到Linux上的Apache错误日志**。 + +![](https://farm8.staticflickr.com/7664/16958522954_4852ab5ea5_c.jpg) + +### Debian,Ubuntu或Linux Mint上的Apache错误日志位置 ### + +#### 默认的错误日志 #### + +在基于Debian的Linux上,系统范围的Apache错误日志默认位置是**/var/log/apache2/error.log**。默认位置可以通过编辑Apache的配置文件进行修改。 + +#### 自定义的错误日志 #### + +要找到自定义的错误日志位置,请用文本编辑器打开 /etc/apache2/apache2.conf,然后查找以 ErrorLog 开头的行,该行指定了自定义的 Apache 错误日志文件的位置。例如,在未经修改的 Apache 配置文件中可以找到以下行: + + ErrorLog ${APACHE_LOG_DIR}/error.log + +在本例中,该位置使用 APACHE_LOG_DIR 环境变量进行配置,该变量在 /etc/apache2/envvars 中已被定义。 + + export APACHE_LOG_DIR=/var/log/apache2$SUFFIX + +在实际情况中, ErrorLog 可能会指向你 Linux 系统中任意路径。 + +#### 使用虚拟主机自定义的错误日志 #### + +如果在 Apache 网络服务器中使用了虚拟主机, ErrorLog 指令可能会在虚拟主机容器内指定,在这种情况下,上面所说的系统范围的错误日志位置将被忽略。 + +启用了虚拟主机后,各个虚拟主机可以定义其自身的自定义错误日志位置。要找出某个特定虚拟主机的错误日志位置,你可以打开 /etc/apache2/sites-enabled/.conf,然后查找 ErrorLog 指令,该指令会显示站点指定的错误日志文件。 + +### CentOS,Fedora或RHEL上的Apache错误日志位置 ### + +#### 默认的错误日志 #### + +在基于 Red Hat 的Linux中,系统范围的 Apache 错误日志文件默认被放置在**/var/log/httpd/error_log**。该默认位置可以通过修改 Apache 配置文件进行自定义。 + +#### 自定义的错误日志 #### + +要找出 Apache 错误日志的自定义位置,请用文本编辑器打开 /etc/httpd/conf/httpd.conf,然后查找 ServerRoot,该参数显示了 Apache 服务器目录树的顶层,日志文件和配置都位于该目录树中。例如: + + ServerRoot "/etc/httpd" + +现在,查找 ErrorLog 开头的行,该行指出了 Apache 网络服务器将错误日志写到了哪里去。注意,指定的位置是 ServerRoot 值的相对位置。例如: + + ErrorLog "log/error_log" + +结合上面的两个指令,可以获得完整的错误日志路径,默认情况下该路径就是 /etc/httpd/logs/error_log。在全新安装的Apache中,这是一个到 /var/log/httpd/error_log 的符号链接。 + +在实际情况中, ErrorLog 可能指向你 Linux 系统中的任意位置。 + +#### 使用虚拟主机自定义的错误日志 #### + +如果你启用了虚拟主机,你可以通过检查 /etc/httpd/conf/httpd.conf(或其它任何定义了虚拟主机的文件)来找到各个虚拟主机的错误日志位置。在独立的虚拟主机部分查找 ErrorLog。如,在下面的虚拟主机部分,错误日志的位置是 /var/www/xmodulo.com/logs/error_log。 + + + ServerAdmin webmaster@xmodulo.com + DocumentRoot /var/www/xmodulo.com/public_html + ServerName www.xmodulo.com + ServerAlias xmodulo.com + ErrorLog /var/www/xmodulo.com/logs/error_log + CustomLog /var/www/xmodulo.com/logs/access_log + + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/apache-error-log-location-linux.html + +作者:[Dan Nanni][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/configure-fail2ban-apache-http-server.html +[2]:http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html +[3]:http://xmodulo.com/sql-queries-apache-log-files-linux.html From 25fabfe33ad1e12f02f85b59164120610fff549a Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 21 May 2015 09:00:53 +0800 Subject: [PATCH 0905/2517] Update 20150520 Shell Script to Backup Files or Directories Using rsync.md --- ... Shell Script to Backup Files or Directories Using rsync.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md b/sources/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md index b6a2ffaf4f..1d3a89b84a 100644 --- a/sources/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md +++ b/sources/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Shell Script to Backup Files / Directories Using rsync ================================================================================ This article we bring shell scripts to backup your files / directories from you local linux machine to a remote linux server using rsync command. This would be an interactive way to perform backup , where you need to provide remote backup server hostname / ip address and folder location. We keep a separate file where you need to provide files / directories that need backup. We have added two scripts where **first script** ask password after each file had been copied (if you have enabled ssh authentication keys , then password will be not be asked) and in second script password will be prompted only once. @@ -167,4 +168,4 @@ via: http://linoxide.com/linux-shell-script/shell-script-backup-files-directorie 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/yevhend/ \ No newline at end of file +[a]:http://linoxide.com/author/yevhend/ From a948701eabc587a91259798f2c351b66b3c39b29 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 21 May 2015 10:01:42 +0800 Subject: [PATCH 0906/2517] translating --- .../tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md b/sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md index 96dfbe2535..e2d4941e0b 100644 --- a/sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md +++ b/sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md @@ -1,3 +1,5 @@ +translating----geekpi + How to Use tmpfs on RHEL / CentOS 7.0 ================================================================================ Today we will talk about tmpfs CentOS 7 a file system that will keep all files and folders in the virtual memory of the operating system as opposed to actually writing them to the disk. This means that all the content in tmpfs is temporary in the sense that it’s not permanently written to the disk and in case the tmpfs is unmounted, the system is rebooted or the power is cut all content will be lost. From a technical point of view tmpfs puts everything in the kernel internal cache and then grows or shrinks to accommodate the files it contains ans is able to swap unneeded pages out of swap space. @@ -61,4 +63,4 @@ via: http://linoxide.com/file-system/use-tmpfs-rhel-centos-7-0/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/adriand/ \ No newline at end of file +[a]:http://linoxide.com/author/adriand/ From 18d2d64317b22c99c1bd42bbbaa5e06ab9eddc61 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 21 May 2015 10:02:23 +0800 Subject: [PATCH 0907/2517] translating --- ...and install wxWidgets on Ubuntu or Debian or Linux Mint.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md b/sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md index 04014c599e..6719acdbc4 100644 --- a/sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md +++ b/sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md @@ -1,3 +1,5 @@ +translating---geekpi + How to compile and install wxWidgets on Ubuntu/Debian/Linux Mint ================================================================================ ### wxWidgets ### @@ -164,4 +166,4 @@ via: http://www.binarytides.com/install-wxwidgets-ubuntu/ [2]:https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets#The_wx-config_script [3]:https://www.wxwidgets.org/downloads/ [4]:https://wiki.wxwidgets.org/Compiling_and_getting_started -[5]:https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets \ No newline at end of file +[5]:https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets From 71178217f449fcd1d6128265e37278a817148d07 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 21 May 2015 10:16:17 +0800 Subject: [PATCH 0908/2517] [Translated]20150520 Shell Script to Backup Files or Directories Using rsync.md --- ...Backup Files or Directories Using rsync.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) rename {sources => translated}/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md (83%) diff --git a/sources/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md b/translated/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md similarity index 83% rename from sources/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md rename to translated/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md index 1d3a89b84a..639e58ede9 100644 --- a/sources/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md +++ b/translated/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md @@ -1,9 +1,8 @@ -Translating by GOLinux! -Shell Script to Backup Files / Directories Using rsync +Shell脚本:使用rsync备份文件/目录 ================================================================================ -This article we bring shell scripts to backup your files / directories from you local linux machine to a remote linux server using rsync command. This would be an interactive way to perform backup , where you need to provide remote backup server hostname / ip address and folder location. We keep a separate file where you need to provide files / directories that need backup. We have added two scripts where **first script** ask password after each file had been copied (if you have enabled ssh authentication keys , then password will be not be asked) and in second script password will be prompted only once. +本文,我们带来了shell脚本,用来使用rsync命令将你本地Linux机器上的文件/目录备份到远程Linux服务器上。使用该脚本实施备份会是一个交互的方式,你需要提供远程备份服务器的主机名/ip地址和文件夹位置。我们保留了一个独立文件,在这个文件中你需要提供需要备份的文件/目录。我们添加了两个脚本,**第一个脚本**在每次拷贝完一个文件后询问密码(如果你启用了ssh验证密钥,那么就不会询问密码),而第二个脚本中,则只会提示一次输入密码。 -We are going to backup bckup.txt, dataconfig.txt, docs and oracledb. +我们打算备份bckup.txt,dataconfig.txt,docs和orcledb。 [root@Fedora21 tmp]# ls -l total 12 @@ -13,7 +12,7 @@ We are going to backup bckup.txt, dataconfig.txt, docs and oracledb. drwxr-xr-x. 2 root root 4096 May 15 10:45 docs drwxr-xr-x. 2 root root 4096 May 15 10:44 oracledb -This file contains backup files / dir details +该文件包含了备份文件/目录的详情 [root@Fedora21 tmp]# cat /tmp/bckup.txt /tmp/oracledb @@ -21,7 +20,7 @@ This file contains backup files / dir details /tmp/docs [root@Fedora21 tmp]# -### Script 1 : ### +### 脚本 1: ### #!/bin/bash @@ -67,7 +66,7 @@ This file contains backup files / dir details #end of reading backup file done -#### Running the script with output #### +#### 运行带有输出结果的脚本 #### [root@Fedora21 tmp]# ./bckrsync.sh Shell Script Backup Your Files / Directories Using rsync @@ -88,7 +87,7 @@ This file contains backup files / dir details DONE [root@Fedora21 tmp]# -### Script 2 : ### +### 脚本 2: ### #!/bin/bash @@ -152,18 +151,18 @@ This file contains backup files / dir details #end of reading backup file done -#### Screenshot running the second script with output #### +#### 运行第二个带有输出结果的脚本的屏幕截图 #### ![rsync script](http://blog.linoxide.com/wp-content/uploads/2015/05/bckuprsync-script.png) -Hope these scripts help you to take backup !! +希望这些脚本对你备份会有帮助!! -------------------------------------------------------------------------------- via: http://linoxide.com/linux-shell-script/shell-script-backup-files-directories-rsync/ 作者:[Yevhen Duma][a] -译者:[译者ID](https://github.com/译者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 783a57c2e62c50524e93e75a1738200e7289ebe8 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 21 May 2015 11:43:34 +0800 Subject: [PATCH 0909/2517] =?UTF-8?q?20150521-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...es The Windows Communication Foundation.md | 26 +++++++ ...u Linux Hit 200 Million Users This Year.md | 38 ++++++++++ ...from the command line on Ubuntu desktop.md | 71 +++++++++++++++++++ ...tall Unity Tweak Tool on Ubuntu desktop.md | 42 +++++++++++ 4 files changed, 177 insertions(+) create mode 100644 sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md create mode 100644 sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md create mode 100644 sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md create mode 100644 sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md diff --git a/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md b/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md new file mode 100644 index 0000000000..37c5f189d2 --- /dev/null +++ b/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md @@ -0,0 +1,26 @@ +Microsoft Open-Sources The Windows Communication Foundation +================================================================================ +Microsoft has today announced they've open-sourced the important WCF (Windows Communication Foundation) code that now targets .NET Core. + +As described by [MSDN][1], "Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application. An endpoint can be a client of a service that requests data from a service endpoint. The messages can be as simple as a single character or word sent as XML, or as complex as a stream of binary data." + +The [code on GitHub][2], "contains a subset of the full Windows Communication Foundation product available on the Windows desktop, and it supports the library profiles already available for building WCF apps for the Windows Store. These profiles are primarily client-based, making them suited for mobile devices or on mid-tier servers to communicate with existing WCF services." + +More details on Microsoft opening up the Windows Communication Foundation can be found via the announcement posted this morning to the [dotNETFoundation.org blog][3]. + +Windows Communication Foundation sounds a bit like D-Bus on Linux for inter-process communication between programs/services. + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=news_item&px=Microsoft-Open-Source-WCF + +作者:[Michael Larabel][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.michaellarabel.com/ +[1]:https://msdn.microsoft.com/en-us/library/ms731082%28v=vs.110%29.aspx +[2]:https://github.com/dotnet/wcf +[3]:http://www.dotnetfoundation.org/blog/wcf-is-open-source \ No newline at end of file diff --git a/sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md b/sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md new file mode 100644 index 0000000000..2b0318375b --- /dev/null +++ b/sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md @@ -0,0 +1,38 @@ +Will Ubuntu Linux Hit 200 Million Users This Year? +================================================================================ +It's been four years and two weeks since Mark Shuttleworth expressed his goal of "200 million users of Ubuntu in 4 years." While Ubuntu's presence has continued to increase over the past four years, it doesn't look like that goal has been realized yet or will be by the end of the calendar year. + +It was back at [UDS Budapest][1] in May of 2011 when Shuttleworth expressed a goal of 200 million Ubuntu users in four years. + +![](http://www.phoronix.net/image.php?id=uds_budapest&image=budapest_phoronix_03_show&w=1920) + +Last I heard there was "tens of millions" of Ubuntu Linux users, but haven't seen any reliable reports anywhere of the Ubuntu user-base being close to 200 million. The latest monthly statistics from Valve show [the Linux gaming population being below 1%][2] compared to Windows and OS X. Most usage statistics based on web metrics and other data tend to put the total Linux user-base at just a few percent. + +Aside from desktop installations, Ubuntu at least has made substantial inroads with cloud and server deployments over the past four years and have proven to be a contender with Red Hat Enterprise Linux on such fronts. Ubuntu has also proven itself quite well on ARM hardware. When Mark was coming up with his goal in four years, he was probably thinking that Ubuntu Phone/Touch would be much further along than where it is now: just having one device available in the EU and [a second currently in China][3] and [the Ubuntu Touch software stack still maturing][4] with [major work on key apps still needed][5], etc. + +![](http://www.phoronix.net/image.php?id=0x2015&image=shuttleworth_200_million_show&w=1920) + +It's also been three years since the Canonical claim of [Ubuntu would soon ship on 5% of PCs][6]. The 5% claim was for worldwide PC shipments, but even three years later, I have a hard time believing that... At least in the US and Europe I still very rarely see Ubuntu preloads on systems within brick and mortar stores while the major Internet retailers / OEMs still tend to offer Linux on a few select PC models, sans Chrome OS / Android devices. + +Another lofty, unrelated goal that went unreached by the open-source community was [GNOME owning 10% of the global desktop market by 2010][7]. Five years later, there's no indication they're even close to reaching that 10x10 milestone. + +How large do you think the Ubuntu user-base is today? How large do you think the Ubuntu (or Linux) user-base will grow in the years to come? Share with us your thoughts by commenting on this article. + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=news_item&px=2015-200-Million-Goal-Retro + +作者:[Michael Larabel][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.michaellarabel.com/ +[1]:http://www.phoronix.com/vr.php?view=16002 +[2]:http://www.phoronix.com/scan.php?page=news_item&px=Steam-April-2015-1-Drop +[3]:http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-MX4-In-China +[4]:http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-Calculator-Reboot +[5]:http://www.phoronix.com/scan.php?page=news_item&px=MTgzOTM +[6]:http://www.phoronix.com/scan.php?page=news_item&px=MTA5ODM +[7]:https://www.phoronix.com/scan.php?page=news_item&px=Nzg1Mw \ No newline at end of file diff --git a/sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md b/sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md new file mode 100644 index 0000000000..346f9cb438 --- /dev/null +++ b/sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md @@ -0,0 +1,71 @@ +Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop +================================================================================ +> **Question**: I often need to change system proxy settings on Ubuntu desktop, but I do not want to go through a chain of GUI menus: "System Settings" -> "Network" -> "Network proxy", which is cumbersome. Is there a more convenient way to change desktop's proxy settings from the command line? + +In Ubuntu desktop, its desktop environment settings, including system proxy settings, are stored in DConf database, which is a simple key/value store. If you modify any desktop properties using System Settings menu, the changes are persisted in the DConf database backend. There are GUI-based or non-GUI-based ways to modify DConf database on Ubuntu. While System Settings or dconf-editor are graphical methods for accessing DConf database, gsettings or dconf are command-line tools that can modify the database. + +Here is how to change system proxy settings from the command line using gsettings. + +![](https://farm6.staticflickr.com/5460/17872782271_68e5267a4a_c.jpg) + +The basic usage of gsettings for reading and writing a particular Dconf setting is as follows. + +To modify a DConf setting: + + $ gsettings set + +To read a DConf setting: + + $ gsettings get + +### Change System Proxy Setting to Manual from the Command Line ### + +The following commands will change HTTP proxy setting to "my.proxy.com:8000" on Ubuntu desktop. + + $ gsettings set org.gnome.system.proxy.http host 'my.proxy.com' + $ gsettings set org.gnome.system.proxy.http port 8000 + $ gsettings set org.gnome.system.proxy mode 'manual' + +If you want to change HTTPS/FTP proxy to manual as well, use these commands: + + $ gsettings set org.gnome.system.proxy.https host 'my.proxy.com' + $ gsettings set org.gnome.system.proxy.https port 8000 + $ gsettings set org.gnome.system.proxy.ftp host 'my.proxy.com' + $ gsettings set org.gnome.system.proxy.ftp port 8000 + +To change Socks host settings to manual: + + $ gsettings set org.gnome.system.proxy.socks host 'my.proxy.com' + $ gsettings set org.gnome.system.proxy.socks port 8000 + +All these changes above are limited to the current Desktop user only. If you want to apply the proxy setting changes system-wide, prepend sudo to gsettings command. For example: + + $ sudo gsettings set org.gnome.system.proxy.http host 'my.proxy.com' + $ sudo gsettings set org.gnome.system.proxy.http port 8000 + $ sudo gsettings set org.gnome.system.proxy mode 'manual' + +### Change System Proxy Setting to Automatic from the Command Line ### + +If you are using [proxy auto configuration][1] (PAC), type the following commands to switch to PAC. + + $ gsettings set org.gnome.system.proxy mode 'auto' + $ gsettings set org.gnome.system.proxy autoconfig-url http://my.proxy.com/autoproxy.pac + +### Clear System Proxy Setting from the Command Line ### + +Finally, to remove manual/automatic proxy setting, and revert to no-proxy setting: + + $ gsettings set org.gnome.system.proxy mode 'none' + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/change-system-proxy-settings-command-line-ubuntu-desktop.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://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-set-up-proxy-auto-config-on-ubuntu-desktop.html \ No newline at end of file diff --git a/sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md b/sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md new file mode 100644 index 0000000000..8237527afd --- /dev/null +++ b/sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md @@ -0,0 +1,42 @@ +Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop +================================================================================ +> **Question**: I am trying to customize fresh Ubuntu desktop that I just installed. For that, I want to use Unity Tweak Tool. How can I install Unity Tweak Tool on Ubuntu? + +[Unity Tweak Tool][1] is a popular Unity desktop customization tool. As the name implies, this tool is applicable to Ubuntu's default desktop environment only (i.e., Unity-based GNOME desktop). This versatile tool allows you to customize a wide variety of Unity desktop features and configurations via extremely intuitive and easy-to-use GUI. Its menu looks similar to Ubuntu's official System Settings, but its desktop customization capabilities far exceed those of the default System Settings. Using Unity Tweak Tool, you can customize appearance, behaviors and configurations for a plethora of desktop components, such as workspace, windows, icons, themes, cursors, fonts, scrolling, hot corners, etc. If you are a Unity desktop user, Unity Tweak Tool is definitely a must-have app. + +![](https://farm6.staticflickr.com/5463/17684020389_25dc7f0db2_b.jpg) + +While Unity Tweak Tool is an essential tool for Ubuntu desktop, it does not come pre-installed on stock Ubuntu desktop. For those of you to customize Unity desktop, here is how to install Unity Tweak Tool on Ubuntu desktop. + +### Install Unity Tweak Tool on Ubuntu 13.04 and higher ### + +Starting with Ubuntu 13.04, Unity Tweak Tool is available in the Ubuntu's base repositories. So its installation is as straightforward as: + + $ sudo apt-get install unity-tweak-tool + +To launch Unity Tweak Tool: + + $ unity-tweak-tool + +If you want to try the latest version of Unity Tweak Tool, you can install it from its daily PPA (as describe below). + +### Install Unity Tweak Tool on Ubuntu 12.10 ### + +Note that Unity Tweak Tool works on Ubuntu 12.10 and higher. If you want to install it on Ubuntu 12.10, you can use its PPA repository as follows. This PPA repository is also useful when you want to test the latest developments of the tool. + + $ sudo add-apt-repository ppa:freyja-dev/unity-tweak-tool-daily + $ sudo apt-get update + $ sudo apt-get install unity-tweak-tool + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-unity-tweak-tool-ubuntu-desktop.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://ask.xmodulo.com/author/nanni +[1]:https://launchpad.net/unity-tweak-tool \ No newline at end of file From ba9c32a2239c061c29455b0c525b40238a1809ef Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 21 May 2015 12:05:25 +0800 Subject: [PATCH 0910/2517] [Translating] 20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktoptech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop tech/ --- ...tem proxy settings from the command line on Ubuntu desktop.md | 1 + ...Answers--How to install Unity Tweak Tool on Ubuntu desktop.md | 1 + 2 files changed, 2 insertions(+) diff --git a/sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md b/sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md index 346f9cb438..0c58a8416b 100644 --- a/sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md +++ b/sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md @@ -1,3 +1,4 @@ +Translating by ictlyh Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop ================================================================================ > **Question**: I often need to change system proxy settings on Ubuntu desktop, but I do not want to go through a chain of GUI menus: "System Settings" -> "Network" -> "Network proxy", which is cumbersome. Is there a more convenient way to change desktop's proxy settings from the command line? diff --git a/sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md b/sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md index 8237527afd..6dd2efa820 100644 --- a/sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md +++ b/sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md @@ -1,3 +1,4 @@ +Translating by ictlyh Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop ================================================================================ > **Question**: I am trying to customize fresh Ubuntu desktop that I just installed. For that, I want to use Unity Tweak Tool. How can I install Unity Tweak Tool on Ubuntu? From 213db38fc7d760bfff27396d93b7febebffdce0e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 21 May 2015 12:41:47 +0800 Subject: [PATCH 0911/2517] [Translated] tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop --- ...from the command line on Ubuntu desktop.md | 72 ------------------- ...tall Unity Tweak Tool on Ubuntu desktop.md | 43 ----------- ...from the command line on Ubuntu desktop.md | 71 ++++++++++++++++++ ...tall Unity Tweak Tool on Ubuntu desktop.md | 42 +++++++++++ 4 files changed, 113 insertions(+), 115 deletions(-) delete mode 100644 sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md delete mode 100644 sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md create mode 100644 translated/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md create mode 100644 translated/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md diff --git a/sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md b/sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md deleted file mode 100644 index 0c58a8416b..0000000000 --- a/sources/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md +++ /dev/null @@ -1,72 +0,0 @@ -Translating by ictlyh -Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop -================================================================================ -> **Question**: I often need to change system proxy settings on Ubuntu desktop, but I do not want to go through a chain of GUI menus: "System Settings" -> "Network" -> "Network proxy", which is cumbersome. Is there a more convenient way to change desktop's proxy settings from the command line? - -In Ubuntu desktop, its desktop environment settings, including system proxy settings, are stored in DConf database, which is a simple key/value store. If you modify any desktop properties using System Settings menu, the changes are persisted in the DConf database backend. There are GUI-based or non-GUI-based ways to modify DConf database on Ubuntu. While System Settings or dconf-editor are graphical methods for accessing DConf database, gsettings or dconf are command-line tools that can modify the database. - -Here is how to change system proxy settings from the command line using gsettings. - -![](https://farm6.staticflickr.com/5460/17872782271_68e5267a4a_c.jpg) - -The basic usage of gsettings for reading and writing a particular Dconf setting is as follows. - -To modify a DConf setting: - - $ gsettings set - -To read a DConf setting: - - $ gsettings get - -### Change System Proxy Setting to Manual from the Command Line ### - -The following commands will change HTTP proxy setting to "my.proxy.com:8000" on Ubuntu desktop. - - $ gsettings set org.gnome.system.proxy.http host 'my.proxy.com' - $ gsettings set org.gnome.system.proxy.http port 8000 - $ gsettings set org.gnome.system.proxy mode 'manual' - -If you want to change HTTPS/FTP proxy to manual as well, use these commands: - - $ gsettings set org.gnome.system.proxy.https host 'my.proxy.com' - $ gsettings set org.gnome.system.proxy.https port 8000 - $ gsettings set org.gnome.system.proxy.ftp host 'my.proxy.com' - $ gsettings set org.gnome.system.proxy.ftp port 8000 - -To change Socks host settings to manual: - - $ gsettings set org.gnome.system.proxy.socks host 'my.proxy.com' - $ gsettings set org.gnome.system.proxy.socks port 8000 - -All these changes above are limited to the current Desktop user only. If you want to apply the proxy setting changes system-wide, prepend sudo to gsettings command. For example: - - $ sudo gsettings set org.gnome.system.proxy.http host 'my.proxy.com' - $ sudo gsettings set org.gnome.system.proxy.http port 8000 - $ sudo gsettings set org.gnome.system.proxy mode 'manual' - -### Change System Proxy Setting to Automatic from the Command Line ### - -If you are using [proxy auto configuration][1] (PAC), type the following commands to switch to PAC. - - $ gsettings set org.gnome.system.proxy mode 'auto' - $ gsettings set org.gnome.system.proxy autoconfig-url http://my.proxy.com/autoproxy.pac - -### Clear System Proxy Setting from the Command Line ### - -Finally, to remove manual/automatic proxy setting, and revert to no-proxy setting: - - $ gsettings set org.gnome.system.proxy mode 'none' - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/change-system-proxy-settings-command-line-ubuntu-desktop.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://ask.xmodulo.com/author/nanni -[1]:http://xmodulo.com/how-to-set-up-proxy-auto-config-on-ubuntu-desktop.html \ No newline at end of file diff --git a/sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md b/sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md deleted file mode 100644 index 6dd2efa820..0000000000 --- a/sources/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md +++ /dev/null @@ -1,43 +0,0 @@ -Translating by ictlyh -Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop -================================================================================ -> **Question**: I am trying to customize fresh Ubuntu desktop that I just installed. For that, I want to use Unity Tweak Tool. How can I install Unity Tweak Tool on Ubuntu? - -[Unity Tweak Tool][1] is a popular Unity desktop customization tool. As the name implies, this tool is applicable to Ubuntu's default desktop environment only (i.e., Unity-based GNOME desktop). This versatile tool allows you to customize a wide variety of Unity desktop features and configurations via extremely intuitive and easy-to-use GUI. Its menu looks similar to Ubuntu's official System Settings, but its desktop customization capabilities far exceed those of the default System Settings. Using Unity Tweak Tool, you can customize appearance, behaviors and configurations for a plethora of desktop components, such as workspace, windows, icons, themes, cursors, fonts, scrolling, hot corners, etc. If you are a Unity desktop user, Unity Tweak Tool is definitely a must-have app. - -![](https://farm6.staticflickr.com/5463/17684020389_25dc7f0db2_b.jpg) - -While Unity Tweak Tool is an essential tool for Ubuntu desktop, it does not come pre-installed on stock Ubuntu desktop. For those of you to customize Unity desktop, here is how to install Unity Tweak Tool on Ubuntu desktop. - -### Install Unity Tweak Tool on Ubuntu 13.04 and higher ### - -Starting with Ubuntu 13.04, Unity Tweak Tool is available in the Ubuntu's base repositories. So its installation is as straightforward as: - - $ sudo apt-get install unity-tweak-tool - -To launch Unity Tweak Tool: - - $ unity-tweak-tool - -If you want to try the latest version of Unity Tweak Tool, you can install it from its daily PPA (as describe below). - -### Install Unity Tweak Tool on Ubuntu 12.10 ### - -Note that Unity Tweak Tool works on Ubuntu 12.10 and higher. If you want to install it on Ubuntu 12.10, you can use its PPA repository as follows. This PPA repository is also useful when you want to test the latest developments of the tool. - - $ sudo add-apt-repository ppa:freyja-dev/unity-tweak-tool-daily - $ sudo apt-get update - $ sudo apt-get install unity-tweak-tool - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/install-unity-tweak-tool-ubuntu-desktop.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://ask.xmodulo.com/author/nanni -[1]:https://launchpad.net/unity-tweak-tool \ No newline at end of file diff --git a/translated/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md b/translated/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md new file mode 100644 index 0000000000..526de3549e --- /dev/null +++ b/translated/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md @@ -0,0 +1,71 @@ +Linux 有问必答--如何在桌面版 Ubuntu 中用命令行更改系统代理设置 +================================================================================ +> **问题**: 我经常需要在桌面版 Ubuntu 中更改系统代理设置,但我不想通过繁琐的 GUI 菜单链:"系统设置" -> "网络" -> "网络代理"。在命令行中有更方便的方法更改桌面版的代理设置吗? + +在桌面版 Ubuntu 中,它的桌面环境设置,包括系统代理设置,都存储在 DConf 数据库,这是简单的键值对存储。如果你想通过系统设置菜单修改桌面属性,更改会持久保存在后端的 DConf 数据库。在 Ubuntu 中更改 DConf 数据库有基于图像用户界面和非图形用户界面的两种方式。系统设置或者 dconf-editor 是访问 DConf 数据库的图形方法,而 gsettings 或 dconf 就是能更改数据库的命令行工具。 + +下面介绍如何用 gsettings 从命令行更改系统代理设置。 + +![](https://farm6.staticflickr.com/5460/17872782271_68e5267a4a_c.jpg) + +gsetting 读写特定 Dconf 设置的基本用法如下: + +更改 DConf 设置: + + $ gsettings set + +读取 DConf 设置: + + $ gsettings get + +### 通过命令行更改系统代理设置为手动 ### + +桌面版 Ubuntu 中下面的命令会更改 HTTP 代理设置为 "my.proxy.com:8000"。 + + $ gsettings set org.gnome.system.proxy.http host 'my.proxy.com' + $ gsettings set org.gnome.system.proxy.http port 8000 + $ gsettings set org.gnome.system.proxy mode 'manual' + +如果你还想更改 HTTPS/FTP 代理为手动,用这些命令: + + $ gsettings set org.gnome.system.proxy.https host 'my.proxy.com' + $ gsettings set org.gnome.system.proxy.https port 8000 + $ gsettings set org.gnome.system.proxy.ftp host 'my.proxy.com' + $ gsettings set org.gnome.system.proxy.ftp port 8000 + +更改套接字主机设置为手动: + + $ gsettings set org.gnome.system.proxy.socks host 'my.proxy.com' + $ gsettings set org.gnome.system.proxy.socks port 8000 + +上面的更改都只适用于当前的桌面用户。如果你想在系统范围内使用代理设置更改,在 gsettings 命令面前添加 sudo。例如: + + $ sudo gsettings set org.gnome.system.proxy.http host 'my.proxy.com' + $ sudo gsettings set org.gnome.system.proxy.http port 8000 + $ sudo gsettings set org.gnome.system.proxy mode 'manual' + +### 在命令行中更改系统代理设置为自动 ### + +如果你正在使用 [自动配置代理][1] (proxy auto configuration,PAC),输入以下命令更改为 PAC。 + + $ gsettings set org.gnome.system.proxy mode 'auto' + $ gsettings set org.gnome.system.proxy autoconfig-url http://my.proxy.com/autoproxy.pac + +### 在命令行中清除系统代理设置 ### + +最后,清除所有 手动/自动 代理设置,还原为无代理设置: + + $ gsettings set org.gnome.system.proxy mode 'none' + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/change-system-proxy-settings-command-line-ubuntu-desktop.html + +作者:[Dan Nanni][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-set-up-proxy-auto-config-on-ubuntu-desktop.html \ No newline at end of file diff --git a/translated/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md b/translated/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md new file mode 100644 index 0000000000..def6860616 --- /dev/null +++ b/translated/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md @@ -0,0 +1,42 @@ +Linux 有问必答--如何在桌面版 Ubuntu 中安装 Unity Tweak Tool +================================================================================ +> **问题**: 我试着给刚安装的桌面版 Ubuntu 自定制桌面。我想使用 Unity Tweak Tool。我怎样才能在 Ubuntu 上安装 Unity Tweak Tool 呢? + +[Unity Tweak Tool][1] 是个流行的 Unity 桌面自定制工具。顾名思义,该工具只适用于 Ubuntu 的默认桌面环境(例如,基于 Unity 的 GNOME 桌面)。这个多功能的工具允许你通过非常直观和简单易用的图形用户界面自定义多种 Unity 桌面特性。它的菜单看起来类似于 Ubuntu 的官方系统设置,但它的桌面自定制能力远远超过默认的系统设置。通过使用 Unity Tweak Tool,你可以自定制外观、行为以及很多桌面组件的配置,例如工作区、窗口、图标、主题、光标、字体、滑动、热键等等。如果你是 Unity 桌面用户,Unity Tweak Tool 一定是个必不可少的应用程序。 + +![](https://farm6.staticflickr.com/5463/17684020389_25dc7f0db2_b.jpg) + +尽管 Unity Tweak Tool 是桌面版 Ubuntu 的重要工具,并没有在桌面版 Ubuntu 中预安装。为了能自定制 Unity 桌面,下面介绍一下如何在桌面版 Ubuntu 中安装 Unity Tweak Tool。 + +### 在 Ubuntu 13.04 或更高版本中安装 Unity Tweak Tool ### + +从 Ubuntu 13.04 开始, Ubuntu 的基础库中就有 Unity Tweak Tool 了。因此它的安装非常简单: + + $ sudo apt-get install unity-tweak-tool + +启动 Unity Tweak Tool: + + $ unity-tweak-tool + +如果你想使用最新版本的 Unity Tweak Tool,你可以从它的 PPA 中安装(如下所述)。 + +### 在 Ubuntu 12.10 中安装 Unity Tweak Tool ### + +注意,Unity Tweak Tool 要求 Ubuntu 12.10 或更高的版本。如果你想着 Ubuntu 上安装它,你可以安装下面方法使用 PPA。当你想测试最新的开发版的时候这个 PPA 库也非常有用。 + + $ sudo add-apt-repository ppa:freyja-dev/unity-tweak-tool-daily + $ sudo apt-get update + $ sudo apt-get install unity-tweak-tool + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-unity-tweak-tool-ubuntu-desktop.html + +作者:[Dan Nanni][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:https://launchpad.net/unity-tweak-tool \ No newline at end of file From abf2c18d5546ab9ab1778297f0fcfff837430c4f Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 21 May 2015 15:20:25 +0800 Subject: [PATCH 0912/2517] PUB:20150413 [Solved] Ubuntu Does Not Remember Brightness Settings @ZTinoZ --- ...3 [Solved] Ubuntu Does Not Remember Brightness Settings.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md (94%) diff --git a/translated/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md b/published/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md similarity index 94% rename from translated/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md rename to published/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md index 5cd7abadaa..d0248ff2c2 100644 --- a/translated/tech/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md +++ b/published/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md @@ -1,4 +1,4 @@ -[已解决] Ubuntu下不能记住亮度设置问题 +如何解决 Ubuntu 下不能记住亮度设置的问题 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Fix_Ubuntu_Brightness_Issue.jpg) @@ -22,7 +22,7 @@ via: http://itsfoss.com/ubuntu-mint-brightness-settings/ 作者:[Abhishek][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From dbb0833d3bd13649ba2aa6dec69839c42afb7509 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 21 May 2015 15:58:19 +0800 Subject: [PATCH 0913/2517] PUB:20150324 How to Interactively Create a Docker Container @wi-cuckoo --- ...Interactively Create a Docker Container.md | 100 ++++++++++++++++++ ...Interactively Create a Docker Container.md | 99 ----------------- 2 files changed, 100 insertions(+), 99 deletions(-) create mode 100644 published/20150324 How to Interactively Create a Docker Container.md delete mode 100644 translated/tech/20150324 How to Interactively Create a Docker Container.md diff --git a/published/20150324 How to Interactively Create a Docker Container.md b/published/20150324 How to Interactively Create a Docker Container.md new file mode 100644 index 0000000000..8fb5f6fa39 --- /dev/null +++ b/published/20150324 How to Interactively Create a Docker Container.md @@ -0,0 +1,100 @@ +如何交互式地创建一个Docker容器 +=============================================================================== + +大家好,今天我们来学习如何使用一个docker镜像交互式地创建一个Docker容器。当我们从镜像中启动一个Docker进程,Docker就会获取该镜像及其父镜像,并重复这个过程,直到到达基础镜像。然后联合文件系统(UFS)会在其顶层添加一个读写层。读写层被称之为容器,它包含了一些关于父镜像信息及一些其他的信息,如唯一ID,网络配置和资源限制等。容器是有状态的,其状态可以从 **运行态** 切换到 **退出态**。一个处于 **运行态**的容器包含了在CPU上面运行的进程树,于其它在该主机上运行的进程相隔离,而**退出态**是指文件系统的状态,并保留了其退出值。你可以使用它来启动,停止和重启一个容器。 + +Docker技术为IT界带来了巨大的改变,它使得云服务可以用来共享应用和工作流程自动化,使得应用可以用组件快速组合,消除了开发、品质保证、产品环境间的摩擦。在这篇文章中,我们将会建立CentOS环境,然后用Apache网络服务器提供一个网站服务。 + +这是一个快速且容易的教程,讨论我们怎样使用交互的shell,以交互的方式来创建一个容器。 + +### 1. 运行一个Docker实例 ### + +Docker首先会尝试从本地取得并运行所需的镜像,如果在本地主机上没有发现,它就会从[Docker公共注册中心][1]拉取。这里,我们将会拉取镜像并在 Docker 容器中创建一个fedora实例,并连接到它的 tty 上的bash shell。 + + # docker run -i -t fedora bash + +![Downloading Fedora Base Image](http://blog.linoxide.com/wp-content/uploads/2015/03/downloading-fedora-base-image.png) + +### 2.安装Apache网络服务器 ### + +现在,在我们的Fedora基本镜像实例准备好后,我们将会开始交互式地安装Apache网络服务器,而不是为它创建Dockerfile。为了做到这点,我们需要在终端或者shell运行以下命令。 + + # yum update + +![Installing httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-httpd2.png) + + # yum install httpd + +![Installing httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-httpd2.png) + + # exit + +### 3.保存镜像 ### + +现在,我们要去保存在Fedora实例里做的修改。要做到这个,我们首先需要知道实例的容器ID。而为了得到ID,我们又需要运行以下命令(LCTT 译注:在容器外执行该命令)。 + + # docker ps -a + +![Docker Running Container](http://blog.linoxide.com/wp-content/uploads/2015/03/docker-running-container.png) + +然后,我们会保存这些改变为一个新的镜像,请运行以下命令。 + + # docker commit c16378f943fe fedora-httpd + +![committing fedora httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/committing-fedora-httpd.png) + +这里,修改已经通过使用容器ID保存起来了,镜像名字叫fedora-httpd。为了确认新的镜像是否在运行,我们将运行以下命令。 + + # docker images + +![view docker images](http://blog.linoxide.com/wp-content/uploads/2015/03/view-docker-images.png) + +### 4. 添加内容到新的镜像 ### + +我们自己新的Fedora Apache镜像正成功的运行,现在我们想添加一些我们网站的网页内容到Apache网络服务器,使得网站能够开箱即用。为做到这点,我们需要创建一个新的Dockerfile,它会处理从复制网页内容到启用80端口的所有操作。要达到这样的目的,我们需要使用我们最喜欢的文本编辑器创建Dockerfile文件,像下面演示的一样。 + + # nano Dockerfile + +现在,我们需要添加以下的命令行到文件中。 + + FROM fedora-httpd + ADD mysite.tar /tmp/ + RUN mv /tmp/mysite/* /var/www/html + EXPOSE 80 + ENTRYPOINT [ "/usr/sbin/httpd" ] + CMD [ "-D", "FOREGROUND" ] + +![configuring Dockerfile](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-Dockerfile.png) + +这里,上述的Dockerfile中,放在mysite.tar里的网页内容会自动解压到/tmp/文件夹里。然后,整个站点会被移动到Apache的网页根目录/var/www/html/,命令expose 80会打开80端口,这样网站就能正常访问了。其次,入口点放在了/usr/sbin/https里面,保证Apache服务器能够执行。 + +### 5. 构建并运行一个容器 ### + +现在,我们要用刚刚创建的Dockerfile创建我们的容器,以便将我们的网站添加到上面。为做到这,我们需要运行以下命令。 + + # docker build -rm -t mysite . + +![Building mysite Image](http://blog.linoxide.com/wp-content/uploads/2015/03/building-mysite-image.png) + +建立好我们的新容器后,我们需要要用下面的命令来运行容器。 + + # docker run -d -P mysite + +![Running mysite Container](http://blog.linoxide.com/wp-content/uploads/2015/03/running-mysite-container.png) + +### 总结 ### + +最后,我们已经成功的以交互式的方式建立了一个Docker容器。在本节方法中,我们是直接通过交互的shell命令建立我们的容器和镜像。在建立与配置镜像与容器时,这种方法十分简单且快速。如果你有任何问题,建议和反馈,请在下方的评论框里写下来,以便我们可以提升或者更新我们的文章。谢谢!祝生活快乐 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/interactively-create-docker-container/ + +作者:[Arun Pyasi][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://registry.hub.docker.com/ diff --git a/translated/tech/20150324 How to Interactively Create a Docker Container.md b/translated/tech/20150324 How to Interactively Create a Docker Container.md deleted file mode 100644 index 9661e8d3f2..0000000000 --- a/translated/tech/20150324 How to Interactively Create a Docker Container.md +++ /dev/null @@ -1,99 +0,0 @@ -如何交互式地创建一个Docker容器 -=============================================================================== -大家好,今天我们来学习如何使用一个docker镜像交互式地创建一个Docker容器。一旦我们从镜像中启动一个Docker进程,Docker就会在父镜像与子镜像间来回搬运,重复工作,直到到达子镜像。然后联合文件系统会在顶层添加一个读写层。读写层又叫一个 **Container** 包含一些信息,关于它的父镜像和一些其他的信息,如单独的ID,网络配置和资源限制。容器已经声明,他们可以从 **running** 切换到 **exited** 状态。一个处于 **running** 状态的容器包含了很多分支在CPU上面运行,独立于其他在主机上运行的进程,而主机上 **exited** 是文件系统的状态,它的退出变量值是保留的。你可以使用读写层来启动,停止和重启一个容器。 - -Docker技术为IT界带来了巨大的改变,它使得云服务可以用来共享应用和工作流程自动化,使得应用可以从组件快速组合,消除了开发与品质保证和产品环境间的摩擦。在这篇文章中,我们将会建立CentOS环境,然后维护一个网站,在Apache网络服务器下运行。 - -这是快速且容易的教程,讨论我们怎样使用一个交互的shell,以一个交互的方式来创建一个容器。 - -### 1. 运行一个Docker实例 ### - -Docker一开始尝试从本地取得和运行所需的镜像,如果在本地主机上没有发现,它就会从[Docker公共注册中心][1]拉取。这里,我们将会在一个DOcker容器里取得并创建一个fedora实例,附加一个bash shell到tty - - # docker run -i -t fedora bash - -![Downloading Fedora Base Image](http://blog.linoxide.com/wp-content/uploads/2015/03/downloading-fedora-base-image.png) - -### 2.安装Apache网络服务器 ### - -现在,在我们的Fedora基本镜像准备好后,我们将会开始交互式地安装Apache网络服务器,而不必为它创建Dockerfile。为了做到这点,我们需要在终端或者shell运行以下命令。 - - # yum update - -![Installing httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-httpd2.png) - - # yum install httpd - -![Installing httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-httpd2.png) - - # exit - -### 3.Saving the Image ### - -现在,我们要去保存在Fedora实例里做的修改。要做到这个,我们首先需要知道实例的容器ID。而为了得到ID,我们又需要运行以下命令。 - - # docker ps -a - -![Docker Running Container](http://blog.linoxide.com/wp-content/uploads/2015/03/docker-running-container.png) - -然后,我们会保存这些改变为一个新的镜像,请运行以下命令。 - - # docker commit c16378f943fe fedora-httpd - -![committing fedora httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/committing-fedora-httpd.png) - -这里,修改已经通过使用容器ID保存起来了,镜像名字叫fedora-httpd。为了确认新的镜像时候在运行,我们将运行以下命令 - - # docker images - -![view docker images](http://blog.linoxide.com/wp-content/uploads/2015/03/view-docker-images.png) - -### 4. 添加内容到新的镜像 ### - -我们自己新的Fedora Apache镜像正成功的运行,现在我们想添加一些网页内容到Apache网络服务器,包括我们的网站,使得网站能够脱离盒子正确运行。为做到这点,我们需要创建一个新的Dockerfile,它会处理从复制网页内容到使用80端口的所有操作。而为做到这,我们又需要使用我们最喜欢的文本编辑器创建Dockerfile文件,像下面演示的一样。 - - # nano Dockerfile - -现在,我们需要添加以下的命令行到文件中。 - - FROM fedora-httpd - ADD mysite.tar /tmp/ - RUN mv /tmp/mysite/* /var/www/html - EXPOSE 80 - ENTRYPOINT [ "/usr/sbin/httpd" ] - CMD [ "-D", "FOREGROUND" ] - -![configuring Dockerfile](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-Dockerfile.png) - -这里,运行Dockerfile,mysite.tar里的网页内容会自动解压到/temp/文件夹里。然后,整个文件会被转移到Apache网页根目录/var/www/html/,命令expose 80会打开80端口,这样网站就能正常访问。其次,入口点放在了/usr/sbin/https里面,保证Apache服务器能够执行。 - -### 5. 建立并运行一个容器 ### - -现在,为了添加我们网站在上面,我们要用刚刚创建的Dockerfile创建我们的容器,为做到这,我们需要运行以下命令。 - - # docker build -rm -t mysite . - -![Building mysite Image](http://blog.linoxide.com/wp-content/uploads/2015/03/building-mysite-image.png) - -我们建立自己的容器后,我们想要用下面的命令来运行容器。 - - # docker run -d -P mysite - -![Running mysite Container](http://blog.linoxide.com/wp-content/uploads/2015/03/running-mysite-container.png) - -### 总结 ### - -最后,我们已经成功的以交互式的方式建立了一个Docker容器。在本节方法中,我们是直接通过交互的shell命令建立我们的容器和镜像。这种方法十分简单且快速,在建立与配置镜像与容器方面。如果你有任何问题,建议和反馈,请在下方的评论框里写下来,以便我们可以提升或者更新我们的文章。谢谢!祝生活快乐 :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/interactively-create-docker-container/ - -作者:[Arun Pyasi][a] -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://registry.hub.docker.com/ From 0e1c622fbfcb0808c6e8ea766bd042bfdc932b45 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 21 May 2015 21:07:36 +0800 Subject: [PATCH 0914/2517] translated --- ... How to Use tmpfs on RHEL or CentOS 7.0.md | 66 ------------------- ... How to Use tmpfs on RHEL or CentOS 7.0.md | 64 ++++++++++++++++++ 2 files changed, 64 insertions(+), 66 deletions(-) delete mode 100644 sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md create mode 100644 translated/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md diff --git a/sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md b/sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md deleted file mode 100644 index e2d4941e0b..0000000000 --- a/sources/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md +++ /dev/null @@ -1,66 +0,0 @@ -translating----geekpi - -How to Use tmpfs on RHEL / CentOS 7.0 -================================================================================ -Today we will talk about tmpfs CentOS 7 a file system that will keep all files and folders in the virtual memory of the operating system as opposed to actually writing them to the disk. This means that all the content in tmpfs is temporary in the sense that it’s not permanently written to the disk and in case the tmpfs is unmounted, the system is rebooted or the power is cut all content will be lost. From a technical point of view tmpfs puts everything in the kernel internal cache and then grows or shrinks to accommodate the files it contains ans is able to swap unneeded pages out of swap space. - -By default CentOS uses tmpfs for various things as you can see from the output of the df –h command: - - # df –h - -![df](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs1.jpg) - -/dev - directory contains the special device files for all the devices. -/dev/shm – contains shared memory allocation -/run - used for system logs -/sys/fs/cgroup - used for cgroups, a kernel feature to limit, police and account the resource usage of certain processes - -One use of tmpfs is to obviously use it as a /tmp folder, you can do this in 2 ways: - -### Using systemctl to enable tmpfs in /tmp ### - -You can use the systemctl command to enable tmpfs in the /tmp folder, first use the following command to check if this feature is not already enabled: - - # systemctl is-enabled tmp.mount - -Will show the current status of settings you can use the following command to enable it: - - # systemctl enable tmp.mount - -![systemctl](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs3.jpg) - -This will have the system controlling the /tmp folder and mount a tmpfs in it. - -### Manually mounting a /tmp/fs ### - -You can also manually add a tmpfs in /tmp by adding the following line to /etc/fstab: - - tmpfs /tmp tmpfs size=512m 0 0 - -And then running the mount command like this: - - # mount –a - -![df](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs2.jpg) - -This should make the tmpfs show in df –h, also it will automatically mount it the next time you reboot. - -### Creating a tmpfs on the fly ### - -If for some reason you wish to create a tmpfs in a folder on the fly you can always use the following command: - - # mount -t tmpfs -o size=1G tmpfs /mnt/mytmpfs - -Of course you can specify any size you wish in the size option and any mount point you wish, just remember it must be a valid directory. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/file-system/use-tmpfs-rhel-centos-7-0/ - -作者:[Adrian Dinu][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/adriand/ diff --git a/translated/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md b/translated/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md new file mode 100644 index 0000000000..7f3e37b3fe --- /dev/null +++ b/translated/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md @@ -0,0 +1,64 @@ +如何在RHEL/CentOS 7.0中使用tmpfs +================================================================================ + 7中的tmpfs,这是一个将所有文件和文件夹写到虚拟内存中而不是实际写到磁盘中的虚拟文件系统。这意味中tmpfs中所有的内容都是临时的,在取消挂载、系统重启或者电源切断后内容都将会丢失。技术的角度上来说,tmpfs将搜有的内容放在内核内部缓存中并且会增大或者缩小来容纳文件并可从交换空间中交换处不需要的页。 + +CentOS默认使用tmpfs做的事可用df -h命令的输出来看: + + # df –h + +![df](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs1.jpg) + +/dev - 含有针对所有设备的设备文件的目录 +/dev/shm – 包含共享内存分配 +/run - 用于系统日志 +/sys/fs/cgroup - 用于cgrpups, 一个针对特定进程限制、管制和审计资源利用的内核特性 + +/tmp目录, 你可以用下面的两种方法来做到: + +### 使用systemctl来在/tmp中启用tmpfs ### + +你可以使用systemctl命令在tmp目录启用tmpfs, 首先用下面的命令来检查这个特性是否可用: + + # systemctl is-enabled tmp.mount + +这会显示当先的状态,你可以使用下面的命令来启用它: + + # systemctl enable tmp.mount + +![systemctl](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs3.jpg) + +这会控制/tmp目录并挂载tmpfs。 + +### 手动挂载/tmp/文件系统 ### + +你可以在/etc/fstab中添加下面这行在/tmp挂载tmpfs。 + + tmpfs /tmp tmpfs size=512m 0 0 + +接着运行这条命令 + + # mount –a + +![df](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs2.jpg) + +这应该就会在df -h中显示tmpfs了,同样也会在你下次重启是会自动挂载。 + +### 立即创建tmpfs ### + +如果由于一些原因,你写昂立即创建tmpfs,你可以使用下面的命令: + + # mount -t tmpfs -o size=1G tmpfs /mnt/mytmpfs + +当然你可以在size选项中指定你希望的大小和希望的挂载点,只要记住是有效的目录就行了。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/file-system/use-tmpfs-rhel-centos-7-0/ + +作者:[Adrian Dinu][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/adriand/ From 4d899b7b3ded97ea97d386e0aff27f72268e74bd Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 21 May 2015 21:51:11 +0800 Subject: [PATCH 0915/2517] translated --- ...dgets on Ubuntu or Debian or Linux Mint.md | 169 ------------------ ...dgets on Ubuntu or Debian or Linux Mint.md | 167 +++++++++++++++++ 2 files changed, 167 insertions(+), 169 deletions(-) delete mode 100644 sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md create mode 100644 translated/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md diff --git a/sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md b/sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md deleted file mode 100644 index 6719acdbc4..0000000000 --- a/sources/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md +++ /dev/null @@ -1,169 +0,0 @@ -translating---geekpi - -How to compile and install wxWidgets on Ubuntu/Debian/Linux Mint -================================================================================ -### wxWidgets ### - -wxWidgets is an application development framework/library that allows developer to make cross platform GUI applications for Windows, Mac and Linux using the same codebase. - -Its primarily written in C++ but has bindings for other languages as well like Python, Perl and Ruby. - -In this tutorial I am going to show you how to compile and build wxwidgets 3.0+ on Debian based linux systems like Ubuntu and Linux Mint. - -Compiling wxWidgets from source is not at all difficult as it might sound and takes only a few minutes to do. - -The library can be compiled in different modes like static library or dynamic library. - -### 1. Download wxWidgets ### - -The first step would be to download the wxWidgets source files from [wxwidgets.org][1] - -Once done, extract the files to a directory. - -### 2. Setup build environment ### - -To compile wxwidgets we would need some utility programs including the C++ compiler on Linux called g++. And all of it would be installed from the repositories using apt-get. - -We also need the GTK development libraries which wxWidgets depend on. - - $ sudo apt-get install libgtk-3-dev build-essential checkinstall - -> The utility called checkinstall would allow us to create an installation package for wxwidgets, so that later on it can un-installed easily using package managers - -### 3. Compile wxWidgets ### - -Get inside the directory where wxWidgets is extracted. In order to keep things clean, create a directory where the compilation would be done. - - $ mkdir gtk-build - $ cd gtk-build/ - -Now run the configure and make commands one by one. Each one would take some time to finish. - - $ ../configure --disable-shared --enable-unicode - $ make - -The "--disable-shared" option instructs wxwidgets to builds static libraries instead of shared/dynamic ones. - -After the make command finishes, the compilation is done successfully. Its time to install the wxWidgets files to the correct location. - -More information about compile options can be found in install.txt and readme.txt files that can be found in /docs/gtk/ inside the wxwidgets directory. - -### 4. Install with checkinstall ### - -Now instead of using the "make install" command, we shall use the checkinstall command to create a deb package for wxwidgets. Run the following command - - $ sudo checkinstall - -Checkinstall would ask few questions during the process and make sure to provide a version number when asked, otherwise it would fail. - -Once the process is over, wxWidgets would be installed and also a deb file would be created in the same directory. - -### 5. Track the installed files ### - -If you wish to check where the files are installed, use the dpkg command followed by the name of the package provided during the checkinstall process. - - $ dpkg -L package_name - /. - /usr - /usr/local - /usr/local/lib - /usr/local/lib/libwx_baseu-3.0.a - /usr/local/lib/libwx_gtk3u_propgrid-3.0.a - /usr/local/lib/libwx_gtk3u_html-3.0.a - /usr/local/lib/libwxscintilla-3.0.a - /usr/local/lib/libwx_gtk3u_ribbon-3.0.a - /usr/local/lib/libwx_gtk3u_stc-3.0.a - /usr/local/lib/libwx_gtk3u_qa-3.0.a - /usr/local/lib/libwx_baseu_net-3.0.a - /usr/local/lib/libwxtiff-3.0.a - -### 6. Compile the samples ### - -After compiling wxWidgets, its time to compile the sample programs to see it in action. In the same directory where we compiled wxwidgets, a new subdirectory called samples would have been created. - -Just enter it and run the make command - - $ compile samples - $ cd samples/ - $ make - -After the make process finishes, get inside each sample sub directory and there should be an executable file that can be run right away to see the demo. - -### 7. Compile your first program ### - -After you are done with the demo programs, its time to write your own program and compile it. Again it is quite easy. - -It is assumed that you are coding in C++ and for that you can use any good editor with syntax highlighting feature. For example gedit, kate, kwrite would do. Or you might want to try fully loaded IDEs like Geany, Codelite, Codeblocks etc. - -However for your first program just use an ordinary text editor get it done quick. - -Here it is - - #include - - class Simple : public wxFrame - { - public: - Simple(const wxString& title) - : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(250, 150)) - { - Centre(); - } - }; - - class MyApp : public wxApp - { - public: - bool OnInit() - { - Simple *simple = new Simple(wxT("Simple")); - simple->Show(true); - return true; - } - }; - - wxIMPLEMENT_APP(MyApp); - -Now save the program somewhere and compile it with the following commands - - # compile - $ g++ basic.cpp `wx-config --cxxflags --libs std` -o program - - # run - $ ./program - -#### Compiling with non standard libraries #### - -The wx-config command shown above provides only the standard libraries by default. If you are using the Aui classes for example, then you need to specify additional libraries for it - - $ g++ code.cpp `wx-config --cxxflags --libs std,aui` -o program - -More information can be found [here][2]. - -### Resources ### - -Download source and help files for wxWidgets -[https://www.wxwidgets.org/downloads/][3] - -wxWidgets wiki page on compile instructions -[https://wiki.wxwidgets.org/Compiling_and_getting_started][4] - -Notes on how to use the latest wxWidgets version (3.0+) -[https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets][5] - --------------------------------------------------------------------------------- - -via: http://www.binarytides.com/install-wxwidgets-ubuntu/ - -作者:[Silver Moon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117145272367995638274/posts -[1]:https://www.wxwidgets.org/downloads/ -[2]:https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets#The_wx-config_script -[3]:https://www.wxwidgets.org/downloads/ -[4]:https://wiki.wxwidgets.org/Compiling_and_getting_started -[5]:https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets diff --git a/translated/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md b/translated/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md new file mode 100644 index 0000000000..1f733207f3 --- /dev/null +++ b/translated/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md @@ -0,0 +1,167 @@ +如何在Ubuntu/Debian/Linux Mint中编译和安装wxWidgets +================================================================================ +### wxWidgets ### + +wxWidgets是一个程序开发框架/库, 允许你在Windows、Mac、Linux中使用相同的代码跨平台开发。 + +它主要用C++写成,但也可以与其他语言绑定比如Python、Perl、Ruby。 + +本教程中我将向你展示如何在基于Debian的linux中如Ubuntu和Linux Mint中编译wxwidgets 3.0+。 + +从源码编译wxWidgets并不困难,仅仅需要几分钟。 + +库可以按不同的方式来编译,比如静态或者动态库。 + +### 1. 下载 wxWidgets ### + +第一步你需要从[wxwidgets.org][1]下载wxWidgets源码文件。 + +做完后,解压到目录。 + +### 2. 设置编译环境 ### + +要编译wxwidgets,我们需要一些工具包括C++编译器, 在Linux上是g++。所有这些可以通过apt-get工具从仓库中安装。 + +我们还需要wxWidgets依赖的GTK开发库。 + + $ sudo apt-get install libgtk-3-dev build-essential checkinstall + +>checkinstall工具允许我们为wxwidgets创建一个安装包,这样之后就可以轻松的使用包管理器来卸载。 + +### 3. 编译 wxWidgets ### + +进入到wxWidgets解压后的目录。为了保持清洁,创建一个编译用的目录。 + + $ mkdir gtk-build + $ cd gtk-build/ + +现在运行configure和make命令。每个将花费一些时间来完成。 + + $ ../configure --disable-shared --enable-unicode + $ make + +"--disable-shared"选项将会编译静态库而不是动态库。 + +make命令完成后,编译也成功了。是时候安装wxWidgets到正确的目录。 + +更多信息请参考install.txt和readme.txt,这可在wxwidgets中的/docs/gtk/目录下找到。 + +### 4. 安装 checkinstall ### + +现在我们不使用"make install"命令,我们使用checkinstall命令来创建一个wxwidgets的deb安装包。运行命令: + + $ sudo checkinstall + +checkinstall会询问几个问题,请保证在提问后提供一个版本号,否则将会失败。 + +完成这一切后,wxWidgets就安装好了,deb文件也会创建在相同的目录下。 + +### 5. 追踪安装的文件 ### + +如果你想要检查文件安装的位置,使用dpkg命令后面跟上checkinstall提供的报名。 + + $ dpkg -L package_name + /. + /usr + /usr/local + /usr/local/lib + /usr/local/lib/libwx_baseu-3.0.a + /usr/local/lib/libwx_gtk3u_propgrid-3.0.a + /usr/local/lib/libwx_gtk3u_html-3.0.a + /usr/local/lib/libwxscintilla-3.0.a + /usr/local/lib/libwx_gtk3u_ribbon-3.0.a + /usr/local/lib/libwx_gtk3u_stc-3.0.a + /usr/local/lib/libwx_gtk3u_qa-3.0.a + /usr/local/lib/libwx_baseu_net-3.0.a + /usr/local/lib/libwxtiff-3.0.a + +### 6. 编译示例 ### + +编译wxWidgets完成后就可以马上编译示例程序了。在相同的目录下,一个新的sample目录已经创建了。 + +进入它并运行下面的命令 + + $ compile samples + $ cd samples/ + $ make + +make命令完成后,进入sampl子目录,这里就有一个可以马上运行的Demo程序了。 + +### 7. 编译你的第一个程序 ### + +你完成编译demo程序后,可以写你自己的程序来编译了。这个也很简单。 + +假设你用的是C++这样你可以使用编辑器的高亮特性。比如gedit、kate、kwrite等等。或者用全功能的IDE像Geany、Codelite、Codeblocks等等。 + +然而你的第一个程序只需要用一个文本编辑器来快速完成。 + +这里就是 + + #include + + class Simple : public wxFrame + { + public: + Simple(const wxString& title) + : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(250, 150)) + { + Centre(); + } + }; + + class MyApp : public wxApp + { + public: + bool OnInit() + { + Simple *simple = new Simple(wxT("Simple")); + simple->Show(true); + return true; + } + }; + + wxIMPLEMENT_APP(MyApp); + +现在保存并用下面的命令编译。 + + # compile + $ g++ basic.cpp `wx-config --cxxflags --libs std` -o program + + # run + $ ./program + +#### 和非标准的库一起编译 #### + +面展示的wx-config命令默认只支持标准的库。如果你使用的是Aui库,那么你需要指定额外用到的库。 + + $ g++ code.cpp `wx-config --cxxflags --libs std,aui` -o program + +更多的信息参考这里[这里][2]。 + +### 资源 ### + +下载wxWidgets的源码和帮助 +[https://www.wxwidgets.org/downloads/][3] + +wxWidgets编译的wiki页面 +[https://wiki.wxwidgets.org/Compiling_and_getting_started][4] + +使用wxWidgets最新版本(3.0+)的事项 +[https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets][5] + +-------------------------------------------------------------------------------- + +via: http://www.binarytides.com/install-wxwidgets-ubuntu/ + +作者:[Silver Moon][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117145272367995638274/posts +[1]:https://www.wxwidgets.org/downloads/ +[2]:https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets#The_wx-config_script +[3]:https://www.wxwidgets.org/downloads/ +[4]:https://wiki.wxwidgets.org/Compiling_and_getting_started +[5]:https://wiki.wxwidgets.org/Updating_to_the_Latest_Version_of_wxWidgets From 1fa7073ae62a5f8fadcebf2ab4e1b12936dbbbe2 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Thu, 21 May 2015 22:00:35 +0800 Subject: [PATCH 0916/2517] [Translated] 20150326 How to set up server monitoring system with Monit.md --- ... up server monitoring system with Monit.md | 254 ------------------ ... up server monitoring system with Monit.md | 250 +++++++++++++++++ 2 files changed, 250 insertions(+), 254 deletions(-) delete mode 100644 sources/tech/20150326 How to set up server monitoring system with Monit.md create mode 100755 translated/tech/20150326 How to set up server monitoring system with Monit.md diff --git a/sources/tech/20150326 How to set up server monitoring system with Monit.md b/sources/tech/20150326 How to set up server monitoring system with Monit.md deleted file mode 100644 index a803878b39..0000000000 --- a/sources/tech/20150326 How to set up server monitoring system with Monit.md +++ /dev/null @@ -1,254 +0,0 @@ -Translating by goreliu ... - -How to set up server monitoring system with Monit -================================================================================ -Many Linux admins rely on a centralized remote monitoring system (e.g., [Nagios][1] or [Cacti][2]) to check the health of their network infrastructure. While centralized monitoring makes an admin's life easy when dealing with many hosts and devices, a dedicated monitoring box obviously becomes a single point of failure; if the monitoring box goes down or becomes unreachable for whatever reason (e.g., bad hardware or network outage), you will lose visibility on your entire infrastructure. - -One way to add redundancy to your monitoring system is to install standalone monitoring software (as a fallback) at least on any critical/core servers on your network. In case a centralized monitor is down, you will still be able to maintain visibility on your core servers from their backup monitor. - -### What is Monit? ### - -[Monit][3] is a cross-platform open-source tool for monitoring Unix/Linux systems (e.g., Linux, BSD, OSX, Solaris). Monit is extremely easy to install and reasonably lightweight (with only 500KB in size), and does not require any third-party programs, plugins or libraries. Yet, Monit lends itself to full-blown monitoring, capable of process status monitoring, filesystem change monitoring, email notification, customizable actions for core services, and so on. The combination of ease of setup, lightweight implementation and powerful features makes Monit an ideal candidate for a backup monitoring tool. - -I have been using Monit for several years on multiple hosts, and I am very pleased how reliable it has been. Even as a full-blown monitoring system, Monit is very useful and powerful for any Linux admin. In this tutorial, let me demonstrate how to set up Monit on a local server (as a backup monitor) to monitor common services. With this setup, I will only scrach the surface of what Monit can do for us. - -### Installation of Monit on Linux ### - -Most Linux distributions already include Monit in their repositories. - -Debian, Ubuntu or Linux Mint: - - $ sudo aptitude install monit - -Fedora or CentOS/RHEL: - -On CentOS/RHEL, you must enable either [EPEL][4] or [Repoforge][5] repository first. - - # yum install monit - -Monit comes with a very well documented configuration file with a lots of examples. The main configuration file is located in /etc/monit.conf in Fedora/CentOS/RHEL, or /etc/monit/monitrc in Debian/Ubuntu/Mint. Monit configuration has two parts: "Global" and "Services" sections. - -Gl### ###obal Configuration: Web Status Page - -Monit can use several mail servers for notifications, and/or an HTTP/HTTPS status page. Let's start with the web status page with the following requirements. - -- Monit listens on port 1966. -- Access to the web status page is encrypted with SSL. -- Login requires monituser/romania as user/password. -- Login is permitted from localhost, myhost.mydomain.ro, and internal LAN (192.168.0.0/16) only. -- Monit stores an SSL certificate in a pem format. - -For subsequent steps, I will use a Red Hat based system. Similar steps will be applicable on a Debian based system. - -First, generate and store a self-signed certificate (monit.pem) in /var/cert. - - # mkdir /var/certs - # cd /etc/pki/tls/certs - # ./make-dummy-cert monit.pem - # cp monit.pem /var/certs - # chmod 0400 /var/certs/monit.pem - -Now put the following snippet in the Monit's main configuration file. You can start with an empty configuration file or make a copy of the original file. - - set httpd port 1966 and - SSL ENABLE - PEMFILE /var/certs/monit.pem - allow monituser:romania - allow localhost - allow 192.168.0.0/16 - allow myhost.mydomain.ro - -### Global Configuration: Email Notification ### - -Next, let's set up email notification in Monit. We need at least one active [SMTP server][6] which can send mails from the Monit host. Something like the following will do (adjust it for your case): - -- Mail server hostname: smtp.monit.ro -- Sender email address used by monit (from): monit@monit.ro -- Who will receive mail from monit daemon: guletz@monit.ro -- SMTP port used by mail server: 587 (default is 25) - -With the above information, email notification would be configured like this: - - set mailserver smtp.monit.ro port 587 - set mail-format { - from: monit@monit.ro - subject: $SERVICE $EVENT at $DATE on $HOST - message: Monit $ACTION $SERVICE $EVENT at $DATE on $HOST : $DESCRIPTION. - - Yours sincerely, - Monit - - } - - set alert guletz@monit.ro - -As you can see, Monit offers several built-in variables ($DATE, $EVENT, $HOST, etc.), and you can customize your email message for your needs. If you want to send mails from the Monit host itself, you need a sendmail-compatible program (e.g., postfix or ssmtp) already installed. - -### Global Configuration: Monit Daemon ### - -The next part is setting up monit daemon. We will set it up as follows. - -- Performs the first check after 120 seconds. -- Checks services once every 3 minutes. -- Use syslog for logging. - -Place the following snippet to achieve the above setting. - - set daemon 120 - with start delay 240 - set logfile syslog facility log_daemon - -We must also define "idfile", a unique ID used by monit demon, and "eventqueue", a path where mails sent by monit but undelivered due to SMTP/network errors. Verifiy that path (/var/monit) already exists. The following configuration will do. - - set idfile /var/monit/id - set eventqueue - basedir /var/monit - -### Test Global Configuration ### - -Now the "Global" section is finished. The Monit configuration file will look like this: - - # Global Section - - # status webpage and acl's - set httpd port 1966 and - SSL ENABLE - PEMFILE /var/certs/monit.pem - allow monituser:romania - allow localhost - allow 192.168.0.0/16 - allow myhost.mydomain.ro - - # mail-server - set mailserver smtp.monit.ro port 587 - # email-format - set mail-format { - from: monit@monit.ro - subject: $SERVICE $EVENT at $DATE on $HOST - message: Monit $ACTION $SERVICE $EVENT at $DATE on $HOST : $DESCRIPTION. - - Yours sincerely, - Monit - - } - - set alert guletz@monit.ro - - # delay checks - set daemon 120 - with start delay 240 - set logfile syslog facility log_daemon - - # idfile and mail queue path - set idfile /var/monit/id - set eventqueue - basedir /var/monit - -Now it is time to check what we have done. You can test an existing configuration file (/etc/monit.conf) by running: - - # monit -t - ----------- - - Control file syntax OK - -If Monit complains about any error, please review the configuration file again. Fortunately, error/warnings messages are informative. For example: - - monit: Cannot stat the SSL server PEM file '/var/certs/monit.pem' -- No such file or directory - /etc/monit/monitrc:10: Warning: hostname did not resolve 'smtp.monit.ro' - -Once you verify the syntax of configuration, start monit daemon, and wait 2 to 3 minutes: - - # service monit start - -If you are using systemd, run: - - # systemctl start monit - -Now open a browser window, and go to https://:1966. Replace & with your Monit hostname or IP address. - -Note that if you have a self-signed SSL certificate, you will see a warning message in your browser. - -![](https://farm8.staticflickr.com/7596/16737206479_96b9f7dfdb_c.jpg) - -After you have completed login, you must see the following page. - -![](https://farm8.staticflickr.com/7594/16303369973_6019482dea_c.jpg) - -In the rest of the tutorial, let me show how we can monitor a local server and common services. You will see a lot of useful examples on the [official wiki page][7]. Most of them are copy-and-pastable! - -### Service Configuration: CPU/Memory Monitoring ### - -Let start with monitoring a local server's CPU/memory usage. Copy the following snippet in the configuration file. - - check system localhost - if loadavg (1min) > 10 then alert - if loadavg (5min) > 6 then alert - if memory usage > 75% then alert - if cpu usage (user) > 70% then alert - if cpu usage (system) > 60% then alert - if cpu usage (wait) > 75% then alert - -You can easily interpret the above configuration. The above checks are performed on local host for every monitoring cycle (which is set to 120 seconds in the Global section). If any condition is met, monit daemon will send an alert with an email. - -If certain properties do not need to be monitored for every cycle, you can use the following format. For example, this will monitor average load every other cycle (i.e., every 240 seconds). - - if loadavg (1min) > 10 for 2 cycles then alert - -### Service Configuration: SSH Service Monitoring ### - -Let's check if we have sshd binary installed in /usr/sbin/sshd: - - check file sshd_bin with path /usr/sbin/sshd - -We also want to check if the init script for sshd exist: - - check file sshd_init with path /etc/init.d/sshd - -Finally, we want to check if sshd daemon is up an running, and listens on port 22: - - check process sshd with pidfile /var/run/sshd.pid - start program "/etc/init.d/sshd start" - stop program "/etc/init.d/sshd stop" - if failed port 22 protocol ssh then restart - if 5 restarts within 5 cycles then timeout - -More specifically, we can interpret the above configuration as follows. We check if a process named sshd and a pidfile (/var/run/sshd.pid) exist. If either one does not exist, we restart sshd demon using init script. We check if a process listening on port 22 can speak SSH protocol. If not, we restart sshd daemon. If there are at least 5 restarts within the last 5 monitoring cycles (i.e., 5x120 seconds), sshd daemon is declared non-functional, and we do not try to check again. - -![](https://farm9.staticflickr.com/8685/16735725998_62c26a24bc_c.jpg) - -### Service Configuration: SMTP Service Monitoring ### - -Now let's set up a check on a remote SMTP mail server (e.g., 192.168.111.102). Let's assume that the SMTP server is running SMTP, IMAP and SSH on its LAN interface. - - check host MAIL with address 192.168.111.102 - if failed icmp type echo within 10 cycles then alert - if failed port 25 protocol smtp then alert - else if recovered then exec "/scripts/mail-script" - if failed port 22 protocol ssh then alert - if failed port 143 protocol imap then alert - -We check if the remote host responds to ICMP. If we haven't received ICMP response within 10 cycles, we send out an alert. If testing for SMTP protocol on port 25 fails, we send out an alert. If testing succeeds again after a failed test, we run a script (/scripts/mail-script). If testing for SSH and IMAP protocols fail on port 22 and 143, respectively, we send out an alert. - -### Conclusion ### - -In this tutorial, I demonstrate how to set up Monit on a local server. What I showed here is just the tip of the iceberg, as far as Monit's capabilities are concerned. Take your time and read the man page about Monit (a very good one). Monit can do a lot for any Linux admin with a very nice and easy to understand syntax. If you put together a centralized remote monitor and Monit to work for you, you will have a more reliable monitoring system. What is your thought on Monit? - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/server-monitoring-system-monit.html - -作者:[Iulian Murgulet][a] -译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/iulian -[1]:http://xmodulo.com/monitor-common-services-nagios.html -[2]:http://xmodulo.com/monitor-linux-servers-snmp-cacti.html -[3]:http://mmonit.com/monit/ -[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[5]:http://xmodulo.com/how-to-set-up-rpmforge-repoforge-repository-on-centos.html -[6]:http://xmodulo.com/mail-server-ubuntu-debian.html -[7]:http://mmonit.com/wiki/Monit/ConfigurationExamples \ No newline at end of file diff --git a/translated/tech/20150326 How to set up server monitoring system with Monit.md b/translated/tech/20150326 How to set up server monitoring system with Monit.md new file mode 100755 index 0000000000..5fbce3aa70 --- /dev/null +++ b/translated/tech/20150326 How to set up server monitoring system with Monit.md @@ -0,0 +1,250 @@ +如何使用Monit部署服务器监控系统 +================================================================================ +很多Linux系统管理员依赖一个集中式的远程监控系统(比如[Nagios][1]或者[Cacti][2])来检查他们网络基础设备的健康状况。虽然集中式监控让管理员的生活更简单了,然而处理很多机器和服务时,专用的监控中心显然成为了一个单点故障,如果监控中心挂了或者因为什么原因(比如硬件或者网络故障)不可访问了,你就会失去整个网络基础设备情况的任何信息。 + +一个给你的监控系统增加冗余度的方法是安装独立的监控软件(作为后备),至少在网络中的关键/核心服务器上。这样在集中式监控系统挂掉的情况,你还有能力通过后备的监控方式来获取核心服务器的运行状况。 + +### Monit是什么? ### + +[Monit][3]是一个跨平台的用来监控Unix/linux系统(比如Linux、BSD、OSX、Solaris)的工具。Monit特别易于安装,而且非常轻量级(只有500KB大小),并且不依赖任何第三方程序、插件或者库。然而,Monit可以胜任全面监控、进程状态监控、文件系统变动监控、邮件通知和对核心服务的自定义回调等场景。易于安装、轻量级的实现以及强大的功能,让Monit成为一个理想的后备监控工具。 + +我已经在一些机器使用Monit几年了,而且我对它的可靠性非常满意。甚至作为全面的监控系统,对任何Linux系统管理员来说Monit也是非常有用和强大的。在这篇教程中,我会展示如何在一个本地服务器部署Monit(作为后备监控系统)来监控常见的服务。在部署过程中,我只会展示我们用到的部分。 + +### 在Linux安装Monit ### + +Monit已经被包含在多数Linux发行版的软件仓库中了。 + +Debian、Ubuntu或者Linux Mint: + + $ sudo aptitude install monit + +Fedora或者CentOS/RHEL: + +在CentOS/RHEL中,你必须首先启用[EPEL][4]或者[Repoforge][5]软件仓库. + + # yum install monit + +Monit自带一个文档完善的配置文件,其中包含了很多例子。主配置文件在/etc/monit.conf(Fedora/CentOS/RHEL),或者/etc/monit/monitrc(Debian/Ubuntu/Mint)。Monit配置文件有两部分:“Global”(全局)和“Services”(服务)。 + +### Global Configuration: Web Status Page (全局配置:Web状态页面。LCTT 译注:保留原文是因为和配置文件中的字段对应) ### + +Monit可以使用邮件服务来发送通知,也可以使用HTTP/HTTPS页面来展示。我们先使用符合以下要求的web状态页面吧: + +- Monit监听1966端口。 +- 对web状态页面的访问是通过SSL加密的。 +- 使用monituser/romania作为用户名/口令登录。 +- 只允许使用localhost、myhost.mydomain.ro和在局域网内部(192.168.0.0/16)访问。 +- Monit使用pem格式的SSL证书。 + +之后的步骤,我会使用一个基于Red Hat的系统。在基于Debian的系统中的步骤也是类似的。 + +首先,在/var/cert生成一个自签名的证书(monit.pem): + + # mkdir /var/certs + # cd /etc/pki/tls/certs + # ./make-dummy-cert monit.pem + # cp monit.pem /var/certs + # chmod 0400 /var/certs/monit.pem + +现在将下列代码片段放到Monit的主配置文件中。你可以创建一个空配置文件,或者基于自带的配置文件修改。 + + set httpd port 1966 and + SSL ENABLE + PEMFILE /var/certs/monit.pem + allow monituser:romania + allow localhost + allow 192.168.0.0/16 + allow myhost.mydomain.ro + +### Global Configuration: Email Notification (全局配置:邮件通知) ### + +然后,我们来设置Monit的邮件通知。我们至少需要一个可用的[SMTP服务器][6]来让Monit发送邮件。这样就可以(按照你的实际情况修改): + +- 邮件服务器的机器名:smtp.monit.ro +- Monit使用的发件人:monit@monit.ro +- 邮件的收件人:guletz@monit.ro +- 邮件服务器使用的SMTP端口:587(默认是25) + +有了以上信息,邮件通知就可以这样配置: + + set mailserver smtp.monit.ro port 587 + set mail-format { + from: monit@monit.ro + subject: $SERVICE $EVENT at $DATE on $HOST + message: Monit $ACTION $SERVICE $EVENT at $DATE on $HOST : $DESCRIPTION. + + Yours sincerely, + Monit + + } + + set alert guletz@monit.ro + +就像你看到的,Monit会提供几个内部变量(`$DATE`、`$EVENT`、`$HOST`等),你可以按照你的需求自定义邮件内容。如果你想要从Monit所在机器发送邮件,就需要一个已经安装的与sendmail兼容的程序(如postfix或者ssmtp)。 + +### Global Configuration: Monit Daemon (全局配置:Monit守护进程)### + +接下来就该配置Monit守护进程了。可以将其设置成这样: + +- 在120秒后进行第一次检测。 +- 每3分钟检测一次服务。 +- 使用syslog来记录日志。 + +如下代码段可以满足上述需求。 + + set daemon 120 + with start delay 240 + set logfile syslog facility log_daemon + +我们必须定义“idfile”,Monit守护进程的一个独一无二的ID文件;以及“eventqueue”,当monit的邮件因为SMTP或者网络故障发不出去,邮件会暂存在这里;以及确保/var/monit路径是存在的。然后使用下边的配置就可以了。 + + set idfile /var/monit/id + set eventqueue + basedir /var/monit + +### 测试Global Configuration(全局配置) ### + +现在“Global”部分就完成了。Monit配置文件看起来像这样: + + # Global Section + + # status webpage and acl's + set httpd port 1966 and + SSL ENABLE + PEMFILE /var/certs/monit.pem + allow monituser:romania + allow localhost + allow 192.168.0.0/16 + allow myhost.mydomain.ro + + # mail-server + set mailserver smtp.monit.ro port 587 + # email-format + set mail-format { + from: monit@monit.ro + subject: $SERVICE $EVENT at $DATE on $HOST + message: Monit $ACTION $SERVICE $EVENT at $DATE on $HOST : $DESCRIPTION. + + Yours sincerely, + Monit + + } + + set alert guletz@monit.ro + + # delay checks + set daemon 120 + with start delay 240 + set logfile syslog facility log_daemon + + # idfile and mail queue path + set idfile /var/monit/id + set eventqueue + basedir /var/monit + +现在是时候验证我们的工作了,你可以通过运行如下命令来验证存在的配置文件(/etc/monit.conf): + + # monit -t + + Control file syntax OK + +如果monit提示任何错误,请再检查下配置文件。幸运的是,错误/警告信息是可以帮助你发现问题的,比如: + + monit: Cannot stat the SSL server PEM file '/var/certs/monit.pem' -- No such file or directory + /etc/monit/monitrc:10: Warning: hostname did not resolve 'smtp.monit.ro' + +一旦你确认配置文件没问题了,可以启动monit守护进程,然后等2到3分钟: + + # service monit start + +如果你使用的是systemd,运行: + + # systemctl start monit + +现在打开一个浏览器窗口,然后访问`https://:1966`。将``替换成Monit所在机器的机器名或者IP地址。 + +如果你使用的是自签名的SSL证书,你会在浏览器中看到一个警告信息。 + +![](https://farm8.staticflickr.com/7596/16737206479_96b9f7dfdb_c.jpg) + +你完成登录后,一定要看这个页面。 + +![](https://farm8.staticflickr.com/7594/16303369973_6019482dea_c.jpg) + +在这个教程的其余部分,我们演示监控一个本地服务器和常见服务的方法。你会在[官方wiki页面][7]看到很多有用的例子。其中的多数是可以直接复制粘贴的! + +### Service Configuration: CPU/Memory Monitoring (服务配置:CPU、内存监控) ### + +我们先来监控本地服务器的CPU、内存占用。复制如下代码段到配置文件中。 + + check system localhost + if loadavg (1min) > 10 then alert + if loadavg (5min) > 6 then alert + if memory usage > 75% then alert + if cpu usage (user) > 70% then alert + if cpu usage (system) > 60% then alert + if cpu usage (wait) > 75% then alert + +你可以很容易理解上边的配置。最上边的check是指每个监控周期(全局配置里设置的120秒)都对本机进行下面的操作。如果满足了任何条件,monit守护进程就会使用邮件发送一条报警。 + +如果某个监控项不需要每个周期都检查,可以使用如下格式,它会每240秒检查一次平均负载。 + + if loadavg (1min) > 10 for 2 cycles then alert + +### Service Configuration: SSH Service Monitoring (服务配置:SSH服务监控) ### + +先检查我们的sshd是否安装在/usr/sbin/sshd: + + check file sshd_bin with path /usr/sbin/sshd + +我们还想检查sshd的启动脚本是否存在: + + check file sshd_init with path /etc/init.d/sshd + +最后,我们还想检查sshd守护进程是否存活,并且在监听22端口: + + check process sshd with pidfile /var/run/sshd.pid + start program "/etc/init.d/sshd start" + stop program "/etc/init.d/sshd stop" + if failed port 22 protocol ssh then restart + if 5 restarts within 5 cycles then timeout + +我们可以这样解释上述配置。我们检查是否存在名为sshd的进程,并且有一个保存pid的文件存在(/var/run/sshd.pid)。如果任何一个不存在,我们就使用启动脚本重启sshd。我们检查是否有进程在监听22端口,并且使用的是SSH协议。如果没有,我们还是重启sshd。如果在最近的5个监控周期(5x120秒)至少重启5次了,sshd就被认为是不能用的,我们就不再检查了。 + +![](https://farm9.staticflickr.com/8685/16735725998_62c26a24bc_c.jpg) + +### Service Configuration: SMTP Service Monitoring (服务配置:SMTP服务监控) ### + +现在我们来设置一个检查远程SMTP服务器(如192.168.111.102)的监控。假定SMTP服务器运行着SMTP、IMAP、SSH服务。 + + check host MAIL with address 192.168.111.102 + if failed icmp type echo within 10 cycles then alert + if failed port 25 protocol smtp then alert + else if recovered then exec "/scripts/mail-script" + if failed port 22 protocol ssh then alert + if failed port 143 protocol imap then alert + +我们检查远程主机是否响应ICMP协议。如果我们在10个周期内没有收到ICMP回应,就发送一条报警。如果监测到25端口上的SMTP协议是异常的,就发送一条报警。如果在一次监测失败后又监测成功了,就运行一个脚本(/scripts/mail-script)。如果检查22端口上的SSH或者143端口上的IMAP协议不正常,同样发送报警。 + +### 总结 ### + +在这个教程,我演示了如何在本地服务器设置Monit,当然这只是Monit功能的冰山一角。你可以花些时间阅读Monit的man手册(写得很好)。Monit可以为任何Linux系统管理员做很多事情,并且具有非常优美和易于理解的语法。如果你将一个集中式的远程监控系统和Monit一同使用,你会得到一个更可靠的监控系统。你感觉Monit怎么样? + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/server-monitoring-system-monit.html + +作者:[Iulian Murgulet][a] +译者:[goreliu](https://github.com/goreliu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/iulian +[1]:http://xmodulo.com/monitor-common-services-nagios.html +[2]:http://xmodulo.com/monitor-linux-servers-snmp-cacti.html +[3]:http://mmonit.com/monit/ +[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[5]:http://xmodulo.com/how-to-set-up-rpmforge-repoforge-repository-on-centos.html +[6]:http://xmodulo.com/mail-server-ubuntu-debian.html +[7]:http://mmonit.com/wiki/Monit/ConfigurationExamples \ No newline at end of file From c573ac00465672e9d3941cca63515246468be8ac Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 21 May 2015 22:34:34 +0800 Subject: [PATCH 0917/2517] PUB:20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1 @goreliu --- ...d Line Tips and Tricks in Linux--Part 1.md | 55 ++++++++++++------- 1 file changed, 36 insertions(+), 19 deletions(-) rename {translated/tech => published}/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md (69%) diff --git a/translated/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md b/published/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md similarity index 69% rename from translated/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md rename to published/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md index 6bf88dba2c..9344d8c482 100644 --- a/translated/tech/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md +++ b/published/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md @@ -1,18 +1,22 @@ -5个有趣的Linux命令行技巧(第一部分) +5个有趣的Linux命令行技巧 ================================================================================ 你有将Linux物尽其用吗?对很多Linux用户来说,有很多看起来是技巧的有用特性。有些时候你会需要这些技巧。本文会帮助你更好得使用一些命令,发挥其更强大的功能。 ![5个命令行技巧](http://www.tecmint.com/wp-content/uploads/2015/03/5-Command-Line-Tips.jpg) -图1:5个命令行技巧 + +*图1:5个命令行技巧* 我们开始一个新的系列,在这里我们还会写一些技巧,并且用尽量小的篇幅写清楚。 -### 1. 我们可以使用[`history`命令][1]来查看曾经运行过的命令。这里是一个`history`命令的示例输出。 ### +### 1. 我们可以使用[`history`命令][1]来查看曾经运行过的命令。 ### + +这里是一个`history`命令的示例输出。 # history ![history命令例子](http://www.tecmint.com/wp-content/uploads/2015/03/history-command.gif) -图2:history命令例子 + +*图2:history命令例子* 从`history`命令输出看,很明显,命令的执行时间没有被打出来。有解决方法吗?有的!运行如下命令: @@ -39,32 +43,39 @@ - .bashrc – BASH以交互方式启动时运行的脚本文件 ![history命令输出的日志](http://www.tecmint.com/wp-content/uploads/2015/03/History-Command-Logs.gif) -图3:`history`命令输出的日志 + +*图3:`history`命令输出的日志* -### 2. 如何测试磁盘写入速度?一行`dd`命令脚本就可以实现。### +### 2. 如何测试磁盘写入速度?### + +一行`dd`命令脚本就可以实现。 # dd if=/dev/zero of=/tmp/output.img bs=8k count=256k conv=fdatasync; rm -rf /tmp/output.img ![dd命令例子](http://www.tecmint.com/wp-content/uploads/2015/03/dd-Command-Example.gif) -图4:`dd`命令例子 + +*图4:`dd`命令例子* 命令和选项的解释: - dd – 转换和复制文件 - if=/dev/zero – 指定输入文件,默认为stdin(标准输入) - of=/tmp/output.img – 指定输出文件,默认为stdout(标准输出) -- bs – 一次读和写的大小,最大可以以MB为单位 +- bs – 一次读和写的块大小,最大可以以MB为单位 - count – 复制次数 - conv – 使用逗号分隔的策略来转换文件(LCTT 译注:比如将大写字母转换成小写,echo AA | dd conv=lcase) - rm – 删除文件和目录 - -rf – (-r) 递归地删除目录和其中的内容,(-f)强行删除而不输出确认信息 -### 3. 你如何获取吃掉你磁盘空间的最大的6个文件?一个使用[`du`命令][2]的简单单行脚本即可实现,`du`命令主要用于获取文件的空间使用情况。### +### 3. 你如何获取吃掉你磁盘空间的最大的6个文件?### + +一个使用[`du`命令][2]的简单单行脚本即可实现,`du`命令主要用于获取文件的空间使用情况。 # du -hsx * | sort -rh | head -6 ![获取磁盘空间使用情况的方法](http://www.tecmint.com/wp-content/uploads/2015/03/check-disk-space-usage.gif) -图5:获取磁盘空间使用情况的方法 + +*图5:获取磁盘空间使用情况的方法* 命令和选项的解释: @@ -74,19 +85,25 @@ - -rf – (-r)将比较的结果逆序输出,(-f)忽略大小写 - head – 输出文件的头几行 -### 4. 获取一个文件的详细状态信息,可以使用`stat`命令。 ### +### 4. 获取一个文件的详细状态信息### + +可以使用`stat`命令 # stat filename_ext (例如:stat abc.pdf) ![获取文件的详细信息](http://www.tecmint.com/wp-content/uploads/2015/03/Check-File-Statistics.gif) -图6:获取文件的详细信息 + +*图6:获取文件的详细信息* -### 5. 最后一个技巧是为那些入门者准备的,如果你是有经验的用户,可能不需要它,除非你想从中寻找乐趣。入门者可能有Linux命令行恐惧症,下面的命令会随机显示一个man手册页。对入门者来说,好处是总会学到新的东西,而且不会厌倦。 ### +### 5. 显示帮助 ### + +最后一个技巧是为那些入门者准备的,如果你是有经验的用户,可能不需要它,除非你想从中寻找乐趣。入门者可能有Linux命令行恐惧症,下面的命令会随机显示一个man手册页。对入门者来说,好处是总会学到新的东西,而且不会厌倦。 # man $(ls /bin | shuf | head -1) -![查看随机的man手册页](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Man-Pages.gif) -图7:查看随机的man手册页 +![查看随机的man手册页](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Man-Pages.gif) + +*图7:查看随机的man手册页* 命令和选项的解释: @@ -96,9 +113,9 @@ - shuf – 把输入内容按行随机打乱并输出 - head – 输出文件的头几行 -这就是所有的内容了。如果你知道任何类似的技巧,可以分享给我们,我们会用你的语言在Tecmint.com网站上发表出来。 +这就是所有的内容了。如果你知道任何类似的技巧,可以分享给我们,我们会用你的语言在网站上发表出来。 -如果你想分享任何技巧,但不想写成文章,可以发到tecmint[dot]com[at]gmail[dot]com,我们会将其包含在我们的文章中。不要忘记在下边评论框中留下有价值的反馈。保持联系。可以点赞或者将本文分享来帮助我们更好地传播内容。 +不要忘记在下边评论框中留下有价值的反馈。保持联系。可以点赞或者将本文分享来帮助我们更好地传播内容。 -------------------------------------------------------------------------------- @@ -106,10 +123,10 @@ via: http://www.tecmint.com/5-linux-command-line-tricks/ 作者:[Avishek Kumar][a] 译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/history-command-examples/ +[1]:https://linux.cn/article-1143-1.html [2]:http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ \ No newline at end of file From 92e6fbd286a1b9e853ece25467d852550a14fb42 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 21 May 2015 22:51:25 +0800 Subject: [PATCH 0918/2517] PUB:20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux @FSSlc --- ...pt or Decrypt Random Passwords in Linux.md | 52 +++++++++++-------- 1 file changed, 29 insertions(+), 23 deletions(-) rename {translated/tech => published}/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md (70%) diff --git a/translated/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md b/published/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md similarity index 70% rename from translated/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md rename to published/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md index dcb675d782..b4023b5162 100644 --- a/translated/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md +++ b/published/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md @@ -2,42 +2,45 @@ ================================================================================ 我们一直积极地提供有关 Linux 技巧的系列文章,如果你错过了这个系列的最新文章,你或许可以去访问下面的链接。 -注:此篇文章做过原文 -- [Linux 中 5 个有趣的命令行技巧][1] (注:这篇文章还没有被翻译,在 20150316 选的题) +- [Linux 中 5 个有趣的命令行技巧][1] 在这篇文章中,我们将分享一些有趣 Linux 技巧,内容是有关如何产生随机密码以及加密或解密这些经过加盐或没有加盐处理的密码。 安全是数字时代中的一个主要话题。在电脑,email,云端,手机,文档和其他的场合中,我们都会使用到密码。众所周知,选择密码的基本原则是 “易记,难猜”。考虑过使用基于机器自动生成的密码吗?相信我,Linux 非常擅长这方面的工作。 -**1. 使用命令 `pwgen` 来生成一个长度为 10 个字符的唯一的随机密码。假如你还没有安装 pwgen,请使用 Apt 或 YUM 等包管理器来安装它。** +**1. 使用命令 `pwgen` 来生成一个长度为 10 个字符的独特的随机密码。假如你还没有安装 pwgen,请使用 Apt 或 YUM 等包管理器来安装它。** $ pwgen 10 1 -![生成一个唯一的随机密码](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Unique-Password-in-Linux.gif) -生成一个唯一的随机密码 +![生成一个独特的随机密码](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Unique-Password-in-Linux.gif) + +*生成一个独特的随机密码* 一口气生成若干组长度为 50 个字符的唯一的随机密码! $ pwgen 50 ![生成多组随机密码](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Multiple-Random-Passwords.gif) -生成多组随机密码 -**2. 你还可以使用 `makepasswd` 来每次生成一个给定长度的唯一的随机密码。在你把玩 makepasswd 命令之前,请确保你已经安装了它。如若没有安装它,试试使用 Apt 或 YUM 包管理器来安装 `makepasswd`这个软件包。** +*生成多组随机密码* + +**2. 你还可以使用 `makepasswd` 来每次生成一个给定长度的独特的随机密码。在你把玩 makepasswd 命令之前,请确保你已经安装了它。如若没有安装它,试试使用 Apt 或 YUM 包管理器来安装 `makepasswd`这个软件包。** 生成一个长度为 10 个字符的随机密码。该命令产生的密码的长度默认为 10。 $ makepasswd -![使用 makepasswd 生成唯一的密码](http://www.tecmint.com/wp-content/uploads/2015/03/mkpasswd-generate-unique-password.gif) -使用 makepasswd 生成唯一的密码 +![使用 makepasswd 生成独特的密码](http://www.tecmint.com/wp-content/uploads/2015/03/mkpasswd-generate-unique-password.gif) + +*使用 makepasswd 生成独特的密码* 生成一个长度为 50 个字符的随机密码。 $ makepasswd --char 50 ![生成长度为 50 的密码](http://www.tecmint.com/wp-content/uploads/2015/03/Random-Password-Generate.gif) -生成长度为 50 的密码 + +*生成长度为 50 的密码* 生成 7 个长度为 20 个字符的随机密码。 @@ -47,9 +50,7 @@ **3. 使用带“盐”的 Crypt(注:这里应该指的是一个函数,可以参考[这里](http://man7.org/linux/man-pages/man3/crypt.3.html) ) 来加密一个密码。提供手动或自动添加 “盐”。** -对于那些不清楚 **盐** 的意义的人, - -这里的 “盐” 指的是一个随机数据,它作为密码生成函数的一个额外的输入, 目的是保护密码免受词典攻击。 +对于那些不清楚 **盐** 的意义的人,这里的 “盐” 指的是一个随机数据,它作为密码生成函数的一个额外的输入, 目的是保护密码免受词典攻击。 在执行下面的操作前,请确保你已经安装了 `mkpasswd`。 @@ -58,46 +59,51 @@ $ mkpasswd tecmint ![使用 Crypt 来加密密码](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-in-Linux.gif) -使用 Crypt 来加密密码 + +*使用 Crypt 来加密密码* 现在让我们来手动定义 “盐” 的值。每次它将产生相同的结果。请注意你可以输入任何你想输入的值来作为 “盐” 的值。 $ mkpasswd tecmint -s tt ![带“盐”加密密码](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-Using-Salt.gif) -带“盐”加密密码 + +*带“盐”加密密码* 另外, mkpasswd 还是交互式的,假如你在命令中没有提供密码,它将主动询问你来输入密码。 -**4. 使用 aes-256-cbc 加密算法并使用密码(如 “tecmint”) 并带“盐” 加密一个字符串(如 “Tecmint-is-a-Linux-Community”)。** +**4. 使用 aes-256-cbc 加密算法并使用带“盐”的密码(如 “tecmint”) 加密一个字符串(如 “Tecmint-is-a-Linux-Community”)。** # echo Tecmint-is-a-Linux-Community | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint ![在 Linux 中加密一个字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-A-String-in-Linux.gif) -在 Linux 中加密一个字符串 -在上面例子中, [echo 命令][2](注:此篇原文也做过,这里是链接 http://linux.cn/article-3948-1.html) 的输出通过管道传递给了 openssl 命令,使得该输出被 Cipher(enc) 所加密,这个过程中使用了 aes-256-cbc 加密算法,并附带了密码 (tecmint) 和 “盐” 。 +*在 Linux 中加密一个字符串* + +在上面例子中, [echo 命令][2]的输出通过管道传递给了 openssl 命令,使得该输出通过加密编码方式(enc:Encoding with Cipher ) 所加密,这个过程中使用了 aes-256-cbc 加密算法,并附带了密码 (tecmint) 和 “盐” 。 **5. 使用 openssl 命令的 -aes-256-cbc 解密选项来解密上面的字符串。** # echo U2FsdGVkX18Zgoc+dfAdpIK58JbcEYFdJBPMINU91DKPeVVrU2k9oXWsgpvpdO/Z | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint ![在 Linux 中解密字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Decrypt-String-in-Linux.gif) -在 Linux 中解密字符串 -现在就是这些内容了。假如你知道任何这类的技巧,请将你的技巧发送到 admin@tecmint.com 邮箱中,你的技巧将会以你的名义来发表,同时我们也将在我们将来的文章中把它包含进去。 +*在 Linux 中解密字符串* + +现在就是这些内容了。 保持联系,保持连接,敬请关注。不要忘了在下面的评论中提供给我们您有价值的反馈。 + -------------------------------------------------------------------------------- via: http://www.tecmint.com/generate-encrypt-decrypt-random-passwords-in-linux/ 作者:[Avishek Kumar][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/5-linux-command-line-tricks/ -[2]:http://www.tecmint.com/echo-command-in-linux/ \ No newline at end of file +[1]:https://linux.cn/article-5485-1.html +[2]:http://linux.cn/article-3948-1.html \ No newline at end of file From 5d7da8621eec99832b6dd3129d58d64a85b91155 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 21 May 2015 23:03:34 +0800 Subject: [PATCH 0919/2517] PUB:20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server @GOLinux --- ...pecific user agents on nginx web server.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md (75%) diff --git a/translated/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md b/published/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md similarity index 75% rename from translated/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md rename to published/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md index 89a94cfbeb..16bc2060fb 100644 --- a/translated/tech/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md +++ b/published/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md @@ -1,6 +1,6 @@ -Linux有问必答——nginx网络服务器上如何阻挡特定用户代理 +Linux有问必答:nginx网络服务器上如何阻止特定用户代理(UA) ================================================================================ -> **问题**: 我注意到有一些机器人经常访问我nginx驱动的网站,并且进行一些攻击性的扫描,导致消耗掉了我的网络服务器的大量资源。我一直尝试着通过用户代理符串来阻挡这些机器人。我怎样才能在nginx网络服务器上阻挡掉特定的用户代理呢? +> **问题**: 我注意到有一些机器人经常访问我的nginx驱动的网站,并且进行一些攻击性的扫描,导致消耗掉了我的网络服务器的大量资源。我一直尝试着通过用户代理符串来阻挡这些机器人。我怎样才能在nginx网络服务器上阻挡掉特定的用户代理呢? 现代互联网滋生了大量各种各样的恶意机器人和网络爬虫,比如像恶意软件机器人、垃圾邮件程序或内容刮刀,这些恶意工具一直偷偷摸摸地扫描你的网站,干些诸如检测潜在网站漏洞、收获电子邮件地址,或者只是从你的网站偷取内容。大多数机器人能够通过它们的“用户代理”签名字符串来识别。 @@ -10,7 +10,7 @@ Linux有问必答——nginx网络服务器上如何阻挡特定用户代理 ### 在Nginx中将特定用户代理列入黑名单 ### -要配置用户代理阻挡列表,请打开你的网站的nginx配置文件,找到服务器定义部分。该文件可能会放在不同的地方,这取决于你的nginx配置或Linux版本(如,/etc/nginx/nginx.conf,/etc/nginx/sites-enabled/,/usr/local/nginx/conf/nginx.conf,/etc/nginx/conf.d/)。 +要配置用户代理阻挡列表,请打开你的网站的nginx配置文件,找到`server`定义部分。该文件可能会放在不同的地方,这取决于你的nginx配置或Linux版本(如,`/etc/nginx/nginx.conf`,`/etc/nginx/sites-enabled/`,`/usr/local/nginx/conf/nginx.conf`,`/etc/nginx/conf.d/`)。 server { listen 80 default_server; @@ -20,19 +20,19 @@ Linux有问必答——nginx网络服务器上如何阻挡特定用户代理 .... } -在打开该配置文件并找到 server 部分后,添加以下 if 声明到该部分内的某个地方。 +在打开该配置文件并找到 `server` 部分后,添加以下 if 声明到该部分内的某个地方。 server { listen 80 default_server; server_name xmodulo.com; root /usr/share/nginx/html; - # case sensitive matching + # 大小写敏感的匹配 if ($http_user_agent ~ (Antivirx|Arian) { return 403; } - # case insensitive matching + #大小写无关的匹配 if ($http_user_agent ~* (netcrawl|npbot|malicious)) { return 403; } @@ -41,7 +41,7 @@ Linux有问必答——nginx网络服务器上如何阻挡特定用户代理 } 如你所想,这些 if 声明使用正则表达式匹配了任意不良用户字符串,并向匹配的对象返回403 HTTP状态码。 -$http_user_agent是HTTP请求的一个包含有用户代理字符串的变量。‘~’操作符针对用户代理字符串进行大小写敏感匹配,而‘~*’操作符则进行大小写不敏感匹配。‘|’操作符是逻辑或,因此,你可以在 if 声明中放入众多的用户代理关键字,然后将它们全部阻挡掉。 +`$http_user_agent`是HTTP请求中的一个包含有用户代理字符串的变量。‘~’操作符针对用户代理字符串进行大小写敏感匹配,而‘~*’操作符则进行大小写无关匹配。‘|’操作符是逻辑或,因此,你可以在 if 声明中放入众多的用户代理关键字,然后将它们全部阻挡掉。 在修改配置文件后,你必须重新加载nginx以激活阻挡: @@ -55,7 +55,7 @@ $http_user_agent是HTTP请求的一个包含有用户代理字符串的变量。 ### 管理Nginx中的用户代理黑名单 ### -目前为止,我已经展示了在nginx中如何阻挡一些用户代理的HTTP请求。如果你有学多不同类型的网络爬虫机器人要阻挡,又该怎么办呢? +目前为止,我已经展示了在nginx中如何阻挡一些用户代理的HTTP请求。如果你有许多不同类型的网络爬虫机器人要阻挡,又该怎么办呢? 由于用户代理黑名单会增长得很大,所以将它们放在nginx的server部分不是个好点子。取而代之的是,你可以创建一个独立的文件,在该文件中列出所有被阻挡的用户代理。例如,让我们创建/etc/nginx/useragent.rules,并定义以下面的格式定义所有被阻挡的用户代理的图谱。 @@ -100,7 +100,7 @@ $http_user_agent是HTTP请求的一个包含有用户代理字符串的变量。 $ sudo /path/to/nginx -s reload -现在,任何包含有/etc/nginx/useragent.rules中列出的关键字的用户代理将被nginx自动禁止。 +现在,任何包含有`/etc/nginx/useragent.rules`中列出的关键字的用户代理将被nginx自动禁止。 -------------------------------------------------------------------------------- @@ -108,7 +108,7 @@ via: http://ask.xmodulo.com/block-specific-user-agents-nginx-web-server.html 作者:[Dan Nanni][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From eb9234e144019bdb20eecbccd2d50a898f64ff08 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 22 May 2015 00:31:17 +0800 Subject: [PATCH 0920/2517] PUB:20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS @wi-cuckoo --- ...sed--How to Upgrade on Fedora or CentOS.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) rename {translated/tech => published}/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md (64%) diff --git a/translated/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md b/published/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md similarity index 64% rename from translated/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md rename to published/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md index a07ecad986..6b6141211f 100644 --- a/translated/tech/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md +++ b/published/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md @@ -1,22 +1,22 @@ -Docker 1.6 发布 - 如何在Fedora / CentOS上面升级 +如何在Fedora / CentOS上面升级Docker 1.6 ============================================================================= -Docker,一个为软件打包的流行开源容器平台,有了新的发行版1.6,增加了许多新的特性。该版本在Docker注册,引擎,云集,组合和机器方面都有更新。这次发行旨在提升体验,开发者和系统管理员的经验(这里不太确定)。让我们来快速看看有哪些新特性吧。 +Docker,一个流行的将软件打包的开源容器平台,已经有了新的1.6版,增加了许多新的特性。该版本主要更新了Docker Registry、Engine、 Swarm、 Compose 和 Machine等方面。这次发布旨在提升性能、改善开发者和系统管理员的体验。让我们来快速看看有哪些新特性吧。 -**Docker Registry (2.0)**是一项推送Docker镜像用于存储和分享的服务,经历过架构的改变,因为面临加载下的体验问题。它仍然向下兼容。Docker Registry的编写语言现在从Python改为Google的Go语言了,为了提升表现力。与Docker引擎1.6结合后,拉取镜像的能力更快了。早先的镜像被队列式地输送,而现在是并行的啦。 +**Docker Registry (2.0)**是一项推送Docker镜像用于存储和分享的服务,因为面临加载下的体验问题而经历了架构的改变。它仍然向后兼容。Docker Registry的编写语言现在从Python改为Google的Go语言了,以提升性能。与Docker Engine 1.6结合后,拉取镜像的能力更快了。早先的镜像是队列式输送的,而现在是并行的啦。 -**Docker Engine (1.6)**相比之前的版本有很大的提高。目前支持容器与镜像标签。通过标签,你可以附加用户自定义的元数据到镜像和容器上,而镜像和容器反过来可以被其他工具使用。标签对正在运行的应用是不可见的,可以用来加速搜索容器和镜像。 +**Docker Engine (1.6)**相比之前的版本有很大的提高。目前支持容器与镜像的标签。通过标签,你可以附加用户自定义的元数据到镜像和容器上,而镜像和容器反过来可以被其他工具使用。标签对正在运行的应用是不可见的,可以用来加速搜索容器和镜像。 -Windows版本的Docker客户端可以连接一个远程的运行linux的Docker引擎。 +Windows版本的Docker客户端可以连接到远程的运行在linux上的Docker Engine。 Docker目前支持日志驱动API,这允许我们发送容器日志给系统如Syslog,或者第三方。这将会使得系统管理员受益。 -**Swarm (0.2)**是一个Docker集群工具,将一个Docker主机池转换为一个虚拟主机。在新特性里,容器甚至被放在了可用的节点上。通过添加更多的Docker命令,所有的努力都朝着支持完整的Docker API。将来,使用第三方驱动来集群会成为可能。 +**Swarm (0.2)**是一个Docker集群工具,可以将一个Docker主机池转换为一个虚拟主机。在新特性里,容器甚至被放在了可用的节点上。通过添加更多的Docker命令,努力支持完整的Docker API。将来,使用第三方驱动来集群会成为可能。 -**Compose (1.2)** 是一个Docker里定义和运行复杂应用的工具, 也得到了升级。在新版本里,一个可以创建多个子文件,而不是一个没有结构的文件描述一个多容器应用。 +**Compose (1.2)** 是一个Docker里定义和运行复杂应用的工具, 也得到了升级。在新版本里,可以创建多个子文件,而不是用一个没有结构的文件描述一个多容器应用。 -通过**Machine (0.2)**,我们可以很容易地在本地计算机,云和数据中心上搭建Docker主机。新的发行版为开发者提供了一个相对干净地驱动界面来写驱动。供应被Machine牢牢地掌握,而不是每个独立的驱动。新的命令被添加,可以用来生成主机的TLS证书,以提高安全性。 +通过**Machine (0.2)**,我们可以很容易地在本地计算机、云和数据中心上搭建Docker主机。新的发布版本为开发者提供了一个相对干净地驱动界面来编写驱动。Machine集中控制供给,而不是每个独立的驱动。增加了新的命令,可以用来生成主机的TLS证书,以提高安全性。 -### 在Fedora / CentOS 上升级架构 ### +### 在Fedora / CentOS 上的升级指导 ### 在这一部分里,我们将会学习如何在Fedora和CentOS上升级已有的docker到最新版本。请注意,目前的Docker仅运行在64位的架构上,Fedora和CentOS都源于RedHat,命令的使用是差不多相同的,除了在Fedora20和CentOS6.5里Docker包被叫做“docker-io”。 @@ -28,7 +28,7 @@ Docker目前支持日志驱动API,这允许我们发送容器日志给系统 在升级之前,备份一下docker镜像和容器卷是个不错的主意。 -参考[filesystem to a tar archive][1]与[volumes backups, restores or migrations options][2],获取更多信息。 +参考[“将文件系统打成 tar 包”][1]与[“卷备份、恢复或迁移”][2],获取更多信息。 目前,测试系统安装了Docker1.5。样例输出显示是来自一个Fedora20的系统。 @@ -42,7 +42,7 @@ Docker目前支持日志驱动API,这允许我们发送容器日志给系统 [root@TestNode1 ~]# sudo systemctl stop docker -升级到最新版使用yum update。但是写这篇文章的时候,仓库并不是最新版本(1.6)。因此你需要使用二进制的升级方法。 +使用yum update升级到最新版,但是写这篇文章的时候,仓库并不是最新版本(1.6),因此你需要使用二进制的升级方法。 [root@TestNode1 ~]#sudo yum -y update docker-io @@ -66,7 +66,7 @@ Docker目前支持日志驱动API,这允许我们发送容器日志给系统 2015-04-19 13:40:50 (8.72 MB/s) - /usr/bin/docker saved -检查更新版本 +检查更新后的版本 [root@TestNode1 ~]#sudo docker -v @@ -88,7 +88,7 @@ Docker目前支持日志驱动API,这允许我们发送容器日志给系统 Hello World -CentOS安装时需要**注意**,在CentOS上安装完Docker后,当你试图启动Docker服务的时候,你可能会得到错误的信息,如下所示 +CentOS安装时需要**注意**,在CentOS上安装完Docker后,当你试图启动Docker服务的时候,你可能会得到错误的信息,如下所示: docker.service - Docker Application Container Engine @@ -116,7 +116,7 @@ CentOS安装时需要**注意**,在CentOS上安装完Docker后,当你试图 Apr 20 03:24:24 centos7 systemd[1]: Unit docker.service entered failed state. -这是一个熟知的bug([https://bugzilla.redhat.com/show_bug.cgi?id=1207839][3]),需要一个设备映射的升级,到最新的水平。 +这是一个已知的bug([https://bugzilla.redhat.com/show_bug.cgi?id=1207839][3]),需要将设备映射升级到最新。 [root@centos7 ~]# rpm -qa device-mapper @@ -132,7 +132,7 @@ CentOS安装时需要**注意**,在CentOS上安装完Docker后,当你试图 ### 总结 ### -尽管docker技术出现时间不长,当很快获得了流行。它使得开发者的生活变得容易,运维团队可以快速独立地创建和部署应用。通过公司发布快速的Docker更新,来提升产品质量,满足用户需求,未来对于Docker来说一片光明。 +尽管docker技术出现时间不长,但很快就变得非常流行了。它使得开发者的生活变得轻松,运维团队可以快速独立地创建和部署应用。通过该公司的发布,Docker的快速更新,产品质量的提升,满足用户需求,未来对于Docker来说一片光明。 -------------------------------------------------------------------------------- @@ -140,7 +140,7 @@ via: http://linoxide.com/linux-how-to/docker-1-6-features-upgrade-fedora-centos/ 作者:[B N Poornima][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 0d466bf52984661356b718820844073d24257920 Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 22 May 2015 07:58:56 +0800 Subject: [PATCH 0921/2517] Update 20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md --- ...DNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md b/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md index e8974ba386..e9cef0f5f3 100644 --- a/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md +++ b/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to Install and Configure ‘PowerDNS’ (with MariaDB) and ‘PowerAdmin’ in RHEL/CentOS 7 ================================================================================ PowerDNS is a DNS server running on many Linux/Unix derivatives. It can be configured with different backends including BIND style zone files, relational databases or load balancing/failover algorithms. It can also be setup as a DNS recursor running as a separate process on the server. @@ -420,4 +421,4 @@ via: http://www.tecmint.com/install-powerdns-poweradmin-mariadb-in-centos-rhel/ [a]:http://www.tecmint.com/author/marintodorov89/ [1]:http://downloads.powerdns.com/documentation/html/index.html [2]:http://www.tecmint.com/install-lamp-in-centos-7/ -[3]:https://github.com/poweradmin/poweradmin/wiki/Documentation \ No newline at end of file +[3]:https://github.com/poweradmin/poweradmin/wiki/Documentation From d6ee31b35c37ff1cffa2727e771fb9817e28249c Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 22 May 2015 10:31:01 +0800 Subject: [PATCH 0922/2517] [Translated]20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md --- ...B) and 'PowerAdmin' in RHEL or CentOS 7.md | 228 +++++++++--------- 1 file changed, 113 insertions(+), 115 deletions(-) rename {sources => translated}/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md (52%) diff --git a/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md b/translated/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md similarity index 52% rename from sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md rename to translated/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md index e9cef0f5f3..0f7bc3d62f 100644 --- a/sources/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md +++ b/translated/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md @@ -1,46 +1,44 @@ -Translating by GOLinux! -How to Install and Configure ‘PowerDNS’ (with MariaDB) and ‘PowerAdmin’ in RHEL/CentOS 7 +RHEL/CentOS 7中安装并配置‘PowerDNS’(与MariaDB搭配)和‘PowerAdmin’ ================================================================================ -PowerDNS is a DNS server running on many Linux/Unix derivatives. It can be configured with different backends including BIND style zone files, relational databases or load balancing/failover algorithms. It can also be setup as a DNS recursor running as a separate process on the server. +PowerDNS是一个运行在许多Linux/Unix衍生版上的DNS服务器,它可以使用不同的后端进行配置,包括BIND类型的区域文件、相关的数据库,或者负载均衡/失效转移算法。它也可以被配置成一台DNS递归器,作为服务器上的一个独立进程运行。 -The latest version of PowerDNS Authoritative server is 3.4.4, but the one available in the EPEL repository right now is 3.4.3. I would recommend installing the one for the EPEL repository due to the fact that this version is tested in CentOS and Fedora. That way you will also be able to easily update PowerDNS in future. +PowerDNS授权服务器的最新版本是3.4.4,但是当前EPEL仓库中可以获得的版本是3.4.3。我推荐安装EPEL仓库中提供的那一个,因为该版本已经在CentOS和Fedora中测试过。那样,你也可以在今后很容易地更新PowerDNS。 -This article intends to show you how to install and setup master PowerDNS server with a MariaDB backend and the PowerAdmin – a friendly web interface managing tool for PowerDNS. +本文倾向于向你演示如何安装并配置以MariaDB作为后端的PowerDNS和 +出于本文的写作目的,我将使用以下服务器: -For the purpose of this article I will be using server with: + 主机名: centos7.localhost + IP地址: 192.168.0.102 - Hostname: centos7.localhost - IP Address 192.168.0.102 +### 步骤 1: 安装带有MariaDB后端的PowerDNS ### -### Step 1: Installing PowerDNS with MariaDB Backend ### - -#### 1. First you need to enable the EPEL repository for your server simply use: #### +#### 1. 首先,你需要为你的系统启用EPEL仓库,只需使用: #### # yum install epel-release.noarch ![Enable Epel Repository](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Epel-Repository.png) -Enable Epel Repository +启用Epel仓库 -#### 2. The next step is to install the MariaDB server. This can be easily done by running the following command: #### +#### 2. 下一步是安装MariaDB服务器。运行以下命令即可达成: #### # yum -y install mariadb-server mariadb ![Install MariaDB Server](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Server.png) -Install MariaDB Server +安装MariaDB服务器 -#### 3. Next we will configure MySQL to enable and start upon system boot: #### +#### 3. 接下来,我们将配置并启用MySQL,并设置开机启动: #### # systemctl enable mariadb.service # systemctl start mariadb.service ![Enable Start MariaDB System Boot](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Start-MariaDB-System-Boot.png) -Enable Start MariaDB System Boot +启用MariaDB开机启动 -#### 4. Now that the MySQL service is running, we will secure and setup a password for MariaDB by running: #### +#### 4. 由于MySQL服务正在运行,我们将为MariaDB设置密码进行安全加固,运行以下命令: #### # mysql_secure_installation -#### Follow Instructions #### +#### 按照指示做 #### /bin/mysql_secure_installation: line 379: find_mysql_client: command not found @@ -104,33 +102,33 @@ Enable Start MariaDB System Boot Thanks for using MariaDB! -#### 5. Once MariaDB configuration done successfully, we can proceed further with the installation of PowerDNS. This is easily completed by running: #### +#### 5. MariaDB配置成功后,我们可以继续去安装PowerDNS。运行以下命令即可轻易完成: #### # yum -y install pdns pdns-backend-mysql ![Install PowerDNS with MariaDB Backend](http://www.tecmint.com/wp-content/uploads/2015/04/Install-PowerDNS-with-MariaDB-Backend.png) -Install PowerDNS with MariaDB Backend +安装带有MariaDB后端的PowerDNS -#### 6. The configuration file for PowerDNS is located in `/etc/pdns/pdns`, but before editing it, we will setup a MySQL database for PowerDNS service. First we will connect to the MySQL server and will create a database with name powerdns: #### +#### 6. PowerDNS的配置文件位于`/etc/pdns/pdns`,在编辑之前,我们将为PowerDNS服务配置一个MySQL数据库。首先,我们将连接到MySQL服务器并创建一个名为powerdns的数据库: #### # mysql -u root -p MariaDB [(none)]> CREATE DATABASE powerdns; ![Create PowerDNS Database](http://www.tecmint.com/wp-content/uploads/2015/04/Create-PowerDNS-Database.png) -Create PowerDNS Database +创建PowerDNS数据库 -#### 7. Next, we will create a database user called powerdns: #### +#### 7. 接下来,我们将创建一个名为powerdns的数据库用户: #### MariaDB [(none)]> GRANT ALL ON powerdns.* TO 'powerdns'@'localhost' IDENTIFIED BY ‘tecmint123’; MariaDB [(none)]> GRANT ALL ON powerdns.* TO 'powerdns'@'centos7.localdomain' IDENTIFIED BY 'tecmint123'; MariaDB [(none)]> FLUSH PRIVILEGES; ![Create PowerDNS User](http://www.tecmint.com/wp-content/uploads/2015/04/Create-PowerDNS-User.png) -Create PowerDNS User +创建PowerDNS用户 -**Note**: Replace “tecmint123” with the actual password that you want to use for your setup. +**注意**: 请将“tecmint123”替换为你想要设置的实际密码。 -#### 8. We proceed by creating the database tables used by PowerDNS. Execute those block by block: #### +#### 8. 我们继续创建PowerDNS要使用的数据库表。像堆积木一样执行以下这些: #### MariaDB [(none)]> USE powerdns; MariaDB [(none)]> CREATE TABLE domains ( @@ -145,7 +143,7 @@ Create PowerDNS User ); ![Create Table Domains for PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Table-Domains-for-PowerDNS.png) -Create Table Domains for PowerDNS +创建用于PowerDNS的表域 MariaDB [(none)]> CREATE UNIQUE INDEX name_index ON domains(name); MariaDB [(none)]> CREATE TABLE records ( @@ -161,14 +159,14 @@ Create Table Domains for PowerDNS ); ![Create Index Domains for PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Index-Domains-for-PowerDNS.png) -Create Index Domains for PowerDNS +创建用于PowerDNS的索引域 MariaDB [(none)]> CREATE INDEX rec_name_index ON records(name); MariaDB [(none)]> CREATE INDEX nametype_index ON records(name,type); MariaDB [(none)]> CREATE INDEX domain_id ON records(domain_id); ![Create Index Records](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Records.png) -Create Index Records +创建索引记录 MariaDB [(none)]> CREATE TABLE supermasters ( ip VARCHAR(25) NOT NULL, @@ -177,24 +175,24 @@ Create Index Records ); ![Create Table Supermaster](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Table-Supermaster.png) -Create Table Supermaster +创建表的超主 -You can now exit the MySQL console by typing: +你现在可以输入以下命令退出MySQL控制台: MariaDB [(none)]> quit; -#### 9. Finally we can proceed with configuring our PowerDNS in a way that, it will use MySQL as backend. For that purpose open PowerDNS configuration file located at: #### +#### 9. 最后,我们可以继续以MySQL作为后台的方式配置PowerDNS。请打开PowerDNS的配置文件: #### # vim /etc/pdns/pdns.conf -In that file look for the lines looking like this: +在该文件中查找像下面这样的行: ################################# # launch Which backends to launch and order to query them in # # launch= -Just after that put the following code: +在这后面放置以下代码: launch=gmysql gmysql-host=localhost @@ -202,101 +200,101 @@ Just after that put the following code: gmysql-password=user-pass gmysql-dbname=powerdns -Change “user-pass” with the actual password that you set earlier. Here is how my configuration looks like: +修改“user-pass”为你先前设置的实际密码,配置如下: ![Configure PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-PowerDNS.png) -Configure PowerDNS +配置PowerDNS -Save your change and exit from. +保存修改并退出。 -#### 10. Now we will start and add PowerDNS to the list of services starting at system boot: #### +#### 10. 现在,我们将启动并添加PowerDNS到系统开机启动列表: #### # systemctl enable pdns.service # systemctl start pdns.service ![Enable and Start PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-and-Start-PowerDNS.png) -Enable and Start PowerDNS +启用并启动PowerDNS -At this point your PowerDNS server is up and running. For more information about PowerDNS you can refer to the manual available at [http://downloads.powerdns.com/documentation/html/index.html][1] +到这一步,你的PowerDNS服务器已经起来并运行了。要获取更多关于PowerDNS的信息,你可以参考手册[http://downloads.powerdns.com/documentation/html/index.html][1] -### Step 2: Installing PowerAdmin to Manage PowerDNS ### +### 步骤 2: 安装PowerAdmin来管理PowerDNS ### -#### 11. Now we will install PowerAdmin – a friendly web interface designed to manager PowerDNS servers. Since it is written in PHP, we will need to install PHP and a web server (Apache): #### +#### 11. 现在,我们将安装PowerAdmin——一个友好的网页接口PowerDNS服务器管理器。由于它是用PHP写的,我们将需要安装PHP和一台网络服务器(Apache): #### # yum install httpd php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mhash gettext ![Install Apache PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-PHP.jpeg) -Install Apache PHP +安装Apache PHP -PowerAdmin also requires two PEAR packages: +PowerAdmin也需要两个PEAR包: # yum -y install php-pear-DB php-pear-MDB2-Driver-mysql ![Install Pear](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Pear.jpeg) -Install Pear +安装Pear -You can also refer to the following article for complete instructions how to install LAMP stack in CentOS 7: +你也可以参考一下文章了解CentOS 7中安装LAMP堆栈的完整指南: -- [Install LAMP in CentOS 7][2] +- [CentOS 7中安装LAMP][2] -Once the install is complete, we will need to start and set Apache to start at system boot: +安装完成后,我们将需要启动并设置Apache开机启动: # systemctl enable httpd.service # systemctl start httpd.service ![Enable Start Apache System Boot](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Start-Apache-System-Boot.png) -Enable Start Apache System Boot +启用Apache开机启动 -#### 12. Now that all system requirements for running PowerAdmn are met, we can proceed and download the package. Since the default web directory for Apache is /var/www/html/, we will download the package in there. #### +#### 12. 由于已经满足PowerAdmin的所有系统要求,我们可以继续下载软件包。因为Apache默认的网页目录位于/var/www/html/,我们将下载软件包到这里。 #### # cd /var/www/html/ # wget http://downloads.sourceforge.net/project/poweradmin/poweradmin-2.1.7.tgz # tar xfv poweradmin-2.1.7.tgz ![Download PowerAdmin](http://www.tecmint.com/wp-content/uploads/2015/04/Download-PowerAdmin.jpeg) -Download PowerAdmin +下载PowerAdmin -#### 13. Now, we can now start the web installer of PowerAdmin. Simply open: #### +#### 13. 现在,我们可以启动PowerAdmin的网页安装器了,只需打开: #### http://192.168.0.102/poweradmin-2.1.7/install/ -This should bring the first step of the installation: +这会进入安装过程的第一步: ![Select Installation Language](http://www.tecmint.com/wp-content/uploads/2015/04/Select-Installation-Language.png) -Select Installation Language +选择安装语言 -The above page will ask you to choose the language for your PowerAdmin. Select the one you wish to use and click the “Go to step 2” button. +上面的页面会要求你为PowerAdmin选择语言,请选择你想要使用的那一个,然后点击“进入步骤 2”按钮。 -#### 14. The installer will expect you to have a PowerDNS database: #### +#### 14. 安装器需要PowerDNS数据库: #### ![PowerDNS Database](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Database.png) -PowerDNS Database +PowerDNS数据库 -#### 15. Since we already created one, we can proceed to the next step. You will be asked to enter the database details you setup earlier. You will also need to setup Poweradmin administrator password: #### +#### 15. 因为我们已经创建了一个,所以我们可以继续进入下一步。你会被要求提供先前配置的数据库详情,你也需要为Poweradmin设置管理员密码: #### ![Enter PowerDNS Database Settings](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS.png) -Enter PowerDNS Database Settings +输入PowerDNS数据库配置 -#### 16. Once you have input those, go to step 4. You will create a new user with a limited rights for Poweradmin. The fields that you need to enter here are: #### +#### 16. 输入这些信息后,进入步骤 4。你将创建为Poweradmin创建一个受限用户。这里你需要输入的字段是: #### -- Username - username for hte PowerAdmin. -- Password – password for the above user. -- Hostmaster - When creating SOA records and you have not specified hostmaster, this value will be used. -- Secondary nameserver – the value will be used as primary name server when creating new DNS zones. +- 用户名 - PowerAdmin用户名。 +- 密码 – 上述用户的密码。 +- 注册人 - 当创建SOA记录而你没有制定注册人时,该值会被使用。 +- 辅助域名服务器 – 该值在创建新的DNS区域时会被用于作为主域名服务器。 ![PowerDNS Configuration Settings](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Configuration-Settings.png) -PowerDNS Configuration Settings +PowerDNS配置设置 -#### 17. On the next step Poweradmin will ask you to create new database user with limited rights on the database tables. It will provide you with the code that you will need to put in a MySQL console: #### +#### 17. 在下一步中,Poweradmin会要求你在数据库表中创建新的受限数据库用户,它会提供你需要在MySQL控制台输入的代码: #### ![Create New Database User](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Database-User.png) -Create New Database User +创建新的数据库用户 -#### 18. Now open a terminal and run: #### +#### 18. 现在打开终端并运行: #### # mysql -u root -p -Provide your password and execute the code provided by Poweradmin: +提供你的密码并执行由Poweradmin提供的代码: MariaDB [(none)]> GRANT SELECT, INSERT, UPDATE, DELETE ON powerdns.* @@ -304,116 +302,116 @@ Provide your password and execute the code provided by Poweradmin: IDENTIFIED BY '123qweasd'; ![Grant Mysql Permissions to User](http://www.tecmint.com/wp-content/uploads/2015/04/Grant-Mysql-Permissions-to-User.png) -Grant Mysql Permissions to User +为用户授予Mysql权限 -#### 19. Now go back to your browser and proceed to the next step. The installer will attempt to create its configuration file in /var/www/html/poweradmin-2.1.7/inc. #### +#### 19. 现在,回到浏览器中并继续下一步。安装器将尝试创建配置文件到/var/www/html/poweradmin-2.1.7/inc。 #### -The file name is config.inc.php. In case the script is not able to write that file you can create it manually by copying the text and putting it in above mentioned file: +文件名是config.inc.php。为防止该脚本没有写权限,你可以手动复制这些内容到上述文件中: ![Configuration Settings of PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Configuration.png) -Configuration Settings of PowerDNS +配置PowerDNS设置 -#### 20. Now go to the last page where you will be informed that the installation is complete and will receive information how to access your Poweradmin install: #### +#### 20. 现在,进入最后页面,该页面会告知你安装已经完成以及如何访问安装好的Poweradmin: #### ![PowerDNS Installation Completed](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Installation-Completed.png) -PowerDNS Installation Completed +PowerDNS安装完成 -You can enable URLs used by other dynamic DNS providers by running: +你可以通过运行以下命令来启用其他动态DNS提供商的URL: # cp install/htaccess.dist .htaccess -For that purpose you will need to have mod_rewrite enabled in Apache’s configuration. +出于该目的,你将需要在Apache的配置中启用mod_rewrite。 -#### 21. Now it is important to remove the “install” folder from Poweradmin’s root directory with the following command: #### +#### 21. 现在,需要移除从Poweradmin的根目录中移除“install”文件夹,这一点很重要。使用以下命令: #### # rm -fr /var/www/html/poweradmin/install/ -After that you can access your poweradmin at: +在此之后,你可以通过以下方式访问PowerAdmin: http://192.168.0.102/poweradmin-2.1.7/ ![PowerDNS Login](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Login.png) -PowerDNS Login +PowerDNS登录 -After logging you should see the Poweradmin main page: +在登录后,你应该会看到Poweradmin的主页: ![PowerDNS Dashboard](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Dashboard.png) -PowerDNS Dashboard +PowerDNS仪表盘 -At this point your installation is complete and you are now ready to start managing your DNS zones. +到这里,安装已经完成了,你也可以开始管理你的DNS区域了。 -### Step 3: How to Add, Edit and Delete DNS Zones in PowerDNS ### +### 步骤 3: PowerDNS中添加、编辑和删除DNS区域 ### -#### 22. To add new master zone, simply click on the “Add master zone”: #### +#### 22. 要添加新的主区域,只需点击“添加主区域”: #### ![Add Master Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Add-Master-Zone.png) -Add Master Zone +添加主区域 -On the next page there are few things that you need to fill: +在下一页中,你需要填写一些东西: -- Domain – domain for which you will be adding the zone. -- Owner – sets the owner of the DNS zone. -- Template – DNS template – leave to none. -- DNSSEC – Donany Name System Security Extensions (optional -check if you need it). +- 域 – 你要添加区域的域。 +- 所有者 – 设置DNS区域的所有者。 +- 模板 – DNS模板 – 留空。 +- DNSSEC – Donany名称系统安全扩展(可选——检查你是否需要)。 -Click the “Add zone” button to add the DNS zone. +点击“添加区域”按钮来添加DNS区域。 ![Master DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Master-DNS-Zone.png) -Master DNS Zone +主DNS区域 -Now you can go back to the index page of Poweradmin by clicking the “Index” link. To review all existing DNS zones simply go to “List zones”: +现在,你可以点击“首页”链接回到Poweradmin的首页。要查看所有现存的DNS区域,只需转到“列出区域”: ![Check List of Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Check-List-Zones.png) -Check List of Zones +检查区域列表 -You should now see a list of available DNS zones: +你现在应该看到一个可用DNS区域列表: ![Check List of DNS Zones](http://www.tecmint.com/wp-content/uploads/2015/04/DNS-Zones.png) -Check List of DNS Zones +检查DNS区域列表 -#### 23. To edit an existing DNS zone or add new records click the edit icon: #### +#### 23. 要编辑现存DNS区域或者添加新的记录,点击编辑图标: #### ![Edit DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Edit-DNS-Zone.png) -Edit DNS Zone +编辑DNS区域 -On the next page you will see the entries for the DNS zone you have chosen: +在接下来的页面,你会看到你选择的DNS区域的条目: ![Domain DNS Zone Entries](http://www.tecmint.com/wp-content/uploads/2015/04/Domain-DNS.png) -Domain DNS Zone Entries +主DNS区域条目 -#### 24. In here to add new DNS zone you will need to set the following information: #### +#### 24. 在此处添加新的DNS区域,你需要设置以下信息: #### -- Name – name for the entry. Only add the first part of the domain/subdomain, the rest will be added by Poweradmin. -- Type – choose the record type. -- Priority – priority of the record. -- TTL – Time To Live in seconds. +- 名称 – 条目名称。只需添加域/子域的第一部分,Poweradmin会添加剩下的。 +- 类型 – 选择记录类型。 +- 优先级 – 记录优先级。 +- TTL – 存活时间,以秒计算。 -For the purpose of this article, I will add an A record for subdomain new.example.com that will resolve on IP address 192.168.0.102 with time to live 14400 seconds: +出于本文目的,我将为子域new.example.com添加一个A记录用于解析IP地址192.168.0.102,设置存活时间为14400秒: ![Add New DNS Record](http://www.tecmint.com/wp-content/uploads/2015/04/Add-New-DNS-Record.png) -Add New DNS Record +添加新DNS记录 -Finally click the “Add record” button. +最后,点击“添加记录”按钮。 -#### 25. If you wish to delete a DNS zone you can go back to the “List zone” page and click on the “Trash” icon next to the DNS zone which you wish to delete: #### +#### 25. 如果你想要删除DNS区域,你可以回到“列出区域”页面,然后点击你想要删除的DNS区域旁边“垃圾桶”图标: #### ![Delete DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Delete-DNS-Zone.png) -Delete DNS Zone +删除DNS区域 -Poweradmin will ask you if you are sure you want to delete the DNS zone. Simply click “Yes” to finish the deletion. +Poweradmin将问你是否确定想要删除DNS区域。只需点击“是”来完成删除。 -For more detailed instructions how to create, edit and delete zones you can refer to Poweradmin’s documentation at: +如要获取更多关于怎样创建、编辑和删除区域的说明,你可以参与Poweradmin的文档: [https://github.com/poweradmin/poweradmin/wiki/Documentation][3] -I hope you have find this article interesting and useful. As always if you have any questions or comments please do not hesitate to submit them in the comment section below. +我希望你已经发现本文很有趣,也很有用。一如既往,如果你有问题或要发表评论,请别犹豫,在下面评论区提交你的评论吧。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/install-powerdns-poweradmin-mariadb-in-centos-rhel/ 作者:[Marin Todorov][a] -译者:[译者ID](https://github.com/译者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9622b4e0103ecc37717801a2aa2ae271743d33e7 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Fri, 22 May 2015 12:34:30 +0800 Subject: [PATCH 0923/2517] finished translation and review --- ...irectory with Samba on Fedora or CentOS.md | 146 ------------------ ...irectory with Samba on Fedora or CentOS.md | 144 +++++++++++++++++ 2 files changed, 144 insertions(+), 146 deletions(-) delete mode 100644 sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md create mode 100644 translated/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md diff --git a/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md b/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md deleted file mode 100644 index 1013b58759..0000000000 --- a/sources/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md +++ /dev/null @@ -1,146 +0,0 @@ -translating by wwy-hust - -How to share a directory with Samba on Fedora or CentOS -================================================================================ -Nowadays sharing data across different computers is not something new at home or many work places. Riding on this trend, modern operating systems make it easy to share and exchange data transparently across computers via network file systems. If your work environment involves a mix of Microsoft Windows and Linux computers, one way to share files and folders among them is via SMB/CIFS, a cross-platform network file sharing protocol. Windows Microsoft natively supports SMB/CIFS, while Linux offers free software implementation of SMB/CIFS network protocol in Samba. - -In this article, we will demonstrate **how to share a directory using Samba**. The Linux platform we will use is **Fedora or CentOS**. This article is dividied into four parts. First, we will install Samba under Fedora/CentOS environment. Next, we discuss how to adjust SELinux and firewall configurations to allow file sharing with Samba. Finally, we cover how to enable Samba to share a directory. - -### Step One: Install Samba on Fedora or CentOS ### - -First thing first. Let's install Samba and configure basic settings. - -Check whether Samba application is already installed on your system by running: - - $ rpm -q samba samba-common samba-client - -If the above command doesn't show anything at all, it means that Samba is not installed. In that case, install Samba using the command below. - - $ sudo yum install samba samba-common samba-client - -Next, creates a local directory which will share data over network. This directory will be exported to remote users as a Samba share. In this tutorial, we will create this directory in the top-level directory '/', so make sure that you have the privileges to do it. - - $ sudo mkdir /shared - -If you want to create a shared directory inside your home directory (e.g., ~/shared), you must activate Samba home directory sharing in the SELinux options, which will be described below in more detail. - -After creating /shared directory, set the privileges of the directory so other users can access it. - - $ sudo chmod o+rw /shared - -If you don't want other users to be able to have write to the directory, just remove the 'w' option in chmod command as follows. - - $ sudo chmod o+r /shared - -Next, create one empty file as a test. This file will be used to verify that he Samba share is mounted properly. - - $ sudo touch /shared/file1 - -### Step Two: Configure SELinux for Samba ### - -Next, we need to re-configure SELinux which is enabled by default in Fedora and CentOS distributions. SELinux allows Samba to read and modify files or directories only when they have the right security context (e.g., labeled with the 'samba_share_t' attribute). - -The following command adds the necessary label to file-context configuration: - - $ sudo semanage fcontext -a -t samba_share_t "(/.*)?" - -Replace the with the local directory we created earlier for Samba share (e.g., /shared): - - $ sudo semanage fcontext -a -t samba_share_t "/shared(/.*)?" - -To activate the label change, we then must run the restorecon command like below. - - $ sudo restorecon -R -v /shared - -![](https://farm9.staticflickr.com/8584/16652774078_2055f45f70_b.jpg) - -To share a directory inside our home directory via Samba, we must enable sharing home directory option in SELinux because it is disabled by default. The following command achieves the desired effect. Skip this step if you are not sharing your home directory. - - $ sudo setsebool -P samba_enable_home_dirs 1 - -### Step Three: Configure Firewall for Samba ### - -The next step is to open necessary TCP/UDP ports in the firewall settings for Samba to operate. - -If you are using firewalld (e.g., on Fedora or CentOS 7), the following command will take care of permanent firewall rule change for Samba service. - - $ sudo firewall-cmd --permanent --add-service=samba - -If you are using iptables for your firewall (e.g., CentOS 6 or earlier), use the following commands to open up necessary Samba ports to the world. - - $ sudo vi /etc/sysconfig/iptables - ----------- - - -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT - -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 445 -j ACCEPT - -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT - -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT - -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT - -Then restart iptables service: - - $ sudo service iptables restart - -### Step Four: Change Samba Configuration ### - -The last step is to configure Samba to export a created local directory as a Samba-share. - -Open the Samba configuration file with a text editor, and add the following lines at the bottom of the file. - - $ sudo nano /etc/samba/smb.conf - ----------- - - [myshare] - comment=my shared files - path=/shared - public=yes - writeable=yes - -In the above the text inside a pair of brackets (e.g., "myshare") is the name of the Samba-shared resource, which will be used to access the Samba share from a remote host. - -Create a Samba user account which is required to mount and export the Samba file system. To create a Samba user, use the smbpasswd tool. Note that the Samba user account must be the same as any existing Linux user. If you try to add a non-existing user with smbpasswd, it will give an error message. - -If you don't want to use any existing Linux user as a Samba user, you can create a new dedicated user in your system. For safety, set the new user's login shell to /sbin/nologin, and do not create its home directory. - -In this example, we are creating a new user named "sambaguest" as follows. - - $ sudo useradd -M -s /sbin/nologin sambaguest - $ sudo passwd sambaguest - -![](https://farm9.staticflickr.com/8702/16814479366_53f540d3ba_b.jpg) - -After creating a new user, add the user as a Samba user using smbpasswd command. When this command asks a password, you can type a different password than the user's password. - - $ sudo smbpasswd -a sambaguest - -4. Activate the Samba service, and check whether the Samba service is running or not. - - $ sudo systemctl enable smb.service - $ sudo systemctl start smb.service - $ sudo systemctl is-active smb - -![](https://farm8.staticflickr.com/7607/16652984770_622f24bccc_b.jpg) - -To see the list of shared directories in Samba, type the following command. - - $ smbclient -U sambaguest -L localhost - -![](https://farm8.staticflickr.com/7281/16220411103_06bf585901_b.jpg) - -The following is a screenshot of accessing the Samba-shared directory on Thunar file manager, and doing copy-paste of file1. Note that the Samba share is accessible via "smb:///myshare" address on Thunar. - -![](https://farm8.staticflickr.com/7644/16218011174_c8b34fcedc_b.jpg) - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/share-directory-samba-fedora-centos.html - -作者:[Kristophorus Hadiono][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/kristophorus diff --git a/translated/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md b/translated/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md new file mode 100644 index 0000000000..901fbf603e --- /dev/null +++ b/translated/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md @@ -0,0 +1,144 @@ +FedoraCentOSʹSambaļ +================================================================================ +ڼǰ칫ͬĵ֮乲ļѲʲôˡ£ִϵͳͨļϵͳķʽʹõԼݵĽü򵥶͸Ļм΢WindowsLinuxôһļĿ¼ķʽͨһƽ̨ļЭ,SMB/CIFSWindowsȻ֧SMB/CIFSLinuxҲͨԴSambaʵSMB/CIFSЭ顣 + +ƪУǽչʾ**ʹSambaļ**ʹõLinuxƽ̨**FedoraCentOS**ƪ·ΪIJ֡ȣFedora/CentOS°װSambeţεSELinuxͷǽSambaļǽʹSambaļС + +### 1FedoraCentOSϰװSamba ### + +ȣװSambaԼһЩá + +SambaǷѾװϵͳУ + + $ rpm -q samba samba-common samba-client + +ûκζSambaδװʱӦʹװSamba + + $ sudo yum install samba samba-common samba-client + +һйıļСļӦSambaķʽԶ̵ûָУǻڶļ'/'дļУˣȷӦȨޡ + + $ sudo mkdir /shared + +homeļڴļУ磬~/shared뼤SELinuxSambahomeļйѡ彫ںᵽ + +ڴ/sharedļкļȨԱ֤ûԷ + + $ sudo chmod o+rw /shared + +ûԸļӵдȨޣҪƳе'w'ѡ + + $ sudo chmod o+r /shared + +һļԡļԱ֤SambaĹѾء + + $ sudo touch /shared/file1 + +### 2ΪSambaSELinux ### + +ҪٴSELinuxFedoraCentOSаSELinuxĬϿġSELinuxȷİȫ²Sambaȡ޸ļļС磬'samba_share_t'Աǩ + +ΪļӱҪıǩ + + $ sudo semanage fcontext -a -t samba_share_t "(/.*)?" + +滻Ϊ֮ǰΪSambaıļУ磬/shared + + $ sudo semanage fcontext -a -t samba_share_t "/shared(/.*)?" + +DZִrestorecon޸ĵıǩ£ + + $ sudo restorecon -R -v /shared + +![](https://farm9.staticflickr.com/8584/16652774078_2055f45f70_b.jpg) + +ΪͨSambahomeļڵļУDZSELinuxпhomeļеѡѡĬϱرաܴﵽЧδhomeļУôò衣 + + $ sudo setsebool -P samba_enable_home_dirs 1 + +### 3ΪSamba÷ǽ ### + +򿪷ǽSambaΪҪTCP/UDP˿ڡ + +ʹfirewalld磬FedoraCentOS7£õ޸Sambaصķǽ + + $ sudo firewall-cmd --permanent --add-service=samba + +ڷǽʹiptables磬CentOS6߸İ汾ʹSambaҪĶ˿ڡ + + $ sudo vi /etc/sysconfig/iptables + +---------- + + -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 445 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT + +Ȼiptables + + $ sudo service iptables restart + +### 4Samba ### + +IJSambaԽļеΪSambaļС + +ʹļ༭Sambaļӵļĩβ + + $ sudo nano /etc/samba/smb.conf + +---------- + + [myshare] + comment=my shared files + path=/shared + public=yes + writeable=yes + +ڵı磬"myshare"SambaԴ֣ԶȡSamba + +Sambaûʻǹغ͵SambaļϵͳġǿʹsmbpasswdһSambaûע⣬SambaûʻLinuxûѴڵġʹsmbpasswdһڵû᷵һϢ + +ʹκѴڵLinuxûΪSambaûϵͳдһµûΪȫûĵ¼űΪ/sbin/nologinҲûhomeļС + +Уڴһ"sambaguest"û£ + + $ sudo useradd -M -s /sbin/nologin sambaguest + $ sudo passwd sambaguest + +![](https://farm9.staticflickr.com/8702/16814479366_53f540d3ba_b.jpg) + +ڴһûʹsmbpasswdSambaûѯһʱԼһͬڸû롣 + + $ sudo smbpasswd -a sambaguest + +4. Samba񣬲SambaǷС + + $ sudo systemctl enable smb.service + $ sudo systemctl start smb.service + $ sudo systemctl is-active smb + +![](https://farm8.staticflickr.com/7607/16652984770_622f24bccc_b.jpg) + +ʹ鿴Sambaйļб + + $ smbclient -U sambaguest -L localhost + +![](https://farm8.staticflickr.com/7281/16220411103_06bf585901_b.jpg) + +ThunarļдȡSambaļԼfile1пƵĽͼע⣬SambaĹݿͨThunarͨ"smb:///myshare"ַȡ + +![](https://farm8.staticflickr.com/7644/16218011174_c8b34fcedc_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/share-directory-samba-fedora-centos.html + +ߣ[Kristophorus Hadiono][a] +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ + +[a]:http://xmodulo.com/author/kristophorus From 02fd3bdc581a4a4c284c81f1645230ffbb94f692 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 22 May 2015 12:46:17 +0800 Subject: [PATCH 0924/2517] translating --- ...crosoft Open-Sources The Windows Communication Foundation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md b/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md index 37c5f189d2..927e42b021 100644 --- a/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md +++ b/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md @@ -1,3 +1,5 @@ +Translating---geekpi + Microsoft Open-Sources The Windows Communication Foundation ================================================================================ Microsoft has today announced they've open-sourced the important WCF (Windows Communication Foundation) code that now targets .NET Core. From 05d2af76e0bf56580734fed8711978c82338a445 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 22 May 2015 13:02:46 +0800 Subject: [PATCH 0925/2517] PUB:20150417 How to Configure MariaDB Replication on CentOS Linux @ictlyh --- ...ure MariaDB Replication on CentOS Linux.md | 60 ++++++++++--------- 1 file changed, 32 insertions(+), 28 deletions(-) rename {translated/tech => published}/20150417 How to Configure MariaDB Replication on CentOS Linux.md (82%) diff --git a/translated/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md b/published/20150417 How to Configure MariaDB Replication on CentOS Linux.md similarity index 82% rename from translated/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md rename to published/20150417 How to Configure MariaDB Replication on CentOS Linux.md index ca27084edf..702d3d7521 100644 --- a/translated/tech/20150417 How to Configure MariaDB Replication on CentOS Linux.md +++ b/published/20150417 How to Configure MariaDB Replication on CentOS Linux.md @@ -1,22 +1,26 @@ -如何在 CentOS Linux 中配置 MariADB 复制 +如何在 CentOS Linux 中配置 MariaDB 复制 ================================================================================ -这是一个创建数据库重复版本的过程。复制过程不仅仅是复制一个数据库,同时也包括从主节点到一个从节点的更改同步。但这并不意味着从数据库就是和主数据库完全相同的副本,因为复制可以配置为只有表或者行或者列的一个模式将被复制,例如,局部复制。复制保证了特定的配置对象在不同的数据库之间保持同步。 +这是一个创建数据库重复版本的过程。复制过程不仅仅是复制一个数据库,同时也包括从主节点到一个从节点的更改同步。但这并不意味着从数据库就是和主数据库完全相同的副本,因为复制可以配置为只复制表结构、行或者列,这叫做局部复制。复制保证了特定的配置对象在不同的数据库之间保持一致。 ### Mariadb 复制概念 ### -**备份** :复制可以用来进行数据库备份。例如,你有主->从复制。如果主节点丢失(比如hdd损坏),你可以从从节点中恢复你的数据库。 +**备份** :复制可以用来进行数据库备份。例如,当你做了主->从复制。如果主节点数据丢失(比如硬盘损坏),你可以从从节点中恢复你的数据库。 -**扩展** :你可以使用主->从复制作为扩展的解决方案。例如,如果你有一些大的数据库以及SQL查询,使用复制你可以将这些查询单独分到每个复制节点。写SQL应该只在主节点进行,而只读查询可以在从节点上进行。 +**扩展** :你可以使用主->从复制作为扩展解决方案。例如,如果你有一些大的数据库以及SQL查询,使用复制你可以将这些查询分离到每个复制节点。写入操作的SQL应该只在主节点进行,而只读查询可以在从节点上进行。 -**传播解决方案** :你可以用复制来进行分发。例如,你可以将不同的销售数据分发到不同的数据库。 +**分发解决方案** :你可以用复制来进行分发。例如,你可以将不同的销售数据分发到不同的数据库。 -**故障解决方案** : 假如你有主节点->从节点1->从节点2->从节点3的复制。你可以为主节点写脚本监控,如果主节点出故障了,脚本可以快速的将从节点1作为新的主节点,有主节点->从节点1->从节点2,你的应用可以继续工作而不会停机。 +**故障解决方案** : 假如你建立有主节点->从节点1->从节点2->从节点3的复制结构。你可以为主节点写脚本监控,如果主节点出故障了,脚本可以快速的将从节点1切换为新的主节点,这样复制结构变成了主节点->从节点1->从节点2,你的应用可以继续工作而不会停机。 ### 复制的简单图解示范 ### ![mysql 复制原理](http://blog.linoxide.com/wp-content/uploads/2015/04/mysql-replication-principle.png) -开始之前,你应该知道什么是**二进制日志文件**以及 Ibdata1。二进制日志文件中包括关于数据库,数据和结构的所有更改的记录,以及每条语句的执行时间。二进制日志文件包括设置日志文件和一个索引。这意味着主要的SQL语句,例如CREATE, ALTER, INSERT, UPDATE 和 DELETE 会放到这个日志文件中,而例如SELECT语句就不会被记录。这些信息可以被记录到普通的query.log文件。简单的说 **Ibdata1** 是一个包括所有表和所有数据库信息的文件。 +开始之前,你应该知道什么是**二进制日志文件**以及 Ibdata1。 + +二进制日志文件中包括关于数据库,数据和结构的所有更改的记录,以及每条语句的执行了多长时间。二进制日志文件包括一系列日志文件和一个索引文件。这意味着主要的SQL语句,例如CREATE, ALTER, INSERT, UPDATE 和 DELETE 会放到这个日志文件中;而例如SELECT这样的语句就不会被记录,它们可以被记录到普通的query.log文件中。 + +而 **Ibdata1** 简单的说据是一个包括所有表和所有数据库信息的文件。 ### 主服务器配置 ### @@ -39,7 +43,7 @@ sudo systemctl start mariadb.service sudo systemctl enable mariadb.service -输出: +输出如下: ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service' @@ -51,7 +55,7 @@ sudo systemctl is-active mariadb.service -输出: +输出如下: Redirecting to /bin/systemctl status mariadb.service mariadb.service - MariaDB database server @@ -65,11 +69,11 @@ mysql> flush privileges; mysql> exit -SOME_ROOT_PASSWORD - 你的 root 密码。 例如我用"q"作为密码,然后尝试登陆: +这里 SOME_ROOT_PASSWORD 是你的 root 密码。 例如我用"q"作为密码,然后尝试登录: sudo mysql -u root -pSOME_ROOT_PASSWORD -输出: +输出如下: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 5 @@ -89,7 +93,7 @@ SOME_ROOT_PASSWORD - 你的 root 密码。 例如我用"q"作为密码,然后 test_repl - 将要被复制的模式的名字 -输出: +输出:如下 Query OK, 1 row affected (0.00 sec) @@ -105,7 +109,7 @@ SOME_ROOT_PASSWORD - 你的 root 密码。 例如我用"q"作为密码,然后 City varchar(255) ); -输出: +输出如下: mysql> MariaDB [test_repl]> CREATE TABLE Persons ( -> PersonID int, @@ -124,7 +128,7 @@ SOME_ROOT_PASSWORD - 你的 root 密码。 例如我用"q"作为密码,然后 mysql> INSERT INTO Persons VALUES (4, "LastName4", "FirstName4", "Address4", "City4"); mysql> INSERT INTO Persons VALUES (5, "LastName5", "FirstName5", "Address5", "City5"); -输出: +输出如下: Query OK, 5 row affected (0.00 sec) @@ -132,7 +136,7 @@ SOME_ROOT_PASSWORD - 你的 root 密码。 例如我用"q"作为密码,然后 mysql> select * from Persons; -输出: +输出如下: +----------+-----------+------------+----------+-------+ | PersonID | LastName | FirstName | Address | City | @@ -145,9 +149,9 @@ SOME_ROOT_PASSWORD - 你的 root 密码。 例如我用"q"作为密码,然后 | 5 | LastName5 | FirstName5 | Address5 | City5 | +----------+-----------+------------+----------+-------+ -### 配置 MariaDB 重复 ### +### 配置 MariaDB 复制 ### -你需要在主结点服务器上编辑 my.cnf文件来启用二进制日志以及设置服务器id。我会使用vi文本编辑器,但你可以使用任何你喜欢的,例如nano,joe。 +你需要在主节点服务器上编辑 my.cnf文件来启用二进制日志以及设置服务器id。我会使用vi文本编辑器,但你可以使用任何你喜欢的,例如nano,joe。 sudo vi /etc/my.cnf @@ -159,7 +163,7 @@ SOME_ROOT_PASSWORD - 你的 root 密码。 例如我用"q"作为密码,然后 binlog-format=row server_id=1 -输出: +输出如下: ![mariadb 配置主节点](http://blog.linoxide.com/wp-content/uploads/2015/04/mariadb-config.png) @@ -173,7 +177,7 @@ sudo mysql -u root -pq test_repl mysql> SHOW MASTER STATUS; -输出: +输出如下: +--------------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | @@ -183,12 +187,12 @@ mysql> SHOW MASTER STATUS; **记住** : "File" 和 "Position" 的值。在从节点中你需要使用这些值 -创建用来重复的用户 +创建用来复制的用户 mysql> GRANT REPLICATION SLAVE ON *.* TO replication_user IDENTIFIED BY 'bigs3cret' WITH GRANT OPTION; mysql> flush privileges; -输出: +输出如下: Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) @@ -197,7 +201,7 @@ mysql> SHOW MASTER STATUS; mysql> select * from mysql.user WHERE user="replication_user"\G; -输出: +输出如下: mysql> select * from mysql.user WHERE user="replication_user"\G; *************************** 1. row *************************** @@ -220,11 +224,11 @@ mysql> SHOW MASTER STATUS; ### 从节点配置 ### -所有这些命令需要在从节点中进行 +所有这些命令需要在从节点中进行。 -假设我们已经更新/升级了包括有最新的MariaDB服务器的 CentOS 7.x,而且你可以用root账号登陆到MariaDBs服务器(这在这篇文章的第一部分已经介绍过) +假设我们已经更新/升级了包括有最新的MariaDB服务器的 CentOS 7.x,而且你可以用root账号登陆到MariaDB服务器(这在这篇文章的第一部分已经介绍过) -登陆到Maria 数据库控制台并创建数据库 +登录到Maria 数据库控制台并创建数据库 mysql -u root -pSOME_ROOT_PASSWORD; mysql> create database test_repl; @@ -264,7 +268,7 @@ full-dump.sql - 你在测试服务器中创建的DB Dump。 mysql> slave start; -输出: +输出如下: Query OK, 0 rows affected (0.00 sec) @@ -272,7 +276,7 @@ full-dump.sql - 你在测试服务器中创建的DB Dump。 mysql> show slave status\G; -输出: +输出如下: *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event @@ -352,7 +356,7 @@ via: http://linoxide.com/how-tos/configure-mariadb-replication-centos-linux/ 作者:[Bobbin Zachariah][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 270ce2609dd0cf60a5ec10caa3edd622bd5c5b42 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Fri, 22 May 2015 13:10:16 +0800 Subject: [PATCH 0926/2517] Update 20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md --- ...ce Forensic Tool to Analyze Disk Images and Recover Files.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md index 2f138a9e3d..b3acf5f00e 100644 --- a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md +++ b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md @@ -1,3 +1,5 @@ +FSSlc Translating + Sleuth Kit - Open Source Forensic Tool to Analyze Disk Images and Recover Files ================================================================================ SIFT is a Ubuntu based forensics distribution provided by SANS Inc. It consist of many forensics tools such as Sleuth kit / Autopsy etc . However, Sleuth kit/Autopsy tools can be installed on Ubuntu/Fedora distribution instead of downloading complete distribution of SIFT. From f50e0082b471a1c1276c9a15f6dbb9dd05e0085e Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 22 May 2015 15:37:47 +0800 Subject: [PATCH 0927/2517] PUB:20150330 How to secure SSH login with one-time passwords on Linux @bazz2 --- ... login with one-time passwords on Linux.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150330 How to secure SSH login with one-time passwords on Linux.md (73%) diff --git a/translated/tech/20150330 How to secure SSH login with one-time passwords on Linux.md b/published/20150330 How to secure SSH login with one-time passwords on Linux.md similarity index 73% rename from translated/tech/20150330 How to secure SSH login with one-time passwords on Linux.md rename to published/20150330 How to secure SSH login with one-time passwords on Linux.md index f3668f14f0..443f8cab25 100644 --- a/translated/tech/20150330 How to secure SSH login with one-time passwords on Linux.md +++ b/published/20150330 How to secure SSH login with one-time passwords on Linux.md @@ -1,10 +1,10 @@ -使用 SSH 和一次性密码安全登录 Linux +使用一次性密码本通过 SSH 安全登录 Linux ================================================================================ -有人说,安全不是一个产品,而是一个过程(LCTT 注:安全公司 McAfee 认为,安全风险管理是一个方法论,而不是安全产品的堆叠)。虽然 SSH 协议被设计成使用加密技术来确保安全,但如果使用不当,别人还是能够破坏你的系统:比如弱密码、密钥泄露、使用的 SSH 客户端过时等,都能引发安全问题。 +有人说,安全不是一个产品,而是一个过程(LCTT 注:安全公司 McAfee 认为,安全风险管理是一个方法论,而不是安全产品的堆叠)。虽然 SSH 协议被设计成使用加密技术来确保安全,但如果使用不当,别人还是能够破坏你的系统:比如弱密码、密钥泄露、使用过时的 SSH 客户端等,都能引发安全问题。 -在考虑 SSH 认证方案时,大家普遍认为[公钥认证][1]比密码认证更安全。然而,公钥认证技术并不是为公共环境设置的,如果你在一台公用电脑上使用公钥认证登录 SSH 服务器,你的服务器已经毫无安全可言了,公用的电脑可能会记录你的公钥,或从你的内存中读取公钥。如果你不信任本地电脑,那你最好还是使用其他方式登录服务器。现在就是“一次性密码”派上用场的时候了,就像名字所示,一次性密码只能被使用一次。这种一次性密码非常合适在不安全的环境下发挥作用,就算它被窃取,也无法再次使用。 +在考虑 SSH 认证方案时,大家普遍认为[公钥认证][1]比密码认证更安全。然而,公钥认证技术并不是为公共环境设置的,如果你在一台公用电脑上使用公钥认证登录 SSH 服务器,你的服务器已经毫无安全可言了,公用的电脑可能会记录你的公钥,或从你的内存中读取公钥。如果你不信任本地电脑,那你最好还是使用其他方式登录服务器。现在就是“一次性密码(OTP)”派上用场的时候了,就像名字所示,一次性密码只能被使用一次。这种一次性密码非常合适在不安全的环境下发挥作用,就算它被窃取,也无法再次使用。 -有个一次性密码方案叫[谷歌认证][2],但在本文中,我要介绍的是另一种 SSH 登录方案:[OTPW][3],它是个一次性密码登录的软件包。不像谷歌认证,OTPW 不需要依赖任何第三方库。 +有个生成一次性密码的方法是通过[谷歌认证器][2],但在本文中,我要介绍的是另一种 SSH 登录方案:[OTPW][3],它是个一次性密码登录的软件包。不像谷歌认证,OTPW 不需要依赖任何第三方库。 ### OTPW 是什么 ### @@ -39,7 +39,7 @@ OTPW 由一次性密码生成器和 PAM 认证规则组成。在 OTPW 中一次 $ git clone https://www.cl.cam.ac.uk/~mgk25/git/otpw $ cd otpw -打开 Makefile 文件,编辑以“PAMLIB=”开头的那行配置: +打开 Makefile 文件,编辑以“PAMLIB=”开头的那行配置: 64 位系统: @@ -49,12 +49,12 @@ OTPW 由一次性密码生成器和 PAM 认证规则组成。在 OTPW 中一次 PAMLIB=/usr/lib/security -编译安装。需要注意的是安装过程会把 SSH 服务重启一下,所以如果你是使用 SSH 连接到服务器,做好被断开连接的准备吧。 +编译安装。需要注意的是安装过程会自动重启 SSH 服务一下,所以如果你是使用 SSH 连接到服务器,做好被断开连接的准备吧(LCTT 译注:也许不会被断开连接,即便被断开连接,请使用原来的方式重新连接即可,现在还没有换成一次性口令方式。)。 $ make $ sudo make install -现在你需要更新 SELinux 策略,因为 /usr/sbin/sshd 会往你的 home 目录写数据,而 SELinux 默认是不允许这么做的。如果你使用了 SELinux 服务(LCTT 注:使用 getenforce 命令查看结果,如果是 enforcing,就是打开了 SELinux 服务),如果没有使用 SELinux 服务,请跳过这一步。 +现在你需要更新 SELinux 策略,因为 /usr/sbin/sshd 会往你的 home 目录写数据,而 SELinux 默认是不允许这么做的。如果没有使用 SELinux 服务(LCTT 注:使用 getenforce 命令查看结果,如果是 enforcing,就是打开了 SELinux 服务),请跳过这一步。 $ sudo grep sshd /var/log/audit/audit.log | audit2allow -M mypol $ sudo semodule -i mypol.pp @@ -90,6 +90,8 @@ Debian, Ubuntu 或 Linux Mint 发行版: Fedora 或 CentOS/RHEL 7 发行版: $ sudo systemctl restart sshd + +(LCTT 译注:虽然这里重启了 sshd 服务,但是你当前的 ssh 连接应该不受影响,只是在你完成下述步骤之前,无法按照原有方式建立新的连接了。因此,保险起见,要么多开一个 ssh 连接,避免误退出当前连接;要么将重启 sshd 服务器步骤放到步骤3完成之后。) #### 步骤3:使用 OTPW 产生一次性密码 #### @@ -102,7 +104,7 @@ Fedora 或 CentOS/RHEL 7 发行版: 这个命令会让你输入密码前缀,当你以后登录的时候,你需要同时输入这个前缀以及一次性密码。密码前缀是另外一层保护,就算你的一次性密码表被泄漏,别人也无法通过暴力破解你的 SSH 密码。 -设置好密码前缀后,这个命令会产生 280 个一次性密码,并将它们保存在一个文本文件中(如 temporary_password.txt)。每个密码(默认是 8 个字符)由一个 3 位十进制数索引。你需要将这个密码表打印出来,并随身携带。 +设置好密码前缀后,这个命令会产生 280 个一次性密码(LCTT 译注:保存到 ~/.otpw 下),并将它们导出到一个文本文件中(如 temporary_password.txt)。每个密码(默认是 8 个字符)由一个 3 位十进制数索引。你需要将这个密码表打印出来,并随身携带。 ![](https://farm8.staticflickr.com/7281/16962594055_c2696d5ae1_b.jpg) @@ -160,7 +162,7 @@ Fedora 或 CentOS/RHEL 7 发行版: ### 总结 ### -在这个教程中,我介绍了如何使用 OTPW 工具来设置一次性登录密码。你也许意识到了在这种两个因子的认证方式中,打印一张密码表让人感觉好 low,但是这种方式是最简单的,并且不用依赖任何第三方软件。无论你用哪种方式创建一次性密码,在你需要在一个不被信任的环境登录 SSH 服务器的时候,它们都很有用。你可以就这个主题来分享你的经验和观点。 +在这个教程中,我介绍了如何使用 OTPW 工具来设置一次性登录密码。你也许意识到了在这种双因子的认证方式中,打印一张密码表让人感觉好 low,但是这种方式是最简单的,并且不用依赖任何第三方软件。无论你用哪种方式创建一次性密码,在你需要在一个不可信任的环境登录 SSH 服务器的时候,它们都很有用。你可以就这个主题来分享你的经验和观点。 -------------------------------------------------------------------------------- @@ -168,11 +170,11 @@ via: http://xmodulo.com/secure-ssh-login-one-time-passwords-linux.html 作者:[Dan Nanni][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/how-to-force-ssh-login-via-public-key-authentication.html -[2]:http://xmodulo.com/two-factor-authentication-ssh-login-linux.html +[1]:https://linux.cn/article-5444-1.html +[2]:https://linux.cn/article-2642-1.html [3]:http://www.cl.cam.ac.uk/~mgk25/otpw.html From 68be41500e33c2956ee3298efb7e2cad0a0c2b48 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 22 May 2015 15:51:31 +0800 Subject: [PATCH 0928/2517] Translating by ZTinoZ --- ...o After Installing Ubuntu 15.04 Desktop.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index d5e543a7ba..e7d536958e 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -1,4 +1,4 @@ -安装完Ubuntu 15.04桌面后要做的15件事 +安装完Ubuntu 15.04桌面后要做的16件事 ================================================================================ 本教程适用于新手和在自己的电脑上安装好Ubuntu 15.04 “Vivid Vervet” 桌面之后为了自定义自己的系统并安装一些基本程序作为日常使用的已经做了一些准备的人。 @@ -110,7 +110,7 @@ Enable Video Codes ### 8. 安装图像处理应用程序 ### -If you are a photography enthusiast and you want to handle and manipulate images on Ubuntu, probably you want to install the following imaging programs: +如果你是一个摄影爱好者,想在Ubuntu上处理调整图像,或许需要安装一下图像处理程序: - GIMP (alternative for Adobe Photoshop) - Darktable @@ -121,7 +121,7 @@ If you are a photography enthusiast and you want to handle and manipulate images - Digikam - Cheese -This applications can be installed from Ubuntu Software Center or all at once by using the following command line on Terminal: +这些应用程序能从Ubuntu Software Center中安装或者立刻在终端上使用以下命令: $ sudo apt-get install gimp gimp-plugin-registry gimp-data-extras darktable rawtherapee pinta shotwell inkscape @@ -133,7 +133,7 @@ Rawtherapee Tool ### 9. 安装媒体烧录软件 ### -To mount ISO images or burn a CDs or a DVD, you can choose and install from the following software: +如果要挂载ISO镜像或烧录一张CD或DVD,你可以选择并安装以下软件中的一款: - Brasero Disk Burner - K3b @@ -150,7 +150,7 @@ Install Media Burners ### 10. 安装压缩应用程序 ### -To handle most of archive formatted files (zip, tar.gz, zip, 7zip rar etc) install the following packages by issuing the below command: +如果要处理大多数归档格式的文件(zip, tar.gz, zip, 7zip rar等等),输入以下命令来安装这些包: $ sudo apt-get install unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller @@ -159,7 +159,7 @@ Install Archive Applications ### 11. 安装聊天应用程序 ### -If you want to talk to people all over the world, here is a list of the most popular chat applications for Linux: +如果你想要和世界各地的人们聊天,这里有一份最流行的Linux聊天应用程序列表: - Pidgin - Skype @@ -168,7 +168,7 @@ If you want to talk to people all over the world, here is a list of the most pop - aMSN - Viber -You can install most of them from Ubuntu Software Center or by using the command line: +你可以从Ubuntu Software Center中安装它们或使用以下命令: $ sudo apt-get install pidgin $ sudo apt-get install skype @@ -181,21 +181,21 @@ You can install most of them from Ubuntu Software Center or by using the command ![Install Chat Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-chat-apps.jpg) Install Chat Applications -To install Viber application on Ubuntu visit [Viber official webpage][1], download the Debian package locally and install the viber.deb application using Gdebi package manager (left click – > Open with -> GDebi Package Installer). +想要在Ubuntu上安装Viber可以访问[Viber官方网站][1]下载Debian安装包到本地并用Gdebi包管理工具来安装viber.deb应用程序(右击 –> 打开 -> GDebi Package Installer). ![Install Viber in Ubuntu](http://www.tecmint.com/wp-content/uploads/2015/04/install-viber.jpg) Install Viber ### 12. 安装种子软件 ### -The most popular torrent applications and peer-to-peer file sharing programs for Ubuntu are: +在Ubuntu最流行的种子应用程序和P2P文件共享程序是: - Deluge - Transmission - Qbittorrent - LinuxDC++ -To install your favorite peer-to-peer file sharing application on Ubuntu issue the following command on Terminal. +想要在Ubuntu上安装你最喜欢的P2P文件共享应用程序,可以在终端上输入以下命令: $ sudo apt-get install deluge $ sudo apt-get install transmission @@ -288,7 +288,7 @@ This are just a few tweaks and programs that an average user might install and u via: http://www.tecmint.com/things-to-do-after-installing-ubuntu-15-04-desktop/ 作者:[Matei Cezar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 45b56d13944ac7b1f808c35f6237b791d3a7fd0e Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 22 May 2015 16:09:26 +0800 Subject: [PATCH 0929/2517] =?UTF-8?q?20150522-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20150522 Analyzing Linux Logs.md | 181 ++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 sources/tech/20150522 Analyzing Linux Logs.md diff --git a/sources/tech/20150522 Analyzing Linux Logs.md b/sources/tech/20150522 Analyzing Linux Logs.md new file mode 100644 index 0000000000..085d3a8ed3 --- /dev/null +++ b/sources/tech/20150522 Analyzing Linux Logs.md @@ -0,0 +1,181 @@ +Analyzing Linux Logs +================================================================================ +There’s a great deal of information waiting for you within your logs, although it’s not always as easy as you’d like to extract it. In this section we will cover some examples of basic analysis you can do with your logs right away (just search what’s there). We’ll also cover more advanced analysis that may take some upfront effort to set up properly, but will save you time on the back end. Examples of advanced analysis you can do on parsed data include generating summary counts, filtering on field values, and more. + +We’ll show you first how to do this yourself on the command line using several different tools and then show you how a log management tool can automate much of the grunt work and make this so much more streamlined. + +### Searching with Grep ### + +Searching for text is the most basic way to find what you’re looking for. The most common tool for searching text is [grep][1]. This command line tool, available on most Linux distributions, allows you to search your logs using regular expressions. A regular expression is a pattern written in a special language that can identify matching text. The simplest pattern is to put the string you’re searching for surrounded by quotes + +#### Regular Expressions #### + +Here’s an example to find authentication logs for “user hoover” on an Ubuntu system: + + $ grep "user hoover" /var/log/auth.log + Accepted password for hoover from 10.0.2.2 port 4792 ssh2 + pam_unix(sshd:session): session opened for user hoover by (uid=0) + pam_unix(sshd:session): session closed for user hoover + +It can be hard to construct regular expressions that are accurate. For example, if we searched for a number like the port “4792” it could also match timestamps, URLs, and other undesired data. In the below example for Ubuntu, it matched an Apache log that we didn’t want. + + $ grep "4792" /var/log/auth.log + Accepted password for hoover from 10.0.2.2 port 4792 ssh2 + 74.91.21.46 - - [31/Mar/2015:19:44:32 +0000] "GET /scripts/samples/search?q=4972HTTP/1.0" 404 545 "-" "-” + +#### Surround Search #### + +Another useful tip is that you can do surround search with grep. This will show you what happened a few lines before or after a match. It can help you debug what lead up to a particular error or problem. The B flag gives you lines before, and A gives you lines after. For example, we can see that when someone failed to login as an admin, they also failed the reverse mapping which means they might not have a valid domain name. This is very suspicious! + + $ grep -B 3 -A 2 'Invalid user' /var/log/auth.log + Apr 28 17:06:20 ip-172-31-11-241 sshd[12545]: reverse mapping checking getaddrinfo for 216-19-2-8.commspeed.net [216.19.2.8] failed - POSSIBLE BREAK-IN ATTEMPT! + Apr 28 17:06:20 ip-172-31-11-241 sshd[12545]: Received disconnect from 216.19.2.8: 11: Bye Bye [preauth] + Apr 28 17:06:20 ip-172-31-11-241 sshd[12547]: Invalid user admin from 216.19.2.8 + Apr 28 17:06:20 ip-172-31-11-241 sshd[12547]: input_userauth_request: invalid user admin [preauth] + Apr 28 17:06:20 ip-172-31-11-241 sshd[12547]: Received disconnect from 216.19.2.8: 11: Bye Bye [preauth] + +#### Tail #### + +You can also pair grep with [tail][2] to get the last few lines of a file, or to follow the logs and print them in real time. This is useful if you are making interactive changes like starting a server or testing a code change. + + $ tail -f /var/log/auth.log | grep 'Invalid user' + Apr 30 19:49:48 ip-172-31-11-241 sshd[6512]: Invalid user ubnt from 219.140.64.136 + Apr 30 19:49:49 ip-172-31-11-241 sshd[6514]: Invalid user admin from 219.140.64.136 + +A full introduction on grep and regular expressions is outside the scope of this guide, but [Ryan’s Tutorials][3] include more in-depth information. + +Log management systems have higher performance and more powerful searching abilities. They often index their data and parallelize queries so you can quickly search gigabytes or terabytes of logs in seconds. In contrast, this would take minutes or in extreme cases hours with grep. Log management systems also use query languages like [Lucene][4] which offer an easier syntax for searching on numbers, fields, and more. + +### Parsing with Cut, AWK, and Grok ### + +#### Command Line Tools #### + +Linux offers several command line tools for text parsing and analysis. They are great if you want to quickly parse a small amount of data but can take a long time to process large volumes of data + +#### Cut #### + +The [cut][5] command allows you to parse fields from delimited logs. Delimiters are characters like equal signs or commas that break up fields or key value pairs. + +Let’s say we want to parse the user from this log: + + pam_unix(su:auth): authentication failure; logname=hoover uid=1000 euid=0 tty=/dev/pts/0 ruser=hoover rhost= user=root + +We can use the cut command like this to get the text after the eighth equal sign. This example is on an Ubuntu system: + + $ grep "authentication failure" /var/log/auth.log | cut -d '=' -f 8 + root + hoover + root + nagios + nagios + +#### AWK #### + +Alternately, you can use [awk][6], which offers more powerful features to parse out fields. It offers a scripting language so you can filter out nearly everything that’s not relevant. + +For example, let’s say we have the following log line on an Ubuntu system and we want to extract the username that failed to login: + + Mar 24 08:28:18 ip-172-31-11-241 sshd[32701]: input_userauth_request: invalid user guest [preauth] + +Here’s how you can use the awk command. First, put a regular expression /sshd.*invalid user/ to match the sshd invalid user lines. Then print the ninth field using the default delimiter of space using { print $9 }. This outputs the usernames. + + $ awk '/sshd.*invalid user/ { print $9 }' /var/log/auth.log + guest + admin + info + test + ubnt + +You can read more about how to use regular expressions and print fields in the [Awk User’s Guide][7]. + +#### Log Management Systems #### + +Log management systems make parsing easier and enable users to quickly analyze large collections of log files. They can automatically parse standard log formats like common Linux logs or web server logs. This saves a lot of time because you don’t have to think about writing your own parsing logic when troubleshooting a system problem. + +Here you can see an example log message from sshd which has each of the fields remoteHost and user parsed out. This is a screenshot from Loggly, a cloud-based log management service. + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.25.09-AM.png) + +You can also do custom parsing for non-standard formats. A common tool to use is [Grok][8] which uses a library of common regular expressions to parse raw text into structured JSON. Here is an example configuration for Grok to parse kernel log files inside Logstash: + + filter{ + grok { + match => {"message" => "%{CISCOTIMESTAMP:timestamp} %{HOST:host} %{WORD:program}%{NOTSPACE} %{NOTSPACE}%{NUMBER:duration}%{NOTSPACE} %{GREEDYDATA:kernel_logs}" + } + } + +And here is what the parsed output looks like from Grok: + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.30.37-AM.png) + +### Filtering with Rsyslog and AWK ### + +Filtering allows you to search on a specific field value instead of doing a full text search. This makes your log analysis more accurate because it will ignore undesired matches from other parts of the log message. In order to search on a field value, you need to parse your logs first or at least have a way of searching based on the event structure. + +#### How to Filter on One App #### + +Often, you just want to see the logs from just one application. This is easy if your application always logs to a single file. It’s more complicated if you need to filter one application among many in an aggregated or centralized log. Here are several ways to do this: + +1. Use the rsyslog daemon to parse and filter logs. This example writes logs from the sshd application to a file named sshd-messages, then discards the event so it’s not repeated elsewhere. You can try this example by adding it to your rsyslog.conf file. + + :programname, isequal, “sshd” /var/log/sshd-messages + &~ + +2. Use command line tools like awk to extract the values of a particular field like the sshd username. This example is from an Ubuntu system. + + $ awk '/sshd.*invalid user/ { print $9 }' /var/log/auth.log + guest + admin + info + test + ubnt + +3. Use a log management system that automatically parses your logs, then click to filter on the desired application name. Here is a screenshot showing the syslog fields in a log management service called Loggly. We are filtering on the appName “sshd” as indicated by the Venn diagram icon. + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.05.02-AM.png) + +#### How to Filter on Errors #### + +One of the most common thing people want to see in their logs is errors. Unfortunately, the default syslog configuration doesn’t output the severity of errors directly, making it difficult to filter on them. + +There are two ways you can solve this problem. First, you can modify your rsyslog configuration to output the severity in the log file to make it easier to read and search. In your rsyslog configuration you can add a [template][9] with pri-text such as the following: + + "<%pri-text%> : %timegenerated%,%HOSTNAME%,%syslogtag%,%msg%n" + +This example gives you output in the following format. You can see that the severity in this message is err. + + : Mar 11 18:18:00,hoover-VirtualBox,su[5026]:, pam_authenticate: Authentication failure + +You can use awk or grep to search for just the error messages. In this example for Ubuntu, we’re including some surrounding syntax like the . and the > which match only this field. + + $ grep '.err>' /var/log/auth.log + : Mar 11 18:18:00,hoover-VirtualBox,su[5026]:, pam_authenticate: Authentication failure + +Your second option is to use a log management system. Good log management systems automatically parse syslog messages and extract the severity field. They also allow you to filter on log messages of a certain severity with a single click. + +Here is a screenshot from Loggly showing the syslog fields with the error severity highlighted to show we are filtering for errors: + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.00.36-AM.png) + +-------------------------------------------------------------------------------- + +via: http://www.loggly.com/ultimate-guide/logging/analyzing-linux-logs/ + +作者:[Jason Skowronski][a] [Amy Echeverri][b] [ Sadequl Hussain][c] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linkedin.com/in/jasonskowronski +[b]:https://www.linkedin.com/in/amyecheverri +[c]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 +[1]:http://linux.die.net/man/1/grep +[2]:http://linux.die.net/man/1/tail +[3]:http://ryanstutorials.net/linuxtutorial/grep.php +[4]:https://lucene.apache.org/core/2_9_4/queryparsersyntax.html +[5]:http://linux.die.net/man/1/cut +[6]:http://linux.die.net/man/1/awk +[7]:http://www.delorie.com/gnu/docs/gawk/gawk_26.html#IDX155 +[8]:http://logstash.net/docs/1.4.2/filters/grok +[9]:http://www.rsyslog.com/doc/v8-stable/configuration/templates.html \ No newline at end of file From 5b51ea24362f25d41a44012591f667cf69ee65c5 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Fri, 22 May 2015 19:15:07 +0800 Subject: [PATCH 0930/2517] [Translating] 20150520 How to Use Docker Machine with a Cloud Provider.md --- ...0150520 How to Use Docker Machine with a Cloud Provider.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md b/sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md index 8ccc8c8c94..1539b4e751 100644 --- a/sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md +++ b/sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md @@ -1,3 +1,5 @@ +Translating by goreliu ... + How to Use Docker Machine with a Cloud Provider ================================================================================ Hi everyone, today we'll learn how we can use Docker Machine to deploy Docker host in various Cloud Provider Platforms. Docker Machine is an application that helps to create Docker hosts on our computer, on cloud providers and inside our own data center. It provides easy solution for creating servers, installing Docker on them and then configuring the Docker client according the users configuration and requirements. The driver APIs works for provisioning Docker on a local machine, on a virtual machine in the data center, or on a public cloud instance. Docker Machine is supported on Windows, OSX, and Linux and is available for installation as one standalone binary. It enables us to take full advantage of ecosystem partners providing Docker-ready infrastructure, while still accessing everything through the same interface. It makes people able to deploy the docker containers in the respective cloud platform pretty fast and in pretty easy way with just a single command. @@ -138,7 +140,7 @@ Docker Machine is really and awesome tool for deploying servers with Docker Cont via: http://linoxide.com/linux-how-to/use-docker-machine-cloud-provider/ 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[goreliu](https://github.com/goreliu) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 57bada1e8eeace5ca7552d75c67300f829e20570 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 22 May 2015 21:34:23 +0800 Subject: [PATCH 0931/2517] translated --- ...es The Windows Communication Foundation.md | 16 +++++------- ...es The Windows Communication Foundation.md | 26 +++++++++++++++++++ 2 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 translated/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md diff --git a/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md b/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md index 927e42b021..45d8d6514a 100644 --- a/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md +++ b/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md @@ -1,23 +1,21 @@ -Translating---geekpi - -Microsoft Open-Sources The Windows Communication Foundation +微软开源了WCF框架 ================================================================================ -Microsoft has today announced they've open-sourced the important WCF (Windows Communication Foundation) code that now targets .NET Core. +微软今天宣布我们开源的针对.NET核心的WCF(Windows Communication Foundation)。 -As described by [MSDN][1], "Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application. An endpoint can be a client of a service that requests data from a service endpoint. The messages can be as simple as a single character or word sent as XML, or as complex as a stream of binary data." +[MSDN][1]中说:“WCF是一个构建面向服务程序的框架。使用WCF,你可以从服务端给另一个发送异步消息。服务终端可以是托管在IIS中连续可用服务的一部分,也可以是托管在某个程序上的服务。终端可以是请求服务端数据的客户端。消息可以是一个字符或者XML,也可以是复杂的二进制流。” -The [code on GitHub][2], "contains a subset of the full Windows Communication Foundation product available on the Windows desktop, and it supports the library profiles already available for building WCF apps for the Windows Store. These profiles are primarily client-based, making them suited for mobile devices or on mid-tier servers to communicate with existing WCF services." +它的[代码在GitHub][2],“包含了Window桌面中完整WCF框架的一部分,它支持已经在Window Store中的WCF库。这些档案主要是基于客户端,方便移动设备和中间层服务器使用WCF进行通信。” -More details on Microsoft opening up the Windows Communication Foundation can be found via the announcement posted this morning to the [dotNETFoundation.org blog][3]. +More details on Microsoft opening up the Windows Communication Foundation can be found via the announcement posted this morning to the [dotNETFoundation.[dotNETFoundation.org blog][3]中查看。 -Windows Communication Foundation sounds a bit like D-Bus on Linux for inter-process communication between programs/services. +WCF听上去有点像Linux中进程/服务间通信的D-BUS。 -------------------------------------------------------------------------------- via: http://www.phoronix.com/scan.php?page=news_item&px=Microsoft-Open-Source-WCF 作者:[Michael Larabel][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md b/translated/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md new file mode 100644 index 0000000000..45d8d6514a --- /dev/null +++ b/translated/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md @@ -0,0 +1,26 @@ +微软开源了WCF框架 +================================================================================ +微软今天宣布我们开源的针对.NET核心的WCF(Windows Communication Foundation)。 + +[MSDN][1]中说:“WCF是一个构建面向服务程序的框架。使用WCF,你可以从服务端给另一个发送异步消息。服务终端可以是托管在IIS中连续可用服务的一部分,也可以是托管在某个程序上的服务。终端可以是请求服务端数据的客户端。消息可以是一个字符或者XML,也可以是复杂的二进制流。” + +它的[代码在GitHub][2],“包含了Window桌面中完整WCF框架的一部分,它支持已经在Window Store中的WCF库。这些档案主要是基于客户端,方便移动设备和中间层服务器使用WCF进行通信。” + +More details on Microsoft opening up the Windows Communication Foundation can be found via the announcement posted this morning to the [dotNETFoundation.[dotNETFoundation.org blog][3]中查看。 + +WCF听上去有点像Linux中进程/服务间通信的D-BUS。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=news_item&px=Microsoft-Open-Source-WCF + +作者:[Michael Larabel][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.michaellarabel.com/ +[1]:https://msdn.microsoft.com/en-us/library/ms731082%28v=vs.110%29.aspx +[2]:https://github.com/dotnet/wcf +[3]:http://www.dotnetfoundation.org/blog/wcf-is-open-source \ No newline at end of file From 4182debf361bc2e1ccc7a07a280fb410766cee5a Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 22 May 2015 21:37:01 +0800 Subject: [PATCH 0932/2517] translated --- ...es The Windows Communication Foundation.md | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md diff --git a/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md b/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md deleted file mode 100644 index 45d8d6514a..0000000000 --- a/sources/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md +++ /dev/null @@ -1,26 +0,0 @@ -微软开源了WCF框架 -================================================================================ -微软今天宣布我们开源的针对.NET核心的WCF(Windows Communication Foundation)。 - -[MSDN][1]中说:“WCF是一个构建面向服务程序的框架。使用WCF,你可以从服务端给另一个发送异步消息。服务终端可以是托管在IIS中连续可用服务的一部分,也可以是托管在某个程序上的服务。终端可以是请求服务端数据的客户端。消息可以是一个字符或者XML,也可以是复杂的二进制流。” - -它的[代码在GitHub][2],“包含了Window桌面中完整WCF框架的一部分,它支持已经在Window Store中的WCF库。这些档案主要是基于客户端,方便移动设备和中间层服务器使用WCF进行通信。” - -More details on Microsoft opening up the Windows Communication Foundation can be found via the announcement posted this morning to the [dotNETFoundation.[dotNETFoundation.org blog][3]中查看。 - -WCF听上去有点像Linux中进程/服务间通信的D-BUS。 - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=news_item&px=Microsoft-Open-Source-WCF - -作者:[Michael Larabel][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.michaellarabel.com/ -[1]:https://msdn.microsoft.com/en-us/library/ms731082%28v=vs.110%29.aspx -[2]:https://github.com/dotnet/wcf -[3]:http://www.dotnetfoundation.org/blog/wcf-is-open-source \ No newline at end of file From 4559a7909b13d24bd1a3a31a255140fae02a2500 Mon Sep 17 00:00:00 2001 From: wwy Date: Fri, 22 May 2015 22:54:13 +0800 Subject: [PATCH 0933/2517] Update 20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md --- ...Mysterious Uses of Symbol or Operator in Linux Commands.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md b/sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md index 2b281b8e85..16795b92e8 100644 --- a/sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md +++ b/sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md @@ -1,3 +1,5 @@ +translating by wwy-hust + 10 Amazing and Mysterious Uses of (!) Symbol or Operator in Linux Commands ================================================================================ The `'!'` symbol or operator in Linux can be used as Logical Negation operator as well as to fetch commands from history with tweaks or to run previously run command with modification. All the commands below have been checked explicitly in bash Shell. Though I have not checked but a major of these won’t run in other shell. Here we go into the amazing and mysterious uses of `'!'` symbol or operator in Linux commands. @@ -190,4 +192,4 @@ via: http://www.tecmint.com/mysterious-uses-of-symbol-or-operator-in-linux-comma 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/12-top-command-examples-in-linux/ \ No newline at end of file +[1]:http://www.tecmint.com/12-top-command-examples-in-linux/ From feb8bf95cf6461377a0ad62fd71f6d21f8bbc3ec Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 24 May 2015 10:10:00 +0800 Subject: [PATCH 0934/2517] translating --- ...untu App Applies Instagram Style Filters to Your Photos.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md b/sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md index b9ff371e5f..e30264f75b 100644 --- a/sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md +++ b/sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md @@ -1,3 +1,5 @@ +translating----geekpi + This Ubuntu App Applies Instagram Style Filters to Your Photos ================================================================================ **Looking for an Ubuntu app to apply Instagram style filters to your photos in Ubuntu?** @@ -68,4 +70,4 @@ via: http://www.omgubuntu.co.uk/2015/05/instagram-photo-filters-ubuntu-desktop-a [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:http://www.omgchrome.com/?s=pixlr [2]:http://www.omgchrome.com/the-best-chrome-apps-of-2014/ -[3]:http://www.xnview.com/en/xnretro/#downloads \ No newline at end of file +[3]:http://www.xnview.com/en/xnretro/#downloads From 1150c902dd25b0b8481f7f701fae4e094bc14455 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 24 May 2015 10:55:14 +0800 Subject: [PATCH 0935/2517] translated --- ... Instagram Style Filters to Your Photos.md | 73 ------------------ ... Instagram Style Filters to Your Photos.md | 74 +++++++++++++++++++ 2 files changed, 74 insertions(+), 73 deletions(-) delete mode 100644 sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md create mode 100644 translated/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md diff --git a/sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md b/sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md deleted file mode 100644 index e30264f75b..0000000000 --- a/sources/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md +++ /dev/null @@ -1,73 +0,0 @@ -translating----geekpi - -This Ubuntu App Applies Instagram Style Filters to Your Photos -================================================================================ -**Looking for an Ubuntu app to apply Instagram style filters to your photos in Ubuntu?** - -Grab your selfie stick and step this way… - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/instagram-app.jpg) -XnRetro is a photo editing app - -### XnRetro Photo Editor ### - -**XnRetro** is a simple image editing application that lets you quickly add “Instagram like” effects to your photos. - -You know the sort of effects I’m talking about: scratches, noises, and frames, over processing, vintage washes and nostalgic tints (because in this age of digital transience we must know that endless selfies and sandwich snaps are unlikely to ever become nostalgic of themselves). - -Whether you consider such effects to be of asinine artistic value or shortcut to being creative, these kinds of filters are popular and can help add a splash of personality to an otherwise so-so photo. - -#### XnRetro Features #### - -**XnRetro features the following:** - -- 20 color filters -- 15 light effects (bokeh, leaks, etc) -- 28 frames and borders -- 5 Vignettes (with strength control) -- Image adjustments for contrast, gamma, saturation, etc -- Square crop option - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/Screen-Shot-2015-05-10-at-23.30.01-e1431297068833.png) -Small tweak to make light effects work - -You can save edited images (in theory) as .jpg or .png files and share them straight to social media from within the app. - -I say “in theory” because .jpg saving doesn’t actually work in the Linux version of the app (you can save edited images as .png files though). Similarly, most of the built-in social networking links are borked or just flat out fail on export. - -To get the **15 light leaks** to work you will need to re-save each .jpg image in XnRetro ‘light’ folder as a .png file. Edit the ‘light.xml’ to match the new file names, hit save and the light effects will load up in XnRetro without issue. - -> ‘For user-friendly image editing XnRetro is hard to beat — once you make it work.’ - -**Is XnRetro Worth Installing?** - -XnRetro is not perfect. It’s is pretty old-looking, difficult to properly install and has not been updated for several years. - -It does still work, barring .jpg saving, and is a nimble alternative to an advanced app like The Gimp or Shotwell’s set of ‘serious’ image adjustment tools. - -While web apps and Chrome Apps¹ like [Pixlr Touch Up][1] and [Polarr][2] offer similar features you may be looking for a truly native solution. - -And for that, for user-friendly image editing based around easy-to-apply filters, XnRetro is hard to beat. - -### Download XnRetro for Ubuntu ### - -XnRetro is not available as an installable .deb package. It is distributed as a binary file, meaning you need to double-click on the program file run it each and every time. It’s also 32-bit only. - -You can download XnRetro using the link below. Once completed you need to extract the archive and enter the folder it creates. Double-click on the ‘xnretro’ program binary inside. - -- [Download XnRetro for Linux (32bit, tar.gz)][3] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/05/instagram-photo-filters-ubuntu-desktop-app - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.omgchrome.com/?s=pixlr -[2]:http://www.omgchrome.com/the-best-chrome-apps-of-2014/ -[3]:http://www.xnview.com/en/xnretro/#downloads diff --git a/translated/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md b/translated/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md new file mode 100644 index 0000000000..ae5e6df6eb --- /dev/null +++ b/translated/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md @@ -0,0 +1,74 @@ +一个Ubuntu中给你的照片加Instagram风格滤镜的程序 +================================================================================ +**在Ubuntu中寻找一个给你的照片加Instagram风格的滤镜程序么?** + +拿起你的自拍棒跟着这个来。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/instagram-app.jpg) +XnRetro是一个照片编辑应用 + +### XnRetro 照片编辑器 ### + +**XnRetro** 是一个可以让你快速给你照片添加“类Instagram”效果的程序。 + +你知道我说的这些效果:划痕、噪点、框架、过处理、复古和怀旧色调(因为在这个数字时代,我们必须知道无尽的自拍不能称为怀旧的自己。) + +无论你认为这些效果是愚蠢的艺术价值或者创作的捷径,这些滤镜非常流行切可以帮助那些平平照片添加个性。 + + +#### XnRetro的功能 #### + +**XnRetro有下面那些功能** + +- 20色彩滤镜 +- 15中光效果(虚化、泄露等等) +- 28框架和边框 +- 5中插图 (带力度控制) +- Image adjustments for contrast, gamma, saturation, etc +- 对比度、伽马、饱和度等图像调整 +- 矩形修剪选项 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/Screen-Shot-2015-05-10-at-23.30.01-e1431297068833.png) +灯光效果调整 + +你可以(理论上)编辑。jpg或者.png文件并且直接在app中等想到社交媒体上。 + +我说“理论”上的意思是保存.jpg图像无法正常在linux版的程序上工作(你可以保存.png的图像)。相似的,大多数内置的社交链接失效或者无法导出。 + +要使用**15中光影效果**你需要在XnRetro的‘light’文件夹下重新保存.jpg文件成.png文件。编辑‘light.xml’来匹配新的文件名,点击保存那没灯光效果就可以没有问题的加载进XnRetro了。 + +> ‘用户友好的XnRetro很难打败-一旦你用顺之后。’ + +**XnRetro值得安装么?** + +XnRetro并不是完美的。它看上去很丑、很难正确的安装并且已经纪念没有更新了。 + +它还可以使用,输了保存.jpg文件外。同时也是那些像Gimp或者Shotwell的那些‘正规’图片调整工具的一个灵活替代品。 + +While web apps and Chrome Apps¹ like [Pixlr Touch Up][1] and [Polarr][2] offer similar features you may be looking for a truly native solution. +虽然web应用和Chrome Apps¹像[Pixlr Touch Up][1] 和 [Polarr][2]提供另外相似的功能,而你也许正在寻找真正原生的解决方案。 + +对于此,用户友好带有容易使用滤镜的XnRetro很难被打败。 + +### 下载Ubuntu下的XnRetro ### + +XnRetro没有可用的.deb安装包。它以二进制文件的形式发型,这意味着你需要每次双击程序来运行。它也只有32位的版本。 + +你可以使用下面的XnRetro下载链接。下载完成后你需要解压压缩包并进入。双击里面的‘xnretro’程序。 + +- [下载Linux版XnRetro (32位, tar.gz)][3] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/05/instagram-photo-filters-ubuntu-desktop-app + +作者:[Joey-Elijah Sneddon][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgchrome.com/?s=pixlr +[2]:http://www.omgchrome.com/the-best-chrome-apps-of-2014/ +[3]:http://www.xnview.com/en/xnretro/#downloads From 03960afa819cccf18a5db08834e36e50022da6e6 Mon Sep 17 00:00:00 2001 From: zhangkun Date: Sun, 24 May 2015 15:43:19 +0800 Subject: [PATCH 0936/2517] Finished translating --- ... Manage 'Suse' Linux Package Management.md | 1594 ++++++++--------- 1 file changed, 767 insertions(+), 827 deletions(-) diff --git a/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md b/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md index 1f5661e8c4..bfd3eeeaf5 100644 --- a/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md +++ b/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md @@ -1,827 +1,767 @@ -zhangboyue 翻译中 -45 Zypper Commands to Manage ‘Suse’ Linux Package Management -================================================================================ -SUSE (Software and System Entwicklung (Germany) meaning Software and System Development, in English) Linux lies on top of Linux Kernel brought by Novell. SUSE comes in two pack. One of them is called OpenSUSE, which is freely available (free as in speech as well as free as in wine). It is a community driven project packed with latest application support, the latest stable release of OpenSUSE Linux is 13.2. - -The other is SUSE Linux Enterprise which is a commercial Linux Distribution designed specially for enterprise and production. SUSE Linux Enterprise edition comes with a variety of Enterprise Applications and features suited for production environment, the latest stable release of SUSE Linux Enterprise Edition is 12. - -You may like to check the detailed installation instruction of SUSE Linux Enterprise Server at: - -- [Installation of SUSE Linux Enterprise Server 12][1] - -Zypper and YaST are the Package Manager for SUSE Linux, which works on top of RPM. - -YaST which stands for Yet another Setup Tool is a tool that works on OpenSUSE and SUSE Enterprise edition to administer, setup and configure SUSE Linux. - -Zypper is the command line interface of ZYpp package manager for installing, removing and updating SUSE. ZYpp is the package management engine that powers both Zypper and YaST. - -Here in this article we will see Zypper in action, which will be installing, updating, removing and doing every other thing a package manager can do. Here we go… - -**Important** : Remember all these command are meant for system wide changes hence must be run as root, else the command will fail. - -### Getting Basic Help with Zypper ### - -1. Run zypper without any option, will give you a list of all global options and commands. - - # zypper - - Usage: - zypper [--global-options] - -2. To get help on a specific command say ‘in’ (install), run the below commands. - - # zypper help in - OR - # zypper help install - - install (in) [options] ... - - Install packages with specified capabilities or RPM files with specified - location. A capability is NAME[.ARCH][OP], where OP is one - of <, <=, =, >=, >. - - Command options: - --from Select packages from the specified repository. - -r, --repo Load only the specified repository. - -t, --type Type of package (package, patch, pattern, product, srcpackage). - Default: package. - -n, --name Select packages by plain name, not by capability. - -C, --capability Select packages by capability. - -f, --force Install even if the item is already installed (reinstall), - downgraded or changes vendor or architecture. - --oldpackage Allow to replace a newer item with an older one. - Handy if you are doing a rollback. Unlike --force - it will not enforce a reinstall. - --replacefiles Install the packages even if they replace files from other, - already installed, packages. Default is to treat file conflicts - as an error. --download-as-needed disables the fileconflict check. - ...... - -3. Search for a package (say gnome-desktop) before installing. - - # zypper se gnome-desktop - - Retrieving repository 'openSUSE-13.2-Debug' metadata ............................................................[done] - Building repository 'openSUSE-13.2-Debug' cache .................................................................[done] - Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ......................................................... [done] - Building repository 'openSUSE-13.2-Non-Oss' cache ...............................................................[done] - Retrieving repository 'openSUSE-13.2-Oss' metadata ..............................................................[done] - Building repository 'openSUSE-13.2-Oss' cache ...................................................................[done] - Retrieving repository 'openSUSE-13.2-Update' metadata ...........................................................[done] - Building repository 'openSUSE-13.2-Update' cache ................................................................[done] - Retrieving repository 'openSUSE-13.2-Update-Non-Oss' metadata ...................................................[done] - Building repository 'openSUSE-13.2-Update-Non-Oss' cache ........................................................[done] - Loading repository data... - Reading installed packages... - - S | Name | Summary | Type - --+---------------------------------------+-----------------------------------------------------------+----------- - | gnome-desktop2-lang | Languages for package gnome-desktop2 | package - | gnome-desktop2 | The GNOME Desktop API Library | package - | libgnome-desktop-2-17 | The GNOME Desktop API Library | package - | libgnome-desktop-3-10 | The GNOME Desktop API Library | package - | libgnome-desktop-3-devel | The GNOME Desktop API Library -- Development Files | package - | libgnome-desktop-3_0-common | The GNOME Desktop API Library -- Common data files | package - | gnome-desktop-debugsource | Debug sources for package gnome-desktop | package - | gnome-desktop-sharp2-debugsource | Debug sources for package gnome-desktop-sharp2 | package - | gnome-desktop2-debugsource | Debug sources for package gnome-desktop2 | package - | libgnome-desktop-2-17-debuginfo | Debug information for package libgnome-desktop-2-17 | package - | libgnome-desktop-3-10-debuginfo | Debug information for package libgnome-desktop-3-10 | package - | libgnome-desktop-3_0-common-debuginfo | Debug information for package libgnome-desktop-3_0-common | package - | libgnome-desktop-2-17-debuginfo-32bit | Debug information for package libgnome-desktop-2-17 | package - | libgnome-desktop-3-10-debuginfo-32bit | Debug information for package libgnome-desktop-3-10 | package - | gnome-desktop-sharp2 | Mono bindings for libgnome-desktop | package - | libgnome-desktop-2-devel | The GNOME Desktop API Library -- Development Files | package - | gnome-desktop-lang | Languages for package gnome-desktop | package - | libgnome-desktop-2-17-32bit | The GNOME Desktop API Library | package - | libgnome-desktop-3-10-32bit | The GNOME Desktop API Library | package - | gnome-desktop | The GNOME Desktop API Library | srcpackage - -4. Get information on a pattern package (say lamp_server) using following command. - - # zypper info -t pattern lamp_server - - Loading repository data... - Reading installed packages... - - - Information for pattern lamp_server: - ------------------------------------ - Repository: openSUSE-13.2-Update - Name: lamp_server - Version: 20141007-5.1 - Arch: x86_64 - Vendor: openSUSE - Installed: No - Visible to User: Yes - Summary: Web and LAMP Server - Description: - Software to set up a Web server that is able to serve static, dynamic, and interactive content (like a Web shop). This includes Apache HTTP Server, the database management system MySQL, - and scripting languages such as PHP, Python, Ruby on Rails, or Perl. - Contents: - - S | Name | Type | Dependency - --+-------------------------------+---------+----------- - | apache2-mod_php5 | package | - | php5-iconv | package | - i | patterns-openSUSE-base | package | - i | apache2-prefork | package | - | php5-dom | package | - | php5-mysql | package | - i | apache2 | package | - | apache2-example-pages | package | - | mariadb | package | - | apache2-mod_perl | package | - | php5-ctype | package | - | apache2-doc | package | - | yast2-http-server | package | - | patterns-openSUSE-lamp_server | package | - -5. To open zypper shell session run the below command. - - # zypper shell - OR - # zypper sh - - zypper> help - Usage: - zypper [--global-options] - -**Note**: On Zypper shell type ‘help‘ to get a list of global options and commands. - -### Zypper Repository Management ### - -#### Listing Defined Repositories #### - -6. Use zypper repos or zypper lr commands to list all the defined repositories. - - # zypper repos - OR - # zypper lr - - | Alias | Name | Enabled | Refresh - --+---------------------------+------------------------------------+---------+-------- - 1 | openSUSE-13.2-0 | openSUSE-13.2-0 | Yes | No - 2 | repo-debug | openSUSE-13.2-Debug | Yes | Yes - 3 | repo-debug-update | openSUSE-13.2-Update-Debug | No | Yes - 4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No | Yes - 5 | repo-non-oss | openSUSE-13.2-Non-Oss | Yes | Yes - 6 | repo-oss | openSUSE-13.2-Oss | Yes | Yes - 7 | repo-source | openSUSE-13.2-Source | No | Yes - 8 | repo-update | openSUSE-13.2-Update | Yes | Yes - 9 | repo-update-non-oss | openSUSE-13.2-Update-Non-Oss | Yes | Yes - -7. List zypper URI on the table. - - # zypper lr -u - - # | Alias | Name | Enabled | Refresh | URI - --+---------------------------+------------------------------------+---------+---------+---------------------------------------------------------------- - 1 | openSUSE-13.2-0 | openSUSE-13.2-0 | Yes | No | cd:///?devices=/dev/disk/by-id/ata-VBOX_CD-ROM_VB2-01700376 - 2 | repo-debug | openSUSE-13.2-Debug | Yes | Yes | http://download.opensuse.org/debug/distribution/13.2/repo/oss/ - 3 | repo-debug-update | openSUSE-13.2-Update-Debug | No | Yes | http://download.opensuse.org/debug/update/13.2/ - 4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No | Yes | http://download.opensuse.org/debug/update/13.2-non-oss/ - 5 | repo-non-oss | openSUSE-13.2-Non-Oss | Yes | Yes | http://download.opensuse.org/distribution/13.2/repo/non-oss/ - 6 | repo-oss | openSUSE-13.2-Oss | Yes | Yes | http://download.opensuse.org/distribution/13.2/repo/oss/ - 7 | repo-source | openSUSE-13.2-Source | No | Yes | http://download.opensuse.org/source/distribution/13.2/repo/oss/ - 8 | repo-update | openSUSE-13.2-Update | Yes | Yes | http://download.opensuse.org/update/13.2/ - 9 | repo-update-non-oss | openSUSE-13.2-Update-Non-Oss | Yes | Yes | http://download.opensuse.org/update/13.2-non-oss/ - -8. List repository priority and list by priority. - - # zypper lr -P - - # | Alias | Name | Enabled | Refresh | Priority - --+---------------------------+------------------------------------+---------+---------+--------- - 1 | openSUSE-13.2-0 | openSUSE-13.2-0 | Yes | No | 99 - 2 | repo-debug | openSUSE-13.2-Debug | Yes | Yes | 99 - 3 | repo-debug-update | openSUSE-13.2-Update-Debug | No | Yes | 99 - 4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No | Yes | 99 - 5 | repo-non-oss | openSUSE-13.2-Non-Oss | Yes | Yes | 85 - 6 | repo-oss | openSUSE-13.2-Oss | Yes | Yes | 99 - 7 | repo-source | openSUSE-13.2-Source | No | Yes | 99 - 8 | repo-update | openSUSE-13.2-Update | Yes | Yes | 99 - 9 | repo-update-non-oss | openSUSE-13.2-Update-Non-Oss | Yes | Yes | 99 - -#### Refreshing Repositories #### - -9. Use commands zypper refresh or zypper ref to refresh zypper repositories. - - # zypper refresh - OR - # zypper ref - - Repository 'openSUSE-13.2-0' is up to date. - Repository 'openSUSE-13.2-Debug' is up to date. - Repository 'openSUSE-13.2-Non-Oss' is up to date. - Repository 'openSUSE-13.2-Oss' is up to date. - Repository 'openSUSE-13.2-Update' is up to date. - Repository 'openSUSE-13.2-Update-Non-Oss' is up to date. - All repositories have been refreshed. - -10. To refresh a specific repository say ‘repo-non-oss‘, type: - - # zypper refresh repo-non-oss - - Repository 'openSUSE-13.2-Non-Oss' is up to date. - Specified repositories have been refreshed. - -11. To force update a repository say ‘repo-non-oss‘, type: - - # zypper ref -f repo-non-oss - - Forcing raw metadata refresh - Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ............................................................[done] - Forcing building of repository cache - Building repository 'openSUSE-13.2-Non-Oss' cache ............................................................[done] - Specified repositories have been refreshed. - -#### Modifying Repositories #### - -Here, we use ‘zypper modifyrepo‘ or ‘zypper mr‘ commands to disable, enable zypper repositories. - -12. Before disabling repository, you must know that in Zypper, every repository has its own unique number, that is used to disable or enable a repository. - -Let’s say you want to disable repository ‘repo-oss‘, to disable first you need to its number by typing following command. - - # zypper lr - - # | Alias | Name | Enabled | Refresh - --+---------------------------+------------------------------------+---------+-------- - 1 | openSUSE-13.2-0 | openSUSE-13.2-0 | Yes | No - 2 | repo-debug | openSUSE-13.2-Debug | Yes | Yes - 3 | repo-debug-update | openSUSE-13.2-Update-Debug | No | Yes - 4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No | Yes - 5 | repo-non-oss | openSUSE-13.2-Non-Oss | Yes | Yes - 6 | repo-oss | openSUSE-13.2-Oss | No | Yes - 7 | repo-source | openSUSE-13.2-Source | No | Yes - 8 | repo-update | openSUSE-13.2-Update | Yes | Yes - 9 | repo-update-non-oss | openSUSE-13.2-Update-Non-Oss | Yes | Yes - -Do you see in the above output, that the repository ‘repo-oss‘ having number 6, to disable this you need to specify number 6 along with following command. - - # zypper mr -d 6 - - Repository 'repo-oss' has been successfully disabled. - -13. To enable again same repository ‘repo-oss‘, which appears at number 6 (as shown in above example). - - # zypper mr -e 6 - - Repository 'repo-oss' has been successfully enabled. - -14. Enable auto-refresh and rpm file ‘caching‘ for a repo say ‘repo-non-oss‘ and set its priority to say 85. - - # zypper mr -rk -p 85 repo-non-oss - - Repository 'repo-non-oss' priority has been left unchanged (85) - Nothing to change for repository 'repo-non-oss'. - -15. Disable rpm file caching for all the repositories. - - # zypper mr -Ka - - RPM files caching has been disabled for repository 'openSUSE-13.2-0'. - RPM files caching has been disabled for repository 'repo-debug'. - RPM files caching has been disabled for repository 'repo-debug-update'. - RPM files caching has been disabled for repository 'repo-debug-update-non-oss'. - RPM files caching has been disabled for repository 'repo-non-oss'. - RPM files caching has been disabled for repository 'repo-oss'. - RPM files caching has been disabled for repository 'repo-source'. - RPM files caching has been disabled for repository 'repo-update'. - RPM files caching has been disabled for repository 'repo-update-non-oss'. - -16. Enable rpm file caching for all the repositories. - - # zypper mr -ka - - RPM files caching has been enabled for repository 'openSUSE-13.2-0'. - RPM files caching has been enabled for repository 'repo-debug'. - RPM files caching has been enabled for repository 'repo-debug-update'. - RPM files caching has been enabled for repository 'repo-debug-update-non-oss'. - RPM files caching has been enabled for repository 'repo-non-oss'. - RPM files caching has been enabled for repository 'repo-oss'. - RPM files caching has been enabled for repository 'repo-source'. - RPM files caching has been enabled for repository 'repo-update'. - RPM files caching has been enabled for repository 'repo-update-non-oss'. - -17. Disable rpm file caching for remote repositories. - - # zypper mr -Kt - - RPM files caching has been disabled for repository 'repo-debug'. - RPM files caching has been disabled for repository 'repo-debug-update'. - RPM files caching has been disabled for repository 'repo-debug-update-non-oss'. - RPM files caching has been disabled for repository 'repo-non-oss'. - RPM files caching has been disabled for repository 'repo-oss'. - RPM files caching has been disabled for repository 'repo-source'. - RPM files caching has been disabled for repository 'repo-update'. - RPM files caching has been disabled for repository 'repo-update-non-oss'. - -18. Enable rpm file caching for remote repositories. - - # zypper mr -kt - - RPM files caching has been enabled for repository 'repo-debug'. - RPM files caching has been enabled for repository 'repo-debug-update'. - RPM files caching has been enabled for repository 'repo-debug-update-non-oss'. - RPM files caching has been enabled for repository 'repo-non-oss'. - RPM files caching has been enabled for repository 'repo-oss'. - RPM files caching has been enabled for repository 'repo-source'. - RPM files caching has been enabled for repository 'repo-update'. - RPM files caching has been enabled for repository 'repo-update-non-oss'. - -#### Adding Repositories #### - -You may make use of any of the two commands – ‘zypper addrepo‘ or ‘zypper ar‘. You may use repo url or alias to add Repository. - -19. Add a repository say “http://download.opensuse.org/update/12.3/”. - - # zypper ar http://download.opensuse.org/update/11.1/ update - - Adding repository 'update' .............................................................................................................................................................[done] - Repository 'update' successfully added - Enabled : Yes - Autorefresh : No - GPG check : Yes - URI : http://download.opensuse.org/update/11.1/ - -20. Rename a repository. It will change the alias only. You may use command ‘zypper namerepo‘ or ‘zypper nr‘. To rename aka change alias of a repo that appears at number 10 (zypper lr) to upd8, run the below command. - - # zypper nr 10 upd8 - - Repository 'update' renamed to 'upd8'. - -#### Removing Repositories #### - -21. Remove a repository. It will remove the repository from the system. You may use the command ‘zypper removerepo‘ or ‘zypper rr‘. To remove a repo say ‘upd8‘, run the below command. - - # zypper rr upd8 - - # Removing repository 'upd8' .........................................................................................[done] - Repository 'upd8' has been removed. - -### Package Management using Zypper ### - -#### Install a Package with Zypper #### - -22. With Zypper, we can install packages based upon capability name. For example, to install a package (say Mozilla Firefox) using capability name. - - # zypper in MozillaFirefox - - Loading repository data... - Reading installed packages... - Resolving package dependencies... - - The following 128 NEW packages are going to be installed: - adwaita-icon-theme at-spi2-atk-common at-spi2-atk-gtk2 at-spi2-core cantarell-fonts cups-libs desktop-file-utils fontconfig gdk-pixbuf-query-loaders gstreamer gstreamer-fluendo-mp3 - gstreamer-plugins-base gtk2-branding-openSUSE gtk2-data gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese gtk2-metatheme-adwaita - gtk2-theming-engine-adwaita gtk2-tools gtk3-data gtk3-metatheme-adwaita gtk3-tools hicolor-icon-theme hicolor-icon-theme-branding-openSUSE libasound2 libatk-1_0-0 libatk-bridge-2_0-0 - libatspi0 libcairo2 libcairo-gobject2 libcanberra0 libcanberra-gtk0 libcanberra-gtk2-module libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-gtk-module-common libcdda_interface0 - libcdda_paranoia0 libcolord2 libdrm2 libdrm_intel1 libdrm_nouveau2 libdrm_radeon1 libFLAC8 libfreebl3 libgbm1 libgdk_pixbuf-2_0-0 libgraphite2-3 libgstapp-1_0-0 libgstaudio-1_0-0 - libgstpbutils-1_0-0 libgstreamer-1_0-0 libgstriff-1_0-0 libgsttag-1_0-0 libgstvideo-1_0-0 libgthread-2_0-0 libgtk-2_0-0 libgtk-3-0 libharfbuzz0 libjasper1 libjbig2 libjpeg8 libjson-c2 - liblcms2-2 libLLVM libltdl7 libnsssharedhelper0 libogg0 liborc-0_4-0 libpackagekit-glib2-18 libpango-1_0-0 libpciaccess0 libpixman-1-0 libpulse0 libsndfile1 libsoftokn3 libspeex1 - libsqlite3-0 libstartup-notification-1-0 libtheoradec1 libtheoraenc1 libtiff5 libvisual libvorbis0 libvorbisenc2 libvorbisfile3 libwayland-client0 libwayland-cursor0 libwayland-server0 - libX11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb-xfixes0 libXcomposite1 libXcursor1 libXdamage1 libXevie1 - libXfixes3 libXft2 libXi6 libXinerama1 libxkbcommon-0_4_3 libXrandr2 libXrender1 libxshmfence1 libXtst6 libXv1 libXxf86vm1 Mesa Mesa-libEGL1 Mesa-libGL1 Mesa-libglapi0 - metatheme-adwaita-common MozillaFirefox MozillaFirefox-branding-openSUSE mozilla-nss mozilla-nss-certs PackageKit-gstreamer-plugin pango-tools sound-theme-freedesktop - - The following 10 recommended packages were automatically selected: - gstreamer-fluendo-mp3 gtk2-branding-openSUSE gtk2-data gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese libcanberra0 libpulse0 - PackageKit-gstreamer-plugin - - 128 new packages to install. - Overall download size: 77.2 MiB. Already cached: 0 B After the operation, additional 200.0 MiB will be used. - Continue? [y/n/? shows all options] (y): y - Retrieving package cantarell-fonts-0.0.16-1.1.noarch (1/128), 74.1 KiB (115.6 KiB unpacked) - Retrieving: cantarell-fonts-0.0.16-1.1.noarch.rpm .........................................................................................................................[done (63.4 KiB/s)] - Retrieving package hicolor-icon-theme-0.13-2.1.2.noarch (2/128), 40.1 KiB ( 50.5 KiB unpacked) - Retrieving: hicolor-icon-theme-0.13-2.1.2.noarch.rpm ...................................................................................................................................[done] - Retrieving package sound-theme-freedesktop-0.8-7.1.2.noarch (3/128), 372.6 KiB (460.3 KiB unpacked) - -23. Install a package (say gcc) using version. - - # zypper in 'gcc<5.1' - - Loading repository data... - Reading installed packages... - Resolving package dependencies... - - The following 13 NEW packages are going to be installed: - cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49 - - 13 new packages to install. - Overall download size: 14.5 MiB. Already cached: 0 B After the operation, additional 49.4 MiB will be used. - Continue? [y/n/? shows all options] (y): y - -24. Install a package (say gcc) for architecture (say i586). - - # zypper in gcc.i586 - - Loading repository data... - Reading installed packages... - Resolving package dependencies... - - The following 13 NEW packages are going to be installed: - cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49 - - 13 new packages to install. - Overall download size: 14.5 MiB. Already cached: 0 B After the operation, additional 49.4 MiB will be used. - Continue? [y/n/? shows all options] (y): y - Retrieving package libasan0-4.8.3+r212056-2.2.4.x86_64 (1/13), 74.2 KiB (166.9 KiB unpacked) - Retrieving: libasan0-4.8.3+r212056-2.2.4.x86_64.rpm .......................................................................................................................[done (79.2 KiB/s)] - Retrieving package libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64 (2/13), 14.3 KiB ( 26.1 KiB unpacked) - Retrieving: libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm ...............................................................................................................[done (55.3 KiB/s)] - -25. Install a package (say gcc) for specific architecture (say i586) and specific version (say <5.1), - - # zypper in 'gcc.i586<5.1' - - Loading repository data... - Reading installed packages... - Resolving package dependencies... - - The following 13 NEW packages are going to be installed: - cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49 - - 13 new packages to install. - Overall download size: 14.4 MiB. Already cached: 129.5 KiB After the operation, additional 49.4 MiB will be used. - Continue? [y/n/? shows all options] (y): y - In cache libasan0-4.8.3+r212056-2.2.4.x86_64.rpm (1/13), 74.2 KiB (166.9 KiB unpacked) - In cache libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm (2/13), 14.3 KiB ( 26.1 KiB unpacked) - In cache libgomp1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm (3/13), 41.1 KiB ( 90.7 KiB unpacked) - -26. Install a Package (say libxine) from repository (amarok). - - # zypper in amarok upd:libxine1 - - Loading repository data... - Reading installed packages... - Resolving package dependencies... - The following 202 NEW packages are going to be installed: - amarok bundle-lang-kde-en clamz cups-libs enscript fontconfig gdk-pixbuf-query-loaders ghostscript-fonts-std gptfdisk gstreamer gstreamer-plugins-base hicolor-icon-theme - hicolor-icon-theme-branding-openSUSE htdig hunspell hunspell-tools icoutils ispell ispell-american kde4-filesystem kdebase4-runtime kdebase4-runtime-branding-openSUSE kdelibs4 - kdelibs4-branding-openSUSE kdelibs4-core kdialog libakonadi4 l - ..... - -27. Install a Package (say git) using name (-n). - - # zypper in -n git - - Loading repository data... - Reading installed packages... - Resolving package dependencies... - - The following 35 NEW packages are going to be installed: - cvs cvsps fontconfig git git-core git-cvs git-email git-gui gitk git-svn git-web libserf-1-1 libsqlite3-0 libXft2 libXrender1 libXss1 perl-Authen-SASL perl-Clone perl-DBD-SQLite perl-DBI - perl-Error perl-IO-Socket-SSL perl-MLDBM perl-Net-Daemon perl-Net-SMTP-SSL perl-Net-SSLeay perl-Params-Util perl-PlRPC perl-SQL-Statement perl-Term-ReadKey subversion subversion-perl tcl - tk xhost - - The following 13 recommended packages were automatically selected: - git-cvs git-email git-gui gitk git-svn git-web perl-Authen-SASL perl-Clone perl-MLDBM perl-Net-Daemon perl-Net-SMTP-SSL perl-PlRPC perl-SQL-Statement - - The following package is suggested, but will not be installed: - git-daemon - - 35 new packages to install. - Overall download size: 15.6 MiB. Already cached: 0 B After the operation, additional 56.7 MiB will be used. - Continue? [y/n/? shows all options] (y): y - -28. Install a package using wildcards. For example, install all php5 packages. - - # zypper in php5* - - Loading repository data... - Reading installed packages... - Resolving package dependencies... - - Problem: php5-5.6.1-18.1.x86_64 requires smtp_daemon, but this requirement cannot be provided - uninstallable providers: exim-4.83-3.1.8.x86_64[openSUSE-13.2-0] - postfix-2.11.0-5.2.2.x86_64[openSUSE-13.2-0] - sendmail-8.14.9-2.2.2.x86_64[openSUSE-13.2-0] - exim-4.83-3.1.8.i586[repo-oss] - msmtp-mta-1.4.32-2.1.3.i586[repo-oss] - postfix-2.11.0-5.2.2.i586[repo-oss] - sendmail-8.14.9-2.2.2.i586[repo-oss] - exim-4.83-3.1.8.x86_64[repo-oss] - msmtp-mta-1.4.32-2.1.3.x86_64[repo-oss] - postfix-2.11.0-5.2.2.x86_64[repo-oss] - sendmail-8.14.9-2.2.2.x86_64[repo-oss] - postfix-2.11.3-5.5.1.i586[repo-update] - postfix-2.11.3-5.5.1.x86_64[repo-update] - Solution 1: Following actions will be done: - do not install php5-5.6.1-18.1.x86_64 - do not install php5-pear-Auth_SASL-1.0.6-7.1.3.noarch - do not install php5-pear-Horde_Http-2.0.1-6.1.3.noarch - do not install php5-pear-Horde_Image-2.0.1-6.1.3.noarch - do not install php5-pear-Horde_Kolab_Format-2.0.1-6.1.3.noarch - do not install php5-pear-Horde_Ldap-2.0.1-6.1.3.noarch - do not install php5-pear-Horde_Memcache-2.0.1-7.1.3.noarch - do not install php5-pear-Horde_Mime-2.0.2-6.1.3.noarch - do not install php5-pear-Horde_Oauth-2.0.0-6.1.3.noarch - do not install php5-pear-Horde_Pdf-2.0.1-6.1.3.noarch - .... - -29. Install a Package (say lamp_server) using pattern (group of packages). - - # zypper in -t pattern lamp_server - - ading repository data... - Reading installed packages... - Resolving package dependencies... - - The following 29 NEW packages are going to be installed: - apache2 apache2-doc apache2-example-pages apache2-mod_perl apache2-prefork patterns-openSUSE-lamp_server perl-Data-Dump perl-Encode-Locale perl-File-Listing perl-HTML-Parser - perl-HTML-Tagset perl-HTTP-Cookies perl-HTTP-Daemon perl-HTTP-Date perl-HTTP-Message perl-HTTP-Negotiate perl-IO-HTML perl-IO-Socket-SSL perl-libwww-perl perl-Linux-Pid - perl-LWP-MediaTypes perl-LWP-Protocol-https perl-Net-HTTP perl-Net-SSLeay perl-Tie-IxHash perl-TimeDate perl-URI perl-WWW-RobotRules yast2-http-server - - The following NEW pattern is going to be installed: - lamp_server - - The following 10 recommended packages were automatically selected: - apache2 apache2-doc apache2-example-pages apache2-mod_perl apache2-prefork perl-Data-Dump perl-IO-Socket-SSL perl-LWP-Protocol-https perl-TimeDate yast2-http-server - - 29 new packages to install. - Overall download size: 7.2 MiB. Already cached: 1.2 MiB After the operation, additional 34.7 MiB will be used. - Continue? [y/n/? shows all options] (y): - -30. Install a Package (say nano) and remove a package (say vi) in one go. - - # zypper in nano -vi - - Loading repository data... - Reading installed packages... - '-vi' not found in package names. Trying capabilities. - Resolving package dependencies... - - The following 2 NEW packages are going to be installed: - nano nano-lang - - The following package is going to be REMOVED: - vim - - The following recommended package was automatically selected: - nano-lang - - 2 new packages to install, 1 to remove. - Overall download size: 550.0 KiB. Already cached: 0 B After the operation, 463.3 KiB will be freed. - Continue? [y/n/? shows all options] (y): - ... - -31. Install a rpm package (say teamviewer). - - # zypper in teamviewer*.rpm - - Loading repository data... - Reading installed packages... - Resolving package dependencies... - - The following 24 NEW packages are going to be installed: - alsa-oss-32bit fontconfig-32bit libasound2-32bit libexpat1-32bit libfreetype6-32bit libgcc_s1-gcc49-32bit libICE6-32bit libjpeg62-32bit libpng12-0-32bit libpng16-16-32bit libSM6-32bit - libuuid1-32bit libX11-6-32bit libXau6-32bit libxcb1-32bit libXdamage1-32bit libXext6-32bit libXfixes3-32bit libXinerama1-32bit libXrandr2-32bit libXrender1-32bit libXtst6-32bit - libz1-32bit teamviewer - - The following recommended package was automatically selected: - alsa-oss-32bit - - 24 new packages to install. - Overall download size: 41.2 MiB. Already cached: 0 B After the operation, additional 119.7 MiB will be used. - Continue? [y/n/? shows all options] (y): - .. - -#### Remove a Package with Zypper #### - -32. To remove any package, you can use ‘zypper remove‘ or ‘zypper rm‘ commands. For example, to remove a package (say apache2), run: - - # zypper remove apache2 - Or - # zypper rm apache2 - - Loading repository data... - Reading installed packages... - Resolving package dependencies... - - The following 2 packages are going to be REMOVED: - apache2 apache2-prefork - - 2 packages to remove. - After the operation, 4.2 MiB will be freed. - Continue? [y/n/? shows all options] (y): y - (1/2) Removing apache2-2.4.10-19.1 ........................................................................[done] - (2/2) Removing apache2-prefork-2.4.10-19.1 ................................................................[done] - -#### Updating Packages using Zypper #### - -33. Update all packages. You may use commands ‘zypper update‘ or ‘zypper up‘. - - # zypper up - OR - # zypper update - - Loading repository data... - Reading installed packages... - Nothing to do. - -34. Update specific packages (say apache2 and openssh). - - # zypper up apache2 openssh - - Loading repository data... - Reading installed packages... - No update candidate for 'apache2-2.4.10-19.1.x86_64'. The highest available version is already installed. - No update candidate for 'openssh-6.6p1-5.1.3.x86_64'. The highest available version is already installed. - Resolving package dependencies... - - Nothing to do. - -35. Install a package say (mariadb) if not installed, if installed update it. - - # zypper in mariadb - - Loading repository data... - Reading installed packages... - 'mariadb' is already installed. - No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed. - Resolving package dependencies... - - Nothing to do. - -#### Install Source and Build Dependencies #### - -You may use ‘zypper source-install‘ or ‘zypper si‘ commands to build packages from source. - -36. Install source packages and build their dependencies for a package (say mariadb). - - # zypper si mariadb - - Reading installed packages... - Loading repository data... - Resolving package dependencies... - - The following 36 NEW packages are going to be installed: - autoconf automake bison cmake cpp cpp48 gcc gcc48 gcc48-c++ gcc-c++ libaio-devel libarchive13 libasan0 libatomic1-gcc49 libcloog-isl4 libedit-devel libevent-devel libgomp1-gcc49 libisl10 - libitm1-gcc49 libltdl7 libmpc3 libmpfr4 libopenssl-devel libstdc++48-devel libtool libtsan0-gcc49 m4 make ncurses-devel pam-devel readline-devel site-config tack tcpd-devel zlib-devel - - The following source package is going to be installed: - mariadb - - 36 new packages to install, 1 source package. - Overall download size: 71.5 MiB. Already cached: 129.5 KiB After the operation, additional 183.9 MiB will be used. - Continue? [y/n/? shows all options] (y): y - -37. Install only the source for a package (say mariadb). - - # zypper in -D mariadb - - Loading repository data... - Reading installed packages... - 'mariadb' is already installed. - No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed. - Resolving package dependencies... - - Nothing to do. - -38. Install only the build dependencies for a packages (say mariadb). - - # zypper si -d mariadb - - Reading installed packages... - Loading repository data... - Resolving package dependencies... - - The following 36 NEW packages are going to be installed: - autoconf automake bison cmake cpp cpp48 gcc gcc48 gcc48-c++ gcc-c++ libaio-devel libarchive13 libasan0 libatomic1-gcc49 libcloog-isl4 libedit-devel libevent-devel libgomp1-gcc49 libisl10 - libitm1-gcc49 libltdl7 libmpc3 libmpfr4 libopenssl-devel libstdc++48-devel libtool libtsan0-gcc49 m4 make ncurses-devel pam-devel readline-devel site-config tack tcpd-devel zlib-devel - - The following package is recommended, but will not be installed due to conflicts or dependency issues: - readline-doc - - 36 new packages to install. - Overall download size: 33.7 MiB. Already cached: 129.5 KiB After the operation, additional 144.3 MiB will be used. - Continue? [y/n/? shows all options] (y): y - -#### Zypper in Scripts and Applications #### - -39. Install a Package (say mariadb) without interaction of user. - - # zypper --non-interactive in mariadb - - Loading repository data... - Reading installed packages... - 'mariadb' is already installed. - No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed. - Resolving package dependencies... - - Nothing to do. - -40. Remove a Package (say mariadb) without interaction of user. - - # zypper --non-interactive rm mariadb - - Loading repository data... - Reading installed packages... - Resolving package dependencies... - - The following package is going to be REMOVED: - mariadb - - 1 package to remove. - After the operation, 71.8 MiB will be freed. - Continue? [y/n/? shows all options] (y): y - (1/1) Removing mariadb-10.0.13-2.6.1 .............................................................................[done] - -41. Output zypper in xml. - - # zypper --xmlout - - - - Usage: - zypper [--global-options] [--command-options] [arguments] - - Global Options - .... - -42. Generate quiet output at installation. - - # zypper --quiet in mariadb - - The following NEW package is going to be installed: - mariadb - - 1 new package to install. - Overall download size: 0 B. Already cached: 7.8 MiB After the operation, additional 71.8 MiB will be used. - Continue? [y/n/? shows all options] (y): - ... - -43. Generate quiet output at UN-installation. - - # zypper --quiet rm mariadb - -44. Auto agree to Licenses/Agreements. - - # zypper patch --auto-agree-with-licenses - - Loading repository data... - Reading installed packages... - Resolving package dependencies... - - Nothing to do. - -#### Clean Zypper Cache and View History #### - -45. If you want to clean zypper cache only, you can use following command. - - # zypper clean - - All repositories have been cleaned up. - -If you want to clean metadata and package cache at once you may like to pass –all/-a with zypper as. - - # zypper clean -a - - All repositories have been cleaned up. - -46. To view logs of any installed, updated or removed packages through zypper, are logged in /var/log/zypp/history. You may cat it to view or may use filter to get a custom output. - - # cat /var/log/zypp/history - - 2015-05-07 15:43:03|install|boost-license1_54_0|1.54.0-10.1.3|noarch||openSUSE-13.2-0|0523b909d2aae5239f9841316dafaf3a37b4f096| - 2015-05-07 15:43:03|install|branding-openSUSE|13.2-3.6.1|noarch||openSUSE-13.2-0|6609def94b1987bf3f90a9467f4f7ab8f8d98a5c| - 2015-05-07 15:43:03|install|bundle-lang-common-en|13.2-3.3.1|noarch||openSUSE-13.2-0|ca55694e6fdebee6ce37ac7cf3725e2aa6edc342| - 2015-05-07 15:43:03|install|insserv-compat|0.1-12.2.2|noarch||openSUSE-13.2-0|6160de7fbf961a279591a83a1550093a581214d9| - 2015-05-07 15:43:03|install|libX11-data|1.6.2-5.1.2|noarch||openSUSE-13.2-0|f1cb58364ba9016c1f93b1a383ba12463c56885a| - 2015-05-07 15:43:03|install|libnl-config|3.2.25-2.1.2|noarch||openSUSE-13.2-0|aab2ded312a781e93b739b418e3d32fe4e187020| - 2015-05-07 15:43:04|install|wireless-regdb|2014.06.13-1.2|noarch||openSUSE-13.2-0|be8cb16f3e92af12b5ceb977e37e13f03c007bd1| - 2015-05-07 15:43:04|install|yast2-trans-en_US|3.1.0-2.1|noarch||openSUSE-13.2-0|1865754e5e0ec3c149ac850b340bcca55a3c404d| - 2015-05-07 15:43:04|install|yast2-trans-stats|2.19.0-16.1.3|noarch||openSUSE-13.2-0|b107d2b3e702835885b57b04d12d25539f262d1a| - 2015-05-07 15:43:04|install|cracklib-dict-full|2.8.12-64.1.2|x86_64||openSUSE-13.2-0|08bd45dbba7ad44e3a4837f730be76f55ad5dcfa| - ...... - -#### Upgrade Suse Using Zypper #### - -47. You can use ‘dist-upgrade‘ option with zypper command to upgrade your current Suse Linux to most recent version. - - # zypper dist-upgrade - - You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command. - Building repository 'openSUSE-13.2-0' cache .....................................................................[done] - Retrieving repository 'openSUSE-13.2-Debug' metadata ............................................................[done] - Building repository 'openSUSE-13.2-Debug' cache .................................................................[done] - Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ..........................................................[done] - Building repository 'openSUSE-13.2-Non-Oss' cache ...............................................................[done] - -That’s all for now. Hope this article would help you in managing you SUSE System and Server specially for newbies. If you feel that I left certain commands (Human are erroneous) you may provide us with the feedback in the comments so that we can update the article. Keep Connected, Keep Commenting, Stay tuned. Kudos! - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/zypper-commands-to-manage-suse-linux-package-management/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/installation-of-suse-linux-enterprise-server-12/ +45 个用于 ‘Suse‘ Linux 包管理的 Zypper 命令 +====================================================================== +SUSE( Software and System Entwicklung,即软件和系统开发。其中‘entwicklung‘是德语,意为开发)Linux是 Novell 公司在 Linux 内核基础上发布的操作系统。SUSE Linux 有两个发行分支。其中之一名为 OpenSUSE,这是一款自由而且免费的操作系统。该系统由开源社区开发维护,支持一些最新版本的应用软件,其最新的稳定版本为 13.2。 + +另外一个分支是SUSE Linux 企业版。该分支是一个为企业及商业化产品设计的 Linux 发行版,包含了大量的企业应用以及适用于商业产品生产环境的特性。其最新的稳定版本为 12。 + +以下的链接包含了安装企业版 SUSE Linux 服务器的详细信息。 + +- [如何安装企业版 SUSE Linux 12][1] + +Zypper 和 Yast 是 SUSE Linux 平台上的软件包管理工具,他们的底层使用了 RPM(译者注:RPM 最初指 Redhat Pacakge Manager ,现普遍解释为递归短语 RPM Package Manager 的缩写)。 + +Yast(Yet another Setup Tool )是 OpenSUSE 以及企业版 SUSE 上用于系统管理、设置和配置的工具。 + +Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUSE Linux上的软件以及进行系统更新。ZYpp为Zypper和Yast提供底层支持。 + +本文将介绍实际应用中常见的一些Zypper命令。这些命令用来进行安装、更新、删除等任何软件包管理器所能够胜任的工作。 + +**重要** : 切记所有的这些指令都将在系统全局范围内产生影响,所以必须以 root 身份执行,否则命令将失败。 + +### 获取基本的 Zypper 帮助信息 ### + +1. 不带任何选项的执行 zypper, 将输出该命令的全局选项以及子命令列表(译者注:全局选项,global option,控制台命令的输入分为可选参数和位置参数两大类。按照习惯,一般可选参数称为选项'option',而位置参数称为参数 'argument')。 + +
%>  zypper
+        Usage:
+        zypper [--global-options]
+ +2. 获取一个具体的子命令的帮助信息,比如 'in' (install),可以执行下面的命令 + +
%> zypper help in
+ 或者 +
%> zypper help install
+    install (in) [options] {capability | rpm_file_uri}
+    
+    Install packages with specified capabilities or RPM files with specified
+    location. A capability is NAME[.ARCH][OP], where OP is one
+    of <, <=, =, >=, >.
+    
+      Command options:
+    --from     Select packages from the specified repository.
+    -r, --repo     Load only the specified repository.
+    -t, --type            Type of package (package, patch, pattern, product, srcpackage).
+                                Default: package.
+    -n, --name                  Select packages by plain name, not by capability.
+    -C, --capability            Select packages by capability.
+    -f, --force                 Install even if the item is already installed (reinstall),
+                                downgraded or changes vendor or architecture.
+        --oldpackage            Allow to replace a newer item with an older one.
+                                Handy if you are doing a rollback. Unlike --force
+    j                            it will not enforce a reinstall.
+        --replacefiles          Install the packages even if they replace files from other,
+                                already installed, packages. Default is to treat file conflicts
+                                as an error. --download-as-needed disables the fileconflict check.
+    ...... 
+ +3. 安装之前搜索一个安转包(以 gnome-desktop 为例 ) + +
# zypper se gnome-desktop
+    
+    Retrieving repository 'openSUSE-13.2-Debug' metadata ............................................................[done]
+    Building repository 'openSUSE-13.2-Debug' cache .................................................................[done]
+    Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ......................................................... [done]
+    Building repository 'openSUSE-13.2-Non-Oss' cache ...............................................................[done]
+    Retrieving repository 'openSUSE-13.2-Oss' metadata ..............................................................[done]
+    Building repository 'openSUSE-13.2-Oss' cache ...................................................................[done]
+    Retrieving repository 'openSUSE-13.2-Update' metadata ...........................................................[done]
+    Building repository 'openSUSE-13.2-Update' cache ................................................................[done]
+    Retrieving repository 'openSUSE-13.2-Update-Non-Oss' metadata ...................................................[done]
+    Building repository 'openSUSE-13.2-Update-Non-Oss' cache ........................................................[done]
+    Loading repository data...
+    Reading installed packages...
+    
+    S | Name                                  | Summary                                                   | Type
+    --+---------------------------------------+-----------------------------------------------------------+-----------
+      | gnome-desktop2-lang                   | Languages for package gnome-desktop2                      | package
+      | gnome-desktop2                        | The GNOME Desktop API Library                             | package
+      | libgnome-desktop-2-17                 | The GNOME Desktop API Library                             | package
+      | libgnome-desktop-3-10                 | The GNOME Desktop API Library                             | package
+      | libgnome-desktop-3-devel              | The GNOME Desktop API Library -- Development Files        | package
+      | libgnome-desktop-3_0-common           | The GNOME Desktop API Library -- Common data files        | package
+      | gnome-desktop-debugsource             | Debug sources for package gnome-desktop                   | package
+      | gnome-desktop-sharp2-debugsource      | Debug sources for package gnome-desktop-sharp2            | package
+      | gnome-desktop2-debugsource            | Debug sources for package gnome-desktop2                  | package
+      | libgnome-desktop-2-17-debuginfo       | Debug information for package libgnome-desktop-2-17       | package
+      | libgnome-desktop-3-10-debuginfo       | Debug information for package libgnome-desktop-3-10       | package
+      | libgnome-desktop-3_0-common-debuginfo | Debug information for package libgnome-desktop-3_0-common | package
+      | libgnome-desktop-2-17-debuginfo-32bit | Debug information for package libgnome-desktop-2-17       | package
+      | libgnome-desktop-3-10-debuginfo-32bit | Debug information for package libgnome-desktop-3-10       | package
+      | gnome-desktop-sharp2                  | Mono bindings for libgnome-desktop                        | package
+      | libgnome-desktop-2-devel              | The GNOME Desktop API Library -- Development Files        | packag
+      | gnome-desktop-lang                    | Languages for package gnome-desktop                       | package
+      | libgnome-desktop-2-17-32bit           | The GNOME Desktop API Library                             | package
+      | libgnome-desktop-3-10-32bit           | The GNOME Desktop API Library                             | package
+      | gnome-desktop                         | The GNOME Desktop API Library                             | srcpackage
+ +4. 获取一个模式包的信息(以 lamp_server 为例)。 + +
%> zypper info -t pattern lamp_server
+    
+    Loading repository data...
+    Reading installed packages...
+    
+    
+    Information for pattern lamp_server:
+    ------------------------------------
+    Repository: openSUSE-13.2-Update
+    Name: lamp_server
+    Version: 20141007-5.1
+    Arch: x86_64
+    Vendor: openSUSE
+    Installed: No
+    Visible to User: Yes
+    Summary: Web and LAMP Server
+    Description: 
+      Software to set up a Web server that is able to serve static, dynamic, and interactive content (like a Web shop). This includes Apache HTTP Server, the database management system MySQL,
+      and scripting languages such as PHP, Python, Ruby on Rails, or Perl.
+    Contents:
+    
+    S | Name                          | Type    | Dependency
+    --+-------------------------------+---------+-----------
+      | apache2-mod_php5              | package |
+      | php5-iconv                    | package |
+    i | patterns-openSUSE-base        | package |
+    i | apache2-prefork               | package |
+      | php5-dom                      | package |
+      | php5-mysql                    | package |
+    i | apache2                       | package |
+      | apache2-example-pages         | package |
+      | mariadb                       | package |
+      | apache2-mod_perl              | package |
+      | php5-ctype                    | package |
+      | apache2-doc                   | package |
+      | yast2-http-server             | package |
+      | patterns-openSUSE-lamp_server | package |
+ +5. 开启一个Zypper Shell 的会话。 + +
 %>zypper shell 
+ 或者 +
 %>zypper sh 
+ +
zypper> help
+      Usage:
+    	zypper [--global-options]
+ +**注意**:在 Zypper shell里面可以通过键入 ‘help‘ 获得全局选项以及子命令的列表。 +### Zypper 软件库管理 ### + +#### 列举已定义的软件库 #### + +6. 使用 'zypper repos' 或者 'zypper lr' 来列举所有已定以的软件库。 + +
%> zypper repos
+ 或者 +
%> zypper lr
+      | Alias                     | Name                               | Enabled | Refresh
+    --+---------------------------+------------------------------------+---------+--------
+    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No
+    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes
+    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes
+    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes
+    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes
+    6 | repo-oss                  | openSUSE-13.2-Oss                  | Yes     | Yes
+    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes
+    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes
+    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes
+ +7. 在表格里面显示 zypper URI + +
# zypper lr -u
+      | Alias                     | Name                               | Enabled | Refresh | URI
+    --+---------------------------+------------------------------------+---------+---------+----------------------------------------------------------------
+    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No      | cd:///?devices=/dev/disk/by-id/ata-VBOX_CD-ROM_VB2-01700376
+    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes     | http://download.opensuse.org/debug/distribution/13.2/repo/oss/
+    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes     | http://download.opensuse.org/debug/update/13.2/
+    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes     | http://download.opensuse.org/debug/update/13.2-non-oss/
+    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes     | http://download.opensuse.org/distribution/13.2/repo/non-oss/
+    6 | repo-oss                  | openSUSE-13.2-Oss                  | Yes     | Yes     | http://download.opensuse.org/distribution/13.2/repo/oss/
+    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes     | http://download.opensuse.org/source/distribution/13.2/repo/oss/
+    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes     | http://download.opensuse.org/update/13.2/
+    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes     | http://download.opensuse.org/update/13.2-non-oss/
+ +8. 根据优先级列举软件库。 + +
%> zypper lr -P
+      | Alias                     | Name                               | Enabled | Refresh | Priority
+    --+---------------------------+------------------------------------+---------+---------+---------
+    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No      |   99
+    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes     |   99
+    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes     |   99
+    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes     |   99
+    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes     |   85
+    6 | repo-oss                  | openSUSE-13.2-Oss                  | Yes     | Yes     |   99
+    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes     |   99
+    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes     |   99
+    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes     |   99
+ +#### 刷新软件库 #### + +9. 使用 'zypper refresh' or 'zypper ref' 来刷新 zypper 软件库。 + +
%> zypper refresh 
+ 或者 +
%> zypper ref
+    Repository 'openSUSE-13.2-0' is up to date.
+    Repository 'openSUSE-13.2-Debug' is up to date.
+    Repository 'openSUSE-13.2-Non-Oss' is up to date.
+    Repository 'openSUSE-13.2-Oss' is up to date.
+    Repository 'openSUSE-13.2-Update' is up to date.
+    Repository 'openSUSE-13.2-Update-Non-Oss' is up to date.
+    All repositories have been refreshed. 
+ +10. 刷新一个指定的软件库(以 'repo-non-oss' 为例 )。 + +
%> zypper refresh repo-non-oss
+    Repository 'openSUSE-13.2-Non-Oss' is up to date.
+    Specified repositories have been refreshed. 
+ +11. 强制更新一个软件库(以 'repo-non-oss' 为例 )。 + +
%> zypper ref -f repo-non-oss 
+    Forcing raw metadata refresh
+    Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ............................................................[done]
+    Forcing building of repository cache
+    Building repository 'openSUSE-13.2-Non-Oss' cache ............................................................[done]
+    Specified repositories have been refreshed.
+ +#### 修改软件库 #### + +本文中我们使用‘zypper modifyrepo‘ 或者 ‘zypper mr‘ 来关闭或者开启 zypper 软件库。 + +12. 在关闭一个软件库之前,我们需要知道在 zypper中,每一个软件库有一个唯一的标示数字与之关联,该数字用于打开或者关闭与之相联系的软件库。假设我们需要关闭 'repo-oss' 软件库,那么我们可以通过以下的法来获得该软件库的标志数字。 + +
%> zypper lr
+      | Alias                     | Name                               | Enabled | Refresh
+    --+---------------------------+------------------------------------+---------+--------
+    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No
+    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes
+    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes
+    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes
+    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes
+    6 | repo-oss                  | openSUSE-13.2-Oss                  | No      | Yes
+    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes
+    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes
+    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes
+从以上输出的列表中我们可以看到 'repo-oss' 库的标示数字是 6,因此通过以下的命令来关闭该库。 + +
%> zypper mr -d 6
+    Repository 'repo-oss' has been successfully disabled.
+ +13. 如果需要再次开启软件库 ‘repo-oss‘, 接上例,与之相关联的标示数字为 6。 + +
%> zypper mr -e 6
+    Repository 'repo-oss' has been successfully enabled.
+ +14. 针对某一个软件库(以 'repo-non-oss' 为例 )开启自动刷新( auto-refresh )和 rpm 缓存,并设置该软件库的优先级,比如85。 + +
%> zypper mr -rk -p 85 repo-non-oss
+    Repository 'repo-non-oss' priority has been left unchanged (85)
+    Nothing to change for repository 'repo-non-oss'.
+ +15. 对所有的软件库关闭 rpm 文件缓存。 + +
%> zypper mr -Ka
+    RPM files caching has been disabled for repository 'openSUSE-13.2-0'.
+    RPM files caching has been disabled for repository 'repo-debug'.
+    RPM files caching has been disabled for repository 'repo-debug-update'.
+    RPM files caching has been disabled for repository 'repo-debug-update-non-oss'.
+    RPM files caching has been disabled for repository 'repo-non-oss'.
+    RPM files caching has been disabled for repository 'repo-oss'.
+    RPM files caching has been disabled for repository 'repo-source'.
+    RPM files caching has been disabled for repository 'repo-update'.
+    RPM files caching has been disabled for repository 'repo-update-non-oss'.
+ +16. 对所有的软件库开启 rpm 文件缓存。 +
 zypper mr -ka
+    RPM files caching has been enabled for repository 'openSUSE-13.2-0'.
+    RPM files caching has been enabled for repository 'repo-debug'.
+    RPM files caching has been enabled for repository 'repo-debug-update'.
+    RPM files caching has been enabled for repository 'repo-debug-update-non-oss'.
+    RPM files caching has been enabled for repository 'repo-non-oss'.
+    RPM files caching has been enabled for repository 'repo-oss'.
+    RPM files caching has been enabled for repository 'repo-source'.
+    RPM files caching has been enabled for repository 'repo-update'.
+    RPM files caching has been enabled for repository 'repo-update-non-oss'.
+ +17. 关闭远程库的rpm 文件缓存 +
%> zypper mr -Kt
+    RPM files caching has been disabled for repository 'repo-debug'.
+    RPM files caching has been disabled for repository 'repo-debug-update'.
+    RPM files caching has been disabled for repository 'repo-debug-update-non-oss'.
+    RPM files caching has been disabled for repository 'repo-non-oss'.
+    RPM files caching has been disabled for repository 'repo-oss'.
+    RPM files caching has been disabled for repository 'repo-source'.
+    RPM files caching has been disabled for repository 'repo-update'.
+    RPM files caching has been disabled for repository 'repo-update-non-oss'.
+ +18. 开启远程软件库的 rpm 文件缓存。 +
%> zypper mr -kt
+    RPM files caching has been enabled for repository 'repo-debug'.
+    RPM files caching has been enabled for repository 'repo-debug-update'.
+    RPM files caching has been enabled for repository 'repo-debug-update-non-oss'.
+    RPM files caching has been enabled for repository 'repo-non-oss'.
+    RPM files caching has been enabled for repository 'repo-oss'.
+    RPM files caching has been enabled for repository 'repo-source'.
+    RPM files caching has been enabled for repository 'repo-update'.
+    RPM files caching has been enabled for repository 'repo-update-non-oss'.
+ +#### 增加新的软件库 #### + +可以通过这两个 zypper 指令 – 'zypper addrepo' 和 'zypper ar' 来增加新的软件库。在此过程中可以使用 URL 或者软件库的别名。 + +19. 增加一个新的软件库( 以 “http://download.opensuse.org/update/12.3/” 为例 )。 + +
%>  zypper ar http://download.opensuse.org/update/11.1/ update
+    Adding repository 'update' .............................................................................................................................................................[done]
+    Repository 'update' successfully added
+    Enabled     : Yes
+    Autorefresh : No
+    GPG check   : Yes
+    URI         : http://download.opensuse.org/update/11.1/
+ +20. 更改一个软件库的名字,这将仅仅改变软件库的别名。 命令 'zypper namerepo' 或者 'zypperr nr' 可以胜任此工作。例如更改标示数字为10的软件库的名字为 'upd8',或者说将标示数字为10的软件库的别名改为 'upd8',可以使用下面的命令。 + +
%> zypper nr 10 upd8
+    Repository 'update' renamed to 'upd8'.
+ +#### 删除软件库 #### + +21. 删除一个软件库。要从系统删除一个软件库可以使 'zypper removerepo' 或者 'zypper rr'。例如以下的命令可以删除软件库 'upd8' + +
%> zypper rr upd8
+    # Removing repository 'upd8' .........................................................................................[done]
+    Repository 'upd8' has been removed.
+ +### 使用 zypper 进行软件包管理 ### + +#### 用 zypper 安装一个软件包 #### + +22. 在 zypper 中,我们可以通过软件包的功能名称来安装一个软件包。以 Firefox 为例,以下的命令可以用来安装该软件包。 +
%> zypper in MozillaFirefox
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 128 NEW packages are going to be installed:
+      adwaita-icon-theme at-spi2-atk-common at-spi2-atk-gtk2 at-spi2-core cantarell-fonts cups-libs desktop-file-utils fontconfig gdk-pixbuf-query-loaders gstreamer gstreamer-fluendo-mp3
+      gstreamer-plugins-base gtk2-branding-openSUSE gtk2-data gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese gtk2-metatheme-adwaita
+      gtk2-theming-engine-adwaita gtk2-tools gtk3-data gtk3-metatheme-adwaita gtk3-tools hicolor-icon-theme hicolor-icon-theme-branding-openSUSE libasound2 libatk-1_0-0 libatk-bridge-2_0-0
+      libatspi0 libcairo2 libcairo-gobject2 libcanberra0 libcanberra-gtk0 libcanberra-gtk2-module libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-gtk-module-common libcdda_interface0
+      libcdda_paranoia0 libcolord2 libdrm2 libdrm_intel1 libdrm_nouveau2 libdrm_radeon1 libFLAC8 libfreebl3 libgbm1 libgdk_pixbuf-2_0-0 libgraphite2-3 libgstapp-1_0-0 libgstaudio-1_0-0
+      libgstpbutils-1_0-0 libgstreamer-1_0-0 libgstriff-1_0-0 libgsttag-1_0-0 libgstvideo-1_0-0 libgthread-2_0-0 libgtk-2_0-0 libgtk-3-0 libharfbuzz0 libjasper1 libjbig2 libjpeg8 libjson-c2
+      liblcms2-2 libLLVM libltdl7 libnsssharedhelper0 libogg0 liborc-0_4-0 libpackagekit-glib2-18 libpango-1_0-0 libpciaccess0 libpixman-1-0 libpulse0 libsndfile1 libsoftokn3 libspeex1
+      libsqlite3-0 libstartup-notification-1-0 libtheoradec1 libtheoraenc1 libtiff5 libvisual libvorbis0 libvorbisenc2 libvorbisfile3 libwayland-client0 libwayland-cursor0 libwayland-server0
+      libX11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb-xfixes0 libXcomposite1 libXcursor1 libXdamage1 libXevie1
+      libXfixes3 libXft2 libXi6 libXinerama1 libxkbcommon-0_4_3 libXrandr2 libXrender1 libxshmfence1 libXtst6 libXv1 libXxf86vm1 Mesa Mesa-libEGL1 Mesa-libGL1 Mesa-libglapi0
+      metatheme-adwaita-common MozillaFirefox MozillaFirefox-branding-openSUSE mozilla-nss mozilla-nss-certs PackageKit-gstreamer-plugin pango-tools sound-theme-freedesktop
+
+    The following 10 recommended packages were automatically selected:
+      gstreamer-fluendo-mp3 gtk2-branding-openSUSE gtk2-data gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese libcanberra0 libpulse0
+      PackageKit-gstreamer-plugin
+    
+    128 new packages to install.
+    Overall download size: 77.2 MiB. Already cached: 0 B  After the operation, additional 200.0 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y
+    Retrieving package cantarell-fonts-0.0.16-1.1.noarch                                                                                                   (1/128),  74.1 KiB (115.6 KiB unpacked)
+    Retrieving: cantarell-fonts-0.0.16-1.1.noarch.rpm .........................................................................................................................[done (63.4 KiB/s)]
+    Retrieving package hicolor-icon-theme-0.13-2.1.2.noarch                                                                                                (2/128),  40.1 KiB ( 50.5 KiB unpacked)
+    Retrieving: hicolor-icon-theme-0.13-2.1.2.noarch.rpm ...................................................................................................................................[done]
+    Retrieving package sound-theme-freedesktop-0.8-7.1.2.noarch                                                                                            (3/128), 372.6 KiB (460.3 KiB unpacked) 
+ +23. 安装指定版本号的软件包,(以 gcc 5.1 为例)。 +
 %>zypper in 'gcc<5.1'
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 13 NEW packages are going to be installed:
+      cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49
+
+    13 new packages to install.
+    Overall download size: 14.5 MiB. Already cached: 0 B  After the operation, additional 49.4 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y 
+ +24. 为特定的CPU架构安装软件包(以兼容 i586 的 gcc 为例)。 + +
%> zypper in gcc.i586
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 13 NEW packages are going to be installed:
+      cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49
+
+    13 new packages to install.
+    Overall download size: 14.5 MiB. Already cached: 0 B  After the operation, additional 49.4 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y
+    Retrieving package libasan0-4.8.3+r212056-2.2.4.x86_64                                                                                                  (1/13),  74.2 KiB (166.9 KiB unpacked)
+    Retrieving: libasan0-4.8.3+r212056-2.2.4.x86_64.rpm .......................................................................................................................[done (79.2 KiB/s)]
+    Retrieving package libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64                                                                                          (2/13),  14.3 KiB ( 26.1 KiB unpacked)
+    Retrieving: libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm ...............................................................................................................[done (55.3 KiB/s)] 
+ +25. 为特定的CPU架构安装指定版本号的软件包(以兼容 i586 且版本低于5.1的 gcc 为例) + +
%> zypper in 'gcc.i586<5.1'
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 13 NEW packages are going to be installed:
+      cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49
+
+    13 new packages to install.
+    Overall download size: 14.4 MiB. Already cached: 129.5 KiB  After the operation, additional 49.4 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y
+    In cache libasan0-4.8.3+r212056-2.2.4.x86_64.rpm                                                                                                        (1/13),  74.2 KiB (166.9 KiB unpacked)
+    In cache libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm                                           (2/13),  14.3 KiB ( 26.1 KiB unpacked)
+    In cache libgomp1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm                                             (3/13),  41.1 KiB ( 90.7 KiB unpacked) 
+ +26. 从指定的软件库里面安装一个软件包,例如从 amarok 中安装 libxine。 +
%> zypper in amarok upd:libxine1
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+    The following 202 NEW packages are going to be installed:
+      amarok bundle-lang-kde-en clamz cups-libs enscript fontconfig gdk-pixbuf-query-loaders ghostscript-fonts-std gptfdisk gstreamer gstreamer-plugins-base hicolor-icon-theme
+      hicolor-icon-theme-branding-openSUSE htdig hunspell hunspell-tools icoutils ispell ispell-american kde4-filesystem kdebase4-runtime kdebase4-runtime-branding-openSUSE kdelibs4
+      kdelibs4-branding-openSUSE kdelibs4-core kdialog libakonadi4 l
+    .....
+ +27. 通过指定软件包的名字安装软件包。 + +
%> zypper in -n git
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 35 NEW packages are going to be installed:
+      cvs cvsps fontconfig git git-core git-cvs git-email git-gui gitk git-svn git-web libserf-1-1 libsqlite3-0 libXft2 libXrender1 libXss1 perl-Authen-SASL perl-Clone perl-DBD-SQLite perl-DBI
+      perl-Error perl-IO-Socket-SSL perl-MLDBM perl-Net-Daemon perl-Net-SMTP-SSL perl-Net-SSLeay perl-Params-Util perl-PlRPC perl-SQL-Statement perl-Term-ReadKey subversion subversion-perl tcl
+      tk xhost
+
+    The following 13 recommended packages were automatically selected:
+      git-cvs git-email git-gui gitk git-svn git-web perl-Authen-SASL perl-Clone perl-MLDBM perl-Net-Daemon perl-Net-SMTP-SSL perl-PlRPC perl-SQL-Statement
+
+    The following package is suggested, but will not be installed:
+      git-daemon
+
+    35 new packages to install.
+    Overall download size: 15.6 MiB. Already cached: 0 B  After the operation, additional 56.7 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y 
+ +28. 通过通配符来安装软件包,例如,安装所有 php5 的软件包。 +
%> zypper in php5*
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    Problem: php5-5.6.1-18.1.x86_64 requires smtp_daemon, but this requirement cannot be provided
+      uninstallable providers: exim-4.83-3.1.8.x86_64[openSUSE-13.2-0]
+                       postfix-2.11.0-5.2.2.x86_64[openSUSE-13.2-0]
+                       sendmail-8.14.9-2.2.2.x86_64[openSUSE-13.2-0]
+                       exim-4.83-3.1.8.i586[repo-oss]
+                       msmtp-mta-1.4.32-2.1.3.i586[repo-oss]
+                       postfix-2.11.0-5.2.2.i586[repo-oss]
+                       sendmail-8.14.9-2.2.2.i586[repo-oss]
+                       exim-4.83-3.1.8.x86_64[repo-oss]
+                       msmtp-mta-1.4.32-2.1.3.x86_64[repo-oss]
+                       postfix-2.11.0-5.2.2.x86_64[repo-oss]
+                       sendmail-8.14.9-2.2.2.x86_64[repo-oss]
+                       postfix-2.11.3-5.5.1.i586[repo-update]
+                       postfix-2.11.3-5.5.1.x86_64[repo-update]
+     Solution 1: Following actions will be done:
+      do not install php5-5.6.1-18.1.x86_64
+      do not install php5-pear-Auth_SASL-1.0.6-7.1.3.noarch
+      do not install php5-pear-Horde_Http-2.0.1-6.1.3.noarch
+      do not install php5-pear-Horde_Image-2.0.1-6.1.3.noarch
+      do not install php5-pear-Horde_Kolab_Format-2.0.1-6.1.3.noarch
+      do not install php5-pear-Horde_Ldap-2.0.1-6.1.3.noarch
+      do not install php5-pear-Horde_Memcache-2.0.1-7.1.3.noarch
+      do not install php5-pear-Horde_Mime-2.0.2-6.1.3.noarch
+      do not install php5-pear-Horde_Oauth-2.0.0-6.1.3.noarch
+      do not install php5-pear-Horde_Pdf-2.0.1-6.1.3.noarch
+    ....
+ +29. 使用模式名称(模式名称是一类软件包的名字)来批量安装软件包 + +
%> zypper in -t pattern lamp_server
+    ading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 29 NEW packages are going to be installed:
+      apache2 apache2-doc apache2-example-pages apache2-mod_perl apache2-prefork patterns-openSUSE-lamp_server perl-Data-Dump perl-Encode-Locale perl-File-Listing perl-HTML-Parser
+      perl-HTML-Tagset perl-HTTP-Cookies perl-HTTP-Daemon perl-HTTP-Date perl-HTTP-Message perl-HTTP-Negotiate perl-IO-HTML perl-IO-Socket-SSL perl-libwww-perl perl-Linux-Pid
+      perl-LWP-MediaTypes perl-LWP-Protocol-https perl-Net-HTTP perl-Net-SSLeay perl-Tie-IxHash perl-TimeDate perl-URI perl-WWW-RobotRules yast2-http-server
+
+    The following NEW pattern is going to be installed:
+      lamp_server
+
+    The following 10 recommended packages were automatically selected:
+      apache2 apache2-doc apache2-example-pages apache2-mod_perl apache2-prefork perl-Data-Dump perl-IO-Socket-SSL perl-LWP-Protocol-https perl-TimeDate yast2-http-server
+
+    29 new packages to install.
+    Overall download size: 7.2 MiB. Already cached: 1.2 MiB  After the operation, additional 34.7 MiB will be used.
+    Continue? [y/n/? shows all options] (y): 
+ +30. 使用一行命令安转一个软件包同时卸载另一个软件包,例如在安装 nano 的同时卸载 vi + +
# zypper in nano -vi
+    Loading repository data...
+    Reading installed packages...
+    '-vi' not found in package names. Trying capabilities.
+    Resolving package dependencies...
+
+    The following 2 NEW packages are going to be installed:
+      nano nano-lang
+
+    The following package is going to be REMOVED:
+      vim
+
+    The following recommended package was automatically selected:
+      nano-lang
+
+    2 new packages to install, 1 to remove.
+    Overall download size: 550.0 KiB. Already cached: 0 B  After the operation, 463.3 KiB will be freed.
+    Continue? [y/n/? shows all options] (y):
+    ...
+ +31. 使用 zypper 安装 rpm 软件包。 + +
%> zypper in teamviewer*.rpm
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 24 NEW packages are going to be installed:
+      alsa-oss-32bit fontconfig-32bit libasound2-32bit libexpat1-32bit libfreetype6-32bit libgcc_s1-gcc49-32bit libICE6-32bit libjpeg62-32bit libpng12-0-32bit libpng16-16-32bit libSM6-32bit
+      libuuid1-32bit libX11-6-32bit libXau6-32bit libxcb1-32bit libXdamage1-32bit libXext6-32bit libXfixes3-32bit libXinerama1-32bit libXrandr2-32bit libXrender1-32bit libXtst6-32bit
+      libz1-32bit teamviewer
+
+    The following recommended package was automatically selected:
+      alsa-oss-32bit
+
+    24 new packages to install.
+    Overall download size: 41.2 MiB. Already cached: 0 B  After the operation, additional 119.7 MiB will be used.
+    Continue? [y/n/? shows all options] (y):
+    ..
+ +#### 使用 zypper 卸载软件包 #### + +32. 命令 ‘zypper remove‘ 和 ‘zypper rm‘ 用于卸载软件包。例如卸载 apache2: + +
%> zypper remove apache2 
+ 或者 +
%> zypper rm apache2
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 2 packages are going to be REMOVED:
+      apache2 apache2-prefork
+
+    2 packages to remove.
+    After the operation, 4.2 MiB will be freed.
+    Continue? [y/n/? shows all options] (y): y
+    (1/2) Removing apache2-2.4.10-19.1 ........................................................................[done]
+    (2/2) Removing apache2-prefork-2.4.10-19.1 ................................................................[done] 
+ +#### 使用Zypper 进行软件包更新 #### + +33. 更新所有的软件包,可以使用 ‘zypper update‘ 或者 ‘zypper up‘。 + +
%> zypper up 
+ 或者 +
%> zypper update
+
+    Loading repository data...
+    Reading installed packages...
+    Nothing to do. 
+ +34. 更新指定的软件包,例如更新 apache2 以及 openssh。 + +
 zypper up apache2 openssh
+    Loading repository data...
+    Reading installed packages...
+    No update candidate for 'apache2-2.4.10-19.1.x86_64'. The highest available version is already installed.
+    No update candidate for 'openssh-6.6p1-5.1.3.x86_64'. The highest available version is already installed.
+    Resolving package dependencies...
+
+    Nothing to do.
+ +35. 安装一个软件库,例如 ariadb,如果该库存在则更新之。 + +
%> zypper in mariadb
+    Loading repository data...
+    Reading installed packages...
+    'mariadb' is already installed.
+    No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed.
+    Resolving package dependencies...
+
+    Nothing to do.
+ +#### 安装源文件并且构建依赖关系 #### + +命令 ‘zypper source-install‘ 或者 ‘zypper si‘ 可以用于从源文件编译软件包 + +36. 安装某一个软件包的源文件及其依赖关系,例如 mariadb。 + +
%> zypper si mariadb
+    Reading installed packages...
+    Loading repository data...
+    Resolving package dependencies...
+
+    The following 36 NEW packages are going to be installed:
+      autoconf automake bison cmake cpp cpp48 gcc gcc48 gcc48-c++ gcc-c++ libaio-devel libarchive13 libasan0 libatomic1-gcc49 libcloog-isl4 libedit-devel libevent-devel libgomp1-gcc49 libisl10
+      libitm1-gcc49 libltdl7 libmpc3 libmpfr4 libopenssl-devel libstdc++48-devel libtool libtsan0-gcc49 m4 make ncurses-devel pam-devel readline-devel site-config tack tcpd-devel zlib-devel
+
+    The following source package is going to be installed:
+      mariadb
+
+    36 new packages to install, 1 source package.
+    Overall download size: 71.5 MiB. Already cached: 129.5 KiB  After the operation, additional 183.9 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y 
+ +37. 仅为某一个软件包安装源文件,例如 mariadb + +
%> zypper in -D mariadb
+    Loading repository data...
+    Reading installed packages...
+    'mariadb' is already installed.
+    No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed.
+    Resolving package dependencies...
+
+    Nothing to do. 
+ +38. 仅为某一个软件包安装依赖关系,例如 mariadb + +
%> zypper si -d mariadb
+    Reading installed packages...
+    Loading repository data...
+    Resolving package dependencies...
+
+    The following 36 NEW packages are going to be installed:
+      autoconf automake bison cmake cpp cpp48 gcc gcc48 gcc48-c++ gcc-c++ libaio-devel libarchive13 libasan0 libatomic1-gcc49 libcloog-isl4 libedit-devel libevent-devel libgomp1-gcc49 libisl10
+      libitm1-gcc49 libltdl7 libmpc3 libmpfr4 libopenssl-devel libstdc++48-devel libtool libtsan0-gcc49 m4 make ncurses-devel pam-devel readline-devel site-config tack tcpd-devel zlib-devel
+
+    The following package is recommended, but will not be installed due to conflicts or dependency issues:
+      readline-doc
+
+    36 new packages to install.
+    Overall download size: 33.7 MiB. Already cached: 129.5 KiB  After the operation, additional 144.3 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y
+ +#### Zypper in Scripts and Applications #### + +39. 安装一个软件包,并且在安装过程中跳过与用户的交互, 例如 mariadb。 + +
%> zypper --non-interactive in mariadb
+    Loading repository data...
+    Reading installed packages...
+    'mariadb' is already installed.
+    No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed.
+    Resolving package dependencies...
+
+    Nothing to do.
+ +40. 卸载一个软件包,并且在卸载过程中跳过与用户的交互,例如 mariadb + +
%> zypper --non-interactive rm mariadb
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following package is going to be REMOVED:
+      mariadb
+
+    1 package to remove.
+    After the operation, 71.8 MiB will be freed.
+    Continue? [y/n/? shows all options] (y): y
+    (1/1) Removing mariadb-10.0.13-2.6.1 .............................................................................[done] 
+ +41. 将 zypper 输出用 XML 格式打印。 + +
%> zypper --xmlout
+      Usage:
+    	zypper [--global-options]  [--command-options] [arguments]
+
+      Global Options
+    ....
+ +42. 禁止详细信息输出到屏幕。 + +
%> zypper --quiet in mariadb
+    The following NEW package is going to be installed:
+      mariadb
+
+    1 new package to install.
+    Overall download size: 0 B. Already cached: 7.8 MiB  After the operation, additional 71.8 MiB will be used.
+    Continue? [y/n/? shows all options] (y):
+    ...
+ +43. 在卸载过程中禁止详细信息输出到屏幕 + +
%> zypper --quiet rm mariadb 
+ +44. 自动地同意版权或者协议。 +
%> zypper patch --auto-agree-with-licenses
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    Nothing to do.
+ +#### 清除 Zypper 缓存以及查看历史信息 #### + +45. 以下指令可以用来清理Zypper缓存。 + +
%> zypper clean
+    All repositories have been cleaned up.
+ +如果需要一次性地清理元数据以及软件包缓存,可以通过 -all/-a 选项来达到目的 + +
%> zypper clean -a
+    All repositories have been cleaned up.
+ +46. 查看 Zypper 的历史信息。籍由 Zypper 所有的软件包管理动作,包括安装、更新以及卸载都会在 /var/log/zypp/history中保留历史信息。可以通过 cat 来查看此文件,或者通过过滤器来筛选希望看到的信息。 + +
 cat /var/log/zypp/history
+    2015-05-07 15:43:03|install|boost-license1_54_0|1.54.0-10.1.3|noarch||openSUSE-13.2-0|0523b909d2aae5239f9841316dafaf3a37b4f096|
+    2015-05-07 15:43:03|install|branding-openSUSE|13.2-3.6.1|noarch||openSUSE-13.2-0|6609def94b1987bf3f90a9467f4f7ab8f8d98a5c|
+    2015-05-07 15:43:03|install|bundle-lang-common-en|13.2-3.3.1|noarch||openSUSE-13.2-0|ca55694e6fdebee6ce37ac7cf3725e2aa6edc342|
+    2015-05-07 15:43:03|install|insserv-compat|0.1-12.2.2|noarch||openSUSE-13.2-0|6160de7fbf961a279591a83a1550093a581214d9|
+    2015-05-07 15:43:03|install|libX11-data|1.6.2-5.1.2|noarch||openSUSE-13.2-0|f1cb58364ba9016c1f93b1a383ba12463c56885a|
+    2015-05-07 15:43:03|install|libnl-config|3.2.25-2.1.2|noarch||openSUSE-13.2-0|aab2ded312a781e93b739b418e3d32fe4e187020|
+    2015-05-07 15:43:04|install|wireless-regdb|2014.06.13-1.2|noarch||openSUSE-13.2-0|be8cb16f3e92af12b5ceb977e37e13f03c007bd1|
+    2015-05-07 15:43:04|install|yast2-trans-en_US|3.1.0-2.1|noarch||openSUSE-13.2-0|1865754e5e0ec3c149ac850b340bcca55a3c404d|
+    2015-05-07 15:43:04|install|yast2-trans-stats|2.19.0-16.1.3|noarch||openSUSE-13.2-0|b107d2b3e702835885b57b04d12d25539f262d1a|
+    2015-05-07 15:43:04|install|cracklib-dict-full|2.8.12-64.1.2|x86_64||openSUSE-13.2-0|08bd45dbba7ad44e3a4837f730be76f55ad5dcfa|
+    ......
+ +#### 使用 Zypper 进行SUSE系统升级 #### + +47. 可以使用 Zypper 命令的 'dist-upgrade' 选项来将当前的SUSE Linux升级至最新版本。 +
# zypper dist-upgrade
+    You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
+    Building repository 'openSUSE-13.2-0' cache .....................................................................[done]
+    Retrieving repository 'openSUSE-13.2-Debug' metadata ............................................................[done]
+    Building repository 'openSUSE-13.2-Debug' cache .................................................................[done]
+    Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ..........................................................[done]
+    Building repository 'openSUSE-13.2-Non-Oss' cache ...............................................................[done]
+ +正文至此结束。希望本文可以帮助读者尤其是新手们管理SUSE Linux系统和服务器。如果您觉得某些比较重要的命令被作者漏掉了,请在评论部分写下您的返回,作者将根据评论对文章进行更新。保持联络,保持评论,多谢支持。 + +-------------------------------------------------------------------------------- + +原文地址: http://www.tecmint.com/zypper-commands-to-manage-suse-linux-package-management/ + +作者:[Avishek Kumar][a] +译者:[张博约](https://github.com/zhangboyue) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/installation-of-suse-linux-enterprise-server-12/ From 027e2e5c193904dcaea6da1df53d463d204f88c7 Mon Sep 17 00:00:00 2001 From: zhangkun Date: Sun, 24 May 2015 17:56:15 +0800 Subject: [PATCH 0937/2517] translation finished --- ... Manage 'Suse' Linux Package Management.md | 767 ------------------ 1 file changed, 767 deletions(-) delete mode 100644 sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md diff --git a/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md b/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md deleted file mode 100644 index bfd3eeeaf5..0000000000 --- a/sources/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md +++ /dev/null @@ -1,767 +0,0 @@ -45 个用于 ‘Suse‘ Linux 包管理的 Zypper 命令 -====================================================================== -SUSE( Software and System Entwicklung,即软件和系统开发。其中‘entwicklung‘是德语,意为开发)Linux是 Novell 公司在 Linux 内核基础上发布的操作系统。SUSE Linux 有两个发行分支。其中之一名为 OpenSUSE,这是一款自由而且免费的操作系统。该系统由开源社区开发维护,支持一些最新版本的应用软件,其最新的稳定版本为 13.2。 - -另外一个分支是SUSE Linux 企业版。该分支是一个为企业及商业化产品设计的 Linux 发行版,包含了大量的企业应用以及适用于商业产品生产环境的特性。其最新的稳定版本为 12。 - -以下的链接包含了安装企业版 SUSE Linux 服务器的详细信息。 - -- [如何安装企业版 SUSE Linux 12][1] - -Zypper 和 Yast 是 SUSE Linux 平台上的软件包管理工具,他们的底层使用了 RPM(译者注:RPM 最初指 Redhat Pacakge Manager ,现普遍解释为递归短语 RPM Package Manager 的缩写)。 - -Yast(Yet another Setup Tool )是 OpenSUSE 以及企业版 SUSE 上用于系统管理、设置和配置的工具。 - -Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUSE Linux上的软件以及进行系统更新。ZYpp为Zypper和Yast提供底层支持。 - -本文将介绍实际应用中常见的一些Zypper命令。这些命令用来进行安装、更新、删除等任何软件包管理器所能够胜任的工作。 - -**重要** : 切记所有的这些指令都将在系统全局范围内产生影响,所以必须以 root 身份执行,否则命令将失败。 - -### 获取基本的 Zypper 帮助信息 ### - -1. 不带任何选项的执行 zypper, 将输出该命令的全局选项以及子命令列表(译者注:全局选项,global option,控制台命令的输入分为可选参数和位置参数两大类。按照习惯,一般可选参数称为选项'option',而位置参数称为参数 'argument')。 - -
%>  zypper
-        Usage:
-        zypper [--global-options]
- -2. 获取一个具体的子命令的帮助信息,比如 'in' (install),可以执行下面的命令 - -
%> zypper help in
- 或者 -
%> zypper help install
-    install (in) [options] {capability | rpm_file_uri}
-    
-    Install packages with specified capabilities or RPM files with specified
-    location. A capability is NAME[.ARCH][OP], where OP is one
-    of <, <=, =, >=, >.
-    
-      Command options:
-    --from     Select packages from the specified repository.
-    -r, --repo     Load only the specified repository.
-    -t, --type            Type of package (package, patch, pattern, product, srcpackage).
-                                Default: package.
-    -n, --name                  Select packages by plain name, not by capability.
-    -C, --capability            Select packages by capability.
-    -f, --force                 Install even if the item is already installed (reinstall),
-                                downgraded or changes vendor or architecture.
-        --oldpackage            Allow to replace a newer item with an older one.
-                                Handy if you are doing a rollback. Unlike --force
-    j                            it will not enforce a reinstall.
-        --replacefiles          Install the packages even if they replace files from other,
-                                already installed, packages. Default is to treat file conflicts
-                                as an error. --download-as-needed disables the fileconflict check.
-    ...... 
- -3. 安装之前搜索一个安转包(以 gnome-desktop 为例 ) - -
# zypper se gnome-desktop
-    
-    Retrieving repository 'openSUSE-13.2-Debug' metadata ............................................................[done]
-    Building repository 'openSUSE-13.2-Debug' cache .................................................................[done]
-    Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ......................................................... [done]
-    Building repository 'openSUSE-13.2-Non-Oss' cache ...............................................................[done]
-    Retrieving repository 'openSUSE-13.2-Oss' metadata ..............................................................[done]
-    Building repository 'openSUSE-13.2-Oss' cache ...................................................................[done]
-    Retrieving repository 'openSUSE-13.2-Update' metadata ...........................................................[done]
-    Building repository 'openSUSE-13.2-Update' cache ................................................................[done]
-    Retrieving repository 'openSUSE-13.2-Update-Non-Oss' metadata ...................................................[done]
-    Building repository 'openSUSE-13.2-Update-Non-Oss' cache ........................................................[done]
-    Loading repository data...
-    Reading installed packages...
-    
-    S | Name                                  | Summary                                                   | Type
-    --+---------------------------------------+-----------------------------------------------------------+-----------
-      | gnome-desktop2-lang                   | Languages for package gnome-desktop2                      | package
-      | gnome-desktop2                        | The GNOME Desktop API Library                             | package
-      | libgnome-desktop-2-17                 | The GNOME Desktop API Library                             | package
-      | libgnome-desktop-3-10                 | The GNOME Desktop API Library                             | package
-      | libgnome-desktop-3-devel              | The GNOME Desktop API Library -- Development Files        | package
-      | libgnome-desktop-3_0-common           | The GNOME Desktop API Library -- Common data files        | package
-      | gnome-desktop-debugsource             | Debug sources for package gnome-desktop                   | package
-      | gnome-desktop-sharp2-debugsource      | Debug sources for package gnome-desktop-sharp2            | package
-      | gnome-desktop2-debugsource            | Debug sources for package gnome-desktop2                  | package
-      | libgnome-desktop-2-17-debuginfo       | Debug information for package libgnome-desktop-2-17       | package
-      | libgnome-desktop-3-10-debuginfo       | Debug information for package libgnome-desktop-3-10       | package
-      | libgnome-desktop-3_0-common-debuginfo | Debug information for package libgnome-desktop-3_0-common | package
-      | libgnome-desktop-2-17-debuginfo-32bit | Debug information for package libgnome-desktop-2-17       | package
-      | libgnome-desktop-3-10-debuginfo-32bit | Debug information for package libgnome-desktop-3-10       | package
-      | gnome-desktop-sharp2                  | Mono bindings for libgnome-desktop                        | package
-      | libgnome-desktop-2-devel              | The GNOME Desktop API Library -- Development Files        | packag
-      | gnome-desktop-lang                    | Languages for package gnome-desktop                       | package
-      | libgnome-desktop-2-17-32bit           | The GNOME Desktop API Library                             | package
-      | libgnome-desktop-3-10-32bit           | The GNOME Desktop API Library                             | package
-      | gnome-desktop                         | The GNOME Desktop API Library                             | srcpackage
- -4. 获取一个模式包的信息(以 lamp_server 为例)。 - -
%> zypper info -t pattern lamp_server
-    
-    Loading repository data...
-    Reading installed packages...
-    
-    
-    Information for pattern lamp_server:
-    ------------------------------------
-    Repository: openSUSE-13.2-Update
-    Name: lamp_server
-    Version: 20141007-5.1
-    Arch: x86_64
-    Vendor: openSUSE
-    Installed: No
-    Visible to User: Yes
-    Summary: Web and LAMP Server
-    Description: 
-      Software to set up a Web server that is able to serve static, dynamic, and interactive content (like a Web shop). This includes Apache HTTP Server, the database management system MySQL,
-      and scripting languages such as PHP, Python, Ruby on Rails, or Perl.
-    Contents:
-    
-    S | Name                          | Type    | Dependency
-    --+-------------------------------+---------+-----------
-      | apache2-mod_php5              | package |
-      | php5-iconv                    | package |
-    i | patterns-openSUSE-base        | package |
-    i | apache2-prefork               | package |
-      | php5-dom                      | package |
-      | php5-mysql                    | package |
-    i | apache2                       | package |
-      | apache2-example-pages         | package |
-      | mariadb                       | package |
-      | apache2-mod_perl              | package |
-      | php5-ctype                    | package |
-      | apache2-doc                   | package |
-      | yast2-http-server             | package |
-      | patterns-openSUSE-lamp_server | package |
- -5. 开启一个Zypper Shell 的会话。 - -
 %>zypper shell 
- 或者 -
 %>zypper sh 
- -
zypper> help
-      Usage:
-    	zypper [--global-options]
- -**注意**:在 Zypper shell里面可以通过键入 ‘help‘ 获得全局选项以及子命令的列表。 -### Zypper 软件库管理 ### - -#### 列举已定义的软件库 #### - -6. 使用 'zypper repos' 或者 'zypper lr' 来列举所有已定以的软件库。 - -
%> zypper repos
- 或者 -
%> zypper lr
-      | Alias                     | Name                               | Enabled | Refresh
-    --+---------------------------+------------------------------------+---------+--------
-    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No
-    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes
-    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes
-    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes
-    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes
-    6 | repo-oss                  | openSUSE-13.2-Oss                  | Yes     | Yes
-    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes
-    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes
-    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes
- -7. 在表格里面显示 zypper URI - -
# zypper lr -u
-      | Alias                     | Name                               | Enabled | Refresh | URI
-    --+---------------------------+------------------------------------+---------+---------+----------------------------------------------------------------
-    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No      | cd:///?devices=/dev/disk/by-id/ata-VBOX_CD-ROM_VB2-01700376
-    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes     | http://download.opensuse.org/debug/distribution/13.2/repo/oss/
-    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes     | http://download.opensuse.org/debug/update/13.2/
-    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes     | http://download.opensuse.org/debug/update/13.2-non-oss/
-    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes     | http://download.opensuse.org/distribution/13.2/repo/non-oss/
-    6 | repo-oss                  | openSUSE-13.2-Oss                  | Yes     | Yes     | http://download.opensuse.org/distribution/13.2/repo/oss/
-    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes     | http://download.opensuse.org/source/distribution/13.2/repo/oss/
-    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes     | http://download.opensuse.org/update/13.2/
-    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes     | http://download.opensuse.org/update/13.2-non-oss/
- -8. 根据优先级列举软件库。 - -
%> zypper lr -P
-      | Alias                     | Name                               | Enabled | Refresh | Priority
-    --+---------------------------+------------------------------------+---------+---------+---------
-    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No      |   99
-    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes     |   99
-    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes     |   99
-    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes     |   99
-    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes     |   85
-    6 | repo-oss                  | openSUSE-13.2-Oss                  | Yes     | Yes     |   99
-    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes     |   99
-    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes     |   99
-    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes     |   99
- -#### 刷新软件库 #### - -9. 使用 'zypper refresh' or 'zypper ref' 来刷新 zypper 软件库。 - -
%> zypper refresh 
- 或者 -
%> zypper ref
-    Repository 'openSUSE-13.2-0' is up to date.
-    Repository 'openSUSE-13.2-Debug' is up to date.
-    Repository 'openSUSE-13.2-Non-Oss' is up to date.
-    Repository 'openSUSE-13.2-Oss' is up to date.
-    Repository 'openSUSE-13.2-Update' is up to date.
-    Repository 'openSUSE-13.2-Update-Non-Oss' is up to date.
-    All repositories have been refreshed. 
- -10. 刷新一个指定的软件库(以 'repo-non-oss' 为例 )。 - -
%> zypper refresh repo-non-oss
-    Repository 'openSUSE-13.2-Non-Oss' is up to date.
-    Specified repositories have been refreshed. 
- -11. 强制更新一个软件库(以 'repo-non-oss' 为例 )。 - -
%> zypper ref -f repo-non-oss 
-    Forcing raw metadata refresh
-    Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ............................................................[done]
-    Forcing building of repository cache
-    Building repository 'openSUSE-13.2-Non-Oss' cache ............................................................[done]
-    Specified repositories have been refreshed.
- -#### 修改软件库 #### - -本文中我们使用‘zypper modifyrepo‘ 或者 ‘zypper mr‘ 来关闭或者开启 zypper 软件库。 - -12. 在关闭一个软件库之前,我们需要知道在 zypper中,每一个软件库有一个唯一的标示数字与之关联,该数字用于打开或者关闭与之相联系的软件库。假设我们需要关闭 'repo-oss' 软件库,那么我们可以通过以下的法来获得该软件库的标志数字。 - -
%> zypper lr
-      | Alias                     | Name                               | Enabled | Refresh
-    --+---------------------------+------------------------------------+---------+--------
-    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No
-    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes
-    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes
-    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes
-    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes
-    6 | repo-oss                  | openSUSE-13.2-Oss                  | No      | Yes
-    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes
-    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes
-    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes
-从以上输出的列表中我们可以看到 'repo-oss' 库的标示数字是 6,因此通过以下的命令来关闭该库。 - -
%> zypper mr -d 6
-    Repository 'repo-oss' has been successfully disabled.
- -13. 如果需要再次开启软件库 ‘repo-oss‘, 接上例,与之相关联的标示数字为 6。 - -
%> zypper mr -e 6
-    Repository 'repo-oss' has been successfully enabled.
- -14. 针对某一个软件库(以 'repo-non-oss' 为例 )开启自动刷新( auto-refresh )和 rpm 缓存,并设置该软件库的优先级,比如85。 - -
%> zypper mr -rk -p 85 repo-non-oss
-    Repository 'repo-non-oss' priority has been left unchanged (85)
-    Nothing to change for repository 'repo-non-oss'.
- -15. 对所有的软件库关闭 rpm 文件缓存。 - -
%> zypper mr -Ka
-    RPM files caching has been disabled for repository 'openSUSE-13.2-0'.
-    RPM files caching has been disabled for repository 'repo-debug'.
-    RPM files caching has been disabled for repository 'repo-debug-update'.
-    RPM files caching has been disabled for repository 'repo-debug-update-non-oss'.
-    RPM files caching has been disabled for repository 'repo-non-oss'.
-    RPM files caching has been disabled for repository 'repo-oss'.
-    RPM files caching has been disabled for repository 'repo-source'.
-    RPM files caching has been disabled for repository 'repo-update'.
-    RPM files caching has been disabled for repository 'repo-update-non-oss'.
- -16. 对所有的软件库开启 rpm 文件缓存。 -
 zypper mr -ka
-    RPM files caching has been enabled for repository 'openSUSE-13.2-0'.
-    RPM files caching has been enabled for repository 'repo-debug'.
-    RPM files caching has been enabled for repository 'repo-debug-update'.
-    RPM files caching has been enabled for repository 'repo-debug-update-non-oss'.
-    RPM files caching has been enabled for repository 'repo-non-oss'.
-    RPM files caching has been enabled for repository 'repo-oss'.
-    RPM files caching has been enabled for repository 'repo-source'.
-    RPM files caching has been enabled for repository 'repo-update'.
-    RPM files caching has been enabled for repository 'repo-update-non-oss'.
- -17. 关闭远程库的rpm 文件缓存 -
%> zypper mr -Kt
-    RPM files caching has been disabled for repository 'repo-debug'.
-    RPM files caching has been disabled for repository 'repo-debug-update'.
-    RPM files caching has been disabled for repository 'repo-debug-update-non-oss'.
-    RPM files caching has been disabled for repository 'repo-non-oss'.
-    RPM files caching has been disabled for repository 'repo-oss'.
-    RPM files caching has been disabled for repository 'repo-source'.
-    RPM files caching has been disabled for repository 'repo-update'.
-    RPM files caching has been disabled for repository 'repo-update-non-oss'.
- -18. 开启远程软件库的 rpm 文件缓存。 -
%> zypper mr -kt
-    RPM files caching has been enabled for repository 'repo-debug'.
-    RPM files caching has been enabled for repository 'repo-debug-update'.
-    RPM files caching has been enabled for repository 'repo-debug-update-non-oss'.
-    RPM files caching has been enabled for repository 'repo-non-oss'.
-    RPM files caching has been enabled for repository 'repo-oss'.
-    RPM files caching has been enabled for repository 'repo-source'.
-    RPM files caching has been enabled for repository 'repo-update'.
-    RPM files caching has been enabled for repository 'repo-update-non-oss'.
- -#### 增加新的软件库 #### - -可以通过这两个 zypper 指令 – 'zypper addrepo' 和 'zypper ar' 来增加新的软件库。在此过程中可以使用 URL 或者软件库的别名。 - -19. 增加一个新的软件库( 以 “http://download.opensuse.org/update/12.3/” 为例 )。 - -
%>  zypper ar http://download.opensuse.org/update/11.1/ update
-    Adding repository 'update' .............................................................................................................................................................[done]
-    Repository 'update' successfully added
-    Enabled     : Yes
-    Autorefresh : No
-    GPG check   : Yes
-    URI         : http://download.opensuse.org/update/11.1/
- -20. 更改一个软件库的名字,这将仅仅改变软件库的别名。 命令 'zypper namerepo' 或者 'zypperr nr' 可以胜任此工作。例如更改标示数字为10的软件库的名字为 'upd8',或者说将标示数字为10的软件库的别名改为 'upd8',可以使用下面的命令。 - -
%> zypper nr 10 upd8
-    Repository 'update' renamed to 'upd8'.
- -#### 删除软件库 #### - -21. 删除一个软件库。要从系统删除一个软件库可以使 'zypper removerepo' 或者 'zypper rr'。例如以下的命令可以删除软件库 'upd8' - -
%> zypper rr upd8
-    # Removing repository 'upd8' .........................................................................................[done]
-    Repository 'upd8' has been removed.
- -### 使用 zypper 进行软件包管理 ### - -#### 用 zypper 安装一个软件包 #### - -22. 在 zypper 中,我们可以通过软件包的功能名称来安装一个软件包。以 Firefox 为例,以下的命令可以用来安装该软件包。 -
%> zypper in MozillaFirefox
-    Loading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-
-    The following 128 NEW packages are going to be installed:
-      adwaita-icon-theme at-spi2-atk-common at-spi2-atk-gtk2 at-spi2-core cantarell-fonts cups-libs desktop-file-utils fontconfig gdk-pixbuf-query-loaders gstreamer gstreamer-fluendo-mp3
-      gstreamer-plugins-base gtk2-branding-openSUSE gtk2-data gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese gtk2-metatheme-adwaita
-      gtk2-theming-engine-adwaita gtk2-tools gtk3-data gtk3-metatheme-adwaita gtk3-tools hicolor-icon-theme hicolor-icon-theme-branding-openSUSE libasound2 libatk-1_0-0 libatk-bridge-2_0-0
-      libatspi0 libcairo2 libcairo-gobject2 libcanberra0 libcanberra-gtk0 libcanberra-gtk2-module libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-gtk-module-common libcdda_interface0
-      libcdda_paranoia0 libcolord2 libdrm2 libdrm_intel1 libdrm_nouveau2 libdrm_radeon1 libFLAC8 libfreebl3 libgbm1 libgdk_pixbuf-2_0-0 libgraphite2-3 libgstapp-1_0-0 libgstaudio-1_0-0
-      libgstpbutils-1_0-0 libgstreamer-1_0-0 libgstriff-1_0-0 libgsttag-1_0-0 libgstvideo-1_0-0 libgthread-2_0-0 libgtk-2_0-0 libgtk-3-0 libharfbuzz0 libjasper1 libjbig2 libjpeg8 libjson-c2
-      liblcms2-2 libLLVM libltdl7 libnsssharedhelper0 libogg0 liborc-0_4-0 libpackagekit-glib2-18 libpango-1_0-0 libpciaccess0 libpixman-1-0 libpulse0 libsndfile1 libsoftokn3 libspeex1
-      libsqlite3-0 libstartup-notification-1-0 libtheoradec1 libtheoraenc1 libtiff5 libvisual libvorbis0 libvorbisenc2 libvorbisfile3 libwayland-client0 libwayland-cursor0 libwayland-server0
-      libX11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb-xfixes0 libXcomposite1 libXcursor1 libXdamage1 libXevie1
-      libXfixes3 libXft2 libXi6 libXinerama1 libxkbcommon-0_4_3 libXrandr2 libXrender1 libxshmfence1 libXtst6 libXv1 libXxf86vm1 Mesa Mesa-libEGL1 Mesa-libGL1 Mesa-libglapi0
-      metatheme-adwaita-common MozillaFirefox MozillaFirefox-branding-openSUSE mozilla-nss mozilla-nss-certs PackageKit-gstreamer-plugin pango-tools sound-theme-freedesktop
-
-    The following 10 recommended packages were automatically selected:
-      gstreamer-fluendo-mp3 gtk2-branding-openSUSE gtk2-data gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese libcanberra0 libpulse0
-      PackageKit-gstreamer-plugin
-    
-    128 new packages to install.
-    Overall download size: 77.2 MiB. Already cached: 0 B  After the operation, additional 200.0 MiB will be used.
-    Continue? [y/n/? shows all options] (y): y
-    Retrieving package cantarell-fonts-0.0.16-1.1.noarch                                                                                                   (1/128),  74.1 KiB (115.6 KiB unpacked)
-    Retrieving: cantarell-fonts-0.0.16-1.1.noarch.rpm .........................................................................................................................[done (63.4 KiB/s)]
-    Retrieving package hicolor-icon-theme-0.13-2.1.2.noarch                                                                                                (2/128),  40.1 KiB ( 50.5 KiB unpacked)
-    Retrieving: hicolor-icon-theme-0.13-2.1.2.noarch.rpm ...................................................................................................................................[done]
-    Retrieving package sound-theme-freedesktop-0.8-7.1.2.noarch                                                                                            (3/128), 372.6 KiB (460.3 KiB unpacked) 
- -23. 安装指定版本号的软件包,(以 gcc 5.1 为例)。 -
 %>zypper in 'gcc<5.1'
-    Loading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-
-    The following 13 NEW packages are going to be installed:
-      cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49
-
-    13 new packages to install.
-    Overall download size: 14.5 MiB. Already cached: 0 B  After the operation, additional 49.4 MiB will be used.
-    Continue? [y/n/? shows all options] (y): y 
- -24. 为特定的CPU架构安装软件包(以兼容 i586 的 gcc 为例)。 - -
%> zypper in gcc.i586
-    Loading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-
-    The following 13 NEW packages are going to be installed:
-      cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49
-
-    13 new packages to install.
-    Overall download size: 14.5 MiB. Already cached: 0 B  After the operation, additional 49.4 MiB will be used.
-    Continue? [y/n/? shows all options] (y): y
-    Retrieving package libasan0-4.8.3+r212056-2.2.4.x86_64                                                                                                  (1/13),  74.2 KiB (166.9 KiB unpacked)
-    Retrieving: libasan0-4.8.3+r212056-2.2.4.x86_64.rpm .......................................................................................................................[done (79.2 KiB/s)]
-    Retrieving package libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64                                                                                          (2/13),  14.3 KiB ( 26.1 KiB unpacked)
-    Retrieving: libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm ...............................................................................................................[done (55.3 KiB/s)] 
- -25. 为特定的CPU架构安装指定版本号的软件包(以兼容 i586 且版本低于5.1的 gcc 为例) - -
%> zypper in 'gcc.i586<5.1'
-    Loading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-
-    The following 13 NEW packages are going to be installed:
-      cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49
-
-    13 new packages to install.
-    Overall download size: 14.4 MiB. Already cached: 129.5 KiB  After the operation, additional 49.4 MiB will be used.
-    Continue? [y/n/? shows all options] (y): y
-    In cache libasan0-4.8.3+r212056-2.2.4.x86_64.rpm                                                                                                        (1/13),  74.2 KiB (166.9 KiB unpacked)
-    In cache libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm                                           (2/13),  14.3 KiB ( 26.1 KiB unpacked)
-    In cache libgomp1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm                                             (3/13),  41.1 KiB ( 90.7 KiB unpacked) 
- -26. 从指定的软件库里面安装一个软件包,例如从 amarok 中安装 libxine。 -
%> zypper in amarok upd:libxine1
-    Loading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-    The following 202 NEW packages are going to be installed:
-      amarok bundle-lang-kde-en clamz cups-libs enscript fontconfig gdk-pixbuf-query-loaders ghostscript-fonts-std gptfdisk gstreamer gstreamer-plugins-base hicolor-icon-theme
-      hicolor-icon-theme-branding-openSUSE htdig hunspell hunspell-tools icoutils ispell ispell-american kde4-filesystem kdebase4-runtime kdebase4-runtime-branding-openSUSE kdelibs4
-      kdelibs4-branding-openSUSE kdelibs4-core kdialog libakonadi4 l
-    .....
- -27. 通过指定软件包的名字安装软件包。 - -
%> zypper in -n git
-    Loading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-
-    The following 35 NEW packages are going to be installed:
-      cvs cvsps fontconfig git git-core git-cvs git-email git-gui gitk git-svn git-web libserf-1-1 libsqlite3-0 libXft2 libXrender1 libXss1 perl-Authen-SASL perl-Clone perl-DBD-SQLite perl-DBI
-      perl-Error perl-IO-Socket-SSL perl-MLDBM perl-Net-Daemon perl-Net-SMTP-SSL perl-Net-SSLeay perl-Params-Util perl-PlRPC perl-SQL-Statement perl-Term-ReadKey subversion subversion-perl tcl
-      tk xhost
-
-    The following 13 recommended packages were automatically selected:
-      git-cvs git-email git-gui gitk git-svn git-web perl-Authen-SASL perl-Clone perl-MLDBM perl-Net-Daemon perl-Net-SMTP-SSL perl-PlRPC perl-SQL-Statement
-
-    The following package is suggested, but will not be installed:
-      git-daemon
-
-    35 new packages to install.
-    Overall download size: 15.6 MiB. Already cached: 0 B  After the operation, additional 56.7 MiB will be used.
-    Continue? [y/n/? shows all options] (y): y 
- -28. 通过通配符来安装软件包,例如,安装所有 php5 的软件包。 -
%> zypper in php5*
-    Loading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-
-    Problem: php5-5.6.1-18.1.x86_64 requires smtp_daemon, but this requirement cannot be provided
-      uninstallable providers: exim-4.83-3.1.8.x86_64[openSUSE-13.2-0]
-                       postfix-2.11.0-5.2.2.x86_64[openSUSE-13.2-0]
-                       sendmail-8.14.9-2.2.2.x86_64[openSUSE-13.2-0]
-                       exim-4.83-3.1.8.i586[repo-oss]
-                       msmtp-mta-1.4.32-2.1.3.i586[repo-oss]
-                       postfix-2.11.0-5.2.2.i586[repo-oss]
-                       sendmail-8.14.9-2.2.2.i586[repo-oss]
-                       exim-4.83-3.1.8.x86_64[repo-oss]
-                       msmtp-mta-1.4.32-2.1.3.x86_64[repo-oss]
-                       postfix-2.11.0-5.2.2.x86_64[repo-oss]
-                       sendmail-8.14.9-2.2.2.x86_64[repo-oss]
-                       postfix-2.11.3-5.5.1.i586[repo-update]
-                       postfix-2.11.3-5.5.1.x86_64[repo-update]
-     Solution 1: Following actions will be done:
-      do not install php5-5.6.1-18.1.x86_64
-      do not install php5-pear-Auth_SASL-1.0.6-7.1.3.noarch
-      do not install php5-pear-Horde_Http-2.0.1-6.1.3.noarch
-      do not install php5-pear-Horde_Image-2.0.1-6.1.3.noarch
-      do not install php5-pear-Horde_Kolab_Format-2.0.1-6.1.3.noarch
-      do not install php5-pear-Horde_Ldap-2.0.1-6.1.3.noarch
-      do not install php5-pear-Horde_Memcache-2.0.1-7.1.3.noarch
-      do not install php5-pear-Horde_Mime-2.0.2-6.1.3.noarch
-      do not install php5-pear-Horde_Oauth-2.0.0-6.1.3.noarch
-      do not install php5-pear-Horde_Pdf-2.0.1-6.1.3.noarch
-    ....
- -29. 使用模式名称(模式名称是一类软件包的名字)来批量安装软件包 - -
%> zypper in -t pattern lamp_server
-    ading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-
-    The following 29 NEW packages are going to be installed:
-      apache2 apache2-doc apache2-example-pages apache2-mod_perl apache2-prefork patterns-openSUSE-lamp_server perl-Data-Dump perl-Encode-Locale perl-File-Listing perl-HTML-Parser
-      perl-HTML-Tagset perl-HTTP-Cookies perl-HTTP-Daemon perl-HTTP-Date perl-HTTP-Message perl-HTTP-Negotiate perl-IO-HTML perl-IO-Socket-SSL perl-libwww-perl perl-Linux-Pid
-      perl-LWP-MediaTypes perl-LWP-Protocol-https perl-Net-HTTP perl-Net-SSLeay perl-Tie-IxHash perl-TimeDate perl-URI perl-WWW-RobotRules yast2-http-server
-
-    The following NEW pattern is going to be installed:
-      lamp_server
-
-    The following 10 recommended packages were automatically selected:
-      apache2 apache2-doc apache2-example-pages apache2-mod_perl apache2-prefork perl-Data-Dump perl-IO-Socket-SSL perl-LWP-Protocol-https perl-TimeDate yast2-http-server
-
-    29 new packages to install.
-    Overall download size: 7.2 MiB. Already cached: 1.2 MiB  After the operation, additional 34.7 MiB will be used.
-    Continue? [y/n/? shows all options] (y): 
- -30. 使用一行命令安转一个软件包同时卸载另一个软件包,例如在安装 nano 的同时卸载 vi - -
# zypper in nano -vi
-    Loading repository data...
-    Reading installed packages...
-    '-vi' not found in package names. Trying capabilities.
-    Resolving package dependencies...
-
-    The following 2 NEW packages are going to be installed:
-      nano nano-lang
-
-    The following package is going to be REMOVED:
-      vim
-
-    The following recommended package was automatically selected:
-      nano-lang
-
-    2 new packages to install, 1 to remove.
-    Overall download size: 550.0 KiB. Already cached: 0 B  After the operation, 463.3 KiB will be freed.
-    Continue? [y/n/? shows all options] (y):
-    ...
- -31. 使用 zypper 安装 rpm 软件包。 - -
%> zypper in teamviewer*.rpm
-    Loading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-
-    The following 24 NEW packages are going to be installed:
-      alsa-oss-32bit fontconfig-32bit libasound2-32bit libexpat1-32bit libfreetype6-32bit libgcc_s1-gcc49-32bit libICE6-32bit libjpeg62-32bit libpng12-0-32bit libpng16-16-32bit libSM6-32bit
-      libuuid1-32bit libX11-6-32bit libXau6-32bit libxcb1-32bit libXdamage1-32bit libXext6-32bit libXfixes3-32bit libXinerama1-32bit libXrandr2-32bit libXrender1-32bit libXtst6-32bit
-      libz1-32bit teamviewer
-
-    The following recommended package was automatically selected:
-      alsa-oss-32bit
-
-    24 new packages to install.
-    Overall download size: 41.2 MiB. Already cached: 0 B  After the operation, additional 119.7 MiB will be used.
-    Continue? [y/n/? shows all options] (y):
-    ..
- -#### 使用 zypper 卸载软件包 #### - -32. 命令 ‘zypper remove‘ 和 ‘zypper rm‘ 用于卸载软件包。例如卸载 apache2: - -
%> zypper remove apache2 
- 或者 -
%> zypper rm apache2
-    Loading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-
-    The following 2 packages are going to be REMOVED:
-      apache2 apache2-prefork
-
-    2 packages to remove.
-    After the operation, 4.2 MiB will be freed.
-    Continue? [y/n/? shows all options] (y): y
-    (1/2) Removing apache2-2.4.10-19.1 ........................................................................[done]
-    (2/2) Removing apache2-prefork-2.4.10-19.1 ................................................................[done] 
- -#### 使用Zypper 进行软件包更新 #### - -33. 更新所有的软件包,可以使用 ‘zypper update‘ 或者 ‘zypper up‘。 - -
%> zypper up 
- 或者 -
%> zypper update
-
-    Loading repository data...
-    Reading installed packages...
-    Nothing to do. 
- -34. 更新指定的软件包,例如更新 apache2 以及 openssh。 - -
 zypper up apache2 openssh
-    Loading repository data...
-    Reading installed packages...
-    No update candidate for 'apache2-2.4.10-19.1.x86_64'. The highest available version is already installed.
-    No update candidate for 'openssh-6.6p1-5.1.3.x86_64'. The highest available version is already installed.
-    Resolving package dependencies...
-
-    Nothing to do.
- -35. 安装一个软件库,例如 ariadb,如果该库存在则更新之。 - -
%> zypper in mariadb
-    Loading repository data...
-    Reading installed packages...
-    'mariadb' is already installed.
-    No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed.
-    Resolving package dependencies...
-
-    Nothing to do.
- -#### 安装源文件并且构建依赖关系 #### - -命令 ‘zypper source-install‘ 或者 ‘zypper si‘ 可以用于从源文件编译软件包 - -36. 安装某一个软件包的源文件及其依赖关系,例如 mariadb。 - -
%> zypper si mariadb
-    Reading installed packages...
-    Loading repository data...
-    Resolving package dependencies...
-
-    The following 36 NEW packages are going to be installed:
-      autoconf automake bison cmake cpp cpp48 gcc gcc48 gcc48-c++ gcc-c++ libaio-devel libarchive13 libasan0 libatomic1-gcc49 libcloog-isl4 libedit-devel libevent-devel libgomp1-gcc49 libisl10
-      libitm1-gcc49 libltdl7 libmpc3 libmpfr4 libopenssl-devel libstdc++48-devel libtool libtsan0-gcc49 m4 make ncurses-devel pam-devel readline-devel site-config tack tcpd-devel zlib-devel
-
-    The following source package is going to be installed:
-      mariadb
-
-    36 new packages to install, 1 source package.
-    Overall download size: 71.5 MiB. Already cached: 129.5 KiB  After the operation, additional 183.9 MiB will be used.
-    Continue? [y/n/? shows all options] (y): y 
- -37. 仅为某一个软件包安装源文件,例如 mariadb - -
%> zypper in -D mariadb
-    Loading repository data...
-    Reading installed packages...
-    'mariadb' is already installed.
-    No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed.
-    Resolving package dependencies...
-
-    Nothing to do. 
- -38. 仅为某一个软件包安装依赖关系,例如 mariadb - -
%> zypper si -d mariadb
-    Reading installed packages...
-    Loading repository data...
-    Resolving package dependencies...
-
-    The following 36 NEW packages are going to be installed:
-      autoconf automake bison cmake cpp cpp48 gcc gcc48 gcc48-c++ gcc-c++ libaio-devel libarchive13 libasan0 libatomic1-gcc49 libcloog-isl4 libedit-devel libevent-devel libgomp1-gcc49 libisl10
-      libitm1-gcc49 libltdl7 libmpc3 libmpfr4 libopenssl-devel libstdc++48-devel libtool libtsan0-gcc49 m4 make ncurses-devel pam-devel readline-devel site-config tack tcpd-devel zlib-devel
-
-    The following package is recommended, but will not be installed due to conflicts or dependency issues:
-      readline-doc
-
-    36 new packages to install.
-    Overall download size: 33.7 MiB. Already cached: 129.5 KiB  After the operation, additional 144.3 MiB will be used.
-    Continue? [y/n/? shows all options] (y): y
- -#### Zypper in Scripts and Applications #### - -39. 安装一个软件包,并且在安装过程中跳过与用户的交互, 例如 mariadb。 - -
%> zypper --non-interactive in mariadb
-    Loading repository data...
-    Reading installed packages...
-    'mariadb' is already installed.
-    No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed.
-    Resolving package dependencies...
-
-    Nothing to do.
- -40. 卸载一个软件包,并且在卸载过程中跳过与用户的交互,例如 mariadb - -
%> zypper --non-interactive rm mariadb
-    Loading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-
-    The following package is going to be REMOVED:
-      mariadb
-
-    1 package to remove.
-    After the operation, 71.8 MiB will be freed.
-    Continue? [y/n/? shows all options] (y): y
-    (1/1) Removing mariadb-10.0.13-2.6.1 .............................................................................[done] 
- -41. 将 zypper 输出用 XML 格式打印。 - -
%> zypper --xmlout
-      Usage:
-    	zypper [--global-options]  [--command-options] [arguments]
-
-      Global Options
-    ....
- -42. 禁止详细信息输出到屏幕。 - -
%> zypper --quiet in mariadb
-    The following NEW package is going to be installed:
-      mariadb
-
-    1 new package to install.
-    Overall download size: 0 B. Already cached: 7.8 MiB  After the operation, additional 71.8 MiB will be used.
-    Continue? [y/n/? shows all options] (y):
-    ...
- -43. 在卸载过程中禁止详细信息输出到屏幕 - -
%> zypper --quiet rm mariadb 
- -44. 自动地同意版权或者协议。 -
%> zypper patch --auto-agree-with-licenses
-    Loading repository data...
-    Reading installed packages...
-    Resolving package dependencies...
-
-    Nothing to do.
- -#### 清除 Zypper 缓存以及查看历史信息 #### - -45. 以下指令可以用来清理Zypper缓存。 - -
%> zypper clean
-    All repositories have been cleaned up.
- -如果需要一次性地清理元数据以及软件包缓存,可以通过 -all/-a 选项来达到目的 - -
%> zypper clean -a
-    All repositories have been cleaned up.
- -46. 查看 Zypper 的历史信息。籍由 Zypper 所有的软件包管理动作,包括安装、更新以及卸载都会在 /var/log/zypp/history中保留历史信息。可以通过 cat 来查看此文件,或者通过过滤器来筛选希望看到的信息。 - -
 cat /var/log/zypp/history
-    2015-05-07 15:43:03|install|boost-license1_54_0|1.54.0-10.1.3|noarch||openSUSE-13.2-0|0523b909d2aae5239f9841316dafaf3a37b4f096|
-    2015-05-07 15:43:03|install|branding-openSUSE|13.2-3.6.1|noarch||openSUSE-13.2-0|6609def94b1987bf3f90a9467f4f7ab8f8d98a5c|
-    2015-05-07 15:43:03|install|bundle-lang-common-en|13.2-3.3.1|noarch||openSUSE-13.2-0|ca55694e6fdebee6ce37ac7cf3725e2aa6edc342|
-    2015-05-07 15:43:03|install|insserv-compat|0.1-12.2.2|noarch||openSUSE-13.2-0|6160de7fbf961a279591a83a1550093a581214d9|
-    2015-05-07 15:43:03|install|libX11-data|1.6.2-5.1.2|noarch||openSUSE-13.2-0|f1cb58364ba9016c1f93b1a383ba12463c56885a|
-    2015-05-07 15:43:03|install|libnl-config|3.2.25-2.1.2|noarch||openSUSE-13.2-0|aab2ded312a781e93b739b418e3d32fe4e187020|
-    2015-05-07 15:43:04|install|wireless-regdb|2014.06.13-1.2|noarch||openSUSE-13.2-0|be8cb16f3e92af12b5ceb977e37e13f03c007bd1|
-    2015-05-07 15:43:04|install|yast2-trans-en_US|3.1.0-2.1|noarch||openSUSE-13.2-0|1865754e5e0ec3c149ac850b340bcca55a3c404d|
-    2015-05-07 15:43:04|install|yast2-trans-stats|2.19.0-16.1.3|noarch||openSUSE-13.2-0|b107d2b3e702835885b57b04d12d25539f262d1a|
-    2015-05-07 15:43:04|install|cracklib-dict-full|2.8.12-64.1.2|x86_64||openSUSE-13.2-0|08bd45dbba7ad44e3a4837f730be76f55ad5dcfa|
-    ......
- -#### 使用 Zypper 进行SUSE系统升级 #### - -47. 可以使用 Zypper 命令的 'dist-upgrade' 选项来将当前的SUSE Linux升级至最新版本。 -
# zypper dist-upgrade
-    You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
-    Building repository 'openSUSE-13.2-0' cache .....................................................................[done]
-    Retrieving repository 'openSUSE-13.2-Debug' metadata ............................................................[done]
-    Building repository 'openSUSE-13.2-Debug' cache .................................................................[done]
-    Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ..........................................................[done]
-    Building repository 'openSUSE-13.2-Non-Oss' cache ...............................................................[done]
- -正文至此结束。希望本文可以帮助读者尤其是新手们管理SUSE Linux系统和服务器。如果您觉得某些比较重要的命令被作者漏掉了,请在评论部分写下您的返回,作者将根据评论对文章进行更新。保持联络,保持评论,多谢支持。 - --------------------------------------------------------------------------------- - -原文地址: http://www.tecmint.com/zypper-commands-to-manage-suse-linux-package-management/ - -作者:[Avishek Kumar][a] -译者:[张博约](https://github.com/zhangboyue) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/installation-of-suse-linux-enterprise-server-12/ From f644d213a78a924dbe1f6db91466290d7e3a4239 Mon Sep 17 00:00:00 2001 From: zhangkun Date: Sun, 24 May 2015 18:31:57 +0800 Subject: [PATCH 0938/2517] Finished translation of '45 zypper commands --- sources/tech/.directory | 4 + ... Manage 'Suse' Linux Package Management.md | 767 ++++++++++++++++++ 2 files changed, 771 insertions(+) create mode 100644 sources/tech/.directory create mode 100644 translated/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md diff --git a/sources/tech/.directory b/sources/tech/.directory new file mode 100644 index 0000000000..45bdd1cb5c --- /dev/null +++ b/sources/tech/.directory @@ -0,0 +1,4 @@ +[Dolphin] +Timestamp=2015,5,23,17,31,51 +Version=3 +ViewMode=2 diff --git a/translated/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md b/translated/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md new file mode 100644 index 0000000000..bfd3eeeaf5 --- /dev/null +++ b/translated/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md @@ -0,0 +1,767 @@ +45 个用于 ‘Suse‘ Linux 包管理的 Zypper 命令 +====================================================================== +SUSE( Software and System Entwicklung,即软件和系统开发。其中‘entwicklung‘是德语,意为开发)Linux是 Novell 公司在 Linux 内核基础上发布的操作系统。SUSE Linux 有两个发行分支。其中之一名为 OpenSUSE,这是一款自由而且免费的操作系统。该系统由开源社区开发维护,支持一些最新版本的应用软件,其最新的稳定版本为 13.2。 + +另外一个分支是SUSE Linux 企业版。该分支是一个为企业及商业化产品设计的 Linux 发行版,包含了大量的企业应用以及适用于商业产品生产环境的特性。其最新的稳定版本为 12。 + +以下的链接包含了安装企业版 SUSE Linux 服务器的详细信息。 + +- [如何安装企业版 SUSE Linux 12][1] + +Zypper 和 Yast 是 SUSE Linux 平台上的软件包管理工具,他们的底层使用了 RPM(译者注:RPM 最初指 Redhat Pacakge Manager ,现普遍解释为递归短语 RPM Package Manager 的缩写)。 + +Yast(Yet another Setup Tool )是 OpenSUSE 以及企业版 SUSE 上用于系统管理、设置和配置的工具。 + +Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUSE Linux上的软件以及进行系统更新。ZYpp为Zypper和Yast提供底层支持。 + +本文将介绍实际应用中常见的一些Zypper命令。这些命令用来进行安装、更新、删除等任何软件包管理器所能够胜任的工作。 + +**重要** : 切记所有的这些指令都将在系统全局范围内产生影响,所以必须以 root 身份执行,否则命令将失败。 + +### 获取基本的 Zypper 帮助信息 ### + +1. 不带任何选项的执行 zypper, 将输出该命令的全局选项以及子命令列表(译者注:全局选项,global option,控制台命令的输入分为可选参数和位置参数两大类。按照习惯,一般可选参数称为选项'option',而位置参数称为参数 'argument')。 + +
%>  zypper
+        Usage:
+        zypper [--global-options]
+ +2. 获取一个具体的子命令的帮助信息,比如 'in' (install),可以执行下面的命令 + +
%> zypper help in
+ 或者 +
%> zypper help install
+    install (in) [options] {capability | rpm_file_uri}
+    
+    Install packages with specified capabilities or RPM files with specified
+    location. A capability is NAME[.ARCH][OP], where OP is one
+    of <, <=, =, >=, >.
+    
+      Command options:
+    --from     Select packages from the specified repository.
+    -r, --repo     Load only the specified repository.
+    -t, --type            Type of package (package, patch, pattern, product, srcpackage).
+                                Default: package.
+    -n, --name                  Select packages by plain name, not by capability.
+    -C, --capability            Select packages by capability.
+    -f, --force                 Install even if the item is already installed (reinstall),
+                                downgraded or changes vendor or architecture.
+        --oldpackage            Allow to replace a newer item with an older one.
+                                Handy if you are doing a rollback. Unlike --force
+    j                            it will not enforce a reinstall.
+        --replacefiles          Install the packages even if they replace files from other,
+                                already installed, packages. Default is to treat file conflicts
+                                as an error. --download-as-needed disables the fileconflict check.
+    ...... 
+ +3. 安装之前搜索一个安转包(以 gnome-desktop 为例 ) + +
# zypper se gnome-desktop
+    
+    Retrieving repository 'openSUSE-13.2-Debug' metadata ............................................................[done]
+    Building repository 'openSUSE-13.2-Debug' cache .................................................................[done]
+    Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ......................................................... [done]
+    Building repository 'openSUSE-13.2-Non-Oss' cache ...............................................................[done]
+    Retrieving repository 'openSUSE-13.2-Oss' metadata ..............................................................[done]
+    Building repository 'openSUSE-13.2-Oss' cache ...................................................................[done]
+    Retrieving repository 'openSUSE-13.2-Update' metadata ...........................................................[done]
+    Building repository 'openSUSE-13.2-Update' cache ................................................................[done]
+    Retrieving repository 'openSUSE-13.2-Update-Non-Oss' metadata ...................................................[done]
+    Building repository 'openSUSE-13.2-Update-Non-Oss' cache ........................................................[done]
+    Loading repository data...
+    Reading installed packages...
+    
+    S | Name                                  | Summary                                                   | Type
+    --+---------------------------------------+-----------------------------------------------------------+-----------
+      | gnome-desktop2-lang                   | Languages for package gnome-desktop2                      | package
+      | gnome-desktop2                        | The GNOME Desktop API Library                             | package
+      | libgnome-desktop-2-17                 | The GNOME Desktop API Library                             | package
+      | libgnome-desktop-3-10                 | The GNOME Desktop API Library                             | package
+      | libgnome-desktop-3-devel              | The GNOME Desktop API Library -- Development Files        | package
+      | libgnome-desktop-3_0-common           | The GNOME Desktop API Library -- Common data files        | package
+      | gnome-desktop-debugsource             | Debug sources for package gnome-desktop                   | package
+      | gnome-desktop-sharp2-debugsource      | Debug sources for package gnome-desktop-sharp2            | package
+      | gnome-desktop2-debugsource            | Debug sources for package gnome-desktop2                  | package
+      | libgnome-desktop-2-17-debuginfo       | Debug information for package libgnome-desktop-2-17       | package
+      | libgnome-desktop-3-10-debuginfo       | Debug information for package libgnome-desktop-3-10       | package
+      | libgnome-desktop-3_0-common-debuginfo | Debug information for package libgnome-desktop-3_0-common | package
+      | libgnome-desktop-2-17-debuginfo-32bit | Debug information for package libgnome-desktop-2-17       | package
+      | libgnome-desktop-3-10-debuginfo-32bit | Debug information for package libgnome-desktop-3-10       | package
+      | gnome-desktop-sharp2                  | Mono bindings for libgnome-desktop                        | package
+      | libgnome-desktop-2-devel              | The GNOME Desktop API Library -- Development Files        | packag
+      | gnome-desktop-lang                    | Languages for package gnome-desktop                       | package
+      | libgnome-desktop-2-17-32bit           | The GNOME Desktop API Library                             | package
+      | libgnome-desktop-3-10-32bit           | The GNOME Desktop API Library                             | package
+      | gnome-desktop                         | The GNOME Desktop API Library                             | srcpackage
+ +4. 获取一个模式包的信息(以 lamp_server 为例)。 + +
%> zypper info -t pattern lamp_server
+    
+    Loading repository data...
+    Reading installed packages...
+    
+    
+    Information for pattern lamp_server:
+    ------------------------------------
+    Repository: openSUSE-13.2-Update
+    Name: lamp_server
+    Version: 20141007-5.1
+    Arch: x86_64
+    Vendor: openSUSE
+    Installed: No
+    Visible to User: Yes
+    Summary: Web and LAMP Server
+    Description: 
+      Software to set up a Web server that is able to serve static, dynamic, and interactive content (like a Web shop). This includes Apache HTTP Server, the database management system MySQL,
+      and scripting languages such as PHP, Python, Ruby on Rails, or Perl.
+    Contents:
+    
+    S | Name                          | Type    | Dependency
+    --+-------------------------------+---------+-----------
+      | apache2-mod_php5              | package |
+      | php5-iconv                    | package |
+    i | patterns-openSUSE-base        | package |
+    i | apache2-prefork               | package |
+      | php5-dom                      | package |
+      | php5-mysql                    | package |
+    i | apache2                       | package |
+      | apache2-example-pages         | package |
+      | mariadb                       | package |
+      | apache2-mod_perl              | package |
+      | php5-ctype                    | package |
+      | apache2-doc                   | package |
+      | yast2-http-server             | package |
+      | patterns-openSUSE-lamp_server | package |
+ +5. 开启一个Zypper Shell 的会话。 + +
 %>zypper shell 
+ 或者 +
 %>zypper sh 
+ +
zypper> help
+      Usage:
+    	zypper [--global-options]
+ +**注意**:在 Zypper shell里面可以通过键入 ‘help‘ 获得全局选项以及子命令的列表。 +### Zypper 软件库管理 ### + +#### 列举已定义的软件库 #### + +6. 使用 'zypper repos' 或者 'zypper lr' 来列举所有已定以的软件库。 + +
%> zypper repos
+ 或者 +
%> zypper lr
+      | Alias                     | Name                               | Enabled | Refresh
+    --+---------------------------+------------------------------------+---------+--------
+    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No
+    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes
+    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes
+    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes
+    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes
+    6 | repo-oss                  | openSUSE-13.2-Oss                  | Yes     | Yes
+    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes
+    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes
+    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes
+ +7. 在表格里面显示 zypper URI + +
# zypper lr -u
+      | Alias                     | Name                               | Enabled | Refresh | URI
+    --+---------------------------+------------------------------------+---------+---------+----------------------------------------------------------------
+    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No      | cd:///?devices=/dev/disk/by-id/ata-VBOX_CD-ROM_VB2-01700376
+    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes     | http://download.opensuse.org/debug/distribution/13.2/repo/oss/
+    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes     | http://download.opensuse.org/debug/update/13.2/
+    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes     | http://download.opensuse.org/debug/update/13.2-non-oss/
+    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes     | http://download.opensuse.org/distribution/13.2/repo/non-oss/
+    6 | repo-oss                  | openSUSE-13.2-Oss                  | Yes     | Yes     | http://download.opensuse.org/distribution/13.2/repo/oss/
+    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes     | http://download.opensuse.org/source/distribution/13.2/repo/oss/
+    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes     | http://download.opensuse.org/update/13.2/
+    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes     | http://download.opensuse.org/update/13.2-non-oss/
+ +8. 根据优先级列举软件库。 + +
%> zypper lr -P
+      | Alias                     | Name                               | Enabled | Refresh | Priority
+    --+---------------------------+------------------------------------+---------+---------+---------
+    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No      |   99
+    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes     |   99
+    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes     |   99
+    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes     |   99
+    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes     |   85
+    6 | repo-oss                  | openSUSE-13.2-Oss                  | Yes     | Yes     |   99
+    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes     |   99
+    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes     |   99
+    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes     |   99
+ +#### 刷新软件库 #### + +9. 使用 'zypper refresh' or 'zypper ref' 来刷新 zypper 软件库。 + +
%> zypper refresh 
+ 或者 +
%> zypper ref
+    Repository 'openSUSE-13.2-0' is up to date.
+    Repository 'openSUSE-13.2-Debug' is up to date.
+    Repository 'openSUSE-13.2-Non-Oss' is up to date.
+    Repository 'openSUSE-13.2-Oss' is up to date.
+    Repository 'openSUSE-13.2-Update' is up to date.
+    Repository 'openSUSE-13.2-Update-Non-Oss' is up to date.
+    All repositories have been refreshed. 
+ +10. 刷新一个指定的软件库(以 'repo-non-oss' 为例 )。 + +
%> zypper refresh repo-non-oss
+    Repository 'openSUSE-13.2-Non-Oss' is up to date.
+    Specified repositories have been refreshed. 
+ +11. 强制更新一个软件库(以 'repo-non-oss' 为例 )。 + +
%> zypper ref -f repo-non-oss 
+    Forcing raw metadata refresh
+    Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ............................................................[done]
+    Forcing building of repository cache
+    Building repository 'openSUSE-13.2-Non-Oss' cache ............................................................[done]
+    Specified repositories have been refreshed.
+ +#### 修改软件库 #### + +本文中我们使用‘zypper modifyrepo‘ 或者 ‘zypper mr‘ 来关闭或者开启 zypper 软件库。 + +12. 在关闭一个软件库之前,我们需要知道在 zypper中,每一个软件库有一个唯一的标示数字与之关联,该数字用于打开或者关闭与之相联系的软件库。假设我们需要关闭 'repo-oss' 软件库,那么我们可以通过以下的法来获得该软件库的标志数字。 + +
%> zypper lr
+      | Alias                     | Name                               | Enabled | Refresh
+    --+---------------------------+------------------------------------+---------+--------
+    1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No
+    2 | repo-debug                | openSUSE-13.2-Debug                | Yes     | Yes
+    3 | repo-debug-update         | openSUSE-13.2-Update-Debug         | No      | Yes
+    4 | repo-debug-update-non-oss | openSUSE-13.2-Update-Debug-Non-Oss | No      | Yes
+    5 | repo-non-oss              | openSUSE-13.2-Non-Oss              | Yes     | Yes
+    6 | repo-oss                  | openSUSE-13.2-Oss                  | No      | Yes
+    7 | repo-source               | openSUSE-13.2-Source               | No      | Yes
+    8 | repo-update               | openSUSE-13.2-Update               | Yes     | Yes
+    9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes
+从以上输出的列表中我们可以看到 'repo-oss' 库的标示数字是 6,因此通过以下的命令来关闭该库。 + +
%> zypper mr -d 6
+    Repository 'repo-oss' has been successfully disabled.
+ +13. 如果需要再次开启软件库 ‘repo-oss‘, 接上例,与之相关联的标示数字为 6。 + +
%> zypper mr -e 6
+    Repository 'repo-oss' has been successfully enabled.
+ +14. 针对某一个软件库(以 'repo-non-oss' 为例 )开启自动刷新( auto-refresh )和 rpm 缓存,并设置该软件库的优先级,比如85。 + +
%> zypper mr -rk -p 85 repo-non-oss
+    Repository 'repo-non-oss' priority has been left unchanged (85)
+    Nothing to change for repository 'repo-non-oss'.
+ +15. 对所有的软件库关闭 rpm 文件缓存。 + +
%> zypper mr -Ka
+    RPM files caching has been disabled for repository 'openSUSE-13.2-0'.
+    RPM files caching has been disabled for repository 'repo-debug'.
+    RPM files caching has been disabled for repository 'repo-debug-update'.
+    RPM files caching has been disabled for repository 'repo-debug-update-non-oss'.
+    RPM files caching has been disabled for repository 'repo-non-oss'.
+    RPM files caching has been disabled for repository 'repo-oss'.
+    RPM files caching has been disabled for repository 'repo-source'.
+    RPM files caching has been disabled for repository 'repo-update'.
+    RPM files caching has been disabled for repository 'repo-update-non-oss'.
+ +16. 对所有的软件库开启 rpm 文件缓存。 +
 zypper mr -ka
+    RPM files caching has been enabled for repository 'openSUSE-13.2-0'.
+    RPM files caching has been enabled for repository 'repo-debug'.
+    RPM files caching has been enabled for repository 'repo-debug-update'.
+    RPM files caching has been enabled for repository 'repo-debug-update-non-oss'.
+    RPM files caching has been enabled for repository 'repo-non-oss'.
+    RPM files caching has been enabled for repository 'repo-oss'.
+    RPM files caching has been enabled for repository 'repo-source'.
+    RPM files caching has been enabled for repository 'repo-update'.
+    RPM files caching has been enabled for repository 'repo-update-non-oss'.
+ +17. 关闭远程库的rpm 文件缓存 +
%> zypper mr -Kt
+    RPM files caching has been disabled for repository 'repo-debug'.
+    RPM files caching has been disabled for repository 'repo-debug-update'.
+    RPM files caching has been disabled for repository 'repo-debug-update-non-oss'.
+    RPM files caching has been disabled for repository 'repo-non-oss'.
+    RPM files caching has been disabled for repository 'repo-oss'.
+    RPM files caching has been disabled for repository 'repo-source'.
+    RPM files caching has been disabled for repository 'repo-update'.
+    RPM files caching has been disabled for repository 'repo-update-non-oss'.
+ +18. 开启远程软件库的 rpm 文件缓存。 +
%> zypper mr -kt
+    RPM files caching has been enabled for repository 'repo-debug'.
+    RPM files caching has been enabled for repository 'repo-debug-update'.
+    RPM files caching has been enabled for repository 'repo-debug-update-non-oss'.
+    RPM files caching has been enabled for repository 'repo-non-oss'.
+    RPM files caching has been enabled for repository 'repo-oss'.
+    RPM files caching has been enabled for repository 'repo-source'.
+    RPM files caching has been enabled for repository 'repo-update'.
+    RPM files caching has been enabled for repository 'repo-update-non-oss'.
+ +#### 增加新的软件库 #### + +可以通过这两个 zypper 指令 – 'zypper addrepo' 和 'zypper ar' 来增加新的软件库。在此过程中可以使用 URL 或者软件库的别名。 + +19. 增加一个新的软件库( 以 “http://download.opensuse.org/update/12.3/” 为例 )。 + +
%>  zypper ar http://download.opensuse.org/update/11.1/ update
+    Adding repository 'update' .............................................................................................................................................................[done]
+    Repository 'update' successfully added
+    Enabled     : Yes
+    Autorefresh : No
+    GPG check   : Yes
+    URI         : http://download.opensuse.org/update/11.1/
+ +20. 更改一个软件库的名字,这将仅仅改变软件库的别名。 命令 'zypper namerepo' 或者 'zypperr nr' 可以胜任此工作。例如更改标示数字为10的软件库的名字为 'upd8',或者说将标示数字为10的软件库的别名改为 'upd8',可以使用下面的命令。 + +
%> zypper nr 10 upd8
+    Repository 'update' renamed to 'upd8'.
+ +#### 删除软件库 #### + +21. 删除一个软件库。要从系统删除一个软件库可以使 'zypper removerepo' 或者 'zypper rr'。例如以下的命令可以删除软件库 'upd8' + +
%> zypper rr upd8
+    # Removing repository 'upd8' .........................................................................................[done]
+    Repository 'upd8' has been removed.
+ +### 使用 zypper 进行软件包管理 ### + +#### 用 zypper 安装一个软件包 #### + +22. 在 zypper 中,我们可以通过软件包的功能名称来安装一个软件包。以 Firefox 为例,以下的命令可以用来安装该软件包。 +
%> zypper in MozillaFirefox
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 128 NEW packages are going to be installed:
+      adwaita-icon-theme at-spi2-atk-common at-spi2-atk-gtk2 at-spi2-core cantarell-fonts cups-libs desktop-file-utils fontconfig gdk-pixbuf-query-loaders gstreamer gstreamer-fluendo-mp3
+      gstreamer-plugins-base gtk2-branding-openSUSE gtk2-data gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese gtk2-metatheme-adwaita
+      gtk2-theming-engine-adwaita gtk2-tools gtk3-data gtk3-metatheme-adwaita gtk3-tools hicolor-icon-theme hicolor-icon-theme-branding-openSUSE libasound2 libatk-1_0-0 libatk-bridge-2_0-0
+      libatspi0 libcairo2 libcairo-gobject2 libcanberra0 libcanberra-gtk0 libcanberra-gtk2-module libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-gtk-module-common libcdda_interface0
+      libcdda_paranoia0 libcolord2 libdrm2 libdrm_intel1 libdrm_nouveau2 libdrm_radeon1 libFLAC8 libfreebl3 libgbm1 libgdk_pixbuf-2_0-0 libgraphite2-3 libgstapp-1_0-0 libgstaudio-1_0-0
+      libgstpbutils-1_0-0 libgstreamer-1_0-0 libgstriff-1_0-0 libgsttag-1_0-0 libgstvideo-1_0-0 libgthread-2_0-0 libgtk-2_0-0 libgtk-3-0 libharfbuzz0 libjasper1 libjbig2 libjpeg8 libjson-c2
+      liblcms2-2 libLLVM libltdl7 libnsssharedhelper0 libogg0 liborc-0_4-0 libpackagekit-glib2-18 libpango-1_0-0 libpciaccess0 libpixman-1-0 libpulse0 libsndfile1 libsoftokn3 libspeex1
+      libsqlite3-0 libstartup-notification-1-0 libtheoradec1 libtheoraenc1 libtiff5 libvisual libvorbis0 libvorbisenc2 libvorbisfile3 libwayland-client0 libwayland-cursor0 libwayland-server0
+      libX11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb-xfixes0 libXcomposite1 libXcursor1 libXdamage1 libXevie1
+      libXfixes3 libXft2 libXi6 libXinerama1 libxkbcommon-0_4_3 libXrandr2 libXrender1 libxshmfence1 libXtst6 libXv1 libXxf86vm1 Mesa Mesa-libEGL1 Mesa-libGL1 Mesa-libglapi0
+      metatheme-adwaita-common MozillaFirefox MozillaFirefox-branding-openSUSE mozilla-nss mozilla-nss-certs PackageKit-gstreamer-plugin pango-tools sound-theme-freedesktop
+
+    The following 10 recommended packages were automatically selected:
+      gstreamer-fluendo-mp3 gtk2-branding-openSUSE gtk2-data gtk2-immodule-amharic gtk2-immodule-inuktitut gtk2-immodule-thai gtk2-immodule-vietnamese libcanberra0 libpulse0
+      PackageKit-gstreamer-plugin
+    
+    128 new packages to install.
+    Overall download size: 77.2 MiB. Already cached: 0 B  After the operation, additional 200.0 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y
+    Retrieving package cantarell-fonts-0.0.16-1.1.noarch                                                                                                   (1/128),  74.1 KiB (115.6 KiB unpacked)
+    Retrieving: cantarell-fonts-0.0.16-1.1.noarch.rpm .........................................................................................................................[done (63.4 KiB/s)]
+    Retrieving package hicolor-icon-theme-0.13-2.1.2.noarch                                                                                                (2/128),  40.1 KiB ( 50.5 KiB unpacked)
+    Retrieving: hicolor-icon-theme-0.13-2.1.2.noarch.rpm ...................................................................................................................................[done]
+    Retrieving package sound-theme-freedesktop-0.8-7.1.2.noarch                                                                                            (3/128), 372.6 KiB (460.3 KiB unpacked) 
+ +23. 安装指定版本号的软件包,(以 gcc 5.1 为例)。 +
 %>zypper in 'gcc<5.1'
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 13 NEW packages are going to be installed:
+      cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49
+
+    13 new packages to install.
+    Overall download size: 14.5 MiB. Already cached: 0 B  After the operation, additional 49.4 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y 
+ +24. 为特定的CPU架构安装软件包(以兼容 i586 的 gcc 为例)。 + +
%> zypper in gcc.i586
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 13 NEW packages are going to be installed:
+      cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49
+
+    13 new packages to install.
+    Overall download size: 14.5 MiB. Already cached: 0 B  After the operation, additional 49.4 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y
+    Retrieving package libasan0-4.8.3+r212056-2.2.4.x86_64                                                                                                  (1/13),  74.2 KiB (166.9 KiB unpacked)
+    Retrieving: libasan0-4.8.3+r212056-2.2.4.x86_64.rpm .......................................................................................................................[done (79.2 KiB/s)]
+    Retrieving package libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64                                                                                          (2/13),  14.3 KiB ( 26.1 KiB unpacked)
+    Retrieving: libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm ...............................................................................................................[done (55.3 KiB/s)] 
+ +25. 为特定的CPU架构安装指定版本号的软件包(以兼容 i586 且版本低于5.1的 gcc 为例) + +
%> zypper in 'gcc.i586<5.1'
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 13 NEW packages are going to be installed:
+      cpp cpp48 gcc gcc48 libasan0 libatomic1-gcc49 libcloog-isl4 libgomp1-gcc49 libisl10 libitm1-gcc49 libmpc3 libmpfr4 libtsan0-gcc49
+
+    13 new packages to install.
+    Overall download size: 14.4 MiB. Already cached: 129.5 KiB  After the operation, additional 49.4 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y
+    In cache libasan0-4.8.3+r212056-2.2.4.x86_64.rpm                                                                                                        (1/13),  74.2 KiB (166.9 KiB unpacked)
+    In cache libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm                                           (2/13),  14.3 KiB ( 26.1 KiB unpacked)
+    In cache libgomp1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm                                             (3/13),  41.1 KiB ( 90.7 KiB unpacked) 
+ +26. 从指定的软件库里面安装一个软件包,例如从 amarok 中安装 libxine。 +
%> zypper in amarok upd:libxine1
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+    The following 202 NEW packages are going to be installed:
+      amarok bundle-lang-kde-en clamz cups-libs enscript fontconfig gdk-pixbuf-query-loaders ghostscript-fonts-std gptfdisk gstreamer gstreamer-plugins-base hicolor-icon-theme
+      hicolor-icon-theme-branding-openSUSE htdig hunspell hunspell-tools icoutils ispell ispell-american kde4-filesystem kdebase4-runtime kdebase4-runtime-branding-openSUSE kdelibs4
+      kdelibs4-branding-openSUSE kdelibs4-core kdialog libakonadi4 l
+    .....
+ +27. 通过指定软件包的名字安装软件包。 + +
%> zypper in -n git
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 35 NEW packages are going to be installed:
+      cvs cvsps fontconfig git git-core git-cvs git-email git-gui gitk git-svn git-web libserf-1-1 libsqlite3-0 libXft2 libXrender1 libXss1 perl-Authen-SASL perl-Clone perl-DBD-SQLite perl-DBI
+      perl-Error perl-IO-Socket-SSL perl-MLDBM perl-Net-Daemon perl-Net-SMTP-SSL perl-Net-SSLeay perl-Params-Util perl-PlRPC perl-SQL-Statement perl-Term-ReadKey subversion subversion-perl tcl
+      tk xhost
+
+    The following 13 recommended packages were automatically selected:
+      git-cvs git-email git-gui gitk git-svn git-web perl-Authen-SASL perl-Clone perl-MLDBM perl-Net-Daemon perl-Net-SMTP-SSL perl-PlRPC perl-SQL-Statement
+
+    The following package is suggested, but will not be installed:
+      git-daemon
+
+    35 new packages to install.
+    Overall download size: 15.6 MiB. Already cached: 0 B  After the operation, additional 56.7 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y 
+ +28. 通过通配符来安装软件包,例如,安装所有 php5 的软件包。 +
%> zypper in php5*
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    Problem: php5-5.6.1-18.1.x86_64 requires smtp_daemon, but this requirement cannot be provided
+      uninstallable providers: exim-4.83-3.1.8.x86_64[openSUSE-13.2-0]
+                       postfix-2.11.0-5.2.2.x86_64[openSUSE-13.2-0]
+                       sendmail-8.14.9-2.2.2.x86_64[openSUSE-13.2-0]
+                       exim-4.83-3.1.8.i586[repo-oss]
+                       msmtp-mta-1.4.32-2.1.3.i586[repo-oss]
+                       postfix-2.11.0-5.2.2.i586[repo-oss]
+                       sendmail-8.14.9-2.2.2.i586[repo-oss]
+                       exim-4.83-3.1.8.x86_64[repo-oss]
+                       msmtp-mta-1.4.32-2.1.3.x86_64[repo-oss]
+                       postfix-2.11.0-5.2.2.x86_64[repo-oss]
+                       sendmail-8.14.9-2.2.2.x86_64[repo-oss]
+                       postfix-2.11.3-5.5.1.i586[repo-update]
+                       postfix-2.11.3-5.5.1.x86_64[repo-update]
+     Solution 1: Following actions will be done:
+      do not install php5-5.6.1-18.1.x86_64
+      do not install php5-pear-Auth_SASL-1.0.6-7.1.3.noarch
+      do not install php5-pear-Horde_Http-2.0.1-6.1.3.noarch
+      do not install php5-pear-Horde_Image-2.0.1-6.1.3.noarch
+      do not install php5-pear-Horde_Kolab_Format-2.0.1-6.1.3.noarch
+      do not install php5-pear-Horde_Ldap-2.0.1-6.1.3.noarch
+      do not install php5-pear-Horde_Memcache-2.0.1-7.1.3.noarch
+      do not install php5-pear-Horde_Mime-2.0.2-6.1.3.noarch
+      do not install php5-pear-Horde_Oauth-2.0.0-6.1.3.noarch
+      do not install php5-pear-Horde_Pdf-2.0.1-6.1.3.noarch
+    ....
+ +29. 使用模式名称(模式名称是一类软件包的名字)来批量安装软件包 + +
%> zypper in -t pattern lamp_server
+    ading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 29 NEW packages are going to be installed:
+      apache2 apache2-doc apache2-example-pages apache2-mod_perl apache2-prefork patterns-openSUSE-lamp_server perl-Data-Dump perl-Encode-Locale perl-File-Listing perl-HTML-Parser
+      perl-HTML-Tagset perl-HTTP-Cookies perl-HTTP-Daemon perl-HTTP-Date perl-HTTP-Message perl-HTTP-Negotiate perl-IO-HTML perl-IO-Socket-SSL perl-libwww-perl perl-Linux-Pid
+      perl-LWP-MediaTypes perl-LWP-Protocol-https perl-Net-HTTP perl-Net-SSLeay perl-Tie-IxHash perl-TimeDate perl-URI perl-WWW-RobotRules yast2-http-server
+
+    The following NEW pattern is going to be installed:
+      lamp_server
+
+    The following 10 recommended packages were automatically selected:
+      apache2 apache2-doc apache2-example-pages apache2-mod_perl apache2-prefork perl-Data-Dump perl-IO-Socket-SSL perl-LWP-Protocol-https perl-TimeDate yast2-http-server
+
+    29 new packages to install.
+    Overall download size: 7.2 MiB. Already cached: 1.2 MiB  After the operation, additional 34.7 MiB will be used.
+    Continue? [y/n/? shows all options] (y): 
+ +30. 使用一行命令安转一个软件包同时卸载另一个软件包,例如在安装 nano 的同时卸载 vi + +
# zypper in nano -vi
+    Loading repository data...
+    Reading installed packages...
+    '-vi' not found in package names. Trying capabilities.
+    Resolving package dependencies...
+
+    The following 2 NEW packages are going to be installed:
+      nano nano-lang
+
+    The following package is going to be REMOVED:
+      vim
+
+    The following recommended package was automatically selected:
+      nano-lang
+
+    2 new packages to install, 1 to remove.
+    Overall download size: 550.0 KiB. Already cached: 0 B  After the operation, 463.3 KiB will be freed.
+    Continue? [y/n/? shows all options] (y):
+    ...
+ +31. 使用 zypper 安装 rpm 软件包。 + +
%> zypper in teamviewer*.rpm
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 24 NEW packages are going to be installed:
+      alsa-oss-32bit fontconfig-32bit libasound2-32bit libexpat1-32bit libfreetype6-32bit libgcc_s1-gcc49-32bit libICE6-32bit libjpeg62-32bit libpng12-0-32bit libpng16-16-32bit libSM6-32bit
+      libuuid1-32bit libX11-6-32bit libXau6-32bit libxcb1-32bit libXdamage1-32bit libXext6-32bit libXfixes3-32bit libXinerama1-32bit libXrandr2-32bit libXrender1-32bit libXtst6-32bit
+      libz1-32bit teamviewer
+
+    The following recommended package was automatically selected:
+      alsa-oss-32bit
+
+    24 new packages to install.
+    Overall download size: 41.2 MiB. Already cached: 0 B  After the operation, additional 119.7 MiB will be used.
+    Continue? [y/n/? shows all options] (y):
+    ..
+ +#### 使用 zypper 卸载软件包 #### + +32. 命令 ‘zypper remove‘ 和 ‘zypper rm‘ 用于卸载软件包。例如卸载 apache2: + +
%> zypper remove apache2 
+ 或者 +
%> zypper rm apache2
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following 2 packages are going to be REMOVED:
+      apache2 apache2-prefork
+
+    2 packages to remove.
+    After the operation, 4.2 MiB will be freed.
+    Continue? [y/n/? shows all options] (y): y
+    (1/2) Removing apache2-2.4.10-19.1 ........................................................................[done]
+    (2/2) Removing apache2-prefork-2.4.10-19.1 ................................................................[done] 
+ +#### 使用Zypper 进行软件包更新 #### + +33. 更新所有的软件包,可以使用 ‘zypper update‘ 或者 ‘zypper up‘。 + +
%> zypper up 
+ 或者 +
%> zypper update
+
+    Loading repository data...
+    Reading installed packages...
+    Nothing to do. 
+ +34. 更新指定的软件包,例如更新 apache2 以及 openssh。 + +
 zypper up apache2 openssh
+    Loading repository data...
+    Reading installed packages...
+    No update candidate for 'apache2-2.4.10-19.1.x86_64'. The highest available version is already installed.
+    No update candidate for 'openssh-6.6p1-5.1.3.x86_64'. The highest available version is already installed.
+    Resolving package dependencies...
+
+    Nothing to do.
+ +35. 安装一个软件库,例如 ariadb,如果该库存在则更新之。 + +
%> zypper in mariadb
+    Loading repository data...
+    Reading installed packages...
+    'mariadb' is already installed.
+    No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed.
+    Resolving package dependencies...
+
+    Nothing to do.
+ +#### 安装源文件并且构建依赖关系 #### + +命令 ‘zypper source-install‘ 或者 ‘zypper si‘ 可以用于从源文件编译软件包 + +36. 安装某一个软件包的源文件及其依赖关系,例如 mariadb。 + +
%> zypper si mariadb
+    Reading installed packages...
+    Loading repository data...
+    Resolving package dependencies...
+
+    The following 36 NEW packages are going to be installed:
+      autoconf automake bison cmake cpp cpp48 gcc gcc48 gcc48-c++ gcc-c++ libaio-devel libarchive13 libasan0 libatomic1-gcc49 libcloog-isl4 libedit-devel libevent-devel libgomp1-gcc49 libisl10
+      libitm1-gcc49 libltdl7 libmpc3 libmpfr4 libopenssl-devel libstdc++48-devel libtool libtsan0-gcc49 m4 make ncurses-devel pam-devel readline-devel site-config tack tcpd-devel zlib-devel
+
+    The following source package is going to be installed:
+      mariadb
+
+    36 new packages to install, 1 source package.
+    Overall download size: 71.5 MiB. Already cached: 129.5 KiB  After the operation, additional 183.9 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y 
+ +37. 仅为某一个软件包安装源文件,例如 mariadb + +
%> zypper in -D mariadb
+    Loading repository data...
+    Reading installed packages...
+    'mariadb' is already installed.
+    No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed.
+    Resolving package dependencies...
+
+    Nothing to do. 
+ +38. 仅为某一个软件包安装依赖关系,例如 mariadb + +
%> zypper si -d mariadb
+    Reading installed packages...
+    Loading repository data...
+    Resolving package dependencies...
+
+    The following 36 NEW packages are going to be installed:
+      autoconf automake bison cmake cpp cpp48 gcc gcc48 gcc48-c++ gcc-c++ libaio-devel libarchive13 libasan0 libatomic1-gcc49 libcloog-isl4 libedit-devel libevent-devel libgomp1-gcc49 libisl10
+      libitm1-gcc49 libltdl7 libmpc3 libmpfr4 libopenssl-devel libstdc++48-devel libtool libtsan0-gcc49 m4 make ncurses-devel pam-devel readline-devel site-config tack tcpd-devel zlib-devel
+
+    The following package is recommended, but will not be installed due to conflicts or dependency issues:
+      readline-doc
+
+    36 new packages to install.
+    Overall download size: 33.7 MiB. Already cached: 129.5 KiB  After the operation, additional 144.3 MiB will be used.
+    Continue? [y/n/? shows all options] (y): y
+ +#### Zypper in Scripts and Applications #### + +39. 安装一个软件包,并且在安装过程中跳过与用户的交互, 例如 mariadb。 + +
%> zypper --non-interactive in mariadb
+    Loading repository data...
+    Reading installed packages...
+    'mariadb' is already installed.
+    No update candidate for 'mariadb-10.0.13-2.6.1.x86_64'. The highest available version is already installed.
+    Resolving package dependencies...
+
+    Nothing to do.
+ +40. 卸载一个软件包,并且在卸载过程中跳过与用户的交互,例如 mariadb + +
%> zypper --non-interactive rm mariadb
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    The following package is going to be REMOVED:
+      mariadb
+
+    1 package to remove.
+    After the operation, 71.8 MiB will be freed.
+    Continue? [y/n/? shows all options] (y): y
+    (1/1) Removing mariadb-10.0.13-2.6.1 .............................................................................[done] 
+ +41. 将 zypper 输出用 XML 格式打印。 + +
%> zypper --xmlout
+      Usage:
+    	zypper [--global-options]  [--command-options] [arguments]
+
+      Global Options
+    ....
+ +42. 禁止详细信息输出到屏幕。 + +
%> zypper --quiet in mariadb
+    The following NEW package is going to be installed:
+      mariadb
+
+    1 new package to install.
+    Overall download size: 0 B. Already cached: 7.8 MiB  After the operation, additional 71.8 MiB will be used.
+    Continue? [y/n/? shows all options] (y):
+    ...
+ +43. 在卸载过程中禁止详细信息输出到屏幕 + +
%> zypper --quiet rm mariadb 
+ +44. 自动地同意版权或者协议。 +
%> zypper patch --auto-agree-with-licenses
+    Loading repository data...
+    Reading installed packages...
+    Resolving package dependencies...
+
+    Nothing to do.
+ +#### 清除 Zypper 缓存以及查看历史信息 #### + +45. 以下指令可以用来清理Zypper缓存。 + +
%> zypper clean
+    All repositories have been cleaned up.
+ +如果需要一次性地清理元数据以及软件包缓存,可以通过 -all/-a 选项来达到目的 + +
%> zypper clean -a
+    All repositories have been cleaned up.
+ +46. 查看 Zypper 的历史信息。籍由 Zypper 所有的软件包管理动作,包括安装、更新以及卸载都会在 /var/log/zypp/history中保留历史信息。可以通过 cat 来查看此文件,或者通过过滤器来筛选希望看到的信息。 + +
 cat /var/log/zypp/history
+    2015-05-07 15:43:03|install|boost-license1_54_0|1.54.0-10.1.3|noarch||openSUSE-13.2-0|0523b909d2aae5239f9841316dafaf3a37b4f096|
+    2015-05-07 15:43:03|install|branding-openSUSE|13.2-3.6.1|noarch||openSUSE-13.2-0|6609def94b1987bf3f90a9467f4f7ab8f8d98a5c|
+    2015-05-07 15:43:03|install|bundle-lang-common-en|13.2-3.3.1|noarch||openSUSE-13.2-0|ca55694e6fdebee6ce37ac7cf3725e2aa6edc342|
+    2015-05-07 15:43:03|install|insserv-compat|0.1-12.2.2|noarch||openSUSE-13.2-0|6160de7fbf961a279591a83a1550093a581214d9|
+    2015-05-07 15:43:03|install|libX11-data|1.6.2-5.1.2|noarch||openSUSE-13.2-0|f1cb58364ba9016c1f93b1a383ba12463c56885a|
+    2015-05-07 15:43:03|install|libnl-config|3.2.25-2.1.2|noarch||openSUSE-13.2-0|aab2ded312a781e93b739b418e3d32fe4e187020|
+    2015-05-07 15:43:04|install|wireless-regdb|2014.06.13-1.2|noarch||openSUSE-13.2-0|be8cb16f3e92af12b5ceb977e37e13f03c007bd1|
+    2015-05-07 15:43:04|install|yast2-trans-en_US|3.1.0-2.1|noarch||openSUSE-13.2-0|1865754e5e0ec3c149ac850b340bcca55a3c404d|
+    2015-05-07 15:43:04|install|yast2-trans-stats|2.19.0-16.1.3|noarch||openSUSE-13.2-0|b107d2b3e702835885b57b04d12d25539f262d1a|
+    2015-05-07 15:43:04|install|cracklib-dict-full|2.8.12-64.1.2|x86_64||openSUSE-13.2-0|08bd45dbba7ad44e3a4837f730be76f55ad5dcfa|
+    ......
+ +#### 使用 Zypper 进行SUSE系统升级 #### + +47. 可以使用 Zypper 命令的 'dist-upgrade' 选项来将当前的SUSE Linux升级至最新版本。 +
# zypper dist-upgrade
+    You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
+    Building repository 'openSUSE-13.2-0' cache .....................................................................[done]
+    Retrieving repository 'openSUSE-13.2-Debug' metadata ............................................................[done]
+    Building repository 'openSUSE-13.2-Debug' cache .................................................................[done]
+    Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ..........................................................[done]
+    Building repository 'openSUSE-13.2-Non-Oss' cache ...............................................................[done]
+ +正文至此结束。希望本文可以帮助读者尤其是新手们管理SUSE Linux系统和服务器。如果您觉得某些比较重要的命令被作者漏掉了,请在评论部分写下您的返回,作者将根据评论对文章进行更新。保持联络,保持评论,多谢支持。 + +-------------------------------------------------------------------------------- + +原文地址: http://www.tecmint.com/zypper-commands-to-manage-suse-linux-package-management/ + +作者:[Avishek Kumar][a] +译者:[张博约](https://github.com/zhangboyue) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/installation-of-suse-linux-enterprise-server-12/ From ec3073217d164aa6ffdff5dfcceebe69eefcc890 Mon Sep 17 00:00:00 2001 From: zhang kun Date: Sun, 24 May 2015 18:29:07 +0800 Subject: [PATCH 0939/2517] Fixed a typo --- ...Zypper Commands to Manage 'Suse' Linux Package Management.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md b/translated/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md index bfd3eeeaf5..efa807f2f3 100644 --- a/translated/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md +++ b/translated/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md @@ -48,7 +48,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS downgraded or changes vendor or architecture. --oldpackage Allow to replace a newer item with an older one. Handy if you are doing a rollback. Unlike --force - j it will not enforce a reinstall. + it will not enforce a reinstall. --replacefiles Install the packages even if they replace files from other, already installed, packages. Default is to treat file conflicts as an error. --download-as-needed disables the fileconflict check. From adfff118b0753c72f6921cd82b6794e85deb1fb9 Mon Sep 17 00:00:00 2001 From: zhangkun Date: Sun, 24 May 2015 18:40:48 +0800 Subject: [PATCH 0940/2517] Deleted an trash directory --- sources/tech/.directory | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 sources/tech/.directory diff --git a/sources/tech/.directory b/sources/tech/.directory deleted file mode 100644 index 45bdd1cb5c..0000000000 --- a/sources/tech/.directory +++ /dev/null @@ -1,4 +0,0 @@ -[Dolphin] -Timestamp=2015,5,23,17,31,51 -Version=3 -ViewMode=2 From fd9df4bb2e9a6e900cef3d40dffdfb07bd7b832f Mon Sep 17 00:00:00 2001 From: zhangkun Date: Sun, 24 May 2015 21:29:06 +0800 Subject: [PATCH 0941/2517] Kick off a translation --- sources/tech/20150522 Analyzing Linux Logs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150522 Analyzing Linux Logs.md b/sources/tech/20150522 Analyzing Linux Logs.md index 085d3a8ed3..38d5b4636e 100644 --- a/sources/tech/20150522 Analyzing Linux Logs.md +++ b/sources/tech/20150522 Analyzing Linux Logs.md @@ -1,3 +1,4 @@ +translating by zhangboyue Analyzing Linux Logs ================================================================================ There’s a great deal of information waiting for you within your logs, although it’s not always as easy as you’d like to extract it. In this section we will cover some examples of basic analysis you can do with your logs right away (just search what’s there). We’ll also cover more advanced analysis that may take some upfront effort to set up properly, but will save you time on the back end. Examples of advanced analysis you can do on parsed data include generating summary counts, filtering on field values, and more. @@ -178,4 +179,4 @@ via: http://www.loggly.com/ultimate-guide/logging/analyzing-linux-logs/ [6]:http://linux.die.net/man/1/awk [7]:http://www.delorie.com/gnu/docs/gawk/gawk_26.html#IDX155 [8]:http://logstash.net/docs/1.4.2/filters/grok -[9]:http://www.rsyslog.com/doc/v8-stable/configuration/templates.html \ No newline at end of file +[9]:http://www.rsyslog.com/doc/v8-stable/configuration/templates.html From d6ef19f580f9db5a642ebc300a6ca5d069453f55 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 24 May 2015 23:00:36 +0800 Subject: [PATCH 0942/2517] PUB:20150521 Microsoft Open-Sources The Windows Communication Foundation @geekpi --- ...es The Windows Communication Foundation.md | 26 +++++++++++++++++++ ...es The Windows Communication Foundation.md | 26 ------------------- 2 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 published/20150521 Microsoft Open-Sources The Windows Communication Foundation.md delete mode 100644 translated/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md diff --git a/published/20150521 Microsoft Open-Sources The Windows Communication Foundation.md b/published/20150521 Microsoft Open-Sources The Windows Communication Foundation.md new file mode 100644 index 0000000000..bf071f9c5d --- /dev/null +++ b/published/20150521 Microsoft Open-Sources The Windows Communication Foundation.md @@ -0,0 +1,26 @@ +微软开源了WCF框架 +================================================================================ +微软于今日(2015/5/20)宣布了针对 .NET Core 重大开源:WCF(Windows Communication Foundation)。 + +如[MSDN][1]中的描述:“WCF是一个构建面向服务应用的框架。使用WCF,你可以从一个服务终端给另一个发送异步消息。服务终端可以是托管在IIS中连续可用的服务的一部分,也可以是托管在某个程序上的服务。服务终端可以是请求服务端数据的客户端。消息可以是一个字符或者XML,也可以是复杂的二进制流。” + +它的[代码放在GitHub][2],“包含了Window桌面中完整WCF框架的一部分,它支持已经可用于构建Window Store上的WCF应用的库。这些主要是基于客户端,方便移动设备和中间层服务器使用WCF进行通信。” + +更多的关于微软开源 WCF 的细节查看[dotNETFoundation.org blog][3]的公告。 + +WCF听上去有点像Linux中用于进程/服务之间的进程间通讯的D-BUS。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=news_item&px=Microsoft-Open-Source-WCF + +作者:[Michael Larabel][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.michaellarabel.com/ +[1]:https://msdn.microsoft.com/en-us/library/ms731082%28v=vs.110%29.aspx +[2]:https://github.com/dotnet/wcf +[3]:http://www.dotnetfoundation.org/blog/wcf-is-open-source \ No newline at end of file diff --git a/translated/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md b/translated/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md deleted file mode 100644 index 45d8d6514a..0000000000 --- a/translated/news/20150521 Microsoft Open-Sources The Windows Communication Foundation.md +++ /dev/null @@ -1,26 +0,0 @@ -微软开源了WCF框架 -================================================================================ -微软今天宣布我们开源的针对.NET核心的WCF(Windows Communication Foundation)。 - -[MSDN][1]中说:“WCF是一个构建面向服务程序的框架。使用WCF,你可以从服务端给另一个发送异步消息。服务终端可以是托管在IIS中连续可用服务的一部分,也可以是托管在某个程序上的服务。终端可以是请求服务端数据的客户端。消息可以是一个字符或者XML,也可以是复杂的二进制流。” - -它的[代码在GitHub][2],“包含了Window桌面中完整WCF框架的一部分,它支持已经在Window Store中的WCF库。这些档案主要是基于客户端,方便移动设备和中间层服务器使用WCF进行通信。” - -More details on Microsoft opening up the Windows Communication Foundation can be found via the announcement posted this morning to the [dotNETFoundation.[dotNETFoundation.org blog][3]中查看。 - -WCF听上去有点像Linux中进程/服务间通信的D-BUS。 - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=news_item&px=Microsoft-Open-Source-WCF - -作者:[Michael Larabel][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.michaellarabel.com/ -[1]:https://msdn.microsoft.com/en-us/library/ms731082%28v=vs.110%29.aspx -[2]:https://github.com/dotnet/wcf -[3]:http://www.dotnetfoundation.org/blog/wcf-is-open-source \ No newline at end of file From 2b8dc336f1e48543b5246cc965c0925b634d47ea Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 24 May 2015 23:08:16 +0800 Subject: [PATCH 0943/2517] PUB:20150323 Square 2.0 Icon Pack Is Twice More Beautiful @geekpi --- ...quare 2.0 Icon Pack Is Twice More Beautiful.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) rename {translated/share => published}/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md (66%) diff --git a/translated/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md b/published/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md similarity index 66% rename from translated/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md rename to published/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md index a18110fb11..cd8c8556a0 100644 --- a/translated/share/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md +++ b/published/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md @@ -1,19 +1,19 @@ -Square 2.0图标包更漂亮了 +更漂亮的 Square 2.0图标包 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux_3.jpeg) -优雅、现代的[Square图标主题][1]最近更新到了2.0版,这让它比以前更漂亮了。Square图标包与其他主要的桌面环境如**Unity、 GNOME、KDE、 MATE等等**兼容。这意味着你可以在所有的流行Linux发行版如Ubuntu、Fedora、Linux Mint、elementary OS等等中使用它。 这个图标包估计包含超过了15000个图标。 +优雅、现代的[Square图标主题][1]最近更新到了2.0版,它比以前更漂亮了。Square图标包与其他主要的桌面环境如**Unity、 GNOME、KDE、 MATE等等**兼容。这意味着你可以在所有的流行Linux发行版如Ubuntu、Fedora、Linux Mint、elementary OS等等中使用它。 这个图标包估计包含超过了15000个图标。 ### 在Linux中安装Square 2.0图标包 ### -有两种不同的Square图标,暗色和亮色。基于你的洗好,你可以选择二者之一。出于实验,我建议你两个主题包都下载。 +有两种不同的Square图标,暗色和亮色。基于你的喜好,你可以选择二者之一。出于体验的目的,我建议你两个主题包都下载。 -你可以用下面的链接下载图标包。文件存储在Google Drive,因此如果你没有看见像[SourceForge][2]这样标准的下载网站时怀疑。 +你可以用下面的链接下载图标包。文件存储在Google Drive,因此如果你没有看见像[SourceForge][2]这样标准的下载网站时不要怀疑。 - [Square Dark Icons][3] - [Square Light Icons][4] -要使用图标主题,解压下载的文件到~/.icons文件夹下。如果它不存在,就创建它。当你在正确的地方有这些文件后,基于你的桌面环境,使用一个工具来改变图标主题。我以前写了一些关于这个主题的教程。如果你需要额外的帮助,那么欢迎指出来: +要使用图标主题,解压下载的文件到~/.icons文件夹下。如果它不存在,就创建它。当这些文件放好后,基于你的桌面环境,使用一个工具来改变图标主题。我以前写了一些关于这个主题的教程。如果你需要额外的帮助,那么欢迎指出来: - [如何在Ubuntu Unity中改变主题][5] - [如何在GNOME Shell中改变主题][6] @@ -30,8 +30,7 @@ Square主题中几个图标的样子: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Square_Icon_Pack_Linux.jpeg) -你怎么找到它的?你认为它是[Ubuntu 14.04中最佳的图标主题][10]之一么?你会分享它病期待更多关于自定义Linux桌面的文章么? - +你觉得怎么样?你认为它是[Ubuntu 14.04中最佳的图标主题][10]之一么?你会分享它并期待更多关于自定义Linux桌面的文章么? -------------------------------------------------------------------------------- @@ -39,7 +38,7 @@ via: http://itsfoss.com/square-2-0-icon-pack-linux/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 67bcd640f7b6461278ca30ea26dd3fcf2968e9ca Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 25 May 2015 07:52:40 +0800 Subject: [PATCH 0944/2517] Update 20150407 How to secure BGP sessions using authentication on Quagga.md --- ...ow to secure BGP sessions using authentication on Quagga.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md b/sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md index 020e2277cc..cf2226fac0 100644 --- a/sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md +++ b/sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to secure BGP sessions using authentication on Quagga ================================================================================ The BGP protocol runs over TCP, and as such, it inherits all the vulnerabilities of a TCP connection. For example, within a BGP session, an attacker may impersonate a legitimate BGP neighbor, and convince the BGP routers on the other end to share their routing information with the attacker. The problem occurs when the attacker advertises and injects bogus routes towards neighboring routers. The unsuspecting neighboring routers may then start sending live traffic towards the attacker, which in most cases goes nowhere and simply gets dropped. Back in 2008, YouTube actually [fell victim][1] to such BGP route poisoning, and suffered major outage on their video service for more than an hour. In a far worse case, if the attacker is savvy enough, they can falsely act as a transparent transit router and sniff the transit traffic for any sensitive data. As you can imagine, this can have far reaching consequences. @@ -82,4 +83,4 @@ via: http://xmodulo.com/bgp-authentication-quagga.html [a]:http://xmodulo.com/author/sarmed [1]:http://research.dyn.com/2008/02/pakistan-hijacks-youtube-1/ [2]:http://tools.ietf.org/html/rfc2385 -[3]:http://xmodulo.com/centos-bgp-router-quagga.html \ No newline at end of file +[3]:http://xmodulo.com/centos-bgp-router-quagga.html From 03a0de17463d436f33b8bc1ad2fac839e35eb744 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Mon, 25 May 2015 10:01:28 +0800 Subject: [PATCH 0945/2517] [Translated]20150407 How to secure BGP sessions using authentication on Quagga.md --- ...sessions using authentication on Quagga.md | 86 ------------------- ...sessions using authentication on Quagga.md | 84 ++++++++++++++++++ 2 files changed, 84 insertions(+), 86 deletions(-) delete mode 100644 sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md create mode 100644 translated/tech/20150407 How to secure BGP sessions using authentication on Quagga.md diff --git a/sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md b/sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md deleted file mode 100644 index cf2226fac0..0000000000 --- a/sources/tech/20150407 How to secure BGP sessions using authentication on Quagga.md +++ /dev/null @@ -1,86 +0,0 @@ -Translating by GOLinux! -How to secure BGP sessions using authentication on Quagga -================================================================================ -The BGP protocol runs over TCP, and as such, it inherits all the vulnerabilities of a TCP connection. For example, within a BGP session, an attacker may impersonate a legitimate BGP neighbor, and convince the BGP routers on the other end to share their routing information with the attacker. The problem occurs when the attacker advertises and injects bogus routes towards neighboring routers. The unsuspecting neighboring routers may then start sending live traffic towards the attacker, which in most cases goes nowhere and simply gets dropped. Back in 2008, YouTube actually [fell victim][1] to such BGP route poisoning, and suffered major outage on their video service for more than an hour. In a far worse case, if the attacker is savvy enough, they can falsely act as a transparent transit router and sniff the transit traffic for any sensitive data. As you can imagine, this can have far reaching consequences. - -To protect active BGP sessions against such attacks, many service providers leverage [MD5 checksum and a pre-shared key][2] for their BGP sessions. In a protected BGP session, a BGP router which sends a packet generates an MD5 hash value by using a pre-shared key, portions of the IP and TCP headers and the payload. The MD5 hash is then stored as a TCP option field. Upon receipt of the packet, a receiving router uses the same method to generate its version of the MD5 hash using a pre-shared key. It compares the hash with the one of the received packet to decide whether to accept the packet. For an attacker, it is almost impossible to guess the checksum or the key. For BGP routers, they can be assured that each packet is validated before its content is consumed. - -In this tutorial, we will see how we can secure a BGP session between two neighbors using MD5 checksum and a pre-shared key. - -### Preparation ### - -Securing a BGP session is fairly straightforward. We will use the following routers. - -注:表格 - - - - - - - - - - - - - - - - -
Router nameASIP address
router-A10010.10.12.1/30
router-B20010.10.12.2/30
- -The stock Linux kernel supports TCP MD5 option natively for IPv4 and IPv6. Thus if you built Quagga router from a brand new [Linux box][3], TCP MD5 capability will be automatically available for Quagga. It'll be just a matter of configuring Quagga to take advantage of the capability. But if you are using a FreeBSD box or built a custom kernel for Quagga, make sure that you enable TCP MD5 support on the kernel (e.g., CONFIG_TCP_MD5SIG kernel option in Linux). - -### Configuring Router-A for Authentication ### - -We will use the CLI shell of Quagga to configure the routers. The only new command that we will use is 'password'. - - [root@router-a ~]# vtysh - router-a# conf t - router-a(config)# router bgp 100 - router-a(config-router)# network 192.168.100.0/24 - router-a(config-router)# neighbor 10.10.12.2 remote-as 200 - router-a(config-router)# neighbor 10.10.12.2 password xmodulo - -The pre-shared key in this example is 'xmodulo'. Obviously, in a production environment you need to select a strong key. - -**Note**: in Quagga, the 'service password-encryption’ command is supposed to encrypt all plain-text passwords (e.g., login password) in its configuration file. However, when I use this command, I notice that the pre-shared key in BGP configuration still remains in clear text. I am not sure whether it's a limitation of Quagga, or whether it's a version issue. - -### Configuring Router-B for Authentication ### - -We will configure router-B in a similar fashion. - - [root@router-b ~]# vtysh - router-b# conf t - router-b(config)# router bgp 200 - router-b(config-router)# network 192.168.200.0/24 - router-b(config-router)# neighbor 10.10.12.1 remote-as 100 - router-b(config-router)# neighbor 10.10.12.1 password xmodulo - -### Verifying a BGP session ### - -If everything has been configured correctly, the BGP session should be up, and both routers should be exchanging routes. At this point, every outgoing packet in a TCP session carries a MD5 digest of the packet contents and a secret key, and the digest is automatically validated by the other end point. - -We can verify the active BGP session by viewing BGP summary as usual. MD5 checksum verification occurs transparently within Quagga, so you don't see it at the BGP level. - -![](https://farm8.staticflickr.com/7621/16837774368_e9ff66b370_c.jpg) - -If you want to test BGP authentication, you can configure one neighbor without a password or deliberately use a wrong pre-shared key and see what happens. You can also use a packet sniffer like tcpdump or Wireshark to analyze the packets that go through the BGP session. For example, tcpdump with "-M " option will validate the MD5 digests found in TCP option field. - -To sum up, in this tutorial we demonstrate how we can easily secure the BGP session between two routers. The process is very straightforward compared to other protocols. It is always recommended to secure your BGP session, especially if you are setting up the BGP session with another AS. The pre-shared key should also be kept safe. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/bgp-authentication-quagga.html - -作者:[Sarmed Rahman][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/sarmed -[1]:http://research.dyn.com/2008/02/pakistan-hijacks-youtube-1/ -[2]:http://tools.ietf.org/html/rfc2385 -[3]:http://xmodulo.com/centos-bgp-router-quagga.html diff --git a/translated/tech/20150407 How to secure BGP sessions using authentication on Quagga.md b/translated/tech/20150407 How to secure BGP sessions using authentication on Quagga.md new file mode 100644 index 0000000000..be67b88ab1 --- /dev/null +++ b/translated/tech/20150407 How to secure BGP sessions using authentication on Quagga.md @@ -0,0 +1,84 @@ +Quagga上使用验证加固BGP会话安全 +================================================================================ +BGP协议运行于TCP之上,因而,它也继承了TCP连接的所有漏洞。例如,在一个BGP会话内,攻击者可以冒充一个合法的BGP邻居,然后说服另一端的BGP路由器共享路由信息给攻击者。在攻击者通告并向邻居路由注入伪造的路由时,就会发生这个问题。毫无戒备的邻居路由器就会开始向攻击者发送通信实况,实际上这些信息并没有去向任何地方,仅仅只是被丢弃了。回到2008年,YouTube实际上也[受害于][1]这样的BGP路由中毒,并遭受了长达一个小时的视频服务大量中断。一个更加糟糕的情况是,如果攻击者是个足够懂行的人,他们可以伪装成一台透明路由器,然后嗅探经过的通信以获取敏感数据。你可以想象,这会造成深远的影响。 + +要保护活跃的BGP会话不受攻击,许多服务提供商在BGP会话中使用[MD5校验和并预共享密钥][2]。在受保护的BGP会话中,一台发送包的BGP路由器通过使用预共享的密钥生成MD5散列值、部分IP和TCP头以及有效负载。然后,MD5散列作为一个TCP选项字段存储。在收到包后,接受路由器用同样的方法使用预共享密钥生成它的MD5版本。它会将它的MD5散列和接收到的某个包的值进行对比,以决定是否接受该包。对于一个攻击者而言,几乎不可能猜测校验和或其密钥。对于BGP路由器而言,它们能在消耗包的内容前确保每个包的合法性。 + +在本教程中,我们将为大家演示如何使用MD5校验和以及预共享密钥来加固两个邻居间的BGP会话的安全。 + +### 准备 ### + +加固BGP会话安全是相当简单而直截了当的,我们会使用以下路由器。 + + + + + + + + + + + + + + + + + +
路由器名称ASIP地址
router-A10010.10.12.1/30
router-B20010.10.12.2/30
+ +常用的Linux内核原生支持TCP的MD5选项用于IPv4和IPv6。因此,如果你从全新的[Linux盒子][3]构建了Quagga路由器,TCP的MD5功能会自动启用。剩下来的事情,仅仅是配置Quagga以使用它的功能。但是,如果你使用的是FreeBSD盒子或者为Quagga构建了一个自定义内核,请确保内核开启了TCP的MD5支持(如,Linux中的CONFIG_TCP_MD5SIG选项)。 + +### 配置Router-A验证功能 ### + +我们将使用Quagga的CLI Shell来配置路由器,我们将使用的唯一的一个新命令是‘password’。 + + [root@router-a ~]# vtysh + router-a# conf t + router-a(config)# router bgp 100 + router-a(config-router)# network 192.168.100.0/24 + router-a(config-router)# neighbor 10.10.12.2 remote-as 200 + router-a(config-router)# neighbor 10.10.12.2 password xmodulo + +本例中使用的预共享密钥是‘xmodulo’。很明显,在生产环境中,你需要选择一个更健壮的密钥。 + +**注意**: 在Quagga中,‘service password-encryption’命令是想加密配置文件中所有明文密码(如,登录密码)。然而,当我使用该命令时,我注意到BGP配置中的预共享密钥仍然是明文的。我不确定这是否是Quagga的限制,还是版本自身的问题。 + +### 配置Router-B验证功能 ### + +我们将以类似的方式配置router-B。 + + [root@router-b ~]# vtysh + router-b# conf t + router-b(config)# router bgp 200 + router-b(config-router)# network 192.168.200.0/24 + router-b(config-router)# neighbor 10.10.12.1 remote-as 100 + router-b(config-router)# neighbor 10.10.12.1 password xmodulo + +### 验证BGP会话 ### + +如果一切配置正确,那么BGP会话就会起来,两台路由器应该能交换路由表。这时候,TCP会话中的所有流出包都会携带一个MD5摘要的包内容和一个密钥,而摘要信息会被另一端自动验证。 + +我们可以像平时一样通过查看BGP的概要来验证活跃的BGP会话。MD5校验和验证在Quagga内部是透明的,因此,你在BGP级别是无法看到的。 + +![](https://farm8.staticflickr.com/7621/16837774368_e9ff66b370_c.jpg) + +如果你想要测试BGP验证,你可以配置一个邻居路由,设置其密码为空,或者故意使用错误的预共享密钥,然后查看发生了什么。你也可以使用包嗅探器,像tcpdump或者Wireshark等,来分析通过BGP会话的包。例如,带有“-M ”选项的tcpdump将验证TCP选项字段的MD5摘要。 + +小结之,在本教程中,我们演示了怎样简单地加固两台路由间的BGP会话安全。相对于其它协议而言,配置过程非常简明。强烈推荐你加固BGP会话安全,尤其是当你用另一个AS配置BGP会话的时候。预共享密钥也应该安全地保存。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/bgp-authentication-quagga.html + +作者:[Sarmed Rahman][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://research.dyn.com/2008/02/pakistan-hijacks-youtube-1/ +[2]:http://tools.ietf.org/html/rfc2385 +[3]:http://xmodulo.com/centos-bgp-router-quagga.html From fd8ba580bcf001c396220b4b0ce1df318861515f Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 25 May 2015 10:16:28 +0800 Subject: [PATCH 0946/2517] Translating by ZTinoZ --- ... Things to Do After Installing Ubuntu 15.04 Desktop.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index e7d536958e..9c897e60c4 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -207,7 +207,7 @@ Install Torrent ### 13. 安装Windows仿真器-Wine和游戏支持平台-Steam ### -Wine emulator allows you to install and run Windows applications on Linux. On the other hand, Steam is a popular gaming platform for Linux based systems developed by Valve. To install both of them on your machine issue the following command on Terminal or use Ubuntu Software Center. +Wine仿真器允许你在Linux上安装并运行Window应用程序。在另一方面,Steam是一款Valve开发的流行于Linux系统的游戏平台。想要在你的机器上安装它们,可以输入以下命令或使用Ubuntu Software Center。 $ sudo apt-get install steam wine winetricks @@ -216,7 +216,7 @@ Install Wine ### 14. 安装Cairo-Dock并启用桌面视觉效果 ### -Cairo-Dock is a beautiful and flexible launcher bar for Linux desktops similar to the Mac OS X dock. To install it on Ubuntu, run the following command on Terminal. +Cairo-Dock是一款漂亮且灵巧的用于Linux桌面上的启动条,类似于Mac OS X dock。想要在Ubuntu上安装它,可以在终端上运行以下命令: $ sudo apt-get install cairo-dock cairo-dock-plug-ins @@ -226,11 +226,11 @@ Install Cairo Dock ![Add Cairo Dock at Startup](http://www.tecmint.com/wp-content/uploads/2015/04/add-cairo-dock-startup.jpg) Add Cairo Dock at Startup -To enable a set of Desktop Effects, such as Cube effect, install Compiz package with the following command: +想要启用某一套桌面效果,例如Cube效果,可以使用以下命令来安装Compiz包: $ sudo apt-get install compiz compizconfig-settings-manager compiz-plugins-extra -To activate the Desktop Cube effect, search for ccsm on Dash, open CompizConfig Settings Manager, go to General Options – > Desktop Size and set Horizontal Virtual Size value to 4 and Vertical Virtual Size to 1. Then go back and check Desktop Cube (Disable Desktop Wall) and Rotate Cube boxes (Resolve Conflicts ->Disable Switch to Viewport 1) and press Ctrl+Alt+Left Mouse Click to view the cube effect. +想要激活桌面Cube效果,search for ccsm on Dash, open CompizConfig Settings Manager, go to General Options – > Desktop Size and set Horizontal Virtual Size value to 4 and Vertical Virtual Size to 1. Then go back and check Desktop Cube (Disable Desktop Wall) and Rotate Cube boxes (Resolve Conflicts ->Disable Switch to Viewport 1) and press Ctrl+Alt+Left Mouse Click to view the cube effect. ![Enable Compiz](http://www.tecmint.com/wp-content/uploads/2015/04/enable-compiz.jpg) Enable Compiz From 7fc8f458177648c39d2fbd3758df780accffe77b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 May 2015 09:39:43 +0800 Subject: [PATCH 0947/2517] PUB:20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21 @wi-cuckoo --- ...ling PHP 7.0 on CentOS 7.x or Fedora 21.md | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) rename {translated/tech => published}/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md (77%) diff --git a/translated/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md b/published/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md similarity index 77% rename from translated/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md rename to published/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md index bc27aec4ec..2d059a4930 100644 --- a/translated/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md +++ b/published/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md @@ -1,29 +1,30 @@ -现在值得去尝试一下在CentOS 7.x或Fedora 21上面安装PHP 7.0 +在CentOS 7.x / Fedora 21 上面体验 PHP 7.0 =============================================================================== -PHP是一种为我们熟知的通用的,服务器网页脚本语言。超大量的在线网站都是用PHP编写的。PHP过去一直在更新,丰富功能,易于使用,而且很好组织的脚本语言。目前PHP的开发团队正筹备下一个PHP版本的发行,名字是PHP 7。现在的PHP版本为PHP 5.6,可能你清楚PHP 6已经流产了,PHP 7的支持者们不希望下一个重要的版本被其他分支混淆,即过去已经停止很久的PHP 6。所以决定下一个PHP主要的发行版本叫PHP 7,而不是PHP 6。PHP 7.0预计在今年十一月份发行。 -在下一个主要的PHP发行版里有一些不错的功能。 +PHP是一种为我们熟知的通用服务器网页脚本语言。非常多的在线网站都是用PHP编写的。PHP这些年来一直在持续进化,丰富其功能,变得易于使用,更好地组织的脚本语言。目前PHP的开发团队正筹备下一个PHP版本的发行,名字是PHP 7。现在的PHP版本为PHP 5.6,可能你清楚PHP 6已经流产了,PHP 7的支持者们不希望下一个重要的版本被其他分支混淆,即过去已经停止很久的PHP 6。所以决定下一个PHP主要的发行版本叫PHP 7,而不是PHP 6。PHP 7.0预计在今年十一月份发行。 -- 为了提升执行效率与记忆痕迹,PHPNG功能被添加到新的发行版中。 -- JIT引擎被收入来动态编译Zend操作码为自然机器码,以此来达到更快的处理性能。这项功能允许随后的程序调用同一份代码,这样会运行快很多。 +在下一代主要PHP版本里有一些不错的功能: + +- 为了改善执行效率与内存占用,新的版本添加了PHPNG功能。 +- 引入了JIT引擎来动态编译Zend操作码为自然机器码,以此来达到更快的处理性能。这项功能允许随后的程序调用同一份代码,这样会运行快很多。 - AST(抽象语法树)是最新添加的功能,它可以增强支持PHP的扩展性和用户应用。 -- 异步编程功能会添加支持并行任务,在同样的需求下。 --新的版本会支持独立多线程网页服务,这样可以使用一个单独的存储块处理很多并发的请求。 +- 添加异步编程功能以支持同一个请求中的并行任务。 +- 新的版本会支持独立的多线程网页服务器,这样可以使用一个单独的存储池处理很多并发的请求。 -### 在CcentOS/Fedora上安装PHP 7 ### +### 在CentOS/Fedora上安装PHP 7 ### -让我们来看看怎样在CentOS 7和Fedora 21安装PHP7。为了安装PHP7,我们首先需要克隆php-src 仓库。当克隆工作完成,我们会配置和编译它。进行下一步之前,我们要确保已经在LInux系统下安装了如下的东西,否则PHP编译会返回错误,然后流产。 +让我们来看看怎样在CentOS 7和Fedora 21安装PHP7。为了安装PHP7,我们首先需要克隆php-src 仓库。当克隆工作完成,我们再配置和编译它。进行下一步之前,我们要确保已经在LInux系统下安装了如下的组件,否则PHP编译会返回错误中止。 - Git - autoconf - gcc - bison -所有上面提到的要求可以使用Yum软件包管理器安装。用连续的一个命令应该这样: +所有上面提到的要求可以使用Yum软件包管理器安装。以下一条命令即可完成: yum install git autoconf gcc bison -准备好开始安装PHP7了吗?让我们先创建一个PHP7目录,作为你的工作目录。 +准备好开始安装PHP7了吗?让我们先创建一个PHP7目录,作为你的当前工作目录。 mkdir php7 @@ -143,7 +144,7 @@ PHP是一种为我们熟知的通用的,服务器网页脚本语言。超大 --with-mysqli=/usr/bin/mysql_config -这会花去不少的时间,一旦完成,你应该会看到如下面的输出: +这会花去不少的时间,当完成后你应该会看到如下面的输出: creating libtool @@ -206,9 +207,9 @@ PHP是一种为我们熟知的通用的,服务器网页脚本语言。超大 运行下面的命令,完成编译过程。 - manke + make -“make”命令过后的样例输出如下所示: +“make”命令的样例输出如下所示: Generating phar.php @@ -294,7 +295,7 @@ PHP是一种为我们熟知的通用的,服务器网页脚本语言。超大 cd sapi/cli -在这里验证PHP的版本。 +验证一下PHP的版本。 [root@localhost cli]# ./php -v @@ -306,7 +307,7 @@ PHP是一种为我们熟知的通用的,服务器网页脚本语言。超大 ### 总结 ### -PHP 7也被[添加到了remi仓库][1],即将到来的版本主要关注执行效率的提升,新的特性致力于使PHP较好满足现代编程的需求和趋势。PHP 7.0将会有许多新的特性,丢弃一些老版本的东西。在接下来的日子里,我们希望看到新特性和弃用功能的具体情况。尽情享受吧! +PHP 7也[添加到了remi仓库][1],这个即将到来的版本主要关注执行效率的提升,它的新特性致力于使PHP较好满足现代编程的需求和趋势。PHP 7.0将会有许多新的特性、丢弃一些老版本的东西。在接下来的日子里,我们希望看到新特性和弃用功能的具体情况。希望你喜欢! -------------------------------------------------------------------------------- @@ -314,7 +315,7 @@ via: http://linoxide.com/linux-how-to/install-php-7-centos-7-fedora-21/ 作者:[Aun Raza][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e862305ee1259ca79f68c450072b86da87fe3677 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 May 2015 11:07:35 +0800 Subject: [PATCH 0948/2517] PUB:20150409 4 Tools Send Email with Subject, Body and Attachment in Linux @goreliu https://linux.cn/article-5502-1.html --- ...h Subject, Body and Attachment in Linux.md | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) rename {translated/tech => published}/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md (76%) diff --git a/translated/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md b/published/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md similarity index 76% rename from translated/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md rename to published/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md index fe2fa8c5cf..00003eaa19 100644 --- a/translated/tech/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md +++ b/published/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md @@ -1,10 +1,10 @@ -4个可以发送带主题、正文和附件的电子邮件的工具 +4个可以发送完整电子邮件的命令行工具 ================================================================================ -今天的文章里我们会讲到一些使用Linux命令行工具来发送带附件的电子邮件的方法。它有很多用处,比如在应用程序所在服务器上,使用电子邮件发送一个档案过来,或者你可以在脚本中使用这些命令来做一些自动化操作。在本文的例子中,我们会使用foo.tar.gz文件作为附件。 +今天的文章里我们会讲到一些使用Linux命令行工具来发送带附件的电子邮件的方法。它有很多用处,比如在应用程序所在服务器上,使用电子邮件发送一个文件过来,或者你可以在脚本中使用这些命令来做一些自动化操作。在本文的例子中,我们会使用foo.tar.gz文件作为附件。 有不同的命令行工具可以发送邮件,这里我分享几个多数用户会使用的工具,如`mailx`、`mutt`和`swaks`。 -我们即将呈现的多数工具都是非常有名的,并且存在于多数Linux发行版默认的软件仓库中,你可以使用如下命令安装: +我们即将呈现的这些工具都是非常有名的,并且存在于多数Linux发行版默认的软件仓库中,你可以使用如下命令安装: 在 **Debian / Ubuntu** 系统 @@ -30,11 +30,11 @@ mailx [-BDdEFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr] [-r from-addr] [-h hops] [-A account] [-S variable[=value]] to-addr . . . -如果你看到它支持`-a`的选项(-a 文件名,将文件作为附件添加到邮件)和`-s`选项(-s 主题,指定邮件的主题),就是支持的。可以使用如下的几个例子发送邮件。 +如果你看到它支持`-a`的选项(-a 文件名,将文件作为附件添加到邮件)和`-s`选项(-s 主题,指定邮件的主题),那就是支持的。可以使用如下的几个例子发送邮件。 -**a) 简单的邮件 ** +**a) 简单的邮件** -运行`mail`命令,然后`mailx`会等待你输入邮件内容。你可以按回车来换行。当输入完成后,按Ctrl + D,`mailx`会显示EOT。 +运行`mail`命令,然后`mailx`会等待你输入邮件内容。你可以按回车来换行。当输入完成后,按Ctrl + D,`mailx`会显示EOT表示结束。 然后`mailx`会自动将邮件发送给收件人。 @@ -45,21 +45,21 @@ How are you EOT -**b) 发送有主题的邮件 ** +**b) 发送有主题的邮件** $ echo "Email text" | mail -s "Test Subject" user@example.com `-s`的用处是指定邮件的主题。 -**c) 从文件中读取邮件内容并发送 ** +**c) 从文件中读取邮件内容并发送** $ mail -s "message send from file" user@example.com < /path/to/file -**d) 将从管道获取到的`echo`命令输出作为邮件内容发送 ** +**d) 将从管道获取到的`echo`命令输出作为邮件内容发送** $ echo "This is message body" | mail -s "This is Subject" user@example.com -**e) 发送带附件的邮件 ** +**e) 发送带附件的邮件** $ echo “Body with attachment "| mail -a foo.tar.gz -s "attached file" user@example.com @@ -67,37 +67,37 @@ ### 2) mutt ### -Mutt是类Unix系统上的一个文本界面邮件客户端。它有20多年的历史,在Linux历史中也是一个很重要的部分,它是最早支持进程打分和多线程处理的程序之一。按照如下的例子来发送邮件。 +Mutt是类Unix系统上的一个文本界面邮件客户端。它有20多年的历史,在Linux历史中也是一个很重要的部分,它是最早支持进程打分和多线程处理的客户端程序之一。按照如下的例子来发送邮件。 -**a) 从文件中读取邮件的主题和正文,并发送 ** +**a) 带有主题,从文件中读取邮件的正文,并发送** $ mutt -s "Testing from mutt" user@example.com < /tmp/message.txt -**b) 将从管道获取到的`echo`命令输出作为邮件内容发送 ** +**b) 通过管道获取`echo`命令输出作为邮件内容发送** $ echo "This is the body" | mutt -s "Testing mutt" user@example.com -**c) 发送带附件的邮件 ** +**c) 发送带附件的邮件** $ echo "This is the body" | mutt -s "Testing mutt" user@example.com -a /tmp/foo.tar.gz -**d) 发送带有多个附件的邮件 ** +**d) 发送带有多个附件的邮件** $ echo "This is the body" | mutt -s "Testing" user@example.com -a foo.tar.gz –a bar.tar.gz ### 3) swaks ### -Swaks(Swiss Army Knife,瑞士军刀)是SMTP的瑞士军刀,它功能强大、灵活、可编程、面向事务的SMTP测试工具,由John Jetmore开发和维护。你可以使用如下语法发送带附件的邮件: +Swaks(Swiss Army Knife,瑞士军刀)是SMTP服务上的瑞士军刀,它是一个功能强大、灵活、可编程、面向事务的SMTP测试工具,由John Jetmore开发和维护。你可以使用如下语法发送带附件的邮件: $ swaks -t "foo@bar.com" --header "Subject: Subject" --body "Email Text" --attach foo.tar.gz -关于Swaks一个重要的事情是,它会为你显示整个邮件发送过程,所以如果你想调试邮件发送过程,它是一个非常有用的工具: +关于Swaks一个重要的地方是,它会为你显示整个邮件发送过程,所以如果你想调试邮件发送过程,它是一个非常有用的工具。 -正如你看到的那样,它给你提供了邮件发送过程的所有细节,包括邮件接收服务器的功能支持、两个服务器之间的每一步交互。 +它会给你提供了邮件发送过程的所有细节,包括邮件接收服务器的功能支持、两个服务器之间的每一步交互。 ### 4) uuencode ### -邮件传输系统最初是被设计来传送7位编码(类似ASCII)的内容的。这就意味这它是用来发送文本内容,而不能发会使用8个位的二进制内容(如程序文件或者图片)。`uuencode`(“UNIX to UNIX encoding”,UNIX之间使用的编码方式)程序用来解决这个限制。使用`uuencode`,发送端将二进制格式的转换成文本格式来传输,接收端再转换回去。 +邮件传输系统最初是被设计来传送7位编码(类似ASCII)的内容的。这就意味这它是用来发送文本内容,而不能发会使用8位的二进制内容(如程序文件或者图片)。`uuencode`(“UNIX to UNIX encoding”,UNIX之间使用的编码方式)程序用来解决这个限制。使用`uuencode`,发送端将二进制格式的转换成文本格式来传输,接收端再转换回去。 我们可以简单地使用`uuencode`和`mailx`或者`mutt`配合,来发送二进制内容,类似这样: @@ -246,7 +246,7 @@ Swaks(Swiss Army Knife,瑞士军刀)是SMTP的瑞士军刀,它功能强 ### 总结 ### -有很多方法可以使用命令行/Shell脚本来发送邮件,我们只分享了其中4个类Unix系统可用的工具。希望你喜欢我们的文章,并且提供您的宝贵意见,让我们知道您想了解哪些新工具。 +有很多方法可以使用命令行/Shell脚本来发送邮件,这里我们只分享了其中4个类Unix系统可用的工具。希望你喜欢我们的文章,并且提供您的宝贵意见,让我们知道您想了解哪些新工具。 -------------------------------------------------------------------------------- @@ -254,7 +254,7 @@ via: http://linoxide.com/linux-shell-script/send-email-subject-body-attachment-l 作者:[Bobbin Zachariah][a] 译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b7cccea3350ecce6aa5d077297eb92a0706c604f Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 May 2015 11:34:59 +0800 Subject: [PATCH 0949/2517] PUB:20150205 Inxi--Find System And Hardware Information On Linux @goreliu --- ...ind System And Hardware Information On Linux.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150205 Inxi--Find System And Hardware Information On Linux.md (88%) diff --git a/translated/tech/20150205 Inxi--Find System And Hardware Information On Linux.md b/published/20150205 Inxi--Find System And Hardware Information On Linux.md similarity index 88% rename from translated/tech/20150205 Inxi--Find System And Hardware Information On Linux.md rename to published/20150205 Inxi--Find System And Hardware Information On Linux.md index 7b7b148413..abbfc030cf 100644 --- a/translated/tech/20150205 Inxi--Find System And Hardware Information On Linux.md +++ b/published/20150205 Inxi--Find System And Hardware Information On Linux.md @@ -1,7 +1,7 @@ -Inxi——获取Linux的系统和硬件信息 +Inxi:获取Linux的系统和硬件信息 ================================================================================ -我们已经展示了一些不同的[应用程序][1]和方法来获取Linux的系统和硬件信息。在这一系列,我们将看到如何使用**inxi**来获取这些详情信息。在论坛技术支持中,它可以作为调试工具,迅速确定用户的系统配置和硬件信息。 +我们已经展示了一些不同的[应用程序][1]和方法来获取Linux的系统和硬件信息。在这一系列里,我们将看到如何使用**inxi**来获取这些详情信息。在论坛技术支持中,它可以作为调试工具,迅速确定用户的系统配置和硬件信息。 **Inxi**是一个可以获取完整的系统和硬件详情信息的命令行工具,内容包括: @@ -86,7 +86,7 @@ Inxi在多数现代GNU/Linux操作系统的默认软件仓库中。所以我们 Machine: System: Dell (portable) product: Inspiron N5050 Mobo: Dell model: 01HXXJ version: A05 Bios: Dell version: A05 date: 08/03/2012 -不只有硬性详情信息,它也可以显示我们系统中的**可用软件仓库列表**。 +不仅是硬性详情信息,它也可以显示我们系统中的**可用软件仓库列表**。 inxi -r @@ -110,7 +110,7 @@ Inxi还可以显示你所在位置的天气信息。感到意外吗?是的, inxi -W Erode,Tamilnadu -这里**Erode**是区,**Tamilnadu**是印度的一个邦。 +这里**Erode**是地区,**Tamilnadu**是印度的一个邦。 示例输出: @@ -118,7 +118,7 @@ Inxi还可以显示你所在位置的天气信息。感到意外吗?是的, ### 查看完整的硬件详情信息 ### -厌倦了获取每种硬件的信息?你可以使用如下命令将所有信息一次列出: +厌倦了逐一获取每种硬件的信息?你可以使用如下命令将所有信息一次列出: inxi -F @@ -164,9 +164,9 @@ via: http://www.unixmen.com/inxi-find-system-hardware-information-linux/ 作者:[SK][a] 译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/sk/ -[1]:http://www.unixmen.com/screenfetch-bash-screenshot-information-tool/ +[1]:https://linux.cn/article-1947-1.html From 282bdac1fbce0a2860aacac539e3454d0fff7fff Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 May 2015 11:52:40 +0800 Subject: [PATCH 0950/2517] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20140804 Group Test--Linux Text Editors.md | 124 +++++++++--------- 1 file changed, 59 insertions(+), 65 deletions(-) diff --git a/translated/share/20140804 Group Test--Linux Text Editors.md b/translated/share/20140804 Group Test--Linux Text Editors.md index 1976cfca32..5400d1b935 100644 --- a/translated/share/20140804 Group Test--Linux Text Editors.md +++ b/translated/share/20140804 Group Test--Linux Text Editors.md @@ -1,14 +1,15 @@ -组测试: Linux 文本编辑器 +五款 Linux 文本编辑器测评 ================================================================================ -> Mayank Sharma 测试了5款不仅仅是能处理字的超级文本编辑器。 -如果你使用Linux已经有很长一段时间,你知道,不管是编辑一款app的配置文件,一起用shell脚本骇客,或者编写/查看代码,类似LobreOffice的工具并不能满足。尽管字面上看起来意思一样,你不需要一个字处理器来完成这些任务;你需要一个文本编辑器。 +> Mayank Sharma 测试了5款不仅仅是能处理文字的超强文本编辑器。 -在这个组测试中,我们将着眼于5款不仅仅是能胜任繁重文本任务的简陋的文本编辑器。他们能高亮语法,像拼写检查一样轻松处理代码缩进。你可以像你复制/粘贴文本那样容易地使用他们记录宏以及管理代码片段。 +如果你使用Linux已经有很长一段时间,你知道,不管是编辑一款app的配置文件,还是修改shell脚本,或者编写/查看代码,类似LibreOffice的工具并不适合。尽管字面上看起来都是一样,但是你并不需要一个文字处理器来完成这些任务;你需要的是一个文本编辑器。 -得益于能向它们注入足以抗衡其它类型的以文本为中心的应用程序能力的插件,一些简单的文本编辑器甚至超过了它们的设计目标。它们能胜任一个源代码编辑器的任务,甚至是一个集成开发环境。 +在这个测评中,我们将着眼于5款更能胜任繁重文本工作的轻量级的文本编辑器。他们支持语法高亮,像拼写检查一样轻松处理代码缩进。你可以像你复制/粘贴文本那样容易地使用它们记录宏以及管理代码片段。 -Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一些原因,我们在这个组测试中并没有包括它们。首先,如果你使用它们中的任何一个,那么恭喜你:你不需要更换了。其次,它们都有陡峭的学习曲线,尤其是那些熟悉了桌面环境的用户:他们很更愿意投入其他有图形界面的文本编辑器。 +得益于它们的插件,使得它们足以抗衡其它的以文本为中心的应用程序,一些简单的文本编辑器甚至超出了它们的设计目标。它们能胜任一个源代码编辑器的任务,甚至就是一个集成开发环境。 + +Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一些原因,我们在这个测评中并没有包括它们。首先,如果你使用它们中的任何一个,那么恭喜你:你不需要更换了。其次,它们都有陡峭的学习曲线,尤其是那些熟悉了桌面环境的用户:他们很更愿意投入其他有图形界面的文本编辑器。 ### 目录: ### @@ -17,7 +18,7 @@ Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一 - URL:http://projects.gnome.org/gedit/ - 版本: 3.10 - 许可证: GPL -- Gnome的默认文本编辑器准备好挑战了? +- Gnome的默认文本编辑器准备好挑战了吗? #### Kate #### @@ -31,120 +32,115 @@ Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一 - URL: www.sublimetext.com - 版本: 2.0.2 - 许可证: Proprietary -- 在自由与黄金心脏土地上的私有软件。 +- 在自由的土地上的带有黄金般的心脏的专利软件。 #### UltraEdit #### - URL: www.ultraedit.com - 版本: 4.1.0.4 - 许可证: Proprietary -- 它做的足够多去证明它的价值了吗? +- 足够证明它的价值了吗? #### jEdit #### - URL: www.jedit.org - 版本: 5.1.0 - 许可证: GPL -- 基于Java的编辑器是否会扰乱其他编辑器的世界? +- 基于Java的编辑器是否会毁掉其他编辑器的世界? ![在展示一个有功能的应用程序和将它们所有的东西曝光给用户之间有一个很好的平衡。Geddit隐藏了它的大部分功能。](http://www.linuxvoice.com/wp-content/uploads/2014/07/gedit-web.png) -在展示一个有功能的应用程序和将它们所有的东西曝光给用户之间有一个很好的平衡。Geddit隐藏了它的大部分功能。 + +*在功能与界面之间取得了良好的平衡,Gedit将其大部分功能隐藏在背后。* ### 关键标准 ### -除了Gedit和jEdit以外的所有工具,都是通过推荐的安装方法安装在Fedora和Ubuntu上。前者已经兼容默认的Gnome桌面,后者仍然固执地反对安装在Fedora上。由于这些是相对简单的应用程序,他们没有复杂的依赖,唯一例外的是jEdit,它要求要有Oracle Java。 +除了Gedit和jEdit以外的所有工具,都是通过其推荐的安装方法安装在Fedora和Ubuntu上。前者已经兼容默认的Gnome桌面,后者仍然固执地反对安装在Fedora上。由于这些是相对简单的应用程序,他们没有复杂的依赖,唯一例外的是jEdit,它要求要有Oracle Java。 -得益于Gnome和KDE持续的努力,不论他们运行的桌面环境,所有编辑器看起来很好,功能也很正常。这不仅是作为评价的标准,也意味着你不再受制于要找到和你的桌面环境兼容的工具。 +得益于Gnome和KDE持续的努力,所有编辑器无论在哪个桌面上的外观看起来很好,功能也很正常。这不仅是作为评价的标准,也意味着你不再受制于你的桌面环境兼容的工具。 -除了它们奇特的功能,我们也对所有候选者测试了通用文本编辑功能。然而,它们并没有被设计为模仿现代字处理器的所有功能,我们也不以此评判。 +除了它们独特的功能,我们也对所有候选者测试了常规的文本编辑功能。然而,它们并没有被设计为模仿现代字处理器的所有功能,我们也不以此评判。 ![Kate能搭建为功能丰富的集成开发环境](http://www.linuxvoice.com/wp-content/uploads/2014/08/kate-web.png) -Kate能搭建为功能丰富的集成开发环境。 +*Kate能搭建为功能丰富的集成开发环境。* ### 编程语言支持 ### -UltraEdit 能进行语法高亮,代码折叠以及拥有项目管理的能力。这也有一个罗列源文件中所有函数的功能列表,但并不适用于我们任何的测试代码文件。UltraEdit也支持HTML5,有能添加常用HTML标记的HTML工具栏。 +UltraEdit 能进行语法高亮、代码折叠以及拥有项目管理的能力。也有一个罗列源文件中所有函数的功能列表,但并不适用于我们测试的任何代码文件。UltraEdit也支持HTML5,有一个能添加常用HTML标记的HTML工具栏。 -即使Gnome的默认文本编辑器Gedit,也有几个面向编码的功能特性,例如括号匹配,自动缩进以及为包括C, C++, Java, HTML, XML, Python, Perl, 以及许多其它编程语言进行语法高亮。 +即使Gnome的默认文本编辑器Gedit,也有几个面向编码的功能特性,例如括号匹配、自动缩进以及为包括C, C++, Java, HTML, XML, Python, Perl, 以及许多其它编程语言进行语法高亮。 -如果你需要更多的编程辅助,看一下Sublime和Kate。Sublime支持多种编程语言并且(正如流行的那些)能为C#, D, Dylan, Erlang, Groovy, Haskell, Lisp, Lua, MATLAB, OCaml, R, 甚至 SQL 进行语法高亮。如果这还不够,你可以下载插件以支持更多的语言。 +如果你需要更多的编程辅助功能,看一下Sublime和Kate。 -另外,它的语法高亮功能提供了多个可定制选项。这个应用程序也会进行括号匹配,确保代码段都正确,Sublime的自动补全功能也支持用户创建的变量。 +Sublime支持多种编程语言并且能为(那些流行的)C#, D, Dylan, Erlang, Groovy, Haskell, Lisp, Lua, MATLAB, OCaml, R, 甚至 SQL 进行语法高亮。如果这还不够,你可以下载插件以支持更多的语言。另外,它的语法高亮功能提供了多个可定制选项。这个应用程序也会进行括号匹配,确保代码段都正确,Sublime的自动补全功能也支持用户创建的变量。就像Komodo IDE,Sublime也可以显示一个全部源代码的滚动预览图,这对于长代码文件导航和在文件中的不同部分跳转很方便。Sublime最好的功能之一就是能在编辑器内部运行特定语言,例如C++, Python, Ruby等的代码,当然假设在你的电脑上安装有编译器以及其它系统工具。省时间而且不用再开终端. -正如Komodo IDE,Sublime也可滚动浏览显示完整的代码,这对于长代码文件导航和在文件中的不同部分跳转很方便。 +你也可以用插件在Kate中开启构建系统功能。另外,你可以为GDB调试器添加一个简单的前端。Kate能和Git,Subversion以及Mercurial版本控制系统一起工作,也提供了一些项目管理的功能。除了能为超过180种语言进行语法高亮,它支持所有的这些辅助功能,例如括号匹配,自动补全和自动缩进。它也支持代码折叠,甚至在一个程序中折叠函数。 -Sublime最好的功能之一就是能在编辑器内部为特定语言,例如C++, Python, Ruby等运行代码,当然假设在你的电脑上安装有编译器以及其它系统工具。省时间而且不用再开终端. +唯一的遗憾的是jEdit,它声称自己是一个程序员的文本编辑器,但它缺少其他的基本功能,例如代码折叠,它甚至不能提示或者补全函数. -你也可以用插件在Kate中开启构建系统功能。另外,你可以为GDB调试器添加一个简单的前端。Kate能和Git,Subversion以及Mercurial版本控制系统一起工作,也提供了一些项目管理的功能。 +**评分:** -除了能为超过180中语言进行语法高亮,它支持所有的这些辅助功能,例如括号匹配,自动补全和自动缩进。它也支持代码折叠,甚至在一个程序中折叠函数。 +- Gedit:3/5 +- Kate:5/5 +- Sublime:5/5 +- UltraEdit:3/5 +- jEdit:1/5 -唯一的遗憾的是jEdit,它声称自己是一个程序员的文本编辑器,但它缺少其他的基本功能,例如代码折叠,它甚至不能提示或者不全函数. +![如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22种主题。](http://www.linuxvoice.com/wp-content/uploads/2014/08/sublime-web.png) -**评分:** - -- Gedit:3/5 -- Kate:5/5 -- Sublime:5/5 -- UltraEdit3/5 -- jEdit:1/5 - -![如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22中主题。](http://www.linuxvoice.com/wp-content/uploads/2014/08/sublime-web.png) - -如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22中主题。 +*如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22种主题。* ### 键盘控制 ### -高级文本编辑器用户希望能完全通过键盘控制和操作,一些应用程序甚至运行他们的用户自定义快捷方式的键盘绑定。 +高级文本编辑器的用户希望能完全通过键盘控制和操作,一些应用程序甚至支持用户自定义快捷方式的键盘绑定。 -你可以轻松的使用Gedit的扩展键盘快捷键。这里有编辑文件,为普通任务,例如对一个文档进行拼写检查,唤起工具的快捷键。你可以获取应用程序内部的一系列默认快捷键,但并没有图形化的方式去自定义它们。相似的,在Sublime中自定义键绑定,你需要修改他的XML键映射文件。Sublime由于缺少定义键盘快捷键的图形化界面而饱受批评,但长期使用的用户支持当前的基于文件的机制:这给他们更多的控制能力。 +你可以轻松的使用Gedit的扩展键盘快捷键。可以在编辑文件时通过工具的快捷键调用工具,例如对一个文档进行拼写检查。你可以看到应用程序内部的一系列默认快捷键,但并没有图形化的方式去自定义它们。相似的,在Sublime中自定义键盘绑定,你需要修改它的XML的键盘映射文件。Sublime由于缺少定义键盘快捷键的图形化界面而饱受批评,但长期使用的用户支持当前的基于文件的机制:这给了他们更多的控制能力。 -UltraEdit为它"一切都可自定义"的座右铭感到自豪,这也包括键盘快捷键。你可以自定义菜单导航的热键,以及定义你自己的访问大量函数的多键键映射。 +UltraEdit为它"一切都可自定义"的座右铭感到自豪,这也包括键盘快捷键。你可以自定义菜单导航的热键,以及定义你自己的访问大量功能的组合键映射。 除了完全可自定义的键盘快捷键以外,jEdit也有为Emacs预定义的键映射。Kate在这方面尤其令人映像深刻。它有简单可访问的自定义键绑定窗口。你可以更改默认的键,或者定义替代的键。另外,Kate也有一个能使用户使用Vi键操作Kate的Vi模式。 -**Verdict:** +**评分:** -- Gedit:2/5 -- Kate:5/5 -- Sublime:3/5 -- UltraEdit:4/5 -- jEdit:5/5 +- Gedit:2/5 +- Kate:5/5 +- Sublime:3/5 +- UltraEdit:4/5 +- jEdit:5/5 ### 片段和宏 ### 宏通过自动化重复的步骤帮助你降低花费在编辑和组织数据上的时间,而代码片段通过创建可重用的源代码块为程序员扩展类似的功能。这两者都能节省你的时间。 -标准的Gedit安装没有这两种功能中的任何一种,但是你可以通过独立的插件启用这些功能。片段插件随Gedit一起发布,但在Gedit内部启用宏插件之前你需要手动下载和安装(被称为gedit-macropy,托管在GitHub上)。 +标准的Gedit安装没有这两种功能中的任何一种,但是你可以通过独立的插件启用这些功能。片段插件随Gedit一起发布,但在Gedit内启用宏插件,则需要你手动下载和安装(被称为gedit-macropy,托管在GitHub上)。 -Kate也同样通过插件的形式启用片段功能。一旦加入,插件也增加了片段的PHP,Bash和Java库。你可以在侧边栏中显示片段列表以便于访问。可以通过右击片段或者快捷键组合方式编辑它的内容。然而,令人惊讶的是,它不支持宏-尽管用户从2002年开始重复要求! +Kate也同样通过插件的形式启用片段功能。一旦加入,插件也增加了PHP,Bash和Java的片段库。你可以在侧边栏中显示片段列表以便于访问。可以通过右击片段或者快捷键组合方式编辑它的内容。然而,令人惊讶的是,它不支持宏-尽管用户从2002年就不断要求! -jEdit也有一个启用片段的插件。但是它可以从用户行为中记录宏或者你也可以在BeanShell 脚本语言(BeanShell支持像Perl和JavaScript那样将脚本对象封锁为简单的方法)中写宏。jEdit也有一个可以从jEdit的网站中下载多种宏的插件。 +jEdit也有一个启用片段的插件。它还可以从用户行为中记录宏或者你也可以用BeanShell 脚本语言(BeanShell支持像Perl和JavaScript那样将脚本对象封装为简单的方法)中写宏。jEdit也有一个可以从jEdit的网站中下载多种宏的插件。 Sublime有创建片段和宏的内建功能,也有为大多数编程语言经常使用的函数多种片段。 -在UltraEdit中片段被称为智能模板,正如Sublime你可以根据正在编辑的源代码文件类型插入片段。要完成宏记录功能,UltraEdit还有一个基于JavaScript的集成脚本语言来完成自动任务。你也可以从编辑器的网站中下载用户提交的宏和脚本。 +在UltraEdit中片段被称为智能模板,就像Sublime中一样,你可以根据正在编辑的源代码文件类型插入片段。要完成宏记录功能,UltraEdit还有集成了一个基于JavaScript的脚本语言引擎来完成自动任务。你也可以从该编辑器的网站中下载用户提交的宏和脚本。 -**Verdict:** +**评分:** -- Gedit:3/5 -- Kate:1/5 -- Sublime:5/5 -- UltraEdit:5/5 -- jEdit:5/5 +- Gedit:3/5 +- Kate:1/5 +- Sublime:5/5 +- UltraEdit:5/5 +- jEdit:5/5 -![UltraEdit的用户界面是高度可配置的 — 你可以正如改变其它许多方面那样简单的自定义工具栏和菜单的布局。](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) +![UltraEdit的用户界面是高度可配置的 — 你可以像改变其它许多方面那样简单的自定义工具栏和菜单的布局。](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) -UltraEdit的用户界面是高度可配置的 — 你可以正如改变其它许多方面那样简单的自定义工具栏和菜单的布局。] +*UltraEdit的用户界面是高度可配置的 — 你可以像改变其它许多方面那样简单的自定义工具栏和菜单的布局。* ### 易用性 ### -不像一个准系统文本编辑器,文本编辑器的这个功能洋溢着适应大范围用户的功能 - 从文档写作者到程序员。从应用程序剥离相反,他们的开发者在寻找添加更多功能的途径。 +不像那些简陋的文本编辑器,这些文本编辑器在这方面可以适应从文档写作者到程序员的各种用户的需要。与精简应用程序相反,他们的开发者在寻找添加更多功能的途径。 -尽管第一眼看上去这次组测试中的大部分应用有一个很相似的布局,经过仔细的检查,你会发现一些可用性差异。我们通过用户界面的合理使用来介绍它们的功能和特性,而不是铺天盖地地告诉读者。 +尽管第一眼看上去这次测评中的大部分应用有一个很相似的布局,经过仔细的检查,你会发现一些可用性的差异。我们通过用户界面的合理使用来介绍它们的功能和特性,而不是铺天盖地地告诉读者。 -### Gedit: 4/5 ### +#### Gedit: 4/5 #### Gedit有很普通的外观。通过最小化菜单和按钮有一个简单的界面。但这也是一种双刃剑,因为有些用户可能不会发现它真正的潜能。 @@ -152,21 +148,19 @@ Gedit可以通过在窗口中能重排和移动的选项卡打开多个文件。 为了适配Gnome,在应用程序的最后一个版本中考虑了大量的用户界面。然而它还并不稳定,尽管包括了所有的功能,和菜单交互的一些插件还需要升级。 -### Kate: 5/5 ### +#### Kate: 5/5 #### 尽管用户界面的主要部分和Gedit的相似,Kate可以在两边显示选项卡并且它的菜单更加丰富。该应用程序平易近人,让用户可以挖掘其它功能。 Kate可以在KDE的KIO支持的所有协议上透明地打开和保存文件,包括HTTP, FTP, SSH, SMB 和 WebDAV。你可以用这个应用同时处理多个文件。但不同于大部分应用程序传统的水平选项卡选择栏,Kate在屏幕的两个方向都有选项卡。左侧的侧边栏显示打开文件的索引。需要同时查看一个文件不同部分的程序员也会感激它可以水平或者竖直分隔界面的能力。 -### Sublime: 5/5 ### - +#### Sublime: 5/5 #### Sublime支持你在不同方式同时查看多达四个文件。当你在zone下,这里也有一个只显示文件和菜单的全屏模式。 这个编辑器还在右边有个小地图,这在长文件中导航非常有用。应用程序为多种编程语言提供多种流行功能的片段,这使得它对于开发者非常有用。另一个精巧的功能是,无论你使用都是文本文档或者代码,都可以交换和随机选择。 -### UltraEdit: 3/5 ### - +#### UltraEdit: 3/5 #### UltraEdit在界面的顶部和底部加载了多种工具栏。由于有在文档中跳转的选项卡,两边的面板,以及复杂区别,使得只剩下一点空间给编辑窗口。 @@ -174,7 +168,7 @@ UltraEdit在界面的顶部和底部加载了多种工具栏。由于有在文 使用应用程序的Preference窗口,你可以调整应用程序的多个方面,包括颜色主题和类似语法高亮的其它功能。 -### jEdit: 3/5 ### +#### jEdit: 3/5 #### 在可用性方面,首先一个不好就是jEdit不能在基于RPM的发行版上安装。导航编辑器需要一些时间来适应,因为它的菜单和其它流行的应用程序顺序不同,而且有些普通桌面用户不熟悉的名字。但是,该应用程序有详细的内部帮助,这有利于缓解学习曲线。 From 883effa6d3c6d3366a93e1bb6440ab00a03c5da0 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 May 2015 14:35:17 +0800 Subject: [PATCH 0951/2517] PUB:20140804 Group Test--Linux Text Editors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ictlyh 这篇口语化太多了,翻译不易,我也只能初步校对,想必还有不少不尽如人意的地方。 --- ...20140804 Group Test--Linux Text Editors.md | 146 +++++++++--------- 1 file changed, 76 insertions(+), 70 deletions(-) rename {translated/share => published}/20140804 Group Test--Linux Text Editors.md (65%) diff --git a/translated/share/20140804 Group Test--Linux Text Editors.md b/published/20140804 Group Test--Linux Text Editors.md similarity index 65% rename from translated/share/20140804 Group Test--Linux Text Editors.md rename to published/20140804 Group Test--Linux Text Editors.md index 5400d1b935..66b271bcf4 100644 --- a/translated/share/20140804 Group Test--Linux Text Editors.md +++ b/published/20140804 Group Test--Linux Text Editors.md @@ -48,9 +48,6 @@ Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一 - 许可证: GPL - 基于Java的编辑器是否会毁掉其他编辑器的世界? -![在展示一个有功能的应用程序和将它们所有的东西曝光给用户之间有一个很好的平衡。Geddit隐藏了它的大部分功能。](http://www.linuxvoice.com/wp-content/uploads/2014/07/gedit-web.png) - -*在功能与界面之间取得了良好的平衡,Gedit将其大部分功能隐藏在背后。* ### 关键标准 ### @@ -60,9 +57,6 @@ Emacs和Vim是两款最流行和强大的纯文本编辑器。但是,由于一 除了它们独特的功能,我们也对所有候选者测试了常规的文本编辑功能。然而,它们并没有被设计为模仿现代字处理器的所有功能,我们也不以此评判。 -![Kate能搭建为功能丰富的集成开发环境](http://www.linuxvoice.com/wp-content/uploads/2014/08/kate-web.png) - -*Kate能搭建为功能丰富的集成开发环境。* ### 编程语言支持 ### @@ -86,9 +80,6 @@ Sublime支持多种编程语言并且能为(那些流行的)C#, D, Dylan, Erlang - UltraEdit:3/5 - jEdit:1/5 -![如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22种主题。](http://www.linuxvoice.com/wp-content/uploads/2014/08/sublime-web.png) - -*如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22种主题。* ### 键盘控制 ### @@ -130,9 +121,6 @@ Sublime有创建片段和宏的内建功能,也有为大多数编程语言经 - UltraEdit:5/5 - jEdit:5/5 -![UltraEdit的用户界面是高度可配置的 — 你可以像改变其它许多方面那样简单的自定义工具栏和菜单的布局。](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) - -*UltraEdit的用户界面是高度可配置的 — 你可以像改变其它许多方面那样简单的自定义工具栏和菜单的布局。* ### 易用性 ### @@ -142,91 +130,107 @@ Sublime有创建片段和宏的内建功能,也有为大多数编程语言经 #### Gedit: 4/5 #### -Gedit有很普通的外观。通过最小化菜单和按钮有一个简单的界面。但这也是一种双刃剑,因为有些用户可能不会发现它真正的潜能。 +Gedit的外观很普通,它有一个带有很少的菜单和按钮的简单界面。这是一把双刃剑,因为有些用户可能不会发现它真正的潜能。 -Gedit可以通过在窗口中能重排和移动的选项卡打开多个文件。用户可以通过使用一个插件选择性地启用旁边或者底部用来显示文件浏览和工具输出的面板。这个应用程序会检测到被其它应用程序更改的文件并可以重新加载这个文件。 +Gedit可以在选项卡中打开多个文件,这些选项卡可以重排和在多个 Gedit窗口之间移动。用户可以选择通过插件来启用侧边栏来浏览文件或者在底部面板显示工具输出内容。这个应用程序会检测到被其它应用程序更改的文件并可以重新加载该文件。 -为了适配Gnome,在应用程序的最后一个版本中考虑了大量的用户界面。然而它还并不稳定,尽管包括了所有的功能,和菜单交互的一些插件还需要升级。 +为了适配Gnome,在应用程序的最新版本中做了大量的 UI 修改。然而修改还还不稳定,尽管包括了所有的功能,但是菜单交互的一些插件还需要升级。 + +![在展示一个有功能的应用程序和将它们所有的东西曝光给用户之间有一个很好的平衡。Geddit隐藏了它的大部分功能。](http://www.linuxvoice.com/wp-content/uploads/2014/07/gedit-web.png) + +*在功能与界面之间取得了良好的平衡,Gedit将其大部分功能隐藏在背后。* #### Kate: 5/5 #### -尽管用户界面的主要部分和Gedit的相似,Kate可以在两边显示选项卡并且它的菜单更加丰富。该应用程序平易近人,让用户可以挖掘其它功能。 +尽管用户界面的主要部分和Gedit相似,Kate可以在两边显示选项卡并且它的菜单更加丰富。该应用程序平易近人,吸引用户来挖掘它的其它功能。 -Kate可以在KDE的KIO支持的所有协议上透明地打开和保存文件,包括HTTP, FTP, SSH, SMB 和 WebDAV。你可以用这个应用同时处理多个文件。但不同于大部分应用程序传统的水平选项卡选择栏,Kate在屏幕的两个方向都有选项卡。左侧的侧边栏显示打开文件的索引。需要同时查看一个文件不同部分的程序员也会感激它可以水平或者竖直分隔界面的能力。 +Kate可以在KDE的KIO支持的所有协议上透明地打开和保存文件,包括通过HTTP, FTP, SSH, SMB 和 WebDAV。你可以用这个应用同时处理多个文件。但不同于大部分应用程序传统的水平选项卡选择栏,Kate在屏幕的两个方向都有选项卡。左侧的侧边栏显示打开的文件列表。需要同时查看一个文件不同部分的程序员也会感激它可以水平或者竖直分隔界面的能力。 + +![Kate能搭建为功能丰富的集成开发环境](http://www.linuxvoice.com/wp-content/uploads/2014/08/kate-web.png) + +*Kate能搭建为功能丰富的集成开发环境。* #### Sublime: 5/5 #### -Sublime支持你在不同方式同时查看多达四个文件。当你在zone下,这里也有一个只显示文件和菜单的全屏模式。 +Sublime支持你在不同方式同时查看多达四个文件。当你在集中精力编程时,它也有一个只显示文件和菜单的全屏无扰模式。 -这个编辑器还在右边有个小地图,这在长文件中导航非常有用。应用程序为多种编程语言提供多种流行功能的片段,这使得它对于开发者非常有用。另一个精巧的功能是,无论你使用都是文本文档或者代码,都可以交换和随机选择。 +这个编辑器还在右边有个缩略地图,这在长文件中导航非常有用。应用程序为多种编程语言提供多种常用函数的片段,这使得它对于开发者非常有用。另一个精巧的功能是,无论你使用都是文本文档或者代码,都可以任意选择和替换。 + +![如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22种主题。](http://www.linuxvoice.com/wp-content/uploads/2014/08/sublime-web.png) + +*如果你不喜欢Sublime的Charcoal外观,你可以选择它包含的其它22种主题。* #### UltraEdit: 3/5 #### -UltraEdit在界面的顶部和底部加载了多种工具栏。由于有在文档中跳转的选项卡,两边的面板,以及复杂区别,使得只剩下一点空间给编辑窗口。 +UltraEdit在界面的顶部和底部加载了多种工具栏。加上切换文档的选项卡、两边的面板,以及分隔区域,使得只剩下一点空间给编辑窗口。 使用HTML的网络开发者有很多唾手可得的帮助。你可以通过FTP和SFTP访问远程文件。高级功能,例如记录一个宏以及比较文件,也简单易用。 -使用应用程序的Preference窗口,你可以调整应用程序的多个方面,包括颜色主题和类似语法高亮的其它功能。 +使用应用程序的偏好设置窗口,你可以调整应用程序的多个方面,包括颜色主题和类似语法高亮的其它功能。 + +![UltraEdit的用户界面是高度可配置的 — 你可以像改变其它许多方面那样简单的自定义工具栏和菜单的布局。](http://www.linuxvoice.com/wp-content/uploads/2014/08/ultraedit-web.png) + +*UltraEdit的用户界面是高度可配置的 — 你可以像改变其它许多方面那样简单的自定义工具栏和菜单的布局。* #### jEdit: 3/5 #### 在可用性方面,首先一个不好就是jEdit不能在基于RPM的发行版上安装。导航编辑器需要一些时间来适应,因为它的菜单和其它流行的应用程序顺序不同,而且有些普通桌面用户不熟悉的名字。但是,该应用程序有详细的内部帮助,这有利于缓解学习曲线。 -jEdit高亮你所在的当前行,并使你能一多种查看方式分隔窗口。你可以简单地从应用程序中安装和管理插件,除了全宏,jEdit也支持你记录快速临时的宏。 +jEdit会高亮你所在的当前行,并使你能以多种查看方式分隔窗口。你可以简单地从应用程序中安装和管理插件,除了使用完整的宏,jEdit也支持你快速记录一个临时的宏。 ![由于它的Java基础,jEdit在任何桌面环境中都不能给人宾至如归的感觉](http://www.linuxvoice.com/wp-content/uploads/2014/08/jedit-web.png) -由于它的Java基础,jEdit在任何桌面环境中都不能给人宾至如归的感觉 +*由于它的Java基础,jEdit在任何桌面环境中都不能给人宾至如归的感觉* ### 可用性和支持 ### -在Gedit和Kate之间有很多相似性。两个应用程序都得益于他们各自的父项目,Gnome和KDE,并绑定在各种主流的发行版中。另外两个项目都是交叉平台的,有Windows和Mac OS X版本以及本来的Linux版本。 +在Gedit和Kate之间有很多相似性。两个应用程序都得益于他们各自的父项目,Gnome和KDE,捆绑在各种主流的发行版中。另外两个项目都是跨平台的,有Windows和Mac OS X版本以及原生的Linux版本。 -Gedit托管在Gnome的网络设施上并有一个简单的用户指南,关于多种插件的信息,以及包括邮件列表和IRC通道的常用保持联系方式。你也可以在其它基于Gnome的发行版,例如Ubuntu中找到使用信息。相似地,Kate得益于KDE的资源,并包括详细的用户信息以及邮件列表和IRC通道。你也可以从应用程序中获取相应的离线用户指南。 +Gedit托管在Gnome的网站上,并有一个简单的用户指南、关于多种插件的信息,以及包括邮件列表和IRC通道在内的常用联系方式。你也可以在其它基于Gnome的发行版,例如Ubuntu中找到使用信息。相似地,Kate得益于KDE的资源,并包括详细的用户信息以及邮件列表和IRC通道。你也可以从应用程序中获取相应的离线用户指南。 -除了Linux,UltraEdit在Windows和Mac OS X中也可用,虽然在应用程序中并没有包括,但在启动时也有详细的用户指南。为了辅助用户,UltraEdit保存了一个常见问题的数据库,一系列关于多种特定功能的详细信息的有用提示,用户还可以在论坛版块彼此帮助。另外,付费用户也可以通过邮件从开发者中获取支持。 +除了Linux,UltraEdit在Windows和Mac OS X中也可用,虽然在应用程序中并没有包括,但在启动时也有详细的用户指南。为了辅助用户的使用,UltraEdit保存了一个常见问题的数据库,一系列关于多种特定功能的详细介绍,用户还可以在论坛版块彼此帮助。另外,付费用户也可以通过邮件从开发者中获取支持。 -Sublime支持相同数目的平台,但是你需要单独为每种平台购买许可证。开发者通过博客使用户了解正在进行的开发,并积极参加了主持论坛。这个项目支持设施的亮点是提供免费的详细教程和视频课程。Sublime非常可爱。 +Sublime支持一样多的平台,但是你需要单独为每种平台购买许可证。开发者通过博客让用户了解正在进行的开发,并积极参加它的论坛。这个项目支持设施的亮点是提供免费的详细教程和视频课程。Sublime非常漂亮。 -由于是用java编写的,jEdit在多种平台中都可用。在它的网站上你可以找到一个详细的用户指南以及一些插件帮助文档的链接。然而,这里没有能使用户和其他用户或者开发者交流的途径。 +由于jEdit是用java编写的,所以它在多种平台中都可用。在它的网站上你可以找到一个详细的用户指南以及一些插件帮助文档的链接。然而,这里没有能使用户和其他用户或者开发者交流的途径。 -**判定:** +**评分:** -- Gedit: 4/5 -- Kate: 4/5 -- Sublime: 5/5 -- UltraEdit: 3/5 -- jEdit: 2/5 +- Gedit:4/5 +- Kate:4/5 +- Sublime:5/5 +- UltraEdit:3/5 +- jEdit:2/5 -### 附加和插件 ### +### 附加组件和插件 ### 不同的用户有不同的需求,一个简单的轻量级应用程序只能做到这么多。这就是为什么需要插件的原因。应用程序依赖于这些小部件来扩展它们的功能集并让更多的用户使用。 -UltraEdit是一个另外。它没有第三方插件,但开发者确实支出了例如HtmlTidy的第三方工具已经安装到了UltraEdit。 +UltraEdit是一个例外。它没有第三方插件,但开发者将例如HtmlTidy这样的第三方工具集成到了UltraEdit。 -Gedit附带了好多已安装的插件,你可以从gedit-插件包下载更多的插件。基于和Gedit版本的兼容性,项目网站也有到多个第三方插件的链接。 +Gedit附带了好多已安装的插件,你可以下载更多的更多gedit插件包。基于和Gedit版本的兼容性,项目网站也有到多个第三方插件的链接。 -三个对程序员非常有用的插件是Code Comment,在底部面板增加一个终端的Terminal Plugin以及Session Saver。当你用多个文件开发项目的时候Session Saver相当有用。你可以在选项卡中打开文件,保存会话,当你用一个单击回复的时候,可以按照你保存时的选项卡顺序打开所有的文件。 +三个对程序员非常有用的插件是:Code Comment、在底部面板增加一个终端的Terminal Plugin以及Session Saver。当你用多个文件开发项目的时候Session Saver相当有用。你可以在选项卡中打开文件,保存会话,你可以用一键恢复,就可以按照你保存时的选项卡顺序打开所有的文件。 -类似的,你可以通过用内部的插件管理器增加插件来扩展Kate。除了令人映像深刻的项目插件,一些开发者使用的插件包括嵌入式终端,能编译和调试代码,以及对数据库执行SQL查询。 +类似的,你可以通过用内部的插件管理器增加插件来扩展Kate。除了令人映像深刻的项目插件,一些开发者使用的插件包括嵌入式终端,它能编译和调试代码,以及对数据库执行SQL查询。 -Sublime的插件是用Python写的,文本编辑器包括了一个类似于apt-get,能使用户查找,安装,升级和移除插件包的名为Package Control的工具。通过插件,你可以在Sublime中使用Git版本控制,以及改进JavaScript的JSLint工具。Sublime Linter能指出你代码中的错误,是编码人员必备的插件。 +Sublime的插件是用Python写的,文本编辑器包括了一个类似于apt-get,能使用户查找,安装,升级和移除插件包的名为Package Control的工具。通过插件,你可以在Sublime中使用Git版本控制,以及美化JavaScript代码的JSLint工具。Sublime Linter能指出你代码中的错误,是编码人员必备的插件。 -jEdit拥有最令人映像深刻的插件设施。该应用有超过200个插件,可以在它们自己的专用网站中浏览。网站通过不同的类型列举了插件,例如文件管理,版本控制,文本等。你可以在每个类型下找到很多的插件。 +jEdit拥有最令人印象深刻的插件设施。该应用有超过200个插件,可以在它们自己的专用网站中浏览。网站通过不同的类型列出了插件,例如文件管理,版本控制,文本等。你可以在每个类型下找到很多的插件。 一些最好的插件是Android插件,它们提供了和Android项目协同工作的工具;你可以使用TomcatSwitch插件创建和控制外部Jakarta Tomcat服务器进程;以及类似于Vi功能的Vimulator插件。你可以通过使用jEdit的插件管理器安装这些插件。 -**评定** +**评分:** -- Gedit: 3/5 -- Kate: 4/5 -- Sublime: 4/5 -- UltraEdit: 1/5 -- jEdit: 5/5 +- Gedit:3/5 +- Kate:4/5 +- Sublime:4/5 +- UltraEdit:1/5 +- jEdit:5/5 ### 纯文本编辑 ### -尽管它们强大的额外功能甚至可能会取代几个流派完全成熟的应用程序,有时候可能只需要使用这些庞大的文本编辑器读写或者编辑简单的纯文本。虽然你可以使用它们中的任何一个输入文本,我们通过普通文本编辑的方便性评价它们。 +尽管它们强大的额外功能甚至可能会取代几种完全成熟的应用程序,有时候可能只需要使用这些庞大的文本编辑器读、写或者编辑简单的纯文本。虽然你可以使用它们中的任何一个输入文本,我们通过普通文本编辑的方便性评价它们。 Gnome的默认文本编辑器Gedit,支持取消和重做机制以及搜索和替换。它可以对多种语言进行拼写检查,并能通过使用Gnome GVFS库访问和编辑远程文件。 @@ -234,44 +238,46 @@ Gnome的默认文本编辑器Gedit,支持取消和重做机制以及搜索和 Sublime有很多可选择的编辑命令,例如缩进文本和格式化段落。它的自动保存功能帮助防止用户丢失他们的更改。高级用户还会喜欢基于正则表达式的递归查找和替换功能,以及选择多个不连续的文本块并执行统一操作。 -UltraEdit也允许用户在查找和替换功能中使用正则表示,并能通过FTP编辑远程文件。JEdit一个独特的功能是它支持被称为寄存器的不限数目的剪切板。你可以复制文本片段到这些寄存器中,在编辑会话过程中都可用。 +UltraEdit也允许用户在查找和替换功能中使用正则表达式,并能通过FTP编辑远程文件。 -**评定:** +JEdit一个独特的功能是它支持被称为寄存器的不限数目的剪切板。你可以复制文本片段到这些寄存器中,在编辑会话过程中都可用。 -- Gedit: 4/5 -- Kate: 5/5 -- Sublime: 5/5 -- UltraEdit: 4/5 -- jEdit: 4/5 +**评分:** + +- Gedit:4/5 +- Kate:5/5 +- Sublime:5/5 +- UltraEdit:4/5 +- jEdit:4/5 ### 我们的评比 ### -在这里的所有编辑器都足以替换你已有的文本编辑器去用来编辑文本和调整配置文件。事实上,没准它们会组合起来作为你的集成开发环境。这些应用程序都有各种各样功能,它们的开发者不会考虑剥离功能,而是增加越来越多的功能。 +在这里的所有编辑器都足以替换你已有的文本编辑器,来编辑文本和调整配置文件。事实上,没准它们会组合起来作为你的集成开发环境。这些应用程序都有各种各样功能,它们的开发者不会考虑剥离功能,而是增加越来越多的功能。 -jEdit排在这次测试的最后面。因为它不仅坚持使用专有的Oracle Java运行环境,不能在你的Fedora机器上安装,而且开发者不积极的和用户交互。 +jEdit排在这次测试的最后面。因为它不仅坚持使用专有的Oracle Java运行时环境,不能在你的Fedora机器上安装,而且开发者并不积极和用户交互。 -UltraEdit做的稍微好一点。这个商业专用工具专注于网络开发者,不为非开发者高级用户提供任何功能,使得它不值得推荐为免费软件的替代品。 +UltraEdit做的稍微好一点。这个商业专用工具专注于网络开发者,不为非开发者的高级用户提供任何功能,使得它不值得推荐为免费软件的替代品。 -排在第三的是Gedit。作为Gnome的默认编辑器,它没有任何内在的错误,但尽管有很多积极的方面,它还是略微被Sublime和Kate超越。开诚布公地说,Kate是比Gedit更通用的编辑器,甚至考虑到他们的插件系统,评分也优于Gnome的默认编辑器。 +排在第三的是Gedit。作为Gnome的默认编辑器,它没有任何内在的问题,但尽管有很多积极的方面,它还是略微被Sublime和Kate超越。开诚布公地说,Kate是比Gedit更通用的编辑器,甚至考虑到他们的插件系统,评分也优于Gnome的默认编辑器。 -Sublime和Kate都相当好。他们在我们的大多数测试中表现同样出色。由于不支持宏而落后于Sublime,但键盘友好和能简单定义自定义键绑定又使Kate找回优势。 +Sublime和Kate都相当好。他们在我们的大多数测试中表现同样出色。Kate由于不支持宏而落后于Sublime,但键盘友好和能简单定义自定义键绑定又使Kate找回优势。 -Kate成功的原因可以归结为它通过最小化学习曲线提供了最大化数目的功能。尽量使用它吧,不仅作为简单文本编辑器使用,或者容易使用语法高亮编辑配置文件,甚至得益于项目管理能力能使用它协作一个复杂的编程项目。 +Kate成功的原因可以归结为它通过最小化学习曲线提供了最大化的功能。尽管使用它吧,不仅作为简单文本编辑器使用,或者容易使用语法高亮编辑配置文件,甚至得益于其项目管理能力能使用它协作一个复杂的编程项目。 -我们不是选择Kate去替换一个类似[在这里插入你最喜欢的专业工具]的全面的集成开发环境。但是它是一个专业工具理想的全面的以及完美的垫脚石。 +我们不是选择Kate去替换一个类似“[XX,在这里插入你最喜欢的专业工具]”的全面的集成开发环境。但是它是一个专业工具理想的、全面的、以及完美的垫脚石。 Kate为能快速响应你的需要而设计,它的界面并不会使你茫然,并且和那些过于复杂的应用一样的有用。 - + ### 1st Kate ### - Licence LGPL/GPL Version 3.11 - www.kate-editor.org -- 拥有超能力,最终温和的文本编辑器。 +- 拥有超能力,态度温和的文本编辑器。 - Kate是KDE项目中最有用的应用程序之一。 ### 2nd Sublime Text ### -- Licence Proprietary Version 2.0.2 +- Licence 专利 Version 2.0.2 - www.sublimetext.com - 值得你每分钱的专业文本编辑器 - 简单易用,功能全面而且看起来很棒。 @@ -279,13 +285,13 @@ Kate为能快速响应你的需要而设计,它的界面并不会使你茫然 - Licence GPL Version 3.10 - http://projects.gnome.org/gedit -- 从Gnome中完成。这是一个奇妙的文本编辑器,确实令人钦佩的工作,但这里的竞争实在太大了。 +- 在Gnome中就用它吧。这是一个奇妙的文本编辑器,确实令人钦佩的工作,但这里的竞争实在太大了。 ### 4th UltraEdit ### - Licence Proprietary Version 4.1.0.4 - www.ultraedit.com -- 关注于为网络开发者绑定便利,而不为普通用户提供任何特殊功能。 +- 关注于为网络开发者提供各种便利,而不为普通用户提供任何特殊功能。 ### 5th jEdit ### @@ -297,9 +303,9 @@ Kate为能快速响应你的需要而设计,它的界面并不会使你茫然 随你发行版发布的默认文本编辑器也能帮助你一些高级任务。例如KDE的KWrite和Raspbian的Nano。得益于KDE的katepart组件,KWrite继承了一些Kate的功能,得益于在树莓派上的可用性,Nano也开始重现风头。 -如果你希望跟随Linux大师的脚步,你总是可以尝试崇高的文本编辑机Emacs和Vim。想尝试Vim强大的用户首先可以考虑gVim,它通过图形界面展现了Vim的强大。 +如果你希望跟随Linux大师的脚步,你总是可以尝试高大上的文本编辑器Emacs和Vim。想尝试Vim强大的用户首先可以考虑gVim,它通过图形界面展现了Vim的强大。 -除了jEdit和Kate,这里还有其他模仿例如Emacs和Vim之类的老派高级编辑器的编辑器,比如JED 编辑器和Joe's Own Editor,这两者都有Emacs的模拟模式。另一方面,如果你在寻找轻量级的代码编辑器,可以看看Bluefish和Geany。他们的存在是为了填补文本编辑器和全面集成的开发平台之间的空隙。 +除了jEdit和Kate,这里还有其他模仿Emacs和Vim之类的旧式高级编辑器的编辑器,比如JED 编辑器和Joe's Own Editor,这两者都有Emacs的模拟模式。另一方面,如果你在寻找轻量级的代码编辑器,可以看看Bluefish和Geany。他们的存在是为了填补文本编辑器和全面集成的开发平台之间的空隙。 -------------------------------------------------------------------------------- @@ -307,7 +313,7 @@ via: http://www.linuxvoice.com/text-editors/ 作者:[Ben Everard][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[royaso](https://github.com/royaso) +校对:[royaso](https://github.com/royaso),[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From aa40f785bf0abd8ac4fdab0c9efbc3838af6e11f Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 25 May 2015 16:42:16 +0800 Subject: [PATCH 0952/2517] =?UTF-8?q?20150525-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...onitoring Tool Installation Screenshots.md | 188 ++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md diff --git a/sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md b/sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md new file mode 100644 index 0000000000..01fc6f5e68 --- /dev/null +++ b/sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md @@ -0,0 +1,188 @@ +Linux ntopng - Network Monitoring Tool Installation (Screenshots) +================================================================================ +Nowdays computers are connected between each other. From the small area such as your home Local Area Network (LAN) until the the biggest one which we call - Internet. When you are managing a network computer, you are managing one of the most critical component. Since most of developed application is web based application, the network between critical. + +There is why we need a network monitoring tool. One of the best network monitoring tool is called ntop. From [Wikipedia][1] “ntop is a network probe that shows network usage in a way similar to what top does for processes. In interactive mode, it displays the networkstatus on the user's terminal. In Web mode, it acts as a web server, creating a HTML dump of the network status. It supports a NetFlow/sFlowemitter/collector, a HTTP-based client interface for creating ntop-centric monitoring applications, and RRD for persistently storing traffic statistics” + +Now after 15 years, you will find ntopng - the next generation ntop. + +### What is ntopng ### + +Ntopng is a high-speed web-based traffic analysis and flow collection. Ntopng is based from ntop. It’s run on every Unix platform, MacOS X and Windows. + +### Features ### + +From [ntopng website][2], they said there are many features of it. Here’s some of the list : + +- Sort network traffic according to many protocols +- Show network traffic and IPv4/v6 active hosts +- Store on disk persistent traffic statistics in RRD format Geolocate hosts +- Discover application protocols by leveraging on nDPI, ntop’s DPI framework +- Show IP traffic distribution among the various protocols +- Analyse IP traffic and sort it according to the source/destination +- Display IP Traffic Subnet matrix (who’s talking to who?) +- Report IP protocol usage sorted by protocol type +- Produce HTML5/AJAX network traffic statistics + +### Installation ### + +Ntop is available in pre-compiled packages for CentOS dan Ubuntu **64-bit based**. You may find the packages in [their download page][3]. For 32-bit operating system, you have to compile it from the source. This article is **tested** on **CentOS 6.4 32-bit** version. But it may works also in other version of CentOS / RedHat based Linux. Let’s start. + +#### Prerequisites #### + +#### Development Tools #### + +You have to make sure that you have all development tools which is needed to compile ntopng. To install the development tools you can use yum command : + + # yum groupinstall ‘Development Tools’ + +#### Install TCL #### + + # yum install tcl + +#### Install libpcap #### + + # yum install libpcap libcap-devel + +#### Install Redis #### + + # wget http://redis.googlecode.com/files/redis-2.6.13.tar.gz + # tar zxfv redis-2.6.13.tar.gz + # cd redis-2.6.13 + # make 32bit + # make test + # make install + +### Install ntopng ### + +#### Method 1 : #### + + # wget http://sourceforge.net/projects/ntop/files/ntopng/ntopng-1.1_6932.tgz/download + # tar zxfv ntopng-1.1_6932.tgz + # cd ntopng-1.1_6932 + # ./configure + # make + # make install + +#### Method 2 : #### + +On my CentOS 6.4 , I got an error message when using Method 1. Here’s the error message : + + ./third-party/LuaJIT-2.0.2/src/libluajit.a : could not read symbols : File in wrong format + +So I **switch** to install it using **SVN**. Internet connection is required for this installation method. Here’s the steps : + + # svn co https://svn.ntop.org/svn/ntop/trunk/ntopng/ + # ./autogen.sh + # ./configure + # make + # make install + +*Since ntopng is a web-based application, your system must have a working web-server installed* + +### Create configuration files for ntopng ### + +If everything is installed, then it’s time for us to running it. By default, redis and ntopng will installed in /usr/local/ folder if we don’t change the installation folder explicitly in ./configure step. Next we need to create configuration files for ntopng. In this article we use vi as text editor. You can use your favorite text editor to create ntopng configuration files. + + # cd /usr/local/etc + # mkdir ntopng + # cd ntopng + # vi ntopng.start + + Put these lines : + --local-network “10.0.2.0/24” + --interface 1 + + # vi ntopng.pid + + Put this line : + -G=/var/run/ntopng.pid + +Save those files and we can continue to the next step + +### Run ntopng ### + +We assume that you have installed web server correctly, then the next step is to run redis server. + + # /usr/local/bin/redis-server + +![Starting Redis Server](http://blog.linoxide.com/wp-content/uploads/2013/11/redis-server-start.png) + +Then **run** ntopng + + # /usr/local/bin/ntopng + +![Starting Ntopng](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng-start.png) + +### Testing ntopng ### + +Now you can test your ntopng application by typing [http://yourserver.name:3000][4] . You will see ntopng login page. For the first time, you can use user ‘**admin**’ and password ‘**admin**’. + +![Ntop Login page](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_login.png) + +The dashboard is quite simple. After you logged in, you will see an information about Top Flow Talkers. + +![Ntopng Flow Talker](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_talkers.png) + +If you click **Flows menu** on the right top, ntopng will show you more detail about Active Flows. + +![Ntopng Flows](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_flows.png) + +On **Hosts menu**, you can see all hosts which are connected to the flows + +![Ntopng Hosts List](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_hoslist.png) + +If you click **Hosts > Interactions**, ntop will show you a nice graphic about interaction which happen between them. + +![Ntopng Hosts Interaction](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_hosts_interaction.png) + +**Dashboard menu** consist of : + +#### Top Hosts (Send+Receive) #### + +![Ntopng Hosts](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_hosts.png) + +#### Top Application Protocol #### + +![Ntopng Apps](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_apps.png) + +**Interfaces menu** will bring you more menus inside. Packets menu shows you size distribution of packets. + +![Ntopng packets](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_packets.png) + +**Protocols menus** will give you information about how many protocols that have been used and its percentage. + +![Ntopng protocol](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_protocol.png) + +![Ntopng protocols - detail](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_protocol_detail.png) + +You can also see the activity by using **Historical Activity menu** + +![Ntopng Historical Activity](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_historical.png) + +![Ntopng Historical Activity detail](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_historical_detail.png) + +Last but not least, you can also manage the user who can access ntopng via **Settings menu** on the top right area (the one that have a gear icon). Then click **Manage Users**. + +![Ntopng Users](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_users.png) + +Ntopng provide you with a wide range of timeframe, from every 5 minutes until 1 year. You just need to click the timeframe you want to show. The graphic itself is clickable. You can click it to zoom it. + +Of course, ntopng is more than just pictures above. You can also integrates it with GeoLocation and GeoMap services. From ntopng website it self, there are a paid modul such as nprobe to enrich the information provided by ntopng. For more detail usage of ntopng, please visit [ntopng website][5]. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/monitoring-2/ntopng-network-monitoring-tool/ + +作者:[Pungki Arianto][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/pungki/ +[1]:http://en.wikipedia.org/wiki/Ntop +[2]:http://www.ntop.org/products/ntop/ +[3]:http://www.nmon.net/packages/ +[4]:http://yourserver.name:3000/ +[5]:http://www.ntop.org/ \ No newline at end of file From d35cfe1fddfaaedd3212cfcb9546edee8eb46251 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Mon, 25 May 2015 20:35:31 +0800 Subject: [PATCH 0953/2517] finish translation of tech article '10 Amazing and Mysterious Uses of...' --- ...of Symbol or Operator in Linux Commands.md | 195 ------------------ ...of Symbol or Operator in Linux Commands.md | 193 +++++++++++++++++ 2 files changed, 193 insertions(+), 195 deletions(-) delete mode 100644 sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md create mode 100644 translated/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md diff --git a/sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md b/sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md deleted file mode 100644 index 16795b92e8..0000000000 --- a/sources/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md +++ /dev/null @@ -1,195 +0,0 @@ -translating by wwy-hust - -10 Amazing and Mysterious Uses of (!) Symbol or Operator in Linux Commands -================================================================================ -The `'!'` symbol or operator in Linux can be used as Logical Negation operator as well as to fetch commands from history with tweaks or to run previously run command with modification. All the commands below have been checked explicitly in bash Shell. Though I have not checked but a major of these won’t run in other shell. Here we go into the amazing and mysterious uses of `'!'` symbol or operator in Linux commands. - -### 1. Run a command from history by command number. ### - -You might not be aware of the fact that you can run a command from your history command (already/earlier executed commands). To get started first find the command number by running ‘history‘ command. - - $ history - -![Find Last Executed Commands with History Command](http://www.tecmint.com/wp-content/uploads/2015/05/history-Command.gif) - -Now run a command from history just by the number at which it appears, in the output of history. Say run a command that appears at number 1551 in the output of ‘history‘ command. - - $ !1551 - -![Run Last Executed Commands by Number ID](http://www.tecmint.com/wp-content/uploads/2015/05/Run-Commands-By-number.gif) - -And, it runs the command ([top command][1] in the above case), that was listed at number 1551. This way to retrieving already executed command is very helpful specially in case of those commands which are long. You just need to call it using **![Number at which it appears in the output of history command]**. - -### 2. Run previously executed command as 2nd last command, 7th last command,etc. ### - -You may run those commands which you have run previously by their running sequence being the last run command will be represented as -1, second last as -2, seventh last as -7,…. - -First run history command to get a list of last executed command. It is necessary to run history command, so that you can be sure that there is no command like `rm command > file` and others just to make sure you do not run any dangerous command accidentally. And then check Sixth last command, Eight last command and Tenth last command. - - $ history - $ !-6 - $ !-8 - $ !-10 - -![Run Last Executed Commands By Numbers](http://www.tecmint.com/wp-content/uploads/2015/05/3.gif) -Run Last Executed Commands By Numbers - -### 3. Pass arguments of last command that we run to the new command without retyping ### - -I need to list the content of directory ‘/home/$USER/Binary/firefox‘ so I fired. - - $ ls /home/$USER/Binary/firefox - -Then I realized that I should have fired ‘ls -l‘ to see which file is executable there? So should I type the whole command again! No I don’t need. I just need to carry the last argument to this new command as: - - $ ls -l !$ - -Here `!$` will carry arguments passed in last command to this new command. - -![Pass Arguments of Last Executed Command to New](http://www.tecmint.com/wp-content/uploads/2015/05/4.gif) -Pass Arguments of Last Executed Command to New - -### 4. How to handle two or more arguments using (!) ### - -Let’s say I created a text file 1.txt on the Desktop. - - $ touch /home/avi/Desktop/1.txt - -and then copy it to ‘/home/avi/Downloads‘ using complete path on either side with cp command. - - $ cp /home/avi/Desktop/1.txt /home/avi/downloads - -Now we have passed two arguments with cp command. First is ‘/home/avi/Desktop/1.txt‘ and second is ‘/home/avi/Downloads‘, lets handle them differently, just execute `echo [arguments]` to print both arguments differently. - - $ echo “1st Argument is : !^” - $ echo “2nd Argument is : !cp:2” - -Note 1st argument can be printed as `“!^”` and rest of the arguments can be printed by executing `“![Name_of_Command]:[Number_of_argument]”`. - -In the above example the first command was ‘cp‘ and 2nd argument was needed to print. Hence `“!cp:2”`, if any command say xyz is run with 5 arguments and you need to get 4th argument, you may use `“!xyz:4”`, and use it as you like. All the arguments can be accessed by `“!*”`. - -![Handle Two or More Arguments](http://www.tecmint.com/wp-content/uploads/2015/05/5.gif) -Handle Two or More Arguments - -### 5. Execute last command on the basis of keywords ### - -We can execute the last executed command on the basis of keywords. We can understand it as follows: - - $ ls /home > /dev/null [Command 1] - $ ls -l /home/avi/Desktop > /dev/null [Command 2] - $ ls -la /home/avi/Downloads > /dev/null [Command 3] - $ ls -lA /usr/bin > /dev/null [Command 4] - -Here we have used same command (ls) but with different switches and for different folders. Moreover we have sent to output of each command to ‘/dev/null‘ as we are not going to deal with the output of the command also the console remains clean. - -Now Execute last run command on the basis of keywords. - - $ ! ls [Command 1] - $ ! ls -l [Command 2] - $ ! ls -la [Command 3] - $ ! ls -lA [Command 4] - -Check the output and you will be astonished that you are running already executed commands just by `ls` keywords. - -![Run Commands Based on Keywords](http://www.tecmint.com/wp-content/uploads/2015/05/6.gif) -Run Commands Based on Keywords - -### 6. The power of !! Operator ### - -You can run/alter your last run command using `(!!)`. It will call the last run command with alter/tweak in the current command. Lets show you the scenario - -Last day I run a one-liner script to get my private IP so I run, - - $ ip addr show | grep inet | grep -v 'inet6'| grep -v '127.0.0.1' | awk '{print $2}' | cut -f1 -d/ - -Then suddenly I figured out that I need to redirect the output of the above script to a file ip.txt, so what should I do? Should I retype the whole command again and redirect the output to a file? Well an easy solution is to use `UP` navigation key and add `'> ip.txt'` to redirect the output to a file as. - - $ ip addr show | grep inet | grep -v 'inet6'| grep -v '127.0.0.1' | awk '{print $2}' | cut -f1 -d/ > ip.txt - -Thanks to the life Savior `UP` navigation key here. Now consider the below condition, the next time I run below one-liner script. - - $ ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: - -As soon as I run script, the bash prompt returned an error with the message `“bash: ifconfig: command not found”`, It was not difficult for me to guess I run this command as user where it should be run as root. - -So what’s the solution? It is difficult to login to root and then type the whole command again! Also (UP Navigation Key) in last example didn’t came to rescue here. So? We need to call `“!!”` without quotes, which will call the last command for that user. - - $ su -c “!!” root - -Here su is switch user which is root, `-c` is to run the specific command as the user and the most important part `!!` will be replaced by command and last run command will be substituted here. Yeah! You need to provide root password. - -![The Power of !! Key](http://www.tecmint.com/wp-content/uploads/2015/05/7.gif) -The Power of !! Key - -I make use of `!!` mostly in following scenarios, - -1. When I run apt-get command as normal user, I usually get an error saying you don’t have permission to execute. - - $ apt-get upgrade && apt-get dist-upgrade - -Opps error…don’t worry execute below command to get it successful.. - - $ su -c !! - -Same way I do for, - - $ service apache2 start - or - $ /etc/init.d/apache2 start - or - $ systemctl start apache2 - -OOPS User not authorized to carry such task, so I run.. - - $ su -c 'service apache2 start' - or - $ su -c '/etc/init.d/apache2 start' - or - $ su -c 'systemctl start apache2' - -### 7. Run a command that affects all the file except ![FILE_NAME] ### - -The `!` (Logical NOT) can be used to run the command on all the files/extension except that is behind `'!'`. - -A. Remove all the files from a directory except the one the name of which is 2.txt. - - $ rm !(2.txt) - -B. Remove all the file type from the folder except the one the extension of which is ‘pdf‘. - - $ $ rm !(*.pdf) - -### 8. Check if a directory (say /home/avi/Tecmint)exist or not? Printf if the said directory exist or not. ### - -Here we will use `'! -d'` to validate if the directory exist or not followed by Logical AND Operator `(&&)` to print that directory does not exist and Logical OR Operator `(||)` to print the directory is present. - -Logic is, when the output of `[ ! -d /home/avi/Tecmint ]` is 0, it will execute what lies beyond Logical AND else it will go to Logical OR `(||)` and execute what lies beyond Logical OR. - - $ [ ! -d /home/avi/Tecmint ] && printf '\nno such /home/avi/Tecmint directory exist\n' || printf '\n/home/avi/Tecmint directory exist\n' - -### 9. Check if a directory exist or not? If not exit the command. ### - -Similar to the above condition, but here if the desired directory doesn’t exist it will exit the command. - - $ [ ! -d /home/avi/Tecmint ] && exit - -### 10. Create a directory (say test) in your home directory if it does not exist. ### - -A general implementation in Scripting Language where if the desired directory does not exist, it will create one. - - [ ! -d /home/avi/Tecmint ] && mkdir /home/avi/Tecmint - -That’s all for now. If you know or come across any other use of `'!'` which is worth knowing, you may like to provide us with your suggestion in the feedback. Keep connected! - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/mysterious-uses-of-symbol-or-operator-in-linux-commands/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/12-top-command-examples-in-linux/ diff --git a/translated/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md b/translated/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md new file mode 100644 index 0000000000..4225cf9bb4 --- /dev/null +++ b/translated/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md @@ -0,0 +1,193 @@ +10!Linux¾˺÷ +================================================================================ +`'!'`Linuxв񶨷ţʷ¼ȡ򲻼޸ĵִ֮ǰеѾBash Shellоȷеؼ顣ûԹ඼ڱShellСǽLinuxз`'!'`Ǿ˺÷ + +### 1. ʹִʷбһִ ### + +ҲûʶԴʷб֮ǰѾִеҳһСȣͨ"history"֮ǰš + + $ history + +![ʹhistoryҵִе](http://www.tecmint.com/wp-content/uploads/2015/05/history-Command.gif) + +ڣֻҪʹʷʾڸǰֱ磬һ`history`б1551 + + $ !1551 + +![ʹIDִе](http://www.tecmint.com/wp-content/uploads/2015/05/Run-Commands-By-number.gif) + +Ϊ1551[top][1]ˡͨIDִ֮ǰķʽãЩܳ¡ֻҪʹ**![history]**Ե + +### 2. ֮ǰĵڶ߸ ### + +һַʽ֮ǰִеͨʹ-1-2ڶ-7߸ȡ + +ʹhistoryִйбhistoryִкбҪΪͨȷû`rm command > file`ᵼΣյִеڰ˸ʮ + + $ history + $ !-6 + $ !-8 + $ !-10 + +![֮ͨǰִе](http://www.tecmint.com/wp-content/uploads/2015/05/3.gif) +֮ͨǰִе + +### 3. ݲԷµ ### + +Ҫʾ`/home/$USER/Binary/firefox`ļеݣִУ + + $ ls /home/$USER/Binary/firefox + +ʶӦִ'ls -l'鿴ĸļǿִļӦôҲҪҽҪµдIJƣ + + $ ls -l !$ + +`!$`ִеIJݵµС + +![һIJݸ](http://www.tecmint.com/wp-content/uploads/2015/05/4.gif) +һIJݸ + +### 4. ʹ!IJ ### + +˵洴һıļfile1.txt + + $ touch /home/avi/Desktop/1.txt + +Ȼcpʹþ·`/home/avi/Downloads` + + $ cp /home/avi/Desktop/1.txt /home/avi/downloads + +ڣǸcpһ`/home/avi/Desktop/1.txt`ڶ`/home/avi/Downloads`Ƿֱǣʹ`echo [arguments]`ӡͬIJ + + $ echo "1st Argument is : !^" + $ echo "2nd Argument is : !cp:2" + +עһʹ`"!^"`дӡͨ`"![]:[]"`ӡ + +Уһ`cp`ڶҲҪӡ`"!cp:2"`κxyzʱ5Ҫõĸʹ`"!xyz:4"`еIJͨ`"!*"`á + +![IJ](http://www.tecmint.com/wp-content/uploads/2015/05/5.gif) +IJ + +### 5. ԹؼΪִϸ ### + +ǿԹؼΪִϴִеԴ⣺ + + $ ls /home > /dev/null [1] + $ ls -l /home/avi/Desktop > /dev/null [2] + $ ls -la /home/avi/Downloads > /dev/null [3] + $ ls -lA /usr/bin > /dev/null [4] + +ʹͬlsвͬĿغͲͬIJļСңǻݵ`/dev/null`Dzδնɺܸɾ + +ԹؼΪִϸ + + $ ! ls [1] + $ ! ls -l [2] + $ ! ls -la [3] + $ ! ls -lA [4] + +淢ʹùؼ`ls`ִѾִй + +![ԹؼΪִ](http://www.tecmint.com/wp-content/uploads/2015/05/6.gif) +ԹؼΪִ + +### 6. !! ### + +ʹ`(!!)`/޸ϸеһЩ޸/ϸҸչʾһЩʵ龳 + +һнűҵ˽IPִˣ + + $ ip addr show | grep inet | grep -v 'inet6'| grep -v '127.0.0.1' | awk '{print $2}' | cut -f1 -d/ + +ţͻȻҪűضһip.txtļˣҸôأҸضһļôһ򵥵Ľʹϵ`'> ip.txt'`ضļ + + $ ip addr show | grep inet | grep -v 'inet6'| grep -v '127.0.0.1' | awk '{print $2}' | cut -f1 -d/ > ip.txt + +л"ϵ"ڣһнű + + $ ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: + +һűBashʾ㷵˴Ϣ`"bash: ifconfig: command not found"`ԭ򲢲Ѳ£˱ӦrootȨ޵е + +ԣôأǺrootû¼ٴμϵҲˡˣҪ`"!!"`ȥţΪǸûϸ + + $ su -c "!!" root + +suлrootûģ`-c`ijûضҪIJ`!!`滻ΪϴеԵģҪṩroot롣 + +![!!](http://www.tecmint.com/wp-content/uploads/2015/05/7.gif) +!! + +ͨ龰ʹ`!!` + +1.ͨûapt-getͨյʾ˵ûȨִС + + $ apt-get upgrade && apt-get dist-upgrade + +ðɣд󡣵ģʹɹִ... + + $ su -c !! + +ͬڣ + + $ service apache2 start + + $ /etc/init.d/apache2 start + + $ systemctl start apache2 + +ͨûȨִЩУ + + $ su -c 'service apache2 start' + + $ su -c '/etc/init.d/apache2 start' + + $ su -c 'systemctl start apache2' + +### 7.һӰг![FILE_NAME]ļ ### + +`!`߼ǣԳ`'!'`ļеļ/չִ + +A.ļƳļ2.txt⡣ + + $ rm !(2.txt) + +B.ļƳеļͣpdfͳ⡣ + + $ rm !(*.pdf) + +### 8.ijļУ/home/avi/TecmintǷڣӡ ### + +ʹ`'! -d'`֤ļǷڣļвʱʹAND`(&&)`дӡļдʱʹOR`(||)`дӡ + +߼ϣ`[ ! -d /home/avi/Tecmint ]`Ϊ0ʱִAND߼ݣִOR߼`(||)`ݡ + + $ [ ! -d /home/avi/Tecmint ] && printf '\nno such /home/avi/Tecmint directory exist\n' || printf '\n/home/avi/Tecmint directory exist\n' + +### 9.ijļǷڣ˳ ### + +ﵱļвʱ˳ + + $ [ ! -d /home/avi/Tecmint ] && exit + +### 10.homeļڲһļУȷ˵test򴴽 ### + +ǽűеһõʵ֣ļвʱһ + + [ ! -d /home/avi/Tecmint ] && mkdir /home/avi/Tecmint + +ȫˡ֪żֵ˽`'!'`ʹ÷ڷĵطὨ顣ϵ + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/mysterious-uses-of-symbol-or-operator-in-linux-commands/ + +ߣ[Avishek Kumar][a] +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/12-top-command-examples-in-linux/ From 0b16f7d34e121d6f8f316a4d050215e74cdceef9 Mon Sep 17 00:00:00 2001 From: wwy Date: Mon, 25 May 2015 20:43:55 +0800 Subject: [PATCH 0954/2517] [Translating] 20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md --- ...50521 Will Ubuntu Linux Hit 200 Million Users This Year.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md b/sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md index 2b0318375b..8a79781a22 100644 --- a/sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md +++ b/sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md @@ -1,3 +1,5 @@ +translating by wwy-hust + Will Ubuntu Linux Hit 200 Million Users This Year? ================================================================================ It's been four years and two weeks since Mark Shuttleworth expressed his goal of "200 million users of Ubuntu in 4 years." While Ubuntu's presence has continued to increase over the past four years, it doesn't look like that goal has been realized yet or will be by the end of the calendar year. @@ -35,4 +37,4 @@ via: http://www.phoronix.com/scan.php?page=news_item&px=2015-200-Million-Goal-Re [4]:http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-Calculator-Reboot [5]:http://www.phoronix.com/scan.php?page=news_item&px=MTgzOTM [6]:http://www.phoronix.com/scan.php?page=news_item&px=MTA5ODM -[7]:https://www.phoronix.com/scan.php?page=news_item&px=Nzg1Mw \ No newline at end of file +[7]:https://www.phoronix.com/scan.php?page=news_item&px=Nzg1Mw From 4d355a85012d9559436aab47d39c744ab76d40c2 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Mon, 25 May 2015 21:36:45 +0800 Subject: [PATCH 0955/2517] [Translated]20150320 Sleuth Kit -- Open Source Forensic Tool to Analyze Disk Images and Recover Files.md --- ...o Analyze Disk Images and Recover Files.md | 161 ------------------ ...o Analyze Disk Images and Recover Files.md | 159 +++++++++++++++++ 2 files changed, 159 insertions(+), 161 deletions(-) delete mode 100644 sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md create mode 100644 translated/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md diff --git a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md b/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md deleted file mode 100644 index b3acf5f00e..0000000000 --- a/sources/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md +++ /dev/null @@ -1,161 +0,0 @@ -FSSlc Translating - -Sleuth Kit - Open Source Forensic Tool to Analyze Disk Images and Recover Files -================================================================================ -SIFT is a Ubuntu based forensics distribution provided by SANS Inc. It consist of many forensics tools such as Sleuth kit / Autopsy etc . However, Sleuth kit/Autopsy tools can be installed on Ubuntu/Fedora distribution instead of downloading complete distribution of SIFT. - -Sleuth Kit /Autopsy is open source digital forensics investigation tool which is used for recovering the lost files from disk image and analysis of images for incident response. Autopsy tool is a web interface of sleuth kit which supports all features of sleuth kit. This tool is available for both Windows and Linux Platforms. - -### Install Sleuth kit ### - -First of all, download Sleuth kit software from [sleuthkit][1] website. Use wget command to download it in terminal which is shown in the figure. - - # wget http://cznic.dl.sourceforge.net/project/sleuthkit/sleuthkit/4.1.3/sleuthkit-4.1.3.tar.gz - -![Download Sleuth Kit](http://blog.linoxide.com/wp-content/uploads/2015/03/download-sleuthkeit.png) - -Extract the sleuthkit-4.1.3.tar.gz using following command and go inside the extracted directory - - # tar -xvzf sleuthkit-4.1.3.tar.gz - -![Extraction Process](http://blog.linoxide.com/wp-content/uploads/2015/03/extract.png) - -Run following command which perform the requirement check before sleuth kit installation - - #./configure - -![configure](http://blog.linoxide.com/wp-content/uploads/2015/03/configure.png) - -Make command compile the sleuth kit code. - - #make - -![make](http://blog.linoxide.com/wp-content/uploads/2015/03/make.png) - -Finally following command install it under **/usr/local** path. - - #make install - -![make install](http://blog.linoxide.com/wp-content/uploads/2015/03/make-install.png) - -### Install Autopsy Tool ### - -Sleuth kit installation is complete and now we will install autopsy interface. Download Autopsy software from [sleuthkit's autopsy page][2] . Use wget command to download it in terminal which is shown in the figure. - - # wget http://kaz.dl.sourceforge.net/project/autopsy/autopsy/2.24/autopsy-2.24.tar.gz - -![Autpsy download link](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy.png) - -Extract the autopsy-2.24.tar.gz using following command and go inside the extracted directory - - # tar -xvzf autopsy-2.24.tar.gz - -![Autopsy Extraction](http://blog.linoxide.com/wp-content/uploads/2015/03/Autopsy-extraction.png) - -Configuration script of autopsy asks for NSRL (National Software Reference Library) and path of **Evidence_Locker** folder. - -Enter "n" for NSRL prompt and create Evidence_Locker folder under **/usr/local** directory. Autopsy stores the configuration files, audit logs and output under Evidence_Locker folder. - - #mkdir /usr/local/Evidence_Locker - - #cd autopsy-2.24 - - #./configure - -![Autopsy Configuration Script](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy-configuration.png) - -After adding Evidence_Locker path in installation process , autopsy stores configuration files in it and shows a following message to run the autopsy program. - -![Start Autopsy](http://blog.linoxide.com/wp-content/uploads/2015/03/start-autopsy.png) - -Type **./autopsy** command in terminal to start the graphical interface of Sleuth kit tool. - -![Autopsy Started](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy-started.png) - -Type following address in the web browser to access the interface of autopsy . - - http://localhost:9999/autopsy - -Main web page of autopsy plugin is shown int the following figure. - -![Main Page](http://blog.linoxide.com/wp-content/uploads/2015/03/main-interface.png) - -Click on the **New Case** button to start analysis in autopsy tool. Enter the case name, description about the investigation and name of agent which is shown in the following figure. - -![create new case](http://blog.linoxide.com/wp-content/uploads/2015/03/create-new-case1.png) - -Following web page will appear after entering the details in the above page. Click on **Add Host** button to add details for the analyst machine. - -![add host](http://blog.linoxide.com/wp-content/uploads/2015/03/add-host1.png) - -Enter host name, description and time zone setting of analyst machine on the next page. - -![add host-detial](http://blog.linoxide.com/wp-content/uploads/2015/03/add-host-detial.png) - -Click on the **Add Image** button to add image file for forensics analysis. - -![add image](http://blog.linoxide.com/wp-content/uploads/2015/03/add-image.png) - -Click on the **Add Image File** button on the following web page. It opens new web page which require Path of image file and select type & importing method. - -![Add image file](http://blog.linoxide.com/wp-content/uploads/2015/03/Add-image-file.png) - -As shown in the following figure, we have entered path of Linux image file. In our case, image file is partition of disk. - -![add image parition](http://blog.linoxide.com/wp-content/uploads/2015/03/add-image-parition.png) - -Click on the next button and select **Calculate hash** option in the next page which is shown in the following figure. It also detect the file system type of the given image. - -![image and file system detail](http://blog.linoxide.com/wp-content/uploads/2015/03/image-and-file-system-detail.png) - -Following window shows the MD5 hash of the image file before static analysis . - -![hash](http://blog.linoxide.com/wp-content/uploads/2015/03/hash1.png) - -On the next web page, autopsy shows following information about the image file. - -- mount point for the image -- name of image -- file system type of given image - -Click on the **details** button to get more information about the given image file. It also offer extraction of unallocated fragments and strings from the volume of image file which is shown in the following figure. - -![Image detail](http://blog.linoxide.com/wp-content/uploads/2015/03/image-details.png) - -Click on **Analyze** button which is shown in the below figure to start analysis on given image . It opens another page which shows the multiple options for image analysis. - -![analysis](http://blog.linoxide.com/wp-content/uploads/2015/03/analysis1.png) - -Autopsy offer following features during image analysis process. - -- File Analysis -- Keyword Search -- File Type -- Image Details -- Data Unit - -File Analysis on given image of Linux partition is shown in the following figure. - -![Analysis of image](http://blog.linoxide.com/wp-content/uploads/2015/03/Analysis-of-image.png) - -It extracts all files and folders from the given image . Extraction of deleted files are shown int he figure. - -![Deleted Files](http://blog.linoxide.com/wp-content/uploads/2015/03/deleted.png) - -### Conclusion ### - -Hopefully this article will be useful for the beginner in static forensics analysis of disk image. Autopsy is web interface for sleuth kit which provides features such as extraction of strings , recovery of deleted files, timeline analysis, extraction of web surfing history, keyword search and email analysis on windows and linux disk images. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/autopsy-sleuth-kit-installation-ubuntu/ - -作者:[nido][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/naveeda/ -[1]:http://www.sleuthkit.org/sleuthkit/download.php -[2]:http://www.sleuthkit.org/autopsy/download.php diff --git a/translated/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md b/translated/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md new file mode 100644 index 0000000000..e86a8f3c10 --- /dev/null +++ b/translated/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md @@ -0,0 +1,159 @@ +Sleuth Kit -- 一个用来分析磁盘映像和恢复文件的开源取证工具 +================================================================================ +SIFT 是一个由 SANS 公司提供的基于 Ubuntu 的取证发行版本。它包含许多取证工具,如 Sleuth kit/Autopsy 。但 Sleuth kit / Autopsy 可以直接在 Ubuntu 或 Fedora 发行版本上直接安装,而不必下载 SIFT 的整个发行版本。 + +Sleuth Kit/Autopsy 是一个开源的电子取证调查工具,它被用于从磁盘映像中恢复丢失的文件,基于事件响应的磁盘映像的分析。 Autopsy 工具是 sleuth kit 的一个网页接口,支持 sleuth kit 的所有功能。这个工具在 Windows 和 Linux 平台下都可获取到。 + +### 安装 Sleuth kit ### + +首先,从 [sleuthkit][1] 的网站下载 Sleuth kit 软件。使用下面的命令在虚拟终端下使用 wget 命令来下载它,下图展示了这个过程。 + + # wget http://cznic.dl.sourceforge.net/project/sleuthkit/sleuthkit/4.1.3/sleuthkit-4.1.3.tar.gz + +![下载 Sleuth Kit](http://blog.linoxide.com/wp-content/uploads/2015/03/download-sleuthkeit.png) + +使用下面的命令解压 sleuthkit-4.1.3.tar.gz 并进入解压后的目录: + + # tar -xvzf sleuthkit-4.1.3.tar.gz + +![解压过程](http://blog.linoxide.com/wp-content/uploads/2015/03/extract.png) + +在安装 sleuth kit 之前,运行下面的命令来执行所需的检查: + + #./configure + +![configure](http://blog.linoxide.com/wp-content/uploads/2015/03/configure.png) + +然后使用 Make 命令来编译 sleuth kit : + + #make + +![make](http://blog.linoxide.com/wp-content/uploads/2015/03/make.png) + +最后,使用下面的命令将它安装到 **/usr/local** 目录下: + + #make install + +![make install](http://blog.linoxide.com/wp-content/uploads/2015/03/make-install.png) + +### 安装 Autopsy 工具 ### + +Sleuth kit 已经安装完毕,现在我们将为它安装 autopsy 界面。从 [sleuthkit 的 autopsy 页面][2] 下载 Autopsy 软件。使用下面的命令在虚拟终端下使用 wget 命令来下载它,下图展示了这个过程。 + + # wget http://kaz.dl.sourceforge.net/project/autopsy/autopsy/2.24/autopsy-2.24.tar.gz + +![Autpsy 的下载链接](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy.png) + +使用下面的命令解压 autopsy-2.24.tar.gz 并进入解压后的目录: + + # tar -xvzf autopsy-2.24.tar.gz + +![Autopsy 的解压](http://blog.linoxide.com/wp-content/uploads/2015/03/Autopsy-extraction.png) + +autopsy 的配置脚本将询问 NSRL (National Software Reference Library) 和 **Evidence_Locker** 文件夹的路径。 + +当弹窗问及 NSRL 时,输入 "n",并在 **/usr/local** 目录下创建名为 Evidence_Locker 的文件夹。Autopsy 将在 Evidence_Locker 文件夹下存储配置文件,审计记录和输出文件。 + + #mkdir /usr/local/Evidence_Locker + + #cd autopsy-2.24 + + #./configure + +![Autopsy 配置脚本](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy-configuration.png) + +在安装过程中添加完 Evidence_Locker 的安装路径后, autopsy 在那里存储配置文件并展现如下的信息来运行 autopsy 程序。 + +![启动 Autopsy](http://blog.linoxide.com/wp-content/uploads/2015/03/start-autopsy.png) + +在虚拟终端中键入 **./autopsy** 命令来启动 Sleuth kit 工具的图形界面: + +![Autopsy](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy-started.png) + +在浏览器中键入下面的地址来获取 autopsy 的界面: + + http://localhost:9999/autopsy + +下图展现了 autopsy 插件的主页面: + +![主页](http://blog.linoxide.com/wp-content/uploads/2015/03/main-interface.png) + +在 autopsy 工具中,点击 **新案例** 按钮来开始进行分析。键入案例名称,此次调查的描述和检查人的姓名,下图有具体的展示: + +![创建新事件](http://blog.linoxide.com/wp-content/uploads/2015/03/create-new-case1.png) + +在接下来的网页中,将展示在上一个的网页中键入的详细信息。接着点击 **增加主机** 按钮来添加有关要分析的机器的详细信息。 + +![增加主机](http://blog.linoxide.com/wp-content/uploads/2015/03/add-host1.png) + +在下一个网页中键入主机名,相关的描述和要分析的机器的时区设置。 + +![添加主机的详细信息](http://blog.linoxide.com/wp-content/uploads/2015/03/add-host-detial.png) + +点击 **增加映像** 按钮来为取证分析添加映像文件。 + +![添加映像](http://blog.linoxide.com/wp-content/uploads/2015/03/add-image.png) + +在接下来的网页中点击 **增加映像文件** 按钮。它将打开一个新的网页,来询问映像文件的路径和选择映像的类型以及导入的方法。 + +![添加映像文件](http://blog.linoxide.com/wp-content/uploads/2015/03/Add-image-file.png) + +正如下图中展示的那样,我们已经键入了 Linux 映像文件的路径。在我们这个例子中,映像文件是磁盘的分区。 + +![添加映像分区](http://blog.linoxide.com/wp-content/uploads/2015/03/add-image-parition.png) + +点击 下一步 按钮并在下一页中选择 **计算散列值** 的选项,这在下图中有展示。它也将检测所给映像的文件系统类型。 + +![映像和文件系统详情](http://blog.linoxide.com/wp-content/uploads/2015/03/image-and-file-system-detail.png) + +下面的图片展示了静态分析之前映像文件的 MD5 散列值。 + +![散列值](http://blog.linoxide.com/wp-content/uploads/2015/03/hash1.png) + +在下一个网页中, autopsy 展现了有关映像文件的如下信息: + +- 映像的挂载点 +- 映像的名称 +- 所给映像的文件系统类型 + +点击 **详情** 按钮来获取更多有关所给映像文件的信息。它还提供了从映像文件的卷中导出未分配的片段和字符串的数据信息,这在下图中有展现。 + +![映像的详细信息](http://blog.linoxide.com/wp-content/uploads/2015/03/image-details.png) + +在下图中那样,点击 **分析** 按钮来开始分析所给映像。它将开启另一个页面,其中包含了映像分析的多个选项。 + +![分析](http://blog.linoxide.com/wp-content/uploads/2015/03/analysis1.png) + +在映像分析过程中,Autopsy 提供了如下的功能: + +- 文件分析 +- 关键字搜索 +- 文件类型 +- 映像详情 +- 数据单元 + +下图展示的是在给定的 Linux 分区映像上进行文件分析: + +![映像的分析](http://blog.linoxide.com/wp-content/uploads/2015/03/Analysis-of-image.png) + +它将从所给映像中提取所有的文件和文件夹。在下图中也展示了已被删除的文件的提取: + +![已被删除的文件](http://blog.linoxide.com/wp-content/uploads/2015/03/deleted.png) + +### 结论 ### + +希望这篇文章能够给那些进入磁盘映像的静态分析领域的新手提供帮助。Autopsy 是 sleuth kit 的网页界面,提供了在 Windows 和 Linux 磁盘映像中进行诸如字符串提取,恢复被删文件,时间线分析,网络浏览历史,关键字搜索和邮件分析等功能。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/autopsy-sleuth-kit-installation-ubuntu/ + +作者:[nido][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/naveeda/ +[1]:http://www.sleuthkit.org/sleuthkit/download.php +[2]:http://www.sleuthkit.org/autopsy/download.php \ No newline at end of file From afe8c9fb4fe45674396c9e2714487c291a59e1ca Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 May 2015 22:21:03 +0800 Subject: [PATCH 0956/2517] PUB:20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops @wwy-hust --- ...A Drop-Down Terminal for Gnome Desktops.md | 121 ++++++++++++++++++ ...A Drop-Down Terminal for Gnome Desktops.md | 115 ----------------- 2 files changed, 121 insertions(+), 115 deletions(-) create mode 100644 published/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md delete mode 100644 translated/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md diff --git a/published/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md b/published/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md new file mode 100644 index 0000000000..421bc00a0b --- /dev/null +++ b/published/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md @@ -0,0 +1,121 @@ +一个用于Gnome桌面的下拉式终端: Guake 0.7.0 发布 +================================================================================ +Linux的命令行是最好、最强大的东西,它使新手着迷,并为老手和极客的提供极其强大的功能。那些在服务器和生产环境下工作的人早已认识到了这个事实。有趣的是,Linux终端是Linus Torvald在1991年写内核时实现的第一批功能之一。 + +终端是个强大的工具,由于它没有什么可调整的部分,所以十分可靠。终端介于控制台环境和GUI环境之间。终端自身作为一个GUI程序,运行在桌面环境下。有许多终端是适用于特定的桌面环境的,其它的则是通用的。Terminator, Konsole, Gnome-Terminal, Terminology, XFCE terminal, xterm都是些常用的终端模拟器。 + +您可以从下面的链接中获得一份使用最广泛的终端模拟器的列表。 + +- [20 Useful Terminals for Linux][1] + +前几日上网时,我偶遇了名为‘Guake’的终端程序,它是用于gnome的终端模拟器。尽管这并不是我第一次听到Guake。实际上,我在大约一年前便知道了这个应用程序,但不知怎么搞的,我那时没有写写Guake,再后来我便渐渐忘掉了Guake,直到我再一次听到Guake。所以,最终,这篇文章诞生了。我将给你讲讲Guake的功能,在Debian、Ubuntu、Fedora上的安装过程以及一些测试。 + +#### 什么是Guake? #### + +Guake是应用于Gnome环境的下拉式终端。主要由Python编写,使用了一些C,它以GPL2+许可证发布,适用于Linux以及类似的系统。Guake的灵感来源于电脑游戏Quake(雷神之锤)中的终端,Quake的终端能通过按下特定按键(默认为F12)从屏幕上滑下来,并在按下同样的键后滑上去。 + +值得注意的是,Guake并不是第一个这样的应用。Yakuake(Yet Another Kuake)是一个运行于KDE的终端模拟器,Tilda是一个用GTK+写成的终端模拟器。它们的灵感都来自于雷神之锤那上下滑动的终端。 + +#### Guake的功能 #### + +- 轻量级 +- 简单而优雅 +- 功能众多 +- 强大 +- 美观 +- 将终端平滑地集成于GUI中 +- 在按下预定义的键后出现/消失 +- 支持热键、标签、透明化背景,这使得它适合所有Gnome用户 +- 可配置各种方面 +- 包括许多颜色的调色板 +- 设定透明度的快捷方式 +- 通过Guake配置,可在启动时运行一个脚本 +- 可以在多个显示器上运行 + +Guake 0.7.0最近发布,它带来了一些修正以及上面提到的一些功能。完整的版本历史和源代码包可以在[这里][2]找到。 + +### 在Linux中安装Guake终端 ### + +如果您对从源码编译Guake感兴趣,您可以从上面的链接处下载Guake,并在安装前进行编译。 + +然而Guake可以在许多的发行版中通过添加额外的仓库来安装。这里,我们将在Debian、Ubuntu、Linux Mint和Fedora下安装Guake。 + +首先从仓库获取最新的软件包列表,并从默认的仓库安装Guake,如下所示: + + ---------------- 在 Debian, Ubuntu 和 Linux Mint 上 ---------------- + $ sudo apt-get update + $ apt-get install guake + +---------- + + ---------------- 在 Fedora 19 及其以后版本 ---------------- + # yum update + # yum install guake + +安装后,可以从另一个终端中启动Guake: + + $ guake + +在启动它后,便可以在Gnome桌面中使用F12(默认配置)来拉下、收回终端。 + +看起来非常漂亮,尤其是透明背景。滑下来...滑上去...滑下来...滑上去...执行命令,打开另一个标签,执行命令,滑上去...滑下来...(作者已沉迷其中) + +![Guake Terminal in Action](http://www.tecmint.com/wp-content/uploads/2015/05/Guake.png) + +*Guake实战* + +如果您的壁纸或活动窗口的颜色和Guake的颜色有些不搭。您可以改变您的壁纸,减少透明度或者改变Guake的颜色。 + +下一步便是进入Guake的配置,根据每个人的需求修改设置。可以通过应用菜单或者下面的命令来运行Guake的配置。 + + $ guake --preferences + +![Guake Terminal Properties](http://www.tecmint.com/wp-content/uploads/2015/05/Guake-Properties.png) + +*Guake终端配置* + +设置滚动 + +![Guake Scrolling Settings](http://www.tecmint.com/wp-content/uploads/2015/05/Guake-Scrolling.png) + +*Guake滚动配置* + +外观设置 - 在这里您可以修改文字颜色和背景色以及透明度。 + +![Appearance Properties](http://www.tecmint.com/wp-content/uploads/2015/05/Appearance-Properties.png) + +*外观设置* + +键盘快捷键 - 在这里您可以修改Guake显示的开关快捷键。 + +![Keyboard Shortcuts](http://www.tecmint.com/wp-content/uploads/2015/05/Keyboard-Shortcuts.png) + +*键盘快捷键* + +兼容性设置 - 基本上不必设置它。 + +![Compatibility Setting](http://www.tecmint.com/wp-content/uploads/2015/05/Compatibility-Setting.png) + +*兼容性设置* + +### 结论 ### + +这个项目即不是太年轻也不是太古老,因此它已经达到了一定的成熟度,足够可靠,可以开箱即用。像我这样需要在GUI和终端间频繁切换的人来说,Guake是一个福利。我不需要管理一个多余的窗口,频繁的打开和关闭,使用tab在大量打开的应用程序中寻找终端或切换到不同的工作区来管理终端,现在我需要的只有F12。 + +我认为对任何同时使用GUI和终端的Linux用户来说,Guake都是必须的工具。同样的,我会向任何想要在系统中结合使用GUI和终端的人推荐它,因为它既平滑又没有任何障碍。 + +上面就是我要说的全部了。如果在安装和使用时有任何问题,请告诉我,我们会帮助您。也请您告诉我您使用Guake的经验。在下面的评论区反馈您宝贵的经验。点赞和分享以帮助我们宣传。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-guake-terminal-ubuntu-mint-fedora/ + +作者:[Avishek Kumar][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/linux-terminal-emulators/ +[2]:https://github.com/Guake/guake/releases/tag/0.7.0 diff --git a/translated/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md b/translated/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md deleted file mode 100644 index a4a3609cf0..0000000000 --- a/translated/share/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md +++ /dev/null @@ -1,115 +0,0 @@ -Guake 0.7.0 ѷ - һGnomeʽն -================================================================================ -LinuxáǿĶʹԣΪֺͼ͵ṩǿĹܡЩڷ¹ʶʵȤǣLinuxնLinus Torvald1991дںʱʵֵĵһ֮һ - -նǸǿĹߣûпƶIJ֣ʮֿɿն˽ڿ̨GUI֮䡣նΪһGUI滷¡նض滷ģͨõġTerminator, Konsole, Gnome-Terminal, Terminology, XFCE terminal, xtermЩõնģ - -Դлһʹ㷺նģб - -- [20 Useful Terminals for Linux][1] - -ǰʱżΪGuakegnomeնģⲢҵһGuakeʵϣڴԼһǰ֪Ӧó򣬵֪ôģʱûддGuakeٺұ㽥GuakeֱһGuakeԣգƪµˡҽ㽲GuakeĹܣDebianUbuntuFedoraϵİװԼһЩԡ - -#### ʲôGuake #### - -GuakeӦGnomeʽնˡҪPythonдʹһЩCGPL2+֤鷢LinuxԼƵϵͳGuakeԴڵϷQuake֮նˣQuakeնͨضĬΪF12Ļϻڰͬļȥ - -ֵעǣGuakeǵһӦáYakuakeYet Another KuakeһKDEնģTildaһGTK+дɵնģǵж֮»նˡ - -#### GuakeĹ #### - -- -- 򵥶 -- ڶ๦ -- ǿ -- ÿ -- ƽļGUI -- ڰԤļ/ʧ -- ֧ȼǩ͸ʹʺGnomeû -- ˵ؿ -- ɫĵɫ -- 趨͸ȵĿݷʽ -- ͨGuakeãʱһű -- ڶ - -Guake 0.7.0һЩԼᵽһЩܡİ汾ʷԴ[][2]ҵ - -### LinuxаװGuakeն ### - -ԴԴGuakeȤԴӴGuakeڰװǰб롣 - -ȻGuakeķаͨӶIJֿװǽDebianUbuntuLinux MintFedora°װGuake - -ȴӲֿȡµбĬϵIJֿⰲװGuakeʾ - - ---------------- On Debian, Ubuntu and Linux Mint ---------------- - $ sudo apt-get update - $ apt-get install guake - ----------- - - ---------------- On Fedora 19 Onwards ---------------- - # yum update - # yum install guake - -װ󣬿ԴһնGuake - - $ guake - -󣬱GnomeʹF12Ĭã»ϻնˡ - -dzƯ͸...ȥ......ȥ...ִһǩִȥ......ѳУ - -![Guake Terminal in Action](http://www.tecmint.com/wp-content/uploads/2015/05/Guake.png) -Guakeʵս - -ıֽڵɫGuakeɫЩԸııֽ͸Ȼ߸ıGuakeɫ - -һǽGuakeãÿ˵޸áͨӦò˵Guakeá - - $ guake --preferences - -![Guake Terminal Properties](http://www.tecmint.com/wp-content/uploads/2015/05/Guake-Properties.png) -Guakeն - - - -![Guake Scrolling Settings](http://www.tecmint.com/wp-content/uploads/2015/05/Guake-Scrolling.png) -Guake - - - ޸ɫͱɫԼ͸ȡ - -![Appearance Properties](http://www.tecmint.com/wp-content/uploads/2015/05/Appearance-Properties.png) - - -̿ݼ - ޸GuakeʾĿؿݼ - -![Keyboard Shortcuts](http://www.tecmint.com/wp-content/uploads/2015/05/Keyboard-Shortcuts.png) -̿ݼ - - - ϲ - -![Compatibility Setting](http://www.tecmint.com/wp-content/uploads/2015/05/Compatibility-Setting.png) - - -### ### - -Ŀ̫Ҳ̫ϣѾﵽһijȣ㹻ɿԿ伴áҪGUIն˼Ƶл˵GuakeһҲҪһĴڣƵĴ򿪺͹رգʹtabڴ򿪵ӦóѰն˻лͬĹնˣҪֻF12 - -ΪκͬʱʹGUIն˵Linuxû˵GuakeDZĹߡͬģһκҪϵͳнʹGUIն˵ƼΪƽûκϰ - -Ҫ˵ȫˡڰװʹʱκ⣬ңǻҲʹGuakeľ顣ľ顣޺ͷ԰ - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-guake-terminal-ubuntu-mint-fedora/ - -ߣ[Avishek Kumar][a] -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/linux-terminal-emulators/ -[2]:https://github.com/Guake/guake/releases/tag/0.7.0 From c0fefa23ccd4af616c87a98ba9cb0a40b57211c2 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 May 2015 22:24:58 +0800 Subject: [PATCH 0957/2517] PUB:20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory' @ictlyh --- ...security or pam_modules.h--No such file or directory'.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md (80%) diff --git a/translated/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md b/published/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md similarity index 80% rename from translated/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md rename to published/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md index 0e2d0ab54c..6ede2366a8 100644 --- a/translated/tech/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md +++ b/published/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md @@ -1,6 +1,6 @@ -Linux 有问必答--如何修复 “fatal error: security/pam_modules.h: No such file or directory” +如何修复 “fatal error: security/pam_modules.h: No such file or directory” ================================================================================ -> **问题**: 我尝试在 [插入你的 Linux 发行版] 上编译程序,但是出现下面的编译错误: +> **问题**: 我尝试在 [某某 Linux 发行版] 上编译程序,但是出现下面的编译错误: > > "pam_otpw.c:27:34: fatal error: security/pam_modules.h: No such file or directory" > @@ -26,7 +26,7 @@ via: http://ask.xmodulo.com/fatal-error-security-pam-modules.html 作者:[Dan Nanni][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 72cc509ec16646d65506b8228bef49c4facaded7 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 May 2015 23:39:50 +0800 Subject: [PATCH 0958/2517] PUB:20150407 How To Install CentOS Web Panel In CentOS @wi-cuckoo --- ...w To Install CentOS Web Panel In CentOS.md | 146 +++++++++--------- 1 file changed, 71 insertions(+), 75 deletions(-) rename {translated/tech => published}/20150407 How To Install CentOS Web Panel In CentOS.md (61%) diff --git a/translated/tech/20150407 How To Install CentOS Web Panel In CentOS.md b/published/20150407 How To Install CentOS Web Panel In CentOS.md similarity index 61% rename from translated/tech/20150407 How To Install CentOS Web Panel In CentOS.md rename to published/20150407 How To Install CentOS Web Panel In CentOS.md index b3d5e2588f..fe038b4406 100644 --- a/translated/tech/20150407 How To Install CentOS Web Panel In CentOS.md +++ b/published/20150407 How To Install CentOS Web Panel In CentOS.md @@ -1,62 +1,61 @@ -如何在CentOS上面安装CentOS网页面板 +如何在CentOS上面安装“CentOS网页面板” =========================================================================== ![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/04/centos-790x427.jpg) ### 关于CentOS网页面板 ### -目前有很多免费的或者付费的控制面板。今天,我们来讨论[CentOS网页面板(CWP)][1],这是特别为基于如CentOS,RHEL,科研用Linux系统等发行版的RPM设计的。**CWP** 是免费且开源的控制面板,可以被广泛用于简单地配置一个网页集群环境。不同于其他的控制面板,CWP是自动用高速缓存来配置LAMP的栈区。 +目前有很多免费的或者付费的控制面板。今天,我们来讨论[CentOS网页面板(CWP)][1],这是特别为基于RPM 的发行版,如CentOS,RHEL,Scientific Linux等设计的。**CWP** 是免费且开源的控制面板,可以被广泛用于简单地配置一个网页托管环境。不同于其他的控制面板,CWP能自动部署LAMP的软件栈及Varnish 缓存服务器。 ### 特性 ### -CWP有很多的特性和免费的服务。如我前面提到的一样,CWP自动在你的服务器上安装全套LAMP服务(apache,php,phpmyadmin,webmail,mailserver等等)。 +CWP有很多的特性和免费的服务。如我前面提到的一样,CWP会在你的服务器上自动安装全套的LAMP服务(apache,php,phpmyadmin,webmail,mailserver等等)。 ### CWP安装过程中会安装和配置的软件列表 ### -- Apache Web Server +- Apache 网页服务器 - PHP 5.4 - MySQL + phpMyAdmin - Postfix + Dovecot + roundcube webmail -- CSF Firewall -- File System Lock (no more website hacking, all your files are locked from changes) -- Backups; AutoFixer for server configuration +- CSF 防火墙 +- File System Lock (不需要修改网站,你的所有文件都会被锁定修改) +- Backups; AutoFixer ,用于服务器配置 ### 第三方应用: ### - - CloudLinux + CageFS + PHP Selector -- Softaculous – Script Installer (Free and Premium) +- Softaculous – 脚本安装器 (免费版和白金版) #### 网页服务器: #### -- Varnish Cache server -- Compiles Apache from source -- Apache reCompiler + Additional modules -- Apache server status, configuration -- Edit apache vhosts, vhosts templates, include configuration -- Rebuild all apache Virtual hosts +- Varnish 缓存服务器 +- 从代码编译 Apache +- Apache 重新编译+附加模块 +- Apache 服务器状态,配置 +- 编辑 Apache 虚拟主机、虚拟主机模版,包括配置 +- 重建所有 Apache 虚拟主机 - suPHP & suExec -- Mod Security + OWASP rules -- Tomcat 8 server management -- DoS protection -- Perl cgi script support +- Mod Security + OWASP 规则 +- Tomcat 8 服务器管理 +- DoS 防护 +- Perl cgi 脚本支持 #### PHP: #### -- PHP 切换器 (在PHP版本如: 5.2, 5.3, 5.4, 5.5之间切换) -- PHP选择器选择每个用户或者每个文件的PHP版本(PHP 4.4, 5.2, 5.3, 5.4, 5.5, 5.6) -- 简单的php编辑软件 +- PHP 切换器 (在PHP版本如: 5.2、 5.3、 5.4、 5.5之间切换) +- PHP选择器,选择每个用户或者每个文件的PHP版本(PHP 4.4、 5.2、 5.3、 5.4、5.5、 5.6) +- 简单的php编辑器 - 在用户面板下简单的php.ini生成器 - PHP 插件 -- PHP.ini editor & PHP info & List modules +- PHP.ini 编辑器 & PHP 信息 和列出模块 - 每个帐号一个php.ini -- FFMPEG,用于视频流网站 +- FFMPEG,用于视频流网站 - CloudLinux + PHP 选择器 #### 用户管理 #### -- 添加,列举,编辑和移除用户 +- 添加、列出、编辑和移除用户 - 用户监管 -- Shell接入管理 +- Shell访问管理 - 用户限制管理 - 限制进程 - 限制访问文件 @@ -67,85 +66,85 @@ CWP有很多的特性和免费的服务。如我前面提到的一样,CWP自 #### DNS: #### - FreeDNS -- 添加,编辑,列举和移除DNS区块 +- 添加、编辑、列出和移除DNS区块 - 编辑域名服务的IP - DNS区块模板编辑器 - 新的易用DNS区块管理器 (用ajax) -- 新的DNS区块列表,带有额外的修复信息 (同时检测 rDNS, 域名服务….) +- 新的DNS区块列表,带有额外的google解析信息 (同时检测 rDNS, 域名服务…) #### Email: #### - Postfix & dovecot -- MailBoxes, Alias +- 邮箱、别名 - Roundcube webmail -- Postfix Mail queue -- rDNS Checker Module +- Postfix 邮件队列 +- rDNS 检查器模块 - 垃圾邮件拦截 - SPF & DKIM集成 -- Re-Build Postfix/Dovecot Mail server with AntiVirus, AntiSpam Protection -- Email Auto Responder +- 重构带有反病毒、反垃圾邮件防护的 Postfix/Dovecot 的邮件服务器 +- Email 自动应答器 #### 系统: #### - CPU核心和时钟信息 - 内存使用信息 - 详细的磁盘状态 -- 软件信息如内核版本,正常运行时间等等. +- 软件信息如内核版本、正常运行时间等等. - 服务器状态 -- 检查配置管理 +- ChkConfig管理 - 网络端口使用 - 网络配置 -- SSHD配置 +- sshd 配置 - 自动修复(检查重要的配置并尝试自动修复问题) #### 监控: #### -- 监控服务 eg. top, apache stats, mysql etc. -- 在面板内使用Java SSH Terminal/Console -- 服务器配置 (eg. Apache, PHP, MySQL etc) +- 监控服务,例如 top、 apache 状态、 mysql 等 +- 在面板内使用Java SSH 终端/控制台 +- 服务器配置 (例如 Apache、 PHP、 MySQL 等) - 在屏幕/后台运行命令行 #### 安全: #### - CSF防火墙 -- SSL产生器 +- SSL生成器 - SSL证书管理 - CloudLinux + CageFS #### SQL: #### - MySQL 数据库管理 -- 添加本地或者远程接入用户 +- 添加本地或者远程访问的用户 - 实时监控MySQL进程列表 - 创建,移除数据库 - 为每个数据库添加额外的用户 - MySQL服务器配置 -- PhpMyAdmin(这个不知道要不要译过来) +- PhpMyAdmin - PostgreSQL, phpPgAdmin支持 #### 额外功能: #### -- 语言通话3 管理 -- 网络电台管理 +- TeamSpeak 3 管理器 +- Shoutcast 管理器 - 自动更新 -- 备份管理 -- 文件管理 +- 备份管理器 +- 文件管理器 - 每个域名的虚拟FTP用户 -- 控制面板帐号移植 (恢复文件,数据库和数据库用户) -- 还有更多. +- cPanel帐号迁移 (恢复文件,数据库和数据库用户) +- 还有更多 ### 在CentOS 6上安装CentOS网页面板 ### -写这篇教程的时候,CWP仅仅支持最高CentOS 6.x版本。在CentOS 7和更高的版本中是行不通的。 +写这篇教程的时候,CWP仅仅支持最高CentOS 6.x版本。在CentOS 7和更高的版本中是不支持的。 #### 前期准备: #### -**安装CWP之前,里必须知道以下的信息:** +**安装CWP之前,你必须知道以下的信息:** -- CWP 仅支持静态IP地址。它并不支持动态的,固定的,或者内部的IP地址。 -- CWP 并没有卸载程序。当你安装CWP后,里必须重新安装服务器来移除它。 -- 之安装CWP在一个新装的还没做任何配置改变的操作系统上。 -- 对与32位操作系统至少需要512MB RAM。 +- CWP 仅支持静态IP地址。它并不支持动态的,或者内部的IP地址。 +- CWP 并没有卸载程序。当你安装CWP后,你必须重新安装服务器来移除它。 +- 只能在一个新装的还没做任何配置改变的操作系统上安装CWP。 +- 对于32位操作系统至少需要512MB RAM。 - 64位系统需要1024MB RAM。 - 要求至少20GB的硬盘空间。 @@ -175,7 +174,7 @@ CWP有很多的特性和免费的服务。如我前面提到的一样,CWP自 如果上面的URL出现错误,用下面的链接代替。 - wget http://dll.centos-webpanle.com/files/cwp-latest + wget http://dl1.centos-webpanle.com/files/cwp-latest 然后,用命令开始安装CWP: @@ -189,8 +188,7 @@ CWP有很多的特性和免费的服务。如我前面提到的一样,CWP自 安装过程会持续到30分钟或者更多,取决于你的网速。 -最后,你会看到如下安装完成的信息。 -记下一些详细信息,如mysql超级用户密码和CWP的登录URLs。你随后会需要。然后,按下回车Enter重启系统。 +最后,你会看到如下安装完成的信息。记下一些详细信息,如mysql超级用户密码和CWP的登录URL,你随后会需要它们。然后,按下回车Enter重启系统。 ![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_004.png) @@ -200,7 +198,7 @@ CWP有很多的特性和免费的服务。如我前面提到的一样,CWP自 #### 调整防火墙/路由: #### -CWP的默认网络控制接口是**2030(http)**和**2031(https)**。你应该通过防火墙/路由允许使用这两个端口,以便远程接入CWP网络控制台。 +CWP的默认网页控制界面的端口是**2030(http)**和**2031(https)**。你应该通过防火墙/路由允许使用这两个端口,以便远程接入CWP网络控制台。 编辑iptables文件: @@ -242,43 +240,42 @@ CWP的默认网络控制接口是**2030(http)**和**2031(https)**。你 接下来,我们得做一些事,比如: -1.建立域名服务 -1.建立ip共享(必须是你的公共IP地址) -1.建立至少一个集合包(或者编辑默认的包) -1.建立root电子邮件,等等。 +1. 设置域名服务器 +1. 设置 ip 共享(必须是你的公共IP地址) +1. 设置至少一个托管包(或者编辑默认的包) +1. 设置 root 电子邮件,等等。 -#### 建立域名服务: #### +#### 设置域名服务器: #### -为建立域名服务,找到**DNS Functions -> Edit nameservers IPs**。 +为建立域名服务器,找到**DNS Functions -> Edit nameservers IPs**。 ![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_009.png) 设置你的域名服务器,点击保存按钮。 - ![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_010.png) -#### 建立共享IP和Root邮箱ID: #### +#### 建立共享IP和Root邮件地址: #### -在你的主机上管理网站,这是非常重要的一步。为了建立共享IP,进入**CWP Setting -> Edit settings**。 +在你的主机上托管网站,这是非常重要的一步。为了建立共享IP,进入**CWP Setting -> Edit settings**。 ![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_011.png) -输入你的静态IP和邮箱ID,然后点击保存设置按钮。 +输入你的静态IP和邮件地址,然后点击保存设置按钮。 ![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_012.png) 现在,CWP可以进行网站维护了。 -#### 建立主机包 #### +#### 建立托管包 #### -一个主机包什么都没有,除了一个网站托管计划,包括允许访问的磁盘空间,带宽,但没有FTP帐号,邮箱IDs和数据库等等。你可以建立任意数量的网站托管计划,只要你喜欢。 +一个托管包就是一个网站托管计划,包括允许访问的磁盘空间,带宽,但没有FTP帐号,邮箱地址和数据库等等。你可以建立任意数量的网站托管计划,只要你喜欢。 -添加一个包,从CWP的控制台进入**Packages — Add a Package** +要添加一个包,从CWP的控制台进入**Packages — Add a Package** ![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_013.png) -输入包的名字,允许访问的磁盘配额/RAM数量,FTP/Email帐号,数据库和子域名等等。点击保持设置按钮,建立一个网站托管计划。 +输入包的名字,允许访问的磁盘配额/RAM数量,FTP/Email帐号,数据库和子域名等等。点击保存设置按钮,建立一个网站托管计划。 ![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_014.png) @@ -290,7 +287,7 @@ CWP的默认网络控制接口是**2030(http)**和**2031(https)**。你 而添加一个用户,请进入**User Account -> New Account**。 -输入域名(ex.unixmen.com),用户名,密码和邮箱id等等。最后,点击**Create**。 +输入域名(ex.unixmen.com),用户名,密码和邮箱地址等等。最后,点击**Create**。 ![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_016.png) @@ -312,12 +309,11 @@ CWP的默认网络控制接口是**2030(http)**和**2031(https)**。你 --------------------------------------------------------------------------- - via: http://www.unixmen.com/how-to-install-centos-web-panel-in-centos/ 作者:[SK][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ec57d8aa64265fbcf828a751b3ccb1d8bad6894d Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 25 May 2015 23:45:28 +0800 Subject: [PATCH 0959/2517] PUB:20150505 Bodhi Linux Introduces Moksha Desktop @GOLinux --- ...50505 Bodhi Linux Introduces Moksha Desktop.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150505 Bodhi Linux Introduces Moksha Desktop.md (56%) diff --git a/translated/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md b/published/20150505 Bodhi Linux Introduces Moksha Desktop.md similarity index 56% rename from translated/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md rename to published/20150505 Bodhi Linux Introduces Moksha Desktop.md index 6ad0d04567..dcb724e7b1 100644 --- a/translated/tech/20150505 Bodhi Linux Introduces Moksha Desktop.md +++ b/published/20150505 Bodhi Linux Introduces Moksha Desktop.md @@ -1,25 +1,26 @@ -Bodhi Linux引入Moksha桌面 +Bodhi Linux 将引入 Moksha 桌面 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Bodhi_Linux.jpg) -基于Ubuntu的轻量级Linux发行版[Bodhi Linux][1]致力于构建其自家的桌面环境,这个全新桌面环境被称之为Moksha(梵文意为‘完全自由’)。Moksha将替换常用的[Enlightenment桌面环境][2]。 +基于Ubuntu的轻量级Linux发行版[Bodhi Linux][1]致力于构建其自家的桌面环境,这个全新桌面环境被称之为Moksha(梵文意为‘完全自由’)。Moksha将替换其原来的[Enlightenment桌面环境][2]。 ### 为何用Moksha替换Englightenment? ### -Bodhi Linux的Jeff Hoogland最近[表示][3]了他对新版Enlightenment的不满。直到E17,Enlightenment都十分稳定,并且能满足轻量级Linux的部署需求。而E18则到处都充满了问题,Bodhi Linux只好弃之不用了。 +Bodhi Linux的Jeff Hoogland最近[表示][3]了他对新版Enlightenment的不满。直到E17,Enlightenment都十分稳定,并且能满足轻量级Linux的部署需求。而E18则到处都充满了问题,Bodhi Linux只好弃之不用了。 虽然最新的[Bodhi Linux 3.0发行版][4]仍然使用了E19作为其桌面(除传统模式外,这意味着,对于旧的硬件,仍然会使用E17),Jeff对E19也十分不满。他说道: ->除了性能问题外,对于我个人而言,E19并没有给我带来与E17下相同的工作流程,因为它移除了很多E17的特性。鉴于此,我不得不将我所有的3台Bodhi计算机桌面改成E17——这3台机器都是我高端的了。这不由得让我想到,我们还有多少现存的Bodhi用户也怀着和我同样的感受,所以,我[在我们的用户论坛上开启一个与此相关的讨论][5]。 +> 除了性能问题外,对于我个人而言,E19并没有给我带来与E17下相同的工作流程,因为它移除了很多E17的特性。鉴于此,我不得不将我所有的3台Bodhi计算机桌面改成E17——这3台机器都是我高端的了。这不由得让我想到,我们还有多少现存的Bodhi用户也怀着和我同样的感受,所以,我[在我们的用户论坛上开启一个与此相关的讨论][5]。 ### Moksha是E17桌面的延续 ### Moksha将会是Bodhi所热衷的E17桌面的延续。Jeff进一步提到: ->我们将从整合所有Bodhi修改开始。多年来我们一直都只是给源代码打补丁,并修复桌面所具有的问题。如果该工作完成,我们将开始移植一些E18和E19引入的更为有用的特性,最后,我们将引入一些我们认为会改善最终用户体验的东西。 + +> 我们将从整合所有Bodhi修改开始。多年来我们一直都只是给源代码打补丁,并修复桌面所带有的问题。如果该工作完成,我们将开始移植一些E18和E19引入的更为有用的特性,最后,我们将引入一些我们认为会改善最终用户体验的东西。 ### Moksha何时发布? ### -下一个Bodhi更新将会是Bodhi 3.1.0,就在今年八月。这个新版本将为所有其缺省ISO带来Moksha。让我们拭目以待,看看Moksha是否是一个好的决定。 +下一个Bodhi更新将会是Bodhi 3.1.0,就在今年八月。这个新版本将为所有其默认安装镜像带来Moksha。让我们拭目以待,看看Moksha是否是一个好的决定。 -------------------------------------------------------------------------------- @@ -27,7 +28,7 @@ via: http://itsfoss.com/bodhi-linux-introduces-moksha-desktop/ 作者:[Abhishek][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 6bba9e9854a3a519595fcdc3ef6d163db036f160 Mon Sep 17 00:00:00 2001 From: joeren Date: Tue, 26 May 2015 08:00:11 +0800 Subject: [PATCH 0960/2517] Update 20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md --- ... Quirky' ls' Command Tricks Every Linux User Should Know.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md b/sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md index 9878cc8cee..6dbd6096a7 100644 --- a/sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md +++ b/sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md @@ -1,3 +1,4 @@ +Translating by GOLinux! 7 Quirky ‘ls’ Command Tricks Every Linux User Should Know ================================================================================ We have covered most of the things on ‘ls‘ command in last two articles of our Interview series. This article is the last part of the ‘ls command‘ series. If you have not gone through last two articles of this series you may visit the links below. @@ -160,4 +161,4 @@ via: http://www.tecmint.com/linux-ls-command-tricks/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ [2]:http://www.tecmint.com/ls-command-interview-questions/ -[3]:http://www.tecmint.com/ls-interview-questions/ \ No newline at end of file +[3]:http://www.tecmint.com/ls-interview-questions/ From 74f19e09cb2d8ffb934eddc972ecc609c7ea85e6 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 26 May 2015 08:57:47 +0800 Subject: [PATCH 0961/2517] [Translated]20150324 7 Quirky 'ls' Command Tricks Every Linux User Should Know.md --- ...and Tricks Every Linux User Should Know.md | 164 ------------------ ...and Tricks Every Linux User Should Know.md | 163 +++++++++++++++++ 2 files changed, 163 insertions(+), 164 deletions(-) delete mode 100644 sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md create mode 100644 translated/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md diff --git a/sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md b/sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md deleted file mode 100644 index 6dbd6096a7..0000000000 --- a/sources/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md +++ /dev/null @@ -1,164 +0,0 @@ -Translating by GOLinux! -7 Quirky ‘ls’ Command Tricks Every Linux User Should Know -================================================================================ -We have covered most of the things on ‘ls‘ command in last two articles of our Interview series. This article is the last part of the ‘ls command‘ series. If you have not gone through last two articles of this series you may visit the links below. - -注:以下三篇都做过源文,看看翻译了没有,如果发布了可适当改链接地址 -- [15 Basic ‘ls’ Command Examples in Linux][] -- [15 Interview Questions on Linux “ls” Command – Part 1][] -- [10 Useful ‘ls’ Command Interview Questions – Part 2][] - -![7 Quirky ls Command Tricks](http://www.tecmint.com/wp-content/uploads/2015/03/ls-command-tricks.jpg) -7 Quirky ls Command Tricks - -### 1. List the contents of a directory with time using various time styles. ### - -To list the contents of a directory with times using style, we need to choose any of the below two methods. - - # ls -l –time-style=[STYLE] (Method A) - -**Note** – The above switch (`--time` style must be run with switch `-l`, else it won’t serve the purpose). - - # ls –full-time (Method B) - -Replace `[STYLE]` with any of the below option. - - full-iso - long-iso - iso - locale - +%H:%M:%S:%D - -**Note** – In the above line H(Hour), M(Minute), S(Second), D(Date) can be used in any order. - -Moreover you just choose those relevant and not all options. E.g., `ls -l --time-style=+%H` will show only hour. - -`ls -l --time-style=+%H:%M:%D` will show Hour, Minute and date. - - # ls -l --time-style=full-iso - -![ls Command Full Time Style](http://www.tecmint.com/wp-content/uploads/2015/03/ls-Command-Full-Time-Style.gif) -ls Command Full Time Style - - # ls -l --time-style=long-iso - -![Long Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Long-Time-Listing-Format.gif) -Long Time Style Listing - - # ls -l --time-style=iso - -![Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Local-Time-Style-Listing.gif) -Time Style Listing - - # ls -l --time-style=locale - -![Locale Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Hour-Mintue-Time-Style-Listing.gif) -Locale Time Style Listing - - # ls -l --time-style=+%H:%M:%S:%D - -![Date and Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Full-Time-Style-Listing.gif) -Date and Time Style Listing - - # ls --full-time - -![Full Style Time Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Full-Style-Time-Listing.gif) - -Full Style Time Listing - -### 2. Output the contents of a directory in various formats such as separated by commas, horizontal, long, vertical, across, etc. ### - -Contents of directory can be listed using ls command in various format as suggested below. - -- across -- comma -- horizontal -- long -- single-column -- verbose -- vertical - - # ls –-format=across - # ls --format=comma - # ls --format=horizontal - # ls --format=long - # ls --format=single-column - # ls --format=verbose - # ls --format=vertical - -![Listing Formats of ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-command-Listing-Formats.gif) -Listing Formats of ls Command - -### 3. Use ls command to append indicators like (/=@|) in output to the contents of the directory. ### - -The option `-p` with ‘ls‘ command will server the purpose. It will append one of the above indicator, based upon the type of file. - - # ls -p - -![Append Indicators to Content](http://www.tecmint.com/wp-content/uploads/2015/03/Append-Indicators.gif) -Append Indicators to Content - -### 4. Sort the contents of directory on the basis of extension, size, time and version. ### - -We can use options like `--extension` to sort the output by extension, size by extension `--size`, time by using extension `-t` and version using extension `-v`. - -Also we can use option `--none` which will output in general way without any sorting in actual. - - # ls --sort=extension - # ls --sort=size - # ls --sort=time - # ls --sort=version - # ls --sort=none - -![Sort Listing of Content by Options](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Content-by-Extensions.gif) -Sort Listing of Content by Options - -### 5. Print numeric UID and GID for every contents of a directory using ls command. ### - -The above scenario can be achieved using flag -n (Numeric-uid-gid) along with ls command. - - # ls -n - -![Print Listing of Content by UID and GID](http://www.tecmint.com/wp-content/uploads/2015/03/Print-UID-GID-of-Contents.gif) -Print Listing of Content by UID and GID - -### 6. Print the contents of a directory on standard output in more columns than specified by default. ### - -Well ls command output the contents of a directory according to the size of the screen automatically. - -We can however manually assign the value of screen width and control number of columns appearing. It can be done using switch ‘`--width`‘. - - # ls --width 80 - # ls --width 100 - # ls --width 150 - -![List Content Based on Window Sizes](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-By-More-Column.gif) -List Content Based on Window Sizes - -**Note**: You can experiment what value you should pass with width flag. - -### 7. Include manual tab size at the contents of directory listed by ls command instead of default 8. ### - - # ls --tabsize=[value] - -![List Content by Table Size](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-by-Table-Size.gif) -List Content by Table Size - -**Note**: Specify the `[Value]=` Numeric value. - -That’s all for now. Stay tuned to Tecmint till we come up with next article. Do not forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-ls-command-tricks/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ -[2]:http://www.tecmint.com/ls-command-interview-questions/ -[3]:http://www.tecmint.com/ls-interview-questions/ diff --git a/translated/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md b/translated/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md new file mode 100644 index 0000000000..7793b856c2 --- /dev/null +++ b/translated/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md @@ -0,0 +1,163 @@ +Linux用户应知应会的7个‘ls’命令异用技巧 +================================================================================ +在前面我们系列报道的两篇文章中,我们已经涵盖了关于‘ls’命令的绝大多数内容。本文时‘ls命令’系列的最后一部分。如果你还没有读过该系列的其它两篇文章,你可以访问下面的链接。 + +注:以下三篇都做过源文,看看翻译了没有,如果发布了可适当改链接地址 + +- [Linux中的15个‘ls’命令基本用法实例][1] +- [关于Linux “ls”命令的15个面试问题 – 第一部分][2] +- [10个有用的‘ls’命令面试问题 – 第二部分][3] + +![7 Quirky ls Command Tricks](http://www.tecmint.com/wp-content/uploads/2015/03/ls-command-tricks.jpg) +7个ls命令异用技巧 + +### 1. 以各种时间格式附带时间戳列出目录中的内容 ### + +要以时间格式列出目录内容,我们需要选择以下两种方法中的任何一种。 + + # ls -l –time-style=[STYLE] (方法 A) + +**注意** - 上面的开关(`--time`格式必须和`-l`开关同时使用,否则达不到目的)。 + + # ls –full-time (方法 B) + +用以下任何一个选项替换`[STYLE]`。 + + full-iso + long-iso + iso + locale + +%H:%M:%S:%D + +**注意** - 在上面行中,H(时),M(分),S(秒),D(日期)的顺序可以任意调整。 + +此外,你只需选择那些相关的选项,而不是所有选项。例如,`ls -l --time-style=+%H`将只显示小时。 + +`ls -l --time-style=+%H:%M:%D`将显示小时、分钟和日期。 + + # ls -l --time-style=full-iso + +![ls Command Full Time Style](http://www.tecmint.com/wp-content/uploads/2015/03/ls-Command-Full-Time-Style.gif) +ls命令完整时间格式 + + # ls -l --time-style=long-iso + +![Long Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Long-Time-Listing-Format.gif) +长时间格式列表 + + # ls -l --time-style=iso + +![Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Local-Time-Style-Listing.gif) +时间格式列表 + + # ls -l --time-style=locale + +![Locale Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Hour-Mintue-Time-Style-Listing.gif) +本地时间格式列表 + + # ls -l --time-style=+%H:%M:%S:%D + +![Date and Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Full-Time-Style-Listing.gif) +日期和时间格式列表 + + # ls --full-time + +![Full Style Time Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Full-Style-Time-Listing.gif) +完整格式时间列表 + +### 2. 以多种格式列出目录内容,如以逗号分隔、水平格式、长格式、垂直格式、交叉格式等列出。 ### + +目录内容可以用以下建议的ls命令各种格式列出。 + +- 交叉 +- 逗号 +- 水平 +- 长格式 +- 单栏 +- 详情 +- 垂直 + + # ls –-format=across + # ls --format=comma + # ls --format=horizontal + # ls --format=long + # ls --format=single-column + # ls --format=verbose + # ls --format=vertical + +![Listing Formats of ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-command-Listing-Formats.gif) +ls命令的列出格式 + +### 3. 使用ls命令为目录内容输出结果添加像(/=@|)这样的指示符。 ### + +带有`-p`选项的ls命令将实现该目的。它会根据文件类型添加上面这些指示符其中之一。 + + # ls -p + +![Append Indicators to Content](http://www.tecmint.com/wp-content/uploads/2015/03/Append-Indicators.gif) +添加指示符到内容 + +### 4. 根据扩展名、大小、时间和版本对目录内容排序。 ### + +我们可以使用`--extension`选项来按照扩展名对输出结果排序,`--size`扩展选项按照大小排序,`-t`扩展选项按照时间排序,`-v`扩展选项对版本排序。 + +我们也可以使用`--none`选项,它会以常规方式输出结果而不会进行排序。 + + # ls --sort=extension + # ls --sort=size + # ls --sort=time + # ls --sort=version + # ls --sort=none + +![Sort Listing of Content by Options](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Content-by-Extensions.gif) +通过选项对内容排序列出 + +### 5. 使用ls命令打印目录中各个内容的数字UID和GID。 ### + +上面的环境可以通过使用带有-n标识的ls命令来实现。 + + # ls -n + +![Print Listing of Content by UID and GID](http://www.tecmint.com/wp-content/uploads/2015/03/Print-UID-GID-of-Contents.gif) +通过UID和GID对打印内容列表 + +### 6. 标准输出结果中打印目录内容中比默认指定的更多栏目。 ### + +好吧,ls命令根据屏幕大小自动输出目录内容。 + +然而,我们可以手动分配屏幕宽度的值和出现的栏目的控制数。这可以通过使用‘`--width`’开关实现。 + + # ls --width 80 + # ls --width 100 + # ls --width 150 + +![List Content Based on Window Sizes](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-By-More-Column.gif) +根据窗口大小列出内容 + +**注意**: 你可以试验你可以给width标识传递什么值。 + +### 7. 通过ls命令为列出的目录内容手动指定的tab大小而不是默认的8。 ### + + # ls --tabsize=[value] + +![List Content by Table Size](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-by-Table-Size.gif) +按表尺寸列出内容 + +**注意**: 指定`[Value]=`的数值。 + +到目前为止,都讲完了。保持连线到Tecmint,我们会推出下一篇文章。别忘了在下面的评论中为我们提供有价值的反馈。为我们点赞并分享,帮我们推广。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-ls-command-tricks/ + +作者:[Avishek Kumar][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ +[2]:http://www.tecmint.com/ls-command-interview-questions/ +[3]:http://www.tecmint.com/ls-interview-questions/ From 256868dc935b283252a1d030983c04f65ec97e23 Mon Sep 17 00:00:00 2001 From: joeren Date: Tue, 26 May 2015 09:01:58 +0800 Subject: [PATCH 0962/2517] Update 20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md --- ...dges Brings Missing Session Icons to Ubuntu Login Screen.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md b/sources/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md index 1aac09e11a..a71d60e25f 100644 --- a/sources/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md +++ b/sources/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md @@ -1,3 +1,4 @@ +Translating by GOLinux! ‘Unity Greeter Badges’ Brings Missing Session Icons to Ubuntu Login Screen ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/unity-greeter-badges-750x321.jpg) @@ -55,4 +56,4 @@ via: http://www.omgubuntu.co.uk/2015/01/unity-greeter-badges-brings-missing-sess [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:https://launchpad.net/~profzoom [2]:https://launchpad.net/~profzoom/+archive/ubuntu/misc/+files/unity-greeter-badges_0.1-0ubuntu1%7E201412111501%7Eubuntu14.04.1_all.deb -[3]:https://launchpad.net/~profzoom/+archive/ubuntu/misc/+files/unity-greeter-badges_0.1-0ubuntu1%7E201412111501%7Eubuntu14.10.1_all.deb \ No newline at end of file +[3]:https://launchpad.net/~profzoom/+archive/ubuntu/misc/+files/unity-greeter-badges_0.1-0ubuntu1%7E201412111501%7Eubuntu14.10.1_all.deb From 061ac073b5b914e33647febf4695c650381e08eb Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 26 May 2015 10:06:37 +0800 Subject: [PATCH 0963/2517] [Translated]20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md --- ...ng Session Icons to Ubuntu Login Screen.md | 59 ------------------- ...ng Session Icons to Ubuntu Login Screen.md | 56 ++++++++++++++++++ 2 files changed, 56 insertions(+), 59 deletions(-) delete mode 100644 sources/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md create mode 100644 translated/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md diff --git a/sources/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md b/sources/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md deleted file mode 100644 index a71d60e25f..0000000000 --- a/sources/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md +++ /dev/null @@ -1,59 +0,0 @@ -Translating by GOLinux! -‘Unity Greeter Badges’ Brings Missing Session Icons to Ubuntu Login Screen -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/unity-greeter-badges-750x321.jpg) - -**A new package available in Ubuntu 15.04 solves a petty gripe I have with the Unity Greeter: the lack of branded icons for alternative desktop sessions like Cinnamon.** - -I know it’s a minor quibble; it’s a visual paper cut with minimal impact for most. But the inconsistency niggles me because Ubuntu ships with icons for a number of sessions, including Unity, GNOME and KDE. Other DEs, including some of its own flavors like Xubuntu, default to showing a plain white dot in the session switcher list and the main user pod. - -The inconsistency these dots create jars, even if it is only for a fleeting moment, not just in design. It’s in usability too. Branded glyphs are helpful in letting us know what session we’re about to log in to. - -For instance, can you tell what session this is? - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/what-session-is-this-750x247.jpg) - -Budgie? Maybe MATE? Could be Cinnamon…I’d have to click on it and check first. - -It doesn’t have to be this way. The Unity Greeter is built such that the developers of desktop environments can ship badges that appear in the Greeter (and some do). But in many cases, like MATE whose packages are imported from upstream Debian, the inclination to carry an “Ubuntu-specific patch” is either not desirable or not possible. - -### A Solution Is Badged ### - -Experienced Debian maintainer [Doug Torrance][1] has a solution to fix this usability paper cut. Rather than rely on desktop makers themselves to add branded badges to their packages, and rather than burden Ubuntu with the responsibility of maintaining it, Torrance has created a separate ‘unity-greeter-badges’ package to house them. - -In assuming responsibility for providing the session glyphs directly, this package ensure that new and old window managers, session and desktops alike are catered for. - -Among the 30 or so desktop environments it bundles new session badges for are: - -- Xubuntu -- Cinnamon -- MATE -- Cairo-Dock -- Xmonad -- Awesome -- OpenBox -- Pantheon - -The best part is that ‘**Unity-Greeter-Badges**’ has been accepted into Ubuntu 15.04. That means Torrance’s package will be available to install directly, no PPAs or downloads needed. In not being part of a core package like the Unity Greeter it can be updated with newer icons in a more efficient and timely manner. - -If you’re running Ubuntu 15.04 you will find the package available to install from the Software Center in the coming days. - -Don’t want to wait until 15.04? Torrance has made .deb installers for Ubuntu 14.04 LTS and Ubuntu 14.10 users. - -- [Download unity-greeter-badges for Ubuntu 14.04][2] -- [Download unity-greeter-badges for Ubuntu 14.10][3] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/01/unity-greeter-badges-brings-missing-session-icons-ubuntu-login-screen - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://launchpad.net/~profzoom -[2]:https://launchpad.net/~profzoom/+archive/ubuntu/misc/+files/unity-greeter-badges_0.1-0ubuntu1%7E201412111501%7Eubuntu14.04.1_all.deb -[3]:https://launchpad.net/~profzoom/+archive/ubuntu/misc/+files/unity-greeter-badges_0.1-0ubuntu1%7E201412111501%7Eubuntu14.10.1_all.deb diff --git a/translated/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md b/translated/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md new file mode 100644 index 0000000000..c6c195585e --- /dev/null +++ b/translated/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md @@ -0,0 +1,56 @@ +‘Unity Greeter标识卡’——将丢失的会话带回Ubuntu登录屏幕 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/unity-greeter-badges-750x321.jpg) + +**Ubuntu 15.04中的一个新包解决了我对Unity Greeter抱有的微词:缺乏其它像Cinnamon这样的Linux桌面会话的标牌式图标。** + +我知道这有点吹毛求疵了;这只是对大多数人而言几乎毫无影响的视觉裂痕而已。但是这种不一致性时时刻刻缠绕着我,让我不胜其烦,因为Ubuntu自带了大量的会话,包括Unity、GNOME和KDE。其它桌面环境,包括它自己的一些跳制品,像Xubuntu,都默认在会话切换列表和主用户界面显示了一个朴素的白点。 + +这些点点们造成的这种不一致性刺激着神经,即使它只是稍纵即逝,但这种刺激不仅仅来自设计,也来自可用性方面。标牌式的标志符号对于让我们知道我们即将登陆到哪个会话很有帮助。 + +例如,你能告诉我们这个是个什么会话呢? + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/what-session-is-this-750x247.jpg) + +没有必要这样做啊。构建Unity Greeter,就是为了让桌面环境开发者能够部署标识卡到欢迎屏幕中(有些确实这样做了)。但在许多情况下,像MATE,它的包来自上游的Debian,想要移植一个“Ubuntu专用的补丁包”不太可取,也不太可能。 + +### 一个解决方案出炉了 ### + +有经验的Debian维护者[Doug Torrance][1]得到了修复该可用性裂痕的解决方案。与其依赖桌面制造者自己来添加品牌式标识卡到他们的包中,与其给Ubuntu增加维护它的责任重担,Torrance还不如自己创建了一个独立的‘unity-greeter-badges’包来收容它们。 + +承担起了直接提供会话标志的假定责任后,该包确保能同时迎合新旧窗口管理器、会话和桌面。 + +在30个左右的桌面环境中,它为以下桌面捆绑了新的会话标识卡: + +- Xubuntu +- Cinnamon +- MATE +- Cairo-Dock +- Xmonad +- Awesome +- OpenBox +- Pantheon + +最重要的是,‘**Unity-Greeter-Badges**’已经被Ubuntu 15.04收录进去。这就意味着Torrance的包将可以直接安装,不需要PPA,也不需要下载。没有像Unity Greeter一样成为核心包的一部分,它可以以更高效和更及时的方式更新新的图标。 + +如果你真运行着Ubuntu 15.04,在不久的将来,你就可以从软件中心获取并安装该包了。 + +不想等到15.04?Torrance已经为Ubuntu 14.04和Ubuntu 14.10用户做了个.deb安装器。 + +- [下载用于Ubuntu 14.04的unity-greeter-badges][2] +- [下载用于Ubuntu 14.10的unity-greeter-badges][3] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/01/unity-greeter-badges-brings-missing-session-icons-ubuntu-login-screen + +作者:[Joey-Elijah Sneddon][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://launchpad.net/~profzoom +[2]:https://launchpad.net/~profzoom/+archive/ubuntu/misc/+files/unity-greeter-badges_0.1-0ubuntu1%7E201412111501%7Eubuntu14.04.1_all.deb +[3]:https://launchpad.net/~profzoom/+archive/ubuntu/misc/+files/unity-greeter-badges_0.1-0ubuntu1%7E201412111501%7Eubuntu14.10.1_all.deb From 2288045799052ea7ee6ce37b131e6bf32b96f15f Mon Sep 17 00:00:00 2001 From: joeren Date: Tue, 26 May 2015 10:11:42 +0800 Subject: [PATCH 0964/2517] Update 20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md --- ...ntopng--Network Monitoring Tool Installation Screenshots.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md b/sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md index 01fc6f5e68..17c3add528 100644 --- a/sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md +++ b/sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Linux ntopng - Network Monitoring Tool Installation (Screenshots) ================================================================================ Nowdays computers are connected between each other. From the small area such as your home Local Area Network (LAN) until the the biggest one which we call - Internet. When you are managing a network computer, you are managing one of the most critical component. Since most of developed application is web based application, the network between critical. @@ -185,4 +186,4 @@ via: http://linoxide.com/monitoring-2/ntopng-network-monitoring-tool/ [2]:http://www.ntop.org/products/ntop/ [3]:http://www.nmon.net/packages/ [4]:http://yourserver.name:3000/ -[5]:http://www.ntop.org/ \ No newline at end of file +[5]:http://www.ntop.org/ From 5f44f9efdf760b3bf57fc4715a8856b27ee357f2 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 26 May 2015 11:56:54 +0800 Subject: [PATCH 0965/2517] Translating by ZTinoZ --- ... Things to Do After Installing Ubuntu 15.04 Desktop.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index 9c897e60c4..f9c8bc9bc1 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -230,7 +230,7 @@ Add Cairo Dock at Startup $ sudo apt-get install compiz compizconfig-settings-manager compiz-plugins-extra -想要激活桌面Cube效果,search for ccsm on Dash, open CompizConfig Settings Manager, go to General Options – > Desktop Size and set Horizontal Virtual Size value to 4 and Vertical Virtual Size to 1. Then go back and check Desktop Cube (Disable Desktop Wall) and Rotate Cube boxes (Resolve Conflicts ->Disable Switch to Viewport 1) and press Ctrl+Alt+Left Mouse Click to view the cube effect. +想要激活桌面Cube效果,在Dash上查找ccsm,打开CompizConfig Settings Manager,找到General Options – > Desktop Size并设置Horizontal Virtual Size的值为4,Vertical Virtual Size的值为1。然后返回检查Desktop Cube框(禁用Desktop Wall)和Rotate Cube框(解决冲突 -> 禁止切换视图1)并Ctrl+Alt+鼠标左击来查看cube效果。 ![Enable Compiz](http://www.tecmint.com/wp-content/uploads/2015/04/enable-compiz.jpg) Enable Compiz @@ -246,7 +246,7 @@ Desktop Window Rotating ### 15. 添加额外浏览器支持 ### -Ubuntu 15.04 comes by default with Mozilla Firefox Web Browser. To install other browsers such as Google Chrome or Opera, visit their official web pages, download the provided .deb packages and install them on your system using the Gdebi Package Installer. +Ubuntu 15.04默认浏览器是Mozilla Firefox。想要安装其它浏览器比如Google Chrome或Opera,可以访问它们的官方网站,下载所提供的.deb包并用Gdebi Package Installer在你的系统上安装它们。 ![Enable Browser Support](http://www.tecmint.com/wp-content/uploads/2015/04/enable-browser-support.jpg) Enable Browser Support @@ -260,7 +260,7 @@ To install Chromium Open Source browser issue the following command on Terminal. ### 16. 安装Tweak工具 ### -Want extra applications for customizing Ubuntu? Then install Unity Tweak Tool and Gnome Tweak Tool by issuing the following commands on Terminal. +想要用额外的应用程序来自定义Ubuntu吗?在终端上输入以下命令来安装Unity Tweak工具和Gnome Tweak工具: $ sudo apt-get install unity-tweak-tool gnome-tweak-tool @@ -270,7 +270,7 @@ Install Tweak Tool ![Tweak Tool Settings](http://www.tecmint.com/wp-content/uploads/2015/04/tweak-settings.jpg) Tweak Tool Settings -Another interesting tweak tool is represented by the Ubuntu Tweak package which can be obtained and installed by visiting the webpage: [http://ubuntu-tweak.com/][2]. +另一个有趣的tweak工具主要是Ubuntu Tweak包,可以通过访问官方网站来获取并安装: [http://ubuntu-tweak.com/][2]. ![Tweak Tool: System Information](http://www.tecmint.com/wp-content/uploads/2015/04/tweak-system-info.jpg) Tweak Tool: System Information From 21a11465ae3944f4cd205caadbbd10f6dee56fa3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 26 May 2015 14:20:13 +0800 Subject: [PATCH 0966/2517] =?UTF-8?q?20150526-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 20 Useful Terminal Emulators for Linux.md | 300 ++++++++++++++++++ 1 file changed, 300 insertions(+) create mode 100644 sources/tech/20150526 20 Useful Terminal Emulators for Linux.md diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md new file mode 100644 index 0000000000..1615d3ca1a --- /dev/null +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -0,0 +1,300 @@ +20 Useful Terminal Emulators for Linux +================================================================================ +A Terminal emulator is a computer program that reproduces a video terminal within some other display structure. In other words the Terminal emulator has an ability to make a dumb machine appear like a client computer networked to the server. The terminal emulator allows an end user to access console as well as its applications such as text user interface and command line interface. + +![Linux Terminal Emulators](http://www.tecmint.com/wp-content/uploads/2014/01/Linux-Terminal-Emulators1.jpeg) + +20 Linux Terminal Emulators + +You may find huge number of terminal emulators to choose from this open source world. Some of them offers large range of features while others offers less features. To give a better understanding to the quality of software that are available, we have gathered a list of marvelous terminal emulator for Linux. Each title provides its description and feature along with screenshot of the software with relevant download link. + +### 1. Terminator ### + +Terminator is an advanced and powerful terminal emulator which supports multiple terminals windows. This emulator is fully customizable. You can change the size, colour, give different shapes to the terminal. Its very user friendly and fun to use. + +#### Features of Terminator #### + +- Customize your profiles and colour schemes, set the size to fit your needs. +- Use plugins to get even more functionality. +- Several key-shortcuts are available to speed up common activities. +- Split the terminal window into several virtual terminals and re-size them as needed. + +![Terminator Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Terminator-Emulator.jpeg) + +Terminator Terminal + +- [Terminator Homepage][1] +- [Download and Installation Instructions][2] + +### 2. Tilda ### + +Tilda is a stylish drop-down terminal based on GTK+. With the help of a single key press you can launch a new or hide Tilda window. However, you can add colors of your choice to change the look of the text and Terminal background. + +#### Features of Tilda #### + + Interface with Highly customization option. + You can set the transparency level for Tilda window. + Excellent built-in colour schemes. + +![Tilda Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Tilda-Emulator.jpeg) + +Tilda Terminal + +- [Tilda Homepage][3] + +### 3. Guake ### + +Guake is a python based drop-down terminal created for the GNOME Desktop Environment. It is invoked by pressing a single keystroke, and can make it hidden by pressing same keystroke again. Its design was determined from FPS (First Person Shooter) games such as Quake and one of its main target is be easy to reach. + +Guake is very much similar to Yakuaka and Tilda, but it’s an experiment to mix the best of them into a single GTK-based program. Guake has been written in python from scratch using a little piece in C (global hotkeys stuff). + +![Guake Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Guake-Terminal.jpeg) + +Guake Terminal + +- [Guake Homepage][4] + +### 4. Yakuake ### + +Yakuake (Yet Another Kuake) is a KDE based drop-down terminal emulator very much similar to Guake terminal emulator in functionality. It’s design was inspired from fps consoles games such as Quake. + +Yakuake is basically a KDE application, which can be easily installed on KDE desktop, but if you try to install Yakuake in GNOME desktop, it will prompt you to install huge number of dependency packages. + +#### Yakuake Features #### + +- Fluently turn down from the top of your screen +- Tabbed interface +- Configurable dimensions and animation speed +- Customizable + +![Yakuake Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Yakuake-Terminal.jpeg) + +Yakuake Terminal + +- [Yakuake Homepage][5] + +### 5. ROXTerm ### + +ROXterm is yet another lightweight terminal emulator designed to provide similar features to gnome-terminal. It was originally constructed to have lesser footprints and faster start-up time by not using the Gnome libraries and by using a independent applet to bring the configuration interface (GUI), but over the time it’s role has shifted to bringing a higher range of features for power users. + +However, it is more customizable than gnome-terminal and anticipated more at “power” users who make excessive use of terminals. It is easily integrated with GNOME desktop environment and provides features like drag & drop of items into terminal. + +![Roxterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Roxterm-Terminal.jpeg) + +Roxterm Terminal + +- [ROXTerm Homepage][6] + +### 6. Eterm ### + +Eterm is a lightest color terminal emulator designed as a replacement for xterm. It is developed with a Freedom of Choice ideology, leaving as much power, flexibility, and freedom as workable in the hands of the user. + +![Eterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Eterm-Terminal.jpeg) + +Eterm Terminal + +- [Eterm Homepage][7] + +### 7. Rxvt ### + +Rxvt stands for extended virtual terminal is a color terminal emulator application for Linux intended as an xterm replacement for power users who don’t need to have a feature such as Tektronix 4014 emulation and toolkit-style configurability. + +![Rxvt Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Rxvt-Terminal.jpeg) + +Rxvt Terminal + +- [Rxvt Homepage][8] + +### 8. Wterm ### + +Wterm is a another light weight color terminal emulator based on rxvt project. It includes features such as background images, transparency, reverse transparency and an considerable set or runtime options are accessible resulting in a very high customizable terminal emulator. + +![wterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/wterm-Terminal-.jpeg) + +wterm Terminal + +- [Wterm Homepage][9] + +### 9. LXTerminal ### + +LXTerminal is a default VTE-based terminal emulator for LXDE (Lightweight X Desktop Environment) without any unnecessary dependency. The terminal has got some nice features such as. +LXTerminal Features + +- Multiple tabs support +- Supports common commands like cp, cd, dir, mkdir, mvdir. +- Feature to hide the menu bar for saving space +- Change the color scheme. + +![lxterminal Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/lxterminal-Terminal.jpeg) + +lxterminal Terminal + +- [LXTerminal Homepage][10] + +### 10. Konsole ### + +Konsole is yet another powerful KDE based free terminal emulator was originally created by Lars Doelle. +Konsole Features + +- Multiple Tabbed terminals. +- Translucent backgrounds. +- Support for Split-view mode. +- Directory and SSH bookmarking. +- Customizable color schemes. +- Customizable key bindings. +- Notification alerts about activity in a terminal. +- Incremental search +- Support for Dolphin file manager +- Export of output in plain text or HTML format. + +![Konsole Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Konsole-Terminal.jpeg) + +Konsole Terminal + +- [Konsole Homepage][11] + +### 11. TermKit ### + +TermKit is a elegant terminal that aims to construct aspects of the GUI with the command line based application using WebKit rendering engine mostly used in web browsers like Google Chrome and Chromium. TermKit is originally designed for Mac and Windows, but due to TermKit fork by Floby which you can now able to install it under Linux based distributions and experience the power of TermKit. + +![TermKit Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/TermKit-Terminal.jpeg) + +TermKit Terminal + +- [TermKit Homepage][12] + +12. st + +st is a simple terminal implementation for X Window. + +![st terminal](http://www.tecmint.com/wp-content/uploads/2014/01/st-terminal.png) + +st terminal + +- [st Homepage][13] + +### 13. Gnome-Terminal ### + +GNOME terminal is a built-in terminal emulator for GNOME desktop environment developed by Havoc Pennington and others. It allow users to run commands using a real Linux shell while remaining on the on the GNOME environment. GNOME Terminal emulates the xterm terminal emulator and brings a few similar features. + +The Gnome terminal supports multiple profiles, where users can able to create multiple profiles for his/her account and can customize configuration options such as fonts, colors, background image, behavior, etc. per account and define a name to each profile. It also supports mouse events, url detection, multiple tabs, etc. + +![Gnome Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Gnome-terminal.jpg) + +Gnome Terminal + +- [Gnome Terminal][14] + +### 14. Final Term ### + +Final Term is a open source stylish terminal emulator that has some exciting capabilities and handy features into one single beautiful interface. It is still under development, but provides significant features such as Semantic text menus, Smart command completion, GUI terminal controls, Omnipotent keybindings, Color support and many more. The following animated screen grab demonstrates some of their features. Please click on image to view demo. + +![FinalTerm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/FinalTerm.gif) + +FinalTerm Terminal + +- [Final Term][15] + +### 15. Terminology ### + +Terminology is yet another new modern terminal emulator created for the Enlightenment desktop, but also can be used in different desktop environments. It has some awesome unique features, which do not have in any other terminal emulator. + +Apart features, terminology offers even more things that you wouldn’t assume from a other terminal emulators, like preview thumbnails of images, videos and documents, it also allows you to see those files directly from Terminology. + +You can watch a following demonstrations video created by the Terminology developer (the video quality isn’t clear, but still it’s enough to get the idea about Terminology). + + + +- [Terminology][16] + +### 16. Xfce4 terminal ### + +Xfce terminal is a lightweight modern and easy to use terminal emulator specially designed for Xfce desktop environment. The latest release of xfce terminal has some new cool features such as search dialog, tab color changer, drop-down console like Guake or Yakuake and many more. + +![Xfce Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/xfce-terminal.jpg) + +Xfce Terminal + +- [Xfce4 Terminal][17] + +### 17. xterm ### + +The xterm application is a standard terminal emulator for the X Window System. It maintain DEC VT102 and Tektronix 4014 compatible terminals for applications that can’t use the window system directly. + +![xterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/xterm.jpg) + +xterm Terminal + +- [xterm][18] + +### 18. LilyTerm ### + +The LilyTerm is a another less known open source terminal emulator based off of libvte that desire to be fast and lightweight. LilyTerm also include some key features such as: + +- Support for tabbing, coloring and reordering tabs +- Ability to manage tabs through keybindings +- Support for background transparency and saturation. +- Support for user specific profile creation. +- Several customization options for profiles. +- Extensive UTF-8 support. + +![Lilyterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Lilyterm.jpg) + +Lilyterm Terminal + +- [LilyTerm][19] + +### 19. Sakura ### + +The sakura is a another less known Unix style terminal emulator developed for command line purpose as well as text-based terminal programs. Sakura is based on GTK and livte and provides not more advanced features but some customization options such as multiple tab support, custom text color, font and background images, speedy command processing and few more. + +![Sakura Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/sakura.jpg) + +Sakura Terminal + +- [Sakura][20] + +### 20. rxvt-unicode ### + +The rxvt-unicode (also known as urxvt) is a yet another highly customizable, lightweight and fast terminal emulator with xft and unicode support was developed by Marc Lehmann. It got some outstanding features such as support for international language via Unicode, the ability to display multiple font types and support for Perl extensions. + +![rxvt unicode](http://www.tecmint.com/wp-content/uploads/2014/01/rxvt-unicode.png) + +rxvt unicode + +- [rxvt-unicode][21] + +If you know any other capable Linux terminal emulators that I’ve not included in the above list, please do share with me using our comment section. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-terminal-emulators/ + +作者:[Ravi Saive][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/admin/ +[1]:https://launchpad.net/terminator +[2]:http://www.tecmint.com/terminator-a-linux-terminal-emulator-to-manage-multiple-terminal-windows/ +[3]:http://tilda.sourceforge.net/tildaabout.php +[4]:https://github.com/Guake/guake +[5]:http://extragear.kde.org/apps/yakuake/ +[6]:http://roxterm.sourceforge.net/index.php?page=index&lang=en +[7]:http://www.eterm.org/ +[8]:http://sourceforge.net/projects/rxvt/ +[9]:http://sourceforge.net/projects/wterm/ +[10]:http://wiki.lxde.org/en/LXTerminal +[11]:http://konsole.kde.org/ +[12]:https://github.com/unconed/TermKit +[13]:http://st.suckless.org/ +[14]:https://help.gnome.org/users/gnome-terminal/stable/ +[15]:http://finalterm.org/ +[16]:http://www.enlightenment.org/p.php?p=about/terminology +[17]:http://docs.xfce.org/apps/terminal/start +[18]:http://invisible-island.net/xterm/ +[19]:http://lilyterm.luna.com.tw/ +[20]:https://launchpad.net/sakura +[21]:http://software.schmorp.de/pkg/rxvt-unicode \ No newline at end of file From b39dcdba744df75f2c91ef6f7b12153e1c560c73 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 26 May 2015 15:13:31 +0800 Subject: [PATCH 0967/2517] Finish the translation by ZTinoZ --- ... Things to Do After Installing Ubuntu 15.04 Desktop.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {sources => translated}/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md (95%) diff --git a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/translated/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md similarity index 95% rename from sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md rename to translated/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index f9c8bc9bc1..e806e8e436 100644 --- a/sources/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/translated/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -1,4 +1,4 @@ -安装完Ubuntu 15.04桌面后要做的16件事 +安装完Ubuntu 15.04桌面后要做的15件事 ================================================================================ 本教程适用于新手和在自己的电脑上安装好Ubuntu 15.04 “Vivid Vervet” 桌面之后为了自定义自己的系统并安装一些基本程序作为日常使用的已经做了一些准备的人。 @@ -254,7 +254,7 @@ Enable Browser Support ![Opera Browser Support](http://www.tecmint.com/wp-content/uploads/2015/04/opera.jpg) Opera Browser Support -To install Chromium Open Source browser issue the following command on Terminal. +想要安装Chromium开源浏览器请在终端上输入以下命令: $ sudo apt-get install chromium-browser @@ -275,13 +275,13 @@ Tweak Tool Settings ![Tweak Tool: System Information](http://www.tecmint.com/wp-content/uploads/2015/04/tweak-system-info.jpg) Tweak Tool: System Information -After you have installed all this bunch of software, you might want to clean your system in order to free some space on the hard drive, by issuing the following commands: +在你安装好这一连串软件之后,你或许想要清理一下你的系统来释放一点硬盘上的空间,输入以下命令即可: $ sudo apt-get -y autoremove $ sudo apt-get -y autoclean $ sudo apt-get -y clean -This are just a few tweaks and programs that an average user might install and use on Ubuntu 15.04 Desktop for daily basic utilization. For more advanced programs, features and utilities use Ubuntu Software Center or consult Ubuntu Wiki webpage. +这只是tweaks工具中的其中一些和普通用户日常生活中可能会在Ubuntu 15.04桌面上安装使用的程序。想要了解更多高级的程序,特性和功能,请使用Ubuntu Software Center或查阅Ubuntu Wiki主页。 -------------------------------------------------------------------------------- From 83d09aabc862795bd30f75273b23c320fb5adb9e Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 26 May 2015 15:37:16 +0800 Subject: [PATCH 0968/2517] PUB:20150331 Linux Email App Geary Updated--How To Install It In Ubuntu @ictlyh --- ...ry Updated--How To Install It In Ubuntu.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) rename {translated/tech => published}/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md (78%) diff --git a/translated/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md b/published/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md similarity index 78% rename from translated/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md rename to published/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md index c5920123c6..da976c42d0 100644 --- a/translated/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md +++ b/published/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md @@ -1,20 +1,21 @@ -Linux Email应用 Geary 更新了 — 如何在Ubuntu上安装 +Linux Email应用 Geary 更新了 ================================================================================ **Geary,Linux上流行的桌面email客户端,更新到版本0.10了 — 并且有了很多新的功能。** ![elementary OS上运行的旧版本的Geary](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/geary.jpg) -elementary OS上运行的旧版本的Geary -Geary 0.10有一些可惜的用户界面改进以及额外的UI选项,包括: +*elementary OS上运行的旧版本的Geary* -- 新增: 可以对归档,删除以及移动做'Undo'操作 +Geary 0.10有一些不错的用户界面改进以及额外的UI功能,包括: + +- 新增: 可以撤销归档、删除以及移动等操作 - 新增: 在2列或者2列布局之间切换 - 新的 “split header bar” — 改进邮件列表,发件人布局 - 新的快捷键 — 使用j/k切换到上/下一封邮件 -根据Yorba介绍,这次更新还提出了一个 **全新的全文检索算法** ,用来改进Geary的搜索体验。 +根据Yorba介绍,这次更新还引入了一个**全新的全文检索算法** ,用来改进Geary的搜索体验。 -这个更新应该能平息一下对应用搜索能力的抱怨,那些经常觉得Geary返回的搜索结果仅仅是包装软件自身"看起来和查询语句毫不相关"的观点。 +这个更新应该能平息一下对该应用的搜索能力的抱怨:Geary返回的搜索结果就如同软件自己所宣称的“看起来和查询语句毫不相关”。 > ‘Yorba 建议所有这个软件客户端的用户升级到这个版本’ @@ -36,7 +37,7 @@ Yorba的最新版本可以从GNOME的Git账户下载可编译的源代码。但 Ubuntu用户想知道如何在 **14.04,14.10** 以及 **15.04**(那些更新爱好者) 上安装Geary 0.10。 -官方的Youba PPA包括了 **Geary最新版本** 以及Shotwell(照片管理器)和[California][2](日历应用)。请注意添加这个PPA会使你电脑上任何已经安装的这些应用更新到最近的版本。 +官方的Youba PPA包括了 **Geary 最新版本** 以及Shotwell(照片管理器)和[California][2](日历应用)。请注意添加这个PPA会使你电脑上任何已经安装的这些应用更新到最近的版本。 Capiche? Coolio. @@ -52,7 +53,7 @@ Capiche? Coolio. 完成后,打开你的桌面环境应用启动面板并查找‘Geary’图标。点击它,添加你的账户并查看[通过信息高速公路下载了什么][3],开始使用简单的图形界面吧。 -**别忘记:你可以通过电子邮件告诉我们你想看的新闻,应用建议,以及任何你想我们包括的东西,直接点击joey@oho.io** +**别忘记:你可以通过电子邮件告诉我们你想看的新闻,应用建议,以及任何你想我们包括的东西。** -------------------------------------------------------------------------------- @@ -60,7 +61,7 @@ via: http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update 作者:[Joey-Elijah Sneddon][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 78efea90018dd12a6dfccd6bde1c9cbb1aa2bf55 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 26 May 2015 15:59:50 +0800 Subject: [PATCH 0969/2517] PUB:20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen @GOLinux --- ...ing Session Icons to Ubuntu Login Screen.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md (61%) diff --git a/translated/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md b/published/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md similarity index 61% rename from translated/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md rename to published/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md index c6c195585e..fe25f3f6dc 100644 --- a/translated/tech/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md +++ b/published/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md @@ -1,26 +1,28 @@ -‘Unity Greeter标识卡’——将丢失的会话带回Ubuntu登录屏幕 +‘Unity Greeter Badges’:将丢失的会话图标带回Ubuntu登录屏幕 ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/unity-greeter-badges-750x321.jpg) -**Ubuntu 15.04中的一个新包解决了我对Unity Greeter抱有的微词:缺乏其它像Cinnamon这样的Linux桌面会话的标牌式图标。** +新出现在**Ubuntu 15.04中的一个软件包解决了我对Unity 欢迎屏的微词:像Cinnamon这样的其它Linux桌面会话没有徽章图标。** -我知道这有点吹毛求疵了;这只是对大多数人而言几乎毫无影响的视觉裂痕而已。但是这种不一致性时时刻刻缠绕着我,让我不胜其烦,因为Ubuntu自带了大量的会话,包括Unity、GNOME和KDE。其它桌面环境,包括它自己的一些跳制品,像Xubuntu,都默认在会话切换列表和主用户界面显示了一个朴素的白点。 +我知道这有点吹毛求疵了;这只是对大多数人而言几乎毫无影响的视觉瑕疵罢了。但是这种不一致性时时刻刻缠绕着我,让我不胜其烦,因为Ubuntu的一些会话带有徽章图标,包括Unity、GNOME和KDE。而剩下的其它桌面环境,包括它自己的一些旁系产品,像Xubuntu,只会在会话切换列表和主用户界面显示了一个不能再简单的白点。 -这些点点们造成的这种不一致性刺激着神经,即使它只是稍纵即逝,但这种刺激不仅仅来自设计,也来自可用性方面。标牌式的标志符号对于让我们知道我们即将登陆到哪个会话很有帮助。 +这些点点们造成的这种不一致性刺激着我的神经,即使它只是稍纵即逝,但这种刺激不仅仅来自设计,也来自可用性方面。标牌式的标志符号对于让我们知道我们即将登陆到哪个会话很有帮助。 例如,你能告诉我们这个是个什么会话呢? ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/what-session-is-this-750x247.jpg) -没有必要这样做啊。构建Unity Greeter,就是为了让桌面环境开发者能够部署标识卡到欢迎屏幕中(有些确实这样做了)。但在许多情况下,像MATE,它的包来自上游的Debian,想要移植一个“Ubuntu专用的补丁包”不太可取,也不太可能。 +Budgie? 也许是 MATE? 也能是 Cinnamon……我必须点开它才能知道。 + +没有必要这样做啊。构建Unity Greeter,就是为了让桌面环境开发者能够部署徽章到欢迎屏幕中(有些确实这样做了)。但在许多情况下,像MATE,它的包来自上游的Debian,想要移植一个“Ubuntu专用的补丁包”不太可取,也不太可能。 ### 一个解决方案出炉了 ### -有经验的Debian维护者[Doug Torrance][1]得到了修复该可用性裂痕的解决方案。与其依赖桌面制造者自己来添加品牌式标识卡到他们的包中,与其给Ubuntu增加维护它的责任重担,Torrance还不如自己创建了一个独立的‘unity-greeter-badges’包来收容它们。 +一位有经验的Debian维护者[Doug Torrance][1]有了修复该可用性瑕疵的解决方案。与其依赖桌面制造者自己来添加品牌式徽章到他们的包中,与其给Ubuntu增加维护它的责任重担,Torrance还不如自己创建了一个独立的‘unity-greeter-badges’包来收容它们。 承担起了直接提供会话标志的假定责任后,该包确保能同时迎合新旧窗口管理器、会话和桌面。 -在30个左右的桌面环境中,它为以下桌面捆绑了新的会话标识卡: +在30个左右的桌面环境列表中,它为以下桌面捆绑了新的会话徽章: - Xubuntu - Cinnamon @@ -46,7 +48,7 @@ via: http://www.omgubuntu.co.uk/2015/01/unity-greeter-badges-brings-missing-sess 作者:[Joey-Elijah Sneddon][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 82ddcd4baa595998803ef07247f826523e6f4a49 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Tue, 26 May 2015 20:30:47 +0800 Subject: [PATCH 0970/2517] [Translated] 20150520 How to Use Docker Machine with a Cloud Provider.md --- ...se Docker Machine with a Cloud Provider.md | 149 ------------------ ...se Docker Machine with a Cloud Provider.md | 148 +++++++++++++++++ 2 files changed, 148 insertions(+), 149 deletions(-) delete mode 100644 sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md create mode 100644 translated/tech/20150520 How to Use Docker Machine with a Cloud Provider.md diff --git a/sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md b/sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md deleted file mode 100644 index 1539b4e751..0000000000 --- a/sources/tech/20150520 How to Use Docker Machine with a Cloud Provider.md +++ /dev/null @@ -1,149 +0,0 @@ -Translating by goreliu ... - -How to Use Docker Machine with a Cloud Provider -================================================================================ -Hi everyone, today we'll learn how we can use Docker Machine to deploy Docker host in various Cloud Provider Platforms. Docker Machine is an application that helps to create Docker hosts on our computer, on cloud providers and inside our own data center. It provides easy solution for creating servers, installing Docker on them and then configuring the Docker client according the users configuration and requirements. The driver APIs works for provisioning Docker on a local machine, on a virtual machine in the data center, or on a public cloud instance. Docker Machine is supported on Windows, OSX, and Linux and is available for installation as one standalone binary. It enables us to take full advantage of ecosystem partners providing Docker-ready infrastructure, while still accessing everything through the same interface. It makes people able to deploy the docker containers in the respective cloud platform pretty fast and in pretty easy way with just a single command. - -### 1. Installing Docker Machine ### - -Docker Machine supports awesome on every Linux Operating System. First of all, we'll need to download the latest version of Docker Machine from the Github site . Here, we'll use curl to download the latest version of Docker Machine ie 0.2.0 . - -For 64 Bit Operating System - - # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine - -For 32 Bit Operating System - - # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386 > /usr/local/bin/docker-machine - -After downloading the latest release of Docker Machine, we'll make the file named docker-machine under /usr/local/bin/ executable using the command below. - - # chmod +x /usr/local/bin/docker-machine - -After doing the above, we'll wanna ensure that we have successfully installed docker-machine. To check it, we can run the docker-machine -v which will give output of the version of docker-machine installed in our system. - - # docker-machine -v - -![Installing Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) - -To enable Docker commands on our machines, make sure to install the Docker client as well by running the command below. - - # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker - # chmod +x /usr/local/bin/docker - -### 2. Creating Machine ### - -After finish installing Docker Machine in our Linux box, we'll wanna deploy a docker host into the cloud server. Docker Machine includes drivers for several popular Cloud Platforms such as Digital Ocean, Amazon Web Services (AWS), Microsoft Azure, Google Cloud Computing and many other which enables us to create same interface of docker deployment in different platforms. So, here in this tutorial we'll gonna deploy the Docker Host into the Digital Ocean server using digitalocean driver API. Here, we'll need to run command docker-machine create followed by --driver flag as digitalocean with --digitalocean-access-token flag as the API Token provided by the [Digital Ocean Control Panel][1] and at last the name of the docker host we just created. To do so, we'll need to run the following command as. - - # docker-machine create --driver digitalocean --digitalocean-access-token linux-dev - - # eval "$(docker-machine env linux-dev)" - -![Docker Machine Digitalocean Cloud](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-digitalocean-cloud.png) - -**Note**: Here, linux-dev is the name of the machine we are wanting to create. is a security key which can be generated from the Digital Ocean Control Panel of the account holder of Digital Ocean Cloud Platform. To retrieve that key, we simply need to login to our Digital Ocean Control Panel then click on API, then click on Generate New Token and give it a name tick on both Read and Write. Then we'll get a long hex key, thats the now, simply replace it into the command above. - -After running the above command, we can see in our Digital Ocean Droplet Panel that a droplet has been created with default configuration. - -![DigitalOcean Droplet Panel](http://blog.linoxide.com/wp-content/uploads/2015/05/digitalocean-droplet-panel.png) - -For ease and convenience, docker-machine deploys the droplet with default configuration choosing setting such as images that the VPS is based on we can override the default configuration as our need. We can do that by simply adding the flags respective to our need and requirement of the Droplet. Here are some flags for digitalocean that we can add to override the default configuration of the Docker Machine. - - --digitalocean-image "ubuntu-14-04-x64" for Choosing Droplet Image - --digitalocean-ipv6 enable to enable IPv6 Networking - --digitalocean-private-networking enable to enable Private Networking - --digitalocean-region "nyc3" to choose Region to deploy the Droplet - --digitalocean-size "512mb" to select the RAM size and type of deployment. - -If you are wanting to use docker-machine with other cloud providers and need to override the default configuration, we can run following command to get the list of flags for every platforms supported by Docker Machine by default. - - # docker-machine create -h - -### 3. Selecting Active Host ### - -After deploying the droplet, we wanna run a docker container straight away but before that, we'll need to check whether the active host is the required machine or not. To see that, we can run the following command. - - # docker-machine ls - -![Docker Machine List](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-ls.png) - -The active host can be identified by "*" in the ACTIVE column. - -Now, if we need to switch the active host to the required machine, we can simply run the following command. - - # docker-machine active linux-dev - -**Note**: Here, linux-dev is the Machine name that we are wanting to make as ACTIVE and run Docker Container on top of it. - -### 4. Running a Docker Container ### - -Now, after selecting our active host, we'll wanna finally run a docker container out of the box. Now, to give it a test, we'll run a busybox container out of it by running docker run busybox command with echo hello world so that we can get the output of the container. - - # docker run busybox echo hello world - -Note: If you are trying to deploy a docker container using a 32 Bit Operating System running in the host, its good idea to use SSH to run the docker commands. So, you can simply skip this step and follow the SSH step. - -### 5. SSH with Docker Machine ### - -If we want to control over the machine or the droplet that we just deployed with Docker Machine, we can ssh into the server using docker-machine ssh as command. - - # docker-machine ssh - -![Docker Machine SSH](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-ssh.png) - -Now, after ssh into the machine, we can run any docker containers into it. Here we'll run an nginx server into it. - - # docker run -itd -p 80:80 nginx - -After finishing up with SSH, we need to run exit to exit from the droplet or server. - - # exit - -### 5. Removing Hosts ### - -In order to remove the active host and all its images, containers, we can use docker-machine rm command as shown below. - - # docker-machine rm linux-dev - -![Docker Machine Remove All](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-remove-machine.png) - -To check whether the host has been removed or not, we can run docker-machine ls command. - - # docker-machine ls - -![Docker Machine Remove Check](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-remove-check.png) - -### 6. Adding a host without a driver ### - -We can add a host to Docker which only has a URL and no driver. It can be used an alias for an existing host, so we don’t have to type out the URL every time we run a Docker command. - - $ docker-machine create --url=tcp://104.131.50.36:2376 custombox - -### 7. Managing the Hosts ### - -If you are finished working with the running docker, we can simply run **docker-machine stop** command to stop the whole hosts which are Active and if wanna start again, we can run **docker-machine start**. - - # docker-machine stop - # docker-machine start - -You can also specify a machine name to stop or start using the host name as an argument. - - $ docker-machine stop linux-dev - $ docker-machine start linux-dev - -### Conclusion ### - -Docker Machine is really and awesome tool for deploying servers with Docker Container running. In this article we demostrated with Digital Ocean Platform but there are other platforms also available like Amazon Web Service, Google Cloud Computing and more which is supported by Docker Machine and includes driver APIs of them. It has made easy for fast and secure deployment of Docker Containers into several different Platforms with Docker Machine. As Docker Machine is still under Beta, so it is recommended not to use docker-machine in production. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/use-docker-machine-cloud-provider/ - -作者:[Arun Pyasi][a] -译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://cloud.digitalocean.com/settings/applications \ No newline at end of file diff --git a/translated/tech/20150520 How to Use Docker Machine with a Cloud Provider.md b/translated/tech/20150520 How to Use Docker Machine with a Cloud Provider.md new file mode 100644 index 0000000000..acf052d493 --- /dev/null +++ b/translated/tech/20150520 How to Use Docker Machine with a Cloud Provider.md @@ -0,0 +1,148 @@ +如何在云服务提供商的机器使用Docker Machine +================================================================================ +大家好,今天我们来学习如何使用Docker Machine在各种云服务提供商的平台部署Docker。Docker Machine是一个可以帮助我们在自己的电脑、云服务提供商的机器以及我们数据中心的机器上创建Docker机器的应用程序。它为创建服务器、在服务器中安装Docker、根据用户需求配置Docker客户端提供了简单的解决方案。驱动API对本地机器、数据中心的虚拟机或者公用云机器都适用。Docker Machine支持Windows、OSX和Linux,并且提供一个独立的二进制文件,可以直接使用。它让我们可以充分利用支持Docker的基础设施的生态环境合作伙伴,并且使用相同的接口进行访问。它让人们可以使用一个命令来简单而迅速地在不同的云平台部署Docker容器。 + + +### 1. 安装Docker Machine ### + +Docker Machine可以很好地支持每一种Linux发行版。首先,我们需要从Github网站下载最新版本的。这里我们使用curl来下载目前最新0.2.0版本的Docker Machine。 + +在64位操作系统运行: + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine + +在32位操作系统运行: + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386 > /usr/local/bin/docker-machine + +下载最新版本的Docker Machine并将docker-machine文件放到了/usr/local/bin/后,添加执行权限: + + # chmod +x /usr/local/bin/docker-machine + +完成如上操作后,我们需要确认已经成功安装docker-machine了。可以运行如下命令检查,它会输出系统中docker-machine的版本: + + # docker-machine -v + +![Installing Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) + +另外机器上需要有docker命令,可以使用如下命令安装: + + # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker + # chmod +x /usr/local/bin/docker + +### 2. 创建机器 ### + +在自己的Linux机器上安装好了Docker Machine之后,我们想要将一个docker虚拟机部署到云服务器上。Docker Machine支持几个流行的云平台,如igital Ocean、Amazon Web Services(AWS)、Microsoft Azure、Google Cloud Computing等等,所以我们可以在不同的平台使用相同的接口来部署Docker。本文中我们会使用digitalocean驱动在Digital Ocean的服务器上部署Docker,--driver选项指定digitalocean驱动,--digitalocean-access-token选项指定[Digital Ocean Control Panel][1]提供的API Token,命令最后的是我们创建的Docker虚拟机的机器名。运行如下命令: + + # docker-machine create --driver digitalocean --digitalocean-access-token linux-dev + + # eval "$(docker-machine env linux-dev)" + +![Docker Machine Digitalocean Cloud](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-digitalocean-cloud.png) + +**注意**: 这里linux-dev是我们将要创建的机器的名称。``是一个安全key,可以在Digtal Ocean Control Panel生成。要找到这个key,我们只需要登录到我们的Digital Ocean Control Panel,然后点击API,再点击Generate New Token,填写一个名称,选上Read和Write。然后我们就会得到一串十六进制的key,那就是``,简单地替换到上边的命令中即可。 + +运行如上命令后,我们可以在Digital Ocean Droplet Panel中看到一个具有默认配置的droplet已经被创建出来了。 + +![DigitalOcean Droplet Panel](http://blog.linoxide.com/wp-content/uploads/2015/05/digitalocean-droplet-panel.png) + +简便起见,docker-machine会使用默认配置来部署Droplet。我们可以通过增加选项来定制我们的Droplet。这里是一些digitalocean相关的选项,我们可以使用它们来覆盖Docker Machine所使用的默认配置。 + + --digitalocean-image "ubuntu-14-04-x64" 是选择Droplet的镜像 + --digitalocean-ipv6 enable 是启用IPv6网络支持 + --digitalocean-private-networking enable 是启用专用网络 + --digitalocean-region "nyc3" 是选择部署Droplet的区域 + --digitalocean-size "512mb" 是选择内存大小和部署的类型 + +如果你想在其他云服务使用docker-machine,并且想覆盖默认的配置,可以运行如下命令来获取Docker Mackine默认支持的对每种平台适用的参数。 + + # docker-machine create -h + +### 3. 选择活跃机器 ### + +部署Droplet后,我们想马上运行一个Docker容器,但在那之前,我们需要检查下活跃机器是否是我们需要的机器。可以运行如下命令查看。 + + # docker-machine ls + +![Docker Machine List](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-ls.png) + +ACTIVE一列有“*”标记的是活跃机器。 + +现在,如果我们想将活跃机器切换到需要的机器,运行如下命令: + + # docker-machine active linux-dev + +**注意**:这里,linux-dev是机器名,我们打算激活这个机器,并且在其中运行Docker容器。 + +### 4. 运行一个Docker容器 ### + +现在,我们已经选择了活跃机器,就可以运行Docker容器了。可以测试一下,运行一个busybox容器来执行`echo hello word`命令,这样就可以得到输出: + + # docker run busybox echo hello world + +注意:如果你试图在一个装有32位操作系统的宿主机部署Docker容器,使用SSH来运行docker是个好办法。这样你就可以简单跳过这一步,直接进入下一步。 + +### 5. SSH到Docker机器中 ### + +如果我们想在机器或者Droplet上控制之前部署的Docker机器,可以使用docker-machine ssh命令来SSH到机器上: + + # docker-machine ssh + +![Docker Machine SSH](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-ssh.png) + +SSH到机器上之后,我们可以在上边运行任何Docker容器。这里我们运行一个nginx: + + # docker run -itd -p 80:80 nginx + +操作完毕后,我们需要运行exit命令来退出Droplet或者服务器。 + + # exit + +### 5. 删除机器 ### + +删除在运行的机器以及它的所有镜像和容器,我们可以使用docker-machine rm命令: + + # docker-machine rm linux-dev + +![Docker Machine Remove All](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-remove-machine.png) + +使用docker-machine ls命令检查是否成功删除了: + + # docker-machine ls + +![Docker Machine Remove Check](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-remove-check.png) + +### 6. 在不使用驱动的情况新增一个机器 ### + +我们可以在不使用驱动的情况往Docker增加一台机器,只需要一个URL。它可以使用一个已有机器的别名,所以我们就不需要每次在运行docker命令时输入完整的URL了。 + + $ docker-machine create --url=tcp://104.131.50.36:2376 custombox + +### 7. 管理机器 ### + +如果你已经让Docker运行起来了,可以使用简单的**docker-machine stop**命令来停止所有正在运行的机器,如果需要再启动的话可以运行**docker-machine start**: + + # docker-machine stop + # docker-machine start + +你也可以使用如下命令来使用机器名作为参数来将其停止或启动: + + $ docker-machine stop linux-dev + $ docker-machine start linux-dev + +### 总结 ### + +Docker Machine是一个非常棒的工具,可以使用Docker容器快速地部署服务。文中我们使用Digital Ocean Platform作演示,但Docker Machine还支持其他平台,如Amazon Web Service、Google Cloud Computing。使用Docker Machine,快速、安全地在几种不同平台部署Docker容器变得很简单了。因为Docker Machine还是Beta版本,不建议在生产环境使用。如果你有任何问题、建议、反馈,请在下方的评论框中写下来,我们会改进或者更新我们的内容。谢谢!享受吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/use-docker-machine-cloud-provider/ + +作者:[Arun Pyasi][a] +译者:[goreliu](https://github.com/goreliu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://cloud.digitalocean.com/settings/applications \ No newline at end of file From 5a16fa04d468135a0b189691cb3e550556700ed5 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Tue, 26 May 2015 22:47:57 +0800 Subject: [PATCH 0971/2517] finish translation --- ...u Linux Hit 200 Million Users This Year.md | 40 ------------------- ...u Linux Hit 200 Million Users This Year.md | 38 ++++++++++++++++++ 2 files changed, 38 insertions(+), 40 deletions(-) delete mode 100644 sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md create mode 100644 translated/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md diff --git a/sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md b/sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md deleted file mode 100644 index 8a79781a22..0000000000 --- a/sources/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md +++ /dev/null @@ -1,40 +0,0 @@ -translating by wwy-hust - -Will Ubuntu Linux Hit 200 Million Users This Year? -================================================================================ -It's been four years and two weeks since Mark Shuttleworth expressed his goal of "200 million users of Ubuntu in 4 years." While Ubuntu's presence has continued to increase over the past four years, it doesn't look like that goal has been realized yet or will be by the end of the calendar year. - -It was back at [UDS Budapest][1] in May of 2011 when Shuttleworth expressed a goal of 200 million Ubuntu users in four years. - -![](http://www.phoronix.net/image.php?id=uds_budapest&image=budapest_phoronix_03_show&w=1920) - -Last I heard there was "tens of millions" of Ubuntu Linux users, but haven't seen any reliable reports anywhere of the Ubuntu user-base being close to 200 million. The latest monthly statistics from Valve show [the Linux gaming population being below 1%][2] compared to Windows and OS X. Most usage statistics based on web metrics and other data tend to put the total Linux user-base at just a few percent. - -Aside from desktop installations, Ubuntu at least has made substantial inroads with cloud and server deployments over the past four years and have proven to be a contender with Red Hat Enterprise Linux on such fronts. Ubuntu has also proven itself quite well on ARM hardware. When Mark was coming up with his goal in four years, he was probably thinking that Ubuntu Phone/Touch would be much further along than where it is now: just having one device available in the EU and [a second currently in China][3] and [the Ubuntu Touch software stack still maturing][4] with [major work on key apps still needed][5], etc. - -![](http://www.phoronix.net/image.php?id=0x2015&image=shuttleworth_200_million_show&w=1920) - -It's also been three years since the Canonical claim of [Ubuntu would soon ship on 5% of PCs][6]. The 5% claim was for worldwide PC shipments, but even three years later, I have a hard time believing that... At least in the US and Europe I still very rarely see Ubuntu preloads on systems within brick and mortar stores while the major Internet retailers / OEMs still tend to offer Linux on a few select PC models, sans Chrome OS / Android devices. - -Another lofty, unrelated goal that went unreached by the open-source community was [GNOME owning 10% of the global desktop market by 2010][7]. Five years later, there's no indication they're even close to reaching that 10x10 milestone. - -How large do you think the Ubuntu user-base is today? How large do you think the Ubuntu (or Linux) user-base will grow in the years to come? Share with us your thoughts by commenting on this article. - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=news_item&px=2015-200-Million-Goal-Retro - -作者:[Michael Larabel][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.michaellarabel.com/ -[1]:http://www.phoronix.com/vr.php?view=16002 -[2]:http://www.phoronix.com/scan.php?page=news_item&px=Steam-April-2015-1-Drop -[3]:http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-MX4-In-China -[4]:http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-Calculator-Reboot -[5]:http://www.phoronix.com/scan.php?page=news_item&px=MTgzOTM -[6]:http://www.phoronix.com/scan.php?page=news_item&px=MTA5ODM -[7]:https://www.phoronix.com/scan.php?page=news_item&px=Nzg1Mw diff --git a/translated/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md b/translated/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md new file mode 100644 index 0000000000..45c572b1bb --- /dev/null +++ b/translated/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md @@ -0,0 +1,38 @@ +Ubuntuڽﵽ2ûô +================================================================================ +Mark ShuttleworthĿꡰ4Ubuntuûﵽ2ڡѾȥܡUbuntuûڹȥһֱĿĿǰδʵ֣ҿڽʵ֡ + +20115[UDS ˹][1]ShuttleworthʾUbuntu4ڴﵽ2û + +![](http://www.phoronix.net/image.php?id=uds_budapest&image=budapest_phoronix_03_show&w=1920) + +һUbuntuС1ǧûDzûκοɿıUbuntuûӽ2ڡValveͳƱWindowsOS Xû[ʹLinuxϷûı1%][2]WebͳƷʽڱLinuxûֻռٵIJ֡ + +Ʋ治̸Ubuntuڹȥƺͷõ˴ռʣұ֤Red Hat EnterpriseߡUbuntu֤ԻARMӲʮѺáMarkǰĿʱܿǵUbuntu Phone/TouchĿǰ״áUbuntu Phone/TouchĿǰŷ޺[й][3]ã[Ubuntu Touchڳ·][4][ҪĹؼӦóĹ][5]ȡ + +![](http://www.phoronix.net/image.php?id=0x2015&image=shuttleworth_200_million_show&w=1920) + +Canonical[Ubuntuý½5%PC][6]Ҳѹȥ3ꡣ5%ĿȫPCװٹ3꣬ɺĿʵ֡ŷޣʵ꿴UbuntuΪԤװϵͳҪ/OEMضPCͺṩLinuxChrome OSAndroid豸 + +һɿԴĸ߰ءյĿ[GNOME2010ռȫг10%ķݶ][7]ǰûκμǽӽ10%̱ + +ڽ죬ΪUbuntuûжأδļUbuntuLinuxûжأͨǷ뷨ɡ + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=news_item&px=2015-200-Million-Goal-Retro + +ߣ[Michael Larabel][a] +ߣ[ID](https://github.com/ID) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ + +[a]:http://www.michaellarabel.com/ +[1]:http://www.phoronix.com/vr.php?view=16002 +[2]:http://www.phoronix.com/scan.php?page=news_item&px=Steam-April-2015-1-Drop +[3]:http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-MX4-In-China +[4]:http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-Calculator-Reboot +[5]:http://www.phoronix.com/scan.php?page=news_item&px=MTgzOTM +[6]:http://www.phoronix.com/scan.php?page=news_item&px=MTA5ODM +[7]:https://www.phoronix.com/scan.php?page=news_item&px=Nzg1Mw \ No newline at end of file From 533113d693c3e59adffeee8a84908a2d2a95b16b Mon Sep 17 00:00:00 2001 From: wwy Date: Tue, 26 May 2015 23:21:23 +0800 Subject: [PATCH 0972/2517] [Translating] 20150310 FAQ--BSD.md --- sources/talk/20150310 FAQ--BSD.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150310 FAQ--BSD.md b/sources/talk/20150310 FAQ--BSD.md index 80f77ef656..65357e9559 100644 --- a/sources/talk/20150310 FAQ--BSD.md +++ b/sources/talk/20150310 FAQ--BSD.md @@ -1,3 +1,5 @@ +translating by wwy-hust + FAQ: BSD ================================================================================ ![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq1-large1.png) @@ -78,4 +80,4 @@ via: http://www.linuxvoice.com/faq-bsd-2/ [1]:http://www.openbsd.org/ [2]:http://www.freebsd.org/ [3]:http://www.netbsd.org/ -[4]:http://www.pcbsd.org/ \ No newline at end of file +[4]:http://www.pcbsd.org/ From d59b4519fee7086630e1b96f5ca2e9052e941f5a Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 27 May 2015 00:00:52 +0800 Subject: [PATCH 0973/2517] PUB:20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle @theo-l --- ...ications in a Linux System with Trickle.md | 300 +++++++++++++++++ ...ications in a Linux System with Trickle.md | 314 ------------------ 2 files changed, 300 insertions(+), 314 deletions(-) create mode 100644 published/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md delete mode 100644 translated/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md diff --git a/published/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/published/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md new file mode 100644 index 0000000000..ee64fab44a --- /dev/null +++ b/published/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md @@ -0,0 +1,300 @@ +指南:使用Trickle限制应用程序带宽占用 +================================================================================ + +有没有遇到过系统中的某个应用程序独占了你所有的网络带宽的情形?如果你有过这样的遭遇,那么你就会感受到Trickle这种带宽调整应用的价值。不管你是一个系统管理员还只是普通Linux用户,都需要学习如何控制应用程序的上下行速度,来确保你的网络带宽不会被某个程序霸占。 + +![Install Trickle Bandwidth Limit in Linux](http://www.tecmint.com/wp-content/uploads/2013/11/Bandwidth-limit-trickle.png) + +*在 Linux 上安装 Trickle 带宽限制* + +### 什么是 Trickle? ### + +Trickle是一个网络带宽调整工具,可以让我们管理应用程序的网络上下行速度,使得可以避免其中的某个应用程序霸占了全部或大部分可用的带宽。换句话说,Trickle可以让你基于单个应用程序来控制网络流量速率,而不是仅仅针对与单个用户——这是在客户端网络环境中经典的带宽调整情况。 + +### Trickle 是如何工作的?### + +另外,trickle 可以帮助我们基于应用来定义优先级,所以当对整个系统进行了全局限制设定,高优先级的应用依然会自动地获取更多的带宽。为了实现这个目标,trickle 对 TCP 连接上的套接字的数据发送、接收设置流量限制。我们必须注意到,除了影响传输速率之外,在这个过程中,trickle任何时候都不会以任何方式来改变其中的数据。 + +### Trickle不能做什么? ### + +这么说吧,唯一的限制就是,trickle不支持静态链接的应用程序或者具有SUID或SGID位设置的二进制程序,因为它使用动态链接的方式将其载入到需要调整的进程和其关联的网络套接字之间。 Trickle此时会在这两种软件组件之间扮演代理的角色。 + +由于trickle并不需要超级用户的权限来运行,所以用户可以设置他们自己的流量限制。可能这并不是你想要的,我们会探索如何使用全局设定来限制系统中的所有用户的流量限制。也即是说,此时系统中的每个用户具有管理各自的流量速率,但是无论如何,都会受到系统管理员给他们设置的总体限制。 + +在这篇文章中,我们会描述如何通过trickle在linux平台上管理应用程序使用的网络带宽。为了生成所需的流量,在此会在客户端(CentOS 7 server – dev1: 192.168.0.17)上使用 ncftpput 和 ncftpget, 在服务器(Debian Wheezy 7.5 – dev2: 192.168.0.15)上使用vsftpd 来进行演示。 相同的指令也可以在RedHat,Fedora和Ubuntu等系统使用。 + +#### 前提条件 #### + +1. 对于 RHEL/CentOS 7/6, [开启EPEL仓库][1]。这些用于企业版 Linux 的额外软件包是一个由Fedora项目维护的高质量、开源的软件仓库,而且百分之百与其衍生产品相兼容,如企业版本Linux和CentOS。 在这个仓库中trickle和ncftp两者都是可用的。 + +2. 按照如下方式安装ncftp: + + # yum update && sudo yum install ncftp [基于 RedHat 的系统] + # aptitude update && aptitude install ncftp [基于 Debian 的系统] + +3. 在单独的服务器上设置一个FTP服务器。需要注意的是,尽管FTP天生就不安全,但是仍然被广泛应用在安全性无关紧要的文件上传下载中。 在这篇文章中我们使用它来演示trickle的优点,同时它也会在客户端的标准输出流中显示传输速率。我们将是否在其它时间使用它放在一边讨论。 + + # yum update && yum install vsftpd [基于 RedHat 的系统] + # aptitude update && aptitude install vsftpd [基于 Debian 的系统] + + 现在,在FTP服务器上按照以下方式编辑 /etc/vsftpd/vsftpd.conf 文件。 + + anonymous_enable=NO + local_enable=YES + chroot_local_user=YES + allow_writeable_chroot=YES + + 在此之后,确保在你的当前会话中启动了vsftpd,并在之后的启动中让其自动启动。 + + # systemctl start vsftpd [基于 systemd 的系统] + # systemctl enable vsftpd + # service vsftpd start [基于 init 的系统] + # chkconfig vsftpd on + +4. 如果你选择在一个使用 SSH 密钥进行远程访问的 CentOS/RHEL 7中搭建FTP服务器,你需要一个密码受保护的用户账户,它能访问**root目录之外**的某个目录,并有能在其中上传和下载文件的权限。 + + 你可以通过在你的浏览器中输入以下的URL来浏览你的家目录。一个登录窗口会弹出来提示你输入FTP服务器中的有效的用户名和密码。 + + ftp://192.168.0.15 + + 如果验证成功,你就会看到你的家目录中的内容。该教程的稍后部分中,你将可以刷新页面来显示在你之前上传过的文件。 + + ![FTP Directory Tree](http://www.tecmint.com/wp-content/uploads/2013/11/FTP-Directory-Tree.png) + + *FTP 目录树* + +### 如何在Linux中安装 trickle ### + +1. 通过yum或aptitude来安装trickle. + + 为了确保能够成功安装,最好在安装工具之前,保证当前的安装包是最新的版本。 + + + # yum -y update && yum install trickle [基于 RedHat 的系统] + # aptitude -y update && aptitude install trickle [基于 Debian 的系统] + +2. 确认trickle是否对特定的二进制包有用。 + + 之前我们解释过,trickle只对使用动态或共享的库的二进制包有用。为了确认我们是否可以对某个特定的应用使用trickle,我们可以使用著名的ldd(列出动态依赖)工具。 特别地,我们会查看任何给定程序的动态依赖中其当前使用的glibc,因为其准确地定义了通过套接字通讯所使用的系统调用。 + + 对一个给定的二进制包执行以下命令来查看是否能对其使用trickle进行带宽调整: + + # ldd $(which [binary]) | grep libc.so + + 例如, + + # ldd $(which ncftp) | grep libc.so + + 其输出是: + + # libc.so.6 => /lib64/libc.so.6 (0x00007efff2e6c000) + + 输出中的括号中的字符可能在不同的系统平台有所不同,甚至相同的命令在不同的时候运行也会不同,因为其代表包加载到物理内存中的地址。 + + 如果上面的命令没有返回任何的结果,就说明这个二进制包没有使用libc包,因此trickle对其不能起到带宽调整的作用。 + +### 学习如何使用Trickle### + +最基本的用法就是使用其独立模式,通过这种方式,trickle用来显式地定义给定应用程序的上传下载速率。如前所述,为了简单,我们会使用相同的应用来进行上传下载测试。 + +#### 在独立模式下运行trickle#### + +我们会比较在有无trickle的情况下的上传下载速率, ‘-d’选项指示下载速率(KB/s单位),而'-u'选项指示相同单位的上传速率。另外我们会使用到‘-s’选项来指定trickle应该以独立模式运行。 + +以独立模式运行trickle的基本语法如下: + + # trickle -s -d [下载速率,KB/s] -u [上传速率,KB/s] + +为了能够让你自己运行以下样例,确保你在自己的客户端安装了trickle和ncftp(我的是192.168.0.17)。 + +**样例1:在有无trickle的情况下上传一个2.8 MB的PDF文件。** + +我们使用一个自由发布的[LInux基础知识PDF文件][2]来进行下面的测试。 + +你可以首先使用下面的命令将这个文件下载到你当前的工作目录中: + + # wget http://linux-training.be/files/books/LinuxFun.pdf + +下面是在没有trickle的情况下将一个文件上传到我们的FTP服务器的语法: + + # ncftpput -u username -p password 192.168.0.15 /remote_directory local-filename + +其中的 /remote_directory 是相对于该用户的家目录的上传路径,而local-filename是一个你当前工作目录中的文件。 + +特别的是,在没有trickle的情形下,我们可以得到上传峰值速率52.02MB/s(请注意,这个不是真正的平均上传速率,而是峰值开始的瞬时值),而且这个文件几乎在瞬间就完成了上传。 + + # ncftpput -u username -p password 192.168.0.15 /testdir LinuxFun.pdf + +输出: + + LinuxFun.pdf: 2.79 MB 52.02 MB/s + +在使用trickle的情况下,我们会限制上传速率在5KB/s。在第二次上传文件之前,我们需要在目标目录中删除这个文件,否则ncftp就会通知我们在目标目录中已经存在了与上传文件相同的文件,从而不会执行文件的传输: + + # rm /absolute/path/to/destination/directory/LinuxFun.pdf + +然后: + + # trickle -s -u 5 ncftpput -u username -p password 111.111.111.111 /testdir LinuxFun.pdf + +输出: + + LinuxFun.pdf: 2.79 MB 4.94 kB/s + +在上面的样例中,我们看到平均的上传速率下降到了5KB/s。 + +**样例2:在有无trickle的情况下下载相同的2.8MB的PDF文件** + +首先,记得从原来的源目录中删除这个PDF: + + # rm /absolute/path/to/source/directory/LinuxFun.pdf + +请注意,下面的样例中将远程的文件下载到客户端机器的当前目录下,这是由FTP服务器的IP地址后面的“.”决定的。 + +没有trickle的情况下: + + # ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf + +输出: + + LinuxFun.pdf: 2.79 MB 260.53 MB/s + +在有trickle的情况下,限制下载速率在20KB/s: + + # trickle -s -d 30 ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf + +输出: + + LinuxFun.pdf: 2.79 MB 17.76 kB/s + +### 在监督[非托管]模式下运行Trickle ### + +trickle也可以按照/etc/trickled.conf文件中定义的一系列参数运行在非托管模式下。 这个文件定义了守护线程 trickled的行为以及如何管理trickle。 + +另外,如果你想要全局设置被所有的应用程序使用的话,我们就会需要使用trickle命令。 这个命令运行守护进程,并允许我们通过trickle定义所有应用程序共享的上传下载限制,不需要我们每次来进行指定。 + +例如,运行: + + # trickled -d 50 -u 10 + +会导致任何通过trickle运行的应用程序的上传下载速率分别限制在30kb/s和10kb/s。 + +请注意,你可以在任何时间都能确认守护线程trickled是否正在运行以及其运行参数: + + # ps -ef | grep trickled | grep -v grep + +输出: + + root 16475 1 0 Dec24 ? 00:00:04 trickled -d 50 -u 10 + +**样例3:在使用/不使用trickle的情形下上传一个 19MB 的mp4文件到我们的FTP服务器。** + +在这个样例中,我们会使用“He is the gift”的自由分发视频,可以通过这个[链接][3]下载。 + +我们将会在开始时通过以下的命令将这个文件下载到你的当前工作目录中: + + # wget http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 + +首先,我们会使用之前列出的命令来开启守护进程trickled: + + # trickled -d 30 -u 10 + +在不使用trickle时: + + # ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 + +输出: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 36.31 MB/s + +在使用trickle时: + + # trickle ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 + +输出: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 9.51 kB/s + +我们可以看到上面的输出,上传的速率下降到了约 10KB/s。 + +** 样例4:在使用/不使用trickle的情形下下载这个相同的视频 ** + +与样例2一样,我们会将该文件下载到当前工作目录中。 + +在没有trickle时: + + # ncftpget -u username -p password 192.168.0.15 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 + +输出: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 108.34 MB/s + +有trickle的时: + + # trickle ncftpget -u username -p password 111.111.111.111 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 + +输出: + + 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 29.28 kB/s + +上面的结果与我们之前设置的下载限速相对应(30KB/s)。 + +**注意:** 一旦守护进程开启之后,就没有必要使用trickle来为每个应用程序来单独设置限制。 + +如前所述,人们可以进一步地通过trickled.conf来客制化trickle的带宽速率调整,该文件的一个典型的分段有以下部分组成: + + [service] + Priority = + Time-Smoothing = + Length-Smoothing = + +其中, + +- [service] 用来指示我们想要对其进行带宽使用调整的应用程序名称 +- Priority 用来让我们为某个服务制定一个相对于其他服务高的优先级,这样就不允许守护进程管理中的一个单独的应用程序来占用所有的带宽。越小的数字代表更高的优先级。 +- Time-Smoothing [以秒计]: 定义了trickled让各个应用程序传输或接收数据的时间间隔。小的间隔值(0.1-1秒)对于交互式应用程序是理想的,因为这样会具有一个更加平滑的会话体验,而一个相对较大的时间间隔值(1-10秒)对于需要批量传输应用程序就会显得更好。如果没有指定该值,默认是5秒。 +- Length-smoothing [KB 单位]: 该想法与Time-Smoothing如出一辙,但是是基于I/O操作而言。如果没有指定值,会使用默认的10KB。 + +上述平滑值(Time-Smoothing、 Length-smoothing)的改变会被翻译为将指定的服务的使用一个间隔值而不是一个固定值。不幸的是,没有一个特定的公式来计算间隔值的上下限,主要依赖于特定的应用场景。 + +下面是一个在CentOS 7 客户端中的trickled.conf 样例文件(192.168.0.17): + + [ssh] + Priority = 1 + Time-Smoothing = 0.1 + Length-Smoothing = 2 + + [ftp] + Priority = 2 + Time-Smoothing = 1 + Length-Smoothing = 3 + +使用该设置,trickled会为SSH赋予比FTP较高的传输优先级。值得注意的是,一个交互进程,例如SSH,使用了一个较小的时间间隔值,然而一个处理批量数据传输的服务如FTP,则使用一个较大的时间间隔来控制之前的样例中的上传下载速率,尽管不是百分百的由trickled指定的值,但是也已经非常接近了。 + +### 总结 ### + +在该文章中,我们探索了使用trickle在基于Fedora发行版和Debian衍生版平台上来限制应用程序的带宽使用。也包含了其他的可能用法,但是不对以下情形进行限制: + +- 限制系统工具的下载速度,例如[wget][4],或 BT客户端. +- 限制你的系统的包管理工具[`yum`][5]更新的速度 (如果是基于Debian系统的话,其包管理工具为[`aptitude`][6])。 +- 如果你的服务器是在一个代理或防火墙后面(或者其本身即是代理或防火墙的话),你可以使用trickle来同时设定下载和上传速率,或者客户端或外部通讯的速率。 + +欢迎提问或留言。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ + +作者:[Gabriel Cánepa][a] +译者:[theo-l](https://github.com/theo-l) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:https://linux.cn/article-2324-1.html +[2]:http://linux-training.be/files/books/LinuxFun.pdf +[3]:http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 +[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ +[5]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[6]:http://www.tecmint.com/dpkg-command-examples/ diff --git a/translated/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/translated/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md deleted file mode 100644 index b8ed29b47c..0000000000 --- a/translated/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md +++ /dev/null @@ -1,314 +0,0 @@ -如何在linux上使用Trickle来限制应用程序的网络宽带使用. -================================================================================ -有没有遇到过系统中的某个应用程序独占了你所有的网络宽带的情形?如果你有过这样的遭遇,那么你就会感受到Trickle宽带调整应用角色的价值.不管你是一个系统管理员还是仅仅Linux用户,都需要学习如何控制应用程序的上下行速度,来确保你的网络宽带不会被某个程序 -霸占. - -![Install Trickle Bandwidth Limit in Linux](http://www.tecmint.com/wp-content/uploads/2013/11/Bandwidth-limit-trickle.png) -Install Trickle Bandwidth Limit in Linux - -### 什么是 Trickle? ### - -Trickle是一个网络宽带调整工具,可以让我们管理应用程序的网络上下行速度,使得可以避免其中的某个应用程序吃掉了全部或大部分可用的宽带.换句话说,Trickle可以让你基于单个应用程序来控制 -网络流量速率,而不是仅仅针对与单个用户--在客户端网络环境中经典的宽带调整样例, - -### Trickle是如何工作的?### - -另外,tricle可以帮助我们基于应用来定义优先级,所以当对整个系统进行了全局限制设定,高优先级的应用依然会自动地获取更多的宽带。为了实现这个目标,tricle设置通过TCP连接的套接字对数 -据发送、数据接收路径的流量限制。我们必须注意到,除了影响传输速率之外,tricle任何时候都不会以任何方式来改变其处理过程。 - -### Trickle不能做什么? ### - -这么说吧,唯一的限制就是,tricle静态连接的应用或者具有SUID或SGID位设置的二进制--因为他们使用动态链接并且将其自身加载到调整过程以及其关联的网络套接字之间。 Trickle此时会在这两种软件 -组件之间扮演代理的角色。 - -由于trickle并不会需要超级用户的权限来运行,所以用户可以设置用户独立的流量限制,可能这并不是你想要的,我们会探索如何使用全局设定来限制系统中的所有用户的流量限制。也即是说,此时系统中的每个用户具有管理 -各自的流量速率,但是无论如何,都会受到系统管理员给他们设置的边界限制。 - -在这边文章中,我们会描述如何通过trickle在linux平台上管理应用程序使用的网络宽带。为了生成必要流量,在此会在客户端(CentOS 7 server – dev1: 192.168.0.17)上使用 ncftpput 和 - ncftpget, 在服务器(Debian Wheezy 7.5 – dev2: 192.168.0.15)上使用vsftpd 来进行演示。 相同的指令也可以在RedHat,Fedora和Ubuntu等系统使用。 - -#### 前提条件 #### - -1. 对于 RHEL/CentOS 7/6, [开启EPEL仓库][1]。EPEL的Extra Packages是一个 有Fedora项目维护的高质量、开源的软件仓库,而且百分之百与其衍生产品相兼容,如 -企业版本Linux和CentOS. 在这个仓库中trickle和ncftp两者都是可用的。 - -2. 按照如下方式安装ncftp: - - # yum update && sudo yum install ncftp [On RedHat based systems] - # aptitude update && aptitude install ncftp [On Debian based systems] - -3. 在单独的服务器上设置一个FTP服务器。需要注意的是,尽管FTP天生就不安全,但是 -仍然被广泛应用在安全性无关紧要的文件上传下载中。 在这篇文章中我们使用它来演示 -trickle的优点,同时它也会在客户端的标准输出流中显示传输速率,我们将是否在另外 -的日期时间中使用放在一边讨论。 - - # yum update && yum install vsftpd [On RedHat based systems] - # aptitude update && aptitude install vsftpd [On Debian based systems] - -现在,在FTP服务器上按照以下方式编辑 /etc/vsftpd/vsftpd.conf 文件。 - - anonymous_enable=NO - local_enable=YES - chroot_local_user=YES - allow_writeable_chroot=YES - -在此之后,确保在你的当前会话中开启了vsftpd,并在之后的启动中让其自动启动。 - - # systemctl start vsftpd [For systemd-based systems] - # systemctl enable vsftpd - # service vsftpd start [For init-based systems] - # chkconfig vsftpd on - -4. 如果你选在在一个CentOS/RHEL 7中为FTP服务器的远程访问配备SSH秘钥,你需要 -一个具有适合访问root目录之外的目录和文件内容上传下载权限并密码受保护的用户账户。 - -你可以通过在你的浏览器中输入以下的URL来浏览你的Home目录。一个登陆窗口会弹出来 -提示你输入FTP服务器中的有效的用户名和密码。 - - ftp://192.168.0.15 - -如果验证成功,你就会看到你的home目录中的内容。该教程的稍后部分中,你将可以刷新 -页面来显示在你之前上传过的文件。 - -![FTP Directory Tree](http://www.tecmint.com/wp-content/uploads/2013/11/FTP-Directory-Tree.png) -FTP Directory Tree - -### 如何在Linux中安装 Tricle ### - -1. 通过yum或aptitude来安装tricle. - -为了确保能够成功安装,最好在安装工具之前,保证当前的安装包是最新的版本。 - - - # yum -y update && yum install trickle [On RedHat based systems] - # aptitude -y update && aptitude install trickle [On Debian based systems] - -2. 确认trickle是否对特定的二进制包有用。 - -之前我们解释过,trickle只对使用动态或共享包的二进制包有用。为了确认我们是否可以对某个特定的应用使用trickle,我们可以使用著名的ldd( -列出动态依赖)工具。 特别地,我们会查看任何给定程序的动态依赖中检查其当前使用的glibc,因为其准确地定义了使用套接字交流中使用的系统调用。 - -对一个给定的二进制包执行以下命令来查看是否能对其使用trickle进行宽带调整: - - # ldd $(which [binary]) | grep libc.so - -例如, - - # ldd $(which ncftp) | grep libc.so - -其输出是: - - # libc.so.6 => /lib64/libc.so.6 (0x00007efff2e6c000) - -输出中的括号中的字符可能在不同的系统平台中发生改变,甚至相同的命令在不同的时候运行也会,因为其代表包加载到物理内存中的地址。 - -如果上面的命令没有返回任何的结果,就说明这个二进制包没有使用libc包,因此tricle对其不能起到宽带调整的作用。 - -### 学习如何使用Trickle### - -最基本的用法就是使用其单模式,通过这种方式,trickle用来显示地定义给定应用程序的上传下载速率。如前所述,为了简单性,我们会使用相同的应用 -来进行上传下载测试。 - -#### 在单模式下运行trickle#### - -我们会比较在有无trickle的情况下的上传下载速率, ‘-d’选项指示下载速率(KB/s单位),而'-u'选项指示相同单位的上传速率。另外我们会使用到‘-s’ -选项来指定trickle应该以单模式运行。 - -以单模式运行trickle的基本语法如下: - - # trickle -s -d [download rate in KB/s] -u [upload rate in KB/s] - -为了能够让你自己运行以下样例,确保你在自己的客户端安装了trickle和ncftp(我的是192.168.0.17)。 - -**样例1:在有无trickle的情况下上传一个2.8 MB的PDF文件。** - -我们使用一个自由发布的LInux基础知识PDF文件来进行下面的测试[文件链接][2]。 - -你可以首先使用下面的命令将这个文件下载到你当前的工作目录中: - # wget http://linux-training.be/files/books/LinuxFun.pdf - -下面是在没有trickle的情况下将一个文件上传到我们的FTP服务器的语法: - - # ncftpput -u username -p password 192.168.0.15 /remote_directory local-filename - -其中的 /remote_directory 是相对于用户名的Home目录的上传路径,而local-filename是一个你当前工作目录中的文件。 - -特别的是,在没有trickle的情形下,我们可以得到上传峰值速率52.02MB/s(请注意,这个不是真正的平均上传速率,而是峰值开始的瞬时值),而且这个文件几乎 -在瞬间就完成了上传。 - - # ncftpput -u username -p password 192.168.0.15 /testdir LinuxFun.pdf - -输出: - - LinuxFun.pdf: 2.79 MB 52.02 MB/s - -在使用trickle的情况下,我们会限制上传速率在5KB/s。在第二次上传文件之前,我们需要在目标目录中删除这个文件,否则ncftp就会通知我们在目标 -目录中已经存在了与上传文件相同的文件,从而不会执行文件的传输: - # rm /absolute/path/to/destination/directory/LinuxFun.pdf - -然后: - - # trickle -s -u 5 ncftpput -u username -p password 111.111.111.111 /testdir LinuxFun.pdf - -输出: - - LinuxFun.pdf: 2.79 MB 4.94 kB/s - -在上面的样例中,我们看到平均的上传速率下降到了5KB/s。 - -**样例2:在有无trickle的情况下下载相同过得2.8MB的PDF文件** - -首先,记得从原来的源文目录中删除这个PDF: - - # rm /absolute/path/to/source/directory/LinuxFun.pdf - -请注意,下面的样例中将远程的文件下载到客户端机器的当前目录下,这是由FTP服务器的IP地址后面的·.·决定的。 - -没有trickle的情况下: - - # ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf - -输出: - - LinuxFun.pdf: 2.79 MB 260.53 MB/s - -在有trickle的情况下,限制下载速率在20KB/s: - - # trickle -s -d 30 ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf - -输出: - - LinuxFun.pdf: 2.79 MB 17.76 kB/s - -### 在有监督的模式下运行Trickle [未管理的]### - -Tricle也可以在未管理的模式下运行,通过跟随在/etc/tricled.conf文件中定义的一系列参数。 这个文件定义了守护线程 trickled的行为以及如何管理tricle。 - -另外,如果你想要全局设置被所有的应用程序使用的话,我们就会需要使用tricle命令。 这个命令运行守护线程并允许我们通过trickle定义所有应用程序共享的上传下载限制,不需要我们每次来进行指定。 - -例如,运行: - - # trickled -d 50 -u 10 - -会导致任何通过tricle运行的应用程序的上传下载速率分别限制在30kb/s和10kb/s。 - -请注意,你可以在任何时间都能确认守护线程tricled是否正在运行以及其运行参数: - - # ps -ef | grep trickled | grep -v grep - -输出: - - root 16475 1 0 Dec24 ? 00:00:04 trickled -d 50 -u 10 - -**样例3:在是否使用tricle的情形下上传一个 19MB 的mp4文件到我们的FTP服务器。** - -在这个样例中,我们会使用“He is the gift”的自由分布视频,可以通过这个[链接][3]下载。 - -我们将会在开始通过以下的命令将这个文件下载到你的当前工作目录中: - - # wget http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 - -首先,我们会使用之前列出的命令来开启守护进程trickled: - - # trickled -d 30 -u 10 - -在没有trickle时: - - # ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 - -输出: - - 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 36.31 MB/s - -有trickle的时: - - # trickle ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 - -输出: - - 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 9.51 kB/s - -我们可以看到上面的输出,上传的速率下降到了约 10KB/s。 - -** 样例4:在有无trickle的情形下下载这个相同的视频 ** - -与样例2一样,我们会将该文件下载到当前工作目录中。 - -在没有trickle时: - - # ncftpget -u username -p password 192.168.0.15 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 - -输出: - - 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 108.34 MB/s - -有trickle的时: - - # trickle ncftpget -u username -p password 111.111.111.111 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 - -输出: - 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 29.28 kB/s - -上面的结果与我们之前设置的下载限速相对应(30KB/s)。 - -**注意:** 一旦守护进程开启之后,没有必要使用trickle来为每个应用程序来单独设置限制。 - -如前所述,每个人都可以进一步地通过tricled.conf来客制化tricle的宽带速率调整,该文件的一个典型的分区有以下部分组成: - - [service] - Priority = - Time-Smoothing = - Length-Smoothing = - -其中, - -- [service] 用来指示我们想要对其进行宽带使用调整的应用程序名称 -- Priority 用来让我们为某个服务制定一个相对于其他服务高的优先级,这样就不允许守护进程管理中的一个单独的应用程序来占用所有的宽带。越小的数字代表更高的优先级。 -- Time-Smoothing [以秒计]: 定义了trickled让各个应用程序传输或接收数据的时间间隔。小的间隔值(0.1-1秒)对于交互式应用程序是理想的,因为这样会具有一个更加平滑的会话体验,而一个相对较大 -的时间间隔值(1-10秒)对于需要批量传输应用程序就会显得更好。如果没有指定该值,默认是5秒。 -- Length-smoothing [KB 单位]: 该想法与Time-Smoothing如出一辙,但是是基于I/O操作而言。如果没有指定值,会使用默认的10KB。 - -平滑值的改变会被翻译为将指定的服务的使用一个间隔值而不是一个固定值。不幸的是,没有一个特定的公式来计算间隔值的上下限,主要依赖于特定的应用场景。 - -下面是一个在CentOS 7 客户端中的tricled.conf 样例文件(192.168.0.17): - - [ssh] - Priority = 1 - Time-Smoothing = 0.1 - Length-Smoothing = 2 - - [ftp] - Priority = 2 - Time-Smoothing = 1 - Length-Smoothing = 3 - -使用该设置,tricled会为SSH赋予比FTP较高的传输优先级。值得注意的是,一个交互进程,例如SSH,使用了一个较小的时间间隔值,然而一个处理批量数据传输的服务如FTP使用一个较大的时间 -间隔来负责之前的样例中的上传下载速率,尽管不是百分百的有trickled指定的值,但是也已经非常接近了。 - -### 总结 ### -在该文章中,我们探索了任何使用trickle在基于Fedora发行版和Debian衍生版平台上来限制应用程序的宽带使用.也包含了其他的可能用法,但是不对以下情形进行限制: - -- 限制系统下载工具的下载速度,例如[wget][4],或 BT客户端. - -- 限制你的系统的包管理工具`[yun][5]`更新的速度 (如果是基于Debian系统的话,其包管理工具为`[aptitude][6]`)。 - -- 如果你的服务器是在一个代理或防火墙后面(或者其本身即是代理或防火墙的话),你可以使用trickle来同时设定下载和上传速率,或者与客户端或外部交流速率。 - -欢迎提问或留言. --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ - -作者:[Gabriel Cánepa][a] -译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/gacanepa/ -[1]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ -[2]:http://linux-training.be/files/books/LinuxFun.pdf -[3]:http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 -[4]:http://www.tecmint.com/10-wget-command-examples-in-linux/ -[5]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ -[6]:http://www.tecmint.com/dpkg-command-examples/ From e383e70fc4abf2d5d4fbbc817fd5f492c95ae070 Mon Sep 17 00:00:00 2001 From: sevenot Date: Wed, 27 May 2015 02:33:09 +0800 Subject: [PATCH 0974/2517] sevenot traslating --- ...515 New to Linux 5 Apps You Didn't Know You Were Missing.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md b/sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md index 99b4b1915f..851ed5c676 100644 --- a/sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md +++ b/sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md @@ -1,3 +1,4 @@ +sevenot Translating New to Linux? 5 Apps You Didn’t Know You Were Missing ================================================================================ ![](http://cdn.makeuseof.com/wp-content/uploads/2015/05/linux-apps-840x420.jpg?92a7a3) @@ -100,4 +101,4 @@ via: http://www.makeuseof.com/tag/new-linux-5-apps-didnt-know-missing/ [11]:http://www.makeuseof.com/tag/4-ways-teach-terminal-commands-linux-si/ [12]:http://www.makeuseof.com/tag/10-top-linux-desktop-environments-available/ [13]:https://yakuake.kde.org/ -[14]:http://www.makeuseof.com/tag/linux-treasures-x-sublime-native-linux-apps-will-make-want-switch/ \ No newline at end of file +[14]:http://www.makeuseof.com/tag/linux-treasures-x-sublime-native-linux-apps-will-make-want-switch/ From 4bbad6c59bf905a466b5029b1d4885b4ea735dd2 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Wed, 27 May 2015 10:01:57 +0800 Subject: [PATCH 0975/2517] [Translated]20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md --- ...onitoring Tool Installation Screenshots.md | 189 ------------------ ...onitoring Tool Installation Screenshots.md | 189 ++++++++++++++++++ 2 files changed, 189 insertions(+), 189 deletions(-) delete mode 100644 sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md create mode 100644 translated/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md diff --git a/sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md b/sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md deleted file mode 100644 index 17c3add528..0000000000 --- a/sources/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md +++ /dev/null @@ -1,189 +0,0 @@ -Translating by GOLinux! -Linux ntopng - Network Monitoring Tool Installation (Screenshots) -================================================================================ -Nowdays computers are connected between each other. From the small area such as your home Local Area Network (LAN) until the the biggest one which we call - Internet. When you are managing a network computer, you are managing one of the most critical component. Since most of developed application is web based application, the network between critical. - -There is why we need a network monitoring tool. One of the best network monitoring tool is called ntop. From [Wikipedia][1] “ntop is a network probe that shows network usage in a way similar to what top does for processes. In interactive mode, it displays the networkstatus on the user's terminal. In Web mode, it acts as a web server, creating a HTML dump of the network status. It supports a NetFlow/sFlowemitter/collector, a HTTP-based client interface for creating ntop-centric monitoring applications, and RRD for persistently storing traffic statistics” - -Now after 15 years, you will find ntopng - the next generation ntop. - -### What is ntopng ### - -Ntopng is a high-speed web-based traffic analysis and flow collection. Ntopng is based from ntop. It’s run on every Unix platform, MacOS X and Windows. - -### Features ### - -From [ntopng website][2], they said there are many features of it. Here’s some of the list : - -- Sort network traffic according to many protocols -- Show network traffic and IPv4/v6 active hosts -- Store on disk persistent traffic statistics in RRD format Geolocate hosts -- Discover application protocols by leveraging on nDPI, ntop’s DPI framework -- Show IP traffic distribution among the various protocols -- Analyse IP traffic and sort it according to the source/destination -- Display IP Traffic Subnet matrix (who’s talking to who?) -- Report IP protocol usage sorted by protocol type -- Produce HTML5/AJAX network traffic statistics - -### Installation ### - -Ntop is available in pre-compiled packages for CentOS dan Ubuntu **64-bit based**. You may find the packages in [their download page][3]. For 32-bit operating system, you have to compile it from the source. This article is **tested** on **CentOS 6.4 32-bit** version. But it may works also in other version of CentOS / RedHat based Linux. Let’s start. - -#### Prerequisites #### - -#### Development Tools #### - -You have to make sure that you have all development tools which is needed to compile ntopng. To install the development tools you can use yum command : - - # yum groupinstall ‘Development Tools’ - -#### Install TCL #### - - # yum install tcl - -#### Install libpcap #### - - # yum install libpcap libcap-devel - -#### Install Redis #### - - # wget http://redis.googlecode.com/files/redis-2.6.13.tar.gz - # tar zxfv redis-2.6.13.tar.gz - # cd redis-2.6.13 - # make 32bit - # make test - # make install - -### Install ntopng ### - -#### Method 1 : #### - - # wget http://sourceforge.net/projects/ntop/files/ntopng/ntopng-1.1_6932.tgz/download - # tar zxfv ntopng-1.1_6932.tgz - # cd ntopng-1.1_6932 - # ./configure - # make - # make install - -#### Method 2 : #### - -On my CentOS 6.4 , I got an error message when using Method 1. Here’s the error message : - - ./third-party/LuaJIT-2.0.2/src/libluajit.a : could not read symbols : File in wrong format - -So I **switch** to install it using **SVN**. Internet connection is required for this installation method. Here’s the steps : - - # svn co https://svn.ntop.org/svn/ntop/trunk/ntopng/ - # ./autogen.sh - # ./configure - # make - # make install - -*Since ntopng is a web-based application, your system must have a working web-server installed* - -### Create configuration files for ntopng ### - -If everything is installed, then it’s time for us to running it. By default, redis and ntopng will installed in /usr/local/ folder if we don’t change the installation folder explicitly in ./configure step. Next we need to create configuration files for ntopng. In this article we use vi as text editor. You can use your favorite text editor to create ntopng configuration files. - - # cd /usr/local/etc - # mkdir ntopng - # cd ntopng - # vi ntopng.start - - Put these lines : - --local-network “10.0.2.0/24” - --interface 1 - - # vi ntopng.pid - - Put this line : - -G=/var/run/ntopng.pid - -Save those files and we can continue to the next step - -### Run ntopng ### - -We assume that you have installed web server correctly, then the next step is to run redis server. - - # /usr/local/bin/redis-server - -![Starting Redis Server](http://blog.linoxide.com/wp-content/uploads/2013/11/redis-server-start.png) - -Then **run** ntopng - - # /usr/local/bin/ntopng - -![Starting Ntopng](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng-start.png) - -### Testing ntopng ### - -Now you can test your ntopng application by typing [http://yourserver.name:3000][4] . You will see ntopng login page. For the first time, you can use user ‘**admin**’ and password ‘**admin**’. - -![Ntop Login page](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_login.png) - -The dashboard is quite simple. After you logged in, you will see an information about Top Flow Talkers. - -![Ntopng Flow Talker](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_talkers.png) - -If you click **Flows menu** on the right top, ntopng will show you more detail about Active Flows. - -![Ntopng Flows](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_flows.png) - -On **Hosts menu**, you can see all hosts which are connected to the flows - -![Ntopng Hosts List](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_hoslist.png) - -If you click **Hosts > Interactions**, ntop will show you a nice graphic about interaction which happen between them. - -![Ntopng Hosts Interaction](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_hosts_interaction.png) - -**Dashboard menu** consist of : - -#### Top Hosts (Send+Receive) #### - -![Ntopng Hosts](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_hosts.png) - -#### Top Application Protocol #### - -![Ntopng Apps](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_apps.png) - -**Interfaces menu** will bring you more menus inside. Packets menu shows you size distribution of packets. - -![Ntopng packets](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_packets.png) - -**Protocols menus** will give you information about how many protocols that have been used and its percentage. - -![Ntopng protocol](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_protocol.png) - -![Ntopng protocols - detail](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_protocol_detail.png) - -You can also see the activity by using **Historical Activity menu** - -![Ntopng Historical Activity](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_historical.png) - -![Ntopng Historical Activity detail](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_historical_detail.png) - -Last but not least, you can also manage the user who can access ntopng via **Settings menu** on the top right area (the one that have a gear icon). Then click **Manage Users**. - -![Ntopng Users](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_users.png) - -Ntopng provide you with a wide range of timeframe, from every 5 minutes until 1 year. You just need to click the timeframe you want to show. The graphic itself is clickable. You can click it to zoom it. - -Of course, ntopng is more than just pictures above. You can also integrates it with GeoLocation and GeoMap services. From ntopng website it self, there are a paid modul such as nprobe to enrich the information provided by ntopng. For more detail usage of ntopng, please visit [ntopng website][5]. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/monitoring-2/ntopng-network-monitoring-tool/ - -作者:[Pungki Arianto][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/pungki/ -[1]:http://en.wikipedia.org/wiki/Ntop -[2]:http://www.ntop.org/products/ntop/ -[3]:http://www.nmon.net/packages/ -[4]:http://yourserver.name:3000/ -[5]:http://www.ntop.org/ diff --git a/translated/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md b/translated/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md new file mode 100644 index 0000000000..dc039ba551 --- /dev/null +++ b/translated/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md @@ -0,0 +1,189 @@ +Linux ntopng——网络监控工具的安装(附截图) +================================================================================ +当今世界,人们的计算机都相互连接,互联互通。小到你的家庭局域网(LAN),大到最大的一个被我们称为的——互联网。当你管理一台联网的计算机时,你就是在管理最关键的组件之一。由于大多数开发出的应用程序都基于网络,网络就连接起了这些关键点。 + +这就是为什么我们需要网络监控工具。最好的网络监控工具之一,它叫作ntop。来自[维基百科][1]的知识“ntop是一个网络探测器,它以与top显示进程般类似的方式显示网络使用率。在交互模式中,它显示了用户终端上的网络状态。在网页模式中,它作为网络服务器,创建网络状态的HTML转储文件。它支持NetFlow/sFlowemitter/collector,这是一个基于HTTP的客户端界面,用于创建ntop为中心的监控应用和RRD用于持续地存储通信数据” + +15年后的今天,你将见到ntopng——下一代ntop。 + +### ntopng是什么 ### + +Ntopng是一个基于网页的高速通信分析器和流量收集器。Ntopng基于ntop,它运行于所有Unix平台、MacOS X和Windows。 + +### 特性 ### + +从[ntopng网站][2]上,我们可以看到他们说它有众多的特性。这里列出了其中一些: + +- 按各种协议对网络通信排序 +- 显示网络通信和IPv4/v6激活的主机 +- 持续不断以RRD格式存储定位主机的通信数据到磁盘 +- 通过nDPI,ntop的DPI框架,发现应用协议 +- 显示各种协议间的IP通信分布 +- 分析IP通信,并根据源/目的地址进行排序 +- 显示IP通信子网的矩阵(谁在和谁通信?) +- 报告按协议类型排序的IP协议使用率 +- 生成HTML5/AJAX网络通信数据 + +### 安装 ### + +Ntop为CentOS和**基于64位**Ubuntu预编译好了包,你可以在[他们的下载页面][3]找到这些包。对于32位操作系统,你必须从源代码编译。本文在**CentOS 6.4 32位**版本上**测试过**。但是,它也可以在其它基于CentOS/RedHat的Linux版本上工作。让我们开始吧。 + +#### 先决条件 #### + +#### 开发工具 #### + +你必须确保你安装了编译ntopng所需的所有开发工具,要安装开发工具,你可以使用yum命令: + + # yum groupinstall ‘Development Tools’ + +#### 安装TCL #### + + # yum install tcl + +#### 安装libpcap #### + + # yum install libpcap libcap-devel + +#### 安装Redis #### + + # wget http://redis.googlecode.com/files/redis-2.6.13.tar.gz + # tar zxfv redis-2.6.13.tar.gz + # cd redis-2.6.13 + # make 32bit + # make test + # make install + +### 安装ntopng ### + +#### 方法 1 : #### + + # wget http://sourceforge.net/projects/ntop/files/ntopng/ntopng-1.1_6932.tgz/download + # tar zxfv ntopng-1.1_6932.tgz + # cd ntopng-1.1_6932 + # ./configure + # make + # make install + +#### 方法 2 : #### + +在我的CentOS 6.4上,我使用方法 1时收到了一个错误消息,错误消息内容如下: + + ./third-party/LuaJIT-2.0.2/src/libluajit.a : could not read symbols : File in wrong format + +所以,我**切换**到了**SVN**来安装。对于此方法,需要联网,步骤如下: + + # svn co https://svn.ntop.org/svn/ntop/trunk/ntopng/ + # ./autogen.sh + # ./configure + # make + # make install + +*由于ntopng是一个基于网页的应用,你的系统必须安装有工作良好的网络服务器* + +### 为ntopng创建配置文件 ### + +如果一切都已安装完毕,那么我们该来运行它了。默认情况下,如果我们在./configure这一步没有明确修改安装文件夹的话,redis和ntopng将安装到/usr/local/文件夹。接下来,我们需要为ntopng创建配置文件。在本文中,我们使用vi作为文本编辑器。你也可以使用你所中意的文本编辑器来创建ntopng的配置文件。 + + # cd /usr/local/etc + # mkdir ntopng + # cd ntopng + # vi ntopng.start + + 放入这些行: + --local-network “10.0.2.0/24” + --interface 1 + + # vi ntopng.pid + + 放入该行: + -G=/var/run/ntopng.pid + +保存这些文件,然后继续下一步。 + +### 运行ntopng ### + +我们假定你已正确安装了网络服务器,那么下一步就是运行redis服务器。 + + # /usr/local/bin/redis-server + +![Starting Redis Server](http://blog.linoxide.com/wp-content/uploads/2013/11/redis-server-start.png) + +然后,**运行**ntopng + + # /usr/local/bin/ntopng + +![Starting Ntopng](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng-start.png) + +### 测试ntopng ### + +现在,你可以通过访问[http://yourserver.name:3000][4]来测试ntopng应用,你将会看到ntopng登录页面。首次登录,你可以使用用户‘**admin**’和密码‘**admin**’。 + +![Ntop Login page](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_login.png) + +仪表盘相当简洁。当你登入后,你将看到关于最高流量通信者页面。 + +![Ntopng Flow Talker](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_talkers.png) + +如果你点击右侧顶部的**流量菜单**,ntopng将会显示活动流量的更多细节。 + +![Ntopng Flows](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_flows.png) + +在**主机菜单**上,你可以看到连接到流的所有主机 + +![Ntopng Hosts List](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_hoslist.png) + +如果你点击**主机 > 交互**,ntop将显示一个漂亮的主机间的交互信息图表。 + +![Ntopng Hosts Interaction](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_hosts_interaction.png) + +**仪表盘菜单**组成部分: + +#### 顶级主机(发送+接收) #### + +![Ntopng Hosts](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_hosts.png) + +#### 顶级应用协议 #### + +![Ntopng Apps](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_apps.png) + +**界面菜单**将引领你进入更多内部菜单。 +包菜单将给你显示包的分布大小。 + +![Ntopng packets](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_packets.png) + +**协议菜单**将为你显示使用了多少协议及其使用百分比。 + +![Ntopng protocol](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_protocol.png) + +![Ntopng protocols - detail](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_protocol_detail.png) + +你也可以通过使用**历史活跃度菜单**查看活跃度 + +![Ntopng Historical Activity](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_historical.png) + +![Ntopng Historical Activity detail](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_historical_detail.png) + +最后一项要点是,你也可以通过顶部右侧区域的**设置菜单**(齿轮图标的那一个)管理哪些用户可以访问ntopng。 + +![Ntopng Users](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_users.png) + +Ntopng为你提供了一个范围宽广的时间线,从5分钟到1年都可以。你只需要点击你想要现实的时间线。图标本身是可以点击的,你可以点击它来进行缩放。 + +当然,ntopng能做的事比上面图片中展示的还要多得多。你也可以将定位和电子地图服务整合进来。在ntopng自己的网站上,有已付费的模块可供使用,如nprobe可以扩展ntopng可以提供给你的信息。更多关于ntopng的信息,你可以访问[ntopng网站][5]。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/monitoring-2/ntopng-network-monitoring-tool/ + +作者:[Pungki Arianto][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/pungki/ +[1]:http://en.wikipedia.org/wiki/Ntop +[2]:http://www.ntop.org/products/ntop/ +[3]:http://www.nmon.net/packages/ +[4]:http://yourserver.name:3000/ +[5]:http://www.ntop.org/ From 1b615c7983d05e50b02e9fe48884d8b6bef6a6be Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 27 May 2015 10:15:39 +0800 Subject: [PATCH 0976/2517] =?UTF-8?q?20150527-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...the Kubuntu Project Leader to Step Down.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md diff --git a/sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md b/sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md new file mode 100644 index 0000000000..bdb44591fc --- /dev/null +++ b/sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md @@ -0,0 +1,33 @@ +Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down +================================================================================ +> Jonathan Riddell refuses to step down as Kubuntu leader + +![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-Community-Council-Asks-the-Kubuntu-Project-Leader-to-Step-Down-482384-2.jpg) + +**So this just happened. Scott Kitterman, a Debian developer and member of the Kubuntu Council, decided to make public some emails where it would appear that members of the Ubuntu Community Council asks Jonathan Riddell to step down from his position as a Kubuntu Project leader.** + +Jonathan Riddell, which is both a KDE and Kubuntu developer, as well as an important member of the Ubuntu community for many years now, is being accused by several members of the Ubuntu and Kubuntu community about his confrontational and aggressive behavior towards them, as [the email exchanges exposed today][1] by Scott Kitterman suggest. + +Long story short, after several email exchanges, the final decision of the Ubuntu Community Council, which is also backed by Canonical and Ubuntu founder Mark Shuttleworth, was for Jonathan Riddell to step down from all his positions as a leader within the Ubuntu and Kubuntu communities, for at least 12 months, but still being able to participate to discussions as any other member. + +"It is with regret that we write this email to discuss an issue that we feel is negatively impacting the Ubuntu Community. Over a long period of time Jonathan Riddell has become increasingly difficult to deal with. Jonathan raised valid issues and concerns, but reacted poorly when he received answers he did not agree with," reads the first email send to the Ubuntu Community Council regarding the "nasty" behavior of Jonathan Riddell. + +### Jonathan Riddell refuses to step down as a Kubuntu Project leader ### + +From the email exchanges exposed today by Scott Kitterman, who decided to write a second post on his blog, suggesting that he wants to resign from its position in the Ubuntu and Kubuntu community, it would appear that Jonathan Riddell refused to step down as a Kubuntu Project leader. + +As expected, Jonathan Riddell is being backed by members of the Kubuntu Community Council, who fired back at the Ubuntu Community Council's decision to take down the Kubuntu Project leader. "I’d like to thank all the Kubuntu members who just voted to re-affirm me on the Kubuntu Council," says Jonathan Riddell on [his blog][2]. + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Ubuntu-Community-Council-Asks-the-Kubuntu-Project-Leader-to-Step-Down-482384.shtml + +作者:[Marius Nestor][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor +[1]:https://skitterman.wordpress.com/ +[2]:http://jriddell.org/ \ No newline at end of file From c3f16de2812d086ba81c6840c574cec8f4486df4 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 27 May 2015 10:45:33 +0800 Subject: [PATCH 0977/2517] Translating by ZTinoZ --- .../tech/20150526 20 Useful Terminal Emulators for Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 1615d3ca1a..436b28f79f 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ 20 Useful Terminal Emulators for Linux ================================================================================ A Terminal emulator is a computer program that reproduces a video terminal within some other display structure. In other words the Terminal emulator has an ability to make a dumb machine appear like a client computer networked to the server. The terminal emulator allows an end user to access console as well as its applications such as text user interface and command line interface. @@ -297,4 +298,4 @@ via: http://www.tecmint.com/linux-terminal-emulators/ [18]:http://invisible-island.net/xterm/ [19]:http://lilyterm.luna.com.tw/ [20]:https://launchpad.net/sakura -[21]:http://software.schmorp.de/pkg/rxvt-unicode \ No newline at end of file +[21]:http://software.schmorp.de/pkg/rxvt-unicode From c47e529ce6a34b5825099ca48108f08671e99270 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 27 May 2015 10:45:47 +0800 Subject: [PATCH 0978/2517] =?UTF-8?q?20150527-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150527 3 Open Source Python Shells.md | 99 ++++++++++++++ ... Adds Live Backgrounds To Linux Distros.md | 113 ++++++++++++++++ ...your documents collaboratively on Linux.md | 122 ++++++++++++++++++ 3 files changed, 334 insertions(+) create mode 100644 sources/share/20150527 3 Open Source Python Shells.md create mode 100644 sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md create mode 100644 sources/tech/20150527 How to edit your documents collaboratively on Linux.md diff --git a/sources/share/20150527 3 Open Source Python Shells.md b/sources/share/20150527 3 Open Source Python Shells.md new file mode 100644 index 0000000000..c510096670 --- /dev/null +++ b/sources/share/20150527 3 Open Source Python Shells.md @@ -0,0 +1,99 @@ +3 Open Source Python Shells +================================================================================ +Python is a high-level, general-purpose, structured, powerful, open source programming language that is used for a wide variety of programming tasks. It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl, avoiding many of the complexities and overheads of compiled languages. The language was created by Guido van Rossum in 1991, and continues to grow in popularity. + +Python is a very useful and popular computer language. One of the benefits of using an interpreted language such as Python is exploratory programming with its interactive shell. You can try out code without having to write a script. But there are limitations with the Python shell. Fortunately, there are some excellent alternative Python shells that extend on the basic shell. They each offer an excellent interactive Python experience. + +---------- + +### bpython ### + +![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-bpython.png) + +bpython is a fancy interface to the Python interpreter for Linux, BSD, OS X and Windows. + +The idea is to provide the user with all the features in-line, much like modern IDEs, but in a simple, lightweight package that can be run in a terminal window. + +bpython doesn't seek to create anything new or groundbreaking. Instead, it brings together a few neat ideas and focuses on practicality and usefulness. + +Features include: + +- In-line syntax highlighting - uses Pygments for lexing the code as you type, and colours appropriately +- Readline-like autocomplete with suggestions displayed as you type +- Expected parameter list for any Python function - seeks to display a list of parameters for any function you call +- "Rewind" function to pop the last line of code from memory and re-evaluate +- Send the code you've entered off to a pastebin +- Save the code you've entered to a file +- Auto-indentation +- Python 3 support + +- Website: [www.bpython-interpreter.org][1] +- Developer: Bob Farrell and contributors +- License: MIT License +- Version Number: 0.14.1 + +---------- + +### IPython ### + +![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-ipython.png) + +IPython is an enhanced interactive Python shell. It provides a rich toolkit to help you make the most out of using Python interactively. + +IPython can be used as a replacement for the standard Python shell, or it can be used as a complete working environment for scientific computing (like Matlab or Mathematica) when paired with the standard Python scientific and numerical tools. It supports dynamic object introspections, numbered input/output prompts, a macro system, session logging, session restoring, complete system shell access, verbose and colored traceback reports, auto-parentheses, auto-quoting, and is embeddable in other Python programs. + +Features include: + +- Powerful interactive shells (terminal and Qt-based) +- A browser-based notebook with support for code, rich text, mathematical expressions, inline plots and other rich media +- Support for interactive data visualization and use of GUI toolkits +- Flexible, embeddable interpreters to load into your own projects +- Easy to use, high performance tools for parallel computing + +- Website: [ipython.org][2] +- Developer: The IPython Development Team +- License: BSD +- Version Number: 3.1 + +---------- + +### DreamPie ### + +![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-DreamPie.png) + +DreamPie is a Python shell which is designed to be reliable and fun. + +DreamPie can use just about any Python interpreter (Jython, IronPython, PyPy). + +Features include: + +- New concept for an interactive shell: the window is divided into the history box, which lets you view previous commands and their output, and the code box, where you write your code. This allows you to edit any amount of code, just like in your favorite editor, and execute it when it's ready. You can also copy code from anywhere, edit it and run it instantly +- The Copy code only command will copy the code you want to keep, so you can save it in a file. The code is already formatted nicely with a four-space indentation +- Automatic completion of attributes and file names +- Automatically displays function arguments and documentation +- Keeps your recent results in the result history, for later use +- Can automatically fold long outputs, so you can concentrate on what's important +- Save the history of the session as an HTML file, for future reference. You can then load the history file into DreamPie, and quickly redo previous commands +- Automatically adds parentheses and optionally quotes when you press space after functions and methods. For example, type execfile fn and get execfile("fn") +- Supports interactive plotting with matplotlib +- Xupport for Python 2.5, Python 2.6, Python 3.1, Jython 2.5, IronPython 2.6, and PyPy +- Extremely fast and responsive. + +- Website: [www.dreampie.org][3] +- Developer: Noam Yorav-Raphael +- License: GNU GPL v3 +- Version Number: 1.2.1 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150523032756576/PythonShells.html + +作者:Frazer Kline +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.bpython-interpreter.org/ +[2]:http://ipython.org/ +[3]:http://www.dreampie.org/ \ No newline at end of file diff --git a/sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md b/sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md new file mode 100644 index 0000000000..92eff36326 --- /dev/null +++ b/sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md @@ -0,0 +1,113 @@ +Animated Wallpaper Adds Live Backgrounds To Linux Distros +================================================================================ +**We know a lot of you love having a stylish Ubuntu desktop to show off.** + +![Live Wallpaper](http://i.imgur.com/9JIUw5p.gif) + +Live Wallpaper + +And as Linux makes it so easy to create a stunning workspace with a minimal effort, that’s understandable! + +Today, we’re highlighting — [re-highlighting][2] for those of you with long memories — a free, open-source tool that can add extra bling your OS screenshots and screencasts. + +It’s called **Live Wallpaper** and (as you can probably guess) it will replace the standard static desktop background with an animated alternative powered by OpenGL. + +And the best bit: it can be installed in Ubuntu very easily. + +### Animated Wallpaper Themes ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/animated-wallpaper-ubuntu-750x383.jpg) + +Live Wallpaper is not the only app of this type, but it is one of the the best. + +It comes with a number of different themes out of the box. + +These range from the subtle (‘noise’) to frenetic (‘nexus’), and caters to everything in between. There’s even the obligatory clock wallpaper inspired by the welcome screen of the Ubuntu Phone: + +- Circles — Clock inspired by Ubuntu Phone with ‘evolving circle’ aura +- Galaxy — Spinning galaxy that can be resized/repositioned +- Gradient Clock — A polar clock overlaid on basic gradient +- Nexus — Brightly colored particles fire across screen +- Noise — A bokeh design similar to the iOS dynamic wallpaper +- Photoslide — Grid of photos from folder (default ~/Photos) animate in/out + +Live Wallpaper is **fully open-source** so there’s nothing to stop imaginative artists with the know-how (and patience) from creating some slick themes of their own. + +### Settings & Features ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/live-wallpaper-gui-settings.jpg) + +Each theme can be configured or customised in some way, though certain themes have more options than others. + +For example, in Nexus (pictured above) you can change the number and colour of the the pulse particles, their size, and their frequency. + +The preferences app also provides a set of **general options** that will apply to all themes. These include: + +- Setting live wallpaper to run on log-in +- Setting a custom background that the animation sits on +- Adjusting the FPS (including option to show FPS on screen) +- Specifying the multi-monitor behaviour + +With so many options available it should be easy to create a background set up that suits you. + +### Drawbacks ### + +#### No Desktop Icons #### + +You can’t add, open or edit files or folders on the desktop while Live Wallpaper is ‘On’. + +The Preferences app does list an option that will, supposedly, let you do this. It may work on really older releases but in our testing, on Ubuntu 14.10, it does nothing. + +One workaround that seems to work for some users of the app on Ubuntu is setting a .png image as the custom background. It doesn’t have to be a transparent .png, simply a .png. + +#### Resource Usage #### + +Animated wallpapers use more system resources than standard background images. + +We’re not talking about 50% load at all times —at least not with this app in our testing— but those on low-power devices and laptops will want to use apps like this cautiously. Use a [system monitoring tool][2] to keep an eye on CPU and GPU load. + +#### Quitting the app #### + +The biggest “bug” for me is the absolute lack of “quit” option. + +Sure, the animated wallpaper can be turned off from the Indicator Applet and the Preferences tool but quitting the app entirely, quitting the indicator applet? Nope. To do that I have to use the ‘pkill livewallpaper’ command in the Terminal. + +### How to Install Live Wallpaper in Ubuntu 14.04 LTS + ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/terminal-command-750x146.jpg) + +To install Live Wallpaper in Ubuntu 14.04 LTS and above you will first need to add the official PPA for the app to your Software Sources. + +The quickest way to do this is using the Terminal: + + sudo add-apt-repository ppa:fyrmir/livewallpaper-daily + + sudo apt-get update && sudo apt-get install livewallpaper + +You should also install the indicator applet, which lets you quickly and easily turn on/off the animated wallpaper and switch theme from the menu area, and the GUI settings tool so that you can configure each theme based on your tastes. + + sudo apt-get install livewallpaper-config livewallpaper-indicator + +When everything has installed you will be able to launch the app and its preferences tool from the Unity Dash. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/live-wallpaper-app-launcher.png) + +Annoyingly, the Indicator Applet won’t automatically open after you install it. It does add itself to the start up list, so a quick log out > log in will get it to show. + +### Summary ### + +If you fancy breathing life into a dull desktop, give it a spin — and let us know what you think of it and what animated wallpapers you’d love to see added! + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/05/animated-wallpaper-adds-live-backgrounds-to-linux-distros + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2012/11/live-wallpaper-for-ubuntu +[2]:http://www.omgubuntu.co.uk/2011/11/5-system-monitoring-tools-for-ubuntu \ No newline at end of file diff --git a/sources/tech/20150527 How to edit your documents collaboratively on Linux.md b/sources/tech/20150527 How to edit your documents collaboratively on Linux.md new file mode 100644 index 0000000000..91d2bf6441 --- /dev/null +++ b/sources/tech/20150527 How to edit your documents collaboratively on Linux.md @@ -0,0 +1,122 @@ +How to edit your documents collaboratively on Linux +================================================================================ +> "Developed many years before by some high-strung, compulsive assistant, the Bulletin was simply a Word document that lived in a shared folder both Emily and I could access. Only one of us could open it at a time and add a new message, thought, or question to the itemized list. Then we'd print out the updated version and place it on the clipboard that sat on the shelf over my desk, removing the old ones as we went." ("The Devil Wears Prada" by Lauren Weisberger) + +Even today such a "collaborative editing" is in use where only one person can open a shared file, make changes to it, and then inform others about what and when was modified. + +ONLYOFFICE is an open source online office suite integrated with different management tools for documents, emails, events, tasks and client relations. + +Using ONLYOFFICE office suite, a group of people can edit text, spreadsheet or presentation within a browser simultaneously. Leave comments directly in their document and interact with each other using the integrated chat. And, finally, save the document as a PDF file for further printing. As an added bonus, it gives the possibility to view the document history and restore the previous revision/version if needed. + +In this tutorial, I will describe how to deploy your own online office suite using [ONLYOFFICE Free Edition][1], an ONLYOFFICE self-hosted version distributed under GNU AGPL v3. + +### Installing ONLYOFFICE on Linux ### + +ONLYOFFICE installation requires the presence of mono (version 4.0.0 or later), nodejs, libstdc++6, nginx and mysql-server in your Linux system. To simplify the installation process and avoid dependency errors, I install ONLYOFFICE using Docker. In this case there is only one dependency to be installed - [Docker][2]. + +Just to remind, Docker is an open-source project that automates the deployment of applications inside software containers. If Docker is not available on your Linux system, install it first by referring to Docker installation instructions for [Debian-based][3] or [Red-Hat based][4] systems. + +Note that you will need Docker 1.4.1 or later. To check the installed Docker version, use the following command. + + $ docker version + +To try ONLYOFFICE inside a Docker container, simply execute the following commands: + + $ sudo docker run -i -t -d --name onlyoffice-document-server onlyoffice/documentserver + $ sudo docker run -i -t -d -p 80:80 -p 443:443 --link onlyoffice-document-server:document_server onlyoffice/communityserver + +These commands will download the [official ONLYOFFICE Docker image][5] with all dependencies needed for its correct work. + +It's also possible to install [ONLYOFFICE Online Editors][6] separately on a Linux server, and easily integrate it into your website or cloud application via API provided. + +### Running a Self-Hosted Online Office ### + +To open your online office, enter localhost (http://IP-Address/) in the address bar of your browser. The Welcome page will open: + +![](https://farm9.staticflickr.com/8815/18116525656_795821c73b_c.jpg) + +Enter a password and specify the email address you will use to access your office the next time. + +### Editing Your Documents Online ### + +First, click the Documents link to open **the My Documents** folder. + +![](https://farm8.staticflickr.com/7781/17956640089_d3df0b18cd_c.jpg) + +#### STEP 1. Select a Document to Edit #### + +To create a new document right there, click on the **Create** button in the upper left corner, and choose the file type from the drop-down list. To edit a file stored on your hard disk drive, upload it to **Documents** clicking the **Upload** button next to **Create** button. + +![](https://farm9.staticflickr.com/8836/17956640109_ed8be735df_c.jpg) + +#### STEP 2. Share your Document #### + +Use the **Share** button to the right side if you are in the **My Documents** folder, or follow **File >> Document Info ... >> Change Access Rights** if you are inside your document. + +In the opened **Sharing Settings** window, click on the **People outside portal** link on the left, open the access to the document, and give full access to it by enabling the **Full Access** radio button. + +Finally, choose a way to share the link to your document, send it via email or one of the available social networks: Google+, Facebook, or Twitter. + +![](https://farm8.staticflickr.com/7766/17522306273_c8a9022c75_c.jpg) + +#### STEP 3. Start the Collaborative Editing #### + +To start co-editing the document, the invited person just needs to follow the provided link. + +The text passages edited by your co-editors will be automatically marked with dashed lines of different colors. + +![](https://farm8.staticflickr.com/7790/18139370292_7ef57aae8f_c.jpg) + +As soon as one of your collaborators saves his/her changes, you will see a note appearing in the left upper corner of the top toolbar, indicating that there areupdates. + +![](https://farm8.staticflickr.com/7778/18143984831_3dd42a9672_c.jpg) + +To save your changes and get updates, click on the **Save** icon. All the updates will then be highlighted. + +![](https://farm8.staticflickr.com/7796/17955172970_e53460b8a6_c.jpg) + +#### STEP 4. Interact with your Co-editors #### + +To leave some comments, select a text passage with the mouse, right-click on it and, and choose the **Add comment** option from the context menu. + +![](https://farm8.staticflickr.com/7771/17956640359_c4e2858dc8_c.jpg) + +To interact with co-editors in real time, use the integrated chat instead. All the users who currently edit the document will be listed on the **Chat** panel. To open it, click on the **Chat** icon at the left-side bar. To start a discussion, enter your message into an appropriate field on the **Chat** panel. + +![](https://farm8.staticflickr.com/7794/18116394026_d93b00e4f8_c.jpg) + +### Useful Tips ### + +As final notes, here are some useful tips for you to take full advantage of ONLYOFFICE. + +#### Tip #1. Editing your Docs from Cloud Storage Services, Like ownCloud #### + +If you store your documents in other web resources like Box, Dropbox, Google Drive, OneDrive, SharePoint or ownCloud, you can easily synchronize them with the ONLYOFFICE. + +In the opened 'Documents' module, click one of the icons under the **Add the account** caption: Google, Box, DropBox, OneDrive, ownCloud or 'Add account', and enter the requested data. + +#### Tip #2. Editing Your Docs on iPad #### + +To add some changes to your document on the go, I use ONLYOFFICE Documents app for iPad. You can download and install it from [iTune][7], then you need to enter your ONLYOFFICE portal address, email and password to access your documents. The feature set is almost the same. + +To evaluate ONLYOFFICE Online Editors features, you can use the [cloud version][8] for personal use. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/edit-documents-collaboratively-linux.html + +作者:[Tatiana Kochedykova][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/tatiana +[1]:http://www.onlyoffice.org/ +[2]:http://xmodulo.com/recommend/dockerbook +[3]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html +[4]:http://xmodulo.com/docker-containers-centos-fedora.html +[5]:https://registry.hub.docker.com/u/onlyoffice/communityserver/ +[6]:http://onlyoffice.org/sources#document +[7]:https://itunes.apple.com/us/app/onlyoffice-documents/id944896972 +[8]:https://personal.onlyoffice.com/ \ No newline at end of file From ee1dc9ac5df93a17f9d0797dc9d9271d38b63eb2 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 27 May 2015 10:53:16 +0800 Subject: [PATCH 0979/2517] Translating by ZTinoZ --- .../tech/20150526 20 Useful Terminal Emulators for Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 436b28f79f..a77c665426 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -1,5 +1,5 @@ Translating by ZTinoZ -20 Useful Terminal Emulators for Linux +20款优秀的Linux终端仿真器 ================================================================================ A Terminal emulator is a computer program that reproduces a video terminal within some other display structure. In other words the Terminal emulator has an ability to make a dumb machine appear like a client computer networked to the server. The terminal emulator allows an end user to access console as well as its applications such as text user interface and command line interface. @@ -272,7 +272,7 @@ If you know any other capable Linux terminal emulators that I’ve not included via: http://www.tecmint.com/linux-terminal-emulators/ 作者:[Ravi Saive][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 7864340c42eee990b1d9bcc6413cb5cba06037c9 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 27 May 2015 13:50:47 +0800 Subject: [PATCH 0980/2517] PUB:20150429 Synfig Studio 1.0--Open Source Animation Gets Serious @H-mudcup --- ...1.0--Open Source Animation Gets Serious.md | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) rename {translated/share => published}/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md (53%) diff --git a/translated/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md b/published/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md similarity index 53% rename from translated/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md rename to published/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md index b4e41bd155..a216674d9b 100644 --- a/translated/share/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md +++ b/published/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md @@ -1,21 +1,16 @@ -Translating by H-mudcup - -Synfig Studio 1.0 —— 开源动画动真格的了 +Synfig Studio 1.0:开源动画动真格的了 ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/synfig-free-animations-750x467.jpg) **现在可以下载 Synfig Studio 这个自由、开源的2D动画软件的全新版本了。 ** -在第一次发行这个跨平台的软件一年以后,Synfig Studio 1.0 带着一套全新改和改进过的功能,实现它所承诺的“创造电影级别的动画的产业级解决方案”。 +在这个跨平台的软件首次发行一年之后,Synfig Studio 1.0 带着一套全新改进过的功能,实现它所承诺的“创造电影级的动画的工业级解决方案”。 -在众多功能之上的是一个改进过的用户界面,据工程开发者说那是个用起来‘更简单’、‘更直观’的界面。客户端添加了新的**单窗口模式**,让界面更整洁,而且**为了使用最新的 GTK3 库而被重新制作**。 +在众多功能之上的是一个改进过的用户界面,据项目开发者说那是个用起来‘更简单’、‘更直观’的界面。客户端添加了新的**单窗口模式**,让界面更整洁,而且**使用了最新的 GTK3 库重制**。 在功能方面有几个值得注意的变化,包括新加的全功能骨骼系统。 -这套**关节和转轴的‘骨骼’构架**非常适合2D剪纸动画,再配上这个版本新加的复杂的变形控制系统或是 Synfig 受欢迎的‘关键帧自动插入’(阅读:画面与画面间的变形)应该会变得非常有效率的。 - -注:youtube视频 - +这套**关节和转轴的‘骨骼’构架**非常适合2D剪纸动画,再配上这个版本新加的复杂的变形控制系统或是 Synfig 受欢迎的‘关键帧自动插入’(即:帧到帧之间的变形)应该会变得非常有效率的。(youtube视频 https://www.youtube.com/M8zW1qCq8ng ) 新的无损剪切工具,摩擦力效果和对逐帧位图动画的支持,可能会有助于释放开源动画师们的创造力,更别说新加的用于同步动画的时间线和声音的声效层! @@ -23,18 +18,18 @@ Synfig Studio 1.0 —— 开源动画动真格的了 Synfig Studio 并不是任何人都能用的工具套件,这最新发行版的最新一批改进应该能吸引一些动画制作者试一试这个软件。 -If you want to find out what open-source animation software is like for yourself, you can grab an installer for Ubuntu for the latest release direct from the project’s page using the links below. 如果你想看看开源动画制作软件是什么样的,你可以通过下面的链接直接从工程的 Sourceforge 页下载一个适用于 Ubuntu 的最新版本的安装器。 +如果你想看看开源动画制作软件是什么样的,你可以通过下面的链接直接从工程的 Sourceforge 页下载一个适用于 Ubuntu 的最新版本的安装器。 -- [Download Synfig 1.0 (64bit) .deb Installer][1] -- [Download Synfig 1.0 (32bit) .deb Installer][2] +- [下载 Synfig 1.0 (64bit) .deb 安装器][1] +- [下载 Synfig 1.0 (32bit) .deb 安装器][2] -------------------------------------------------------------------------------- via: http://www.omgubuntu.co.uk/2015/04/synfig-studio-new-release-features -作者:[oey-Elijah Sneddon][a] +作者:[Joey-Elijah Sneddon][a] 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From c4c125648a2d04077011c367da5d2340f2350c15 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 27 May 2015 14:09:33 +0800 Subject: [PATCH 0981/2517] =?UTF-8?q?20150527-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...st Using Docker Machine in a VirtualBox.md | 113 ++++++++++++++++++ ...-How to mount an LVM partition on Linux.md | 89 ++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md create mode 100644 sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md diff --git a/sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md b/sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md new file mode 100644 index 0000000000..ea827ec74e --- /dev/null +++ b/sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md @@ -0,0 +1,113 @@ +Howto Manage Host Using Docker Machine in a VirtualBox +================================================================================ +Hi all, today we'll learn how to create and manage a Docker host using Docker Machine in a VirtualBox. Docker Machine is an application that helps to create Docker hosts on our computer, on cloud providers and inside our own data center. It provides easy solution for creating servers, installing Docker on them and then configuring the Docker client according the users configuration and requirements. This API works for provisioning Docker on a local machine, on a virtual machine in the data center, or on a public cloud instance. Docker Machine is supported on Windows, OSX, and Linux and is available for installation as one standalone binary. It enables us to take full advantage of ecosystem partners providing Docker-ready infrastructure, while still accessing everything through the same interface. It makes people able to deploy the docker containers in the respective platform pretty fast and in pretty easy way with just a single command. + +Here are some easy and simple steps that helps us to deploy docker containers using Docker Machine. + +### 1. Installing Docker Machine ### + +Docker Machine supports awesome on every Linux Operating System. First of all, we'll need to download the latest version of Docker Machine from the [Github site][1] . Here, we'll use curl to download the latest version of Docker Machine ie 0.2.0 . + +**For 64 Bit Operating System** + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine + +**For 32 Bit Operating System** + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386 > /usr/local/bin/docker-machine + +After downloading the latest release of Docker Machine, we'll make the file named **docker-machine** under **/usr/local/bin/** executable using the command below. + + # chmod +x /usr/local/bin/docker-machine + +After doing the above, we'll wanna ensure that we have successfully installed docker-machine. To check it, we can run the docker-machine -v which will give output of the version of docker-machine installed in our system. + + # docker-machine -v + +![Installing Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) + +To enable Docker commands on our machines, make sure to install the Docker client as well by running the command below. + + # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker + # chmod +x /usr/local/bin/docker + +### 2. Creating VirualBox VM ### + +After we have successfully installed Docker Machine in our Linux running machine, we'll definitely wanna go for creating a Virtual Machine using VirtualBox. To get started, we need to run docker-machine create command followed by --driver flag with string as virtualbox as we are trying to deploy docker inside of Virtual Box running VM and the final argument is the name of the machine, here we have machine name as "linux". This command will download [boot2docker][2] iso which is a light-weighted linux distribution based on Tiny Core Linux with the Docker daemon installed and will create and start a VirtualBox VM with Docker running as mentioned above. + +To do so, we'll run the following command in a terminal or shell in our box. + + # docker-machine create --driver virtualbox linux + +![Creating Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-docker-machine.png) + +Now, to check whether we have successfully create a Virtualbox running Docker or not, we'll run the command **docker-machine** ls as shown below. + + # docker-machine ls + +![Docker Machine List](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-list.png) + +If the host is active, we can see * under the ACTIVE column in the output as shown above. + +### 3. Setting Environment Variables ### + +Now, we'll need to make docker talk with the machine. We can do that by running docker-machine env and then the machine name, here we have named **linux** as above. + + # eval "$(docker-machine env linux)" + # docker ps + +This will set environment variables that the Docker client will read which specify the TLS settings. Note that we'll need to do this every time we reboot our machine or start a new tab. We can see what variables will be set by running the following command. + + # docker-machine env linux + + export DOCKER_TLS_VERIFY=1 + export DOCKER_CERT_PATH=/Users//.docker/machine/machines/dev + export DOCKER_HOST=tcp://192.168.99.100:2376 + +### 4. Running Docker Containers ### + +Finally, after configuring the environment variables and Virtual Machine, we are able to run docker containers in the host running inside the Virtual Machine. To give it a test, we'll run a busybox container out of it run running **docker run busybox** command with **echo hello world** so that we can get the output of the container. + + # docker run busybox echo hello world + +![Running Docker Container](http://blog.linoxide.com/wp-content/uploads/2015/05/running-docker-container.png) + +### 5. Getting Docker Host's IP ### + +We can get the IP Address of the running Docker Host's using the **docker-machine ip** command. We can see any exposed ports that are available on the Docker host’s IP address. + + # docker-machine ip + +![Docker IP Address](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-ip-address.png) + +### 6. Managing the Hosts ### + +Now we can manage as many local VMs running Docker as we desire by running docker-machine create command again and again as mentioned in above steps + +If you are finished working with the running docker, we can simply run **docker-machine stop** command to stop the whole hosts which are Active and if wanna start again, we can run **docker-machine start**. + + # docker-machine stop + # docker-machine start + +You can also specify a host to stop or start using the host name as an argument. + + $ docker-machine stop linux + $ docker-machine start linux + +### Conclusion ### + +Finally, we have successfully created and managed a Docker host inside a VirtualBox using Docker Machine. Really, Docker Machine enables people fast and easy to create, deploy and manage Docker hosts in different platforms as here we are running Docker hosts using Virtualbox platform. This virtualbox driver API works for provisioning Docker on a local machine, on a virtual machine in the data center. Docker Machine ships with drivers for provisioning Docker locally with Virtualbox as well as remotely on Digital Ocean instances whereas more drivers are in the work for AWS, Azure, VMware, and other infrastructure. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/host-virtualbox-docker-machine/ + +作者:[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/ +[1]:https://github.com/docker/machine/releases +[2]:https://github.com/boot2docker/boot2docker \ No newline at end of file diff --git a/sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md b/sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md new file mode 100644 index 0000000000..42cfb4b2ae --- /dev/null +++ b/sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md @@ -0,0 +1,89 @@ +Linux FAQs with Answers--How to mount an LVM partition on Linux +================================================================================ +> **Question**: I have an external USB drive which contains several LVM partitions on it. I want to access some of those LVM partitions on my Linux. How can I mount an LVM partition on Linux? + +LVM is a logical volume management tool which allows you to manage disk space using the notion of logical volumes and volume groups. The biggest benefit of using LVM over classic partitions is the flexibility in allocating storage for users and applications without being constrained by the size of individual physical disks. + +In LVM, the physical storage, on which logical volumes are created, is traditional partitions (e.g., /dev/sda2, /dev/sdb1). These partitions must be initialized as "physical volumes" and labeled so (e.g., "Linux LVM") in order for them to be used in LVM. Once the partitions are labeled as LVM volumes, you cannot mount them directly with mount command. + +If you attempt to mount an LVM partition (e.g., /dev/sdb2), you will get the following error. + + $ mount /dev/sdb2 /mnt + +---------- + + mount: unknown filesystem type 'LVM2_member' + +![](https://farm8.staticflickr.com/7696/17749902190_0a6d36821f_b.jpg) + +If you want to mount an LVM partition properly, you must instead mount "logical volumes" created inside the partition. Here is how to to it. + +First, examine a list of available volume groups by running: + + $ sudo pvs + +---------- + + PV VG Fmt Attr PSize PFree + /dev/sdb2 vg_ezsetupsystem40a8f02fadd0 lvm2 a-- 237.60g 0 + +![](https://farm8.staticflickr.com/7657/17938136831_d9320b7bfc_b.jpg) + +The names of available physical volumes and volume groups are listed under PV and VG columns, respectively. In this example, there is a single volume group named "vg_ezsetupsystem40a8f02fadd0" created on /dev/sdb2. + +Next, let's check what logical volumes exist inside this volume group. For that, use lvdisplay command: + + $ sudo lvdisplay + +Running lvdisplay shows information about available logical volumes (e.g., device name, volume name, volume size, etc) as shown below. + + $ sudo lvdisplay /dev/vg_ezsetupsystem40a8f02fadd0 + +---------- + + --- Logical volume --- + LV Path /dev/vg_ezsetupsystem40a8f02fadd0/lv_root + LV Name lv_root + VG Name vg_ezsetupsystem40a8f02fadd0 + LV UUID imygta-P2rv-2SMU-5ugQ-g99D-A0Cb-m31eet + LV Write Access read/write + LV Creation host, time livecd.centos, 2015-03-16 18:38:18 -0400 + LV Status available + # open 0 + LV Size 50.00 GiB + Current LE 12800 + Segments 1 + Allocation inherit + Read ahead sectors auto + - currently set to 256 + Block device 252:0 + +![](https://farm8.staticflickr.com/7707/17938137591_cdb4cbfb43_b.jpg) + +If you want to mount a particular logical volume, use its device name shown in "LV Path" (e.g., /dev/vg_ezsetupsystem40a8f02fadd0/lv_home) as follows. + + $ sudo mount /dev/vg_ezsetupsystem40a8f02fadd0/lv_home /mnt + +You can check the mount status by running mount command without any argument, which will show you a list of all mounted filesystems. + + $ mount + +![](https://farm6.staticflickr.com/5449/17749903670_2ee617445d_c.jpg) + +If you want to have a logical volume to be mounted automatically on boot, add the following line in /etc/fstab. You need to specify the file system type (e.g., EXT4) of the volume, which you can find out from the output of mount command above. + + /dev/vg_ezsetupsystem40a8f02fadd0/lv_home /mnt ext4 defaults 0 0 + +Now the logical volume will be automatically mounted at /mnt upon boot. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/mount-lvm-partition-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://ask.xmodulo.com/author/nanni \ No newline at end of file From 21b64d40fad77558fea5f19ce0ff9eee939f1478 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 27 May 2015 14:34:57 +0800 Subject: [PATCH 0982/2517] =?UTF-8?q?20150527-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Custom Linux Distribution From Scratch.md | 65 +++++ ...Useful Hacks Every Linux User Must Know.md | 79 ++++++ ... Check Laptop CPU Temperature In Ubuntu.md | 82 +++++++ ...hopping Store Using 'OpenCart' in Linux.md | 225 ++++++++++++++++++ ...sive Applications Using 'xkill' Command.md | 92 +++++++ 5 files changed, 543 insertions(+) create mode 100644 sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md create mode 100644 sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md create mode 100644 sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md create mode 100644 sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md create mode 100644 sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md diff --git a/sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md b/sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md new file mode 100644 index 0000000000..9bf07333ea --- /dev/null +++ b/sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md @@ -0,0 +1,65 @@ +How to Develop Own Custom Linux Distribution From Scratch +================================================================================ +Have you ever thought of making your own Linux Distribution? Every Linux user in their journey to Linux thought of making their own Linux distribution, at-least once. Even I was not an exception as a newbie to Linux land and have given my considerable time developing my own Linux Distribution. Developing a Linux Distribution from scratch is called Linux From Scratch (LFS) + +Before starting, I concluded a few things about LFS which can be described as: + +### 1. Those who want to develop their own Linux Distribution should understand the difference between Developing a Linux distribution from scratch (by scratch means starting from the beginning) or all you want is just to tweak an already available Linux Distro. ### + +If you just want to tweak flash screen, customize login and preferably work on the look and feel of Linux OS, you can choose any fair Linux Distribution and customize it the way you want. Moreover a lots of tweaking tools there will help. + +If you want to put all the necessary files and boot-loaders and kernel and choose what to include and what not to include and then compile everything yourselves you need to develop Linux From Scratch (LFS). + +**Note**: If you just want to customize the look and feel of a Linux OS, this guide is not for you. If you really want to develop a Linux distribution from scratch and want to know where to start and other basic information, here is the guide for you. + +### 2. Pros of Developing own Linux Distribution (LFS): ### + +- You get to know the internal working of Linux OS. +- You develop a very flexible OS as per your need. +- Your developed OS (LFS) will be very compact as you have full control over what to include/exclude. +- You Development (LFS) will have added security. + +### 3. Cons of Developing own Linux Distribution (LFS): ### + +Developing a Linux OS from scratch means putting all the necessary things together and compile. This requires a lot of reading, patience and time. Also you should have a working Linux System to develop LFS and fairly enough disk space. + +### 4. Interesting to know, that Gentoo/GNU Linux is closest to LFS to certain extent. Both Gentoo and LFS is the customized Linux System built entirely out from compilation of Source. ### + +### 5. You should be experienced Linux user having good knowledge of package compilation, resolving dependencies, and pro in shell scripting language. Knowledge of a programming language (Preferably C) will ease things for you. Even if you are a newbie but a good learner and grasp the things quickly, you may start as well. The most important part is you should not loose your enthusiasm throughout the process of LFS development. ### + +If you are not determined enough, I fear you may leave building your LFS in the middle. + +### 6. Now you need a step-by-step guide, So that Linux can be developed from scratch. LFS is the official guide to develop Linux From Scratch. Our partner site tradepub has made available LFS guide to our readers and that too for free. ### + +You can download the Linux From Scratch book from the below link: + +[![](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-From-Scratch.gif)][1] + +Download: [Linux From Scratch][1] + +### About: Linux From Scratch ### + +This book is created by Gerard Beekmans, who is the Project Leader of LFS and Edited by Matthew Burgess and Bruse Dubbs, both of whom are Co-leader of the Project. This book is extensive and expands over 338 pages. + +Having covered – Introduction to LFS, Preparing for the build, Build LFS from Scratch, Setting up of Boot scripts, Making LFS Bootable followed by Appendices, it has all you want to know on LFS Project. + +Also this book gives you the estimated time required for the compilation of a package. The estimated time are calculated based upon the reference of the compilation time of the first package. All the details are presented in a manner easy to understand and implement, even for newbies. + +If you have plenty of time and really interested in developing your own Linux Distribution you would never want to miss a chance to download this ebook and that too for free. All you need is, to start developing your own Linux OS using this ebook along with a working Linux OS (Any Linux Distribution with enough Disk Space), Time and Enthusiasm. + +If Linux fascinates you, if you want to understand Linux from scratch and want to develop your own Linux Distribution, then this is all you should know at this stage, for most of other things you may like to refer to the book, in the above link. + +Also let me know your experience with the book. How ease it was to get along the elaborated LFS guide? Also if you have already Developed a LFS and want to give some tips to our readers, your feedbacks are welcome. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-custom-linux-distribution-from-scratch/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://tecmint.tradepub.com/free/w_linu01/prgm.cgi \ No newline at end of file diff --git a/sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md b/sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md new file mode 100644 index 0000000000..39546df146 --- /dev/null +++ b/sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md @@ -0,0 +1,79 @@ +3 Useful Hacks Every Linux User Must Know +================================================================================ +The world of Linux is filled with so much fun and interesting stuffs, the more we go in, the more we find stuffs. In our efforts to bring those little hacks and tips for you that makes you different from others, here we have came up with three little tricks. + +### 1. How to Schedule a Linux Job Without Cron ### + +Scheduling a job/command in Linux is acronym to cron. Whenever we need to schedule a job, we call cron, but do you know we can schedule a job at a later time without corn? You can do it as suggested below.. + +Run a command (say date) every 5 sec and write the output to a file (say date.txt). To achieve this scenario, we need to run the below one liner script directly on the command prompt. + + $ while true; do date >> date.txt ; sleep 5 ; done & + +Anatomy of the above one liner script: + +- while true – Ask script to run while the condition is true, it acts as a loop which makes the command to run again-and-again or say in a loop. +- do – do perform what follows, ie., execute command or set of commands that lies ahead of do statement. +- date >> date.txt – here the output of date command is being written to a file date.txt. Also note that we have used >> and not >. +- >> ensures that the file (date.txt) is not overwritten every time the script execute. It just append the changes. Whereas > overwrite the file again and again. +- sleep 5 – It ask the shell to keep a time difference of 5 seconds before it executed again. Note the time here is always measured in seconds. Say if you want to execute the command every 6 minutes, you should use (6*60) 360, in succession of sleep. +- done – marks the end of while loop. +- & – Put the whole process in loop to background. + +Similarly, we can execute any script in the same manner. Here is the command to call a script after certain interval (say 100 sec) and the name of script is `script_name.sh`. + +Also worth mentioning that the script above should be run in the directory where the script to be called lies, else you need to provide full path (`/home/$USER/…/script_name.sh`). The syntax for calling script at above described interval is: + + $ while true; do /bin/sh script_name.sh ; sleep 100 ; done & + +**Conclusion**: The above one liner is not a replacement of Cron, because Cron utility supports a whole lots of options, as compared and is very flexible as well as customizable. However if we want to run certain test cases or I/O benchmark, then the above singe command will serve the purpose. + +Read Also: [11 Linux Cron Job Scheduling Examples][1] + +### 2. How to Clear Terminal without Using ‘clear’ Command ### + +What we do to clear the screen? Well you may think how silly it is to ask such question. Well, we all know it’s ‘clear‘ command. However if we make a habit of using key combination ‘ctrl+l‘ to clear terminal, we will save a lot of time of ours. + +Key combination ‘Ctrl+l‘ has the same effect as ‘clear‘ command. So from next time use ctrl+l to clear your Linux Command Line Interface. + +**Conclusion**: Since ctrl+l is a key combination, so we can not use it inside a script. If we need to clear screen inside a shell script, call command ‘clear’, for all other cases I could think of now, ctrl+l is more than sufficient. + +### 3. Run a command and come back to the current working directory automatically. ### + +Well this is an amazing hack not many people know. You may run a command no matter what it return back to the current directory. All you need to do is to run the command in parentheses i.e., in between `( and )`. + +Let see the example, + + avi@deb:~$ (cd /home/avi/Downloads/) + +#### Sample Output #### + + avi@deb:~ + +First it cd to directory Downloads and then again return back to home directory in one go. May be you believe that the command didn’t executed and for some reason one or another it is not throwing error, since there is no change in prompt. Lets do a little more tweak.. + + avi@deb:~$ (cd /home/avi/Downloads/ && ls -l) + +#### Sample Output #### + + -rw-r----- 1 avi avi 54272 May 3 18:37 text1.txt + -rw-r----- 1 avi avi 54272 May 3 18:37 text2.txt + -rw-r----- 1 avi avi 54272 May 3 18:37 text3.txt + avi@deb:~$ + +So in the above command it first changed the current directory to Downloads and then list the content of that directory before returning back to current directory. Also, it proves that command executed successfully. You may run any sort of command in the parentheses and return back to your current working directory without a hitch. + +That’s all for now, if you know any such Linux hacks or tricks you may share with us via our comment section and don’t forget to share this article with your friends…. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/useful-linux-hacks-commands/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ \ No newline at end of file diff --git a/sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md b/sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md new file mode 100644 index 0000000000..4dc3291ac9 --- /dev/null +++ b/sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md @@ -0,0 +1,82 @@ +How To Check Laptop CPU Temperature In Ubuntu +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Monitor_temperature_Ubuntu.png) + +Overheating of laptops is a common issue one faces these days. Monitoring hardware temperature may help you to diagnose why laptop is getting overheated. In this article, we’ll see **how to check CPU temperature in Ubuntu**. + +We are going to use a GUI tool [Psensor][1] that allows you to monitor hardware temperature in Linux. With Psensor you can: + +- monitor the temperature of the motherboard and CPU sensors +- monitor the temperature of the NVidia GPUs +- monitor the temperature of the Hard Disk Drives +- monitor the rotation speed of the fans +- monitor the CPU usage + +Latest version of Psensor also provides applet indicator for Ubuntu and thus it makes the monitoring of hardware temperature even easier in Ubuntu. You can choose to display the temperature right in the top panel itself. It even sends a desktop notification when the temperature exceeds the limit. + +### How to install Psensor in Ubuntu 15.04 and 14.04 ### + +Before you install Psensor, you need to install and configure [lm-sensors][2], a command line utility for hardware monitoring. If you want to measure hard disk temperature, you need to install [hddtemp][3] as well. To install these tools, run the following command in a terminal: + + sudo apt-get install lm-sensors hddtemp + +Then start the detection of your hardware sensors: + + sudo sensors-detect + +To make sure that it works, run the command below: + + sensors + +It will give you an output like: + + acpitz-virtual-0 + Adapter: Virtual device + temp1: +43.0°C (crit = +98.0°C) + + coretemp-isa-0000 + Adapter: ISA adapter + Physical id 0: +44.0°C (high = +100.0°C, crit = +100.0°C) + Core 0: +41.0°C (high = +100.0°C, crit = +100.0°C) + Core 1: +40.0°C (high = +100.0°C, crit = +100.0°C) + +If everything seems alright, proceed with the installation of Psensor by using the command below: + + sudo apt-get install psensor + +Once installed, run the application by looking for it in Unity Dash. At first run, you should configure on what stats do you want to collect in Psensor. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu.jpeg) + +### Display temperature in the panel ### + +If you want to show the temperature in the top panel, go to **Sensor Preferences**: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu_1.jpeg) + +Then under the **Application Indicator** menu, select the component for which you want to display the temperature and then check the **Display sensor in the label** option. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu_2.jpeg) + +### Start Psensor at each start up ### + +Go to **Preferences->Startup** and the check **Launch on session startup** to start Psensor at each boot. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu_3.jpeg) + +That’s it. All you need to monitor the CPU temperature is here. You can keep an eye on it and it may help you find out which process is overheating your computer. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/check-laptop-cpu-temperature-ubuntu/ + +作者:[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://wpitchoune.net/blog/psensor/ +[2]:http://www.lm-sensors.org/ +[3]:https://wiki.archlinux.org/index.php/Hddtemp \ No newline at end of file diff --git a/sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md b/sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md new file mode 100644 index 0000000000..ad673a03e0 --- /dev/null +++ b/sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md @@ -0,0 +1,225 @@ +How to Create Own Online Shopping Store Using “OpenCart” in Linux +================================================================================ +In the Internet world we are doing everything using a computer. Electronic Commerce aka e-commerce is one one of them. E-Commerce is nothing new and it started in the early days of ARPANET, where ARPANET used to arrange sale between students of Massachusetts Institute of Technology and Stanford Artificial Intelligence Laboratory. + +These days there are some 100’s of E-Commerce site viz., Flipcart, eBay, Alibaba, Zappos, IndiaMART, Amazon, etc. Have you thought of making your own Amazon and Flipcart like web-based Application Server? If yes! This article is for you. + +Opencart is a free and open source E-Commerce Application written in PHP, which can be used to develop a shopping cart system similar to Amazon and Flipcart. If you want to sell your products online or want to serve your customers even when you are closed Opencart is for you. You can build a successful online store (for online merchants) using reliable and professional Opencart Application. + +### OpenCart Web Panel Demo ### + +- Store Front – [http://demo.opencart.com/][1] +- Admin Login – [http://demo.opencart.com/admin/][2] + + ------------------ Admin Login ------------------ + Username: demo + Password: demo + +#### Features of Opencart #### + +Opencart is an application that meets all the requirements of an online merchant. It has all the features (see below) using which you can make your own E-Commerce Website. + +- It is a Free (as in beer) and Open Source (as in speech) Application released under GNU GPL License. +- Everything is well documented, means you don’t need to Google and shout for help. +- Free Life time support and updates. +- Unlimited number of categories, Products and manufacturer supported. +- Everything is Template based. +- Multi-Language and Multi-Currency Supported. It ensures your product gets a global reach. +- Built-in Product Review and Rating Features. +- Downloadable Products (viz., ebook) supported. +- Automatic Image Resizing supported. +- Features like Multi tax Rates (as in various country), Viewing Related Products, Information Page, Shipping Weight Calculation, Availing Discount Coupons, etc are well implemented by default. +- Built-in Backup and Restore tools. +- Well implemented SEO. +- Invoice Printing, Error Log and sales report are supported as well. + +#### System Requirements #### + +- Web Server (Apache HTTP Server Preferred) +- PHP (5.2 and above). +- Database (MySQLi Preferred but I am using MariaDB). + +#### Required PHP Libraries and Modules #### + +These extensions must be installed and enabled on your system to install Opencart properly on the web server. + +- Curl +- Zip +- Zlib +- GD Library +- Mcrypt +- Mbstrings + +### Step 1: Installing Apache, PHP and MariaDB ### + +1. As I said, OpenCart requires certain technical requirements such as Apache, PHP with extensions and Database (MySQL or MariaDB) to be installed on the system, in order to run Opencart properly. + +Let’s install Apache, PHP and MariaDB using following Command. + +**Install Apache** + + # apt-get install apache2 (On Debian based Systems) + # yum install httpd (On RedHat based Systems) + +**Install PHP and Extensions** + + # apt-get install php5 libapache2-mod-php5 php5-curl php5-mcrypt (On Debian based Systems) + # yum install php php-mysql php5-curl php5-mcrypt (On RedHat based Systems) + +**Install MariaDB** + + # apt-get install mariadb-server mariadb-client (On Debian based Systems) + # yum install mariadb-server mariadb (On RedHat based Systems) + +2. After installing all the above required things, you can start the Apache and MariaDB services using following commands. + + ------------------- On Debian based Systems ------------------- + # systemctl restart apache2.service + # systemctl restart mariadb.service + +---------- + + ------------------- On RedHat based Systems ------------------- + # systemctl restart httpd.service + # systemctl restart mariadb.service + +### Step 2: Downloading and Setting OpenCart ### + +3. The most recent version of OpenCart (2.0.2.0) can be obtained from [OpenCart website][3] or directly from github. + +Alternatively, you may use following wget command to download the latest version of OpenCart directly from github repository as shown below. + + # wget https://github.com/opencart/opencart/archive/master.zip + +4. After downloading zip file, copy to Apache Working directory (i.e. /var/www/html) and unzip the master.zip file. + + # cp master.zip /var/www/html/ + # cd /var/www/html + # unzip master.zip + +5. After extracting ‘master.zip‘ file, cd to extracted directory and move the content of upload directory to the root of the application folder (opencart-master). + + # cd opencart-master + # mv -v upload/* ../opencart-master/ + +6. Now you need to rename or copy OpenCart configuration files as shown below. + + # cp /var/www/html/opencart-master/admin/config-dist.php /var/www/html/opencart-master/admin/config.php + # cp /var/www/html/opencart-master/config-dist.php /var/www/html/opencart-master/config.php + +7. Next, set correct Permissions to the files and folders of /var/www/html/opencart-master. You need to provide RWX permission to all the files and folders there, recursively. + + # chmod 777 -R /var/www/html/opencart-master + +**Important**: Setting permission 777 may be dangerous, so as soon as you finish setting up everything, revert back to permission 755 recursively on the above folder. + +### Step 3: Creating OpenCart Database ### + +8. Next step is to create a database (say opencartdb) for the E-Commerce site to store data on the database. Connect to databaser server and create a database, user and grant correct privileges on the user to have full control over the database. + + # mysql -u root -p + CREATE DATABASE opencartdb; + CREATE USER 'opencartuser'@'localhost' IDENTIFIED BY 'mypassword'; + GRANT ALL PRIVILEDGES ON opencartdb.* TO 'opencartuser'@'localhost' IDENTIFIED by 'mypassword'; + +### Step 4: OpenCart Web Installation ### + +9. Once everything set correctly, navigate to the web browser and type `http://` to access the OpenCart web installation. + +Click ‘CONTINUE‘ to Agree the License Agreement. + +![Accept OpenCart License](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-License.png) + +Accept OpenCart License + +10. The next screen is Pre-installation Server Setup Check, to see that the server has all the required modules are installed properly and have correct permission on the OpenCart files. + +If any red marks are highlighted on #1 or #2, that means you need to install those components properly on the server to meet web server requirements. + +If there are any red marks on #3 or #4, that means there is issue with your files. If everything is correctly configured you should see all green marks are visible (as seen below), you may press “Continue“. + +![Server Requirement Check](http://www.tecmint.com/wp-content/uploads/2015/05/Server-Checkup.png) + +Server Requirement Check + +11. On the next screen enter your Database Credentials like Database Driver, Hostname, User-name, Password, database. You should not touch db_port and Prefix, until and unless you know what you are doing. + +Also Enter User_name, Password and Email Address for Administrative account. Note these credentials will be used for logging in to Opencart Admin Panel as root, so keep it safe. Click continue when done! + +![OpenCart Database Details](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Database.png) + +OpenCart Database Details + +12. The next screen shows message like “Installation Complete” with the Tag Line Ready to Start Selling. Also it warns to delete the installation directory, as everything required to setup using this directory has been accomplished. + +![OpenCart Installation Completes](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Installation-Completes.png) + +OpenCart Installation Completes + +To Remove install directory, you may like to run the below command. + + # rm -rf /var/www/html/opencart-master/install + +### Step 4: Access OpenCart Web and Admin ### + +13. Now point your browser to `http:///opencart-master/` and you would see something like the below screenshot. + +![OpenCart Product Showcase](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart.jpg) + +OpenCart Product Showcase + +14. In order to login to Opencart Admin Panel, point your browser to http:///opencart-master/admin and fill the Admin Credentials you input, while setting it up. + +![OpenCart Admin Login](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Admin-Login.png) + +OpenCart Admin Login + +15. If everything ok! You should be able to see the Admin Dashboard of Opencart. + +![OpenCart Dashboard](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Dashboard.png) + +OpenCart Dashboard + +Here in Admin Dashboard you may set up a lots of options like categories, product, options, Manufacturers, Downloads, Review, Information, Extension Installer, Shipping, Payment options, order totals, gift voucher, Paypal, Coupons, Affiliates, marketing, mails, Design and Settings, Error logs, in-built analytics and what not. + +#### What after testing the tools? #### + +If you have already tested the Application and finds it customizable, flexible, Rock Solid, Easy to maintain and use, you may need a good hosting provider to host OpenCart application, that remains live 24X7 support. Though there are a lot of options for hosting providers we recommend Hostgator. + +Hostgator is a Domain Registrant and Hosting Provider that is very well known for the service and feature it provides. It Provides you with UNLIMITED Disk Space, UNLIMITED Bandwidth, Easy to install (1-click install script), 99.9% Uptime, Award winning 24x7x365 Technical Support and 45 days money back guarantee, which means if you didn’t like the product and service you get your money back within 45 days of purchasing and mind it 45 days is a long time to Test. + +So if you have something to sell you can do it for free (by free I mean, Think of the cost you would spend on getting a physical store and then compare it with virtual store setting-up cost. You will feel its free). + +**Note**: When you buy hosting (and/or Domain) from Hostgator you will get a **Flat 25% OFF**. This offer is valid only for the readers of Tecmint Site. + +All you have to do is to Enter Promocode “**TecMint025**” during the payment of hosting. For reference see the preview of payment screen with promo code. + +![Hostgator 25% Discount - TecMint025](http://www.tecmint.com/wp-content/uploads/2015/05/Hostgator-Discount-Code.png) + +[Sign up for Hostgator][4] (Coupon code: TecMint025) + +**Note**: Also worth mentioning, that for each hosting you buy from Hostgator to host OpenCart, we will get a small amount of commission, just to keep Tecmint Live (by Paying Bandwidth and hosting charges of server). + +So If you buy it using the above code, you get discount and we will get a small amount. Also note that you won’t pay anything extra, infact you will be paying 25% less on total bill. + +### Conclusion ### + +OpenCart is an application that performs out-of-the box. It is easy to install and you have the option to choose best suited templates, add your products and you become an online merchant. + +A lots of community made extensions(free and paid) makes it rich. It is a wonderful application for those who want to setup a virtual store and remain accessible to their customer 24X7. Let me know yours experience with the application. Any suggestion and feedback is welcome as well. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-e-commerce-online-shopping-store-using-opencart-in-linux/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://demo.opencart.com/ +[2]:http://demo.opencart.com/admin/ +[3]:http://www.opencart.com/index.php?route=download/download/ +[4]:http://secure.hostgator.com/%7Eaffiliat/cgi-bin/affiliates/clickthru.cgi?id=tecmint \ No newline at end of file diff --git a/sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md b/sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md new file mode 100644 index 0000000000..ebbfe264bc --- /dev/null +++ b/sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md @@ -0,0 +1,92 @@ +How to Kill Linux Processes/Unresponsive Applications Using ‘xkill’ Command +================================================================================ +How do we kill a resource/process in Linux? Obviously we find the PID of the resource and then pass the PID to the kill command. + +Speaking more accurately, we can find PID of a resource (say terminal) as: + + $ ps -A | grep -i terminal + + 6228 ? 00:00:00 gnome-terminal + +In the above output, the number ‘6228‘ is the PID of process (gnome-terminal), use the kill command to kill the process as shown below. + + $ kill 6228 + +The kill command sends a signal to a process, whose PID is passed along with the command. + +Alternatively, we can use pkill command, which kills a process based upon name and other attributes of a process. To kill a process say whose name is terminal, we need to execute: + + $ pkill terminal + +**Note**: The process name length in pkill is limited to 15 characters. + +pkill seems more handy as you can kill a process without have to find out its PID. But if you want to have a better control on your system nothing beats ‘kill‘ command. Using kill you will have better insight of what process you are killing. + +We have already covered a detailed guide on [kill, pkill and killall commands][1]. + +For those who are running X server there is another tool called xkill which can kill a process from its X window without passing process name or its PID. + +xkill utility forces X server to close communications to its client which results into killing of client by its X resource. xkill which is a part of X11 utilities is very handy in killing unnecessary windows. + +It support options like connect to specific X Server (-display displayname) using display number when multiple X Servers are running on a host simultaneously and kill all the client (-all, not recommended) with top-level windows on the screen as well as take frame (-frame) into account. + +To get a list of all the clients you may run: + + $ xlsclients + +#### Sample Output #### + + ' ' /usr/lib/libreoffice/program/soffice + deb gnome-shell + deb Docky + deb google-chrome-stable + deb soffice + deb gnome-settings-daemon + deb gnome-terminal-server + +If no resource identifier is passed with id, xkill turns the mouse Pointer into special Symbol, similar to ‘X‘. Just click on the window you want to kill and this will kill its communication with server or say the program gets killed. + + $ xkill + +![Xkill Command](http://www.tecmint.com/wp-content/uploads/2015/05/Xkill.png) + +Kill Process Using xkill + +It is important to notice that xkill do not guarantee that closing its communication will kill/abort it successfully. Most of the application will get killed when it’s communication to server is closed. However a few may still be running. + +Points Needed to be mentioned here: + +- This tool works only when X11 server is running, as xkill is a part of X11 utility. +- Don’t confuse with Closing and killing a resource. While killing a resource you may expect it not to exit cleanly. +- This is not a replacement of kill utility. + +**Do I need to go to Linux command line to invoke xkill?** + +No, you don’t need to fire xkill from Linux Command Line. You may set a keyboard shortcut and call xkill just by punching same key combination. + +Here is how to setup a keyboard shortcut on a typical gnome3 Desktop Environment. + +Go to Settings –> Select Keyboard, click on ‘+’ and add name and command. Click on the new entry and press the key you want to use as shortcut key combination. I did Ctrl+Alt+Shift+x. + +![Gnome Settings](http://www.tecmint.com/wp-content/uploads/2015/05/22.png) + +Gnome Settings + +![Add Shortcut Key](http://www.tecmint.com/wp-content/uploads/2015/05/31.png) + +Add Shortcut Key + +The next time you want to kill a X resource just call the key combination (Ctrl+Alt+Shift+x), and you will notice your mouse pointer changed into x. Click on x resource you want to kill and all done! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/kill-processes-unresponsive-programs-in-ubuntu/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ \ No newline at end of file From d8c51eaebb48f34ac1fe7fdf18a51df1b6a58980 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 27 May 2015 15:02:55 +0800 Subject: [PATCH 0983/2517] PUB:20150205 zBackup--A versatile deduplicating backup tool @goreliu --- ...--A versatile deduplicating backup tool.md | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) rename {translated/tech => published}/20150205 zBackup--A versatile deduplicating backup tool.md (59%) diff --git a/translated/tech/20150205 zBackup--A versatile deduplicating backup tool.md b/published/20150205 zBackup--A versatile deduplicating backup tool.md similarity index 59% rename from translated/tech/20150205 zBackup--A versatile deduplicating backup tool.md rename to published/20150205 zBackup--A versatile deduplicating backup tool.md index 988db2d324..c0d9e85128 100644 --- a/translated/tech/20150205 zBackup--A versatile deduplicating backup tool.md +++ b/published/20150205 zBackup--A versatile deduplicating backup tool.md @@ -1,6 +1,6 @@ -zBackup——一个通用的重复数据备份工具 +zBackup:一个多功能的去重备份工具 ================================================================================ -zbackup是一个基于rsync思想的全局重复数据备份工具。给它传入一个大的tar文件后,它会存储该文件的重复区域(仅进行一次),然后对结果进行压缩,并根据参数确定是否对其加密。传入另一个tar文件后,它会从之前的已备份文件中复用重复的数据。只有新的改动会被保存,并且只要文件变动不是很大,需要的存储空间非常少。任何时候之前的已备份文件都可以被完整地读出来。 +zbackup是一个基于rsync思想的全局去重数据备份工具。给它传入一个大的tar文件后,它会仅存储一次该文件的重复部分,然后对结果进行压缩,并根据参数确定是否对其加密。传入另一个tar文件后,它会从之前的已备份文件中复用重复数据。只有新的改动会被保存,并且只要文件差异不是很大,需要的存储空间非常少。无论何时,之前的已备份文件都可以被完整地读出来。 ### zBackup特性 ### @@ -8,7 +8,7 @@ zbackup是一个基于rsync思想的全局重复数据备份工具。给它传 - 使用内置的AES加密算法加密已备份数据 - 可以删除旧的已备份数据 - 使用一个64位滚动哈希,保持软碰撞数量为0 -- 已备份数据由不可更改的文件组成。任何现有文件都没有被更改过 +- 备份库由不可更改的文件组成,只有库中不存在的文件才能修改 - 使用C++语言编写,并且只有适量的依赖库 - 可以在生产环境安全使用 - 可以在不同备份库中交换数据而无需重新压缩 @@ -25,7 +25,7 @@ zbackup是一个基于rsync思想的全局重复数据备份工具。给它传 zbackup init [--non-encrypted] [--password-file ~/.my_backup_password ] /my/backup/repo -`zbackup backup`命令备份一个由`tar c`创建的tar文件到刚才使用`zbackup init`初始化的备份库。(译注:实际使用时类似这样,tar c files | zbackup ...) +`zbackup backup`命令备份一个由`tar c`命令创建的tar文件到刚才使用`zbackup init`初始化的备份库。(LCTT 译注:实际使用时类似这样,tar c files | zbackup ...) zbackup [--password-file ~/.my_backup_password ] [--threads number_of_threads ] backup /my/backup/repo/backups/backup-`date ‘+%Y-%m-%d'` @@ -37,18 +37,15 @@ zbackup是一个基于rsync思想的全局重复数据备份工具。给它传 - -non-encrypted -- 不加密备份库。 - --password-file ~/.my_backup_password -- 使用位于~/.my_backup_password的口令文件来加密备份库和待备份文件,以及解密已备份文件。 -- --threads number_of_threads -- 限制并行LZMA压缩的线程数到number_of_threads。建议在32位的系统平台使用。 +- --threads number_of_threads -- 限制并行LZMA压缩的线程数为 number_of_threads。建议在32位的系统平台使用。 - --cache-size cache_size_in_mb -- 使用cache_size_in_mb中的缓存大小来加速恢复文件的过程。 -### zBackup相关文件 ### +### 上述命令中 zBackup 相关文件 ### -~/.my_backup_password 用来加密备份库和待备份文件,以及解密已备份文件。更多细节见zbackup。 - -/my/backup/repo 存放备份库的目录。 - -/my/precious/restored-tar 用来恢复已备份文件的tar文件。 - -/my/backup/repo/backups/backup-`date ‘+%Y-%m-%d'` 指定的之前已备份文件的文件名。 +- ~/.my_backup_password 用来加密备份库和待备份文件,以及解密已备份文件。更多细节见zbackup。 +- /my/backup/repo 存放备份库的目录。 +- /my/precious/restored-tar 用来恢复已备份文件的tar文件。 +- /my/backup/repo/backups/backup-`date ‘+%Y-%m-%d'` 指定的之前已备份文件的文件名。 -------------------------------------------------------------------------------- @@ -56,7 +53,7 @@ via: http://www.ubuntugeek.com/zbackup-a-versatile-deduplicating-backup-tool.htm 作者:[ruchi][a] 译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a16010428a864e7b92cd73e133b4b691eda47f6d Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 27 May 2015 16:18:17 +0800 Subject: [PATCH 0984/2517] PUB:20150407 How to secure BGP sessions using authentication on Quagga @GOLinux --- ...sessions using authentication on Quagga.md | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) rename {translated/tech => published}/20150407 How to secure BGP sessions using authentication on Quagga.md (68%) diff --git a/translated/tech/20150407 How to secure BGP sessions using authentication on Quagga.md b/published/20150407 How to secure BGP sessions using authentication on Quagga.md similarity index 68% rename from translated/tech/20150407 How to secure BGP sessions using authentication on Quagga.md rename to published/20150407 How to secure BGP sessions using authentication on Quagga.md index be67b88ab1..9881d73c40 100644 --- a/translated/tech/20150407 How to secure BGP sessions using authentication on Quagga.md +++ b/published/20150407 How to secure BGP sessions using authentication on Quagga.md @@ -2,7 +2,7 @@ Quagga上使用验证加固BGP会话安全 ================================================================================ BGP协议运行于TCP之上,因而,它也继承了TCP连接的所有漏洞。例如,在一个BGP会话内,攻击者可以冒充一个合法的BGP邻居,然后说服另一端的BGP路由器共享路由信息给攻击者。在攻击者通告并向邻居路由注入伪造的路由时,就会发生这个问题。毫无戒备的邻居路由器就会开始向攻击者发送通信实况,实际上这些信息并没有去向任何地方,仅仅只是被丢弃了。回到2008年,YouTube实际上也[受害于][1]这样的BGP路由中毒,并遭受了长达一个小时的视频服务大量中断。一个更加糟糕的情况是,如果攻击者是个足够懂行的人,他们可以伪装成一台透明路由器,然后嗅探经过的通信以获取敏感数据。你可以想象,这会造成深远的影响。 -要保护活跃的BGP会话不受攻击,许多服务提供商在BGP会话中使用[MD5校验和并预共享密钥][2]。在受保护的BGP会话中,一台发送包的BGP路由器通过使用预共享的密钥生成MD5散列值、部分IP和TCP头以及有效负载。然后,MD5散列作为一个TCP选项字段存储。在收到包后,接受路由器用同样的方法使用预共享密钥生成它的MD5版本。它会将它的MD5散列和接收到的某个包的值进行对比,以决定是否接受该包。对于一个攻击者而言,几乎不可能猜测校验和或其密钥。对于BGP路由器而言,它们能在消耗包的内容前确保每个包的合法性。 +要保护活跃的BGP会话不受攻击,许多服务提供商在BGP会话中使用[MD5校验和及预共享密钥][2]。在受保护的BGP会话中,一台发送包的BGP路由器通过使用预共享的密钥生成MD5散列值、部分IP和TCP头以及有效载荷。然后,MD5散列作为一个TCP选项字段存储。在收到包后,接受路由器用同样的方法使用预共享密钥生成它的MD5版本。它会将它的MD5散列和接收到的某个包的值进行对比,以决定是否接受该包。对于一个攻击者而言,几乎不可能猜测到校验和或其密钥。对于BGP路由器而言,它们能在使用包的内容前确保每个包的合法性。 在本教程中,我们将为大家演示如何使用MD5校验和以及预共享密钥来加固两个邻居间的BGP会话的安全。 @@ -13,7 +13,7 @@ BGP协议运行于TCP之上,因而,它也继承了TCP连接的所有漏洞 - + @@ -28,7 +28,7 @@ BGP协议运行于TCP之上,因而,它也继承了TCP连接的所有漏洞
路由器名称ASAS 号 IP地址
-常用的Linux内核原生支持TCP的MD5选项用于IPv4和IPv6。因此,如果你从全新的[Linux盒子][3]构建了Quagga路由器,TCP的MD5功能会自动启用。剩下来的事情,仅仅是配置Quagga以使用它的功能。但是,如果你使用的是FreeBSD盒子或者为Quagga构建了一个自定义内核,请确保内核开启了TCP的MD5支持(如,Linux中的CONFIG_TCP_MD5SIG选项)。 +常用的Linux内核原生支持IPv4和IPv6的TCP MD5选项。因此,如果你从全新的[Linux机器][3]构建了一台Quagga路由器,TCP的MD5功能会自动启用。剩下来的事情,仅仅是配置Quagga以使用它的功能。但是,如果你使用的是FreeBSD机器或者为Quagga构建了一个自定义内核,请确保内核开启了TCP的MD5支持(如,Linux中的CONFIG_TCP_MD5SIG选项)。 ### 配置Router-A验证功能 ### @@ -43,7 +43,7 @@ BGP协议运行于TCP之上,因而,它也继承了TCP连接的所有漏洞 本例中使用的预共享密钥是‘xmodulo’。很明显,在生产环境中,你需要选择一个更健壮的密钥。 -**注意**: 在Quagga中,‘service password-encryption’命令是想加密配置文件中所有明文密码(如,登录密码)。然而,当我使用该命令时,我注意到BGP配置中的预共享密钥仍然是明文的。我不确定这是否是Quagga的限制,还是版本自身的问题。 +**注意**: 在Quagga中,‘service password-encryption’命令被用做加密配置文件中所有明文密码(如,登录密码)。然而,当我使用该命令时,我注意到BGP配置中的预共享密钥仍然是明文的。我不确定这是否是Quagga的限制,还是版本自身的问题。 ### 配置Router-B验证功能 ### @@ -58,15 +58,17 @@ BGP协议运行于TCP之上,因而,它也继承了TCP连接的所有漏洞 ### 验证BGP会话 ### -如果一切配置正确,那么BGP会话就会起来,两台路由器应该能交换路由表。这时候,TCP会话中的所有流出包都会携带一个MD5摘要的包内容和一个密钥,而摘要信息会被另一端自动验证。 +如果一切配置正确,那么BGP会话就应该起来了,两台路由器应该能交换路由表。这时候,TCP会话中的所有流出包都会携带一个MD5摘要的包内容和一个密钥,而摘要信息会被另一端自动验证。 -我们可以像平时一样通过查看BGP的概要来验证活跃的BGP会话。MD5校验和验证在Quagga内部是透明的,因此,你在BGP级别是无法看到的。 +我们可以像平时一样通过查看BGP的概要来验证活跃的BGP会话。MD5校验和的验证在Quagga内部是透明的,因此,你在BGP级别是无法看到的。 ![](https://farm8.staticflickr.com/7621/16837774368_e9ff66b370_c.jpg) 如果你想要测试BGP验证,你可以配置一个邻居路由,设置其密码为空,或者故意使用错误的预共享密钥,然后查看发生了什么。你也可以使用包嗅探器,像tcpdump或者Wireshark等,来分析通过BGP会话的包。例如,带有“-M ”选项的tcpdump将验证TCP选项字段的MD5摘要。 -小结之,在本教程中,我们演示了怎样简单地加固两台路由间的BGP会话安全。相对于其它协议而言,配置过程非常简明。强烈推荐你加固BGP会话安全,尤其是当你用另一个AS配置BGP会话的时候。预共享密钥也应该安全地保存。 +###小结### + +在本教程中,我们演示了怎样简单地加固两台路由间的BGP会话安全。相对于其它协议而言,配置过程非常简明。强烈推荐你加固BGP会话安全,尤其是当你用另一个AS配置BGP会话的时候。预共享密钥也应该安全地保存。 -------------------------------------------------------------------------------- @@ -74,11 +76,11 @@ via: http://xmodulo.com/bgp-authentication-quagga.html 作者:[Sarmed Rahman][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/sarmed [1]:http://research.dyn.com/2008/02/pakistan-hijacks-youtube-1/ [2]:http://tools.ietf.org/html/rfc2385 -[3]:http://xmodulo.com/centos-bgp-router-quagga.html +[3]:https://linux.cn/article-4232-1.html From e37355e82913d96431181583a08cb02867d93134 Mon Sep 17 00:00:00 2001 From: sevenot Date: Wed, 27 May 2015 21:08:23 +0800 Subject: [PATCH 0985/2517] translated --- ...5 Apps You Didn't Know You Were Missing.md | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 translated/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md diff --git a/translated/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md b/translated/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md new file mode 100644 index 0000000000..2883dd7910 --- /dev/null +++ b/translated/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md @@ -0,0 +1,114 @@ +sevenot Translating +New to Linux? 5 Apps You Didn’t Know You Were Missing +初来乍到Linux? 你需要知道的5款好应用。 +================================================================================ +![](http://cdn.makeuseof.com/wp-content/uploads/2015/05/linux-apps-840x420.jpg?92a7a3) + +When you moved to Linux, you went straight for the obvious browsers, cloud clients, music players, email clients, and perhaps image editors, right? As a result, you’ve missed several vital, productive tools. Here’s a roundup of five umissable Linux apps that you really need to install. +当你刚刚迈入linux的世界时,你会立马动身开始使用著名的浏览器,云客户端,音乐播放器,邮件客户端,也许还有图形编辑器,对吗?可是,你却错过了几个非常重要的生产工具。这里将介绍你真的需要安装的5个不可错过的应用。 +### [Synergy][1] ### + +Synergy is a godsend if you use multiple desktops. It’s an open-source app that allows you to use a single mouse and keyboard across multiple computers, displays, and operating systems. Switching the mouse and keyboard functionality between the desktops is easy. Just move the mouse out the edge of one screen and into another. +Synergy 简直就是多桌面用户的福音。这是一个开源软件,它可以让你用一个鼠标和键盘在数台电脑里面,演示、操作你的系统。在桌面之间切换鼠标和键盘非常简单,你只要把鼠标从一个桌面的边缘移向另一个桌面即可。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/multiple-monitors-640x431.jpg?92a7a3) + +When you open Synergy for the first time, it will run you through the setup wizard. The primary desktop is the one whose input devices you’ll be sharing with the other desktops. Configure that as the server. Add the remaining computers as clients. +当你第一次打开Synergy,它会带你进入一个安装引导。你的主显示屏即是你将与其它显示屏共享的输入设备。将主显示屏设为服务端,将其它显示屏设置为客户端。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/synergy-setup-wizard-640x480.jpg?92a7a3) + +Synergy maintains a common clipboard across all connected desktops. It also merges the lock screen setup, i.e. you need to bypass the lock screen just once to log in to all the computers together. Under **Edit > Settings**, you can make a few more tweaks such as adding a password and setting Synergy to launch on startup. +Synergy在互连的各个桌面间维持同一张粘贴板,并且包含了锁屏功能,即你可以设置一键将互连的屏幕同时锁屏。你可以在Edit的Setting下调整更多的设置,比如设置密码或者将Synergy设置成开启自启动。 +### [BasKet Note Pads][2] ### + +Using BasKet Note Pads is somewhat like mapping your brain onto a computer. It helps make sense of all the ideas floating around in your head by allowing you to organize them in digestible chunks. You can use BasKet Note Pads for various tasks such as taking notes, creating idea maps and to-do lists, saving links, managing research, and keeping track of project data. +从某种意义上来讲,用BasKet Note Pads,就像把你的大脑刻画进里计算机一样。它把我们不经意间的想法记录下来,然后任由我们去把他们组织起来。你可以在变化多端的任务中用到BasKet Note Pads,比如记录笔记,制作概念图,记录代办事项,保存链接,管理你的科研,或者追踪程序数据。 +Each main idea or project goes into a section called a basket. To split ideas further, you can have one or more sub-baskets or sibling baskets. The baskets are further broken down into notes, which hold all the bits and pieces of a project. You can group them, tag them, and filter them. +在BasKet Note Pads中,每个主要的想法和工程被视作一个工作篮。至顶而下分支出去,你可以有一个或多个工作子篮或者兄弟篮。工作篮进一步分支成笔记,这些零零碎碎的笔记组成了一个工程。你可以自由组织它们,给它们打标签,筛选它们。 + +The left pane in the application’s two-pane structure displays a tree-like view of all the baskets you have created. +下图即是这款应用的界面,在左边的菜单中,展示了2个你创造的树形结构的工作篮。 +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/basket-note-pads-640x480.jpg?92a7a3) + +BasKet Note Pads might seem a little complex on day one, but you’ll get the hang of it soon. When you’re not using it, the app sits in the system tray, ready for quick access. +BasKet Note Pads第一次用起来可能有点复杂,但是如果你经常用它的话,你会觉得相当顺手。当你暂时不用它时,它会退出到系统托盘,方便你下次快速打开它。 +Want a [simpler note-taking alternative][3] on Linux? Try [Springseed][4]. +想在Linux上简单体验一番,试试Springseeds。 +### [Caffeine][5]### + +How do you ensure that your computer doesn’t go to sleep right in the middle of an [interesting movie][6]? Caffeine is the answer. No, you don’t need to brew a cup of coffee for your computer. You just need to install a lightweight indicator applet called Caffeine. It prevents the screen-saver, lock screen, or the Sleep mode from being activated when the computer is idle, only if the current window is in full-screen mode. +你怎样确定你的电脑不会在放一部精彩的电影中途突然休眠呢?Caffeine会帮助你解决这个问题。当然,你并不需要为你的电脑泡一杯咖啡。你只需要安装一个轻量级的指示器——Caffeine。只要当前你是全屏模式,它就会禁用你的屏幕保护程序例如锁屏,让你的电脑不会因为没有在任务中而进入睡眠模式。 + +To install the applet, [download its latest version][7]. If you want to go [the ppa way][8], here’s how you can: +点击下载安装最新版本的Caffeine。如果你想以PPA的方式安装,使用如下命令: + + $ sudo add-apt-repository ppa:caffeine-developers/ppa + $ sudo apt-get update + $ sudo apt-get install caffeine + +On Ubuntu versions 14.10 and 15.04 (and their derivatives), you’ll also need to install certain dependency packages: +如果你的Ubuntu版本是14.10或者15.04(或者其它衍生版本),你还需要安装下面的依赖包: + $ sudo apt-get install libappindicator3-1 gir1.2-appindicator3-0.1 + +After finishing the installation, add **caffeine-indicator** to your list of startup applications to make the indicator appear in the system tray. You can turn Caffeine’s functionality on and off via the app’s context menu, which pops up when you right-click on the tray icon. +完成安装以后,将Caffeine指示器设置成开机自启动,这样可以使指示器系统托盘里显示。你可以右键点击托盘图标打开应用目录,来开启或关闭Caffeine, + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/caffeine-indicator-640x480.jpg?92a7a3) + +### Easystroke ### + +Easystroke makes an excellent [Linux mouse hack][9]. Use it to set up a series of customized mouse/touchpad/pen gestures to simulate common actions such as keystrokes, commands, and scrolls. Setting up Easystroke gestures is straightforward enough, thanks to the clear instructions that appear at all the right moments when you’re navigating the UI. +Easystroke是一个将鼠标全力开发出来的应用。通过一系列的设置,用鼠标、触摸屏、手势笔的动作来完成敲击键盘、执行命令和滑动屏幕。在Easystroke里能够设置的动作相当多,而且当你浏览界面时,你会发现应用的引导非常友善。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/easystroke-record-640x480.jpg?92a7a3) + +Begin by choosing the mouse button you’d like to use for performing gestures. Throw in a modifier if you like. You’ll find this setting under **Preferences > Behavior > Gesture Button**. Now head to the **Actions** tab and record strokes for your most commonly used actions. +从选择一个你喜欢的动作来作为你的鼠标键开始。如果你喜欢,你可以把鼠标设置得更灵敏。通过Perferences>Behavior>Gesture Button来设置。现在把你最常用的键盘动作记录在动作表里吧。 +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/easytroke-actions-640x480.jpg?92a7a3) + +Using the **Preferences** and **Advanced** tabs, you can make other tweaks like setting Easystroke to autostart, adding a system tray icon, and changing scroll speed. +在Preferences和Advanced表中,你可以做一些其它的调整,比如将EasyStroke设置成自动启动,在系统托盘中显示图标,改变滑动速度。 + +### Guake ### + +I saved my favorite Linux find for last. Guake is a dropdown command line modeled after the one in the first-person shooter video game [Quake][10]. Whether you’re [learning about terminal commands][11] or executing them on a regular basis, Guake is a great way to keep the terminal handy. You can bring it up or hide it in a single keystroke. +我把我最喜欢的应用放在最后。Guake是根据第一人称射击视屏游戏Quake建模而来的下拉命令行工具。不管你是否在学习命令行终端,或者是有一定的基础,Guake都可以将终端变得更加方便。你可以一键将它弹出,也可以一键将它隐藏。 + +As you can see in the image below, when in action, Guake appears as an overlay on the current window. Right-click within the terminal to access the **Preferences** section, from where you can change Guake’s appearance, its scroll action, keyboard shortcuts, and more. +就像下面这张图,当在一个应用里时,Guake的界面会覆盖在当前的屏幕上。你可以右键点击终端的Preference来改变Guake的界面,它支持滑动,快捷键等等。 +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/guake-terminal-640x480.jpg?92a7a3) + +If KDE is your [Linux desktop of choice][12], do check out [Yakuake][13], which provides a similar functionality. +如果你的桌面是KDE,你可以选择一个类似的工具——Yakuake. +### Name Your Favorite Linux Discovery! ### +写下你最喜欢的Linux新发现! +There are many more [super useful Linux apps][14] waiting to be discovered. Rest assured that we’ll keep introducing you to them. +还有更多超级实用的Linux应用等待被发现。放心,我们将一直关注,并把它们带到你们的生活中。 +Which Linux app were you happiest to learn about? Which one do you consider a must-have? Tell us in the comments. +哪一个应用是你最喜欢学习的呢?哪一个是你觉得必不可少的呢?在评论里告诉给我们吧。 +-------------------------------------------------------------------------------- + +via: http://www.makeuseof.com/tag/new-linux-5-apps-didnt-know-missing/ + +作者:[Akshata][a] +译者:[sevenot](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.makeuseof.com/tag/author/akshata/ +[1]:http://synergy-project.org/ +[2]:http://basket.kde.org/ +[3]:http://www.makeuseof.com/tag/try-these-3-beautiful-note-taking-apps-that-work-offline/ +[4]:http://getspringseed.com/ +[5]:https://launchpad.net/caffeine +[6]:http://www.makeuseof.com/tag/popular-apps-movies-according-google/ +[7]:http://ppa.launchpad.net/caffeine-developers/ppa/ubuntu/pool/main/c/caffeine/ +[8]:http://www.makeuseof.com/tag/ubuntu-ppa-technology-explained/ +[9]:http://www.makeuseof.com/tag/4-astounding-linux-mouse-hacks/ +[10]:http://en.wikipedia.org/wiki/Quake_%28video_game%29 +[11]:http://www.makeuseof.com/tag/4-ways-teach-terminal-commands-linux-si/ +[12]:http://www.makeuseof.com/tag/10-top-linux-desktop-environments-available/ +[13]:https://yakuake.kde.org/ +[14]:http://www.makeuseof.com/tag/linux-treasures-x-sublime-native-linux-apps-will-make-want-switch/ From e8bd149ce6649277f7c75cdbb94009b20ae40092 Mon Sep 17 00:00:00 2001 From: sevenot Date: Wed, 27 May 2015 21:10:20 +0800 Subject: [PATCH 0986/2517] translated --- ...5 Apps You Didn't Know You Were Missing.md | 104 ------------------ 1 file changed, 104 deletions(-) delete mode 100644 sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md diff --git a/sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md b/sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md deleted file mode 100644 index 851ed5c676..0000000000 --- a/sources/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md +++ /dev/null @@ -1,104 +0,0 @@ -sevenot Translating -New to Linux? 5 Apps You Didn’t Know You Were Missing -================================================================================ -![](http://cdn.makeuseof.com/wp-content/uploads/2015/05/linux-apps-840x420.jpg?92a7a3) - -When you moved to Linux, you went straight for the obvious browsers, cloud clients, music players, email clients, and perhaps image editors, right? As a result, you’ve missed several vital, productive tools. Here’s a roundup of five umissable Linux apps that you really need to install. - -### [Synergy][1] ### - -Synergy is a godsend if you use multiple desktops. It’s an open-source app that allows you to use a single mouse and keyboard across multiple computers, displays, and operating systems. Switching the mouse and keyboard functionality between the desktops is easy. Just move the mouse out the edge of one screen and into another. - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/multiple-monitors-640x431.jpg?92a7a3) - -When you open Synergy for the first time, it will run you through the setup wizard. The primary desktop is the one whose input devices you’ll be sharing with the other desktops. Configure that as the server. Add the remaining computers as clients. - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/synergy-setup-wizard-640x480.jpg?92a7a3) - -Synergy maintains a common clipboard across all connected desktops. It also merges the lock screen setup, i.e. you need to bypass the lock screen just once to log in to all the computers together. Under **Edit > Settings**, you can make a few more tweaks such as adding a password and setting Synergy to launch on startup. - -### [BasKet Note Pads][2] ### - -Using BasKet Note Pads is somewhat like mapping your brain onto a computer. It helps make sense of all the ideas floating around in your head by allowing you to organize them in digestible chunks. You can use BasKet Note Pads for various tasks such as taking notes, creating idea maps and to-do lists, saving links, managing research, and keeping track of project data. - -Each main idea or project goes into a section called a basket. To split ideas further, you can have one or more sub-baskets or sibling baskets. The baskets are further broken down into notes, which hold all the bits and pieces of a project. You can group them, tag them, and filter them. - -The left pane in the application’s two-pane structure displays a tree-like view of all the baskets you have created. - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/basket-note-pads-640x480.jpg?92a7a3) - -BasKet Note Pads might seem a little complex on day one, but you’ll get the hang of it soon. When you’re not using it, the app sits in the system tray, ready for quick access. - -Want a [simpler note-taking alternative][3] on Linux? Try [Springseed][4]. - -### [Caffeine][5]### - -How do you ensure that your computer doesn’t go to sleep right in the middle of an [interesting movie][6]? Caffeine is the answer. No, you don’t need to brew a cup of coffee for your computer. You just need to install a lightweight indicator applet called Caffeine. It prevents the screen-saver, lock screen, or the Sleep mode from being activated when the computer is idle, only if the current window is in full-screen mode. - -To install the applet, [download its latest version][7]. If you want to go [the ppa way][8], here’s how you can: - - $ sudo add-apt-repository ppa:caffeine-developers/ppa - $ sudo apt-get update - $ sudo apt-get install caffeine - -On Ubuntu versions 14.10 and 15.04 (and their derivatives), you’ll also need to install certain dependency packages: - - $ sudo apt-get install libappindicator3-1 gir1.2-appindicator3-0.1 - -After finishing the installation, add **caffeine-indicator** to your list of startup applications to make the indicator appear in the system tray. You can turn Caffeine’s functionality on and off via the app’s context menu, which pops up when you right-click on the tray icon. - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/caffeine-indicator-640x480.jpg?92a7a3) - -### Easystroke ### - -Easystroke makes an excellent [Linux mouse hack][9]. Use it to set up a series of customized mouse/touchpad/pen gestures to simulate common actions such as keystrokes, commands, and scrolls. Setting up Easystroke gestures is straightforward enough, thanks to the clear instructions that appear at all the right moments when you’re navigating the UI. - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/easystroke-record-640x480.jpg?92a7a3) - -Begin by choosing the mouse button you’d like to use for performing gestures. Throw in a modifier if you like. You’ll find this setting under **Preferences > Behavior > Gesture Button**. Now head to the **Actions** tab and record strokes for your most commonly used actions. - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/easytroke-actions-640x480.jpg?92a7a3) - -Using the **Preferences** and **Advanced** tabs, you can make other tweaks like setting Easystroke to autostart, adding a system tray icon, and changing scroll speed. - -### Guake ### - -I saved my favorite Linux find for last. Guake is a dropdown command line modeled after the one in the first-person shooter video game [Quake][10]. Whether you’re [learning about terminal commands][11] or executing them on a regular basis, Guake is a great way to keep the terminal handy. You can bring it up or hide it in a single keystroke. - -As you can see in the image below, when in action, Guake appears as an overlay on the current window. Right-click within the terminal to access the **Preferences** section, from where you can change Guake’s appearance, its scroll action, keyboard shortcuts, and more. - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/guake-terminal-640x480.jpg?92a7a3) - -If KDE is your [Linux desktop of choice][12], do check out [Yakuake][13], which provides a similar functionality. - -### Name Your Favorite Linux Discovery! ### - -There are many more [super useful Linux apps][14] waiting to be discovered. Rest assured that we’ll keep introducing you to them. - -Which Linux app were you happiest to learn about? Which one do you consider a must-have? Tell us in the comments. - --------------------------------------------------------------------------------- - -via: http://www.makeuseof.com/tag/new-linux-5-apps-didnt-know-missing/ - -作者:[Akshata][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.makeuseof.com/tag/author/akshata/ -[1]:http://synergy-project.org/ -[2]:http://basket.kde.org/ -[3]:http://www.makeuseof.com/tag/try-these-3-beautiful-note-taking-apps-that-work-offline/ -[4]:http://getspringseed.com/ -[5]:https://launchpad.net/caffeine -[6]:http://www.makeuseof.com/tag/popular-apps-movies-according-google/ -[7]:http://ppa.launchpad.net/caffeine-developers/ppa/ubuntu/pool/main/c/caffeine/ -[8]:http://www.makeuseof.com/tag/ubuntu-ppa-technology-explained/ -[9]:http://www.makeuseof.com/tag/4-astounding-linux-mouse-hacks/ -[10]:http://en.wikipedia.org/wiki/Quake_%28video_game%29 -[11]:http://www.makeuseof.com/tag/4-ways-teach-terminal-commands-linux-si/ -[12]:http://www.makeuseof.com/tag/10-top-linux-desktop-environments-available/ -[13]:https://yakuake.kde.org/ -[14]:http://www.makeuseof.com/tag/linux-treasures-x-sublime-native-linux-apps-will-make-want-switch/ From 6d5b259abb1e22bddb077a83c7ef0dc3a56a845b Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 27 May 2015 22:06:15 +0800 Subject: [PATCH 0987/2517] translating --- ...FAQs with Answers--How to mount an LVM partition on Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md b/sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md index 42cfb4b2ae..3701452fee 100644 --- a/sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md +++ b/sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md @@ -1,3 +1,5 @@ +Translating----geekpi + Linux FAQs with Answers--How to mount an LVM partition on Linux ================================================================================ > **Question**: I have an external USB drive which contains several LVM partitions on it. I want to access some of those LVM partitions on my Linux. How can I mount an LVM partition on Linux? From 783f5d48a45abcc035b1bccec8e1a1dd3f11fcad Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 27 May 2015 22:35:25 +0800 Subject: [PATCH 0988/2517] translated --- ...-How to mount an LVM partition on Linux.md | 91 ------------------- ...-How to mount an LVM partition on Linux.md | 89 ++++++++++++++++++ 2 files changed, 89 insertions(+), 91 deletions(-) delete mode 100644 sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md create mode 100644 translated/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md diff --git a/sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md b/sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md deleted file mode 100644 index 3701452fee..0000000000 --- a/sources/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md +++ /dev/null @@ -1,91 +0,0 @@ -Translating----geekpi - -Linux FAQs with Answers--How to mount an LVM partition on Linux -================================================================================ -> **Question**: I have an external USB drive which contains several LVM partitions on it. I want to access some of those LVM partitions on my Linux. How can I mount an LVM partition on Linux? - -LVM is a logical volume management tool which allows you to manage disk space using the notion of logical volumes and volume groups. The biggest benefit of using LVM over classic partitions is the flexibility in allocating storage for users and applications without being constrained by the size of individual physical disks. - -In LVM, the physical storage, on which logical volumes are created, is traditional partitions (e.g., /dev/sda2, /dev/sdb1). These partitions must be initialized as "physical volumes" and labeled so (e.g., "Linux LVM") in order for them to be used in LVM. Once the partitions are labeled as LVM volumes, you cannot mount them directly with mount command. - -If you attempt to mount an LVM partition (e.g., /dev/sdb2), you will get the following error. - - $ mount /dev/sdb2 /mnt - ----------- - - mount: unknown filesystem type 'LVM2_member' - -![](https://farm8.staticflickr.com/7696/17749902190_0a6d36821f_b.jpg) - -If you want to mount an LVM partition properly, you must instead mount "logical volumes" created inside the partition. Here is how to to it. - -First, examine a list of available volume groups by running: - - $ sudo pvs - ----------- - - PV VG Fmt Attr PSize PFree - /dev/sdb2 vg_ezsetupsystem40a8f02fadd0 lvm2 a-- 237.60g 0 - -![](https://farm8.staticflickr.com/7657/17938136831_d9320b7bfc_b.jpg) - -The names of available physical volumes and volume groups are listed under PV and VG columns, respectively. In this example, there is a single volume group named "vg_ezsetupsystem40a8f02fadd0" created on /dev/sdb2. - -Next, let's check what logical volumes exist inside this volume group. For that, use lvdisplay command: - - $ sudo lvdisplay - -Running lvdisplay shows information about available logical volumes (e.g., device name, volume name, volume size, etc) as shown below. - - $ sudo lvdisplay /dev/vg_ezsetupsystem40a8f02fadd0 - ----------- - - --- Logical volume --- - LV Path /dev/vg_ezsetupsystem40a8f02fadd0/lv_root - LV Name lv_root - VG Name vg_ezsetupsystem40a8f02fadd0 - LV UUID imygta-P2rv-2SMU-5ugQ-g99D-A0Cb-m31eet - LV Write Access read/write - LV Creation host, time livecd.centos, 2015-03-16 18:38:18 -0400 - LV Status available - # open 0 - LV Size 50.00 GiB - Current LE 12800 - Segments 1 - Allocation inherit - Read ahead sectors auto - - currently set to 256 - Block device 252:0 - -![](https://farm8.staticflickr.com/7707/17938137591_cdb4cbfb43_b.jpg) - -If you want to mount a particular logical volume, use its device name shown in "LV Path" (e.g., /dev/vg_ezsetupsystem40a8f02fadd0/lv_home) as follows. - - $ sudo mount /dev/vg_ezsetupsystem40a8f02fadd0/lv_home /mnt - -You can check the mount status by running mount command without any argument, which will show you a list of all mounted filesystems. - - $ mount - -![](https://farm6.staticflickr.com/5449/17749903670_2ee617445d_c.jpg) - -If you want to have a logical volume to be mounted automatically on boot, add the following line in /etc/fstab. You need to specify the file system type (e.g., EXT4) of the volume, which you can find out from the output of mount command above. - - /dev/vg_ezsetupsystem40a8f02fadd0/lv_home /mnt ext4 defaults 0 0 - -Now the logical volume will be automatically mounted at /mnt upon boot. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/mount-lvm-partition-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://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/translated/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md b/translated/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md new file mode 100644 index 0000000000..391769edc2 --- /dev/null +++ b/translated/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md @@ -0,0 +1,89 @@ +Linux有问必答 -- 如何在Linux中挂载LVM分区 +================================================================================ +> **提问**: 我有一个USB盘包含了LVM分区。 我想要在Linux中访问这些LVM分区。我该如何在Linux中挂载LVM分区? + +】LVM是逻辑卷管理工具,它允许你使用逻辑卷和卷组的概念来管理磁盘空间。使用LVM相比传统分区最大的好处是弹性地位用户和程序分配空间而不用考虑每个物理磁盘的大小。 + +在LVM中,那些创建了逻辑分区的物理存储是传统的分区(比如:/dev/sda2,/dev/sdb1)。这些分区必须被初始化位“物理卷”并被标签(如,“Linux LVM”)来使它们可以在LVM中使用。一旦分区被标记被LVM分区,你不能直接用mount命令挂载。 + +如果你尝试挂载一个LVM分区(比如/dev/sdb2), 你会得到下面的错误。 + + $ mount /dev/sdb2 /mnt + +---------- + + mount: unknown filesystem type 'LVM2_member' + +![](https://farm8.staticflickr.com/7696/17749902190_0a6d36821f_b.jpg) + +要正确地挂载LVM分区,你必须挂载分区创建的“逻辑分区”。下面就是如何做的。 + +=首先,用下面的命令检查可用的卷组: + + $ sudo pvs + +---------- + + PV VG Fmt Attr PSize PFree + /dev/sdb2 vg_ezsetupsystem40a8f02fadd0 lvm2 a-- 237.60g 0 + +![](https://farm8.staticflickr.com/7657/17938136831_d9320b7bfc_b.jpg) + +物理卷的名字和卷组的名字分别在PV和VG列的下面。本例中,只有一个创建在dev/sdb2下的组“vg_ezsetupsystem40a8f02fadd0”。 + +接下来检查卷组中存在的逻辑卷,使用lvdisplay命令: + + $ sudo lvdisplay + +使用lvdisplay显示了可用卷的信息(如:设备名、卷名、卷大小等等)。 + + $ sudo lvdisplay /dev/vg_ezsetupsystem40a8f02fadd0 + +---------- + + --- Logical volume --- + LV Path /dev/vg_ezsetupsystem40a8f02fadd0/lv_root + LV Name lv_root + VG Name vg_ezsetupsystem40a8f02fadd0 + LV UUID imygta-P2rv-2SMU-5ugQ-g99D-A0Cb-m31eet + LV Write Access read/write + LV Creation host, time livecd.centos, 2015-03-16 18:38:18 -0400 + LV Status available + # open 0 + LV Size 50.00 GiB + Current LE 12800 + Segments 1 + Allocation inherit + Read ahead sectors auto + - currently set to 256 + Block device 252:0 + +![](https://farm8.staticflickr.com/7707/17938137591_cdb4cbfb43_b.jpg) + +如果你想要挂载一个特定的逻辑卷,使用“LV Path”下面的设备名(如:/dev/vg_ezsetupsystem40a8f02fadd0/lv_home)。 + + $ sudo mount /dev/vg_ezsetupsystem40a8f02fadd0/lv_home /mnt + +你可以用mount命令不带任何参数检查挂载状态,这会显示所有已挂载的文件系统。 + + $ mount + +![](https://farm6.staticflickr.com/5449/17749903670_2ee617445d_c.jpg) + +如果你想在每次启动时自动挂载逻辑卷,在/etc/fstab中添加下面的行,你可以指定卷的文件系统类型(如 ext4),它可以从mount命令的输出中找。 + + /dev/vg_ezsetupsystem40a8f02fadd0/lv_home /mnt ext4 defaults 0 0 + +现在逻辑卷会在每次启动时挂载到/mnt。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/mount-lvm-partition-linux.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file From 15243e2dee06b67c771a57f21ec526711c6aab9c Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 27 May 2015 23:34:44 +0800 Subject: [PATCH 0989/2517] PUB:20150515 New to Linux 5 Apps You Didn't Know You Were Missing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @sevenot 校对并发布了: https://linux.cn/article-5526-1.html (明早可见) 总体来说,文字组织能力挺好,翻译的不错!有几点小小不足可以改进: 1、译文中不必保留英文了 2、要注意保留英文原文中的 markdown 格式,就是那些星号、括号之类的。关于 markdown,你可以在网上或本站找到很多资料,也可以使用一个 MD 编辑器。 谢谢你的贡献! --- ...5 Apps You Didn't Know You Were Missing.md | 105 ++++++++++++++++ ...5 Apps You Didn't Know You Were Missing.md | 114 ------------------ 2 files changed, 105 insertions(+), 114 deletions(-) create mode 100644 published/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md delete mode 100644 translated/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md diff --git a/published/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md b/published/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md new file mode 100644 index 0000000000..1d34cda0f4 --- /dev/null +++ b/published/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md @@ -0,0 +1,105 @@ +初来乍到Linux? 你需要知道的5款好应用 +================================================================================ +![](http://cdn.makeuseof.com/wp-content/uploads/2015/05/linux-apps-840x420.jpg?92a7a3) + +当你刚刚迈入linux的世界时,你会立马动身开始使用那些知名的浏览器、云客户端、音乐播放器、邮件客户端,也许还有图形编辑器,对吗?可是,你却错过了几个非常重要的生产工具。这里将介绍给你5个应该安装的不容错过的应用。 + +### [Synergy][1] ### + +Synergy 简直就是多桌面用户的福音。这是一个开源软件,它可以让你用一个鼠标和键盘跨越几台电脑、显示器和操作系统。在桌面之间切换鼠标和键盘非常简单,你只要把鼠标从一个桌面的边缘移向另一个桌面即可。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/multiple-monitors-640x431.jpg?92a7a3) + +当你第一次打开 Synergy,它会引导你完成设置。你的主桌面就是你将与其它桌面共享输入设备的那个。将主桌面设为服务端,将其它桌面设置为客户端。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/synergy-setup-wizard-640x480.jpg?92a7a3) + +Synergy 在互连的各个桌面间维持同一张粘贴板。它也将锁屏功能融合到了一起,例如,你可以跳过锁屏一次登录到所有桌面。你可以在 **Edit 菜单的 Setting** 下调整更多的设置,比如设置密码或者将 Synergy 设置成开机自启动。 + +(LCTT 译注:这是个[自由而开源][15]的好软件,但是如果你从它的网站下载,由于商业支持的缘故,是需要付费的;当然你可以自己[下载源代码并编译][15]。) + +### [BasKet Note Pads][2] ### + +从某种意义上来讲,用 BasKet Note Pads,就像把你的大脑刻画进计算机里一样。它把我们不经意间的想法记录下来,然后任由我们去把它们组织起来。你可以在各种任务中用到 BasKet Note Pads,比如记录笔记、制作脑图、记录代办事项、保存链接、管理你的发现、或者追踪项目数据。 + +在 BasKet Note Pads 中,每个放到一个区域的主要的想法或项目被称作一个篮子(basket)。你可以进一步拆分,成一个或多个子篮或者兄弟篮。篮子进一步分成笔记,这些零零碎碎的笔记组成了一个项目。你可以自由组织它们,给它们打标签,和筛选它们。 + +该应用的双面板结构的左侧以树形结构显示了你创建的所有篮子。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/basket-note-pads-640x480.jpg?92a7a3) + +BasKet Note Pads 第一次用起来可能有点复杂,但是如果你经常用它的话,你会觉得相当顺手。当你暂时不用它时,它会退出到系统托盘,方便你下次快速打开它。 + +如果在 Linux 上想要一个[更简单的笔记本替代品][3]?可以试试[Springseed][4]。 + +### [Caffeine(咖啡因)][5]### + +你怎样确保你的电脑不会在放一部[精彩的电影][6]中途突然休眠呢?Caffeine 会帮助你解决这个问题。当然,你并不需要为你的电脑泡一杯咖啡。你只需要安装一个轻量级的指示器 —— Caffeine。只要当前你是全屏模式,它就会禁用你的屏幕保护程序、锁屏程序,让你的电脑不会因为没有在任务中而进入睡眠模式。 + +[点击下载][7]安装最新版本的 Caffeine。如果你想以[PPA的方式][8]安装,使用如下命令: + + $ sudo add-apt-repository ppa:caffeine-developers/ppa + $ sudo apt-get update + $ sudo apt-get install caffeine + +如果你的Ubuntu版本是14.10或者15.04(或者其它衍生版本),你还需要安装下面的依赖包: + + $ sudo apt-get install libappindicator3-1 gir1.2-appindicator3-0.1 + +完成安装以后,将**Caffeine指示器**设置成开机自启动,这样可以使指示器显示在系统托盘里。你可以右键点击托盘图标打开应用的关联菜单,来开启或关闭Caffeine, + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/caffeine-indicator-640x480.jpg?92a7a3) + +### Easystroke ### + +Easystroke 是一个将[鼠标潜力][9]开发出来的应用。通过一系列的设置,用鼠标、触摸屏、手写笔的手势来完成敲击键盘、执行命令和滚动屏幕等通用操作。在 Easystroke 里能够设置的手势相当多,而且当你看到应用的界面时,你会发现应用的引导非常清晰。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/easystroke-record-640x480.jpg?92a7a3) + +选择一个你喜欢的鼠标键开始设置手势。如果你喜欢,你还可以设置辅助功能键。通过Perferences>Behavior>Gesture Button 来设置。现在到**Action**选项卡里面,把你最常用的动作记录成手势吧。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/easytroke-actions-640x480.jpg?92a7a3) + +在 Preferences 和 Advanced 选项卡中,你可以做一些其它的调整,比如将 EasyStroke 设置成自动启动,在系统托盘中显示图标,改变滚动速度。 + +### Guake ### + +我把我最喜欢的应用放在最后。Guake 是根据第一人称射击视屏游戏 [Quake][10] 模仿而来的下拉式命令行终端。不管你是否在[学习命令行终端][11],或者是有一定的基础,Guake 都可以将终端变得更加方便。你可以一键将它呼出,也可以一键将它隐藏。 + +就像下面这张图,当打开时,Guake 的界面会覆盖在当前的屏幕上。你可以在终端中右键点击,调出 Preference 来改变 Guake 的界面,滚动方式,快捷键等等。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/guake-terminal-640x480.jpg?92a7a3) + +如果[你的桌面][12]是 KDE,你可以选择一个类似的工具——[Yakuake][13]. + +### 写下你最喜欢的Linux新发现!### + +还有更多[超级实用的 Linux 应用][14]等待被发现。放心,我们将一直关注,并把它们带到你们的生活中。 + +哪一个应用是你最喜欢研究的呢?哪一个是你觉得必不可少的呢?在评论里告诉给我们吧。 + +-------------------------------------------------------------------------------- + +via: http://www.makeuseof.com/tag/new-linux-5-apps-didnt-know-missing/ + +作者:[Akshata][a] +译者:[sevenot](https://github.com/sevenot) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.makeuseof.com/tag/author/akshata/ +[1]:http://synergy-project.org/ +[2]:http://basket.kde.org/ +[3]:http://www.makeuseof.com/tag/try-these-3-beautiful-note-taking-apps-that-work-offline/ +[4]:http://getspringseed.com/ +[5]:https://launchpad.net/caffeine +[6]:http://www.makeuseof.com/tag/popular-apps-movies-according-google/ +[7]:http://ppa.launchpad.net/caffeine-developers/ppa/ubuntu/pool/main/c/caffeine/ +[8]:http://www.makeuseof.com/tag/ubuntu-ppa-technology-explained/ +[9]:http://www.makeuseof.com/tag/4-astounding-linux-mouse-hacks/ +[10]:http://en.wikipedia.org/wiki/Quake_%28video_game%29 +[11]:http://www.makeuseof.com/tag/4-ways-teach-terminal-commands-linux-si/ +[12]:http://www.makeuseof.com/tag/10-top-linux-desktop-environments-available/ +[13]:https://yakuake.kde.org/ +[14]:http://www.makeuseof.com/tag/linux-treasures-x-sublime-native-linux-apps-will-make-want-switch/ diff --git a/translated/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md b/translated/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md deleted file mode 100644 index 2883dd7910..0000000000 --- a/translated/share/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md +++ /dev/null @@ -1,114 +0,0 @@ -sevenot Translating -New to Linux? 5 Apps You Didn’t Know You Were Missing -初来乍到Linux? 你需要知道的5款好应用。 -================================================================================ -![](http://cdn.makeuseof.com/wp-content/uploads/2015/05/linux-apps-840x420.jpg?92a7a3) - -When you moved to Linux, you went straight for the obvious browsers, cloud clients, music players, email clients, and perhaps image editors, right? As a result, you’ve missed several vital, productive tools. Here’s a roundup of five umissable Linux apps that you really need to install. -当你刚刚迈入linux的世界时,你会立马动身开始使用著名的浏览器,云客户端,音乐播放器,邮件客户端,也许还有图形编辑器,对吗?可是,你却错过了几个非常重要的生产工具。这里将介绍你真的需要安装的5个不可错过的应用。 -### [Synergy][1] ### - -Synergy is a godsend if you use multiple desktops. It’s an open-source app that allows you to use a single mouse and keyboard across multiple computers, displays, and operating systems. Switching the mouse and keyboard functionality between the desktops is easy. Just move the mouse out the edge of one screen and into another. -Synergy 简直就是多桌面用户的福音。这是一个开源软件,它可以让你用一个鼠标和键盘在数台电脑里面,演示、操作你的系统。在桌面之间切换鼠标和键盘非常简单,你只要把鼠标从一个桌面的边缘移向另一个桌面即可。 - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/multiple-monitors-640x431.jpg?92a7a3) - -When you open Synergy for the first time, it will run you through the setup wizard. The primary desktop is the one whose input devices you’ll be sharing with the other desktops. Configure that as the server. Add the remaining computers as clients. -当你第一次打开Synergy,它会带你进入一个安装引导。你的主显示屏即是你将与其它显示屏共享的输入设备。将主显示屏设为服务端,将其它显示屏设置为客户端。 - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/synergy-setup-wizard-640x480.jpg?92a7a3) - -Synergy maintains a common clipboard across all connected desktops. It also merges the lock screen setup, i.e. you need to bypass the lock screen just once to log in to all the computers together. Under **Edit > Settings**, you can make a few more tweaks such as adding a password and setting Synergy to launch on startup. -Synergy在互连的各个桌面间维持同一张粘贴板,并且包含了锁屏功能,即你可以设置一键将互连的屏幕同时锁屏。你可以在Edit的Setting下调整更多的设置,比如设置密码或者将Synergy设置成开启自启动。 -### [BasKet Note Pads][2] ### - -Using BasKet Note Pads is somewhat like mapping your brain onto a computer. It helps make sense of all the ideas floating around in your head by allowing you to organize them in digestible chunks. You can use BasKet Note Pads for various tasks such as taking notes, creating idea maps and to-do lists, saving links, managing research, and keeping track of project data. -从某种意义上来讲,用BasKet Note Pads,就像把你的大脑刻画进里计算机一样。它把我们不经意间的想法记录下来,然后任由我们去把他们组织起来。你可以在变化多端的任务中用到BasKet Note Pads,比如记录笔记,制作概念图,记录代办事项,保存链接,管理你的科研,或者追踪程序数据。 -Each main idea or project goes into a section called a basket. To split ideas further, you can have one or more sub-baskets or sibling baskets. The baskets are further broken down into notes, which hold all the bits and pieces of a project. You can group them, tag them, and filter them. -在BasKet Note Pads中,每个主要的想法和工程被视作一个工作篮。至顶而下分支出去,你可以有一个或多个工作子篮或者兄弟篮。工作篮进一步分支成笔记,这些零零碎碎的笔记组成了一个工程。你可以自由组织它们,给它们打标签,筛选它们。 - -The left pane in the application’s two-pane structure displays a tree-like view of all the baskets you have created. -下图即是这款应用的界面,在左边的菜单中,展示了2个你创造的树形结构的工作篮。 -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/basket-note-pads-640x480.jpg?92a7a3) - -BasKet Note Pads might seem a little complex on day one, but you’ll get the hang of it soon. When you’re not using it, the app sits in the system tray, ready for quick access. -BasKet Note Pads第一次用起来可能有点复杂,但是如果你经常用它的话,你会觉得相当顺手。当你暂时不用它时,它会退出到系统托盘,方便你下次快速打开它。 -Want a [simpler note-taking alternative][3] on Linux? Try [Springseed][4]. -想在Linux上简单体验一番,试试Springseeds。 -### [Caffeine][5]### - -How do you ensure that your computer doesn’t go to sleep right in the middle of an [interesting movie][6]? Caffeine is the answer. No, you don’t need to brew a cup of coffee for your computer. You just need to install a lightweight indicator applet called Caffeine. It prevents the screen-saver, lock screen, or the Sleep mode from being activated when the computer is idle, only if the current window is in full-screen mode. -你怎样确定你的电脑不会在放一部精彩的电影中途突然休眠呢?Caffeine会帮助你解决这个问题。当然,你并不需要为你的电脑泡一杯咖啡。你只需要安装一个轻量级的指示器——Caffeine。只要当前你是全屏模式,它就会禁用你的屏幕保护程序例如锁屏,让你的电脑不会因为没有在任务中而进入睡眠模式。 - -To install the applet, [download its latest version][7]. If you want to go [the ppa way][8], here’s how you can: -点击下载安装最新版本的Caffeine。如果你想以PPA的方式安装,使用如下命令: - - $ sudo add-apt-repository ppa:caffeine-developers/ppa - $ sudo apt-get update - $ sudo apt-get install caffeine - -On Ubuntu versions 14.10 and 15.04 (and their derivatives), you’ll also need to install certain dependency packages: -如果你的Ubuntu版本是14.10或者15.04(或者其它衍生版本),你还需要安装下面的依赖包: - $ sudo apt-get install libappindicator3-1 gir1.2-appindicator3-0.1 - -After finishing the installation, add **caffeine-indicator** to your list of startup applications to make the indicator appear in the system tray. You can turn Caffeine’s functionality on and off via the app’s context menu, which pops up when you right-click on the tray icon. -完成安装以后,将Caffeine指示器设置成开机自启动,这样可以使指示器系统托盘里显示。你可以右键点击托盘图标打开应用目录,来开启或关闭Caffeine, - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/caffeine-indicator-640x480.jpg?92a7a3) - -### Easystroke ### - -Easystroke makes an excellent [Linux mouse hack][9]. Use it to set up a series of customized mouse/touchpad/pen gestures to simulate common actions such as keystrokes, commands, and scrolls. Setting up Easystroke gestures is straightforward enough, thanks to the clear instructions that appear at all the right moments when you’re navigating the UI. -Easystroke是一个将鼠标全力开发出来的应用。通过一系列的设置,用鼠标、触摸屏、手势笔的动作来完成敲击键盘、执行命令和滑动屏幕。在Easystroke里能够设置的动作相当多,而且当你浏览界面时,你会发现应用的引导非常友善。 - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/easystroke-record-640x480.jpg?92a7a3) - -Begin by choosing the mouse button you’d like to use for performing gestures. Throw in a modifier if you like. You’ll find this setting under **Preferences > Behavior > Gesture Button**. Now head to the **Actions** tab and record strokes for your most commonly used actions. -从选择一个你喜欢的动作来作为你的鼠标键开始。如果你喜欢,你可以把鼠标设置得更灵敏。通过Perferences>Behavior>Gesture Button来设置。现在把你最常用的键盘动作记录在动作表里吧。 -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/easytroke-actions-640x480.jpg?92a7a3) - -Using the **Preferences** and **Advanced** tabs, you can make other tweaks like setting Easystroke to autostart, adding a system tray icon, and changing scroll speed. -在Preferences和Advanced表中,你可以做一些其它的调整,比如将EasyStroke设置成自动启动,在系统托盘中显示图标,改变滑动速度。 - -### Guake ### - -I saved my favorite Linux find for last. Guake is a dropdown command line modeled after the one in the first-person shooter video game [Quake][10]. Whether you’re [learning about terminal commands][11] or executing them on a regular basis, Guake is a great way to keep the terminal handy. You can bring it up or hide it in a single keystroke. -我把我最喜欢的应用放在最后。Guake是根据第一人称射击视屏游戏Quake建模而来的下拉命令行工具。不管你是否在学习命令行终端,或者是有一定的基础,Guake都可以将终端变得更加方便。你可以一键将它弹出,也可以一键将它隐藏。 - -As you can see in the image below, when in action, Guake appears as an overlay on the current window. Right-click within the terminal to access the **Preferences** section, from where you can change Guake’s appearance, its scroll action, keyboard shortcuts, and more. -就像下面这张图,当在一个应用里时,Guake的界面会覆盖在当前的屏幕上。你可以右键点击终端的Preference来改变Guake的界面,它支持滑动,快捷键等等。 -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/guake-terminal-640x480.jpg?92a7a3) - -If KDE is your [Linux desktop of choice][12], do check out [Yakuake][13], which provides a similar functionality. -如果你的桌面是KDE,你可以选择一个类似的工具——Yakuake. -### Name Your Favorite Linux Discovery! ### -写下你最喜欢的Linux新发现! -There are many more [super useful Linux apps][14] waiting to be discovered. Rest assured that we’ll keep introducing you to them. -还有更多超级实用的Linux应用等待被发现。放心,我们将一直关注,并把它们带到你们的生活中。 -Which Linux app were you happiest to learn about? Which one do you consider a must-have? Tell us in the comments. -哪一个应用是你最喜欢学习的呢?哪一个是你觉得必不可少的呢?在评论里告诉给我们吧。 --------------------------------------------------------------------------------- - -via: http://www.makeuseof.com/tag/new-linux-5-apps-didnt-know-missing/ - -作者:[Akshata][a] -译者:[sevenot](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.makeuseof.com/tag/author/akshata/ -[1]:http://synergy-project.org/ -[2]:http://basket.kde.org/ -[3]:http://www.makeuseof.com/tag/try-these-3-beautiful-note-taking-apps-that-work-offline/ -[4]:http://getspringseed.com/ -[5]:https://launchpad.net/caffeine -[6]:http://www.makeuseof.com/tag/popular-apps-movies-according-google/ -[7]:http://ppa.launchpad.net/caffeine-developers/ppa/ubuntu/pool/main/c/caffeine/ -[8]:http://www.makeuseof.com/tag/ubuntu-ppa-technology-explained/ -[9]:http://www.makeuseof.com/tag/4-astounding-linux-mouse-hacks/ -[10]:http://en.wikipedia.org/wiki/Quake_%28video_game%29 -[11]:http://www.makeuseof.com/tag/4-ways-teach-terminal-commands-linux-si/ -[12]:http://www.makeuseof.com/tag/10-top-linux-desktop-environments-available/ -[13]:https://yakuake.kde.org/ -[14]:http://www.makeuseof.com/tag/linux-treasures-x-sublime-native-linux-apps-will-make-want-switch/ From 5fb852737c5ac102b1f8fd18be08dc7c9b859bbc Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 28 May 2015 00:06:01 +0800 Subject: [PATCH 0990/2517] PUB:20150417 sshuttle--A transparent proxy-based VPN using ssh @geekpi --- ...le--A transparent proxy-based VPN using ssh.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150417 sshuttle--A transparent proxy-based VPN using ssh.md (76%) diff --git a/translated/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/published/20150417 sshuttle--A transparent proxy-based VPN using ssh.md similarity index 76% rename from translated/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md rename to published/20150417 sshuttle--A transparent proxy-based VPN using ssh.md index 297f411840..953fd343b8 100644 --- a/translated/tech/20150417 sshuttle--A transparent proxy-based VPN using ssh.md +++ b/published/20150417 sshuttle--A transparent proxy-based VPN using ssh.md @@ -1,9 +1,8 @@ -sshuttle - 一个使用ssh的基于VPN的透明代理 +sshuttle:一个使用ssh的基于VPN的透明代理 ================================================================================ -sshuttle允许你通过ssh创建一条从你电脑连接到任何远程服务器的VPN连接,只要你的服务器支持python2.3 或则更高的版本, 你必须有本机的root权限,但是你可以在服务端有普通账户即可。 - -你可以在一台机器上同时运行多次sshuttle来连接到不同的服务器上,这样你就可以一次使用多个VPN, sshuttle可以转发你子网所有流量到VPN中。 +sshuttle 允许你通过 ssh 创建一条从你电脑连接到任何远程服务器的 VPN 连接,只要你的服务器支持 python2.3 或则更高的版本。你必须有本机的 root 权限,但是你可以在服务端有普通账户即可。 +你可以在一台机器上同时运行多次 sshuttle 来连接到不同的服务器上,这样你就可以同时使用多个 VPN, sshuttle可以转发你子网中所有流量到VPN中。 ### 在Ubuntu中安装sshuttle ### @@ -17,7 +16,7 @@ sshuttle允许你通过ssh创建一条从你电脑连接到任何远程服务器 sshuttle [options...] [-r [username@]sshserver[:port]] [subnets] -#### Option 细节 #### +#### 选项细节 #### -r, —remote=[username@]sshserver[:port] @@ -29,9 +28,9 @@ sshuttle允许你通过ssh创建一条从你电脑连接到任何远程服务器 sudo sshuttle -r username@sshserver 0.0.0.0/0 -vv -当开始后,sshuttle会创建一个ssh会话到通过-r指定的服务器。如果-r被忽略了,它会在本地运行客户端和服务端,这个有时会在测试时有用。 +当开始后,sshuttle会创建一个ssh会话到由-r指定的服务器。如果-r被丢了,它会在本地运行客户端和服务端,这个有时会在测试时有用。 -连接到远程服务器后,sshuttle会上传它的(python)源码到远程服务器并执行。那么,你就不需要在远程服务器上安装sshuttle,并且客户端和服务器端间不会存在sshuttle版本冲突。 +连接到远程服务器后,sshuttle会上传它的(python)源码到远程服务器并执行。所以,你就不需要在远程服务器上安装sshuttle,并且客户端和服务器端间不会存在sshuttle版本冲突。 #### 手册中的更多例子 #### @@ -86,7 +85,7 @@ via: http://www.ubuntugeek.com/sshuttle-a-transparent-proxy-based-vpn-using-ssh. 作者:[ruchi][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From fc017032f7225b5d57aba96844abea776c6d60f3 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 28 May 2015 10:14:17 +0800 Subject: [PATCH 0991/2517] PUB:20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know @GOLinux --- ...and Tricks Every Linux User Should Know.md | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) rename {translated/tech => published}/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md (66%) diff --git a/translated/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md b/published/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md similarity index 66% rename from translated/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md rename to published/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md index 7793b856c2..b41338034f 100644 --- a/translated/tech/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md +++ b/published/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md @@ -1,15 +1,15 @@ -Linux用户应知应会的7个‘ls’命令异用技巧 +Linux用户应知应会的7个‘ls’命令的独特技巧 ================================================================================ + 在前面我们系列报道的两篇文章中,我们已经涵盖了关于‘ls’命令的绝大多数内容。本文时‘ls命令’系列的最后一部分。如果你还没有读过该系列的其它两篇文章,你可以访问下面的链接。 -注:以下三篇都做过源文,看看翻译了没有,如果发布了可适当改链接地址 - -- [Linux中的15个‘ls’命令基本用法实例][1] -- [关于Linux “ls”命令的15个面试问题 – 第一部分][2] -- [10个有用的‘ls’命令面试问题 – 第二部分][3] +- [Linux中的15个基本‘ls’命令示例][1] +- [15 个‘ls’命令的面试问题(一)][2] +- [10 个‘ls’命令面试的问题(二)][3] ![7 Quirky ls Command Tricks](http://www.tecmint.com/wp-content/uploads/2015/03/ls-command-tricks.jpg) -7个ls命令异用技巧 + +*7个ls命令独特技巧* ### 1. 以各种时间格式附带时间戳列出目录中的内容 ### @@ -17,11 +17,11 @@ Linux用户应知应会的7个‘ls’命令异用技巧 # ls -l –time-style=[STYLE] (方法 A) -**注意** - 上面的开关(`--time`格式必须和`-l`开关同时使用,否则达不到目的)。 +**注意** - 上面的开关`--time`的格式必须和`-l`开关同时使用,否则达不到目的。 - # ls –full-time (方法 B) + # ls -full-time (方法 B) -用以下任何一个选项替换`[STYLE]`。 +可以用以下任何一个选项替换`[STYLE]`。 full-iso long-iso @@ -29,64 +29,59 @@ Linux用户应知应会的7个‘ls’命令异用技巧 locale +%H:%M:%S:%D -**注意** - 在上面行中,H(时),M(分),S(秒),D(日期)的顺序可以任意调整。 - -此外,你只需选择那些相关的选项,而不是所有选项。例如,`ls -l --time-style=+%H`将只显示小时。 - -`ls -l --time-style=+%H:%M:%D`将显示小时、分钟和日期。 +**注意** - 在上面行中,H(时),M(分),S(秒),D(日)的顺序可以任意调整。此外,你只需选择那些相关的选项,而不是所有选项。例如,`ls -l --time-style=+%H`将只显示小时。`ls -l --time-style=+%H:%M:%D`将显示小时、分钟和日。 # ls -l --time-style=full-iso ![ls Command Full Time Style](http://www.tecmint.com/wp-content/uploads/2015/03/ls-Command-Full-Time-Style.gif) -ls命令完整时间格式 + +*ls命令的完整 ISO时间格式* # ls -l --time-style=long-iso ![Long Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Long-Time-Listing-Format.gif) -长时间格式列表 + +*长时间格式列表* # ls -l --time-style=iso ![Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Local-Time-Style-Listing.gif) -时间格式列表 + +*时间格式列表* # ls -l --time-style=locale ![Locale Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Hour-Mintue-Time-Style-Listing.gif) -本地时间格式列表 + +*本地时间格式列表* # ls -l --time-style=+%H:%M:%S:%D ![Date and Time Style Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Full-Time-Style-Listing.gif) -日期和时间格式列表 + +*日期和时间格式列表* # ls --full-time ![Full Style Time Listing](http://www.tecmint.com/wp-content/uploads/2015/03/Full-Style-Time-Listing.gif) -完整格式时间列表 + +*完整格式时间列表* ### 2. 以多种格式列出目录内容,如以逗号分隔、水平格式、长格式、垂直格式、交叉格式等列出。 ### -目录内容可以用以下建议的ls命令各种格式列出。 +目录内容可以用以下建议的ls命令各种格式列出: -- 交叉 -- 逗号 -- 水平 -- 长格式 -- 单栏 -- 详情 -- 垂直 - - # ls –-format=across - # ls --format=comma - # ls --format=horizontal - # ls --format=long - # ls --format=single-column - # ls --format=verbose - # ls --format=vertical + # ls --format=across # 交叉 + # ls --format=comma # 逗号 + # ls --format=horizontal # 水平 + # ls --format=long # 长格式 + # ls --format=single-column # 单栏 + # ls --format=verbose # 详情 + # ls --format=vertical # 垂直 ![Listing Formats of ls Command](http://www.tecmint.com/wp-content/uploads/2015/03/ls-command-Listing-Formats.gif) -ls命令的列出格式 + +*ls命令的列出格式* ### 3. 使用ls命令为目录内容输出结果添加像(/=@|)这样的指示符。 ### @@ -95,7 +90,8 @@ ls命令的列出格式 # ls -p ![Append Indicators to Content](http://www.tecmint.com/wp-content/uploads/2015/03/Append-Indicators.gif) -添加指示符到内容 + +*添加指示符到内容* ### 4. 根据扩展名、大小、时间和版本对目录内容排序。 ### @@ -110,16 +106,18 @@ ls命令的列出格式 # ls --sort=none ![Sort Listing of Content by Options](http://www.tecmint.com/wp-content/uploads/2015/03/Sort-Content-by-Extensions.gif) -通过选项对内容排序列出 -### 5. 使用ls命令打印目录中各个内容的数字UID和GID。 ### +*通过选项对内容排序列出* + +### 5. 使用ls命令打印目录中各个项的数字UID和GID。 ### 上面的环境可以通过使用带有-n标识的ls命令来实现。 # ls -n ![Print Listing of Content by UID and GID](http://www.tecmint.com/wp-content/uploads/2015/03/Print-UID-GID-of-Contents.gif) -通过UID和GID对打印内容列表 + +*通过UID和GID对打印内容列表* ### 6. 标准输出结果中打印目录内容中比默认指定的更多栏目。 ### @@ -132,20 +130,22 @@ ls命令的列出格式 # ls --width 150 ![List Content Based on Window Sizes](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-By-More-Column.gif) -根据窗口大小列出内容 + +*根据窗口大小列出内容* **注意**: 你可以试验你可以给width标识传递什么值。 -### 7. 通过ls命令为列出的目录内容手动指定的tab大小而不是默认的8。 ### +### 7. 通过ls命令为列出的目录内容手动指定的制表符大小而不是默认的8。 ### # ls --tabsize=[value] ![List Content by Table Size](http://www.tecmint.com/wp-content/uploads/2015/03/List-Content-by-Table-Size.gif) -按表尺寸列出内容 -**注意**: 指定`[Value]=`的数值。 +*按表尺寸列出内容* -到目前为止,都讲完了。保持连线到Tecmint,我们会推出下一篇文章。别忘了在下面的评论中为我们提供有价值的反馈。为我们点赞并分享,帮我们推广。 +**注意**: 指定`[Value]`的数值。 + +到目前为止,都讲完了。保持连线,我们会推出下一篇文章。别忘了在下面的评论中为我们提供有价值的反馈。为我们点赞并分享,帮我们推广。 -------------------------------------------------------------------------------- @@ -153,11 +153,11 @@ via: http://www.tecmint.com/linux-ls-command-tricks/ 作者:[Avishek Kumar][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ -[2]:http://www.tecmint.com/ls-command-interview-questions/ -[3]:http://www.tecmint.com/ls-interview-questions/ +[1]:https://linux.cn/article-5109-1.html +[2]:https://linux.cn/article-5349-1.html +[3]:https://linux.cn/article-5350-1.html From 70bb082113ed0291b8417168dc0004cf5863a388 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Thu, 28 May 2015 10:58:08 +0800 Subject: [PATCH 0992/2517] translated --- ...n Source History--Why Did Linux Succeed.md | 74 ------------------- ...n Source History--Why Did Linux Succeed.md | 73 ++++++++++++++++++ 2 files changed, 73 insertions(+), 74 deletions(-) delete mode 100644 sources/talk/20150511 Open Source History--Why Did Linux Succeed.md create mode 100644 translated/talk/20150511 Open Source History--Why Did Linux Succeed.md diff --git a/sources/talk/20150511 Open Source History--Why Did Linux Succeed.md b/sources/talk/20150511 Open Source History--Why Did Linux Succeed.md deleted file mode 100644 index e50eb38cb7..0000000000 --- a/sources/talk/20150511 Open Source History--Why Did Linux Succeed.md +++ /dev/null @@ -1,74 +0,0 @@ -[translating by KayGuoWhu] -Open Source History: Why Did Linux Succeed? -================================================================================ -> Why did Linux, the Unix-like operating system kernel started by Linus Torvalds in 1991 that became central to the open source world, succeed where so many similar projects, including GNU HURD and the BSDs, fail? - -![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/05/linux.jpg) - -One of the most puzzling questions about the history of free and open source is this: Why did Linux succeed so spectacularly, whereas similar attempts to build a free or open source, Unix-like operating system kernel met with considerably less success? I don't know the answer to that question. But I have rounded up some theories, which I'd like to lay out here. - -First, though, let me make clear what I mean when I write that Linux was a great success. I am defining it in opposition primarily to the variety of other Unix-like operating system kernels, some of them open and some not, that proliferated around the time Linux was born. [GNU][1] HURD, the free-as-in-freedom kernel whose development began in [May 1991][2], is one of them. Others include Unices that most people today have never heard of, such as various derivatives of the Unix variant developed at the University of California at Berkeley, BSD; Xenix, Microsoft's take on Unix; academic Unix clones including Minix; and the original Unix developed under the auspices of AT&T, which was vitally important in academic and commercial computing circles during earlier decades, but virtually disappeared from the scene by the 1990s. - -#### Related #### - -- [Open Source History: Tracing the Origins of Hacker Culture and the Hacker Ethic][3] -- [Unix and Personal Computers: Reinterpreting the Origins of Linux][4] - -I'd also like to make clear that I'm writing here about kernels, not complete operating systems. To a great extent, the Linux kernel owes its success to the GNU project as a whole, which produced the crucial tools, including compilers, a debugger and a BASH shell implementation, that are necessary to build a Unix-like operating system. But GNU developers never created a viable version of the the HURD kernel (although they are [still trying][5]). Instead, Linux ended up as the kernel that glued the rest of the GNU pieces together, even though that had never been in the GNU plans. - -So it's worth asking why Linux, a kernel launched by Linus Torvalds, an obscure programmer in Finland, in 1991—the same year as HURD—endured and thrived within a niche where so many other Unix-like kernels, many of which enjoyed strong commercial backing and association with the leading Unix hackers of the day, failed to take off. To that end, here are a few theories pertaining to that question that I've come across as I've researched the history of the free and open source software worlds, along with the respective strengths and weaknesses of these various explanations. - -### Linux Adopted a Decentralized Development Approach ### - -This is the argument that comes out of Eric S. Raymond's essay, "[The Cathedral and the Bazaar][6]," and related works, which make the case that software develops best when a large number of contributors collaborate continuously within a relatively decentralized organizational structure. That was generally true of Linux, in contrast to, for instance, GNU HURD, which took a more centrally directed approach to code development—and, as a result, "had been evidently failing" to build a complete operating system for a decade, in Raymond's view. - -To an extent, this explanation makes sense, but it has some significant flaws. For one, Torvalds arguably assumed a more authoritative role in directing Linux code development—deciding which contributions to include and reject—than Raymond and others have wanted to recognize. For another, this reasoning does not explain why GNU succeeded in producing so much software besides a working kernel. If only decentralized development works well in the free/open source software world, then all of GNU's programming efforts should have been a bust—which they most certainly were not. - -### Linux is Pragmatic; GNU is Ideological ### - -Personally, I find this explanation—which supposes that Linux grew so rapidly because its founder was a pragmatist who initially wrote the kernel just to be able to run a tailored Unix OS on his computer at home, not as part of a crusade to change the world through free software, as the GNU project aimed to do—the most compelling. - -Still, it has some weaknesses that make it less than completely satisfying. In particular, while Torvalds himself adopted pragmatic principles, not all members of the community that coalesced around his project, then or today, have done the same. Yet, Linux has succeeded all the same. - -Moreover, if pragmatism was the key to Linux's endurance, then why, again, was GNU successful in building so many other tools besides a kernel? If having strong political beliefs about software prevents you from pursuing successful projects, GNU should have been an outright failure, not an endeavor that produced a number of software packages that remain foundational to the IT world today. - -Last but not least, many of the other Unix variants of the late 1980s and early 1990s, especially several BSD off-shoots, were the products of pragmatism. Their developers aimed to build Unix variants that could be more freely shared than those restricted by expensive commercial licenses, but they were not deeply ideological about programming or sharing code. Neither was Torvalds, and it is therefore difficult to explain Linux's success, and the failure of other Unix projects, in terms of ideological zeal. - -### Operating System Design ### - -There are technical differences between Linux and some other Unix variants that are important to keep in mind when considering the success of Linux. Richard Stallman, the founder of the GNU project, pointed to these in explaining, in an email to me, why HURD development had lagged: "It is true that the GNU Hurd is not a practical success. Part of the reason is that its basic design made it somewhat of a research project. (I chose that design thinking it was a shortcut to get a working kernel in a hurry.)" - -Linux is also different from other Unix variants in the sense that Torvalds wrote all of the Linux code himself. Having a Unix of his own, free of other people's code, was one of his stated intentions when he [first announced Linux][7] in August 1991. This characteristic sets Linux apart from most of the other Unix variants that existed at that time, which derived their code bases from either AT&T Unix or Berkeley's BSD. - -I'm not a computer scientist, so I'm not qualified to decide whether the Linux code was simply superior to that of the other Unices, explaining why Linux succeeded. But that's an argument someone might make—although it does not account for the disparity in culture and personnel between Linux and other Unix kernels, which, to me, seem more important than code in understanding Linux's success. - -### The "Community" Put Its Support Behind Linux ### - -Stallman also wrote that "mainly the reason" for Linux's success was that "Torvalds made Linux free software, and since then more of the community's effort has gone into Linux than into the Hurd." That's not exactly a complete explanation for Linux's trajectory, since it does not account for why the community of free software developers followed Torvalds instead of HURD or another Unix. But it nonetheless highlights this shift as a large part of how Linux prevailed. - -A fuller account of the free software community's decision to endorse Linux would have to explain why developers did so even though, at first, Linux was a very obscure project—much more so, by any measure, than some of the other attempts at the time to create a freer Unix, such as NET BSD and 386/BSD—as well as one whose affinity with the goals of the free software movement was not at first clear. Originally, Torvalds released Linux under a license that simply prevented its commercial use. It was considerably later that he switched to the GNU General Public License, which protects the openness of source code. - -So, those are the explanations I've found for Linux's success as an open source operating system kernel—a success which, to be sure, has been measured in some respects (desktop Linux never became what its proponents hoped, for instance). But Linux has also become foundational to the computing world in ways that no other Unix-like OS has. Maybe Apple OS X and iOS, which derive from BSD, come close, but they don't play such a central role as Linux in powering the Internet, among other things. - -Have other ideas on why Linux became what it did, or why its counterparts in the Unix world have now almost all sunk into obscurity? (I know: BSD variants still have a following today, and some commercial Unices remain important enough for [Red Hat][8] (RHT) to be [courting their users][9]. But none of these Unix holdouts have conquered everything from Web servers to smartphones in the way Linux has.) I'd be delighted to hear them. - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/open-source-application-software-companies/050415/open-source-history-why-did-linux-succeed - -作者:[hristopher Tozzi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://thevarguy.com/author/christopher-tozzi -[1]:http://gnu.org/ -[2]:http://www.gnu.org/software/hurd/history/hurd-announce -[3]:http://thevarguy.com/open-source-application-software-companies/042915/open-source-history-tracing-origins-hacker-culture-and-ha -[4]:http://thevarguy.com/open-source-application-software-companies/042715/unix-and-personal-computers-reinterpreting-origins-linux -[5]:http://thevarguy.com/open-source-application-software-companies/042015/30-years-hurd-lives-gnu-updates-open-source- -[6]:http://www.catb.org/esr/writings/cathedral-bazaar/cathedral-bazaar/ -[7]:https://groups.google.com/forum/#!topic/comp.os.minix/dlNtH7RRrGA[1-25] -[8]:http://www.redhat.com/ -[9]:http://thevarguy.com/open-source-application-software-companies/032614/red-hat-grants-certification-award-unix-linux-migration-a \ No newline at end of file diff --git a/translated/talk/20150511 Open Source History--Why Did Linux Succeed.md b/translated/talk/20150511 Open Source History--Why Did Linux Succeed.md new file mode 100644 index 0000000000..85b2473719 --- /dev/null +++ b/translated/talk/20150511 Open Source History--Why Did Linux Succeed.md @@ -0,0 +1,73 @@ +开源旧事:Linux为什么能成功? +================================================================================ +> Linux,这个始于1991年由Lnius Torvalds开发的类Unix操作系统内核已经成为开源世界的中心,人们不禁追问为什么Linux成功了,而包括GNU HURD和BSD在内的那么多相似的项目却失败了? + +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/05/linux.jpg) + +自由软件和开源世界的发展史中最令人不解的问题之一是为什么Linux取得了如此辉煌的成功,然而其它同样尝试打造自由开源、类Unix操作系统内核的项目却没能那么成功?这个问题难以回答,但我总结了一些原因,在下面与大家分享。 + +不过,首先得明确:当我谈论Linux是一个巨大的成功时所表达的含义。我对Linux成功的定义和对其它类Unix操作系统内核不一样,后者中一些是开源的,一些不是,而且它们繁荣发展的时期是Linux诞生的时期。[GNU][1]的HURD,一个发起于[1991年5月][1]的自由但不是免费的内核,便是其中之一。其它的包括现在大部分人都没听说过的Unix,比如由加州大学伯克利分校开发出来的BSD的各种各样Unix衍生版,由微软主导的Unix系统Xenix,包括Minix在内的学术版本Unix,和在AT&T赞助下开发的最初的Unix。在更早的数十年内,它对于学术界和商业届的计算发展至关重要,但到19世纪90年代就已经几乎已经消失在人们的视野里。 + +#### 相关阅读 #### + +- [Open Source History: Tracing the Origins of Hacker Culture and the Hacker Ethic][3] +- [Unix and Personal Computers: Reinterpreting the Origins of Linux][4] + +因此,得说明的是,我所写的是关于内核,而不是完整的操作系统。在很大程度上,Linux内核的成功归功于GNU整个项目。GNU这个项目产生了一套至关重要的工具,包括编译器、调试器和BASH shell的实现,这些对于构建一个类Unix操作系统是必需的。但是GNU的开发者们从没开发出一个HURD内核的可行版本(尽管他们仍在[不懈努力中][5])。相反,Linux呈现出来的则是一个将GNU各个部分紧密连接在一起的内核,尽管这超出了GNU的初衷。 + +因此,值得人们去追问为什么Linux,一个由Linus Torvalds这个芬兰的无名程序员于1991年——和HURD同一年——发起的内核,能够禁受考验并发展壮大?在当时的大环境下,很多拥有强力商业支持的、由当时炙手可热的黑客领头的类Unix内核都没能够发展起来。为了说明这个问题,我找到了一些和这个问题相关的解释。为此我研究了自由软件和开源世界的发展史,和不同解释的优缺点。 + +### Linux采用去中心化的开发方式 ### + +这个观点来源于Eric S. Raymond的文章,“[大教堂与市集][6]”和其相关资料。这些资料验证了一种情形:当大量的贡献者以一种去中心化的组织结构持续不断地协同合作时,软件开发的效率最佳。Linux的开发证明了这一点,与之相反的是,比如,GNU HURD采用了一种相对更集中化的方法来管理代码开发。其结果如同Raymond所言,显然在十年的时间里都没能成功构建出一个完整的操作系统。 + +在一定程度上,这个解释有道理,但仍有一些明显的不足。举例来说,Torvalds在指导Linux代码开发过程中毫无争议地承担起一个更加有权威的角色,他可以决定接受或拒绝代码,这一点并非Raymond和其他人所想的那样。其次,这个观点不能解释除了没能开发出一个可行的系统内核外GNU仍然成功地生产出那么多优秀的软件。如果只有去中心化的开发方式才能很好地指导开源软件世界里的项目,那么GNU所有的编程工作都应该是徒劳无功的,但事实并非如此。 + +### Linux是实用型的,而GNU是空想型的 ### + +个人而言,我觉得下面这个说法是最引人注目的,即Linux之所发展得如此迅速是因为它的创建者是一个实用主义者,他起初只是想写一个内核,使其能够在他家里的电脑上运行一个裁剪过的Unix操作系统,而不是成为以改变世界为目标的自由软件的一部分,而后者正是GNU项目的一贯目标。 + +然而,这个解释仍然有一些不能完全让人信服的地方。特别是,尽管Torvalds本人信奉实用主义的原则,但无论以前还是现在,并非所有参与到他的项目中的成员都和他一样信奉这一原则。尽管如此,Linux仍然取得了成功。 + +而且,如果实用主义是Linux持续发展的关键,那么就要再问一遍:为什么GNU除了没能开发出一个内核外还是成功地开发出这么多有用的工具?如果拥有某一种对软件的坚定政治信仰是追求成功的项目路上的绊脚石,那么GNU早应该是一个彻头彻尾的失败者,而不会是一个开发了那么多如今依然为IT世界提供坚实基础的优秀软件包的开拓者。 + +最后(但并不是最不重要),许多诞生于19世纪80年代末期和90年代初期的Unix变体,尤其是一些BSD分支,都是实用主义的产物。它们的开发者们致力于开发出可以自由分享而不是受到高昂商业证书限制的Unix变体,但他们对于编程或者共享代码并非完全局限于意识形态。Torvalds同样如此,因此很难说Linux和成功和其它Unix项目的失败是意识形态在作怪。 + +### 操作系统设计 ### + +当谈到Linux的成功时,不可忽视的是Linux和其它Unix变体之间的诸多技术差异。Richard Stallman,GNU项目的创始人,在一封给我的电子邮件中解释了为什么HURD的开发进度频频滞后:“GNU Hurd确实不是一次实用上的成功。部分原因是它的基本设计使它像是一个研究项目。(我之所以选择这样的设计,是考虑到这是快速实现一个可用内核的捷径。)” + +就Torvalds独自编写出Linux的所有代码这点而言,Linux也有别于其它Unix变体。当他在1991年8月[第一次发布Linux][7]时他的一个初衷就是拥有一个属于他自己的Unix,免费共享代码。这点特性使得Linux区别于同时期的大部分Unix变体,后者一般是从AT&T Unix或伯克利的BSD中衍生出基础代码。 + +我并不是一个计算机科学家,所以我没有资格去评判是否Lunux代码就优于其他Unix代码,以此来解释Linux的成功。虽然这并不能解释Linux和其它Unix内核在文化和人力上的不同,但这个观点对我来说解释得通,因为似乎在理解Linux成功这一点上它比代码更加重要。(译者尽力了+_+) + +### Linux背后的社区提供了有力支持 ### + +Stallman也写到Linux成功的“主要原因”是“Torvalds使Linux成为一个自由软件,所以相比Hurd有更多来自社区的支持涌入Linux的发展中。”但这对于Linux的成长轨迹并非是一个完美的解释,因为它不能说明为什么自由软件的开发者们追随了Torvalds而不是HURD或其它某个Unix。但它仍然突出了这个转变是Linux盛行的很大一部分。(译者尽力了) + +对于自由软件社区支持Linux的决定有一个更全面的理由可以用来解释为什么开发者们这么做。起初,Linux只是一个默默无闻的小项目,以任何标准来衡量,它比同时期其它的一些尝试创建一个更加自由的Unix,比如NET BSD和386/BSD,都要显得微不足道。同样,最初并不清楚Linux和自由软件运行目标的亲和力是怎样。创建伊始,Torvalds只是在一份防止Linux不被商业使用的证书下发布了Linux。至于后来他为了保护源代码的开放性转向使用GNU的通用公开证书则是后话了。 + +所以,这些就是我所找到的Linux作为一个开源操作系统之所以取得成功的解释,可以肯定Linux的成就在某些方面(但比如桌面版的Linux从未成为它的支持者希望成为的样子)已经是可以衡量的成功。总之,Linux业已以其它任何类Unix操作系统都没有实现的方式成为了计算机世界的基石。也许源于BSD的苹果公司的OS X和iOS系统也很接近这一点,但它们没有在其它方面像Linux影响互联网一样扮演着如此重要的中心角色。 + +对于为什么Linux能成为它已经成为的样子,或者为什么它在Unix世界的竞争对手们几乎全部变得默默无闻的问题你有其它的想法吗?如果有,我很乐意听到你的想法。(诚然,BSD的变体如今仍有一批追随者,而一些商用的Unix对于[Red Hat][8](RHT)为[他们的用户提供支持][9]来说也仍然十分重要。但这些Unix中没有一个能够像Linux一样几乎征服了从Web服务器到智能手机的每一个领域。) + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/050415/open-source-history-why-did-linux-succeed + +作者:[hristopher Tozzi][a] +译者:[KayGuoWhu](https://github.com/KayGuoWhu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:http://gnu.org/ +[2]:http://www.gnu.org/software/hurd/history/hurd-announce +[3]:http://thevarguy.com/open-source-application-software-companies/042915/open-source-history-tracing-origins-hacker-culture-and-ha +[4]:http://thevarguy.com/open-source-application-software-companies/042715/unix-and-personal-computers-reinterpreting-origins-linux +[5]:http://thevarguy.com/open-source-application-software-companies/042015/30-years-hurd-lives-gnu-updates-open-source- +[6]:http://www.catb.org/esr/writings/cathedral-bazaar/cathedral-bazaar/ +[7]:https://groups.google.com/forum/#!topic/comp.os.minix/dlNtH7RRrGA[1-25] +[8]:http://www.redhat.com/ +[9]:http://thevarguy.com/open-source-application-software-companies/032614/red-hat-grants-certification-award-unix-linux-migration-a \ No newline at end of file From abeb7ba4649ea50acd04dd2102ad4ce30e2877a7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 28 May 2015 15:59:04 +0800 Subject: [PATCH 0993/2517] =?UTF-8?q?20150528-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tless but awesome Linux terminal tricks.md | 106 +++++++ ...nds for RPM Package Management in Linux.md | 287 ++++++++++++++++++ ...Things To Do After Installing Fedora 22.md | 114 +++++++ 3 files changed, 507 insertions(+) create mode 100644 sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md create mode 100644 sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md create mode 100644 sources/tech/20150528 Things To Do After Installing Fedora 22.md diff --git a/sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md b/sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md new file mode 100644 index 0000000000..731f28df10 --- /dev/null +++ b/sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md @@ -0,0 +1,106 @@ +11 pointless but awesome Linux terminal tricks +================================================================================ +Here are some great Linux terminal tips and tricks, each one as pointless as it is awesome. + +![](http://images.techhive.com/images/article/2015/05/slide_01-100587352-orig.png) + +### All work and no play... ### + +Linux is one of the most astoundingly functional and utilitarian Operating Systems around when it comes to working from the command line. Need to perform a particular task? Odds are there is an application or script you can use to get it done. Right from the terminal. But, as they say in the good book, "All work and no play make Jack really bored or something." So here is a collection of my favorite pointless, stupid, annoying or amusing things that you can do right in your Linux Terminal. + +![](http://images.techhive.com/images/article/2015/05/slide_02-100587353-orig.png) + +### Give the terminal an attitude ### + +Step 1) Type "sudo visudo". + +Step 2) At the bottom of the "Defaults" (near the top of the file) add, on a new line, "Defaults insults". + +Step 3) Save the file. + +"What did I just do to my computer?" you may be asking yourself. Something wonderful. Now, whenever you issue a sudo command and misstype your password, your computer will call you names. My favorite: "Listen, burrito brains, I don't have time to listen to this trash." + +![](http://images.techhive.com/images/article/2015/05/slide_03-100587354-orig.png) + +### apt-get moo ### + +That screenshot you see? That's what typing "apt-get moo" (on a Debian-based system) does. That's it. Don't go looking for this to do something fancy. It won't. That, I kid you not, is it. But it's one of the most commonly known little Easter eggs on Linux. So I include it here, right near the beginning, so I won't get 5,000 emails telling me I missed it in this list. + +![](http://images.techhive.com/images/article/2015/05/slide_04-100587355-orig.png) + +### aptitude moo ### + +A bit more entertaining is aptitude's take on "moo." Type "aptitude moo" (on Ubuntu and the like) and you'll be corrected about thinking "moo" would do anything. But you know better. Try the same command again, this time with an optional "-v" attribute. Don't stop there. Add v's, one at a time, until aptitude gives you what you want. + +![](http://images.techhive.com/images/article/2015/05/slide_05-100587356-orig.png) + +### Arch: Put Pac-Man in pacman ### + +This is one just for the Arch-lovers out there. The de facto package manager, pacman, is pretty fantastic already. Let's make it even better. + +Step 1) Open "/etc/pacman.conf". + +Step 2) In the "# Misc options", remove the "#" from in front of "Color". + +Step 3) Add "ILoveCandy". + +Now the progress for installing new packages, in pacman, will include a little tiny Pac-Man. Which should really just be the default anyway. + +![](http://images.techhive.com/images/article/2015/05/slide_06-100587358-orig.png) + +### Cowsay! ### + +Making aptitude moo is neat, I guess, but you really can't use it for much. Enter "cowsay." It does what you think. You make a cow say things. Anything you like. And it's not even limited to cows. Calvin, Beavis, and the Ghostbusters logo are all available in full ASCII art glory – type "cowsay -l" for a full list of what's available in this, Linux's most powerful tool. Remember that, like most great terminal applications, you can pipe the output from other applications straight into cowsay (ala "fortune | cowsay"). + +![](http://images.techhive.com/images/article/2015/05/slide_07-100587359-orig.png) + +### Become an 3l33t h@x0r ### + +Typing "nmap" isn't something one typically needs to do on a day-to-day basis. But when one does need to "whip out the nmap," one wants to look as l33t as humanly possible. Add a "-oS" to any nmap command (such as "nmap -oS - google.com"). Bam. You're now in what is officially known as "[Script Kiddie Mode][1]." Angelina Jolie and Keanu Reeves would be proud. + +![](http://images.techhive.com/images/article/2015/05/slide_08-100587360-orig.png) + +### Getting all Discordian ddate ### + +If you've ever been sitting around thinking, "Hey! I want today's date to be written in an essentially useless, but whimsical, way"…try typing "ddate". Results like "Today is Setting Orange, the 72nd day of Discord in the YOLD 3181," can really spice up your server logs. + +Note: Technically, this is a real thing called the [Discordian Calendar][2], used (in theory) by the followers of [Discordianism][3]. Which means I probably offended somebody. Or maybe not. I'm not really sure. Either way, ddate is a handy tool in any office. + +![](http://images.techhive.com/images/article/2015/05/slide_09-100587361-orig.png) + +### I See Colors Everywhere! ### + +Tired of boring old text? Looking to spruce things up and show the world your true style? lolcat. Install it. Use it. Everywhere. It takes any text input and turns it into a rainbow of wonder and enchantment. Piping text into lolcat (ala "fortune | lolcat") is sure to liven up any party. + +![](http://images.techhive.com/images/article/2015/05/slide_10-100587362-orig.png) + +### The Steam Locomotive ### + +Animated ASCII art steam locomotive in your terminal. You want this. You need this. Install and run "sl". Use "sl -l" for a tiny version. Or, if you want to really spend some time on this, "sl-h". This is the full train, including passenger cars. + +![](http://images.techhive.com/images/article/2015/05/slide_11-100587364-orig.png) + +### Reverse any text ### + +Pipe the output of any text into "rev" and it will reverse the text. "fortune | rev" gives you a fortune. In reverse. Which is, as odd as it may seem, not a misfortune. + +![](http://images.techhive.com/images/article/2015/05/slide_12-100587366-orig.png) + +### The Matrix is still cool, right? ### + +Want your terminal to do that scrolling text, l33t, Matrix-y thing? "cmatrix" is your friend. You can even have it output different colors, which is snazzy. Learn how by typing "man cmatrix". Or, better yet, "man cmatrix | lolcat". Which, really, is the most pointless (but wonderful) thing you can do in the Linux Terminal. So that's where I leave you. + +-------------------------------------------------------------------------------- + +via: http://www.networkworld.com/article/2926630/linux/11-pointless-but-awesome-linux-terminal-tricks.html + +作者:[Bryan Lunduke][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.networkworld.com/author/Bryan-Lunduke/ +[1]:http://nmap.org/book/output-formats-script-kiddie.html +[2]:http://en.wikipedia.org/wiki/Discordian_calendar +[3]:http://en.wikipedia.org/wiki/Discordianism \ No newline at end of file diff --git a/sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md b/sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md new file mode 100644 index 0000000000..dc81fef219 --- /dev/null +++ b/sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md @@ -0,0 +1,287 @@ +27 ‘DNF’ (Fork of Yum) Commands for RPM Package Management in Linux +================================================================================ +DNF aka Dandified YUM is a next generation Package Manager for RPM based Distribution. It was first introduced in Fedora 18 and it is replaced [YUM utility][1] in recent release of Fedora 22. + +![](http://www.tecmint.com/wp-content/uploads/2015/05/linux-dnf-command-examples.jpg) + +DNF aims at improving the bottlenecks of YUM viz., Performance, Memory Usages, Dependency Resolution, Speed and lots of other factors. DNF does Package Management using RPM, libsolv and hawkey library. Though it does not come per-installed in CentOS and RHEL 7 you can yum, dnf and use it alongside the yum. + +You may like to read more about DNF here: + +- [Reasons Behind Replacing Yum with DNF][2] + +The latest stable release of DNF is 1.0 (at the time of writing of post) which was released on May 11, 2015. It (and all previous version of DNF) is mostly written in Python and is released under GPL v2 License. + +### Installation of DNF ### + +DNF in not available in the default repository of RHEL/CentOS 7. However Fedora 22 ships with DNF implemented officially. + +To install DNF on RHEL/CentOS systems, you need to first install and enable epel-release repository. + + # yum install epel-release + OR + # yum install epel-release -y + +Though it is not ethical to use ‘-y‘ with yum as it is recommended to see what is being installed in your system. However if this does not matter you much you may use ‘-y’ with yum to install everything automatically without user’s intervention. + +Next, install DNS package using yum command from epel-release repository. + + # yum install dnf + +After dnf installed successfully, it’s time to show you 27 practical usage of dnf commands with examples that will help you to manage packages in RPM based distribution easily and effectively. + +### 1. Check DNF Version ### + +Check the version of DNF installed on your System. + + # dnf --version + +![Check DNF Version](http://www.tecmint.com/wp-content/uploads/2015/05/Check-DNF-Version.gif) + +### 2. List Enabled DNF Repositories ### + +The option ‘repolist‘ with dnf command, will display all enabled repositories under your system. + + # dnf repolist + +![Check All Enabled Repositories](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Enabled-Repositories.gif) + +### 3. List all Enabled and Disabled DNF Repositories ### + +The option ‘repolist all‘ will print all the enabled/disabled repositories under your system. + + # dnf repolist all + +![List All Enabled/Disabled Repositories](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Repositories.gif) + +### 4. List all Available and Installed Packages using DNF ### + +The command “dnf list” will list all the available packages from all the repositories and installed packages on your Linux system. + + # dnf list + +![List All Packages using DNF](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Packages.png) + +### 5. List all Installed Packages using DNF ### + +While the “dnf list” command shows all the available/installed packages from all the repositories. However, you have the option to list only the installed packages using option “list installed” as shown below. + + # dnf list installed + +![List All Installed Packages](http://www.tecmint.com/wp-content/uploads/2015/05/List-Installed-Packages.png) + +### 6. List all Available Packages using DNF ### + +Similarly, the “list available” option, will list all the packages available to be installed from all the enabled repositories. + + # dnf list available + +![List Available Packages using DNF](http://www.tecmint.com/wp-content/uploads/2015/05/List-Available-Packages.png) + +### 7. Search for a Package using DNF ### + +If incase, you’ve no idea about the package that you want install, in such situation you may use ‘search‘ option with dnf command to search for the package that matches the word or string (say nano). + + # dnf search nano + +![Search Package by Word](http://www.tecmint.com/wp-content/uploads/2015/05/Search-Package.gif) + +### 8. See what Provides a file/sub-package? ### + +The dnf option “provides” find the name of the package that provides specific file/sub-package. For example, if you would like to find what provides ‘/bin/bash‘ on your system? + + # dnf provides /bin/bash + +![Find File Sub Package](http://www.tecmint.com/wp-content/uploads/2015/05/Find-Package-Sub-Package.gif) + +### 9. Get Details of a Package using DNF ### + +Let’s assume you want to know the information of a package before installing it on the system, you may use “info” switch to get a detailed information about a package (say nano) as below. + + # dnf info nano + +![Check Package Information with DNF](http://www.tecmint.com/wp-content/uploads/2015/05/Check-Package-Information.gif) + +### 10. Install a Package with DNF ### + +To install a package called nano, just run the below command it will automatically resolve and install all required dependencies for package nano. + + # dnf install nano + +![Install Package using DNF](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Package-DNF.gif) + +### 11. Updating a Package using DNF ### + +You may update only a specific package (say systemd) and leave everything on the system untouched. + + # dnf update systemd + +![Update a Specific Package](http://www.tecmint.com/wp-content/uploads/2015/05/Update-a-Package.gif) + +### 12. Check for System Updates using DNF ### + +Check updates for all the system packages installed into the system simply as. + + # dnf check-update + +![Check For System Update](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-System-Update.gif) + +### 13. Update All System Packages using DNF ### + +You may update the whole system including all the installed packages with following commands. + + # dnf update + OR + # dnf upgrade + +![Update System](http://www.tecmint.com/wp-content/uploads/2015/05/Update-System.gif) + +### 14. Remove/Erase a Package using DNF ### + +To remove or erase any unwanted package (say nano), you may use “remove” or “erase” switch with dnf command to remove it. + + # dnf remove nano + OR + # dnf erase nano + +![Remove Package in Linux](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Package.gif) + +### 15. Remove Orphan Packages using DNF ### + +Those packages that were installed to satisfy dependency may be useless if not being used by other applications. To remove those orphan packages execute the below command. + + # dnf autoremove + +![Remove Orphan Packages](http://www.tecmint.com/wp-content/uploads/2015/05/Autoremove-Packages.gif) + +### 16. Remove Cached Packages using DNF ### + +A lot of time we encounter out-of-date headers and unfinished transactions which results into error while executing dnf. We may clean all the cached packages and headers containing remote package information simply by executing. + + # dnf clean all + +![Remove DNF Cache](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Cache-Packages.gif) + +### 17. Get Help on Specific DNF Command ### + +You may get help of any specific dnf command (say clean) just by executing the below command. + + # dnf help clean + +![Get DNF Command Help](http://www.tecmint.com/wp-content/uploads/2015/05/Help-on-DNF-Command.gif) + +### 18. List all DNF Commands and Options ### + +To list help on all available dnf commands and option simply type. + + # dnf help + +![Get Help on DNF Options](http://www.tecmint.com/wp-content/uploads/2015/05/DNF-Options.gif) + +### 19. View History of DNF ### + +You may call dnf history to look at the list of already executed dnf commands. This way you can be aware of what was installed/removed with time stamp. + + # dnf history + +![Check DNF History](http://www.tecmint.com/wp-content/uploads/2015/05/Check-DNF-History.gif) + +### 20. List all Group Packages ### + +The command “dnf grouplist” will print all available or installed packages, if nothing is mentioned, it will list all known groups. + + # dnf grouplist + +![List All Group Packages](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Group-Packages.gif) + +### 21. Install a Group Package using DNF ### + +To install a Group of packages bundled together as group package (say Educational Software) simply as. + + # dnf groupinstall 'Educational Software' + +![Install Group Packages](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Group-Packages.gif) + +### 22. Update a Group Package ### + +Let’s update a Group Package (say Educational Software) by executing the below command. + + # dnf groupupdate 'Educational Software' + +![Update Group Package](http://www.tecmint.com/wp-content/uploads/2015/05/Update-Group-Package.gif) + +### 23. Remove a Group Package ### + +We can remove the group Package (say Educational Software) as. + + # dnf groupremove 'Educational Software' + +![Remove Group Package](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Group-Package.gif) + +### 24. Install a Package from Specific Repository ### + +DNF makes it possible to install any specific package (say phpmyadmin) from a repo (epel) as simply as, + + # dnf --enablerepo=epel install phpmyadmin + +![Install Package From Specific Repo](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Package-From-Specific-Repo.gif) + +### 25. Synchronize Installed Packages to Stable Release ### + +The command “dnf distro-sync” will provides necessary options to synchronize all installed packages to most recent stable version available from any enabled repository. If no package is selected, all installed packages are synchronized. + + # dnf distro-sync + +![Synchronize Packages to Stable Version](http://www.tecmint.com/wp-content/uploads/2015/05/Synchronize-Packages.gif) + +### 26. Reinstall a Package ### + +The command “dnf reinstall nano” will reinstall an already installed package (say nano). + + # dnf reinstall nano + +![ReInstall Package](http://www.tecmint.com/wp-content/uploads/2015/05/Re-Install-Package.gif) + +### 27. Downgrade a Package ### + +The option “downgrade” will downgrades the named package (say acpid) to lower version if possible. + + # dnf downgrade acpid + +Sample Output + + Using metadata from Wed May 20 12:44:59 2015 + No match for available package: acpid-2.0.19-5.el7.x86_64 + Error: Nothing to do. + +**My observation**: DNF does not downgraded the package as it is supposed to. It has also been reported as bug. + +### Conclusion ### + +DNF is the upper state of the end of the art Package Manager YUM. It tends to do a lot of processing automatically which is not going to be praised by many experienced Linux System Administrator, as I believe. As a matter of example: + +- `--skip-broken` is not recognized by DNF and there is no alternative. +- There is nothing like ‘resolvedep‘ command however you may run dnf provides. +- There is no ‘deplist‘ command to find package dependency. +- You exclude a repo, means the exclusion apply on all operations, unlike yum which excludes those repos only at the time of install and updates, etc. + +Several Linux users are not happy the way Linux Ecosystem is moving. First [Systemd removed init system][3] v and now DNF will be replacing YUM sooner in Fedora 22 and later in RHEL and CentOS. + +What do you think? are distributions and the whole Linux ecosystem is not valuing it’s users and moving against their will. Also it is often said in IT industry – “Why fix, If not broken?”, and neither init System V is broken nor YUM. + +That’s all for now. Please let me know your valuable thoughts in the comments below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[2]:http://www.tecmint.com/dnf-next-generation-package-management-utility-for-linux/ +[3]:http://www.tecmint.com/systemd-replaces-init-in-linux/ \ No newline at end of file diff --git a/sources/tech/20150528 Things To Do After Installing Fedora 22.md b/sources/tech/20150528 Things To Do After Installing Fedora 22.md new file mode 100644 index 0000000000..27b37f86ee --- /dev/null +++ b/sources/tech/20150528 Things To Do After Installing Fedora 22.md @@ -0,0 +1,114 @@ +Things To Do After Installing Fedora 22 +================================================================================ +Fedora 22 the latest entrant in the community developed line of Red hat operating systems is released on the 26th of May 2015. A lot of speculation and anticipation has been associated with this release of the venerable fedora. Well there are some major changes that are being proposed for Fedora 22. + +Systemd is the new kid in the block when it comes to initialization daemons, it is poised to replace the venerable sysvinit module that has long been a part of the Linux ecosystem. Another major change that users will come across in the base python version. Its just that python in available in two different flavors the 2.x and 3.x lines. Each has its fair share of quirks and benefits. So users who might prefer the 2.x flavor might want to install their favorite python. The dandified Yum installer that has been around since Fedora 18 is all set to replace the age old YUM installer. Fedora has finally decided that it is time that DNF replace YUM. + +### 1) Install VLC media player ### + +Fedora 22 comes with a default media player viz. gnome videos (previously known as totem). If that is fine by you we can skip this step and move ahead. However if you like me prefer the most widely used VLC you can go ahead and install it from the RPMFusion repos. You can do that with : + + sudo dnf install vlc -y + +### 2) Configure RPMFusion Repos ### + +As I already mentioned Fedora is very strict with its ideologies, it does not ship with any non-free components with it. The official repositories does not provide some essential software containing non-free components like multimedia codes. So it is necessary to install some 3rd party repositories which will provide us some essential software. Luckily RPMFusion repositories come to the rescue. + + $ sudo dnf install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-22.noarch.rpm + +### 3) Install Multimedia Codecs ### + +As is said some multimedia codecs and plugins don't ship with fedora. Now who would like to miss out on their favorite shows and movies just because the codes are proprietary. Try this: + + $ sudo dnf install gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer-plugins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1 + +### 4) Update your system ### + +Fedora is a bleeding edge distribution and hence it releases updates which will fix bugs and loopholes present in your system continuously. Hence it is a good practice to keep your system up to date. + + $ sudo dnf update -y + +### 5) Uninstall software you may not need ### + +Fedora comes with a set of pre-chosen packages that most users can utilize, however for more advanced users, you may recognize that you do not need all of it. It's easy enough to remove any packages you don't need using the following command - I chose to uninstall rhythmbox because I know I won't use it: + + $ sudo dnf remove rhythmbox + +### 6) Install Adobe Flash ### + +We all wish Adobe Flash didn't exist anymore since it is not always know for being the most secure or resource efficient, but for awhile it's here to stay. The only way to install Adobe Flash for Fedora 22 is to install the official RPM from Adobe, as shown below. + +You can download the RPM [here][1]. After downloading the file, you can right click and open it like this: + +![Install Adobe Flash](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-9.50.42-PM.png) + +Right click and select "Open With Software Install" + +Then, simply click install on the window that pops up: + +![Install Adobe](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-9.51.07-PM.png) + +Click on "Install" to complete the process of installing the custom RPM from Adobe + +Once the process completes, the "Install" button will change to "Remove" and the installation should have finished. If your browser is open during the process, it may ask you to close it first or restart it after the install for the changes to take effect. + +### 7) Spin Up a VM with Gnome Boxes ### + +So you just installed Fedora and you're loving it, but maybe you need Windows still for something proprietary, or maybe you just want to play with another Linux distro. In any situation, you can use Gnome Boxes, provided with Fedora 22, to easily create a VM or use a live distribution. Follow the steps below to get started using an ISO of your choice! Who knows, maybe you can even check out a [Fedora Spin][2]. + +First open Gnome Boxes and select "New" in the top left: + +![Add a new virtual machine (box)](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.24.46-PM.png) + +Click "New" to start the process of adding a new virtual machine. + +Next, click to open a file and choose an ISO: + +![Choose ISO](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.28.44-PM.png) + +After choosing to select a file or ISO, select your ISO. In this case, I had a Debian ISO I installed + +Finally, customize the VM settings or use the defaults and click "Create." The VM will start by default and the available VMs will be available in Gnome Boxes as little thumbnails. + +![Create VM](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.31.11-PM.png) + +Customize the settings to whatever you choose, or keep the defaults. Click "Create" when you are done and the VM will be ready to go. + +### 8) Install Google Chrome ### + +Firefox is included with Fedora 22, but as with most software, everyone has their browser of choice. If yours happens to be Google Chrome, you can follow the instructions above for Adobe Flash player, however, obviously use the RPM from Google for whichever version of Chrome you download. The latest version can usually be found [here][3]. + +### 9) Add Social Media and Other Online Accounts ### + +Gnome has some nice built in functionality to accommodate accounts for things like Facebook, Google, and other online accounts. You can access the Online Accounts settings through the main Gnome Settings application. You can access the settings by right clicking on the desktop or by finding it in the applications. Then, simply click on Online Accounts and add the accounts of your choosing. If you add an account like Google, for example, you can use it as the default for things like sending email, calendar appointments, interacting with photos and documents, and more. + +### 10) Install KDE or another Desktop Environment ### + +Some of us just don't like Gnome, and that's okay. Run the following command in Terminal to install everything necessary to use KDE instead. The same instructions can be applied to xfce, lxde, or other desktop environments as well. + + $ sudo dnf install @kde-desktop + +After the install finishes, log out. When you click on your username, notice the little gear wheel that indicates settings. Click it and select "Plasma." When you log in again, you will be greeted by a fresh KDE desktop. + +![Plasma on Fedora 22](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-11.32.27-PM.png) + +The Plasma environment after just installing it on Fedora 22 + +### Conclusion ### + +That’s it you are all set to go. Use the system and try out things. If you don't find something according to your liking, linux gives you the freedom to change them. Fedora comes with the latest Gnome shell as its desktop environment, too heavy for you and don't like it. Try KDE or some light weight DE like cinnamon, xfce etc. Wish you a very happy and hassle free Fedora experience. !! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/things-do-after-installing-fedora-22/ + +作者:[Jonathan DeMasi][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/jonathande/ +[1]:https://get.adobe.com/flashplayer/ +[2]:http://spins.fedoraproject.org/ +[3]:https://www.google.com/intl/en/chrome/browser/desktop/index.html \ No newline at end of file From 2f85a93f0944070b9a16017470e0d1d2835d2965 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 28 May 2015 18:01:24 +0800 Subject: [PATCH 0994/2517] Translating by ZTinoZ --- sources/tech/20150526 20 Useful Terminal Emulators for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index a77c665426..9103f53b4d 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -1,7 +1,7 @@ Translating by ZTinoZ 20款优秀的Linux终端仿真器 ================================================================================ -A Terminal emulator is a computer program that reproduces a video terminal within some other display structure. In other words the Terminal emulator has an ability to make a dumb machine appear like a client computer networked to the server. The terminal emulator allows an end user to access console as well as its applications such as text user interface and command line interface. +终端仿真器是一款计算机程序A Terminal emulator is a computer program that reproduces a video terminal within some other display structure. In other words the Terminal emulator has an ability to make a dumb machine appear like a client computer networked to the server. The terminal emulator allows an end user to access console as well as its applications such as text user interface and command line interface. ![Linux Terminal Emulators](http://www.tecmint.com/wp-content/uploads/2014/01/Linux-Terminal-Emulators1.jpeg) From 1b0ba05412dedf874452d1e51704cc8c98c4f398 Mon Sep 17 00:00:00 2001 From: alim0x Date: Thu, 28 May 2015 20:43:56 +0800 Subject: [PATCH 0995/2517] [translating]20150527 Ubuntu Community Council... --- ...ty Council Asks the Kubuntu Project Leader to Step Down.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md b/sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md index bdb44591fc..fc60386ae5 100644 --- a/sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md +++ b/sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md @@ -1,3 +1,5 @@ +alim0x translating + Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down ================================================================================ > Jonathan Riddell refuses to step down as Kubuntu leader @@ -30,4 +32,4 @@ via: http://news.softpedia.com/news/Ubuntu-Community-Council-Asks-the-Kubuntu-Pr [a]:http://news.softpedia.com/editors/browse/marius-nestor [1]:https://skitterman.wordpress.com/ -[2]:http://jriddell.org/ \ No newline at end of file +[2]:http://jriddell.org/ From a47f588c4e5eaebd9feb959bfa40f657f2f7462e Mon Sep 17 00:00:00 2001 From: alim0x Date: Thu, 28 May 2015 22:17:59 +0800 Subject: [PATCH 0996/2517] [translated]20150527 Ubuntu Community Council... --- ...the Kubuntu Project Leader to Step Down.md | 35 ------------------- ...the Kubuntu Project Leader to Step Down.md | 33 +++++++++++++++++ 2 files changed, 33 insertions(+), 35 deletions(-) delete mode 100644 sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md create mode 100644 translated/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md diff --git a/sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md b/sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md deleted file mode 100644 index fc60386ae5..0000000000 --- a/sources/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md +++ /dev/null @@ -1,35 +0,0 @@ -alim0x translating - -Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down -================================================================================ -> Jonathan Riddell refuses to step down as Kubuntu leader - -![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-Community-Council-Asks-the-Kubuntu-Project-Leader-to-Step-Down-482384-2.jpg) - -**So this just happened. Scott Kitterman, a Debian developer and member of the Kubuntu Council, decided to make public some emails where it would appear that members of the Ubuntu Community Council asks Jonathan Riddell to step down from his position as a Kubuntu Project leader.** - -Jonathan Riddell, which is both a KDE and Kubuntu developer, as well as an important member of the Ubuntu community for many years now, is being accused by several members of the Ubuntu and Kubuntu community about his confrontational and aggressive behavior towards them, as [the email exchanges exposed today][1] by Scott Kitterman suggest. - -Long story short, after several email exchanges, the final decision of the Ubuntu Community Council, which is also backed by Canonical and Ubuntu founder Mark Shuttleworth, was for Jonathan Riddell to step down from all his positions as a leader within the Ubuntu and Kubuntu communities, for at least 12 months, but still being able to participate to discussions as any other member. - -"It is with regret that we write this email to discuss an issue that we feel is negatively impacting the Ubuntu Community. Over a long period of time Jonathan Riddell has become increasingly difficult to deal with. Jonathan raised valid issues and concerns, but reacted poorly when he received answers he did not agree with," reads the first email send to the Ubuntu Community Council regarding the "nasty" behavior of Jonathan Riddell. - -### Jonathan Riddell refuses to step down as a Kubuntu Project leader ### - -From the email exchanges exposed today by Scott Kitterman, who decided to write a second post on his blog, suggesting that he wants to resign from its position in the Ubuntu and Kubuntu community, it would appear that Jonathan Riddell refused to step down as a Kubuntu Project leader. - -As expected, Jonathan Riddell is being backed by members of the Kubuntu Community Council, who fired back at the Ubuntu Community Council's decision to take down the Kubuntu Project leader. "I’d like to thank all the Kubuntu members who just voted to re-affirm me on the Kubuntu Council," says Jonathan Riddell on [his blog][2]. - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/Ubuntu-Community-Council-Asks-the-Kubuntu-Project-Leader-to-Step-Down-482384.shtml - -作者:[Marius Nestor][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/marius-nestor -[1]:https://skitterman.wordpress.com/ -[2]:http://jriddell.org/ diff --git a/translated/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md b/translated/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md new file mode 100644 index 0000000000..cb29a1e815 --- /dev/null +++ b/translated/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md @@ -0,0 +1,33 @@ +Ubuntu社区委员会要求Kubuntu项目领导人下台 +================================================================================ +> Jonathan Riddell拒绝从Kubuntu领导人位置退出 + +![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-Community-Council-Asks-the-Kubuntu-Project-Leader-to-Step-Down-482384-2.jpg) + +**这一切刚刚发生。Scott Kitterman,一名Debian开发者以及Kubuntu委员会成员,决定公开一些电子邮件,邮件披露了Ubuntu社区委员会成员要求Jonathan Riddell从Kubuntu项目领导人位置退出。** + +Jonathan Riddell是KDE以及Kubuntu的一名开发者,多年来也是Ubuntu社区的一名重要成员。从Scott Kitterman[今天曝光的社区邮件往来][1]中来看,他被指责对Ubuntu以及Kubuntu社区的一些成员有对抗性和侵略性的行为。 + +长话短说,经过多轮邮件往来之后,Ubuntu社区委员会的最终决定是让Jonathan Riddell退出他在Ubuntu以及Kubuntu社区的领导人位置至少12个月,但仍可以像其他成员一样参与讨论。这个决定同时也得到了Canonical和Ubuntu创始人Mark Shuttleworth的支持。 + +“很遗憾写下了讨论这个我们觉得对Ubuntu社区有着消极影响的问题的邮件。长期以来,Jonathan Riddell变得越来越难以交往。Jonathan提出正当的问题及关切,但当收到他不赞同的答案时反应就不那么让人愉快了。”在发给Ubuntu社区委员会的认为Jonathan Riddell行为“不友好”的邮件中这么写道。 + +### Jonathan Riddell拒绝从Kubuntu领导人位置退出 ### + +今天Scott Kitterman披露了邮件往来,并决定在博客上写第二篇博文,表明了他想从他在Ubuntu和Kubuntu的位置退出,这表明Jonathan Riddell可能拒绝从Kubuntu领导人位置退出。 + +正如预料之中,Kubuntu社区委员会的成员们支持Jonathan Riddell,并且回击了Ubuntu社区委员会罢免Kubuntu项目领导人的决定。Jonathan Riddell在[他的博客][2]上写道:“我要感谢所有在Kubuntu委员会投票再次肯定我的Kubuntu成员。” + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Ubuntu-Community-Council-Asks-the-Kubuntu-Project-Leader-to-Step-Down-482384.shtml + +作者:[Marius Nestor][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor +[1]:https://skitterman.wordpress.com/ +[2]:http://jriddell.org/ From 30e18aebe81455df5a48fdde4a31510b49f5a5da Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 29 May 2015 06:25:58 +0800 Subject: [PATCH 0997/2517] PUB:20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down @alim0x --- ...the Kubuntu Project Leader to Step Down.md | 33 +++++++++++++++++++ ...the Kubuntu Project Leader to Step Down.md | 33 ------------------- 2 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 published/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md delete mode 100644 translated/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md diff --git a/published/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md b/published/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md new file mode 100644 index 0000000000..a47014fc9b --- /dev/null +++ b/published/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md @@ -0,0 +1,33 @@ +Ubuntu 社区委员会要求 Kubuntu 项目领导人下台 +================================================================================ +> 而Jonathan Riddell拒绝从Kubuntu领导人位置退出 + +![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-Community-Council-Asks-the-Kubuntu-Project-Leader-to-Step-Down-482384-2.jpg) + +**这一切刚刚发生。一名Debian开发者以及Kubuntu委员会成员 Scott Kitterman 决定公开一些电子邮件,邮件披露了Ubuntu 社区委员会成员要求 Jonathan Riddell 从 Kubuntu 项目领导人位置退出的过程。** + +Jonathan Riddell 是 KDE 以及 Kubuntu 的一名开发者,多年来也是 Ubuntu 社区的一名重要成员。从 Scott Kitterman [今天曝光的社区邮件往来][1]中来看,Jonathan Riddell 被指责对 Ubuntu 以及 Kubuntu 社区的一些成员咄咄逼人和挑衅。 + +长话短说,经过多轮邮件往来之后,Ubuntu 社区委员会的最终决定是让 Jonathan Riddell 退出他在 Ubuntu 以及Kubuntu 社区的领导人位置至少12个月,但仍可以像其他成员一样参与讨论。这个决定同时也得到了 Canonical 和Ubuntu 的创始人 Mark Shuttleworth 的支持。 + +“很遗憾写下了讨论这个我们觉得对 Ubuntu 社区有着消极影响的问题的邮件。长期以来,Jonathan Riddell 变得越来越难以交往。Jonathan 提出了有效的问题及关注,但当收到他不赞同的答案时,他的反应就不那么让人愉快了。”在 Ubuntu 社区委员会发出的第一封认为 Jonathan Riddell 行为“不友好”的邮件中这么写道。 + +### Jonathan Riddell拒绝从Kubuntu领导人位置退出 ### + +从今天 Scott Kitterman 披露邮件往来,并决定在博客上写第二篇博文来看,表明了他想从他在 Ubuntu 和 Kubuntu 的位置退出,这表明 Jonathan Riddell 可能拒绝从 Kubuntu 领导人位置退出。 + +正如预料之中,Kubuntu 社区委员会的成员们支持 Jonathan Riddell,并且回击了 Ubuntu 社区委员会罢免 Kubuntu 项目领导人的决定。“我要感谢所有在 Kubuntu 委员会投票再次肯定我的 Kubuntu 成员。”,Jonathan Riddell 在[他的博客][2]上写道,“希望 Kubuntu 能够继续走下去,我也计划和我深爱的社区伙伴们一起为 15.10 发布而努力。” + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Ubuntu-Community-Council-Asks-the-Kubuntu-Project-Leader-to-Step-Down-482384.shtml + +作者:[Marius Nestor][a] +译者:[alim0x](https://github.com/alim0x) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor +[1]:https://skitterman.wordpress.com/ +[2]:http://jriddell.org/ diff --git a/translated/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md b/translated/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md deleted file mode 100644 index cb29a1e815..0000000000 --- a/translated/news/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md +++ /dev/null @@ -1,33 +0,0 @@ -Ubuntu社区委员会要求Kubuntu项目领导人下台 -================================================================================ -> Jonathan Riddell拒绝从Kubuntu领导人位置退出 - -![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-Community-Council-Asks-the-Kubuntu-Project-Leader-to-Step-Down-482384-2.jpg) - -**这一切刚刚发生。Scott Kitterman,一名Debian开发者以及Kubuntu委员会成员,决定公开一些电子邮件,邮件披露了Ubuntu社区委员会成员要求Jonathan Riddell从Kubuntu项目领导人位置退出。** - -Jonathan Riddell是KDE以及Kubuntu的一名开发者,多年来也是Ubuntu社区的一名重要成员。从Scott Kitterman[今天曝光的社区邮件往来][1]中来看,他被指责对Ubuntu以及Kubuntu社区的一些成员有对抗性和侵略性的行为。 - -长话短说,经过多轮邮件往来之后,Ubuntu社区委员会的最终决定是让Jonathan Riddell退出他在Ubuntu以及Kubuntu社区的领导人位置至少12个月,但仍可以像其他成员一样参与讨论。这个决定同时也得到了Canonical和Ubuntu创始人Mark Shuttleworth的支持。 - -“很遗憾写下了讨论这个我们觉得对Ubuntu社区有着消极影响的问题的邮件。长期以来,Jonathan Riddell变得越来越难以交往。Jonathan提出正当的问题及关切,但当收到他不赞同的答案时反应就不那么让人愉快了。”在发给Ubuntu社区委员会的认为Jonathan Riddell行为“不友好”的邮件中这么写道。 - -### Jonathan Riddell拒绝从Kubuntu领导人位置退出 ### - -今天Scott Kitterman披露了邮件往来,并决定在博客上写第二篇博文,表明了他想从他在Ubuntu和Kubuntu的位置退出,这表明Jonathan Riddell可能拒绝从Kubuntu领导人位置退出。 - -正如预料之中,Kubuntu社区委员会的成员们支持Jonathan Riddell,并且回击了Ubuntu社区委员会罢免Kubuntu项目领导人的决定。Jonathan Riddell在[他的博客][2]上写道:“我要感谢所有在Kubuntu委员会投票再次肯定我的Kubuntu成员。” - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/Ubuntu-Community-Council-Asks-the-Kubuntu-Project-Leader-to-Step-Down-482384.shtml - -作者:[Marius Nestor][a] -译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/marius-nestor -[1]:https://skitterman.wordpress.com/ -[2]:http://jriddell.org/ From b2863934258d63e14badcc40269dded1a033b0c6 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Fri, 29 May 2015 12:37:47 +0800 Subject: [PATCH 0998/2517] finish translation --- sources/talk/20150310 FAQ--BSD.md | 83 ---------------------------- translated/talk/20150310 FAQ--BSD.md | 75 +++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 83 deletions(-) delete mode 100644 sources/talk/20150310 FAQ--BSD.md create mode 100644 translated/talk/20150310 FAQ--BSD.md diff --git a/sources/talk/20150310 FAQ--BSD.md b/sources/talk/20150310 FAQ--BSD.md deleted file mode 100644 index 65357e9559..0000000000 --- a/sources/talk/20150310 FAQ--BSD.md +++ /dev/null @@ -1,83 +0,0 @@ -translating by wwy-hust - -FAQ: BSD -================================================================================ -![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq1-large1.png) - -### Had history been slightly different, you’d be reading FreeBSD Voice today… ### - -#### So what’s the deal with this Birsa Seva Dal then? Isn’t it a political group in India? #### - -Very funny – you looked up the “BSD” disambiguation page on Wikipedia just to make that joke, didn’t you? Here we’re talking about the Berkeley Software Distribution, a family of operating systems that are much more widely used than you might think. - -#### Sorry, I couldn’t help myself. OK, so what’s the deal with these OSes? #### - -There are three main BSD operating systems in use today. They are based on Unix, they are open source, they tend to be used in server roles, but can also make good desktops and workstations as well. They run KDE, Firefox, LibreOffice, Apache, MySQL and pretty much any open source application you can name. They’re reliable, secure and support a lot of different hardware. - -#### Congratulations – you’ve just described GNU/Linux… #### - -True. Linux has all of the things I’ve just mentioned, and that’s why a lot of people never investigate BSD. In day-to-day usage, there isn’t a lot of difference between the BSD family and Linux, largely because they all have Unix underpinnings, and also because they share a lot of software. You could be logged into a remote machine, hacking some Python code in Vim, and checking your email in Mutt, and you wouldn’t know you were running BSD. Or you could be using an internet terminal in a cafe somewhere and not know it’s BSD. - -The biggest differences are in the development model and licence, and to understand this, we need to step back in time. The B in BSD refers to the University of California, Berkeley, which was a hotbed of open source Unix development back in the 1980s. As the 90s came, x86-based PCs were becoming popular and many people were interested in having a Unix-like OS on their home computers. A project called 386BSD was released in 1992 to provide just that. - -#### And where were all the Linux distributions at this time? #### - -Good question! You might know that one year before, Linus Torvalds had announced his kernel, which, when paired with the GNU project, formed a complete open source operating system. Linus had been following GNU’s own kernel (Hurd) and 386BSD, and said that had either of them been ready for daily use, he probably wouldn’t have created Linux. So the first few years of the 90s were tremendously lively for open source operating systems, and nobody was really sure which ones would succeed. - -Then it got messy for BSD. AT&T, the original developer of Unix, was trying to monetise its work on the operating system and claimed that BSD infringed its intellectual property rights. This culminated in a lawsuit in 1992 which severely held back BSD development. In the end, various chunks of the BSD source code had to be rewritten – while all this time, GNU/Linux was gaining features, stability and popularity. - -BSD was arguably in a more mature state than GNU/Linux in the early 1990s, and without these legal complications it could have become the standard on x86 PCs. We could all be using it today instead of Linux. - -#### But you said earlier that BSD is still widely used, so things improved after that? #### - -Yes. 386BSD development stagnated, but two teams of developers working over the internet created separate successor projects. FreeBSD became the most widely used flavour of BSD, and is now the closest to Linux as a desktop and server operating system, while NetBSD focused on portability (today it runs on over 50 platforms, all built from the same codebase). The third flavour, OpenBSD, forked off from NetBSD just a few years after NetBSD started due to a developer spat, and today it’s well known for its concentration on security. Over the years, OpenBSD has created many programs that have become standard on Linux, such as OpenSSH – and now we have LibreSSL too. - -#### So these three flavours of BSD are like Linux distributions? #### - -Yes and no. Each BSD has a separate codebase and separate development teams, although there is a lot of code-flow between them (especially for hardware drivers). But they are standalone operating systems with their own features, pros and cons. - -We mentioned that the development model of the BSDs is one feature that really distinguishes them from GNU/Linux. There’s nobody in charge of GNU/Linux as a whole: some teams are working on the GNU components, some are working on the kernel, some on boot scripts, some on manual pages, some on libraries, and so forth. The development model is often called “wild west”, with a lack of central authority, and distributions do all the hard work of fitting everything together. - -The BSDs, in contrast, are developed as complete projects from centralised source code trees. The kernel, the libraries, the system utilities and the manual pages are all stored and worked on in the same place. Many BSD fans argue that this gives the operating systems more coherency and stability, and from our years of dabbling with BSD we can attest that the manual pages are largely superb. - -![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq2-large1.png) - -#### Don’t the BSDs use anything from GNU/Linux? #### - -Yes, especially GCC. The GNU Compiler Collection has been the de-facto standard compiler on free Unix systems for decades, although FreeBSD has recently moved to LLVM/Clang. It’s important to note that the BSDs also use other open source projects that aren’t specifically GNU or Linux, such as the X Window System (XFree86 and X.org), Perl and so forth. And thanks to standards such as POSIX, most programs that run on Linux can be recompiled to run on the various BSD flavours. - -So, you could replace the L in a LAMP (Linux, Apache, MySQL and PHP) stack with FreeBSD, and get pretty much the same environment, with a different set of features (eg variations in filesystem and driver support). And there are some mega, super, huge users of FreeBSD, such as Netflix, which serve up ridiculous amounts of data every day. While FreeBSD makes a good desktop OS, its strengths really lie in the server room, with exceptional reliability and network performance. - -OpenBSD tends to be used in smaller web serving, file hosting, firewall and gateway roles where security is imperative. NetBSD is the least popular of the main BSD flavours – it can run on almost anything though, including old Amigas and Acorn boxes, and sometimes finds itself inside closed-source network devices. - -#### Hang on – how can someone close the source code? That ain’t kosher in Linux! #### - -Correct, and here we come to the other major difference with GNU/Linux. The licence for the BSD flavours (called, funnily enough, the BSD Licence) is very different to the GPL that we know. For starters, it’s much shorter. The BSD Licence essentially says: do what you want with this code, but give the original developers credit for writing it, and don’t try to sue them if it blows up your computer. - -So there’s nothing in the licence that forces the code to stay open, unlike with the GPL, which requires that users of the code also make their modifications freely available. This crucial difference has sparked countless flame wars over the years, with BSD fans saying that their licence is more free (because it’s less restrictive), while GNU/GPL fans say that their licence is actually more free (because it preserves freedom down the road). - -#### Blimey. Anyway, now that you’ve piqued my interest, where can I try out all these lovely BSD flavours? #### - -You can probably guess the websites – [www.openbsd.org][1], [www.freebsd.org][2] and [www.netbsd.org][3] – where you can download ISO images, boot them in VirtualBox, and play around. If you’ve been using Linux for a while, you won’t find any of them too difficult, although you’re expected to know your way around the command line. If you’re looking for something more newbie-friendly, PC-BSD - -([www.pcbsd.org][4]) is a customised version of FreeBSD focused on the desktop, with a fancy graphical installer and super-simple management of software. Have fun exploring! - - - - - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/faq-bsd-2/ - -作者:[Mike Saunders][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/mike/ -[1]:http://www.openbsd.org/ -[2]:http://www.freebsd.org/ -[3]:http://www.netbsd.org/ -[4]:http://www.pcbsd.org/ diff --git a/translated/talk/20150310 FAQ--BSD.md b/translated/talk/20150310 FAQ--BSD.md new file mode 100644 index 0000000000..97bcd4f246 --- /dev/null +++ b/translated/talk/20150310 FAQ--BSD.md @@ -0,0 +1,75 @@ +BSD +================================================================================ +![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq1-large1.png) + +### ʷвͬڽFreeBSD... ### + +#### ôBirsa Seva Dalôأѵһӡȵ֯ô #### + +ȤάٿϡBSDҳΪ˽Цô۲а棨Berkeley Software Distributionһõĸ㷺IJϵͳ塣 + +#### ǸҿƲסԼôЩϵͳôأ #### + +죬ҪʹõBSDϵͳ֡ǶUnixǶԴҴൣηĽɫҲܵ͹վKDEFirefoxLibreOfficeApacheMySQL˵óֵĿԴǶȶȫ֧಻ͬӲ + +#### ϲ㣡ղGNU/Linux #### + +ǵģLinuxӵҸղᵽжҲΪʲôܶ˴BSDճʹУLinuxBSDû̫IJͬҪΪǶUnixΪúܶԵ¼ԶVimдһЩPython룬ʹMuttemailܲδʶʹBSDڿȹͨնʹ֪BSD + +ڿģͺ֤Ϊ˽ЩҪصȥBSDУBżǴѧУUniversity of California, Berkeley1980ǿԴUnixķԴء90x86PCУ˶ǵļͥаװUnixϵͳȤһ386BSDĿʱṩĹܡ + +#### ôеLinuxаǸʱأ #### + +ʵúãҲ֪һǰLinus TorvaldsѾںˣGNUĿʱĿԴϵͳLinusʱѾڸGNUںˣHurd386BSD̸ʱںһԱճܾͲᴴLinuxˡԣ90ͷ꣬Դϵͳû֪ĸϵͳʤ + +BSDһЩ鷳UnixĿAT&TͼǵĹлһЩ棬BSDַǵ֪ʶȨ1992һ׮ϽBSDĿ̡BSDԴķ֧뱻дʱGNU/LinuxѾḻ˹ܣȶˡ + +90BSD֤GNU/Linuxӳ죬ûЩ鷳ѾΪx86 PCı׼ˡ죬ǿܶʹLinux + +#### ᵽBSDȻ㷺ʹãô #### + +ǵġ386BSDĿͣˣֻŶķʽijɹĿFreeBSDΪʹ㷺BSD汾ĿǰǺLinuxƵϵͳͷ汾ȻNetBSD۽ڿֲԣڳ50ֲͬƽ̨ϣͬĴ汾һ汾OpenBSDNetBSDʼþΪߵĿڽǶΪNetBSDķ֧ˣ죬רעڰȫOpenBSDǶLinuxı׼˵OpenSSH - ԣLibreSSL + +#### ԣְ汾BSDLinuxаô #### + +ҲҲǣÿBSD汾ԼĴ⡢ͬĿŶӡǼ๲õĴ루ӲǸӵɫŵȱ໥IJϵͳ + +ᵽBSDĿģGNU/LinuxҪص㡣GNU/Linuxû˶иһЩŶGNU湤һЩŶڿںˣһЩڿűһЩдֲᣬһЩдȵȡĿģͨȱȨġɷа渺ʹжƺϡ + +BSD෴Ǵ뻯ԴпΪһ塣ںˡ⡢ϵͳĵҳһطͬķʽʹáBSD˿ƣص˲ϵͳһԺȶԡͨЩʹBSDľǿֲ֤ҳѾ÷dz걸 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq2-large1.png) + +#### ѵBSDûʹGNU/Linuxκζô #### + +ǵģGCCʮGNU Compiler CollectionѾΪʵϵUnixϵͳ׼FreeBSDѾתʹLLVM/ClangˡֵעBSDһЩĿԴĿDzGNULinux˵X Window SystemXFree86X.orgPerlȵȡҿPOSIXһı׼LinuxϵijBSD汾ϱС + +ˣ԰LAMPLinuxApacheMySQLPHPеLijFreeBSDԻüͬĻԼһЩͬԣ磬ļϵͳַ֧棩FreeBSDдûNetflixÿṩݡFreeBSDһõ滷ijڷ棬ӵгѰĿɿԺܡ + +OpenBSDڰȫʮֱҪijϣСWebļйܡǽءNetBSDBSDҪаеһڼƽ̨ϣϵAmigasAcorn boxesʱڱԴ豸ҵӰ + +#### ȵȣô˽ԴԴأLinuxDzʵ #### + +Եģ̸GNU/LinuxҪͬBSD汾֤ȤBSD֤dz֪ͬGPL˵BSD̡BSD֤Ҫǣݴ룬£ĿԱȨ㻵ĵʱҪϡ + +ˣ֤ûκǿƴ뿪ԴGPLҪʹݴûǵ޸ҲԴһҪIJͬ˻ļۣBSDķ˿˵ǵ֤ɣΪôϸ񣩣GNU/GPLķ˿˵ǵ֤ŸɣΪɣ + +#### ѽô˵ѾҵȤܳЩɰBSD汾أ #### + +ѾԲµЩվ C [www.openbsd.org][1][www.freebsd.org][2][www.netbsd.org][3]ISOVirtualBoxǣȻʼˣѾһʱLinuxҪ˽Щⲻ̫ѡѰһЩָѺõĶPC-BSDPC-BSD([www.pcbsd.org][4])һFreeBSDĸԻư汾רע棬۵ͼλװͳ򵥵ף죡 + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/faq-bsd-2/ + +ߣ[Mike Saunders][a] +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ + +[a]:http://www.linuxvoice.com/author/mike/ +[1]:http://www.openbsd.org/ +[2]:http://www.freebsd.org/ +[3]:http://www.netbsd.org/ +[4]:http://www.pcbsd.org/ From 37241b9d7d1666c1238b82800d25757965c30024 Mon Sep 17 00:00:00 2001 From: wwy Date: Fri, 29 May 2015 12:40:33 +0800 Subject: [PATCH 0999/2517] [Translating] 20150527 How to Develop Own Custom Linux Distribution From Scratch.md --- ...w to Develop Own Custom Linux Distribution From Scratch.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md b/sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md index 9bf07333ea..2314ec9615 100644 --- a/sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md +++ b/sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md @@ -1,3 +1,5 @@ +translating by wwy-hust + How to Develop Own Custom Linux Distribution From Scratch ================================================================================ Have you ever thought of making your own Linux Distribution? Every Linux user in their journey to Linux thought of making their own Linux distribution, at-least once. Even I was not an exception as a newbie to Linux land and have given my considerable time developing my own Linux Distribution. Developing a Linux Distribution from scratch is called Linux From Scratch (LFS) @@ -62,4 +64,4 @@ via: http://www.tecmint.com/create-custom-linux-distribution-from-scratch/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://tecmint.tradepub.com/free/w_linu01/prgm.cgi \ No newline at end of file +[1]:http://tecmint.tradepub.com/free/w_linu01/prgm.cgi From 9e0e5e4a48516cd2544088b7eb750ca67bc82bb1 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Fri, 29 May 2015 15:28:46 +0800 Subject: [PATCH 1000/2517] [Translating] 20150527 3 Useful Hacks Every Linux User Must Know.md --- .../20150527 3 Useful Hacks Every Linux User Must Know.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md b/sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md index 39546df146..0107840a1b 100644 --- a/sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md +++ b/sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md @@ -1,3 +1,5 @@ +Translating by goreliu ... + 3 Useful Hacks Every Linux User Must Know ================================================================================ The world of Linux is filled with so much fun and interesting stuffs, the more we go in, the more we find stuffs. In our efforts to bring those little hacks and tips for you that makes you different from others, here we have came up with three little tricks. @@ -70,7 +72,7 @@ That’s all for now, if you know any such Linux hacks or tricks you may share w via: http://www.tecmint.com/useful-linux-hacks-commands/ 作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[goreliu](https://github.com/goreliu) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 55687763593a0429a8780aca729735d504226797 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Fri, 29 May 2015 16:41:40 +0800 Subject: [PATCH 1001/2517] [Translated] 20150527 3 Useful Hacks Every Linux User Must Know.md --- ...Useful Hacks Every Linux User Must Know.md | 81 ------------------- ...Useful Hacks Every Linux User Must Know.md | 78 ++++++++++++++++++ 2 files changed, 78 insertions(+), 81 deletions(-) delete mode 100644 sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md create mode 100644 translated/tech/20150527 3 Useful Hacks Every Linux User Must Know.md diff --git a/sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md b/sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md deleted file mode 100644 index 0107840a1b..0000000000 --- a/sources/tech/20150527 3 Useful Hacks Every Linux User Must Know.md +++ /dev/null @@ -1,81 +0,0 @@ -Translating by goreliu ... - -3 Useful Hacks Every Linux User Must Know -================================================================================ -The world of Linux is filled with so much fun and interesting stuffs, the more we go in, the more we find stuffs. In our efforts to bring those little hacks and tips for you that makes you different from others, here we have came up with three little tricks. - -### 1. How to Schedule a Linux Job Without Cron ### - -Scheduling a job/command in Linux is acronym to cron. Whenever we need to schedule a job, we call cron, but do you know we can schedule a job at a later time without corn? You can do it as suggested below.. - -Run a command (say date) every 5 sec and write the output to a file (say date.txt). To achieve this scenario, we need to run the below one liner script directly on the command prompt. - - $ while true; do date >> date.txt ; sleep 5 ; done & - -Anatomy of the above one liner script: - -- while true – Ask script to run while the condition is true, it acts as a loop which makes the command to run again-and-again or say in a loop. -- do – do perform what follows, ie., execute command or set of commands that lies ahead of do statement. -- date >> date.txt – here the output of date command is being written to a file date.txt. Also note that we have used >> and not >. -- >> ensures that the file (date.txt) is not overwritten every time the script execute. It just append the changes. Whereas > overwrite the file again and again. -- sleep 5 – It ask the shell to keep a time difference of 5 seconds before it executed again. Note the time here is always measured in seconds. Say if you want to execute the command every 6 minutes, you should use (6*60) 360, in succession of sleep. -- done – marks the end of while loop. -- & – Put the whole process in loop to background. - -Similarly, we can execute any script in the same manner. Here is the command to call a script after certain interval (say 100 sec) and the name of script is `script_name.sh`. - -Also worth mentioning that the script above should be run in the directory where the script to be called lies, else you need to provide full path (`/home/$USER/…/script_name.sh`). The syntax for calling script at above described interval is: - - $ while true; do /bin/sh script_name.sh ; sleep 100 ; done & - -**Conclusion**: The above one liner is not a replacement of Cron, because Cron utility supports a whole lots of options, as compared and is very flexible as well as customizable. However if we want to run certain test cases or I/O benchmark, then the above singe command will serve the purpose. - -Read Also: [11 Linux Cron Job Scheduling Examples][1] - -### 2. How to Clear Terminal without Using ‘clear’ Command ### - -What we do to clear the screen? Well you may think how silly it is to ask such question. Well, we all know it’s ‘clear‘ command. However if we make a habit of using key combination ‘ctrl+l‘ to clear terminal, we will save a lot of time of ours. - -Key combination ‘Ctrl+l‘ has the same effect as ‘clear‘ command. So from next time use ctrl+l to clear your Linux Command Line Interface. - -**Conclusion**: Since ctrl+l is a key combination, so we can not use it inside a script. If we need to clear screen inside a shell script, call command ‘clear’, for all other cases I could think of now, ctrl+l is more than sufficient. - -### 3. Run a command and come back to the current working directory automatically. ### - -Well this is an amazing hack not many people know. You may run a command no matter what it return back to the current directory. All you need to do is to run the command in parentheses i.e., in between `( and )`. - -Let see the example, - - avi@deb:~$ (cd /home/avi/Downloads/) - -#### Sample Output #### - - avi@deb:~ - -First it cd to directory Downloads and then again return back to home directory in one go. May be you believe that the command didn’t executed and for some reason one or another it is not throwing error, since there is no change in prompt. Lets do a little more tweak.. - - avi@deb:~$ (cd /home/avi/Downloads/ && ls -l) - -#### Sample Output #### - - -rw-r----- 1 avi avi 54272 May 3 18:37 text1.txt - -rw-r----- 1 avi avi 54272 May 3 18:37 text2.txt - -rw-r----- 1 avi avi 54272 May 3 18:37 text3.txt - avi@deb:~$ - -So in the above command it first changed the current directory to Downloads and then list the content of that directory before returning back to current directory. Also, it proves that command executed successfully. You may run any sort of command in the parentheses and return back to your current working directory without a hitch. - -That’s all for now, if you know any such Linux hacks or tricks you may share with us via our comment section and don’t forget to share this article with your friends…. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/useful-linux-hacks-commands/ - -作者:[Avishek Kumar][a] -译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ \ No newline at end of file diff --git a/translated/tech/20150527 3 Useful Hacks Every Linux User Must Know.md b/translated/tech/20150527 3 Useful Hacks Every Linux User Must Know.md new file mode 100644 index 0000000000..25c1ef3e3d --- /dev/null +++ b/translated/tech/20150527 3 Useful Hacks Every Linux User Must Know.md @@ -0,0 +1,78 @@ +每个Linux用户都应该知道的3个有用技巧 +================================================================================ +Linux世界充满了乐趣,我们越深入进去,就会发现越多有趣的事物。我们会努力给你提供一些小技巧,让你和其他人有所不同,下面就是我们准备的3个小技巧。 + +### 1. 如何在不使用Cron的情况调度Linux下的作业 ### +在Linux下,调度一个作业/命令可以缩写为Cron。当我们需要调度一个作业时,我们会使用Cron,但你知道我们在不使用Cron的情况也可以调度一个在将来时间运行的作业吗?你可以按照如下建议操作…… + +每5秒钟运行一个命令(date)然后将结果写入到一个文件(data.txt)。为了实现这一点,我们可以直接在命令提示符运行如下单行脚本。 + + $ while true; do date >> date.txt ; sleep 5 ; done & + +上述脚本的解释: + +- `while true` :让脚本进入一个条件总为真的循环中,也就是制造一个死循环,将里边的命令一遍遍地重复运行。 +- `do` :`do`是`while`语句中的关键字,它之后的命令会被执行,在它后边可以放置一个或一系列命令。 +- `date >> date.txt` :运行date命令,并将其输出写入到data.txt文件中。注意我们使用`>>`,而不是`>`。 +- `>>` :对文件(date.txt)进行追加写的操作,这样每次运行命令后,输出内容会被追加到文件中。如果使用`>`的话,则会一遍遍地覆盖之前的内容。 +- `sleep 5` :让脚本处于5秒睡眠状态,然后再运行之后的命令。注意这里的时间单位只能用秒。也就是说如果你想让命令每6分钟运行一次,你应该使用`sleep 360`。 +- `done` :`while`循环语句块结束的标记。 +- `&` :将整个进程放到后台运行。 + +类似地,我们可以这样运行任何脚本。下边的例子是每100秒运行一个名为`script_name.sh`的脚本。 + +另外值得一提的是上边的脚本文件必须处于当前目录中,否则需要使用完整路径(`/home/$USER/…/script_name.sh`)。实现如上功能的单行脚本如下: + + $ while true; do /bin/sh script_name.sh ; sleep 100 ; done & + +**总结**:上述的单行脚本并不是Cron的替代品,因为Cron工具支持众多选项,更加灵活,可定制性也更高。然而如果我们想运行某些测试,比如I/O评测,上述的单行脚本也管用。 + +还可以参考:[11 Linux Cron Job Scheduling Examples][1] + +### 2. 如何不使用clear命令清空终端的内容 ### + +你如何清空终端的内容?你可能会认为这是一个傻问题。好吧,大家都清楚可以使用`clear`命令。如果养成使用`ctrl + l`快捷键的习惯,我们会节省大量时间。 + +`Ctrl + l`快捷键的效果和`clear`命令一样。所以下一次你就可以使用`ctrl + l`来清空终端的内容了。 + +**总结**:因为`ctrl + l`是一个快捷键,我们不可以在脚本中使用。所以如果我们需要在脚本中清空屏幕内容,还是需要使用`clear`命令。但我能想到的所有其他情况,`ctrl + l`都更加有效。 + +### 3. 运行一个命令,然后自动回到当前的工作目录 ### + +这是一个很多人可能不知道的令人吃惊的技巧。你可能想运行任何一个命令,然后再回到当前目录。你只需要将命令放在一个圆括号里。 + +我们来看一个例子: + + avi@deb:~$ (cd /home/avi/Downloads/) + +#### 示例输出 #### + + avi@deb:~ + +它首先会cd到Downloads目录,然后又回到了之前的家目录。也许你认为里边的命令根本没有执行,或者是出了某种错误,因为从命令提示符看不出任何变化。让我们简单修改一下这个命令: + + avi@deb:~$ (cd /home/avi/Downloads/ && ls -l) + +#### 示例输出 #### + + -rw-r----- 1 avi avi 54272 May 3 18:37 text1.txt + -rw-r----- 1 avi avi 54272 May 3 18:37 text2.txt + -rw-r----- 1 avi avi 54272 May 3 18:37 text3.txt + avi@deb:~$ + +在上述命令中,它首先进入Downloads目录,然后列出文件内容,最后又回到了当前目录。并且它证明了命令成功执行了。你可以在括号中包含任何命令,执行完都会顺利返回到当前目录。 + +这就是全部内容了,如果你知道任何类似的Linux技巧,你可以在文章下面的评论框中分享给我们,不要忘记将本文和朋友分享 :) + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/useful-linux-hacks-commands/ + +作者:[Avishek Kumar][a] +译者:[goreliu](https://github.com/goreliu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ \ No newline at end of file From 001753bb0afc2a3eaeb1bfab83e1e0f006754213 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Fri, 29 May 2015 17:05:00 +0800 Subject: [PATCH 1002/2517] [Translating] 20150528 11 pointless but awesome Linux terminal tricks.md --- ...20150528 11 pointless but awesome Linux terminal tricks.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md b/sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md index 731f28df10..74baa5fb5b 100644 --- a/sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md +++ b/sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md @@ -1,3 +1,5 @@ +Translating by goreliu ... + 11 pointless but awesome Linux terminal tricks ================================================================================ Here are some great Linux terminal tips and tricks, each one as pointless as it is awesome. @@ -95,7 +97,7 @@ Want your terminal to do that scrolling text, l33t, Matrix-y thing? "cmatrix" is via: http://www.networkworld.com/article/2926630/linux/11-pointless-but-awesome-linux-terminal-tricks.html 作者:[Bryan Lunduke][a] -译者:[译者ID](https://github.com/译者ID) +译者:[goreliu](https://github.com/goreliu) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 1bcacc03f439f78d08a9dab84bf6c7d57e70818b Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 29 May 2015 18:07:42 +0800 Subject: [PATCH 1003/2517] Translating by ZTinoZ --- ...0150526 20 Useful Terminal Emulators for Linux.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 9103f53b4d..d3f974bd05 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -1,11 +1,11 @@ Translating by ZTinoZ 20款优秀的Linux终端仿真器 ================================================================================ -终端仿真器是一款计算机程序A Terminal emulator is a computer program that reproduces a video terminal within some other display structure. In other words the Terminal emulator has an ability to make a dumb machine appear like a client computer networked to the server. The terminal emulator allows an end user to access console as well as its applications such as text user interface and command line interface. +终端仿真器是一款用其它显示结构重现可视终端的计算机程序。换句话说就是终端仿真器能使哑终端看似像一台客户机连接上了服务器。终端仿真器允许最终用户像文本用户界面和命令行界面一样连接控制台和应用程序。 ![Linux Terminal Emulators](http://www.tecmint.com/wp-content/uploads/2014/01/Linux-Terminal-Emulators1.jpeg) -20 Linux Terminal Emulators +20款Linux终端仿真器 You may find huge number of terminal emulators to choose from this open source world. Some of them offers large range of features while others offers less features. To give a better understanding to the quality of software that are available, we have gathered a list of marvelous terminal emulator for Linux. Each title provides its description and feature along with screenshot of the software with relevant download link. @@ -13,7 +13,7 @@ You may find huge number of terminal emulators to choose from this open source w Terminator is an advanced and powerful terminal emulator which supports multiple terminals windows. This emulator is fully customizable. You can change the size, colour, give different shapes to the terminal. Its very user friendly and fun to use. -#### Features of Terminator #### +#### Terminator的特性 #### - Customize your profiles and colour schemes, set the size to fit your needs. - Use plugins to get even more functionality. @@ -31,7 +31,7 @@ Terminator Terminal Tilda is a stylish drop-down terminal based on GTK+. With the help of a single key press you can launch a new or hide Tilda window. However, you can add colors of your choice to change the look of the text and Terminal background. -#### Features of Tilda #### +#### Tilda的特性 #### Interface with Highly customization option. You can set the transparency level for Tilda window. @@ -61,7 +61,7 @@ Yakuake (Yet Another Kuake) is a KDE based drop-down terminal emulator very much Yakuake is basically a KDE application, which can be easily installed on KDE desktop, but if you try to install Yakuake in GNOME desktop, it will prompt you to install huge number of dependency packages. -#### Yakuake Features #### +#### Yakuake的特性 #### - Fluently turn down from the top of your screen - Tabbed interface @@ -164,7 +164,7 @@ TermKit Terminal - [TermKit Homepage][12] -12. st +### 12. st ### st is a simple terminal implementation for X Window. From 7eda3a3ef805e70890da5efbc4cc15d180457a5f Mon Sep 17 00:00:00 2001 From: sevenot Date: Fri, 29 May 2015 22:03:45 +0800 Subject: [PATCH 1004/2517] sevenot translating --- ...Material Design Inspired GTK And Icon Theme Paper in Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md b/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md index 33aa731843..105332bb07 100644 --- a/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md +++ b/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md @@ -1,3 +1,4 @@ +sevenot translating Install Google’s Material Design Inspired GTK And Icon Theme Paper in Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Paper_theme_Material_Design.jpg) From a6f570d80a49be8fa4534550899dd6cd8bb3c7bd Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 30 May 2015 10:09:31 +0800 Subject: [PATCH 1005/2517] translating --- ...sses or Unresponsive Applications Using 'xkill' Command.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md b/sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md index ebbfe264bc..2448e7ef26 100644 --- a/sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md +++ b/sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md @@ -1,3 +1,5 @@ +translating---geekpi + How to Kill Linux Processes/Unresponsive Applications Using ‘xkill’ Command ================================================================================ How do we kill a resource/process in Linux? Obviously we find the PID of the resource and then pass the PID to the kill command. @@ -89,4 +91,4 @@ via: http://www.tecmint.com/kill-processes-unresponsive-programs-in-ubuntu/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ \ No newline at end of file +[1]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ From a59590989e1842bb29cf88a38d29b2f8c7b5d84f Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 30 May 2015 10:51:17 +0800 Subject: [PATCH 1006/2517] translated --- ...sive Applications Using 'xkill' Command.md | 94 ------------------- ...sive Applications Using 'xkill' Command.md | 93 ++++++++++++++++++ 2 files changed, 93 insertions(+), 94 deletions(-) delete mode 100644 sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md create mode 100644 translated/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md diff --git a/sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md b/sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md deleted file mode 100644 index 2448e7ef26..0000000000 --- a/sources/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md +++ /dev/null @@ -1,94 +0,0 @@ -translating---geekpi - -How to Kill Linux Processes/Unresponsive Applications Using ‘xkill’ Command -================================================================================ -How do we kill a resource/process in Linux? Obviously we find the PID of the resource and then pass the PID to the kill command. - -Speaking more accurately, we can find PID of a resource (say terminal) as: - - $ ps -A | grep -i terminal - - 6228 ? 00:00:00 gnome-terminal - -In the above output, the number ‘6228‘ is the PID of process (gnome-terminal), use the kill command to kill the process as shown below. - - $ kill 6228 - -The kill command sends a signal to a process, whose PID is passed along with the command. - -Alternatively, we can use pkill command, which kills a process based upon name and other attributes of a process. To kill a process say whose name is terminal, we need to execute: - - $ pkill terminal - -**Note**: The process name length in pkill is limited to 15 characters. - -pkill seems more handy as you can kill a process without have to find out its PID. But if you want to have a better control on your system nothing beats ‘kill‘ command. Using kill you will have better insight of what process you are killing. - -We have already covered a detailed guide on [kill, pkill and killall commands][1]. - -For those who are running X server there is another tool called xkill which can kill a process from its X window without passing process name or its PID. - -xkill utility forces X server to close communications to its client which results into killing of client by its X resource. xkill which is a part of X11 utilities is very handy in killing unnecessary windows. - -It support options like connect to specific X Server (-display displayname) using display number when multiple X Servers are running on a host simultaneously and kill all the client (-all, not recommended) with top-level windows on the screen as well as take frame (-frame) into account. - -To get a list of all the clients you may run: - - $ xlsclients - -#### Sample Output #### - - ' ' /usr/lib/libreoffice/program/soffice - deb gnome-shell - deb Docky - deb google-chrome-stable - deb soffice - deb gnome-settings-daemon - deb gnome-terminal-server - -If no resource identifier is passed with id, xkill turns the mouse Pointer into special Symbol, similar to ‘X‘. Just click on the window you want to kill and this will kill its communication with server or say the program gets killed. - - $ xkill - -![Xkill Command](http://www.tecmint.com/wp-content/uploads/2015/05/Xkill.png) - -Kill Process Using xkill - -It is important to notice that xkill do not guarantee that closing its communication will kill/abort it successfully. Most of the application will get killed when it’s communication to server is closed. However a few may still be running. - -Points Needed to be mentioned here: - -- This tool works only when X11 server is running, as xkill is a part of X11 utility. -- Don’t confuse with Closing and killing a resource. While killing a resource you may expect it not to exit cleanly. -- This is not a replacement of kill utility. - -**Do I need to go to Linux command line to invoke xkill?** - -No, you don’t need to fire xkill from Linux Command Line. You may set a keyboard shortcut and call xkill just by punching same key combination. - -Here is how to setup a keyboard shortcut on a typical gnome3 Desktop Environment. - -Go to Settings –> Select Keyboard, click on ‘+’ and add name and command. Click on the new entry and press the key you want to use as shortcut key combination. I did Ctrl+Alt+Shift+x. - -![Gnome Settings](http://www.tecmint.com/wp-content/uploads/2015/05/22.png) - -Gnome Settings - -![Add Shortcut Key](http://www.tecmint.com/wp-content/uploads/2015/05/31.png) - -Add Shortcut Key - -The next time you want to kill a X resource just call the key combination (Ctrl+Alt+Shift+x), and you will notice your mouse pointer changed into x. Click on x resource you want to kill and all done! - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/kill-processes-unresponsive-programs-in-ubuntu/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ diff --git a/translated/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md b/translated/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md new file mode 100644 index 0000000000..20211ab6bf --- /dev/null +++ b/translated/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md @@ -0,0 +1,93 @@ +如何使用xkill命令傻点Linux进程/未响应的程序 +================================================================================ +我们如何在Linux中杀掉一个资源/进程?很明显我们会找出资源的pid然后用kill命令。 + +更准确一点,我们可以找到资源(这里就是terminal)的PID: + + $ ps -A | grep -i terminal + + 6228 ? 00:00:00 gnome-terminal + +上面的输出中,‘6288’就是进程(gnome-terminal)的pid, 使用下面的命令来杀掉进程。 + + $ kill 6228 + +kill命令会发送一个信号给该pid的进程。 + +另外一个方法是我们可以使用pkill命令,它可以基于进程的名字或者其他的属性来杀掉进程。同样我们要杀掉一个叫terminal的进程可以这么做: + + $ pkill terminal + +**注意**: pkill命令后面进程名的长度不大于15个字符 + +pkill看上去更加容易上手,因为你你不用找出进程的pid。但是如果你要对系统做更好的控制,那么没有什么可以打败'kill'。使用kill命令可以更好地审视你要杀掉的进程。 + +我们已经有一篇覆盖了[kill、pkill和killall命令][1]间细节的指导了。 + +对于那些运行X Server的人而言,有另外一个工具称为xkill可以将进程从X Window中杀掉而不必传递它的名字或者pid。 + +xkill工具强制X server关闭于它客户端之间的联系,这可以让X resource关闭这个客户端。xkill是X11工具集中一个非常容易上手的杀掉无用窗口的工具。 + +它支持的选项如在同时运行多个X Server时使用-display选项后面跟上显示号连接到指定的X server,使用-all(并不建议)杀掉所有在屏幕上的所遇顶层窗口,同时将帧(-frame)也计算在内。 + +要得到所有的客户端你可以运行: + + $ xlsclients + +#### 示例输出 #### + + ' ' /usr/lib/libreoffice/program/soffice + deb gnome-shell + deb Docky + deb google-chrome-stable + deb soffice + deb gnome-settings-daemon + deb gnome-terminal-server + +如果后面没有跟上资源id,xkill会将鼠标指针变成一个特殊符号,类似于“X”。只需在你要杀掉的窗口上点击,它就会杀掉它与server端的通信,这个程序就被杀掉了。 + + + $ xkill + +![Xkill Command](http://www.tecmint.com/wp-content/uploads/2015/05/Xkill.png) + +使用xkill杀掉进程 + +需要注意的是xkill并不能保证它的通信会被成功杀掉/退出。大多数程序会在与服务端的通信被关闭后杀掉。然而仍有少部分会继续运行。 + +需要指出的点是: + +- 这个工具只能在X11 server运行的时候才能使用,因为这是X11工具的一部分。 +- 不要在你杀掉一个资源而它没有完全退出时而困惑。 +- 这不是kill的替代品 + +**我需要在linux命令行中使用xkill么** + +不是,你不必在命令行中运行xkill。你可以设置一个快捷键,并用它来调用xkill。 + +下面是如何在典型的gnome3桌面中设置键盘快捷键。 + +进入设置-> 选择键盘。点击'+'并添加一个名字和命令。点击点击新条目并按下你想要的组合键。我的是Ctrl+Alt+Shift+x。 + +![Gnome Settings](http://www.tecmint.com/wp-content/uploads/2015/05/22.png) + +Gnome 设置 + +![Add Shortcut Key](http://www.tecmint.com/wp-content/uploads/2015/05/31.png) + +添加快捷键 + +下次你要杀掉X资源只要用组合键就行了(Ctrl+Alt+Shift+x),你看到你的鼠标变成x了。点击想要杀掉的x资源就行了。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/kill-processes-unresponsive-programs-in-ubuntu/ + +作者:[Avishek Kumar][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ From e6282faa6b89a9a474a5320bd70fe1182fa1ac74 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 30 May 2015 22:06:27 +0800 Subject: [PATCH 1007/2517] =?UTF-8?q?Update=2020150515=20Install=20'Tails?= =?UTF-8?q?=201.4=E2=80=B2=20Linux=20Operating=20System=20to=20Preserve=20?= =?UTF-8?q?Privacy=20and=20Anonymity.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Linux Operating System to Preserve Privacy and Anonymity.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md b/sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md index 8d0d5ccbdf..5731cd69f4 100644 --- a/sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md +++ b/sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md @@ -1,3 +1,5 @@ +FSSlc translating + Install ‘Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity ================================================================================ In this Internet world and the world of Internet we perform most of our task online be it Ticket booking, Money transfer, Studies, Business, Entertainment, Social Networking and what not. We spend a major part of our time online daily. It has been getting hard to remain anonymous with each passing day specially when backdoors are being planted by organizations like NSA (National Security Agency) who are putting their nose in between every thing that we come across online. We have least or no privacy online. All the searches are logged upon the basis of user Internet surfing activity and machine activity. @@ -176,4 +178,4 @@ via: http://www.tecmint.com/install-tails-1-4-linux-operating-system-to-preserve [5]:https://tails.boum.org/download/index.en.html#verify [6]:http://www.tecmint.com/install-linux-from-usb-device/ [7]:https://tails.boum.org/doc/index.en.html -[8]:http://www.tecmint.com/install-virtualbox-on-redhat-centos-fedora/ \ No newline at end of file +[8]:http://www.tecmint.com/install-virtualbox-on-redhat-centos-fedora/ From 866eb2c6b7e32d40037f6205ee276406acddb2d0 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 30 May 2015 22:27:40 +0800 Subject: [PATCH 1008/2517] PUB:20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files @FSSlc --- ...o Analyze Disk Images and Recover Files.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md (80%) diff --git a/translated/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md b/published/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md similarity index 80% rename from translated/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md rename to published/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md index e86a8f3c10..ba4da99105 100644 --- a/translated/tech/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md +++ b/published/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md @@ -1,8 +1,8 @@ -Sleuth Kit -- 一个用来分析磁盘映像和恢复文件的开源取证工具 +Sleuth Kit:一个用来分析磁盘映像和恢复文件的开源取证工具 ================================================================================ -SIFT 是一个由 SANS 公司提供的基于 Ubuntu 的取证发行版本。它包含许多取证工具,如 Sleuth kit/Autopsy 。但 Sleuth kit / Autopsy 可以直接在 Ubuntu 或 Fedora 发行版本上直接安装,而不必下载 SIFT 的整个发行版本。 +SIFT 是一个由 SANS 公司提供的基于 Ubuntu 的取证发行版。它包含许多取证工具,如 Sleuth kit/Autopsy 。但 Sleuth kit/Autopsy 可以直接在 Ubuntu 或 Fedora 发行版本上直接安装,而不必下载 SIFT 的整个发行版本。 -Sleuth Kit/Autopsy 是一个开源的电子取证调查工具,它被用于从磁盘映像中恢复丢失的文件,基于事件响应的磁盘映像的分析。 Autopsy 工具是 sleuth kit 的一个网页接口,支持 sleuth kit 的所有功能。这个工具在 Windows 和 Linux 平台下都可获取到。 +Sleuth Kit/Autopsy 是一个开源的电子取证调查工具,它可以用于从磁盘映像中恢复丢失的文件,以及为了特殊事件进行磁盘映像分析。 Autopsy 工具是 sleuth kit 的一个网页接口,支持 sleuth kit 的所有功能。这个工具在 Windows 和 Linux 平台下都可获取到。 ### 安装 Sleuth kit ### @@ -38,7 +38,7 @@ Sleuth Kit/Autopsy 是一个开源的电子取证调查工具,它被用于从 ### 安装 Autopsy 工具 ### -Sleuth kit 已经安装完毕,现在我们将为它安装 autopsy 界面。从 [sleuthkit 的 autopsy 页面][2] 下载 Autopsy 软件。使用下面的命令在虚拟终端下使用 wget 命令来下载它,下图展示了这个过程。 +Sleuth kit 已经安装完毕,现在我们将为它安装 autopsy 界面。从 [sleuthkit 的 autopsy 页面][2]下载 Autopsy 软件。使用下面的命令在虚拟终端下使用 wget 命令来下载它,下图展示了这个过程。 # wget http://kaz.dl.sourceforge.net/project/autopsy/autopsy/2.24/autopsy-2.24.tar.gz @@ -70,7 +70,7 @@ autopsy 的配置脚本将询问 NSRL (National Software Reference Library) 和 ![Autopsy](http://blog.linoxide.com/wp-content/uploads/2015/03/autopsy-started.png) -在浏览器中键入下面的地址来获取 autopsy 的界面: +在浏览器中键入下面的地址来访问 autopsy 的界面: http://localhost:9999/autopsy @@ -90,7 +90,7 @@ autopsy 的配置脚本将询问 NSRL (National Software Reference Library) 和 ![添加主机的详细信息](http://blog.linoxide.com/wp-content/uploads/2015/03/add-host-detial.png) -点击 **增加映像** 按钮来为取证分析添加映像文件。 +添加主机后,点击 **增加映像** 按钮来为取证分析添加映像文件。 ![添加映像](http://blog.linoxide.com/wp-content/uploads/2015/03/add-image.png) @@ -98,11 +98,11 @@ autopsy 的配置脚本将询问 NSRL (National Software Reference Library) 和 ![添加映像文件](http://blog.linoxide.com/wp-content/uploads/2015/03/Add-image-file.png) -正如下图中展示的那样,我们已经键入了 Linux 映像文件的路径。在我们这个例子中,映像文件是磁盘的分区。 +正如下图中展示的那样,我们已经键入了 Linux 映像文件的路径。在我们这个例子中,映像文件类型是磁盘分区。 ![添加映像分区](http://blog.linoxide.com/wp-content/uploads/2015/03/add-image-parition.png) -点击 下一步 按钮并在下一页中选择 **计算散列值** 的选项,这在下图中有展示。它也将检测所给映像的文件系统类型。 +点击“下一步”按钮并在下一页中选择 **计算散列值** 的选项,这在下图中有展示。它也将检测所给映像的文件系统类型。 ![映像和文件系统详情](http://blog.linoxide.com/wp-content/uploads/2015/03/image-and-file-system-detail.png) @@ -142,7 +142,7 @@ autopsy 的配置脚本将询问 NSRL (National Software Reference Library) 和 ### 结论 ### -希望这篇文章能够给那些进入磁盘映像的静态分析领域的新手提供帮助。Autopsy 是 sleuth kit 的网页界面,提供了在 Windows 和 Linux 磁盘映像中进行诸如字符串提取,恢复被删文件,时间线分析,网络浏览历史,关键字搜索和邮件分析等功能。 +希望这篇文章能够给那些进入磁盘映像静态分析领域的新手提供帮助。Autopsy 是 sleuth kit 的网页界面,提供了在 Windows 和 Linux 磁盘映像中进行诸如字符串提取,恢复被删文件,时间线分析,网络浏览历史,关键字搜索和邮件分析等功能。 -------------------------------------------------------------------------------- @@ -150,7 +150,7 @@ via: http://linoxide.com/ubuntu-how-to/autopsy-sleuth-kit-installation-ubuntu/ 作者:[nido][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 80190da704f19884d954dd4ae43cc7b11addb754 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 30 May 2015 22:54:55 +0800 Subject: [PATCH 1009/2517] PUB:20150326 How to set up server monitoring system with Monit @goreliu --- ... up server monitoring system with Monit.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150326 How to set up server monitoring system with Monit.md (88%) diff --git a/translated/tech/20150326 How to set up server monitoring system with Monit.md b/published/20150326 How to set up server monitoring system with Monit.md similarity index 88% rename from translated/tech/20150326 How to set up server monitoring system with Monit.md rename to published/20150326 How to set up server monitoring system with Monit.md index 5fbce3aa70..6886e83ef2 100755 --- a/translated/tech/20150326 How to set up server monitoring system with Monit.md +++ b/published/20150326 How to set up server monitoring system with Monit.md @@ -6,7 +6,7 @@ ### Monit是什么? ### -[Monit][3]是一个跨平台的用来监控Unix/linux系统(比如Linux、BSD、OSX、Solaris)的工具。Monit特别易于安装,而且非常轻量级(只有500KB大小),并且不依赖任何第三方程序、插件或者库。然而,Monit可以胜任全面监控、进程状态监控、文件系统变动监控、邮件通知和对核心服务的自定义回调等场景。易于安装、轻量级的实现以及强大的功能,让Monit成为一个理想的后备监控工具。 +[Monit][3]是一个跨平台的用来监控Unix/linux系统(比如Linux、BSD、OSX、Solaris)的工具。Monit特别易于安装,而且非常轻量级(只有500KB大小),并且不依赖任何第三方程序、插件或者库。然而,Monit可以胜任全面监控、进程状态监控、文件系统变动监控、邮件通知和对核心服务的自定义动作等场景。易于安装、轻量级的实现以及强大的功能,让Monit成为一个理想的后备监控工具。 我已经在一些机器使用Monit几年了,而且我对它的可靠性非常满意。甚至作为全面的监控系统,对任何Linux系统管理员来说Monit也是非常有用和强大的。在这篇教程中,我会展示如何在一个本地服务器部署Monit(作为后备监控系统)来监控常见的服务。在部署过程中,我只会展示我们用到的部分。 @@ -24,16 +24,16 @@ Fedora或者CentOS/RHEL: # yum install monit -Monit自带一个文档完善的配置文件,其中包含了很多例子。主配置文件在/etc/monit.conf(Fedora/CentOS/RHEL),或者/etc/monit/monitrc(Debian/Ubuntu/Mint)。Monit配置文件有两部分:“Global”(全局)和“Services”(服务)。 +Monit自带一个文档完善的配置文件,其中包含了很多例子。主配置文件在/etc/monit.conf(Fedora/CentOS/RHEL 中),或者/etc/monit/monitrc(Debian/Ubuntu/Mint 中)。Monit配置文件有两部分:“Global”(全局)和“Services”(服务)。 -### Global Configuration: Web Status Page (全局配置:Web状态页面。LCTT 译注:保留原文是因为和配置文件中的字段对应) ### +### Global Configuration: Web Status Page (全局配置:Web状态页面) ### -Monit可以使用邮件服务来发送通知,也可以使用HTTP/HTTPS页面来展示。我们先使用符合以下要求的web状态页面吧: +Monit可以使用邮件服务来发送通知,也可以使用HTTP/HTTPS页面来展示。我们先使用如下配置的web状态页面吧: - Monit监听1966端口。 - 对web状态页面的访问是通过SSL加密的。 - 使用monituser/romania作为用户名/口令登录。 -- 只允许使用localhost、myhost.mydomain.ro和在局域网内部(192.168.0.0/16)访问。 +- 只允许通过localhost、myhost.mydomain.ro和在局域网内部(192.168.0.0/16)访问。 - Monit使用pem格式的SSL证书。 之后的步骤,我会使用一个基于Red Hat的系统。在基于Debian的系统中的步骤也是类似的。 @@ -99,10 +99,10 @@ Monit可以使用邮件服务来发送通知,也可以使用HTTP/HTTPS页面 我们必须定义“idfile”,Monit守护进程的一个独一无二的ID文件;以及“eventqueue”,当monit的邮件因为SMTP或者网络故障发不出去,邮件会暂存在这里;以及确保/var/monit路径是存在的。然后使用下边的配置就可以了。 set idfile /var/monit/id - set eventqueue + set eventqueue basedir /var/monit -### 测试Global Configuration(全局配置) ### +### 测试全局配置 ### 现在“Global”部分就完成了。Monit配置文件看起来像这样: @@ -163,11 +163,11 @@ Monit可以使用邮件服务来发送通知,也可以使用HTTP/HTTPS页面 现在打开一个浏览器窗口,然后访问`https://:1966`。将``替换成Monit所在机器的机器名或者IP地址。 -如果你使用的是自签名的SSL证书,你会在浏览器中看到一个警告信息。 +如果你使用的是自签名的SSL证书,你会在浏览器中看到一个警告信息。继续访问即可。 ![](https://farm8.staticflickr.com/7596/16737206479_96b9f7dfdb_c.jpg) -你完成登录后,一定要看这个页面。 +你完成登录后,就会看到这个页面。 ![](https://farm8.staticflickr.com/7594/16303369973_6019482dea_c.jpg) @@ -209,7 +209,7 @@ Monit可以使用邮件服务来发送通知,也可以使用HTTP/HTTPS页面 if failed port 22 protocol ssh then restart if 5 restarts within 5 cycles then timeout -我们可以这样解释上述配置。我们检查是否存在名为sshd的进程,并且有一个保存pid的文件存在(/var/run/sshd.pid)。如果任何一个不存在,我们就使用启动脚本重启sshd。我们检查是否有进程在监听22端口,并且使用的是SSH协议。如果没有,我们还是重启sshd。如果在最近的5个监控周期(5x120秒)至少重启5次了,sshd就被认为是不能用的,我们就不再检查了。 +我们可以这样解释上述配置:我们检查是否存在名为sshd的进程,并且有一个保存其pid的文件存在(/var/run/sshd.pid)。如果任何一个不存在,我们就使用启动脚本重启sshd。我们检查是否有进程在监听22端口,并且使用的是SSH协议。如果没有,我们还是重启sshd。如果在最近的5个监控周期(5x120秒)至少重启5次了,sshd就被认为是不能用的,我们就不再检查了。 ![](https://farm9.staticflickr.com/8685/16735725998_62c26a24bc_c.jpg) @@ -236,7 +236,7 @@ via: http://xmodulo.com/server-monitoring-system-monit.html 作者:[Iulian Murgulet][a] 译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -244,7 +244,7 @@ via: http://xmodulo.com/server-monitoring-system-monit.html [1]:http://xmodulo.com/monitor-common-services-nagios.html [2]:http://xmodulo.com/monitor-linux-servers-snmp-cacti.html [3]:http://mmonit.com/monit/ -[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[4]:https://linux.cn/article-2324-1.html [5]:http://xmodulo.com/how-to-set-up-rpmforge-repoforge-repository-on-centos.html [6]:http://xmodulo.com/mail-server-ubuntu-debian.html [7]:http://mmonit.com/wiki/Monit/ConfigurationExamples \ No newline at end of file From 2ed75b5db2131ba061e9f384247773e4df774d57 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 31 May 2015 00:05:53 +0800 Subject: [PATCH 1010/2517] PUB:20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime @KayGuoWhu --- ...oid Apps on Ubuntu using ARChon Runtime.md | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md (79%) diff --git a/translated/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md b/published/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md similarity index 79% rename from translated/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md rename to published/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md index 4995eec9d1..4776f5c10d 100644 --- a/translated/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md +++ b/published/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md @@ -1,18 +1,19 @@ -使用ARChon环境在Ubuntu上运行Android应用 +使用 ARChon 运行时环境在 Ubuntu 上运行 Android 应用 ================================================================================ -在此之前,我们尝试过在多款安卓应用模拟器工具上运行安卓应用,比如Genymotion、VirtualBox和Android SDK等。但是,有了这套全新的Chrome安卓运行环境,就可以在Chrome浏览器中运行安卓应用了。所以,下面是一些步骤来指导如何使用ARChon运行环境在Ubuntu上安装安卓应用。 -谷歌已经公布了[首批支持原生运行在Chrome OS的安卓应用][1],而使用一个全新的“**安卓运行环境**”扩展程序使其成为可能。如今,一位名为Vlad Filippov的开发者已经找到了一种把安卓应用移植到桌面端Chrome浏览器的方法。他把chromeos-apk脚本和ARChon安卓运行环境扩展程序两者紧密结合在一起,使得安卓应用可以运行在Windows、Max和Linux系统的桌面端Chrome浏览器中。 +在此之前,我们尝试过在多款安卓应用模拟器工具上运行安卓应用,比如Genymotion、VirtualBox和Android SDK等。但是,有了这套全新的Chrome安卓运行环境,就可以在Chrome浏览器中运行安卓应用了。所以,下面是一些步骤来指导你如何使用ARChon运行时环境在Ubuntu上安装安卓应用。 -应用借助这种运行环境时的性能并不是很好。同样,由于它是官方运行环境的非官方二次开发包,而且运行在Google的Chrome OS之外,因此一些如webcam和speaker等系统集成工具可能需要通过打补丁获得或者根本就没有。 +谷歌已经公布了[首批支持原生运行在Chrome OS的安卓应用][1],而这个全新的“**安卓运行时环境**”扩展程序使其成为可能。如今,一位名为Vlad Filippov的开发者已经找到了一种把安卓应用移植到桌面端Chrome浏览器的方法。他把chromeos-apk脚本和ARChon安卓运行环境扩展程序两者紧密结合在一起,使得安卓应用可以运行在Windows、Max和Linux系统的桌面端Chrome浏览器中。 + +应用借助这种运行环境时的性能并不是很好。同样,由于它是官方运行环境的非官方二次开发包,而且运行在Google的Chrome OS之外,因此一些如摄像头和喇叭等系统内置设备可能需要通过打补丁获得或者根本不支持。 ### 安装Chrome ### 首先,需要在机器上安装Chrome,版本要求是Chrome 37或者更高。可以从[Chrome浏览器的下载页面][2]下载。 -如果打算安装Dev Channel版本,按照如下操作。 +如果打算安装开发通道版本,按照如下操作。 -首先,使用这个命令为Google Chrome添加软件源列表: +使用这个命令为Google Chrome添加软件源列表: $ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - $ sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' @@ -23,7 +24,8 @@ $ sudo apt-get update -现在,就可以安装非稳定版的google chrome,即开发版。 +现在,就可以安装非稳定版的google chrome,即开发版: + $ sudo apt-get install google-chrome-unstable ![Installing Google chrome unstable](http://blog.linoxide.com/wp-content/uploads/2015/02/installing-google-chrome-unstable.png) @@ -34,11 +36,11 @@ **32位** Ubntu发行版: -- [Download Archron for 32-bit Ubuntu][3] +- [下载 32 位版 Ubuntu 上的 Archron][3] **64位** Ubntu发行版: -- [Download Archron for 64-bit Ubuntu][4] +- [下载 64 位版 Ubuntu 上的 Archron][4] 下载好运行环境安装包后,从.zip文件中解压,并将解压得到的目录移动到Home目录。操作命令如下: @@ -48,11 +50,11 @@ $ unzip ARChon-v1.1-x86_32.zip ~/ -接下来是安装运行时环境,首先打开Google Chrome浏览器,在地址栏键入**chrome://extensions**。然后,选中“**开发者模式**”。最后,点击“**载入未打包扩展程序**”,选择刚才放置在**~/Home**下面的文件夹。 +接下来是安装运行时环境,首先打开Google Chrome浏览器,在地址栏键入**chrome://extensions**。然后,选中“**开发者模式**”。最后,点击“**载入未打包扩展程序**”,选择刚才放置在**~/Home**下面的文件夹。 ### 安装 ChromeOS-APK ### -如果要用到上面提到的应用,那么手动转换这些APKs无需复杂的操作——只需要安装“[chromeos-apk][5]”命令行JavaScript工具。可以在Node Package Modules(npm)管理器中安装它。为了安装npm和chromeos-apk,在shell或终端中运行下面命令: +如果要用到上面提到的那些应用,那么手动转换这些APK无需复杂的操作——只需要安装“[chromeos-apk][5]”命令行JavaScript工具。可以在Node Package Modules(npm)管理器中安装它。为了安装npm和chromeos-apk,在shell或终端中运行下面命令: $ sudo apt-get install npm nodejs nodejs-legacy @@ -86,7 +88,7 @@ ### 运行安卓Apk ### -最后,打开chrome浏览器,然后进入chrome://extensions页面,勾选开发者模式。点击“载入未打包扩展程序”按钮,选择文件夹载入刚创建的脚本。 +最后,打开chrome浏览器,然后进入chrome://extensions页面,勾选开发者模式。点击“载入未打包扩展程序”按钮,选择上面脚本刚创建的文件夹。 至此,就可以打开Chrome应用启动器运行安卓应用了。 @@ -100,7 +102,7 @@ via: http://linoxide.com/ubuntu-how-to/android-apps-ubuntu-archon-runtime/ 作者:[Arun Pyasi][a] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ae08bb24fcc6f3f6b9f3d13caea85cc4bf76c8a4 Mon Sep 17 00:00:00 2001 From: sevenot Date: Sun, 31 May 2015 02:15:20 +0800 Subject: [PATCH 1011/2517] sevenot translated --- ...pired GTK And Icon Theme Paper in Linux.md | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) rename {sources => translated}/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md (63%) diff --git a/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md b/translated/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md similarity index 63% rename from sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md rename to translated/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md index 105332bb07..4986ffadf8 100644 --- a/sources/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md +++ b/translated/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md @@ -1,54 +1,69 @@ -sevenot translating +sevenot translated Install Google’s Material Design Inspired GTK And Icon Theme Paper in Linux +来试试谷歌全新的设计语言Material Design和Linux下的图标主题Paper吧!灵感来源于图形工具包GTK。 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Paper_theme_Material_Design.jpg) [Paper][1] is a new upcoming GTK and icon theme inspired by Google’s [Material design][2] guidelines. It is developed by Sam Hewitt, the man behind [Moka Project][3]. Moka has always been in the list of [best themes for Ubuntu][4] and looking at Paper, I can say that once it is developed completely, it will surely be listed as one of the [best GTK themes][5]. +Paper是一款即将与广大朋友们见面的一个图形工具包和图标主题,它的设计灵感来自于谷歌的设计语言Material design。Paper由Sam Hewitt发起,Sam是Moka项目的一员,Moka总会设计出让人满意的Ubuntu主题。对于Paper,我敢说只要它一经推出,它必将是最好的主题开发包之一。 Yes, you heard it right. The theme is still under development. Therefore I suggest that if you want to install Paper theme in Ubuntu or any other Linux distributions, do it only for experimentation purpose. You may see some broken icons here and there but the over all experience is nice. +对的,你没有听错,Paper主题还在开发阶段。因此我建议,如果你想在你的Ubuntu或者它的衍生版本上安装Paper,最好抱着试一试的实验心态。因为你多多少少会发现一些破损的图标,但这并不影响整个实验的运行。 ### Install Paper theme in Ubuntu based distributions via PPA ### - +通过PPA在Ubuntu及其衍生版本上安装Paper主题 Sam has a dedicated PPA for Ubuntu based distributions. I recommend that you use this PPA instead of downloading the theme because you’ll be getting the updates on the themes regularly. This PPA is available for Ubuntu 15.04, Ubuntu 14.10, Ubuntu 14.04, Elementary OS Freya, Elementary OS Luna, Linux Mint 17, Linux Mint 16 and other Linux distributions based on Ubuntu. +Sam为Ubuntu和它的衍生版本设置了一个专用的PPA(PresonalPackgeArchives,个人软件包档案)。我会介绍通过PPA安装而不是下载Paper主题,因为你将会定期更新主题。这个PPA可供使用的系统有Ubuntu 15.04, Ubuntu 14.10, Ubuntu 14.04, Elementary OS Freya, Elementary OS Luna, Linux Mint 17, Linux Mint 16 和其它的Ubuntu衍生版本。 Open a terminal and use the following commands: - +打开终端,输入下列命令: sudo add-apt-repository ppa:snwh/pulp sudo apt-get update sudo apt-get install paper-gtk-theme paper-icon-theme ### Download Paper GTK and icon theme ### +下载Paper图形工具包和图标主题 If you do not want to use the PPA, you can download the themes and icons manually. As I said previously, you won’t get the updates automatically this way. +如果你不想用PPA,你可以手动下载主题和图标。但是就像刚才所说,这样你就无法自动更新。 - [Download Paper icon themes][6] - [Download Paper GTK themes][7] - +下载Paper图标主题 +下载Paper的GTK工具包 #### Using Paper themes and icons #### - +把它们用起来吧 I hope that you know how to change or install themes in your respective Linux distributions. If you are not unaware of it, below are few tutorials that could help you to install new themes: - +我希望你知道怎么在你的Ubuntu中安装或者更改主题。如果你不知道,下面几个教程将帮助你安装一个新的主题。 - [How to change themes in Ubuntu Unity][8] - [How to change themes in GNOME Shell][9] - [How to change themes in Linux Mint][10] - [How to change theme in Elementary OS Freya][11] +如何在标准Ubuntu中更改主题 +如何在GNOME桌面的Ubuntu中更改主题 +如何在Ubuntu Mint中更改主题 +如何在Elementary OS Freya中更改主题 #### Here is what Paper theme looks like #### +就是这样! Since I am using [Elementary OS Freya][12] these days, here are some of the screenshots of how Paper theme and icons look like in Elementary OS Freya. I have used a wallpaper with Material design look so that it blends well with the icon and themes. +自从我开始用Elementary OS Freya以来,这里就存有一些Paper主题和图标的截图。我用了Material Design做了一个桌面,这样可以更好的兼容主题和图标。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Material_Design_Paper_Theme_Elementary_OS_Freya_1.jpeg) ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Material_Design_Paper_Theme_Elementary_OS_Freya.jpeg) How do you find this Material design inspired theme? If you did use it, do share the screenshot of your desktop with rest of us here. +你的Material design 设计灵感是什么呢?如果你在使用Material design ,在评论里和我们分享你的桌面截图吧! + -------------------------------------------------------------------------------- via: http://itsfoss.com/install-paper-theme-linux/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) +译者:[sevenot](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -65,4 +80,4 @@ via: http://itsfoss.com/install-paper-theme-linux/ [9]:http://itsfoss.com/install-switch-themes-gnome-shell/ [10]:http://itsfoss.com/install-icon-linux-mint/ [11]:http://itsfoss.com/install-themes-icons-elementary-os-freya/ -[12]:http://itsfoss.com/tag/elementary-os-freya/ \ No newline at end of file +[12]:http://itsfoss.com/tag/elementary-os-freya/ From 198d72f0ae3439131c8d311356b10bffdbe61f4a Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Sun, 31 May 2015 15:42:36 +0800 Subject: [PATCH 1012/2517] finish translation of one article --- ... Custom Linux Distribution From Scratch.md | 65 ------------------- ... Custom Linux Distribution From Scratch.md | 65 +++++++++++++++++++ 2 files changed, 65 insertions(+), 65 deletions(-) delete mode 100644 sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md create mode 100644 translated/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md diff --git a/sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md b/sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md deleted file mode 100644 index 9bf07333ea..0000000000 --- a/sources/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md +++ /dev/null @@ -1,65 +0,0 @@ -How to Develop Own Custom Linux Distribution From Scratch -================================================================================ -Have you ever thought of making your own Linux Distribution? Every Linux user in their journey to Linux thought of making their own Linux distribution, at-least once. Even I was not an exception as a newbie to Linux land and have given my considerable time developing my own Linux Distribution. Developing a Linux Distribution from scratch is called Linux From Scratch (LFS) - -Before starting, I concluded a few things about LFS which can be described as: - -### 1. Those who want to develop their own Linux Distribution should understand the difference between Developing a Linux distribution from scratch (by scratch means starting from the beginning) or all you want is just to tweak an already available Linux Distro. ### - -If you just want to tweak flash screen, customize login and preferably work on the look and feel of Linux OS, you can choose any fair Linux Distribution and customize it the way you want. Moreover a lots of tweaking tools there will help. - -If you want to put all the necessary files and boot-loaders and kernel and choose what to include and what not to include and then compile everything yourselves you need to develop Linux From Scratch (LFS). - -**Note**: If you just want to customize the look and feel of a Linux OS, this guide is not for you. If you really want to develop a Linux distribution from scratch and want to know where to start and other basic information, here is the guide for you. - -### 2. Pros of Developing own Linux Distribution (LFS): ### - -- You get to know the internal working of Linux OS. -- You develop a very flexible OS as per your need. -- Your developed OS (LFS) will be very compact as you have full control over what to include/exclude. -- You Development (LFS) will have added security. - -### 3. Cons of Developing own Linux Distribution (LFS): ### - -Developing a Linux OS from scratch means putting all the necessary things together and compile. This requires a lot of reading, patience and time. Also you should have a working Linux System to develop LFS and fairly enough disk space. - -### 4. Interesting to know, that Gentoo/GNU Linux is closest to LFS to certain extent. Both Gentoo and LFS is the customized Linux System built entirely out from compilation of Source. ### - -### 5. You should be experienced Linux user having good knowledge of package compilation, resolving dependencies, and pro in shell scripting language. Knowledge of a programming language (Preferably C) will ease things for you. Even if you are a newbie but a good learner and grasp the things quickly, you may start as well. The most important part is you should not loose your enthusiasm throughout the process of LFS development. ### - -If you are not determined enough, I fear you may leave building your LFS in the middle. - -### 6. Now you need a step-by-step guide, So that Linux can be developed from scratch. LFS is the official guide to develop Linux From Scratch. Our partner site tradepub has made available LFS guide to our readers and that too for free. ### - -You can download the Linux From Scratch book from the below link: - -[![](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-From-Scratch.gif)][1] - -Download: [Linux From Scratch][1] - -### About: Linux From Scratch ### - -This book is created by Gerard Beekmans, who is the Project Leader of LFS and Edited by Matthew Burgess and Bruse Dubbs, both of whom are Co-leader of the Project. This book is extensive and expands over 338 pages. - -Having covered – Introduction to LFS, Preparing for the build, Build LFS from Scratch, Setting up of Boot scripts, Making LFS Bootable followed by Appendices, it has all you want to know on LFS Project. - -Also this book gives you the estimated time required for the compilation of a package. The estimated time are calculated based upon the reference of the compilation time of the first package. All the details are presented in a manner easy to understand and implement, even for newbies. - -If you have plenty of time and really interested in developing your own Linux Distribution you would never want to miss a chance to download this ebook and that too for free. All you need is, to start developing your own Linux OS using this ebook along with a working Linux OS (Any Linux Distribution with enough Disk Space), Time and Enthusiasm. - -If Linux fascinates you, if you want to understand Linux from scratch and want to develop your own Linux Distribution, then this is all you should know at this stage, for most of other things you may like to refer to the book, in the above link. - -Also let me know your experience with the book. How ease it was to get along the elaborated LFS guide? Also if you have already Developed a LFS and want to give some tips to our readers, your feedbacks are welcome. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-custom-linux-distribution-from-scratch/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://tecmint.tradepub.com/free/w_linu01/prgm.cgi \ No newline at end of file diff --git a/translated/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md b/translated/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md new file mode 100644 index 0000000000..059f07b195 --- /dev/null +++ b/translated/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md @@ -0,0 +1,65 @@ +δԼLinuxа +================================================================================ +ǷԼLinuxа棿ÿLinuxûʹLinuxĹжһԼķа棬һΡҲ⣬ΪһLinuxҲǹһԼLinuxа档һLinuxа汻Linux From Scratch (LFS) + +ڿʼ֮ǰܽһЩLFSݣ£ + +### 1. ЩҪԼLinuxаӦ˽һLinuxа棨ζŴͷʼһеLinuxаIJͬ ### + +ֻĻʾƵ¼Լӵиõʹ顣ѡκһLinuxа沢ҰϲýиԻá⣬ù߿԰ + +бļboot-loadersںˣѡʲôñȻԼһжôҪLinux From Scratch (LFS) + +**ע**ֻҪLinuxϵͳ飬ָϲʺһLinuxа棬˽ôʼԼһЩϢôָΪд + +### 2. һLinuxа棨LFSĺô ### + +- ˽Linuxϵͳڲ +- һӦϵͳ +- ϵͳLFSdzգΪԸð/ðʲôӵоԵƿ +- ϵͳLFSڰȫϻ + +### 3. һLinuxа棨LFSĻ ### + +һLinuxϵͳζŽҪĶһұ֮Ҫġĺʱ䡣ҪһõLinuxϵͳ㹻Ĵ̿ռLinuxϵͳ + +### 4. ȤǣGentoo/GNU LinuxijӽLFSGentooLFSȫԴĶƵLinuxϵͳ ### + +### 5. ӦһоLinuxûԱ൱˽⣬Ǹshellűרҡ˽һűԣCãʹЩһֻ֣ҪһѧϰߣԺ֪ܿʶҲԿʼҪDzҪLFSжʧ顣 ### + +ᶨ»LFSеһʱ + +### 6. ҪһһָһLinuxLFSǴLinuxĹٷָϡǵĴվtradepubҲΪǵĶLFSָϣͬѵġ ### + +ԴLinux From Scratch鼮 + +[![](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-From-Scratch.gif)][1] + +: [Linux From Scratch][1] + +### ڣLinux From Scratch ### + +ⱾLFSĿͷGerard BeekmansģMatthew BurgessBruse Dubbs༭˶LFSĿ쵼ˡⱾݺܹ㷺338ҳ + +ݰLFS׼LinuxLFSűʹLFS͸¼к֪LFSĿж + +Ȿ黹˱һԤʱ䡣ԤʱԱһʱΪοеĶķʽ֣˵ + +гԣʱ䲢ԹԼLinuxаȤôԲ飨أĻᡣҪģⱾһLinuxϵͳκLinuxа棬㹻Ĵ̿ռ伴ɣпʼԼLinuxϵͳʱ顣 + +LinuxʹԣԼֹһԼLinuxа棬ֽ׶Ӧ֪ȫˣϢԲοӵеݡ + +˽Ķ/ʹⱾľⱾ꾡LFSָϵʹǷ㹻򵥣ѾһLFSǵĶһЩ飬ӭԺͷ + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-custom-linux-distribution-from-scratch/ + +ߣ[Avishek Kumar][a] +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://tecmint.tradepub.com/free/w_linu01/prgm.cgi From df3f55150a670df304e6bcb79811f2c8c6ce8b40 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 31 May 2015 15:53:23 +0800 Subject: [PATCH 1013/2517] translating --- .../20150527 How To Check Laptop CPU Temperature In Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md b/sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md index 4dc3291ac9..6c28b189da 100644 --- a/sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md +++ b/sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md @@ -1,3 +1,5 @@ +Translating----geekpi + How To Check Laptop CPU Temperature In Ubuntu ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Monitor_temperature_Ubuntu.png) @@ -79,4 +81,4 @@ via: http://itsfoss.com/check-laptop-cpu-temperature-ubuntu/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://wpitchoune.net/blog/psensor/ [2]:http://www.lm-sensors.org/ -[3]:https://wiki.archlinux.org/index.php/Hddtemp \ No newline at end of file +[3]:https://wiki.archlinux.org/index.php/Hddtemp From c330f2009bc84c8672367ad3142ef3e980c3bfc2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 31 May 2015 16:27:20 +0800 Subject: [PATCH 1014/2517] translated --- ... Check Laptop CPU Temperature In Ubuntu.md | 84 ------------------- ... Check Laptop CPU Temperature In Ubuntu.md | 83 ++++++++++++++++++ 2 files changed, 83 insertions(+), 84 deletions(-) delete mode 100644 sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md create mode 100644 translated/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md diff --git a/sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md b/sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md deleted file mode 100644 index 6c28b189da..0000000000 --- a/sources/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md +++ /dev/null @@ -1,84 +0,0 @@ -Translating----geekpi - -How To Check Laptop CPU Temperature In Ubuntu -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Monitor_temperature_Ubuntu.png) - -Overheating of laptops is a common issue one faces these days. Monitoring hardware temperature may help you to diagnose why laptop is getting overheated. In this article, we’ll see **how to check CPU temperature in Ubuntu**. - -We are going to use a GUI tool [Psensor][1] that allows you to monitor hardware temperature in Linux. With Psensor you can: - -- monitor the temperature of the motherboard and CPU sensors -- monitor the temperature of the NVidia GPUs -- monitor the temperature of the Hard Disk Drives -- monitor the rotation speed of the fans -- monitor the CPU usage - -Latest version of Psensor also provides applet indicator for Ubuntu and thus it makes the monitoring of hardware temperature even easier in Ubuntu. You can choose to display the temperature right in the top panel itself. It even sends a desktop notification when the temperature exceeds the limit. - -### How to install Psensor in Ubuntu 15.04 and 14.04 ### - -Before you install Psensor, you need to install and configure [lm-sensors][2], a command line utility for hardware monitoring. If you want to measure hard disk temperature, you need to install [hddtemp][3] as well. To install these tools, run the following command in a terminal: - - sudo apt-get install lm-sensors hddtemp - -Then start the detection of your hardware sensors: - - sudo sensors-detect - -To make sure that it works, run the command below: - - sensors - -It will give you an output like: - - acpitz-virtual-0 - Adapter: Virtual device - temp1: +43.0°C (crit = +98.0°C) - - coretemp-isa-0000 - Adapter: ISA adapter - Physical id 0: +44.0°C (high = +100.0°C, crit = +100.0°C) - Core 0: +41.0°C (high = +100.0°C, crit = +100.0°C) - Core 1: +40.0°C (high = +100.0°C, crit = +100.0°C) - -If everything seems alright, proceed with the installation of Psensor by using the command below: - - sudo apt-get install psensor - -Once installed, run the application by looking for it in Unity Dash. At first run, you should configure on what stats do you want to collect in Psensor. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu.jpeg) - -### Display temperature in the panel ### - -If you want to show the temperature in the top panel, go to **Sensor Preferences**: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu_1.jpeg) - -Then under the **Application Indicator** menu, select the component for which you want to display the temperature and then check the **Display sensor in the label** option. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu_2.jpeg) - -### Start Psensor at each start up ### - -Go to **Preferences->Startup** and the check **Launch on session startup** to start Psensor at each boot. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu_3.jpeg) - -That’s it. All you need to monitor the CPU temperature is here. You can keep an eye on it and it may help you find out which process is overheating your computer. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/check-laptop-cpu-temperature-ubuntu/ - -作者:[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://wpitchoune.net/blog/psensor/ -[2]:http://www.lm-sensors.org/ -[3]:https://wiki.archlinux.org/index.php/Hddtemp diff --git a/translated/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md b/translated/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md new file mode 100644 index 0000000000..ace8999edb --- /dev/null +++ b/translated/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md @@ -0,0 +1,83 @@ +如何在Ubuntu中检查笔记本CPU的温度 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Monitor_temperature_Ubuntu.png) + +笔记本过热是最近一个常见的问题。监控硬件温度或许可以帮助你诊断笔记本为什么会过热。本篇中,我们会**了解如何在Ubuntu中检查CPU的温度**。 + +我们将使用一个GUI工具[Psensor][1],它允许你在Linux中监控硬件温度。用Psensor你可以: + +- 监控cpu和主板的温度 +- 监控NVidia GPU的文档 +- 监控硬盘的温度 +- 监控风扇的速度 +- 监控CPU的利用率 + +Psensor最新的版本同样提供了Ubuntu中的指示小程序,这样使得在Ubuntu中监控温度变得更加容易。你可以选择在面板的右上角显示温度。它还会在温度上过阈值后通知。 + + +### 如何在Ubuntu 15.04 和 14.04中安装Psensor ### + +在安装Psensor前,你需要安装和配置[lm-sensors][2],一个用于硬件监控的命令行工具。如果你想要测量磁盘温度,你还需要安装[hddtemp][3]。要安装这些工具,运行下面的这些命令: + + sudo apt-get install lm-sensors hddtemp + +接着开始检测硬件传感器: + + sudo sensors-detect + +要确保已经工作,运行下面的命令: + + sensors + +它会给出下面这样的输出: + + acpitz-virtual-0 + Adapter: Virtual device + temp1: +43.0°C (crit = +98.0°C) + + coretemp-isa-0000 + Adapter: ISA adapter + Physical id 0: +44.0°C (high = +100.0°C, crit = +100.0°C) + Core 0: +41.0°C (high = +100.0°C, crit = +100.0°C) + Core 1: +40.0°C (high = +100.0°C, crit = +100.0°C) + +如果一切看上去没问题,使用下面的命令安装Psensor: + + sudo apt-get install psensor + +安装完成后,在Unity Dash中运行程序。第一次运行时,你应该配置Psensor该监控什么状态。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu.jpeg) + +### 在面板显示温度 ### + +如果你想要在面板中显示温度,进入**Sensor Preferences**: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu_1.jpeg) + +在 **Application Indicator** 菜单下,选择你想要显示温度的组件并勾上 **Display sensor in the label** 选项。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu_2.jpeg) + +### 每次启动启动Psensor ### + +进入 **Preferences->Startup** 并选择 **Launch on session startup** 使每次启动时启动Psensor。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu_3.jpeg) + +就是这样。你所要做的就是在这里监控CPU温度。你可以时刻注意并帮助你找出使计算机过热的进程。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/check-laptop-cpu-temperature-ubuntu/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://wpitchoune.net/blog/psensor/ +[2]:http://www.lm-sensors.org/ +[3]:https://wiki.archlinux.org/index.php/Hddtemp From ca4a1920a63e9e116c843502502b77906a0aca2d Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 31 May 2015 21:27:16 +0800 Subject: [PATCH 1015/2517] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E6=9C=AA=E8=B6=85?= =?UTF-8?q?=E6=9C=9F=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wyangsun @KevinSJ @DongShuaike @createyuan @runningwater @wangjiezhe --- ...k Interface Names for Ubuntu and Debian.md | 31 ------ ... Great for Remote Editing and Much More.md | 1 - ...7 10 Truly Amusing Easter Eggs in Linux.md | 1 - ...nd Downstream--why packaging takes time.md | 97 ------------------- ...rity Bug Hits Linux, But is it That Bad.md | 34 ------- ...Installing Cisco Packet tracer in Linux.md | 2 - ...A TCP or UDP Network Monitoring Utility.md | 2 - ...Command Line Using 'Speedtest-CLI' Tool.md | 2 - ...M (Logical Volume Management) in Ubuntu.md | 1 - ...r Easy Partition Resizing and Snapshots.md | 1 + ... remote desktop on Linux VPS using x2go.md | 2 - ...Websites and Downloading Files in Linux.md | 1 - ...erver behind NAT via reverse SSH tunnel.md | 2 - 13 files changed, 1 insertion(+), 176 deletions(-) delete mode 100644 sources/news/20150511 Ubuntu Devs Propose Stateless Persistent Network Interface Names for Ubuntu and Debian.md delete mode 100644 sources/talk/20140818 Upstream and Downstream--why packaging takes time.md delete mode 100644 sources/talk/20150205 GHOST--Another Security Bug Hits Linux, But is it That Bad.md diff --git a/sources/news/20150511 Ubuntu Devs Propose Stateless Persistent Network Interface Names for Ubuntu and Debian.md b/sources/news/20150511 Ubuntu Devs Propose Stateless Persistent Network Interface Names for Ubuntu and Debian.md deleted file mode 100644 index d3d8014817..0000000000 --- a/sources/news/20150511 Ubuntu Devs Propose Stateless Persistent Network Interface Names for Ubuntu and Debian.md +++ /dev/null @@ -1,31 +0,0 @@ -Ubuntu Devs Propose Stateless Persistent Network Interface Names for Ubuntu and Debian -====================================================================================== -*Networks are detected in an unpredictable and unstable order* - -**Martin Pitt, a renown Ubuntu and Debian developer, came with the proposal of enabling stateless persistent network interface names in the upcoming versions of the Ubuntu Linux and Debian GNU/Linux operating systems.** - -According to Mr. Pitt, it appears that the problem lies in the automatic detection of network interfaces within the Linux kernel. As such, network interfaces are detected in an unstable and unpredictable order. However, it order to connect to a certain network interface in ifupdown or networkd users will need to identify it first using a stable name. - -"The general schema for this is to have an udev rule which does some matches to identify a particular interface, and assings a NAME="foo" to it," says Martin Pitt in an email to the Ubuntu mailinglist. "Interfaces with an explicit NAME= get called just like this, and others just get a kernel driver default, usually ethN, wlanN, or sometimes others (some wifi drivers have their own naming schemas)." - -**Sever solutions appeared over the years: mac, biosdevname, and ifnames** - -Apparently, several solutions are available for this problem, including an installation of an udev rule in /lib/udev/rules.d/75-persistent-net-generator.rules that creates a MAC address at first boot and writes it to /etc/udev/rules.d/70-persistent-net.rules, which is currently used by default in Ubuntu and applies to most hardware components. - -Other solutions include biosdevname, a package that reads port or index numbers, and slot names from the BIOS and writes them to /lib/udev/rules.d/71-biosdevname.rules, and ifnames, a persistent name generator that automatically checks the BIOS and/or firmware for index numbers or slot names, similar to biosdevname. - -However, the difference between ifnames and biosdevname is that the latter falls back to slot names, such as PCI numbers, and then to the MAC address and writes to /lib/udev/rules.d/80-net-setup-link.rules. All of these solutions can be combined, and Martin Pitt proposes to replace the first solution that is now used by default with the ifnames one. - -If a new solution is implemented, a lot of networking issues will be resolved in Ubuntu, especially the cloud version. In addition, it will provide for stable network interface names for all new Ubuntu installations, and resolve many other problems related to system-image, etc. - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/Ubuntu-Devs-Propose-Stateless-Persistent-Network-Interface-Names-for-Ubuntu-and-Debian-480730.shtml - -作者:[Marius Nestor][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/marius-nestor diff --git a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md index 21b0756b9a..3cdb43d879 100644 --- a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md +++ b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md @@ -1,4 +1,3 @@ -wyangsun翻译中 Compact Text Editors Great for Remote Editing and Much More ================================================================================ A text editor is software used for editing plain text files. This type of software has many different uses including modifying configuration files, writing programming language source code, jotting down thoughts, or even making a grocery list. Given that editors can be used for such a diverse range of activities, it is worth spending the time finding an editor that best suites your preferences. diff --git a/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md b/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md index 413d50d6d6..3ab7f47b79 100644 --- a/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md +++ b/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md @@ -1,4 +1,3 @@ -KevinSJ translating 10 Truly Amusing Easter Eggs in Linux ================================================================================ ![](http://en.wikipedia.org/wiki/File:Adventure_Easteregg.PNG) diff --git a/sources/talk/20140818 Upstream and Downstream--why packaging takes time.md b/sources/talk/20140818 Upstream and Downstream--why packaging takes time.md deleted file mode 100644 index fc1c708b14..0000000000 --- a/sources/talk/20140818 Upstream and Downstream--why packaging takes time.md +++ /dev/null @@ -1,97 +0,0 @@ -Upstream and Downstream: why packaging takes time -================================================================================ -Here in the KDE office in Barcelona some people spend their time on purely upstream KDE projects and some of us are primarily interested in making distros work which mean our users can get all the stuff we make. I've been asked why we don't just automate the packaging and go and do more productive things. One view of making on a distro like Kubuntu is that its just a way to package up the hard work done by others to take all the credit. I don't deny that, but there's quite a lot to the packaging of all that hard work, for a start there's a lot of it these days. - -"KDE" used to be released once every nine months or less frequently. But yesterday I released the [first bugfix update to Plasma][1], to make that happen I spent some time on Thursday with David making the [first update to Frameworks 5][2]. But Plasma 5 is still a work in progress for us distros, let's not forget about [KDE SC 4.13.3][3] which Philip has done his usual spectacular job of updating in the 14.04 LTS archive or [KDE SC 4.14 betas][4] which Scarlett has been packaging for utopic and backporting to 14.04 LTS. KDE SC used to be 20 tars, now it's 169 and over 50 langauge packs. - -### Patches ### - -If we were packaging it without any automation as used to be done it would take an age but of course we do automate the repetative tasks, the [KDE SC 4.13.97 status][5] page shows all the packages and highlights obvious problems. But with 169 tars even running the automated script takes a while, then you have to fix any patches that no longer apply. We have [policies][6] to disuade having patches, any patches should be upstream in KDE or on their way upstream, but sometimes it's unavoidable that we have some to maintain which often need small changes for each upstream release. - -### Symbols ### - -Much of what we package are libraries and if one small bit changes in the library, any applications which use that library will crash. This is ABI and the rules for [binary compatibility][7] in C++ are nuts. Not infrequently someone in KDE will alter a library ABI without realising. So we maintain symbol files to list all the symbols, these can often feel like more trouble than they're worth because they need updated when a new version of GCC produces different symbols or when symbols disappear and on investigation they turn out to be marked private and nobody will be using them anyway, but if you miss a change and apps start crashing as nearly happened in KDE PIM last week then people get grumpy. - -### Copyright ### - -Debian, and so Ubuntu, documents the copyright licence of every files in every package. This is a very slow and tedious job but it's important that it's done both upstream and downstream because it you don't people won't want to use your software in a commercial setting and at worst you could end up in court. So I maintain the [licensing policy][8] and not infrequently have to fix bits which are incorrectly or unclearly licenced and answer questions such as today I was reviewing whether a kcm in frameworks had to be LGPL licenced for Eike. We write a copyright file for every package and again this can feel like more trouble than its worth, there's no easy way to automate it but by some readings of the licence texts it's necessary to comply with them and it's just good practice. It also means that if someone starts making claims like requiring licencing for already distributed binary packages I'm in an informed position to correct such nonsense. - -### Descriptions ### - -When we were packaging KDE Frameworks from scratch we had to find a descirption of each Framework. Despite policies for metadata some were quite underdescribed so we had to go and search for a sensible descirption for them. Infact not infrequently we'll need to use a new library which doesn't even have a sensible paragraph describing what it does. We need to be able to make a package show something of a human face. - -### Multiarch ### - -A recent addition to the world of .deb packaging is [MultiArch][9] which allows i386 packages to be installed on amd64 computers as well as some even more obscure combinations (powerpc on ppcel64 anyone?). This lets you run Skype on your amd64 computer without messy cludges like the ia32-libs package. However it needs quite a lot of attention from packagers of libraries marking which packages are multiarch, which depend on other multiarch or arch independent packages and even after packaging KDE Frameworks I'm not entirely comfortable with doing it. - -### Splitting up Packages ### - -We spend lots of time splitting up packages. When say Calligra gets released it's all in one big tar but you don't want all of it on your system because you just want to write a letter in Calligra Words and Krita has lots of image and other data files which take up lots of space you don't care for. So for each new release we have to work out which of the installed files go into which .deb package. It takes time and even worse occationally we can get it wrong but if you don't want heaps of stuff on your computer you don't need then it needs to be done. It's also needed for library upgrades, if there's a new version of libfoo and not all the programs have been ported to it then you can install libfoo1 and libfoo2 on the same system without problems. That's not possible with distros which don't split up packages. - -One messy side effect of this is that when a file moves from one .deb to another .deb made by the same sources, maybe Debian chose to split it another way and we want to follow them, then it needs a Breaks/Replaces/Conflicts added. This is a pretty messy part of .deb packaging, you need to specify which version it Breaks/Replaces/Conflicts and depending on the type of move you need to specify some combination of these three fields but even experienced packages seem to be unclear on which. And then if a backport (with files in original places) is released which has a newer version than the version you specify in the Breaks/Replaces/Conflicts it just refuses to install and stops half way through installing until a new upload is made which updates the Breaks/Replaces/Conflicts version in the packaging. I'd be interested in how this is solved in the RPM world. - -### Debian Merges ### - -Ubuntu is forked from Debian and to piggy back on their work (and add our own bugs while taking the credit) we merge in Debian's packaging at the start of each cycle. This is fiddly work involving going through the diff (and for patches that's often a diff of a diff) and changelog to work out why each alternation was made. Then we merge them together, it takes time and it's error prone but it's what allows Ubuntu to be one of the most up to date distros around even while much of the work gone into maintaining universe packages not part of some flavour has slowed down. - -### Stable Release Updates ### - -You have Kubuntu 14.04 LTS but you want more? You want bugfixes too? Oh but you want them without the possibility of regressions? Ubuntu has quite strict definition of what's allowed in after an Ubuntu release is made, this is because once upon a time someone uploaded a fix for X which had the side effect of breaking X on half the installs out there. So for any updates to get into the archive they can only be for certain packages with a track record of making bug fix releases without sneaking in new features or breaking bits. They need to be tested, have some time passed to allow for wider testing, be tested again using the versions compiled in Launchpad and then released. KDE makes bugfix releases of KDE SC every month and we update them in the latest stable and LTS releases as [4.13.3 was this week][10]. But it's not a process you can rush and will take a couple of weeks usually. That 4.13.3 update was even later then usual because we were busy with Plasma 5 and whatnot. And it's not perfect, a bug in Baloo did get through with 4.13.2. But it would be even worse if we did rush it. - -### Backports ### - -Ah but you want new features too? We don't allow in new features into the normal updates because they will have more chance of having regressions. That's why we make backports, either in the kubuntu-ppa/backports archive or in the ubuntu backports archive. This involves running the package through another automation script to change whever needs changed for the backport then compiling it all, testing it and releasing it. Maintaining and running that backport script is quite faffy so sending your thanks is always appreciated. - -We have an allowance to upload new bugfix (micro releases) of KDE SC to the ubuntu archive because KDE SC has a good track record of fixing things and not breaking them. When we come to wanting to update Plasma we'll need to argue for another allowance. One controvertial issue in KDE Frameworks is that there's no bugfix releases, only monthly releases with new features. These are unlikely to get into the Ubuntu archive, we can try to argue the case that with automated tests and other processes the quality is high enough, but it'll be a hard sell. - -### Crack of the Day ### - -Project Neon provides packages of daily builds of parts of KDE from Git. And there's weekly ISOs that are made from this too. These guys rock. The packages are monolithic and install in /opt to be able to live alongside your normal KDE software. - -### Co-installability ### - -You should be able to run KDELibs 4 software on a Plasma 5 desktop. I spent quite a bit of time ensuring this is possible by having no overlapping files in kdelibs/kde-runtime and kde frameworks and some parts of Plasma. This wasn't done primarily for Kubuntu, many of the files could have been split out into .deb packages that could be shared between KDELibs 4 and Plasma 5, but other disros which just installs packages in a monolithic style benefitted. Some projects like Baloo didn't ensure they were co-installable, fine for Kubuntu as we can separate the libraries that need to be coinstalled from the binaries, but other distros won't be so happy. - -### Automated Testing ### - -Increasingly KDE software comes with its own test suite. Test suites are something that has been late coming to free software (and maybe software in general) but now it's here we can have higher confidence that the software is bug free. We run these test suites as part of the package compilation process and not infrequently find that the test suite doesn't run, I've been told that it's not expected for packagers to use it in the past. And of course tests fail. - -### Obscure Architectures ### - -In Ubuntu we have some obscure architectures. 64-bit Arm is likely to be a useful platform in the years to come. I'm not sure why we care about 64-bit powerpc, I can only assume someone has paid Canonical to care about it. Not infrequently we find software compiles fine on normal PCs but breaks on these obscure platforms and we need to debug why they is. This can be a slow process on ARM which takes an age to do anything, or very slow where I don't even have access to a machine to test on, but it's all part of being part of a distro with many use-cases. - -### Future Changes ### - -At Kubuntu we've never shared infrstructure with Debian despite having 99% the same packaging. This is because Ubuntu to an extent defines itself as being the technical awesomeness of Debian with smoother processes. But for some time Debian has used git while we've used the slower bzr (it was an early plan to make Ubuntu take over the world of distributed revision control with Bzr but then Git came along and turned out to be much faster even if harder to get your head around) and they've also moved to team maintainership so at last we're planning [shared repositories][11]. That'll mean many changes in our scripts but should remove much of the headache of merges each cycle. - -There's also a proposal to [move our packaging to daily builds][12] so we won't have to spend a lot of time updating packaging at every release. I'm skeptical if the hassle of the infrastructure for this plus fixing packaging problems as they occur each day will be less work than doing it for each release but it's worth a try. - -### ISO Testing ### - -Every 6 months we make an Ubuntu release (which includes all the flavours of which Ubuntu [Unity] is the flagship and Kubuntu is the most handsome) and there's alphas and betas before that which all need to be tested to ensure they actually install and run. Some of the pain of this has reduced since we've done away with the alternative (text debian-installer) images but we're nowhere near where Ubuntu [Unity] or OpenSUSE is with OpenQA where there are automated installs running all the time in various setups and some magic detects problems. I'd love to have this set up. - -I'd welcome comments on how any workflow here can be improved or how it compares to other distributions. It takes time but in Kubuntu we have a good track record of contributing fixes upstream and we all are part of KDE as well as Kubuntu. As well as the tasks I list above about checking copyright or co-installability I do Plasma releases currently, I just saw Harald do a Phonon release and Scott's just applied for a KDE account for fixes to PyKDE. And as ever we welcome more people to join us, we're in #kubuntu-devel where free hugs can be found, and we're having a whole day of Kubuntu love at Akademy. - --------------------------------------------------------------------------------- - -via: https://blogs.kde.org/2014/08/13/upstream-and-downstream-why-packaging-takes-time - -作者:[Jonathan Riddell][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://blogs.kde.org/users/jriddell -[1]:https://dot.kde.org/2014/08/12/first-bugfix-update-plasma-5 -[2]:https://dot.kde.org/2014/08/07/kde-frameworks-5.1 -[3]:http://www.kubuntu.org/news/kde-sc-4.13.3 -[4]:https://dot.kde.org/2014/07/18/kde-ships-july-updates-and-second-beta-applications-and-platform-414 -[5]:http://qa.kubuntu.co.uk/ninjas-status/build_status_4.13.97_utopic.html -[6]:https://community.kde.org/Kubuntu/Policies -[7]:https://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++ -[8]:https://techbase.kde.org/Policies/Licensing_Policy -[9]:https://help.ubuntu.com/community/MultiArch -[10]:http://www.kubuntu.org/news/kde-sc-4.13.3 -[11]:http://lists.alioth.debian.org/pipermail/pkg-kde-talk/2014-August/001934.html -[12]:https://lists.ubuntu.com/archives/kubuntu-devel/2014-August/008651.html \ No newline at end of file diff --git a/sources/talk/20150205 GHOST--Another Security Bug Hits Linux, But is it That Bad.md b/sources/talk/20150205 GHOST--Another Security Bug Hits Linux, But is it That Bad.md deleted file mode 100644 index 90923c1aae..0000000000 --- a/sources/talk/20150205 GHOST--Another Security Bug Hits Linux, But is it That Bad.md +++ /dev/null @@ -1,34 +0,0 @@ -GHOST: Another Security Bug Hits Linux, But is it That Bad? -================================================================================ -> GHOST, a newly announced security vulnerability that affects Linux servers and other systems that use the open source glibc library, is not as dangerous to data privacy as the Shellshock or Heartbleed bugs. - -![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/01/ghost-costume.jpg) - -Heartbleed is not even a year behind us, and the open source world has been hit with another major security vulnerability in the form of [GHOST][1], which involves holes in the Linux glibc library. This time, though, the actual danger may not live up to the hype. - -The GHOST vulnerability, which was announced last week by security researchers at [Qualys][2], resides in the gethostbyname*() functions of the glibc library. glibc is one of the core building blocks of most Linux systems, and gethostbyname*(), which resolves domain names into IP addresses, is widely used in open source applications. - -Attackers can exploit the GHOST security hole to create a buffer overflow, making it possible to execute any kind of code they want and do all sorts of nasty things. - -All of the above suggests that GHOST is bad news indeed. Fortunately for the open source community, however, the actual risk appears small. As TrendMicro [points out][3], the bug that makes the exploit possible has been fixed in glibc since May 2013, meaning that any Linux servers or PCs running more recent versions of the software are safe from attack. - -In addition, gethostbyname*() has been superseded by newer glibc functions that can better handle modern networking environments. Those include ones that use the IPv6 protocol, which gethostbyname*() doesn't support. As a result, newer applications often don't use the gethostbyname*() functions, and are not at risk. - -And perhaps most importantly, there's currently no known way of executing GHOST attacks through the Web. That greatly reduces opportunities for using this vulnerability to steal the data of unsuspecting users or otherwise wreak havoc. - -All in all, then, GHOST doesn't seem like a vulnerability that will prove as serious as Heartbleed or Shellshock, two other recent security problems that affected widely used open source software. - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/open-source-application-software-companies/020415/ghost-another-security-bug-hits-linux-it-bad - -作者:[Christopher Tozzi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://thevarguy.com/author/christopher-tozzi -[1]:https://community.qualys.com/blogs/laws-of-vulnerabilities/2015/01/27/the-ghost-vulnerability -[2]:http://qualys.com/ -[3]:http://blog.trendmicro.com/trendlabs-security-intelligence/not-so-spooky-linux-ghost-vulnerability/ \ No newline at end of file diff --git a/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md b/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md index 539a624e1f..c55a04c12c 100644 --- a/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md +++ b/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md @@ -1,5 +1,3 @@ -[Translating by DongShuaike] - Installing Cisco Packet tracer in Linux ================================================================================ ![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Main_picture.png) diff --git a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md index 01a9dc18f9..1d5d3cd0d9 100644 --- a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md +++ b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md @@ -1,5 +1,3 @@ -[Trnslating by DongShuaike] - iptraf: A TCP/UDP Network Monitoring Utility ================================================================================ [iptraf][1] is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. diff --git a/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md b/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md index ee125e70a6..a0c77c21f9 100644 --- a/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md +++ b/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md @@ -1,5 +1,3 @@ -translating by createyuan - How to Test Your Internet Speed Bidirectionally from Command Line Using ‘Speedtest-CLI’ Tool ================================================================================ We always need to check the speed of the Internet connection at home and office. What we do for this? Go to websites like Speedtest.net and begin test. It loads JavaScript in the web browser and then select best server based upon ping and output the result. It also uses a Flash player to produce graphical results. diff --git a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md index d062a85336..ecfb639d54 100644 --- a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md +++ b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md @@ -1,4 +1,3 @@ -translating by runningwater How to Manage and Use LVM (Logical Volume Management) in Ubuntu ================================================================================ ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-1.png.pagespeed.ic.VGSxDeVS9P.png) diff --git a/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md b/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md index 7554abd392..883c5e3203 100644 --- a/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md +++ b/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md @@ -1,3 +1,4 @@ + How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots ================================================================================ ![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035707bbd74.png.pagespeed.ic.9_yebxUF1C.png) diff --git a/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md b/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md index 8b3eed8330..d89c91832e 100644 --- a/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md +++ b/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md @@ -1,5 +1,3 @@ -translating by createyuan - How to set up remote desktop on Linux VPS using x2go ================================================================================ As everything is moved to the cloud, virtualized remote desktop becomes increasingly popular in the industry as a way to enhance employee's productivity. Especially for those who need to roam constantly across multiple locations and devices, remote desktop allows them to stay connected seamlessly to their work environment. Remote desktop is attractive for employers as well, achieving increased agility and flexibility in work environments, lower IT cost due to hardware consolidation, desktop security hardening, and so on. diff --git a/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md b/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md index f736d8bae1..d291f34511 100644 --- a/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md +++ b/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md @@ -1,4 +1,3 @@ -wangjiezhe translating... 7 Command Line Tools for Browsing Websites and Downloading Files in Linux ================================================================================ In the last article, we have covered few useful tools like ‘rTorrent‘, ‘wget‘, ‘cURL‘, ‘w3m‘, and ‘Elinks‘. We got lots of response to cover few other tools of same genre, if you’ve missed the first part you can go through it.. diff --git a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md index d6a1df43c5..b67f5aee26 100644 --- a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md +++ b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md @@ -1,5 +1,3 @@ -translating by createyuan - How to access a Linux server behind NAT via reverse SSH tunnel ================================================================================ You are running a Linux server at home, which is behind a NAT router or restrictive firewall. Now you want to SSH to the home server while you are away from home. How would you set that up? SSH port forwarding will certainly be an option. However, port forwarding can become tricky if you are dealing with multiple nested NAT environment. Besides, it can be interfered with under various ISP-specific conditions, such as restrictive ISP firewalls which block forwarded ports, or carrier-grade NAT which shares IPv4 addresses among users. From 265dcb2df3de32515cc0cab64c94ab7c1393d430 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 31 May 2015 21:57:34 +0800 Subject: [PATCH 1016/2517] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=8D=A3=E8=AA=89?= =?UTF-8?q?=E6=A6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 194 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 113 insertions(+), 81 deletions(-) diff --git a/README.md b/README.md index 02fc5a8227..26ea32fd81 100644 --- a/README.md +++ b/README.md @@ -49,93 +49,125 @@ LCTT的组成 * 2014/10/08 提升bazz2为Core Translators成员。 * 2014/11/04 提升zpl1025为Core Translators成员。 * 2014/12/25 提升runningwater为Core Translators成员。 +* 2015/04/19 发起 LFS-BOOK-7.7-systemd 项目。 活跃成员 ------------------------------- -目前活跃成员有: -- CORE [wxy](https://github.com/wxy), -- CORE [carolinewuyan](https://github.com/carolinewuyan), -- CORE [DeadFire](https://github.com/DeadFire), -- CORE [geekpi](https://github.com/geekpi), -- CORE [GOLinux](https://github.com/GOLinux), -- CORE [reinoir](https://github.com/reinoir), -- CORE [bazz2](https://github.com/bazz2), -- CORE [zpl1025](https://github.com/zpl1025), -- Senior [tinyeyeser](https://github.com/tinyeyeser), -- Senior [vito-L](https://github.com/vito-L), -- Senior [jasminepeng](https://github.com/jasminepeng), -- Senior [willqian](https://github.com/willqian), -- Senior [vizv](https://github.com/vizv), -- [runningwater](https://github.com/runningwater), -- [luoxcat](https://github.com/Luoxcat), -- [Vic020](https://github.com/Vic020), -- [KayGuoWhu](https://github.com/KayGuoWhu), -- [alim0x](https://github.com/alim0x), -- [ZTinoZ](https://github.com/ZTinoZ), -- [2q1w2007](https://github.com/2q1w2007), -- [flsf](https://github.com/flsf), -- [blueabysm](https://github.com/blueabysm), -- [barney-ro](https://github.com/barney-ro), -- [su-kaiyao](https://github.com/su-kaiyao), -- [crowner](https://github.com/crowner), -- [Linchenguang](https://github.com/Linchenguang), -- [Linux-pdz](https://github.com/Linux-pdz), -- [linuhap](https://github.com/linuhap), -- [yechunxiao19](https://github.com/yechunxiao19), -- [woodboow](https://github.com/woodboow), -- [SPccman](https://github.com/SPccman), -- [disylee](https://github.com/disylee), -- [cvsher](https://github.com/cvsher), -- [ThomazL](https://github.com/ThomazL), -- [Stevearzh](https://github.com/Stevearzh), -- [felixonmars](https://github.com/felixonmars), -- [scusjs](https://github.com/scusjs), -- [johnhoow](https://github.com/johnhoow), -- [hyaocuk](https://github.com/hyaocuk), -- [MikeCoder](https://github.com/MikeCoder), -- [theo-l](https://github.com/theo-l), -- [wangjiezhe](https://github.com/wangjiezhe), -- [jiajia9linuxer](https://github.com/jiajia9linuxer), -- [NearTan](https://github.com/NearTan), -- [l3b2w1](https://github.com/l3b2w1), -- [shipsw](https://github.com/shipsw), -- [boredivan](https://github.com/boredivan), -- [Love-xuan](https://github.com/Love-xuan), -- [JonathanKang](https://github.com/JonathanKang), -- [luoyutiantang](https://github.com/luoyutiantang), -- [owen-carter](https://github.com/owen-carter), -- [icybreaker](https://github.com/icybreaker), -- [tenght](https://github.com/tenght), -- [rogetfan](https://github.com/rogetfan), -- [liuaiping](https://github.com/liuaiping), -- [nd0104](https://github.com/nd0104), -- [szrlee](https://github.com/szrlee), -- [lfzark](https://github.com/lfzark), -- [ggaaooppeenngg](https://github.com/ggaaooppeenngg), -- [CNprober](https://github.com/CNprober), -- [coloka](https://github.com/coloka), -- [213edu](https://github.com/213edu), -- [guodongxiaren](https://github.com/guodongxiaren), -- [Tanete](https://github.com/Tanete), -- [zzlyzq](https://github.com/zzlyzq), -- [yujianxuechuan](https://github.com/yujianxuechuan), -- [ailurus1991](https://github.com/ailurus1991), -- [FineFan](https://github.com/FineFan), -- [shaohaolin](https://github.com/shaohaolin), -- [tomatoKiller](https://github.com/tomatoKiller), -- [CHINAANSHE](https://github.com/CHINAANSHE), -- [stduolc](https://github.com/stduolc), -- [Maclauring](https://github.com/Maclauring), -- [Hao-Ding](https://github.com/Hao-Ding), -- [zsJacky](https://github.com/zsJacky), -- [small-Wood](https://github.com/small-Wood), -- [cereuz](https://github.com/cereuz), -- [lijhg](https://github.com/lijhg), -- [fbigun](https://github.com/fbigun), +目前 TP 活跃成员有: +- CORE @wxy, +- CORE @carolinewuyan, +- CORE @DeadFire, +- CORE @geekpi, +- CORE @GOLinux, +- CORE @reinoir, +- CORE @bazz2, +- CORE @zpl1025, +- Senior @tinyeyeser, +- Senior @vito-L, +- Senior @jasminepeng, +- Senior @willqian, +- Senior @vizv, +- @ZTinoZ, +- @Vic020, +- @runningwater, +- @KayGuoWhu, +- @luoxcat, +- @alim0x, +- @2q1w2007, +- @theo-l, +- @ictlyh, +- @FSSlc, +- @su-kaiyao, +- @blueabysm, +- @flsf, +- @martin2011qi, +- @SPccman, +- @wi-cuckoo, +- @Linchenguang, +- @linuhap, +- @crowner, +- @Linux-pdz, +- @H-mudcup, +- @yechunxiao19, +- @woodboow, +- @Stevearzh, +- @disylee, +- @cvsher, +- @wwy-hust, +- @johnhoow, +- @felixonmars, +- @TxmszLou, +- @shipsw, +- @scusjs, +- @wangjiezhe, +- @hyaocuk, +- @MikeCoder, +- @ZhouJ-sh, +- @boredivan, +- @goreliu, +- @l3b2w1, +- @JonathanKang, +- @NearTan, +- @jiajia9linuxer, +- @Love-xuan, +- @coloka, +- @owen-carter, +- @luoyutiantang, +- @JeffDing, +- @icybreaker, +- @tenght, +- @liuaiping, +- @mtunique, +- @rogetfan, +- @nd0104, +- @mr-ping, +- @szrlee, +- @lfzark, +- @CNprober, +- @DongShuaike, +- @ggaaooppeenngg, +- @haimingfg, +- @213edu, +- @Tanete, +- @guodongxiaren, +- @zzlyzq, +- @FineFan, +- @yujianxuechuan, +- @Medusar, +- @shaohaolin, +- @ailurus1991, +- @liaoishere, +- @CHINAANSHE, +- @stduolc, +- @yupmoon, +- @tomatoKiller, +- @zhangboyue, +- @kingname, +- @KevinSJ, +- @zsJacky, +- @willqian, +- @Hao-Ding, +- @JygjHappy, +- @Maclauring, +- @small-Wood, +- @cereuz, +- @fbigun, +- @lijhg, +- @soooogreen, -(更新于2014/12/02,以Github contributors列表排名) +LFS 项目活跃成员有: + +- @ictlyh +- @dongfengweixiao +- @wxy +- @H-mudcup +- @zpl1025 +- @KevinSJ +- @Yuking-net + +(更新于2015/05/31,以Github contributors列表排名) 谢谢大家的支持! From 4622f7f434b998e4c1ac12077414d5efda46f929 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 31 May 2015 22:54:55 +0800 Subject: [PATCH 1017/2517] PUB:20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites @ictlyh --- ...Downloading Files and Browsing Websites.md | 46 +++++++++++-------- 1 file changed, 27 insertions(+), 19 deletions(-) rename {translated/tech => published}/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md (72%) diff --git a/translated/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md b/published/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md similarity index 72% rename from translated/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md rename to published/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md index 631c1992c6..4e6f6f83d0 100644 --- a/translated/tech/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md +++ b/published/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md @@ -1,9 +1,11 @@ -5个基于Linux命令行的文件下载和网站浏览工具 +5 个基于Linux命令行的文件下载和网站浏览工具 ================================================================================ -GNU/Linux最冒险迷人的部分,Linux命令行,是非常强大的工具。命令行本身功能多样,多种内建或者第三方的命令行应用使得Linux变得更加健壮和强大。Linux Shell支持多种不同类型的网络应用,无论是BT下载软件,专用下载器或者互联网冲浪。 + +Linux命令行是GNU/Linux中最神奇迷人的部分,它是非常强大的工具。命令行本身功能多样,多种内建或者第三方的命令行应用使得Linux变得更加健壮和强大。Linux Shell支持多种不同类型的网络应用,无论是BT下载软件,专用下载器或者互联网冲浪。 ![命令行互联网工具](http://www.tecmint.com/wp-content/uploads/2014/02/Command-Line-Internet-Tools.jpg) -5个命令行互联网工具 + +*5个命令行互联网工具* 这里我们介绍了5个很好的命令行互联网工具,它们非常有用,也很容易上手。 @@ -24,7 +26,8 @@ rTorrent是基于文本,用C++编写,追求高性能的Torrent客户端。 # rtorrent ![命令行torrent下载器](http://www.tecmint.com/wp-content/uploads/2014/02/rTorrent.jpeg) -rTorrent命令行工具 + +*rTorrent命令行工具* #### rTorrent的功能 #### @@ -34,18 +37,18 @@ rTorrent命令行工具 - CTRL+ s – 开始下载 - CTRL+ d – 停止运行中的下载或者移除已完成的下载 - CTRL+ k – 停止并关闭运行中的下载 -- CTRL+ r – 在上传/下载torrent之前进行Hash检查 -- CTRL+ q – 执行两次这个命令,rTorrent会直接退出而不发送停止信号 +- CTRL+ r – 在上传/下载种子之前进行Hash检查 +- CTRL+ q – 执行两次这个命令,rTorrent会直接退出而不发送“停止”信号 - Left Arrow Key – 跳到上一屏幕 - Right Arrow Key – 跳到下一屏幕 ### 2. Wget ### -Wget是GNU项目的一部分,名字由World Wide Web (WWW)衍生而来。Wget是用来递归下载,离线查看本地服务器HTML文件一个很好的工具,它可用于Windows, Max,以及Linux等大部分平台。Wget能通过HTTP,HTTPS和FTP下载文件。另外,能镜像整个网站,支持代理浏览以及暂停/回复下载使得它更为有用。 +Wget是GNU项目的一部分,名字由World Wide Web (WWW)衍生而来。Wget是用来递归下载、离线查看本地服务器HTML文件一个很好的工具,它可用于Windows, Mac,以及Linux等大部分平台。Wget能通过HTTP,HTTPS和FTP下载文件。另外,能镜像整个网站,支持代理浏览以及暂停/回复下载使得它更为有用。 #### 安装Wget #### -由于是GNE项目的一部分,Wget在大部分标准Linux发行版中都绑定发布,不再需要独立下载安装。如果默认没有安装,你也可以使用apt或者yum安装。 +由于是GNU项目的一部分,Wget捆绑在大部分标准Linux发行版中,不再需要独立下载安装。如果默认没有安装,你也可以使用apt或者yum安装。 # apt­-get install wget (基于 APT 的系统) @@ -70,13 +73,14 @@ Wget是GNU项目的一部分,名字由World Wide Web (WWW)衍生而来。Wget Wget是一个很棒的工具,它允许在资源有限的机器上自定义或者过滤下载。这是镜像一个网站(Yahoo.com)的wget下载截图。 ![Wget 下载文件](http://www.tecmint.com/wp-content/uploads/2014/02/Wget.jpeg) -Wget 命令行文件下载 -要获取更多wget下载的例子,可以阅读我们的文章[10个Wget下载命令例子][1]。 +*Wget 命令行文件下载* + +要获取更多wget下载的例子,可以阅读我们的文章[Wget下载命令例子][1]。 ### 3. cURL ### -cURL是在多种协议上传输数据的命令行工具。cURL是支持FTP, HTTP, FTPS, TFTP, TELNET, IMAP, POP3等协议的客户端应用。和其它相对比,在支持LDAP,POP3方面,cURL是和wget不同的简单下载器。cURL也很好的支持代理下载,暂停下载以及恢复下载。 +cURL是在多种协议上传输数据的命令行工具。cURL是支持FTP, HTTP, FTPS, TFTP, TELNET, IMAP, POP3等协议的客户端应用。cURL是一个不同于wget 的简单下载器,和其它的相比,它支持LDAP,POP3。cURL也很好的支持代理下载,暂停下载以及恢复下载。 #### 安装cURL #### @@ -93,14 +97,16 @@ cURL的基本使用方法 # curl www.tecmint.com ![Curl 下载](http://www.tecmint.com/wp-content/uploads/2014/02/Curl.jpeg) -Curl 下载数据 + +*Curl 下载* ![Curl 下载数据](http://www.tecmint.com/wp-content/uploads/2014/02/Curl-2.jpeg) -Curl 下载 + +*Curl 下载* ### 4. w3m ### -W3m是GPL协议下发布的基于文本的web浏览器。W3m支持表格,帧,颜色,SSL连接以及内联图像。W3m由于快速浏览而出名。 +W3m是GPL协议下发布的基于文本的web浏览器。W3m支持表格,帧,颜色,SSL连接以及内联图像。W3m以快速浏览而出名。 #### 安装w3m #### @@ -117,11 +123,12 @@ W3m在大部分Linux发行版中也是默认可用的。如果不可用的话可 # w3m www.tecmint.com ![命令行浏览器](http://www.tecmint.com/wp-content/uploads/2014/02/w3m.jpeg) -基于文本的web浏览器w3m + +*基于文本的web浏览器w3m* ### 5. Elinks ### -Elinks是基于文本,给基于Unix和基于Unix的系统使用的免费web浏览器。Elinks支持 HTTP,HTTP Cookies以及支持浏览Pery和Ruby脚本。也很好的支持基于标签的浏览。最棒的是它支持鼠标,颜色显示以及支持一系列的协议,例如HTTP, FTP, SMB, Ipv4 和 Ipv6。 +Elinks是基于文本的免费浏览器,用于Unix及基于Unix的系统。Elinks支持 HTTP,HTTP Cookies以及支持浏览Perl和Ruby脚本(LCTT 译注:应该是指 CGI)。也很好的支持选项卡浏览。最棒的是它支持鼠标、彩色以及支持一系列的协议,例如HTTP, FTP, SMB, Ipv4 和 Ipv6。 #### 安装Elinks #### @@ -138,7 +145,8 @@ Elinks的基本使用方法 # elinks www.tecmint.com ![命令行互联网浏览](http://www.tecmint.com/wp-content/uploads/2014/02/Elinks.jpeg) -Elinks命令行浏览互联网 + +*Elinks命令行浏览互联网* 就是这些了。有你们喜欢读的有趣的文章,我会再次来到这里。到那时尽请关注并保持和Tecmint的联系,别忘了在评论部分给我们你的宝贵的反馈。 @@ -148,9 +156,9 @@ via: http://www.tecmint.com/linux-command-line-tools-for-downloading-files/ 作者:[Avishek Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/10-wget-command-examples-in-linux/ \ No newline at end of file +[1]:https://linux.cn/article-4129-1.html \ No newline at end of file From 3cdd5634a088e2e218d1a5ec8dc2d117527cdb4b Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sun, 31 May 2015 23:04:08 +0800 Subject: [PATCH 1018/2517] translating wi-cuckoo --- ...ux Better than OS X GNU Open Source and Apple in History.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md b/sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md index 4a602997ad..9abc2f721f 100644 --- a/sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md +++ b/sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md @@ -1,3 +1,4 @@ +translating wi-cuckoo Is Linux Better than OS X? GNU, Open Source and Apple in History ================================================================================ > Tensions between the free software/open source community and Apple date back to the 1980s, Linux's founder called the core of Mac OS X "a piece of crap" and other anecdotes from software history. @@ -54,4 +55,4 @@ via: http://thevarguy.com/open-source-application-software-companies/051815/linu [7]:http://www.duntemann.com/AppleSnakeButton.jpg [8]:http://www.freibrun.com/articles/articl12.htm [9]:https://www.gnu.org/bulletins/bull18.html#SEC6 -[10]:https://www.gnu.org/bulletins/bull12.html \ No newline at end of file +[10]:https://www.gnu.org/bulletins/bull12.html From ec699b4df2020935de338d91c15755d73a73a1e5 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 31 May 2015 23:52:47 +0800 Subject: [PATCH 1019/2517] PUB:20150318 How to share a directory with Samba on Fedora or CentOS @wwy-hust --- ...irectory with Samba on Fedora or CentOS.md | 144 ++++++++++++++++++ ...irectory with Samba on Fedora or CentOS.md | 144 ------------------ 2 files changed, 144 insertions(+), 144 deletions(-) create mode 100644 published/20150318 How to share a directory with Samba on Fedora or CentOS.md delete mode 100644 translated/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md diff --git a/published/20150318 How to share a directory with Samba on Fedora or CentOS.md b/published/20150318 How to share a directory with Samba on Fedora or CentOS.md new file mode 100644 index 0000000000..e8e48ba76d --- /dev/null +++ b/published/20150318 How to share a directory with Samba on Fedora or CentOS.md @@ -0,0 +1,144 @@ +如何在Fedora或CentOS上使用Samba共享文件夹 +================================================================================ +如今,无论在家里或者是办公场所,不同的电脑之间共享文件夹已不是什么新鲜事了。在这种趋势下,现代操作系统通过网络文件系统的方式使得电脑间数据的交换变得简单而透明。如果您工作的环境中既有微软的Windows又有Linux,那么,一个共享文件及目录的方式便是通过一个跨平台网络文件共享协议:SMB/CIFS。Windows原生的支持SMB/CIFS,Linux也通过开源的软件Samba实现了SMB/CIFS协议。 + +在这篇文章中,我们将展示**如何使用Samba共享文件夹**。我们使用的Linux平台是**Fedora或CentOS**。这篇文章分为四部分。首先,我们在Fedora/CentOS环境下安装Sambe。接着,我们讨论如何调整SELinux和防火墙配置以允许Samba的文件共享。最后我们介绍如何使用Samba来共享文件夹。 + +### 步骤1:在Fedora和CentOS上安装Samba ### + +首先,安装Samba以及进行一些基本的配置。 + +检验Samba是否已经安装在您的系统中: + + $ rpm -q samba samba-common samba-client + +如果上面的命令没有任何输出,这意味着Samba并未安装。这时,应使用下面的命令来安装Samba。 + + $ sudo yum install samba samba-common samba-client + +接下来,创建一个用于在网络中共享的本地文件夹。这个文件夹应该以Samba共享的方式导出到远程的用户。在这个指南中,我们会在顶层文件夹'/'中创建这个文件夹,因此,请确保您有相应的权限。 + + $ sudo mkdir /shared + +如果您想在您的home文件夹内创建共享文件夹(例如,~/shared),您必须激活SELinux中Samba的home文件夹共享选项,具体将在后面提到。 + +在创建/shared文件夹后,设置文件夹权限以保证其余用户可以访问它。 + + $ sudo chmod o+rw /shared + +如果您不想其他用户对该文件夹拥有写权限,您需要移除命令中的'w'选项。 + + $ sudo chmod o+r /shared + +接下来,创建一个空文件来测试。这个文件可以被用来验证Samba的共享已经被挂载。 + + $ sudo touch /shared/file1 + +### 步骤2:为Samba配置SELinux ### + +接下来,我们需要再次配置SELinux。在Fedora和CentOS发行版中SELinux是默认开启的。SELinux仅在正确的安全配置下才允许Samba读取和修改文件或文件夹。(例如,加上'samba_share_t'属性标签)。 + +下面的命令为文件的配置添加必要的标签: + + $ sudo semanage fcontext -a -t samba_share_t "(/.*)?" + +将替换为我们之前为Samba共享创建的本地文件夹(例如,/shared): + + $ sudo semanage fcontext -a -t samba_share_t "/shared(/.*)?" + +我们必须执行restorecon命令来激活修改的标签,命令如下: + + $ sudo restorecon -R -v /shared + +![](https://farm9.staticflickr.com/8584/16652774078_2055f45f70_b.jpg) + +为了通过Samba共享在我们home文件夹内的文件夹,我们必须在SELinux中开启共享home文件夹的选项,该选项默认被关闭。下面的命令能达到该效果。如果您并未共享您的home文件夹,那么您可以跳过该步骤。 + + $ sudo setsebool -P samba_enable_home_dirs 1 + +### 步骤3:为Samba配置防火墙 ### + +下面的命令用来打开防火墙中Samba共享所需的TCP/UDP端口。 + +如果您在使用firewalld(例如,在Fedora和CentOS7下),接下来的命令将会永久的修改Samba相关的防火墙规则。 + + $ sudo firewall-cmd --permanent --add-service=samba + +如果您在防火墙中使用iptables(例如,CentOS6或者更早的版本),可以使用下面的命令来打开Samba必要的向外的端口。 + + $ sudo vi /etc/sysconfig/iptables + +---------- + + -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 445 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT + -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT + +然后重启iptables服务: + + $ sudo service iptables restart + +### 步骤4:更改Samba配置 ### + +后面的步骤用来配置Samba以将本地文件夹导出为Samba共享文件夹。 + +使用文件编辑器打开Samba配置文件,并将下面的行添加到文件的末尾。 + + $ sudo nano /etc/samba/smb.conf + +---------- + + [myshare] + comment=my shared files + path=/shared + public=yes + writeable=yes + +上面在括号内的文本(例如,"myshare")是Samba共享的资源的名字,它被用来从远程主机存取Samba共享。 + +创建Samba用户帐户,这是挂载和导出Samba文件系统所必须的。我们可以使用smbpasswd工具来创建一个Samba用户。注意,Samba用户帐户必须是已有的Linux用户。如果您尝试使用smbpasswd添加一个不存在的用户,它会返回一个错误的消息。 + +如果您不想使用任何已存在的Linux用户作为Samba用户,您可以在您的系统中创建一个新的用户。为安全起见,设置新用户的登录脚本为/sbin/nologin,并且不创建该用户的home文件夹。 + +在这个例子中,我们创建了一个名叫"sambaguest"的用户,如下: + + $ sudo useradd -M -s /sbin/nologin sambaguest + $ sudo passwd sambaguest + +![](https://farm9.staticflickr.com/8702/16814479366_53f540d3ba_b.jpg) + +在创建一个新用户后,使用smbpasswd命令添加Samba用户。当这个命令询问一个密码时,您可以键入一个与其用户密码不同的密码。 + + $ sudo smbpasswd -a sambaguest + +激活Samba服务,并检测Samba服务是否在运行。 + + $ sudo systemctl enable smb.service + $ sudo systemctl start smb.service + $ sudo systemctl is-active smb + +![](https://farm8.staticflickr.com/7607/16652984770_622f24bccc_b.jpg) + +使用下面的命令来查看Samba中共享的文件夹列表。 + + $ smbclient -U sambaguest -L localhost + +![](https://farm8.staticflickr.com/7281/16220411103_06bf585901_b.jpg) + +接下来是在Thunar文件管理器中访问Samba共享文件夹以及对file1进行拷贝复制的截图。注意,Samba的共享内容可以通过在Thunar中通过 `smb:///myshare` 这个地址来访问。 + +![](https://farm8.staticflickr.com/7644/16218011174_c8b34fcedc_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/share-directory-samba-fedora-centos.html + +作者:[Kristophorus Hadiono][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/kristophorus diff --git a/translated/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md b/translated/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md deleted file mode 100644 index 901fbf603e..0000000000 --- a/translated/tech/20150318 How to share a directory with Samba on Fedora or CentOS.md +++ /dev/null @@ -1,144 +0,0 @@ -FedoraCentOSʹSambaļ -================================================================================ -ڼǰ칫ͬĵ֮乲ļѲʲôˡ£ִϵͳͨļϵͳķʽʹõԼݵĽü򵥶͸Ļм΢WindowsLinuxôһļĿ¼ķʽͨһƽ̨ļЭ,SMB/CIFSWindowsȻ֧SMB/CIFSLinuxҲͨԴSambaʵSMB/CIFSЭ顣 - -ƪУǽչʾ**ʹSambaļ**ʹõLinuxƽ̨**FedoraCentOS**ƪ·ΪIJ֡ȣFedora/CentOS°װSambeţεSELinuxͷǽSambaļǽʹSambaļС - -### 1FedoraCentOSϰװSamba ### - -ȣװSambaԼһЩá - -SambaǷѾװϵͳУ - - $ rpm -q samba samba-common samba-client - -ûκζSambaδװʱӦʹװSamba - - $ sudo yum install samba samba-common samba-client - -һйıļСļӦSambaķʽԶ̵ûָУǻڶļ'/'дļУˣȷӦȨޡ - - $ sudo mkdir /shared - -homeļڴļУ磬~/shared뼤SELinuxSambahomeļйѡ彫ںᵽ - -ڴ/sharedļкļȨԱ֤ûԷ - - $ sudo chmod o+rw /shared - -ûԸļӵдȨޣҪƳе'w'ѡ - - $ sudo chmod o+r /shared - -һļԡļԱ֤SambaĹѾء - - $ sudo touch /shared/file1 - -### 2ΪSambaSELinux ### - -ҪٴSELinuxFedoraCentOSаSELinuxĬϿġSELinuxȷİȫ²Sambaȡ޸ļļС磬'samba_share_t'Աǩ - -ΪļӱҪıǩ - - $ sudo semanage fcontext -a -t samba_share_t "(/.*)?" - -滻Ϊ֮ǰΪSambaıļУ磬/shared - - $ sudo semanage fcontext -a -t samba_share_t "/shared(/.*)?" - -DZִrestorecon޸ĵıǩ£ - - $ sudo restorecon -R -v /shared - -![](https://farm9.staticflickr.com/8584/16652774078_2055f45f70_b.jpg) - -ΪͨSambahomeļڵļУDZSELinuxпhomeļеѡѡĬϱرաܴﵽЧδhomeļУôò衣 - - $ sudo setsebool -P samba_enable_home_dirs 1 - -### 3ΪSamba÷ǽ ### - -򿪷ǽSambaΪҪTCP/UDP˿ڡ - -ʹfirewalld磬FedoraCentOS7£õ޸Sambaصķǽ - - $ sudo firewall-cmd --permanent --add-service=samba - -ڷǽʹiptables磬CentOS6߸İ汾ʹSambaҪĶ˿ڡ - - $ sudo vi /etc/sysconfig/iptables - ----------- - - -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT - -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 445 -j ACCEPT - -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT - -A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT - -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT - -Ȼiptables - - $ sudo service iptables restart - -### 4Samba ### - -IJSambaԽļеΪSambaļС - -ʹļ༭Sambaļӵļĩβ - - $ sudo nano /etc/samba/smb.conf - ----------- - - [myshare] - comment=my shared files - path=/shared - public=yes - writeable=yes - -ڵı磬"myshare"SambaԴ֣ԶȡSamba - -Sambaûʻǹغ͵SambaļϵͳġǿʹsmbpasswdһSambaûע⣬SambaûʻLinuxûѴڵġʹsmbpasswdһڵû᷵һϢ - -ʹκѴڵLinuxûΪSambaûϵͳдһµûΪȫûĵ¼űΪ/sbin/nologinҲûhomeļС - -Уڴһ"sambaguest"û£ - - $ sudo useradd -M -s /sbin/nologin sambaguest - $ sudo passwd sambaguest - -![](https://farm9.staticflickr.com/8702/16814479366_53f540d3ba_b.jpg) - -ڴһûʹsmbpasswdSambaûѯһʱԼһͬڸû롣 - - $ sudo smbpasswd -a sambaguest - -4. Samba񣬲SambaǷС - - $ sudo systemctl enable smb.service - $ sudo systemctl start smb.service - $ sudo systemctl is-active smb - -![](https://farm8.staticflickr.com/7607/16652984770_622f24bccc_b.jpg) - -ʹ鿴Sambaйļб - - $ smbclient -U sambaguest -L localhost - -![](https://farm8.staticflickr.com/7281/16220411103_06bf585901_b.jpg) - -ThunarļдȡSambaļԼfile1пƵĽͼע⣬SambaĹݿͨThunarͨ"smb:///myshare"ַȡ - -![](https://farm8.staticflickr.com/7644/16218011174_c8b34fcedc_b.jpg) - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/share-directory-samba-fedora-centos.html - -ߣ[Kristophorus Hadiono][a] -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ - -[a]:http://xmodulo.com/author/kristophorus From e011f9fb2222fcee4774a83091409d298c780080 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 31 May 2015 23:54:32 +0800 Subject: [PATCH 1020/2517] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201505?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- published/{ => 201505}/20140804 Group Test--Linux Text Editors.md | 0 .../20150108 Interface (NICs) Bonding in Linux using nmcli.md | 0 ...0112 What are useful command-line network monitors on Linux.md | 0 ... Badges Brings Missing Session Icons to Ubuntu Login Screen.md | 0 .../20150123 How to make a file immutable on Linux.md | 0 ...int to a float when a float cannot represent all int values.md | 0 .../20150126 iptraf--A TCP or UDP Network Monitoring Utility.md | 0 .../20150128 Docker-2 Setting up a private Docker registry.md | 0 .../20150128 Docker-3 Automated Docker-based Rails deployments.md | 0 ...0150205 Inxi--Find System And Hardware Information On Linux.md | 0 .../20150205 zBackup--A versatile deduplicating backup tool.md | 0 .../{ => 201505}/20150211 25 Tips for Intermediate Git Users.md | 0 ...stall Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md | 0 ...50225 Linux FAQs with Answers--How to disable IPv6 on Linux.md | 0 ...20150227 Bringing a Bunch of Best Known Linux Network Tools.md | 0 .../20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md | 0 ...etch cdrom apt-get update cannot be used to add new CD-ROMs.md | 0 ...ow to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md | 0 ...ndwidth Used by Applications in a Linux System with Trickle.md | 0 ...ge KVM Virtual Environment using Commandline Tools in Linux.md | 0 ... pre-removal script returned error exit status 1' In Ubuntu.md | 0 ...20150304 Monitoring Your Network And Servers With Observium.md | 0 ...4 Share Folders On Local Network Between Ubuntu And Windows.md | 0 ...150306 How to Setup lftp--A Simple Command line FTP Program.md | 0 ...e Windows SSH Client Tools To Connect To Your Linux Server .md | 0 ... And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md | 0 ...5 Interesting Command Line Tips and Tricks in Linux--Part 1.md | 0 ... to access Gmail from the command line on Linux with Alpine.md | 0 .../{ => 201505}/20150316 Install Mate desktop in FreeBSD 10.1.md | 0 .../20150316 Systemd Boot Process a Close Look in Linux.md | 0 ...150318 11 Linux Terminal Commands That Will Rock Your World.md | 0 ...318 How to share a directory with Samba on Fedora or CentOS.md | 0 ...e Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md | 0 ...urce Forensic Tool to Analyze Disk Images and Recover Files.md | 0 .../20150323 How to enable ssh login without entering password.md | 0 ...-How to compress JPEG images from the command line on Linux.md | 0 ...ers--How to install and access CentOS remote desktop on VPS.md | 0 .../20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md | 0 .../20150324 4 Tools to Securely Delete Files from Linux.md | 0 ...4 7 Quirky' ls' Command Tricks Every Linux User Should Know.md | 0 .../20150324 How to Host Open Source Code Repository in github.md | 0 .../20150324 How to Interactively Create a Docker Container.md | 0 .../20150326 How to set up server monitoring system with Monit.md | 0 .../20150330 2 Ways to Create Your Own Docker Base Image.md | 0 ...30 How to secure SSH login with one-time passwords on Linux.md | 0 ...30 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md | 0 ...0331 Conky--The Ultimate X Based System Monitor Application.md | 0 ...to Generate or Encrypt or Decrypt Random Passwords in Linux.md | 0 ...Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md | 0 ... Linux Email App Geary Updated--How To Install It In Ubuntu.md | 0 ...ine Based Tools for Downloading Files and Browsing Websites.md | 0 ...layer for Ubuntu Plays Relaxing Sounds to Keep You Creative.md | 0 .../20150407 How To Install CentOS Web Panel In CentOS.md | 0 ...7 How to secure BGP sessions using authentication on Quagga.md | 0 ...Tools Send Email with Subject, Body and Attachment in Linux.md | 0 ...150409 Install Inkscape - Open Source Vector Graphic Editor.md | 0 ...ool can alert you about evil twin access points in the area.md | 0 ...0150410 What is a good alternative to wget or curl on Linux.md | 0 .../20150413 A Walk Through Some Important Docker Commands.md | 0 ...h Answers--How to change PATH environment variable on Linux.md | 0 ...50413 [Solved] Ubuntu Does Not Remember Brightness Settings.md | 0 published/{ => 201505}/20150415 Strong SSL Security on nginx.md | 0 ...20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md | 0 ...150417 How to Configure MariaDB Replication on CentOS Linux.md | 0 .../20150417 sshuttle--A transparent proxy-based VPN using ssh.md | 0 ...0150420 7 Interesting Linux 'sort' Command Examples--Part 2.md | 0 ...eleased--The Best Racing Game on Linux Just Got Even Better.md | 0 ...429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md | 0 ...50429 Synfig Studio 1.0--Open Source Animation Gets Serious.md | 0 ...hing basics terminology http headers and caching strategies.md | 0 .../20150504 How To Install Visual Studio Code On Ubuntu.md | 0 .../20150505 Bodhi Linux Introduces Moksha Desktop.md | 0 ...06 How to Securely Store Passwords and Api Keys Using Vault.md | 0 ... to configure a Linux bridge with Network Manager on Ubuntu.md | 0 ...06 Linux FAQs with Answers--How to install autossh on Linux.md | 0 ...7 Command Line Tool to Monitor Linux Containers Performance.md | 0 ...Root and Intermediate CA including OCSP, CRL and revocation.md | 0 ...ake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md | 0 ...150515 New to Linux 5 Apps You Didn't Know You Were Missing.md | 0 ...wers--How to block specific user agents on nginx web server.md | 0 ...rror--security or pam_modules.h--No such file or directory'.md | 0 ...Microsoft Open-Sources The Windows Communication Foundation.md | 0 ...munity Council Asks the Kubuntu Project Leader to Step Down.md | 0 ...Things to Do After Minimal RHEL or CentOS 7 Installation--4.md | 0 ...Things to Do After Minimal RHEL or CentOS 7 Installation--5.md | 0 ...Things to Do After Minimal RHEL or CentOS 7 Installation--6.md | 0 ...How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md | 0 .../{ => 201505}/Linux grep command with 14 different examples.md | 0 88 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201505}/20140804 Group Test--Linux Text Editors.md (100%) rename published/{ => 201505}/20150108 Interface (NICs) Bonding in Linux using nmcli.md (100%) rename published/{ => 201505}/20150112 What are useful command-line network monitors on Linux.md (100%) rename published/{ => 201505}/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md (100%) rename published/{ => 201505}/20150123 How to make a file immutable on Linux.md (100%) rename published/{ => 201505}/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md (100%) rename published/{ => 201505}/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md (100%) rename published/{ => 201505}/20150128 Docker-2 Setting up a private Docker registry.md (100%) rename published/{ => 201505}/20150128 Docker-3 Automated Docker-based Rails deployments.md (100%) rename published/{ => 201505}/20150205 Inxi--Find System And Hardware Information On Linux.md (100%) rename published/{ => 201505}/20150205 zBackup--A versatile deduplicating backup tool.md (100%) rename published/{ => 201505}/20150211 25 Tips for Intermediate Git Users.md (100%) rename published/{ => 201505}/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md (100%) rename published/{ => 201505}/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md (100%) rename published/{ => 201505}/20150227 Bringing a Bunch of Best Known Linux Network Tools.md (100%) rename published/{ => 201505}/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md (100%) rename published/{ => 201505}/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md (100%) rename published/{ => 201505}/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md (100%) rename published/{ => 201505}/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md (100%) rename published/{ => 201505}/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md (100%) rename published/{ => 201505}/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md (100%) rename published/{ => 201505}/20150304 Monitoring Your Network And Servers With Observium.md (100%) rename published/{ => 201505}/20150304 Share Folders On Local Network Between Ubuntu And Windows.md (100%) rename published/{ => 201505}/20150306 How to Setup lftp--A Simple Command line FTP Program.md (100%) rename published/{ => 201505}/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md (100%) rename published/{ => 201505}/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md (100%) rename published/{ => 201505}/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md (100%) rename published/{ => 201505}/20150316 How to access Gmail from the command line on Linux with Alpine.md (100%) rename published/{ => 201505}/20150316 Install Mate desktop in FreeBSD 10.1.md (100%) rename published/{ => 201505}/20150316 Systemd Boot Process a Close Look in Linux.md (100%) rename published/{ => 201505}/20150318 11 Linux Terminal Commands That Will Rock Your World.md (100%) rename published/{ => 201505}/20150318 How to share a directory with Samba on Fedora or CentOS.md (100%) rename published/{ => 201505}/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md (100%) rename published/{ => 201505}/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md (100%) rename published/{ => 201505}/20150323 How to enable ssh login without entering password.md (100%) rename published/{ => 201505}/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md (100%) rename published/{ => 201505}/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md (100%) rename published/{ => 201505}/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md (100%) rename published/{ => 201505}/20150324 4 Tools to Securely Delete Files from Linux.md (100%) rename published/{ => 201505}/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md (100%) rename published/{ => 201505}/20150324 How to Host Open Source Code Repository in github.md (100%) rename published/{ => 201505}/20150324 How to Interactively Create a Docker Container.md (100%) rename published/{ => 201505}/20150326 How to set up server monitoring system with Monit.md (100%) rename published/{ => 201505}/20150330 2 Ways to Create Your Own Docker Base Image.md (100%) rename published/{ => 201505}/20150330 How to secure SSH login with one-time passwords on Linux.md (100%) rename published/{ => 201505}/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md (100%) rename published/{ => 201505}/20150331 Conky--The Ultimate X Based System Monitor Application.md (100%) rename published/{ => 201505}/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md (100%) rename published/{ => 201505}/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md (100%) rename published/{ => 201505}/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md (100%) rename published/{ => 201505}/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md (100%) rename published/{ => 201505}/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md (100%) rename published/{ => 201505}/20150407 How To Install CentOS Web Panel In CentOS.md (100%) rename published/{ => 201505}/20150407 How to secure BGP sessions using authentication on Quagga.md (100%) rename published/{ => 201505}/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md (100%) rename published/{ => 201505}/20150409 Install Inkscape - Open Source Vector Graphic Editor.md (100%) rename published/{ => 201505}/20150410 This tool can alert you about evil twin access points in the area.md (100%) rename published/{ => 201505}/20150410 What is a good alternative to wget or curl on Linux.md (100%) rename published/{ => 201505}/20150413 A Walk Through Some Important Docker Commands.md (100%) rename published/{ => 201505}/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md (100%) rename published/{ => 201505}/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md (100%) rename published/{ => 201505}/20150415 Strong SSL Security on nginx.md (100%) rename published/{ => 201505}/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md (100%) rename published/{ => 201505}/20150417 How to Configure MariaDB Replication on CentOS Linux.md (100%) rename published/{ => 201505}/20150417 sshuttle--A transparent proxy-based VPN using ssh.md (100%) rename published/{ => 201505}/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md (100%) rename published/{ => 201505}/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md (100%) rename published/{ => 201505}/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md (100%) rename published/{ => 201505}/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md (100%) rename published/{ => 201505}/20150429 web caching basics terminology http headers and caching strategies.md (100%) rename published/{ => 201505}/20150504 How To Install Visual Studio Code On Ubuntu.md (100%) rename published/{ => 201505}/20150505 Bodhi Linux Introduces Moksha Desktop.md (100%) rename published/{ => 201505}/20150506 How to Securely Store Passwords and Api Keys Using Vault.md (100%) rename published/{ => 201505}/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md (100%) rename published/{ => 201505}/20150506 Linux FAQs with Answers--How to install autossh on Linux.md (100%) rename published/{ => 201505}/20150507 Command Line Tool to Monitor Linux Containers Performance.md (100%) rename published/{ => 201505}/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md (100%) rename published/{ => 201505}/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md (100%) rename published/{ => 201505}/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md (100%) rename published/{ => 201505}/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md (100%) rename published/{ => 201505}/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md (100%) rename published/{ => 201505}/20150521 Microsoft Open-Sources The Windows Communication Foundation.md (100%) rename published/{ => 201505}/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md (100%) rename published/{ => 201505}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md (100%) rename published/{ => 201505}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md (100%) rename published/{ => 201505}/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md (100%) rename published/{ => 201505}/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md (100%) rename published/{ => 201505}/Linux grep command with 14 different examples.md (100%) diff --git a/published/20140804 Group Test--Linux Text Editors.md b/published/201505/20140804 Group Test--Linux Text Editors.md similarity index 100% rename from published/20140804 Group Test--Linux Text Editors.md rename to published/201505/20140804 Group Test--Linux Text Editors.md diff --git a/published/20150108 Interface (NICs) Bonding in Linux using nmcli.md b/published/201505/20150108 Interface (NICs) Bonding in Linux using nmcli.md similarity index 100% rename from published/20150108 Interface (NICs) Bonding in Linux using nmcli.md rename to published/201505/20150108 Interface (NICs) Bonding in Linux using nmcli.md diff --git a/published/20150112 What are useful command-line network monitors on Linux.md b/published/201505/20150112 What are useful command-line network monitors on Linux.md similarity index 100% rename from published/20150112 What are useful command-line network monitors on Linux.md rename to published/201505/20150112 What are useful command-line network monitors on Linux.md diff --git a/published/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md b/published/201505/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md similarity index 100% rename from published/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md rename to published/201505/20150119 Unity Greeter Badges Brings Missing Session Icons to Ubuntu Login Screen.md diff --git a/published/20150123 How to make a file immutable on Linux.md b/published/201505/20150123 How to make a file immutable on Linux.md similarity index 100% rename from published/20150123 How to make a file immutable on Linux.md rename to published/201505/20150123 How to make a file immutable on Linux.md diff --git a/published/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md b/published/201505/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md similarity index 100% rename from published/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md rename to published/201505/20150124 Why does C++ promote an int to a float when a float cannot represent all int values.md diff --git a/published/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/published/201505/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md similarity index 100% rename from published/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md rename to published/201505/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md diff --git a/published/20150128 Docker-2 Setting up a private Docker registry.md b/published/201505/20150128 Docker-2 Setting up a private Docker registry.md similarity index 100% rename from published/20150128 Docker-2 Setting up a private Docker registry.md rename to published/201505/20150128 Docker-2 Setting up a private Docker registry.md diff --git a/published/20150128 Docker-3 Automated Docker-based Rails deployments.md b/published/201505/20150128 Docker-3 Automated Docker-based Rails deployments.md similarity index 100% rename from published/20150128 Docker-3 Automated Docker-based Rails deployments.md rename to published/201505/20150128 Docker-3 Automated Docker-based Rails deployments.md diff --git a/published/20150205 Inxi--Find System And Hardware Information On Linux.md b/published/201505/20150205 Inxi--Find System And Hardware Information On Linux.md similarity index 100% rename from published/20150205 Inxi--Find System And Hardware Information On Linux.md rename to published/201505/20150205 Inxi--Find System And Hardware Information On Linux.md diff --git a/published/20150205 zBackup--A versatile deduplicating backup tool.md b/published/201505/20150205 zBackup--A versatile deduplicating backup tool.md similarity index 100% rename from published/20150205 zBackup--A versatile deduplicating backup tool.md rename to published/201505/20150205 zBackup--A versatile deduplicating backup tool.md diff --git a/published/20150211 25 Tips for Intermediate Git Users.md b/published/201505/20150211 25 Tips for Intermediate Git Users.md similarity index 100% rename from published/20150211 25 Tips for Intermediate Git Users.md rename to published/201505/20150211 25 Tips for Intermediate Git Users.md diff --git a/published/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md b/published/201505/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md similarity index 100% rename from published/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md rename to published/201505/20150211 Install Linux-Dash (Web Based Monitoring tool) on Ubntu 14.10.md diff --git a/published/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md b/published/201505/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md similarity index 100% rename from published/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md rename to published/201505/20150225 Linux FAQs with Answers--How to disable IPv6 on Linux.md diff --git a/published/20150227 Bringing a Bunch of Best Known Linux Network Tools.md b/published/201505/20150227 Bringing a Bunch of Best Known Linux Network Tools.md similarity index 100% rename from published/20150227 Bringing a Bunch of Best Known Linux Network Tools.md rename to published/201505/20150227 Bringing a Bunch of Best Known Linux Network Tools.md diff --git a/published/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md b/published/201505/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md similarity index 100% rename from published/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md rename to published/201505/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md diff --git a/published/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md b/published/201505/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md similarity index 100% rename from published/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md rename to published/201505/20150227 How To Fix--Failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs.md diff --git a/published/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md b/published/201505/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md similarity index 100% rename from published/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md rename to published/201505/20150227 How to Install Lightweight Budgie v8 Desktop in Ubuntu 14.04.md diff --git a/published/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/published/201505/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md similarity index 100% rename from published/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md rename to published/201505/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md diff --git a/published/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md b/published/201505/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md similarity index 100% rename from published/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md rename to published/201505/20150302 How to Manage KVM Virtual Environment using Commandline Tools in Linux.md diff --git a/published/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md b/published/201505/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md similarity index 100% rename from published/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md rename to published/201505/20150304 Linux Basics--How To Fix 'E-- var cache apt archives subprocess new pre-removal script returned error exit status 1' In Ubuntu.md diff --git a/published/20150304 Monitoring Your Network And Servers With Observium.md b/published/201505/20150304 Monitoring Your Network And Servers With Observium.md similarity index 100% rename from published/20150304 Monitoring Your Network And Servers With Observium.md rename to published/201505/20150304 Monitoring Your Network And Servers With Observium.md diff --git a/published/20150304 Share Folders On Local Network Between Ubuntu And Windows.md b/published/201505/20150304 Share Folders On Local Network Between Ubuntu And Windows.md similarity index 100% rename from published/20150304 Share Folders On Local Network Between Ubuntu And Windows.md rename to published/201505/20150304 Share Folders On Local Network Between Ubuntu And Windows.md diff --git a/published/20150306 How to Setup lftp--A Simple Command line FTP Program.md b/published/201505/20150306 How to Setup lftp--A Simple Command line FTP Program.md similarity index 100% rename from published/20150306 How to Setup lftp--A Simple Command line FTP Program.md rename to published/201505/20150306 How to Setup lftp--A Simple Command line FTP Program.md diff --git a/published/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md b/published/201505/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md similarity index 100% rename from published/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md rename to published/201505/20150309 List Of Free Windows SSH Client Tools To Connect To Your Linux Server .md diff --git a/published/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md b/published/201505/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md similarity index 100% rename from published/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md rename to published/201505/20150310 [Fixed] Keyboard And Mouse Freeze After Suspend In Ubuntu 14.04 [Quick Tip].md diff --git a/published/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md b/published/201505/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md similarity index 100% rename from published/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md rename to published/201505/20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md diff --git a/published/20150316 How to access Gmail from the command line on Linux with Alpine.md b/published/201505/20150316 How to access Gmail from the command line on Linux with Alpine.md similarity index 100% rename from published/20150316 How to access Gmail from the command line on Linux with Alpine.md rename to published/201505/20150316 How to access Gmail from the command line on Linux with Alpine.md diff --git a/published/20150316 Install Mate desktop in FreeBSD 10.1.md b/published/201505/20150316 Install Mate desktop in FreeBSD 10.1.md similarity index 100% rename from published/20150316 Install Mate desktop in FreeBSD 10.1.md rename to published/201505/20150316 Install Mate desktop in FreeBSD 10.1.md diff --git a/published/20150316 Systemd Boot Process a Close Look in Linux.md b/published/201505/20150316 Systemd Boot Process a Close Look in Linux.md similarity index 100% rename from published/20150316 Systemd Boot Process a Close Look in Linux.md rename to published/201505/20150316 Systemd Boot Process a Close Look in Linux.md diff --git a/published/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/published/201505/20150318 11 Linux Terminal Commands That Will Rock Your World.md similarity index 100% rename from published/20150318 11 Linux Terminal Commands That Will Rock Your World.md rename to published/201505/20150318 11 Linux Terminal Commands That Will Rock Your World.md diff --git a/published/20150318 How to share a directory with Samba on Fedora or CentOS.md b/published/201505/20150318 How to share a directory with Samba on Fedora or CentOS.md similarity index 100% rename from published/20150318 How to share a directory with Samba on Fedora or CentOS.md rename to published/201505/20150318 How to share a directory with Samba on Fedora or CentOS.md diff --git a/published/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md b/published/201505/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md similarity index 100% rename from published/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md rename to published/201505/20150320 Locate Stolen laptops and Smart phones Using Prey Tool in Ubuntu.md diff --git a/published/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md b/published/201505/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md similarity index 100% rename from published/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md rename to published/201505/20150320 Sleuth Kit--Open Source Forensic Tool to Analyze Disk Images and Recover Files.md diff --git a/published/20150323 How to enable ssh login without entering password.md b/published/201505/20150323 How to enable ssh login without entering password.md similarity index 100% rename from published/20150323 How to enable ssh login without entering password.md rename to published/201505/20150323 How to enable ssh login without entering password.md diff --git a/published/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md b/published/201505/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md similarity index 100% rename from published/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md rename to published/201505/20150323 Linux FAQs with Answers--How to compress JPEG images from the command line on Linux.md diff --git a/published/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md b/published/201505/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md similarity index 100% rename from published/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md rename to published/201505/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md diff --git a/published/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md b/published/201505/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md similarity index 100% rename from published/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md rename to published/201505/20150323 Square 2.0 Icon Pack Is Twice More Beautiful.md diff --git a/published/20150324 4 Tools to Securely Delete Files from Linux.md b/published/201505/20150324 4 Tools to Securely Delete Files from Linux.md similarity index 100% rename from published/20150324 4 Tools to Securely Delete Files from Linux.md rename to published/201505/20150324 4 Tools to Securely Delete Files from Linux.md diff --git a/published/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md b/published/201505/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md similarity index 100% rename from published/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md rename to published/201505/20150324 7 Quirky' ls' Command Tricks Every Linux User Should Know.md diff --git a/published/20150324 How to Host Open Source Code Repository in github.md b/published/201505/20150324 How to Host Open Source Code Repository in github.md similarity index 100% rename from published/20150324 How to Host Open Source Code Repository in github.md rename to published/201505/20150324 How to Host Open Source Code Repository in github.md diff --git a/published/20150324 How to Interactively Create a Docker Container.md b/published/201505/20150324 How to Interactively Create a Docker Container.md similarity index 100% rename from published/20150324 How to Interactively Create a Docker Container.md rename to published/201505/20150324 How to Interactively Create a Docker Container.md diff --git a/published/20150326 How to set up server monitoring system with Monit.md b/published/201505/20150326 How to set up server monitoring system with Monit.md similarity index 100% rename from published/20150326 How to set up server monitoring system with Monit.md rename to published/201505/20150326 How to set up server monitoring system with Monit.md diff --git a/published/20150330 2 Ways to Create Your Own Docker Base Image.md b/published/201505/20150330 2 Ways to Create Your Own Docker Base Image.md similarity index 100% rename from published/20150330 2 Ways to Create Your Own Docker Base Image.md rename to published/201505/20150330 2 Ways to Create Your Own Docker Base Image.md diff --git a/published/20150330 How to secure SSH login with one-time passwords on Linux.md b/published/201505/20150330 How to secure SSH login with one-time passwords on Linux.md similarity index 100% rename from published/20150330 How to secure SSH login with one-time passwords on Linux.md rename to published/201505/20150330 How to secure SSH login with one-time passwords on Linux.md diff --git a/published/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md b/published/201505/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md similarity index 100% rename from published/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md rename to published/201505/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md diff --git a/published/20150331 Conky--The Ultimate X Based System Monitor Application.md b/published/201505/20150331 Conky--The Ultimate X Based System Monitor Application.md similarity index 100% rename from published/20150331 Conky--The Ultimate X Based System Monitor Application.md rename to published/201505/20150331 Conky--The Ultimate X Based System Monitor Application.md diff --git a/published/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md b/published/201505/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md similarity index 100% rename from published/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md rename to published/201505/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md diff --git a/published/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md b/published/201505/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md similarity index 100% rename from published/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md rename to published/201505/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md diff --git a/published/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md b/published/201505/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md similarity index 100% rename from published/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md rename to published/201505/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md diff --git a/published/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md b/published/201505/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md similarity index 100% rename from published/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md rename to published/201505/20150407 5 Linux Command Line Based Tools for Downloading Files and Browsing Websites.md diff --git a/published/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md b/published/201505/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md similarity index 100% rename from published/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md rename to published/201505/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md diff --git a/published/20150407 How To Install CentOS Web Panel In CentOS.md b/published/201505/20150407 How To Install CentOS Web Panel In CentOS.md similarity index 100% rename from published/20150407 How To Install CentOS Web Panel In CentOS.md rename to published/201505/20150407 How To Install CentOS Web Panel In CentOS.md diff --git a/published/20150407 How to secure BGP sessions using authentication on Quagga.md b/published/201505/20150407 How to secure BGP sessions using authentication on Quagga.md similarity index 100% rename from published/20150407 How to secure BGP sessions using authentication on Quagga.md rename to published/201505/20150407 How to secure BGP sessions using authentication on Quagga.md diff --git a/published/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md b/published/201505/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md similarity index 100% rename from published/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md rename to published/201505/20150409 4 Tools Send Email with Subject, Body and Attachment in Linux.md diff --git a/published/20150409 Install Inkscape - Open Source Vector Graphic Editor.md b/published/201505/20150409 Install Inkscape - Open Source Vector Graphic Editor.md similarity index 100% rename from published/20150409 Install Inkscape - Open Source Vector Graphic Editor.md rename to published/201505/20150409 Install Inkscape - Open Source Vector Graphic Editor.md diff --git a/published/20150410 This tool can alert you about evil twin access points in the area.md b/published/201505/20150410 This tool can alert you about evil twin access points in the area.md similarity index 100% rename from published/20150410 This tool can alert you about evil twin access points in the area.md rename to published/201505/20150410 This tool can alert you about evil twin access points in the area.md diff --git a/published/20150410 What is a good alternative to wget or curl on Linux.md b/published/201505/20150410 What is a good alternative to wget or curl on Linux.md similarity index 100% rename from published/20150410 What is a good alternative to wget or curl on Linux.md rename to published/201505/20150410 What is a good alternative to wget or curl on Linux.md diff --git a/published/20150413 A Walk Through Some Important Docker Commands.md b/published/201505/20150413 A Walk Through Some Important Docker Commands.md similarity index 100% rename from published/20150413 A Walk Through Some Important Docker Commands.md rename to published/201505/20150413 A Walk Through Some Important Docker Commands.md diff --git a/published/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md b/published/201505/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md similarity index 100% rename from published/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md rename to published/201505/20150413 Linux FAQs with Answers--How to change PATH environment variable on Linux.md diff --git a/published/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md b/published/201505/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md similarity index 100% rename from published/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md rename to published/201505/20150413 [Solved] Ubuntu Does Not Remember Brightness Settings.md diff --git a/published/20150415 Strong SSL Security on nginx.md b/published/201505/20150415 Strong SSL Security on nginx.md similarity index 100% rename from published/20150415 Strong SSL Security on nginx.md rename to published/201505/20150415 Strong SSL Security on nginx.md diff --git a/published/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md b/published/201505/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md similarity index 100% rename from published/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md rename to published/201505/20150417 14 Useful Examples of Linux 'sort' Command--Part 1.md diff --git a/published/20150417 How to Configure MariaDB Replication on CentOS Linux.md b/published/201505/20150417 How to Configure MariaDB Replication on CentOS Linux.md similarity index 100% rename from published/20150417 How to Configure MariaDB Replication on CentOS Linux.md rename to published/201505/20150417 How to Configure MariaDB Replication on CentOS Linux.md diff --git a/published/20150417 sshuttle--A transparent proxy-based VPN using ssh.md b/published/201505/20150417 sshuttle--A transparent proxy-based VPN using ssh.md similarity index 100% rename from published/20150417 sshuttle--A transparent proxy-based VPN using ssh.md rename to published/201505/20150417 sshuttle--A transparent proxy-based VPN using ssh.md diff --git a/published/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md b/published/201505/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md similarity index 100% rename from published/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md rename to published/201505/20150420 7 Interesting Linux 'sort' Command Examples--Part 2.md diff --git a/published/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md b/published/201505/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md similarity index 100% rename from published/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md rename to published/201505/20150423 uperTuxKart 0.9 Released--The Best Racing Game on Linux Just Got Even Better.md diff --git a/published/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md b/published/201505/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md similarity index 100% rename from published/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md rename to published/201505/20150429 Docker 1.6 Released--How to Upgrade on Fedora or CentOS.md diff --git a/published/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md b/published/201505/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md similarity index 100% rename from published/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md rename to published/201505/20150429 Synfig Studio 1.0--Open Source Animation Gets Serious.md diff --git a/published/20150429 web caching basics terminology http headers and caching strategies.md b/published/201505/20150429 web caching basics terminology http headers and caching strategies.md similarity index 100% rename from published/20150429 web caching basics terminology http headers and caching strategies.md rename to published/201505/20150429 web caching basics terminology http headers and caching strategies.md diff --git a/published/20150504 How To Install Visual Studio Code On Ubuntu.md b/published/201505/20150504 How To Install Visual Studio Code On Ubuntu.md similarity index 100% rename from published/20150504 How To Install Visual Studio Code On Ubuntu.md rename to published/201505/20150504 How To Install Visual Studio Code On Ubuntu.md diff --git a/published/20150505 Bodhi Linux Introduces Moksha Desktop.md b/published/201505/20150505 Bodhi Linux Introduces Moksha Desktop.md similarity index 100% rename from published/20150505 Bodhi Linux Introduces Moksha Desktop.md rename to published/201505/20150505 Bodhi Linux Introduces Moksha Desktop.md diff --git a/published/20150506 How to Securely Store Passwords and Api Keys Using Vault.md b/published/201505/20150506 How to Securely Store Passwords and Api Keys Using Vault.md similarity index 100% rename from published/20150506 How to Securely Store Passwords and Api Keys Using Vault.md rename to published/201505/20150506 How to Securely Store Passwords and Api Keys Using Vault.md diff --git a/published/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md b/published/201505/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md similarity index 100% rename from published/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md rename to published/201505/20150506 Linux FAQs with Answers--How to configure a Linux bridge with Network Manager on Ubuntu.md diff --git a/published/20150506 Linux FAQs with Answers--How to install autossh on Linux.md b/published/201505/20150506 Linux FAQs with Answers--How to install autossh on Linux.md similarity index 100% rename from published/20150506 Linux FAQs with Answers--How to install autossh on Linux.md rename to published/201505/20150506 Linux FAQs with Answers--How to install autossh on Linux.md diff --git a/published/20150507 Command Line Tool to Monitor Linux Containers Performance.md b/published/201505/20150507 Command Line Tool to Monitor Linux Containers Performance.md similarity index 100% rename from published/20150507 Command Line Tool to Monitor Linux Containers Performance.md rename to published/201505/20150507 Command Line Tool to Monitor Linux Containers Performance.md diff --git a/published/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md b/published/201505/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md similarity index 100% rename from published/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md rename to published/201505/20150511 OpenSSL command line Root and Intermediate CA including OCSP, CRL and revocation.md diff --git a/published/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md b/published/201505/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md similarity index 100% rename from published/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md rename to published/201505/20150512 Guake 0.7.0 Released--A Drop-Down Terminal for Gnome Desktops.md diff --git a/published/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md b/published/201505/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md similarity index 100% rename from published/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md rename to published/201505/20150515 New to Linux 5 Apps You Didn't Know You Were Missing.md diff --git a/published/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md b/published/201505/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md similarity index 100% rename from published/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md rename to published/201505/20150518 Linux FAQs with Answers--How to block specific user agents on nginx web server.md diff --git a/published/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md b/published/201505/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md similarity index 100% rename from published/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md rename to published/201505/20150518 Linux FAQs with Answers--How to fix 'fatal error--security or pam_modules.h--No such file or directory'.md diff --git a/published/20150521 Microsoft Open-Sources The Windows Communication Foundation.md b/published/201505/20150521 Microsoft Open-Sources The Windows Communication Foundation.md similarity index 100% rename from published/20150521 Microsoft Open-Sources The Windows Communication Foundation.md rename to published/201505/20150521 Microsoft Open-Sources The Windows Communication Foundation.md diff --git a/published/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md b/published/201505/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md similarity index 100% rename from published/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md rename to published/201505/20150527 Ubuntu Community Council Asks the Kubuntu Project Leader to Step Down.md diff --git a/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md b/published/201505/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md similarity index 100% rename from published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md rename to published/201505/30 Things to Do After Minimal RHEL or CentOS 7 Installation--4.md diff --git a/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md b/published/201505/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md similarity index 100% rename from published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md rename to published/201505/30 Things to Do After Minimal RHEL or CentOS 7 Installation--5.md diff --git a/published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md b/published/201505/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md similarity index 100% rename from published/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md rename to published/201505/30 Things to Do After Minimal RHEL or CentOS 7 Installation--6.md diff --git a/published/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md b/published/201505/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md similarity index 100% rename from published/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md rename to published/201505/How to Manage Network using nmcli Tool in RedHat CentOS 7.x.md diff --git a/published/Linux grep command with 14 different examples.md b/published/201505/Linux grep command with 14 different examples.md similarity index 100% rename from published/Linux grep command with 14 different examples.md rename to published/201505/Linux grep command with 14 different examples.md From 78f496e6936aa51572a1a3c4a481f5deb2df15ac Mon Sep 17 00:00:00 2001 From: wwy Date: Mon, 1 Jun 2015 08:54:41 +0800 Subject: [PATCH 1021/2517] Update 20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md --- ...ork of Yum Commands for RPM Package Management in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md b/sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md index dc81fef219..2ada2ac4cd 100644 --- a/sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md +++ b/sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md @@ -1,3 +1,5 @@ +translating by wwy-hust + 27 ‘DNF’ (Fork of Yum) Commands for RPM Package Management in Linux ================================================================================ DNF aka Dandified YUM is a next generation Package Manager for RPM based Distribution. It was first introduced in Fedora 18 and it is replaced [YUM utility][1] in recent release of Fedora 22. @@ -284,4 +286,4 @@ via: http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ [2]:http://www.tecmint.com/dnf-next-generation-package-management-utility-for-linux/ -[3]:http://www.tecmint.com/systemd-replaces-init-in-linux/ \ No newline at end of file +[3]:http://www.tecmint.com/systemd-replaces-init-in-linux/ From c30cd779d5c4c4c1a36284e4cd716c43d4e7dc84 Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 1 Jun 2015 09:19:48 +0800 Subject: [PATCH 1022/2517] Update 20150528 Things To Do After Installing Fedora 22.md --- .../tech/20150528 Things To Do After Installing Fedora 22.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150528 Things To Do After Installing Fedora 22.md b/sources/tech/20150528 Things To Do After Installing Fedora 22.md index 27b37f86ee..023869a9f3 100644 --- a/sources/tech/20150528 Things To Do After Installing Fedora 22.md +++ b/sources/tech/20150528 Things To Do After Installing Fedora 22.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Things To Do After Installing Fedora 22 ================================================================================ Fedora 22 the latest entrant in the community developed line of Red hat operating systems is released on the 26th of May 2015. A lot of speculation and anticipation has been associated with this release of the venerable fedora. Well there are some major changes that are being proposed for Fedora 22. @@ -111,4 +112,4 @@ via: http://linoxide.com/linux-how-to/things-do-after-installing-fedora-22/ [a]:http://linoxide.com/author/jonathande/ [1]:https://get.adobe.com/flashplayer/ [2]:http://spins.fedoraproject.org/ -[3]:https://www.google.com/intl/en/chrome/browser/desktop/index.html \ No newline at end of file +[3]:https://www.google.com/intl/en/chrome/browser/desktop/index.html From 2cc762a6f22daa5b16aa6dc0b21d014a20ffc074 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 1 Jun 2015 09:58:26 +0800 Subject: [PATCH 1023/2517] PUB:20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @sevenot 如我 QQ 上和你说到,请下次要注意格式。https://linux.cn/article-5548-1.html --- ...pired GTK And Icon Theme Paper in Linux.md | 70 ++++++++++++++++ ...pired GTK And Icon Theme Paper in Linux.md | 83 ------------------- 2 files changed, 70 insertions(+), 83 deletions(-) create mode 100644 published/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md delete mode 100644 translated/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md diff --git a/published/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md b/published/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md new file mode 100644 index 0000000000..a4ca97ed5a --- /dev/null +++ b/published/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md @@ -0,0 +1,70 @@ +在 Linux 下体验谷歌 Material风格的GTK和图标主题Paper +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Paper_theme_Material_Design.jpg) + +[Paper][1]是一款即将与广大朋友们见面的一个图形工具包和图标主题,它的设计灵感来自于谷歌的设计语言[Material风格][2]。Paper由Sam Hewitt发起,Sam是[Moka项目][3]的一员,Moka总会设计出[让人满意的Ubuntu主题][4]。对于Paper,我敢说只要它一经推出,它必将是[最好的GTK主题开发包][5]之一。 + +对的,你没有听错,Paper主题还在开发阶段。因此我建议,如果你想在你的Ubuntu或者它的衍生版本上安装Paper,最好抱着试一试的实验心态。因为你多多少少会发现一些破损的图标,但这并不影响整体体验非常棒! + +### 通过PPA在Ubuntu及其衍生版本上安装Paper主题 ### + +Sam为Ubuntu和它的衍生版本设置了一个专用的PPA(Presonal Package Archives,个人软件包档案)。我推荐你通过PPA安装而不是下载Paper主题,因为你将会定期更新主题。这个PPA可供使用的系统有Ubuntu 15.04, Ubuntu 14.10, Ubuntu 14.04, Elementary OS Freya, Elementary OS Luna, Linux Mint 17, Linux Mint 16 和其它的Ubuntu衍生版本。 + +打开终端,输入下列命令: + + sudo add-apt-repository ppa:snwh/pulp + sudo apt-get update + sudo apt-get install paper-gtk-theme paper-icon-theme + +### 下载Paper GTK和图标主题 ### + + +如果你不想用PPA,你可以手动下载主题和图标。但是就像刚才所说,这样你就无法自动更新。 + +- [下载Paper图标主题][6] +- [下载Paper的GTK主题][7] + +#### 把它们用起来吧 #### + +我希望你知道怎么在你的Ubuntu中安装或者更改主题。如果你不知道,下面几个教程将帮助你安装一个新的主题。 + +- [如何在标准Ubuntu中更改主题][8] +- [如何在GNOME Shell中更改主题][9] +- [如何在Ubuntu Mint中更改主题][10] +- [如何在Elementary OS Freya中更改主题][11] + +#### 就是这样! #### + +因为我用过[Elementary OS Freya][12]一段时间,这里有一些看起来像Elementary OS Freya的Paper主题和图标的截图。我使用了一张Material Design风格的墙纸,这样可以更好的匹配主题和图标。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Material_Design_Paper_Theme_Elementary_OS_Freya_1.jpeg) + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Material_Design_Paper_Theme_Elementary_OS_Freya.jpeg) + +How do you find this Material design inspired theme? If you did use it, do share the screenshot of your desktop with rest of us here. + +你觉得这个Material风格的主题怎么样?如果你使用它的话,在评论里和我们分享你的桌面截图吧! + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-paper-theme-linux/ + +作者:[Abhishek][a] +译者:[sevenot](https://github.com/sevenot) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://snwh.org/paper/ +[2]:http://www.google.fr/design/spec/material-design/introduction.html +[3]:http://mokaproject.com/moka-icon-theme/ +[4]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ +[5]:http://itsfoss.com/gnome-shell-themes-ubuntu-1404/ +[6]:https://github.com/snwh/paper-icon-theme +[7]:https://github.com/snwh/paper-gtk-theme +[8]:http://itsfoss.com/how-to-install-themes-in-ubuntu-13-10/ +[9]:http://itsfoss.com/install-switch-themes-gnome-shell/ +[10]:http://itsfoss.com/install-icon-linux-mint/ +[11]:http://itsfoss.com/install-themes-icons-elementary-os-freya/ +[12]:http://itsfoss.com/tag/elementary-os-freya/ diff --git a/translated/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md b/translated/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md deleted file mode 100644 index 4986ffadf8..0000000000 --- a/translated/share/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md +++ /dev/null @@ -1,83 +0,0 @@ -sevenot translated -Install Google’s Material Design Inspired GTK And Icon Theme Paper in Linux -来试试谷歌全新的设计语言Material Design和Linux下的图标主题Paper吧!灵感来源于图形工具包GTK。 -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Paper_theme_Material_Design.jpg) - -[Paper][1] is a new upcoming GTK and icon theme inspired by Google’s [Material design][2] guidelines. It is developed by Sam Hewitt, the man behind [Moka Project][3]. Moka has always been in the list of [best themes for Ubuntu][4] and looking at Paper, I can say that once it is developed completely, it will surely be listed as one of the [best GTK themes][5]. -Paper是一款即将与广大朋友们见面的一个图形工具包和图标主题,它的设计灵感来自于谷歌的设计语言Material design。Paper由Sam Hewitt发起,Sam是Moka项目的一员,Moka总会设计出让人满意的Ubuntu主题。对于Paper,我敢说只要它一经推出,它必将是最好的主题开发包之一。 - -Yes, you heard it right. The theme is still under development. Therefore I suggest that if you want to install Paper theme in Ubuntu or any other Linux distributions, do it only for experimentation purpose. You may see some broken icons here and there but the over all experience is nice. -对的,你没有听错,Paper主题还在开发阶段。因此我建议,如果你想在你的Ubuntu或者它的衍生版本上安装Paper,最好抱着试一试的实验心态。因为你多多少少会发现一些破损的图标,但这并不影响整个实验的运行。 - -### Install Paper theme in Ubuntu based distributions via PPA ### -通过PPA在Ubuntu及其衍生版本上安装Paper主题 -Sam has a dedicated PPA for Ubuntu based distributions. I recommend that you use this PPA instead of downloading the theme because you’ll be getting the updates on the themes regularly. This PPA is available for Ubuntu 15.04, Ubuntu 14.10, Ubuntu 14.04, Elementary OS Freya, Elementary OS Luna, Linux Mint 17, Linux Mint 16 and other Linux distributions based on Ubuntu. -Sam为Ubuntu和它的衍生版本设置了一个专用的PPA(PresonalPackgeArchives,个人软件包档案)。我会介绍通过PPA安装而不是下载Paper主题,因为你将会定期更新主题。这个PPA可供使用的系统有Ubuntu 15.04, Ubuntu 14.10, Ubuntu 14.04, Elementary OS Freya, Elementary OS Luna, Linux Mint 17, Linux Mint 16 和其它的Ubuntu衍生版本。 - -Open a terminal and use the following commands: -打开终端,输入下列命令: - sudo add-apt-repository ppa:snwh/pulp - sudo apt-get update - sudo apt-get install paper-gtk-theme paper-icon-theme - -### Download Paper GTK and icon theme ### -下载Paper图形工具包和图标主题 - -If you do not want to use the PPA, you can download the themes and icons manually. As I said previously, you won’t get the updates automatically this way. -如果你不想用PPA,你可以手动下载主题和图标。但是就像刚才所说,这样你就无法自动更新。 - -- [Download Paper icon themes][6] -- [Download Paper GTK themes][7] -下载Paper图标主题 -下载Paper的GTK工具包 -#### Using Paper themes and icons #### -把它们用起来吧 -I hope that you know how to change or install themes in your respective Linux distributions. If you are not unaware of it, below are few tutorials that could help you to install new themes: -我希望你知道怎么在你的Ubuntu中安装或者更改主题。如果你不知道,下面几个教程将帮助你安装一个新的主题。 -- [How to change themes in Ubuntu Unity][8] -- [How to change themes in GNOME Shell][9] -- [How to change themes in Linux Mint][10] -- [How to change theme in Elementary OS Freya][11] -如何在标准Ubuntu中更改主题 -如何在GNOME桌面的Ubuntu中更改主题 -如何在Ubuntu Mint中更改主题 -如何在Elementary OS Freya中更改主题 - -#### Here is what Paper theme looks like #### -就是这样! - -Since I am using [Elementary OS Freya][12] these days, here are some of the screenshots of how Paper theme and icons look like in Elementary OS Freya. I have used a wallpaper with Material design look so that it blends well with the icon and themes. -自从我开始用Elementary OS Freya以来,这里就存有一些Paper主题和图标的截图。我用了Material Design做了一个桌面,这样可以更好的兼容主题和图标。 - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Material_Design_Paper_Theme_Elementary_OS_Freya_1.jpeg) - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Material_Design_Paper_Theme_Elementary_OS_Freya.jpeg) - -How do you find this Material design inspired theme? If you did use it, do share the screenshot of your desktop with rest of us here. -你的Material design 设计灵感是什么呢?如果你在使用Material design ,在评论里和我们分享你的桌面截图吧! - - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/install-paper-theme-linux/ - -作者:[Abhishek][a] -译者:[sevenot](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://snwh.org/paper/ -[2]:http://www.google.fr/design/spec/material-design/introduction.html -[3]:http://mokaproject.com/moka-icon-theme/ -[4]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ -[5]:http://itsfoss.com/gnome-shell-themes-ubuntu-1404/ -[6]:https://github.com/snwh/paper-icon-theme -[7]:https://github.com/snwh/paper-gtk-theme -[8]:http://itsfoss.com/how-to-install-themes-in-ubuntu-13-10/ -[9]:http://itsfoss.com/install-switch-themes-gnome-shell/ -[10]:http://itsfoss.com/install-icon-linux-mint/ -[11]:http://itsfoss.com/install-themes-icons-elementary-os-freya/ -[12]:http://itsfoss.com/tag/elementary-os-freya/ From 290c490c69946a92d613503f66d853e412093bd8 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 1 Jun 2015 10:06:44 +0800 Subject: [PATCH 1024/2517] PUB:20150521 Will Ubuntu Linux Hit 200 Million Users This Year MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wwy-hust 做好事不留名~~ --- ...u Linux Hit 200 Million Users This Year.md | 38 +++++++++++++++++++ ...u Linux Hit 200 Million Users This Year.md | 38 ------------------- 2 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 published/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md delete mode 100644 translated/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md diff --git a/published/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md b/published/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md new file mode 100644 index 0000000000..e06a6e98bb --- /dev/null +++ b/published/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md @@ -0,0 +1,38 @@ +Ubuntu会在今年达到2亿用户么? +================================================================================ +距离Mark Shuttleworth表达他的目标“在4年内Ubuntu的用户达到2亿”已经过去了四年零两周。尽管Ubuntu的用户数量在过去的四年中一直在上升,但这个目标目前并未实现,并且看起来不会在今年年底实现。 + +那是2011年5月在[UDS 布达佩斯][1],Shuttleworth表示Ubuntu将在4年内达到2亿用户。 + +![](http://www.phoronix.net/image.php?id=uds_budapest&image=budapest_phoronix_03_show&w=1920) + +上一次我听到Ubuntu有“1千万”用户,但是并没有任何可靠的报道表明Ubuntu的用户数接近2亿。来自Valve最近的统计表明相比于Windows和OS X的用户[使用Linux的游戏用户的比重少于1%][2]。大多数基于Web计量和其他统计方式的数据倾向于表明Linux的用户总数只占很少的部分。 + +撇开桌面版不谈,Ubuntu在过去的四年来至少在云和服务器部署方面得到了大量的占有率,并且被证明是Red Hat Enterprise的有力竞争者。Ubuntu还证明了它对基于ARM的硬件十分友好。当Mark在四年前提出他的目标时,他可能考虑到Ubuntu Phone/Touch会比目前的状况更好。可是Ubuntu Phone/Touch目前仅仅在欧洲和[中国][3]可用,并且[Ubuntu Touch软件依旧在成熟的路上][4],[仍需要大量的关键应用程序方面的工作][5]等。 + +![](http://www.phoronix.net/image.php?id=0x2015&image=shuttleworth_200_million_show&w=1920) + +距离Canonical宣布[Ubuntu不久将登陆5%的PC][6]也已过去了3年。5%的目标是全球的PC装机量,但哪怕再过3年,我依旧很难相信这个目标会实现。至少在美国和欧洲,我仍难以在实体店看到Ubuntu作为预装的系统,主要的网络零售商/OEM厂商仍倾向于在特定的PC型号中提供Linux,比如Chrome OS、Android设备。 + +另一个由开源社区提出的高傲地、落空的目标便是[GNOME将在2010年占有全球桌面市场10%的份额][7]。五年了,没有任何迹象表明他们接近了那10%的里程碑。 + +在今天,您认为Ubuntu用户有多少呢?在未来的几年里,Ubuntu(或者Linux)的用户会有多大增长呢?通过评论来与我们分享您的想法吧。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=news_item&px=2015-200-Million-Goal-Retro + +作者:[Michael Larabel][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.michaellarabel.com/ +[1]:http://www.phoronix.com/vr.php?view=16002 +[2]:http://www.phoronix.com/scan.php?page=news_item&px=Steam-April-2015-1-Drop +[3]:http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-MX4-In-China +[4]:http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-Calculator-Reboot +[5]:http://www.phoronix.com/scan.php?page=news_item&px=MTgzOTM +[6]:http://www.phoronix.com/scan.php?page=news_item&px=MTA5ODM +[7]:https://www.phoronix.com/scan.php?page=news_item&px=Nzg1Mw \ No newline at end of file diff --git a/translated/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md b/translated/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md deleted file mode 100644 index 45c572b1bb..0000000000 --- a/translated/talk/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md +++ /dev/null @@ -1,38 +0,0 @@ -Ubuntuڽﵽ2ûô -================================================================================ -Mark ShuttleworthĿꡰ4Ubuntuûﵽ2ڡѾȥܡUbuntuûڹȥһֱĿĿǰδʵ֣ҿڽʵ֡ - -20115[UDS ˹][1]ShuttleworthʾUbuntu4ڴﵽ2û - -![](http://www.phoronix.net/image.php?id=uds_budapest&image=budapest_phoronix_03_show&w=1920) - -һUbuntuС1ǧûDzûκοɿıUbuntuûӽ2ڡValveͳƱWindowsOS Xû[ʹLinuxϷûı1%][2]WebͳƷʽڱLinuxûֻռٵIJ֡ - -Ʋ治̸Ubuntuڹȥƺͷõ˴ռʣұ֤Red Hat EnterpriseߡUbuntu֤ԻARMӲʮѺáMarkǰĿʱܿǵUbuntu Phone/TouchĿǰ״áUbuntu Phone/TouchĿǰŷ޺[й][3]ã[Ubuntu Touchڳ·][4][ҪĹؼӦóĹ][5]ȡ - -![](http://www.phoronix.net/image.php?id=0x2015&image=shuttleworth_200_million_show&w=1920) - -Canonical[Ubuntuý½5%PC][6]Ҳѹȥ3ꡣ5%ĿȫPCװٹ3꣬ɺĿʵ֡ŷޣʵ꿴UbuntuΪԤװϵͳҪ/OEMضPCͺṩLinuxChrome OSAndroid豸 - -һɿԴĸ߰ءյĿ[GNOME2010ռȫг10%ķݶ][7]ǰûκμǽӽ10%̱ - -ڽ죬ΪUbuntuûжأδļUbuntuLinuxûжأͨǷ뷨ɡ - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=news_item&px=2015-200-Million-Goal-Retro - -ߣ[Michael Larabel][a] -ߣ[ID](https://github.com/ID) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ - -[a]:http://www.michaellarabel.com/ -[1]:http://www.phoronix.com/vr.php?view=16002 -[2]:http://www.phoronix.com/scan.php?page=news_item&px=Steam-April-2015-1-Drop -[3]:http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-MX4-In-China -[4]:http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-Calculator-Reboot -[5]:http://www.phoronix.com/scan.php?page=news_item&px=MTgzOTM -[6]:http://www.phoronix.com/scan.php?page=news_item&px=MTA5ODM -[7]:https://www.phoronix.com/scan.php?page=news_item&px=Nzg1Mw \ No newline at end of file From 7aa580a4066131acdd78076ccc7687ac2917798f Mon Sep 17 00:00:00 2001 From: GOLinux Date: Mon, 1 Jun 2015 12:53:34 +0800 Subject: [PATCH 1025/2517] [Translated]20150528 Things To Do After Installing Fedora 22.md --- ...Things To Do After Installing Fedora 22.md | 115 ------------------ ...Things To Do After Installing Fedora 22.md | 113 +++++++++++++++++ 2 files changed, 113 insertions(+), 115 deletions(-) delete mode 100644 sources/tech/20150528 Things To Do After Installing Fedora 22.md create mode 100644 translated/tech/20150528 Things To Do After Installing Fedora 22.md diff --git a/sources/tech/20150528 Things To Do After Installing Fedora 22.md b/sources/tech/20150528 Things To Do After Installing Fedora 22.md deleted file mode 100644 index 023869a9f3..0000000000 --- a/sources/tech/20150528 Things To Do After Installing Fedora 22.md +++ /dev/null @@ -1,115 +0,0 @@ -Translating by GOLinux! -Things To Do After Installing Fedora 22 -================================================================================ -Fedora 22 the latest entrant in the community developed line of Red hat operating systems is released on the 26th of May 2015. A lot of speculation and anticipation has been associated with this release of the venerable fedora. Well there are some major changes that are being proposed for Fedora 22. - -Systemd is the new kid in the block when it comes to initialization daemons, it is poised to replace the venerable sysvinit module that has long been a part of the Linux ecosystem. Another major change that users will come across in the base python version. Its just that python in available in two different flavors the 2.x and 3.x lines. Each has its fair share of quirks and benefits. So users who might prefer the 2.x flavor might want to install their favorite python. The dandified Yum installer that has been around since Fedora 18 is all set to replace the age old YUM installer. Fedora has finally decided that it is time that DNF replace YUM. - -### 1) Install VLC media player ### - -Fedora 22 comes with a default media player viz. gnome videos (previously known as totem). If that is fine by you we can skip this step and move ahead. However if you like me prefer the most widely used VLC you can go ahead and install it from the RPMFusion repos. You can do that with : - - sudo dnf install vlc -y - -### 2) Configure RPMFusion Repos ### - -As I already mentioned Fedora is very strict with its ideologies, it does not ship with any non-free components with it. The official repositories does not provide some essential software containing non-free components like multimedia codes. So it is necessary to install some 3rd party repositories which will provide us some essential software. Luckily RPMFusion repositories come to the rescue. - - $ sudo dnf install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-22.noarch.rpm - -### 3) Install Multimedia Codecs ### - -As is said some multimedia codecs and plugins don't ship with fedora. Now who would like to miss out on their favorite shows and movies just because the codes are proprietary. Try this: - - $ sudo dnf install gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer-plugins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1 - -### 4) Update your system ### - -Fedora is a bleeding edge distribution and hence it releases updates which will fix bugs and loopholes present in your system continuously. Hence it is a good practice to keep your system up to date. - - $ sudo dnf update -y - -### 5) Uninstall software you may not need ### - -Fedora comes with a set of pre-chosen packages that most users can utilize, however for more advanced users, you may recognize that you do not need all of it. It's easy enough to remove any packages you don't need using the following command - I chose to uninstall rhythmbox because I know I won't use it: - - $ sudo dnf remove rhythmbox - -### 6) Install Adobe Flash ### - -We all wish Adobe Flash didn't exist anymore since it is not always know for being the most secure or resource efficient, but for awhile it's here to stay. The only way to install Adobe Flash for Fedora 22 is to install the official RPM from Adobe, as shown below. - -You can download the RPM [here][1]. After downloading the file, you can right click and open it like this: - -![Install Adobe Flash](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-9.50.42-PM.png) - -Right click and select "Open With Software Install" - -Then, simply click install on the window that pops up: - -![Install Adobe](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-9.51.07-PM.png) - -Click on "Install" to complete the process of installing the custom RPM from Adobe - -Once the process completes, the "Install" button will change to "Remove" and the installation should have finished. If your browser is open during the process, it may ask you to close it first or restart it after the install for the changes to take effect. - -### 7) Spin Up a VM with Gnome Boxes ### - -So you just installed Fedora and you're loving it, but maybe you need Windows still for something proprietary, or maybe you just want to play with another Linux distro. In any situation, you can use Gnome Boxes, provided with Fedora 22, to easily create a VM or use a live distribution. Follow the steps below to get started using an ISO of your choice! Who knows, maybe you can even check out a [Fedora Spin][2]. - -First open Gnome Boxes and select "New" in the top left: - -![Add a new virtual machine (box)](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.24.46-PM.png) - -Click "New" to start the process of adding a new virtual machine. - -Next, click to open a file and choose an ISO: - -![Choose ISO](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.28.44-PM.png) - -After choosing to select a file or ISO, select your ISO. In this case, I had a Debian ISO I installed - -Finally, customize the VM settings or use the defaults and click "Create." The VM will start by default and the available VMs will be available in Gnome Boxes as little thumbnails. - -![Create VM](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.31.11-PM.png) - -Customize the settings to whatever you choose, or keep the defaults. Click "Create" when you are done and the VM will be ready to go. - -### 8) Install Google Chrome ### - -Firefox is included with Fedora 22, but as with most software, everyone has their browser of choice. If yours happens to be Google Chrome, you can follow the instructions above for Adobe Flash player, however, obviously use the RPM from Google for whichever version of Chrome you download. The latest version can usually be found [here][3]. - -### 9) Add Social Media and Other Online Accounts ### - -Gnome has some nice built in functionality to accommodate accounts for things like Facebook, Google, and other online accounts. You can access the Online Accounts settings through the main Gnome Settings application. You can access the settings by right clicking on the desktop or by finding it in the applications. Then, simply click on Online Accounts and add the accounts of your choosing. If you add an account like Google, for example, you can use it as the default for things like sending email, calendar appointments, interacting with photos and documents, and more. - -### 10) Install KDE or another Desktop Environment ### - -Some of us just don't like Gnome, and that's okay. Run the following command in Terminal to install everything necessary to use KDE instead. The same instructions can be applied to xfce, lxde, or other desktop environments as well. - - $ sudo dnf install @kde-desktop - -After the install finishes, log out. When you click on your username, notice the little gear wheel that indicates settings. Click it and select "Plasma." When you log in again, you will be greeted by a fresh KDE desktop. - -![Plasma on Fedora 22](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-11.32.27-PM.png) - -The Plasma environment after just installing it on Fedora 22 - -### Conclusion ### - -That’s it you are all set to go. Use the system and try out things. If you don't find something according to your liking, linux gives you the freedom to change them. Fedora comes with the latest Gnome shell as its desktop environment, too heavy for you and don't like it. Try KDE or some light weight DE like cinnamon, xfce etc. Wish you a very happy and hassle free Fedora experience. !! - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/things-do-after-installing-fedora-22/ - -作者:[Jonathan DeMasi][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/jonathande/ -[1]:https://get.adobe.com/flashplayer/ -[2]:http://spins.fedoraproject.org/ -[3]:https://www.google.com/intl/en/chrome/browser/desktop/index.html diff --git a/translated/tech/20150528 Things To Do After Installing Fedora 22.md b/translated/tech/20150528 Things To Do After Installing Fedora 22.md new file mode 100644 index 0000000000..172c7612ae --- /dev/null +++ b/translated/tech/20150528 Things To Do After Installing Fedora 22.md @@ -0,0 +1,113 @@ +安装Fedora 22后要做的事 +================================================================================ +Fedora 22,Red Hat操作系统的社区开发版的最新成员,已经于2015年5月26日发布了。这个令人神圣的Fedora发行版充斥着各种炒作和预期,Fedora 22推出了大量的重大变化。 + +就初始化进程而言,Systemd还是个新生儿,但它已经准备好替换脆弱的sysvinit这个一直是Linux生态系统一部分的模块。另外一个用户会碰到的重大改变存在于基本仓库的python版本中,这里提供了两种不同口味的python版本2.x和3.x分线,各个都有其不同的癖好和优点。所以,那些偏好2.x口味的用户可能想要安装他们喜爱的python版本。自从Fedora 18开始被打扮得更加时髦的Yum安装器也被设置来替换过时陈旧的YUM安装器后。Fedora也已最后决定,现在是时候用DNF来替换YUM了。 +### 1) 安装VLC媒体播放器 ### + +Fedora 22默认自带了媒体播放器viz gnome视频播放器(前身是totem)。如果你对此不感冒,那么我们可以跳过这一步继续往前走。但是,如果你像我一样,偏好使用最广泛的VLC,那么就去从RPMFusion仓库安装吧。安装方法如下: + + sudo dnf install vlc -y + +### 2) 配置RPMFusion仓库 ### + +正如我已经提到过的,Fedora的意识形态很是严谨,它不会自带任何非自由组件。官方仓库不会提供一些包含有非自由组件的基本软件,比如像多媒体编码。因此,安装一些第三方仓库很有必要,这些仓库会为我们提供一些基本的软件。幸运的是,RPMFusion仓库前来拯救我们了。 + + $ sudo dnf install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-22.noarch.rpm + +### 3) 安装多媒体编码 ### + +刚刚我们说过,一些多媒体编码和插件不会随Fedora一起发送。现在,有谁想仅仅是因为专有编码而错过他们最爱的节目和电影?试试这个吧: + + $ sudo dnf install gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer-plugins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1 + +### 4) 更新系统 ### + +Fedora是一个尖端的发行版,因此它会持续发布更新用以修复系统中出现的错误和漏洞。因而,保持系统更新到最新,是个不错的做法。 + + $ sudo dnf update -y + +### 5) 卸载你不需要的软件 ### + +Fedora预装了一些大多数用户可以利用的包,但是对于更高级的用户,你可能意识到你并不需要它。要移除你不需要的包相当容易,只需使用以下命令——我选择卸载rhythmbox,因为我知道我不会用到它: + + $ sudo dnf remove rhythmbox + +### 6) 安装Adobe Flash ### + +我们都希望Adobe Flash不要再存在了,因为它并不被认为是最安全的,或者资源利用最好的,但是暂时先让它待着吧。Fedora 22安装Adobe Flash的唯一途径是从Adobe安装官方RPM,就像下面这样。 + +你可以从[这里][1]下载RPM。下载完后,你可以直接右击并像下面这样打开: + +![Install Adobe Flash](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-9.50.42-PM.png) + +右击并选择“用软件安装打开” + +然后,只需在弹出窗口中点击安装: + +![Install Adobe](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-9.51.07-PM.png) + +点击“安装”来完成从Adobe安装自定义RPM的过程 + +该过程完成后,“安装”按钮会变成“移除”,而此时安装也完成了。如果在此过程中你的浏览器开着,会提示你先把它关掉或在安装完成后重启以使修改生效。 + +### 7) 用Gnome Boxes加速虚拟机 ### + +你刚刚安装了Fedora,你也很是喜欢,但是出于某些私人原因,你也许仍然需要Windows,或者你只是想玩玩另外一个Linux发行版。不管哪种情况,你都可以使用Gnome Boxes来简单地创建一个虚拟机或使用一个live发行版,Fedora 22提供了该软件。遵循以下步骤,使用你所选的ISO来开始吧!谁知道呢,也许你可以检验一下某个[Fedora Spin][2]。 + +首先,打开Gnome Boxes,然后在顶部左边选择“新建”: + +![Add a new virtual machine (box)](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.24.46-PM.png) + +点击“新建”来开始添加一个新虚拟机的进程吧。 + +接下来,点击打开文件并选择一个ISO: + +![Choose ISO](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.28.44-PM.png) + +在选择选择了选择文件或ISO后,选择你的ISO。这里,我已经安装了一个Debian ISO。 + +最后,自定义VM设置或使用默认,然后点击“创建”。VM会以默认方式启动,可用的VM会在Gnome Boxes以小缩略图的方式显示。 + +![Create VM](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.31.11-PM.png) + +自定义设置为你所选择的,或者也可以保持默认。完成后,点击“创建”,VM就一切就绪了。 + +### 8) 安装Google Chrome ### + +Firefox被包含在Fedora 22中,但是就跟大多数软件一样,每个人都有他们自己的选择。如果你所喜爱的浏览器恰好是Google Chrome,你可以使用和上面安装Adobe Flash Player类似的指令。然而,很明显,你得使用来自Google的任何你所下载的版本的RPM。最新的版本通常可以在[这里][3]找到。 + +### 9) 添加社交媒体和其它在线帐号 ### + +Gnome自带有不错的内建功能用于容纳帐号相关的东西,像Facebook,Google以及其它在线帐号。你可以通过主Gnome设置应用访问在线帐号设置。然后,只需点击在线帐号,并添加你所选择的帐号。如果你要添加一个帐号,比如像Google,你可以用它来作为默认帐号,用来完成诸如发送邮件、日历提醒、相片和文档交互,以及诸如此类的更多事情。 + +### 10) 安装KDE或另一个桌面环境 ### + +我们中的某些人不喜欢Gnome,那也没问题。在终端中运行以下命令来安装KDE所需的一切来替换它。这些指令也可以用以安装xfce、lxde或其它桌面环境。 + + $ sudo dnf install @kde-desktop + +安装完成后,登出。当你点击你的用户名时,注意那个表示设置的小齿轮。点击它,然后选择“Plasma”。当你再次登录时,一个全新的KDE桌面就会欢迎你。 + +![Plasma on Fedora 22](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-11.32.27-PM.png) + +刚刚安装到Fedora 22上的Plasma环境 + +### 尾声 ### + +就是这样了,一切就绪。使用新系统吧,试试新东西。如果你找不到与你喜好相关的东西,linux赋予你自由修改它的权利。Fedora自带有最新的Gnome Shell作为其桌面环境,如果你觉得太臃肿而不喜欢,那么试试KDE或一些轻量级的DE,像Cinnamon、xfce之类。愿你的Fedora之旅十分开心并且没有困扰。!! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/things-do-after-installing-fedora-22/ + +作者:[Jonathan DeMasi][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/jonathande/ +[1]:https://get.adobe.com/flashplayer/ +[2]:http://spins.fedoraproject.org/ +[3]:https://www.google.com/intl/en/chrome/browser/desktop/index.html From f251d0ee4f5ce34bfe630a94c77c9d0d7ff335bf Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 1 Jun 2015 16:09:12 +0800 Subject: [PATCH 1026/2517] =?UTF-8?q?20150601-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nitor Linux servers with SNMP and Cacti.md | 181 ++++++++++++ ... to monitor common services with Nagios.md | 267 ++++++++++++++++++ 2 files changed, 448 insertions(+) create mode 100644 sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md create mode 100644 sources/tech/20150601 How to monitor common services with Nagios.md diff --git a/sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md b/sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md new file mode 100644 index 0000000000..ab6c7f0f30 --- /dev/null +++ b/sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md @@ -0,0 +1,181 @@ +How to monitor Linux servers with SNMP and Cacti +================================================================================ +SNMP (or Simple Network Management Protocol) is used to gather data on what is going on within a device, such as load, hard disk states, bandwidth. These data are used by network monitoring tools such as Cacti to generate graphs for monitoring purposes. + +In a typical deployment of Cacti and SNMP, there will be one or more SNMP-enabled devices, and a separate monitoring server where Cacti collects SNMP feeds from those devices. Please keep in mind that all the devices that need to be monitored must be SNMP enabled. In this tutorial, we will be configuring Cacti and SNMP on the same Linux server for demonstration purpose. + +### Configure SNMP on Debian or Ubuntu ### + +To install SNMP agent (snmpd) on a Debian-based system, run the following command. + + root@server:~# apt-get install snmpd + +Then edit its configuration like the following. + + root@server:~# vim /etc/snmp/snmpd.conf + +---------- + + # this will make snmpd listen on all interfaces + agentAddress udp:161 + + # a read only community 'myCommunity' and the source network is defined + rocommunity myCommunity 172.17.1.0/24 + + sysLocation Earth + sysContact email@domain.tld + +After editing the config file, restart snmpd. + + root@server:~# service snmpd restart + +### Configure SNMP on CentOS or RHEL ### + +To install SNMP tools and libraries, run the following command. + + root@server:~# sudo yum install net-snmp + +Then edit an SNMP config file like the following. + + root@server:~# vim /etc/snmp/snmpd.conf + +---------- + + # A user 'myUser' is being defined with the community string 'myCommunity' and source network 172.17.1.0/24 + com2sec myUser 172.17.1.0/24 myCommunity + + # myUser is added into the group 'myGroup' and the permission of the group is defined + group myGroup v1 myUser + group myGroup v2c myUser + view all included .1 + access myGroup "" any noauth exact all all none + +---------- + + root@server:~# service snmpd restart + root@server:~# chkconfig snmpd on + +Restart snmpd service, and add it to startup service list. + +### Testing SNMP ### + +SNMP can be tested by running the snmpwalk command. If SNMP has been successfully configured, this command will generate a ton of output. + + root@server:~# snmpwalk -c myCommunity 172.17.1.44 -v1 + +---------- + + iso.3.6.1.2.1.1.1.0 = STRING: "Linux mrtg 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64" + iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10 + iso.3.6.1.2.1.1.3.0 = Timeticks: (2097) 0:00:20.97 + + ~~ OUTPUT TRUNCATED ~~ + + iso.3.6.1.2.1.92.1.1.2.0 = Gauge32: 1440 + iso.3.6.1.2.1.92.1.2.1.0 = Counter32: 1 + iso.3.6.1.2.1.92.1.2.2.0 = Counter32: 0 + iso.3.6.1.2.1.92.1.3.1.1.2.7.100.101.102.97.117.108.116.1 = Timeticks: (1) 0:00:00.01 + iso.3.6.1.2.1.92.1.3.1.1.3.7.100.101.102.97.117.108.116.1 = Hex-STRING: 07 DD 0B 12 00 39 27 00 2B 06 00 + +### Configure Cacti with SNMP ### + +In this tutorial, we are setting up both Cacti and SNMP on the same Linux server. So go ahead and [install Cacti][2] on your Linux server on which SNMP was just configured. + +After installation, Cacti web interface can be accessed using the link "http://172.17.1.44/cacti", of course, in your case, the IP address of your server. + +![](http://farm6.staticflickr.com/5512/10972747655_0298f6ce6c_z.jpg) + +![](http://farm6.staticflickr.com/5532/10972982543_67e15433b8_z.jpg) + +The paths during Cacti installation are usually correct. But they can be double checked if necessary. + +![](http://farm4.staticflickr.com/3764/10972920304_138670d3cf_z.jpg) + +During the first-time installation, the default username and password for Cacti are "admin" and "admin". You will be forced to change the password after first login. + +![](http://farm6.staticflickr.com/5542/10972747775_531fe445ef_o.png) + +### Add and Manage Devices to Cacti ### + +Cacti will poll devices based on SNMP string that was configured earlier. In this tutorial, we will add only the local server where SNMP is already enabled. + +To add devices, we login as admin and go to console in the Cacti admin panel. We click Console > Devices. + +![](http://farm8.staticflickr.com/7411/10972747855_b464972e56_z.jpg) + +There may already be a device named 'localhost'. We do not need it as we will create fresh graphs. We can delete this device from the list. We add a new device by using the 'add' button. + +![](http://farm8.staticflickr.com/7373/10972747895_977e0eccd6_z.jpg) + +Next, we set the device parameters. + +![](http://farm8.staticflickr.com/7400/10972747935_df03500de7_z.jpg) + +Now that the device has been added, we specify the graph templates that we want to create. This section can be found in the bottom section of the page. + +![](http://farm4.staticflickr.com/3773/10972747955_083101e6ab_z.jpg) + +And then we proceed to creating the graphs. + +![](http://farm4.staticflickr.com/3734/10972747985_fae6b78888.jpg) + +Here, we create graphs for load average, RAM and hard disk, processor. + +![](http://farm8.staticflickr.com/7374/10972920484_ed6b33b8b8_z.jpg) + +### Interface Graphs and 64-bit Counters ### + +By default, Cacti uses 32-bit counters in SNMP queries. 32-bit counters are sufficient for most bandwidth graphs, but they do not work correctly for graphs greater than 100 Mbps. If it is known that the bandwidth will exceed more than 100 Mbps, it is always advisable to use 64-bit counters. Using 64-bit counters is not hard at all. + +![](http://farm8.staticflickr.com/7320/10972982813_120fe1f3d0_z.jpg) + +**Note**: It takes around 15 minutes for Cacti to populate new graphs. There are not alternatives to being patient. + +### Creating Graph Trees ### + +These snapshots illustrate how to create graph trees and how to add graph to those trees. + +![](http://farm8.staticflickr.com/7429/10972748045_ca06bec889_z.jpg) + +![](http://farm3.staticflickr.com/2833/10972920584_f33624862a_z.jpg) + +![](http://farm6.staticflickr.com/5548/10972836666_f31e4de0e7_z.jpg) + +![](http://farm4.staticflickr.com/3786/10972836776_1675611740_z.jpg) + +We can verify the graph in the graph tree. + +![](http://farm4.staticflickr.com/3707/10972836836_3dabe56765_z.jpg) + +### User Management ### + +Finally, we create a user with view permission to only the graph that we have created. Cacti has built in user management system, and it is highly customizable. + +![](http://farm8.staticflickr.com/7313/10972920624_61e13157f9_z.jpg) + +![](http://farm6.staticflickr.com/5536/10972920644_59a9797685_z.jpg) + +![](http://farm3.staticflickr.com/2872/10972920744_24f75fb5a8_z.jpg) + +After completing these steps, we can log in with the user 'user1' and verify that only this user is able to view the graph. + +![](http://farm8.staticflickr.com/7423/10972748265_c2608b3683_z.jpg) + +![](http://farm4.staticflickr.com/3763/10972748335_9cd012c6fe_z.jpg) + +And thus we have deployed a Cacti server in the network monitoring system. Cacti servers are stable, and can deal with tons of graphs without any problems. + +Hope this helps. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/monitor-linux-servers-snmp-cacti.html + +作者:[Sarmed Rahman][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/sarmed +[1]:http://xmodulo.com/install-configure-cacti-linux.html \ No newline at end of file diff --git a/sources/tech/20150601 How to monitor common services with Nagios.md b/sources/tech/20150601 How to monitor common services with Nagios.md new file mode 100644 index 0000000000..95b0984adb --- /dev/null +++ b/sources/tech/20150601 How to monitor common services with Nagios.md @@ -0,0 +1,267 @@ +How to monitor common services with Nagios +================================================================================ +Nagios comes with a wide range of built-in scripts for monitoring services. This tutorial will cover the process of using some of these scripts for checking common services, such as MySQL, Apache web server, DNS, etc. + +To keep the article focused on service monitoring, we will not be configuring hostgroups or templates, as they have been covered in a [previous tutorial][1]. Nonetheless, they can be tuned to match the requirements. + +### Running Nagios Check in CLI ### + +It is generally recommended to run the Nagios service check scripts in CLI before adding them to Nagios. This will give an idea on whether the execution will be successful and what the output of the script will look like. + +All of the scripts are located at /etc/nagios-plugins/config/ with the executable files stored at /usr/lib/nagios/plugins/ + +Here is how it is done. + + root@nagios:~# cd /etc/nagios-plugins/config/ + +The provided scripts contain help on the syntax. The example contains partial output. + + root@nagios:~# cat /etc/nagios-plugins/config/tcp_udp.cfg + +---------- + + # 'check_tcp' command definition + define command{ + command_name check_tcp + command_line /usr/lib/nagios/plugins/check_tcp -H '$HOSTADDRESS$' -p '$ARG1$' + +Now that the syntax is available, TCP port 80 can be checked as follows. + + root@nagios:~# /usr/lib/nagios/plugins/check_tcp -H 10.10.10.1 -p 80 + +---------- + + TCP OK - 0.000 second response time on port 80|time=0.000222s;;;0.000000;10.000000 + +### Example Topology ### + +In this tutorial, the following three servers are being used. Each server runs one or more common services. The Nagios server is running on Ubuntu. + +- Server 1 (10.10.10.1) : MySQL, Apache2 +- Server 2 (10.10.10.2) : Postfix, Apache2 +- Server 3 (10.10.10.3): DNS + +First, the servers are defined in Nagios. + + root@nagios:~# vim /etc/nagios3/conf.d/example.cfg + +---------- + + define host{ + use generic-host + host_name test-server-1 + alias test-server-1 + address 10.10.10.1 + } + + define host{ + use generic-host + host_name test-server-2 + alias test-server-2 + address 10.10.10.2 + } + + define host{ + use generic-host + host_name test-server-3 + alias test-server-3 + address 10.10.10.3 + } + +### Monitor MySQL Service ### + +#### MySQL Monitoring Requirements #### + +- Monitor whether MySQL is running by checking port 3306. +- Monitor the availability of certain database 'testDB'. + +#### MySQL Server Setting #### + +When it comes to checking MySQL, it should be kept in mind that MySQL, by default, listens on only the loopback interface 127.0.0.1. This increases the security of the database. Manual tuning is needed to tell MySQL to listen on other interfaces as well. Here is how it can be done. + +This setting is done on all MySQL servers. + + root@nagios:~# vim /etc/mysql/my.cnf + +The following line is commented out to make MySQL listens on all interfaces. + + #bind-address = 127.0.0.1 + +Also, MySQL would not let just any host to connect to it. A user 'nagios' is created for both localhost and for 'any' host. This user is then granted all permission to all databases and will be used for monitoring. + +The following settings are done for all MySQL servers. + + root@nagios:~# mysql -u root –p + ## MySQL root password here ## + +A user 'nagios@localhost' is created in MySQL server. + + mysql> CREATE USER 'nagios'@'localhost' IDENTIFIED BY 'nagios-pass'; + mysql> GRANT ALL PRIVILEGES ON *.* TO 'nagios'@'localhost'; + +A user 'nagios@any-host' is created. + + mysql> CREATE USER 'nagios'@'%' IDENTIFIED BY 'nagios-pass'; + mysql> GRANT ALL PRIVILEGES ON *.* TO 'nagios'@'%'; + + mysql> FLUSH PRIVILEGES; + +This should enable MySQL to listen on all interfaces, as well as accept incoming connections from user 'nagios' at any host. + +Note that there are possible security implications of this change, so it's worth mentioning a few words: + +- This setting will expose MySQL to all available interfaces, including WAN. It is vital to make sure only legitimate networks have access to the database. Filters such as firewall and TCP wrappers should be used. +- The MySQL 'nagios' user password should be very strong. If there are few Nagios servers, then MySQL user 'nagios@servername' should be created instead of 'nagios@%' i.e., any host. + +#### Nagios Configuration for MySQL #### + +The following tuning should do the trick. + + root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg + +---------- + + define service{ + use generic-service + host_name test-server-1 + ;hostgroup can be used instead as well + + service_description Check MYSQL via TCP port + check_command check_tcp!3306 + } + + define service{ + use generic-service + host_name test-server-1 + ;hostgroup can be used instead as well + + service_description Check availability of database 'testDB' + check_command check_mysql_database!nagios!nagios-pass!testDB + ;check_mysql!userName!userPassword!databaseName + } + +This way, Nagios can help monitor the accessibility of both MySQL servers and the database stored within the servers. + +### Monitor Apache Web Server ### + +Nagios can be used to monitor Apache web server as well. + +#### Apache Monitoring Requirements #### + +- Monitor whether the apache server is available. + +This task is really easy as Nagios has a built-in command for this. + + root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg + +---------- + + define service{ + use generic-service + host_name test-server-1, test-server-2 + service_description Check Apache Web Server + check_command check_http + } + +Now that was really simple. + +### Monitor DNS Service ### + +Nagios can monitor DNS service by asking the DNS server to either resolve a specific fully qualified domain name (FQDN), or by asking the server to use the dig tool. The default FQDN used for testing is www.google.com, but it can be changed as needed. The following file can be modified to do the job. + + root@nagios:~# vim /etc/nagios-plugins/config/dns.cfg + +---------- + + ## The -H portion can be modified to replace Google ## + define command{ + command_name check_dns + command_line /usr/lib/nagios/plugins/check_dns -H www.google.com -s '$HOSTADDRESS$' + } + +Then edit the following file. + + root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg + +---------- + + ## Nagios asks server-3 to resolve the IP for google.com ## + define service{ + use generic-service + host_name test-server-3 + service_description Check DNS + check_command check_dns + } + + ## Nagios asks server-3 to dig google.com ## + define service{ + use generic-service + host_name test-server-3 + service_description Check DNS via dig + check_command check_dig!www.google.com + } + +### Monitor Mail Server ### + +Nagios can monitor different mail server components like SMTP, POP, IMAP and mailq. As mentioned earlier, server-2 has postfix mail server set up on it. Nagios will be configured to monitor SMTP and mail queue of the server. + + root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg + +---------- + + define service{ + use generic-service + host_name test-server-2 + service_description Check SMTP + check_command check_smtp + } + + define service{ + use generic-service + host_name test-server-2 + service_description Check Mail Queue + check_command check_mailq_postfix!50!100 + ;warning at 50, critical at 100 + } + +The following screenshot shows a complete overview of all the service checks that have been configured so far. + +![](http://farm8.staticflickr.com/7333/11428095956_2868bbdfcc_z.jpg) + +### Port Based Monitoring for Custom Applications ### + +Let us assume that the following custom application is also running in the network, listening on a particular port. + +- Test Server 1: custom application (TCP Port 12345) + +With a little tweaking, Nagios can help monitor this application port as well. + + root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg + +---------- + + define service{ + use generic-service + host_name test-server-1 + service_description Check server 1 custom application + check_command check_tcp!12345 + } + +On a finishing note, Nagios can monitor many other sectors of a network. The scripts stored in /etc/nagios-plugins/config/ can shed some light on the awesome capabilities of Nagios. + +Some of the scripts provided with Nagios are restricted to the local server only. Examples include server load, number of concurrent processes, number of logged in users. These checks can provide useful insight on what is going on within the Nagios server. + +Hope this helps. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/monitor-common-services-nagios.html + +作者:[Sarmed Rahman][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/sarmed +[1]:http://xmodulo.com/install-configure-nagios-linux.html \ No newline at end of file From d0b4c00bcf19407c00311a5b18d61cdc966dd93d Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 1 Jun 2015 20:44:34 +0800 Subject: [PATCH 1027/2517] translating --- .../tech/20150601 How to monitor common services with Nagios.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150601 How to monitor common services with Nagios.md b/sources/tech/20150601 How to monitor common services with Nagios.md index 95b0984adb..4d6eda7719 100644 --- a/sources/tech/20150601 How to monitor common services with Nagios.md +++ b/sources/tech/20150601 How to monitor common services with Nagios.md @@ -1,3 +1,5 @@ +translating----geekpi + How to monitor common services with Nagios ================================================================================ Nagios comes with a wide range of built-in scripts for monitoring services. This tutorial will cover the process of using some of these scripts for checking common services, such as MySQL, Apache web server, DNS, etc. From 07975c3b218b8db7d94329d27104283b12c6ba5b Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 1 Jun 2015 21:44:54 +0800 Subject: [PATCH 1028/2517] translating --- ... to monitor common services with Nagios.md | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) rename {sources => translated}/tech/20150601 How to monitor common services with Nagios.md (51%) diff --git a/sources/tech/20150601 How to monitor common services with Nagios.md b/translated/tech/20150601 How to monitor common services with Nagios.md similarity index 51% rename from sources/tech/20150601 How to monitor common services with Nagios.md rename to translated/tech/20150601 How to monitor common services with Nagios.md index 4d6eda7719..2898a57ad0 100644 --- a/sources/tech/20150601 How to monitor common services with Nagios.md +++ b/translated/tech/20150601 How to monitor common services with Nagios.md @@ -1,22 +1,20 @@ -translating----geekpi - -How to monitor common services with Nagios +如何用Nagios监控服务 ================================================================================ -Nagios comes with a wide range of built-in scripts for monitoring services. This tutorial will cover the process of using some of these scripts for checking common services, such as MySQL, Apache web server, DNS, etc. +Nagios内置了很多脚本来监控服务。本篇会使用其中一些来检查通用服务如MySql、Apache、DNS等等。 -To keep the article focused on service monitoring, we will not be configuring hostgroups or templates, as they have been covered in a [previous tutorial][1]. Nonetheless, they can be tuned to match the requirements. +为了保证本篇集中在系统监控,我们不会配置hostgroup或者模板,它们已经在 [前面的教程][1]中覆盖了,它们可以满足这些条件了。 -### Running Nagios Check in CLI ### +### 在命令行中运行Nagios ### -It is generally recommended to run the Nagios service check scripts in CLI before adding them to Nagios. This will give an idea on whether the execution will be successful and what the output of the script will look like. +通常建议在添加到Nagios前现在命令行中运行Nagios服务检测脚本。它会给出执行是否成功以及脚本的输出将会看上去的样子。 -All of the scripts are located at /etc/nagios-plugins/config/ with the executable files stored at /usr/lib/nagios/plugins/ +这些脚本存储在 /etc/nagios-plugins/config/ ,可执行文件在 /usr/lib/nagios/plugins/。 -Here is how it is done. +下面就是该怎么做 root@nagios:~# cd /etc/nagios-plugins/config/ -The provided scripts contain help on the syntax. The example contains partial output. +提供的脚本包含了语法帮助。示例包含了部分输出。 root@nagios:~# cat /etc/nagios-plugins/config/tcp_udp.cfg @@ -27,7 +25,7 @@ The provided scripts contain help on the syntax. The example contains partial ou command_name check_tcp command_line /usr/lib/nagios/plugins/check_tcp -H '$HOSTADDRESS$' -p '$ARG1$' -Now that the syntax is available, TCP port 80 can be checked as follows. +了解了语法,TCP 80端口可以用下面的方法检查。 root@nagios:~# /usr/lib/nagios/plugins/check_tcp -H 10.10.10.1 -p 80 @@ -35,15 +33,15 @@ Now that the syntax is available, TCP port 80 can be checked as follows. TCP OK - 0.000 second response time on port 80|time=0.000222s;;;0.000000;10.000000 -### Example Topology ### +### 示例拓扑 ### -In this tutorial, the following three servers are being used. Each server runs one or more common services. The Nagios server is running on Ubuntu. +本片中使用下面三台服务器。每台服务器运行多个通用服务。Nagios服务器现在运行的是Ubuntu。 - Server 1 (10.10.10.1) : MySQL, Apache2 - Server 2 (10.10.10.2) : Postfix, Apache2 - Server 3 (10.10.10.3): DNS -First, the servers are defined in Nagios. +首先,服务器被定义在了Nagios中。 root@nagios:~# vim /etc/nagios3/conf.d/example.cfg @@ -70,54 +68,54 @@ First, the servers are defined in Nagios. address 10.10.10.3 } -### Monitor MySQL Service ### +### 监控MySQL服务 ### -#### MySQL Monitoring Requirements #### +#### MySQL 监控需要 #### -- Monitor whether MySQL is running by checking port 3306. -- Monitor the availability of certain database 'testDB'. +- 通过检查3306端口来检测MySQL是否运行中。 +- 检测特定的数据库'testDB'是否可用。 -#### MySQL Server Setting #### +#### MySQL 服务器设置 #### -When it comes to checking MySQL, it should be kept in mind that MySQL, by default, listens on only the loopback interface 127.0.0.1. This increases the security of the database. Manual tuning is needed to tell MySQL to listen on other interfaces as well. Here is how it can be done. +开始检测MySQL时,需要记住MySQL默认只监听回环接口127.0.0.1。这增加了数据库的安全。手动调节需要告诉MySQL该监听什么其他接口。下面是该怎么做。 -This setting is done on all MySQL servers. +这个设置在所有的MySQL服务器上已经做了。 root@nagios:~# vim /etc/mysql/my.cnf -The following line is commented out to make MySQL listens on all interfaces. +下面这行被注释掉了来监听所有接口。 #bind-address = 127.0.0.1 -Also, MySQL would not let just any host to connect to it. A user 'nagios' is created for both localhost and for 'any' host. This user is then granted all permission to all databases and will be used for monitoring. +同样,MySQL将不会运行任何主机来连接到它。在本机和任意主机都创建了用户‘nagios’。这个用户接着在所有的数据库中被授予所有的权限,这将在会用在监控中。 -The following settings are done for all MySQL servers. +下面的设置对所有的MySQL服务器都已经设置。 root@nagios:~# mysql -u root –p ## MySQL root password here ## -A user 'nagios@localhost' is created in MySQL server. +'nagios@localhost'用户在MySQL服务器中创建了。 mysql> CREATE USER 'nagios'@'localhost' IDENTIFIED BY 'nagios-pass'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'nagios'@'localhost'; -A user 'nagios@any-host' is created. +'nagios@any-host'用户创建了。 mysql> CREATE USER 'nagios'@'%' IDENTIFIED BY 'nagios-pass'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'nagios'@'%'; mysql> FLUSH PRIVILEGES; -This should enable MySQL to listen on all interfaces, as well as accept incoming connections from user 'nagios' at any host. +这使MySQL监听所有的接口,同样接受来自用户'nagios'的进入链接。 -Note that there are possible security implications of this change, so it's worth mentioning a few words: +请注意,这种变化可能有安全隐患,所以需要说几句话: -- This setting will expose MySQL to all available interfaces, including WAN. It is vital to make sure only legitimate networks have access to the database. Filters such as firewall and TCP wrappers should be used. -- The MySQL 'nagios' user password should be very strong. If there are few Nagios servers, then MySQL user 'nagios@servername' should be created instead of 'nagios@%' i.e., any host. +- 这个设置将会暴露MySQL给所有的接口,包括WAN。确保只有合法的网络访问是非常重要的。应该使用防火墙和TCP封装器等过滤器。 +- MySQL用户‘nagios’的密码应该非常强。如果只有几台Nagios服务器,那么应该创建'nagios@servername'用户而不是任意用户的'nagios@%'。 -#### Nagios Configuration for MySQL #### +#### 对MySQL的NAgios配置 #### -The following tuning should do the trick. +用下面的来做一些调整。 root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg @@ -142,17 +140,17 @@ The following tuning should do the trick. ;check_mysql!userName!userPassword!databaseName } -This way, Nagios can help monitor the accessibility of both MySQL servers and the database stored within the servers. +这样,Nagios就可以同时监控MySQL服务器和数据库的可用性。 -### Monitor Apache Web Server ### +### 监控Apache服务器 ### -Nagios can be used to monitor Apache web server as well. +Nagios同样也可以监控Apache服务。 -#### Apache Monitoring Requirements #### +#### Apache监控需要 #### -- Monitor whether the apache server is available. +- 监控apache是否可用 -This task is really easy as Nagios has a built-in command for this. +这个任务非常简单因为Nagios有一个内置命令。 root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg @@ -165,11 +163,11 @@ This task is really easy as Nagios has a built-in command for this. check_command check_http } -Now that was really simple. +现在就非常简单了。 -### Monitor DNS Service ### +### 监控DNS服务 ### -Nagios can monitor DNS service by asking the DNS server to either resolve a specific fully qualified domain name (FQDN), or by asking the server to use the dig tool. The default FQDN used for testing is www.google.com, but it can be changed as needed. The following file can be modified to do the job. +Nagios通过向DNS服务器查询一个完全合格域名(FQDN),或者使用dig工具来查询。默认用于FQDN的是www.google.com,但是这个可以按需改变。按照下面的文件修改来完成这个任务。 root@nagios:~# vim /etc/nagios-plugins/config/dns.cfg @@ -181,7 +179,7 @@ Nagios can monitor DNS service by asking the DNS server to either resolve a spec command_line /usr/lib/nagios/plugins/check_dns -H www.google.com -s '$HOSTADDRESS$' } -Then edit the following file. +编辑下面的行。 root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg @@ -203,9 +201,10 @@ Then edit the following file. check_command check_dig!www.google.com } -### Monitor Mail Server ### +### 监控邮件服务器 ### + +Nagios可以监控不同的邮件服务组件如SMTP、POP、IMAP和mailq。之前提过,server-2设置了后缀邮件服务。Nagios将被配置来监控SMTP和邮件队列。 -Nagios can monitor different mail server components like SMTP, POP, IMAP and mailq. As mentioned earlier, server-2 has postfix mail server set up on it. Nagios will be configured to monitor SMTP and mail queue of the server. root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg @@ -226,17 +225,17 @@ Nagios can monitor different mail server components like SMTP, POP, IMAP and mai ;warning at 50, critical at 100 } -The following screenshot shows a complete overview of all the service checks that have been configured so far. +下面的截屏显示了目前配置监控服务的概览。 ![](http://farm8.staticflickr.com/7333/11428095956_2868bbdfcc_z.jpg) -### Port Based Monitoring for Custom Applications ### +### 基于端口自定义监控程序 ### -Let us assume that the following custom application is also running in the network, listening on a particular port. +让我们假设下面的自定义程序同样运行在网络中,监听一个特定的端口。 -- Test Server 1: custom application (TCP Port 12345) +- 测试1号服务器:自定义程序(TCP端口 12345) -With a little tweaking, Nagios can help monitor this application port as well. +过一些小的调整,Nagios也可以帮助监控这个程序。 root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg @@ -249,18 +248,19 @@ With a little tweaking, Nagios can help monitor this application port as well. check_command check_tcp!12345 } -On a finishing note, Nagios can monitor many other sectors of a network. The scripts stored in /etc/nagios-plugins/config/ can shed some light on the awesome capabilities of Nagios. +在完结之前,Nagios可以监控网络很多其他的方面。存储在/etc/nagios-plugins/config/中的脚本为Nagios很棒的能力。 -Some of the scripts provided with Nagios are restricted to the local server only. Examples include server load, number of concurrent processes, number of logged in users. These checks can provide useful insight on what is going on within the Nagios server. -Hope this helps. +一些Nagios提供的脚本被限制在本地服务器。例子包含服务负载、进程并发数量、登录用户数量。这些检查可以提供Nagios服务器内有用的信息。 + +希望这篇有用。 -------------------------------------------------------------------------------- via: http://xmodulo.com/monitor-common-services-nagios.html 作者:[Sarmed Rahman][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 0be6f529e6ad5fa16e56ae9d23c6c96848d1e9bb Mon Sep 17 00:00:00 2001 From: joeren Date: Tue, 2 Jun 2015 08:21:55 +0800 Subject: [PATCH 1029/2517] Update 20150601 How to monitor Linux servers with SNMP and Cacti.md --- ...0150601 How to monitor Linux servers with SNMP and Cacti.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md b/sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md index ab6c7f0f30..82998d5ba4 100644 --- a/sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md +++ b/sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to monitor Linux servers with SNMP and Cacti ================================================================================ SNMP (or Simple Network Management Protocol) is used to gather data on what is going on within a device, such as load, hard disk states, bandwidth. These data are used by network monitoring tools such as Cacti to generate graphs for monitoring purposes. @@ -178,4 +179,4 @@ via: http://xmodulo.com/monitor-linux-servers-snmp-cacti.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/install-configure-cacti-linux.html \ No newline at end of file +[1]:http://xmodulo.com/install-configure-cacti-linux.html From 8bafe42245e29851585d573fa5f716988e520cf0 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 2 Jun 2015 09:27:03 +0800 Subject: [PATCH 1030/2517] [Translated]20150601 How to monitor Linux servers with SNMP and Cacti.md --- ...nitor Linux servers with SNMP and Cacti.md | 182 ------------------ ...nitor Linux servers with SNMP and Cacti.md | 181 +++++++++++++++++ 2 files changed, 181 insertions(+), 182 deletions(-) delete mode 100644 sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md create mode 100644 translated/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md diff --git a/sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md b/sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md deleted file mode 100644 index 82998d5ba4..0000000000 --- a/sources/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md +++ /dev/null @@ -1,182 +0,0 @@ -Translating by GOLinux! -How to monitor Linux servers with SNMP and Cacti -================================================================================ -SNMP (or Simple Network Management Protocol) is used to gather data on what is going on within a device, such as load, hard disk states, bandwidth. These data are used by network monitoring tools such as Cacti to generate graphs for monitoring purposes. - -In a typical deployment of Cacti and SNMP, there will be one or more SNMP-enabled devices, and a separate monitoring server where Cacti collects SNMP feeds from those devices. Please keep in mind that all the devices that need to be monitored must be SNMP enabled. In this tutorial, we will be configuring Cacti and SNMP on the same Linux server for demonstration purpose. - -### Configure SNMP on Debian or Ubuntu ### - -To install SNMP agent (snmpd) on a Debian-based system, run the following command. - - root@server:~# apt-get install snmpd - -Then edit its configuration like the following. - - root@server:~# vim /etc/snmp/snmpd.conf - ----------- - - # this will make snmpd listen on all interfaces - agentAddress udp:161 - - # a read only community 'myCommunity' and the source network is defined - rocommunity myCommunity 172.17.1.0/24 - - sysLocation Earth - sysContact email@domain.tld - -After editing the config file, restart snmpd. - - root@server:~# service snmpd restart - -### Configure SNMP on CentOS or RHEL ### - -To install SNMP tools and libraries, run the following command. - - root@server:~# sudo yum install net-snmp - -Then edit an SNMP config file like the following. - - root@server:~# vim /etc/snmp/snmpd.conf - ----------- - - # A user 'myUser' is being defined with the community string 'myCommunity' and source network 172.17.1.0/24 - com2sec myUser 172.17.1.0/24 myCommunity - - # myUser is added into the group 'myGroup' and the permission of the group is defined - group myGroup v1 myUser - group myGroup v2c myUser - view all included .1 - access myGroup "" any noauth exact all all none - ----------- - - root@server:~# service snmpd restart - root@server:~# chkconfig snmpd on - -Restart snmpd service, and add it to startup service list. - -### Testing SNMP ### - -SNMP can be tested by running the snmpwalk command. If SNMP has been successfully configured, this command will generate a ton of output. - - root@server:~# snmpwalk -c myCommunity 172.17.1.44 -v1 - ----------- - - iso.3.6.1.2.1.1.1.0 = STRING: "Linux mrtg 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64" - iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10 - iso.3.6.1.2.1.1.3.0 = Timeticks: (2097) 0:00:20.97 - - ~~ OUTPUT TRUNCATED ~~ - - iso.3.6.1.2.1.92.1.1.2.0 = Gauge32: 1440 - iso.3.6.1.2.1.92.1.2.1.0 = Counter32: 1 - iso.3.6.1.2.1.92.1.2.2.0 = Counter32: 0 - iso.3.6.1.2.1.92.1.3.1.1.2.7.100.101.102.97.117.108.116.1 = Timeticks: (1) 0:00:00.01 - iso.3.6.1.2.1.92.1.3.1.1.3.7.100.101.102.97.117.108.116.1 = Hex-STRING: 07 DD 0B 12 00 39 27 00 2B 06 00 - -### Configure Cacti with SNMP ### - -In this tutorial, we are setting up both Cacti and SNMP on the same Linux server. So go ahead and [install Cacti][2] on your Linux server on which SNMP was just configured. - -After installation, Cacti web interface can be accessed using the link "http://172.17.1.44/cacti", of course, in your case, the IP address of your server. - -![](http://farm6.staticflickr.com/5512/10972747655_0298f6ce6c_z.jpg) - -![](http://farm6.staticflickr.com/5532/10972982543_67e15433b8_z.jpg) - -The paths during Cacti installation are usually correct. But they can be double checked if necessary. - -![](http://farm4.staticflickr.com/3764/10972920304_138670d3cf_z.jpg) - -During the first-time installation, the default username and password for Cacti are "admin" and "admin". You will be forced to change the password after first login. - -![](http://farm6.staticflickr.com/5542/10972747775_531fe445ef_o.png) - -### Add and Manage Devices to Cacti ### - -Cacti will poll devices based on SNMP string that was configured earlier. In this tutorial, we will add only the local server where SNMP is already enabled. - -To add devices, we login as admin and go to console in the Cacti admin panel. We click Console > Devices. - -![](http://farm8.staticflickr.com/7411/10972747855_b464972e56_z.jpg) - -There may already be a device named 'localhost'. We do not need it as we will create fresh graphs. We can delete this device from the list. We add a new device by using the 'add' button. - -![](http://farm8.staticflickr.com/7373/10972747895_977e0eccd6_z.jpg) - -Next, we set the device parameters. - -![](http://farm8.staticflickr.com/7400/10972747935_df03500de7_z.jpg) - -Now that the device has been added, we specify the graph templates that we want to create. This section can be found in the bottom section of the page. - -![](http://farm4.staticflickr.com/3773/10972747955_083101e6ab_z.jpg) - -And then we proceed to creating the graphs. - -![](http://farm4.staticflickr.com/3734/10972747985_fae6b78888.jpg) - -Here, we create graphs for load average, RAM and hard disk, processor. - -![](http://farm8.staticflickr.com/7374/10972920484_ed6b33b8b8_z.jpg) - -### Interface Graphs and 64-bit Counters ### - -By default, Cacti uses 32-bit counters in SNMP queries. 32-bit counters are sufficient for most bandwidth graphs, but they do not work correctly for graphs greater than 100 Mbps. If it is known that the bandwidth will exceed more than 100 Mbps, it is always advisable to use 64-bit counters. Using 64-bit counters is not hard at all. - -![](http://farm8.staticflickr.com/7320/10972982813_120fe1f3d0_z.jpg) - -**Note**: It takes around 15 minutes for Cacti to populate new graphs. There are not alternatives to being patient. - -### Creating Graph Trees ### - -These snapshots illustrate how to create graph trees and how to add graph to those trees. - -![](http://farm8.staticflickr.com/7429/10972748045_ca06bec889_z.jpg) - -![](http://farm3.staticflickr.com/2833/10972920584_f33624862a_z.jpg) - -![](http://farm6.staticflickr.com/5548/10972836666_f31e4de0e7_z.jpg) - -![](http://farm4.staticflickr.com/3786/10972836776_1675611740_z.jpg) - -We can verify the graph in the graph tree. - -![](http://farm4.staticflickr.com/3707/10972836836_3dabe56765_z.jpg) - -### User Management ### - -Finally, we create a user with view permission to only the graph that we have created. Cacti has built in user management system, and it is highly customizable. - -![](http://farm8.staticflickr.com/7313/10972920624_61e13157f9_z.jpg) - -![](http://farm6.staticflickr.com/5536/10972920644_59a9797685_z.jpg) - -![](http://farm3.staticflickr.com/2872/10972920744_24f75fb5a8_z.jpg) - -After completing these steps, we can log in with the user 'user1' and verify that only this user is able to view the graph. - -![](http://farm8.staticflickr.com/7423/10972748265_c2608b3683_z.jpg) - -![](http://farm4.staticflickr.com/3763/10972748335_9cd012c6fe_z.jpg) - -And thus we have deployed a Cacti server in the network monitoring system. Cacti servers are stable, and can deal with tons of graphs without any problems. - -Hope this helps. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/monitor-linux-servers-snmp-cacti.html - -作者:[Sarmed Rahman][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/sarmed -[1]:http://xmodulo.com/install-configure-cacti-linux.html diff --git a/translated/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md b/translated/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md new file mode 100644 index 0000000000..cc76945bd8 --- /dev/null +++ b/translated/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md @@ -0,0 +1,181 @@ +使用SNMP和Cacti监控Linux服务器 +================================================================================ +SNMP(或者叫简单网络管理协议)用于收集设备内部发生的数据,如负载、磁盘状态、带宽之类。像Cacti这样的网络监控工具用这些数据来生成图标以达到监控的目的。 + +在一个典型的Cacti和SNMP部署中,会有一台或多台启用了SNMP的设备,以及一台独立的用来从那些设备收集SNMP回馈的监控服务器。请记住,所有需要监控的设备必须启用SNMP。在本教程中,出于演示目的,我们将在同一台Linux服务器上配置Cacti和SNMP。 + +### 在Debian或Ubuntu上配置SNMP ### + +要安装SNMP代理(snmpd)到基于Debian的系统,请运行以下命令: + + root@server:~# apt-get install snmpd + +然后,如下编辑配置文件。 + + root@server:~# vim /etc/snmp/snmpd.conf + +---------- + + # this will make snmpd listen on all interfaces + agentAddress udp:161 + + # a read only community 'myCommunity' and the source network is defined + rocommunity myCommunity 172.17.1.0/24 + + sysLocation Earth + sysContact email@domain.tld + +在编辑完配置文件后,重启snmpd。 + + root@server:~# service snmpd restart + +### 在CentOS或RHEL上配置SNMP ### + +要安装SNMP工具和库,请运行以下命令。 + + root@server:~# sudo yum install net-snmp + +然后,如下编辑SNMP配置文件。 + + root@server:~# vim /etc/snmp/snmpd.conf + +---------- + + # A user 'myUser' is being defined with the community string 'myCommunity' and source network 172.17.1.0/24 + com2sec myUser 172.17.1.0/24 myCommunity + + # myUser is added into the group 'myGroup' and the permission of the group is defined + group myGroup v1 myUser + group myGroup v2c myUser + view all included .1 + access myGroup "" any noauth exact all all none + +---------- + + root@server:~# service snmpd restart + root@server:~# chkconfig snmpd on + +重启snmpd服务,然后添加到启动服务列表。 + +### 测试SNMP ### + +SNMP可以通过运行snmpwalk命令进行测试。如果SNMP已经配置成功,该命令会生成大量输出。 + + root@server:~# snmpwalk -c myCommunity 172.17.1.44 -v1 + +---------- + + iso.3.6.1.2.1.1.1.0 = STRING: "Linux mrtg 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64" + iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10 + iso.3.6.1.2.1.1.3.0 = Timeticks: (2097) 0:00:20.97 + + ~~ OUTPUT TRUNCATED ~~ + + iso.3.6.1.2.1.92.1.1.2.0 = Gauge32: 1440 + iso.3.6.1.2.1.92.1.2.1.0 = Counter32: 1 + iso.3.6.1.2.1.92.1.2.2.0 = Counter32: 0 + iso.3.6.1.2.1.92.1.3.1.1.2.7.100.101.102.97.117.108.116.1 = Timeticks: (1) 0:00:00.01 + iso.3.6.1.2.1.92.1.3.1.1.3.7.100.101.102.97.117.108.116.1 = Hex-STRING: 07 DD 0B 12 00 39 27 00 2B 06 00 + +### 配置带有SNMP的Cacti ### + +在本教程中,我们将在同一台Linux服务器上设置Cacti和SNMP。所以,去[安装Cacti][2]到刚刚配置SNMP的Linux服务器上吧。 + +安装完后,Cacti网页接口可以通过“http://172.17.1.44/cacti”来访问,当然,在你的环境中,请将IP地址换成你的服务器的地址。 + +![](http://farm6.staticflickr.com/5512/10972747655_0298f6ce6c_z.jpg) + +![](http://farm6.staticflickr.com/5532/10972982543_67e15433b8_z.jpg) + +安装过程中Cacti的路径一般都是正确的,但是如有必要,请再次检查以下。 + +![](http://farm4.staticflickr.com/3764/10972920304_138670d3cf_z.jpg) + +在首次安装过程中,Cacti默认的用户名和密码是“admin”和“admin”。在首次登录后会强制你修改密码。 + +![](http://farm6.staticflickr.com/5542/10972747775_531fe445ef_o.png) + +### 添加设备到Cacti并管理 ### + +Cacti将根据先前配置的SNMP字符串注册设备。在本教程中,我们将只添加启用了SNMP的本地服务器。 + +要添加设备,我们必须以管理员登录,然后转到Cacti管理员面板中的控制台。点击控制台 > 设备。 + +![](http://farm8.staticflickr.com/7411/10972747855_b464972e56_z.jpg) + +那里可能已经有一个名为‘localhost’的设备。我们不需要它,因为我们要创建全新的图表。我们可以将该设备从列表中删除,使用“添加”按钮来添加新设备。 + +![](http://farm8.staticflickr.com/7373/10972747895_977e0eccd6_z.jpg) + +接下来,我们设置设备参数。 + +![](http://farm8.staticflickr.com/7400/10972747935_df03500de7_z.jpg) + +由于设备已经添加,我们来指定想要创建的图表模板。你可以在该页的最后章节中找到本节内容。 + +![](http://farm4.staticflickr.com/3773/10972747955_083101e6ab_z.jpg) + +然后,我们继续来创建图表。 + +![](http://farm4.staticflickr.com/3734/10972747985_fae6b78888.jpg) + +这里,我们创建用于平均负载、RAM和硬盘、处理器的图表。 + +![](http://farm8.staticflickr.com/7374/10972920484_ed6b33b8b8_z.jpg) + +### 接口图表和64位计数器 ### + +默认情况下,Cacti在SNMP查询中使用32位计数器。32位计数器对于大多数带宽图表而言已经足够了,但是对于超过100Mbps的带宽,它就无能为力了。如果已经知道带宽会超过100Mbps,建议你使用64位计数器。使用64位计数器一点也不麻烦。 + +![](http://farm8.staticflickr.com/7320/10972982813_120fe1f3d0_z.jpg) + +**注意**: Cacti会花费大约15分钟来产生新图表,除了耐心等待,你别无选择。 + +### 创建图表树 ### + +这些截图展示了如何创建图表树,以及如何添加图表到这些树中。 + +![](http://farm8.staticflickr.com/7429/10972748045_ca06bec889_z.jpg) + +![](http://farm3.staticflickr.com/2833/10972920584_f33624862a_z.jpg) + +![](http://farm6.staticflickr.com/5548/10972836666_f31e4de0e7_z.jpg) + +![](http://farm4.staticflickr.com/3786/10972836776_1675611740_z.jpg) + +我们可以验证图表树中的图表。 + +![](http://farm4.staticflickr.com/3707/10972836836_3dabe56765_z.jpg) + +### 用户管理 ### + +最后,我们创建一个只具有查看我们刚创建的图表权限的用户。Cacti内建了用户管理系统,而且是高度可定制的。 + +![](http://farm8.staticflickr.com/7313/10972920624_61e13157f9_z.jpg) + +![](http://farm6.staticflickr.com/5536/10972920644_59a9797685_z.jpg) + +![](http://farm3.staticflickr.com/2872/10972920744_24f75fb5a8_z.jpg) + +在完成这些步骤后,我们可以使用‘user1’来登录进去,并验证只有该用户可以查看该图表。 + +![](http://farm8.staticflickr.com/7423/10972748265_c2608b3683_z.jpg) + +![](http://farm4.staticflickr.com/3763/10972748335_9cd012c6fe_z.jpg) + +至此,我们在网络监控系统中部署了一台Cacti服务器。Cacti服务器比较稳定,可以处理大量图表而不会出问题。 + +希望本文对你有所帮助。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/monitor-linux-servers-snmp-cacti.html + +作者:[Sarmed Rahman][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://xmodulo.com/install-configure-cacti-linux.html From 3ef2c75aaccdbb960782195af57b2a27c3ce84ce Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Jun 2015 09:41:34 +0800 Subject: [PATCH 1031/2517] PUB:20150310 FAQ--BSD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wwy-hust 翻译的真不错!赞一个 --- published/20150310 FAQ--BSD.md | 78 ++++++++++++++++++++++++++++ translated/talk/20150310 FAQ--BSD.md | 75 -------------------------- 2 files changed, 78 insertions(+), 75 deletions(-) create mode 100644 published/20150310 FAQ--BSD.md delete mode 100644 translated/talk/20150310 FAQ--BSD.md diff --git a/published/20150310 FAQ--BSD.md b/published/20150310 FAQ--BSD.md new file mode 100644 index 0000000000..e9f3d8fedb --- /dev/null +++ b/published/20150310 FAQ--BSD.md @@ -0,0 +1,78 @@ +BSD 的那些事 +================================================================================ +![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq1-large1.png) + +### 假如历史稍有不同,今天你将听到的是“FreeBSD之声”... ### +(LCTT 译注:本文来自“Linux之声(LinuxVoice)”。) + +#### 那么,这个Birsa Seva Dal是怎么回事呢?难道不是一个印度的政治组织么? #### + +真有趣,您查阅了维基百科上“BSD”的消除分歧页面是为了讲上面这个笑话,对么?这里我们在讨论伯克利软件发行版(Berkeley Software Distribution),一个比您想象中用的更广泛的操作系统家族。 + +#### 抱歉,我有点 Hold 不住自己。那么,这些操作系统是怎么回事呢? #### + +今天,主要使用的BSD操作系统有三种。他们都基于Unix,他们都开源,并且大多担任服务器的角色,但也能当作优秀的桌面和工作站。他们运行KDE,Firefox,LibreOffice,Apache,MySQL和许多你能说得出名字的开源软件。它们都很稳定、安全、支持许多不同的硬件。 + +#### 真棒!你刚才在描述GNU/Linux吧 #### + +是的,Linux拥有我刚才提到的所有东西,这也是为什么很多人从来不讨论BSD。在日常的使用中,Linux和BSD并没有太多的不同,这主要是因为他们都以Unix为基础,并共用很多软件。您可以登录进远程主机,在Vim中写一些Python代码,使用Mutt检查您的email,您可能并未意识到您在使用BSD。或许您在咖啡馆里正通过网络终端使用它,但不知道他是BSD。 + +两者最大的区别在于开发模式和许可证,为了解这些,我们需要回到过去。在BSD中,B代表着加利福尼亚大学伯克利分校(University of California, Berkeley),在1980年代,那里是开源的Unix软件的发源地。到了90年代,基于x86的PC变得流行,许多人对在他们的家庭电脑中安装Unix类操作系统产生了兴趣。1992年,一个叫做386BSD的项目在那时发布,提供了上述功能。 + +#### 那么,所有的Linux发行版那个时候在哪里呢? #### + +问得好!您也许知道这一年的前一年(1991),Linus Torvalds已经发布了他的内核,当它与GNU项目结合时,变成了完整的开源操作系统。Linus那时也在关注GNU的内核(Hurd)和386BSD,并且他说过,如果那时两个内核有一个可以正常使用,他可能就不会创造Linux了。所以,90年代的头几年,开源操作系统生机勃勃,没有人知道哪个系统会最终胜出。 + +接下来,BSD遇到了一些麻烦。Unix最初的开发方AT&T试图从他们在操作系统方面的付出中获得一些利益,他们声称BSD侵犯了他们的知识产权。此事最终以1992年的一桩诉讼结束,它极大的抑制了BSD的开发进程。其结果就是,许多BSD源码必须重写,与此同时,GNU/Linux已经丰富了功能,变得稳定和流行了。 + +在90年代早期,BSD被认为比GNU/Linux更加成熟,如果没有那些法律麻烦,他可能已经成为了x86 PC的标准了。今天,我们可能都在使用它而不是Linux。 + +#### 但你提到BSD仍然被广泛的使用,所以它后来有提升么? #### + +是的。386BSD的开发停滞了,但有两只开发团队通过互联网协作并创造了两个独立的成功的项目。FreeBSD成为了使用最广泛的BSD版本,它目前是和Linux最相似的系统,包括桌面和服务器版本。而NetBSD则聚焦于可移植性(今天它可以运行在超过50种不同平台上,均基于同样的代码版本)。另一个版本是OpenBSD,它在NetBSD开始不久就因为开发者的口角而作为NetBSD的分支诞生了,今天,它以专注于安全闻名。多年以来,OpenBSD创建了许多程序,它们都成了Linux的标准部分,比如说OpenSSH - 甚至,现在我们还有了LibreSSL。 + +#### 所以,这三种版本的BSD和Linux发行版相似么? #### + +也是也不是,每个BSD版本都有自己的代码库、不同的开发团队。尽管他们间有许多共用的代码(尤其是硬件驱动)。但他们是各自拥有其特色、优点和缺点的相互独立的操作系统。 + +我们提到过,BSD的开发模式是他们真正和GNU/Linux区别的重要特点。在GNU/Linux中没有人对其整体进行掌控:一些团队在GNU组件方面工作,一些团队在开发内核,一些在开发启动脚本,一些在写手册,一些在写库等等。这样的开发模式通常被称作缺少中央权利的“荒蛮的美国西部”,由发行版负责将所有的东西各自锲合。 + +而BSD则相反,它们从中央化的源代码树中开发并作为一个整体。内核、库、系统组件和文档页都存在一个地方,且以同样的方式使用。许多BSD粉丝声称,这个特点给了操作系统更多的一致性和稳定性。通过我这些年使用BSD的经验来看,我们可以证明手册页已经变得非常完备。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq2-large1.png) + +#### 难道BSD没有使用GNU/Linux的任何东西么? #### + +是的,但除了GCC。几十年来,GNU Compiler Collection已经成为了实际上的Unix系统标准编译器,但FreeBSD最近已经转而使用LLVM/Clang了。值得注意的是BSD还是用了一些其他的开源项目,但它们并属于GNU或者Linux,比如说X Window System(XFree86和X.org)、Perl等等。并且幸亏有像POSIX一样的标准,许多运行在Linux上的程序可以在BSD的许多版本上编译和运行。 + +因此,您可以把LAMP(Linux、Apache、MySQL和PHP)中的L改成FreeBSD,这样可以获得几乎同样的环境,以及一些不同的特性(例如,在文件系统和驱动支持方面)。FreeBSD有一些大型、海量的用户,例如Netflix,每天提供海量的数据。尽管FreeBSD可以做为一个不错的桌面环境,但它的长处在于服务器方面,它拥有超乎寻常的可靠性和网络性能。 + +OpenBSD更倾向用于安全性十分必要的场合,如小型Web服务、文件托管、防火墙和网关。NetBSD是BSD主要发行版中最不流行的一个,它能运行在几乎所有平台上,包括古老的Amigas和Acorn boxes,有时您可以在闭源的网络设备中找到它的身影。 + +#### 等等,怎么会有人将开源代码闭源呢?那在Linux中是不合适的 #### + +对的,这里我们谈到了它与GNU/Linux的主要不同。BSD版本的许可证(很有趣,就叫做BSD许可证)非常不同于我们所知的GPL。对于新手来说,BSD更简短。BSD许可证主要内容是:对这份代码做你想做的事,但要保留它的初始开发者的荣誉,并且如果它搞坏你的电脑时不要提出诉讼。 + +因此,该许可证中没有任何条款强制代码开源,不像GPL,它要求使用这份代码的用户将他们的修改也开源。这一重要的不同引起了互联网上无数的激烈讨论,BSD的粉丝们说他们的许可证更加自由(因为它不那么严格),而GNU/GPL的粉丝说他们的证书才更自由(因为它保留了真正的自由) + +#### 啊呀,不管怎么说,你已经引起了我的兴趣,我在哪里能尝试这些可爱的BSD版本呢? #### + +您大概已经可以猜到这些网站了 – [www.openbsd.org][1]、[www.freebsd.org][2]、[www.netbsd.org][3]。在那里,您可以下载ISO镜像,在VirtualBox中启动它们,然后开始玩耍。如果您已经用了一段时间的Linux,你就会发现这并不难,虽然您需要了解命令行。如果您在寻找一些对新手更加友好的东西,可以试试PC-BSD,PC-BSD([www.pcbsd.org][4])是一个基于FreeBSD的个性化定制版本,它专注于桌面,有美观的图形化安装器和超级简单的软件管理器。 + +祝你玩的愉快! + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/faq-bsd-2/ + +作者:[Mike Saunders][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/mike/ +[1]:http://www.openbsd.org/ +[2]:http://www.freebsd.org/ +[3]:http://www.netbsd.org/ +[4]:http://www.pcbsd.org/ diff --git a/translated/talk/20150310 FAQ--BSD.md b/translated/talk/20150310 FAQ--BSD.md deleted file mode 100644 index 97bcd4f246..0000000000 --- a/translated/talk/20150310 FAQ--BSD.md +++ /dev/null @@ -1,75 +0,0 @@ -BSD -================================================================================ -![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq1-large1.png) - -### ʷвͬڽFreeBSD... ### - -#### ôBirsa Seva Dalôأѵһӡȵ֯ô #### - -ȤάٿϡBSDҳΪ˽Цô۲а棨Berkeley Software Distributionһõĸ㷺IJϵͳ塣 - -#### ǸҿƲסԼôЩϵͳôأ #### - -죬ҪʹõBSDϵͳ֡ǶUnixǶԴҴൣηĽɫҲܵ͹վKDEFirefoxLibreOfficeApacheMySQL˵óֵĿԴǶȶȫ֧಻ͬӲ - -#### ϲ㣡ղGNU/Linux #### - -ǵģLinuxӵҸղᵽжҲΪʲôܶ˴BSDճʹУLinuxBSDû̫IJͬҪΪǶUnixΪúܶԵ¼ԶVimдһЩPython룬ʹMuttemailܲδʶʹBSDڿȹͨնʹ֪BSD - -ڿģͺ֤Ϊ˽ЩҪصȥBSDУBżǴѧУUniversity of California, Berkeley1980ǿԴUnixķԴء90x86PCУ˶ǵļͥаװUnixϵͳȤһ386BSDĿʱṩĹܡ - -#### ôеLinuxаǸʱأ #### - -ʵúãҲ֪һǰLinus TorvaldsѾںˣGNUĿʱĿԴϵͳLinusʱѾڸGNUںˣHurd386BSD̸ʱںһԱճܾͲᴴLinuxˡԣ90ͷ꣬Դϵͳû֪ĸϵͳʤ - -BSDһЩ鷳UnixĿAT&TͼǵĹлһЩ棬BSDַǵ֪ʶȨ1992һ׮ϽBSDĿ̡BSDԴķ֧뱻дʱGNU/LinuxѾḻ˹ܣȶˡ - -90BSD֤GNU/Linuxӳ죬ûЩ鷳ѾΪx86 PCı׼ˡ죬ǿܶʹLinux - -#### ᵽBSDȻ㷺ʹãô #### - -ǵġ386BSDĿͣˣֻŶķʽijɹĿFreeBSDΪʹ㷺BSD汾ĿǰǺLinuxƵϵͳͷ汾ȻNetBSD۽ڿֲԣڳ50ֲͬƽ̨ϣͬĴ汾һ汾OpenBSDNetBSDʼþΪߵĿڽǶΪNetBSDķ֧ˣ죬רעڰȫOpenBSDǶLinuxı׼˵OpenSSH - ԣLibreSSL - -#### ԣְ汾BSDLinuxаô #### - -ҲҲǣÿBSD汾ԼĴ⡢ͬĿŶӡǼ๲õĴ루ӲǸӵɫŵȱ໥IJϵͳ - -ᵽBSDĿģGNU/LinuxҪص㡣GNU/Linuxû˶иһЩŶGNU湤һЩŶڿںˣһЩڿűһЩдֲᣬһЩдȵȡĿģͨȱȨġɷа渺ʹжƺϡ - -BSD෴Ǵ뻯ԴпΪһ塣ںˡ⡢ϵͳĵҳһطͬķʽʹáBSD˿ƣص˲ϵͳһԺȶԡͨЩʹBSDľǿֲ֤ҳѾ÷dz걸 - -![](http://www.linuxvoice.com/wp-content/uploads/2015/02/faq2-large1.png) - -#### ѵBSDûʹGNU/Linuxκζô #### - -ǵģGCCʮGNU Compiler CollectionѾΪʵϵUnixϵͳ׼FreeBSDѾתʹLLVM/ClangˡֵעBSDһЩĿԴĿDzGNULinux˵X Window SystemXFree86X.orgPerlȵȡҿPOSIXһı׼LinuxϵijBSD汾ϱС - -ˣ԰LAMPLinuxApacheMySQLPHPеLijFreeBSDԻüͬĻԼһЩͬԣ磬ļϵͳַ֧棩FreeBSDдûNetflixÿṩݡFreeBSDһõ滷ijڷ棬ӵгѰĿɿԺܡ - -OpenBSDڰȫʮֱҪijϣСWebļйܡǽءNetBSDBSDҪаеһڼƽ̨ϣϵAmigasAcorn boxesʱڱԴ豸ҵӰ - -#### ȵȣô˽ԴԴأLinuxDzʵ #### - -Եģ̸GNU/LinuxҪͬBSD汾֤ȤBSD֤dz֪ͬGPL˵BSD̡BSD֤Ҫǣݴ룬£ĿԱȨ㻵ĵʱҪϡ - -ˣ֤ûκǿƴ뿪ԴGPLҪʹݴûǵ޸ҲԴһҪIJͬ˻ļۣBSDķ˿˵ǵ֤ɣΪôϸ񣩣GNU/GPLķ˿˵ǵ֤ŸɣΪɣ - -#### ѽô˵ѾҵȤܳЩɰBSD汾أ #### - -ѾԲµЩվ C [www.openbsd.org][1][www.freebsd.org][2][www.netbsd.org][3]ISOVirtualBoxǣȻʼˣѾһʱLinuxҪ˽Щⲻ̫ѡѰһЩָѺõĶPC-BSDPC-BSD([www.pcbsd.org][4])һFreeBSDĸԻư汾רע棬۵ͼλװͳ򵥵ף죡 - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/faq-bsd-2/ - -ߣ[Mike Saunders][a] -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ - -[a]:http://www.linuxvoice.com/author/mike/ -[1]:http://www.openbsd.org/ -[2]:http://www.freebsd.org/ -[3]:http://www.netbsd.org/ -[4]:http://www.pcbsd.org/ From 4c2cd82c481a214af932b8044698dfbd1e91999f Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Jun 2015 11:19:30 +0800 Subject: [PATCH 1032/2517] PUB:20150511 Open Source History--Why Did Linux Succeed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @KayGuoWhu 翻译的很不错,点赞 --- ...n Source History--Why Did Linux Succeed.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) rename {translated/talk => published}/20150511 Open Source History--Why Did Linux Succeed.md (61%) diff --git a/translated/talk/20150511 Open Source History--Why Did Linux Succeed.md b/published/20150511 Open Source History--Why Did Linux Succeed.md similarity index 61% rename from translated/talk/20150511 Open Source History--Why Did Linux Succeed.md rename to published/20150511 Open Source History--Why Did Linux Succeed.md index 85b2473719..76b6d03ebe 100644 --- a/translated/talk/20150511 Open Source History--Why Did Linux Succeed.md +++ b/published/20150511 Open Source History--Why Did Linux Succeed.md @@ -1,21 +1,21 @@ 开源旧事:Linux为什么能成功? ================================================================================ -> Linux,这个始于1991年由Lnius Torvalds开发的类Unix操作系统内核已经成为开源世界的中心,人们不禁追问为什么Linux成功了,而包括GNU HURD和BSD在内的那么多相似的项目却失败了? +> Linux,这个始于1991年由Linus Torvalds开发的类Unix操作系统内核已经成为开源世界的中心,人们不禁追问为什么Linux成功了,而包括GNU HURD和BSD在内的那么多相似的项目却失败了? ![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/05/linux.jpg) 自由软件和开源世界的发展史中最令人不解的问题之一是为什么Linux取得了如此辉煌的成功,然而其它同样尝试打造自由开源、类Unix操作系统内核的项目却没能那么成功?这个问题难以回答,但我总结了一些原因,在下面与大家分享。 -不过,首先得明确:当我谈论Linux是一个巨大的成功时所表达的含义。我对Linux成功的定义和对其它类Unix操作系统内核不一样,后者中一些是开源的,一些不是,而且它们繁荣发展的时期是Linux诞生的时期。[GNU][1]的HURD,一个发起于[1991年5月][1]的自由但不是免费的内核,便是其中之一。其它的包括现在大部分人都没听说过的Unix,比如由加州大学伯克利分校开发出来的BSD的各种各样Unix衍生版,由微软主导的Unix系统Xenix,包括Minix在内的学术版本Unix,和在AT&T赞助下开发的最初的Unix。在更早的数十年内,它对于学术界和商业届的计算发展至关重要,但到19世纪90年代就已经几乎已经消失在人们的视野里。 +不过,首先得明确:当我谈论Linux是一个巨大的成功时所表达的含义。我这样说是相对于其它类Unix操作系统内核的,后者中一些是开源的,一些不是,而且它们繁荣发展的时期是Linux诞生的时期。[GNU][1]的HURD,一个发起于[1991年5月][1]的Free(自由)的内核,便是其中之一。其它的包括现在大部分人都没听说过的Unix,比如由加州大学伯克利分校开发出来的BSD的各种各样Unix衍生版,由微软主导的Unix系统Xenix,包括Minix在内的学术版本Unix,和在AT&T赞助下开发的最初的Unix。在更早的数十年内,它对于学术界和商业界的计算发展至关重要,但到19世纪90年代就已经几乎已经消失在人们的视野里。 #### 相关阅读 #### -- [Open Source History: Tracing the Origins of Hacker Culture and the Hacker Ethic][3] -- [Unix and Personal Computers: Reinterpreting the Origins of Linux][4] +- [开源旧事:黑客文化和黑客伦理的起源追踪][3] +- [Unix和个人计算机:重新诠释Linux起源][4] -因此,得说明的是,我所写的是关于内核,而不是完整的操作系统。在很大程度上,Linux内核的成功归功于GNU整个项目。GNU这个项目产生了一套至关重要的工具,包括编译器、调试器和BASH shell的实现,这些对于构建一个类Unix操作系统是必需的。但是GNU的开发者们从没开发出一个HURD内核的可行版本(尽管他们仍在[不懈努力中][5])。相反,Linux呈现出来的则是一个将GNU各个部分紧密连接在一起的内核,尽管这超出了GNU的初衷。 +此外,得说明的是,我这里说的是内核,而不是完整的操作系统。在很大程度上,Linux内核的成功归功于GNU整个项目。GNU这个项目产生了一套至关重要的工具,包括编译器、调试器和BASH shell的实现,这些对于构建一个类Unix操作系统是必需的。但是GNU的开发者们从没开发出一个HURD内核的可行版本(尽管他们仍在[不懈努力中][5])。相反,Linux呈现出来的则是一个将GNU各个部分紧密连接在一起的内核,尽管这超出了GNU的初衷。 -因此,值得人们去追问为什么Linux,一个由Linus Torvalds这个芬兰的无名程序员于1991年——和HURD同一年——发起的内核,能够禁受考验并发展壮大?在当时的大环境下,很多拥有强力商业支持的、由当时炙手可热的黑客领头的类Unix内核都没能够发展起来。为了说明这个问题,我找到了一些和这个问题相关的解释。为此我研究了自由软件和开源世界的发展史,和不同解释的优缺点。 +因此,值得人们去追问为什么Linux,一个由Linus Torvalds这个芬兰的无名程序员于1991年——和HURD同一年——发起的内核,能够经受考验并发展壮大?在当时的大环境下,很多拥有强力商业支持的、由当时炙手可热的黑客领头的类Unix内核都没能够发展起来。为了说明这个问题,我找到了一些和这个问题相关的解释。为此我研究了自由软件和开源世界的发展史,和不同解释的优缺点。 ### Linux采用去中心化的开发方式 ### @@ -25,7 +25,7 @@ ### Linux是实用型的,而GNU是空想型的 ### -个人而言,我觉得下面这个说法是最引人注目的,即Linux之所发展得如此迅速是因为它的创建者是一个实用主义者,他起初只是想写一个内核,使其能够在他家里的电脑上运行一个裁剪过的Unix操作系统,而不是成为以改变世界为目标的自由软件的一部分,而后者正是GNU项目的一贯目标。 +个人而言,我觉得这个说法是最引人注目的,即Linux之所发展得如此迅速是因为它的创建者是一个实用主义者,他起初只是想写一个内核,使其能够在他家里的电脑上运行一个裁剪过的Unix操作系统,而不是成为以改变世界为目标的自由软件的一部分,而后者正是GNU项目的一贯目标。 然而,这个解释仍然有一些不能完全让人信服的地方。特别是,尽管Torvalds本人信奉实用主义的原则,但无论以前还是现在,并非所有参与到他的项目中的成员都和他一样信奉这一原则。尽管如此,Linux仍然取得了成功。 @@ -37,27 +37,27 @@ 当谈到Linux的成功时,不可忽视的是Linux和其它Unix变体之间的诸多技术差异。Richard Stallman,GNU项目的创始人,在一封给我的电子邮件中解释了为什么HURD的开发进度频频滞后:“GNU Hurd确实不是一次实用上的成功。部分原因是它的基本设计使它像是一个研究项目。(我之所以选择这样的设计,是考虑到这是快速实现一个可用内核的捷径。)” -就Torvalds独自编写出Linux的所有代码这点而言,Linux也有别于其它Unix变体。当他在1991年8月[第一次发布Linux][7]时他的一个初衷就是拥有一个属于他自己的Unix,免费共享代码。这点特性使得Linux区别于同时期的大部分Unix变体,后者一般是从AT&T Unix或伯克利的BSD中衍生出基础代码。 +就Torvalds独自编写出Linux的所有代码这点而言,Linux也有别于其它Unix变体。当他在1991年8月[第一次发布Linux][7]时他的一个初衷就是拥有一个属于他自己的Unix,而不用别人的代码。这点特性使得Linux区别于同时期的大部分Unix变体,后者一般是从AT&T Unix或伯克利的BSD中衍生出基础代码。 -我并不是一个计算机科学家,所以我没有资格去评判是否Lunux代码就优于其他Unix代码,以此来解释Linux的成功。虽然这并不能解释Linux和其它Unix内核在文化和人力上的不同,但这个观点对我来说解释得通,因为似乎在理解Linux成功这一点上它比代码更加重要。(译者尽力了+_+) +我并不是一个计算机科学家,所以我没有资格去评判是否Linux代码就优于其他Unix代码,以此来解释Linux的成功。虽然这并不能解释Linux和其它Unix内核在文化和人员上的不同,但这个观点对我来说解释得通,因为似乎在理解Linux成功这一点上操作系统设计比代码更加重要。 ### Linux背后的社区提供了有力支持 ### -Stallman也写到Linux成功的“主要原因”是“Torvalds使Linux成为一个自由软件,所以相比Hurd有更多来自社区的支持涌入Linux的发展中。”但这对于Linux的成长轨迹并非是一个完美的解释,因为它不能说明为什么自由软件的开发者们追随了Torvalds而不是HURD或其它某个Unix。但它仍然突出了这个转变是Linux盛行的很大一部分。(译者尽力了) +Stallman也写到Linux成功的“主要原因”是“Torvalds使Linux成为一个自由软件,所以相比Hurd有更多来自社区的支持涌入Linux的发展中。”但这对于Linux的成长轨迹并非是一个完美的解释,因为它不能说明为什么自由软件的开发者们追随了Torvalds而不是HURD或其它某个Unix,但它仍然点明了这种变化是Linux盛行的很大一部分原因。 -对于自由软件社区支持Linux的决定有一个更全面的理由可以用来解释为什么开发者们这么做。起初,Linux只是一个默默无闻的小项目,以任何标准来衡量,它比同时期其它的一些尝试创建一个更加自由的Unix,比如NET BSD和386/BSD,都要显得微不足道。同样,最初并不清楚Linux和自由软件运行目标的亲和力是怎样。创建伊始,Torvalds只是在一份防止Linux不被商业使用的证书下发布了Linux。至于后来他为了保护源代码的开放性转向使用GNU的通用公开证书则是后话了。 +对于自由软件社区决定支持Linux有一个更全面的理由可以用来解释为什么开发者们这么做。起初,Linux只是一个默默无闻的小项目,以任何标准来衡量,它比同时期其它的一些尝试创建一个更加自由的Unix,比如NET BSD和386/BSD,都要显得微不足道。同样,最初并不清楚Linux和自由软件运动的目标是否一致。创建伊始,Torvalds只是在一份防止Linux不被商业使用的证书下发布了Linux。至于后来他为了保护源代码的开放性转向使用GNU的通用公开证书则是后话了。 -所以,这些就是我所找到的Linux作为一个开源操作系统之所以取得成功的解释,可以肯定Linux的成就在某些方面(但比如桌面版的Linux从未成为它的支持者希望成为的样子)已经是可以衡量的成功。总之,Linux业已以其它任何类Unix操作系统都没有实现的方式成为了计算机世界的基石。也许源于BSD的苹果公司的OS X和iOS系统也很接近这一点,但它们没有在其它方面像Linux影响互联网一样扮演着如此重要的中心角色。 +所以,这些就是我所找到的Linux作为一个开源操作系统之所以取得成功的解释,可以肯定Linux的成就在某些方面(但比如桌面版的Linux从未成为它的支持者希望成为的样子)已经是可以衡量的成功。总之,Linux业已与其它任何类Unix操作系统不同的方式成为了计算机世界的基石。也许源于BSD的苹果公司的OS X和iOS系统也很接近这一点,但它们没有在其它方面像Linux影响互联网一样扮演着如此重要的中心角色。 -对于为什么Linux能成为它已经成为的样子,或者为什么它在Unix世界的竞争对手们几乎全部变得默默无闻的问题你有其它的想法吗?如果有,我很乐意听到你的想法。(诚然,BSD的变体如今仍有一批追随者,而一些商用的Unix对于[Red Hat][8](RHT)为[他们的用户提供支持][9]来说也仍然十分重要。但这些Unix中没有一个能够像Linux一样几乎征服了从Web服务器到智能手机的每一个领域。) +对于为什么Linux能成为现在的样子,或者为什么它在Unix世界的竞争对手们几乎全部变得默默无闻的问题,你有其它的想法吗?如果有,我很乐意听到你的想法。(诚然,BSD的变体如今仍有一批追随者,而一些商用的Unix对于[Red Hat][8](RHT)为[他们的用户提供支持][9]来说也仍然十分重要。但这些Unix中没有一个能够像Linux一样几乎征服了从Web服务器到智能手机的每一个领域。) -------------------------------------------------------------------------------- via: http://thevarguy.com/open-source-application-software-companies/050415/open-source-history-why-did-linux-succeed -作者:[hristopher Tozzi][a] +作者:[Christopher Tozzi][a] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From c37b9c324fca48aae1702077fbafabf1f2a96159 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Tue, 2 Jun 2015 15:25:12 +0800 Subject: [PATCH 1033/2517] finish translation --- ...nds for RPM Package Management in Linux.md | 287 ++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 translated/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md diff --git a/translated/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md b/translated/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md new file mode 100644 index 0000000000..48dd213d68 --- /dev/null +++ b/translated/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md @@ -0,0 +1,287 @@ +27LinuxߡDNFYumķ֧ +================================================================================ +DNFDandified YUMǻRPMķаһߡFedora 18г֣еFedora 22[YUM߼][1] + +![](http://www.tecmint.com/wp-content/uploads/2015/05/linux-dnf-command-examples.jpg) + +DNFڸYUMƿܡڴռáٶȺ档DNFʹRPMlibsolvhawkeyаδԤװCentOSRHEL 7Уͨyumװͬʱʹöߡ + +ҲĶDNFϢ + +- [ʹDNFȡYumԭ][2] + +µDNFȶ汾2015511շ1.0дƪ֮ǰԼDNF֮ǰ汾ҪPythonдGPL v2֤ + +### װDNF ### + +Fedora 22ٷѾɵDNFDNFRHEL/CentOS 7ĬϲֿС + +ΪRHEL/CentOSϵͳаװDNFҪȰװͿepel-releaseֿ⡣ + + # yum install epel-release + + # yum install epel-release -y + +ܲʹyumʱ'-y'ѡΪûǿʲôװϵͳСԴ˲⣬ʹ'-y'ѡԶİװûԤ + +ʹyumepel-realeaseֿⰲװDNF + + # yum install dnf + +װdnfһչʾ27ʵõdnfӣԱ׺͸ЧĹRPMķа档 + +### 1. DNF汾 ### + +ϵͳϰװDNF汾 + + # dnf --version + +![DNF汾](http://www.tecmint.com/wp-content/uploads/2015/05/Check-DNF-Version.gif) + +### 2. гDNFֿ ### + +dnfе'repolist'ѡʾϵͳпIJֿ⡣ + + # dnf repolist + +![пIJֿ](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Enabled-Repositories.gif) + +### 3. гп͹رյDNFֿ ### + +'repolist all'ѡʾϵͳп/رյIJֿ⡣ + + # dnf repolist all + +![гп/رյIJֿ](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Repositories.gif) + +### 4. DNFгпõѰװ ### + +'dnf list'гвֿпõLinuxϵͳѰװ + + # dnf list + +![DNFге](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Packages.png) + +### 5. DNFгѰװ ### + +'dnf list'гвֿпõѰװȻһʹ'list installed'ѡֻгѰװ + + # dnf list installed + +![гѰװ](http://www.tecmint.com/wp-content/uploads/2015/05/List-Installed-Packages.png) + +### 6. DNFгпõ ### + +Ƶģ'list available'ѡгпIJֿпõ + + # dnf list available + +![DNFгõ](http://www.tecmint.com/wp-content/uploads/2015/05/List-Available-Packages.png) + +### 7. ʹDNF ### + +̫밲װ֣£ʹ'search'ѡƥַ磬nanoַ + + # dnf search nano + +![ͨؼ](http://www.tecmint.com/wp-content/uploads/2015/05/Search-Package.gif) + +### 8. 鿴ĸṩijļ/ ### + +dnfѡ'provides'ܲṩijļ/磬Ǹṩϵͳе'/bin/bash'ļʹ + + # dnf provides /bin/bash + +![ṩļ](http://www.tecmint.com/wp-content/uploads/2015/05/Find-Package-Sub-Package.gif) + +### 9. ʹDNFһϸϢ ### + +ڰװһǰ֪ϸϢʹ'info'һϸϢ磺 + + # dnf info nano + +![DNF鿴Ϣ](http://www.tecmint.com/wp-content/uploads/2015/05/Check-Package-Information.gif) + +### 10. ʹDNFװ ### + +밲װһnanoֻΪnanoԶĽͰװе + + # dnf install nano + +![DNFװ](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Package-DNF.gif) + +### 11. ʹDNFһ ### + +ֻһضİ磬systemdұϵͳʣ䡣 + + # dnf update systemd + +![һ](http://www.tecmint.com/wp-content/uploads/2015/05/Update-a-Package.gif) + +### 12. ʹDNFϵͳ ### + +ϵͳаװĸ¿Լ򵥵ʹdnfУ + + # dnf check-update + +![ϵͳ](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-System-Update.gif) + +### 13. ʹDNFװϵͳе ### + +ʹϵͳѰװ + + # dnf update + + # dnf upgrade + +![ϵͳ](http://www.tecmint.com/wp-content/uploads/2015/05/Update-System.gif) + +### 14. ʹDNFƳ/ɾһ ### + +dnfʹ'remove''erase'ѡƳκβҪ + + # dnf remove nano + + # dnf erase nano + +![Ƴϵͳе](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Package.gif) + +### 15. ʹDNFƳõOrphan Packages ### + +ЩΪװӦijɾ㲻Ҫˡùɾ + + # dnf autoremove + +![Ƴõ](http://www.tecmint.com/wp-content/uploads/2015/05/Autoremove-Packages.gif) + +### 16. ʹDNFƳ ### + +ʹdnfʱڵͷͲǻᵼ´ǿʹͰԶ̰Ϣͷ + + # dnf clean all + +![ƳDNF](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Cache-Packages.gif) + +### 17. ضDNFİ ### + +ҪضDNFİ磬cleanͨõ + + # dnf help clean + +![ijһ](http://www.tecmint.com/wp-content/uploads/2015/05/Help-on-DNF-Command.gif) + +### 18. гDNFѡ ### + +ҪʾdnfѡֻҪ + + # dnf help + +![ѡ](http://www.tecmint.com/wp-content/uploads/2015/05/DNF-Options.gif) + +### 19. 鿴DNFʷ¼ ### + +Ե'dnf history'鿴Ѿִйdnfб֪ʲôװ/ƳԼʱ + + # dnf history + +![鿴ʷ¼](http://www.tecmint.com/wp-content/uploads/2015/05/Check-DNF-History.gif) + +### 20. ʾ ### + +'dnf grouplist'ԴӡпõĻѰװûʲôг֪顣 + + # dnf grouplist + +![г](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Group-Packages.gif) + +### 21. ʹDNFװһ ### + +Ҫװһһ飨磬Educational SoftawareֻҪִУ + + # dnf groupinstall 'Educational Software' + +![װһ](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Group-Packages.gif) + +### 22. һ ### + +ͨһ飨磬Educational Software + + # dnf groupupdate 'Educational Software' + +![](http://www.tecmint.com/wp-content/uploads/2015/05/Update-Group-Package.gif) + +### 23. Ƴһ ### + +ʹƳһ飨磬Educational Software + + # dnf groupremove 'Educational Software' + +![Ƴ](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Group-Package.gif) + +### 24. ijضIJֿⰲװһ ### + +DNFԴκضIJֿⰲװһ磬phpmyadmin + + # dnf --enablerepo=epel install phpmyadmin + +![ضIJֿⰲװ](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Package-From-Specific-Repo.gif) + +### 25. Ѱװͬȶа ### + +'dnf distro-sync'ͬѰװпIJֿȶ汾ûѡͬѰװ + + # dnf distro-sync + +![ͬȶ](http://www.tecmint.com/wp-content/uploads/2015/05/Synchronize-Packages.gif) + +### 26. °װһ ### + +'dnf reinstall nano'°װһѾװ磬nano + + # dnf reinstall nano + +![°װ](http://www.tecmint.com/wp-content/uploads/2015/05/Re-Install-Package.gif) + +### 27. һ ### + +ѡ'downgrade'ʹһ磬acpid˵Ͱ汾 + + # dnf downgrade acpid + +ʾ + + Using metadata from Wed May 20 12:44:59 2015 + No match for available package: acpid-2.0.19-5.el7.x86_64 + Error: Nothing to do. + +**ҵĹ۲**dnfᰴԤһΪһbugύ + +### ### + +DNFYUMƷԶоLinuxϵͳԱĹ磺 + +- `--skip-broken`DNFʶ𣬲DNFû +- ܻdnf providesҲû'resolvedep'ˡ +- û'deplist' +- ųһֿζвųòֿ⣬yumУųһֻֿڰװʱųǡ + +LinuxûLinux̬ϵͳ⡣[Systemd滻init system][3]vDNFڲú滻YUMFedora 22RHELCentOS + +ôأDzǷаLinux̬ϵͳעûڳûԸ㣵ķǰأITҵһ仰 - ûлΪʲôҪأSystem VYUMûл + +ƪµȫˡ·˽ı뷨޺ͷ԰Ǵлл + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ + +ߣ[Avishek Kumar][a] +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[2]:http://www.tecmint.com/dnf-next-generation-package-management-utility-for-linux/ +[3]:http://www.tecmint.com/systemd-replaces-init-in-linux/ From 56650caab09ac1277b971b59cedb6c5967b046da Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Jun 2015 15:26:20 +0800 Subject: [PATCH 1034/2517] PUB:20150323 How to set up networking between Docker containers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @bazz2 翻译的不错! --- ...up networking between Docker containers.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) rename {translated/tech => published}/20150323 How to set up networking between Docker containers.md (76%) diff --git a/translated/tech/20150323 How to set up networking between Docker containers.md b/published/20150323 How to set up networking between Docker containers.md similarity index 76% rename from translated/tech/20150323 How to set up networking between Docker containers.md rename to published/20150323 How to set up networking between Docker containers.md index 3481dd8faa..6d8434041e 100644 --- a/translated/tech/20150323 How to set up networking between Docker containers.md +++ b/published/20150323 How to set up networking between Docker containers.md @@ -12,13 +12,13 @@ ![](https://farm8.staticflickr.com/7288/16662287067_27888684a7_b.jpg) -让我们先来看看 weave 怎么工作:先创建一个由多个 peer 组成的对等网络,每个 peer 是一个虚拟路由器容器,叫做“weave 路由器”,它们分布在不同的宿主机上。这个对等网络的每个 peer 之间会维持一个 TCP 链接,用于互相交换拓扑信息,它们也会建立 UDP 链接用于容器间通信。一个 weave 路由器通过桥接技术连接到其他本宿主机上的其他容器。当处于不同宿主机上的两个容器想要通信,一台宿主机上的 weave 路由器通过网桥截获数据包,使用 UDP 协议封装后发给另一台宿主机上的 weave 路由器。 +让我们先来看看 weave 怎么工作:先创建一个由多个 peer 组成的对等网络,每个 peer 是一个虚拟路由器容器,叫做“weave 路由器”,它们分布在不同的宿主机上。这个对等网络的每个 peer 之间会维持一个 TCP 链接,用于互相交换拓扑信息,它们也会建立 UDP 链接用于容器间通信。一个 weave 路由器通过桥接技术连接到本宿主机上的其他容器。当处于不同宿主机上的两个容器想要通信,一台宿主机上的 weave 路由器通过网桥截获数据包,使用 UDP 协议封装后发给另一台宿主机上的 weave 路由器。 -每个 weave 路由器会刷新整个对等网络的拓扑信息,像容器的 MAC 地址(就像交换机的 MAC 地址学习一样获取其他容器的 MAC 地址),因此它可以决定数据包的下一跳是往哪个容器的。weave 能让两个处于不同宿主机的容器进行通信,只要这两台宿主机在 weave 拓扑结构内连到同一个 weave 路由器。另外,weave 路由器还能使用公钥加密技术将 TCP 和 UDP 数据包进行加密。 +每个 weave 路由器会刷新整个对等网络的拓扑信息,可以称作容器的 MAC 地址(如同交换机的 MAC 地址学习一样获取其他容器的 MAC 地址),因此它可以决定数据包的下一跳是往哪个容器的。weave 能让两个处于不同宿主机的容器进行通信,只要这两台宿主机在 weave 拓扑结构内连到同一个 weave 路由器。另外,weave 路由器还能使用公钥加密技术将 TCP 和 UDP 数据包进行加密。 ### 准备工作 ### -在使用 weave 之前,你需要在所有宿主机上安装 Docker[2] 环境,参考[这些][3][教程][4],在 Ubuntu 或 CentOS/Fedora 发行版中安装 Docker。 +在使用 weave 之前,你需要在所有宿主机上安装 [Docker][2] 环境,参考[这些][3][教程][4],在 Ubuntu 或 CentOS/Fedora 发行版中安装 Docker。 Docker 环境部署完成后,使用下面的命令安装 weave: @@ -26,7 +26,7 @@ Docker 环境部署完成后,使用下面的命令安装 weave: $ chmod a+x weave $ sudo cp weave /usr/local/bin -注意你的 PATH 环境变量要包含 /usr/local/bin 这个路径,请在 /etc/profile 文件中加入一行(LCTT 注:要使环境变量生效,你需要执行这个命令: src /etc/profile): +注意你的 PATH 环境变量要包含 /usr/local/bin 这个路径,请在 /etc/profile 文件中加入一行(LCTT 译注:要使环境变量生效,你需要执行这个命令: source /etc/profile): export PATH="$PATH:/usr/local/bin" @@ -34,15 +34,15 @@ Docker 环境部署完成后,使用下面的命令安装 weave: Weave 在 TCP 和 UDP 上都使用 6783 端口,如果你的系统开启了防火墙,请确保这两个端口不会被防火墙挡住。 -### 在每台宿主机上开启 Weave 路由器 ### +### 在每台宿主机上启动 Weave 路由器 ### -当你想要让处于在不同宿主机上的容器能够互相通信,第一步要做的就是在每台宿主机上开启 weave 路由器。 +当你想要让处于在不同宿主机上的容器能够互相通信,第一步要做的就是在每台宿主机上启动 weave 路由器。 -第一台宿主机,运行下面的命令,就会创建并开启一个 weave 路由器容器(LCTT 注:前面说过了,weave 路由器也是一个容器): +第一台宿主机,运行下面的命令,就会创建并开启一个 weave 路由器容器(LCTT 译注:前面说过了,weave 路由器也是一个容器): $ sudo weave launch -第一次运行这个命令的时候,它会下载一个 weave 镜像,这会花一些时间。下载完成后就会自动运行这个镜像。成功启动后,终端会打印这个 weave 路由器的 ID 号。 +第一次运行这个命令的时候,它会下载一个 weave 镜像,这会花一些时间。下载完成后就会自动运行这个镜像。成功启动后,终端会输出这个 weave 路由器的 ID 号。 下面的命令用于查看路由器状态: @@ -52,7 +52,7 @@ Weave 在 TCP 和 UDP 上都使用 6783 端口,如果你的系统开启了防 第一个 weave 路由器就绪了,目前为止整个 peer 对等网络中只有一个 peer 成员。 -你也可以使用 doceker 的命令来查看 weave 路由器的状态: +你也可以使用 docker 的命令来查看 weave 路由器的状态: $ docker ps @@ -66,7 +66,7 @@ Weave 在 TCP 和 UDP 上都使用 6783 端口,如果你的系统开启了防 ![](https://farm8.staticflickr.com/7608/16868571891_e66d4b8841_c.jpg) -当你开启更多路由器,这个 peer 成员列表会更长。当你新开一个路由器时,要指定前一个宿主机的 IP 地址,请注意不是第一个宿主机的 IP 地址。 +当你开启更多路由器,这个 peer 成员列表会更长。当你新开一个路由器时,要指定前一个宿主机的 IP 地址,请注意不是第一个宿主机的 IP 地址(LCTT 译注:链状结构)。 现在你已经有了一个 weave 网络了,它由位于不同宿主机的 weave 路由器组成。 @@ -82,7 +82,7 @@ Weave 在 TCP 和 UDP 上都使用 6783 端口,如果你的系统开启了防 hostA:~$ sudo weave run 10.0.0.1/24 -t -i ubuntu -成功运行后,终端会打印出容器的 ID 号。你可以使用这个 ID 来访问这个容器: +成功运行后,终端会显示出容器的 ID 号。你可以使用这个 ID 来访问这个容器: hostA:~$ docker attach @@ -124,7 +124,7 @@ weave 提供了一些非常巧妙的特性,我在这里作下简单的介绍 ![](https://farm8.staticflickr.com/7639/16247212144_c31a49714d_c.jpg) -现在这个容器可以与 10.10.0.0/24 网络上的其它容器进行通信了。当你要把容器加入一个网络,而这个网络暂时不可用时,上面的步骤就很有帮助了。 +现在这个容器可以与 10.10.0.0/24 网络上的其它容器进行通信了。这在当你创建一个容器而网络信息还不确定时就很有帮助了。 #### 将 weave 网络与宿主机网络整合起来 #### @@ -134,13 +134,13 @@ weave 提供了一些非常巧妙的特性,我在这里作下简单的介绍 hostA:~$ sudo weave expose 10.0.0.100/24 -这个命令把 IP 地址 10.0.0.100 分配给宿主机 hostA,这样一来 hostA 也连到了 10.0.0.0/24 网络上了。很明显,你在为宿主机选择 IP 地址的时候,需要选一个没有被其他容器使用的地址。 +这个命令把 IP 地址 10.0.0.100 分配给宿主机 hostA,这样一来宿主机 hostA 也连到了 10.0.0.0/24 网络上了。显然,你在为宿主机选择 IP 地址的时候,需要选一个没有被其他容器使用的地址。 现在 hostA 就可以访问 10.0.0.0/24 上的所有容器了,不管这些容器是否位于 hostA 上。好巧妙的设定啊,32 个赞! ### 总结 ### -如你所见,weave 是一个很有用的 docker 网络配置工具。这个教程只是[它强悍功能][5]的冰山一角。如果你想进一步玩玩,你可以试试它的以下功能:多跳路由功能,这个在 multi-cloud 环境(LCTT 注:多云,企业使用多个不同的云服务提供商的产品,比如 IaaS 和 SaaS,来承载不同的业务)下还是很有用的;动态重路由功能是一个很巧妙的容错技术;或者它的分布式 DNS 服务,它允许你为你的容器命名。如果你决定使用这个好东西,欢迎分享你的使用心得。 +如你所见,weave 是一个很有用的 docker 网络配置工具。这个教程只是它[强悍功能][5]的冰山一角。如果你想进一步玩玩,你可以试试它的以下功能:多跳路由功能,这个在 multi-cloud 环境(LCTT 译注:多云,企业使用多个不同的云服务提供商的产品,比如 IaaS 和 SaaS,来承载不同的业务)下还是很有用的;动态重路由功能是一个很巧妙的容错技术;或者它的分布式 DNS 服务,它允许你为你的容器命名。如果你决定使用这个好东西,欢迎分享你的使用心得。 -------------------------------------------------------------------------------- From a73979b7f8589bf096efd86edda67678e327e5d6 Mon Sep 17 00:00:00 2001 From: wwy Date: Tue, 2 Jun 2015 15:30:16 +0800 Subject: [PATCH 1035/2517] Update 20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md --- ...DDoS Attacks Using Mod_Security and Mod_evasive Modules.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md b/sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md index 29bb770e5d..325aad1068 100644 --- a/sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md +++ b/sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md @@ -1,3 +1,5 @@ +translating by wwy-hust + Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules ================================================================================ For those of you in the hosting business, or if you’re hosting your own servers and exposing them to the Internet, securing your systems against attackers must be a high priority. @@ -267,4 +269,4 @@ via: http://www.tecmint.com/protect-apache-using-mod_security-and-mod_evasive-on [4]:https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project [5]:https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#Configuration_Directives [6]:https://www.modsecurity.org/ -[7]:http://www.zdziarski.com/blog/?page_id=442 \ No newline at end of file +[7]:http://www.zdziarski.com/blog/?page_id=442 From 98a9939762e13e70cdb70b3426a23f6183d4b83d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 2 Jun 2015 15:57:25 +0800 Subject: [PATCH 1036/2517] =?UTF-8?q?20150602-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e OpenVPN Server-Client on Ubuntu 15.04.md | 305 ++++++++++++++++++ 1 file changed, 305 insertions(+) create mode 100644 sources/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md diff --git a/sources/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md b/sources/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md new file mode 100644 index 0000000000..062a87b211 --- /dev/null +++ b/sources/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md @@ -0,0 +1,305 @@ +Howto Configure OpenVPN Server-Client on Ubuntu 15.04 +================================================================================ +Virtual private network (VPN) is a common name of several technologies which allows to establish a network connection over other network. It called virtual because nodes connected between each over through non physical lines. And it is private due to absence of public access to network without proper rights from of the network owner. + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/vpn_custom_illustration.jpg) + +[OpenVPN][1] software transfer data using TCP and UDP protocols and with help of TUN/TAP drivers. UDP protocol and TUN driver allows to establish connection to OpenVPN server for clients behind NAT. Additionally OpenVPN allows to specify custom port. It provide additional flexibility of configuration and may help in avoiding of firewall restrictions. + +Security and encryption in OpenVPN provided by library OpenSSL and by Transport Layer Security (TLS). TLS is an improved version of SSL protocol. + +OpenSSL provide two kinds of encryption: symmetric and asymmetric. Below we show how to configure server side of OpenVPN and how to make all preparations for use asymmetric cryptography and TLS protocol with Public Key Infrastructure (PKI). + +### Server side configuration ### + +First of all we must install OpenVPN. In Ubuntu 15.04 and other Unix systems with 'apt' package manager this can be done as follows: + + sudo apt-get install openvpn + +Then we must setup a keys. This can be done using default tools "openssl". But this way is rather difficult. That is why we can use "easy-rsa" for this purpose. Next command installs the "easy-rsa" into our system + + sudo apt-get unstall easy-rsa + +**Remark**: all next commands executed with superuser rights, i.e. after command "sudo -i"; otherwise you can use "sudo -E" as prefix for all next commands. + +For beginning we need to copy "easy-rsa" into openvpn folder + + mkdir /etc/openvpn/easy-rsa + cp -r /usr/share/easy-rsa /etc/openvpn/easy-rsa + mv /etc/openvpn/easy-rsa/easy-rsa /etc/openvpn/easy-rsa/2.0 + +and goes into it + + cd /etc/openvpn/easy-rsa/2.0 + +Here we start a process of key generation. + +Firstly we edit a "var" file. For simplify generation process we need to specify our data in it. Here is an example of "var" file: + + export KEY_COUNTRY="US" + export KEY_PROVINCE="CA" + export KEY_CITY="SanFrancisco" + export KEY_ORG="Fort-Funston" + export KEY_EMAIL="my@myhost.mydomain" + export KEY_OU=server + +Hope, field names is clear and there is no need of additional description of them. + +Secondly we need to copy the openssl config. There is config from different version. If you haven't any certain requirement use last version of it. This is a 1.0.0 version. + + cp openssl-1.0.0.cnf openssl.cnf + +Thirdly we need load environment variables, which we edited on previous step + + source ./vars + +Final step of preparation for key generation is in flushing of old certificates and keys and in generation of serial and index files for new keys. This can be done by using command + + ./clean-all + +Now we finish preparation and ready to start generation process. Lets generate certificate first + + ./build-ca + +In dialog we see default variants, which we specified in "vars" file before. We may check them, edit if needed and then press ENTER couple of times. Dialog looks as follows + + Generating a 2048 bit RSA private key + .............................................+++ + ...................................................................................................+++ + writing new private key to 'ca.key' + ----- + You are about to be asked to enter information that will be incorporated + into your certificate request. + What you are about to enter is what is called a Distinguished Name or a DN. + There are quite a few fields but you can leave some blank + For some fields there will be a default value, + If you enter '.', the field will be left blank. + ----- + Country Name (2 letter code) [US]: + State or Province Name (full name) [CA]: + Locality Name (eg, city) [SanFrancisco]: + Organization Name (eg, company) [Fort-Funston]: + Organizational Unit Name (eg, section) [MyOrganizationalUnit]: + Common Name (eg, your name or your server's hostname) [Fort-Funston CA]: + Name [EasyRSA]: + Email Address [me@myhost.mydomain]: + +Next we need to generate a server key + + ./build-key-server server + +Dialog of this command is shown below: + + Generating a 2048 bit RSA private key + ........................................................................+++ + ............................+++ + writing new private key to 'server.key' + ----- + You are about to be asked to enter information that will be incorporated + into your certificate request. + What you are about to enter is what is called a Distinguished Name or a DN. + There are quite a few fields but you can leave some blank + For some fields there will be a default value, + If you enter '.', the field will be left blank. + ----- + Country Name (2 letter code) [US]: + State or Province Name (full name) [CA]: + Locality Name (eg, city) [SanFrancisco]: + Organization Name (eg, company) [Fort-Funston]: + Organizational Unit Name (eg, section) [MyOrganizationalUnit]: + Common Name (eg, your name or your server's hostname) [server]: + Name [EasyRSA]: + Email Address [me@myhost.mydomain]: + + Please enter the following 'extra' attributes + to be sent with your certificate request + A challenge password []: + An optional company name []: + Using configuration from /etc/openvpn/easy-rsa/2.0/openssl-1.0.0.cnf + Check that the request matches the signature + Signature ok + The Subject's Distinguished Name is as follows + countryName :PRINTABLE:'US' + stateOrProvinceName :PRINTABLE:'CA' + localityName :PRINTABLE:'SanFrancisco' + organizationName :PRINTABLE:'Fort-Funston' + organizationalUnitName:PRINTABLE:'MyOrganizationalUnit' + commonName :PRINTABLE:'server' + name :PRINTABLE:'EasyRSA' + emailAddress :IA5STRING:'me@myhost.mydomain' + Certificate is to be certified until May 22 19:00:25 2025 GMT (3650 days) + Sign the certificate? [y/n]:y + 1 out of 1 certificate requests certified, commit? [y/n]y + Write out database with 1 new entries + Data Base Updated + +Here we must answer "yes" on last two questions about "sign the certificate" and about "commit". + +Now we have certificate and server key. Next step is to generate Diffie-Hellman key. Execute the below command and be patient. During next couple minutes we will see a lots of dots and pluses symbols. + + ./build-dh + +Example of the output of this command you can find below + + Generating DH parameters, 2048 bit long safe prime, generator 2 + This is going to take a long time + ................................+................ + +After a long wait we can move to generation of the last key. This is key for TLS-authentication. Here is a command for it: + + openvpn --genkey --secret keys/ta.key + +Now, generation completed and we can move all generated files to the final location. + + cp -r /etc/openvpn/easy-rsa/2.0/keys/ /etc/openvpn/ + +Finally we create OpenVPN configuration file. Let's copy it from example: + + cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz /etc/openvpn/ + cd /etc/openvpn + gunzip -d /etc/openvpn/server.conf.gz + +Then edit it + + vim /etc/openvpn/server.conf + +We need to specify custom paths to keys + + ca /etc/openvpn/keys/ca.crt + cert /etc/openvpn/keys/server.crt + key /etc/openvpn/keys/server.key # This file should be kept secret + dh /etc/openvpn/keys/dh2048.pem + +That's all. After restart of OpenVPN configuration of server side is complete. + + service openvpn restart + +### Client side configuration for Unix ### + +Suppose we have a device with Unix like operation system, for example Ubuntu 15.04, and with installed OpenVPN. We want to connect to OpenVPN server from previous section. Firstly we need a key for the client. For generation of this key go to folder on server: + + cd /etc/openvpn/easy-rsa/2.0 + +Load environment variables + + source vars + +and create a client key + + ./build-key client + +We will see a same dialog as described in previous section on part about server key generation. Fill actual information about client in it. + +You need run other command in case of requirement of password protect key. Here it is + + ./build-key-pass client + +In this case you will be prompted to input password in beginning of establishing of VPN connection. + +Now we need to copy follows files from server to client into /etc/openvpn/keys/ folder. + +List of files from server: + +- ca.crt, +- dh2048.pem, +- client.crt, +- client.key, +- ta.key. + +After that we go to the client and prepare configuration file. Location of file is /etc/openvpn/client.conf and content of it presents below + + dev tun + proto udp + + # IP and Port of remote host with OpenVPN server + remote 111.222.333.444 1194 + + resolv-retry infinite + + ca /etc/openvpn/keys/ca.crt + cert /etc/openvpn/keys/client.crt + key /etc/openvpn/keys/client.key + tls-client + tls-auth /etc/openvpn/keys/ta.key 1 + auth SHA1 + cipher BF-CBC + remote-cert-tls server + comp-lzo + persist-key + persist-tun + + status openvpn-status.log + log /var/log/openvpn.log + verb 3 + mute 20 + +After that we need to restart OpenVPN for accepting a new configuration. + + service openvpn restart + +That's it, the configuration of the client is over. + +### Client side configuration for Android ### + +Configuration of OpenVPN on Android devices is quite similar to configuration on Unix system. We need a pack with a configuration file, with a keys and with a certificates. Here is a list of them: + +- configuration file (.ovpn), +- ca.crt, +- dh2048.pem, +- client.crt, +- client.key. + +Client key can be generated by the same way as described in previous section. + +Configuration file has a follows content + + client tls-client + dev tun + proto udp + + # IP and Port of remote host with OpenVPN server + remote 111.222.333.444 1194 + + resolv-retry infinite + nobind + ca ca.crt + cert client.crt + key client.key + dh dh2048.pem + persist-tun + persist-key + + verb 3 + mute 20 + +All this files we must to move on SD-card of our device. + +Then we need to install [OpenVPN Connect][2]. + +Next configuration process is very simple: + + open setting of OpenVPN and select Import options + select Import Profile from SD card option + in opened window go to folder with prepared files and select .ovpn file + application offered us to create a new profile + tap on the Connect button and wait a second + +And thats all. Now our Android device has connection to our private network using secure VPN connection. + +### Conclusion ### + +So, initial configuration of OpenVPN takes a time, but it is compensated by easy clients configuration and the ability to connect from any device. Moreover OpenVPN provided a high security level and ability to connection from different places including clients located behind NAT. Therefore OpenVPN may equally well be used both at home and in enterprise. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/configure-openvpn-server-client-ubuntu-15-04/ + +作者:[Ivan Zabrovskiy][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/ivanz/ +[1]:https://openvpn.net/ +[2]:https://play.google.com/store/apps/details?id=net.openvpn.openvpn \ No newline at end of file From 4ac12f9e92abfc978f70127c197badf727160f60 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Jun 2015 17:07:15 +0800 Subject: [PATCH 1037/2517] PUB:20150326 A Peep into Process Management Commands in Linux @Vic020 --- ...to Process Management Commands in Linux.md | 62 +++++++++---------- 1 file changed, 30 insertions(+), 32 deletions(-) rename {translated/tech => published}/20150326 A Peep into Process Management Commands in Linux.md (53%) diff --git a/translated/tech/20150326 A Peep into Process Management Commands in Linux.md b/published/20150326 A Peep into Process Management Commands in Linux.md similarity index 53% rename from translated/tech/20150326 A Peep into Process Management Commands in Linux.md rename to published/20150326 A Peep into Process Management Commands in Linux.md index f8c92f871d..705ec14d6d 100644 --- a/translated/tech/20150326 A Peep into Process Management Commands in Linux.md +++ b/published/20150326 A Peep into Process Management Commands in Linux.md @@ -1,46 +1,44 @@ -12个进程管理命令 +12个进程管理命令介绍 ================================================================================ -每个程序在执行时叫进程。当程序是在存储中是可执行文件并且运行的时候,每个进程会被动态得分配系统资源,内存,安全属性和与之相关的状态。可以有多个进程关联同一个程序,并同时执行不会互相干扰。操作系统会有效地管理和追踪所有运行着的进程。 +执行中的程序在称作进程。当程序以可执行文件存放在存储中,并且运行的时候,每个进程会被动态得分配系统资源、内存、安全属性和与之相关的状态。可以有多个进程关联到同一个程序,并同时执行不会互相干扰。操作系统会有效地管理和追踪所有运行着的进程。 为了管理这些进程,用户应该能够: - 查看所有运行中的进程 - 查看进程消耗资源 -- 定位个别进程并且可以执行指定动作 +- 定位个别进程并且对其执行指定操作 - 改变进程的优先级 - 杀死指定进程 -- 限制进程的有效系统资源 -- 等 +- 限制进程可用的系统资源等 -Linux提供了许多命令给用户来高效掌控上述的操作。接下来,一个一个的来讲解下。 +Linux提供了许多命令来让用户来高效掌控上述的操作。接下来,一个一个的来讲解下。 ### 1. ps ### -'ps'是最基础浏览系统中的进程的命令。能列出系统中运行的进程,包括进程号,命令,CPU使用量,内存使用量等。下述选项可以得到更多有用的消息。 +'ps'是Linux 中最基础的浏览系统中的进程的命令。能列出系统中运行的进程,包括进程号、命令、CPU使用量、内存使用量等。下述选项可以得到更多有用的消息。 ps -a - 列出所有运行中/激活进程 ![Output of "ps -a" command](http://blog.linoxide.com/wp-content/uploads/2015/02/ps-a2.png) ps -ef |grep - 列出需要进程 - - ps -aux - 展示进程包括、终端(x)和用户(u)信息,如USER, PID, %CPU, %MEM等 + ps -aux - 显示进程信息,包括无终端的(x)和针对用户(u)的进程:如USER, PID, %CPU, %MEM等 ### 2. pstree ### -linux中,每一个进程都是由父进程创建的。此命令帮助可视化进程,通过显示进程树状图表展示进程间关系。如果使用pid了,那么树的根是pid。不然将会是init。 +linux中,每一个进程都是由其父进程创建的。此命令以可视化方式显示进程,通过显示进程的树状图来展示进程间关系。如果指定了pid了,那么树的根是该pid,不然将会是init(pid: 1)。 ![pstree](http://blog.linoxide.com/wp-content/uploads/2015/02/pstree.png) ### 3. top ### -‘top’是一个更加有用的命令,通过不同的进程所使用的资源可以监视系统。它提供实时的系统状态信息。显示进程的数据包括PID,进程用户,优先值,%CPU,%memory等。可以使用这些显示指示出资源使用量。 +‘top’是一个更加有用的命令,可以监视系统中不同的进程所使用的资源。它提供实时的系统状态信息。显示进程的数据包括 PID、进程属主、优先级、%CPU、%memory等。可以使用这些显示指示出资源使用量。 ![top](http://blog.linoxide.com/wp-content/uploads/2015/02/top.png) ### 4. htop ### -htop与top很类似,但是htop是交互式的模式进程查看器。它通过文字图像显示每一个CPU和内存使用量、swap使用量。上下键选择进程,F7和F8改变优先级,F9杀死进程。Htop不是系统默认,所以需要额外安装。 +htop与top很类似,但是htop是交互式的文本模式的进程查看器。它通过文字图形化地显示每一个进程的CPU和内存使用量、swap使用量。使用上下光标键选择进程,F7和F8改变优先级,F9杀死进程。Htop不是系统默认安装的,所以需要额外安装。 ![htop output](http://blog.linoxide.com/wp-content/uploads/2015/03/htop1.png) @@ -48,7 +46,7 @@ htop与top很类似,但是htop是交互式的模式进程查看器。它通过 通过nice命令的帮助,用户可以设置和改变进程的优先级。提高一个进程的优先级,内核会分配更多CPU时间片给这个进程。默认情况下,进程以0的优先级启动。进程优先级可以通过top命令显示的NI(nice value)列查看。 -进程优先级值的范围从-20到19。值越低,越优先。 +进程优先级值的范围从-20到19。值越低,优先级越高。 nice <优先值> <进程名> - 通过给定的优先值启动一个程序 @@ -56,17 +54,17 @@ htop与top很类似,但是htop是交互式的模式进程查看器。它通过 ![changed nice value of 'top'](http://blog.linoxide.com/wp-content/uploads/2015/02/top-nice.png) -上述命令例子,可以看到‘top’命令获得了-3的优先值。 +上述命令例子中,可以看到‘top’命令获得了-3的优先值。 ### 6. renice ### -renice命令类似nice命令。使用这个命令可以改变正在运行的进程优先值。注意,用户只能改变属于他们的进程的优先值。 +renice命令类似nice命令。使用这个命令可以改变正在运行的进程优先值。注意,用户只能改变属于他们自己的进程的优先值。 renice -n -p - 改变指定进程的优先值 ![renice command](http://blog.linoxide.com/wp-content/uploads/2015/02/renice2.png) -优先值初始化为0的3806号进程优先值已经变成了4. +初始优先值为0的3806号进程优先值已经变成了4. renice -u -g - 通过指定用户和组来改变进程优先值 @@ -76,7 +74,7 @@ renice命令类似nice命令。使用这个命令可以改变正在运行的进 ### 7. kill ### -这个命令通过发送信号结束进程。如果一个进程没有响应杀死命令,这也许就需要强制杀死,使用-9参数来执行。注意,使用强制杀死的时候一定要小心,因为没有机会确定是否写入完成、是否结束等。如果我们不知道进程PID或者打算用名字杀死进程时候,killall就能派上用场。 +这个命令用于发送信号来结束进程。如果一个进程没有响应杀死命令,这也许就需要强制杀死,使用-9参数来执行。注意,使用强制杀死的时候一定要小心,因为进程没有时机清理现场,也许写入文件没有完成。如果我们不知道进程PID或者打算用名字杀死进程时候,killall就能派上用场。 kill @@ -84,7 +82,7 @@ renice命令类似nice命令。使用这个命令可以改变正在运行的进 killall -9 - 杀死所有拥有同样名字的进程 -如果你使用kill,你需要知道进程ID号。pkill是类似的命令但只需要一个模式,如果进程名,进程拥有者等 +如果你使用kill,你需要知道进程ID号。pkill是类似的命令,但使用模式匹配,如进程名,进程拥有者等。 pkill <进程名> @@ -94,17 +92,17 @@ renice命令类似nice命令。使用这个命令可以改变正在运行的进 ### 8. ulimit ### -命令在控制系统资源在shell和进程上的分配量。对于系统管理员是最有用的,可以管理系统倾向和性能问题。限制资源大小可以确保重要进程持续运行,其他进程不会占用过多资源。 +该命令用于控制系统资源在shell和进程上的分配量。对于系统管理员是最有用的,可以管理重度使用和存在性能问题的系统。限制资源大小可以确保重要进程持续运行,其他进程不会占用过多资源。 ulimit -a - 显示当前用户关联的资源限制 ![ulimit -a](http://blog.linoxide.com/wp-content/uploads/2015/02/ulimit-a.png) - -f - 最大文件大小 + -f - 最大文件尺寸大小 -v - 最大虚拟内存大小(KB) - -n - 最大文件描述符加1 + -n - 增加最大文件描述符数量 -H : 改变和报告硬限制 @@ -114,13 +112,13 @@ renice命令类似nice命令。使用这个命令可以改变正在运行的进 ### 9. w ### -w提供正确登录的用户和其执行的进程的信息。显示信息头包含信息像现在时间,系统运行时长,登录用户总数,过去1,5,15分钟负载均衡数。 +w 提供当前登录的用户及其正在执行的进程的信息。显示信息头包含信息,如当前时间、系统运行时长、登录用户总数、过去的1,5,15分钟内的负载均衡数。 -基于这些用户信息,用户可以在终止进程前查看不属于他们的进程。 +基于这些用户信息,用户在终止不属于他们的进程时要小心。 !['w' command](http://blog.linoxide.com/wp-content/uploads/2015/02/w.png) -**who**是类似命令,提供列表,包含当前登录用户,系统启动时间,运行级别等。 +**who**是类似命令,提供当前登录用户列表、系统启动时间、运行级别等。 !['who' command](http://blog.linoxide.com/wp-content/uploads/2015/02/who.png) @@ -130,7 +128,7 @@ w提供正确登录的用户和其执行的进程的信息。显示信息头包 ### 10. pgrep ### -pgrep为"进程号全局正则匹配打印"。命令扫描当前运行进程,然后列出选择标准匹配出的进程ID到标准输出。对于通过名字检索进程号是很有用。 +pgrep的意思是"进程号全局正则匹配输出"。该命令扫描当前运行进程,然后按照命令匹配条件列出匹配结果到标准输出。对于通过名字检索进程号是很有用。 pgrep -u mint sh @@ -140,9 +138,9 @@ pgrep为"进程号全局正则匹配打印"。命令扫描当前运行进程, ### 11. fg , bg ### -有时,命令需要很长的时间才能执行完成。对于这种情况,我们使用‘bg’命令可以将任务放在后台执行,而是用‘fg’可以调到前台来使用。 +有时,命令需要很长的时间才能执行完成。对于这种情况,我们使用‘bg’命令可以将任务放在后台执行,而用‘fg’可以调到前台来使用。 -通过‘&’,我们后台启动一个程序: +我们可以通过‘&’在后台启动一个程序: find . -name *iso > /tmp/res.txt & @@ -152,7 +150,7 @@ pgrep为"进程号全局正则匹配打印"。命令扫描当前运行进程, ctrl+z - 挂起当前执行程序 - bg - 将程序发送到后台运行 + bg - 将程序放到后台运行 我们可以使用‘jobs’命令列出所有后台进程。 @@ -160,7 +158,7 @@ pgrep为"进程号全局正则匹配打印"。命令扫描当前运行进程, 使用‘fg’命令可以将后台程序调到前台执行。 - fg % + fg %进程id ![output of fg, bg and jobscommands](http://blog.linoxide.com/wp-content/uploads/2015/03/fg-bg-jobs.png) @@ -172,13 +170,13 @@ ipcs命令报告进程间通信设施状态。(共享内存,信号量和消 ipcs -p -m -下面屏幕截图列出了共享内存段的创建者ID和进程ID。 +下面屏幕截图列出了最近访问了共享内存段的进程的创建者的ID和进程ID。 ![ipcs command](http://blog.linoxide.com/wp-content/uploads/2015/03/ipcs.png) ### 总结 ### -总之 ,这些命令可以帮助管理员修复问题和改善性能。同样作为一名普通用户也需要解决进程间出现的问题。所以,熟悉如此繁多的命令,从能有效管理进程是行之有效。 +总之 ,这些命令可以帮助管理员修复问题和改善性能。同样作为一名普通用户也需要解决进程出现的问题。所以,熟悉如此繁多的命令,从能有效管理进程是行之有效。 -------------------------------------------------------------------------------- @@ -186,7 +184,7 @@ via: http://linoxide.com/linux-command/process-management-commands-linux/ 作者:[B N Poornima][a] 译者:[VicYu/Vic020](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From cd5aa96cccf4e0f4a499bebb8d14c75604da42f5 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Jun 2015 20:17:03 +0800 Subject: [PATCH 1038/2517] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wwy-hust --- ...nds for RPM Package Management in Linux.md | 289 ------------------ 1 file changed, 289 deletions(-) delete mode 100644 sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md diff --git a/sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md b/sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md deleted file mode 100644 index 2ada2ac4cd..0000000000 --- a/sources/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md +++ /dev/null @@ -1,289 +0,0 @@ -translating by wwy-hust - -27 ‘DNF’ (Fork of Yum) Commands for RPM Package Management in Linux -================================================================================ -DNF aka Dandified YUM is a next generation Package Manager for RPM based Distribution. It was first introduced in Fedora 18 and it is replaced [YUM utility][1] in recent release of Fedora 22. - -![](http://www.tecmint.com/wp-content/uploads/2015/05/linux-dnf-command-examples.jpg) - -DNF aims at improving the bottlenecks of YUM viz., Performance, Memory Usages, Dependency Resolution, Speed and lots of other factors. DNF does Package Management using RPM, libsolv and hawkey library. Though it does not come per-installed in CentOS and RHEL 7 you can yum, dnf and use it alongside the yum. - -You may like to read more about DNF here: - -- [Reasons Behind Replacing Yum with DNF][2] - -The latest stable release of DNF is 1.0 (at the time of writing of post) which was released on May 11, 2015. It (and all previous version of DNF) is mostly written in Python and is released under GPL v2 License. - -### Installation of DNF ### - -DNF in not available in the default repository of RHEL/CentOS 7. However Fedora 22 ships with DNF implemented officially. - -To install DNF on RHEL/CentOS systems, you need to first install and enable epel-release repository. - - # yum install epel-release - OR - # yum install epel-release -y - -Though it is not ethical to use ‘-y‘ with yum as it is recommended to see what is being installed in your system. However if this does not matter you much you may use ‘-y’ with yum to install everything automatically without user’s intervention. - -Next, install DNS package using yum command from epel-release repository. - - # yum install dnf - -After dnf installed successfully, it’s time to show you 27 practical usage of dnf commands with examples that will help you to manage packages in RPM based distribution easily and effectively. - -### 1. Check DNF Version ### - -Check the version of DNF installed on your System. - - # dnf --version - -![Check DNF Version](http://www.tecmint.com/wp-content/uploads/2015/05/Check-DNF-Version.gif) - -### 2. List Enabled DNF Repositories ### - -The option ‘repolist‘ with dnf command, will display all enabled repositories under your system. - - # dnf repolist - -![Check All Enabled Repositories](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Enabled-Repositories.gif) - -### 3. List all Enabled and Disabled DNF Repositories ### - -The option ‘repolist all‘ will print all the enabled/disabled repositories under your system. - - # dnf repolist all - -![List All Enabled/Disabled Repositories](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Repositories.gif) - -### 4. List all Available and Installed Packages using DNF ### - -The command “dnf list” will list all the available packages from all the repositories and installed packages on your Linux system. - - # dnf list - -![List All Packages using DNF](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Packages.png) - -### 5. List all Installed Packages using DNF ### - -While the “dnf list” command shows all the available/installed packages from all the repositories. However, you have the option to list only the installed packages using option “list installed” as shown below. - - # dnf list installed - -![List All Installed Packages](http://www.tecmint.com/wp-content/uploads/2015/05/List-Installed-Packages.png) - -### 6. List all Available Packages using DNF ### - -Similarly, the “list available” option, will list all the packages available to be installed from all the enabled repositories. - - # dnf list available - -![List Available Packages using DNF](http://www.tecmint.com/wp-content/uploads/2015/05/List-Available-Packages.png) - -### 7. Search for a Package using DNF ### - -If incase, you’ve no idea about the package that you want install, in such situation you may use ‘search‘ option with dnf command to search for the package that matches the word or string (say nano). - - # dnf search nano - -![Search Package by Word](http://www.tecmint.com/wp-content/uploads/2015/05/Search-Package.gif) - -### 8. See what Provides a file/sub-package? ### - -The dnf option “provides” find the name of the package that provides specific file/sub-package. For example, if you would like to find what provides ‘/bin/bash‘ on your system? - - # dnf provides /bin/bash - -![Find File Sub Package](http://www.tecmint.com/wp-content/uploads/2015/05/Find-Package-Sub-Package.gif) - -### 9. Get Details of a Package using DNF ### - -Let’s assume you want to know the information of a package before installing it on the system, you may use “info” switch to get a detailed information about a package (say nano) as below. - - # dnf info nano - -![Check Package Information with DNF](http://www.tecmint.com/wp-content/uploads/2015/05/Check-Package-Information.gif) - -### 10. Install a Package with DNF ### - -To install a package called nano, just run the below command it will automatically resolve and install all required dependencies for package nano. - - # dnf install nano - -![Install Package using DNF](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Package-DNF.gif) - -### 11. Updating a Package using DNF ### - -You may update only a specific package (say systemd) and leave everything on the system untouched. - - # dnf update systemd - -![Update a Specific Package](http://www.tecmint.com/wp-content/uploads/2015/05/Update-a-Package.gif) - -### 12. Check for System Updates using DNF ### - -Check updates for all the system packages installed into the system simply as. - - # dnf check-update - -![Check For System Update](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-System-Update.gif) - -### 13. Update All System Packages using DNF ### - -You may update the whole system including all the installed packages with following commands. - - # dnf update - OR - # dnf upgrade - -![Update System](http://www.tecmint.com/wp-content/uploads/2015/05/Update-System.gif) - -### 14. Remove/Erase a Package using DNF ### - -To remove or erase any unwanted package (say nano), you may use “remove” or “erase” switch with dnf command to remove it. - - # dnf remove nano - OR - # dnf erase nano - -![Remove Package in Linux](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Package.gif) - -### 15. Remove Orphan Packages using DNF ### - -Those packages that were installed to satisfy dependency may be useless if not being used by other applications. To remove those orphan packages execute the below command. - - # dnf autoremove - -![Remove Orphan Packages](http://www.tecmint.com/wp-content/uploads/2015/05/Autoremove-Packages.gif) - -### 16. Remove Cached Packages using DNF ### - -A lot of time we encounter out-of-date headers and unfinished transactions which results into error while executing dnf. We may clean all the cached packages and headers containing remote package information simply by executing. - - # dnf clean all - -![Remove DNF Cache](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Cache-Packages.gif) - -### 17. Get Help on Specific DNF Command ### - -You may get help of any specific dnf command (say clean) just by executing the below command. - - # dnf help clean - -![Get DNF Command Help](http://www.tecmint.com/wp-content/uploads/2015/05/Help-on-DNF-Command.gif) - -### 18. List all DNF Commands and Options ### - -To list help on all available dnf commands and option simply type. - - # dnf help - -![Get Help on DNF Options](http://www.tecmint.com/wp-content/uploads/2015/05/DNF-Options.gif) - -### 19. View History of DNF ### - -You may call dnf history to look at the list of already executed dnf commands. This way you can be aware of what was installed/removed with time stamp. - - # dnf history - -![Check DNF History](http://www.tecmint.com/wp-content/uploads/2015/05/Check-DNF-History.gif) - -### 20. List all Group Packages ### - -The command “dnf grouplist” will print all available or installed packages, if nothing is mentioned, it will list all known groups. - - # dnf grouplist - -![List All Group Packages](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Group-Packages.gif) - -### 21. Install a Group Package using DNF ### - -To install a Group of packages bundled together as group package (say Educational Software) simply as. - - # dnf groupinstall 'Educational Software' - -![Install Group Packages](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Group-Packages.gif) - -### 22. Update a Group Package ### - -Let’s update a Group Package (say Educational Software) by executing the below command. - - # dnf groupupdate 'Educational Software' - -![Update Group Package](http://www.tecmint.com/wp-content/uploads/2015/05/Update-Group-Package.gif) - -### 23. Remove a Group Package ### - -We can remove the group Package (say Educational Software) as. - - # dnf groupremove 'Educational Software' - -![Remove Group Package](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Group-Package.gif) - -### 24. Install a Package from Specific Repository ### - -DNF makes it possible to install any specific package (say phpmyadmin) from a repo (epel) as simply as, - - # dnf --enablerepo=epel install phpmyadmin - -![Install Package From Specific Repo](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Package-From-Specific-Repo.gif) - -### 25. Synchronize Installed Packages to Stable Release ### - -The command “dnf distro-sync” will provides necessary options to synchronize all installed packages to most recent stable version available from any enabled repository. If no package is selected, all installed packages are synchronized. - - # dnf distro-sync - -![Synchronize Packages to Stable Version](http://www.tecmint.com/wp-content/uploads/2015/05/Synchronize-Packages.gif) - -### 26. Reinstall a Package ### - -The command “dnf reinstall nano” will reinstall an already installed package (say nano). - - # dnf reinstall nano - -![ReInstall Package](http://www.tecmint.com/wp-content/uploads/2015/05/Re-Install-Package.gif) - -### 27. Downgrade a Package ### - -The option “downgrade” will downgrades the named package (say acpid) to lower version if possible. - - # dnf downgrade acpid - -Sample Output - - Using metadata from Wed May 20 12:44:59 2015 - No match for available package: acpid-2.0.19-5.el7.x86_64 - Error: Nothing to do. - -**My observation**: DNF does not downgraded the package as it is supposed to. It has also been reported as bug. - -### Conclusion ### - -DNF is the upper state of the end of the art Package Manager YUM. It tends to do a lot of processing automatically which is not going to be praised by many experienced Linux System Administrator, as I believe. As a matter of example: - -- `--skip-broken` is not recognized by DNF and there is no alternative. -- There is nothing like ‘resolvedep‘ command however you may run dnf provides. -- There is no ‘deplist‘ command to find package dependency. -- You exclude a repo, means the exclusion apply on all operations, unlike yum which excludes those repos only at the time of install and updates, etc. - -Several Linux users are not happy the way Linux Ecosystem is moving. First [Systemd removed init system][3] v and now DNF will be replacing YUM sooner in Fedora 22 and later in RHEL and CentOS. - -What do you think? are distributions and the whole Linux ecosystem is not valuing it’s users and moving against their will. Also it is often said in IT industry – “Why fix, If not broken?”, and neither init System V is broken nor YUM. - -That’s all for now. Please let me know your valuable thoughts in the comments below. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ -[2]:http://www.tecmint.com/dnf-next-generation-package-management-utility-for-linux/ -[3]:http://www.tecmint.com/systemd-replaces-init-in-linux/ From 559efb585d2be1b7f046818c866ab098dc9bad99 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Jun 2015 20:36:32 +0800 Subject: [PATCH 1039/2517] PUB:20150413 How to Show Dialog Box from Bash Shell Script with Examples @ictlyh --- ...ox from Bash Shell Script with Examples.md | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md (80%) diff --git a/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md b/published/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md similarity index 80% rename from translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md rename to published/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md index e115f85772..789a56688d 100644 --- a/translated/tech/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md +++ b/published/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md @@ -1,6 +1,7 @@ -如何在Bash Shell脚本中显示对话框以及事例 +如何在Bash Shell脚本中显示对话框 ================================================================================ -这个教程给出几个如何使用类似zenity和whiptail的工具在Bash Shell 脚本中提供消息/对话框的例子。使用这些工具,你的脚本能够告知用户当前程序运行的状态以及有与其交互的能力。这两个工具的不同之处在于显示消息框或者对话框的方式。Zenity用GTK工具包创建图形用户界面,而whiptail在终端内部创建消息框。 + +这个教程给出几个如何使用类似zenity和whiptail的工具在Bash Shell 脚本中提供消息/对话框的例子。使用这些工具,你的脚本能够告知用户当前程序运行的状态并能与用户进行交互。这两个工具的不同之处在于显示消息框或者对话框的方式。Zenity用GTK工具包创建图形用户界面,而whiptail则在终端窗口内创建消息框。 ### Zenity 工具 ### @@ -8,21 +9,21 @@ sudo apt-get install zenity -由于用zenity创建消息框或者对话框的命令是相当自解释的,我们会给你提供一些例子。 +用zenity创建消息框或者对话框的命令是不言自明的,我们会给你提供一些例子来参考。 ### 创建消息框 ### -zenity --info --title "Information Box" --text "This should be information" --width=300 --height=200 + zenity --info --title "Information Box" --text "This should be information" --width=300 --height=200 ![消息框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Information-Box.png) -创建 Yes/No 对话框 +创建 Yes/No 询问对话框 zenity --question --text "Do you want this?" --ok-label "Yeah" --cancel-label="Nope" ![问题截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-Question.png) -创建输入框并在变量中保存值 +创建输入框并将输入值保存到变量中 a=$(zenity --entry --title "Entry box" --text "Please enter the value" --width=300 --height=200) echo $a @@ -75,7 +76,7 @@ zenity --info --title "Information Box" --text "This should be information" --wi 信息框 -别忘了查看也许能帮助到你的有用的[zenity 选项][1] +别忘了查看也许能帮助到你的有用的[zenity 选项][1]。 ### Whiptail 工具 ### @@ -83,7 +84,7 @@ zenity --info --title "Information Box" --text "This should be information" --wi sudo apt-get install whiptail -用whiptail创建消息框或者对话框的命令也是相当自解释的,我们会给你提供一些基本例子。 +用whiptail创建消息框或者对话框的命令也是无需解释的,我们会给你提供一些基本例子作为参考。 ### 创建消息框 ### @@ -103,7 +104,7 @@ zenity --info --title "Information Box" --text "This should be information" --wi ![whiptail输入框截图](http://blog.linoxide.com/wp-content/uploads/2015/03/Screenshot-whiptail-entry.png) -尝试使用输入值要注意的一点是whiptail用stdout显示对话框,用stderr输出值。那样的话,如果你用 var=$(...),你不会看到对话框,也不能获得输入的值。解决方法是交换stdout和stderr。在whiptail命令后面添加 **3>&1 1>&2 2>&3** 就可以做到。你想获取输入值的任何whiptail命令也是如此。 +尝试使用输入值要注意的一点是whiptail用stdout显示对话框,用stderr输出值。这样的话,如果你用 var=$(...),你就根本不会看到对话框,也不能获得输入的值。解决方法是交换stdout和stderr。在whiptail命令后面添加 **3>&1 1>&2 2>&3** 就可以做到。你想获取输入值的任何whiptail命令也是如此。 ### 创建菜单对话框 ### @@ -157,7 +158,7 @@ zenity --info --title "Information Box" --text "This should be information" --wi ### 结论 ### -选择合适的工具显示对话框取决于你期望在桌面机器还是服务器上运行你的脚本。桌面机器用户通常使用窗口环境,更可能用显示的窗口运行脚本和交互。然而,如果你期望用户是在服务器上工作的,你也许会希望安全地显示,并使用whiptail或者任何其它在纯终端窗口显示对话框的工具。 +选择合适的工具显示对话框取决于你期望在桌面机器还是服务器上运行你的脚本。桌面机器用户通常使用GUI窗口环境,也可能运行脚本并与显示的窗口进行交互。然而,如果你期望用户是在服务器上工作的,(在没有图形界面时,)你也许希望能确保总能显示,那就使用whiptail或者任何其它在纯终端窗口显示对话框的工具。 -------------------------------------------------------------------------------- @@ -165,7 +166,7 @@ via: http://linoxide.com/linux-shell-script/bash-shell-script-show-dialog-box/ 作者:[Ilija Lazarevic][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 603464c095fff41ff5767ded953b5e17ad8d39df Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Jun 2015 21:49:32 +0800 Subject: [PATCH 1040/2517] PUB:20150330 How to Serve Git Repositories Using Gitblit Tool in Linux @wwy-hust --- ...epositories Using Gitblit Tool in Linux.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) rename {translated/tech => published}/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md (75%) diff --git a/translated/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md b/published/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md similarity index 75% rename from translated/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md rename to published/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md index 45c09f3475..ef30371412 100644 --- a/translated/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md +++ b/published/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md @@ -1,18 +1,18 @@ -如何在Linux下使用Gitblit工具创建Git仓库服务 +如何在Linux下使用Gitblit工具创建Git仓库服务 ================================================================================ -嗨!朋友,今天我们将学习如何在你的Linux服务器或者PC上安装Gitblit工具。首先,我们看看什么是Git,它的功能以及安装Gitblit的步骤。[Git是分布式版本控制系统][1],它强调速度、数据一致性,并且支持分布式、非线性工作流。它最初由Linus Torvalds在2005年为Linux内核设计和开发,使用GPL2证书,并因此成为软件开发中使用最广泛的版本控制系统。 +嗨!朋友,今天我们将学习如何在你的Linux服务器或者PC上安装Gitblit工具。首先,我们看看什么是Git,它的功能以及安装Gitblit的步骤。[Git是分布式版本控制系统][1],它强调速度、数据一致性,并且支持分布式、非线性工作流。它最初由Linus Torvalds在2005年为Linux内核设计和开发,使用GPLv2证书,并从此成为软件开发中使用最广泛的版本控制系统。 -[Gitblit是完全开源的软件][2],它基于纯粹的Java堆栈,被设计以在Git仓库速度和效率方面胜任从小型到极大型的项目。它很容易学习和上手,并有着闪电般的性能。它在廉价的本地分支、便于staging、多工作流等方面远胜过一些SCM(版本控制)工具,比如Subversion、CVS、Perforce和ClearCase。 +[Gitblit是完全开源的软件][2],它基于纯粹的Java堆栈,被设计以在Git仓库速度和效率方面胜任从小型到极大型的项目。它很容易学习和上手,并有着闪电般的性能。它在很多方面远胜 Subversion、CVS、Perforce和ClearCase等SCM(版本控制)工具,比如,如快速本地分支、易于暂存、多工作流等。 #### Gitblit的功能 #### -- 它可以做为一个无声的仓库视图,没有管理控制以及用户账户。 -- 它可以做为完整的Git堆栈,拥有clone, pushing和仓库存取控制。 -- 它能独立于其他Git工具使用(包括实际的Git),它能和您已创建的工具合作。 +- 它可以做为一个哑仓库视图,没有管理控制以及用户账户。 +- 它可以做为完整的Git服务,拥有克隆、推送和仓库访问控制。 +- 它能独立于其他Git工具使用(包括实际的Git),它能和您已有的工具协作。 ### 1.创建Gitblit安装目录 ### -首先我们将在我们的服务器上建立一个目录,我们将在该目录下安装最新的Gitblit。 +首先我们将在我们的服务器上建立一个目录,并在该目录下安装最新的Gitblit。 $ sudo mkdir -p /opt/gitblit @@ -28,7 +28,7 @@ ![下载gitblit安装包](http://blog.linoxide.com/wp-content/uploads/2015/01/downloading-gitblit.png) -接下来,我们将解压下载到的tarball压缩包至之前创建的目录 /opt/gitblit/ +接下来,我们将下载到的tar压缩包解压至之前创建的目录 /opt/gitblit/ $ sudo tar -zxvf gitblit-1.6.2.tar.gz @@ -42,7 +42,7 @@ 另一种是将gitblit添加为服务。下面是在linux下将gitblit添加为服务的步骤。 -由于我在使用Ubuntu,下面的命令将是 sudo cp service-ubuntu.sh /etc/init.d/gitblit。所以请根据你的发行版修改文件名service-ubuntu.sh为相应的你运行的发行版。 +由于我在使用Ubuntu,下面的命令将是 sudo cp service-ubuntu.sh /etc/init.d/gitblit,所以请根据你的发行版修改文件名service-ubuntu.sh为相应的你运行的发行版。 $ sudo ./install-service-ubuntu.sh @@ -50,13 +50,13 @@ ![启动gitblit服务](http://blog.linoxide.com/wp-content/uploads/2015/01/starting-gitblit-service.png) -在你的浏览器中打开http://localhost:8080或https://localhost:8443,也可以将localhost根据本地配置替换为IP地址。输入默认的管理员凭证:admin/admin并点击login按钮。 +在你的浏览器中打开`http://localhost:8080`或`https://localhost:8443`,也可以将localhost根据本地配置替换为IP地址。输入默认的管理员凭证:admin / admin并点击login按钮。 ![gitblit欢迎页面](http://blog.linoxide.com/wp-content/uploads/2015/01/gitblit-welcome.png) 现在,我们将添加一个新的用户。首先,你需要以admin用户登录,username = **admin**,password = **admin**。 -然后,点击 user icon > users > (+) new user 来创建一个新用户,如下图所示。 +然后,点击用户图标 > users > (+) new user 来创建一个新用户,如下图所示。 ![添加新用户](http://blog.linoxide.com/wp-content/uploads/2015/01/add-user.png) @@ -73,7 +73,7 @@ git remote add origin ssh://arunlinoxide@localhost:29418/linoxide.com.git git push -u origin master -请将用户名arunlinoxide替换为你添加的用户名。 +请将其中的用户名arunlinoxide替换为你添加的用户名。 #### 在命令行中push一个已存在的仓库 #### @@ -84,7 +84,7 @@ ### 结论 ### -欢呼吧!我们已经在Linux电脑中安装好了最新版本的Gitblit。接下来我们便可以在我们的大小工程中享受这样一个优美的版本控制系统。有了Gitblit,版本控制便再容易不过了。它有易于学习、轻量级、高性能的特点。因此,如果你有任何的问题、建议和反馈,请在留言处留言。 +欢呼吧!我们已经在Linux电脑中安装好了最新版本的Gitblit。接下来我们便可以在我们的大小项目中享受这样一个优美的版本控制系统。有了Gitblit,版本控制便再容易不过了。它有易于学习、轻量级、高性能的特点。因此,如果你有任何的问题、建议和反馈,请在留言处留言。 -------------------------------------------------------------------------------- @@ -92,7 +92,7 @@ via: http://linoxide.com/linux-how-to/serve-git-repositories-gitblit/ 作者:[Arun Pyasi][a] 译者:[wwy-hust](https://github.com/wwy-hust) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6543de8a748170c10ee20bf4a16964082d1d0d2f Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Jun 2015 22:14:33 +0800 Subject: [PATCH 1041/2517] PUB:20150331 How to Install WordPress with Nginx in a Docker Container @ictlyh --- ...dPress with Nginx in a Docker Container.md | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150331 How to Install WordPress with Nginx in a Docker Container.md (86%) diff --git a/translated/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md b/published/20150331 How to Install WordPress with Nginx in a Docker Container.md similarity index 86% rename from translated/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md rename to published/20150331 How to Install WordPress with Nginx in a Docker Container.md index 849dd4a853..e24767bd84 100644 --- a/translated/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md +++ b/published/20150331 How to Install WordPress with Nginx in a Docker Container.md @@ -1,6 +1,7 @@ -如何在 Docker 容器里的 Nginx 中安装 WordPress +如何在 Docker 容器中架设一个完整的 WordPress 站点 ================================================================================ -大家好,今天我们来学习一下如何在 Docker 容器上运行的 Nginx Web 服务器中安装 WordPress。WordPress 是一个很好的免费开源的内容管理系统,全球成千上万的网站都在使用它。[Docker][1] 是一个提供开放平台来打包,分发和运行任何应用的开源轻量级容器项目。它没有语言支持,框架或打包系统的限制,可以在从小的家用电脑到高端服务器的任何地方任何时间运行。这让它们成为可以用于部署和扩展网络应用,数据库和后端服务而不必依赖于特定的栈或者提供商的很好的构建块。 + +大家好,今天我们来学习一下如何在 Docker 容器里运行的 Nginx Web 服务器中安装 WordPress。WordPress 是一个很好的免费开源的内容管理系统,全球成千上万的网站都在使用它。[Docker][1] 是一个开源项目,提供了一个可以打包、装载和运行任何应用的轻量级容器的开放平台。它没有语言支持、框架和打包系统的限制,从小型的家用电脑到高端服务器,在何时何地都可以运行。这使它们可以不依赖于特定软件栈和供应商,像一块块积木一样部署和扩展网络应用、数据库和后端服务。 今天,我们会在 docker 容器上部署最新的 WordPress 软件包,包括需要的前提条件,例如 Nginx Web 服务器、PHP5、MariaDB 服务器等。下面是在运行在 Docker 容器上成功安装 WordPress 的简单步骤。 @@ -14,13 +15,13 @@ # systemctl restart docker.service -### 2. 创建 WordPress Docker 文件 ### +### 2. 创建 WordPress 的 Dockerfile ### -我们需要创建用于自动安装 wordpress 以及前提条件的 docker 文件。这个 docker 文件将用于构建 WordPress 的安装镜像。这个 WordPress docker 文件会从 Docker 库中心获取 CentOS 7 镜像并用最新的可用更新升级系统。然后它会安装必要的软件,例如 Nginx Web 服务器、PHP、MariaDB、Open SSH 服务器以及其它保证 Docker 容器正常运行不可缺少的组件。最后它会执行一个初始化 WordPress 安装的脚本。 +我们需要创建用于自动安装 wordpress 以及其前置需求的 Dockerfile。这个 Dockerfile 将用于构建 WordPress 的安装镜像。这个 WordPress Dockerfile 会从 Docker Registry Hub 获取 CentOS 7 镜像并用最新的可用更新升级系统。然后它会安装必要的软件,例如 Nginx Web 服务器、PHP、MariaDB、Open SSH 服务器,以及其它保证 Docker 容器正常运行不可缺少的组件。最后它会执行一个初始化 WordPress 安装的脚本。 # nano Dockerfile -然后,我们需要将下面的配置行添加到 Docker 文件中。 +然后,我们需要将下面的配置行添加到 Dockerfile中。 FROM centos:centos7 MAINTAINER The CentOS Project @@ -50,9 +51,9 @@ ![Wordpress Docker 文件](http://blog.linoxide.com/wp-content/uploads/2015/03/Dockerfile-wordpress.png) -### 3. 创建启动 script ### +### 3. 创建启动脚本 ### -我们创建了 docker 文件之后,我们需要创建用于运行和配置 WordPress 安装的脚本,名称为 start.sh。它会为 WordPress 创建并配置数据库和密码。用我们喜欢的文本编辑器打开 start.sh。 +我们创建了 Dockerfile 之后,我们需要创建用于运行和配置 WordPress 安装的脚本,名称为 start.sh。它会为 WordPress 创建并配置数据库和密码。用我们喜欢的文本编辑器打开 start.sh。 # nano start.sh @@ -86,7 +87,7 @@ } __handle_passwords() { - # 在这里我们生成随机密码(感谢 pwgen)。前面两个用于 mysql 用户,最后一个用于 wp-config.php 的随机密钥。 + # 在这里我们生成随机密码(多亏了 pwgen)。前面两个用于 mysql 用户,最后一个用于 wp-config.php 的随机密钥。 WORDPRESS_DB="wordpress" MYSQL_PASSWORD=`pwgen -c -n -1 12` WORDPRESS_PASSWORD=`pwgen -c -n -1 12` @@ -292,7 +293,7 @@ ### 5. 构建 WordPress 容器 ### -现在,完成了创建配置文件和脚本之后,我们终于要使用 docker 文件来创建安装最新的 WordPress CMS(译者注:Content Management System,内容管理系统)所需要的容器,并根据配置文件进行配置。做到这点,我们需要在对应的目录中运行以下命令。 +现在,完成了创建配置文件和脚本之后,我们终于要使用 Dockerfile 来创建安装最新的 WordPress CMS(译者注:Content Management System,内容管理系统)所需要的容器,并根据配置文件进行配置。做到这点,我们需要在对应的目录中运行以下命令。 # docker build --rm -t wordpress:centos7 . @@ -340,7 +341,7 @@ via: http://linoxide.com/linux-how-to/install-wordpress-nginx-docker-container/ 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 0c6aa99c92cfc4fe769e387b9ed482cfa4494a08 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Jun 2015 22:26:35 +0800 Subject: [PATCH 1042/2517] PUB:20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04 @GOLinux --- ...Here' s How To Upgrade in Kubuntu 15.04.md | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) rename {translated/tech => published}/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md (75%) diff --git a/translated/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md b/published/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md similarity index 75% rename from translated/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md rename to published/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md index 1e2a36a0a7..5dba39a1d3 100644 --- a/translated/tech/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md +++ b/published/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md @@ -1,7 +1,6 @@ - -KDE Plasma 5.3已发布,Kubuntu 15.04升级攻略 +在 Kubuntu 15.04 中升级 KDE Plasma 5.3 ================================================================================ -**KDE[已经宣布][1]Plasma 5.3的稳定版已经准备就绪,它包含了一个新的电源管理方面的稳定特性。** +**KDE[已经发布了][1]Plasma 5.3的稳定版,它包含了一个新的电源管理方面的稳定特性。** [先前四月份的beta版][2]已经让我们印象深刻,甚至跃跃欲试了,Plasma 5桌面环境的稳定版更新的最新更新已经稳定,并且可以下载了。 @@ -10,7 +9,8 @@ Plasma 5.3继续改善和细化了全新的KDE桌面,它添加了大量的特 ### Plasma 5.3中的新东西 ### ![Better Bluetooth Management in Plasma 5.3](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/bluetooth-applet-in-kde.jpg) -Plasma 5.3中更好的蓝牙管理 + +*Plasma 5.3中更好的蓝牙管理* 而[在早期关于Plasma 5.3的文章][3]中,我们触及了大量**新特性**,这其中很多都值得反复说道说道。 @@ -18,19 +18,21 @@ Plasma 5.3中更好的蓝牙管理 在连接了外部监视器的时候合上笔记本盖子时,不会再触发‘挂起’操作。这个新的行为被称之为‘**影院模式**’,并且默认开启。但是,可以通功过电源管理设置中的相关选项禁用。 -**蓝牙功能被改善**,带来了一个全新的面板小程序,使得在连接到并配置配对的蓝牙设备,如只能手机、键盘和扬声器时,比以往更为便捷。 +**蓝牙功能被改善**,带来了一个全新的面板小程序,使得在连接到并配置配对的蓝牙设备,如智能手机、键盘和扬声器时,比以往更为便捷。 同样,对于Plasma 5.3,**KDE中的轨迹板配置更为方便**,这多亏了新的安装和设置模块。 + ![Trackpad, Touchpad. Tomato, Tomayto.](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/touchpad-kde.jpg) -轨迹板、触控板。Tomato, Tomayto。 -对于Plasma小部件狂热者,带来了一个**按住并锁定**手势。当启用该功能,会隐藏移动鼠标时出现的设置处理。取而代之的是,它只会在长点击小部件时发生该行为。 +*轨迹板、触控板。Tomato, Tomayto。* -谈到widget-y这类事情时,该发布版中**再次引入了几个旧的Plasmoid最受欢迎的东西**,包括一个有用的系统监视器、便利的硬盘驱动器统计和一个漫画阅读器。 +对于Plasma小部件狂热者,它带来了一个**按住并锁定**手势。当启用该功能,会隐藏移动鼠标时出现的设置处理。取而代之的是,它只会在长点击小部件时发生该行为。 + +谈到widget-y这类事情时,该发布版中**再次引入了几个旧的Plasmoid中最受欢迎的东西**,包括一个有用的系统监视器、便利的硬盘驱动器统计和一个漫画阅读器。 ### 了解更多&尝试 ### -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/plasma-5.3-beta.jpg\) +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/plasma-5.3-beta.jpg) 一张全部内容的完整列表——我说全部内容——是指Plasma 5.3中[在官方修改日志中][4]列出的新的和改进的内容。 @@ -40,7 +42,7 @@ Plasma 5.3中更好的蓝牙管理 如果你需要超级稳定的系统,你可以使用这些镜像来尝试新特性,但是你可以继续使用你的主要计算机上与你的版本对应的KDE版本。 -但是,如果你对实验版满意——请阅:能够处理任何包冲突,或者由尝试升级桌面环境而导致的系统问题——那么你可以安装。 +不过,如果你对实验版满意——请注意:能够处理任何包冲突,或者由尝试升级桌面环境而导致的系统问题——那么你可以安装。 ### 安装Plasma 5.3到Kubuntu 15.04 ### @@ -52,20 +54,19 @@ Kubuntu移植PPA可能也会升级除了安装在你系统上的Plasma外的其 目前为止,使用命令行来升级Kubuntu中的到Plasma 5.3是最快速的方法: - sudo add-apt-repository ppa:kubuntu-ppa/backports - + sudo add-apt-repository ppa:kubuntu-ppa/backports sudo apt-get update && sudo apt-get dist-upgrade 在升级过程完成后,如果一切顺利,你应该重启计算机。 如果你正在使用一个备用桌面环境,比如LXDE、Unity或者GNOME,则你需要在运行完上面的两个命令后安装Kubuntu桌面包(你可以在Ubuntu软件中心找到)。 -To downgrade to the stock version of Plasma in 15.04 you can use the PPA-Purge tool: + +要降级到15.04中自带的 Plasma 版本的话,你可以使用 PPA-Purge 工具: sudo apt-get install ppa-purge - sudo ppa-purge ppa:kubuntu-ppa/backports -请在下面的评论中留言,让我们知道你怎么升级/测试过程是怎样的,别忘了告诉我们你在下一个Plasma 5桌面中要看到的特性。 +请在下面的评论中留言,让我们知道你怎么升级,测试过程是怎样的,别忘了告诉我们你在下一个Plasma 5桌面中要看到的特性。 -------------------------------------------------------------------------------- @@ -73,7 +74,7 @@ via: http://www.omgubuntu.co.uk/2015/04/kde-plasma-5-3-released-heres-how-to-upg 作者:[Joey-Elijah Sneddon][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 755abbca2c78534113313e2494f77804434c3d85 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 2 Jun 2015 22:35:56 +0800 Subject: [PATCH 1043/2517] PUB:20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora @Vic020 --- ... ixgbe driver on CentOS, RHEL or Fedora.md | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md (90%) diff --git a/translated/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md b/published/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md similarity index 90% rename from translated/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md rename to published/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md index e5f8f6bcc7..52ce998473 100644 --- a/translated/tech/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md +++ b/published/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md @@ -1,17 +1,14 @@ -Linux 有问必答 -- 如何在红帽系linux中编译Ixgbe - +Linux 有问必答: 如何在红帽系linux中编译Ixgbe驱动 ================================================================================ > **提问**:我想要安装最新版的ixgbe 10G网卡驱动。在CentOS, Fedora 或 RHEL中,我应该如何编译ixgbe驱动? +想要在linux使用Intel的PCI Express 10G网卡(例如,82598,82599,x540),需要安装Ixgbe驱动。如今的Linux发行版都会预安装ixgbe的可加载模块,但是预安装的ixgbe驱动不是完整功能版。如果想要开启和定制所有10G网卡的功能(如,RSS、多队列、虚拟化功能、硬件 offload 等),需要从源码编译安装。 -想要在linux使用Intel的PCI Express 10G网卡(例如,82598,82599,x540),需要安装Ixgbe驱动。如今的Linux发行版都会欲安装ixgbe作为可加载模块,但是预安装的ixgbe驱动不是完整功能版。如果想要开启和定制所有10G网卡(如,RSS,多)的功能,需要源码编译安装。 - -本文基于红帽系平台(如,CentOS,RHEL或Fedora)。Debian系系统,请看[这篇文章][1] - +本文基于红帽系平台(如,CentOS,RHEL或Fedora)。Debian系平台,请看[这篇文章][1] ### 第一步: 安装依赖 ### -首先,安装必要的开发环境和安装匹配的内核头 +首先,安装必要的开发环境和安装匹配的内核头文件 $ sudo yum install gcc make $ sudo yum install kernel-devel @@ -22,7 +19,7 @@ Linux 有问必答 -- 如何在红帽系linux中编译Ixgbe $ wget http://downloads.sourceforge.net/project/e1000/ixgbe%20stable/3.23.2/ixgbe-3.23.2.tar.gz -确保检查支持内核版本。例如,Ixgbe3.23.2版本支持Linux内核版本2.6.18以上到3.18.1. +请检查支持的内核版本。例如,Ixgbe3.23.2版本支持Linux内核版本2.6.18到3.18.1。 提取压缩包并编译 @@ -30,7 +27,7 @@ Linux 有问必答 -- 如何在红帽系linux中编译Ixgbe $ cd ixgbe-3.23.2/src $ make -如果成功,编译完成的驱动(ixgbe.ko)可以在当前目录找到。 +如果成功,可以在当前目录找到编译完成的驱动(ixgbe.ko)。 可以运行这个命令来查看编译信息: @@ -44,7 +41,7 @@ Linux 有问必答 -- 如何在红帽系linux中编译Ixgbe 这步准备加载已经编译好的驱动。 -如果系统已经加载了Ixgbe驱动,首先需要卸载掉老版本。否者,新版本不能够加载。 +如果系统已经加载了Ixgbe驱动,首先需要卸载掉老版本。否则,新版本不能加载。 $ sudo rmmod ixgbe.ko @@ -178,7 +175,7 @@ ixgbe.ko将会安装在下列目录 /lib/modules//kernel/drivers/net/ixgbe -此时,编译完蛋程序将在启动时自动加载,也可以通过运行命令加载它: +此时,编译好的驱动将在启动时自动加载,也可以通过运行命令加载它: $ sudo modprobe ixgbe @@ -190,10 +187,10 @@ via: http://ask.xmodulo.com/compile-ixgbe-driver-centos-rhel-fedora.html 作者:[Dan Nanni][a] 译者:[Vic020](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/download-install-ixgbe-driver-ubuntu-debian.html +[1]:https://linux.cn/article-5149-1.html [2]:http://sourceforge.net/projects/e1000/files/ixgbe%20stable/ From bd468f8dbd319bde639df0803aba356434b56e86 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 3 Jun 2015 16:11:45 +0800 Subject: [PATCH 1044/2517] =?UTF-8?q?20150603-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...a Gorgeous GTK Theme for Linux Desktops.md | 52 ++++++ ... Beautiful Arc GTK+ Flat Theme on Linux.md | 61 +++++++ ...by on Rails using rbenv on Ubuntu 15.04.md | 152 ++++++++++++++++++ 3 files changed, 265 insertions(+) create mode 100644 sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md create mode 100644 sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md create mode 100644 sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md diff --git a/sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md b/sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md new file mode 100644 index 0000000000..44433a3789 --- /dev/null +++ b/sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md @@ -0,0 +1,52 @@ +Arc Is a Gorgeous GTK Theme for Linux Desktops +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/arc-gtk-theme.jpg) + +It has been a veritable eon since we last highlighted a GTK theme here on this site. + +But seeing Arc, pictured above, rectifies that. + +We couldn’t not mention it. + +### Arc GTK Theme ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/see-through-theme.png) + +Transparency. Not to everyones’ taste. + +Arc is a flat theme with a subtle color scheme and transparency in select parts of the window, like GTK Header Bars and the Nautilus sidebar. + +The see through effect does not, as in themes we past, render the entire app a peek-a-boo mess. Like on OS X Yosemite, the effect is used sparingly and to great effect. + +A companion icon set (called Vertex, and pictured) is also in the works. + +**Yes, it supports Unity** + +The Arc theme supports GTK3 and GTK2 based desktop environments, including GNOME Shell (of course) and the standard Ubuntu Unity desktop. + +It also works just dandy with lightweight Budgie and elementary’s Pantheon desktops and should work fine on Cinnamon. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/Screen-Shot-2015-06-02-at-18.07.15.png) + +Switches, sliders and widgets in Arc + +For all its style it is not the easiest theme to download and install — *understatement klaxon* — because it’s still under active development. + +The package requirements of GTK 3.14 or later also mean Ubuntu 14.04 LTS and 14.10 users are left out in the cold on this one. + +Those of you running Ubuntu 15.04 can use the theme. You can’t (yet) add a PPA or double-click a .Deb package. If you like what you see you’ll need to roll up your sleeves and check out the compile instructions on the project Github page. + +- [Arc Theme Install Instructions on Github][1] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/06/arc-gtk-theme + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://github.com/horst3180/Arc-theme \ No newline at end of file diff --git a/sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md b/sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md new file mode 100644 index 0000000000..7f6c36147a --- /dev/null +++ b/sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md @@ -0,0 +1,61 @@ +Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux +================================================================================ +> Step-by-step tutorial with easy-to-follow instructions + +**Today we're introducing you to a newly released GTK+ theme that features transparent and flat elements and is compatible with multiple desktop environments and Linux distributions. [The theme is called Arc][1].** + +Before going into detail, we suggest that you take a quick look at the gallery attached below, so you have a basic idea of what the theme looks like. Also, you should be aware that it currently works with GTK+ 2.x, GTK+ 3.x, GNOME-Shell, Budgie, Unity, and Pantheon user interfaces, all of them using the GNOME Stack. + +Also, the developer of the Arc theme informs us that it has been successfully tested on the Ubuntu 15.04 (Vivid Vervet), Arch Linux, elementary OS 0.3 Freya, Fedora 21, Fedora 22, Debian GNU/Linux 8.0 (Jessie), Debian Testing, Debian Unstable, openSUSE 13.2, openSUSE Tumbleweed, and Gentoo Linux operating systems. + +### Requirements and installation instructions ### + +To build the Arc theme, you will need to first install some packages, such as autoconf, automake, pkg-config (pkgconfig for Fedora), libgtk-3-dev for Debian/Ubuntu-based distros or gtk3-devel for RPM-based ones, git, gtk2-engines-pixbuf, and gtk-engine-murrine (gtk-murrine-engine for Fedora). + +The Arc theme does not yet have binary packages, so you will need to grab the latest source code from the project's Git repository and compile it. Therefore, open a Terminal app and run the following commands, one by one, hitting the Enter key after each one and waiting for the previous command to finish before adding the next. + + git clone https://github.com/horst3180/arc-theme --depth 1 && cd arc-theme + git fetch --tags + git checkout $(git describe --tags `git rev-list --tags --max-count=1`) + ./autogen.sh --prefix=/usr + sudo make install + +That's it! At this moment, the Arc theme is currently installed on your GNU/Linux distribution and you can activate it using either the GNOME Tweak Tool utility if you're using GNOME or the Unity Tweak Tool software if you are running Ubuntu's Unity desktop. Have fun and don't forget to drop a screenshot with your setup in the comments section below. + +![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-2.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-3.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-4.jpg) + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143.shtml + +作者:[Marius Nestor][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor +[1]:https://github.com/horst3180/Arc-theme +[2]: +[3]: +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: \ No newline at end of file diff --git a/sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md b/sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md new file mode 100644 index 0000000000..a4c5f61104 --- /dev/null +++ b/sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md @@ -0,0 +1,152 @@ +Installing Ruby on Rails using rbenv on Ubuntu 15.04 +================================================================================ +This article we will learn about how to Install Ruby on Rails with rbenv on Ubuntu 15.04. We choose Ubuntu as operating system because Ubuntu is one of Linux distribution that easy to use with a lots of package support and complete documentations , so I think this is the right choice. If you don't install the latest version Ubuntu yet, you can [download the ISO file][1] to start off. + +### Installing Ruby ### + +First thing we need to update ubuntu packages and install some dependencies for Ruby. + + sudo apt-get update + sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev + +There are three methods to install Ruby such rbenv, rvm and from the source. Each have their own benefits, but these days many developers prefer to use rbenv installation method than rvm or from source. We will install the latest version of Ruby, version 2.2.2. + +Installing with rbenv is a simple two step process. First you install rbenv, and then ruby-build : + + cd + git clone git://github.com/sstephenson/rbenv.git .rbenv + echo 'eval "$(rbenv init -)"' >> ~/.bashrc + exec $SHELL + + git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build + echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc + exec $SHELL + + git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash + + rbenv install 2.2.2 + rbenv global 2.2.2 + ruby -v + +We need to install Bundler but before that we tell Rubygems not to install the documentation for each package locally. + + echo "gem: --no-ri --no-rdoc" > ~/.gemrc + gem install bundler + +### Configuring GIT ### + +Before configuring GIT you have to create github account first, you can register [Git][2]. We need Git for our version control system so we are going to set it up to match our Github account. + +Replace **Name** and **Email address** in the following steps with the ones you used for your Github account. + + git config --global color.ui true + git config --global user.name "YOUR NAME" + git config --global user.email "YOUR@EMAIL.com" + ssh-keygen -t rsa -C "YOUR@EMAIL.com" + +After that take the newly generated SSH key and add it to your Github account. And then you need to copy and paste the output of the following command and [paste it here][3]. + + cat ~/.ssh/id_rsa.pub + +If you done of this, check and see if it worked + + ssh -T git@github.com + +You should get a message like this + + Hi excid3! You've successfully authenticated, but GitHub does not provide shell access. + +### Installing Rails ### + +We need to install javascript runtime like NodeJS because these days Rails ships with so many dependencies. With this way we can combines and minify your javascript to provide a faster production environment. + +We need to add PPA repository for installing nodeJS + + sudo add-apt-repository ppa:chris-lea/node.js + sudo apt-get update + sudo apt-get install nodejs + +If you find a problem while updating repository packages, you should try to do this command : + + # Note the new setup script name for Node.js v0.12 + curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - + + # Then install with: + sudo apt-get install -y nodejs + +Next step, follow this command : + + gem install rails -v 4.2.1 + +Because we are using rbenv, make the rails executable available with the following command below + + rbenv rehash + +To make sure the Rails have installed correcly, you can run the rails -v and this will show like this + + rails -v + # Rails 4.2.1 + +For some reason your environment may not be setup properly if you get different result. + +### Setting Up MySQL ### + +You may already be familiar with MySQL, you can install MySQL server and client from Ubuntu repository. You will set the password for the root user on installation process. This information will go into your Rails app's database.yml file in the future. Follow the command line below : + + sudo apt-get install mysql-server mysql-client libmysqlclient-dev + +Installing the libmysqlclient-dev gives you the necessary files to compile the mysql2 gem which is what Rails will use to connect to MySQL when you setup your Rails app. + +### Last Step ### + +Let's try to create your first Rails Application : + + # Use MySQL + + rails new myapp -d mysql + + # Move into the application directory + + cd myapp + + # Create Database + + rake db:create + + rails server + +Visit http://localhost:3000 to view your new website. Now you have got machine setup and ready to build some Rails application. + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/localhost_3000.png) + +If you received an error message when you create database that said Access denied for user 'root'@'localhost' (Using password: NO) then you need to update your config/database.yml file to match the database **username** and **password**. + + # Edit your database.yml in config folder + + nano config/database.yml + +and then fill the password field with your MySQL root password. + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/root_passw.png) + +Exit (Ctrl+X) and save. + +### Conclusion ### + +Rails is written in Ruby, the programming language which is also used alongside Rails. Ruby on Rails can be installed in three methods such rbenv, rvm and from the source on Ubuntu 15.04. Here in this tutorial we've used rbenv method and MySQL as database. If any question or suggestion, please write them in the comment below. + + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/installing-ruby-rails-using-rbenv-ubuntu-15-04/ + +作者:[Obet][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/obetp/ +[1]:http://release.ubuntu.com/15.04 +[2]:http://github.com +[3]:https://github.com/settings/ssh \ No newline at end of file From 18a8430dc7b179a5935adde391a978b6635db2bb Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 3 Jun 2015 20:46:36 +0800 Subject: [PATCH 1045/2517] translating --- .../20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md b/sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md index 44433a3789..8b19ac119e 100644 --- a/sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md +++ b/sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md @@ -1,3 +1,5 @@ +Translating---geekpi + Arc Is a Gorgeous GTK Theme for Linux Desktops ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/arc-gtk-theme.jpg) From 986d8d08120fd04a8a2785d00943c1a7b9e4a187 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 3 Jun 2015 21:29:47 +0800 Subject: [PATCH 1046/2517] translated --- ...a Gorgeous GTK Theme for Linux Desktops.md | 54 ------------------ ...a Gorgeous GTK Theme for Linux Desktops.md | 55 +++++++++++++++++++ 2 files changed, 55 insertions(+), 54 deletions(-) delete mode 100644 sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md create mode 100644 translated/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md diff --git a/sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md b/sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md deleted file mode 100644 index 8b19ac119e..0000000000 --- a/sources/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md +++ /dev/null @@ -1,54 +0,0 @@ -Translating---geekpi - -Arc Is a Gorgeous GTK Theme for Linux Desktops -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/arc-gtk-theme.jpg) - -It has been a veritable eon since we last highlighted a GTK theme here on this site. - -But seeing Arc, pictured above, rectifies that. - -We couldn’t not mention it. - -### Arc GTK Theme ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/see-through-theme.png) - -Transparency. Not to everyones’ taste. - -Arc is a flat theme with a subtle color scheme and transparency in select parts of the window, like GTK Header Bars and the Nautilus sidebar. - -The see through effect does not, as in themes we past, render the entire app a peek-a-boo mess. Like on OS X Yosemite, the effect is used sparingly and to great effect. - -A companion icon set (called Vertex, and pictured) is also in the works. - -**Yes, it supports Unity** - -The Arc theme supports GTK3 and GTK2 based desktop environments, including GNOME Shell (of course) and the standard Ubuntu Unity desktop. - -It also works just dandy with lightweight Budgie and elementary’s Pantheon desktops and should work fine on Cinnamon. - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/Screen-Shot-2015-06-02-at-18.07.15.png) - -Switches, sliders and widgets in Arc - -For all its style it is not the easiest theme to download and install — *understatement klaxon* — because it’s still under active development. - -The package requirements of GTK 3.14 or later also mean Ubuntu 14.04 LTS and 14.10 users are left out in the cold on this one. - -Those of you running Ubuntu 15.04 can use the theme. You can’t (yet) add a PPA or double-click a .Deb package. If you like what you see you’ll need to roll up your sleeves and check out the compile instructions on the project Github page. - -- [Arc Theme Install Instructions on Github][1] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/06/arc-gtk-theme - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://github.com/horst3180/Arc-theme \ No newline at end of file diff --git a/translated/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md b/translated/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md new file mode 100644 index 0000000000..14dd88ef70 --- /dev/null +++ b/translated/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md @@ -0,0 +1,55 @@ +Arc是一个很棒的Linux桌面的GTK主题 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/arc-gtk-theme.jpg) + +距离本站上次推荐的GTK主题已经过了很久了。 + +但是看到上面的Arc后,需要纠正这点了。 + +我们不能不提到它。 + +### Arc GTK主题 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/see-through-theme.png) + +Transparency. Not to everyones’ taste. +透明并不符合每个人的口味 + +Arc是一个扁平化主题并有微妙的配色并部分选中的窗口透明,就像GTK的顶拦和Nautilus的侧边栏。 + + +它的效果不像我们之前的主题那样将程序渲染的像躲猫猫那样混乱。像OSX Yosemite,效果用的不变多但是很好。 + +随之的图标集(称为Vertex)同样可用。 + +**是的它支持Unity** + +Arc主题支持基于GTK3和GTK2桌面环境,包含Gnome Shell(当然)和标准的Ubuntu Unity。 + +它也可以很好地与轻量级的Budgie和elementary的Pantheon桌面以及也可以工作在Cinnamon上。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/Screen-Shot-2015-06-02-at-18.07.15.png) + +Arc中的开关、滑块和小挂件。 + +它并不容易下载与安装- *understatement klaxon* - 因为它还在密集开发中。 + + +安装包需要GTK 3.14或者更新,这意味着Ubuntu 14.04 LTS和14.10的用户无法使用了。 + +那些使用Ubuntu 15.04的用户可以使用这个主题。你还不能添加ppa或者双击.deb包。如果你喜欢你看见的你需要卷起你的袖子并查看github上的编译指导。 + +- [Github中Arc安装指导][1] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/06/arc-gtk-theme + +作者:[Joey-Elijah Sneddon][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://github.com/horst3180/Arc-theme From a92d9b2f90f4afa014a394374666fbd8e636457f Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 3 Jun 2015 22:41:59 +0800 Subject: [PATCH 1047/2517] PUB:20150407 Top 6 Ways To Get Your iTunes Experience On Linux @KevinSJ --- ... To Get Your iTunes Experience On Linux.md | 88 ++++++++++++++ ... To Get Your iTunes Experience On Linux.md | 115 ------------------ 2 files changed, 88 insertions(+), 115 deletions(-) create mode 100644 published/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md delete mode 100644 translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md diff --git a/published/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md b/published/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md new file mode 100644 index 0000000000..dee56ed250 --- /dev/null +++ b/published/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md @@ -0,0 +1,88 @@ +六种在 Linux 上为你带来 iTunes 般体验的方法 +================================================================================ +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/itunes-linux-840x420.jpg?35dc20) + +随着你对 Linux 的熟悉(也许会成为你首要使用的操作系统),你终将会寻找能在 Linux 上有效管理音乐的工具。你首先想到 iTunes,因为它是近几年最流行的音乐管理工具,但你马上会发现 iTunes 并没有 Linux 版本。而且,现在,你会发现还有比 iTunes 更好的音乐管理工具。 + +尽管如此,这并不意味着你就不能使用你喜欢的方式管理音乐。Linux 上有很多方式可以让你整理你的曲库。以下六种,仅供参考: + +### 通过WINE运行iTunes ### + +尽管 iTunes 没有Linux版,你还是可以试试 [使用 WINE 运行 iTunes ][1] 或 PlayOnLinux 的。这些软件给本来只能运行于Windows下的应用程序添加一个兼容层,这样就能让他们运行在Linux上了,但这样的方法效果十有分限。因此,[并非所有 Windows 应用程序都能使用WINE运行][2] - 但这还是一个值得尝试的方法。 + +各个版本的iTunes结果可能给你不同的结果,但一般都遵循以下方法: + +1. 安装WINE +2. 在WINE里运行iTunes安装程序 +3. 在网上搜索并解决你遇到的问题。 + +如果你在安装时遇到无法解决的问题,比如安装程序错误,或者安装好的程序运行不了,那是没办法的,WINE 就是这样。 + +如果你想在 WINE 上运行 iTunes 而且运气很好的跑起来了,那真是很棒。但如果你还想考虑运行一个原生的Linux应用,或者 WINE 不工作的话,还有很多其他选择的。有几个曲库管理软件能让你很方便的管理你的音乐并直接进行播放,还可以制作播放列表。 + +### [Amarok][3] ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/amarok_main.jpg?35dc20) + +如果你使用KDE环境,我推荐 Amarok。它具有 [很多管理音乐的特性][4] 而且它还能与KDE桌面环境无缝兼容。它有很多实用的特性如集成了 Last.FM、文件跟踪、动态播放列表及脚本支持。它甚至会自动在你播放曲目时,自动下载艺术家封面。 + +### [Banshee][5] ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/banshee_main.jpg?35dc20) + +如果你使用 GNOME 或其他任何基于 GTK 的桌面环境(它们十分常见)的话,我推荐使用使用Bansee作为 [全功能曲库管理工具][6] 。它的功能与Amarok类似,也集成了Last.FM,支持互联网广播,支持podcast等等。选择 Amarok 还是 Bansee 要看你使用的桌面环境(这样才能无缝整合)。 + +### [Rhythmbox][7] ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/rhythmbox_main.jpg?35dc20) + +Rhythmbox是一个更好基于GTK的桌面环境的[轻量级的曲库替代品][8]。尽管如此,它也还是有一些自己的特性的。它也支持Last.FM,同时还能无缝播放并与其它如 Nautilus、XChat及Pidgin 等进行整合。 + +### [Clementine][9] ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/clementine_main.jpg?35dc20) + +另一款叫 Clementine 的软件也值得我推荐,因为它的界面简洁、易用。它支持非常多的第三方服务例如Spotify,Digtal Imported 及Dropbox。Android系统上还有一款用作 Clementine 遥控的app。[Clementine是跨平台的][10] , 还支持Mac OS X 及 Windows。 + +这些程序都能很好的管理并播放你的音乐。唯一的问题是这些程序都不支持与 iOS 设备的整合, 而且目前Linux 上还没有程序能做到这一点。但 iOS 经过很多改进后,已经并不需要再连接到电脑了。 + +### [Google Play Music][11] ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/google_music.jpg?35dc20) + +最后,如果上面的那些程序还不能满足你的需求的话,你可以试试 Google Play Music。这个在线服务也可以用作播放音乐的曲库管理工具,但它还有几个额外的好处。你可以上传所有的音乐,并且在所有能上网的设备上获取这些音乐。这也意味着你不需要在电脑或者移动设备之间同步你的音乐(无论是 Android 还是 iOS 设备),因为你可以这些设备中使用Google Play Music。 如果你想要扩展你的曲库,你可以订阅 All Access 服务,但这并不是必须的。你不需要支付任何费用也可在你的曲库中储存20,000首 + +#### 靠,居然没有 Spotify ?! #### + +尽管 Spotify 也是一款管理和听音乐的方法,我不推荐它的唯一原因是它事实上并不让你管理你的音乐。你不能将曲目上传到 Spotify - 只能它们给你提供的曲目。尽管它们提供了很多,但口味未必一样。 + + +### 你还有其他选择 ### + +以上六个软件应该可以在给你带来类似 iTunes 的功能了。这些软件主要是能让你管理和播放你的曲库,但如果你还需要 iTunes 里的其他特性,其他Linux原生软件或许能满足这类需求。 + +**你通常在Linux上使用哪些音乐?**在下方评论与我们分享吧! + + +-------------------------------------------------------------------------------- + +via: http://www.makeuseof.com/tag/top-6-ways-get-itunes-experience-linux/ + +作者:[Danny Stieben][a] +译者:[KevinSJ](https://github.com/KevinSJ) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.makeuseof.com/tag/author/danny/ +[1]:http://www.makeuseof.com/tag/how-about-some-wine-with-your-linux/ +[2]:http://www.makeuseof.com/answers/does-wine-runs-all-windows-apps/ +[3]:https://amarok.kde.org/ +[4]:http://www.makeuseof.com/tag/control-music-amarok-linux/ +[5]:http://banshee.fm/ +[6]:http://www.makeuseof.com/tag/banshee-20-comprehensive-media-player-streamer-podcast-tool-linux/ +[7]:https://wiki.gnome.org/Apps/Rhythmbox +[8]:http://www.makeuseof.com/tag/play-manage-music-collection-rhythmbox-linux/ +[9]:https://www.clementine-player.org/ +[10]:http://www.makeuseof.com/tag/need-a-lightweight-music-player-without-sacrificing-features-clementine-cross-platform/ +[11]:http://music.google.com/ diff --git a/translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md b/translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md deleted file mode 100644 index 5e5d0e213a..0000000000 --- a/translated/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md +++ /dev/null @@ -1,115 +0,0 @@ -六种在 Linux 上带来 iTunes 体验的方法 -Top 6 Ways To Get Your iTunes Experience On Linux -================================================================================ -![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/itunes-linux-840x420.jpg?35dc20) - -随着你对 Linux 的熟悉(也许会成为你首要使用的操作系统),你最终会寻找能在Linux上有效管理音乐的工具。你首先想到了 iTunes,因为它是近几年最流行的音乐管理工具,但你马上会发现iTunes并没有Linux版本。而且,你会发现还有比 iTunes 更好的音乐管理工具。 -As you’re getting used to Linux (potentially as your new main operating system), you’ll eventually try to find a way to efficiently manage your music. iTunes comes to mind because it’s been the most popular way to manage music over the years, but you’ll quickly find out that iTunes isn’t available natively on Linux. Plus, better ways exist to manage your music now that it’s 2015. - -尽管如此,这并不意味着你就不能使用你喜欢的方式管理音乐。Linux 上有很多方式可以让你整理你的音乐库。以下六种,仅供参考: -However, that doesn’t automatically mean that you won’t be able to manage your music the way you want to. There’s plenty of other ways to keep tabs on your music library. Here’s six great ways to get it done. - -### 在WINE上运行iTunes ### -### iTunes via WINE ### - -尽管 iTunes 没有Linux版,你还是可以试试 [使用 WINE 运行 iTunes ][1] 或 PlayOnLinux 的。这些软件给本来只能运行于Windows下的应用程序添加了一个兼容层,这样就能让他们运行在Linux上了,但这样的方法效果十有分限。因此 [并非所有 Windows 应用程序都能使用WINE运行][2] - 但这还是一个值得尝试的方法。 -Even if iTunes isn’t available in Linux as a native application, you can still try to [get it to work under WINE][1] or PlayOnLinux. These pieces of software try to add a compatibility layer so that Windows applications work on Linux, but the results are far from perfect. Therefore, [not all Windows applications will run with WINE][2] — but it’s still worth a try. - -各个版本的iTunes结果可能给你不同的结果,但一般都遵循以下方法: -1. 安装WINE -1. 在WINE里运行iTunes安装程序 -1. 在网上搜索并解决你遇到的问题。 - -如果你在安装时遇到无法解决的问题,比如安装程序错误,或者安装好的程序运行不了,那是没办法的,WINE 就是这样 - -如果你想在 WINE 上运行 iTunes 但恰好运行不了的话,没问题。但如果你还想考虑运行一个原生的Linux的话,还有很多其他选择的。这些音乐管理软件狗能让你很方便的管理你的音乐并直接进行播放,还可以制作播放列表。 - -Each version of iTunes can give you different results, but the general process is as follows: - -1. Install WINE -1. Run the iTunes installer via WINE -1. Google and try to solve any problems you come across. - -Again, you might come across issues somewhere along the way which cannot be solved, such as the installer failing or the installed application refusing to run. That’s just how it is with WINE. - -If you really want to use iTunes and you happen to luck out with WINE, then that’s great. However, if you’d rather use a native Linux application or WINE didn’t work for you, then there are options here as well. Several “music library manager” programs are available to give you a quick oversight of your music and play it directly in the application, as well as make playlists. - -### [Amarok][3] ### - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/amarok_main.jpg?35dc20) - -如果你使用KDE环境,我推荐 Amarok。它具有 [很多管理音乐的特性][4] 而且他还能与KDE桌面环境无缝兼容。它很有很多实用的特性如无缝兼容 Last.FM,文件跟踪,动态播放列表及个吃支持。它甚至会自动在你播放曲目时,自动下载艺术家封面。 - -If you use KDE, then I’d recommend Amarok. It has [plenty of features to manage your music][4] and tight desktop integration with KDE. It also has useful features such as Last.FM integration, file tracking, dynamic playlists, and script support. It can even pull up biographies of artists as you play their songs. - -### [Banshee][5] ### - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/banshee_main.jpg?35dc20) - -如果你使用 GNOME 或其他任何基于 GTK 的桌面环境(他们十分常见)的话,我推荐使用使用Bansee作为 [全功能音乐库管理工具][6] 。它的功能与Amarok类似,也与Last.FM无缝兼容,支持网络广播,支持podcast,还有很多其他功能。选择 Amarok 还是 Bansee 要看你使用的桌面环境(这样才能无缝整合)。 - -If you use GNOME or any GTK-based desktop environment (they’re quite common), then I’d recommend Banshee as a [full-featured music library][6] manager. It has a very similar feature set as Amarok, including Last.FM integration, Internet radio support, podcast support, and much more. Amarok and Banshee are really among the top two choices, so which one you choose should depend on which desktop environment you’re using (for integration’s sake). - -### [Rhythmbox][7] ### - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/rhythmbox_main.jpg?35dc20) - -Rhythmbox是一个 基于GTK的桌环境下更 [轻量级的音乐库替代品][8]。尽管如此,它也还是有一些特性的。它也支持Last.FM,同时还能无缝播放并与其他如 Nautilus, XChat,及Pidgin 等进行整合。 -Rhythmbox as a more [lightweight music library alternative][8] that is best used on GTK-based desktop environments. However, it still has quite a few features. You also get Last.FM support here, plus gapless playback and integration with various other applications such as Nautilus, XChat, and Pidgin. - -### [Clementine][9] ### - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/clementine_main.jpg?35dc20) - -另一款叫 Clementine 的软件也值得我推荐,因为它的见面简洁、易用。它支持非常多的第三方服务例如Spotify,Digtal Imported 及Dropbox。Android系统上还有一款用作 Clementine 遥控的app。[Clementine是一个跨平台的][10] , 还支持Mac OS X 及 Windows。 -Another application called Clementine also gets my recommendation with its clean and intuitive interface. It has tons of support for third-party services such as Spotify, Digitally Imported, and Dropbox. There’s also an Android app you can use as a remote control for Clementine. [Clementine is cross-platform][10] and available for Windows and Mac OS X. - -这些程序都能很好的管理并播放你的音乐。唯一的问题是这些程序都不支持与 iOS 设备的整合, 而且目前还没有程序能做到这一点。但 iOS 经过很多改进后,已经足以不需要再连接到电脑了。 -They all are excellent at managing and playing your music. The only downside to all of these is that there is no iOS device integration, and there’s currently no modern application that can do that. However, iOS has received enough improvements that it’s virtually unnecessary to connect it to a computer anymore. - -### [Google Play Music][11] ### - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/google_music.jpg?35dc20) - -最后,如果上面的那些程序还不能满足你的需求的花,你可以试试 Google Play Music。这个在线服务也可以用作能播放音乐的音乐库管理工具,但他还有几个额外的好处。你可以上传所有的音乐,并且在所有能上网的设备上获取这些音乐。这也意味着你不需要在电脑或者移动设备之间同步你的音乐(无论是 Android 还是 iOS 设备),因为你可以这些设备中使用Google Play Music。 如果你想要扩展你的去库,你可以订阅 All Access,但这并不是必须的。你不需要支付任何费用也可在你的曲库中储存20,000首 -Lastly, if none of those applications satisfy your needs, you can take a look at Google Play Music. This online service acts as a music library manager that can play your music, but it also has some extra benefits. You can upload all your music to it and have access on any device connected to the Internet. That also means that you won’t have to sync your music between your computer and your mobile device (no matter if Android or iOS) because you have access to Google Play Music from both. If you want to expand your library you can get the All Access subscription, but it’s not a requirement. You can use it simply as a music library completely free for up to 20,000 songs. - -#### 靠,居然没有 Spotify ?! #### -#### Wot, no Spotify?! #### - -尽管 Spotify 也是一款管理和听音乐的方法,我不推荐它的唯一原因是它事实上并不让你管理你的音乐。你不能将曲目上传到 Spotify - 只能它们给你提供的曲目。尽管它们提供了很多,但原理都不尽相同。 -The only reason why I don’t mention Spotify is that, although it’s also a great way to access and listen to music, it doesn’t really let you manage your own music. You can’t upload trakcs to Spotify — you have to listen to what they give you. Albeit they give you a lot, but it’s nonetheless a different mechanism. - -### 你还有其他选择 ### -### You Have Options ### - -以上六个软件应该可以在给你带来类似 iTunes 的功能了。这些软件主要是能让你管理和播放你的音乐库,但如果你还需要 iTunes 里的其他特性,其他Linux原生软件或许能满足这类需求。 - -With these six options, you should be able to get iTunes-like functionality on your desktop. These options focused mainly on managing and playing your music library, but if there are any other features that you need from iTunes, other Linux-native applications can take care of those needs. - -**你通常在Linux上使用哪些音乐?**在下方评论与我们分享吧! -**What music applications do you regularly use on Linux?** Let us know in the comments! - - --------------------------------------------------------------------------------- - -via: http://www.makeuseof.com/tag/top-6-ways-get-itunes-experience-linux/ - -作者:[Danny Stieben][a] -译者:[KevinSJ](https://github.com/KevinSJ) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.makeuseof.com/tag/author/danny/ -[1]:http://www.makeuseof.com/tag/how-about-some-wine-with-your-linux/ -[2]:http://www.makeuseof.com/answers/does-wine-runs-all-windows-apps/ -[3]:https://amarok.kde.org/ -[4]:http://www.makeuseof.com/tag/control-music-amarok-linux/ -[5]:http://banshee.fm/ -[6]:http://www.makeuseof.com/tag/banshee-20-comprehensive-media-player-streamer-podcast-tool-linux/ -[7]:https://wiki.gnome.org/Apps/Rhythmbox -[8]:http://www.makeuseof.com/tag/play-manage-music-collection-rhythmbox-linux/ -[9]:https://www.clementine-player.org/ -[10]:http://www.makeuseof.com/tag/need-a-lightweight-music-player-without-sacrificing-features-clementine-cross-platform/ -[11]:http://music.google.com/ From 5d9e0be0f27737dd4fd077d568cfb8dc3574273e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 3 Jun 2015 23:33:35 +0800 Subject: [PATCH 1048/2517] PUB:20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool @tyzy313481929 --- ...databases on Linux VPS using a GUI tool.md | 176 ++++++++++++++++++ ...databases on Linux VPS using a GUI tool.md | 171 ----------------- 2 files changed, 176 insertions(+), 171 deletions(-) create mode 100644 published/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md delete mode 100644 translated/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md diff --git a/published/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md b/published/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md new file mode 100644 index 0000000000..a0114d5382 --- /dev/null +++ b/published/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md @@ -0,0 +1,176 @@ +如何使用图形化工具远程管理 Linux上的MySQL +================================================================================ +如果你在一个远程的VPS上运行了MySQL服务器,你会如何管理你的远程数据库主机呢?基于web的数据库管理工具例如[phpMyAdmin][2]或者[Adminer][3]可能会是你第一个想起的。这些基于web的管理工具需要一个正常运行的后端的web服务和PHP引擎。但是,如果你的VPS仅仅用来做数据库服务(例如,数据库与其它服务独立存放的分布式结构),为偶尔的数据库管理提供一整套的LAMP是浪费VPS资源的。更糟的是,LAMP所打开的HTTP端口可能会成为你VPS资源的安全漏洞。 + +作为一种选择,你可以使用在一台客户机上运行本地的MySQL客户端,当然,如果没有别的选择,一个纯净的MySQL命令行客户端将是你的默认选择。但是命令行客户端的功能是有限的,因为它没有生产级数据库管理功能,例如:可视化SQL开发、性能调优、模式验证等等。你是否在寻找一个成熟的MySQL管理工具,那么一个MySQL的图形化管理工具将会更好的满足你的需求。 + +###什么是MySQL Workbench? + +作为一个由Oracle开发的集成的数据库管理工具,[MySQL Workbench][4]不仅仅是一个简单的MySQL客户端。简而言之,Workbench是一个跨平台的(如:Linux,MacOX,Windows)数据库设计、开发和管理的图形化工具。MySQL Workbench 社区版是遵循GPL协议的。作为一个数据库管理者,你可以使用Workbench去配置MySQL服务、管理MySQL用户、进行数据库的备份与还原、监视数据库的健康状况,所有的都在对用户友好的图形化环境下处理。 + +在这个手册里,让我们演示下如何在Linux下安装和使用MySQL Workbench。 + +###在Linux上安装MySQL Workbench + +你可以在任何一个桌面linux机器上运行MySQL Workbench来设置你的数据库管理环境。虽然一些Linux发行版(例如:Debian/Ubuntu)在他们的软件源中已经有了MySQL Workbench,但是从官方源中安装是一个好的方法,因为他们提供了最新的版本。这里介绍了如何设置一个官方的Workbench软件源和从中安装它。 + +#### 基于 Debian 的桌面 (Debia, Ubuntu, Mint): #### + +到其[官方站点][5],选择一个和你环境匹配的DEB文件,并下载安装: + +例如,对于 Ubuntu 14.10: + + $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.4-2ubuntu14.10_all.deb + $ sudo dpkg -i mysql-apt-config_0.3.4-2ubuntu14.10_all.deb + +对于 Debian 7: + + $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.3-1debian7_all.deb + $ sudo dpkg -i mysql-apt-config_0.3.3-1debian7_all.deb + +当你安装DEB文件时,你会看到下面的配置菜单,并且选择配置那个MySQL产品 + +![](https://farm8.staticflickr.com/7702/16928715218_b1fcbcdbf3_c.jpg) + +选择“Utilities”。完成配置后,选择“Apply”去保存配置。然后,更新包索引,并且安装Workbench。 + + $ sudo apt-get update + $ sudo apt-get install mysql-workbench + +#### 基于 Red Hat 的桌面 (CentOS, Fedora, RHEL): #### + +去官网下载并安装适合你Linux环境的RPM源包。 + +例如,对于 CentOS 7: + + $ wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm + $ sudo yum localinstall mysql-community-release-el7-5.noarch.rpm + +对于 Fedora 21: + + $ wget http://dev.mysql.com/get/mysql-community-release-fc21-6.noarch.rpm + $ sudo yum localinstall mysql-community-release-fc21-6.noarch.rpm + +验证"MySQL Tools Community"源是否被安装: + + $ yum repolis enabled + +![](https://farm9.staticflickr.com/8826/16494069254_15458ace52_c.jpg) + +安装Workbench + + $ sudo yum install mysql-workbench-community + +###设置远程数据库的安全连接 + +接下来是为你运行MySQL服务的VPS设置一个远程连接。当然,你可以直接通过图形化的Workbench连接你的远程MySQL服务器(在数据库开放了远程连接后)。然而,这样做有很大的安全风险,因为有些人很容易窃听你的数据库传输信息,并且一个公开的MySQL端口(默认为3306)会是另外一个攻击入口。 + +一个比较好的方法是关掉远程访问数据库服务功能,(仅允许在VPS 上的127.0.0.1访问)。然后在本地客户机和远程VPS之间设置一个SSH隧道,这样的话,和MySQL之间的数据能安全地通过它的本地回环接口上中继。相比较设置一个SSL加密的连接来说,配置SSH隧道需要很少的操作,因为它仅仅需要SSH服务,并且在大多数的VPS上已经部署了。 + +让我们来看看如何来为一个MySQL Workbench设置一个SSH隧道。 + +在这个设置里,不需要你开放远程访问MySQL服务。 + +在一个运行了Workbench的本地客户机上,键入下面的命令,替换'user'(远程 VPS 的用户名)和'remote_vps'(远程 VPS 的地址)为你自己的信息: + + $ ssh user@remote_vps -L 3306:127.0.0.1:3306 -N + +你会被要求输入你VPS的SSH密码,当你成功登陆VPS后,在本地的3306端口和远程VPS的3306端口之间将会建立一个SSH隧道。这里你不会在前台看到任何信息显示。 + +或者你可以选择在后台运行SSH隧道,按CTRL+Z停止当前的命令,然后输入bg并且ENTER + +![](https://farm8.staticflickr.com/7714/16928715438_bf0db49b3b_c.jpg) + +这样SSH隧道就会在后台运行了。 + +###使用MySQL Workbench远程管理MySQL服务 + +在建立好SSH隧道后,你可以通过MySQL Workbench去远程连接MySQL服务了。 + +输入下面命令启动Workbench: + + $ mysql-workbench + +![](https://farm9.staticflickr.com/8768/16494069294_0fce571ddb_c.jpg) + +点击Workbench页面上面的“加号”图标去创建一个新的数据库连接,接着会出现下面的连接信息。 + +- **Connection Name**: 任意描述 (例如: My remote VPS database) +- **Hostname**: 127.0.0.1 +- **Port**: 3306 +- **Username**: MySQL 用户名 (例如 root) + +![](https://farm8.staticflickr.com/7727/16928715288_d9ac3bfc7a_c.jpg) + +注意:因为隧道设置的是127.0.0.1:3306,所以主机名字段必须是127.0.0.1,而不能是远程VPS的IP地址或者主机名。 + +当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。 + +![](https://farm8.staticflickr.com/7650/17114969532_0252ffcd31_c.jpg) + +当你登录到MySQL 服务器后,你可以再左侧面板看到各种管理任务。让我们来看一些常见的管理任务。 + +#### MySQL Server Status #### + +该菜单显示了展示数据库服务器的资源使用情况的实时监控面板。(例如:流量、链接、读写) + +![](https://farm8.staticflickr.com/7627/16494069414_9d838d4138_c.jpg) + +#### Client Connections #### + +客户端连接数是一个极其重要的监控的资源,这个菜单显示了每个连接的详细信息。 + +![](https://farm9.staticflickr.com/8747/16909119337_a8d89772dd_c.jpg) + +#### 用户和权限 #### + +这个菜单允许你管理MySQL用户,包括他们的资源限制和权限。 + +![](https://farm9.staticflickr.com/8765/16494069384_760fc17c8f_c.jpg) + +#### MySQL Server Administration #### + +你可以启动或关闭MySQL服务,并且检查它的服务日志。 + +![](https://farm8.staticflickr.com/7588/17114969592_54526dfb32_c.jpg) + +#### Database Schema Management #### + +可以可视化的查看、更改、检查数据库结构,在“Schemas”标题下选择任何一个数据库或表,然后右击 + +![](https://farm8.staticflickr.com/7665/16496363973_fd03a96198_c.jpg) + +![](https://farm9.staticflickr.com/8744/16909119497_7c884617b8_c.jpg) + +#### Database Query #### + +你可以执行任何的语句(只要你的权限允许),并且检查其结果。 + +![](https://farm8.staticflickr.com/7716/17114969692_c0f02bb277_c.jpg) + +此外,性能统计数据和报表仅用于MySQL5.6以上的版本。对于5.5及其以下的版本,性能部分会以灰色显示。 + +### 结论 ### + +简介且直观的选项卡界面,丰富的特性,开源,使MySQL Workbench成为一个非常好的可视化数据库设计和管理工具。为其减分的是它的性能。我注意到在一台运行繁忙的服务器上,Workbench有时会变得异常缓慢,尽管它的性能差强人意,我依然认为MySQL Workbench是MySQL数据库管理员和设计人员必备的工具之一。 + +你曾在你的生产环境中用过Workbench吗?或者你还有别的GUI工具可以推荐?请分享你的经验吧。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/remote-mysql-databases-gui-tool.html + +作者:[Dan Nanni][a] +译者:[tyzy313481929](https://github.com/tyzy313481929) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/go/digitalocean +[2]:http://ask.xmodulo.com/install-phpmyadmin-centos.html +[3]:http://xmodulo.com/set-web-based-database-management-system-adminer.html +[4]:http://mysqlworkbench.org/ +[5]:http://dev.mysql.com/downloads/repo/apt/ +[6]:http://dev.mysql.com/downloads/repo/yum/ +[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html diff --git a/translated/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md b/translated/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md deleted file mode 100644 index 580e68e9d7..0000000000 --- a/translated/tech/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md +++ /dev/null @@ -1,171 +0,0 @@ -Translating by demon -如何使用图形化工具远程管理Linux Vps上的MySql -================================================================================ -如果你在一个远程的VPS上运行了MYSQL server,你会如何管理你的远程数据库主机呢?基于web的数据库管理工具例如phpMyAdmin或者Adminer可能会是你一个想起的。这些基于web的管理工具需要一个后端的web服务和PHP引擎在正常运行。但是,如果你的VPS仅仅用来做数据库服务(e.g., for a multi-tier app),为临时的数据库管理提供一整套的LAMP是浪费VPS资源的。更糟的是,LAMP带有的HTTP端口可能会成为你VPS资源的安全漏洞。 - -作为一种选择,你可以使用在一台客户机上运行本地的Mysql客户端,当然,如果没有别的选择,一个纯净的命令行mysql客户端将是你的默认选择。但是命令行客户端的功能是有限的,因此它不适合在生产环境中使用,例如:sql开发,性能调优,模式验证等等。你是否在寻找一个成熟的MYSQL管理工具,那么一个MYSQL的图形化管理工具将会更好的满足你的需求。 - -什么是MySQL Workbench? - -作为一个由Oracle开发的成熟数据库管理工具,mysql workbench不仅仅是一个MySQL客户端。简而言之,Workbench是一个跨平台的(eg:Linux,MacOX,Windows)数据库设计,开发和管理图形工具。社区版本的Msyql Workbench是遵循GPL协议的。作为一个数据库管理者,你可以使用Workbench去配置Mysql服务,管理Mysql用户,完成数据库的备份与还原,监视数据库的健康状况,所有的都在对用户友好的图形化环境下处理。 - -在这个手册里,让我们演示下如何在Linux下安装和使用Mysql Workbench. - -在Linux上安装MySQL Workbench - -你可以在任何一个桌面linux机器上运行Mysql Workbench去设置你的数据库管理环境。然而一些Linux发行版(例如:Debian/Ubuntu)在他们的软件源中已经有了Mysql Workbench.从官方源中安装是一个好的方法,因为他们提供了最新的版本。这里介绍了如何设置一个官方的Workbench源和从中安装它。 - -#### Debian-based Desktop (Debia, Ubuntu, Mint): #### - -到其官方站点,选择一个和你环境匹配的DEB file源,并下载安装 - -For example, on Ubuntu 14.10: - - $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.4-2ubuntu14.10_all.deb - $ sudo dpkg -i mysql-apt-config_0.3.4-2ubuntu14.10_all.deb - -on Debian 7: - - $ wget http://dev.mysql.com/get/mysql-apt-config_0.3.3-1debian7_all.deb - $ sudo dpkg -i mysql-apt-config_0.3.3-1debian7_all.deb - -当你安装DEB文件时,你会看到下面的配置菜单,并且选择配置那个Mysql产品 - -![](https://farm8.staticflickr.com/7702/16928715218_b1fcbcdbf3_c.jpg) - -选择“Utilities”.完成配置后,选择“Apply”去保存配置。然后,更新包索引,并且安装Workbench - - $ sudo apt-get update - $ sudo apt-get install mysql-workbench - -#### Red Hat-based Desktop (CentOS, Fedora, RHEL): #### - -去官网下载并安装适合你Linux环境的RPM源包 -For example, on CentOS 7: - - $ wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm - $ sudo yum localinstall mysql-community-release-el7-5.noarch.rpm - -on Fedora 21: - - $ wget http://dev.mysql.com/get/mysql-community-release-fc21-6.noarch.rpm - $ sudo yum localinstall mysql-community-release-fc21-6.noarch.rpm - -验证"MySQL Tools Community"源是否被安装 - $ yum repolis enabled - -![](https://farm9.staticflickr.com/8826/16494069254_15458ace52_c.jpg) - -安装Workbench - - $ sudo yum install mysql-workbench-community - -设置远程数据库的安全连接 - -接下来是为你运行Mysql服务的VPS设置一个远程连接,当然你可以直接通过图形化的Workbench连接你的远程Mysql服务器(在数据库开放了远程连接后)。然而,这样做有很大的安全风险,因为有些人很容易窃听你的数据库传输信息,并且一个公开的Mysql端口(默认为3306)被作为攻击入口。 - -一个比较好的方法是关掉远程访问数据库服务功能,(仅允许在127.0.0.1访问)。然后在本地客户机和远程Vps直接设置一个SSH隧道,这样的话,和mysql之间的数据能被安全的传输,仅在它的本地回环接口上。相比较设置一个SSL加密的连接来说,配置SSH隧道需要很少的操作,因为他仅仅需要SSH服务,并且在大多数的VPS上已经部署了。 - -让我们来看看如何来为一个Mysql Workbench设置一个SSH隧道,这里的设置,不需要你开放远程访问Mysql服务。 -在一个运行了Workbench的本地客户机上,键入下面的命令,替换'user' and 'remote_vps'为你自己的信息 - - $ ssh user@remote_vps -L 3306:127.0.0.1:3306 -N - -你会被要求输入你VPS的SSH密码,当你成功登陆VPS后,一个SSH隧道将会在本地的3306端口和远程VPS的3306端口将会被建立。这里你不会看到任何信息。 - -或者你可以选择在后台运行SSH隧道,按CTRL+Z停止当前的命令,然后输入bg并且ENTER - -![](https://farm8.staticflickr.com/7714/16928715438_bf0db49b3b_c.jpg) - -这样SSH隧道就会在后台运行了。 - -使用MySQL Workbench远程管理MySQL服务 - -在建立好SSH隧道后,你可以通过MySQL Workbench去远程连接Mysql服务了。 - -输入下面命令启动Workbench - - $ mysql-workbench - -![](https://farm9.staticflickr.com/8768/16494069294_0fce571ddb_c.jpg) - -点击Workbench页面上面的加号图标去创建一个新的数据库连接,接着会出现下面的连接信息。 - -- **Connection Name**: any description (e.g., My remote VPS database) -- **Hostname**: 127.0.0.1 -- **Port**: 3306 -- **Username**: MySQL username (e.g., root) - -![](https://farm8.staticflickr.com/7727/16928715288_d9ac3bfc7a_c.jpg) - -注意:因为隧道设置的是127.0.0.1:3306,所以主机名哪里必须是127.0.0.1,而不能是远程VPS的IP地址或者主机名 - -当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。 - -![](https://farm8.staticflickr.com/7650/17114969532_0252ffcd31_c.jpg) - -当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。 - -#### MySQL Server Status #### - -当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。 - -![](https://farm8.staticflickr.com/7627/16494069414_9d838d4138_c.jpg) - -#### Client Connections #### - -连接数是一个极其重要的监视资源,这个菜单显示了每个连接的详细信息。 - -![](https://farm9.staticflickr.com/8747/16909119337_a8d89772dd_c.jpg) - -#### 用户和权限 #### - -这个菜单允许你管理MySQL用户,包括他们的资源限制和权限。 - -![](https://farm9.staticflickr.com/8765/16494069384_760fc17c8f_c.jpg) - -#### MySQL Server Administration #### - -你可以启动或关闭MySQL服务,并且检查它的服务日志。 - -![](https://farm8.staticflickr.com/7588/17114969592_54526dfb32_c.jpg) - -#### Database Schema Management #### - -可以可视化的查看,更改,检查数据库结构,在“Schemas”标题下选择任何一个数据库或表,然后右击 - -![](https://farm8.staticflickr.com/7665/16496363973_fd03a96198_c.jpg) - -![](https://farm9.staticflickr.com/8744/16909119497_7c884617b8_c.jpg) - -#### Database Query #### - -你可以执行任何的语句(只要你的权限允许),并且检查他的结果。 - -![](https://farm8.staticflickr.com/7716/17114969692_c0f02bb277_c.jpg) - -此外,性能统计数据和报表仅用于MySQL5.6以上的版本。对于5.5及其以下的版本,性能部分会以灰色显示。 -### 结论 ### - -简介且直观的选项卡界面,丰富的特性,开源,使MySQL Workbench成为一个非常好的可视化数据库设计和管理工具。为其减分的是它的性能。我注意到在一台运行繁忙的服务器上,Workbench优势会变得异常缓慢,尽管它的性能差强人意,我依然认为MySQL Workbench是MySQL数据库管理员和设计人员必备的工具之一。 - -你曾在你的生产环境中用过Workbench吗?或者你还有别的GUI工具可以推荐?请分享你的经验吧。 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/remote-mysql-databases-gui-tool.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/tyzy313481929译者demon) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/go/digitalocean -[2]:http://ask.xmodulo.com/install-phpmyadmin-centos.html -[3]:http://xmodulo.com/set-web-based-database-management-system-adminer.html -[4]:http://mysqlworkbench.org/ -[5]:http://dev.mysql.com/downloads/repo/apt/ -[6]:http://dev.mysql.com/downloads/repo/yum/ -[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html From b64a24f7f903571bdbfe7b1a38159aca93dfceb8 Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 4 Jun 2015 08:21:32 +0800 Subject: [PATCH 1049/2517] Update 20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md --- ...02 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md b/sources/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md index 062a87b211..cc2aabc19b 100644 --- a/sources/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md +++ b/sources/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Howto Configure OpenVPN Server-Client on Ubuntu 15.04 ================================================================================ Virtual private network (VPN) is a common name of several technologies which allows to establish a network connection over other network. It called virtual because nodes connected between each over through non physical lines. And it is private due to absence of public access to network without proper rights from of the network owner. @@ -302,4 +303,4 @@ via: http://linoxide.com/ubuntu-how-to/configure-openvpn-server-client-ubuntu-15 [a]:http://linoxide.com/author/ivanz/ [1]:https://openvpn.net/ -[2]:https://play.google.com/store/apps/details?id=net.openvpn.openvpn \ No newline at end of file +[2]:https://play.google.com/store/apps/details?id=net.openvpn.openvpn From 7627973a0e25bc643e76a36c2ded7e4c2ed24491 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 4 Jun 2015 10:06:20 +0800 Subject: [PATCH 1050/2517] [Translated]20150602 How to Configure OpenVPN Server-Client on Ubuntu 15.04.md --- ...e OpenVPN Server-Client on Ubuntu 15.04.md | 107 +++++++++--------- 1 file changed, 53 insertions(+), 54 deletions(-) rename {sources => translated}/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md (52%) diff --git a/sources/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md b/translated/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md similarity index 52% rename from sources/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md rename to translated/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md index cc2aabc19b..5b6c2fc6bd 100644 --- a/sources/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md +++ b/translated/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md @@ -1,41 +1,40 @@ -Translating by GOLinux! -Howto Configure OpenVPN Server-Client on Ubuntu 15.04 +Ubuntu 15.04上配置OpenVPN服务器-客户端 ================================================================================ -Virtual private network (VPN) is a common name of several technologies which allows to establish a network connection over other network. It called virtual because nodes connected between each over through non physical lines. And it is private due to absence of public access to network without proper rights from of the network owner. +虚拟专用网(VPN)是几种用于建立与其它网络连接的网络技术中常见的一个名称。它被称为虚拟网,因为各个节点的连接不是通过物理线路实现的。而由于没有网络所有者的正确授权是不能通过公共线路访问到网络,所以它是专用的。 ![](http://blog.linoxide.com/wp-content/uploads/2015/05/vpn_custom_illustration.jpg) -[OpenVPN][1] software transfer data using TCP and UDP protocols and with help of TUN/TAP drivers. UDP protocol and TUN driver allows to establish connection to OpenVPN server for clients behind NAT. Additionally OpenVPN allows to specify custom port. It provide additional flexibility of configuration and may help in avoiding of firewall restrictions. +[OpenVPN][1]软件通过TUN/TAP驱动的帮助,使用TCP和UDP协议来传输数据。UDP协议和TUN驱动允许NAT后的用户建立到OpenVPN服务器的连接。此外,OpenVPN允许指定自定义端口。它提额外提供了灵活的配置,可以帮助你避免防火墙限制。 -Security and encryption in OpenVPN provided by library OpenSSL and by Transport Layer Security (TLS). TLS is an improved version of SSL protocol. +OpenVPN中,由OpenSSL库和传输层安全协议(TLS)提供了安全和加密。TLS是SSL协议的一个改进版本。 -OpenSSL provide two kinds of encryption: symmetric and asymmetric. Below we show how to configure server side of OpenVPN and how to make all preparations for use asymmetric cryptography and TLS protocol with Public Key Infrastructure (PKI). +OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示了如何配置OpenVPN的服务器端,以及如何预备使用带有公共密钥非对称加密和TLS协议基础结构(PKI)。 -### Server side configuration ### +### 服务器端配置 ### -First of all we must install OpenVPN. In Ubuntu 15.04 and other Unix systems with 'apt' package manager this can be done as follows: +首先,我们必须安装OpenVPN。在Ubuntu 15.04和其它带有‘apt’报管理器的Unix系统中,可以通过如下命令安装: sudo apt-get install openvpn -Then we must setup a keys. This can be done using default tools "openssl". But this way is rather difficult. That is why we can use "easy-rsa" for this purpose. Next command installs the "easy-rsa" into our system +然后,我们必须配置一个密钥对,这可以通过默认的“openssl”工具完成。但是,这种方式十分难。这也是我们使用“easy-rsa”来实现此目的的原因。接下来的命令会将“easy-rsa”安装到系统中。 sudo apt-get unstall easy-rsa -**Remark**: all next commands executed with superuser rights, i.e. after command "sudo -i"; otherwise you can use "sudo -E" as prefix for all next commands. +**注意**: 所有接下来的命令要以超级用户权限执行,如在“sudo -i”命令后;此外,你可以使用“sudo -E”作为接下来所有命令的前缀。 -For beginning we need to copy "easy-rsa" into openvpn folder +开始之前,我们需要拷贝“easy-rsa”到openvpn文件夹。 mkdir /etc/openvpn/easy-rsa cp -r /usr/share/easy-rsa /etc/openvpn/easy-rsa mv /etc/openvpn/easy-rsa/easy-rsa /etc/openvpn/easy-rsa/2.0 -and goes into it +然后进入到该目录 cd /etc/openvpn/easy-rsa/2.0 -Here we start a process of key generation. +这里,我们开启了一个密钥生成进程。 -Firstly we edit a "var" file. For simplify generation process we need to specify our data in it. Here is an example of "var" file: +首先,我们编辑一个“var”文件。为了简化生成过程,我们需要在里面指定数据。这里是“var”文件的一个样例: export KEY_COUNTRY="US" export KEY_PROVINCE="CA" @@ -44,25 +43,25 @@ Firstly we edit a "var" file. For simplify generation process we need to specify export KEY_EMAIL="my@myhost.mydomain" export KEY_OU=server -Hope, field names is clear and there is no need of additional description of them. +希望这些字段名称对你而言已经很清楚,不需要进一步说明了。 -Secondly we need to copy the openssl config. There is config from different version. If you haven't any certain requirement use last version of it. This is a 1.0.0 version. +其次,我们需要拷贝openssl配置。另外一个版本已经有现成的配置文件,如果你没有特定要求,你可以使用它的上一个版本。这里是1.0.0版本。 cp openssl-1.0.0.cnf openssl.cnf -Thirdly we need load environment variables, which we edited on previous step +第三,我们需要加载环境变量,这些变量已经在前面一步中编辑好了。 source ./vars -Final step of preparation for key generation is in flushing of old certificates and keys and in generation of serial and index files for new keys. This can be done by using command +生成密钥的最后一步准备工作是清空旧的证书和密钥,以及生成新密钥的序列号和索引文件。可以通过以下命令完成。 ./clean-all -Now we finish preparation and ready to start generation process. Lets generate certificate first +现在,我们完成了准备工作,准备好启动生成进程了。让我们先来生成证书。 ./build-ca -In dialog we see default variants, which we specified in "vars" file before. We may check them, edit if needed and then press ENTER couple of times. Dialog looks as follows +在对话中,我们可以看到默认的变量,这些变量是我们先前在“vars”中指定的。我们可以检查以下,如有必要进行编辑,然后按回车几次。对话如下 Generating a 2048 bit RSA private key .............................................+++ @@ -85,11 +84,11 @@ In dialog we see default variants, which we specified in "vars" file before. We Name [EasyRSA]: Email Address [me@myhost.mydomain]: -Next we need to generate a server key +接下来,我们需要生成一个服务器密钥 ./build-key-server server -Dialog of this command is shown below: +该命令的对话如下: Generating a 2048 bit RSA private key ........................................................................+++ @@ -134,72 +133,72 @@ Dialog of this command is shown below: Write out database with 1 new entries Data Base Updated -Here we must answer "yes" on last two questions about "sign the certificate" and about "commit". +这里,最后两个关于“签署证书”和“提交”的问题,我们必须回答“yes”。 -Now we have certificate and server key. Next step is to generate Diffie-Hellman key. Execute the below command and be patient. During next couple minutes we will see a lots of dots and pluses symbols. +现在,我们已经有了证书和服务器密钥。下一步,就是去省城Diffie-Hellman密钥。执行以下命令,耐心等待。在接下来的几分钟内,我们将看到许多点和加号。 ./build-dh -Example of the output of this command you can find below +该命令的输出样例如下 Generating DH parameters, 2048 bit long safe prime, generator 2 This is going to take a long time ................................+................ -After a long wait we can move to generation of the last key. This is key for TLS-authentication. Here is a command for it: +在漫长的等待之后,我们可以继续生成最后的密钥了,该密钥用于TLS验证。命令如下: openvpn --genkey --secret keys/ta.key -Now, generation completed and we can move all generated files to the final location. +现在,生成完毕,我们可以移动所有生成的文件到最后的位置中。 cp -r /etc/openvpn/easy-rsa/2.0/keys/ /etc/openvpn/ -Finally we create OpenVPN configuration file. Let's copy it from example: +最后,我们来创建OpenVPN配置文件。让我们从样例中拷贝过来吧: cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz /etc/openvpn/ cd /etc/openvpn gunzip -d /etc/openvpn/server.conf.gz -Then edit it +然后编辑 vim /etc/openvpn/server.conf -We need to specify custom paths to keys +我们需要指定密钥的自定义路径 ca /etc/openvpn/keys/ca.crt cert /etc/openvpn/keys/server.crt key /etc/openvpn/keys/server.key # This file should be kept secret dh /etc/openvpn/keys/dh2048.pem -That's all. After restart of OpenVPN configuration of server side is complete. +一切就绪。在重启OpenVPN后,服务器端配置就完成了。 service openvpn restart -### Client side configuration for Unix ### +### Unix的客户端配置 ### -Suppose we have a device with Unix like operation system, for example Ubuntu 15.04, and with installed OpenVPN. We want to connect to OpenVPN server from previous section. Firstly we need a key for the client. For generation of this key go to folder on server: +假定我们有一台装有类Unix操作系统的设备,比如Ubuntu 15.04,并安装有OpenVPN。我们想要从先前的部分连接到OpenVPN服务器。首先,我们需要为客户端生成密钥。为了生成该密钥,请转到服务器上的目录中: cd /etc/openvpn/easy-rsa/2.0 -Load environment variables +加载环境变量 source vars -and create a client key +然后创建客户端密钥 ./build-key client -We will see a same dialog as described in previous section on part about server key generation. Fill actual information about client in it. +我们将看到一个与先前关于服务器密钥生成部分的章节描述一样的对话,填入客户端的实际信息。 -You need run other command in case of requirement of password protect key. Here it is +如果需要密码保护密钥,你需要运行另外一个命令,命令如下 ./build-key-pass client -In this case you will be prompted to input password in beginning of establishing of VPN connection. +在此种情况下,在建立VPN连接时,会提示你输入密码。 -Now we need to copy follows files from server to client into /etc/openvpn/keys/ folder. +现在,我们需要将以下文件从服务器拷贝到客户端/etc/openvpn/keys/文件夹。 -List of files from server: +服务器文件列表: - ca.crt, - dh2048.pem, @@ -207,7 +206,7 @@ List of files from server: - client.key, - ta.key. -After that we go to the client and prepare configuration file. Location of file is /etc/openvpn/client.conf and content of it presents below +在此之后,我们转到客户端,准备配置文件。配置文件位于/etc/openvpn/client.conf,内容如下 dev tun proto udp @@ -234,15 +233,15 @@ After that we go to the client and prepare configuration file. Location of file verb 3 mute 20 -After that we need to restart OpenVPN for accepting a new configuration. +在此之后,我们需要重启OpenVPN以接受新配置。 service openvpn restart -That's it, the configuration of the client is over. +好了,客户端配置完成。 -### Client side configuration for Android ### +### 安卓客户端配置 ### -Configuration of OpenVPN on Android devices is quite similar to configuration on Unix system. We need a pack with a configuration file, with a keys and with a certificates. Here is a list of them: +安卓设备上的OpenVPN配置和Unix系统上的十分类似,我们需要一个含有配置文件、密钥和证书的包。文件列表如下: - configuration file (.ovpn), - ca.crt, @@ -250,9 +249,9 @@ Configuration of OpenVPN on Android devices is quite similar to configuration on - client.crt, - client.key. -Client key can be generated by the same way as described in previous section. +客户端密钥生成方式和先前章节所述的一样。 -Configuration file has a follows content +配置文件内容如下 client tls-client dev tun @@ -273,11 +272,11 @@ Configuration file has a follows content verb 3 mute 20 -All this files we must to move on SD-card of our device. +所有这些文件我们必须移动我们设备的SD卡上。 -Then we need to install [OpenVPN Connect][2]. +然后,我们需要安装[OpenVPN连接][2]。 -Next configuration process is very simple: +接下来,配置过程很是简单: open setting of OpenVPN and select Import options select Import Profile from SD card option @@ -285,18 +284,18 @@ Next configuration process is very simple: application offered us to create a new profile tap on the Connect button and wait a second -And thats all. Now our Android device has connection to our private network using secure VPN connection. +搞定。现在,我们的安卓设备已经通过安全的VPN连接连接到我们的专用网。 -### Conclusion ### +### 尾声 ### -So, initial configuration of OpenVPN takes a time, but it is compensated by easy clients configuration and the ability to connect from any device. Moreover OpenVPN provided a high security level and ability to connection from different places including clients located behind NAT. Therefore OpenVPN may equally well be used both at home and in enterprise. +虽然OpenVPN初始配置花费不少时间,但是简易客户端配置为我们弥补了时间上的损失,也提供了从任何设备连接的能力。此外,OpenVPN提供了一个很高的安全等级,以及从不同地方连接的能力,包括位于NAT后面的客户端。因此,OpenVPN可以同时在家和在企业中使用。 -------------------------------------------------------------------------------- via: http://linoxide.com/ubuntu-how-to/configure-openvpn-server-client-ubuntu-15-04/ 作者:[Ivan Zabrovskiy][a] -译者:[译者ID](https://github.com/译者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 3950a2433fea940a701e303e734a357abc88c69c Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Thu, 4 Jun 2015 10:24:27 +0800 Subject: [PATCH 1051/2517] translated wi-cuckoo --- ... X GNU Open Source and Apple in History.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 translated/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md diff --git a/translated/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md b/translated/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md new file mode 100644 index 0000000000..667a951f39 --- /dev/null +++ b/translated/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md @@ -0,0 +1,57 @@ +Linux比Mac OS X更好吗?历史中的GNU,开源和Apple +============================================================================== +> 自由软件/开源社区与Apple之间的争论可以回溯到上世纪80年代,当时Linux的创始人称Mac OS X的核心就是"一个废物",还有其他一些软件历史上的轶事。 + +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/05/untitled_2.png) + +开源拥护者们与微软之间有着很长,而且摇摆的关系。每个人都知道这个。但是,在许多方面,自由或者开源软件的支持者们与Apple之间的紧张关系则更加突出——尽管这很少受到媒体的关注。 + +需要说明的是,并不是所有的开源拥护者都厌恶苹果。Anecdotally(待译),我已经见过很多Linux的黑客玩弄iPhones和iPads。实际上,许多Linux用户是十分喜欢Apple的OS X系统的,以至于他们[创造了很多Linux的发行版][1],都设计得看起来像OS X。(顺便说下,[北朝鲜政府][2]就这样做了。) + +但是Mac的信徒与企鹅——即Linux社区(未提及自由与开源软件世界的小众群体)的信徒之间的关系,并不一直是完全的和谐。并且这绝不是一个新的现象,在我研究Linux历史和开源基金会的时候就发现了。 + +### GNU vs. Apple ### + +这场战争将回溯到至少上世界80年代后期。1988年6月,Richard Stallman发起了[GNU][3]项目,希望建立一个完全自由的类Unix操作系统,其源代码讲会免费共享,[[强烈指责][4]Apple对[Hewlett-Packard][5](HPQ)和[Microsoft][6](MSFT)的诉讼,称Apple的声明中,说别人对Macintosh操作系统的界面和体验的抄袭是不正确。如果Apple流行,GNU警告到,这家公司“将会借助大众的新力量终结掉自由软件,而自由软件可以成为商业软件的替代品。” + +那个时候,GNU对抗Apple的诉讼(这意味着,十分讽刺的是,GNU正在支持Microsoft,尽管当时的情况不一样),通过发布["让你的律师远离我的电脑”按钮][7]。同时呼吁GNU的支持者们抵制Apple,警告如果Macintoshes看起来是不错的计算机,但Apple一旦赢得了诉讼就会给市场带来垄断,这会极大地提高计算机的售价。 + +Apple最终[输掉了诉讼][8],但是直到1994年之后,GNU才[撤销对Apple的抵制][9]。这期间,GNU一直不断指责Apple。在上世纪90年代早期甚至之后,GNU开始发展GNU软件项目,可以在其他个人电脑平台包括MS-DOS上使用。[GNU 宣称][10],除非Apple停止在计算机领域垄断的野心,让用户界面可以模仿Macintosh的一些东西,否则“我们不会提供任何对Apple机器的支持。”(因此讽刺的是一大堆软件都开发了OS X和类Unix系统的版本,于是Apple在90年代后期介绍这些软件来自GNU。但是那是另外的故事了。) + +### Trovalds on Jobs ### + +除去他对大多数发行版比较自由放任的态度,Liuns Trovalds,Linux内核的创造者,相较于Stallman和GNU过去对Apple的态度没有多一点仁慈。在他2001年出版的书"Just For Fun: The Story of an Accidental Revolutionary"中,Trovalds描述到与Steve Jobs的一个会面,大约是1997年收到后者的邀请去讨论Mac OS X,Apple正在开发,但还没有公开发布。 + +"基本上,Jobs一开始就试图告诉我在桌面上的玩家就两个,Microsoft和Apple,而且他认为我能为Linux做的最好的事,就是从了Apple,努力让开源用户站到Mac OS X后面去"Trovalds写道。 + +这次谈判显然让Trovalds很不爽。争吵的一点集中在Trovalds对Mach技术上的藐视,对于Apple正在用于构建新的OS X操作系统的内核,Trovalds称其“一推废物。它包含了所有你能做到的设计错误,并且甚至打算只弥补一小部分。” + +但是更令人不快的是,显然是Jobs在开发OS X时入侵开源的方式(OS X的核心里上有很多开源程序):“他有点贬低了结构的瑕疵:谁在乎基础操作系统,真正的low-core东西是不是开源,如果你有Mac层在最上面,这不是开源?” + +一切的一切,Trovalds总结到,Jobs“并没有使用太多争论。他仅仅很简单地说着,胸有成竹地认为我会对与Apple合作感兴趣”。“他没有任何线索,不能去想像还会有人并不关心Mac市场份额的增长。我认为他真的感到惊讶了,当我表现出对Mac的市场有多大,或者Microsoft市场有多大的可怜的关心时。” + +当然,Trovalds并没有对所有Linux用户说起。他对于OS X和Apple的看法从2001年开始就渐渐软化了。但实际上,早在2000年,Linux社区的领导角色表现出对Apple和其高层的傲慢的深深的鄙视,可以看出一些重要的东西,关于Apple和开源/自由软件世界的矛盾是多么的根深蒂固。 + +从以上两则历史上的花边新闻中,可以看到关于Apple产品价值的重大争议,即是否该公司致力于提升软硬件的质量,或者仅仅是借市场的小聪明获利,后者会让Apple产品卖出更多的钱,**********(该处不知如何翻译)。但是不管怎样,我会暂时置身讨论之外。 + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/051815/linux-better-os-x-gnu-open-source-and-apple- + +作者:[Christopher Tozzi][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:https://www.linux.com/news/software/applications/773516-the-mac-ifying-of-the-linux-desktop/ +[2]:http://thevarguy.com/open-source-application-software-companies/010615/north-koreas-red-star-linux-os-made-apples-image +[3]:http://gnu.org/ +[4]:https://www.gnu.org/bulletins/bull5.html +[5]:http://www.hp.com/ +[6]:http://www.microsoft.com/ +[7]:http://www.duntemann.com/AppleSnakeButton.jpg +[8]:http://www.freibrun.com/articles/articl12.htm +[9]:https://www.gnu.org/bulletins/bull18.html#SEC6 +[10]:https://www.gnu.org/bulletins/bull12.html From 3c66fcac4841a287294529ba8f258db431e7e7da Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 4 Jun 2015 12:53:11 +0800 Subject: [PATCH 1052/2517] Update 20150126 Installing Cisco Packet tracer in Linux.md --- sources/tech/20150126 Installing Cisco Packet tracer in Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md b/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md index c55a04c12c..0e5b7ba519 100644 --- a/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md +++ b/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Installing Cisco Packet tracer in Linux ================================================================================ ![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Main_picture.png) From 79ca3d1f697e56265c4d18f61f460a967486a22c Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 4 Jun 2015 13:32:15 +0800 Subject: [PATCH 1053/2517] [Translated]20150126 Installing Cisco Packet tracer in Linux.md --- ...Installing Cisco Packet tracer in Linux.md | 198 ------------------ ...Installing Cisco Packet tracer in Linux.md | 197 +++++++++++++++++ 2 files changed, 197 insertions(+), 198 deletions(-) delete mode 100644 sources/tech/20150126 Installing Cisco Packet tracer in Linux.md create mode 100644 translated/tech/20150126 Installing Cisco Packet tracer in Linux.md diff --git a/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md b/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md deleted file mode 100644 index 0e5b7ba519..0000000000 --- a/sources/tech/20150126 Installing Cisco Packet tracer in Linux.md +++ /dev/null @@ -1,198 +0,0 @@ -Translating by GOLinux! -Installing Cisco Packet tracer in Linux -================================================================================ -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Main_picture.png) - -### What is Cisco Packet tracer ? ### - -**Cisco Packet tracer** is a powerful network simulator tool which used to trained while we do some Cisco certifications. It provide us good Interface view for every router’s, and networking devices which with many options same as using the physical machines we can use unlimited devices in a network. We can create multiple network in single project to get trained like a professionals. packet tracer will provide us with simulated application layer protocols such as **HTTP**, **DNS**, Routing with **RIP**, **OSPF**, **EIGRP** etc. - -Now it has been released including **ASA 5505 firewall** with command line configurations. Packet tracer available commonly for Windows, but not for Linux distributions. Here we can download and get install Cisco package tracer. - -#### Newly released version of Cisco packet tracer: #### - -The next Cisco Packet Tracer version will be Cisco Packet Tracer 6.2 currently it’s under development. - -### My Environment Setup: ### - -**Hostname** : desktop1.unixmen.com - -**IP address** : 192.168.0.167 - -**Operating system** : Ubuntu 14.04 LTS Desktop - - # hostname - - # ifconfig | grep inet - - # lsb_release -a - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_001.png) - -### Step 1: First we need to download the Cisco Packet tracer. ### - -To download Packet Tracer from official website we need to have a token, sign into Cisco NetSpace and select CCNA > Cisco Packet Tracer from the Offerings menu to start the download. If we don’t have a token you can get from below link which i have uploaded in Dropbox. - -Official Website: [https://www.netacad.com/][1] - -Many of them don’t have a token to download packet tracer. For that i have uploaded it in dropbox you can get packet tracer from below URL. - -[Download Cisco Packet Tracer 6.1.1][2] - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_002.png) - -### Step 2: Install Java: ### - -To get install packet tracer we need to have install Java, To get install java we can use the default or add the PPA repository and update the package cache to get install java. - -Install the default jre using - - # sudo apt-get install default-jre - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_003.png) - -(or) - -Use the below step to get install Java Run-time and set the Environment. - -Download Java from official website : [Download Java][3] - - # tar -zxvf jre-8u31-linux-x64.tar.gz - - # sudo mkdir -p /usr/lib/jvm - - # sudo mv -v jre1.8.0_31 /usr/lib/jvm/ - - # cd /usr/lib/jvm/ - - # sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.8.0_31/bin/java" 1 - - # sudo update-alternatives --set "java" "/usr/lib/jvm/jre1.8.0_31/bin/java" - -Set the environment for java by editing the profile file and add the location. While we adding in profile file java will available for every user’s in our machine. - - # sudo vi /etc/profile - -Add the following entries to the bottom of your /etc/profile file: - - export JAVA_HOME=/usr/lib/jvm/jre1.8.0_31 - export PATH=$PATH:/usr/java/jre1.8.0_31/bin - -Run the below command to activate java path immediately. - - # . /etc/profile - -Check for the Java version and Environment: - - # echo $JAVA_HOME - - # java -version - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_004.png) - -### Step 3: Enable 32bit architecture support: ### - -For Packet tracer we need some of 32bit packages. To get install 32bit packages we need to install some of dependencies using below commands. - - # sudo dpkg --add-architecture i386 - # sudo apt-get update - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_005.png) - - # sudo apt-get install libc6:i386 - - # sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 - - # sudo apt-get install libnss3-1d:i386 libqt4-qt3support:i386 libssl1.0.0:i386 libqtwebkit4:i386 libqt4-scripttools:i386 - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_006.png) - -### Step 4: Extract and install the package: ### - -Extract the downloaded package using tar command. - - # mv Cisco\ Packet\ Tracer\ 6.1.1\ Linux.tar.gz\?dl\=0 Cisco_Packet_tracer.tar.gz - - # tar -zxvf Cisco_Packet_tracer.tar.gz - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_007.png) - -Navigate to the extracted directory - - # cd PacketTracer611Student - -Now it’s time to start the installation , Installation is very simple and just take few seconds. - - # sudo ./install - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_008.png) - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_009.png) - -To working with Package tracer we need to set the environment for that Cisco have provided the environment script, We need to run the script using root user to set the environment variable. - - # sudo ./set_ptenv.sh - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_010.png) - -That’s it for installation step’s. next we need to create a Desktop Icon for Packet tracer. - -Create the Desktop Icon by creating desktop file under. - - # sudo su - - # cd /usr/share/applications - - # sudo vim packettracer.desktop - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_011.png) - -Append the Below content to the file using vim editor or your favourite one. - - [Desktop Entry] - Name= Packettracer - Comment=Networking - GenericName=Cisco Packettracer - Exec=/opt/packettracer/packettracer - Icon=/usr/share/icons/packettracer.jpeg - StartupNotify=true - Terminal=false - Type=Application - -Save and quit using wq! - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_012.png) - -### Step 5: Run the packet tracer ### - - # sudo packettracer - -That’s it we have successfully installed the packet tracer in Linux, These above steps are suitable for every debian based Linux distributions. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_013.png) - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_014.png) - -### Resources ### - -Home page:[Netacad][4] - -### Conclusion: ### - -Here we have seen how to install packet tracer in Linux distribution, Hope you have find a way to get install your favorite Simulator in Linux. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/installing-cisco-packet-tracer-linux/ - -作者:[babin][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/babin/ -[1]:https://www.netacad.com/ -[2]:https://www.dropbox.com/s/5evz8gyqqvq3o3v/Cisco%20Packet%20Tracer%206.1.1%20Linux.tar.gz?dl=0 -[3]:http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html -[4]:https://www.netacad.com/ diff --git a/translated/tech/20150126 Installing Cisco Packet tracer in Linux.md b/translated/tech/20150126 Installing Cisco Packet tracer in Linux.md new file mode 100644 index 0000000000..e37d8c6b94 --- /dev/null +++ b/translated/tech/20150126 Installing Cisco Packet tracer in Linux.md @@ -0,0 +1,197 @@ +Linux中安装Cisco Packet Tracer +================================================================================ +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Main_picture.png) + +### Cisco Packet tracer是什么? ### + +**Cisco Packet Tracer**是一个强大的网络模拟工具,用于进行Cisco认证时的训练。它为我们提供了各个路由器和网络设备的良好的接口视图,这些模拟设备带有很多选项,跟使用物理机一样,我们可以在网络中使用无限的设备。我们能在单个工程中创建多个网络,以获得专业化的训练。Packet Tracer将提供给我们模拟的应用层协议,如**HTTP**,**DNS**,以及像**RIP**,**OSPF**,**EIGRP**等路由协议。 + +现在,它发布了包含有**ASA 5505防火墙**命令行配置的版本。Packet Tracer通常用于Windows版本,但没有Linux版本。这里,我们可以下载并安装Cisco Packet Tracer。 + +#### 新发布的Cisco Packet Tracer版本: #### + +下一代Cisco Packet Tracer版本将会是Cisco Packet Tracer 6.2,当前还处于开发中。 + +### 我的环境设置: ### + +**主机名** : desktop1.unixmen.com + +**IP地址** : 192.168.0.167 + +**操作系统** : Ubuntu 14.04 LTS Desktop + + # hostname + + # ifconfig | grep inet + + # lsb_release -a + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_001.png) + +### 步骤 1: 首先,我们需要下载Cisco Packet Tracer。 ### + +要从官方网站下载Packet Tracer,我们需要持有一个令牌,登入Cisco NetSpace,然后从Offering菜单选择CCNA > Cisco Packet Tracer来开始下载。如果我们没有令牌,可以从下面的链接中获得,我已经将它上传到了Droppox。 + +官方站点: [https://www.netacad.com/][1] + +大多数人没有下载Packet Tracer的令牌,出于该原因,我已经将它上传到了dropbox,你可以从下面的URL获得Packet Tracer。 + +[下载Cisco Packet Tracer 6.1.1][2] + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_002.png) + +### 步骤 2: 安装Java: ### + +要安装Packet Tracer,我们需要安装java。要安装java,我们可以使用默认的仓库,或者添加PPA仓库,然后更新包缓存来安装java。 + +使用以下命令来安装默认的jre + + # sudo apt-get install default-jre + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_003.png) + +(或者) + +使用下面的步骤来安装Java Run-time并设置环境。 + +从官方站点下载Java:[下载Java][3] + + # tar -zxvf jre-8u31-linux-x64.tar.gz + + # sudo mkdir -p /usr/lib/jvm + + # sudo mv -v jre1.8.0_31 /usr/lib/jvm/ + + # cd /usr/lib/jvm/ + + # sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.8.0_31/bin/java" 1 + + # sudo update-alternatives --set "java" "/usr/lib/jvm/jre1.8.0_31/bin/java" + +通过编辑用户参数文件来设置Java环境,并添加位置参数。当我们添加进用户参数文件后,我们机器上的每个用户都可以用java了。 + + # sudo vi /etc/profile + +将以下条目添加到/etc/profile文件中: + + export JAVA_HOME=/usr/lib/jvm/jre1.8.0_31 + export PATH=$PATH:/usr/java/jre1.8.0_31/bin + +运行以下命令来立即激活java路径。 + + # . /etc/profile + +检查Java版本和环境: + + # echo $JAVA_HOME + + # java -version + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_004.png) + +### 步骤 3: 启用32位架构支持: ### + +对于Packet Tracer,我们需要一系32位包。要安装32位包,我们需要使用以下命令来安装一些依赖。 + + # sudo dpkg --add-architecture i386 + # sudo apt-get update + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_005.png) + + # sudo apt-get install libc6:i386 + + # sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 + + # sudo apt-get install libnss3-1d:i386 libqt4-qt3support:i386 libssl1.0.0:i386 libqtwebkit4:i386 libqt4-scripttools:i386 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_006.png) + +### 步骤 4: 解压并安装软件包: ### + +使用tar命令来解压下载的包。 + + # mv Cisco\ Packet\ Tracer\ 6.1.1\ Linux.tar.gz\?dl\=0 Cisco_Packet_tracer.tar.gz + + # tar -zxvf Cisco_Packet_tracer.tar.gz + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_007.png) + +导航到解压后的目录 + + # cd PacketTracer611Student + +现在,该开始安装了。安装过程很简单,只需几秒钟即可搞定。 + + # sudo ./install + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_008.png) + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_009.png) + +要使用Packet Tracer工作,我们需要设置环境,Cisco已经提供了环境脚本,我们需要以root用户来运行该脚本以设置环境变量。 + + # sudo ./set_ptenv.sh + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_010.png) + +安装到此结束。接下来,我们需要为Packet Tracer创建桌面图标。 + +通过创建下面的桌面文件来创建桌面图标。 + + # sudo su + + # cd /usr/share/applications + + # sudo vim packettracer.desktop + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_011.png) + +使用vim编辑器或你喜爱的那个编辑器来添加以下内容到文件。 + + [Desktop Entry] + Name= Packettracer + Comment=Networking + GenericName=Cisco Packettracer + Exec=/opt/packettracer/packettracer + Icon=/usr/share/icons/packettracer.jpeg + StartupNotify=true + Terminal=false + Type=Application + +使用wq!来保存并退出。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_012.png) + +### 步骤 5: 运行Packet Tracer ### + + # sudo packettracer + +好了,我们已经成功将Packet Tracer安装到Linux中。上述安装步骤适用于所有基于Debian的Linux发行版。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_013.png) + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_014.png) + +### 资源 ### + +主页:[Netacad][4] + +### 尾声: ### + +这里,我们展示了如何安装Packet Tracer到Linux发行版中。希望你们找到了将你们所钟爱的模拟器安装到Linux中的方法。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/installing-cisco-packet-tracer-linux/ + +作者:[babin][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/babin/ +[1]:https://www.netacad.com/ +[2]:https://www.dropbox.com/s/5evz8gyqqvq3o3v/Cisco%20Packet%20Tracer%206.1.1%20Linux.tar.gz?dl=0 +[3]:http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html +[4]:https://www.netacad.com/ From 62df253c12a3198b773c52006e4344bf25a81213 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 4 Jun 2015 15:25:54 +0800 Subject: [PATCH 1054/2517] =?UTF-8?q?20150604-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ports systemd and Google Cloud Platform.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md diff --git a/sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md b/sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md new file mode 100644 index 0000000000..6061e78c87 --- /dev/null +++ b/sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md @@ -0,0 +1,29 @@ +Ubuntu's Juju Now Supports systemd and Google Cloud Platform +================================================================================ +> The Juju tool has been updated to version 1.23.3 + +**Udi Nachmany, Director of Ubuntu Certified Public Cloud at Canonical, announced the release of a new version of Juju, an open-source, solution-driven orchestration tool for Ubuntu Linux.** + +According to the [announcement][1] and the official [release notes][2], Juju 1.23.3 is quite a major version that packs a lot of goodies for those of you who want to scale and manage environments on any cloud without too much hassle. + +Prominent features of Juju 1.23.3 include support for Google Compute Engine (GCE), support for the systemd init system, support for Ubuntu 15.04 (Vivid Vervet), new charm actions, as well as better proxy support for for restrictive networks. + +Additionally, the recently announced Juju release brings a new style restore, new messages, new blocks, and experimental support for Service Leader Elections, as well as addressable LXC containers and KVM instances on Ubuntu MAAS and AWS. + +"On a related note, if you’re using Google Cloud Platform you’ve probably taken a look at the sleek Cloud Launcher Google have released recently. And if you looked closely, you also noticed that you can now spin up your Ubuntu VMs using this very friendly UI," says Udi Nachmany. + +![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-s-Juju-Now-Supports-systemd-and-Google-Cloud-Platform-483279-2.jpg) + +-------------------------------------------------------------------------------- + +via: http://linux.softpedia.com/blog/Ubuntu-s-Juju-Now-Supports-systemd-and-Google-Cloud-Platform-483279.shtml + +作者:[Marius Nestor][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor +[1]:http://insights.ubuntu.com/2015/06/03/juju-support-for-google-cloud-platform/ +[2]:https://jujucharms.com/docs/devel/reference-release-notes \ No newline at end of file From 217963ac06084eab40603a86277ff7d159497738 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 4 Jun 2015 15:42:20 +0800 Subject: [PATCH 1055/2517] =?UTF-8?q?20150604-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nts in 2014--download the Annual Report.md | 33 ++++ ...stall Unity 8 Desktop Preview In Ubuntu.md | 77 ++++++++ ...4 How to access SQLite database in Perl.md | 171 ++++++++++++++++++ 3 files changed, 281 insertions(+) create mode 100644 sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md create mode 100644 sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md create mode 100644 sources/tech/20150604 How to access SQLite database in Perl.md diff --git a/sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md b/sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md new file mode 100644 index 0000000000..518e96c171 --- /dev/null +++ b/sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md @@ -0,0 +1,33 @@ +Read about The Document Foundation achievements in 2014: download the Annual Report! +================================================================================ +![](https://documentfoundation.files.wordpress.com/2015/06/tdf-report.jpg) + +TDF ReportThe Document Foundation (TDF) is proud to announce its 2014 Annual Report, which can be downloaded from the following link: [http://tdf.io/report2014][1] (3.2 MB PDF). The version with HD images can be downloaded from [http://tdf.io/report2014hq][2] (15.9 MB PDF). + +TDF Annual Report starts with a Review of 2014, with highlights about TDF and LibreOffice, and a summary of financials and budget. + +Community, Projects & Events covers the LibreOffice Conference 2014 in Bern, Certification, Website and QA, Hackfests in Brussels, Gran Canaria, Paris, Boston and Tolouse, Native-Language Projects, Infrastructure, Documentation, Marketing and Design. + +Software, Development & Code reports about the activities of the Engineering Steering Committee, LibreOffice Development, the Document Liberation Project and LibreOffice on Android. + +The last section focuses on People, starting with Top Contributors, followed by TDF Staff, the Board of Directors and the Membership Committee, the Board of Trustees, or the body of TDF Members, and the Advisory Board. + +TDF 2014 Annual Report has been edited by Sophie Gautier, Alexander Werner, Christian Lohmaier, Florian Effenberger, Italo Vignoli and Robinson Tryon, and designed by Barak Paz, with the help of the fantastic LibreOffice community. + +To allow the widest distribution of the document, this is released with a CC BY 3.0 DE License, unless otherwise noted, to TDF Members and free software advocates worldwide. + +[The German version of TDF Annual Report is available from [http://tdf.io/bericht2014][3]]. + +-------------------------------------------------------------------------------- + +via: http://blog.documentfoundation.org/2015/06/03/read-about-the-document-foundation-achievements-in-2014-download-the-annual-report/ + +作者:italovignoli +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://wiki.documentfoundation.org/File:TDF2014AnnualReport.pdf +[2]:https://wiki.documentfoundation.org/File:TDF2014AnnualReportHQ.pdf +[3]:https://wiki.documentfoundation.org/File:TDF2014AnnualReportDE.pdf \ No newline at end of file diff --git a/sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md b/sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md new file mode 100644 index 0000000000..219433905e --- /dev/null +++ b/sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md @@ -0,0 +1,77 @@ +How To Install Unity 8 Desktop Preview In Ubuntu +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Unity_8.jpeg) + +If you have been following the news, Ubuntu will be switching to [Mir display server][1] along with [Unity 8][2] desktop. While it is still not certain if Unity 8 running on Mir will be available in [Ubuntu 15.10 Willy Werewolf][3], a preview version of Unity 8 is available for you to try and test. With the official PPA, it is really easy to **install Unity 8 in Ubuntu 14.04, 14.10 and 15.04**. + +Until now, this Unity 8 desktop preview has been available via an [ISO][4] for (primarily) developers to test it. But Canonical has made it available through [LXC containers][5]. By using this method you get a Unity 8 desktop session running on Mir display server as any desktop environment. It’s like as if you [install Mate desktop in Ubuntu][6] and choose the desktop session from the LightDm login screen. + +Curious to give Unity 8 a try? Let’s see how to install it. + +**Note: It’s an experimental preview and may not work properly for everyone.** + +### Install Unity 8 desktop in Ubuntu ### + +Following are the steps to install and use Unity 8: + +#### Step 1: Install Unity 8 in Ubuntu 12.04 and 14.04 #### + +If you are running Ubuntu 12.04 and 14.04, you’ll have to use the official PPA to install Unity 8. Use the following command: + + sudo apt-add-repository ppa:unity8-desktop-session-team/unity8-preview-lxc + sudo apt-get update + sudo apt-get upgrade + sudo apt-get install unity8-lxc + +#### Step 1: Install Unity 8 in Ubuntu 14.10 and 15.04 #### + +If you are running Ubuntu 14.10 or 15.04, Unity 8 LXC is already in the sources. You just need to run the following commands: + + sudo apt-get update + sudo apt-get install unity8-lxc + +#### Step 2: Set up Unity 8 desktop preview LXC #### + +Once you have installed Unity 8 LXC, it’s time to set it up. Use the following command for this purpose: + + sudo unity8-lxc-setup + +It will take some time in set up, so have some patience. It downloads the ISO and then extracts it, and then any last bits of setup necessary to make it work. It will also install a slightly modified version of LightDM. Once everything is done, a restart is required. + +#### Step 3: Select Unity 8 #### + +After restarting, at login screen, click on the Ubuntu icon beside your login name: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Change_Desktop_Environment_Ubuntu.jpeg) + +You should see the option of Unity 8 here. Select it: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Select_Unity8.jpeg) + +### Uninstall Unity 8 LXC ### + +If you find Unity 8 too buggy or if you don’t like it, you can simply switch back to the default Unity version in similar fashion. Additionally, you can also remove Unity 8 using this command: + + sudo apt-get remove unity8-lxc + +This will remove the Unity 8 option from LightDM screen but the set-up will remain there. + +That’s all you need to do to install Unity 8 with Mir in Ubuntu. Do share what you think of Unity 8 when you try it out. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-unity-8-desktop-ubuntu/ + +作者:[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://en.wikipedia.org/wiki/Mir_%28software%29 +[2]:https://wiki.ubuntu.com/Unity8Desktop +[3]:http://itsfoss.com/ubuntu-15-10-codename/ +[4]:https://wiki.ubuntu.com/Unity8DesktopIso +[5]:https://wiki.ubuntu.com/Unity8inLXC +[6]:http://itsfoss.com/install-mate-desktop-ubuntu-14-04/ \ No newline at end of file diff --git a/sources/tech/20150604 How to access SQLite database in Perl.md b/sources/tech/20150604 How to access SQLite database in Perl.md new file mode 100644 index 0000000000..980917a3c5 --- /dev/null +++ b/sources/tech/20150604 How to access SQLite database in Perl.md @@ -0,0 +1,171 @@ +How to access SQLite database in Perl +================================================================================ +SQLite is a zero-configuration, server-less, file-based transactional database system. Due to its lightweight, self-contained, and compact design, SQLite is an extremely popular choice when you want to integrate a database into your application. In this post, I am going to show you how to create and access a SQLite database in Perl script. The Perl code snippet I present is fully functional, so you can easily modify and integrate it into your project. + +![](https://farm1.staticflickr.com/552/18444614631_9e7fce8243_c.jpg) + +### Preparation for SQLite Access ### + +I am going to use SQLite DBI Perl driver to connect to SQLite3. Thus you need to install it (along with SQLite3) on your Linux system. + +**Debian, Ubuntu or Linux Mint** + + $ sudo apt-get install sqlite3 libdbd-sqlite3-perl + +**CentOS, Fedora or RHEL** + + $ sudo yum install sqlite perl-DBD-SQLite + +After installation, you can check if the SQLite driver is indeed available by using the following script. + + #!/usr/bin/perl + + my @drv = DBI->available_drivers(); + print join("\n", @drv), "\n"; + +If you run the script, you should see SQLite in the output. + + DBM + ExampleP + File + Gofer + Proxy + SQLite + Sponge + +### Perl SQLite Access Example ### + +Here is the full-blown Perl code example of SQLite access. This Perl script will demonstrate the following SQLite database management routines. + +- Create and connect to a SQLite database. +- Create a new table in a SQLite database. +- Insert rows into a table. +- Search and iterate rows in a table. +- Update rows in a table. +- Delete rows in a table. + + use DBI; + use strict; + + # define database name and driver + my $driver = "SQLite"; + my $db_name = "xmodulo.db"; + my $dbd = "DBI:$driver:dbname=$db_name"; + + # sqlite does not have a notion of username/password + my $username = ""; + my $password = ""; + + # create and connect to a database. + # this will create a file named xmodulo.db + my $dbh = DBI->connect($dbd, $username, $password, { RaiseError => 1 }) + or die $DBI::errstr; + print STDERR "Database opened successfully\n"; + + # create a table + my $stmt = qq(CREATE TABLE IF NOT EXISTS NETWORK + (ID INTEGER PRIMARY KEY AUTOINCREMENT, + HOSTNAME TEXT NOT NULL, + IPADDRESS INT NOT NULL, + OS CHAR(50), + CPULOAD REAL);); + my $ret = $dbh->do($stmt); + if($ret < 0) { + print STDERR $DBI::errstr; + } else { + print STDERR "Table created successfully\n"; + } + + # insert three rows into the table + $stmt = qq(INSERT INTO NETWORK (HOSTNAME,IPADDRESS,OS,CPULOAD) + VALUES ('xmodulo', 16843009, 'Ubuntu 14.10', 0.0)); + $ret = $dbh->do($stmt) or die $DBI::errstr; + + $stmt = qq(INSERT INTO NETWORK (HOSTNAME,IPADDRESS,OS,CPULOAD) + VALUES ('bert', 16843010, 'CentOS 7', 0.0)); + $ret = $dbh->do($stmt) or die $DBI::errstr; + + $stmt = qq(INSERT INTO NETWORK (HOSTNAME,IPADDRESS,OS,CPULOAD) + VALUES ('puppy', 16843011, 'Ubuntu 14.10', 0.0)); + $ret = $dbh->do($stmt) or die $DBI::errstr; + + # search and iterate row(s) in the table + $stmt = qq(SELECT id, hostname, os, cpuload from NETWORK;); + my $obj = $dbh->prepare($stmt); + $ret = $obj->execute() or die $DBI::errstr; + + if($ret < 0) { + print STDERR $DBI::errstr; + } + while(my @row = $obj->fetchrow_array()) { + print "ID: ". $row[0] . "\n"; + print "HOSTNAME: ". $row[1] ."\n"; + print "OS: ". $row[2] ."\n"; + print "CPULOAD: ". $row[3] ."\n\n"; + } + + # update specific row(s) in the table + $stmt = qq(UPDATE NETWORK set CPULOAD = 50 where OS='Ubuntu 14.10';); + $ret = $dbh->do($stmt) or die $DBI::errstr; + + if( $ret < 0 ) { + print STDERR $DBI::errstr; + } else { + print STDERR "A total of $ret rows updated\n"; + } + + # delete specific row(s) from the table + $stmt = qq(DELETE from NETWORK where ID=2;); + $ret = $dbh->do($stmt) or die $DBI::errstr; + + if($ret < 0) { + print STDERR $DBI::errstr; + } else { + print STDERR "A total of $ret rows deleted\n"; + } + + # quit the database + $dbh->disconnect(); + print STDERR "Exit the database\n"; + +A successful run of the above Perl script will create a SQLite database file named "xmodulo.db", and show the following output. + + Database opened successfully + Table created successfully + ID: 1 + HOSTNAME: xmodulo + OS: Ubuntu 14.10 + CPULOAD: 0 + + ID: 2 + HOSTNAME: bert + OS: CentOS 7 + CPULOAD: 0 + + ID: 3 + HOSTNAME: puppy + OS: Ubuntu 14.10 + CPULOAD: 0 + + A total of 2 rows updated + A total of 1 rows deleted + Exit the database + +### Troubleshooting ### + +If you attempt to access SQLite in Perl without installing SQLite DBI driver, you will encounter the following error. You must install DBI driver as describe at the beginning to fix this error. + + Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./script.pl line 3. + BEGIN failed--compilation aborted at ./script.pl line 3. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/access-sqlite-database-perl.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 \ No newline at end of file From 382a929890b2566c7b8a9557abd4606a837a0401 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 4 Jun 2015 15:59:38 +0800 Subject: [PATCH 1056/2517] =?UTF-8?q?20150604-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lobally Recognized Linux Certifications.md | 172 +++++++++++++++ ...Experience on Linux 'iptables' Firewall.md | 207 ++++++++++++++++++ 2 files changed, 379 insertions(+) create mode 100644 sources/share/20150604 12 Globally Recognized Linux Certifications.md create mode 100644 sources/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md diff --git a/sources/share/20150604 12 Globally Recognized Linux Certifications.md b/sources/share/20150604 12 Globally Recognized Linux Certifications.md new file mode 100644 index 0000000000..714ff31fea --- /dev/null +++ b/sources/share/20150604 12 Globally Recognized Linux Certifications.md @@ -0,0 +1,172 @@ +12 Globally Recognized Linux Certifications +================================================================================ +Hi everyone, today we'll learn about some of the very precious globally recognized Linux Certifications. Linux Certifications are the certification programme hosted by different Linux Professional Institutes across the globe. Linux Certifications allows Linux Professionals to get easily enrolled with the Linux related jobs in servers, companies, etc. Linux Certifications enables how much a person is expertise in that respective field of Linux. There are pretty many Linux Professional Institutes providing different Linux Certifications. But there are some few well recognized Linux Certification Programmes running across the globe which are at high priority while getting a job in companies where we need to manage servers, virtualizations, installations, configurations, application support and other stuffs with Linux Operating System. With the increment of servers running Linux Operating System throughout the globe, the demand of Linux Professional are increasing. For better authenticated and authorized Linux Professional, better and renowned Certifications are always at higher priority by the companies across the globe. + +Here are some globally recognized Linux Certifications that we'll discuss about. + +### 1. CompTIA Linux+ ### + +CompTIA Linux+ is a Linux Certification programme hosted by LPI "Linux Professional Institute" providing knowledge all over the world. It provides knowledge on Linux which enables to produce a bunch of Linux related Professional jobs like Linux Administrators, Junior Network Administrators, Systems Administrators, Linux Database Administrators and Web Administrators. If anyone is aware of installing and maintaining Linux Operating System, this course will help to meet the certification requirements and prepare for the exam by providing with a broad awareness of Linux operating systems. The main objective of CompTIA Linux+ Certification by LPI is to provide the certificate holders enough knowledge on a critical knowledge of installation, operation, administration and troubleshooting devices. We can earn three industry-recognized certifications for the cost, time, and effort of one, by completing the CompTIA Linux+ powered by LPI certification, we can automatically receive the **LPI LPIC-1** and the **SUSE Certified Linux Administrator (CLA)** certifications. + +- **Certification Codes** : LX0-103 and LX0-104 (launches March 30, 2015) OR LX0-101 and LX0-102 +- Number of questions: 60 questions per exam +- Type of Questions: Multiple choice +- Length of test period: 90 minutes +- Prerequisites: A+, Network+ and at least 12 months of Linux administration experience +- Passing score: 500 (on a scale of 200-800) +- Languages: English. Coming soon on German, Portuguese (Brazilian), Traditional Chinese, Spanish. +- Validity: Valid till 3 Years after certified. + +**Note**: Exams from different series cannot be combined. If you start with LX0-101, you MUST take LX0-102 to complete your certification. The same applies for the LX0-103 and LX0-104 series. The LX0-103 and LX0-104 series is an update to the LX0-101 and LX0-102 series. + +### 2. LPIC ### + +LPIC stands for Linux Professional Institute Certification which is a Linux certification programme by Linux Professional Institute. It is a multi level certification program which requires passing of a number (usually two) certification exams for each level. There are three levels of certification which includes Junior Level Certification **LPIC-1**, Advanced Level Certification **LPIC-2** and Senior Level Certification **LPIC-3**. The first two certification aims on **Linux System Administration** whereas the final certification aims on several specialties including Virtualization and Security. To become **LPIC-3** certified, a candidate with an active **LPIC-1** and **LPIC-2** certification must pass at least one of 300 Mixed Environment, 303 Security and 304 Virtualization and High Availability. LPIC-1 certification is designed in such a way that the certification holder will be able to install, maintain, configure tasks running Linux with command line interface with basic networking where as LPIC-2 certification validates candidate to administer small to medium–sized mixed networks. LPIC-3 certification is designed for enterprise-level Linux professional and represents the highest level of professional, distribution-neutral Linux certification within the industry. + +- **Certification Codes** : LPIC-1 (101 and 102), LPIC-2 (201 and 202) and LPIC-3 (300, 303 or 304) +- Type of Questions: 60 Multiple choice questions +- Length of Test Period: 90 minutes +- Prerequisites: None, Linux Essentials is recommended +- Passing Score: 500 (on a scale of 200-800) +- Languages: LPIC-1: English, German, Italian, Portuguese (Brazilian), Spanish (Modern), Chinese (Simplified), Chinese (Traditional), Japanese +- LPIC-2: English, German, Portuguese (Brazilian), Japanese +- LPIC-3: English, Japanese +- Validity: Valid till 5 years of Retirement. + +### 3. Oracle Linux OCA ### + +Oracle Certified Associate (OCA) is designed for the individuals who are interested for a strong foundation of knowledge to implement and administer the Oracle Linux Operating System. This certification expertise individuals on the Oracle Linux distribution that's fully optimized for Oracle products and for running on Oracle's engineered systems including Oracle Exadata Database Machine, Oracle Exalytics In-Memory Machine, Oracle Exalogic Elastic Cloud, and Oracle Database Appliance. Oracle Linux's Unbreakable Enterprise Kernel delivers extreme performance, advanced scalability and reliability for enterprise applications. The OCA certification covers objectives such as managing local disk devices, managing file systems, installing and removing Solaris packages and patches, performing system boot procedures and system processes. It is initial step in achievement of flagship of OCP credential. This certification was formerly known as Sun Certified Solaris Associate (SCSAS). + +- **Certification Codes** : OCA +- Type of Questions: 75 Multiple choice questions +- Length of Test Period: 120 minutes +- Prerequisites: None +- Passing Score: 64% +- Validity: Never Expires + +### 4. Oracle Linux OCP ### + +Oracle Certified Professional (OCP) is the certification provided by Oracle Corporation for Oracle Linux which covers more advanced knowledge and skills of an Oracle Linux Administrator. It covers knowledge such as configuring network interfaces, managing swap configurations, crash dumps, managing applications, databases and core files. OCP certification is benchmark of technical expertise and professional skill needed for developing, implementing, and managing applications, middleware and databases widely in enterprise. Job opportunities for Oracle Linux OCP are increased depending on job market and economy. It is designed such a way that the certificate holder has the ability to perform security administration, prepare Oracle Linux system for Oracle database, troubleshoot problems and perform corrective action, install software packages, installing and configuring kernel modules, maintain swap space, perform User and Group administration, creating file systems, configuring logical volume manager (LVM), file sharing services and more. + +- **Certification Codes** : OCP +- Type of Questions: 60 to 80 Multiple choice questions +- Length of Test Period: 120 minutes +- Prerequisites: Oracle Linux OCA +- Passing Score: 64% +- Validity: Never Expires + +### 5. RHCSA ### + +RHCSA is a certification programme by Red Hat Incorporation as Red Hat Certified System Administrator. RHCSAs are the person who has the skill, and ability to perform core system administrations in the renowned Red Hat Linux environments. It is an initial entry-level certification programme that focuses on actual competencies at system administration, including installation and configuration of a Red Hat Linux system and attaching it to a live network running network services. A Red Hat Certified System Administrator (RHCSA) is able to understand and use essential tools for handling files, directories, command-line environments, and documentation, operate running systems, including booting into different run levels, identifying processes, starting and stopping virtual machines, and controlling services, configure local storage using partitions and logical volumes, create and configure file systems and file system attributes, such as permissions, encryption, access control lists, and network file systemsm, deploy, configure, and maintain systems, including software installation, update, and core services, manage users and groups, including use of a centralized directory for authentication, security, including basic firewall and SELinux configuration. One should be RHCSA certified to gain RHCE and other certifications. + +- **Certification Codes** : RHCSA +- Course Codes: RH124, RH134 and RH199 +- Exam Codes: EX200 +- Length of Test Period: 21-22 hours depending on the elective course choosen. +- Prerequisites: None. Better if has some fundamental knowledge of Linux. +- Passing Score: 210 out of 300 points (70%) +- Validity: 3 years + +### 6. RHCE ### + +RHCE, also known as Red Hat Certified Engineer is a mid to advanced level certification programme for Red Hat Certified System Administrator (RHCSA) who wants to acquire additional skills and knowledge required of a senior system administrator responsible for Red Hat Enterprise Linux. RHCE has the ability, knowledge and skills of configuring static routes, packet filtering, and network address translation, setting kernel runtime parameters, configuring an Internet Small Computer System Interface (iSCSI) initiator, producing and delivering reports on system utilization, using shell scripting to automate system maintenance tasks, configuring system logging, including remote logging, system to provide networking services including HTTP/HTTPS, File Transfer Protocol (FTP), network file system (NFS), server message block (SMB), Simple Mail Transfer Protocol (SMTP), secure shell (SSH) and Network Time Protocol (NTP) and more. RHCSAs who wish to earn a more senior-level credential and who have completed System Administration I, II, and II, or who have completed the RHCE Rapid Track Course is recommended to go for RHCE certification. + +- **Certification Codes** : RHCE +- Course Codes: RH124, RH134, RH254 and RH199 +- Exam Codes: EX200 and EX300 +- Length of Test Period: 21-22 hours depending on the elective course choosen. +- Prerequisites: A RHCSA credential +- Passing Score: 210 out of 300 (70%) +- Validity: 3 years + +### 7. RHCA ### + +RHCA stands for Red Hat Certified Architect which is a certification programme by Red Hat Incorporation. It focuses on actual competencies at system administration, including installation and configuration of a Red Hat Linux system and attaching it to a live network running network services. RHCA is the highest level of certification of all the Red Hat Certifications. Candidates are required to choose the concentration they wish to focus on or can choose any combination of eligible Red Hat certifications to create a custom concentration of their own. There are three main concentration Datacenter, Cloud and Application Platform. RHCA with the concentration of Datacenter has the skills and ability to work, manage a datacenter whereas with the concentration of Cloud has the ability create, configure and manage private, hybrid clouds, cloud application platforms, flexible storage solutions using Red Hat Enterprise Linux Platform. RHCA with the concentration of Application Platform includes skills like installing, configuring and managing Red Hat JBoss Enterprise Application Platform and applications, cloud application platforms and hybrid cloud environments with OpenShift Enterprise by Red Hat and federating data from multiple sources using Red Hat JBoss Data Virtualization. + +- **Certification Codes** : RHCA +- Course Codes: CL210,CL220,CL280, RH236, RH318,RH401,RH413, RH436,RH442,JB248 and JB450 +- Exam Codes: EX333, EX401, EX423 or EX318, EX436 and EX442 +- Length of Test Period: 21-22 hours depending on the elective course choosen. +- Prerequisites: Active RHCE credential +- Passing Score: 210 out of 300 (70%) +- Validity: 3 years + +### 8. SUSE CLA ### + +SUSE Certified Linux Administrator (SUSE CLA) is a initialcertification by SUSE which focuses on daily administration tasks in SUSE Linux Enterprise Server environments. To gain SUSE CLA certification, it is not necessary to perform the course work, one has to pass the examination to get certified. SUSE CLA are capable and has skills to use Linux Desktop, locate and use help resources, manage Linux File System, work with the Linux Shell and Command Line, install SLE 11 SP22, manage system installation, hardware, backup and recovery, administer Linux with YaST, linux processes and services, storage, configure network, remote access, monitor SLE 11 SP2, automate tasks and manage user access and security. We can gain dual certificates of SUSE CLA and LPIC-1 and CompTIA Linux powered by LPI as SUSE, Linux Professional Institute and CompTIA have teamed up to offer you the chance to earn three Linux certifications. + +- **Certification Codes** : SUSE CLA +- Course Codes: 3115, 3116 +- Exam Codes: 050-720, 050-710 +- Type of Questions: multiple choice exams +- Length of Test Period: 90 minutes +- Prerequisites: None +- Passing Score: 512 + +### 9. SUSE CLP ### + +SUSE Certified Linux Professional (CLP) is a certification programme for the one who is interested to gain more seniority and professionalism in SUSE Linux Enterprise Servers. SUSE CLP is the next step after receiving the SUSE CLA certificate. One should pass the examination and should have certification of CLA to gain the certification of CLP thought the candidate has passed the examination of CLP. SUSE CLP certified person has the skills and ability of installing and configuring SUSE Linux Enterprise Server 11 systems, maintaining the file system, managing softwarepackages, processes, printing, configuring fundamental network services, samba, web servers, using IPv6 and creating and running bash shell scripts. + +- **Certification Codes** : SUSE CLP +- Course Codes: 3115, 3116 and 3117 +- Exam Codes: 050-721, 050-697 +- Type of Test: hands on +- Length of Test Period: 180 minute practicum +- Prerequisites: SUSE CLA Certified + +### 10. SUSE CLE ### + +SUSE Certified Linux Engineer (CLE) is an engineer level advanced certification for those candidates who have passed the examination of CLE. To acquire a CLE certificate, one should gain the certificates of SUSE CLA and SUSE CLP. The candidate gaining the CLE certification has the skills of architecting complex SUSE Linux Enterprise Server environments. CLE certified person has the skill to configure fundamental networking services, manage printing, configure and use Open LDAP, samba, web servers, IPv6, perform Health Check and Performance Tuning, create and execute Shell Scripts, deploy SUSE Linux Enterprise, virtualization with Xen and more. + +- **Certification Codes** : SUSE CLE +- Course Codes: 3107 +- Exam Codes: 050-723 +- Type of Test: hands on +- Length of Test Period: 120 minute practicum +- Prerequisites: SUSE CLP 10 or 11 Certified + +### 11. LFCS ### + +Linux Foundation Certified System Admin (LFCS) certified candidates possesses knowledge on the use of Linux and using Linux with the terminal environment. LFCS is a certification programme by Linux Foundation for system administrators and engineers working with the Linux operating system. The Linux Foundation collaborated with industry experts and the Linux kernel community to identify the core domains and the critical skills, knowledge and abilities applicable for the certification. LFCS certified candidates has the skills, knowledge and ability of editing and manipulating text files on the command line, managing and troubleshooting File Systems and Storage, assembling partitions as LVM devices, configuring SWAP partitions, managing networked filesystems, managing user accounts, permissions and ownerships, maintaining security, creating and executing bash shell scripts, installing, upgrading, removing software packages and more. + +- **Certification Codes** : LFCS +- Course Codes: LFS201, LFS220 (Optional) +- Exam Codes: LFCS exam +- Length of Test Period: 2 hours +- Prerequisites: None. +- Passing Score: 74% +- Languages: English +- Validity: 2 years + +### 12. LFCE ### + +Linux Foundation Certified Engineer (LFCE), a certification for Linux Engineers by Linux Foundation. LFCE certified candidates possesses a wider range of skills on Linux than LFCS. It is a engineer-level advanced certification programme. The LFCE certified candidates possesses skills and abilities of Network Administraton like configuring network services, configuring packet filtering, monitor network performance, IP traffics, configuring filesystems and file services, network filesystems, install, update packages from the repositories, managing network security, configuring iptables, http services, proxy servers, email servers and many more. It is believed that LFCE is pretty difficult to pass and study than LFCS as its advanced engineering level certification programme. + +- **Certification Codes** : LFCE +- Course Codes: LFS230 +- Exam Codes: LFCE exam +- Length of Test Period: 2 hours +- Prerequisites: LFCS certified. +- Passing Score: 72% +- Languages: English +- Validity: 2 years + +### Facts we found (This is only our views) ### + +Recent surveys conducted on different top recruitment agency, says 80% of linux job profile preferred Redhat certification. If you are a student / newbie and want to learn linux then we prefer Linux Foundation Certifications as its getting much popular or CompTIA Linux would be also a choice. If you already know oracle or suse or working on their products then would prefer oracle / suse linux or if you working in an company these certification might enhance your career growth :-) + +### Conclusion ### + +There are thousands of big companies in this world running servers and mainframes running Linux Operating System, to handle, configure and work on those servers there is always a need of highly qualified and certified Linux Technical/Professional. These globally recognized Linux certificates has a big role of someones career in Linux. The companies around the world running Linux and wanting Linux Engineers, System Administrators and ethusiasts chooses one who has gained certificates and has good score in the related field of Linux. Globally recognized certifications are highly essential for excellence in the profession and career in Linux, so preparing best for the examination and getting the certification is a good choice for building career in Linux. If you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/12-globally-recognized-linux-certifications/ + +作者:[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/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md b/sources/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md new file mode 100644 index 0000000000..2ba7334580 --- /dev/null +++ b/sources/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md @@ -0,0 +1,207 @@ +Nishita Agarwal Shares Her Interview Experience on Linux ‘iptables’ Firewall +================================================================================ +Nishita Agarwal, a frequent Tecmint Visitor shared her experience (Question and Answer) with us regarding the job interview she had just given in a privately owned hosting company in Pune, India. She was asked a lot of questions on a variety of topics however she is an expert in iptables and she wanted to share those questions and their answer (she gave) related to iptables to others who may be going to give interview in near future. + +![Linux Firewall Iptables Interview Questions](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-iptables-Interview-Questions.jpg) + +All the questions and their Answer are rewritten based upon the memory of Nishita Agarwal. + +> “Hello Friends! My name is **Nishita Agarwal**. I have Pursued Bachelor Degree in Technology. My area of Specialization is UNIX and Variants of UNIX (BSD, Linux) fascinates me since the time I heard it. I have 1+ years of experience in storage. I was looking for a job change which ended with a hosting company in Pune, India.” + +Here is the collection of what I was asked during the Interview. I’ve documented only those questions and their answer that were related to iptables based upon my memory. Hope this will help you in cracking your Interview. + +### 1. Have you heard of iptables and firewall in Linux? Any idea of what they are and for what it is used? ### + +> **Answer** : I’ve been using iptables for quite long time and I am aware of both iptables and firewall. Iptables is an application program mostly written in C Programming Language and is released under GNU General Public License. Written for System administration point of view, the latest stable release if iptables 1.4.21.iptables may be considered as firewall for UNIX like operating system which can be called as iptables/netfilter, more accurately. The Administrator interact with iptables via console/GUI front end tools to add and define firewall rules into predefined tables. Netfilter is a module built inside of kernel that do the job of filtering. +> +> Firewalld is the latest implementation of filtering rules in RHEL/CentOS 7 (may be implemented in other distributions which I may not be aware of). It has replaced iptables interface and connects to netfilter. + +### 2. Have you used some kind of GUI based front end tool for iptables or the Linux Command Line? ### + +> **Answer** : Though I have used both the GUI based front end tools for iptables like Shorewall in conjugation of [Webmin][1] in GUI and Direct access to iptables via console.And I must admit that direct access to iptables via Linux console gives a user immense power in the form of higher degree of flexibility and better understanding of what is going on in the background, if not anything other. GUI is for novice administrator while console is for experienced. + +### 3. What are the basic differences between between iptables and firewalld? ### + +> **Answer** : iptables and firewalld serves the same purpose (Packet Filtering) but with different approach. iptables flush the entire rules set each time a change is made unlike firewalld. Typically the location of iptables configuration lies at ‘/etc/sysconfig/iptables‘ whereas firewalld configuration lies at ‘/etc/firewalld/‘, which is a set of XML files.Configuring a XML based firewalld is easier as compared to configuration of iptables, however same task can be achieved using both the packet filtering application ie., iptables and firewalld. Firewalld runs iptables under its hood along with it’s own command line interface and configuration file that is XML based and said above. + +### 4. Would you replace iptables with firewalld on all your servers, if given a chance? ### + +> **Answer** : I am familiar with iptables and it’s working and if there is nothing that requires dynamic aspect of firewalld, there seems no reason to migrate all my configuration from iptables to firewalld.In most of the cases, so far I have never seen iptables creating an issue. Also the general rule of Information technology says “why fix if it is not broken”. However this is my personal thought and I would never mind implementing firewalld if the Organization is going to replace iptables with firewalld. + +### 5. You seems confident with iptables and the plus point is even we are using iptables on our server. ### + +What are the tables used in iptables? Give a brief description of the tables used in iptables and the chains they support. + +> **Answer** : Thanks for the recognition. Moving to question part, There are four tables used in iptables, namely they are: +> +> Nat Table +> Mangle Table +> Filter Table +> Raw Table +> +> Nat Table : Nat table is primarily used for Network Address Translation. Masqueraded packets get their IP address altered as per the rules in the table. Packets in the stream traverse Nat Table only once. ie., If a packet from a jet of Packets is masqueraded they rest of the packages in the stream will not traverse through this table again. It is recommended not to filter in this table. Chains Supported by NAT Table are PREROUTING Chain, POSTROUTING Chain and OUTPUT Chain. +> +> Mangle Table : As the name suggests, this table serves for mangling the packets. It is used for Special package alteration. It can be used to alter the content of different packets and their headers. Mangle table can’t be used for Masquerading. Supported chains are PREROUTING Chain, OUTPUT Chain, Forward Chain, INPUT Chain, POSTROUTING Chain. +> +> Filter Table : Filter Table is the default table used in iptables. It is used for filtering Packets. If no rules are defined, Filter Table is taken as default table and filtering is done on the basis of this table. Supported Chains are INPUT Chain, OUTPUT Chain, FORWARD Chain. +> +> Raw Table : Raw table comes into action when we want to configure packages that were exempted earlier. It supports PREROUTING Chain and OUTPUT Chain. + +### 6. What are the target values (that can be specified in target) in iptables and what they do, be brief! ### + +> **Answer** : Following are the target values that we can specify in target in iptables: +> +> ACCEPT : Accept Packets +> QUEUE : Paas Package to user space (place where application and drivers reside) +> DROP : Drop Packets +> RETURN : Return Control to calling chain and stop executing next set of rules for the current Packets in the chain. + + +### 7. Lets move to the technical aspects of iptables, by technical I means practical. ### + +How will you Check iptables rpm that is required to install iptables in CentOS?. + +> **Answer** : iptables rpm are included in standard CentOS installation and we do not need to install it separately. We can check the rpm as: +> +> # rpm -qa iptables +> +> iptables-1.4.21-13.el7.x86_64 +> +> If you need to install it, you may do yum to get it. +> +> # yum install iptables-services + +### 8. How to Check and ensure if iptables service is running? ### + +> **Answer** : To check the status of iptables, you may run the following command on the terminal. +> +> # service status iptables [On CentOS 6/5] +> # systemctl status iptables [On CentOS 7] +> +> If it is not running, the below command may be executed. +> +> ---------------- On CentOS 6/5 ---------------- +> # chkconfig --level 35 iptables on +> # service iptables start +> +> ---------------- On CentOS 7 ---------------- +> # systemctl enable iptables +> # systemctl start iptables +> +> We may also check if the iptables module is loaded or not, as: +> +> # lsmod | grep ip_tables + +### 9. How will you review the current Rules defined in iptables? ### + +> **Answer** : The current rules in iptables can be review as simple as: +> +> # iptables -L +> +> Sample Output +> +> Chain INPUT (policy ACCEPT) +> target prot opt source destination +> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED +> ACCEPT icmp -- anywhere anywhere +> ACCEPT all -- anywhere anywhere +> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> +> Chain FORWARD (policy ACCEPT) +> target prot opt source destination +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> +> Chain OUTPUT (policy ACCEPT) +> target prot opt source destination + +### 10. How will you flush all iptables rules or a particular chain? ### + +> **Answer** : To flush a particular iptables chain, you may use following commands. +> +> +> # iptables --flush OUTPUT +> +> To Flush all the iptables rules. +> +> # iptables --flush + +### 11. Add a rule in iptables to accept packets from a trusted IP Address (say 192.168.0.7) ### + +> **Answer** : The above scenario can be achieved simply by running the below command. +> +> # iptables -A INPUT -s 192.168.0.7 -j ACCEPT +> +> We may include standard slash or subnet mask in the source as: +> +> # iptables -A INPUT -s 192.168.0.7/24 -j ACCEPT +> # iptables -A INPUT -s 192.168.0.7/255.255.255.0 -j ACCEPT + +### 12. How to add rules to ACCEPT, REJECT, DENY and DROP ssh service in iptables. ### + +> **Answer** : Hoping ssh is running on port 22, which is also the default port for ssh, we can add rule to iptables as:To ACCEPT tcp packets for ssh service (port 22). +> +> # iptables -A INPUT -s -p tcp - -dport -j ACCEPT +> +> To REJECT tcp packets for ssh service (port 22). +> +> # iptables -A INPUT -s -p tcp - -dport -j REJECT +> +> To DENY tcp packets for ssh service (port 22). +> +> +> # iptables -A INPUT -s -p tcp - -dport -j DENY +> +> To DROP tcp packets for ssh service (port 22). +> +> +> # iptables -A INPUT -s -p tcp - -dport -j DROP + +### 13. Let me give you a scenario. Say there is a machine the local ip address of which is 192.168.0.6. You need to block connections on port 21, 22, 23, and 80 to your machine. What will you do? ### + +> **Answer** : Well all I need to use is the ‘multiport‘ option with iptables followed by port numbers to be blocked and the above scenario can be achieved in a single go as. +> +> # iptables -A INPUT -s 192.168.0.6 -p tcp -m multiport --dport 22,23,80,8080 -j DROP +> +> The written rules can be checked using the below command. +> +> # iptables -L +> +> Chain INPUT (policy ACCEPT) +> target prot opt source destination +> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED +> ACCEPT icmp -- anywhere anywhere +> ACCEPT all -- anywhere anywhere +> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> DROP tcp -- 192.168.0.6 anywhere multiport dports ssh,telnet,http,webcache +> +> Chain FORWARD (policy ACCEPT) +> target prot opt source destination +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> +> Chain OUTPUT (policy ACCEPT) +> target prot opt source destination + +**Interviewer** : That’s all I wanted to ask. You are a valuable employee we won’t like to miss. I will recommend your name to the HR. If you have any question you may ask me. + +As a candidate I don’t wanted to kill the conversation hence keep asking about the projects I would be handling if selected and what are the other openings in the company. Not to mention HR round was not difficult to crack and I got the opportunity. + +Also I would like to thank Avishek and Ravi (whom I am a friend since long) for taking the time to document my interview. + +Friends! If you had given any such interview and you would like to share your interview experience to millions of Tecmint readers around the globe? then send your questions and answers to admin@tecmint.com. + +Thank you! Keep Connected. Also let me know if I could have answered a question more correctly than what I did. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-firewall-iptables-interview-questions-and-answers/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/install-webmin-web-based-system-administration-tool-for-rhel-centos-fedora/ \ No newline at end of file From e4b49322dd36a373e45817b15797bf4d51d2af6b Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 4 Jun 2015 18:14:37 +0800 Subject: [PATCH 1057/2517] Translating by ZTinoZ --- .../tech/20150526 20 Useful Terminal Emulators for Linux.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index d3f974bd05..4ac5708fa6 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -1,4 +1,3 @@ -Translating by ZTinoZ 20款优秀的Linux终端仿真器 ================================================================================ 终端仿真器是一款用其它显示结构重现可视终端的计算机程序。换句话说就是终端仿真器能使哑终端看似像一台客户机连接上了服务器。终端仿真器允许最终用户像文本用户界面和命令行界面一样连接控制台和应用程序。 @@ -7,11 +6,11 @@ Translating by ZTinoZ 20款Linux终端仿真器 -You may find huge number of terminal emulators to choose from this open source world. Some of them offers large range of features while others offers less features. To give a better understanding to the quality of software that are available, we have gathered a list of marvelous terminal emulator for Linux. Each title provides its description and feature along with screenshot of the software with relevant download link. +你能从开源世界中找到大量的终端仿真器来使用,有些拥有大量的特性而有些则反之。为了能更好地理解它们所能提供的质量,我们收集了一份不可思议的Linux终端仿真器清单。每一款都列出了它们各自的描述和特性以及软件界面截图和下载链接。 ### 1. Terminator ### -Terminator is an advanced and powerful terminal emulator which supports multiple terminals windows. This emulator is fully customizable. You can change the size, colour, give different shapes to the terminal. Its very user friendly and fun to use. +Terminator是一款先进且强大的终端仿真器,它支持多终端窗口。这款仿真器可以完全自定义。你可以更改它的界面尺寸、颜色,给它设置不同的形状。拥有高用户友好性且使用起来很有乐趣。 #### Terminator的特性 #### From 1ce23012c0c88194f65ec37258b81ebba2eb8dcc Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 4 Jun 2015 21:16:17 +0800 Subject: [PATCH 1058/2517] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wi-cuckoo --- ... X GNU Open Source and Apple in History.md | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md diff --git a/sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md b/sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md deleted file mode 100644 index 9abc2f721f..0000000000 --- a/sources/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md +++ /dev/null @@ -1,58 +0,0 @@ -translating wi-cuckoo -Is Linux Better than OS X? GNU, Open Source and Apple in History -================================================================================ -> Tensions between the free software/open source community and Apple date back to the 1980s, Linux's founder called the core of Mac OS X "a piece of crap" and other anecdotes from software history. - -![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/05/untitled_2.png) - -Open source fans have long had a rocky relationship with Microsoft. Everyone knows that. But, in many ways, the tension between Apple and supporters of free or open source software is even starker—even if it receives much less attention in the press. - -To be sure, not all open source advocates have an aversion to Apple. Anecdotally, I've seen plenty of Linux hackers sporting iPhones and iPads. In fact, some Linux users like Apple's OS X so much that they've [created a number of Linux distributions][1] designed to look just like it. (So has the [North Korean government][2], incidentally.) - -But relations between the Cult of Mac and the Cult of Tux—that is, the Linux community (not to mention the other, smaller segments of the free and open source software world)—have not always been completely peaceable. And that's by no means a new phenomenon, as I'm discovering as I research the history of Linux and the Free Software Foundation. - -### GNU vs. Apple ### - -The ill will dates to at least the late 1980s. By June 1988, [GNU][3], the project launched by Richard Stallman to build a completely free Unix-like operating system whose source code would be freely shared, was [strongly criticizing][4] Apple's lawsuit against [Hewlett-Packard][5] (HPQ) and [Microsoft][6] (MSFT) over what Apple claimed was improper copying of the "look and feel" of the Macintosh operating system. If Apple prevailed, GNU warned, the company "will use this new power over the public to put an end to free software that could substitute for commercial software." - -At the time, GNU fought against the lawsuit (which meant, ironically, that GNU was supporting Microsoft, though those were different times) by distributing "[Keep Your Lawyers Off My Computer" buttons][7]. It also urged GNU supporters to boycott Apple, warning that, even if Macintoshes seemed like good computers, Apple's success in the lawsuit could provide the company with a monopoly in the market that would greatly increase the price of computers. - -Apple eventually [lost the lawsuit][8], but not until 1994, after which GNU [dropped its Apple boycott][9]. In the interim, GNU remained critical of the company. In the early 1990s, even after it began promoting GNU software programs for use on other personal computing platforms, including MS-DOS PCs, [GNU affirmed][10] that, until Apple ceased pursuing a "monopoly" over computers with user interfaces similar to those of the Macintosh, "we will not provide any support for Apple machines." (It's therefore ironic that a fair amount of the software that made it into OS X, the Unix-like operating system that Apple introduced later in the 1990s, came from GNU. But that's another story.) - -### Torvalds on Jobs ### - -Despite his more laissez-faire attitude toward most issues, Linus Torvalds, the creator of the Linux kernel, was no less charitable in his attitudes toward Apple than Stallman and GNU had been. In his 2001 book "Just for Fun: The Story of an Accidental Revolutionary," Torvalds described meeting with Steve Jobs circa 1997, at the latter's invitation, to discuss Mac OS X, which Apple was then developing but had not yet released publicly. - -"Basically, Jobs started off by trying to tell me that on the desktop there were just two players, Microsoft and Apple, and that he thought that the best thing I could do for Linux was to get in bed with Apple and try to get the open source people behind Mac OS X," Torvalds wrote. - -This courting apparently turned Torvalds off quite a bit. One point of disagreement centered on Torvalds's technical disdain for Mach, the kernel on which Apple was then building its new OS X operating system, which Torvalds called "a piece of crap. It contains all the design mistakes you can make, and managed to even make up a few of its own." - -But more off-putting, apparently, was the way Jobs was approaching open source in developing OS X (which had many open source programs at its core): "He sort of played down the flaw in the setup: Who cares if the basic operating system, the real low-core stuff, is open source if you then have the Mac layer on top, which is not open source?" - -All in all, Torvalds concluded, Jobs "didn't use very many arguments. He just basically took it for granted that I would be interested" in collaborating with Apple. "He was clueless, unable to imagine that there could be entire segments of the human race who weren't the least bit concerned about increasing the Mac's market share. I think he was truly surprised at how little I cared about how big a market the Mac had—or how big a market Microsoft has." - -Torvalds doesn't speak for all Linux users, of course. And his views on OS X and Apple may have softened since 2001. But the fact that, in the early 2000s, the Linux community's leading figure exhibited so much disdain for Apple and the hubris of its chief says something significant about how deeply seated tensions between the Apple world and the open source/free software world are. - -Both of these historical tidbits offer insight into the great debate regarding the actual value of Apple's products—whether the company thrives on the quality of the hardware and software it creates, or merely benefits from exceptional marketing acumen that allows it to sell products for much more than their non-Apple functional equivalents are worth. But I'll stay out of that debate, for now. - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/open-source-application-software-companies/051815/linux-better-os-x-gnu-open-source-and-apple- - -作者:[Christopher Tozzi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://thevarguy.com/author/christopher-tozzi -[1]:https://www.linux.com/news/software/applications/773516-the-mac-ifying-of-the-linux-desktop/ -[2]:http://thevarguy.com/open-source-application-software-companies/010615/north-koreas-red-star-linux-os-made-apples-image -[3]:http://gnu.org/ -[4]:https://www.gnu.org/bulletins/bull5.html -[5]:http://www.hp.com/ -[6]:http://www.microsoft.com/ -[7]:http://www.duntemann.com/AppleSnakeButton.jpg -[8]:http://www.freibrun.com/articles/articl12.htm -[9]:https://www.gnu.org/bulletins/bull18.html#SEC6 -[10]:https://www.gnu.org/bulletins/bull12.html From 4f95b88fb47686d7e7c432fedc062ec4a0abb0bd Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 4 Jun 2015 22:25:45 +0800 Subject: [PATCH 1059/2517] PUB:20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager @Vic020 --- ...nfigure PCI-passthrough on virt-manager.md | 55 ++++++++++++++++++ ...nfigure PCI-passthrough on virt-manager.md | 56 ------------------- 2 files changed, 55 insertions(+), 56 deletions(-) create mode 100644 published/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md delete mode 100644 translated/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md diff --git a/published/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md b/published/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md new file mode 100644 index 0000000000..c7c2d21fa3 --- /dev/null +++ b/published/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md @@ -0,0 +1,55 @@ +Linux有问必答:如何在虚拟机上配置PCI直通 +================================================================================ +> **提问**:我想要分配一块物理网卡到用KVM创建的虚拟机上。我打算为这台虚拟机启用网卡的PCI直通。请问,我如何才能在virt-manager里面通过PCI直通增加一个PCI设备到虚拟机上? + +如今的hypervisor能够高效地在多个虚拟操作系统间共享和模拟硬件资源。然而,虚拟资源共享不是总能使人满意,甚至在虚拟机性能是重点考量时,或者是虚拟机需要硬件DMA的完全控制时,应该避免共享。一项名叫“PCI直通”的技术可以用在一个虚拟机需要独享PCI设备时(例如:网卡、声卡、显卡)。本质上,PCI直通穿透了虚拟层,直接将PCI设备放到虚拟机里,而其他虚拟机则不能访问该设备。 + +### 开启“PCI直通”的准备 ### + +如果你想要为一台HVM实例开启PCI直通(例如,一台KVM创建的全虚拟化的虚拟机),你的母系统(包括CPU和主板)必须满足以下条件。如果你的虚拟机是半虚拟化的(由Xen创建),你可以跳过这步。 + +为了在 HVM虚拟机上开启PCI直通,系统需要支持**VT-d** (Intel处理器)或者**AMD-Vi** (AMD处理器)。Intel的VT-D(“英特尔直接I/O虚拟化技术”)是适用于最高端的Nehalem处理器和它的后继者(例如,Westmere、Sandy Bridge的,Ivy Bridge)。注意:VT-d和VT-x是两个独立功能。intel/AMD处理器支持VT-D/AMD-VI功能的列表可以[查看这里][1]。 + +在确认你的设备支持VT-d/AMD-Vi后,还有两件事情需要做。首先,确保VT-d/AMD-Vi已经在BIOS中开启。然后,在内核启动过程中开启IOMMU。IOMMU服务,是由VT-d/AMD-Vi提供的,可以保护虚拟机访问的主机内存,同时它也是全虚拟化虚拟机支持PCI直通的前提。 + +Intel处理器中,通过将“**intel_iommu=on**传给内核启动参数来开启IOMMU。参看[这篇教程][2]了解如何通过GRUB修改内核启动参数。 + +配置完启动参数后,重启电脑。 + +### 添加PCI设备到虚拟机 ### + +我们已经完成了开启PCI直通的准备。事实上,只需通过virt-manager就可以给虚拟机分配一个PCI设备。 + +打开virt-manager的虚拟机设置,在左边工具栏点击‘增加硬件’按钮。 + +选择从PCI设备表一个PCI设备来分配,点击“完成”按钮 + +![](https://farm8.staticflickr.com/7587/17015584385_db49e96372_c.jpg) + +最后,启动实例。这样,主机的PCI设备已经可以由虚拟机直接访问了。 + +### 常见问题 ### + +在虚拟机启动时,如果你看见下列任何一个错误,这个错误有可能由于母机VT-d (或 IOMMU)未开启导致。 + + Error starting domain: unsupported configuration: host doesn't support passthrough of host PCI devices + +---------- + + Error starting domain: Unable to read from monitor: Connection reset by peer + +请确保"**intel_iommu=on**"启动参数已经按上文叙述开启。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/pci-passthrough-virt-manager.html + +作者:[Dan Nanni][a] +译者:[Vic020/VicYu](http://vicyu.net) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://wiki.xenproject.org/wiki/VTdHowTo +[2]:http://xmodulo.com/add-kernel-boot-parameters-via-grub-linux.html diff --git a/translated/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md b/translated/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md deleted file mode 100644 index 0344095bc2..0000000000 --- a/translated/tech/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md +++ /dev/null @@ -1,56 +0,0 @@ -Linux有问必答:如何在虚拟机上配置PCI-passthrough -================================================================================ -> **提问**:我想要设置一块物理网卡到用KVM创建的虚拟机上。我打算开启网卡的PCI passthrough给这台虚拟机。请问,我如何才能增加一个PCI设备通过PCI直通到虚拟机上? - -如今的hypervisor能够高效地在多个虚拟操作系统分享和模拟硬件资源。然而,虚拟资源分享,虚拟机的性能,或者是虚拟机需要硬件DMA的完全控制,不是总能使人满意。一项名叫“PCI passthrough”的技术可以用在一个虚拟机需要独享PCI设备时(例如:network/sound/video card)。本质上,PCI passthrough越过了虚拟层,直接扩展PCI设备到虚拟机。但是其他虚拟机不能同时共享。 - - -### 开启“PCI Passthrough”的准备 ### - -如果你想要为一台HVM实例开启PCI passthrough(例如,一台KVM创建的full虚拟机),你的母系统(包括CPU和主板)必须满足以下条件。但是如果你的虚拟机是para-V(由Xen创建),你可以挑过这步。 - -为了开启PCI passthrough,系统需要支持**VT-d** (Intel处理器)或者**AMD-Vi** (AMD处理器)。Intel的VT-D(“英特尔虚拟化技术支持直接I/ O”)是适用于最高端的Nehalem处理器和它的后继者(例如,Westmere、Sandy Bridge的,Ivy Bridge)。注意:VT-d和VT-x是两个独立功能。intel/AMD处理器支持VT-D/AMD-VI功能的列表可以[点击这里][1]。 - -完成验证你的设备支持VT-d/AMD-Vi后,还有两件事情需要做。首先,确保VT-d/AMD-Vi已经在BIOS中开启。然后,在内核启动过程中开启IOMMU。IOMMU服务,是VT-d,/AMD-Vi提供,可以保护虚拟机访问的主机内存,同时它也是full虚拟机支持PCI passthrough的前提。 - -Intel处理器中,内核开启IOMMU通过在启动参数中修改“**intel_iommu=on**”。参看[这篇教程][2]获得如何通过GRUB修改内核启动参数。 - -配置完成启动参数后,重启电脑。 - -### 添加PCI设备到虚拟机 ### - -我们已经完成了开启PCI Passthrough的准备。事实上,只需通过虚拟机管理就可以给虚拟机分配一个PCI设备。 - -打开虚拟机设置,在左边工具栏点击‘增加硬件’按钮。 - -选择从PCI设备表一个PCI设备来分配,点击“完成”按钮 - -![](https://farm8.staticflickr.com/7587/17015584385_db49e96372_c.jpg) - -最后,开启实例。目前为止,主机的PCI设备已经可以由虚拟机直接访问了。 - -### 常见问题 ### - -在虚拟机启动时,如果你看见下列任何一个错误,这个错误有可能由于母机VT-d (或 IOMMU)未开启导致。 - - Error starting domain: unsupported configuration: host doesn't support passthrough of host PCI devices - ----------- - - Error starting domain: Unable to read from monitor: Connection reset by peer - -请确保"**intel_iommu=on**"启动参数已经按上文叙述开启。 - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/pci-passthrough-virt-manager.html - -作者:[Dan Nanni][a] -译者:[Vic020/VicYu](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni -[1]:http://wiki.xenproject.org/wiki/VTdHowTo -[2]:http://xmodulo.com/add-kernel-boot-parameters-via-grub-linux.html From 0fce13258a57624c4b3ed2a642242d2bb6a792f8 Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 5 Jun 2015 08:38:16 +0800 Subject: [PATCH 1060/2517] Update 20150126 iptraf--A TCP or UDP Network Monitoring Utility.md --- .../20150126 iptraf--A TCP or UDP Network Monitoring Utility.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md index 1d5d3cd0d9..fcfc6123e0 100644 --- a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md +++ b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md @@ -1,3 +1,4 @@ +Translating by GOLinux! iptraf: A TCP/UDP Network Monitoring Utility ================================================================================ [iptraf][1] is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. From 75da6072332a8e59e4aa33aaf91885355034cc7e Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 5 Jun 2015 08:58:25 +0800 Subject: [PATCH 1061/2517] [Translated]20150126 iptraf--A TCP or UDP Network Monitoring Utility.md --- ...A TCP or UDP Network Monitoring Utility.md | 65 ------------------- ...A TCP or UDP Network Monitoring Utility.md | 64 ++++++++++++++++++ 2 files changed, 64 insertions(+), 65 deletions(-) delete mode 100644 sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md create mode 100644 translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md diff --git a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md deleted file mode 100644 index fcfc6123e0..0000000000 --- a/sources/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md +++ /dev/null @@ -1,65 +0,0 @@ -Translating by GOLinux! -iptraf: A TCP/UDP Network Monitoring Utility -================================================================================ -[iptraf][1] is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. - -Its ncurses-based user interface also saves users from remembering command line switches. - -### Features ### - -- An IP traffic monitor that shows information on the IP traffic passing over your network. Includes TCP flag information, packet and byte counts, ICMP details, OSPF packet types. -- General and detailed interface statistics showing IP, TCP, UDP, ICMP, non-IP and other IP packet counts, IP checksum errors, interface activity, packet size counts. -- A TCP and UDP service monitor showing counts of incoming and outgoing packets for common TCP and UDP application ports -- A LAN statistics module that discovers active hosts and shows statistics showing the data activity on them -- TCP, UDP, and other protocol display filters, allowing you to view only traffic you’re interested in. -- Logging -- Supports Ethernet, FDDI, ISDN, SLIP, PPP, and loopback interface types. -- Utilizes the built-in raw socket interface of the Linux kernel, allowing it to be used over a wide range of supported network cards. -- Full-screen, menu-driven operation. - -To install - -### Ubuntu and it’s derivatives ### - - sudo apt-get install iptraf - -### Arch Linux and Its derivatives ### - - sudo pacman -S iptra - -### Fedora and its derivatives ### - - sudo yum install iptraf - -### Usage ### - -If the **iptraf** command is issued without any command-line options, the program comes up in interactive mode, with the various facilities accessed through the main menu. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_1.png) - -Menu for easy navigation. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_2.png) - -Selecting interfaces to monitor. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_3.png) - -Traffic from interface **ppp0** - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_4.png) - -Enjoy! - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/iptraf-tcpudp-network-monitoring-utility/ - -作者:[Enock Seth Nyamador][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/seth/ -[1]:http://iptraf.seul.org/about.html diff --git a/translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md new file mode 100644 index 0000000000..5f808b562a --- /dev/null +++ b/translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md @@ -0,0 +1,64 @@ +iptraf:TCP/UDP网络监控工具 +================================================================================ +[iptraf][1]是一个基于ncurses的IP局域网监控工具,它可以生成各种网络统计数据,包括TCP信息、UDP统计、ICMP和OSPF信息、以太网负载信息、节点统计、IP校验和错误和其它一些信息。 + +它基于ncurses的用户界面也会保存来自命令行切换记忆的用户。 + +### 功能 ### + +- 一个用于显示通过网络的IP流量信息的IP流量监控器,包括TCP标识信息、包河字节统计、ICMP详情、OSPF包类型 +- 显示IP、TCP、UDP、ICMP、非IP和其它IP包计数、IP校验和错误、接口活动、包大小计数的综合详细的接口统计数据 +- 一个用于显示流入和流出包常用TCP和UDP应用端口的TCP和UDP服务监控器 +- 一个用于发现活动主机和显示这些活动主机的数据活动的局域网统计模块 +- TCP、UDP和其它协议的显示过滤器,允许你查看你做感兴趣的通信 +- 日志记录 +- 支持以太网、FDDI、ISDN、SLIP、PPP和回环接口类型 +- 利用Linux内核内建的原生套接口界面,可以用于大范围支持的网卡 +- 全屏、菜单驱动操作 + +要安装 + +### Ubuntu及其衍生版 ### + + sudo apt-get install iptraf + +### Arch Linux及其衍生版 ### + + sudo pacman -S iptra + +### Fedora及其衍生版 ### + + sudo yum install iptraf + +### 用法 ### + +如果**iptraf**命令不带任何命令行选项执行,该程序就会以交互模式显现,可以通过主菜单获得各种各样的工具。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_1.png) + +易于导航的菜单。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_2.png) + +选择监控的接口。 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_3.png) + +来自**ppp0**接口的通信 + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_4.png) + +好好乐一把吧! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/iptraf-tcpudp-network-monitoring-utility/ + +作者:[Enock Seth Nyamador][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/seth/ +[1]:http://iptraf.seul.org/about.html From bbe176992d908f6c47714efb574002c988475e95 Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 5 Jun 2015 09:00:20 +0800 Subject: [PATCH 1062/2517] Update 20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md --- ...0150604 How To Install Unity 8 Desktop Preview In Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md b/sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md index 219433905e..3de67a946c 100644 --- a/sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md +++ b/sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How To Install Unity 8 Desktop Preview In Ubuntu ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Unity_8.jpeg) @@ -74,4 +75,4 @@ via: http://itsfoss.com/install-unity-8-desktop-ubuntu/ [3]:http://itsfoss.com/ubuntu-15-10-codename/ [4]:https://wiki.ubuntu.com/Unity8DesktopIso [5]:https://wiki.ubuntu.com/Unity8inLXC -[6]:http://itsfoss.com/install-mate-desktop-ubuntu-14-04/ \ No newline at end of file +[6]:http://itsfoss.com/install-mate-desktop-ubuntu-14-04/ From 208e40254c3f64364a29ef2467c14724c74d341f Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 5 Jun 2015 10:15:58 +0800 Subject: [PATCH 1063/2517] translating --- sources/tech/20150604 How to access SQLite database in Perl.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150604 How to access SQLite database in Perl.md b/sources/tech/20150604 How to access SQLite database in Perl.md index 980917a3c5..0e0723c219 100644 --- a/sources/tech/20150604 How to access SQLite database in Perl.md +++ b/sources/tech/20150604 How to access SQLite database in Perl.md @@ -1,3 +1,5 @@ +Translating---geekpi + How to access SQLite database in Perl ================================================================================ SQLite is a zero-configuration, server-less, file-based transactional database system. Due to its lightweight, self-contained, and compact design, SQLite is an extremely popular choice when you want to integrate a database into your application. In this post, I am going to show you how to create and access a SQLite database in Perl script. The Perl code snippet I present is fully functional, so you can easily modify and integrate it into your project. From bee040b4ada57d77b8c02b41159818e5e1132cf4 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 5 Jun 2015 10:19:49 +0800 Subject: [PATCH 1064/2517] [Translated]20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md --- ...stall Unity 8 Desktop Preview In Ubuntu.md | 78 ------------------- ...stall Unity 8 Desktop Preview In Ubuntu.md | 77 ++++++++++++++++++ 2 files changed, 77 insertions(+), 78 deletions(-) delete mode 100644 sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md create mode 100644 translated/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md diff --git a/sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md b/sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md deleted file mode 100644 index 3de67a946c..0000000000 --- a/sources/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md +++ /dev/null @@ -1,78 +0,0 @@ -Translating by GOLinux! -How To Install Unity 8 Desktop Preview In Ubuntu -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Unity_8.jpeg) - -If you have been following the news, Ubuntu will be switching to [Mir display server][1] along with [Unity 8][2] desktop. While it is still not certain if Unity 8 running on Mir will be available in [Ubuntu 15.10 Willy Werewolf][3], a preview version of Unity 8 is available for you to try and test. With the official PPA, it is really easy to **install Unity 8 in Ubuntu 14.04, 14.10 and 15.04**. - -Until now, this Unity 8 desktop preview has been available via an [ISO][4] for (primarily) developers to test it. But Canonical has made it available through [LXC containers][5]. By using this method you get a Unity 8 desktop session running on Mir display server as any desktop environment. It’s like as if you [install Mate desktop in Ubuntu][6] and choose the desktop session from the LightDm login screen. - -Curious to give Unity 8 a try? Let’s see how to install it. - -**Note: It’s an experimental preview and may not work properly for everyone.** - -### Install Unity 8 desktop in Ubuntu ### - -Following are the steps to install and use Unity 8: - -#### Step 1: Install Unity 8 in Ubuntu 12.04 and 14.04 #### - -If you are running Ubuntu 12.04 and 14.04, you’ll have to use the official PPA to install Unity 8. Use the following command: - - sudo apt-add-repository ppa:unity8-desktop-session-team/unity8-preview-lxc - sudo apt-get update - sudo apt-get upgrade - sudo apt-get install unity8-lxc - -#### Step 1: Install Unity 8 in Ubuntu 14.10 and 15.04 #### - -If you are running Ubuntu 14.10 or 15.04, Unity 8 LXC is already in the sources. You just need to run the following commands: - - sudo apt-get update - sudo apt-get install unity8-lxc - -#### Step 2: Set up Unity 8 desktop preview LXC #### - -Once you have installed Unity 8 LXC, it’s time to set it up. Use the following command for this purpose: - - sudo unity8-lxc-setup - -It will take some time in set up, so have some patience. It downloads the ISO and then extracts it, and then any last bits of setup necessary to make it work. It will also install a slightly modified version of LightDM. Once everything is done, a restart is required. - -#### Step 3: Select Unity 8 #### - -After restarting, at login screen, click on the Ubuntu icon beside your login name: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Change_Desktop_Environment_Ubuntu.jpeg) - -You should see the option of Unity 8 here. Select it: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Select_Unity8.jpeg) - -### Uninstall Unity 8 LXC ### - -If you find Unity 8 too buggy or if you don’t like it, you can simply switch back to the default Unity version in similar fashion. Additionally, you can also remove Unity 8 using this command: - - sudo apt-get remove unity8-lxc - -This will remove the Unity 8 option from LightDM screen but the set-up will remain there. - -That’s all you need to do to install Unity 8 with Mir in Ubuntu. Do share what you think of Unity 8 when you try it out. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/install-unity-8-desktop-ubuntu/ - -作者:[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://en.wikipedia.org/wiki/Mir_%28software%29 -[2]:https://wiki.ubuntu.com/Unity8Desktop -[3]:http://itsfoss.com/ubuntu-15-10-codename/ -[4]:https://wiki.ubuntu.com/Unity8DesktopIso -[5]:https://wiki.ubuntu.com/Unity8inLXC -[6]:http://itsfoss.com/install-mate-desktop-ubuntu-14-04/ diff --git a/translated/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md b/translated/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md new file mode 100644 index 0000000000..bf1c3ea0bb --- /dev/null +++ b/translated/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md @@ -0,0 +1,77 @@ +Ubuntu中安装Unity 8桌面预览版 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Unity_8.jpeg) + +如果你一直关注新闻,那么Ubuntu将会切换到[Mir显示服务器][1],并随同发布[Unity 8][2]桌面。然而,在尚未确定Unity 8是否会在[Ubuntu 15.10 Willy Werewolf][3]中部署到Mir上之前,提供了一个Unity 8的预览版本供你体验和测试。通过官方PPA,可以很容地**安装Unity 8到Ubuntu 14.04,14.10和15.04中**。 + +到目前为止,开发者已经可以通过[ISO][4]获得该Unity 8预览来进行测试。但是Canonical已经通过[LXC容器][5]发布了。通过该方法,你可以获取Unity 8桌面会话,让它作为任何一个桌面环境运行在Mir显示服务器上。就像你[在Ubuntu中安装Mate桌面][6],然后从LightDm登录屏幕选择桌面会话一样。 + +好奇?想要试试Unity 8?让我们来看怎样安装它吧。 + +**注意: 它是一个实验性预览,可能不是所有人都可以让它正确工作的。** + +### 安装Unity 8桌面到Ubuntu ### + +下面是安装并使用Unity 8的步骤: + +#### 步骤 1: 安装Unity 8到Ubuntu 12.04和14.04 #### + +如果你真运行着Ubuntu 12.04和14.04,那么你必须使用官方PPA来安装Unity 8。使用以下命令进行安装: + + sudo apt-add-repository ppa:unity8-desktop-session-team/unity8-preview-lxc + sudo apt-get update + sudo apt-get upgrade + sudo apt-get install unity8-lxc + +#### 步骤 1: 安装Unity 8到Ubuntu 14.10和15.04 #### + +如果你真运行着Ubuntu 14.10或15.04,那么Unity 8 LXC已经在源中准备好。你只需要运行以下命令: + + sudo apt-get update + sudo apt-get install unity8-lxc + +#### 步骤 2: 设置Unity 8桌面预览LXC #### + +安装Unity 8 LXC后,该对它进行设置,下面的命令就可达到目的: + + sudo unity8-lxc-setup + +它将花费一些时间来设置,所以,给点耐心吧。它会下载ISO,然后解压缩,接着完整最后一些必要的设置来让它工作。它也会安装一个LightDM的轻度修改版本。这一切都搞定后,需要重启。 + +#### 步骤 3: 选择Unity 8 #### + +重启后,在登录屏幕,点击你的登录旁边的Ubuntu图标: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Change_Desktop_Environment_Ubuntu.jpeg) + +你应该可以在这看到Unity 8的选项,选择它: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Select_Unity8.jpeg) + +### 卸载Unity 8 LXC ### + +如果你发现Unity 8毛病太多,或者你不喜欢它,那么你可以以相同的方式切换会默认Unity版本。此外,你也可以通过下面的命令移除Unity 8: + + sudo apt-get remove unity8-lxc + +该命令会将Unity 8选项从LightDM屏幕移除,但是配置仍然保留着。 + +以上就是你在Ubuntu中安装嗲有Mir的Unity 8的全部过程,试玩后请分享你关于Unity 8的想法哦! + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-unity-8-desktop-ubuntu/ + +作者:[Abhishek][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://en.wikipedia.org/wiki/Mir_%28software%29 +[2]:https://wiki.ubuntu.com/Unity8Desktop +[3]:http://itsfoss.com/ubuntu-15-10-codename/ +[4]:https://wiki.ubuntu.com/Unity8DesktopIso +[5]:https://wiki.ubuntu.com/Unity8inLXC +[6]:http://itsfoss.com/install-mate-desktop-ubuntu-14-04/ From f2a275e7d04fd30f0d0056d210955c8aed7feb64 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 5 Jun 2015 16:53:11 +0800 Subject: [PATCH 1065/2517] Translating by ZTinoZ --- ...526 20 Useful Terminal Emulators for Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 4ac5708fa6..4d2f8cfc16 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -14,10 +14,10 @@ Terminator是一款先进且强大的终端仿真器,它支持多终端窗口 #### Terminator的特性 #### -- Customize your profiles and colour schemes, set the size to fit your needs. -- Use plugins to get even more functionality. -- Several key-shortcuts are available to speed up common activities. -- Split the terminal window into several virtual terminals and re-size them as needed. +- 自定义外形和色彩设计,根据你的需要设置尺寸。 +- 使用插件来获取更多功能。 +- 快捷键可以加快普通操作。 +- 可以把终端窗口分裂成几个虚拟终端并把它们重新设置成你需要的尺寸。 ![Terminator Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Terminator-Emulator.jpeg) @@ -28,13 +28,13 @@ Terminator Terminal ### 2. Tilda ### -Tilda is a stylish drop-down terminal based on GTK+. With the help of a single key press you can launch a new or hide Tilda window. However, you can add colors of your choice to change the look of the text and Terminal background. +Tilda是一款漂亮的基于GTK+的下拉式终端。敲击一个键你就可以打开一个新的或隐藏着的Tilda窗口。然而,你可以添加你所选择的颜色来更改文本颜色和终端背景颜色。 #### Tilda的特性 #### - Interface with Highly customization option. - You can set the transparency level for Tilda window. - Excellent built-in colour schemes. +- 高度定制的选项界面设置。 +- 你可以给Tilda设置透明度。 +- 优秀的嵌入式色彩设计。 ![Tilda Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Tilda-Emulator.jpeg) From e75c5aaea9e2a025215967e8b35701658d44c8f9 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 5 Jun 2015 20:40:44 +0800 Subject: [PATCH 1066/2517] PUB:20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop @ZTinoZ --- ...o After Installing Ubuntu 15.04 Desktop.md | 162 +++++++++++------- 1 file changed, 98 insertions(+), 64 deletions(-) rename {translated/tech => published}/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md (71%) diff --git a/translated/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/published/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md similarity index 71% rename from translated/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md rename to published/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md index e806e8e436..de0f973cc8 100644 --- a/translated/tech/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md +++ b/published/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md @@ -1,74 +1,87 @@ 安装完Ubuntu 15.04桌面后要做的15件事 ================================================================================ -本教程适用于新手和在自己的电脑上安装好Ubuntu 15.04 “Vivid Vervet” 桌面之后为了自定义自己的系统并安装一些基本程序作为日常使用的已经做了一些准备的人。 +本教程适用于在自己的电脑上安装了 Ubuntu 15.04 “Vivid Vervet” 桌面的新手,这里会告诉你安装之后应该做哪些事情,来自定义你的系统和安装一些基本程序作为日常使用。 ![Things to Do After Installing Ubuntu 15.04](http://www.tecmint.com/wp-content/uploads/2015/04/things-to-do-after-installing-ubuntu-15.04.jpeg) -安装完Ubuntu 15.04桌面后要做的15件事 + +*安装完Ubuntu 15.04桌面后要做的15件事* ### 1. 启用Ubuntu额外软件库并更新系统 ### -在刚装好Ubuntu之后你应该要关心的第一件事是启用官方合作伙伴提供的Ubuntu额外软件库并且通过最近一次的安全补丁和软件更新来保持系统是最新状态。 +在刚装好Ubuntu之后你应该要关心的第一件事是启用Canonical的官方合作伙伴提供的Ubuntu额外软件库,并且通过最近一次的安全补丁和软件更新来保持系统是最新状态。 -要完成这一步,依次从左边菜单中打开System Settings -> Software and Updates工具并检查所有Ubuntu软件和其他软件库(官方合作伙伴所提供),点击关闭按钮并等待重新加载缓存源树。 +要完成这一步,依次从左边菜单中打开System Settings -> Software and Updates工具,并检查所有Ubuntu软件和其他软件库(Canonical 的合作伙伴所提供),点击关闭按钮并等待重新加载缓存源树。 ![Software Updates](http://www.tecmint.com/wp-content/uploads/2015/04/Software-Updates.jpg) -Software Updates + +*软件更新* ![Other Software (Canonical Partners)](http://www.tecmint.com/wp-content/uploads/2015/04/Other-Software.jpg) -Other Software (Canonical Partners) -经过一系列快速平滑的更新过程之后,打开终端并输入以下命令来让系统使用新软件库: +*其它软件(Canonical 合作伙伴)* + +为了快速而顺畅的更新,打开终端并输入以下命令来让系统使用新软件库: $ sudo apt-get update $ sudo apt-get upgrade ![Ubuntu Upgrade](http://www.tecmint.com/wp-content/uploads/2015/04/Ubuntu-Upgrade.jpg) -Ubuntu Upgrade + +*Ubuntu 升级* ### 2. 安装额外驱动 ### 为了能让系统扫描并安装额外的硬件专有驱动,我们依然从System Settings打开Software and Updates工具,选择Additional Drivers标签并等待该工具扫描驱动。 -如果有驱动匹配到了你的硬件,查看你想要安装的驱动并点击Apply按钮来安装它,以防专有驱动没有如期工作,用Revert按钮就能卸载它们或勾选Do not use the device后点击Apply按钮。 +如果有驱动匹配到了你的硬件,查看你想要安装的驱动并点击Apply按钮来安装它。如果专有驱动没有如预期的工作,用Revert按钮就能卸载它们或勾选Do not use the device后点击Apply按钮。 ![Install Drivers in Ubuntu](http://www.tecmint.com/wp-content/uploads/2015/04/install-drivers.jpg) -Install Drivers + +*安装驱动* ### 3. 安装Synaptic和Gdebi工具 ### -除了Ubuntu Software Center,Synaptic是一个apt图形化工具,通过它你能管理、安装、卸载、搜索和升级软件库并配置软件包。同样的,Gdebi在功能上也有相同的地方。在终端上输入以下命令来安装这两个包: +除了Ubuntu Software Center之外,Synaptic也是一个apt的图形化工具,通过它你能管理、安装、卸载、搜索和升级软件库并配置软件包。同样的,Gdebi对本地的.deb 包也有类似功能。在终端上输入以下命令来安装这两个包: $ sudo apt-get install synaptic gdebi ![Install Synaptic and Gdebi](http://www.tecmint.com/wp-content/uploads/2015/04/install-synaptic-gdebi.jpg) -Install Synaptic and Gdebi + +*安装 Synaptic 和 Gdebi* ![Synaptic Package Manager](http://www.tecmint.com/wp-content/uploads/2015/04/synaptic-package-manager.jpg) -Synaptic Package Manager -### 4. 更改系统外观和运行状态 ### +*Synaptic 包管理器* -如果你想要更改桌面背景或图标大小,依次打开System Settings –> Appearance –> Look并对桌面进行个性化设置,把菜单移动到窗口标题栏,在Behavior标签中启动workspaces和desktop icons或开关auto-hide the Launcher。 +### 4. 更改系统外观和行为 ### + +如果你想要更改桌面背景或图标大小,依次打开System Settings –> Appearance –> Look,并对桌面进行个性化设置。要把菜单移动到窗口标题栏,在Behavior标签中设置即可。 ![System Appearances](http://www.tecmint.com/wp-content/uploads/2015/04/system-appearance.jpg) -System Appearances + +*系统外观* ### 5. 提升系统安全性和隐私性 ### ![System Security Enhancement](http://www.tecmint.com/wp-content/uploads/2015/04/system-security-1.jpg) -System Security Enhancement + +*增强系统安全* ![System Security Options](http://www.tecmint.com/wp-content/uploads/2015/04/system-security-2.jpg) -System Security Options + +*系统安全选项* ### 6. 禁用不需要开机自启动的应用程序 ### -要提高登录系统的速度,通过输入以下命令来显示被隐藏的开机启动应用程序,在Dash中搜索它就能打开Startup Applications工具并反选不需要再登录系统的过程中启动的程序。 +要提高登录系统的速度,通过输入以下命令来显示被隐藏的开机启动应用程序。 - $ sudo sed -i ‘s/NoDisplay=true/NoDisplay=false/g’ /etc/xdg/autostart/*.desktop + $ sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop + +在Dash中搜索打开Startup Applications工具,并反选不需要在登录系统的过程中启动的程序。 ![Disable Unwanted Applications](http://www.tecmint.com/wp-content/uploads/2015/04/disable-unwanted-applications.jpg) -Disable Unwanted Applications + +*禁用不需要的应用程序* ### 7. 添加扩展多媒体支持 ### @@ -88,50 +101,54 @@ Disable Unwanted Applications $ sudo apt-get install vlc smplayer audacious qmmp mixxx xbmc handbrake openshot ![Install Media Players](http://www.tecmint.com/wp-content/uploads/2015/04/install-media-players.jpg) -Install Media Players + +*安装媒体播放器* ![Media Player Playlist](http://www.tecmint.com/wp-content/uploads/2015/04/media-playllist.jpg) -Media Player Playlist -除了多媒体播放器,安装ubuntu-restricted-extras和Java支持包也可以解码并支持其它受约束的多媒体格式。 +*媒体播放器的播放列表* + +除了多媒体播放器,安装ubuntu-restricted-extras和Java支持包也可以解码并支持其它受限制的多媒体格式。 $ sudo apt-get install ubuntu-restricted-extras openjdk-8-jdk ![Install Ubuntu Extras](http://www.tecmint.com/wp-content/uploads/2015/04/install-ubuntu-extras.jpg) -Install Ubuntu Extras -在终端上输入以下命令来启用DVD Playback和其它多媒体解码器: +*安装 Ubuntu Extras* + +在终端上输入以下命令来启用DVD 回放和其它多媒体解码器: $ sudo apt-get install ffmpeg gstreamer0.10-plugins-bad lame libavcodec-extra $ sudo /usr/share/doc/libdvdread4/install-css.sh ![Enable Video Codes](http://www.tecmint.com/wp-content/uploads/2015/04/enable-video-playbacks.jpg) -Enable Video Codes -### 8. 安装图像处理应用程序 ### +*启用视频解码器* + +### 8. 安装图像处理应用程序和安装媒体烧录软件 ### 如果你是一个摄影爱好者,想在Ubuntu上处理调整图像,或许需要安装一下图像处理程序: -- GIMP (alternative for Adobe Photoshop) +- GIMP (一个 Adobe Photoshop 替代品) - Darktable - Rawtherapee - Pinta - Shotwell -- Inkscape (alternative for Adobe Illustrator) +- Inkscape (一个 Adobe Illustrator 替代品) - Digikam - Cheese -这些应用程序能从Ubuntu Software Center中安装或者立刻在终端上使用以下命令: +这些应用程序能从Ubuntu Software Center中安装,或者立刻在终端上使用以下命令: $ sudo apt-get install gimp gimp-plugin-registry gimp-data-extras darktable rawtherapee pinta shotwell inkscape ![Install Image Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-image-applications.jpg) -Install Image Applications + +*安装图像处理应用程序* ![Rawtherapee Tool](http://www.tecmint.com/wp-content/uploads/2015/04/rawtherapee.jpg) -Rawtherapee Tool -### 9. 安装媒体烧录软件 ### +*Rawtherapee Tool* 如果要挂载ISO镜像或烧录一张CD或DVD,你可以选择并安装以下软件中的一款: @@ -146,18 +163,20 @@ Rawtherapee Tool $ sudo apt-get install furiusisomount ![Install Media Burners](http://www.tecmint.com/wp-content/uploads/2015/04/install-media-burners.jpg) -Install Media Burners -### 10. 安装压缩应用程序 ### +*安装媒体烧录软件* + +### 9. 安装压缩应用程序 ### 如果要处理大多数归档格式的文件(zip, tar.gz, zip, 7zip rar等等),输入以下命令来安装这些包: $ sudo apt-get install unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller ![Install Archive Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-archive-apps.jpg) -Install Archive Applications -### 11. 安装聊天应用程序 ### +*安装压缩应用程序* + +### 10. 安装聊天应用程序 ### 如果你想要和世界各地的人们聊天,这里有一份最流行的Linux聊天应用程序列表: @@ -179,14 +198,16 @@ Install Archive Applications $ sudo apt-get install telegram ![Install Chat Applications](http://www.tecmint.com/wp-content/uploads/2015/04/install-chat-apps.jpg) -Install Chat Applications -想要在Ubuntu上安装Viber可以访问[Viber官方网站][1]下载Debian安装包到本地并用Gdebi包管理工具来安装viber.deb应用程序(右击 –> 打开 -> GDebi Package Installer). +*安装聊天应用程序* + +想要在Ubuntu上安装Viber可以访问[Viber官方网站][1]下载Debian安装包到本地,并用Gdebi包管理工具来安装viber.deb应用程序(右击 –> 打开 -> GDebi Package Installer). ![Install Viber in Ubuntu](http://www.tecmint.com/wp-content/uploads/2015/04/install-viber.jpg) -Install Viber -### 12. 安装种子软件 ### +*安装 Viber* + +### 11. 安装种子软件 ### 在Ubuntu最流行的种子应用程序和P2P文件共享程序是: @@ -203,77 +224,90 @@ Install Viber $ sudo apt-get install linuxdcpp ![Install Torrent](http://www.tecmint.com/wp-content/uploads/2015/04/install-torrent.jpg) -Install Torrent -### 13. 安装Windows仿真器-Wine和游戏支持平台-Steam ### +*安装种子软件* -Wine仿真器允许你在Linux上安装并运行Window应用程序。在另一方面,Steam是一款Valve开发的流行于Linux系统的游戏平台。想要在你的机器上安装它们,可以输入以下命令或使用Ubuntu Software Center。 +### 12. 安装Windows仿真器-Wine和游戏支持平台-Steam ### + +Wine仿真器允许你在Linux上安装并运行Window应用程序。在另一方面,Steam是一款Valve开发的基于Linux系统的流行游戏平台。想要在你的机器上安装它们,可以输入以下命令或使用Ubuntu Software Center。 $ sudo apt-get install steam wine winetricks ![Install Wine](http://www.tecmint.com/wp-content/uploads/2015/04/install-wine.jpg) -Install Wine -### 14. 安装Cairo-Dock并启用桌面视觉效果 ### +*安装 Wine* + +### 13. 安装Cairo-Dock并启用桌面视觉效果 ### Cairo-Dock是一款漂亮且灵巧的用于Linux桌面上的启动条,类似于Mac OS X dock。想要在Ubuntu上安装它,可以在终端上运行以下命令: $ sudo apt-get install cairo-dock cairo-dock-plug-ins ![Install Cairo Dock](http://www.tecmint.com/wp-content/uploads/2015/04/install-cairo-dock.jpg) -Install Cairo Dock + +*安装Cairo-Dock* ![Add Cairo Dock at Startup](http://www.tecmint.com/wp-content/uploads/2015/04/add-cairo-dock-startup.jpg) -Add Cairo Dock at Startup + +*让 Cairo Dock 自动启动* 想要启用某一套桌面效果,例如Cube效果,可以使用以下命令来安装Compiz包: $ sudo apt-get install compiz compizconfig-settings-manager compiz-plugins-extra -想要激活桌面Cube效果,在Dash上查找ccsm,打开CompizConfig Settings Manager,找到General Options – > Desktop Size并设置Horizontal Virtual Size的值为4,Vertical Virtual Size的值为1。然后返回检查Desktop Cube框(禁用Desktop Wall)和Rotate Cube框(解决冲突 -> 禁止切换视图1)并Ctrl+Alt+鼠标左击来查看cube效果。 +想要激活桌面Cube效果,在Dash上查找ccsm来打开CompizConfig Settings Manager,找到General Options – > Desktop Size并设置Horizontal Virtual Size的值为4,Vertical Virtual Size的值为1。然后返回检查Desktop Cube框(禁用Desktop Wall)和Rotate Cube框(解决冲突 -> 禁止切换视图1)并Ctrl+Alt+鼠标左击来查看cube效果。 ![Enable Compiz](http://www.tecmint.com/wp-content/uploads/2015/04/enable-compiz.jpg) -Enable Compiz + +*启用Compiz* ![Compiz Settings](http://www.tecmint.com/wp-content/uploads/2015/04/compiz-settings.jpg) -Compiz Settings + +*Compiz设置* ![Compiz Settings Addons](http://www.tecmint.com/wp-content/uploads/2015/04/compiz-settings-1.jpg) -Compiz Settings Addons + +*Compiz设置插件* ![Desktop Window Rotating](http://www.tecmint.com/wp-content/uploads/2015/04/desktop-cube.jpg) -Desktop Window Rotating -### 15. 添加额外浏览器支持 ### +*桌面窗口旋转* + +### 14. 添加其它浏览器 ### Ubuntu 15.04默认浏览器是Mozilla Firefox。想要安装其它浏览器比如Google Chrome或Opera,可以访问它们的官方网站,下载所提供的.deb包并用Gdebi Package Installer在你的系统上安装它们。 ![Enable Browser Support](http://www.tecmint.com/wp-content/uploads/2015/04/enable-browser-support.jpg) -Enable Browser Support + +*启用浏览器支持* ![Opera Browser Support](http://www.tecmint.com/wp-content/uploads/2015/04/opera.jpg) -Opera Browser Support + +*Opera Browser* 想要安装Chromium开源浏览器请在终端上输入以下命令: $ sudo apt-get install chromium-browser -### 16. 安装Tweak工具 ### +### 15. 安装Tweak工具 ### 想要用额外的应用程序来自定义Ubuntu吗?在终端上输入以下命令来安装Unity Tweak工具和Gnome Tweak工具: $ sudo apt-get install unity-tweak-tool gnome-tweak-tool ![Install Tweak Tool](http://www.tecmint.com/wp-content/uploads/2015/04/install-tweak-tool.jpg) -Install Tweak Tool + +*安装Tweak Tool* ![Tweak Tool Settings](http://www.tecmint.com/wp-content/uploads/2015/04/tweak-settings.jpg) -Tweak Tool Settings -另一个有趣的tweak工具主要是Ubuntu Tweak包,可以通过访问官方网站来获取并安装: [http://ubuntu-tweak.com/][2]. +*Tweak Tool 设置* + +另一个有趣的tweak工具主要是Ubuntu Tweak包,可以通过访问官方网站来获取并安装: [http://ubuntu-tweak.com/][2]。 ![Tweak Tool: System Information](http://www.tecmint.com/wp-content/uploads/2015/04/tweak-system-info.jpg) -Tweak Tool: System Information + +*Tweak Tool: 系统信息* 在你安装好这一连串软件之后,你或许想要清理一下你的系统来释放一点硬盘上的空间,输入以下命令即可: @@ -281,7 +315,7 @@ Tweak Tool: System Information $ sudo apt-get -y autoclean $ sudo apt-get -y clean -这只是tweaks工具中的其中一些和普通用户日常生活中可能会在Ubuntu 15.04桌面上安装使用的程序。想要了解更多高级的程序,特性和功能,请使用Ubuntu Software Center或查阅Ubuntu Wiki主页。 +这只是一些普通用户日常使用Ubuntu 15.04桌面是需要调整和安装的程序。想要了解更多高级的程序,特性和功能,请使用Ubuntu Software Center或查阅Ubuntu Wiki主页。 -------------------------------------------------------------------------------- @@ -289,7 +323,7 @@ via: http://www.tecmint.com/things-to-do-after-installing-ubuntu-15-04-desktop/ 作者:[Matei Cezar][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4d6185d8133d835aadacf712d7e686f7bff9f5cb Mon Sep 17 00:00:00 2001 From: sevenot Date: Fri, 5 Jun 2015 22:07:40 +0800 Subject: [PATCH 1067/2517] sevenot translating --- ...oundation achievements in 2014--download the Annual Report.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md b/sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md index 518e96c171..28b0a76083 100644 --- a/sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md +++ b/sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md @@ -1,3 +1,4 @@ +sevenot translating Read about The Document Foundation achievements in 2014: download the Annual Report! ================================================================================ ![](https://documentfoundation.files.wordpress.com/2015/06/tdf-report.jpg) From ce19dc8a8caf8169a086a8ce0ebc319cd9ba5beb Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 5 Jun 2015 22:16:51 +0800 Subject: [PATCH 1068/2517] PUB:20150417 How to Install Discourse in a Docker Container @wi-cuckoo --- ...Install Discourse in a Docker Container.md | 72 ++++++++++--------- 1 file changed, 38 insertions(+), 34 deletions(-) rename {translated/tech => published}/20150417 How to Install Discourse in a Docker Container.md (54%) diff --git a/translated/tech/20150417 How to Install Discourse in a Docker Container.md b/published/20150417 How to Install Discourse in a Docker Container.md similarity index 54% rename from translated/tech/20150417 How to Install Discourse in a Docker Container.md rename to published/20150417 How to Install Discourse in a Docker Container.md index e4dcf8f3c5..cb3351a77e 100644 --- a/translated/tech/20150417 How to Install Discourse in a Docker Container.md +++ b/published/20150417 How to Install Discourse in a Docker Container.md @@ -1,8 +1,10 @@ 如何在一个Docker容器里安装Discourse ============================================================================= -大家好,今天我们将会学习如何利用Docker平台安装Discourse。Discourse是完全开源的讨论平台,为互联网的下一个十年而搭建,拥有一个邮件列表,一个论坛和一个long-form(此处不明白)聊天室。不管从技术角度还是社会学角度,当你试图去重新想象当今一个现代的,可持续的,完全开源的互联网讨论平台该是什么样子,Discourse都是一个不错的途径。Discourse简洁,直接之于讨论。它确实是一个令人称赞的平台,对于互联网上各种各样的讨论来说,提供了在机器之外如此酷的一个服务。Docker是一个开源平台,提供打包,运输和运行任何应用的平台,如一个轻量级容器。Docker容器技术使得Discourse更加方便和容易去建立应用程序。 +大家好,今天我们将会学习如何利用Docker平台安装Discourse。Discourse是一个完全开源的讨论平台,以未来十年的互联网理念设计,拥有一个邮件列表,一个论坛和一个长篇聊天室。不管从技术角度还是社会学角度,如今要体验一个现代的、勃勃生机的、完全开源的互联网讨论平台,Discourse都是一个不错的途径。Discourse是一个简单、简明、简易的讨论方式。它确实是一个令人称赞的平台,对于互联网上各种各样的论坛来说,提供了一个上手可用的很酷的服务。 -所以,下面是一些快速且容易的步骤,用来安装Discourse在一个Docker环境里面。 +Docker是一个开源的、可以将任何应用以轻量级容器的方式打包、传输和运行的开放平台。Docker容器技术使得可以更加方便和容易构建Discourse。 + +所以,下面是一些快速且容易的步骤,用来在一个Docker环境里面安装Discourse。 ### 1. 安装Docker ### @@ -16,7 +18,7 @@ docker安装包在Ubuntu的仓库里面是可用的,所以我们将会使用ap #### 在CentOS 7上 #### -在CentOS 7的主机上,我们使用yum管理器安装docker,因为CentOS的仓库里同样有docker安装包 +在CentOS 7的主机上,我们使用yum管理器安装docker,因为CentOS的仓库里同样有docker安装包 # yum install docker @@ -24,7 +26,7 @@ docker安装包在Ubuntu的仓库里面是可用的,所以我们将会使用ap ### 2. 设定交换内存 ### -如果你的RAM容量小于1GB,那么确保升级你的系统达到1GB或者以上,否则Discourse不会在512MB的RAM下安装。如果你现在准备好了安装Discourse,根据下面的步骤为你的VPS(Virtual Private Servers)或者服务器设定交换内存 +如果你的RAM容量小于1GB,那么确保升级你的系统达到1GB或者以上,Discourse不能在512MB的RAM下安装。如果你现在准备好了安装Discourse,根据下面的步骤为你的VPS(Virtual Private Servers)或者服务器设定交换内存: 运行下面的命令,创建一个空的交换文件。 @@ -34,7 +36,7 @@ docker安装包在Ubuntu的仓库里面是可用的,所以我们将会使用ap # dd if=/dev/zero of=/swapfile bs=1k count=1024k -如果你想达到2GB,跳过上面的所有步骤,跟着下面做 +如果你想达到2GB,跳过上一步,跟着下面做 # dd if=/dev/zero of=/swapfile bs=1k count=2014k @@ -50,14 +52,14 @@ docker安装包在Ubuntu的仓库里面是可用的,所以我们将会使用ap # echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab -设置swappiness为10,这样交换内存仅作为一个紧急缓冲区用。 +设置swappiness参数为10,这样交换内存仅作为一个紧急缓冲区用。 # sudo sysctl -w vm.swappiness=10 # echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf ### 3. 安装Discourse ### -在我们的主机上安装Docker后,我们将会安装Discourse。现在,我们从官方的Discourse GitHub仓库克隆一份到/var/discourse目录下。我们需要运行下面的命令完成这一步。 +在我们的主机上安装好Docker后,我们将会安装Discourse。现在,我们从官方的Discourse GitHub仓库克隆一份到`/var/discourse`目录下。我们需要运行下面的命令完成这一步。 # mkdir /var/discourse/ @@ -65,7 +67,7 @@ docker安装包在Ubuntu的仓库里面是可用的,所以我们将会使用ap # git clone https://github.com/discourse/discourse_docker.git /var/discourse/ -克隆好仓库后,我们会为discourse服务器复制配置文件 +克隆好仓库后,我们给discourse服务器复制配置文件 # cp samples/standalone.yml containers/app.yml @@ -77,15 +79,15 @@ docker安装包在Ubuntu的仓库里面是可用的,所以我们将会使用ap # nano containers/app.yml -现在,我们需要设置开发者的邮箱地址为DISCOURSE_DEVELOPER_EMAILS,如下。 +现在,我们需要将开发者邮箱地址DISCOURSE_DEVELOPER_EMAILS修改为自己的,如下。 DISCOURSE_DEVELOPER_EMAILS: 'arun@linoxide.com' -然后,我们会设置主机名为服务器的域名。 +然后,我们设置主机名为服务器的域名。 DISCOURSE_HOSTNAME: 'discourse.linoxide.com' -接着,为每个托管在相同discourse主机或者vps上的SMTP服务器设定邮箱证书。SMTP设置需要从你的Discourse发送邮件 +接着,设置放在相同的discourse主机或vps上的SMTP服务器的认证信息。这些SMTP设置用于你的Discourse发送邮件。 DISCOURSE_SMTP_ADDRESS: smtp.linoxide.com DISCOURSE_SMTP_PORT: 587 # (optional) @@ -94,11 +96,9 @@ docker安装包在Ubuntu的仓库里面是可用的,所以我们将会使用ap ![](http://blog.linoxide.com/wp-content/uploads/2015/04/discourse-configuration.png) - Discourse 配置 - 如果你在使用一个1GB的Discourse,设定UNICORN_WORKERS为2,db_shared_buffers为128MB,这样你会有更多的内存空间。 -运行Discourse需要强制性地创建一个邮件服务器。如果你已经有一个服务器了那就好办多了,我们可以使用它的证书。如果你没有现成的邮件服务器,或者你不知道那是什么。没关系,创建一个免费的帐号在[Mandrill][1] ([Mailgun][2],或者[Mailjet][3]),然后使用面板上提供的证书。 +运行Discourse需要强制性地创建一个邮件服务器。如果你已经有一个服务器了那就好办多了,我们可以使用它的认证信息。如果你没有现成的邮件服务器,或者你不知道那是什么。没关系,可以在[Mandrill][1] (或[Mailgun][2]和 [Mailjet][3])创建一个免费的帐号,然后使用其提供的认证信息。 ### 5. 启动Discourse应用 ### @@ -110,35 +110,39 @@ docker安装包在Ubuntu的仓库里面是可用的,所以我们将会使用ap 上述命令可能会花去几分钟时间,会自动配置我们的Discourse环境。然后,该进程完成后,我们需要运行下面的命令启动Discourse App - #./launch start app + #./launcher start app ![Starting Discourse](http://blog.linoxide.com/wp-content/uploads/2015/04/starting-discourse.png) +如果一切都正常,我们就能使用惯用的浏览器来访问我们新鲜出炉的 Discourse 的 Web 界面了: http://ip-address/ or http://discourse.linoxide.com/ 。然后,我们就可以创建一个新账号并成为管理员。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/04/Discourse-web-interface.png) + ### 维护 ### -这里往下是/var/discourse/目录里加载命令的使用,这使得我们可以承担维护的任务,通过Docker 容器控制Disourse。(这里不太明白原文表达意思) +这里往下是/var/discourse/目录里的 launcher 命令的用法,它可以用于我们在Docker 容器里面控制和维护Disourse。 - Usage: launcher COMMAND CONFIG [--skip-prereqs] - Commands: - start: Start/initialize a container - stop: Stop a running container - restart: Restart a container - destroy: Stop and remove a container - enter: Use nsenter to enter a container - ssh: Start a bash shell in a running container - logs: Docker logs for container - mailtest: Test the mail settings in a container - bootstrap: Bootstrap a container for the config based on a template - rebuild: Rebuild a container (destroy old, bootstrap, start new) - cleanup: Remove all containers that have stopped for > 24 hours + 用法: launcher 命令 配置 [--skip-prereqs] + 命令: + start: 启动/初始化一个容器 + stop: 停止一个运行的容器 + restart: 重启一个容器 + destroy:停止并删除一个容器 + enter: 使用 nsenter 进入容器 + ssh: 在一个运行的容器中启动一个 bash shell + logs: 容器的 Docker l日志 + mailtest: 在容器中测试邮件设置 + bootstrap: 基于配置模版来引导一个容器 + rebuild: 重建一个容器(摧毁旧的,初始化,启动新的) + cleanup: 清理所有停止了24小时以上的容器 - Options: - --skip-prereqs Don't check prerequisites - --docker-args Extra arguments to pass when running docker + 选项: + --skip-prereqs 不检查前置需求 + --docker-args 当运行 docker 时,展开并传入参数 ### 总结 ### -Hurray!我们已经成功使用Docker技术安装了Discourse。Docker技术使得Discourse十分容易安装在任何平台,并且包含所有的要求。我们需要自己的邮件服务器或者邮件服务器的证书来启动它。对于便捷的现代邮件列表,论坛来说,Discourse是一个伟大的平台。(最后这句有些别扭) +哈哈!我们已经成功使用Docker技术安装了Discourse。Docker技术使得Discourse十分容易安装在任何平台,并且包含所有的要求。我们需要自己的邮件服务器或者邮件服务器的证书来启动它。对于便捷的现代邮件列表,论坛来说,Discourse是一个伟大的平台。(最后这句有些别扭) -------------------------------------------------------------------------------- @@ -146,7 +150,7 @@ via: http://linoxide.com/how-tos/install-discourse-docker-container/ 作者:[Arun Pyasi][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1b9dad63917ac0230a59a10103cb3e9e6d1453ab Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 5 Jun 2015 22:32:20 +0800 Subject: [PATCH 1069/2517] translated --- ...4 How to access SQLite database in Perl.md | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) rename {sources => translated}/tech/20150604 How to access SQLite database in Perl.md (70%) diff --git a/sources/tech/20150604 How to access SQLite database in Perl.md b/translated/tech/20150604 How to access SQLite database in Perl.md similarity index 70% rename from sources/tech/20150604 How to access SQLite database in Perl.md rename to translated/tech/20150604 How to access SQLite database in Perl.md index 0e0723c219..76cc1f01f0 100644 --- a/sources/tech/20150604 How to access SQLite database in Perl.md +++ b/translated/tech/20150604 How to access SQLite database in Perl.md @@ -1,31 +1,29 @@ -Translating---geekpi - -How to access SQLite database in Perl +如何用Perl访问SQLite数据库 ================================================================================ -SQLite is a zero-configuration, server-less, file-based transactional database system. Due to its lightweight, self-contained, and compact design, SQLite is an extremely popular choice when you want to integrate a database into your application. In this post, I am going to show you how to create and access a SQLite database in Perl script. The Perl code snippet I present is fully functional, so you can easily modify and integrate it into your project. +SQLite是一个零配置,无服务端,基于文件的事务文件系统。由于它的轻量级,自包含和紧凑的设计,所以当你想要集成数据库到你的程序中时,SQLite是一个非常流行的选择。在这篇文章中,我会展示如何用Perl脚本来创建和访问SQLite数据库。我演示的Perl代码片段是完整的,所以你可以很简单地修改并集成到你的项目中。 ![](https://farm1.staticflickr.com/552/18444614631_9e7fce8243_c.jpg) -### Preparation for SQLite Access ### +### 访问SQLite的准备 ### -I am going to use SQLite DBI Perl driver to connect to SQLite3. Thus you need to install it (along with SQLite3) on your Linux system. +我会使用SQLite DBI Perl驱动来连接到SQLite3。因此你需要在Linux中安装它(和SQLite3一起)。 -**Debian, Ubuntu or Linux Mint** +**Debian、 Ubuntu 或者 Linux Mint** $ sudo apt-get install sqlite3 libdbd-sqlite3-perl -**CentOS, Fedora or RHEL** +**CentOS、 Fedora 或者 RHEL** $ sudo yum install sqlite perl-DBD-SQLite -After installation, you can check if the SQLite driver is indeed available by using the following script. +安装后,你可以检查SQLite驱动可以通过下面的脚本访问到。 #!/usr/bin/perl my @drv = DBI->available_drivers(); print join("\n", @drv), "\n"; -If you run the script, you should see SQLite in the output. +如果你运行脚本,你应该会看见下面的输出。 DBM ExampleP @@ -35,16 +33,16 @@ If you run the script, you should see SQLite in the output. SQLite Sponge -### Perl SQLite Access Example ### +### Perl SQLite 访问示例 ### -Here is the full-blown Perl code example of SQLite access. This Perl script will demonstrate the following SQLite database management routines. +下面就是Perl访问SQLite的示例。这个Perl脚本会演示下面这些SQLite数据库的常规管理。 -- Create and connect to a SQLite database. -- Create a new table in a SQLite database. -- Insert rows into a table. -- Search and iterate rows in a table. -- Update rows in a table. -- Delete rows in a table. +- 创建和连接SQLite数据库 +- 在SQLite数据库中创建新表 +- 在表中插入行 +- 在表中搜索和迭代行 +- 在表中更新行 +- 在表中删除行 use DBI; use strict; @@ -130,7 +128,7 @@ Here is the full-blown Perl code example of SQLite access. This Perl script will $dbh->disconnect(); print STDERR "Exit the database\n"; -A successful run of the above Perl script will create a SQLite database file named "xmodulo.db", and show the following output. +上面的Perl脚本运行成功后会创建一个叫“xmodulo.db”的数据库文件,并会有下面的输出。 Database opened successfully Table created successfully @@ -153,9 +151,9 @@ A successful run of the above Perl script will create a SQLite database file nam A total of 1 rows deleted Exit the database -### Troubleshooting ### +### 错误定位 ### -If you attempt to access SQLite in Perl without installing SQLite DBI driver, you will encounter the following error. You must install DBI driver as describe at the beginning to fix this error. +如果你尝试没有安装SQLite DBI驱动的情况下使用Perl访问SQLite的话,你会遇到下面的错误。你必须按开始说的安装DBI驱动。 Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./script.pl line 3. BEGIN failed--compilation aborted at ./script.pl line 3. @@ -165,9 +163,9 @@ If you attempt to access SQLite in Perl without installing SQLite DBI driver, yo via: http://xmodulo.com/access-sqlite-database-perl.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://xmodulo.com/author/nanni \ No newline at end of file +[a]:http://xmodulo.com/author/nanni From 2fcfc3c8bbe67e952fc710af3e6a9237221f662d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 6 Jun 2015 08:27:55 +0800 Subject: [PATCH 1070/2517] PUB:20150126 Installing Cisco Packet tracer in Linux @GOLinux --- ...Installing Cisco Packet tracer in Linux.md | 52 ++++++++----------- 1 file changed, 21 insertions(+), 31 deletions(-) rename {translated/tech => published}/20150126 Installing Cisco Packet tracer in Linux.md (75%) diff --git a/translated/tech/20150126 Installing Cisco Packet tracer in Linux.md b/published/20150126 Installing Cisco Packet tracer in Linux.md similarity index 75% rename from translated/tech/20150126 Installing Cisco Packet tracer in Linux.md rename to published/20150126 Installing Cisco Packet tracer in Linux.md index e37d8c6b94..578f65f756 100644 --- a/translated/tech/20150126 Installing Cisco Packet tracer in Linux.md +++ b/published/20150126 Installing Cisco Packet tracer in Linux.md @@ -1,10 +1,10 @@ Linux中安装Cisco Packet Tracer ================================================================================ -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Main_picture.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/Main_picture.png) ### Cisco Packet tracer是什么? ### -**Cisco Packet Tracer**是一个强大的网络模拟工具,用于进行Cisco认证时的训练。它为我们提供了各个路由器和网络设备的良好的接口视图,这些模拟设备带有很多选项,跟使用物理机一样,我们可以在网络中使用无限的设备。我们能在单个工程中创建多个网络,以获得专业化的训练。Packet Tracer将提供给我们模拟的应用层协议,如**HTTP**,**DNS**,以及像**RIP**,**OSPF**,**EIGRP**等路由协议。 +**Cisco Packet Tracer**是一个强大的网络模拟工具,用于进行Cisco认证时的培训。它为我们提供了各个路由器和网络设备的良好的接口视图,这些模拟设备带有很多选项,跟使用物理机一样,我们可以在网络中使用无限的设备。我们能在单个工程中创建多个网络,以获得专业化的训练。Packet Tracer将提供给我们模拟的应用层协议,如**HTTP**,**DNS**,以及像**RIP**,**OSPF**,**EIGRP**等路由协议。 现在,它发布了包含有**ASA 5505防火墙**命令行配置的版本。Packet Tracer通常用于Windows版本,但没有Linux版本。这里,我们可以下载并安装Cisco Packet Tracer。 @@ -26,7 +26,7 @@ Linux中安装Cisco Packet Tracer # lsb_release -a -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_001.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_001.png) ### 步骤 1: 首先,我们需要下载Cisco Packet Tracer。 ### @@ -38,17 +38,17 @@ Linux中安装Cisco Packet Tracer [下载Cisco Packet Tracer 6.1.1][2] -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_002.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_002.png) ### 步骤 2: 安装Java: ### -要安装Packet Tracer,我们需要安装java。要安装java,我们可以使用默认的仓库,或者添加PPA仓库,然后更新包缓存来安装java。 +要安装Packet Tracer,我们需要安装java。我们可以使用默认的仓库安装java;或者添加PPA仓库,然后更新包缓存来安装java。 使用以下命令来安装默认的jre # sudo apt-get install default-jre -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_003.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_003.png) (或者) @@ -57,18 +57,13 @@ Linux中安装Cisco Packet Tracer 从官方站点下载Java:[下载Java][3] # tar -zxvf jre-8u31-linux-x64.tar.gz - # sudo mkdir -p /usr/lib/jvm - # sudo mv -v jre1.8.0_31 /usr/lib/jvm/ - # cd /usr/lib/jvm/ - # sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.8.0_31/bin/java" 1 - # sudo update-alternatives --set "java" "/usr/lib/jvm/jre1.8.0_31/bin/java" -通过编辑用户参数文件来设置Java环境,并添加位置参数。当我们添加进用户参数文件后,我们机器上的每个用户都可以用java了。 +通过编辑用户参数文件来设置Java环境,并添加路径相关的参数。当我们添加进用户参数文件后,我们机器上的每个用户都可以用java了。 # sudo vi /etc/profile @@ -84,27 +79,24 @@ Linux中安装Cisco Packet Tracer 检查Java版本和环境: # echo $JAVA_HOME - # java -version -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_004.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_004.png) ### 步骤 3: 启用32位架构支持: ### -对于Packet Tracer,我们需要一系32位包。要安装32位包,我们需要使用以下命令来安装一些依赖。 +对于Packet Tracer,我们需要一些32位包。要安装32位包,我们需要使用以下命令来安装一些依赖。 # sudo dpkg --add-architecture i386 # sudo apt-get update -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_005.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_005.png) # sudo apt-get install libc6:i386 - # sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 - # sudo apt-get install libnss3-1d:i386 libqt4-qt3support:i386 libssl1.0.0:i386 libqtwebkit4:i386 libqt4-scripttools:i386 -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_006.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_006.png) ### 步骤 4: 解压并安装软件包: ### @@ -114,7 +106,7 @@ Linux中安装Cisco Packet Tracer # tar -zxvf Cisco_Packet_tracer.tar.gz -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_007.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_007.png) 导航到解压后的目录 @@ -124,27 +116,25 @@ Linux中安装Cisco Packet Tracer # sudo ./install -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_008.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_008.png) -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_009.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_009.png) 要使用Packet Tracer工作,我们需要设置环境,Cisco已经提供了环境脚本,我们需要以root用户来运行该脚本以设置环境变量。 # sudo ./set_ptenv.sh -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_010.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_010.png) 安装到此结束。接下来,我们需要为Packet Tracer创建桌面图标。 通过创建下面的桌面文件来创建桌面图标。 # sudo su - # cd /usr/share/applications - # sudo vim packettracer.desktop -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_011.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_011.png) 使用vim编辑器或你喜爱的那个编辑器来添加以下内容到文件。 @@ -158,9 +148,9 @@ Linux中安装Cisco Packet Tracer Terminal=false Type=Application -使用wq!来保存并退出。 +使用wq!来保存并退出vim。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_012.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_012.png) ### 步骤 5: 运行Packet Tracer ### @@ -168,9 +158,9 @@ Linux中安装Cisco Packet Tracer 好了,我们已经成功将Packet Tracer安装到Linux中。上述安装步骤适用于所有基于Debian的Linux发行版。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_013.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_013.png) -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/pkt_014.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/pkt_014.png) ### 资源 ### @@ -186,7 +176,7 @@ via: http://www.unixmen.com/installing-cisco-packet-tracer-linux/ 作者:[babin][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 8ca4ea99c84e947ea54919b18e40757e67e2fab3 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 6 Jun 2015 08:56:59 +0800 Subject: [PATCH 1071/2517] PUB:20150126 iptraf--A TCP or UDP Network Monitoring Utility @GOLinux --- ...A TCP or UDP Network Monitoring Utility.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) rename {translated/tech => published}/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md (59%) diff --git a/translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/published/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md similarity index 59% rename from translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md rename to published/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md index 5f808b562a..31d432f445 100644 --- a/translated/tech/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md +++ b/published/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md @@ -1,32 +1,32 @@ iptraf:TCP/UDP网络监控工具 ================================================================================ -[iptraf][1]是一个基于ncurses的IP局域网监控工具,它可以生成各种网络统计数据,包括TCP信息、UDP统计、ICMP和OSPF信息、以太网负载信息、节点统计、IP校验和错误和其它一些信息。 +[iptraf][1]是一个基于ncurses开发的IP局域网监控工具,它可以生成各种网络统计数据,包括TCP信息、UDP统计、ICMP和OSPF信息、以太网负载信息、节点统计、IP校验和错误和其它一些信息。 -它基于ncurses的用户界面也会保存来自命令行切换记忆的用户。 +它基于ncurses的用户界面也会把使用者从命令行选项的梦靥中拯救出来。 ### 功能 ### -- 一个用于显示通过网络的IP流量信息的IP流量监控器,包括TCP标识信息、包河字节统计、ICMP详情、OSPF包类型 +- 一个用于显示通过网络的IP流量信息的IP流量监控器,包括TCP标识信息、包和字节统计、ICMP详情、OSPF包类型 - 显示IP、TCP、UDP、ICMP、非IP和其它IP包计数、IP校验和错误、接口活动、包大小计数的综合详细的接口统计数据 -- 一个用于显示流入和流出包常用TCP和UDP应用端口的TCP和UDP服务监控器 +- 一个用于计数常用TCP和UDP应用端口的流入和流出包的TCP和UDP服务监控器 - 一个用于发现活动主机和显示这些活动主机的数据活动的局域网统计模块 -- TCP、UDP和其它协议的显示过滤器,允许你查看你做感兴趣的通信 +- TCP、UDP和其它协议的显示过滤器,允许你查看你做感兴趣的流量 - 日志记录 - 支持以太网、FDDI、ISDN、SLIP、PPP和回环接口类型 - 利用Linux内核内建的原生套接口界面,可以用于大范围支持的网卡 - 全屏、菜单驱动操作 -要安装 +###要安装### -### Ubuntu及其衍生版 ### +**Ubuntu及其衍生版** sudo apt-get install iptraf -### Arch Linux及其衍生版 ### +**Arch Linux及其衍生版** sudo pacman -S iptra -### Fedora及其衍生版 ### +**Fedora及其衍生版** sudo yum install iptraf @@ -34,21 +34,21 @@ iptraf:TCP/UDP网络监控工具 如果**iptraf**命令不带任何命令行选项执行,该程序就会以交互模式显现,可以通过主菜单获得各种各样的工具。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_1.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/iptraf_1.png) 易于导航的菜单。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_2.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/iptraf_2.png) 选择监控的接口。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_3.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/iptraf_3.png) -来自**ppp0**接口的通信 +来自**ppp0**接口的流量 -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/iptraf_4.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/iptraf_4.png) -好好乐一把吧! +希望你喜欢。 -------------------------------------------------------------------------------- @@ -56,7 +56,7 @@ via: http://www.unixmen.com/iptraf-tcpudp-network-monitoring-utility/ 作者:[Enock Seth Nyamador][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6a6ff44aeba7efce6daffb73745566ca1ee2aef6 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 6 Jun 2015 09:29:08 +0800 Subject: [PATCH 1072/2517] PUB:20150416 Linux Network Statistics Tools or Commands @ictlyh --- ...0150416 Linux Network Statistics Tools or Commands.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150416 Linux Network Statistics Tools or Commands.md (98%) diff --git a/translated/tech/20150416 Linux Network Statistics Tools or Commands.md b/published/20150416 Linux Network Statistics Tools or Commands.md similarity index 98% rename from translated/tech/20150416 Linux Network Statistics Tools or Commands.md rename to published/20150416 Linux Network Statistics Tools or Commands.md index 1dcad55baf..e4ce5db81d 100644 --- a/translated/tech/20150416 Linux Network Statistics Tools or Commands.md +++ b/published/20150416 Linux Network Statistics Tools or Commands.md @@ -72,7 +72,7 @@ Linux网络统计工具/命令 查看[ss 命令教程][1] 获取更多信息。 -### netstat 命令 : 显示套接字信息的旧的好工具 ### +### netstat 命令 : 不错的显示套接字信息的旧工具 ### 查看所有网络端口以及汇总信息表,输入: @@ -268,6 +268,7 @@ Linux网络统计工具/命令 ### sar 命令: 显示网络统计信息 ### 输入以下命令 (你需要 [通过sysstat包安装并启用sar][3]): + sar -n DEV Linux 2.6.32-220.2.1.el6.x86_64 (www.cyberciti.biz) Tuesday 13 March 2012 _x86_64_ (2 CPU) @@ -345,11 +346,11 @@ via: http://www.cyberciti.biz/faq/network-statistics-tools-rhel-centos-debian-li 作者:[nixCraft][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.cyberciti.biz/tips/about-us -[1]:http://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html -[2]:http://www.cyberciti.biz/tips/netstat-command-tutorial-examples.html +[1]:https://linux.cn/article-4372-1.html +[2]:https://linux.cn/article-2434-1.html [3]:http://www.cyberciti.biz/tips/identifying-linux-bottlenecks-sar-graphs-with-ksar.html \ No newline at end of file From 33f4509c815b9cbc90f6a8d82333c6a48b5c888e Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 6 Jun 2015 09:57:57 +0800 Subject: [PATCH 1073/2517] PUB:20150423 20 Awesome Docker Containers for a Desktop User @goreliu --- ...me Docker Containers for a Desktop User.md | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) rename {translated/tech => published}/20150423 20 Awesome Docker Containers for a Desktop User.md (68%) diff --git a/translated/tech/20150423 20 Awesome Docker Containers for a Desktop User.md b/published/20150423 20 Awesome Docker Containers for a Desktop User.md similarity index 68% rename from translated/tech/20150423 20 Awesome Docker Containers for a Desktop User.md rename to published/20150423 20 Awesome Docker Containers for a Desktop User.md index 055c1eb9b5..a0ef45f433 100644 --- a/translated/tech/20150423 20 Awesome Docker Containers for a Desktop User.md +++ b/published/20150423 20 Awesome Docker Containers for a Desktop User.md @@ -1,12 +1,13 @@ -20个为桌面用户准备的令人惊叹的Docker容器 +20个令人惊叹的桌面Docker容器 ================================================================================ -大家好,今天我们会列出一些很棒的运行在Docker容器中的桌面软件,我们可以在自己的桌面系统中运行它们。Docker是一个开源的项目,它提供可以将应用程序作为一个轻量级容器来打包、传送和运行的开放平台。它没有语言支持、框架或打包系统的限制,可以运行在任何地方,从小型的家用电脑到高端的服务器。它可以使部署和扩展web应用程序、数据库和后端服务像搭积木一样容易,而不依赖特定技术栈或提供商。它主要是由开发、运维工程师使用的,因为它简单、快速和方便,可以用来测试和辅助开发他们产品,但是我们也可以在桌面环境使用Docker,这样一些桌面程序可以开箱即用。 + +大家好,今天我们会列出一些运行在Docker容器中的很棒的桌面软件,我们可以在自己的桌面系统中运行它们。Docker 是一个开源项目,提供了一个可以打包、装载和运行任何应用的轻量级容器的开放平台。它没有语言支持、框架和打包系统的限制,从小型的家用电脑到高端服务器,在何时何地都可以运行。它可以使部署和扩展web应用程序、数据库和后端服务像搭积木一样容易,而不依赖特定技术栈或提供商。它主要是由开发、运维工程师使用的,因为它简单、快速和方便,可以用来测试和辅助开发他们产品,但是我们也可以在桌面环境使用Docker,这样一些桌面程序可以开箱即用。 下边是20个非常棒的桌面软件docker镜像,我们可以使用Docker来运行。 ### 1. Lynx ### -Lynx是一个一直以来最受欢迎的文本界面网页浏览器,它对多数Linux用户来说都很熟悉。它应该是现在还在日常和开发环境中被使用的最古老的网页浏览器了。可以使用如下命令运行Lync。 +Lynx是一个一直以来最受欢迎的文本界面网页浏览器,很多Linux用户都很熟悉它。它应该是现在还在日常和开发环境中被使用的最古老的网页浏览器了。可以使用如下命令运行Lync。 $ docker run -it \ --name lynx \ @@ -39,7 +40,7 @@ Chrome是一个令人惊叹的图形界面网页浏览器,由Google开发, ### 4. Tor浏览器 ### -Tor浏览器是一个支持匿名访问的网页浏览器。它让我们可以自由地在网络世界遨游,或者浏览被特定组织或者网络服务提供商封锁的网站。它会阻止有人通过监视我们的网络连接来窃取我们在网络上的一举一动以及我们的确切位置。运行如下命令运行Tor浏览器。 +Tor浏览器是一个支持匿名访问的网页浏览器。它让我们可以自由地在网络世界遨游,或者浏览被特定组织或者网络服务提供商封锁的网站。它会阻止别人通过监视我们的网络连接来窃取我们在网络上的一举一动以及我们的确切位置。运行如下命令运行Tor浏览器。 $ docker run -it \ -v /tmp/.X11-unix:/tmp/.X11-unix \ @@ -50,7 +51,7 @@ Tor浏览器是一个支持匿名访问的网页浏览器。它让我们可以 ### 5. Firefox浏览器 ### -Firefox浏览器是一个自由并且开源的网页浏览器,它由Mozilla基金会开发。它使用Gecko和SpiderMonkey引擎。Firefox浏览器有很多新特性,并且它以性能和安全性著称。 +Firefox浏览器是一个自由开源的网页浏览器,它由Mozilla基金会开发。它使用Gecko和SpiderMonkey引擎。Firefox浏览器有很多新特性,并且它以性能和安全性著称。 $ docker run -d \ --name firefox \ @@ -71,12 +72,12 @@ Rainbow Stream是一个文本界面的Twitter客户端,有实时显示tweetstr ### 7. Gparted ### -Gparted是一个用来给磁盘分区的开源软件。现在可以在Docker容器里享受分区的乐趣。可以使用如下命令运行gparted。 +Gparted是一个用来给磁盘分区的开源软件。现在可以在Docker容器里享受分区的乐趣了。可以使用如下命令运行gparted。 $ docker run -it \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e DISPLAY=unix$DISPLAY \ - --device /dev/sda:/dev/sda \ # mount the device to partition + --device /dev/sda:/dev/sda \ # 将设备挂载为分区 --name gparted \ jess/gparted @@ -91,7 +92,7 @@ GIMP(Gnu Image Manipulation Program)是一个令人惊叹的Linux图片编 ### 9. Thunderbird ### -Thunderbird是一个自由并且开源的电子邮件软件,它由Mozilla基金会开发和维护。它有众多一个电子邮件软件应该具有的功能。Thunderbird非常易于安装和定制。使用如下命令在Docker中运行Thunderbird。 +Thunderbird是一个自由开源的电子邮件软件,它由Mozilla基金会开发和维护。它有众多一个电子邮件软件应该具有的功能。Thunderbird非常易于安装和定制。使用如下命令在Docker中运行Thunderbird。 $ docker run -d \ -e DISPLAY \ @@ -102,7 +103,7 @@ Thunderbird是一个自由并且开源的电子邮件软件,它由Mozilla基 ### 10. Mutt ### -Mutt是一个文本界面的电子邮件客户端,有很多很酷的功能,如颜色支持,IMAP、POP3、SMTP支持,邮件存储支持等。 使用如下命令运行Mutt。 +Mutt是一个文本界面的电子邮件客户端,有很多很酷的功能,如彩色支持,IMAP、POP3、SMTP支持,邮件存储支持等。 使用如下命令运行Mutt。 $ docker run -it \ -v /etc/localtime:/etc/localtime \ @@ -114,7 +115,7 @@ Mutt是一个文本界面的电子邮件客户端,有很多很酷的功能, ### 11. Skype ### -Skype是一个支持文字、语音和视频的即时通讯软件,它不是开源的,但在Linux下可以很棒地运行。我们同样可以在Docker中运行Skype,使用如下命令。 +Skype是一个支持文字、语音和视频的即时通讯软件,它不是开源的,但在Linux下可以运行的很好。我们同样可以在Docker中运行Skype,使用如下命令。 $ docker run -it \ -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ @@ -124,7 +125,7 @@ Skype是一个支持文字、语音和视频的即时通讯软件,它不是开 ### 12. Cathode ### -Cathode是一个漂亮并且高度可定制的终端模拟器,灵感来自经典的计算机。使用如下命令运行Cathode。 +Cathode是一个漂亮并且高度可定制的终端模拟器,灵感来自古典计算机。使用如下命令运行Cathode。 $ docker run -it \ -v /tmp/.X11-unix:/tmp/.X11-unix \ @@ -134,7 +135,8 @@ Cathode是一个漂亮并且高度可定制的终端模拟器,灵感来自经 ### 13. LibreOffice ### -LibreOffice是一个功能强大的办公套件,它是自由和开源的,现在由The Document基金会维护。它有干净的界面和强大的功能,让我们释放创造力和提升生产力。LibreOffice将数个应用程序集成在一起,是市面上最强大的自由并且开源的办公套件。 +LibreOffice是一个功能强大的办公套件,它是自由开源的,现在由The Document基金会维护。它有干净的界面和强大的功能,让我们释放创造力和提升生产力。LibreOffice将数个应用程序集成在一起,是市面上最强大的自由并且开源的办公套件。 + $docker run \ -v $HOME/Documents:/home/libreoffice/Documents:rw \ -v /tmp/.X11-unix:/tmp/.X11-unix \ @@ -155,7 +157,7 @@ Spotify可以即时访问数百万的歌曲,从经典老歌到最新单曲。 ### 15. Audacity ### -Audacity是一个自由并且开源的跨平台软件,用来录制和编辑音频。Audacity可以用来做所有类型音频(例如podcast)的后期处理,如归一化、调整、淡入淡出。使用如下命令来运行Audacity。 +Audacity是一个自由开源的跨平台软件,用来录制和编辑音频。Audacity可以用来做所有类型音频(例如podcast)的后期处理,如归一化、调整、淡入淡出。使用如下命令来运行Audacity。 $ docker run --rm \ -u $(id -u):$(id -g) \ @@ -178,7 +180,7 @@ Eclipse是一个集成开发环境。它包含基本的工作区和用来定制 ### 17. VLC媒体播放器 ### -VLC是一个自由并且开源的跨平台多媒体播放器,可以播放本地文件、DVD、CD、VCD和各种流媒体。VLC由VideoLAN组织开发和维护。使用如下命令运行VLC。 +VLC是一个自由开源的跨平台多媒体播放器,可以播放本地文件、DVD、CD、VCD和各种流媒体。VLC由VideoLAN组织开发和维护。使用如下命令运行VLC。 $ docker run -v\ $HOME/Documents:/home/vlc/Documents:rw \ @@ -196,7 +198,7 @@ Vim是一个高度可配置的文本界面文字编辑器,为高效的文本 ### 19. Inkscape ### -Inkscape是一个自由并且开源的矢量图形编辑器。它可以创建、编辑矢量图形,如插图、图示、线条艺术、图表、徽标以及更复杂的绘画。Inkscape使用的主要矢量图形格式是SVG 1.1版本。它也可以导入和导出一些其他的格式,但实际编辑使用的还是SVG格式。 +Inkscape是一个自由开源的矢量图形编辑器。它可以创建、编辑矢量图形,如插图、图示、线条艺术、图表、徽标以及更复杂的绘画。Inkscape使用的主要矢量图形格式是SVG 1.1版本。它也可以导入和导出一些其他的格式,但实际编辑使用的还是SVG格式。 $docker build -t rasch/inkscape --rm . $ docker run --rm -e DISPLAY \ @@ -207,7 +209,7 @@ Inkscape是一个自由并且开源的矢量图形编辑器。它可以创建、 ### 20. Filezilla ### -Filezilla是一个自由的FTP解决方案,支持FTP、SFTP、FTPS协议。它的客户端是一个功能强大的文件管理工具。它是一个很棒的高度可靠和易用的开源FTP解决方案。 +Filezilla是一个免费的FTP解决方案,支持FTP、SFTP、FTPS协议。它的客户端是一个功能强大的文件管理工具。它是一个很棒的高度可靠和易用的开源FTP解决方案。 $ xhost +si:localuser:$(whoami) $ docker run \ @@ -229,7 +231,7 @@ via: http://linoxide.com/how-tos/20-docker-containers-desktop-user/ 作者:[Arun Pyasi][a] 译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 677195d81f47839d63f372ccee9331b4a675b81b Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sat, 6 Jun 2015 09:58:44 +0800 Subject: [PATCH 1074/2517] translating wi-cuckoo --- .../20150604 12 Globally Recognized Linux Certifications.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150604 12 Globally Recognized Linux Certifications.md b/sources/share/20150604 12 Globally Recognized Linux Certifications.md index 714ff31fea..4ec185770b 100644 --- a/sources/share/20150604 12 Globally Recognized Linux Certifications.md +++ b/sources/share/20150604 12 Globally Recognized Linux Certifications.md @@ -1,3 +1,4 @@ +translating wi-cuckoo 12 Globally Recognized Linux Certifications ================================================================================ Hi everyone, today we'll learn about some of the very precious globally recognized Linux Certifications. Linux Certifications are the certification programme hosted by different Linux Professional Institutes across the globe. Linux Certifications allows Linux Professionals to get easily enrolled with the Linux related jobs in servers, companies, etc. Linux Certifications enables how much a person is expertise in that respective field of Linux. There are pretty many Linux Professional Institutes providing different Linux Certifications. But there are some few well recognized Linux Certification Programmes running across the globe which are at high priority while getting a job in companies where we need to manage servers, virtualizations, installations, configurations, application support and other stuffs with Linux Operating System. With the increment of servers running Linux Operating System throughout the globe, the demand of Linux Professional are increasing. For better authenticated and authorized Linux Professional, better and renowned Certifications are always at higher priority by the companies across the globe. @@ -169,4 +170,4 @@ via: http://linoxide.com/linux-how-to/12-globally-recognized-linux-certification 本文由 [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 9b880e94b4244b36730a1c602ce1e98b6c62d06c Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Sat, 6 Jun 2015 10:19:27 +0800 Subject: [PATCH 1075/2517] finish translation --- ...ng Mod_Security and Mod_evasive Modules.md | 272 ------------------ ...ng Mod_Security and Mod_evasive Modules.md | 271 +++++++++++++++++ 2 files changed, 271 insertions(+), 272 deletions(-) delete mode 100644 sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md create mode 100644 translated/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md diff --git a/sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md b/sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md deleted file mode 100644 index 325aad1068..0000000000 --- a/sources/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md +++ /dev/null @@ -1,272 +0,0 @@ -translating by wwy-hust - -Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules -================================================================================ -For those of you in the hosting business, or if you’re hosting your own servers and exposing them to the Internet, securing your systems against attackers must be a high priority. - -mod_security (an open source intrusion detection and prevention engine for web applications that integrates seamlessly with the web server) and mod_evasive are two very important tools that can be used to protect a web server against brute force or (D)DoS attacks. - -mod_evasive, as its name suggests, provides evasive capabilities while under attack, acting as an umbrella that shields web servers from such threats. - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Install-Mod_Security-Mod_evasive-in-CentOS.jpg) -Install Mod_Security and Mod_Evasive to Protect Apache - -In this article we will discuss how to install, configure, and put them into play along with Apache on RHEL/CentOS 6 and 7 as well as Fedora 21-15. In addition, we will simulate attacks in order to verify that the server reacts accordingly. - -This assumes that you have a LAMP server installed on your system. If not, please check this article before proceeding further. - -- [Install LAMP stack in RHEL/CentOS 7][1] - -You will also need to setup iptables as the default [firewall][2] front-end instead of firewalld if you’re running RHEL/CentOS 7 or Fedora 21. We do this in order to use the same tool in both RHEL/CentOS 7/6 and Fedora 21. - -### Step 1: Installing Iptables Firewall on RHEL/CentOS 7 and Fedora 21 ### - -To begin, stop and disable firewalld: - - # systemctl stop firewalld - # systemctl disable firewalld - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Disable-Firewalld-Service.png) -Disable Firewalld Service - -Then install the iptables-services package before enabling iptables: - - # yum update && yum install iptables-services - # systemctl enable iptables - # systemctl start iptables - # systemctl status iptables - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Install-Iptables-Firewall.png) -Install Iptables Firewall - -### Step 2: Installing Mod_Security and Mod_evasive ### - -In addition to having a LAMP setup already in place, you will also have to [enable the EPEL repository][3] in RHEL/CentOS 7/6 in order to install both packages. Fedora users don’t need to enable any repo, because epel is a already part of Fedora project. - - # yum update && yum install mod_security mod_evasive - -When the installation is complete, you will find the configuration files for both tools in /etc/httpd/conf.d. - - # ls -l /etc/httpd/conf.d - -![](http://www.tecmint.com/wp-content/uploads/2012/06/mod_security-mod_evasive-Configurations.png) -mod_security + mod_evasive Configurations - -Now, in order to integrate these two modules with Apache and have it load them when it starts, make sure the following lines appear in the top level section of mod_evasive.conf and mod_security.conf, respectively: - - LoadModule evasive20_module modules/mod_evasive24.so - LoadModule security2_module modules/mod_security2.so - -Note that modules/mod_security2.so and modules/mod_evasive24.so are the relative paths, from the /etc/httpd directory to the source file of the module. You can verify this (and change it, if needed) by listing the contents of the /etc/httpd/modules directory: - - # cd /etc/httpd/modules - # pwd - # ls -l | grep -Ei '(evasive|security)' - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Verify-mod_security-mod_evasive-Modules.png) -Verify mod_security + mod_evasive Modules - -Then restart Apache and verify that it loads mod_evasive and mod_security: - - # service httpd restart [On RHEL/CentOS 6 and Fedora 20-18] - # systemctl restart httpd [On RHEL/CentOS 7 and Fedora 21] - ----------- - - [Dump a list of loaded Static and Shared Modules] - - # httpd -M | grep -Ei '(evasive|security)' - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Check-mod_security-mod_evasive-Loaded.png) -Check mod_security + mod_evasive Modules Loaded - -### Step 3: Installing A Core Rule Set and Configuring Mod_Security ### - -In few words, a Core Rule Set (aka CRS) provides the web server with instructions on how to behave under certain conditions. The developer firm of mod_security provide a free CRS called OWASP ([Open Web Application Security Project][4]) ModSecurity CRS that can be downloaded and installed as follows. - -1. Download the OWASP CRS to a directory created for that purpose. - - # mkdir /etc/httpd/crs-tecmint - # cd /etc/httpd/crs-tecmint - # wget https://github.com/SpiderLabs/owasp-modsecurity-crs/tarball/master - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Download-mod_security-Core-Rules.png) -Download mod_security Core Rules - -2. Untar the CRS file and change the name of the directory for one of our convenience. - - # tar xzf master - # mv SpiderLabs-owasp-modsecurity-crs-ebe8790 owasp-modsecurity-crs - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Extract-mod_security-Core-Rules.png) -Extract mod_security Core Rules - -3. Now it’s time to configure mod_security. Copy the sample file with rules (owasp-modsecurity-crs/modsecurity_crs_10_setup.conf.example) into another file without the .example extension: - - # cp modsecurity_crs_10_setup.conf.example modsecurity_crs_10_setup.conf - -and tell Apache to use this file along with the module by inserting the following lines in the web server’s main configuration file /etc/httpd/conf/httpd.conf file. If you chose to unpack the tarball in another directory you will need to edit the paths following the Include directives: - - - Include crs-tecmint/owasp-modsecurity-crs/modsecurity_crs_10_setup.conf - Include crs-tecmint/owasp-modsecurity-crs/base_rules/*.conf - - -Finally, it is recommended that we create our own configuration file within the /etc/httpd/modsecurity.d directory where we will place our customized directives (we will name it tecmint.conf in the following example) instead of modifying the CRS files directly. Doing so will allow for easier upgrading the CRSs as new versions are released. - - - SecRuleEngine On - SecRequestBodyAccess On - SecResponseBodyAccess On - SecResponseBodyMimeType text/plain text/html text/xml application/octet-stream - SecDataDir /tmp - - -You can refer to the [SpiderLabs’ ModSecurity GitHub][5] repository for a complete explanatory guide of mod_security configuration directives. - -### Step 4: Configuring Mod_Evasive ### - -mod_evasive is configured using directives in /etc/httpd/conf.d/mod_evasive.conf. Since there are no rules to update during a package upgrade, we don’t need a separate file to add customized directives, as opposed to mod_security. - -The default mod_evasive.conf file has the following directives enabled (note that this file is heavily commented, so we have stripped out the comments to highlight the configuration directives below): - - - DOSHashTableSize 3097 - DOSPageCount 2 - DOSSiteCount 50 - DOSPageInterval 1 - DOSSiteInterval 1 - DOSBlockingPeriod 10 - - -Explanation of the directives: - -- DOSHashTableSize: This directive specifies the size of the hash table that is used to keep track of activity on a per-IP address basis. Increasing this number will provide a faster look up of the sites that the client has visited in the past, but may impact overall performance if it is set too high. -- DOSPageCount: Legitimate number of identical requests to a specific URI (for example, any file that is being served by Apache) that can be made by a visitor over the DOSPageInterval interval. -- DOSSiteCount: Similar to DOSPageCount, but refers to how many overall requests can be made to the entire site over the DOSSiteInterval interval. -- DOSBlockingPeriod: If a visitor exceeds the limits set by DOSSPageCount or DOSSiteCount, his source IP address will be blacklisted during the DOSBlockingPeriod amount of time. During DOSBlockingPeriod, any requests coming from that IP address will encounter a 403 Forbidden error. - -Feel free to experiment with these values so that your web server will be able to handle the required amount and type of traffic. - -**Only a small caveat**: if these values are not set properly, you run the risk of ending up blocking legitimate visitors. - -You may also want to consider other useful directives: - -#### DOSEmailNotify #### - -If you have a mail server up and running, you can send out warning messages via Apache. Note that you will need to grant the apache user SELinux permission to send emails if SELinux is set to enforcing. You can do so by running - - # setsebool -P httpd_can_sendmail 1 - -Next, add this directive in the mod_evasive.conf file with the rest of the other directives: - - DOSEmailNotify you@yourdomain.com - -If this value is set and your mail server is working properly, an email will be sent to the address specified whenever an IP address becomes blacklisted. - -#### DOSSystemCommand #### - -This needs a valid system command as argument, - - DOSSystemCommand
- -This directive specifies a command to be executed whenever an IP address becomes blacklisted. It is often used in conjunction with a shell script that adds a firewall rule to block further connections coming from that IP address. - -**Write a shell script that handles IP blacklisting at the firewall level** - -When an IP address becomes blacklisted, we need to block future connections coming from it. We will use the following shell script that performs this job. Create a directory named scripts-tecmint (or whatever name of your choice) in /usr/local/bin and a file called ban_ip.sh in that directory. - - #!/bin/sh - # IP that will be blocked, as detected by mod_evasive - IP=$1 - # Full path to iptables - IPTABLES="/sbin/iptables" - # mod_evasive lock directory - MOD_EVASIVE_LOGDIR=/var/log/mod_evasive - # Add the following firewall rule (block all traffic coming from $IP) - $IPTABLES -I INPUT -s $IP -j DROP - # Remove lock file for future checks - rm -f "$MOD_EVASIVE_LOGDIR"/dos-"$IP" - -Our DOSSystemCommand directive should read as follows: - - DOSSystemCommand "sudo /usr/local/bin/scripts-tecmint/ban_ip.sh %s" - -In the line above, %s represents the offending IP as detected by mod_evasive. - -**Add the apache user to the sudoers file** - -Note that all of this just won’t work unless you to give permissions to user apache to run our script (and that script only!) without a terminal and password. As usual, you can just type visudo as root to access the /etc/sudoers file and then add the following 2 lines as shown in the image below: - - apache ALL=NOPASSWD: /usr/local/bin/scripts-tecmint/ban_ip.sh - Defaults:apache !requiretty - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Add-Apache-User-to-Sudoers.png) -Add Apache User to Sudoers - -**IMPORTANT**: As a default security policy, you can only run sudo in a terminal. Since in this case we need to use sudo without a tty, we have to comment out the line that is highlighted in the following image: - - #Defaults requiretty - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Disable-tty-for-Sudo.png) -Disable tty for Sudo - -Finally, restart the web server: - - # service httpd restart [On RHEL/CentOS 6 and Fedora 20-18] - # systemctl restart httpd [On RHEL/CentOS 7 and Fedora 21] - -### Step 4: Simulating an DDoS Attacks on Apache ### - -There are several tools that you can use to simulate an external attack on your server. You can just google for “tools for simulating ddos attacks” to find several of them. - -Note that you, and only you, will be held responsible for the results of your simulation. Do not even think of launching a simulated attack to a server that you’re not hosting within your own network. - -Should you want to do the same with a VPS that is hosted by someone else, you need to appropriately warn your hosting provider or ask permission for such a traffic flood to go through their networks. Tecmint.com is not, by any means, responsible for your acts! - -In addition, launching a simulated DoS attack from only one host does not represent a real life attack. To simulate such, you would need to target your server from several clients at the same time. - -Our test environment is composed of a CentOS 7 server [IP 192.168.0.17] and a Windows host from which we will launch the attack [IP 192.168.0.103]: - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Confirm-Host-IPAddress.png) -Confirm Host IPAddress - -Please play the video below and follow the steps outlined in the indicated order to simulate a simple DoS attack: - -注:youtube视频,发布的时候不行做个链接吧 - - -Then the offending IP is blocked by iptables: - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Blocked-Attacker-IP.png) -Blocked Attacker IP - -### Conclusion ### - -With mod_security and mod_evasive enabled, the simulated attack causes the CPU and RAM to experiment a temporary usage peak for only a couple of seconds before the source IPs are blacklisted and blocked by the firewall. Without these tools, the simulation will surely knock down the server very fast and render it unusable during the duration of the attack. - -We would love to hear if you’re planning on using (or have used in the past) these tools. We always look forward to hearing from you, so don’t hesitate to leave your comments and questions, if any, using the form below. - -### Reference Links ### - -- [https://www.modsecurity.org/][6] -- [http://www.zdziarski.com/blog/?page_id=442][7] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/protect-apache-using-mod_security-and-mod_evasive-on-rhel-centos-fedora/ - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/gacanepa/ -[1]:http://www.tecmint.com/install-lamp-in-centos-7/ -[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ -[3]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ -[4]:https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project -[5]:https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#Configuration_Directives -[6]:https://www.modsecurity.org/ -[7]:http://www.zdziarski.com/blog/?page_id=442 diff --git a/translated/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md b/translated/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md new file mode 100644 index 0000000000..1f645595b7 --- /dev/null +++ b/translated/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md @@ -0,0 +1,271 @@ +在Apache中使用Mod_Security和Mod_evasive来抵御暴力破解和DDos攻击 +================================================================================ +对于那些托管主机或者需要将您的主机暴露在因特网中的人来说,保证您的系统在面对攻击时安全是一个重要的事情。 + +mod_security(一个开源的可以无缝接入Web服务器的用于Web应用入侵检测和防护的引擎)和mod_evasive是两个在服务器端对抗暴力破解和(D)Dos攻击的非常重要的工具。 + +mod_evasive,如它的名字一样,在受攻击时提供避实就虚的功能,它像一个雨伞一样保护Web服务器免受那些威胁。 + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Install-Mod_Security-Mod_evasive-in-CentOS.jpg) + +安装Mod_Security和Mod_Evasive来保护Apache + +在这篇文章中我们将讨论如何安装、配置以及在RHEL/CentOS6、7和Fedora 21-15上将它们整合到Apache。另外,我们会模拟攻击以便验证服务器做出了正确的反应。 + +以上以您的系统中安装有LAMP服务器为基础,所以,如果您没有安装,请先阅读下面链接的文章再开始阅读本文。 + +- [在RHEL/CentOS 7中安装LAMP][1] + +如果您在运行RHEL/CentOS 7或Fedora 21,您还需要安装iptables作为默认[防火墙][2]前端以取代firewalld。这样做是为了在RHEL/CentOS 7或Fedora 21中使用同样的工具。 + +### 步骤 1: 在RHEL/CentOS 7和Fedora 21上安装Iptables防火墙 ### + +用下面的命令停止和禁用firewalld: + + # systemctl stop firewalld + # systemctl disable firewalld + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Disable-Firewalld-Service.png) +禁用firewalld服务 + +接下来在使能iptables之前安装iptables-services包: + + # yum update && yum install iptables-services + # systemctl enable iptables + # systemctl start iptables + # systemctl status iptables + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Install-Iptables-Firewall.png) +安装Iptables防火墙 + +### 步骤 2: 安装Mod_Security和Mod_evasive ### + +另外,在安装LAMP后,您还需要在RHEL/CentOS 7/6中[开启EPEL仓库][3]来安装这两个包。Fedora用户不需要开启这个仓库,因为epel已经是Fedora项目的一部分了。 + + # yum update && yum install mod_security mod_evasive + +当安装结束后,您会在/etc/httpd/conf.d下找到两个工具的配置文件。 + + # ls -l /etc/httpd/conf.d + +![](http://www.tecmint.com/wp-content/uploads/2012/06/mod_security-mod_evasive-Configurations.png) +mod_security + mod_evasive 配置文件 + +现在,为了整合这两个模块到Apache,并在启动时加载它们。请确保下面几行出现在mod_evasive.conf和mod_security.conf的顶层部分,它们分别为: + + LoadModule evasive20_module modules/mod_evasive24.so + LoadModule security2_module modules/mod_security2.so + +请注意modules/mod_security2.so和modules/mod_evasive24.so都是从/etc/httpd到模块源文件的相对路径。您可以通过列出/etc/httpd/modules的内容来验证(如果需要的话,修改它): + + # cd /etc/httpd/modules + # pwd + # ls -l | grep -Ei '(evasive|security)' + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Verify-mod_security-mod_evasive-Modules.png) +验证mod_security + mod_evasive模块 + +接下来重启Apache并且核实它已加载了mod_evasive和mod_security: + + # service httpd restart [在RHEL/CentOS 6和Fedora 20-18上] + # systemctl restart httpd [在RHEL/CentOS 7和Fedora 21上] + +---------- + + [输出已加载的静态模块和动态模块列表] + + # httpd -M | grep -Ei '(evasive|security)' + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Check-mod_security-mod_evasive-Loaded.png) +检查mod_security + mod_evasive模块已加载 + +### 步骤 3: 安装一个核心规则集并且配置Mod_Security ### + +简单来说,一个核心规则集(即CRS)为web服务器提供特定状况下如何反应的指令。mod_security的开发者们提供了一个免费的CRS,叫做OWASP([开放Web应用安全项目])ModSecurity CRS,可以从下面的地址下载和安装。 + +1. 下载OWASP CRS到为之创建的目录 + + # mkdir /etc/httpd/crs-tecmint + # cd /etc/httpd/crs-tecmint + # wget https://github.com/SpiderLabs/owasp-modsecurity-crs/tarball/master + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Download-mod_security-Core-Rules.png) +下载mod_security核心规则 + +2. 解压CRS文件并修改文件夹名称 + + # tar xzf master + # mv SpiderLabs-owasp-modsecurity-crs-ebe8790 owasp-modsecurity-crs + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Extract-mod_security-Core-Rules.png) +解压mod_security核心规则 + +3. 现在,是时候配置mod_security了。将同样的规则文件(owasp-modsecurity-crs/modsecurity_crs_10_setup.conf.example)拷贝至另一个没有.example扩展的文件。 + + # cp modsecurity_crs_10_setup.conf.example modsecurity_crs_10_setup.conf + +并通过将下面的几行插入到web服务器的主配置文件/etc/httpd/conf/httpd.conf来告诉Apache将这个文件和该模块放在一起使用。如果您选择解压打包文件到另一个文件夹,那么您需要修改Include的路径: + + + Include crs-tecmint/owasp-modsecurity-crs/modsecurity_crs_10_setup.conf + Include crs-tecmint/owasp-modsecurity-crs/base_rules/*.conf + + +最后,建议您在/etc/httpd/modsecurity.d目录下创建自己的配置文件,在那里我们可以用我们自定义的文件夹(接下来的示例中,我们会将其命名为tecmint.conf)而无需修改CRS文件的目录。这样做能够在CRSs发布新版本时更加容易的升级。 + + + SecRuleEngine On + SecRequestBodyAccess On + SecResponseBodyAccess On + SecResponseBodyMimeType text/plain text/html text/xml application/octet-stream + SecDataDir /tmp + + +您可以在[SpiderLabs的ModSecurity GitHub][5]仓库中参考关于mod_security目录的更完整的解释。 + +### 步骤 4: 配置Mod_Evasive ### + +mod_evasive被配置为使用/etc/httpd/conf.d/mod_evasive.conf中的指令。与mod_security不同,由于在包升级时没有规则来更新,因此我们不需要独立的文件来添加自定义指令。 + +默认的mod_evasive.conf开启了下列的目录(注意这个文件被详细的注释了,因此我们剔掉了注释以重点显示配置指令): + + + DOSHashTableSize 3097 + DOSPageCount 2 + DOSSiteCount 50 + DOSPageInterval 1 + DOSSiteInterval 1 + DOSBlockingPeriod 10 + + +这些指令的解释: + +- DOSHashTableSize: 这个指令指明了哈希表的大小,它用来追踪基于IP地址的活动。增加这个数字将使查询站点访问历史变得更快,但如果被设置的太高则会影响整体性能。 +- DOSPageCount: 在DOSPageInterval间隔内可由一个用户发起的面向特定的URI(例如,一个Apache托管的文件)的同一个请求的数量。 +- DOSSiteCount: 类似DOSPageCount,但涉及到整个站点总共有多少的请求可以在DOSSiteInterval间隔内被发起。 +- DOSBlockingPeriod: 如果一个用户超过了DOSSPageCount的限制或者DOSSiteCount,他的源IP地址将会在DOSBlockingPeriod期间内被加入黑名单。在DOSBlockingPeriod期间,任何从这个IP地址发起的请求将会遭遇一个403禁止错误。 + +尽可能的试验这些值,以使您的web服务器有能力处理特定大小的负载。 + +**一个小警告**: 如果这些值设置的不合适,则您会蒙受阻挡合法用户的风险。 + +您也许想考虑下其他有用的指令: + +#### DOSEmailNotify #### + +如果您运行有一个邮件服务器,您可以通过Apache发送警告消息。注意,如果SELinux已开启,您需要授权apache用户SELinux的权限来发送email。您可以通过下面的命令来授予权限: + + # setsebool -P httpd_can_sendmail 1 + +接下来,将这个指令和其他指令一起加入到mod_evasive.conf文件。 + + DOSEmailNotify you@yourdomain.com + +如果这个值被合适的设置并且您的邮件服务器在正常的运行,则当一个IP地址被加入黑名单时,会有一封邮件被发送到相应的地址。 + +#### DOSSystemCommand #### + +它需要一个有效的系统命令作为参数, + + DOSSystemCommand
+ +这个指令指定当一个IP地址被加入黑名单时执行的命令。它通常结合shell脚本来使用,在脚本中添加一条防火墙规则来阻挡某个IP进一步的连接。 + +**写一个shell脚本在防火墙阶段处理IP黑名单** + +当一个IP地址被加入黑名单,我们需要阻挡它进一步的连接。我们需要下面的shell脚本来执行这个任务。在/usr/local/bin下创建一个叫做scripts-tecmint的文件夹(或其他的名字),以及一个叫做ban_ip.sh的文件。 + + #!/bin/sh + # 由mod_evasive检测出,将被阻挡的IP地址 + IP=$1 + # iptables的完整路径 + IPTABLES="/sbin/iptables" + # mod_evasive锁文件夹 + MOD_EVASIVE_LOGDIR=/var/log/mod_evasive + # 添加下面的防火墙规则 (阻止所有从$IP流入的流量) + $IPTABLES -I INPUT -s $IP -j DROP + # 为了未来的检测,移除锁文件 + rm -f "$MOD_EVASIVE_LOGDIR"/dos-"$IP" + +我们的DOSSystemCommand指令应该是这样的: + + DOSSystemCommand "sudo /usr/local/bin/scripts-tecmint/ban_ip.sh %s" + +上面一行的%s代表了由mod_evasive检测到的攻击IP地址。 + +**将apache用户添加到sudoers文件** + +请注意,如果您不给予apache用户以无需终端和密码的方式运行我们脚本(关键就是这个脚本)的权限,则这一切都不起作用。通常,您只需要以root权限键入visudo来存取/etc/sudoers文件,接下来添加下面的两行即可: + + apache ALL=NOPASSWD: /usr/local/bin/scripts-tecmint/ban_ip.sh + Defaults:apache !requiretty + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Add-Apache-User-to-Sudoers.png) +添加Apache用户到Sudoers + +**重要**: 作为默认的安全策略,您只能在终端中运行sudo。由于这个时候我们需要在没有tty的时候运行sudo,我们像下面图片中那样必须注释掉下面这一行: + + #Defaults requiretty + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Disable-tty-for-Sudo.png) +为Sudo禁用tty + +最后,重启web服务器: + + # service httpd restart [在RHEL/CentOS 6和Fedora 20-18上] + # systemctl restart httpd [在RHEL/CentOS 7和Fedora 21上] + +### 步骤4: 在Apache上模拟DDos攻击 ### + +有许多工具可以在您的服务器上模拟外部的攻击。您可以google下“tools for simulating ddos attacks”来找一找相关的工具。 + +注意,您(也只有您)将负责您模拟所造成的结果。请不要考虑向不在您网络中的服务器发起模拟攻击。 + +假如您想对一个由别人托管的VPS做这些事情,您需要向您的托管商发送适当的警告或就那样的流量通过他们的网络获得允许。Tecmint.com不会为您的行为负责! + +另外,仅从一个主机发起一个Dos攻击的模拟无法代表真实的攻击。为了模拟真实的攻击,您需要使用许多客户端在同一时间将您的服务器作为目标。 + +我们的测试环境由一个CentOS 7服务器[IP 192.168.0.17]和一个Windows组成,在Windows[IP 192.168.0.103]上我们发起攻击: + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Confirm-Host-IPAddress.png) +确认主机IP地址 + +请播放下面的视频,并跟从列出的步骤来模拟一个Dos攻击: + +注:youtube视频,发布的时候不行做个链接吧 + + +然后攻击者的IP将被iptables阻挡: + +![](http://www.tecmint.com/wp-content/uploads/2012/06/Blocked-Attacker-IP.png) +阻挡攻击者的IP地址 + +### 结论 ### + +在开启mod_security和mod_evasive的情况下,模拟攻击会导致CPU和RAM用量在源IP地址被加入黑名单之前出现短暂几秒的使用峰值。如果没有这些模块,模拟攻击绝对会很快将服务器击溃,并使服务器在攻击期间无法提供服务。 + +我们很高兴听见您打算使用(或已经使用过)这些工具。我们期望得到您的反馈,所以,请在留言处留下您的评价和问题,谢谢! + +### 参考链接 ### + +- [https://www.modsecurity.org/][6] +- [http://www.zdziarski.com/blog/?page_id=442][7] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/protect-apache-using-mod_security-and-mod_evasive-on-rhel-centos-fedora/ + +作者:[Gabriel Cánepa][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/install-lamp-in-centos-7/ +[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ +[3]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[4]:https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project +[5]:https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#Configuration_Directives +[6]:https://www.modsecurity.org/ +[7]:http://www.zdziarski.com/blog/?page_id=442 \ No newline at end of file From 00b8843d6fa2e2b70ba4c1ac0a4974cca4436a0d Mon Sep 17 00:00:00 2001 From: wwy Date: Sat, 6 Jun 2015 12:07:27 +0800 Subject: [PATCH 1076/2517] [Translating] 20141013 Compact Text Editors Great for Remote Editing and Much More.md --- ...mpact Text Editors Great for Remote Editing and Much More.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md index 3cdb43d879..b54a7b158f 100644 --- a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md +++ b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md @@ -1,3 +1,5 @@ +translating by wwy-hust + Compact Text Editors Great for Remote Editing and Much More ================================================================================ A text editor is software used for editing plain text files. This type of software has many different uses including modifying configuration files, writing programming language source code, jotting down thoughts, or even making a grocery list. Given that editors can be used for such a diverse range of activities, it is worth spending the time finding an editor that best suites your preferences. From 6fb54dd45272ed4be32b43d94b87730f5b0cf3de Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 6 Jun 2015 13:42:55 +0800 Subject: [PATCH 1077/2517] translating --- ...u's Juju Now Supports systemd and Google Cloud Platform.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md b/sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md index 6061e78c87..2a3e919291 100644 --- a/sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md +++ b/sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md @@ -1,3 +1,5 @@ +translating---geekpi + Ubuntu's Juju Now Supports systemd and Google Cloud Platform ================================================================================ > The Juju tool has been updated to version 1.23.3 @@ -26,4 +28,4 @@ via: http://linux.softpedia.com/blog/Ubuntu-s-Juju-Now-Supports-systemd-and-Goog [a]:http://news.softpedia.com/editors/browse/marius-nestor [1]:http://insights.ubuntu.com/2015/06/03/juju-support-for-google-cloud-platform/ -[2]:https://jujucharms.com/docs/devel/reference-release-notes \ No newline at end of file +[2]:https://jujucharms.com/docs/devel/reference-release-notes From 5336aba920399d91a1c9bae1b4a231c20e231061 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 6 Jun 2015 14:02:34 +0800 Subject: [PATCH 1078/2517] translated --- ...ports systemd and Google Cloud Platform.md | 31 ------------------- ...ports systemd and Google Cloud Platform.md | 29 +++++++++++++++++ 2 files changed, 29 insertions(+), 31 deletions(-) delete mode 100644 sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md create mode 100644 translated/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md diff --git a/sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md b/sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md deleted file mode 100644 index 2a3e919291..0000000000 --- a/sources/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md +++ /dev/null @@ -1,31 +0,0 @@ -translating---geekpi - -Ubuntu's Juju Now Supports systemd and Google Cloud Platform -================================================================================ -> The Juju tool has been updated to version 1.23.3 - -**Udi Nachmany, Director of Ubuntu Certified Public Cloud at Canonical, announced the release of a new version of Juju, an open-source, solution-driven orchestration tool for Ubuntu Linux.** - -According to the [announcement][1] and the official [release notes][2], Juju 1.23.3 is quite a major version that packs a lot of goodies for those of you who want to scale and manage environments on any cloud without too much hassle. - -Prominent features of Juju 1.23.3 include support for Google Compute Engine (GCE), support for the systemd init system, support for Ubuntu 15.04 (Vivid Vervet), new charm actions, as well as better proxy support for for restrictive networks. - -Additionally, the recently announced Juju release brings a new style restore, new messages, new blocks, and experimental support for Service Leader Elections, as well as addressable LXC containers and KVM instances on Ubuntu MAAS and AWS. - -"On a related note, if you’re using Google Cloud Platform you’ve probably taken a look at the sleek Cloud Launcher Google have released recently. And if you looked closely, you also noticed that you can now spin up your Ubuntu VMs using this very friendly UI," says Udi Nachmany. - -![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-s-Juju-Now-Supports-systemd-and-Google-Cloud-Platform-483279-2.jpg) - --------------------------------------------------------------------------------- - -via: http://linux.softpedia.com/blog/Ubuntu-s-Juju-Now-Supports-systemd-and-Google-Cloud-Platform-483279.shtml - -作者:[Marius Nestor][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/marius-nestor -[1]:http://insights.ubuntu.com/2015/06/03/juju-support-for-google-cloud-platform/ -[2]:https://jujucharms.com/docs/devel/reference-release-notes diff --git a/translated/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md b/translated/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md new file mode 100644 index 0000000000..4ff1fa23a0 --- /dev/null +++ b/translated/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md @@ -0,0 +1,29 @@ +Ubuntu下的Juju现在支持systemd和Google Cloud Platform了 +================================================================================ +> Juju已经更新到1.23.3了 + +**Cononical旗下的Ubuntu认证公共云总监,Udi Nachmany宣布了juju新版本的发布,一个开源的、解决方案驱动的Ubuntu下的协同工具。** + +根据[声明][1]和官方[发布公告][2],Juju 1.23.3是一个非常主流的版本,它打包了那些你想要在云上扩展和管理的包,而没有太多的麻烦。 + +Juju 1.23.3显著的功能是包含了对GCE的支持,支持systemd初始化系统,支持Ubuntu 15.04(Vivid Vervet),新的好玩的功能和对受限网络的支持。 + +另外,juju的发布带来了一个新的恢复、新的消息、新的块和实验性地支持Service Leader Elections,还有Ubuntu MAS和AWS上的可寻址的LXC和KVM。 + +Udi Nachmany说:“在一个相关告示中,如果你正在使用Google云平台,你可能已经注意到了Google最近发布了云启动器。如果你密切关注,你同样注意到你说可以使用这个非常友好的UI来启动你的Ubuntu虚拟机。” + +![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-s-Juju-Now-Supports-systemd-and-Google-Cloud-Platform-483279-2.jpg) + +-------------------------------------------------------------------------------- + +via: http://linux.softpedia.com/blog/Ubuntu-s-Juju-Now-Supports-systemd-and-Google-Cloud-Platform-483279.shtml + +作者:[Marius Nestor][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor +[1]:http://insights.ubuntu.com/2015/06/03/juju-support-for-google-cloud-platform/ +[2]:https://jujucharms.com/docs/devel/reference-release-notes From 3cdf627d6a096ddc3124e210a5c9e7200bdfb3ed Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 6 Jun 2015 14:03:48 +0800 Subject: [PATCH 1079/2517] translating --- ...3 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md b/sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md index a4c5f61104..b9944eeb74 100644 --- a/sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md +++ b/sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md @@ -1,3 +1,6 @@ +translating----geekpi + + Installing Ruby on Rails using rbenv on Ubuntu 15.04 ================================================================================ This article we will learn about how to Install Ruby on Rails with rbenv on Ubuntu 15.04. We choose Ubuntu as operating system because Ubuntu is one of Linux distribution that easy to use with a lots of package support and complete documentations , so I think this is the right choice. If you don't install the latest version Ubuntu yet, you can [download the ISO file][1] to start off. @@ -149,4 +152,4 @@ via: http://linoxide.com/ubuntu-how-to/installing-ruby-rails-using-rbenv-ubuntu- [a]:http://linoxide.com/author/obetp/ [1]:http://release.ubuntu.com/15.04 [2]:http://github.com -[3]:https://github.com/settings/ssh \ No newline at end of file +[3]:https://github.com/settings/ssh From 7648c679f9a42dfc46d95740e45078034cc32cb2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 6 Jun 2015 14:40:10 +0800 Subject: [PATCH 1080/2517] translated --- ...by on Rails using rbenv on Ubuntu 15.04.md | 155 ------------------ ...by on Rails using rbenv on Ubuntu 15.04.md | 151 +++++++++++++++++ 2 files changed, 151 insertions(+), 155 deletions(-) delete mode 100644 sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md create mode 100644 translated/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md diff --git a/sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md b/sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md deleted file mode 100644 index b9944eeb74..0000000000 --- a/sources/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md +++ /dev/null @@ -1,155 +0,0 @@ -translating----geekpi - - -Installing Ruby on Rails using rbenv on Ubuntu 15.04 -================================================================================ -This article we will learn about how to Install Ruby on Rails with rbenv on Ubuntu 15.04. We choose Ubuntu as operating system because Ubuntu is one of Linux distribution that easy to use with a lots of package support and complete documentations , so I think this is the right choice. If you don't install the latest version Ubuntu yet, you can [download the ISO file][1] to start off. - -### Installing Ruby ### - -First thing we need to update ubuntu packages and install some dependencies for Ruby. - - sudo apt-get update - sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev - -There are three methods to install Ruby such rbenv, rvm and from the source. Each have their own benefits, but these days many developers prefer to use rbenv installation method than rvm or from source. We will install the latest version of Ruby, version 2.2.2. - -Installing with rbenv is a simple two step process. First you install rbenv, and then ruby-build : - - cd - git clone git://github.com/sstephenson/rbenv.git .rbenv - echo 'eval "$(rbenv init -)"' >> ~/.bashrc - exec $SHELL - - git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build - echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc - exec $SHELL - - git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash - - rbenv install 2.2.2 - rbenv global 2.2.2 - ruby -v - -We need to install Bundler but before that we tell Rubygems not to install the documentation for each package locally. - - echo "gem: --no-ri --no-rdoc" > ~/.gemrc - gem install bundler - -### Configuring GIT ### - -Before configuring GIT you have to create github account first, you can register [Git][2]. We need Git for our version control system so we are going to set it up to match our Github account. - -Replace **Name** and **Email address** in the following steps with the ones you used for your Github account. - - git config --global color.ui true - git config --global user.name "YOUR NAME" - git config --global user.email "YOUR@EMAIL.com" - ssh-keygen -t rsa -C "YOUR@EMAIL.com" - -After that take the newly generated SSH key and add it to your Github account. And then you need to copy and paste the output of the following command and [paste it here][3]. - - cat ~/.ssh/id_rsa.pub - -If you done of this, check and see if it worked - - ssh -T git@github.com - -You should get a message like this - - Hi excid3! You've successfully authenticated, but GitHub does not provide shell access. - -### Installing Rails ### - -We need to install javascript runtime like NodeJS because these days Rails ships with so many dependencies. With this way we can combines and minify your javascript to provide a faster production environment. - -We need to add PPA repository for installing nodeJS - - sudo add-apt-repository ppa:chris-lea/node.js - sudo apt-get update - sudo apt-get install nodejs - -If you find a problem while updating repository packages, you should try to do this command : - - # Note the new setup script name for Node.js v0.12 - curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - - - # Then install with: - sudo apt-get install -y nodejs - -Next step, follow this command : - - gem install rails -v 4.2.1 - -Because we are using rbenv, make the rails executable available with the following command below - - rbenv rehash - -To make sure the Rails have installed correcly, you can run the rails -v and this will show like this - - rails -v - # Rails 4.2.1 - -For some reason your environment may not be setup properly if you get different result. - -### Setting Up MySQL ### - -You may already be familiar with MySQL, you can install MySQL server and client from Ubuntu repository. You will set the password for the root user on installation process. This information will go into your Rails app's database.yml file in the future. Follow the command line below : - - sudo apt-get install mysql-server mysql-client libmysqlclient-dev - -Installing the libmysqlclient-dev gives you the necessary files to compile the mysql2 gem which is what Rails will use to connect to MySQL when you setup your Rails app. - -### Last Step ### - -Let's try to create your first Rails Application : - - # Use MySQL - - rails new myapp -d mysql - - # Move into the application directory - - cd myapp - - # Create Database - - rake db:create - - rails server - -Visit http://localhost:3000 to view your new website. Now you have got machine setup and ready to build some Rails application. - -![](http://blog.linoxide.com/wp-content/uploads/2015/05/localhost_3000.png) - -If you received an error message when you create database that said Access denied for user 'root'@'localhost' (Using password: NO) then you need to update your config/database.yml file to match the database **username** and **password**. - - # Edit your database.yml in config folder - - nano config/database.yml - -and then fill the password field with your MySQL root password. - -![](http://blog.linoxide.com/wp-content/uploads/2015/05/root_passw.png) - -Exit (Ctrl+X) and save. - -### Conclusion ### - -Rails is written in Ruby, the programming language which is also used alongside Rails. Ruby on Rails can be installed in three methods such rbenv, rvm and from the source on Ubuntu 15.04. Here in this tutorial we've used rbenv method and MySQL as database. If any question or suggestion, please write them in the comment below. - - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/installing-ruby-rails-using-rbenv-ubuntu-15-04/ - -作者:[Obet][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/obetp/ -[1]:http://release.ubuntu.com/15.04 -[2]:http://github.com -[3]:https://github.com/settings/ssh diff --git a/translated/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md b/translated/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md new file mode 100644 index 0000000000..65ff38744e --- /dev/null +++ b/translated/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md @@ -0,0 +1,151 @@ +在Ubuntu 15.04中安装RUby on Rails +================================================================================ +本篇我们会学习如何用rbenv在Ubuntu 15.04中安装Ruby on Rails。我们选择Ubuntu作为操作系统因为Ubuntu是Linux发行版中自带很多包和完整文档的操作系统,因此我认为这是正确的选择。如果你不想安装最新的Ubuntu,你可以从[下载iso文件][1]开始。 + +### 安装 Ruby ### + +我们要做的第一件事是更新Ubuntu包并且为Ruby安装一些依赖。 + + sudo apt-get update + sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev + +有三种方法来安装Ruby比如rbenv,rvm和从源码安装。每种都有各自的好处,但是这些天开发者们更倾向使用rbenv而不是rvm和源码来安装。我们将安装最新的Ruby版本,2.2.2。 + +用rbenv来安装只有简单的两步。第一步安装rbenv接着是ruby-build: + + cd + git clone git://github.com/sstephenson/rbenv.git .rbenv + echo 'eval "$(rbenv init -)"' >> ~/.bashrc + exec $SHELL + + git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build + echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc + exec $SHELL + + git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash + + rbenv install 2.2.2 + rbenv global 2.2.2 + ruby -v + +我们需要安装Bundler但是我们要在安装之前告诉rubygems不要为每个包本地安装文档。 + + echo "gem: --no-ri --no-rdoc" > ~/.gemrc + gem install bundler + +### 配置 GIT ### + +配置git之前,你要创建一个github账号,你可以注册[git][2]。我们需要git作为版本控制系统,因此我们要设置来匹配github账号。 + +用户的github账号来代替下面的**Name** 和 **Email address** 。 + + git config --global color.ui true + git config --global user.name "YOUR NAME" + git config --global user.email "YOUR@EMAIL.com" + ssh-keygen -t rsa -C "YOUR@EMAIL.com" + +接下来用新生成的ssh key添加到github账号中。这样你需要复制下面命令的输出并[粘贴在这][3]。 + + cat ~/.ssh/id_rsa.pub + +如果你做完了,检查是否已经成功。 + + ssh -T git@github.com + +你应该得到下面这样的信息。 + + Hi excid3! You've successfully authenticated, but GitHub does not provide shell access. + +### 安装 Rails ### + +我们需要安装javascript运行时,像NodeJS因为这些天Rails带来很多依赖。这样我们可以结合并缩小你的javascript来提供一个更快的生产环境。 + +我们需要添加PPA来安装nodeJS。 + + sudo add-apt-repository ppa:chris-lea/node.js + sudo apt-get update + sudo apt-get install nodejs + +如果在更新是晕倒了问题,你可以试试这个命令: + + # Note the new setup script name for Node.js v0.12 + curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - + + # Then install with: + sudo apt-get install -y nodejs + +下一步,用这个命令: + + gem install rails -v 4.2.1 + +因为我们正在使用rbenv,用下面的命令来安装rails。 + + rbenv rehash + +要确保rails已经正确安炸u哪个,你可以运行rails -v,显示如下: + + rails -v + # Rails 4.2.1 + +如果你得到的是不同的结果可能是环境没有设置正确。 + +### 设置 MySQL ### + +或许你已经熟悉MySQL了,你可以从Ubuntu的仓库中安装MySQL的客户端与服务端。你可以在安装时设置root用户密码。这个信息将来会进入你rails程序的database.yml文件中、用下面的命令来安装mysql。 + + sudo apt-get install mysql-server mysql-client libmysqlclient-dev + +安装libmysqlclient-dev用于提供在设置rails程序时,rails在连接mysql所需要用到的用于编译mysql2 gem的文件。 + +### 最后一步 ### + +让我们尝试创建你的第一个rails程序: + + # Use MySQL + + rails new myapp -d mysql + + # Move into the application directory + + cd myapp + + # Create Database + + rake db:create + + rails server + +访问http://localhost:3000来访问你的新网站。现在你的电脑上已经可以构建rails程序了。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/localhost_3000.png) + +如果你在创建数据库时遇到了“Access denied for user 'root'@'localhost' (Using password: NO)”这个错误信息,你需要更新你的config/database.yml文件来匹配数据库的**用户名**和**密码**。 + + # Edit your database.yml in config folder + + nano config/database.yml + +接着输入MySql root用户的密码。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/05/root_passw.png) + +退出 (Ctrl+X)并保存。 + +### 总结 ### + +Rails是用Ruby写的, 也就是随着rails一起使用的编程语言。在Ubuntu 15.04中Ruby on Rails可以用rbenv、 rvm和源码的方式来安装。本篇我们使用的是rbenv方式并用了MySQL作为数据库。有任何的问题或建议,请在评论栏指出。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/installing-ruby-rails-using-rbenv-ubuntu-15-04/ + +作者:[Obet][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/obetp/ +[1]:http://release.ubuntu.com/15.04 +[2]:http://github.com +[3]:https://github.com/settings/ssh From 127bf73eac1f836e32215f0840a5a53c26915a18 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 6 Jun 2015 21:41:01 +0800 Subject: [PATCH 1081/2517] PUB:20150427 How to set up NTP server in CentOS @ictlyh --- ...0427 How to set up NTP server in CentOS.md | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) rename {translated/tech => published}/20150427 How to set up NTP server in CentOS.md (60%) diff --git a/translated/tech/20150427 How to set up NTP server in CentOS.md b/published/20150427 How to set up NTP server in CentOS.md similarity index 60% rename from translated/tech/20150427 How to set up NTP server in CentOS.md rename to published/20150427 How to set up NTP server in CentOS.md index 3924edd93f..deb5cc3ca6 100644 --- a/translated/tech/20150427 How to set up NTP server in CentOS.md +++ b/published/20150427 How to set up NTP server in CentOS.md @@ -1,30 +1,31 @@ 如何在 CentOS 中设置 NTP 服务器 ================================================================================ -网络时间协议(NTP)用来同步网络上不同主机的系统时间。所有托管的主机都可以和一个指定的被称为 NTP 服务器的时间服务器同步它们的时间。另一方面一个 NTP 服务器将它的时间和任何公共 NTP 服务器,或者你选定的服务器同步。NTP 托管的所有系统时钟都同步精确到毫秒级。 -在一个协作环境中,如果他们不想为 NTP 传输打开防火墙,就有必要设置一个内部 NTP 服务器,然后让员工使用内部服务器而不是公共 NTP 服务器。在这个指南中,我们会介绍如何将一个 CentOS 系统配置为 NTP 服务器。在介绍详细内容之前,让我们先来简单了解一下 NTP 的概念。 +网络时间协议(NTP)用来同步网络上不同主机的系统时间。你管理的所有主机都可以和一个指定的被称为 NTP 服务器的时间服务器同步它们的时间。而另一方面,一个 NTP 服务器会将它的时间和任意公共 NTP 服务器,或者你选定的服务器同步。由 NTP 管理的所有系统时钟都会同步精确到毫秒级。 + +在公司环境中,如果他们不想为 NTP 传输打开防火墙,就有必要设置一个内部 NTP 服务器,然后让员工使用内部服务器而不是公共 NTP 服务器。在这个指南中,我们会介绍如何将一个 CentOS 系统配置为 NTP 服务器。在介绍详细内容之前,让我们先来简单了解一下 NTP 的概念。 ### 为什么我们需要 NTP? ### -由于制造工艺多种多样,所有的(非原子)时钟并不按照完全一致的速度行走。有一些时钟走的比较快而有一些走的比较慢。因此经过很长一段时间以后,一个时钟的时间慢慢的偏移于其它,导致有名的 “时钟漂移” 或 “时间漂移”。为了最小化时钟漂移的影响,使用 NTP 的主机应该周期性地和指定的 NTP 服务器交互以保持它们的时钟同步。 +由于制造工艺多种多样,所有的(非原子)时钟并不按照完全一致的速度行走。有一些时钟走的比较快而有一些走的比较慢。因此经过很长一段时间以后,一个时钟的时间慢慢的和其它的发生偏移,这就是常说的 “时钟漂移” 或 “时间漂移”。为了将时钟漂移的影响最小化,使用 NTP 的主机应该周期性地和指定的 NTP 服务器交互以保持它们的时钟同步。 -在不同的主机之间进行时间同步对于计划备份、[干扰检测][1]日志、[分布式任务调度][2]或者事务订单管理来说是很重要的事情。它甚至可能要求作为日常任务的一部分。 +在不同的主机之间进行时间同步对于计划备份、[入侵检测][1]记录、[分布式任务调度][2]或者事务订单管理来说是很重要的事情。它甚至应该作为日常任务的一部分。 -### NTP 层次 ### +### NTP 的层次结构 ### -NTP 时钟以层次模型组织。层级中的每层被称为一个 *stratum*。stratum 的概念说明了一台机器到授权的时间源有多少 NTP 跳。 +NTP 时钟以层次模型组织。层级中的每层被称为一个 *stratum(阶层)*。stratum 的概念说明了一台机器到授权的时间源有多少 NTP 跳。 ![](https://farm8.staticflickr.com/7590/16645732413_3b7af58186_c.jpg) -Stratum 0 由没有时间漂移的时钟组成,例如原子时钟。这种时钟不能在网络上直接使用。Stratum N (N > 1) 层服务器从 Stratum N-1 层服务器同步时间。Stratum N 时钟可能通过网络和彼此互联。 +Stratum 0 由没有时间漂移的时钟组成,例如原子时钟。这种时钟不能在网络上直接使用。Stratum N (N > 1) 层服务器从 Stratum N-1 层服务器同步时间。Stratum N 时钟能通过网络和彼此互联。 -NTP 支持多达 15 stratums 的层级。Stratum 16 被认为是没有同步不能使用的。 +NTP 支持多达 15 个 stratum 的层级。Stratum 16 被认为是未同步的,不能使用的。 ### 准备 CentOS 服务器 ### 现在让我们来开始在 CentOS 上设置 NTP 服务器。 -首先,我们需要保证正确设置了服务器的时区。在 CentOS 7 中,我们可以使用 timedatectl 命令查看和更改服务器的时区(比如,"Australia/Adelaide") +首先,我们需要保证正确设置了服务器的时区。在 CentOS 7 中,我们可以使用 timedatectl 命令查看和更改服务器的时区(比如,"Australia/Adelaide",LCTT 译注:中国可设置为 Asia/Shanghai ) # timedatectl list-timezones | grep Australia # timedatectl set-timezone Australia/Adelaide @@ -56,7 +57,7 @@ NTP 支持多达 15 stratums 的层级。Stratum 16 被认为是没有同步不 # chown ntp:ntp /var/log/ntpd.log # chcon -t ntpd_log_t /var/log/ntpd.log -现在初始化 NTP 服务并确保把它添加到了随机启动。 +现在初始化 NTP 服务并确保把它添加到了开机启动。 # systemctl restart ntp # systemctl enable ntp @@ -69,19 +70,18 @@ NTP 支持多达 15 stratums 的层级。Stratum 16 被认为是没有同步不 下面的表格解释了输出列。 -注:表格 - + - + - + @@ -89,15 +89,15 @@ NTP 支持多达 15 stratums 的层级。Stratum 16 被认为是没有同步不 - + - + - + @@ -109,7 +109,7 @@ NTP 支持多达 15 stratums 的层级。Stratum 16 被认为是没有同步不 - +
remote源在 ntp.conf 中定义。‘*’ 表示当前使用的最好的源;‘+’ 表示可作为 NTP 源的源;‘-’ 标记的源是不可用的。源在 ntp.conf 中定义。‘*’ 表示当前使用的,也是最好的源;‘+’ 表示这些源可作为 NTP 源;‘-’ 标记的源是不可用的。
refid和远程服务器时钟同步的时钟的 IP 地址。用于和本地时钟同步的远程服务器的 IP 地址。
stStratumStratum(阶层)
t
when自从上次和服务器交互经过的时间(以秒数计)。自从上次和服务器交互后经过的时间(以秒数计)。
poll和服务器的轮询频率,以秒数计。和服务器的轮询间隔,以秒数计。
reach表示和服务器交互是否有任何错误的十进制数。值 337 表示 100% 成功。表示和服务器交互是否有任何错误的八进制数。值 337 表示 100% 成功(即十进制的255)。
delay
jitter两个例子之间平局时间差异,以毫秒数计。两次取样之间平均时差,以毫秒数计。
@@ -120,13 +120,13 @@ NTP 支持多达 15 stratums 的层级。Stratum 16 被认为是没有同步不 # iptables -A INPUT -s 192.168.1.0/24 -p udp --dport 123 -j ACCEPT # iptables -A INPUT -p udp --dport 123 -j DROP -该规则允许从 192.168.1.0/24 来的 NTP 流量(端口 UDP/123),任何其它网络的流量会被截停。你可以根据需要更改规则。 +该规则允许从 192.168.1.0/24 来的 NTP 流量(端口 UDP/123),任何其它网络的流量会被丢弃。你可以根据需要更改规则。 ### 配置 NTP 客户端 ### #### 1. Linux #### -NTP 客户端主机需要 ntpupdate 软件包和服务器同步时间。可以轻松地使用 yum 或 apt-get 安装这个软件包。安装完软件包之后,用服务器的 IP 地址运行下面的命令。 +NTP 客户端主机需要 ntpupdate 软件包来和服务器同步时间。可以轻松地使用 yum 或 apt-get 安装这个软件包。安装完软件包之后,用服务器的 IP 地址运行下面的命令。 # ntpdate @@ -138,17 +138,17 @@ NTP 客户端主机需要 ntpupdate 软件包和服务器同步时间。可以 #### 3. Cisco 设备 #### -如果你想和 Cisco 设备同步时间,你可以在全局配置模式下使用下面的命令。 +如果你想要同步 Cisco 设备的时间,你可以在全局配置模式下使用下面的命令。 # ntp server -其它有支持 NTP 的卖家有自己的参数用于网络时间。如果你想将设备和 NTP服务器同步时间,请查看设备的说明文档。 +来自其它厂家的支持 NTP 的设备有自己的用于网络时间的参数。如果你想将设备和 NTP服务器同步时间,请查看设备的说明文档。 ### 结论 ### 总而言之,NTP 是在你的所有主机上同步时钟的一个协议。我们已经介绍了如何设置 NTP 服务器并使支持 NTP 的设备和服务器同步时间。 -希望能对你有所帮助 +希望能对你有所帮助。 -------------------------------------------------------------------------------- @@ -156,7 +156,7 @@ via: http://xmodulo.com/setup-ntp-server-centos.html 作者:[Sarmed Rahman][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2758f1ef4ad39fdcb143123d483a18575fe4546c Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 6 Jun 2015 22:08:59 +0800 Subject: [PATCH 1082/2517] PUB:20150423 How to Change Default Web Browser and Email Client in Ubuntu @ictlyh --- ... Web Browser and Email Client in Ubuntu.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md (75%) diff --git a/translated/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md b/published/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md similarity index 75% rename from translated/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md rename to published/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md index 5e7413e37d..958ce87fae 100644 --- a/translated/tech/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md +++ b/published/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md @@ -4,19 +4,17 @@ Ubuntu 自带了一些已经预装的默认应用程序,包括非常流行的 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/07/web-browser.png) -尽管这两个应用都有它们自己的粉丝,但是没有一个应用能符合每个人的口味和需要。我们经常收到邮件或者推文,询问我们怎样可以在 Ubuntu 上更改默认浏览器或者设置处理邮件链接的不同的电子邮件客户端等。 +尽管这两个应用都有它们自己的粉丝,但是没有一个应用能符合每个人的口味和需要。我们经常收到邮件或者推文,询问我们可以怎样在 Ubuntu 上更改默认浏览器或者设置处理邮件链接为不同的电子邮件客户端等。 -我们在这里不仅讨论如何安装不同的软件,还包括如何给一个特定的文件,链接或者内容类型设置系统处理应用。 +我们在这里不仅讨论如何安装不同的软件,还包括如何给一个特定的文件,链接或者内容类型设置其系统处理应用。 在 Ubuntu 中更改默认应用程序,包括浏览器、电子邮件客户端、文本编辑器、音乐和视频播放器都非常的简单。但并不是每个人都知道更改这些的设置面板在哪里,让我们来快速看一下吧。 ### 如何在 Ubuntu 上更改默认浏览器 ### -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/change-default-browser-in-ubuntu-750x402.jpg) +Mozilla 火狐浏览器是一扇稳定、开源而且可靠的互联网之窗,但它并不是每个人的选择。这都没关系。 -Mozilla 火狐浏览器是万维网上稳定、开源而且可依赖的窗口,但它并不是每个人的选择。这都没关系。 - -在 Ubuntu 上使用不同的默认浏览器,首先,显而易见,你需要安装一个新的浏览器。你该怎么做取决于你想要的浏览器: +要在 Ubuntu 上使用不同的默认浏览器,首先,显而易见,你需要安装一个新的浏览器。你该怎么做取决于你想要的浏览器: - 开源浏览器,例如 [Epiphany][1], [Chromium][2] 和 [IceWeasel][3],可以从 Ubuntu 软件中心安装。 @@ -24,9 +22,9 @@ Mozilla 火狐浏览器是万维网上稳定、开源而且可依赖的窗口, 不管你选择哪个浏览器,不管你选择怎样安装,完成之后你就可以继续了。 -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/system-settings-ubuntu-300x215.jpg) +要更改在点击其它应用(如即时通讯软件、Twitter 客户端、 e-mail 中)中的链接时打开的默认网页浏览器,你需要用到 Ubuntu 系统设置工具。 -点击其它应用上的链接,例如及时通讯软件、Twitter 客户端、 e-mail,要更改打开网页的默认浏览器,你需要用到 Ubuntu 系统设置工具。 +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/system-settings-ubuntu-300x215.jpg) 你可以用多种方法打开系统设置。其中一种最快的方式是点击右上角(RTL系统是左上角)的 Cog 图标并选择‘系统设置’菜单快捷方式。 @@ -35,25 +33,27 @@ Mozilla 火狐浏览器是万维网上稳定、开源而且可依赖的窗口, 1. 在侧边栏选择‘默认应用程序’ 1. 把 ‘Web’ 条目的 ‘火狐’ 改为你想要的选项 +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/change-default-browser-in-ubuntu-750x402.jpg) + 就是这样。 ### 如何在 Ubuntu 上更改默认的邮件客户端 ### -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/CHANGE-DEFAULT-APPS-UBUNTU.jpg) - -Ubuntu 用 Thunderbird 作为默认的邮件应用程序。这意味着 当你点击大部分浏览器、 PDF文件、及时通讯软件等上的 **电子邮件地址或者一个 [mailto 链接][7] 的时候会自动打开** 这个应用。 +Ubuntu 用 Thunderbird 作为默认的邮件应用程序。这意味着当你点击大部分浏览器、 PDF文件、及时通讯软件等上的 **电子邮件地址或者一个 [mailto 链接][7] 的时候会自动打开** 这个应用。 当然,如果你使用 Thunderbird,这真的很方便。但是我们很多人并非如此; 我们可能**[使用像 Geary 这样的轻量级客户端][8]**,GNOME stalwart Evolution,或者依靠像 Gmail 或者 Outlook 这样的网络邮件服务。 在 Ubuntu 上从 Thunderbird **更改默认邮件客户端** 到另一个应用程序,打开系统设置 > 详细 > 默认应用程序。点击下拉菜单到 ‘Mail’ 并选择从列表中选择你喜欢的客户端。 -**在 Ubuntu 上设置 Gmail 为默认的邮件客户端**,你首先需要点击下面的按钮安装 ‘gnome-gmail’ 软件包。安装完后打开系统设置 > 详细 > 默认应用程序。点击下拉菜单到 ‘Mail’ 并选择从列表中选择 ‘Gmail’。 +**在 Ubuntu 上设置 Gmail 为默认的邮件客户端**,你首先需要点击下面的按钮安装 ‘gnome-gmail’ 软件包。安装完后打开系统设置 > 详细 > 默认应用程序。然后点击‘Mail’ 的下拉菜单,并选择从列表中选择 ‘Gmail’。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/CHANGE-DEFAULT-APPS-UBUNTU.jpg) - [在 Ubuntu 上安装 GNOME Gmail][9] ### 更多 ### -上述同样的步骤可以用来设置你双击音乐文件时打开你喜欢的音乐播放器,用比如 VLC 应用程序处理 .avi 和 .mp4 文件,等等。 +上述同样的步骤也可以用来设置你双击音乐文件时打开你喜欢的音乐播放器,用比如 VLC 应用程序处理 .avi 和 .mp4 文件,等等。 -------------------------------------------------------------------------------- @@ -61,7 +61,7 @@ via: http://www.omgubuntu.co.uk/2015/04/change-your-default-web-browser-in-ubunt 作者:[Joey-Elijah Sneddon][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -73,5 +73,5 @@ via: http://www.omgubuntu.co.uk/2015/04/change-your-default-web-browser-in-ubunt [5]:http://www.opera.com/computer/linux [6]:https://vivaldi.com/#Download [7]:http://en.wikipedia.org/wiki/Mailto -[8]:http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update +[8]:https://linux.cn/article-5511-1.html [9]:apt://gnome-gmail \ No newline at end of file From 4a0f7813e23c67ddfdf8a39874c824681a706d6c Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 7 Jun 2015 08:07:31 +0800 Subject: [PATCH 1083/2517] PUB:20150506 How to Setup OpenERP (Odoo) on CentOS 7.x @geekpi --- ...w to Setup OpenERP (Odoo) on CentOS 7.x.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md (69%) diff --git a/translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md b/published/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md similarity index 69% rename from translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md rename to published/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md index 0cd972b425..0035432ecb 100644 --- a/translated/tech/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md +++ b/published/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md @@ -2,7 +2,7 @@ ================================================================================ 各位好,这篇教程关于的是如何在CentOS 7中安装Odoo(就是我们所知的OpenERP)。你是不是在考虑为你的业务安装一个不错的ERP(企业资源规划)软件?那么OpenERP就是你寻找的最好的程序,因为它是一款为你的商务提供杰出特性的自由开源软件。 -[OpenERP][1]是一款自由开源的传统的OpenERP(企业资源规划),它包含了开源CRM、网站构建、电子商务、项目管理、计费账务、销售点、人力资源、市场、生产、采购管理以及其他模块用于提高效率及销售。Odoo可以作为独立程序,但是它可以无缝集成因此你可以在安装数个程序后得到一个全功能的开源ERP。 +[OpenERP][1]是一款自由开源的传统的OpenERP(企业资源规划),它包含了开源CRM、网站构建、电子商务、项目管理、计费账务、POS、人力资源、市场、生产、采购管理以及其它模块用于提高效率及销售。Odoo中的应用可以作为独立程序使用,它们也可以无缝集成到一起,因此你可以在安装几个程序来得到一个全功能的开源ERP。 因此,下面是在你的CentOS上安装OpenERP的步骤。 @@ -13,13 +13,13 @@ # yum clean all # yum update -现在我们要安装PostgreSQL,因为OpenERP使用PostgreSQL作为他的数据库。要安装它,我们需要运行下面的命令。 +现在我们要安装PostgreSQL,因为OpenERP使用PostgreSQL作为它的数据库。要安装它,我们需要运行下面的命令。 # yum install postgresql postgresql-server postgresql-libs ![Installing postgresql](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-postgresql.png) -、安装完成后,我们需要用下面的命令初始化数据库。 +安装完成后,我们需要用下面的命令初始化数据库。 # postgresql-setup initdb @@ -42,13 +42,13 @@ ### 2. 设置Odoo仓库 ### -在初始化数据库初始化完成后,我们要添加EPEL(企业版Linux的额外包)到我们的CentOS中。Odoo(或者OpenERP)依赖于Python运行时以及其他包没有包含在标准仓库中。这样我们要位企业版Linux添加额外的包仓库支持来解决Odoo所需要的依赖。要安装完成,我们需要运行下面的命令。 +在初始化数据库初始化完成后,我们要添加 EPEL(企业版Linux的额外包)到我们的CentOS中。Odoo(或者OpenERP)依赖的Python运行时环境以及其他包没有包含在标准仓库中。这样我们要为企业版Linux添加额外的包仓库支持来解决Odoo所需要的依赖。要安装完成,我们需要运行下面的命令。 # yum install epel-release ![Installing EPEL Release](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-epel-release.png) -现在,安装EPEL后,我们现在使用yum-config-manager添加Odoo(OpenERp)的仓库。 +现在,安装EPEL后,我们现在使用yum-config-manager添加Odoo(OpenERP)的仓库。 # yum install yum-utils @@ -73,16 +73,16 @@ ![Starting Odoo](http://blog.linoxide.com/wp-content/uploads/2015/03/starting-odoo.png) -### 4. 防火墙允许 ### +### 4. 打开防火墙 ### -因为Odoo使用8069端口,我们需要在防火墙中允许远程访问。我们使用下面的命令来在防火墙中允许8069防火墙。 +因为Odoo使用8069端口,我们需要在防火墙中允许远程访问。我们使用下面的命令来在防火墙中允许8069端口访问。 # firewall-cmd --zone=public --add-port=8069/tcp --permanent # firewall-cmd --reload ![Allowing firewall Port](http://blog.linoxide.com/wp-content/uploads/2015/03/allowing-firewall-port.png) -**注意:默认上,只有本地的连接才允许。如果我们要允许PostgreSQL的远程访问,我们需要在pg_hba.conf添加下面图片中一行** +**注意:默认情况下只有本地才允许连接数据库。如果我们要允许PostgreSQL的远程访问,我们需要在pg_hba.conf添加下面图片中一行** # nano /var/lib/pgsql/data/pg_hba.conf @@ -90,13 +90,13 @@ ### 5. Web接口 ### -我们已经在CentOS 7中安装了最新的Odoo 8(OpenERP),我们可以在浏览器中输入http://ip-address:8069来访问Odoo。 接着,我们要做的第一件事就是创建一个新的数据库和新的密码。注意,主密码默认是管理员密码。接着,我们可以在面板中输入用户名和密码。 +我们已经在CentOS 7中安装了最新的Odoo 8(OpenERP),我们可以在浏览器中输入`http://ip-address:8069`来访问Odoo。 接着,我们要做的第一件事就是创建一个新的数据库和新的密码。注意,主密码默认是‘admin’。接着,我们可以在面板中输入用户名和密码。 ![Odoo Panel](http://blog.linoxide.com/wp-content/uploads/2015/03/odoo-panel.png) ### 总结 ### -Odoo 8(OpenERP)是世界上最好的开源ERP程序。我们做了一件出色的工作来安装它因为OpenERP是由许多模块组成的针对商务和公司的完整ERP程序。因此,如果你有任何问题、建议、反馈请在下面的评论栏写下。谢谢你!享受OpenERP(Odoo 8)吧 :-) +Odoo 8(OpenERP)是世界上最好的开源ERP程序。OpenERP是由许多模块组成的针对商务和公司的完整ERP程序,我们已经把它安装好了。因此,如果你有任何问题、建议、反馈请在下面的评论栏写下。谢谢你!享受OpenERP(Odoo 8)吧 :-) -------------------------------------------------------------------------------- @@ -104,7 +104,7 @@ via: http://linoxide.com/linux-how-to/setup-openerp-odoo-centos-7/ 作者:[Arun Pyasi][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From fdbb337b1c38936e731faba3de6c7020c58e6cd0 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 7 Jun 2015 08:15:32 +0800 Subject: [PATCH 1084/2517] PUB:20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop @GOLinux --- ...for default keyring to unlock on Ubuntu desktop.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md (76%) diff --git a/translated/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md b/published/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md similarity index 76% rename from translated/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md rename to published/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md index 2871298396..fb67d3dd34 100644 --- a/translated/tech/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md +++ b/published/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md @@ -1,12 +1,12 @@ -Linux有问必答——Ubuntu桌面上如何禁用默认的密钥环解锁密码输入 +Linux有问必答:Ubuntu桌面上如何禁用默认的密钥环解锁提示 ================================================================================ >**问题**:当我启动我的Ubuntu桌面时,出现了一个弹出对话框,要求我输入密码来解锁默认的密钥环。我怎样才能禁用这个“解锁默认密钥环”弹出窗口,并自动解锁我的密钥环? -密钥环被认为是用来以加密方式存储你的登录信息的本地数据库。各种桌面应用(如浏览器、电子邮件客户端)使用密钥环来安全地存储并管理你的登录凭证、机密、密码、证书或密钥。对于那些需要检索存储在密钥环中的信息的应用程序,需要解锁该密钥环。 +密钥环是一个以加密方式存储你的登录信息的本地数据库。各种桌面应用(如浏览器、电子邮件客户端)使用密钥环来安全地存储并管理你的登录凭证、机密、密码、证书或密钥。对于那些需要检索存储在密钥环中的信息的应用程序,需要解锁该密钥环。 Ubuntu桌面所使用的GNOME密钥环被整合到了桌面登录中,该密钥环会在你验证进入桌面后自动解锁。但是,如果你设置了自动登录桌面或者是从休眠中唤醒,你默认的密钥环仍然可能“被锁定”的。在这种情况下,你会碰到这一提示: ->“为密钥环‘默认密钥环’输入密码来解锁。某个应用想要访问密钥环‘默认密钥环’,但它被锁定了。” +>“输入密码来解锁密钥环‘默认密钥环’。某个应用想要访问密钥环‘默认密钥环’,但它被锁定了。” > ![](https://farm9.staticflickr.com/8787/16716456754_309c39513c_o.png) @@ -16,7 +16,7 @@ Ubuntu桌面所使用的GNOME密钥环被整合到了桌面登录中,该密钥 ### 禁用默认密钥环解锁密码 ### -打开Dash,然后输入“密码”来启动“密码和密钥”应用。 +打开Dash,然后输入“password”来启动“密码和密钥”应用。 ![](https://farm8.staticflickr.com/7709/17312949416_ed9c4fbe2d_b.jpg) @@ -31,6 +31,7 @@ Ubuntu桌面所使用的GNOME密钥环被整合到了桌面登录中,该密钥 输入你的当前登录密码。 ![](https://farm8.staticflickr.com/7775/17347551135_ce09260818_b.jpg) + 在设置“默认”密钥环新密码的密码框中留空。 ![](https://farm8.staticflickr.com/7669/17345663222_c9334c738b_c.jpg) @@ -47,7 +48,7 @@ via: http://ask.xmodulo.com/disable-entering-password-unlock-default-keyring.htm 作者:[Dan Nanni][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From ac35ae8dc9d9df5026f013f0d3c1acbae4384d94 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 7 Jun 2015 08:23:11 +0800 Subject: [PATCH 1085/2517] PUB:20150512 Linux FAQs with Answers--How to view torrent file content on Linux @GOLinux --- ...wers--How to view torrent file content on Linux.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md (85%) diff --git a/translated/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md b/published/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md similarity index 85% rename from translated/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md rename to published/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md index 8b5ba22907..8f2a9c2ecd 100644 --- a/translated/tech/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md +++ b/published/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md @@ -1,6 +1,6 @@ -Linux有问必答——Linux上如何查看torrent文件内容 +Linux有问必答:Linux上如何查看种子文件的内容 ================================================================================ -> **问题**: 我从网站上下载了一个torrent文件。Linux上有没有工具让我查看torrent文件的内容?例如,我想知道torrent里面都有什么文件。 +> **问题**: 我从网站上下载了一个torrent(种子)文件。Linux上有没有工具让我查看torrent文件的内容?例如,我想知道torrent里面都包含什么文件。 torrent文件(也就是扩展名为**.torrent**的文件)是BitTorrent元数据文件,里面存储了BitTorrent客户端用来从BitTorrent点对点网络下载共享文件的信息(如,追踪器URL、文件列表、大小、校验和、创建日期等)。在单个torrent文件里面,可以列出一个或多个文件用于共享。 @@ -8,7 +8,7 @@ torrent文件内容由BEncode编码为BitTorrent数据序列化格式,因此 事实上,任何图形化的BitTorrent客户端(如Transmission或uTorrent)都带有BEncode解码器,所以,你可以用它们直接打开来查看torrent文件的内容。然而,如果你不想要使用BitTorrent客户端来检查torrent文件,你可以试试这个命令行torrent查看器,它叫[dumptorrent][1]。 -**dumptorrent**命令可以使用内建的BEncode解码器打印torrent文件的详细信息(如,文件名、大小、跟踪器URL、创建日期、信息散列等等)。 +**dumptorrent**命令可以使用内建的BEncode解码器打印出torrent文件的详细信息(如,文件名、大小、跟踪器URL、创建日期、信息散列等等)。 ### 安装DumpTorrent到Linux ### @@ -32,7 +32,7 @@ torrent文件内容由BEncode编码为BitTorrent数据序列化格式,因此 $ make $ sudo cp dumptorrent /usr/local/bin -确保你的路径中[包含][2]了/usr/local/bin。 +确保你的搜索路径 PATH 中[包含][2]了/usr/local/bin。 ### 查看torrent的内容 ### @@ -41,6 +41,7 @@ torrent文件内容由BEncode编码为BitTorrent数据序列化格式,因此 $ dumptorrent ![](https://farm8.staticflickr.com/7729/16816455904_b051e29972_b.jpg) + 要查看torrent的完整内容,请添加“-v”选项。它会打印更多关于torrent的详细信息,包括信息散列、片长度、创建日期、创建者,以及完整的声明列表。 $ dumptorrent -v @@ -53,7 +54,7 @@ via: http://ask.xmodulo.com/view-torrent-file-content-linux.html 作者:[Dan Nanni][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From c985ad3f4b4fa5128cd0ac2099114ba9fd0baf2e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 7 Jun 2015 09:12:19 +0800 Subject: [PATCH 1086/2517] PUB:20150512 How To Run Docker Client Inside Windows OS @ictlyh --- ... To Run Docker Client Inside Windows OS.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150512 How To Run Docker Client Inside Windows OS.md (70%) diff --git a/translated/tech/20150512 How To Run Docker Client Inside Windows OS.md b/published/20150512 How To Run Docker Client Inside Windows OS.md similarity index 70% rename from translated/tech/20150512 How To Run Docker Client Inside Windows OS.md rename to published/20150512 How To Run Docker Client Inside Windows OS.md index f23c109149..050ed636f3 100644 --- a/translated/tech/20150512 How To Run Docker Client Inside Windows OS.md +++ b/published/20150512 How To Run Docker Client Inside Windows OS.md @@ -1,6 +1,7 @@ 如何在 Windows 操作系统中运行 Docker 客户端 ================================================================================ -大家好,今天我们来了解一下 Windows 操作系统中的 Docker 以及在其中安装 Docker Windows 客户端的知识。Docker 引擎使用 Linux 特定内核特性,因此不能通过 Windows 内核运行,Docker 引擎创建一个小的虚拟系统运行 Linux 并利用它的资源和内核。Windows Docker 客户端用虚拟化 Docker 引擎构建,运行以及管理 盒子以外的 Docker 容器。这里有个由 Boot2Docker 团队开发的名为 Boot2Docker 的应用程序,它创建运行在基于[Linux 微内核][1]的小型 Linux 系统上的虚拟机,是特意为在 Windows 上运行 [Docker][2] 容器开发的。它完全运行在 RAM 中,需要大约 27M 内存并能在 5s(YMMV,译者注:your mileage may vary,因人而异) 内启动。因此,在用于 Windows 的 Docker 引擎被开发出来之前,我们在 Windows 机器里只能运行 Linux 容器。 + +大家好,今天我们来了解一下 Windows 操作系统中的 Docker 以及在其中安装 Docker Windows 客户端的知识。Docker 引擎使用 Linux 特有的内核特性,因此不能通过 Windows 内核运行,所以,(在 Windows 上)Docker 引擎创建了一个小的虚拟系统运行 Linux 并利用它的资源和内核。这样,Windows Docker 客户端就可以用这个虚拟的 Docker 引擎来构建、运行以及管理 Docker 容器。有个叫 Boot2Docker 的团队开发了一个同名的应用程序,它创建了一个虚拟机来运行基于[Tiny Core Linux][1]特制的小型 Linux,来在 Windows 上运行 [Docker][2] 容器。它完全运行在内存中,需要大约 27M 内存并能在 5秒 (因人而异) 内启动。因此,在用于 Windows 的 Docker 引擎被开发出来之前,我们在 Windows 机器里只能运行 Linux 容器。 下面是安装 Docker 客户端并在上面运行容器的简单步骤。 @@ -12,7 +13,7 @@ ### 2. 安装 Boot2Docker ### -现在我们运行安装文件,它会安装 Window Docker 客户端、用于 Windows 的 Git(MSYS-git)、VirtualBox、Boot2Docker Linux ISO 以及 Boot2Docker 管理工具,这些对于在盒子之外运行 Docker 引擎都至关重要。 +现在我们运行安装文件,它会安装 Window Docker 客户端、用于 Windows 的 Git(MSYS-git)、VirtualBox、Boot2Docker Linux ISO 以及 Boot2Docker 管理工具,这些对于开箱即用地运行全功能的 Docker 引擎都至关重要。 ![](http://blog.linoxide.com/wp-content/uploads/2015/05/boot2docker-installer.png) @@ -20,7 +21,7 @@ ![](http://blog.linoxide.com/wp-content/uploads/2015/05/boot2docker-start-icon-e1431322598697.png) -安装完成必要的组件之后,我们从桌面 Boot2Docker 快捷方式启动 Boot2Docker。它会要求你输入以后用于验证的 SSH 密钥。然后会启动一个配置好的用于管理在虚拟机中运行的 Docker 的 unix shell。 +安装完成必要的组件之后,我们从桌面上的“Boot2Docker Start”快捷方式启动 Boot2Docker。它会要求你输入以后用于验证的 SSH 密钥。然后会启动一个配置好的用于管理在虚拟机中运行的 Docker 的 unix shell。 ![](http://blog.linoxide.com/wp-content/uploads/2015/05/starting-boot2docker.png) @@ -32,7 +33,7 @@ ### 4. 运行 Docker ### -由于 **Boot2Docker Start** 自动启动了一个已经正确设置好环境变量的 shell,我们可以马上开始使用 Docker。**请注意,如果我们将 Boot2Docker 作为一个远程 Docker 守护进程,那么不要在 docker 命令之前加 sudo。** +由于 **Boot2Docker Start** 自动启动了一个已经正确设置好环境变量的 shell,我们可以马上开始使用 Docker。**请注意,如果我们要将 Boot2Docker 作为一个远程 Docker 守护进程,那么不要在 docker 命令之前加 sudo。** 现在,让我们来试试 **hello-world** 例子镜像,它会下载 hello-world 镜像,运行并输出 "Hello from Docker" 信息。 @@ -56,7 +57,7 @@ **注意**: 如果你看到 machine does no exist 的错误信息,就运行 **boot2docker init** 命令。 -然后复制控制台中的命令到 cmd.exe 中为控制台窗口设置环境变量,然后我们就可以像平常一样运行 docker 容器了。 +然后复制上图中控制台标出命令到 cmd.exe 中为控制台窗口设置环境变量,然后我们就可以像平常一样运行 docker 容器了。 ### 6. 使用 PowerShell 运行 Docker ### @@ -74,7 +75,7 @@ ### 7. 用 PUTTY 登录 ### -Boot2Docker 在%USERPROFILE%\.ssh 目录生成和使用用于登录的公共和私有密钥,我们也需要使用这个文件夹中的私有密钥。私有密钥需要转换为 PuTTY 的格式。我们可以通过 puttygen.exe 实现。 +Boot2Docker 会在%USERPROFILE%\.ssh 目录生成和使用用于登录的公共和私有密钥,我们也需要使用这个文件夹中的私有密钥。私有密钥需要转换为 PuTTY 的格式。我们可以通过 puttygen.exe 实现。 我们需要打开 puttygen.exe 并从 %USERPROFILE%\.ssh\id_boot2docker 中导入("File"->"Load" 菜单)私钥,然后点击 "Save Private Key"。然后用保存的文件通过 PuTTY 用 docker@127.0.0.1:2022 登录。 @@ -88,7 +89,9 @@ Boot2Docker 管理工具提供了一些命令,如下所示。 ### 总结 ### -通过 Docker Windows 客户端使用 Docker 很有趣。Boot2Docker 管理工具是一个能使任何 Docker 容器能像在 Linux 主机上平稳运行的很棒的应用程序。如果你更仔细的话,你会发现 boot2docker 默认用户的用户名是 docker,密码是 tcuser。最新版本的 boot2docker 设置了一个 host-only 的网络适配器提供访问容器的端口。一般来说是 192.168.59.103,但可以通过 VirtualBox 的 DHCP 实现改变。如果你有任何问题、建议、反馈,请在下面的评论框中写下来然后我们可以改进或者更新我们的内容。非常感谢!Enjoy:-) +通过 Docker Windows 客户端使用 Docker 很有趣。Boot2Docker 管理工具是一个能使任何 Docker 容器能像在 Linux 主机上平滑运行的很棒的应用程序。如果你更仔细的话,你会发现 boot2docker 默认用户的用户名是 docker,密码是 tcuser。最新版本的 boot2docker 设置了一个 host-only 的网络适配器提供访问容器的端口。一般来说是 192.168.59.103,但可以通过 VirtualBox 的 DHCP 实现改变。 + +如果你有任何问题、建议、反馈,请在下面的评论框中写下来然后我们可以改进或者更新我们的内容。非常感谢!Enjoy:-) -------------------------------------------------------------------------------- @@ -96,7 +99,7 @@ via: http://linoxide.com/linux-how-to/run-docker-client-inside-windows-os/ 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 06b97f867836d0f9d3ae3cf5b51bbb323620f641 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 7 Jun 2015 11:52:35 +0800 Subject: [PATCH 1087/2517] translating --- ...w to Install the Beautiful Arc GTK+ Flat Theme on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md b/sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md index 7f6c36147a..348d74bd30 100644 --- a/sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md +++ b/sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md @@ -1,3 +1,5 @@ +translating----geekpi + Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux ================================================================================ > Step-by-step tutorial with easy-to-follow instructions @@ -58,4 +60,4 @@ via: http://news.softpedia.com/news/Here-s-How-to-Install-the-Beautiful-Arc-GTK- [17]: [18]: [19]: -[20]: \ No newline at end of file +[20]: From f67f116b5936158823d513a3dd4832ec6557c884 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 7 Jun 2015 12:47:08 +0800 Subject: [PATCH 1088/2517] translated --- ... Beautiful Arc GTK+ Flat Theme on Linux.md | 63 ------------------- ... Beautiful Arc GTK+ Flat Theme on Linux.md | 61 ++++++++++++++++++ 2 files changed, 61 insertions(+), 63 deletions(-) delete mode 100644 sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md create mode 100644 translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md diff --git a/sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md b/sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md deleted file mode 100644 index 348d74bd30..0000000000 --- a/sources/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md +++ /dev/null @@ -1,63 +0,0 @@ -translating----geekpi - -Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux -================================================================================ -> Step-by-step tutorial with easy-to-follow instructions - -**Today we're introducing you to a newly released GTK+ theme that features transparent and flat elements and is compatible with multiple desktop environments and Linux distributions. [The theme is called Arc][1].** - -Before going into detail, we suggest that you take a quick look at the gallery attached below, so you have a basic idea of what the theme looks like. Also, you should be aware that it currently works with GTK+ 2.x, GTK+ 3.x, GNOME-Shell, Budgie, Unity, and Pantheon user interfaces, all of them using the GNOME Stack. - -Also, the developer of the Arc theme informs us that it has been successfully tested on the Ubuntu 15.04 (Vivid Vervet), Arch Linux, elementary OS 0.3 Freya, Fedora 21, Fedora 22, Debian GNU/Linux 8.0 (Jessie), Debian Testing, Debian Unstable, openSUSE 13.2, openSUSE Tumbleweed, and Gentoo Linux operating systems. - -### Requirements and installation instructions ### - -To build the Arc theme, you will need to first install some packages, such as autoconf, automake, pkg-config (pkgconfig for Fedora), libgtk-3-dev for Debian/Ubuntu-based distros or gtk3-devel for RPM-based ones, git, gtk2-engines-pixbuf, and gtk-engine-murrine (gtk-murrine-engine for Fedora). - -The Arc theme does not yet have binary packages, so you will need to grab the latest source code from the project's Git repository and compile it. Therefore, open a Terminal app and run the following commands, one by one, hitting the Enter key after each one and waiting for the previous command to finish before adding the next. - - git clone https://github.com/horst3180/arc-theme --depth 1 && cd arc-theme - git fetch --tags - git checkout $(git describe --tags `git rev-list --tags --max-count=1`) - ./autogen.sh --prefix=/usr - sudo make install - -That's it! At this moment, the Arc theme is currently installed on your GNU/Linux distribution and you can activate it using either the GNOME Tweak Tool utility if you're using GNOME or the Unity Tweak Tool software if you are running Ubuntu's Unity desktop. Have fun and don't forget to drop a screenshot with your setup in the comments section below. - -![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-2.jpg) - -![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-3.jpg) - -![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-4.jpg) - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143.shtml - -作者:[Marius Nestor][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/marius-nestor -[1]:https://github.com/horst3180/Arc-theme -[2]: -[3]: -[4]: -[5]: -[6]: -[7]: -[8]: -[9]: -[10]: -[11]: -[12]: -[13]: -[14]: -[15]: -[16]: -[17]: -[18]: -[19]: -[20]: diff --git a/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md b/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md new file mode 100644 index 0000000000..f8d1c56d41 --- /dev/null +++ b/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md @@ -0,0 +1,61 @@ +如何在Linux中安装漂亮的扁平化Arc GTK+主题 +================================================================================ +> 易于看懂的每步都有的教程 + +**今天我们将向你介绍最新发布的GTK+主题,它拥有透明和扁平元素,并且与多个桌面环境和Linux发行版见荣发。[这个主题叫Arc][1]。** + +开始讲细节之前,我建议你快速地看一下下面的图,这样你有会对这个主题就会有一个基本的概念了。同样你应该意识到它目前可以工作在GTK+ 2.x、GTK+ 3.x、GNOME-Shell、 Budgie、 Unity和Pantheon用户界面,它们都使用了GNOME栈。 + +同样、Arc主题的开发者提醒我们它已经成功地在Ubuntu 15.04(Vivid Vervet)、 Arch Linux、 elementary OS 0.3 Freya、 Fedora 21、 Fedora 22、 Debian GNU/Linux 8.0 (Jessie)、 Debian Testing、 Debian Unstable、 openSUSE 13.2、 openSUSE Tumbleweed和Gentoo测试过了。 + +### 要求和安装指导 ### + +要构建Arc主题,你需要先安装一些包,比如autoconf、 automake、 pkg-config (对Fedora的pkgconfig)、基于Debian/Ubuntu-based发行版的libgtk-3-dev或者基于RPM的gtk3-devel、 git、 gtk2-engines-pixbuf和gtk-engine-murrine (对Fedora的gtk-murrine-engine)。 + +Arc主题还没有二进制包,因此你需要从git仓库中取下最新的源码并编译。这样,打开终端并运行下面的命令,一行行地,并在每行的末尾按下回车键并等待上一步完成来继续一步。 + + git clone https://github.com/horst3180/arc-theme --depth 1 && cd arc-theme + git fetch --tags + git checkout $(git describe --tags `git rev-list --tags --max-count=1`) + ./autogen.sh --prefix=/usr + sudo make install + +就是这样!此时你已经在你的GNU/Linux发行版中安装了Arc主题,如果你使用GNOME可以使用GONME Tweak工具或者如果你使用Unity可以使用Unity Tweak工具来激活主题。玩得开心也不要忘了在下面的评论栏里留下你的截图。 + +![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-2.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-3.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-4.jpg) + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143.shtml + +作者:[Marius Nestor][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor +[1]:https://github.com/horst3180/Arc-theme +[2]: +[3]: +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: From 7a1ebd4b153eb013272d6802f09cba3ec045eeda Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 8 Jun 2015 10:19:12 +0800 Subject: [PATCH 1089/2517] PUB:20150420 Managing file and directory attributes in linux using chattr and lsattr command @ictlyh --- ...n linux using chattr and lsattr command.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md (85%) diff --git a/translated/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md b/published/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md similarity index 85% rename from translated/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md rename to published/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md index 0aaef749c8..052103ddda 100644 --- a/translated/tech/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md +++ b/published/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md @@ -1,11 +1,11 @@ 在Linux中用chattr和lsattr命令管理文件和目录属性 ================================================================================ -为了允许添加数据,防止更改或者删除等,文件和文件夹中设定了一定的控制属性。例如,你可以在关键系统文件或者文件夹中启用属性,然后没有用户,包括root,可以删除或者修改它,不允许比如dump命令等备份工具去备份一个特定的文件或者文件夹,等等。这些属性只可以在ext2,ext3或者ext4文件系统中的文件和文件夹上设定。 +为了允许添加数据,防止更改或者删除等,文件和文件夹可以设定了特定的控制属性。例如,你可以在关键的系统文件或者文件夹中启用属性,然后没有任何用户,包括root,可以删除或者修改它,比如不允许使用像dump这样的命令等备份工具去备份一个特定的文件或者文件夹,等等。这些属性只可以在ext2,ext3或者ext4文件系统中的文件和文件夹上设定。 有两个命令 **lsattr** 和 **chattr** 用来管理属性。下面是常用属性的列表。 注:表格代码 - +
@@ -63,7 +63,7 @@

e (extent format)

@@ -71,7 +71,7 @@

i (immutable)

@@ -96,14 +96,14 @@ chattr属性中可以使用的不同选项 : - **-R** 递归地修改文件夹和子文件夹的属性 -- **-V** chattr命令的输出伴随版本信息 -- **-f** 压缩大部分错误信息 +- **-V** chattr命令会输出带有版本信息的冗余信息 +- **-f** 忽略大部分错误信息 在chattr中用于设置或者取消属性的 **操作符** -- ‘+’ 符号用来为文件和文件夹设置属性, -- ‘-‘ 符号用来移除或者取消属性 -- ‘=’ 使它们成为文件有的唯一属性。 +- '+' 符号用来为文件和文件夹设置属性, +- '-' 符号用来移除或者取消属性 +- '=' 使它们成为文件有的唯一属性。 **chattr** 和 **lsattr** 命令的基本语法 : @@ -120,7 +120,7 @@ chattr属性中可以使用的不同选项 : 现在试着删除或者修改文件 [root@linuxtechi ~]# rm -f dummy_data - rm: cannot remove ‘dummy_data’: Operation not permitted + rm: cannot remove 'dummy_data': Operation not permitted [root@linuxtechi ~]# echo "test" >> dummy_data -bash: dummy_data: Permission denied @@ -193,7 +193,7 @@ via: http://www.linuxtechi.com/file-directory-attributes-in-linux-using-chattr-l 作者:[Pradeep Kumar][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 210c1637e5e3734a5485859ffa015f4caaf96ac6 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 8 Jun 2015 11:38:07 +0800 Subject: [PATCH 1090/2517] PUB:20150506 First Step Guide for Learning Shell Scripting @GOLinux --- ...Step Guide for Learning Shell Scripting.md | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) rename {translated/tech => published}/20150506 First Step Guide for Learning Shell Scripting.md (85%) diff --git a/translated/tech/20150506 First Step Guide for Learning Shell Scripting.md b/published/20150506 First Step Guide for Learning Shell Scripting.md similarity index 85% rename from translated/tech/20150506 First Step Guide for Learning Shell Scripting.md rename to published/20150506 First Step Guide for Learning Shell Scripting.md index af71b8f4ca..6369c96c8a 100644 --- a/translated/tech/20150506 First Step Guide for Learning Shell Scripting.md +++ b/published/20150506 First Step Guide for Learning Shell Scripting.md @@ -1,4 +1,4 @@ -Shell脚本学习初次操作指南 +Shell脚本编程初体验 ================================================================================ ![](http://blog.linoxide.com/wp-content/uploads/2015/04/myfirstshellscript.jpg) @@ -18,33 +18,33 @@ Linux世界中最为流行的shell脚本语言之一,就是bash。而我认为 shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象成能帮你做事的那些人,只要你用正确的方式来请求他们去做。比如说,你想要写文档。首先,你需要纸。然后,你需要把内容说给某个人听,让他帮你写。最后,你想要把它存放到某个地方。或者说,你想要造一所房子,因而你需要请合适的人来清空场地。在他们说“事情干完了”,那么另外一些工程师就可以帮你来砌墙。最后,当这些工程师们也告诉你“事情干完了”的时候,你就可以叫油漆工来给房子粉饰了。如果你让油漆工在墙砌好前就来粉饰,会发生什么呢?我想,他们会开始发牢骚了。几乎所有这些像人一样的命令都会说话,如果它们完成了工作而没有发生什么问题,那么它们就会告诉“标准输出”。如果它们不能做你叫它们做的事——它们会告诉“标准错误”。这样,最后,所有的命令都通过“标准输入”来听你的话。 -快速实例——当你打开linux终端并写一些文本时——你正通过“标准输入”和bash说话。那么,让我们来问问bash shell **who am i**吧。 +快速实例——当你打开linux终端并写一些文本时——你正通过“标准输入”和bash说话。那么,让我们来问问bash shell **who am i(我是谁?)**吧。 - root@localhost ~]# who am i <--- you speaking through the standard input to bash shell - root pts/0 2015-04-22 20:17 (192.168.1.123) <--- bash shell answering to you through the standard output + root@localhost ~]# who am i <--- 你通过标准输入对 bash shell 说 + root pts/0 2015-04-22 20:17 (192.168.1.123) <--- bash shell通过标准输出回答你 现在,让我们说一些bash听不懂的问题: [root@localhost ~]# blablabla <--- 哈,你又在和标准输入说话了 -bash: blablabla: command not found <--- bash通过标准错误在发牢骚了 -“:”之前的第一个单词通常是向你发牢骚的命令。实际上,这些流中的每一个都有它们自己的索引号: +“:”之前的第一个单词通常是向你发牢骚的命令。实际上,这些流中的每一个都有它们自己的索引号(LCTT 译注:文件句柄号): - 标准输入(**stdin**) - 0 - 标准输出(**stdout**) - 1 - 标准错误(**stderr**) - 2 -如果你真的想要知道哪个输出命令说了些什么——你需要重定向(在命令后使用大于号“>”和流索引)那次发言到文件: +如果你真的想要知道哪个输出命令说了些什么——你需要将那次发言重定向到(在命令后使用大于号“>”和流索引)文件: [root@localhost ~]# blablabla 1> output.txt -bash: blablabla: command not found -在本例中,我们试着重定向1(**stdout**)流到名为output.txt的文件。让我们来看对该文件内容所做的事情吧,使用cat命令可以做这事: +在本例中,我们试着重定向流1(**stdout**)到名为output.txt的文件。让我们来看对该文件内容所做的事情吧,使用cat命令可以做这事: [root@localhost ~]# cat output.txt [root@localhost ~]# -看起来似乎是空的。好吧,现在让我们来重定向2(**stderr**)流: +看起来似乎是空的。好吧,现在让我们来重定向流2(**stderr**): [root@localhost ~]# blablabla 2> error.txt [root@localhost ~]# @@ -77,17 +77,17 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 rm: cannot remove `folder1': Is a directory [root@localhost ~]# -正如我们所看到的,不同的流被分离到了不同的文件。有时候,这也不似很方便,因为我们想要查看出现错误时,在某些操作前面或后面所连续发生的事情。要实现这一目的,我们可以重定向两个流到同一个文件: +正如我们所看到的,不同的流被分离到了不同的文件。有时候,这也不是很方便,因为我们想要查看出现错误时,在某些操作前面或后面所连续发生的事情。要实现这一目的,我们可以重定向两个流到同一个文件: command >>out_err.txt 2>>out_err.txt 注意:请注意,我使用“>>”替代了“>”。它允许我们附加到文件,而不是覆盖文件。 -我们可以重定向一个流到另一个: +我们也可以重定向一个流到另一个: command >out_err.txt 2>&1 -让我来解释一下吧。所有命令的标准输出将被重定向到out_err.txt,错误输出将被重定向到1-st流(上面已经解释过了),而该流会被重定向到同一个文件。让我们看这个实例: +让我来解释一下吧。所有命令的标准输出将被重定向到out_err.txt,错误输出将被重定向到流1(上面已经解释过了),而该流会被重定向到同一个文件。让我们看这个实例: [root@localhost ~]# rm -fv folder2 file2 >out_err.txt 2>&1 [root@localhost ~]# cat out_err.txt @@ -127,7 +127,7 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 如果你打算grep一些双引号引起来带有空格的内容呢! -注意: fdisk命令显示关于Linux操作系统磁盘驱动器的信息 +注意:fdisk命令显示关于Linux操作系统磁盘驱动器的信息。 就像我们看到的,这种方式很不方便,因为我们不一会儿就把临时文件空间给搞乱了。要完成该任务,我们可以使用管道。它们允许我们重定向一个命令的**stdout**到另一个命令的**stdin**流: @@ -147,11 +147,11 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 正如我们所知道的,通常,与shell的交流以及shell内的交流是以对话的方式进行的。因此,让我们创建一些真正的脚本吧,这些脚本也会和我们讲话。这会让你学到一些简单的命令,并对脚本的概念有一个更好的理解。 -假设我们是某个公司的总服务台经理,我们想要创建某个shell脚本来注册呼叫信息:电话号码、用户名以及问题的简要描述。我们打算把这些信息存储到普通文本文件data.txt中,以便今后统计。脚本它自己就是以对话的方式工作,这会让总服务台的工作人员的小日子过得轻松点。那么,首先我们需要显示问题。对于现实信息,我们可以用echo和printf命令。这两个都是用来显示信息的,但是printf更为强大,因为我们可以通过它很好地格式化输出,我们可以让它右对齐、左对齐或者为信息留出专门的空间。让我们从一个简单的例子开始吧。要创建文件,请使用你喜欢的文本编辑器(kate,nano,vi,……),然后创建名为note.sh的文件,里面写入这些命令: +假设我们是某个公司的总服务台经理,我们想要创建某个shell脚本来注册呼叫信息:电话号码、用户名以及问题的简要描述。我们打算把这些信息存储到普通文本文件data.txt中,以便今后统计。脚本它自己就是以对话的方式工作,这会让总服务台的工作人员的小日子过得轻松点。那么,首先我们需要显示提问。对于显示信息,我们可以用echo和printf命令。这两个都是用来显示信息的,但是printf更为强大,因为我们可以通过它很好地格式化输出,我们可以让它右对齐、左对齐或者为信息留出专门的空间。让我们从一个简单的例子开始吧。要创建文件,请使用你惯用的文本编辑器(kate,nano,vi,……),然后创建名为note.sh的文件,里面写入这些命令: echo "Phone number ?" - -### Script执行 ### + +### 如何运行/执行脚本? ### 在保存文件后,我们可以使用bash命令来运行,把我们的文件作为它的参数: @@ -176,7 +176,7 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 [root@localhost ~]# ./note.sh Phone number ? -在脚本名前,我添加了./组合。.(点)在unix世界中意味着当前位置(当前文件夹),/(斜线)是文件夹分隔符。(在Windows系统中,我们使用\(反斜线)实现同样功能)所以,这整个组合的意思是说:“从当前文件夹执行note.sh脚本”。我想,如果我用完整路径来运行这个脚本的话,你会更加清楚一些: +在脚本名前,我添加了 ./ 组合。.(点)在unix世界中意味着当前位置(当前文件夹),/(斜线)是文件夹分隔符。(在Windows系统中,我们使用反斜线 \ 表示同样功能)所以,这整个组合的意思是说:“从当前文件夹执行note.sh脚本”。我想,如果我用完整路径来运行这个脚本的话,你会更加清楚一些: [root@localhost ~]# /root/note.sh Phone number ? @@ -184,7 +184,7 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 它也能工作。 -如果所有linux用户都有相同的默认shell,那就万事OK。如果我们只是执行该脚本,默认的用户shell就会用于解析脚本内容并运行命令。不同的shell有着一丁点不同的语法、内部命令等等,所以,为了保证我们的脚本会使用**bash**,我们应该添加**#!/bin/bash**到文件首行。这样,默认的用户shell将调用**/bin/bash**,而只有在那时候,脚本中的命令才会被执行: +如果所有linux用户都有相同的默认shell,那就万事OK。如果我们只是执行该脚本,默认的用户shell就会用于解析脚本内容并运行命令。不同的shell的语法、内部命令等等有着一丁点不同,所以,为了保证我们的脚本会使用**bash**,我们应该添加**#!/bin/bash**到文件首行。这样,默认的用户shell将调用**/bin/bash**,而只有在那时候,脚本中的命令才会被执行: [root@localhost ~]# cat note.sh #!/bin/bash @@ -194,13 +194,13 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 ### 读取输入 ### -在现实信息后,脚本会等待用户回答。那儿有个**read**命令用来接收用户的回答: +在显示信息后,脚本会等待用户回答。有个**read**命令用来接收用户的回答: #!/bin/bash echo "Phone number ?" read phone -在执行后,脚本会等待用户输入,直到用户按[ENTER]键: +在执行后,脚本会等待用户输入,直到用户按[ENTER]键结束输入: [root@localhost ~]# ./note.sh Phone number ? @@ -220,7 +220,7 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 You have entered 123456 as a phone number [root@localhost ~]# -在**bash** shell中,我们使用**$**(美元)符号作为变量标示,除了读入到变量和其它为数不多的时候(将在今后说明)。 +在**bash** shell中,一般我们使用**$**(美元)符号来表明这是一个变量,除了读入到变量和其它为数不多的时候才不用这个$(将在今后说明)。 好了,现在我们准备添加剩下的问题了: @@ -244,7 +244,7 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 太完美了!剩下来就是重定向所有东西到文件data.txt了。作为字段分隔符,我们将使用/(斜线)符号。 -**注意** : 你可以选择任何你认为是最好,但是确保文件内容不会包含这些符号在内。它会导致在文本行中产生额外字段。 +**注意** : 你可以选择任何你认为是最好的分隔符,但是确保文件内容不会包含这些符号在内,否则它会导致在文本行中产生额外字段。 别忘了使用“>>”来代替“>”,因为我们想要将输出内容附加到文件末! @@ -262,7 +262,7 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 987/Jimmy/Keybord issue. [root@localhost ~]# -**注意** : **tail**命令显示了文件的最后**-n**行。 +**注意** : **tail**命令显示了文件的最后的**n**行。 搞定。让我们再来运行一次看看: @@ -285,7 +285,7 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 [root@localhost ~]# date "+%Y.%m.%d %H:%M:%S" 2015.04.23 21:33:18 <---- 格式化后的输出 -有几种方式可以读取命令输出到变脸,在这种简单的情况下,我们将使用`(反引号): +有几种方式可以读取命令的输出到变量,在这种简单的情况下,我们将使用`(是反引号,不是单引号,和波浪号~在同一个键位): [root@localhost ~]# cat note.sh #!/bin/bash @@ -320,7 +320,7 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 你可以直接从控制台查找到各个命令的大量有趣的信息,只需输入:**man read, man echo, man date, man ……** -同意吗?它看上去是好多了! +同意吗?它看上去是舒服多了! [root@localhost ~]# ./note.sh Phone number: 321 @@ -331,9 +331,9 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 2015.04.23 21:43:50/321/Susane/Mouse was stolen [root@localhost ~]# -光标在消息的后面(不是在新的一行中),这有点意思。 +光标在消息的后面(不是在新的一行中),这有点意思。(LCTT 译注:如果用 echo 命令输出显示的话,可以用 -n 参数来避免换行。) -循环 +### 循环 ### 是时候来改进我们的脚本了。如果用户一整天都在接电话,如果每次都要去运行,这岂不是很麻烦?让我们让这些活动都永无止境地循环去吧: @@ -348,7 +348,7 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 echo "$now/$phone/$name/$issue">>data.txt done -我已经交换了**read phone**和**now=`date`**行。这是因为我想要在输入电话号码后再获得时间。如果我把它放在循环**- the**的首行,变量就会在数据存储到文件中后获得时间。而这并不好,因为下一次呼叫可能在20分钟后,甚至更晚。 +我已经交换了**read phone**和**now=`date`**行的位置。这是因为我想要在输入电话号码后再获得时间。如果我把它放在循环的首行,那么循环一次后,变量 now 就会在数据存储到文件中后马上获得时间。而这并不好,因为下一次呼叫可能在20分钟后,甚至更晚。 [root@localhost ~]# ./note.sh Phone number: 123 @@ -365,11 +365,11 @@ shell脚本语言就跟和几个人聊天类似。你只需把所有命令想象 2015.04.23 21:48:16/777/Daniel/I broke my monitor [root@localhost ~]# -注意: 要从无限循环中退出,你可以按[Ctrl]+[C]键。Shell会显示^表示Ctrl键。 +注意: 要从无限循环中退出,你可以按[Ctrl]+[C]键。Shell会显示\^表示Ctrl键。 ### 使用管道重定向 ### -让我们添加更多功能到我们的“弗兰肯斯坦”,我想要脚本在每次呼叫后显示某个统计数据。比如说,我想要查看各个号码呼叫了我几次。对于这个,我们应该cat文件data.txt: +让我们添加更多功能到我们的“弗兰肯斯坦(Frankenstein)”,我想要脚本在每次呼叫后显示某个统计数据。比如说,我想要查看各个号码呼叫了我几次。对于这个,我们应该cat文件data.txt: [root@localhost ~]# cat data.txt 2015.04.23 21:38:56/123/Jim/Script hanging. @@ -453,7 +453,7 @@ via: http://linoxide.com/linux-shell-script/guide-start-learning-shell-scripting 作者:[Petras Liumparas][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From b9e86d827951075cc56e6e80f0d63dc3eafae148 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 8 Jun 2015 16:02:17 +0800 Subject: [PATCH 1091/2517] Translating by ZTinoZ --- .../20150526 20 Useful Terminal Emulators for Linux.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 4d2f8cfc16..bafcc15d71 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -28,7 +28,7 @@ Terminator Terminal ### 2. Tilda ### -Tilda是一款漂亮的基于GTK+的下拉式终端。敲击一个键你就可以打开一个新的或隐藏着的Tilda窗口。然而,你可以添加你所选择的颜色来更改文本颜色和终端背景颜色。 +Tilda是一款漂亮的基于GTK+的下拉式终端,敲击一个键你就可以呼出一个新的或隐藏着的Tilda窗口。你也可以添加你所选择的颜色来更改文本颜色和终端背景颜色。 #### Tilda的特性 #### @@ -44,9 +44,9 @@ Tilda Terminal ### 3. Guake ### -Guake is a python based drop-down terminal created for the GNOME Desktop Environment. It is invoked by pressing a single keystroke, and can make it hidden by pressing same keystroke again. Its design was determined from FPS (First Person Shooter) games such as Quake and one of its main target is be easy to reach. +Guake是一款基于python的下拉式终端,诞生于GNOME桌面环境。按一个键就能调出,再按一下就能隐藏。它的设计构思来源于FPS (第一人称射击) 游戏例如Quake,其目标显而易见。 -Guake is very much similar to Yakuaka and Tilda, but it’s an experiment to mix the best of them into a single GTK-based program. Guake has been written in python from scratch using a little piece in C (global hotkeys stuff). +Guake与Yakuaka和Tilda非常相似,不过它是一个集上述二者的优点于一体的基于GTK的程序。Guake完全是用Python和小片的C写成的(全局热键部分)。 ![Guake Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Guake-Terminal.jpeg) @@ -56,7 +56,7 @@ Guake Terminal ### 4. Yakuake ### -Yakuake (Yet Another Kuake) is a KDE based drop-down terminal emulator very much similar to Guake terminal emulator in functionality. It’s design was inspired from fps consoles games such as Quake. +Yakuake (Yet Another Kuake) 是一款基于KDE的下拉式终端仿真器,它与Guake再功能上非常相似。它的射击构思也是受FPS游戏的启发例如Quake。 Yakuake is basically a KDE application, which can be easily installed on KDE desktop, but if you try to install Yakuake in GNOME desktop, it will prompt you to install huge number of dependency packages. From 1fe543421b67080516ee3775ba44f512df143f3b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 8 Jun 2015 16:39:28 +0800 Subject: [PATCH 1092/2517] =?UTF-8?q?2015-06-08-1=20=E9=80=89=E9=A2=98=20R?= =?UTF-8?q?HCSA=20Series=201-6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ntial Commands and System Documentation.md | 313 +++++++++++++++++ ...o Perform File and Directory Management.md | 322 ++++++++++++++++++ ...ow to Manage Users and Groups in RHEL 7.md | 248 ++++++++++++++ ...or Analyzing text with grep and regexps.md | 254 ++++++++++++++ ...Boot Shutdown and Everything in Between.md | 216 ++++++++++++ ...to Configure and Encrypt System Storage.md | 269 +++++++++++++++ 6 files changed, 1622 insertions(+) create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md new file mode 100644 index 0000000000..9b32c93453 --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md @@ -0,0 +1,313 @@ +RHCSA Series: Reviewing Essential Commands & System Documentation – Part 1 +================================================================================ +RHCSA (Red Hat Certified System Administrator) is a certification exam from Red Hat company, which provides an open source operating system and software to the enterprise community, It also provides support, training and consulting services for the organizations. + +![RHCSA Exam Guide](http://www.tecmint.com/wp-content/uploads/2015/02/RHCSA-Series-by-Tecmint.png) + +RHCSA Exam Preparation Guide + +RHCSA exam is the certification obtained from Red Hat Inc, after passing the exam (codename EX200). RHCSA exam is an upgrade to the RHCT (Red Hat Certified Technician) exam, and this upgrade is compulsory as the Red Hat Enterprise Linux was upgraded. The main variation between RHCT and RHCSA is that RHCT exam based on RHEL 5, whereas RHCSA certification is based on RHEL 6 and 7, the courseware of these two certifications are also vary to a certain level. + +This Red Hat Certified System Administrator (RHCSA) is essential to perform the following core system administration tasks needed in Red Hat Enterprise Linux environments: + +- Understand and use necessary tools for handling files, directories, command-environments line, and system-wide / packages documentation. +- Operate running systems, even in different run levels, identify and control processes, start and stop virtual machines. +- Set up local storage using partitions and logical volumes. +- Create and configure local and network file systems and its attributes (permissions, encryption, and ACLs). +- Setup, configure, and control systems, including installing, updating and removing software. +- Manage system users and groups, along with use of a centralized LDAP directory for authentication. +- Ensure system security, including basic firewall and SELinux configuration. + +To view fees and register for an exam in your country, check the [RHCSA Certification page][1]. + +To view fees and register for an exam in your country, check the RHCSA Certification page. + +In this 15-article RHCSA series, titled Preparation for the RHCSA (Red Hat Certified System Administrator) exam, we will going to cover the following topics on the latest releases of Red Hat Enterprise Linux 7. + +- Part 1: Reviewing Essential Commands & System Documentation +- Part 2: How to Perform File and Directory Management in RHEL 7 +- Part 3: How to Manage Users and Groups in RHEL 7 +- Part 4: Editing Text Files with Nano and Vim / Analyzing text with grep and regexps +- Part 5: Process Management in RHEL 7: boot, shutdown, and everything in between +- Part 6: Using ‘Parted’ and ‘SSM’ to Configure and Encrypt System Storage +- Part 7: Using ACLs (Access Control Lists) and Mounting Samba / NFS Shares +- Part 8: Securing SSH, Setting Hostname and Enabling Network Services +- Part 9: Installing, Configuring and Securing a Web and FTP Server +- Part 10: Yum Package Management, Automating Tasks with Cron and Monitoring System Logs +- Part 11: Firewall Essentials and Control Network Traffic Using FirewallD and Iptables +- Part 12: Automate RHEL 7 Installations Using ‘Kickstart’ +- Part 13: RHEL 7: What is SELinux and how it works? +- Part 14: Use LDAP-based authentication in RHEL 7 +- Part 15: Virtualization in RHEL 7: KVM and Virtual machine management + +In this Part 1 of the RHCSA series, we will explain how to enter and execute commands with the correct syntax in a shell prompt or terminal, and explained how to find, inspect, and use system documentation. + +![RHCSA: Reviewing Essential Linux Commands – Part 1](http://www.tecmint.com/wp-content/uploads/2015/02/Reviewing-Essential-Linux-Commands.png) + +RHCSA: Reviewing Essential Linux Commands – Part 1 + +#### Prerequisites: #### + +At least a slight degree of familiarity with basic Linux commands such as: + +- [cd command][2] (change directory) +- [ls command][3] (list directory) +- [cp command][4] (copy files) +- [mv command][5] (move or rename files) +- [touch command][6] (create empty files or update the timestamp of existing ones) +- rm command (delete files) +- mkdir command (make directory) + +The correct usage of some of them are anyway exemplified in this article, and you can find further information about each of them using the suggested methods in this article. + +Though not strictly required to start, as we will be discussing general commands and methods for information search in a Linux system, you should try to install RHEL 7 as explained in the following article. It will make things easier down the road. + +- [Red Hat Enterprise Linux (RHEL) 7 Installation Guide][7] + +### Interacting with the Linux Shell ### + +If we log into a Linux box using a text-mode login screen, chances are we will be dropped directly into our default shell. On the other hand, if we login using a graphical user interface (GUI), we will have to open a shell manually by starting a terminal. Either way, we will be presented with the user prompt and we can start typing and executing commands (a command is executed by pressing the Enter key after we have typed it). + +Commands are composed of two parts: + +- the name of the command itself, and +- arguments + +Certain arguments, called options (usually preceded by a hyphen), alter the behavior of the command in a particular way while other arguments specify the objects upon which the command operates. + +The type command can help us identify whether another certain command is built into the shell or if it is provided by a separate package. The need to make this distinction lies in the place where we will find more information about the command. For shell built-ins we need to look in the shell’s man page, whereas for other binaries we can refer to its own man page. + +![Check Shell built in Commands](http://www.tecmint.com/wp-content/uploads/2015/02/Check-shell-built-in-Commands.png) + +Check Shell built in Commands + +In the examples above, cd and type are shell built-ins, while top and less are binaries external to the shell itself (in this case, the location of the command executable is returned by type). + +Other well-known shell built-ins include: + +- [echo command][8]: Displays strings of text. +- [pwd command][9]: Prints the current working directory. + +![More Built in Shell Commands](http://www.tecmint.com/wp-content/uploads/2015/02/More-Built-in-Shell-Commands.png) + +More Built in Shell Commands + +**exec command** + +Runs an external program that we specify. Note that in most cases, this is better accomplished by just typing the name of the program we want to run, but the exec command has one special feature: rather than create a new process that runs alongside the shell, the new process replaces the shell, as can verified by subsequent. + + # ps -ef | grep [original PID of the shell process] + +When the new process terminates, the shell terminates with it. Run exec top and then hit the q key to quit top. You will notice that the shell session ends when you do, as shown in the following screencast: + +注:youtube视频 + + +**export command** + +Exports variables to the environment of subsequently executed commands. + +**history Command** + +Displays the command history list with line numbers. A command in the history list can be repeated by typing the command number preceded by an exclamation sign. If we need to edit a command in history list before executing it, we can press Ctrl + r and start typing the first letters associated with the command. When we see the command completed automatically, we can edit it as per our current need: + +注:youtube视频 + + +This list of commands is kept in our home directory in a file called .bash_history. The history facility is a useful resource for reducing the amount of typing, especially when combined with command line editing. By default, bash stores the last 500 commands you have entered, but this limit can be extended by using the HISTSIZE environment variable: + +![Linux history Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-history-Command.png) + +Linux history Command + +But this change as performed above, will not be persistent on our next boot. In order to preserve the change in the HISTSIZE variable, we need to edit the .bashrc file by hand: + + # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) + HISTSIZE=1000 + +**Important**: Keep in mind that these changes will not take effect until we restart our shell session. + +**alias command** + +With no arguments or with the -p option prints the list of aliases in the form alias name=value on standard output. When arguments are provided, an alias is defined for each name whose value is given. + +With alias, we can make up our own commands or modify existing ones by including desired options. For example, suppose we want to alias ls to ls –color=auto so that the output will display regular files, directories, symlinks, and so on, in different colors: + + # alias ls='ls --color=auto' + +![Linux alias Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-alias-Command.png) + +Linux alias Command + +**Note**: That you can assign any name to your “new command” and enclose as many commands as desired between single quotes, but in that case you need to separate them by semicolons, as follows: + + # alias myNewCommand='cd /usr/bin; ls; cd; clear' + +**exit command** + +The exit and logout commands both terminate the shell. The exit command terminates any shell, but the logout command terminates only login shells—that is, those that are launched automatically when you initiate a text-mode login. + +If we are ever in doubt as to what a program does, we can refer to its man page, which can be invoked using the man command. In addition, there are also man pages for important files (inittab, fstab, hosts, to name a few), library functions, shells, devices, and other features. + +#### Examples: #### + +- man uname (print system information, such as kernel name, processor, operating system type, architecture, and so on). +- man inittab (init daemon configuration). + +Another important source of information is provided by the info command, which is used to read info documents. These documents often provide more information than the man page. It is invoked by using the info keyword followed by a command name, such as: + + # info ls + # info cut + +In addition, the /usr/share/doc directory contains several subdirectories where further documentation can be found. They either contain plain-text files or other friendly formats. + +Make sure you make it a habit to use these three methods to look up information for commands. Pay special and careful attention to the syntax of each of them, which is explained in detail in the documentation. + +**Converting Tabs into Spaces with expand Command** + +Sometimes text files contain tabs but programs that need to process the files don’t cope well with tabs. Or maybe we just want to convert tabs into spaces. That’s where the expand tool (provided by the GNU coreutils package) comes in handy. + +For example, given the file NumbersList.txt, let’s run expand against it, changing tabs to one space, and display on standard output. + + # expand --tabs=1 NumbersList.txt + +![Linux expand Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-expand-Command.png) + +Linux expand Command + +The unexpand command performs the reverse operation (converts spaces into tabs). + +**Display the first lines of a file with head and the last lines with tail** + +By default, the head command followed by a filename, will display the first 10 lines of the said file. This behavior can be changed using the -n option and specifying a certain number of lines. + + # head -n3 /etc/passwd + # tail -n3 /etc/passwd + +![Linux head and tail Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-head-and-tail-Command.png) + +Linux head and tail Command + +One of the most interesting features of tail is the possibility of displaying data (last lines) as the input file grows (tail -f my.log, where my.log is the file under observation). This is particularly useful when monitoring a log to which data is being continually added. + +Read More: [Manage Files Effectively using head and tail Commands][10] + +**Merging Lines with paste** + +The paste command merges files line by line, separating the lines from each file with tabs (by default), or another delimiter that can be specified (in the following example the fields in the output are separated by an equal sign). + + # paste -d= file1 file2 + +![Merge Files in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Merge-Files-in-Linux-with-paste-command.png) + +Merge Files in Linux + +**Breaking a file into pieces using split command** + +The split command is used split a file into two (or more) separate files, which are named according to a prefix of our choosing. The splitting can be defined by size, chunks, or number of lines, and the resulting files can have a numeric or alphabetic suffixes. In the following example, we will split bash.pdf into files of size 50 KB (-b 50KB), using numeric suffixes (-d): + + # split -b 50KB -d bash.pdf bash_ + +![Split Files in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Split-Files-in-Linux-with-split-command.png) + +Split Files in Linux + +You can merge the files to recreate the original file with the following command: + + # cat bash_00 bash_01 bash_02 bash_03 bash_04 bash_05 > bash.pdf + +**Translating characters with tr command** + +The tr command can be used to translate (change) characters on a one-by-one basis or using character ranges. In the following example we will use the same file2 as previously, and we will change: + +- lowercase o’s to uppercase, +- and all lowercase to uppercase + + # cat file2 | tr o O + # cat file2 | tr [a-z] [A-Z] + +![Translate Characters in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Translate-characters-in-Linux-with-tr-command.png) + +Translate Characters in Linux + +**Reporting or deleting duplicate lines with uniq and sort command** + +The uniq command allows us to report or remove duplicate lines in a file, writing to stdout by default. We must note that uniq does not detect repeated lines unless they are adjacent. Thus, uniq is commonly used along with a preceding sort (which is used to sort lines of text files). + +By default, sort takes the first field (separated by spaces) as key field. To specify a different key field, we need to use the -k option. Please note how the output returned by sort and uniq change as we change the key field in the following example: + + # cat file3 + # sort file3 | uniq + # sort -k2 file3 | uniq + # sort -k3 file3 | uniq + +![Remove Duplicate Lines in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Remove-Duplicate-Lines-in-file.png) + +Remove Duplicate Lines in Linux + +**Extracting text with cut command** + +The cut command extracts portions of input lines (from stdin or files) and displays the result on standard output, based on number of bytes (-b), characters (-c), or fields (-f). + +When using cut based on fields, the default field separator is a tab, but a different separator can be specified by using the -d option. + + # cut -d: -f1,3 /etc/passwd # Extract specific fields: 1 and 3 in this case + # cut -d: -f2-4 /etc/passwd # Extract range of fields: 2 through 4 in this example + +![Extract Text From a File in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Extract-Text-from-a-file.png) + +Extract Text From a File in Linux + +Note that the output of the two examples above was truncated for brevity. + +**Reformatting files with fmt command** + +fmt is used to “clean up” files with a great amount of content or lines, or with varying degrees of indentation. The new paragraph formatting defaults to no more than 75 characters wide. You can change this with the -w (width) option, which set the line length to the specified number of characters. + +For example, let’s see what happens when we use fmt to display the /etc/passwd file setting the width of each line to 100 characters. Once again, output has been truncated for brevity. + + # fmt -w100 /etc/passwd + +![File Reformatting in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/File-Reformatting-in-Linux-with-fmt-command.png) + +File Reformatting in Linux + +**Formatting content for printing with pr command** + +pr paginates and displays in columns one or more files for printing. In other words, pr formats a file to make it look better when printed. For example, the following command: + + # ls -a /etc | pr -n --columns=3 -h "Files in /etc" + +Shows a listing of all the files found in /etc in a printer-friendly format (3 columns) with a custom header (indicated by the -h option), and numbered lines (-n). + +![File Formatting in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/File-Formatting-in-Linux-with-pr-command.png) + +File Formatting in Linux + +### Summary ### + +In this article we have discussed how to enter and execute commands with the correct syntax in a shell prompt or terminal, and explained how to find, inspect, and use system documentation. As simple as it seems, it’s a large first step in your way to becoming a RHCSA. + +If you would like to add other commands that you use on a periodic basis and that have proven useful to fulfill your daily responsibilities, feel free to share them with the world by using the comment form below. Questions are also welcome. We look forward to hearing from you! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ + +作者:[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]:https://www.redhat.com/en/services/certification/rhcsa +[2]:http://www.tecmint.com/cd-command-in-linux/ +[3]:http://www.tecmint.com/ls-command-interview-questions/ +[4]:http://www.tecmint.com/advanced-copy-command-shows-progress-bar-while-copying-files/ +[5]:http://www.tecmint.com/rename-multiple-files-in-linux/ +[6]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ +[7]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ +[8]:http://www.tecmint.com/echo-command-in-linux/ +[9]:http://www.tecmint.com/pwd-command-examples/ +[10]:http://www.tecmint.com/view-contents-of-file-in-linux/ \ No newline at end of file diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md b/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md new file mode 100644 index 0000000000..7566862597 --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md @@ -0,0 +1,322 @@ +RHCSA Series: How to Perform File and Directory Management – Part 2 +================================================================================ +In this article, RHCSA Part 2: File and directory management, we will review some essential skills that are required in the day-to-day tasks of a system administrator. + +![RHCSA: Perform File and Directory Management – Part 2](http://www.tecmint.com/wp-content/uploads/2015/03/RHCSA-Part2.png) + +RHCSA: Perform File and Directory Management – Part 2 + +### Create, Delete, Copy, and Move Files and Directories ### + +File and directory management is a critical competence that every system administrator should possess. This includes the ability to create / delete text files from scratch (the core of each program’s configuration) and directories (where you will organize files and other directories), and to find out the type of existing files. + +The [touch command][1] can be used not only to create empty files, but also to update the access and modification times of existing files. + +![touch command example](http://www.tecmint.com/wp-content/uploads/2015/03/touch-command-example.png) + +touch command example + +You can use `file [filename]` to determine a file’s type (this will come in handy before launching your preferred text editor to edit it). + +![file command example](http://www.tecmint.com/wp-content/uploads/2015/03/file-command-example.png) + +file command example + +and `rm [filename]` to delete it. + +![Linux rm command examples](http://www.tecmint.com/wp-content/uploads/2015/03/rm-command-examples.png) + +rm command example + +As for directories, you can create directories inside existing paths with `mkdir [directory]` or create a full path with `mkdir -p [/full/path/to/directory].` + +![mkdir command example](http://www.tecmint.com/wp-content/uploads/2015/03/mkdir-command-example.png) + +mkdir command example + +When it comes to removing directories, you need to make sure that they’re empty before issuing the `rmdir [directory]` command, or use the more powerful (handle with care!) `rm -rf [directory]`. This last option will force remove recursively the `[directory]` and all its contents – so use it at your own risk. + +### Input and Output Redirection and Pipelining ### + +The command line environment provides two very useful features that allows to redirect the input and output of commands from and to files, and to send the output of a command to another, called redirection and pipelining, respectively. + +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. + +- Standard input (aka stdin) is by default attached to the keyboard. In other words, the keyboard is the standard input device to enter commands to the command line. +- Standard output (aka stdout) is by default attached to the screen, the device that “receives” the output of commands and display them on the screen. +- Standard error (aka stderr), is where the status messages of a command is sent to by default, which is also the screen. + +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. + +![Linux input output redirect](http://www.tecmint.com/wp-content/uploads/2015/03/Linux-input-output-redirect.png) + +Input and Output Example + +To more easily identify these special files, they are each assigned a file descriptor, an abstract representation that is used to access them. The essential thing to understand is that these files, just like others, can be redirected. What this means is that you can capture the output from a file or script and send it as input to another file, command, or script. This will allow you to store on disk, for example, the output of commands for later processing or analysis. + +To redirect stdin (fd 0), stdout (fd 1), or stderr (fd 2), the following operators are available. + +注:表格 +
-

它表明,该文件使用扩展到映射磁盘上的块

+

它表明,该文件使用磁盘上的块的映射扩展

-

在文件上启用这个属性时,我们不能更改,重命名或者删除这个文件

+

在文件上启用这个属性时,我们不能更改、重命名或者删除这个文件

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Redirection OperatorEffect
>Redirects standard output to a file containing standard output. If the destination file exists, it will be overwritten.
>>Appends standard output to a file.
2>Redirects standard error to a file containing standard output. If the destination file exists, it will be overwritten.
2>>Appends standard error to the existing file.
&>Redirects both standard output and standard error to a file; if the specified file exists, it will be overwritten.
<Uses the specified file as standard input.
<>The specified file is used for both standard input and standard output.
+ +As opposed to redirection, pipelining is performed by adding a vertical bar `(|)` after a command and before another one. + +Remember: + +- Redirection is used to send the output of a command to a file, or to send a file as input to a command. +- Pipelining is used to send the output of a command to another command as input. + +#### Examples Of Redirection and Pipelining #### + +**Example 1: Redirecting the output of a command to a file** + +There will be times when you will need to iterate over a list of files. To do that, you can first save that list to a file and then read that file line by line. While it is true that you can iterate over the output of ls directly, this example serves to illustrate redirection. + + # 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) + +Redirect output of command tot a file + +**Example 2: Redirecting both stdout and stderr to /dev/null** + +In case we want to prevent both stdout and stderr to be displayed on the screen, we can redirect both file descriptors to `/dev/null`. Note how the output changes when the redirection is implemented for the same command. + + # 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) + +Redirecting stdout and stderr ouput to /dev/null + +#### Example 3: Using a file as input to a command #### + +While the classic syntax of the [cat command][2] is as follows. + + # cat [file(s)] + +You can also send a file as input, using the correct redirection operator. + + # cat < mail.txt + +![Linux cat command examples](http://www.tecmint.com/wp-content/uploads/2015/03/cat-command-examples.png) + +cat command example + +#### Example 4: Sending the output of a command as input to another #### + +If you have a large directory or process listing and want to be able to locate a certain file or process at a glance, you will want to pipeline the listing to grep. + +Note that we use to pipelines in the following example. The first one looks for the required keyword, while the second one will eliminate the actual `grep command` from the results. This example lists all the processes associated with the apache user. + + # 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) + +Send output of command as input to another + +### Archiving, Compressing, Unpacking, and Uncompressing Files ### + +If you need to transport, backup, or send via email a group of files, you will use an archiving (or grouping) tool such as [tar][3], typically used with a compression utility like gzip, bzip2, or xz. + +Your choice of a compression tool will be likely defined by the compression speed and rate of each one. Of these three compression tools, gzip is the oldest and provides the least compression, bzip2 provides improved compression, and xz is the newest and provides the best compression. Typically, files compressed with these utilities have .gz, .bz2, or .xz extensions, respectively. + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CommandAbbreviationDescription
–createcCreates a tar archive
–concatenateAAppends tar files to an archive
–appendrAppends non-tar files to an archive
–updateuAppends files that are newer than those in an archive
–diff or –comparedCompares an archive to files on disk
–listtLists the contents of a tarball
–extract or –getxExtracts files from an archive
+ +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Operation modifierAbbreviationDescription
directory dir CChanges to directory dir before performing operations
same-permissions and same-owner pPreserves permissions and ownership information, respectively.
–verbose vLists all files as they are read or extracted; if combined with –list, it also displays file sizes, ownership, and timestamps
exclude fileExcludes file from the archive. In this case, file can be an actual file or a pattern.
gzip or gunzip zCompresses an archive through gzip
–bzip2 jCompresses an archive through bzip2
–xz JCompresses an archive through xz
+ +#### Example 5: Creating a tarball and then compressing it using the three compression utilities #### + +You may want to compare the effectiveness of each tool before deciding to use one or another. Note that while compressing small files, or a few files, the results may not show much differences, but may give you a glimpse of what they have to offer. + + # 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 + # tar cjf ApacheLogs-$(date +%Y%m%d).tar.bz2 /var/log/httpd/* # Create a tarball and compress with bzip2 + # tar cJf ApacheLogs-$(date +%Y%m%d).tar.xz /var/log/httpd/* # Create a tarball and compress with xz + +![Linux tar command examples](http://www.tecmint.com/wp-content/uploads/2015/03/tar-command-examples.png) + +tar command examples + +#### Example 6: Preserving original permissions and ownership while archiving and when #### + +If you are creating backups from users’ home directories, you will want to store the individual files with the original permissions and ownership instead of changing them to that of the user account or daemon performing the backup. The following example preserves these attributes while taking the backup of the contents in the `/var/log/httpd` directory: + + # tar cJf ApacheLogs-$(date +%Y%m%d).tar.xz /var/log/httpd/* --same-permissions --same-owner + +### Create Hard and Soft Links ### + +In Linux, there are two types of links to files: hard links and soft (aka symbolic) links. Since a hard link represents another name for an existing file and is identified by the same inode, it then points to the actual data, as opposed to symbolic links, which point to filenames instead. + +In addition, hard links do not occupy space on disk, while symbolic links do take a small amount of space to store the text of the link itself. The downside of hard links is that they can only be used to reference files within the filesystem where they are located because inodes are unique inside a filesystem. Symbolic links save the day, in that they point to another file or directory by name rather than by inode, and therefore can cross filesystem boundaries. + +The basic syntax to create links is similar in both cases: + + # ln TARGET LINK_NAME # Hard link named LINK_NAME to file named TARGET + # ln -s TARGET LINK_NAME # Soft link named LINK_NAME to file named TARGET + +#### Example 7: Creating hard and soft links #### + +There is no better way to visualize the relation between a file and a hard or symbolic link that point to it, than to create those links. In the following screenshot you will see that the file and the hard link that points to it share the same inode and both are identified by the same disk usage of 466 bytes. + +On the other hand, creating a hard link results in an extra disk usage of 5 bytes. Not that you’re going to run out of storage capacity, but this example is enough to illustrate the difference between a hard link and a soft link. + +![Difference between a hard link and a soft link](http://www.tecmint.com/wp-content/uploads/2015/03/hard-soft-link.png) + +Difference between a hard link and a soft link + +A typical usage of symbolic links is to reference a versioned file in a Linux system. Suppose there are several programs that need access to file fooX.Y, which is subject to frequent version updates (think of a library, for example). Instead of updating every single reference to fooX.Y every time there’s a version update, it is wiser, safer, and faster, to have programs look to a symbolic link named just foo, which in turn points to the actual fooX.Y. + +Thus, when X and Y change, you only need to edit the symbolic link foo with a new destination name instead of tracking every usage of the destination file and updating it. + +### Summary ### + +In this article we have reviewed some essential file and directory management skills that must be a part of every system administrator’s tool-set. Make sure to review other parts of this series as well in order to integrate these topics with the content covered in this tutorial. + +Feel free to let us know if you have any questions or comments. We are always more than glad to hear from our readers. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/file-and-directory-management-in-linux/ + +作者:[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/8-pratical-examples-of-linux-touch-command/ +[2]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ +[3]:http://www.tecmint.com/18-tar-command-examples-in-linux/ \ No newline at end of file diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md new file mode 100644 index 0000000000..be78c87e3a --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md @@ -0,0 +1,248 @@ +RHCSA Series: How to Manage Users and Groups in RHEL 7 – Part 3 +================================================================================ +Managing a RHEL 7 server, as it is the case with any other Linux server, will require that you know how to add, edit, suspend, or delete user accounts, and grant users the necessary permissions to files, directories, and other system resources to perform their assigned tasks. + +![User and Group Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/User-and-Group-Management-in-Linux.png) + +RHCSA: User and Group Management – Part 3 + +### Managing User Accounts ### + +To add a new user account to a RHEL 7 server, you can run either of the following two commands as root: + + # adduser [new_account] + # useradd [new_account] + +When a new user account is added, by default the following operations are performed. + +- His/her home directory is created (`/home/username` unless specified otherwise). +- These `.bash_logout`, `.bash_profile` and `.bashrc` hidden files are copied inside the user’s home directory, and will be used to provide environment variables for his/her user session. You can explore each of them for further details. +- A mail spool directory is created for the added user account. +- A group is created with the same name as the new user account. + +The full account summary is stored in the `/etc/passwd `file. This file holds a record per system user account and has the following format (fields are separated by a colon): + + [username]:[x]:[UID]:[GID]:[Comment]:[Home directory]:[Default shell] + +- These two fields `[username]` and `[Comment]` are self explanatory. +- The second filed ‘x’ indicates that the account is secured by a shadowed password (in `/etc/shadow`), which is used to logon as `[username]`. +- The fields `[UID]` and `[GID]` are integers that shows the User IDentification and the primary Group IDentification to which `[username]` belongs, equally. + +Finally, + +- The `[Home directory]` shows the absolute location of `[username]’s` home directory, and +- `[Default shell]` is the shell that is commit to this user when he/she logins into the system. + +Another important file that you must become familiar with is `/etc/group`, where group information is stored. As it is the case with `/etc/passwd`, there is one record per line and its fields are also delimited by a colon: + + [Group name]:[Group password]:[GID]:[Group members] + +where, + +- `[Group name]` is the name of group. +- Does this group use a group password? (An “x” means no). +- `[GID]`: same as in `/etc/passwd`. +- `[Group members]`: a list of users, separated by commas, that are members of each group. + +After adding an account, at anytime, you can edit the user’s account information using usermod, whose basic syntax is: + + # usermod [options] [username] + +Read Also: + +- [15 ‘useradd’ Command Examples][1] +- [15 ‘usermod’ Command Examples][2] + +#### EXAMPLE 1: Setting the expiry date for an account #### + +If you work for a company that has some kind of policy to enable account for a certain interval of time, or if you want to grant access to a limited period of time, you can use the `--expiredate` flag followed by a date in YYYY-MM-DD format. To verify that the change has been applied, you can compare the output of + + # chage -l [username] + +before and after updating the account expiry date, as shown in the following image. + +![Change User Account Information](http://www.tecmint.com/wp-content/uploads/2015/03/Change-User-Account-Information.png) + +Change User Account Information + +#### EXAMPLE 2: Adding the user to supplementary groups #### + +Besides the primary group that is created when a new user account is added to the system, a user can be added to supplementary groups using the combined -aG, or –append –groups options, followed by a comma separated list of groups. + +#### EXAMPLE 3: Changing the default location of the user’s home directory and / or changing its shell #### + +If for some reason you need to change the default location of the user’s home directory (other than /home/username), you will need to use the -d, or –home options, followed by the absolute path to the new home directory. + +If a user wants to use another shell other than bash (for example, sh), which gets assigned by default, use usermod with the –shell flag, followed by the path to the new shell. + +#### EXAMPLE 4: Displaying the groups an user is a member of #### + +After adding the user to a supplementary group, you can verify that it now actually belongs to such group(s): + + # groups [username] + # id [username] + +The following image depicts Examples 2 through 4: + +![Adding User to Supplementary Group](http://www.tecmint.com/wp-content/uploads/2015/03/Adding-User-to-Supplementary-Group.png) + +Adding User to Supplementary Group + +In the example above: + + # usermod --append --groups gacanepa,users --home /tmp --shell /bin/sh tecmint + +To remove a user from a group, omit the `--append` switch in the command above and list the groups you want the user to belong to following the `--groups` flag. + +#### EXAMPLE 5: Disabling account by locking password #### + +To disable an account, you will need to use either the -l (lowercase L) or the –lock option to lock a user’s password. This will prevent the user from being able to log on. + +#### EXAMPLE 6: Unlocking password #### + +When you need to re-enable the user so that he can log on to the server again, use the -u or the –unlock option to unlock a user’s password that was previously blocked, as explained in Example 5 above. + + # usermod --unlock tecmint + +The following image illustrates Examples 5 and 6: + +![Lock Unlock User Account](http://www.tecmint.com/wp-content/uploads/2015/03/Lock-Unlock-User-Account.png) + +Lock Unlock User Account + +#### EXAMPLE 7: Deleting a group or an user account #### + +To delete a group, you’ll want to use groupdel, whereas to delete a user account you will use userdel (add the –r switch if you also want to delete the contents of its home directory and mail spool): + + # groupdel [group_name] # Delete a group + # userdel -r [user_name] # Remove user_name from the system, along with his/her home directory and mail spool + +If there are files owned by group_name, they will not be deleted, but the group owner will be set to the GID of the group that was deleted. + +### Listing, Setting and Changing Standard ugo/rwx Permissions ### + +The well-known [ls command][3] is one of the best friends of any system administrator. When used with the -l flag, this tool allows you to view a list a directory’s contents in long (or detailed) format. + +However, this command can also be applied to a single file. Either way, the first 10 characters in the output of `ls -l` represent each file’s attributes. + +The first char of this 10-character sequence is used to indicate the file type: + +- – (hyphen): a regular file +- d: a directory +- l: a symbolic link +- c: a character device (which treats data as a stream of bytes, i.e. a terminal) +- b: a block device (which handles data in blocks, i.e. storage devices) + +The next nine characters of the file attributes, divided in groups of three from left to right, are called the file mode and indicate the read (r), write(w), and execute (x) permissions granted to the file’s owner, the file’s group owner, and the rest of the users (commonly referred to as “the world”), respectively. + +While the read permission on a file allows the same to be opened and read, the same permission on a directory allows its contents to be listed if the execute permission is also set. In addition, the execute permission in a file allows it to be handled as a program and run. + +File permissions are changed with the chmod command, whose basic syntax is as follows: + + # chmod [new_mode] file + +where new_mode is either an octal number or an expression that specifies the new permissions. Feel free to use the mode that works best for you in each case. Or perhaps you already have a preferred way to set a file’s permissions – so feel free to use the method that works best for you. + +The octal number can be calculated based on the binary equivalent, which can in turn be obtained from the desired file permissions for the owner of the file, the owner group, and the world.The presence of a certain permission equals a power of 2 (r=22, w=21, x=20), while its absence means 0. For example: + +![File Permissions](http://www.tecmint.com/wp-content/uploads/2015/03/File-Permissions.png) + +File Permissions + +To set the file’s permissions as indicated above in octal form, type: + + # chmod 744 myfile + +Please take a minute to compare our previous calculation to the actual output of `ls -l` after changing the file’s permissions: + +![Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/Long-List-Format.png) + +Long List Format + +#### EXAMPLE 8: Searching for files with 777 permissions #### + +As a security measure, you should make sure that files with 777 permissions (read, write, and execute for everyone) are avoided like the plague under normal circumstances. Although we will explain in a later tutorial how to more effectively locate all the files in your system with a certain permission set, you can -by now- combine ls with grep to obtain such information. + +In the following example, we will look for file with 777 permissions in the /etc directory only. Note that we will use pipelining as explained in [Part 2: File and Directory Management][4] of this RHCSA series: + + # ls -l /etc | grep rwxrwxrwx + +![Find All Files with 777 Permission](http://www.tecmint.com/wp-content/uploads/2015/03/Find-All-777-Files.png) + +Find All Files with 777 Permission + +#### EXAMPLE 9: Assigning a specific permission to all users #### + +Shell scripts, along with some binaries that all users should have access to (not just their corresponding owner and group), should have the execute bit set accordingly (please note that we will discuss a special case later): + + # chmod a+x script.sh + +**Note**: That we can also set a file’s mode using an expression that indicates the owner’s rights with the letter `u`, the group owner’s rights with the letter `g`, and the rest with `o`. All of these rights can be represented at the same time with the letter `a`. Permissions are granted (or revoked) with the `+` or `-` signs, respectively. + +![Set Execute Permission on File](http://www.tecmint.com/wp-content/uploads/2015/03/Set-Execute-Permission-on-File.png) + +Set Execute Permission on File + +A long directory listing also shows the file’s owner and its group owner in the first and second columns, respectively. This feature serves as a first-level access control method to files in a system: + +![Check File Owner and Group](http://www.tecmint.com/wp-content/uploads/2015/03/Check-File-Owner-and-Group.png) + +Check File Owner and Group + +To change file ownership, you will use the chown command. Note that you can change the file and group ownership at the same time or separately: + + # chown user:group file + +**Note**: That you can change the user or group, or the two attributes at the same time, as long as you don’t forget the colon, leaving user or group blank if you want to update the other attribute, for example: + + # chown :group file # Change group ownership only + # chown user: file # Change user ownership only + +#### EXAMPLE 10: Cloning permissions from one file to another #### + +If you would like to “clone” ownership from one file to another, you can do so using the –reference flag, as follows: + + # chown --reference=ref_file file + +where the owner and group of ref_file will be assigned to file as well: + +![Clone File Ownership](http://www.tecmint.com/wp-content/uploads/2015/03/Clone-File-Ownership.png) + +Clone File Ownership + +### Setting Up SETGID Directories for Collaboration ### + +Should you need to grant access to all the files owned by a certain group inside a specific directory, you will most likely use the approach of setting the setgid bit for such directory. When the setgid bit is set, the effective GID of the real user becomes that of the group owner. + +Thus, any user can access a file under the privileges granted to the group owner of such file. In addition, when the setgid bit is set on a directory, newly created files inherit the same group as the directory, and newly created subdirectories will also inherit the setgid bit of the parent directory. + + # chmod g+s [filename] + +To set the setgid in octal form, prepend the number 2 to the current (or desired) basic permissions. + + # chmod 2755 [directory] + +### Conclusion ### + +A solid knowledge of user and group management, along with standard and special Linux permissions, when coupled with practice, will allow you to quickly identify and troubleshoot issues with file permissions in your RHEL 7 server. + +I assure you that as you follow the steps outlined in this article and use the system documentation (as explained in [Part 1: Reviewing Essential Commands & System Documentation][5] of this series) you will master this essential competence of system administration. + +Feel free to let us know if you have any questions or comments using the form below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ + +作者:[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/add-users-in-linux/ +[2]:http://www.tecmint.com/usermod-command-examples/ +[3]:http://www.tecmint.com/ls-interview-questions/ +[4]:http://www.tecmint.com/file-and-directory-management-in-linux/ +[5]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ \ No newline at end of file diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md b/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md new file mode 100644 index 0000000000..1529fecf2e --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md @@ -0,0 +1,254 @@ +RHCSA Series: Editing Text Files with Nano and Vim / Analyzing text with grep and regexps – Part 4 +================================================================================ +Every system administrator has to deal with text files as part of his daily responsibilities. That includes editing existing files (most likely configuration files), or creating new ones. It has been said that if you want to start a holy war in the Linux world, you can ask sysadmins what their favorite text editor is and why. We are not going to do that in this article, but will present a few tips that will be helpful to use two of the most widely used text editors in RHEL 7: nano (due to its simplicity and easiness of use, specially to new users), and vi/m (due to its several features that convert it into more than a simple editor). I am sure that you can find many more reasons to use one or the other, or perhaps some other editor such as emacs or pico. It’s entirely up to you. + +![Learn Nano and vi Editors](http://www.tecmint.com/wp-content/uploads/2015/03/Learn-Nano-and-vi-Editors.png) + +RHCSA: Editing Text Files with Nano and Vim – Part 4 + +### Editing Files with Nano Editor ### + +To launch nano, you can either just type nano at the command prompt, optionally followed by a filename (in this case, if the file exists, it will be opened in edition mode). If the file does not exist, or if we omit the filename, nano will also be opened in edition mode but will present a blank screen for us to start typing: + +![Nano Editor](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Editor.png) + +Nano Editor + +As you can see in the previous image, nano displays at the bottom of the screen several functions that are available via the indicated shortcuts (^, aka caret, indicates the Ctrl key). To name a few of them: + +- Ctrl + G: brings up the help menu with a complete list of functions and descriptions:Ctrl + X: exits the current file. If changes have not been saved, they are discarded. +- Ctrl + R: lets you choose a file to insert its contents into the present file by specifying a full path. + +![Nano Editor Help Menu](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Help.png) + +Nano Editor Help Menu + +- Ctrl + O: saves changes made to a file. It will let you save the file with the same name or a different one. Then press Enter to confirm. + +![Nano Editor Save Changes Mode](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Save-Changes.png) + +Nano Editor Save Changes Mode + +- Ctrl + X: exits the current file. If changes have not been saved, they are discarded. +- Ctrl + R: lets you choose a file to insert its contents into the present file by specifying a full path. + +![Nano: Insert File Content to Parent File](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-File-Content.png) + +Nano: Insert File Content to Parent File + +will insert the contents of /etc/passwd into the current file. + +- Ctrl + K: cuts the current line. +- Ctrl + U: paste. +- Ctrl + C: cancels the current operation and places you at the previous screen. + +To easily navigate the opened file, nano provides the following features: + +- Ctrl + F and Ctrl + B move the cursor forward or backward, whereas Ctrl + P and Ctrl + N move it up or down one line at a time, respectively, just like the arrow keys. +- Ctrl + space and Alt + space move the cursor forward and backward one word at a time. + +Finally, + +- Ctrl + _ (underscore) and then entering X,Y will take you precisely to Line X, column Y, if you want to place the cursor at a specific place in the document. + +![Navigate to Line Numbers in Nano](http://www.tecmint.com/wp-content/uploads/2015/03/Column-Numbers.png) + +Navigate to Line Numbers in Nano + +The example above will take you to line 15, column 14 in the current document. + +If you can recall your early Linux days, specially if you came from Windows, you will probably agree that starting off with nano is the best way to go for a new user. + +### Editing Files with Vim Editor ### + +Vim is an improved version of vi, a famous text editor in Linux that is available on all POSIX-compliant *nix systems, such as RHEL 7. If you have the chance and can install vim, go ahead; if not, most (if not all) the tips given in this article should also work. + +One of vim’s distinguishing features is the different modes in which it operates: + + +- Command mode will allow you to browse through the file and enter commands, which are brief and case-sensitive combinations of one or more letters. If you need to repeat one of them a certain number of times, you can prefix it with a number (there are only a few exceptions to this rule). For example, yy (or Y, short for yank) copies the entire current line, whereas 4yy (or 4Y) copies the entire current line along with the next three lines (4 lines in total). +- In ex mode, you can manipulate files (including saving a current file and running outside programs or commands). To enter ex mode, we must type a colon (:) starting from command mode (or in other words, Esc + :), directly followed by the name of the ex-mode command that you want to use. +- In insert mode, which is accessed by typing the letter i, we simply enter text. Most keystrokes result in text appearing on the screen. +- We can always enter command mode (regardless of the mode we’re working on) by pressing the Esc key. + +Let’s see how we can perform the same operations that we outlined for nano in the previous section, but now with vim. Don’t forget to hit the Enter key to confirm the vim command! + +To access vim’s full manual from the command line, type :help while in command mode and then press Enter: + +![vim Edito Help Menu](http://www.tecmint.com/wp-content/uploads/2015/03/vim-Help-Menu.png) + +vim Edito Help Menu + +The upper section presents an index list of contents, with defined sections dedicated to specific topics about vim. To navigate to a section, place the cursor over it and press Ctrl + ] (closing square bracket). Note that the bottom section displays the current file. + +1. To save changes made to a file, run any of the following commands from command mode and it will do the trick: + + :wq! + :x! + ZZ (yes, double Z without the colon at the beginning) + +2. To exit discarding changes, use :q!. This command will also allow you to exit the help menu described above, and return to the current file in command mode. + +3. Cut N number of lines: type Ndd while in command mode. + +4. Copy M number of lines: type Myy while in command mode. + +5. Paste lines that were previously cutted or copied: press the P key while in command mode. + +6. To insert the contents of another file into the current one: + + :r filename + +For example, to insert the contents of `/etc/fstab`, do: + +![Insert Content of File in vi Editor](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-Content-vi-Editor.png) + +Insert Content of File in vi Editor + +7. To insert the output of a command into the current document: + + :r! command + +For example, to insert the date and time in the line below the current position of the cursor: + +![Insert Time an Date in vi Editor](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-Time-and-Date-in-vi-Editor.png) + +Insert Time an Date in vi Editor + +In another article that I wrote for, ([Part 2 of the LFCS series][1]), I explained in greater detail the keyboard shortcuts and functions available in vim. You may want to refer to that tutorial for further examples on how to use this powerful text editor. + +### Analyzing Text with Grep and Regular Expressions ### + +By now you have learned how to create and edit files using nano or vim. Say you become a text editor ninja, so to speak – now what? Among other things, you will also need how to search for regular expressions inside text. + +A regular expression (also known as “regex” or “regexp“) is a way of identifying a text string or pattern so that a program can compare the pattern against arbitrary text strings. Although the use of regular expressions along with grep would deserve an entire article on its own, let us review the basics here: + +**1. The simplest regular expression is an alphanumeric string (i.e., the word “svm”) or two (when two are present, you can use the | (OR) operator):** + + # grep -Ei 'svm|vmx' /proc/cpuinfo + +The presence of either of those two strings indicate that your processor supports virtualization: + +![Regular Expression Example](http://www.tecmint.com/wp-content/uploads/2015/03/Regular-Expression-Example.png) + +Regular Expression Example + +**2. A second kind of a regular expression is a range list, enclosed between square brackets.** + +For example, `c[aeiou]t` matches the strings cat, cet, cit, cot, and cut, whereas `[a-z]` and `[0-9]` match any lowercase letter or decimal digit, respectively. If you want to repeat the regular expression X certain number of times, type `{X}` immediately following the regexp. + +For example, let’s extract the UUIDs of storage devices from `/etc/fstab`: + + # grep -Ei '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o /etc/fstab + +![Extract String from a File in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Extract-String-from-a-File.png) + +Extract String from a File + +The first expression in brackets `[0-9a-f]` is used to denote lowercase hexadecimal characters, and `{8}` is a quantifier that indicates the number of times that the preceding match should be repeated (the first sequence of characters in an UUID is a 8-character long hexadecimal string). + +The parentheses, the `{4}` quantifier, and the hyphen indicate that the next sequence is a 4-character long hexadecimal string, and the quantifier that follows `({3})` denote that the expression should be repeated 3 times. + +Finally, the last sequence of 12-character long hexadecimal string in the UUID is retrieved with `[0-9a-f]{12}`, and the -o option prints only the matched (non-empty) parts of the matching line in /etc/fstab. + +**3. POSIX character classes.** + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Character ClassMatches…
 [[:alnum:]] Any alphanumeric [a-zA-Z0-9] character
 [[:alpha:]] Any alphabetic [a-zA-Z] character
 [[:blank:]] Spaces or tabs
 [[:cntrl:]] Any control characters (ASCII 0 to 32)
 [[:digit:]] Any numeric digits [0-9]
 [[:graph:]] Any visible characters
 [[:lower:]] Any lowercase [a-z] character
 [[:print:]] Any non-control characters
 [[:space:]] Any whitespace
 [[:punct:]] Any punctuation marks
 [[:upper:]] Any uppercase [A-Z] character
 [[:xdigit:]] Any hex digits [0-9a-fA-F]
 [:word:] Any letters, numbers, and underscores [a-zA-Z0-9_]
+ +For example, we may be interested in finding out what the used UIDs and GIDs (refer to [Part 2][2] of this series to refresh your memory) are for real users that have been added to our system. Thus, we will search for sequences of 4 digits in /etc/passwd: + + # grep -Ei [[:digit:]]{4} /etc/passwd + +![Search For a String in File](http://www.tecmint.com/wp-content/uploads/2015/03/Search-For-String-in-File.png) + +Search For a String in File + +The above example may not be the best case of use of regular expressions in the real world, but it clearly illustrates how to use POSIX character classes to analyze text along with grep. + +### Conclusion ### + +In this article we have provided some tips to make the most of nano and vim, two text editors for the command-line users. Both tools are supported by extensive documentation, which you can consult in their respective official web sites (links given below) and using the suggestions given in [Part 1][3] of this series. + +#### Reference Links #### + +- [http://www.nano-editor.org/][4] +- [http://www.vim.org/][5] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-how-to-use-nano-vi-editors/ + +作者:[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/vi-editor-usage/ +[2]:http://www.tecmint.com/file-and-directory-management-in-linux/ +[3]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ +[4]:http://www.nano-editor.org/ +[5]:http://www.vim.org/ \ No newline at end of file diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md b/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md new file mode 100644 index 0000000000..2befb7bc55 --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md @@ -0,0 +1,216 @@ +RHCSA Series: Process Management in RHEL 7: Boot, Shutdown, and Everything in Between – Part 5 +================================================================================ +We will start this article with an overall and brief revision of what happens since the moment you press the Power button to turn on your RHEL 7 server until you are presented with the login screen in a command line interface. + +![RHEL 7 Boot Process](http://www.tecmint.com/wp-content/uploads/2015/03/RHEL-7-Boot-Process.png) + +Linux Boot Process + +**Please note that:** + +1. the same basic principles apply, with perhaps minor modifications, to other Linux distributions as well, and +2. the following description is not intended to represent an exhaustive explanation of the boot process, but only the fundamentals. + +### Linux Boot Process ### + +1. The POST (Power On Self Test) initializes and performs hardware checks. + +2. When the POST finishes, the system control is passed to the first stage boot loader, which is stored on either the boot sector of one of the hard disks (for older systems using BIOS and MBR), or a dedicated (U)EFI partition. + +3. The first stage boot loader then loads the second stage boot loader, most usually GRUB (GRand Unified Boot Loader), which resides inside /boot, which in turn loads the kernel and the initial RAM–based file system (also known as initramfs, which contains programs and binary files that perform the necessary actions needed to ultimately mount the actual root filesystem). + +4. We are presented with a splash screen that allows us to choose an operating system and kernel to boot: + +![RHEL 7 Boot Screen](http://www.tecmint.com/wp-content/uploads/2015/03/RHEL-7-Boot-Screen.png) + +Boot Menu Screen + +5. The kernel sets up the hardware attached to the system and once the root filesystem has been mounted, launches process with PID 1, which in turn will initialize other processes and present us with a login prompt. + +Note: That if we wish to do so at a later time, we can examine the specifics of this process using the [dmesg command][1] and filtering its output using the tools that we have explained in previous articles of this series. + +![Login Screen and Process PID](http://www.tecmint.com/wp-content/uploads/2015/03/Login-Screen-Process-PID.png) + +Login Screen and Process PID + +In the example above, we used the well-known ps command to display a list of current processes whose parent process (or in other words, the process that started them) is systemd (the system and service manager that most modern Linux distributions have switched to) during system startup: + + # ps -o ppid,pid,uname,comm --ppid=1 + +Remember that the -o flag (short for –format) allows you to present the output of ps in a customized format to suit your needs using the keywords specified in the STANDARD FORMAT SPECIFIERS section in man ps. + +Another case in which you will want to define the output of ps instead of going with the default is when you need to find processes that are causing a significant CPU and / or memory load, and sort them accordingly: + + # ps aux --sort=+pcpu # Sort by %CPU (ascending) + # ps aux --sort=-pcpu # Sort by %CPU (descending) + # ps aux --sort=+pmem # Sort by %MEM (ascending) + # ps aux --sort=-pmem # Sort by %MEM (descending) + # ps aux --sort=+pcpu,-pmem # Combine sort by %CPU (ascending) and %MEM (descending) + +![http://www.tecmint.com/wp-content/uploads/2015/03/ps-command-output.png](http://www.tecmint.com/wp-content/uploads/2015/03/ps-command-output.png) + +Customize ps Command Output + +### An Introduction to SystemD ### + +Few decisions in the Linux world have caused more controversies than the adoption of systemd by major Linux distributions. Systemd’s advocates name as its main advantages the following facts: + +Read Also: [The Story Behind ‘init’ and ‘systemd’][2] + +1. Systemd allows more processing to be done in parallel during system startup (as opposed to older SysVinit, which always tends to be slower because it starts processes one by one, checks if one depends on another, and then waits for daemons to launch so more services can start), and + +2. It works as a dynamic resource management in a running system. Thus, services are started when needed (to avoid consuming system resources if they are not being used) instead of being launched without a valid reason during boot. + +3. Backwards compatibility with SysVinit scripts. + +Systemd is controlled by the systemctl utility. If you come from a SysVinit background, chances are you will be familiar with: + +- the service tool, which -in those older systems- was used to manage SysVinit scripts, and +- the chkconfig utility, which served the purpose of updating and querying runlevel information for system services. +- shutdown, which you must have used several times to either restart or halt a running system. + +The following table shows the similarities between the use of these legacy tools and systemctl: + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Legacy toolSystemctl equivalentDescription
service name startsystemctl start nameStart name (where name is a service)
service name stopsystemctl stop nameStop name
service name condrestartsystemctl try-restart nameRestarts name (if it’s already running)
service name restartsystemctl restart nameRestarts name
service name reloadsystemctl reload nameReloads the configuration for name
service name statussystemctl status nameDisplays the current status of name
service –status-allsystemctlDisplays the status of all current services
chkconfig name onsystemctl enable nameEnable name to run on startup as specified in the unit file (the file to which the symlink points). The process of enabling or disabling a service to start automatically on boot consists in adding or removing symbolic links inside the /etc/systemd/system directory.
chkconfig name offsystemctl disable nameDisables name to run on startup as specified in the unit file (the file to which the symlink points)
chkconfig –list namesystemctl is-enabled nameVerify whether name (a specific service) is currently enabled
chkconfig –listsystemctl –type=serviceDisplays all services and tells whether they are enabled or disabled
shutdown -h nowsystemctl poweroffPower-off the machine (halt)
shutdown -r nowsystemctl rebootReboot the system
+ +Systemd also introduced the concepts of units (which can be either a service, a mount point, a device, or a network socket) and targets (which is how systemd manages to start several related process at the same time, and can be considered -though not equal- as the equivalent of runlevels in SysVinit-based systems. + +### Summing Up ### + +Other tasks related with process management include, but may not be limited to, the ability to: + +**1. Adjust the execution priority as far as the use of system resources is concerned of a process:** + +This is accomplished through the renice utility, which alters the scheduling priority of one or more running processes. In simple terms, the scheduling priority is a feature that allows the kernel (present in versions => 2.6) to allocate system resources as per the assigned execution priority (aka niceness, in a range from -20 through 19) of a given process. + +The basic syntax of renice is as follows: + + # renice [-n] priority [-gpu] identifier + +In the generic command above, the first argument is the priority value to be used, whereas the other argument can be interpreted as process IDs (which is the default setting), process group IDs, user IDs, or user names. A normal user (other than root) can only modify the scheduling priority of a process he or she owns, and only increase the niceness level (which means taking up less system resources). + +![Renice Process in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Process-Scheduling-Priority.png) + +Process Scheduling Priority + +**2. Kill (or interrupt the normal execution) of a process as needed:** + +In more precise terms, killing a process entitles sending it a signal to either finish its execution gracefully (SIGTERM=15) or immediately (SIGKILL=9) through the [kill or pkill commands][3]. + +The difference between these two tools is that the former is used to terminate a specific process or a process group altogether, while the latter allows you to do the same based on name and other attributes. + +In addition, pkill comes bundled with pgrep, which shows you the PIDs that will be affected should pkill be used. For example, before running: + + # pkill -u gacanepa + +It may be useful to view at a glance which are the PIDs owned by gacanepa: + + # pgrep -l -u gacanepa + +![Find PIDs of User](http://www.tecmint.com/wp-content/uploads/2015/03/Find-PIDs-of-User.png) + +Find PIDs of User + +By default, both kill and pkill send the SIGTERM signal to the process. As we mentioned above, this signal can be ignored (while the process finishes its execution or for good), so when you seriously need to stop a running process with a valid reason, you will need to specify the SIGKILL signal on the command line: + + # kill -9 identifier # Kill a process or a process group + # kill -s SIGNAL identifier # Idem + # pkill -s SIGNAL identifier # Kill a process by name or other attributes + +### Conclusion ### + +In this article we have explained the basics of the boot process in a RHEL 7 system, and analyzed some of the tools that are available to help you with managing processes using common utilities and systemd-specific commands. + +Note that this list is not intended to cover all the bells and whistles of this topic, so feel free to add your own preferred tools and commands to this article using the comment form below. Questions and other comments are also welcome. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-boot-process-and-process-management/ + +作者:[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/dmesg-commands/ +[2]:http://www.tecmint.com/systemd-replaces-init-in-linux/ +[3]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ \ No newline at end of file diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md b/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md new file mode 100644 index 0000000000..474b707d23 --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md @@ -0,0 +1,269 @@ +RHCSA Series: Using ‘Parted’ and ‘SSM’ to Configure and Encrypt System Storage – Part 6 +================================================================================ +In this article we will discuss how to set up and configure local system storage in Red Hat Enterprise Linux 7 using classic tools and introducing the System Storage Manager (also known as SSM), which greatly simplifies this task. + +![Configure and Encrypt System Storage](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-and-Encrypt-System-Storage.png) + +RHCSA: Configure and Encrypt System Storage – Part 6 + +Please note that we will present this topic in this article but will continue its description and usage on the next one (Part 7) due to vastness of the subject. + +### Creating and Modifying Partitions in RHEL 7 ### + +In RHEL 7, parted is the default utility to work with partitions, and will allow you to: + +- Display the current partition table +- Manipulate (increase or decrease the size of) existing partitions +- Create partitions using free space or additional physical storage devices + +It is recommended that before attempting the creation of a new partition or the modification of an existing one, you should ensure that none of the partitions on the device are in use (`umount /dev/partition`), and if you’re using part of the device as swap you need to disable it (`swapoff -v /dev/partition`) during the process. + +The easiest way to do this is to boot RHEL in rescue mode using an installation media such as a RHEL 7 installation DVD or USB (Troubleshooting → Rescue a Red Hat Enterprise Linux system) and Select Skip when you’re prompted to choose an option to mount the existing Linux installation, and you will be presented with a command prompt where you can start typing the same commands as shown as follows during the creation of an ordinary partition in a physical device that is not being used. + +![RHEL 7 Rescue Mode](http://www.tecmint.com/wp-content/uploads/2015/04/RHEL-7-Rescue-Mode.png) + +RHEL 7 Rescue Mode + +To start parted, simply type. + + # parted /dev/sdb + +Where `/dev/sdb` is the device where you will create the new partition; next, type print to display the current drive’s partition table: + +![Creat New Partition](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Partition.png) + +Creat New Partition + +As you can see, in this example we are using a virtual drive of 5 GB. We will now proceed to create a 4 GB primary partition and then format it with the xfs filesystem, which is the default in RHEL 7. + +You can choose from a variety of file systems. You will need to manually create the partition with mkpart and then format it with mkfs.fstype as usual because mkpart does not support many modern filesystems out-of-the-box. + +In the following example we will set a label for the device and then create a primary partition `(p)` on `/dev/sdb`, which starts at the 0% percentage of the device and ends at 4000 MB (4 GB): + +![Set Partition Name in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Label-Partition.png) + +Label Partition Name + +Next, we will format the partition as xfs and print the partition table again to verify that changes were applied: + + # mkfs.xfs /dev/sdb1 + # parted /dev/sdb print + +![Format Partition in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Format-Partition-in-Linux.png) + +Format Partition as XFS Filesystem + +For older filesystems, you could use the resize command in parted to resize a partition. Unfortunately, this only applies to ext2, fat16, fat32, hfs, linux-swap, and reiserfs (if libreiserfs is installed). + +Thus, the only way to resize a partition is by deleting it and creating it again (so make sure you have a good backup of your data!). No wonder the default partitioning scheme in RHEL 7 is based on LVM. + +To remove a partition with parted: + + # parted /dev/sdb print + # parted /dev/sdb rm 1 + +![Remove Partition in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Partition-in-Linux.png) + +Remove or Delete Partition + +### The Logical Volume Manager (LVM) ### + +Once a disk has been partitioned, it can be difficult or risky to change the partition sizes. For that reason, if we plan on resizing the partitions on our system, we should consider the possibility of using LVM instead of the classic partitioning system, where several physical devices can form a volume group that will host a defined number of logical volumes, which can be expanded or reduced without any hassle. + +In simple terms, you may find the following diagram useful to remember the basic architecture of LVM. + +![Basic Architecture of LVM](http://www.tecmint.com/wp-content/uploads/2015/04/LVM-Diagram.png) + +Basic Architecture of LVM + +#### Creating Physical Volumes, Volume Group and Logical Volumes #### + +Follow these steps in order to set up LVM using classic volume management tools. Since you can expand this topic reading the [LVM series on this site][1], I will only outline the basic steps to set up LVM, and then compare them to implementing the same functionality with SSM. + +**Note**: That we will use the whole disks `/dev/sdb` and `/dev/sdc` as PVs (Physical Volumes) but it’s entirely up to you if you want to do the same. + +**1. Create partitions `/dev/sdb1` and `/dev/sdc1` using 100% of the available disk space in /dev/sdb and /dev/sdc:** + + # parted /dev/sdb print + # parted /dev/sdc print + +![Create New Partitions](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Partitions.png) + +Create New Partitions + +**2. Create 2 physical volumes on top of /dev/sdb1 and /dev/sdc1, respectively.** + + # pvcreate /dev/sdb1 + # pvcreate /dev/sdc1 + +![Create Two Physical Volumes](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Physical-Volumes.png) + +Create Two Physical Volumes + +Remember that you can use pvdisplay /dev/sd{b,c}1 to show information about the newly created PVs. + +**3. Create a VG on top of the PV that you created in the previous step:** + + # vgcreate tecmint_vg /dev/sd{b,c}1 + +![Create Volume Group in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Volume-Group.png) + +Create Volume Group + +Remember that you can use vgdisplay tecmint_vg to show information about the newly created VG. + +**4. Create three logical volumes on top of VG tecmint_vg, as follows:** + + # lvcreate -L 3G -n vol01_docs tecmint_vg [vol01_docs → 3 GB] + # lvcreate -L 1G -n vol02_logs tecmint_vg [vol02_logs → 1 GB] + # lvcreate -l 100%FREE -n vol03_homes tecmint_vg [vol03_homes → 6 GB] + +![Create Logical Volumes in LVM](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Logical-Volumes.png) + +Create Logical Volumes + +Remember that you can use lvdisplay tecmint_vg to show information about the newly created LVs on top of VG tecmint_vg. + +**5. Format each of the logical volumes with xfs (do NOT use xfs if you’re planning on shrinking volumes later!):** + + # mkfs.xfs /dev/tecmint_vg/vol01_docs + # mkfs.xfs /dev/tecmint_vg/vol02_logs + # mkfs.xfs /dev/tecmint_vg/vol03_homes + +**6. Finally, mount them:** + + # mount /dev/tecmint_vg/vol01_docs /mnt/docs + # mount /dev/tecmint_vg/vol02_logs /mnt/logs + # mount /dev/tecmint_vg/vol03_homes /mnt/homes + +#### Removing Logical Volumes, Volume Group and Physical Volumes #### + +**7. Now we will reverse the LVM implementation and remove the LVs, the VG, and the PVs:** + + # lvremove /dev/tecmint_vg/vol01_docs + # lvremove /dev/tecmint_vg/vol02_logs + # lvremove /dev/tecmint_vg/vol03_homes + # vgremove /dev/tecmint_vg + # pvremove /dev/sd{b,c}1 + +**8. Now let’s install SSM and we will see how to perform the above in ONLY 1 STEP!** + + # yum update && yum install system-storage-manager + +We will use the same names and sizes as before: + + # ssm create -s 3G -n vol01_docs -p tecmint_vg --fstype ext4 /mnt/docs /dev/sd{b,c}1 + # ssm create -s 1G -n vol02_logs -p tecmint_vg --fstype ext4 /mnt/logs /dev/sd{b,c}1 + # ssm create -n vol03_homes -p tecmint_vg --fstype ext4 /mnt/homes /dev/sd{b,c}1 + +Yes! SSM will let you: + +- initialize block devices as physical volumes +- create a volume group +- create logical volumes +- format LVs, and +- mount them using only one command + +**9. We can now display the information about PVs, VGs, or LVs, respectively, as follows:** + + # ssm list dev + # ssm list pool + # ssm list vol + +![Check Information of PVs, VGs, or LVs](http://www.tecmint.com/wp-content/uploads/2015/04/Display-LVM-Information.png) + +Check Information of PVs, VGs, or LVs + +**10. As we already know, one of the distinguishing features of LVM is the possibility to resize (expand or decrease) logical volumes without downtime.** + +Say we are running out of space in vol02_logs but have plenty of space in vol03_homes. We will resize vol03_homes to 4 GB and expand vol02_logs to use the remaining space: + + # ssm resize -s 4G /dev/tecmint_vg/vol03_homes + +Run ssm list pool again and take note of the free space in tecmint_vg: + +![Check Volume Size](http://www.tecmint.com/wp-content/uploads/2015/04/Check-LVM-Free-Space.png) + +Check Volume Size + +Then do: + + # ssm resize -s+1.99 /dev/tecmint_vg/vol02_logs + +**Note**: that the plus sign after the -s flag indicates that the specified value should be added to the present value. + +**11. Removing logical volumes and volume groups is much easier with ssm as well. A simple,** + + # ssm remove tecmint_vg + +will return a prompt asking you to confirm the deletion of the VG and the LVs it contains: + +![Remove Logical Volume and Volume Group](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-LV-VG.png) + +Remove Logical Volume and Volume Group + +### Managing Encrypted Volumes ### + +SSM also provides system administrators with the capability of managing encryption for new or existing volumes. You will need the cryptsetup package installed first: + + # yum update && yum install cryptsetup + +Then issue the following command to create an encrypted volume. You will be prompted to enter a passphrase to maximize security: + + # ssm create -s 3G -n vol01_docs -p tecmint_vg --fstype ext4 --encrypt luks /mnt/docs /dev/sd{b,c}1 + # ssm create -s 1G -n vol02_logs -p tecmint_vg --fstype ext4 --encrypt luks /mnt/logs /dev/sd{b,c}1 + # ssm create -n vol03_homes -p tecmint_vg --fstype ext4 --encrypt luks /mnt/homes /dev/sd{b,c}1 + +Our next task consists in adding the corresponding entries in /etc/fstab in order for those logical volumes to be available on boot. Rather than using the device identifier (/dev/something). + +We will use each LV’s UUID (so that our devices will still be uniquely identified should we add other logical volumes or devices), which we can find out with the blkid utility: + + # blkid -o value UUID /dev/tecmint_vg/vol01_docs + # blkid -o value UUID /dev/tecmint_vg/vol02_logs + # blkid -o value UUID /dev/tecmint_vg/vol03_homes + +In our case: + +![Find Logical Volume UUID](http://www.tecmint.com/wp-content/uploads/2015/04/Logical-Volume-UUID.png) + +Find Logical Volume UUID + +Next, create the /etc/crypttab file with the following contents (change the UUIDs for the ones that apply to your setup): + + docs UUID=ba77d113-f849-4ddf-8048-13860399fca8 none + logs UUID=58f89c5a-f694-4443-83d6-2e83878e30e4 none + homes UUID=92245af6-3f38-4e07-8dd8-787f4690d7ac none + +And insert the following entries in /etc/fstab. Note that device_name (/dev/mapper/device_name) is the mapper identifier that appears in the first column of /etc/crypttab. + + # Logical volume vol01_docs: + /dev/mapper/docs /mnt/docs ext4 defaults 0 2 + # Logical volume vol02_logs + /dev/mapper/logs /mnt/logs ext4 defaults 0 2 + # Logical volume vol03_homes + /dev/mapper/homes /mnt/homes ext4 defaults 0 2 + +Now reboot (systemctl reboot) and you will be prompted to enter the passphrase for each LV. Afterwards you can confirm that the mount operation was successful by checking the corresponding mount points: + +![Verify Logical Volume Mount Points](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-LV-Mount-Points.png) + +Verify Logical Volume Mount Points + +### Conclusion ### + +In this tutorial we have started to explore how to set up and configure system storage using classic volume management tools and SSM, which also integrates filesystem and encryption capabilities in one package. This makes SSM an invaluable tool for any sysadmin. + +Let us know if you have any questions or comments – feel free to use the form below to get in touch with us! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ + +作者:[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/create-lvm-storage-in-linux/ \ No newline at end of file From b2f12c57e60872a6fffbce963039d81e4d9acaf3 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 8 Jun 2015 20:32:51 +0800 Subject: [PATCH 1093/2517] PUB:20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform @geekpi --- ...Now Supports systemd and Google Cloud Platform.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/news => published}/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md (63%) diff --git a/translated/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md b/published/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md similarity index 63% rename from translated/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md rename to published/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md index 4ff1fa23a0..952b673c41 100644 --- a/translated/news/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md +++ b/published/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md @@ -2,15 +2,15 @@ Ubuntu下的Juju现在支持systemd和Google Cloud Platform了 ================================================================================ > Juju已经更新到1.23.3了 -**Cononical旗下的Ubuntu认证公共云总监,Udi Nachmany宣布了juju新版本的发布,一个开源的、解决方案驱动的Ubuntu下的协同工具。** +**Cononical旗下的Ubuntu认证公共云总监Udi Nachmany宣布了juju新版本的发布,一个开源的、解决方案驱动的Ubuntu下的协同工具。** -根据[声明][1]和官方[发布公告][2],Juju 1.23.3是一个非常主流的版本,它打包了那些你想要在云上扩展和管理的包,而没有太多的麻烦。 +根据[声明][1]和官方[发布公告][2],Juju 1.23.3是一个主要版本,它打包了那些你想要在云上扩展和管理的包,而不需太多操作。 -Juju 1.23.3显著的功能是包含了对GCE的支持,支持systemd初始化系统,支持Ubuntu 15.04(Vivid Vervet),新的好玩的功能和对受限网络的支持。 +Juju 1.23.3显著的功能是包含了对GCE的支持,支持systemd初始化系统,支持Ubuntu 15.04(Vivid Vervet),新的好玩的功能和对受限网络的代理支持。 -另外,juju的发布带来了一个新的恢复、新的消息、新的块和实验性地支持Service Leader Elections,还有Ubuntu MAS和AWS上的可寻址的LXC和KVM。 +另外,juju的发布带来了一个新的样式恢复、新的消息、新的块和实验性地支持Service Leader Elections,还有Ubuntu MAS和AWS上的LXC容器和KVM实例。 -Udi Nachmany说:“在一个相关告示中,如果你正在使用Google云平台,你可能已经注意到了Google最近发布了云启动器。如果你密切关注,你同样注意到你说可以使用这个非常友好的UI来启动你的Ubuntu虚拟机。” +Udi Nachmany说:“在一个相关告示中,如果你正在使用Google云平台,你可能已经注意到了Google最近发布了云启动器。如果你观察的足够仔细,你也会注意到你可以使用这个非常友好的UI来启动你的Ubuntu虚拟机。” ![](http://i1-news.softpedia-static.com/images/news2/Ubuntu-s-Juju-Now-Supports-systemd-and-Google-Cloud-Platform-483279-2.jpg) @@ -20,7 +20,7 @@ via: http://linux.softpedia.com/blog/Ubuntu-s-Juju-Now-Supports-systemd-and-Goog 作者:[Marius Nestor][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 89c6e75408abd4096e206ef12cb69cbce3446073 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 8 Jun 2015 21:34:46 +0800 Subject: [PATCH 1094/2517] PUB:20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux @ictlyh --- ...ng Private interface to Internet in Linux.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md (70%) diff --git a/translated/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md b/published/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md similarity index 70% rename from translated/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md rename to published/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md index a8ba20fff0..0b141dcf33 100644 --- a/translated/tech/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md +++ b/published/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md @@ -1,12 +1,13 @@ -Linux 上IP转发如何帮助专用接口连接到互联网 +如何在 Linux 上用 IP转发使内部网络连接到互联网 ================================================================================ -大家好,今天我们学习一下在 Linux 上用 iptables 实现从一个网络接口到另一个接口的IP转发或者数据包转发。IP转发的概念是,使 Linux 机器像路由器一样将数据从一个网络发送到另一个网络。所以,它能作为一个**路由器**或者代理服务器,实现从一个连接到多个客户端机器的共享互联网或者网络连接。 + +大家好,今天我们学习一下在 Linux 上用 iptables 实现从一个网络接口到另一个接口的IP转发(数据包转发)。IP转发的概念是,使 Linux 机器像路由器一样将数据从一个网络发送到另一个网络。所以,它能作为一个**路由器**或者代理服务器,实现将一个连接的互联网或者网络连接共享给多个客户端机器。 这是一些启用IP转发或网络包转发方法的简单步骤。 ### 1. 启用 IPv4 转发 ### -首先,我们打算在我们的 Linux 操作系统上启用 IPv4 转发。要做到这点,我们需要用 sudo 模式在 shell 或终端下执行下面的命令。 +首先,我们需要在我们的 Linux 操作系统上启用 IPv4 转发。要做到这点,我们需要用 sudo 模式在 shell 或终端下执行下面的命令。 $ sudo -s @@ -14,7 +15,7 @@ Linux 上IP转发如何帮助专用接口连接到互联网 ![临时IP转发](http://blog.linoxide.com/wp-content/uploads/2015/03/ip-forward-temporary.png) -**注意:上面的命令能马上启用ip转发,但只是临时的,直到下一次重启。要永久启用,我们需要使用我们喜欢的文本编辑器打开 /etc/sysctl.conf 文件。** +**注意:上面的命令能马上启用ip转发,但只是临时的,直到下一次重启。要永久启用,我们需要使用我们惯用的文本编辑器打开 /etc/sysctl.conf 文件。** # nano /etc/sysctl.conf @@ -38,13 +39,13 @@ Linux 上IP转发如何帮助专用接口连接到互联网 ![Ifconfig](http://blog.linoxide.com/wp-content/uploads/2015/03/ifconfig.png) -这里,在我们的机器中, eth2 是连接到互联网或者网络的网卡接口, wlan2 是我们要使用 iptables 从 eth2 转发数据包的接口。要做到这点,我们需要运行以下命令。 +这里,在我们的机器中, eth2 是连接到互联网或者网络的网卡接口, wlan2 是我们要使用 iptables 从 eth2 转发数据包的接口。要实现转发,我们需要运行以下命令。 # iptables -A FORWARD -i wlan2 -o eth2 -j ACCEPT 注意:请用你 Linux 机器中的可用设备名称替换 wlan2 和 eth2。 -现在,由于网络过滤器是一个无状态的防火墙,我们要用 iptables 允许已建立的连接通过。要做到这点,我们要运行下面的命令。 +现在,由于netfilter/iptables是一个无状态的防火墙,我们需要让 iptables 允许已建立的连接通过。要做到这点,我们要运行下面的命令。 # iptables -A FORWARD -i eth2 -o wlan2 -m state --state ESTABLISHED,RELATED -j ACCEPT @@ -60,7 +61,7 @@ Linux 上IP转发如何帮助专用接口连接到互联网 ### 总结 ### -最后,用安装的 iptables 作为防火墙解决方案,我们在我们的 Linux 机器上成功的配置了从一个接口到另一个接口的数据包转发。这篇文章允许你的专用接口连接到互联网,你不需要桥接接口,而是路由从一个接口进来的数据包到另一个接口,就是这些。如果你有任何问题、建议、反馈,请写到下面的评论框中,然后我们可以改进或更新我们的内容。非常感谢!享受吧 :-) +最后,我们在我们以 iptables 作为防火墙 Linux 机器上成功的配置了从一个接口到另一个接口的数据包转发。这篇文章教给你将你的私有接口连接到互联网,不需要桥接接口,而是将从一个接口进来的数据包路由到另一个接口。就是这些,如果你有任何问题、建议、反馈,请写到下面的评论框中,然后我们可以改进或更新我们的内容。非常感谢!享受吧 :-) -------------------------------------------------------------------------------- @@ -68,7 +69,7 @@ via: http://linoxide.com/firewall/ip-forwarding-connecting-private-interface-int 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7c5b82e7d16d6dd6b3f0f59343c26dccd3e7e9bf Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 8 Jun 2015 23:58:07 +0800 Subject: [PATCH 1095/2517] PUB:20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector @geekpi --- ...e2 With Tomcat 7 Using mod_jk Connector.md | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) rename {translated/tech => published}/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md (54%) diff --git a/translated/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md b/published/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md similarity index 54% rename from translated/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md rename to published/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md index be9297c370..dff5090cfc 100644 --- a/translated/tech/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md +++ b/published/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md @@ -1,65 +1,63 @@ 如何用mod_jk连接器来集成Apache2和Tomcat 7 ================================================================================ -Apache是最流行的web服务器。通常用来接收客户端的请求并响应。它得到一个URL并将它翻译成一个文件名(或者静态请求),并将文件从本地磁盘中通过因特网返回,或者将它翻译成程序名执行它,接着将输出返回给请求方。如果web服务器不能处理和完成请求,它会返回一个错误信息。 +Apache是最流行的web服务器,它通常用来接收客户端的请求并响应。它得到一个URL并将它翻译成一个文件名(或者静态请求),并将文件从本地磁盘中取出,通过因特网返回;或者将它翻译成程序执行它,接着将输出返回给请求方。如果web服务器不能处理和完成请求,它会返回一个错误信息。 -在本篇中,我们会列出Apache的特性以及我们该如何用mod_jk连接器来集成Tomcat7和Tomcat8. +在本篇中,我们会列出Apache的特性以及我们该如何用mod\_jk连接器来集成Tomcat 7和Tomcat 8. ### Apache的特性 ### 如我们所说Apache是最流行的web服务器。下面是流行背后的原因: - 它是自由工具,你可以很简单地下载和安装 -- 它开放源码因此你可以查看源码,调整它,优化它,并且修复错误和安全漏洞。也可以增加新的功能和模块。 +- 它开放源码,因此你可以查看源码,调整它,优化它,并且修复错误和安全漏洞。也可以增加新的功能和模块。 - 它可以用在只有一两个页面的小网站,或者是有成千上万个页面的大网站,每月处理上百万的常规访问者的请求。它可以同时处理静态和动态内容。 -- 提高的缓存模块(mod_cache、 mod_disk_cache、 mod_mem_cache)。 +- 改进的缓存模块(mod\_cache、 mod\_disk\_cache、 mod\_mem\_cache)。 - Apache 2 支持 IPv6. -### Tomcat 目录 ### +### Tomcat 的目录 ### ${tomcat_home} 是tomcat的根目录。你的tomcat安装应该有下面的子目录: - ${tomcat_home}\conf – 存放不同配置文件的地方 - ${tomcat_home}\webapps – 包含示例程序 -- ${tomcat_home}\bin – 存放插件的地方 +- ${tomcat_home}\bin – 存放你的Web服务器的插件的地方 ### Mod_jk 模块 ### -mod_jk有两种可接受的方式:二进制或者源码。取决于你运行的web服务器的平台,二进制版本的mod_jk也许可以找到。如果有二进制版本的话建议使用这个。 +mod\_jk有两种可接受的方式:二进制或者源码。取决于你运行的web服务器的平台,也许有符合你的平台的二进制版本的mod\_jk。如果有的话建议使用这个。 -mod_jk模块在这些平台上开发及测试过: +mod\_jk模块在这些平台上开发及测试过: -- Linux、 FreeBSD、 AIX、 HP-UX、 MacOS X、 Solaris ,应该在主流的Unix平台上都支持Apache 1.3 和/或者 2.x。 -- 0-i386 SP4/SP5/SP6a (应该可以于其他的服务包一起工作), Win2K and WinXP and Win98 +- Linux、 FreeBSD、 AIX、 HP-UX、 MacOS X、 Solaris ,应该在主流的支持Apache 1.3 和/或者 2.x的Unix平台上都工作。 +- WinNT 4.0-i386 SP4/SP5/SP6a (应该可以与其他的服务包一起工作), Win2K 和 WinXP 和 Win98 - Cygwin (需要你有apache服务器及autoconf/automake支持工具) - Netware -- i5/OS V5R4 (System I) 中的 Apache HTTP Server 2.0.58。 确保已经安装了Apache PTF -- Tomcat 3.2 到 Tomcat 8. +- i5/OS V5R4 (System I) ,带有 Apache HTTP Server 2.0.58。 确保已经安装了最新的 Apache PTF +- Tomcat 3.2 到 Tomcat 8 -The mod_jk 需要两个组件: +The mod\_jk 需要两个组件: -- **mod_jk.xxx** – Apache HTTP服务器模块,取决于你的操作系统,它可能是mod_jk.so、mod_jk.nlm或者MOD_JK.SRVPGM。 -- **workers.properties** - 描述主机以及处理器使用的端口(Tomcat进程)。在下载的源码内可以在conf目录下找到workers.properties文件。 +- **mod\_jk.xxx** – Apache HTTP服务器模块,取决于你的操作系统,它可能是mod\_jk.so、mod\_jk.nlm或者mod\_jk.SRVPGM。 +- **workers.properties** - 描述Worker (Tomcat进程)所用的主机以及处理器使用的端口。在下载的源码的conf目录下找到示例的workers.properties文件。 -和Apache HTTP服务器其他的模块一样,mod_jk应该安装在你的Apache服务器下的模块目录下:/usr/lib/apache,你应该更新你的**httpd.conf**文件。 +和Apache HTTP服务器其他的模块一样,mod\_jk应该安装在你的Apache服务器下的模块目录下:/usr/lib/apache,而且你应该更新你的**httpd.conf**文件。 ### 安装 ### -它需要非root用户在安装钱使用“sudo”特权。现在我们开始安装,我们将使用下面的命令来安装Apache2和Tomcat: +在开始安装前,非root用户需要使用“sudo”特权。现在我们开始安装,我们将使用下面的命令来安装Apache2和Tomcat: - sudo apt-get install apache2 - + sudo apt-get install apache2 sudo apt-get install tomcat7 - sudo apt-get install tomcat7-admin -下面在我们将会使用下面的命令来创建一个测试程序: +下面,我们将会使用如下的命令来创建一个测试程序: cd /var/lib/tomcat7/webapps sudo mkdir tomcat-demo sudo mkdir tomcat-demo/goodmoring sudo vim tomcat-demo/helloworld/index.jsp -粘贴下面的代码: +并粘贴下面的代码到上述的 index.jsp: @@ -71,19 +69,19 @@ The mod_jk 需要两个组件: -一切完毕后,我们将使用下面的命令安装和配置mod_jk: +一切完毕后,我们将使用下面的命令安装和配置mod\_jk: sudo apt-get install libapache2-mod-jk -我们将使用下面的命令启用Tomcat的8443转发端口: +我们需要使用下面的命令启用Tomcat的8443转发端口: sudo vim /etc/tomcat7/server.xml -我们将解除下面的注释行: +解除下面的注释行: -之后,我们将用下面的命令位Apache创建workers.properties文件: +之后,我们将用下面的命令为Apache创建workers.properties文件: sudo vim /etc/apache2/workers.properties @@ -123,7 +121,7 @@ The mod_jk 需要两个组件: ### 总结 ### -在本篇中我们展示了你该如何使用mod_jk连接器配置和安装Apache2以及Tomcat7。 +在本篇中我们展示了你该如何使用mod\_jk连接器配置和安装Apache2以及Tomcat7。 -------------------------------------------------------------------------------- @@ -131,7 +129,7 @@ via: http://www.unixmen.com/integrate-apache2-tomcat-7-using-mod_jk-connector/ 作者:[anismaj][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 48f8b8987bf3e73d3f7b9838aec87651f1abd897 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 9 Jun 2015 10:01:42 +0800 Subject: [PATCH 1096/2517] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 26ea32fd81..968c8434a1 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ LCTT的组成 * 2014/11/04 提升zpl1025为Core Translators成员。 * 2014/12/25 提升runningwater为Core Translators成员。 * 2015/04/19 发起 LFS-BOOK-7.7-systemd 项目。 +* 2015/06/09 提升ictlyh和dongfengweixiao为Core Translators成员。 活跃成员 ------------------------------- @@ -63,6 +64,8 @@ LCTT的组成 - CORE @reinoir, - CORE @bazz2, - CORE @zpl1025, +- CORE @ictlyh, +- CORE @dongfengweixiao - Senior @tinyeyeser, - Senior @vito-L, - Senior @jasminepeng, @@ -76,7 +79,6 @@ LCTT的组成 - @alim0x, - @2q1w2007, - @theo-l, -- @ictlyh, - @FSSlc, - @su-kaiyao, - @blueabysm, @@ -167,7 +169,7 @@ LFS 项目活跃成员有: - @KevinSJ - @Yuking-net -(更新于2015/05/31,以Github contributors列表排名) +(更新于2015/06/09,以Github contributors列表排名) 谢谢大家的支持! From 4844e99b918c2c330d82bc2c261c1771c89e09bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=A7=E5=87=AF?= <2q1w2007@users.noreply.github.com> Date: Tue, 9 Jun 2015 10:23:47 +0800 Subject: [PATCH 1097/2517] =?UTF-8?q?2q1w2007=E7=94=B3=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit How to access a Linux server behind NAT via reverse SSH tunnel --- ...to access a Linux server behind NAT via reverse SSH tunnel.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md index b67f5aee26..7eeb33676b 100644 --- a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md +++ b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md @@ -1,3 +1,4 @@ +2q1w2007申领 How to access a Linux server behind NAT via reverse SSH tunnel ================================================================================ You are running a Linux server at home, which is behind a NAT router or restrictive firewall. Now you want to SSH to the home server while you are away from home. How would you set that up? SSH port forwarding will certainly be an option. However, port forwarding can become tricky if you are dealing with multiple nested NAT environment. Besides, it can be interfered with under various ISP-specific conditions, such as restrictive ISP firewalls which block forwarded ports, or carrier-grade NAT which shares IPv4 addresses among users. From a8c214b343fdda47f70aa777b8f3f6e53a2b0a57 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 9 Jun 2015 12:23:20 +0800 Subject: [PATCH 1098/2517] [Translated]20150515 Install Tails 1.4 Linux Operating System to Preserve Privacy and Anonymity.md --- ... System to Preserve Privacy and Anonymity.md | 181 ------------------ ... System to Preserve Privacy and Anonymity.md | 180 +++++++++++++++++ 2 files changed, 180 insertions(+), 181 deletions(-) delete mode 100644 sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md create mode 100644 translated/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md diff --git a/sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md b/sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md deleted file mode 100644 index 5731cd69f4..0000000000 --- a/sources/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md +++ /dev/null @@ -1,181 +0,0 @@ -FSSlc translating - -Install ‘Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity -================================================================================ -In this Internet world and the world of Internet we perform most of our task online be it Ticket booking, Money transfer, Studies, Business, Entertainment, Social Networking and what not. We spend a major part of our time online daily. It has been getting hard to remain anonymous with each passing day specially when backdoors are being planted by organizations like NSA (National Security Agency) who are putting their nose in between every thing that we come across online. We have least or no privacy online. All the searches are logged upon the basis of user Internet surfing activity and machine activity. - -A wonderful browser from Tor project is used by millions which help us surfing the web anonymously however it is not difficult to trace your browsing habits and hence tor alone is not the guarantee of your safety online. You may like to check Tor features and installation instructions here: - -- [Anonymous Web Browsing using Tor][1] - -There is a operating system named Tails by Tor Projects. Tails (The Amnesic Incognito Live System) is a live operating system, based on Debian Linux distribution, which mainly focused on preserving privacy and anonymity on the web while browsing internet, means all it’s outgoing connection are forced to pass through the Tor and direct (non-anonymous) requests are blocked. The system is designed to run from any boot-able media be it USB stick or DVD. - -The latest stable release of Tails OS is 1.4 which was released on May 12, 2015. Powered by open source Monolithic Linux Kernel and built on top of Debian GNU/Linux Tails aims at Personal Computer Market and includes GNOME 3 as default user Interface. - -#### Features of Tails OS 1.4 #### - -- Tails is a free operating system, free as in beer and free as in speech. -- Built on top of Debian/GNU Linux. The most widely used OS that is Universal. -- Security Focused Distribution. -- Windows 8 camouflage. -- Need not to be installed and browse Internet anonymously using Live Tails CD/DVD. -- Leave no trace on the computer, while tails is running. -- Advanced cryptographic tools used to encrypt everything that concerns viz., files, emails, etc. -- Sends and Receive traffic through tor network. -- In true sense it provides privacy for anyone, anywhere. -- Comes with several applications ready to be used from Live Environment. -- All the softwares comes per-configured to connect to INTERNET only through Tor network. -- Any application that tries to connect to Internet without Tor Network is blocked, automatically. -- Restricts someone who is watching what sites you visit and restricts sites to learn your geographical location. -- Connect to websites that are blocked and/or censored. -- Designed specially not to use space used by parent OS even when there is free swap space. -- The whole OS loads on RAM and is flushed when we reboot/shutdown. Hence no trace of running. -- Advanced security implementation by encrypting USB disk, HTTPS ans Encrypt and sign emails and documents. - -#### What can you expect in Tails 1.4 #### - -- Tor Browser 4.5 with a security Slider. -- Tor Upgraded to version 0.2.6.7. -- Several Security holes fixed. -- Many of the bug fixed and patches applied to Applications like curl, OpenJDK 7, tor Network, openldap, etc. - -To get a complete list of change logs you may visit [HERE][2] - -**Note**: It is strongly recommended to upgrade to Tails 1.4, if you’re using any older version of Tails. - -#### Why should I use Tails Operating System #### - -You need Tails because you need: - -- Freedom from network surveillance -- Defend freedom, privacy and confidentiality -- Security aka traffic analysis - -This tutorial will walk through the installation of Tails 1.4 OS with a short review. - -### Tails 1.4 Installation Guide ### - -1. To download the latest Tails OS 1.4, you may use wget command to download directly. - - $ wget http://dl.amnesia.boum.org/tails/stable/tails-i386-1.4/tails-i386-1.4.iso - -Alternatively you may download Tails 1.4 Direct ISO image or use a Torrent Client to pull the iso image file for you. Here is the link to both downloads: - -- [tails-i386-1.4.iso][3] -- [tails-i386-1.4.torrent][4] - -2. After downloading, verify ISO Integrity by matching SHA256 checksum with the SHA256SUM provided on the official website.. - - $ sha256sum tails-i386-1.4.iso - - 339c8712768c831e59c4b1523002b83ccb98a4fe62f6a221fee3a15e779ca65d - -If you are interested in knowing OpenPGP, checking Tails signing key against Debian keyring and anything related to Tails cryptographic signature, you may like to point your browser [HERE][5]. - -3. Next you need to write the image to USB stick or DVD ROM. You may like to check the article, [How to Create Live Bootable USB][6] for details on how to make a flash drive bootable and write ISO to it. - -4. Insert the Tails OS Bootable flash drive or DVD ROM in the disk and boot from it (select from BIOS to boot). The first screen – two options to select from ‘Live‘ and ‘Live (failsafe)‘. Select ‘Live‘ and press Enter. - -![Tails Boot Menu](http://www.tecmint.com/wp-content/uploads/2015/05/1.png) -Tails Boot Menu - -5. Just before login. You have two options. Click ‘More Options‘ if you want to configure and set advanced options else click ‘No‘. - -![Tails Welcome Screen](http://www.tecmint.com/wp-content/uploads/2015/05/2.png) -Tails Welcome Screen - -6. After clicking Advanced option, you need to setup root password. This is important if you want to upgrade it. This root password is valid till you shutdown/reboot the machine. - -Also you may enable Windows Camouflage, if you want to run this OS on a public place, so that it seems as you are running Windows 8 operating system. Good option indeed! Is not it? Also you have a option to configure Network and Mac Address. Click ‘Login‘ when done!. - -![Tails OS Configuration](http://www.tecmint.com/wp-content/uploads/2015/05/3.png) -Tails OS Configuration - -7. This is Tails GNU/Linux OS camouflaged by Windows Skin. - -![Tails Windows Look](http://www.tecmint.com/wp-content/uploads/2015/05/4.jpg) -Tails Windows Look - -8. It will start Tor Network in the background. Check the Notification on the top-right corner of the screen – Tor is Ready / You are now connected to the Internet. - -Also check what it contains under Internet Menu. Notice – It has Tor Browser (safe) and Unsafe Web Browser (Where incoming and outgoing data don’t pass through TOR Network) along with other applications. - -![Tails Menu and Tools](http://www.tecmint.com/wp-content/uploads/2015/05/5.jpg) -Tails Menu and Tools - -9. Click Tor and check your IP Address. It confirms my physical location is not shared and my privacy is intact. - -![Check Privacy on Tails](http://www.tecmint.com/wp-content/uploads/2015/05/6.jpg) -Check Privacy on Tails - -10. You may Invoke Tails Installer to clone & Install, Clone & Upgrade and Upgrade from ISO. - -![Tails Installer Options](http://www.tecmint.com/wp-content/uploads/2015/05/7.jpg) -Tails Installer Options - -11. The other option was to select Tor without any advanced option, just before login (Check step #5 above). - -![Tails Without Advance Option](http://www.tecmint.com/wp-content/uploads/2015/05/8.png) -Tails Without Advance Option - -12. You will get log-in to Gnome3 Desktop Environment. - -![Tails Gnome Desktop](http://www.tecmint.com/wp-content/uploads/2015/05/9.png) -Tails Gnome Desktop - -13. If you click to Launch Unsafe browser in Camouflage or without Camouflage, you will be notified. - -![Tails Browsing Notification](http://www.tecmint.com/wp-content/uploads/2015/05/10.png) -Tails Browsing Notification - -If you do, this is what you get in a Browser. - -![Tails Browsing Alert](http://www.tecmint.com/wp-content/uploads/2015/05/11.png) -Tails Browsing Alert - -#### Is Tails for me? #### - -To get the above question answered, first answer a few question. - -- Do you need your privacy to be intact while you are online? -- Do you want to remain hidden from Identity thieves? -- Do you want somebody to put your nose in between your private chat online? -- Do you really want to show your geographical location to anybody there? -- Do you carry out banking transactions online? -- Are you happy with the censorship by government and ISP? - -If the answer to any of the above question is ‘YES‘ you preferably need Tails. If answer to all the above question is ‘NO‘ you perhaps don’t need it. - -To know more about Tails? Point your browser to user Documentation : [https://tails.boum.org/doc/index.en.html][7] - -### Conclusion ### - -Tails is an OS which is must for those who work in an unsafe environment. An OS focused on security yet contains bundles of Application – Gnome Desktop, Tor, Firefox (Iceweasel), Network Manager, Pidgin, Claws mail, Liferea feed addregator, Gobby, Aircrack-ng, I2P. - -It also contain several tools for Encryption and Privacy Under the Hood, viz., LUKS, GNUPG, PWGen, Shamir’s Secret Sharing, Virtual Keyboard (against Hardware Keylogging), MAT, KeePassX Password Manager, etc. - -That’s all for now. Keep Connected to Tecmint. Share your thoughts on Tails GNU/Linux Operating System. What do you think about the future of the Project? Also test it Locally and let us know your experience. - -You may run it in [Virtualbox][8] as well. Remember Tails loads the whole OS in RAM hence give enough RAM to run Tails in VM. - -I tested in 1GB Environment and it worked without lagging. Thanks to all our readers for their Support. In making Tecmint a one place for all Linux related stuffs your co-operation is needed. Kudos! - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-tails-1-4-linux-operating-system-to-preserve-privacy-and-anonymity/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/tor-browser-for-anonymous-web-browsing/ -[2]:https://tails.boum.org/news/version_1.4/index.en.html -[3]:http://dl.amnesia.boum.org/tails/stable/tails-i386-1.4/tails-i386-1.4.iso -[4]:https://tails.boum.org/torrents/files/tails-i386-1.4.torrent -[5]:https://tails.boum.org/download/index.en.html#verify -[6]:http://www.tecmint.com/install-linux-from-usb-device/ -[7]:https://tails.boum.org/doc/index.en.html -[8]:http://www.tecmint.com/install-virtualbox-on-redhat-centos-fedora/ diff --git a/translated/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md b/translated/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md new file mode 100644 index 0000000000..a7e9d4e6b8 --- /dev/null +++ b/translated/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md @@ -0,0 +1,180 @@ +安装 Tails 1.4 Linux 操作系统来保护隐私和保持匿名 +================================================================================ +在这个互联网世界和互联网的世界中,我们在线执行我们的大多数任务,无论是订票,汇款,研究,商务,娱乐,社交网络,还是其他。每天我们花费大部分时间在网络上。在每个逝去的日子里,在网络中保持匿名变得越来越难,尤其是在被某些机构例如 NSA (National Security Agency,国安局) 植入后门的情况下,这些机构嗅探着我们在网络中的所有动作。在网络中,我们有着极少,或者说根本就没有隐私。基于用户浏览网络的活动和机器的活动的搜索都被记录了下来。 + +一个来自于 Tor 项目的绝妙浏览器正被上百万人使用,它帮助我们匿名地浏览网络,即使这样,跟踪你的浏览习惯也并不难,所以只使用 Tor 并不能保证你的网络安全。你可以从下面的链接中查看 Tor 的特点及安装指南。 + +- [使用 Tor 来进行匿名网络浏览][1] + +Tor 项目中有一个名为 Tails 的操作系统。Tails (The Amnesic Incognito Live System) 是一个 live 操作系统,基于 Debian Linux 发行版本,主要着眼于在浏览网络时在网络中保护隐私和匿名,这意味着所有的外向连接都强制通过 Tor 来连接,直接的(非匿名的) 连接请求都会被阻挡。该系统被设计为可在任何可启动介质上运行,例如 USB 或 DVD。 + +Tails OS 的最新稳定发行版本为 1.4 , 于 2015 年 5 月 12 日发行。Tails 由开源单片 Linux 内核支持,构建在 Debian GNU/Linux 之上,着眼于个人电脑市场, 使用 GNOME 3 作为其默认的用户界面。 + +#### Tails OS 1.4 的特点 #### + +- Tails 是一个 free 的操作系统, free 的意义正如 免费(free)啤酒和言论自由(free) 中的 free +- 构建在 Debian/GNU Linux 操作系统之上, Debian 是使用最广泛的通用操作系统 +- 着眼于安全的发行版本 +- 有 Windows 8 外观作为其伪装 +- 不必安装就可以使用 Live Tails CD/DVD 来匿名浏览网络 +- 当 Tails 运行时,不留下任何痕迹 +- 使用先进的加密工具来加密任何相关文件,邮件等内容 +- 通过 Tor 网络来发送和接收流量 +- 在真正意义上为任何人在任何地方保护隐私 +- 在 Live 环境中带有一些可用的应用 +- 系统自带的所有软件都预先配置好只通过 Tor 网络来连接到互联网 +- 任何不通过 Tor 网络而尝试连接网络的应用都将被自动阻拦。 +- 限制那些想查看你正在浏览什么网站的人的行动,并限制网站获取你的地理位置 +- 连接到那些被墙或被审查的网站 +- 特别设计不使用主操作系统的空间,即使在 swap 空间还有空余的情况下 +- 整个操作系统加载在 RAM 中,在每次重启或关机后会自动擦除掉,所以不会留下任何运行的痕迹。 +- 先进的安全实现,通过加密 USB 磁盘, HTTPS 应答加密和对邮件,文档进行签名。 + +#### 在 Tails 1.4 中可期待的东西 #### + +- 带有安全滑块的 Tor 浏览器 4.5 +- Tor 被升级到版本 0.2.6.7 +- 修补了几个安全漏洞 +- 针对诸如 curl, OpenJDK 7, tor Network, openldap 等应用, 许多漏洞被修复并打上了补丁 + +要得到完整的更改记录,你需要访问 [这里][2] + +**注意**: 假如你使用 Tails 的任何旧版本,强烈建议升级到 Tails 1.4 。 + +#### 为什么我应该使用 Tails 操作系统 #### + +你需要 Tails 因为你想: + +- 在网络监控下保持自由 +- 捍卫自由,隐私和秘密 +- 流量分析下保持安全 + +这个教程将带你了解 Tails 1.4 操作系统的安装并给出一个简短的评论。 + +### Tails 1.4 安装指南 ### + +1. 为了下载最新的 Tails OS 1.4,你可以使用 wget 命令来直接下载它 + + $ wget http://dl.amnesia.boum.org/tails/stable/tails-i386-1.4/tails-i386-1.4.iso + +或者你可以直接下载 Tails 1.4 的 ISO 镜像文件,或使用一个 Torrent 客户端来为你获取 ISO 镜像文件: + +- [tails-i386-1.4.iso][3] +- [tails-i386-1.4.torrent][4] + +2. 下载后,可使用 SHA256SUM 来获取 ISO 文件的哈希值并与官方提供的值相比较,以核实 ISO 文件的完整性 + + $ sha256sum tails-i386-1.4.iso + + 339c8712768c831e59c4b1523002b83ccb98a4fe62f6a221fee3a15e779ca65d + +假如你熟悉 OpenPGP ,将 Tails 的签名密钥与 Debian 的 keyring 相比较以验证其签名,若想了解任何有关 Tails 的加密签名,请将浏览器指向 [这里][5] + +3. 下一步,你需要将镜像写入 USB 或 DVD ROM 中。或许你需要看看这篇文章 [如何创建一个 Live 可启动的 USB][6] 以了解如何使得一个闪存驱动器变得可启动并向它写入 ISO 镜像文件。 + +4. 插入 Tails OS 可启动闪存驱动器或 DVD ROM,并从那里启动 (在 BIOS 中选择该介质来启动)。第一个屏幕中会有两个选项 'Live' 和 'Live (failsafe)' 让你选择。选择 'Live' 并确定。 + +![Tails 启动菜单](http://www.tecmint.com/wp-content/uploads/2015/05/1.png) +Tails 启动菜单 + +5. 在登录之前,你有两个选项, 假如你想配置并设定高级选项,点击 '更多选项' 否则点击 'NO'。 + +![Tails 欢迎界面](http://www.tecmint.com/wp-content/uploads/2015/05/2.png) +Tails 欢迎界面 + +6. 在点击高级选项后,你需要设置 root 密码。假如你想升级它,这是非常重要的。这个 root 密码将会一直有效,知道你关机或重启。 + +另外,若你想开启 Windows 伪装,假如你想在一个公共场所运行这个操作系统,这将使得看起来你正在运行 Windows 8 操作系统。这真是一个好的选项!不是吗?另外,你还有一个选项来配置 网络和 Mac 地址,当一切准备完毕后,点击 '登录' ! + +![Tails OS 的配置](http://www.tecmint.com/wp-content/uploads/2015/05/3.png) +Tails OS 的配置 + +7. 这是使用 Windows 皮肤伪装的 Tails GNU/Linux OS: + +![Tails 的 Windows 伪装](http://www.tecmint.com/wp-content/uploads/2015/05/4.jpg) +Tails 的 Windows 伪装 + +8. 系统将在后台启动 Tor 网络。在屏幕的右上角查看通知 – Tor 已经准备好了 或现在你已经连接上了互联网。 + +你也可以在 Internet 菜单下查看它包含了哪些东西。 注意 – 它包含有 Tor 浏览器(安全的) 和 不安全的网络浏览器(其中的向内和向外数据不通过 Tor 网络) 和其他应用。 + +![Tails 菜单和工具](http://www.tecmint.com/wp-content/uploads/2015/05/5.jpg) +Tails 菜单和工具 + +9. 点击 Tor 并检查你的 IP 地址。 它确认我的物理位置没有被分享以及我的隐私未被触动。 + +![在 Tails 上检查隐私](http://www.tecmint.com/wp-content/uploads/2015/05/6.jpg) +在 Tails 上检查隐私 + +10. 你还可以激活 Tails 安装器来从 ISO 镜像文件中 克隆和安装, 克隆和升级以及升级系统。 + +![Tails 安装器选项](http://www.tecmint.com/wp-content/uploads/2015/05/7.jpg) +Tails 安装器选项 + +11. 其他选项为选择 Tor 不带有高级选项,就在登录之前。(查看上面的第 5 步). + +![Tails 未带有高级选项](http://www.tecmint.com/wp-content/uploads/2015/05/8.png) +Tails 未带有高级选项 + +12. 你将登录到 Gnome3 桌面环境。 + +![Tails Gnome 桌面](http://www.tecmint.com/wp-content/uploads/2015/05/9.png) +Tails Gnome 桌面 + +13. 假如你点击启动不安全的浏览器,无论在带有伪装,还是没有带有伪装的情况下,你都将会收到弹窗通知。 + +![Tails 浏览通知](http://www.tecmint.com/wp-content/uploads/2015/05/10.png) +Tails 浏览通知 + +假如你仍启动不安全的浏览器,你将在浏览器中看到如下网页: + +![Tails 浏览警告](http://www.tecmint.com/wp-content/uploads/2015/05/11.png) +Tails 浏览警告 + +#### Tails 适合我吗?#### + +要想得到上面问题的答案,首先回答如下的问题: + +- 在上网时,你想你的隐私未被触动吗? +- 你想在身份信息窃取者的眼皮底下保持隐身吗? +- 你想在你的网上私人聊天过程中被他人嗅探吗? +- 你真的想向任何人展示你的地理位置吗? +- 你开展银行网上交易吗? +- 你愿意受政府和 ISP(注:网络提供商) 的审查吗? + +假如以上问题中,任意一个问题的答案为 'YES',则你最好需要 Tails。假如上面所有的问题的答案都是 'NO',则或许你不需要它。 + +想对 Tails 了解更多?请将你的浏览器指向它的用户文档页面: + +文档: [https://tails.boum.org/doc/index.en.html][7] + +### 总结 ### + +对于那些工作在不安全环境中的人来说,Tails 是一个必需的操作系统。Tails 还是一个着眼于安全的操作系统,现在为止,包含一大批应用 – Gnome 桌面, Tor, Firefox (Iceweasel), Network Manager, Pidgin, Claws mail, Liferea feed addregator, Gobby, Aircrack-ng, I2P。 + +同时,它含有一些有关加密和隐私的工具,即 UKS, GNUPG, PWGen, Shamir’s Secret Sharing, Virtual Keyboard (against Hardware Keylogging), MAT, KeePassX Password Manager 等。 + +这就是全部了。关注 Tecmint。请分享你的有关 Tails GNU/Linux 操作系统的想法。对于这个项目的未来,你怎么看?同时在实际中测试它,并让我们获知你的体验感受。 + +你也可以在 [Virtualbox][8] 中运行它。 Tails 在 RAM 中加载整个操作系统,所以在 VM 中你需要给定足够的 RAM 来运行 Tails。 + +我在 1GB 的环境中测试了 Tails,它工作起来毫无滞后感。谢谢我们的所有用户的支持。使 Tecmint 成为一个包含所有 Linux 相关信息的地方,你的合作是必需的。 Kudos! +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-tails-1-4-linux-operating-system-to-preserve-privacy-and-anonymity/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/tor-browser-for-anonymous-web-browsing/ +[2]:https://tails.boum.org/news/version_1.4/index.en.html +[3]:http://dl.amnesia.boum.org/tails/stable/tails-i386-1.4/tails-i386-1.4.iso +[4]:https://tails.boum.org/torrents/files/tails-i386-1.4.torrent +[5]:https://tails.boum.org/download/index.en.html#verify +[6]:http://www.tecmint.com/install-linux-from-usb-device/ +[7]:https://tails.boum.org/doc/index.en.html +[8]:http://www.tecmint.com/install-virtualbox-on-redhat-centos-fedora/ \ No newline at end of file From a6fa2fa8add0d23d688ecad4b491e1540e3d5c45 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 9 Jun 2015 14:10:03 +0800 Subject: [PATCH 1099/2517] =?UTF-8?q?20150609-1=20=E9=80=89=E9=A2=98=20RHC?= =?UTF-8?q?SA=20Series=207-13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Lists) and Mounting Samba or NFS Shares.md | 212 +++++++++++++++++ ... Hostname and Enabling Network Services.md | 215 ++++++++++++++++++ ...uring and Securing a Web and FTP Server.md | 176 ++++++++++++++ ...ks with Cron and Monitoring System Logs.md | 197 ++++++++++++++++ ...ic Control Using FirewallD and Iptables.md | 191 ++++++++++++++++ ... RHEL 7 Installations Using 'Kickstart'.md | 142 ++++++++++++ ...ntrol Essentials with SELinux in RHEL 7.md | 176 ++++++++++++++ 7 files changed, 1309 insertions(+) create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md new file mode 100644 index 0000000000..d4801d9923 --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md @@ -0,0 +1,212 @@ +RHCSA Series: Using ACLs (Access Control Lists) and Mounting Samba / NFS Shares – Part 7 +================================================================================ +In the last article ([RHCSA series Part 6][1]) we started explaining how to set up and configure local system storage using parted and ssm. + +![Configure ACL's and Mounting NFS / Samba Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ACLs-and-Mounting-NFS-Samba-Shares.png) + +RHCSA Series:: Configure ACL’s and Mounting NFS / Samba Shares – Part 7 + +We also discussed how to create and mount encrypted volumes with a password during system boot. In addition, we warned you to avoid performing critical storage management operations on mounted filesystems. With that in mind we will now review the most used file system formats in Red Hat Enterprise Linux 7 and then proceed to cover the topics of mounting, using, and unmounting both manually and automatically network filesystems (CIFS and NFS), along with the implementation of access control lists for your system. + +#### Prerequisites #### + +Before proceeding further, please make sure you have a Samba server and a NFS server available (note that NFSv2 is no longer supported in RHEL 7). + +During this guide we will use a machine with IP 192.168.0.10 with both services running in it as server, and a RHEL 7 box as client with IP address 192.168.0.18. Later in the article we will tell you which packages you need to install on the client. + +### File System Formats in RHEL 7 ### + +Beginning with RHEL 7, XFS has been introduced as the default file system for all architectures due to its high performance and scalability. It currently supports a maximum filesystem size of 500 TB as per the latest tests performed by Red Hat and its partners for mainstream hardware. + +Also, XFS enables user_xattr (extended user attributes) and acl (POSIX access control lists) as default mount options, unlike ext3 or ext4 (ext2 is considered deprecated as of RHEL 7), which means that you don’t need to specify those options explicitly either on the command line or in /etc/fstab when mounting a XFS filesystem (if you want to disable such options in this last case, you have to explicitly use no_acl and no_user_xattr). + +Keep in mind that the extended user attributes can be assigned to files and directories for storing arbitrary additional information such as the mime type, character set or encoding of a file, whereas the access permissions for user attributes are defined by the regular file permission bits. + +#### Access Control Lists #### + +As every system administrator, either beginner or expert, is well acquainted with regular access permissions on files and directories, which specify certain privileges (read, write, and execute) for the owner, the group, and “the world” (all others). However, feel free to refer to [Part 3 of the RHCSA series][2] if you need to refresh your memory a little bit. + +However, since the standard ugo/rwx set does not allow to configure different permissions for different users, ACLs were introduced in order to define more detailed access rights for files and directories than those specified by regular permissions. + +In fact, ACL-defined permissions are a superset of the permissions specified by the file permission bits. Let’s see how all of this translates is applied in the real world. + +1. There are two types of ACLs: access ACLs, which can be applied to either a specific file or a directory), and default ACLs, which can only be applied to a directory. If files contained therein do not have a ACL set, they inherit the default ACL of their parent directory. + +2. To begin, ACLs can be configured per user, per group, or per an user not in the owning group of a file. + +3. ACLs are set (and removed) using setfacl, with either the -m or -x options, respectively. + +For example, let us create a group named tecmint and add users johndoe and davenull to it: + + # groupadd tecmint + # useradd johndoe + # useradd davenull + # usermod -a -G tecmint johndoe + # usermod -a -G tecmint davenull + +And let’s verify that both users belong to supplementary group tecmint: + + # id johndoe + # id davenull + +![Verify Users](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Users.png) + +Verify Users + +Let’s now create a directory called playground within /mnt, and a file named testfile.txt inside. We will set the group owner to tecmint and change its default ugo/rwx permissions to 770 (read, write, and execute permissions granted to both the owner and the group owner of the file): + + # mkdir /mnt/playground + # touch /mnt/playground/testfile.txt + # chmod 770 /mnt/playground/testfile.txt + +Then switch user to johndoe and davenull, in that order, and write to the file: + + echo "My name is John Doe" > /mnt/playground/testfile.txt + echo "My name is Dave Null" >> /mnt/playground/testfile.txt + +So far so good. Now let’s have user gacanepa write to the file – and the write operation will, which was to be expected. + +But what if we actually need user gacanepa (who is not a member of group tecmint) to have write permissions on /mnt/playground/testfile.txt? The first thing that may come to your mind is adding that user account to group tecmint. But that will give him write permissions on ALL files were the write bit is set for the group, and we don’t want that. We only want him to be able to write to /mnt/playground/testfile.txt. + + # touch /mnt/playground/testfile.txt + # chown :tecmint /mnt/playground/testfile.txt + # chmod 777 /mnt/playground/testfile.txt + # su johndoe + $ echo "My name is John Doe" > /mnt/playground/testfile.txt + $ su davenull + $ echo "My name is Dave Null" >> /mnt/playground/testfile.txt + $ su gacanepa + $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt + +![Manage User Permissions](http://www.tecmint.com/wp-content/uploads/2015/04/User-Permissions.png) + +Manage User Permissions + +Let’s give user gacanepa read and write access to /mnt/playground/testfile.txt. + +Run as root, + + # setfacl -R -m u:gacanepa:rwx /mnt/playground + +and you’ll have successfully added an ACL that allows gacanepa to write to the test file. Then switch to user gacanepa and try to write to the file again: + + $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt + +To view the ACLs for a specific file or directory, use getfacl: + + # getfacl /mnt/playground/testfile.txt + +![Check ACLs of Files](http://www.tecmint.com/wp-content/uploads/2015/04/Check-ACL-of-File.png) + +Check ACLs of Files + +To set a default ACL to a directory (which its contents will inherit unless overwritten otherwise), add d: before the rule and specify a directory instead of a file name: + + # setfacl -m d:o:r /mnt/playground + +The ACL above will allow users not in the owner group to have read access to the future contents of the /mnt/playground directory. Note the difference in the output of getfacl /mnt/playground before and after the change: + +![Set Default ACL in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Set-Default-ACL-in-Linux.png) + +Set Default ACL in Linux + +[Chapter 20 in the official RHEL 7 Storage Administration Guide][3] provides more ACL examples, and I highly recommend you take a look at it and have it handy as reference. + +#### Mounting NFS Network Shares #### + +To show the list of NFS shares available in your server, you can use the showmount command with the -e option, followed by the machine name or its IP address. This tool is included in the nfs-utils package: + + # yum update && yum install nfs-utils + +Then do: + + # showmount -e 192.168.0.10 + +and you will get a list of the available NFS shares on 192.168.0.10: + +![Check Available NFS Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Mount-NFS-Shares.png) + +Check Available NFS Shares + +To mount NFS network shares on the local client using the command line on demand, use the following syntax: + + # mount -t nfs -o [options] remote_host:/remote/directory /local/directory + +which, in our case, translates to: + + # mount -t nfs 192.168.0.10:/NFS-SHARE /mnt/nfs + +If you get the following error message: “Job for rpc-statd.service failed. See “systemctl status rpc-statd.service” and “journalctl -xn” for details.”, make sure the rpcbind service is enabled and started in your system first: + + # systemctl enable rpcbind.socket + # systemctl restart rpcbind.service + +and then reboot. That should do the trick and you will be able to mount your NFS share as explained earlier. If you need to mount the NFS share automatically on system boot, add a valid entry to the /etc/fstab file: + + remote_host:/remote/directory /local/directory nfs options 0 0 + +The variables remote_host, /remote/directory, /local/directory, and options (which is optional) are the same ones used when manually mounting an NFS share from the command line. As per our previous example: + + 192.168.0.10:/NFS-SHARE /mnt/nfs nfs defaults 0 0 + +#### Mounting CIFS (Samba) Network Shares #### + +Samba represents the tool of choice to make a network share available in a network with *nix and Windows machines. To show the Samba shares that are available, use the smbclient command with the -L flag, followed by the machine name or its IP address. This tool is included in the samba-client package: + +You will be prompted for root’s password in the remote host: + + # smbclient -L 192.168.0.10 + +![Check Samba Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Samba-Shares.png) + +Check Samba Shares + +To mount Samba network shares on the local client you will need to install first the cifs-utils package: + + # yum update && yum install cifs-utils + +Then use the following syntax on the command line: + + # mount -t cifs -o credentials=/path/to/credentials/file //remote_host/samba_share /local/directory + +which, in our case, translates to: + + # mount -t cifs -o credentials=~/.smbcredentials //192.168.0.10/gacanepa /mnt/samba + +where smbcredentials: + + username=gacanepa + password=XXXXXX + +is a hidden file inside root’s home (/root/) with permissions set to 600, so that no one else but the owner of the file can read or write to it. + +Please note that the samba_share is the name of the Samba share as returned by smbclient -L remote_host as shown above. + +Now, if you need the Samba share to be available automatically on system boot, add a valid entry to the /etc/fstab file as follows: + + //remote_host:/samba_share /local/directory cifs options 0 0 + +The variables remote_host, /samba_share, /local/directory, and options (which is optional) are the same ones used when manually mounting a Samba share from the command line. Following the definitions given in our previous example: + + //192.168.0.10/gacanepa /mnt/samba cifs credentials=/root/smbcredentials,defaults 0 0 + +### Conclusion ### + +In this article we have explained how to set up ACLs in Linux, and discussed how to mount CIFS and NFS network shares in a RHEL 7 client. + +I recommend you to practice these concepts and even mix them (go ahead and try to set ACLs in mounted network shares) until you feel comfortable. If you have questions or comments feel free to use the form below to contact us anytime. Also, feel free to share this article through your social networks. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/ + +作者:[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/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ +[2]:http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ +[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html \ No newline at end of file diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md b/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md new file mode 100644 index 0000000000..a381b1c94a --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md @@ -0,0 +1,215 @@ +RHCSA Series: Securing SSH, Setting Hostname and Enabling Network Services – Part 8 +================================================================================ +As a system administrator you will often have to log on to remote systems to perform a variety of administration tasks using a terminal emulator. You will rarely sit in front of a real (physical) terminal, so you need to set up a way to log on remotely to the machines that you will be asked to manage. + +In fact, that may be the last thing that you will have to do in front of a physical terminal. For security reasons, using Telnet for this purpose is not a good idea, as all traffic goes through the wire in unencrypted, plain text. + +In addition, in this article we will also review how to configure network services to start automatically at boot and learn how to set up network and hostname resolution statically or dynamically. + +![RHCSA: Secure SSH and Enable Network Services](http://www.tecmint.com/wp-content/uploads/2015/05/Secure-SSH-Server-and-Enable-Network-Services.png) + +RHCSA: Secure SSH and Enable Network Services – Part 8 + +### Installing and Securing SSH Communication ### + +For you to be able to log on remotely to a RHEL 7 box using SSH, you will have to install the openssh, openssh-clients and openssh-servers packages. The following command not only will install the remote login program, but also the secure file transfer tool, as well as the remote file copy utility: + + # yum update && yum install openssh openssh-clients openssh-servers + +Note that it’s a good idea to install the server counterparts as you may want to use the same machine as both client and server at some point or another. + +After installation, there is a couple of basic things that you need to take into account if you want to secure remote access to your SSH server. The following settings should be present in the `/etc/ssh/sshd_config` file. + +1. Change the port where the sshd daemon will listen on from 22 (the default value) to a high port (2000 or greater), but first make sure the chosen port is not being used. + +For example, let’s suppose you choose port 2500. Use [netstat][1] in order to check whether the chosen port is being used or not: + + # netstat -npltu | grep 2500 + +If netstat does not return anything, you can safely use port 2500 for sshd, and you should change the Port setting in the configuration file as follows: + + Port 2500 + +2. Only allow protocol 2: + +Protocol 2 + +3. Configure the authentication timeout to 2 minutes, do not allow root logins, and restrict to a minimum the list of users which are allowed to login via ssh: + + LoginGraceTime 2m + PermitRootLogin no + AllowUsers gacanepa + +4. If possible, use key-based instead of password authentication: + + PasswordAuthentication no + RSAAuthentication yes + PubkeyAuthentication yes + +This assumes that you have already created a key pair with your user name on your client machine and copied it to your server as explained here. + +- [Enable SSH Passwordless Login][2] + +### Configuring Networking and Name Resolution ### + +1. Every system administrator should be well acquainted with the following system-wide configuration files: + +- /etc/hosts is used to resolve names <---> IPs in small networks. + +Every line in the `/etc/hosts` file has the following structure: + + IP address - Hostname - FQDN + +For example, + + 192.168.0.10 laptop laptop.gabrielcanepa.com.ar + +2. `/etc/resolv.conf` specifies the IP addresses of DNS servers and the search domain, which is used for completing a given query name to a fully qualified domain name when no domain suffix is supplied. + +Under normal circumstances, you don’t need to edit this file as it is managed by the system. However, should you want to change DNS servers, be advised that you need to stick to the following structure in each line: + + nameserver - IP address + +For example, + + nameserver 8.8.8.8 + +3. 3. `/etc/host.conf` specifies the methods and the order by which hostnames are resolved within a network. In other words, tells the name resolver which services to use, and in what order. + +Although this file has several options, the most common and basic setup includes a line as follows: + + order bind,hosts + +Which indicates that the resolver should first look in the nameservers specified in `resolv.conf` and then to the `/etc/hosts` file for name resolution. + +4. `/etc/sysconfig/network` contains routing and global host information for all network interfaces. The following values may be used: + + NETWORKING=yes|no + HOSTNAME=value + +Where value should be the Fully Qualified Domain Name (FQDN). + + GATEWAY=XXX.XXX.XXX.XXX + +Where XXX.XXX.XXX.XXX is the IP address of the network’s gateway. + + GATEWAYDEV=value + +In a machine with multiple NICs, value is the gateway device, such as enp0s3. + +5. Files inside `/etc/sysconfig/network-scripts` (network adapters configuration files). + +Inside the directory mentioned previously, you will find several plain text files named. + + ifcfg-name + +Where name is the name of the NIC as returned by ip link show: + +![Check Network Link Status](http://www.tecmint.com/wp-content/uploads/2015/05/Check-IP-Address.png) + +Check Network Link Status + +For example: + +![Network Files](http://www.tecmint.com/wp-content/uploads/2015/05/Network-Files.png) + +Network Files + +Other than for the loopback interface, you can expect a similar configuration for your NICs. Note that some variables, if set, will override those present in `/etc/sysconfig/network` for this particular interface. Each line is commented for clarification in this article but in the actual file you should avoid comments: + + HWADDR=08:00:27:4E:59:37 # The MAC address of the NIC + TYPE=Ethernet # Type of connection + BOOTPROTO=static # This indicates that this NIC has been assigned a static IP. If this variable was set to dhcp, the NIC will be assigned an IP address by a DHCP server and thus the next two lines should not be present in that case. + IPADDR=192.168.0.18 + NETMASK=255.255.255.0 + GATEWAY=192.168.0.1 + NM_CONTROLLED=no # Should be added to the Ethernet interface to prevent NetworkManager from changing the file. + NAME=enp0s3 + UUID=14033805-98ef-4049-bc7b-d4bea76ed2eb + ONBOOT=yes # The operating system should bring up this NIC during boot + +### Setting Hostnames ### + +In Red Hat Enterprise Linux 7, the hostnamectl command is used to both query and set the system’s hostname. + +To display the current hostname, type: + + # hostnamectl status + +![Check System hostname in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/05/Check-System-hostname.png) + +Check System Hostname + +To change the hostname, use + + # hostnamectl set-hostname [new hostname] + +For example, + + # hostnamectl set-hostname cinderella + +For the changes to take effect you will need to restart the hostnamed daemon (that way you will not have to log off and on again in order to apply the change): + + # systemctl restart systemd-hostnamed + +![Set System Hostname in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/05/Set-System-Hostname.png) + +Set System Hostname + +In addition, RHEL 7 also includes the nmcli utility that can be used for the same purpose. To display the hostname, run: + + # nmcli general hostname + +and to change it: + + # nmcli general hostname [new hostname] + +For example, + + # nmcli general hostname rhel7 + +![Set Hostname Using nmcli Command](http://www.tecmint.com/wp-content/uploads/2015/05/nmcli-command.png) + +Set Hostname Using nmcli Command + +### Starting Network Services on Boot ### + +To wrap up, let us see how we can ensure that network services are started automatically on boot. In simple terms, this is done by creating symlinks to certain files specified in the [Install] section of the service configuration files. + +In the case of firewalld (/usr/lib/systemd/system/firewalld.service): + + [Install] + WantedBy=basic.target + Alias=dbus-org.fedoraproject.FirewallD1.service + +To enable the service: + + # systemctl enable firewalld + +On the other hand, disabling firewalld entitles removing the symlinks: + + # systemctl disable firewalld + +![Enable Service at System Boot](http://www.tecmint.com/wp-content/uploads/2015/05/Enable-Service-at-System-Boot.png) + +Enable Service at System Boot + +### Conclusion ### + +In this article we have summarized how to install and secure connections via SSH to a RHEL server, how to change its name, and finally how to ensure that network services are started on boot. If you notice that a certain service has failed to start properly, you can use systemctl status -l [service] and journalctl -xn to troubleshoot it. + +Feel free to let us know what you think about this article using the comment form below. Questions are also welcome. We look forward to hearing from you! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network-services-in-rhel-7/ + +作者:[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/20-netstat-commands-for-linux-network-management/ +[2]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ \ No newline at end of file diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md b/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md new file mode 100644 index 0000000000..6a1e544de3 --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md @@ -0,0 +1,176 @@ +RHCSA Series: Installing, Configuring and Securing a Web and FTP Server – Part 9 +================================================================================ +A web server (also known as a HTTP server) is a service that handles content (most commonly web pages, but other types of documents as well) over to a client in a network. + +A FTP server is one of the oldest and most commonly used resources (even to this day) to make files available to clients on a network in cases where no authentication is necessary since FTP uses username and password without encryption. + +The web server available in RHEL 7 is version 2.4 of the Apache HTTP Server. As for the FTP server, we will use the Very Secure Ftp Daemon (aka vsftpd) to establish connections secured by TLS. + +![Configuring and Securing Apache and FTP Server](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Configure-Secure-Apache-FTP-Server.png) + +RHCSA: Installing, Configuring and Securing Apache and FTP – Part 9 + +In this article we will explain how to install, configure, and secure a web server and a FTP server in RHEL 7. + +### Installing Apache and FTP Server ### + +In this guide we will use a RHEL 7 server with a static IP address of 192.168.0.18/24. To install Apache and VSFTPD, run the following command: + + # yum update && yum install httpd vsftpd + +When the installation completes, both services will be disabled initially, so we need to start them manually for the time being and enable them to start automatically beginning with the next boot: + + # systemctl start httpd + # systemctl enable httpd + # systemctl start vsftpd + # systemctl enable vsftpd + +In addition, we have to open ports 80 and 21, where the web and ftp daemons are listening, respectively, in order to allow access to those services from the outside: + + # firewall-cmd --zone=public --add-port=80/tcp --permanent + # firewall-cmd --zone=public --add-service=ftp --permanent + # firewall-cmd --reload + +To confirm that the web server is working properly, fire up your browser and enter the IP of the server. You should see the test page: + +![Confirm Apache Web Server](http://www.tecmint.com/wp-content/uploads/2015/05/Confirm-Apache-Web-Server.png) + +Confirm Apache Web Server + +As for the ftp server, we will have to configure it further, which we will do in a minute, before confirming that it’s working as expected. + +### Configuring and Securing Apache Web Server ### + +The main configuration file for Apache is located in `/etc/httpd/conf/httpd.conf`, but it may rely on other files present inside `/etc/httpd/conf.d`. + +Although the default configuration should be sufficient for most cases, it’s a good idea to become familiar with all the available options as described in the [official documentation][1]. + +As always, make a backup copy of the main configuration file before editing it: + + # cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.$(date +%Y%m%d) + +Then open it with your preferred text editor and look for the following variables: + +- ServerRoot: the directory where the server’s configuration, error, and log files are kept. +- Listen: instructs Apache to listen on specific IP address and / or ports. +- Include: allows the inclusion of other configuration files, which must exist. Otherwise, the server will fail, as opposed to the IncludeOptional directive, which is silently ignored if the specified configuration files do not exist. +- User and Group: the name of the user/group to run the httpd service as. +- DocumentRoot: The directory out of which Apache will serve your documents. By default, all requests are taken from this directory, but symbolic links and aliases may be used to point to other locations. +- ServerName: this directive sets the hostname (or IP address) and port that the server uses to identify itself. + +The first security measure will consist of creating a dedicated user and group (i.e. tecmint/tecmint) to run the web server as and changing the default port to a higher one (9000 in this case): + + ServerRoot "/etc/httpd" + Listen 192.168.0.18:9000 + User tecmint + Group tecmint + DocumentRoot "/var/www/html" + ServerName 192.168.0.18:9000 + +You can test the configuration file with. + + # apachectl configtest + +and if everything is OK, then restart the web server. + + # systemctl restart httpd + +and don’t forget to enable the new port (and disable the old one) in the firewall: + + # firewall-cmd --zone=public --remove-port=80/tcp --permanent + # firewall-cmd --zone=public --add-port=9000/tcp --permanent + # firewall-cmd --reload + +Note that, due to SELinux policies, you can only use the ports returned by + + # semanage port -l | grep -w '^http_port_t' + +for the web server. + +If you want to use another port (i.e. TCP port 8100), you will have to add it to SELinux port context for the httpd service: + +# semanage port -a -t http_port_t -p tcp 8100 + +![Add Apache Port to SELinux Policies](http://www.tecmint.com/wp-content/uploads/2015/05/Add-Apache-Port-to-SELinux-Policies.png) + +Add Apache Port to SELinux Policies + +To further secure your Apache installation, follow these steps: + +1. The user Apache is running as should not have access to a shell: + + # usermod -s /sbin/nologin tecmint + +2. Disable directory listing in order to prevent the browser from displaying the contents of a directory if there is no index.html present in that directory. + +Edit `/etc/httpd/conf/httpd.conf` (and the configuration files for virtual hosts, if any) and make sure that the Options directive, both at the top and at Directory block levels, is set to None: + + Options None + +3. Hide information about the web server and the operating system in HTTP responses. Edit /etc/httpd/conf/httpd.conf as follows: + + ServerTokens Prod + ServerSignature Off + +Now you are ready to start serving content from your /var/www/html directory. + +### Configuring and Securing FTP Server ### + +As in the case of Apache, the main configuration file for Vsftpd `(/etc/vsftpd/vsftpd.conf)` is well commented and while the default configuration should suffice for most applications, you should become acquainted with the documentation and the man page `(man vsftpd.conf)` in order to operate the ftp server more efficiently (I can’t emphasize that enough!). + +In our case, these are the directives used: + + anonymous_enable=NO + local_enable=YES + write_enable=YES + local_umask=022 + dirmessage_enable=YES + xferlog_enable=YES + connect_from_port_20=YES + xferlog_std_format=YES + chroot_local_user=YES + allow_writeable_chroot=YES + listen=NO + listen_ipv6=YES + pam_service_name=vsftpd + userlist_enable=YES + tcp_wrappers=YES + +By using `chroot_local_user=YES`, local users will be (by default) placed in a chroot’ed jail in their home directory right after login. This means that local users will not be able to access any files outside their corresponding home directories. + +Finally, to allow ftp to read files in the user’s home directory, set the following SELinux boolean: + + # setsebool -P ftp_home_dir on + +You can now connect to the ftp server using a client such as Filezilla: + +![Check FTP Connection](http://www.tecmint.com/wp-content/uploads/2015/05/Check-FTP-Connection.png) + +Check FTP Connection + +Note that the `/var/log/xferlo`g log records downloads and uploads, which concur with the above directory listing: + +![Monitor FTP Download and Upload](http://www.tecmint.com/wp-content/uploads/2015/05/Monitor-FTP-Download-Upload.png) + +Monitor FTP Download and Upload + +Read Also: [Limit FTP Network Bandwidth Used by Applications in a Linux System with Trickle][2] + +### Summary ### + +In this tutorial we have explained how to set up a web and a ftp server. Due to the vastness of the subject, it is not possible to cover all the aspects of these topics (i.e. virtual web hosts). Thus, I recommend you also check other excellent articles in this website about [Apache][3]. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-series-install-and-secure-apache-web-server-and-ftp-in-rhel/ + +作者:[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://httpd.apache.org/docs/2.4/ +[2]:http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ +[3]:http://www.google.com/cse?cx=partner-pub-2601749019656699:2173448976&ie=UTF-8&q=virtual+hosts&sa=Search&gws_rd=cr&ei=Dy9EVbb0IdHisASnroG4Bw#gsc.tab=0&gsc.q=apache \ No newline at end of file diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md b/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md new file mode 100644 index 0000000000..04c7d7a29e --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md @@ -0,0 +1,197 @@ +RHCSA Series: Yum Package Management, Automating Tasks with Cron and Monitoring System Logs – Part 10 +================================================================================ +In this article we will review how to install, update, and remove packages in Red Hat Enterprise Linux 7. We will also cover how to automate tasks using cron, and will finish this guide explaining how to locate and interpret system logs files with the focus of teaching you why all of these are essential skills for every system administrator. + +![Yum Package Management Cron Jobs Log Monitoring Linux](http://www.tecmint.com/wp-content/uploads/2015/05/Yum-Package-Management-Cron-Job-Log-Monitoring-Linux.jpg) + +RHCSA: Yum Package Management, Cron Job Scheduling and Log Monitoring – Part 10 + +### Managing Packages Via Yum ### + +To install a package along with all its dependencies that are not already installed, you will use: + + # yum -y install package_name(s) + +Where package_name(s) represent at least one real package name. + +For example, to install httpd and mlocate (in that order), type. + + # yum -y install httpd mlocate + +**Note**: That the letter y in the example above bypasses the confirmation prompts that yum presents before performing the actual download and installation of the requested programs. You can leave it out if you want. + +By default, yum will install the package with the architecture that matches the OS architecture, unless overridden by appending the package architecture to its name. + +For example, on a 64 bit system, yum install package will install the x86_64 version of package, whereas yum install package.x86 (if available) will install the 32-bit one. + +There will be times when you want to install a package but don’t know its exact name. The search all or search options can search the currently enabled repositories for a certain keyword in the package name and/or in its description as well, respectively. + +For example, + + # yum search log + +will search the installed repositories for packages with the word log in their names and summaries, whereas + + # yum search all log + +will look for the same keyword in the package description and url fields as well. + +Once the search returns a package listing, you may want to display further information about some of them before installing. That is when the info option will come in handy: + + # yum info logwatch + +![Search Package Information](http://www.tecmint.com/wp-content/uploads/2015/05/Search-Package-Information.png) + +Search Package Information + +You can regularly check for updates with the following command: + + # yum check-update + +The above command will return all the installed packages for which an update is available. In the example shown in the image below, only rhel-7-server-rpms has an update available: + +![Check For Package Updates](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-Updates.png) + +Check For Package Updates + +You can then update that package alone with, + + # yum update rhel-7-server-rpms + +If there are several packages that can be updated, yum update will update all of them at once. + +Now what happens when you know the name of an executable, such as ps2pdf, but don’t know which package provides it? You can find out with `yum whatprovides “*/[executable]”`: + + # yum whatprovides “*/ps2pdf” + +![Find Package Belongs to Which Package](http://www.tecmint.com/wp-content/uploads/2015/05/Find-Package-Information.png) + +Find Package Belongs to Which Package + +Now, when it comes to removing a package, you can do so with yum remove package. Easy, huh? This goes to show that yum is a complete and powerful package manager. + + # yum remove httpd + +Read Also: [20 Yum Commands to Manage RHEL 7 Package Management][1] + +### Good Old Plain RPM ### + +RPM (aka RPM Package Manager, or originally RedHat Package Manager) can also be used to install or update packages when they come in form of standalone `.rpm` packages. + +It is often utilized with the `-Uvh` flags to indicate that it should install the package if it’s not already present or attempt to update it if it’s installed `(-U)`, producing a verbose output `(-v)` and a progress bar with hash marks `(-h)` while the operation is being performed. For example, + + # rpm -Uvh package.rpm + +Another typical use of rpm is to produce a list of currently installed packages with code>rpm -qa (short for query all): + + # rpm -qa + +![Query All RPM Packages](http://www.tecmint.com/wp-content/uploads/2015/05/Query-All-RPM-Packages.png) + +Query All RPM Packages + +Read Also: [20 RPM Commands to Install Packages in RHEL 7][2] + +### Scheduling Tasks using Cron ### + +Linux and other Unix-like operating systems include a tool called cron that allows you to schedule tasks (i.e. commands or shell scripts) to run on a periodic basis. Cron checks every minute the /var/spool/cron directory for files which are named after accounts in /etc/passwd. + +When executing commands, any output is mailed to the owner of the crontab (or to the user specified in the MAILTO environment variable in the /etc/crontab, if it exists). + +Crontab files (which are created by typing crontab -e and pressing Enter) have the following format: + +![Crontab Entries](http://www.tecmint.com/wp-content/uploads/2015/05/Crontab-Format.png) + +Crontab Entries + +Thus, if we want to update the local file database (which is used by locate to find files by name or pattern) every second day of the month at 2:15 am, we need to add the following crontab entry: + + 15 02 2 * * /bin/updatedb + +The above crontab entry reads, “Run /bin/updatedb on the second day of the month, every month of the year, regardless of the day of the week, at 2:15 am”. As I’m sure you already guessed, the star symbol is used as a wildcard character. + +After adding a cron job, you can see that a file named root was added inside /var/spool/cron, as we mentioned earlier. That file lists all the tasks that the crond daemon should run: + + # ls -l /var/spool/cron + +![Check All Cron Jobs](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Cron-Jobs.png) + +Check All Cron Jobs + +In the above image, the current user’s crontab can be displayed either using cat /var/spool/cron/root or, + + # crontab -l + +If you need to run a task on a more fine-grained basis (for example, twice a day or three times each month), cron can also help you to do that. + +For example, to run /my/script on the 1st and 15th of each month and send any output to /dev/null, you can add two crontab entries as follows: + + 01 00 1 * * /myscript > /dev/null 2>&1 + 01 00 15 * * /my/script > /dev/null 2>&1 + +But in order for the task to be easier to maintain, you can combine both entries into one: + + 01 00 1,15 * * /my/script > /dev/null 2>&1 + +Following the previous example, we can run /my/other/script at 1:30 am on the first day of the month every three months: + + 30 01 1 1,4,7,10 * /my/other/script > /dev/null 2>&1 + +But when you have to repeat a certain task every “x” minutes, hours, days, or months, you can divide the right position by the desired frequency. The following crontab entry has the exact same meaning as the previous one: + + 30 01 1 */3 * /my/other/script > /dev/null 2>&1 + +Or perhaps you need to run a certain job on a fixed frequency or after the system boots, for example. You can use one of the following string instead of the five fields to indicate the exact time when you want your job to run: + + @reboot Run when the system boots. + @yearly Run once a year, same as 00 00 1 1 *. + @monthly Run once a month, same as 00 00 1 * *. + @weekly Run once a week, same as 00 00 * * 0. + @daily Run once a day, same as 00 00 * * *. + @hourly Run once an hour, same as 00 * * * *. + +Read Also: [11 Commands to Schedule Cron Jobs in RHEL 7][3] + +### Locating and Checking Logs ### + +System logs are located (and rotated) inside the /var/log directory. According to the Linux Filesystem Hierarchy Standard, this directory contains miscellaneous log files, which are written to it or an appropriate subdirectory (such as audit, httpd, or samba in the image below) by the corresponding daemons during system operation: + + # ls /var/log + +![Linux Log Files Location](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-Log-Files.png) + +Linux Log Files Location + +Other interesting logs are [dmesg][4] (contains all messages from kernel ring buffer), secure (logs connection attempts that require user authentication), messages (system-wide messages) and wtmp (records of all user logins and logouts). + +Logs are very important in that they allow you to have a glimpse of what is going on at all times in your system, and what has happened in the past. They represent a priceless tool to troubleshoot and monitor a Linux server, and thus are often used with the `tail -f command` to display events, in real time, as they happen and are recorded in a log. + +For example, if you want to display kernel-related events, type the following command: + + # tail -f /var/log/dmesg + +Same if you want to view access to your web server: + + # tail -f /var/log/httpd/access.log + +### Summary ### + +If you know how to efficiently manage packages, schedule tasks, and where to look for information about the current and past operation of your system you can rest assure that you will not run into surprises very often. I hope this article has helped you learn or refresh your knowledge about these basic skills. + +Don’t hesitate to drop us a line using the contact form below if you have any questions or comments. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/yum-package-management-cron-job-scheduling-monitoring-linux-logs/ + +作者:[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/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[2]:http://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/ +[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ +[4]:http://www.tecmint.com/dmesg-commands/ \ No newline at end of file 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 new file mode 100644 index 0000000000..fd27f4c6fc --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md @@ -0,0 +1,191 @@ +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/ \ No newline at end of file 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 new file mode 100644 index 0000000000..a4365e311e --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md @@ -0,0 +1,142 @@ +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. + +In this article we will show what you need to use kickstart utility so that you can forget about babysitting servers during the installation process. + +![Automatic Kickstart Installation of RHEL 7](http://www.tecmint.com/wp-content/uploads/2015/05/Automatic-Kickstart-Installation-of-RHEL-7.jpg) + +RHCSA: Automatic Kickstart Installation of RHEL 7 + +#### Introducing Kickstart and Automated Installations #### + +Kickstart is an automated installation method used primarily by Red Hat Enterprise Linux (and other Fedora spin-offs, such as CentOS, Oracle Linux, etc.) to execute unattended operating system installation and configuration. Thus, kickstart installations allow system administrators to have identical systems, as far as installed package groups and system configuration are concerned, while sparing them the hassle of having to manually install each of them. + +### Preparing for a Kickstart Installation ### + +To perform a kickstart installation, we need to follow these steps: + +1. Create a Kickstart file, a plain text file with several predefined configuration options. + +2. Make the Kickstart file available on removable media, a hard drive or a network location. The client will use the rhel-server-7.0-x86_64-boot.iso file, whereas you will need to make the full ISO image (rhel-server-7.0-x86_64-dvd.iso) available from a network resource, such as a HTTP of FTP server (in our present case, we will use another RHEL 7 box with IP 192.168.0.18). + +3. Start the Kickstart installation + +To create a kickstart file, login to your Red Hat Customer Portal account, and use the [Kickstart configuration tool][1] to choose the desired installation options. Read each one of them carefully before scrolling down, and choose what best fits your needs: + +![Kickstart Configuration Tool](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-Configuration-Tool.png) + +Kickstart Configuration Tool + +If you specify that the installation should be performed either through HTTP, FTP, or NFS, make sure the firewall on the server allows those services. + +Although you can use the Red Hat online tool to create a kickstart file, you can also create it manually using the following lines as reference. You will notice, for example, that the installation process will be in English, using the latin american keyboard layout and the America/Argentina/San_Luis time zone: + + lang en_US + keyboard la-latin1 + timezone America/Argentina/San_Luis --isUtc + rootpw $1$5sOtDvRo$In4KTmX7OmcOW9HUvWtfn0 --iscrypted + #platform x86, AMD64, or Intel EM64T + text + url --url=http://192.168.0.18//kickstart/media + bootloader --location=mbr --append="rhgb quiet crashkernel=auto" + zerombr + clearpart --all --initlabel + autopart + auth --passalgo=sha512 --useshadow + selinux --enforcing + firewall --enabled + firstboot --disable + %packages + @base + @backup-server + @print-server + %end + +In the online configuration tool, use 192.168.0.18 for HTTP Server and `/kickstart/tecmint.bin` for HTTP Directory in the Installation section after selecting HTTP as installation source. Finally, click the Download button at the right top corner to download the kickstart file. + +In the kickstart sample file above, you need to pay careful attention to. + + url --url=http://192.168.0.18//kickstart/media + +That directory is where you need to extract the contents of the DVD or ISO installation media. Before doing that, we will mount the ISO installation file in /media/rhel as a loop device: + + # mount -o loop /var/www/html/kickstart/rhel-server-7.0-x86_64-dvd.iso /media/rhel + +![Mount RHEL ISO Image](http://www.tecmint.com/wp-content/uploads/2015/05/Mount-RHEL-ISO-Image.png) + +Mount RHEL ISO Image + +Next, copy all the contents of /media/rhel to /var/www/html/kickstart/media: + + # cp -R /media/rhel /var/www/html/kickstart/media + +When you’re done, the directory listing and disk usage of /var/www/html/kickstart/media should look as follows: + +![Kickstart Media Files](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-media-Files.png) + +Kickstart Media Files + +Now we’re ready to kick off the kickstart installation. + +Regardless of how you choose to create the kickstart file, it’s always a good idea to check its syntax before proceeding with the installation. To do that, install the pykickstart package. + + # yum update && yum install pykickstart + +And then use the ksvalidator utility to check the file: + + # ksvalidator /var/www/html/kickstart/tecmint.bin + +If the syntax is correct, you will not get any output, whereas if there’s an error in the file, you will get a warning notice indicating the line where the syntax is not correct or unknown. + +### Performing a Kickstart Installation ### + +To start, boot your client using the rhel-server-7.0-x86_64-boot.iso file. When the initial screen appears, select Install Red Hat Enterprise Linux 7.0 and press the Tab key to append the following stanza and press Enter: + + # inst.ks=http://192.168.0.18/kickstart/tecmint.bin + +![RHEL Kickstart Installation](http://www.tecmint.com/wp-content/uploads/2015/05/RHEL-Kickstart-Installation.png) + +RHEL Kickstart Installation + +Where tecmint.bin is the kickstart file created earlier. + +When you press Enter, the automated installation will begin, and you will see the list of packages that are being installed (the number and the names will differ depending on your choice of programs and package groups): + +![Automatic Kickstart Installation of RHEL 7](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-Automatic-Installation.png) + +Automatic Kickstart Installation of RHEL 7 + +When the automated process ends, you will be prompted to remove the installation media and then you will be able to boot into your newly installed system: + +![RHEL 7 Boot Screen](http://www.tecmint.com/wp-content/uploads/2015/05/RHEL-7.png) + +RHEL 7 Boot Screen + +Although you can create your kickstart files manually as we mentioned earlier, you should consider using the recommended approach whenever possible. You can either use the online configuration tool, or the anaconda-ks.cfg file that is created by the installation process in root’s home directory. + +This file actually is a kickstart file, so you may want to install the first box manually with all the desired options (maybe modify the logical volumes layout or the file system on top of each one) and then use the resulting anaconda-ks.cfg file to automate the installation of the rest. + +In addition, using the online configuration tool or the anaconda-ks.cfg file to guide future installations will allow you to perform them using an encrypted root password out-of-the-box. + +### Conclusion ### + +Now that you know how to create kickstart files and how to use them to automate the installation of Red Hat Enterprise Linux 7 servers, you can forget about babysitting the installation process. This will give you time to do other things, or perhaps some leisure time if you’re lucky. + +Either way, let us know what you think about this article using the form below. Questions are also welcome! + +Read Also: [Automated Installations of Multiple RHEL/CentOS 7 Distributions using PXE and Kickstart][2] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/automatic-rhel-installations-using-kickstart/ + +作者:[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]:https://access.redhat.com/labs/kickstartconfig/ +[2]:http://www.tecmint.com/multiple-centos-installations-using-kickstart/ \ No newline at end of file diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md new file mode 100644 index 0000000000..1a0d08df8f --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md @@ -0,0 +1,176 @@ +RHCSA Series: Mandatory Access Control Essentials with SELinux in RHEL 7 – Part 13 +================================================================================ +During this series we have explored in detail at least two access control methods: standard ugo/rwx permissions ([Manage Users and Groups – Part 3][1]) and access control lists ([Configure ACL’s on File Systems – Part 7][2]). + +![RHCSA Exam: SELinux Essentials and Control FileSystem Access](http://www.tecmint.com/wp-content/uploads/2015/06/SELinux-Control-File-System-Access.png) + +RHCSA Exam: SELinux Essentials and Control FileSystem Access + +Although necessary as first level permissions and access control mechanisms, they have some limitations that are addressed by Security Enhanced Linux (aka SELinux for short). + +One of such limitations is that a user can expose a file or directory to a security breach through a poorly elaborated chmod command and thus cause an unexpected propagation of access rights. As a result, any process started by that user can do as it pleases with the files owned by the user, where finally a malicious or otherwise compromised software can achieve root-level access to the entire system. + +With those limitations in mind, the United States National Security Agency (NSA) first devised SELinux, a flexible mandatory access control method, to restrict the ability of processes to access or perform other operations on system objects (such as files, directories, network ports, etc) to the least permission model, which can be modified later as needed. In few words, each element of the system is given only the access required to function. + +In RHEL 7, SELinux is incorporated into the kernel itself and is enabled in Enforcing mode by default. In this article we will explain briefly the basic concepts associated with SELinux and its operation. + +### SELinux Modes ### + +SELinux can operate in three different ways: + +- Enforcing: SELinux denies access based on SELinux policy rules, a set of guidelines that control the security engine. +- Permissive: SELinux does not deny access, but denials are logged for actions that would have been denied if running in enforcing mode. +- Disabled (self-explanatory). + +The `getenforce` command displays the current mode of SELinux, whereas `setenforce` (followed by a 1 or a 0) is used to change the mode to Enforcing or Permissive, respectively, during the current session only. + +In order to achieve persistence across logouts and reboots, you will need to edit the `/etc/selinux/config` file and set the SELINUX variable to either enforcing, permissive, or disabled: + + # getenforce + # setenforce 0 + # getenforce + # setenforce 1 + # getenforce + # cat /etc/selinux/config + +![Set SELinux Mode](http://www.tecmint.com/wp-content/uploads/2015/05/Set-SELinux-Mode.png) + +Set SELinux Mode + +Typically you will use setenforce to toggle between SELinux modes (enforcing to permissive and back) as a first troubleshooting step. If SELinux is currently set to enforcing while you’re experiencing a certain problem, and the same goes away when you set it to permissive, you can be confident you’re looking at a SELinux permissions issue. + +### SELinux Contexts ### + +A SELinux context consists of an access control environment where decisions are made based on SELinux user, role, and type (and optionally a level): + +- A SELinux user complements a regular Linux user account by mapping it to a SELinux user account, which in turn is used in the SELinux context for processes in that session, in order to explicitly define their allowed roles and levels. +- The concept of role acts as an intermediary between domains and SELinux users in that it defines which process domains and file types can be accessed. This will shield your system against vulnerability to privilege escalation attacks. +- A type defines an SELinux file type or an SELinux process domain. Under normal circumstances, processes are prevented from accessing files that other processes use, and and from accessing other processes, thus access is only allowed if a specific SELinux policy rule exists that allows it. + +Let’s see how all of that works through the following examples. + +**EXAMPLE 1: Changing the default port for the sshd daemon** + +In [Securing SSH – Part 8][3] we explained that changing the default port where sshd listens on is one of the first security measures to secure your server against external attacks. Let’s edit the `/etc/ssh/sshd_config` file and set the port to 9999: + + Port 9999 + +Save the changes, and restart sshd: + + # systemctl restart sshd + # systemctl status sshd + +![Change SSH Port](http://www.tecmint.com/wp-content/uploads/2015/05/Change-SSH-Port.png) + +Restart SSH Service + +As you can see, sshd has failed to start. But what happened? + +A quick inspection of `/var/log/audit/audit.log` indicates that sshd has been denied permissions to start on port 9999 (SELinux log messages include the word “AVC” so that they might be easily identified from other messages) because that is a reserved port for the JBoss Management service: + + # cat /var/log/audit/audit.log | grep AVC | tail -1 + +![Inspect SSH Logs](http://www.tecmint.com/wp-content/uploads/2015/05/Inspect-SSH-Logs.png) + +Inspect SSH Logs + +At this point you could disable SELinux (but don’t!) as explained earlier and try to start sshd again, and it should work. However, the semanage utility can tell us what we need to change in order for us to be able to start sshd in whatever port we choose without issues. + +Run, + + # semanage port -l | grep ssh + +to get a list of the ports where SELinux allows sshd to listen on. + +![Semanage Tool](http://www.tecmint.com/wp-content/uploads/2015/05/SELinux-Permission.png) + +Semanage Tool + +So let’s change the port in /etc/ssh/sshd_config to Port 9998, add the port to the ssh_port_t context, and then restart the service: + + # semanage port -a -t ssh_port_t -p tcp 9998 + # systemctl restart sshd + # systemctl is-active sshd + +![Semanage Add Port](http://www.tecmint.com/wp-content/uploads/2015/05/Semenage-Add-Port.png) + +Semanage Add Port + +As you can see, the service was started successfully this time. This example illustrates the fact that SELinux controls the TCP port number to its own port type internal definitions. + +**EXAMPLE 2: Allowing httpd to send access sendmail** + +This is an example of SELinux managing a process accessing another process. If you were to implement mod_security and mod_evasive along with Apache in your RHEL 7 server, you need to allow httpd to access sendmail in order to send a mail notification in the wake of a (D)DoS attack. In the following command, omit the -P flag if you do not want the change to be persistent across reboots. + + # semanage boolean -1 | grep httpd_can_sendmail + # setsebool -P httpd_can_sendmail 1 + # semanage boolean -1 | grep httpd_can_sendmail + +![Allow Apache to Send Mails](http://www.tecmint.com/wp-content/uploads/2015/05/Allow-Apache-to-Send-Mails.png) + +Allow Apache to Send Mails + +As you can tell from the above example, SELinux boolean settings (or just booleans) are true / false rules embedded into SELinux policies. You can list all the booleans with `semanage boolean -l`, and alternatively pipe it to grep in order to filter the output. + +**EXAMPLE 3: Serving a static site from a directory other than the default one** + +Suppose you are serving a static website using a different directory than the default one (`/var/www/html`), say /websites (this could be the case if you’re storing your web files in a shared network drive, for example, and need to mount it at /websites). + +a). Create an index.html file inside /websites with the following contents: + + +

SELinux test

+ + +If you do, + + # ls -lZ /websites/index.html + +you will see that the index.html file has been labeled with the default_t SELinux type, which Apache can’t access: + +![Check SELinux File Permission](http://www.tecmint.com/wp-content/uploads/2015/05/Check-File-Permssion.png) + +Check SELinux File Permission + +b). Change the DocumentRoot directive in `/etc/httpd/conf/httpd.conf` to /websites and don’t forget to update the corresponding Directory block. Then, restart Apache. + +c). Browse to `http://`, and you should get a 503 Forbidden HTTP response. + +d). Next, change the label of /websites, recursively, to the httpd_sys_content_t type in order to grant Apache read-only access to that directory and its contents: + + # semanage fcontext -a -t httpd_sys_content_t "/websites(/.*)?" + +e). Finally, apply the SELinux policy created in d): + + # restorecon -R -v /websites + +Now restart Apache and browse to `http://` again and you will see the html file displayed correctly: + +![Verify Apache Page](http://www.tecmint.com/wp-content/uploads/2015/05/08part13.png) + +Verify Apache Page + +### Summary ### + +In this article we have gone through the basics of SELinux. Note that due to the vastness of the subject, a full detailed explanation is not possible in a single article, but we believe that the principles outlined in this guide will help you to move on to more advanced topics should you wish to do so. + +If I may, let me recommend two essential resources to start with: the [NSA SELinux page][4] and the [RHEL 7 SELinux User’s and Administrator’s][5] guide. + +Don’t hesitate to let us know if you have any questions or comments. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ + +作者:[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/rhcsa-exam-manage-users-and-groups +[2]:http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/ +[3]:http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network-services-in-rhel-7/ +[4]:https://www.nsa.gov/research/selinux/index.shtml +[5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/SELinux_Users_and_Administrators_Guide/part_I-SELinux.html \ No newline at end of file From 052047b2f0a378904493f2bfc9f42b87c6c22799 Mon Sep 17 00:00:00 2001 From: wolf <522858454@qq.com> Date: Tue, 9 Jun 2015 14:55:26 +0800 Subject: [PATCH 1100/2517] translating by chenzhijun --- ...o access Feedly RSS feed from the command line on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md b/sources/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md index 58a0841280..16dccd8f8e 100644 --- a/sources/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md +++ b/sources/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md @@ -1,3 +1,5 @@ +translating by chenzhijun + How to access Feedly RSS feed from the command line on Linux ================================================================================ In case you didn't know, [Feedly][1] is one of the most popular online news aggregation services. It offers seamlessly unified news reading experience across desktops, Android and iOS devices via browser extensions and mobile apps. Feedly took on the demise of Google Reader in 2013, quickly gaining a lot of then Google Reader users. I was one of them, and Feedly has remained my default RSS reader since then. @@ -103,4 +105,4 @@ via: http://xmodulo.com/feedly-rss-feed-command-line-linux.html [a]:http://xmodulo.com/author/nanni [1]:https://feedly.com/ [2]:https://github.com/Jarkore/Feednix -[3]:https://aur.archlinux.org/packages/feednix/ \ No newline at end of file +[3]:https://aur.archlinux.org/packages/feednix/ From d8936df91b3097514e9fe8686beef2e2b028eed0 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Tue, 9 Jun 2015 16:13:34 +0800 Subject: [PATCH 1101/2517] finish translation --- ... Great for Remote Editing and Much More.md | 221 ------------------ ... Great for Remote Editing and Much More.md | 214 +++++++++++++++++ 2 files changed, 214 insertions(+), 221 deletions(-) delete mode 100644 sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md create mode 100644 translated/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md diff --git a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md b/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md deleted file mode 100644 index b54a7b158f..0000000000 --- a/sources/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md +++ /dev/null @@ -1,221 +0,0 @@ -translating by wwy-hust - -Compact Text Editors Great for Remote Editing and Much More -================================================================================ -A text editor is software used for editing plain text files. This type of software has many different uses including modifying configuration files, writing programming language source code, jotting down thoughts, or even making a grocery list. Given that editors can be used for such a diverse range of activities, it is worth spending the time finding an editor that best suites your preferences. - -Whatever the level of sophistication of the editor, they typically have a common set of functionality, such as searching/replacing text, formatting text, importing files, as well as moving text within the file. - -All of these text editors are console based applications which make them ideal for editing files on remote machines. Textadept also provides a graphical user interface, but remains fast and minimalist. - -Console based applications are also light on system resources (very useful on low spec machines), can be faster and more efficient than their graphical counterparts, they do not stop working when X needs to be restarted, and are great for scripting purposes. - -I have selected my favorite open source text editors that are frugal on system resources. - ----------- - -### Textadept ### - -![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Textadept.png) - -Textadept is a fast, minimalist, and extensible cross-platform open source text editor for programmers. This open source application is written in a mixture of C and Lua and has been optimized for speed and minimalism over the years. - -Textadept is an ideal editor for programmers who want endless extensibility options without sacrificing speed or succumbing to code bloat and featuritis. - -There is also a version available for the terminal, which only depends on ncurses; great for editing on remote machines. - -#### Features include: #### - - -- Lightweight -- Minimal design maximizes screen real estate -- Self-contained executable – no installation necessary -- Entirely keyboard driven -- Unlimited split views (GUI version) split the editor window as many times as you like either horizontally or vertically. Please note that Textadept is not a tabbed editor -- Support for over 80 programming languages -- Powerful snippets and key commands -- Code autocompletion and API lookup -- Unparalleled extensibility -- Bookmarks -- Find and Replace -- Find in Files -- Buffer-based word completion -- Adeptsense autocomplete symbols for programming languages and display API documentation -- Themes: light, dark, and term -- Uses lexers to assign names to buffer elements like comments, strings, and keywords -- Sessions -- Snapopen -- Available modules include support for Java, Python, Ruby and recent file lists -- Conforms with the Gnome HIG Human Interface Guidelines -- Modules include support for Java, Python, Ruby and recent file lists -- Support for editing Lua code. Syntax autocomplete and LuaDoc is available for many Textadept objects as well as Lua’s standard libraries - -- Website: [foicica.com/textadept][1] -- Developer: Mitchell and contributors -- License: MIT License -- Version Number: 7.7 - ----------- - -### Vim ### - -![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-vim.png) - -Vim is an advanced text editor that seeks to provide the power of the editor 'Vi', with a more complete feature set. - -This editor is very useful for editing programs and other plain ASCII files. All commands are given with normal keyboard characters, so those who can type with ten fingers can work very fast. Additionally, function keys can be defined by the user, and the mouse can be used. - -Vim is often called a "programmer's editor," and is so useful for programming that many consider it to be an entire Integrated Development Environment. However, this application is not only intended for programmers. Vim is highly regarded for all kinds of text editing, from composing email to editing configuration files. - -Vim's interface is based on commands given in a text user interface. Although its graphical user interface, gVim, adds menus and toolbars for commonly used commands, the software's entire functionality is still reliant on its command line mode. - -#### Features include: #### - - -- 3 modes: -- - Command mode -- - Insert mode -- - Command line mode -- Unlimited undo -- Multiple windows and buffers -- Flexible insert mode -- Syntax highlighting highlight portions of the buffer in different colors or styles, based on the type of file being edited -- Interactive commands -- - Marking a line -- - vi line buffers -- - Shift a block of code -- Block operators -- Command line history -- Extended regular expressions -- Edit compressed/archive files (gzip, bzip2, zip, tar) -- Filename completion -- Block operations -- Jump tags -- Folding text -- Indenting -- ctags and cscope intergration -- 100% vi compatibility mode -- Plugins to add/extend functionality -- Macros -- vimscript, Vim's internal scripting language -- Unicode support -- Multi-language support -- Integrated On-line help - -- Website: [www.vim.org][2] -- Developer: Bram Moolenaar -- License: GNU GPL compatible (charityware) -- Version Number: 7.4 - ----------- - -### ne ### - -![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-ne.png) - -ne is a full screen open source text editor. It is intended to be an easier to learn alternative to vi, yet still portable across POSIX-compliant operating systems. - -ne is easy to use for the beginner, but powerful and fully configurable for the wizard, and most sparing in its resource usage. - -#### Features include: #### - - -- Three user interfaces: control keystrokes, command line, and menus; keystrokes and menus are completely configurable -- Syntax highlighting -- Full support for UTF-8 files, including multiple-column characters -- The number of documents and clips, the dimensions of the display, and the file/line lengths are limited only by the integer size of the machine -- Simple scripting language where scripts can be generated via an idiotproof record/play method -- Unlimited undo/redo capability (can be disabled with a command) -- Automatic preferences system based on the extension of the file name being edited -- Automatic completion of prefixes using words in your documents as dictionary -- File requester with completion features for easy file retrieval; -- Extended regular expression search and replace à la emacs and vi -- A very compact memory model easily load and modify very large files -- Editing of binary files - -- Website: [ne.di.unimi.it][3] -- Developer: Sebastiano Vigna (original developer). Additional features added by Todd M. Lewis -- License: GNU GPL v3 -- Version Number: 2.5 - ----------- - -### Zile ### - -![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Zile.png) - -Zile Is Lossy Emacs (Zile) is a small Emacs clone. Zile is a customizable, self-documenting real-time display editor. Zile was written to be as similar as possible to Emacs; every Emacs user should feel comfortable with Zile. - -Zile is distinguished by a very small RAM memory footprint, of approximately 130kB, and quick editing sessions. It is 8-bit clean, allowing it to be used on any sort of file. - -#### Features include: #### - -- Small but fast and powerful -- Multi buffer editing with multi level undo -- Multi window -- Killing, yanking and registers -- Minibuffer completion -- Auto fill (word wrap) -- Registers -- Looks like Emacs. Key sequences, function and variable names are identical with Emacs's -- Killing -- Yanking -- Auto line ending detection - -- Website: [www.gnu.org/software/zile][4] -- Developer: Reuben Thomas, Sandro Sigala, David A. Capello -- License: GNU GPL v2 -- Version Number: 2.4.11 - ----------- - -### nano ### - -![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-nano.png) - -nano is a curses-based text editor. It is a clone of Pico, the editor of the Pine email client. - -The nano project was started in 1999 due to licensing issues with the Pine suite (Pine was not distributed under a free software license), and also because Pico lacked some essential features. - -nano aims to emulate the functionality and easy-to-use interface of Pico, while offering additional functionality, but without the tight mailer integration of the Pine/Pico package. - -nano, like Pico, is keyboard-oriented, controlled with control keys. - -#### Features include: #### - -- Interactive search and replace -- Color syntax highlighting -- Go to line and column number -- Auto-indentation -- Feature toggles -- UTF-8 support -- Mixed file format auto-conversion -- Verbatim input mode -- Multiple file buffers -- Smooth scrolling -- Bracket matching -- Customizable quoting string -- Backup files -- Internationalization support -- Filename tab completion - -- Website: [nano-editor.org][5] -- Developer: Chris Allegretta, David Lawrence, Jordi Mallach, Adam Rogoyski, Robert Siemborski, Rocco Corsi, David Benbennick, Mike Frysinger -- License: GNU GPL v3 -- Version Number: 2.2.6 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20141011073917230/TextEditors.html - -作者:Frazer Kline -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://foicica.com/textadept/ -[2]:http://www.vim.org/ -[3]:http://ne.di.unimi.it/ -[4]:http://www.gnu.org/software/zile/ -[5]:http://nano-editor.org/ diff --git a/translated/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md b/translated/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md new file mode 100644 index 0000000000..766f429ba0 --- /dev/null +++ b/translated/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md @@ -0,0 +1,214 @@ +ʺԶ̱༭Լ໷ļı༭ +================================================================================ +ı༭༭ıô޸ļдԴ룬һЩ뷨дһݹбֱ༭ܶ಻ͬĻֵûЩʱһʺϲõı༭ + +۱༭жôӣͨһͬĹܼ/滻ıʽıļԼļƶı + +Щı༭ǻն˵ӦãǺʺԶϱ༭ļı༭ͨҲṩһͼλû棬ɻᱣ֤ٺС + +ն˵ӦóϵͳԴҲģڵûϺãͼλ汾Ҳ졢ЧXҪʱҲֹͣ˷dzʺϱдű + +ѡһЩϲĿԴı༭ʹϵͳԴ涼dzڼ + +---------- + +### Textadept ### + +![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Textadept.png) + +TextadeptһʺϳԱģ١Сչƽ̨ĿԴı༭ԴCLuaдͣЩٶȺСŻ + +TextadeptЩҪ޵չҲԸٶȻڴ͵ijԱǵ༭ + +Ҳһն˵İ汾ncursesʺԶϽб༭ + +#### ܰ: #### + +- +- СĻ +- ԰ִļ - 谲װ +- ȫ +- ƵķָͼGUI汾ˮƽֱķָ༭ڡעTextadeptûдļǩ +- ֶ֧80ֵı +- ǿƬο +- ԶȫAPIѯ +- ױȵչ +- ǩ +- Һ滻 +- ļв +- ڻĵʲȫ +- ıԷԶȫԼʾAPIĵĹ +- ⣺ڰն +- ʹôʷƷԪأַۡؼ +- Զ̻Ự +- ٴ +- õģ飬JavaPythonRubyͽڴļб֧ +- Gnome HIGûӿڵָ +- ֱ֧༭Lua롣﷨ԶȫLuaDocTextadeptLuaı׼⡣ + +- ַ: [foicica.com/textadept][1] +- : Mitchell and contributors +- ֤: MIT License +- 汾: 7.7 + +---------- + +### Vim ### + +![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-vim.png) + +vimһ߼ı༭'vi'ǿ󣬲ӵиȫĹܼ + +༭Ա̺ͱ༭ASCIIļʮáеͨļַṩܹʹʮָ룬ʮֿݡ⣬ܼû壬ҿҲʹꡣ + +Vimͨ"Աı༭"ʮʺڱ̣ΪΪļɿȻǽԱVim߶Ӹı༭ӱдemail޸ļ + +VimĽӿڻıµСͼλ汾gVimΪõ˲˵͹ģʽ + +#### ܰ: #### + +- 3 ģʽ: +- - Command ģʽ +- - Insert ģʽ +- - Command line ģʽ +- Ƶij +- ںͻ +- ƽģʽ +- ༭ļʹòͬɫ﷨ +- +- - һ +- - vi л +- - ƶ +- +- ʷ +- չʽ +- ༭ѹ/ļ (gzip, bzip2, zip, tar) +- ļȫ +- ת +- ۵ı +- +- ctagscscope +- 100%viģʽ +- /չ +- +- vimscript, Vimڲű +- Unicode֧ +- ֧ +- ֧߰ + +- ַ: [www.vim.org][2] +- : Bram Moolenaar +- ֤: GNU GPL compatible (charityware) +- 汾: 7.4 + +---------- + +### ne ### + +![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-ne.png) + +neһȫĻĿԴı༭һviѧϰviҿPOSIX-ݵϵͳбЯʹá + +ne˵ʹãҲdzǿȫõ򣬲ԴʹʮֽԼ + +#### ܰ: #### + +- ûӿڣ ƻкͲ˵Ͳ˵ +- ﷨ +- UTF-8ļȫַ֧֣ +- ĵУʾάȺļ/кųȶбţҽڻֳ +- 򵥵Ľűԣűü¼/ŵķʽ +- Ƶij/ܣͨã +- ڱ༭ļչԶԻϵͳ +- ʹĵеĴֵԶǰ׺ȫ +- õļȡ +- չʽڲҺ滻emacsvi +- dzյڴģͣڼغ޸Ĵļʱʮֿ +- ɱ༭ļ + +- ַ: [ne.di.unimi.it][3] +- : Sebastiano Vigna (original developer). Additional features added by Todd M. Lewis +- ֤: GNU GPL v3 +- 汾: 2.5 + +---------- + +### Zile ### + +![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Zile.png) + +ZileLossy EmacsEmacs棩һС͵EmacsĿ¡档ZileһɶƵģĵʵʱʾı༭ڱдZileʱEmacsһܵСÿEmacsûZileеС + +ZileСRAMԼ130KBԼٿʼ༭8ģڱдκļ + +#### ܰ: #### + +- С͵١ǿ +- ༶ij +- ര +- ã̫ô롿 +- СĻɲȫ +- Զ (Զ) +- Ĵͼ +- EmacsСܺͱEmacsͬ +- Killing +- Yanking +- Զĩ + +- ַ: [www.gnu.org/software/zile][4] +- : Reuben Thomas, Sandro Sigala, David A. Capello +- ֤: GNU GPL v2 +- 汾: 2.4.11 + +---------- + +### nano ### + +![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-nano.png) + +nanoǻcursesı༭PicoPineʼͻ˱༭һ̰档 + +Pine֤ϰPineδԿԴ֤ҲΪPineȱһЩҪĹܣnanoĿ1999꿪ʼ + +nanoڸPicoĹܺԣͬʱṩĹܣPine/Picoʼͻˡ + +nanoPicoһԼΪƣÿƼơ + +#### ܰ: #### + +- ʽIJҺ滻 +- ɫ﷨ +- תкźкŴ +- Զ +- ܿ +- ֧UTF-8 +- ͵ļԶת +- ģʽ +- ļ +- ƽ +- ƥ +- Զַ +- ļ +- ʻ֧ +- tabȫļ + +- ַ: [nano-editor.org][5] +- : Chris Allegretta, David Lawrence, Jordi Mallach, Adam Rogoyski, Robert Siemborski, Rocco Corsi, David Benbennick, Mike Frysinger +- ֤: GNU GPL v3 +- 汾: 2.2.6 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20141011073917230/TextEditors.html + +ߣFrazer Kline +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ + +[1]:http://foicica.com/textadept/ +[2]:http://www.vim.org/ +[3]:http://ne.di.unimi.it/ +[4]:http://www.gnu.org/software/zile/ +[5]:http://nano-editor.org/ From 30385454a87058b0b152370a48edc81bb22cfa65 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 9 Jun 2015 16:45:22 +0800 Subject: [PATCH 1102/2517] Translating by ZTinoZ --- ...526 20 Useful Terminal Emulators for Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index bafcc15d71..5d8b38e80c 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -58,14 +58,14 @@ Guake Terminal Yakuake (Yet Another Kuake) 是一款基于KDE的下拉式终端仿真器,它与Guake再功能上非常相似。它的射击构思也是受FPS游戏的启发例如Quake。 -Yakuake is basically a KDE application, which can be easily installed on KDE desktop, but if you try to install Yakuake in GNOME desktop, it will prompt you to install huge number of dependency packages. +Yakuake主要是一款KDE应用程序,它能非常轻松地安装在KDE桌面上,但是如果你试着将它安装在GNOME桌面上,你将会安装大量的依赖包。 #### Yakuake的特性 #### -- Fluently turn down from the top of your screen -- Tabbed interface -- Configurable dimensions and animation speed -- Customizable +- 从屏幕顶端弹回顺畅 +- 选项卡式界面 +- 可配置的尺寸和动画速度 +- 可定制 ![Yakuake Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Yakuake-Terminal.jpeg) @@ -75,9 +75,9 @@ Yakuake Terminal ### 5. ROXTerm ### -ROXterm is yet another lightweight terminal emulator designed to provide similar features to gnome-terminal. It was originally constructed to have lesser footprints and faster start-up time by not using the Gnome libraries and by using a independent applet to bring the configuration interface (GUI), but over the time it’s role has shifted to bringing a higher range of features for power users. +ROXterm又是一款轻量级终端仿真器,旨在提供与GNOME终端相似的特性。它原本创造出来是为了通过不使用Gnome库从而拥有更少的占用空间和更快的启动速度并使用独立的小程序来建立配置界面(GUI), 但是随着时间的流逝,它的角色就转变为给那些老牌用户带来更高一层的特性。 -However, it is more customizable than gnome-terminal and anticipated more at “power” users who make excessive use of terminals. It is easily integrated with GNOME desktop environment and provides features like drag & drop of items into terminal. +然而,它比GNOME终端更加具有可制定性并且对于那些经常使用终端的老牌用户更令人期望。它能和GNOME桌面环境完美结合并在终端中提供像拖拽项目那样的特性。 ![Roxterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Roxterm-Terminal.jpeg) @@ -264,7 +264,7 @@ rxvt unicode - [rxvt-unicode][21] -If you know any other capable Linux terminal emulators that I’ve not included in the above list, please do share with me using our comment section. +如果你知道任何其它强大的Linux终端仿真器而上文未提及,欢迎在评论中与我们分享。 -------------------------------------------------------------------------------- From 81671c6898ca1688f9266bb5d9a9e7fc939a4325 Mon Sep 17 00:00:00 2001 From: wwy Date: Tue, 9 Jun 2015 23:46:00 +0800 Subject: [PATCH 1103/2517] Update 20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md --- ...s Her Interview Experience on Linux 'iptables' Firewall.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md b/sources/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md index 2ba7334580..ca51791986 100644 --- a/sources/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md +++ b/sources/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md @@ -1,3 +1,5 @@ +translating by wwy-hust + Nishita Agarwal Shares Her Interview Experience on Linux ‘iptables’ Firewall ================================================================================ Nishita Agarwal, a frequent Tecmint Visitor shared her experience (Question and Answer) with us regarding the job interview she had just given in a privately owned hosting company in Pune, India. She was asked a lot of questions on a variety of topics however she is an expert in iptables and she wanted to share those questions and their answer (she gave) related to iptables to others who may be going to give interview in near future. @@ -204,4 +206,4 @@ via: http://www.tecmint.com/linux-firewall-iptables-interview-questions-and-answ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/install-webmin-web-based-system-administration-tool-for-rhel-centos-fedora/ \ No newline at end of file +[1]:http://www.tecmint.com/install-webmin-web-based-system-administration-tool-for-rhel-centos-fedora/ From 05a0ac68326f2d3c7e72686a706f79f958e903dc Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 10 Jun 2015 09:50:01 +0800 Subject: [PATCH 1104/2517] PUB:20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux @GOLinux --- ... to install Shrew Soft IPsec VPN client on Linux.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md (88%) diff --git a/translated/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md b/published/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md similarity index 88% rename from translated/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md rename to published/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md index abe1d3943d..56f57a5020 100644 --- a/translated/tech/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md +++ b/published/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md @@ -1,9 +1,9 @@ -Linux有问必答——Linux上如何安装Shrew Soft IPsec VPN +Linux有问必答:Linux上如何安装Shrew Soft IPsec VPN ================================================================================ -> **Question**: I need to connect to an IPSec VPN gateway. For that, I'm trying to use Shrew Soft VPN client, which is available for free. How can I install Shrew Soft VPN client on [insert your Linux distro]? -> **问题**:我需要连接到一个IPSec VPN网关,鉴于此,我尝试使用Shrew Soft VPN客户端,它是一个免费版本。我怎样才能安装Shrew Soft VPN客户端到[插入你的Linux发行版]? -市面上有许多商业VPN网关,同时附带有他们自己的专有VPN客户端软件。虽然也有许多开源的VPN服务器/客户端备选方案,但它们通常缺乏复杂的IPsec支持,比如互联网密钥交换(IKE),这是一个标准的IPsec协议,用于加固VPN密钥交换和验证安全。Shrew Soft VPN是一个免费的IPsec VPN客户端,它支持多种验证方法、密钥交换、加密以及防火墙穿越选项。 +> **问题**:我需要连接到一个IPSec VPN网关,鉴于此,我尝试使用Shrew Soft VPN客户端,它是一个免费版本。我怎样才能安装Shrew Soft VPN客户端到[某个Linux发行版]? + +市面上有许多商业VPN网关,同时附带有他们自己的专有VPN客户端软件。虽然也有许多开源的VPN服务器/客户端备选方案,但它们通常缺乏复杂的IPsec支持,比如互联网密钥交换(IKE),这是一个标准的IPsec协议,用于加固VPN密钥交换和验证安全。Shrew Soft VPN是一个免费的IPsec VPN客户端,它支持多种验证方法、密钥交换、加密以及防火墙穿透选项。 下面介绍如何安装Shrew Soft VPN客户端到Linux平台。 @@ -90,7 +90,7 @@ via: http://ask.xmodulo.com/install-shrew-soft-ipsec-vpn-client-linux.html 作者:[Dan Nanni][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 2c5488546d748c77e004f68908dc55abd32d2fbe Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 10 Jun 2015 10:05:21 +0800 Subject: [PATCH 1105/2517] PUB:20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu @GOLinux --- ... Not Found' error with 'apt-get update' on old Ubuntu.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md (92%) diff --git a/translated/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md b/published/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md similarity index 92% rename from translated/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md rename to published/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md index 9880f7953f..81bf2cbbf6 100644 --- a/translated/tech/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md +++ b/published/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md @@ -1,4 +1,4 @@ -Linux有问必答——在旧的Ubuntu上如何修复“apt-get update”的“404 Not Found”错误 +Linux有问必答:如何更新过期版本的Ubuntu ================================================================================ > **问题**: 我的PC上安装了旧版的Ubuntu 13.04(急切的浣熊)。当我在上面运行“sudo apt-get update”时,它丢给了我一大堆“404 Not Found”错误,结果是我不能使用apt-get或aptitude来安装或更新任何软件包了。由于该错误的原因,我甚至不能将它升级到更新的版本。我怎样才能修复这个问题啊? > @@ -20,7 +20,7 @@ Linux有问必答——在旧的Ubuntu上如何修复“apt-get update”的“4 这里,通过切换到旧版本仓库提供了一个快速修复“404 Not Found”错误的便捷方式。 -首先,使用旧版本仓库替换main/security仓库,就像下面这样。 +首先,使用old-releases仓库替换main/security仓库,就像下面这样。 $ sudo sed -i -r 's/([a-z]{2}\.)?archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list $ sudo sed -i -r 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list @@ -38,7 +38,7 @@ via: http://ask.xmodulo.com/404-not-found-error-apt-get-update-ubuntu.html 作者:[Dan Nanni][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From a129fb3f088e16f22cea1e526b8126106fec8d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Wed, 10 Jun 2015 10:15:26 +0800 Subject: [PATCH 1106/2517] Update RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md --- ...--Reviewing Essential Commands and System Documentation.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md index 9b32c93453..f1ee36576d 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md @@ -1,3 +1,5 @@ +translating by xiqingongzi + RHCSA Series: Reviewing Essential Commands & System Documentation – Part 1 ================================================================================ RHCSA (Red Hat Certified System Administrator) is a certification exam from Red Hat company, which provides an open source operating system and software to the enterprise community, It also provides support, training and consulting services for the organizations. @@ -310,4 +312,4 @@ via: http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-docum [7]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ [8]:http://www.tecmint.com/echo-command-in-linux/ [9]:http://www.tecmint.com/pwd-command-examples/ -[10]:http://www.tecmint.com/view-contents-of-file-in-linux/ \ No newline at end of file +[10]:http://www.tecmint.com/view-contents-of-file-in-linux/ From ba38c7e9b57a510d5c75c0aebbfe0d4d18b9eb45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Wed, 10 Jun 2015 10:17:41 +0800 Subject: [PATCH 1107/2517] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?=E3=80=91RHCSA=20Series--Part=2001--Reviewing=20Essential=20Com?= =?UTF-8?q?mands=20and=20System=20Documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Translating By xiqingongzi RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md --- ...01--Reviewing Essential Commands and System Documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md index f1ee36576d..0155034c35 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md @@ -1,4 +1,4 @@ -translating by xiqingongzi +[translating by xiqingongzi] RHCSA Series: Reviewing Essential Commands & System Documentation – Part 1 ================================================================================ From f2a590ffb2f2712ca6f7f01c242f30b717cddcbc Mon Sep 17 00:00:00 2001 From: yajun Date: Wed, 10 Jun 2015 10:29:42 +0800 Subject: [PATCH 1108/2517] =?UTF-8?q?fyh=E7=94=B3=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ools for Browsing Websites and Downloading Files in Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md b/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md index d291f34511..27c3e388ef 100644 --- a/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md +++ b/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md @@ -1,3 +1,5 @@ +fyh翻译中。。。 + 7 Command Line Tools for Browsing Websites and Downloading Files in Linux ================================================================================ In the last article, we have covered few useful tools like ‘rTorrent‘, ‘wget‘, ‘cURL‘, ‘w3m‘, and ‘Elinks‘. We got lots of response to cover few other tools of same genre, if you’ve missed the first part you can go through it.. From 401c0389932f7d210dad2d2d6f021b60ff4ee142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Wed, 10 Jun 2015 10:43:58 +0800 Subject: [PATCH 1109/2517] From Row 1 to Row 11 --- ...viewing Essential Commands and System Documentation.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md index 0155034c35..4bb5948d5d 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md @@ -1,14 +1,14 @@ [translating by xiqingongzi] -RHCSA Series: Reviewing Essential Commands & System Documentation – Part 1 +RHCSA系列: 复习基础命令及系统文档 – 第一部分 ================================================================================ -RHCSA (Red Hat Certified System Administrator) is a certification exam from Red Hat company, which provides an open source operating system and software to the enterprise community, It also provides support, training and consulting services for the organizations. +RHCSA (红帽认证系统工程师) 是由给商业公司提供开源操作系统和软件的RedHat公司举行的认证考试, 除此之外,红帽公司还为这些企业和机构提供支持、训练以及咨询服务 ![RHCSA Exam Guide](http://www.tecmint.com/wp-content/uploads/2015/02/RHCSA-Series-by-Tecmint.png) -RHCSA Exam Preparation Guide +RHCSA 考试准备指南 -RHCSA exam is the certification obtained from Red Hat Inc, after passing the exam (codename EX200). RHCSA exam is an upgrade to the RHCT (Red Hat Certified Technician) exam, and this upgrade is compulsory as the Red Hat Enterprise Linux was upgraded. The main variation between RHCT and RHCSA is that RHCT exam based on RHEL 5, whereas RHCSA certification is based on RHEL 6 and 7, the courseware of these two certifications are also vary to a certain level. +RHCSA 考试(考试编号 EX200)通过后可以获取由Red Hat 公司颁发的证书. RHCSA 考试是RHCT(红帽认证技师)的升级版,而且RHCSA必须在新的Red Hat Enterprise Linux(红帽企业版)下完成.RHCT和RHCSA的主要变化就是RHCT基于 RHEL5 , 而RHCSA基于RHEL6或者7, 这两个认证的等级也有所不同. This Red Hat Certified System Administrator (RHCSA) is essential to perform the following core system administration tasks needed in Red Hat Enterprise Linux environments: From 5ce725050046e89248644cfcbeb9df556b612bdb Mon Sep 17 00:00:00 2001 From: KS Date: Wed, 10 Jun 2015 11:06:58 +0800 Subject: [PATCH 1110/2517] =?UTF-8?q?wyangsun=E7=94=B3=E8=AF=B7=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wyangsun申请翻译 --- ...eate Own Online Shopping Store Using 'OpenCart' in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md b/sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md index ad673a03e0..39db75746a 100644 --- a/sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md +++ b/sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md @@ -1,3 +1,4 @@ +wyangsun翻译中 How to Create Own Online Shopping Store Using “OpenCart” in Linux ================================================================================ In the Internet world we are doing everything using a computer. Electronic Commerce aka e-commerce is one one of them. E-Commerce is nothing new and it started in the early days of ARPANET, where ARPANET used to arrange sale between students of Massachusetts Institute of Technology and Stanford Artificial Intelligence Laboratory. @@ -222,4 +223,4 @@ via: http://www.tecmint.com/create-e-commerce-online-shopping-store-using-openca [1]:http://demo.opencart.com/ [2]:http://demo.opencart.com/admin/ [3]:http://www.opencart.com/index.php?route=download/download/ -[4]:http://secure.hostgator.com/%7Eaffiliat/cgi-bin/affiliates/clickthru.cgi?id=tecmint \ No newline at end of file +[4]:http://secure.hostgator.com/%7Eaffiliat/cgi-bin/affiliates/clickthru.cgi?id=tecmint From cb19d06bd25774e7b3338929d624a322cca65cd8 Mon Sep 17 00:00:00 2001 From: Alan You <1058413893@qq.com> Date: Wed, 10 Jun 2015 13:28:18 +0800 Subject: [PATCH 1111/2517] Update 20150515 How to Install Percona Server on CentOS 7.md --- .../20150515 How to Install Percona Server on CentOS 7.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150515 How to Install Percona Server on CentOS 7.md b/sources/tech/20150515 How to Install Percona Server on CentOS 7.md index 03affe787e..9bfd676f92 100644 --- a/sources/tech/20150515 How to Install Percona Server on CentOS 7.md +++ b/sources/tech/20150515 How to Install Percona Server on CentOS 7.md @@ -1,3 +1,5 @@ +translating by FatJoe123 + How to Install Percona Server on CentOS 7 ================================================================================ In this article we are going to learn about percona server, an opensource drop-in replacement for MySQL and also for MariaDB. The InnoDB database engine make it very attractive and a good alternative if you need performance, reliability and a cost efficient solution @@ -185,4 +187,4 @@ via: http://linoxide.com/linux-how-to/percona-server-centos-7/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/carlosal/ \ No newline at end of file +[a]:http://linoxide.com/author/carlosal/ From bbf84f32ce44238355ea24e9faffa0ecfc67f35c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 10 Jun 2015 14:13:35 +0800 Subject: [PATCH 1112/2517] =?UTF-8?q?20150610-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...urce RSS News Ticker for Linux Desktops.md | 95 ++++ ...ry Cache Buffer and Swap Space on Linux.md | 99 ++++ ... Spaces and Special Characters in Linux.md | 435 ++++++++++++++++++ ...Experience on Linux 'iptables' Firewall.md | 212 +++++++++ ...inux or Unix Commands Regular Intervals.md | 133 ++++++ 5 files changed, 974 insertions(+) create mode 100644 sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md create mode 100644 sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md create mode 100644 sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md create mode 100644 sources/tech/20150610 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md create mode 100644 sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md diff --git a/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md b/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md new file mode 100644 index 0000000000..638482a144 --- /dev/null +++ b/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md @@ -0,0 +1,95 @@ +Tickr Is An Open-Source RSS News Ticker for Linux Desktops +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/rss-tickr.jpg) + +**Latest! Latest! Read all about it!** + +Alright, so the app we’re highlighting today isn’t quite the binary version of an old newspaper seller — but it is a great way to have the latest news brought to you, on your desktop. + +Tick is a GTK-based news ticker for the Linux desktop that scrolls the latest headlines and article titles from your favourite RSS feeds in horizontal strip that you can place anywhere on your desktop. + +Call me Joey Calamezzo; I put mine on the bottom TV news station style. + +“Over to you, sub-heading.” + +### RSS — Remember That? ### + +“Thanks paragraph ending.” + +In an era of push notifications, social media, and clickbait, cajoling us into reading the latest mind-blowing, humanity saving listicle ASAP, RSS can seem a bit old hat. + +For me? Well, RSS lives up to its name of Really Simple Syndication. It’s the easiest, most manageable way to have news come to me. I can manage and read stuff when I want; there’s no urgency to view lest the tweet vanish into the stream or the push notification vanish. + +The beauty of Tickr is in its utility. You can have a constant stream of news trundling along the bottom of your screen, which you can passively glance at from time to time. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/tickr-close-up-750x58.jpg) + +There’s no pressure to ‘read’ or ‘mark all read’ or any of that. When you see something you want to read you just click it to open it in a web browser. + +### Setting it Up ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/tickr-rss-settings.jpg) + +Although Tickr is available to install from the Ubuntu Software Centre it hasn’t been updated for a long time. Nowhere is this sense of abandonment more keenly felt than when opening the unwieldy and unintuitive configuration panel. + +To open it: + +1. Right click on the Tickr bar +1. Go to Edit > Preferences +1. Adjust the various settings + +Row after row of options and settings, few of which seem to make sense at first. But poke and prod around and you’ll controls for pretty much everything, including: + +- Set scrolling speed +- Choose behaviour when mousing over +- Feed update frequency +- Font, including font sizes and color +- Separator character (‘delineator’) +- Position of Tickr on screen +- Color and opacity of Tickr bar +- Choose how many articles each feed displays + +One ‘quirk’ worth mentioning is that pressing the ‘Apply’ only updates the on-screen Tickr to preview changes. For changes to take effect when you exit the Preferences window you need to click ‘OK’. + +Getting the bar to sit flush on your display can also take a fair bit of tweaking, especially on Unity. + +Press the “full width button” to have the app auto-detect your screen width. By default when placed at the top or bottom it leaves a 25px gap (the app was created back in the days of GNOME 2.x desktops). After hitting the top or bottom buttons just add an extra 25 pixels to the input box compensate for this. + +Other options available include: choose which browser articles open in; whether Tickr appears within a regular window frame; whether a clock is shown; and how often the app checks feed for articles. + +#### Adding Feeds #### + +Tickr comes with a built-in list of over 30 different feeds, ranging from technology blogs to mainstream news services. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/feed-picker-750x398.jpg) + +You can select as many of these as you like to show headlines in the on screen ticker. If you want to add your own feeds you can: – + +1. Right click on the Tickr bar +1. Go to File > Open Feed +1. Enter Feed URL +1. Click ‘Add/Upd’ button +1. Click ‘OK (select)’ + +To set how many items from each feed shows in the ticker change the “Read N items max per feed” in the other preferences window. + +### Install Tickr in Ubuntu 14.04 LTS and Up ### + +So that’s Tickr. It’s not going to change the world but it will keep you abreast of what’s happening in it. + +To install it in Ubuntu 14.04 LTS or later head to the Ubuntu Software Centre but clicking the button below. + +- [Click to install Tickr form the Ubuntu Software Center][1] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/06/tickr-open-source-desktop-rss-news-ticker + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:apt://tickr \ No newline at end of file diff --git a/sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md b/sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md new file mode 100644 index 0000000000..e668e5d9ec --- /dev/null +++ b/sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md @@ -0,0 +1,99 @@ +How to Clear RAM Memory Cache, Buffer and Swap Space on Linux +================================================================================ +Like any other operating system, GNU/Linux has implemented a memory management efficiently and even more than that. But if any process is eating away your memory and you want to clear it, Linux provides a way to flush or clear ram cache. + +![Clear RAM Cache and Swap in Linux](http://www.tecmint.com/wp-content/uploads/2015/05/Clear-RAM-Cache-in-Linux.jpg) + +### How to Clear Cache in Linux? ### + +Every Linux System has three options to clear cache without interrupting any processes or services. + +1. Clear PageCache only. + + # sync; echo 1 > /proc/sys/vm/drop_caches + +2. Clear dentries and inodes. + + # sync; echo 2 > /proc/sys/vm/drop_caches + +3. Clear PageCache, dentries and inodes. + + # sync; echo 3 > /proc/sys/vm/drop_caches + +Explanation of above command. + +sync will flush the file system buffer. Command Separated by `“;”` run sequentially. The shell wait for each command to terminate before executing the next command in the sequence. As mentioned in kernel documentation, writing to drop_cache will clean cache without killing any application/service, [command echo][1] is doing the job of writing to file. + +If you have to clear the disk cache, the first command is safest in enterprise and production as `“...echo 1 > ….”` will clear the PageCache only. It is not recommended to use third option above `“...echo 3 >”` in production until you know what you are doing, as it will clear PageCache, dentries and inodes. + +**Is it a good idea to free Buffer and Cache in Linux that might be used by Linux Kernel?** + +When you are applying various settings and want to check, if it is actually implemented specially on I/O-extensive benchmark, then you may need to clear buffer cache. You can drop cache as explained above without rebooting the System i.e., no downtime required. + +Linux is designed in such a way that it looks into disk cache before looking onto the disk. If it finds the resource in the cache, then the request doesn’t reach the disk. If we clean the cache, the disk cache will be less useful as the OS will look for the resource on the disk. + +Moreover it will also slow the system for a few seconds while the cache is cleaned and every resource required by OS is loaded again in the disk-cache. + +Now we will be creating a shell script to auto clear RAM cache daily at 2PM via a cron scheduler task. Create a shell script clearcache.sh and add the following lines. + + #!/bin/bash + # Note, we are using "echo 3", but it is not recommended in production instead use "echo 1" + echo "echo 3 > /proc/sys/vm/drop_caches" + +Set execute permission on the clearcache.sh file. + + # chmod 755 clearcache.sh + +Now you may call the script whenever you required to clear ram cache. + +Now set a cron to clear RAM cache everyday at 2PM. Open crontab for editing. + + # crontab -e + +Append the below line, save and exit to run it at 2PM daily. + + 0 3 * * * /path/to/clearcache.sh + +For more details on how to cron a job you may like to check our article on [11 Cron Scheduling Jobs][2]. + +**Is it good idea to auto clear RAM cache on production server?** + +No! it is not. Think of a situation when you have scheduled the script to clear ram cache everyday at 2PM. Everyday at 2PM the script is executed and it flushes your RAM cache. One day for whatsoever reason, may be more than expected users are online on your website and seeking resource from your server. + +At the same time scheduled script run and clears everything in cache. Now all the user are fetching data from disk. It will result in server crash and corrupt the database. So clear ram-cache only when required,and known your foot steps, else you are a Cargo Cult System Administrator. + +#### How to Clear Swap Space in Linux? #### + +If you want to clear Swap space, you may like to run the below command. + + # swapoff -a && swapon -a + +Also you may add above command to a cron script above, after understanding all the associated risk. + +Now we will be combining both above commands into one single command to make a proper script to clear RAM Cache and Swap Space. + + # echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared' + + OR + + su -c 'echo 3 >/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared' + +After testing both above command, we will run command “free -h” before and after running the script and will check cache. + +![Clear RAM Cache and Swap Space](http://www.tecmint.com/wp-content/uploads/2015/05/Clear-RAM-Cache.gif) + +That’s all for now, if you liked the article, don’t forget to provide us with your valuable feedback in the comments to let us know, what you think is it a good idea to clear ram cache and buffer in production and Enterprise? + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/echo-command-in-linux/ +[2]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ \ No newline at end of file diff --git a/sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md b/sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md new file mode 100644 index 0000000000..03bbb69005 --- /dev/null +++ b/sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md @@ -0,0 +1,435 @@ +How to Manipulate Filenames Having Spaces and Special Characters in Linux +================================================================================ +We come across files and folders name very regularly. In most of the cases file/folder name are related to the content of the file/folder and starts with number and characters. Alpha-Numeric file name are pretty common and very widely used, but this is not the case when we have to deal with file/folder name that has special characters in them. + +**Note**: We can have files of any type but for simplicity and easy implementation we will be dealing with Text file (.txt), throughout the article. + +Example of most common file names are: + + abc.txt + avi.txt + debian.txt + ... + +Example of numeric file names are: + + 121.txt + 3221.txt + 674659.txt + ... + +Example of Alpha-Numeric file names are: + + eg84235.txt + 3kf43nl2.txt + 2323ddw.txt + ... + +Examples of file names that has special character and is not very common: + + #232.txt + #bkf.txt + #bjsd3469.txt + #121nkfd.txt + -2232.txt + -fbjdew.txt + -gi32kj.txt + --321.txt + --bk34.txt + ... + +One of the most obvious question here is – who on earth create/deal with files/folders name having a Hash `(#)`, a semi-colon `(;)`, a dash `(-)` or any other special character. + +I Agree to you, that such file names are not common still your shell should not break/give up when you have to deal with any such file names. Also speaking technically every thing be it folder, driver or anything else is treated as file in Linux. + +### Dealing with file that has dash (-) in it’s name ### + +Create a file that starts with a dash `(-)`, say -abx.txt. + + $ touch -abc.txt + +#### Sample Output #### + + touch: invalid option -- 'b' + Try 'touch --help' for more information. + +The reason for above error, that shell interprets anything after a dash `(-)`, as option, and obviously there is no such option, hence is the error. + +To resolve such error, we have to tell the Bash shell (yup this and most of the other examples in the article is for BASH) not to interpret anything after special character (here dash), as option. + +There are two ways to resolve this error as: + + $ touch -- -abc.txt [Option #1] + $ touch ./-abc.txt [Option #2] + +You may verify the file thus created by both the above ways by running commands ls or [ls -l][1] for long listing. + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 11:05 -abc.txt + +To edit the above file you may do: + + $ nano -- -abc.txt + or + $ nano ./-abc.txt + +**Note**: You may replace nano with any other editor of your choice say vim as: + + $ vim -- -abc.txt + or + $ vim ./-abc.txt + +Similarly to move such file you have to do: + + $ mv -- -abc.txt -a.txt + or + $ mv -- -a.txt -abc.txt + +and to Delete this file, you have to do: + + $ rm -- -abc.txt + or + $ rm ./-abc.txt + +If you have lots of files in a folder the name of which contains dash, and you want to delete all of them at once, do as: + + $ rm ./-* + +**Important to Note:** + +1. The same rule as discussed above follows for any number of hypen in the name of the file and their occurrence. Viz., -a-b-c.txt, ab-c.txt, abc-.txt, etc. + +2. The same rule as discussed above follows for the name of the folder having any number of hypen and their occurrence, except the fact that for deleting the folder you have to use ‘rm -rf‘ as: + + $ rm -rf -- -abc + or + $ rm -rf ./-abc + +### Dealing with files having HASH (#) in the name ### + +The symbol `#` has a very different meaning in BASH. Anything after a `#` is interpreted as comment and hence neglected by BASH. + +**Understand it using examples:** + +create a file #abc.txt. + + $ touch #abc.txt + +#### Sample Output #### + + touch: missing file operand + Try 'touch --help' for more information. + +The reason for above error, that Bash is interpreting #abc.txt a comment and hence ignoring. So the [command touch][2] has been passed without any file Operand, and hence is the error. + +To resolve such error, you may ask BASH not to interpret # as comment. + + $ touch ./#abc.txt + or + $ touch '#abc.txt' + +and verify the file just created as: + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 12:14 #abc.txt + +Now create a file the name of which contains # anywhere except at the begging. + + $ touch ./a#bc.txt + $ touch ./abc#.txt + + or + $ touch 'a#bc.txt' + $ touch 'abc#.txt' + +Run ‘ls -l‘ to verify it: + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 12:16 a#bc.txt + -rw-r--r-- 1 avi avi 0 Jun 8 12:16 abc#.txt + +What happens when you create two files (say a and #bc) at once: + + $ touch a.txt #bc.txt + +Verify the file just created: + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 12:18 a.txt + +Obvious from the above example it only created file ‘a‘ and file ‘#bc‘ has been ignored. To execute the above situation successfully we can do, + + $ touch a.txt ./#bc.txt + or + $ touch a.txt '#bc.txt' + +and verify it as: + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 12:20 a.txt + -rw-r--r-- 1 avi avi 0 Jun 8 12:20 #bc.txt + +You can move the file as: + + $ mv ./#bc.txt ./#cd.txt + or + $ mv '#bc.txt' '#cd.txt' + +Copy it as: + + $ cp ./#cd.txt ./#de.txt + or + $ cp '#cd.txt' '#de.txt' + +You may edit it as using your choice of editor as: + + $ vi ./#cd.txt + or + $ vi '#cd.txt' + +---------- + + $ nano ./#cd.txt + or + $ nano '#cd.txt' + +And Delete it as: + + $ rm ./#bc.txt + or + $ rm '#bc.txt' + +To delete all the files that has hash (#) in the file name, you may use: + + # rm ./#* + +### Dealing with files having semicolon (;) in its name ### + +In case you are not aware, semicolon acts as a command separator in BASH and perhaps other shell as well. Semicolon lets you execute several command in one go and acts as separator. Have you ever deal with any file name having semicolon in it? If not here you will. + +Create a file having semi-colon in it. + + $ touch ;abc.txt + +#### Sample Output #### + + touch: missing file operand + Try 'touch --help' for more information. + bash: abc.txt: command not found + +The reason for above error, that when you run the above command BASH interpret touch as a command but could not find any file operand before semicolon and hence it reports error. It also reports another error that ‘abc.txt‘ command not found, only because after semicolon BASH was expecting another command and ‘abc.txt‘, is not a command. + +To resolve such error, tell BASH not to interpret semicolon as command separator, as: + + $ touch ./';abc.txt' + or + $ touch ';abc.txt' + +**Note**: We have enclosed the file name with single quote ''. It tells BASH that ; is a part of file name and not command separator. + +Rest of the action (viz., copy, move, delete) on the file and folder having semicolon in its name can be carried out straight forward by enclosing the name in single quote. + +### Dealing with other special characters in file/folder name ### + +#### Plus Sign (+) in file name #### + +Don’t requires anything extra, just do it normal way, as simple file name as shown below. + + $ touch +12.txt + +#### Dollar sign ($) in file name #### + +You have to enclose file name in single quote, as we did in the case of semicolon. Rest of the things are straight forward.. + + $ touch '$12.txt' + +#### Percent (%) in file name #### + +You don’t need to do anything differently, treat it as normal file. + + $ touch %12.txt + +#### Asterisk (*) in file name #### + +Having Asterisk in file name don’t change anything and you can continue using it as normal file. + + $ touch *12.txt + +Note: When you have to delete a file that starts with *, Never use following commands to delete such files. + + $ rm * + or + $ rm -rf * + +Instead use, + + $ rm ./*.txt + +#### Exclamation mark (!) in file name #### + +Just Enclose the file name in single quote and rest of the things are same. + + $ touch '!12.txt' + +#### At Sign (@) in file name #### + +Nothing extra, treat a filename having At Sign as nonrmal file. + + $ touch '@12.txt' + +#### ^ in file name #### + +No extra attention required. Use a file having ^ in filename as normal file. + + $ touch ^12.txt + +#### Ampersand (&) in file name #### + +Filename should be enclosed in single quotes and you are ready to go. + + $ touch '&12.txt' + +#### Parentheses () in file name #### + +If the file name has Parenthesis, you need to enclose filename with single quotes. + + $ touch '(12.txt)' + +#### Braces {} in file name #### + +No Extra Care needed. Just treat it as just another file. + + $ touch {12.txt} + +#### Chevrons <> in file name #### + +A file name having Chevrons must be enclosed in single quotes. + + $ touch '<12.txt>' + +#### Square Brackets [ ] in file name #### + +Treat file name having Square Brackets as normal files and you need not take extra care of it. + + $ touch [12.txt] + +#### Under score (_) in file name #### + +They are very common and don’t require anything extra. Just do what you would have done with a normal file. + + $ touch _12.txt + +#### Equal-to (=) in File name #### + +Having an Equal-to sign do not change anything, you can use it as normal file. + + $ touch =12.txt + +#### Dealing with back slash (\) #### + +Backslash tells shell to ignore the next character. You have to enclose file name in single quote, as we did in the case of semicolon. Rest of the things are straight forward. + + $ touch '\12.txt' + +#### The Special Case of Forward Slash #### + +You cannot create a file the name of which includes a forward slash (/), until your file system has bug. There is no way to escape a forward slash. + +So if you can create a file such as ‘/12.txt’ or ‘b/c.txt’ then either your File System has bug or you have Unicode support, which lets you create a file with forward slash. In this case the forward slash is not a real forward slash but a Unicode character that looks alike a forward slash. + +#### Question Mark (?) in file name #### + +Again, an example where you don’t need to put any special attempt. A file name having Question mark can be treated in the most general way. + + $ touch ?12.txt + +#### Dot Mark (.) in file name #### + +The files starting with dot `(.)` are very special in Linux and are called dot files. They are hidden files generally a configuration or system files. You have to use switch ‘-a‘ or ‘-A‘ with ls command to view such files. + +Creating, editing, renaming and deleting of such files are straight forward. + + $ touch .12.txt + +Note: In Linux you may have as many dots `(.)` as you need in a file name. Unlike other system dots in file name don’t means to separate name and extension. You can create a file having multiple dots as: + + $ touch 1.2.3.4.5.6.7.8.9.10.txt + +and check it as: + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 14:32 1.2.3.4.5.6.7.8.9.10.txt + +#### Comma (,) in file name #### + +You can have comma in a file name, as many as you want and you Don’t requires anything extra. Just do it normal way, as simple file name. + + $ touch ,12.txt + or + $ touch ,12,.txt + +#### Colon (:) in File name #### + +You can have colon in a file name, as many as you want and you Don’t requires anything extra. Just do it normal way, as simple file name. + + $ touch :12.txt + or + $ touch :12:.txt + +#### Having Quotes (single and Double) in file name #### + +To have quotes in file name, we have to use the rule of exchange. I.e, if you need to have single quote in file name, enclose the file name with double quotes and if you need to have double quote in file name, enclose it with single quote. + + $ touch "15'.txt" + + and + + $ touch '15”.txt' + +#### Tilde (~) in file name #### + +Some Editors in Linux like emacs create a backup file of the file being edited. The backup file has the name of the original file plus a tilde at the end of the file name. You can have a file that name of which includes tilde, at any location simply as: + + $ touch ~1a.txt + or + $touch 2b~.txt + +#### White Space in file name #### + +Create a file the name of which has space between character/word, say “hi my name is avishek.txt”. + +It is not a good idea to have file name with spaces and if you have to distinct readable name, you should use, underscore or dash. However if you have to create such a file, you have to use backward slash which ignores the next character to it. To create above file we have to do it this way.. + + $ touch hi\ my\ name\ is\ avishek.txt + + hi my name is avishek.txt + +I have tried covering all the scenario you may come across. Most of the above implementation are explicitly for BASH Shell and may not work in other shell. + +If you feel that I missed something (that is very common and human nature), you may include your suggestion in the comments below. Keep Connected, Keep Commenting. Stay Tuned and connected! Like and share us and help us get spread! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-linux-filenames-with-special-characters/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ +[2]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ \ No newline at end of file diff --git a/sources/tech/20150610 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md b/sources/tech/20150610 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md new file mode 100644 index 0000000000..455b994975 --- /dev/null +++ b/sources/tech/20150610 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md @@ -0,0 +1,212 @@ +Nishita Agarwal Shares Her Interview Experience on Linux ‘iptables’ Firewall +================================================================================ +Nishita Agarwal, a frequent Tecmint Visitor shared her experience (Question and Answer) with us regarding the job interview she had just given in a privately owned hosting company in Pune, India. She was asked a lot of questions on a variety of topics however she is an expert in iptables and she wanted to share those questions and their answer (she gave) related to iptables to others who may be going to give interview in near future. + +![Linux Firewall Iptables Interview Questions](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-iptables-Interview-Questions.jpg) + +All the questions and their Answer are rewritten based upon the memory of Nishita Agarwal. + +> “Hello Friends! My name is **Nishita Agarwal**. I have Pursued Bachelor Degree in Technology. My area of Specialization is UNIX and Variants of UNIX (BSD, Linux) fascinates me since the time I heard it. I have 1+ years of experience in storage. I was looking for a job change which ended with a hosting company in Pune, India.” + +Here is the collection of what I was asked during the Interview. I’ve documented only those questions and their answer that were related to iptables based upon my memory. Hope this will help you in cracking your Interview. + +**1. Have you heard of iptables and firewall in Linux? Any idea of what they are and for what it is used?** + +> **Answer** : I’ve been using iptables for quite long time and I am aware of both iptables and firewall. Iptables is an application program mostly written in C Programming Language and is released under GNU General Public License. Written for System administration point of view, the latest stable release if iptables 1.4.21.iptables may be considered as firewall for UNIX like operating system which can be called as iptables/netfilter, more accurately. The Administrator interact with iptables via console/GUI front end tools to add and define firewall rules into predefined tables. Netfilter is a module built inside of kernel that do the job of filtering. +> +> Firewalld is the latest implementation of filtering rules in RHEL/CentOS 7 (may be implemented in other distributions which I may not be aware of). It has replaced iptables interface and connects to netfilter. + +**2. Have you used some kind of GUI based front end tool for iptables or the Linux Command Line?** + +> **Answer** : Though I have used both the GUI based front end tools for iptables like Shorewall in conjugation of [Webmin][1] in GUI and Direct access to iptables via console.And I must admit that direct access to iptables via Linux console gives a user immense power in the form of higher degree of flexibility and better understanding of what is going on in the background, if not anything other. GUI is for novice administrator while console is for experienced. + +**3. What are the basic differences between between iptables and firewalld?** + +> **Answer** : iptables and firewalld serves the same purpose (Packet Filtering) but with different approach. iptables flush the entire rules set each time a change is made unlike firewalld. Typically the location of iptables configuration lies at ‘/etc/sysconfig/iptables‘ whereas firewalld configuration lies at ‘/etc/firewalld/‘, which is a set of XML files.Configuring a XML based firewalld is easier as compared to configuration of iptables, however same task can be achieved using both the packet filtering application ie., iptables and firewalld. Firewalld runs iptables under its hood along with it’s own command line interface and configuration file that is XML based and said above. + +**4. Would you replace iptables with firewalld on all your servers, if given a chance?** + +> **Answer** : I am familiar with iptables and it’s working and if there is nothing that requires dynamic aspect of firewalld, there seems no reason to migrate all my configuration from iptables to firewalld.In most of the cases, so far I have never seen iptables creating an issue. Also the general rule of Information technology says “why fix if it is not broken”. However this is my personal thought and I would never mind implementing firewalld if the Organization is going to replace iptables with firewalld. + +**5. You seems confident with iptables and the plus point is even we are using iptables on our server.** + +What are the tables used in iptables? Give a brief description of the tables used in iptables and the chains they support. + +> **Answer** : Thanks for the recognition. Moving to question part, There are four tables used in iptables, namely they are: +> +> - Nat Table +> - Mangle Table +> - Filter Table +> - Raw Table +> +> Nat Table : Nat table is primarily used for Network Address Translation. Masqueraded packets get their IP address altered as per the rules in the table. Packets in the stream traverse Nat Table only once. ie., If a packet from a jet of Packets is masqueraded they rest of the packages in the stream will not traverse through this table again. It is recommended not to filter in this table. Chains Supported by NAT Table are PREROUTING Chain, POSTROUTING Chain and OUTPUT Chain. +> +> Mangle Table : As the name suggests, this table serves for mangling the packets. It is used for Special package alteration. It can be used to alter the content of different packets and their headers. Mangle table can’t be used for Masquerading. Supported chains are PREROUTING Chain, OUTPUT Chain, Forward Chain, INPUT Chain, POSTROUTING Chain. +> +> Filter Table : Filter Table is the default table used in iptables. It is used for filtering Packets. If no rules are defined, Filter Table is taken as default table and filtering is done on the basis of this table. Supported Chains are INPUT Chain, OUTPUT Chain, FORWARD Chain. +> +> Raw Table : Raw table comes into action when we want to configure packages that were exempted earlier. It supports PREROUTING Chain and OUTPUT Chain. + +**6. What are the target values (that can be specified in target) in iptables and what they do, be brief!** + +> **Answer** : Following are the target values that we can specify in target in iptables: +> +> - ACCEPT : Accept Packets +> - QUEUE : Paas Package to user space (place where application and drivers reside) +> - DROP : Drop Packets +> - RETURN : Return Control to calling chain and stop executing next set of rules for the current Packets in the chain. + + +**7. Lets move to the technical aspects of iptables, by technical I means practical.** + +How will you Check iptables rpm that is required to install iptables in CentOS?. + +> **Answer** : iptables rpm are included in standard CentOS installation and we do not need to install it separately. We can check the rpm as: +> +> # rpm -qa iptables +> +> iptables-1.4.21-13.el7.x86_64 +> +> If you need to install it, you may do yum to get it. +> +> # yum install iptables-services + +**8. How to Check and ensure if iptables service is running?** + +> **Answer** : To check the status of iptables, you may run the following command on the terminal. +> +> # service status iptables [On CentOS 6/5] +> # systemctl status iptables [On CentOS 7] +> +> If it is not running, the below command may be executed. +> +> ---------------- On CentOS 6/5 ---------------- +> # chkconfig --level 35 iptables on +> # service iptables start +> +> ---------------- On CentOS 7 ---------------- +> # systemctl enable iptables +> # systemctl start iptables +> +> We may also check if the iptables module is loaded or not, as: +> +> # lsmod | grep ip_tables + +**9. How will you review the current Rules defined in iptables?** + +> **Answer** : The current rules in iptables can be review as simple as: +> +> # iptables -L +> +> Sample Output +> +> Chain INPUT (policy ACCEPT) +> target prot opt source destination +> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED +> ACCEPT icmp -- anywhere anywhere +> ACCEPT all -- anywhere anywhere +> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> +> Chain FORWARD (policy ACCEPT) +> target prot opt source destination +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> +> Chain OUTPUT (policy ACCEPT) +> target prot opt source destination + +**10. How will you flush all iptables rules or a particular chain?** + +> **Answer** : To flush a particular iptables chain, you may use following commands. +> +> +> # iptables --flush OUTPUT +> +> To Flush all the iptables rules. +> +> # iptables --flush + +**11. Add a rule in iptables to accept packets from a trusted IP Address (say 192.168.0.7)** + +> **Answer** : The above scenario can be achieved simply by running the below command. +> +> # iptables -A INPUT -s 192.168.0.7 -j ACCEPT +> +> We may include standard slash or subnet mask in the source as: +> +> # iptables -A INPUT -s 192.168.0.7/24 -j ACCEPT +> # iptables -A INPUT -s 192.168.0.7/255.255.255.0 -j ACCEPT + +**12. How to add rules to ACCEPT, REJECT, DENY and DROP ssh service in iptables.** + +> **Answer** : Hoping ssh is running on port 22, which is also the default port for ssh, we can add rule to iptables as: +> +> To ACCEPT tcp packets for ssh service (port 22). +> +> # iptables -A INPUT -s -p tcp --dport 22 -j ACCEPT +> +> To REJECT tcp packets for ssh service (port 22). +> +> # iptables -A INPUT -s -p tcp --dport 22 -j REJECT +> +> To DENY tcp packets for ssh service (port 22). +> +> +> # iptables -A INPUT -s -p tcp --dport 22 -j DENY +> +> To DROP tcp packets for ssh service (port 22). +> +> +> # iptables -A INPUT -s -p tcp --dport 22 -j DROP + +**13. Let me give you a scenario. Say there is a machine the local ip address of which is 192.168.0.6. You need to block connections on port 21, 22, 23, and 80 to your machine. What will you do?** + +> **Answer** : Well all I need to use is the ‘multiport‘ option with iptables followed by port numbers to be blocked and the above scenario can be achieved in a single go as. +> +> # iptables -A INPUT -s 192.168.0.6 -p tcp -m multiport --dport 21,22,23,80 -j DROP +> +> The written rules can be checked using the below command. +> +> # iptables -L +> +> Chain INPUT (policy ACCEPT) +> target prot opt source destination +> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED +> ACCEPT icmp -- anywhere anywhere +> ACCEPT all -- anywhere anywhere +> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> DROP tcp -- 192.168.0.6 anywhere multiport dports ssh,telnet,http,webcache +> +> Chain FORWARD (policy ACCEPT) +> target prot opt source destination +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> +> Chain OUTPUT (policy ACCEPT) +> target prot opt source destination + +**Interviewer** : That’s all I wanted to ask. You are a valuable employee we won’t like to miss. I will recommend your name to the HR. If you have any question you may ask me. + +As a candidate I don’t wanted to kill the conversation hence keep asking about the projects I would be handling if selected and what are the other openings in the company. Not to mention HR round was not difficult to crack and I got the opportunity. + +Also I would like to thank Avishek and Ravi (whom I am a friend since long) for taking the time to document my interview. + +Friends! If you had given any such interview and you would like to share your interview experience to millions of Tecmint readers around the globe? then send your questions and answers to admin@tecmint.com or you may submit your interview experience using following form. + +- [Share Your Interview Experience][2] + +Thank you! Keep Connected. Also let me know if I could have answered a question more correctly than what I did. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-firewall-iptables-interview-questions-and-answers/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/install-webmin-web-based-system-administration-tool-for-rhel-centos-fedora/ +[2]:https://docs.google.com/a/tecmint.com/forms/d/1jfu1Kg8_qToqvyi6pOT1HQb0dAFvRE-Yc_aOkj0RoSg/viewform \ No newline at end of file diff --git a/sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md b/sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md new file mode 100644 index 0000000000..65d844a296 --- /dev/null +++ b/sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md @@ -0,0 +1,133 @@ +watch - Repeat Linux / Unix Commands Regular Intervals +================================================================================ +A server administrator needs to maintain the system and keep it updated and safe. A number of intrusion attempts may happen every day. There are some other activities that maintain their log. These logs are updated regularly. In order to check these updates, the commands are executed repeatedly. For example, for simply reading a file, commands like head, tail, cat etc are used. These commands need to be executed repeatedly. The watch command can be used to repeat a command at regular intervals. + +### Watch Command ### + +Watch is a simple command, with a few options. The basic syntax of watch command is: + + watch [-dhvt] [-n ] [--differences[=cumulative]] [--help] [--interval=] [--no-title] [--version] + +Watch command runs the command specified to it after every 2 seconds by default. This time is counted between the completion of command and beginning of next execution. As a simple example, watch command can be used to watch the log updates, The updates are appended at the end of the file, so tail command can be used with watch to see the updates to the file. This command continues to run until you hit CTRL + C to return to the prompt. + +### Examples ### + +> Keep an eye on errors/notices/warning being generated at run time every couple of seconds. + + watch tail /var/log/messages + +![tail messages](http://blog.linoxide.com/wp-content/uploads/2015/06/1.png) + +> Keep an eye on disk usage after specified time interval. + + watch df -h + +![df -h](http://blog.linoxide.com/wp-content/uploads/2015/06/2.png) + +> It is very important for administrators to keep an eye on high I/O wait causing disk operations especially the Mysql transactions. + + watch mysqladmin processlist + +![processlist](http://blog.linoxide.com/wp-content/uploads/2015/06/3.png) + +> Keep an eye on server load and uptime at runtime. + + watch uptime + +![uptime](http://blog.linoxide.com/wp-content/uploads/2015/06/10.png) + +> Keep an eye on queue size for Exim at the time a cron is run to send notices to subscribers. + + watch exim -bpc + +![exim -bpc](http://blog.linoxide.com/wp-content/uploads/2015/06/9.png) + +### 1) Iteration delay ### + + watch [-n ] + +The default interval between the commands can be changed with -n switch. The following command will run the tail command after 5 seconds: + + watch -n 5 date + +![date 5 seconds](http://blog.linoxide.com/wp-content/uploads/2015/06/4b.png) + +### 2) Successive output comparison ### + +If you use -d option with watch command, it will highlight the differences between the first command output to every next command output cumulatively. + + watch [-d or --differences[=cumulative]] + +#### Example1 #### + +Let’s see the successive time outputs extracted using following watch command and observe how the difference is highlighted. + + watch -n 15 -d date + +First time date is capture when command is executed, the next iteration will be repeated after 15 seconds. + +![Difference A](http://blog.linoxide.com/wp-content/uploads/2015/06/6.png) + +Upon the execution of next iteration, it can be seen that all output is exactly same except the seconds have increased from 14 to 29 which is highlighted. + +![Difference A](http://blog.linoxide.com/wp-content/uploads/2015/06/6b.png) + +#### Example 2 #### + +Let’s experience in difference between two successive outputs of “uptime” command repeated by watch. + + watch -n 20 -d uptime + +![uptime](http://blog.linoxide.com/wp-content/uploads/2015/06/10.png) + +Now the difference between the time is highlighted as well as the three load snapshots as well. + +![10b](http://blog.linoxide.com/wp-content/uploads/2015/06/10b.png) + +### 3) Output without title ### + +If you don’t want to display extra details about the iteration delay and actual command run by watch then –t switch can be used. + + watch [-t or --no-title] + +Let’s see the output of following command as an example. + + watch -t date + +![watch without title](http://blog.linoxide.com/wp-content/uploads/2015/06/7t.png) + +### Watch help ### + +Brief details of the watch command can be found by typing the following command in SSH. + + watch -h [or --help] + +![watch help](http://blog.linoxide.com/wp-content/uploads/2015/06/8h.png) + +### Watch version ### + +Run the following command in SSH terminal to check the version of watch. + + watch -v [--version] + +![version](http://blog.linoxide.com/wp-content/uploads/2015/06/11.png) + +**BUGS** + +Unfortunately, upon terminal resize, the screen will not be correctly repainted until the next scheduled update. All --differences highlight-ing is lost on that update as well. + +### Summary ### + +Watch is a very powerful utility for system administrators because it can be used to monitor, logs, operations, performance and throughput of the system at run time. One can easily format and delay the output of watch utility. Any Linux command / utility or script and be supplied to watch for desired and continuous output. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/linux-watch-command/ + +作者:[Aun Raza][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/arunrz/ \ No newline at end of file From 618e7ccd3f2125f3e8c922f63514a0a405d5be53 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 10 Jun 2015 15:49:30 +0800 Subject: [PATCH 1113/2517] =?UTF-8?q?20150610-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... pagespeed on Ubuntu 15.04 Vivid Vervet.md | 129 ++++++++++ ...0150610 How to secure your Linux server.md | 233 ++++++++++++++++++ ... Install Android Studio on Ubuntu 15.04.md | 65 +++++ 3 files changed, 427 insertions(+) create mode 100644 sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md create mode 100644 sources/tech/20150610 How to secure your Linux server.md create mode 100644 sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md diff --git a/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md b/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md new file mode 100644 index 0000000000..e98bb00523 --- /dev/null +++ b/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md @@ -0,0 +1,129 @@ +How to Install nginx and google pagespeed on Ubuntu 15.04 (Vivid Vervet) +================================================================================ +Nginx (engine-x) is a open source and high performance HTTP server, reverse proxy and IMAP/POP3 proxy server. The outstanding features of Nginx are: stability, rich feature set, simple configuration and low resource consumption. Nginx is being used by some of the largest websites on the internet and is gaining more and more popularity in the webmaster community. This tutorials shows how to build a nginx .deb package for Ubuntu 15.04 from source that has Google pagespeed module compiled in. + + +Pagespeed is a web server module developed by Google to speed up a website response times, optimize html and reduce the page load time. ngx_pagespeed features include : + +- Image optimization: stripping meta-data, dynamic resizing, recompression. +- CSS & JavaScript minification, concatenation, inlining, and outlining. +- Small resource inlining. +- Deferring image and JavaScript loading. +- HTML rewriting. +- Cache lifetime extension. + +see more [https://developers.google.com/speed/pagespeed/module/][1]. + +### Prerequisites ### + +Ubuntu Server 15.04 64 bit +root privileges + +What we will do in this tutorial : + +- Install the prerequisite packages. +- Installing nginx with ngx_pagespeed. +- Testing. + +#### Install the prerequisite packages #### + +sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev + +#### Installing nginx with ngx_pagespeed #### + +**Step 1 - Adding nginx repository** + + vim /etc/apt/sources.list.d/nginx.list + +add the line: + + deb http://nginx.org/packages/ubuntu/ trusty nginx + deb-src http://nginx.org/packages/ubuntu/ trusty nginx + +Update your repository: + + sudo apt-get update + +note : if you get the messege : GPG error [...] NO_PUBKEY [...] bla bla + +please add the the key: + + sudo sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYNUMBER + sudo apt-get update + +**Step 2 - Download nginx 1.8 from ubuntu repository** + + sudo su + cd ~ + mkdir -p ~/new/nginx_source/ + cd ~/new/nginx_source/ + apt-get source nginx + apt-get build-dep nginx + +**Step 3 - Download Pagespeed** + + cd ~ + mkdir -p ~/new/ngx_pagespeed/ + cd ~/new/ngx_pagespeed/ + ngx_version=1.9.32.3 + wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${ngx_version}-beta.zip + unzip release-${ngx_version}-beta.zip + + cd ngx_pagespeed-release-1.9.32.3-beta/ + wget https://dl.google.com/dl/page-speed/psol/${ngx_version}.tar.gz + tar -xzf 1.9.32.3.tar.gz + +**Step 4 - Configure nginx to build with Pagespeed** + + cd ~/new/nginx_source/nginx-1.8.0/debin/ + vim rules + +add the module under CFLAGS `.configure` : + + --add-module=../../ngx_pagespeed/ngx_pagespeed-release-1.9.32.3-beta \ + +![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/1.png) + +![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/2.png) + +**Step 5 - Build nginx package and Install** + + cd ~/new/nginx_source/nginx-1.8.0/ + dpkg-buildpackage -b + +The dpkg-buildpackage command will build the nginx.deb under ~/new/ngix_source/ Once package building is complete, please look in the directory: + + cd ~/new/ngix_source/ + ls + +![nginx builded with pagespeed](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/3.png) + +And then install nginx. + + dpkg -i nginx_1.8.0-1~trusty_amd64.deb + +![Install nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/4.png) + +#### Testing #### + +Run nginx -V to see the ngx_pagespeed was builted with nginx. + + nginx -V + +![nginx -V](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/5.png) + +### Conclusion ### + +The nginx web server there is a stable and fast open source http server that supports a variety of modules for optimization. One of these modules is the 'PageSpeed module' which is developed by google. Unlike apache, nginx modules are not dynamically loadable, so you have to select the desired modules before you build the nginx package. + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-15-04/#step-build-nginx-package-and-install + +作者:Muhammad Arul +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://developers.google.com/speed/pagespeed/module/ \ No newline at end of file diff --git a/sources/tech/20150610 How to secure your Linux server.md b/sources/tech/20150610 How to secure your Linux server.md new file mode 100644 index 0000000000..1668dae934 --- /dev/null +++ b/sources/tech/20150610 How to secure your Linux server.md @@ -0,0 +1,233 @@ +How to secure your Linux server +================================================================================ +> A server is made up of so many different components that makes it hard to offer one solution for everyone's needs. This articles tries to cover some useful tips and tricks to help you keep your server and users protected. + +No doubt improving server security is one of the most important things system administrators should always look for. This of course has been a topic of many different articles, blogs and forum threads. + +A server is made up of so many different components that makes it hard to offer one solution for everyone’s needs. This articles tries to cover some useful tips and tricks to help you keep your server and users protected. + +There are a few things that every system administrator should know and there is no way to talk about security without mentioning: + +- Keep your system **up to date** +- Change passwords frequently – use numeric, alphabetical and non-alphabetical symbols +- Give users the **minimum** permissions they need to do their job. +- Install only packages that you really need + +Here comes the more interesting part: + +### Change default SSH port ### + +The first thing that I would like to change when setting up a new server is the default SSH port. This simple change can save your server from thousands of brute force attempts. + +To change the default SSH port, open your sshd_config: + + sudo vim /etc/ssh/sshd_config + +Find the following line: + + #Port 22 + +The “#” symbol means that this line is a comment. Remove the # symbol then change the port to a number of your choice. The port number should not be larger than 65535. Make sure not to use any port already used by your system or other services. You can see a list of commonly used ports in [Wikipedia][1]. For the purpose of this article I will use: + + Port 16543 + +Now save the file and close it for a moment. + +Next important step is to: + +### Use SSH Keys ### + +It is extremely important to use SSH keys when accessing the server over SSH. This adds additional protection and ensure that only people who have the key can access the server. + +To generate SSH key on your local computer run: + + ssh-keygen -t rsa + +You will receive an output asking you to setup the file name where the key should be written as well as setup a password: + + Generating public/private rsa key pair. + Enter file in which to save the key (/root/.ssh/id_rsa): my_key + Enter passphrase (empty for no passphrase): + Enter same passphrase again: + Your identification has been saved in my_key. + Your public key has been saved in my_key.pub. + The key fingerprint is: + SHA256:MqD/pzzTRsCjZb6mpfjyrr5v1pJLBcgprR5tjNoI20A + +When compete, you will have two files: + +my_key + +my_key.pub + +Now copy the my_key.pub to ~/.ssh/authorized_keys + + cp my_key.pub ~/.ssh/authorized_keys + +Now upload your key on the server by using: + + scp -P16543 authorized_keys user@yourserver-ip:/home/user/.ssh/ + +Now you can access the server from the same local machine without having to enter any password. + +### Disable password authentication for SSH ### + +Now that we have SSH keys, it is safe to disable the password authentication for SSH. Open again the sshd_config file and set the following changes: + + ChallengeResponseAuthentication no + PasswordAuthentication no + UsePAM no + +### Disable Root login ### + +The next important step is to disable direct access with root user. Instead you should use sudo or su to perform administrative jobs. To do this you will need to add a new user that has root privileges. To do this you will need to edit the sudoers file located in: + + /etc/sudoers/ + +You may edit that file with command such as **visudo**. I would recommend you using this command as it will check the file for any syntax errors prior closing the file. This is useful if you have wrongly edited the file. + +Now to give root privileges to a user. For the purpose of this tutorial I will use user **sysadmin**. Make sure you are using an existing user on your system when you edit your own file. Now find the following line: + + root ALL=(ALL) ALL + +Copy that line and paste it below. In the new line change “root” with “sysadmin”. You should now have these two lines: + + root ALL=(ALL) ALL + sysadmin ALL=(ALL) ALL + +I would like to explain what each of the options in the above line represents: + + (1) root (2)ALL=(3)(ALL) (4)ALL + +(1) User + +(2) Terminal from which user can use sudo + +(3) Which users User may act as + +(4) Which commands he may use + + +You can use this settings to give access to users to some of the system tools. + +At this point it is safe to save your file. + +To disable direct root access over SSH open again the **sshd_config** file and find the following line: + + #PermitRootLogin yes + +and change it to: + + PermitRootLogin no + +Now save the file and restart the sshd daemon so the changes can take effect. Simply run the following command: + + sudo /etc/init.d/sshd restart + +### Setup firewall ### + +A firewall can help you block incoming and outgoing ports as well as block brute force login attempts. I like using SCF (Config Server Firewall) as it a powerful solution that uses iptables, it’s easy to manage and has a web interface for people who don’t like typing too many commands. + +To install CSF access your server and navigate to: + + cd /usr/local/src/ + +Then execute the following commands as root: + + wget https://download.configserver.com/csf.tgz + tar -xzf csf.tgz + csf + sh install.sh + +You will need to wait for the installer to finish its job. We will edit CSF configuration by editing: + + /etc/csf/csf.conf + +By default CSF will be started in testing mode. You will need to set it to product by changing the “TESTING” value to 0 + + TESTING = "0" + +Next thing you can edit are the allowed ports on your server. For that purpose find the following section of the csf.conf file and modify the ports per your needs: + + # Allow incoming TCP ports + TCP_IN = "20,21,25,53,80,110,143,443,465,587,993,995,16543" + # Allow outgoing TCP ports + TCP_OUT = "20,21,22,25,53,80,110,113,443,587,993,995,16543" + # Allow incoming UDP ports + UDP_IN = "20,21,53" + # Allow outgoing UDP ports + # To allow outgoing traceroute add 33434:33523 to this list + UDP_OUT = "20,21,53,113,123" + +Setup these per your requirements. I would recommend you using only the ports you need and avoiding allowing huge ranges of ports. Additionally you can avoid using the unsecured services unsecured ports. For example instead of allowing the default SMTP port 25 you can only allow ports 465 and 587 for outgoing emails. + +**IMPORTANT**: Do not forget to allow your customized SSH port. + +It is important to allow your IP address so it will never get blocked. Such IP addresses can be defined in: + + /etc/csf/csf.ignore + +The blocked IP address will appear in: + + /etc/csf/csf.deny + +When you have finished making changes – restart csf with: + + sudo /etc/init.d/csf restart + +Just to show you how useful CSF is I will show you part of csf.deny on one of my servers: + + 211.216.48.205 # lfd: (sshd) Failed SSH login from 211.216.48.205 (KR/Korea, Republic of/-): 5 in the last 3600 secs - Fri Mar 6 00:30:35 2015 + 103.41.124.53 # lfd: (sshd) Failed SSH login from 103.41.124.53 (HK/Hong Kong/-): 5 in the last 3600 secs - Fri Mar 6 01:06:46 2015 + 103.41.124.42 # lfd: (sshd) Failed SSH login from 103.41.124.42 (HK/Hong Kong/-): 5 in the last 3600 secs - Fri Mar 6 01:59:04 2015 + 103.41.124.26 # lfd: (sshd) Failed SSH login from 103.41.124.26 (HK/Hong Kong/-): 5 in the last 3600 secs - Fri Mar 6 02:48:26 2015 + 109.169.74.58 # lfd: (sshd) Failed SSH login from 109.169.74.58 (GB/United Kingdom/mail2.algeos.com): 5 in the last 3600 secs - Fri Mar 6 03:49:03 2015 + +The IP addresses that performed the brute force login attempt got blocked and they will not bother me again. + +#### Lock accounts #### + +In case an account is not going to be used for a long period of time you can lock it in order to prevent access to it. You can do this with: + + passwd -l accountName + +Account can still be used by the root user. + +### Know your services ### + +The whole idea of a server is to provide access to different services. Limit those to only the ones you need and disable the unused ones. This will not only free some resources, but will make your server a little bit more secured. For example if you are running a headless server you will definitely not need X display or a desktop environment. If there are no Windows network shares, you can safely disable Samba. + +You can use the commands below to see which services are started upon system boot: + + chkconfig --list | grep "3:on" + +If your system runs with **systemd**: + + systemctl list-unit-files --type=service | grep enabled + +To disable a service you can use commands such as: + + chkconfig service off + systemctl disable service + +In the above example change “service” with the name of the actual service you wish to stop. Here is an example: + + chkconfig httpd off + systemctl disable httpd + +### Conclusion ### + +This article was meant to cover some of the general security steps you can take to start securing your server. You can always take additional actions to increase the server protection. Remember that it is your responsibility to keep your server secured and make the wise decision while doing it. Unfortunately there is no easy way to do this and the “perfect” setup requires lots of time and tests until you achieve the desired result. + +-------------------------------------------------------------------------------- + +via: http://www.linuxveda.com/2015/06/03/secure-linux-server/ + +作者:[Marin Todorow][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxveda.com/author/marin_todorov/ +[1]:http://en.wikipedia.org/wiki/Port_%28computer_networking%29#Common_port_numbers \ No newline at end of file diff --git a/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md b/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md new file mode 100644 index 0000000000..a570a83174 --- /dev/null +++ b/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md @@ -0,0 +1,65 @@ +Install Android Studio on Ubuntu 15.04 +================================================================================ +Android Studio is the official IDE for Android application development, based on IntelliJ IDEA. + +### Android Studio Features ### + +Flexible Gradle-based build system +Build variants and multiple apk file generation +Code templates to help you build common app features +Rich layout editor with support for drag and drop theme editing +lint tools to catch performance, usability, version compatibility, and other problems +ProGuard and app-signing capabilities +Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine +And much more + +### Install Android Studio on Ubuntu 15.04 ### + +Flexible Gradle-based build system +Build variants and multiple apk file generation +Code templates to help you build common app features +Rich layout editor with support for drag and drop theme editing +lint tools to catch performance, usability, version compatibility, and other problems +ProGuard and app-signing capabilities +Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine +And much more + +### Install Android Studio on Ubuntu 15.04 ### + +Open the terminal and run the following commands + + sudo apt-add-repository ppa:paolorotolo/android-studio + sudo apt-get update + sudo apt-get install android-studio + +If you want to add Android Studio to the launcher use the following procedure + +Open Android Studio, click on Configure -> Create Desktop Entry. This should create an entry on the dash + +### Screenshots ### + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/12.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/23.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/31.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/41.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/5.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/6.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/7.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/install-android-studio-on-ubuntu-15-04.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 \ No newline at end of file From 3ec806c2c11898c91b9fe310e977968a3079c8fe Mon Sep 17 00:00:00 2001 From: Alan You <1058413893@qq.com> Date: Wed, 10 Jun 2015 15:59:51 +0800 Subject: [PATCH 1114/2517] Update 20150515 How to Install Percona Server on CentOS 7.md --- ...w to Install Percona Server on CentOS 7.md | 42 ++++++++++++++++--- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150515 How to Install Percona Server on CentOS 7.md b/sources/tech/20150515 How to Install Percona Server on CentOS 7.md index 9bfd676f92..141649b4fa 100644 --- a/sources/tech/20150515 How to Install Percona Server on CentOS 7.md +++ b/sources/tech/20150515 How to Install Percona Server on CentOS 7.md @@ -1,13 +1,23 @@ translating by FatJoe123 - +如何在CentOS 7上安装Percona Server How to Install Percona Server on CentOS 7 ================================================================================ +在这篇文章中我们将了解关于Percona Server,一个开源简易的MySQL,MariaDB的替代。InnoDB的数据库引擎使得Percona Server非常有吸引力,如果你需要的高性能,高可靠性和高性价比的解决方案,它将是一个很好的选择。 In this article we are going to learn about percona server, an opensource drop-in replacement for MySQL and also for MariaDB. The InnoDB database engine make it very attractive and a good alternative if you need performance, reliability and a cost efficient solution - +在接下来的文节中将涵盖在CentOS的7 Percona的服务器的安装,以及备份当前数据,配置的步骤和如何恢复备份。 In the following sections I am going to cover the installation of the percona server on the CentOS 7, I will also cover the steps needed to make backup of your current data, configuration and how to restore your backup. +###目录### ### Table of contents ### +1.什么是Percona,为什么使用它 +2.备份你的数据库 +3.删除之前的SQL服务器 +4.使用二进制包安装Percona +5.配置Percona +6. +7.恢复你的备份 + 1. What is and why use percona 1. Backup your databases 1. Remove previous SQL server @@ -16,52 +26,74 @@ In the following sections I am going to cover the installation of the percona se 1. Securing your environment 1. Restore your backup +### 1.什么是Percona,为什么使用它 ### 1. What is and why use Percona ### +Percona是一个开源简易的MySQL,MariaDB数据库的替代,它是MYSQL的一个分支,相当多的改进和独特的功能使得它比MYSQL更可靠,性能更强,速度更快,它与MYSQL完全兼容,在Oracle的MYSQL与Percona之间你甚至都可以使用复制命令。 Percona is an opensource alternative to the MySQL and MariaDB databases, it's a fork of the MySQL with many improvements and unique features that makes it more reliable, powerful and faster than MySQL, and yet is fully compatible with it, you can even use replication between Oracle's MySQL and Percona. - +#### 在Percona中独特的功能 #### #### Features exclusive to Percona #### +-分段自适应哈希搜索 +-快速校验算法 +-缓冲池预加载 +-支持FlashCache - Partitioned Adaptive Hash Search - Fast Checksum Algorithm - Buffer Pool Pre-Load - Support for FlashCache +#### MySQL企业版和Percona的特定功能 #### #### MySQL Enterprise and Percona specific features #### +-从不同的服务器导入表 +-PAM认证 +-审计日志 +-线程池 + - Import Tables From Different Servers - PAM authentication - Audit Log - Threadpool +现在,你肯定很兴奋地看到这些好的东西整理在一起,我们将告诉你如何安装和做些的Percona Server的基本配置。 Now that you are pretty excited to see all these good things together, we are going show you how to install and do basic configuration of Percona Server. +### 2. 备份你的数据库 ### ### 2. Backup your databases ### +接下来,在命令行下使用SQL命令创建一个mydatabases.sql文件来重建/恢复salesdb和employeedb数据库,重命名数据库以便反映你的设置,如果没有安装MYSQL跳过此步 The following, command creates a mydatabases.sql file with the SQL commands to recreate/restore salesdb and employeedb databases, replace the databases names to reflect your setup, skip if this is a brand new setup mysqldump -u root -p --databases employeedb salesdb > mydatabases.sql +复制当前的配置文件,如果你没有安装MYSQL也可跳过 Copy the current configuration file, you can also skip this in fresh setups cp my.cnf my.cnf.bkp +### 3.删除之前的SQL服务器 ### ### 3. Remove your previous SQL Server ### +停止MYSQL/MariaDB如果它们还在运行 Stop the MySQL/MariaDB if it's running. systemctl stop mysql.service - + +卸载MariaDB和MYSQL Uninstall MariaDB and MySQL yum remove MariaDB-server MariaDB-client MariaDB-shared mysql mysql-server +移动重命名在/var/lib/mysql当中的MariaDB文件,这比仅仅只是移除更为安全快速,这就像2级即时备份。:) Move / Rename the MariaDB files in **/var/lib/mysql**, it's a safer and faster than just removing, it's like a 2nd level instant backup. :) mv /var/lib/mysql /var/lib/mysql_mariadb - + +### 4.使用二进制包安装Percona ### ### 4. Installing Percona binaries ### +你可以在众多Percona安装方法中选择,在CentOS中使用Yum或者RPM包安装通常是更好的选择 You can choose from a number of options on how to install Percona, in a CentOS system it's generally a better idea to use yum or RPM, so these are the way that are covered by this article, compiling and install from sources are not covered by this article. Installing from Yum repository: From b38abdc36214c0e843efc00f233a2841534e8de3 Mon Sep 17 00:00:00 2001 From: Alan You <1058413893@qq.com> Date: Wed, 10 Jun 2015 17:47:43 +0800 Subject: [PATCH 1115/2517] Update 20150515 How to Install Percona Server on CentOS 7.md --- .../20150515 How to Install Percona Server on CentOS 7.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150515 How to Install Percona Server on CentOS 7.md b/sources/tech/20150515 How to Install Percona Server on CentOS 7.md index 141649b4fa..1ac8d71901 100644 --- a/sources/tech/20150515 How to Install Percona Server on CentOS 7.md +++ b/sources/tech/20150515 How to Install Percona Server on CentOS 7.md @@ -93,19 +93,24 @@ Move / Rename the MariaDB files in **/var/lib/mysql**, it's a safer and faster t ### 4.使用二进制包安装Percona ### ### 4. Installing Percona binaries ### -你可以在众多Percona安装方法中选择,在CentOS中使用Yum或者RPM包安装通常是更好的选择 +你可以在众多Percona安装方法中选择,在CentOS中使用Yum或者RPM包安装通常是更好的主意,所以这些是本文介绍的方式,下载源文件编译后安装在本文中并没有介绍。 + You can choose from a number of options on how to install Percona, in a CentOS system it's generally a better idea to use yum or RPM, so these are the way that are covered by this article, compiling and install from sources are not covered by this article. +从Yum仓库中安装: Installing from Yum repository: +首先,你需要用这个设置的Percona的Yum库: First you need to set the Percona's Yum repository with this: yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm +接下来安装Percona: And then install Percona with: yum install Percona-Server-client-56 Percona-Server-server-56 +上面的命令安装Percona的服务器和客户端,共享库,可能需要Perl和Perl模块,如DBI::MySQL的,如果尚未安装,以及其他依赖的需要。 The above command installs Percona server and clients, shared libraries, possibly Perl and perl modules such as DBI::MySQL, if that are not already installed, and also other dependencies as needed. Installing from RPM package: From 996528087d801c0ca2efd9dff573f996eb4d6814 Mon Sep 17 00:00:00 2001 From: NearTan Date: Wed, 10 Jun 2015 19:16:07 +0800 Subject: [PATCH 1116/2517] Update 20150610 Install Android Studio on Ubuntu 15.04.md --- .../tech/20150610 Install Android Studio on Ubuntu 15.04.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md b/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md index a570a83174..a77a50ebcf 100644 --- a/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md +++ b/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md @@ -1,3 +1,5 @@ +NearTan 翻译中 + Install Android Studio on Ubuntu 15.04 ================================================================================ Android Studio is the official IDE for Android application development, based on IntelliJ IDEA. @@ -62,4 +64,4 @@ via: http://www.ubuntugeek.com/install-android-studio-on-ubuntu-15-04.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file +[a]:http://www.ubuntugeek.com/author/ubuntufix From 41748dc3df8c962939557c4ffca1a8b7318ef79a Mon Sep 17 00:00:00 2001 From: NearTan Date: Wed, 10 Jun 2015 19:17:25 +0800 Subject: [PATCH 1117/2517] Update 20150610 Install Android Studio on Ubuntu 15.04.md --- sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md b/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md index a77a50ebcf..c7fc919743 100644 --- a/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md +++ b/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md @@ -1,4 +1,4 @@ -NearTan 翻译中 +translating by NearTan Install Android Studio on Ubuntu 15.04 ================================================================================ From 133c3df3e9f7bd2a2a4a041fcf88d5726c8a2516 Mon Sep 17 00:00:00 2001 From: yajun Date: Wed, 10 Jun 2015 19:44:38 +0800 Subject: [PATCH 1118/2517] =?UTF-8?q?=20=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Websites and Downloading Files in Linux.md | 154 ------------------ ...Websites and Downloading Files in Linux.md | 149 +++++++++++++++++ 2 files changed, 149 insertions(+), 154 deletions(-) delete mode 100644 sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md create mode 100644 translated/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md diff --git a/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md b/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md deleted file mode 100644 index 27c3e388ef..0000000000 --- a/sources/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md +++ /dev/null @@ -1,154 +0,0 @@ -fyh翻译中。。。 - -7 Command Line Tools for Browsing Websites and Downloading Files in Linux -================================================================================ -In the last article, we have covered few useful tools like ‘rTorrent‘, ‘wget‘, ‘cURL‘, ‘w3m‘, and ‘Elinks‘. We got lots of response to cover few other tools of same genre, if you’ve missed the first part you can go through it.. - -- [5 Command Line Tools for Downloading Files and Browsing Websites][1] - -This article aims at making you aware of several other Linux command Line browsing and downloading applications, which will help you to browse and download files within the Linux shell. - -### 1. links ### - -Links is an open source web browser written in C programming Language. It is available for all major platforms viz., Linux, Windows, OS X and OS/2. This browser is text based as well as graphical. The text based links web browser is shipped by most of the standard Linux distributions by default. If links is not installed in your system by default you may install it from the repo. Elinks is a fork of links. - - # apt-get install links - # yum install links - -After installing links, you can browse any websites within the terminal as shown below in the screen cast.. - - # links www.tecmint.com - -Use UP and DOWN arrow keys to navigate. Right arrow Key on a link will redirect you to that link and Left arrow key will bring you back to the last page. To QUIT press q. - -Here is how it seems to access Tecmint using links tool. - -![](http://www.tecmint.com/wp-content/uploads/2015/04/links-browse-websites-terminal.gif) - -If you are interested in installing GUI of links, you may need to download latest source tarball (i.e. version 2.9) from [http://links.twibright.com/download/][2]. - -Alternatively, you may use following wget command to download and install as suggested below. - - # wget http://links.twibright.com/download/links-2.9.tar.gz - # tar -xvf links-2.9.tar.gz - # cd links-2.9 - # ./configure –enable-graphics - # make - # make install - -**Note**: You need to install packages (libpng, libjpeg, TIFF library, SVGAlib, XFree86, C Compiler and make), if not already installed to successfully compile the package. - -### 2. links2 ### - -Links2 is a graphical web browser version of Twibright Labs Links web browser. This browser has support for mouse and clicks. Designed specially for speed without any CSS support, fairly good HTML and JavaScript support with limitations. - -To install links2. - - # apt-get install links2 - # yum install links2 - -### 3. lynx ### - -A text based web browser released under GNU GPLv2 license and written in ISO C. lynx is highly configurable web browser and Savior for many SYSAdmin. It has the reputation of being the oldest web browser that is being used and still actively developed. - -To install lynx. - - # apt-get install lynx - # yum install lynx - -After installing lynx, type the following command to browse the website as shown below in the screen cast.. - - # lynx www.tecmint.com - -![](http://www.tecmint.com/wp-content/uploads/2015/04/lynx-commandline-web-browsing.gif) - -If you are interested in knowing a bit more about links and lynx web browser, you may like to visit the below link: - -- [Web Browsing with Lynx and Links Command Line Tools][3] - -### 4. youtube-dl ### - -youtube-dl is a platform independent application which can be used to download videos from youtube and a few other sites. Written primarily in python and released under GNU GPL License, the application works out of the box. (Since youtube don’t allow you to download videos, it may be illegal to use it. Check the laws before you start using this.) - -To install youtube-dl. - - # apt-get install youtube-dl - # yum install youtube-dl - -After installing, try to download files from the Youtube site, as shown in the below screen cast. - - # youtube-dl https://www.youtube.com/watch?v=ql4SEy_4xws - -![](http://www.tecmint.com/wp-content/uploads/2015/04/download-youtube-videos-from-terminal.gif) - -If you are interested in knowing more about youtube-dl you may like to visit the below link: - -- [YouTube-DL – A Command Line Youtube Video Downloader for Linux][4] - -### 5. fetch ### - -It is a command utility for unix-like operating system that is used for URL retrieval. It supports a lot of options like fetching ipv4 only address, ipv6 only address, no redirect, exit after successful file retrieval request, retry, etc. - -Fetch can be Downloaded and installed from the link below - -- [http://sourceforge.net/projects/fetch/?source=typ_redirect][5] - -But before you compile and run it, you should install HTTP Fetcher. Download HTTP Fetcher from the link below. - -- [http://sourceforge.net/projects/http-fetcher/?source=typ_redirect][6] - -### 6. Axel ### - -Axel is a command-line based download accelerator for Linux. Axel makes it possible to download a file at much faster speed through single connection request for multiple copies of files in small chunks through multiple http and ftp connections. - -To install Axel. - - # apt-get install axel - # yum install axel - -After axel installed, you may use following command to download any given file, as shown in the screen cast. - - # axel http://mirror.cse.iitk.ac.in/archlinux/iso/2015.04.01/archlinux-2015.04.01-dual.iso - -![](http://www.tecmint.com/wp-content/uploads/2015/04/download-accelarator-for-linux.gif) - -### 7. aria2 ### - -aria2 is a command-line based download utility that is lightweight and support multi-protocol (HTTP, HTTPS, FTP, BitTorrent and Metalink). It can use metalinks files to simultaneously download ISO files from more than one server. It can serve as a Bit torrent client as well. - -To install aria2. - - # apt-get install aria2 - # yum install aria2 - -Once aria2 installed, you can fire up the following command to download any given file… - - # aria2c http://cdimage.debian.org/debian-cd/7.8.0/multi-arch/iso-cd/debian-7.8.0-amd64-i386-netinst.iso - -![Aria2: Command Line Download Manager for Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Download-Files-in-Terminal.gif) -Aria2: Command Line Download Manager for Linux - -If you’re interested to know more at aria2 and their switches, read the following article. - -- [Aria2 – A Multi-Protocol Command-Line Download Manager for Linux][7] - -That’s all for now. I’ll be here again with another interesting topic you people will love to read. Till then stay tuned and connected to Tecmint. Don’t forget to provide us with your valuable feedback in the comments below. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/command-line-web-browser-download-file-in-linux/ - -作者:[Avishek Kumar][a] -译者:[wangjiezhe](https://github.com/wangjiezhe) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/linux-command-line-tools-for-downloading-files/ -[2]:http://links.twibright.com/download/ -[3]:http://www.tecmint.com/command-line-web-browsers/ -[4]:http://www.tecmint.com/install-youtube-dl-command-line-video-download-tool/ -[5]:http://sourceforge.net/projects/fetch/?source=typ_redirect -[6]:http://sourceforge.net/projects/http-fetcher/?source=typ_redirect -[7]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/ diff --git a/translated/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md b/translated/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md new file mode 100644 index 0000000000..0d73e957de --- /dev/null +++ b/translated/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md @@ -0,0 +1,149 @@ +Linux中7个用来浏览网页和下载文件的命令 +================================================================================ +上一篇文章中,我们提到了`rTorrent`、`wget`、`cURL`、`w3m`、`Elinks`等几个有用的工具,很多人回信说还有其它几个类似的工具也值得讨论,所以就有了这篇文章。如果错过了第一部分的讨论,可以通过下面的链接来回顾。 + +- [5个下载文件和浏览网页的命令行工具][1] + +这篇文章介绍了Linux下用于浏览网页和下载文件的其它几个命令行工具。 + +### 1. links ### + +Links是用C语言写的一个开源web浏览器,支持包括Linux、Windows、OS X和OS/2在内的所有主流平台。它提供了基于文本和图形界面两种版本。大多数标准的Linux发行版都默认包含了基于文本的版本。如果您的发行版中默认没有安装links,可以通过包管理工具进行安装。Elinks是links的一个衍生版本。 + + # apt-get install links + # yum install links + +安装完成后,您可以像下图中那样使用命令浏览任意网页。 + + # links www.tecmint.com + +在links中,可以使用键盘上的上下箭头键进行浏览。在超链接上按下右箭头会打开它,按下左箭头会返回到上一页面,按q键退出。 + +下图展示了如何使用links访问Tecmint的网站。 + +![](http://www.tecmint.com/wp-content/uploads/2015/04/links-browse-websites-terminal.gif) + +如何你想安装links的图形界面版本,可能需要从[http://links.twibright.com/download/][2]下载最新的版本tarball(version 2.9)的源代码。 + +同样,也可以像下面那样使用wget下载安装。 + + # wget http://links.twibright.com/download/links-2.9.tar.gz + # tar -xvf links-2.9.tar.gz + # cd links-2.9 + # ./configure –enable-graphics + # make + # make install + +**注意**:links源代码的编译需要安装libpng, libjpeg, TIFF library, SVGAlib, XFree86, C Compiler and make这几个包。 + +### 2. links2 ### + +Links是Twibright实验室编写的web浏览器,而Links2是基于它的一个图形化版本。Links2支持鼠标点击,设计强调速度,不支持任何CSS,在一定程度上很好地支持了HTML和JavaScript。 + +通过下面的命令安装Links2。 + + # apt-get install links2 + # yum install links2 + +### 3. lynx ### + +lynx是一个基于文本的web浏览器,使用GNU GPLv2协议发布,用ISO C编写。lynx是一个可高度配置的web浏览器,是许多系统管理员的救世主,有最悠久的web浏览器之称,并且至今仍然处在积极开发中。 + +通过下面的命令安装lyns。 + + # apt-get install lynx + # yum install lynx + +安装完成后,可以像下图中那样使用这个命令浏览网页。 + + # lynx www.tecmint.com + +![](http://www.tecmint.com/wp-content/uploads/2015/04/lynx-commandline-web-browsing.gif) + +如果你想对links和lyns了解更多,可以访问下面的链接。 + +- [使用Lynx和Links命令浏览网页][3] + +### 4. youtube-dl ### + +youtube-dl是一个跨平台的应用,可以用来下载youtube和另外几个网站上的视频。它主要使用python开发,使用GNU GPL协议发布,并且超越了法律约束。(youtube不允许用户下载视频,因此使用youtube-dl可能会导致违法。使用该工具之前请您仔细阅读相关法律。) + +使用如下命令安装youtube-dl。 + + # apt-get install youtube-dl + # yum install youtube-dl + +安装完成后,可以用如下命令像图中那样从youtube网站下载视频。 + + # youtube-dl https://www.youtube.com/watch?v=ql4SEy_4xws + +![](http://www.tecmint.com/wp-content/uploads/2015/04/download-youtube-videos-from-terminal.gif) + +如果你想对youtube-dl了解更多,可以访问如下链接。 + +- [YouTube-DL – Linux下的youtube视频下载工具][4] + +### 5. fetch ### + +fetch是类unix系统下的一个检索URL的命令,支持许多选项,例如只检索ipv4或ipv6地址,无重定向,检索请求成功时退出,自动重试等。 + +fetch可以从通过下面的链接下载和安装。 + +- [http://sourceforge.net/projects/fetch/?source=typ_redirect][5] + +编译安装之前,需要安装HTTP Fetcher,可以通过下面的链接下载。 + +- [http://sourceforge.net/projects/http-fetcher/?source=typ_redirect][6] + +### 6. Axel ### + +Axel是Linux下的一个基于命令行的下载加速器,可以对请求使用多线程和多个http和ftp连接加速。 + +使用下面的命令安装Axel。 + + # apt-get install axel + # yum install axel + +Axel安装完成后,可以像下图那样使用这个命令下载任意文件。 + + # axel http://mirror.cse.iitk.ac.in/archlinux/iso/2015.04.01/archlinux-2015.04.01-dual.iso + +![](http://www.tecmint.com/wp-content/uploads/2015/04/download-accelarator-for-linux.gif) + +### 7. aria2 ### + +aria2是一个轻量级的基于命令行的下载工具,并且支持多种协议((HTTP, HTTPS, FTP, BitTorrent以及Metalink)。它可以使用.metalinks文件从多台服务器同时下载ISO文件。 + +使用下面的命令安装aria2。 + + # apt-get install aria2 + # yum install aria2 + +aria2安装完成后,可以像下图那样运行这个命令下载任意文件。 + + # aria2c http://cdimage.debian.org/debian-cd/7.8.0/multi-arch/iso-cd/debian-7.8.0-amd64-i386-netinst.iso + +![Aria2: Linux的命令行下载工具 ](http://www.tecmint.com/wp-content/uploads/2015/04/Download-Files-in-Terminal.gif) + +Aria2: Linux命令行下载工具 + +目前就这么多了。稍后咱们讨论另一个有意思的话题。请保持联系,常来Tecmint逛逛。别忘了在评论中给我们提供您的宝贵反馈,您的喜爱和分享帮助我们不断前行。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/command-line-web-browser-download-file-in-linux/ + +作者:[Avishek Kumar][a] +译者:[fyh](https://github.com/fyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/linux-command-line-tools-for-downloading-files/ +[2]:http://links.twibright.com/download/ +[3]:http://www.tecmint.com/command-line-web-browsers/ +[4]:http://www.tecmint.com/install-youtube-dl-command-line-video-download-tool/ +[5]:http://sourceforge.net/projects/fetch/?source=typ_redirect +[6]:http://sourceforge.net/projects/http-fetcher/?source=typ_redirect +[7]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/ From 880c256f67ea55fc53fdd3a8c9684d647421e71b Mon Sep 17 00:00:00 2001 From: NearTan Date: Wed, 10 Jun 2015 20:34:00 +0800 Subject: [PATCH 1119/2517] translated --- ... Install Android Studio on Ubuntu 15.04.md | 67 ------------------- ... Install Android Studio on Ubuntu 15.04.md | 67 +++++++++++++++++++ 2 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md create mode 100644 translated/tech/20150610 Install Android Studio on Ubuntu 15.04.md diff --git a/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md b/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md deleted file mode 100644 index c7fc919743..0000000000 --- a/sources/tech/20150610 Install Android Studio on Ubuntu 15.04.md +++ /dev/null @@ -1,67 +0,0 @@ -translating by NearTan - -Install Android Studio on Ubuntu 15.04 -================================================================================ -Android Studio is the official IDE for Android application development, based on IntelliJ IDEA. - -### Android Studio Features ### - -Flexible Gradle-based build system -Build variants and multiple apk file generation -Code templates to help you build common app features -Rich layout editor with support for drag and drop theme editing -lint tools to catch performance, usability, version compatibility, and other problems -ProGuard and app-signing capabilities -Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine -And much more - -### Install Android Studio on Ubuntu 15.04 ### - -Flexible Gradle-based build system -Build variants and multiple apk file generation -Code templates to help you build common app features -Rich layout editor with support for drag and drop theme editing -lint tools to catch performance, usability, version compatibility, and other problems -ProGuard and app-signing capabilities -Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine -And much more - -### Install Android Studio on Ubuntu 15.04 ### - -Open the terminal and run the following commands - - sudo apt-add-repository ppa:paolorotolo/android-studio - sudo apt-get update - sudo apt-get install android-studio - -If you want to add Android Studio to the launcher use the following procedure - -Open Android Studio, click on Configure -> Create Desktop Entry. This should create an entry on the dash - -### Screenshots ### - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/12.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/23.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/31.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/41.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/5.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/6.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/7.png) - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/install-android-studio-on-ubuntu-15-04.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 diff --git a/translated/tech/20150610 Install Android Studio on Ubuntu 15.04.md b/translated/tech/20150610 Install Android Studio on Ubuntu 15.04.md new file mode 100644 index 0000000000..25fe29e043 --- /dev/null +++ b/translated/tech/20150610 Install Android Studio on Ubuntu 15.04.md @@ -0,0 +1,67 @@ + +在Ubuntu 15.04下安装Android Studio +PS 原MD文件有大段重复并且排版错误,译者已修复 +================================================================================ + +Android Studio是官方为了Android应用开发者而发布的IDE,它基于IntelliJ的IDEA。 + +### Android Studio的功能 ### + +灵活的基于Gradle的建构系统 + +针对不同手机编译多个版本的apk + +代码模板功能构建出各种常用的应用 + +支持拖动编辑主题的富布局编辑器 + +lint工具可以捕捉到应用的性能、可用性、版本冲突或者其他问题 + +代码混淆和应用签名功能 + +内置 Google Cloud Platform 的支持,可以轻易的融入Google Cloud Messaging 和 App Engine支持 + +还有更多 + + + +### 在 Ubuntu 15.04 上安装 Android Studio ### + +打开terminal,输入以下命令 + + sudo apt-add-repository ppa:paolorotolo/android-studio + sudo apt-get update + sudo apt-get install android-studio + + +如果要把Android Studio添加到启动栏,你需要如下操作 + +打开Android Studio,点击Configure选择Create Desktop Entry,这样Android Studio应该在dash中创建快捷方式了。 + +### 截图 ### + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/12.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/23.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/31.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/41.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/5.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/6.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/7.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/install-android-studio-on-ubuntu-15-04.html + +作者:[ruchi][a] +译者:[NearTan](https://github.com/NearTan) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file From c91ab0dbc81d1fda805d4fdd5bef0ba4ab73ca1b Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 10 Jun 2015 23:49:37 +0800 Subject: [PATCH 1120/2517] PUB:20150515 Basic Networking Commands with Docker Containers @geekpi --- ...working Commands with Docker Containers.md | 108 ++++++++++++++++++ ...working Commands with Docker Containers.md | 106 ----------------- 2 files changed, 108 insertions(+), 106 deletions(-) create mode 100644 published/20150515 Basic Networking Commands with Docker Containers.md delete mode 100644 translated/tech/20150515 Basic Networking Commands with Docker Containers.md diff --git a/published/20150515 Basic Networking Commands with Docker Containers.md b/published/20150515 Basic Networking Commands with Docker Containers.md new file mode 100644 index 0000000000..fd81249f10 --- /dev/null +++ b/published/20150515 Basic Networking Commands with Docker Containers.md @@ -0,0 +1,108 @@ +基础的Docker容器网络命令 +================================================================================ +各位好,今天我们将学习一些Docker容器的基础命令。Docker 是一个开源项目,提供了一个可以打包、装载和运行任何应用的轻量级容器的开放平台。它没有语言支持、框架和打包系统的限制,从小型的家用电脑到高端服务器,在何时何地都可以运行。它可以使部署和扩展web应用程序、数据库和后端服务像搭积木一样容易,而不依赖特定技术栈或提供商。Docker适用于网络环境,它正应用于数据中心、ISP和越来越多的网络服务。 + +因此,这里有一些你在管理Docker容器的时候会用到的一些命令。 + +### 1. 找到Docker接口 ### + +Docker默认会创建一个名为docker0的网桥接口作为连接外部世界的基础。运行中的docker容器直接连接到网桥接口docker0。默认上,docker会分配172.17.42.1/16给docker0,它是所有运行中的容器ip地址的子网。找到Docker接口的ip地址非常简单。要找出docker0网桥接口和连接到网桥上的docker容器,我们可以在安装了docker的终端或者shell中运行ip命令。 + + # ip a + +![Docker Interface](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-interface.png) + +### 2. 得到Docker容器的ip地址 ### + +如我们上面读到的,docker在宿主机中创建了一个叫docker0的网桥接口。在我们创建一个新的docker容器时,它自动被默认分配了一个在该子网范围内的ip地址。因此,要检测运行中的Docker容器的ip地址,我们需要进入一个正在运行的容器并用下面的命令检查ip地址。首先,我们运行一个新的容器并进入其中。如果你已经有一个正在运行的容器,你可以跳过这个步骤。 + + # docker run -it ubuntu + +现在,我们可以运行ip a来得到容器的ip地址了。 + + # ip a + +![Docker Container IP](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-container-ip.png) + +### 3. 映射暴露的端口 ### + +要映射配置在Dockerfile的暴露端口到宿主机的高位端口,我们只需用下面带上-P标志的命令。这会打开docker容器的随机端口并映射到Dockerfile中定义的端口。下面是使用-P来打开/暴露定义的端口的例子。 + + # docker run -itd -P httpd + +![Mapping Expose Port](http://blog.linoxide.com/wp-content/uploads/2015/05/mapping-expose-port.png) + +上面的命令会映射容器的端口到 httpd 容器的 Dockerfile 中定义的80端口上。我们用下面的命令来查看正在运行的容器暴露的端口。 + + # docker ps + +并且可以用下面的curl命令来检查。 + + # curl http://localhost:49153 + +![Curl Exposed Port](http://blog.linoxide.com/wp-content/uploads/2015/05/curl-exposed-port-e1431034586219.png) + +### 4. 映射到特定的端口上 ### + +我们也可以映射暴露端口或者docker容器端口到我们指定的端口上。要实现这个,我们用-p标志来定义我们所需的端口。这里是我们的一个例子。 + + # docker run -itd -p 8080:80 httpd + +上面的命令会映射(宿主机的)8080端口到(容器的)80上。我们可以运行curl来检查这点。 + + # curl http://localhost:8080 + +![Mapping Specific Port](http://blog.linoxide.com/wp-content/uploads/2015/05/mapping-specific-port.png) + +### 5. 创建自己的网桥 ### + +要给容器创建一个自定义的IP地址,在本篇中我们会创建一个名为br0的新网桥。要分配需要的ip地址,我们需要在运行docker的宿主机中运行下面的命令。 + + # stop docker.io + # ip link add br0 type bridge + # ip addr add 172.30.1.1/20 dev br0 + # ip link set br0 up + # docker -d -b br0 + +![Creating Bridge Interface](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-bridge-interface.png) + +创建完docker网桥之后,我们要让docker的守护进程知道它。 + + # echo 'DOCKER_OPTS="-b=br0"' >> /etc/default/docker + # service docker.io start + +![Adding Interface to Docker](http://blog.linoxide.com/wp-content/uploads/2015/05/adding-interface-to-docker.png) + +到这里,桥接后的接口将会分配给容器在桥接子网内的新ip地址。 + +### 6. 链接到另外一个容器上 ### + +我们可以用Docker将一个容器连接到另外一个上。我们可以在不同的容器上运行不同的程序,并且相互连接或链接。链接允许容器间相互连接并从一个容器上安全地传输信息给另一个容器。要做到这个,我们可以使用--link标志。首先,我们使用--name标志来标示training/postgres镜像。 + + # docker run -d --name db training/postgres + +![Running db Container](http://blog.linoxide.com/wp-content/uploads/2015/05/running-db-container.png) + +完成之后,我们将容器db与training/webapp链接来形成新的叫web的容器。 + + # docker run -d -P --name web --link db:db training/webapp python app.py + +![linking two containers](http://blog.linoxide.com/wp-content/uploads/2015/05/linking-two-containers.png) + +### 总结 ### + +Docker网络很神奇也好玩,我们可以对docker容器做很多事情。我们可以把玩这些简单而基础的docker网络命令。docker的网络是非常先进的,我们可以用它做很多事情。 + +如果你有任何的问题、建议、反馈请在下面的评论栏写下来以便于我们我们可以提升或者更新文章的内容。谢谢! 玩得开心!:-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/networking-commands-docker-containers/ + +作者:[Arun Pyasi][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ diff --git a/translated/tech/20150515 Basic Networking Commands with Docker Containers.md b/translated/tech/20150515 Basic Networking Commands with Docker Containers.md deleted file mode 100644 index d4b90aa7f2..0000000000 --- a/translated/tech/20150515 Basic Networking Commands with Docker Containers.md +++ /dev/null @@ -1,106 +0,0 @@ -关于Docker容器的基础网络命令 -================================================================================ -各位好,今天我们将学习一些Docker容器的基础命令。Docker是一个提供了开放平台来打包、发布并以一个轻量级容器运行任意程序的开放平台。它没有语言支持、框架或者打包系统的限制,可在任何时间、任何地方在小到家用电脑大到高端服务器上运行。这使得在部署和扩展网络应用、数据库和终端服务时不依赖于特定的栈或者提供商。Docker注定是用于网络的如它正应用于数据中心、ISP和越来越多的网络服务。 - -因此,这里有一些你在管理Docker容器的时候会用到的一些命令。 - -### 1. 找到Docker接口 ### - -Docker默认会创建一个名为docker0的网桥接口来连接外部的世界。docker容器运行时直接连接到网桥接口docker0。默认上,docker会分配172.17.42.1/16给docker0,它是所有运行容器ip地址的子网。得到Docker接口的ip地址非常简单。要找出docker0网桥接口和连接到网桥上的docker容器,我们可以在终端或者安装了docker的shell中运行ip命令。 - - # ip a - -![Docker Interface](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-interface.png) - -### 2. 得到Docker容器的ip地址 ### - -如我们上面读到的,docker在主机中创建了一个叫docker0的网桥接口。如我们创建一个心的docker容器一样,它自动被默认分配了一个在子网范围内的ip地址。因此,要检测运行中的Docker容器的ip地址,我们需要进入一个正在运行的容器并用下面的命令检查ip地址。首先,我们运行一个新的容器并进入。如果你已经有一个正在运行的容器,你可以跳过这个步骤。 - - # docker run -it ubuntu - -现在,我们可以运行ip a来得到容器的ip地址了。 - - # ip a - -![Docker Container IP](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-container-ip.png) - -### 3. 映射暴露的端口 ### - -要映射配置在Dockerfile的暴露端口,我们只需用下面带上-P标志的命令。这会打开docker容器的随机端口并映射到Dockerfile中定义的端口。下面是使用-P来打开/映射定义的端口的例子。 - - # docker run -itd -P httpd - -![Mapping Expose Port](http://blog.linoxide.com/wp-content/uploads/2015/05/mapping-expose-port.png) - -上面的命令会映射Dockerfile中定义的httpd 80端口到容器的端口上。我们用下面的命令来查看正在运行的容器暴露的端口。 - - # docker ps - -并且可以用下面的curl命令来检查。 - - # curl http://localhost:49153 - -![Curl Exposed Port](http://blog.linoxide.com/wp-content/uploads/2015/05/curl-exposed-port-e1431034586219.png) - -### 4. 映射到特定的端口上 ### - -我们也可以映射暴露端口或者docker容器端口到我们指定的端口上。要实现这个,我们用-p标志来定义我们的需要。这里是我们的一个例子。 - - # docker run -itd -p 8080:80 httpd - -上面的命令会映射8080端口到80上。我们可以运行curl来检查这点。 - - # curl http://localhost:8080 - -![Mapping Specific Port](Curl Exposed Port) - -### 5. 创建自己的网桥 ### - -要给容器创建一个自定义的IP地址,在本篇中我们会创建一个名为bro的新网桥。要分配需要的ip地址,我们需要在运行docker的主机中运行下面的命令。 - - # stop docker.io - # ip link add br0 type bridge - # ip addr add 172.30.1.1/20 dev br0 - # ip link set br0 up - # docker -d -b br0 - -![Creating Bridge Interface](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-bridge-interface.png) - -创建完docker网桥之后,我们要让docker的守护进程知道它。 - - # echo 'DOCKER_OPTS="-b=br0"' >> /etc/default/docker - # service docker.io start - -![Adding Interface to Docker](http://blog.linoxide.com/wp-content/uploads/2015/05/adding-interface-to-docker.png) - -到这里,桥接后的接口将会分配给容器新的在桥接子网内的ip地址。 - -### 6. 链接到另外一个容器上 ### - -我们可以用Dokcer连接一个容器到另外一个上。我们可以在不容的容器上运行不同的程序,并且相互连接或链接。链接允许容器间相互连接并安全地从一个容器上传输信息给另一个容器。要做到这个,我们可以使用--link标志。首先,我们使用--name标志来表示training/postgres镜像。 - - # docker run -d --name db training/postgres - -![Running db Container](http://blog.linoxide.com/wp-content/uploads/2015/05/running-db-container.png) - -完成之后,我们将容器db与training/webapp链接来形成新的叫web的容器。 - - # docker run -d -P --name web --link db:db training/webapp python app.py - -![linking two containers](http://blog.linoxide.com/wp-content/uploads/2015/05/linking-two-containers.png) - -### 总结 ### - -Docker网络很神奇也好玩,因为有我们可以对docker容器做很多事情。这里有些简单和基础的我们可以把玩docker网络命令。docker的网络是非常高级的。我们可以用它做很多事情。如果你有任何的问题、建议、反馈请在下面的评论栏写下来以便于我们我们可以提升或者更新文章的内容。谢谢! 玩得开心!:-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/networking-commands-docker-containers/ - -作者:[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 1c4dbb48cc7b7ae59fbead08a63160fb59192620 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 11 Jun 2015 00:02:31 +0800 Subject: [PATCH 1121/2517] PUB:20150511 Fix Various Update Errors In Ubuntu 14.04 @GOLinux --- ...0511 Fix Various Update Errors In Ubuntu 14.04.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20150511 Fix Various Update Errors In Ubuntu 14.04.md (90%) diff --git a/translated/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md b/published/20150511 Fix Various Update Errors In Ubuntu 14.04.md similarity index 90% rename from translated/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md rename to published/20150511 Fix Various Update Errors In Ubuntu 14.04.md index 3780b4f948..085869bde6 100644 --- a/translated/tech/20150511 Fix Various Update Errors In Ubuntu 14.04.md +++ b/published/20150511 Fix Various Update Errors In Ubuntu 14.04.md @@ -1,8 +1,8 @@ -修复Ubuntu 14.04中各种更新错误 +Ubuntu 更新错误修复大全 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/09/Fix_Ubuntu_Update_Error.jpeg) -在Ubuntu更新中,谁没有碰见个错误?在Ubuntu和其它基于Ubuntu的Linux发行版中,更新错误很常见,也为数不少。这些错误出现的原因多种多样,修复起来也很简单。在本文中,我们将见到Ubuntu中各种类型频繁发生的更新错误以及它们的修复方法。 +在Ubuntu更新中,谁没有碰见个错误?在Ubuntu和其它基于Ubuntu的Linux发行版中,更新错误是一个共性的错误,也经常发生。这些错误出现的原因多种多样,修复起来也很简单。在本文中,我们将见到Ubuntu中各种类型频繁发生的更新错误以及它们的修复方法。 ### 合并列表问题 ### @@ -38,7 +38,7 @@ 下载仓库信息失败的另外一种类型是由于PPA过时导致的。通常,当你运行更新管理器,并看到这样的错误时: -![](Th other type of failed to download repository information error is because of outdated PPA. Usually, when you run Update Manager and see an error like this:) +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2013/04/Failed-to-download-repository-information-Ubuntu-13.04.png) 你可以运行sudo apt-get update来查看哪个PPA更新失败,你可以把它从源列表中删除。你可以按照这个截图指南来[修复下载仓库信息失败错误][3]。 @@ -48,7 +48,7 @@ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/09/Ubuntu_Update_error.jpeg) -该错误很容易修复,只需修改软件源为主服务器即可。转到软件和更新,在那里你可以修改下载服务器为主服务器: +该错误很容易修复,只需修改软件源为主服务器即可。转到“软件和更新”,在那里你可以修改下载服务器为主服务器: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/09/Change_server_Ubuntu.jpeg) @@ -78,7 +78,7 @@ 你可以在这里查找到更多详细内容[加载共享库时发生错误][6]。 -### 无法获取锁/var/cache/apt/archives/lock ### +### 无法获取锁 /var/cache/apt/archives/lock ### 在另一个程序在使用APT时,会发生该错误。假定你正在Ubuntu软件中心安装某个东西,然后你又试着在终端中运行apt。 @@ -135,7 +135,7 @@ via: http://itsfoss.com/fix-update-errors-ubuntu-1404/ 作者:[Abhishek][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From d00240269dfae5b99c65514ae39ce77b5bd1e92a Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 11 Jun 2015 00:15:27 +0800 Subject: [PATCH 1122/2517] PUB:20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux @GOLinux --- ...me, Load Average and RAM Usage in Linux.md | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md (60%) diff --git a/translated/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md b/published/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md similarity index 60% rename from translated/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md rename to published/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md index 58eb9f18ca..723cf72ddf 100644 --- a/translated/tech/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md +++ b/published/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md @@ -1,21 +1,22 @@ -Linux中用于监控网络、磁盘使用、开机时间、平均负载和内存使用率的shell脚本 +一个Linux中用于监控的简易shell脚本 ================================================================================ -系统管理员的任务真的很艰难,因为他/她必须监控服务器、用户、日志,还得创建备份,等等等等。对于大多数重复性的任务,大多数管理员都会写一个自动化脚本来日复一日重复这些任务。这里,我们已经写了一个shell脚本给大家,用来自动化完成系统管理员所要完成的常规任务,这可能在多数情况下,尤其是对于新手而言十分有用,他们能通过该脚本获取到大多数的他们想要的信息,包括系统、网络、用户、负载、内存、主机、内部IP、外部IP、开机时间等。 +系统管理员的任务真的很艰难,因为他/她必须监控服务器、用户、日志,还得创建备份,等等等等。对于大多数重复性的任务,大多数管理员都会写一个自动化脚本来日复一日地重复这些任务。这里,我们已经写了一个shell脚本给大家,用来自动化完成系统管理员所要完成的常规任务,这可能在多数情况下,尤其是对于新手而言十分有用,他们能通过该脚本获取到大多数的他们想要的信息,包括系统、网络、用户、负载、内存、主机、内部IP、外部IP、开机时间等。 我们已经注意并进行了格式化输出(在一定程度上哦)。此脚本不包含任何恶意内容,并且它能以普通用户帐号运行。事实上,我们也推荐你以普通用户运行该脚本,而不是root。 ![Linux Server Health Monitoring](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-Health-Monitoring.png) -监控Linux系统健康的Shell脚本 -你可以通过给Tecmint和脚本作者合适的积分,获得自由使用/修改/再分发下面代码的权利。我们已经试着在一定程度上自定义了输出结果,除了要求的输出内容外,其它内容都不会生成。我们也已经试着使用了那些Linux系统中通常不使用的变量,这些变量可能也是自由代码。 +*监控Linux系统健康的Shell脚本* + +在保留Tecmint和脚本作者应得荣誉的前提下,可以自由使用/修改/再分发下面代码。我们已经试着在一定程度上自定义了输出结果,除了要求的输出内容外,其它内容都不会生成。我们也已经试着使用了那些Linux系统中通常不使用的变量,这些变量应该是可以随便用的。 #### 最小系统要求 #### -你所需要的一切,就是一台正常运转的Linux盒子。 +你所需要的一切,就是一台正常运转的Linux机器。 #### 依赖性 #### -对于一个标准的Linux发行版,使用此包时没有任何依赖。此外,该脚本不需要root权限来执行。但是,如果你想要安装,则必须输入一次root密码。 +对于一个标准的Linux发行版,使用此软件包不需任何依赖。此外,该脚本不需要root权限来执行。但是,如果你想要安装,则必须输入一次root密码。 #### 安全性 #### @@ -30,16 +31,16 @@ Linux中用于监控网络、磁盘使用、开机时间、平均负载和内存 强烈建议你以普通用户身份安装该脚本,而不是root。安装过程中会询问root密码,并且在需要的时候安装必要的组件。 -要安装`“tecmint_monitor.sh”`脚本,只需像下面这样使用-i(安装)选项就可以了。 +要安装“`tecmint_monitor.sh`”脚本,只需像下面这样使用-i(安装)选项就可以了。 - /tecmint_monitor.sh -i + ./tecmint_monitor.sh -i 在提示你输入root密码时输入该密码。如果一切顺利,你会看到像下面这样的安装成功信息。 Password: Congratulations! Script Installed, now run monitor Command -安装完毕后,你可以通过在任何位置,以任何用户调用命令`‘monitor’`来运行该脚本。如果你不喜欢安装,你需要在每次运行时输入路径。 +安装完毕后,你可以在任何位置,以任何用户调用命令`‘monitor’`来运行该脚本。如果你不喜欢安装,你需要在每次运行时输入路径。 # ./Path/to/script/tecmint_monitor.sh @@ -49,7 +50,7 @@ Linux中用于监控网络、磁盘使用、开机时间、平均负载和内存 ![TecMint Monitor Script in Action](http://www.tecmint.com/wp-content/uploads/2015/05/TecMint-Monitor-Script.gif) -你一运行命令,就会获得下面这些各种各样和系统相关的信息: +你运行命令就会获得下面这些各种各样和系统相关的信息: - 互联网连通性 - 操作系统类型 @@ -78,9 +79,9 @@ Linux中用于监控网络、磁盘使用、开机时间、平均负载和内存 ### 小结 ### -该脚本在一些机器上可以开机即用,这一点我已经检查过。相信对于你而言,它也会正常工作。如果你们发现了什么毛病,可以在评论中告诉我。这个脚本还不是结束,这仅仅是个开始。从这里开始,你可以将它提升到任何等级。如果你想要编辑脚本,将它带入一个更深的层次,尽管随意去做吧,别忘了给我们合适的积分,也别忘了把你更新后的脚本拿出来和我们分享哦,这样,我们也能通过给你合适的积分来更新此文。 +该脚本在一些机器上可以开机即用,这一点我已经检查过。相信对于你而言,它也会正常工作。如果你们发现了什么毛病,可以在评论中告诉我。这个脚本还不完善,这仅仅是个开始。从这里开始,你可以将它改进到任何程度。如果你想要编辑脚本,将它带入一个更深的层次,尽管随意去做吧,别忘了给我们应的的荣誉,也别忘了把你更新后的脚本拿出来和我们分享哦,这样,我们也会更新此文来给你应得的荣誉。 -别忘了和我们分享你的想法或者脚本,我们会在这儿帮助你。谢谢你们给予的所有挚爱。保持连线,不要走开哦。 +别忘了和我们分享你的想法或者脚本,我们会在这儿帮助你。谢谢你们给予的所有挚爱。继续浏览,不要走开哦。 -------------------------------------------------------------------------------- @@ -88,7 +89,7 @@ via: http://www.tecmint.com/linux-server-health-monitoring-script/ 作者:[Avishek Kumar][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 30c2f196d396c6dee08de1ac3ee65325a5b0887e Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 11 Jun 2015 00:42:49 +0800 Subject: [PATCH 1123/2517] PUB:20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command @geekpi --- ...sive Applications Using 'xkill' Command.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md (70%) diff --git a/translated/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md b/published/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md similarity index 70% rename from translated/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md rename to published/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md index 20211ab6bf..91127c7e74 100644 --- a/translated/tech/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md +++ b/published/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md @@ -1,8 +1,9 @@ -如何使用xkill命令傻点Linux进程/未响应的程序 +如何使用xkill命令杀掉Linux进程/未响应的程序 ================================================================================ + 我们如何在Linux中杀掉一个资源/进程?很明显我们会找出资源的pid然后用kill命令。 -更准确一点,我们可以找到资源(这里就是terminal)的PID: +说的更明白一点,我们可以找到某个资源(比如terminal)的PID: $ ps -A | grep -i terminal @@ -14,7 +15,7 @@ kill命令会发送一个信号给该pid的进程。 -另外一个方法是我们可以使用pkill命令,它可以基于进程的名字或者其他的属性来杀掉进程。同样我们要杀掉一个叫terminal的进程可以这么做: +另外一个方法是我们可以使用pkill命令,它可以基于进程的名字或者其他的属性来杀掉进程。同样我们要杀掉一个叫terminal的进程可以这么做: $ pkill terminal @@ -22,15 +23,15 @@ kill命令会发送一个信号给该pid的进程。 pkill看上去更加容易上手,因为你你不用找出进程的pid。但是如果你要对系统做更好的控制,那么没有什么可以打败'kill'。使用kill命令可以更好地审视你要杀掉的进程。 -我们已经有一篇覆盖了[kill、pkill和killall命令][1]间细节的指导了。 +我们已经有一篇覆盖了[kill、pkill和killall命令][1]细节的指导了。 对于那些运行X Server的人而言,有另外一个工具称为xkill可以将进程从X Window中杀掉而不必传递它的名字或者pid。 -xkill工具强制X server关闭于它客户端之间的联系,这可以让X resource关闭这个客户端。xkill是X11工具集中一个非常容易上手的杀掉无用窗口的工具。 +xkill工具强制X server关闭与它的客户程序之间的联系,其结果就是X resource关闭了这个客户程序。xkill是X11工具集中一个非常容易上手的杀掉无用窗口的工具。 -它支持的选项如在同时运行多个X Server时使用-display选项后面跟上显示号连接到指定的X server,使用-all(并不建议)杀掉所有在屏幕上的所遇顶层窗口,同时将帧(-frame)也计算在内。 +它支持的选项如在同时运行多个X Server时使用-display选项后面跟上显示号连接到指定的X server,使用-all(并不建议)杀掉所有在屏幕上的所有顶层窗口,以及帧(-frame)参数。 -要得到所有的客户端你可以运行: +要列出所有的客户程序你可以运行: $ xlsclients @@ -46,12 +47,11 @@ xkill工具强制X server关闭于它客户端之间的联系,这可以让X re 如果后面没有跟上资源id,xkill会将鼠标指针变成一个特殊符号,类似于“X”。只需在你要杀掉的窗口上点击,它就会杀掉它与server端的通信,这个程序就被杀掉了。 - $ xkill ![Xkill Command](http://www.tecmint.com/wp-content/uploads/2015/05/Xkill.png) -使用xkill杀掉进程 +*使用xkill杀掉进程* 需要注意的是xkill并不能保证它的通信会被成功杀掉/退出。大多数程序会在与服务端的通信被关闭后杀掉。然而仍有少部分会继续运行。 @@ -63,7 +63,7 @@ xkill工具强制X server关闭于它客户端之间的联系,这可以让X re **我需要在linux命令行中使用xkill么** -不是,你不必在命令行中运行xkill。你可以设置一个快捷键,并用它来调用xkill。 +不是,你不必非在命令行中运行xkill。你可以设置一个快捷键,并用它来调用xkill。 下面是如何在典型的gnome3桌面中设置键盘快捷键。 @@ -71,13 +71,13 @@ xkill工具强制X server关闭于它客户端之间的联系,这可以让X re ![Gnome Settings](http://www.tecmint.com/wp-content/uploads/2015/05/22.png) -Gnome 设置 +*Gnome 设置* ![Add Shortcut Key](http://www.tecmint.com/wp-content/uploads/2015/05/31.png) -添加快捷键 +*添加快捷键* -下次你要杀掉X资源只要用组合键就行了(Ctrl+Alt+Shift+x),你看到你的鼠标变成x了。点击想要杀掉的x资源就行了。 +下次你要杀掉一个X资源只要用组合键就行了(Ctrl+Alt+Shift+x),你看到你的鼠标变成x了。点击想要杀掉的x资源就行了。 -------------------------------------------------------------------------------- @@ -85,9 +85,9 @@ via: http://www.tecmint.com/kill-processes-unresponsive-programs-in-ubuntu/ 作者:[Avishek Kumar][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ +[1]:https://linux.cn/article-2116-1.html From 3845863c321c307e2f8796bc523c5c64c2ab15cf Mon Sep 17 00:00:00 2001 From: yajun Date: Thu, 11 Jun 2015 09:12:18 +0800 Subject: [PATCH 1124/2517] =?UTF-8?q?fyh=E7=94=B3=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/talk/20141211 Open source all over the world.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20141211 Open source all over the world.md b/sources/talk/20141211 Open source all over the world.md index bd306edd5a..1ef32bf1de 100644 --- a/sources/talk/20141211 Open source all over the world.md +++ b/sources/talk/20141211 Open source all over the world.md @@ -1,3 +1,5 @@ +fyh 翻译中。。。 + Open source all over the world ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUS_OpenSourceExperience_520x292_cm.png) From ed235a6fd2837786aa4b3e4dbe79fe678c8a954d Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 11 Jun 2015 09:38:35 +0800 Subject: [PATCH 1125/2517] translating --- ...nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md b/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md index e98bb00523..dd3478c903 100644 --- a/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md +++ b/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md @@ -1,3 +1,5 @@ +translating----geekpi + How to Install nginx and google pagespeed on Ubuntu 15.04 (Vivid Vervet) ================================================================================ Nginx (engine-x) is a open source and high performance HTTP server, reverse proxy and IMAP/POP3 proxy server. The outstanding features of Nginx are: stability, rich feature set, simple configuration and low resource consumption. Nginx is being used by some of the largest websites on the internet and is gaining more and more popularity in the webmaster community. This tutorials shows how to build a nginx .deb package for Ubuntu 15.04 from source that has Google pagespeed module compiled in. @@ -126,4 +128,4 @@ via: https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespe 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[1]:https://developers.google.com/speed/pagespeed/module/ \ No newline at end of file +[1]:https://developers.google.com/speed/pagespeed/module/ From 4efcae369ed64e3575dcb54e7e51511f284c1ffb Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 11 Jun 2015 10:06:26 +0800 Subject: [PATCH 1126/2517] PUB:20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @zhangboyue 翻译的不错! --- ... Manage 'Suse' Linux Package Management.md | 150 +++++++++--------- 1 file changed, 78 insertions(+), 72 deletions(-) rename {translated/tech => published}/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md (89%) diff --git a/translated/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md b/published/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md similarity index 89% rename from translated/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md rename to published/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md index efa807f2f3..0280635408 100644 --- a/translated/tech/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md +++ b/published/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md @@ -1,14 +1,14 @@ -45 个用于 ‘Suse‘ Linux 包管理的 Zypper 命令 +用于 ‘Suse‘ Linux 包管理的 Zypper 命令大全 ====================================================================== -SUSE( Software and System Entwicklung,即软件和系统开发。其中‘entwicklung‘是德语,意为开发)Linux是 Novell 公司在 Linux 内核基础上发布的操作系统。SUSE Linux 有两个发行分支。其中之一名为 OpenSUSE,这是一款自由而且免费的操作系统。该系统由开源社区开发维护,支持一些最新版本的应用软件,其最新的稳定版本为 13.2。 +SUSE( Software and System Entwicklung,即软件和系统开发。其中‘entwicklung‘是德语,意为开发)Linux 是由 Novell 公司在 Linux 内核基础上建立的操作系统。SUSE Linux 有两个发行分支。其中之一名为 openSUSE,这是一款自由而且免费的操作系统 (free as in speech as well as free as in wine)。该系统由开源社区开发维护,支持一些最新版本的应用软件,其最新的稳定版本为 13.2。 -另外一个分支是SUSE Linux 企业版。该分支是一个为企业及商业化产品设计的 Linux 发行版,包含了大量的企业应用以及适用于商业产品生产环境的特性。其最新的稳定版本为 12。 +另外一个分支是 SUSE Linux 企业版。该分支是一个为企业及商业化产品设计的 Linux 发行版,包含了大量的企业应用以及适用于商业产品生产环境的特性。其最新的稳定版本为 12。 以下的链接包含了安装企业版 SUSE Linux 服务器的详细信息。 - [如何安装企业版 SUSE Linux 12][1] -Zypper 和 Yast 是 SUSE Linux 平台上的软件包管理工具,他们的底层使用了 RPM(译者注:RPM 最初指 Redhat Pacakge Manager ,现普遍解释为递归短语 RPM Package Manager 的缩写)。 +Zypper 和 Yast 是 SUSE Linux 平台上的软件包管理工具,他们的底层使用了 RPM(LCTT 译者注:RPM 最初指 Redhat Pacakge Manager ,现普遍解释为递归短语 RPM Package Manager 的缩写)。 Yast(Yet another Setup Tool )是 OpenSUSE 以及企业版 SUSE 上用于系统管理、设置和配置的工具。 @@ -16,21 +16,21 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS 本文将介绍实际应用中常见的一些Zypper命令。这些命令用来进行安装、更新、删除等任何软件包管理器所能够胜任的工作。 -**重要** : 切记所有的这些指令都将在系统全局范围内产生影响,所以必须以 root 身份执行,否则命令将失败。 +**重要** : 切记所有的这些命令都将在系统全局范围内产生影响,所以必须以 root 身份执行,否则命令将失败。 ### 获取基本的 Zypper 帮助信息 ### -1. 不带任何选项的执行 zypper, 将输出该命令的全局选项以及子命令列表(译者注:全局选项,global option,控制台命令的输入分为可选参数和位置参数两大类。按照习惯,一般可选参数称为选项'option',而位置参数称为参数 'argument')。 +1. 不带任何选项的执行 zypper, 将输出该命令的全局选项以及子命令列表(LCTT 译者注:全局选项,global option,控制台命令的输入分为可选参数和位置参数两大类。按照习惯,一般可选参数称为选项'option',而位置参数称为参数 'argument')。 -
%>  zypper
+    
#  zypper
         Usage:
         zypper [--global-options]
2. 获取一个具体的子命令的帮助信息,比如 'in' (install),可以执行下面的命令 -
%> zypper help in
+
# zypper help in
或者 -
%> zypper help install
+    
# zypper help install
     install (in) [options] {capability | rpm_file_uri}
     
     Install packages with specified capabilities or RPM files with specified
@@ -96,7 +96,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 4. 获取一个模式包的信息(以 lamp_server 为例)。
 
-    
%> zypper info -t pattern lamp_server
+    
# zypper info -t pattern lamp_server
     
     Loading repository data...
     Reading installed packages...
@@ -136,9 +136,9 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 5. 开启一个Zypper Shell 的会话。
 
-    
 %>zypper shell 
+
# zypper shell 
或者 -
 %>zypper sh 
+
# zypper sh 
zypper> help
       Usage:
@@ -151,9 +151,9 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 6. 使用 'zypper repos' 或者 'zypper lr' 来列举所有已定以的软件库。
 
-    
%> zypper repos
+
# zypper repos
或者 -
%> zypper lr
+    
# zypper lr
       | Alias                     | Name                               | Enabled | Refresh
     --+---------------------------+------------------------------------+---------+--------
     1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No
@@ -183,7 +183,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 8. 根据优先级列举软件库。
 
-    
%> zypper lr -P
+    
# zypper lr -P
       | Alias                     | Name                               | Enabled | Refresh | Priority
     --+---------------------------+------------------------------------+---------+---------+---------
     1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No      |   99
@@ -200,9 +200,9 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 9. 使用 'zypper refresh' or 'zypper ref' 来刷新 zypper 软件库。
 
-    
%> zypper refresh 
+
# zypper refresh 
或者 -
%> zypper ref
+    
# zypper ref
     Repository 'openSUSE-13.2-0' is up to date.
     Repository 'openSUSE-13.2-Debug' is up to date.
     Repository 'openSUSE-13.2-Non-Oss' is up to date.
@@ -213,13 +213,13 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 10. 刷新一个指定的软件库(以 'repo-non-oss' 为例 )。
 
-    
%> zypper refresh repo-non-oss
+    
# zypper refresh repo-non-oss
     Repository 'openSUSE-13.2-Non-Oss' is up to date.
     Specified repositories have been refreshed. 
11. 强制更新一个软件库(以 'repo-non-oss' 为例 )。 -
%> zypper ref -f repo-non-oss 
+    
# zypper ref -f repo-non-oss 
     Forcing raw metadata refresh
     Retrieving repository 'openSUSE-13.2-Non-Oss' metadata ............................................................[done]
     Forcing building of repository cache
@@ -230,9 +230,9 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 本文中我们使用‘zypper modifyrepo‘ 或者 ‘zypper mr‘ 来关闭或者开启 zypper 软件库。
 
-12. 在关闭一个软件库之前,我们需要知道在 zypper中,每一个软件库有一个唯一的标示数字与之关联,该数字用于打开或者关闭与之相联系的软件库。假设我们需要关闭 'repo-oss' 软件库,那么我们可以通过以下的法来获得该软件库的标志数字。
+12. 在关闭一个软件库之前,我们需要知道在 zypper 中,每一个软件库有一个唯一的标示数字与之关联,该数字用于打开或者关闭与之相联系的软件库。假设我们需要关闭 'repo-oss' 软件库,那么我们可以通过以下的法来获得该软件库的标志数字。
 
-    
%> zypper lr
+    
# zypper lr
       | Alias                     | Name                               | Enabled | Refresh
     --+---------------------------+------------------------------------+---------+--------
     1 | openSUSE-13.2-0           | openSUSE-13.2-0                    | Yes     | No
@@ -246,23 +246,23 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
     9 | repo-update-non-oss       | openSUSE-13.2-Update-Non-Oss       | Yes     | Yes
从以上输出的列表中我们可以看到 'repo-oss' 库的标示数字是 6,因此通过以下的命令来关闭该库。 -
%> zypper mr -d 6
+    
# zypper mr -d 6
     Repository 'repo-oss' has been successfully disabled.
13. 如果需要再次开启软件库 ‘repo-oss‘, 接上例,与之相关联的标示数字为 6。 -
%> zypper mr -e 6
+    
# zypper mr -e 6
     Repository 'repo-oss' has been successfully enabled.
14. 针对某一个软件库(以 'repo-non-oss' 为例 )开启自动刷新( auto-refresh )和 rpm 缓存,并设置该软件库的优先级,比如85。 -
%> zypper mr -rk -p 85 repo-non-oss
+    
# zypper mr -rk -p 85 repo-non-oss
     Repository 'repo-non-oss' priority has been left unchanged (85)
     Nothing to change for repository 'repo-non-oss'.
15. 对所有的软件库关闭 rpm 文件缓存。 -
%> zypper mr -Ka
+    
# zypper mr -Ka
     RPM files caching has been disabled for repository 'openSUSE-13.2-0'.
     RPM files caching has been disabled for repository 'repo-debug'.
     RPM files caching has been disabled for repository 'repo-debug-update'.
@@ -274,7 +274,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
     RPM files caching has been disabled for repository 'repo-update-non-oss'.
16. 对所有的软件库开启 rpm 文件缓存。 -
 zypper mr -ka
+    
# zypper mr -ka
     RPM files caching has been enabled for repository 'openSUSE-13.2-0'.
     RPM files caching has been enabled for repository 'repo-debug'.
     RPM files caching has been enabled for repository 'repo-debug-update'.
@@ -285,8 +285,8 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
     RPM files caching has been enabled for repository 'repo-update'.
     RPM files caching has been enabled for repository 'repo-update-non-oss'.
-17. 关闭远程库的rpm 文件缓存 -
%> zypper mr -Kt
+17. 关闭远程库的 rpm 文件缓存
+    
# zypper mr -Kt
     RPM files caching has been disabled for repository 'repo-debug'.
     RPM files caching has been disabled for repository 'repo-debug-update'.
     RPM files caching has been disabled for repository 'repo-debug-update-non-oss'.
@@ -297,7 +297,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
     RPM files caching has been disabled for repository 'repo-update-non-oss'.
18. 开启远程软件库的 rpm 文件缓存。 -
%> zypper mr -kt
+    
# zypper mr -kt
     RPM files caching has been enabled for repository 'repo-debug'.
     RPM files caching has been enabled for repository 'repo-debug-update'.
     RPM files caching has been enabled for repository 'repo-debug-update-non-oss'.
@@ -313,7 +313,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 19. 增加一个新的软件库( 以 “http://download.opensuse.org/update/12.3/” 为例 )。
 
-    
%>  zypper ar http://download.opensuse.org/update/11.1/ update
+    
# zypper ar http://download.opensuse.org/update/11.1/ update
     Adding repository 'update' .............................................................................................................................................................[done]
     Repository 'update' successfully added
     Enabled     : Yes
@@ -323,14 +323,14 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 20. 更改一个软件库的名字,这将仅仅改变软件库的别名。 命令 'zypper namerepo' 或者 'zypperr nr' 可以胜任此工作。例如更改标示数字为10的软件库的名字为 'upd8',或者说将标示数字为10的软件库的别名改为 'upd8',可以使用下面的命令。
 
-    
%> zypper nr 10 upd8
+    
# zypper nr 10 upd8
     Repository 'update' renamed to 'upd8'.
#### 删除软件库 #### 21. 删除一个软件库。要从系统删除一个软件库可以使 'zypper removerepo' 或者 'zypper rr'。例如以下的命令可以删除软件库 'upd8' -
%> zypper rr upd8
+    
# zypper rr upd8
     # Removing repository 'upd8' .........................................................................................[done]
     Repository 'upd8' has been removed.
@@ -339,7 +339,8 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS #### 用 zypper 安装一个软件包 #### 22. 在 zypper 中,我们可以通过软件包的功能名称来安装一个软件包。以 Firefox 为例,以下的命令可以用来安装该软件包。 -
%> zypper in MozillaFirefox
+
+    
# zypper in MozillaFirefox
     Loading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -370,8 +371,9 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
     Retrieving: hicolor-icon-theme-0.13-2.1.2.noarch.rpm ...................................................................................................................................[done]
     Retrieving package sound-theme-freedesktop-0.8-7.1.2.noarch                                                                                            (3/128), 372.6 KiB (460.3 KiB unpacked) 
-23. 安装指定版本号的软件包,(以 gcc 5.1 为例)。 -
 %>zypper in 'gcc<5.1'
+23. 安装指定版本号的软件包,(以 gcc 5.1 为例)。
+
+    
# zypper in 'gcc<5.1'
     Loading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -385,7 +387,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 24. 为特定的CPU架构安装软件包(以兼容 i586 的 gcc 为例)。
 
-    
%> zypper in gcc.i586
+    
# zypper in gcc.i586
     Loading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -403,7 +405,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
  
 25. 为特定的CPU架构安装指定版本号的软件包(以兼容 i586 且版本低于5.1的 gcc 为例)
 
-    
%> zypper in 'gcc.i586<5.1'
+    
# zypper in 'gcc.i586<5.1'
     Loading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -418,8 +420,9 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
     In cache libatomic1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm                                           (2/13),  14.3 KiB ( 26.1 KiB unpacked)
     In cache libgomp1-gcc49-4.9.0+r211729-2.1.7.x86_64.rpm                                             (3/13),  41.1 KiB ( 90.7 KiB unpacked) 
-26. 从指定的软件库里面安装一个软件包,例如从 amarok 中安装 libxine。 -
%> zypper in amarok upd:libxine1
+26. 从指定的软件库里面安装一个软件包,例如从 amarok 中安装 libxine。
+
+    
# zypper in amarok upd:libxine1
     Loading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -431,7 +434,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 27. 通过指定软件包的名字安装软件包。
 
-    
%> zypper in -n git
+    
# zypper in -n git
     Loading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -451,8 +454,9 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
     Overall download size: 15.6 MiB. Already cached: 0 B  After the operation, additional 56.7 MiB will be used.
     Continue? [y/n/? shows all options] (y): y 
-28. 通过通配符来安装软件包,例如,安装所有 php5 的软件包。 -
%> zypper in php5*
+28. 通过通配符来安装软件包,例如,安装所有 php5 的软件包。
+
+    
# zypper in php5*
     Loading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -484,9 +488,9 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
       do not install php5-pear-Horde_Pdf-2.0.1-6.1.3.noarch
     ....
-29. 使用模式名称(模式名称是一类软件包的名字)来批量安装软件包 +29. 使用模式名称(模式名称是一类软件包的名字)来批量安装软件包。 -
%> zypper in -t pattern lamp_server
+    
# zypper in -t pattern lamp_server
     ading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -506,7 +510,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
     Overall download size: 7.2 MiB. Already cached: 1.2 MiB  After the operation, additional 34.7 MiB will be used.
     Continue? [y/n/? shows all options] (y): 
-30. 使用一行命令安转一个软件包同时卸载另一个软件包,例如在安装 nano 的同时卸载 vi +30. 使用一行命令安装一个软件包同时卸载另一个软件包,例如在安装 nano 的同时卸载 vi
# zypper in nano -vi
     Loading repository data...
@@ -530,7 +534,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 31. 使用 zypper 安装 rpm 软件包。
 
-    
%> zypper in teamviewer*.rpm
+    
# zypper in teamviewer*.rpm
     Loading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -552,9 +556,9 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 32. 命令 ‘zypper remove‘ 和 ‘zypper rm‘ 用于卸载软件包。例如卸载 apache2:
 
-    
%> zypper remove apache2 
+
# zypper remove apache2 
或者 -
%> zypper rm apache2
+    
# zypper rm apache2
     Loading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -572,9 +576,9 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 33. 更新所有的软件包,可以使用 ‘zypper update‘ 或者 ‘zypper up‘。
 
-    
%> zypper up 
+
# zypper up 
或者 -
%> zypper update
+    
# zypper update
 
     Loading repository data...
     Reading installed packages...
@@ -591,9 +595,9 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
     Nothing to do.
-35. 安装一个软件库,例如 ariadb,如果该库存在则更新之。 +35. 安装一个软件库,例如 mariadb,如果该库存在则更新之。 -
%> zypper in mariadb
+    
# zypper in mariadb
     Loading repository data...
     Reading installed packages...
     'mariadb' is already installed.
@@ -608,7 +612,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 36. 安装某一个软件包的源文件及其依赖关系,例如 mariadb。
 
-    
%> zypper si mariadb
+    
# zypper si mariadb
     Reading installed packages...
     Loading repository data...
     Resolving package dependencies...
@@ -626,7 +630,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 37. 仅为某一个软件包安装源文件,例如 mariadb
 
-    
%> zypper in -D mariadb
+    
# zypper in -D mariadb
     Loading repository data...
     Reading installed packages...
     'mariadb' is already installed.
@@ -637,7 +641,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 38. 仅为某一个软件包安装依赖关系,例如 mariadb
 
-    
%> zypper si -d mariadb
+    
# zypper si -d mariadb
     Reading installed packages...
     Loading repository data...
     Resolving package dependencies...
@@ -653,11 +657,11 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
     Overall download size: 33.7 MiB. Already cached: 129.5 KiB  After the operation, additional 144.3 MiB will be used.
     Continue? [y/n/? shows all options] (y): y
-#### Zypper in Scripts and Applications #### +#### 在脚本和应用中调用 Zypper (非交互式) #### 39. 安装一个软件包,并且在安装过程中跳过与用户的交互, 例如 mariadb。 -
%> zypper --non-interactive in mariadb
+    
# zypper --non-interactive in mariadb
     Loading repository data...
     Reading installed packages...
     'mariadb' is already installed.
@@ -668,7 +672,7 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 40. 卸载一个软件包,并且在卸载过程中跳过与用户的交互,例如 mariadb
 
-    
%> zypper --non-interactive rm mariadb
+    
# zypper --non-interactive rm mariadb
     Loading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -681,18 +685,18 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
     Continue? [y/n/? shows all options] (y): y
     (1/1) Removing mariadb-10.0.13-2.6.1 .............................................................................[done] 
-41. 将 zypper 输出用 XML 格式打印。 +41. 以 XML 格式显示 zypper 的输出。 -
%> zypper --xmlout
+    
# zypper --xmlout
       Usage:
     	zypper [--global-options]  [--command-options] [arguments]
 
       Global Options
     ....
-42. 禁止详细信息输出到屏幕。 +42. 在安装过程中禁止详细信息输出到屏幕。 -
%> zypper --quiet in mariadb
+    
# zypper --quiet in mariadb
     The following NEW package is going to be installed:
       mariadb
 
@@ -703,10 +707,11 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 43. 在卸载过程中禁止详细信息输出到屏幕
 
-    
%> zypper --quiet rm mariadb 
+
# zypper --quiet rm mariadb 
-44. 自动地同意版权或者协议。 -
%> zypper patch --auto-agree-with-licenses
+44. 自动地同意版权或者协议。
+
+    
# zypper patch --auto-agree-with-licenses
     Loading repository data...
     Reading installed packages...
     Resolving package dependencies...
@@ -717,15 +722,15 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 45. 以下指令可以用来清理Zypper缓存。
 
-    
%> zypper clean
+    
# zypper clean
     All repositories have been cleaned up.
-如果需要一次性地清理元数据以及软件包缓存,可以通过 -all/-a 选项来达到目的 +如果需要一次性地清理元数据以及软件包缓存,可以通过 -all 或 -a 选项来达到目的 -
%> zypper clean -a
+    
# zypper clean -a
     All repositories have been cleaned up.
-46. 查看 Zypper 的历史信息。籍由 Zypper 所有的软件包管理动作,包括安装、更新以及卸载都会在 /var/log/zypp/history中保留历史信息。可以通过 cat 来查看此文件,或者通过过滤器来筛选希望看到的信息。 +46. 查看 Zypper 的历史信息。任何通过 Zypper 进行的软件包管理动作,包括安装、更新以及卸载都会在 /var/log/zypp/history中保留历史信息。可以通过 cat 来查看此文件,或者通过过滤器来筛选希望看到的信息。
 cat /var/log/zypp/history
     2015-05-07 15:43:03|install|boost-license1_54_0|1.54.0-10.1.3|noarch||openSUSE-13.2-0|0523b909d2aae5239f9841316dafaf3a37b4f096|
@@ -742,7 +747,8 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 #### 使用 Zypper 进行SUSE系统升级 ####
 
-47. 可以使用 Zypper 命令的 'dist-upgrade' 选项来将当前的SUSE Linux升级至最新版本。
+47. 可以使用 Zypper 命令的 'dist-upgrade' 选项来将当前的 SUSE Linux 升级至最新版本。
+
     
# zypper dist-upgrade
     You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
     Building repository 'openSUSE-13.2-0' cache .....................................................................[done]
@@ -755,11 +761,11 @@ Zypper 是软件包管理器ZYpp的命令行接口,可用于安装、删除SUS
 
 --------------------------------------------------------------------------------
 
-原文地址: http://www.tecmint.com/zypper-commands-to-manage-suse-linux-package-management/
+via: http://www.tecmint.com/zypper-commands-to-manage-suse-linux-package-management/
 
 作者:[Avishek Kumar][a]
 译者:[张博约](https://github.com/zhangboyue)
-校对:[校对者ID](https://github.com/校对者ID)
+校对:[wxy](https://github.com/wxy)
 
 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
 

From c7510e2e6a2fb55db65dcfdfa5dbb0df98cbd730 Mon Sep 17 00:00:00 2001
From: wxy 
Date: Thu, 11 Jun 2015 10:35:29 +0800
Subject: [PATCH 1127/2517] PUB:20150518 70 Expected Shell Scripting Interview
 Questions and Answers

@ictlyh
---
 ...ripting Interview Questions and Answers.md | 301 +++++++++---------
 1 file changed, 159 insertions(+), 142 deletions(-)
 rename {translated/tech => published}/20150518 70 Expected Shell Scripting Interview Questions and Answers.md (50%)

diff --git a/translated/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md b/published/20150518 70 Expected Shell Scripting Interview Questions and Answers.md
similarity index 50%
rename from translated/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md
rename to published/20150518 70 Expected Shell Scripting Interview Questions and Answers.md
index b5ccd63e0a..9b0201d51e 100644
--- a/translated/tech/20150518 70 Expected Shell Scripting Interview Questions and Answers.md	
+++ b/published/20150518 70 Expected Shell Scripting Interview Questions and Answers.md	
@@ -1,14 +1,14 @@
-70 个可能的 Shell 脚本面试问题及解答
+Shell 脚本面试问题大全
 ================================================================================
-我们为你的面试准备选择了 70 个可能的 shell 脚面问题及解答。了解脚本或至少知道基础知识对系统管理员来说至关重要,它也有助于你在工作环境中自动完成很多任务。在过去的几年里,我们注意到所有的 linux 工作职位都要求脚本技能。
+我们为你的面试准备选择了 70 个你可能遇到的 shell 脚面问题及解答。了解脚本或至少知道基础知识对系统管理员来说至关重要,它也有助于你在工作环境中自动完成很多任务。在过去的几年里,我们注意到所有的 linux 工作职位都要求脚本技能。
 
 ### 1) 如何向脚本传递参数 ? ###
 
-./script argument
+	./script argument
 
 **例子** : 显示文件名称脚本
 
-./show.sh file1.txt
+	./show.sh file1.txt
 
     cat show.sh
     #!/bin/bash
@@ -16,12 +16,11 @@
 
 ### 2) 如何在脚本中使用参数 ? ###
 
-第一个参数: $1,
-第二个参数 : $2
+第一个参数 : $1,第二个参数 : $2
 
 例子 : 脚本会复制文件(arg1) 到目标地址(arg2)
 
-./copy.sh file1.txt /tmp/
+	./copy.sh file1.txt /tmp/
 
     cat copy.sh
     #!/bin/bash
@@ -29,127 +28,129 @@
 
 ### 3) 如何计算传递进来的参数 ? ###
 
-$#
+	$#
 
 ### 4) 如何在脚本中获取脚本名称 ? ###
 
-$0
+	$0
 
 ### 5) 如何检查之前的命令是否运行成功 ? ###
 
-$?
+	$?
 
 ### 6) 如何获取文件的最后一行 ? ###
 
-tail -1
+	tail -1
 
 ### 7) 如何获取文件的第一行 ? ###
 
-head -1
+	head -1
 
 ### 8) 如何获取一个文件每一行的第三个元素 ? ###
 
-awk '{print $3}'
+	awk '{print $3}'
 
-### 9) 假如第一个等于 FIND,如何获取文件中每行的第二个元素 ###
+### 9) 假如文件中每行第一个元素是 FIND,如何获取第二个元素 ###
 
-awk '{ if ($1 == "FIND") print $2}'
+	awk '{ if ($1 == "FIND") print $2}'
 
 ### 10) 如何调试 bash 脚本 ###
 
-Add -xv to #!/bin/bash
 
-例子
+将 -xv 参数加到 #!/bin/bash 后
 
-#!/bin/bash –xv
+例子:
+
+	#!/bin/bash –xv
 
 ### 11) 举例如何写一个函数 ? ###
 
-function example {
-echo "Hello world!"
-}
+	function example {
+	echo "Hello world!"
+	}
 
-### 12) 如何向 string 添加 string ? ###
+### 12) 如何向连接两个字符串 ? ###
 
-V1="Hello"
-V2="World"
-V3=$V1+$V2
-echo $V3
+	V1="Hello"
+	V2="World"
+	V3=$V1+$V2
+	echo $V3
 
-Output
+输出
 
-Hello+World
+	Hello+World
 
 ### 13) 如何进行两个整数相加 ? ###
 
-V1=1
-V2=2
-V3=$V1+$V2
-echo $V3
+	V1=1
+	V2=2
+	V3=$V1+$V2
+	echo $V3
 
-Output
-3
+输出
+
+	3
 
 ### 14) 如何检查文件系统中是否存在某个文件 ? ###
 
-if [ -f /var/log/messages ]
-then
-echo "File exists"
-fi
+	if [ -f /var/log/messages ]
+	then
+	echo "File exists"
+	fi
 
 ### 15) 写出 shell 脚本中所有循环语法 ? ###
 
-#### for loop : ####
+#### for 循环 : ####
 
-for i in $( ls ); do
-echo item: $i
-done
+	for i in $( ls ); do
+	echo item: $i
+	done
 
-#### while loop : ####
+#### while 循环 : ####
 
-#!/bin/bash
-COUNTER=0
-while [ $COUNTER -lt 10 ]; do
-echo The counter is $COUNTER
-let COUNTER=COUNTER+1
-done
+	#!/bin/bash
+	COUNTER=0
+	while [ $COUNTER -lt 10 ]; do
+	echo The counter is $COUNTER
+	let COUNTER=COUNTER+1
+	done
 
-#### untill oop : ####
+#### until 循环 : ####
 
-#!/bin/bash
-COUNTER=20
-until [ $COUNTER -lt 10 ]; do
-echo COUNTER $COUNTER
-let COUNTER-=1
-done
+	#!/bin/bash
+	COUNTER=20
+	until [ $COUNTER -lt 10 ]; do
+	echo COUNTER $COUNTER
+	let COUNTER-=1
+	done
 
 ### 16) 每个脚本开始的 #!/bin/sh 或 #!/bin/bash 表示什么意思 ? ###
 
-这一行说明要使用的 shell。#!/bin/bash 表示脚本使用 /bin/bash。对于 python 脚本,就是 #!/usr/bin/python
+这一行说明要使用的 shell。#!/bin/bash 表示脚本使用 /bin/bash。对于 python 脚本,就是 #!/usr/bin/python。(LCTT译注:这一行称之为[释伴行](https://linux.cn/article-3664-1.html)。)
 
 ### 17) 如何获取文本文件的第 10 行 ? ###
 
-head -10 file|tail -1
+	head -10 file|tail -1
 
 ### 18) bash 脚本文件的第一个符号是什么 ###
 
-#
+	#
 
 ### 19) 命令:[ -z "" ] && echo 0 || echo 1 的输出是什么 ###
 
-0
+	0
 
 ### 20) 命令 “export” 有什么用 ? ###
 
-使变量在子 shell 中公有
+使变量在子 shell 中可用。
 
 ### 21) 如何在后台运行脚本 ? ###
 
-在脚本后面添加 “&”
+在脚本后面添加 “&”。
 
 ### 22) "chmod 500 script" 做什么 ? ###
 
-使脚本所有者拥有可执行权限
+使脚本所有者拥有可执行权限。
 
 ### 23) ">" 做什么 ? ###
 
@@ -157,8 +158,8 @@ head -10 file|tail -1
 
 ### 24) & 和 && 有什么区别 ###
 
-& - 希望脚本在后台运行的时候使用它
-&& - 当第一个脚本成功完成才执行命令/脚本的时候使用它
+- & - 希望脚本在后台运行的时候使用它
+- && - 当前一个脚本成功完成才执行后面的命令/脚本的时候使用它
 
 ### 25) 什么时候要在 [ condition ] 之前使用 “if” ? ###
 
@@ -166,81 +167,87 @@ head -10 file|tail -1
 
 ### 26) 命令: name=John && echo 'My name is $name' 的输出是什么 ###
 
-My name is $name
+	My name is $name
 
 ### 27) bash shell 脚本中哪个符号用于注释 ? ###
 
-#
+	#
 
 ### 28) 命令: echo ${new:-variable} 的输出是什么 ###
 
-variable
+	variable
 
 ### 29)  ' 和 " 引号有什么区别 ? ###
 
-' - 当我们不希望把变量转换为值的时候使用它。
-" - 会计算所有变量的值并用值代替。
+- ' - 当我们不希望把变量转换为值的时候使用它。
+- " - 会计算所有变量的值并用值代替。
 
-### 30) 如何在脚本文件中重定向标准输入输出流到 log.txt 文件 ? ###
+### 30) 如何在脚本文件中重定向标准输出和标准错误流到 log.txt 文件 ? ###
 
-在脚本文件中添加 "exec >log.txt 2>&1" 命令
+在脚本文件中添加 "exec >log.txt 2>&1" 命令。
 
-### 31) 如何只用 echo 命令获取 string 变量的一部分 ? ###
+### 31) 如何只用 echo 命令获取字符串变量的一部分 ? ###
+
+	echo ${variable:x:y}
+	x - 起始位置
+	y - 长度
 
-echo ${variable:x:y}
-x - 起始位置
-y - 长度
 例子:
-variable="My name is Petras, and I am developer."
-echo ${variable:11:6} # 会显示 Petras
 
-### 32) 如果给定字符串 variable="User:123:321:/home/dir" 如何只用 echo 命令获取 home_dir ? ###
+	variable="My name is Petras, and I am developer."
+	echo ${variable:11:6} # 会显示 Petras
+
+### 32) 如果给定字符串 variable="User:123:321:/home/dir",如何只用 echo 命令获取 home_dir ? ###
+
+	echo ${variable#*:*:*:}
 
-echo ${variable#*:*:*:}
 或
-echo ${variable##*:}
+
+	echo ${variable##*:}
 
 ### 33) 如何从上面的字符串中获取 “User”  ? ###
 
-echo ${variable%:*:*:*}
+	echo ${variable%:*:*:*}
+
 或
-echo ${variable%%:*}
+
+	echo ${variable%%:*}
 
 ### 34) 如何使用 awk 列出 UID 小于 100 的用户 ? ###
 
-awk -F: '$3<100' /etc/passwd
+	awk -F: '$3<100' /etc/passwd
 
 ### 35) 写程序为用户计算主组数目并显示次数和组名 ###
 
-cat /etc/passwd|cut -d: -f4|sort|uniq -c|while read c g
-do
-{ echo $c; grep :$g: /etc/group|cut -d: -f1;}|xargs -n 2
-done
+	cat /etc/passwd|cut -d: -f4|sort|uniq -c|while read c g
+	do
+	{ echo $c; grep :$g: /etc/group|cut -d: -f1;}|xargs -n 2
+	done
 
-### 36) 如何在 bash shell 中更改标注域分隔符为 ":" ? ###
+### 36) 如何在 bash shell 中更改标准的域分隔符为 ":" ? ###
 
-IFS=":"
+	IFS=":"
 
 ### 37) 如何获取变量长度 ? ###
 
-${#variable}
+	${#variable}
 
 ### 38) 如何打印变量的最后 5 个字符 ? ###
 
-echo ${variable: -5}
+	echo ${variable: -5}
 
 ### 39) ${variable:-10} 和 ${variable: -10} 有什么区别? ###
 
-${variable:-10} - 如果之前没有给 variable 赋值则输出 10
-${variable: -10} - 输出 variable 的最后 10 个字符
+- ${variable:-10} - 如果之前没有给 variable 赋值则输出 10
+- ${variable: -10} - 输出 variable 的最后 10 个字符
 
 ### 40) 如何只用 echo 命令替换字符串的一部分 ? ###
 
-echo ${variable//pattern/replacement}
+	echo ${variable//pattern/replacement}
 
 ### 41) 哪个命令将命令替换为大写 ? ###
 
-tr '[:lower:]' '[:upper:]'
+	tr '[:lower:]' '[:upper:]'
 
 ### 42) 如何计算本地用户数目 ? ###
 
@@ -250,141 +257,151 @@ cat /etc/passwd|wc -l
 
 ### 43) 不用 wc 命令如何计算字符串中的单词数目 ? ###
 
-set ${string}
-echo $#
+	set ${string}
+	echo $#
 
 ### 44)  "export $variable" 或 "export variable" 哪个正确 ? ###
 
-export variable
+	export variable
 
 ### 45) 如何列出第二个字母是 a 或 b 的文件 ? ###
 
-ls -d ?[ab]*
+	ls -d ?[ab]*
 
 ### 46) 如何将整数 a 加到 b 并赋值给 c ? ###
 
-c=$((a+b))
+	c=$((a+b))
+
 或
-c=`expr $a + $b`
+
+	c=`expr $a + $b`
+
 或
-c=`echo "$a+$b"|bc`
+
+	c=`echo "$a+$b"|bc`
 
 ### 47) 如何去除字符串中的所有空格 ? ###
 
-echo $string|tr -d " "
+	echo $string|tr -d " "
 
-### 48) 重写命令输出变量转换为复数的句子: item="car"; echo "I like $item" ? ###
+### 48) 重写这个命令,将输出变量转换为复数: item="car"; echo "I like $item" ? ###
 
-item="car"; echo "I like ${item}s"
+	item="car"; echo "I like ${item}s"
 
 ### 49) 写出输出数字 0 到 100 中 3 的倍数(0 3 6 9 …)的命令 ? ###
 
-for i in {0..100..3}; do echo $i; done
+	for i in {0..100..3}; do echo $i; done
+	
 或
-for (( i=0; i<=100; i=i+3 )); do echo "Welcome $i times"; done
+
+	for (( i=0; i<=100; i=i+3 )); do echo "Welcome $i times"; done
 
 ### 50) 如何打印传递给脚本的所有参数 ? ###
 
-echo $*
+	echo $*
+
 或
-echo $@
+
+	echo $@
 
 ### 51)  [ $a == $b ] 和 [ $a -eq $b ] 有什么区别 ###
 
-[ $a == $b ] - 用于字符串比较
-[ $a -eq $b ] - 用于数字比较
+- [ $a == $b ] - 用于字符串比较
+- [ $a -eq $b ] - 用于数字比较
 
 ### 52) = 和 == 有什么区别 ###
 
-= - 用于为变量复制
-== - 用于字符串比较
+- = - 用于为变量复制
+- == - 用于字符串比较
 
 ### 53) 写出测试 $a 是否大于 12 的命令 ? ###
 
-[ $a -gt 12 ]
+	[ $a -gt 12 ]
 
 ### 54) 写出测试 $b 是否小于等于 12 的命令 ? ###
 
-[ $b -le 12 ]
+	[ $b -le 12 ]
 
 ### 55) 如何检查字符串是否以字母 "abc" 开头 ? ###
 
-[[ $string == abc* ]]
+	[[ $string == abc* ]]
 
 ### 56) [[ $string == abc* ]] 和 [[ $string == "abc*" ]] 有什么区别 ###
 
-[[ $string == abc* ]] - 检查字符串是否以字母 abc 开头
-[[ $string == "abc* " ]] - 检查字符串是否完全等于 abc*
+- [[ $string == abc* ]] - 检查字符串是否以字母 abc 开头
+- [[ $string == "abc*" ]] - 检查字符串是否完全等于 abc*
 
 ### 57) 如何列出以 ab 或 xy 开头的用户名 ? ###
 
-egrep "^ab|^xy" /etc/passwd|cut -d: -f1
+	egrep "^ab|^xy" /etc/passwd|cut -d: -f1
 
 ### 58) bash 中 $! 表示什么意思 ? ###
 
-后台最近命令的 PID
+后台最近执行命令的 PID.
 
 ### 59) $? 表示什么意思 ? ###
 
-前台最近命令的结束状态
+前台最近命令的结束状态。
 
 ### 60) 如何输出当前 shell 的 PID ? ###
 
-echo $$
+	echo $$
 
 ### 61) 如何获取传递给脚本的参数数目 ? ###
 
-echo $#
+	echo $#
+	
+(LCTT 译注:和第3题重复了。)
 
 ### 62) $* 和 $@ 有什么区别 ###
 
-$* - 以一个字符串形式输出所有传递到脚本的参数
-$@ - 以 $IFS 为分隔符列出所有传递到脚本中的参数
+- $* - 以一个字符串形式输出所有传递到脚本的参数
+- $@ - 以 $IFS 为分隔符列出所有传递到脚本中的参数
 
 ### 63) 如何在 bash 中定义数组 ? ###
 
-array=("Hi" "my" "name" "is")
+	array=("Hi" "my" "name" "is")
 
 ### 64) 如何打印数组的第一个元素 ? ###
 
-echo ${array[0]}
+	echo ${array[0]}
 
 ### 65) 如何打印数组的所有元素 ? ###
 
-echo ${array[@]}
+	echo ${array[@]}
 
 ### 66) 如何输出所有数组索引 ? ###
 
-echo ${!array[@]}
+	echo ${!array[@]}
 
 ### 67) 如何移除数组中索引为 2 的元素 ? ###
 
-unset array[2]
+	unset array[2]
 
 ### 68) 如何在数组中添加 id 为 333 的元素 ? ###
 
-array[333]="New_element"
+	array[333]="New_element"
 
 ### 69) shell 脚本如何获取输入的值 ? ###
 
 a) 通过参数
 
-./script param1 param2
+	./script param1 param2
 
 b) 通过 read 命令
 
-read -p "Destination backup Server : " desthost
+	read -p "Destination backup Server : " desthost
 
 ### 70) 在脚本中如何使用 "expect" ? ###
 
-/usr/bin/expect << EOD
-spawn rsync -ar ${line} ${desthost}:${destpath}
-expect "*?assword:*"
-send "${password}\r"
-expect eof
-EOD
+	/usr/bin/expect << EOD
+	spawn rsync -ar ${line} ${desthost}:${destpath}
+	expect "*?assword:*"
+	send "${password}\r"
+	expect eof
+	EOD
 
-好运 !! 如果你有任何疑问或者问题需要解答都可以在下面的评论框中写下来。让我们知道这对你的面试有所帮助:-)
+祝你好运 !! 如果你有任何疑问或者问题需要解答都可以在下面的评论框中写下来。让我们知道这对你的面试有所帮助:-)
 
 --------------------------------------------------------------------------------
 
@@ -392,7 +409,7 @@ via: http://linoxide.com/linux-shell-script/shell-scripting-interview-questions-
 
 作者:[Petras Liumparas][a]
 译者:[ictlyh](https://github.com/ictlyh)
-校对:[校对者ID](https://github.com/校对者ID)
+校对:[wxy](https://github.com/wxy)
 
 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
 

From 11d5fad50e5e7e4336a4392deb010cb1117da8fd Mon Sep 17 00:00:00 2001
From: wi-cuckoo 
Date: Thu, 11 Jun 2015 11:19:58 +0800
Subject: [PATCH 1128/2517] translated wi-cuckoo

---
 ...lobally Recognized Linux Certifications.md | 173 ------------------
 ...lobally Recognized Linux Certifications.md | 172 +++++++++++++++++
 2 files changed, 172 insertions(+), 173 deletions(-)
 delete mode 100644 sources/share/20150604 12 Globally Recognized Linux Certifications.md
 create mode 100644 translated/share/20150604 12 Globally Recognized Linux Certifications.md

diff --git a/sources/share/20150604 12 Globally Recognized Linux Certifications.md b/sources/share/20150604 12 Globally Recognized Linux Certifications.md
deleted file mode 100644
index 4ec185770b..0000000000
--- a/sources/share/20150604 12 Globally Recognized Linux Certifications.md	
+++ /dev/null
@@ -1,173 +0,0 @@
-translating wi-cuckoo
-12 Globally Recognized Linux Certifications
-================================================================================
-Hi everyone, today we'll learn about some of the very precious globally recognized Linux Certifications. Linux Certifications are the certification programme hosted by different Linux Professional Institutes across the globe. Linux Certifications allows Linux Professionals to get easily enrolled with the Linux related jobs in servers, companies, etc. Linux Certifications enables how much a person is expertise in that respective field of Linux. There are pretty many Linux Professional Institutes providing different Linux Certifications. But there are some few well recognized Linux Certification Programmes running across the globe which are at high priority while getting a job in companies where we need to manage servers, virtualizations, installations, configurations, application support and other stuffs with Linux Operating System. With the increment of servers running Linux Operating System throughout the globe, the demand of Linux Professional are increasing. For better authenticated and authorized Linux Professional, better and renowned Certifications are always at higher priority by the companies across the globe.
-
-Here are some globally recognized Linux Certifications that we'll discuss about.
-
-### 1. CompTIA Linux+ ###
-
-CompTIA Linux+ is a Linux Certification programme hosted by LPI "Linux Professional Institute" providing knowledge all over the world. It provides knowledge on Linux which enables to produce a bunch of Linux related Professional jobs like Linux Administrators, Junior Network Administrators, Systems Administrators, Linux Database Administrators and Web Administrators. If anyone is aware of installing and maintaining Linux Operating System, this course will help to meet the certification requirements and prepare for the exam by providing with a broad awareness of Linux operating systems. The main objective of CompTIA Linux+ Certification by LPI is to provide the certificate holders enough knowledge on a critical knowledge of installation, operation, administration and troubleshooting devices. We can earn three industry-recognized certifications for the cost, time, and effort of one, by completing the CompTIA Linux+ powered by LPI certification, we can automatically receive the **LPI LPIC-1** and the **SUSE Certified Linux Administrator (CLA)** certifications.
-
-- **Certification Codes** : LX0-103 and LX0-104 (launches March 30, 2015) OR  LX0-101 and LX0-102
-- Number of questions: 60 questions per exam
-- Type of Questions: Multiple choice
-- Length of test period: 90 minutes
-- Prerequisites: A+, Network+ and at least 12 months of Linux administration experience
-- Passing score: 500 (on a scale of 200-800)
-- Languages: English. Coming soon on German, Portuguese (Brazilian), Traditional Chinese, Spanish.
-- Validity: Valid till 3 Years after certified.
-
-**Note**: Exams from different series cannot be combined. If you start with LX0-101, you MUST take LX0-102 to complete your certification. The same applies for the LX0-103 and LX0-104 series. The LX0-103 and LX0-104 series is an update to the LX0-101 and LX0-102 series.
-
-### 2. LPIC ###
-
-LPIC stands for Linux Professional Institute Certification which is a Linux certification programme by Linux Professional Institute. It is a multi level certification program which requires passing of a number (usually two) certification exams for each level. There are three levels of certification which includes Junior Level Certification **LPIC-1**, Advanced Level Certification **LPIC-2** and Senior Level Certification **LPIC-3**. The first two certification aims on **Linux System Administration** whereas the final certification aims on several specialties including Virtualization and Security. To become **LPIC-3** certified, a candidate with an active **LPIC-1** and **LPIC-2** certification must pass at least one of 300 Mixed Environment, 303 Security and 304 Virtualization and High Availability.  LPIC-1 certification is designed in such a way that the certification holder will be able to install, maintain, configure tasks running Linux with command line interface with basic networking where as LPIC-2 certification validates candidate to administer small to medium–sized mixed networks. LPIC-3 certification is designed for enterprise-level Linux professional and represents the highest level of professional, distribution-neutral Linux certification within the industry.
-
-- **Certification Codes** : LPIC-1 (101 and 102), LPIC-2 (201 and 202) and LPIC-3 (300, 303 or 304)
-- Type of Questions: 60 Multiple choice questions
-- Length of Test Period: 90 minutes
-- Prerequisites: None, Linux Essentials is recommended
-- Passing Score: 500 (on a scale of 200-800)
-- Languages: LPIC-1: English, German, Italian, Portuguese (Brazilian), Spanish (Modern), Chinese (Simplified), Chinese (Traditional), Japanese
-- LPIC-2: English, German, Portuguese (Brazilian), Japanese
-- LPIC-3: English, Japanese
-- Validity: Valid till 5 years of Retirement.
-
-### 3. Oracle Linux OCA ###
-
-Oracle Certified Associate (OCA) is designed for the individuals who are interested for a strong foundation of knowledge to implement and administer the Oracle Linux Operating System. This certification expertise individuals on the Oracle Linux distribution that's fully optimized for Oracle products and for running on Oracle's engineered systems including Oracle Exadata Database Machine, Oracle Exalytics In-Memory Machine, Oracle Exalogic Elastic Cloud, and Oracle Database Appliance. Oracle Linux's Unbreakable Enterprise Kernel delivers extreme performance, advanced scalability and reliability for enterprise applications. The OCA certification covers objectives such as managing local disk devices, managing file systems, installing and removing Solaris packages and patches, performing system boot procedures and system processes. It is initial step in achievement of flagship of OCP credential. This certification was formerly known as Sun Certified Solaris Associate (SCSAS).
-
-- **Certification Codes** : OCA
-- Type of Questions: 75 Multiple choice questions
-- Length of Test Period: 120 minutes
-- Prerequisites: None
-- Passing Score: 64%
-- Validity: Never Expires
-
-### 4. Oracle Linux OCP ###
-
-Oracle Certified Professional (OCP) is the certification provided by Oracle Corporation for Oracle Linux which covers more advanced knowledge and skills of an Oracle Linux Administrator. It covers knowledge such as configuring network interfaces, managing swap configurations, crash dumps, managing applications, databases and core files. OCP certification is benchmark of technical expertise and professional skill needed for developing, implementing, and managing applications, middleware and databases widely in enterprise. Job opportunities for Oracle Linux OCP are increased depending on job market and economy. It is designed such a way that the certificate holder has the ability to perform security administration, prepare Oracle Linux system for Oracle database, troubleshoot problems and perform corrective action, install software packages, installing and configuring kernel modules, maintain swap space, perform User and Group administration, creating file systems, configuring logical volume manager (LVM), file sharing services and more.
-
-- **Certification Codes** : OCP
-- Type of Questions: 60 to 80 Multiple choice questions
-- Length of Test Period: 120 minutes
-- Prerequisites: Oracle Linux OCA
-- Passing Score: 64%
-- Validity: Never Expires
-
-### 5. RHCSA ###
-
-RHCSA is a certification programme by Red Hat Incorporation as Red Hat Certified System Administrator. RHCSAs are the person who has the skill, and ability to perform core system administrations in the renowned Red Hat Linux environments. It is an initial entry-level certification programme that focuses on actual competencies at system administration, including installation and configuration of a Red Hat Linux system and attaching it to a live network running network services. A Red Hat Certified System Administrator (RHCSA) is able to understand and use essential tools for handling files, directories, command-line environments, and documentation, operate running systems, including booting into different run levels, identifying processes, starting and stopping virtual machines, and controlling services, configure local storage using partitions and logical volumes, create and configure file systems and file system attributes, such as permissions, encryption, access control lists, and network file systemsm, deploy, configure, and maintain systems, including software installation, update, and core services, manage users and groups, including use of a centralized directory for authentication, security, including basic firewall and SELinux configuration. One should be RHCSA certified to gain RHCE and other certifications.
-
-- **Certification Codes** : RHCSA
-- Course Codes: RH124, RH134 and RH199
-- Exam Codes: EX200
-- Length of Test Period: 21-22 hours depending on the elective course choosen.
-- Prerequisites: None. Better if has some fundamental knowledge of Linux.
-- Passing Score: 210 out of 300 points (70%)
-- Validity: 3 years
-
-### 6. RHCE ###
-
-RHCE, also known as Red Hat Certified Engineer is a mid to advanced level certification programme for Red Hat Certified System Administrator (RHCSA) who wants to acquire additional skills and knowledge required of a senior system administrator responsible for Red Hat Enterprise Linux. RHCE has the ability, knowledge and skills of configuring static routes, packet filtering, and network address translation, setting kernel runtime parameters, configuring an Internet Small Computer System Interface (iSCSI) initiator, producing and delivering reports on system utilization, using shell scripting to automate system maintenance tasks, configuring system logging, including remote logging, system to provide networking services including HTTP/HTTPS, File Transfer Protocol (FTP), network file system (NFS), server message block (SMB), Simple Mail Transfer Protocol (SMTP), secure shell (SSH) and Network Time Protocol (NTP) and more. RHCSAs who wish to earn a more senior-level credential and who have completed System Administration I, II, and II, or who have completed the RHCE Rapid Track Course is recommended to go for RHCE certification.
-
-- **Certification Codes** : RHCE
-- Course Codes: RH124, RH134, RH254 and RH199
-- Exam Codes: EX200 and EX300
-- Length of Test Period: 21-22 hours depending on the elective course choosen.
-- Prerequisites: A RHCSA credential
-- Passing Score: 210 out of 300 (70%)
-- Validity: 3 years
-
-### 7. RHCA ###
-
-RHCA stands for Red Hat Certified Architect which is a certification programme by Red Hat Incorporation. It focuses on actual competencies at system administration, including installation and configuration of a Red Hat Linux system and attaching it to a live network running network services. RHCA is the highest level of certification of all the Red Hat Certifications. Candidates are required to choose the concentration they wish to focus on or can choose any combination of eligible Red Hat certifications to create a custom concentration of their own. There are three main concentration Datacenter, Cloud and Application Platform. RHCA with the concentration of Datacenter has the skills and ability to work, manage a datacenter whereas with the concentration of Cloud has the ability create, configure and manage private, hybrid clouds, cloud application platforms, flexible storage solutions using Red Hat Enterprise Linux Platform. RHCA with the concentration of Application Platform includes skills like installing, configuring and managing Red Hat JBoss Enterprise Application Platform and applications, cloud application platforms and hybrid cloud environments with OpenShift Enterprise by Red Hat and federating data from multiple sources using Red Hat JBoss Data Virtualization.
-
-- **Certification Codes** : RHCA
-- Course Codes: CL210,CL220,CL280, RH236, RH318,RH401,RH413, RH436,RH442,JB248 and JB450
-- Exam Codes: EX333, EX401, EX423 or EX318, EX436 and EX442
-- Length of Test Period: 21-22 hours depending on the elective course choosen.
-- Prerequisites: Active RHCE credential
-- Passing Score: 210 out of 300 (70%)
-- Validity: 3 years
-
-### 8. SUSE CLA ###
-
-SUSE Certified Linux Administrator (SUSE CLA) is a initialcertification by SUSE which focuses on daily administration tasks in SUSE Linux Enterprise Server environments. To gain SUSE CLA certification, it is not necessary to perform the course work, one has to pass the examination to get certified. SUSE CLA are capable and has skills to use Linux Desktop, locate and use help resources, manage Linux File System, work with the Linux Shell and Command Line, install SLE 11 SP22, manage system installation, hardware, backup and recovery, administer Linux with YaST, linux processes and services, storage, configure network, remote access, monitor SLE 11 SP2, automate tasks and manage user access and security. We can gain dual certificates of SUSE CLA and LPIC-1 and CompTIA Linux powered by LPI as SUSE, Linux Professional Institute and CompTIA have teamed up to offer you the chance to earn three Linux certifications.
-
-- **Certification Codes** : SUSE CLA
-- Course Codes: 3115, 3116
-- Exam Codes:  050-720, 050-710
-- Type of Questions: multiple choice exams
-- Length of Test Period: 90 minutes
-- Prerequisites: None
-- Passing Score: 512
-
-### 9. SUSE CLP ###
-
-SUSE Certified Linux Professional (CLP) is a certification programme for the one who is interested to gain more seniority and professionalism in SUSE Linux Enterprise Servers. SUSE CLP is the next step after receiving the SUSE CLA certificate. One should pass the examination and should have certification of CLA to gain the certification of CLP thought the candidate has passed the examination of CLP. SUSE CLP certified person has the skills and ability of installing and configuring SUSE Linux Enterprise Server 11 systems, maintaining the file system, managing softwarepackages, processes, printing, configuring fundamental network services, samba, web servers, using IPv6 and creating and running bash shell scripts.
-
-- **Certification Codes** : SUSE CLP
-- Course Codes: 3115, 3116 and 3117
-- Exam Codes: 050-721, 050-697
-- Type of Test: hands on
-- Length of Test Period: 180 minute practicum
-- Prerequisites: SUSE CLA Certified
-
-### 10. SUSE CLE ###
-
-SUSE Certified Linux Engineer (CLE) is an engineer level advanced certification for those candidates who have passed the examination of CLE. To acquire a CLE certificate, one should gain the certificates of SUSE CLA and SUSE CLP. The candidate gaining the CLE certification has the skills of architecting complex SUSE Linux Enterprise Server environments. CLE certified person has the skill to configure fundamental networking services, manage printing, configure and use Open LDAP, samba, web servers, IPv6, perform Health Check and Performance Tuning, create and execute Shell Scripts, deploy SUSE Linux Enterprise, virtualization with Xen and more.
-
-- **Certification Codes** : SUSE CLE
-- Course Codes: 3107
-- Exam Codes: 050-723
-- Type of Test: hands on
-- Length of Test Period: 120 minute practicum
-- Prerequisites: SUSE CLP 10 or 11 Certified
-
-### 11. LFCS ###
-
-Linux Foundation Certified System Admin (LFCS) certified candidates possesses knowledge on the use of Linux and using Linux with the terminal environment. LFCS is a certification programme by Linux Foundation for system administrators and engineers working with the Linux operating system. The Linux Foundation collaborated with industry experts and the Linux kernel community to identify the core domains and the critical skills, knowledge and abilities applicable for the certification. LFCS certified candidates has the skills, knowledge and ability of editing and manipulating text files on the command line, managing and troubleshooting File Systems and Storage, assembling partitions as LVM devices, configuring SWAP partitions, managing networked filesystems, managing user accounts, permissions and ownerships, maintaining security, creating and executing bash shell scripts, installing, upgrading, removing software packages and more.
-
-- **Certification Codes** : LFCS
-- Course Codes: LFS201, LFS220 (Optional)
-- Exam Codes: LFCS exam
-- Length of Test Period: 2 hours
-- Prerequisites: None.
-- Passing Score: 74%
-- Languages: English
-- Validity: 2 years
-
-### 12. LFCE ###
-
-Linux Foundation Certified Engineer (LFCE), a certification for Linux Engineers by Linux Foundation. LFCE certified candidates possesses a wider range of skills on Linux than LFCS. It is a engineer-level advanced certification programme. The LFCE certified candidates possesses skills and abilities of Network Administraton like configuring network services, configuring packet filtering, monitor network performance, IP traffics, configuring filesystems and file services, network filesystems, install, update packages from the repositories, managing network security, configuring iptables, http services, proxy servers, email servers and many more. It is believed that LFCE is pretty difficult to pass and study than LFCS as its advanced engineering level certification programme.
-
-- **Certification Codes** : LFCE
-- Course Codes: LFS230
-- Exam Codes: LFCE exam
-- Length of Test Period: 2 hours
-- Prerequisites: LFCS certified.
-- Passing Score: 72%
-- Languages: English
-- Validity: 2 years
-
-### Facts we found (This is only our views) ###
-
-Recent surveys conducted on different top recruitment agency,  says 80% of linux job profile preferred Redhat certification. If you are a student / newbie and want to learn linux then we prefer Linux Foundation Certifications as its getting much popular or CompTIA Linux would be also a choice. If you already know oracle or suse or working on their products then would prefer oracle / suse linux or if you working in an company these certification might enhance your career growth :-)
-
-### Conclusion ###
-
-There are thousands of big companies in this world running servers and mainframes running Linux Operating System, to handle, configure and work on those servers there is always a need of highly qualified and certified Linux Technical/Professional. These globally recognized Linux certificates has a big role of someones career in Linux. The companies around the world running Linux and wanting Linux Engineers, System Administrators and ethusiasts chooses one who has gained certificates and has good score in the related field of Linux. Globally recognized certifications are highly essential for excellence in the profession and career in Linux, so preparing best for the examination and getting the certification is a good choice for building career in Linux. If you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! :-)
-
---------------------------------------------------------------------------------
-
-via: http://linoxide.com/linux-how-to/12-globally-recognized-linux-certifications/
-
-作者:[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/share/20150604 12 Globally Recognized Linux Certifications.md b/translated/share/20150604 12 Globally Recognized Linux Certifications.md
new file mode 100644
index 0000000000..2be4e9df7d
--- /dev/null
+++ b/translated/share/20150604 12 Globally Recognized Linux Certifications.md	
@@ -0,0 +1,172 @@
+12个全球认可的Linux认证
+================================================================================
+大家好,今天我们将会认识一些非常有价值的全球认可的Linux认证。Linux认证是不同Linux专业机构在全球范围内进行的认证程序。Linux认证可以让Linux专业人才很容易获得Linux相关的工作,在服务器或者公司等等这些地方。Linux认证评估一个人在Linux的各个领域里的专业程度。有很多不错的Linux专业机构提供不同的Linux认证。但是全球仅有少数被十分认可的Linux认证,在公司谋取一份工作时含金量很高,这些工作包括管理服务器,虚拟化,安装系统与软件,配置程序,应用支持和其他Linux操作系统相关的东西。随着全球使用Linux操作系统的服务器的增长,拉动了对于Linux专业人才的需求。为了更好的证明Linux专业技术,公司进行的著名的认证一直有着更高的优先级,在全球看来。
+
+这里是一些全球认可的Linux认证,我们接下来将会一一讨论。
+
+### 1. CompTIA Linxu+ ###
+
+CompTIA Linux+ 是LPI“Linux Professional Institute”主办的一个Linux认证,在全世界范围内提供培训。其提供的Linux相关知识,使得产生了一大批Linux相关专业的工作,如Linux管理员,高级网络管理员,系统管理员,Linux数据库管理员和网页管理员。如果任何人想从事安装和维护Linux操作系统,该课程会帮助达到认证要求,并且通过提供对Linux系统更宽阔的认识,能够为考试做好准备。LPI的CompTIA Linux+认证的主要目的就是,提供给证书持有者足够扎实的知识,关于安装软件,操作,管理和设备排障的。我们可以用一定的费用,时间和努力,,完成CompTIA Linux+,赢得三个业内认可的证书,我们可以自动收到**LPI LPIC-1**和**SUSE Certified Linux Administrator (CLA)**证书。
+
+- ** 认证代码** : LX0-103和LX0-104 (2015年三月30日启动)或者LX0-101和LX0-102
+- 题目数量:一次考试60道题
+- 题目类型:多选
+- 考试时长:90分钟
+- 要求:A+,Network+,并且有至少12个月的Linux管理经历
+- 分数线:500 (对于200-800的范围来说)
+- 语言:英语,将来会有德语,葡萄牙语,汉语,西班牙。
+- 有效期:认证后三年有效
+
+**注意**:不同系列的考试不能交叉。如果你考的是LX0-101,那么你必须考LX0-102完成认证。同样的,你必须考完LX0-103和LX0-104。LX0-103和LX0-104是LX0-101和LX0-102的升级版。
+
+### 2. LPIC ###
+
+LPIC,全称Linux专业委员会认证,是Linux专业委员会的一个Linux认证程序。这是一个多层次的认证程序,要求在每个级别通过一系列(通常是两个)的认证考试。该认证有三个层次,包括初级水平认证 **LPIC-1** ,高级水平认证 **LPIC-2**和最高水平认证 **LPIC-3**。前两个认证侧重于 **Linux系统管理**,而最后一个认证侧重一些专业技能,包括虚拟化和安全。为了得到 **LPIC-3** 认证,一个持有 **LPIC-1** 与**LPIC-2** 的考生必须通过300复杂环境测试,303安全测试,304虚拟化测试和高可用性的其中一个。**LPIC-1**认证按照证书持有者可以通过运行Linux,使用命令行界面和基本的网络知识安装,维护,配置任务而设计,LPIC-2验证考生很少的管理知识,主要是中型混合网络方面。LPIC-3认证按照企业级别的Linux专业技能设计,代表了最高的专业水平(==最后这句不知道如何翻译==)
+
+- **认证代码**:LPIC-1(101和102),LPIC-2(201和202)和LPIC-3(300,303或者304)
+- 题目类型:60个多项选择
+- 考试时长:90分钟
+- 要求:Linux基础
+- 分数线:500(在200-800的范围内)
+- 语言:LPIC-1:英语,德语,意大利语,葡萄牙语,西班牙语(现代),汉语(简体),汉语(繁体),日语
+- LPIC-2:英语,德语,葡萄牙语,日语
+- LPIC-3:英语,日语
+- 有效期:退休之后五年内仍然有效
+
+### 3.Oracle Linux OCA ###
+
+Oracle联合认证(OCA)为个人而定制,那些对部署和管理Oracle Linux操作系统且想证明知识牢固感兴趣的人。该认证专业知识仅仅是在Oracle Linux发行版上,这个系统完全是为Oracle产品特别剪裁的,为了运行在Oracle设计的系统上面,包括Oracle Exadata数据库机器,Oracle Exalytics 内存中机器,Oracle Exalogic 均衡云,和Oracle数据库应用。Oracle Linux稳定的企业级内核对于企业应用表现突出,高扩展性和稳定性。OCA认证覆盖如管理本地磁盘设备,文件系统,安装和移除Solaris包与补丁,协调系统启动过程和系统进程方面。这是达到OCP证书佼佼者的第一步。OCA认证以其前身为Sun Certified Solaris Associate(SCSAS)而为人所知。
+
+- **认证代码**:OCA
+- 题目类型:75道多项选择
+- 考试时长:120分钟
+- 要求:无
+- 分数线:64%
+- 有效期:永远有效
+
+### 4. Oracle Linux OCP ###
+
+Oracle Certified Professional(OCP),时Oracle公司为Oracle Linux提供的一个认证,覆盖更多的进阶知识和技能,对于一个Oracle Linux管理员来说。它囊括的知识有配置网络接口,映射交换配置,清理垃圾,管理软件、数据库和核心文件。OCP认证是技术性专业知识和专业技能的基准测试,这些知识与技能需要在公司里广泛用于开发,部署和管理应用,中间设备和数据库。Oracle Linux OCP的工作机会在增长,得益于工作市场和经济。根据考试纲领,证书持有者有能力胜任安全管理,为Oracle 数据库准备Oracle Linux系统,排除故障,安装软件包,安装和配置内核模块,维护交换空间,完成用户和组管理,创建文件系统,配置逻辑卷管理(LVM)、文件分享服务等等。
+
+- **认证代码**:OCP
+- 题目类型:60至80道多项选择题
+- 考试时长:120分钟
+- 要求:Oracle Linux OCA
+- 分数线:64%
+- 有效期:永远有效
+
+### 5. RHCSA ###
+
+RHCSA是红帽公司作为红帽认证系统工程师推出的一个认证程序。RHCSAs指一些拥有技能和能力在著名的红帽Linux环境下完成核心系统管理的人。这是一个入门级的认证程序,关注在系统管理上的实际胜任能力,包括安装、配置一个红帽Linux系统,接入一个可用的网络运行网络服务。一个红帽认证的系统管理员可以理解和使用基本的工具,用以处理文件,目录,命令行环境和文档,操作运行中的系统,包括以不同的启动级别启动,标记进程,开启和停止虚拟机和控制服务,使用分区和逻辑卷配置本地存储,部署配置和维护系统,包括软件安装、更新和核心服务,管理用户和组,包括使用一个中心的目录用于验证,安全性工作,包括基本的基本防火墙和SELinux配置。要获得RHCE和其他认证,首先得认证过RHCSA。
+
+- **认证代码**:RHCSA
+- 课程代码:RH124,RH134和RH199
+- 考试代码:EX200
+- 考试时长:21-22小时,取决于选择的课程
+- 要求:无。有一些Linux基础知识更好
+- 分数线:300总分,210过(70%)
+- 有效期:3年
+
+### 6. RHCE ###
+
+RHCE,也叫做红帽认证工程师,是一个中到高级水平的认证程序,为一些红帽认证系统管理员(RHCSA),想学习一个负责红帽企业Linux的高级系统管理员要求的额外技能和知识而开设的,RHCE有能力,知识和技能配置静态的路由,包过滤,网络地址转换(NAT),设定内核运行参数,配置一个互联网小型计算机系统接口(ISCSI)初始化程序,产生并推送系统使用的报告,使用shell脚本自动完成系统维护任务,配置系统登入,包括远程登录,提供网络服务如HTTP/HTTPS,文件传输协议(FTP),网络文件系统(NFS),服务信息块(SMB),简单邮件传输协议(SMTP),安全shell(SSH)和网络时间协议(NTP)等等。RHCSAs希望获得更多高级水平的认证,并且已经完成系统管理员I,II和III,或者RHCE认证建议的RHCE快速跟进课程。
+
+- **认证代码**:RHCE
+- 课程代码:RH124,RH134,RH254和RH199
+- 考试代码:EX200和EX300
+- 考试时长:21-22个小时,取决于所选课程
+- 要求:一个RHCSA证书
+- 分数线:300总分,210过(70%)
+- 有效期:3年
+
+### 7. RHCA ###
+
+RHCA就是红帽认证架构师,是红帽公司的一个认证程序。它的关注点在系统管理的实际能力,包括安装和配置一个红帽Linux系统,并加入到一个可用网络中运行网络服务。RHCA是所有红帽认证中最高水平的认证。考生需要选择他们希望关注的集合,或者选择合格的红帽认证的任意组合,以此来创建一个他们自己的集合。这里有三个主要的集合,数据中心,云和应用平台。精通数据中心集合的RHCA能够运行,管理数据中心,而熟悉云的可以创建,配置和管理私有的,混合的云,云应用平台以及使用红帽企业Linux平台的灵活存储方案。精通应用平台集合的RHCA拥有技能如安装,配置和管理红帽JBoss企业应用平台和应用,云应用平台和混合云环境,借助红帽的OpenShift企业版,使用红帽JBoss数据虚拟化技术从多个资源里组合数据。
+
+- **认证代码**:RHCA
+- 课程代码:CL210,CL220.CL280,RH236,RH318,RH413,RH436,RH442,JB248和JB450
+- 考试代码:EX333,EX401,EX423或者EX318,EX436和EX442
+- 考试时长:21-22个小时,取决于所选课程
+- 要求:未过期的RHCE证书
+- 分数线:300总分,210过(70%)
+- 有效期:3年
+
+### 8. SUSE CLA ###
+
+SUSE认证Linux管理员(SUSE CLA)是SUSE推出的一个初级认证,关注点在SUSE Linux企业服务器环境下的日常任务管理。为了获得SUSE CLA认证,完成课程任务不是必须的,你不得不通过考试获得认证。SUSE CLA有能力,也有技术去使用Linux桌面,定位并利用帮助资源,管理Linux文件系统,用Linux Shell和命令行工作,安装SLE 11 SP22,管理系统安装,硬件,备份和恢复,用YaST管理Linux,Linux进程和服务,存储,配置网络,远程接入,SLE 11 SP2模拟器,任务自动化和管理用户访问和安全工作。我们可以同时获得LPI的SUSE CLA,LPIC-1和CompTIA Linux,因为SUSE,Linux Professional Institute和CompATI合作提供给你这个机会,去获得三个Linux认证。
+
+- **认证代码**:SUSE CLA
+- 课程代码:3115,3116
+- 考试代码:050-720,050-710
+- 问题类型:多项选择
+- 考试时长:90分钟
+- 要求:无
+- 分数线:512
+
+### 9. SUSE CLP ###
+
+SUSE认证Linux专业人员(CLP)是一个认证程序,为那些希望获得关于SUSE Linux企业服务器更多高级且专业的知识的人而服务。SUSE CLP是通过SUSE CLA认证后的下一步。一个人应该通过CLA的考试并拥有证书,然后才能获得CLP的认证,通过完成CLP的考试。通过SUSE CLP认证的人员有能力完成安装和配置SUSE Linux企业服务器11系统,维护文件系统,管理软件包,进程,打印,使用IPv6配置基础网络服务,samba,网页服务器,创建和运行bash shell脚本。
+
+- **认证代码**:SUSE CLP
+- 课程代码:3115,3116和3117
+- 考试代码:050-721,050-697
+- 考试类型:手写
+- 考试时长:180分钟
+- 要求:SUSE CLA 认证
+
+### 10. SUSE CLE ###
+
+SUSE认证Linux工程师(CLE)是一个工程师级别的高级认证,为那些已经通过CLE考试的人准备。为了获得CLE认证,人们需要获得SUSE CLA和CLP的认证。获得CLE认证的人员拥有架设复杂SUSE Linux企业服务器环境的技能。CLE认证过的人可以配置基本的网络服务,管理打印,配置和使用Open LDAP,samba,IPv6,完成健康检测和(这里不知道),创建和执行shell脚本,部署SUSE Linux企业板,通过Xen实现虚拟化等等。
+
+- **认证代码**:SUSE CLE
+- 课程代码:3107
+- 考试代码:050-723
+- 考试类型:手写
+- 考试时长:120分钟
+- 要求:SUSE CLP 10或者11证书
+
+### 11. LFCS ###
+
+Linux基金会认证系统管理员(LFCS)认证考生Linux使用中拥有的知识和通过终端环境使用Linux。LFCS是Linux基金会的一个认证程序,为使用Linux操作系统工作的系统管理员和工程师准备。Linux基金会联合工业级专家,Linux内核社区,测试考生扎实的技能,知识和应用能力。通过LFCS认证的人员拥有一些技能,知识和能力,包括在命令行下编辑和操作文件,管理和处理文件系统与存储的错误,聚合分区作为LVM设备,配置SWAP分区,管理网络文件系统,管理用户帐号,权限和属组,创建并执行bash shell脚本,安装,升级,移除软件包等等。
+
+- **认证代码**:LFCS
+- 课程代码:LFCS201,LFCS220(可选)
+- 考试代码:LFCS 考试
+- 考试时长:2小时
+- 要求:无
+- 分数线:74%
+- 语言:英语
+- 有效期:两年
+
+### 12. LFCE ###
+
+Linux基金会认证工程师(LFCE),是Linux基金会为Linux工程师推出的认证。通过LFCE认证的人员拥有一个对于Linux较宽范围的技能,相比于LFCS。这是一个工程师级别的高级认证程序。LFCE认证的人具备一些网络管理方面的技能和能力,如配置网络服务,包过滤,网络运行模拟器,IP连通,配置文件系统和文件服务,网络文件系统,从仓库安装,升级软件包,管理网络安全,配置iptables,http服务,代理服务,邮件服务等等。由于其为高级工程级别的认证程序,所以普遍认为相比LFCS,学习和通过的难度更大些。
+
+- **认证代码**:LFCE
+- 课程代码:LFS230
+- 考试代码:LFCE 考试
+- 考试时长:2小时
+- 要求:认证过LFCS
+- 分数线:72%
+- 语言:英语
+- 有效期:2年
+
+### 我们发现的情况(这仅仅是我们的观点)###
+
+最近的调查表明,在不同的高端招聘代理中,称80%的Linux工作描述更倾向于红帽的认证。如果你是一个学生/新手,并且想学习Linux,那么我们建议选择越来越流行的Linux基金会认证,或者CompTIA Linux也可以是一个选择。如果你已经知道了oracle或suse,或者在他们的产品上工作,那oracle/suse的认证会更好些,如果你在一个公司工作了,这些认证会对你的职业生涯成长有帮助:-)
+
+### 总结 ###
+
+在这个世界上,成千上万的大公司正在运行跑着Linux操作系统的服务器和主框架,为了在这些服务器上管理,配置和工作,总是存在对Linux技术/专业知识高度认证的需求。这些国际上承认的认证对某些人在Linux的职业生涯扮演很重要的角色。全世界范围内的这些公司运行着Linux,需要Linux工程师,系统管理员和已经获得认证且在Linux相关领域干得不错的有热情的人员。全球认可的Linux认证,对于专业知识和职业生涯的辉煌都是很基础的,所以好好准备考试并获得认证,对于在Linux建立职业生涯是一个很好的选择。如果你有任何问题,想法,反馈,请写在下方的评论框里,让我们好知道哪些东西需要添加或者改进。谢谢!:-)
+
+--------------------------------------------------------------------------------
+
+via: http://linoxide.com/linux-how-to/12-globally-recognized-linux-certifications/
+
+作者:[Arun Pyasi][a]
+译者:[译者ID](https://github.com/wi-cuckoo)
+校对:[校对者ID](https://github.com/校对者ID)
+
+本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
+
+[a]:http://linoxide.com/author/arunp/

From 660cf367aa2bb66458f163ac4aa21ec95cd215ec Mon Sep 17 00:00:00 2001
From: sevenot 
Date: Thu, 11 Jun 2015 12:49:10 +0800
Subject: [PATCH 1129/2517] sevenot translated

---
 ...nts in 2014--download the Annual Report.md | 34 ----------
 ...nts in 2014--download the Annual Report.md | 66 +++++++++++++++++++
 2 files changed, 66 insertions(+), 34 deletions(-)
 delete mode 100644 sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md
 create mode 100644 translated/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md

diff --git a/sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md b/sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md
deleted file mode 100644
index 28b0a76083..0000000000
--- a/sources/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md	
+++ /dev/null
@@ -1,34 +0,0 @@
-sevenot translating
-Read about The Document Foundation achievements in 2014: download the Annual Report! 
-================================================================================
-![](https://documentfoundation.files.wordpress.com/2015/06/tdf-report.jpg)
-
-TDF ReportThe Document Foundation (TDF) is proud to announce its 2014 Annual Report, which can be downloaded from the following link: [http://tdf.io/report2014][1] (3.2 MB PDF). The version with HD images can be downloaded from [http://tdf.io/report2014hq][2] (15.9 MB PDF).
-
-TDF Annual Report starts with a Review of 2014, with highlights about TDF and LibreOffice, and a summary of financials and budget.
-
-Community, Projects & Events covers the LibreOffice Conference 2014 in Bern, Certification, Website and QA, Hackfests in Brussels, Gran Canaria, Paris, Boston and Tolouse, Native-Language Projects, Infrastructure, Documentation, Marketing and Design.
-
-Software, Development & Code reports about the activities of the Engineering Steering Committee, LibreOffice Development, the Document Liberation Project and LibreOffice on Android.
-
-The last section focuses on People, starting with Top Contributors, followed by TDF Staff, the Board of Directors and the Membership Committee, the Board of Trustees, or the body of TDF Members, and the Advisory Board.
-
-TDF 2014 Annual Report has been edited by Sophie Gautier, Alexander Werner, Christian Lohmaier, Florian Effenberger, Italo Vignoli and Robinson Tryon, and designed by Barak Paz, with the help of the fantastic LibreOffice community.
-
-To allow the widest distribution of the document, this is released with a CC BY 3.0 DE License, unless otherwise noted, to TDF Members and free software advocates worldwide.
-
-[The German version of TDF Annual Report is available from [http://tdf.io/bericht2014][3]].
-
---------------------------------------------------------------------------------
-
-via: http://blog.documentfoundation.org/2015/06/03/read-about-the-document-foundation-achievements-in-2014-download-the-annual-report/
-
-作者:italovignoli
-译者:[译者ID](https://github.com/译者ID)
-校对:[校对者ID](https://github.com/校对者ID)
-
-本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
-
-[1]:https://wiki.documentfoundation.org/File:TDF2014AnnualReport.pdf
-[2]:https://wiki.documentfoundation.org/File:TDF2014AnnualReportHQ.pdf
-[3]:https://wiki.documentfoundation.org/File:TDF2014AnnualReportDE.pdf
\ No newline at end of file
diff --git a/translated/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md b/translated/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md
new file mode 100644
index 0000000000..de309b6994
--- /dev/null
+++ b/translated/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md	
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+Thu Jun 11 12:41:59 2015
+
+AbiWord
+Thu Jun 11 11:14:11 2015
+
+application/x-abiword
+
+
+
+
+
+
+
+
+
+
+
+
+

sevenot translated

+

下载年度报告,了解The Document Foundation2014年的成果

+

================================================================================

+

![](https://documentfoundation.files.wordpress.com/2015/06/tdf-report.jpg)

+

+

+

TDF ReportThe Document Foundation (TDF)郑重地发布了2014年度报告,你可以点击这里下载: [http://tdf.io/report2014][1] (3.2 MB PDF)。高清质量的可以点击这里下载 [http://tdf.io/report2014hq][2] (15.9 MB PDF)。

+

+

TDF年度报告中,以回顾2014年开始了这篇报告,其中包括了TDF和LibreOffice的精彩集锦,并且总结了财务情况和预算。

+

+

该报告涉及到项目和活动的会议包括:2014年在伯尔尼的LibreOffice大会,在布鲁塞尔、大加那利岛、巴黎、波士顿和土鲁斯的认证项目,网站与质量保证,Hackfests项目,本土语言项目,基础设施,文档项目,市场设计与营销。

+

+

该报告涉及到的软件开发活动和代码包括:工程指导委员会的活动,LibreOffice的开发,文档解放项目,LibreOffice的安卓移植。

+

+

报告的最后一部分则把焦点对准了那些做出了极大贡献的人们,他们是TDF的工作人员,董事会成员,委员会成员,委托组织成员,TDF的核心成员和咨询委员会成员。

+

+

TDF 2014年度报告的编辑工作由Sophie Gautier, Alexander Werner, Christian Lohmaier, Florian Effenberger, Italo Vignoli 和 Robinson Tryon完成,由Barak Paz设计样式,Libreoffice社区协助完成。

+

+

+

为了使该文档分布达到最大程度的分布,采用了CC3 认证发布,除非特殊标注,TDF成员和自由软件基金会拥有其所有权。

+

[德语版年度报告下载请点击[http://tdf.io/bericht2014][3]].

+

+

--------------------------------------------------------------------------------

+

+

via: http://blog.documentfoundation.org/2015/06/03/read-about-the-document-foundation-achievements-in-2014-download-the-annual-report/

+

+

作者:italovignoli

+

译者:[sevenot(https://github.com/sevenot)

+

校对:[校对者ID](https://github.com/校对者ID)

+

+

本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出

+

+

[1]:https://wiki.documentfoundation.org/File:TDF2014AnnualReport.pdf

+

[2]:https://wiki.documentfoundation.org/File:TDF2014AnnualReportHQ.pdf

+

[3]:https://wiki.documentfoundation.org/File:TDF2014AnnualReportDE.pdf

+
+
From 954e63a85dd68a3f570298b506bac53ec959c555 Mon Sep 17 00:00:00 2001 From: sevenot Date: Thu, 11 Jun 2015 12:56:27 +0800 Subject: [PATCH 1130/2517] sevenot translated --- ...nts in 2014--download the Annual Report.md | 99 +++++++------------ 1 file changed, 34 insertions(+), 65 deletions(-) diff --git a/translated/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md b/translated/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md index de309b6994..678abbb6fd 100644 --- a/translated/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md +++ b/translated/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md @@ -1,66 +1,35 @@ - - - - - - - - - +sevenot translated +下载年度报告,了解The Document Foundation2014年的成果 +================================================================================ +![](https://documentfoundation.files.wordpress.com/2015/06/tdf-report.jpg) - -Thu Jun 11 12:41:59 2015 - -AbiWord -Thu Jun 11 11:14:11 2015 - -application/x-abiword - - - - - - - - - - - -
-

sevenot translated

-

下载年度报告,了解The Document Foundation2014年的成果

-

================================================================================

-

![](https://documentfoundation.files.wordpress.com/2015/06/tdf-report.jpg)

-

-

-

TDF ReportThe Document Foundation (TDF)郑重地发布了2014年度报告,你可以点击这里下载: [http://tdf.io/report2014][1] (3.2 MB PDF)。高清质量的可以点击这里下载 [http://tdf.io/report2014hq][2] (15.9 MB PDF)。

-

-

TDF年度报告中,以回顾2014年开始了这篇报告,其中包括了TDF和LibreOffice的精彩集锦,并且总结了财务情况和预算。

-

-

该报告涉及到项目和活动的会议包括:2014年在伯尔尼的LibreOffice大会,在布鲁塞尔、大加那利岛、巴黎、波士顿和土鲁斯的认证项目,网站与质量保证,Hackfests项目,本土语言项目,基础设施,文档项目,市场设计与营销。

-

-

该报告涉及到的软件开发活动和代码包括:工程指导委员会的活动,LibreOffice的开发,文档解放项目,LibreOffice的安卓移植。

-

-

报告的最后一部分则把焦点对准了那些做出了极大贡献的人们,他们是TDF的工作人员,董事会成员,委员会成员,委托组织成员,TDF的核心成员和咨询委员会成员。

-

-

TDF 2014年度报告的编辑工作由Sophie Gautier, Alexander Werner, Christian Lohmaier, Florian Effenberger, Italo Vignoli 和 Robinson Tryon完成,由Barak Paz设计样式,Libreoffice社区协助完成。

-

-

-

为了使该文档分布达到最大程度的分布,采用了CC3 认证发布,除非特殊标注,TDF成员和自由软件基金会拥有其所有权。

-

[德语版年度报告下载请点击[http://tdf.io/bericht2014][3]].

-

-

--------------------------------------------------------------------------------

-

-

via: http://blog.documentfoundation.org/2015/06/03/read-about-the-document-foundation-achievements-in-2014-download-the-annual-report/

-

-

作者:italovignoli

-

译者:[sevenot(https://github.com/sevenot)

-

校对:[校对者ID](https://github.com/校对者ID)

-

-

本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出

-

-

[1]:https://wiki.documentfoundation.org/File:TDF2014AnnualReport.pdf

-

[2]:https://wiki.documentfoundation.org/File:TDF2014AnnualReportHQ.pdf

-

[3]:https://wiki.documentfoundation.org/File:TDF2014AnnualReportDE.pdf

-
-
+ +TDF ReportThe Document Foundation (TDF)郑重地发布了2014年度报告,你可以点击这里下载: [http://tdf.io/report2014][1] (3.2 MB PDF)。高清质量的可以点击这里下载 [http://tdf.io/report2014hq][2] (15.9 MB PDF)。 + +TDF年度报告中,以回顾2014年开始了这篇报告,其中包括了TDF和LibreOffice的精彩集锦,并且总结了财务情况和预算。 + +该报告涉及到项目和活动的会议包括:2014年在伯尔尼的LibreOffice大会,在布鲁塞尔、大加那利岛、巴黎、波士顿和土鲁斯的认证项目,网站与质量保证,Hackfests项目,本土语言项目,基础设施,文档项目,市场设计与营销。 + +该报告涉及到的软件开发活动和代码包括:工程指导委员会的活动,LibreOffice的开发,文档解放项目,LibreOffice的安卓移植。 + +报告的最后一部分则把焦点对准了那些做出了极大贡献的人们,他们是TDF的工作人员,董事会成员,委员会成员,委托组织成员,TDF的核心成员和咨询委员会成员。 + +TDF 2014年度报告的编辑工作由Sophie Gautier, Alexander Werner, Christian Lohmaier, Florian Effenberger, Italo Vignoli 和 Robinson Tryon完成,由Barak Paz设计样式,Libreoffice社区协助完成。 + + +为了使该文档分布达到最大程度的分布,采用了CC3 认证发布,除非特殊标注,TDF成员和自由软件基金会拥有其所有权。 +[德语版年度报告下载请点击[http://tdf.io/bericht2014][3]]. + +-------------------------------------------------------------------------------- + +via: http://blog.documentfoundation.org/2015/06/03/read-about-the-document-foundation-achievements-in-2014-download-the-annual-report/ + +作者:italovignoli +译者:[sevenot](https://github.com/sevenot) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://wiki.documentfoundation.org/File:TDF2014AnnualReport.pdf +[2]:https://wiki.documentfoundation.org/File:TDF2014AnnualReportHQ.pdf +[3]:https://wiki.documentfoundation.org/File:TDF2014AnnualReportDE.pdf \ No newline at end of file From 75b5b2a55e5f1ba3495734483d7bec62d2e18472 Mon Sep 17 00:00:00 2001 From: KS Date: Thu, 11 Jun 2015 13:57:41 +0800 Subject: [PATCH 1131/2517] =?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 --- ...hopping Store Using 'OpenCart' in Linux.md | 224 ++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 translated/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md diff --git a/translated/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md b/translated/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md new file mode 100644 index 0000000000..e506f76f7c --- /dev/null +++ b/translated/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md @@ -0,0 +1,224 @@ +如何在linux中用“OpenCart”创建自己的在线商店 +================================================================================ +在网络世界我们用电脑做所有事情。用电子设备完成的商务也叫电子商务即是其中之一。电子商务并不是什么新鲜事,它起源于早期的阿帕网,阿帕网用来安排麻省理工学院和斯坦福大学人工智能实验室学生之间的拍卖。 + +最近出现了上百家电子商务网站也就是, Flipcart, eBay, Alibaba, Zappos, IndiaMART, Amazon, 等等。你想制作自己的亚马逊和Flipcart这样基于web的应用程序服务器吗?如果是!这个文章正适合你。 + +Opencart是一个免费开源的使用PHP语言的电子商务程序,它可以用来开发一个购物车系统类似于亚马逊和Flipcart。如果你想在线卖你的产品或想在关门时为你的客户提供服务Opencart是给你准备的。你可以使用可靠和专业Opencart应用程序建立一个成功的网上商店(网上商家)。 + +### OpenCart 网页面板演示 ### + +- 商店前端 – [http://demo.opencart.com/][1] +- 管理登陆 – [http://demo.opencart.com/admin/][2] + + ------------------ 管理 登陆 ------------------ + 用户名: demo + 密码: demo + +#### Opencart的特点 #### + +Opencart是一个符合所有在线商家需求的应用程序。您可以使用它的所有特性(见下文)制作自己的电子商务网站。 + +- 它是一个免费的(如啤酒)和开源(如言论)应用GNU GPL许可下发布。 +- 一切都是有据可查的,意味着你不需到要谷歌喊救命。 +- 自由生活的时间支持和更新。 +- 无限数量的类别、产品和制造商的支持。 +- 一切都是基于模板的。 +- 支持多语言和多币种。它确保你的产品遍及全球。 +- 内置产品评论和评级功能。 +- 可下载的产品(即电子书)支持 +- 自动调整图像的支持。 +- 功能,如多税率(如各种国家),查看相关产品,资料页,装船重量计算,使用折扣优惠券,等等是默认实现的。 +- 内置的备份和恢复工具。 +- 实施搜索引擎优化。 +- 发票打印,也支持错误日志和销售报告。 + +#### 系统需求 #### + +- Web 服务器 (Apache HTTP服务器的首选) +- PHP (5.2 或以上). +- 数据库 (首选MySQL但是我用MariaDB). + +#### PHP需要的库和模块 #### + +这些扩展必须在您的系统上安装并启用确保web服务器上安装Opencart正确 + +- Curl +- Zip +- Zlib +- GD Library +- Mcrypt +- Mbstrings + +### 第一步: 安装 Apache, PHP 和 MariaDB ### + +1. 像我说的,OpenCart需要一定的技术要求比如在系统上安装Apache,PHP扩展和数据库(MySQL或MariaDB),为了运行Opencart正常。 + +让我们使用命令行安装Apache,PHP和MariaDB。 + +**安装 Apache** + + # apt-get install apache2 (在基于Debian系统上) + # yum install httpd (在基于RedHat系统上) + +**安装 PHP and Extensions** + + # apt-get install php5 libapache2-mod-php5 php5-curl php5-mcrypt (在基于Debian系统上) + # yum install php php-mysql php5-curl php5-mcrypt (在基于RedHat系统上) + +**安装 MariaDB** + + # apt-get install mariadb-server mariadb-client (在基于Debian系统上) + # yum install mariadb-server mariadb (在基于RedHat系统上) + +2. 在安装所有需要上面的东西后, you can start the Apache and MariaDB services using following commands. + + ------------------- 在基于Debian系统上 ------------------- + # systemctl restart apache2.service + # systemctl restart mariadb.service + + + ------------------- 在基于RedHat系统上 ------------------- + # systemctl restart httpd.service + # systemctl restart mariadb.service + +### 第二步: 下载和设置 OpenCart ### + +3. 最新版本的OpenCart(2.0.2.0)可以从[OpenCart website][3]或直接从github获得。 + +作为一种选择,你可以使用wget命令直接从github库下载最新版本的OpenCart,如下所示。 + + # wget https://github.com/opencart/opencart/archive/master.zip + +4. 下载压缩文件后,拷贝到Apache工作目录下(例如/var/www/html)然后解压缩master.zip文件。 + + # cp master.zip /var/www/html/ + # cd /var/www/html + # unzip master.zip + +5. 提取‘master.zip’文件后,切换到提取目录下然后移动upload目录到应用程序的根文件夹(opencart-master) + + # cd opencart-master + # mv -v upload/* ../opencart-master/ + +6. 现在需要重命名或复制OpenCart配置文件如下所示。 + + # cp /var/www/html/opencart-master/admin/config-dist.php /var/www/html/opencart-master/admin/config.php + # cp /var/www/html/opencart-master/config-dist.php /var/www/html/opencart-master/config.php + +7. 下一步,设置/var/www/html/opencart-master的文件和文件夹正确的权限。您需要提供RWX权限给文件和文件夹,用递归方式。 + + # chmod 777 -R /var/www/html/opencart-master + +**重要**: 设置权限777可能是危险的,所以一旦你完成所有设置,递归恢复755权限到上层的文件夹。 + +### 第三步: 创建 OpenCart 数据库 ### + +8. 下一步是创建一个数据库(例如opencartdb)电子商务网站数据库来存储数据。连接到数据库服务器并创建一个数据库,用户和正确的权限授予用户完全控制数据库。 + + # mysql -u root -p + CREATE DATABASE opencartdb; + CREATE USER 'opencartuser'@'localhost' IDENTIFIED BY 'mypassword'; + GRANT ALL PRIVILEDGES ON opencartdb.* TO 'opencartuser'@'localhost' IDENTIFIED by 'mypassword'; + +### 第四步: OpenCart 网站安装 ### + +9. 一旦所有设置正确,到web浏览器地址栏输入`http://`访问OpenCart web安装。 + +点击“继续”,同意许可证协议。 + +![Accept OpenCart License](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-License.png) + +同意OpenCart许可证 + +10. 下一个屏幕是安装前检查服务器设置,查看服务器所需的所有模块安装正确并且有OpenCart文件的权限。 + +如果有红色标志突出显示#1或#2,这意味着你需要在服务器上正确安装这些组件满足web服务器的要求。 + +如果有红色标志突出显示#3或#4,这意味着你的文件有问题。如果一切正确配置您应该看到所有绿色标志是可见的(见下面),你可以按“继续”。 + +![Server Requirement Check](http://www.tecmint.com/wp-content/uploads/2015/05/Server-Checkup.png) + +服务器需求检查 + +11. 在下一个屏幕上输入数据库证书如数据库驱动程序,主机名、用户名、密码、数据库。你不应该改动数据库端口和前缀,除非你知道你在做什么。 + +另外输入管理员账号的用户名,密码和邮箱地址。注意这些凭据将用于root登录到Opencart管理面板,所以保证它的安全。完成后单击继续! + +![OpenCart Database Details](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Database.png) + +OpenCart数据库详情 + +12. 下一个屏幕显示的信息如“Installation Complete”与“Ready to Start Selling”为结束行。还警告说,删除安装目录,所有需要这个目录安装的设置已经完成。 + +![OpenCart Installation Completes](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Installation-Completes.png) + +OpenCart安装完成 + +删除安装目录,你可以执行下面的命令。 + + # rm -rf /var/www/html/opencart-master/install + +### 第四步: 进入OpenCart页管理 ### + +13. 现在打开浏览器到`http:///opencart-master/`然后你会看到类似下面的截屏。 + +![OpenCart Product Showcase](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart.jpg) + +OpenCart产品示例 + +14. 为了登陆到Opencart管理面板,你需要浏览http:///opencart-master/admin然后填写通行证,同时设置它启动。 + +![OpenCart Admin Login](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Admin-Login.png) + +OpenCart管理登陆 + +15. 如果全部OK你应该可以看到Opencart的控制台。 + +![OpenCart Dashboard](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Dashboard.png) + +OpenCart控制台 + +在管理控制台可以建立很多选项如类别,产品选择,制造商、下载、评论,信息,扩展安装,运输,付款选项,订单总数、礼品券、贝宝、优惠券、子公司、营销、邮件、设计和设置,错误日志,内置分析等等。 + +#### 测试工具之后? #### + +如果您已经测试了应用程序和发现它可定制,灵活,坚如磐石,易于维护和使用,您可能需要一个好的主机托管提供商托管OpenCart应用,保持在线24 x7的支持。尽管有很多选项,我们建议Hostgator主机提供商。(广告硬植-.-!) + +Hostgator是以服务和特性出名的域名注册和虚拟机托管提供商。它为你提供无限的磁盘空间,无限带宽,易于安装(一键安装脚本),99.9%的正常运行时间,荣获24x7x365技术支持和45天退款保证,这意味着如果你不喜欢这个产品和服务在45天内拿回你的采购费,注意这45天是一个长的测试时间。 + +所以如果你有什么想卖的你可以自由做它(我的意思是自由,想到你会花在获得物理存储成本,然后比较其与虚拟商店建立成本。你会觉得它的自由)。 + +**注**: 当你从Hostgator购买虚拟主机(和/或域名)你将获得一个**25%折扣**。这只提供给Tecmint网站的读者。 + +你所要做的就是在购买虚拟机支付时输入优惠码“**TecMint025**”。付款预览截屏优惠码以供参考用。 + +![Hostgator 25% Discount - TecMint025](http://www.tecmint.com/wp-content/uploads/2015/05/Hostgator-Discount-Code.png) + +[Sign up for Hostgator][4] (折扣码: TecMint025) + +**注**: 还值得一提的,每个你从Hostgator购买的虚拟机托管OpenCart,我们将得到少量的佣金,只是为了保持Tecmint存活 (通过支付带宽和托管服务器)。 + +所以如果你使用上面的代码买它,你得到折扣,我们会得到少量收入。还要注意,你不会支付任何额外的,事实上你支付的账单总额将减少25%。 + +### 总结 ### + +OpenCart是一个开箱可用的应用。它易于安装,您可以选择选择最适合的模板,添加你的产品然后你就成为了一个在线店主。 + +很多社区的扩展(免费和付费)使它丰富。这是一个美妙的应用为那些想要建立一个保持24X7小时用户可访问的虚拟商店。让我知道你的应用程序的经验。欢迎任何建议和反馈。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-e-commerce-online-shopping-store-using-opencart-in-linux/ + +作者:[Avishek Kumar][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://demo.opencart.com/ +[2]:http://demo.opencart.com/admin/ +[3]:http://www.opencart.com/index.php?route=download/download/ +[4]:http://secure.hostgator.com/%7Eaffiliat/cgi-bin/affiliates/clickthru.cgi?id=tecmint From 40f692373ad058da8febb3ebfd43044a7623a1f0 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 11 Jun 2015 14:06:53 +0800 Subject: [PATCH 1132/2517] PUB:20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands @wwy-hust --- ...of Symbol or Operator in Linux Commands.md | 214 ++++++++++++++++++ ...of Symbol or Operator in Linux Commands.md | 193 ---------------- 2 files changed, 214 insertions(+), 193 deletions(-) create mode 100644 published/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md delete mode 100644 translated/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md diff --git a/published/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md b/published/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md new file mode 100644 index 0000000000..e647b452c7 --- /dev/null +++ b/published/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md @@ -0,0 +1,214 @@ +在Linux命令行下令人惊叹的惊叹号(!) +================================================================================ +`'!'`符号在Linux中不但可以用作否定符号,还可以用来从历史命令记录中取出命令或不加修改的执行之前运行的命令。下面的所有命令都已经在Bash Shell中经过确切地检验。尽管我没有试过,但大多都不能在别的Shell中运行。这里我们介绍下Linux命令行中符号`'!'`那惊人和奇妙的用法。 + +### 1. 使用数字从历史命令列表中找一条命令来执行 ### + +您也许没有意识到您可以从历史命令列表(之前已经执行的命令集)中找出一条来运行。首先,通过"history"命令查找之前命令的序号。 + + $ history + +![使用history命令找到最后执行的命令](http://www.tecmint.com/wp-content/uploads/2015/05/history-Command.gif) + +*使用history命令找到最后执行的命令* + +现在,只需要使用历史命令输出中显示在该命令前面的数字便可以运行这个命令。例如,运行一个在`history`输出中编号是1551的命令。 + + $ !1551 + +![使用命令ID来执行最后运行的命令](http://www.tecmint.com/wp-content/uploads/2015/05/Run-Commands-By-number.gif) + +*使用命令ID来执行最后运行的命令* + +这样,编号为1551的命令(上面的例子是[top命令][1])便运行了。这种通过ID号来执行之前的命令的方式很有用,尤其是在这些命令都很长的情况下。您只需要使用**![history命令输出的序号]**便可以调用它。 + +### 2. 运行之前的倒数第二个、第七个命令等 ### + +您可以以另一种方式来运行之前执行的命令,通过使用-1代表最后的命令,-2代表倒数第二个命令,-7代表倒数第七个命令等。 + +首先使用history命令来获得执行过的命令的列表。**history命令的执行很有必要**,因为您可以通过它来确保没有`rm command > file`或其他会导致危险的命令。接下来执行倒数第六个、第八个、第十个命令。 + + $ history + $ !-6 + $ !-8 + $ !-10 + +![通过负数序号运行之前执行的命令](http://www.tecmint.com/wp-content/uploads/2015/05/3.gif) + +*通过负数序号运行之前执行的命令* + +### 3. 传递最后执行的命令的参数,以方便的运行新的命令 ### + +我需要显示`/home/$USER/Binary/firefox`文件夹的内容,因此我执行: + + $ ls /home/$USER/Binary/firefox + +接下来,我意识到我应该执行'ls -l'来查看哪个文件是可执行文件。因此我应该重新输入整个命令么?不,我不需要。我仅需要在新的命令中带上最后的参数,类似: + + $ ls -l !$ + +这里`!$`将把最后执行的命令的参数传递到这个新的命令中。 + +![将上一个命令的参数传递给新命令](http://www.tecmint.com/wp-content/uploads/2015/05/4.gif) + +*将上一个命令的参数传递给新命令* + +### 4. 如何使用!来处理两个或更多的参数 ### + +比如说我在桌面创建了一个文本文件file1.txt。 + + $ touch /home/avi/Desktop/1.txt + +然后在cp命令中使用绝对路径将它拷贝到`/home/avi/Downloads`。 + + $ cp /home/avi/Desktop/1.txt /home/avi/downloads + +这里,我们给cp命令传递了两个参数。第一个是`/home/avi/Desktop/1.txt`,第二个是`/home/avi/Downloads`。让我们分别处理他们,使用`echo [参数]`来打印两个不同的参数。 + + $ echo "1st Argument is : !^" + $ echo "2nd Argument is : !cp:2" + +注意第一个参数可以使用`"!^"`进行打印,其余的命令可以通过`"![命令名]:[参数编号]"`打印。 + +在上面的例子中,第一个命令是`cp`,第二个参数也需要被打印。因此是`"!cp:2"`,如果任何命令比如xyz运行时有5个参数,而您需要获得第四个参数,您可以使用`"!xyz:4"`。所有的参数都可以通过`"!*"`来获得。 + +![处理两个或更多的参数](http://www.tecmint.com/wp-content/uploads/2015/05/5.gif) + +*处理两个或更多的参数* + +### 5. 以关键字为基础执行上个的命令 ### + +我们可以以关键字为基础执行上次执行的命令。可以从下面的例子中理解: + + $ ls /home > /dev/null [命令1] + $ ls -l /home/avi/Desktop > /dev/null [命令2] + $ ls -la /home/avi/Downloads > /dev/null [命令3] + $ ls -lA /usr/bin > /dev/null [命令4] + +上面我们使用了同样的命令(ls),但有不同的开关和不同的操作文件夹。而且,我们还将输出传递到`/dev/null`,我们并未显示输出,因而终端依旧很干净。 + +现在以关键字为基础执行上个的命令。 + + $ ! ls [命令1] + $ ! ls -l [命令2] + $ ! ls -la [命令3] + $ ! ls -lA [命令4] + +检查输出,您将惊奇发现您仅仅使用关键字`ls`便执行了您已经执行过的命令。 + +![以关键字为基础执行命令](http://www.tecmint.com/wp-content/uploads/2015/05/6.gif) + +*以关键字为基础执行命令* + +(LCTT 译注:澄清一下,这种用法会按照命令名来找到最后匹配的命令,不会匹配参数。所以上述执行的四个命令都是执行了 `ls -lA /usr/bin > /dev/null`,并增加了新的参数而已。) + +### 6. !!操作符的威力 ### + +您可以使用`(!!)`运行/修改您上个运行的命令。它将附带一些修改/调整并调用上个命令。让我给您展示一些实际情境。 + +昨天我运行了一行脚本来获得我的私有IP,因此我执行了: + + $ ip addr show | grep inet | grep -v 'inet6'| grep -v '127.0.0.1' | awk '{print $2}' | cut -f1 -d/ + +接着,我突然发现我需要将上面脚本的输出重定向到一个ip.txt的文件,因此,我该怎么办呢?我该重新输入整个命令并重定向到一个文件么?一个简单的解决方案是使用向上光标键并添加`'> ip.txt'`来将输出重定向到文件。 + + $ ip addr show | grep inet | grep -v 'inet6'| grep -v '127.0.0.1' | awk '{print $2}' | cut -f1 -d/ > ip.txt + +在这里要感谢救世主"向上光标键"。现在,考虑下面的情况,这次我运行了下面这一行脚本。 + + $ ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: + +一旦我运行了这个脚本,Bash提示符便返回了错误消息`"bash: ifconfig: command not found"`。原因并不难猜,我运行了本应以root权限的运行的命令。 + +所以,怎么解决呢?以root用户登录并且再次键入整个命令就太麻烦了!而且向上导航键也不管用了(LCTT 译注:当你以新的用户身份登录了,是不能用向上光标键找到之前的另外一个用户的命令历史的)。因此,我们需要调用`"!!"`(去掉引号),它将为那个用户调用上个命令。 + + $ su -c !! root + +这里su是用来切换到root用户的,`-c`用来以某用户运行特定的命令,最重要的部分是`!!`,它将被替换为上次运行的命令。当然!您需要提供root密码。 + +![!!操作符的威力](http://www.tecmint.com/wp-content/uploads/2015/05/7.gif) + +*!!操作符的威力* + +我通常在下面的情景中使用`!!`。 + +当我用普通用户来运行apt-get,我通常收到提示说我没有权限来执行。 + + $ apt-get upgrade && apt-get dist-upgrade + +好吧,有错误。但别担心,使用下面的命令来成功的执行... + + $ su -c !! + +同样的适用于: + + $ service apache2 start + +或 + + $ /etc/init.d/apache2 start + +或 + + $ systemctl start apache2 + +普通用户不被授权执行那些任务,这样相当于我运行: + + $ su -c 'service apache2 start' + +或 + + $ su -c '/etc/init.d/apache2 start' + +或 + + $ su -c 'systemctl start apache2' + +(LCTT 译注:使用`!!`之前,一定要确认你执行的是什么命令!另外,在 root 身份下,千万不要养成使用它的习惯,因为你总是会在不合适的目录执行不合适的命令!) + +### 7.运行一个影响所有除了![FILE_NAME]的文件命令 ### + +`!`(逻辑非)能用来对除了`'!'`后的文件的所有的文件/扩展名执行命令。 + +A.从文件夹移除所有文件,2.txt除外。 + + $ rm !(2.txt) + +B.从文件夹移除所有的文件类型,pdf类型除外。 + + $ rm !(*.pdf) + +### 8.检查某个文件夹(比如/home/avi/Tecmint)是否存在?并打印 ### + +这里,我们使用`'! -d'`来验证文件夹是否存在,当文件夹不存在时,将使用其后跟随AND操作符`(&&)`进行打印,当文件夹存在时,将使用OR操作符`(||)`进行打印。 + +逻辑上,当`[ ! -d /home/avi/Tecmint ]`的输出为0时,它将执行AND逻辑符后面的内容,否则,它将执行OR逻辑符`(||)`后面的内容。 + + $ [ ! -d /home/avi/Tecmint ] && printf '\nno such /home/avi/Tecmint directory exist\n' || printf '\n/home/avi/Tecmint directory exist\n' + +### 9.检查某文件夹是否存在?如果不存在则退出该命令 ### + +类似于上面的情况,但这里当期望的文件夹不存在时,该命令会退出。 + + $ [ ! -d /home/avi/Tecmint ] && exit + +### 10.如果您的home文件夹内不存在一个文件夹(比方说test),则创建它 ### + +这是脚本语言中的一个常用的实现,当期望的文件夹不存在时,创建一个。 + + [ ! -d /home/avi/Tecmint ] && mkdir /home/avi/Tecmint + +这便是全部了。如果您知道或偶尔遇到其他值得了解的`'!'`使用方法,请您在反馈的地方给我们提建议。保持联系! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/mysterious-uses-of-symbol-or-operator-in-linux-commands/ + +作者:[Avishek Kumar][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/12-top-command-examples-in-linux/ diff --git a/translated/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md b/translated/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md deleted file mode 100644 index 4225cf9bb4..0000000000 --- a/translated/tech/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md +++ /dev/null @@ -1,193 +0,0 @@ -10!Linux¾˺÷ -================================================================================ -`'!'`Linuxв񶨷ţʷ¼ȡ򲻼޸ĵִ֮ǰеѾBash Shellоȷеؼ顣ûԹ඼ڱShellСǽLinuxз`'!'`Ǿ˺÷ - -### 1. ʹִʷбһִ ### - -ҲûʶԴʷб֮ǰѾִеҳһСȣͨ"history"֮ǰš - - $ history - -![ʹhistoryҵִе](http://www.tecmint.com/wp-content/uploads/2015/05/history-Command.gif) - -ڣֻҪʹʷʾڸǰֱ磬һ`history`б1551 - - $ !1551 - -![ʹIDִе](http://www.tecmint.com/wp-content/uploads/2015/05/Run-Commands-By-number.gif) - -Ϊ1551[top][1]ˡͨIDִ֮ǰķʽãЩܳ¡ֻҪʹ**![history]**Ե - -### 2. ֮ǰĵڶ߸ ### - -һַʽ֮ǰִеͨʹ-1-2ڶ-7߸ȡ - -ʹhistoryִйбhistoryִкбҪΪͨȷû`rm command > file`ᵼΣյִеڰ˸ʮ - - $ history - $ !-6 - $ !-8 - $ !-10 - -![֮ͨǰִе](http://www.tecmint.com/wp-content/uploads/2015/05/3.gif) -֮ͨǰִе - -### 3. ݲԷµ ### - -Ҫʾ`/home/$USER/Binary/firefox`ļеݣִУ - - $ ls /home/$USER/Binary/firefox - -ʶӦִ'ls -l'鿴ĸļǿִļӦôҲҪҽҪµдIJƣ - - $ ls -l !$ - -`!$`ִеIJݵµС - -![һIJݸ](http://www.tecmint.com/wp-content/uploads/2015/05/4.gif) -һIJݸ - -### 4. ʹ!IJ ### - -˵洴һıļfile1.txt - - $ touch /home/avi/Desktop/1.txt - -Ȼcpʹþ·`/home/avi/Downloads` - - $ cp /home/avi/Desktop/1.txt /home/avi/downloads - -ڣǸcpһ`/home/avi/Desktop/1.txt`ڶ`/home/avi/Downloads`Ƿֱǣʹ`echo [arguments]`ӡͬIJ - - $ echo "1st Argument is : !^" - $ echo "2nd Argument is : !cp:2" - -עһʹ`"!^"`дӡͨ`"![]:[]"`ӡ - -Уһ`cp`ڶҲҪӡ`"!cp:2"`κxyzʱ5Ҫõĸʹ`"!xyz:4"`еIJͨ`"!*"`á - -![IJ](http://www.tecmint.com/wp-content/uploads/2015/05/5.gif) -IJ - -### 5. ԹؼΪִϸ ### - -ǿԹؼΪִϴִеԴ⣺ - - $ ls /home > /dev/null [1] - $ ls -l /home/avi/Desktop > /dev/null [2] - $ ls -la /home/avi/Downloads > /dev/null [3] - $ ls -lA /usr/bin > /dev/null [4] - -ʹͬlsвͬĿغͲͬIJļСңǻݵ`/dev/null`Dzδնɺܸɾ - -ԹؼΪִϸ - - $ ! ls [1] - $ ! ls -l [2] - $ ! ls -la [3] - $ ! ls -lA [4] - -淢ʹùؼ`ls`ִѾִй - -![ԹؼΪִ](http://www.tecmint.com/wp-content/uploads/2015/05/6.gif) -ԹؼΪִ - -### 6. !! ### - -ʹ`(!!)`/޸ϸеһЩ޸/ϸҸչʾһЩʵ龳 - -һнűҵ˽IPִˣ - - $ ip addr show | grep inet | grep -v 'inet6'| grep -v '127.0.0.1' | awk '{print $2}' | cut -f1 -d/ - -ţͻȻҪűضһip.txtļˣҸôأҸضһļôһ򵥵Ľʹϵ`'> ip.txt'`ضļ - - $ ip addr show | grep inet | grep -v 'inet6'| grep -v '127.0.0.1' | awk '{print $2}' | cut -f1 -d/ > ip.txt - -л"ϵ"ڣһнű - - $ ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: - -һűBashʾ㷵˴Ϣ`"bash: ifconfig: command not found"`ԭ򲢲Ѳ£˱ӦrootȨ޵е - -ԣôأǺrootû¼ٴμϵҲˡˣҪ`"!!"`ȥţΪǸûϸ - - $ su -c "!!" root - -suлrootûģ`-c`ijûضҪIJ`!!`滻ΪϴеԵģҪṩroot롣 - -![!!](http://www.tecmint.com/wp-content/uploads/2015/05/7.gif) -!! - -ͨ龰ʹ`!!` - -1.ͨûapt-getͨյʾ˵ûȨִС - - $ apt-get upgrade && apt-get dist-upgrade - -ðɣд󡣵ģʹɹִ... - - $ su -c !! - -ͬڣ - - $ service apache2 start - - $ /etc/init.d/apache2 start - - $ systemctl start apache2 - -ͨûȨִЩУ - - $ su -c 'service apache2 start' - - $ su -c '/etc/init.d/apache2 start' - - $ su -c 'systemctl start apache2' - -### 7.һӰг![FILE_NAME]ļ ### - -`!`߼ǣԳ`'!'`ļеļ/չִ - -A.ļƳļ2.txt⡣ - - $ rm !(2.txt) - -B.ļƳеļͣpdfͳ⡣ - - $ rm !(*.pdf) - -### 8.ijļУ/home/avi/TecmintǷڣӡ ### - -ʹ`'! -d'`֤ļǷڣļвʱʹAND`(&&)`дӡļдʱʹOR`(||)`дӡ - -߼ϣ`[ ! -d /home/avi/Tecmint ]`Ϊ0ʱִAND߼ݣִOR߼`(||)`ݡ - - $ [ ! -d /home/avi/Tecmint ] && printf '\nno such /home/avi/Tecmint directory exist\n' || printf '\n/home/avi/Tecmint directory exist\n' - -### 9.ijļǷڣ˳ ### - -ﵱļвʱ˳ - - $ [ ! -d /home/avi/Tecmint ] && exit - -### 10.homeļڲһļУȷ˵test򴴽 ### - -ǽűеһõʵ֣ļвʱһ - - [ ! -d /home/avi/Tecmint ] && mkdir /home/avi/Tecmint - -ȫˡ֪żֵ˽`'!'`ʹ÷ڷĵطὨ顣ϵ - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/mysterious-uses-of-symbol-or-operator-in-linux-commands/ - -ߣ[Avishek Kumar][a] -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/12-top-command-examples-in-linux/ From 975930de11954ad1ee4c0bfb9363dcfd660f22ce Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Thu, 11 Jun 2015 14:13:11 +0800 Subject: [PATCH 1133/2517] translating --- sources/tech/20150610 How to secure your Linux server.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150610 How to secure your Linux server.md b/sources/tech/20150610 How to secure your Linux server.md index 1668dae934..51246cbfcb 100644 --- a/sources/tech/20150610 How to secure your Linux server.md +++ b/sources/tech/20150610 How to secure your Linux server.md @@ -1,3 +1,4 @@ +[translating by KayGuoWhu] How to secure your Linux server ================================================================================ > A server is made up of so many different components that makes it hard to offer one solution for everyone's needs. This articles tries to cover some useful tips and tricks to help you keep your server and users protected. From 3e0051983a2f51ffb51fdbd37da7004a50bdec4b Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Thu, 11 Jun 2015 14:24:41 +0800 Subject: [PATCH 1134/2517] translating wi-cuckoo --- sources/share/20150527 3 Open Source Python Shells.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150527 3 Open Source Python Shells.md b/sources/share/20150527 3 Open Source Python Shells.md index c510096670..65102bd1bc 100644 --- a/sources/share/20150527 3 Open Source Python Shells.md +++ b/sources/share/20150527 3 Open Source Python Shells.md @@ -1,3 +1,4 @@ +translating wi-cuckoo 3 Open Source Python Shells ================================================================================ Python is a high-level, general-purpose, structured, powerful, open source programming language that is used for a wide variety of programming tasks. It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl, avoiding many of the complexities and overheads of compiled languages. The language was created by Guido van Rossum in 1991, and continues to grow in popularity. @@ -96,4 +97,4 @@ via: http://www.linuxlinks.com/article/20150523032756576/PythonShells.html [1]:http://www.bpython-interpreter.org/ [2]:http://ipython.org/ -[3]:http://www.dreampie.org/ \ No newline at end of file +[3]:http://www.dreampie.org/ From f453d731320e5be89e8b7e791c8810d970fe1162 Mon Sep 17 00:00:00 2001 From: KS Date: Thu, 11 Jun 2015 14:31:19 +0800 Subject: [PATCH 1135/2517] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...hopping Store Using 'OpenCart' in Linux.md | 226 ------------------ 1 file changed, 226 deletions(-) delete mode 100644 sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md diff --git a/sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md b/sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md deleted file mode 100644 index 39db75746a..0000000000 --- a/sources/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md +++ /dev/null @@ -1,226 +0,0 @@ -wyangsun翻译中 -How to Create Own Online Shopping Store Using “OpenCart” in Linux -================================================================================ -In the Internet world we are doing everything using a computer. Electronic Commerce aka e-commerce is one one of them. E-Commerce is nothing new and it started in the early days of ARPANET, where ARPANET used to arrange sale between students of Massachusetts Institute of Technology and Stanford Artificial Intelligence Laboratory. - -These days there are some 100’s of E-Commerce site viz., Flipcart, eBay, Alibaba, Zappos, IndiaMART, Amazon, etc. Have you thought of making your own Amazon and Flipcart like web-based Application Server? If yes! This article is for you. - -Opencart is a free and open source E-Commerce Application written in PHP, which can be used to develop a shopping cart system similar to Amazon and Flipcart. If you want to sell your products online or want to serve your customers even when you are closed Opencart is for you. You can build a successful online store (for online merchants) using reliable and professional Opencart Application. - -### OpenCart Web Panel Demo ### - -- Store Front – [http://demo.opencart.com/][1] -- Admin Login – [http://demo.opencart.com/admin/][2] - - ------------------ Admin Login ------------------ - Username: demo - Password: demo - -#### Features of Opencart #### - -Opencart is an application that meets all the requirements of an online merchant. It has all the features (see below) using which you can make your own E-Commerce Website. - -- It is a Free (as in beer) and Open Source (as in speech) Application released under GNU GPL License. -- Everything is well documented, means you don’t need to Google and shout for help. -- Free Life time support and updates. -- Unlimited number of categories, Products and manufacturer supported. -- Everything is Template based. -- Multi-Language and Multi-Currency Supported. It ensures your product gets a global reach. -- Built-in Product Review and Rating Features. -- Downloadable Products (viz., ebook) supported. -- Automatic Image Resizing supported. -- Features like Multi tax Rates (as in various country), Viewing Related Products, Information Page, Shipping Weight Calculation, Availing Discount Coupons, etc are well implemented by default. -- Built-in Backup and Restore tools. -- Well implemented SEO. -- Invoice Printing, Error Log and sales report are supported as well. - -#### System Requirements #### - -- Web Server (Apache HTTP Server Preferred) -- PHP (5.2 and above). -- Database (MySQLi Preferred but I am using MariaDB). - -#### Required PHP Libraries and Modules #### - -These extensions must be installed and enabled on your system to install Opencart properly on the web server. - -- Curl -- Zip -- Zlib -- GD Library -- Mcrypt -- Mbstrings - -### Step 1: Installing Apache, PHP and MariaDB ### - -1. As I said, OpenCart requires certain technical requirements such as Apache, PHP with extensions and Database (MySQL or MariaDB) to be installed on the system, in order to run Opencart properly. - -Let’s install Apache, PHP and MariaDB using following Command. - -**Install Apache** - - # apt-get install apache2 (On Debian based Systems) - # yum install httpd (On RedHat based Systems) - -**Install PHP and Extensions** - - # apt-get install php5 libapache2-mod-php5 php5-curl php5-mcrypt (On Debian based Systems) - # yum install php php-mysql php5-curl php5-mcrypt (On RedHat based Systems) - -**Install MariaDB** - - # apt-get install mariadb-server mariadb-client (On Debian based Systems) - # yum install mariadb-server mariadb (On RedHat based Systems) - -2. After installing all the above required things, you can start the Apache and MariaDB services using following commands. - - ------------------- On Debian based Systems ------------------- - # systemctl restart apache2.service - # systemctl restart mariadb.service - ----------- - - ------------------- On RedHat based Systems ------------------- - # systemctl restart httpd.service - # systemctl restart mariadb.service - -### Step 2: Downloading and Setting OpenCart ### - -3. The most recent version of OpenCart (2.0.2.0) can be obtained from [OpenCart website][3] or directly from github. - -Alternatively, you may use following wget command to download the latest version of OpenCart directly from github repository as shown below. - - # wget https://github.com/opencart/opencart/archive/master.zip - -4. After downloading zip file, copy to Apache Working directory (i.e. /var/www/html) and unzip the master.zip file. - - # cp master.zip /var/www/html/ - # cd /var/www/html - # unzip master.zip - -5. After extracting ‘master.zip‘ file, cd to extracted directory and move the content of upload directory to the root of the application folder (opencart-master). - - # cd opencart-master - # mv -v upload/* ../opencart-master/ - -6. Now you need to rename or copy OpenCart configuration files as shown below. - - # cp /var/www/html/opencart-master/admin/config-dist.php /var/www/html/opencart-master/admin/config.php - # cp /var/www/html/opencart-master/config-dist.php /var/www/html/opencart-master/config.php - -7. Next, set correct Permissions to the files and folders of /var/www/html/opencart-master. You need to provide RWX permission to all the files and folders there, recursively. - - # chmod 777 -R /var/www/html/opencart-master - -**Important**: Setting permission 777 may be dangerous, so as soon as you finish setting up everything, revert back to permission 755 recursively on the above folder. - -### Step 3: Creating OpenCart Database ### - -8. Next step is to create a database (say opencartdb) for the E-Commerce site to store data on the database. Connect to databaser server and create a database, user and grant correct privileges on the user to have full control over the database. - - # mysql -u root -p - CREATE DATABASE opencartdb; - CREATE USER 'opencartuser'@'localhost' IDENTIFIED BY 'mypassword'; - GRANT ALL PRIVILEDGES ON opencartdb.* TO 'opencartuser'@'localhost' IDENTIFIED by 'mypassword'; - -### Step 4: OpenCart Web Installation ### - -9. Once everything set correctly, navigate to the web browser and type `http://` to access the OpenCart web installation. - -Click ‘CONTINUE‘ to Agree the License Agreement. - -![Accept OpenCart License](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-License.png) - -Accept OpenCart License - -10. The next screen is Pre-installation Server Setup Check, to see that the server has all the required modules are installed properly and have correct permission on the OpenCart files. - -If any red marks are highlighted on #1 or #2, that means you need to install those components properly on the server to meet web server requirements. - -If there are any red marks on #3 or #4, that means there is issue with your files. If everything is correctly configured you should see all green marks are visible (as seen below), you may press “Continue“. - -![Server Requirement Check](http://www.tecmint.com/wp-content/uploads/2015/05/Server-Checkup.png) - -Server Requirement Check - -11. On the next screen enter your Database Credentials like Database Driver, Hostname, User-name, Password, database. You should not touch db_port and Prefix, until and unless you know what you are doing. - -Also Enter User_name, Password and Email Address for Administrative account. Note these credentials will be used for logging in to Opencart Admin Panel as root, so keep it safe. Click continue when done! - -![OpenCart Database Details](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Database.png) - -OpenCart Database Details - -12. The next screen shows message like “Installation Complete” with the Tag Line Ready to Start Selling. Also it warns to delete the installation directory, as everything required to setup using this directory has been accomplished. - -![OpenCart Installation Completes](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Installation-Completes.png) - -OpenCart Installation Completes - -To Remove install directory, you may like to run the below command. - - # rm -rf /var/www/html/opencart-master/install - -### Step 4: Access OpenCart Web and Admin ### - -13. Now point your browser to `http:///opencart-master/` and you would see something like the below screenshot. - -![OpenCart Product Showcase](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart.jpg) - -OpenCart Product Showcase - -14. In order to login to Opencart Admin Panel, point your browser to http:///opencart-master/admin and fill the Admin Credentials you input, while setting it up. - -![OpenCart Admin Login](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Admin-Login.png) - -OpenCart Admin Login - -15. If everything ok! You should be able to see the Admin Dashboard of Opencart. - -![OpenCart Dashboard](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Dashboard.png) - -OpenCart Dashboard - -Here in Admin Dashboard you may set up a lots of options like categories, product, options, Manufacturers, Downloads, Review, Information, Extension Installer, Shipping, Payment options, order totals, gift voucher, Paypal, Coupons, Affiliates, marketing, mails, Design and Settings, Error logs, in-built analytics and what not. - -#### What after testing the tools? #### - -If you have already tested the Application and finds it customizable, flexible, Rock Solid, Easy to maintain and use, you may need a good hosting provider to host OpenCart application, that remains live 24X7 support. Though there are a lot of options for hosting providers we recommend Hostgator. - -Hostgator is a Domain Registrant and Hosting Provider that is very well known for the service and feature it provides. It Provides you with UNLIMITED Disk Space, UNLIMITED Bandwidth, Easy to install (1-click install script), 99.9% Uptime, Award winning 24x7x365 Technical Support and 45 days money back guarantee, which means if you didn’t like the product and service you get your money back within 45 days of purchasing and mind it 45 days is a long time to Test. - -So if you have something to sell you can do it for free (by free I mean, Think of the cost you would spend on getting a physical store and then compare it with virtual store setting-up cost. You will feel its free). - -**Note**: When you buy hosting (and/or Domain) from Hostgator you will get a **Flat 25% OFF**. This offer is valid only for the readers of Tecmint Site. - -All you have to do is to Enter Promocode “**TecMint025**” during the payment of hosting. For reference see the preview of payment screen with promo code. - -![Hostgator 25% Discount - TecMint025](http://www.tecmint.com/wp-content/uploads/2015/05/Hostgator-Discount-Code.png) - -[Sign up for Hostgator][4] (Coupon code: TecMint025) - -**Note**: Also worth mentioning, that for each hosting you buy from Hostgator to host OpenCart, we will get a small amount of commission, just to keep Tecmint Live (by Paying Bandwidth and hosting charges of server). - -So If you buy it using the above code, you get discount and we will get a small amount. Also note that you won’t pay anything extra, infact you will be paying 25% less on total bill. - -### Conclusion ### - -OpenCart is an application that performs out-of-the box. It is easy to install and you have the option to choose best suited templates, add your products and you become an online merchant. - -A lots of community made extensions(free and paid) makes it rich. It is a wonderful application for those who want to setup a virtual store and remain accessible to their customer 24X7. Let me know yours experience with the application. Any suggestion and feedback is welcome as well. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-e-commerce-online-shopping-store-using-opencart-in-linux/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://demo.opencart.com/ -[2]:http://demo.opencart.com/admin/ -[3]:http://www.opencart.com/index.php?route=download/download/ -[4]:http://secure.hostgator.com/%7Eaffiliat/cgi-bin/affiliates/clickthru.cgi?id=tecmint From 1fd642f5a94c97c450fcf984f3f4c9df971ed553 Mon Sep 17 00:00:00 2001 From: NearTan Date: Thu, 11 Jun 2015 14:40:06 +0800 Subject: [PATCH 1136/2517] translated --- ...irectionally from Command Line Using 'Speedtest-CLI' Tool.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md b/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md index a0c77c21f9..45372c86fd 100644 --- a/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md +++ b/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md @@ -1,3 +1,5 @@ +translating by NearTan + How to Test Your Internet Speed Bidirectionally from Command Line Using ‘Speedtest-CLI’ Tool ================================================================================ We always need to check the speed of the Internet connection at home and office. What we do for this? Go to websites like Speedtest.net and begin test. It loads JavaScript in the web browser and then select best server based upon ping and output the result. It also uses a Flash player to produce graphical results. From ea056f5703a2e9e68db505fa144fc8565fd0e23f Mon Sep 17 00:00:00 2001 From: NearTan Date: Thu, 11 Jun 2015 14:41:10 +0800 Subject: [PATCH 1137/2517] translating --- ...irectionally from Command Line Using 'Speedtest-CLI' Tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md b/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md index 45372c86fd..601a89151d 100644 --- a/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md +++ b/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md @@ -1,4 +1,4 @@ -translating by NearTan +translating by NearTan How to Test Your Internet Speed Bidirectionally from Command Line Using ‘Speedtest-CLI’ Tool ================================================================================ From ebdc92f3840ad4e29976dbac5a6193001880b30e Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 11 Jun 2015 15:24:45 +0800 Subject: [PATCH 1138/2517] PUB:20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wyangsun https://linux.cn/article-5609-1.html 翻译的不错,有些细节需要校对。另外必要时,应该将英文习惯的倒装语句换成中文习惯。 --- ...hopping Store Using 'OpenCart' in Linux.md | 226 ++++++++++++++++++ ...hopping Store Using 'OpenCart' in Linux.md | 224 ----------------- 2 files changed, 226 insertions(+), 224 deletions(-) create mode 100644 published/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md delete mode 100644 translated/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md diff --git a/published/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md b/published/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md new file mode 100644 index 0000000000..e726ca1100 --- /dev/null +++ b/published/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md @@ -0,0 +1,226 @@ +如何在linux中用“OpenCart”创建自己的在线商店 +================================================================================ +在网络世界我们可以用电脑做所有事情,电子商务(e-commerce)即是其中之一。电子商务并不是什么新鲜事,它起源于早期的阿帕网,当时就出现了麻省理工学院和斯坦福大学人工智能实验室的学生之间的交易。 + +近些年出现了上百家电子商务网站,如 Flipcart, eBay, Alibaba, Zappos, IndiaMART, Amazon, 等等。你想做一个自己的亚马逊和Flipcart这样的基于web的应用程序服务器吗?如果是!这个文章正适合你。 + +Opencart是一个免费开源的使用PHP语言编写的电子商务程序,它可以用来架设一个类似于亚马逊和Flipcart的购物车系统。如果你想在线卖你的产品或想在关门时为你的客户提供服务,Opencart就是给你准备的。你可以使用可靠和专业Opencart应用程序建立一个成功的网上商店(网上商家)。 + +### OpenCart 网页面板演示 ### + +- 商店前端 – [http://demo.opencart.com/][1] +- 管理登录 – [http://demo.opencart.com/admin/][2] + +-- + ------------------ 管理登录 ------------------ + + 用户名: demo + 密码: demo + +#### Opencart的特点 #### + +Opencart是一个符合所有在线商家需求的应用程序。它具备您用来制作自己的电子商务网站的所有特性(见下文)。 + +- 它是一个免费(如啤酒般免费)而开源(如言论般自由)的应用,在GNU GPL许可下发布。 +- 每个东西都有完善的文档,你不需要到谷歌喊救命。 +- 任意时间的支持和更新。 +- 支持无限数量的类别、产品和制造商。 +- 一切都是基于模板的。 +- 支持多语言和多币种。它确保你的产品遍及全球。 +- 内置产品评论和评级功能。 +- 支持可下载的产品(即电子书)。 +- 支持自动缩放图像。 +- 类似多税率(许多国家都是这样)、查看相关产品、资料页、装船重量计算,使用折扣优惠券,等等功能默认都有了。 +- 内置的备份和恢复工具。 +- 搜索引擎优化做的很好。 +- 发票打印、错误日志和销售报告等都做的很好。 + +#### 系统需求 #### + +- Web 服务器 (首选 Apache HTTP服务器) +- PHP (5.2 或以上) +- 数据库 (首选MySQL,但是我这里用的是MariaDB) + +#### PHP需要的库和模块 #### + +这些扩展必须在您的系统上安装并启用,才能确保Opencart正确安装在web服务器上 + +- Curl +- Zip +- Zlib +- GD Library +- Mcrypt +- Mbstrings + +### 第一步: 安装 Apache、 PHP 和 MariaDB ### + +1. 像我说的,OpenCart需要一定的技术要求,比如在系统上安装Apache,PHP扩展和数据库(MySQL或MariaDB),才能正常运行Opencart。 + + 让我们使用命令行安装Apache,PHP和MariaDB。 + + **安装 Apache** + + # apt-get install apache2 (在基于Debian系统上) + # yum install httpd (在基于RedHat系统上) + + **安装 PHP and Extensions** + + # apt-get install php5 libapache2-mod-php5 php5-curl php5-mcrypt (在基于Debian系统上) + # yum install php php-mysql php5-curl php5-mcrypt (在基于RedHat系统上) + + **安装 MariaDB** + + # apt-get install mariadb-server mariadb-client (在基于Debian系统上) + # yum install mariadb-server mariadb (在基于RedHat系统上) + +2. 在安装所有需要上面的东西后,你可以使用如下命令启动 Apache 和 MariaDB 服务。 + + ------------------- 在基于Debian系统上 ------------------- + # systemctl restart apache2.service + # systemctl restart mariadb.service + + -- + ------------------- 在基于RedHat系统上 ------------------- + # systemctl restart httpd.service + # systemctl restart mariadb.service + +### 第二步:下载和设置 OpenCart ### + +3. 最新版本的OpenCart(2.0.2.0)可以从[OpenCart 网站][3]下载,或直接从github获得。 + + 作为一种选择,你可以使用wget命令直接从github库下载最新版本的OpenCart,如下所示。 + + # wget https://github.com/opencart/opencart/archive/master.zip + +4. 下载压缩文件后,拷贝到Apache工作目录下(例如/var/www/html)然后解压缩master.zip文件。 + + # cp master.zip /var/www/html/ + # cd /var/www/html + # unzip master.zip + +5. 提取‘master.zip’文件后,切换到提取目录下,然后移动upload目录到应用程序的根文件夹(opencart-master) + + # cd opencart-master + # mv -v upload/* ../opencart-master/ + +6. 现在需要重命名或复制OpenCart配置文件,如下所示。 + + # cp /var/www/html/opencart-master/admin/config-dist.php /var/www/html/opencart-master/admin/config.php + # cp /var/www/html/opencart-master/config-dist.php /var/www/html/opencart-master/config.php + +7. 下一步,设置/var/www/html/opencart-master的文件和文件夹正确的权限。您需要提供RWX权限给文件和文件夹,用递归方式。 + + # chmod 777 -R /var/www/html/opencart-master + + **重要**: 设置权限777可能是危险的,所以一旦你完成所有设置,递归恢复755权限到上层的文件夹。 + +### 第三步: 创建 OpenCart 数据库 ### + +8. 下一步是给你的电子商务网站创建一个数据库(比如叫做 opencartdb)来存储数据。连接到数据库服务器并创建一个数据库和用户,并授予用户正确的权限以完全控制该数据库。 + + # mysql -u root -p + CREATE DATABASE opencartdb; + CREATE USER 'opencartuser'@'localhost' IDENTIFIED BY 'mypassword'; + GRANT ALL PRIVILEDGES ON opencartdb.* TO 'opencartuser'@'localhost' IDENTIFIED by 'mypassword'; + +### 第四步: OpenCart 网站安装 ### + +9. 一旦所有设置正确,到web浏览器地址栏输入`http://`访问OpenCart web安装。 + + 点击“继续”,同意许可证协议。 + + ![Accept OpenCart License](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-License.png) + + *同意OpenCart许可证* + +10. 下一个屏幕是安装前服务器设置检查,查看服务器所需的所有模块是否安装正确并且有OpenCart文件的权限。 + + 如果在第1和2区域有红色标志突出显示,这意味着你需要在服务器上正确安装这些组件满足web服务器的要求。 + + 如果在第3和4区域有红色标志突出显示,这意味着你的文件有问题。如果一切正确配置您应该看到所有都是绿色标志(见下面),你可以按“继续”。 + + ![Server Requirement Check](http://www.tecmint.com/wp-content/uploads/2015/05/Server-Checkup.png) + + *服务器需求检查* + +11. 在下一个屏幕上输入数据库凭证信息,如数据库驱动类型、主机名、用户名、密码、数据库。你不应该改动数据库端口和前缀,除非你知道你在做什么。 + + 另外输入管理员账号的用户名、密码和邮箱地址。注意这些凭证将用于管理员登录到Opencart管理面板,所以保证它的安全。完成后单击继续! + + ![OpenCart Database Details](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Database.png) + + *OpenCart数据库详情* + +12. 下一个屏幕显示的信息如“Installation Complete”和“Ready to Start Selling”。这里还警告说,要记得删除安装目录,所有需要这个目录安装的设置已经完成。 + + ![OpenCart Installation Completes](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Installation-Completes.png) + + *OpenCart安装完成* + + 删除安装目录,你可以执行下面的命令。 + + # rm -rf /var/www/html/opencart-master/install + +### 第四步: 进入OpenCart 及其管理界面 ### + +13. 现在打开浏览器到`http:///opencart-master/`然后你会看到类似下面的截屏。 + + ![OpenCart Product Showcase](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart.jpg) + + *OpenCart产品示例* + +14. 要登录到Opencart管理面板,你需要浏览`http:///opencart-master/admin`然后填写之前设置的凭证。 + + ![OpenCart Admin Login](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Admin-Login.png) + + *OpenCart管理登录* + +15. 如果全部OK你应该可以看到Opencart的控制台。 + + ![OpenCart Dashboard](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Dashboard.png) + + *OpenCart控制台* + + 在管理控制台可以设置很多选项,如类别、产品、选择、制造商、下载、评论、信息、扩展安装、运输、付款选项、订单总数、礼品券、贝宝、优惠券、子公司、营销、邮件、设计风格和设置、错误日志、内置分析等等。 + +#### 测试了这个工具之后呢? #### + +如果您已经测试了这个应用程序,就会发现它可定制、灵活、稳定、易于维护和使用,您可能需要一个好的主机托管提供商托管你的OpenCart应用,以便保持24 x7的在线支持。尽管有很多选择,我们建议Hostgator主机提供商。(广告硬植-.-!,以下硬广和 LCTT 无关~) + +Hostgator是以服务和功能出名的域名注册和虚拟机托管提供商。它为你提供无限的磁盘空间、无限带宽、易于安装(一键安装脚本)、99.9%的正常运行时间、荣获24x7x365技术支持和45天退款保证,这意味着如果你不喜欢这个产品和服务就可以在45天内拿回你的采购费,注意这45天是一个长的测试时间。 + +所以如果你有什么想卖的你可以免费地去做了(我的意思是免费,想想你会花在实体存储上的费用,然后比较其与建设虚拟商店的成本。你就会感受到它的免费了)。 + +**注**: 当你从Hostgator购买虚拟主机(和/或域名)你将获得一个**25%折扣**。这只提供给Tecmint网站的读者。 + +你所要做的就是在购买虚拟机支付时输入优惠码“**TecMint025**”。付款预览截屏优惠码以供参考用。 + +![Hostgator 25% Discount - TecMint025](http://www.tecmint.com/wp-content/uploads/2015/05/Hostgator-Discount-Code.png) + +*[注册 Hostgator][4] (折扣码: TecMint025)* + +**注**: 还值得一提的,每个你从Hostgator购买的托管OpenCart的虚拟机,我们将得到少量的佣金,只是为了保持Tecmint存活 (通过支付带宽和托管服务器)。 + +所以如果你使用上面的代码买它,你得到折扣,我们会得到少量收入。还要注意,你不会支付任何额外的费用,事实上你支付的账单总额将减少25%。 + +### 总结 ### + +OpenCart是一个开箱可用的应用。它易于安装,您可以选择选择最适合的模板,添加你的产品然后你就成为了一个在线店主。 + +很多社区开发的扩展(有免费和付费的)使它变得丰富。这是一个给那些想要建立一个保持24X7小时用户可访问的虚拟商店的美妙应用。让我们知道你对这个应用程序的体验吧。欢迎任何建议和反馈。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-e-commerce-online-shopping-store-using-opencart-in-linux/ + +作者:[Avishek Kumar][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://demo.opencart.com/ +[2]:http://demo.opencart.com/admin/ +[3]:http://www.opencart.com/index.php?route=download/download/ +[4]:http://secure.hostgator.com/%7Eaffiliat/cgi-bin/affiliates/clickthru.cgi?id=tecmint diff --git a/translated/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md b/translated/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md deleted file mode 100644 index e506f76f7c..0000000000 --- a/translated/tech/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md +++ /dev/null @@ -1,224 +0,0 @@ -如何在linux中用“OpenCart”创建自己的在线商店 -================================================================================ -在网络世界我们用电脑做所有事情。用电子设备完成的商务也叫电子商务即是其中之一。电子商务并不是什么新鲜事,它起源于早期的阿帕网,阿帕网用来安排麻省理工学院和斯坦福大学人工智能实验室学生之间的拍卖。 - -最近出现了上百家电子商务网站也就是, Flipcart, eBay, Alibaba, Zappos, IndiaMART, Amazon, 等等。你想制作自己的亚马逊和Flipcart这样基于web的应用程序服务器吗?如果是!这个文章正适合你。 - -Opencart是一个免费开源的使用PHP语言的电子商务程序,它可以用来开发一个购物车系统类似于亚马逊和Flipcart。如果你想在线卖你的产品或想在关门时为你的客户提供服务Opencart是给你准备的。你可以使用可靠和专业Opencart应用程序建立一个成功的网上商店(网上商家)。 - -### OpenCart 网页面板演示 ### - -- 商店前端 – [http://demo.opencart.com/][1] -- 管理登陆 – [http://demo.opencart.com/admin/][2] - - ------------------ 管理 登陆 ------------------ - 用户名: demo - 密码: demo - -#### Opencart的特点 #### - -Opencart是一个符合所有在线商家需求的应用程序。您可以使用它的所有特性(见下文)制作自己的电子商务网站。 - -- 它是一个免费的(如啤酒)和开源(如言论)应用GNU GPL许可下发布。 -- 一切都是有据可查的,意味着你不需到要谷歌喊救命。 -- 自由生活的时间支持和更新。 -- 无限数量的类别、产品和制造商的支持。 -- 一切都是基于模板的。 -- 支持多语言和多币种。它确保你的产品遍及全球。 -- 内置产品评论和评级功能。 -- 可下载的产品(即电子书)支持 -- 自动调整图像的支持。 -- 功能,如多税率(如各种国家),查看相关产品,资料页,装船重量计算,使用折扣优惠券,等等是默认实现的。 -- 内置的备份和恢复工具。 -- 实施搜索引擎优化。 -- 发票打印,也支持错误日志和销售报告。 - -#### 系统需求 #### - -- Web 服务器 (Apache HTTP服务器的首选) -- PHP (5.2 或以上). -- 数据库 (首选MySQL但是我用MariaDB). - -#### PHP需要的库和模块 #### - -这些扩展必须在您的系统上安装并启用确保web服务器上安装Opencart正确 - -- Curl -- Zip -- Zlib -- GD Library -- Mcrypt -- Mbstrings - -### 第一步: 安装 Apache, PHP 和 MariaDB ### - -1. 像我说的,OpenCart需要一定的技术要求比如在系统上安装Apache,PHP扩展和数据库(MySQL或MariaDB),为了运行Opencart正常。 - -让我们使用命令行安装Apache,PHP和MariaDB。 - -**安装 Apache** - - # apt-get install apache2 (在基于Debian系统上) - # yum install httpd (在基于RedHat系统上) - -**安装 PHP and Extensions** - - # apt-get install php5 libapache2-mod-php5 php5-curl php5-mcrypt (在基于Debian系统上) - # yum install php php-mysql php5-curl php5-mcrypt (在基于RedHat系统上) - -**安装 MariaDB** - - # apt-get install mariadb-server mariadb-client (在基于Debian系统上) - # yum install mariadb-server mariadb (在基于RedHat系统上) - -2. 在安装所有需要上面的东西后, you can start the Apache and MariaDB services using following commands. - - ------------------- 在基于Debian系统上 ------------------- - # systemctl restart apache2.service - # systemctl restart mariadb.service - - - ------------------- 在基于RedHat系统上 ------------------- - # systemctl restart httpd.service - # systemctl restart mariadb.service - -### 第二步: 下载和设置 OpenCart ### - -3. 最新版本的OpenCart(2.0.2.0)可以从[OpenCart website][3]或直接从github获得。 - -作为一种选择,你可以使用wget命令直接从github库下载最新版本的OpenCart,如下所示。 - - # wget https://github.com/opencart/opencart/archive/master.zip - -4. 下载压缩文件后,拷贝到Apache工作目录下(例如/var/www/html)然后解压缩master.zip文件。 - - # cp master.zip /var/www/html/ - # cd /var/www/html - # unzip master.zip - -5. 提取‘master.zip’文件后,切换到提取目录下然后移动upload目录到应用程序的根文件夹(opencart-master) - - # cd opencart-master - # mv -v upload/* ../opencart-master/ - -6. 现在需要重命名或复制OpenCart配置文件如下所示。 - - # cp /var/www/html/opencart-master/admin/config-dist.php /var/www/html/opencart-master/admin/config.php - # cp /var/www/html/opencart-master/config-dist.php /var/www/html/opencart-master/config.php - -7. 下一步,设置/var/www/html/opencart-master的文件和文件夹正确的权限。您需要提供RWX权限给文件和文件夹,用递归方式。 - - # chmod 777 -R /var/www/html/opencart-master - -**重要**: 设置权限777可能是危险的,所以一旦你完成所有设置,递归恢复755权限到上层的文件夹。 - -### 第三步: 创建 OpenCart 数据库 ### - -8. 下一步是创建一个数据库(例如opencartdb)电子商务网站数据库来存储数据。连接到数据库服务器并创建一个数据库,用户和正确的权限授予用户完全控制数据库。 - - # mysql -u root -p - CREATE DATABASE opencartdb; - CREATE USER 'opencartuser'@'localhost' IDENTIFIED BY 'mypassword'; - GRANT ALL PRIVILEDGES ON opencartdb.* TO 'opencartuser'@'localhost' IDENTIFIED by 'mypassword'; - -### 第四步: OpenCart 网站安装 ### - -9. 一旦所有设置正确,到web浏览器地址栏输入`http://`访问OpenCart web安装。 - -点击“继续”,同意许可证协议。 - -![Accept OpenCart License](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-License.png) - -同意OpenCart许可证 - -10. 下一个屏幕是安装前检查服务器设置,查看服务器所需的所有模块安装正确并且有OpenCart文件的权限。 - -如果有红色标志突出显示#1或#2,这意味着你需要在服务器上正确安装这些组件满足web服务器的要求。 - -如果有红色标志突出显示#3或#4,这意味着你的文件有问题。如果一切正确配置您应该看到所有绿色标志是可见的(见下面),你可以按“继续”。 - -![Server Requirement Check](http://www.tecmint.com/wp-content/uploads/2015/05/Server-Checkup.png) - -服务器需求检查 - -11. 在下一个屏幕上输入数据库证书如数据库驱动程序,主机名、用户名、密码、数据库。你不应该改动数据库端口和前缀,除非你知道你在做什么。 - -另外输入管理员账号的用户名,密码和邮箱地址。注意这些凭据将用于root登录到Opencart管理面板,所以保证它的安全。完成后单击继续! - -![OpenCart Database Details](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Database.png) - -OpenCart数据库详情 - -12. 下一个屏幕显示的信息如“Installation Complete”与“Ready to Start Selling”为结束行。还警告说,删除安装目录,所有需要这个目录安装的设置已经完成。 - -![OpenCart Installation Completes](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Installation-Completes.png) - -OpenCart安装完成 - -删除安装目录,你可以执行下面的命令。 - - # rm -rf /var/www/html/opencart-master/install - -### 第四步: 进入OpenCart页管理 ### - -13. 现在打开浏览器到`http:///opencart-master/`然后你会看到类似下面的截屏。 - -![OpenCart Product Showcase](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart.jpg) - -OpenCart产品示例 - -14. 为了登陆到Opencart管理面板,你需要浏览http:///opencart-master/admin然后填写通行证,同时设置它启动。 - -![OpenCart Admin Login](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Admin-Login.png) - -OpenCart管理登陆 - -15. 如果全部OK你应该可以看到Opencart的控制台。 - -![OpenCart Dashboard](http://www.tecmint.com/wp-content/uploads/2015/05/OpenCart-Dashboard.png) - -OpenCart控制台 - -在管理控制台可以建立很多选项如类别,产品选择,制造商、下载、评论,信息,扩展安装,运输,付款选项,订单总数、礼品券、贝宝、优惠券、子公司、营销、邮件、设计和设置,错误日志,内置分析等等。 - -#### 测试工具之后? #### - -如果您已经测试了应用程序和发现它可定制,灵活,坚如磐石,易于维护和使用,您可能需要一个好的主机托管提供商托管OpenCart应用,保持在线24 x7的支持。尽管有很多选项,我们建议Hostgator主机提供商。(广告硬植-.-!) - -Hostgator是以服务和特性出名的域名注册和虚拟机托管提供商。它为你提供无限的磁盘空间,无限带宽,易于安装(一键安装脚本),99.9%的正常运行时间,荣获24x7x365技术支持和45天退款保证,这意味着如果你不喜欢这个产品和服务在45天内拿回你的采购费,注意这45天是一个长的测试时间。 - -所以如果你有什么想卖的你可以自由做它(我的意思是自由,想到你会花在获得物理存储成本,然后比较其与虚拟商店建立成本。你会觉得它的自由)。 - -**注**: 当你从Hostgator购买虚拟主机(和/或域名)你将获得一个**25%折扣**。这只提供给Tecmint网站的读者。 - -你所要做的就是在购买虚拟机支付时输入优惠码“**TecMint025**”。付款预览截屏优惠码以供参考用。 - -![Hostgator 25% Discount - TecMint025](http://www.tecmint.com/wp-content/uploads/2015/05/Hostgator-Discount-Code.png) - -[Sign up for Hostgator][4] (折扣码: TecMint025) - -**注**: 还值得一提的,每个你从Hostgator购买的虚拟机托管OpenCart,我们将得到少量的佣金,只是为了保持Tecmint存活 (通过支付带宽和托管服务器)。 - -所以如果你使用上面的代码买它,你得到折扣,我们会得到少量收入。还要注意,你不会支付任何额外的,事实上你支付的账单总额将减少25%。 - -### 总结 ### - -OpenCart是一个开箱可用的应用。它易于安装,您可以选择选择最适合的模板,添加你的产品然后你就成为了一个在线店主。 - -很多社区的扩展(免费和付费)使它丰富。这是一个美妙的应用为那些想要建立一个保持24X7小时用户可访问的虚拟商店。让我知道你的应用程序的经验。欢迎任何建议和反馈。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-e-commerce-online-shopping-store-using-opencart-in-linux/ - -作者:[Avishek Kumar][a] -译者:[wyangsun](https://github.com/wyangsun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://demo.opencart.com/ -[2]:http://demo.opencart.com/admin/ -[3]:http://www.opencart.com/index.php?route=download/download/ -[4]:http://secure.hostgator.com/%7Eaffiliat/cgi-bin/affiliates/clickthru.cgi?id=tecmint From 7b9c3ca11bb8d9d31d3322748e9e26ab72309812 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 11 Jun 2015 16:52:32 +0800 Subject: [PATCH 1139/2517] Translating by ZTinoZ --- ... 20 Useful Terminal Emulators for Linux.md | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 5d8b38e80c..4ff7820781 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -87,7 +87,7 @@ Roxterm Terminal ### 6. Eterm ### -Eterm is a lightest color terminal emulator designed as a replacement for xterm. It is developed with a Freedom of Choice ideology, leaving as much power, flexibility, and freedom as workable in the hands of the user. +Eterm是最轻量级的一款彩色终端仿真器,是作为xterm的替代品而被设计出来。它是以一种选择自由的思想、避免臃肿、灵活性和自由在用户手中是触手可及的理念而开发出来的。 ![Eterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Eterm-Terminal.jpeg) @@ -97,7 +97,7 @@ Eterm Terminal ### 7. Rxvt ### -Rxvt stands for extended virtual terminal is a color terminal emulator application for Linux intended as an xterm replacement for power users who don’t need to have a feature such as Tektronix 4014 emulation and toolkit-style configurability. +代表着扩展虚拟终端的Rxvt是一款彩色终端仿真器,为那些不需要一些特性例如Tektronix 4014仿真和toolkit-style可配置性的老牌用户而生的xterm的替代品。 ![Rxvt Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Rxvt-Terminal.jpeg) @@ -118,6 +118,7 @@ wterm Terminal ### 9. LXTerminal ### LXTerminal is a default VTE-based terminal emulator for LXDE (Lightweight X Desktop Environment) without any unnecessary dependency. The terminal has got some nice features such as. + LXTerminal Features - Multiple tabs support @@ -133,19 +134,20 @@ lxterminal Terminal ### 10. Konsole ### -Konsole is yet another powerful KDE based free terminal emulator was originally created by Lars Doelle. -Konsole Features +Konsole是另一款强大的基于KDE的免费终端仿真器,最初由Lars Doelle创造。 -- Multiple Tabbed terminals. -- Translucent backgrounds. -- Support for Split-view mode. -- Directory and SSH bookmarking. -- Customizable color schemes. -- Customizable key bindings. -- Notification alerts about activity in a terminal. -- Incremental search -- Support for Dolphin file manager -- Export of output in plain text or HTML format. +Konsole的特性 + +- 多标签式终端 +- 半透明背景 +- 支持拆分视图模式 +- 目录和SSH书签化 +- 可定制的颜色设计 +- 可定制的按键绑定 +- 终端中的活动通知警告 +- 增量搜索 +- 支持Dolphin文件管理器 +- 普通文本和HTML格式输出出口 ![Konsole Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Konsole-Terminal.jpeg) From 4f22be057f2d3f09c6d74769ce31e4b7cc348a9e Mon Sep 17 00:00:00 2001 From: chenzhijun <522858454@qq.com> Date: Thu, 11 Jun 2015 18:51:23 +0800 Subject: [PATCH 1140/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...RSS feed from the command line on Linux.md | 108 ------------------ 1 file changed, 108 deletions(-) delete mode 100644 sources/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md diff --git a/sources/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md b/sources/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md deleted file mode 100644 index 16dccd8f8e..0000000000 --- a/sources/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md +++ /dev/null @@ -1,108 +0,0 @@ -translating by chenzhijun - -How to access Feedly RSS feed from the command line on Linux -================================================================================ -In case you didn't know, [Feedly][1] is one of the most popular online news aggregation services. It offers seamlessly unified news reading experience across desktops, Android and iOS devices via browser extensions and mobile apps. Feedly took on the demise of Google Reader in 2013, quickly gaining a lot of then Google Reader users. I was one of them, and Feedly has remained my default RSS reader since then. - -While I appreciate the sleek interface of Feedly's browser extensions and mobile apps, there is yet another way to access Feedly: Linux command-line. That's right. You can access Feedly's news feed from the command line. Sounds geeky? Well, at least for system admins who live on headless servers, this can be pretty useful. - -Enter [Feednix][2]. This open-source software is a Feedly's unofficial command-line client written in C++. It allows you to browse Feedly's news feed in ncurses-based terminal interface. By default, Feednix is linked with a console-based browser called w3m to allow you to read articles within a terminal environment. You can choose to read from your favorite web browser though. - -In this tutorial, I am going to demonstrate how to install and configure Feednix to access Feedly from the command line. - -### Install Feednix on Linux ### - -You can build Feednix from the source using the following instructions. At the moment, the "Ubuntu-stable" branch of the official Github repository has the most up-to-date code. So let's use this branch to build it. - -As prerequisites, you will need to install a couple of development libraries, as well as w3m browser. - -#### Debian, Ubuntu or Linux Mint #### - - $ sudo apt-get install git automake g++ make libncursesw5-dev libjsoncpp-dev libcurl4-gnutls-dev w3m - $ git clone -b Ubuntu-stable https://github.com/Jarkore/Feednix.git - $ cd Feednix - $ ./autogen.sh - $ ./configure - $ make - $ sudo make install - -#### Fedora #### - - $ sudo yum groupinstall "C Development Tools and Libraries" - $ sudo yum install gcc-c++ git automake make ncurses-devel jsoncpp-devel libcurl-devel w3m - $ git clone -b Ubuntu-stable https://github.com/Jarkore/Feednix.git - $ cd Feednix - $ ./autogen.sh - $ ./configure - $ make - $ sudo make install - -Arch Linux - -On Arch Linux, you can easily install Feednix from [AUR][3]. - -### Configure Feednix for the First Time ### - -After installing it, launch Feednix as follows. - - $ feednix - -The first time you run Feednix, it will pop up a web browser window, where you need to sign up to create a Feedly's user ID and its corresponding developer access token. If you are running Feednix in a desktop-less environment, open a web browser on another computer, and go to https://feedly.com/v3/auth/dev. - -![](https://farm8.staticflickr.com/7427/15825106524_42883b3e32_b.jpg) - -Once you sign in, you will see your Feedly user ID generated. - -![](https://www.flickr.com/photos/xmodulo/15827565143/) - -To retrieve an access token, you need to follow the token link sent to your email address in your browser. Only then will you see the window showing your user ID, access token, and its expiration date. Be aware that access token is quite long (more than 200 characters). The token appears in a horizontally scrollable text box, so make sure to copy the whole access token string. - -![](https://farm9.staticflickr.com/8605/16446685812_9098df494b_b.jpg) - -Paste your user ID and access token into the Feednix' command-line prompt. - - [Enter User ID] >> XXXXXX - [Enter token] >> YYYYY - -After successful authentication, you will see an initial Feednix screen with two panes. The left-side "Categories" pane shows a list of news categories, while the right-side "Posts" pane displays a list of news articles in the current category. - -![](https://farm8.staticflickr.com/7412/16421639256_deb8e2d276_c.jpg) - -### Read News in Feednix ### - -Here I am going to briefly describe how to access Feedly via Feednix. - -#### Navigate Feednix #### - -As I mentioned, the top screen of Feednix consists of two panes. To switch focus between the two panes, use TAB key. To move up and down the list within a pane, use 'j' and 'k' keys, respectively. These keyboard shorcuts are obviously inspired by Vim text editor. - -#### Read an Article #### - -To read a particular article, press 'o' key at the current article. It will invoke w2m browser, and load the article inside the browser. Once you are done reading, press 'q' to quit the browser, and come back to Feednix. If your environment can open a web browser, you can press 'O' to load an article on your default web browser such as Firefox. - -![](https://farm8.staticflickr.com/7406/16445870201_b98e8da6d9_b.jpg) - -#### Subscribe to a News Feed #### - -You can add any arbitrary RSS news feed to your Feedly account from Feednix interface. To do so, simply press 'a' key. This will show "[ENTER FEED]:" prompt at the bottom of the screen. After typing the RSS feed, go ahead and fill in the name of the feed and its preferred category. - -![](https://farm8.staticflickr.com/7324/16421639296_b52ed3c52e_c.jpg) - -#### Summary #### - -As you can see, Feednix is a quite convenient and easy-to-use command-line RSS reader. If you are a command-line junkie as well as a regular Feedly user, Feednix is definitely worth trying. I have been communicating with the creator of Feednix, Jarkore, to troubleshoot some issue. As far as I can tell, he is very active in responding to bug reports and fixing bugs. I encourage you to try out Feednix and let him know your feedback. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/feedly-rss-feed-command-line-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:https://feedly.com/ -[2]:https://github.com/Jarkore/Feednix -[3]:https://aur.archlinux.org/packages/feednix/ From a4b62ed2496de9eee4c69a4de326dc170423cf35 Mon Sep 17 00:00:00 2001 From: chenzhijun <522858454@qq.com> Date: Thu, 11 Jun 2015 18:52:06 +0800 Subject: [PATCH 1141/2517] finish translate --- ...RSS feed from the command line on Linux.md | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md diff --git a/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md b/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md new file mode 100644 index 0000000000..15fd76f291 --- /dev/null +++ b/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md @@ -0,0 +1,123 @@ +如何在Linux命令行下获取Feedly上的RSS新闻 +================================================================================ + +也许的先告诉你一声,Feedly 是世界上最流行的在线新闻聚合服务之一;它提供了无缝地统一的新闻阅读体验,你可以使用电脑的浏览器扩展,Android 和 iOS 设备上的移动应用程序等来体验Feedly。Feedly 在2013年Google Reader 停用后,迅速的获得了一大批Google Reader的用户。我就是他们之中的一位。从这以后,Feedly就一直是我的默认RSS(简易信息聚合)阅读器 +除了我非常喜欢的Feedly浏览器扩展和手机上的Feedly程序,这里还有一种途径来获取Feedly:Linux command-line (Linux命令行) +对的。你可以用命令行来获取Feedly上的新闻概要。 + +听起来非常傻?但是对于那些在服务器上工作的系统管理员来说,这是非常有用的。 +点击进入[Feednix][2]. 这个用c++编写的开源软件是Feedly的非官方命令行客户端。它允许你浏览Feedly的新闻在一个基于字符的终端界面(例如:bash)。默认模式下,Feednix 连接了一个基于控制台的浏览器,这个浏览器的名字叫w3m,允许你在命令行终端的环境下阅读文章。当然你也可以选择使用你喜欢的网页浏览器。在这个教程中,我准备示范以下怎样在命令行下安装和配置Feednix 来获取获取Feedly。 + +### 在Linux下安装Feednix ### + +你可以通过以下的步骤从源代码中安装Feednix。同时,在github的Ubuntu分区里面Ubuntu-stable(Ubuntu稳定版本)的分支上有最新的Feednix源代码。现在让我们开始吧: +作为必要组件,你需要安装一组开发包,和w3m浏览器(文字式页面浏览器)。 + +#### 在Debian,Ubuntu 和Linux Mint 操作 #### + + $ sudo apt-get install git automake g++ make libncursesw5-dev libjsoncpp-dev libcurl4-gnutls-dev w3m + $ git clone -b Ubuntu-stable https://github.com/Jarkore/Feednix.git + $ cd Feednix + $ ./autogen.sh + $ ./configure + $ make + $ sudo make install + + +#### 在Fedora 下操作 #### + + $ sudo yum groupinstall "C Development Tools and Libraries" + $ sudo yum install gcc-c++ git automake make ncurses-devel jsoncpp-devel libcurl-devel w3m + $ git clone -b Ubuntu-stable https://github.com/Jarkore/Feednix.git + $ cd Feednix + $ ./autogen.sh + $ ./configure + $ make + $ sudo make install + +Arch Linux + +在Arch Linux发行版下, 你可以非常容易的安装Feednix 从 [AUR][3]. + + +### 配置Feednix ### + +在安装完软件后,用下面的命令启动Feednix + + $ feednix + +如果你是第一次运行Feddnix,它会弹出一个网页浏览器窗口,在这个窗口里,你需要登陆来创建一个Feedly的账户ID和相应的开发人员密钥。 + +如果你是在无桌面环境下运行Feednix,先在另外一台电脑上打开一个网页,进入到网站:https://feedly.com/v3/auth/dev. + +![](https://farm8.staticflickr.com/7427/15825106524_42883b3e32_b.jpg) + +一旦你登陆,你对应的Feedly账户ID就生成了。 + +![](https://www.flickr.com/photos/xmodulo/15827565143/) + +为了验证密钥,你需要在浏览器上允许验证密钥的链接发送你的邮箱。之后就会在浏览器窗口显示你的用户ID,密钥,和密钥的有效期。 +请注意密钥的长度是非常超过200个字符的。所以密钥显示在一个带有垂直滚动条的文书框内,请确保把整个密钥的长度复制下来。 + +![](https://farm9.staticflickr.com/8605/16446685812_9098df494b_b.jpg) + +向下面这样,把你的用户ID和密钥输入到Feddnix的命令行提示下: + + [Enter User ID] >> XXXXXX + [Enter token] >> YYYYY + +成功授权后,你会在屏幕上见到一个初始化的有两个窗格的Feednix界面 + +左边的标题为“Categories”窗格,显示了一个新闻分类栏;右边“Posts”窗格显示了当前类别的新闻文章 + +![](https://farm8.staticflickr.com/7412/16421639256_deb8e2d276_c.jpg) + + +### 用Feednix读文章 ### + +这里我想简要描叙一下怎样通过Feednix来访问Feedly。 + + +#### Feednix界面 #### + +向我之前提过的,Feednix窗口包含了两个窗格。想在两个窗口之间进行切换的话,可以使用"TAB"健。在一个窗格内,想上下移动选择可以使用"j"和"k"。 +这些快捷健明显是受到了使用Vim编辑器的人启发。 + +#### 阅读文章 #### + +想阅读一些有特色的文章,可以在选定的文章上使用"o"健。它会调用w2m浏览器,并且在浏览器里面加载文章。 +一旦你读完之后,可以使用"q"健来推出当前W2m浏览器,并且返回到Feednix. +如果你的电脑环境允许打开一个网页浏览器,你可以按"0"健来在你默认的网页浏览器里面家在文章,比如使用Firefox. + + +![](https://farm8.staticflickr.com/7406/16445870201_b98e8da6d9_b.jpg) + + +#### 订阅新闻 #### + +你可以通过Feednix来为你的Feedly账户增加任何一种RSS新闻。 +要这么做,仅仅只需要按下"a"键,它会显示一个"[ENTER FEED]:"的提示在屏幕上,然后按下"ENTER" +在选择完RSS新闻后,继续为它编写分组信息和分类。 + +![](https://farm8.staticflickr.com/7324/16421639296_b52ed3c52e_c.jpg) + +#### 总结 #### + + +现在你知道了吧, Feednix 是一个非常友好的并且容易使用的命令行RSS阅读器。如果你是重度依赖命令行的用户或者是一个Feedly用户,Feednix 是肯定值得去尝试的。 +我经常和Feednix的开发者Jarkore交流来解决一些问题。我想说,对于bug的报告和修复他非常的积极。 +鼓励大家来试用Feednix,并且给他(Jarkore)一些回馈。 +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/feedly-rss-feed-command-line-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/chenzhijun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://feedly.com/ +[2]:https://github.com/Jarkore/Feednix +[3]:https://aur.archlinux.org/packages/feednix/ From ced1ee3cab2939f996a8ed8aff6516b5a5d5dce2 Mon Sep 17 00:00:00 2001 From: wolf <522858454@qq.com> Date: Thu, 11 Jun 2015 19:08:41 +0800 Subject: [PATCH 1142/2517] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 标题。 我是我想了好久, 但是总觉得有的不达人意。 校对员能帮忙翻译一下吗? How to access Feedly RSS feed from the command line on Linux RSS是一种基于XML标准的协议; Feedly 是RSS阅读器 --- ...access Feedly RSS feed from the command line on Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md b/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md index 15fd76f291..59cd1b97e6 100644 --- a/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md +++ b/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md @@ -1,7 +1,7 @@ -如何在Linux命令行下获取Feedly上的RSS新闻 +如何从Linux命令行获取基于RSS协议的Feedly新闻信息 ================================================================================ -也许的先告诉你一声,Feedly 是世界上最流行的在线新闻聚合服务之一;它提供了无缝地统一的新闻阅读体验,你可以使用电脑的浏览器扩展,Android 和 iOS 设备上的移动应用程序等来体验Feedly。Feedly 在2013年Google Reader 停用后,迅速的获得了一大批Google Reader的用户。我就是他们之中的一位。从这以后,Feedly就一直是我的默认RSS(简易信息聚合)阅读器 +也许你并不知道,Feedly --世界上最流行的在线新闻聚合服务之一;它提供了无缝地统一的新闻阅读体验,你可以使用电脑的浏览器扩展,Android 和 iOS 设备上的移动应用程序等来体验Feedly。Feedly 在2013年Google Reader 停用后,迅速的获得了一大批Google Reader的用户。我就是他们之中的一位。从这以后,Feedly就一直是我的默认RSS(简易信息聚合)阅读器 除了我非常喜欢的Feedly浏览器扩展和手机上的Feedly程序,这里还有一种途径来获取Feedly:Linux command-line (Linux命令行) 对的。你可以用命令行来获取Feedly上的新闻概要。 @@ -112,7 +112,7 @@ Arch Linux via: http://xmodulo.com/feedly-rss-feed-command-line-linux.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/chenzhijun) +译者:[chenzhijun](https://github.com/chenzhijun) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From f624eedbfd890054d9ede42a768c074701120b1e Mon Sep 17 00:00:00 2001 From: wolf <522858454@qq.com> Date: Thu, 11 Jun 2015 19:11:23 +0800 Subject: [PATCH 1143/2517] Update 20150209 How to access Feedly RSS feed from the command line on Linux.md --- ... to access Feedly RSS feed from the command line on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md b/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md index 59cd1b97e6..4109ceb947 100644 --- a/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md +++ b/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md @@ -1,4 +1,4 @@ -如何从Linux命令行获取基于RSS协议的Feedly新闻信息 +从Linux命令行获取基于RSS协议的Feedly上信息 ================================================================================ 也许你并不知道,Feedly --世界上最流行的在线新闻聚合服务之一;它提供了无缝地统一的新闻阅读体验,你可以使用电脑的浏览器扩展,Android 和 iOS 设备上的移动应用程序等来体验Feedly。Feedly 在2013年Google Reader 停用后,迅速的获得了一大批Google Reader的用户。我就是他们之中的一位。从这以后,Feedly就一直是我的默认RSS(简易信息聚合)阅读器 From 2e29b9bdeb8c5f00bd93ba43bee28fc5b15bff13 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 11 Jun 2015 21:06:25 +0800 Subject: [PATCH 1144/2517] translated --- ... pagespeed on Ubuntu 15.04 Vivid Vervet.md | 131 ------------------ ... pagespeed on Ubuntu 15.04 Vivid Vervet.md | 129 +++++++++++++++++ 2 files changed, 129 insertions(+), 131 deletions(-) delete mode 100644 sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md create mode 100644 translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md diff --git a/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md b/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md deleted file mode 100644 index dd3478c903..0000000000 --- a/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md +++ /dev/null @@ -1,131 +0,0 @@ -translating----geekpi - -How to Install nginx and google pagespeed on Ubuntu 15.04 (Vivid Vervet) -================================================================================ -Nginx (engine-x) is a open source and high performance HTTP server, reverse proxy and IMAP/POP3 proxy server. The outstanding features of Nginx are: stability, rich feature set, simple configuration and low resource consumption. Nginx is being used by some of the largest websites on the internet and is gaining more and more popularity in the webmaster community. This tutorials shows how to build a nginx .deb package for Ubuntu 15.04 from source that has Google pagespeed module compiled in. - - -Pagespeed is a web server module developed by Google to speed up a website response times, optimize html and reduce the page load time. ngx_pagespeed features include : - -- Image optimization: stripping meta-data, dynamic resizing, recompression. -- CSS & JavaScript minification, concatenation, inlining, and outlining. -- Small resource inlining. -- Deferring image and JavaScript loading. -- HTML rewriting. -- Cache lifetime extension. - -see more [https://developers.google.com/speed/pagespeed/module/][1]. - -### Prerequisites ### - -Ubuntu Server 15.04 64 bit -root privileges - -What we will do in this tutorial : - -- Install the prerequisite packages. -- Installing nginx with ngx_pagespeed. -- Testing. - -#### Install the prerequisite packages #### - -sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev - -#### Installing nginx with ngx_pagespeed #### - -**Step 1 - Adding nginx repository** - - vim /etc/apt/sources.list.d/nginx.list - -add the line: - - deb http://nginx.org/packages/ubuntu/ trusty nginx - deb-src http://nginx.org/packages/ubuntu/ trusty nginx - -Update your repository: - - sudo apt-get update - -note : if you get the messege : GPG error [...] NO_PUBKEY [...] bla bla - -please add the the key: - - sudo sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYNUMBER - sudo apt-get update - -**Step 2 - Download nginx 1.8 from ubuntu repository** - - sudo su - cd ~ - mkdir -p ~/new/nginx_source/ - cd ~/new/nginx_source/ - apt-get source nginx - apt-get build-dep nginx - -**Step 3 - Download Pagespeed** - - cd ~ - mkdir -p ~/new/ngx_pagespeed/ - cd ~/new/ngx_pagespeed/ - ngx_version=1.9.32.3 - wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${ngx_version}-beta.zip - unzip release-${ngx_version}-beta.zip - - cd ngx_pagespeed-release-1.9.32.3-beta/ - wget https://dl.google.com/dl/page-speed/psol/${ngx_version}.tar.gz - tar -xzf 1.9.32.3.tar.gz - -**Step 4 - Configure nginx to build with Pagespeed** - - cd ~/new/nginx_source/nginx-1.8.0/debin/ - vim rules - -add the module under CFLAGS `.configure` : - - --add-module=../../ngx_pagespeed/ngx_pagespeed-release-1.9.32.3-beta \ - -![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/1.png) - -![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/2.png) - -**Step 5 - Build nginx package and Install** - - cd ~/new/nginx_source/nginx-1.8.0/ - dpkg-buildpackage -b - -The dpkg-buildpackage command will build the nginx.deb under ~/new/ngix_source/ Once package building is complete, please look in the directory: - - cd ~/new/ngix_source/ - ls - -![nginx builded with pagespeed](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/3.png) - -And then install nginx. - - dpkg -i nginx_1.8.0-1~trusty_amd64.deb - -![Install nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/4.png) - -#### Testing #### - -Run nginx -V to see the ngx_pagespeed was builted with nginx. - - nginx -V - -![nginx -V](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/5.png) - -### Conclusion ### - -The nginx web server there is a stable and fast open source http server that supports a variety of modules for optimization. One of these modules is the 'PageSpeed module' which is developed by google. Unlike apache, nginx modules are not dynamically loadable, so you have to select the desired modules before you build the nginx package. - --------------------------------------------------------------------------------- - -via: https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-15-04/#step-build-nginx-package-and-install - -作者:Muhammad Arul -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://developers.google.com/speed/pagespeed/module/ diff --git a/translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md b/translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md new file mode 100644 index 0000000000..91d16acb00 --- /dev/null +++ b/translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md @@ -0,0 +1,129 @@ +如何在Ubuntu 15.04(Vivid Vervet)中安装nginx和google pagespeed +================================================================================ +Nginx (engine-x)是一个开源高性能http、反向代理和IMAP/POP3代理服务器。nginx杰出的功能有:稳定、丰富的功能集、简单的配置和低资源消耗。nginx被用于一些高性能网站并在站长之间变得越来越流行。本教程会从源码构建一个带有google paespeed模块用于Ubuntu 15.04中的.deb包。 + + +pagespeed是一个由google开发的web服务器模块来加速网站响应时间、优化html和减少页面加载时间。ngx_pagespeed的功能如下: + +- 图像优化:去除meta数据、动态剪裁、重压缩。 +- CSS与JavaScript 放大、串联、内联、外联。 +- 小资源内联 +- 延迟图像与JavaScript加载 +- HTML重写。 +- 缓存生命期插件 + +更多请见 [https://developers.google.com/speed/pagespeed/module/][1]. + +### 预备要求 ### + +Ubuntu Server 15.04 64位 +root 权限 + +本篇我们将要: + +- 安装必备包 +- 安装带ngx_pagespeed的nginx +- 测试 + +#### 安装必备包 #### + +sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev + +#### 安装带ngx_pagespeed的nginx #### + +**第一步 - 添加nginx仓库** + + vim /etc/apt/sources.list.d/nginx.list + +加入下面的行: + + deb http://nginx.org/packages/ubuntu/ trusty nginx + deb-src http://nginx.org/packages/ubuntu/ trusty nginx + +更新仓库: + + sudo apt-get update + +注意:如果你看到信息:GPG error [...] NO_PUBKEY [...] 等等 + +请添加key: + + sudo sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYNUMBER + sudo apt-get update + +**第二步 - 从仓库下载nginx 1.8** + + sudo su + cd ~ + mkdir -p ~/new/nginx_source/ + cd ~/new/nginx_source/ + apt-get source nginx + apt-get build-dep nginx + +**第三步 - 下载Pagespeed** + + cd ~ + mkdir -p ~/new/ngx_pagespeed/ + cd ~/new/ngx_pagespeed/ + ngx_version=1.9.32.3 + wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${ngx_version}-beta.zip + unzip release-${ngx_version}-beta.zip + + cd ngx_pagespeed-release-1.9.32.3-beta/ + wget https://dl.google.com/dl/page-speed/psol/${ngx_version}.tar.gz + tar -xzf 1.9.32.3.tar.gz + +**第三步 - 配置nginx来编译Pagespeed** + + cd ~/new/nginx_source/nginx-1.8.0/debin/ + vim rules + +在CFLAGS `.configure`下添加模块: + + --add-module=../../ngx_pagespeed/ngx_pagespeed-release-1.9.32.3-beta \ + +![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/1.png) + +![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/2.png) + +**第五步 - 打包nginx包并安装** + + cd ~/new/nginx_source/nginx-1.8.0/ + dpkg-buildpackage -b + +dpkg-buildpackage会编译 ~/new/ngix_source/成nginx.deb。打包完成后,看一下目录: + + cd ~/new/ngix_source/ + ls + +![nginx builded with pagespeed](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/3.png) + +接着安装nginx。 + + dpkg -i nginx_1.8.0-1~trusty_amd64.deb + +![Install nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/4.png) + +#### 测试 #### + +运行nginx -V测试nginx是否已经自带ngx_pagespeed。 + + nginx -V + +![nginx -V](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/5.png) + +### 总结 ### + +稳定、快速、开源的nginx支持许多不同的优化模块。这其中之一是google开发的‘pagespeed’。不像apache,nginx模块不是动态加载的,因此你必须在编译之前就选择完需要的模块。 + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-15-04/#step-build-nginx-package-and-install + +作者:Muhammad Arul +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://developers.google.com/speed/pagespeed/module/ From d7ad1dd0602030b16f9a4a97287369c806a834da Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 11 Jun 2015 21:09:22 +0800 Subject: [PATCH 1145/2517] Revert "translated" This reverts commit 2e29b9bdeb8c5f00bd93ba43bee28fc5b15bff13. --- ... pagespeed on Ubuntu 15.04 Vivid Vervet.md | 131 ++++++++++++++++++ ... pagespeed on Ubuntu 15.04 Vivid Vervet.md | 129 ----------------- 2 files changed, 131 insertions(+), 129 deletions(-) create mode 100644 sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md delete mode 100644 translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md diff --git a/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md b/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md new file mode 100644 index 0000000000..dd3478c903 --- /dev/null +++ b/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md @@ -0,0 +1,131 @@ +translating----geekpi + +How to Install nginx and google pagespeed on Ubuntu 15.04 (Vivid Vervet) +================================================================================ +Nginx (engine-x) is a open source and high performance HTTP server, reverse proxy and IMAP/POP3 proxy server. The outstanding features of Nginx are: stability, rich feature set, simple configuration and low resource consumption. Nginx is being used by some of the largest websites on the internet and is gaining more and more popularity in the webmaster community. This tutorials shows how to build a nginx .deb package for Ubuntu 15.04 from source that has Google pagespeed module compiled in. + + +Pagespeed is a web server module developed by Google to speed up a website response times, optimize html and reduce the page load time. ngx_pagespeed features include : + +- Image optimization: stripping meta-data, dynamic resizing, recompression. +- CSS & JavaScript minification, concatenation, inlining, and outlining. +- Small resource inlining. +- Deferring image and JavaScript loading. +- HTML rewriting. +- Cache lifetime extension. + +see more [https://developers.google.com/speed/pagespeed/module/][1]. + +### Prerequisites ### + +Ubuntu Server 15.04 64 bit +root privileges + +What we will do in this tutorial : + +- Install the prerequisite packages. +- Installing nginx with ngx_pagespeed. +- Testing. + +#### Install the prerequisite packages #### + +sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev + +#### Installing nginx with ngx_pagespeed #### + +**Step 1 - Adding nginx repository** + + vim /etc/apt/sources.list.d/nginx.list + +add the line: + + deb http://nginx.org/packages/ubuntu/ trusty nginx + deb-src http://nginx.org/packages/ubuntu/ trusty nginx + +Update your repository: + + sudo apt-get update + +note : if you get the messege : GPG error [...] NO_PUBKEY [...] bla bla + +please add the the key: + + sudo sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYNUMBER + sudo apt-get update + +**Step 2 - Download nginx 1.8 from ubuntu repository** + + sudo su + cd ~ + mkdir -p ~/new/nginx_source/ + cd ~/new/nginx_source/ + apt-get source nginx + apt-get build-dep nginx + +**Step 3 - Download Pagespeed** + + cd ~ + mkdir -p ~/new/ngx_pagespeed/ + cd ~/new/ngx_pagespeed/ + ngx_version=1.9.32.3 + wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${ngx_version}-beta.zip + unzip release-${ngx_version}-beta.zip + + cd ngx_pagespeed-release-1.9.32.3-beta/ + wget https://dl.google.com/dl/page-speed/psol/${ngx_version}.tar.gz + tar -xzf 1.9.32.3.tar.gz + +**Step 4 - Configure nginx to build with Pagespeed** + + cd ~/new/nginx_source/nginx-1.8.0/debin/ + vim rules + +add the module under CFLAGS `.configure` : + + --add-module=../../ngx_pagespeed/ngx_pagespeed-release-1.9.32.3-beta \ + +![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/1.png) + +![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/2.png) + +**Step 5 - Build nginx package and Install** + + cd ~/new/nginx_source/nginx-1.8.0/ + dpkg-buildpackage -b + +The dpkg-buildpackage command will build the nginx.deb under ~/new/ngix_source/ Once package building is complete, please look in the directory: + + cd ~/new/ngix_source/ + ls + +![nginx builded with pagespeed](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/3.png) + +And then install nginx. + + dpkg -i nginx_1.8.0-1~trusty_amd64.deb + +![Install nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/4.png) + +#### Testing #### + +Run nginx -V to see the ngx_pagespeed was builted with nginx. + + nginx -V + +![nginx -V](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/5.png) + +### Conclusion ### + +The nginx web server there is a stable and fast open source http server that supports a variety of modules for optimization. One of these modules is the 'PageSpeed module' which is developed by google. Unlike apache, nginx modules are not dynamically loadable, so you have to select the desired modules before you build the nginx package. + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-15-04/#step-build-nginx-package-and-install + +作者:Muhammad Arul +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://developers.google.com/speed/pagespeed/module/ diff --git a/translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md b/translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md deleted file mode 100644 index 91d16acb00..0000000000 --- a/translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md +++ /dev/null @@ -1,129 +0,0 @@ -如何在Ubuntu 15.04(Vivid Vervet)中安装nginx和google pagespeed -================================================================================ -Nginx (engine-x)是一个开源高性能http、反向代理和IMAP/POP3代理服务器。nginx杰出的功能有:稳定、丰富的功能集、简单的配置和低资源消耗。nginx被用于一些高性能网站并在站长之间变得越来越流行。本教程会从源码构建一个带有google paespeed模块用于Ubuntu 15.04中的.deb包。 - - -pagespeed是一个由google开发的web服务器模块来加速网站响应时间、优化html和减少页面加载时间。ngx_pagespeed的功能如下: - -- 图像优化:去除meta数据、动态剪裁、重压缩。 -- CSS与JavaScript 放大、串联、内联、外联。 -- 小资源内联 -- 延迟图像与JavaScript加载 -- HTML重写。 -- 缓存生命期插件 - -更多请见 [https://developers.google.com/speed/pagespeed/module/][1]. - -### 预备要求 ### - -Ubuntu Server 15.04 64位 -root 权限 - -本篇我们将要: - -- 安装必备包 -- 安装带ngx_pagespeed的nginx -- 测试 - -#### 安装必备包 #### - -sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev - -#### 安装带ngx_pagespeed的nginx #### - -**第一步 - 添加nginx仓库** - - vim /etc/apt/sources.list.d/nginx.list - -加入下面的行: - - deb http://nginx.org/packages/ubuntu/ trusty nginx - deb-src http://nginx.org/packages/ubuntu/ trusty nginx - -更新仓库: - - sudo apt-get update - -注意:如果你看到信息:GPG error [...] NO_PUBKEY [...] 等等 - -请添加key: - - sudo sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYNUMBER - sudo apt-get update - -**第二步 - 从仓库下载nginx 1.8** - - sudo su - cd ~ - mkdir -p ~/new/nginx_source/ - cd ~/new/nginx_source/ - apt-get source nginx - apt-get build-dep nginx - -**第三步 - 下载Pagespeed** - - cd ~ - mkdir -p ~/new/ngx_pagespeed/ - cd ~/new/ngx_pagespeed/ - ngx_version=1.9.32.3 - wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${ngx_version}-beta.zip - unzip release-${ngx_version}-beta.zip - - cd ngx_pagespeed-release-1.9.32.3-beta/ - wget https://dl.google.com/dl/page-speed/psol/${ngx_version}.tar.gz - tar -xzf 1.9.32.3.tar.gz - -**第三步 - 配置nginx来编译Pagespeed** - - cd ~/new/nginx_source/nginx-1.8.0/debin/ - vim rules - -在CFLAGS `.configure`下添加模块: - - --add-module=../../ngx_pagespeed/ngx_pagespeed-release-1.9.32.3-beta \ - -![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/1.png) - -![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/2.png) - -**第五步 - 打包nginx包并安装** - - cd ~/new/nginx_source/nginx-1.8.0/ - dpkg-buildpackage -b - -dpkg-buildpackage会编译 ~/new/ngix_source/成nginx.deb。打包完成后,看一下目录: - - cd ~/new/ngix_source/ - ls - -![nginx builded with pagespeed](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/3.png) - -接着安装nginx。 - - dpkg -i nginx_1.8.0-1~trusty_amd64.deb - -![Install nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/4.png) - -#### 测试 #### - -运行nginx -V测试nginx是否已经自带ngx_pagespeed。 - - nginx -V - -![nginx -V](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/5.png) - -### 总结 ### - -稳定、快速、开源的nginx支持许多不同的优化模块。这其中之一是google开发的‘pagespeed’。不像apache,nginx模块不是动态加载的,因此你必须在编译之前就选择完需要的模块。 - --------------------------------------------------------------------------------- - -via: https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-15-04/#step-build-nginx-package-and-install - -作者:Muhammad Arul -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://developers.google.com/speed/pagespeed/module/ From cf572298718cd959d853e3c7201775baf97a8f56 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 11 Jun 2015 21:12:23 +0800 Subject: [PATCH 1146/2517] translated --- ... pagespeed on Ubuntu 15.04 Vivid Vervet.md | 131 ------------------ ... pagespeed on Ubuntu 15.04 Vivid Vervet.md | 129 +++++++++++++++++ 2 files changed, 129 insertions(+), 131 deletions(-) delete mode 100644 sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md create mode 100644 translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md diff --git a/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md b/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md deleted file mode 100644 index dd3478c903..0000000000 --- a/sources/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md +++ /dev/null @@ -1,131 +0,0 @@ -translating----geekpi - -How to Install nginx and google pagespeed on Ubuntu 15.04 (Vivid Vervet) -================================================================================ -Nginx (engine-x) is a open source and high performance HTTP server, reverse proxy and IMAP/POP3 proxy server. The outstanding features of Nginx are: stability, rich feature set, simple configuration and low resource consumption. Nginx is being used by some of the largest websites on the internet and is gaining more and more popularity in the webmaster community. This tutorials shows how to build a nginx .deb package for Ubuntu 15.04 from source that has Google pagespeed module compiled in. - - -Pagespeed is a web server module developed by Google to speed up a website response times, optimize html and reduce the page load time. ngx_pagespeed features include : - -- Image optimization: stripping meta-data, dynamic resizing, recompression. -- CSS & JavaScript minification, concatenation, inlining, and outlining. -- Small resource inlining. -- Deferring image and JavaScript loading. -- HTML rewriting. -- Cache lifetime extension. - -see more [https://developers.google.com/speed/pagespeed/module/][1]. - -### Prerequisites ### - -Ubuntu Server 15.04 64 bit -root privileges - -What we will do in this tutorial : - -- Install the prerequisite packages. -- Installing nginx with ngx_pagespeed. -- Testing. - -#### Install the prerequisite packages #### - -sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev - -#### Installing nginx with ngx_pagespeed #### - -**Step 1 - Adding nginx repository** - - vim /etc/apt/sources.list.d/nginx.list - -add the line: - - deb http://nginx.org/packages/ubuntu/ trusty nginx - deb-src http://nginx.org/packages/ubuntu/ trusty nginx - -Update your repository: - - sudo apt-get update - -note : if you get the messege : GPG error [...] NO_PUBKEY [...] bla bla - -please add the the key: - - sudo sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYNUMBER - sudo apt-get update - -**Step 2 - Download nginx 1.8 from ubuntu repository** - - sudo su - cd ~ - mkdir -p ~/new/nginx_source/ - cd ~/new/nginx_source/ - apt-get source nginx - apt-get build-dep nginx - -**Step 3 - Download Pagespeed** - - cd ~ - mkdir -p ~/new/ngx_pagespeed/ - cd ~/new/ngx_pagespeed/ - ngx_version=1.9.32.3 - wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${ngx_version}-beta.zip - unzip release-${ngx_version}-beta.zip - - cd ngx_pagespeed-release-1.9.32.3-beta/ - wget https://dl.google.com/dl/page-speed/psol/${ngx_version}.tar.gz - tar -xzf 1.9.32.3.tar.gz - -**Step 4 - Configure nginx to build with Pagespeed** - - cd ~/new/nginx_source/nginx-1.8.0/debin/ - vim rules - -add the module under CFLAGS `.configure` : - - --add-module=../../ngx_pagespeed/ngx_pagespeed-release-1.9.32.3-beta \ - -![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/1.png) - -![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/2.png) - -**Step 5 - Build nginx package and Install** - - cd ~/new/nginx_source/nginx-1.8.0/ - dpkg-buildpackage -b - -The dpkg-buildpackage command will build the nginx.deb under ~/new/ngix_source/ Once package building is complete, please look in the directory: - - cd ~/new/ngix_source/ - ls - -![nginx builded with pagespeed](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/3.png) - -And then install nginx. - - dpkg -i nginx_1.8.0-1~trusty_amd64.deb - -![Install nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/4.png) - -#### Testing #### - -Run nginx -V to see the ngx_pagespeed was builted with nginx. - - nginx -V - -![nginx -V](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/5.png) - -### Conclusion ### - -The nginx web server there is a stable and fast open source http server that supports a variety of modules for optimization. One of these modules is the 'PageSpeed module' which is developed by google. Unlike apache, nginx modules are not dynamically loadable, so you have to select the desired modules before you build the nginx package. - --------------------------------------------------------------------------------- - -via: https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-15-04/#step-build-nginx-package-and-install - -作者:Muhammad Arul -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://developers.google.com/speed/pagespeed/module/ diff --git a/translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md b/translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md new file mode 100644 index 0000000000..91d16acb00 --- /dev/null +++ b/translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md @@ -0,0 +1,129 @@ +如何在Ubuntu 15.04(Vivid Vervet)中安装nginx和google pagespeed +================================================================================ +Nginx (engine-x)是一个开源高性能http、反向代理和IMAP/POP3代理服务器。nginx杰出的功能有:稳定、丰富的功能集、简单的配置和低资源消耗。nginx被用于一些高性能网站并在站长之间变得越来越流行。本教程会从源码构建一个带有google paespeed模块用于Ubuntu 15.04中的.deb包。 + + +pagespeed是一个由google开发的web服务器模块来加速网站响应时间、优化html和减少页面加载时间。ngx_pagespeed的功能如下: + +- 图像优化:去除meta数据、动态剪裁、重压缩。 +- CSS与JavaScript 放大、串联、内联、外联。 +- 小资源内联 +- 延迟图像与JavaScript加载 +- HTML重写。 +- 缓存生命期插件 + +更多请见 [https://developers.google.com/speed/pagespeed/module/][1]. + +### 预备要求 ### + +Ubuntu Server 15.04 64位 +root 权限 + +本篇我们将要: + +- 安装必备包 +- 安装带ngx_pagespeed的nginx +- 测试 + +#### 安装必备包 #### + +sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev + +#### 安装带ngx_pagespeed的nginx #### + +**第一步 - 添加nginx仓库** + + vim /etc/apt/sources.list.d/nginx.list + +加入下面的行: + + deb http://nginx.org/packages/ubuntu/ trusty nginx + deb-src http://nginx.org/packages/ubuntu/ trusty nginx + +更新仓库: + + sudo apt-get update + +注意:如果你看到信息:GPG error [...] NO_PUBKEY [...] 等等 + +请添加key: + + sudo sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYNUMBER + sudo apt-get update + +**第二步 - 从仓库下载nginx 1.8** + + sudo su + cd ~ + mkdir -p ~/new/nginx_source/ + cd ~/new/nginx_source/ + apt-get source nginx + apt-get build-dep nginx + +**第三步 - 下载Pagespeed** + + cd ~ + mkdir -p ~/new/ngx_pagespeed/ + cd ~/new/ngx_pagespeed/ + ngx_version=1.9.32.3 + wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${ngx_version}-beta.zip + unzip release-${ngx_version}-beta.zip + + cd ngx_pagespeed-release-1.9.32.3-beta/ + wget https://dl.google.com/dl/page-speed/psol/${ngx_version}.tar.gz + tar -xzf 1.9.32.3.tar.gz + +**第三步 - 配置nginx来编译Pagespeed** + + cd ~/new/nginx_source/nginx-1.8.0/debin/ + vim rules + +在CFLAGS `.configure`下添加模块: + + --add-module=../../ngx_pagespeed/ngx_pagespeed-release-1.9.32.3-beta \ + +![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/1.png) + +![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/2.png) + +**第五步 - 打包nginx包并安装** + + cd ~/new/nginx_source/nginx-1.8.0/ + dpkg-buildpackage -b + +dpkg-buildpackage会编译 ~/new/ngix_source/成nginx.deb。打包完成后,看一下目录: + + cd ~/new/ngix_source/ + ls + +![nginx builded with pagespeed](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/3.png) + +接着安装nginx。 + + dpkg -i nginx_1.8.0-1~trusty_amd64.deb + +![Install nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/4.png) + +#### 测试 #### + +运行nginx -V测试nginx是否已经自带ngx_pagespeed。 + + nginx -V + +![nginx -V](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/5.png) + +### 总结 ### + +稳定、快速、开源的nginx支持许多不同的优化模块。这其中之一是google开发的‘pagespeed’。不像apache,nginx模块不是动态加载的,因此你必须在编译之前就选择完需要的模块。 + +-------------------------------------------------------------------------------- + +via: https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-15-04/#step-build-nginx-package-and-install + +作者:Muhammad Arul +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://developers.google.com/speed/pagespeed/module/ From e25117711c325dbb281d33b5d9f4366040bfcaea Mon Sep 17 00:00:00 2001 From: Alan You <1058413893@qq.com> Date: Thu, 11 Jun 2015 22:23:44 +0800 Subject: [PATCH 1147/2517] Create 20150515 How to Install Percona Server on CentOS 7.md translated --- ...w to Install Percona Server on CentOS 7.md | 220 ++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 translated/tech/20150515 How to Install Percona Server on CentOS 7.md diff --git a/translated/tech/20150515 How to Install Percona Server on CentOS 7.md b/translated/tech/20150515 How to Install Percona Server on CentOS 7.md new file mode 100644 index 0000000000..ef283c8b92 --- /dev/null +++ b/translated/tech/20150515 How to Install Percona Server on CentOS 7.md @@ -0,0 +1,220 @@ + +如何在CentOS 7上安装Percona Server + +================================================================================ +在这篇文章中我们将了解关于Percona Server,一个开源简易的MySQL,MariaDB的替代。InnoDB的数据库引擎使得Percona Server非常有吸引力,如果你需要的高性能,高可靠性和高性价比的解决方案,它将是一个很好的选择。 + +在下文中将介绍在CentOS 7上Percona的服务器的安装,以及备份当前数据,配置的步骤和如何恢复备份。 + + +###目录### + + +1.什么是Percona,为什么使用它 +2.备份你的数据库 +3.删除之前的SQL服务器 +4.使用二进制包安装Percona +5.配置Percona +6.保护你的数据 +7.恢复你的备份 + + +### 1.什么是Percona,为什么使用它 ### + + +Percona是一个开源简易的MySQL,MariaDB数据库的替代,它是MYSQL的一个分支,相当多的改进和独特的功能使得它比MYSQL更可靠,性能更强,速度更快,它与MYSQL完全兼容,你甚至可以在Oracle的MYSQL与Percona之间使用复制命令。 + +#### 在Percona中独具特色的功能 #### + + +-分段自适应哈希搜索 +-快速校验算法 +-缓冲池预加载 +-支持FlashCache + +#### MySQL企业版和Percona的特定功能 #### + +-从不同的服务器导入表 +-PAM认证 +-审计日志 +-线程池 + + +现在,你肯定很兴奋地看到这些好的东西整理在一起,我们将告诉你如何安装和做些的Percona Server的基本配置。 + +### 2. 备份你的数据库 ### + + +接下来,在命令行下使用SQL命令创建一个mydatabases.sql文件来重建/恢复salesdb和employeedb数据库,重命名数据库以便反映你的设置,如果没有安装MYSQL跳过此步 + + mysqldump -u root -p --databases employeedb salesdb > mydatabases.sql + +复制当前的配置文件,如果你没有安装MYSQL也可跳过 + + + cp my.cnf my.cnf.bkp + +### 3.删除之前的SQL服务器 ### + + +停止MYSQL/MariaDB如果它们还在运行 + + + systemctl stop mysql.service + +卸载MariaDB和MYSQL + + + yum remove MariaDB-server MariaDB-client MariaDB-shared mysql mysql-server + +移动重命名在/var/lib/mysql当中的MariaDB文件,这比仅仅只是移除更为安全快速,这就像2级即时备份。:) + + + mv /var/lib/mysql /var/lib/mysql_mariadb + +### 4.使用二进制包安装Percona ### + + +你可以在众多Percona安装方法中选择,在CentOS中使用Yum或者RPM包安装通常是更好的主意,所以这些是本文介绍的方式,下载源文件编译后安装在本文中并没有介绍。 + + +从Yum仓库中安装: + + +首先,你需要设置的Percona的Yum库: + + + yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm + +接下来安装Percona: + + + yum install Percona-Server-client-56 Percona-Server-server-56 + +上面的命令安装Percona的服务器和客户端,共享库,可能需要Perl和Perl模块,以及其他依赖的需要。如DBI::MySQL的,如果这些尚未安装, + +使用RPM包安装: + + +我们可以使用wget命令下载所有的rpm包: + + + wget -r -l 1 -nd -A rpm -R "*devel*,*debuginfo*" \ http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-5.5.42-37.1/binary/redhat/7/x86_64/ + +使用rpm工具,一次性安装所有的rpm包: + + + rpm -ivh Percona-Server-server-55-5.5.42-rel37.1.el7.x86_64.rpm \ Percona-Server-client-55-5.5.42-rel37.1.el7.x86_64.rpm \ Percona-Server-shared-55-5.5.42-rel37.1.el7.x86_64.rpm + +注意在上面命令语句中最后的反斜杠'\',如果您安装单独的软件包,记住要解决依赖关系,在安装客户端之前要先安装共享包,在安装服务器之前请先安装客户端。 + +### 5.配置Percona服务器 ### + + + +#### 恢复之前的配置 #### + + +当我们从MariaDB迁移过来时,你可以将之前的my.cnf的备份文件恢复回来。 + + + cp /etc/my.cnf.bkp /etc/my.cnf + +#### 创建一个新的my.cnf文件 #### + + +如果你需要一个适合你需求的新的配置文件或者你并没有备份配置文件,你可以使用以下方法,通过简单的几步生成新的配置文件。 + +下面是Percona-server软件包自带的my.cnf文件 + + + # Percona Server template configuration + + [mysqld] + # + # Remove leading # and set to the amount of RAM for the most important data + # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. + # innodb_buffer_pool_size = 128M + # + # Remove leading # to turn on a very important data integrity option: logging + # changes to the binary log between backups. + # log_bin + # + # Remove leading # to set options mainly useful for reporting servers. + # The server defaults are faster for transactions and fast SELECTs. + # Adjust sizes as needed, experiment to find the optimal values. + # join_buffer_size = 128M + # sort_buffer_size = 2M + # read_rnd_buffer_size = 2M + datadir=/var/lib/mysql + socket=/var/lib/mysql/mysql.sock + + # Disabling symbolic-links is recommended to prevent assorted security risks + symbolic-links=0 + + [mysqld_safe] + log-error=/var/log/mysqld.log + pid-file=/var/run/mysqld/mysqld.pid + +根据你的需要配置好my.cnf后,就可以启动该服务了: + + + systemctl restart mysql.service + +如果一切顺利的话,它已经准备好执行SQL命令了,你可以用以下命令检查它是否已经正常启动: + + + mysql -u root -p -e 'SHOW VARIABLES LIKE "version_comment"' + +如果你不能够正常启动它,你可以在**/var/log/mysql/mysqld.log**中查找原因,该文件可在my.cnf的[mysql_safe]的log-error中设置。 + + tail /var/log/mysql/mysqld.log + +你也可以在/var/lib/mysql/文件夹下查找格式为[hostname].err的文件,就像下面这个例子样: + + + tail /var/lib/mysql/centos7.err + +如果还是没找出原因,你可以试试strace: + + + yum install strace && systemctl stop mysql.service && strace -f -f mysqld_safe +上面的命令挺长的,输出的结果也相对简单,但绝大多数时候你都能找到无法启动的原因。 + +### 6.保护你的数据 ### + +好了,你的关系数据库管理系统已经准备好接收SQL查询,但是把你宝贵的数据放在没有最起码安全保护的服务器上并不可取,为了更为安全最好使用mysql_secure_instalation,这个工具可以帮助删除未使用的默认功能,还设置root的密码,并限制使用此用户进行访问。 +只需要在shell中执行,并参照屏幕上的说明。 + + mysql_secure_install + +### 7.还原备份 ### + +如果您参照之前的设置,现在你可以恢复数据库,只需再用mysqldump一次。 + + + mysqldump -u root -p < mydatabases.sql +恭喜你,你刚刚已经在你的CentOS上成功安装了Percona,你的服务器已经可以正式投入使用;你可以像使用MYSQL一样使用它,你的服务器与他完全兼容。 + +### 总结 ### + +为了获得更强的性能你需要对配置文件做大量的修改,但这里也有一些简单的选项来提高机器的性能。当使用InnoDB引擎时,将innodb_file_per_table设置为on,它将在一个文件中为每个表创建索引表,这意味着每个表都有它自己的索引文件,它使系统更强大和更容易维修。 + +可以修改innodb_buffer_pool_size选项,InnoDB应该有足够的缓存池来应对你的数据集,大小应该为当前可用内存的70%到80%。 + +过将innodb-flush-method设置为O_DIRECT,关闭写入高速缓存,如果你使用了RAID,这可以提升性能因为在底层已经完成了缓存操作。 + +如果你的数据并不是十分关键并且并不需要对数据库事务正确执行的四个基本要素完全兼容,可以将innodb_flush_log_at_trx_commit设置为2,这也能提升系统的性能。 + + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/percona-server-centos-7/ + +作者:[Carlos Alberto][a] +译者:[FatJoe123](https://github.com/FatJoe123) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/carlosal/ From 2eb16fd656fcc8ece9033fe6b6d5bcfa43a43319 Mon Sep 17 00:00:00 2001 From: Alan You <1058413893@qq.com> Date: Thu, 11 Jun 2015 22:23:53 +0800 Subject: [PATCH 1148/2517] Delete 20150515 How to Install Percona Server on CentOS 7.md --- ...w to Install Percona Server on CentOS 7.md | 227 ------------------ 1 file changed, 227 deletions(-) delete mode 100644 sources/tech/20150515 How to Install Percona Server on CentOS 7.md diff --git a/sources/tech/20150515 How to Install Percona Server on CentOS 7.md b/sources/tech/20150515 How to Install Percona Server on CentOS 7.md deleted file mode 100644 index 1ac8d71901..0000000000 --- a/sources/tech/20150515 How to Install Percona Server on CentOS 7.md +++ /dev/null @@ -1,227 +0,0 @@ -translating by FatJoe123 -如何在CentOS 7上安装Percona Server -How to Install Percona Server on CentOS 7 -================================================================================ -在这篇文章中我们将了解关于Percona Server,一个开源简易的MySQL,MariaDB的替代。InnoDB的数据库引擎使得Percona Server非常有吸引力,如果你需要的高性能,高可靠性和高性价比的解决方案,它将是一个很好的选择。 -In this article we are going to learn about percona server, an opensource drop-in replacement for MySQL and also for MariaDB. The InnoDB database engine make it very attractive and a good alternative if you need performance, reliability and a cost efficient solution -在接下来的文节中将涵盖在CentOS的7 Percona的服务器的安装,以及备份当前数据,配置的步骤和如何恢复备份。 -In the following sections I am going to cover the installation of the percona server on the CentOS 7, I will also cover the steps needed to make backup of your current data, configuration and how to restore your backup. - -###目录### -### Table of contents ### - -1.什么是Percona,为什么使用它 -2.备份你的数据库 -3.删除之前的SQL服务器 -4.使用二进制包安装Percona -5.配置Percona -6. -7.恢复你的备份 - -1. What is and why use percona -1. Backup your databases -1. Remove previous SQL server -1. Installing Percona binaries -1. Configuring Percona -1. Securing your environment -1. Restore your backup - -### 1.什么是Percona,为什么使用它 -### 1. What is and why use Percona ### - -Percona是一个开源简易的MySQL,MariaDB数据库的替代,它是MYSQL的一个分支,相当多的改进和独特的功能使得它比MYSQL更可靠,性能更强,速度更快,它与MYSQL完全兼容,在Oracle的MYSQL与Percona之间你甚至都可以使用复制命令。 -Percona is an opensource alternative to the MySQL and MariaDB databases, it's a fork of the MySQL with many improvements and unique features that makes it more reliable, powerful and faster than MySQL, and yet is fully compatible with it, you can even use replication between Oracle's MySQL and Percona. -#### 在Percona中独特的功能 #### -#### Features exclusive to Percona #### - --分段自适应哈希搜索 --快速校验算法 --缓冲池预加载 --支持FlashCache -- Partitioned Adaptive Hash Search -- Fast Checksum Algorithm -- Buffer Pool Pre-Load -- Support for FlashCache - -#### MySQL企业版和Percona的特定功能 #### -#### MySQL Enterprise and Percona specific features #### - --从不同的服务器导入表 --PAM认证 --审计日志 --线程池 - -- Import Tables From Different Servers -- PAM authentication -- Audit Log -- Threadpool - -现在,你肯定很兴奋地看到这些好的东西整理在一起,我们将告诉你如何安装和做些的Percona Server的基本配置。 -Now that you are pretty excited to see all these good things together, we are going show you how to install and do basic configuration of Percona Server. - -### 2. 备份你的数据库 ### -### 2. Backup your databases ### - -接下来,在命令行下使用SQL命令创建一个mydatabases.sql文件来重建/恢复salesdb和employeedb数据库,重命名数据库以便反映你的设置,如果没有安装MYSQL跳过此步 -The following, command creates a mydatabases.sql file with the SQL commands to recreate/restore salesdb and employeedb databases, replace the databases names to reflect your setup, skip if this is a brand new setup - - mysqldump -u root -p --databases employeedb salesdb > mydatabases.sql - -复制当前的配置文件,如果你没有安装MYSQL也可跳过 -Copy the current configuration file, you can also skip this in fresh setups - - cp my.cnf my.cnf.bkp - -### 3.删除之前的SQL服务器 ### -### 3. Remove your previous SQL Server ### - -停止MYSQL/MariaDB如果它们还在运行 -Stop the MySQL/MariaDB if it's running. - - systemctl stop mysql.service - -卸载MariaDB和MYSQL -Uninstall MariaDB and MySQL - - yum remove MariaDB-server MariaDB-client MariaDB-shared mysql mysql-server - -移动重命名在/var/lib/mysql当中的MariaDB文件,这比仅仅只是移除更为安全快速,这就像2级即时备份。:) -Move / Rename the MariaDB files in **/var/lib/mysql**, it's a safer and faster than just removing, it's like a 2nd level instant backup. :) - - mv /var/lib/mysql /var/lib/mysql_mariadb - -### 4.使用二进制包安装Percona ### -### 4. Installing Percona binaries ### - -你可以在众多Percona安装方法中选择,在CentOS中使用Yum或者RPM包安装通常是更好的主意,所以这些是本文介绍的方式,下载源文件编译后安装在本文中并没有介绍。 - -You can choose from a number of options on how to install Percona, in a CentOS system it's generally a better idea to use yum or RPM, so these are the way that are covered by this article, compiling and install from sources are not covered by this article. - -从Yum仓库中安装: -Installing from Yum repository: - -首先,你需要用这个设置的Percona的Yum库: -First you need to set the Percona's Yum repository with this: - - yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm - -接下来安装Percona: -And then install Percona with: - - yum install Percona-Server-client-56 Percona-Server-server-56 - -上面的命令安装Percona的服务器和客户端,共享库,可能需要Perl和Perl模块,如DBI::MySQL的,如果尚未安装,以及其他依赖的需要。 -The above command installs Percona server and clients, shared libraries, possibly Perl and perl modules such as DBI::MySQL, if that are not already installed, and also other dependencies as needed. - -Installing from RPM package: - -We can download all rpm packages with the help of wget: - - wget -r -l 1 -nd -A rpm -R "*devel*,*debuginfo*" \ http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-5.5.42-37.1/binary/redhat/7/x86_64/ - -And with rpm utility, you install all the packages once: - - rpm -ivh Percona-Server-server-55-5.5.42-rel37.1.el7.x86_64.rpm \ Percona-Server-client-55-5.5.42-rel37.1.el7.x86_64.rpm \ Percona-Server-shared-55-5.5.42-rel37.1.el7.x86_64.rpm - -Note the backslash '\' on the end of the sentences on the above commands, if you install individual packages, remember that to met dependencies, the shared package must be installed before client and client before server. - -### 5. Configuring Percona Server ### - -#### Restoring previous configuration #### - -As we are moving from MariaDB, you can just restore the backup of my.cnf file that you made in earlier steps. - - cp /etc/my.cnf.bkp /etc/my.cnf - -#### Creating a new my.cnf #### - -If you need a new configuration file that fit your needs or if you don't have made a copy of my.cnf, you can use this wizard, it will generate for you, through simple steps. - -Here is a sample my.cnf file that comes with Percona-Server package - - # Percona Server template configuration - - [mysqld] - # - # Remove leading # and set to the amount of RAM for the most important data - # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. - # innodb_buffer_pool_size = 128M - # - # Remove leading # to turn on a very important data integrity option: logging - # changes to the binary log between backups. - # log_bin - # - # Remove leading # to set options mainly useful for reporting servers. - # The server defaults are faster for transactions and fast SELECTs. - # Adjust sizes as needed, experiment to find the optimal values. - # join_buffer_size = 128M - # sort_buffer_size = 2M - # read_rnd_buffer_size = 2M - datadir=/var/lib/mysql - socket=/var/lib/mysql/mysql.sock - - # Disabling symbolic-links is recommended to prevent assorted security risks - symbolic-links=0 - - [mysqld_safe] - log-error=/var/log/mysqld.log - pid-file=/var/run/mysqld/mysqld.pid - -After making your my.cnf file fit your needs, it's time to start the service: - - systemctl restart mysql.service - -If everything goes fine, your server is now up and ready to ready to receive SQL commands, you can try the following command to check: - - mysql -u root -p -e 'SHOW VARIABLES LIKE "version_comment"' - -If you can't start the service, you can look for a reason in **/var/log/mysql/mysqld.log** this file is set by the **log-error** option in my.cnf's **[mysqld_safe]** session. - - tail /var/log/mysql/mysqld.log - -You can also take a look in a file inside **/var/lib/mysql/** with name in the form of **[hostname].err** as the following example: - - tail /var/lib/mysql/centos7.err - -If this also fail in show what is wrong, you can also try strace: - - yum install strace && systemctl stop mysql.service && strace -f -f mysqld_safe - -The above command is extremely verbous and it's output is quite low level but can show you the reason you can't start service in most times. - -### 6. Securing your environment ### - -Ok, you now have your RDBMS ready to receive SQL queries, but it's not a good idea to put your precious data on a server without minimum security, it's better to make it safer with mysql_secure_instalation, this utility helps in removing unused default features, also set the root main password and make access restrictions for using this user. -Just invoke it by the shell and follow instructions on the screen. - - mysql_secure_install - -### 7. Restore your backup ### - -If you are coming from a previous setup, now you can restore your databases, just use mysqldump once again. - - mysqldump -u root -p < mydatabases.sql - -Congratulations, you just installed Percona on your CentOS Linux, your server is now fully ready for use; You can now use your service as it was MySQL, and your services are fully compatible with it. - -### Conclusion ### - -There is a lot of things to configure in order to achieve better performance, but here is some straightforward options to improve your setup. When using innodb engine it's also a good idea to set the **innodb_file_per_table** option **on**, it gonna distribute table indexes in a file per table basis, it means that each table have it's own index file, it makes the overall system, more robust and easier to repair. - -Other option to have in mind is the **innodb_buffer_pool_size** option, InnoDB should have large enough to your datasets, and some value **between 70% and 80%** of the total available memory should be reasonable. - -By setting the **innodb-flush-method** to **O_DIRECT** you disable write cache, if you have **RAID**, this should be set to improved performance as this cache is already done in a lower level. - -If your data is not that critical and you don't need fully **ACID** compliant transactions, you can adjust to 2 the option **innodb_flush_log_at_trx_commit**, this will also lead to improved performance. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/percona-server-centos-7/ - -作者:[Carlos Alberto][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/carlosal/ From d0aff8d13f681c729c683bdd4ab3589efa16f480 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 11 Jun 2015 22:42:51 +0800 Subject: [PATCH 1149/2517] PUB:20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops @geekpi --- ...a Gorgeous GTK Theme for Linux Desktops.md | 57 +++++++++++++++++++ ...a Gorgeous GTK Theme for Linux Desktops.md | 55 ------------------ 2 files changed, 57 insertions(+), 55 deletions(-) create mode 100644 published/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md delete mode 100644 translated/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md diff --git a/published/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md b/published/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md new file mode 100644 index 0000000000..e8fd8c6dbd --- /dev/null +++ b/published/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md @@ -0,0 +1,57 @@ +一款很棒的GTK桌面主题:Arc +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/arc-gtk-theme.jpg) + +距离本站上次推荐的GTK主题已经过了很久了。但是看到上图中的Arc主题后,就值得打破冷场了。我们不能不推荐它! + +### Arc GTK主题 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/see-through-theme.png) + +*透明,并不符合每个人的口味* + +Arc是一个扁平化主题并有微妙的配色方案,窗口的选中区域是透明的,如GTK的顶栏和Nautilus的侧边栏。 + +它的效果不像我们之前介绍的主题那样将程序渲染的像那么混乱。有点像 OSX Yosemite,效果用的不多但是很好。 + +与之伴随的图标集(称为Vertex)同样工作的很好。 + +**是的它支持Unity** + +Arc主题支持基于GTK3和GTK2桌面环境,包含Gnome Shell(当然了)和标准的Ubuntu Unity。 + +它可以很好地游刃于轻量级的Budgie和elementary的Pantheon桌面之间,并且与Cinnamon配合也不错。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/Screen-Shot-2015-06-02-at-18.07.15.png) + +*Arc中的开关、滑块和小挂件* + +它并不容易下载与安装- *understatement klaxon* - 因为它还在密集开发中。 + +安装包需要GTK 3.14及以上,这意味着Ubuntu 14.04 LTS和14.10的用户无法使用了。 + +那些使用Ubuntu 15.04的用户可以使用这个主题。你可以添加ppa或者双击.deb包来安装。 + +如果你喜欢它,你需要卷起你的袖子并查看github上的编译指导。 + +- [Github中Arc安装指导][1] + +更新6/7:现在可以使用软件库来安装它(由 openSUSE 用户 Horst1380 创建,也可用于 Ubuntu 用户),也可以下载预打包的 .deb 文件。 + +- [Horst31890 的 Arc 主题库][2] +- [下载 Arc 主题 .deb][3] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/06/arc-gtk-theme + +作者:[Joey-Elijah Sneddon][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://github.com/horst3180/Arc-theme +[2]:http://software.opensuse.org/download.html?project=home%3AHorst3180&package=arc-theme +[3]:http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_15.04/all/arc-theme_1433786431.697b2c3_all.deb \ No newline at end of file diff --git a/translated/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md b/translated/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md deleted file mode 100644 index 14dd88ef70..0000000000 --- a/translated/share/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md +++ /dev/null @@ -1,55 +0,0 @@ -Arc是一个很棒的Linux桌面的GTK主题 -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/arc-gtk-theme.jpg) - -距离本站上次推荐的GTK主题已经过了很久了。 - -但是看到上面的Arc后,需要纠正这点了。 - -我们不能不提到它。 - -### Arc GTK主题 ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/see-through-theme.png) - -Transparency. Not to everyones’ taste. -透明并不符合每个人的口味 - -Arc是一个扁平化主题并有微妙的配色并部分选中的窗口透明,就像GTK的顶拦和Nautilus的侧边栏。 - - -它的效果不像我们之前的主题那样将程序渲染的像躲猫猫那样混乱。像OSX Yosemite,效果用的不变多但是很好。 - -随之的图标集(称为Vertex)同样可用。 - -**是的它支持Unity** - -Arc主题支持基于GTK3和GTK2桌面环境,包含Gnome Shell(当然)和标准的Ubuntu Unity。 - -它也可以很好地与轻量级的Budgie和elementary的Pantheon桌面以及也可以工作在Cinnamon上。 - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/Screen-Shot-2015-06-02-at-18.07.15.png) - -Arc中的开关、滑块和小挂件。 - -它并不容易下载与安装- *understatement klaxon* - 因为它还在密集开发中。 - - -安装包需要GTK 3.14或者更新,这意味着Ubuntu 14.04 LTS和14.10的用户无法使用了。 - -那些使用Ubuntu 15.04的用户可以使用这个主题。你还不能添加ppa或者双击.deb包。如果你喜欢你看见的你需要卷起你的袖子并查看github上的编译指导。 - -- [Github中Arc安装指导][1] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/06/arc-gtk-theme - -作者:[Joey-Elijah Sneddon][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://github.com/horst3180/Arc-theme From aa6668080ff88d363b633c897a10a7511e417623 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 11 Jun 2015 23:30:14 +0800 Subject: [PATCH 1150/2517] PUB:20150209 How to access Feedly RSS feed from the command line on Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @chenzhijun 翻译的不错,有些错别字下回需要注意。另外,注意保持原文的 markdown 段落等格式。 明天下午就可以看到了: https://linux.cn/article-5615-1.html --- ...RSS feed from the command line on Linux.md | 111 ++++++++++++++++ ...RSS feed from the command line on Linux.md | 123 ------------------ 2 files changed, 111 insertions(+), 123 deletions(-) create mode 100644 published/20150209 How to access Feedly RSS feed from the command line on Linux.md delete mode 100644 translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md diff --git a/published/20150209 How to access Feedly RSS feed from the command line on Linux.md b/published/20150209 How to access Feedly RSS feed from the command line on Linux.md new file mode 100644 index 0000000000..6eac136d1a --- /dev/null +++ b/published/20150209 How to access Feedly RSS feed from the command line on Linux.md @@ -0,0 +1,111 @@ +在 Linux 上如何用命令行获取 Freely RSS 源 +================================================================================ + +也许你并不知道 Feedly,它是世界上最流行的在线新闻聚合服务之一;它提供了平滑而一致的新闻阅读体验,你可以使用电脑的浏览器扩展,Android 和 iOS 设备上的移动应用程序等来体验Feedly。Feedly 在2013年Google Reader 停用后,迅速的获得了一大批Google Reader的用户。我就是他们之中的一位。从这以后,Feedly就一直是我的默认RSS(简易信息聚合)阅读器。 + +除了使用我非常喜欢的Feedly浏览器扩展和手机上的Feedly程序,这里还有一种途径来获取Feedly:Linux命令行。没错,你可以用命令行来获取Feedly上的新闻概要。听起来非常傻?但是对于那些在服务器上工作的系统管理员来说,这是非常有用的。 + +点击进入[Feednix][2],这个用c++编写的开源软件是Feedly的非官方命令行客户端。它允许你在一个基于ncurses的终端界面(例如:bash)下浏览Feedly的新闻。默认模式下,Feednix 关联了一个叫做 w3m 的基于控制台的浏览器,允许你在命令行终端的环境下阅读文章。当然你也可以选择使用你喜欢的网页浏览器。 + +在这个教程中,我准备示范一下怎样在命令行下安装和配置Feednix 来获取Feedly。 + +### 在Linux下安装Feednix ### + +你可以通过以下的步骤从源代码中构建Feednix。同时,在其官方的github仓库的Ubuntu-stable(Ubuntu稳定版本)的分支上有最新的Feednix源代码。现在让我们开始吧: + +作为必要组件,你需要安装一组开发包,和w3m浏览器(文字式页面浏览器)。 + +#### 在Debian、Ubuntu 和Linux Mint 操作 #### + + $ sudo apt-get install git automake g++ make libncursesw5-dev libjsoncpp-dev libcurl4-gnutls-dev w3m + $ git clone -b Ubuntu-stable https://github.com/Jarkore/Feednix.git + $ cd Feednix + $ ./autogen.sh + $ ./configure + $ make + $ sudo make install + + +#### 在Fedora 下操作 #### + + $ sudo yum groupinstall "C Development Tools and Libraries" + $ sudo yum install gcc-c++ git automake make ncurses-devel jsoncpp-devel libcurl-devel w3m + $ git clone -b Ubuntu-stable https://github.com/Jarkore/Feednix.git + $ cd Feednix + $ ./autogen.sh + $ ./configure + $ make + $ sudo make install + +#### Arch Linux #### + +在Arch Linux发行版下,你可以非常容易的从 [AUR][3]安装Feednix。 + +### 配置Feednix ### + +在安装完软件后,用下面的命令启动Feednix + + $ feednix + +如果你是第一次运行Feddnix,它会弹出一个网页浏览器窗口,在这个窗口里,你需要登录来创建一个Feedly的账户ID和相应的开发人员密钥。 + +如果你是在无桌面环境下运行Feednix,先在另外一台电脑上打开一个网页,进入到网站:https://feedly.com/v3/auth/dev 。 + +![](https://farm8.staticflickr.com/7427/15825106524_42883b3e32_b.jpg) + +当你登录后,你对应的Feedly账户ID就生成了。 + +![](https://farm9.staticflickr.com/8565/15827565143_eb93db9c81_b.jpg) + +为了得到一个访问密钥,你需要在浏览器上访问发送你的邮箱中的密钥链接。之后就会在浏览器窗口显示你的用户ID,密钥,和密钥的有效期。请注意密钥的长度是非常长的(超过200个字符),所以密钥显示在一个带有垂直滚动条的文本框内,请确保把整个密钥复制下来。 + +![](https://farm9.staticflickr.com/8605/16446685812_9098df494b_b.jpg) + +像下面这样,把你的用户ID和密钥输入到Feddnix的命令行提示下: + + [Enter User ID] >> XXXXXX + [Enter token] >> YYYYY + +成功授权后,你会在屏幕上见到一个初始化为两个窗格的Feednix界面。左边的标题为“Categories”窗格,显示了一个新闻分类栏;右边“Posts”窗格显示了当前类别的新闻文章。 + +![](https://farm8.staticflickr.com/7412/16421639256_deb8e2d276_c.jpg) + +### 用Feednix读文章 ### + +这里我想简要描叙一下怎样通过Feednix来访问Feedly。 + +#### 在Feednix中导航 #### + +像我之前提过的,Feednix窗口包含了两个窗格。想在两个窗口之间进行切换的话,可以使用"TAB"健。想在一个窗格内的列表中上下移动,可以使用"j"和"k"。这些快捷健明显是受到了Vim编辑器的启发。 + +#### 阅读文章 #### + +想阅读一篇特定的文章,可以在当前的文章上使用"o"健。它会调用w3m浏览器,并且在浏览器里面加载文章。当你读完之后,可以使用"q"健来退出浏览器,并返回到Feednix。如果你的电脑环境允许打开网页浏览器,你可以按"0"健来在你默认的网页浏览器里面加载文章,比如使用Firefox。 + +![](https://farm8.staticflickr.com/7406/16445870201_b98e8da6d9_b.jpg) + +#### 订阅新闻源 #### + +你可以在Feednix界面中来为你的Feedly账户增加任何一种RSS新闻源。要这么做,仅仅只需要按下"a"键,它会在屏幕底部显示一个"[ENTER FEED]:"的提示。在输入完RSS新闻源后,继续输入新闻源的名字和及其首选分类。 + +![](https://farm8.staticflickr.com/7324/16421639296_b52ed3c52e_c.jpg) + +#### 总结 #### + +如你所见, Feednix 是一个非常方便易用的命令行RSS阅读器。如果你是重度依赖命令行的用户,同时也是一个Feedly用户的话,Feednix 是肯定值得去尝试的。我和Feednix的开发者Jarkore交流解决了一些问题。我想说,对于[bug的报告][4]和修复他非常的积极。鼓励大家来试用Feednix,并且给他(Jarkore)一些回馈。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/feedly-rss-feed-command-line-linux.html + +作者:[Dan Nanni][a] +译者:[chenzhijun](https://github.com/chenzhijun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://feedly.com/ +[2]:https://github.com/Jarkore/Feednix +[3]:https://aur.archlinux.org/packages/feednix/ +[4]:https://github.com/Jarkore/Feednix/issues diff --git a/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md b/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md deleted file mode 100644 index 4109ceb947..0000000000 --- a/translated/tech/20150209 How to access Feedly RSS feed from the command line on Linux.md +++ /dev/null @@ -1,123 +0,0 @@ -从Linux命令行获取基于RSS协议的Feedly上信息 -================================================================================ - -也许你并不知道,Feedly --世界上最流行的在线新闻聚合服务之一;它提供了无缝地统一的新闻阅读体验,你可以使用电脑的浏览器扩展,Android 和 iOS 设备上的移动应用程序等来体验Feedly。Feedly 在2013年Google Reader 停用后,迅速的获得了一大批Google Reader的用户。我就是他们之中的一位。从这以后,Feedly就一直是我的默认RSS(简易信息聚合)阅读器 -除了我非常喜欢的Feedly浏览器扩展和手机上的Feedly程序,这里还有一种途径来获取Feedly:Linux command-line (Linux命令行) -对的。你可以用命令行来获取Feedly上的新闻概要。 - -听起来非常傻?但是对于那些在服务器上工作的系统管理员来说,这是非常有用的。 -点击进入[Feednix][2]. 这个用c++编写的开源软件是Feedly的非官方命令行客户端。它允许你浏览Feedly的新闻在一个基于字符的终端界面(例如:bash)。默认模式下,Feednix 连接了一个基于控制台的浏览器,这个浏览器的名字叫w3m,允许你在命令行终端的环境下阅读文章。当然你也可以选择使用你喜欢的网页浏览器。在这个教程中,我准备示范以下怎样在命令行下安装和配置Feednix 来获取获取Feedly。 - -### 在Linux下安装Feednix ### - -你可以通过以下的步骤从源代码中安装Feednix。同时,在github的Ubuntu分区里面Ubuntu-stable(Ubuntu稳定版本)的分支上有最新的Feednix源代码。现在让我们开始吧: -作为必要组件,你需要安装一组开发包,和w3m浏览器(文字式页面浏览器)。 - -#### 在Debian,Ubuntu 和Linux Mint 操作 #### - - $ sudo apt-get install git automake g++ make libncursesw5-dev libjsoncpp-dev libcurl4-gnutls-dev w3m - $ git clone -b Ubuntu-stable https://github.com/Jarkore/Feednix.git - $ cd Feednix - $ ./autogen.sh - $ ./configure - $ make - $ sudo make install - - -#### 在Fedora 下操作 #### - - $ sudo yum groupinstall "C Development Tools and Libraries" - $ sudo yum install gcc-c++ git automake make ncurses-devel jsoncpp-devel libcurl-devel w3m - $ git clone -b Ubuntu-stable https://github.com/Jarkore/Feednix.git - $ cd Feednix - $ ./autogen.sh - $ ./configure - $ make - $ sudo make install - -Arch Linux - -在Arch Linux发行版下, 你可以非常容易的安装Feednix 从 [AUR][3]. - - -### 配置Feednix ### - -在安装完软件后,用下面的命令启动Feednix - - $ feednix - -如果你是第一次运行Feddnix,它会弹出一个网页浏览器窗口,在这个窗口里,你需要登陆来创建一个Feedly的账户ID和相应的开发人员密钥。 - -如果你是在无桌面环境下运行Feednix,先在另外一台电脑上打开一个网页,进入到网站:https://feedly.com/v3/auth/dev. - -![](https://farm8.staticflickr.com/7427/15825106524_42883b3e32_b.jpg) - -一旦你登陆,你对应的Feedly账户ID就生成了。 - -![](https://www.flickr.com/photos/xmodulo/15827565143/) - -为了验证密钥,你需要在浏览器上允许验证密钥的链接发送你的邮箱。之后就会在浏览器窗口显示你的用户ID,密钥,和密钥的有效期。 -请注意密钥的长度是非常超过200个字符的。所以密钥显示在一个带有垂直滚动条的文书框内,请确保把整个密钥的长度复制下来。 - -![](https://farm9.staticflickr.com/8605/16446685812_9098df494b_b.jpg) - -向下面这样,把你的用户ID和密钥输入到Feddnix的命令行提示下: - - [Enter User ID] >> XXXXXX - [Enter token] >> YYYYY - -成功授权后,你会在屏幕上见到一个初始化的有两个窗格的Feednix界面 - -左边的标题为“Categories”窗格,显示了一个新闻分类栏;右边“Posts”窗格显示了当前类别的新闻文章 - -![](https://farm8.staticflickr.com/7412/16421639256_deb8e2d276_c.jpg) - - -### 用Feednix读文章 ### - -这里我想简要描叙一下怎样通过Feednix来访问Feedly。 - - -#### Feednix界面 #### - -向我之前提过的,Feednix窗口包含了两个窗格。想在两个窗口之间进行切换的话,可以使用"TAB"健。在一个窗格内,想上下移动选择可以使用"j"和"k"。 -这些快捷健明显是受到了使用Vim编辑器的人启发。 - -#### 阅读文章 #### - -想阅读一些有特色的文章,可以在选定的文章上使用"o"健。它会调用w2m浏览器,并且在浏览器里面加载文章。 -一旦你读完之后,可以使用"q"健来推出当前W2m浏览器,并且返回到Feednix. -如果你的电脑环境允许打开一个网页浏览器,你可以按"0"健来在你默认的网页浏览器里面家在文章,比如使用Firefox. - - -![](https://farm8.staticflickr.com/7406/16445870201_b98e8da6d9_b.jpg) - - -#### 订阅新闻 #### - -你可以通过Feednix来为你的Feedly账户增加任何一种RSS新闻。 -要这么做,仅仅只需要按下"a"键,它会显示一个"[ENTER FEED]:"的提示在屏幕上,然后按下"ENTER" -在选择完RSS新闻后,继续为它编写分组信息和分类。 - -![](https://farm8.staticflickr.com/7324/16421639296_b52ed3c52e_c.jpg) - -#### 总结 #### - - -现在你知道了吧, Feednix 是一个非常友好的并且容易使用的命令行RSS阅读器。如果你是重度依赖命令行的用户或者是一个Feedly用户,Feednix 是肯定值得去尝试的。 -我经常和Feednix的开发者Jarkore交流来解决一些问题。我想说,对于bug的报告和修复他非常的积极。 -鼓励大家来试用Feednix,并且给他(Jarkore)一些回馈。 --------------------------------------------------------------------------------- - -via: http://xmodulo.com/feedly-rss-feed-command-line-linux.html - -作者:[Dan Nanni][a] -译者:[chenzhijun](https://github.com/chenzhijun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:https://feedly.com/ -[2]:https://github.com/Jarkore/Feednix -[3]:https://aur.archlinux.org/packages/feednix/ From 7f623c6628759dbac4dc7568590306b8bf82d53c Mon Sep 17 00:00:00 2001 From: theo-l Date: Thu, 11 Jun 2015 22:39:24 -0300 Subject: [PATCH 1151/2517] I translated the documentation of tmux, just take a look --- translated/tech/Tmux_doc_cn.md | 1646 ++++++++++++++++++++++++++++++++ 1 file changed, 1646 insertions(+) create mode 100644 translated/tech/Tmux_doc_cn.md diff --git a/translated/tech/Tmux_doc_cn.md b/translated/tech/Tmux_doc_cn.md new file mode 100644 index 0000000000..5d2ac507c2 --- /dev/null +++ b/translated/tech/Tmux_doc_cn.md @@ -0,0 +1,1646 @@ +- [名称](#名称) +- [用法](#用法) +- [描述](#描述) +- [键绑定](#键绑定) +- [命令](#命令) +- [客户端和会话](#客户端和会话) +- [窗口和面板](#窗口和面板) + - [窗口和面板命令](#窗口和面板命令) +- [键绑定2](#键绑定2) + - [键绑定命令](#键绑定命令) +- [选项](#选项) + - [选项设置](#选项设置) + - [服务器选项](#服务器选项) + - [会话选项](#会话选项) + - [窗口选项](#窗口选项) +- [鼠标支持](#鼠标支持) +- [格式](#格式) +- [名称和标题](#名称和标题) +- [环境](#环境) +- [状态行](#状态行) +- [缓冲区](#缓冲区) +- [杂项](#杂项) +- [TERMINFO EXTENSIONS](#TERMINFO EXTENSIONS) +- [控制模式](#控制模式) +- [文件](#文件) +- [样例](#样例) + + +##名称 +tmux — terminal multiplexer(终端复用器) + +##用法: + + tmux [-2lCuv] [-c shell-command] [-f file] [-L socket-name] [-S socket-path] [command [flags]] + +##描述 + +tmux是一个终端复用器:它可以在单个屏幕中创建、访问以及控制多个终端。 +tmux也可以从窗口中脱离附着并且继续在后台运行,以便在之后再回到会话。 +当开启tmux之后,它会创建带有一个单独窗口的会话并且在屏幕中进行显示。 +在屏幕底部的状态行显示当前会话的信息并且用来进入交互式命令。 +一个会话是一个在tmux管理下的伪终端集合,每个会话具有一个或多个窗口与其链接。 +一个窗口占用了整个屏幕,并且可以被分割成长方形的面板,每个面板分别为一个伪终端。 +多个tmux实例可能连接到同一个会话,并且任何的窗口可能在一个会话中表示。 +当所有的会话被终止之后,tmux就会退出。 + +每个会话都是持久的并且可能在意外失联或故意脱离附着之后生存下来,tmux可以使用下面的命令来恢复原来的会话: + + $ tmux attach + +在tmux中,一个会话由一个客户端在整个屏幕中显示,并且所有的会话都是由一个单独的服务器进行管理的。 +这个服务器以及每个客户端是通过一个在/tmp中的socket进行交流的。 + +*选项描述*: + + '-2' + 强制tmux假设终端支持256颜色。 + + '-C' + 以控制模式开启,使用-CC来让echo失效 + + '-c shell-command' + 使用默认的shell来执行shell命令。 + 如果有必要的话,tmux服务器会开启来检索默认的shell选项。 + 这个选项用来当tmux作为一个登录shell时与sh进行兼容的。 + + '-f file' + 指定一个可选的配置文件,默认情况下,tmux会从/etc/tmux.conf中加载系统配置文件-如果这个文件存在的话。 + 然后会尝试查找用户的配置文件 ~/.tmux.conf。 + 配置文件是一个tmux命令集合,其中的命令在服务器第一次启动时按顺序执行的。 + tmux会在服务器进程启动之后加载一次配置文件。 + "source-file"命令可以用来在稍后加载一个文件。 + tmux在第一次会话创建时会显示配置文件中的命令出现的任何错误,但是会继续处理配置文件的余下部分。 + + '-L socket-name' + tmurx 将服务器*socsket*存储在*TMUX_TMPDIR*目录下,如果这个变量没有设置的话就会使用*TMPDIR*替换, + 或者当两者都不存在时,就会存储在 /tmp 目录下。默认的*socket*的名称为*default*。 + 这个选项允许指定一个不同的socket名称,允许多个独立的tmux服务器运行。 + 与-S不同的是,不需要使用全路经:所有的sockets文件会创建在一个相同的目录下。 + 如果socket被意外地删除了,那么SIGUSR1信号会发送给tmux服务器进程来重新创建socket文件(注意如果当之前描述的任何 + 父目录不存在的话会出错)。 + + '-l' + 当作一个登录shell使用,当前这个标记没有什么效果是当tmux被用来作为登录shell时与其他shell进行兼容的。 + + '-S socket-path' + 为服务器的socket指定一个可选的全路经,当这个选项指定之后,那么默认的目录不会被使用,并且-L选项会被忽略。 + + '-u' + tmux尝试通过第一个LC_ALL,LC_CTYPE和LANG环境变量来猜测终端是否可能支持UTF-8,这可能不会总是正确。 + -u 选项显式地告知tmux UTF-8是支持的。 + 如果服务器通过客户端传递-u或者检测到UTF-8进行启动的,那么utf8和status-utf8选项会分别在全局窗口和会话选项中生效。 + + '-v' + 请求详细登录,这个选项可能由于不断增长的修饰词被多次指定。登录消息会被存储在当前目录下的tmux-clientPID.log + 和tmux-serverPID.log文件中。其中的PID代表服务器或客户端进程ID。 + + 'command [flags]' + 这个用来指定命令集合中的一个来控制tmux,如果没有指定任何命令那么假设一个新建会话命令。 + +##键绑定 + +tmux可以通过一个前缀键与跟随的命令键进行结合的方式从一个附着的客户端进行控制,前缀键默认为'C-b' + +默认的命令键绑定为: + + 结合键 |含义 +-------------------------------------|--------------------- + C-b |给应用发送一个前缀键 C-b + C-o |将当前窗口中的面板向前切换。 + C-z |将tmux客户端挂起 + ! |将当前面板在窗口中突出显示 + " |将当前的面板分割为上下两个面板 + # |列出所有的粘贴缓存 + $ |重命名当前会话 + % |将当前面板分割为左右两个面板 + & |终止当前窗口 + ' |显示一个窗口索引来进行选择 + ( |将当前附着的客户端转换到前一个会话 + ) |将附着的客户端转换到下一个会话 + , |重命名当前窗口 + - |删除最近的复制文本缓存 + . |提示一个索引来移动当前窗口 + 0-9 |选择0-9个窗口 + : |输入tmux命令提示 + ; |移动到前面的活动面板 + = |从一个列表中选择一个缓存来交互式粘贴。 + ? |列出所有的键绑定 + D |选择一个客户端来脱离其附着 + L |将附着的客户端切换到最后一个会话中 + [ |输入赋值模式来复制文本或查看历史 + ] |粘贴最近复制的文本缓存 + c |创建一个新的窗口 + d |脱离当前的客户端 + f |提示在打开的窗口中搜索文本 + i |显示关于当前窗口的一些信息 + l |移动到之前选择的窗口 + n |移动到下一个窗口 + o |移动到当前窗口的下一个面板 + p |移动到之前的窗口 + q |简单地显示面板索引 + r |强制重绘附着的客户端 + s |为当前附着的客户端交互式地选择一个新的会话 + t |显示时间 + w |交互式地选择当前的窗口 + x |终止当前的面板 + z |切换当前面板的放大状态 + { |使用之前的面板来替换当前的面板 + } |使用下一个面板来替换当前的面板 + ~ |显示tmux之前的消息如果存在的话。 + PageUp |进入复制模式并且将页面向上滚动一页。 + Up,Down,Left,Right |转换到当前面板的上, 下,左,右 + M-1到M-5(M=Alt) |将面板按照预设的1-5个布局进行安排:偶数水平,偶数垂直,主水平,主垂直或平铺 + Space |将当前窗口按照下一个预设布局进行安排 + M-n |移动到下一个窗口并且带有一个响铃或者活动标记 + M-o |将当前窗口中的面板从前向后反转 + M-p |移动到前一个窗口并且带有响铃或者活动标记 + C-Up, C-Down C-Left, C-Right |以一个单格的步调调整当前面板的大小 + M-Up, M-Down M-Left, M-Right |以五个单格的步调调整当前面板的大小 + +键绑定可以通过bind-key和unbind-key命令来改变。 + + +##命令 + +这部分包含了tmux支持的命令列表,大部分的命令接收可选的-t参数与一个目标客户端,目标会话,目标窗口或者目标面板。 +它们指定了受命令影响的客户端,会话,窗口或面板 + +目标客户端应该为客户端链接的pty文件的名称,例如对于附着在/dev/ttyp1的客户端可能为 /dev/ttyp1或 +ttyp1。如果没有指定客户端,tmux会尝试当前使用的客户端; +如果失败的话,就会报告一个错误。客户端可以通过list-clients命令列出。 + +目标会话会按照以下顺序进行尝试: + + 1. 一个以$作为前缀的会话ID。 + 2. 一个精确的会话名称(会在list-sessions命令中列出)。 + 3. 会话名称的开始部分,例如“mysess”会匹配一个名为"mysession"的会话。 + 4. 一个与会话名称匹配的fnmatch 模式 + +如果找到了一个单独的会话,就会将其作为目标会话;如果匹配多个会话就会产生错误。 +如果忽略一个会话的话,那么就会使用当前的会话-如果可用的话;如果当前会话不可用,那么最近使用的会话就会被选择。 + +目标窗口通过session:window的格式来指定一个窗口。 会话按照target-session的规则,而窗口会按照以下的顺序来查找: + + 1. 一个下面列表中的特殊标记。 + 2. 一个窗口索引,例如'mysession:1'表示会话'mysession'中的第一个窗口。 + 3. 一个窗口ID,例如@1。 + 4. 一个精确的窗口名称,例如'mysession:mywindow'。 + 5. 一个窗口名称的开始部分,例如'mysession:mywin'。 + 6. 一个于窗口名称相匹配的fnmatch模式。 + 7. 一个空窗口名称制定了下一个未使用的索引如果合适的话(例如new-window或link-window命令), + 否则会话中的当前窗口就被选择。 + +下面的特殊标记可用来指定一个特定的窗口。每个都具有一个可选的单字符格式。 + + 符号 | 别名 | 含义 +--------------|------|--------------- + {start} | ^ | 最小数值的窗口 + {end} | $ | 最大数值的窗口 + {last} | ! | 最后一个窗口 + {next} | + | 按照数字的下一个窗口 + {previous}| - | 按照数字的上一个窗口 + {mouse} | = | 鼠标事件发生的窗口 + +目标面板可以是一个面板ID或者是一个与目标窗口相似的形式,但是带有一个额外可选的跟随面板索引或面板ID的点号“.”。 +如果忽略面板索引的话,那么指定窗口当前的活动面板就会被使用,下面的特殊符号可以作为面板索引使用: + + 符号 |别名 | 含义 +-------------------|------|------------- + {last} | ! | 最后一个面板 + {next} | + | 数字指定的下一个面板 + {previous} | - | 数字指定的前一个面板 + {top} | | 顶端面板 + {bottom} | | 底端面板 + {left} | | 最左端面板 + {right} | | 最右端面板 + {top-left} | | 左顶端面板 + {top-right} | | 右顶端面板 + {bottom-left} | | 左底端面板 + {bottom-right} | | 右底端面板 + {up} | | 活动面板上面的面板 + {down} | | 活动面板下面的面板 + {left} | | 活动面板左边的面板 + {right} | | 活动面板右边的面板 + {mouse} | = | 鼠标事件发生的面板 + +符号'+'和'-'可能跟随一个位移,例如: + + select-window -t:+2 + +会话,窗口和面板都通过一个唯一的ID来进行数字编码; +会话ID带有一个*$*前缀,窗口ID带有一个*@*前缀,面板ID带有一个*%*前缀。 +这些在tmux服务器中的会话,窗口或面板生命周期中都是唯一不变的。 +面板ID通过TMUX_PANE环境变量传递给面板的子进程, +ID可能使用'session_id','window_id'或'pane_id'何display-message,list-sesions,list-windows或list-panes命令的格式进行显示。 + +shell-command 参数是sh命令,这可能是一个传递给shell的参数,例如: + + new-window 'vi /etc/passwd' + +会运行: + /bin/sh -c 'vi /etc/passwd' + +此外,new-window,new-session,split-window, respawn-window以及respawn-pane命令允许 shell-command +作为多参数给定并且可以直接执行(不需要 'sh -C')。 者可以避免shell引用问题,例如: + + $ tmux new-window vi /etc/passwd + +会直接运行vi,而不需要调用shell。 + +命令 [参数] 指向一个tmux命令,命令和参数分别进行传递,例如: + + bind-key F1 set-window-option force-width 81 + +或者,如果使用sh的话: + + $ tmux bind-key F1 set-window-option force-width 81 + +多个命令可以作为命令序列的一部分一起指定,每个命令需要使用空格和分号来分隔; +命令按照从左至右的顺序执行,并且以反斜线结束的行会继续到下一行,除非被另外一个反斜线转义。 +一个字面量分号可以通过一个反斜线进行转义包含进来(例如,当需要制定一个命令行序列给键绑定时) + +tmux命令包含样例: + + refresh-client -t/dev/ttyp2 + rename-session -tfirst newname + set-window-option -t:0 monitor-activity on + new-window ; split-window -d + bind-key R source-file ~/.tmux.conf \; \ + display-message "source-file done" + +或者从sh中: + + $ tmux kill-window -t :1 + $ tmux new-window \; split-window -d + $ tmux new-session -d 'vi /etc/passwd' \; split-window -d \; attach + +##客户端和会话: + +tmux服务器管理客户端,会话,窗口和面板。 +客户端是附着在会话上来与他们交互的,不论他们是通过new-session命令或者之后的attach-session命令创建的会话。 +每个会话具有一个或多个窗口与其链接。 +窗口可以连接到多个会话上,窗口又是有一个或多个面板组成的,每个面板包含了一个伪终端。 +对于创建、链接或其他窗口操作的命令会在 [窗口和面板](#窗口和面板)部分详解。 + +下面的命令可以用来管理客户端和会话: + + attach-session [-dr] [-c working-directory] [-t target-session] + (别名: attach) + +如果在tmux外部来运行,会在当前终端中创建一个新的客户端并且将其附着在一个目标会话上。如果这个命令是在tmux中运行的,就会切换当前的客户端。 +-d 使附着在这个会话上的其他客户端就会脱离, +-r表示这个客户端时只读的(只有键绑定到detach-client或switch-client命令时具有效果)。 +如果没有启动服务器, attach-session 会尝试启动服务器;除非在配置文件中创建了会话否则就会失败。 +对于attach-session命令的目标会话规则稍微有一点调整:如果tmux需要选择最近使用的会话,会偏好选择最近使用的脱离附着的会话。 +-c 设置会话的工作目录(为新窗口所使用)为working-directory + + detach-client [-P] [-a] [-s target-session] [-t target-client] + (别名: detach) + +如果绑定了一个键时会脱离当前客户端,由-t来指定客户端,或者所有附着在由-s指定的会话中的客户端。 +-a选项会终止除-t指定的目标客户端之外的所有客户端。 +-P发送一个SIGHUP信号给当前客户端的父进程,一般是导致其触发退出动作。 + + has-session [-t target-session] + (别名: has) + +如果指定的会话不存在的话,就会报告一个错误并且退出,返回值为1. 如果存在的话,就会退出,返回值为0. + + kill-server + +终止tmux服务器和客户端并且销毁所有的会话。 + + kill-session [-a] [-t target-session] + +销毁指定的会话,关闭连接到会话的任何窗口,并且让所有附着在其上的客户端脱离。 +如果给定了-a选项的话,除了指定的会话之外的会话都被终止。 + + list-clients [-F format] [-t target-session] + (别名: lsc) + +列出附着在服务器上的所有客户端。 对于-F标记,可以参考 [FORMATS](#格式)部分。 +如果给定了目标会话的话,只列出连接到该会话上的客户端。 + + list-commands + (别名: lscm) + +列出所有tmux支持的所有命令语法。 + + list-sessions [-F format] + (别名: ls) + +列出服务器管理的所有会话,对于-F标记,参考 [FORMATS](#格式)部分。 + + lock-client [-t target-client] + (别名: lockc) + +锁定目标客户端, 可以参考 lock-server 命令。 + + lock-session [-t target-session] + (别名: locks) + +锁定附着在目标会话上的所有客户端。 + + new-session [-AdDP] [-c start-directory] [-F format] [-n window-name] [-s session-name] [-t target-session] [-x width] [-y height] [shell-command] + (别名:new) + +使用session-name 来创建一个新的会话。 + +除非给定-d选项,否则新的会话就会附着在当前的终端上。 window-name和shell-comand +是在初始化窗口中执行的窗口和shell命令名称。 +如果使用了-d选项, -x和-y用来指定初始窗口的大小(默认为80x24)。 +如果从终端中运行,任何的termios特殊字符都被保存并且在新会话中的新窗口中使用。 +-A 标记使得新会话与一个附着会话具有相同的行为,如果会话名称已经存在的话;这种情况下,对于attach-session来说-D具有与-d相同的行为。 +如果给定了-t选项,新的会话被分组到目标会话中。 +这就意味着他们共享相同的窗口集合--目标会话中的所有窗口都会连接到新的会话上,并且任何后续的新建窗口或关闭窗口都会被应用在两个会话上。 +当前的窗口和之前的窗口以及任何会话选项保持独立,并且每个会话都会在不影响其他会话的情况下被终止。 +-n或 shell-command只有在使用-t选项时合法。 +-P选项会在新会话创建之后来打印新会话相关信息。默认情况下,会使用'#{session_name}:'格式,但是可以通过-F来指定一个不同的格式。 + + refresh-client [-S] [-t target-client] + (别名:refresh) + +如果绑定了一个键的话会刷新当前客户端,如果使用-t指定了一个客户端的话会刷新单独的客户端。 +-S 只会更新客户端的状态条。 + + rename-session [-t target-session] new-name + (别名:rename) + +重命名会话为一个新名称。 + + show-messages [-IJT] [-t target-client] + (别名:showmsgs) + +显示客户端消息或服务器信息。 +所有显示在状态行的消息都存储在一个客户端独立的消息日志中,具有一个由message-limit选项设置的最大限制。 +-t 显示目标客户端的日志。 +-I,-J 和-T分别显示运行服务器,任务和终端的调试信息。 + + source-file path + (别名:source) + +从路径中来执行命令 + + start-server + (别名:start) + +开启tmux服务器,如果还没有运行,不会创建任何会话。 + + suspend-client [-t target-client] + (别名:suspendc) + +通过发送一个SIGTSTP(tty stop)信号来挂起一个客户端。 + + switch-client [-lnpr] [-c target-client] [-t target-session] [-T key-table] + (别名:switchc) + +将目标客户端所在的当前会话切换到目标会话中, +如果-l, -n或者-p被使用的话,客户端会被分别移动到最后,下一个或上一个会话中。 +-r 转换一个客户端的只读(可以参考attach-session命令) +-T 设置客户端的键表;来自客户端的下一个键会被解释为来自键表。 +这可能会被用在配置多个前缀键时或者绑定命令到一序列键值时使用。 + +例如,让键入'abc'来运行 list-keys命令: + + bind-key -Ttable2 c list-keys + bind-key -Ttable1 b switch-client -Ttable2 + bind-key -Troot a switch-client -Ttable1 + +##窗口和面板 + +一个tmux窗口可能会在处在多个模式中的某一个模式。 +默认的模式时直接访问附着在窗口上的终端。 +另外一个是复制模式,允许一个窗口的一部分或者其历史能够被复制到一个粘贴缓存中,以便稍候插入到另外的窗口中。 +这个模式时使用 copy-mode命令来进入的,默认绑定到'\['上。也会在一个命令产生输出时进入,例如通过键绑定执行的list-keys。 +可用的键依赖于是选择emacs还是vi模式(参考 mode-keys 选项)。 下面的键对于不同的模式具有合适的支持。 + + 函数 |vi模式 |emacs模式 +-------------------------------|-----------|---------------- + Append selection |A | + Back to indentation |^ |M-m + Bottom of history |G |M-< + Clear selection Escape |C-g | + Copy selection Enter |M-w | + Copy to named buffer |" | + Cursor down |j |Down + Cursor left |h |Left + Cursor right |l |Right + Cursor to bottom line |L | + Cursor to middle line |M |M-r + Cursor to top line |H |M-R + Cursor up |k |Up + Delete entire line |d |C-u + Delete/Copy to end of line |D |C-k + End of line |$ |C-e + Go to line |: |g + Half page down |C-d |M-Down + Half page up |C-u |M-Up + Jump again |; |; + Jump again in reverse |, |, + Jump backward |F |F + Jump forward |f |f + Jump to backward |T | + Jump to forward |t | + Next page |C-f |Page down + Next space |W | + Next space, end of word |E | + Next word |w | + Next word end |e |M-f + Other end of selection |o | + Paste buffer |p |C-y + Previous page |C-b |Page up + Previous space |B | + Previous word |b |M-b + Quit mode |q |Escape + Rectangle toggle |v |R + Scroll down |C-Down/C-e |C-Down + Scroll up |C-Up/C-y |C-Up + Search again |n |n + Search again in reverse |N |N + Search backward |? |C-r + Search forward |/ |C-s + Select line |V | + Start of line |0 |C-a + Start selection |Space |C-Space + Top of history |g |M-> + Transpose characters |C-t | + +下一个和上一个单词简默认使用空格和'-','_'以及'@'字符作为单词分隔符,但是可以通过设置会话的word-separators选项进行调整。 +下一个单词会移动到下一个单词的开始位置,下一个单词的末尾会移动到下一个单词的末尾位置, +前一个单词移动到前一个单词的开始位置。 三个下一个和前一个空格键具有相似的作用但是单独使用一个空格作为单词分隔符。 + +跳转命令允许在一个行中快速移动,例如,输入'f'跟随一个'/'会将光标移动到当前行的下一个'/'字符处。 +一个';'之后会移动到字符下一次出现的地方。 + +复制模式中的命令可能由一个可选的重复计数器作为前导,在vi键绑定下,通过数字键来输入前导; +使用emacs时,使用Alt(meta)+数字作为前导实体。例如,为了将光标向前移动10个单词使用'M-1 0 M-f'-对于emacs模式,'10w'-对于vi模式。 + +模式键绑定是通过一个命名表集合定义的:在命令提示的行编辑时使用vi-edit和emacs-edit键, +当从列表中选择时使用vi-choice和emacs-coice键,在复制模式中时使用vi-copy和emacs-copy键。 +这些表可以通过list-keys命令来查看,另外可以通过bind-key和unbund-key命令来修改或移除键。 +如果append-selection,copy-selection或者start-named-buffer给定-x标记,tmux将不会在复制之后退出复制模式。 +copy-pipe复制所选内容并且将其管道到一个命令。 + +例如下面的命令会绑定'C-w'在复制之后不会退出, 'C-q'将所选内容复制到/tmp和粘贴缓冲中。 + + bind-key -temacs-copy C-w copy-selection -x + bind-key -temacs-copy C-q copy-pipe "cat >/tmp/out" + +粘贴缓存键会从栈中顶端的粘贴缓存中粘贴第一行。 +copy-mode命令的简介为: + + copy-mode [-Mu] [-t target-pane] + +进入复制模式。-u选项向上滚动一页。 -M 开始一个鼠标拖拽(只有在绑定鼠标键绑定时有效,参考MOUSE SUPPORT) + +tmux显示的每个窗口可能会被分割为一个或多个面板;每个面板占用一个特定的区域进行显示并且具有一个单独的终端。 +一个窗口可以通过split-window名令分割为多个面板。窗口可以被水平分割(使用-h标记)或者垂直分割。 +面板可以通过resize-pane命令改变大小(默认绑定为'C-up','C-down','C-left','C-right'), +当前的面板可能会通过select-panel命令改变,而rotate-window和swap-panel命令可以在不改变面板位置的情况下切换面板。 +面板被从0开始的数字按顺序计数。 + +有一些默认的预设布局可用,这可以通过select-layout命令来选择或者使用next-layout命令循环选择(默认绑定为'Space'布局); +一旦布局被选定,其中的面板会被移动以及重新改变大小。 + +支持以下的布局: + +even-horizontal: 面板按照偶数地从左到右来分布在窗口中。 +even-vertical: 面板按照偶数地从上到下来分布在窗口中 +main-horizontal: 在窗口的顶端会显示一个大的面板,其余的面板按照从左到右的方式在底部左端的空间分布, +可以使用main-pane-height窗口选项来指定顶部面板的高度。 +main-vertical: 类似于main-horizontal,但是最大的面板会放置在窗口左边而其他的面板按照从上往下的方式在右边进行分布。 +可以参考main-pane-width窗口选项。 +tiled: 面板会尽量将面板在窗口中在行列上以偶数地方式分布。 + +此外,select-layout可以用来应用一个之前使用的布局,list-windows命令会以一个合适的格式显示每个窗口的布局来于select-layout命令结合使用,例如: + + $ tmux list-windows + + 0: ksh [159x48] layout: bb62,159x48,0,0{79x48,0,0,79x48,80,0} + $ tmux select-layout bb62,159x48,0,0{79x48,0,0,79x48,80,0} + +tmux自动地调整当前窗口大小中的布局大小。 注意,一个布局不能应用在多于布局默认定义的面板数量。 + +###窗口和面板命令 +与窗口和面板相关的命令如下: + + break-pane [-dP] [-F format] [-t target-pane] + (别名:breakp) + +将目标面板从其所在的窗口中终止,并将其作为一个新窗口中的唯一的面板。 如果指定-d,新的窗口不会称为当前的窗口。 +-P选项会在新窗口创建之后显示其信息。 默认会使用 +'#{session_name}:#{window_index}'的显示格式,但是可以通过-f来指定一个不同的格式。 + + capture-pane [-aepPq] [-b buffer-name] [-E end-line] [-S start-line] [-t target-pane] + (别名:capturep) +捕获一个面板的内容,如果指定-p,那么输出会到达stdou,否则会到达有-b指定的缓冲区(如果没有指定-b缓冲区的话就会指定一个新的缓冲区)。 +如果指定-a, 会使用备用屏幕,并且历史是不可以访问的。如果没有备用的屏幕,在没有指定-q的情况下会返回一个错误。 +如果指定-e,那么输出会包含文本转义序列和后台属性。 -C 也会转义非打印字符为八进制 \\xxx。 -J +会链接包裹的多行并且保留每行末尾尾随的空格。 -P 只会面板接受到的捕获开头是一个非完整转义序列的任意输出。 +-S 和 -E 指定开始和结束行的行数,0是可视面板的第一行,而负数时历史行。 '-'到 -S是历史的开始,而 +'-'到-E是可视面板的结尾。 默认情况下只会捕获面板的可视内容。 + + choose-client [-F format] [-t target-window] [template] +将一个窗口置于客户端选择模式,允许从一个列表中交互地选择一个客户端。 +在一个客户端被选择之后'%%'会由模板中的客户端pty路径替换,之后的结果会作为一个命令被执行。 +如果模板没有给定,会使用"detach-client -t '%%'"。 +对于-F标记,可以参考[FORMATS](#格式)部分。 这个命令只有在至少一个客户端被附着之后才工作。 + + choose-session [-F format] [-t target-window] [template] +将一个窗口置于会话选择模式中,可以从一个列表中交互式地选择一个会话。 +当一个会话被选择时,'%%'会由模板中的会话名称替换,之后的结果会作为一个命令被执行。 +如果模板没有给定,会使用"switch-client -t '%%'"。 +对于-F标记,可以参考[FORMATS](#格式)部分。这个命令只有在至少有一个客户端附着时工作。 + + choose-tree [-suw] [-b session-template] [-c window-template] [-S format] [-W format] [-t target-window] +将窗口置于一个树选择模式,其中的会话或窗口可能是从一个列表中交互地选择的。 +默认情况下,窗口属于一个会话主要为了显示他们与一个会话的关系。 +注意choose-window和choose-session命令被包裹在choose-tree中。 +如果给定-s会显示会话,如果给定-w会显示窗口。 +默认情形下,树是被折叠起来的,会话必须通过右箭头简将其展开为窗口。 -u选项会将所有的会话展开。 +如果给定-b,会重载默认的会话命令。 注意 '%%'可以被使用而且会被会话名称替换。如果没有指定的话,默认为"switch-client -t +'%%'"。 如果给定-c,会重载默认的窗口命令,与-b类似,'%%'可以被使用而且会被会话名与窗口索引替换。 +当一个窗口从列表中被选择时,会话命令会在窗口命令运行之前运行。 +如果给定-S,会显示指定的格式而不是默认的会话格式。如果给定-W,会显示指定的格式而不是默认的窗口格式。 +对于-s和-w选项的含义可以参考[FORMATS](#格式)部分。 +这个命令只有当至少有一个客户端附着时工作。 + + choose-window [-F format] [-t target-window] [template] +将一个窗口置于一个选择模式,其中的窗口可以从一个列表中交互地选择。 +当选择一个窗口之后,'%%'会被模板中的会话名称和窗括索引替换,之后的结果作为一个命令被执行。 +如果没有给定模板,"select-window -t '%%'"被使用。 +对于-F的含义可以参考[FORMATS](#格式)部分。 这个命令只有在至少一个客户端附着之后才会工作。 + + display-panes [-t target-client] + (别名:displayp) +由一个客户端来显示每个面板的可视化指示器,可以参考 display-panes-time, display-panes-colour和 +display-panes-active-colour会话选项。由于指示器在屏幕上,一个面板可以通过'0-9'键来选择。 + + find-window [-CNT] [-F format] [-t target-window] match-string + (别名:findw) +在窗口名称,标题和可见的内容中搜索fnmatch模式的匹配字符串。标记被用来控制匹配行为: -C只匹配可见窗口内容, +-N只匹配窗口名称,-T匹配窗口标题。 +默认为-CNT。如果只有一个窗口匹配,就会被自动选择,否则就会显示一个选项列表。 +对于-F标记可以参考[FORMATS](#格式)部分。这个命令只有在至少一个客户端被附着时会工作。 + + join-pane [-bdhv] [-l size | -p percentage] [-s src-pane] [-t dst-pane] + (别名:joinp) +与split-window相似,但是取代分割dst-panel并创建一个新面板而代之的是,将其分割并将src-panel移动到空间中。 +这个可以用来逆转break-pane动作。-b选项使得src-pane被联接到dst-pane的左边或上边。 + + kill-pane [-a] [-t target-pane] + (别名:killp) +销毁给定的pane。如果所在窗口中没有剩余的面板,该窗口也会被销毁。 -a选项会销毁除由-t指定面板之外的所有面板。 + + kill-window [-a] [-t target-window] + (别名:killw) +终止当前窗口或目标窗口,将其从所链接的任意会话中移除。 -a选项终止除-t指定窗口之外的所有窗口。 + + last-pane [-de] [-t target-window] + (别名:lastp) +选择最后一个面板,-e 使得输入到面板生效,-d使得输入到面板失效。 + + last-window [-t target-session] + (别名:last) +选择最后一个窗口,如果没有目标窗口指定,选择当前会话中的最后一个窗口。 + + link-window [-dk] [-s src-window] [-t dst-window] + (别名:linkw) +将在src-window的窗口链接到指定的dst-window。如果dst-window被指定但是不存在的话,那么src-window会被链接导那儿。 +如果给定-k并且dst-window存在,那么就会将其终止,否则就会生成一个错误。如果给定-d,新链接的窗口不会被选择。 + + list-panes [-as] [-F format] [-t target] + (别名:lsp) +如果给定-a, 会湖绿target并且会列出服务器上的所有面板。 +如果给定-s,target就是一个会话(或者当前会话)。如果都没有指定,target就是一个窗口(或者当前窗口)。对于-F标记可以参考[FORMATS](#格式)部分。 + + list-windows [-a] [-F format] [-t target-session] + (别名:lsw) +如果给定-a,会列出服务器上的所有窗口。 否则会列出当前会话或target-session中的窗口。对于-F标记可以参考[FORMATS](#格式)部分。 + + move-pane [-bdhv] [-l size | -p percentage] [-s src-pane] [-t dst-pane] + (别名:movep) +与join-pane类似,但是src-pane和dst-pane可以属于相同的窗口。 + + move-window [-rdk] [-s src-window] [-t dst-window] + (别名: movew) +这个于link-window相似,除了src-window中的窗口被移动到dst-window。给定-r会话中的所有窗口都会在遵照base-index选项下按照序列顺序重新编号。 + + new-window [-adkP] [-c start-directory] [-F format] [-n window-name] [-t target-window] [shell-command] + (别名:neww) +创建一个新的窗口,给定-a,新建的窗口会被插入到指定target-window的下一个索引上,必要的话会将窗口向上移,否则target-window就是这个新建的窗口。 + +如果给定-d, 会话不会将新建窗口作为当前窗口。target-window表示将会创建的窗口;如果目标窗口已经存在会显示一个错误,如果使用-k标记就会销毁。 +shell-command是将要执行的命令。如果没有指定shell-command, +default-command选项的值被默认使用。-c选项指定了新窗口创建的工作目录。 +当shell命令完成时,窗口关闭。 参考remain-on-exit选项来改变这个行为。 +对于运行在tmux中的所有程序需要将TERM环境变量设置为"screen"。 +新的窗口会自动将"TERM=screen"加到他们的环境中,但是必须注意不要在shell启动文件中重置这个变量。 +-P 选项在新窗口创建后会打印与之相关的信息。 +默认情况下,使用'#{session_name}:#{window_index}'的格式,但是可以通过使用-F来指定一个不同的格式。 + + next-layout [-t target-window] + (别名:nextl) +将窗口移动到下一个布局模式并且重新安排面板来使之适应。 + + next-window [-a] [-t target-session] + (别名:next) +移动到会话中的下一个窗口,如果-a指定,在移动到下一个窗口时带有警告。 + + pipe-pane [-o] [-t target-pane] [shell-command] + (别名:pipep) +将target-pane中程序的输出通过管道传递给一个shell命令。一个面板可能一次只能管道给一个命令,在shell-command命令执行之前任何存在的管道都会关闭。 +shell-command字符串可能会包含status-left选项所支持的特殊字符序列。 如果没有指定shell-command,那么当前的管道就会被关闭。 +-o选项只有在没有之前的管道存在时打开一个新管道,允许一个管道通过一个单键进行切换,例如: + + bind-key C-p pipe-pane -o 'cat >>~/output.#I-#P' + + + previous-layout [-t target-window] + (别名:prevl ) +移动到会话之前的布局。 + + previous-window [-a] [-t target-session] + (别名:prev) +移动到会话之前的窗口,使用-a选项会带有一个警告。 + + rename-window [-t target-window] new-name + (别名: renamew) +重命名当前窗口或者由-t指定的target-window窗口为new-name + + resize-pane [-DLMRUZ] [-t target-pane] [-x width] [-y height] [adjustment] + (别名:resizep) +重新定义面板的大小,通过-U, -D, -L或-R来调整上下左右,或者通过-x/-y指定绝对值大小。 +调整是通过行或单元格来给定的(默认为1)。 +使用-Z时,活动面板会在放大(占用整个窗口)或未放大(在布局中的正常位置)之间进行切换。 +-M 开始鼠标重定义大小(只有在鼠标键绑定时有效,参考MOUSE SUPPORT部分) + + respawn-pane [-k] [-t target-pane] [shell-command] + (别名:respawnp) +在shell-comman退出之后重新激活面板(可以参考remain-on-exit 窗口选项)。如果没有给定shell-comman, +那么面板创建时所使用的命令会被执行。面板必须是已经激活的状态,如果给定-k,任何存在的命令都会被终止。 + + respawn-window [-k] [-t target-window] [shell-command] + (别名:respawnw) +在shell-command退出之后重新激活窗口(可以参考remain-on-exit窗口选项)。 如果没有指定shell-comman, +那么窗口创建时所使用的命令会被执行。 窗口必须是已经激活的状态,如果指定-k任何存在的命令都会被终止。 + + rotate-window [-DU] [-t target-window] + (别名:rotatew) +轮换窗口中面板的位置,或者通过-U向前或者向后。 + + select-layout [-nop] [-t target-window] [layout-name] + (别名:selectl) +为窗口选择一个特定的布局,如果没有指定布局名称,就会使用最后使用的预设布局并且重新布局。 + + select-pane [-DdegLlRU] [-P style] [-t target-pane] + (别名:selectp) +将target-pane面板作为target-window窗口中的活动面板,或者设置其风格(使用-P)。 +如果使用了-D,-L,-R或者-U的话,就会分别使用target-pane面板的下面,左边,右边或上面的面板。 +-l与使用last-pane命令效果一样。 -e使得输入到面板生效,-d使得输入到面板失效。 + +每个面板具有一个风格:默认使用window-style和window-active-style选项。select-pane -P 为单个面板设置风格。 +例如将第一个面板的北京设置为红色red: + + select-pane -t:.1 -P 'bg=red' + +-g 显示当前面板的样式。 + + select-window [-lnpT] [-t target-window] + (别名:selectw) +选择目标窗口。-l,-n和-p等价于last-window,next-window和previous-window命令。 +如果给定-T,而且选择的窗口已经是当前窗口,那么命令表现为last-windown命令。 + + split-window [-bdhvP] [-c start-directory] [-l size | -p percentage] [-t target-pane] [shell-command] [-F format] + (别名:splitw) +通过分割target-pane窗口来创建一个新面板: -h为水平分割,-v为垂直分割; 默认为垂直分割。 +-l和-p选项指定新面板的行(对于垂直分割)或单元格(水平分割),或者作为百分比。-b选项使得新建面板在target-pane的左边或上边。 +其他的任何选项的含义于new-window命令一样。 + + swap-pane [-dDU] [-s src-pane] [-t dst-pane] + (别名:swapp) +转换两个面板。如果使用-U并且没有通过-s来指定源面板的话,dst-pane会与之前的面板进行转换;-D与下一个面板进行转换。 +-d用来指示tmux不要改变活动面板。 + + swap-window [-d] [-s src-window] [-t dst-window] + (别名:swapw) +这个与link-window类似,除了源面板与目标面板相互转换之外。如果在src-window没有窗口的话会出错。 + + unlink-window [-k] [-t target-window] + (别名:unlinkw) +取消target-window的链接。除非给定-k选项,否则只有当一个窗口链接到多个会话时才会被取消链接-窗口不能链接到空会话; +如果指定-k选项,而且窗口只有与一个会话相关联,那么窗口会被取消该链接并且被销毁。 + +##键绑定2 + + tmux允许一个命令被绑定到大多数键上-无论是否带有前导键。当指定键时,大部分键代表其本身字面量含义(例如'A-Z')。 +Control键可能表示为'C-'或'^'前导,而Alt(meta)表示为'M-'。此外,特殊的键名称也是被接受的:Up,Down, Left, Right, +BSpace, BTab, DC(delete), End, Enter, Escape, F1-F12, Home, IC(insert), NPage/PageDown/PgDn, PPage/PageUp/PgUp, Space和Tab。 +注意为了绑定双引号或单引号键,引号标记是必需的,例如: + + bind-key '"' split-window + bind-key "'" new-window + +###键绑定命令 +与键绑定相关的命令如下: + + bind-key [-cnr] [-t mode-table] [-T key-table] key command [arguments] + (别名:bind) +将键绑定到命令。键被绑定到一个键表中。 +默认情况(没有'-T')时,键被绑定到前导键表中。这个表被用在前导键键入之后再键入的键(例如,'c'默认绑定为前导键表中的新建窗口命令, +所以'C-b c'会创建一个新窗口)。 +根键表被用在不需要前导键的键输入:将'c'在根键表中绑定为新建窗口命令时意味着一个普通的'c'键就会创建一个新窗口。 +'-n' 是 '-T root' 的别名。键同样可以绑定到客制化的键表中,'switch-client -T command' 用来从一个键绑定中切换到相应的键。 +'-r' 标记指定这个键可以重复,参考'repeat-time'选项。 + +如果出现-t选项,那么键会绑定到一个mode-table(模式表): 使用-c来绑定到命令模式,缺省时绑定为普通模式。 +可以参考WINDOWS AND PANES部分,并且 list-keys命令可以查看模式键绑定。 + +为了查看默认的绑定和可用的命令可以参考list-keys 命令: + + list-keys [-t mode-table] [-T key-table] + (别名:lsk) +列出所有的键绑定。 没有指定-T时会打印所有的键表,指定-T时只会打印key-table. +带-t时,在模式表中的键绑定会被列出来; 模式可能为以下之一:vi-edit,emacs-edit,vi-choice,emacs-choice, +vi-copy或emcas-copy。 + + send-keys [-lMR] [-t target-pane] key ... + (别名:send) +发送一个或多个键到一个窗口中,其中的每个参数key是发送的键的名称(例如'C-a'或者'npage'); +如果字符串不能作为键来识别,就会作为一系列字符串发送。 +-l标记让键名查找失效并且发送键的字面量值。所有的参数被按照先后顺序序列地发送。 +-R标记导致终端状态被重置。 +-M 通过一个鼠标时间传递(只有当绑定一个鼠标键绑定时有效,参考MOUSE SUPPORT)。 + + send-prefix [-2] [-t target-pane] +发送前导键-或者发送二级前导键如果与-2一起使用时-到一个窗口就像该键被按下一样。 + + unbind-key [-acn] [-t mode-table] [-T key-table] key + (别名:unbind) +取消命令到键的绑定,-c,-n,-T 和-t与bind-key命令的含义一样。 如果-a存在,所有的键绑定都会被移除。 + +##选项 +tmux的外观和行为可以通过修改各个选项的值来进行改变,具有三种选项:服务器选项,会话选项和窗口选项。 +tmux服务器具有一个全局选项集合--这个选项集合不会应用到任何特定的窗口或会话中。 +这些选项通过'set-option -s'命令进行修改,或者通过'show-options -s' 命令进行显示。 +此外,每个单独的会话可能具有一个会话选项集合,同时具有一个分开全局会话选项集合。 +没有特定选项配置的会话会从全局会话选项中继承其值。会话选项可以通过set-option命令进行设置或重置, +可以通过show-options命令来列出会话选项。可用的服务器和会话选项会在set-option命令下列出。 +类似地,每个窗口都附着了一个窗口选项集合,并且具有一个全局窗口集合来继承所有的重置选项。 +窗口选项使用set-window-option命令来进行修改,并且可以通过show-window-options命令来列出。 +所有的窗口选项使用set-window-option命令归档。 + +tmux也支持以'@'作为前导的用户选项, 用户选项可以具有任何名称,可以被设置为任何字符串,只要具有'@'作为前导,例如: + + $ tmux setw -q @foo "abc123" + $ tmux showw -v @foo + abc123 + +###选项设置 + +设置选项的命令如下: + + set-option [-agoqsuw] [-t target-session | target-window] option value + (别名:set) +通过-w来设置窗口选项(与set-window-option命令等价),-s设置服务器选项,否则设置会话选项。 +如果指定-g,那么全局会话或窗口选项就会被设置。 +-u标记用来重置选项,所以一个会话从全局选项中来继承,不能重置一个全局选项。 +-o标记阻止设置一个已经存在的选项。 +-q标记会取消位置选项发生的错误。 +带有-a时,如果选项期待一个字符串或者一个样式,那么只会被附加在已经设置的值后面,例如: + + set -g status-left "foo" + set -ag status-left "bar" + +会得到'foobar'结果,而: + + set -g status-style "bg=red" + set -ag status-style "fg=blue" + +会得到一个红色背景和蓝色前景的结果。 +没有-a时,这个值会使用默认的背景和一个蓝色前景。 +可用的窗口选项在set-window-option下列出。 +选项的值依赖于选项类型,可以为数字,字符串,或者一个标记(on/off/省略)。 + + + + +###服务器选项 +可选的服务器选项有: + + buffer-limit number +设置缓冲器数量; 新的缓冲器被放置在栈顶端,旧的缓冲器在维护最大长度时有必要时从栈底端移除。 + + default-terminal terminal +为会话中新创键的窗口设置一个默认的终端-默认值为TERM环境变量。为了让tmux正确工作,这个值必须设置为'screen','tmux'或者来自他们的一个派生值。 + + escape-time time +设置一个tmux用来在接受到一个转义字符输入时的等待毫秒数,以此让tmux来判断该字符时函数的一部分还是一个meta键序列的一部分。 +默认为500毫秒。 +设置一个tmux用来在接受到一个转义字符输入时的等待毫秒数,以此让tmux来判断该字符时函数的一部分还是一个meta键序列的一部分。 +默认为500毫秒。 + + exit-unattached [on | off] +如果生效,服务器会在没有任何附着的客户端时退出。 + + + focus-events [on | off] +如果生效,在终端支持的情况下会从终端获取聚焦事件请求,然后通过tmux中运行的应用来传递。 +附着的客户端应该被脱离附着状态然后在选项修改之后重新进行附着。 + + message-limit number +设置每个客户端保存到消息日志中的错误或信息消息的数量,默认为100。 + + set-clipboard [on | off] +尝试使用\e]52;...\007 xterm转义序列来设置终端的剪切版。 +如果在客户终端的terminfo描述中存在一个Ms实体,那么这个选项默认为on. 注意在xterm中需要设置以下资源来让这个特性生效: + + disallowedWindowOps: 20,21,SetXprop + +或者在需要的时候从xterm交互中改变这个属性值。 + + terminal-overrides string +包含了一个个实体列表来重载使用terminfo读取的终端描述信息。 +字符串是一个"逗号"分割的项目列表,每个项目是一个':'分割的字符串来组成终端类型模式以及一个name=value实体集合。 + +例如,为了给所有的终端类型设置terminfo实体'clear'为'\e[H\e[J',以及将'rxvt'终端类型的实体'dch1'的值设置为'\e[P', +那么这个选项会按照以下字符串进行设置: + + "*:clear=\e[H\e[2J,rxvt:dch1=\e[P" + +终端实体值会在解释之前通过strunvis传递,默认的值会强制地更新支持256colors的终端的'colors'实体: + + "*256col*:colors=256,xterm*:XT" + + + +###会话选项 + +可用的会话选项有: + + assume-paste-time milliseconds +如果被键入的键快于用毫秒指定的值,那么这些键会被假设为粘贴而不是键入,而且tmux键绑定不会被执行。默认为一毫秒,0用来让选项失效。 + + base-index index +设置在创建一个新窗口时应该搜索的未使用索引的基索引,默认为0。 + + bell-action [any | none | current] +窗口响铃动作,any表示连接到一个会话的任何窗口中的响铃会导致这个会话中的当前窗口中的一个响铃,none表示所有的响铃被忽略, +current表示除了当前窗口之外的窗口中的响铃将会被忽略。 + + bell-on-alert [on | off] +如果为on,在出现一个警告时,终端会响铃。 + + default-command shell-command +设置新窗口所使用的命令(如果没有指定就是窗口创建时的命令)为shell-command, 可能为任何sh命令。 +默认是一个空字符串,用来指示tmux使用默认shell选项来创建一个登录shell。 + + default-shell path +指定默认的shell, 当default-command为空时,这个会作为新建窗口的登录shell,这个path值必须为完整的路径名。 +在启动之后,tmux会尝试从第一个合适的SHELL环境变量中来设置为默认值,shell由'getpwuid'或者 '/bin/sh'。 +这个选项在将tmux作为一个登录shell使用时应该被配置。 + + destroy-unattached [on | off] +如果生效的话,当会话不再附着在任何客户端时就会被销毁。 + + detach-on-destroy [on | off] +如果为on(默认值), 当附着的会话被销毁时,客户端会脱离附着。 如果off,客户端会被切换为剩余会话中的最近活动的会话。 + + display-panes-active-colour colour +设置为活动面板显示指令的display-panes命令所使用的colour。 + + display-panes-colour colour +设置为不活动面板显示指令的display-panes命令所使用的colour。 + + display-panes-time time +以毫秒为淡灰来设置display-panes命令显示指令出现的时间。 + + display-time time +设置状态行消息和其他屏幕指令显示的时间总和,时间是以毫秒指定的。 + + history-limit lines +设置窗口历史持有的最大行数,这个设置只会应用在新窗口上--退出时窗口历史不会重写大小并且会保留在其创建时段的限制。 + + lock-after-time number +在number秒时间不活动后会锁定会话(与lock-session命令类似),如果lock-server选项被设置的话, +那么整个服务器(所有会话)都会被锁定。默认为不锁定(number为0)。 + + lock-command shell-command +锁定每个客户端时运行的命令,默认为lock -np 命令。 + + lock-server [on | off] +如果选项为on(默认值), 与每个会话单独锁定不同的是,整个服务器会在所有会话被锁定时锁定。 +作为一个会话选项这个没有什么影响,这个必须时一个全局选项。 + + message-command-style style +设置状态行命令样式,样式是一个由逗号分割的字符列表来指定的。 +这些样式可能时'bg=colour'来设置背景颜色,'fg=colour'来设置前景颜色,另外有下面指定的属性列表: + +颜色值可以为这些颜色中的一个:black,red,green, yellow, blue, magenta,cyan,white,aixterm bright +variants(如果支持的话,会有:brightred,breightgreen,等)。 +256-colour集合中从colour0到colour255为默认值,或者一个十六进制的RGB字符串,例如'#ffffff'-会从默认的256-colour集合中选择最匹配的颜色。 +属性既可以为none或者一个逗号分割一个或多个包含(bright(或bold),dim,underscore,blink,reverse, hidden或者italics)的列表来开启属性, +或者带有'no'前缀的属性来关闭属性。 + +样例: + + fg=yellow,bold,underscore,blink + bg=black,fg=default,noreverse + +如果set-option命令具有一个 '-a' 标记的话,新的样式会添加进来,否则已经存在的样式被替换。 + + message-style style +设置状态行消息样式,对于如何指定样式,可以参考message-command-style选项。 + + mouse [on | off] +如果为on,tmux会捕获鼠标并且允许鼠标时间作为键绑定进行结合。 可以参考MOUSE SUPPORT 部分详解。 + + mouse-utf8 [on | off] +如果生效,在UTF-8终端请求鼠标输入作为UTF-8。 + + prefix key +设置接收到的key作为前导键 + + prefix2 key +设置接收到的键作为二级前导键。 + + renumber-windows [on | off] +如果为on, 当一个窗口在会话中关闭时,自动地将其他窗口按照数字顺序重新编序。 +这回参考base-index选项如果设置了这个选项的话。如果为off,不会对窗口进行重新排序。 + + repeat-time time +允许指定的时间内(默认为500毫秒)在不重新输入前导键时输入多个命令。 +一个键是否可以重复可以在使用bind-key命令结合时使用-r选项进行设置。 +对于与resize-pane命令结合的默认键的重复是开启的。 + + set-remain-on-exit [on | off] +为在这个会话中任何第一次创建的窗口设置remain-on-exit窗口选项。 +当这个选项为true时,运行程序所在的窗口在程序退出时不会关闭,而是保持打开但是不活动。 +可以使用respawn-window命令来重新激活这个窗口,或者使用kill-window来销毁窗口。 + +如果tsl和fslterminfo实体存在的话,会尝试用其来设置客户终端的标题。 +如果终端显示为一个xterm的话tmux自动将其设置为\e]2;...\007序列。 +这个选项默认为off。注意elinks只会在设置了STY环境变量时才尝试设置窗口标题。 + + set-titles-string string +如果set-titles为on,那么字符串string就会用来设置窗口标题。 格式被扩展,参考[FORMATS](#格式)部分。 + + status [on | off] +显示或隐藏状态行。 + + status-interval interval +在每个间隔时间段更新状态栏。 默认时没15秒更新。如果为0会让时间间隔重绘状态失效。 + + status-justify [left | centre | right] +设置状态行窗口列表组件的位置:left,center,或者right对齐。 + + status-keys [vi | emacs] +在状态栏使用vi或者emacs-样式的键绑定,例如在命令提示时。默认为emacs, 除非VISUAL +或者EDITOR环境变量被设置并且包含字符串'vi'。 + + status-left string +将字符串(默认为会话名称)显示在状态栏的左边。字符串会通过strftime传递并且格式会被扩展,也可能会包含下面特殊字符序列的任意字符: + + 字符对 | 替换值 +---------------------------|--------------------------------- + #(shell-command) | 命令输出的首行。 + #[attributes] | 颜色或属性改变 + ## | 一个'#'字面量值。 + +'\#(shell-command)'形式执行'shell-command'然后插入其输出的首行。 +注意shell命令只会在由status-interval选项指定的时间间隔内执行一次:如果同时重绘状态的话,会使用之前输出结果。 +shell命令的执行会带有tmux的全局变量集合(参考 ENVIRONMENT部分)。 +对于如何设置名字和标题的细节可以参考NAMES AND TITLES 部分。 对于允许设定的属性可以参考message-command-style选项。 + +样例有: + + #(sysctl vm.loadavg) + #[fg=yellow,bold]#(apm -l)%%#[default] [#S] + +默认字符串中的UTF-8不会被解释,需要使用status-utf8选项来开启UTF-8。 +默认值为'[#s]'。 + + status-left-length length +设置状态栏左边组件的最大长度,默认为10。 + + status-left-style style +设置状态行左边部分的样式,参考message-style-style选项来指定样式。 + + status-position [top | bottom] +设置状态行的位置。 + + status-right string +显示字符串在状态栏的右边,默认为带双引号的当前窗口标题以及日期时间会被显示。 +与status-left类似,字符串也会传递给strftime,字符对会被替换而且UTF-8也依赖于status-utf8选项。 + + status-right-length length +设置状态栏右边组件的最大长度,默认为10。 + + status-right-style style +设置状态行右边部分的样式,参考message-command-style选项设置样式。 + + status-style style +设置状态行样式,参考message-command-style选项设置样式。 + + status-utf8 [on | off] +指示tmux将status-left和status-right中的字符串中的top-bit-set当作UTF-8处理;值得注意的时,这对于宽字符很重要。默认为off。 + + update-environment variables +设置一个包含由空格分开的环境变量列表字符串--这些环境变量会在新会话创建时或一个已存在的会话被附着时复制到会话环境中。 +任何在源环境中不存在的变量会从会话环境中设置为移除(类似于将-r传递给set-environment命令)。 +默认值为"DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"。 + + visual-activity [on | off] +如果为on, 当活动出现在一个由monitor-activity窗口选项生效的窗口中时显示一个状态行。 + + visual-bell [on | off] +如果为on,响铃时会显示一个消息而不是将其传递到终端(会产生一个声音)。可以参考bell-action选项。 + + visual-silence [on | off] +如果monitor-silence生效的话,那么当时间间隔在一个指定窗口中过期时会打印一个消息。 + + word-separators string +设置会话关于单词分隔符字符的概念,主要是为了复制模式中的下一个或前一个单词命令的目的。默认为'-_@'。 + + set-window-option [-agoqu] [-t target-window] option value + (别名:setw) +Set a window option. The -a, -g, -o, -q and -u flags work similarly to the set-option command. + +###窗口选项 +支持的窗口选项有: + + aggressive-resize [on | off] +积极地重新调整所选窗口大小。意味着tmux会重新调整窗口的尺寸为当前窗口的最小会话尺寸,而不是其附着的最小的会话。 +在当前窗口改变为另外一个会话时窗口会重新调整大小;这个选项对于支持SIGWINCH的全屏程序有好处而对于交互式程序如shell不是太好。 + + allow-rename [on | off] +允许程序通过终端转义序列(\033k...\033\\)改变窗口名称。默认为on。 + + alternate-screen [on | off] +这个选项用来配置运行在tmux中的程序是否可以使用终端的被用屏幕特性-允许terminfo的smcup和rmcup能力。 +被用屏幕特性在一个交互式程序开启并且在从退出后恢复之后可以保留窗口的内容, +这样任何程序开始之前的可视输出会在程序退出之后重新出现。默认为on。 + + automatic-rename [on | off] +控制自动化窗口命名。当开启这个设置时,tmux会使用由automatic-rename-format指定的格式来自动地重命名窗口。 +对于由new-window和new-session在创建时,或者之后通过rename-window或者使用终端转义序列指定的窗口名称, 这个标识会自动失效。 + +可以通过以下方式来将其在全局范围内关闭: + + set-window-option -g automatic-rename off + + + automatic-rename-format format + +在automatic-rename选项生效时会使用这个格式, 参考 [FORMATS](#格式) 。 + + c0-change-interval interval + c0-change-trigger trigger +这两个选项配置面板改变时间间隔的一个简单格式。如果tmux在1毫秒内查看到除C0序列之外的触发器(例如回车,换行或删除) +修改屏幕,会立即停止更新面板。否则会在每个时间间隔内重绘整个面板。 +这个可以帮助来阻止快速输出(例如yes)覆盖整个终端。默认为触发器250, 时间间隔100。 +0触发器用来失效速率限制。 + + + + clock-mode-colour colour +设置时钟颜色。 + + clock-mode-style [12 | 24] +设置时钟小时格式 + + force-height height + force-width width +阻止tmux将窗口的大小值超过width或height, 0值会恢复默认无限制设置。 + + main-pane-height height + main-pane-width width +设置main-horizontal 或 main-vertical布局中的主面板的长和宽。 + + +mode-keys [vi | emacs] +在复制或选择模式中使用vi/emacs键绑定。与status-keys选项一样默认为emacs, 除非VISUAL或EDITOR包含了vi。 + +mode-style style +设置窗口模式样式, 参考message-command-style选项指定样式。 + +monitor-activity [on | off] +监视窗口中的活动。具有活动事件的窗口在状态栏上高亮显示。 + +monitor-silence [interval] +在一段时间间隔内对非活动窗口进行监控。时间间隔内沉默的窗口在状态栏高亮。 +0间隔值让其监控失效。 + + +other-pane-height height +设置main-horizontal布局中主面板之外的面板高度。默认为0-没有任何作用。 +如果main-pane-height和other-pane-height选项同时设置,主面板会变得来使得 +其他面板达到指定高度,但是不会反过来作用。 + +other-pane-width width +与other-pane-height类似,只是用来设置 main-vertical布局中的其他面板的宽度。 + +pane-active-border-style style +设置当前活动面板的边框样式。 参考 message-command-style选项来指定样式,属性被忽视。 + +pane-base-index index +与 base-index类似,只是用来设置面板的开始数字。 + +pane-border-style style +设置活动面板周围面板的样式。 参考 message-command-style选项来指定样式,属性被忽视。 + +remain-on-exit [on | off] +带有该标识设置的窗口在其中程序退出时不会被销毁。 +窗口可能使用respawn-window命令重新激活。 + +synchronize-panes [on | off] +将到任意面板的输入复制到相同窗口中的所有其他面板(没有在特殊模式中的面板)。 + +utf8 [on | off] +指示tmux期待在窗口中出现 UTF-8序列。 + +window-active-style style +设置窗口的活动面板的样式。参考 message-command-style选项来指定样式。 + +window-status-activity-style style +设置窗口的状态行样式带有一个活动警告。参考 message-command-style选项来指定样式。 + +window-status-bell-style style +设置窗口的状态行样式带有一个响铃警告。参考 message-command-style选项来指定样式。 + + window-status-current-format string +与 window-status-format类似,只是这个格式在窗口为当前窗口时使用。 + + window-status-current-style style +为当前的活动窗口设置状态行样式。 参考 message-command-style选项来指定样式。 + + window-status-format string +设置状态行列表中显示窗口的格式。 参考 status-left选项关于可用的特殊字符序列信息。默认值为'#I:#W#F'。 + + window-status-last-style style +为最后一个活动窗口设置状态行样式。参考 message-command-style选项来指定样式。 + + window-status-separator string +设置状态行中窗口之间的分隔符,默认为单个空格符。 + + window-status-style style +为单个窗口设置状态行样式。参考 message-command-style选项来指定样式。 + + window-style style +设置默认窗口样式。参考 message-command-style选项来指定样式。 + + xterm-keys [on | off] +设置该选项会使tmux生成xterm-style功能键序列; 这些包含了一个数字来指定修饰符如Shift,Alt或Ctrl。默认为off。 + + wrap-search [on | off] +设置这个选项会使得搜索动作包含面板内容的末尾。 默认为on。 + + show-options [-gqsvw] [-t target-session | target-window] [option] +(别名:show) +使用-w来显示窗口选项(可以指定单个窗口),使用-s显示服务器选项,否则显示target-session的会话选项。 +-g用来显示全局会话或窗口选项。 +-v只显示选项值,不包含名称。 +-q指示重置选项不会返回错误。 + + show-window-options [-gv] [-t target-window] [option] +(别名:showw) +列出窗口选项或者target-window指定的单个窗口选项。 +-g用来显示全局窗口选项。 +-v显示选项值,忽略选项名。 + +##鼠标支持 +如果鼠标选项开启(默认为关闭),tmux允许将鼠标时间作为键来结合。 +每个键的名称是由鼠标事件(例如'MouseUp1')和一个位置后缀('Pane'表示面板内容,'Border'面板边界 +或者'Status'状态行)组成的。可以使用以下的鼠标事件: + + MouseDown1 MouseUp1 MouseDrag1 + MouseDown2 MouseUp2 MouseDrag2 + MouseDown3 MouseUp3 MouseDrag3 + WheelUp WheelDown + +每个都需要带有一个位置后缀,例如'MouseDown1Status' + +特殊标记'{mouse}'或'='可能在命令中作为target-window或target-pane与鼠标键绑定进行结合。 +会在鼠标事件发生的位置解析为窗口或面板(例如,对于一个'MouseUp1Status'绑定在在状态行上的窗口, +或者对于'WheelDownPane'绑定面板上的鼠标滚动)。 + +'send-key -M'标记可以用来将一个鼠标时间转发到一个面板上。 + +默认的键绑定允许鼠标用来选择和改变面板大小,复制文本或者使用状态行来改变窗口。 +这些动作在开启鼠标选项时发生作用。 + + +##格式 + +有些命令接受由-F标记附带的格式参数。这个参数是一个控制命令输出格式的字符串。 +可替换的变量被包含在'#{'和'}'之间,例如'#{session_name}'。 +可用的变量在下表中列出,或者tmux选项的名称可以一个选项的值。 +有些变量具有一个简短的别名,例如'#s', 而'##'会使用一个单独的'#'来替换。 + + +条件可以通过'?'作为前缀,逗号作为分隔符来使用,如果指定的变量存在并且不是0,那么第一个选项被选择,否则选择第二个选项。 +例如'#{?session_attached,attached,not attached}'条件,当会话是附着的就会包含'attached'否则就会包含'not attached'。 +而对于'#{?automatic-rename, yes, no}'如果开启了automatic-rename的话会包含'yes'否则包含'no'。 +可以通过一个前缀'=',一个数字和一个冒号来作为字符串的长度限制,所以'#{=10:pane_title}'最多包含pane标题的前10个字符。 + +在合适的地方有以下的变量是可用的: + + 变量名 | 别名 | 替换值 + -----------------------|--------------|----------------------------------- + alternate_on | | If pane is in alternate screen + alternate_saved_x | | Saved cursor X in alternate screen + alternate_saved_y | | Saved cursor Y in alternate screen + buffer_sample | | Sample of start of buffer + buffer_size | | Size of the specified buffer in bytes + client_activity | | Integer time client last had activity + client_activity_string | | String time client last had activity + client_created | | Integer time client created + client_created_string | | String time client created + client_height | | Height of client + client_last_session | | Name of the client's last session + client_prefix | | 1 if prefix key has been pressed + client_readonly | | 1 if client is readonly + client_session | | Name of the client's session + client_termname | | Terminal name of client + client_tty | | Pseudo terminal of client + client_utf8 | | 1 if client supports utf8 + client_width | | Width of client + cursor_flag | | Pane cursor flag + cursor_x | | Cursor X position in pane + cursor_y | | Cursor Y position in pane + history_bytes | | Number of bytes in window history + history_limit | | Maximum window history lines + history_size | | Size of history in bytes + host | #H | Hostname of local host + host_short | #h | Hostname of local host (no domain name) + insert_flag | | Pane insert flag + keypad_cursor_flag | | Pane keypad cursor flag + keypad_flag | | Pane keypad flag + line | | Line number in the list + mouse_any_flag | | Pane mouse any flag + mouse_button_flag | | Pane mouse button flag + mouse_standard_flag | | Pane mouse standard flag + mouse_utf8_flag | | Pane mouse UTF-8 flag + pane_active | | 1 if active pane + pane_bottom | | Bottom of pane + pane_current_command | | Current command if available + pane_dead | | 1 if pane is dead + pane_dead_status | | Exit status of process in dead pane + pane_height | | Height of pane + pane_id | #D | Unique pane ID + pane_in_mode | | If pane is in a mode + pane_input_off | | If input to pane is disabled + pane_index | #P | Index of pane + pane_left | | Left of pane + pane_pid | | PID of first process in pane + pane_right | | Right of pane + pane_start_command | | Command pane started with + pane_synchronized | | If pane is synchronized + pane_tabs | | Pane tab positions + pane_title | #T | Title of pane + pane_top | | Top of pane + pane_tty | | Pseudo terminal of pane + pane_width | | Width of pane + saved_cursor_x | | Saved cursor X in pane + saved_cursor_y | | Saved cursor Y in pane + scroll_region_lower | | Bottom of scroll region in pane + scroll_region_upper | | Top of scroll region in pane + session_attached | | Number of clients session is attached to + session_activity | | Integer time of session last activity + session_activity_string| | String time of session last activity + session_created | | Integer time session created + session_created_string | | String time session created + session_group | | Number of session group + session_grouped | | 1 if session in a group + session_height | | Height of session + session_id | | Unique session ID + session_many_attached | | 1 if multiple clients attached + session_name | #S | Name of session + session_width | | Width of session + session_windows | | Number of windows in session + window_active | | 1 if window active + window_activity_flag | | 1 if window has activity alert + window_bell_flag | | 1 if window has bell + window_find_matches | | Matched data from the find-window + window_flags | #F | Window flags + window_height | | Height of window + window_id | | Unique window ID + window_index | #I | Index of window + window_last_flag | | 1 if window is the last used + window_layout | | Window layout description + window_name | #W | Name of window + window_panes | | Number of panes in window + window_silence_flag | | 1 if window has silence alert + window_width | | Width of window + window_zoomed_flag | | 1 if window is zoomed + wrap_flag | | Pane wrap flag + + +##名称和标题 + +tmux区分名称和标题,窗口和会话具有名称用来作为目标标识,并且在状态行和不同的列表中显示: +名称是tmux对于一个窗口或会话的标识符。 +只有pane面板有标题,面板的标题是由在其中运行的程序设置的并且不能由tmux改变。 +与X窗口管理器中的xterm窗口标题的设置所使用的机制相同。 +窗口本身没有标题----一个窗口的标题就是其活动面板的标题。 +tmux本身会设置客户端所在终端的标题,参考set-title选项。 + +A session's name is set with the new-session and rename-session commands. A window's name is set with one of: +一个会话的名称通过new-session和rename-session命令来设置的,一个窗口的名称可以通过以下方式设置: + + 1. 一个命令的参数(如new-window和new-session的-n参数) + 2. 一个转义序列: $ printf '\033kWINDOW_NAME\033\\' + +自动重命名会将名称设置为窗口活动面板中的活动程序,参考automatic-rename选项。 + +当一个面板第一次创建时,其标题为主机名hostname。一个面板的标题可以通过OSC标题设置序列进行设置,例如: + $ printf '\033]2;My Title\033\\' + +##环境 + +当tmux服务器启动时,tmux会将环境复制到全局环境中,此外每个会话具有一个会话环境。 +当一个窗口被创建时,会将会话环境和全局环境合并。 +如果一个变量存在两个环境中,会使用会话环境中的变量。结果就是初始环境传递给新进程。 + +当一个新会话创建或者一个就会话重新附着时,update-environment会话选项可以用来从一个客户端来更新会话环境。 +tmux也会使用一些内部信息来初始化TMUX变量以便允许命令在内部执行,TERM变量会设置为正确的终端'screen'。 + +修改和查看环境的命令有: + + set-environment [-gru] [-t target-session] name [value] + (别名:setenv) +设置或重置一个环境变量,如果使用-g,会在全局变量中进行改变;否则只会改变target-session的会话环境。 +-u标记用来重置一个变量。 -r用来指示在开起一个新进程时从环境中移除该变量。 + + show-environment [-g] [-t target-session] [variable] + (别名:showenv) +显示目标会话target-session或者全局环境(使用-g时)变量。 +如果忽略变量,会显示所有的变量。从环境中移除的变量会用'-'作为前导。 + +##状态行 +tmux包含了一个可选的状态行会显示在每个终端的底端行。 +默认状态行时有效的(可以通过status会话选项失效)并且被包含的,从左到右分别有: +包含在方括号中的当前会话名称;窗口列表;双引号包含的活动面板;以及时间和日期。 + +状态行由三部分组成: +可配置的左边和右边部分(可以包含shell命令输出的动态的内容,例如时间和日期, +参考status-left,status-left-length,status-right,status-right-length选项), 以及中间的窗口列表。 +默认窗口列表显示当前会话中按照数字升序排列窗口的索引,名称和标记(如果存在的话)。 +可以通过window-status-format和window-status-current-format选项客制化。 + +附加在窗口名称后面的标记可以是以下符号之一: + + 符号 | 含义 +---------|----------- + * | 表示当前窗口 + - | 最有一个选择的窗口。 + # | 窗口被监控并且活动会被检测。 + ! | 会在窗口中出现一个响铃。 + ~ | 窗口会在monitor-silence时间间隔中保持沉默。 + Z | 窗口的活动面板被放大了。 + +符号#与monitor-activity窗口选项相关。窗口名称会在有警告(响铃,活动或沉默)出现的时候以反转的颜色打印 + +状态行的颜色和属性是可以配置的,整个状态行使用status-style会话选项,单个的窗口使用window=status-style窗口选项配置。 + +状态行会自动地刷新如果当其在时间间隔内被改变的话,时间间隔可以通过status-interval会话选项控制。 + +与状态行相关的命令有: + + command-prompt [-I inputs] [-p prompts] [-t target-client] [template] +在客户端打开一个命令提示,可以在tmux内用用来执行交互式命令。 + +如果指定了template的话,其会被作为命令使用。 +-I是每个提示初始化文本列表-由逗号分割的。 +-p 提示是一个按照顺序显示的逗号分割的提示列表;否则只显示一个单独的构造于template(如果提供了的话)提示,否则使用':'。 +inputs和prompts都可能包含由status-left选项支持的特殊字符序列。 +在命令被执行之前,第一个出现的字符串'%%'和出现的所有'%1'都会被第一个提示的响应替换, +第二个'%%'和所有的'%2'会被第二个提示的响应替换,以此类推, 直到第九个提示可以被替换。 + + confirm-before [-p prompt] [-t target-client] command + (别名:confirm) +在执行命令之前进行确认,如果指定-p, 提示为prompt参数的显示,否则提示会从command来构造。 +可能会包含由status-left选项支持的特殊字符序列。 +这个命令只会在tmux中工作。 + + display-message [-p] [-c target-client] [-t target-pane] [message] + (别名:display) +显示一个消息, 如果没有给定-p, +那么输出会被打印到标准输出中,否则会显示在target-client的状态行上。 +消息的格式在[FORMTS](#格式)部分描述。 +如果给第-t就会从target-pane中获取信息,否则就会从附着在target-client的会话中的活动窗口中获取。 + +##缓冲区 +tmux维护了一个命名的粘贴缓冲区集合,每个可能显式地或自动地命名。 +显式地命名的缓冲区是在通过set-buffer或load-buffer命令创建时命名的, +或者是通过set-buffer -n 来重命名一个自动命名的缓冲区。 +自动命名的缓冲区的名称会类似于'buffer0001','buffer0002'等。 +当达到buffer-limit选项的限制时,最旧的自动命名的缓冲区被删除。 +显示命名的缓冲区不会收到buffer-limit的限制,可以通过delete-buffer命令删除。 + +缓冲区可以使用copy-mode或set-buffer以及load-buffer命令来添加,并且通过paste-buffer命令来将其粘贴到一个窗口。 +如果一个缓冲区命令没有指定缓冲区时,就会假设使用最近添加的自动命名的缓冲区。 + +每个窗口也会维护一个可配值的历史缓冲区,默认会保留到2000行;这个可以通过history-limit选项修改(参考set-option命令)。 + +缓冲区命令有: + choose-buffer [-F format] [-t target-window] [template] +将窗口置于缓冲区选择模式,一个缓冲区可以从一个列表中交互地选择。 +在选择一个缓冲区之后,'%%'会被template中的缓冲区名称替换,之后的结果会作为一个命令被执行。 +如果没有给定template,会使用"paste-buffer -b '%%'"来替换。 对于-F标记参考[FORMATS](#格式)部分。 +这个命令只有在至少有一个客户端附着时工作。 + + clear-history [-t target-pane] + (别名:clearhist) +对指定的pane删除并释放history。 + + delete-buffer [-b buffer-name] + (别名:deleteb) +删除名为buffer-name的缓冲区,在没有指定buffer-name时删除最佳男自动命名添加的缓冲区。 + + list-buffers [-F format] + (别名:lsb) +列出全局缓冲区,对于-F可以参考[FORMATS](#格式)部分。 + + load-buffer [-b buffer-name] path + (别名:loadb) +从path中加载指定粘贴缓冲区的内容。 + + paste-buffer [-dpr] [-b buffer-name] [-s separator] [-t target-pane] + (别名:pasteb) +将一个粘贴缓冲却中的内容插入到一个指定的pane中。如果没有指定target-pane,会被粘贴到当前的一个。 +-d 同时也会删除粘贴缓冲区。当输出时,任何粘贴缓冲区中的换行符会使用一个分隔符替换(默认为回车符)。 +-s 指定客制化分隔符。 +-r 标记意味着不做换行符的替换。 +-p 当应用程序请求大括号粘贴模式的话,粘贴的大括号控制代码会被插入到缓冲区中。 + + save-buffer [-a] [-b buffer-name] path + (别名:saveb) +将指定的粘贴缓冲区中的内容保存到一个路径path. -a选项用来指示附加模式而不是直接重写文件。 + + set-buffer [-a] [-b buffer-name] [-n new-buffer-name] data + (别名:setb) +将指定缓冲区的内容设置为data. +使用-a选项来将data附加到缓冲区而不是直接重写缓冲区。-n用来重命名缓冲区到一个new-buffer-name。 + + show-buffer [-b buffer-name] + (别名:showb) +显示指定缓冲区的内容。 + +##杂项 +其他杂项命令有: + clock-mode [-t target-pane] +显示一个大的时钟。 + + if-shell [-bF] [-t target-pane] shell-command command [command] + (别名:if) +如果shell-command返回成功的话执行第一个命令,否则执行第二个命令。 +在执行之前,shell-command会使用[FORMATS](#格式)部分指定的规则进行扩展,包括相关的target-pane。-b指示shell-command在后台运行。 +如果给定-F,shell-command不会被执行而是认为时成功的(如果既不是空的也不是0的话-在格式扩展之后)。 + + lock-server + (别名:lock) +通过运行lock-command选项指定的命令来分别锁定每个客户端。 + + run-shell [-b] [-t target-pane] shell-command + (别名:run) +在不创建一个窗口的前提下在后台中运行一个shell-command。 +执行之前,shell-command使用[FORMATS](#格式)部分指定的规则进行扩展。 +-b指示在后台运行。 +在完成之后,任何到标准输出的输出会在copy模式中显示(在由-t指定的pane或当前pane-如果缺省的话)。 +如果命令没有成功返回,退出状态也会被显示。 + + wait-for [-L | -S | -U] channel + (别名:wait) +当不带选项使用时,在使用相同的channel的wait-for -S唤醒之前阻止客户端退出。 +-L会锁定channel,任何尝试锁定相同channel的客户端会一直等待直到使用wait-for -U 解锁。 这个命令只有在tmux外部工作。 + +##TERMINFO EXTENSIONS + +tmux可以理解terminfo的一些扩展: +Cs, Cr +设置光标颜色,第一个使用一个单个字符串参数来设置颜色;第二个没有参数来恢复默认的光标颜色。 +如果设置的话一系列这样的值会被用来在tmux中改变光标颜色: + + $ printf '\033]12;red\033\\' + +Ss, Se +设置或重置光标样式。 如果设置以下的序列可能会用来将光标变为一个下划线: + + $ printf '\033[4 q' + +如果没有设置Se,Ss和参数0会被用来重新设置光标样式。 + +Ms +这个序列可以被tmux用来存储当前缓冲区到主机终端剪贴板中。可以参考set-clipboad选项和xterm的man页面。 + +##控制模式 + +tmux提供了一个成为control(控制)模式的文本界面。这使得应用程序可以通过一个简单的文本协议与tmux进行交流。 +在控制模式中,一个客户端发送tmux命令或以新行结束的命令序列到标准输入中。 +每个命令将会在标准输出中产生一个输出块。 +一个输出块包含了一个%begin行与跟随的输出(可能为空)。 +输出块会以一个%end或%error作为结尾。 +%begin和匹配的%end/%error具有两个参数:一个整数时间和命令编号,例如: + + %begin 1363006971 2 + 0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active) + %end 1363006971 2 + +在控制模式中,tmux输出通知,一个通知不会出现在输出块中。 + +下面是通知的定义: + + %exit [reason] + +当tmux客户端没有附着在任何会话中或者出现错误时,tmux客户端会立即退出。如果存在的话,reason描述了客户端退出的原因。 + + %layout-change window-id window-layout + +一个带有window-id的窗口布局被改变,新的布局为window-layout。 + + %output pane-id value + +一个窗口面板产生的输出。 值会转义非打印字符而且饭斜线作为八进制\xxx。 + + %session-changed session-id name +客户端现在被附着在ID为session-id的会话上,并且使用name命名。 + + %session-renamed name +当前会话被重命名为name。 + + %sessions-changed + +一个会话被创建或销毁。 + + %unlinked-window-add window-id + +ID为window-id的窗口被创建,但是没有连接到当前会话。 + + %window-add window-id +ID为window-id的窗口被连接到当前会话。 + + %window-close window-id +ID为window-id的窗口被关闭。 + + %window-renamed window-id name +ID为window-id的窗口重命名为name。 + +##文件 +o + ~/.tmux.conf : 默认的tmux配置文件。 + /etc/tmux.conf : 系统范围的配置文件。 + +##样例 + +创建一个运行vi的新的tmux会话: + + $ tmux new-session vi + +大部分命令具有一个简短形式,也成为别名。例如new-session的别名为new: + $ tmux new vi + +可选地,一个命令最短的不混淆的简短格式是被接受的,如果有多个选项,会被列出: + + $ tmux n + ambiguous command: n, could be: new-session, new-window, next-window + +在一个活动会话中,一个新的窗口可以通过键入'C-b c'来创建(ctrl 跟随b 然后跟随c键)。 + +窗口可以使用'C-b 0-9'来在窗口0-9中导航,也可以通过'C-b n'选择下一个窗口,'C-b p'选择上一个窗口。 + +一个会话可以通过使用'C-b d'来脱离附着,也可以通过以下命令来重新附着: + $ tmux attach-session + +键入'C-b ?' 列出当前窗口中的当前键绑定; 使用上下箭头可以导航列表,'q'从其中退出。 + +当tmux启动时运行的命令可能放置在 ~/.tmux.conf配置文件中,常见样例包括: + +改变默认的前导键: + + set-option -g prefix C-a + unbind-key C-b + bind-key C-a send-prefix + +关闭状态行或者改变其颜色: + + set-option -g status off + set-option -g status-style bg=blue + +设置其他选项,例如默认命令或者在30分钟不活动之后锁定: + + set-option -g default-command "exec /bin/ksh" + set-option -g lock-after-time 1800 + +创建新的键绑定: + + bind-key b set-option status + bind-key / command-prompt "split-window 'exec man %%'" + bind-key S command-prompt "new-window -n %1 'ssh %1'" + +参考: pty(4) + +作者: Nicholas Marriott + +译者: Liang Guisheng From 3855fdb020c44b6bd8d075c8cc55d76de00fc922 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 12 Jun 2015 11:25:22 +0800 Subject: [PATCH 1152/2517] Translating by ZTinoZ --- ... 20 Useful Terminal Emulators for Linux.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 4ff7820781..1b239a3904 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -14,7 +14,7 @@ Terminator是一款先进且强大的终端仿真器,它支持多终端窗口 #### Terminator的特性 #### -- 自定义外形和色彩设计,根据你的需要设置尺寸。 +- 自定义外形和配色方案,根据你的需要设置尺寸。 - 使用插件来获取更多功能。 - 快捷键可以加快普通操作。 - 可以把终端窗口分裂成几个虚拟终端并把它们重新设置成你需要的尺寸。 @@ -34,7 +34,7 @@ Tilda是一款漂亮的基于GTK+的下拉式终端,敲击一个键你就可 - 高度定制的选项界面设置。 - 你可以给Tilda设置透明度。 -- 优秀的嵌入式色彩设计。 +- 优秀的嵌入式配色方案。 ![Tilda Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Tilda-Emulator.jpeg) @@ -75,9 +75,9 @@ Yakuake Terminal ### 5. ROXTerm ### -ROXterm又是一款轻量级终端仿真器,旨在提供与GNOME终端相似的特性。它原本创造出来是为了通过不使用Gnome库从而拥有更少的占用空间和更快的启动速度并使用独立的小程序来建立配置界面(GUI), 但是随着时间的流逝,它的角色就转变为给那些老牌用户带来更高一层的特性。 +ROXterm又是一款轻量级终端仿真器,旨在提供与GNOME终端相似的特性。它原本创造出来是为了通过不使用Gnome库从而拥有更少的占用空间和更快的启动速度并使用独立的小程序来建立配置界面(GUI), 但是随着时间的流逝,它的角色就转变为给那些高级用户带来更高一层的特性。 -然而,它比GNOME终端更加具有可制定性并且对于那些经常使用终端的老牌用户更令人期望。它能和GNOME桌面环境完美结合并在终端中提供像拖拽项目那样的特性。 +然而,它比GNOME终端更加具有可制定性并且对于那些经常使用终端的高级用户更令人期望。它能和GNOME桌面环境完美结合并在终端中提供像拖拽项目那样的特性。 ![Roxterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Roxterm-Terminal.jpeg) @@ -97,7 +97,7 @@ Eterm Terminal ### 7. Rxvt ### -代表着扩展虚拟终端的Rxvt是一款彩色终端仿真器,为那些不需要一些特性例如Tektronix 4014仿真和toolkit-style可配置性的老牌用户而生的xterm的替代品。 +代表着扩展虚拟终端的Rxvt是一款彩色终端仿真器,为那些不需要一些特性例如Tektronix 4014仿真和toolkit-style可配置性的高级用户而生的xterm的替代品。 ![Rxvt Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Rxvt-Terminal.jpeg) @@ -107,7 +107,7 @@ Rxvt Terminal ### 8. Wterm ### -Wterm is a another light weight color terminal emulator based on rxvt project. It includes features such as background images, transparency, reverse transparency and an considerable set or runtime options are accessible resulting in a very high customizable terminal emulator. +Wterm是另一款以rxvt项目为基础的轻量级彩色终端仿真器。它所包含的特性包括设置背景图片、透明度、反向透明度和大量的设置或运行环境选项让它成为一款可高度自定义的终端仿真器。 ![wterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/wterm-Terminal-.jpeg) @@ -117,14 +117,14 @@ wterm Terminal ### 9. LXTerminal ### -LXTerminal is a default VTE-based terminal emulator for LXDE (Lightweight X Desktop Environment) without any unnecessary dependency. The terminal has got some nice features such as. +LXTerminal是一款基于VTE的终端仿真器,默认运行于没有任何多余依赖的LXDE(轻量级X桌面环境)下。这款终端有很多很棒的特性。 -LXTerminal Features +#### LXTerminal的特性 #### -- Multiple tabs support -- Supports common commands like cp, cd, dir, mkdir, mvdir. -- Feature to hide the menu bar for saving space -- Change the color scheme. +- 多标签支持 +- 支持普通命令如cp, cd, dir, mkdir, mvdir +- 隐藏菜单栏以保证足够界面空间 +- 更改配色方案 ![lxterminal Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/lxterminal-Terminal.jpeg) @@ -136,13 +136,13 @@ lxterminal Terminal Konsole是另一款强大的基于KDE的免费终端仿真器,最初由Lars Doelle创造。 -Konsole的特性 +#### Konsole的特性 #### - 多标签式终端 - 半透明背景 - 支持拆分视图模式 - 目录和SSH书签化 -- 可定制的颜色设计 +- 可定制的配色方案 - 可定制的按键绑定 - 终端中的活动通知警告 - 增量搜索 From d28df772bfc9222f544c16a9a80ceb0e8bcf8f01 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 12 Jun 2015 14:28:36 +0800 Subject: [PATCH 1153/2517] =?UTF-8?q?20150612-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...w We Designed for Performance and Scale.md | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md diff --git a/sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md b/sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md new file mode 100644 index 0000000000..559d28996c --- /dev/null +++ b/sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md @@ -0,0 +1,174 @@ +Inside NGINX: How We Designed for Performance & Scale +================================================================================ +NGINX leads the pack in web performance, and it’s all due to the way the software is designed. Whereas many web servers and application servers use a simple threaded or process-based architecture, NGINX stands out with a sophisticated event-driven architecture that enables it to scale to hundreds of thousands of concurrent connections on modern hardware. + +The [Inside NGINX][1] infographic drills down from the high-level process architecture to illustrate how NGINX handles multiple connections within a single process. This blog explains how it all works in further detail. + +### Setting the Scene – the NGINX Process Model ### + +![Master Process](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.36.30-PM.png) + +To better understand this design, you need to understand how NGINX runs. NGINX has a master process (which performs the privileged operations such as reading configuration and binding to ports) and a number of worker and helper processes. + + # service nginx restart + * Restarting nginx + # ps -ef --forest | grep nginx + root 32475 1 0 13:36 ? 00:00:00 nginx: master process /usr/sbin/nginx \ + -c /etc/nginx/nginx.conf + nginx 32476 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32477 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32479 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32480 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32481 32475 0 13:36 ? 00:00:00 \_ nginx: cache manager process + nginx 32482 32475 0 13:36 ? 00:00:00 \_ nginx: cache loader process + +On this 4-core server, the NGINX master process creates 4 worker processes and a couple of cache helper processes which manage the on-disk content cache. + +### Why Is Architecture Important? ### + +The fundamental basis of any Unix application is the thread or process. (From the Linux OS perspective, threads and processes are mostly identical; the major difference is the degree to which they share memory.) A thread or process is a self-contained set of instructions that the operating system can schedule to run on a CPU core. Most complex applications run multiple threads or processes in parallel for two reasons: + +- They can use more compute cores at the same time. +- Threads and processes make it very easy to do operations in parallel (for example, to handle multiple connections at the same time). + +Processes and threads consume resources. They each use memory and other OS resources, and they need to be swapped on and off the cores (an operation called a context switch). Most modern servers can handle hundreds of small, active threads or processes simultaneously, but performance degrades seriously once memory is exhausted or when high I/O load causes a large volume of context switches. + +The common way to design network applications is to assign a thread or process to each connection. This architecture is simple and easy to implement, but it does not scale when the application needs to handle thousands of simultaneous connections. + +### How Does NGINX Work? ### + +NGINX uses a predictable process model that is tuned to the available hardware resources: + +- The master process performs the privileged operations such as reading configuration and binding to ports, and then creates a small number of child processes (the next three types). +- The cache loader process runs at startup to load the disk-based cache into memory, and then exits. It is scheduled conservatively, so its resource demands are low. +- The cache manager process runs periodically and prunes entries from the disk caches to keep them within the configured sizes. +- The worker processes do all of the work! They handle network connections, read and write content to disk, and communicate with upstream servers. + +The NGINX configuration recommended in most cases – running one worker process per CPU core – makes the most efficient use of hardware resources. You configure it by including the [worker_processes auto][2] directive in the configuration: + + worker_processes auto; + +When an NGINX server is active, only the worker processes are busy. Each worker process handles multiple connections in a non-blocking fashion, reducing the number of context switches. + +Each worker process is single-threaded and runs independently, grabbing new connections and processing them. The processes can communicate using shared memory for shared cache data, session persistence data, and other shared resources. + +### Inside the NGINX Worker Process ### + +![](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.39.48-PM.png) + +Each NGINX worker process is initialized with the NGINX configuration and is provided with a set of listen sockets by the master process. + +The NGINX worker processes begin by waiting for events on the listen sockets ([accept_mutex][3] and [kernel socket sharding][4]). Events are initiated by new incoming connections. These connections are assigned to a state machine – the HTTP state machine is the most commonly used, but NGINX also implements state machines for stream (raw TCP) traffic and for a number of mail protocols (SMTP, IMAP, and POP3). + +![Internet Requests](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.40.32-PM.png) + +The state machine is essentially the set of instructions that tell NGINX how to process a request. Most web servers that perform the same functions as NGINX use a similar state machine – the difference lies in the implementation. + +### Scheduling the State Machine ### + +Think of the state machine like the rules for chess. Each HTTP transaction is a chess game. On one side of the chessboard is the web server – a grandmaster who can make decisions very quickly. On the other side is the remote client – the web browser that is accessing the site or application over a relatively slow network. + +However, the rules of the game can be very complicated. For example, the web server might need to communicate with other parties (proxying to an upstream application) or talk to an authentication server. Third-party modules in the web server can even extend the rules of the game. + +#### A Blocking State Machine #### + +Recall our description of a process or thread as a self-contained set of instructions that the operating system can schedule to run on a CPU core. Most web servers and web applications use a process-per-connection or thread-per-connection model to play the chess game. Each process or thread contains the instructions to play one game through to the end. During the time the process is run by the server, it spends most of its time ‘blocked’ – waiting for the client to complete its next move. + +![Blocking I/O](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.40.52-PM.png) + +1. The web server process listens for new connections (new games initiated by clients) on the listen sockets. +1. When it gets a new game, it plays that game, blocking after each move to wait for the client’s response. +1. Once the game completes, the web server process might wait to see if the client wants to start a new game (this corresponds to a keepalive connection). If the connection is closed (the client goes away or a timeout occurs), the web server process returns to listening for new games. + +The important point to remember is that every active HTTP connection (every chess game) requires a dedicated process or thread (a grandmaster). This architecture is simple and easy to extend with third-party modules (‘new rules’). However, there’s a huge imbalance: the rather lightweight HTTP connection, represented by a file descriptor and a small amount of memory, maps to a separate thread or process, a very heavyweight operating system object. It’s a programming convenience, but it’s massively wasteful. + +#### NGINX is a True Grandmaster #### + +Perhaps you’ve heard of [simultaneous exhibition][5] games, where one chess grandmaster plays dozens of opponents at the same time? + +![Kiril Georgiev](http://cdn.nginx.com/wp-content/uploads/2015/06/Kiril-Georgiev.gif) + +[Kiril Georgiev played 360 people simultaneously in Sofia, Bulgaria][6]. His final score was 284 wins, 70 draws and 6 losses. + +That’s how an NGINX worker process plays “chess.” Each worker (remember – there’s usually one worker for each CPU core) is a grandmaster that can play hundreds (in fact, hundreds of thousands) of games simultaneously. + +![Event-driven Architecture](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.13-PM.png) + +1. The worker waits for events on the listen and connection sockets. +1. Events occur on the sockets and the worker handles them: + + - An event on the listen socket means that a client has started a new chess game. The worker creates a new connection socket. + - An event on a connection socket means that the client has made a new move. The worker responds promptly. + +A worker never blocks on network traffic, waiting for its “opponent” (the client) to respond. When it has made its move, the worker immediately proceeds to other games where moves are waiting to be processed, or welcomes new players in the door. + +### Why Is This Faster than a Blocking, Multi-Process Architecture? ### + +NGINX scales very well to support hundreds of thousands of connections per worker process. Each new connection creates another file descriptor and consumes a small amount of additional memory in the worker process. There is very little additional overhead per connection. NGINX processes can remain pinned to CPUs. Context switches are relatively infrequent and occur when there is no work to be done. + +In the blocking, connection-per-process approach, each connection requires a large amount of additional resources and overhead, and context switches (swapping from one process to another) are very frequent. + +For a more detailed explanation, check out this [article][7] about NGINX architecture, by Andrew Alexeev, VP of Corporate Development and Co-Founder at NGINX, Inc. + +With appropriate [system tuning][8], NGINX can scale to handle hundreds of thousands of concurrent HTTP connections per worker process, and can absorb traffic spikes (an influx of new games) without missing a beat. + +### Updating Configuration and Upgrading NGINX ### + +NGINX’s process architecture, with a small number of worker processes, makes for very efficient updating of the configuration and even the NGINX binary itself. + +![Updating Configuration](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.33-PM.png) + +Updating NGINX configuration is a very simple, lightweight, and reliable operation. It typically just means running the `nginx –s reload` command, which checks the configuration on disk and sends the master process a SIGHUP signal. + +When the master process receives a SIGHUP, it does two things: + +- Reloads the configuration and forks a new set of worker processes. These new worker processes immediately begin accepting connections and processing traffic (using the new configuration settings). +- Signals the old worker processes to gracefully exit. The worker processes stop accepting new connections. As soon as each current HTTP request completes, the worker process cleanly shuts down the connection (that is, there are no lingering keepalives). Once all connections are closed, the worker processes exit. + +This reload process can cause a small spike in CPU and memory usage, but it’s generally imperceptible compared to the resource load from active connections. You can reload the configuration multiple times per second (and many NGINX users do exactly that). Very rarely, issues arise when there are many generations of NGINX worker processes waiting for connections to close, but even those are quickly resolved. + +NGINX’s binary upgrade process achieves the holy grail of high-availability – you can upgrade the software on the fly, without any dropped connections, downtime, or interruption in service. + +![New Binary](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.51-PM.png) + +The binary upgrade process is similar in approach to the graceful reload of configuration. A new NGINX master process runs in parallel with the original master process, and they share the listening sockets. Both processes are active, and their respective worker processes handle traffic. You can then signal the old master and its workers to gracefully exit. + +The entire process is described in more detail in [Controlling NGINX][9]. + +### Conclusion ### + +The [Inside NGINX infographic][10] provides a high-level overview of how NGINX functions, but behind this simple explanation is over ten years of innovation and optimization that enable NGINX to deliver the best possible performance on a wide range of hardware while maintaining the security and reliability that modern web applications require. + +If you’d like to read more about the optimizations in NGINX, check out these great resources: + +- [Installing and Tuning NGINX for Performance][11] (webinar; [slides][12] at Speaker Deck) +- [Tuning NGINX for Performance][13] +- [The Architecture of Open Source Applications – NGINX][14] +- [Socket Sharding in NGINX Release 1.9.1][15] (using the SO_REUSEPORT socket option) + +-------------------------------------------------------------------------------- + +via: http://nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/ + +作者:[Owen Garrett][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://nginx.com/author/owen/ +[1]:http://nginx.com/resources/library/infographic-inside-nginx/ +[2]:http://nginx.org/en/docs/ngx_core_module.html#worker_processes +[3]:http://nginx.org/en/docs/ngx_core_module.html#accept_mutex +[4]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ +[5]:http://en.wikipedia.org/wiki/Simultaneous_exhibition +[6]:http://gambit.blogs.nytimes.com/2009/03/03/in-chess-records-were-made-to-be-broken/ +[7]:http://www.aosabook.org/en/nginx.html +[8]:http://nginx.com/blog/tuning-nginx/ +[9]:http://nginx.org/en/docs/control.html +[10]:http://nginx.com/resources/library/infographic-inside-nginx/ +[11]:http://nginx.com/resources/webinars/installing-tuning-nginx/ +[12]:https://speakerdeck.com/nginx/nginx-installation-and-tuning +[13]:http://nginx.com/blog/tuning-nginx/ +[14]:http://www.aosabook.org/en/nginx.html +[15]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ \ No newline at end of file From 1ca6167f0f43b7469c2c72ee7802ae9e2ff9092b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 12 Jun 2015 14:55:11 +0800 Subject: [PATCH 1154/2517] =?UTF-8?q?20150612-2=20=E9=80=89=E9=A2=98=20RHC?= =?UTF-8?q?SA=20Series=2014?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Up LDAP-based Authentication in RHEL 7.md | 275 ++++++++++++++++++ 1 file changed, 275 insertions(+) create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md new file mode 100644 index 0000000000..36bf319b19 --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md @@ -0,0 +1,275 @@ +RHCSA Series: Setting Up LDAP-based Authentication in RHEL 7 – Part 14 +================================================================================ +We will begin this article by outlining some LDAP basics (what it is, where it is used and why) and show how to set up a LDAP server and configure a client to authenticate against it using Red Hat Enterprise Linux 7 systems. + +![Setup LDAP Server and Client Authentication](http://www.tecmint.com/wp-content/uploads/2015/06/setup-ldap-server-and-configure-client-authentication.png) + +RHCSA Series: Setup LDAP Server and Client Authentication – Part 14 + +As we will see, there are several other possible application scenarios, but in this guide we will focus entirely on LDAP-based authentication. In addition, please keep in mind that due to the vastness of the subject, we will only cover its basics here, but you can refer to the documentation outlined in the summary for more in-depth details. + +For the same reason, you will note that I have decided to leave out several references to man pages of LDAP tools for the sake of brevity, but the corresponding explanations are at a fingertip’s distance (man ldapadd, for example). + +That said, let’s get started. + +**Our Testing Environment** + +Our test environment consists of two RHEL 7 boxes: + + Server: 192.168.0.18. FQDN: rhel7.mydomain.com + Client: 192.168.0.20. FQDN: ldapclient.mydomain.com + +If you want, you can use the machine installed in [Part 12: Automate RHEL 7 installations][1] using Kickstart as client. + +#### What is LDAP? #### + +LDAP stands for Lightweight Directory Access Protocol and consists in a set of protocols that allows a client to access, over a network, centrally stored information (such as a directory of login shells, absolute paths to home directories, and other typical system user information, for example) that should be accessible from different places or available to a large number of end users (another example would be a directory of home addresses and phone numbers of all employees in a company). + +Keeping such (and more) information centrally means it can be more easily maintained and accessed by everyone who has been granted permissions to use it. + +The following diagram offers a simplified diagram of LDAP, and is described below in greater detail: + +![LDAP Diagram](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Diagram.png) + +LDAP Diagram + +Explanation of above diagram in detail. + +- An entry in a LDAP directory represents a single unit or information and is uniquely identified by what is called a Distinguished Name. +- An attribute is a piece of information associated with an entry (for example, addresses, available contact phone numbers, and email addresses). +- Each attribute is assigned one or more values consisting in a space-separated list. A value that is unique per entry is called a Relative Distinguished Name. + +That being said, let’s proceed with the server and client installations. + +### Installing and Configuring a LDAP Server and Client ### + +In RHEL 7, LDAP is implemented by OpenLDAP. To install the server and client, use the following commands, respectively: + + # yum update && yum install openldap openldap-clients openldap-servers + # yum update && yum install openldap openldap-clients nss-pam-ldapd + +Once the installation is complete, there are some things we look at. The following steps should be performed on the server alone, unless explicitly noted: + +**1. Make sure SELinux does not get in the way by enabling the following booleans persistently, both on the server and the client:** + + # setsebool -P allow_ypbind=0 authlogin_nsswitch_use_ldap=0 + +Where allow_ypbind is required for LDAP-based authentication, and authlogin_nsswitch_use_ldap may be needed by some applications. + +**2. Enable and start the service:** + + # systemctl enable slapd.service + # systemctl start slapd.service + +Keep in mind that you can also disable, restart, or stop the service with [systemctl][2] as well: + + # systemctl disable slapd.service + # systemctl restart slapd.service + # systemctl stop slapd.service + +**3. Since the slapd service runs as the ldap user (which you can verify with ps -e -o pid,uname,comm | grep slapd), such user should own the /var/lib/ldap directory in order for the server to be able to modify entries created by administrative tools that can only be run as root (more on this in a minute).** + +Before changing the ownership of this directory recursively, copy the sample database configuration file for slapd into it: + + # cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG + # chown -R ldap:ldap /var/lib/ldap + +**4. Set up an OpenLDAP administrative user and assign a password:** + + # slappasswd + +as shown in the next image: + +![Set LDAP Admin Password](http://www.tecmint.com/wp-content/uploads/2015/06/Set-LDAP-Admin-Password.png) + +Set LDAP Admin Password + +and create an LDIF file (ldaprootpasswd.ldif) with the following contents: + + dn: olcDatabase={0}config,cn=config + changetype: modify + add: olcRootPW + olcRootPW: {SSHA}PASSWORD + +where: + +- PASSWORD is the hashed string obtained earlier. +- cn=config indicates global config options. +- olcDatabase indicates a specific database instance name and can be typically found inside /etc/openldap/slapd.d/cn=config. + +Referring to the theoretical background provided earlier, the `ldaprootpasswd.ldif` file will add an entry to the LDAP directory. In that entry, each line represents an attribute: value pair (where dn, changetype, add, and olcRootPW are the attributes and the strings to the right of each colon are their corresponding values). + +You may want to keep this in mind as we proceed further, and please note that we are using the same Common Names `(cn=)` throughout the rest of this article, where each step depends on the previous one. + +**5. Now, add the corresponding LDAP entry by specifying the URI referring to the ldap server, where only the protocol/host/port fields are allowed.** + + # ldapadd -H ldapi:/// -f ldaprootpasswd.ldif + +The output should be similar to: + +![LDAP Configuration](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Configuration.png) + +LDAP Configuration + +and import some basic LDAP definitions from the `/etc/openldap/schema` directory: + + # for def in cosine.ldif nis.ldif inetorgperson.ldif; do ldapadd -H ldapi:/// -f /etc/openldap/schema/$def; done + +![LDAP Definitions](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Definitions.png) + +LDAP Definitions + +**6. Have LDAP use your domain in its database.** + +Create another LDIF file, which we will call `ldapdomain.ldif`, with the following contents, replacing your domain (in the Domain Component dc=) and password as appropriate: + + dn: olcDatabase={1}monitor,cn=config + changetype: modify + replace: olcAccess + olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" + read by dn.base="cn=Manager,dc=mydomain,dc=com" read by * none + + dn: olcDatabase={2}hdb,cn=config + changetype: modify + replace: olcSuffix + olcSuffix: dc=mydomain,dc=com + + dn: olcDatabase={2}hdb,cn=config + changetype: modify + replace: olcRootDN + olcRootDN: cn=Manager,dc=mydomain,dc=com + + dn: olcDatabase={2}hdb,cn=config + changetype: modify + add: olcRootPW + olcRootPW: {SSHA}PASSWORD + + dn: olcDatabase={2}hdb,cn=config + changetype: modify + add: olcAccess + olcAccess: {0}to attrs=userPassword,shadowLastChange by + dn="cn=Manager,dc=mydomain,dc=com" write by anonymous auth by self write by * none + olcAccess: {1}to dn.base="" by * read + olcAccess: {2}to * by dn="cn=Manager,dc=mydomain,dc=com" write by * read + +Then load it as follows: + + # ldapmodify -H ldapi:/// -f ldapdomain.ldif + +![LDAP Domain Configuration](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Domain-Configuration.png) + +LDAP Domain Configuration + +**7. Now it’s time to add some entries to our LDAP directory. Attributes and values are separated by a colon `(:)` in the following file, which we’ll name `baseldapdomain.ldif`:** + + dn: dc=mydomain,dc=com + objectClass: top + objectClass: dcObject + objectclass: organization + o: mydomain com + dc: mydomain + + dn: cn=Manager,dc=mydomain,dc=com + objectClass: organizationalRole + cn: Manager + description: Directory Manager + + dn: ou=People,dc=mydomain,dc=com + objectClass: organizationalUnit + ou: People + + dn: ou=Group,dc=mydomain,dc=com + objectClass: organizationalUnit + ou: Group + +Add the entries to the LDAP directory: + + # ldapadd -x -D cn=Manager,dc=mydomain,dc=com -W -f baseldapdomain.ldif + +![Add LDAP Domain Attributes and Values](http://www.tecmint.com/wp-content/uploads/2015/06/Add-LDAP-Domain-Configuration.png) + +Add LDAP Domain Attributes and Values + +**8. Create a LDAP user called ldapuser (adduser ldapuser), then create the definitions for a LDAP group in `ldapgroup.ldif`.** + + # adduser ldapuser + # vi ldapgroup.ldif + +Add following content. + + dn: cn=Manager,ou=Group,dc=mydomain,dc=com + objectClass: top + objectClass: posixGroup + gidNumber: 1004 + +where gidNumber is the GID in /etc/group for ldapuser) and load it: + + # ldapadd -x -W -D "cn=Manager,dc=mydomain,dc=com" -f ldapgroup.ldif + +**9. Add a LDIF file with the definitions for user ldapuser (`ldapuser.ldif`):** + + dn: uid=ldapuser,ou=People,dc=mydomain,dc=com + objectClass: top + objectClass: account + objectClass: posixAccount + objectClass: shadowAccount + cn: ldapuser + uid: ldapuser + uidNumber: 1004 + gidNumber: 1004 + homeDirectory: /home/ldapuser + userPassword: {SSHA}fiN0YqzbDuDI0Fpqq9UudWmjZQY28S3M + loginShell: /bin/bash + gecos: ldapuser + shadowLastChange: 0 + shadowMax: 0 + shadowWarning: 0 + +and load it: + + # ldapadd -x -D cn=Manager,dc=mydomain,dc=com -W -f ldapuser.ldif + +![LDAP User Configuration](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-User-Configuration.png) + +LDAP User Configuration + +Likewise, you can delete the user entry you just created: + + # ldapdelete -x -W -D cn=Manager,dc=mydomain,dc=com "uid=ldapuser,ou=People,dc=mydomain,dc=com" + +**10. Allow communication through the firewall:** + + # firewall-cmd --add-service=ldap + +**11. Last, but not least, enable the client to authenticate using LDAP.** + +To help us in this final step, we will use the authconfig utility (an interface for configuring system authentication resources). + +Using the following command, the home directory for the requested user is created if it doesn’t exist after the authentication against the LDAP server succeeds: + + # authconfig --enableldap --enableldapauth --ldapserver=rhel7.mydomain.com --ldapbasedn="dc=mydomain,dc=com" --enablemkhomedir --update + +![LDAP Client Configuration](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Client-Configuration.png) + +LDAP Client Configuration + +### Summary ### + +In this article we have explained how to set up basic authentication against a LDAP server. To further configure the setup described in the present guide, please refer to [Chapter 13 – LDAP Configuration][3] in the RHEL 7 System administrator’s guide, paying special attention to the security settings using TLS. + +Feel free to leave any questions you may have using the comment form below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/setup-ldap-server-and-configure-client-authentication/ + +作者:[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/automatic-rhel-installations-using-kickstart/ +[2]:http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ +[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Directory_Servers.html \ No newline at end of file From ee107f6081605dce3fc6a61a7c7e33c3fe0d448c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 12 Jun 2015 15:36:37 +0800 Subject: [PATCH 1155/2517] =?UTF-8?q?20150612-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...che Containers with Docker on Fedora 22.md | 282 ++++++++++++++++++ ...gure Swarm Native Clustering for Docker.md | 95 ++++++ ...Color ANSI Logos of Linux Distributions.md | 183 ++++++++++++ 3 files changed, 560 insertions(+) create mode 100644 sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md create mode 100644 sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md create mode 100644 sources/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md diff --git a/sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md b/sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md new file mode 100644 index 0000000000..493e474c7e --- /dev/null +++ b/sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md @@ -0,0 +1,282 @@ +How to Configure Apache Containers with Docker on Fedora 22 +================================================================================ +In this article we are going to learn about Docker, how to use it to deploy Apache httpd and how can you share it on Docker Hub. First we are going to learn how to pull and use images hosted on Docker Hub, and then install Apache on an image of Fedora 22 interactively, after that we are going to learn how to use a Dockerfile to make an image in a faster and more elegant way, finally we are going to publish the image we've created in Docker Hub, so anyone will be able download and use it later. + +### Installing Docker and saying hello world ### + +**Requirements** + +You will need atleast these things to run Docker: + +- You need a 64bit Kernel version 3.10 or higher +- Iptables 1.4 - This will be used by Docker to make the network wizardry, such as Network Address Translation. +- Git 1.7 - Docker uses Git to make it transactions to repositories, like Docker Hub +- ps - This utility is present in most environments and is provided in the procps package. +- root - despite normal users can run docker client by TCP and other means, we will assume that you are root, for sake of simplicity + +#### Install docker using dnf #### + +The following commands will install Docker + + dnf update && dnf install docker + +**Note**: You can still use Yum in Fedora 22, but it's deprecated in favor of DNF and is not present in a clean install. + +#### Check your install #### + +The first command we are going to use is docker info, this give you many information: + + docker info + +Also try **docker version**: + + docker version + +#### Starting Docker as daemon #### + +You should start a docker instance that will take care of our requests. + + docker -d + +Now set docker to start with the system, so you don't need to run the previous command every time you reboot. + + chkconfig docker on + +Let's say hello world with Busybox: + + docker run -t busybox /bin/echo "hello world" + +In this command, we tell Docker to execute /bin/echo "hello world" in an instance/container of the Busybox image, which is a minimal POSIX environment based in a single binary and links to it. + +If Docker can't find a local image of Busybox on your system, it will pull the image automatically from Docker Hub, as you can see in the following screenshot: + +![Hello world with Busybox](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-hello-world-busybox-complete.png) + +Hello world with Busybox + +Try the same command again, this time as Docker already have the Busybox image locally, all you will see is the output of echo: + + docker run -t busybox /bin/echo "hello world" + +Try also the following to enter in the container environment: + + docker run -it busybox /bin/sh + +To leave and stop the container use the **exit** command + +### Dockerizing Apache interactively ### + +Pull/Download the Fedora image: + + docker pull fedora:22 + +Run a container dettached from the console: + + docker run -d -t fedora:22 /bin/bash + +List running containers and identify by name as follows + + docker ps + +![listing with docker ps and attaching with docker attach](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-ps-with-docker-attach-highlight.png) + +listing with docker ps and attaching with docker attach + +The name angry_nobel was given to our instance, so let's attach: + + docker attach angry_nobel + +Note: Every time you run a container a new name will be given, if you need a constant name for you container you should use the -name parameter to docker run command. + +#### Installing Apache #### + +The following command will update DNF database, download install Apache (httpd package) and clean DNF cache to make the image small + + dnf -y update && dnf -y install httpd && dnf -y clean all + +Configuring Apache + +The only thing we are going to change httpd.conf is the ServerName, this makes Apache stops to complain. + + sed -i.orig 's/#ServerName/ServerName/' /etc/httpd/conf/httpd.conf + +**Set the environment** + +To make Apache run in standalone mode, you must provide some information in the form of enviroenment variables, and also you will need the directories set in these variables, so we are going to make this with a small shell script that will also start Apache + + vi /etc/httpd/run_apache_foreground + +---------- + + #!/bin/bash + + #set variables + APACHE_LOG_DI=R"/var/log/httpd" + APACHE_LOCK_DIR="/var/lock/httpd" + APACHE_RUN_USER="apache" + APACHE_RUN_GROUP="apache" + APACHE_PID_FILE="/var/run/httpd/httpd.pid" + APACHE_RUN_DIR="/var/run/httpd" + + #create directories if necessary + if ! [ -d /var/run/httpd ]; then mkdir /var/run/httpd;fi + if ! [ -d /var/log/httpd ]; then mkdir /var/log/httpd;fi + if ! [ -d /var/lock/httpd ]; then mkdir /var/lock/httpd;fi + + #run Apache + httpd -D FOREGROUND + +**Alternatively**, you can past and run this snippet on the container shell: + + dnf -y install git && git clone https://github.com/gaiada/run-apache-foreground.git && cd run-apach* && ./install && dnf erase git + +The inline script above will, install Git, clone [this repository][1], put the script in place and ask you if you want uninstall Git. + +**Saving your container state** + +Your container is now ready to run Apache, now it is time to save the current state of this container in an image to be able use whenever you need. + +To leave the container environment, you must press **Ctrl+p** followed by **Ctrl+q**, if you just call exit in the shell, you will also stop the container and lost what you have done so far. + +Once you are back to the Docker host, use **docker commit** followed by the container and the repository name/tag you desire: + + docker commit angry_nobel gaiada/apache + +Now that you saved the container status into a image, you can use **docker stop** on the running container: + + docker stop angry_nobel + +**Run and test your image** + +Finally, run a container from your new image and redirect connections on port 80 to it with: + + docker run -p 80:80 -d -t gaiada/apache /etc/httpd/run_apache_foreground + + + +At this point, you are already running Apache in your container, open your browser to access the service in [http://localhost][2] and you will see the Apache default page as follows + +![Apache default page running from Docker container](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-apache-running.png) + +Apache default page running from Docker container + +### Dockerizing Apache with a Dockerfile ### + +Now we are going to create a new Apache image, this time the steps will be written in a Dockerfile, that will be processed to form the image. + +First, create a directory on which we will put the Dockerfile and enter this directory: + + mkdir apachedf; cd apachedf + +And then create a file named Dockerfile with the following content: + + FROM fedora:22 + + MAINTAINER Carlos Alberto + LABEL version="0.1" + + RUN dnf -y update && dnf -y install httpd && dnf -y clean all + + RUN [ -d /var/log/httpd ] || mkdir /var/log/httpd + RUN [ -d /var/run/httpd ] || mkdir /var/run/httpd + RUN [ -d /var/lock/httpd ] || mkdir /var/lock/httpd + + RUN sed -i.orig 's/#ServerName/ServerName/' /etc/httpd/conf/httpd.conf + + ENV APACHE_RUN_USER apache + ENV APACHE_RUN_GROUP apache + ENV APACHE_LOG_DIR /var/log/httpd + ENV APACHE_LOCK_DIR /var/lock/httpd + ENV APACHE_RUN_DIR /var/run/httpd + ENV APACHE_PID_FILE /var/run/httpd/httpd.pid + + EXPOSE 80 + + CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"] + + + +Let's see what is on this Dockerfile: + +**FROM** - This tells docker that we are going to use Fedora 22 as base image + +**MANTAINER** and **LABEL** - these commands are informative and have no direct influence on the image + +**RUN** - Automate the steps we've done interactively, install Apache, create directories and edit httpd.conf + +**ENV** - Set the environment variables, now we don't need the run_apache_foreground script anymore. + +**EXPOSE** - Expose the port 80 to the world + +**CMD** - Set the default command to httpd, so we don't need to do this every time we start a new container + +**Build the image** + +Now we are going to build the image and put the TAG gaiada/apachedf on it: + + docker build -t gaiada/apachedf:0.1 . + +![docker build complete](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-build-complete.png) + +docker build complete + +Use **docker images** list the local images and see if your new image is there: + + docker images + +And then run you new image: + + docker run -t -p 80:80 gaiada/apachedf + +That is it for the Dockerfile, using this feature make things much easier, faster and reproducible. + +### Publishing your images ### + +Until now, you just pulled images from Docker Hub, but you can also push you image and pull them later as needed. In fact other can also download your image and use it in their systems without the need of change anything and now we are going to learn how to make our image available for others worldwide. + +**Creating account** + +For you to be able to push your image on Docker Hub, you need to create an account. Access [https://hub.docker.com/account/signup/][3] and fill the following form: + +![Docker Hub signup page](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-hub-signup.png) + +Docker Hub signup page + +**Login** + +Enter the following command and proceed with the login name, password and email you provided in your account creation + + docker login + +After you do the first login, your account information will be recorded in **~/.dockercfg** + +**Pushing** + +Push the page to the server with the **docker push [registry/]your_login/repository_name[:tag]** + + docker push docker.io/gaiada/apachedf + +You might see something like this on your console: + +![Docker push Apache image complete](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-pushing-apachedf-complete.png) + +Docker push Apache image complete + +### Conclusion ### + +Now that you know how to Dockerize Apache, try to include some modules, Perl, PHP, proxy, HTTPS, or whatever you need. I hope you guys liked it, and push your own images on Docker Hub. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/configure-apache-containers-docker-fedora-22/ + +作者:[Carlos Alberto][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/carlosal/ +[1]:https://github.com/gaiada/run-apache-foreground +[2]:http://localhost/ +[3]:https://hub.docker.com/account/signup/ \ No newline at end of file diff --git a/sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md b/sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md new file mode 100644 index 0000000000..d07cd26428 --- /dev/null +++ b/sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md @@ -0,0 +1,95 @@ +How to Configure Swarm Native Clustering for Docker +================================================================================ +Hi everyone, today we'll learn about Swarm and how we can create native clusters using Docker with Swarm. [Docker Swarm][1] is a native clustering program for Docker which turns a pool of Docker hosts into a single virtual host. Swarm serves the standard Docker API, so any tool which can communicate with a Docker daemon can use Swarm to transparently scale to multiple hosts. Swarm follows the "batteries included but removable" principle as other Docker Projects. It ships with a simple scheduling backend out of the box, and as initial development settles, an API will develop to enable pluggable backends. The goal is to provide a smooth out-of-box experience for simple use cases, and allow swapping in more powerful backends, like Mesos, for large scale production deployments. Swarm is extremely easy to setup and get started. + +So, here are some features of Swarm 0.2 out of the box. + +1. Swarm 0.2.0 is about 85% compatible with the Docker Engine. +2. It supports Resource Management. +3. It has Advanced Scheduling feature with constraints and affinities. +4. It supports multiple Discovery Backends (hubs, consul, etcd, zookeeper) +5. It uses TLS encryption method for security and authentication. + +So, here are some very simple and easy steps on how we can use Swarm. + +### 1. Pre-requisites to run Swarm ### + +We must install Docker 1.4.0 or later on all nodes. While each node's IP need not be public, the Swarm manager must be able to access each node across the network. + +Note: Swarm is currently in beta, so things are likely to change. We don't recommend you use it in production yet. + +### 2. Creating Swarm Cluster ### + +Now, we'll create swarm cluster by running the below command. Each node will run a swarm node agent. The agent registers the referenced Docker daemon, monitors it, and updates the discovery backend with the node's status. The below command returns a token which is a unique cluster id, it will be used when starting the Swarm Agent on nodes. + + # docker run swarm create + +![Creating Swarm Cluster](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-swarm-cluster.png) + +### 3. Starting the Docker Daemon in each nodes ### + +We'll need to login into each node that we'll use to create clusters and start the Docker Daemon into it using flag -H . It ensures that the docker remote API on the node is available over TCP for the Swarm Manager. To do start the docker daemon, we'll need to run the following command inside the nodes. + + # docker -H tcp://0.0.0.0:2375 -d + +![Starting Docker Daemon](http://blog.linoxide.com/wp-content/uploads/2015/05/starting-docker-daemon.png) + +### 4. Adding the Nodes ### + +After enabling Docker Daemon, we'll need to add the Swarm Nodes to the discovery service. We must ensure that node's IP must be accessible from the Swarm Manager. To do so, we'll need to run the following command. + + # docker run -d swarm join --addr=:2375 token:// + +![Adding Nodes to Cluster](http://blog.linoxide.com/wp-content/uploads/2015/05/adding-nodes-to-cluster.png) + +**Note**: Here, we'll need to replace and with the IP address of the Node and the cluster ID we got from step 2. + +### 5. Starting the Swarm Manager ### + +Now, as we have got the nodes connected to the cluster. Now, we'll start the swarm manager, we'll need to run the following command in the node. + + # docker run -d -p :2375 swarm manage token:// + +![Starting Swarm Manager](http://blog.linoxide.com/wp-content/uploads/2015/05/starting-swarm-manager.png) + +### 6. Checking the Configuration ### + +Once the manager is running, we can check the configuration by running the following command. + + # docker -H tcp:// info + +![Accessing Swarm Clusters](http://blog.linoxide.com/wp-content/uploads/2015/05/accessing-swarm-cluster.png) + +**Note**: We'll need to replace with the ip address and port of the host running the swarm manager. + +### 7. Using the docker CLI to access nodes ### + +After everything is done perfectly as explained above, this part is the most important part of the Docker Swarm. We can use Docker CLI to access the nodes and run containers on them. + + # docker -H tcp:// info + # docker -H tcp:// run ... + +### 8. Listing nodes in the cluster ### + +We can get a list of all of the running nodes using the swarm list command. + + # docker run --rm swarm list token:// + +![Listing Swarm Nodes](http://blog.linoxide.com/wp-content/uploads/2015/05/listing-swarm-nodes.png) + +### Conclusion ### + +Swarm is really an awesome feature of docker that can be used for creating and managing clusters. It is pretty easy to setup and use. It is more beautiful when we use constraints and affinities on top of it. Advanced Scheduling is an awesome feature of it which applies filters to exclude nodes with ports, labels, health and it uses strategies to pick the best node. So, if you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/configure-swarm-clustering-docker/ + +作者:[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/ +[1]:https://docs.docker.com/swarm/ \ No newline at end of file diff --git a/sources/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md b/sources/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md new file mode 100644 index 0000000000..6cdc510092 --- /dev/null +++ b/sources/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md @@ -0,0 +1,183 @@ +Linux_Logo – A Command Line Tool to Print Color ANSI Logos of Linux Distributions +================================================================================ +linuxlogo or linux_logo is a Linux command line utility that generates a color ANSI picture of Distribution logo with a few system information. + +![Linux_Logo - Prints Color ANSI Logs of Linux Distro](http://www.tecmint.com/wp-content/uploads/2015/06/Linux_Logo.png) + +Linux_Logo – Prints Color ANSI Logs of Linux Distro + +This utility obtains System Information from /proc Filesystem. linuxlogo is capable of showing color ANSI image of various logos other than the host distribution logo. + +The System information associated with logo includes – Linux Kernel Version, Time when Kernel was last Compiled, Number/core of processor, Speed, Manufacturer and processor Generation. It also show information about total physical RAM. + +It is worth mentioning here that screenfetch is another tool of similar kind, which shows distribution logo and a more detailed and formatted system inform http://www.tecmint.com/screenfetch-system-information-generator-for-linux/ation. We have already covered screenfetch long ago, which you may refer at: + +- [ScreenFetch – Generates Linux System Information][15] + +linux_logo and Screenfetch should not be compared to each other. While the output of screenfetch is more formatted and detailed, where linux_logo produce maximum number of color ANSI diagram, and option to format the output. + +linux_logo is written primarily in C programming Language, which displays linux logo in an X Window System and hence User Interface X11 aka X Window System should be installed. The software is released under GNU General Public License Version 2.0. + +For the purpose of this article, we’re using following testing environment to test the linux_logo utility. + + Operating System : Debian Jessie + Processor : i3 / x86_64 + +### Installing Linux Logo Utility in Linux ### + +**1. The linuxlogo package (stable version 5.11) is available to install from default package repository under all Linux distributions using apt, yum or dnf package manager as shown below.** + + # apt-get install linux_logo [On APT based Systems] + # yum install linux_logo [On Yum based Systems] + # dnf install linux_logo [On DNF based Systems] + OR + # dnf install linux_logo.x86_64 [For 64-bit architecture] + +**2. Once linuxlogo package has been installed, you can run the command `linuxlogo` to get the default logo for the distribution you are using..** + + # linux_logo + OR + # linuxlogo + +![Get Default OS Logo](http://www.tecmint.com/wp-content/uploads/2015/06/Get-Default-OS-Logo.png) + +Get Default OS Logo + +**3. Use the option `[-a]`, not to print any fancy color. Useful if viewing linux_logo over black and white terminal.** + + # linux_logo -a + +![Black and White Linux Logo](http://www.tecmint.com/wp-content/uploads/2015/06/Black-and-White-Linux-Logo.png) + +Black and White Linux Logo + +**4. Use option `[-l]` to print LOGO only and exclude all other System Information.** + +# linux_logo -l + +![Print Distribution Logo](http://www.tecmint.com/wp-content/uploads/2015/06/Print-Distribution-Logo.png) + +Print Distribution Logo + +**5. The `[-u]` switch will display system uptime.** + + # linux_logo -u + +![Print System Uptime](http://www.tecmint.com/wp-content/uploads/2015/06/Print-System-Uptime.png) + +Print System Uptime + +**6. If you are interested in Load Average, use option `[-y]`. You may use more than one option at a time.** + + # linux_logo -y + +![Print System Load Average](http://www.tecmint.com/wp-content/uploads/2015/06/Print-System-Load-Average.png) + +Print System Load Average + +For more options and help on them, you may like to run. + + # linux_logo -h + +![Linuxlogo Options and Help](http://www.tecmint.com/wp-content/uploads/2015/06/linuxlogo-options.png) + +Linuxlogo Options and Help + +**7. There are a lots of built-in Logos for various Linux distributions. You may see all those logos using option `-L list` switch.** + + # linux_logo -L list + +![List of Linux Logos](http://www.tecmint.com/wp-content/uploads/2015/06/List-of-Linux-Logos.png) + +List of Linux Logos + +Now you want to print any of the logo from the list, you may use `-L NUM` or `-L NAME` to display selected logo. + +- -L NUM – will print logo with number NUM (deprecated). +- -L NAME – will print the logo with name NAME. + +For example, to display AIX Logo, you may use command as: + + # linux_logo -L 1 + OR + # linux_logo -L aix + +![Print AIX Logo](http://www.tecmint.com/wp-content/uploads/2015/06/Print-AIX-Logo.png) + +Print AIX Logo + +**Notice**: The `-L 1` in the command where 1 is the number at which AIX logo appears in the list, where `-L aix` is the name at which AIX logo appears in the list. + +Similarly, you may print any logo using these options, few examples to see.. + + # linux_logo -L 27 + # linux_logo -L 21 + +![Various Linux Logos](http://www.tecmint.com/wp-content/uploads/2015/06/Various-Linux-Logos.png) + +Various Linux Logos + +This way, you can use any of the logos just by using the number or name, that is against it. + +### Some Useful Tricks of Linux_logo ### + +**8. You may like to print your Linux distribution logo at login. To print default logo at login you may add the below line at the end of `~/.bashrc` file.** + + if [ -f /usr/bin/linux_logo ]; then linux_logo; fi + +**Notice**: If there isn’t any` ~/.bashrc` file, you may need to create one under user home directory. + +**9. After adding above line, just logout and re-login again to see the default logo of your Linux distribution.** + +![Print Logo on User Login](http://www.tecmint.com/wp-content/uploads/2015/06/Print-Logo-on-Login.png) + +Print Logo on User Login + +Also note, that you may print any logo, after login, simply by adding the below line. + + if [ -f /usr/bin/linux_logo ]; then linux_logo -L num; fi + +**Important**: Don’t forget to replace num with the number that is against the logo, you want to use. + +**10. You can also print your own logo by simply specifying the location of the logo as shown below.** + + # linux_logo -D /path/to/ASCII/logo + +**11. Print logo on Network Login.** + + # /usr/local/bin/linux_logo > /etc/issue.net + +You may like to use ASCII logo if there is no support for color filled ANSI Logo as: + + # /usr/local/bin/linux_logo -a > /etc/issue.net + +**12. Create a Penguin port – A set of port to answer connection. To create Penguin port Add the below line to file /etc/services file.** + + penguin 4444/tcp penguin + +Here ‘4444‘ is the port number which is currently free and not used by any resource. You may use a different port. + +Also add the below line to file /etc/inetd.conf file. + + penguin stream tcp nowait root /usr/local/bin/linux_logo + +Restart the service inetd as: + + # killall -HUP inetd + +Moreover linux_logo can be used in bootup script to fool the attacker as well as you can play a prank with your friend. This is a nice tool and I might use it in some of my scripts to get output as per distribution basis. + +Try it once and you won’t regret. Let us know what you think of this utility and how it can be useful for you. Keep Connected! Keep Commenting. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux_logo-tool-to-print-color-ansi-logos-of-linux/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/screenfetch-system-information-generator-for-linux/ \ No newline at end of file From 6cc8ebfcfd4b55f1522095583d260fae8d32d56b Mon Sep 17 00:00:00 2001 From: NearTan Date: Fri, 12 Jun 2015 18:38:21 +0800 Subject: [PATCH 1156/2517] translated --- ...Command Line Using 'Speedtest-CLI' Tool.md | 134 ------------ ...Command Line Using 'Speedtest-CLI' Tool.md | 196 ++++++++++++++++++ 2 files changed, 196 insertions(+), 134 deletions(-) delete mode 100644 sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md create mode 100644 translated/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md diff --git a/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md b/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md deleted file mode 100644 index 601a89151d..0000000000 --- a/sources/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md +++ /dev/null @@ -1,134 +0,0 @@ -translating by NearTan - -How to Test Your Internet Speed Bidirectionally from Command Line Using ‘Speedtest-CLI’ Tool -================================================================================ -We always need to check the speed of the Internet connection at home and office. What we do for this? Go to websites like Speedtest.net and begin test. It loads JavaScript in the web browser and then select best server based upon ping and output the result. It also uses a Flash player to produce graphical results. - -What about headless server, where isn’t any web based browser and the main point is, most of the servers are headless. The another bottleneck of such web browser based speed testing is that, you can’t schedule the speed testing at regular interval. Here comes an application “Speedtest-cli” that removes such bottlenecks and let you test the speed of Internet connection from command line. - -#### What is Speedtest-cli #### - -The application is basically a script developed in Python programming Language. It measures Internet Bandwidth speed bidirectionally. It used speedtest.net infrastructure to measure the speed. Speedtest-cli is able to list server based upon physical distance, test against specific server, and gives you URL to share the result of your internet speed test. - -To install latest speedtest-cli tool in Linux systems, you must have Python 2.4-3.4 or higher version installed on the system. - -### Install speedtest-cli in Linux ### - -There are two ways to install speedtest-cli tool. The first method involves the use of `python-pip` package while the second method is to download the Python script, make it executable and run, here I will cover both ways…. - -#### Install speedtest-cli Using pythin-pip #### - -First you need to install `python-pip` package, then afterwards you can install the speedtest-cli tool using pip command as shown below. - - $ sudo apt-get install python-pip - $ sudo pip install speedtest-cli - -To upgrade speedtest-cli, at later stage, use. - - $ sudo pip install speedtest-cli --upgrade - -#### Install speedtest-cli Using Python Script #### - -First download the python script from github using wget command, unpack the downloaded file (master.zip) and extract it.. - - $ wget https://github.com/sivel/speedtest-cli/archive/master.zip - $ unzip master.zip - -After extracting the file, go to the extracted directory `speedtest-cli-master` and make the script file executable. - - $ cd speedtest-cli-master/ - $ chmod 755 speedtest_cli.py - -Next, move the executable to `/usr/bin` folder, so that you don’t need to type the full path everytime. - - $ sudo mv speedtest_cli.py /usr/bin/ - -### Testing Internet Connection Speed with speedtest-cli ### - -**1. To test Download and Upload speed of your internet connection, run the `speedtest-cli` command without any argument as shown below.** - - $ speedtest_cli.py - -![Test Download Upload Speed in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Download-Upload-Speed-in-Linux1.png) -Test Download Upload Speed in Linux - -**2. To check the speed result in bytes in place of bits.** - - $ speedtest_cli.py --bytes - -![Test Internet Speed in Bytes](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Speed-in-Bytes.png) -Test Internet Speed in Bytes - -**3. Share your bandwidth speed with your friends or family. You are provided with a link that can be used to download an image.** - -![Share Internet Speed Results](http://www.tecmint.com/wp-content/uploads/2015/03/Share-Internet-Speed-Results.png) -Share Internet Speed Results - -The following picture is a sample speed test result generated using above command. - -![Speed Test Results](http://www.tecmint.com/wp-content/uploads/2015/03/Speed-Test-Results.png) -Speed Test Results - -**4. Don’t need any additional information other than Ping, Download and upload?** - - $ speedtest_cli.py --simple - -![Test Ping Download Upload Speed](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Ping-Download-Upload-Speed1.png) -Test Ping Download Upload Speed - -**5. List the `speedtest.net` server based upon physical distance. The distance in km is mentioned.** - - $ speedtest_cli.py --list - -![Check Speedtest.net Servers](http://www.tecmint.com/wp-content/uploads/2015/03/Check-Speedtest-Servers.png) -Check Speedtest.net Servers - -**6. The last stage generated a huge list of servers sorted on the basis of distance. How to get desired output? Say I only want to see the speedtest.net server located in Mumbai (India).** - - $ speedtest_cli.py --list | grep -i Mumbai - -![Check Nearest Server](http://www.tecmint.com/wp-content/uploads/2015/03/Check-Nearest-Server.png) -Check Nearest Server - -**7. Test connection speed against a specific server. Use Server Id generated in example 5 and example 6 in above.** - - $ speedtest_cli.py --server [server ID] - $ speedtest_cli.py --server [5060] ## Here server ID 5060 is used in the example. - -![Test Connection Against Server](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Connection-Against-Server.png) -Test Connection Against Server - -**8. To check the version number and help of `speedtest-cli` tool.** - - $ speedtest_cli.py --version - -![Check SpeedCli Version](http://www.tecmint.com/wp-content/uploads/2015/03/Check-SpeedCLi-Version.png) -Check SpeedCli Version - - $ speedtest_cli.py --help - -![SpeedCli Help](http://www.tecmint.com/wp-content/uploads/2015/03/SpeedCli-Help.png) -SpeedCli Help - -**Note:** Latency reported by tool is not its goal and one should not rely on it. The relative latency values output is responsible for server selected to be tested against. CPU and Memory capacity will influence the result to certain extent. - -### Conclusion ### - -The tool is must for system administrators and developers. A simple script which runs without any issue. I must say that the application is wonderful, lightweight and do what it promises. I disliked Speedtest.net for the reason it was using flash, but speedtest-cli gave me a reason to love them. - -speedtest_cli is a third party application and should not be used to automatically record the bandwidth speed. Speedtest.net is used by millions of users and it is a good idea to [Set Your Own Speedtest Mini Server][1]. - -That’s all for now, till then stay tuned and connected to Tecmint. Don’t forget to give your valuable feedback in the comments below. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ - -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/speedtest-mini-server-to-test-bandwidth-speed/ diff --git a/translated/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md b/translated/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md new file mode 100644 index 0000000000..9b4c2ae075 --- /dev/null +++ b/translated/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md @@ -0,0 +1,196 @@ + + +用命令行工具Speedtest-CLI来测试你的上下行网速 +================================================================================ + +我们经常需要到检查家里与办公室之间的网络是否连通,那么我们要怎么做呢?打开网站Speedtest.net然后开始测试。网站是通过加载浏览器中的JavaScript脚本然后选择最佳的服务器测速然后用Flash产生图形化的结果。 + + +那么远程服务器呢?要知道大多数远程服务器是没有浏览器可以打开web页面的。用浏览器打开网页测速的瓶颈就在此,你不能按计划的对服务器进行定期的常规测试。这时需要到一个名为Speedtest-cli的软件来打破这个瓶颈,它能让你通过命令行来测试互联网连接的速度。 + + +#### Speedtest-cli是什么 #### + + +此程序是基于Python开发的脚本程序,利用了speedtest.net的服务来测量出上下行的宽带。Speedtest-cli能根据机房离测速服务器的物理距离来列出测速服务器,或者针对某一服务器进行测速,同时还能为你生成一个URL以便你分享你的测速结果。 + + +要在Linux上安装最新版本的speedtest-cli,你必须安装2.4-3.4或者更高版本的Python。 + + +### 在Linux上安装speedtest-cli ### + + +有两种方法可以安装speedtest-cli。第一种方法需要用到`python-pip`包管理器,第二种方法需要安装Python脚本,生成安装文件然后运行,这里我们分别介绍两种方法: + + +#### 使用pythin-pip安装speedtest-cli#### + + +首先你需要安装`python-pip`包管理器,之后你就可以用pip命令来安装speedtest-cli + + $ sudo apt-get install python-pip + $ sudo pip install speedtest-cli + + +如果要吧speedtest-cli升级至最新版本,你需要输入以下命令 + + $ sudo pip install speedtest-cli --upgrade + + +#### 通过Pyhton脚本来安装speedtest-cli #### + + +首先要用wget命令从github上下来Python脚本,然后解压提取下载的文件(master.zip) + + $ wget https://github.com/sivel/speedtest-cli/archive/master.zip + $ unzip master.zip + + +提取出文件后,进入提取出的目录`speedtest-cli-master`然后使脚本可以执行。 + + $ cd speedtest-cli-master/ + $ chmod 755 speedtest_cli.py + + +下一步,把可执行的脚本移动到`/usr/bin`文件夹,这样你就不用每次都输入完整的脚本路径了。 + + $ sudo mv speedtest_cli.py /usr/bin/ + + +### 用speedtest-cli测试互联网连通速度### + + +**1. 要测试你的下载与上传速度,只需要运行`speedtest-cli`命令,不需要带参数。** + + $ speedtest_cli.py + +
+![Test Download Upload Speed in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Download-Upload-Speed-in-Linux1.png) + +在Linux下测试上传下载速度 +
+ + +**2. 测试上传下载bytes的速度** + + $ speedtest_cli.py --bytes + +
+![Test Internet Speed in Bytes](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Speed-in-Bytes.png) + +测试bytes的速度 +
+ + +**3. 工具提供一个链接来下载由你的宽带测试结果生成的图片,你可以分享给你的家人朋友。** + +
+![Share Internet Speed Results](http://www.tecmint.com/wp-content/uploads/2015/03/Share-Internet-Speed-Results.png) + +分享测速结果 +
+ + +下面的图片就是你通过以上的命令行测速而生成的图片 + +
+![Speed Test Results](http://www.tecmint.com/wp-content/uploads/2015/03/Speed-Test-Results.png) + +测速结果 +
+ +**4.如果你仅仅需要Ping,上传,下载的结果,就运行以下命令:** + + $ speedtest_cli.py --simple + +
+![Test Ping Download Upload Speed](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Ping-Download-Upload-Speed1.png) + +测试Ping,上传,下载的速度 +
+ + + + + +**5. 列出`speedtest.net`所有的服务器距离你的物理距离,单位是千米(km)** + + + $ speedtest_cli.py --list + +
+![Check Speedtest.net Servers](http://www.tecmint.com/wp-content/uploads/2015/03/Check-Speedtest-Servers.png) + +列出Speedtest.net的服务器 +
+ + +**6. 当获得一个非常长的服务器列表之后,怎么列出我想要的某个服务器?如果我要在speedtest.net服务器列表中找出位于Mumbai(印度)的服务器呢?** + + $ speedtest_cli.py --list | grep -i Mumbai + +
+![Check Nearest Server](http://www.tecmint.com/wp-content/uploads/2015/03/Check-Nearest-Server.png) + +列出最近的服务器 +
+ + +**7. 对指定的服务器进行测速。我们使用上面例子5和例子6中获取的服务器ID:** + + $ speedtest_cli.py --server [server ID] + $ speedtest_cli.py --server [5060] ## Here server ID 5060 is used in the example. + $ speedtest_cli.py --server [5060] ## 这里使用服务器ID为5060作为例子 + +
+![Test Connection Against Server](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Connection-Against-Server.png) + +对指定的服务器进行测速 +
+ + +**8. 输出`speedtest-cli`的版本信息和帮助文档** + + $ speedtest_cli.py --version + +
+![Check SpeedCli Version](http://www.tecmint.com/wp-content/uploads/2015/03/Check-SpeedCLi-Version.png) + +输出版本号 +
+ + $ speedtest_cli.py --help +
+![SpeedCli Help](http://www.tecmint.com/wp-content/uploads/2015/03/SpeedCli-Help.png) + +输出帮助文档 +
+ + +**提醒:**报告中的延迟并不是确切的结果,不应该过于依赖它;这个数值可以当作相对延迟,这对你选择某一测试服务器来说是可靠的。同时,CPU和内存的容量会影响结果的准确度。 + + +### 结论 ### + + +系统管理员和开发者应该必备这个简单的脚本工具,这个工具轻量级,功能齐全,真是太赞了。我不喜欢Speedtest.net的原因是它使用来flash,相反speedtest-cli刚好戳中了我的痛点。 + + +speedtest_cli是一个第三方工具,也不能自动地记录下宽带速度。Speedtest.net拥有上百万的用户,你可以自己[配制一个小型的测速服务器][1]。 + + +上面就是所有内容,更多内容敬请关注Tecmint。如果你有任何反馈记得在文章下方评论,如果你喜欢别忘了给我们点歌赞,分享我们的文章。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ + +作者:[Avishek Kumar][a] +译者:[NearTan](https://github.com/NearTan) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/speedtest-mini-server-to-test-bandwidth-speed/ From 14396245902d47487a9a9cc1ae020237156a32b7 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 13 Jun 2015 08:56:28 +0800 Subject: [PATCH 1157/2517] PUB:20150520 How to Use tmpfs on RHEL or CentOS 7.0 @geekpi --- ... How to Use tmpfs on RHEL or CentOS 7.0.md | 64 +++++++++++++++++++ ... How to Use tmpfs on RHEL or CentOS 7.0.md | 64 ------------------- 2 files changed, 64 insertions(+), 64 deletions(-) create mode 100644 published/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md delete mode 100644 translated/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md diff --git a/published/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md b/published/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md new file mode 100644 index 0000000000..8d376b8b72 --- /dev/null +++ b/published/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md @@ -0,0 +1,64 @@ +如何在RHEL/CentOS 7.0中使用tmpfs +================================================================================ +今天我们来谈谈 Centos 7 中的一个文件系统tmpfs,这是一个将所有文件和文件夹写到虚拟内存中而不是实际写到磁盘中的虚拟文件系统。这意味中tmpfs中所有的内容都是临时的,在tmpfs卸载、系统重启或者电源切断后内容都将会丢失。技术的角度上来说,tmpfs将所有的内容放在内核内部缓存中并且会调整大小来容纳文件,并可从交换空间中交换出不需要的页。 + +CentOS默认使用tmpfs做的几种用途可用df -h命令的输出来看: + + # df –h + +![df](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs1.jpg) + +- /dev - 含有针对所有设备的设备文件的目录 +- /dev/shm - 包含共享内存分配 +- /run - 用于系统日志 +- /sys/fs/cgroup - 用于cgrpups, 一个针对特定进程限制、管制和审计资源利用的内核特性 + +显然,它也可以用作/tmp目录, 你可以用下面的两种方法来做到: + +### 使用systemctl来在/tmp中启用tmpfs ### + +你可以使用systemctl命令在tmp目录启用tmpfs, 首先用下面的命令来检查这个特性是否可用: + + # systemctl is-enabled tmp.mount + +这会显示当先的状态,(如果未启用,)你可以使用下面的命令来启用它: + + # systemctl enable tmp.mount + +![systemctl](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs3.jpg) + +这会让系统控制/tmp目录并在该目录下挂载一个tmpfs文件系统。 + +### 手动挂载/tmp文件系统 ### + +你可以在/etc/fstab中添加下面这行,来手工在/tmp下挂载 tmpfs。 + + tmpfs /tmp tmpfs size=512m 0 0 + +接着运行这条命令 + + # mount –a + +![df](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs2.jpg) + +这应该就会在df -h中显示tmpfs了,同样也会在你下次重启时自动挂载。 + +### 立即创建tmpfs ### + +如果由于一些原因,你需要在一个文件夹下立即创建tmpfs,你可以使用下面的命令: + + # mount -t tmpfs -o size=1G tmpfs /mnt/mytmpfs + +当然你可以在size选项中指定你希望的大小和希望的挂载点,只要记住是有效的目录就行了。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/file-system/use-tmpfs-rhel-centos-7-0/ + +作者:[Adrian Dinu][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/adriand/ diff --git a/translated/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md b/translated/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md deleted file mode 100644 index 7f3e37b3fe..0000000000 --- a/translated/tech/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md +++ /dev/null @@ -1,64 +0,0 @@ -如何在RHEL/CentOS 7.0中使用tmpfs -================================================================================ - 7中的tmpfs,这是一个将所有文件和文件夹写到虚拟内存中而不是实际写到磁盘中的虚拟文件系统。这意味中tmpfs中所有的内容都是临时的,在取消挂载、系统重启或者电源切断后内容都将会丢失。技术的角度上来说,tmpfs将搜有的内容放在内核内部缓存中并且会增大或者缩小来容纳文件并可从交换空间中交换处不需要的页。 - -CentOS默认使用tmpfs做的事可用df -h命令的输出来看: - - # df –h - -![df](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs1.jpg) - -/dev - 含有针对所有设备的设备文件的目录 -/dev/shm – 包含共享内存分配 -/run - 用于系统日志 -/sys/fs/cgroup - 用于cgrpups, 一个针对特定进程限制、管制和审计资源利用的内核特性 - -/tmp目录, 你可以用下面的两种方法来做到: - -### 使用systemctl来在/tmp中启用tmpfs ### - -你可以使用systemctl命令在tmp目录启用tmpfs, 首先用下面的命令来检查这个特性是否可用: - - # systemctl is-enabled tmp.mount - -这会显示当先的状态,你可以使用下面的命令来启用它: - - # systemctl enable tmp.mount - -![systemctl](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs3.jpg) - -这会控制/tmp目录并挂载tmpfs。 - -### 手动挂载/tmp/文件系统 ### - -你可以在/etc/fstab中添加下面这行在/tmp挂载tmpfs。 - - tmpfs /tmp tmpfs size=512m 0 0 - -接着运行这条命令 - - # mount –a - -![df](http://blog.linoxide.com/wp-content/uploads/2015/05/tmpfs2.jpg) - -这应该就会在df -h中显示tmpfs了,同样也会在你下次重启是会自动挂载。 - -### 立即创建tmpfs ### - -如果由于一些原因,你写昂立即创建tmpfs,你可以使用下面的命令: - - # mount -t tmpfs -o size=1G tmpfs /mnt/mytmpfs - -当然你可以在size选项中指定你希望的大小和希望的挂载点,只要记住是有效的目录就行了。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/file-system/use-tmpfs-rhel-centos-7-0/ - -作者:[Adrian Dinu][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/adriand/ From 0d3a67a4e52ae4ab9ae0e8e588b98da3e08171b7 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Sat, 13 Jun 2015 13:26:38 +0800 Subject: [PATCH 1158/2517] translated --- ...0150610 How to secure your Linux server.md | 234 ----------------- ...0150610 How to secure your Linux server.md | 236 ++++++++++++++++++ 2 files changed, 236 insertions(+), 234 deletions(-) delete mode 100644 sources/tech/20150610 How to secure your Linux server.md create mode 100644 translated/tech/20150610 How to secure your Linux server.md diff --git a/sources/tech/20150610 How to secure your Linux server.md b/sources/tech/20150610 How to secure your Linux server.md deleted file mode 100644 index 51246cbfcb..0000000000 --- a/sources/tech/20150610 How to secure your Linux server.md +++ /dev/null @@ -1,234 +0,0 @@ -[translating by KayGuoWhu] -How to secure your Linux server -================================================================================ -> A server is made up of so many different components that makes it hard to offer one solution for everyone's needs. This articles tries to cover some useful tips and tricks to help you keep your server and users protected. - -No doubt improving server security is one of the most important things system administrators should always look for. This of course has been a topic of many different articles, blogs and forum threads. - -A server is made up of so many different components that makes it hard to offer one solution for everyone’s needs. This articles tries to cover some useful tips and tricks to help you keep your server and users protected. - -There are a few things that every system administrator should know and there is no way to talk about security without mentioning: - -- Keep your system **up to date** -- Change passwords frequently – use numeric, alphabetical and non-alphabetical symbols -- Give users the **minimum** permissions they need to do their job. -- Install only packages that you really need - -Here comes the more interesting part: - -### Change default SSH port ### - -The first thing that I would like to change when setting up a new server is the default SSH port. This simple change can save your server from thousands of brute force attempts. - -To change the default SSH port, open your sshd_config: - - sudo vim /etc/ssh/sshd_config - -Find the following line: - - #Port 22 - -The “#” symbol means that this line is a comment. Remove the # symbol then change the port to a number of your choice. The port number should not be larger than 65535. Make sure not to use any port already used by your system or other services. You can see a list of commonly used ports in [Wikipedia][1]. For the purpose of this article I will use: - - Port 16543 - -Now save the file and close it for a moment. - -Next important step is to: - -### Use SSH Keys ### - -It is extremely important to use SSH keys when accessing the server over SSH. This adds additional protection and ensure that only people who have the key can access the server. - -To generate SSH key on your local computer run: - - ssh-keygen -t rsa - -You will receive an output asking you to setup the file name where the key should be written as well as setup a password: - - Generating public/private rsa key pair. - Enter file in which to save the key (/root/.ssh/id_rsa): my_key - Enter passphrase (empty for no passphrase): - Enter same passphrase again: - Your identification has been saved in my_key. - Your public key has been saved in my_key.pub. - The key fingerprint is: - SHA256:MqD/pzzTRsCjZb6mpfjyrr5v1pJLBcgprR5tjNoI20A - -When compete, you will have two files: - -my_key - -my_key.pub - -Now copy the my_key.pub to ~/.ssh/authorized_keys - - cp my_key.pub ~/.ssh/authorized_keys - -Now upload your key on the server by using: - - scp -P16543 authorized_keys user@yourserver-ip:/home/user/.ssh/ - -Now you can access the server from the same local machine without having to enter any password. - -### Disable password authentication for SSH ### - -Now that we have SSH keys, it is safe to disable the password authentication for SSH. Open again the sshd_config file and set the following changes: - - ChallengeResponseAuthentication no - PasswordAuthentication no - UsePAM no - -### Disable Root login ### - -The next important step is to disable direct access with root user. Instead you should use sudo or su to perform administrative jobs. To do this you will need to add a new user that has root privileges. To do this you will need to edit the sudoers file located in: - - /etc/sudoers/ - -You may edit that file with command such as **visudo**. I would recommend you using this command as it will check the file for any syntax errors prior closing the file. This is useful if you have wrongly edited the file. - -Now to give root privileges to a user. For the purpose of this tutorial I will use user **sysadmin**. Make sure you are using an existing user on your system when you edit your own file. Now find the following line: - - root ALL=(ALL) ALL - -Copy that line and paste it below. In the new line change “root” with “sysadmin”. You should now have these two lines: - - root ALL=(ALL) ALL - sysadmin ALL=(ALL) ALL - -I would like to explain what each of the options in the above line represents: - - (1) root (2)ALL=(3)(ALL) (4)ALL - -(1) User - -(2) Terminal from which user can use sudo - -(3) Which users User may act as - -(4) Which commands he may use - - -You can use this settings to give access to users to some of the system tools. - -At this point it is safe to save your file. - -To disable direct root access over SSH open again the **sshd_config** file and find the following line: - - #PermitRootLogin yes - -and change it to: - - PermitRootLogin no - -Now save the file and restart the sshd daemon so the changes can take effect. Simply run the following command: - - sudo /etc/init.d/sshd restart - -### Setup firewall ### - -A firewall can help you block incoming and outgoing ports as well as block brute force login attempts. I like using SCF (Config Server Firewall) as it a powerful solution that uses iptables, it’s easy to manage and has a web interface for people who don’t like typing too many commands. - -To install CSF access your server and navigate to: - - cd /usr/local/src/ - -Then execute the following commands as root: - - wget https://download.configserver.com/csf.tgz - tar -xzf csf.tgz - csf - sh install.sh - -You will need to wait for the installer to finish its job. We will edit CSF configuration by editing: - - /etc/csf/csf.conf - -By default CSF will be started in testing mode. You will need to set it to product by changing the “TESTING” value to 0 - - TESTING = "0" - -Next thing you can edit are the allowed ports on your server. For that purpose find the following section of the csf.conf file and modify the ports per your needs: - - # Allow incoming TCP ports - TCP_IN = "20,21,25,53,80,110,143,443,465,587,993,995,16543" - # Allow outgoing TCP ports - TCP_OUT = "20,21,22,25,53,80,110,113,443,587,993,995,16543" - # Allow incoming UDP ports - UDP_IN = "20,21,53" - # Allow outgoing UDP ports - # To allow outgoing traceroute add 33434:33523 to this list - UDP_OUT = "20,21,53,113,123" - -Setup these per your requirements. I would recommend you using only the ports you need and avoiding allowing huge ranges of ports. Additionally you can avoid using the unsecured services unsecured ports. For example instead of allowing the default SMTP port 25 you can only allow ports 465 and 587 for outgoing emails. - -**IMPORTANT**: Do not forget to allow your customized SSH port. - -It is important to allow your IP address so it will never get blocked. Such IP addresses can be defined in: - - /etc/csf/csf.ignore - -The blocked IP address will appear in: - - /etc/csf/csf.deny - -When you have finished making changes – restart csf with: - - sudo /etc/init.d/csf restart - -Just to show you how useful CSF is I will show you part of csf.deny on one of my servers: - - 211.216.48.205 # lfd: (sshd) Failed SSH login from 211.216.48.205 (KR/Korea, Republic of/-): 5 in the last 3600 secs - Fri Mar 6 00:30:35 2015 - 103.41.124.53 # lfd: (sshd) Failed SSH login from 103.41.124.53 (HK/Hong Kong/-): 5 in the last 3600 secs - Fri Mar 6 01:06:46 2015 - 103.41.124.42 # lfd: (sshd) Failed SSH login from 103.41.124.42 (HK/Hong Kong/-): 5 in the last 3600 secs - Fri Mar 6 01:59:04 2015 - 103.41.124.26 # lfd: (sshd) Failed SSH login from 103.41.124.26 (HK/Hong Kong/-): 5 in the last 3600 secs - Fri Mar 6 02:48:26 2015 - 109.169.74.58 # lfd: (sshd) Failed SSH login from 109.169.74.58 (GB/United Kingdom/mail2.algeos.com): 5 in the last 3600 secs - Fri Mar 6 03:49:03 2015 - -The IP addresses that performed the brute force login attempt got blocked and they will not bother me again. - -#### Lock accounts #### - -In case an account is not going to be used for a long period of time you can lock it in order to prevent access to it. You can do this with: - - passwd -l accountName - -Account can still be used by the root user. - -### Know your services ### - -The whole idea of a server is to provide access to different services. Limit those to only the ones you need and disable the unused ones. This will not only free some resources, but will make your server a little bit more secured. For example if you are running a headless server you will definitely not need X display or a desktop environment. If there are no Windows network shares, you can safely disable Samba. - -You can use the commands below to see which services are started upon system boot: - - chkconfig --list | grep "3:on" - -If your system runs with **systemd**: - - systemctl list-unit-files --type=service | grep enabled - -To disable a service you can use commands such as: - - chkconfig service off - systemctl disable service - -In the above example change “service” with the name of the actual service you wish to stop. Here is an example: - - chkconfig httpd off - systemctl disable httpd - -### Conclusion ### - -This article was meant to cover some of the general security steps you can take to start securing your server. You can always take additional actions to increase the server protection. Remember that it is your responsibility to keep your server secured and make the wise decision while doing it. Unfortunately there is no easy way to do this and the “perfect” setup requires lots of time and tests until you achieve the desired result. - --------------------------------------------------------------------------------- - -via: http://www.linuxveda.com/2015/06/03/secure-linux-server/ - -作者:[Marin Todorow][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxveda.com/author/marin_todorov/ -[1]:http://en.wikipedia.org/wiki/Port_%28computer_networking%29#Common_port_numbers \ No newline at end of file diff --git a/translated/tech/20150610 How to secure your Linux server.md b/translated/tech/20150610 How to secure your Linux server.md new file mode 100644 index 0000000000..ef34eea398 --- /dev/null +++ b/translated/tech/20150610 How to secure your Linux server.md @@ -0,0 +1,236 @@ +Linux服务器安全攻略 +================================================================================ +> 一台服务器由大量功能各异的部件组成,这一点使得很难根据每个人的需求去提供定制的解决方案。这篇文章尽可能涵盖一些有所裨益的小技巧来帮助管理员保证服务器和用户安全。 + +毋庸置疑,对于系统管理员,提高服务器的安全性是最重要的事情之一。因此,也就有了许多针对这个话题而生的文章、博客和论坛帖子。 + +一台服务器由大量功能各异的部件组成,这一点使得很难根据每个人的需求去提供定制的解决方案。这篇文章尽可能涵盖一些有所裨益的小技巧来帮助管理员保证服务器和用户安全。 + +有一些常识是每个系统管理员都应该烂熟于心的,所以下面的几点在后文将不会提及: + +- 务必保证系统是**最新的** +- 经常更换密码 - 使用数字、阿拉伯字母和非阿拉伯字母的符号组合 +- 给予用户**最小**的权限,满足他们日常使用所需即可 +- 只安装那些真正需要的软件包 + +下面是一些更有意思的内容: + +### 更改SSH默认端口 ### + +在搭建好一台全新的服务器后要做的第一件事情就是更改SSH的默认端口。这个小小单的改动能够使你的服务器避免受到成千上万的暴力攻击(译者注:不更改默认端口相当于黑客们知道你家的门牌号,这样他们只需要一把一把的试钥匙就可能打开你家的锁)。 + +要更改默认的SSH端口,先打开sshd_config文件: + + sudo vim /etc/ssh/sshd_config + +找到下面这行: + + #Port 22 + +“#”号表示这行是注释。首先删除#号,然后把端口号改成目的端口。端口号不能超过65535,确保要指定的端口号没有被系统或其它服务占用。建议在[维基百科]上查看常用端口号列表。在本文中,使用这个端口号: + + Port 16543 + +然后保存并关闭文件,等待更改生效。 + +接下来的一步是: + +### 使用SSH密钥 ###、 + +在通过SSH访问服务器时,使用SSH密钥进行认证是尤其重要的。这样做为服务器增加了额外的保护,确保只有那些拥有密钥的人才能访问服务器。 + +在本地机器上运行下面命令以生成SSH密钥: + + ssh-keygen -t rsa + +你会看到下面的输出,询问要将密钥写到哪一个文件,并且设置一个密码: + + Generating public/private rsa key pair. + Enter file in which to save the key (/root/.ssh/id_rsa): my_key + Enter passphrase (empty for no passphrase): + Enter same passphrase again: + Your identification has been saved in my_key. + Your public key has been saved in my_key.pub. + The key fingerprint is: + SHA256:MqD/pzzTRsCjZb6mpfjyrr5v1pJLBcgprR5tjNoI20A + +完成之后,就得到两个文件: + +my_key + +my_key.pub + +接下来把my_key.pub拷贝到~/.ssh/authorized_key中 + + cp my_key.pub ~/.ssh/authorized_keys + +然后使用下面命令将密钥上传到服务器: + + scp -P16543 authorized_keys user@yourserver-ip:/home/user/.ssh/ + +至此,你就可以从这台本地机器上无密码地访问服务器了。 + +### 关闭SSH的密码认证 ### + +既然已经有了SSH密钥,那么关闭SSH的密码认证就很安全了。再次打开并编辑sshd_config,按如下设置: + + ChallengeResponseAuthentication no + PasswordAuthentication no + UsePAM no + +### 关闭Root登录 ### + +下面关键的一步是关闭root用户的直接访问,而使用sudo或su来执行管理员任务。首先需要添加一个有root权限的新用户,所以编辑这个路径下的sudoers文件: + + /etc/sudoers/ + +可以使用如**visudo**这样的命令编辑文件,推荐使用这个命令,因为它会在关闭文件之前检查任何可能出现的语法错误。当你在编辑文件时出错了,这就很有用了。 + +接下来赋予某个用户root权限。在本文中,使用用户**sysadmin**。确保在编辑后这个文件时使用的用户是系统已有的用户。找到下面这行: + + root ALL=(ALL) ALL + +拷贝这行,然后粘贴在下一行,然后把root更改为“sysadmin”,如下所示: + + root ALL=(ALL) ALL + sysadmin ALL=(ALL) ALL + +现在解释一下这行的每一个选项的含义: + + (1) root (2)ALL=(3)(ALL) (4)ALL + +(1) 指定用户 + +(2) 指定用户使用sudo的终端 + +(3) 指定用户可以担任的用户角色 + +(4) 这个用户可以使用的命令 + +使用这个配置可以给用户访问一些系统工具的权限。 + +这时,可以放心保存文件了。 + +为了关闭通过SSH直接访问root,需要再次打开**sshd_config**,找到下面这行: + + #PermitRootLogin yes + +更改为: + + PermitRootLogin no + +然后保存文件,重启sshd守护进程使改动生效。执行下面命令即可: + + sudo /etc/init.d/sshd restart + +### 设置防火墙 ### + +防火墙有助于过滤出入端口和阻止使用暴力法的登录尝试。我倾向于使用SCF(Config Server Firewall)这个强力防火墙。它使用了iptables,易于管理,而且对于不擅于输入命令的用户提供了web界面。 + +要安装CSF,先登录到服务器,切换到这个目录下: + + cd /usr/local/src/ + +然后以root权限执行下面命令: + + wget https://download.configserver.com/csf.tgz + tar -xzf csf.tgz + csf + sh install.sh + +只需等待安装程序完成,然后编辑CSF的配置文件: + + /etc/csf/csf.conf + +默认情况下CSF是以测试模式运行。通过将“TESTING”的值设置成0,切换到product模式。 + + TESTING = "0" + +下面要设置的就是服务器上允许通过的端口。在csf.conf中定位到下面的部分,根据需要修改端口: + + # Allow incoming TCP ports + TCP_IN = "20,21,25,53,80,110,143,443,465,587,993,995,16543" + # Allow outgoing TCP ports + TCP_OUT = "20,21,22,25,53,80,110,113,443,587,993,995,16543" + # Allow incoming UDP ports + UDP_IN = "20,21,53" + # Allow outgoing UDP ports + # To allow outgoing traceroute add 33434:33523 to this list + UDP_OUT = "20,21,53,113,123" + +请根据需要逐一设置,推荐只使用那些需要的端口,避免设置对端口进行大范围设置。此外,也要避免使用不安全服务的不安全端口。比如只允许端口465和587来发送电子邮件,取代默认的SMTP端口25. + +**重要**:千万不要忘记允许自定义SHH端口。 + +允许防火墙通过你的IP地址使其不被屏蔽,这一点很重要。IP地址定义在下面的文件中: + + /etc/csf/csf.ignore + +被屏蔽的IP地址会出现在这个文件中: + + /etc/csf/csf.deny + +一旦完成更改,使用这个命令重启csf: + + sudo /etc/init.d/csf restart + +下面是在某台服务器上的csf.deny文件的部分内容,来说明CSF是很有用的: + + 211.216.48.205 # lfd: (sshd) Failed SSH login from 211.216.48.205 (KR/Korea, Republic of/-): 5 in the last 3600 secs - Fri Mar 6 00:30:35 2015 + 103.41.124.53 # lfd: (sshd) Failed SSH login from 103.41.124.53 (HK/Hong Kong/-): 5 in the last 3600 secs - Fri Mar 6 01:06:46 2015 + 103.41.124.42 # lfd: (sshd) Failed SSH login from 103.41.124.42 (HK/Hong Kong/-): 5 in the last 3600 secs - Fri Mar 6 01:59:04 2015 + 103.41.124.26 # lfd: (sshd) Failed SSH login from 103.41.124.26 (HK/Hong Kong/-): 5 in the last 3600 secs - Fri Mar 6 02:48:26 2015 + 109.169.74.58 # lfd: (sshd) Failed SSH login from 109.169.74.58 (GB/United Kingdom/mail2.algeos.com): 5 in the last 3600 secs - Fri Mar 6 03:49:03 2015 + +可以看到,尝试通过暴力法登录的IP地址都被屏蔽了,真是眼不见心不烦啊! + +#### 锁住账户 #### + +如果某个账户在很长一段时间内都不会被使用了,那么可以将其锁住以防止其它人访问。使用如下命令: + + passwd -l accountName + +当然,这个账户依然可以被root用户使用。 + +### 了解服务器上的服务 ### + +服务器的本质是为各种服务提供访问功能。使服务器只运行所需的服务,关闭没有使用的服务。这样做不仅会释放一些系统资源,而且也会使服务器变得更加安全。比如,如果只是运行一个简单的服务器,显然不需要X显示或者桌面环境。如果不需要Windows网络共享功能,则可以放心关闭Samba。 + +使用下面的命令能查看伴随系统启动而启动的服务: + + chkconfig --list | grep "3:on" + +如果系统运行了**systemd**,执行这条命令: + + systemctl list-unit-files --type=service | grep enabled + +然后使用下面的命令关闭服务: + + chkconfig service off + systemctl disable service + +在上面的例子中,把“service”替换成真正想要停止的服务名称。实例如下: + + chkconfig httpd off + systemctl disable httpd + +### 小结 ### + +这篇文章的目的是涵盖一些通用的安全步骤以便帮助你保护服务器。你可以采取额外的方式去增强对服务器的保护。请记住保证服务器安全是你的责任,在维护服务器安全时尽量做出明智的选择,尽管并没有什么容易的方式去完成这件事情,而建立“完善的”安全需要花费大量的时间和测试直到达到想要的结果。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxveda.com/2015/06/03/secure-linux-server/ + +作者:[Marin Todorow][a] +译者:[KayGuoWhu](https://github.com/KayGuoWhu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxveda.com/author/marin_todorov/ +[1]:http://en.wikipedia.org/wiki/Port_%28computer_networking%29#Common_port_numbers + + + + From 24068760b9a53ebeed8d27007a690b3abe71e962 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 13 Jun 2015 14:20:30 +0800 Subject: [PATCH 1159/2517] translating --- ... watch--Repeat Linux or Unix Commands Regular Intervals.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md b/sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md index 65d844a296..9da85b9fb8 100644 --- a/sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md +++ b/sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md @@ -1,3 +1,5 @@ +translating---geekpi + watch - Repeat Linux / Unix Commands Regular Intervals ================================================================================ A server administrator needs to maintain the system and keep it updated and safe. A number of intrusion attempts may happen every day. There are some other activities that maintain their log. These logs are updated regularly. In order to check these updates, the commands are executed repeatedly. For example, for simply reading a file, commands like head, tail, cat etc are used. These commands need to be executed repeatedly. The watch command can be used to repeat a command at regular intervals. @@ -130,4 +132,4 @@ via: http://linoxide.com/linux-command/linux-watch-command/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/arunrz/ \ No newline at end of file +[a]:http://linoxide.com/author/arunrz/ From ced362889f0353fdf5b551770f1354aa03e1a1fc Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 13 Jun 2015 15:08:41 +0800 Subject: [PATCH 1160/2517] translated --- ...inux or Unix Commands Regular Intervals.md | 135 ------------------ ...inux or Unix Commands Regular Intervals.md | 133 +++++++++++++++++ 2 files changed, 133 insertions(+), 135 deletions(-) delete mode 100644 sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md create mode 100644 translated/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md diff --git a/sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md b/sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md deleted file mode 100644 index 9da85b9fb8..0000000000 --- a/sources/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md +++ /dev/null @@ -1,135 +0,0 @@ -translating---geekpi - -watch - Repeat Linux / Unix Commands Regular Intervals -================================================================================ -A server administrator needs to maintain the system and keep it updated and safe. A number of intrusion attempts may happen every day. There are some other activities that maintain their log. These logs are updated regularly. In order to check these updates, the commands are executed repeatedly. For example, for simply reading a file, commands like head, tail, cat etc are used. These commands need to be executed repeatedly. The watch command can be used to repeat a command at regular intervals. - -### Watch Command ### - -Watch is a simple command, with a few options. The basic syntax of watch command is: - - watch [-dhvt] [-n ] [--differences[=cumulative]] [--help] [--interval=] [--no-title] [--version] - -Watch command runs the command specified to it after every 2 seconds by default. This time is counted between the completion of command and beginning of next execution. As a simple example, watch command can be used to watch the log updates, The updates are appended at the end of the file, so tail command can be used with watch to see the updates to the file. This command continues to run until you hit CTRL + C to return to the prompt. - -### Examples ### - -> Keep an eye on errors/notices/warning being generated at run time every couple of seconds. - - watch tail /var/log/messages - -![tail messages](http://blog.linoxide.com/wp-content/uploads/2015/06/1.png) - -> Keep an eye on disk usage after specified time interval. - - watch df -h - -![df -h](http://blog.linoxide.com/wp-content/uploads/2015/06/2.png) - -> It is very important for administrators to keep an eye on high I/O wait causing disk operations especially the Mysql transactions. - - watch mysqladmin processlist - -![processlist](http://blog.linoxide.com/wp-content/uploads/2015/06/3.png) - -> Keep an eye on server load and uptime at runtime. - - watch uptime - -![uptime](http://blog.linoxide.com/wp-content/uploads/2015/06/10.png) - -> Keep an eye on queue size for Exim at the time a cron is run to send notices to subscribers. - - watch exim -bpc - -![exim -bpc](http://blog.linoxide.com/wp-content/uploads/2015/06/9.png) - -### 1) Iteration delay ### - - watch [-n ] - -The default interval between the commands can be changed with -n switch. The following command will run the tail command after 5 seconds: - - watch -n 5 date - -![date 5 seconds](http://blog.linoxide.com/wp-content/uploads/2015/06/4b.png) - -### 2) Successive output comparison ### - -If you use -d option with watch command, it will highlight the differences between the first command output to every next command output cumulatively. - - watch [-d or --differences[=cumulative]] - -#### Example1 #### - -Let’s see the successive time outputs extracted using following watch command and observe how the difference is highlighted. - - watch -n 15 -d date - -First time date is capture when command is executed, the next iteration will be repeated after 15 seconds. - -![Difference A](http://blog.linoxide.com/wp-content/uploads/2015/06/6.png) - -Upon the execution of next iteration, it can be seen that all output is exactly same except the seconds have increased from 14 to 29 which is highlighted. - -![Difference A](http://blog.linoxide.com/wp-content/uploads/2015/06/6b.png) - -#### Example 2 #### - -Let’s experience in difference between two successive outputs of “uptime” command repeated by watch. - - watch -n 20 -d uptime - -![uptime](http://blog.linoxide.com/wp-content/uploads/2015/06/10.png) - -Now the difference between the time is highlighted as well as the three load snapshots as well. - -![10b](http://blog.linoxide.com/wp-content/uploads/2015/06/10b.png) - -### 3) Output without title ### - -If you don’t want to display extra details about the iteration delay and actual command run by watch then –t switch can be used. - - watch [-t or --no-title] - -Let’s see the output of following command as an example. - - watch -t date - -![watch without title](http://blog.linoxide.com/wp-content/uploads/2015/06/7t.png) - -### Watch help ### - -Brief details of the watch command can be found by typing the following command in SSH. - - watch -h [or --help] - -![watch help](http://blog.linoxide.com/wp-content/uploads/2015/06/8h.png) - -### Watch version ### - -Run the following command in SSH terminal to check the version of watch. - - watch -v [--version] - -![version](http://blog.linoxide.com/wp-content/uploads/2015/06/11.png) - -**BUGS** - -Unfortunately, upon terminal resize, the screen will not be correctly repainted until the next scheduled update. All --differences highlight-ing is lost on that update as well. - -### Summary ### - -Watch is a very powerful utility for system administrators because it can be used to monitor, logs, operations, performance and throughput of the system at run time. One can easily format and delay the output of watch utility. Any Linux command / utility or script and be supplied to watch for desired and continuous output. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-command/linux-watch-command/ - -作者:[Aun Raza][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/arunrz/ diff --git a/translated/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md b/translated/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md new file mode 100644 index 0000000000..f5e395c278 --- /dev/null +++ b/translated/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md @@ -0,0 +1,133 @@ +watch - 定期重复Linux / Unix命令 +================================================================================ +服务器管理员需要维护系统并保持更新和安全。每天需要尝试大量的指令。一些其他的活动存储在日志中。这些日志定期地更新。为了检车这些更新,需要重复地执行命令。比如,为了读取一个文件需要使用head、tail、cat等命令。这些命令需要重读地执行。watch命令可以用于定期地执行一个命令。 + +### Watch 命令 ### + +watch是一个简单的命令,只有几个选项。watch命令的基本语法是: + + watch [-dhvt] [-n ] [--differences[=cumulative]] [--help] [--interval=] [--no-title] [--version] + +watch命令默认每隔2秒执行后面的命令。这个时间根据的是命令执行结束到上次执行的间隔来算的。比如,watch命令可以用于监测日志更新,更新时在文件的后面追加新行,因此tail命令可以用来检测文件的更新。这个命令会持续地运行直到你按下 CTRL + C回到提示符。 + +### 例子 ### + +> 每两秒监测 errors/notices/warning 生成的情况。 + + watch tail /var/log/messages + +![tail messages](http://blog.linoxide.com/wp-content/uploads/2015/06/1.png) + +> 用指定的时间监测磁盘的使用率。 + + watch df -h + +![df -h](http://blog.linoxide.com/wp-content/uploads/2015/06/2.png) + +> 对磁盘管理员而言关注高I/O等待导致的磁盘操作尤其是mysql事务是很重要的。 + + watch mysqladmin processlist + +![processlist](http://blog.linoxide.com/wp-content/uploads/2015/06/3.png) + +> 监测服务器负载和运行时间。 + + watch uptime + +![uptime](http://blog.linoxide.com/wp-content/uploads/2015/06/10.png) + +> 检测exim排队给用户发送通知队列的大小。 + + watch exim -bpc + +![exim -bpc](http://blog.linoxide.com/wp-content/uploads/2015/06/9.png) + +### 1) 掩饰循环 ### + + watch [-n ] + +命令默认运行的间隔用-n改变,下面的命令会在5秒后运行后面的命令: + + watch -n 5 date + +![date 5 seconds](http://blog.linoxide.com/wp-content/uploads/2015/06/4b.png) + +### 2) 连续输出比较### + +如果你使用-d选项,它会累次地高亮第一次和下一次命令之间输出的差别。 + + watch [-d or --differences[=cumulative]] + +#### 例子 1 #### + +用下面的命令连续地输出时间病观察高亮出来的不同部分。 + + watch -n 15 -d date + +第一次执行date的输出会被捕捉,15后会会重复运行命令。 + +![Difference A](http://blog.linoxide.com/wp-content/uploads/2015/06/6.png) + +在下一次执行时,可以看到输出除了被高亮的秒数从14到29之外其他的都一样。 + +![Difference A](http://blog.linoxide.com/wp-content/uploads/2015/06/6b.png) + +#### 例子 2 #### + +让我们来体验一下两个连续的“uptime”命令输出的不同。 + + watch -n 20 -d uptime + +![uptime](http://blog.linoxide.com/wp-content/uploads/2015/06/10.png) + +现在列出了时间和3个负载快照之间的不同。 + +![10b](http://blog.linoxide.com/wp-content/uploads/2015/06/10b.png) + +### 3) 不带标题输出 ### + +如果你不希望显示更多关于延迟和实际命令的信息可以使用-t选项。 + + watch [-t or --no-title] + +让我们看下下面例子命令的输出: + + watch -t date + +![watch without title](http://blog.linoxide.com/wp-content/uploads/2015/06/7t.png) + +### Watch 帮助 ### + +可以在ssh中输入下面的命令来得到watch的简要帮助。 + + watch -h [or --help] + +![watch help](http://blog.linoxide.com/wp-content/uploads/2015/06/8h.png) + +### Watch 版本 ### + +在ssh终端中运行下面的命令来检查watch的版本。 + + watch -v [--version] + +![version](http://blog.linoxide.com/wp-content/uploads/2015/06/11.png) + +**问题** + +不幸的是,在终端大小调整时,屏幕不能在下次运行前重画。所有用--difference高亮的内容也会在更新时丢失。 + +### 总结 ### + +watch对系统管理员而言是一个非常强大的工具因为它可以用于监控、日志、运维、性能和系统运行时的吞吐量。人们可以非常简单地格式化和推延watch的输出。任何Linux命令/程序或脚本可以按照所需监测和连续输出。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/linux-watch-command/ + +作者:[Aun Raza][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/arunrz/ From dc5ff01228270adb77451b652b8fe78ce9d44794 Mon Sep 17 00:00:00 2001 From: strugglingyouth <630441839@qq.occom> Date: Sat, 13 Jun 2015 02:18:02 -0700 Subject: [PATCH 1161/2517] translation by strugglingyouth --- ...to Clear RAM Memory Cache Buffer and Swap Space on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md b/sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md index e668e5d9ec..9a001f45b4 100644 --- a/sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md +++ b/sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md @@ -1,3 +1,4 @@ +translation by strugglingyouth How to Clear RAM Memory Cache, Buffer and Swap Space on Linux ================================================================================ Like any other operating system, GNU/Linux has implemented a memory management efficiently and even more than that. But if any process is eating away your memory and you want to clear it, Linux provides a way to flush or clear ram cache. @@ -96,4 +97,4 @@ via: http://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linu [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/echo-command-in-linux/ -[2]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ \ No newline at end of file +[2]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ From ad897f5375c5192774e142efb27232515dda32f1 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sat, 13 Jun 2015 18:14:37 +0800 Subject: [PATCH 1162/2517] translated wi-cuckoo --- .../20150527 3 Open Source Python Shells.md | 108 +++++++++--------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/sources/share/20150527 3 Open Source Python Shells.md b/sources/share/20150527 3 Open Source Python Shells.md index 65102bd1bc..24b81d697a 100644 --- a/sources/share/20150527 3 Open Source Python Shells.md +++ b/sources/share/20150527 3 Open Source Python Shells.md @@ -1,37 +1,36 @@ -translating wi-cuckoo -3 Open Source Python Shells -================================================================================ -Python is a high-level, general-purpose, structured, powerful, open source programming language that is used for a wide variety of programming tasks. It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl, avoiding many of the complexities and overheads of compiled languages. The language was created by Guido van Rossum in 1991, and continues to grow in popularity. +3个开源的Python Shell +========================================================================= +Python是一个高级,通用,结构化且强大的开源编程语言,用于广泛的编程工作。它拥有一个完全的动态类型系统和自动内存管理,与Scheme,Ruby,Perl和Tcl的十分相似,避免编译型语言的许多复杂地方和难以理解。Python于1991年由Guido van Rossum创造,然后逐渐成长,流行。 -Python is a very useful and popular computer language. One of the benefits of using an interpreted language such as Python is exploratory programming with its interactive shell. You can try out code without having to write a script. But there are limitations with the Python shell. Fortunately, there are some excellent alternative Python shells that extend on the basic shell. They each offer an excellent interactive Python experience. +Python是一个非常实用,而且流行的计算机编程语言。使用一个如Python这样的解释型语言的好处之一就是,可以借助其交互的shell考察式地编程。你可以试用代码,而不必写一个脚本。但是Python shell也有一些局限性。基本来说,有许多很nice的Python shell可选择,都是在基础shell上扩展的。他们每一个都提供了一个极好的交互性的Python 体验。 ----------- +-------------- ### bpython ### ![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-bpython.png) -bpython is a fancy interface to the Python interpreter for Linux, BSD, OS X and Windows. +对于Linux,BSD,OS X和Windows来说,bpython是Python解释器一个受欢迎的接口。 -The idea is to provide the user with all the features in-line, much like modern IDEs, but in a simple, lightweight package that can be run in a terminal window. +想法是提供给用户所有的内置功能,很像现在的IDEs(集成开发环境),但是是在一个简单,轻量级的包里,可以在终端窗口里面运行。 -bpython doesn't seek to create anything new or groundbreaking. Instead, it brings together a few neat ideas and focuses on practicality and usefulness. +bpython并不追求创造任何新的或者开创性的东西。相反,她聚集了一些简洁的理念,关注于实用性和操作性。 -Features include: +功能包括: + +- 内置的语法高亮 - 使用Pygments排版你敲出的代码,并合理地上色 +- 根据你的行为,显示自动补全的建议。 +- 为任何Python函数列出期望的参数 - 力求显示一列参数,为你调用的任何函数 +- “Rewind”功能,弹出内存里的最后一行代码并重新评定 +- 发送你已经解除占用的代码到粘贴缓存 +- 保存你已经输入到一个文件里的代码 +- 自动缩进 +- 支持Python 3 -- In-line syntax highlighting - uses Pygments for lexing the code as you type, and colours appropriately -- Readline-like autocomplete with suggestions displayed as you type -- Expected parameter list for any Python function - seeks to display a list of parameters for any function you call -- "Rewind" function to pop the last line of code from memory and re-evaluate -- Send the code you've entered off to a pastebin -- Save the code you've entered to a file -- Auto-indentation -- Python 3 support - -- Website: [www.bpython-interpreter.org][1] -- Developer: Bob Farrell and contributors -- License: MIT License -- Version Number: 0.14.1 +- 网址: [www.bpython-interpreter.org][1] +- 开发者: Bob Farrell and contributors +- 证书: MIT License +- 版本号: 0.14.1 ---------- @@ -39,22 +38,22 @@ Features include: ![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-ipython.png) -IPython is an enhanced interactive Python shell. It provides a rich toolkit to help you make the most out of using Python interactively. +IPython是Python shell的一个交互加强版。她提供了一个丰富的工具集合,帮助你交互式地充分利用Python。 -IPython can be used as a replacement for the standard Python shell, or it can be used as a complete working environment for scientific computing (like Matlab or Mathematica) when paired with the standard Python scientific and numerical tools. It supports dynamic object introspections, numbered input/output prompts, a macro system, session logging, session restoring, complete system shell access, verbose and colored traceback reports, auto-parentheses, auto-quoting, and is embeddable in other Python programs. +IPython可以用来取代标准的Python shell,或者当与标准Python 科学和数值处理工具配合,用做一个科学计算(如Matlab或者Mathematical)的完整工作环境。她支持动态对象内省,有限的输入/输出提示,一个宏观系统,会话登录,会话恢复,完整的系统接入,详尽且彩色的追踪报告,自动圆括号,自动应用和可嵌入其他Python程序。 -Features include: +功能包括: -- Powerful interactive shells (terminal and Qt-based) -- A browser-based notebook with support for code, rich text, mathematical expressions, inline plots and other rich media -- Support for interactive data visualization and use of GUI toolkits -- Flexible, embeddable interpreters to load into your own projects -- Easy to use, high performance tools for parallel computing +- 强大的交互Shell(终端或者基于Qt) +- 一个基于浏览器的记事本,支持代码,多样文本,数学表达式,内置飞行图表和其他丰富媒介。 +- 支持交互式的数据虚拟化和GUI工具箱使用 +- 灵活,嵌入式的解释器可以加载进你自己的项目里 +- 易于使用,高效的并行运算工具 -- Website: [ipython.org][2] -- Developer: The IPython Development Team -- License: BSD -- Version Number: 3.1 +- 网址: [ipython.org][2] +- 开发者: The IPython Development Team +- 证书: BSD +- 版本号: 3.1 ---------- @@ -62,35 +61,34 @@ Features include: ![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-DreamPie.png) -DreamPie is a Python shell which is designed to be reliable and fun. +DreamPie是一个为可靠性和兴趣设计的Python shell。 -DreamPie can use just about any Python interpreter (Jython, IronPython, PyPy). +DreamPie可以用于任何Python解释器(Jython,IronPython,PyPy)。 -Features include: +功能包括: -- New concept for an interactive shell: the window is divided into the history box, which lets you view previous commands and their output, and the code box, where you write your code. This allows you to edit any amount of code, just like in your favorite editor, and execute it when it's ready. You can also copy code from anywhere, edit it and run it instantly -- The Copy code only command will copy the code you want to keep, so you can save it in a file. The code is already formatted nicely with a four-space indentation -- Automatic completion of attributes and file names -- Automatically displays function arguments and documentation -- Keeps your recent results in the result history, for later use -- Can automatically fold long outputs, so you can concentrate on what's important -- Save the history of the session as an HTML file, for future reference. You can then load the history file into DreamPie, and quickly redo previous commands -- Automatically adds parentheses and optionally quotes when you press space after functions and methods. For example, type execfile fn and get execfile("fn") -- Supports interactive plotting with matplotlib -- Xupport for Python 2.5, Python 2.6, Python 3.1, Jython 2.5, IronPython 2.6, and PyPy -- Extremely fast and responsive. +- 一个交互shell的新概念:窗口被分成历史区域和代码区域,历史区域可以让你看到之前的命令及其输出,代码区域是里敲代码的地方。这样,你可以编辑任意数量的代码,就好像在你最喜欢的编辑器里一样,并且适当时候可以执行它。你也可以从其他地方复制你想保存的代码,所以你可以把它存入一个文件。代码可以很好地格式化为四级缩进。 +- 自动补全属性和文件名字 +- 自动显示函数参数和文档 +- 在结果历史中保存你最近的结果,备以后用 +- 可以自动展开很长的输出,所以你可以专注于重要的地方 +- 保存会话的历史记录为一个HTML文件,备以后查询。你可以加载历史文件到DreamPie里,并且快速回退到之前的命令。 +- 自动添加圆括号与可选的引用,当你在函数与方法后按下空格键。例如,键入execfile fn并且获得execfile("fn") +- 支持交互的matplotlib绘图 +- 支持Python 2.5,Python 2.6,Python 3.1,Jython 2.5,IronPython 2.6和PyPy +- 难以置信的快速反应 -- Website: [www.dreampie.org][3] -- Developer: Noam Yorav-Raphael -- License: GNU GPL v3 -- Version Number: 1.2.1 +- 网址: [www.dreampie.org][3] +- 开发者: Noam Yorav-Raphael +- 证书: GNU GPL v3 +- 版本号: 1.2.1 -------------------------------------------------------------------------------- via: http://www.linuxlinks.com/article/20150523032756576/PythonShells.html 作者:Frazer Kline -译者:[译者ID](https://github.com/译者ID) +译者:[wi-cuckoo](https://github.com/wi-cuckoo) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -98,3 +96,5 @@ via: http://www.linuxlinks.com/article/20150523032756576/PythonShells.html [1]:http://www.bpython-interpreter.org/ [2]:http://ipython.org/ [3]:http://www.dreampie.org/ + +-------------------------------------------------------------------------------- From c99c9ef0620d7960f5bc3a735e1878ac5f68448b Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sat, 13 Jun 2015 18:15:40 +0800 Subject: [PATCH 1163/2517] translated wi-cuckoo --- .../share/20150527 3 Open Source Python Shells.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/share/20150527 3 Open Source Python Shells.md (100%) diff --git a/sources/share/20150527 3 Open Source Python Shells.md b/translated/share/20150527 3 Open Source Python Shells.md similarity index 100% rename from sources/share/20150527 3 Open Source Python Shells.md rename to translated/share/20150527 3 Open Source Python Shells.md From 7ef21cc716db43ea6c20e683ef7407f1148c136f Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sat, 13 Jun 2015 20:39:59 +0800 Subject: [PATCH 1164/2517] translating wi-cuckoo --- ... to Configure Apache Containers with Docker on Fedora 22.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md b/sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md index 493e474c7e..66bd27fbc5 100644 --- a/sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md +++ b/sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md @@ -1,3 +1,4 @@ +translating wi-cuckoo How to Configure Apache Containers with Docker on Fedora 22 ================================================================================ In this article we are going to learn about Docker, how to use it to deploy Apache httpd and how can you share it on Docker Hub. First we are going to learn how to pull and use images hosted on Docker Hub, and then install Apache on an image of Fedora 22 interactively, after that we are going to learn how to use a Dockerfile to make an image in a faster and more elegant way, finally we are going to publish the image we've created in Docker Hub, so anyone will be able download and use it later. @@ -279,4 +280,4 @@ via: http://linoxide.com/linux-how-to/configure-apache-containers-docker-fedora- [a]:http://linoxide.com/author/carlosal/ [1]:https://github.com/gaiada/run-apache-foreground [2]:http://localhost/ -[3]:https://hub.docker.com/account/signup/ \ No newline at end of file +[3]:https://hub.docker.com/account/signup/ From 8209aff788f050ba3405e39cc9385e0ae3be91d5 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 13 Jun 2015 23:37:05 +0800 Subject: [PATCH 1165/2517] PUB:20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7 @GOLinux --- ...B) and 'PowerAdmin' in RHEL or CentOS 7.md | 210 ++++++++++-------- 1 file changed, 122 insertions(+), 88 deletions(-) rename {translated/tech => published}/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md (68%) diff --git a/translated/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md b/published/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md similarity index 68% rename from translated/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md rename to published/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md index 0f7bc3d62f..4c3c824682 100644 --- a/translated/tech/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md +++ b/published/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md @@ -1,44 +1,48 @@ -RHEL/CentOS 7中安装并配置‘PowerDNS’(与MariaDB搭配)和‘PowerAdmin’ +RHEL/CentOS 7中安装并配置 PowerDNS 和 PowerAdmin ================================================================================ -PowerDNS是一个运行在许多Linux/Unix衍生版上的DNS服务器,它可以使用不同的后端进行配置,包括BIND类型的区域文件、相关的数据库,或者负载均衡/失效转移算法。它也可以被配置成一台DNS递归器,作为服务器上的一个独立进程运行。 +PowerDNS是一个运行在许多Linux/Unix衍生版上的DNS服务器,它可以使用不同的后端进行配置,包括BIND类型的区域文件、关系型数据库,或者负载均衡/失效转移算法。它也可以被配置成一台DNS递归器,作为服务器上的一个独立进程运行。 PowerDNS授权服务器的最新版本是3.4.4,但是当前EPEL仓库中可以获得的版本是3.4.3。我推荐安装EPEL仓库中提供的那一个,因为该版本已经在CentOS和Fedora中测试过。那样,你也可以在今后很容易地更新PowerDNS。 -本文倾向于向你演示如何安装并配置以MariaDB作为后端的PowerDNS和 +本文用于向你演示如何安装并配置以MariaDB作为后端的PowerDNS,以及它的界面友好的 Web 管理工具 PowerAdmin。 + 出于本文的写作目的,我将使用以下服务器: 主机名: centos7.localhost IP地址: 192.168.0.102 -### 步骤 1: 安装带有MariaDB后端的PowerDNS ### +### 第一部分: 安装带有MariaDB后端的PowerDNS ### -#### 1. 首先,你需要为你的系统启用EPEL仓库,只需使用: #### +1、 首先,你需要为你的系统启用EPEL仓库,只需使用: # yum install epel-release.noarch ![Enable Epel Repository](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Epel-Repository.png) -启用Epel仓库 -#### 2. 下一步是安装MariaDB服务器。运行以下命令即可达成: #### +*启用Epel仓库* + +2、 下一步是安装MariaDB服务器。运行以下命令即可达成: # yum -y install mariadb-server mariadb ![Install MariaDB Server](http://www.tecmint.com/wp-content/uploads/2015/04/Install-MariaDB-Server.png) -安装MariaDB服务器 -#### 3. 接下来,我们将配置并启用MySQL,并设置开机启动: #### +*安装MariaDB服务器* + +3、 接下来,我们将配置并启用MariaDB,并设置开机启动: # systemctl enable mariadb.service # systemctl start mariadb.service ![Enable Start MariaDB System Boot](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Start-MariaDB-System-Boot.png) -启用MariaDB开机启动 -#### 4. 由于MySQL服务正在运行,我们将为MariaDB设置密码进行安全加固,运行以下命令: #### +*启用MariaDB开机启动* + +4、 现在MariaDB服务运行起来了,我们将为MariaDB设置密码进行安全加固,运行以下命令: # mysql_secure_installation -#### 按照指示做 #### +**按照指示做** /bin/mysql_secure_installation: line 379: find_mysql_client: command not found @@ -102,33 +106,36 @@ PowerDNS授权服务器的最新版本是3.4.4,但是当前EPEL仓库中可以 Thanks for using MariaDB! -#### 5. MariaDB配置成功后,我们可以继续去安装PowerDNS。运行以下命令即可轻易完成: #### +5、 MariaDB配置成功后,我们可以继续去安装PowerDNS。运行以下命令即可轻易完成: # yum -y install pdns pdns-backend-mysql ![Install PowerDNS with MariaDB Backend](http://www.tecmint.com/wp-content/uploads/2015/04/Install-PowerDNS-with-MariaDB-Backend.png) -安装带有MariaDB后端的PowerDNS -#### 6. PowerDNS的配置文件位于`/etc/pdns/pdns`,在编辑之前,我们将为PowerDNS服务配置一个MySQL数据库。首先,我们将连接到MySQL服务器并创建一个名为powerdns的数据库: #### +*安装带有MariaDB后端的PowerDNS* + +6、 PowerDNS的配置文件位于`/etc/pdns/pdns`,在编辑之前,我们将为PowerDNS服务配置一个MariaDB数据库。首先,我们将连接到MariaDB服务器并创建一个名为powerdns的数据库: # mysql -u root -p MariaDB [(none)]> CREATE DATABASE powerdns; ![Create PowerDNS Database](http://www.tecmint.com/wp-content/uploads/2015/04/Create-PowerDNS-Database.png) -创建PowerDNS数据库 -#### 7. 接下来,我们将创建一个名为powerdns的数据库用户: #### +*创建PowerDNS数据库* + +7、 接下来,我们将创建一个名为powerdns的数据库用户: MariaDB [(none)]> GRANT ALL ON powerdns.* TO 'powerdns'@'localhost' IDENTIFIED BY ‘tecmint123’; MariaDB [(none)]> GRANT ALL ON powerdns.* TO 'powerdns'@'centos7.localdomain' IDENTIFIED BY 'tecmint123'; MariaDB [(none)]> FLUSH PRIVILEGES; ![Create PowerDNS User](http://www.tecmint.com/wp-content/uploads/2015/04/Create-PowerDNS-User.png) -创建PowerDNS用户 + +*创建PowerDNS用户* **注意**: 请将“tecmint123”替换为你想要设置的实际密码。 -#### 8. 我们继续创建PowerDNS要使用的数据库表。像堆积木一样执行以下这些: #### +8、 我们继续创建PowerDNS要使用的数据库表。像堆积木一样执行以下这些: MariaDB [(none)]> USE powerdns; MariaDB [(none)]> CREATE TABLE domains ( @@ -143,7 +150,8 @@ PowerDNS授权服务器的最新版本是3.4.4,但是当前EPEL仓库中可以 ); ![Create Table Domains for PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Table-Domains-for-PowerDNS.png) -创建用于PowerDNS的表域 + +*创建用于PowerDNS的表domains* MariaDB [(none)]> CREATE UNIQUE INDEX name_index ON domains(name); MariaDB [(none)]> CREATE TABLE records ( @@ -158,15 +166,17 @@ PowerDNS授权服务器的最新版本是3.4.4,但是当前EPEL仓库中可以 primary key(id) ); -![Create Index Domains for PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Index-Domains-for-PowerDNS.png) -创建用于PowerDNS的索引域 +![Create Table Records for PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Index-Domains-for-PowerDNS.png) + +*创建用于PowerDNS的表 records* MariaDB [(none)]> CREATE INDEX rec_name_index ON records(name); MariaDB [(none)]> CREATE INDEX nametype_index ON records(name,type); MariaDB [(none)]> CREATE INDEX domain_id ON records(domain_id); -![Create Index Records](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Records.png) -创建索引记录 +![Create Index of Table](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Records.png) + +*创建表索引* MariaDB [(none)]> CREATE TABLE supermasters ( ip VARCHAR(25) NOT NULL, @@ -175,13 +185,14 @@ PowerDNS授权服务器的最新版本是3.4.4,但是当前EPEL仓库中可以 ); ![Create Table Supermaster](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Table-Supermaster.png) -创建表的超主 -你现在可以输入以下命令退出MySQL控制台: +*创建表supermasters* + +你现在可以输入以下命令退出MariaDB控制台: MariaDB [(none)]> quit; -#### 9. 最后,我们可以继续以MySQL作为后台的方式配置PowerDNS。请打开PowerDNS的配置文件: #### +9、 最后,我们可以继续配置PowerDNS了,以MariaDB作为后台。请打开PowerDNS的配置文件: # vim /etc/pdns/pdns.conf @@ -203,35 +214,39 @@ PowerDNS授权服务器的最新版本是3.4.4,但是当前EPEL仓库中可以 修改“user-pass”为你先前设置的实际密码,配置如下: ![Configure PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-PowerDNS.png) -配置PowerDNS + +*配置PowerDNS* 保存修改并退出。 -#### 10. 现在,我们将启动并添加PowerDNS到系统开机启动列表: #### +10、 现在,我们将启动并添加PowerDNS到系统开机启动列表: # systemctl enable pdns.service # systemctl start pdns.service ![Enable and Start PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-and-Start-PowerDNS.png) -启用并启动PowerDNS + +*启用并启动PowerDNS* 到这一步,你的PowerDNS服务器已经起来并运行了。要获取更多关于PowerDNS的信息,你可以参考手册[http://downloads.powerdns.com/documentation/html/index.html][1] -### 步骤 2: 安装PowerAdmin来管理PowerDNS ### +### 第二部分: 安装PowerAdmin来管理PowerDNS ### -#### 11. 现在,我们将安装PowerAdmin——一个友好的网页接口PowerDNS服务器管理器。由于它是用PHP写的,我们将需要安装PHP和一台网络服务器(Apache): #### +11、 现在,我们将安装PowerAdmin——一个界面友好的PowerDNS服务器的 Web 管理器。由于它是用PHP写的,我们将需要安装PHP和一台网络服务器(Apache): # yum install httpd php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mhash gettext ![Install Apache PHP](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Apache-PHP.jpeg) -安装Apache PHP + +*安装Apache 和 PHP* PowerAdmin也需要两个PEAR包: # yum -y install php-pear-DB php-pear-MDB2-Driver-mysql ![Install Pear](http://www.tecmint.com/wp-content/uploads/2015/04/Install-Pear.jpeg) -安装Pear + +*安装Pear* 你也可以参考一下文章了解CentOS 7中安装LAMP堆栈的完整指南: @@ -243,58 +258,66 @@ PowerAdmin也需要两个PEAR包: # systemctl start httpd.service ![Enable Start Apache System Boot](http://www.tecmint.com/wp-content/uploads/2015/04/Enable-Start-Apache-System-Boot.png) -启用Apache开机启动 -#### 12. 由于已经满足PowerAdmin的所有系统要求,我们可以继续下载软件包。因为Apache默认的网页目录位于/var/www/html/,我们将下载软件包到这里。 #### +*启用Apache开机启动* + +12、 由于已经满足PowerAdmin的所有系统要求,我们可以继续下载软件包。因为Apache默认的网页目录位于/var/www/html/,我们将下载软件包到这里。 # cd /var/www/html/ # wget http://downloads.sourceforge.net/project/poweradmin/poweradmin-2.1.7.tgz # tar xfv poweradmin-2.1.7.tgz ![Download PowerAdmin](http://www.tecmint.com/wp-content/uploads/2015/04/Download-PowerAdmin.jpeg) -下载PowerAdmin -#### 13. 现在,我们可以启动PowerAdmin的网页安装器了,只需打开: #### +*下载PowerAdmin* + +13、 现在,我们可以启动PowerAdmin的网页安装器了,只需打开: http://192.168.0.102/poweradmin-2.1.7/install/ 这会进入安装过程的第一步: ![Select Installation Language](http://www.tecmint.com/wp-content/uploads/2015/04/Select-Installation-Language.png) -选择安装语言 + +*选择安装语言* 上面的页面会要求你为PowerAdmin选择语言,请选择你想要使用的那一个,然后点击“进入步骤 2”按钮。 -#### 14. 安装器需要PowerDNS数据库: #### +14、 安装器需要PowerDNS数据库: ![PowerDNS Database](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Database.png) -PowerDNS数据库 -#### 15. 因为我们已经创建了一个,所以我们可以继续进入下一步。你会被要求提供先前配置的数据库详情,你也需要为Poweradmin设置管理员密码: #### +*PowerDNS数据库* + +15、 因为我们已经创建了一个数据库,所以我们可以继续进入下一步。你会被要求提供先前配置的数据库详情,你也需要为Poweradmin设置管理员密码: ![Enter PowerDNS Database Settings](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS.png) -输入PowerDNS数据库配置 -#### 16. 输入这些信息后,进入步骤 4。你将创建为Poweradmin创建一个受限用户。这里你需要输入的字段是: #### +*输入PowerDNS数据库配置* -- 用户名 - PowerAdmin用户名。 -- 密码 – 上述用户的密码。 -- 注册人 - 当创建SOA记录而你没有制定注册人时,该值会被使用。 -- 辅助域名服务器 – 该值在创建新的DNS区域时会被用于作为主域名服务器。 +16、 输入这些信息后,进入步骤 4。你将创建为Poweradmin创建一个受限用户。这里你需要输入的字段是: + +- 用户名(Username) - PowerAdmin用户名。 +- 密码(Password) – 上述用户的密码。 +- 主机管理员(Hostmaster) - 当创建SOA记录而你没有指定主机管理员时,该值会被用作默认值。 +- 主域名服务器 - 该值在创建新的DNS区域时会被用于作为主域名服务器。 +- 辅域名服务器 – 该值在创建新的DNS区域时会被用于作为辅域名服务器。 ![PowerDNS Configuration Settings](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Configuration-Settings.png) -PowerDNS配置设置 -#### 17. 在下一步中,Poweradmin会要求你在数据库表中创建新的受限数据库用户,它会提供你需要在MySQL控制台输入的代码: #### +*PowerDNS配置设置* + +17、 在下一步中,Poweradmin会要求你在数据库表中创建一个新的受限数据库用户,它会提供你需要在MariaDB控制台输入的代码: ![Create New Database User](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Database-User.png) -创建新的数据库用户 -#### 18. 现在打开终端并运行: #### +*创建新的数据库用户* + +18、 现在打开终端并运行: # mysql -u root -p -提供你的密码并执行由Poweradmin提供的代码: +提供你的密码并执行由PowerAdmin提供的代码: MariaDB [(none)]> GRANT SELECT, INSERT, UPDATE, DELETE ON powerdns.* @@ -302,27 +325,30 @@ PowerDNS配置设置 IDENTIFIED BY '123qweasd'; ![Grant Mysql Permissions to User](http://www.tecmint.com/wp-content/uploads/2015/04/Grant-Mysql-Permissions-to-User.png) -为用户授予Mysql权限 -#### 19. 现在,回到浏览器中并继续下一步。安装器将尝试创建配置文件到/var/www/html/poweradmin-2.1.7/inc。 #### +*为用户授予Mysql权限* + +19、 现在,回到浏览器中并继续下一步。安装器将尝试创建配置文件到/var/www/html/poweradmin-2.1.7/inc。 文件名是config.inc.php。为防止该脚本没有写权限,你可以手动复制这些内容到上述文件中: ![Configuration Settings of PowerDNS](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Configuration.png) -配置PowerDNS设置 -#### 20. 现在,进入最后页面,该页面会告知你安装已经完成以及如何访问安装好的Poweradmin: #### +*配置PowerDNS设置* + +20、 现在,进入最后页面,该页面会告知你安装已经完成以及如何访问安装好的PowerAdmin: ![PowerDNS Installation Completed](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Installation-Completed.png) -PowerDNS安装完成 -你可以通过运行以下命令来启用其他动态DNS提供商的URL: +*PowerDNS安装完成* + +你可以通过运行以下命令来启用用于其他动态DNS提供商的URL: # cp install/htaccess.dist .htaccess 出于该目的,你将需要在Apache的配置中启用mod_rewrite。 -#### 21. 现在,需要移除从Poweradmin的根目录中移除“install”文件夹,这一点很重要。使用以下命令: #### +21、 现在,需要移除从PowerAdmin的根目录中移除“install”文件夹,这一点很重要。使用以下命令: # rm -fr /var/www/html/poweradmin/install/ @@ -331,78 +357,86 @@ PowerDNS安装完成 http://192.168.0.102/poweradmin-2.1.7/ ![PowerDNS Login](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Login.png) -PowerDNS登录 -在登录后,你应该会看到Poweradmin的主页: +*PowerDNS登录* + +在登录后,你应该会看到PowerAdmin的主页: ![PowerDNS Dashboard](http://www.tecmint.com/wp-content/uploads/2015/04/PowerDNS-Dashboard.png) -PowerDNS仪表盘 + +*PowerDNS仪表盘* 到这里,安装已经完成了,你也可以开始管理你的DNS区域了。 -### 步骤 3: PowerDNS中添加、编辑和删除DNS区域 ### +### 第三部分: PowerDNS中添加、编辑和删除DNS区域 ### -#### 22. 要添加新的主区域,只需点击“添加主区域”: #### +22、 要添加新的主区域,只需点击“添加主区域”: ![Add Master Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Add-Master-Zone.png) -添加主区域 + +*添加主区域* 在下一页中,你需要填写一些东西: -- 域 – 你要添加区域的域。 -- 所有者 – 设置DNS区域的所有者。 -- 模板 – DNS模板 – 留空。 -- DNSSEC – Donany名称系统安全扩展(可选——检查你是否需要)。 +- 域(Domain) – 你要添加区域的域。 +- 所有者(Owner) – 设置DNS区域的所有者。 +- 模板(Template)– DNS模板 – 留空。 +- DNSSEC – 域名系统安全扩展(可选——看看你是否需要)。 点击“添加区域”按钮来添加DNS区域。 ![Master DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Master-DNS-Zone.png) -主DNS区域 -现在,你可以点击“首页”链接回到Poweradmin的首页。要查看所有现存的DNS区域,只需转到“列出区域”: +*主DNS区域* + +现在,你可以点击“首页”链接回到PowerAdmin的首页。要查看所有现存的DNS区域,只需转到“列出区域(List Zones)”: ![Check List of Zones](http://www.tecmint.com/wp-content/uploads/2015/04/Check-List-Zones.png) -检查区域列表 + +*查看区域列表* 你现在应该看到一个可用DNS区域列表: ![Check List of DNS Zones](http://www.tecmint.com/wp-content/uploads/2015/04/DNS-Zones.png) -检查DNS区域列表 -#### 23. 要编辑现存DNS区域或者添加新的记录,点击编辑图标: #### +*检查DNS区域列表* + +23、 要编辑现存DNS区域或者添加新的记录,点击编辑图标: ![Edit DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Edit-DNS-Zone.png) -编辑DNS区域 + +*编辑DNS区域* 在接下来的页面,你会看到你选择的DNS区域的条目: ![Domain DNS Zone Entries](http://www.tecmint.com/wp-content/uploads/2015/04/Domain-DNS.png) -主DNS区域条目 -#### 24. 在此处添加新的DNS区域,你需要设置以下信息: #### +*域名的DNS区域条目* -- 名称 – 条目名称。只需添加域/子域的第一部分,Poweradmin会添加剩下的。 -- 类型 – 选择记录类型。 -- 优先级 – 记录优先级。 +24、 在此处添加新的DNS条目,你需要设置以下信息: + +- 名称(Name) – 条目名称。只需添加域/子域的第一部分,PowerAdmin会添加剩下的。 +- 类型(Type) – 选择记录类型。 +- 优先级(Priority) – 记录优先级。 - TTL – 存活时间,以秒计算。 出于本文目的,我将为子域new.example.com添加一个A记录用于解析IP地址192.168.0.102,设置存活时间为14400秒: ![Add New DNS Record](http://www.tecmint.com/wp-content/uploads/2015/04/Add-New-DNS-Record.png) -添加新DNS记录 + +*添加新DNS记录* 最后,点击“添加记录”按钮。 -#### 25. 如果你想要删除DNS区域,你可以回到“列出区域”页面,然后点击你想要删除的DNS区域旁边“垃圾桶”图标: #### +25、 如果你想要删除DNS区域,你可以回到“列出区域”页面,然后点击你想要删除的DNS区域旁边“垃圾桶”图标: ![Delete DNS Zone](http://www.tecmint.com/wp-content/uploads/2015/04/Delete-DNS-Zone.png) -删除DNS区域 + +*删除DNS区域* Poweradmin将问你是否确定想要删除DNS区域。只需点击“是”来完成删除。 -如要获取更多关于怎样创建、编辑和删除区域的说明,你可以参与Poweradmin的文档: - -[https://github.com/poweradmin/poweradmin/wiki/Documentation][3] +如要获取更多关于怎样创建、编辑和删除区域的说明,你可以参与Poweradmin的文档:[https://github.com/poweradmin/poweradmin/wiki/Documentation][3] 我希望你已经发现本文很有趣,也很有用。一如既往,如果你有问题或要发表评论,请别犹豫,在下面评论区提交你的评论吧。 @@ -412,7 +446,7 @@ via: http://www.tecmint.com/install-powerdns-poweradmin-mariadb-in-centos-rhel/ 作者:[Marin Todorov][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6189e0a0ac55f11c4455a3716bb3648b8789f960 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 13 Jun 2015 23:41:59 +0800 Subject: [PATCH 1166/2517] PUB:20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian @ictlyh --- ... section with no Package--header' error on Raspbian.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md (68%) diff --git a/translated/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md b/published/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md similarity index 68% rename from translated/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md rename to published/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md index 54e0f393d1..1d51e06b18 100644 --- a/translated/tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md +++ b/published/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md @@ -1,6 +1,6 @@ -Linux 有问必答--如何修复 Raspbian 上的 “Encountered a section with no Package: header” 错误 +Linux 有问必答:如何修复 Rasbian 上的 “Encountered a section with no Package: header” 错误 ================================================================================ -> **问题**: 我在 Raspberry Pi 上安装新版的 Rasbian。但当我使用 sudo apt-get update 命令更新 APT 软件包索引的时候,它抛出下面的错误: +> **问题**: 我在树莓派上安装新版的 Rasbian。但当我使用 sudo apt-get update 命令更新 APT 软件包索引的时候,它抛出下面的错误: E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/dpkg/status @@ -10,7 +10,7 @@ Linux 有问必答--如何修复 Raspbian 上的 “Encountered a section with n ![](https://farm8.staticflickr.com/7704/17445484636_05ba81722f_c.jpg) -错误说 "Problem with MergeList /var/lib/dpkg/status" 表示由于某些原因状态文件损坏了,因此无法解释。这个状态文件包括了已经安装的 deb 软件包的信息,因此需要小心备份。 +这个错误说 "Problem with MergeList /var/lib/dpkg/status" 表示由于某些原因状态文件损坏了,因此无法解析。这个状态文件包括了已经安装的 deb 软件包的信息,因此需要小心备份。 在这种情况下,由于这是新安装的 Raspbian,你可以安全地删除状态文件,然后用下面的命令重新生成。 @@ -24,7 +24,7 @@ via: http://ask.xmodulo.com/encountered-section-with-no-package-header-error.htm 作者:[Dan Nanni][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 14d06fe7588205c57faefe2dc48658d74c2aea1c Mon Sep 17 00:00:00 2001 From: strugglingyouth <630441839@qq.occom> Date: Sat, 13 Jun 2015 08:42:10 -0700 Subject: [PATCH 1167/2517] translated --- ...ry Cache Buffer and Swap Space on Linux.md | 100 ------------------ ...ry_Cache_Buffer_and_Swap_Space_on_Linux.md | 88 +++++++++++++++ 2 files changed, 88 insertions(+), 100 deletions(-) delete mode 100644 sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md create mode 100644 translated/tech/20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md diff --git a/sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md b/sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md deleted file mode 100644 index 9a001f45b4..0000000000 --- a/sources/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md +++ /dev/null @@ -1,100 +0,0 @@ -translation by strugglingyouth -How to Clear RAM Memory Cache, Buffer and Swap Space on Linux -================================================================================ -Like any other operating system, GNU/Linux has implemented a memory management efficiently and even more than that. But if any process is eating away your memory and you want to clear it, Linux provides a way to flush or clear ram cache. - -![Clear RAM Cache and Swap in Linux](http://www.tecmint.com/wp-content/uploads/2015/05/Clear-RAM-Cache-in-Linux.jpg) - -### How to Clear Cache in Linux? ### - -Every Linux System has three options to clear cache without interrupting any processes or services. - -1. Clear PageCache only. - - # sync; echo 1 > /proc/sys/vm/drop_caches - -2. Clear dentries and inodes. - - # sync; echo 2 > /proc/sys/vm/drop_caches - -3. Clear PageCache, dentries and inodes. - - # sync; echo 3 > /proc/sys/vm/drop_caches - -Explanation of above command. - -sync will flush the file system buffer. Command Separated by `“;”` run sequentially. The shell wait for each command to terminate before executing the next command in the sequence. As mentioned in kernel documentation, writing to drop_cache will clean cache without killing any application/service, [command echo][1] is doing the job of writing to file. - -If you have to clear the disk cache, the first command is safest in enterprise and production as `“...echo 1 > ….”` will clear the PageCache only. It is not recommended to use third option above `“...echo 3 >”` in production until you know what you are doing, as it will clear PageCache, dentries and inodes. - -**Is it a good idea to free Buffer and Cache in Linux that might be used by Linux Kernel?** - -When you are applying various settings and want to check, if it is actually implemented specially on I/O-extensive benchmark, then you may need to clear buffer cache. You can drop cache as explained above without rebooting the System i.e., no downtime required. - -Linux is designed in such a way that it looks into disk cache before looking onto the disk. If it finds the resource in the cache, then the request doesn’t reach the disk. If we clean the cache, the disk cache will be less useful as the OS will look for the resource on the disk. - -Moreover it will also slow the system for a few seconds while the cache is cleaned and every resource required by OS is loaded again in the disk-cache. - -Now we will be creating a shell script to auto clear RAM cache daily at 2PM via a cron scheduler task. Create a shell script clearcache.sh and add the following lines. - - #!/bin/bash - # Note, we are using "echo 3", but it is not recommended in production instead use "echo 1" - echo "echo 3 > /proc/sys/vm/drop_caches" - -Set execute permission on the clearcache.sh file. - - # chmod 755 clearcache.sh - -Now you may call the script whenever you required to clear ram cache. - -Now set a cron to clear RAM cache everyday at 2PM. Open crontab for editing. - - # crontab -e - -Append the below line, save and exit to run it at 2PM daily. - - 0 3 * * * /path/to/clearcache.sh - -For more details on how to cron a job you may like to check our article on [11 Cron Scheduling Jobs][2]. - -**Is it good idea to auto clear RAM cache on production server?** - -No! it is not. Think of a situation when you have scheduled the script to clear ram cache everyday at 2PM. Everyday at 2PM the script is executed and it flushes your RAM cache. One day for whatsoever reason, may be more than expected users are online on your website and seeking resource from your server. - -At the same time scheduled script run and clears everything in cache. Now all the user are fetching data from disk. It will result in server crash and corrupt the database. So clear ram-cache only when required,and known your foot steps, else you are a Cargo Cult System Administrator. - -#### How to Clear Swap Space in Linux? #### - -If you want to clear Swap space, you may like to run the below command. - - # swapoff -a && swapon -a - -Also you may add above command to a cron script above, after understanding all the associated risk. - -Now we will be combining both above commands into one single command to make a proper script to clear RAM Cache and Swap Space. - - # echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared' - - OR - - su -c 'echo 3 >/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared' - -After testing both above command, we will run command “free -h” before and after running the script and will check cache. - -![Clear RAM Cache and Swap Space](http://www.tecmint.com/wp-content/uploads/2015/05/Clear-RAM-Cache.gif) - -That’s all for now, if you liked the article, don’t forget to provide us with your valuable feedback in the comments to let us know, what you think is it a good idea to clear ram cache and buffer in production and Enterprise? - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/echo-command-in-linux/ -[2]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ diff --git a/translated/tech/20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md b/translated/tech/20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md new file mode 100644 index 0000000000..932bc11cd2 --- /dev/null +++ b/translated/tech/20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md @@ -0,0 +1,88 @@ +像任何其他的操作系统一样,GNU / Linux已经有效地实施了内存管理甚至更多。但是,如果有任何进程正在蚕食你的内存,你要清除它, +Linux提供了一个方法来刷新或清除RAM缓存。 + +在Linux中如何清除缓存? + +每一个Linux系统有三个选项来清除缓存而不中断任何进程或服务。 + +1,仅清除缓存页 +

+sync; echo 1 > /proc/sys/vm/drop_caches
+
+2,清除目录项和inodes +

+sync; echo 2 > /proc/sys/vm/drop_caches
+
+3,清除,缓存页,目录项和inodes +

+sync; echo 3 > /proc/sys/vm/drop_caches
+
+上述命令的说明: + +sync将刷新文件系统缓存,命令通过“;”分隔,顺序执行,shell等待终止在序列中的每一个命令执行之前。正如内核文档中提到的,写到drop_cache将清空缓存而不杀死任何应用程序/服务,echo命令做写入文件的工作。 + +如果你必须清除磁盘高速缓存,第一个命令是最安全在企业和生产环境中,“...echo 1> ...”只会清除页缓存。 +不建议使用上面第三个选项在生产环境中“...echo 3 >” ,除非你明确自己在做什么,因为它会清除缓存页,目录项和inodes。 + +在Linux上释放Buffer和Cache要用到内核是否是个好主意? + +当你请求许多设定想要检查时,如果它实际上是专门实施对I/O 广泛的基准测试,那么你可能需要清除缓存。你可以如上所示删除缓存,无需重新启动系统即无需停机。 + +Linux被设计成它在寻找磁盘之前到磁盘缓存寻找的方式。如果它发现该资源在缓存中,则该请求不到达磁盘。如果我们清理缓存,磁盘缓存将没有用处,系统会到磁盘上寻找资源。 + +此外,当清除缓存后它也将减慢系统运行速度,系统会重新加载每一个被请求的资源再次到磁盘缓存中。 + +现在,我们将通过一个cron任务调度器创建一个shell脚本在每天下午2点自动清除RAM缓存。 +创建一个shell脚本clearcache.sh并在其中添加以下行: +

+#!/bin/bash
+# Note, we are using "echo 3", but it is not recommended in production instead use "echo 1"
+echo "echo 3 > /proc/sys/vm/drop_caches"
+
+给clearcache.sh文件设置执行权限 +

+# chmod 755 clearcache.sh
+
+现在,当你需要清除RAM缓存时只需要调用脚本。 + +现在设置一个定时任务来清除RAM缓存每天在下午2点,打开crontab进行编辑。 +

+# crontab -e
+
+添加以下行,保存并退出。 +

+0 3 * * * /path/to/clearcache.sh
+
+有关如何创建一个定时任务,更多细节你可以查看我们的文章11 Cron Scheduling Jobs。 + +在生产环境的服务器上自动清除RAM是否是一个好主意? + +不!它不是。想想一个情况,当你已经预定脚本来清除RAM缓存每天在下午2点。每天下午2点该脚本会执行并刷新你的RAM缓存。在一天中的任何时候,您网站用户的在线量可能会超过预期的,并从你的服务器请求资源。同时调度器运行着脚本,并在高速缓存中清除一切。当所有的用户都从磁盘读取数据时,这将导致服务器崩溃并损坏数据库。 +因此,清除缓存仅在必要时并且在你的预料之中,否则你就是个Cargo Cult System Administrator。 + +如何清除Linux的交换空间? + +如果你想清除掉的空间,你可以运行下面的命令: +

+# swapoff -a && swapon -a
+
+此外,了解有关风险后,您可能会将上面的命令添加到cron中。 + +现在,我们将上面两种命令结合成一个命令写出正确的脚本来同时清除RAM缓存和交换空间。 +

+# echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
+
+或 +

+su -c 'echo 3 >/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
+
+在测试上面的命令之前,我们先运行“free -m” 然后执行脚本检查缓存。 + +Clear RAM Cache and Swap Space + +就是现在,如果你喜欢这篇文章,不要忘记向我们提供您宝贵的意见, +让我们知道,您认为在企业和生产环境中清除RAM缓存和缓冲区是否是一个好主意? + +via:http://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/ + +  \ No newline at end of file From 2969fa15e5575eccd4365b536378a7e596e78d0c Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 14 Jun 2015 00:46:45 +0800 Subject: [PATCH 1168/2517] PUB:20150528 Things To Do After Installing Fedora 22 @GOLinux --- ...Things To Do After Installing Fedora 22.md | 237 ++++++++++++++++++ ...Things To Do After Installing Fedora 22.md | 113 --------- 2 files changed, 237 insertions(+), 113 deletions(-) create mode 100644 published/20150528 Things To Do After Installing Fedora 22.md delete mode 100644 translated/tech/20150528 Things To Do After Installing Fedora 22.md diff --git a/published/20150528 Things To Do After Installing Fedora 22.md b/published/20150528 Things To Do After Installing Fedora 22.md new file mode 100644 index 0000000000..1a4ff0ff8a --- /dev/null +++ b/published/20150528 Things To Do After Installing Fedora 22.md @@ -0,0 +1,237 @@ +安装 Fedora 22 后要做的事情 +================================================================================ + +Red Hat操作系统的社区开发版的最新成员Fedora 22,已经于2015年5月26日发布了。对这个经典的Fedora发行版的发布充斥着各种猜测和预期,而最终Fedora 22推出了许多重大变化。 + +就初始化进程而言,Systemd还是个新生儿,但它已经准备好替换古老的sysvinit这个一直是Linux生态系统一部分的模块。另外一个用户会碰到的重大改变存在于基本仓库的python版本中,这里提供了两种不同口味的python版本,2.x和3.x分支,各个都有其不同的偏好和优点。所以,那些偏好2.x口味的用户可能想要安装他们喜爱的python版本。自从Fedora 18开始 dandified YUM安装器(即 DNF)就准备替换过时陈旧的YUM安装器了,Fedora最后决定,现在就用DNF来替换YUM。 + +### 1) 配置RPMFusion仓库 ### + +正如我已经提到过的,Fedora的意识形态很是严谨,它不会自带任何非自由组件。官方仓库不会提供一些包含有非自由组件的基本软件,比如像多媒体编码。因此,安装一些第三方仓库很有必要,这些仓库会为我们提供一些基本的软件。幸运的是,RPMFusion仓库前来拯救我们了。 + + $ sudo dnf install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-22.noarch.rpm + +### 2) 安装VLC媒体播放器 ### + +Fedora 22默认自带了媒体播放器,即 gnome视频播放器(以前叫做totem)。如果你觉得还好,那么我们可以跳过这一步继续往前走。但是,如果你像我一样,偏好使用最广泛的VLC,那么就去从RPMFusion仓库安装吧。安装方法如下: + + sudo dnf install vlc -y + +### 3) 安装多媒体编码 ### + +刚刚我们说过,一些多媒体编码和插件不会随Fedora一起发送。现在,有谁想仅仅是因为专有编码而错过他们最爱的节目和电影?试试这个吧: + + $ sudo dnf install gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer-plugins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1 + +### 4) 更新系统 ### + +Fedora是一个前锐的发行版,因此它会不断发布更新用以修复系统中出现的错误和漏洞。因而,保持系统更新到最新,是个不错的做法。 + + $ sudo dnf update -y + +### 5) 卸载你不需要的软件 ### + +Fedora预装了一些大多数用户都有用的软件包,但是对于更高级的用户,你可能知道到你并不需要它。要移除你不需要的包相当容易,只需使用以下命令——我选择卸载rhythmbox,因为我知道我不会用到它: + + $ sudo dnf remove rhythmbox + +### 6) 安装Adobe Flash ### + +我们都希望Adobe Flash不要再存在了,因为它并不被认为是最安全的,或者存在资源问题,但是暂时先让它待着吧。Fedora 22安装Adobe Flash的唯一途径是从Adobe安装官方RPM,就像下面这样。 + +你可以从[这里][1]下载RPM。下载完后,你可以直接右击并像下面这样打开: + +![Install Adobe Flash](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-9.50.42-PM.png) + +右击并选择“用软件安装打开” + +然后,只需在弹出窗口中点击安装: + +![Install Adobe](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-9.51.07-PM.png) + +*点击“安装”来完成安装Adobe定制RPM的过程* + +该过程完成后,“安装”按钮会变成“移除”,而此时安装也完成了。如果在此过程中你的浏览器开着,会提示你先把它关掉或在安装完成后重启以使修改生效。 + +### 7) 用Gnome Boxes加速虚拟机 ### + +你刚刚安装了Fedora,你也很是喜欢,但是出于某些私人原因,你也许仍然需要Windows,或者你只是想玩玩另外一个Linux发行版。不管哪种情况,你都可以使用Gnome Boxes来简单地创建一个虚拟机或使用一个live发行版,Fedora 22提供了该软件。遵循以下步骤,使用你所选的ISO来开始吧!谁知道呢,也许你可以检验一下某个[Fedora Spin][2]。 + +首先,打开Gnome Boxes,然后在顶部左边选择“新建”: + +![Add a new virtual machine (box)](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.24.46-PM.png) + +点击“新建”来开始添加一个新虚拟机的进程吧。 + +接下来,点击打开文件并选择一个ISO: + +![Choose ISO](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.28.44-PM.png) + +*在点击了“选择文件或ISO”后,选择你的ISO。这里,我已经安装了一个Debian ISO。* + +最后,自定义VM设置或使用默认配置,然后点击“创建”。VM默认会启动,可用的VM会在Gnome Boxes以小缩略图的方式显示。 + +![Create VM](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.31.11-PM.png) + +*自定义你自己的设置,或者也可以保持默认。完成后,点击“创建”,VM就一切就绪了。* + +### 8) 添加社交媒体和其它在线帐号 ### + +Gnome自带有不错的内建功能用于容纳帐号相关的东西,像Facebook,Google以及其它在线帐号。你可以通过Gnome设置应用访问在线帐号设置,可以在桌面上右键点击或在应用程序中找到该应用。然后,只需点击在线帐号,并添加你所选择的帐号。如果你要添加一个帐号,比如像Google,你可以用它来作为默认帐号,用来完成诸如发送邮件、日历提醒、相片和文档交互,以及诸如此类的更多事情。 + +### 9) 安装KDE或另一个桌面环境 ### + +我们中的某些人不喜欢Gnome,那也没问题。在终端中运行以下命令来安装KDE所需的一切来替换它。这些指令也可以用以安装xfce、lxde或其它桌面环境。 + + $ sudo dnf install @kde-desktop + +安装完成后,登出。当你点击你的用户名时,注意那个表示设置的小齿轮。点击它,然后选择“Plasma”。当你再次登录时,一个全新的KDE桌面就会欢迎你。 + +![Plasma on Fedora 22](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-11.32.27-PM.png) + +*刚刚安装到Fedora 22上的Plasma环境* + +####在 Fedora 22中安装 Cinnamon桌面:#### + +打开SSH终端,输入或粘帖如下命令并回车: + + sudo dnf install @cinnamon-desktop + +####在 Fedora 22中安装 MATE桌面:#### + +打开SSH终端,输入或粘帖如下命令并回车: + + sudo dnf install @mate-desktop + +####在 Fedora 22中安装 XFCE桌面:#### + +打开SSH终端,输入或粘帖如下命令并回车: + + sudo dnf install @xfce-desktop + +####在 Fedora 22中安装 LXDE桌面:#### + +打开SSH终端,输入或粘帖如下命令并回车: + + sudo dnf install @lxde-desktop + +### 10) 定制桌面并优化设置 ### + +默认的 Gnome 带有一张黑色背景和一个新的锁屏,幸运的是,很容易通过下面的方式来改变: + +![change desktop](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-28-at-7.17.29-AM-1024x767.png) + +*右键点击桌面,然后点修改背景* + +![Desktop or lock screen](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-28-at-7.17.52-AM-1024x769.png) + +*你会看到这个窗口,这里你选择新的桌面背景或锁屏图片* + +进一步,如果你点击“设置”,你会看到一个菜单展示你所以可以修改的设置。举个例子,在笔记本电脑上,你可以修改电源设置来控制合上笔记本电脑时的动作。 + + +### 11) 安装 Fedy 4.0### + +Fedy 可以帮助用户和系统管理员来监控系统的运作,并让他们可以控制系统如其所预期的工作。这里有一行脚本可以安装最新版本的 Fedy。打开终端,输入或粘帖如下行并按下回车。 + + su -c "curl https://satya164.github.io/fedy/fedy-installer -o fedy-installer && chmod +x fedy-installer && ./fedy-installer" + +### 12) 安装 Java### + +使用如下命令可以很容易的安装 Java。 + + sudo dnf install java -y + +它会根据你的系统架构自动安装32位或64位的 Java 发行版。 + +### 13) 在 Fedora 22 上安装浏览器 ### + +Fedora 22的默认浏览器是 Firefox,不过其它的浏览器也各有优缺点。最终用户选择浏览器会有种种原因。这里我们提供一些在 Fedora 22上安装其它浏览器的方法。 + +#### 安装 Google Chrome#### + +使用你惯用的编辑器,在 yum 库目录中打开或创建 google-chrome.repo 文件。 + + sudo gedit /etc/yum.repos.d/google-chrome.repo + +加入以下内容并保存。 + + [google-chrome] + name=google-chrome + baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch + enabled=1 + gpgcheck=1 + gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub + +现在 yum 就配置好可以找到稳定版本的 Chrome 了,使用如下命令安装它。 + + sudo dnf install google-chrome-stable + +#### 安装 Tor 浏览器 #### + +在 Fedora 22 中安装 Tor 有一点棘手,在 /etc/yum.repos.d 目录中打开或创建 torproject.repo 文件。 + + sudo gedit /etc/yum.repos.d/torproject.repo + +插入以下内容。 + + [tor] + name=Tor repo + enabled=1 + baseurl=https://deb.torproject.org/torproject.org/rpm/fc/22/$basearch/ + gpgcheck=1 + gpgkey=https://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc + + [tor-source] + name=Tor source repo + enabled=1 + autorefresh=0 + baseurl=https://deb.torproject.org/torproject.org/rpm/fc/22/SRPMS + gpgcheck=1 + gpgkey=https://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc + +也许会问到 GPG 键的指纹,它应该如下。 + + 3B9E EEB9 7B1E 827B CF0A 0D96 8AF5 653C 5AC0 01F1 + +不幸的是,在 EPEL 和 Fedora 仓库中有一个相同名字的软件包,你需要明确排除这个来避免安装/删除/修改它。所以,在/etc/yum.repos.d/epel.repo 中加入 `Exclude=tor` 一行。 + +最后,使用如下命令来安装 Tor。 + + sudo dnf install tor + +安装完成,启动服务。 + + sudo service tor start + +#### 安装 Vivaldi#### + +根据你的系统架构下载32位或64位的 Vivaldi 浏览器。 + + sudo wget https://vivaldi.com/download/Vivaldi_TP3.1.0.162.9-1.i386.rpm + sudo wget https://vivaldi.com/download/Vivaldi_TP3.1.0.162.9-1.x86_64.rpm + +使用下列命令安装下载的 RPM。 + + sudo rpm -ivh Vivaldi_TP3.1.0.162.9-1.i386.rpm + sudo rpm -ivh Vivaldi_TP3.1.0.162.9-1.x86_64.rpm + + +### 尾声 ### + +就是这样了,一切就绪。使用新系统吧,试试新东西。如果你找不到与你喜好的东西,linux赋予你自由修改它的权利。Fedora自带有最新的Gnome Shell作为其桌面环境,如果你觉得太臃肿而不喜欢,那么试试KDE或一些轻量级的DE,像Cinnamon、xfce之类。愿你的Fedora之旅十分开心并且没有困扰!! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/things-do-after-installing-fedora-22/ + +作者:[Jonathan DeMasi][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/jonathande/ +[1]:https://get.adobe.com/flashplayer/ +[2]:http://spins.fedoraproject.org/ +[3]:https://www.google.com/intl/en/chrome/browser/desktop/index.html diff --git a/translated/tech/20150528 Things To Do After Installing Fedora 22.md b/translated/tech/20150528 Things To Do After Installing Fedora 22.md deleted file mode 100644 index 172c7612ae..0000000000 --- a/translated/tech/20150528 Things To Do After Installing Fedora 22.md +++ /dev/null @@ -1,113 +0,0 @@ -安装Fedora 22后要做的事 -================================================================================ -Fedora 22,Red Hat操作系统的社区开发版的最新成员,已经于2015年5月26日发布了。这个令人神圣的Fedora发行版充斥着各种炒作和预期,Fedora 22推出了大量的重大变化。 - -就初始化进程而言,Systemd还是个新生儿,但它已经准备好替换脆弱的sysvinit这个一直是Linux生态系统一部分的模块。另外一个用户会碰到的重大改变存在于基本仓库的python版本中,这里提供了两种不同口味的python版本2.x和3.x分线,各个都有其不同的癖好和优点。所以,那些偏好2.x口味的用户可能想要安装他们喜爱的python版本。自从Fedora 18开始被打扮得更加时髦的Yum安装器也被设置来替换过时陈旧的YUM安装器后。Fedora也已最后决定,现在是时候用DNF来替换YUM了。 -### 1) 安装VLC媒体播放器 ### - -Fedora 22默认自带了媒体播放器viz gnome视频播放器(前身是totem)。如果你对此不感冒,那么我们可以跳过这一步继续往前走。但是,如果你像我一样,偏好使用最广泛的VLC,那么就去从RPMFusion仓库安装吧。安装方法如下: - - sudo dnf install vlc -y - -### 2) 配置RPMFusion仓库 ### - -正如我已经提到过的,Fedora的意识形态很是严谨,它不会自带任何非自由组件。官方仓库不会提供一些包含有非自由组件的基本软件,比如像多媒体编码。因此,安装一些第三方仓库很有必要,这些仓库会为我们提供一些基本的软件。幸运的是,RPMFusion仓库前来拯救我们了。 - - $ sudo dnf install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-22.noarch.rpm - -### 3) 安装多媒体编码 ### - -刚刚我们说过,一些多媒体编码和插件不会随Fedora一起发送。现在,有谁想仅仅是因为专有编码而错过他们最爱的节目和电影?试试这个吧: - - $ sudo dnf install gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer-plugins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1 - -### 4) 更新系统 ### - -Fedora是一个尖端的发行版,因此它会持续发布更新用以修复系统中出现的错误和漏洞。因而,保持系统更新到最新,是个不错的做法。 - - $ sudo dnf update -y - -### 5) 卸载你不需要的软件 ### - -Fedora预装了一些大多数用户可以利用的包,但是对于更高级的用户,你可能意识到你并不需要它。要移除你不需要的包相当容易,只需使用以下命令——我选择卸载rhythmbox,因为我知道我不会用到它: - - $ sudo dnf remove rhythmbox - -### 6) 安装Adobe Flash ### - -我们都希望Adobe Flash不要再存在了,因为它并不被认为是最安全的,或者资源利用最好的,但是暂时先让它待着吧。Fedora 22安装Adobe Flash的唯一途径是从Adobe安装官方RPM,就像下面这样。 - -你可以从[这里][1]下载RPM。下载完后,你可以直接右击并像下面这样打开: - -![Install Adobe Flash](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-9.50.42-PM.png) - -右击并选择“用软件安装打开” - -然后,只需在弹出窗口中点击安装: - -![Install Adobe](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-9.51.07-PM.png) - -点击“安装”来完成从Adobe安装自定义RPM的过程 - -该过程完成后,“安装”按钮会变成“移除”,而此时安装也完成了。如果在此过程中你的浏览器开着,会提示你先把它关掉或在安装完成后重启以使修改生效。 - -### 7) 用Gnome Boxes加速虚拟机 ### - -你刚刚安装了Fedora,你也很是喜欢,但是出于某些私人原因,你也许仍然需要Windows,或者你只是想玩玩另外一个Linux发行版。不管哪种情况,你都可以使用Gnome Boxes来简单地创建一个虚拟机或使用一个live发行版,Fedora 22提供了该软件。遵循以下步骤,使用你所选的ISO来开始吧!谁知道呢,也许你可以检验一下某个[Fedora Spin][2]。 - -首先,打开Gnome Boxes,然后在顶部左边选择“新建”: - -![Add a new virtual machine (box)](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.24.46-PM.png) - -点击“新建”来开始添加一个新虚拟机的进程吧。 - -接下来,点击打开文件并选择一个ISO: - -![Choose ISO](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.28.44-PM.png) - -在选择选择了选择文件或ISO后,选择你的ISO。这里,我已经安装了一个Debian ISO。 - -最后,自定义VM设置或使用默认,然后点击“创建”。VM会以默认方式启动,可用的VM会在Gnome Boxes以小缩略图的方式显示。 - -![Create VM](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-10.31.11-PM.png) - -自定义设置为你所选择的,或者也可以保持默认。完成后,点击“创建”,VM就一切就绪了。 - -### 8) 安装Google Chrome ### - -Firefox被包含在Fedora 22中,但是就跟大多数软件一样,每个人都有他们自己的选择。如果你所喜爱的浏览器恰好是Google Chrome,你可以使用和上面安装Adobe Flash Player类似的指令。然而,很明显,你得使用来自Google的任何你所下载的版本的RPM。最新的版本通常可以在[这里][3]找到。 - -### 9) 添加社交媒体和其它在线帐号 ### - -Gnome自带有不错的内建功能用于容纳帐号相关的东西,像Facebook,Google以及其它在线帐号。你可以通过主Gnome设置应用访问在线帐号设置。然后,只需点击在线帐号,并添加你所选择的帐号。如果你要添加一个帐号,比如像Google,你可以用它来作为默认帐号,用来完成诸如发送邮件、日历提醒、相片和文档交互,以及诸如此类的更多事情。 - -### 10) 安装KDE或另一个桌面环境 ### - -我们中的某些人不喜欢Gnome,那也没问题。在终端中运行以下命令来安装KDE所需的一切来替换它。这些指令也可以用以安装xfce、lxde或其它桌面环境。 - - $ sudo dnf install @kde-desktop - -安装完成后,登出。当你点击你的用户名时,注意那个表示设置的小齿轮。点击它,然后选择“Plasma”。当你再次登录时,一个全新的KDE桌面就会欢迎你。 - -![Plasma on Fedora 22](http://blog.linoxide.com/wp-content/uploads/2015/05/Screen-Shot-2015-05-27-at-11.32.27-PM.png) - -刚刚安装到Fedora 22上的Plasma环境 - -### 尾声 ### - -就是这样了,一切就绪。使用新系统吧,试试新东西。如果你找不到与你喜好相关的东西,linux赋予你自由修改它的权利。Fedora自带有最新的Gnome Shell作为其桌面环境,如果你觉得太臃肿而不喜欢,那么试试KDE或一些轻量级的DE,像Cinnamon、xfce之类。愿你的Fedora之旅十分开心并且没有困扰。!! - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/things-do-after-installing-fedora-22/ - -作者:[Jonathan DeMasi][a] -译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/jonathande/ -[1]:https://get.adobe.com/flashplayer/ -[2]:http://spins.fedoraproject.org/ -[3]:https://www.google.com/intl/en/chrome/browser/desktop/index.html From e48fb59106cb00f1efcdfe1f5c381bb92f7c4056 Mon Sep 17 00:00:00 2001 From: strugglingyouth <630441839@qq.occom> Date: Sat, 13 Jun 2015 18:16:20 -0700 Subject: [PATCH 1169/2517] translated --- ...ry_Cache_Buffer_and_Swap_Space_on_Linux.md | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/translated/tech/20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md b/translated/tech/20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md index 932bc11cd2..bfe689602d 100644 --- a/translated/tech/20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md +++ b/translated/tech/20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md @@ -6,17 +6,11 @@ Linux提供了一个方法来刷新或清除RAM缓存。 每一个Linux系统有三个选项来清除缓存而不中断任何进程或服务。 1,仅清除缓存页 -

 sync; echo 1 > /proc/sys/vm/drop_caches
-
2,清除目录项和inodes -

 sync; echo 2 > /proc/sys/vm/drop_caches
-
3,清除,缓存页,目录项和inodes -

 sync; echo 3 > /proc/sys/vm/drop_caches
-
上述命令的说明: sync将刷新文件系统缓存,命令通过“;”分隔,顺序执行,shell等待终止在序列中的每一个命令执行之前。正如内核文档中提到的,写到drop_cache将清空缓存而不杀死任何应用程序/服务,echo命令做写入文件的工作。 @@ -34,25 +28,17 @@ Linux被设计成它在寻找磁盘之前到磁盘缓存寻找的方式。如果 现在,我们将通过一个cron任务调度器创建一个shell脚本在每天下午2点自动清除RAM缓存。 创建一个shell脚本clearcache.sh并在其中添加以下行: -

 #!/bin/bash
 # Note, we are using "echo 3", but it is not recommended in production instead use "echo 1"
 echo "echo 3 > /proc/sys/vm/drop_caches"
-
给clearcache.sh文件设置执行权限 -

 # chmod 755 clearcache.sh
-
现在,当你需要清除RAM缓存时只需要调用脚本。 现在设置一个定时任务来清除RAM缓存每天在下午2点,打开crontab进行编辑。 -

 # crontab -e
-
添加以下行,保存并退出。 -

 0 3 * * * /path/to/clearcache.sh
-
有关如何创建一个定时任务,更多细节你可以查看我们的文章11 Cron Scheduling Jobs。 在生产环境的服务器上自动清除RAM是否是一个好主意? @@ -63,19 +49,13 @@ echo "echo 3 > /proc/sys/vm/drop_caches" 如何清除Linux的交换空间? 如果你想清除掉的空间,你可以运行下面的命令: -

 # swapoff -a && swapon -a
-
此外,了解有关风险后,您可能会将上面的命令添加到cron中。 现在,我们将上面两种命令结合成一个命令写出正确的脚本来同时清除RAM缓存和交换空间。 -

 # echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
-
或 -

 su -c 'echo 3 >/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
-
在测试上面的命令之前,我们先运行“free -m” 然后执行脚本检查缓存。 Clear RAM Cache and Swap Space @@ -85,4 +65,4 @@ su -c 'echo 3 >/proc/sys/vm/drop_caches' && swapoff -a && swa via:http://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/ -  \ No newline at end of file +  From e49a63beb7aed13726aa8f46951cf67668845c86 Mon Sep 17 00:00:00 2001 From: strugglingyouth <630441839@qq.occom> Date: Sat, 13 Jun 2015 19:35:13 -0700 Subject: [PATCH 1170/2517] translated --- ...y Cache Buffer and Swap Space on Linux.md} | 36 ++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) rename translated/tech/{20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md => 20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md} (72%) diff --git a/translated/tech/20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md b/translated/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md similarity index 72% rename from translated/tech/20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md rename to translated/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md index bfe689602d..3c272cd4de 100644 --- a/translated/tech/20150610_How_to_Clear_RAM_Memory_Cache_Buffer_and_Swap_Space_on_Linux.md +++ b/translated/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md @@ -1,21 +1,32 @@ -像任何其他的操作系统一样,GNU / Linux已经有效地实施了内存管理甚至更多。但是,如果有任何进程正在蚕食你的内存,你要清除它, + + #在Linux上如何清除RAM内存高速缓存,缓存和交换空间# + +像任何其他的操作系统一样,GNU / Linux已经有效地实施了内存管理甚至更多。但是,如果有任何进程正在蚕食你的内存,你要清除它, Linux提供了一个方法来刷新或清除RAM缓存。 +linux + 在Linux中如何清除缓存? 每一个Linux系统有三个选项来清除缓存而不中断任何进程或服务。 1,仅清除缓存页 +

 sync; echo 1 > /proc/sys/vm/drop_caches
+
2,清除目录项和inodes +

 sync; echo 2 > /proc/sys/vm/drop_caches
+
3,清除,缓存页,目录项和inodes +

 sync; echo 3 > /proc/sys/vm/drop_caches
+
上述命令的说明: sync将刷新文件系统缓存,命令通过“;”分隔,顺序执行,shell等待终止在序列中的每一个命令执行之前。正如内核文档中提到的,写到drop_cache将清空缓存而不杀死任何应用程序/服务,echo命令做写入文件的工作。 -如果你必须清除磁盘高速缓存,第一个命令是最安全在企业和生产环境中,“...echo 1> ...”只会清除页缓存。 +如果你必须清除磁盘高速缓存,第一个命令在企业和生产环境中是最安全,“...echo 1> ...”只会清除页缓存。 不建议使用上面第三个选项在生产环境中“...echo 3 >” ,除非你明确自己在做什么,因为它会清除缓存页,目录项和inodes。 在Linux上释放Buffer和Cache要用到内核是否是个好主意? @@ -28,17 +39,25 @@ Linux被设计成它在寻找磁盘之前到磁盘缓存寻找的方式。如果 现在,我们将通过一个cron任务调度器创建一个shell脚本在每天下午2点自动清除RAM缓存。 创建一个shell脚本clearcache.sh并在其中添加以下行: +

 #!/bin/bash
 # Note, we are using "echo 3", but it is not recommended in production instead use "echo 1"
 echo "echo 3 > /proc/sys/vm/drop_caches"
+
给clearcache.sh文件设置执行权限 +

 # chmod 755 clearcache.sh
+
现在,当你需要清除RAM缓存时只需要调用脚本。 现在设置一个定时任务来清除RAM缓存每天在下午2点,打开crontab进行编辑。 +

 # crontab -e
+
添加以下行,保存并退出。 +

 0 3 * * * /path/to/clearcache.sh
+
有关如何创建一个定时任务,更多细节你可以查看我们的文章11 Cron Scheduling Jobs。 在生产环境的服务器上自动清除RAM是否是一个好主意? @@ -49,20 +68,27 @@ echo "echo 3 > /proc/sys/vm/drop_caches" 如何清除Linux的交换空间? 如果你想清除掉的空间,你可以运行下面的命令: +

 # swapoff -a && swapon -a
+
此外,了解有关风险后,您可能会将上面的命令添加到cron中。 现在,我们将上面两种命令结合成一个命令写出正确的脚本来同时清除RAM缓存和交换空间。 +

 # echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
+
或 +

 su -c 'echo 3 >/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
+
在测试上面的命令之前,我们先运行“free -m” 然后执行脚本检查缓存。 -Clear RAM Cache and Swap Space + +![](https://camo.githubusercontent.com/659439c8dbef449fa82ba64ff5a02dc0e9324017/687474703a2f2f7777772e7465636d696e742e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031352f30352f436c6561722d52414d2d43616368652e676966) 就是现在,如果你喜欢这篇文章,不要忘记向我们提供您宝贵的意见, 让我们知道,您认为在企业和生产环境中清除RAM缓存和缓冲区是否是一个好主意? -via:http://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/ -  + +  \ No newline at end of file From dca8c5f495bfe6d316d615eeda987219dd626164 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Sun, 14 Jun 2015 16:03:30 +0800 Subject: [PATCH 1171/2517] finish translation --- ...Experience on Linux 'iptables' Firewall.md | 212 ------------------ ...Experience on Linux 'iptables' Firewall.md | 205 +++++++++++++++++ 2 files changed, 205 insertions(+), 212 deletions(-) delete mode 100644 sources/tech/20150610 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md create mode 100644 translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md diff --git a/sources/tech/20150610 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md b/sources/tech/20150610 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md deleted file mode 100644 index 455b994975..0000000000 --- a/sources/tech/20150610 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md +++ /dev/null @@ -1,212 +0,0 @@ -Nishita Agarwal Shares Her Interview Experience on Linux ‘iptables’ Firewall -================================================================================ -Nishita Agarwal, a frequent Tecmint Visitor shared her experience (Question and Answer) with us regarding the job interview she had just given in a privately owned hosting company in Pune, India. She was asked a lot of questions on a variety of topics however she is an expert in iptables and she wanted to share those questions and their answer (she gave) related to iptables to others who may be going to give interview in near future. - -![Linux Firewall Iptables Interview Questions](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-iptables-Interview-Questions.jpg) - -All the questions and their Answer are rewritten based upon the memory of Nishita Agarwal. - -> “Hello Friends! My name is **Nishita Agarwal**. I have Pursued Bachelor Degree in Technology. My area of Specialization is UNIX and Variants of UNIX (BSD, Linux) fascinates me since the time I heard it. I have 1+ years of experience in storage. I was looking for a job change which ended with a hosting company in Pune, India.” - -Here is the collection of what I was asked during the Interview. I’ve documented only those questions and their answer that were related to iptables based upon my memory. Hope this will help you in cracking your Interview. - -**1. Have you heard of iptables and firewall in Linux? Any idea of what they are and for what it is used?** - -> **Answer** : I’ve been using iptables for quite long time and I am aware of both iptables and firewall. Iptables is an application program mostly written in C Programming Language and is released under GNU General Public License. Written for System administration point of view, the latest stable release if iptables 1.4.21.iptables may be considered as firewall for UNIX like operating system which can be called as iptables/netfilter, more accurately. The Administrator interact with iptables via console/GUI front end tools to add and define firewall rules into predefined tables. Netfilter is a module built inside of kernel that do the job of filtering. -> -> Firewalld is the latest implementation of filtering rules in RHEL/CentOS 7 (may be implemented in other distributions which I may not be aware of). It has replaced iptables interface and connects to netfilter. - -**2. Have you used some kind of GUI based front end tool for iptables or the Linux Command Line?** - -> **Answer** : Though I have used both the GUI based front end tools for iptables like Shorewall in conjugation of [Webmin][1] in GUI and Direct access to iptables via console.And I must admit that direct access to iptables via Linux console gives a user immense power in the form of higher degree of flexibility and better understanding of what is going on in the background, if not anything other. GUI is for novice administrator while console is for experienced. - -**3. What are the basic differences between between iptables and firewalld?** - -> **Answer** : iptables and firewalld serves the same purpose (Packet Filtering) but with different approach. iptables flush the entire rules set each time a change is made unlike firewalld. Typically the location of iptables configuration lies at ‘/etc/sysconfig/iptables‘ whereas firewalld configuration lies at ‘/etc/firewalld/‘, which is a set of XML files.Configuring a XML based firewalld is easier as compared to configuration of iptables, however same task can be achieved using both the packet filtering application ie., iptables and firewalld. Firewalld runs iptables under its hood along with it’s own command line interface and configuration file that is XML based and said above. - -**4. Would you replace iptables with firewalld on all your servers, if given a chance?** - -> **Answer** : I am familiar with iptables and it’s working and if there is nothing that requires dynamic aspect of firewalld, there seems no reason to migrate all my configuration from iptables to firewalld.In most of the cases, so far I have never seen iptables creating an issue. Also the general rule of Information technology says “why fix if it is not broken”. However this is my personal thought and I would never mind implementing firewalld if the Organization is going to replace iptables with firewalld. - -**5. You seems confident with iptables and the plus point is even we are using iptables on our server.** - -What are the tables used in iptables? Give a brief description of the tables used in iptables and the chains they support. - -> **Answer** : Thanks for the recognition. Moving to question part, There are four tables used in iptables, namely they are: -> -> - Nat Table -> - Mangle Table -> - Filter Table -> - Raw Table -> -> Nat Table : Nat table is primarily used for Network Address Translation. Masqueraded packets get their IP address altered as per the rules in the table. Packets in the stream traverse Nat Table only once. ie., If a packet from a jet of Packets is masqueraded they rest of the packages in the stream will not traverse through this table again. It is recommended not to filter in this table. Chains Supported by NAT Table are PREROUTING Chain, POSTROUTING Chain and OUTPUT Chain. -> -> Mangle Table : As the name suggests, this table serves for mangling the packets. It is used for Special package alteration. It can be used to alter the content of different packets and their headers. Mangle table can’t be used for Masquerading. Supported chains are PREROUTING Chain, OUTPUT Chain, Forward Chain, INPUT Chain, POSTROUTING Chain. -> -> Filter Table : Filter Table is the default table used in iptables. It is used for filtering Packets. If no rules are defined, Filter Table is taken as default table and filtering is done on the basis of this table. Supported Chains are INPUT Chain, OUTPUT Chain, FORWARD Chain. -> -> Raw Table : Raw table comes into action when we want to configure packages that were exempted earlier. It supports PREROUTING Chain and OUTPUT Chain. - -**6. What are the target values (that can be specified in target) in iptables and what they do, be brief!** - -> **Answer** : Following are the target values that we can specify in target in iptables: -> -> - ACCEPT : Accept Packets -> - QUEUE : Paas Package to user space (place where application and drivers reside) -> - DROP : Drop Packets -> - RETURN : Return Control to calling chain and stop executing next set of rules for the current Packets in the chain. - - -**7. Lets move to the technical aspects of iptables, by technical I means practical.** - -How will you Check iptables rpm that is required to install iptables in CentOS?. - -> **Answer** : iptables rpm are included in standard CentOS installation and we do not need to install it separately. We can check the rpm as: -> -> # rpm -qa iptables -> -> iptables-1.4.21-13.el7.x86_64 -> -> If you need to install it, you may do yum to get it. -> -> # yum install iptables-services - -**8. How to Check and ensure if iptables service is running?** - -> **Answer** : To check the status of iptables, you may run the following command on the terminal. -> -> # service status iptables [On CentOS 6/5] -> # systemctl status iptables [On CentOS 7] -> -> If it is not running, the below command may be executed. -> -> ---------------- On CentOS 6/5 ---------------- -> # chkconfig --level 35 iptables on -> # service iptables start -> -> ---------------- On CentOS 7 ---------------- -> # systemctl enable iptables -> # systemctl start iptables -> -> We may also check if the iptables module is loaded or not, as: -> -> # lsmod | grep ip_tables - -**9. How will you review the current Rules defined in iptables?** - -> **Answer** : The current rules in iptables can be review as simple as: -> -> # iptables -L -> -> Sample Output -> -> Chain INPUT (policy ACCEPT) -> target prot opt source destination -> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED -> ACCEPT icmp -- anywhere anywhere -> ACCEPT all -- anywhere anywhere -> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> -> Chain FORWARD (policy ACCEPT) -> target prot opt source destination -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> -> Chain OUTPUT (policy ACCEPT) -> target prot opt source destination - -**10. How will you flush all iptables rules or a particular chain?** - -> **Answer** : To flush a particular iptables chain, you may use following commands. -> -> -> # iptables --flush OUTPUT -> -> To Flush all the iptables rules. -> -> # iptables --flush - -**11. Add a rule in iptables to accept packets from a trusted IP Address (say 192.168.0.7)** - -> **Answer** : The above scenario can be achieved simply by running the below command. -> -> # iptables -A INPUT -s 192.168.0.7 -j ACCEPT -> -> We may include standard slash or subnet mask in the source as: -> -> # iptables -A INPUT -s 192.168.0.7/24 -j ACCEPT -> # iptables -A INPUT -s 192.168.0.7/255.255.255.0 -j ACCEPT - -**12. How to add rules to ACCEPT, REJECT, DENY and DROP ssh service in iptables.** - -> **Answer** : Hoping ssh is running on port 22, which is also the default port for ssh, we can add rule to iptables as: -> -> To ACCEPT tcp packets for ssh service (port 22). -> -> # iptables -A INPUT -s -p tcp --dport 22 -j ACCEPT -> -> To REJECT tcp packets for ssh service (port 22). -> -> # iptables -A INPUT -s -p tcp --dport 22 -j REJECT -> -> To DENY tcp packets for ssh service (port 22). -> -> -> # iptables -A INPUT -s -p tcp --dport 22 -j DENY -> -> To DROP tcp packets for ssh service (port 22). -> -> -> # iptables -A INPUT -s -p tcp --dport 22 -j DROP - -**13. Let me give you a scenario. Say there is a machine the local ip address of which is 192.168.0.6. You need to block connections on port 21, 22, 23, and 80 to your machine. What will you do?** - -> **Answer** : Well all I need to use is the ‘multiport‘ option with iptables followed by port numbers to be blocked and the above scenario can be achieved in a single go as. -> -> # iptables -A INPUT -s 192.168.0.6 -p tcp -m multiport --dport 21,22,23,80 -j DROP -> -> The written rules can be checked using the below command. -> -> # iptables -L -> -> Chain INPUT (policy ACCEPT) -> target prot opt source destination -> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED -> ACCEPT icmp -- anywhere anywhere -> ACCEPT all -- anywhere anywhere -> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> DROP tcp -- 192.168.0.6 anywhere multiport dports ssh,telnet,http,webcache -> -> Chain FORWARD (policy ACCEPT) -> target prot opt source destination -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> -> Chain OUTPUT (policy ACCEPT) -> target prot opt source destination - -**Interviewer** : That’s all I wanted to ask. You are a valuable employee we won’t like to miss. I will recommend your name to the HR. If you have any question you may ask me. - -As a candidate I don’t wanted to kill the conversation hence keep asking about the projects I would be handling if selected and what are the other openings in the company. Not to mention HR round was not difficult to crack and I got the opportunity. - -Also I would like to thank Avishek and Ravi (whom I am a friend since long) for taking the time to document my interview. - -Friends! If you had given any such interview and you would like to share your interview experience to millions of Tecmint readers around the globe? then send your questions and answers to admin@tecmint.com or you may submit your interview experience using following form. - -- [Share Your Interview Experience][2] - -Thank you! Keep Connected. Also let me know if I could have answered a question more correctly than what I did. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-firewall-iptables-interview-questions-and-answers/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/install-webmin-web-based-system-administration-tool-for-rhel-centos-fedora/ -[2]:https://docs.google.com/a/tecmint.com/forms/d/1jfu1Kg8_qToqvyi6pOT1HQb0dAFvRE-Yc_aOkj0RoSg/viewform \ No newline at end of file diff --git a/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md b/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md new file mode 100644 index 0000000000..270f823b59 --- /dev/null +++ b/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md @@ -0,0 +1,205 @@ +Nishita Agarwal分享它关于Linux防火墙'iptables'的面试经验 +================================================================================ +Nishita Agarwal是Tecmint的用户,她将分享关于她刚刚经历的一家公司(私人公司Pune,印度)的面试经验。在面试中她被问及许多不同的问题,但她是iptables方面的专家,因此她想分享这些关于iptables的问题和相应的答案给那些以后可能会进行相关面试的人。 + +![Linux防火墙Iptables面试问题](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-iptables-Interview-Questions.jpg) + +所有的问题和相应的答案都基于Nishita Agarwal的记忆并经过了重写。 + +> “嗨,朋友!我叫**Nishita Agarwal**。我已经取得了理学学士学位,我的专业集中在UNIX和它的变种(BSD,Linux)。它们一直深深的吸引着我。我在存储方面有1年多的经验。我正在寻求职业上的变化,并将供职于印度的Pune公司。” + +下面是我在面试中被问到的问题的集合。我已经把我记忆中有关iptables的问题和它们的答案记录了下来。希望这会对您未来的面试有所帮助。 + +### 1. 你听说过Linux下面的iptables和Firewalld么?知不知道它们是什么,是用来干什么的? ### + +> **答案** : iptables和Firewalld我都知道,并且我已经使用iptables好一段时间了。iptables主要由C语言写成,并且以GNU GPL许可证发布。它是从系统管理员的角度写的,最新的稳定版是iptables 1.4.21。iptables通常被认为是类UNIX系统中的防火墙,更准确的说,可以称为iptables/netfilter。管理员通过终端/GUI工具与iptables打交道,来添加和定义防火墙规则到预定义的表中。Netfilter是内核中的一个模块,它执行过滤的任务。 +> +> Firewalld是RHEL/CentOS 7(也许还有其他发行版,但我不太清楚)中最新的过滤规则的实现。它已经取代了iptables接口,并与netfilter相连接。 + +### 2. 你用过一些iptables的GUI或命令行工具么? ### + +> **答案** : 虽然我既用过GUI工具,比如与[Webmin][1]结合的Shorewall;以及直接通过终端访问iptables。但我必须承认通过Linux终端直接访问iptables能给予用户更高级的灵活性、以及对其背后工作更好的理解的能力。GUI适合初级管理员而终端适合有经验的管理员。 + +### 3. 那么iptables和firewalld的基本区别是什么呢? ### + +> **答案** : iptables和firewalld都有着同样的目的(包过滤),但它们使用不同的方式。iptables与firewalld不同,在每次发生更改时都刷新整个规则集。通常iptables配置文件位于‘/etc/sysconfig/iptables‘,而firewalld的配置文件位于‘/etc/firewalld/‘。firewalld的配置文件是一组XML文件。以XML为基础进行配置的firewalld比iptables的配置更加容易,但是两者都可以完成同样的任务。例如,firewalld可以在自己的命令行界面以及基于XML的配置文件下使用iptables。 + +### 4. 如果有机会的话,你会在你所有的服务器上用firewalld替换iptables么? ### + +> **答案** : 我对iptables很熟悉,它也工作的很好。如果没有任何需求需要firewalld的动态特性,那么没有理由把所有的配置都从iptables移动到firewalld。通常情况下,目前为止,我还没有看到iptables造成什么麻烦。IT技术的通用准则也说道“为什么要修一件没有坏的东西呢?”。上面是我自己的想法,但如果组织愿意用firewalld替换iptables的话,我不介意。 + +### 5. 你看上去对iptables很有信心,巧的是,我们的服务器也在使用iptables。 ### + +iptables使用的表有哪些?请简要的描述iptables使用的表以及它们所支持的链。 + +> **答案** : 谢谢您的赞赏。至于您问的问题,iptables使用的表有四个,它们是: +> +> Nat 表 +> Mangle 表 +> Filter 表 +> Raw 表 +> +> Nat表 : Nat表主要用于网络地址转换。根据表中的每一条规则修改网络包的IP地址。流中的包仅遍历一遍Nat表。例如,如果一个通过某个接口的包被修饰(修改了IP地址),该流中其余的包将不再遍历这个表。通常不建议在这个表中进行过滤,由NAT表支持的链称为PREROUTING Chain,POSTROUTING Chain和OUTPUT Chain。 +> +> Mangle表 : 正如它的名字一样,这个表用于校正网络包。它用来对特殊的包进行修改。它能够修改不同包的头部和内容。Mangle表不能用于地址伪装。支持的链包括PREROUTING Chain,OUTPUT Chain,Forward Chain,InputChain和POSTROUTING Chain。 +> +> Filter表 : Filter表是iptables中使用的默认表,它用来过滤网络包。如果没有定义任何规则,Filter表则被当作默认的表,并且基于它来过滤。支持的链有INPUT Chain,OUTPUT Chain,FORWARD Chain。 +> +> Raw表 : Raw表在我们想要配置之前被豁免的包时被使用。它支持PREROUTING Chain 和OUTPUT Chain。 + +### 6. 简要谈谈什么是iptables中的目标值(能被指定为目标),他们有什么用 ### + +> **答案** : 下面是在iptables中可以指定为目标的值: +> +> ACCEPT : 接受包 +> QUEUE : 将包传递到用户空间 (应用程序和驱动所在的地方) +> DROP : 丢弃包 +> RETURN : 将控制权交回调用的链并且为当前链中的包停止执行下一调规则 + +### 7. 让我们来谈谈iptables技术方面的东西,我的意思是说实际使用方面 ### + +你怎么检测在CentOS中安装iptables时需要的iptables的rpm? + +> **答案** : iptables已经被默认安装在CentOS中,我们不需要单独安装它。但可以这样检测rpm: +> +> # rpm -qa iptables +> +> iptables-1.4.21-13.el7.x86_64 +> +> 如果您需要安装它,您可以用yum来安装。 +> +> # yum install iptables-services + +### 8. 怎样检测并且确保iptables服务正在运行? ### + +> **答案** : 您可以在终端中运行下面的命令来检测iptables的状态。 +> +> # service status iptables [On CentOS 6/5] +> # systemctl status iptables [On CentOS 7] +> +> 如果iptables没有在运行,可以使用下面的语句 +> +> ---------------- 在CentOS 6/5下 ---------------- +> # chkconfig --level 35 iptables on +> # service iptables start +> +> ---------------- 在CentOS 7下 ---------------- +> # systemctl enable iptables +> # systemctl start iptables +> +> 我们还可以检测iptables的模块是否被加载: +> +> # lsmod | grep ip_tables + +### 9. 你怎么检查iptables中当前定义的规则呢? ### + +> **答案** : 当前的规则可以简单的用下面的命令查看: +> +> # iptables -L +> +> 示例输出 +> +> Chain INPUT (policy ACCEPT) +> target prot opt source destination +> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED +> ACCEPT icmp -- anywhere anywhere +> ACCEPT all -- anywhere anywhere +> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> +> Chain FORWARD (policy ACCEPT) +> target prot opt source destination +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> +> Chain OUTPUT (policy ACCEPT) +> target prot opt source destination + +### 10. 你怎样刷新所有的iptables规则或者特定的链呢? ### + +> **答案** : 您可以使用下面的命令来刷新一个特定的链。 +> +> # iptables --flush OUTPUT +> +> 要刷新所有的规则,可以用: +> +> # iptables --flush + +### 11. 请在iptables中添加一条规则,接受所有从一个信任的IP地址(例如,192.168.0.7)过来的包。 ### + +> **答案** : 上面的场景可以通过运行下面的命令来完成。 +> +> # iptables -A INPUT -s 192.168.0.7 -j ACCEPT +> +> 我们还可以在源IP中使用标准的斜线和子网掩码: +> +> # iptables -A INPUT -s 192.168.0.7/24 -j ACCEPT +> # iptables -A INPUT -s 192.168.0.7/255.255.255.0 -j ACCEPT + +### 12. 怎样在iptables中添加规则以ACCEPT,REJECT,DENY和DROP ssh的服务? ### + +> **答案** : 但愿ssh运行在22端口,那也是ssh的默认端口,我们可以在iptables中添加规则来ACCEPT ssh的tcp包(在22号端口上)。 +> +> # iptables -A INPUT -s -p tcp - -dport -j ACCEPT +> +> REJECT ssh服务(22号端口)的tcp包。 +> +> # iptables -A INPUT -s -p tcp - -dport -j REJECT +> +> DENY ssh服务(22号端口)的tcp包。 +> +> +> # iptables -A INPUT -s -p tcp - -dport -j DENY +> +> DROP ssh服务(22号端口)的tcp包。 +> +> +> # iptables -A INPUT -s -p tcp - -dport -j DROP + +### 13. 让我给你另一个场景,假如有一台电脑的本地IP地址是192.168.0.6。你需要封锁在21、22、23和80号端口上的连接,你会怎么做? ### + +> **答案** : 这时,我所需要的就是在iptables中使用‘multiport‘选项,并将要封锁的端口号跟在它后面。上面的场景可以用下面的一条语句搞定: +> +> # iptables -A INPUT -s 192.168.0.6 -p tcp -m multiport --dport 22,23,80,8080 -j DROP +> +> 可以用下面的语句查看写入的规则。 +> +> # iptables -L +> +> Chain INPUT (policy ACCEPT) +> target prot opt source destination +> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED +> ACCEPT icmp -- anywhere anywhere +> ACCEPT all -- anywhere anywhere +> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> DROP tcp -- 192.168.0.6 anywhere multiport dports ssh,telnet,http,webcache +> +> Chain FORWARD (policy ACCEPT) +> target prot opt source destination +> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited +> +> Chain OUTPUT (policy ACCEPT) +> target prot opt source destination + +**面试官** : 好了,我问的就是这些。你是一个很有价值的雇员,我们不会错过你的。我将会向HR推荐你的名字。如果你有什么问题,请问我。 + +作为一个候选人我不愿不断的问将来要做的项目的事以及公司里其他的事,这样会打断愉快的对话。更不用说HR轮会不会比较难,总之,我获得了机会。 + +同时我要感谢Avishek和Ravi(我的朋友)花时间帮我整理我的面试。 + +朋友!如果您有过类似的面试,并且愿意与数百万Tecmint读者一起分享您的面试经历,请将您的问题和答案发送到admin@tecmint.com。 + +谢谢!保持联系。如果我能更好的回答我上面的问题的话,请记得告诉我。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-firewall-iptables-interview-questions-and-answers/ + +作者:[Avishek Kumar][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/install-webmin-web-based-system-administration-tool-for-rhel-centos-fedora/ From 15819076b20966bf4d27f7e839224da398fefb96 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Sun, 14 Jun 2015 16:06:30 +0800 Subject: [PATCH 1172/2517] fix some errors --- ...r Interview Experience on Linux 'iptables' Firewall.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md b/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md index 270f823b59..1d476d0f18 100644 --- a/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md +++ b/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md @@ -139,21 +139,21 @@ iptables使用的表有哪些?请简要的描述iptables使用的表以及它 > **答案** : 但愿ssh运行在22端口,那也是ssh的默认端口,我们可以在iptables中添加规则来ACCEPT ssh的tcp包(在22号端口上)。 > -> # iptables -A INPUT -s -p tcp - -dport -j ACCEPT +> # iptables -A INPUT -s -p tcp --dport 22 -j ACCEPT > > REJECT ssh服务(22号端口)的tcp包。 > -> # iptables -A INPUT -s -p tcp - -dport -j REJECT +> # iptables -A INPUT -s -p tcp --dport 22 -j REJECT > > DENY ssh服务(22号端口)的tcp包。 > > -> # iptables -A INPUT -s -p tcp - -dport -j DENY +> # iptables -A INPUT -s -p tcp --dport 22 -j DENY > > DROP ssh服务(22号端口)的tcp包。 > > -> # iptables -A INPUT -s -p tcp - -dport -j DROP +> # iptables -A INPUT -s -p tcp --dport 22 -j DROP ### 13. 让我给你另一个场景,假如有一台电脑的本地IP地址是192.168.0.6。你需要封锁在21、22、23和80号端口上的连接,你会怎么做? ### From 2e97021d8247f0ae832caac9e14cb6cfb2d17708 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 14 Jun 2015 21:23:25 +0800 Subject: [PATCH 1173/2517] PUB:20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool @NearTan --- ...Command Line Using 'Speedtest-CLI' Tool.md | 85 ++++--------------- 1 file changed, 16 insertions(+), 69 deletions(-) rename {translated/tech => published}/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md (85%) diff --git a/translated/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md b/published/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md similarity index 85% rename from translated/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md rename to published/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md index 9b4c2ae075..462c647ac8 100644 --- a/translated/tech/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md +++ b/published/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md @@ -1,186 +1,133 @@ - - 用命令行工具Speedtest-CLI来测试你的上下行网速 ================================================================================ 我们经常需要到检查家里与办公室之间的网络是否连通,那么我们要怎么做呢?打开网站Speedtest.net然后开始测试。网站是通过加载浏览器中的JavaScript脚本然后选择最佳的服务器测速然后用Flash产生图形化的结果。 - 那么远程服务器呢?要知道大多数远程服务器是没有浏览器可以打开web页面的。用浏览器打开网页测速的瓶颈就在此,你不能按计划的对服务器进行定期的常规测试。这时需要到一个名为Speedtest-cli的软件来打破这个瓶颈,它能让你通过命令行来测试互联网连接的速度。 - #### Speedtest-cli是什么 #### - 此程序是基于Python开发的脚本程序,利用了speedtest.net的服务来测量出上下行的宽带。Speedtest-cli能根据机房离测速服务器的物理距离来列出测速服务器,或者针对某一服务器进行测速,同时还能为你生成一个URL以便你分享你的测速结果。 - 要在Linux上安装最新版本的speedtest-cli,你必须安装2.4-3.4或者更高版本的Python。 - ### 在Linux上安装speedtest-cli ### - 有两种方法可以安装speedtest-cli。第一种方法需要用到`python-pip`包管理器,第二种方法需要安装Python脚本,生成安装文件然后运行,这里我们分别介绍两种方法: - #### 使用pythin-pip安装speedtest-cli#### - 首先你需要安装`python-pip`包管理器,之后你就可以用pip命令来安装speedtest-cli $ sudo apt-get install python-pip $ sudo pip install speedtest-cli - -如果要吧speedtest-cli升级至最新版本,你需要输入以下命令 +如果要把speedtest-cli升级至最新版本,你需要输入以下命令 $ sudo pip install speedtest-cli --upgrade - #### 通过Pyhton脚本来安装speedtest-cli #### - 首先要用wget命令从github上下来Python脚本,然后解压提取下载的文件(master.zip) $ wget https://github.com/sivel/speedtest-cli/archive/master.zip $ unzip master.zip - 提取出文件后,进入提取出的目录`speedtest-cli-master`然后使脚本可以执行。 $ cd speedtest-cli-master/ $ chmod 755 speedtest_cli.py - 下一步,把可执行的脚本移动到`/usr/bin`文件夹,这样你就不用每次都输入完整的脚本路径了。 $ sudo mv speedtest_cli.py /usr/bin/ - ### 用speedtest-cli测试互联网连通速度### - **1. 要测试你的下载与上传速度,只需要运行`speedtest-cli`命令,不需要带参数。** $ speedtest_cli.py -
![Test Download Upload Speed in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Download-Upload-Speed-in-Linux1.png) -在Linux下测试上传下载速度 -
+*在Linux下测试上传下载速度* - -**2. 测试上传下载bytes的速度** +**2. 测试上传下载的速度(以字节计算)** $ speedtest_cli.py --bytes -
![Test Internet Speed in Bytes](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Speed-in-Bytes.png) -测试bytes的速度 -
- +*测试bytes的速度* **3. 工具提供一个链接来下载由你的宽带测试结果生成的图片,你可以分享给你的家人朋友。** -
![Share Internet Speed Results](http://www.tecmint.com/wp-content/uploads/2015/03/Share-Internet-Speed-Results.png) -分享测速结果 -
- +*分享测速结果* 下面的图片就是你通过以上的命令行测速而生成的图片 -
![Speed Test Results](http://www.tecmint.com/wp-content/uploads/2015/03/Speed-Test-Results.png) -测速结果 -
+*测速结果* **4.如果你仅仅需要Ping,上传,下载的结果,就运行以下命令:** $ speedtest_cli.py --simple -
![Test Ping Download Upload Speed](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Ping-Download-Upload-Speed1.png) -测试Ping,上传,下载的速度 -
- - - - +*测试Ping,上传,下载的速度* **5. 列出`speedtest.net`所有的服务器距离你的物理距离,单位是千米(km)** - $ speedtest_cli.py --list -
![Check Speedtest.net Servers](http://www.tecmint.com/wp-content/uploads/2015/03/Check-Speedtest-Servers.png) -列出Speedtest.net的服务器 -
- +*列出Speedtest.net的服务器* **6. 当获得一个非常长的服务器列表之后,怎么列出我想要的某个服务器?如果我要在speedtest.net服务器列表中找出位于Mumbai(印度)的服务器呢?** $ speedtest_cli.py --list | grep -i Mumbai -
![Check Nearest Server](http://www.tecmint.com/wp-content/uploads/2015/03/Check-Nearest-Server.png) -列出最近的服务器 -
- +*列出最近的服务器* **7. 对指定的服务器进行测速。我们使用上面例子5和例子6中获取的服务器ID:** $ speedtest_cli.py --server [server ID] - $ speedtest_cli.py --server [5060] ## Here server ID 5060 is used in the example. $ speedtest_cli.py --server [5060] ## 这里使用服务器ID为5060作为例子 -
![Test Connection Against Server](http://www.tecmint.com/wp-content/uploads/2015/03/Test-Connection-Against-Server.png) -对指定的服务器进行测速 -
- +*对指定的服务器进行测速* **8. 输出`speedtest-cli`的版本信息和帮助文档** $ speedtest_cli.py --version -
![Check SpeedCli Version](http://www.tecmint.com/wp-content/uploads/2015/03/Check-SpeedCLi-Version.png) -输出版本号 -
+*输出版本号* $ speedtest_cli.py --help -
+ ![SpeedCli Help](http://www.tecmint.com/wp-content/uploads/2015/03/SpeedCli-Help.png) -输出帮助文档 -
- +*输出帮助文档* **提醒:**报告中的延迟并不是确切的结果,不应该过于依赖它;这个数值可以当作相对延迟,这对你选择某一测试服务器来说是可靠的。同时,CPU和内存的容量会影响结果的准确度。 - ### 结论 ### - -系统管理员和开发者应该必备这个简单的脚本工具,这个工具轻量级,功能齐全,真是太赞了。我不喜欢Speedtest.net的原因是它使用来flash,相反speedtest-cli刚好戳中了我的痛点。 - +系统管理员和开发者应该必备这个简单的脚本工具,这个轻量级的工具功能齐全,真是太赞了。我不喜欢Speedtest.net的原因是它使用来flash,相反speedtest-cli刚好戳中了我的痛点。 speedtest_cli是一个第三方工具,也不能自动地记录下宽带速度。Speedtest.net拥有上百万的用户,你可以自己[配制一个小型的测速服务器][1]。 - -上面就是所有内容,更多内容敬请关注Tecmint。如果你有任何反馈记得在文章下方评论,如果你喜欢别忘了给我们点歌赞,分享我们的文章。 +上面就是所有内容,更多内容敬请关注我们。如果你有任何反馈记得在文章下方评论,如果你喜欢别忘了给我们点个赞,分享我们的文章。 -------------------------------------------------------------------------------- @@ -188,7 +135,7 @@ via: http://www.tecmint.com/check-internet-speed-from-command-line-in-linux/ 作者:[Avishek Kumar][a] 译者:[NearTan](https://github.com/NearTan) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From eb8f276ab1960e2edc873010cf5a8c9f75ec3dc8 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 14 Jun 2015 22:37:08 +0800 Subject: [PATCH 1174/2517] PUB:20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux @strugglingyouth --- ...ry Cache Buffer and Swap Space on Linux.md | 106 ++++++++++++++++++ ...ry Cache Buffer and Swap Space on Linux.md | 94 ---------------- 2 files changed, 106 insertions(+), 94 deletions(-) create mode 100644 published/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md delete mode 100644 translated/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md diff --git a/published/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md b/published/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md new file mode 100644 index 0000000000..2007daec95 --- /dev/null +++ b/published/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md @@ -0,0 +1,106 @@ +在Linux上如何清除内存的 Cache、Buffer 和交换空间 +============================================ + +像任何其他的操作系统一样,GNU/Linux 已经实现的内存管理不仅有效,而且更好。但是,如果有任何进程正在蚕食你的内存,而你想要清除它的话,Linux 提供了一个刷新或清除RAM缓存方法。 + +![Clear RAM Cache and Swap in Linux](http://www.tecmint.com/wp-content/uploads/2015/05/Clear-RAM-Cache-in-Linux.jpg) + +### 如何在 Linux 中清除缓存(Cache)?### + +每个 Linux 系统有三种选项来清除缓存而不需要中断任何进程或服务。 + +(LCTT 译注:Cache,译作“缓存”,指 CPU 和内存之间高速缓存。Buffer,译作“缓冲区”,指在写入磁盘前的存储再内存中的内容。在本文中,Buffer 和 Cache 有时候会通指。) + +1. 仅清除页面缓存(PageCache) + + # sync; echo 1 > /proc/sys/vm/drop_caches + +2. 清除目录项和inode + + # sync; echo 2 > /proc/sys/vm/drop_caches + +3. 清除页面缓存,目录项和inode + + # sync; echo 3 > /proc/sys/vm/drop_caches + + +上述命令的说明: + +sync 将刷新文件系统缓冲区(buffer),命令通过“;”分隔,顺序执行,shell在执行序列中的下一个命令之前会等待命令的终止。正如内核文档中提到的,写入到drop_cache将清空缓存而不会杀死任何应用程序/服务,[echo命令][1]做写入文件的工作。 + +如果你必须清除磁盘高速缓存,第一个命令在企业和生产环境中是最安全,`"...echo 1> ..."`只会清除页面缓存。 +在生产环境中不建议使用上面的第三个选项`"...echo 3 > ..."` ,除非你明确自己在做什么,因为它会清除缓存页,目录项和inodes。 + +**在Linux上释放也许被内核所使用的缓冲区(Buffer)和缓存(Cache)是否是个好主意?** + +当你设置许多设定想要检查效果时,如果它实际上是专门针对 I/O 范围的基准测试,那么你可能需要清除缓冲区和缓存。你可以如上所示删除缓存,无需重新启动系统(即无需停机)。 + +Linux被设计成它在寻找磁盘之前到磁盘缓存寻找的方式。如果它发现该资源在缓存中,则该请求不会发送到磁盘。如果我们清理缓存,磁盘缓存就起不到作用了,系统会到磁盘上寻找资源。 + +此外,当清除缓存后它也将减慢系统运行速度,系统会将每一个被请求的资源再次加载到磁盘缓存中。 + + +现在,我们将创建一个 shell 脚本,通过一个 cron 调度任务在每天下午2点自动清除RAM缓存。如下创建一个 shell 脚本 clearcache.sh 并在其中添加以下行: + + #!/bin/bash + # 注意,我们这里使用了 "echo 3",但是不推荐使用在产品环境中,应该使用 "echo 1" + echo "echo 3 > /proc/sys/vm/drop_caches" + +给clearcache.sh文件设置执行权限 + + # chmod 755 clearcache.sh + +现在,当你需要清除内存缓存时只需要调用脚本。 + +现在设置一个每天下午2点的定时任务来清除RAM缓存,打开crontab进行编辑。 + + # crontab -e + +添加以下行,保存并退出。 + + 0 3 * * * /path/to/clearcache.sh + +有关如何创建一个定时任务,更多细节你可以查看我们的文章 [11 个定时调度任务的例子][2]。 + +**在生产环境的服务器上自动清除RAM是否是一个好主意?** + +不!它不是。想想一个情况,当你已经预定脚本在每天下午2点来清除内存缓存。那么其时该脚本会执行并刷新你的内存缓存。在某一天由于某些原因,可能您的网站的在线用户会超过预期地从你的服务器请求资源。 + + +而在这时,按计划调度的脚本运行了,并清除了缓存中的一切。当所有的用户都从磁盘读取数据时,这将导致服务器崩溃并损坏数据库。因此,清除缓存仅在必要时并且在你的预料之中,否则你就是个呆瓜系统管理员。 + +###如何清除Linux的交换空间?### + +如果你想清除掉的空间,你可以运行下面的命令: + + # swapoff -a && swapon -a + +此外,了解有关风险后,您可以将上面的命令添加到cron中。 + +现在,我们将上面两种命令结合成一个命令,写成正确的脚本来同时清除RAM缓存和交换空间。 + + # echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared' + +或 + + su -c 'echo 3 > /proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared' + +在测试上面的命令之前,我们在执行脚本前后运行“free -m” 来检查缓存。 + +![Clear RAM Cache and Swap Space](http://www.tecmint.com/wp-content/uploads/2015/05/Clear-RAM-Cache.gif) + +就是这样,如果你喜欢这篇文章,不要忘记向我们提供您宝贵的意见,让我们知道,您认为在企业和生产环境中清除内存缓存和缓冲区是否是一个好主意? + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/ + +作者:[Avishek Kumar][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:https://linux.cn/article-3592-1.html +[2]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ \ No newline at end of file diff --git a/translated/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md b/translated/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md deleted file mode 100644 index 3c272cd4de..0000000000 --- a/translated/tech/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md +++ /dev/null @@ -1,94 +0,0 @@ - - #在Linux上如何清除RAM内存高速缓存,缓存和交换空间# - -像任何其他的操作系统一样,GNU / Linux已经有效地实施了内存管理甚至更多。但是,如果有任何进程正在蚕食你的内存,你要清除它, -Linux提供了一个方法来刷新或清除RAM缓存。 - -linux - -在Linux中如何清除缓存? - -每一个Linux系统有三个选项来清除缓存而不中断任何进程或服务。 - -1,仅清除缓存页 -

-sync; echo 1 > /proc/sys/vm/drop_caches
-
-2,清除目录项和inodes -

-sync; echo 2 > /proc/sys/vm/drop_caches
-
-3,清除,缓存页,目录项和inodes -

-sync; echo 3 > /proc/sys/vm/drop_caches
-
-上述命令的说明: - -sync将刷新文件系统缓存,命令通过“;”分隔,顺序执行,shell等待终止在序列中的每一个命令执行之前。正如内核文档中提到的,写到drop_cache将清空缓存而不杀死任何应用程序/服务,echo命令做写入文件的工作。 - -如果你必须清除磁盘高速缓存,第一个命令在企业和生产环境中是最安全,“...echo 1> ...”只会清除页缓存。 -不建议使用上面第三个选项在生产环境中“...echo 3 >” ,除非你明确自己在做什么,因为它会清除缓存页,目录项和inodes。 - -在Linux上释放Buffer和Cache要用到内核是否是个好主意? - -当你请求许多设定想要检查时,如果它实际上是专门实施对I/O 广泛的基准测试,那么你可能需要清除缓存。你可以如上所示删除缓存,无需重新启动系统即无需停机。 - -Linux被设计成它在寻找磁盘之前到磁盘缓存寻找的方式。如果它发现该资源在缓存中,则该请求不到达磁盘。如果我们清理缓存,磁盘缓存将没有用处,系统会到磁盘上寻找资源。 - -此外,当清除缓存后它也将减慢系统运行速度,系统会重新加载每一个被请求的资源再次到磁盘缓存中。 - -现在,我们将通过一个cron任务调度器创建一个shell脚本在每天下午2点自动清除RAM缓存。 -创建一个shell脚本clearcache.sh并在其中添加以下行: -

-#!/bin/bash
-# Note, we are using "echo 3", but it is not recommended in production instead use "echo 1"
-echo "echo 3 > /proc/sys/vm/drop_caches"
-
-给clearcache.sh文件设置执行权限 -

-# chmod 755 clearcache.sh
-
-现在,当你需要清除RAM缓存时只需要调用脚本。 - -现在设置一个定时任务来清除RAM缓存每天在下午2点,打开crontab进行编辑。 -

-# crontab -e
-
-添加以下行,保存并退出。 -

-0 3 * * * /path/to/clearcache.sh
-
-有关如何创建一个定时任务,更多细节你可以查看我们的文章11 Cron Scheduling Jobs。 - -在生产环境的服务器上自动清除RAM是否是一个好主意? - -不!它不是。想想一个情况,当你已经预定脚本来清除RAM缓存每天在下午2点。每天下午2点该脚本会执行并刷新你的RAM缓存。在一天中的任何时候,您网站用户的在线量可能会超过预期的,并从你的服务器请求资源。同时调度器运行着脚本,并在高速缓存中清除一切。当所有的用户都从磁盘读取数据时,这将导致服务器崩溃并损坏数据库。 -因此,清除缓存仅在必要时并且在你的预料之中,否则你就是个Cargo Cult System Administrator。 - -如何清除Linux的交换空间? - -如果你想清除掉的空间,你可以运行下面的命令: -

-# swapoff -a && swapon -a
-
-此外,了解有关风险后,您可能会将上面的命令添加到cron中。 - -现在,我们将上面两种命令结合成一个命令写出正确的脚本来同时清除RAM缓存和交换空间。 -

-# echo 3 > /proc/sys/vm/drop_caches && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
-
-或 -

-su -c 'echo 3 >/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'
-
-在测试上面的命令之前,我们先运行“free -m” 然后执行脚本检查缓存。 - - -![](https://camo.githubusercontent.com/659439c8dbef449fa82ba64ff5a02dc0e9324017/687474703a2f2f7777772e7465636d696e742e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031352f30352f436c6561722d52414d2d43616368652e676966) - -就是现在,如果你喜欢这篇文章,不要忘记向我们提供您宝贵的意见, -让我们知道,您认为在企业和生产环境中清除RAM缓存和缓冲区是否是一个好主意? - - - -  \ No newline at end of file From 55e4b621c8b0bfbdc271efff112a85fd42fcb9b2 Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 15 Jun 2015 07:58:10 +0800 Subject: [PATCH 1175/2517] Update 20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md --- ...e incremental backup of LUKS-encrypted disk or partition.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md b/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md index 64e872c4b7..ee43b08c2a 100644 --- a/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md +++ b/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to make remote incremental backup of LUKS-encrypted disk/partition ================================================================================ Some of us have our hard drives at home or on a [VPS][1] encrypted by [Linux Unified Key Setup (LUKS)][2] for security reasons, and these drives can quickly grow to tens or hundreds of GBs in size. So while we enjoy the security of our LUKS device, we may start to think about a possible remote backup solution. For secure off-site backup, we will need something that operates at the block level of the encrypted LUKS device, and not at the un-encrypted file system level. So in the end we find ourselves in a situation where we will need to transfer the entire LUKS device (let's say 200GB for example) each time we want to make a backup. Clearly not feasible. How can we deal with this problem? @@ -77,4 +78,4 @@ via: http://xmodulo.com/remote-incremental-backup-luks-encrypted-disk-partition. [2]:http://xmodulo.com/how-to-create-encrypted-disk-partition-on-linux.html [3]:http://bdsync.rolf-fokkens.nl/ [4]:http://xmodulo.com/recommend/linuxbook -[5]:http://xmodulo.com/how-to-enable-ssh-login-without.html \ No newline at end of file +[5]:http://xmodulo.com/how-to-enable-ssh-login-without.html From 21fb1a56adef26f222fe808288afba02f0b8e378 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Mon, 15 Jun 2015 08:51:19 +0800 Subject: [PATCH 1176/2517] [Translated]20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md --- ...kup of LUKS-encrypted disk or partition.md | 81 ------------------- ...kup of LUKS-encrypted disk or partition.md | 80 ++++++++++++++++++ 2 files changed, 80 insertions(+), 81 deletions(-) delete mode 100644 sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md create mode 100644 translated/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md diff --git a/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md b/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md deleted file mode 100644 index ee43b08c2a..0000000000 --- a/sources/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md +++ /dev/null @@ -1,81 +0,0 @@ -Translating by GOLinux! -How to make remote incremental backup of LUKS-encrypted disk/partition -================================================================================ -Some of us have our hard drives at home or on a [VPS][1] encrypted by [Linux Unified Key Setup (LUKS)][2] for security reasons, and these drives can quickly grow to tens or hundreds of GBs in size. So while we enjoy the security of our LUKS device, we may start to think about a possible remote backup solution. For secure off-site backup, we will need something that operates at the block level of the encrypted LUKS device, and not at the un-encrypted file system level. So in the end we find ourselves in a situation where we will need to transfer the entire LUKS device (let's say 200GB for example) each time we want to make a backup. Clearly not feasible. How can we deal with this problem? - -### A Solution: Bdsync ### - -This is when a brilliant open-source tool called [Bdsync][3] (thanks to Rolf Fokkens) comes to our rescue. As the name implies, Bdsync can synchronize "block devices" over network. For fast synchronization, Bdsync generates and compares MD5 checksums of blocks in the local/remote block devices, and sync only the differences. What rsync can do at the file system level, Bdsync can do it at the block device level. Naturally, it works with encrypted LUKS devices as well. Pretty neat! - -Using Bdsync, the first-time backup will copy the entire LUKS block device to a remote host, so it will take a lot of time to finish. However, after that initial backup, if we make some new files on the LUKS device, the second backup will be finished quickly because we will need to copy only that blocks which have been changed. Classic incremental backup at play! - -### Install Bdsync on Linux ### - -Bdsync is not included in the standard repositories of [Linux][4] distributions. Thus you need to build it from the source. Use the following distro-specific instructions to install Bdsync and its man page on your system. - -#### Debian, Ubuntu or Linux Mint #### - - $ sudo apt-get install git gcc libssl-dev - $ git clone https://github.com/TargetHolding/bdsync.git - $ cd bdsync - $ make - $ sudo cp bdsync /usr/local/sbin - $ sudo mkdir -p /usr/local/man/man1 - $ sudo sh -c 'gzip -c bdsync.1 > /usr/local/man/man1/bdsync.1.gz' - -#### Fedora or CentOS/RHEL #### - - $ sudo yum install git gcc openssl-devel - $ git clone https://github.com/TargetHolding/bdsync.git - $ cd bdsync - $ make - $ sudo cp bdsync /usr/local/sbin - $ sudo mkdir -p /usr/local/man/man1 - $ sudo sh -c 'gzip -c bdsync.1 > /usr/local/man/man1/bdsync.1.gz' - -### Perform Off-site Incremental Backup of LUKS-Encrypted Device ### - -I assume that you have already provisioned a LUKS-encrypted block device as a backup source (e.g., /dev/LOCDEV). I also assume that you have a remote host where the source device will be backed up (e.g., as /dev/REMDEV). - -You need to access the root account on both systems, and set up [password-less SSH access][5] from the local host to a remote host. Finally, you need to install Bdsync on both hosts. - -To initiate a remote backup process on the local host, we execute the following command as the root: - - # bdsync "ssh root@remote_host bdsync --server" /dev/LOCDEV /dev/REMDEV | gzip > /some_local_path/DEV.bdsync.gz - -Some explanations are needed here. Bdsync client will open an SSH connection to the remote host as the root, and execute Bdsync client with --server option. As clarified, /dev/LOCDEV is our source LUKS block device on the local host, and /dev/REMDEV is the target block device on the remote host. They could be /dev/sda (for an entire disk) or /dev/sda2 (for a single partition). The output of the local Bdsync client is then piped to gzip, which creates DEV.bdsync.gz (so-called binary patch file) in the local host. - -The first time you run the above command, it will take very long time, depending on your Internet/LAN speed and the size of /dev/LOCDEV. Remember that you must have two block devices (/dev/LOCDEV and /dev/REMDEV) with the same size. - -The next step is to copy the generated patch file from the local host to the remote host. Using scp is one possibility: - - # scp /some_local_path/DEV.bdsync.gz root@remote_host:/remote_path - -The final step is to execute the following command on the remote host, which will apply the patch file to /dev/REMDEV: - - # gzip -d < /remote_path/DEV.bdsync.gz | bdsync --patch=/dev/DSTDEV - -I recommend doing some tests with small partitions (without any important data) before deploying Bdsync with real data. After you fully understand how the entire setup works, you can start backing up real data. - -### Conclusion ### - -In conclusion, we showed how to use Bdsync to perform incremental backups for LUKS devices. Like rsync, only a fraction of data, not the entire LUKS device, is needed to be pushed to an off-site backup site at each backup, which saves bandwidth and backup time. Rest assured that all the data transfer is secured by SSH or SCP, on top of the fact that the device itself is encrypted by LUKS. It is also possible to improve this setup by using a dedicated user (instead of the root) who can run bdsync. We can also use bdsync for ANY block device, such as LVM volumes or RAID disks, and can easily set up Bdsync to back up local disks on to USB drives as well. As you can see, its possibility is limitless! - -Feel free to share your thought. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/remote-incremental-backup-luks-encrypted-disk-partition.html - -作者:[Iulian Murgulet][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/iulian -[1]:http://xmodulo.com/go/digitalocean -[2]:http://xmodulo.com/how-to-create-encrypted-disk-partition-on-linux.html -[3]:http://bdsync.rolf-fokkens.nl/ -[4]:http://xmodulo.com/recommend/linuxbook -[5]:http://xmodulo.com/how-to-enable-ssh-login-without.html diff --git a/translated/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md b/translated/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md new file mode 100644 index 0000000000..645ade2261 --- /dev/null +++ b/translated/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md @@ -0,0 +1,80 @@ +为LUKS——加密的磁盘/分区做增量备份 +================================================================================ +我们中有些人出于安全原因,在家里或者[VPS][1]上通过[Linux统一密钥配置(LUKS)][2]为硬盘驱动器加密,而这些驱动器的容量很快会增长到数十或数百GB。因此,虽然我们享受着LUKS设备带来的安全感,但是我们也该开始考虑一个可能的远程备份方案了。对于安全的非现场备份,我们将需要在LUKS加密的设备上以块级别操作的东西。因此,最后我们发现这么个状况,我们每次都需要传输想要做备份的LUKS设备(比如说200GB)。很明显,这是不可行的。我们该怎么来处理这个问题呢? + +### 一个解决方案: Bdsync ### + +这时,一个卓越的开源工具来拯救我们了,它叫[Bdsync][3](多亏了Rolf Fokkens)。顾名思义,Bdsync可以通过网络同步“块设备”。对于快速同步,Bdsync会生成并对比本地/远程块设备的块MD5校验和,只同步差异部分。rsync在文件系统级别可以做的,Bdsync可以在块设备级别完成。很自然,对于LUKS加密的设备它也能工作得很好。相当地灵巧! + +使用Bdsync,首次备份将拷贝整个LUKS块设备到远程主机,因而会花费大量时间来完成。然而,在初始备份后,如果我们在LUKS设备新建一些文件,再次备份就会很快完成,因为我们只需拷贝修改过的块。经典的增量备份在起作用了! + +### 安装Bdsync到Linux ### + +Bdsync并不包含在[Linux][4]发行版的标准仓库中,因而你需要从源代码来构建它。使用以下针对特定版本的指令来安装Bdsync及其手册页到你的系统中。 + +#### Debian,Ubuntu或Linux Mint #### + + $ sudo apt-get install git gcc libssl-dev + $ git clone https://github.com/TargetHolding/bdsync.git + $ cd bdsync + $ make + $ sudo cp bdsync /usr/local/sbin + $ sudo mkdir -p /usr/local/man/man1 + $ sudo sh -c 'gzip -c bdsync.1 > /usr/local/man/man1/bdsync.1.gz' + +#### Fedora或CentOS/RHEL #### + + $ sudo yum install git gcc openssl-devel + $ git clone https://github.com/TargetHolding/bdsync.git + $ cd bdsync + $ make + $ sudo cp bdsync /usr/local/sbin + $ sudo mkdir -p /usr/local/man/man1 + $ sudo sh -c 'gzip -c bdsync.1 > /usr/local/man/man1/bdsync.1.gz' + +### 对LUKS加密的设备实施非现场增量备份 ### + +我假定你已经准备好了一个LUKS加密的块设备作为备份源(如,/dev/LOCDEV)。同时,我假定你也有一台远程主机,用以作为源设备的备份点(如,/dev/REMDEV)。 + +你需要在两台系统上具有root帐号访问权限,并且设置从本地访问远程的[无密码SSH访问][5]。最后,你需要安装Bdsync到两台主机上。 + +要在本地主机上初始化一个远程备份进程,我们需要以root执行以下命令: + + # bdsync "ssh root@remote_host bdsync --server" /dev/LOCDEV /dev/REMDEV | gzip > /some_local_path/DEV.bdsync.gz + +这里需要进行一些说明。Bdsync客户端将以root打开一个到远程主机的SSH连接,并执行带有--server选项的Bdsync客户端。明确说明一下,/dev/LOCDEV是我们的本地主机上的源LUKS块设备,而/dev/REMDEV是远程主机上的目标块设备。它们可以是/dev/sda(作为整个磁盘),或者/dev/sda2(作为单个分区)。本地Bdsync客户端的输出结果随后被管道输送到gzip,用来在本地主机中创建DEV.bdsync.gz(所谓的二进制补丁文件)。 + +你第一次运行上面的命令的时候,它会花费很长一段时间,这取决于你的互联网/局域网速度,以及/dev/LOCDEV的大小。记住,你必须有两个大小相同的块设备(/dev/LOCDEV和/dev/REMDEV)。 + +下一步是要将补丁文件从本地主机拷贝到远程主机。一种可能是使用scp: + + # scp /some_local_path/DEV.bdsync.gz root@remote_host:/remote_path + +最后一步,是要在远程主机上执行以下命令,它们会将补丁文件应用到/dev/REMDEV: + + # gzip -d < /remote_path/DEV.bdsync.gz | bdsync --patch=/dev/DSTDEV + +我推荐在使用真实数据部署Bdsync前,使用一些(没有任何重要数据)小分区来做这些测试。在你完全弄懂整个设置是如何工作之后,你可以开始备份真实数据。 + +### 尾声 ### + +小结之,我们演示了如何使用Bdsync来为LUKS设备实施增量备份。和rsync一样,每次备份只有一小部分数据,而不是整个LUKS设备,需要被推送到非现场备份点,这样会节省带宽和备份时间。剩下来,需要保证所有数据传输通过SSH或SCP加固安全,事实上设备自身是由LUKS加密的。也可以通过使用可以运行bdsync的专用用户(而非root)来改善该配置。我们也可以将bdsync用于任何块设备,如LVM卷或RAID磁盘,也可以很轻易地设置Bdsync备份本地磁盘到USB驱动器上。如你所见,它有着无限可能性! + +随时分享你的想法。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/remote-incremental-backup-luks-encrypted-disk-partition.html + +作者:[Iulian Murgulet][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/iulian +[1]:http://xmodulo.com/go/digitalocean +[2]:http://xmodulo.com/how-to-create-encrypted-disk-partition-on-linux.html +[3]:http://bdsync.rolf-fokkens.nl/ +[4]:http://xmodulo.com/recommend/linuxbook +[5]:http://xmodulo.com/how-to-enable-ssh-login-without.html From ebc81d816b71c6daeb5920d0c59008d667d98360 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Mon, 15 Jun 2015 10:52:46 +0800 Subject: [PATCH 1177/2517] translated wi-cuckoo --- ...che Containers with Docker on Fedora 22.md | 283 ------------------ ...che Containers with Docker on Fedora 22.md | 279 +++++++++++++++++ 2 files changed, 279 insertions(+), 283 deletions(-) delete mode 100644 sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md create mode 100644 translated/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md diff --git a/sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md b/sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md deleted file mode 100644 index 66bd27fbc5..0000000000 --- a/sources/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md +++ /dev/null @@ -1,283 +0,0 @@ -translating wi-cuckoo -How to Configure Apache Containers with Docker on Fedora 22 -================================================================================ -In this article we are going to learn about Docker, how to use it to deploy Apache httpd and how can you share it on Docker Hub. First we are going to learn how to pull and use images hosted on Docker Hub, and then install Apache on an image of Fedora 22 interactively, after that we are going to learn how to use a Dockerfile to make an image in a faster and more elegant way, finally we are going to publish the image we've created in Docker Hub, so anyone will be able download and use it later. - -### Installing Docker and saying hello world ### - -**Requirements** - -You will need atleast these things to run Docker: - -- You need a 64bit Kernel version 3.10 or higher -- Iptables 1.4 - This will be used by Docker to make the network wizardry, such as Network Address Translation. -- Git 1.7 - Docker uses Git to make it transactions to repositories, like Docker Hub -- ps - This utility is present in most environments and is provided in the procps package. -- root - despite normal users can run docker client by TCP and other means, we will assume that you are root, for sake of simplicity - -#### Install docker using dnf #### - -The following commands will install Docker - - dnf update && dnf install docker - -**Note**: You can still use Yum in Fedora 22, but it's deprecated in favor of DNF and is not present in a clean install. - -#### Check your install #### - -The first command we are going to use is docker info, this give you many information: - - docker info - -Also try **docker version**: - - docker version - -#### Starting Docker as daemon #### - -You should start a docker instance that will take care of our requests. - - docker -d - -Now set docker to start with the system, so you don't need to run the previous command every time you reboot. - - chkconfig docker on - -Let's say hello world with Busybox: - - docker run -t busybox /bin/echo "hello world" - -In this command, we tell Docker to execute /bin/echo "hello world" in an instance/container of the Busybox image, which is a minimal POSIX environment based in a single binary and links to it. - -If Docker can't find a local image of Busybox on your system, it will pull the image automatically from Docker Hub, as you can see in the following screenshot: - -![Hello world with Busybox](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-hello-world-busybox-complete.png) - -Hello world with Busybox - -Try the same command again, this time as Docker already have the Busybox image locally, all you will see is the output of echo: - - docker run -t busybox /bin/echo "hello world" - -Try also the following to enter in the container environment: - - docker run -it busybox /bin/sh - -To leave and stop the container use the **exit** command - -### Dockerizing Apache interactively ### - -Pull/Download the Fedora image: - - docker pull fedora:22 - -Run a container dettached from the console: - - docker run -d -t fedora:22 /bin/bash - -List running containers and identify by name as follows - - docker ps - -![listing with docker ps and attaching with docker attach](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-ps-with-docker-attach-highlight.png) - -listing with docker ps and attaching with docker attach - -The name angry_nobel was given to our instance, so let's attach: - - docker attach angry_nobel - -Note: Every time you run a container a new name will be given, if you need a constant name for you container you should use the -name parameter to docker run command. - -#### Installing Apache #### - -The following command will update DNF database, download install Apache (httpd package) and clean DNF cache to make the image small - - dnf -y update && dnf -y install httpd && dnf -y clean all - -Configuring Apache - -The only thing we are going to change httpd.conf is the ServerName, this makes Apache stops to complain. - - sed -i.orig 's/#ServerName/ServerName/' /etc/httpd/conf/httpd.conf - -**Set the environment** - -To make Apache run in standalone mode, you must provide some information in the form of enviroenment variables, and also you will need the directories set in these variables, so we are going to make this with a small shell script that will also start Apache - - vi /etc/httpd/run_apache_foreground - ----------- - - #!/bin/bash - - #set variables - APACHE_LOG_DI=R"/var/log/httpd" - APACHE_LOCK_DIR="/var/lock/httpd" - APACHE_RUN_USER="apache" - APACHE_RUN_GROUP="apache" - APACHE_PID_FILE="/var/run/httpd/httpd.pid" - APACHE_RUN_DIR="/var/run/httpd" - - #create directories if necessary - if ! [ -d /var/run/httpd ]; then mkdir /var/run/httpd;fi - if ! [ -d /var/log/httpd ]; then mkdir /var/log/httpd;fi - if ! [ -d /var/lock/httpd ]; then mkdir /var/lock/httpd;fi - - #run Apache - httpd -D FOREGROUND - -**Alternatively**, you can past and run this snippet on the container shell: - - dnf -y install git && git clone https://github.com/gaiada/run-apache-foreground.git && cd run-apach* && ./install && dnf erase git - -The inline script above will, install Git, clone [this repository][1], put the script in place and ask you if you want uninstall Git. - -**Saving your container state** - -Your container is now ready to run Apache, now it is time to save the current state of this container in an image to be able use whenever you need. - -To leave the container environment, you must press **Ctrl+p** followed by **Ctrl+q**, if you just call exit in the shell, you will also stop the container and lost what you have done so far. - -Once you are back to the Docker host, use **docker commit** followed by the container and the repository name/tag you desire: - - docker commit angry_nobel gaiada/apache - -Now that you saved the container status into a image, you can use **docker stop** on the running container: - - docker stop angry_nobel - -**Run and test your image** - -Finally, run a container from your new image and redirect connections on port 80 to it with: - - docker run -p 80:80 -d -t gaiada/apache /etc/httpd/run_apache_foreground - - - -At this point, you are already running Apache in your container, open your browser to access the service in [http://localhost][2] and you will see the Apache default page as follows - -![Apache default page running from Docker container](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-apache-running.png) - -Apache default page running from Docker container - -### Dockerizing Apache with a Dockerfile ### - -Now we are going to create a new Apache image, this time the steps will be written in a Dockerfile, that will be processed to form the image. - -First, create a directory on which we will put the Dockerfile and enter this directory: - - mkdir apachedf; cd apachedf - -And then create a file named Dockerfile with the following content: - - FROM fedora:22 - - MAINTAINER Carlos Alberto - LABEL version="0.1" - - RUN dnf -y update && dnf -y install httpd && dnf -y clean all - - RUN [ -d /var/log/httpd ] || mkdir /var/log/httpd - RUN [ -d /var/run/httpd ] || mkdir /var/run/httpd - RUN [ -d /var/lock/httpd ] || mkdir /var/lock/httpd - - RUN sed -i.orig 's/#ServerName/ServerName/' /etc/httpd/conf/httpd.conf - - ENV APACHE_RUN_USER apache - ENV APACHE_RUN_GROUP apache - ENV APACHE_LOG_DIR /var/log/httpd - ENV APACHE_LOCK_DIR /var/lock/httpd - ENV APACHE_RUN_DIR /var/run/httpd - ENV APACHE_PID_FILE /var/run/httpd/httpd.pid - - EXPOSE 80 - - CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"] - - - -Let's see what is on this Dockerfile: - -**FROM** - This tells docker that we are going to use Fedora 22 as base image - -**MANTAINER** and **LABEL** - these commands are informative and have no direct influence on the image - -**RUN** - Automate the steps we've done interactively, install Apache, create directories and edit httpd.conf - -**ENV** - Set the environment variables, now we don't need the run_apache_foreground script anymore. - -**EXPOSE** - Expose the port 80 to the world - -**CMD** - Set the default command to httpd, so we don't need to do this every time we start a new container - -**Build the image** - -Now we are going to build the image and put the TAG gaiada/apachedf on it: - - docker build -t gaiada/apachedf:0.1 . - -![docker build complete](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-build-complete.png) - -docker build complete - -Use **docker images** list the local images and see if your new image is there: - - docker images - -And then run you new image: - - docker run -t -p 80:80 gaiada/apachedf - -That is it for the Dockerfile, using this feature make things much easier, faster and reproducible. - -### Publishing your images ### - -Until now, you just pulled images from Docker Hub, but you can also push you image and pull them later as needed. In fact other can also download your image and use it in their systems without the need of change anything and now we are going to learn how to make our image available for others worldwide. - -**Creating account** - -For you to be able to push your image on Docker Hub, you need to create an account. Access [https://hub.docker.com/account/signup/][3] and fill the following form: - -![Docker Hub signup page](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-hub-signup.png) - -Docker Hub signup page - -**Login** - -Enter the following command and proceed with the login name, password and email you provided in your account creation - - docker login - -After you do the first login, your account information will be recorded in **~/.dockercfg** - -**Pushing** - -Push the page to the server with the **docker push [registry/]your_login/repository_name[:tag]** - - docker push docker.io/gaiada/apachedf - -You might see something like this on your console: - -![Docker push Apache image complete](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-pushing-apachedf-complete.png) - -Docker push Apache image complete - -### Conclusion ### - -Now that you know how to Dockerize Apache, try to include some modules, Perl, PHP, proxy, HTTPS, or whatever you need. I hope you guys liked it, and push your own images on Docker Hub. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/configure-apache-containers-docker-fedora-22/ - -作者:[Carlos Alberto][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/carlosal/ -[1]:https://github.com/gaiada/run-apache-foreground -[2]:http://localhost/ -[3]:https://hub.docker.com/account/signup/ diff --git a/translated/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md b/translated/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md new file mode 100644 index 0000000000..9665855542 --- /dev/null +++ b/translated/tech/20150612 How to Configure Apache Containers with Docker on Fedora 22.md @@ -0,0 +1,279 @@ +如何在Fedora 22上面配置Apache的Docker容器 +============================================================================= +在这篇文章中,我们将会学习关于Docker的一些知识,如何使用Docker部署Apache httpd服务,并且共享到Docker Hub上面去。首先,我们学习怎样拉取和使用Docker Hub里面的镜像,然后交互式地安装Apache到一个Fedora 22的镜像里去,之后我们将会学习如何用一个Dockerfile文件来制作一个镜像,以一种更快,更优雅的方式。最后,我们会在Docker Hub上公开我们创建地镜像,这样以后任何人都可以下载并使用它。 + +### 安装Docker,运行hello world ### + +**要求** + +运行Docker,里至少需要满足这些: + +- 你需要一个64位的内核,版本3.10或者更高 +- Iptables 1.4 - Docker会用来做网络配置,如网络地址转换(NAT) +- Git 1.7 - Docker会使用Git来与仓库交流,如Docker Hub +- ps - 在大多数环境中这个工具都存在,在procps包里有提供 +- root - 防止一般用户可以通过TCP或者其他方式运行Docker,为了简化,我们会假定你就是root + +### 使用dnf安装docker ### + +以下的命令会安装Docker + + dnf update && dnf install docker + +**注意**:在Fedora 22里,你仍然可以使用Yum命令,但是被DNF取代了,而且在纯净安装时不可用了。 + +### 检查安装 ### + +我们将要使用的第一个命令是docker info,这会输出很多信息给你: + + docker info + +也可以试着用**docker version**: + + docker version + +### 启动Dcoker为守护进程 ### + +你应该启动一个docker实例,然后她会处理我们的请求。 + + docker -d + +让我们用Busybox来打印hello world: + + dockr run -t busybox /bin/echo "hello world" + +这个命令里,我们告诉Docker执行 /bin/echo "hello world",在Busybox镜像的一个实例/容器里。Busybox是一个小型的POSIX环境,将许多小工具都结合到了一个单独的可执行程序里。 + +如果Docker不能在你的系统里找到本地的Busybox镜像,她就会自动从Docker Hub里拉取镜像,正如你可以看下如下的快照: + +![Hello world with Busybox](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-hello-world-busybox-complete.png) + +Hello world with Busybox + +再次尝试相同的命令,这次由于Docker已经有了本地的Busybox镜像,所有你将会看到的就是echo的输出: + + docker run -t busybox /bin/echo "hello world" + +也可以尝试以下的命令进入到容器环境里去: + + docker run -it busybox /bin/sh + +使用**exit**命令可以离开容器并停止它 + +### 交互式地Docker化Apache ### + +拉取/下载 Fedora 镜像: + + docker pull fedora:22 + +起一个容器在后台运行: + + docker run -d -t fedora:22 /bin/bash + +列出正在运行地容器,并用名字标识,如下 + + docker ps + +![listing with docker ps and attaching with docker attach](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-ps-with-docker-attach-highlight.png) + +使用docker ps列出,并使用docker attach进入一个容器里 + +angry_noble是docker分配给我们容器的名字,所以我们来附上去: + + docker attach angry_noble + +注意:每次你起一个容器,就会被给与一个新的名字,如果你的容器需要一个固定的名字,你应该在 docker run 命令里使用 -name 参数。 + +### 安装Apache ### + +下面的命令会更新DNF的数据库,下载安装Apache(httpd包)并清理dnf缓存使镜像尽量小 + + dnf -y update && dnf -y install httpd && dnf -y clean all + +配置Apache + +我们需要修改httpd.conf的唯一地方就是ServerName,这会使Apache停止抱怨 + + sed -i.orig 's/#ServerName/ServerName/' /etc/httpd/conf/httpd.conf + +**设定环境** + +为了使Apache运行为单机模式,你必须以环境变量的格式提供一些信息,并且你也需要在这些变量里的目录设定,所以我们将会用一个小的shell脚本干这个工作,当然也会启动Apache + + vi /etc/httpd/run_apache_foreground + +---------- + + #!/bin/bash + + #set variables + APACHE_LOG_DI=R"/var/log/httpd" + APACHE_LOCK_DIR="/var/lock/httpd" + APACHE_RUN_USER="apache" + APACHE_RUN_GROUP="apache" + APACHE_PID_FILE="/var/run/httpd/httpd.pid" + APACHE_RUN_DIR="/var/run/httpd" + + #create directories if necessary + if ! [ -d /var/run/httpd ]; then mkdir /var/run/httpd;fi + if ! [ -d /var/log/httpd ]; then mkdir /var/log/httpd;fi + if ! [ -d /var/lock/httpd ]; then mkdir /var/lock/httpd;fi + + #run Apache + httpd -D FOREGROUND + +**另外地**,你可以粘贴这个片段代码到容器shell里并运行: + + dnf -y install git && git clone https://github.com/gaiada/run-apache-foreground.git && cd run-apach* && ./install && dnf erase git + +上面的内嵌脚本会安装Git,克隆[这个仓库][1],到文件里去运行脚本,并询问你是否卸载Git。 + +**保存你的容器状态** + +你的容器现在可以运行Apache,是时候保存容器当前的状态为一个镜像,以备你需要的时候使用。 + +为了离开容器环境,你必须顺序按下 **Ctrl+q** 和 **Ctrl+p**,如果你仅仅在shell执行exit,你同时也会停止容器,失去目前为止你做过的所有工作。 + +回到Docker主机,使用 **docker commit** 加容器和你期望的仓库名字/标签: + + docker commit angry_noble gaiada/apache + +现在,你保存了容器的状态到一个镜像里,可以使用 **docker stop** 停止容器了: + + docker stop angry_noble + +**运行并测试你的镜像** + +最后,从你的新镜像起一个容器,并且重定向80端口到容器: + + docker run -p 80:80 -d -t gaiada/apache /etc/httpd/run_apache_foreground + + + +到目前,你正在你的容器里运行Apache,打开你的浏览器访问该服务,在[http://localhost][2],你将会看到如下Apache默认的页面 + +![Apache default page running from Docker container](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-apache-running.png) + +在容器里运行的Apache默认页面 + +### 使用Dockerfile Docker化Apache ### + +现在,我们将要去创建一个新的Apache镜像,这次所有步骤会写在一个Dockerfile文件里,文件将会被用于生成该镜像。 + +首先,新建一个目录,在里面放Dockerfile文件,并进入该目录: + + mkdir apachedf; cd apachedf + +然后创建一个名为Dockerfile的文件,添加以下内容: + + FROM fedora:22 + + MAINTAINER Carlos Alberto + LABEL version="0.1" + + RUN dnf -y update && dnf -y install httpd && dnf -y clean all + + RUN [ -d /var/log/httpd ] || mkdir /var/log/httpd + RUN [ -d /var/run/httpd ] || mkdir /var/run/httpd + RUN [ -d /var/lock/httpd ] || mkdir /var/lock/httpd + + RUN sed -i.orig 's/#ServerName/ServerName/' /etc/httpd/conf/httpd.conf + + ENV APACHE_RUN_USER apache + ENV APACHE_RUN_GROUP apache + ENV APACHE_LOG_DIR /var/log/httpd + ENV APACHE_LOCK_DIR /var/lock/httpd + ENV APACHE_RUN_DIR /var/run/httpd + ENV APACHE_PID_FILE /var/run/httpd/httpd.pid + + EXPOSE 80 + + CMD ["/usr/sbin/httpd", "-D", "FOREGROUND"] + + + +我们一起来看看Dockerfile里面有什么: + +**FROM** - 这告诉docker,我们将要使用Fedora 22作为基础镜像 + +**MAINTAINER** 和 **LABLE** - 这些命令对镜像没有直接作用,属于标记信息 + +**RUN** - 自动完成我们之前交互式做的工作,安装Apache,新建目录并编辑httpd.conf + +**ENV** - 设置环境变量,现在我们再不需要run_apache_foreground脚本 + +**EXPOSE** - 暴露80端口给外网 + +**CMD** - 设置默认的命令启动httpd服务,这样我们就不需要每次起一个新的容器都重复这个工作 + +**建立该镜像** + +现在,我们将要建立这个镜像,并为其添加tag gaiada/apachedf + + docker build -t gaiada/apachedf:0.1 . + +![docker build complete](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-build-complete.png) + +docker完成创建 + +使用 **docker images** 列出本地镜像,查看是否存在你新建的镜像: + + docker images + +然后运行新的镜像: + + docker run -t -p 80:80 gaiada/apachedf + +这就是Dockerfile的工作,使用这项功能会使得事情更加容易,快速并且可重复生成。 + +### 公开你的镜像 ### + +直到现在,你仅仅是从Docker Hub拉取了镜像,但是你也可以推送你的镜像,以后需要也可以再次拉取他们。实际上,其他人也可以下载你的镜像,在他们的系统中使用它而不需要改变任何东西。现在我们将要学习如何使我们的镜像对世界上的其他人可用。 + +**创建帐号** + +为了能够在Docker Hub上推送你的镜像,你需要创建一个帐号。访问 [https://hub.docker.com/account/signup/][3],填写下面的表格: + +![Docker Hub signup page](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-hub-signup.png) + +Docker Hub 注册页面 + +**登录** + +输入下面的命令,接着输入你注册时提供的用户名,密码和邮箱 + + docker login + +第一次登录过后,你的帐号信息会被记录在 **~/.dockercfg** + +**推送** + +推送镜像,使用 **docker push [registry/]your_login/repository_name[:tag]** + + docker push docker.io/gaiada/apachedf + +你可能会看见像这样的输出,在你的控制台上: + +![Docker push Apache image complete](http://blog.linoxide.com/wp-content/uploads/2015/06/docker-pushing-apachedf-complete.png) + +Docker推送Apache镜像完成 + +### 结论 ### + +现在,你知道如何Docker化Apache,试一试包含其他一些组块,Perl,PHP,proxy,HTTPS,或者任何你需要的东西。我希望你们这些家伙喜欢她,并推送你们自己的镜像到Docker Hub。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/configure-apache-containers-docker-fedora-22/ + +作者:[Carlos Alberto][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/carlosal/ +[1]:https://github.com/gaiada/run-apache-foreground +[2]:http://localhost/ +[3]:https://hub.docker.com/account/signup/ + From effbcc0ecb43fdb6913ee24406c45ba67d70bbec Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 15 Jun 2015 15:08:49 +0800 Subject: [PATCH 1178/2517] Translating by ZTinoZ --- .../20150526 20 Useful Terminal Emulators for Linux.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 1b239a3904..82a8ff5aff 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -157,7 +157,7 @@ Konsole Terminal ### 11. TermKit ### -TermKit is a elegant terminal that aims to construct aspects of the GUI with the command line based application using WebKit rendering engine mostly used in web browsers like Google Chrome and Chromium. TermKit is originally designed for Mac and Windows, but due to TermKit fork by Floby which you can now able to install it under Linux based distributions and experience the power of TermKit. +TermKit是一款漂亮简洁的终端,其目标是用在Google Chrome和Chromium中广泛被使用的WebKit渲染引擎在基于应用程序的命令行中构建出GUI视图。TermKit起初是为Mac和Windows设计的,但是由于TermKit被Floby给fork并做了修改,现在你可以将它安装在Linux发行版上并感受TermKit带来的魅力。 ![TermKit Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/TermKit-Terminal.jpeg) @@ -167,7 +167,7 @@ TermKit Terminal ### 12. st ### -st is a simple terminal implementation for X Window. +st是一款简单的X Window终端实现接口。 ![st terminal](http://www.tecmint.com/wp-content/uploads/2014/01/st-terminal.png) @@ -177,9 +177,9 @@ st terminal ### 13. Gnome-Terminal ### -GNOME terminal is a built-in terminal emulator for GNOME desktop environment developed by Havoc Pennington and others. It allow users to run commands using a real Linux shell while remaining on the on the GNOME environment. GNOME Terminal emulates the xterm terminal emulator and brings a few similar features. +GNOME终端是一款在GNOME桌面环境下的嵌入式终端仿真器,由Havoc Pennington和其他一些人共同开发。它允许用户在GNOME环境下的同时使用一个真实的Linux shell来运行命令。GNOME终端是模拟的xterm终端仿真器并带来了一些相似的特性。 -The Gnome terminal supports multiple profiles, where users can able to create multiple profiles for his/her account and can customize configuration options such as fonts, colors, background image, behavior, etc. per account and define a name to each profile. It also supports mouse events, url detection, multiple tabs, etc. +Gnome终端支持多用户,用户可以为他们的账户创建多个用户,每个用户能自定义配置选项,如字体、颜色、背景图片、行为习惯等等并能分别给它们取名。它也支持鼠标事件、url探测、多标签等。 ![Gnome Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Gnome-terminal.jpg) From 1d88963ae6aba8d9d9b9c10d55dfd39f16701870 Mon Sep 17 00:00:00 2001 From: KS Date: Mon, 15 Jun 2015 15:09:58 +0800 Subject: [PATCH 1179/2517] Update 20150612 Inside NGINX--How We Designed for Performance and Scale.md --- ... Inside NGINX--How We Designed for Performance and Scale.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md b/sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md index 559d28996c..970144275f 100644 --- a/sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md +++ b/sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md @@ -1,3 +1,4 @@ +wyangsun 申领 Inside NGINX: How We Designed for Performance & Scale ================================================================================ NGINX leads the pack in web performance, and it’s all due to the way the software is designed. Whereas many web servers and application servers use a simple threaded or process-based architecture, NGINX stands out with a sophisticated event-driven architecture that enables it to scale to hundreds of thousands of concurrent connections on modern hardware. @@ -171,4 +172,4 @@ via: http://nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/ [12]:https://speakerdeck.com/nginx/nginx-installation-and-tuning [13]:http://nginx.com/blog/tuning-nginx/ [14]:http://www.aosabook.org/en/nginx.html -[15]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ \ No newline at end of file +[15]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ From 957ca2f001291eade1765802bccdfa664a17f05d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 15 Jun 2015 15:43:44 +0800 Subject: [PATCH 1180/2517] =?UTF-8?q?20150615-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...P at 20--From pet project to powerhouse.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sources/talk/20150615 PHP at 20--From pet project to powerhouse.md diff --git a/sources/talk/20150615 PHP at 20--From pet project to powerhouse.md b/sources/talk/20150615 PHP at 20--From pet project to powerhouse.md new file mode 100644 index 0000000000..610913c846 --- /dev/null +++ b/sources/talk/20150615 PHP at 20--From pet project to powerhouse.md @@ -0,0 +1,82 @@ +PHP at 20: From pet project to powerhouse +================================================================================ +![](http://images.techhive.com/images/article/2015/06/13049862325_8c97a11878_z-100590275-primary.idge.jpg) + +Credit: [Steve Jurvetson via Flickr][1] + +> The one-time ‘silly little project’ has transformed into a Web powerhouse, thanks to flexibility, pragmatism, and a vibrant community of Web devs + +When Rasmus Lerdorf released “[a set of small tight CGI binaries written in C][2],” he had no idea how much his creation would impact Web development. Delivering the opening keynote at this year’s SunshinePHP conference in Miami, Lerdorf quipped, “In 1995, I thought I had unleashed a C API upon the Web. Obviously, that’s not what happened, or we’d all be C programmers.” + +In fact, when Lerdorf released version 1.0 of Personal Home Page Tools -- as PHP was then known -- the Web was very young. HTML 2.0 would not be published until November of that year, and HTTP/1.0 not until May the following year. NCSA HTTPd was the most widely deployed Web server, and Netscape Navigator was the most popular Web browser, with Internet Explorer 1.0 to arrive in August. In other words, PHP’s beginnings coincided with the eve of the browser wars. + +Those early days speak volumes about PHP’s impact on Web development. Back then, our options were limited when it came to server-side processing for Web apps. PHP stepped in to fill our need for a tool that would enable us to do dynamic things on the Web. That practical flexibility captured our imaginations, and PHP has since grown up with the Web. Now powering [more than 80 percent of the Web][3], PHP has matured into a scripting language that is especially suited to solve the Web problem. Its unique pedigree tells a story of pragmatism over theory and problem solving over purity. + +### The Web glue we got hooked on ### + +PHP didn’t start out as a language, and this is clear from its design -- or lack thereof, as detractors point out. It began as an API to help Web developers access lower-level C libraries. The first version was a small CGI binary that provided form-processing functionality with access to request parameters and the mSQL database. And its facility with a Web app’s database would prove key in sparking our interest in PHP and PHP’s subsequent ascendancy. + +By version 2 -- aka PHP/FI -- database support had expanded to include PostgreSQL, MySQL, Oracle, Sybase, and more. It supported these databases by wrapping their C libraries, making them a part of the PHP binary. PHP/FI could also wrap the GD library to create and manipulate GIF images. It could be run as an Apache module or compiled with FastCGI support, and it introduced the PHP script language with support for variables, arrays, language constructs, and functions. For many of us working on the Web at that time, PHP was the kind of glue we'd been looking for. + +As PHP folded in more and more programming language features, morphing into version 3 and onward, it never lost this gluelike aspect. Through repositories like PECL (PHP Extension Community Library), PHP could tie together libraries and expose their functionality to the PHP layer. This capacity to bring together components became a significant facet of the beauty of PHP, though it was not limited to its source code. + +### The Web as a community of coders ### + +PHP’s lasting impact on Web development isn’t limited to what can be done with the language itself. How PHP work is done and who participates -- these too are important parts of PHP’s legacy. + +As early as 1997, PHP user groups began forming. One of the earliest was the Midwest PHP User’s Group (later known as Chicago PHP), which held its [first meeting in February 1997][4]. This was the beginning of what would become a vibrant, energetic community of developers assembled over an affinity for a little tool that helped them solve problems on the Web. The ubiquity of PHP made it a natural choice for Web development. It became especially popular in the shared hosting world, and its low barrier to entry was attractive to many early Web developers. + +With a growing community came an assortment of tools and resources for PHP developers. The year 2000 -- a watershed moment for PHP -- witnessed the first PHP Developers’ Meeting, a gathering of the core developers of the programming language, who met in Tel Aviv to discuss the forthcoming 4.0 release. PHP Extension and Application Repository (PEAR) also launched in 2000 to provide high-quality userland code packages following standards and best practices. The first PHP conference, PHP Kongress, was held in Germany soon after. [PHPDeveloper.org][5] came online, and to this day, it is the most authoritative news source in the PHP community. + +This communal momentum proved vital to PHP’s growth in subsequent years, and as the Web development industry erupted, so did PHP. PHP began powering more and larger websites. More user groups formed around the world. Mailing lists; online forums; IRC; conferences; trade journals such as php[architect], the German PHP Magazin, and International PHP Magazine -- the vibrancy of the PHP community had a significant impact on the way Web work would be done: collectively and openly, with an emphasis on code sharing. + +Then, 10 years ago, shortly after the release of PHP 5, an interesting thing happened in Web development that created a general shift in how the PHP community built libraries and applications: Ruby on Rails was released. + +### The rise of frameworks ### + +The Ruby on Rails framework for the Ruby programming language created an increased focus and attention on the MVC (model-view-controller) architectural pattern. The Mojavi PHP framework a few years prior had used this pattern, but the hype around Ruby on Rails is what firmly cemented MVC in the PHP frameworks that followed. Frameworks exploded in the PHP community, and frameworks have changed the way developers build PHP applications. + +Many important projects and developments have arisen, thanks to the proliferation of frameworks in the PHP community. The PHP [Framework Interoperability Group][6] formed in 2009 to aid in establishing coding standards, naming conventions, and best practices among frameworks. Codifying these standards and practices helped provide more interoperable software for developers using member projects’ code. This interoperability meant that each framework could be split into components and stand-alone libraries could be used together with monolithic frameworks. With interoperability came another important milestone: The Composer project was born in 2011. + +Inspired by Node.js’s NPM and Ruby’s Bundler, Composer has ushered in a new era of PHP application development, creating a PHP renaissance of sorts. It has encouraged interoperability between packages, standard naming conventions, adoption of coding standards, and increased test coverage. It is an essential tool in any modern PHP application. + +### The need for speed and innovation ### + +Today, the PHP community has a thriving ecosystem of applications and libraries. Some of the most widely installed PHP applications include WordPress, Drupal, Joomla, and MediaWiki. These applications power the Web presence of businesses of all sizes, from small mom-and-pop shops to sites like whitehouse.gov and Wikipedia. Six of the Alexa top 10 sites use PHP to serve billions of pages a day. As a result, PHP applications have been optimized for speed -- and much innovation has gone into PHP core to improve performance. + +In 2010, Facebook unveiled its HipHop for PHP source-to-source compiler, which translates PHP code into C++ code and compiles it into a single executable binary application. Facebook’s size and growth necessitated the move away from standard interpreted PHP code to a faster, optimized executable. However, Facebook wanted to continue using PHP for its ease of use and rapid development cycles. HipHop for PHP evolved into HHVM, a JIT (just-in-time) compilation-based execution engine for PHP, which included a new language based on PHP: [Hack][7]. + +Facebook’s innovations, as well as other VM projects, created competition at the engine level, leading to discussions about the future of the Zend Engine that still powers PHP’s core, as well as the question of a language specification. In 2014, a language specification project was created “to provide a complete and concise definition of the syntax and semantics of the PHP language,” making it possible for compiler projects to create interoperable PHP implementations. + +The next major version of PHP became a topic of intense debate, and a project known as phpng (next generation) was offered as an option to clean up, refactor, optimize, and improve the PHP code base, which also showed substantial improvements to the performance of real-world applications. After deciding to name the next major version “PHP 7,” due to a previous, unreleased PHP 6.0 version, the phpng branch was merged in, and plans were made to proceed with PHP 7, working in many of the language features offered by Hack, such as scalar and return type hinting. + +With the [first PHP 7 alpha release due out today][8] and benchmarks showing [performance as good as or better than that of HHVM][9] in many cases, PHP is keeping up with the pace of modern Web development needs. Likewise, the PHP-FIG continues to innovate and push frameworks and libraries to collaborate and cooperate -- most recently with the adoption of [PSR-7][10], which will change the way PHP projects handle HTTP. User groups, conferences, publications, and initiatives like [PHPMentoring.org][11] continue to advocate best practices, coding standards, and testing to the PHP developer community. + +PHP has seen the Web mature through various stages, and PHP has matured. Once a simple API wrapper around lower-level C libraries, PHP has become a full-fledged programming language in its own right. Its developer community is vibrant and helpful, priding themselves in pragmatism and welcoming newcomers. PHP has stood the test of time for 20 years, and current activity in the language and community is ensuring it will be a relevant and useful language for years to come. + +During his SunshinePHP keynote, Rasmus Lerdorf reflected, “Did I think I’d be here 20 years later talking about this silly little project I did? No, I didn’t.” + +Here’s to Lerdorf and the rest of the PHP community for transforming this “silly little project” into a lasting, powerful component of the Web today. + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2933858/php/php-at-20-from-pet-project-to-powerhouse.html + +作者:[Ben Ramsey][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Ben-Ramsey/ +[1]:https://www.flickr.com/photos/jurvetson/13049862325 +[2]:https://groups.google.com/d/msg/comp.infosystems.www.authoring.cgi/PyJ25gZ6z7A/M9FkTUVDfcwJ +[3]:http://w3techs.com/technologies/overview/programming_language/all +[4]:http://web.archive.org/web/20061215165756/http://chiphpug.php.net/mpug.htm +[5]:http://www.phpdeveloper.org/ +[6]:http://www.php-fig.org/ +[7]:http://www.infoworld.com/article/2610885/facebook-q-a--hack-brings-static-typing-to-php-world.html +[8]:https://wiki.php.net/todo/php70#timetable +[9]:http://talks.php.net/velocity15 +[10]:http://www.php-fig.org/psr/psr-7/ +[11]:http://phpmentoring.org/ \ No newline at end of file From 3d4e771f318899f20325eb7c7bb9e5ce6417534d Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 15 Jun 2015 15:45:13 +0800 Subject: [PATCH 1181/2517] PUB:20150518 Linux FAQs with Answers--How to view threads of a process on Linux @GOLinux --- ...-How to view threads of a process on Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md (72%) diff --git a/translated/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md b/published/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md similarity index 72% rename from translated/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md rename to published/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md index a91a2b3ed3..0011c66b1e 100644 --- a/translated/tech/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md +++ b/published/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md @@ -1,16 +1,16 @@ -Linux有问必答——Linux上如何查看某个进程的线程 +Linux有问必答:Linux上如何查看某个进程的线程 ================================================================================ -> **问题**: 我的程序创建并在它里头执行了多个线程,我怎样才能在该程序创建线程后监控其中单个线程?我想要看到带有它们名称的单个线程详细情况(如,CPU/内存使用率)。 +> **问题**: 我的程序在其内部创建并执行了多个线程,我怎样才能在该程序创建线程后监控其中单个线程?我想要看到带有它们名称的单个线程详细情况(如,CPU/内存使用率)。 -线程是现代操作系统上进行并行执行的一个流行的编程方面的抽象概念。当一个程序内有多个线程被叉分出用以执行多个流时,这些线程就会在它们之间共享特定的资源(如,内存地址空间、打开的文件),以使叉分开销最小化,并避免大量花销IPC(进程间通信)频道。这些功能让线程在并发执行时成为一个高效的机制。 +线程是现代操作系统上进行并行执行的一个流行的编程方面的抽象概念。当一个程序内有多个线程被叉分出用以执行多个流时,这些线程就会在它们之间共享特定的资源(如,内存地址空间、打开的文件),以使叉分开销最小化,并避免大量高成本的IPC(进程间通信)通道。这些功能让线程在并发执行时成为一个高效的机制。 -在Linux中,程序中创建的线程(也称为轻量级进程,LWP)会具有和程序的PID相同的“线程组ID”。然后,各个线程会获得其自身的线程ID(TID)。对于Linux内核调度器而言,线程不过是恰好共享特定资源的标准的进程。经典的命令行工具,如ps或top,都可以用来显示线程级别的信息,默认情况下它们会显示进程级别的信息。 +在Linux中,程序中创建的线程(也称为轻量级进程,LWP)会具有和程序的PID相同的“线程组ID”。然后,各个线程会获得其自身的线程ID(TID)。对于Linux内核调度器而言,线程不过是恰好共享特定资源的标准的进程而已。经典的命令行工具,如ps或top,都可以用来显示线程级别的信息,只是默认情况下它们显示进程级别的信息。 这里提供了**在Linux上显示某个进程的线程**的几种方式。 ### 方法一:PS ### -在ps命令中,“-T”选项可以开启线程查看。下面的命令列出了由进程号为的进程创建的所有线程。 +在ps命令中,“-T”选项可以开启线程查看。下面的命令列出了由进程号为\的进程创建的所有线程。 $ ps -T -p @@ -26,7 +26,7 @@ top命令可以实时显示各个线程情况。要在top输出中开启线程 ![](https://farm9.staticflickr.com/8824/17350561070_3dfe447974_c.jpg) -要让top输出某个特定进程并检查该进程内运行的线程状况: +要让top输出某个特定进程\并检查该进程内运行的线程状况: $ top -H -p @@ -36,7 +36,7 @@ top命令可以实时显示各个线程情况。要在top输出中开启线程 一个对用户更加友好的方式是,通过htop查看单个进程的线程,它是一个基于ncurses的交互进程查看器。该程序允许你在树状视图中监控单个独立线程。 -要在htop中启用线程查看,请开启htop,然后按来进入htop的设置菜单。选择“设置”栏下面的“显示选项”,然后开启“树状视图”和“显示自定义线程名”选项。按退出设置。 +要在htop中启用线程查看,请开启htop,然后按\来进入htop的设置菜单。选择“设置”栏下面的“显示选项”,然后开启“树状视图”和“显示自定义线程名”选项。按\退出设置。 ![](https://farm6.staticflickr.com/5338/17350364568_59bce22e7b_b.jpg) @@ -50,7 +50,7 @@ via: http://ask.xmodulo.com/view-threads-process-linux.html 作者:[Dan Nanni][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 92a639eeb95824bc53e0d52594c4ef9acb9601d9 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 15 Jun 2015 15:58:21 +0800 Subject: [PATCH 1182/2517] PUB:20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop @ictlyh --- ...rs--How to install Unity Tweak Tool on Ubuntu desktop.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md (86%) diff --git a/translated/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md b/published/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md similarity index 86% rename from translated/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md rename to published/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md index def6860616..273d603c98 100644 --- a/translated/tech/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md +++ b/published/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md @@ -1,4 +1,4 @@ -Linux 有问必答--如何在桌面版 Ubuntu 中安装 Unity Tweak Tool +Linux 有问必答:如何在桌面版 Ubuntu 中安装 Unity Tweak Tool ================================================================================ > **问题**: 我试着给刚安装的桌面版 Ubuntu 自定制桌面。我想使用 Unity Tweak Tool。我怎样才能在 Ubuntu 上安装 Unity Tweak Tool 呢? @@ -6,7 +6,7 @@ Linux 有问必答--如何在桌面版 Ubuntu 中安装 Unity Tweak Tool ![](https://farm6.staticflickr.com/5463/17684020389_25dc7f0db2_b.jpg) -尽管 Unity Tweak Tool 是桌面版 Ubuntu 的重要工具,并没有在桌面版 Ubuntu 中预安装。为了能自定制 Unity 桌面,下面介绍一下如何在桌面版 Ubuntu 中安装 Unity Tweak Tool。 +尽管 Unity Tweak Tool 是桌面版 Ubuntu 的重要工具,但并没有在桌面版 Ubuntu 中预安装。为了能自定制 Unity 桌面,下面介绍一下如何在桌面版 Ubuntu 中安装 Unity Tweak Tool。 ### 在 Ubuntu 13.04 或更高版本中安装 Unity Tweak Tool ### @@ -34,7 +34,7 @@ via: http://ask.xmodulo.com/install-unity-tweak-tool-ubuntu-desktop.html 作者:[Dan Nanni][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From a471b5ddc790953e638069d9c324e9d2118432b0 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 15 Jun 2015 16:15:33 +0800 Subject: [PATCH 1183/2517] PUB:20150527 3 Useful Hacks Every Linux User Must Know @goreliu --- ...Useful Hacks Every Linux User Must Know.md | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150527 3 Useful Hacks Every Linux User Must Know.md (79%) diff --git a/translated/tech/20150527 3 Useful Hacks Every Linux User Must Know.md b/published/20150527 3 Useful Hacks Every Linux User Must Know.md similarity index 79% rename from translated/tech/20150527 3 Useful Hacks Every Linux User Must Know.md rename to published/20150527 3 Useful Hacks Every Linux User Must Know.md index 25c1ef3e3d..f4da7cf24b 100644 --- a/translated/tech/20150527 3 Useful Hacks Every Linux User Must Know.md +++ b/published/20150527 3 Useful Hacks Every Linux User Must Know.md @@ -1,9 +1,10 @@ -每个Linux用户都应该知道的3个有用技巧 +Linux 用户的 3 个命令行小技巧 ================================================================================ Linux世界充满了乐趣,我们越深入进去,就会发现越多有趣的事物。我们会努力给你提供一些小技巧,让你和其他人有所不同,下面就是我们准备的3个小技巧。 -### 1. 如何在不使用Cron的情况调度Linux下的作业 ### -在Linux下,调度一个作业/命令可以缩写为Cron。当我们需要调度一个作业时,我们会使用Cron,但你知道我们在不使用Cron的情况也可以调度一个在将来时间运行的作业吗?你可以按照如下建议操作…… +### 1. 如何在不使用Cron的情况调度Linux下的任务 ### + +在Linux下,调度一个任务/命令称之为Cron。当我们需要调度一个任务时,我们会使用Cron,但你知道我们在不使用Cron的情况也可以调度一个在将来时间运行的任务吗?你可以按照如下建议操作…… 每5秒钟运行一个命令(date)然后将结果写入到一个文件(data.txt)。为了实现这一点,我们可以直接在命令提示符运行如下单行脚本。 @@ -21,13 +22,13 @@ Linux世界充满了乐趣,我们越深入进去,就会发现越多有趣的 类似地,我们可以这样运行任何脚本。下边的例子是每100秒运行一个名为`script_name.sh`的脚本。 -另外值得一提的是上边的脚本文件必须处于当前目录中,否则需要使用完整路径(`/home/$USER/…/script_name.sh`)。实现如上功能的单行脚本如下: +另外值得一提的是上面提到的脚本文件必须处于当前目录中,否则需要使用完整路径(`/home/$USER/…/script_name.sh`)。实现如上功能的单行脚本如下: $ while true; do /bin/sh script_name.sh ; sleep 100 ; done & **总结**:上述的单行脚本并不是Cron的替代品,因为Cron工具支持众多选项,更加灵活,可定制性也更高。然而如果我们想运行某些测试,比如I/O评测,上述的单行脚本也管用。 -还可以参考:[11 Linux Cron Job Scheduling Examples][1] +还可以参考:[Linux 下 11 个定时调度任务例子][1] ### 2. 如何不使用clear命令清空终端的内容 ### @@ -37,23 +38,23 @@ Linux世界充满了乐趣,我们越深入进去,就会发现越多有趣的 **总结**:因为`ctrl + l`是一个快捷键,我们不可以在脚本中使用。所以如果我们需要在脚本中清空屏幕内容,还是需要使用`clear`命令。但我能想到的所有其他情况,`ctrl + l`都更加有效。 -### 3. 运行一个命令,然后自动回到当前的工作目录 ### +### 3. 在其它目录运行一个命令,然后自动返回当前工作目录 ### -这是一个很多人可能不知道的令人吃惊的技巧。你可能想运行任何一个命令,然后再回到当前目录。你只需要将命令放在一个圆括号里。 +这是一个很多人可能不知道的令人吃惊的技巧。你可能想在其它目录运行任何一个命令,然后再回到当前目录。要实现这样的目的,你只需要将命令放在一个圆括号里。 我们来看一个例子: avi@deb:~$ (cd /home/avi/Downloads/) -#### 示例输出 #### - - avi@deb:~ +示例输出: + + avi@deb:~ 它首先会cd到Downloads目录,然后又回到了之前的家目录。也许你认为里边的命令根本没有执行,或者是出了某种错误,因为从命令提示符看不出任何变化。让我们简单修改一下这个命令: avi@deb:~$ (cd /home/avi/Downloads/ && ls -l) - -#### 示例输出 #### + +示例输出: -rw-r----- 1 avi avi 54272 May 3 18:37 text1.txt -rw-r----- 1 avi avi 54272 May 3 18:37 text2.txt @@ -70,7 +71,7 @@ via: http://www.tecmint.com/useful-linux-hacks-commands/ 作者:[Avishek Kumar][a] 译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 1e2cd00a6919da648a8b5894506b427bab097263 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 15 Jun 2015 16:25:12 +0800 Subject: [PATCH 1184/2517] =?UTF-8?q?20150615-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...end Swap Space using Swap file in Linux.md | 73 +++++++ ...er On Ubuntu or CentOS 7.1 or Fedora 22.md | 191 ++++++++++++++++++ ...put Rainbow Of Colors in Linux Terminal.md | 176 ++++++++++++++++ ...0615 How to combine two graphs on Cacti.md | 91 +++++++++ 4 files changed, 531 insertions(+) create mode 100644 sources/tech/20150515 Extend Swap Space using Swap file in Linux.md create mode 100644 sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md create mode 100644 sources/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md create mode 100644 sources/tech/20150615 How to combine two graphs on Cacti.md diff --git a/sources/tech/20150515 Extend Swap Space using Swap file in Linux.md b/sources/tech/20150515 Extend Swap Space using Swap file in Linux.md new file mode 100644 index 0000000000..51b2f2fe55 --- /dev/null +++ b/sources/tech/20150515 Extend Swap Space using Swap file in Linux.md @@ -0,0 +1,73 @@ +Extend Swap Space using Swap file in Linux +================================================================================ +There are some scenarios where our Linux box is running out of swap space so in that case we can extend the swap space using swap partition but due to unavailability of free partitions on the disk, we are unable to extend it. + +So in such cases we can extend or increase swap space using a swap file + +### Below are the Steps to extend Swap Space using Swap File in Linux ### + +Lets first check the size of existing swap space / partition using the command like ‘**free -m‘** and ‘**swapon -s**‘ + +![](http://www.linuxtechi.com/wp-content/uploads/2015/06/free-output-with-swap.jpg) +free-output-with-swap + +In my case size of swap partition is 2 GB. So we will be extending swap space by 1 GB. + +#### Step:1 Create a swap file of size 1 GB using below dd Command #### + + [root@linuxtechi ~]# dd if=/dev/zero of=/swap_file bs=1G count=1 + 1+0 records in + 1+0 records out + 1073741824 bytes (1.1 GB) copied, 414.898 s, 2.6 MB/s + [root@linuxtechi ~]# + +Replace the value of ‘**bs**‘ and ‘**count**‘ according your requirement. + +#### Step:2 Secure the swap file with permissions 644. #### + + [root@linuxtechi ~]# chmod 600 /swap_file + +#### Step:3 Enable the Swap Area on the file (swap_file) #### + +Use mkswap command to enable swap area + + [root@linuxtechi ~]# mkswap /swap_file + Setting up swapspace version 1, size = 1048572 KiB + no label, UUID=f7b3ae59-c09a-4dc2-ba4d-c02abb7db33b + [root@linuxtechi ~]# + +#### Step:4 Add the swap file entry in the fstab file #### + +Add the below entry in the fstab file so that swap file become persistent across every reboot. + + /swap_file swap swap defaults 0 0 + +![swap-file-fstab-entry](http://www.linuxtechi.com/wp-content/uploads/2015/06/swap-file-fstab-entry.jpg) + +#### Step:5 Enable the swap file using ‘mkswap on’ command. #### + + [root@linuxtechi ~]# swapon /swap_file + [root@linuxtechi ~]# + +#### Step:6 Now verify the swap space #### + +![swap-space-after-extension](http://www.linuxtechi.com/wp-content/uploads/2015/06/swap-space-after-extension.jpg) + +**Note**: To disable the swap file for any troubleshooting point of view, use swapoff command as shown below and to re-enable swap file then use swapon command as shown in step5. + + [root@linuxtechi ~]# swapoff /swap_file + [root@linuxtechi ~]# + +Please share your valuable inputs and comments of this article. + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/extend-swap-space-using-swap-file-in-linux/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file diff --git a/sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md b/sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md new file mode 100644 index 0000000000..837a7a2e73 --- /dev/null +++ b/sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md @@ -0,0 +1,191 @@ +Install Plex Media Server On Ubuntu / CentOS 7.1 / Fedora 22 +================================================================================ +In this article we will show you how easily you can setup Plex Home Media Server on major Linux distributions with their latest releases. After its successful installation of Plex you will be able to use your centralized home media playback system that streams its media to many Plex player Apps and the Plex Home will allows you to setup your environment by adding your devices and to setup a group of users that all can use Plex Together. So let’s start its installation first on Ubuntu 15.04. + +### Basic System Resources ### + +System resources mainly depend on the type and number of devices that you are planning to connect with the server. So according to our requirements we will be using as following system resources and software for a standalone server. + +注:表格 + + + + + + + + + + + + + + + + + + + + + + +
Plex Home Media Server
Base Operating SystemUbuntu 15.04 / CentOS 7.1 / Fedora 22 Work Station
Plex Media ServerVersion 0.9.12.3.1173-937aac3
RAM and CPU1 GB  , 2.0 GHZ
Hard Disk30 GB
+ +### Plex Media Server 0.9.12.3 on Ubuntu 15.04 ### + +We are now ready to start the installations process of Plex Media Server on Ubuntu so let’s start with the following steps to get it ready. + +#### Step 1: System Update #### + +Login to your server with root privileges Make your that your system is upto date if not then do by using below command. + + root@ubuntu-15:~#apt-get update + +#### Step 2: Download the Latest Plex Media Server Package #### + +Create a new directory and download .deb plex Media Package in it from the official website of Plex for Ubuntu using wget command. + + root@ubuntu-15:~# cd /plex/ + root@ubuntu-15:/plex# + root@ubuntu-15:/plex# wget https://downloads.plex.tv/plex-media-server/0.9.12.3.1173-937aac3/plexmediaserver_0.9.12.3.1173-937aac3_amd64.deb + +#### Step 3: Install the Debian Package of Plex Media Server #### + +Now within the same directory run following command to start installation of debian package and then check the status of plekmediaserver. + + root@ubuntu-15:/plex# dpkg -i plexmediaserver_0.9.12.3.1173-937aac3_amd64.deb + +---------- + + root@ubuntu-15:~# service plexmediaserver status + +![Plexmediaserver Service](http://blog.linoxide.com/wp-content/uploads/2015/06/plex-status.png) + +### Plex Home Media Web App Setup on Ubuntu 15.04 ### + +Let's open your web browser within your localhost network and open the Web Interface with your localhost IP and port 32400 and do following steps to configure it: + + http://172.25.10.179:32400/web + http://localhost:32400/web + +#### Step 1:Sign UP before Login #### + +After you have access to the web interface of Plesk Media Server make sure to Sign Up and set your username email ID and Password to login as. + +![Plex Sign In](http://blog.linoxide.com/wp-content/uploads/2015/06/PMS-Login.png) + +#### Step 2: Enter Your Pin to Secure Your Plex Media Home User #### + +![Plex User Pin](http://blog.linoxide.com/wp-content/uploads/2015/06/333.png) + +Now you have successfully configured your user under Plex Home Media. + +![Welcome To Plex](http://blog.linoxide.com/wp-content/uploads/2015/06/3333.png) + +### Opening Plex Web App on Devices Other than Localhost Server ### + +As we have seen in our Plex media home page that it indicates that "You do not have permissions to access this server". Its because of we are on a different network than the Server computer. + +![Plex Server Permissions](http://blog.linoxide.com/wp-content/uploads/2015/06/33.png) + +Now we need to resolve this permissions issue so that we can have access to server on the devices other than the hosted server by doing following setup. + +### Setup SSH Tunnel for Windows System to access Linux Server ### + +First we need to set up a SSH tunnel so that we can access things as if they were local. This is only necessary for the initial setup. + +If you are using Windows as your local system and server on Linux then we can setup SSH-Tunneling using Putty as shown. + +![Plex SSH Tunnel](http://blog.linoxide.com/wp-content/uploads/2015/06/ssh-tunnel.png) + +**Once you have the SSH tunnel set up:** + +Open your Web browser window and type following URL in the address bar. + + http://localhost:8888/web + +The browser will connect to the server and load the Plex Web App with same functionality as on local. +Agree to the terms of Services and start + +![Agree to Plex term](http://blog.linoxide.com/wp-content/uploads/2015/06/5.png) + +Now a fully functional Plex Home Media Server is ready to add new media libraries, channels, playlists etc. + +![PMS Settings](http://blog.linoxide.com/wp-content/uploads/2015/06/8.png) + +### Plex Media Server 0.9.12.3 on CentOS 7.1 ### + +We will follow the same steps on CentOS-7.1 that we did for the installation of Plex Home Media Server on Ubuntu 15.04. + +So lets start with Plex Media Servers Package Installation. + +#### Step 1: Plex Media Server Installation #### + +To install Plex Media Server on centOS 7.1 we need to download the .rpm package from the official website of Plex. So we will use wget command to download .rpm package for this purpose in a new directory. + + [root@linux-tutorials ~]# cd /plex + [root@linux-tutorials plex]# wget https://downloads.plex.tv/plex-media-server/0.9.12.3.1173-937aac3/plexmediaserver-0.9.12.3.1173-937aac3.x86_64.rpm + +#### Step 2: Install .RPM Package #### + +After completion of complete download package we will install this package using rpm command within the same direcory where we installed the .rpm package. + + [root@linux-tutorials plex]# ls + plexmediaserver-0.9.12.3.1173-937aac3.x86_64.rpm + [root@linux-tutorials plex]# rpm -i plexmediaserver-0.9.12.3.1173-937aac3.x86_64.rpm + +#### Step 3: Start Plexmediaservice #### + +We have successfully installed Plex Media Server Now we just need to restart its service and then enable it permanently. + + [root@linux-tutorials plex]# systemctl start plexmediaserver.service + [root@linux-tutorials plex]# systemctl enable plexmediaserver.service + [root@linux-tutorials plex]# systemctl status plexmediaserver.service + +### Plex Home Media Web App Setup on CentOS-7.1 ### + +Now we just need to repeat all steps that we performed during the Web app setup of Ubuntu. +So let's Open a new window in your web browser and access the Plex Media Server Web app using localhost or IP or your Plex server. + + http://172.20.3.174:32400/web + http://localhost:32400/web + +Then to get full permissions on the server you need to repeat the steps to create the SSH-Tunnel. +After signing up with new user account we will be able to access its all features and can add new users, add new libraries and setup it per our needs. + +![Plex Device Centos](http://blog.linoxide.com/wp-content/uploads/2015/06/plex-devices-centos.png) + +### Plex Media Server 0.9.12.3 on Fedora 22 Work Station ### + +The Basic steps to download and install Plex Media Server are the same as its we did for in CentOS 7.1. +We just need to download its .rpm package and then install it with rpm command. + +![PMS Installation](http://blog.linoxide.com/wp-content/uploads/2015/06/plex-on-fedora.png) + +### Plex Home Media Web App Setup on Fedora 22 Work Station ### + +We had setup Plex Media Server on the same host so we don't need to setup SSH-Tunnel in this time scenario. Just open the web browser in your Fedora 22 Workstation with default port 32400 of Plex Home Media Server and accept the Plex Terms of Services Agreement. + +![Plex Agreement](http://blog.linoxide.com/wp-content/uploads/2015/06/Plex-Terms.png) + +**Welcome to Plex Home Media Server on Fedora 22 Workstation** + +Lets login with your plex account and start with adding your libraries for your favorite movie channels , create your playlists, add your photos and enjoy with many other features of Plex Home Media Server. + +![Plex Add Libraries](http://blog.linoxide.com/wp-content/uploads/2015/06/create-library.png) + +### Conclusion ### + +We had successfully installed and configured Plex Media Server on Major Linux Distributions. So, Plex Home Media Server has always been a best choice for media management. Its so simple to setup on cross platform as we did for Ubuntu, CentOS and Fedora. It has simplifies the tasks of organizing your media content and streaming to other computers and devices then to share it with your friends. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/install-plex-media-server-ubuntu-centos-7-1-fedora-22/ + +作者:[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/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md b/sources/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md new file mode 100644 index 0000000000..6b864db6cb --- /dev/null +++ b/sources/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md @@ -0,0 +1,176 @@ +Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal +================================================================================ +For those who believe that Linux Command Line is boring and there isn’t any fun, then you’re wrong here are the articles on Linux, that shows how funny and naughty is Linux.. + +- [20 Funny Commands of Linux or Linux is Fun in Terminal][1] +- [6 Interesting Funny Commands of Linux (Fun in Terminal)][2] +- [Fun in Linux Terminal – Play with Word and Character Counts][3] + +Here in this article, I will be discussing about a small utility called “lolcat” – Which produce rainbow of colors in terminal. + +![Lolcat Command to Output Rainbow of Colors for Terminal](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Lolcat.png) + +Lolcat Command to Output Rainbow of Colors for Terminal + +#### What is lolcat? #### + +Lolcat is an utility for Linux, BSD and OSX which concatenates like similar to [cat command][4] and adds rainbow coloring to it. Lolcat is primarily used for rainbow coloring of text in Linux Terminal. + +### Installation of Lolcat in Linux ### + +**1. Lolcat utility is available in the repository of lots of Linux distributions, but the available version bit older. Alternatively you can download and install latest version of lolcat from git repository.** + +Lolcat is a ruby gem hence it is essential to have latest version of RUBY installed on your system. + + # apt-get install ruby [On APT based Systems] + # yum install ruby [On Yum based Systems] + # dnf install ruby [On DNF based Systems] + +Once ruby package has been installed, make sure to verify the version of ruby installed. + + # ruby --version + + ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu] + +**2. Next download and install the most recent version of lolcat from the git repository using following commands.** + + # wget https://github.com/busyloop/lolcat/archive/master.zip + # unzip master.zip + # cd lolcat-master/bin + # gem install lolcat + +Once lolcat is installed, you can check the version. + + # lolcat --version + + lolcat 42.0.99 (c)2011 moe@busyloop.net + +### Usage of Lolcat ### + +**3. Before starting usage of lolcat, make sure to know the available options and help using following command.** + + # lolcat -h + +![Lolcat Help](http://www.tecmint.com/wp-content/uploads/2015/06/Lolcat-Help1.png) + +Lolcat Help + +**4. Next, pipeline lolcat with commads say ps, date and cal as:** + + # ps | lolcat + # date | lolcat + # cal | lolcat + +![ps Command Output](http://www.tecmint.com/wp-content/uploads/2015/06/ps-command-output.png) + +ps Command Output + +![Date Output](http://www.tecmint.com/wp-content/uploads/2015/06/Date.png) + +Date Output + +![Calendar Output](http://www.tecmint.com/wp-content/uploads/2015/06/Cal.png) + +Calendar Output + +**5. 3. Use lolcat to display codes of a script file as:** + + # lolcat test.sh + +![Display Codes with Lolcat](http://www.tecmint.com/wp-content/uploads/2015/06/Script-Output.png) + +Display Codes with Lolcat + +**6. Pipeline lolcat with figlet command. Figlet is a utility which displays large characters made up of ordinary screen characters. We can pipeline the output of figlet with lolcat to make the output colorful as:** + + # echo I ❤ Tecmint | lolcat + # figlet I Love Tecmint | lolcat + +![Colorful Texts](http://www.tecmint.com/wp-content/uploads/2015/06/Colorful-Text.png) + +Colorful Texts + +**Note**: Not to mention that ❤ is an unicode character and to install figlet you have to yum and apt to get the required packages as: + + # apt-get figlet + # yum install figlet + # dnf install figlet + +**7. Animate a text in rainbow of colours, as:** + + $ echo I ❤ Tecmit | lolcat -a -d 500 + +![Animated Text](http://www.tecmint.com/wp-content/uploads/2015/06/Animated-Text.gif) + +Animated Text + +Here the option -a is for Animation and -d is for duration. In the above example duration count is 500. + +**8. Read a man page (say man ls) in rainbow of colors as:** + + # man ls | lolcat + +![List Files Colorfully](http://www.tecmint.com/wp-content/uploads/2015/06/List-Files-Colorfully.png) + +List Files Colorfully + +**9. Pipeline lolcat with cowsay. cowsay is a configurable thinking and/or speaking cow, which supports a lot of other animals as well.** + +Install cowsay as: + + # apt-get cowsay + # yum install cowsay + # dnf install cowsay + +After install, print the list of all the animals in cowsay as: + + # cowsay -l + +**Sample Output** + + Cow files in /usr/share/cowsay/cows: + apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default + dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep + ghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koala + mech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheep + skeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkey + turtle tux unipony unipony-smaller vader vader-koala www + +Output of cowsay pipelined with lolcat and ‘gnu‘ cowfile is used. + + # cowsay -f gnu ☛ Tecmint ☚ is the best Linux Resource Available online | lolcat + +![Cowsay with Lolcat](http://www.tecmint.com/wp-content/uploads/2015/06/Cowsay-with-Lolcat.png) + +Cowsay with Lolcat + +**Note**: You can use lolcat with any other command in pipeline and get colored output in terminal. + +**10. You may create alias for the most frequently used commands to get command output in rainbow of colors. You can alias ‘ls -l‘ command which is used for long list the contents of directory as below.** + + # alias lolls="ls -l | lolcat" + # lolls + +![Alias Commands with Colorful](http://www.tecmint.com/wp-content/uploads/2015/06/Alias-Commands-with-Colorful.png) + +Alias Commands with Colorful + +You may create alias for any command as suggested above. To create permanent alias, you have to add the relevant code (above code for ls -l alias) to ~/.bashrc file and also make sure to logout and login back for the changes to be taken into effect. + +That’s all for now. I would like to know if you were aware of lolcat previously? Did you like the post? And suggestion and feedback is welcome in the comment section below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/lolcat-command-to-output-rainbow-of-colors-in-linux-terminal/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/20-funny-commands-of-linux-or-linux-is-fun-in-terminal/ +[2]:http://www.tecmint.com/linux-funny-commands/ +[3]:http://www.tecmint.com/play-with-word-and-character-counts-in-linux/ +[4]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ \ No newline at end of file diff --git a/sources/tech/20150615 How to combine two graphs on Cacti.md b/sources/tech/20150615 How to combine two graphs on Cacti.md new file mode 100644 index 0000000000..aeb2b2ea0c --- /dev/null +++ b/sources/tech/20150615 How to combine two graphs on Cacti.md @@ -0,0 +1,91 @@ +How to combine two graphs on Cacti +================================================================================ +[Cacti][1] a fantastic open source network monitoring system that is widely used to graph network elements like bandwidth, storage, processor and memory utilization. Using its web based interface, you can create and organize graphs easily. However, some advanced features like merging graphs, creating aggregate graphs using multiple sources, migration of Cacti to another server are not provided by default. You might need some experience with Cacti to pull these off. In this tutorial, we will see how we can merge two Cacti graphs into one. + +Consider this example. Client-A has been connected to port 5 of switch-A for the last six months. Port 5 becomes faulty, and so the client is migrated to Port 6. As Cacti uses different graphs for each interface/element, the bandwidth history of the client would be split into port 5 and port 6. So we end up with two graphs for one client - one with six months' worth of old data, and the other that contains ongoing data. + +In such cases, we can actually combine the two graphs so the old data is appended to the new graph, and we get to keep a single graph containing historic and new data for one customer. This tutorial will explain exactly how we can achieve that. + +Cacti stores the data of each graph in its own RRD (round robin database) file. When a graph is requested, the values stored in a corresponding RRD file are used to generate the graph. RRD files are stored in `/var/lib/cacti/rra` in Ubuntu/Debian systems and in `/var/www/cacti/rra` in CentOS/RHEL systems. + +The idea behind merging graphs is to alter these RRD files so the values from the old RRD file are appended to the new RRD file. + +### Scenario ### + +The services for a client is running on eth0 for over a year. Because of hardware failure, the client has been migrated to eth1 interface of another server. We want to graph the bandwidth of the new interface, while retaining the historic data for over a year. The client would see only one graph. + +### Identifying the RRD for the Graph ### + +The first step during graph merging is to identify the RRD file associated with a graph. We can check the file by opening the graph in debug mode. To do this, go to Cacti's menu: Console > Graph Management > Select Graph > Turn On Graph Debug Mode. + +#### Old graph: #### + +![](https://farm4.staticflickr.com/3853/18795518096_f50a78d082_c.jpg) + +#### New graph: #### + +![](https://farm4.staticflickr.com/3674/18634036918_5c4118c4b9_c.jpg) + +From the example output (which is based on a Debian system), we can identify the RRD files for two graphs: + +- **Old graph**: /var/lib/cacti/rra/old_graph_traffic_in_8.rrd +- **New graph**: /var/lib/cacti/rra/new_graph_traffic_in_10.rrd + +### Preparing a Script ### + +We will merge two RRD files using a [RRD splice script][2]. Download this PHP script, and install it as /var/lib/cacti/rra/rrdsplice.php (for Debian/Ubuntu) or /var/www/cacti/rra/rrdsplice.php (for CentOS/RHEL). + +Next, make sure that the file is owned by Apache user. + +On Debian or Ubuntu, run the following command: + + # chown www-data:www-data rrdsplice.php + +and update rrdsplice.php accordingly. Look for the following line: + + chown($finrrd, "apache"); + +and replace it with: + + chown($finrrd, "www-data"); + +On CentOS or RHEL, run the following command: + + # chown apache:apache rrdsplice.php + +### Merging Two Graphs ### + +The syntax usage of the script can easily be found by running it without any parameters. + + # cd /path/to/rrdsplice.php + # php rrdsplice.php + +---------- + + USAGE: rrdsplice.php --oldrrd=file --newrrd=file --finrrd=file + +Now we are ready to merge two RRD files. Simply supply the names of an old RRD file and a new RRD file. We will overwrite the merged result back to the new RRD file. + + # php rrdsplice.php --oldrrd=old_graph_traffic_in_8.rrd --newrrd=new_graph_traffic_in_10.rrd --finrrd=new_graph_traffic_in_10.rrd + +Now the data from the old RRD file should be appended to the new RRD. Any new data will continue to be written by Cacti to the new RRD file. If we click on the graph, we should be able to verify that the weekly, monthly and yearly records have also been added from the old graph. The second graph in the following diagram shows weekly records from the old graph. + +![](https://farm6.staticflickr.com/5493/18821787015_6730164068_b.jpg) + +To sum up, this tutorial showed how we can easily merge two Cacti graphs into one. This trick is useful when a service is migrated to another device/interface and we want to deal with only one graph instead of two. The script is very handy as it can join graphs regardless of the source device e.g., Cisco 1800 router and Cisco 2960 switch. + +Hope this helps. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/combine-two-graphs-cacti.html + +作者:[Sarmed Rahman][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/sarmed +[1]:http://xmodulo.com/install-configure-cacti-linux.html +[2]:http://svn.cacti.net/viewvc/developers/thewitness/rrdsplice/rrdsplice.php \ No newline at end of file From 721288a50f8917cea27708ad36dd0cda357904d6 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Mon, 15 Jun 2015 17:59:23 +0800 Subject: [PATCH 1185/2517] [translating] 20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux --- ... Filenames Having Spaces and Special Characters in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md b/sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md index 03bbb69005..31b28afd01 100644 --- a/sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md +++ b/sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md @@ -1,3 +1,4 @@ +zpl1025 How to Manipulate Filenames Having Spaces and Special Characters in Linux ================================================================================ We come across files and folders name very regularly. In most of the cases file/folder name are related to the content of the file/folder and starts with number and characters. Alpha-Numeric file name are pretty common and very widely used, but this is not the case when we have to deal with file/folder name that has special characters in them. @@ -432,4 +433,4 @@ via: http://www.tecmint.com/manage-linux-filenames-with-special-characters/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ -[2]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ \ No newline at end of file +[2]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ From 6b7ba41295f51879dc60552cf2a3a6fda1954321 Mon Sep 17 00:00:00 2001 From: Gore Liu Date: Mon, 15 Jun 2015 19:20:38 +0800 Subject: [PATCH 1186/2517] [Translated] 20150528 11 pointless but awesome Linux terminal tricks.md --- ...tless but awesome Linux terminal tricks.md | 108 ------------------ ...tless but awesome Linux terminal tricks.md | 104 +++++++++++++++++ 2 files changed, 104 insertions(+), 108 deletions(-) delete mode 100644 sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md create mode 100644 translated/tech/20150528 11 pointless but awesome Linux terminal tricks.md diff --git a/sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md b/sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md deleted file mode 100644 index 74baa5fb5b..0000000000 --- a/sources/tech/20150528 11 pointless but awesome Linux terminal tricks.md +++ /dev/null @@ -1,108 +0,0 @@ -Translating by goreliu ... - -11 pointless but awesome Linux terminal tricks -================================================================================ -Here are some great Linux terminal tips and tricks, each one as pointless as it is awesome. - -![](http://images.techhive.com/images/article/2015/05/slide_01-100587352-orig.png) - -### All work and no play... ### - -Linux is one of the most astoundingly functional and utilitarian Operating Systems around when it comes to working from the command line. Need to perform a particular task? Odds are there is an application or script you can use to get it done. Right from the terminal. But, as they say in the good book, "All work and no play make Jack really bored or something." So here is a collection of my favorite pointless, stupid, annoying or amusing things that you can do right in your Linux Terminal. - -![](http://images.techhive.com/images/article/2015/05/slide_02-100587353-orig.png) - -### Give the terminal an attitude ### - -Step 1) Type "sudo visudo". - -Step 2) At the bottom of the "Defaults" (near the top of the file) add, on a new line, "Defaults insults". - -Step 3) Save the file. - -"What did I just do to my computer?" you may be asking yourself. Something wonderful. Now, whenever you issue a sudo command and misstype your password, your computer will call you names. My favorite: "Listen, burrito brains, I don't have time to listen to this trash." - -![](http://images.techhive.com/images/article/2015/05/slide_03-100587354-orig.png) - -### apt-get moo ### - -That screenshot you see? That's what typing "apt-get moo" (on a Debian-based system) does. That's it. Don't go looking for this to do something fancy. It won't. That, I kid you not, is it. But it's one of the most commonly known little Easter eggs on Linux. So I include it here, right near the beginning, so I won't get 5,000 emails telling me I missed it in this list. - -![](http://images.techhive.com/images/article/2015/05/slide_04-100587355-orig.png) - -### aptitude moo ### - -A bit more entertaining is aptitude's take on "moo." Type "aptitude moo" (on Ubuntu and the like) and you'll be corrected about thinking "moo" would do anything. But you know better. Try the same command again, this time with an optional "-v" attribute. Don't stop there. Add v's, one at a time, until aptitude gives you what you want. - -![](http://images.techhive.com/images/article/2015/05/slide_05-100587356-orig.png) - -### Arch: Put Pac-Man in pacman ### - -This is one just for the Arch-lovers out there. The de facto package manager, pacman, is pretty fantastic already. Let's make it even better. - -Step 1) Open "/etc/pacman.conf". - -Step 2) In the "# Misc options", remove the "#" from in front of "Color". - -Step 3) Add "ILoveCandy". - -Now the progress for installing new packages, in pacman, will include a little tiny Pac-Man. Which should really just be the default anyway. - -![](http://images.techhive.com/images/article/2015/05/slide_06-100587358-orig.png) - -### Cowsay! ### - -Making aptitude moo is neat, I guess, but you really can't use it for much. Enter "cowsay." It does what you think. You make a cow say things. Anything you like. And it's not even limited to cows. Calvin, Beavis, and the Ghostbusters logo are all available in full ASCII art glory – type "cowsay -l" for a full list of what's available in this, Linux's most powerful tool. Remember that, like most great terminal applications, you can pipe the output from other applications straight into cowsay (ala "fortune | cowsay"). - -![](http://images.techhive.com/images/article/2015/05/slide_07-100587359-orig.png) - -### Become an 3l33t h@x0r ### - -Typing "nmap" isn't something one typically needs to do on a day-to-day basis. But when one does need to "whip out the nmap," one wants to look as l33t as humanly possible. Add a "-oS" to any nmap command (such as "nmap -oS - google.com"). Bam. You're now in what is officially known as "[Script Kiddie Mode][1]." Angelina Jolie and Keanu Reeves would be proud. - -![](http://images.techhive.com/images/article/2015/05/slide_08-100587360-orig.png) - -### Getting all Discordian ddate ### - -If you've ever been sitting around thinking, "Hey! I want today's date to be written in an essentially useless, but whimsical, way"…try typing "ddate". Results like "Today is Setting Orange, the 72nd day of Discord in the YOLD 3181," can really spice up your server logs. - -Note: Technically, this is a real thing called the [Discordian Calendar][2], used (in theory) by the followers of [Discordianism][3]. Which means I probably offended somebody. Or maybe not. I'm not really sure. Either way, ddate is a handy tool in any office. - -![](http://images.techhive.com/images/article/2015/05/slide_09-100587361-orig.png) - -### I See Colors Everywhere! ### - -Tired of boring old text? Looking to spruce things up and show the world your true style? lolcat. Install it. Use it. Everywhere. It takes any text input and turns it into a rainbow of wonder and enchantment. Piping text into lolcat (ala "fortune | lolcat") is sure to liven up any party. - -![](http://images.techhive.com/images/article/2015/05/slide_10-100587362-orig.png) - -### The Steam Locomotive ### - -Animated ASCII art steam locomotive in your terminal. You want this. You need this. Install and run "sl". Use "sl -l" for a tiny version. Or, if you want to really spend some time on this, "sl-h". This is the full train, including passenger cars. - -![](http://images.techhive.com/images/article/2015/05/slide_11-100587364-orig.png) - -### Reverse any text ### - -Pipe the output of any text into "rev" and it will reverse the text. "fortune | rev" gives you a fortune. In reverse. Which is, as odd as it may seem, not a misfortune. - -![](http://images.techhive.com/images/article/2015/05/slide_12-100587366-orig.png) - -### The Matrix is still cool, right? ### - -Want your terminal to do that scrolling text, l33t, Matrix-y thing? "cmatrix" is your friend. You can even have it output different colors, which is snazzy. Learn how by typing "man cmatrix". Or, better yet, "man cmatrix | lolcat". Which, really, is the most pointless (but wonderful) thing you can do in the Linux Terminal. So that's where I leave you. - --------------------------------------------------------------------------------- - -via: http://www.networkworld.com/article/2926630/linux/11-pointless-but-awesome-linux-terminal-tricks.html - -作者:[Bryan Lunduke][a] -译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.networkworld.com/author/Bryan-Lunduke/ -[1]:http://nmap.org/book/output-formats-script-kiddie.html -[2]:http://en.wikipedia.org/wiki/Discordian_calendar -[3]:http://en.wikipedia.org/wiki/Discordianism \ No newline at end of file diff --git a/translated/tech/20150528 11 pointless but awesome Linux terminal tricks.md b/translated/tech/20150528 11 pointless but awesome Linux terminal tricks.md new file mode 100644 index 0000000000..e4a33cf48a --- /dev/null +++ b/translated/tech/20150528 11 pointless but awesome Linux terminal tricks.md @@ -0,0 +1,104 @@ +11个让人惊叹的Linux终端彩蛋 +================================================================================ +这里有一些很酷的Linux终端彩蛋,其中的每一个看上去并没有实际用途,但很精彩。 + +![](http://images.techhive.com/images/article/2015/05/slide_01-100587352-orig.png) + +### 只工作不玩耍…… ### + +当我们使用命令行工作时,Linux是功能和实用性最好的操作系统之一。想要执行一个特殊任务?可能一个程序或者脚本就可以帮你搞定。但就像一本书中说到的,只工作不玩耍聪明的孩子也会变傻。下边是我最喜欢的可以在终端做的没有实际用途的、傻傻的、恼人的、可笑的事情。 + +### 给终端一个态度 ### + +* 第一步)敲入`sudo visudo` +* 第二步)在“Defaults”末尾(文件的前半部分)添加一行“Defaults insults”。 +* 第三步)保存文件。 + +“我刚才对电脑做了什么?”你可能这样问自己。一定是美妙的事情吧。现在,在sudo命令提示提示下输出错误的口令,你的电脑就会呼唤你的名字。我最喜欢的一句:“听好了,煎饼一样的脑子,我没有时间听你胡说八道了。” + +![](http://images.techhive.com/images/article/2015/05/slide_02-100587353-orig.png) + +### apt-get moo ### + +你看过这张截图?那就是运行`apt-get moo`(在基于Debian的系统)的结果。对,就是它了。不要对它抱太多幻想,你会失望的,我不骗你。但是这是Linux世界最被人熟知的彩蛋之一。所以我把它包含进来,并且放在前排,然后我也就不会收到5千封邮件,指责我把它遗漏了。 + +![](http://images.techhive.com/images/article/2015/05/slide_03-100587354-orig.png) + +### aptitude moo ### + +更有趣的是将moo应用到aptitude上。敲入`aptitude moo`(在Ubuntu及其衍生版),你对`moo`可以做什么事情的看法会有所变化。你还还会知道更多事情,尝试重新输入这条命令,但这次添加一个`-v`参数。这还没有结束,试着添加更多`v`,一次添加一个,直到aptitude给了你想要的东西。 + +![](http://images.techhive.com/images/article/2015/05/slide_04-100587355-orig.png) + +### Arch: 将吃豆人放入pacman ### + +这里有一个只为Arch爱好者准备的彩蛋。Pacman包管理工具已经很棒了,但我们可以让它变得更棒。 + +* 第一步)打开“/etc/pacman.conf”文件。 +* 第二步)在“# Misc options”部分,去掉“Color”前的“#”。 +* 第三步)添加“ILoveCandy”。 + +现在我们使用pacman安装新软件包时,进度条里会出现一个小吃豆人。真应该默认就是这样的。 + +![](http://images.techhive.com/images/article/2015/05/slide_05-100587356-orig.png) + +### Cowsay! ### + +`aptitude moo`的输出格式很漂亮,但我想你苦于不能自由自在地使用。输入`cowsay`,它会做到你想做的事情。你可以让牛说任何你喜欢的东西。而且不只可以用牛,还可以用Calvin、Beavis和Ghostbusters的ASCII logo——输入`cowsay -l`可以得到所有可用的logo。它是Linux世界的强大工具。像很多其他命令一样,你可以使用管道把其他程序的输出输送给它,比如`fortune | cowsay`。 + +![](http://images.techhive.com/images/article/2015/05/slide_06-100587358-orig.png) + +### 变成3l33t h@x0r ### + +`nmap`并不是我们平时经常使用的基本命令。但如果你想蹂躏`nmap`的话,可能想在它的输出中看到l33t。在任何`nmap`命令(比如`nmap -oS - google.com`)后添加`-oS`。现在你的`nmap`已经处于官方名称是“[Script Kiddie Mode][1]”的模式了。Angelina Jolie和Keanu Reeves会为此骄傲的。 + +![](http://images.techhive.com/images/article/2015/05/slide_07-100587359-orig.png) + +### 获得所有的Discordian日期 ### + +如果你们曾经坐在一起思考,“嗨!我想使用无用但异想天开的方式来书写今天的日期……”试试运行`ddate`。结果类似于“Today is Setting Orange, the 72nd day of Discord in the YOLD 3181”,这会让你的服务树日志平添不少香料。 + +注意:在技术层面,确实有一个[Discordian Calendar][2],理论上被[Discordianism][3]追随者所使用。这意味着我可能得罪某些人。或者不会,我不确定。不管怎样,`ddate`是一个方便的工具。 + +![](http://images.techhive.com/images/article/2015/05/slide_08-100587360-orig.png) + +### 我可以在任何地方看到颜色!### + +厌倦了老旧的文本?想向世界展示出自己的个性?使用`lolcat`。安装它,然后在任何地方使用。它可以接收任何文本,然后将其转换成美轮美奂的彩虹效果。可以使用`fortune | lolcat`体验。 + +![](http://images.techhive.com/images/article/2015/05/slide_09-100587361-orig.png) + +### 蒸汽机车 ### + +在你的终端显示蒸汽机车的ASCII图形。如果你需要它,安装并运行`sl`命令。`sl -l`可以看到一个袖珍版本的。或者,如果你真想在上边花费更多时间,运行`sl -h`。这会显示一个完整的或者,还包括乘客车厢。 + +![](http://images.techhive.com/images/article/2015/05/slide_10-100587362-orig.png) + +### 将任何文本逆序输出 ### + +将任何文本使用管道输送给`rev`命令,它就会将文本内容逆序输出。`fortune | rev`会给你好运。当然,这不意味着rev会将幸运转换成不幸。 + +![](http://images.techhive.com/images/article/2015/05/slide_11-100587364-orig.png) + +### Matrix依然很酷,不是吗? ### + +想让你的终端显示滚动的文字、l33t和Matrix电影中的坠落数码?`cmatrix`是你的朋友。你甚至可以用它输出不同的颜色,非常华丽。使用`man cmatrix`学习使用方法。或者使用更好的方法,“man cmatrix | lolcat”。这确实是你在Linux终端可以做的最没实际用途却又精彩的事情了。 + +![](http://images.techhive.com/images/article/2015/05/slide_12-100587366-orig.png) + +以上就是全部内容了。 + +-------------------------------------------------------------------------------- + +via: http://www.networkworld.com/article/2926630/linux/11-pointless-but-awesome-linux-terminal-tricks.html + +作者:[Bryan Lunduke][a] +译者:[goreliu](https://github.com/goreliu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.networkworld.com/author/Bryan-Lunduke/ +[1]:http://nmap.org/book/output-formats-script-kiddie.html +[2]:http://en.wikipedia.org/wiki/Discordian_calendar +[3]:http://en.wikipedia.org/wiki/Discordianism \ No newline at end of file From 818fbe4ab79d70b5f1e7ce40084a64f28052b71c Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 15 Jun 2015 21:01:38 +0800 Subject: [PATCH 1187/2517] =?UTF-8?q?=E8=BF=87=E6=9C=9F=E6=92=A4=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4 ​No reboot patching comes to Linux 4.0.md | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md diff --git a/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md b/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md deleted file mode 100644 index 6333fea9a7..0000000000 --- a/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md +++ /dev/null @@ -1,58 +0,0 @@ -​No reboot patching comes to Linux 4.0 -================================================================================ -> **Summary**:With the new Linux 4.0 kernel, you'll need to reboot Linux less often than ever. - -With [Linux 4.0][1], you may never need to reboot your operating system again. - -![Using Linux means never having to reboot. -- SUSE ](http://zdnet4.cbsistatic.com/hub/i/r/2015/03/02/5e766833-454b-45b5-a8f7-a55d21e9d26a/resize/270x270/4d0774552c342a1507784ef802619b71/livepatching.jpg) -Using Linux means never having to reboot. -- SUSE - -One reason to love Linux on your servers or in your data-center is that you so seldom needed to reboot it. True, critical patches require a reboot, but you could go months without rebooting. Now, with the latest changes to the Linux kernel you may be able to go years between reboots. - -This is actually a feature that was available in Linux in 2009 thanks to a program called [Ksplice][2]. This program compares the original and patched kernels and then uses a customized kernel module to patch the new code into the running kernel. Each Ksplice-enabled kernel comes with a special set of flags for each function that will be patched. The [Ksplice process][3] then watches for a moment when the code for the function being patched isn't in use, and ta-da, the patch is made and your server runs on. - -[Oracle acquired Ksplice][4] in 2011, and kept it just for its own [Oracle Linux][5], a [Red Hat Enterprise Linux (RHEL)][6] clone, and as a RHEL subscription service. That left all the other enterprise and server Linux back where they started. - -Then [KernelCare released a service that could provide bootless patches][7] for most enterprise Linux distros. This program use proprietary software and is only available as a service with a monthly fee. That was a long way from satisfying many Linux system administrators. - -So, [Red Hat][8] and [SUSE][9] both started working on their own purely open-source means of giving Linux the ability to keep running even while critical patches were being installed. Red Hat's program was named [kpatch][10], while SUSE' is named [kGraft][11]. - -The two companies took different approaches. Kpatch issues a stop_machine() command. After that it looks at the stack of existing processes using [ftrace][12] and, if the patch can be made safely, it redirects the running code to the patched functions and then removes the now outdated code. - -Kgraft also uses ftrace, but it works on the thread level. When an old function is called it makes sure the thread reaches a point that it can switch to the new function. - -While the end result is the same, the operating system keeps running while patches are made, there are significant differences in performance. Kpatch takes from one to forty milliseconds, while kGraft might take several minutes but there's never even a millisecond of down time. - -At the Linux Plumbers Conference in October 2014, the two groups got together and started work on a way to [patch Linux without rebooting that combines the best of both programs][13]. Essentially, what they ended up doing was putting both kpatch and kGraft in the 4.0 Linux kernel. - -Jiri Kosina, a SUSE software engineer and Linux kernel developer, explained, that live-patching in the Linux kernel will "provides a basic infrastructure for function "live patching" (i.e. code redirection), including API [application programming interface] for kernel modules containing the actual patches, and API/ABI [application binary interface] for userspace to be able to operate on the patches. This is "relatively simple and minimalistic, as it's making use of existing kernel infrastructure (namely ftrace) as much as possible. It's also self-contained, in a sense that it doesn't hook itself in any other kernel subsystem (it doesn't even touch any other code)." - -The release candidate for Linux 4.0 is now out. Kosina stated that "It's now implemented for x86 only as a reference architecture, but support for powerpc, s390 and arm is already in the works." And, indeed, the source code for these architectures is already in the [Live Patching Git code][14]. - -Simply having the code in there is just the start. Your Linux distribution will have to support it with patches that can make use of it. With both Red Hat and SUSE behind it, live patching will soon be the default in all serious business Linux distributions. - --------------------------------------------------------------------------------- - -via: http://www.zdnet.com/article/no-reboot-patching-comes-to-linux-4-0/#ftag=RSSbaffb68 - -作者:[Steven J. Vaughan-Nichols][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.zdnet.com/meet-the-team/us/sjvn/ -[1]:http://www.zdnet.com/article/linux-kernel-turns-over-release-odometer-to-4-0/ -[2]:http://www.computerworld.com/article/2466389/open-source-tools/never-reboot-again-with-linux-and-ksplice.html -[3]:http://www.ksplice.com/ -[4]:http://www.zdnet.com/article/oracle-acquires-zero-downtime-linux-upgrade-software/ -[5]:http://www.oracle.com/us/technologies/linux/overview/index.html -[6]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux -[7]:http://www.zdnet.com/article/kernelcare-new-no-reboot-linux-patching-system/ -[8]:http://www.redhat.com/ -[9]:http://www.suse.com/ -[10]:http://rhelblog.redhat.com/2014/02/26/kpatch/ -[11]:http://www.zdnet.com/article/suse-gets-live-patching/ -[12]:http://elinux.org/Ftrace -[13]:http://linuxplumbersconf.org/2014/wp-content/uploads/2014/10/LPC2014_LivePatching.txt -[14]:https://kernel.googlesource.com/pub/scm/linux/kernel/git/jikos/livepatching/+/9ec0de0ee0c9f0ffe4f72da9158194121cc22807 \ No newline at end of file From d4f9ac7ac4865e2ee49dddee7e52bae0cdcdd88e Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Mon, 15 Jun 2015 22:21:18 +0800 Subject: [PATCH 1188/2517] translating wi-cuckoo --- sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md b/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md index 6333fea9a7..76a4545bf8 100644 --- a/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md +++ b/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md @@ -1,3 +1,4 @@ +translating wi-cuckoo ​No reboot patching comes to Linux 4.0 ================================================================================ > **Summary**:With the new Linux 4.0 kernel, you'll need to reboot Linux less often than ever. @@ -55,4 +56,4 @@ via: http://www.zdnet.com/article/no-reboot-patching-comes-to-linux-4-0/#ftag=RS [11]:http://www.zdnet.com/article/suse-gets-live-patching/ [12]:http://elinux.org/Ftrace [13]:http://linuxplumbersconf.org/2014/wp-content/uploads/2014/10/LPC2014_LivePatching.txt -[14]:https://kernel.googlesource.com/pub/scm/linux/kernel/git/jikos/livepatching/+/9ec0de0ee0c9f0ffe4f72da9158194121cc22807 \ No newline at end of file +[14]:https://kernel.googlesource.com/pub/scm/linux/kernel/git/jikos/livepatching/+/9ec0de0ee0c9f0ffe4f72da9158194121cc22807 From 96f60b9298235892f846894d3bcfc5d0109db0ab Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Mon, 15 Jun 2015 22:26:06 +0800 Subject: [PATCH 1189/2517] soluted the conflict --- sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md b/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md index 6c3396907c..76a4545bf8 100644 --- a/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md +++ b/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md @@ -1,3 +1,4 @@ +translating wi-cuckoo ​No reboot patching comes to Linux 4.0 ================================================================================ > **Summary**:With the new Linux 4.0 kernel, you'll need to reboot Linux less often than ever. From e543e35406d8c73f72cff10d3dfa0e59c19469e9 Mon Sep 17 00:00:00 2001 From: yajun Date: Mon, 15 Jun 2015 12:59:36 -0400 Subject: [PATCH 1190/2517] translating.. --- ...20141211 Open source all over the world.md | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 translated/talk/20141211 Open source all over the world.md diff --git a/translated/talk/20141211 Open source all over the world.md b/translated/talk/20141211 Open source all over the world.md new file mode 100644 index 0000000000..b39820bebc --- /dev/null +++ b/translated/talk/20141211 Open source all over the world.md @@ -0,0 +1,150 @@ +Open source all over the world +================================================================================ +![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUS_OpenSourceExperience_520x292_cm.png) + +图片来源 : opensource.com + +经过了一整天的Opensource.com[社区版主][1]年会,最后一项日程提了上来,内容只有“特邀嘉宾:待定”几个字。作为[Opensource.com][3]的项目负责人和社区管理员,[Jason Hibbets][2]起身解释道,“因为这个嘉宾有可能无法到场,因此我不想提前说是谁。在几个月前我问他何时有空过来,他给了我两个时间点,我选了其中一个。今天是这三周中Jim唯一能来的一天”。(译者注:Jim是指下文中提到的Jim Whitehurst,即红帽公司总裁兼首席执行官) + +这句话在版主们(Moderators)中引起一阵轰动,他们从世界各地赶来参加此次的[拥抱开源大会(All Things Open Conference)][4]。版主们纷纷往前挪动椅子,仔细聆听。 + +“他会首先作半个小时的演讲,然后会回答几个提问。”,Jason说道。 + +会场的门开着,似乎一直在等着这位大人物的出现。这时,会场前唯一一个空位上来了一位高个子。 + +“大家好!”,这个家伙开口了。他没穿正装,只是衬衫和休闲裤。 + +这时会场中第二高个子的人,红帽全球意识部门(Global Awareness)的高级主管[Jeff Mackanic][5],告诉他大部分社区版本今天都在场,然后让每个人开始作简单的自我介绍。 + +“我叫[Jen Wike Huger][6],负责Opensource.com的内容管理,很高兴见到大家。” + +“我叫[Nicole][7]。是[ByWater Solutions][8]的副总裁,我们在做免费的开源库。我到各地旅行并教会人们如何使用软件。” + +“我叫[Robin][9],从2013年开始参与版主项目。我在OSDC做了一些事情,工作是在[City of the Hague][10]维护[网站][11]。” + +“我叫[Marcus Hanwell][12],来自英格兰,在[Kitware][13]工作。同时,我是FOSS科学软件的技术总监,和国家实验室在[Titan][14] Z和[Gpu programming][15]方面合作。我主要使用[Gentoo][16]和[KDE][17]。最后,我很激动能加入FOSS和开源科学。” + +“我叫[Phil Shapiro][18],是华盛顿的一个小图书馆28个Linux工作站的管理员。我视各位为我的同事。非常高兴能一起交流分享,贡献力量。我主要关注FOSS和自豪感的关系,以及FOSS如何提升自豪感。” + +“我叫[Joshua Holm][19]。我大多数时间都在关注系统更新,以及帮助人们在网上找工作。” + +“我叫[Mel Chernoff][20],在红帽工作,和[Jason Hibbets]和[Mark Bohannon]一起主要关注政府渠道方面。” + +“我叫[Scott Nesbitt][24],写过很多东西,使用FOSS很久了。我是个普通人,不是系统管理员,也不是程序员,只希望能更加高效工作。我帮助人们在商业和生活中使用FOSS。” + +“我叫[Luis Ibanez][25],刚加入[Google][26]。我对DIY和FOSS感兴趣。” + +“我叫[Remy DeCausemaker][27],在[RIT MAGIC Center][28]的黑客学院(Resident Hackademic),也是[交互式游戏和媒体系][29]的一个兼职教授。现在为Opensource.com写作将近四年。” + +“你在[新FOSS Minor][30]教书?!”,Jim说道,“很酷!” + +“我叫[Jason Baker][31]。我是红慢的一个云专家,主要做[OpenStack][32]方面的工作。” + +“我叫[Mark Bohannan][33],是红帽全球开放协议的一员,在华盛顿外工作。和Mel一样,我花了相当多时间写作,也从法律和政府部门中找合作者。我做了一个很好的小册子来讨论正在发生在政府中的积极变化。” + +“我叫[Jason Hibbets][34],我组织了这次会议。” + +会场中一片笑声。 + +“我也组织了这片讨论,可以这么说,”这个棕红色头发笑容灿烂的家伙说道。笑声持续一会逐渐平息。 + +我当时在他左边,时不时从转录空隙中抬头看一眼,然后从眼神中注意到微笑背后暗示的那个自2008年1月起开始领导公司的人,红帽的CEO[Jim Whitehurst][35]。 + +“我有世界上最好的工作,”稍稍向后靠、叉腿抱头,Whitehurst开始了演讲。“我开始领导红帽,在世界各地旅行到处看看情况。在这里的七年中,FOSS和广泛的开源创新所发生的美好的事情是开源已经脱离了条条框框。我现在认为,IT正处在FOSS之前所在的位置。我们可以预见FOSS从一个替代走向创新驱动力。” + +"I have one of the greatest jobs on Earth," began Whitehurst, as he leaned back, crossed his legs, and put his arms behind his head. "I get to lead Red Hat, travel around the world and see what goes on. In my seven years here, the amazing thing about FOSS, and, broadly open innovation, is that it has left the fringe. And now, I would argue, IT is in the same place that FOSS was in its early days. We are seeing FOSS going from an alternative to driving innovation. Our customers are seeing it, too. They're using FOSS not because it is cheaper, but because it provides them with control and innovative solutions. It's a global phenomenon, too. For instance, I was just in India, and discovered that, for them, there were two reasons for embracing of open source: one, access to innovation, and two, the market is somewhat different and wanting full control.” + +"The [Bombay Stock Exchange][36] wants to own all the source and control it. That is not something you would have heard five years ago in a stock exchange, anywhere. Back then, the early knock on FOSS was that it was creating free copies of things that already existed.' If you look today, virtually everything in big data is happening in FOSS. Almost any new framework, language, and methodology, including mobile (though excluding devices), are all happening first in open source.” + +"This is because users have reached size and scale. It's not just Red Hat—it's [Google][37], [Amazon][38], [Facebook][39], and others, they want to solve their own problems, and do it the open source way. And forget licensing—open source is much more than that. We've built a vehicle, and a set of norms. Things like [Hadoop][40], [Cassandra][41], and other tools. Fact is, open source drives innovation. For example, Hadoop was in production before any vendor realized there was a problem of that scale that needed to be solved. They actually have the wherewithal to solve their own problems, and the social tech and principles to do that. "Open source is now the default technology for many categories. This is especially true as the world moves more and more to content importance, such as [3D printing][42] and other physical products that take information content and apply it.” + +"We have this cool thing in one area, source code, but it is limited. But there are still many opportunities in different industries. We must ask ourselves, 'What can open source do for education, government, and legal? What are the parallels? And what can other areas learn with us?'" + +"There's also the matter of content. Content is now free, and we can invest in more free content, sure. But we need free content that has a business model built around it. That is something that more people should care about. If you believe open innovation is better, then we need more models." + +"Education worries me with its fixation on 'content' rather than 'communities.' For example, everywhere I go, I hear university presidents say, 'Wait, education is going to be free?!' The fact that FOSS is free for downstream is great, but the upstream is really powerful. Distributing free courses is great, but we need communities to iterate and make it better. That is something that a lot of different people are doing, and Opensource.com is a place to share what is going on in this space. The question is not so much 'How do we take content?' as it is 'How do you build and distribute it? How do you make sure it is a living thing that gets better, and can morph for different areas?'" + +"But the potential to change the world is limitless, and it's amazing how much progress we've already made. Six years ago we were obsessed about defining a mission statement. We started by saying, 'We are the leader,' but that was the wrong word, because it implied control. Active participant didn't quite get it either... [Máirín Duffy][43] came up with the word [catalyst][44]. And so, we became Red Hat, the company that creates environments to agitate action and catalyze direction.” + +"Opensource.com is a catalyst in other areas, and that is what Opensource.com is about. I hope you see yourselves this way, too. The quality of content then, when we started, versus now, is incredible. You can see it getting better every quarter. Thank you for investing your time. Thank you for being catalysts. This is a chance for us all to make the world a better place. And I'd love to hear from you." + +I stole a glimpse of everyone at the table: more than a few people had tears in their eyes. + +Then, Whitehurst revisits the open education topic of conversation again. "Taking it to an extreme, let's say you have a course about the book [Ulysses][45]. Here, you can explore how to crowdsource a model and get people to work together within the course. Well, it's the same with a piece of code: people work together, and the code itself gets better over time." + +At this point, I get to have my say. Words like fundamental and possibly irreconcilable came up when discussing the differences between FOSS and academic communities. + +**Remy**: "Retraction is career death." Releasing data or code with your paper could be devastating if you make a mistake. School has always been about avoiding failure and divining 'right answers'. Copying is cheating. Wheels are recreated from scratch ritualistically. In FOSS, you work to fail fastest, but in academia, you invite invalidation." + +**Nicole**: "There are a lot of egos in academia. You need a release manager." + +**Marcus**: "To collaborate, you have to show the bits you don't understand, and that happens behind closed doors. The reward model is all about what you can take credit for. We need to change the reward model. Publish as much as you can. We release eventually, but we want to release early." + +**Luis**: "Make teamwork and sharing a priority. And Red Hat can say that to them more." + +**Jim**: "Is there an active role that companies can play in that?" + +[Phil Shapiro][46]: "I'm interested in tipping points in FOSS. It drives me nuts that the Fed hasn't switched to [LibreOffice][47]. We're not spending tax dollars on software, and certainly shouldn't be spending on word processing or Microsoft Office." + +**Jim**: "We have advocated for that. A lot. Can we do more? That's a valid question. Primarily, we've made progress in the places we have products. We have a solid franchise in government. We are larger per IT spend there than the private sector. Banks and telcos are further along than the government. We've done better in Europe, and I think they have less lobbying dollars at work there, than here. This next generation of computing is almost like a 'do-over'. We are making great progress elsewhere, but it is concerning." + +Suddenly, the door to the room opened. Jim turned and nodded towards his executive assistant standing in the doorway; it was time for his next meeting. He uncrossed his legs, leaned forward, and stood. He thanked everyone again for their work and dedication, smiled, and was out the door... leaving us all a bit more inspired. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/business/14/12/jim-whitehurst-inspiration-open-source + +作者:[Remy][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/remyd +[1]:http://opensource.com/community-moderator-program +[2]:https://twitter.com/jhibbets +[3]:http://opensource.com/ +[4]:http://allthingsopen.org/ +[5]:http://opensource.com/users/mackanic +[6]:https://twitter.com/JenWike +[7]:http://opensource.com/users/nengard +[8]:http://bywatersolutions.com/ +[9]:http://opensource.com/life/13/7/community-spotlight-robin-muilwijk +[10]:https://en.wikipedia.org/wiki/The_Hague +[11]:http://www.denhaag.nl/en.htm +[12]:https://twitter.com/mhanwell +[13]:http://www.kitware.com/ +[14]:http://www.nvidia.com/gtx-700-graphics-cards/gtx-titan-z/ +[15]:https://en.wikipedia.org/wiki/General-purpose_computing_on_graphics_processing_units +[16]:https://www.gentoo.org/ +[17]:http://kde.org/ +[18]:https://twitter.com/philshapiro +[19]:http://opensource.com/community/13/9/contributor-spotlight-joshua-holm +[20]:http://opensource.com/users/melanie +[21]:http://opensource.com/government +[22]:https://twitter.com/jhibbets +[23]:https://twitter.com/markbotech +[24]:http://scottnesbitt.me/ +[25]:http://opensource.com/users/luis-ibanez +[26]:http://google.com/ +[27]:http://twitter.com/remy_d +[28]:http://foss.rit.edu/ +[29]:http://igm.rit.edu/ +[30]:http://www.rit.edu/news/story.php?id=50590 +[31]:https://twitter.com/jehb +[32]:http://openstack.org/ +[33]:https://twitter.com/markbotech +[34]:https://twitter.com/jhibbets +[35]:http://www.redhat.com/en/about/company/management/james-whitehurst +[36]:http://www.bseindia.com/ +[37]:http://google.com/ +[38]:https://mail.corp.redhat.com/service/home/%7E/Amazon +[39]:https://mail.corp.redhat.com/service/home/%7E/Facebook +[40]:https://hadoop.apache.org/ +[41]:https://cassandra.apache.org/ +[42]:https://en.wikipedia.org/wiki/3D_printing +[43]:https://twitter.com/mairin +[44]:http://jobs.redhat.com/life-at-red-hat/our-culture/ +[45]:http://www.gutenberg.org/ebooks/4300 +[46]:https://twitter.com/philshapiro +[47]:http://libreoffice.org/ From a0f53e1f6e602f6a3ab8e53843b871698d1dccef Mon Sep 17 00:00:00 2001 From: sevenot Date: Tue, 16 Jun 2015 10:28:57 +0800 Subject: [PATCH 1191/2517] sevenot translating --- .../talk/20150128 The top 10 rookie open source projects.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150128 The top 10 rookie open source projects.md b/sources/talk/20150128 The top 10 rookie open source projects.md index 0dfcb07a48..7dccf38141 100644 --- a/sources/talk/20150128 The top 10 rookie open source projects.md +++ b/sources/talk/20150128 The top 10 rookie open source projects.md @@ -1,3 +1,4 @@ +sevenot translating The top 10 rookie open source projects ================================================================================ Black Duck presents its Open Source Rookies of the Year -- the 10 most exciting, active new projects germinated by the global open source community @@ -150,4 +151,4 @@ via: http://www.infoworld.com/article/2875439/open-source-software/the-top-10-ro [20]:https://www.blackducksoftware.com/open-source-rookies [21]:http://www.infoworld.com/article/2871935/application-development/infoworlds-2015-technology-of-the-year-award-winners.html [22]:http://www.infoworld.com/article/2688104/open-source-software/article.html -[23]:http://www.infoworld.com/article/2854954/microsoft-windows/15-essential-open-source-tools-for-windows-admins.html \ No newline at end of file +[23]:http://www.infoworld.com/article/2854954/microsoft-windows/15-essential-open-source-tools-for-windows-admins.html From 46b40880ede51d5e20c9d3025bd62d52993a709f Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 16 Jun 2015 10:30:21 +0800 Subject: [PATCH 1192/2517] Translating by ZTinoZ --- sources/tech/20150526 20 Useful Terminal Emulators for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 82a8ff5aff..a15c4ad0d1 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -189,7 +189,7 @@ Gnome Terminal ### 14. Final Term ### -Final Term is a open source stylish terminal emulator that has some exciting capabilities and handy features into one single beautiful interface. It is still under development, but provides significant features such as Semantic text menus, Smart command completion, GUI terminal controls, Omnipotent keybindings, Color support and many more. The following animated screen grab demonstrates some of their features. Please click on image to view demo. +Final Term是一款漂亮的开源终端仿真器,在这一个界面里蕴藏着一些令人激动的功能和特性。虽然它仍然有待改进,但是它提供了一些重要的特性比如Semantic文本菜单、智能的命令行实现、GUI终端控制、全能的快捷键、彩色支持等等。以下动图抓取并演示了它们的一些特性,点开来看看吧。 ![FinalTerm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/FinalTerm.gif) From 19c1a9fdad619600df6e0302e981d2529512d4ae Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Tue, 16 Jun 2015 11:05:15 +0800 Subject: [PATCH 1193/2517] delete a past item --- ...4 ​No reboot patching comes to Linux 4.0.md | 59 ------------------- 1 file changed, 59 deletions(-) delete mode 100644 sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md diff --git a/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md b/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md deleted file mode 100644 index 76a4545bf8..0000000000 --- a/sources/talk/20150304 ​No reboot patching comes to Linux 4.0.md +++ /dev/null @@ -1,59 +0,0 @@ -translating wi-cuckoo -​No reboot patching comes to Linux 4.0 -================================================================================ -> **Summary**:With the new Linux 4.0 kernel, you'll need to reboot Linux less often than ever. - -With [Linux 4.0][1], you may never need to reboot your operating system again. - -![Using Linux means never having to reboot. -- SUSE ](http://zdnet4.cbsistatic.com/hub/i/r/2015/03/02/5e766833-454b-45b5-a8f7-a55d21e9d26a/resize/270x270/4d0774552c342a1507784ef802619b71/livepatching.jpg) -Using Linux means never having to reboot. -- SUSE - -One reason to love Linux on your servers or in your data-center is that you so seldom needed to reboot it. True, critical patches require a reboot, but you could go months without rebooting. Now, with the latest changes to the Linux kernel you may be able to go years between reboots. - -This is actually a feature that was available in Linux in 2009 thanks to a program called [Ksplice][2]. This program compares the original and patched kernels and then uses a customized kernel module to patch the new code into the running kernel. Each Ksplice-enabled kernel comes with a special set of flags for each function that will be patched. The [Ksplice process][3] then watches for a moment when the code for the function being patched isn't in use, and ta-da, the patch is made and your server runs on. - -[Oracle acquired Ksplice][4] in 2011, and kept it just for its own [Oracle Linux][5], a [Red Hat Enterprise Linux (RHEL)][6] clone, and as a RHEL subscription service. That left all the other enterprise and server Linux back where they started. - -Then [KernelCare released a service that could provide bootless patches][7] for most enterprise Linux distros. This program use proprietary software and is only available as a service with a monthly fee. That was a long way from satisfying many Linux system administrators. - -So, [Red Hat][8] and [SUSE][9] both started working on their own purely open-source means of giving Linux the ability to keep running even while critical patches were being installed. Red Hat's program was named [kpatch][10], while SUSE' is named [kGraft][11]. - -The two companies took different approaches. Kpatch issues a stop_machine() command. After that it looks at the stack of existing processes using [ftrace][12] and, if the patch can be made safely, it redirects the running code to the patched functions and then removes the now outdated code. - -Kgraft also uses ftrace, but it works on the thread level. When an old function is called it makes sure the thread reaches a point that it can switch to the new function. - -While the end result is the same, the operating system keeps running while patches are made, there are significant differences in performance. Kpatch takes from one to forty milliseconds, while kGraft might take several minutes but there's never even a millisecond of down time. - -At the Linux Plumbers Conference in October 2014, the two groups got together and started work on a way to [patch Linux without rebooting that combines the best of both programs][13]. Essentially, what they ended up doing was putting both kpatch and kGraft in the 4.0 Linux kernel. - -Jiri Kosina, a SUSE software engineer and Linux kernel developer, explained, that live-patching in the Linux kernel will "provides a basic infrastructure for function "live patching" (i.e. code redirection), including API [application programming interface] for kernel modules containing the actual patches, and API/ABI [application binary interface] for userspace to be able to operate on the patches. This is "relatively simple and minimalistic, as it's making use of existing kernel infrastructure (namely ftrace) as much as possible. It's also self-contained, in a sense that it doesn't hook itself in any other kernel subsystem (it doesn't even touch any other code)." - -The release candidate for Linux 4.0 is now out. Kosina stated that "It's now implemented for x86 only as a reference architecture, but support for powerpc, s390 and arm is already in the works." And, indeed, the source code for these architectures is already in the [Live Patching Git code][14]. - -Simply having the code in there is just the start. Your Linux distribution will have to support it with patches that can make use of it. With both Red Hat and SUSE behind it, live patching will soon be the default in all serious business Linux distributions. - --------------------------------------------------------------------------------- - -via: http://www.zdnet.com/article/no-reboot-patching-comes-to-linux-4-0/#ftag=RSSbaffb68 - -作者:[Steven J. Vaughan-Nichols][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.zdnet.com/meet-the-team/us/sjvn/ -[1]:http://www.zdnet.com/article/linux-kernel-turns-over-release-odometer-to-4-0/ -[2]:http://www.computerworld.com/article/2466389/open-source-tools/never-reboot-again-with-linux-and-ksplice.html -[3]:http://www.ksplice.com/ -[4]:http://www.zdnet.com/article/oracle-acquires-zero-downtime-linux-upgrade-software/ -[5]:http://www.oracle.com/us/technologies/linux/overview/index.html -[6]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux -[7]:http://www.zdnet.com/article/kernelcare-new-no-reboot-linux-patching-system/ -[8]:http://www.redhat.com/ -[9]:http://www.suse.com/ -[10]:http://rhelblog.redhat.com/2014/02/26/kpatch/ -[11]:http://www.zdnet.com/article/suse-gets-live-patching/ -[12]:http://elinux.org/Ftrace -[13]:http://linuxplumbersconf.org/2014/wp-content/uploads/2014/10/LPC2014_LivePatching.txt -[14]:https://kernel.googlesource.com/pub/scm/linux/kernel/git/jikos/livepatching/+/9ec0de0ee0c9f0ffe4f72da9158194121cc22807 From 90dc2609661be56537692939163c40cb207f990f Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Tue, 16 Jun 2015 11:10:12 +0800 Subject: [PATCH 1194/2517] translating wi-cuckoo --- .../talk/20150615 PHP at 20--From pet project to powerhouse.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150615 PHP at 20--From pet project to powerhouse.md b/sources/talk/20150615 PHP at 20--From pet project to powerhouse.md index 610913c846..7ddbf950a9 100644 --- a/sources/talk/20150615 PHP at 20--From pet project to powerhouse.md +++ b/sources/talk/20150615 PHP at 20--From pet project to powerhouse.md @@ -1,3 +1,4 @@ +translating wi-cuckoo PHP at 20: From pet project to powerhouse ================================================================================ ![](http://images.techhive.com/images/article/2015/06/13049862325_8c97a11878_z-100590275-primary.idge.jpg) @@ -79,4 +80,4 @@ via: http://www.infoworld.com/article/2933858/php/php-at-20-from-pet-project-to- [8]:https://wiki.php.net/todo/php70#timetable [9]:http://talks.php.net/velocity15 [10]:http://www.php-fig.org/psr/psr-7/ -[11]:http://phpmentoring.org/ \ No newline at end of file +[11]:http://phpmentoring.org/ From 133f48756d30a5a9de509cc0e8f28b4ca112670d Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 16 Jun 2015 11:20:34 +0800 Subject: [PATCH 1195/2517] Update 20150515 Extend Swap Space using Swap file in Linux.md --- .../20150515 Extend Swap Space using Swap file in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150515 Extend Swap Space using Swap file in Linux.md b/sources/tech/20150515 Extend Swap Space using Swap file in Linux.md index 51b2f2fe55..9b1cb3f8b7 100644 --- a/sources/tech/20150515 Extend Swap Space using Swap file in Linux.md +++ b/sources/tech/20150515 Extend Swap Space using Swap file in Linux.md @@ -1,3 +1,4 @@ +Translating by strugglingyouth Extend Swap Space using Swap file in Linux ================================================================================ There are some scenarios where our Linux box is running out of swap space so in that case we can extend the swap space using swap partition but due to unavailability of free partitions on the disk, we are unable to extend it. @@ -70,4 +71,4 @@ via: http://www.linuxtechi.com/extend-swap-space-using-swap-file-in-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file +[a]:http://www.linuxtechi.com/author/pradeep/ From 44c36764ceba054e981c2da64adcb8638cd1415c Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 16 Jun 2015 12:51:58 +0800 Subject: [PATCH 1196/2517] PUB:20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules @wwy-hust --- ...ng Mod_Security and Mod_evasive Modules.md | 160 +++++++++--------- 1 file changed, 82 insertions(+), 78 deletions(-) rename {translated/tech => published}/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md (58%) diff --git a/translated/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md b/published/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md similarity index 58% rename from translated/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md rename to published/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md index 1f645595b7..44ba66e7d5 100644 --- a/translated/tech/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md +++ b/published/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md @@ -1,14 +1,15 @@ -在Apache中使用Mod_Security和Mod_evasive来抵御暴力破解和DDos攻击 +在Apache中使用mod\_security和mod\_evasive来抵御暴力破解和DDos攻击 ================================================================================ -对于那些托管主机或者需要将您的主机暴露在因特网中的人来说,保证您的系统在面对攻击时安全是一个重要的事情。 -mod_security(一个开源的可以无缝接入Web服务器的用于Web应用入侵检测和防护的引擎)和mod_evasive是两个在服务器端对抗暴力破解和(D)Dos攻击的非常重要的工具。 +对于那些需要在因特网上提供服务或托管主机的人来说,保证您的系统在面对攻击时的安全是一个重要的事情。 -mod_evasive,如它的名字一样,在受攻击时提供避实就虚的功能,它像一个雨伞一样保护Web服务器免受那些威胁。 +mod\_security(一个开源的用于Web应用入侵检测及防护的引擎,可以无缝地集成到Web服务器)和mod\_evasive是两个在服务器端对抗暴力破解和(D)Dos攻击的非常重要的工具。 + +mod\_evasive,如它的名字一样,在受攻击时提供避实就虚的功能,它像一个雨伞一样保护Web服务器免受那些威胁。 ![](http://www.tecmint.com/wp-content/uploads/2012/06/Install-Mod_Security-Mod_evasive-in-CentOS.jpg) -安装Mod_Security和Mod_Evasive来保护Apache +*安装mod\_security和mod\_evasive来保护Apache* 在这篇文章中我们将讨论如何安装、配置以及在RHEL/CentOS6、7和Fedora 21-15上将它们整合到Apache。另外,我们会模拟攻击以便验证服务器做出了正确的反应。 @@ -16,91 +17,77 @@ mod_evasive,如它的名字一样,在受攻击时提供避实就虚的功能 - [在RHEL/CentOS 7中安装LAMP][1] -如果您在运行RHEL/CentOS 7或Fedora 21,您还需要安装iptables作为默认[防火墙][2]前端以取代firewalld。这样做是为了在RHEL/CentOS 7或Fedora 21中使用同样的工具。 +(LCTT 译注:本文有修改。原文为了在RHEL/CentOS 7或Fedora 21中使用同样的工具,而删除了自带的 firewalld,使用了旧式的iptables。译者以为这样并不恰当,因此,译文中做了相应删节,并增加了firewalld的相应脚本。) -### 步骤 1: 在RHEL/CentOS 7和Fedora 21上安装Iptables防火墙 ### - -用下面的命令停止和禁用firewalld: - - # systemctl stop firewalld - # systemctl disable firewalld - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Disable-Firewalld-Service.png) -禁用firewalld服务 - -接下来在使能iptables之前安装iptables-services包: - - # yum update && yum install iptables-services - # systemctl enable iptables - # systemctl start iptables - # systemctl status iptables - -![](http://www.tecmint.com/wp-content/uploads/2012/06/Install-Iptables-Firewall.png) -安装Iptables防火墙 - -### 步骤 2: 安装Mod_Security和Mod_evasive ### +### 步骤 1: 安装mod\_security和mod\_evasive ### 另外,在安装LAMP后,您还需要在RHEL/CentOS 7/6中[开启EPEL仓库][3]来安装这两个包。Fedora用户不需要开启这个仓库,因为epel已经是Fedora项目的一部分了。 # yum update && yum install mod_security mod_evasive -当安装结束后,您会在/etc/httpd/conf.d下找到两个工具的配置文件。 +当安装结束后,您会在/etc/httpd/conf.d下找到这两个工具的配置文件。 # ls -l /etc/httpd/conf.d ![](http://www.tecmint.com/wp-content/uploads/2012/06/mod_security-mod_evasive-Configurations.png) -mod_security + mod_evasive 配置文件 -现在,为了整合这两个模块到Apache,并在启动时加载它们。请确保下面几行出现在mod_evasive.conf和mod_security.conf的顶层部分,它们分别为: +*mod\_security + mod\_evasive 配置文件* + +现在,为了整合这两个模块到Apache,并在启动时加载它们。请确保下面几行出现在mod\_evasive.conf和mod\_security.conf的顶层部分,它们分别为: LoadModule evasive20_module modules/mod_evasive24.so LoadModule security2_module modules/mod_security2.so -请注意modules/mod_security2.so和modules/mod_evasive24.so都是从/etc/httpd到模块源文件的相对路径。您可以通过列出/etc/httpd/modules的内容来验证(如果需要的话,修改它): +请注意modules/mod\_security2.so和modules/mod\_evasive24.so都是从/etc/httpd到模块源文件的相对路径。您可以通过列出/etc/httpd/modules的内容来验证(如果需要的话,修改它): # cd /etc/httpd/modules # pwd # ls -l | grep -Ei '(evasive|security)' ![](http://www.tecmint.com/wp-content/uploads/2012/06/Verify-mod_security-mod_evasive-Modules.png) -验证mod_security + mod_evasive模块 -接下来重启Apache并且核实它已加载了mod_evasive和mod_security: +*验证mod\_security + mod\_evasive模块* + +接下来重启Apache并且核实它已加载了mod\_evasive和mod\_security: # service httpd restart [在RHEL/CentOS 6和Fedora 20-18上] # systemctl restart httpd [在RHEL/CentOS 7和Fedora 21上] ---------- - [输出已加载的静态模块和动态模块列表] - - # httpd -M | grep -Ei '(evasive|security)' + # httpd -M | grep -Ei '(evasive|security)' [输出已加载的静态模块和动态模块列表] ![](http://www.tecmint.com/wp-content/uploads/2012/06/Check-mod_security-mod_evasive-Loaded.png) -检查mod_security + mod_evasive模块已加载 -### 步骤 3: 安装一个核心规则集并且配置Mod_Security ### +*检查mod\_security + mod\_evasive模块已加载* -简单来说,一个核心规则集(即CRS)为web服务器提供特定状况下如何反应的指令。mod_security的开发者们提供了一个免费的CRS,叫做OWASP([开放Web应用安全项目])ModSecurity CRS,可以从下面的地址下载和安装。 +### 步骤 2: 安装一个核心规则集并且配置mod\_security ### -1. 下载OWASP CRS到为之创建的目录 +简单来说,一个核心规则集(即CRS)为web服务器提供特定状况下如何反应的指令。mod\_security的开发者们提供了一个免费的CRS,叫做OWASP([开放Web应用安全项目])ModSecurity CRS,可以从下面的地址下载和安装。 - # mkdir /etc/httpd/crs-tecmint - # cd /etc/httpd/crs-tecmint +####下载OWASP CRS到为之创建的目录#### + + # mkdir /etc/httpd/crs-tecmint + # cd /etc/httpd/crs-tecmint # wget https://github.com/SpiderLabs/owasp-modsecurity-crs/tarball/master ![](http://www.tecmint.com/wp-content/uploads/2012/06/Download-mod_security-Core-Rules.png) -下载mod_security核心规则 -2. 解压CRS文件并修改文件夹名称 +*下载mod\_security核心规则* + +#### 解压CRS文件并修改文件夹名称#### # tar xzf master # mv SpiderLabs-owasp-modsecurity-crs-ebe8790 owasp-modsecurity-crs -![](http://www.tecmint.com/wp-content/uploads/2012/06/Extract-mod_security-Core-Rules.png) -解压mod_security核心规则 -3. 现在,是时候配置mod_security了。将同样的规则文件(owasp-modsecurity-crs/modsecurity_crs_10_setup.conf.example)拷贝至另一个没有.example扩展的文件。 +![](http://www.tecmint.com/wp-content/uploads/2012/06/Extract-mod_security-Core-Rules.png) + +*解压mod\_security核心规则* + +####现在,是时候配置mod\_security了#### + +将示例的规则文件(owasp-modsecurity-crs/modsecurity_crs_10_setup.conf.example)拷贝为同名的配置文件。 # cp modsecurity_crs_10_setup.conf.example modsecurity_crs_10_setup.conf @@ -111,7 +98,7 @@ mod_security + mod_evasive 配置文件 Include crs-tecmint/owasp-modsecurity-crs/base_rules/*.conf -最后,建议您在/etc/httpd/modsecurity.d目录下创建自己的配置文件,在那里我们可以用我们自定义的文件夹(接下来的示例中,我们会将其命名为tecmint.conf)而无需修改CRS文件的目录。这样做能够在CRSs发布新版本时更加容易的升级。 +最后,建议您在/etc/httpd/modsecurity.d目录下创建自己的配置文件,在那里我们可以用我们自定义的文件夹(接下来的示例中,我们会将其命名为tecmint.conf)而无需修改CRS文件的目录。这样做能够在CRS发布新版本时更加容易的升级。 SecRuleEngine On @@ -121,13 +108,13 @@ mod_security + mod_evasive 配置文件 SecDataDir /tmp -您可以在[SpiderLabs的ModSecurity GitHub][5]仓库中参考关于mod_security目录的更完整的解释。 +您可以在[SpiderLabs的ModSecurity GitHub][5]仓库中参考关于mod\_security目录的更完整的解释。 -### 步骤 4: 配置Mod_Evasive ### +### 步骤 3: 配置mod\_evasive ### -mod_evasive被配置为使用/etc/httpd/conf.d/mod_evasive.conf中的指令。与mod_security不同,由于在包升级时没有规则来更新,因此我们不需要独立的文件来添加自定义指令。 +mod\_evasive被配置为使用/etc/httpd/conf.d/mod\_evasive.conf中的指令。与mod\_security不同,由于在包升级时没有规则来更新,因此我们不需要独立的文件来添加自定义指令。 -默认的mod_evasive.conf开启了下列的目录(注意这个文件被详细的注释了,因此我们剔掉了注释以重点显示配置指令): +默认的mod\_evasive.conf开启了下列的目录(注意这个文件被详细的注释了,因此我们剔掉了注释以重点显示配置指令): DOSHashTableSize 3097 @@ -140,8 +127,8 @@ mod_evasive被配置为使用/etc/httpd/conf.d/mod_evasive.conf中的指令。 这些指令的解释: -- DOSHashTableSize: 这个指令指明了哈希表的大小,它用来追踪基于IP地址的活动。增加这个数字将使查询站点访问历史变得更快,但如果被设置的太高则会影响整体性能。 -- DOSPageCount: 在DOSPageInterval间隔内可由一个用户发起的面向特定的URI(例如,一个Apache托管的文件)的同一个请求的数量。 +- DOSHashTableSize: 这个指令指明了哈希表的大小,它用来追踪基于IP地址的活动。增加这个数字将使得站点访问历史的查询变得更快,但如果被设置的太大则会影响整体性能。 +- DOSPageCount: 在DOSPageInterval间隔内可由一个用户发起的针对特定的URI(例如,一个Apache 提供服务的文件)的同一个请求的数量。 - DOSSiteCount: 类似DOSPageCount,但涉及到整个站点总共有多少的请求可以在DOSSiteInterval间隔内被发起。 - DOSBlockingPeriod: 如果一个用户超过了DOSSPageCount的限制或者DOSSiteCount,他的源IP地址将会在DOSBlockingPeriod期间内被加入黑名单。在DOSBlockingPeriod期间,任何从这个IP地址发起的请求将会遭遇一个403禁止错误。 @@ -149,7 +136,7 @@ mod_evasive被配置为使用/etc/httpd/conf.d/mod_evasive.conf中的指令。 **一个小警告**: 如果这些值设置的不合适,则您会蒙受阻挡合法用户的风险。 -您也许想考虑下其他有用的指令: +您也许还会用到以下其它有用的指令: #### DOSEmailNotify #### @@ -157,11 +144,11 @@ mod_evasive被配置为使用/etc/httpd/conf.d/mod_evasive.conf中的指令。 # setsebool -P httpd_can_sendmail 1 -接下来,将这个指令和其他指令一起加入到mod_evasive.conf文件。 +接下来,将这个指令和其他指令一起加入到mod\_evasive.conf文件。 DOSEmailNotify you@yourdomain.com -如果这个值被合适的设置并且您的邮件服务器在正常的运行,则当一个IP地址被加入黑名单时,会有一封邮件被发送到相应的地址。 +如果这个指令设置了合适的值,并且您的邮件服务器在正常的运行,则当一个IP地址被加入黑名单时,会有一封邮件被发送到相应的地址。 #### DOSSystemCommand #### @@ -169,31 +156,47 @@ mod_evasive被配置为使用/etc/httpd/conf.d/mod_evasive.conf中的指令。 DOSSystemCommand
-这个指令指定当一个IP地址被加入黑名单时执行的命令。它通常结合shell脚本来使用,在脚本中添加一条防火墙规则来阻挡某个IP进一步的连接。 +这个指令指定当一个IP地址被加入黑名单时执行的命令。它通常结合shell脚本来使用,比如在脚本中添加一条防火墙规则来阻挡某个IP进一步的连接。 -**写一个shell脚本在防火墙阶段处理IP黑名单** +#####写一个shell脚本在防火墙阶段处理IP黑名单##### 当一个IP地址被加入黑名单,我们需要阻挡它进一步的连接。我们需要下面的shell脚本来执行这个任务。在/usr/local/bin下创建一个叫做scripts-tecmint的文件夹(或其他的名字),以及一个叫做ban_ip.sh的文件。 +**用于iptables防火墙** + #!/bin/sh # 由mod_evasive检测出,将被阻挡的IP地址 IP=$1 # iptables的完整路径 IPTABLES="/sbin/iptables" # mod_evasive锁文件夹 - MOD_EVASIVE_LOGDIR=/var/log/mod_evasive + mod_evasive_LOGDIR=/var/log/mod_evasive # 添加下面的防火墙规则 (阻止所有从$IP流入的流量) $IPTABLES -I INPUT -s $IP -j DROP # 为了未来的检测,移除锁文件 - rm -f "$MOD_EVASIVE_LOGDIR"/dos-"$IP" + rm -f "$mod_evasive_LOGDIR"/dos-"$IP" + +**用于firewalld防火墙** + + #!/bin/sh + # 由mod_evasive检测出,将被阻挡的IP地址 + IP=$1 + # firewalld-cmd的完整路径 + FIREWALL_CMD="/usr/bin/firewall-cmd" + # mod_evasive锁文件夹 + mod_evasive_LOGDIR=/var/log/mod_evasive + # 添加下面的防火墙规则 (阻止所有从$IP流入的流量) + $FIREWALL_CMD --zone=drop --add-source $IP + # 为了未来的检测,移除锁文件 + rm -f "$mod_evasive_LOGDIR"/dos-"$IP" 我们的DOSSystemCommand指令应该是这样的: DOSSystemCommand "sudo /usr/local/bin/scripts-tecmint/ban_ip.sh %s" -上面一行的%s代表了由mod_evasive检测到的攻击IP地址。 +上面一行的%s代表了由mod\_evasive检测到的攻击IP地址。 -**将apache用户添加到sudoers文件** +#####将apache用户添加到sudoers文件##### 请注意,如果您不给予apache用户以无需终端和密码的方式运行我们脚本(关键就是这个脚本)的权限,则这一切都不起作用。通常,您只需要以root权限键入visudo来存取/etc/sudoers文件,接下来添加下面的两行即可: @@ -201,14 +204,16 @@ mod_evasive被配置为使用/etc/httpd/conf.d/mod_evasive.conf中的指令。 Defaults:apache !requiretty ![](http://www.tecmint.com/wp-content/uploads/2012/06/Add-Apache-User-to-Sudoers.png) -添加Apache用户到Sudoers -**重要**: 作为默认的安全策略,您只能在终端中运行sudo。由于这个时候我们需要在没有tty的时候运行sudo,我们像下面图片中那样必须注释掉下面这一行: +*添加Apache用户到Sudoers* + +**重要**: 在默认的安全策略下您只能在终端中运行sudo。由于这个时候我们需要在没有tty的时候运行sudo,我们必须像下图中那样注释掉下面这一行: #Defaults requiretty ![](http://www.tecmint.com/wp-content/uploads/2012/06/Disable-tty-for-Sudo.png) -为Sudo禁用tty + +*为Sudo禁用tty* 最后,重启web服务器: @@ -219,7 +224,7 @@ mod_evasive被配置为使用/etc/httpd/conf.d/mod_evasive.conf中的指令。 有许多工具可以在您的服务器上模拟外部的攻击。您可以google下“tools for simulating ddos attacks”来找一找相关的工具。 -注意,您(也只有您)将负责您模拟所造成的结果。请不要考虑向不在您网络中的服务器发起模拟攻击。 +注意,您(也只有您)将负责您模拟所造成的结果。请不要考虑向不在您自己网络中的服务器发起模拟攻击。 假如您想对一个由别人托管的VPS做这些事情,您需要向您的托管商发送适当的警告或就那样的流量通过他们的网络获得允许。Tecmint.com不会为您的行为负责! @@ -228,21 +233,20 @@ mod_evasive被配置为使用/etc/httpd/conf.d/mod_evasive.conf中的指令。 我们的测试环境由一个CentOS 7服务器[IP 192.168.0.17]和一个Windows组成,在Windows[IP 192.168.0.103]上我们发起攻击: ![](http://www.tecmint.com/wp-content/uploads/2012/06/Confirm-Host-IPAddress.png) -确认主机IP地址 -请播放下面的视频,并跟从列出的步骤来模拟一个Dos攻击: +*确认主机IP地址* -注:youtube视频,发布的时候不行做个链接吧 - +请播放下面的视频(YT 视频,请自备梯子: https://www.youtube.com/-U_mdet06Jk ),并跟从列出的步骤来模拟一个Dos攻击: -然后攻击者的IP将被iptables阻挡: +然后攻击者的IP将被防火墙阻挡: ![](http://www.tecmint.com/wp-content/uploads/2012/06/Blocked-Attacker-IP.png) -阻挡攻击者的IP地址 + +*阻挡攻击者的IP地址* ### 结论 ### -在开启mod_security和mod_evasive的情况下,模拟攻击会导致CPU和RAM用量在源IP地址被加入黑名单之前出现短暂几秒的使用峰值。如果没有这些模块,模拟攻击绝对会很快将服务器击溃,并使服务器在攻击期间无法提供服务。 +在开启mod\_security和mod\_evasive的情况下,模拟攻击会导致CPU和RAM用量在源IP地址被加入黑名单之前出现短暂几秒的使用峰值。如果没有这些模块,模拟攻击绝对会很快将服务器击溃,并使服务器在攻击期间无法提供服务。 我们很高兴听见您打算使用(或已经使用过)这些工具。我们期望得到您的反馈,所以,请在留言处留下您的评价和问题,谢谢! @@ -253,18 +257,18 @@ mod_evasive被配置为使用/etc/httpd/conf.d/mod_evasive.conf中的指令。 -------------------------------------------------------------------------------- -via: http://www.tecmint.com/protect-apache-using-mod_security-and-mod_evasive-on-rhel-centos-fedora/ +via: http://www.tecmint.com/protect-apache-using-mod\_security-and-mod\_evasive-on-rhel-centos-fedora/ 作者:[Gabriel Cánepa][a] 译者:[wwy-hust](https://github.com/wwy-hust) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/gacanepa/ [1]:http://www.tecmint.com/install-lamp-in-centos-7/ -[2]:http://www.tecmint.com/configure-firewalld-in-centos-7/ -[3]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[2]:https://linux.cn/article-4425-1.html +[3]:https://linux.cn/article-2324-1.html [4]:https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project [5]:https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#Configuration_Directives [6]:https://www.modsecurity.org/ From 34f4ca0f21e3c3039ef2b829383797545da83d49 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 16 Jun 2015 13:16:25 +0800 Subject: [PATCH 1197/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Beautiful Arc GTK+ Flat Theme on Linux.md | 35 +++++-------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md b/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md index f8d1c56d41..4c25b0e60d 100644 --- a/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md +++ b/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md @@ -1,18 +1,18 @@ 如何在Linux中安装漂亮的扁平化Arc GTK+主题 ================================================================================ -> 易于看懂的每步都有的教程 +> 易于理解的分步教程 -**今天我们将向你介绍最新发布的GTK+主题,它拥有透明和扁平元素,并且与多个桌面环境和Linux发行版见荣发。[这个主题叫Arc][1]。** +**今天我们将向你介绍最新发布的GTK+主题,它拥有透明和扁平元素,并且与多个桌面环境和Linux发行版兼容。[这个主题叫Arc][1]。** -开始讲细节之前,我建议你快速地看一下下面的图,这样你有会对这个主题就会有一个基本的概念了。同样你应该意识到它目前可以工作在GTK+ 2.x、GTK+ 3.x、GNOME-Shell、 Budgie、 Unity和Pantheon用户界面,它们都使用了GNOME栈。 +开始讲细节之前,我建议你快速浏览一下下面的图,这样你有会对这个主题就会有一个基本的概念了。同样你应该知道它目前可以工作在GTK+ 2.x、GTK+ 3.x、GNOME-Shell、 Budgie、 Unity和Pantheon用户界面,它们都使用了GNOME栈。 -同样、Arc主题的开发者提醒我们它已经成功地在Ubuntu 15.04(Vivid Vervet)、 Arch Linux、 elementary OS 0.3 Freya、 Fedora 21、 Fedora 22、 Debian GNU/Linux 8.0 (Jessie)、 Debian Testing、 Debian Unstable、 openSUSE 13.2、 openSUSE Tumbleweed和Gentoo测试过了。 +同样、Arc主题的开发者告诉我们它已经成功地在Ubuntu 15.04(Vivid Vervet)、 Arch Linux、 elementary OS 0.3 Freya、 Fedora 21、 Fedora 22、 Debian GNU/Linux 8.0 (Jessie)、 Debian Testing、 Debian Unstable、 openSUSE 13.2、 openSUSE Tumbleweed和Gentoo测试过了。 ### 要求和安装指导 ### -要构建Arc主题,你需要先安装一些包,比如autoconf、 automake、 pkg-config (对Fedora的pkgconfig)、基于Debian/Ubuntu-based发行版的libgtk-3-dev或者基于RPM的gtk3-devel、 git、 gtk2-engines-pixbuf和gtk-engine-murrine (对Fedora的gtk-murrine-engine)。 +要构建Arc主题,你需要先安装一些包,比如autoconf、 automake、 pkg-config (对Fedora的pkgconfig)、基于Debian/Ubuntu-based发行版的libgtk-3-dev或者基于RPM的gtk3-devel、 git、 gtk2-engines-pixbuf和gtk-engine-murrine (对于Fedora则是gtk-murrine-engine)。 -Arc主题还没有二进制包,因此你需要从git仓库中取下最新的源码并编译。这样,打开终端并运行下面的命令,一行行地,并在每行的末尾按下回车键并等待上一步完成来继续一步。 +Arc主题还没有二进制包,因此你需要从git仓库中取下最新的源码并编译。这样,打开终端并运行下面的命令,一行行地,并在每行的末尾按下回车键并等待上一步完成来继续下一步。 git clone https://github.com/horst3180/arc-theme --depth 1 && cd arc-theme git fetch --tags @@ -20,7 +20,7 @@ Arc主题还没有二进制包,因此你需要从git仓库中取下最新的 ./autogen.sh --prefix=/usr sudo make install -就是这样!此时你已经在你的GNU/Linux发行版中安装了Arc主题,如果你使用GNOME可以使用GONME Tweak工具或者如果你使用Unity可以使用Unity Tweak工具来激活主题。玩得开心也不要忘了在下面的评论栏里留下你的截图。 +就是这样!此时你已经在你的GNU/Linux发行版中安装了Arc主题,如果你使用GNOME可以使用GONME Tweak工具,如果你使用Ubuntu的Unity可以使用Unity Tweak工具来激活主题。玩得开心但不要忘了在下面的评论栏里留下你的截图。 ![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-2.jpg) @@ -34,28 +34,9 @@ via: http://news.softpedia.com/news/Here-s-How-to-Install-the-Beautiful-Arc-GTK- 作者:[Marius Nestor][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://news.softpedia.com/editors/browse/marius-nestor [1]:https://github.com/horst3180/Arc-theme -[2]: -[3]: -[4]: -[5]: -[6]: -[7]: -[8]: -[9]: -[10]: -[11]: -[12]: -[13]: -[14]: -[15]: -[16]: -[17]: -[18]: -[19]: -[20]: From 3e54ac0873a7c79499bfcf7da0325d0ad4c6eb7f Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 16 Jun 2015 13:17:08 +0800 Subject: [PATCH 1198/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md b/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md index 4c25b0e60d..93f7b004e1 100644 --- a/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md +++ b/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md @@ -10,7 +10,7 @@ ### 要求和安装指导 ### -要构建Arc主题,你需要先安装一些包,比如autoconf、 automake、 pkg-config (对Fedora的pkgconfig)、基于Debian/Ubuntu-based发行版的libgtk-3-dev或者基于RPM的gtk3-devel、 git、 gtk2-engines-pixbuf和gtk-engine-murrine (对于Fedora则是gtk-murrine-engine)。 +要构建Arc主题,你需要先安装一些包,比如autoconf、 automake、 pkg-config (对于Fedora则是pkgconfig)、基于Debian/Ubuntu-based发行版的libgtk-3-dev或者基于RPM的gtk3-devel、 git、 gtk2-engines-pixbuf和gtk-engine-murrine (对于Fedora则是gtk-murrine-engine)。 Arc主题还没有二进制包,因此你需要从git仓库中取下最新的源码并编译。这样,打开终端并运行下面的命令,一行行地,并在每行的末尾按下回车键并等待上一步完成来继续下一步。 From 7879931b0dde38f7962bbd984506c23fdaadf47a Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 16 Jun 2015 14:13:39 +0800 Subject: [PATCH 1199/2517] Create 20150515 Extend Swap Space using Swap file in Linux.md --- ...end Swap Space using Swap file in Linux.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 translated/tech/20150515 Extend Swap Space using Swap file in Linux.md diff --git a/translated/tech/20150515 Extend Swap Space using Swap file in Linux.md b/translated/tech/20150515 Extend Swap Space using Swap file in Linux.md new file mode 100644 index 0000000000..473e24ea0d --- /dev/null +++ b/translated/tech/20150515 Extend Swap Space using Swap file in Linux.md @@ -0,0 +1,76 @@ +在linux上使用交换文件扩展交换空间 +================================================================================ +想像一种情景,当我们的Linux系统用尽交换空间时,在这种情况下, +我们想要使用swap分区扩展交换空间,但在某些情况下磁盘上的空闲分区是不可用的, +致使我们不能把它扩大。 + +因此,在这种情况下,我们可以使用交换文件增加swap空间。 + +### 以下是使用交换文件在Linux上扩展swap空间的方法 ### + +让我们首先检查现有的交换空间/分区的大小,使用命令 ‘**free -m‘** 或者 ‘**swapon -s**‘ + +![](http://www.linuxtechi.com/wp-content/uploads/2015/06/free-output-with-swap.jpg) +free-output-with-swap + +我的交换分区大小是2 GB,我们将把交换空间扩展1GB。 + +#### 第一步:使用下面的dd命令创建大小为1GB交换文件d #### + + [root@linuxtechi ~]# dd if=/dev/zero of=/swap_file bs=1G count=1 + 1+0 records in + 1+0 records out + 1073741824 bytes (1.1 GB) copied, 414.898 s, 2.6 MB/s + [root@linuxtechi ~]# + +根据你的需要替换 ‘**bs**‘ 和 ‘**count**‘ 的大小. + +####第二步:设置交换文件权限为644. #### + + [root@linuxtechi ~]# chmod 600 /swap_file + +#### 第三步:用文件开启交换区(swap_file)#### + +用mkswap命令开启交换区 + + [root@linuxtechi ~]# mkswap /swap_file + Setting up swapspace version 1, size = 1048572 KiB + no label, UUID=f7b3ae59-c09a-4dc2-ba4d-c02abb7db33b + [root@linuxtechi ~]# + +#### 第四步:在fstab文件中添加交换文件条目 #### + +在fstab文件中添加以下条目,以便交换文件每次重启后互能继续使用. + + /swap_file swap swap defaults 0 0 + +![swap-file-fstab-entry](http://www.linuxtechi.com/wp-content/uploads/2015/06/swap-file-fstab-entry.jpg) + +#### 第五步:用命令 ‘mkswap on’ 启用交换文件. #### + + [root@linuxtechi ~]# swapon /swap_file + [root@linuxtechi ~]# + +#### 第六步:现在查看交换空间 #### + +![swap-space-after-extension](http://www.linuxtechi.com/wp-content/uploads/2015/06/swap-space-after-extension.jpg) + +**Note**: 为了避免出现意外的情况,如下所示使用swapoff命令关闭它, +仅在需要使用时,使用步骤5所示的swapon命令,重新启用交换文件。. + + [root@linuxtechi ~]# swapoff /swap_file + [root@linuxtechi ~]# + +请分享您的宝贵意见或者评论此文章. + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/extend-swap-space-using-swap-file-in-linux/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ From 640fe12e08a2aedd8be1dc95fb2fcf1ea2c942e3 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 16 Jun 2015 14:17:59 +0800 Subject: [PATCH 1200/2517] PUB:20150225 How to make remote incremental backup of LUKS-encrypted disk or partition @GOLinux --- ...backup of LUKS-encrypted disk or partition.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md (81%) diff --git a/translated/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md b/published/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md similarity index 81% rename from translated/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md rename to published/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md index 645ade2261..122787ee3d 100644 --- a/translated/tech/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md +++ b/published/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md @@ -1,16 +1,16 @@ -为LUKS——加密的磁盘/分区做增量备份 +为LUKS加密的磁盘/分区做增量备份 ================================================================================ -我们中有些人出于安全原因,在家里或者[VPS][1]上通过[Linux统一密钥配置(LUKS)][2]为硬盘驱动器加密,而这些驱动器的容量很快会增长到数十或数百GB。因此,虽然我们享受着LUKS设备带来的安全感,但是我们也该开始考虑一个可能的远程备份方案了。对于安全的非现场备份,我们将需要在LUKS加密的设备上以块级别操作的东西。因此,最后我们发现这么个状况,我们每次都需要传输想要做备份的LUKS设备(比如说200GB)。很明显,这是不可行的。我们该怎么来处理这个问题呢? +我们中有些人出于安全原因,在家里或者[VPS][1]上通过[Linux统一密钥配置(LUKS)][2]为硬盘驱动器加密,而这些驱动器的容量很快会增长到数十或数百GB。因此,虽然我们享受着LUKS设备带来的安全感,但是我们也该开始考虑一个可能的远程备份方案了。对于安全的非现场备份,我们将需要能在LUKS加密的设备上以块级别操作的东西。因此,最后我们发现这么个状况,我们每次都需要传输想要做备份的整个LUKS设备(比如说200GB大)。很明显,这是不可行的。我们该怎么来处理这个问题呢? ### 一个解决方案: Bdsync ### -这时,一个卓越的开源工具来拯救我们了,它叫[Bdsync][3](多亏了Rolf Fokkens)。顾名思义,Bdsync可以通过网络同步“块设备”。对于快速同步,Bdsync会生成并对比本地/远程块设备的块MD5校验和,只同步差异部分。rsync在文件系统级别可以做的,Bdsync可以在块设备级别完成。很自然,对于LUKS加密的设备它也能工作得很好。相当地灵巧! +这时,一个卓越的开源工具来拯救我们了,它叫[Bdsync][3](多亏了Rolf Fokkens)。顾名思义,Bdsync可以通过网络同步“块设备”。对于快速同步,Bdsync会生成并对比本地/远程块设备的块的MD5校验和,只同步差异部分。rsync在文件系统级别可以做的,Bdsync可以在块设备级别完成。很自然,对于LUKS加密的设备它也能工作得很好。相当地灵巧! 使用Bdsync,首次备份将拷贝整个LUKS块设备到远程主机,因而会花费大量时间来完成。然而,在初始备份后,如果我们在LUKS设备新建一些文件,再次备份就会很快完成,因为我们只需拷贝修改过的块。经典的增量备份在起作用了! ### 安装Bdsync到Linux ### -Bdsync并不包含在[Linux][4]发行版的标准仓库中,因而你需要从源代码来构建它。使用以下针对特定版本的指令来安装Bdsync及其手册页到你的系统中。 +Bdsync并不包含在Linux发行版的标准仓库中,因而你需要从源代码来构建它。使用以下针对特定版本的指令来安装Bdsync及其手册页到你的系统中。 #### Debian,Ubuntu或Linux Mint #### @@ -46,7 +46,7 @@ Bdsync并不包含在[Linux][4]发行版的标准仓库中,因而你需要从 你第一次运行上面的命令的时候,它会花费很长一段时间,这取决于你的互联网/局域网速度,以及/dev/LOCDEV的大小。记住,你必须有两个大小相同的块设备(/dev/LOCDEV和/dev/REMDEV)。 -下一步是要将补丁文件从本地主机拷贝到远程主机。一种可能是使用scp: +下一步是要将补丁文件从本地主机拷贝到远程主机。一种方式是使用scp: # scp /some_local_path/DEV.bdsync.gz root@remote_host:/remote_path @@ -58,7 +58,7 @@ Bdsync并不包含在[Linux][4]发行版的标准仓库中,因而你需要从 ### 尾声 ### -小结之,我们演示了如何使用Bdsync来为LUKS设备实施增量备份。和rsync一样,每次备份只有一小部分数据,而不是整个LUKS设备,需要被推送到非现场备份点,这样会节省带宽和备份时间。剩下来,需要保证所有数据传输通过SSH或SCP加固安全,事实上设备自身是由LUKS加密的。也可以通过使用可以运行bdsync的专用用户(而非root)来改善该配置。我们也可以将bdsync用于任何块设备,如LVM卷或RAID磁盘,也可以很轻易地设置Bdsync备份本地磁盘到USB驱动器上。如你所见,它有着无限可能性! +小结之,我们演示了如何使用Bdsync来为LUKS设备实施增量备份。和rsync一样,每次备份只有一小部分数据,而不是整个LUKS设备,需要被推送到非现场备份点,这样会节省带宽和备份时间。剩下来,需要通过SSH或SCP来保证所有数据传输的安全,事实上设备自身是由LUKS加密的。也可以通过使用可以运行bdsync的专用用户(而非root)来改进该配置。我们也可以将bdsync用于任何块设备,如LVM卷或RAID磁盘,也可以很轻易地设置Bdsync备份本地磁盘到USB驱动器上。如你所见,它有着无限可能性! 随时分享你的想法。 @@ -68,7 +68,7 @@ via: http://xmodulo.com/remote-incremental-backup-luks-encrypted-disk-partition. 作者:[Iulian Murgulet][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -77,4 +77,4 @@ via: http://xmodulo.com/remote-incremental-backup-luks-encrypted-disk-partition. [2]:http://xmodulo.com/how-to-create-encrypted-disk-partition-on-linux.html [3]:http://bdsync.rolf-fokkens.nl/ [4]:http://xmodulo.com/recommend/linuxbook -[5]:http://xmodulo.com/how-to-enable-ssh-login-without.html +[5]:https://linux.cn/article-5444-1.html From 2c7380a8caf07fc3bc900f18411e844830de39b3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 16 Jun 2015 15:54:00 +0800 Subject: [PATCH 1201/2517] =?UTF-8?q?20150616-1=20=E9=80=89=E9=A2=98=20sor?= =?UTF-8?q?ry:=E6=98=A8=E5=A4=A9=E7=9A=84=E6=96=87=E7=AB=A0=E5=B1=85?= =?UTF-8?q?=E7=84=B6=E6=96=87=E4=BB=B6=E5=90=8D=E6=A0=87=E9=94=99=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...PHP or PhpMyAdmin in RHEL or CentOS 7.0.md | 238 ++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md diff --git a/sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md b/sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md new file mode 100644 index 0000000000..82be4748e0 --- /dev/null +++ b/sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md @@ -0,0 +1,238 @@ +Installing LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin) in RHEL/CentOS 7.0 +================================================================================ +Skipping the LAMP introduction, as I’m sure that most of you know what is all about. This tutorial will concentrate on how to install and configure famous LAMP stack – Linux Apache, MariaDB, PHP, PhpMyAdmin – on the last release of Red Hat Enterprise Linux 7.0 and CentOS 7.0, with the mention that both distributions have upgraded httpd daemon to Apache HTTP 2.4. + +![Install LAMP in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-LAMP-in-CentOS-7.jpg) + +Install LAMP in RHEL/CentOS 7.0 + +#### Requirements #### + +Depending on the used distribution, RHEL or CentOS 7.0, use the following links to perform a minimal system installation, using a static IP Address for network configuration. + +**For RHEL 7.0** + +- [RHEL 7.0 Installation Procedure][1] +- [Register and Enable Subscriptions/Repositories on RHEL 7.0][2] + +**For CentOS 7.0** + +- [CentOS 7.0 Installation Procedure][3] + +### Step 1: Install Apache Server with Basic Configurations ### + +**1. After performing a minimal system installation and configure your server network interface with a [Static IP Address on RHEL/CentOS 7.0][4], go ahead and install Apache 2.4 httpd service binary package provided form official repositories using the following command.** + + # yum install httpd + +![Install Apache in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Apache-in-CentOS-7.png) + +Install Apache Web Server + +**2. After yum manager finish installation, use the following commands to manage Apache daemon, since RHEL and CentOS 7.0 both migrated their init scripts from SysV to systemd – you can also use SysV and Apache scripts the same time to manage the service.** + + # systemctl status|start|stop|restart|reload httpd + + OR + + # service httpd status|start|stop|restart|reload + + OR + + # apachectl configtest| graceful + +![Start Apache in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Start-Apache-in-CentOS-7.png) + +Start Apache Web Server + +**3. On the next step start Apache service using systemd init script and open RHEL/CentOS 7.0 Firewall rules using firewall-cmd, which is the default command to manage iptables through firewalld daemon.** + + # firewall-cmd --add-service=http + +**NOTE**: Make notice that using this rule will lose its effect after a system reboot or firewalld service restart, because it opens on-fly rules, which are not applied permanently. To apply consistency iptables rules on firewall use –permanent option and restart firewalld service to take effect. + + # firewall-cmd --permanent --add-service=http + # systemctl restart firewalld + +![Enable Firewall in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-Firewall-in-CentOS-7.png) + +Enable Firewall in CentOS 7 + +Other important Firewalld options are presented below: + + # firewall-cmd --state + # firewall-cmd --list-all + # firewall-cmd --list-interfaces + # firewall-cmd --get-service + # firewall-cmd --query-service service_name + # firewall-cmd --add-port=8080/tcp + +**4. To verify Apache functionality open a remote browser and type your server IP Address using HTTP protocol on URL (http://server_IP), and a default page should appear like in the screenshot below.** + +![Apache Default Page](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Default-Page.png) + +Apache Default Page + +**5. For now, Apache DocumentRoot path it’s set to /var/www/html system path, which by default doesn’t provide any index file. If you want to see a directory list of your DocumentRoot path open Apache welcome configuration file and set Indexes statement from – to + on directive, using the below screenshot as an example.** + + # nano /etc/httpd/conf.d/welcome.conf + +![Apache Directory Listing](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Directory-Listing.png) + +Apache Directory Listing + +**6. Close the file, restart Apache service to reflect changes and reload your browser page to see the final result.** + + # systemctl restart httpd + +![Apache Index File](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Index-File.png) + +Apache Index File + +### Step 2: Install PHP5 Support for Apache ### + +**7. Before installing PHP5 dynamic language support for Apache, get a full list of available PHP modules and extensions using the following command.** + + # yum search php + +![Install PHP in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-PHP-in-CentOS-7.png) + +Install PHP in CentOS 7 + +**8. Depending on what type of applications you want to use, install the required PHP modules from the above list, but for a basic MariaDB support in PHP and PhpMyAdmin you need to install the following modules.** + + # yum install php php-mysql php-pdo php-gd php-mbstring + +![Install PHP Modules in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-PHP-Modules-in-CentOS-7.png) + +Install PHP Modules + +![Install PHP mbstring Module](http://www.tecmint.com/wp-content/uploads/2014/07/Install-PHP-mbstring-in-CentOs-7.png) + +Install PHP mbstring Module + +**9. To get a full information list on PHP from your browser, create a info.php file on Apache Document Root using the following command from root account, restart httpd service and direct your browser to the http://server_IP/info.php address.** + + # echo "" > /var/www/html/info.php + # systemctl restart httpd + +![Check PHP Info in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Check-PHP-Info-in-CentOS-7.png) + +Check PHP Info in CentOS 7 + +**10. If you get an error on PHP Date and Timezone, open php.ini configuration file, search and uncomment date.timezone statement, append your physical location and restart Apache daemon.** + + # nano /etc/php.ini + +Locate and change date.timezone line to look like this, using [PHP Supported Timezones list][5]. + + date.timezone = Continent/City + +![Set Timezone in PHP](http://www.tecmint.com/wp-content/uploads/2014/07/Set-Time-Zone-in-CentOS.png) + +Set Timezone in PHP + +### Step 3: Install and Configure MariaDB Database ### + +**11. Red Hat Enterprise Linux/CentOS 7.0 switched from MySQL to MariaDB for its default database management system. To install MariaDB database use the following command.** + + # yum install mariadb-server mariadb + +![Install MariaDB in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-MariaDB-in-CentOs-7.png) + +Install MariaDB in CentOS 7 + +**12. After MariaDB package is installed, start database daemon and use mysql_secure_installation script to secure database (set root password, disable remotely logon from root, remove test database and remove anonymous users).** + + # systemctl start mariadb + # mysql_secure_installation + +![Start MariaDB Database](http://www.tecmint.com/wp-content/uploads/2014/07/Start-MariaDB-in-CentOS-7.png) + +Start MariaDB Database + +![Secure MySQL Installation](http://www.tecmint.com/wp-content/uploads/2014/07/Secure-MySQL-Installation.png) + +Secure MySQL Installation + +**13. To test database functionality login to MariaDB using its root account and exit using quit statement.** + + mysql -u root -p + MariaDB > SHOW VARIABLES; + MariaDB > quit + +![Connect MySQL Database in CentOS](http://www.tecmint.com/wp-content/uploads/2014/07/Connect-MySQL-Installation.png) + +Connect MySQL Database + +### Step 4: Install PhpMyAdmin ### + +**14. By default official RHEL 7.0 or CentOS 7.0 repositories doesn’t provide any binary package for PhpMyAdmin Web Interface. If you are uncomfortable using MySQL command line to manage your database you can install PhpMyAdmin package by enabling CentOS 7.0 rpmforge repositories using the following command.** + + # yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm + +After enabling rpmforge repository, next install PhpMyAdmin. + + # yum install phpmyadmin + +![Enable RPMForge in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-RPMForge-in-CentOS-7.png) + +Enable RPMForge Repository + +**15. Next configure PhpMyAdmin to allow connections from remote hosts by editing phpmyadmin.conf file, located on Apache conf.d directory, commenting the following lines.** + + # nano /etc/httpd/conf.d/phpmyadmin.conf + +Use a # and comment this lines. + + # Order Deny,Allow + # Deny from all + # Allow from 127.0.0.1 + +![Allow Remote PhpMyAdmin Access](http://www.tecmint.com/wp-content/uploads/2014/07/Allow-Remote-PhpMyAdmin-Access.png) + +Allow Remote PhpMyAdmin Access + +**16. To be able to login to PhpMyAdmin Web interface using cookie authentication method add a blowfish string to phpmyadmin config.inc.php file like in the screenshot below using the [generate a secret string][6], restart Apache Web service and direct your browser to the URL address http://server_IP/phpmyadmin/.** + + # nano /etc/httpd/conf.d/phpmyadmin.conf + # systemctl restart httpd + +![Add Blowfish in PhpMyAdmin](http://www.tecmint.com/wp-content/uploads/2014/07/Add-Blowfish-PhpMyAdmin.png) + +Add Blowfish in PhpMyAdmin + +![PhpMyAdmin Dashboard](http://www.tecmint.com/wp-content/uploads/2014/07/Login-to-PhpMyAdmin.png) + +PhpMyAdmin Dashboard + +### Step 5: Enable LAMP System-wide ### + +**17. If you need MariaDB and Apache services to be automatically started after reboot issue the following commands to enable them system-wide.** + + # systemctl enable mariadb + # systemctl enable httpd + +![Enable Services System Wide](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-Services-System-Wide.png) + +Enable Services System Wide + +That’s all it takes for a basic LAMP installation on Red Hat Enterprise 7.0 or CentOS 7.0. The next series of articles related to LAMP stack on CentOS/RHEL 7.0 will discuss how to create Virtual Hosts, generate SSL Certificates and Keys and add SSL transaction support for Apache HTTP Server. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-lamp-in-centos-7/ + +作者:[Matei Cezar][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/cezarmatei/ +[1]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ +[2]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ +[3]:http://www.tecmint.com/centos-7-installation/ +[4]:http://www.tecmint.com/configure-network-interface-in-rhel-centos-7-0/ +[5]:http://php.net/manual/en/timezones.php +[6]:http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator \ No newline at end of file From 0df0743ac5412bbc0c3af5fe739cb15bdfd0248c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 16 Jun 2015 16:23:21 +0800 Subject: [PATCH 1202/2517] =?UTF-8?q?20150616-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0150616 Linux Humor on the Command-line.md | 127 +++++++++++++ ...20150616 LINUX 101--POWER UP YOUR SHELL.md | 177 ++++++++++++++++++ 2 files changed, 304 insertions(+) create mode 100644 sources/share/20150616 Linux Humor on the Command-line.md create mode 100644 sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md diff --git a/sources/share/20150616 Linux Humor on the Command-line.md b/sources/share/20150616 Linux Humor on the Command-line.md new file mode 100644 index 0000000000..84c808e555 --- /dev/null +++ b/sources/share/20150616 Linux Humor on the Command-line.md @@ -0,0 +1,127 @@ +Linux Humor on the Command-line +================================================================================ +The desktop is full of eye candy. It enhances the visual experience and, in some cases, can also increase functionality of software. But it also makes software fun. Working on the command-line does not have to be always serious. If you want some fun on the command-line, there are lots of commands to raise a smile. + +Linux is a fun operating system. Linux offers a vast collection of small open source utilities that perform functions ranging from the obvious to the bizarre. It is the quality and selection of these tools that help Linux stand out. Check out these 7 small utilities. + +### lolcat ### + +![lolcat](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-lolcat.png) + +lolcat is a program that concatenates files, or standard input, to standard output (like the generic cat), and adds rainbow coloring to it. + +lolcat is often combined with other tools such as toilet or figlet to generate text. This software should not be confused with a lolcat; an image macro of one or more cats. + +lolcat was written by Moe. + +Website: [github.com][1] + +### cowsay ### + +![cowsay](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-cowsay.png) + +cowsay is a configurable open source program which generates ASCII pictures of a cow with a message in a speech bubble. cowsay is written in Perl. + +cowsay is not limited to generating pictures of cows. It can generate pre-made images of other animals including a duck, elephant, koala, moose, pony, sheep, stegosaurus, and turkey, as well as cheese, snowman, and a skeleton. + +There is a related program called cowthink, which generates cows with thought bubbles, as opposed to speech bubbles. + +Features include: + +- Make scripts more interesting +- Borg mode +- Ways to alter the way the cow looks, for example making the cow look greedy, paranoid, stoned, tired, wired, youthful and more +- xcowsay variant available + +Website: [nog.net][2] + +### doge ### + +![doge](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-doge.png) + +doge is a simple motd script based on the slightly stupid but very funny doge meme. It prints random grammatically incorrect statements that are sometimes based on things from your computer. + +Doge is an Internet meme that became popular in 2013. The meme typically consists of a picture of a Shiba Inu accompanied by multicolored text in Comic Sans font in the foreground. The text, representing a kind of internal monologue, is deliberately written in a form of broken English. + +- Randomly placed and colored random strings, complete with broken english +- Awesome Shibe in the terminal +- Fetching of system data, such as hostname, running processes, current user and $EDITOR +- If you have lolcat, you can do this gem: while true; do doge | lolcat -a -d 100 -s 100 -p 1; done +- stdin support: ls /usr/bin | doge will doge-print some of the executables found in /usr/bin. wow. There are also multiple command line switches that control filtering and statistical frequency of words + +Website: [github.com/thiderman/doge][3] + +### ASCIIQuarium ### + +![Asciiquarium](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-Asciiquarium.png) + +ASCIIQuarium is an aquarium/sea animation in ASCII art. Enjoy the fascinating creatures that live in the water from your computer. + +To run ASCIIQuarium you need to have installed Perl's curses package, and the Term::Animation module. To install the former, type sudo apt-get install libcurses-perl. To install the latter, type sudo cpan Term::Animation, both at the command line. + +Features include: + +- Multicolored fish +- Amusing animations, including a fish hook +- There are swans, ducks, dolphins, and ships too + +Website: [www.robobunny.com][4] + +### sl - Steam Locomotive ### + +![sl](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-sl.png) + +sl is an amusing command line tool that displays animations to correct users who accidentally type sl instead of ls. + +I'm rather sloppy at typing, preferring speed to accuracy. But typos can be a tad dangerous on the command line. So sl can serve as a practical reminder of curing a bad habit of mistyping. It always raises a chuckle too. + +Features include: + +- With -F, train flies +- With -l, it shows a small train +- With -a, an accident seems to happen + +Website: [github.com/mtoyoda/sl][5] + +### aafire ### + +![aafire](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-aafire.png) + +aafire displays burning ASCII art flames in the terminal. It demonstrates the the capabilities of the aalib library, an ascii art library. + +Website: [aa-project.sourceforge.net/aalib][6] + +### CMatrix ### + +![CMatrix](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-CMatrix.png) + +CMatrix is an ncurses program that simulates the display from "The Matrix". If you have been living in a cave for the past 15 years, you might not know The Matrix is a 1999 American science fiction acting film starring Keanu Reeves, Laurence Fishburne, Carrie-Anne Moss, Hugo Weaving, and Joe Pantoliano. + +It works with terminal settings up to 132x300 and can scroll lines all at the same rate or asynchronously and at a user-defined speed. + +Features include: + +- Change the text colour +- Turn on bold characters +- Asynchronous scroll +- Use old-style scrolling +- "Screensaver" mode + +Website: [www.asty.org/cmatrix][7] + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150614112018846/Humor.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://github.com/busyloop/lolcat +[2]:https://web.archive.org/web/20120225123719/http://www.nog.net/%7Etony/warez/cowsay.shtml +[3]:https://github.com/thiderman/doge +[4]:http://www.robobunny.com/projects/asciiquarium/html/ +[5]:https://github.com/mtoyoda/sl +[6]:http://aa-project.sourceforge.net/aalib/ +[7]:http://www.asty.org/cmatrix/ \ No newline at end of file diff --git a/sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md b/sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md new file mode 100644 index 0000000000..ef9f3d4937 --- /dev/null +++ b/sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md @@ -0,0 +1,177 @@ +LINUX 101: POWER UP YOUR SHELL +================================================================================ +> Get a more versatile,featureful and colourful command line interface with our guide to shell basics. + +**WHY DO THIS?** + +- Make life at the shell prompt easier and faster. +- Resume sessions after losing a connection. +- Stop pushing around that fiddly rodent! + +![bash1](http://www.linuxvoice.com/wp-content/uploads/2015/02/bash1-large15.png) + +Here’s our souped-up prompt on steroids. It’s a bit long for this small terminal window, but you can tweak it to your liking. + +As a Linux user, you’re probably familiar with the shell (aka command line). You may pop up the occasional terminal now and then for some essential jobs that you can’t do at the GUI, or perhaps you live in a tiling window manager environment and the shell is your main way of interacting with your Linux box. + +In either case, you’re probably using the stock Bash configuration that came with your distro – and while it’s powerful enough for most jobs, it could still be a lot better. In this tutorial we’ll show you how to pimp up your shell to make it more informative, useful and pleasant to work in. We’ll customise the prompt to make it provide better feedback than the defaults, and we’ll show you how to manage sessions and run multiple programs together with the incredibly cool tmux tool. And for a bit of eye candy, we’ll look at colour schemes as well. So, onwards! + +### Make your prompt sing ### + +Most distributions ship with very plain prompts – they show a bit of information, and generally get you by, but the prompt can do so much more. Take the default prompt on a Debian 7 installation, for instance: + + mike@somebox:~$ + +This shows the user, hostname, current directory and account type symbol (if you switch to root, the **$** changes to #). But where is this information stored? The answer is in the **PS1** environment variable. If you enter **echo $PS1** you’ll see this at the end of the text string that appears: + + u@h:w$ + +This looks a bit ugly, and at first glance you might start screaming, assuming it to be a dreaded regular expression, but we’re not going to fry our brains with the complexity of those. No, the slashes here are escape sequences, telling the prompt to do special things. The **u** part, for instance, tells the prompt to show the username, while w means the working directory. + +Here’s a list of things you can use in the prompt: + +- d The current date. +- h The hostname. +- n A newline character. +- A The current time (HH:MM). +- u The current user. +- w (lowercase) The whole working directory. +- W (uppercase) The basename of the working directory. +- $ A prompt symbol that changes to # for root. +- ! The shell history number of this command. + +To clarify the difference in the **w** and **W** options: with the former, you’ll see the whole path for the directory in which you’re working (eg **/usr/local/bin**), whereas for the latter it will just show the **bin** part. + +Now, how do you go about changing the prompt? You need to modify the contents of the **PS1** environment variable. Try this: + + export PS1=”I am u and it is A $” + +Now your prompt will look something like: + + I am mike and it is 11:26 $ + +From here you can experiment with the other escape sequences shown above to create the prompt of your dreams. But wait a second – when you log out, all of your hard work will be lost, because the value of the **PS1** environment variable is reset each time you start a terminal. The simplest way to fix this is to open the **.bashrc** configuration file (in your home directory) and add the complete export command to the bottom. This **.bashrc** file will be read by Bash every time you start a new shell session, so your beefed-up prompt will always appear. You can also spruce up your prompt with extra colour. This is a bit tricky at first, as you have to use some rather odd-looking escape sequences, but the results can be great. Add this to a point in your **PS1** string and it will change the text to red: + + [e[31m] + +You can change 31 here to other numbers for different colours: + +- 30 Black +- 32 Green +- 33 Yellow +- 34 Blue +- 35 Magenta +- 36 Cyan +- 37 White + +So, let’s finish off this section by creating the mother of all prompts, using the escape sequences and colours we’ve already looked at. Take a deep breath, flex your fingers, and then type this beast: + + export PS1=”(!) [e[31m][A] [e[32m]u@h [e[34m]w [e[30m]$ “ + +This provides a Bash command history number, current time, and colours for the user/hostname combination and working directory. If you’re feeling especially ambitious, you can change the background colours as well as the foreground ones, for really striking combinations. The ever useful Arch wiki has a full list of colour codes: [http://tinyurl.com/3gvz4ec][1]. + +> ### Shell essentials ### +> +> If you’re totally new to Linux and have just picked up this magazine for the first time, you might find the tutorial a bit heavy going. So here are the basics to get you familiar with the shell. It’s usually found as Terminal, XTerm or Konsole in your menus, and when you start it the most useful commands are: +> +> **ls** (list files); **cp one.txt two.txt** (copy file); **rm file.txt** (remove file); **mv old.txt new.txt** (move or rename); +> +> **cd /some/directory** (change directory); **cd ..** (change to directory above); **./program** (run program in current directory); **ls > list.txt** (redirect output to a file). +> +> Almost every command has a manual page explaining options (eg **man ls** – press Q to quit the viewer). There you can learn about command options, so you can see that **ls -la** shows a detailed list including hidden files. Use the up and down cursor keys to cycle through previous commands, and use Tab after entering part of a file or directory name to auto-complete it. + +### Tmux: A window manager for your shell ### + +A window manager inside a text mode environment – it sounds crazy, right? Well, do you remember when web browsers first implemented tabbed browsing? It was a major step forward in usability at the time, and reduced clutter in desktop taskbars and window lists enormously. Instead of having taskbar or pager icons for every single site you had open, you just had the one button for your browser, and then the ability to switch sites inside the browser itself. It made an awful lot of sense. + +If you end up running several terminals at the same time, a similar situation occurs; you might find it annoying to keep jumping between them, and finding the right one in your taskbar or window list each time. With a text-mode window manager you can not only run multiple shell sessions simultaneously inside the same terminal window, but you can even arrange them side-by-side. + +And there’s another benefit too: detaching and reattaching. The best way to see how this works is to try it yourself. In a terminal window, enter **screen** (it’s installed by default on most distros, or will be available in your package repositories). Some welcome text appears – just hit Enter to dismiss it. Now run an interactive text mode program, such as **nano**, and close the terminal window. + +In a normal shell session, the act of closing the window would terminate every process running inside it – so your Nano editing session would be a goner. But not with screen. Open a new terminal and enter: + + screen -r + +And voilà: the Nano session you started before is back! + +When you originally ran **screen**, it created a new shell session that was independent and not tied to a specific terminal window, so it could be detached and reattached (hence the **-r** option) later. + +This is especially useful if you’re using SSH to connect to another machine, doing some work, and don’t want a flaky connection to ruin all your progress. If you do your work inside a **screen** session and your connection goes down (or your laptop battery dies, or your computer explodes), you can simply reconnect/recharge/buy a new computer, then SSH back in to the remote box, run **screen -r** to reattach and carry on from where you left off. + +Now, we’ve been talking about GNU **screen** here, but the title of this section mentions tmux. Essentially, **tmux** (terminal multiplexer) is like a beefed up version of **screen** with lots of useful extra features, so we’re going to focus on it here. Some distros include **tmux** by default; in others it’s usually just an **apt-get, yum install** or **pacman -S** command away. + +Once you have it installed, enter **tmux** to start it. You’ll notice right away that there’s a green line of information along the bottom. This is very much like a taskbar from a traditional window manager: there’s a list of running programs, the hostname of the machine, a clock and the date. Now run a program, eg Nano again, and hit Ctrl+B followed by C. This creates a new window inside the tmux session, and you can see this in the taskbar at the bottom: + + 0:nano- 1:bash* + +Each window has a number, and the currently displayed program is marked with an asterisk symbol. Ctrl+B is the standard way of interacting with tmux, so if you hit that key combo followed by a window number, you’ll switch to that window. You can also use Ctrl+B followed by N and P to switch to the next and previous windows respectively – or use Ctrl+B followed by L to switch between the two most recently used windows (a bit like the classic Alt+Tab behaviour on the desktop). To get a window list, use Ctrl+B followed by W. + +So far, so good: you can now have multiple programs running inside a single terminal window, reducing clutter (especially if you often have multiple SSH logins active on the same remote machine). But what about seeing two programs at the same time? + +For this, tmux uses “panes”. Hit Ctrl+B followed by % and the current window will be split into two sections, one on the left and one on the right. You can switch between them Using Ctrl+B followed by O. This is especially useful if you want to see two things at the same time – eg a manual page in one pane, and an editor with a configuration file in another. + +Sometimes you’ll want to resize the individual panes, and this is a bit trickier. First you have to hit Ctrl+B followed by : (colon), which turns the tmux bar along the bottom into a dark orange colour. You’re now in command mode, where you can type in commands to operate tmux. Enter **resize-pane -R** to resize the current pane one character to the right, or use **-L** to resize in a leftward direction. These may seem like long commands for a relatively simple operation, but note that the tmux command mode (started with the aforementioned colon) has tab completion. So you don’t have to type the whole command – just enter “**resi**” and hit Tab to complete. Also note that the **tmux** command mode also has a history, so if you want to repeat the resize operation, hit Ctrl+B followed by colon and then use the up cursor key to retrieve the command that you entered previously. + +Finally, let’s look at detaching and reattaching – the awesome feature of screen we demonstrated earlier. Inside tmux, hit Ctrl+B followed by D to detach the current tmux session from the terminal window, which leaves everything running in the background. To reattach to the session use **tmux a**. But what happens if you have multiple tmux sessions running? Use this command to list them: + + tmux ls + +This shows a number for each session; if you want to reattach to session 1, use tmux a -t 1. tmux is hugely configurable, with the ability to add custom keybindings and change colour schemes, so once you’re comfortable with the main features, delve into the manual page to learn more. + +tmux: a window manager for your shell + +![tmux](http://www.linuxvoice.com/wp-content/uploads/2015/02/tmux-large13.jpg) + +Here’s tmux with two panes open: the left has Vim editing a configuration file, while the right shows a manual page + +> ### Zsh: an alternative shell ### +> +> Choice is good, but standardisation is also important as well. So it makes sense that almost every mainstream Linux distribution uses the Bash shell by default – although there are others. Bash provides pretty much everything you need from a shell, including command history, filename completion and lots of scripting ability. It’s mature, reliable and well documented – but it’s not the only shell in town. +> +> Many advanced users swear by Zsh, the Z Shell. This is a replacement for Bash that offers almost all of the same functionality, with some extra features on top. For instance, in Zsh you can enter **ls** - and hit Tab to get quick descriptions of the various options available for **ls**. No need to open the manual page! +> +> Zsh sports other great auto-completion features: type **cd /u/lo/bi** and hit Tab, for instance, and the full path of **/usr/local/bin** will appear (providing there aren’t other paths containing **u**, **lo** and **bi**). Or try **cd** on its own followed by Tab, and you’ll see nicely coloured directory listings – much better than the plain ones used by Bash. +> +> Zsh is available in the package repositories of all major distros; install it and enter **zsh** to start it. To change your default shell from Bash to Zsh, use the **chsh** command. And for more information visit [www.zsh.org][2]. + +### The terminals of the Future ### + +You might be wondering why the application that contains your command prompt is called a terminal. Back in the early days of Unix, people tended to work on multi-user machines, with a giant mainframe computer occupying a room somewhere in a building, and people connected to it using screen and keyboard combinations at the end of some wires. These terminal machines were often called “dumb”, because they didn’t do any important processing themselves – they just displayed whatever was sent down the wire from the mainframe, and sent keyboard presses back to it. + +Today, almost all of us do the actual processing on our own machines, so our computers are not terminals in a traditional sense. This is why programs like **XTerm**, Gnome Terminal, Konsole etc. are called “terminal emulators” – they provide the same facilities as the physical terminals of yesteryear. And indeed, in many respects they haven’t moved on much. Sure, we have anti-aliased fonts now, better colours and the ability to click on URLs, but by and large they’ve been working in the same way for decades. + +Some programmers are trying to change this though. **Terminology** ([http://tinyurl.com/osopjv9][3]), from the team behind the ultra-snazzy Enlightenment window manager, aims to bring terminals into the 21st century with features such as inline media display. You can enter **ls** in a directory full of images and see thumbnails, or even play videos from directly inside your terminal. This makes the terminal work a bit more like a file manager, and means that you can quickly check the contents of media files without having to open them in a separate application. + +Then there’s Xiki ([www.xiki.org][4]), which describes itself as “the command revolution”. It’s like a cross between a traditional shell, a GUI and a wiki; you can type commands anywhere, store their output as notes for reference later, and create very powerful custom commands. It’s hard to describe it in mere words, so the authors have made a video (see the Screencasts section of the **Xiki** site) which shows how much potential it has. + +And Xiki is definitely not a flash in the pan project that will die of bitrot in a few months. The authors ran a successful Kickstarter campaign to fund its development, netting over $84,000 at the end of July. Yes, you read that correctly – $84K for a terminal emulator. It might be the most unusual crowdfunding campaign since some crazy guys decided to start their own Linux magazine… + +### Next-gen terminals ### + +Many command line and text-based programs match their GUI equivalents for feature parity, and are often much faster and more efficient to use. Our recommendations: **Irssi** (IRC client); **Mutt** (mail client); **rTorrent** (BitTorrent); **Ranger** (file manager); **htop** (process monitor). ELinks does a decent job for web browsing, given the limitations of the terminal, and it’s useful for reading text-heavy websites such as Wikipedia. + +> ### Fine-tune your colour scheme ### +> +> We’re not obsessed with eye-candy at Linux Voice, but we do recognise the importance of aesthetics when you’re staring at something for several hours every day. Many of us love to tweak our desktops and window managers to perfection, crafting pixel-perfect drop shadows and fiddling with colour schemes until we’re 100% happy. (And then fiddling some more out of habit.) +> +> But then we tend to ignore the terminal window. Well, that deserves some love too, and at [http://ciembor.github.io/4bit][5] you’ll find a highly awesome colour scheme designer that can export settings for all of the popular terminal emulators (**XTerm, Gnome Terminal, Konsole and Xfce4 Terminal are among the apps supported.**) Move the sliders until you attain colour scheme nirvana, then click on the Get Scheme button at the top-right of the page. +> +> Similarly, if you spend a lot of time in a text editor such as Vim or Emacs, it’s worth using a well-crafted palette there as well. **Solarized at** [http://ethanschoonover.com/solarized][6] is an excellent scheme that’s not just pretty, but designed for maximum usability, with plenty of research and testing behind it. + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/linux-101-power-up-your-shell-8/ + +作者:[Ben Everard][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/ben_everard/ +[1]:http://tinyurl.com/3gvz4ec +[2]:http://www.zsh.org/ +[3]:http://tinyurl.com/osopjv9 +[4]:http://www.xiki.org/ +[5]:http://ciembor.github.io/4bit +[6]:http://ethanschoonover.com/solarized \ No newline at end of file From 9e661a759aeb9ced869d008b7b972c3aa1f12e29 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 16 Jun 2015 16:34:57 +0800 Subject: [PATCH 1203/2517] =?UTF-8?q?20150616-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150616 XBMC--build a remote control.md | 264 ++++++++++++++++++ 1 file changed, 264 insertions(+) create mode 100644 sources/tech/20150616 XBMC--build a remote control.md diff --git a/sources/tech/20150616 XBMC--build a remote control.md b/sources/tech/20150616 XBMC--build a remote control.md new file mode 100644 index 0000000000..25de9fd06f --- /dev/null +++ b/sources/tech/20150616 XBMC--build a remote control.md @@ -0,0 +1,264 @@ +XBMC: build a remote control +================================================================================ +**Take control of your home media player with a custom remote control running on your Android phone.** + +**XBMC** is a great piece of software, and can turn almost can computer into a media centre. It can play music and videos, display pictures, and even fetch a weather forecast. To make it easy to use in a home theatre setup, you can control it via mobile phone apps that access a server running on the XBMC machine via Wi-Fi. There are loads of these available for almost all smartphone systems. + +> ### Kodi ### +> +> By the time you read this, **XBMC** may be no more. The project team have decided to rename it **Kodi** for legal reasons (and because **XBMC**, or X**-Box Media Centre**, refers to older hardware that is no longer supported). Other than the name, though, nothing has changed. Or at least nothing other than the usual raft of improvements you’d expect from a new release. This shouldn’t affect the remote software though, and it should work on both existing **XBMC** systems, and newer Kodi systems. + +We’ve recently set up an **XBMC** system for playing music, and none of the XBMC remotes we found really excel at this task, especially when the TV attached to the media centre is turned off. They were all a bit too complex, as they packed too much functionality into small screens. We wanted a system designed from the ground up to just access a music library and a radio addon, so we decided to build one ourselves. It didn’t need to be able to access the full capabilities of XBMC, because for tasks other than music, we’d simply switch back to a general-purpose XBMC remote control. Our test system was a Raspberry Pi running the RaspBMC distribution, but nothing here is specific to either the Pi or that distro, and it should work on any Linux-based XBMC system provided the appropriate packages are available. + +The first thing a remote control needs is a user interface. Many XBMC remote controls are written as standalone apps. However, this is just for our music, and we want to be accessible to guests without them having to install anything. The obvious solution is to make a web interface. XBMC does have a built-in web server, but to give us more control, we decided to use a separate web framework. There’s no problem running more than one web server on a computer at a time, but they can’t run on the same port. + +There are quite a few web frameworks available. We’ve used Bottle because it’s a simple, fast framework, and we don’t need any complex functions. Bottle is a Python module, so that’s the language in which we’ll write the server. + +You’ll probably find Bottle in your package manager. In Debian-based systems (including Raspbmc), you can grab it with: + + sudo apt-get install python-bottle + +A remote control is really just a layer that connects the user to a system. Bottle provides what we need to interact with the user, and we’ll interact with **XBMC** using its JSON API. This enables us to control the media player by sending JSON-encoded information. + +We’re going to use a simple wrapper around the XBMC JSON API called xbmcjson. It’s just enough to allow you send requests without having to worry about the actual JSON formatting or any of the banalities of communicating with a server. It’s not included in the PIP package manager, so you need to install it straight from **GitHub**: + + git clone https://github.com/jcsaaddupuy/python-xbmc.git + cd python-xbmc + sudo python setup.py install + +This is everything you need, so let’s get coding. + +#### Get started with Bottle #### + +The basic structure of our program is: + + from xbmcjson import XBMC + from bottle import route, run, template, redirect, static_file, request + import os + xbmc = XBMC(“http://192.168.0.5/jsonrpc”, “xbmc”, “xbmc”) + @route(‘/hello/’) + def index(name): + return template(‘

Hello {{name}}!

’, name=name) + run(host=”0.0.0.0”, port=8000) + +This connects to **XBMC** (though doesn’t actually use it); then Bottle starts serving up the website. In this case, it listens on host 0.0.0.0 (which is every hostname), and port 8000. It only has one site, which is /hello/XXXX where XXXX can be anything. Whatever XXXX is gets passed to index() as the parameter name. This then passes it to the template, which substitutes it into the HTML. + +You can try this out by entering the above into a file (we’ve called it remote.py), and starting it with: + + python remote.py + +You can then point your browser to localhost:8000/hello/world to see the template in action. + +@route() sets up a path in the web server, and the function index() returns the data for that path. Usually, this means returning HTML that’s generated via a template, but it doesn’t have to be (as we’ll see later). + +As we go on, we’ll add more routes to the application to make it a fully-featured XBMC remote control, but it will still be structured in the same way. + +The XBMC JSON API can be accessed by any computer on the same network as the XBMC machine. This means that you can develop it on your desktop, then deploy it to your media centre rather than fiddle round uploading every change to your home theatre PC. + +Templates – like the simple one in the previous example – are a way of combining Python and HTML to control the output. In principal, they can do quite a bit of processing, but they can get messy. We’ll use them just to format the data correctly. Before we can do that, though, we have to have some data. + +> ### Paste ### +> +> Bottle includes its own web server, which is what we’ve been using for testing the remote control. However, we found that it didn’t always perform well. When we put the remote into action, we wanted something that could deliver pages a bit quicker. Bottle can work with quite a few different web servers, and we found Paste worked quite well. In order to use this, just install it (in the package python-paste on Debian), and change the run call to: +> +> run(host=hostname, port=hostport, server=”paste”) +> +> You can see details of how to use other servers at [http://bottlepy.org/docs/dev/deployment.html][1]. + +#### Getting data from XBMC #### + +The XBMC JSON API is split up into 14 namespaces: JSONRPC, Player, Playlist, Files, AudioLibrary, VideoLibrary, Input, Application, System, Favourites, Profiles, Settings, Textures and XBMC. Each of these is available from an XBMC object in Python (apart from Favourites, in an apparent oversight). In each of these namespaces there are methods that you can use to control the application. For example, Playlist.GetItems() can be used to get the items on a particular playlist. The server returns data to us in JSON, but the xbmcjson module converts it to a Python dictionary for us. + +There are two items in XBMC that we need to use to control playback: players and playlists. Players hold a playlist and move through it item by item as each song finishes. In order to see what’s currently playing, we need to get the ID of the active player, and through that find out the ID of the current playlist. We’ve done this with the following function: + + def get_playlistid(): + player = xbmc.Player.GetActivePlayers() + if len(player[‘result’]) > 0: + playlist_data = xbmc.Player.GetProperties({“playerid”:0, “properties”:[“playlistid”]}) + if len(playlist_data[‘result’]) > 0 and “playlistid” in playlist_data[‘result’].keys(): + return playlist_data[‘result’][‘playlistid’] + return -1 + +If there isn’t a currently active player (that is, if the length of the results section in the returned data is 0), or if the current player has no playlist, this will return -1. Otherwise, it will return the numeric ID of the current playlist. + +Once we’ve got the ID of the current playlist, we can get the details of it. For our purposes, two things are important: the list of items in the playlist, and the position we are in the playlist (items aren’t removed from the playlist after they’ve been played; the current position just marches on). + + def get_playlist(): + playlistid = get_playlistid() + if playlistid >= 0: + data = xbmc.Playlist.GetItems({“playlistid”:playlistid, “properties”: [“title”, “album”, “artist”, “file”]}) + position_data = xbmc.Player.GetProperties({“playerid”:0, ‘properties’:[“position”]}) + position = int(position_data[‘result’][‘position’]) + return data[‘result’][‘items’][position:], position + return [], -1 + +This returns the current playlist starting with the item that’s currently playing (since we don’t care about stuff that’s finished), and it also includes the position as this is needed for removing items from the playlist. + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/04/xbmc2-large.jpg) + +The API is documented at [http://wiki.xbmc.org/?title=JSON-RPC_API/v6][2]. It lists all the available functions, but it a little short on details of how to use them. + +> ### JSON ### +> +> JSON stands for JavaScript Object Notation, and was originally designed as a way of serialising JavaScript Objects. It still is used for that, but it’s also a useful way of encoding all sorts of data. +> +> JSON objects always have the form: +> +> {property1:value1, property2:value2, property3:value3} +> +> For an arbitrary number of property/value pairs. To Python programmers, this all looks suspiciously similar to dictionaries, and the two are very similar. +> +> As with dictionaries, the value can itself be another JSON object, or a list, so the following is perfectly valid: +> +> {“name”:“Ben”, “jobs”:[“cook”, “bottle-washer”], “appearance”: {“height”:195, “skin”:“fair”}} +> +> JSON is often used in web services to send data back and fourth, and it’s well supported by most programming languages, so if Python’s not your thing, you should easily be able to use the same functions to control XBMC from software written in the language of your choice. + +#### Bringing them together #### + +The code to link the previous functions to a HTML page is simply: + + @route(‘/juke’) + def index(): + current_playlist, position = get_playlist() + return template(‘list’, playlist=current_playlist, offset = position) + +This only has to grab the playlist (using the function we defined above), and pass it to a template that handles the display. + +The main part of the template that handles the display of this data is: + +

Currently Playing:

+ % if playlist is not None: + % position = offset + % for song in playlist: + {{song[‘title’]}} + % if song[‘type’] == ‘unknown’: + Radio + % else: + {{song[‘artist’][0]}} + % end + % if position != offset: + remove + % else: + skip + % end +
+ % position += 1 + % end + +As you can see, templates are mostly written in HTML, but with a few extra bits to control output. Variables enclosed by double parenthesise are output in place (as we saw in the first ‘hello world’ example). You can also include Python code on lines starting with a percentage sign. Since indents aren’t used, you need a % end to close any code block (such as a loop or if statement). + +This template first checks that the playlist isn’t empty, then loops through every item on the playlist. Each item is displayed as the song title in bold, then the name of the artist, then a link to either skip it (if it’s the currently playing song), or remove it from the playlist. All songs have a type of ‘song’, so if the type is ‘unknown’, then it isn’t a song, but a radio station. + +The /remove/ and /skip/ routes are simple wrappers around XBMC controls that reload /juke after the change has taken effect: + + @route(‘/skip/’) + def index(position): + print xbmc.Player.GoTo({‘playerid’:0, ‘to’:’next’}) + redirect(“/juke”) + @route(‘/remove/’) + def index(position): + playlistid = get_playlistid() + if playlistid >= 0: + xbmc.Playlist.Remove({‘playlistid’:int(playlistid), ‘position’:int(position)}) + redirect(“/juke”) + +Of course, it’s no good being able to manage your playlist if you can’t add music to it. + +This is complicated slightly by the fact that once a playlist finishes, it disappears, so you need to create a new one. Rather confusingly, playlists are created by calling the Playlist.Clear() method. This can also be used to kill a playlist that is currently playing a radio station (where the type is unknown). The other complication is that radio streams sit in the playlist and never leave, so if there’s currently a radio station playing, we need to clear the playlist as well. + +These pages include a link to play the songs, which points to /play/. This page is handled by: + + @route(‘/play/’) + def index(id): + playlistid = get_playlistid() + playlist, not_needed= get_playlist() + if playlistid < 0 or playlist[0][‘type’] == ‘unknown’: + xbmc.Playlist.Clear({“playlistid”:0}) + xbmc.Playlist.Add({“playlistid”:0, “item”:{“songid”:int(id)}}) + xbmc.Player.open({“item”:{“playlistid”:0}}) + playlistid = 0 + else: + xbmc.Playlist.Add({“playlistid”:playlistid, “item”:{“songid”:int(id)}}) + remove_duplicates(playlistid) + redirect(“/juke”) + +The final thing here is a call to remove_duplicates. This isn’t essential – and some people may not like it – but it makes sure that no song appears in the playlist more than once. + +We also have pages that list all the artists in the collection, and list the songs and albums by particular artists. These are quite straightforward, and work in the same basic way as /juke. + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/04/xbmc1-large.jpg) + +The UI still needs a bit of attention, but it’s working. + +> ### Logging ### +> +> It’s not always clear how to do something using the XBMC JSON API, and the documentation is sometimes a little opaque. One way of finding out how to do something is seeing how other remote controls do it. If you turn on logging, you can see what API calls are being performed as you use another remote control, then incorporate these into your code. +> +> To turn on logging, hook your XBMC media centre up to a display and go to Settings > System > Debugging, and turn on Enable Debug Logging. With logging turned on, you need to access the XBMC machine (eg via SSH), then you can view the log. Its location should be displayed in the top-left corner of the XBMC display. In RaspBMC, it’s at /home/pi/.xbmc/temp/xbmc.log. You can then keep an eye on what API calls are being performed in real time using: +> +> cd /home/pi/.xbmc/temp +> tail -f xbmc.log | grep “JSON” + +#### Adding functionality #### + +The above code all works with songs in the XBMC library, but we also wanted to be able to play radio stations. Addons each have their own plugin URL that can be used to pull information out of them using the usual XBMC JSON commands. For example, to get the selected stations from the radio plugin, we use: + + @route(‘/radio/’) + def index(): + my_stations = xbmc.Files.GetDirectory({“directory”:”plugin://plugin.audio.radio_de/stations/my/”, “properties”: + [“title”,”thumbnail”,”playcount”,”artist”,”album”,”episode”,”season”,”showtitle”]}) + if ‘result’ in my_stations.keys(): + return template(‘radio’, stations=my_stations[‘result’][‘files’]) + else: + return template(‘error’, error=’radio’) + +This includes a file that can be added to a playlist just as any song can be. However, these files never finish playing, so (as we saw before) you need to recreate the playlist before adding any songs to it. + +#### Sharing songs #### + +As well as serving up templates, Bottle can serve static files. These are useful whenever you need things that don’t change based on the user input. That could be a CSS file, an image or an MP3. In our simple controller there’s not (yet) any CSS or images to make things look pretty, but we have added a way to download the songs. This lets the media centre act as a sort of NAS box for songs. If you’re transferring large amounts of data, it’s probably best to use something like Samba, but serving static files is a good way of grabbing a couple of tunes on your phone. + +The Bottle code to download a song by its ID is : + + @route(‘/download/’) + def index(id): + data = xbmc.AudioLibrary.GetSongDetails({“songid”:int(id), “properties”:[“file”]}) + full_filename = data[‘result’][‘songdetails’][‘file’] + path, filename = os.path.split(full_filename) + return static_file(filename, root=path, download=True) + +To use this, we just put a link to the appropriate ID in the /songsby/ page. + +We’ve gone through all the mechanics of the code, but there are a few more bits that just tie it all together. You can see for yourself at the GitHub page:[https://github.com/ben-ev/xbmc-remote][3]. + +> ### Setting up ### +> +> Once you’ve developed your remote control, you’ll need a way of ensuring that it starts every time you turn on your media centre. There are a few ways of doing this, but the easiest is just to add a command launching it to /etc/rc.local. We installed our file to /opt/xbmc-remote/remote.py with all the other files alongside it. We then added the following line to /etc/rc.local before the final exit 0 line. +> +> cd /opt/xbmc-remote && python remote.py & + +> ### GitHub ### +> +> This project is quite bare-bones at the moment, but – the business of running a magazine means we don’t have as much time as we’d like to program. However, we’ve set up a GitHub project where we hope to keep working on it, and if you think you’d benefit from the project as well, we’d love your input. +> +> To see what’s going on, head over to [https://github.com/ben-ev/xbmc-remote][4] and take a look at what state it’s in. You can get a copy of the latest code from that web page, or clone it from the command line. +> +> If you want to improve it, you can fork the project to develop in your own branch, and then send a pull request when your features are working. For more information on working with GitHub, head to [https://github.com/features][5]. + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/xbmc-build-a-remote-control/ + +作者:[Ben Everard][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/ben_everard/ +[1]:http://bottlepy.org/docs/dev/deployment.html +[2]:http://wiki.xbmc.org/?title=JSON-RPC_API/v6 +[3]:https://github.com/ben-ev/xbmc-remote +[4]:https://github.com/ben-ev/xbmc-remote +[5]:https://github.com/features \ No newline at end of file From 3ae5914617207278cc61bedf801ba4b5aede922e Mon Sep 17 00:00:00 2001 From: wwy Date: Tue, 16 Jun 2015 19:31:34 +0800 Subject: [PATCH 1204/2517] [Translating] 20141219 What is good audio editing software on Linux.md --- .../20141219 What is good audio editing software on Linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20141219 What is good audio editing software on Linux.md b/sources/tech/20141219 What is good audio editing software on Linux.md index ccc6a0883b..da015adf14 100644 --- a/sources/tech/20141219 What is good audio editing software on Linux.md +++ b/sources/tech/20141219 What is good audio editing software on Linux.md @@ -1,3 +1,5 @@ +translating by wwy-hust + What is good audio editing software on Linux ================================================================================ From f42f3c51c04c2fe38305ef233741ed05dffe9daf Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 16 Jun 2015 23:22:28 +0800 Subject: [PATCH 1205/2517] Delete 20150515 Extend Swap Space using Swap file in Linux.md --- ...end Swap Space using Swap file in Linux.md | 74 ------------------- 1 file changed, 74 deletions(-) delete mode 100644 sources/tech/20150515 Extend Swap Space using Swap file in Linux.md diff --git a/sources/tech/20150515 Extend Swap Space using Swap file in Linux.md b/sources/tech/20150515 Extend Swap Space using Swap file in Linux.md deleted file mode 100644 index 9b1cb3f8b7..0000000000 --- a/sources/tech/20150515 Extend Swap Space using Swap file in Linux.md +++ /dev/null @@ -1,74 +0,0 @@ -Translating by strugglingyouth -Extend Swap Space using Swap file in Linux -================================================================================ -There are some scenarios where our Linux box is running out of swap space so in that case we can extend the swap space using swap partition but due to unavailability of free partitions on the disk, we are unable to extend it. - -So in such cases we can extend or increase swap space using a swap file - -### Below are the Steps to extend Swap Space using Swap File in Linux ### - -Lets first check the size of existing swap space / partition using the command like ‘**free -m‘** and ‘**swapon -s**‘ - -![](http://www.linuxtechi.com/wp-content/uploads/2015/06/free-output-with-swap.jpg) -free-output-with-swap - -In my case size of swap partition is 2 GB. So we will be extending swap space by 1 GB. - -#### Step:1 Create a swap file of size 1 GB using below dd Command #### - - [root@linuxtechi ~]# dd if=/dev/zero of=/swap_file bs=1G count=1 - 1+0 records in - 1+0 records out - 1073741824 bytes (1.1 GB) copied, 414.898 s, 2.6 MB/s - [root@linuxtechi ~]# - -Replace the value of ‘**bs**‘ and ‘**count**‘ according your requirement. - -#### Step:2 Secure the swap file with permissions 644. #### - - [root@linuxtechi ~]# chmod 600 /swap_file - -#### Step:3 Enable the Swap Area on the file (swap_file) #### - -Use mkswap command to enable swap area - - [root@linuxtechi ~]# mkswap /swap_file - Setting up swapspace version 1, size = 1048572 KiB - no label, UUID=f7b3ae59-c09a-4dc2-ba4d-c02abb7db33b - [root@linuxtechi ~]# - -#### Step:4 Add the swap file entry in the fstab file #### - -Add the below entry in the fstab file so that swap file become persistent across every reboot. - - /swap_file swap swap defaults 0 0 - -![swap-file-fstab-entry](http://www.linuxtechi.com/wp-content/uploads/2015/06/swap-file-fstab-entry.jpg) - -#### Step:5 Enable the swap file using ‘mkswap on’ command. #### - - [root@linuxtechi ~]# swapon /swap_file - [root@linuxtechi ~]# - -#### Step:6 Now verify the swap space #### - -![swap-space-after-extension](http://www.linuxtechi.com/wp-content/uploads/2015/06/swap-space-after-extension.jpg) - -**Note**: To disable the swap file for any troubleshooting point of view, use swapoff command as shown below and to re-enable swap file then use swapon command as shown in step5. - - [root@linuxtechi ~]# swapoff /swap_file - [root@linuxtechi ~]# - -Please share your valuable inputs and comments of this article. - --------------------------------------------------------------------------------- - -via: http://www.linuxtechi.com/extend-swap-space-using-swap-file-in-linux/ - -作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxtechi.com/author/pradeep/ From 383804437197bac1609d63700bb392b5ddf5e52e Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 16 Jun 2015 23:27:22 +0800 Subject: [PATCH 1206/2517] Update 20150515 Extend Swap Space using Swap file in Linux.md --- .../tech/20150515 Extend Swap Space using Swap file in Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/translated/tech/20150515 Extend Swap Space using Swap file in Linux.md b/translated/tech/20150515 Extend Swap Space using Swap file in Linux.md index 473e24ea0d..0b1a5c0597 100644 --- a/translated/tech/20150515 Extend Swap Space using Swap file in Linux.md +++ b/translated/tech/20150515 Extend Swap Space using Swap file in Linux.md @@ -1,3 +1,4 @@ +translated by strugglingyouth 在linux上使用交换文件扩展交换空间 ================================================================================ 想像一种情景,当我们的Linux系统用尽交换空间时,在这种情况下, From ed895abe7f18d024699d5f46eb8c0ef7542cc070 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 17 Jun 2015 10:22:40 +0800 Subject: [PATCH 1207/2517] PUB:20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux @wi-cuckoo --- ...r and Remove Unwanted Packages in Linux.md | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) rename {translated/tech => published}/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md (80%) diff --git a/translated/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md b/published/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md similarity index 80% rename from translated/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md rename to published/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md index cd90e2bfb7..786e06b436 100644 --- a/translated/tech/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md +++ b/published/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md @@ -2,33 +2,35 @@ Linux中,创建聊天服务器、移除冗余软件包的实用命令 ============================================================================= 这里,我们来看Linux命令行实用技巧的下一个部分。如果你错过了Linux Tracks之前的文章,可以从这里找到。 -- [5 Linux Command Line Tracks][1] +- [5个有趣的Linux命令行技巧][1] 本篇中,我们将会介绍6个命令行小技巧,包括使用Netcat命令创建Linux命令行聊天,从某个命令的输出中对某一列做加法,移除Debian和CentOS上多余的包,从命令行中获取本地与远程的IP地址,在终端获得彩色的输出与解码各样的颜色,最后是Linux命令行里井号标签的使用。让我们来一个一个地看一下。 ![Linux Commandline Chat Server](http://www.tecmint.com/wp-content/uploads/2015/04/linux-commandline-chat-server.jpg) -6个实用的命令行技巧 + +*6个实用的命令行技巧* ### 1. 创建Linux命令行聊天服务 ### -我们大家使用聊天服务都有很长一段时间了。对于Google Chat,Hangout,Facebook Chat,Whatsapp,Hike和其他一些应用与集成的聊天服务,我们都很熟悉了。那你知道Linux的nc命令可以使你的Linux盒子变成一个聊天服务器,而仅仅只需要一行命令吗。什么是nc命令,它又是怎么工作的呢? -nc是Linux netcat命令的旧版。nc就像瑞士军刀一样,内建呢大量的功能。nc可用做调式工具,调查工具,使用TCP/UDP读写网络连接,DNS正向/反向检查。 +我们大家使用聊天服务都有很长一段时间了。对于Google Chat,Hangout,Facebook Chat,Whatsapp,Hike和其他一些应用与集成的聊天服务,我们都很熟悉了。那你知道Linux的nc命令可以使你的Linux机器变成一个聊天服务器,而仅仅只需要一行命令吗。什么是nc命令,它又是怎么工作的呢? + +nc即Linux netcat命令。nc就像瑞士军刀一样,内建了大量的功能。nc可用做调式工具,调查工具,使用TCP/UDP读写网络连接,DNS正向/反向查询等等。 nc主要用在端口扫描,文件传输,后台和端口监听。nc可以使用任何闲置的端口和任何本地网络源地址。 使用nc命令(在192.168.0.7的服务器上)创建一个命令行即时信息传输服务器。 - $ nc -l -vv 11119 + $ nc -l -vv -p 11119 对上述命令的解释。 -- -v : 表示 Verbose -- -vv : 更多的 Verbose +- -v : 显示冗余信息 +- -vv : 显示更多的冗余信息 - -p : 本地端口号 你可以用任何其他的本地端口号替换11119。 -接下来在客户端机器(IP地址:192.168.0.15),运行下面的命令初始化聊天会话(信息传输服务正在运行)。 +接下来在客户端机器(IP地址:192.168.0.15),运行下面的命令初始化聊天会话(这里需要上面提到的信息服务器正在运行)。 $ nc 192.168.0.7:11119 @@ -38,7 +40,7 @@ nc主要用在端口扫描,文件传输,后台和端口监听。nc可以使 ### 2. Linux中如何统计某一列的总值 ### -如何统计在终端里,某个命令的输出中,其中一列的数值总和, +如何在终端里统计某个命令的输出中其中一列的数值总和, ‘ls -l’命令的输出。 @@ -64,7 +66,7 @@ nc主要用在端口扫描,文件传输,后台和端口监听。nc可以使 废弃包是指那些作为其他包的依赖而被安装,但是当源包被移除之后就不再需要的包。 -假设我们安装了gtprogram,依赖是gtdependency。除非我们安装了gtdependency,否则安装不了gtprogram。 +假设我们安装了一个叫gtprogram的软件包,其依赖是gtdependency。除非我们安装了gtdependency,否则安装不了gtprogram。 当我们移除gtprogram的时候,默认并不会移除gtdependency。并且如果我们不移除gtdependency的话,它就会遗留下来成为废弃包,与其他任何包再无联系。 @@ -116,13 +118,13 @@ nc主要用在端口扫描,文件传输,后台和端口监听。nc可以使 ### 5.如何在Linux终端彩色输出 ### -你可能在终端看见过彩色的输出。同时你也可能知道在终端里允许/禁用彩色输出。如果都不知道的话,里可以参考下面的步骤。 +你可能在终端看见过彩色的输出。同时你也可能知道在终端里允许/禁用彩色输出。如果都不知道的话,你可以参考下面的步骤。 在Linux中,每个用户都有`'.bashrc'`文件,被用来管理你的终端输出。打开并且编辑该文件,用你喜欢的编辑器。注意一下,这个文件是隐藏的(文件开头为点的代表隐藏文件)。 $ vi /home/$USER/.bashrc -确保以下的行没有被注释掉。ie.,行开头没有#。 +确保以下的行没有被注释掉。即,行开头没有#。 if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dirc$ @@ -139,27 +141,27 @@ nc主要用在端口扫描,文件传输,后台和端口监听。nc可以使 完成后!保存并退出。为了让改动生效,需要注销账户后再次登录。 -现在,你会看见列出的文件和文件夹名字有着不同的颜色,根据文件类型来决定。为了解码颜色,可以运行下面的命令。 +现在,你会看见列出的文件和文件夹名字有着不同的颜色,根据文件类型来决定。要了解所用的颜色代码,可以运行下面的命令。 $ dircolors -p | less ![Linux Color Output](http://www.tecmint.com/wp-content/uploads/2015/04/Linux-Color-Output.gif) -### 6.如何用井号标记和Linux命令和脚本 ### +### 6.如何用#号标记Linux命令和脚本 ### -我们一直在Twitter,Facebook和Google Plus(可能是其他我们没有提到的地方)上使用井号标签。那些井号标签使得其他人搜索一个标签更加容易。可是很少人知道,我们可以在Linux命令行使用井号标签。 +我们一直在Twitter,Facebook和Google Plus(可能是其他我们没有提到的地方)上使用#号标签。那些#号标签使得其他人搜索一个标签更加容易。可是很少人知道,我们可以在Linux命令行使用#号标签。 我们已经知道配置文件里的`#`,在大多数的编程语言中,这个符号被用作注释行,即不被执行。 -运行一个命令,然后为这个命令创建一个井号标签,这样之后我们就可以找到它。假设我们有一个很长的脚本,就上面第四点被执行的命令。现在为它创建一个井号标签。我们知道ifconfig可以被sudo或者root执行,因此用root来执行。 +运行一个命令,然后为这个命令创建一个#号标签,这样之后我们就可以找到它。假设我们有一个很长的脚本,就上面第四点被执行的命令。现在为它创建一个#号标签。我们知道ifconfig可以被sudo或者root执行,因此用root来执行。 # ifconfig | grep "inet addr:" | awk '{print $2}' | grep -v '127.0.0.1' | cut -f2 -d: #myip -上述脚本被’mytag‘给标记了。现在在reverse-i-search(按下ctrl+r)搜索一下这个标签,在终端里,并输入’mytag‘。你可以从这里开始执行。 +上述脚本被’myip‘给标记了。现在在reverse-i-search(按下ctrl+r)搜索一下这个标签,在终端里,并输入’myip‘。你可以从这里开始执行。 ![Create Command Hash Tags](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Command-Hash-Tags.gif) -你可以创建很多的井号标签,为每个命令,之后使用reverse-i-search找到它。 +你可以为每个命令创建#号标签,之后使用reverse-i-search找到它。 目前就这么多了。我们一直在辛苦的工作,创造有趣的,有知识性的内容给你。你觉得我们是如何工作的呢?欢迎咨询任何问题。你可以在下面评论。保持联络!Kudox。 @@ -169,9 +171,9 @@ via: http://www.tecmint.com/linux-commandline-chat-server-and-remove-unwanted-pa 作者:[Avishek Kumar][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/5-linux-command-line-tricks/ +[1]:https://linux.cn/article-5485-1.html From 5fa0173972d15ace430badb5c50e3d0f93e98d33 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 17 Jun 2015 10:24:15 +0800 Subject: [PATCH 1208/2517] PUB:20150410 7 Command Line Tools for Browsing Websites and Downloading Files i @fyh --- ...ng Websites and Downloading Files in Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md (92%) diff --git a/translated/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md b/published/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md similarity index 92% rename from translated/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md rename to published/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md index 0d73e957de..db3aa23b6e 100644 --- a/translated/tech/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md +++ b/published/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md @@ -1,8 +1,8 @@ -Linux中7个用来浏览网页和下载文件的命令 +Linux中7个用来浏览网页和下载文件的命令 ================================================================================ 上一篇文章中,我们提到了`rTorrent`、`wget`、`cURL`、`w3m`、`Elinks`等几个有用的工具,很多人回信说还有其它几个类似的工具也值得讨论,所以就有了这篇文章。如果错过了第一部分的讨论,可以通过下面的链接来回顾。 -- [5个下载文件和浏览网页的命令行工具][1] +- [5 个基于Linux命令行的文件下载和网站浏览工具][1] 这篇文章介绍了Linux下用于浏览网页和下载文件的其它几个命令行工具。 @@ -23,7 +23,7 @@ Links是用C语言写的一个开源web浏览器,支持包括Linux、Windows ![](http://www.tecmint.com/wp-content/uploads/2015/04/links-browse-websites-terminal.gif) -如何你想安装links的图形界面版本,可能需要从[http://links.twibright.com/download/][2]下载最新的版本tarball(version 2.9)的源代码。 +如何你想安装links的图形界面版本,可能需要从[http://links.twibright.com/download/][2]下载最新的版本(version 2.9)的源代码压缩包。 同样,也可以像下面那样使用wget下载安装。 @@ -34,7 +34,7 @@ Links是用C语言写的一个开源web浏览器,支持包括Linux、Windows # make # make install -**注意**:links源代码的编译需要安装libpng, libjpeg, TIFF library, SVGAlib, XFree86, C Compiler and make这几个包。 +**注意**:links源代码的编译需要安装libpng, libjpeg, TIFF library, SVGAlib, XFree86, C Compiler 和 make这几个包。 ### 2. links2 ### @@ -49,7 +49,7 @@ Links是Twibright实验室编写的web浏览器,而Links2是基于它的一个 lynx是一个基于文本的web浏览器,使用GNU GPLv2协议发布,用ISO C编写。lynx是一个可高度配置的web浏览器,是许多系统管理员的救世主,有最悠久的web浏览器之称,并且至今仍然处在积极开发中。 -通过下面的命令安装lyns。 +通过下面的命令安装lynx。 # apt-get install lynx # yum install lynx @@ -125,7 +125,7 @@ aria2安装完成后,可以像下图那样运行这个命令下载任意文件 ![Aria2: Linux的命令行下载工具 ](http://www.tecmint.com/wp-content/uploads/2015/04/Download-Files-in-Terminal.gif) -Aria2: Linux命令行下载工具 +*Aria2: Linux命令行下载工具* 目前就这么多了。稍后咱们讨论另一个有意思的话题。请保持联系,常来Tecmint逛逛。别忘了在评论中给我们提供您的宝贵反馈,您的喜爱和分享帮助我们不断前行。 @@ -135,12 +135,12 @@ via: http://www.tecmint.com/command-line-web-browser-download-file-in-linux/ 作者:[Avishek Kumar][a] 译者:[fyh](https://github.com/fyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/linux-command-line-tools-for-downloading-files/ +[1]:https://linux.cn/article-5546-1.html [2]:http://links.twibright.com/download/ [3]:http://www.tecmint.com/command-line-web-browsers/ [4]:http://www.tecmint.com/install-youtube-dl-command-line-video-download-tool/ From ac6bd1e261c7683bd74aa979006d4f57b581ed53 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 17 Jun 2015 10:35:36 +0800 Subject: [PATCH 1209/2517] Translating by ZTinoZ --- .../20150526 20 Useful Terminal Emulators for Linux.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index a15c4ad0d1..8938b6049b 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -199,11 +199,11 @@ FinalTerm Terminal ### 15. Terminology ### -Terminology is yet another new modern terminal emulator created for the Enlightenment desktop, but also can be used in different desktop environments. It has some awesome unique features, which do not have in any other terminal emulator. +Terminology是一款新的现代化终端仿真器,为Enlightenment桌面创造,但也能用于其它桌面环境。它有一些独一无二的棒极了的特性,这是其它终端仿真器所不具备的。 -Apart features, terminology offers even more things that you wouldn’t assume from a other terminal emulators, like preview thumbnails of images, videos and documents, it also allows you to see those files directly from Terminology. +抛开这些特性,terminology甚至还提供了你无法从其它仿真器看到的东西,比如图像、视频和文档的缩略图预览,它允许你从Terminology直接就能看到那些文件。 -You can watch a following demonstrations video created by the Terminology developer (the video quality isn’t clear, but still it’s enough to get the idea about Terminology). +你可以来看看Terminology的开发人员制作的小视频(视频画质不太清晰,但足以让你了解Terminology了)。 @@ -211,7 +211,7 @@ You can watch a following demonstrations video created by the Terminology develo ### 16. Xfce4 terminal ### -Xfce terminal is a lightweight modern and easy to use terminal emulator specially designed for Xfce desktop environment. The latest release of xfce terminal has some new cool features such as search dialog, tab color changer, drop-down console like Guake or Yakuake and many more. +Xfce终端是一款轻量级的现代化终端仿真器,它简单易用,为Xfce桌面环境设计。它最新的一个版本有许多新的炫酷特性比如搜索会话、标签颜色转换器、像Guake或Yakuake一样的下拉式控制台等等。 ![Xfce Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/xfce-terminal.jpg) From c95bd80913b0de6ff515da57eb8c0d4ea0d5c2c8 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 17 Jun 2015 14:41:19 +0800 Subject: [PATCH 1210/2517] =?UTF-8?q?20150617-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20150617 The Art of Command Line.md | 435 ++++++++++++++++++ 1 file changed, 435 insertions(+) create mode 100644 sources/tech/20150617 The Art of Command Line.md diff --git a/sources/tech/20150617 The Art of Command Line.md b/sources/tech/20150617 The Art of Command Line.md new file mode 100644 index 0000000000..d7fb3a5aff --- /dev/null +++ b/sources/tech/20150617 The Art of Command Line.md @@ -0,0 +1,435 @@ +The Art of Command Line +================================================================================ +- [Basics](#basics) +- [Everyday use](#everyday-use) +- [Processing files and data](#processing-files-and-data) +- [System debugging](#system-debugging) +- [One-liners](#one-liners) +- [Obscure but useful](#obscure-but-useful) +- [More resources](#more-resources) +- [Disclaimer](#disclaimer) + + +![curl -s 'https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md' | egrep -o '`\w+`' | tr -d '`' | cowsay -W50](https://github.com/jlevy/the-art-of-command-line/blob/master/cowsay.png) + +Fluency on the command line is a skill often neglected or considered arcane, but it improves your flexibility and productivity as an engineer in both obvious and subtle ways. This is a selection of notes and tips on using the command-line that I've found useful when working on Linux. Some tips are elementary, and some are fairly specific, sophisticated, or obscure. This page is not long, but if you can use and recall all the items here, you know a lot. + +Much of this +[originally](http://www.quora.com/What-are-some-lesser-known-but-useful-Unix-commands) +[appeared](http://www.quora.com/What-are-the-most-useful-Swiss-army-knife-one-liners-on-Unix) +on [Quora](http://www.quora.com/What-are-some-time-saving-tips-that-every-Linux-user-should-know), +but given the interest there, it seems it's worth using Github, where people more talented than I can readily suggest improvements. If you see an error or something that could be better, please submit an issue or PR! + +Scope: + +- The goals are breadth and brevity. Every tip is essential in some situation or significantly saves time over alternatives. +- This is written for Linux. Many but not all items apply equally to MacOS (or even Cygwin). +- The focus is on interactive Bash, though many tips apply to other shells and to general Bash scripting. +- Descriptions are intentionally minimal, with the expectation you'll use `man`, `apt-get`/`yum`/`dnf` to install, and Google for more background. + + +## Basics + +- Learn basic Bash. Actually, type `man bash` and at least skim the whole thing; it's pretty easy to follow and not that long. Alternate shells can be nice, but Bash is powerful and always available (learning *only* zsh, fish, etc., while tempting on your own laptop, restricts you in many situations, such as using existing servers). + +- Learn at least one text-based editor well. Ideally Vim (`vi`), as there's really no competition for random editing in a terminal (even if you use Emacs, a big IDE, or a modern hipster editor most of the time). + +- Learn about redirection of output and input using `>` and `<` and pipes using `|`. Learn about stdout and stderr. + +- Learn about file glob expansion with `*` (and perhaps `?` and `{`...`}`) and quoting and the difference between double `"` and single `'` quotes. (See more on variable expansion below.) + +- Be familiar with Bash job management: `&`, **ctrl-z**, **ctrl-c**, `jobs`, `fg`, `bg`, `kill`, etc. + +- Know `ssh`, and the basics of passwordless authentication, via `ssh-agent`, `ssh-add`, etc. + +- Basic file management: `ls` and `ls -l` (in particular, learn what every column in `ls -l` means), `less`, `head`, `tail` and `tail -f` (or even better, `less +F`), `ln` and `ln -s` (learn the differences and advantages of hard versus soft links), `chown`, `chmod`, `du` (for a quick summary of disk usage: `du -sk *`), `df`, `mount`. + +- Basic network management: `ip` or `ifconfig`, `dig`. + +- Know regular expressions well, and the various flags to `grep`/`egrep`. The `-i`, `-o`, `-A`, and `-B` options are worth knowing. + +- Learn to use `apt-get`, `yum`, or `dnf` (depending on distro) to find and install packages. And make sure you have `pip` to install Python-based command-line tools (a few below are easiest to install via `pip`). + + +## Everyday use + +- In Bash, use **ctrl-r** to search through command history. + +- In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete the whole line. Use **alt-b** and **alt-f** to move by word, and **ctrl-k** to kill to the end of the line. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. + +- To go back to the previous working directory: `cd -` + +- If you are halfway through typing a command but change your mind, hit **alt-#** to add a `#` at the beginning and enter it as a comment (or use **ctrl-a**, **#**, **enter**). You can then return to it later via command history. + +- Use `xargs` (or `parallel`). It's very powerful. Note you can control how many items execute per line (`-L`) as well as parallelism (`-P`). If you're not sure if it'll do the right thing, use `xargs echo` first. Also, `-I{}` is handy. Examples: +```bash + find . -name '*.py' | xargs grep some_function + cat hosts | xargs -I{} ssh root@{} hostname +``` + +- `pstree -p` is a helpful display of the process tree. + +- Use `pgrep` and `pkill` to find or signal processes by name (`-f` is helpful). + +- Know the various signals you can send processes. For example, to suspend a process, use `kill -STOP [pid]`. For the full list, see `man 7 signal` + +- Use `nohup` or `disown` if you want a background process to keep running forever. + +- Check what processes are listening via `netstat -lntp`. + +- See also `lsof` for open sockets and files. + +- In Bash scripts, use `set -x` for debugging output. Use strict modes whenever possible. Use `set -e` to abort on errors. Use `set -o pipefail` as well, to be strict about errors (though this topic is a bit subtle). For more involved scripts, also use `trap`. + +- In Bash scripts, subshells (written with parentheses) are convenient ways to group commands. A common example is to temporarily move to a different working directory, e.g. +```bash + # do something in current dir + (cd /some/other/dir; other-command) + # continue in original dir +``` + +- In Bash, note there are lots of kinds of variable expansion. Checking a variable exists: `${name:?error message}`. For example, if a Bash script requires a single argument, just write `input_file=${1:?usage: $0 input_file}`. Arithmetic expansion: `i=$(( (i + 1) % 5 ))`. Sequences: `{1..10}`. Trimming of strings: `${var%suffix}` and `${var#prefix}`. For example if `var=foo.pdf`, then `echo ${var%.pdf}.txt` prints `foo.txt`. + +- The output of a command can be treated like a file via `<(some command)`. For example, compare local `/etc/hosts` with a remote one: +```sh + diff /etc/hosts <(ssh somehost cat /etc/hosts) +``` + +- Know about "here documents" in Bash, as in `cat <logfile 2>&1`. Often, to ensure a command does not leave an open file handle to standard input, tying it to the terminal you are in, it is also good practice to add ` foo: + rename 's/\.bak$//' *.bak + # Full rename of filenames, directories, and contents foo -> bar: + repren --full --preserve-case --from foo --to bar . +``` + +- Use `shuf` to shuffle or select random lines from a file. + +- Know `sort`'s options. Know how keys work (`-t` and `-k`). In particular, watch out that you need to write `-k1,1` to sort by only the first field; `-k1` means sort according to the whole line. + +- Stable sort (`sort -s`) can be useful. For example, to sort first by field 2, then secondarily by field 1, you can use `sort -k1,1 | sort -s -k2,2` + +- If you ever need to write a tab literal in a command line in Bash (e.g. for the -t argument to sort), press **ctrl-v** **[Tab]** or write `$'\t'` (the latter is better as you can copy/paste it). + +- For binary files, use `hd` for simple hex dumps and `bvi` for binary editing. + +- Also for binary files, `strings` (plus `grep`, etc.) lets you find bits of text. + +- To convert text encodings, try `iconv`. Or `uconv` for more advanced use; it supports some advanced Unicode things. For example, this command lowercases and removes all accents (by expanding and dropping them): +```sh + uconv -f utf-8 -t utf-8 -x '::Any-Lower; ::Any-NFD; [:Nonspacing Mark:] >; ::Any-NFC; ' < input.txt > output.txt +``` + +- To split files into pieces, see `split` (to split by size) and `csplit` (to split by a pattern). + +- Use `zless`, `zmore`, `zcat`, and `zgrep` to operate on compressed files. + + +## System debugging + +- For web debugging, `curl` and `curl -I` are handy, or their `wget` equivalents, or the more modern [`httpie`](https://github.com/jakubroztocil/httpie). + +- To know disk/cpu/network status, use `iostat`, `netstat`, `top` (or the better `htop`), and (especially) `dstat`. Good for getting a quick idea of what's happening on a system. + +- For a more in-depth system overview, use [`glances`](https://github.com/nicolargo/glances). It presents you with several system level statistics in one terminal window. Very helpful for quickly checking on various subsystems. + +- To know memory status, run and understand the output of `free` and `vmstat`. In particular, be aware the "cached" value is memory held by the Linux kernel as file cache, so effectively counts toward the "free" value. + +- Java system debugging is a different kettle of fish, but a simple trick on Oracle's and some other JVMs is that you can run `kill -3 ` and a full stack trace and heap summary (including generational garbage collection details, which can be highly informative) will be dumped to stderr/logs. + +- Use `mtr` as a better traceroute, to identify network issues. + +- For looking at why a disk is full, `ncdu` saves time over the usual commands like `du -sh *`. + +- To find which socket or process is using bandwidth, try `iftop` or `nethogs`. + +- The `ab` tool (comes with Apache) is helpful for quick-and-dirty checking of web server performance. For more complex load testing, try `siege`. + +- For more serious network debugging, `wireshark`, `tshark`, or `ngrep`. + +- Know about `strace` and `ltrace`. These can be helpful if a program is failing, hanging, or crashing, and you don't know why, or if you want to get a general idea of performance. Note the profiling option (`-c`), and the ability to attach to a running process (`-p`). + +- Know about `ldd` to check shared libraries etc. + +- Know how to connect to a running process with `gdb` and get its stack traces. + +- Use `/proc`. It's amazingly helpful sometimes when debugging live problems. Examples: `/proc/cpuinfo`, `/proc/xxx/cwd`, `/proc/xxx/exe`, `/proc/xxx/fd/`, `/proc/xxx/smaps`. + +- When debugging why something went wrong in the past, `sar` can be very helpful. It shows historic statistics on CPU, memory, network, etc. + +- For deeper systems and performance analyses, look at `stap` ([SystemTap](https://sourceware.org/systemtap/wiki)), [`perf`](http://en.wikipedia.org/wiki/Perf_(Linux)), and [`sysdig`](https://github.com/draios/sysdig). + +- Confirm what Linux distribution you're using (works on most distros): `lsb_release -a` + +- Use `dmesg` whenever something's acting really funny (it could be hardware or driver issues). + + +## One-liners + +A few examples of piecing together commands: + +- It is remarkably helpful sometimes that you can do set intersection, union, and difference of text files via `sort`/`uniq`. Suppose `a` and `b` are text files that are already uniqued. This is fast, and works on files of arbitrary size, up to many gigabytes. (Sort is not limited by memory, though you may need to use the `-T` option if `/tmp` is on a small root partition.) See also the note about `LC_ALL` above. +```sh + cat a b | sort | uniq > c # c is a union b + cat a b | sort | uniq -d > c # c is a intersect b + cat a b b | sort | uniq -u > c # c is set difference a - b +``` + +- Summing all numbers in the third column of a text file (this is probably 3X faster and 3X less code than equivalent Python): +```sh + awk '{ x += $3 } END { print x }' myfile +``` + +- If want to see sizes/dates on a tree of files, this is like a recursive `ls -l` but is easier to read than `ls -lR`: +```sh + find . -type f -ls +``` + +- Use `xargs` or `parallel` whenever you can. Note you can control how many items execute per line (`-L`) as well as parallelism (`-P`). If you're not sure if it'll do the right thing, use xargs echo first. Also, `-I{}` is handy. Examples: +```sh + find . -name '*.py' | xargs grep some_function + cat hosts | xargs -I{} ssh root@{} hostname +``` + +- Say you have a text file, like a web server log, and a certain value that appears on some lines, such as an `acct_id` parameter that is present in the URL. If you want a tally of how many requests for each `acct_id`: +```sh + cat access.log | egrep -o 'acct_id=[0-9]+' | cut -d= -f2 | sort | uniq -c | sort -rn +``` + +- Run this function to get a random tip from this document (parses Markdown and extracts an item): +```sh + function taocl() { + curl -s https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md | + pandoc -f markdown -t html | + xmlstarlet fo --html --dropdtd | + xmlstarlet sel -t -v "(html/body/ul/li[count(p)>0])[$RANDOM mod last()+1]" | + xmlstarlet unesc | fmt -80 + } +``` + + +## Obscure but useful + +- `expr`: perform arithmetic or boolean operations or evaluate regular expressions + +- `m4`: simple macro processor + +- `screen`: powerful terminal multiplexing and session persistence + +- `yes`: print a string a lot + +- `cal`: nice calendar + +- `env`: run a command (useful in scripts) + +- `look`: find English words (or lines in a file) beginning with a string + +- `cut `and `paste` and `join`: data manipulation + +- `fmt`: format text paragraphs + +- `pr`: format text into pages/columns + +- `fold`: wrap lines of text + +- `column`: format text into columns or tables + +- `expand` and `unexpand`: convert between tabs and spaces + +- `nl`: add line numbers + +- `seq`: print numbers + +- `bc`: calculator + +- `factor`: factor integers + +- `gpg`: encrypt and sign files + +- `toe`: table of terminfo entries + +- `nc`: network debugging and data transfer + +- `ngrep`: grep for the network layer + +- `dd`: moving data between files or devices + +- `file`: identify type of a file + +- `stat`: file info + +- `tac`: print files in reverse + +- `shuf`: random selection of lines from a file + +- `comm`: compare sorted files line by line + +- `hd` and `bvi`: dump or edit binary files + +- `strings`: extract text from binary files + +- `tr`: character translation or manipulation + +- `iconv `or uconv: conversion for text encodings + +- `split `and `csplit`: splitting files + +- `7z`: high-ratio file compression + +- `ldd`: dynamic library info + +- `nm`: symbols from object files + +- `ab`: benchmarking web servers + +- `strace`: system call debugging + +- `mtr`: better traceroute for network debugging + +- `cssh`: visual concurrent shell + +- `wireshark` and `tshark`: packet capture and network debugging + +- `host` and `dig`: DNS lookups + +- `lsof`: process file descriptor and socket info + +- `dstat`: useful system stats + +- [`glances`](https://github.com/nicolargo/glances): high level, multi-subsystem overview + +- `iostat`: CPU and disk usage stats + +- `htop`: improved version of top + +- `last`: login history + +- `w`: who's logged on + +- `id`: user/group identity info + +- `sar`: historic system stats + +- `iftop` or `nethogs`: network utilization by socket or process + +- `ss`: socket statistics + +- `dmesg`: boot and system error messages + +- `hdparm`: SATA/ATA disk manipulation/performance + +- `lsb_release`: Linux distribution info + +- `lshw`: hardware information + +- `fortune`, `ddate`, and `sl`: um, well, it depends on whether you consider steam locomotives and Zippy quotations "useful" + + +## More resources + +- [awesome-shell](https://github.com/alebcay/awesome-shell): A curated list of shell tools and resources. +- [Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/) for writing better shell scripts. + + +## Disclaimer + +With the exception of very small tasks, code is written so others can read it. With power comes responsibility. The fact you *can* do something in Bash doesn't necessarily mean you should! ;) + +-------------------------------------------------------------------------------- + +via: https://github.com/jlevy/the-art-of-command-line + +作者:[jlevy][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://github.com/jlevy +[1]: +[2]: +[3]: +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: \ No newline at end of file From 46c69fc92dde46a82975a504280b0da0cad0758c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 17 Jun 2015 16:31:54 +0800 Subject: [PATCH 1211/2517] =?UTF-8?q?20150617-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ser for Anonymous Web Browsing in Linux.md | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md diff --git a/sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md b/sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md new file mode 100644 index 0000000000..92fe36dae2 --- /dev/null +++ b/sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md @@ -0,0 +1,206 @@ +Tor Browser: An Ultimate Web Browser for Anonymous Web Browsing in Linux +================================================================================ +Most of us give a considerable time of ours to Internet. The primary Application we require to perform our internet activity is a browser, a web browser to be more perfect. Over Internet most of our’s activity is logged to Server/Client machine which includes IP address, Geographical Location, search/activity trends and a whole lots of Information which can potentially be very harmful, if used intentionally the other way. + +![Install Tor Browser in Linux](http://www.tecmint.com/wp-content/uploads/2014/04/Install-tor-browser-in-linux.jpg) + +Tor Browser: Anonymous Browsing + +Moreover the National Security Agency (NSA) aka International Spying Agency keeps tracks of ours digital footprints. Not to mention a restricted proxy server which again can be used as data ripping server is not the answer. And most of the corporates and companies wont allow you to access a proxy server. + +So, what we need here is an application, preferably small in size and let it be standalone, portable and which servers the purpose. Here comes an application – the Tor Browser, which has all the above discussed features and even beyond that. + +In this article we will be discussing Tor browser, its features, its usages and Area of Application, Installation and other important aspects of The Tor Browser Application. + +#### What is Tor Browser? #### + +Tor is a Freely distributed Application Software, released under BSD style Licensing which allows to surf Internet anonymously, through its safe and reliable onion like structure. Tor previously was called as ‘The Onion Router‘ because of its structure and functioning mechanism. This Application is written in C programming Language. + +#### Features of Tor Browser #### + +- Cross Platform Availability. i.e., this application is available for Linux, Windows as well as Mac. +- Complex Data encryption before it it sent over Internet. +- Automatic data decryption at client side. +- It is a combination of Firefox Browser + Tor Project. +- Provides anonymity to servers and websites. +- Makes it possible to visit locked websites. +- Performs task without revealing IP of Source. +- Capable of routing data to/from hidden services and application behind firewall. +- Portable – Run a preconfigured web browser directly from the USB storage Device. No need to install it locally. +- Available for architectures x86 and x86_64. +- Easy to set FTP with Tor using configuration as “socks4a” proxy on “localhost” port “9050” +- Tor is capable of handling thousands of relay and millions of users. + +#### How Tor Browser Works? #### + +Tor works on the concept of Onion routing. Onion routing resemble to onion in structure. In onion routing the layers are nested one over the other similar to the layers of onion. This nested layer is responsible for encrypting data several times and sends it through virtual circuits. On the client side each layer decrypt the data before passing it to the next level. The last layer decrypts the innermost layer of encrypted data before passing the original data to the destination. + +In this process of decryption all the layers function so intelligently that there is no need to reveal IP and Geographical location of User thus limiting any chance of anybody watching your internet connection or the sites you are visiting. + +All these working seems a bit complex, but the end user execution and working of Tor browser is nothing to worry about. In-fact Tor browser resembles any other browser (Especially Mozilla Firefox) in functioning. + +### Installation of Tor Browser in Linux ### + +As discussed above, Tor browser is available for Linux, Windows and Mac. The user need to download the latest version (i.e. Tor Browser 4.0.4) application from the link below as per their system and architecture. + +- [https://www.torproject.org/download/download-easy.html.en][1] + +After downloading the Tor browser, we need to install it. But the good thing with ‘Tor’ is that we don’t need to install it. It can run directly from a Pen Drive and the browser can be preconfigured. That means plug and Run Feature in perfect sense of Portability. + +After downloading the Tar-ball (*.tar.xz) we need to Extract it. + +**On 32-Bit System** + + $ wget https://www.torproject.org/dist/torbrowser/4.0.4/tor-browser-linux32-4.0.4_en-US.tar.xz + $ tar xpvf tor-browser-linux32-4.0.4_en-US.tar.xz + +**On 64-Bit System** + + $ wget https://www.torproject.org/dist/torbrowser/4.0.4/tor-browser-linux64-4.0.4_en-US.tar.xz + $ tar -xpvf tor-browser-linux64-4.0.4_en-US.tar.xz + +**Note** : In the above command we used ‘$‘ which means that the package is extracted as user and not root. It is strictly suggested to extract and run tor browser not as root. + +After successful extraction, we can move the extracted browser to anywhere/USB Mass Storage device. And run the application from the extracted folder and run ‘start-tor-browser’ strictly not as root. + + $ cd tor-browser_en-US + $ ./start-tor-browser + +![Starting Tor Browser](http://www.tecmint.com/wp-content/uploads/2014/04/Starting-Tor-Network.jpg) + +Starting Tor Browser + +**1. Trying to connect to the Tor Network. Click “Connect” and Tor will do rest of the settings for you.** + +![Connecting to Tor Network](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Network-Settings.jpg) + +Connecting to Tor Network + +**2. The welcome Window/Tab.** + +![Tor Welcome Screen](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Welcome-Screen.png) + +Tor Welcome Screen + +**3. Tor Browser Running a Video from Youtube.** + +![Watching Video on Youtube](http://www.tecmint.com/wp-content/uploads/2014/04/Watching-Video-on-Youtube.jpg) + +Watching Video on Youtube + +**4. Opening a banking site for online Purchasing/Transaction.** + +![Browsing a Banking Site](http://www.tecmint.com/wp-content/uploads/2014/04/Browsing-Site.jpg) + +Browsing a Banking Site + +**5. The browser showing my current proxy IP. Note that the text that reads “Proxy Server detected”.** + +![Checking IP Address](http://www.tecmint.com/wp-content/uploads/2014/04/Checking-IP-Address.jpg) + +Checking IP Address + +**Note**: That you need to point to the Tor startup script using text session, everytime you want to run Tor. Moreover a terminal will be busy all the time till you are running tor. How to overcome this and create a desktop/dock-bar Icon? + +6. We need to create `tor.desktop` file inside the directory where extracted files resides. + +$ touch tor.desktop + +Now edit the file using your favourite editor with the text below. Save and exit. I used nano. + + $ nano tor.desktop + +---------- + + #!/usr/bin/env xdg-open + [Desktop Entry] + Encoding=UTF-8 + Name=Tor + Comment=Anonymous Browse + Type=Application + Terminal=false + Exec=/home/avi/Downloads/tor-browser_en-US/start-tor-browser + Icon=/home/avi/Downloads/tor-browser_en-US/Browser/browser/icons/mozicon128.png + StartupNotify=true + Categories=Network;WebBrowser; + +**Note**: Make sure to replace the path with the location of your tor browser in the above. + +**7. Once done! Double click the file `tor.desktop` to fire Tor browser. You may need to trust it for the first time.** + +![Tor Application Launcher](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Application-Launcher.jpg) + +Tor Application Launcher + +**8. Once you trust you might note that the icon of `tor.desktop` changed.** + +![Tor icon Changed](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-icon-changed.jpg) + +Tor icon Changed + +9. You may drag and drop the `tor.desktop` icon to create shortcut on Desktop and Dock Bar. + +![Add Tor Shortcut on Desktop](http://www.tecmint.com/wp-content/uploads/2014/04/Add-Tor-Shortcut-on-Desktop.jpg) + +Add Tor Shortcut on Desktop + +**10. About Tor Browser.** + +![About Tor Browser](http://www.tecmint.com/wp-content/uploads/2014/04/About-Tor-Browser.jpg) + +About Tor Browser + +**Note**: If you are using older version of Tor, you may update it from the above window. + +#### Usability/Area of Application #### + +- Anonymous communication over web. +- Surf to Blocked web Pages. +- Link other Application Viz (FTP) to this secure Internet Browsing Application. + +#### Controversies of Tor-browser #### + +- No security at the boundary of Tor Application i.e., Data Entry and Exit Points. +- A study in 2011 reveals that a specific way of attacking Tor will reveal IP address of BitTorrent Users. +- Some protocols shows the tendency of leaking IP address, revealed in a study. +- Earlier version of Tor bundled with older versions of Firefox browser were found to be JavaScript Attack Vulnerable. +- Tor Browser Seems to Work slow. + +#### Real world Implementation of Tor-browser #### + +- Vuze BitTorrent Client +- Anonymous Os +- Os’es from Scratch +- whonix, etc. + +#### Future of Tor Browser #### + +Tor browser is promising. Perhaps the first application of its kind is implemented very brilliantly. Tor browser must invest for Support, Scalability and research for securing the data from latest attacks. This application is need of the future. + +#### Download Free eBook #### + +Unofficial Guide to Tor Private Browsing + +[![](http://img.tradepub.com/free/w_make129/images/w_make129c4.gif)][2] + +### Conclusion ### + +Tor bowser is a must tool in the present time where the organization you are working for don’t allow you to access certain websites or if you don’t want others to look into your private business or you don’t want to provide your digital footprints to NSA. + +**Note**: Tor Browser don’t provide any safety from Viruses, Trojans or other threats of this kind. Moreover by writing an article of this we never mean to indulge into illegal activity by hiding our identity over Internet. This Post is totally for educational Purpose and for any illegal use of it neither the author of the post nor Tecmint will be responsible. It is the sole responsibility of user. + +Tor-browser is a wonderful application and you must give it a try. That’s all for now. I’ll be here again with another interesting article you people will love to read. Till then stay tuned and connected to Tecmint. Don’t forget to provide us with your value-able feedback in our comment section below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/tor-browser-for-anonymous-web-browsing/ + +作者:[Avishek Kumar][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/avishek/ +[1]:https://www.torproject.org/download/download-easy.html.en +[2]:http://tecmint.tradepub.com/free/w_make129/prgm.cgi \ No newline at end of file From c627fb4eb5fc9b793424107ba00548081d2c9dca Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 17 Jun 2015 16:39:11 +0800 Subject: [PATCH 1212/2517] Translating by ZTinoZ --- sources/tech/20150526 20 Useful Terminal Emulators for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 8938b6049b..9b6db95726 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -221,7 +221,7 @@ Xfce Terminal ### 17. xterm ### -The xterm application is a standard terminal emulator for the X Window System. It maintain DEC VT102 and Tektronix 4014 compatible terminals for applications that can’t use the window system directly. +xterm应用程序是一款标准的在X Window系统上的终端仿真器。It maintain DEC VT102 and Tektronix 4014 compatible terminals for applications that can’t use the window system directly. ![xterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/xterm.jpg) From d1f9adf935781a9aabb16e7c4b6f8cdc94ac3de1 Mon Sep 17 00:00:00 2001 From: sevenot Date: Thu, 18 Jun 2015 00:38:22 +0800 Subject: [PATCH 1213/2517] sevenot translated --- ... The top 10 rookie open source projects.md | 154 ------------------ ... The top 10 rookie open source projects.md | 153 +++++++++++++++++ 2 files changed, 153 insertions(+), 154 deletions(-) delete mode 100644 sources/talk/20150128 The top 10 rookie open source projects.md create mode 100644 translated/talk/20150128 The top 10 rookie open source projects.md diff --git a/sources/talk/20150128 The top 10 rookie open source projects.md b/sources/talk/20150128 The top 10 rookie open source projects.md deleted file mode 100644 index 7dccf38141..0000000000 --- a/sources/talk/20150128 The top 10 rookie open source projects.md +++ /dev/null @@ -1,154 +0,0 @@ -sevenot translating -The top 10 rookie open source projects -================================================================================ -Black Duck presents its Open Source Rookies of the Year -- the 10 most exciting, active new projects germinated by the global open source community - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_01-100564902-orig.jpeg) - -### Open Source Rookies of the Year ### - -Each year sees the start of thousands of new open source projects. Only a handful gets real traction. Some projects gain momentum by building on existing, well-known technologies; others truly break new ground. Many projects are created to solve a simple development problem, while others begin with loftier intentions shared by like-minded developers around the world. - -Since 2009, the open source software logistics company Black Duck has identified the [Open Source Rookies of the Year][1], based on activity tracked by its [Open Hub][2] (formerly Ohloh) site. This year, we're delighted to present 10 winners and two honorable mentions for 2015, selected from thousands of open source projects. Using a weighted scoring system, points were awarded based on project activity, the pace of commits, and several other factors. - -Open source has become the industry's engine of innovation. This year, for example, growth in projects related to Docker containerization trumped every other rookie area -- and not coincidentally reflected the most exciting area of enterprise technology overall. At the very least, the projects described here provide a window on what the global open source developer community is thinking, which is fast becoming a good indicator of where we're headed. - -### 2015 Open Source Rookie of the Year: DebOps ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_02-100564903-orig.jpeg) - -[DebOps][3] is a collection of [Ansible][4] playbooks and roles, scalable from one container to an entire data center. Founder Maciej Delmanowski open-sourced DebOps to ensure his work outlived his current work environment and could grow in strength and depth from outside contributors. - -DebOps began at a small university in Poland that ran its own data center, where everything was configured by hand. Crashes sometimes led to days of downtime -- and Delmanowski realized that a configuration management system was needed. Starting with a Debian base, DebOps is a group of Ansible playbooks that configure an entire data infrastructure. The project has been implemented in many different working environments, and the founders plan to continue supporting and improving it as time goes on. - -### 2015 Open Source Rookie of the Year: Code Combat ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_03-100564904-gallery.idge.jpg) - -The traditional pen-and-paper way of learning falls short for technical subjects. Games, however, are all about engagement -- which is why the founders of [CodeCombat][5] went about creating a multiplayer programming game to teach people how to code. - -At its inception, CodeCombat was an idea for a startup, but the founders decided to create an open source project instead. The idea blossomed within the community, and the project gained contributors at a steady rate. A mere two months after its launch, the game was accepted into Google’s Summer of Code. The game reaches a broad audience and is available in 45 languages. CodeCombat hopes to become the standard for people who want to learn to code and have fun at the same time. - -### 2015 Open Source Rookie of the Year: Storj ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_04-100564905-gallery.idge.jpg) - -[Storj][6] is a peer-to-peer cloud storage network that implements end-to-end encryption, enabling users to transfer and share data without reliance on a third party. Based on bitcoin blockchain technology and peer-to-peer protocols, Storj provides secure, private, and encrypted cloud storage. - -Opponents of cloud-based data storage worry about cost efficiencies and vulnerability to attack. Intended to address both concerns, Storj is a private cloud storage marketplace where space is purchased and traded via Storjcoin X (SJCX). Files uploaded to Storj are shredded, encrypted, and stored across the community. File owners are the sole individuals who possess keys to the encrypted information. - -The proof of concept for this decentralized cloud storage marketplace was first presented at the Texas Bitcoin Conference Hackathon in 2014. After winning first place in the hackathon, the project founders and leaders used open forums, Reddit, bitcoin forums, and social media to grow an active community, now an essential part of the Storj decision-making process. - -### 2015 Open Source Rookie of the Year: Neovim ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_05-100564906-orig.jpg) - -Since its inception in 1991, Vim has been a beloved text editor adopted by millions of software developers. [Neovim][6] is the next generation. - -The software development ecosystem has experienced exponential growth and innovation over the past 23 years. Neovim founder Thiago de Arruda knew that Vim was lacking in modern-day features and development speed. Although determined to preserve the signature features of Vim, the community behind Neovim seeks to improve and evolve the technology of its favorite text editor. Crowdfunding initially enabled de Arruda to focus six uninterrupted months on launching this endeavor. He credits the Neovim community for supporting the project and for inspiring him to continue contributing. - -### 2015 Open Source Rookie of the Year: CockroachDB ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_06-100564907-orig.jpg) - -Former Googlers are bringing a big-company data solution to open source in the form of [CockroachDB][8], a scalable, geo-replicated, transactional data store. - -To maintain the terabytes of data transacted over its global online properties, Google developed Spanner. This powerful tool provides Google with scalability, survivability, and transactionality -- qualities that the team behind CockroachDB is serving up to the open source community. Like an actual cockroach, CockroachDB can survive without its head, tolerating the failure of any node. This open source project has a devoted community of experienced contributors, actively cultivated by the founders via social media, GitHub, networking, conferences, and meet-ups. - -### 2015 Open Source Rookie of the Year: Kubernetes ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_07-100564908-orig.jpg) - -In introducing containerized software development to the open source community, [Docker][9] has become the backbone of a strong, innovative set of tools and technologies. [Kubernetes][10], which Google introduced last June, is an open source container management tool used to accelerate development and simplify operations. - -Google has been using containers for years in its internal operations. At the summer 2014 DockerCon, the Internet giant open-sourced Kubernetes, which was developed to meet the needs of the exponentially growing Docker ecosystem. Through collaborations with other organizations and projects, such as Red Hat and CoreOS, Kubernetes project managers have grown their project to be the No. 1 downloaded tool on the Docker Hub. The Kubernetes team hopes to expand the project and grow the community, so software developers can spend less time managing infrastructure and more time building the apps they want. - -### 2015 Open Source Rookie of the Year: Open Bazaar ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_08-100564909-orig.jpg) - -[OpenBazaar][11] is a decentralized marketplace for trading with anyone using bitcoin. The proof of concept for OpenBazaar was born at a hackathon, where its founders combined BitTorent, bitcoin, and traditional financial server methodologies to create a censorship-resistant trading platform. The OpenBazaar team sought new members, and before long they were able to expand the OpenBazaar community immensely. The table stakes of OpenBazaar -- transparency and a common goal to revolutionize trade and commerce -- are helping founders and contributors work toward a real-world, uncontrolled, and decentralized marketplace. - -### 2015 Open Source Rookie of the Year: IPFS ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_09-100564910-orig.jpg) - -[IPFS (InterPlanetary File System)][12] is a global, versioned, peer-to-peer file system.It synthesizes many of the ideas behind Git, BitTorrent, and HTTP to bring a new data and data structure transport protocol to the open Web. - -Open source is known for developing simple solutions to complex problems that result in many innovations, but these powerful projects represent only one slice of the open source community. IFPS belong to a more radical group whose proof of concept seems daring, outrageous, and even unattainable -- in this case, a peer-to-peer distributed file system that seeks to connect all computing devices. This possible HTTP replacement maintains a community through multiple mediums, including the Git community and an IRC channel that has more than 100 current contributors. This “crazy” idea will be available for alpha testing in 2015. - -### 2015 Open Source Rookie of the Year: cAdvisor ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_10-100564911-orig.jpg) - -[cAdvisor (Container Advisor)][13] is a daemon that collects, aggregates, processes, and exports information about running containers, providing container users with an understanding of resource usage and performance characteristics. For each container, cAdvisor keeps resource isolation parameters, historical resource usage, histograms of complete historical resource usage, and network statistics. This data is exported by container and across machines. - -cAdvisor can run on most Linux distros and supports many container types, including Docker. It has become the de facto monitoring agent for containers, has been integrated into many systems, and is one of the most downloaded images on the Docker Hub. The team hopes to grow cAdvisor to understand application performance more deeply and to integrate this information into clusterwide systems. - -### 2015 Open Source Rookie of the Year: Terraform ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_11-100564912-orig.jpg) - -[Terraform][14] provides a common configuration to launch infrastructure, from physical and virtual servers to email and DNS providers. The idea is to encompass everything from custom in-house solutions to services offered by public cloud platforms. Once launched, Terraform enables ops to change infrastructure safely and efficiently as the configuration evolves. - -Working at a devops company, Terraform.io's founders identified a pain point in codifying the knowledge required to build a complete data center, from plugged-in servers to a fully networked and functional data center. Infrastructure is described using a high-level configuration syntax, which allows a blueprint of your data center to be versioned and treated as you would any other code. Sponsorship from the well-respected open source company HashiCorp helped launch the project. - -### Honorable mention: Docker Fig ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_12-100564913-orig.jpg) - -[Fig][15] provides fast, isolated development environments using [Docker][16]. It moves the configuration required to orchestrate Docker into a simple fig.yml file. It handles all the work of building and running containers and forwarding their ports, as well as sharing volumes and linking them. - -Orchard formed Fig last year to create a new system of tools to make Docker work. It was developed as a way of setting up development environments with Docker, enabling users to define the exact environment for their apps, while also running databases and caches inside Docker. Fig solved a major pain point for developers. Docker fully supports this open source project and [recently purchased Orchard][17] to expand the reach of Fig. - -### Honorable mention: Drone ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_13-100564916-orig.jpg) - -[Drone][18] is a Continuous Integration platform built on Docker and [written in Go][19]. The Drone project grew out of frustration with existing available technologies and processes for setting up development environments. - -Drone provides a simple approach to automated testing and continuous delivery: Simply pick a Docker image tailored to your needs, connect GitHub, and commit. Drone uses Docker containers to provision isolated testing environments, giving every project complete control over its stack without the burden of traditional server administration. The community behind Drone is 100 contributors strong and hopes to bring this project to the enterprise and to mobile app development. - -### Open source rookies ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_14-100564941-orig.jpg) - -- [Open Source Rookies of the 2014 Year][20] -- [InfoWorld's 2015 Technology of the Year Award winners][21] -- [Bossies: The Best of Open Source Software Awards][22] -- [15 essential open source tools for Windows admins][23] - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2875439/open-source-software/the-top-10-rookie-open-source-projects.html - -作者:[Black Duck Software][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Black-Duck-Software/ -[1]:https://www.blackducksoftware.com/open-source-rookies -[2]:https://www.openhub.net/ -[3]:https://github.com/debops/debops -[4]:http://www.infoworld.com/article/2612397/data-center/review--ansible-orchestration-is-a-veteran-unix-admin-s-dream.html -[5]:https://codecombat.com/ -[6]:http://storj.io/ -[7]:http://neovim.org/ -[8]:https://github.com/cockroachdb/cockroach -[9]:http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker -[10]:http://kubernetes.io/ -[11]:https://openbazaar.org/ -[12]:http://ipfs.io/ -[13]:https://github.com/google/cadvisor -[14]:https://www.terraform.io/ -[15]:http://www.fig.sh/ -[16]:http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker -[17]:http://www.infoworld.com/article/2608546/application-virtualization/docker-acquires-orchard-in-a-sign-of-rising-ambitions.html -[18]:https://drone.io/ -[19]:http://www.infoworld.com/article/2683845/google-go/164121-Fast-guide-to-Go-programming.html -[20]:https://www.blackducksoftware.com/open-source-rookies -[21]:http://www.infoworld.com/article/2871935/application-development/infoworlds-2015-technology-of-the-year-award-winners.html -[22]:http://www.infoworld.com/article/2688104/open-source-software/article.html -[23]:http://www.infoworld.com/article/2854954/microsoft-windows/15-essential-open-source-tools-for-windows-admins.html diff --git a/translated/talk/20150128 The top 10 rookie open source projects.md b/translated/talk/20150128 The top 10 rookie open source projects.md new file mode 100644 index 0000000000..c642786914 --- /dev/null +++ b/translated/talk/20150128 The top 10 rookie open source projects.md @@ -0,0 +1,153 @@ +sevenot translated +排名前十的年度开源项目新秀 +================================================================================ +黑鸭(Black Duck)软件公布了一份名叫“年度开源项目新秀”的报告,介绍了由全球开源协会发起的10个最有趣、最活跃的新项目。 + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_01-100564902-orig.jpeg) + +### 年度开源项目新秀 ### + +每年都有上千新的开源项目问世,但只有少数能够真正的吸引我们的关注。一些项目因为利用了当前比较流行的技术而发展壮大,有一些则真正地开启了一个新的邻域。很多开源项目建立的初衷是为了解决一些生产上的问题,还有一些项目则是世界各地志同道合的开发者们共同发起的一个宏伟项目。 + +从2009年起,开源软件公司黑鸭便发起了[年度开源项目新秀][1]这一活动,它的评选根据[Open Hub][2] 网站(即以前的Ohloh)。今年,我们很荣幸能够报道2015年10大开源项目新秀的得主和2名荣誉奖得主,它们是从上千个开源项目中脱颖而出的。评选采用了加权评分系统,得分标准基于项目的活跃度,交付速度,和几个其它因数。 + +开源俨然成为了产业创新的引擎,就拿今年来说,和Docker容器相关的开源项目在全球各地新起,这也不恰巧反映了企业最感兴趣的技术邻域吗?最后,我们接下来介绍的项目,将会让你了解到全球开源项目的开发者们的在思考什么,这很快将会成为一个指引我们发展的领头羊。 + +### 2015年度开源项目新秀: DebOps ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_02-100564903-orig.jpeg) + +[DebOps][3]收集打包了一套[Ansible][4] (Ansible是一种自动化运维工具)方案和规则,可以从1个容器扩展到一个完整的数据中心。它的创始人Maciej Delmanowski将DebOps开源来保证项目长久进行,从而更好的利用外部贡献者来发展下去 + +DebOps始创于波兰的一个不起眼大学校园里,在自己的数据中心上运行,一切都是手工配置的。有时系统崩溃而导致几天的宕机,这时Delmanowski意识到一个配置管理系统是很有必要的。从Debian的基础做起,DebOps是一组配置一整个数据基础设施Ansible方案。此项目已经在许多不同的工作环境下实现,而创始者们则打算继续支持和开发这个项目。 + +###2015年度开源项目新秀: Code Combat ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_03-100564904-gallery.idge.jpg) + +传统的纸笔学习方法已近不能满足技术学科了。然而游戏都是关于参与者,这也就是为什么[CodeCombat][5] 的创始人会去开发一款多人协同编程游戏来教人们如何编码。 + +刚开始CodeCombat是一个创业想法,但其创始人决定创建一个开源项目将其取代。此想法在社区传播开来,很快不少贡献者加入到项目中来。项目发起仅仅两个月后,这款游戏就被收入Google’s Summer of Code。这款游戏吸引了大量玩家,并被翻译成45种语言。CodeCombat希望成为那些想要一边学习代码同时获得乐趣的同学的风向标。 + +### 2015年度开源项目新秀: Storj ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_04-100564905-gallery.idge.jpg) + +[Storj][6]是一个点对点的云存储网络,可实现端到端加密,保证用户不用依赖第三方即可传输、共享数据。基于比特币block chain技术和点对点协议,Storj提供安全、私密、加密的云存储。 + +云数据存储的反对者担心成本开销和漏洞攻击。为了做到没有死角,Storj是一个私有云存储市场,用户可以通过Storjcoin X(SJCX) 购买交易存储空间。上传到Storj的文件会被粉碎、加密和存储到整个社区。只有文件所有者拥有密钥加密的信息 + +在2014年举办的Texas Bitcoin Conference Hackathon会议上,云存储市场概念首次被提出并证明可行。在第一次赢得黑客马拉松活动后,项目创始人们和领导团队利用开源论坛Reddit、比特币论坛和社交媒体推广此项目。如今,它们已成为Storj决策过程的一个重要组成部分。 + +### 2015年度开源项目新秀: Neovim ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_05-100564906-orig.jpg) + +自1991年提出概念以来,Vim已经成为数以百万计软件开发人员所钟爱的文本编辑器。 [Neovim][6] 是它的下一个版本。 + +  在过去的23年里,软件开发生态系统经历了无数增长和创新。Neovim创始人Thiago de Arruda知道Vim缺少当代元素,跟不上时代的发展。在保留Vim的签名功能的前提下,Neovim团队同样在寻求最受欢迎的文本编辑器改善和发展技术。集资初期,Thiago de Arruda连续6个月时间关注推出此项目。他相信他的团队和支持他激励他继续发展Neovim。 + +### 2015年度开源项目新秀: CockroachDB ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_06-100564907-orig.jpg) + +前谷歌员工开发了一个开源的企业数据存储项目[CockroachDB][8],它是一个可扩展的、跨地域复制且支持事务的数据存储的解决方案。 + +为了保证在线百万兆字节流量业务的质量,Google公开了他们的Spanner系统,这是一个可扩展的,稳定的,支持事务的系统。许多参与开发CockroachDB的团队现在都服务与开源社区。就像真正的蟑螂一样,CockroachDB可以在没有数据头、没有任何节点的情况下正常运行。这个开源项目有很多富有经验的贡献者,创始人们通过社会媒体、Github、网络、会议和聚会结识他们并鼓励他们参与其中。 + +### 2015年度开源项目新秀: Kubernetes ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_07-100564908-orig.jpg) + +在介绍集装箱化的软件对开源社区的发展时,[Docker][9]是一匹黑马,它在技术和工具的设置上做了创新。去年6月谷歌推出了[Kubernetes][10],这是一款开源的容器管理工具,用来加快开发和简化操作。 + +谷歌在它的网络系统上使用容器技术多年了。在2014年夏天的DockerCon上大会上,谷歌这个互联网巨头开源了Kubernetes,Kubernetes的开发是为了满足迅速增长的Docker生态系统的需要。通过和其它的组织、项目合作,比如 Red Hat和CoreOS,Kubernetes的管理者们促使它登上了Docker Hub的工具下载榜榜首。Kubernetes的开发团队希望扩大这个项目,发展它的社区,这样的话软件开发者就能花更少的时间在管理基础设施上,而更多的去开发他们自己的APP。 + +### 2015年度开源项目新秀: Open Bazaar ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_08-100564909-orig.jpg) + +OpenBazaar是一个使用比特币和其他人交易的市场。OpenBazaar这一概念最早在编程马拉松(hackathon)活动中被提出,它的创始人结合了BitTorent,比特币和传统的金融服务方式,创造了一个不受审查的交易平台。OpenBazaar的开发团队在寻求新的成员,而且不久以后他们将无限扩大Open Bazaar的社区。Open Bazaar旨在透明度和同一个目标去在商务交易中掀起一场革命,这会帮助创始人和贡献者向着一个真实的世界奋斗,一个没有控制,分散的市场。 + +### 2015年度开源项目新秀: IPFS ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_09-100564910-orig.jpg) + +IPFS 是一个全球的点对点式的分布式版本文件系统。它综合了Git,BitTorrent,HTTP的思想,开启了一个新的数据和数据结构传输协议。 + +开源被人们所知晓的原因,是它本意用简单的方法解决复杂的问题,这样产生许多新颖的想法,但是着些强大的项目仅仅是开源社区的冰山一角。IFPS有一个积极的团队,这个概念的提出是大胆的,令人惊讶的,有点甚至高不可攀。这样来看,一个点对点的分布是文件系统是在寻找所有连在一起的计算设备。也许HTTP的更换可以靠着通过多种手段继续保持一个社区,包括Git社区和超过100名贡献者的IRC。这个疯狂的想法将在2015年进行软件内部测试。 + +### 2015年度开源项目新秀: cAdvisor ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_10-100564911-orig.jpg) + +[cAdvisor (Container Advisor)][13] 是一个针对在运行中的容器进行收集,合计,处理和输出信息的工具,它可以给容器的使用者提供资源的使用情况和工作特性。对于每一个容器,cAdvisor记录着资源的分离参数,资源使用历史,资源使用历史对比框图,网络状态。这些从容器输出的数据在机器中传递。 + +cAdvisor可以在绝大多数的Linux上运行,并且支持包括Docker在内的多种容器类型。事实上它成为了一种容器的代理,并被集成在了很多系统中。cAdvisor在DockerHub下载量也是位居前茅。cAdvisor的开发团队希望把cAdvisor发展到能够更深入地理解应用并且集成到集群系统。 + +### 2015年度开源项目新秀: Terraform ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_11-100564912-orig.jpg) + +[Terraform][14]提供了一些列的设置来创建一个基础设施,从物理机到虚拟机再到email服务器、DNS服务器。这个概念包括从家庭个人机解决方案到公共云平台提供的服务。一旦建立好了以后,Terraform便进行一系列的操作来改变你的基础设施,安全又高效,就如同配置一样。 + +如果你在Devops模式下的公司里工作,Terraform.io的创始者找到了一个窍门把建立一个完整的数据中心所需的知识结合在一起,从插入服务器到整个网络和功能齐备的数据中心。基础设施的描述采用高级的配置语法,允许你把数据中心的蓝图做成多版本并且可以使用多种代码。著名开源公司HashiCorp赞助开发这个项目。 + +### 荣誉奖: Docker Fig ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_12-100564913-orig.jpg) + +[Fig][15] 为[Docker][16]的使用提供了一个快速的,分离的开发环境。Docker的移植只需要将配置信息放到一个简单的 fig.yml文件里。它会处理所有工作,包括建立、运行,端口转发,分享磁盘和容器链接。 + Fig solved a major pain point for developers. Docker fully supports this open source project and [recently purchased Orchard][17] to expand the reach of Fig. +Orchard去年发起了Fig,来创造一个使Docker工作的系统工具。它的开发像是为Docker设置开发环境,为了确保用户能够为他们的APP准确定义环境,在Docker中会运行数据库和缓存。Fig解决了开发者的一个难题。Docker全面支持这个开源项目,最近将买下Orchard来扩张这个项目。 + +### 荣誉奖: Drone ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_13-100564916-orig.jpg) + +[Drone][18]是一个基于Docker的持续集成平台,而且它是用Go语言写的。Drone项目不满于现存的技术和流程,它旨在开发环境。 + +Drone提供了一个简单的自动测试和持续交付的方法:简单选择一个Docker形象来满足你的需求,连接并提交至GitHub即可。Drone使用Docker容器来提供隔离的测试环境,让每个项目完全自主控制堆栈,没有传统的服务器管理的负担。Drone背后的100位社区贡献者强烈希望把这个项目带到企业和移动应用程序开发中 +### 开源新秀 ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_14-100564941-orig.jpg) + +- [2014年度开源项目新秀][20] +- [InfoWorld2015年年度技术奖][21] +- [Bossies: 开源软件最高荣誉][22] +- [ Windows管理员15个必不可少的开源工具][23] + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2875439/open-source-software/the-top-10-rookie-open-source-projects.html + +作者:[Black Duck Software][a] +译者:[sevenot](https://github.com/sevenot) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Black-Duck-Software/ +[1]:https://www.blackducksoftware.com/open-source-rookies +[2]:https://www.openhub.net/ +[3]:https://github.com/debops/debops +[4]:http://www.infoworld.com/article/2612397/data-center/review--ansible-orchestration-is-a-veteran-unix-admin-s-dream.html +[5]:https://codecombat.com/ +[6]:http://storj.io/ +[7]:http://neovim.org/ +[8]:https://github.com/cockroachdb/cockroach +[9]:http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker +[10]:http://kubernetes.io/ +[11]:https://openbazaar.org/ +[12]:http://ipfs.io/ +[13]:https://github.com/google/cadvisor +[14]:https://www.terraform.io/ +[15]:http://www.fig.sh/ +[16]:http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker +[17]:http://www.infoworld.com/article/2608546/application-virtualization/docker-acquires-orchard-in-a-sign-of-rising-ambitions.html +[18]:https://drone.io/ +[19]:http://www.infoworld.com/article/2683845/google-go/164121-Fast-guide-to-Go-programming.html +[20]:https://www.blackducksoftware.com/open-source-rookies +[21]:http://www.infoworld.com/article/2871935/application-development/infoworlds-2015-technology-of-the-year-award-winners.html +[22]:http://www.infoworld.com/article/2688104/open-source-software/article.html +[23]:http://www.infoworld.com/article/2854954/microsoft-windows/15-essential-open-source-tools-for-windows-admins.html From 3ba301d27e497c72fd32071b48c583d97f933bb4 Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 18 Jun 2015 09:07:36 +0800 Subject: [PATCH 1214/2517] Update 20150617 The Art of Command Line.md --- sources/tech/20150617 The Art of Command Line.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150617 The Art of Command Line.md b/sources/tech/20150617 The Art of Command Line.md index d7fb3a5aff..d951d1d45f 100644 --- a/sources/tech/20150617 The Art of Command Line.md +++ b/sources/tech/20150617 The Art of Command Line.md @@ -1,3 +1,4 @@ +Translating by GOLinux! The Art of Command Line ================================================================================ - [Basics](#basics) @@ -432,4 +433,4 @@ via: https://github.com/jlevy/the-art-of-command-line [17]: [18]: [19]: -[20]: \ No newline at end of file +[20]: From 8060d5563571f07ef871b1d2a05dcdf00fba7437 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 18 Jun 2015 10:10:39 +0800 Subject: [PATCH 1215/2517] =?UTF-8?q?PUB:20150515=20Install=20'Tails=201.4?= =?UTF-8?q?=E2=80=B2=20Linux=20Operating=20System=20to=20Preserve=20Privac?= =?UTF-8?q?y=20and=20Anonymity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc --- ... System to Preserve Privacy and Anonymity.md | 112 ++++++++++-------- 1 file changed, 62 insertions(+), 50 deletions(-) rename {translated/tech => published}/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md (57%) diff --git a/translated/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md b/published/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md similarity index 57% rename from translated/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md rename to published/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md index a7e9d4e6b8..4266bba59c 100644 --- a/translated/tech/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md +++ b/published/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md @@ -1,41 +1,41 @@ -安装 Tails 1.4 Linux 操作系统来保护隐私和保持匿名 +用 Tails 1.4 Linux 系统来保护隐私和保持匿名 ================================================================================ -在这个互联网世界和互联网的世界中,我们在线执行我们的大多数任务,无论是订票,汇款,研究,商务,娱乐,社交网络,还是其他。每天我们花费大部分时间在网络上。在每个逝去的日子里,在网络中保持匿名变得越来越难,尤其是在被某些机构例如 NSA (National Security Agency,国安局) 植入后门的情况下,这些机构嗅探着我们在网络中的所有动作。在网络中,我们有着极少,或者说根本就没有隐私。基于用户浏览网络的活动和机器的活动的搜索都被记录了下来。 +在这个互联网世界和互联网的世界中,我们在线执行我们的大多数任务,无论是订票,汇款,研究,商务,娱乐,社交网络,还是其它。每天我们花费大部分时间在网络上。在过去这些的日子里,在网络中保持匿名变得越来越难,尤其是在被某些机构例如 NSA (National Security Agency) 植入后门的情况下,他们嗅探着我们在网络中的所有动作。在网络中,我们有着极少的,或者说根本就没有隐私。基于用户浏览网络的活动和机器的活动的搜索都被记录了下来。 -一个来自于 Tor 项目的绝妙浏览器正被上百万人使用,它帮助我们匿名地浏览网络,即使这样,跟踪你的浏览习惯也并不难,所以只使用 Tor 并不能保证你的网络安全。你可以从下面的链接中查看 Tor 的特点及安装指南。 +一款来自于 Tor 项目的绝妙浏览器正被上百万人使用,它帮助我们匿名地浏览网络,即使这样,跟踪你的浏览习惯也并不难,所以只使用 Tor 并不能保证你的网络安全。你可以从下面的链接中查看 Tor 的特点及安装指南。 - [使用 Tor 来进行匿名网络浏览][1] -Tor 项目中有一个名为 Tails 的操作系统。Tails (The Amnesic Incognito Live System) 是一个 live 操作系统,基于 Debian Linux 发行版本,主要着眼于在浏览网络时在网络中保护隐私和匿名,这意味着所有的外向连接都强制通过 Tor 来连接,直接的(非匿名的) 连接请求都会被阻挡。该系统被设计为可在任何可启动介质上运行,例如 USB 或 DVD。 +Tor 项目中有一个名为 Tails 的操作系统。Tails (The Amnesic Incognito Live System) 是一个 live 操作系统,基于 Debian Linux 发行版本,主要着眼于在浏览网络时在网络中保护隐私和匿名,这意味着所有的外向连接都强制通过 Tor 来连接,直接的(非匿名的) 连接请求都会被阻挡。该系统被设计为可在任何可启动介质上运行,例如 USB 棒或 DVD。 -Tails OS 的最新稳定发行版本为 1.4 , 于 2015 年 5 月 12 日发行。Tails 由开源单片 Linux 内核支持,构建在 Debian GNU/Linux 之上,着眼于个人电脑市场, 使用 GNOME 3 作为其默认的用户界面。 +Tails OS 的最新稳定发行版本为 1.4 , 于 2015 年 5 月 12 日发行。Tails 由开源的 Linux 宏内核所驱动,构建在 Debian GNU/Linux 之上,着眼于个人电脑市场, 使用 GNOME 3 作为其默认的用户界面。 #### Tails OS 1.4 的特点 #### -- Tails 是一个 free 的操作系统, free 的意义正如 免费(free)啤酒和言论自由(free) 中的 free +- Tails 是一个 free 的操作系统, free 的意义不仅是免费(free)啤酒的免费,也是言论自由(free) 中的自由 - 构建在 Debian/GNU Linux 操作系统之上, Debian 是使用最广泛的通用操作系统 - 着眼于安全的发行版本 -- 有 Windows 8 外观作为其伪装 +- 伪装成 Windows 8 外观 - 不必安装就可以使用 Live Tails CD/DVD 来匿名浏览网络 -- 当 Tails 运行时,不留下任何痕迹 +- 当 Tails 运行时,不会在计算机上留下任何痕迹 - 使用先进的加密工具来加密任何相关文件,邮件等内容 - 通过 Tor 网络来发送和接收流量 -- 在真正意义上为任何人在任何地方保护隐私 -- 在 Live 环境中带有一些可用的应用 +- 真正意义地无论何时何处保护隐私 +- 在 Live 环境中带有一些立即可用的应用 - 系统自带的所有软件都预先配置好只通过 Tor 网络来连接到互联网 -- 任何不通过 Tor 网络而尝试连接网络的应用都将被自动阻拦。 +- 任何不通过 Tor 网络而尝试连接网络的应用都将被自动阻拦 - 限制那些想查看你正在浏览什么网站的人的行动,并限制网站获取你的地理位置 - 连接到那些被墙或被审查的网站 -- 特别设计不使用主操作系统的空间,即使在 swap 空间还有空余的情况下 -- 整个操作系统加载在 RAM 中,在每次重启或关机后会自动擦除掉,所以不会留下任何运行的痕迹。 +- 特别设计不使用主操作系统的空间,即便是 swap 空间也不用 +- 整个操作系统加载在内存中,在每次重启或关机后会自动擦除掉,所以不会留下任何运行的痕迹。 - 先进的安全实现,通过加密 USB 磁盘, HTTPS 应答加密和对邮件,文档进行签名。 -#### 在 Tails 1.4 中可期待的东西 #### +#### 在 Tails 1.4 中所期待的东西 #### - 带有安全滑块的 Tor 浏览器 4.5 - Tor 被升级到版本 0.2.6.7 - 修补了几个安全漏洞 -- 针对诸如 curl, OpenJDK 7, tor Network, openldap 等应用, 许多漏洞被修复并打上了补丁 +- 针对诸如 curl、 OpenJDK 7、 tor Network、 openldap 等应用, 许多漏洞被修复并打上了补丁 要得到完整的更改记录,你需要访问 [这里][2] @@ -43,7 +43,7 @@ Tails OS 的最新稳定发行版本为 1.4 , 于 2015 年 5 月 12 日发行 #### 为什么我应该使用 Tails 操作系统 #### -你需要 Tails 因为你想: +你需要 Tails 因为你想: - 在网络监控下保持自由 - 捍卫自由,隐私和秘密 @@ -62,85 +62,96 @@ Tails OS 的最新稳定发行版本为 1.4 , 于 2015 年 5 月 12 日发行 - [tails-i386-1.4.iso][3] - [tails-i386-1.4.torrent][4] -2. 下载后,可使用 SHA256SUM 来获取 ISO 文件的哈希值并与官方提供的值相比较,以核实 ISO 文件的完整性 +2. 下载后,可使用 sha256sum 来获取 ISO 文件的哈希值并与官方提供的值相比较,以核实 ISO 文件的完整性 $ sha256sum tails-i386-1.4.iso 339c8712768c831e59c4b1523002b83ccb98a4fe62f6a221fee3a15e779ca65d -假如你熟悉 OpenPGP ,将 Tails 的签名密钥与 Debian 的 keyring 相比较以验证其签名,若想了解任何有关 Tails 的加密签名,请将浏览器指向 [这里][5] +假如你熟悉 OpenPGP ,将 Tails 的签名密钥与 Debian 的 keyring 相比较以验证其签名,若想了解任何有关 Tails 的加密签名,请用浏览器访问 [这里][5] -3. 下一步,你需要将镜像写入 USB 或 DVD ROM 中。或许你需要看看这篇文章 [如何创建一个 Live 可启动的 USB][6] 以了解如何使得一个闪存驱动器变得可启动并向它写入 ISO 镜像文件。 +3. 下一步,你需要将镜像写入 USB 棒或 DVD ROM 中。或许你需要看看这篇文章 “[如何创建一个 Live 可启动的 USB棒][6] ”以了解如何使得一个闪存盘变得可启动并向它写入 ISO 镜像文件。 -4. 插入 Tails OS 可启动闪存驱动器或 DVD ROM,并从那里启动 (在 BIOS 中选择该介质来启动)。第一个屏幕中会有两个选项 'Live' 和 'Live (failsafe)' 让你选择。选择 'Live' 并确定。 +4. 插入 Tails OS 的可启动闪存盘或 DVD ROM,并从那里启动 (在 BIOS 中选择该介质来启动)。第一个屏幕中会有两个选项 'Live' 和 'Live (failsafe)' 让你选择。选择 'Live' 并确定。 ![Tails 启动菜单](http://www.tecmint.com/wp-content/uploads/2015/05/1.png) -Tails 启动菜单 + +*Tails 启动菜单* 5. 在登录之前,你有两个选项, 假如你想配置并设定高级选项,点击 '更多选项' 否则点击 'NO'。 ![Tails 欢迎界面](http://www.tecmint.com/wp-content/uploads/2015/05/2.png) -Tails 欢迎界面 -6. 在点击高级选项后,你需要设置 root 密码。假如你想升级它,这是非常重要的。这个 root 密码将会一直有效,知道你关机或重启。 +*Tails 欢迎界面* -另外,若你想开启 Windows 伪装,假如你想在一个公共场所运行这个操作系统,这将使得看起来你正在运行 Windows 8 操作系统。这真是一个好的选项!不是吗?另外,你还有一个选项来配置 网络和 Mac 地址,当一切准备完毕后,点击 '登录' ! +6. 在点击高级选项后,你需要设置 root 密码。假如你想升级它,这是非常重要的。这个 root 密码的有效期将持续到你关机或重启。 + +另外,若你想开启 Windows 伪装,假如你想在一个公共场所运行这个操作系统,这将使得看起来你正在运行 Windows 8 操作系统。这真是一个好的选项!不是吗?另外,你还有一个选项来配置网络和 Mac 地址,当一切准备完毕后,点击 '登录' ! ![Tails OS 的配置](http://www.tecmint.com/wp-content/uploads/2015/05/3.png) -Tails OS 的配置 + +*Tails OS 的配置* 7. 这是使用 Windows 皮肤伪装的 Tails GNU/Linux OS: ![Tails 的 Windows 伪装](http://www.tecmint.com/wp-content/uploads/2015/05/4.jpg) -Tails 的 Windows 伪装 -8. 系统将在后台启动 Tor 网络。在屏幕的右上角查看通知 – Tor 已经准备好了 或现在你已经连接上了互联网。 +*Tails 的 Windows 伪装* -你也可以在 Internet 菜单下查看它包含了哪些东西。 注意 – 它包含有 Tor 浏览器(安全的) 和 不安全的网络浏览器(其中的向内和向外数据不通过 Tor 网络) 和其他应用。 +8. 系统将在后台启动 Tor 网络。在屏幕的右上角查看通知 :“Tor 已经准备好了,现在你已经连接上了互联网”。 + +你也可以在 Internet 菜单下查看它包含了哪些东西。 注意 :它包含有 Tor 浏览器(安全的) 和 不安全的网络浏览器(其中的向内和向外数据不通过 Tor 网络) 和其他应用。 ![Tails 菜单和工具](http://www.tecmint.com/wp-content/uploads/2015/05/5.jpg) -Tails 菜单和工具 + +*Tails 菜单和工具* 9. 点击 Tor 并检查你的 IP 地址。 它确认我的物理位置没有被分享以及我的隐私未被触动。 ![在 Tails 上检查隐私](http://www.tecmint.com/wp-content/uploads/2015/05/6.jpg) -在 Tails 上检查隐私 -10. 你还可以激活 Tails 安装器来从 ISO 镜像文件中 克隆和安装, 克隆和升级以及升级系统。 +*在 Tails 上检查隐私* + +10. 你还可以激活 Tails 安装器来“克隆和安装”, “克隆和升级”以及“从 ISO 镜像文件中升级系统”。 ![Tails 安装器选项](http://www.tecmint.com/wp-content/uploads/2015/05/7.jpg) -Tails 安装器选项 -11. 其他选项为选择 Tor 不带有高级选项,就在登录之前。(查看上面的第 5 步). +*Tails 安装器选项* -![Tails 未带有高级选项](http://www.tecmint.com/wp-content/uploads/2015/05/8.png) -Tails 未带有高级选项 +11. 如果选择另外的那个不带有高级选项的方式,那就直接登录。(查看上面的第 5 步). -12. 你将登录到 Gnome3 桌面环境。 +![不设置高级选项的 Tails](http://www.tecmint.com/wp-content/uploads/2015/05/8.png) + +*不设置高级选项的 Tails* + +12. 这将登录到 Gnome3 桌面环境。 ![Tails Gnome 桌面](http://www.tecmint.com/wp-content/uploads/2015/05/9.png) -Tails Gnome 桌面 -13. 假如你点击启动不安全的浏览器,无论在带有伪装,还是没有带有伪装的情况下,你都将会收到弹窗通知。 +*Tails Gnome 桌面* + +13. 假如你点击启动不安全的浏览器,无论是否带有地址伪装,你都将会收到弹窗通知。 ![Tails 浏览通知](http://www.tecmint.com/wp-content/uploads/2015/05/10.png) -Tails 浏览通知 + +*Tails 浏览通知* 假如你仍启动不安全的浏览器,你将在浏览器中看到如下网页: ![Tails 浏览警告](http://www.tecmint.com/wp-content/uploads/2015/05/11.png) -Tails 浏览警告 + +*Tails 浏览警告* #### Tails 适合我吗?#### 要想得到上面问题的答案,首先回答如下的问题: -- 在上网时,你想你的隐私未被触动吗? -- 你想在身份信息窃取者的眼皮底下保持隐身吗? +- 在上网时,你想你的隐私不被触动吗? +- 你想在窃取身份信息的人的眼皮底下保持隐身吗? - 你想在你的网上私人聊天过程中被他人嗅探吗? - 你真的想向任何人展示你的地理位置吗? - 你开展银行网上交易吗? -- 你愿意受政府和 ISP(注:网络提供商) 的审查吗? +- 你愿意受政府和 ISP的审查吗? 假如以上问题中,任意一个问题的答案为 'YES',则你最好需要 Tails。假如上面所有的问题的答案都是 'NO',则或许你不需要它。 @@ -150,27 +161,28 @@ Tails 浏览警告 ### 总结 ### -对于那些工作在不安全环境中的人来说,Tails 是一个必需的操作系统。Tails 还是一个着眼于安全的操作系统,现在为止,包含一大批应用 – Gnome 桌面, Tor, Firefox (Iceweasel), Network Manager, Pidgin, Claws mail, Liferea feed addregator, Gobby, Aircrack-ng, I2P。 +对于那些工作在不安全环境中的人来说,Tails 是一个必需的操作系统。Tails 还是一个着眼于安全的操作系统,现在为止,包含了一大批应用 – Gnome 桌面、Tor、 Firefox (Iceweasel)、 Network Manager、 Pidgin、 Claws mail、 Liferea feed addregator、 Gobby、 Aircrack-ng、 I2P。 -同时,它含有一些有关加密和隐私的工具,即 UKS, GNUPG, PWGen, Shamir’s Secret Sharing, Virtual Keyboard (against Hardware Keylogging), MAT, KeePassX Password Manager 等。 +同时,它含有一些有关加密和隐私的工具,即 UKS、 GnuPG、 PWGen、 Shamir's Secret Sharing、 Virtual Keyboard (对付硬件的键盘记录器)、 MAT、 KeePassX Password Manager 等。 -这就是全部了。关注 Tecmint。请分享你的有关 Tails GNU/Linux 操作系统的想法。对于这个项目的未来,你怎么看?同时在实际中测试它,并让我们获知你的体验感受。 +这就是全部了。关注我们。请分享你的有关 Tails GNU/Linux 操作系统的想法。对于这个项目的未来,你怎么看?同时在实际中测试它,并让我们获知你的体验感受。 -你也可以在 [Virtualbox][8] 中运行它。 Tails 在 RAM 中加载整个操作系统,所以在 VM 中你需要给定足够的 RAM 来运行 Tails。 +你也可以在 [Virtualbox][8] 中运行它。 Tails 在内存中加载整个操作系统,所以在虚拟机中你需要给定足够的内存来运行 Tails。 + +我在 1GB 内存的环境中测试了 Tails,它工作起来毫无滞后感。谢谢我们的所有用户的支持。使我们成为一个包含所有 Linux 相关信息的地方,你的支持是必需的。 Kudos! -我在 1GB 的环境中测试了 Tails,它工作起来毫无滞后感。谢谢我们的所有用户的支持。使 Tecmint 成为一个包含所有 Linux 相关信息的地方,你的合作是必需的。 Kudos! -------------------------------------------------------------------------------- via: http://www.tecmint.com/install-tails-1-4-linux-operating-system-to-preserve-privacy-and-anonymity/ 作者:[Avishek Kumar][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者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/avishek/ -[1]:http://www.tecmint.com/tor-browser-for-anonymous-web-browsing/ +[1]:https://linux.cn/article-3566-1.html [2]:https://tails.boum.org/news/version_1.4/index.en.html [3]:http://dl.amnesia.boum.org/tails/stable/tails-i386-1.4/tails-i386-1.4.iso [4]:https://tails.boum.org/torrents/files/tails-i386-1.4.torrent From db2ecdf6aeefbe17eab97dd7faa46ce771bfafff Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 18 Jun 2015 10:33:59 +0800 Subject: [PATCH 1216/2517] Update 20150616 LINUX 101--POWER UP YOUR SHELL.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇. --- sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md b/sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md index ef9f3d4937..94102a58a6 100644 --- a/sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md +++ b/sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md @@ -1,3 +1,5 @@ +FSSlc translating + LINUX 101: POWER UP YOUR SHELL ================================================================================ > Get a more versatile,featureful and colourful command line interface with our guide to shell basics. @@ -174,4 +176,4 @@ via: http://www.linuxvoice.com/linux-101-power-up-your-shell-8/ [3]:http://tinyurl.com/osopjv9 [4]:http://www.xiki.org/ [5]:http://ciembor.github.io/4bit -[6]:http://ethanschoonover.com/solarized \ No newline at end of file +[6]:http://ethanschoonover.com/solarized From ae2ab64b4d4e3b2a5711467f2808bf563f6b3d9e Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 18 Jun 2015 10:40:43 +0800 Subject: [PATCH 1217/2517] PUB:20150515 Extend Swap Space using Swap file in Linux @strugglingyouth --- ...tend Swap Space using Swap file in Linux.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150515 Extend Swap Space using Swap file in Linux.md (81%) diff --git a/translated/tech/20150515 Extend Swap Space using Swap file in Linux.md b/published/20150515 Extend Swap Space using Swap file in Linux.md similarity index 81% rename from translated/tech/20150515 Extend Swap Space using Swap file in Linux.md rename to published/20150515 Extend Swap Space using Swap file in Linux.md index 0b1a5c0597..b92b4a8a36 100644 --- a/translated/tech/20150515 Extend Swap Space using Swap file in Linux.md +++ b/published/20150515 Extend Swap Space using Swap file in Linux.md @@ -1,9 +1,6 @@ -translated by strugglingyouth 在linux上使用交换文件扩展交换空间 ================================================================================ -想像一种情景,当我们的Linux系统用尽交换空间时,在这种情况下, -我们想要使用swap分区扩展交换空间,但在某些情况下磁盘上的空闲分区是不可用的, -致使我们不能把它扩大。 +想像一种情景,当我们的Linux系统用尽交换空间时,在这种情况下,我们想要使用swap分区扩展交换空间,但在某些情况下磁盘上已经没有可用的空闲分区了,致使我们不能把它扩大。 因此,在这种情况下,我们可以使用交换文件增加swap空间。 @@ -16,7 +13,7 @@ free-output-with-swap 我的交换分区大小是2 GB,我们将把交换空间扩展1GB。 -#### 第一步:使用下面的dd命令创建大小为1GB交换文件d #### +#### 第一步:使用下面的dd命令创建大小为1GB交换文件 #### [root@linuxtechi ~]# dd if=/dev/zero of=/swap_file bs=1G count=1 1+0 records in @@ -26,7 +23,7 @@ free-output-with-swap 根据你的需要替换 ‘**bs**‘ 和 ‘**count**‘ 的大小. -####第二步:设置交换文件权限为644. #### +#### 第二步:设置交换文件权限为600 #### [root@linuxtechi ~]# chmod 600 /swap_file @@ -56,21 +53,20 @@ free-output-with-swap ![swap-space-after-extension](http://www.linuxtechi.com/wp-content/uploads/2015/06/swap-space-after-extension.jpg) -**Note**: 为了避免出现意外的情况,如下所示使用swapoff命令关闭它, -仅在需要使用时,使用步骤5所示的swapon命令,重新启用交换文件。. +**Note**: 为了避免出现意外的情况,如下所示使用swapoff命令关闭它,仅在需要使用时,使用步骤5所示的swapon命令,重新启用交换文件。 [root@linuxtechi ~]# swapoff /swap_file [root@linuxtechi ~]# -请分享您的宝贵意见或者评论此文章. +请分享您的宝贵意见或者评论此文章。 -------------------------------------------------------------------------------- via: http://www.linuxtechi.com/extend-swap-space-using-swap-file-in-linux/ 作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 449936748ed07bf642fef1e564c8da75bd4709b6 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 18 Jun 2015 11:13:03 +0800 Subject: [PATCH 1218/2517] PUB:20150604 Read about The Document Foundation achievements in 2014--download the Annual Report @sevenot --- ...chievements in 2014--download the Annual Report.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) rename {translated/share => published}/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md (70%) diff --git a/translated/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md b/published/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md similarity index 70% rename from translated/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md rename to published/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md index 678abbb6fd..9bb73fc944 100644 --- a/translated/share/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md +++ b/published/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md @@ -1,14 +1,12 @@ -sevenot translated 下载年度报告,了解The Document Foundation2014年的成果 ================================================================================ ![](https://documentfoundation.files.wordpress.com/2015/06/tdf-report.jpg) - -TDF ReportThe Document Foundation (TDF)郑重地发布了2014年度报告,你可以点击这里下载: [http://tdf.io/report2014][1] (3.2 MB PDF)。高清质量的可以点击这里下载 [http://tdf.io/report2014hq][2] (15.9 MB PDF)。 +The Document Foundation (TDF)郑重地发布了2014年度报告,你可以点击这里下载: [http://tdf.io/report2014][1] (3.2 MB PDF)。高清质量的可以点击这里下载 [http://tdf.io/report2014hq][2] (15.9 MB PDF)。 TDF年度报告中,以回顾2014年开始了这篇报告,其中包括了TDF和LibreOffice的精彩集锦,并且总结了财务情况和预算。 -该报告涉及到项目和活动的会议包括:2014年在伯尔尼的LibreOffice大会,在布鲁塞尔、大加那利岛、巴黎、波士顿和土鲁斯的认证项目,网站与质量保证,Hackfests项目,本土语言项目,基础设施,文档项目,市场设计与营销。 +该报告涉及到项目和活动的会议包括:2014年在伯尔尼的LibreOffice大会,在布鲁塞尔、大加那利岛、巴黎、波士顿和土鲁斯的认证项目、网站与质量保证、Hackfests项目等,本土语言项目,基础设施,文档项目,市场设计与营销。 该报告涉及到的软件开发活动和代码包括:工程指导委员会的活动,LibreOffice的开发,文档解放项目,LibreOffice的安卓移植。 @@ -17,8 +15,7 @@ TDF年度报告中,以回顾2014年开始了这篇报告,其中包括了TDF TDF 2014年度报告的编辑工作由Sophie Gautier, Alexander Werner, Christian Lohmaier, Florian Effenberger, Italo Vignoli 和 Robinson Tryon完成,由Barak Paz设计样式,Libreoffice社区协助完成。 -为了使该文档分布达到最大程度的分布,采用了CC3 认证发布,除非特殊标注,TDF成员和自由软件基金会拥有其所有权。 -[德语版年度报告下载请点击[http://tdf.io/bericht2014][3]]. +为了最大程度的传播该文档,采用了CC3 认证发布,除非特殊标注,TDF成员和自由软件基金会拥有其所有权。 -------------------------------------------------------------------------------- @@ -26,7 +23,7 @@ via: http://blog.documentfoundation.org/2015/06/03/read-about-the-document-found 作者:italovignoli 译者:[sevenot](https://github.com/sevenot) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From ad76750d4db8b80d2fd693768d1e9d8be46e9e0d Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 18 Jun 2015 11:56:30 +0800 Subject: [PATCH 1219/2517] PUB:20150527 3 Open Source Python Shells @wi-cuckoo --- .../20150527 3 Open Source Python Shells.md | 102 ++++++++++++++++++ .../20150527 3 Open Source Python Shells.md | 100 ----------------- 2 files changed, 102 insertions(+), 100 deletions(-) create mode 100644 published/20150527 3 Open Source Python Shells.md delete mode 100644 translated/share/20150527 3 Open Source Python Shells.md diff --git a/published/20150527 3 Open Source Python Shells.md b/published/20150527 3 Open Source Python Shells.md new file mode 100644 index 0000000000..86c6b7ee96 --- /dev/null +++ b/published/20150527 3 Open Source Python Shells.md @@ -0,0 +1,102 @@ +3个开源的Python Shell +========================================================================= + +Python是一个高级、通用、结构化且强大的开源编程语言,广泛用于各种编程工作。它拥有一个全动态类型系统和自动内存管理,与Scheme,Ruby,Perl和Tcl的十分相似,避免编译型语言的许多复杂地方和难以理解。Python于1991年由Guido van Rossum创造,然后逐渐成长,流行。 + +Python是一个非常实用,而且流行的计算机编程语言。使用一个如Python这样的解释型语言的好处之一就是,可以借助其交互的shell探索式地编程。你可以试着代码,而不必专门写一个脚本。但是Python shell也有一些局限性。基本来说,有许多很漂亮的Python shell可选择,都是在基础shell上扩展的。他们每一个都提供了一个极好的交互性的Python 体验。 + +### bpython ### + +![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-bpython.png) + +对于Linux,BSD,OS X和Windows来说,bpython是一个不错的Python解释器的界面。 + +其想法是提供给用户所有的内置功能,很像现在的IDE(集成开发环境),但是是在一个简单,轻量级的包里,可以在终端窗口里面运行。 + +bpython并不追求创造任何新的或者开创性的东西。相反,它聚集了一些简洁的理念,关注于实用性和操作性。 + +功能包括: + +- 内置的语法高亮 - 使用Pygments排版你敲出的代码,并合理配色 +- 根据你的行为,显示自动补全的建议 +- 为任何Python函数列出所期望的参数 - 可以显示你调用的任何函数的参数列表 +- “Rewind”功能会调出内存里的最后一行代码并重新执行 +- 可以将你输入的代码送到pastebin +- 可以将你输入的代码保存到一个文件 +- 自动缩进 +- 支持Python 3 + +--- + +- 网址: [www.bpython-interpreter.org][1] +- 开发者: Bob Farrell and contributors +- 证书: MIT License +- 版本号: 0.14.1 + +### IPython ### + +![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-ipython.png) + +IPython是Python shell的一个交互加强版。她提供了一个丰富的工具集合,帮助你交互式地充分利用Python。 + +IPython可以用来取代标准的Python shell,也可以与标准Python科学和数值处理工具配合,用做一个科学计算(如Matlab或者Mathematical)的完整工作环境。她支持动态对象内省,有限的输入/输出提示,一个宏系统,会话日志,会话恢复,访问完整的系统外壳,详尽且彩色的追踪报告,自动圆括号补全,自动引号补全和可嵌入其他Python程序。 + +功能包括: + +- 强大的交互Shell(基于终端或者Qt) +- 一个基于浏览器的记事本,支持代码,富文本,数学表达式,内置图表和其他富媒介。 +- 支持交互式的数据可视化和使用GUI工具箱 +- 灵活,嵌入式的解释器可以加载进你自己的项目里 +- 易于使用,高效的并行运算工具 + +--- + +- 网址: [ipython.org][2] +- 开发者: The IPython Development Team +- 证书: BSD +- 版本号: 3.1 + +### DreamPie ### + +![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-DreamPie.png) + +DreamPie是一个为可靠性和趣味性设计的Python shell。 + +DreamPie可以用于任何Python解释器(Jython,IronPython,PyPy)。 + +功能包括: + +- 一个新式的交互shell:窗口被分成历史区域和代码区域,历史区域可以让你看到之前的命令及其输出,代码区域是里敲代码的地方。这样,你可以编辑任意多的代码,就好像在你最喜欢的编辑器里一样,并且适当时候可以执行它。你也可以从其他地方复制代码,编辑并马上运行它 +- “只复制代码”命令可以复制你想要的代码,以便你可以把它存入一个文件。代码已经用四个空格缩进进行格式化 +- 自动补全属性和文件名字 +- 自动显示函数参数和文档 +- 在结果历史中保存你最近的结果,备以后用 +- 可以自动折叠很长的输出,以便你可以专注于重要的地方 +- 保存会话的历史记录为一个HTML文件,备以后查询。你可以加载历史文件到DreamPie里,并且快速重复之前的命令。 +- 自动添加圆括号与可选的引号,当你在函数与方法后按下空格键。例如,键入execfile后按下空格会提示execfile("fn") +- 支持交互的matplotlib绘图 +- 支持Python 2.5,Python 2.6,Python 3.1,Jython 2.5,IronPython 2.6和PyPy +- 难以置信的快速反应 + +--- + +- 网址: [www.dreampie.org][3] +- 开发者: Noam Yorav-Raphael +- 证书: GNU GPL v3 +- 版本号: 1.2.1 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150523032756576/PythonShells.html + +作者:Frazer Kline +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.bpython-interpreter.org/ +[2]:http://ipython.org/ +[3]:http://www.dreampie.org/ + +-------------------------------------------------------------------------------- diff --git a/translated/share/20150527 3 Open Source Python Shells.md b/translated/share/20150527 3 Open Source Python Shells.md deleted file mode 100644 index 24b81d697a..0000000000 --- a/translated/share/20150527 3 Open Source Python Shells.md +++ /dev/null @@ -1,100 +0,0 @@ -3个开源的Python Shell -========================================================================= -Python是一个高级,通用,结构化且强大的开源编程语言,用于广泛的编程工作。它拥有一个完全的动态类型系统和自动内存管理,与Scheme,Ruby,Perl和Tcl的十分相似,避免编译型语言的许多复杂地方和难以理解。Python于1991年由Guido van Rossum创造,然后逐渐成长,流行。 - -Python是一个非常实用,而且流行的计算机编程语言。使用一个如Python这样的解释型语言的好处之一就是,可以借助其交互的shell考察式地编程。你可以试用代码,而不必写一个脚本。但是Python shell也有一些局限性。基本来说,有许多很nice的Python shell可选择,都是在基础shell上扩展的。他们每一个都提供了一个极好的交互性的Python 体验。 - --------------- - -### bpython ### - -![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-bpython.png) - -对于Linux,BSD,OS X和Windows来说,bpython是Python解释器一个受欢迎的接口。 - -想法是提供给用户所有的内置功能,很像现在的IDEs(集成开发环境),但是是在一个简单,轻量级的包里,可以在终端窗口里面运行。 - -bpython并不追求创造任何新的或者开创性的东西。相反,她聚集了一些简洁的理念,关注于实用性和操作性。 - -功能包括: - -- 内置的语法高亮 - 使用Pygments排版你敲出的代码,并合理地上色 -- 根据你的行为,显示自动补全的建议。 -- 为任何Python函数列出期望的参数 - 力求显示一列参数,为你调用的任何函数 -- “Rewind”功能,弹出内存里的最后一行代码并重新评定 -- 发送你已经解除占用的代码到粘贴缓存 -- 保存你已经输入到一个文件里的代码 -- 自动缩进 -- 支持Python 3 - -- 网址: [www.bpython-interpreter.org][1] -- 开发者: Bob Farrell and contributors -- 证书: MIT License -- 版本号: 0.14.1 - ----------- - -### IPython ### - -![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-ipython.png) - -IPython是Python shell的一个交互加强版。她提供了一个丰富的工具集合,帮助你交互式地充分利用Python。 - -IPython可以用来取代标准的Python shell,或者当与标准Python 科学和数值处理工具配合,用做一个科学计算(如Matlab或者Mathematical)的完整工作环境。她支持动态对象内省,有限的输入/输出提示,一个宏观系统,会话登录,会话恢复,完整的系统接入,详尽且彩色的追踪报告,自动圆括号,自动应用和可嵌入其他Python程序。 - -功能包括: - -- 强大的交互Shell(终端或者基于Qt) -- 一个基于浏览器的记事本,支持代码,多样文本,数学表达式,内置飞行图表和其他丰富媒介。 -- 支持交互式的数据虚拟化和GUI工具箱使用 -- 灵活,嵌入式的解释器可以加载进你自己的项目里 -- 易于使用,高效的并行运算工具 - -- 网址: [ipython.org][2] -- 开发者: The IPython Development Team -- 证书: BSD -- 版本号: 3.1 - ----------- - -### DreamPie ### - -![](http://www.linuxlinks.com/portal/content/reviews/Programming/Screenshot-DreamPie.png) - -DreamPie是一个为可靠性和兴趣设计的Python shell。 - -DreamPie可以用于任何Python解释器(Jython,IronPython,PyPy)。 - -功能包括: - -- 一个交互shell的新概念:窗口被分成历史区域和代码区域,历史区域可以让你看到之前的命令及其输出,代码区域是里敲代码的地方。这样,你可以编辑任意数量的代码,就好像在你最喜欢的编辑器里一样,并且适当时候可以执行它。你也可以从其他地方复制你想保存的代码,所以你可以把它存入一个文件。代码可以很好地格式化为四级缩进。 -- 自动补全属性和文件名字 -- 自动显示函数参数和文档 -- 在结果历史中保存你最近的结果,备以后用 -- 可以自动展开很长的输出,所以你可以专注于重要的地方 -- 保存会话的历史记录为一个HTML文件,备以后查询。你可以加载历史文件到DreamPie里,并且快速回退到之前的命令。 -- 自动添加圆括号与可选的引用,当你在函数与方法后按下空格键。例如,键入execfile fn并且获得execfile("fn") -- 支持交互的matplotlib绘图 -- 支持Python 2.5,Python 2.6,Python 3.1,Jython 2.5,IronPython 2.6和PyPy -- 难以置信的快速反应 - -- 网址: [www.dreampie.org][3] -- 开发者: Noam Yorav-Raphael -- 证书: GNU GPL v3 -- 版本号: 1.2.1 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20150523032756576/PythonShells.html - -作者:Frazer Kline -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://www.bpython-interpreter.org/ -[2]:http://ipython.org/ -[3]:http://www.dreampie.org/ - --------------------------------------------------------------------------------- From da1385f081b57619bf0549f5a82c03a9ef1342c6 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 18 Jun 2015 15:20:04 +0800 Subject: [PATCH 1220/2517] =?UTF-8?q?20150618-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ll be the future of Linux without Linus.md | 185 ++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 sources/talk/20150618 What will be the future of Linux without Linus.md diff --git a/sources/talk/20150618 What will be the future of Linux without Linus.md b/sources/talk/20150618 What will be the future of Linux without Linus.md new file mode 100644 index 0000000000..e042fdbe61 --- /dev/null +++ b/sources/talk/20150618 What will be the future of Linux without Linus.md @@ -0,0 +1,185 @@ +What will be the future of Linux without Linus? +================================================================================ +![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/06/linus-torvalds-painting.jpg) + +The interview was conducted back in 2007 for Linux For You magazine and we are publishing it here for archival purposes. + +**Q: What are the future enhancements/paths/plans for the Linux kernel?** + +Linus: I’ve never been much of a visionary — instead of looking at huge plans for the future, I tend to have a rather short time frame of ‘issues in the next few months’. I’m a big believer in that the ‘details’ matter, and if you take care of the details, the big issues will end up sorting themselves out on their own. + +So I really don’t have any great vision for what the kernel will look like in five years — just a very general plan to make sure that we keep our eye on the ball. In fact, when it comes to me personally, one of the things I worry about the most isn’t even the technical issues, but making sure that the ‘process’ works, and that people can work well with each other. + +**Q: How do you see the relationship of Linux and Solaris evolving in the future? How will it benefit the users? ** + +Linus: I don’t actually see a whole lot of overlap, except that I think Solaris will start using more of the Linux user space tools (which I obviously don’t personally have a lot to do with — I really only do the kernel). The Linux desktop is just so much better than what traditional Solaris has, and I expect Solaris to move more and more towards a more Linux-like model there. + +On the pure kernel side, the licensing differences mean that there’s not much cooperation, but it will be very interesting to see if that will change. Sun has been making noises about licensing Solaris under the GPL (either v2 or v3), and if the licence differences go away, that could result in some interesting technology. But I’m taking a wait-and-see attitude to that. + +**Q: Now that the GPLv3 has been finalised and released, do you foresee any circumstance that would encourage you to begin moving the kernel to it? Or, from your perspective, is it so bad that you would never consider it?** + +Linus: I think it is much improved over the early drafts, and I don’t think it’s a horrible licence. I just don’t think it’s the same kind of ‘great’ licence that the GPLv2 is. + +So in the absence of the GPLv2, I could see myself using the GPLv3. But since I have a better choice, why should I? + +That said, I try to always be pragmatic, and the fact that I think the GPLv3 is not as good a licence as the GPLv2 is not a ‘black and white’ question. It’s a balancing act. And if there are other advantages to the GPLv3, maybe those other advantages would be big enough to tilt the balance in favour of the GPLv3. + +Quite frankly, I don’t really see any, but if Solaris really is to be released under the GPLv3, maybe the advantage of avoiding unnecessary non-compatible licence issues could be enough of an advantage that it might be worth trying to re-license the Linux kernel under the GPLv3 too. + +Don’t get me wrong — I think it’s unlikely. But I do want to make it clear that I’m not a licence bigot, per se. I think the GPLv2 is clearly the better licence, but licences aren’t everything. + +After all, I use a lot of programs that are under other licences. I might not put a project I start myself under the BSD (or the X11-MIT) licence, but I think it’s a great licence, and for other projects it may well be the right one. + +**Q: Currently are there any Indians who you’d like to highlight as key contributors to the Linux kernel?** + +Linus: I have to admit that I don’t directly work with anybody that I actually realise as being from India. That said, I should clarify a bit: I’ve very consciously tried to set up the kernel development so that I don’t end up working personally with a huge number of people. + +I have this strong conviction that most humans are basically wired up to know a few people really well (your close family and friends), and I’ve tried to make the development model reflect that: with a ‘network of developers’, where people interact with maybe a dozen other people they trust, and those other people in turn interact with ‘their’ set of people they trust. + +So while I’m in occasional contact with hundreds of developers who send me a random patch or two, I’ve tried to set up an environment where the bulk of what I do happens through a much smaller set of people that I know, just because I think that’s how people work. It’s certainly how I like to work. + +Also, in all honesty, I don’t even know where a lot of the people I work with live. Location ends up being pretty secondary. So while I’m pretty sure that none of the top 10-15 I work with most closely, are in India, maybe after this goes public, it might get pointed out that there is actually somebody from there! + +**Q: Since the Linux Kernel Development depends so heavily on you, how do you plan to organise/reorganise it for it to continue progressing without you, in case you decide to dedicate more time to your own life and family?** + +Linus: I’ve long since come to the realisation that Linux is much bigger than me. Yes, I’m intimately involved in it still, and I have a fairly large day-to-day impact on it, and I end up being the person who, in some sense, acts as the central point for a lot of kernel activities; but no — I wouldn’t say that Linux ‘depends heavily’ on me. + +So if I had a heart attack and died tomorrow (happily not likely: I’m apparently healthy as anything), people would certainly notice, but there are thousands of people involved in just the kernel, and there’re more than a few that could take over for me with little real confusion. + +**Q: India is one of the major producers of software engineers, yet we don’t contribute much to the Linux domain. What do you think is keeping Indians from becoming proactive on that front? How do you feel we could encourage Indians to get involved and contribute heavily? You have a fan following in India; could your iconic image be used to inspire enthusiasts?** + +Linus: This is actually a very hard question for me to answer. Getting into open source is such a complicated combination of both infrastructure (Internet access, education, you name it), flow of information and simply culture that I can’t even begin to guess what the biggest stumbling block could be. + +In many ways, at least those with an English-speaking culture in India should have a rather easy time getting involved with Linux and other open source projects, if only thanks to the lack of a language barrier. Certainly much easier than many parts of Asia or even some parts of Europe. + +Of course, while that is a lot of people, it’s equally obviously not the majority in India, and I personally simply don’t know enough about the issues in India to be able to make an even half-way intelligent guess about what the best way forward is. I suspect that an enthusiastic local user community is always the best way, and I think you do have that. + +As to my ‘iconic image’, I tend to dislike that part personally. I’m not a great public speaker, and I’ve avoided travelling for the last several years because I’m not very comfortable being seen as this iconic ‘visionary’. I’m just an engineer, and I just happen to love doing what I do, and to work with other people in public. + +**Q: What would be a good reason for you to consider visiting India?** + +Linus: As mentioned in the first answer, I absolutely detest public speaking, so I tend to avoid conferences, etc. I’d love to go to India for a vacation some day, but if I do, I’d likely just do it incognito — not tell anybody beforehand and just go as a tourist to see the country! + +**Q: Recently, you seemed to slam Subversion and CVS, questioning their basic architecture. Now that you’ve got responses from the Subversion community, do you stand corrected, or are you still unconvinced?** + +Linus: I like making strong statements, because I find the discussion interesting. In other words, I actually tend to ‘like’ arguing. Not mindlessly, but I certainly tend to prefer the discussion a bit more heated, and not just entirely platonic. + +And making strong arguments occasionally ends up resulting in a very valid rebuttal, and then I’ll happily say: “Oh, ok, you’re right.” + +But no, that didn’t happen on SVN/CVS. I suspect a lot of people really don’t much like CVS, so I didn’t really even expect anybody to argue that CVS was really anything but a legacy system. And while I’ve gotten a few people who argued that I shouldn’t have been quite so impolite against SVN (and hey, that’s fair — I’m really not a very polite person!), I don’t think anybody actually argued that SVN was ‘good’. + +SVN is, I think, a classic case of ‘good enough’. It’s what people are used to, and it’s ‘good enough’ to be used fairly widely, but it’s good enough in exactly the sense DOS and Windows were ‘good enough’. Not great technology, just very widely available, and it works well enough for people and looks familiar enough that people use it. But very few people are ‘proud’ of it, or excited about it. + +Git, on the other hand, has some of the ‘UNIX philosophy’ behind it. Not that it is about UNIX, per se, but like original UNIX, it had a fundamental idea behind it. For UNIX, the underlying philosophy was/is that, “Everything is a file.” For git, it’s, Everything is just an object in the content-addressable database.” + +**Q: Is having so many distros a good or bad idea? Choice is fine, but one does not need to be pampered with choices. Instead of so many man hours being spent in building hundreds of distros, wouldn’t it be easier to get into the enterprise and take on the MS challenge if people could come together and support fewer distros (1 for each use maybe)? What’s your view on that?** + +Linus: I think having multiple distros is an inevitable part of open source. And can it be confusing? Sure. Can it be inefficient? Yes. But I’d just like to compare it to politics: ‘democracy’ has all those confusing choices, and often none of the choices is necessarily what you ‘really’ want either, and sometimes you might feel like things would be smoother and more efficient if you didn’t have to worry about the whole confusion of voting, different parties, coalitions, etc. + +But in the end, choice may be inefficient, but it’s also what keeps everybody involved at least ‘somewhat’ honest. We all probably wish our politicians were more honest than they are, and we all probably wish that the different distros sometimes made other choices than they do, but without that choice, we’d be worse off. + +**Q: Why do you think CFS is better than SD?** + +Linus: Part of it is that I have worked with Ingo [Molnar] for a long time, which means that I know him, and know that he’ll be very responsive to any issues that come up. That kind of thing is very important. + +But part of it is simply about numbers. Most people out there actually say that CFS is better than SD. Including, very much, on 3D games (which people claimed was a strong point of SD). + +At the same time, though, I don’t think any piece of code is ever ”perfect”. The best thing to happen is that the people who want to be proponents of SD will try to improve that so much that the balance tips over the other way — and we’ll keep both camps trying interesting things because the internal competition motivates them. + +**Q: In a talk you had at Google about git, someone asked you how you would take an extremely large code base that is currently handled with something centralised and transition to git without stopping business for six months. What was your response to that?** + +Linus: Ahh. That was the question where I couldn’t hear the questioner well (the questions were much more audible in the recordings), and I noticed afterwards, when I went back and listened to the recorded audio, that I didn’t answer the question he asked, but the question I thought he’d asked. + +Anyway, we do have lots of import tools, so that you can actually just import a large project from just about any other previous SCM into git. But the problem, of course, often doesn’t end up being the act of importing itself, but just having to ‘get used to’ the new model! + +And quite frankly, I don’t think there is any other answer to that ‘get used to it’ but to just start out and try it. You obviously do not want to start out by importing the biggest and most central project you have; that would indeed just make everything come to a standstill, and make everybody very unhappy indeed. + +So nobody sane would advocate moving everything over to git overnight, and forcing people to change their environment. No. You’d start with a smaller project inside a company, perhaps something that just one group mostly controls and maintains, and start off by converting that to git. That way you get people used to the model, and you start having a core group with the knowledge about how git works and how to use it within the company. + +And then you just extend on that. Not in one go. You’d import more and more of the projects — even if you have the ‘one big repository’ model at your company; you also almost certainly have that repository as a set of modules, because having everybody check out everything is just not a workable mode of operation (unless ‘everything’ is just not very large). + +So you’d basically migrate one module at a time, until you get to the point where you’re so comfortable with git that you can just migrate the rest (or the ‘rest’ is so legacy that nobody even cares). + +And one of the nice features of git is that it actually plays along pretty well with a lot of other SCMs. That’s how a lot of git users use it: ‘they’ may use git, but sometimes the people they work with don’t even realise, because they see the results of it propagated into some legacy SCM. + +**Q: Did they ever experiment with alternate instruction set implementations at Transmeta? [Transmeta Crusoe chip seemed like a very soft CPU — reminding one of Burroughs B1000 interpretive machine, which actually implemented multiple virtual machines. There was one for system software, another for Cobol, another for Fortran; If that is correct, then one could implement Burroughs 6/7000 or HP3000 like stack architecture on the chip or an instruction set suitable for JVM, etc]** + +Linus: We did indeed have some alternate instruction set, and while I still am not really supposed to talk about it, I can say that we did have a public demonstration of mixing instruction sets. We had a technology showcase where you could run x86 instructions side-by-side with Java byte code (actually, it was a slightly extended pico-java, iirc). + +I think the app we showed running was running DOOM on top of Linux, where the Linux parts were a totally standard x86 distribution, but the DOOM binary was a specially compiled version where part of the game was actually compiled pico-Java. And the CPU ended up running them both the same way — as a JIT down to the native VLIW instruction set. + +(The reason for picking DOOM was just that source code was available, and the core parts of the game were small enough that it was easy to set it up as a demonstration — and it was obviously visually interesting.) + +There were more things going on internally, but I can’t really talk about them. And I wasn’t actually personally involved with the Java one either. + +**Q: 386BSD, from which NetBSD, FreeBSD and OpenBSD were derived, was there well before Linux, but Linux spread much more than 386BSD and its derivatives. How much of this do you attribute to the choice of the licence and how much to the development process you chose? Don’t you think that the GPLv3 protects the freedom that has bred Linux better than the BSDs till now, more than the GPLv2 can?** + +Linus: I think there’s both a licence issue, and a community and personality issue. The BSD licences always encouraged forking, but also meant that if somebody gets really successful and makes a commercial fork, you cannot necessarily join back. And so even if that doesn’t actually happen (and it did, in the BSD cases — with BSDi), people can’t really ‘trust’ each other as much. + +In contrast, the GPLv2 also encourages forking, but it not only encourages the branching off part, it also encourages (and ‘requires’) the ability to merge back again. So now you have a whole new level of trust: you ‘know’ that everybody involved will be bound by the licence, and won’t try to take advantage of you. + +So I see the GPLv2 as the licence that allows people the maximum possible freedom within the requirement that you can always join back together again from either side. Nobody can stop you from taking the improvements to the source code. + +So is the BSD licence even more ‘free’? Yes. Unquestionably. But I just wouldn’t want to use the BSD licence for any project I care about, because I not only want the freedom, I also want the trust so that I can always use the code that others write for my projects. + +So to me, the GPLv2 ends up being a wonderful balance of ‘as free as you can make it’, considering that I do want everybody to be able to trust so that they can always get the source code and use it. + +Which is why I think the GPLv3 ends up being a much less interesting licence. It’s no longer about that trust about “getting the source code back”; it has degenerated into a “I wrote the code, so I should be able to control how you use it.” + +In other words, I just think the GPLv3 is too petty and selfish. I think the GPLv2 has a great balance between ‘freedom’ and ‘trust’. It’s not as free as the BSD licences are, but it gives you peace of mind in return, and matches what I consider ‘tit-for-tat': I give source code, you give me source code in return. + +The GPLv3 tries to control the ‘use’ of that source code. Now it’s, “I give you my source code, so if you use it, you’d better make your devices hackable by me.” See? Petty and small-minded, in my opinion. + +**Q: Slowly but steadily, features of the -rt tree are getting integrated into the mainline. What are your current thoughts regarding a merger of the remaining -rt tree into the mainline (and I’m not talking about the CFS)?** + +Linus: I won’t guarantee that everything from -rt will ‘ever’ be merged into the standard kernel (there may be pieces that simply don’t end up making sense in the generic kernel), but yes, over the years we’ve actually integrated most of it, and the remaining parts could end up making it one of these days. + +I’m a big fan of low-latency work, but at the same time I’m pretty conservative, and I pushed back on some of the more aggressive merging, just because I want to make sure that it all makes sense for not just some extreme real time perspective, but also for ‘normal’ users who don’t need it. And that explains why the process has been a pretty slow but steady trickle of code that has gotten merged, as it was sufficiently stable and made sense. + +That, by the way, is not just an -rt thing; it’s how a lot of the development happens. -rt just happens to be one of the more ‘directed’ kernel projects, and one where the main developer is pretty directly involved with the normal kernel too. But quite often the migration of other features (security, virtual memory changes, virtualisation, etc) follows a similar path: they get written up in a very targeted environment, and then pieces of the features get slowly but surely merged into the standard kernel. + +**Q: I’m very curious about what the future holds for file systems in the kernel. What do you think about Reiser4, XFS4, ZFS and the new project founded by Oracle? ZFS has been receiving a lot of press these days. Reiser4 delivers very good benchmarks, and xfs4 is trying to keep up, whereas the one by Oracle has a lot of the same specs as Sun’s ZFS. Where are we heading? Which FS looks the most promising in your opinion?** + +Linus: Actually, just yesterday we had a git performance issue, where ZFS was orders of magnitude slower than UFS for one user (not under Linux, but git is gaining a lot of traction even outside of kernel development). So I think a lot of the ‘new file system’ mania is partly fed by knowing about the issues with old file systems, and then the (somewhat unrealistic) expectation that a ‘new and improved’ file system will make everything perfect. + +In the end, this is one area where you just let people fight it out. See who comes out the winner — and it doesn’t need to be (and likely will not) be a single winner. Almost always, the right choice of file system ends up depending on the load and circumstances. + +One thing that I’m personally more excited about than any of the file systems you mention is actually the fact that Flash-based hard disks are quickly becoming available even for ‘normal’ users. Sure, they’re still expensive (and fairly small), but Flash-based storage has such a different performance profile from rotating media, that I suspect that it will end up having a large impact on file system design. Right now, most file systems tend to be designed with the latencies of rotating media in mind. + +**Q: The operating system is becoming less and less important. You have said several times that the user is not supposed to ‘see’ the operating system at all. It is the applications that matter. Browser-based applications, like Google’s basic office applications, are making an impact. Where do you think operating systems are headed?** + +Linus: I don’t really believe in the ‘browser OS’, because I think that people will always want to do some things locally. It might be about security, or simply about privacy reasons. And while connectivity is widely available, it certainly isn’t ‘everywhere’. + +So I think the whole ‘Web OS’ certainly is part of the truth, but another part that people seem to dismiss is that operating systems have been around for decades, and it’s really a fairly stable and well-known area of endeavour. People really shouldn’t expect the OS to magically change: it’s not like people were ‘stupid’ back in the 60s either, or even that hardware was ‘that’ fundamentally different back then! + +So don’t expect a revolution. I think OSs will largely continue to do what they do, and while we’ll certainly evolve, I don’t think they’ll change radically. What may change radically are the interfaces and the things you do on top of the OS (and certainly the hardware beneath the OS will continue to evolve too), and that’s what people obviously care about. + +The OS? It’s just that hidden thing that makes it all possible. You really shouldn’t care about it, unless you find it very interesting to know what is really going on in the machine. + +**Q: The last I heard, you were using a PPC G4/5 for your main personal machine — what are you using now, and why?** + +Linus: I ended up giving up on the PowerPC, since nobody is doing any workstations any more, and especially since x86-64 has become such an undeniable powerhouse. So these days, I run a bog-standard PC, with a normal Core 2 Duo on it. + +It was a lot of fun to run another architecture (I ran with alpha as my main architecture way back then, for a few years, so it wasn’t the first time either), but commodity CPUs is where it is at. The only thing that I think can really ever displace the x86 architecture would come from below, i.e., if something makes us not use x86 as our main ISA in a decade, I think it would be ARM, thanks to the mobile device market. + +**Q: What does Linux mean to you — a hobby, philosophy, the meaning of life, a job, the best OS, something else…?** + +Linus: It’s some of all of that. It’s a hobby, but a deeply meaningful one. The best hobbies are the ones that you care ‘really’ deeply about. And these days it’s obviously also my work, and I’m very happy to be able to combine it all. + +I don’t know about a ‘philosophy’, and I don’t really do Linux for any really deeply held moral or philosophical reasons (I literally do it because it’s interesting and fun), but it’s certainly the case that I have come to appreciate the deeper reasons why I think open source works so well. So I may not have started to do Linux for any such deep reasons, and I cannot honestly say that that is what motivates me, but I do end up thinking about why it all works. + +**Q: Did Microsoft’s ‘Men in Black’ ever talk to you?** + +Linus: I’ve never really talked to MS, no. I’ve occasionally been at the same conferences with some MS people (I used to go to more conferences than I do these days), but I’ve never really had anything to do with them. I think there is a mutual wariness. + +-------------------------------------------------------------------------------- + +via: http://www.linuxveda.com/2015/06/17/what-happens-to-linux-after-linus/ + +作者:[Swapnil Bhartiya][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxveda.com/author/arnieswap/ \ No newline at end of file From 914e800ce23ffce018f9c8e047d9fe8c9459bc46 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 18 Jun 2015 15:46:48 +0800 Subject: [PATCH 1221/2517] =?UTF-8?q?20150618-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... on Ubuntu 15.04 with Different Methods.md | 263 ++++++++++++++++++ 1 file changed, 263 insertions(+) create mode 100644 sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md diff --git a/sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md b/sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md new file mode 100644 index 0000000000..85fd9d3312 --- /dev/null +++ b/sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md @@ -0,0 +1,263 @@ +How to Setup Node.JS on Ubuntu 15.04 with Different Methods +================================================================================ +This is such an important article to guide you about the installation and setup of Node.js on Ubuntu 15.04. Node.js is basically a server side java script programming to provide you bindings for enabling the input and output socket bios and streams. It has a high through put and non-blocking IO in a single threaded event loop. It’s also a platform layer that provides the functionality to interact with the Operating system to write file, read files and to do networking operations. So in this article we will perform different installation methods to setup Node.Js on Ubuntu 15.04 server. + +### Methods to Install Node.JS ### + +Their are different ways to install Node.Js and we can prefer to choose any one. Following are some important ways to install Node.Js that we will use to guide you about their each setup on Ubuntu 15.04 so make sure to remove the previous previous packages to avoid from any package conflict. + +- Installation of Node.JS from Source Code +- Installation of Node.JS from Package Manager +- Installation of Node.JS from Github Repository +- Installation of Node.JS with NVM + +### 1) Installing from Source Code ### + +Let's start with installation of Node.JS from the Source Code, so make sure that your system is up to date and dependent packages are pre installed. So follow the below steps and start the setup. + +#### STEP 1: System Update #### + +Use following commands and update Operating system and ten install the required packages are necessary for Node.JS setup. + + root@ubuntu-15:~# apt-get update + + root@ubuntu-15:~# apt-get install python gcc make g++ + +#### STEP 2: Get Source Code of Node.JS #### + +After we had installed the dependent packages now from the official web link of Node.JS just download its source code package and extract it as in following commands. + + root@ubuntu-15:~# wget http://nodejs.org/dist/v0.12.4/node-v0.12.4.tar.gz + root@ubuntu-15:~# tar zxvf node-v0.12.4.tar.gz + +#### STEP 3: Starting Installation #### + +Now move to the source code directory and execute the .configuration file + +![NodeJS Configure](http://blog.linoxide.com/wp-content/uploads/2015/06/13.png) + + root@ubuntu-15:~# ls + node-v0.12.4 node-v0.12.4.tar.gz + root@ubuntu-15:~# cd node-v0.12.4/ + root@ubuntu-15:~/node-v0.12.4# ./configure + root@ubuntu-15:~/node-v0.12.4# make install + +### Testing after Installation of Node.Js from Source Code ### + +Once the installation is done after running make installa command, we check its version and test that Node.Js is working fine by executing some test out puts. + + root@ubuntu-15:~/node-v0.12.4# node -v + v0.12.4 + +![Node.Js Test](http://blog.linoxide.com/wp-content/uploads/2015/06/21.png) + +Create a new file with .js extension execute it with Node command. + + root@ubuntu-15:~/node-v0.12.4# touch helo_test.js + root@ubuntu-15:~/node-v0.12.4# vim helo_test.js + console.log('Hello World'); + +Now execute it with Node command. + + root@ubuntu-15:~/node-v0.12.4# node helo_test.js + Hello World + +The out put shows that we had successfully installed Node.JS on Ubuntu 15.04 which is now ready to create applications on it using java scripts. + +### 2) Installing from Package Manager ### + +The installation of Node.JS through Package Manager is also a very simple process to setup on Ubuntu through NodeSource by adding its Personal Package Archives (PPA). + +We will go through the following steps to install Node.JS through PPA. + +#### STEP 1: Get the Source Code using Curl #### + +Before getting the source code by using the Curl command we must update our system and then run the curl command to fetch the NodeSource into local repository. + + root@ubuntu-15:~#apt-get update + root@ubuntu-15:~# curl -sL https://deb.nodesource.com/setup | sudo bash - + +The curl will execute the following tasks. + + ## Installing the NodeSource Node.js 0.10 repo... + ## Populating apt-get cache... + ## Confirming "vivid" is supported... + ## Adding the NodeSource signing key to your keyring... + ## Creating apt sources list file for the NodeSource Node.js 0.10 repo... + ## Running `apt-get update` for you... + Fetched 6,411 B in 5s (1,077 B/s) + Reading package lists... Done + ## Run `apt-get install nodejs` (as root) to install Node.js 0.10 and npm + +#### STEP 2: Installation of NodeJS and NPM #### + +As per the output of Curl we had fetched the NodeSource to our local repository now through apt-get commands we will install the NodeJS and NPM packages. + + root@ubuntu-15:~# apt-get install nodejs + +![NodeJS Install](http://blog.linoxide.com/wp-content/uploads/2015/06/31.png) + +#### STEP 3: Installing Build Essentials Tool #### + +To compile and install native addons from npm we may also need to install build tools using following command as. + + root@ubuntu-15:~# apt-get install -y build-essential + +### Testing With Node.JS Shell ### + +Testing of Node.Js is similar to the one that we did after installation from the source Code. +so lets start with the node command as follow and get its output result to see if Node.JS is fully functional. + + root@ubuntu-15:~# node + > console.log('Node.js Installed Using Package Manager'); + Node.js Installed Using Package Manager + +---------- + + root@ubuntu-15:~# node + > a = [1,2,3,4,5] + [ 1, 2, 3, 4, 5 ] + > typeof a + 'object' + > 5 + 2 + 7 + > + (^C again to quit) + > + root@ubuntu-15:~# + +### REPL For Your NodeJS Apps ### + +REPL is the Node.js shell, any valid Javascript which can be written in a script can be passed to the REPL. So lets see how REPL works with NodeJS. + + root@ubuntu-15:~# node + > var repl = require("repl"); + undefined + > repl.start("> "); + + Press Enter and it will show out put like this: + > { domain: null, + _events: {}, + _maxListeners: 10, + useGlobal: false, + ignoreUndefined: false, + eval: [Function], + inputStream: + { _connecting: false, + _handle: + { fd: 0, + writeQueueSize: 0, + owner: [Circular], + onread: [Function: onread], + reading: true }, + _readableState: + { highWaterMark: 0, + buffer: [], + length: 0, + pipes: null, + ... + ... + +Here is the list of command line help that we can use to work with REPL. + +![REPL Manual](http://blog.linoxide.com/wp-content/uploads/2015/06/4.png) + +### Working with NodeJS Packet Manager ### + +NPM is simple CLI tool for ensuring that a given node script runs continuously. It helps to Install and manage dependencies through the file package.json. We will start its using init command as. + + root@ubuntu-15:~# npm init + +![NPM starting](http://blog.linoxide.com/wp-content/uploads/2015/06/51.png) + +### 3) Installing from Github Repository ### + +In this method to install Node.JS we will consider few simple steps to directory clone the Node.JS repository from the github. + +Before the start of configurations through the the cloned package of Node.JS make sure that we must have following dependent packages installed with us. + + root@ubuntu-15:~# apt-get install g++ curl make libssl-dev apache2-utils git-core + +Now start the clone with git command and change the directory to its configuration file. + + root@ubuntu-15:~# git clone git://github.com/ry/node.git + root@ubuntu-15:~# cd node/ + +![Git Clone NodeJS](http://blog.linoxide.com/wp-content/uploads/2015/06/61.png) + +To install from the cloned repository now lets run the .config command and then make install to complete the setup of Node.Js . + + root@ubuntu-15:~# ./configure + +![Configure Node](http://blog.linoxide.com/wp-content/uploads/2015/06/7.png) + +Run the make install command that will takes few minutes so be patient and get it ready finalize the setup on Node.JS package for you. + + root@ubuntu-15:~/node# make install + + root@ubuntu-15:~/node# node -v + v0.13.0-pre + +### Testing with Node.JS ### + + root@ubuntu-15:~/node# node + > a = [1,2,3,4,5,6,7] + [ 1, 2, 3, 4, 5, 6, 7 ] + > typeof a + 'object' + > 6 + 5 + 11 + > + (^C again to quit) + > + root@ubuntu-15:~/node# + +### 4) Installing Node.JS Using Node Version Manager ### + +In this last method we show you we can easily install Node.JS with NVM method. This is one of the best method to install and configure Node.JS it provides us with facility to control versions. + +So before starting with this method make sure that the previously installed package is not already present there if you are working on the same machine. + +#### STEP 1: Installing Prerequisites #### + +Let's start with the system update and then install the following prerequisites for the Ubuntu Server to setup Node.JS using NodeJS Versions Manager System. Using the Curl command we will get NVM from the git to our local repository. + + root@ubuntu-15:~# apt-get install build-essential libssl-dev + root@ubuntu-15:~# curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | sh + +![NVM Curl](http://blog.linoxide.com/wp-content/uploads/2015/06/81.png) + +#### STEP 2: Update Home Environment #### + +After the curl command downloads the necessary packages for the NVM in the home directory of the user it also make changes to the bash profile. so in order to update those change and get access to NVM we must relogin to the terminal or we can update it using the source command as below. + + root@ubuntu-15:~# source ~/.profile + +Now we can use the NVM to choose the default NVM version or by moving to the previous version of NVM that we can do so by using the following commands. + + root@ubuntu-15:~# nvm ls + root@ubuntu-15:~# nvm alias default 0.12.4 + +![NVM Default](http://blog.linoxide.com/wp-content/uploads/2015/06/91.png) + +#### STEP 3: Using NodeJS Versions Manager #### + +We have successfully setup the NodeJS with NVM package and now can use it with its useful commands. + +![NVM Manual](http://blog.linoxide.com/wp-content/uploads/2015/06/101.png) + +### CONCLUSION ### + +Now we are ready to go with building server side applications with Node.JS and you are free to choose the best installation setup of your choice as we had done with four optional installations of Node.Js on the latest version of Ubuntu 15.04 with priority installation sequence, now its up to you to follow the one of your own choice and start coding with NodeJS. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-node-js-ubuntu-15-04-different-methods/ + +作者:[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 From 3af50c80dd032b61c1e50273e763eba5ba823e70 Mon Sep 17 00:00:00 2001 From: NearTan Date: Thu, 18 Jun 2015 20:35:04 +0800 Subject: [PATCH 1222/2517] translating --- ...w to Setup Node.JS on Ubuntu 15.04 with Different Methods.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md b/sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md index 85fd9d3312..83b08328e0 100644 --- a/sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md +++ b/sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md @@ -1,3 +1,5 @@ +translating by NearTan + How to Setup Node.JS on Ubuntu 15.04 with Different Methods ================================================================================ This is such an important article to guide you about the installation and setup of Node.js on Ubuntu 15.04. Node.js is basically a server side java script programming to provide you bindings for enabling the input and output socket bios and streams. It has a high through put and non-blocking IO in a single threaded event loop. It’s also a platform layer that provides the functionality to interact with the Operating system to write file, read files and to do networking operations. So in this article we will perform different installation methods to setup Node.Js on Ubuntu 15.04 server. From 5fac86010f7d43f160bb7baa7f8757d708661e5a Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 19 Jun 2015 12:28:52 +0800 Subject: [PATCH 1223/2517] Translating by ZTinoZ --- ...526 20 Useful Terminal Emulators for Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 9b6db95726..42a6137296 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -231,14 +231,14 @@ xterm Terminal ### 18. LilyTerm ### -The LilyTerm is a another less known open source terminal emulator based off of libvte that desire to be fast and lightweight. LilyTerm also include some key features such as: +LilyTerm是一款基于libvte的开源终端仿真器,这款不太出名的仿真器追求的是快速和轻量级。LilyTerm也包括一些关键特性: -- Support for tabbing, coloring and reordering tabs -- Ability to manage tabs through keybindings -- Support for background transparency and saturation. -- Support for user specific profile creation. -- Several customization options for profiles. -- Extensive UTF-8 support. +- 支持标签移动、着色以及标签重新排序 +- 通过快捷键管理标签 +- 支持背景透明化和饱和度调整 +- 支持为特定用户创建配置文件 +- 若干个自定义选项 +- 广泛支持UTF-8 ![Lilyterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Lilyterm.jpg) @@ -248,7 +248,7 @@ Lilyterm Terminal ### 19. Sakura ### -The sakura is a another less known Unix style terminal emulator developed for command line purpose as well as text-based terminal programs. Sakura is based on GTK and livte and provides not more advanced features but some customization options such as multiple tab support, custom text color, font and background images, speedy command processing and few more. +Sakura是另一款不知名的Unix风格终端仿真器,按照命令行模式和基于文本的终端程序开发。Sakura基于GTK和livte,自身特性不多,不过还是有一些自定义选项比如多标签支持、自定义文本颜色、字体和背景图片、快速命令处理等等。 ![Sakura Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/sakura.jpg) From 0c9966c5c3ec45b881346d196d6f7488cd0f0a2d Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Fri, 19 Jun 2015 13:49:40 +0800 Subject: [PATCH 1224/2517] translated wi-cuckoo --- ...P at 20--From pet project to powerhouse.md | 83 ------------------- ...P at 20--From pet project to powerhouse.md | 81 ++++++++++++++++++ 2 files changed, 81 insertions(+), 83 deletions(-) delete mode 100644 sources/talk/20150615 PHP at 20--From pet project to powerhouse.md create mode 100644 translated/talk/20150615 PHP at 20--From pet project to powerhouse.md diff --git a/sources/talk/20150615 PHP at 20--From pet project to powerhouse.md b/sources/talk/20150615 PHP at 20--From pet project to powerhouse.md deleted file mode 100644 index 7ddbf950a9..0000000000 --- a/sources/talk/20150615 PHP at 20--From pet project to powerhouse.md +++ /dev/null @@ -1,83 +0,0 @@ -translating wi-cuckoo -PHP at 20: From pet project to powerhouse -================================================================================ -![](http://images.techhive.com/images/article/2015/06/13049862325_8c97a11878_z-100590275-primary.idge.jpg) - -Credit: [Steve Jurvetson via Flickr][1] - -> The one-time ‘silly little project’ has transformed into a Web powerhouse, thanks to flexibility, pragmatism, and a vibrant community of Web devs - -When Rasmus Lerdorf released “[a set of small tight CGI binaries written in C][2],” he had no idea how much his creation would impact Web development. Delivering the opening keynote at this year’s SunshinePHP conference in Miami, Lerdorf quipped, “In 1995, I thought I had unleashed a C API upon the Web. Obviously, that’s not what happened, or we’d all be C programmers.” - -In fact, when Lerdorf released version 1.0 of Personal Home Page Tools -- as PHP was then known -- the Web was very young. HTML 2.0 would not be published until November of that year, and HTTP/1.0 not until May the following year. NCSA HTTPd was the most widely deployed Web server, and Netscape Navigator was the most popular Web browser, with Internet Explorer 1.0 to arrive in August. In other words, PHP’s beginnings coincided with the eve of the browser wars. - -Those early days speak volumes about PHP’s impact on Web development. Back then, our options were limited when it came to server-side processing for Web apps. PHP stepped in to fill our need for a tool that would enable us to do dynamic things on the Web. That practical flexibility captured our imaginations, and PHP has since grown up with the Web. Now powering [more than 80 percent of the Web][3], PHP has matured into a scripting language that is especially suited to solve the Web problem. Its unique pedigree tells a story of pragmatism over theory and problem solving over purity. - -### The Web glue we got hooked on ### - -PHP didn’t start out as a language, and this is clear from its design -- or lack thereof, as detractors point out. It began as an API to help Web developers access lower-level C libraries. The first version was a small CGI binary that provided form-processing functionality with access to request parameters and the mSQL database. And its facility with a Web app’s database would prove key in sparking our interest in PHP and PHP’s subsequent ascendancy. - -By version 2 -- aka PHP/FI -- database support had expanded to include PostgreSQL, MySQL, Oracle, Sybase, and more. It supported these databases by wrapping their C libraries, making them a part of the PHP binary. PHP/FI could also wrap the GD library to create and manipulate GIF images. It could be run as an Apache module or compiled with FastCGI support, and it introduced the PHP script language with support for variables, arrays, language constructs, and functions. For many of us working on the Web at that time, PHP was the kind of glue we'd been looking for. - -As PHP folded in more and more programming language features, morphing into version 3 and onward, it never lost this gluelike aspect. Through repositories like PECL (PHP Extension Community Library), PHP could tie together libraries and expose their functionality to the PHP layer. This capacity to bring together components became a significant facet of the beauty of PHP, though it was not limited to its source code. - -### The Web as a community of coders ### - -PHP’s lasting impact on Web development isn’t limited to what can be done with the language itself. How PHP work is done and who participates -- these too are important parts of PHP’s legacy. - -As early as 1997, PHP user groups began forming. One of the earliest was the Midwest PHP User’s Group (later known as Chicago PHP), which held its [first meeting in February 1997][4]. This was the beginning of what would become a vibrant, energetic community of developers assembled over an affinity for a little tool that helped them solve problems on the Web. The ubiquity of PHP made it a natural choice for Web development. It became especially popular in the shared hosting world, and its low barrier to entry was attractive to many early Web developers. - -With a growing community came an assortment of tools and resources for PHP developers. The year 2000 -- a watershed moment for PHP -- witnessed the first PHP Developers’ Meeting, a gathering of the core developers of the programming language, who met in Tel Aviv to discuss the forthcoming 4.0 release. PHP Extension and Application Repository (PEAR) also launched in 2000 to provide high-quality userland code packages following standards and best practices. The first PHP conference, PHP Kongress, was held in Germany soon after. [PHPDeveloper.org][5] came online, and to this day, it is the most authoritative news source in the PHP community. - -This communal momentum proved vital to PHP’s growth in subsequent years, and as the Web development industry erupted, so did PHP. PHP began powering more and larger websites. More user groups formed around the world. Mailing lists; online forums; IRC; conferences; trade journals such as php[architect], the German PHP Magazin, and International PHP Magazine -- the vibrancy of the PHP community had a significant impact on the way Web work would be done: collectively and openly, with an emphasis on code sharing. - -Then, 10 years ago, shortly after the release of PHP 5, an interesting thing happened in Web development that created a general shift in how the PHP community built libraries and applications: Ruby on Rails was released. - -### The rise of frameworks ### - -The Ruby on Rails framework for the Ruby programming language created an increased focus and attention on the MVC (model-view-controller) architectural pattern. The Mojavi PHP framework a few years prior had used this pattern, but the hype around Ruby on Rails is what firmly cemented MVC in the PHP frameworks that followed. Frameworks exploded in the PHP community, and frameworks have changed the way developers build PHP applications. - -Many important projects and developments have arisen, thanks to the proliferation of frameworks in the PHP community. The PHP [Framework Interoperability Group][6] formed in 2009 to aid in establishing coding standards, naming conventions, and best practices among frameworks. Codifying these standards and practices helped provide more interoperable software for developers using member projects’ code. This interoperability meant that each framework could be split into components and stand-alone libraries could be used together with monolithic frameworks. With interoperability came another important milestone: The Composer project was born in 2011. - -Inspired by Node.js’s NPM and Ruby’s Bundler, Composer has ushered in a new era of PHP application development, creating a PHP renaissance of sorts. It has encouraged interoperability between packages, standard naming conventions, adoption of coding standards, and increased test coverage. It is an essential tool in any modern PHP application. - -### The need for speed and innovation ### - -Today, the PHP community has a thriving ecosystem of applications and libraries. Some of the most widely installed PHP applications include WordPress, Drupal, Joomla, and MediaWiki. These applications power the Web presence of businesses of all sizes, from small mom-and-pop shops to sites like whitehouse.gov and Wikipedia. Six of the Alexa top 10 sites use PHP to serve billions of pages a day. As a result, PHP applications have been optimized for speed -- and much innovation has gone into PHP core to improve performance. - -In 2010, Facebook unveiled its HipHop for PHP source-to-source compiler, which translates PHP code into C++ code and compiles it into a single executable binary application. Facebook’s size and growth necessitated the move away from standard interpreted PHP code to a faster, optimized executable. However, Facebook wanted to continue using PHP for its ease of use and rapid development cycles. HipHop for PHP evolved into HHVM, a JIT (just-in-time) compilation-based execution engine for PHP, which included a new language based on PHP: [Hack][7]. - -Facebook’s innovations, as well as other VM projects, created competition at the engine level, leading to discussions about the future of the Zend Engine that still powers PHP’s core, as well as the question of a language specification. In 2014, a language specification project was created “to provide a complete and concise definition of the syntax and semantics of the PHP language,” making it possible for compiler projects to create interoperable PHP implementations. - -The next major version of PHP became a topic of intense debate, and a project known as phpng (next generation) was offered as an option to clean up, refactor, optimize, and improve the PHP code base, which also showed substantial improvements to the performance of real-world applications. After deciding to name the next major version “PHP 7,” due to a previous, unreleased PHP 6.0 version, the phpng branch was merged in, and plans were made to proceed with PHP 7, working in many of the language features offered by Hack, such as scalar and return type hinting. - -With the [first PHP 7 alpha release due out today][8] and benchmarks showing [performance as good as or better than that of HHVM][9] in many cases, PHP is keeping up with the pace of modern Web development needs. Likewise, the PHP-FIG continues to innovate and push frameworks and libraries to collaborate and cooperate -- most recently with the adoption of [PSR-7][10], which will change the way PHP projects handle HTTP. User groups, conferences, publications, and initiatives like [PHPMentoring.org][11] continue to advocate best practices, coding standards, and testing to the PHP developer community. - -PHP has seen the Web mature through various stages, and PHP has matured. Once a simple API wrapper around lower-level C libraries, PHP has become a full-fledged programming language in its own right. Its developer community is vibrant and helpful, priding themselves in pragmatism and welcoming newcomers. PHP has stood the test of time for 20 years, and current activity in the language and community is ensuring it will be a relevant and useful language for years to come. - -During his SunshinePHP keynote, Rasmus Lerdorf reflected, “Did I think I’d be here 20 years later talking about this silly little project I did? No, I didn’t.” - -Here’s to Lerdorf and the rest of the PHP community for transforming this “silly little project” into a lasting, powerful component of the Web today. - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2933858/php/php-at-20-from-pet-project-to-powerhouse.html - -作者:[Ben Ramsey][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Ben-Ramsey/ -[1]:https://www.flickr.com/photos/jurvetson/13049862325 -[2]:https://groups.google.com/d/msg/comp.infosystems.www.authoring.cgi/PyJ25gZ6z7A/M9FkTUVDfcwJ -[3]:http://w3techs.com/technologies/overview/programming_language/all -[4]:http://web.archive.org/web/20061215165756/http://chiphpug.php.net/mpug.htm -[5]:http://www.phpdeveloper.org/ -[6]:http://www.php-fig.org/ -[7]:http://www.infoworld.com/article/2610885/facebook-q-a--hack-brings-static-typing-to-php-world.html -[8]:https://wiki.php.net/todo/php70#timetable -[9]:http://talks.php.net/velocity15 -[10]:http://www.php-fig.org/psr/psr-7/ -[11]:http://phpmentoring.org/ diff --git a/translated/talk/20150615 PHP at 20--From pet project to powerhouse.md b/translated/talk/20150615 PHP at 20--From pet project to powerhouse.md new file mode 100644 index 0000000000..2dd4765a42 --- /dev/null +++ b/translated/talk/20150615 PHP at 20--From pet project to powerhouse.md @@ -0,0 +1,81 @@ +PHP 20岁了:从兴趣工程到强大的组织 +============================================================================= +![](http://images.techhive.com/images/article/2015/06/13049862325_8c97a11878_z-100590275-primary.idge.jpg) + +信任: [Steve Jurvetson via Flickr][1] + +> 曾经的‘丑小鸭工程’已经转变为一个网络世界的强大组织,感谢网络世界的灵活,实用与充满生气的社区 + +当Rasmus Lerdorf发布“[一个用C写的紧凑的CGI可执行程序集合][2],” 他没有想到他的创造会对网络发展产生多大的影响。今年在Miami举行的SunshinePHP大会上,Lerdorf做了开场演讲,他自嘲到,“在1995年的时候,我以为我已经解除了C API的束缚,在网络之上。显然,事情并非那样,或者我们都已经是C程序员了。” + +实际上,当Lerdorf发布个人主页工具 -- 后来以PHP闻名的1.0版本时 -- 那时的网络还是如此的年轻。HTML 2.0还没有公布,直到那年的十一月份,而且HTTP/1.0也是次年的五月份才出现。NCSA HTTPd是使用最广泛的网络浏览器,而网景的Navigator则是最流行的网络浏览器,八月份的时候,IE1.0才到来。换句话说,PHP的开端刚好撞上了浏览器战争的前夜。 + +早些时候,说了大堆关于PHP对网络发展的影响。回到那时候,我们的选择是有限的,当说到服务器方面对于网络软件的进展。PHP满足了我们对于一个工具的需求,就是可以使得我们在网络上做一些动态的事情。实用的灵活性束缚了我们的想像,PHP从那时起便与网络共同成长。现在,PHP占据了网络语言超过80%的份额,已经是成熟的脚本语言,特别适合解决网络问题。她独一无二的血统讲述一个故事,实用高于理论,解决问题高于纯粹。 + +### 把我们钩住的网络魔力 ### + +PHP一开始并不是一门编程语言,从她的设计就很明星 -- 或者她本来就缺,正如那些贬低者指出的那样。最初,她是作为一种API帮助网络开发者能够接入底层的C语言封装库。第一个版本是一组小的CGI可执行程序,提供表单处理功能,通过接入需要的参数和mSQL数据库。而且她如此容易地处理一个网络应用的数据库,证明了其在激发我们对于PHP的兴趣和PHP后来的支配地位的关键作用。 + +到了第二版 -- aka PHP/FI -- 数据库的支持已经扩展到包括PostgreSQL、MySQL、Oracle、Sybase等等。她通过包括他们的C语言库来支持其数据库,将他们作为PHP库的一部分。PHP/FI也可以包括GD库,创建并管理GIF镜像。她可以作为一个Apache模块运行,或者有FastCGI支持的时候被编译,并且她展示了支持变量,数组,语言结构和函数的PHP脚本语言。对于那个时候大多数在网络这块工作的人来说,PHP是我们一直在寻求的那款“胶水”。 + +当PHP吸纳越来越多的编程语言分支,演变为第三版和之后的版本,她从来没有失去连接的特性。通过仓库如PECL(PHP Extension Community Library),PHP可以把库都连在一起,暴露他们的函数给PHP层。这种将组件结合在一起的能力,成为PHP之美的一个重要方面,尽管她没有被限制在其资源代码上。 + +### 网络,一个码农们的社区 ### + +PHP在网络发展上的持续影响并不局限于能用这种语言干什么。PHP如何完成工作,谁参与近进来 -- 这些都是PHP传奇很重要的部分。 + +早在1997年,PHP的用户群体开始形成。其中最早的是中东的PHP用户群(后来以Chiago PHP闻名),并[1997年二月份的时候举行了第一次聚会][4]。这是一个充满生气,饱含激情的开发者社区形成的开端,聚合成一种吸引力 -- 在网络上很少的工具就可以帮助他们解决问题。PHP这种普遍存在的特性使得她成为网络开发一个很自然的选择。在分享主导的世界里,她开始盛行,而且低入的门槛对于许多早期的网络开发者来说是十分有吸引力的。 + +伴随着社区的成长,为开发者带来了一堆工具和资源。这一年2000年 -- PHP的一个转折点 -- 见证了第一次PHP开发者大会,编程语言的核心开发者的一次聚集,在Tel Aviv见面,讨论即将到来的4.0版本的发布。PHP扩展和应用仓库(PEAR)也于2000发起,提供高质量的用户代码包,根据标准且最好的操作。第一届PHP大会,PHP Kongress,不久之后在德国举行。[PHPDeveloper.org][5]随后上线,直到今天。这是在PHP社区里最权威的新闻资源。 + +这种公社的势头(有待校正)证明了接下来几年里PHP成长的关键所在,且随着网络开发产业的爆发,PHP也获得发展。PHP开始占领更多,更大的网站。越来越多的用户群在世界范围内形成。邮件列表;在线论坛;IRC;大会;交易日记如php[架构],德国PHP杂志,国际PHP杂志 -- PHP社区的活力在完成网络工作的方式上有极其重要的影响:共同地,开放地,倡导代码共享。 + +然后,10年前,PHP 5发布后不久,在网络发展史上一个有趣地事情发生了,导致了PHP社区如何构建库和应用的转变:Ruby on Rails发布了。 + +### 框架的异军突起 ### + +针对Ruby编程语言的Ruby on Rails,在MVC(模型-视图-控制)架构模型上获得了不断增长的焦点与关注。Mojavi PHP框架几年前已经使用该模型了,但是Ruby on Rails的高明之处在于巩固了MVC。框架在PHP社区炸开了,并且框架已经改变了开发者构建PHP应用程序的方式。 + +许多重要的项目和发展已经起势,这归功于PHP社区框架的生长。PHP[框架互用性组织][6]成立于2009年,致力于在框架间建立编码标准,命名约定与最佳操作。编纂这些标准和操作帮助为开发者提供了越来越多的互动性软件,使用成员项目的代码。互用性意味着每个框架可以拆分为组块和独立的库,可以被一起使用作为整体的框架。互用性带来了另一个重要的里程碑:Composer项目于2011年诞生了。 + +从Node.js的NPM和Ruby的Bundler获得灵感,Composer开辟了PHP应用开发的新纪元,创造了一次PHP“文艺复兴”。它激起了包,标准命名约定,编码标准的采用与成长中的覆盖测试间的互用性。它是任何现代PHP应用中的一个基本工具。 + +### 加速和创新的需要 ### + +如今,PHP社区有一个生机勃勃应用和库的生态系统,一些被广泛安装的PHP应用包括WordPress,Drupal,Joomla和MediaWiki。这些应用占据了所有规模的商业的网络形式,从小型的夫妻店到站点如whitehouse.gov和Wikipeida。Alexa前十的站点中,6个使用PHP在一天内服务数十亿的页面。结果,PHP应用已成加速需要的首选 -- 并且许多创新也加入到PHP的核心来提升表现。 + +在2010年,Facebook公开了其用作PHP源对源的编译器的HipHop,翻译PHP代码为C++代码,并且编译为一个单独的可执行二进制应用。Facebook的规模和成长需要从标准互用的PHP代码迁移到更快,最佳的可执行的代码。尽管如此,Facebook想继续使用PHP,由于PHP的易用和快速开发周期。HipHop进化为HHVM,一个针对PHP的JIT(just-in-time)编译基础的执行引擎,其包含一个基于PHP的新的语言:[Hack][7]。 + +Facebook的创新,和其他的VM项目,创建了在引擎水平上的比较,引起了关于Zend引擎未来的讨论。Zend引擎依然占据PHP和一种语言表述的问题的核心。在2004年,一个语言表述项目被创建,“为提供一个完整的,简明的语句定义,和PHP语言的语义学,”使得对编译器项目来说,创建共用的PHP实现成为可能。 + +下一个PHP的主要版本成为了激烈争论的话题,一个著名的pgpng项目(下一代)作为一个能清理,重构,优化和提升PHP代码基础的选项被提出来,这也展示了对真实世界应用的性能的实质上的提升。由于之前未发布的PHP 6.0版本,在决定命名下一个主要版本为“PHP 7”后,phpng分支被合并了,并制定了计划开发PHP 7,Hack提供了很多语言中拥有的功能,如scalar和返回键入提示。 + +随着[今天第一版PHP 7 alpha发布][8],标准检测程序显示在许多方面[与HHVM的一样或者更好的性能][9],PHP正与现代网络开发需求保持一致的步伐。同样地,PHP-FIG继续创新和推送框架与库用于协作 -- 最近由于[PSR-7][10]的采纳,这将会改变PHP项目处理HTTP的方式。用户组,会议,公众和积极性如[PHPMentoring.org][11]继续在PHP开发者社区提倡最好的操作,编码标准和测试 + +PHP从各个方面见证了网络的成熟,而且PHP自己也成熟了。曾经一个单一的低层次的C语言库的API包装,PHP以她自己的方式,已经成为一个羽翼丰满的编程语言。她的开发者社区是一个充满生气,乐于帮助,在实用方面以自己为傲,并且欢迎新入者的地方。PHP已经经受了20年的考验,而且目前在语言与社区里活跃性,会保证她将会是一个中肯的,有用的的语言,在接下来的几年里。 + +他的SunshinePHP的关键发言中,Rasmus Lerdorf回忆到,“我曾想过我会在20年之后与我当初做的这个愚蠢的小项目交流吗?没有。” + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2933858/php/php-at-20-from-pet-project-to-powerhouse.html + +作者:[Ben Ramsey][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Ben-Ramsey/ +[1]:https://www.flickr.com/photos/jurvetson/13049862325 +[2]:https://groups.google.com/d/msg/comp.infosystems.www.authoring.cgi/PyJ25gZ6z7A/M9FkTUVDfcwJ +[3]:http://w3techs.com/technologies/overview/programming_language/all +[4]:http://web.archive.org/web/20061215165756/http://chiphpug.php.net/mpug.htm +[5]:http://www.phpdeveloper.org/ +[6]:http://www.php-fig.org/ +[7]:http://www.infoworld.com/article/2610885/facebook-q-a--hack-brings-static-typing-to-php-world.html +[8]:https://wiki.php.net/todo/php70#timetable +[9]:http://talks.php.net/velocity15 +[10]:http://www.php-fig.org/psr/psr-7/ +[11]:http://phpmentoring.org/ +这里向Lerdorf和PHP社区的其他人致敬,感谢他们把这个“愚蠢的小项目”变成了一个如今网络上持久的,强大的组块。 From 981f7e86dbe89fc117feac258e96665e7e56fdfe Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Fri, 19 Jun 2015 17:22:25 +0800 Subject: [PATCH 1225/2517] translated --- ...is good audio editing software on Linux.md | 84 ------------------- ...is good audio editing software on Linux.md | 67 +++++++++++++++ 2 files changed, 67 insertions(+), 84 deletions(-) delete mode 100644 sources/tech/20141219 What is good audio editing software on Linux.md create mode 100644 translated/tech/20141219 What is good audio editing software on Linux.md diff --git a/sources/tech/20141219 What is good audio editing software on Linux.md b/sources/tech/20141219 What is good audio editing software on Linux.md deleted file mode 100644 index da015adf14..0000000000 --- a/sources/tech/20141219 What is good audio editing software on Linux.md +++ /dev/null @@ -1,84 +0,0 @@ -translating by wwy-hust - -What is good audio editing software on Linux -================================================================================ - -Whether you are an amateur musician or just a student recording his professor, you need to edit and work with audio recordings. If for a long time such task was exclusively attributed to Macintosh, this time is over, and Linux now has what it takes to do the job. In short, here is a non-exhaustive list of good audio editing software, fit for different tasks and needs. - -### 1. Audacity ### - -![](https://farm9.staticflickr.com/8572/15405018653_83ba3e718d_c.jpg) - -Let's get started head on with my personal favorite. [Audacity][1] works on Windows, Mac, and Linux. It is open source. It is easy to use. You get it: Audacity is almost perfect. This program lets you manipulate the audio waveform from a clean interface. In short, you can overlay tracks, cut and edit them easily, apply effects, perform advanced sound analysis, and finally export to a plethora of format. The reason I like it so much is that it combines both basic features with more complicated ones, but maintain an easy leaning curve. However, it is not a fully optimized software for hardcore musicians, or people with professional knowledge. - -### 2. Jokosher ### - -![](https://farm8.staticflickr.com/7524/15998875136_82903a9b4a_c.jpg) - -On a different level, [Jokosher][2] focuses more on the multi-track aspect for musical artists. Developed in Python and using the GTK+ interface with GStreamer for audio back-end, Jokosher really impressed me with its slick interface and its extensions. If the editing features are not the most advanced, the language is clear and directed to musicians. And I really like the association between tracks and instruments for example. In short, if you are starting as a musician, it might be a good place to get some experience before moving on to more complex suites. - -### 3. Ardour ### - -![](https://farm9.staticflickr.com/8577/16024644385_d8cd8073a3_c.jpg) - -And talking about compex suites, [Ardour][3] is complete software for recording, editing, and mixing. Designed this time to appeal to all professionals, Ardour features in term of sound routing and plugins go way beyond my comprehension. So if you are looking for a beast and are not afraid to tame it, Ardour is probably a good pick. Again, the interface contributes to its charm, as well as its extensive documentation. I particularly appreciated the first-launch configuration tool. - -### 4. Kwave ### - -![](https://farm8.staticflickr.com/7557/15402389884_633a8b04c5_c.jpg) - -For all KDE lovers, [KWave][4] corresponds to your idea of design and features. There are plenty of shortcuts and interesting options, like memory management. Even if the few effects are nice, we are more dealing with a simple tool to cut/paste audio together. It becomes shard not to compare it with Audacity unfortunately. And on top of that, the interface did not appeal to me that much. - -### 5. Qtractor ### - -![](https://farm8.staticflickr.com/7551/16022707501_68c39f37e5_c.jpg) - -If Kwave is too simplistic for you but a Qt-based program really has some appeal, then [Qtractor][5] might be your option. It aims to be "simple enough for the average home user, and yet powerful enough for the professional user." Indeed the quantity of features and options is almost overwhelming. My favorite being of course customizable shortcuts. Apart from that, Qtractor is probably one of my favorite tools to deal with MIDI files. - -### 6. LMMS ### - -![](https://farm8.staticflickr.com/7509/15838603239_ef0ecbc8d2_c.jpg) - -Standing for Linux MultiMedia Studio, LMMS is directly targeted for music production. If you do not have prior experience and do not want to spend too much time getting some, go elsewhere. LMMS is one of those complex but powerful software that only a few will truly master. The number of features and effects is simply too long to list, but if I had to pick one, I would say that the Freeboy plugin to emulate Game Boy sound system is just magical. Past that, go see their amazing documentation. - -### 7. Traverso ### - -![](https://farm8.staticflickr.com/7537/15838603279_70ee925057_c.jpg) - -Finally, Traverso stood out to me for its unlimited track count and its direct integration with CD burning capacities. Aside from that, it appeared to me as a middle man between a simplistic software and a professional program. The interface is very KDE-like, and the keyboard configuration is always welcome. And cherry on the cake, Traverso monitors your resources and make sure that your CPU or hard drive does not go overboard. - -To conclude, it is always a pleasure to see such a large diversity of applications on Linux. It makes finding the software that best fits your needs always possible. While my personal favorite stays Audacity, I was very surprised by the design of programs like LMMS or Jokosher. - -Did we miss one? What do you use for audio editing on Linux? And why? Let us know in the comments. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/good-audio-editing-software-linux.html - -作者:[Adrien Brochard][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/adrien -[1]:http://audacity.sourceforge.net/ -[2]:https://launchpad.net/jokosher/ -[3]:http://ardour.org/ -[4]:http://kwave.sourceforge.net/ -[5]:http://qtractor.sourceforge.net/qtractor-index.html -[6]: -[7]: -[8]: -[9]: -[10]: -[11]: -[12]: -[13]: -[14]: -[15]: -[16]: -[17]: -[18]: -[19]: -[20]: diff --git a/translated/tech/20141219 What is good audio editing software on Linux.md b/translated/tech/20141219 What is good audio editing software on Linux.md new file mode 100644 index 0000000000..c3f9c76d61 --- /dev/null +++ b/translated/tech/20141219 What is good audio editing software on Linux.md @@ -0,0 +1,67 @@ +LinuxƵ༭ +================================================================================ + +һְ߻ֻһҪ¼ʦѧҪ¼Ƶͱ༭ƵĹҪMacintoshǸʱѾȥLinuxҲʤЩˡ֮һݲȫƵ༭бڲͬ + +### 1. Audacity ### + +![](https://farm9.staticflickr.com/8572/15405018653_83ba3e718d_c.jpg) + +ǴҸϲʼ[Audacity][1]WindowsMacLinuxϡǿԴģʹáãAudacityġڸɾĽϲƵΡ򵥵˵Ը졢к޸졢Чִи߼ȻǵһѿõĸʽϲԭĹܺ͸ӵĹܽһұһ򵥵ѧϰߡȻһȫŻǶּҺרҵ֪ʶˡ + +### 2. Jokosher ### + +![](https://farm8.staticflickr.com/7524/15998875136_82903a9b4a_c.jpg) + +ڲͬIJϣ[Jokosher][2]ľ۽ڶ췽档ʹPythonGTK+Ϊǰ˽ڣʹGStreamerΪƵˡJokosherƽĽչԸ̵ӡҲ༭ĹܲȽģʮʺּҡ磬ʮϲϡ֮һּңôתƵһǰʵĺûᡣ + +### 3. Ardour ### + +![](https://farm9.staticflickr.com/8577/16024644385_d8cd8073a3_c.jpg) + +̸һЩӵĹߣ[Ardour][3]һĿ¼ơ༭ͻеרҵԱArdourͲ泬ҵѰһͷҰ޲ҲѱôArdourȡһѡٴΣĽӿںḻĵ״ʱù߶һ֡ + +### 4. Kwave ### + +![](https://farm8.staticflickr.com/7557/15402389884_633a8b04c5_c.jpg) + +KDEȰߣ[KWave][4]Էƺ͹ܵзḻĿݼԼܶȤѡڴܺܶЧܲǸӦùעЩƵ/ճĹߡϧ޷AudacityȣҪǣýӿڲûôҡ + +### 5. Qtractor ### + +![](https://farm8.staticflickr.com/7551/16022707501_68c39f37e5_c.jpg) + +Kwave˵ڼ򵥣QtijȴЩô˵Ҳ[Qtractor][5]һѡһڼͥû˵㹻򵥣ҶרҵԱ˵㹻ǿʵܺѡѹԵġϲĵȻǿɶƵĿݼ֮⣬QtractorϲһMIDIļĹߡ + +### 6. LMMS ### + +![](https://farm8.staticflickr.com/7509/15838603239_ef0ecbc8d2_c.jpg) + +ΪLinuxý幤ңLMMSֱĿ֮ǰûʲô鲢Ҳ˷̫ʱ䣬ôȥ𴦰ɡLMMSһӵǿֻ̫ĹܺЧ޷һһгұһһ˵ģGame BoyϵͳFreeboyֱħһȻȥǾ˵ĵɡ + +### 7. Traverso ### + +![](https://farm8.staticflickr.com/7537/15838603279_70ee925057_c.jpg) + +վǰTraverso֧ƵֱCD¼Ĺܡ⣬˵ǽڼ򵥵רҵ֮ijĽKDEʽģúܼ򵥡ȤǣTraversoϵͳԴȷᳬCPUӲ + +֮ܶLinuxϵͳϿô಻ͬӦóһĵ¡ʹԶҵʺԼһȻϲӦAudacityҷdzLMMSJokosherơ + +©ʲôôLinuxʹһأԭʲôأԴ֪ + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/good-audio-editing-software-linux.html + +ߣ[Adrien Brochard][a] +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ + +[a]:http://xmodulo.com/author/adrien +[1]:http://audacity.sourceforge.net/ +[2]:https://launchpad.net/jokosher/ +[3]:http://ardour.org/ +[4]:http://kwave.sourceforge.net/ +[5]:http://qtractor.sourceforge.net/qtractor-index.html \ No newline at end of file From 85525e10ac3aa43555ed061493b91106a7437fe3 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Fri, 19 Jun 2015 18:01:28 +0800 Subject: [PATCH 1226/2517] [translated] 20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md --- ... Spaces and Special Characters in Linux.md | 436 ------------------ ... Spaces and Special Characters in Linux.md | 435 +++++++++++++++++ 2 files changed, 435 insertions(+), 436 deletions(-) delete mode 100644 sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md create mode 100644 translated/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md diff --git a/sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md b/sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md deleted file mode 100644 index 31b28afd01..0000000000 --- a/sources/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md +++ /dev/null @@ -1,436 +0,0 @@ -zpl1025 -How to Manipulate Filenames Having Spaces and Special Characters in Linux -================================================================================ -We come across files and folders name very regularly. In most of the cases file/folder name are related to the content of the file/folder and starts with number and characters. Alpha-Numeric file name are pretty common and very widely used, but this is not the case when we have to deal with file/folder name that has special characters in them. - -**Note**: We can have files of any type but for simplicity and easy implementation we will be dealing with Text file (.txt), throughout the article. - -Example of most common file names are: - - abc.txt - avi.txt - debian.txt - ... - -Example of numeric file names are: - - 121.txt - 3221.txt - 674659.txt - ... - -Example of Alpha-Numeric file names are: - - eg84235.txt - 3kf43nl2.txt - 2323ddw.txt - ... - -Examples of file names that has special character and is not very common: - - #232.txt - #bkf.txt - #bjsd3469.txt - #121nkfd.txt - -2232.txt - -fbjdew.txt - -gi32kj.txt - --321.txt - --bk34.txt - ... - -One of the most obvious question here is – who on earth create/deal with files/folders name having a Hash `(#)`, a semi-colon `(;)`, a dash `(-)` or any other special character. - -I Agree to you, that such file names are not common still your shell should not break/give up when you have to deal with any such file names. Also speaking technically every thing be it folder, driver or anything else is treated as file in Linux. - -### Dealing with file that has dash (-) in it’s name ### - -Create a file that starts with a dash `(-)`, say -abx.txt. - - $ touch -abc.txt - -#### Sample Output #### - - touch: invalid option -- 'b' - Try 'touch --help' for more information. - -The reason for above error, that shell interprets anything after a dash `(-)`, as option, and obviously there is no such option, hence is the error. - -To resolve such error, we have to tell the Bash shell (yup this and most of the other examples in the article is for BASH) not to interpret anything after special character (here dash), as option. - -There are two ways to resolve this error as: - - $ touch -- -abc.txt [Option #1] - $ touch ./-abc.txt [Option #2] - -You may verify the file thus created by both the above ways by running commands ls or [ls -l][1] for long listing. - - $ ls -l - - total 0 - -rw-r--r-- 1 avi avi 0 Jun 8 11:05 -abc.txt - -To edit the above file you may do: - - $ nano -- -abc.txt - or - $ nano ./-abc.txt - -**Note**: You may replace nano with any other editor of your choice say vim as: - - $ vim -- -abc.txt - or - $ vim ./-abc.txt - -Similarly to move such file you have to do: - - $ mv -- -abc.txt -a.txt - or - $ mv -- -a.txt -abc.txt - -and to Delete this file, you have to do: - - $ rm -- -abc.txt - or - $ rm ./-abc.txt - -If you have lots of files in a folder the name of which contains dash, and you want to delete all of them at once, do as: - - $ rm ./-* - -**Important to Note:** - -1. The same rule as discussed above follows for any number of hypen in the name of the file and their occurrence. Viz., -a-b-c.txt, ab-c.txt, abc-.txt, etc. - -2. The same rule as discussed above follows for the name of the folder having any number of hypen and their occurrence, except the fact that for deleting the folder you have to use ‘rm -rf‘ as: - - $ rm -rf -- -abc - or - $ rm -rf ./-abc - -### Dealing with files having HASH (#) in the name ### - -The symbol `#` has a very different meaning in BASH. Anything after a `#` is interpreted as comment and hence neglected by BASH. - -**Understand it using examples:** - -create a file #abc.txt. - - $ touch #abc.txt - -#### Sample Output #### - - touch: missing file operand - Try 'touch --help' for more information. - -The reason for above error, that Bash is interpreting #abc.txt a comment and hence ignoring. So the [command touch][2] has been passed without any file Operand, and hence is the error. - -To resolve such error, you may ask BASH not to interpret # as comment. - - $ touch ./#abc.txt - or - $ touch '#abc.txt' - -and verify the file just created as: - - $ ls -l - - total 0 - -rw-r--r-- 1 avi avi 0 Jun 8 12:14 #abc.txt - -Now create a file the name of which contains # anywhere except at the begging. - - $ touch ./a#bc.txt - $ touch ./abc#.txt - - or - $ touch 'a#bc.txt' - $ touch 'abc#.txt' - -Run ‘ls -l‘ to verify it: - - $ ls -l - - total 0 - -rw-r--r-- 1 avi avi 0 Jun 8 12:16 a#bc.txt - -rw-r--r-- 1 avi avi 0 Jun 8 12:16 abc#.txt - -What happens when you create two files (say a and #bc) at once: - - $ touch a.txt #bc.txt - -Verify the file just created: - - $ ls -l - - total 0 - -rw-r--r-- 1 avi avi 0 Jun 8 12:18 a.txt - -Obvious from the above example it only created file ‘a‘ and file ‘#bc‘ has been ignored. To execute the above situation successfully we can do, - - $ touch a.txt ./#bc.txt - or - $ touch a.txt '#bc.txt' - -and verify it as: - - $ ls -l - - total 0 - -rw-r--r-- 1 avi avi 0 Jun 8 12:20 a.txt - -rw-r--r-- 1 avi avi 0 Jun 8 12:20 #bc.txt - -You can move the file as: - - $ mv ./#bc.txt ./#cd.txt - or - $ mv '#bc.txt' '#cd.txt' - -Copy it as: - - $ cp ./#cd.txt ./#de.txt - or - $ cp '#cd.txt' '#de.txt' - -You may edit it as using your choice of editor as: - - $ vi ./#cd.txt - or - $ vi '#cd.txt' - ----------- - - $ nano ./#cd.txt - or - $ nano '#cd.txt' - -And Delete it as: - - $ rm ./#bc.txt - or - $ rm '#bc.txt' - -To delete all the files that has hash (#) in the file name, you may use: - - # rm ./#* - -### Dealing with files having semicolon (;) in its name ### - -In case you are not aware, semicolon acts as a command separator in BASH and perhaps other shell as well. Semicolon lets you execute several command in one go and acts as separator. Have you ever deal with any file name having semicolon in it? If not here you will. - -Create a file having semi-colon in it. - - $ touch ;abc.txt - -#### Sample Output #### - - touch: missing file operand - Try 'touch --help' for more information. - bash: abc.txt: command not found - -The reason for above error, that when you run the above command BASH interpret touch as a command but could not find any file operand before semicolon and hence it reports error. It also reports another error that ‘abc.txt‘ command not found, only because after semicolon BASH was expecting another command and ‘abc.txt‘, is not a command. - -To resolve such error, tell BASH not to interpret semicolon as command separator, as: - - $ touch ./';abc.txt' - or - $ touch ';abc.txt' - -**Note**: We have enclosed the file name with single quote ''. It tells BASH that ; is a part of file name and not command separator. - -Rest of the action (viz., copy, move, delete) on the file and folder having semicolon in its name can be carried out straight forward by enclosing the name in single quote. - -### Dealing with other special characters in file/folder name ### - -#### Plus Sign (+) in file name #### - -Don’t requires anything extra, just do it normal way, as simple file name as shown below. - - $ touch +12.txt - -#### Dollar sign ($) in file name #### - -You have to enclose file name in single quote, as we did in the case of semicolon. Rest of the things are straight forward.. - - $ touch '$12.txt' - -#### Percent (%) in file name #### - -You don’t need to do anything differently, treat it as normal file. - - $ touch %12.txt - -#### Asterisk (*) in file name #### - -Having Asterisk in file name don’t change anything and you can continue using it as normal file. - - $ touch *12.txt - -Note: When you have to delete a file that starts with *, Never use following commands to delete such files. - - $ rm * - or - $ rm -rf * - -Instead use, - - $ rm ./*.txt - -#### Exclamation mark (!) in file name #### - -Just Enclose the file name in single quote and rest of the things are same. - - $ touch '!12.txt' - -#### At Sign (@) in file name #### - -Nothing extra, treat a filename having At Sign as nonrmal file. - - $ touch '@12.txt' - -#### ^ in file name #### - -No extra attention required. Use a file having ^ in filename as normal file. - - $ touch ^12.txt - -#### Ampersand (&) in file name #### - -Filename should be enclosed in single quotes and you are ready to go. - - $ touch '&12.txt' - -#### Parentheses () in file name #### - -If the file name has Parenthesis, you need to enclose filename with single quotes. - - $ touch '(12.txt)' - -#### Braces {} in file name #### - -No Extra Care needed. Just treat it as just another file. - - $ touch {12.txt} - -#### Chevrons <> in file name #### - -A file name having Chevrons must be enclosed in single quotes. - - $ touch '<12.txt>' - -#### Square Brackets [ ] in file name #### - -Treat file name having Square Brackets as normal files and you need not take extra care of it. - - $ touch [12.txt] - -#### Under score (_) in file name #### - -They are very common and don’t require anything extra. Just do what you would have done with a normal file. - - $ touch _12.txt - -#### Equal-to (=) in File name #### - -Having an Equal-to sign do not change anything, you can use it as normal file. - - $ touch =12.txt - -#### Dealing with back slash (\) #### - -Backslash tells shell to ignore the next character. You have to enclose file name in single quote, as we did in the case of semicolon. Rest of the things are straight forward. - - $ touch '\12.txt' - -#### The Special Case of Forward Slash #### - -You cannot create a file the name of which includes a forward slash (/), until your file system has bug. There is no way to escape a forward slash. - -So if you can create a file such as ‘/12.txt’ or ‘b/c.txt’ then either your File System has bug or you have Unicode support, which lets you create a file with forward slash. In this case the forward slash is not a real forward slash but a Unicode character that looks alike a forward slash. - -#### Question Mark (?) in file name #### - -Again, an example where you don’t need to put any special attempt. A file name having Question mark can be treated in the most general way. - - $ touch ?12.txt - -#### Dot Mark (.) in file name #### - -The files starting with dot `(.)` are very special in Linux and are called dot files. They are hidden files generally a configuration or system files. You have to use switch ‘-a‘ or ‘-A‘ with ls command to view such files. - -Creating, editing, renaming and deleting of such files are straight forward. - - $ touch .12.txt - -Note: In Linux you may have as many dots `(.)` as you need in a file name. Unlike other system dots in file name don’t means to separate name and extension. You can create a file having multiple dots as: - - $ touch 1.2.3.4.5.6.7.8.9.10.txt - -and check it as: - - $ ls -l - - total 0 - -rw-r--r-- 1 avi avi 0 Jun 8 14:32 1.2.3.4.5.6.7.8.9.10.txt - -#### Comma (,) in file name #### - -You can have comma in a file name, as many as you want and you Don’t requires anything extra. Just do it normal way, as simple file name. - - $ touch ,12.txt - or - $ touch ,12,.txt - -#### Colon (:) in File name #### - -You can have colon in a file name, as many as you want and you Don’t requires anything extra. Just do it normal way, as simple file name. - - $ touch :12.txt - or - $ touch :12:.txt - -#### Having Quotes (single and Double) in file name #### - -To have quotes in file name, we have to use the rule of exchange. I.e, if you need to have single quote in file name, enclose the file name with double quotes and if you need to have double quote in file name, enclose it with single quote. - - $ touch "15'.txt" - - and - - $ touch '15”.txt' - -#### Tilde (~) in file name #### - -Some Editors in Linux like emacs create a backup file of the file being edited. The backup file has the name of the original file plus a tilde at the end of the file name. You can have a file that name of which includes tilde, at any location simply as: - - $ touch ~1a.txt - or - $touch 2b~.txt - -#### White Space in file name #### - -Create a file the name of which has space between character/word, say “hi my name is avishek.txt”. - -It is not a good idea to have file name with spaces and if you have to distinct readable name, you should use, underscore or dash. However if you have to create such a file, you have to use backward slash which ignores the next character to it. To create above file we have to do it this way.. - - $ touch hi\ my\ name\ is\ avishek.txt - - hi my name is avishek.txt - -I have tried covering all the scenario you may come across. Most of the above implementation are explicitly for BASH Shell and may not work in other shell. - -If you feel that I missed something (that is very common and human nature), you may include your suggestion in the comments below. Keep Connected, Keep Commenting. Stay Tuned and connected! Like and share us and help us get spread! - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/manage-linux-filenames-with-special-characters/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ -[2]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ diff --git a/translated/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md b/translated/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md new file mode 100644 index 0000000000..61a320aeb8 --- /dev/null +++ b/translated/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md @@ -0,0 +1,435 @@ +Linux 下如何处理包含空格和特殊字符的文件名 +================================================================================ +我们经常会看到文件名和文件夹名。大多数时候文件/文件夹的名字和内容相关并以数字和字母开头。字母-数字文件名最常见,应用也很广泛,但总会需要处理一些包含特殊字符的文件名/文件夹名。 + +** 注意 **:我们可能有各种类型的文件,但是为了简单以及方便实现,在本文中我们只处理文本文件(.txt)。 + +最常见的文件名例子: + + abc.txt + avi.txt + debian.txt + ... + +数字文件名例子: + + 121.txt + 3221.txt + 674659.txt + ... + +字母数字文件名例子: + + eg84235.txt + 3kf43nl2.txt + 2323ddw.txt + ... + +包含特殊字符的文件名的例子,并不常见: + + #232.txt + #bkf.txt + #bjsd3469.txt + #121nkfd.txt + -2232.txt + -fbjdew.txt + -gi32kj.txt + --321.txt + --bk34.txt + ... + +一个显而易见的问题是 - 在这个星球上有谁会创建/处理包含井号`(#)`,分号`(;)`,破折号`(-)`或其他特殊字符的文件/文件夹啊。 + +我和你想的一样,这种文件名确实不常见,不过在你必须得处理这种文件名的时候你的 shell 也不应该出错或罢工。而且技术上来说,Linux 下的一切比如文件夹,驱动器或其他所有的都被当作文件处理。 + +### 处理名字包含破折号(-)的文件 ### + +创建以破折号`(-)`开头的文件,比如 -abx.txt。 + + $ touch -abc.txt + +#### 测试输出 #### + + touch: invalid option -- 'b' + Try 'touch --help' for more information. + +出现上面错误的原因是,shell 把破折号`(-)`之后的内容认作参数了,而很明显没有这样的参数,所以报错。 + +要解决这个问题,我们得告诉 Bash shell(是的,这里以及本文后面的大多数例子都是基于 BASH 环境)不要将特殊字符(这里是破折号)后的字符解释为参数。 + +有两种方法解决这个错误: + + $ touch -- -abc.txt [方法 #1] + $ touch ./-abc.txt [方法 #2] + +你可以通过运行命令 ls 或 [ls -l][1] 列出详细信息来检查通过上面两种方式创建的文件。 + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 11:05 -abc.txt + +要编辑上述文件可以这样: + + $ nano -- -abc.txt + 或者 + $ nano ./-abc.txt + +**注意**:你可以将 nano 替换为任何其他你喜欢的编辑器比如说 vim: + + $ vim -- -abc.txt + 或者 + $ vim ./-abc.txt + +如果只是简单地移动文件可以这样: + + $ mv -- -abc.txt -a.txt + 或者 + $ mv -- -a.txt -abc.txt + +删除这种文件,可以这样: + + $ rm -- -abc.txt + 或者 + $ rm ./-abc.txt + +如果一个目录下有大量这种名字包含破折号的文件,要一次全部删除的话,可以这样: + + $ rm ./-* + +**重要:** + +1. 上面讨论的规则可以同样应用于名字中包含任意数量以及位置连接符号的文件。就是说,-a-b-c.txt,ab-c.txt,abc-.txt,等等。 + +2. 上面讨论的规则可以同样应用于名字中包含任意数量以及位置连接符号的文件夹,除了一种情况,在删除一个文件夹的时候你得这样使用`rm -rf`: + + $ rm -rf -- -abc + 或者 + $ rm -rf ./-abc + +### 处理名字包含井号(#)的文件 ### + +符号`#`在 BASH 里有非常特别的含义。`#`之后的一切都会被认为是评论,因此会被 BASH 忽略。 + +**通过例子来加深理解:** + +创建一个名字是 #abc.txt 的文件: + + $ touch #abc.txt + +#### 测试输出 #### + + touch: missing file operand + Try 'touch --help' for more information. + +出现上面错误的原因是,BASH 将 #abc.txt 解释为评论而忽略了。所以[命令 touch][2]没有收到任何文件作为参数,所以导致这个错误。 + +要解决这个问题,你肯能需要告诉 BASH 不要将 # 解释为评论。 + + $ touch ./#abc.txt + 或者 + $ touch '#abc.txt' + +检查刚创建的文件: + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 12:14 #abc.txt + +现在创建名字中除了开头的其他地方包含 # 的文件。 + + $ touch ./a#bc.txt + $ touch ./abc#.txt + + 或者 + $ touch 'a#bc.txt' + $ touch 'abc#.txt' + +运行 ‘ls -l‘ 来检查: + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 12:16 a#bc.txt + -rw-r--r-- 1 avi avi 0 Jun 8 12:16 abc#.txt + +如果同时创建两个文件(比如 a 和 #bc)会怎么样: + + $ touch a.txt #bc.txt + +检查刚创建的文件: + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 12:18 a.txt + +很明显上面的例子中只创建了文件 `a` 而文件 `#bc` 被忽略了。对于上面的情况我们可以这样做, + + $ touch a.txt ./#bc.txt + 或者 + $ touch a.txt '#bc.txt' + +检查一下: + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 12:20 a.txt + -rw-r--r-- 1 avi avi 0 Jun 8 12:20 #bc.txt + +可以这样移动文件: + + $ mv ./#bc.txt ./#cd.txt + 或者 + $ mv '#bc.txt' '#cd.txt' + +这样拷贝: + + $ cp ./#cd.txt ./#de.txt + 或者 + $ cp '#cd.txt' '#de.txt' + +可以使用你喜欢的编辑器来编辑文件: + + $ vi ./#cd.txt + 或者 + $ vi '#cd.txt' + +---------- + + $ nano ./#cd.txt + 或者 + $ nano '#cd.txt' + +这样删除: + + $ rm ./#bc.txt + 或者 + $ rm '#bc.txt' + +要删除所有以井号(#)开头的文件,可以这样: + + # rm ./#* + +### 处理名字包含分号(;)的文件 ### + +如果你还不知道的话,分号在 BASH 里起到命令分隔的作用,其他 shell 可能也是一样的。分号作为分隔符可以让你一次执行几个命令。你碰到过名字包含分号的文件吗?如果没有的话,这里有例子。 + +创建一个名字包含分号的文件。 + + $ touch ;abc.txt + +#### 测试输出 #### + + touch: missing file operand + Try 'touch --help' for more information. + bash: abc.txt: command not found + +出现上面错误的原因是,在运行上面命令的时候 BASH 会把 touch 解释为一个命令但是在分号前没有任何文件参数,所以报告错误。然后报告的另一个错误找不到命令 `abc.txt`,只是因为在分号后 BASH 会期望另一个新的命令,而 `abc.txt` 并不是一个命令。 + +要解决这个问题,我们得告诉 BASH 不要将分号解释为命令分隔符,例如: + + $ touch ./';abc.txt' + 或者 + $ touch ';abc.txt' + +**注意**:我们将文件名用单引号 '' 包含起来。这样可以告诉 BASH 分号 ; 是文件名的一部分而不是命令分隔符。 + +对名字包含分号的文件和文件夹的其他操作(就是,拷贝、移动、删除)可以直接将名字用单引号包含起来就好了。 + +### 处理名字包含其他特殊字符的文件/文件夹 ### + +#### 文件名包含加号 (+) #### + +不需要任何特殊处理,按平时的方式做就好了,比如下面测试的文件名。 + + $ touch +12.txt + +#### 文件名包含美元符 ($) #### + +你需要将文件名用单引号括起来,像处理分号那样的方式。然后就很简单了。 + + $ touch '$12.txt' + +#### 文件名包含百分号 (%) #### + +不需要任何特殊处理,当作一个普通文件就可以了。 + + $ touch %12.txt + +#### 文件名包含星号 (*) #### + +名字包含星号的文件没有改变太多,你仍然可以把它当作一个普通文件。(注:星号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) + + $ touch *12.txt + +注意:当你需要删除星号开头的文件时,千万不要用类似下面的命令。 + + $ rm * + 或者 + $ rm -rf * + +而是用这样的命令,(注:这个命令是删除当前目录所有.txt文件。。。) + + $ rm ./*.txt + +#### 文件名包含叹号 (!) #### + +只要将文件名用单引号括起来,其他的就一样了。 + + $ touch '!12.txt' + +#### 文件名包含小老鼠 (@) #### + +没有什么特别的,可以将名字包含小老鼠的文件当作普通文件。 + + $ touch '@12.txt' + +#### 文件名包含 ^ #### + +不需要特殊处理。可以将名字包含 ^ 的文件当作普通文件。 + + $ touch ^12.txt + +#### 文件名包含 (&) #### + +将文件名用单引号括起来,然后就可以操作了。 + + $ touch '&12.txt' + +#### 文件名包含括号 () #### + +如果文件名包含括号,你需要将文件名用单引号括起来。 + + $ touch '(12.txt)' + +#### 文件名包含花括号 {} #### + +不需要特别注意。可以当作普通文件处理。(注:花括号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) + + $ touch {12.txt} + +#### 文件名包含尖括号 <> #### + +名字包含尖括号的文件需要用单引号括起来。 + + $ touch '<12.txt>' + +#### 文件名包含方括号 [ ] #### + +名字包含方括号的文件可以当作普通文件,不用特别处理。(注:方括号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) + + $ touch [12.txt] + +#### 文件名包含下划线 (_) #### + +这个非常普遍不需要特殊对待。当作普通文件随意处理。 + + $ touch _12.txt + +#### 文件名包含等号 (=) #### + +文件名包含等号不会改变任何事情,你可以当作普通文件。(注:等号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) + + $ touch =12.txt + +#### 处理反斜杠 (\) #### + +反斜杠会告诉 shell 忽略后面字符的特殊含义。你必须将文件名用单引号括起来,就像处理分号那样。其他的就没什么了。 + + $ touch '\12.txt' + +#### 包含斜杠的特殊情形 #### + +除非你的文件系统有问题,否则你不能创建名字包含斜杠的文件。没办法转义斜杠。 + +所以如果你能创建类似 ‘/12.txt’ 或者 ‘b/c.txt’ 这样的文件,那要么你的文件系统有问题,或者支持 Unicode,这样你可以创建包含斜杠的文件。只是这样并不是真的斜杠,而是一个看起来像斜杠的 Unicode 字符。 + +#### 文件名包含问号 (?) #### + +再一次,这个也是不需要特别处理的情况。名字包含问号的文件可以和大多数情况一样对待。(注:问号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) + + $ touch ?12.txt + +#### 文件名包含点 (.) #### + +在 Linux 里以点 `(.)` 开头的文件非常特别,被称为点文件。它们通常是隐藏的配置文件或系统文件。你需要使用 ls 命令的 ‘-a‘ 或 ‘-A‘ 开关来查看这种文件。 + +创建,编辑,重命名和删除这种文件很直接。 + + $ touch .12.txt + +注意:在 Linux 里你可能碰到名字包含许多点 `(.)` 的文件。不像其他操作系统,文件名里的点并不意味着分隔名字和扩展后缀。你可以创建名字包含多个点的文件: + + $ touch 1.2.3.4.5.6.7.8.9.10.txt + +检查一下: + + $ ls -l + + total 0 + -rw-r--r-- 1 avi avi 0 Jun 8 14:32 1.2.3.4.5.6.7.8.9.10.txt + +#### 文件名包含逗号 (,) #### + +你可以在文件名中使用逗号,可以有任意多个而不用特殊对待。就像平时普通名字文件那样处理。 + + $ touch ,12.txt + 或者 + $ touch ,12,.txt + +#### 文件名包含冒号 (:) #### + +你可以在文件名中使用冒号,可以有任意多个而不用特殊对待。就像平时普通名字文件那样处理。(注:冒号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) + + $ touch :12.txt + 或者 + $ touch :12:.txt + +#### 文件名包含引号(单引号和双引号) #### + +要在文件名里使用引号,我们需要使用交替规则。例如,如果你需要在文件名里使用单引号,那就用双引号把文件名括起来。而如果你需要在文件名里使用双引号,那就用单引号把文件名括起来。 + + $ touch "15'.txt" + + 以及 + + $ touch '15”.txt' + +#### 文件名包含波浪号 (~) #### + +Linux 下一些像 emacs 这样的文本编辑器在编辑文件的时候会创建备份文件。这个备份文件的名字是在原文件名后面附加一个波浪号。你可以在文件名任意位置使用波浪号,例如:(注:波浪号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) + + $ touch ~1a.txt + 或者 + $touch 2b~.txt + +#### 文件名包含空格 #### + +创建名字的字符/单词之间包含空格的文件,比如 “hi my name is avishek.txt”。 + +最好不要在文件名里使用空格,如果你必须要分隔可读的名字,可以使用下划线或横杠。不过,你还是需要创建这样的文件的话,你可以用反斜杠来转义下一个字符。要创建上面名字的文件可以这样做。 + + $ touch hi\ my\ name\ is\ avishek.txt + + hi my name is avishek.txt + +我已经尝试覆盖你可能碰到的所有情况。上面大多数测试都在 BASH Shell 里完成,可能在其他 shell 下会有差异。 + +如果你觉得我遗漏了什么(这很正常也符合人性),请把你的建议发表到下面的评论里。保持联系,多评论。不要走开!求点赞求分享求扩散! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-linux-filenames-with-special-characters/ + +作者:[Avishek Kumar][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ +[2]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ From fa23a186b3e1abf88165c7751220115eb0785370 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Fri, 19 Jun 2015 18:07:39 +0800 Subject: [PATCH 1227/2517] [translating] 20150616 XBMC--build a remote control.md --- sources/tech/20150616 XBMC--build a remote control.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150616 XBMC--build a remote control.md b/sources/tech/20150616 XBMC--build a remote control.md index 25de9fd06f..5066e28ce2 100644 --- a/sources/tech/20150616 XBMC--build a remote control.md +++ b/sources/tech/20150616 XBMC--build a remote control.md @@ -1,3 +1,4 @@ +zpl1025 XBMC: build a remote control ================================================================================ **Take control of your home media player with a custom remote control running on your Android phone.** @@ -261,4 +262,4 @@ via: http://www.linuxvoice.com/xbmc-build-a-remote-control/ [2]:http://wiki.xbmc.org/?title=JSON-RPC_API/v6 [3]:https://github.com/ben-ev/xbmc-remote [4]:https://github.com/ben-ev/xbmc-remote -[5]:https://github.com/features \ No newline at end of file +[5]:https://github.com/features From d9b893261b8b9577da1b4fe012ce5b64c022a230 Mon Sep 17 00:00:00 2001 From: wwy Date: Sat, 20 Jun 2015 00:39:46 +0800 Subject: [PATCH 1228/2517] Update 20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md --- ...ltimate Web Browser for Anonymous Web Browsing in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md b/sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md index 92fe36dae2..39d25f0456 100644 --- a/sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md +++ b/sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md @@ -1,3 +1,5 @@ +translating by wwy-hust + Tor Browser: An Ultimate Web Browser for Anonymous Web Browsing in Linux ================================================================================ Most of us give a considerable time of ours to Internet. The primary Application we require to perform our internet activity is a browser, a web browser to be more perfect. Over Internet most of our’s activity is logged to Server/Client machine which includes IP address, Geographical Location, search/activity trends and a whole lots of Information which can potentially be very harmful, if used intentionally the other way. @@ -203,4 +205,4 @@ via: http://www.tecmint.com/tor-browser-for-anonymous-web-browsing/ [a]:http://www.tecmint.com/author/avishek/ [1]:https://www.torproject.org/download/download-easy.html.en -[2]:http://tecmint.tradepub.com/free/w_make129/prgm.cgi \ No newline at end of file +[2]:http://tecmint.tradepub.com/free/w_make129/prgm.cgi From 1596b1beb60bc4be50a386155b71a6a304c6b7e4 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 20 Jun 2015 07:08:33 +0800 Subject: [PATCH 1229/2517] PUB:20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora @FSSlc --- ... in Debian Ubuntu Linux Mint and Fedora.md | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) rename {translated/tech => published}/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md (74%) diff --git a/translated/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md b/published/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md similarity index 74% rename from translated/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md rename to published/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md index d5c2fc98f5..569a50d667 100644 --- a/translated/tech/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md +++ b/published/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md @@ -1,37 +1,37 @@ 在 Debian, Ubuntu, Linux Mint 及 Fedora 中安装 uGet 下载管理器 2.0 ================================================================================ -在经历了一段漫长的开发期后,期间发布了超过 11 个开发版本,最终 uGet 项目小组高兴地宣布 uGet 的最新稳定版本 uGet 2.0 已经可以下载使用了。最新版本包含许多吸引人的特点,例如一个新的设定对话框,改进了 aria2 插件对 BitTorrent 和 Metalink 协议的支持,同时对位于横栏中的 uGet RSS 信息提供了更好的支持,其他特点包括: +在经历了一段漫长的开发期后,并发布了超过 11 个开发版本,最终 uGet 项目小组高兴地宣布 uGet 的最新稳定版本 uGet 2.0 已经可以下载使用了。最新版本包含许多吸引人的特点,例如一个新的设定对话框,改进了 aria2 插件对 BitTorrent 和 Metalink 协议的支持,同时对位于横幅中的 uGet RSS 信息提供了更好的支持,其他特点包括: -- 一个新的 “检查更新” 按钮,提醒您有关新的发行版本的信息; +- 新增一个 “检查更新” 按钮,提醒您有关新的发行版本的信息; - 增添新的语言支持并升级了现有的语言; -- 增加了一个新的 “信息横栏” ,允许开发者轻松地向所有的用户提供有关 uGet 的信息; -- 通过对文档、提交反馈和错误报告等内容的链接,增强了帮助菜单; +- 新增一个 “信息横幅” ,可以让开发者轻松地向所有的用户提供有关 uGet 的信息; +- 增强了帮助菜单,包括文档、提交反馈和错误报告等内容的链接; - 将 uGet 下载管理器集成到了 Linux 平台下的两个主要的浏览器 Firefox 和 Google Chrome 中; - 改进了对 Firefox 插件 ‘FlashGot’ 的支持; ### 何为 uGet ### -uGet (先前名为 UrlGfe) 是一个开源,免费,且极其强大的基于 GTK 的多平台下载管理器应用程序,它用 C 语言写就,在 GPL 协议下发布。它提供了一大类的功能,如恢复先前的下载任务,支持多重下载,使用一个独立的配置来支持分类,剪贴板监视,下载队列,从 HTML 文件中导出 URL 地址,集成在 Firefox 中的 Flashgot 插件中,使用集成在 uGet 中的 aria2(一个命令行下载管理器) 来下载 torrent 和 metalink 文件。 +uGet (先前名为 UrlGfe) 是一个开源,免费,且极其强大的基于 GTK 的多平台下载管理器应用程序,它用 C 语言写就,在 GPL 协议下发布。它提供了大量功能,如恢复先前的下载任务,支持多点下载,使用一个独立的配置来支持分类,剪贴板监视,下载队列,从 HTML 文件中导出 URL 地址,集成在 Firefox 中的 Flashgot 插件中,使用集成在 uGet 中的 aria2(一个命令行下载管理器) 来下载 torrent 和 metalink 文件。 我已经在下面罗列出了 uGet 下载管理器的所有关键特点,并附带了详细的解释。 #### uGet 下载管理器的关键特点 #### -- 下载队列: 可以将你的下载任务放入一个队列中。当某些下载任务完成后,将会自动开始下载队列中余下的文件; +- 下载队列: 将你的下载任务放入一个队列中。当某些下载任务完成后,将会自动开始下载队列中余下的文件; - 恢复下载: 假如在某些情况下,你的网络中断了,不要担心,你可以从先前停止的地方继续下载或重新开始; - 下载分类: 支持多种分类来管理下载; - 剪贴板监视: 将要下载的文件类型复制到剪贴板中,便会自动弹出下载提示框以下载刚才复制的文件; - 批量下载: 允许你轻松地一次性下载多个文件; - 支持多种协议: 允许你轻松地使用 aria2 命令行插件通过 HTTP, HTTPS, FTP, BitTorrent 及 Metalink 等协议下载文件; - 多连接: 使用 aria2 插件,每个下载同时支持多达 20 个连接; -- 支持 FTP 登录或匿名 FTP 登录: 同时支持使用用户名和密码来登录 FTP 或匿名 FTP ; +- 支持 FTP 登录或 FTP 匿名登录: 同时支持使用用户名和密码来登录 FTP 或匿名 FTP ; - 队列下载: 新增队列下载,现在你可以对你的所有下载进行安排调度; - 通过 FlashGot 与 FireFox 集成: 与作为一个独立支持的 Firefox 插件的 FlashGot 集成,从而可以处理单个或大量的下载任务; - CLI 界面或虚拟终端支持: 提供命令行或虚拟终端选项来下载文件; - 自动创建目录: 假如你提供了一个先前并不存在的保存路径,uGet 将会自动创建这个目录; - 下载历史管理: 跟踪记录已下载和已删除的下载任务的条目,每个列表支持 9999 个条目,比当前默认支持条目数目更早的条目将会被自动删除; - 多语言支持: uGet 默认使用英语,但它可支持多达 23 种语言; -- Aria2 插件: uGet 集成了 Aria2 插件,来为 aria2 提供更友好的 GUI 界面; +- Aria2 插件: uGet 集成了 Aria2 插件,来为你提供更友好的 GUI 界面; 如若你想了解更加完整的特点描述,请访问 uGet 官方的 [特点页面][1]. @@ -43,7 +43,7 @@ uGet 开发者在 Linux 平台下的各种软件仓库中添加了 uGet 的最 #### 在 Debian 下 #### -在 Debian 的测试版本 (Jessie) 和不稳定版本 (Sid) 中,你可以在一个可信赖的基础上,使用官方的软件仓库轻易地安装和升级 uGet 。 +在 Debian Jessie 和Sid 中,你可以使用官方软件仓库轻易地安装和升级可靠的 uGet 软件包。 $ sudo apt-get update $ sudo apt-get install uget @@ -58,7 +58,7 @@ uGet 开发者在 Linux 平台下的各种软件仓库中添加了 uGet 的最 #### 在 Fedora 下 #### -在 Fedora 20 – 21 下,最新版本的 uGet(2.0) 可以从官方软件仓库中获得,从这些软件仓库中安装是非常值得信赖的。 +在 Fedora 20 – 21 下,最新版本的 uGet(2.0) 可以从官方软件仓库中获得可靠的软件包。 $ sudo yum install uget @@ -70,7 +70,7 @@ uGet 开发者在 Linux 平台下的各种软件仓库中添加了 uGet 的最 默认情况下,uGet 在当今大多数的 Linux 系统中使用 `curl` 来作为后端,但 aria2 插件将 curl 替换为 aria2 来作为 uGet 的后端。 -aria2 是一个单独的软件包,需要独立安装。你可以在你的 Linux 发行版本下,使用受支持的软件仓库来轻易地安装 aria2 的最新版本,或根据 [下载 aria2 页面][4] 来安装它,该页面详细解释了在各个发行版本中如何安装 aria2 。 +aria2 是一个单独的软件包,需要独立安装。你可以在你的 Linux 发行版下,使用受支持的软件仓库来轻易地安装 aria2 的最新版本,或根据 [下载 aria2 页面][4] 来安装它,该页面详细解释了在各个发行版本中如何安装 aria2 。 #### 在 Debian, Ubuntu 和 Linux Mint 下 #### @@ -91,28 +91,34 @@ Fedora 的官方软件仓库中已经添加了 aria2 软件包,所以你可以 为了启动 uGet,从桌面菜单的搜索栏中键入 "uGet"。可参考如下的截图: ![开启 uGet 下载管理器](http://www.tecmint.com/wp-content/uploads/2014/03/Start-uGet.gif) -开启 uGet 下载管理器 + +*开启 uGet 下载管理器* ![uGet 版本: 2.0](http://www.tecmint.com/wp-content/uploads/2014/03/uGet-Version.gif) -uGet 版本: 2.0 + +*uGet 版本: 2.0* #### 在 uGet 中激活 aria2 插件 #### 为了激活 aria2 插件, 从 uGet 菜单接着到 `编辑 –> 设置 –> 插件` , 从下拉菜单中选择 "aria2"。 ![为 uGet 启用 Aria2 插件](http://www.tecmint.com/wp-content/uploads/2014/03/Enable-Aria2-Plugin.gif) -为 uGet 启用 Aria2 插件 + +*为 uGet 启用 Aria2 插件* ### uGet 2.0 截图赏析 ### ![使用 Aria2 下载文件](http://www.tecmint.com/wp-content/uploads/2014/03/Download-Files-Using-Aria2.gif) -使用 Aria2 下载文件 + +*使用 Aria2 下载文件* ![使用 uGet 下载 Torrent 文件](http://www.tecmint.com/wp-content/uploads/2014/03/Download-Torrent-File.gif) -使用 uGet 下载 Torrent 文件 + +*使用 uGet 下载 Torrent 文件* ![使用 uGet 进行批量下载](http://www.tecmint.com/wp-content/uploads/2014/03/Batch-Download-Files.gif) -使用 uGet 进行批量下载 + +*使用 uGet 进行批量下载* 针对其他 Linux 发行版本和 Windows 平台的 RPM 包和 uGet 的源文件都可以在 uGet 的[下载页面][5] 下找到。 @@ -122,7 +128,7 @@ via: http://www.tecmint.com/install-uget-download-manager-in-linux/ 作者:[Ravi Saive][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 3cf1d75d3c571aefabab8a9e57ead90e80d42969 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 20 Jun 2015 07:08:52 +0800 Subject: [PATCH 1230/2517] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...oS Attacks Using Mod_Security and Mod_evasive Modules.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/published/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md b/published/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md index 44ba66e7d5..bb69215e74 100644 --- a/published/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md +++ b/published/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md @@ -194,7 +194,7 @@ mod\_evasive被配置为使用/etc/httpd/conf.d/mod\_evasive.conf中的指令。 DOSSystemCommand "sudo /usr/local/bin/scripts-tecmint/ban_ip.sh %s" -上面一行的%s代表了由mod\_evasive检测到的攻击IP地址。 +上面一行的%s代表了由mod_evasive检测到的攻击IP地址。 #####将apache用户添加到sudoers文件##### @@ -233,7 +233,7 @@ mod\_evasive被配置为使用/etc/httpd/conf.d/mod\_evasive.conf中的指令。 我们的测试环境由一个CentOS 7服务器[IP 192.168.0.17]和一个Windows组成,在Windows[IP 192.168.0.103]上我们发起攻击: ![](http://www.tecmint.com/wp-content/uploads/2012/06/Confirm-Host-IPAddress.png) - +I *确认主机IP地址* 请播放下面的视频(YT 视频,请自备梯子: https://www.youtube.com/-U_mdet06Jk ),并跟从列出的步骤来模拟一个Dos攻击: @@ -257,7 +257,7 @@ mod\_evasive被配置为使用/etc/httpd/conf.d/mod\_evasive.conf中的指令。 -------------------------------------------------------------------------------- -via: http://www.tecmint.com/protect-apache-using-mod\_security-and-mod\_evasive-on-rhel-centos-fedora/ +via: http://www.tecmint.com/protect-apache-using-mod_security-and-mod_evasive-on-rhel-centos-fedora/ 作者:[Gabriel Cánepa][a] 译者:[wwy-hust](https://github.com/wwy-hust) From c61c01383bc68076f9e62baf175eccc695aa06c3 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 20 Jun 2015 07:20:33 +0800 Subject: [PATCH 1231/2517] PUB:20150518 Linux FAQs with Answers--What is the Apache error log location on Linux @GOLinux --- ... the Apache error log location on Linux.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md (74%) diff --git a/translated/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md b/published/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md similarity index 74% rename from translated/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md rename to published/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md index c43ac481e7..cf1ef694c0 100644 --- a/translated/tech/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md +++ b/published/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md @@ -1,8 +1,8 @@ -Linux有问必答——Linux上Apache错误日志的位置在哪里? +Linux有问必答:Linux上Apache错误日志的位置在哪里? ================================================================================ -> **问题**: 我尝试着解决我 Linux 系统上的 Apache 网络服务器的错误,Apache的错误日志文件放在[你的 Linux 版本]的哪个位置呢? +> **问题**: 我尝试着解决我 Linux 系统上的 Apache Web 服务器的错误,Apache的错误日志文件放在[XX Linux 版本]的哪个位置呢? -错误日志和访问日志文件为系统管理员提供了有用的信息,比如,为网络服务器排障,[保护][1]系统不受各种各样的恶意活动侵犯,或者只是进行[各种各样的][2][分析][3]以监控 HTTP 服务器。根据你网络服务器配置的不同,其错误/访问日志可能放在你系统中不同位置。 +错误日志和访问日志文件为系统管理员提供了有用的信息,比如,为 Web 服务器排障,[保护][1]系统不受各种各样的恶意活动侵犯,或者只是进行[各种各样的][2][分析][3]以监控 HTTP 服务器。根据你 Web 服务器配置的不同,其错误/访问日志可能放在你系统中不同位置。 本文可以帮助你**找到Linux上的Apache错误日志**。 @@ -28,7 +28,7 @@ Linux有问必答——Linux上Apache错误日志的位置在哪里? #### 使用虚拟主机自定义的错误日志 #### -如果在 Apache 网络服务器中使用了虚拟主机, ErrorLog 指令可能会在虚拟主机容器内指定,在这种情况下,上面所说的系统范围的错误日志位置将被忽略。 +如果在 Apache Web 服务器中使用了虚拟主机, ErrorLog 指令可能会在虚拟主机容器内指定,在这种情况下,上面所说的系统范围的错误日志位置将被忽略。 启用了虚拟主机后,各个虚拟主机可以定义其自身的自定义错误日志位置。要找出某个特定虚拟主机的错误日志位置,你可以打开 /etc/apache2/sites-enabled/.conf,然后查找 ErrorLog 指令,该指令会显示站点指定的错误日志文件。 @@ -40,11 +40,11 @@ Linux有问必答——Linux上Apache错误日志的位置在哪里? #### 自定义的错误日志 #### -要找出 Apache 错误日志的自定义位置,请用文本编辑器打开 /etc/httpd/conf/httpd.conf,然后查找 ServerRoot,该参数显示了 Apache 服务器目录树的顶层,日志文件和配置都位于该目录树中。例如: +要找出 Apache 错误日志的自定义位置,请用文本编辑器打开 /etc/httpd/conf/httpd.conf,然后查找 ServerRoot,该参数显示了 Apache Web 服务器目录树的顶层,日志文件和配置都位于该目录树中。例如: ServerRoot "/etc/httpd" -现在,查找 ErrorLog 开头的行,该行指出了 Apache 网络服务器将错误日志写到了哪里去。注意,指定的位置是 ServerRoot 值的相对位置。例如: +现在,查找 ErrorLog 开头的行,该行指出了 Apache Web 服务器将错误日志写到了哪里去。注意,指定的位置是 ServerRoot 值的相对位置。例如: ErrorLog "log/error_log" @@ -71,11 +71,11 @@ via: http://ask.xmodulo.com/apache-error-log-location-linux.html 作者:[Dan Nanni][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni -[1]:http://xmodulo.com/configure-fail2ban-apache-http-server.html -[2]:http://xmodulo.com/interactive-apache-web-server-log-analyzer-linux.html -[3]:http://xmodulo.com/sql-queries-apache-log-files-linux.html +[1]:https://linux.cn/article-5068-1.html +[2]:https://linux.cn/article-5352-1.html +[3]:https://linux.cn/article-4405-1.html From de9e60ed616ab9a12539b65c656937edef6065ac Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 20 Jun 2015 07:35:10 +0800 Subject: [PATCH 1232/2517] PUB:20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint @geekpi --- ...dgets on Ubuntu or Debian or Linux Mint.md | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) rename {translated/tech => published}/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md (81%) diff --git a/translated/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md b/published/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md similarity index 81% rename from translated/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md rename to published/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md index 1f733207f3..db8dc669dc 100644 --- a/translated/tech/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md +++ b/published/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md @@ -1,16 +1,13 @@ 如何在Ubuntu/Debian/Linux Mint中编译和安装wxWidgets ================================================================================ + ### wxWidgets ### -wxWidgets是一个程序开发框架/库, 允许你在Windows、Mac、Linux中使用相同的代码跨平台开发。 - -它主要用C++写成,但也可以与其他语言绑定比如Python、Perl、Ruby。 +wxWidgets是一个程序开发框架/库, 允许你在Windows、Mac、Linux中使用相同的代码跨平台开发。它主要用C++写成,但也可以与其他语言绑定比如Python、Perl、Ruby。 本教程中我将向你展示如何在基于Debian的linux中如Ubuntu和Linux Mint中编译wxwidgets 3.0+。 -从源码编译wxWidgets并不困难,仅仅需要几分钟。 - -库可以按不同的方式来编译,比如静态或者动态库。 +从源码编译wxWidgets并不困难,仅仅需要几分钟。库可以按不同的方式来编译,比如静态或者动态库。 ### 1. 下载 wxWidgets ### @@ -20,13 +17,13 @@ wxWidgets是一个程序开发框架/库, 允许你在Windows、Mac、Linux中 ### 2. 设置编译环境 ### -要编译wxwidgets,我们需要一些工具包括C++编译器, 在Linux上是g++。所有这些可以通过apt-get工具从仓库中安装。 +要编译wxwidgets,我们需要一些工具包括C++编译器,在Linux上是g++。所有这些可以通过apt-get工具从仓库中安装。 我们还需要wxWidgets依赖的GTK开发库。 $ sudo apt-get install libgtk-3-dev build-essential checkinstall ->checkinstall工具允许我们为wxwidgets创建一个安装包,这样之后就可以轻松的使用包管理器来卸载。 +> 这个叫做checkinstall的工具允许我们为wxwidgets创建一个安装包,这样之后就可以轻松的使用包管理器来卸载。 ### 3. 编译 wxWidgets ### @@ -42,7 +39,7 @@ wxWidgets是一个程序开发框架/库, 允许你在Windows、Mac、Linux中 "--disable-shared"选项将会编译静态库而不是动态库。 -make命令完成后,编译也成功了。是时候安装wxWidgets到正确的目录。 +make命令完成后,编译就成功了。是时候安装wxWidgets到正确的目录。 更多信息请参考install.txt和readme.txt,这可在wxwidgets中的/docs/gtk/目录下找到。 @@ -58,7 +55,7 @@ checkinstall会询问几个问题,请保证在提问后提供一个版本号 ### 5. 追踪安装的文件 ### -如果你想要检查文件安装的位置,使用dpkg命令后面跟上checkinstall提供的报名。 +如果你想要检查文件安装的位置,使用dpkg命令后面跟上checkinstall提供的包名。 $ dpkg -L package_name /. @@ -85,17 +82,17 @@ checkinstall会询问几个问题,请保证在提问后提供一个版本号 $ cd samples/ $ make -make命令完成后,进入sampl子目录,这里就有一个可以马上运行的Demo程序了。 +make命令完成后,进入sample 子目录,这里就有一个可以马上运行的Demo程序了。 ### 7. 编译你的第一个程序 ### 你完成编译demo程序后,可以写你自己的程序来编译了。这个也很简单。 -假设你用的是C++这样你可以使用编辑器的高亮特性。比如gedit、kate、kwrite等等。或者用全功能的IDE像Geany、Codelite、Codeblocks等等。 +假设你用的是C++,这样的话你还可以使用编辑器的高亮特性。比如gedit、kate、kwrite等等。或者用全功能的IDE像Geany、Codelite、Codeblocks等等。 然而你的第一个程序只需要用一个文本编辑器来快速完成。 -这里就是 +如下: #include @@ -155,7 +152,7 @@ via: http://www.binarytides.com/install-wxwidgets-ubuntu/ 作者:[Silver Moon][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From cd0acd37eb19bcc4c8545f3c03648741ab2721ac Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 20 Jun 2015 07:59:00 +0800 Subject: [PATCH 1233/2517] PUB:20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots @GOLinux --- ...onitoring Tool Installation Screenshots.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename {translated/tech => published}/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md (82%) diff --git a/translated/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md b/published/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md similarity index 82% rename from translated/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md rename to published/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md index dc039ba551..72eae8b0bb 100644 --- a/translated/tech/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md +++ b/published/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md @@ -1,8 +1,8 @@ -Linux ntopng——网络监控工具的安装(附截图) +Linux 上网络监控工具 ntopng 的安装 ================================================================================ -当今世界,人们的计算机都相互连接,互联互通。小到你的家庭局域网(LAN),大到最大的一个被我们称为的——互联网。当你管理一台联网的计算机时,你就是在管理最关键的组件之一。由于大多数开发出的应用程序都基于网络,网络就连接起了这些关键点。 +当今世界,人们的计算机都相互连接,互联互通。小到你的家庭局域网(LAN),大到最大的一个被我们称为互联网。当你管理一台联网的计算机时,你就是在管理最关键的组件之一。由于大多数开发出的应用程序都基于网络,网络就连接起了这些关键点。 -这就是为什么我们需要网络监控工具。最好的网络监控工具之一,它叫作ntop。来自[维基百科][1]的知识“ntop是一个网络探测器,它以与top显示进程般类似的方式显示网络使用率。在交互模式中,它显示了用户终端上的网络状态。在网页模式中,它作为网络服务器,创建网络状态的HTML转储文件。它支持NetFlow/sFlowemitter/collector,这是一个基于HTTP的客户端界面,用于创建ntop为中心的监控应用和RRD用于持续地存储通信数据” +这就是为什么我们需要网络监控工具。ntop 是最好的网络监控工具之一。来自[维基百科][1]的知识“ntop是一个网络探测器,它以与top显示进程般类似的方式显示网络使用率。在交互模式中,它显示了用户终端上的网络状态。在网页模式中,它作为网络服务器,创建网络状态的HTML转储文件。它支持NetFlow/sFlowemitter/collector,这是一个基于HTTP的客户端界面,用于创建ntop为中心的监控应用,并使用RRD来持续存储通信数据”。 15年后的今天,你将见到ntopng——下一代ntop。 @@ -15,7 +15,7 @@ Ntopng是一个基于网页的高速通信分析器和流量收集器。Ntopng 从[ntopng网站][2]上,我们可以看到他们说它有众多的特性。这里列出了其中一些: - 按各种协议对网络通信排序 -- 显示网络通信和IPv4/v6激活的主机 +- 显示网络通信和IPv4/v6的激活主机 - 持续不断以RRD格式存储定位主机的通信数据到磁盘 - 通过nDPI,ntop的DPI框架,发现应用协议 - 显示各种协议间的IP通信分布 @@ -24,11 +24,9 @@ Ntopng是一个基于网页的高速通信分析器和流量收集器。Ntopng - 报告按协议类型排序的IP协议使用率 - 生成HTML5/AJAX网络通信数据 -### 安装 ### +### 安装的先决条件 ### -Ntop为CentOS和**基于64位**Ubuntu预编译好了包,你可以在[他们的下载页面][3]找到这些包。对于32位操作系统,你必须从源代码编译。本文在**CentOS 6.4 32位**版本上**测试过**。但是,它也可以在其它基于CentOS/RedHat的Linux版本上工作。让我们开始吧。 - -#### 先决条件 #### +Ntop为CentOS和**基于64位**Ubuntu预编译好了包,你可以在[它们的下载页面][3]找到这些包。对于32位操作系统,你必须从源代码编译。本文在**CentOS 6.4 32位**版本上**测试过**。但是,它也可以在其它基于CentOS/RedHat的Linux版本上工作。让我们开始吧。 #### 开发工具 #### @@ -78,7 +76,7 @@ Ntop为CentOS和**基于64位**Ubuntu预编译好了包,你可以在[他们的 # make # make install -*由于ntopng是一个基于网页的应用,你的系统必须安装有工作良好的网络服务器* +*由于ntopng是一个基于网页的应用,你的系统必须安装有工作良好的 Web 服务器* ### 为ntopng创建配置文件 ### @@ -89,13 +87,16 @@ Ntop为CentOS和**基于64位**Ubuntu预编译好了包,你可以在[他们的 # cd ntopng # vi ntopng.start - 放入这些行: - --local-network “10.0.2.0/24” +放入这些行: + + --local-network "10.0.2.0/24" --interface 1 +--- # vi ntopng.pid - 放入该行: +放入该行: + -G=/var/run/ntopng.pid 保存这些文件,然后继续下一步。 @@ -128,7 +129,7 @@ Ntop为CentOS和**基于64位**Ubuntu预编译好了包,你可以在[他们的 ![Ntopng Flows](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_flows.png) -在**主机菜单**上,你可以看到连接到流的所有主机 +在**主机菜单**上,你可以看到连接到流的所有主机。 ![Ntopng Hosts List](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_hoslist.png) @@ -146,8 +147,7 @@ Ntop为CentOS和**基于64位**Ubuntu预编译好了包,你可以在[他们的 ![Ntopng Apps](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_apps.png) -**界面菜单**将引领你进入更多内部菜单。 -包菜单将给你显示包的分布大小。 +**界面菜单**将引领你进入更多内部菜单。包菜单将给你显示包的大小分布。 ![Ntopng packets](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_packets.png) @@ -157,7 +157,7 @@ Ntop为CentOS和**基于64位**Ubuntu预编译好了包,你可以在[他们的 ![Ntopng protocols - detail](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_protocol_detail.png) -你也可以通过使用**历史活跃度菜单**查看活跃度 +你也可以通过使用**历史活跃度菜单**查看活跃度。 ![Ntopng Historical Activity](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_historical.png) @@ -167,7 +167,7 @@ Ntop为CentOS和**基于64位**Ubuntu预编译好了包,你可以在[他们的 ![Ntopng Users](http://blog.linoxide.com/wp-content/uploads/2013/11/ntopng_users.png) -Ntopng为你提供了一个范围宽广的时间线,从5分钟到1年都可以。你只需要点击你想要现实的时间线。图标本身是可以点击的,你可以点击它来进行缩放。 +Ntopng为你提供了一个范围宽广的时间线,从5分钟到1年都可以。你只需要点击你想要显示的时间线。图表本身是可以点击的,你可以点击它来进行缩放。 当然,ntopng能做的事比上面图片中展示的还要多得多。你也可以将定位和电子地图服务整合进来。在ntopng自己的网站上,有已付费的模块可供使用,如nprobe可以扩展ntopng可以提供给你的信息。更多关于ntopng的信息,你可以访问[ntopng网站][5]。 @@ -177,7 +177,7 @@ via: http://linoxide.com/monitoring-2/ntopng-network-monitoring-tool/ 作者:[Pungki Arianto][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 8ca81718f9c2def077b0f67728d8de8165ee2f6e Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sat, 20 Jun 2015 08:53:12 +0800 Subject: [PATCH 1234/2517] translating wi-cuckoo --- .../20150618 What will be the future of Linux without Linus.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150618 What will be the future of Linux without Linus.md b/sources/talk/20150618 What will be the future of Linux without Linus.md index e042fdbe61..92b9e9ee4d 100644 --- a/sources/talk/20150618 What will be the future of Linux without Linus.md +++ b/sources/talk/20150618 What will be the future of Linux without Linus.md @@ -1,3 +1,4 @@ +translating wi-cuckoo What will be the future of Linux without Linus? ================================================================================ ![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/06/linus-torvalds-painting.jpg) @@ -182,4 +183,4 @@ via: http://www.linuxveda.com/2015/06/17/what-happens-to-linux-after-linus/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.linuxveda.com/author/arnieswap/ \ No newline at end of file +[a]:http://www.linuxveda.com/author/arnieswap/ From 3ae99e2452d06943e3c2ec9b5b4467d5c8dfc598 Mon Sep 17 00:00:00 2001 From: KS Date: Sat, 20 Jun 2015 12:50:51 +0800 Subject: [PATCH 1235/2517] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成翻译 --- ...w We Designed for Performance and Scale.md | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 translated/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md diff --git a/translated/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md b/translated/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md new file mode 100644 index 0000000000..fcf195115d --- /dev/null +++ b/translated/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md @@ -0,0 +1,174 @@ +NGINX内部: 我们如何设计性能和扩展 +================================================================================ +NGINX是web应用中性能最好的一个,这一切都是由于软件设计。而许多web服务器和应用程序服务器使用一个简单的线程或基于流程的架构,NGINX立足于一个复杂的事件驱动的体系结构,使它能够在现代硬件上扩展到成千上万的并发连接。 + +[NGINX内部][1]信息图从高级流程架构深度挖掘说明了NGINX如何在单进程里保持多连接。这个博客进一步详细地解释了这一切是如何工作的。 + +### 知识 – NGINX进程模型 ### + +![Master Process](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.36.30-PM.png) + +为了更好的理解这个设计,你需要理解NGINX如何运行的。NGINX有一个主进程(它执行特权操作如读取配置和绑定端口)和一些工作进程与辅助进程。 + + # service nginx restart + * Restarting nginx + # ps -ef --forest | grep nginx + root 32475 1 0 13:36 ? 00:00:00 nginx: master process /usr/sbin/nginx \ + -c /etc/nginx/nginx.conf + nginx 32476 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32477 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32479 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32480 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32481 32475 0 13:36 ? 00:00:00 \_ nginx: cache manager process + nginx 32482 32475 0 13:36 ? 00:00:00 \_ nginx: cache loader process + +在四核服务器,NGINX主进程创建4工作进程和两个管理磁盘内容缓存的缓存辅助进程。 + +### 为什么架构很重要? ### + +任何Unix应用程序的根本基础是线程或进程。(从Linux操作系统的角度来看,线程和进程大多是相同的,主要的区别是他们共享内存的程度。)一个线程或进程是一个独立的指令,操作系统可以运行在一个CPU核心。大多数复杂的应用程序并行运行多个线程或进程有两个原因: + +- 他们可以同时使用更多的计算核心。 +- 线程或进程可以轻松实现并行操作。(例如,在同一时刻保持多连接)。 + +进程和线程消耗资源。他们每个都使用内存和其他系统资源,他们需要被交换进出核心(一个操作可以叫做上下文切换)。大多数现代服务器可以保持上百小型、活动的并发连接,一旦内存耗尽或高I/O压力引起大量的上下文切换性能会严重下降。 + +网络应用程序设计的常用方法是为每个连接分配一个线程或进程。此体系结构简单、容易实现,但是当应用程序需要处理成千上万的并发连接时这种结构不具规模。 + +### NGINX如何工作? ### + +NGINX使用一种可预测进程模式,被调到了可使用的硬件资源上: + +- 主进程执行特权操作,如读取配置和绑定端口,然后创建一个小数量的子进程(接下来的三种类型)。 +- 缓存加载程序进程在加载磁盘缓存到内存中时开始运行,然后退出。它被适当的安排,所以其资源需求很低。 +- 缓存管理器进程定期修剪磁盘缓存中的记录来保持他们在配置的大小之内。 +- 工作进程做所有的工作!他们保持网络连接、读写内容到磁盘,与上游服务器通信。 + +在大多数情况下建议NGINX的配置 – 每个CPU核心运行一个工作进程 – 最有效地利用硬件资源。你的配置包含了[worker_processes auto][2]指令配置: + + worker_processes auto; + +当一个NGINX服务处于活动状态,只有工作进程是忙碌的。每个工作进程以非阻塞方式保持多连接,减少上下文交换。 + +每个工作进程是一个单线程并且独立运行,获取新链接并处理他们。这些进程可以使用共享内存通信来共享缓存数据,会话持久性数据,和其他共享资源。 + +### NGINX工作进程内部 ### + +![](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.39.48-PM.png) + +NGINX主进程通过NGINX配置初始化每个工作进程并提供一组监听端口。 + +NGINX工作进程首先在监听套接字上等待事件([accept_mutex][3]和[内核套接字分片][4])。事件被新进来的链接初始化。这些连接被分配到一个状态机 – HTTP状态机是最常用的,但NGINX也具备流式(原始的TCP)状态机和大量的邮件协议(SMTP、IMAP和POP3)。 + +![Internet Requests](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.40.32-PM.png) + +状态机本质上是一组指令,告诉NGINX如何处理一个请求。大多数web服务器执行相同的函数作为NGINX使用类似的状态机 - 区别在于实现。 + +### 调度状态机 ### + +把状态机想象成国际象棋的规则。每个HTTP事务是一个象棋游戏。一方面棋盘是web服务器 – 一位大师可以非常迅速地做出决定。另一方面是远程客户端 – 在一个相对较慢的网络下web浏览器访问网站或应用程序。 + +不管咋地,这个游戏规则很复杂。例如,web服务器可能需要与各方沟通(代理一个上游的应用程序)或与身份验证服务器对话。web服务器的第三方模块甚至可以扩展游戏规则。 + +#### 一个阻塞状态机 #### + +回忆我们描述一个进程或线程就像一个独立的指令集,操作系统可以调度运行它在一个CPU核心。大多数web服务器和web应用使用一个进程一个链接或者一个线程一个链接的模式来运行这个“象棋游戏”。每个进程或线程都包含指令来玩“一个游戏”直到结束。一次进程在服务器运行,它花费大部分的时间“阻塞” - 等待客户端完成它的下一步行动。 + +![Blocking I/O](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.40.52-PM.png) + +1. web服务器进程在监听套接字监听新连接(客户端发起新“游戏”) +1. 当它获得一个新游戏,就玩这个游戏,每走一步去等待客户端响应时就阻塞了。 +1. 游戏完成后,web服务器进程可能会等待是否有客户机想要开始一个新游戏(这对应于一个保持连接)。如果这个链接关闭了(客户端离开或者发生超时),web服务器进程返回监听一个新“游戏”。 + +要记住最重要的一点是每个活动的HTTP链接(每局棋)需要一个专用的进程或线程(象棋高手)。这个结构简单容并且易扩展第三方模块(“新规则”)。无论如何,还是有巨大的不平衡:尤其是轻量的HTTP链接,作为代表是一个文件描述符和小量的内存,映射到一个单独的线程或进程,一个非常重量的系统对象。这种方式易于编程,但太过浪费。 + +#### NGINX是一个真正的象棋大师 #### + +也许你听过[同时表演赛][5]游戏,有一个象棋大师同时对战许多对手? + +![Kiril Georgiev](http://cdn.nginx.com/wp-content/uploads/2015/06/Kiril-Georgiev.gif) + +[列夫·吉奥吉夫在保加利亚的索非亚同时对阵360人][6]。他的最终成绩是284胜70平6负。 + +这就是NGINX工作进程如何“下棋”的。每个工作进程(记住 - 通常每个CPU核心上有一个工作进程)是一个可同时对战上百人(事实是,成百上千)的象棋大师。 + +![Event-driven Architecture](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.13-PM.png) + +1. 工作进程在监听和链接套接字上等待事件。 +1. 事件发生在套接字并且由工作进程处理它们: + + - 在监听套接字的事件意味着一个客户端已经开始了一局新棋局。工作进程创建了一个新链接套接字。 + - 在链接套接字的事件意味着客户端已经下了一步棋。工作进程快速的响应。 + +一个工作进程在网络流量上从不阻塞,等待它的“对手”(客户端)做出反应。当它下了一步,工作进程立即继续其他的游戏,在那里工作进程正在处理下一步,或者在门口欢迎一个新玩家。 + +### 为什么这个比阻塞式多进程架构更快? ### + +NGINX每个工作进程很好的扩展支撑了成百上千的链接。每个链接在工作进程中创建另一个文件描述符和消耗一小部分额外内存。每个链接很少有额外的开销。NGINX进程可以固定在一些CPU上。上下文交换非常罕见,只发生在没有工作要做。 + +阻塞方式,一个链接一个进程的方法中,每个连接需要大量额外的资源和开销,和上下文切换(从一个进程切换到另一个)非常频繁 + +更详细的解释,看看这个[文章][7]关于NGINX架构,由NGINX公司发展副总裁和创始人之一 Andrew Alexeev 著。 + +适当的[系统优化][8],NGINX的每个工作进程可以扩展来处理成千上万的并发HTTP连接,并能脸不红心不跳的承受峰值流量(大量涌入的新“游戏”)。 + +### 更新配置和升级NGINX ### + +NGINX是过程体系架构,有一小部分工作进程,有助于有效的更新配置文件甚至NGINX程序本身。 + +![Updating Configuration](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.33-PM.png) + +更新NGINX配置文件是非常简单、轻量、可靠的操作。它通常意味着运行命令`nginx –s reload`,所做的就是检查磁盘上的配置并发送SIGHUP信号给主进程。 + +当主进程接收到一个SIGHUP信号,它会做两件事: + +- 重载配置文件和分出一组新的工作进程。这些新的工作进程立即开始接受连接和处理流量(使用新的配置设置) +- 通知旧的工作进程优雅的退出。工作进程停止接受新的链接。当前的http请求一完成,工作进程就彻底关闭这个链接(那就是,没有残存的保持链接)。一旦所有链接关闭,这个工作进程就退出。 + +这个重载过程能引发一个CPU和内存使用的小峰值,但是跟活动链接加载的支援比它一般不易察觉。你可以每秒多次重载配置(很多NGINX用户都这么做)。很少情况下,问题发生在很多代的工作进程等待关闭连接时,但即使是那样也很快被解决了。 + +NGINX的程序升级过程中实现了高可用的圣杯 - 你可以随随时更新这个软件,不会丢失连接,停机,或者中断服务。 + +![New Binary](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.51-PM.png) + +程序升级过程很像优雅的重载配置的方法。一个新的NGINX主进程与原主进程并行运行,然后他们共享监听套接字。两个进程都是活动的,并且各自的工作进程处理流量。然后你可以通知旧主进程和他的工作进程优雅的退出。 + +整个进程的详细描述在[NGINX管理][9]. + +### 结论 ### + +[NGINX内部信息图][10] 提供一个NGINX功能实现的高级的概况,但在这简单的解释是超过十年的创新和优化,使Nginx在一个范围广泛的硬件上提供尽可能最好的性能同时保持现代Web应用程序需要的安全性和可靠性。 + +如果你想阅读更多关于NGINX的优化,查看这些优秀的资源: + +- [Installing and Tuning NGINX for Performance][11] (webinar; [slides][12] at Speaker Deck) +- [Tuning NGINX for Performance][13] +- [The Architecture of Open Source Applications – NGINX][14] +- [Socket Sharding in NGINX Release 1.9.1][15] (using the SO_REUSEPORT socket option) + +-------------------------------------------------------------------------------- + +via: http://nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/ + +作者:[Owen Garrett][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://nginx.com/author/owen/ +[1]:http://nginx.com/resources/library/infographic-inside-nginx/ +[2]:http://nginx.org/en/docs/ngx_core_module.html#worker_processes +[3]:http://nginx.org/en/docs/ngx_core_module.html#accept_mutex +[4]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ +[5]:http://en.wikipedia.org/wiki/Simultaneous_exhibition +[6]:http://gambit.blogs.nytimes.com/2009/03/03/in-chess-records-were-made-to-be-broken/ +[7]:http://www.aosabook.org/en/nginx.html +[8]:http://nginx.com/blog/tuning-nginx/ +[9]:http://nginx.org/en/docs/control.html +[10]:http://nginx.com/resources/library/infographic-inside-nginx/ +[11]:http://nginx.com/resources/webinars/installing-tuning-nginx/ +[12]:https://speakerdeck.com/nginx/nginx-installation-and-tuning +[13]:http://nginx.com/blog/tuning-nginx/ +[14]:http://www.aosabook.org/en/nginx.html +[15]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ From 78961d0aeabd510a170a970075e5030f2154499d Mon Sep 17 00:00:00 2001 From: KS Date: Sat, 20 Jun 2015 12:51:40 +0800 Subject: [PATCH 1236/2517] Delete 20150612 Inside NGINX--How We Designed for Performance and Scale.md --- ...w We Designed for Performance and Scale.md | 175 ------------------ 1 file changed, 175 deletions(-) delete mode 100644 sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md diff --git a/sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md b/sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md deleted file mode 100644 index 970144275f..0000000000 --- a/sources/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md +++ /dev/null @@ -1,175 +0,0 @@ -wyangsun 申领 -Inside NGINX: How We Designed for Performance & Scale -================================================================================ -NGINX leads the pack in web performance, and it’s all due to the way the software is designed. Whereas many web servers and application servers use a simple threaded or process-based architecture, NGINX stands out with a sophisticated event-driven architecture that enables it to scale to hundreds of thousands of concurrent connections on modern hardware. - -The [Inside NGINX][1] infographic drills down from the high-level process architecture to illustrate how NGINX handles multiple connections within a single process. This blog explains how it all works in further detail. - -### Setting the Scene – the NGINX Process Model ### - -![Master Process](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.36.30-PM.png) - -To better understand this design, you need to understand how NGINX runs. NGINX has a master process (which performs the privileged operations such as reading configuration and binding to ports) and a number of worker and helper processes. - - # service nginx restart - * Restarting nginx - # ps -ef --forest | grep nginx - root 32475 1 0 13:36 ? 00:00:00 nginx: master process /usr/sbin/nginx \ - -c /etc/nginx/nginx.conf - nginx 32476 32475 0 13:36 ? 00:00:00 \_ nginx: worker process - nginx 32477 32475 0 13:36 ? 00:00:00 \_ nginx: worker process - nginx 32479 32475 0 13:36 ? 00:00:00 \_ nginx: worker process - nginx 32480 32475 0 13:36 ? 00:00:00 \_ nginx: worker process - nginx 32481 32475 0 13:36 ? 00:00:00 \_ nginx: cache manager process - nginx 32482 32475 0 13:36 ? 00:00:00 \_ nginx: cache loader process - -On this 4-core server, the NGINX master process creates 4 worker processes and a couple of cache helper processes which manage the on-disk content cache. - -### Why Is Architecture Important? ### - -The fundamental basis of any Unix application is the thread or process. (From the Linux OS perspective, threads and processes are mostly identical; the major difference is the degree to which they share memory.) A thread or process is a self-contained set of instructions that the operating system can schedule to run on a CPU core. Most complex applications run multiple threads or processes in parallel for two reasons: - -- They can use more compute cores at the same time. -- Threads and processes make it very easy to do operations in parallel (for example, to handle multiple connections at the same time). - -Processes and threads consume resources. They each use memory and other OS resources, and they need to be swapped on and off the cores (an operation called a context switch). Most modern servers can handle hundreds of small, active threads or processes simultaneously, but performance degrades seriously once memory is exhausted or when high I/O load causes a large volume of context switches. - -The common way to design network applications is to assign a thread or process to each connection. This architecture is simple and easy to implement, but it does not scale when the application needs to handle thousands of simultaneous connections. - -### How Does NGINX Work? ### - -NGINX uses a predictable process model that is tuned to the available hardware resources: - -- The master process performs the privileged operations such as reading configuration and binding to ports, and then creates a small number of child processes (the next three types). -- The cache loader process runs at startup to load the disk-based cache into memory, and then exits. It is scheduled conservatively, so its resource demands are low. -- The cache manager process runs periodically and prunes entries from the disk caches to keep them within the configured sizes. -- The worker processes do all of the work! They handle network connections, read and write content to disk, and communicate with upstream servers. - -The NGINX configuration recommended in most cases – running one worker process per CPU core – makes the most efficient use of hardware resources. You configure it by including the [worker_processes auto][2] directive in the configuration: - - worker_processes auto; - -When an NGINX server is active, only the worker processes are busy. Each worker process handles multiple connections in a non-blocking fashion, reducing the number of context switches. - -Each worker process is single-threaded and runs independently, grabbing new connections and processing them. The processes can communicate using shared memory for shared cache data, session persistence data, and other shared resources. - -### Inside the NGINX Worker Process ### - -![](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.39.48-PM.png) - -Each NGINX worker process is initialized with the NGINX configuration and is provided with a set of listen sockets by the master process. - -The NGINX worker processes begin by waiting for events on the listen sockets ([accept_mutex][3] and [kernel socket sharding][4]). Events are initiated by new incoming connections. These connections are assigned to a state machine – the HTTP state machine is the most commonly used, but NGINX also implements state machines for stream (raw TCP) traffic and for a number of mail protocols (SMTP, IMAP, and POP3). - -![Internet Requests](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.40.32-PM.png) - -The state machine is essentially the set of instructions that tell NGINX how to process a request. Most web servers that perform the same functions as NGINX use a similar state machine – the difference lies in the implementation. - -### Scheduling the State Machine ### - -Think of the state machine like the rules for chess. Each HTTP transaction is a chess game. On one side of the chessboard is the web server – a grandmaster who can make decisions very quickly. On the other side is the remote client – the web browser that is accessing the site or application over a relatively slow network. - -However, the rules of the game can be very complicated. For example, the web server might need to communicate with other parties (proxying to an upstream application) or talk to an authentication server. Third-party modules in the web server can even extend the rules of the game. - -#### A Blocking State Machine #### - -Recall our description of a process or thread as a self-contained set of instructions that the operating system can schedule to run on a CPU core. Most web servers and web applications use a process-per-connection or thread-per-connection model to play the chess game. Each process or thread contains the instructions to play one game through to the end. During the time the process is run by the server, it spends most of its time ‘blocked’ – waiting for the client to complete its next move. - -![Blocking I/O](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.40.52-PM.png) - -1. The web server process listens for new connections (new games initiated by clients) on the listen sockets. -1. When it gets a new game, it plays that game, blocking after each move to wait for the client’s response. -1. Once the game completes, the web server process might wait to see if the client wants to start a new game (this corresponds to a keepalive connection). If the connection is closed (the client goes away or a timeout occurs), the web server process returns to listening for new games. - -The important point to remember is that every active HTTP connection (every chess game) requires a dedicated process or thread (a grandmaster). This architecture is simple and easy to extend with third-party modules (‘new rules’). However, there’s a huge imbalance: the rather lightweight HTTP connection, represented by a file descriptor and a small amount of memory, maps to a separate thread or process, a very heavyweight operating system object. It’s a programming convenience, but it’s massively wasteful. - -#### NGINX is a True Grandmaster #### - -Perhaps you’ve heard of [simultaneous exhibition][5] games, where one chess grandmaster plays dozens of opponents at the same time? - -![Kiril Georgiev](http://cdn.nginx.com/wp-content/uploads/2015/06/Kiril-Georgiev.gif) - -[Kiril Georgiev played 360 people simultaneously in Sofia, Bulgaria][6]. His final score was 284 wins, 70 draws and 6 losses. - -That’s how an NGINX worker process plays “chess.” Each worker (remember – there’s usually one worker for each CPU core) is a grandmaster that can play hundreds (in fact, hundreds of thousands) of games simultaneously. - -![Event-driven Architecture](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.13-PM.png) - -1. The worker waits for events on the listen and connection sockets. -1. Events occur on the sockets and the worker handles them: - - - An event on the listen socket means that a client has started a new chess game. The worker creates a new connection socket. - - An event on a connection socket means that the client has made a new move. The worker responds promptly. - -A worker never blocks on network traffic, waiting for its “opponent” (the client) to respond. When it has made its move, the worker immediately proceeds to other games where moves are waiting to be processed, or welcomes new players in the door. - -### Why Is This Faster than a Blocking, Multi-Process Architecture? ### - -NGINX scales very well to support hundreds of thousands of connections per worker process. Each new connection creates another file descriptor and consumes a small amount of additional memory in the worker process. There is very little additional overhead per connection. NGINX processes can remain pinned to CPUs. Context switches are relatively infrequent and occur when there is no work to be done. - -In the blocking, connection-per-process approach, each connection requires a large amount of additional resources and overhead, and context switches (swapping from one process to another) are very frequent. - -For a more detailed explanation, check out this [article][7] about NGINX architecture, by Andrew Alexeev, VP of Corporate Development and Co-Founder at NGINX, Inc. - -With appropriate [system tuning][8], NGINX can scale to handle hundreds of thousands of concurrent HTTP connections per worker process, and can absorb traffic spikes (an influx of new games) without missing a beat. - -### Updating Configuration and Upgrading NGINX ### - -NGINX’s process architecture, with a small number of worker processes, makes for very efficient updating of the configuration and even the NGINX binary itself. - -![Updating Configuration](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.33-PM.png) - -Updating NGINX configuration is a very simple, lightweight, and reliable operation. It typically just means running the `nginx –s reload` command, which checks the configuration on disk and sends the master process a SIGHUP signal. - -When the master process receives a SIGHUP, it does two things: - -- Reloads the configuration and forks a new set of worker processes. These new worker processes immediately begin accepting connections and processing traffic (using the new configuration settings). -- Signals the old worker processes to gracefully exit. The worker processes stop accepting new connections. As soon as each current HTTP request completes, the worker process cleanly shuts down the connection (that is, there are no lingering keepalives). Once all connections are closed, the worker processes exit. - -This reload process can cause a small spike in CPU and memory usage, but it’s generally imperceptible compared to the resource load from active connections. You can reload the configuration multiple times per second (and many NGINX users do exactly that). Very rarely, issues arise when there are many generations of NGINX worker processes waiting for connections to close, but even those are quickly resolved. - -NGINX’s binary upgrade process achieves the holy grail of high-availability – you can upgrade the software on the fly, without any dropped connections, downtime, or interruption in service. - -![New Binary](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.51-PM.png) - -The binary upgrade process is similar in approach to the graceful reload of configuration. A new NGINX master process runs in parallel with the original master process, and they share the listening sockets. Both processes are active, and their respective worker processes handle traffic. You can then signal the old master and its workers to gracefully exit. - -The entire process is described in more detail in [Controlling NGINX][9]. - -### Conclusion ### - -The [Inside NGINX infographic][10] provides a high-level overview of how NGINX functions, but behind this simple explanation is over ten years of innovation and optimization that enable NGINX to deliver the best possible performance on a wide range of hardware while maintaining the security and reliability that modern web applications require. - -If you’d like to read more about the optimizations in NGINX, check out these great resources: - -- [Installing and Tuning NGINX for Performance][11] (webinar; [slides][12] at Speaker Deck) -- [Tuning NGINX for Performance][13] -- [The Architecture of Open Source Applications – NGINX][14] -- [Socket Sharding in NGINX Release 1.9.1][15] (using the SO_REUSEPORT socket option) - --------------------------------------------------------------------------------- - -via: http://nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/ - -作者:[Owen Garrett][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://nginx.com/author/owen/ -[1]:http://nginx.com/resources/library/infographic-inside-nginx/ -[2]:http://nginx.org/en/docs/ngx_core_module.html#worker_processes -[3]:http://nginx.org/en/docs/ngx_core_module.html#accept_mutex -[4]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ -[5]:http://en.wikipedia.org/wiki/Simultaneous_exhibition -[6]:http://gambit.blogs.nytimes.com/2009/03/03/in-chess-records-were-made-to-be-broken/ -[7]:http://www.aosabook.org/en/nginx.html -[8]:http://nginx.com/blog/tuning-nginx/ -[9]:http://nginx.org/en/docs/control.html -[10]:http://nginx.com/resources/library/infographic-inside-nginx/ -[11]:http://nginx.com/resources/webinars/installing-tuning-nginx/ -[12]:https://speakerdeck.com/nginx/nginx-installation-and-tuning -[13]:http://nginx.com/blog/tuning-nginx/ -[14]:http://www.aosabook.org/en/nginx.html -[15]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ From 5a08b0f47433bc2a64c1846b85bedaec578e1b91 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sun, 21 Jun 2015 03:01:57 +0800 Subject: [PATCH 1237/2517] Translating by ZTinoZ --- .../tech/20150526 20 Useful Terminal Emulators for Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md index 42a6137296..5e0d237086 100644 --- a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md @@ -221,7 +221,7 @@ Xfce Terminal ### 17. xterm ### -xterm应用程序是一款标准的在X Window系统上的终端仿真器。It maintain DEC VT102 and Tektronix 4014 compatible terminals for applications that can’t use the window system directly. +xterm应用程序是一款标准的在X Window系统上的终端仿真器。它保持了DEC VT102和Tektronix 4014,让应用能直接使用X Window系统。 ![xterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/xterm.jpg) @@ -258,7 +258,7 @@ Sakura Terminal ### 20. rxvt-unicode ### -The rxvt-unicode (also known as urxvt) is a yet another highly customizable, lightweight and fast terminal emulator with xft and unicode support was developed by Marc Lehmann. It got some outstanding features such as support for international language via Unicode, the ability to display multiple font types and support for Perl extensions. +rxvt-unicode (也称为urxvt) 是另一个高度可定制、轻量级和快速的终端仿真器,支持xft和unicode,由Marc Lehmann开发。它有许多显著特性比如支持Unicode上的国际语言,能显示多种字体类型并支持Perl扩展。 ![rxvt unicode](http://www.tecmint.com/wp-content/uploads/2014/01/rxvt-unicode.png) From 0016e105d0dcb7bb2d2a1e67ef48805758dc3a7b Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sun, 21 Jun 2015 03:05:20 +0800 Subject: [PATCH 1238/2517] Finish the translation by ZTinoZ --- .../tech/20150526 20 Useful Terminal Emulators for Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150526 20 Useful Terminal Emulators for Linux.md (100%) diff --git a/sources/tech/20150526 20 Useful Terminal Emulators for Linux.md b/translated/tech/20150526 20 Useful Terminal Emulators for Linux.md similarity index 100% rename from sources/tech/20150526 20 Useful Terminal Emulators for Linux.md rename to translated/tech/20150526 20 Useful Terminal Emulators for Linux.md From f1392a0b831d054332fc4121270d2ac6e3f52a34 Mon Sep 17 00:00:00 2001 From: NearTan Date: Sun, 21 Jun 2015 20:02:39 +0800 Subject: [PATCH 1239/2517] translated --- ... on Ubuntu 15.04 with Different Methods.md | 265 ------------------ ... on Ubuntu 15.04 with Different Methods.md | 264 +++++++++++++++++ 2 files changed, 264 insertions(+), 265 deletions(-) delete mode 100644 sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md create mode 100644 translated/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md diff --git a/sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md b/sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md deleted file mode 100644 index 83b08328e0..0000000000 --- a/sources/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md +++ /dev/null @@ -1,265 +0,0 @@ -translating by NearTan - -How to Setup Node.JS on Ubuntu 15.04 with Different Methods -================================================================================ -This is such an important article to guide you about the installation and setup of Node.js on Ubuntu 15.04. Node.js is basically a server side java script programming to provide you bindings for enabling the input and output socket bios and streams. It has a high through put and non-blocking IO in a single threaded event loop. It’s also a platform layer that provides the functionality to interact with the Operating system to write file, read files and to do networking operations. So in this article we will perform different installation methods to setup Node.Js on Ubuntu 15.04 server. - -### Methods to Install Node.JS ### - -Their are different ways to install Node.Js and we can prefer to choose any one. Following are some important ways to install Node.Js that we will use to guide you about their each setup on Ubuntu 15.04 so make sure to remove the previous previous packages to avoid from any package conflict. - -- Installation of Node.JS from Source Code -- Installation of Node.JS from Package Manager -- Installation of Node.JS from Github Repository -- Installation of Node.JS with NVM - -### 1) Installing from Source Code ### - -Let's start with installation of Node.JS from the Source Code, so make sure that your system is up to date and dependent packages are pre installed. So follow the below steps and start the setup. - -#### STEP 1: System Update #### - -Use following commands and update Operating system and ten install the required packages are necessary for Node.JS setup. - - root@ubuntu-15:~# apt-get update - - root@ubuntu-15:~# apt-get install python gcc make g++ - -#### STEP 2: Get Source Code of Node.JS #### - -After we had installed the dependent packages now from the official web link of Node.JS just download its source code package and extract it as in following commands. - - root@ubuntu-15:~# wget http://nodejs.org/dist/v0.12.4/node-v0.12.4.tar.gz - root@ubuntu-15:~# tar zxvf node-v0.12.4.tar.gz - -#### STEP 3: Starting Installation #### - -Now move to the source code directory and execute the .configuration file - -![NodeJS Configure](http://blog.linoxide.com/wp-content/uploads/2015/06/13.png) - - root@ubuntu-15:~# ls - node-v0.12.4 node-v0.12.4.tar.gz - root@ubuntu-15:~# cd node-v0.12.4/ - root@ubuntu-15:~/node-v0.12.4# ./configure - root@ubuntu-15:~/node-v0.12.4# make install - -### Testing after Installation of Node.Js from Source Code ### - -Once the installation is done after running make installa command, we check its version and test that Node.Js is working fine by executing some test out puts. - - root@ubuntu-15:~/node-v0.12.4# node -v - v0.12.4 - -![Node.Js Test](http://blog.linoxide.com/wp-content/uploads/2015/06/21.png) - -Create a new file with .js extension execute it with Node command. - - root@ubuntu-15:~/node-v0.12.4# touch helo_test.js - root@ubuntu-15:~/node-v0.12.4# vim helo_test.js - console.log('Hello World'); - -Now execute it with Node command. - - root@ubuntu-15:~/node-v0.12.4# node helo_test.js - Hello World - -The out put shows that we had successfully installed Node.JS on Ubuntu 15.04 which is now ready to create applications on it using java scripts. - -### 2) Installing from Package Manager ### - -The installation of Node.JS through Package Manager is also a very simple process to setup on Ubuntu through NodeSource by adding its Personal Package Archives (PPA). - -We will go through the following steps to install Node.JS through PPA. - -#### STEP 1: Get the Source Code using Curl #### - -Before getting the source code by using the Curl command we must update our system and then run the curl command to fetch the NodeSource into local repository. - - root@ubuntu-15:~#apt-get update - root@ubuntu-15:~# curl -sL https://deb.nodesource.com/setup | sudo bash - - -The curl will execute the following tasks. - - ## Installing the NodeSource Node.js 0.10 repo... - ## Populating apt-get cache... - ## Confirming "vivid" is supported... - ## Adding the NodeSource signing key to your keyring... - ## Creating apt sources list file for the NodeSource Node.js 0.10 repo... - ## Running `apt-get update` for you... - Fetched 6,411 B in 5s (1,077 B/s) - Reading package lists... Done - ## Run `apt-get install nodejs` (as root) to install Node.js 0.10 and npm - -#### STEP 2: Installation of NodeJS and NPM #### - -As per the output of Curl we had fetched the NodeSource to our local repository now through apt-get commands we will install the NodeJS and NPM packages. - - root@ubuntu-15:~# apt-get install nodejs - -![NodeJS Install](http://blog.linoxide.com/wp-content/uploads/2015/06/31.png) - -#### STEP 3: Installing Build Essentials Tool #### - -To compile and install native addons from npm we may also need to install build tools using following command as. - - root@ubuntu-15:~# apt-get install -y build-essential - -### Testing With Node.JS Shell ### - -Testing of Node.Js is similar to the one that we did after installation from the source Code. -so lets start with the node command as follow and get its output result to see if Node.JS is fully functional. - - root@ubuntu-15:~# node - > console.log('Node.js Installed Using Package Manager'); - Node.js Installed Using Package Manager - ----------- - - root@ubuntu-15:~# node - > a = [1,2,3,4,5] - [ 1, 2, 3, 4, 5 ] - > typeof a - 'object' - > 5 + 2 - 7 - > - (^C again to quit) - > - root@ubuntu-15:~# - -### REPL For Your NodeJS Apps ### - -REPL is the Node.js shell, any valid Javascript which can be written in a script can be passed to the REPL. So lets see how REPL works with NodeJS. - - root@ubuntu-15:~# node - > var repl = require("repl"); - undefined - > repl.start("> "); - - Press Enter and it will show out put like this: - > { domain: null, - _events: {}, - _maxListeners: 10, - useGlobal: false, - ignoreUndefined: false, - eval: [Function], - inputStream: - { _connecting: false, - _handle: - { fd: 0, - writeQueueSize: 0, - owner: [Circular], - onread: [Function: onread], - reading: true }, - _readableState: - { highWaterMark: 0, - buffer: [], - length: 0, - pipes: null, - ... - ... - -Here is the list of command line help that we can use to work with REPL. - -![REPL Manual](http://blog.linoxide.com/wp-content/uploads/2015/06/4.png) - -### Working with NodeJS Packet Manager ### - -NPM is simple CLI tool for ensuring that a given node script runs continuously. It helps to Install and manage dependencies through the file package.json. We will start its using init command as. - - root@ubuntu-15:~# npm init - -![NPM starting](http://blog.linoxide.com/wp-content/uploads/2015/06/51.png) - -### 3) Installing from Github Repository ### - -In this method to install Node.JS we will consider few simple steps to directory clone the Node.JS repository from the github. - -Before the start of configurations through the the cloned package of Node.JS make sure that we must have following dependent packages installed with us. - - root@ubuntu-15:~# apt-get install g++ curl make libssl-dev apache2-utils git-core - -Now start the clone with git command and change the directory to its configuration file. - - root@ubuntu-15:~# git clone git://github.com/ry/node.git - root@ubuntu-15:~# cd node/ - -![Git Clone NodeJS](http://blog.linoxide.com/wp-content/uploads/2015/06/61.png) - -To install from the cloned repository now lets run the .config command and then make install to complete the setup of Node.Js . - - root@ubuntu-15:~# ./configure - -![Configure Node](http://blog.linoxide.com/wp-content/uploads/2015/06/7.png) - -Run the make install command that will takes few minutes so be patient and get it ready finalize the setup on Node.JS package for you. - - root@ubuntu-15:~/node# make install - - root@ubuntu-15:~/node# node -v - v0.13.0-pre - -### Testing with Node.JS ### - - root@ubuntu-15:~/node# node - > a = [1,2,3,4,5,6,7] - [ 1, 2, 3, 4, 5, 6, 7 ] - > typeof a - 'object' - > 6 + 5 - 11 - > - (^C again to quit) - > - root@ubuntu-15:~/node# - -### 4) Installing Node.JS Using Node Version Manager ### - -In this last method we show you we can easily install Node.JS with NVM method. This is one of the best method to install and configure Node.JS it provides us with facility to control versions. - -So before starting with this method make sure that the previously installed package is not already present there if you are working on the same machine. - -#### STEP 1: Installing Prerequisites #### - -Let's start with the system update and then install the following prerequisites for the Ubuntu Server to setup Node.JS using NodeJS Versions Manager System. Using the Curl command we will get NVM from the git to our local repository. - - root@ubuntu-15:~# apt-get install build-essential libssl-dev - root@ubuntu-15:~# curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | sh - -![NVM Curl](http://blog.linoxide.com/wp-content/uploads/2015/06/81.png) - -#### STEP 2: Update Home Environment #### - -After the curl command downloads the necessary packages for the NVM in the home directory of the user it also make changes to the bash profile. so in order to update those change and get access to NVM we must relogin to the terminal or we can update it using the source command as below. - - root@ubuntu-15:~# source ~/.profile - -Now we can use the NVM to choose the default NVM version or by moving to the previous version of NVM that we can do so by using the following commands. - - root@ubuntu-15:~# nvm ls - root@ubuntu-15:~# nvm alias default 0.12.4 - -![NVM Default](http://blog.linoxide.com/wp-content/uploads/2015/06/91.png) - -#### STEP 3: Using NodeJS Versions Manager #### - -We have successfully setup the NodeJS with NVM package and now can use it with its useful commands. - -![NVM Manual](http://blog.linoxide.com/wp-content/uploads/2015/06/101.png) - -### CONCLUSION ### - -Now we are ready to go with building server side applications with Node.JS and you are free to choose the best installation setup of your choice as we had done with four optional installations of Node.Js on the latest version of Ubuntu 15.04 with priority installation sequence, now its up to you to follow the one of your own choice and start coding with NodeJS. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/setup-node-js-ubuntu-15-04-different-methods/ - -作者:[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/translated/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md b/translated/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md new file mode 100644 index 0000000000..fbbaecb067 --- /dev/null +++ b/translated/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md @@ -0,0 +1,264 @@ +在Ubuntu下用不同方式安装Node.JS +================================================================================ + +如果你要在Ubuntu 15.04上安装Node.js的话,这篇教程对你来说肯定很重要。Node.js根本上来说就是一个运行在服务端上的封装好了输入输出流的javascript程序。Node.js巧妙的使用单线程的event loop来处理异步IO。同时它在平台层面上,面向系统拥有非常实用的文件读写,网络操作功能。所以这篇文章将展示在Ubuntu 15.04 server上不同的安装Node.Js的方式。 + +### 安装Node.JS 的方法### + +有许多不同的方法安装Node.JS,我们可以选择其一。通过本篇文章我们将手把手带着你在Ubuntu 15.04上安装Node.Js,在此之前请卸载旧版本的包以免发生包冲突。 + +- 从源代码安装Node.JS +- 用包管理器安装Node.JS +- 从Github远程库安装Node.JS +- 用NVM安装Node.JS + +### 1) 从源代码安装Node.JS ### + +让我们开始从从源代码安装Node.JS之前,请确认系统上的所有的依赖包都已经更新到最新版本。然后跟着以下步骤来开始安装: + +#### 步骤1: 升级系统 #### + +用以下命令来升级系统,并且安装一些Node.JS必要的包。 + + root@ubuntu-15:~# apt-get update + + root@ubuntu-15:~# apt-get install python gcc make g++ + +#### 步骤2: 获取Node.JS的源代码 #### + +安装好依赖包之后我们可以从官方网站上下载Node.JS的源代码。下载以及解压的命令如下: + + root@ubuntu-15:~# wget http://nodejs.org/dist/v0.12.4/node-v0.12.4.tar.gz + root@ubuntu-15:~# tar zxvf node-v0.12.4.tar.gz + +#### 步骤3: 开始安装 #### + +现在我们进入源代码的目录然后运行.configuration文件 + +![NodeJS Configure](http://blog.linoxide.com/wp-content/uploads/2015/06/13.png) + + root@ubuntu-15:~# ls + node-v0.12.4 node-v0.12.4.tar.gz + root@ubuntu-15:~# cd node-v0.12.4/ + root@ubuntu-15:~/node-v0.12.4# ./configure + root@ubuntu-15:~/node-v0.12.4# make install + +### 安装后测试 ### + +只要运行一次上面的命令就顺利安装好了Node.JS,现在我们来确认一下版本信息和测试以下Node.JS是否可以运行输出。 + + root@ubuntu-15:~/node-v0.12.4# node -v + v0.12.4 + +![Node.Js Test](http://blog.linoxide.com/wp-content/uploads/2015/06/21.png) + +创建一个以.js为扩展名的文件然后用Node的命令运行 + + root@ubuntu-15:~/node-v0.12.4# touch helo_test.js + root@ubuntu-15:~/node-v0.12.4# vim helo_test.js + console.log('Hello World'); + +现在我们用Node的命令运行文件 + + root@ubuntu-15:~/node-v0.12.4# node helo_test.js + Hello World + +输出的结果证明我们已经成功的在Ubuntu 15.04安装好了Node.JS,同时我们也能运行JavaScript文件。 + +### 2) 利用包管理器安装Node.JS ### + +在Ubuntu下用包管理器安装Node.JS是非常简单的,只要增加NodeSource的个人软件包档案(PPA)即可。 + +我们将下面通过PPA安装Node.JS + +#### 步骤1: 用curl获取源代码 #### + +在我们用curl获取源代码之前,我们必须先升级操作系统然后用curl命令获取NodeSource添加到本地仓库。 + + root@ubuntu-15:~#apt-get update + root@ubuntu-15:~# curl -sL https://deb.nodesource.com/setup | sudo bash - + +curl将运行以下任务 + + ## Installing the NodeSource Node.js 0.10 repo... + ## Populating apt-get cache... + ## Confirming "vivid" is supported... + ## Adding the NodeSource signing key to your keyring... + ## Creating apt sources list file for the NodeSource Node.js 0.10 repo... + ## Running `apt-get update` for you... + Fetched 6,411 B in 5s (1,077 B/s) + Reading package lists... Done + ## Run `apt-get install nodejs` (as root) to install Node.js 0.10 and npm + +#### 步骤2: 安装NodeJS和NPM #### + +运行以上命令之后如果输出如上所示,我们可以用apt-get命令来安装NodeJS和NPM包。 + + root@ubuntu-15:~# apt-get install nodejs + +![NodeJS Install](http://blog.linoxide.com/wp-content/uploads/2015/06/31.png) + +#### STEP 3: Installing Build Essentials Tool #### +#### 步骤3: 安装一些必备的工具 #### + +通过以下命令来安装编译安装一些我们必需的本地插件。 + + root@ubuntu-15:~# apt-get install -y build-essential + +### 通过Node.JS Shell来测试 ### + +测试Node.JS的步骤与之前使用源代码安装相似,通过以下node命令来确认Node.JS是否完全安装好: + + root@ubuntu-15:~# node + > console.log('Node.js Installed Using Package Manager'); + Node.js Installed Using Package Manager + +---------- + + root@ubuntu-15:~# node + > a = [1,2,3,4,5] + [ 1, 2, 3, 4, 5 ] + > typeof a + 'object' + > 5 + 2 + 7 + > + (^C again to quit) + > + root@ubuntu-15:~# + +### 使用NodeJS应用进行简单的测试 ### + +REPL是一个Node.js的shell,任何有效的JavaScript代码都能在REPL下运行通过。所以让我们看看在Node.JS下的REPL是什么样子吧。 + + root@ubuntu-15:~# node + > var repl = require("repl"); + undefined + > repl.start("> "); + + Press Enter and it will show out put like this: + > { domain: null, + _events: {}, + _maxListeners: 10, + useGlobal: false, + ignoreUndefined: false, + eval: [Function], + inputStream: + { _connecting: false, + _handle: + { fd: 0, + writeQueueSize: 0, + owner: [Circular], + onread: [Function: onread], + reading: true }, + _readableState: + { highWaterMark: 0, + buffer: [], + length: 0, + pipes: null, + ... + ... + +以下是可以在REPL下使用的命令列表 + +![REPL Manual](http://blog.linoxide.com/wp-content/uploads/2015/06/4.png) + +### 使用NodeJS的包管理器 ### + +NPM是一个提供给node脚本连续运行的命令行工具,它能通过package.json来安装和管理依赖包。最开始从初始化命令init开始 + + root@ubuntu-15:~# npm init + +![NPM starting](http://blog.linoxide.com/wp-content/uploads/2015/06/51.png) + +### 3) 从Github远程库安装Node.JS ### + +在这个方法中我们需要一些步骤来把Node.JS从Github的远程的仓库克隆到本地仓库目录 + +在开始克隆(clone)包到本地并且配制之前,我们要先安装以下依赖包 + + root@ubuntu-15:~# apt-get install g++ curl make libssl-dev apache2-utils git-core + +现在我们开始用git命令克隆到本地并且转到配制目录 + + root@ubuntu-15:~# git clone git://github.com/ry/node.git + root@ubuntu-15:~# cd node/ + +![Git Clone NodeJS](http://blog.linoxide.com/wp-content/uploads/2015/06/61.png) + +clone仓库之后,通过运行.config命令来编译生成完整的安装包。 + + root@ubuntu-15:~# ./configure + +![Configure Node](http://blog.linoxide.com/wp-content/uploads/2015/06/7.png) + +运行make install命令之后耐心等待几分钟,程序将会安装好Node.JS + + root@ubuntu-15:~/node# make install + + root@ubuntu-15:~/node# node -v + v0.13.0-pre + +### 测试Node.JS ### + + root@ubuntu-15:~/node# node + > a = [1,2,3,4,5,6,7] + [ 1, 2, 3, 4, 5, 6, 7 ] + > typeof a + 'object' + > 6 + 5 + 11 + > + (^C again to quit) + > + root@ubuntu-15:~/node# + +### 4) 通过NVM安装Node.JS ### + +在最后一种方法中我们我们将用NVM来比较容易安装Node.JS。安装和配制Node.JS,这是最好的方法之一,它可以供我们选择要安装的版本。 + +在安装之前,请确认本机以前的安装包已经被卸载 + +#### 步骤1: 安装依赖包 #### + +首先升级Ubuntu Server系统,然后安装以下安装Node.JS和使用NVM所要依赖的包。用curl命令从git上下载NVM到本地仓库: + + root@ubuntu-15:~# apt-get install build-essential libssl-dev + root@ubuntu-15:~# curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | sh + +![NVM Curl](http://blog.linoxide.com/wp-content/uploads/2015/06/81.png) + +#### 步骤2: 修改Home环境 #### + +用curl从NVM下载必需的包到用户的home目录之后,我们需要修改bash的配制文件添加NVM,之后只要重新登录中断或者用如下命令更新即可 + + root@ubuntu-15:~# source ~/.profile + +现在我们可以用NVM来设置默认的NVM的版本或者用如下命令来指定之前版本: + + root@ubuntu-15:~# nvm ls + root@ubuntu-15:~# nvm alias default 0.12.4 + +![NVM Default](http://blog.linoxide.com/wp-content/uploads/2015/06/91.png) + +#### 步骤3: 使用NVM #### + +我们已经通过NVM成功的安装了Node.JS,所以我们现在可以使用各种有用的命令。 + +![NVM Manual](http://blog.linoxide.com/wp-content/uploads/2015/06/101.png) + +### 总结 ### + +现在我们已经准备好了在服务端安装Node.JS,你可以从我们说的四种方式中选择最合适你的方式在最新的Ubuntu 15.04上来安装Node.JS,安装好之后你就可以利用Node.JS来编写你的代码。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-node-js-ubuntu-15-04-different-methods/ + +作者:[Kashif Siddique][a] +译者:[NearTan](https://github.com/NearTan) +校对:[校对者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 From 129ca4230017533eb364c72622158edc6b7e7989 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 22 Jun 2015 17:04:13 +0800 Subject: [PATCH 1240/2517] translating --- ...pache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md b/sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md index 82be4748e0..a45e83d365 100644 --- a/sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md +++ b/sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md @@ -1,3 +1,5 @@ +translating----geekpi + Installing LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin) in RHEL/CentOS 7.0 ================================================================================ Skipping the LAMP introduction, as I’m sure that most of you know what is all about. This tutorial will concentrate on how to install and configure famous LAMP stack – Linux Apache, MariaDB, PHP, PhpMyAdmin – on the last release of Red Hat Enterprise Linux 7.0 and CentOS 7.0, with the mention that both distributions have upgraded httpd daemon to Apache HTTP 2.4. @@ -235,4 +237,4 @@ via: http://www.tecmint.com/install-lamp-in-centos-7/ [3]:http://www.tecmint.com/centos-7-installation/ [4]:http://www.tecmint.com/configure-network-interface-in-rhel-centos-7-0/ [5]:http://php.net/manual/en/timezones.php -[6]:http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator \ No newline at end of file +[6]:http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator From 060755d17e33adf6f796483c74bef12f967968bc Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 22 Jun 2015 17:16:53 +0800 Subject: [PATCH 1241/2517] PUB:20150615 PHP at 20--From pet project to powerhouse @wi-cuckoo --- ...P at 20--From pet project to powerhouse.md | 84 +++++++++++++++++++ ...P at 20--From pet project to powerhouse.md | 81 ------------------ 2 files changed, 84 insertions(+), 81 deletions(-) create mode 100644 published/20150615 PHP at 20--From pet project to powerhouse.md delete mode 100644 translated/talk/20150615 PHP at 20--From pet project to powerhouse.md diff --git a/published/20150615 PHP at 20--From pet project to powerhouse.md b/published/20150615 PHP at 20--From pet project to powerhouse.md new file mode 100644 index 0000000000..55470bd389 --- /dev/null +++ b/published/20150615 PHP at 20--From pet project to powerhouse.md @@ -0,0 +1,84 @@ +PHP 20岁了:从玩具到巨头 +============================================================================= + +> 曾经的‘丑小鸭工程’已经转变为一个互联网巨头,感谢灵活、务实和充满活力的开发者社区。 + +当Rasmus Lerdorf发布“[一个用C写的小型紧凑的CGI可执行程序集合][2]”时, 他没有想到他的创造会对网络发展产生多大的影响。今年在Miami举行的SunshinePHP大会上,Lerdorf做了开场演讲,他自嘲到,“在1995年的时候,我以为我已经在 Web 上解除了C API的束缚。显然,事情并非那样,我们全成了C程序员了。” + +![](http://images.techhive.com/images/article/2015/06/13049862325_8c97a11878_z-100590275-primary.idge.jpg) + +题图来自: [Steve Jurvetson via Flickr][1] + +实际上,当Lerdorf发布个人主页工具(Personal Home Page Tools,即 PHP 名字的来源)的1.0版本时,那时的网络还是如此的年轻。直到那年的十一月份HTML 2.0还没有公布,而且HTTP/1.0也是次年的五月份才出现。那时,NCSA HTTPd是使用最广泛的网络服务器,而网景的Navigator则是最流行的网络浏览器,八月份的时候,IE1.0才刚刚出现。换句话说,PHP的开端刚好撞上了浏览器战争的前夜。 + +早些时候,我们谈论了一大堆关于PHP对网络发展的影响。回到那时候,当说到用于网络应用的服务器端处理,我们的选择是有限的。PHP满足了我们对于一种工具的需求,这就是可以使得我们在网络上做一些动态的事情。它的实用的灵活性只受限于我们的想像力,PHP从那时起便与网络共同成长。现在,PHP占据了网络语言的超过80%的份额,已经是成熟的脚本语言,特别适合解决网络问题。她独一无二的血统讲述了一个故事,实用高于理论,解决问题高于纯正。 + +### 把我们钩住的网络魔力 ### + +PHP一开始并不是一门编程语言,从她的设计就很明显不是 -- 或者她本来就缺乏相关特性,正如那些贬低者指出的那样。最初,她是作为一种API帮助网络开发者能够接入底层的C语言封装库。第一个版本是一组小的CGI可执行程序,提供表单处理功能,可以访问查询参数和mSQL数据库。而且她可以如此容易地处理一个网络应用的数据库,证明了其在激发我们对于PHP的兴趣和PHP后来的支配地位的关键作用。 + +到了第二版 -- 即 PHP/FI -- 数据库的支持已经扩展到包括PostgreSQL、MySQL、Oracle、Sybase等等。她通过封装他们的C语言库来支持各种数据库,将他们作为PHP库的一部分。PHP/FI也封装了GD库,可以创建并管理GIF图像。她可以作为一个Apache模块运行,或者编译进FastCGI支持,并且她引入的 PHP 编程语言支持变量、数组、语言结构和函数。对于那个时候大多数在网络这块工作的人来说,PHP是我们一直在寻求的那款“胶水”。 + +当PHP吸纳越来越多的编程语言功能,演变为第三版和之后的版本时,她从来没有失去这种黏合的特性。通过仓库如PECL(PHP Extension Community Library),PHP可以把各种库都连在一起,将他们的函数引入到PHP层面。这种将组件结合在一起的能力,成为PHP之美的一个重要方面,使之不会受限于其源代码上。 + +### 网络,一个码农们的社区 ### + +PHP在网络发展上的持续影响并不局限于能用这种语言干什么。PHP如何完成工作,谁参与进来 -- 这些都是PHP传奇中很重要的部分。 + +早在1997年,PHP的用户群体开始形成。其中最早的是美国中西部PHP用户组(后来叫做 Chiago PHP),并[1997年二月份的时候举行了第一次聚会][4]。这是一个充满生气、饱含激情的开发者社区形成的开端,聚合成一种吸引力 -- 在网络上的一个小工具就可以帮助他们解决问题。PHP这种普遍存在的特性使得她成为网络开发一个很自然的选择。在分享主导的世界里,她开始盛行,而且低入的门槛对于许多早期的网络开发者来说是十分有吸引力的。 + +伴随着社区的成长,为开发者带来了一堆工具和资源。这一年是2000年,出现了PHP的一个转折点,它见证了第一次PHP开发者大会,聚集了编程语言的核心开发者,他们在Tel Aviv见面,讨论即将到来的4.0版本的发布。PHP扩展和应用仓库(PEAR)也于2000年发起,它提供了高质量的用户代码包,依据标准和最佳操作。第一届PHP大会PHP Kongress不久之后在德国举行。[PHPDeveloper.org][5]也随后上线,直到今天,这都是PHP社区里最权威的新闻资源。 + +这个社区的势头表明了接下来几年里PHP成长的关键所在。随着网络开发产业的爆发,PHP也获得发展。PHP开始为更多、更大的网站提供动力。越来越多的用户群在世界各地开花。邮件列表、在线论坛、IRC、大会,以及如php[architect]、德国PHP杂志、国际PHP杂志等商业杂志 -- PHP社区的活力在完成网络工作的方式上有极其重要的影响:共同地,开放地,倡导代码共享。 + +然后,在10年前,PHP 5发布后不久,在网络发展史上一个有趣地事情发生了,它导致了PHP社区如何构建库和应用的转变:Ruby on Rails发布了。 + +### 框架的异军突起 ### + +用于Ruby编程语言的Ruby on Rails框架在MVC(模型-视图-控制)架构模型上获得了不断增长的焦点与关注。Mojavi PHP框架几年前已经使用MVC模型了,但是Ruby on Rails的高明之处在于巩固了MVC。框架引爆了PHP社区,并且框架已经改变了开发者构建PHP应用程序的方式。 + +许多重要的项目和发展已经发端,这归功于PHP社区框架的生长。[PHP框架互用性组织][6]成立于2009年,致力于在框架间建立编码标准,命名约定与最佳操作。编纂这些标准和操作帮助为开发者在使用成员项目的代码时提供了越来越多的互用性软件。互用性意味着每个框架可以拆分为组块和独立的库,也可以作为整体的框架在一起使用。互用性带来了另一个重要的里程碑:Composer项目于2011年诞生了。 + +从Node.js的NPM和Ruby的Bundler获得灵感,Composer开辟了PHP应用开发的新纪元,创造了一次PHP“文艺复兴”。它激发了包互用性、标准命名约定、编码标准的采用、覆盖测试的提升。它是任何现代PHP应用中的一个基本工具。 + +### 加速和创新的需要 ### + +如今,PHP社区有一个生机勃勃应用和库的生态系统,有一些被广泛安装的PHP应用包括WordPress,Drupal,Joomla和MediaWiki。从小型的夫妻店站点到whitehouse.gov和Wikipeida,这些应用支撑了各种不同规模的业务的网站。在Alexa前十的站点中,有6个使用PHP,在一天内为数十亿的页面访问提供服务。因此,PHP应用已成为需要加速的首选,并且许多创新也加入到PHP的核心来提升性能。 + +在2010年,Facebook公开了其用作PHP源对源的编译器的HipHop,可以翻译PHP代码为C++代码,并且编译为一个单独的可执行二进制应用。Facebook的规模和成长需要从标准互用的PHP代码迁移到更快、最佳的可执行的代码。尽管如此,由于PHP的易用和快速开发周期,Facebook还想继续使用PHP。HipHop后来进化为HHVM,这是一个针对PHP的JIT(just-in-time)编译基础的执行引擎,其包含一个基于PHP的新的语言:[Hack][7]。 + +Facebook的创新以及其他的VM项目是在引擎水平上的比较,其引起了关于Zend引擎未来的讨论。Zend引擎依然是PHP的内核和语言规范。在2014年,它创建了一个语言规范项目,“提供一个完整的,简明的语句定义,和PHP语言的语义学”,使得对编译器项目来说,创建互用的PHP实现成为可能。 + +下一个PHP的主要版本成为了激烈争论的话题,他们提出了一个叫做phpng(下一代)的项目,来清理,重构,优化和改进PHP代码基础,这也展示了对实际应用的性能的实质提升。由于之前有一个未发布的PHP 6.0版本,因此在决定命名下一个主要版本叫做“PHP 7”后,就合并了phpng分支,并制定了开发PHP 7的计划,以增加很多语言中拥有的功能,如scalar和返回类型提示。 + +随着[今天第一版PHP 7 alpha发布][8],基准检测程序显示她在许多方面[与HHVM的一样好或者拥有更好的性能][9],PHP正与现代网络开发需求保持一致的步伐。同样地,PHP-FIG继续创新和推动框架与库的协作 -- 最近由于[PSR-7][10]的采纳,这将会改变PHP项目处理HTTP的方式。用户组、会议、公众和如[PHPMentoring.org][11]这样的布道者继续在PHP开发者社区提倡最好的操作、编码标准和测试。 + +PHP从各个方面见证了网络的成熟,而且PHP自己也成熟了。曾经一个简单的低级C语言库的API封装,PHP以她自己的方式,已经成为一个羽翼丰满的编程语言。她的开发者社区是一个充满生气、乐于助人、在实用方面引以为傲,并且欢迎新人的地方。PHP已经经受了20年的考验,而且目前在语言与社区里的活跃性,会保证她在接下来的几年里将会是一个密切相关的、积极有用的的语言。 + +在Rasmus Lerdorf的SunshinePHP的演讲中,他回忆到,“我会想到我会在20年之后讨论当初做的这个愚蠢的小项目吗?没有。” + +这里向Lerdorf和PHP社区的其他人致敬,感谢他们把这个“愚蠢的小项目”变成了一个如今网络上持久、强大的组件。 + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2933858/php/php-at-20-from-pet-project-to-powerhouse.html + +作者:[Ben Ramsey][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Ben-Ramsey/ +[1]:https://www.flickr.com/photos/jurvetson/13049862325 +[2]:https://groups.google.com/d/msg/comp.infosystems.www.authoring.cgi/PyJ25gZ6z7A/M9FkTUVDfcwJ +[3]:http://w3techs.com/technologies/overview/programming_language/all +[4]:http://web.archive.org/web/20061215165756/http://chiphpug.php.net/mpug.htm +[5]:http://www.phpdeveloper.org/ +[6]:http://www.php-fig.org/ +[7]:http://www.infoworld.com/article/2610885/facebook-q-a--hack-brings-static-typing-to-php-world.html +[8]:https://wiki.php.net/todo/php70#timetable +[9]:http://talks.php.net/velocity15 +[10]:http://www.php-fig.org/psr/psr-7/ +[11]:http://phpmentoring.org/ + diff --git a/translated/talk/20150615 PHP at 20--From pet project to powerhouse.md b/translated/talk/20150615 PHP at 20--From pet project to powerhouse.md deleted file mode 100644 index 2dd4765a42..0000000000 --- a/translated/talk/20150615 PHP at 20--From pet project to powerhouse.md +++ /dev/null @@ -1,81 +0,0 @@ -PHP 20岁了:从兴趣工程到强大的组织 -============================================================================= -![](http://images.techhive.com/images/article/2015/06/13049862325_8c97a11878_z-100590275-primary.idge.jpg) - -信任: [Steve Jurvetson via Flickr][1] - -> 曾经的‘丑小鸭工程’已经转变为一个网络世界的强大组织,感谢网络世界的灵活,实用与充满生气的社区 - -当Rasmus Lerdorf发布“[一个用C写的紧凑的CGI可执行程序集合][2],” 他没有想到他的创造会对网络发展产生多大的影响。今年在Miami举行的SunshinePHP大会上,Lerdorf做了开场演讲,他自嘲到,“在1995年的时候,我以为我已经解除了C API的束缚,在网络之上。显然,事情并非那样,或者我们都已经是C程序员了。” - -实际上,当Lerdorf发布个人主页工具 -- 后来以PHP闻名的1.0版本时 -- 那时的网络还是如此的年轻。HTML 2.0还没有公布,直到那年的十一月份,而且HTTP/1.0也是次年的五月份才出现。NCSA HTTPd是使用最广泛的网络浏览器,而网景的Navigator则是最流行的网络浏览器,八月份的时候,IE1.0才到来。换句话说,PHP的开端刚好撞上了浏览器战争的前夜。 - -早些时候,说了大堆关于PHP对网络发展的影响。回到那时候,我们的选择是有限的,当说到服务器方面对于网络软件的进展。PHP满足了我们对于一个工具的需求,就是可以使得我们在网络上做一些动态的事情。实用的灵活性束缚了我们的想像,PHP从那时起便与网络共同成长。现在,PHP占据了网络语言超过80%的份额,已经是成熟的脚本语言,特别适合解决网络问题。她独一无二的血统讲述一个故事,实用高于理论,解决问题高于纯粹。 - -### 把我们钩住的网络魔力 ### - -PHP一开始并不是一门编程语言,从她的设计就很明星 -- 或者她本来就缺,正如那些贬低者指出的那样。最初,她是作为一种API帮助网络开发者能够接入底层的C语言封装库。第一个版本是一组小的CGI可执行程序,提供表单处理功能,通过接入需要的参数和mSQL数据库。而且她如此容易地处理一个网络应用的数据库,证明了其在激发我们对于PHP的兴趣和PHP后来的支配地位的关键作用。 - -到了第二版 -- aka PHP/FI -- 数据库的支持已经扩展到包括PostgreSQL、MySQL、Oracle、Sybase等等。她通过包括他们的C语言库来支持其数据库,将他们作为PHP库的一部分。PHP/FI也可以包括GD库,创建并管理GIF镜像。她可以作为一个Apache模块运行,或者有FastCGI支持的时候被编译,并且她展示了支持变量,数组,语言结构和函数的PHP脚本语言。对于那个时候大多数在网络这块工作的人来说,PHP是我们一直在寻求的那款“胶水”。 - -当PHP吸纳越来越多的编程语言分支,演变为第三版和之后的版本,她从来没有失去连接的特性。通过仓库如PECL(PHP Extension Community Library),PHP可以把库都连在一起,暴露他们的函数给PHP层。这种将组件结合在一起的能力,成为PHP之美的一个重要方面,尽管她没有被限制在其资源代码上。 - -### 网络,一个码农们的社区 ### - -PHP在网络发展上的持续影响并不局限于能用这种语言干什么。PHP如何完成工作,谁参与近进来 -- 这些都是PHP传奇很重要的部分。 - -早在1997年,PHP的用户群体开始形成。其中最早的是中东的PHP用户群(后来以Chiago PHP闻名),并[1997年二月份的时候举行了第一次聚会][4]。这是一个充满生气,饱含激情的开发者社区形成的开端,聚合成一种吸引力 -- 在网络上很少的工具就可以帮助他们解决问题。PHP这种普遍存在的特性使得她成为网络开发一个很自然的选择。在分享主导的世界里,她开始盛行,而且低入的门槛对于许多早期的网络开发者来说是十分有吸引力的。 - -伴随着社区的成长,为开发者带来了一堆工具和资源。这一年2000年 -- PHP的一个转折点 -- 见证了第一次PHP开发者大会,编程语言的核心开发者的一次聚集,在Tel Aviv见面,讨论即将到来的4.0版本的发布。PHP扩展和应用仓库(PEAR)也于2000发起,提供高质量的用户代码包,根据标准且最好的操作。第一届PHP大会,PHP Kongress,不久之后在德国举行。[PHPDeveloper.org][5]随后上线,直到今天。这是在PHP社区里最权威的新闻资源。 - -这种公社的势头(有待校正)证明了接下来几年里PHP成长的关键所在,且随着网络开发产业的爆发,PHP也获得发展。PHP开始占领更多,更大的网站。越来越多的用户群在世界范围内形成。邮件列表;在线论坛;IRC;大会;交易日记如php[架构],德国PHP杂志,国际PHP杂志 -- PHP社区的活力在完成网络工作的方式上有极其重要的影响:共同地,开放地,倡导代码共享。 - -然后,10年前,PHP 5发布后不久,在网络发展史上一个有趣地事情发生了,导致了PHP社区如何构建库和应用的转变:Ruby on Rails发布了。 - -### 框架的异军突起 ### - -针对Ruby编程语言的Ruby on Rails,在MVC(模型-视图-控制)架构模型上获得了不断增长的焦点与关注。Mojavi PHP框架几年前已经使用该模型了,但是Ruby on Rails的高明之处在于巩固了MVC。框架在PHP社区炸开了,并且框架已经改变了开发者构建PHP应用程序的方式。 - -许多重要的项目和发展已经起势,这归功于PHP社区框架的生长。PHP[框架互用性组织][6]成立于2009年,致力于在框架间建立编码标准,命名约定与最佳操作。编纂这些标准和操作帮助为开发者提供了越来越多的互动性软件,使用成员项目的代码。互用性意味着每个框架可以拆分为组块和独立的库,可以被一起使用作为整体的框架。互用性带来了另一个重要的里程碑:Composer项目于2011年诞生了。 - -从Node.js的NPM和Ruby的Bundler获得灵感,Composer开辟了PHP应用开发的新纪元,创造了一次PHP“文艺复兴”。它激起了包,标准命名约定,编码标准的采用与成长中的覆盖测试间的互用性。它是任何现代PHP应用中的一个基本工具。 - -### 加速和创新的需要 ### - -如今,PHP社区有一个生机勃勃应用和库的生态系统,一些被广泛安装的PHP应用包括WordPress,Drupal,Joomla和MediaWiki。这些应用占据了所有规模的商业的网络形式,从小型的夫妻店到站点如whitehouse.gov和Wikipeida。Alexa前十的站点中,6个使用PHP在一天内服务数十亿的页面。结果,PHP应用已成加速需要的首选 -- 并且许多创新也加入到PHP的核心来提升表现。 - -在2010年,Facebook公开了其用作PHP源对源的编译器的HipHop,翻译PHP代码为C++代码,并且编译为一个单独的可执行二进制应用。Facebook的规模和成长需要从标准互用的PHP代码迁移到更快,最佳的可执行的代码。尽管如此,Facebook想继续使用PHP,由于PHP的易用和快速开发周期。HipHop进化为HHVM,一个针对PHP的JIT(just-in-time)编译基础的执行引擎,其包含一个基于PHP的新的语言:[Hack][7]。 - -Facebook的创新,和其他的VM项目,创建了在引擎水平上的比较,引起了关于Zend引擎未来的讨论。Zend引擎依然占据PHP和一种语言表述的问题的核心。在2004年,一个语言表述项目被创建,“为提供一个完整的,简明的语句定义,和PHP语言的语义学,”使得对编译器项目来说,创建共用的PHP实现成为可能。 - -下一个PHP的主要版本成为了激烈争论的话题,一个著名的pgpng项目(下一代)作为一个能清理,重构,优化和提升PHP代码基础的选项被提出来,这也展示了对真实世界应用的性能的实质上的提升。由于之前未发布的PHP 6.0版本,在决定命名下一个主要版本为“PHP 7”后,phpng分支被合并了,并制定了计划开发PHP 7,Hack提供了很多语言中拥有的功能,如scalar和返回键入提示。 - -随着[今天第一版PHP 7 alpha发布][8],标准检测程序显示在许多方面[与HHVM的一样或者更好的性能][9],PHP正与现代网络开发需求保持一致的步伐。同样地,PHP-FIG继续创新和推送框架与库用于协作 -- 最近由于[PSR-7][10]的采纳,这将会改变PHP项目处理HTTP的方式。用户组,会议,公众和积极性如[PHPMentoring.org][11]继续在PHP开发者社区提倡最好的操作,编码标准和测试 - -PHP从各个方面见证了网络的成熟,而且PHP自己也成熟了。曾经一个单一的低层次的C语言库的API包装,PHP以她自己的方式,已经成为一个羽翼丰满的编程语言。她的开发者社区是一个充满生气,乐于帮助,在实用方面以自己为傲,并且欢迎新入者的地方。PHP已经经受了20年的考验,而且目前在语言与社区里活跃性,会保证她将会是一个中肯的,有用的的语言,在接下来的几年里。 - -他的SunshinePHP的关键发言中,Rasmus Lerdorf回忆到,“我曾想过我会在20年之后与我当初做的这个愚蠢的小项目交流吗?没有。” - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2933858/php/php-at-20-from-pet-project-to-powerhouse.html - -作者:[Ben Ramsey][a] -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Ben-Ramsey/ -[1]:https://www.flickr.com/photos/jurvetson/13049862325 -[2]:https://groups.google.com/d/msg/comp.infosystems.www.authoring.cgi/PyJ25gZ6z7A/M9FkTUVDfcwJ -[3]:http://w3techs.com/technologies/overview/programming_language/all -[4]:http://web.archive.org/web/20061215165756/http://chiphpug.php.net/mpug.htm -[5]:http://www.phpdeveloper.org/ -[6]:http://www.php-fig.org/ -[7]:http://www.infoworld.com/article/2610885/facebook-q-a--hack-brings-static-typing-to-php-world.html -[8]:https://wiki.php.net/todo/php70#timetable -[9]:http://talks.php.net/velocity15 -[10]:http://www.php-fig.org/psr/psr-7/ -[11]:http://phpmentoring.org/ -这里向Lerdorf和PHP社区的其他人致敬,感谢他们把这个“愚蠢的小项目”变成了一个如今网络上持久的,强大的组块。 From ce9c3d94a633ca0efe126d011264de1edee37557 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 22 Jun 2015 17:43:26 +0800 Subject: [PATCH 1242/2517] PUB:20150515 How to Install Percona Server on CentOS 7 @FatJoe123 --- ...w to Install Percona Server on CentOS 7.md | 113 ++++++------------ 1 file changed, 37 insertions(+), 76 deletions(-) rename {translated/tech => published}/20150515 How to Install Percona Server on CentOS 7.md (60%) diff --git a/translated/tech/20150515 How to Install Percona Server on CentOS 7.md b/published/20150515 How to Install Percona Server on CentOS 7.md similarity index 60% rename from translated/tech/20150515 How to Install Percona Server on CentOS 7.md rename to published/20150515 How to Install Percona Server on CentOS 7.md index ef283c8b92..8a99197328 100644 --- a/translated/tech/20150515 How to Install Percona Server on CentOS 7.md +++ b/published/20150515 How to Install Percona Server on CentOS 7.md @@ -1,133 +1,99 @@ - -如何在CentOS 7上安装Percona Server - +如何在 CentOS 7 上安装 Percona服务器 ================================================================================ -在这篇文章中我们将了解关于Percona Server,一个开源简易的MySQL,MariaDB的替代。InnoDB的数据库引擎使得Percona Server非常有吸引力,如果你需要的高性能,高可靠性和高性价比的解决方案,它将是一个很好的选择。 -在下文中将介绍在CentOS 7上Percona的服务器的安装,以及备份当前数据,配置的步骤和如何恢复备份。 - - -###目录### - - -1.什么是Percona,为什么使用它 -2.备份你的数据库 -3.删除之前的SQL服务器 -4.使用二进制包安装Percona -5.配置Percona -6.保护你的数据 -7.恢复你的备份 +在这篇文章中我们将了解关于 Percona 服务器,一个开源的MySQL,MariaDB的替代品。InnoDB的数据库引擎使得Percona 服务器非常有吸引力,如果你需要的高性能,高可靠性和高性价比的解决方案,它将是一个很好的选择。 +在下文中将介绍在CentOS 7上Percona 服务器的安装,以及备份当前数据,配置的步骤和如何恢复备份。 ### 1.什么是Percona,为什么使用它 ### - -Percona是一个开源简易的MySQL,MariaDB数据库的替代,它是MYSQL的一个分支,相当多的改进和独特的功能使得它比MYSQL更可靠,性能更强,速度更快,它与MYSQL完全兼容,你甚至可以在Oracle的MYSQL与Percona之间使用复制命令。 +Percona是一个MySQL,MariaDB数据库的开源替代品,它是MySQL的一个分支,相当多的改进和独特的功能使得它比MYSQL更可靠,性能更强,速度更快,它与MYSQL完全兼容,你甚至可以在Oracle的MySQL与Percona之间使用复制。 #### 在Percona中独具特色的功能 #### +- 分区适应哈希搜索 +- 快速校验算法 +- 缓冲池预加载 +- 支持FlashCache --分段自适应哈希搜索 --快速校验算法 --缓冲池预加载 --支持FlashCache +#### MySQL企业版和Percona中的特有功能 #### -#### MySQL企业版和Percona的特定功能 #### +- 从不同的服务器导入表 +- PAM认证 +- 审计日志 +- 线程池 --从不同的服务器导入表 --PAM认证 --审计日志 --线程池 - - -现在,你肯定很兴奋地看到这些好的东西整理在一起,我们将告诉你如何安装和做些的Percona Server的基本配置。 +现在,你肯定很兴奋地看到这些好的东西整合在一起,我们将告诉你如何安装和对Percona Server做基本配置。 ### 2. 备份你的数据库 ### - -接下来,在命令行下使用SQL命令创建一个mydatabases.sql文件来重建/恢复salesdb和employeedb数据库,重命名数据库以便反映你的设置,如果没有安装MYSQL跳过此步 +接下来,在命令行下使用SQL命令创建一个mydatabases.sql文件,来重建或恢复salesdb和employeedb数据库,根据你的设置替换数据库名称,如果没有安装MySQL则跳过此步: mysqldump -u root -p --databases employeedb salesdb > mydatabases.sql -复制当前的配置文件,如果你没有安装MYSQL也可跳过 - +复制当前的配置文件,如果你没有安装MYSQL也可跳过: cp my.cnf my.cnf.bkp ### 3.删除之前的SQL服务器 ### - -停止MYSQL/MariaDB如果它们还在运行 - +停止MYSQL/MariaDB,如果它们还在运行: systemctl stop mysql.service -卸载MariaDB和MYSQL - +卸载MariaDB和MYSQL: yum remove MariaDB-server MariaDB-client MariaDB-shared mysql mysql-server -移动重命名在/var/lib/mysql当中的MariaDB文件,这比仅仅只是移除更为安全快速,这就像2级即时备份。:) - +移动重命名放在/var/lib/mysql当中的MariaDB文件。这比仅仅只是移除更为安全快速,这就像2级即时备份。:) mv /var/lib/mysql /var/lib/mysql_mariadb ### 4.使用二进制包安装Percona ### - 你可以在众多Percona安装方法中选择,在CentOS中使用Yum或者RPM包安装通常是更好的主意,所以这些是本文介绍的方式,下载源文件编译后安装在本文中并没有介绍。 +从Yum仓库中安装: -从Yum仓库中安装: - - -首先,你需要设置的Percona的Yum库: - +首先,你需要设置Percona的Yum库: yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm 接下来安装Percona: - yum install Percona-Server-client-56 Percona-Server-server-56 -上面的命令安装Percona的服务器和客户端,共享库,可能需要Perl和Perl模块,以及其他依赖的需要。如DBI::MySQL的,如果这些尚未安装, - -使用RPM包安装: +上面的命令安装Percona的服务器和客户端、共享库,可能需要Perl和Perl模块,以及其他依赖的需要,如DBI::MySQL。如果这些尚未安装,可能需要安装更多的依赖包。 +使用RPM包安装: 我们可以使用wget命令下载所有的rpm包: - - wget -r -l 1 -nd -A rpm -R "*devel*,*debuginfo*" \ http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-5.5.42-37.1/binary/redhat/7/x86_64/ + wget -r -l 1 -nd -A rpm -R "*devel*,*debuginfo*" \ + http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-5.5.42-37.1/binary/redhat/7/x86_64/ 使用rpm工具,一次性安装所有的rpm包: + rpm -ivh Percona-Server-server-55-5.5.42-rel37.1.el7.x86_64.rpm \ + Percona-Server-client-55-5.5.42-rel37.1.el7.x86_64.rpm \ + Percona-Server-shared-55-5.5.42-rel37.1.el7.x86_64.rpm - rpm -ivh Percona-Server-server-55-5.5.42-rel37.1.el7.x86_64.rpm \ Percona-Server-client-55-5.5.42-rel37.1.el7.x86_64.rpm \ Percona-Server-shared-55-5.5.42-rel37.1.el7.x86_64.rpm - -注意在上面命令语句中最后的反斜杠'\',如果您安装单独的软件包,记住要解决依赖关系,在安装客户端之前要先安装共享包,在安装服务器之前请先安装客户端。 +注意在上面命令语句中最后的反斜杠'\'(只是为了换行方便)。如果您安装单独的软件包,记住要解决依赖关系,在安装客户端之前要先安装共享包,在安装服务器之前请先安装客户端。 ### 5.配置Percona服务器 ### - - #### 恢复之前的配置 #### - 当我们从MariaDB迁移过来时,你可以将之前的my.cnf的备份文件恢复回来。 - cp /etc/my.cnf.bkp /etc/my.cnf #### 创建一个新的my.cnf文件 #### - 如果你需要一个适合你需求的新的配置文件或者你并没有备份配置文件,你可以使用以下方法,通过简单的几步生成新的配置文件。 下面是Percona-server软件包自带的my.cnf文件 - # Percona Server template configuration [mysqld] @@ -158,33 +124,29 @@ Percona是一个开源简易的MySQL,MariaDB数据库的替代,它是MYSQL 根据你的需要配置好my.cnf后,就可以启动该服务了: - systemctl restart mysql.service 如果一切顺利的话,它已经准备好执行SQL命令了,你可以用以下命令检查它是否已经正常启动: - mysql -u root -p -e 'SHOW VARIABLES LIKE "version_comment"' 如果你不能够正常启动它,你可以在**/var/log/mysql/mysqld.log**中查找原因,该文件可在my.cnf的[mysql_safe]的log-error中设置。 tail /var/log/mysql/mysqld.log -你也可以在/var/lib/mysql/文件夹下查找格式为[hostname].err的文件,就像下面这个例子样: - +你也可以在/var/lib/mysql/文件夹下查找格式为[主机名].err的文件,就像下面这个例子: tail /var/lib/mysql/centos7.err 如果还是没找出原因,你可以试试strace: - yum install strace && systemctl stop mysql.service && strace -f -f mysqld_safe + 上面的命令挺长的,输出的结果也相对简单,但绝大多数时候你都能找到无法启动的原因。 ### 6.保护你的数据 ### -好了,你的关系数据库管理系统已经准备好接收SQL查询,但是把你宝贵的数据放在没有最起码安全保护的服务器上并不可取,为了更为安全最好使用mysql_secure_instalation,这个工具可以帮助删除未使用的默认功能,还设置root的密码,并限制使用此用户进行访问。 -只需要在shell中执行,并参照屏幕上的说明。 +好了,你的关系数据库管理系统已经准备好接收SQL查询,但是把你宝贵的数据放在没有最起码安全保护的服务器上并不可取,为了更为安全最好使用mysql_secure_install来安装,这个工具可以帮助你删除未使用的默认功能,并设置root的密码,限制使用此用户进行访问。只需要在shell中执行该命令,并参照屏幕上的说明操作。 mysql_secure_install @@ -192,28 +154,27 @@ Percona是一个开源简易的MySQL,MariaDB数据库的替代,它是MYSQL 如果您参照之前的设置,现在你可以恢复数据库,只需再用mysqldump一次。 - mysqldump -u root -p < mydatabases.sql -恭喜你,你刚刚已经在你的CentOS上成功安装了Percona,你的服务器已经可以正式投入使用;你可以像使用MYSQL一样使用它,你的服务器与他完全兼容。 + +恭喜你,你刚刚已经在你的CentOS上成功安装了Percona,你的服务器已经可以正式投入使用;你可以像使用MySQL一样使用它,你的服务器与它完全兼容。 ### 总结 ### -为了获得更强的性能你需要对配置文件做大量的修改,但这里也有一些简单的选项来提高机器的性能。当使用InnoDB引擎时,将innodb_file_per_table设置为on,它将在一个文件中为每个表创建索引表,这意味着每个表都有它自己的索引文件,它使系统更强大和更容易维修。 +为了获得更强的性能你需要对配置文件做大量的修改,但这里也有一些简单的选项来提高机器的性能。当使用InnoDB引擎时,将innodb_file_per_table设置为on,它将在一个文件中为每个表创建索引表,这意味着每个表都有它自己的索引文件,它使系统更强大和更容易维修。 可以修改innodb_buffer_pool_size选项,InnoDB应该有足够的缓存池来应对你的数据集,大小应该为当前可用内存的70%到80%。 -过将innodb-flush-method设置为O_DIRECT,关闭写入高速缓存,如果你使用了RAID,这可以提升性能因为在底层已经完成了缓存操作。 +将innodb-flush-method设置为O_DIRECT,关闭写入高速缓存,如果你使用了RAID,这可以提升性能,因为在底层已经完成了缓存操作。 如果你的数据并不是十分关键并且并不需要对数据库事务正确执行的四个基本要素完全兼容,可以将innodb_flush_log_at_trx_commit设置为2,这也能提升系统的性能。 - -------------------------------------------------------------------------------- via: http://linoxide.com/linux-how-to/percona-server-centos-7/ 作者:[Carlos Alberto][a] 译者:[FatJoe123](https://github.com/FatJoe123) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From e654fc4b1eb94f7054078f4f344456f3b4bd37df Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 22 Jun 2015 21:08:35 +0800 Subject: [PATCH 1243/2517] translated --- ...PHP or PhpMyAdmin in RHEL or CentOS 7.0.md | 105 +++++++++--------- 1 file changed, 52 insertions(+), 53 deletions(-) rename {sources => translated}/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md (52%) diff --git a/sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md b/translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md similarity index 52% rename from sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md rename to translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md index a45e83d365..5057c2e416 100644 --- a/sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md +++ b/translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md @@ -1,66 +1,64 @@ -translating----geekpi - -Installing LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin) in RHEL/CentOS 7.0 +在RHEL/CentOS 7.0中安装LAMP(Linux、 Apache、 MariaDB、 PHP/PhpMyAdmin) ================================================================================ -Skipping the LAMP introduction, as I’m sure that most of you know what is all about. This tutorial will concentrate on how to install and configure famous LAMP stack – Linux Apache, MariaDB, PHP, PhpMyAdmin – on the last release of Red Hat Enterprise Linux 7.0 and CentOS 7.0, with the mention that both distributions have upgraded httpd daemon to Apache HTTP 2.4. +跳过LAMP的介绍因为我认为你们大多数已经知道了。这个教程会集中在如何在升级到Apache 2.4的 Red Hat Enterprise Linux 7.0 和 CentOS 7.0中安装和配置LAMP-Linux Apache、 MariaDB、 PHP、PhpMyAdmin。 ![Install LAMP in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-LAMP-in-CentOS-7.jpg) -Install LAMP in RHEL/CentOS 7.0 +在RHEL/CentOS 7.0中安装LAMP -#### Requirements #### +#### 要求 #### -Depending on the used distribution, RHEL or CentOS 7.0, use the following links to perform a minimal system installation, using a static IP Address for network configuration. +根据使用的发行版,RHEL 或者 CentOS 7.0使用下面的链接来执行最小的系统安装,网络使用静态ip -**For RHEL 7.0** +**对于RHEL 7.0** -- [RHEL 7.0 Installation Procedure][1] -- [Register and Enable Subscriptions/Repositories on RHEL 7.0][2] +- [RHEL 7.0安装过程][1] +- [在RHEL 7.0中注册和启用订阅仓库][2] -**For CentOS 7.0** +**对于 CentOS 7.0** -- [CentOS 7.0 Installation Procedure][3] +- [CentOS 7.0 安装过程][3] -### Step 1: Install Apache Server with Basic Configurations ### +### 第一步: 使用基本配置安装apache ### -**1. After performing a minimal system installation and configure your server network interface with a [Static IP Address on RHEL/CentOS 7.0][4], go ahead and install Apache 2.4 httpd service binary package provided form official repositories using the following command.** +**1. 在执行最小系统安装并配置[在RHEL/CentOS 7.0中配置静态ip][4]**就可以从使用下面的命令从官方仓库安装最新的Apache 2.4 httpd服务。 # yum install httpd ![Install Apache in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Apache-in-CentOS-7.png) -Install Apache Web Server +安装apache服务 -**2. After yum manager finish installation, use the following commands to manage Apache daemon, since RHEL and CentOS 7.0 both migrated their init scripts from SysV to systemd – you can also use SysV and Apache scripts the same time to manage the service.** +**2. 安装安城后,使用下面的命令来管理apache守护进程,因为RHEL and CentOS 7.0都将init脚本从SysV升级到了systemd - 你也可以同事使用SysV和Apache脚本来管理服务。** # systemctl status|start|stop|restart|reload httpd - OR + 或者 # service httpd status|start|stop|restart|reload - OR + 或者 # apachectl configtest| graceful ![Start Apache in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Start-Apache-in-CentOS-7.png) -Start Apache Web Server +启动apache服务 -**3. On the next step start Apache service using systemd init script and open RHEL/CentOS 7.0 Firewall rules using firewall-cmd, which is the default command to manage iptables through firewalld daemon.** +**3. 下一步使用systemd初始化脚本来启动apache服务并用firewall-cmd打开RHEL/CentOS 7.0防火墙规则, 这是通过firewalld守护进程管理iptables的默认命令。** # firewall-cmd --add-service=http -**NOTE**: Make notice that using this rule will lose its effect after a system reboot or firewalld service restart, because it opens on-fly rules, which are not applied permanently. To apply consistency iptables rules on firewall use –permanent option and restart firewalld service to take effect. +**注意**:上面的命令会在系统重启或者firewalld服务重启后失效,因为它是即时的规则,它不会永久生效。要使iptables规则在fiewwall中持久化,使用-permanent选项并重启firewalld服务来生效。 # firewall-cmd --permanent --add-service=http # systemctl restart firewalld ![Enable Firewall in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-Firewall-in-CentOS-7.png) -Enable Firewall in CentOS 7 +在CentOS 7中启用Firewall -Other important Firewalld options are presented below: +下面是firewalld其他的重要选项: # firewall-cmd --state # firewall-cmd --list-all @@ -69,37 +67,38 @@ Other important Firewalld options are presented below: # firewall-cmd --query-service service_name # firewall-cmd --add-port=8080/tcp -**4. To verify Apache functionality open a remote browser and type your server IP Address using HTTP protocol on URL (http://server_IP), and a default page should appear like in the screenshot below.** +**4. 要验证apache的功能,打开一个远程浏览器并使用http协议输入你服务器的ip地址(http://server_IP), 应该会显示下图中的默认页面。** ![Apache Default Page](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Default-Page.png) -Apache Default Page +Apache默认页 -**5. For now, Apache DocumentRoot path it’s set to /var/www/html system path, which by default doesn’t provide any index file. If you want to see a directory list of your DocumentRoot path open Apache welcome configuration file and set Indexes statement from – to + on directive, using the below screenshot as an example.** +**5. 现在apache的根地址在/var/www/html,该目录中没有提供任何index文件。如果你想要看见根目录下的文件夹列表,打开apache欢迎配置文件并设置 下Indexes前的状态从-到+,下面的截图就是一个例子。** # nano /etc/httpd/conf.d/welcome.conf ![Apache Directory Listing](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Directory-Listing.png) -Apache Directory Listing +Apache目录列出 -**6. Close the file, restart Apache service to reflect changes and reload your browser page to see the final result.** +**6. 关闭文件,重启apache服务来使设置生效,重载页面来看最终效果。** # systemctl restart httpd ![Apache Index File](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Index-File.png) -Apache Index File +Apache Index 文件 -### Step 2: Install PHP5 Support for Apache ### +### 第二步: 为Apache安装php5支持 ### -**7. Before installing PHP5 dynamic language support for Apache, get a full list of available PHP modules and extensions using the following command.** + +**7. 在为apache安装php支持之前,使用下面的命令的得到所有可用的php模块和扩展。** # yum search php ![Install PHP in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-PHP-in-CentOS-7.png) -Install PHP in CentOS 7 +在 **8. Depending on what type of applications you want to use, install the required PHP modules from the above list, but for a basic MariaDB support in PHP and PhpMyAdmin you need to install the following modules.** @@ -142,22 +141,22 @@ Set Timezone in PHP ![Install MariaDB in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-MariaDB-in-CentOs-7.png) -Install MariaDB in CentOS 7 +在CentOS 7中安装PHP -**12. After MariaDB package is installed, start database daemon and use mysql_secure_installation script to secure database (set root password, disable remotely logon from root, remove test database and remove anonymous users).** +***12. 安装MariaDB后,开启数据库守护进程并使用mysql_secure_installation脚本来保护数据库(设置root密码、禁止远程root登录、移除测试数据库、移除匿名用户)** # systemctl start mariadb # mysql_secure_installation ![Start MariaDB Database](http://www.tecmint.com/wp-content/uploads/2014/07/Start-MariaDB-in-CentOS-7.png) -Start MariaDB Database +启动MariaDB数据库 ![Secure MySQL Installation](http://www.tecmint.com/wp-content/uploads/2014/07/Secure-MySQL-Installation.png) -Secure MySQL Installation +MySQL安全设置 -**13. To test database functionality login to MariaDB using its root account and exit using quit statement.** +**13. 要测试数据库功能,使用root账户登录MariaDB并用quit退出。** mysql -u root -p MariaDB > SHOW VARIABLES; @@ -165,27 +164,27 @@ Secure MySQL Installation ![Connect MySQL Database in CentOS](http://www.tecmint.com/wp-content/uploads/2014/07/Connect-MySQL-Installation.png) -Connect MySQL Database +连接MySQL数据库 -### Step 4: Install PhpMyAdmin ### +### 第四步: 安装PhpMyAdmin ### -**14. By default official RHEL 7.0 or CentOS 7.0 repositories doesn’t provide any binary package for PhpMyAdmin Web Interface. If you are uncomfortable using MySQL command line to manage your database you can install PhpMyAdmin package by enabling CentOS 7.0 rpmforge repositories using the following command.** +**14. RHEL 7.0 或者 CentOS 7.0仓库默认没有提供PhpMyAdmin二进制安装包。如果你不适应使用MySQL命令行来管理你的数据库,你可以通过下面的命令启用CentOS 7.0 rpmforge仓库来安装PhpMyAdmin。** # yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm -After enabling rpmforge repository, next install PhpMyAdmin. +启用rpmforge仓库后,下面安装PhpMyAdmin。 # yum install phpmyadmin ![Enable RPMForge in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-RPMForge-in-CentOS-7.png) -Enable RPMForge Repository +启用RPMForge仓库 -**15. Next configure PhpMyAdmin to allow connections from remote hosts by editing phpmyadmin.conf file, located on Apache conf.d directory, commenting the following lines.** +**15. 下面配置PhpMyAdmin的phpmyadmin.conf来允许远程连接,它位于Apache conf.d目录下,并注释掉下面的行。** # nano /etc/httpd/conf.d/phpmyadmin.conf -Use a # and comment this lines. +使用#来注释掉行。 # Order Deny,Allow # Deny from all @@ -193,40 +192,40 @@ Use a # and comment this lines. ![Allow Remote PhpMyAdmin Access](http://www.tecmint.com/wp-content/uploads/2014/07/Allow-Remote-PhpMyAdmin-Access.png) -Allow Remote PhpMyAdmin Access +允许远程PhpMyAdmin访问 -**16. To be able to login to PhpMyAdmin Web interface using cookie authentication method add a blowfish string to phpmyadmin config.inc.php file like in the screenshot below using the [generate a secret string][6], restart Apache Web service and direct your browser to the URL address http://server_IP/phpmyadmin/.** +**16. 要使用cookie验证来登录PhpMyAdmin,像下面的截图那样使用[生成字符串][6]添加一个blowfish字符串到config.inc.php文件下,重启apache服务并打开URL:http://server_IP/phpmyadmin/。** # nano /etc/httpd/conf.d/phpmyadmin.conf # systemctl restart httpd ![Add Blowfish in PhpMyAdmin](http://www.tecmint.com/wp-content/uploads/2014/07/Add-Blowfish-PhpMyAdmin.png) -Add Blowfish in PhpMyAdmin +在PhpMyAdmin中添加Blowfish ![PhpMyAdmin Dashboard](http://www.tecmint.com/wp-content/uploads/2014/07/Login-to-PhpMyAdmin.png) -PhpMyAdmin Dashboard +PhpMyAdmin面板 -### Step 5: Enable LAMP System-wide ### +### 第五步: 系统范围启用LAMP ### -**17. If you need MariaDB and Apache services to be automatically started after reboot issue the following commands to enable them system-wide.** +**17. 如果你需要在重启后自动运行MariaDB和Apache服务,你需要系统级地启用它们。** # systemctl enable mariadb # systemctl enable httpd ![Enable Services System Wide](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-Services-System-Wide.png) -Enable Services System Wide +系统级启用服务 -That’s all it takes for a basic LAMP installation on Red Hat Enterprise 7.0 or CentOS 7.0. The next series of articles related to LAMP stack on CentOS/RHEL 7.0 will discuss how to create Virtual Hosts, generate SSL Certificates and Keys and add SSL transaction support for Apache HTTP Server. +这就是在Red Hat Enterprise 7.0或者CentOS 7.0中安装LAMP的过程。CentOS/RHEL 7.0上关于LAMP洗系列文章将会讨论在Apache中创建虚拟主机,生成SSL证书、密钥和添加SSL事物支持。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/install-lamp-in-centos-7/ 作者:[Matei Cezar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From d992f0cc83b259af25b4e9342e78515c9578b9b7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 22 Jun 2015 21:17:28 +0800 Subject: [PATCH 1244/2517] translated --- ...PHP or PhpMyAdmin in RHEL or CentOS 7.0.md | 105 +++++++++--------- 1 file changed, 52 insertions(+), 53 deletions(-) rename {sources => translated}/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md (52%) diff --git a/sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md b/translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md similarity index 52% rename from sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md rename to translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md index a45e83d365..5057c2e416 100644 --- a/sources/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md +++ b/translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md @@ -1,66 +1,64 @@ -translating----geekpi - -Installing LAMP (Linux, Apache, MariaDB, PHP/PhpMyAdmin) in RHEL/CentOS 7.0 +在RHEL/CentOS 7.0中安装LAMP(Linux、 Apache、 MariaDB、 PHP/PhpMyAdmin) ================================================================================ -Skipping the LAMP introduction, as I’m sure that most of you know what is all about. This tutorial will concentrate on how to install and configure famous LAMP stack – Linux Apache, MariaDB, PHP, PhpMyAdmin – on the last release of Red Hat Enterprise Linux 7.0 and CentOS 7.0, with the mention that both distributions have upgraded httpd daemon to Apache HTTP 2.4. +跳过LAMP的介绍因为我认为你们大多数已经知道了。这个教程会集中在如何在升级到Apache 2.4的 Red Hat Enterprise Linux 7.0 和 CentOS 7.0中安装和配置LAMP-Linux Apache、 MariaDB、 PHP、PhpMyAdmin。 ![Install LAMP in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-LAMP-in-CentOS-7.jpg) -Install LAMP in RHEL/CentOS 7.0 +在RHEL/CentOS 7.0中安装LAMP -#### Requirements #### +#### 要求 #### -Depending on the used distribution, RHEL or CentOS 7.0, use the following links to perform a minimal system installation, using a static IP Address for network configuration. +根据使用的发行版,RHEL 或者 CentOS 7.0使用下面的链接来执行最小的系统安装,网络使用静态ip -**For RHEL 7.0** +**对于RHEL 7.0** -- [RHEL 7.0 Installation Procedure][1] -- [Register and Enable Subscriptions/Repositories on RHEL 7.0][2] +- [RHEL 7.0安装过程][1] +- [在RHEL 7.0中注册和启用订阅仓库][2] -**For CentOS 7.0** +**对于 CentOS 7.0** -- [CentOS 7.0 Installation Procedure][3] +- [CentOS 7.0 安装过程][3] -### Step 1: Install Apache Server with Basic Configurations ### +### 第一步: 使用基本配置安装apache ### -**1. After performing a minimal system installation and configure your server network interface with a [Static IP Address on RHEL/CentOS 7.0][4], go ahead and install Apache 2.4 httpd service binary package provided form official repositories using the following command.** +**1. 在执行最小系统安装并配置[在RHEL/CentOS 7.0中配置静态ip][4]**就可以从使用下面的命令从官方仓库安装最新的Apache 2.4 httpd服务。 # yum install httpd ![Install Apache in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Apache-in-CentOS-7.png) -Install Apache Web Server +安装apache服务 -**2. After yum manager finish installation, use the following commands to manage Apache daemon, since RHEL and CentOS 7.0 both migrated their init scripts from SysV to systemd – you can also use SysV and Apache scripts the same time to manage the service.** +**2. 安装安城后,使用下面的命令来管理apache守护进程,因为RHEL and CentOS 7.0都将init脚本从SysV升级到了systemd - 你也可以同事使用SysV和Apache脚本来管理服务。** # systemctl status|start|stop|restart|reload httpd - OR + 或者 # service httpd status|start|stop|restart|reload - OR + 或者 # apachectl configtest| graceful ![Start Apache in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Start-Apache-in-CentOS-7.png) -Start Apache Web Server +启动apache服务 -**3. On the next step start Apache service using systemd init script and open RHEL/CentOS 7.0 Firewall rules using firewall-cmd, which is the default command to manage iptables through firewalld daemon.** +**3. 下一步使用systemd初始化脚本来启动apache服务并用firewall-cmd打开RHEL/CentOS 7.0防火墙规则, 这是通过firewalld守护进程管理iptables的默认命令。** # firewall-cmd --add-service=http -**NOTE**: Make notice that using this rule will lose its effect after a system reboot or firewalld service restart, because it opens on-fly rules, which are not applied permanently. To apply consistency iptables rules on firewall use –permanent option and restart firewalld service to take effect. +**注意**:上面的命令会在系统重启或者firewalld服务重启后失效,因为它是即时的规则,它不会永久生效。要使iptables规则在fiewwall中持久化,使用-permanent选项并重启firewalld服务来生效。 # firewall-cmd --permanent --add-service=http # systemctl restart firewalld ![Enable Firewall in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-Firewall-in-CentOS-7.png) -Enable Firewall in CentOS 7 +在CentOS 7中启用Firewall -Other important Firewalld options are presented below: +下面是firewalld其他的重要选项: # firewall-cmd --state # firewall-cmd --list-all @@ -69,37 +67,38 @@ Other important Firewalld options are presented below: # firewall-cmd --query-service service_name # firewall-cmd --add-port=8080/tcp -**4. To verify Apache functionality open a remote browser and type your server IP Address using HTTP protocol on URL (http://server_IP), and a default page should appear like in the screenshot below.** +**4. 要验证apache的功能,打开一个远程浏览器并使用http协议输入你服务器的ip地址(http://server_IP), 应该会显示下图中的默认页面。** ![Apache Default Page](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Default-Page.png) -Apache Default Page +Apache默认页 -**5. For now, Apache DocumentRoot path it’s set to /var/www/html system path, which by default doesn’t provide any index file. If you want to see a directory list of your DocumentRoot path open Apache welcome configuration file and set Indexes statement from – to + on directive, using the below screenshot as an example.** +**5. 现在apache的根地址在/var/www/html,该目录中没有提供任何index文件。如果你想要看见根目录下的文件夹列表,打开apache欢迎配置文件并设置 下Indexes前的状态从-到+,下面的截图就是一个例子。** # nano /etc/httpd/conf.d/welcome.conf ![Apache Directory Listing](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Directory-Listing.png) -Apache Directory Listing +Apache目录列出 -**6. Close the file, restart Apache service to reflect changes and reload your browser page to see the final result.** +**6. 关闭文件,重启apache服务来使设置生效,重载页面来看最终效果。** # systemctl restart httpd ![Apache Index File](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Index-File.png) -Apache Index File +Apache Index 文件 -### Step 2: Install PHP5 Support for Apache ### +### 第二步: 为Apache安装php5支持 ### -**7. Before installing PHP5 dynamic language support for Apache, get a full list of available PHP modules and extensions using the following command.** + +**7. 在为apache安装php支持之前,使用下面的命令的得到所有可用的php模块和扩展。** # yum search php ![Install PHP in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-PHP-in-CentOS-7.png) -Install PHP in CentOS 7 +在 **8. Depending on what type of applications you want to use, install the required PHP modules from the above list, but for a basic MariaDB support in PHP and PhpMyAdmin you need to install the following modules.** @@ -142,22 +141,22 @@ Set Timezone in PHP ![Install MariaDB in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-MariaDB-in-CentOs-7.png) -Install MariaDB in CentOS 7 +在CentOS 7中安装PHP -**12. After MariaDB package is installed, start database daemon and use mysql_secure_installation script to secure database (set root password, disable remotely logon from root, remove test database and remove anonymous users).** +***12. 安装MariaDB后,开启数据库守护进程并使用mysql_secure_installation脚本来保护数据库(设置root密码、禁止远程root登录、移除测试数据库、移除匿名用户)** # systemctl start mariadb # mysql_secure_installation ![Start MariaDB Database](http://www.tecmint.com/wp-content/uploads/2014/07/Start-MariaDB-in-CentOS-7.png) -Start MariaDB Database +启动MariaDB数据库 ![Secure MySQL Installation](http://www.tecmint.com/wp-content/uploads/2014/07/Secure-MySQL-Installation.png) -Secure MySQL Installation +MySQL安全设置 -**13. To test database functionality login to MariaDB using its root account and exit using quit statement.** +**13. 要测试数据库功能,使用root账户登录MariaDB并用quit退出。** mysql -u root -p MariaDB > SHOW VARIABLES; @@ -165,27 +164,27 @@ Secure MySQL Installation ![Connect MySQL Database in CentOS](http://www.tecmint.com/wp-content/uploads/2014/07/Connect-MySQL-Installation.png) -Connect MySQL Database +连接MySQL数据库 -### Step 4: Install PhpMyAdmin ### +### 第四步: 安装PhpMyAdmin ### -**14. By default official RHEL 7.0 or CentOS 7.0 repositories doesn’t provide any binary package for PhpMyAdmin Web Interface. If you are uncomfortable using MySQL command line to manage your database you can install PhpMyAdmin package by enabling CentOS 7.0 rpmforge repositories using the following command.** +**14. RHEL 7.0 或者 CentOS 7.0仓库默认没有提供PhpMyAdmin二进制安装包。如果你不适应使用MySQL命令行来管理你的数据库,你可以通过下面的命令启用CentOS 7.0 rpmforge仓库来安装PhpMyAdmin。** # yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm -After enabling rpmforge repository, next install PhpMyAdmin. +启用rpmforge仓库后,下面安装PhpMyAdmin。 # yum install phpmyadmin ![Enable RPMForge in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-RPMForge-in-CentOS-7.png) -Enable RPMForge Repository +启用RPMForge仓库 -**15. Next configure PhpMyAdmin to allow connections from remote hosts by editing phpmyadmin.conf file, located on Apache conf.d directory, commenting the following lines.** +**15. 下面配置PhpMyAdmin的phpmyadmin.conf来允许远程连接,它位于Apache conf.d目录下,并注释掉下面的行。** # nano /etc/httpd/conf.d/phpmyadmin.conf -Use a # and comment this lines. +使用#来注释掉行。 # Order Deny,Allow # Deny from all @@ -193,40 +192,40 @@ Use a # and comment this lines. ![Allow Remote PhpMyAdmin Access](http://www.tecmint.com/wp-content/uploads/2014/07/Allow-Remote-PhpMyAdmin-Access.png) -Allow Remote PhpMyAdmin Access +允许远程PhpMyAdmin访问 -**16. To be able to login to PhpMyAdmin Web interface using cookie authentication method add a blowfish string to phpmyadmin config.inc.php file like in the screenshot below using the [generate a secret string][6], restart Apache Web service and direct your browser to the URL address http://server_IP/phpmyadmin/.** +**16. 要使用cookie验证来登录PhpMyAdmin,像下面的截图那样使用[生成字符串][6]添加一个blowfish字符串到config.inc.php文件下,重启apache服务并打开URL:http://server_IP/phpmyadmin/。** # nano /etc/httpd/conf.d/phpmyadmin.conf # systemctl restart httpd ![Add Blowfish in PhpMyAdmin](http://www.tecmint.com/wp-content/uploads/2014/07/Add-Blowfish-PhpMyAdmin.png) -Add Blowfish in PhpMyAdmin +在PhpMyAdmin中添加Blowfish ![PhpMyAdmin Dashboard](http://www.tecmint.com/wp-content/uploads/2014/07/Login-to-PhpMyAdmin.png) -PhpMyAdmin Dashboard +PhpMyAdmin面板 -### Step 5: Enable LAMP System-wide ### +### 第五步: 系统范围启用LAMP ### -**17. If you need MariaDB and Apache services to be automatically started after reboot issue the following commands to enable them system-wide.** +**17. 如果你需要在重启后自动运行MariaDB和Apache服务,你需要系统级地启用它们。** # systemctl enable mariadb # systemctl enable httpd ![Enable Services System Wide](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-Services-System-Wide.png) -Enable Services System Wide +系统级启用服务 -That’s all it takes for a basic LAMP installation on Red Hat Enterprise 7.0 or CentOS 7.0. The next series of articles related to LAMP stack on CentOS/RHEL 7.0 will discuss how to create Virtual Hosts, generate SSL Certificates and Keys and add SSL transaction support for Apache HTTP Server. +这就是在Red Hat Enterprise 7.0或者CentOS 7.0中安装LAMP的过程。CentOS/RHEL 7.0上关于LAMP洗系列文章将会讨论在Apache中创建虚拟主机,生成SSL证书、密钥和添加SSL事物支持。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/install-lamp-in-centos-7/ 作者:[Matei Cezar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 27ba5c0e8fc95c62e09b5d2913c64c7595a98de9 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 22 Jun 2015 22:58:18 +0800 Subject: [PATCH 1245/2517] PUB:20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop @ictlyh --- ...ings from the command line on Ubuntu desktop.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md (79%) diff --git a/translated/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md b/published/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md similarity index 79% rename from translated/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md rename to published/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md index 526de3549e..377a9a0399 100644 --- a/translated/tech/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md +++ b/published/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md @@ -1,14 +1,14 @@ -Linux 有问必答--如何在桌面版 Ubuntu 中用命令行更改系统代理设置 +Linux 有问必答:如何在桌面版 Ubuntu 中用命令行更改系统代理设置 ================================================================================ -> **问题**: 我经常需要在桌面版 Ubuntu 中更改系统代理设置,但我不想通过繁琐的 GUI 菜单链:"系统设置" -> "网络" -> "网络代理"。在命令行中有更方便的方法更改桌面版的代理设置吗? +> **问题**: 我经常需要在桌面版 Ubuntu 中更改系统代理设置,但我不想通过繁琐的 GUI 菜单点击:"系统设置" -> "网络" -> "网络代理"。在命令行中有更方便的方法更改桌面版的代理设置吗? -在桌面版 Ubuntu 中,它的桌面环境设置,包括系统代理设置,都存储在 DConf 数据库,这是简单的键值对存储。如果你想通过系统设置菜单修改桌面属性,更改会持久保存在后端的 DConf 数据库。在 Ubuntu 中更改 DConf 数据库有基于图像用户界面和非图形用户界面的两种方式。系统设置或者 dconf-editor 是访问 DConf 数据库的图形方法,而 gsettings 或 dconf 就是能更改数据库的命令行工具。 +在桌面版 Ubuntu 中,它的桌面环境设置,包括系统代理设置,都存储在 DConf 数据库,这是简单的键值对存储。如果你想通过系统设置菜单修改桌面属性,更改会持久保存在后端的 DConf 数据库。在 Ubuntu 中更改 DConf 数据库有基于图像用户界面和非图形用户界面的两种方式。系统设置或者 `dconf-editor` 是访问 DConf 数据库的图形方法,而 `gsettings` 或 `dconf` 就是能更改数据库的命令行工具。 -下面介绍如何用 gsettings 从命令行更改系统代理设置。 +下面介绍如何用 `gsettings` 从命令行更改系统代理设置。 ![](https://farm6.staticflickr.com/5460/17872782271_68e5267a4a_c.jpg) -gsetting 读写特定 Dconf 设置的基本用法如下: +`gsettings` 读写特定 Dconf 设置的基本用法如下: 更改 DConf 设置: @@ -53,7 +53,7 @@ gsetting 读写特定 Dconf 设置的基本用法如下: ### 在命令行中清除系统代理设置 ### -最后,清除所有 手动/自动 代理设置,还原为无代理设置: +最后,清除所有“手动/自动”代理设置,还原为无代理设置: $ gsettings set org.gnome.system.proxy mode 'none' @@ -63,7 +63,7 @@ via: http://ask.xmodulo.com/change-system-proxy-settings-command-line-ubuntu-des 作者:[Dan Nanni][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 72d8715d0a6b5a07c3cdb9cac7e8c794c68fce52 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 22 Jun 2015 23:29:34 +0800 Subject: [PATCH 1246/2517] PUB:20150528 11 pointless but awesome Linux terminal tricks @goreliu --- ...tless but awesome Linux terminal tricks.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150528 11 pointless but awesome Linux terminal tricks.md (84%) diff --git a/translated/tech/20150528 11 pointless but awesome Linux terminal tricks.md b/published/20150528 11 pointless but awesome Linux terminal tricks.md similarity index 84% rename from translated/tech/20150528 11 pointless but awesome Linux terminal tricks.md rename to published/20150528 11 pointless but awesome Linux terminal tricks.md index e4a33cf48a..1fc526db5e 100644 --- a/translated/tech/20150528 11 pointless but awesome Linux terminal tricks.md +++ b/published/20150528 11 pointless but awesome Linux terminal tricks.md @@ -1,6 +1,6 @@ -11个让人惊叹的Linux终端彩蛋 +11个无用而有趣的Linux终端彩蛋 ================================================================================ -这里有一些很酷的Linux终端彩蛋,其中的每一个看上去并没有实际用途,但很精彩。 +这里有一些很酷的Linux终端彩蛋,其中的每一个看上去并没有实际用途,但很有趣。 ![](http://images.techhive.com/images/article/2015/05/slide_01-100587352-orig.png) @@ -8,7 +8,7 @@ 当我们使用命令行工作时,Linux是功能和实用性最好的操作系统之一。想要执行一个特殊任务?可能一个程序或者脚本就可以帮你搞定。但就像一本书中说到的,只工作不玩耍聪明的孩子也会变傻。下边是我最喜欢的可以在终端做的没有实际用途的、傻傻的、恼人的、可笑的事情。 -### 给终端一个态度 ### +### 让终端成为一个有态度的人 ### * 第一步)敲入`sudo visudo` * 第二步)在“Defaults”末尾(文件的前半部分)添加一行“Defaults insults”。 @@ -20,13 +20,13 @@ ### apt-get moo ### -你看过这张截图?那就是运行`apt-get moo`(在基于Debian的系统)的结果。对,就是它了。不要对它抱太多幻想,你会失望的,我不骗你。但是这是Linux世界最被人熟知的彩蛋之一。所以我把它包含进来,并且放在前排,然后我也就不会收到5千封邮件,指责我把它遗漏了。 - ![](http://images.techhive.com/images/article/2015/05/slide_03-100587354-orig.png) + +你看过这张截图?那就是运行`apt-get moo`(在基于Debian的系统)的结果。对,就是它了。不要对它抱太多幻想,你会失望的,我不骗你。但是这是Linux世界最被人熟知的彩蛋之一。所以我把它包含进来,并且放在前排,然后我也就不会收到5千封邮件,指责我把它遗漏了。 ### aptitude moo ### -更有趣的是将moo应用到aptitude上。敲入`aptitude moo`(在Ubuntu及其衍生版),你对`moo`可以做什么事情的看法会有所变化。你还还会知道更多事情,尝试重新输入这条命令,但这次添加一个`-v`参数。这还没有结束,试着添加更多`v`,一次添加一个,直到aptitude给了你想要的东西。 +更有趣的是将moo应用到aptitude上。敲入`aptitude moo`(在Ubuntu及其衍生版),你对`moo`可以做什么事情的看法会有所变化。你还还会知道更多事情,尝试重新输入这条命令,但这次添加一个`-v`参数。这还没有结束,试着添加更多`v`,一次添加一个,直到抓狂的aptitude给了你想要的东西。 ![](http://images.techhive.com/images/article/2015/05/slide_04-100587355-orig.png) @@ -38,25 +38,25 @@ * 第二步)在“# Misc options”部分,去掉“Color”前的“#”。 * 第三步)添加“ILoveCandy”。 -现在我们使用pacman安装新软件包时,进度条里会出现一个小吃豆人。真应该默认就是这样的。 +现在我们使用pacman安装新软件包时,进度条里会出现一个小吃豆人。真应该默认就这样的。 ![](http://images.techhive.com/images/article/2015/05/slide_05-100587356-orig.png) ### Cowsay! ### -`aptitude moo`的输出格式很漂亮,但我想你苦于不能自由自在地使用。输入`cowsay`,它会做到你想做的事情。你可以让牛说任何你喜欢的东西。而且不只可以用牛,还可以用Calvin、Beavis和Ghostbusters的ASCII logo——输入`cowsay -l`可以得到所有可用的logo。它是Linux世界的强大工具。像很多其他命令一样,你可以使用管道把其他程序的输出输送给它,比如`fortune | cowsay`。 +`aptitude moo`的输出格式很漂亮,但我想你苦于不能自由自在地使用。输入`cowsay`,它会做到你想做的事情。你可以让牛说任何你喜欢的东西。而且不只可以用牛,还可以用Calvin、Beavis和Ghostbusters logo的ASCII的艺术,输入`cowsay -l`可以得到所有可用的参数。它是Linux世界的强大工具。像很多其他命令一样,你可以使用管道把其他程序的输出输送给它,比如`fortune | cowsay`,让这头牛变成哲学家。 ![](http://images.techhive.com/images/article/2015/05/slide_06-100587358-orig.png) ### 变成3l33t h@x0r ### -`nmap`并不是我们平时经常使用的基本命令。但如果你想蹂躏`nmap`的话,可能想在它的输出中看到l33t。在任何`nmap`命令(比如`nmap -oS - google.com`)后添加`-oS`。现在你的`nmap`已经处于官方名称是“[Script Kiddie Mode][1]”的模式了。Angelina Jolie和Keanu Reeves会为此骄傲的。 +`nmap`并不是我们平时经常使用的基本命令。但如果你想蹂躏`nmap`的话,比如像人一样看起来像l33t。在任何`nmap`命令后添加`-oS`(比如`nmap -oS - google.com`)。现在你的`nmap`已经处于标准叫法是“[脚本玩具模式][1]”的模式了。Angelina Jolie和Keanu Reeves会为此骄傲的。 ![](http://images.techhive.com/images/article/2015/05/slide_07-100587359-orig.png) ### 获得所有的Discordian日期 ### -如果你们曾经坐在一起思考,“嗨!我想使用无用但异想天开的方式来书写今天的日期……”试试运行`ddate`。结果类似于“Today is Setting Orange, the 72nd day of Discord in the YOLD 3181”,这会让你的服务树日志平添不少香料。 +如果你们曾经坐在一起思考,“嗨!我想使用无用但异想天开的方式来书写今天的日期……”试试运行`ddate`。结果类似于“Today is Setting Orange, the 72nd day of Discord in the YOLD 3181”,这会让你的服务树日志平添不少趣味。 注意:在技术层面,确实有一个[Discordian Calendar][2],理论上被[Discordianism][3]追随者所使用。这意味着我可能得罪某些人。或者不会,我不确定。不管怎样,`ddate`是一个方便的工具。 @@ -76,7 +76,7 @@ ### 将任何文本逆序输出 ### -将任何文本使用管道输送给`rev`命令,它就会将文本内容逆序输出。`fortune | rev`会给你好运。当然,这不意味着rev会将幸运转换成不幸。 +将任何文本使用管道输送给`rev`命令,它就会将文本内容逆序输出。`fortune | rev`会给你好运。当然,这不意味着rev会将幸运(fortune)转换成不幸。 ![](http://images.techhive.com/images/article/2015/05/slide_11-100587364-orig.png) @@ -94,7 +94,7 @@ via: http://www.networkworld.com/article/2926630/linux/11-pointless-but-awesome- 作者:[Bryan Lunduke][a] 译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 14c4407568049f0b5754e8cf18c4e163dd243580 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 23 Jun 2015 09:37:35 +0800 Subject: [PATCH 1247/2517] [Translated]20150617 The Art of Command Line.md --- .../tech/20150617 The Art of Command Line.md | 436 ------------------ .../tech/20150617 The Art of Command Line.md | 431 +++++++++++++++++ 2 files changed, 431 insertions(+), 436 deletions(-) delete mode 100644 sources/tech/20150617 The Art of Command Line.md create mode 100644 translated/tech/20150617 The Art of Command Line.md diff --git a/sources/tech/20150617 The Art of Command Line.md b/sources/tech/20150617 The Art of Command Line.md deleted file mode 100644 index d951d1d45f..0000000000 --- a/sources/tech/20150617 The Art of Command Line.md +++ /dev/null @@ -1,436 +0,0 @@ -Translating by GOLinux! -The Art of Command Line -================================================================================ -- [Basics](#basics) -- [Everyday use](#everyday-use) -- [Processing files and data](#processing-files-and-data) -- [System debugging](#system-debugging) -- [One-liners](#one-liners) -- [Obscure but useful](#obscure-but-useful) -- [More resources](#more-resources) -- [Disclaimer](#disclaimer) - - -![curl -s 'https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md' | egrep -o '`\w+`' | tr -d '`' | cowsay -W50](https://github.com/jlevy/the-art-of-command-line/blob/master/cowsay.png) - -Fluency on the command line is a skill often neglected or considered arcane, but it improves your flexibility and productivity as an engineer in both obvious and subtle ways. This is a selection of notes and tips on using the command-line that I've found useful when working on Linux. Some tips are elementary, and some are fairly specific, sophisticated, or obscure. This page is not long, but if you can use and recall all the items here, you know a lot. - -Much of this -[originally](http://www.quora.com/What-are-some-lesser-known-but-useful-Unix-commands) -[appeared](http://www.quora.com/What-are-the-most-useful-Swiss-army-knife-one-liners-on-Unix) -on [Quora](http://www.quora.com/What-are-some-time-saving-tips-that-every-Linux-user-should-know), -but given the interest there, it seems it's worth using Github, where people more talented than I can readily suggest improvements. If you see an error or something that could be better, please submit an issue or PR! - -Scope: - -- The goals are breadth and brevity. Every tip is essential in some situation or significantly saves time over alternatives. -- This is written for Linux. Many but not all items apply equally to MacOS (or even Cygwin). -- The focus is on interactive Bash, though many tips apply to other shells and to general Bash scripting. -- Descriptions are intentionally minimal, with the expectation you'll use `man`, `apt-get`/`yum`/`dnf` to install, and Google for more background. - - -## Basics - -- Learn basic Bash. Actually, type `man bash` and at least skim the whole thing; it's pretty easy to follow and not that long. Alternate shells can be nice, but Bash is powerful and always available (learning *only* zsh, fish, etc., while tempting on your own laptop, restricts you in many situations, such as using existing servers). - -- Learn at least one text-based editor well. Ideally Vim (`vi`), as there's really no competition for random editing in a terminal (even if you use Emacs, a big IDE, or a modern hipster editor most of the time). - -- Learn about redirection of output and input using `>` and `<` and pipes using `|`. Learn about stdout and stderr. - -- Learn about file glob expansion with `*` (and perhaps `?` and `{`...`}`) and quoting and the difference between double `"` and single `'` quotes. (See more on variable expansion below.) - -- Be familiar with Bash job management: `&`, **ctrl-z**, **ctrl-c**, `jobs`, `fg`, `bg`, `kill`, etc. - -- Know `ssh`, and the basics of passwordless authentication, via `ssh-agent`, `ssh-add`, etc. - -- Basic file management: `ls` and `ls -l` (in particular, learn what every column in `ls -l` means), `less`, `head`, `tail` and `tail -f` (or even better, `less +F`), `ln` and `ln -s` (learn the differences and advantages of hard versus soft links), `chown`, `chmod`, `du` (for a quick summary of disk usage: `du -sk *`), `df`, `mount`. - -- Basic network management: `ip` or `ifconfig`, `dig`. - -- Know regular expressions well, and the various flags to `grep`/`egrep`. The `-i`, `-o`, `-A`, and `-B` options are worth knowing. - -- Learn to use `apt-get`, `yum`, or `dnf` (depending on distro) to find and install packages. And make sure you have `pip` to install Python-based command-line tools (a few below are easiest to install via `pip`). - - -## Everyday use - -- In Bash, use **ctrl-r** to search through command history. - -- In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete the whole line. Use **alt-b** and **alt-f** to move by word, and **ctrl-k** to kill to the end of the line. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. - -- To go back to the previous working directory: `cd -` - -- If you are halfway through typing a command but change your mind, hit **alt-#** to add a `#` at the beginning and enter it as a comment (or use **ctrl-a**, **#**, **enter**). You can then return to it later via command history. - -- Use `xargs` (or `parallel`). It's very powerful. Note you can control how many items execute per line (`-L`) as well as parallelism (`-P`). If you're not sure if it'll do the right thing, use `xargs echo` first. Also, `-I{}` is handy. Examples: -```bash - find . -name '*.py' | xargs grep some_function - cat hosts | xargs -I{} ssh root@{} hostname -``` - -- `pstree -p` is a helpful display of the process tree. - -- Use `pgrep` and `pkill` to find or signal processes by name (`-f` is helpful). - -- Know the various signals you can send processes. For example, to suspend a process, use `kill -STOP [pid]`. For the full list, see `man 7 signal` - -- Use `nohup` or `disown` if you want a background process to keep running forever. - -- Check what processes are listening via `netstat -lntp`. - -- See also `lsof` for open sockets and files. - -- In Bash scripts, use `set -x` for debugging output. Use strict modes whenever possible. Use `set -e` to abort on errors. Use `set -o pipefail` as well, to be strict about errors (though this topic is a bit subtle). For more involved scripts, also use `trap`. - -- In Bash scripts, subshells (written with parentheses) are convenient ways to group commands. A common example is to temporarily move to a different working directory, e.g. -```bash - # do something in current dir - (cd /some/other/dir; other-command) - # continue in original dir -``` - -- In Bash, note there are lots of kinds of variable expansion. Checking a variable exists: `${name:?error message}`. For example, if a Bash script requires a single argument, just write `input_file=${1:?usage: $0 input_file}`. Arithmetic expansion: `i=$(( (i + 1) % 5 ))`. Sequences: `{1..10}`. Trimming of strings: `${var%suffix}` and `${var#prefix}`. For example if `var=foo.pdf`, then `echo ${var%.pdf}.txt` prints `foo.txt`. - -- The output of a command can be treated like a file via `<(some command)`. For example, compare local `/etc/hosts` with a remote one: -```sh - diff /etc/hosts <(ssh somehost cat /etc/hosts) -``` - -- Know about "here documents" in Bash, as in `cat <logfile 2>&1`. Often, to ensure a command does not leave an open file handle to standard input, tying it to the terminal you are in, it is also good practice to add ` foo: - rename 's/\.bak$//' *.bak - # Full rename of filenames, directories, and contents foo -> bar: - repren --full --preserve-case --from foo --to bar . -``` - -- Use `shuf` to shuffle or select random lines from a file. - -- Know `sort`'s options. Know how keys work (`-t` and `-k`). In particular, watch out that you need to write `-k1,1` to sort by only the first field; `-k1` means sort according to the whole line. - -- Stable sort (`sort -s`) can be useful. For example, to sort first by field 2, then secondarily by field 1, you can use `sort -k1,1 | sort -s -k2,2` - -- If you ever need to write a tab literal in a command line in Bash (e.g. for the -t argument to sort), press **ctrl-v** **[Tab]** or write `$'\t'` (the latter is better as you can copy/paste it). - -- For binary files, use `hd` for simple hex dumps and `bvi` for binary editing. - -- Also for binary files, `strings` (plus `grep`, etc.) lets you find bits of text. - -- To convert text encodings, try `iconv`. Or `uconv` for more advanced use; it supports some advanced Unicode things. For example, this command lowercases and removes all accents (by expanding and dropping them): -```sh - uconv -f utf-8 -t utf-8 -x '::Any-Lower; ::Any-NFD; [:Nonspacing Mark:] >; ::Any-NFC; ' < input.txt > output.txt -``` - -- To split files into pieces, see `split` (to split by size) and `csplit` (to split by a pattern). - -- Use `zless`, `zmore`, `zcat`, and `zgrep` to operate on compressed files. - - -## System debugging - -- For web debugging, `curl` and `curl -I` are handy, or their `wget` equivalents, or the more modern [`httpie`](https://github.com/jakubroztocil/httpie). - -- To know disk/cpu/network status, use `iostat`, `netstat`, `top` (or the better `htop`), and (especially) `dstat`. Good for getting a quick idea of what's happening on a system. - -- For a more in-depth system overview, use [`glances`](https://github.com/nicolargo/glances). It presents you with several system level statistics in one terminal window. Very helpful for quickly checking on various subsystems. - -- To know memory status, run and understand the output of `free` and `vmstat`. In particular, be aware the "cached" value is memory held by the Linux kernel as file cache, so effectively counts toward the "free" value. - -- Java system debugging is a different kettle of fish, but a simple trick on Oracle's and some other JVMs is that you can run `kill -3 ` and a full stack trace and heap summary (including generational garbage collection details, which can be highly informative) will be dumped to stderr/logs. - -- Use `mtr` as a better traceroute, to identify network issues. - -- For looking at why a disk is full, `ncdu` saves time over the usual commands like `du -sh *`. - -- To find which socket or process is using bandwidth, try `iftop` or `nethogs`. - -- The `ab` tool (comes with Apache) is helpful for quick-and-dirty checking of web server performance. For more complex load testing, try `siege`. - -- For more serious network debugging, `wireshark`, `tshark`, or `ngrep`. - -- Know about `strace` and `ltrace`. These can be helpful if a program is failing, hanging, or crashing, and you don't know why, or if you want to get a general idea of performance. Note the profiling option (`-c`), and the ability to attach to a running process (`-p`). - -- Know about `ldd` to check shared libraries etc. - -- Know how to connect to a running process with `gdb` and get its stack traces. - -- Use `/proc`. It's amazingly helpful sometimes when debugging live problems. Examples: `/proc/cpuinfo`, `/proc/xxx/cwd`, `/proc/xxx/exe`, `/proc/xxx/fd/`, `/proc/xxx/smaps`. - -- When debugging why something went wrong in the past, `sar` can be very helpful. It shows historic statistics on CPU, memory, network, etc. - -- For deeper systems and performance analyses, look at `stap` ([SystemTap](https://sourceware.org/systemtap/wiki)), [`perf`](http://en.wikipedia.org/wiki/Perf_(Linux)), and [`sysdig`](https://github.com/draios/sysdig). - -- Confirm what Linux distribution you're using (works on most distros): `lsb_release -a` - -- Use `dmesg` whenever something's acting really funny (it could be hardware or driver issues). - - -## One-liners - -A few examples of piecing together commands: - -- It is remarkably helpful sometimes that you can do set intersection, union, and difference of text files via `sort`/`uniq`. Suppose `a` and `b` are text files that are already uniqued. This is fast, and works on files of arbitrary size, up to many gigabytes. (Sort is not limited by memory, though you may need to use the `-T` option if `/tmp` is on a small root partition.) See also the note about `LC_ALL` above. -```sh - cat a b | sort | uniq > c # c is a union b - cat a b | sort | uniq -d > c # c is a intersect b - cat a b b | sort | uniq -u > c # c is set difference a - b -``` - -- Summing all numbers in the third column of a text file (this is probably 3X faster and 3X less code than equivalent Python): -```sh - awk '{ x += $3 } END { print x }' myfile -``` - -- If want to see sizes/dates on a tree of files, this is like a recursive `ls -l` but is easier to read than `ls -lR`: -```sh - find . -type f -ls -``` - -- Use `xargs` or `parallel` whenever you can. Note you can control how many items execute per line (`-L`) as well as parallelism (`-P`). If you're not sure if it'll do the right thing, use xargs echo first. Also, `-I{}` is handy. Examples: -```sh - find . -name '*.py' | xargs grep some_function - cat hosts | xargs -I{} ssh root@{} hostname -``` - -- Say you have a text file, like a web server log, and a certain value that appears on some lines, such as an `acct_id` parameter that is present in the URL. If you want a tally of how many requests for each `acct_id`: -```sh - cat access.log | egrep -o 'acct_id=[0-9]+' | cut -d= -f2 | sort | uniq -c | sort -rn -``` - -- Run this function to get a random tip from this document (parses Markdown and extracts an item): -```sh - function taocl() { - curl -s https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md | - pandoc -f markdown -t html | - xmlstarlet fo --html --dropdtd | - xmlstarlet sel -t -v "(html/body/ul/li[count(p)>0])[$RANDOM mod last()+1]" | - xmlstarlet unesc | fmt -80 - } -``` - - -## Obscure but useful - -- `expr`: perform arithmetic or boolean operations or evaluate regular expressions - -- `m4`: simple macro processor - -- `screen`: powerful terminal multiplexing and session persistence - -- `yes`: print a string a lot - -- `cal`: nice calendar - -- `env`: run a command (useful in scripts) - -- `look`: find English words (or lines in a file) beginning with a string - -- `cut `and `paste` and `join`: data manipulation - -- `fmt`: format text paragraphs - -- `pr`: format text into pages/columns - -- `fold`: wrap lines of text - -- `column`: format text into columns or tables - -- `expand` and `unexpand`: convert between tabs and spaces - -- `nl`: add line numbers - -- `seq`: print numbers - -- `bc`: calculator - -- `factor`: factor integers - -- `gpg`: encrypt and sign files - -- `toe`: table of terminfo entries - -- `nc`: network debugging and data transfer - -- `ngrep`: grep for the network layer - -- `dd`: moving data between files or devices - -- `file`: identify type of a file - -- `stat`: file info - -- `tac`: print files in reverse - -- `shuf`: random selection of lines from a file - -- `comm`: compare sorted files line by line - -- `hd` and `bvi`: dump or edit binary files - -- `strings`: extract text from binary files - -- `tr`: character translation or manipulation - -- `iconv `or uconv: conversion for text encodings - -- `split `and `csplit`: splitting files - -- `7z`: high-ratio file compression - -- `ldd`: dynamic library info - -- `nm`: symbols from object files - -- `ab`: benchmarking web servers - -- `strace`: system call debugging - -- `mtr`: better traceroute for network debugging - -- `cssh`: visual concurrent shell - -- `wireshark` and `tshark`: packet capture and network debugging - -- `host` and `dig`: DNS lookups - -- `lsof`: process file descriptor and socket info - -- `dstat`: useful system stats - -- [`glances`](https://github.com/nicolargo/glances): high level, multi-subsystem overview - -- `iostat`: CPU and disk usage stats - -- `htop`: improved version of top - -- `last`: login history - -- `w`: who's logged on - -- `id`: user/group identity info - -- `sar`: historic system stats - -- `iftop` or `nethogs`: network utilization by socket or process - -- `ss`: socket statistics - -- `dmesg`: boot and system error messages - -- `hdparm`: SATA/ATA disk manipulation/performance - -- `lsb_release`: Linux distribution info - -- `lshw`: hardware information - -- `fortune`, `ddate`, and `sl`: um, well, it depends on whether you consider steam locomotives and Zippy quotations "useful" - - -## More resources - -- [awesome-shell](https://github.com/alebcay/awesome-shell): A curated list of shell tools and resources. -- [Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/) for writing better shell scripts. - - -## Disclaimer - -With the exception of very small tasks, code is written so others can read it. With power comes responsibility. The fact you *can* do something in Bash doesn't necessarily mean you should! ;) - --------------------------------------------------------------------------------- - -via: https://github.com/jlevy/the-art-of-command-line - -作者:[jlevy][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://github.com/jlevy -[1]: -[2]: -[3]: -[4]: -[5]: -[6]: -[7]: -[8]: -[9]: -[10]: -[11]: -[12]: -[13]: -[14]: -[15]: -[16]: -[17]: -[18]: -[19]: -[20]: diff --git a/translated/tech/20150617 The Art of Command Line.md b/translated/tech/20150617 The Art of Command Line.md new file mode 100644 index 0000000000..87e8e7458e --- /dev/null +++ b/translated/tech/20150617 The Art of Command Line.md @@ -0,0 +1,431 @@ +命令行艺术 +================================================================================ +- [基础](#basics) +- [日常使用](#everyday-use) +- [处理文件和数据](#processing-files-and-data) +- [系统调试](#system-debugging) +- [单行程序](#one-liners) +- [晦涩难懂,但却有用](#obscure-but-useful) +- [更多资源](#more-resources) +- [免责声明](#disclaimer) + + +![curl -s 'https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md' | egrep -o '`\w+`' | tr -d '`' | cowsay -W50](https://github.com/jlevy/the-art-of-command-line/blob/master/cowsay.png) + +流畅地使用命令行是一个常被忽略的技能,或被认为是神秘的奥义。但是,它会以明显而微妙的方式改善你作为工程师的灵活度和生产力。这是我在Linux上工作时发现的有用的命令行使用小窍门和笔记的精粹。有些小窍门是很基础的,而有些是相当地特别、相当地复杂、或者相当地晦涩难懂。这一页不长,但是如果你可以使用并记得这里的所有项目,那么你知道不少了。 + +其中大部分[最初](http://www.quora.com/What-are-some-lesser-known-but-useful-Unix-commands)[出现](http://www.quora.com/What-are-the-most-useful-Swiss-army-knife-one-liners-on-Unix)在[Quora](http://www.quora.com/What-are-some-time-saving-tips-that-every-Linux-user-should-know)上,但是考虑到利益,似乎更值得使用Github,这上面的人比我更能提出改进建议。如果你看到一个错误,或者更好的某种东西,请提交问题或PR! + +范围: + +- 目标宽广而简洁。每个小窍门在某种情形下都很基础,或者比替代品大大节省时间。 +- 这是为Linux写的。大多数,但并非全部项目可以同样应用到MacOS(或者甚至Cygwin)。 +- 焦点集中在交互的Bash上,尽管大多数小窍门也可以应用到其它shell,以及常规Bash脚本。 +- 意在作最少说明,要想期待更多,你可以使用`man`、使用`apt-get`/`yum`/`dnf`来安装,还可以使用Google来获得更多背景知识。 + + +## 基础 + +- 学习基本Bash技能。实际上,键入`man bash`,然后至少浏览一遍所有东西;它很容易理解,没那么长。其它shell会很好,但是Bash很强大,而且总是可用(*只*学习zsh、fish之类,而在你自己的笔记本上测试时,会在很多情形下受到限制,比如使用现存的服务器)。 + +- 至少学好一种基于文本的编辑器。理想的一个是Vim(`vi`),因为在终端中用于随机编辑时它没有竞争者(即使大多数时候你使用Emacs,一个大型的IDE,或一个现代的时髦编辑器)。 + +- 学习使用`>`和`<`来进行输出和输入重定向,以及使用`|`来管道重定向,学习关于stdout和stderr的东西。 + +- 学习`*`(也许还有`?`和`{`...`}`)文件通配扩展和应用,以及双引号`"`和单引号`'`之间的区别。(更多内容请参看下面关于变量扩展部分)。 + +- 熟悉Bash作业管理:`&`, **ctrl-z**, **ctrl-c**, `jobs`, `fg`, `bg`, `kill`等等。 + +- 掌握`ssh`,以及通过`ssh-agent`,`ssh-add`等进行无密码验证的基础技能。 + +- 基本的文件管理:`ls`和`ls -l`(特别是,知道`ls -l`各个栏目的意义),`less`, `head`, `tail` 和`tail -f`(或者更好的`less +F`),`ln`和`ln -s`(知道硬链接和软链接的区别,以及硬链接相对于软链接的优势),`chown`,`chmod`,`du`(用于查看磁盘使用率的快速摘要:`du -sk *`),`df`, `mount`。 + +- 基本的网络管理: `ip`或`ifconfig`,`dig`。 + +- 熟知正则表达式,以及各种标识来使用`grep`/`egrep`。`-i`,`-o`,`-A`和`-B`选项值得掌握。 + +- 学会使用`apt-get`,`yum`或`dnf`(这取决于你的发行版)来查找并安装软件包。确保你可以用`pip`来安装基于Python的命令行工具(下面的一些东西可以很容易地通过`pip`安装)。 + + +## 日常使用 + +- 在Bash中,使用**ctrl-r**来搜索命令历史。 + +- 在Bash中,使用 **ctrl-w** 来删除最后的单词,使用 **ctrl-u** 来删除整行。使用 **alt-b** 和 **alt-f** 来逐词移动,以及使用**ctrl-k**来杀死到行尾。请使用 `man readline` 来查看Bash中所有默认的键绑定,有很多。例如,**alt-.** 可以循环显示先前的参数,而**alt-** 扩展通配。 + +- 返回先前的工作目录: `cd -` + +- 如果你命令输入到一半,但是改变主意了,可以敲 **alt-#** 来添加一个 `#` 到开头,然后将该命令作为注释输入(或者使用 **ctrl-a**, **#**,**enter**)。然后,你可以在后面通过命令历史来返回到该命令。 + +- 使用`xargs`(或`parallel`),它很强大。注意,你可以控制每行(`-L`)执行多少个项目,而言可以使用平行结构(`-P`)。如果你不确定它是否会做正确的事情,可以首先使用`xargs echo`。同时,使用`-I{}`也很方便。样例: +```bash + find . -name '*.py' | xargs grep some_function + cat hosts | xargs -I{} ssh root@{} hostname +``` + +- `pstree -p`对于现实进程树很有帮助。 + +- 使用`pgrep`和`pkill`来按名称查找或用信号通知进程(`-f`很有帮助)。 + +- 掌握各种可以发送给进程的信号。例如,要挂起进程,可以使用`kill -STOP [pid]`。完整的列表可以查阅see `man 7 signal`。 + +- 如果你想要一个后台进程一直保持运行,使用`nohup`或`disown`。 + +- 通过`netstat -lntp`检查什么进程在监听。 + +- `lsof`来查看打开的套接口和文件。 + +- 在Bash脚本中,使用`set -x`调试脚本输出。每当可能时,使用严格模式。使用`set -e`在遇到错误时退出。也可以使用`set -o pipefail`,对错误严格(虽然该话题有点敏感)。对于更复杂的脚本,也可以使用`trap`。 + +- 在Bash脚本中,子shell(写在括号中的)是集合命令的便利的方式。一个常见的例子是临时移动到一个不同的工作目录,如: +```bash + # do something in current dir + (cd /some/other/dir; other-command) + # continue in original dir +``` + +- 注意,在Bash中有大量各种各样的变量扩展。检查一个变量是否存在:`${name:?error message}`。例如,如果一个Bash脚本要求一个单一参数,只需写`input_file=${1:?usage: $0 input_file}`。算术扩展:`i=$(( (i + 1) % 5 ))`。序列:`{1..10}`。修剪字符串:`${var%suffix}`和`${var#prefix}`。例如,if `var=foo.pdf`, then `echo ${var%.pdf}.txt` prints `foo.txt`。 + +- 命令的输出可以通过`<(some command)`作为一个文件来处理。例如,将本地的`/etc/hosts`和远程的比较: +```sh + diff /etc/hosts <(ssh somehost cat /etc/hosts) +``` + +- 知道Bash中的“嵌入文档”,就像在`cat <logfile 2>&1`同时重定向标准输出和标准错误。通常,要确保某个命令不会再标准输入中遗留有打开的文件句柄,将它捆绑到你所在的终端,添加` foo: + rename 's/\.bak$//' *.bak + # Full rename of filenames, directories, and contents foo -> bar: + repren --full --preserve-case --from foo --to bar . +``` + +- 使用`shuf`来从某个文件中随机选择随机的行。 + +- 知道`sort`的选项。知道这些键是怎么工作的(`-t`和`-k`)。特别是,注意你需要写`-k1,1`来只通过第一个字段排序;`-k1`意味着根据整行排序。 + +- 稳定排序(`sort -s`)会很有用。例如,要首先按字段2排序,然后再按字段1排序,你可以使用`sort -k1,1 | sort -s -k2,2` + +- 如果你曾经需要在Bash命令行中写一个标签文字(如,用于-t参数的排序),按**ctrl-v** **[Tab]**,或者写`$'\t'`(后面的更好,因为你可以复制/粘贴)。 + +- 对于二进制文件,使用`hd`进行简单十六进制转储,以及`bvi`用于二进制编辑。 + +- 还是用于二进制文件,`strings`(加上`grep`等)可以让你找出文本的二进制数。 + +- 要转换文本编码,试试`iconv`吧,或者对于更高级的使用`uconv`;它支持一些高级的统一字符标准的东西。例如,这个命令可以将所有重音符号转成小写并(通过扩展和丢弃)移除: +```sh + uconv -f utf-8 -t utf-8 -x '::Any-Lower; ::Any-NFD; [:Nonspacing Mark:] >; ::Any-NFC; ' < input.txt > output.txt +``` + +- 要将文件分割成各个部分,来看看`split`(按大小分割)和`csplit`(按格式分割)吧。 + +- 使用`zless`,`zmore`,`zcat`和`zgrep`来操作压缩文件。 + + +## 系统调试 + +- 对于网络调试,`curl`和`curl -I`很方便灵活,或者业可以使用它们的同行`wget`,或者更现代的[`httpie`](https://github.com/jakubroztocil/httpie)。 + +- 要知道disk/cpu/network的状态,使用`iostat`,`netstat`,`top`(或更好的`htop`)和(特别是)`dstat`。它们对于快速获知系统中发生的状况很好用。 + +- 对于更深层次的系统总览,可以使用[`glances`](https://github.com/nicolargo/glances)。它会在一个终端窗口中为你呈现几个系统层次的统计数据,对于快速检查各个子系统很有帮助。 + +- 要知道内存状态,可以运行`free`和`vmstat`,看懂它们的输出结果吧。特别是,要知道“cached”值是Linux内核作为文件缓存所占有的内存,因此,要有效地统计“free”值。 + +- 系统调试是一件截然不同的事,但是对于Oracle系统以及其它一些JVM而言,不过是一个简单的小把戏,你可以运行`kill -3 `,然后一个完整的堆栈追踪和累积的摘要(包括分代垃圾收集细节,这里头信息量很大)将被转储到stderr/logs.Java。 + +- 使用`mtr`作为更好的路由追踪,来识别网络问题。 + +- 对于查看磁盘满载的原因,`ncdu`会比常规命令如`du -sh *`更节省时间。 + +- 要查找占用带宽的套接口和进程,试试`iftop`或`nethogs`吧。 + +- (Apache附带的)`ab`工具对于临时应急检查网络服务器性能很有帮助。对于更复杂的负载测试,可以试试`siege`。 + +- 对于更重型的网络调试,可以用`wireshark`,`tshark`或`ngrep`。 + +- 掌握`strace`和`ltrace`。如果某个程序失败、挂起或崩溃,而你又不知道原因,或者如果你想要获得性能的大概信息,这些工具会很有帮助。注意,分析选项(`-c`)和关联运行进程的能力(`-p`)。 + +- 掌握`ldd`来检查共享库等。 + +- 知道如何使用`gdb`来连接到一个运行着的进程并获取其堆栈追踪信息。 + +- 使用`/proc`。当调试当前注目问题时,它有时候出奇地有帮助。样例:`/proc/cpuinfo`,`/proc/xxx/cwd`,`/proc/xxx/exe`,`/proc/xxx/fd/`,`/proc/xxx/smaps`。 + +- 当调试过去某个东西出错时,`sar`会非常有帮助。它显示了CPU、内存、网络等的历史统计数据。 + +- 对于更深层的系统和性能分析,看看`stap` ([SystemTap](https://sourceware.org/systemtap/wiki)),[`perf`](http://en.wikipedia.org/wiki/Perf_(Linux))和[`sysdig`](https://github.com/draios/sysdig)吧。 + +- 确认是正在使用的Linux发行版版本(大多数发行版可用):`lsb_release -a`。 + +- 每当某个东西的行为异常时(可能是硬件或者驱动器问题),使用`dmesg`。 + + +## 单行程序 + +将命令拼凑在一起的一些样例: + +- 有时候通过`sort`/`uniq`来进行交互设置、合并,以及比较文本文件的差异时,这个例子会相当有帮助。假定`a`和`b`是已经进行唯一性处理的文本文件。这会很快,而且可以处理任意大小的文件,总计可达数千兆字节。(Sort不受内存限制,然后你可能需要使用`-T`选项来检查`/tmp`是否挂载一个容量小的root分区上。)也可参见上面关于`LC_ALL`的注解。 +```sh + cat a b | sort | uniq > c # c is a union b + cat a b | sort | uniq -d > c # c is a intersect b + cat a b b | sort | uniq -u > c # c is set difference a - b +``` + +- 对某个文本文件的第三列中所有数据进行求和(该例子可能比同等功能的Python要快3倍,而且代码也少于其3倍): +```sh + awk '{ x += $3 } END { print x }' myfile +``` + +- 如果想要查看某个文件树的大小/日期,该例子就像一个递归`ls -l`,但是比`ls -lR`要更容易读懂: +```sh + find . -type f -ls +``` + +- 只要可以,请使用Use `xargs`或`parallel`。注意,你可以控制每行(`-L`)执行多少个项目,也可同时控制并行计算(`-P`)。如果你不确定它是否会做正确的事,可以在前面加上xargs echo。同时,`-I{}`很灵便。样例: +```sh + find . -name '*.py' | xargs grep some_function + cat hosts | xargs -I{} ssh root@{} hostname +``` + +- 比如说,你有一个文本文件,像网络服务器的日志,在某些行中出现了某个特定的值,如URL中出现的`acct_id`参数。如果你想要一个针对每个`acct_id`的请求的计数器: +```sh + cat access.log | egrep -o 'acct_id=[0-9]+' | cut -d= -f2 | sort | uniq -c | sort -rn +``` + +- 运行该函数来获得来自文档的随机提示(解析Markdown并从中提取某个项目): +```sh + function taocl() { + curl -s https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md | + pandoc -f markdown -t html | + xmlstarlet fo --html --dropdtd | + xmlstarlet sel -t -v "(html/body/ul/li[count(p)>0])[$RANDOM mod last()+1]" | + xmlstarlet unesc | fmt -80 + } +``` + + +## 晦涩难懂,但却有用 + +- `expr`:实施算术或布林操作,或者求正则表达式的值 + +- `m4`:简单宏处理器 + +- `screen`:强大的终端多路复用和会话保持 + +- `yes`:大量打印一个字符串 + +- `cal`:漂亮的日历 + +- `env`:运行一个命令(脚本中很有用) + +- `look`:查找以某个字符串开头的英文单词(或文件中的行) + +- `cut `和`paste`以及`join`:数据处理 + +- `fmt`:格式化文本段落 + +- `pr`:格式化文本为页/栏 + +- `fold`:包裹文本行 + +- `column`:格式化文本为栏或表 + +- `expand`和`unexpand`:在制表和空格间转换 + +- `nl`:添加行号 + +- `seq`:打印数字 + +- `bc`:计算器 + +- `factor`:把整数因子分解 + +- `gpg`:加密并为文件签名 + +- `toe`:terminfo条目表 + +- `nc`:网络调试和数据传输 + +- `ngrep`:查找网络层 + +- `dd`:在文件或设备间移动数据 + +- `file`:识别文件类型 + +- `stat`:文件信息 + +- `tac`:逆序打印文件 + +- `shuf`:从文件中随机选择行 + +- `comm`:逐行对比分类排序的文件 + +- `hd`和`bvi`:转储或编辑二进制文件 + +- `strings`:从二进制文件提取文本 + +- `tr`:字符转译或处理 + +- `iconv `或`uconv`:文本编码转换 + +- `split `和`csplit`:分割文件 + +- `7z`:高比率文件压缩 + +- `ldd`:动态库信息 + +- `nm`:目标文件的符号 + +- `ab`:网络服务器基准测试 + +- `strace`:系统调用调试 + +- `mtr`:用于网络调试的更好的路由追踪 + +- `cssh`:可视化并发shell + +- `wireshark`和`tshark`:抓包和网络调试 + +- `host`和`dig`:DNS查询 + +- `lsof`:处理文件描述符和套接字信息 + +- `dstat`:有用的系统统计数据 + +- [`glances`](https://github.com/nicolargo/glances):高级,多子系统概览 + +- `iostat`:CPU和磁盘使用率统计 + +- `htop`:top的改进版 + +- `last`:登录历史 + +- `w`:谁登录进来了 + +- `id`:用户/组身份信息 + +- `sar`:历史系统统计数据 + +- `iftop`或`nethogs`:按套接口或进程的网络使用率 + +- `ss`:套接口统计数据 + +- `dmesg`:启动和系统错误信息 + +- `hdparm`:SATA/ATA磁盘操作/性能 + +- `lsb_release`:Linux发行版信息 + +- `lshw`:硬件信息 + +- `fortune`,`ddate`和`sl`:嗯,好吧,它取决于你是否认为蒸汽机车和齐皮士引用“有用” + + +## 更多资源 + +- [超棒的shell](https://github.com/alebcay/awesome-shell): 一个shell工具和资源一览表。 +- [严格模式](http://redsymbol.net/articles/unofficial-bash-strict-mode/) 用于写出更佳的shell脚本。 + + +## 免责声明 + +除了非常小的任务外,其它都写出了代码供大家阅读。伴随力量而来的是责任。事实是,你*能*在Bash中做的,并不意味着是你所应该做的!;) + +-------------------------------------------------------------------------------- + +via: https://github.com/jlevy/the-art-of-command-line + +作者:[jlevy][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://github.com/jlevy +[1]: +[2]: +[3]: +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: From 4c51e02ca161d41c93bbc9beefb2d8ccaef60c75 Mon Sep 17 00:00:00 2001 From: yajun Date: Tue, 23 Jun 2015 11:00:37 +0800 Subject: [PATCH 1248/2517] update --- .../talk/20141211 Open source all over the world.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/translated/talk/20141211 Open source all over the world.md b/translated/talk/20141211 Open source all over the world.md index b39820bebc..c897765d75 100644 --- a/translated/talk/20141211 Open source all over the world.md +++ b/translated/talk/20141211 Open source all over the world.md @@ -1,4 +1,4 @@ -Open source all over the world +一个开源的世界 ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUS_OpenSourceExperience_520x292_cm.png) @@ -50,15 +50,13 @@ Open source all over the world 我当时在他左边,时不时从转录空隙中抬头看一眼,然后从眼神中注意到微笑背后暗示的那个自2008年1月起开始领导公司的人,红帽的CEO[Jim Whitehurst][35]。 -“我有世界上最好的工作,”稍稍向后靠、叉腿抱头,Whitehurst开始了演讲。“我开始领导红帽,在世界各地旅行到处看看情况。在这里的七年中,FOSS和广泛的开源创新所发生的美好的事情是开源已经脱离了条条框框。我现在认为,IT正处在FOSS之前所在的位置。我们可以预见FOSS从一个替代走向创新驱动力。” +“我有世界上最好的工作,”稍稍向后靠、叉腿抱头,Whitehurst开始了演讲。“我开始领导红帽,在世界各地旅行到处看看情况。在这里的七年中,FOSS和广泛的开源创新所发生的美好的事情是开源已经脱离了条条框框。我现在认为,IT正处在FOSS之前所在的位置。我们可以预见FOSS从一个替代走向创新驱动力。”用户也看到了这一点。他们用FOSS并不是因为它便宜,而是因为它能提供和创新的解决方案。这也十一个全球现象。比如,我刚才还在印度,然后发现那里的用户拥抱开源的两个理由:一个是创新,另一个是那里的市场有些特殊,需要完全的控制。 -"I have one of the greatest jobs on Earth," began Whitehurst, as he leaned back, crossed his legs, and put his arms behind his head. "I get to lead Red Hat, travel around the world and see what goes on. In my seven years here, the amazing thing about FOSS, and, broadly open innovation, is that it has left the fringe. And now, I would argue, IT is in the same place that FOSS was in its early days. We are seeing FOSS going from an alternative to driving innovation. Our customers are seeing it, too. They're using FOSS not because it is cheaper, but because it provides them with control and innovative solutions. It's a global phenomenon, too. For instance, I was just in India, and discovered that, for them, there were two reasons for embracing of open source: one, access to innovation, and two, the market is somewhat different and wanting full control.” +“[孟买证券交易所][36]想得到源代码并加以控制,五年前这在证券交易领域闻所未闻。那时FOSS正在重复发明轮子。今天看来,FOSS正在做几乎所有的结合了大数据的事物。几乎所有的新框架,语言和方法论,包括流动(尽管不包括设备),都首先发生在开源世界。” -"The [Bombay Stock Exchange][36] wants to own all the source and control it. That is not something you would have heard five years ago in a stock exchange, anywhere. Back then, the early knock on FOSS was that it was creating free copies of things that already existed.' If you look today, virtually everything in big data is happening in FOSS. Almost any new framework, language, and methodology, including mobile (though excluding devices), are all happening first in open source.” +“这是因为用户数量已经达到了相当的规模。这不只是红帽遇到的情况,[Google][37],[Amazon][38],[Facebook][39]等也出现这样的情况。他们想解决自己的问题,用开源的方式。忘掉协议吧,开源绝不仅如此。我们建立了一个交通工具,一套规则,例如[Hadoop][40],[Cassandra][41]和其他工具。事实上,开源驱动创新。例如,Hadoop在厂商们意识的规模带来的问题。他们实际上有足够的资和资源金来解决自己的问题。”开源是许多领域的默认技术方案。这在一个更加注重内容的世界中更是如此,例如[3D打印][42]和其他使用信息内容的物理产品。” -"This is because users have reached size and scale. It's not just Red Hat—it's [Google][37], [Amazon][38], [Facebook][39], and others, they want to solve their own problems, and do it the open source way. And forget licensing—open source is much more than that. We've built a vehicle, and a set of norms. Things like [Hadoop][40], [Cassandra][41], and other tools. Fact is, open source drives innovation. For example, Hadoop was in production before any vendor realized there was a problem of that scale that needed to be solved. They actually have the wherewithal to solve their own problems, and the social tech and principles to do that. "Open source is now the default technology for many categories. This is especially true as the world moves more and more to content importance, such as [3D printing][42] and other physical products that take information content and apply it.” - -"We have this cool thing in one area, source code, but it is limited. But there are still many opportunities in different industries. We must ask ourselves, 'What can open source do for education, government, and legal? What are the parallels? And what can other areas learn with us?'" +“源代码的开源确实很酷,但开源不应当仅限于此。在各行各业不同领域开源仍有可以用武之地。我们要问下自己:‘开源能够为教育,政府,法律带来什么?其它的呢?其它的领域如何能学习我们?’” "There's also the matter of content. Content is now free, and we can invest in more free content, sure. But we need free content that has a business model built around it. That is something that more people should care about. If you believe open innovation is better, then we need more models." From 0486c3330157b430d02c5af74a7614b74a4eec70 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 23 Jun 2015 16:21:18 +0800 Subject: [PATCH 1249/2517] =?UTF-8?q?20150623-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Kernel 4.1 Released This Is What's New.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md diff --git a/sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md b/sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md new file mode 100644 index 0000000000..41058f3210 --- /dev/null +++ b/sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md @@ -0,0 +1,62 @@ +Linux Kernel 4.1 Released, This Is What’s New +================================================================================ +**TuxlogoA brand new version of the Linux Kernel — the heartbeat of the modern world (if we you want us to be poetic about it) — has been released.** + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/07/Tux-psd3894.jpg) + +The arrival [has been announced][1] by Linus Torvalds (who else?) on the Linux Kernel Mailing List (where else?) and comes almost two months after the [first entry in the new 4.x series][2]. + +Levity aside, and like every release before it, Linux Kernel 4.1 features a big set of changes. These touch everything from hardware compatibility to power management to file-system performance and technical fixes for obscure processors you’ve never heard of. + +Linux 4.1 is already being tracked in Ubuntu 15.10, due for release in October. + +### What’s New In Linux 4.1? ### + +![Tux got mail](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/linux-kernel-4-11-350x200.jpg) +Tux got mail + +The sub-heading is on your lips and we’re not here simply to serve up an announcement of an announcement. + +We’ve gone through the (vast, long, lengthy and at times technically unintelligible) change-log to pick out some highlights that may not feed hyperbole but may impact on you, a desktop users. + +#### Power Improvements #### + +The big headline user-facing feature you’ll find in Linux 4.1 are the wealth of performance and power efficiency improvements committed for Intel’s Cherry Trail and Bay Trail chips. SoCs and devices, such as the Intel Compute Stick. + +Anecdotal suggestions are that Linux Kernel 4.1 gives select combinations of newer Intel hardware as much as an extra hour of battery life. Such high gains are not likely to apply to anything but a very specific sub-set of chips and systems (and high-end ones at that) but it’s still exciting to hear of. + +**Highlights of Linux 4.1 include:** + +- EXT4 gains file-system level encryption (thanks to Google) +- Logitech lg4ff driver improves ‘force feedback’ for gaming wheels +- Toshiba laptop driver gains USB sleep charging and backlight improvements +- Rumble support for Xbox One controller +- Better battery reporting in Wacom tablet driver +- Various misc. power improvements for both ARM and x86 devices +- Samsung Exynos 3250 power management improvements +- Support for the Bamboo Pad +- Lenovo OneLink Pro Dock gains USB support +- Support for Realtek 8723A, 8723B, 8761A, 8821 Wi-Fi cards + +### Install Linux Kernel 4.1 on Ubuntu ### + +Although this release of the kernel is classed as stable there is no pressing need for Ubuntu desktop users to go out of their way to install it. + +Not that you can’t; if you’re impatient and skilled enough to do so you can take a crack at installing Linux 4.1 on Ubuntu by grabbing the appropriate set of packages from [Canonical’s mainline kernel archive][3] (or by risking a third-party PPA). + +Ubuntu 15.10 Wily Werewolf, due for release in October, is to be based on the Ubuntu Kernel 4.1.x (the Ubuntu kernel is the Linux Kernel plus Ubuntu-specific patches that have not been accepted upstream). + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/06/linux-4-1-kernel-new-features + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://lkml.org/lkml/2015/6/22/8 +[2]:http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features +[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D \ No newline at end of file From 55ab470b0e38195a48dae9580bd8e641a7efe990 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 23 Jun 2015 16:34:46 +0800 Subject: [PATCH 1250/2517] =?UTF-8?q?20150623-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ence on RedHat Linux Package Management.md | 348 ++++++++++++++++++ 1 file changed, 348 insertions(+) create mode 100644 sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md diff --git a/sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md b/sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md new file mode 100644 index 0000000000..7915907e6a --- /dev/null +++ b/sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md @@ -0,0 +1,348 @@ +Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management +================================================================================ +**Shilpa Nair has just graduated in the year 2015. She went to apply for Trainee position in a National News Television located in Noida, Delhi. When she was in the last year of graduation and searching for help on her assignments she came across Tecmint. Since then she has been visiting Tecmint regularly.** + +![Linux Interview Questions on RPM](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Interview-Questions-on-RPM.jpeg) + +Linux Interview Questions on RPM + +All the questions and answers are rewritten based upon the memory of Shilpa Nair. + +> “Hi friends! I am Shilpa Nair from Delhi. I have completed my graduation very recently and was hunting for a Trainee role soon after my degree. I have developed a passion for UNIX since my early days in the collage and I was looking for a role that suits me and satisfies my soul. I was asked a lots of questions and most of them were basic questions related to RedHat Package Management.” + +Here are the questions, that I was asked and their corresponding answers. I am posting only those questions that are related to RedHat GNU/Linux Package Management, as they were mainly asked. + +### 1. How will you find if a package is installed or not? Say you have to find if ‘nano’ is installed or not, what will you do? ### + +> **Answer** : To find the package nano, weather installed or not, we can use rpm command with the option -q is for query and -a stands for all the installed packages. +> +> # rpm -qa nano +> OR +> # rpm -qa | grep -i nano +> +> nano-2.3.1-10.el7.x86_64 +> +> Also the package name must be complete, an incomplete package name will return the prompt without printing anything which means that package (incomplete package name) is not installed. It can be understood easily by the example below: +> +> We generally substitute vim command with vi. But if we find package vi/vim we will get no result on the standard output. +> +> # vi +> # vim +> +> However we can clearly see that the package is installed by firing vi/vim command. Here is culprit is incomplete file name. If we are not sure of the exact file-name we can use wildcard as: +> +> # rpm -qa vim* +> +> vim-minimal-7.4.160-1.el7.x86_64 +> +> This way we can find information about any package, if installed or not. + +### 2. How will you install a package XYZ using rpm? ### + +> **Answer** : We can install any package (*.rpm) using rpm command a shown below, here options -i (install), -v (verbose or display additional information) and -h (print hash mark during package installation). +> +> # rpm -ivh peazip-1.11-1.el6.rf.x86_64.rpm +> +> Preparing... ################################# [100%] +> Updating / installing... +> 1:peazip-1.11-1.el6.rf ################################# [100%] +> +> If upgrading a package from earlier version -U switch should be used, option -v and -h follows to make sure we get a verbose output along with hash Mark, that makes it readable. + +### 3. You have installed a package (say httpd) and now you want to see all the files and directories installed and created by the above package. What will you do? ### + +> **Answer** : We can list all the files (Linux treat everything as file including directories) installed by the package httpd using options -l (List all the files) and -q (is for query). +> +> # rpm -ql httpd +> +> /etc/httpd +> /etc/httpd/conf +> /etc/httpd/conf.d +> ... + +### 4. You are supposed to remove a package say postfix. What will you do? ### + +> **Answer** : First we need to know postfix was installed by what package. Find the package name that installed postfix using options -e erase/uninstall a package) and –v (verbose output). +> +> # rpm -qa postfix* +> +> postfix-2.10.1-6.el7.x86_64 +> +> and then remove postfix as: +> +> # rpm -ev postfix-2.10.1-6.el7.x86_64 +> +> Preparing packages... +> postfix-2:3.0.1-2.fc22.x86_64 + +### 5. Get detailed information about an installed package, means information like Version, Release, Install Date, Size, Summary and a brief description. ### + +> **Answer** : We can get detailed information about an installed package by using option -qa with rpm followed by package name. +> +> For example to find details of package openssh, all I need to do is: +> +> # rpm -qi openssh +> +> [root@tecmint tecmint]# rpm -qi openssh +> Name : openssh +> Version : 6.8p1 +> Release : 5.fc22 +> Architecture: x86_64 +> Install Date: Thursday 28 May 2015 12:34:50 PM IST +> Group : Applications/Internet +> Size : 1542057 +> License : BSD +> .... + +### 6. You are not sure about what are the configuration files provided by a specific package say httpd. How will you find list of all the configuration files provided by httpd and their location. ### + +> **Answer** : We need to run option -c followed by package name with rpm command and it will list the name of all the configuration file and their location. +> +> # rpm -qc httpd +> +> /etc/httpd/conf.d/autoindex.conf +> /etc/httpd/conf.d/userdir.conf +> /etc/httpd/conf.d/welcome.conf +> /etc/httpd/conf.modules.d/00-base.conf +> /etc/httpd/conf/httpd.conf +> /etc/sysconfig/httpd +> +> Similarly we can list all the associated document files as: +> +> # rpm -qd httpd +> +> /usr/share/doc/httpd/ABOUT_APACHE +> /usr/share/doc/httpd/CHANGES +> /usr/share/doc/httpd/LICENSE +> ... +> +> also, we can list the associated License file as: +> +> # rpm -qL openssh +> +> /usr/share/licenses/openssh/LICENCE +> +> Not to mention that the option -d and option -L in the above command stands for ‘documents‘ and ‘License‘, respectively. + +### 7. You came across a configuration file located at ‘/usr/share/alsa/cards/AACI.conf’ and you are not sure this configuration file is associated with what package. How will you find out the parent package name? ### + +> **Answer** : When a package is installed, the relevant information gets stored in the database. So it is easy to trace what provides the above package using option -qf (-f query packages owning files). +> +> # rpm -qf /usr/share/alsa/cards/AACI.conf +> alsa-lib-1.0.28-2.el7.x86_64 +> +> Similarly we can find (what provides) information about any sub-packge, document files and License files. + +### 8. How will you find list of recently installed software’s using rpm? ### + +> **Answer** : As said earlier, everything being installed is logged in database. So it is not difficult to query the rpm database and find the list of recently installed software’s. +> +> We can do this by running the below commands using option –last (prints the most recent installed software’s). +> +> # rpm -qa --last +> +> The above command will print all the packages installed in a order such that, the last installed software appears at the top. +> +> If our concern is to find out specific package, we can grep that package (say sqlite) from the list, simply as: +> +> # rpm -qa --last | grep -i sqlite +> +> sqlite-3.8.10.2-1.fc22.x86_64 Thursday 18 June 2015 05:05:43 PM IST +> +> We can also get a list of 10 most recently installed software simply as: +> +> # rpm -qa --last | head +> +> We can refine the result to output a more custom result simply as: +> +> # rpm -qa --last | head -n 2 +> +> In the above command -n represents number followed by a numeric value. The above command prints a list of 2 most recent installed software. + +### 9. Before installing a package, you are supposed to check its dependencies. What will you do? ### + +> **Answer** : To check the dependencies of a rpm package (XYZ.rpm), we can use switches -q (query package), -p (query a package file) and -R (Requires / List packages on which this package depends i.e., dependencies). +> +> # rpm -qpR gedit-3.16.1-1.fc22.i686.rpm +> +> /bin/sh +> /usr/bin/env +> glib2(x86-32) >= 2.40.0 +> gsettings-desktop-schemas +> gtk3(x86-32) >= 3.16 +> gtksourceview3(x86-32) >= 3.16 +> gvfs +> libX11.so.6 +> ... + +### 10. Is rpm a front-end Package Management Tool? ### + +> **Answer** : No! rpm is a back-end package management for RPM based Linux Distribution. +> +> [YUM][1] which stands for Yellowdog Updater Modified is the front-end for rpm. YUM automates the overall process of resolving dependencies and everything else. +> +> Very recently [DNF][2] (Dandified YUM) replaced YUM in Fedora 22. Though YUM is still available to be used in RHEL and CentOS, we can install dnf and use it alongside of YUM. DNF is said to have a lots of improvement over YUM. +> +> Good to know, you keep yourself updated. Lets move to the front-end part. + +### 11. How will you list all the enabled repolist on a system. ### + +> **Answer** : We can list all the enabled repos on a system simply using following commands. +> +> # yum repolist +> or +> # dnf repolist +> +> Last metadata expiration check performed 0:30:03 ago on Mon Jun 22 16:50:00 2015. +> repo id repo name status +> *fedora Fedora 22 - x86_64 44,762 +> ozonos Repository for Ozon OS 61 +> *updates Fedora 22 - x86_64 - Updates +> +> The above command will only list those repos that are enabled. If we need to list all the repos, enabled or not, we can do. +> +> # yum repolist all +> or +> # dnf repolist all +> +> Last metadata expiration check performed 0:29:45 ago on Mon Jun 22 16:50:00 2015. +> repo id repo name status +> *fedora Fedora 22 - x86_64 enabled: 44,762 +> fedora-debuginfo Fedora 22 - x86_64 - Debug disabled +> fedora-source Fedora 22 - Source disabled +> ozonos Repository for Ozon OS enabled: 61 +> *updates Fedora 22 - x86_64 - Updates enabled: 5,018 +> updates-debuginfo Fedora 22 - x86_64 - Updates - Debug + +### 12. How will you list all the available and installed packages on a system? ### + +> **Answer** : To list all the available packages on a system, we can do: +> +> # yum list available +> or +> # dnf list available +> +> ast metadata expiration check performed 0:34:09 ago on Mon Jun 22 16:50:00 2015. +> Available Packages +> 0ad.x86_64 0.0.18-1.fc22 fedora +> 0ad-data.noarch 0.0.18-1.fc22 fedora +> 0install.x86_64 2.6.1-2.fc21 fedora +> 0xFFFF.x86_64 0.3.9-11.fc22 fedora +> 2048-cli.x86_64 0.9-4.git20141214.723738c.fc22 fedora +> 2048-cli-nocurses.x86_64 0.9-4.git20141214.723738c.fc22 fedora +> .... +> +> To list all the installed Packages on a system, we can do. +> +> # yum list installed +> or +> # dnf list installed +> +> Last metadata expiration check performed 0:34:30 ago on Mon Jun 22 16:50:00 2015. +> Installed Packages +> GeoIP.x86_64 1.6.5-1.fc22 @System +> GeoIP-GeoLite-data.noarch 2015.05-1.fc22 @System +> NetworkManager.x86_64 1:1.0.2-1.fc22 @System +> NetworkManager-libnm.x86_64 1:1.0.2-1.fc22 @System +> aajohan-comfortaa-fonts.noarch 2.004-4.fc22 @System +> .... +> +> To list all the available and installed packages on a system, we can do. +> +> # yum list +> or +> # dnf list +> +> Last metadata expiration check performed 0:32:56 ago on Mon Jun 22 16:50:00 2015. +> Installed Packages +> GeoIP.x86_64 1.6.5-1.fc22 @System +> GeoIP-GeoLite-data.noarch 2015.05-1.fc22 @System +> NetworkManager.x86_64 1:1.0.2-1.fc22 @System +> NetworkManager-libnm.x86_64 1:1.0.2-1.fc22 @System +> aajohan-comfortaa-fonts.noarch 2.004-4.fc22 @System +> acl.x86_64 2.2.52-7.fc22 @System +> .... + +### 13. How will you install and update a package and a group of packages separately on a system using YUM/DNF? ### + +> Answer : To Install a package (say nano), we can do, +> +> # yum install nano +> +> To Install a Group of Package (say Haskell), we can do. +> +> # yum groupinstall 'haskell' +> +> To update a package (say nano), we can do. +> +> # yum update nano +> +> To update a Group of Package (say Haskell), we can do. +> +> # yum groupupdate 'haskell' + +### 14. How will you SYNC all the installed packages on a system to stable release? ### + +> **Answer** : We can sync all the packages on a system (say CentOS or Fedora) to stable release as, +> +> # yum distro-sync [On CentOS/RHEL] +> or +> # dnf distro-sync [On Fedora 20 Onwards] + +Seems you have done a good homework before coming for the interview,Good!. Before proceeding further I just want to ask one more question. + +### 15. Are you familiar with YUM local repository? Have you tried making a Local YUM repository? Let me know in brief what you will do to create a local YUM repo. ### + +> **Answer** : First I would like to Thank you Sir for appreciation. Coming to question, I must admit that I am quiet familiar with Local YUM repositories and I have already implemented it for testing purpose in my local machine. +> +> 1. To set up Local YUM repository, we need to install the below three packages as: +> +> # yum install deltarpm python-deltarpm createrepo +> +> 2. Create a directory (say /home/$USER/rpm) and copy all the RPMs from RedHat/CentOS DVD to that folder. +> +> # mkdir /home/$USER/rpm +> # cp /path/to/rpm/on/DVD/*.rpm /home/$USER/rpm +> +> 3. Create base repository headers as. +> +> # createrepo -v /home/$USER/rpm +> +> 4. Create the .repo file (say abc.repo) at the location /etc/yum.repos.d simply as: +> +> cd /etc/yum.repos.d && cat << EOF > abc.repo +> [local-installation]name=yum-local +> baseurl=file:///home/$USER/rpm +> enabled=1 +> gpgcheck=0 +> EOF + +**Important**: Make sure to remove $USER with user_name. + +That’s all we need to do to create a Local YUM repository. We can now install applications from here, that is relatively fast, secure and most important don’t need an Internet connection. + +Okay! It was nice interviewing you. I am done. I am going to suggest your name to HR. You are a young and brilliant candidate we would like to have in our organization. If you have any question you may ask me. + +**Me**: Sir, it was really a very nice interview and I feel very lucky today, to have cracked the interview.. + +Obviously it didn’t end here. I asked a lots of questions like the project they are handling. What would be my role and responsibility and blah..blah..blah + +Friends, by the time all these were documented I have been called for HR round which is 3 days from now. Hope I do my best there as well. All your blessings will count. + +Thankyou friends and Tecmint for taking time and documenting my experience. Mates I believe Tecmint is doing some really extra-ordinary which must be praised. When we share ours experience with other, other get to know many things from us and we get to know our mistakes. + +It enhances our confidence level. If you have given any such interview recently, don’t keep it to yourself. Spread it! Let all of us know that. You may use the below form to share your experience with us. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-rpm-package-management-interview-questions/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[2]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ \ No newline at end of file From 2a010f0061aed5fa48ff89f8f3d45445fad7a54d Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 23 Jun 2015 23:42:37 +0800 Subject: [PATCH 1251/2517] PUB:20150612 Inside NGINX--How We Designed for Performance and Scale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wyangsun 翻译的不错! --- ...w We Designed for Performance and Scale.md | 175 ++++++++++++++++++ ...w We Designed for Performance and Scale.md | 174 ----------------- 2 files changed, 175 insertions(+), 174 deletions(-) create mode 100644 published/20150612 Inside NGINX--How We Designed for Performance and Scale.md delete mode 100644 translated/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md diff --git a/published/20150612 Inside NGINX--How We Designed for Performance and Scale.md b/published/20150612 Inside NGINX--How We Designed for Performance and Scale.md new file mode 100644 index 0000000000..ffa8dc6d7e --- /dev/null +++ b/published/20150612 Inside NGINX--How We Designed for Performance and Scale.md @@ -0,0 +1,175 @@ +深入 NGINX: 我们如何设计性能和扩展 +================================================================================ + +NGINX 能在 web 性能中取得领先地位,这是由于其软件设计所决定的。许多 web 服务器和应用程序服务器使用一个简单的线程或基于流程的架构,NGINX 立足于一个复杂的事件驱动的体系结构,使它能够在现代硬件上扩展到成千上万的并发连接。 + +这张[深入 NGINX][1] 的信息图从高层次的流程架构深度挖掘说明了 NGINX 如何在单一进程里保持多个连接。这篇博客进一步详细地解释了这一切是如何工作的。 + +### 知识 – NGINX进程模型 ### + +![Master Process](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.36.30-PM.png) + +为了更好的理解这个设计,你需要理解 NGINX 如何运行的。NGINX 有一个主进程(它执行特权操作,如读取配置和绑定端口)和一些工作进程与辅助进程。 + + # service nginx restart + * Restarting nginx + # ps -ef --forest | grep nginx + root 32475 1 0 13:36 ? 00:00:00 nginx: master process /usr/sbin/nginx \ + -c /etc/nginx/nginx.conf + nginx 32476 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32477 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32479 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32480 32475 0 13:36 ? 00:00:00 \_ nginx: worker process + nginx 32481 32475 0 13:36 ? 00:00:00 \_ nginx: cache manager process + nginx 32482 32475 0 13:36 ? 00:00:00 \_ nginx: cache loader process + +在四核服务器,NGINX 主进程创建了4个工作进程和两个管理磁盘内容缓存的缓存辅助进程。 + +### 为什么架构很重要? ### + +任何 Unix 应用程序的根本基础是线程或进程。(从 Linux 操作系统的角度来看,线程和进程大多是相同的,主要的区别是他们共享内存的程度。)一个线程或进程是一个自包含的指令集,操作系统可以在一个 CPU 核心上调度运行它们。大多数复杂的应用程序并行运行多个线程或进程有两个原因: + +- 它们可以同时使用更多的计算核心。 +- 线程或进程可以轻松实现并行操作。(例如,在同一时刻保持多连接)。 + +进程和线程消耗资源。他们每个都使用内存和其他系统资源,他们会在 CPU 核心中换入和换出(一个操作可以叫做上下文切换)。大多数现代服务器可以并行保持上百个小型的、活动的线程或进程,但是一旦内存耗尽或高 I/O 压力引起大量的上下文切换会导致性能严重下降。 + +网络应用程序设计的常用方法是为每个连接分配一个线程或进程。此体系结构简单、容易实现,但是当应用程序需要处理成千上万的并发连接时这种结构就不具备扩展性。 + +### NGINX 如何工作? ### + +NGINX 使用一种可预测的进程模式来分配可使用的硬件资源: + +- 主进程(master)执行特权操作,如读取配置和绑定端口,然后创建少量的子进程(如下的三种类型)。 +- 缓存加载器进程(cache loader)在加载磁盘缓存到内存中时开始运行,然后退出。适当的调度,所以其资源需求很低。 +- 缓存管理器进程(cache manager)定期裁剪磁盘缓存中的记录来保持他们在配置的大小之内。 +- 工作进程(worker)做所有的工作!他们保持网络连接、读写内容到磁盘,与上游服务器通信。 + +在大多数情况下 NGINX 的配置建议:每个 CPU 核心运行一个工作进程,这样最有效地利用硬件资源。你可以在配置中包含 [worker_processes auto][2]指令配置: + + worker_processes auto; + +当一个 NGINX 服务处于活动状态,只有工作进程在忙碌。每个工作进程以非阻塞方式保持多连接,以减少上下文交换。 + +每个工作进程是一个单一线程并且独立运行,它们会获取新连接并处理之。这些进程可以使用共享内存通信来共享缓存数据、会话持久性数据及其它共享资源。(在 NGINX 1.7.11 及其以后版本,还有一个可选的线程池,工作进程可以转让阻塞的操作给它。更多的细节,参见“[NGINX 线程池可以爆增9倍性能!][16]”。对于 NGINX Plus 用户,该功能计划在今年晚些时候加入到 R7 版本中。) + +### NGINX 工作进程内部 ### + +![](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.39.48-PM.png) + +每个 NGINX 工作进程按照 NGINX 配置初始化,并由主进程提供一组监听端口。 + +NGINX 工作进程首先在监听套接字上等待事件([accept_mutex][3] 和[内核套接字分片][4])。事件被新进来的连接初始化。这些连接被分配到一个状态机 – HTTP 状态机是最常用的,但 NGINX 也实现了流式(原始 TCP )状态机和几种邮件协议(SMTP、IMAP和POP3)的状态机。 + +![Internet Requests](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.40.32-PM.png) + +状态机本质上是一组指令,告诉 NGINX 如何处理一个请求。大多数 web 服务器像 NGINX 一样使用类似的状态机来实现相同的功能 - 区别在于实现。 + +### 调度状态机 ### + +把状态机想象成国际象棋的规则。每个 HTTP 事务是一个象棋游戏。一方面棋盘是 web 服务器 —— 一位大师可以非常迅速地做出决定。另一方面是远程客户端 —— 在一个相对较慢的网络下 web 浏览器访问网站或应用程序。 + +不管怎样,这个游戏规则很复杂。例如,web 服务器可能需要与各方沟通(代理一个上游的应用程序)或与身份验证服务器对话。web 服务器的第三方模块甚至可以扩展游戏规则。 + +#### 一个阻塞状态机 #### + +回忆我们之前的描述,一个进程或线程就像一套独立的指令集,操作系统可以在一个 CPU 核心上调度运行它。大多数 web 服务器和 web 应用使用每个连接一个进程或者每个连接一个线程的模式来玩这个“象棋游戏”。每个进程或线程都包含玩完“一个游戏”的指令。在服务器运行该进程的期间,其大部分的时间都是“阻塞的” —— 等待客户端完成它的下一步行动。 + +![Blocking I/O](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.40.52-PM.png) + +1. web 服务器进程在监听套接字上监听新连接(客户端发起新“游戏”) +1. 当它获得一个新游戏,就玩这个游戏,每走一步去等待客户端响应时就阻塞了。 +1. 游戏完成后,web 服务器进程可能会等待是否有客户机想要开始一个新游戏(这里指的是一个“保持的”连接)。如果这个连接关闭了(客户端断开或者发生超时),web 服务器进程会返回并监听一个新“游戏”。 + +要记住最重要的一点是每个活动的 HTTP 连接(每局棋)需要一个专用的进程或线程(象棋高手)。这个结构简单容并且易扩展第三方模块(“新规则”)。然而,还是有巨大的不平衡:尤其是轻量级 HTTP 连接其实就是一个文件描述符和小块内存,映射到一个单独的线程或进程,这是一个非常重量级的系统对象。这种方式易于编程,但太过浪费。 + +#### NGINX是一个真正的象棋大师 #### + +也许你听过[同时表演赛][5]游戏,有一个象棋大师同时对战许多对手? + +![Kiril Georgiev](http://cdn.nginx.com/wp-content/uploads/2015/06/Kiril-Georgiev.gif) + +*[列夫·吉奥吉夫在保加利亚的索非亚同时对阵360人][6]。他的最终成绩是284胜70平6负。* + +这就是 NGINX 工作进程如何“下棋”的。每个工作进程(记住 - 通常每个CPU核心上有一个工作进程)是一个可同时对战上百人(事实是,成百上千)的象棋大师。 + +![Event-driven Architecture](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.13-PM.png) + +1. 工作进程在监听和连接套接字上等待事件。 +1. 事件发生在套接字上,并且由工作进程处理它们: + - 在监听套接字的事件意味着一个客户端已经开始了一局新棋局。工作进程创建了一个新连接套接字。 + - 在连接套接字的事件意味着客户端已经下了一步棋。工作进程及时响应。 + +一个工作进程在网络流量上从不阻塞,等待它的“对手”(客户端)做出反应。当它下了一步,工作进程立即继续其他的游戏,在那里工作进程正在处理下一步,或者在门口欢迎一个新玩家。 + +#### 为什么这个比阻塞式多进程架构更快? #### + +NGINX 每个工作进程很好的扩展支撑了成百上千的连接。每个连接在工作进程中创建另外一个文件描述符和消耗一小部分额外内存。每个连接有很少的额外开销。NGINX 进程可以固定在某个 CPU 上。上下文交换非常罕见,一般只发生在没有工作要做时。 + +在阻塞方式,每个进程一个连接的方法中,每个连接需要大量额外的资源和开销,并且上下文切换(从一个进程切换到另一个)非常频繁。 + +更详细的解释,看看这篇关于 NGINX 架构的[文章][7],它由NGINX公司开发副总裁及共同创始人 Andrew Alexeev 写的。 + +通过适当的[系统优化][8],NGINX 的每个工作进程可以扩展来处理成千上万的并发 HTTP 连接,并能脸不红心不跳的承受峰值流量(大量涌入的新“游戏”)。 + +### 更新配置和升级 NGINX ### + +NGINX 的进程体系架构使用少量的工作进程,有助于有效的更新配置文件甚至 NGINX 程序本身。 + +![Updating Configuration](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.33-PM.png) + +更新 NGINX 配置文件是非常简单、轻量、可靠的操作。典型的就是运行命令 `nginx –s reload`,所做的就是检查磁盘上的配置并发送 SIGHUP 信号给主进程。 + +当主进程接收到一个 SIGHUP 信号,它会做两件事: + +- 重载配置文件和分支出一组新的工作进程。这些新的工作进程立即开始接受连接和处理流量(使用新的配置设置) +- 通知旧的工作进程优雅的退出。工作进程停止接受新的连接。当前的 http 请求一旦完成,工作进程就彻底关闭这个连接(那就是,没有残存的“保持”连接)。一旦所有连接关闭,这个工作进程就退出。 + +这个重载过程能引发一个 CPU 和内存使用的小峰值,但是跟活动连接加载的资源相比它一般不易察觉。每秒钟你可以多次重载配置(很多 NGINX 用户都这么做)。非常罕见的情况下,有很多世代的工作进程等待关闭连接时会发生问题,但即使是那样也很快被解决了。 + +NGINX 的程序升级过程中拿到了高可用性圣杯 —— 你可以随随时更新这个软件,不会丢失连接,停机,或者中断服务。 + +![New Binary](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.51-PM.png) + +程序升级过程类似于平滑重载配置的方法。一个新的 NGINX 主进程与原主进程并行运行,然后他们共享监听套接字。两个进程都是活动的,并且各自的工作进程处理流量。然后你可以通知旧的主进程和它的工作进程优雅的退出。 + +整个过程的详细描述在 [NGINX 管理][9]。 + +### 结论 ### + +[深入 NGINX 信息图][10] 提供一个 NGINX 功能实现的高层面概览,但在这简单的解释的背后是超过十年的创新和优化,使得 NGINX 在广泛的硬件上提供尽可能最好的性能同时保持了现代 Web 应用程序所需要的安全性和可靠性。 + +如果你想阅读更多关于NGINX的优化,查看这些优秀的资源: + +- [安装和 NGINX 性能调优][11] (webinar; Speaker Deck 上的[讲义][12]) +- [NGINX 性能调优][13] +- [开源应用架构: NGINX 篇][14] +- [NGINX 1.9.1 中的套接字分片][15] (使用 SO_REUSEPORT 套接字选项) + +-------------------------------------------------------------------------------- + +via: http://nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/ + +作者:[Owen Garrett][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://nginx.com/author/owen/ +[1]:http://nginx.com/resources/library/infographic-inside-nginx/ +[2]:http://nginx.org/en/docs/ngx_core_module.html#worker_processes +[3]:http://nginx.org/en/docs/ngx_core_module.html#accept_mutex +[4]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ +[5]:http://en.wikipedia.org/wiki/Simultaneous_exhibition +[6]:http://gambit.blogs.nytimes.com/2009/03/03/in-chess-records-were-made-to-be-broken/ +[7]:http://www.aosabook.org/en/nginx.html +[8]:http://nginx.com/blog/tuning-nginx/ +[9]:http://nginx.org/en/docs/control.html +[10]:http://nginx.com/resources/library/infographic-inside-nginx/ +[11]:http://nginx.com/resources/webinars/installing-tuning-nginx/ +[12]:https://speakerdeck.com/nginx/nginx-installation-and-tuning +[13]:http://nginx.com/blog/tuning-nginx/ +[14]:http://www.aosabook.org/en/nginx.html +[15]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ +[16]:http://nginx.com/blog/thread-pools-boost-performance-9x/ diff --git a/translated/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md b/translated/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md deleted file mode 100644 index fcf195115d..0000000000 --- a/translated/tech/20150612 Inside NGINX--How We Designed for Performance and Scale.md +++ /dev/null @@ -1,174 +0,0 @@ -NGINX内部: 我们如何设计性能和扩展 -================================================================================ -NGINX是web应用中性能最好的一个,这一切都是由于软件设计。而许多web服务器和应用程序服务器使用一个简单的线程或基于流程的架构,NGINX立足于一个复杂的事件驱动的体系结构,使它能够在现代硬件上扩展到成千上万的并发连接。 - -[NGINX内部][1]信息图从高级流程架构深度挖掘说明了NGINX如何在单进程里保持多连接。这个博客进一步详细地解释了这一切是如何工作的。 - -### 知识 – NGINX进程模型 ### - -![Master Process](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.36.30-PM.png) - -为了更好的理解这个设计,你需要理解NGINX如何运行的。NGINX有一个主进程(它执行特权操作如读取配置和绑定端口)和一些工作进程与辅助进程。 - - # service nginx restart - * Restarting nginx - # ps -ef --forest | grep nginx - root 32475 1 0 13:36 ? 00:00:00 nginx: master process /usr/sbin/nginx \ - -c /etc/nginx/nginx.conf - nginx 32476 32475 0 13:36 ? 00:00:00 \_ nginx: worker process - nginx 32477 32475 0 13:36 ? 00:00:00 \_ nginx: worker process - nginx 32479 32475 0 13:36 ? 00:00:00 \_ nginx: worker process - nginx 32480 32475 0 13:36 ? 00:00:00 \_ nginx: worker process - nginx 32481 32475 0 13:36 ? 00:00:00 \_ nginx: cache manager process - nginx 32482 32475 0 13:36 ? 00:00:00 \_ nginx: cache loader process - -在四核服务器,NGINX主进程创建4工作进程和两个管理磁盘内容缓存的缓存辅助进程。 - -### 为什么架构很重要? ### - -任何Unix应用程序的根本基础是线程或进程。(从Linux操作系统的角度来看,线程和进程大多是相同的,主要的区别是他们共享内存的程度。)一个线程或进程是一个独立的指令,操作系统可以运行在一个CPU核心。大多数复杂的应用程序并行运行多个线程或进程有两个原因: - -- 他们可以同时使用更多的计算核心。 -- 线程或进程可以轻松实现并行操作。(例如,在同一时刻保持多连接)。 - -进程和线程消耗资源。他们每个都使用内存和其他系统资源,他们需要被交换进出核心(一个操作可以叫做上下文切换)。大多数现代服务器可以保持上百小型、活动的并发连接,一旦内存耗尽或高I/O压力引起大量的上下文切换性能会严重下降。 - -网络应用程序设计的常用方法是为每个连接分配一个线程或进程。此体系结构简单、容易实现,但是当应用程序需要处理成千上万的并发连接时这种结构不具规模。 - -### NGINX如何工作? ### - -NGINX使用一种可预测进程模式,被调到了可使用的硬件资源上: - -- 主进程执行特权操作,如读取配置和绑定端口,然后创建一个小数量的子进程(接下来的三种类型)。 -- 缓存加载程序进程在加载磁盘缓存到内存中时开始运行,然后退出。它被适当的安排,所以其资源需求很低。 -- 缓存管理器进程定期修剪磁盘缓存中的记录来保持他们在配置的大小之内。 -- 工作进程做所有的工作!他们保持网络连接、读写内容到磁盘,与上游服务器通信。 - -在大多数情况下建议NGINX的配置 – 每个CPU核心运行一个工作进程 – 最有效地利用硬件资源。你的配置包含了[worker_processes auto][2]指令配置: - - worker_processes auto; - -当一个NGINX服务处于活动状态,只有工作进程是忙碌的。每个工作进程以非阻塞方式保持多连接,减少上下文交换。 - -每个工作进程是一个单线程并且独立运行,获取新链接并处理他们。这些进程可以使用共享内存通信来共享缓存数据,会话持久性数据,和其他共享资源。 - -### NGINX工作进程内部 ### - -![](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.39.48-PM.png) - -NGINX主进程通过NGINX配置初始化每个工作进程并提供一组监听端口。 - -NGINX工作进程首先在监听套接字上等待事件([accept_mutex][3]和[内核套接字分片][4])。事件被新进来的链接初始化。这些连接被分配到一个状态机 – HTTP状态机是最常用的,但NGINX也具备流式(原始的TCP)状态机和大量的邮件协议(SMTP、IMAP和POP3)。 - -![Internet Requests](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.40.32-PM.png) - -状态机本质上是一组指令,告诉NGINX如何处理一个请求。大多数web服务器执行相同的函数作为NGINX使用类似的状态机 - 区别在于实现。 - -### 调度状态机 ### - -把状态机想象成国际象棋的规则。每个HTTP事务是一个象棋游戏。一方面棋盘是web服务器 – 一位大师可以非常迅速地做出决定。另一方面是远程客户端 – 在一个相对较慢的网络下web浏览器访问网站或应用程序。 - -不管咋地,这个游戏规则很复杂。例如,web服务器可能需要与各方沟通(代理一个上游的应用程序)或与身份验证服务器对话。web服务器的第三方模块甚至可以扩展游戏规则。 - -#### 一个阻塞状态机 #### - -回忆我们描述一个进程或线程就像一个独立的指令集,操作系统可以调度运行它在一个CPU核心。大多数web服务器和web应用使用一个进程一个链接或者一个线程一个链接的模式来运行这个“象棋游戏”。每个进程或线程都包含指令来玩“一个游戏”直到结束。一次进程在服务器运行,它花费大部分的时间“阻塞” - 等待客户端完成它的下一步行动。 - -![Blocking I/O](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.40.52-PM.png) - -1. web服务器进程在监听套接字监听新连接(客户端发起新“游戏”) -1. 当它获得一个新游戏,就玩这个游戏,每走一步去等待客户端响应时就阻塞了。 -1. 游戏完成后,web服务器进程可能会等待是否有客户机想要开始一个新游戏(这对应于一个保持连接)。如果这个链接关闭了(客户端离开或者发生超时),web服务器进程返回监听一个新“游戏”。 - -要记住最重要的一点是每个活动的HTTP链接(每局棋)需要一个专用的进程或线程(象棋高手)。这个结构简单容并且易扩展第三方模块(“新规则”)。无论如何,还是有巨大的不平衡:尤其是轻量的HTTP链接,作为代表是一个文件描述符和小量的内存,映射到一个单独的线程或进程,一个非常重量的系统对象。这种方式易于编程,但太过浪费。 - -#### NGINX是一个真正的象棋大师 #### - -也许你听过[同时表演赛][5]游戏,有一个象棋大师同时对战许多对手? - -![Kiril Georgiev](http://cdn.nginx.com/wp-content/uploads/2015/06/Kiril-Georgiev.gif) - -[列夫·吉奥吉夫在保加利亚的索非亚同时对阵360人][6]。他的最终成绩是284胜70平6负。 - -这就是NGINX工作进程如何“下棋”的。每个工作进程(记住 - 通常每个CPU核心上有一个工作进程)是一个可同时对战上百人(事实是,成百上千)的象棋大师。 - -![Event-driven Architecture](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.13-PM.png) - -1. 工作进程在监听和链接套接字上等待事件。 -1. 事件发生在套接字并且由工作进程处理它们: - - - 在监听套接字的事件意味着一个客户端已经开始了一局新棋局。工作进程创建了一个新链接套接字。 - - 在链接套接字的事件意味着客户端已经下了一步棋。工作进程快速的响应。 - -一个工作进程在网络流量上从不阻塞,等待它的“对手”(客户端)做出反应。当它下了一步,工作进程立即继续其他的游戏,在那里工作进程正在处理下一步,或者在门口欢迎一个新玩家。 - -### 为什么这个比阻塞式多进程架构更快? ### - -NGINX每个工作进程很好的扩展支撑了成百上千的链接。每个链接在工作进程中创建另一个文件描述符和消耗一小部分额外内存。每个链接很少有额外的开销。NGINX进程可以固定在一些CPU上。上下文交换非常罕见,只发生在没有工作要做。 - -阻塞方式,一个链接一个进程的方法中,每个连接需要大量额外的资源和开销,和上下文切换(从一个进程切换到另一个)非常频繁 - -更详细的解释,看看这个[文章][7]关于NGINX架构,由NGINX公司发展副总裁和创始人之一 Andrew Alexeev 著。 - -适当的[系统优化][8],NGINX的每个工作进程可以扩展来处理成千上万的并发HTTP连接,并能脸不红心不跳的承受峰值流量(大量涌入的新“游戏”)。 - -### 更新配置和升级NGINX ### - -NGINX是过程体系架构,有一小部分工作进程,有助于有效的更新配置文件甚至NGINX程序本身。 - -![Updating Configuration](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.33-PM.png) - -更新NGINX配置文件是非常简单、轻量、可靠的操作。它通常意味着运行命令`nginx –s reload`,所做的就是检查磁盘上的配置并发送SIGHUP信号给主进程。 - -当主进程接收到一个SIGHUP信号,它会做两件事: - -- 重载配置文件和分出一组新的工作进程。这些新的工作进程立即开始接受连接和处理流量(使用新的配置设置) -- 通知旧的工作进程优雅的退出。工作进程停止接受新的链接。当前的http请求一完成,工作进程就彻底关闭这个链接(那就是,没有残存的保持链接)。一旦所有链接关闭,这个工作进程就退出。 - -这个重载过程能引发一个CPU和内存使用的小峰值,但是跟活动链接加载的支援比它一般不易察觉。你可以每秒多次重载配置(很多NGINX用户都这么做)。很少情况下,问题发生在很多代的工作进程等待关闭连接时,但即使是那样也很快被解决了。 - -NGINX的程序升级过程中实现了高可用的圣杯 - 你可以随随时更新这个软件,不会丢失连接,停机,或者中断服务。 - -![New Binary](http://cdn.nginx.com/wp-content/uploads/2015/06/Screen-Shot-2015-06-08-at-12.41.51-PM.png) - -程序升级过程很像优雅的重载配置的方法。一个新的NGINX主进程与原主进程并行运行,然后他们共享监听套接字。两个进程都是活动的,并且各自的工作进程处理流量。然后你可以通知旧主进程和他的工作进程优雅的退出。 - -整个进程的详细描述在[NGINX管理][9]. - -### 结论 ### - -[NGINX内部信息图][10] 提供一个NGINX功能实现的高级的概况,但在这简单的解释是超过十年的创新和优化,使Nginx在一个范围广泛的硬件上提供尽可能最好的性能同时保持现代Web应用程序需要的安全性和可靠性。 - -如果你想阅读更多关于NGINX的优化,查看这些优秀的资源: - -- [Installing and Tuning NGINX for Performance][11] (webinar; [slides][12] at Speaker Deck) -- [Tuning NGINX for Performance][13] -- [The Architecture of Open Source Applications – NGINX][14] -- [Socket Sharding in NGINX Release 1.9.1][15] (using the SO_REUSEPORT socket option) - --------------------------------------------------------------------------------- - -via: http://nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/ - -作者:[Owen Garrett][a] -译者:[wyangsun](https://github.com/wyangsun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://nginx.com/author/owen/ -[1]:http://nginx.com/resources/library/infographic-inside-nginx/ -[2]:http://nginx.org/en/docs/ngx_core_module.html#worker_processes -[3]:http://nginx.org/en/docs/ngx_core_module.html#accept_mutex -[4]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ -[5]:http://en.wikipedia.org/wiki/Simultaneous_exhibition -[6]:http://gambit.blogs.nytimes.com/2009/03/03/in-chess-records-were-made-to-be-broken/ -[7]:http://www.aosabook.org/en/nginx.html -[8]:http://nginx.com/blog/tuning-nginx/ -[9]:http://nginx.org/en/docs/control.html -[10]:http://nginx.com/resources/library/infographic-inside-nginx/ -[11]:http://nginx.com/resources/webinars/installing-tuning-nginx/ -[12]:https://speakerdeck.com/nginx/nginx-installation-and-tuning -[13]:http://nginx.com/blog/tuning-nginx/ -[14]:http://www.aosabook.org/en/nginx.html -[15]:http://nginx.com/blog/socket-sharding-nginx-release-1-9-1/ From f0390f1db964ac320c5d98c7600fd615b532fcd8 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 23 Jun 2015 23:47:58 +0800 Subject: [PATCH 1252/2517] PUB:20150527 How To Check Laptop CPU Temperature In Ubuntu @geekpi --- ...27 How To Check Laptop CPU Temperature In Ubuntu.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150527 How To Check Laptop CPU Temperature In Ubuntu.md (82%) diff --git a/translated/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md b/published/20150527 How To Check Laptop CPU Temperature In Ubuntu.md similarity index 82% rename from translated/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md rename to published/20150527 How To Check Laptop CPU Temperature In Ubuntu.md index ace8999edb..c158770b3f 100644 --- a/translated/tech/20150527 How To Check Laptop CPU Temperature In Ubuntu.md +++ b/published/20150527 How To Check Laptop CPU Temperature In Ubuntu.md @@ -2,9 +2,9 @@ ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Monitor_temperature_Ubuntu.png) -笔记本过热是最近一个常见的问题。监控硬件温度或许可以帮助你诊断笔记本为什么会过热。本篇中,我们会**了解如何在Ubuntu中检查CPU的温度**。 +夏天到了,笔记本过热是最近一个常见的问题。监控硬件温度或许可以帮助你诊断笔记本为什么会过热。本篇中,我们会**了解如何在Ubuntu中检查CPU的温度**。 -我们将使用一个GUI工具[Psensor][1],它允许你在Linux中监控硬件温度。用Psensor你可以: +我们将使用一个GUI工具[Psensor][1],它允许你在Linux中监控硬件温度。用Psensor你可以: - 监控cpu和主板的温度 - 监控NVidia GPU的文档 @@ -17,7 +17,7 @@ Psensor最新的版本同样提供了Ubuntu中的指示小程序,这样使得 ### 如何在Ubuntu 15.04 和 14.04中安装Psensor ### -在安装Psensor前,你需要安装和配置[lm-sensors][2],一个用于硬件监控的命令行工具。如果你想要测量磁盘温度,你还需要安装[hddtemp][3]。要安装这些工具,运行下面的这些命令: +在安装Psensor前,你需要安装和配置[lm-sensors][2],这是一个用于硬件监控的命令行工具。如果你想要测量磁盘温度,你还需要安装[hddtemp][3]。要安装这些工具,运行下面的这些命令: sudo apt-get install lm-sensors hddtemp @@ -45,7 +45,7 @@ Psensor最新的版本同样提供了Ubuntu中的指示小程序,这样使得 sudo apt-get install psensor -安装完成后,在Unity Dash中运行程序。第一次运行时,你应该配置Psensor该监控什么状态。 +安装完成后,在Unity Dash中运行程序。第一次运行时,你应该配置Psensor该监控什么状态。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/05/Psensor_Ubuntu.jpeg) @@ -73,7 +73,7 @@ via: http://itsfoss.com/check-laptop-cpu-temperature-ubuntu/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 6fe570b0986a023782d75b20c634f2a9335152ff Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 24 Jun 2015 00:16:13 +0800 Subject: [PATCH 1253/2517] PUB:20150520 How to Use Docker Machine with a Cloud Provider @goreliu --- ...se Docker Machine with a Cloud Provider.md | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) rename {translated/tech => published}/20150520 How to Use Docker Machine with a Cloud Provider.md (65%) diff --git a/translated/tech/20150520 How to Use Docker Machine with a Cloud Provider.md b/published/20150520 How to Use Docker Machine with a Cloud Provider.md similarity index 65% rename from translated/tech/20150520 How to Use Docker Machine with a Cloud Provider.md rename to published/20150520 How to Use Docker Machine with a Cloud Provider.md index acf052d493..78909dfced 100644 --- a/translated/tech/20150520 How to Use Docker Machine with a Cloud Provider.md +++ b/published/20150520 How to Use Docker Machine with a Cloud Provider.md @@ -1,7 +1,7 @@ -如何在云服务提供商的机器使用Docker Machine +如何在云服务提供商的平台上使用Docker Machine ================================================================================ -大家好,今天我们来学习如何使用Docker Machine在各种云服务提供商的平台部署Docker。Docker Machine是一个可以帮助我们在自己的电脑、云服务提供商的机器以及我们数据中心的机器上创建Docker机器的应用程序。它为创建服务器、在服务器中安装Docker、根据用户需求配置Docker客户端提供了简单的解决方案。驱动API对本地机器、数据中心的虚拟机或者公用云机器都适用。Docker Machine支持Windows、OSX和Linux,并且提供一个独立的二进制文件,可以直接使用。它让我们可以充分利用支持Docker的基础设施的生态环境合作伙伴,并且使用相同的接口进行访问。它让人们可以使用一个命令来简单而迅速地在不同的云平台部署Docker容器。 - + +大家好,今天我们来了解如何使用Docker Machine在各种云服务提供商的平台上部署Docker。Docker Machine是一个可以帮助我们在自己的电脑、云服务提供商的平台以及我们数据中心的机器上创建Docker机器的应用程序。它为创建服务器、在服务器中安装Docker、根据用户需求配置Docker客户端提供了简单的解决方案。驱动API对本地机器、数据中心的虚拟机或者公用云机器都适用。Docker Machine支持Windows、OSX和Linux,并且提供一个独立的二进制文件,可以直接使用。它让我们可以充分利用支持Docker的基础设施的生态环境合作伙伴,并且使用相同的接口进行访问。它让人们可以使用一个命令来简单而迅速地在不同的云平台部署Docker容器。 ### 1. 安装Docker Machine ### @@ -25,14 +25,14 @@ Docker Machine可以很好地支持每一种Linux发行版。首先,我们需 ![Installing Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) -另外机器上需要有docker命令,可以使用如下命令安装: +要在我们的机器上启用docker命令,需要使用如下命令安装Docker客户端: # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker # chmod +x /usr/local/bin/docker ### 2. 创建机器 ### -在自己的Linux机器上安装好了Docker Machine之后,我们想要将一个docker虚拟机部署到云服务器上。Docker Machine支持几个流行的云平台,如igital Ocean、Amazon Web Services(AWS)、Microsoft Azure、Google Cloud Computing等等,所以我们可以在不同的平台使用相同的接口来部署Docker。本文中我们会使用digitalocean驱动在Digital Ocean的服务器上部署Docker,--driver选项指定digitalocean驱动,--digitalocean-access-token选项指定[Digital Ocean Control Panel][1]提供的API Token,命令最后的是我们创建的Docker虚拟机的机器名。运行如下命令: +在自己的Linux机器上安装好了Docker Machine之后,我们想要将一个docker虚拟机部署到云服务器上。Docker Machine支持几个流行的云平台,如igital Ocean、Amazon Web Services(AWS)、Microsoft Azure、Google Cloud Computing及其它等等,所以我们可以在不同的平台使用相同的接口来部署Docker。本文中我们会使用digitalocean驱动在Digital Ocean的服务器上部署Docker,--driver选项指定digitalocean驱动,--digitalocean-access-token选项指定[Digital Ocean Control Panel][1]提供的API Token,命令最后的是我们创建的Docker虚拟机的机器名。运行如下命令: # docker-machine create --driver digitalocean --digitalocean-access-token linux-dev @@ -40,7 +40,7 @@ Docker Machine可以很好地支持每一种Linux发行版。首先,我们需 ![Docker Machine Digitalocean Cloud](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-digitalocean-cloud.png) -**注意**: 这里linux-dev是我们将要创建的机器的名称。``是一个安全key,可以在Digtal Ocean Control Panel生成。要找到这个key,我们只需要登录到我们的Digital Ocean Control Panel,然后点击API,再点击Generate New Token,填写一个名称,选上Read和Write。然后我们就会得到一串十六进制的key,那就是``,简单地替换到上边的命令中即可。 +**注意**: 这里linux-dev是我们将要创建的机器的名称。``是一个安全key,可以在Digtal Ocean Control Panel生成。要找到这个key,我们只需要登录到我们的Digital Ocean Control Panel,然后点击API,再点击 Generate New Token,填写一个名称,选上Read和Write。然后我们就会得到一串十六进制的key,那就是``,简单地替换到上边的命令中即可。 运行如上命令后,我们可以在Digital Ocean Droplet Panel中看到一个具有默认配置的droplet已经被创建出来了。 @@ -48,35 +48,35 @@ Docker Machine可以很好地支持每一种Linux发行版。首先,我们需 简便起见,docker-machine会使用默认配置来部署Droplet。我们可以通过增加选项来定制我们的Droplet。这里是一些digitalocean相关的选项,我们可以使用它们来覆盖Docker Machine所使用的默认配置。 - --digitalocean-image "ubuntu-14-04-x64" 是选择Droplet的镜像 - --digitalocean-ipv6 enable 是启用IPv6网络支持 - --digitalocean-private-networking enable 是启用专用网络 - --digitalocean-region "nyc3" 是选择部署Droplet的区域 - --digitalocean-size "512mb" 是选择内存大小和部署的类型 +- --digitalocean-image "ubuntu-14-04-x64" 用于选择Droplet的镜像 +- --digitalocean-ipv6 enable 启用IPv6网络支持 +- --digitalocean-private-networking enable 启用专用网络 +- --digitalocean-region "nyc3" 选择部署Droplet的区域 +- --digitalocean-size "512mb" 选择内存大小和部署的类型 如果你想在其他云服务使用docker-machine,并且想覆盖默认的配置,可以运行如下命令来获取Docker Mackine默认支持的对每种平台适用的参数。 # docker-machine create -h -### 3. 选择活跃机器 ### +### 3. 选择活跃主机 ### -部署Droplet后,我们想马上运行一个Docker容器,但在那之前,我们需要检查下活跃机器是否是我们需要的机器。可以运行如下命令查看。 +部署Droplet后,我们想马上运行一个Docker容器,但在那之前,我们需要检查下活跃主机是否是我们需要的机器。可以运行如下命令查看。 # docker-machine ls ![Docker Machine List](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-ls.png) -ACTIVE一列有“*”标记的是活跃机器。 +ACTIVE一列有“*”标记的是活跃主机。 -现在,如果我们想将活跃机器切换到需要的机器,运行如下命令: +现在,如果我们想将活跃主机切换到需要的主机,运行如下命令: # docker-machine active linux-dev -**注意**:这里,linux-dev是机器名,我们打算激活这个机器,并且在其中运行Docker容器。 +**注意**:这里,linux-dev是机器名,我们打算激活这个机器,并且在其上运行Docker容器。 ### 4. 运行一个Docker容器 ### -现在,我们已经选择了活跃机器,就可以运行Docker容器了。可以测试一下,运行一个busybox容器来执行`echo hello word`命令,这样就可以得到输出: +现在,我们已经选择了活跃主机,就可以运行Docker容器了。可以测试一下,运行一个busybox容器来执行`echo hello word`命令,这样就可以得到输出: # docker run busybox echo hello world @@ -98,9 +98,9 @@ SSH到机器上之后,我们可以在上边运行任何Docker容器。这里 # exit -### 5. 删除机器 ### +### 5. 删除主机 ### -删除在运行的机器以及它的所有镜像和容器,我们可以使用docker-machine rm命令: +删除在运行的主机以及它的所有镜像和容器,我们可以使用docker-machine rm命令: # docker-machine rm linux-dev @@ -112,15 +112,15 @@ SSH到机器上之后,我们可以在上边运行任何Docker容器。这里 ![Docker Machine Remove Check](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-remove-check.png) -### 6. 在不使用驱动的情况新增一个机器 ### +### 6. 在不使用驱动的情况新增一个主机 ### -我们可以在不使用驱动的情况往Docker增加一台机器,只需要一个URL。它可以使用一个已有机器的别名,所以我们就不需要每次在运行docker命令时输入完整的URL了。 +我们可以在不使用驱动的情况往Docker增加一台主机,只需要一个URL。它可以使用一个已有机器的别名,所以我们就不需要每次在运行docker命令时输入完整的URL了。 $ docker-machine create --url=tcp://104.131.50.36:2376 custombox -### 7. 管理机器 ### +### 7. 管理主机 ### -如果你已经让Docker运行起来了,可以使用简单的**docker-machine stop**命令来停止所有正在运行的机器,如果需要再启动的话可以运行**docker-machine start**: +如果你已经让Docker运行起来了,可以使用简单的**docker-machine stop**命令来停止所有正在运行的主机,如果需要再启动的话可以运行**docker-machine start**: # docker-machine stop # docker-machine start @@ -140,7 +140,7 @@ via: http://linoxide.com/linux-how-to/use-docker-machine-cloud-provider/ 作者:[Arun Pyasi][a] 译者:[goreliu](https://github.com/goreliu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From f197a4f2d56699d8398e1878d86e8315bb707dcb Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 24 Jun 2015 12:25:43 +0800 Subject: [PATCH 1254/2517] [Translating] tech/20150615 How to combine two graphs on Cacti.md --- sources/tech/20150615 How to combine two graphs on Cacti.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150615 How to combine two graphs on Cacti.md b/sources/tech/20150615 How to combine two graphs on Cacti.md index aeb2b2ea0c..6b13ccd612 100644 --- a/sources/tech/20150615 How to combine two graphs on Cacti.md +++ b/sources/tech/20150615 How to combine two graphs on Cacti.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to combine two graphs on Cacti ================================================================================ [Cacti][1] a fantastic open source network monitoring system that is widely used to graph network elements like bandwidth, storage, processor and memory utilization. Using its web based interface, you can create and organize graphs easily. However, some advanced features like merging graphs, creating aggregate graphs using multiple sources, migration of Cacti to another server are not provided by default. You might need some experience with Cacti to pull these off. In this tutorial, we will see how we can merge two Cacti graphs into one. From 293a2d51f00d4d69a135382c24fa82cba9738b79 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 24 Jun 2015 13:19:21 +0800 Subject: [PATCH 1255/2517] [Translated] tech/20150615 How to combine two graphs on Cacti.md --- ...0615 How to combine two graphs on Cacti.md | 92 ------------------- ...0615 How to combine two graphs on Cacti.md | 92 +++++++++++++++++++ 2 files changed, 92 insertions(+), 92 deletions(-) delete mode 100644 sources/tech/20150615 How to combine two graphs on Cacti.md create mode 100644 translated/tech/20150615 How to combine two graphs on Cacti.md diff --git a/sources/tech/20150615 How to combine two graphs on Cacti.md b/sources/tech/20150615 How to combine two graphs on Cacti.md deleted file mode 100644 index 6b13ccd612..0000000000 --- a/sources/tech/20150615 How to combine two graphs on Cacti.md +++ /dev/null @@ -1,92 +0,0 @@ -Translating by ictlyh -How to combine two graphs on Cacti -================================================================================ -[Cacti][1] a fantastic open source network monitoring system that is widely used to graph network elements like bandwidth, storage, processor and memory utilization. Using its web based interface, you can create and organize graphs easily. However, some advanced features like merging graphs, creating aggregate graphs using multiple sources, migration of Cacti to another server are not provided by default. You might need some experience with Cacti to pull these off. In this tutorial, we will see how we can merge two Cacti graphs into one. - -Consider this example. Client-A has been connected to port 5 of switch-A for the last six months. Port 5 becomes faulty, and so the client is migrated to Port 6. As Cacti uses different graphs for each interface/element, the bandwidth history of the client would be split into port 5 and port 6. So we end up with two graphs for one client - one with six months' worth of old data, and the other that contains ongoing data. - -In such cases, we can actually combine the two graphs so the old data is appended to the new graph, and we get to keep a single graph containing historic and new data for one customer. This tutorial will explain exactly how we can achieve that. - -Cacti stores the data of each graph in its own RRD (round robin database) file. When a graph is requested, the values stored in a corresponding RRD file are used to generate the graph. RRD files are stored in `/var/lib/cacti/rra` in Ubuntu/Debian systems and in `/var/www/cacti/rra` in CentOS/RHEL systems. - -The idea behind merging graphs is to alter these RRD files so the values from the old RRD file are appended to the new RRD file. - -### Scenario ### - -The services for a client is running on eth0 for over a year. Because of hardware failure, the client has been migrated to eth1 interface of another server. We want to graph the bandwidth of the new interface, while retaining the historic data for over a year. The client would see only one graph. - -### Identifying the RRD for the Graph ### - -The first step during graph merging is to identify the RRD file associated with a graph. We can check the file by opening the graph in debug mode. To do this, go to Cacti's menu: Console > Graph Management > Select Graph > Turn On Graph Debug Mode. - -#### Old graph: #### - -![](https://farm4.staticflickr.com/3853/18795518096_f50a78d082_c.jpg) - -#### New graph: #### - -![](https://farm4.staticflickr.com/3674/18634036918_5c4118c4b9_c.jpg) - -From the example output (which is based on a Debian system), we can identify the RRD files for two graphs: - -- **Old graph**: /var/lib/cacti/rra/old_graph_traffic_in_8.rrd -- **New graph**: /var/lib/cacti/rra/new_graph_traffic_in_10.rrd - -### Preparing a Script ### - -We will merge two RRD files using a [RRD splice script][2]. Download this PHP script, and install it as /var/lib/cacti/rra/rrdsplice.php (for Debian/Ubuntu) or /var/www/cacti/rra/rrdsplice.php (for CentOS/RHEL). - -Next, make sure that the file is owned by Apache user. - -On Debian or Ubuntu, run the following command: - - # chown www-data:www-data rrdsplice.php - -and update rrdsplice.php accordingly. Look for the following line: - - chown($finrrd, "apache"); - -and replace it with: - - chown($finrrd, "www-data"); - -On CentOS or RHEL, run the following command: - - # chown apache:apache rrdsplice.php - -### Merging Two Graphs ### - -The syntax usage of the script can easily be found by running it without any parameters. - - # cd /path/to/rrdsplice.php - # php rrdsplice.php - ----------- - - USAGE: rrdsplice.php --oldrrd=file --newrrd=file --finrrd=file - -Now we are ready to merge two RRD files. Simply supply the names of an old RRD file and a new RRD file. We will overwrite the merged result back to the new RRD file. - - # php rrdsplice.php --oldrrd=old_graph_traffic_in_8.rrd --newrrd=new_graph_traffic_in_10.rrd --finrrd=new_graph_traffic_in_10.rrd - -Now the data from the old RRD file should be appended to the new RRD. Any new data will continue to be written by Cacti to the new RRD file. If we click on the graph, we should be able to verify that the weekly, monthly and yearly records have also been added from the old graph. The second graph in the following diagram shows weekly records from the old graph. - -![](https://farm6.staticflickr.com/5493/18821787015_6730164068_b.jpg) - -To sum up, this tutorial showed how we can easily merge two Cacti graphs into one. This trick is useful when a service is migrated to another device/interface and we want to deal with only one graph instead of two. The script is very handy as it can join graphs regardless of the source device e.g., Cisco 1800 router and Cisco 2960 switch. - -Hope this helps. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/combine-two-graphs-cacti.html - -作者:[Sarmed Rahman][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/sarmed -[1]:http://xmodulo.com/install-configure-cacti-linux.html -[2]:http://svn.cacti.net/viewvc/developers/thewitness/rrdsplice/rrdsplice.php \ No newline at end of file diff --git a/translated/tech/20150615 How to combine two graphs on Cacti.md b/translated/tech/20150615 How to combine two graphs on Cacti.md new file mode 100644 index 0000000000..49abbf76d1 --- /dev/null +++ b/translated/tech/20150615 How to combine two graphs on Cacti.md @@ -0,0 +1,92 @@ +如何在 Cacti 中合并两幅图片 +================================================================================ +[Cacti][1] 是一个很棒的开源网络监视系统,它广泛使用于图示网络元素,例如带宽、存储、处理器和内存使用。使用它的基于网络的接口,你可以轻松地创建和组织图。然而,默认并没有提供一些高级功能,例如合并图片、使用多个来源创建聚合图、迁移 Cacti 到另一台服务器。使用 Cacti 的这些功能你还需要一些经验。在该教程中,我们会看到如何在将两幅 Cacti 图片合并为一幅。 + +考虑这个例子。在过去的 6 个月中,客户端 A 连接到了交换机 A 的端口 5。端口 5 发生了错误,因此客户端迁移到了端口 6。由于 Cacti 为每个接口/元素使用不同的图,客户端的带宽历史会分成端口 5 和端口 6。结果是对于一个客户端我们有两幅图片 - 一幅是 6 个月的旧数据,另一幅保存了后续的数据。 + +在这种情况下,我们实际上可以合并两幅图片将旧数据加到新的图中,使得用一个单独的图为一个用户保存历史的和新数据。该教程将会解释如何做到这一点。 + +Cacti 将每幅图片的数据保存在它自己的 RRD(round robin database,循环数据库) 文件中。当请求一幅图片时,根据保存在对应 RRD 文件中的值生成图。在 Ubuntu/Debian 系统中,RRD 文件保存在 `/var/lib/cacti/rra`,在 CentOS/RHEL 系统中则是 `/var/www/cacti/rra`。 + +合并图片背后的思想是更改这些 RRD 文件使得旧 RRD 文件中的值能追加到新的 RRD 文件中。 + +### 情景 ### + +一个客户端的服务在 eth0 上运行了超过一年。由于硬件损坏,客户端迁移到了另一台服务器的 eth1 接口。我们想图示新接口的带宽,同时保留超过一年的历史数据。只在一幅图中显示客户端。 + +### 确定图的 RRD 文件 ### + +图合并的首个步骤是确定和图关联的 RRD 文件。我们可以通过以调试模式打开图检查文件。要做到这点,在 Cacti 的菜单中: 控制台 > 管理图 > 选择图 > 打开图调试模式。 + +#### 旧图: #### + +![](https://farm4.staticflickr.com/3853/18795518096_f50a78d082_c.jpg) + +#### 新图: #### + +![](https://farm4.staticflickr.com/3674/18634036918_5c4118c4b9_c.jpg) + +从样例输出(基于 Debian 系统)中,我们可以确定两幅图片的 RRD 文件: +From the example output (which is based on a Debian system), we can identify the RRD files for two graphs: + +- **旧图**: /var/lib/cacti/rra/old_graph_traffic_in_8.rrd +- **新图**: /var/lib/cacti/rra/new_graph_traffic_in_10.rrd + +### 准备脚本 ### + +我们会用一个 [RRD 剪接脚本][2] 合并两个 RRD 文件。下载该 PHP 脚本,并安装为 /var/lib/cacti/rra/rrdsplice.php (Debian/Ubuntu 系统) 或 /var/www/cacti/rra/rrdsplice.php (CentOS/RHEL 系统)。 + +下一步,确认 Apache 用户拥有该文件。 + +在 Debian 或 Ubuntu 系统中,运行下面的命令: + + # chown www-data:www-data rrdsplice.php + +并更新 rrdsplice.php。查找下面的行: + + chown($finrrd, "apache"); + +用下面的语句替换: + + chown($finrrd, "www-data"); + +在 CentOS 或 RHEL 系统中,运行下面的命令: + + # chown apache:apache rrdsplice.php + +### 合并两幅图 ### + +通过不带任何参数运行该脚本可以获得脚本的使用语法。 + + # cd /path/to/rrdsplice.php + # php rrdsplice.php + +---------- + + USAGE: rrdsplice.php --oldrrd=file --newrrd=file --finrrd=file + +现在我们准备好合并两个 RRD 文件了。只需要指定旧 RRD 文件和新 RRD 文件的名称。我们会将合并后的结果重写到新 RRD 文件中。 + + # php rrdsplice.php --oldrrd=old_graph_traffic_in_8.rrd --newrrd=new_graph_traffic_in_10.rrd --finrrd=new_graph_traffic_in_10.rrd + +现在旧 RRD 文件中的数据已经追加到了新 RRD 文件中。Cacti 会将任何新数据写到新 RRD 文件中。如果我们点击图,我们可以发现也已经添加了旧图的周、月、年记录。下面图表中的第二幅图显示了旧图的周记录。 + +![](https://farm6.staticflickr.com/5493/18821787015_6730164068_b.jpg) + +总之,该教程显示了如何简单地将两幅 Cacti 图片合并为一幅。当服务迁移到另一个设备/接口,我们希望只处理一幅图片而不是两幅时,这个小技巧非常有用。该脚本非常方便,因为它可以不管源设备合并图片,例如 Cisco 1800 路由器和 Cisco 2960 交换机。 + +希望这些能对你有所帮助。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/combine-two-graphs-cacti.html + +作者:[Sarmed Rahman][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://xmodulo.com/install-configure-cacti-linux.html +[2]:http://svn.cacti.net/viewvc/developers/thewitness/rrdsplice/rrdsplice.php \ No newline at end of file From 99cae4e77407ce83c4293168b088853f299402ad Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 24 Jun 2015 16:38:14 +0800 Subject: [PATCH 1256/2517] [Translated] tech/20150615 How to combine two graphs on Cacti.md --- translated/tech/20150615 How to combine two graphs on Cacti.md | 1 - 1 file changed, 1 deletion(-) diff --git a/translated/tech/20150615 How to combine two graphs on Cacti.md b/translated/tech/20150615 How to combine two graphs on Cacti.md index 49abbf76d1..db320b204e 100644 --- a/translated/tech/20150615 How to combine two graphs on Cacti.md +++ b/translated/tech/20150615 How to combine two graphs on Cacti.md @@ -27,7 +27,6 @@ Cacti 将每幅图片的数据保存在它自己的 RRD(round robin database,循 ![](https://farm4.staticflickr.com/3674/18634036918_5c4118c4b9_c.jpg) 从样例输出(基于 Debian 系统)中,我们可以确定两幅图片的 RRD 文件: -From the example output (which is based on a Debian system), we can identify the RRD files for two graphs: - **旧图**: /var/lib/cacti/rra/old_graph_traffic_in_8.rrd - **新图**: /var/lib/cacti/rra/new_graph_traffic_in_10.rrd From 89ac8064c98f57fbf03bbaef065ce1fb4be4fd46 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 24 Jun 2015 17:09:55 +0800 Subject: [PATCH 1257/2517] [Translating] tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md --- ...o Manage and Use LVM (Logical Volume Management) in Ubuntu.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md index ecfb639d54..35f5e5db7e 100644 --- a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md +++ b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md @@ -1,3 +1,4 @@ +Translating by ictlyh How to Manage and Use LVM (Logical Volume Management) in Ubuntu ================================================================================ ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-1.png.pagespeed.ic.VGSxDeVS9P.png) From ee5be1808b9c96f1700a931c5f4369f8ec887e90 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 25 Jun 2015 10:36:08 +0800 Subject: [PATCH 1258/2517] [Translated] tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md --- ...M (Logical Volume Management) in Ubuntu.md | 269 ------------------ ...M (Logical Volume Management) in Ubuntu.md | 268 +++++++++++++++++ 2 files changed, 268 insertions(+), 269 deletions(-) delete mode 100644 sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md create mode 100644 translated/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md diff --git a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md b/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md deleted file mode 100644 index 35f5e5db7e..0000000000 --- a/sources/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md +++ /dev/null @@ -1,269 +0,0 @@ -Translating by ictlyh -How to Manage and Use LVM (Logical Volume Management) in Ubuntu -================================================================================ -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-1.png.pagespeed.ic.VGSxDeVS9P.png) - -In our [previous article we told you what LVM is and what you may want to use it for][1], and today we are going to walk you through some of the key management tools of LVM so you will be confident when setting up or expanding your installation. - -As stated before, LVM is a abstraction layer between your operating system and physical hard drives. What that means is your physical hard drives and partitions are no longer tied to the hard drives and partitions they reside on. Rather, the hard drives and partitions that your operating system sees can be any number of separate hard drives pooled together or in a software RAID. - -To manage LVM there are GUI tools available but to really understand what is happening with your LVM configuration it is probably best to know what the command line tools are. This will be especially useful if you are managing LVM on a server or distribution that does not offer GUI tools. - -Most of the commands in LVM are very similar to each other. Each valid command is preceded by one of the following: - -- Physical Volume = pv -- Volume Group = vg -- Logical Volume = lv - -The physical volume commands are for adding or removing hard drives in volume groups. Volume group commands are for changing what abstracted set of physical partitions are presented to your operating in logical volumes. Logical volume commands will present the volume groups as partitions so that your operating system can use the designated space. - -### Downloadable LVM Cheat Sheet ### - -To help you understand what commands are available for each prefix we made a LVM cheat sheet. We will cover some of the commands in this article, but there is still a lot you can do that won’t be covered here. - -All commands on this list will need to be run as root because you are changing system wide settings that will affect the entire machine. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/01/lvm-cheatsheet.png) - -### How to View Current LVM Information ### - -The first thing you may need to do is check how your LVM is set up. The s and display commands work with physical volumes (pv), volume groups (vg), and logical volumes (lv) so it is a good place to start when trying to figure out the current settings. - -The display command will format the information so it’s easier to understand than the s command. For each command you will see the name and path of the pv/vg and it should also give information about free and used space. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/01/539x225xpvdisplay.png.pagespeed.ic.u2XV5LBTYa.png) - -The most important information will be the PV name and VG name. With those two pieces of information we can continue working on the LVM setup. - -### Creating a Logical Volume ### - -Logical volumes are the partitions that your operating system uses in LVM. To create a logical volume we first need to have a physical volume and volume group. Here are all of the steps necessary to create a new logical volume. - -#### Create physical volume #### - -We will start from scratch with a brand new hard drive with no partitions or information on it. Start by finding which disk you will be working with. (/dev/sda, sdb, etc.) - -> Note: Remember all of the commands will need to be run as root or by adding ‘sudo’ to the beginning of the command. - - fdisk -l - -If your hard drive has never been formatted or partitioned before you will probably see something like this in the fdisk output. This is completely fine because we are going to create the needed partitions in the next steps. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/fdisk.png.pagespeed.ce.AmAEsxm-7Q.png) - -Our new disk is located at /dev/sdb so lets use fdisk to create a new partition on the drive. - -There are a plethora of tools that can create a new partition with a GUI, [including Gparted][2], but since we have the terminal open already, we will use fdisk to create the needed partition. - -From a terminal type the following commands: - - fdisk /dev/sdb - -This will put you in a special fdisk prompt. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x145xfdisk00.png.pagespeed.ic.I7S8bjoXQG.png) - -Enter the commands in the order given to create a new primary partition that uses 100% of the new hard drive and is ready for LVM. If you need to change the partition size or want multiple partions I suggest using GParted or reading about fdisk on your own. - -**Warning: The following steps will format your hard drive. Make sure you don’t have any information on this hard drive before following these steps.** - -- n = create new partition -- p = creates primary partition -- 1 = makes partition the first on the disk - -Push enter twice to accept the default first cylinder and last cylinder. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/562x216xfdisk01.png.pagespeed.ic.DsSZ38kWcA.png) - -To prepare the partition to be used by LVM use the following two commands. - -- t = change partition type -- 8e = changes to LVM partition type - -Verify and write the information to the hard drive. - -- p = view partition setup so we can review before writing changes to disk -- w = write changes to disk - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/560x339xfdisk03.png.pagespeed.ic.FC8foICZsb.png) - -After those commands, the fdisk prompt should exit and you will be back to the bash prompt of your terminal. - -Enter pvcreate /dev/sdb1 to create a LVM physical volume on the partition we just created. - -You may be asking why we didn’t format the partition with a file system but don’t worry, that step comes later. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/pvcreate.png.pagespeed.ce.W7VAr-ig3t.png) - -#### Create volume Group #### - -Now that we have a partition designated and physical volume created we need to create the volume group. Luckily this only takes one command. - - vgcreate vgpool /dev/sdb1 - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/vgcreate.png.pagespeed.ce.fVLzSmPZou.png) - -Vgpool is the name of the new volume group we created. You can name it whatever you’d like but it is recommended to put vg at the front of the label so if you reference it later you will know it is a volume group. - -#### Create logical volume #### - -To create the logical volume that LVM will use: - - lvcreate -L 3G -n lvstuff vgpool - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/lvcreate.png.pagespeed.ce.vupLB-LJEW.png) - -The -L command designates the size of the logical volume, in this case 3 GB, and the -n command names the volume. Vgpool is referenced so that the lvcreate command knows what volume to get the space from. - -#### Format and Mount the Logical Volume #### - -One final step is to format the new logical volume with a file system. If you want help choosing a Linux file system, read our [how to that can help you choose the best file system for your needs][3]. - - mkfs -t ext3 /dev/vgpool/lvstuff - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/571x424xmkfs.png.pagespeed.ic.ERMan1Mz0P.png) - -Create a mount point and then mount the volume somewhere you can use it. - - mkdir /mnt/stuff - mount -t ext3 /dev/vgpool/lvstuff /mnt/stuff - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/510x69xmount.png.pagespeed.ic.k0i1tvqgcV.png) - -#### Resizing a Logical Volume #### - -One of the benefits of logical volumes is you can make your shares physically bigger or smaller without having to move everything to a bigger hard drive. Instead, you can add a new hard drive and extend your volume group on the fly. Or if you have a hard drive that isn’t used you can remove it from the volume group to shrink your logical volume. - -There are three basic tools for making physical volumes, volume groups, and logical volumes bigger or smaller. - -Note: Each of these commands will need to be preceded by pv, vg, or lv depending on what you are working with. - -- resize – can shrink or expand physical volumes and logical volumes but not volume groups -- extend – can make volume groups and logical volumes bigger but not smaller -- reduce – can make volume groups and logical volumes smaller but not bigger - -Let’s walk through an example of how to add a new hard drive to the logical volume “lvstuff” we just created. - -#### Install and Format new Hard Drive #### - -To install a new hard drive follow the steps above to create a new partition and add change it’s partition type to LVM (8e). Then use pvcreate to create a physical volume that LVM can recognize. - -#### Add New Hard Drive to Volume Group #### - -To add the new hard drive to a volume group you just need to know what your new partition is, /dev/sdc1 in our case, and the name of the volume group you want to add it to. - -This will add the new physical volume to the existing volume group. - - vgextend vgpool /dev/sdc1 - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/vgextend.png.pagespeed.ce.atRPT1yg5f.png) - -#### Extend Logical Volume #### - -To resize the logical volume we need to say how much we want to extend by size instead of by device. In our example we just added a 8 GB hard drive to our 3 GB vgpool. To make that space usable we can use lvextend or lvresize. - - lvextend -L8G /dev/vgpool/lvstuff - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/lvextend1.png.pagespeed.ce.6scXbQVUTT.png) - -While this command will work you will see that it will actually resize our logical volume to 8 GB instead of adding 8 GB to the existing volume like we wanted. To add the last 3 available gigabytes you need to use the following command. - - lvextend -L+3G /dev/vgpool/lvstuff - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/430x85xlvextend2.png.pagespeed.ic.7aBiTBrW03.png) - -Now our logical volume is 11 GB in size. - -#### Extend File System #### - -The logical volume is 11 GB but the file system on that volume is still only 3 GB. To make the file system use the entire 11 GB available you have to use the command resize2fs. Just point resize2fs to the 11 GB logical volume and it will do the magic for you. - - resize2fs /dev/vgpool/lvstuff - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/650x150xresize2fs.png.pagespeed.ic.Mx74EdMuk_.png) - -**Note: If you are using a different file system besides ext3/4 please see your file systems resize tools.** - -#### Shrink Logical Volume #### - -If you wanted to remove a hard drive from a volume group you would need to follow the above steps in reverse order and use lvreduce and vgreduce instead. - -1. resize file system (make sure to move files to a safe area of the hard drive before resizing) -1. reduce logical volume (instead of + to extend you can also use – to reduce by size) -1. remove hard drive from volume group with vgreduce - -#### Backing up a Logical Volume #### - -Snapshots is a feature that some newer advanced file systems come with but ext3/4 lacks the ability to do snapshots on the fly. One of the coolest things about LVM snapshots is your file system is never taken offline and you can have as many as you want without taking up extra hard drive space. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-2.png.pagespeed.ic.VtOUuqYX1W.png) - -When LVM takes a snapshot, a picture is taken of exactly how the logical volume looks and that picture can be used to make a copy on a different hard drive. While a copy is being made, any new information that needs to be added to the logical volume is written to the disk just like normal, but changes are tracked so that the original picture never gets destroyed. - -To create a snapshot we need to create a new logical volume with enough free space to hold any new information that will be written to the logical volume while we make a backup. If the drive is not actively being written to you can use a very small amount of storage. Once we are done with our backup we just remove the temporary logical volume and the original logical volume will continue on as normal. - -#### Create New Snapshot #### - -To create a snapshot of lvstuff use the lvcreate command like before but use the -s flag. - - lvcreate -L512M -s -n lvstuffbackup /dev/vgpool/lvstuff - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/597x68xlvcreate-snapshot.png.pagespeed.ic.Rw2ivtcpPg.png) - -Here we created a logical volume with only 512 MB because the drive isn’t being actively used. The 512 MB will store any new writes while we make our backup. - -#### Mount New Snapshot #### - -Just like before we need to create a mount point and mount the new snapshot so we can copy files from it. - - mkdir /mnt/lvstuffbackup - mount /dev/vgpool/lvstuffbackup /mnt/lvstuffbackup - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/565x68xmount-snapshot.png.pagespeed.ic.pVMkhK1o4x.png) - -#### Copy Snapshot and Delete Logical Volume #### - -All you have left to do is copy all of the files from /mnt/lvstuffbackup/ to an external hard drive or tar it up so it is all in one file. - -**Note: tar -c will create an archive and -f will say the location and file name of the archive. For help with the tar command use man tar in the terminal.** - - tar -cf /home/rothgar/Backup/lvstuff-ss /mnt/lvstuffbackup/ - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x67xsnapshot-backup.png.pagespeed.ic.tw-2AK_lfZ.png) - -Remember that while the backup is taking place all of the files that would be written to lvstuff are being tracked in the temporary logical volume we created earlier. Make sure you have enough free space while the backup is happening. - -Once the backup finishes, unmount the volume and remove the temporary snapshot. - - umount /mnt/lvstuffbackup - lvremove /dev/vgpool/lvstuffbackup/ - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/630x102xlvremove.png.pagespeed.ic.yBWk47X6lF.png) - -#### Deleting a Logical Volume #### - -To delete a logical volume you need to first make sure the volume is unmounted, and then you can use lvremove to delete it. You can also remove a volume group once the logical volumes have been deleted and a physical volume after the volume group is deleted. - -Here are all the commands using the volumes and groups we’ve created. - - umount /mnt/lvstuff - lvremove /dev/vgpool/lvstuff - vgremove vgpool - pvremove /dev/sdb1 /dev/sdc1 - -![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/580x185xdelete-lvm.png.pagespeed.ic.3zJTo0Zu9k.png) - -That should cover most of what you need to know to use LVM. If you’ve got some experience on the topic, be sure to share your wisdom in the comments. - --------------------------------------------------------------------------------- - -via: http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ - -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and-how-do-you-enable-it-in-ubuntu/ -[2]:http://www.howtogeek.com/howto/17001/how-to-format-a-usb-drive-in-ubuntu-using-gparted/ -[3]:http://www.howtogeek.com/howto/33552/htg-explains-which-linux-file-system-should-you-choose/ \ No newline at end of file diff --git a/translated/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md b/translated/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md new file mode 100644 index 0000000000..c3a84f5fcf --- /dev/null +++ b/translated/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md @@ -0,0 +1,268 @@ +如何在 Ubuntu 中管理和使用 LVM(Logical Volume Management,逻辑卷管理) +================================================================================ +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-1.png.pagespeed.ic.VGSxDeVS9P.png) + +在我们之前的文章中,我们介绍了[什么是 LVM 以及能用 LVM 做什么][1],今天我们会给你介绍一些 LVM 的主要管理工具,使得你在设置和扩展安装时更游刃有余。 + +正如之前所述,LVM 是介于你的操作系统和物理硬盘驱动器之间的抽象层。这意味着你的物理硬盘驱动器和分区不再依赖于他们所在的硬盘驱动和分区。而是,你的操作系统所见的硬盘驱动和分区可以是由任意数目的独立硬盘驱动汇集而成或是一个软件磁盘阵列。 + +要管理 LVM,这里有很多可用的 GUI 工具,但要真正理解 LVM 配置发生的事情,最好要知道一些命令行工具。这当你在一个服务器或不提供 GUI 工具的发行版上管理 LVM 时尤为有用。 + +LVM 的大部分命令和彼此都非常相似。每个可用的命令都由以下其中之一开头: + +- Physical Volume = pv +- Volume Group = vg +- Logical Volume = lv + +物理卷命令用于在卷组中添加或删除硬盘驱动。卷组命令用于为你的逻辑卷操作更改显示的物理分区抽象集。逻辑卷命令会以分区形式显示卷组使得你的操作系统能使用指定的空间。 + +### 可下载的 LVM 备忘单 ### + +为了帮助你理解每个前缀可用的命令,我们制作了一个备忘单。我们会在该文章中介绍一些命令,但仍有很多你可用但没有介绍到的命令。 + +该列表中的所有命令都要以 root 身份运行,因为你更改的是会影响整个机器系统级设置。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/01/lvm-cheatsheet.png) + +### 如何查看当前 LVM 信息 ### + +你首先需要做的事情是检查你的 LVM 设置。s 和 display 命令和物理卷(pv)、卷组(vg)以及逻辑卷(lv)一起使用,是一个找出当前设置好的开始点。 + +display 命令会格式化输出信息,因此比 s 命令更易于理解。对每个命令你会看到名称和 pv/vg 的路径,它还会给出空闲和已使用空间的信息。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/01/539x225xpvdisplay.png.pagespeed.ic.u2XV5LBTYa.png) + +最重要的信息是 PV 名称和 VG 名称。用这两部分信息我们可以继续进行 LVM 设置。 + +### 创建一个逻辑卷 ### + +逻辑卷是你的操作系统在 LVM 中使用的分区。创建一个逻辑卷,首先需要拥有一个物理卷和卷组。下面是创建一个新的逻辑卷所需要的全部命令。 + +#### 创建物理卷 #### + +我们会从一个完全新的没有任何分区和信息的硬盘驱动开始。首先找出你将要使用的磁盘。(/dev/sda, sdb, 等) + +> 注意:记住所有的命令都要以 root 身份运行或者在命令前面添加 'sudo' 。 + + fdisk -l + +如果之前你的硬盘驱动从没有格式化或分区,在 fdisk 的输出中你很可能看到类似下面的信息。这完全正常,因为我们会在下面的步骤中创建需要的分区。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/fdisk.png.pagespeed.ce.AmAEsxm-7Q.png) + +我们的新磁盘位置是 /dev/sdb,让我们用 fdisk 命令在驱动上创建一个新的分区。 + +这里有大量能创建新分区的 GUI 工具,包括 [Gparted][2],但由于我们已经打开了终端,我们将使用 fdisk 命令创建需要的分区。 + +在终端中输入以下命令: + + fdisk /dev/sdb + +这会使你进入到一个特殊的 fdisk 提示符中。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x145xfdisk00.png.pagespeed.ic.I7S8bjoXQG.png) + +以指定的顺序输入命令创建一个使用新硬盘驱动 100% 空间的主分区并为 LVM 做好了准备。如果你需要更改分区的大小或相应多个分区,我建议使用 GParted 或自己了解关于 fdisk 命令的使用。 + +**警告:下面的步骤会格式化你的硬盘驱动。确保在进行下面步骤之前你的硬盘驱动中没有任何信息。** + +- n = 创建新分区 +- p = 创建主分区 +- 1 = 成为磁盘上的首个分区 + +输入 enter 键两次以接受默认的第一个和最后一个柱面。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/562x216xfdisk01.png.pagespeed.ic.DsSZ38kWcA.png) + +用下面的命令准备 LVM 所使用的分区。 + +- t = 更改分区类型 +- 8e = 更改为 LVM 分区类型 + +核实并将信息写入硬盘驱动器。 + +- p = 查看分区设置使得写入更改到磁盘之前可以回看 +- w = 写入更改到磁盘 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/560x339xfdisk03.png.pagespeed.ic.FC8foICZsb.png) + +运行这些命令之后,会退出 fdisk 提示符并返回到终端的 bash 提示符中。 + +输入 pvcreate /dev/sdb1 在刚创建的分区上新建一个 LVM 物理卷。 + +你也许会问为什么我们不用一个文件系统格式化分区,不用担心,该步骤在后面。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/pvcreate.png.pagespeed.ce.W7VAr-ig3t.png) + +#### 创建卷组 #### + +现在我们有了一个指定的分区和创建好的物理卷,我们需要创建一个卷组。很幸运这只需要一个命令。 + + vgcreate vgpool /dev/sdb1 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/vgcreate.png.pagespeed.ce.fVLzSmPZou.png) + +Vgpool 是新创建的卷组的名称。你可以使用任何你喜欢的名称,但建议标签以 vg 开头,以便后面你使用它时能意识到这是一个卷组。 + +#### 创建逻辑卷 #### + +创建 LVM 将使用的逻辑卷: + + lvcreate -L 3G -n lvstuff vgpool + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/lvcreate.png.pagespeed.ce.vupLB-LJEW.png) + +-L 命令指定逻辑卷的大小,在该情况中是 3 GB,-n 命令指定卷的名称。 指定 vgpool 所以 lvcreate 命令知道从什么卷获取空间。 + +#### 格式化并挂载逻辑卷 #### + +最后一步是用一个文件系统格式化新的逻辑卷。如果你需要选择一个 Linux 文件系统的帮助,请阅读 [如果根据需要选取最合适的文件系统][3]。 + + mkfs -t ext3 /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/571x424xmkfs.png.pagespeed.ic.ERMan1Mz0P.png) + +创建挂载点并将卷挂载到你可以使用的地方。 + + mkdir /mnt/stuff + mount -t ext3 /dev/vgpool/lvstuff /mnt/stuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/510x69xmount.png.pagespeed.ic.k0i1tvqgcV.png) + +#### 重新设置逻辑卷大小 #### + +逻辑卷的一个好处是你能使你的共享物理变大或变小而不需要移动所有东西到一个更大的硬盘驱动。另外,你可以添加新的硬盘驱动并同时扩展你的卷组。或者如果你有一个不使用的硬盘驱动,你可以从卷组中移除它使得逻辑卷变小。 + +这里有三个用于使物理卷、卷组和逻辑卷变大或变小的基础工具。 + +注意:这些命令中的每个都要以 pv、vg 或 lv 开头,取决于你的工作对象。 + +- resize – 能压缩或扩展物理卷和逻辑卷,但卷组不能 +- extend – 能使卷组和逻辑卷变大但不能变小 +- reduce – 能使卷组和逻辑卷变小但不能变大 + +让我们来看一个如何向刚创建的逻辑卷 "lvstuff" 添加新硬盘驱动的例子。 + +#### 安装并格式化新硬盘驱动 #### + +按照上面创建新分区并更改分区类型为 LVM(8e) 的步骤安装一个新硬盘驱动。然后用 pvcreate 命令创建一个 LVM 能识别的物理卷。 + +#### 添加新硬盘驱动到卷组 #### + +要添加新的硬盘驱动到一个卷组,你只需要知道你的新分区,在我们的例子中是 /dev/sdc1,以及想要添加到的卷组的名称。 + +这会添加新物理卷到已存在的卷组中。 + + vgextend vgpool /dev/sdc1 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/vgextend.png.pagespeed.ce.atRPT1yg5f.png) + +#### 扩展逻辑卷 #### + +调整逻辑卷的大小,我们需要指出的是通过大小而不是设备来扩展。在我们的例子中,我们会添加一个 8GB 的硬盘驱动到我们的 3GB vgpool。我们可以用 lvextend 或 lvresize 命令使该空间可用。 + + lvextend -L8G /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/lvextend1.png.pagespeed.ce.6scXbQVUTT.png) + +当这个命令工作的时候你会发现它实际上重新设置逻辑卷大小为 8GB 而不是我们期望的将 8GB 添加到已存在的卷上。要添加剩余的可用 3GB 你需要用下面的命令。 + + lvextend -L+3G /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/430x85xlvextend2.png.pagespeed.ic.7aBiTBrW03.png) + +现在我们的逻辑卷已经是 11GB 大小了。 + +#### 扩展文件系统 #### + +逻辑卷是 11GB 大小但是上面的文件系统仍然只有 3GB。要使文件系统使用整个的 11GB 可用空间你需要用 resize2fs 命令。你只需要指定 resize2fs 到 11GB 逻辑卷它就会帮你完成其余的工作。 + + resize2fs /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/650x150xresize2fs.png.pagespeed.ic.Mx74EdMuk_.png) + +**注意:如果你使用除 ext3/4 之外的文件系统,请查看调整你的文件系统大小的工具。** + +#### 压缩逻辑卷 #### + +如果你想从卷组中移除一个硬盘驱动你可以按照上面的步骤反向操作,并用 lvreduce 或 vgreduce 命令代替。 + +1. 调整文件系统大小 (调整之前确保已经移动文件到硬盘驱动安全的地方) +1. 减小逻辑卷 (除了 + 可以扩展大小,你也可以用 - 压缩大小) +1. 用 vgreduce 从卷组中移除硬盘驱动 + +#### 备份逻辑卷 #### + +快照是一些新的高级文件系统提供的功能,但是 ext3/4 文件系统并没有快照的功能。LVM 快照最棒的是你的文件系统永不掉线,你可以拥有你想要的任何大小而不需要额外的硬盘空间。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-2.png.pagespeed.ic.VtOUuqYX1W.png) + +LVM 获取快照的时候,会有一张和逻辑卷完全相同的照片,该照片可以用于在不同的硬盘驱动上进行备份。生成一个备份的时候,任何需要添加到逻辑卷的新信息会如往常一样写入磁盘,但会跟踪更改使得原始快照永远不会损毁。 + +要创建一个快照,我们需要创建拥有足够空闲空间的逻辑卷,用于保存我们备份的时候会写入该逻辑卷的任何新信息。如果驱动并不是经常写入,你可以使用很小的一个存储空间。备份完成的时候我们只需要移除临时逻辑卷,原始逻辑卷会和往常一样。 + +#### 创建新快照 #### + +创建 lvstuff 的快照,用带 -s 标记的 lvcreate 命令。 + + lvcreate -L512M -s -n lvstuffbackup /dev/vgpool/lvstuff + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/597x68xlvcreate-snapshot.png.pagespeed.ic.Rw2ivtcpPg.png) + +这里我们创建了一个只有 512MB 的逻辑卷,因为驱动实际上并不会使用。512MB 的空间会保存备份时产生的任何新数据。 + +#### 挂载新快照 #### + +和之前一样,我们需要创建一个挂载点并挂载新快照,然后才能从中复制文件。 + + mkdir /mnt/lvstuffbackup + mount /dev/vgpool/lvstuffbackup /mnt/lvstuffbackup + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/565x68xmount-snapshot.png.pagespeed.ic.pVMkhK1o4x.png) + +#### 复制快照和删除逻辑卷 #### + +你剩下需要做的是从 /mnt/lvstuffbackup/ 中复制所有文件到一个外部的硬盘驱动或者打包所有文件到一个文件。 + +**注意:tar -c 会创建一个归档文件,-f 要指出归档文件的名称和路径。要获取 tar 命令的帮助信息,可以在终端中输入 man tar。** + + tar -cf /home/rothgar/Backup/lvstuff-ss /mnt/lvstuffbackup/ + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x67xsnapshot-backup.png.pagespeed.ic.tw-2AK_lfZ.png) + +记住备份发生的时候写到 lvstuff 的所有文件都会在我们之前创建的临时逻辑卷中被跟踪。确保备份的时候你有足够的空闲空间。 + +备份完成后,卸载卷并移除临时快照。 + + umount /mnt/lvstuffbackup + lvremove /dev/vgpool/lvstuffbackup/ + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/630x102xlvremove.png.pagespeed.ic.yBWk47X6lF.png) + +#### 删除逻辑卷 #### + +要删除一个逻辑卷,你首先需要确保卷已经卸载,然后你可以用 lvremove 命令删除它。逻辑卷删除后你可以移除卷组,卷组删除后你可以删除物理卷。 + +这是所有移除我们创建的卷和组的命令。 + + umount /mnt/lvstuff + lvremove /dev/vgpool/lvstuff + vgremove vgpool + pvremove /dev/sdb1 /dev/sdc1 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/580x185xdelete-lvm.png.pagespeed.ic.3zJTo0Zu9k.png) + +这些已经囊括了关于 LVM 你需要了解的大部分知识。如果你有任何关于这些讨论的经验,请在下面的评论框中和大家分享。 + +-------------------------------------------------------------------------------- + +via: http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ + +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and-how-do-you-enable-it-in-ubuntu/ +[2]:http://www.howtogeek.com/howto/17001/how-to-format-a-usb-drive-in-ubuntu-using-gparted/ +[3]:http://www.howtogeek.com/howto/33552/htg-explains-which-linux-file-system-should-you-choose/ \ No newline at end of file From 06050a22dc6729ec666b4b1d78b291158fb522da Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Thu, 25 Jun 2015 12:47:28 +0800 Subject: [PATCH 1259/2517] finish translation --- ...ser for Anonymous Web Browsing in Linux.md | 206 ------------------ ...ser for Anonymous Web Browsing in Linux.md | 206 ++++++++++++++++++ 2 files changed, 206 insertions(+), 206 deletions(-) delete mode 100644 sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md create mode 100644 translated/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md diff --git a/sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md b/sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md deleted file mode 100644 index 92fe36dae2..0000000000 --- a/sources/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md +++ /dev/null @@ -1,206 +0,0 @@ -Tor Browser: An Ultimate Web Browser for Anonymous Web Browsing in Linux -================================================================================ -Most of us give a considerable time of ours to Internet. The primary Application we require to perform our internet activity is a browser, a web browser to be more perfect. Over Internet most of our’s activity is logged to Server/Client machine which includes IP address, Geographical Location, search/activity trends and a whole lots of Information which can potentially be very harmful, if used intentionally the other way. - -![Install Tor Browser in Linux](http://www.tecmint.com/wp-content/uploads/2014/04/Install-tor-browser-in-linux.jpg) - -Tor Browser: Anonymous Browsing - -Moreover the National Security Agency (NSA) aka International Spying Agency keeps tracks of ours digital footprints. Not to mention a restricted proxy server which again can be used as data ripping server is not the answer. And most of the corporates and companies wont allow you to access a proxy server. - -So, what we need here is an application, preferably small in size and let it be standalone, portable and which servers the purpose. Here comes an application – the Tor Browser, which has all the above discussed features and even beyond that. - -In this article we will be discussing Tor browser, its features, its usages and Area of Application, Installation and other important aspects of The Tor Browser Application. - -#### What is Tor Browser? #### - -Tor is a Freely distributed Application Software, released under BSD style Licensing which allows to surf Internet anonymously, through its safe and reliable onion like structure. Tor previously was called as ‘The Onion Router‘ because of its structure and functioning mechanism. This Application is written in C programming Language. - -#### Features of Tor Browser #### - -- Cross Platform Availability. i.e., this application is available for Linux, Windows as well as Mac. -- Complex Data encryption before it it sent over Internet. -- Automatic data decryption at client side. -- It is a combination of Firefox Browser + Tor Project. -- Provides anonymity to servers and websites. -- Makes it possible to visit locked websites. -- Performs task without revealing IP of Source. -- Capable of routing data to/from hidden services and application behind firewall. -- Portable – Run a preconfigured web browser directly from the USB storage Device. No need to install it locally. -- Available for architectures x86 and x86_64. -- Easy to set FTP with Tor using configuration as “socks4a” proxy on “localhost” port “9050” -- Tor is capable of handling thousands of relay and millions of users. - -#### How Tor Browser Works? #### - -Tor works on the concept of Onion routing. Onion routing resemble to onion in structure. In onion routing the layers are nested one over the other similar to the layers of onion. This nested layer is responsible for encrypting data several times and sends it through virtual circuits. On the client side each layer decrypt the data before passing it to the next level. The last layer decrypts the innermost layer of encrypted data before passing the original data to the destination. - -In this process of decryption all the layers function so intelligently that there is no need to reveal IP and Geographical location of User thus limiting any chance of anybody watching your internet connection or the sites you are visiting. - -All these working seems a bit complex, but the end user execution and working of Tor browser is nothing to worry about. In-fact Tor browser resembles any other browser (Especially Mozilla Firefox) in functioning. - -### Installation of Tor Browser in Linux ### - -As discussed above, Tor browser is available for Linux, Windows and Mac. The user need to download the latest version (i.e. Tor Browser 4.0.4) application from the link below as per their system and architecture. - -- [https://www.torproject.org/download/download-easy.html.en][1] - -After downloading the Tor browser, we need to install it. But the good thing with ‘Tor’ is that we don’t need to install it. It can run directly from a Pen Drive and the browser can be preconfigured. That means plug and Run Feature in perfect sense of Portability. - -After downloading the Tar-ball (*.tar.xz) we need to Extract it. - -**On 32-Bit System** - - $ wget https://www.torproject.org/dist/torbrowser/4.0.4/tor-browser-linux32-4.0.4_en-US.tar.xz - $ tar xpvf tor-browser-linux32-4.0.4_en-US.tar.xz - -**On 64-Bit System** - - $ wget https://www.torproject.org/dist/torbrowser/4.0.4/tor-browser-linux64-4.0.4_en-US.tar.xz - $ tar -xpvf tor-browser-linux64-4.0.4_en-US.tar.xz - -**Note** : In the above command we used ‘$‘ which means that the package is extracted as user and not root. It is strictly suggested to extract and run tor browser not as root. - -After successful extraction, we can move the extracted browser to anywhere/USB Mass Storage device. And run the application from the extracted folder and run ‘start-tor-browser’ strictly not as root. - - $ cd tor-browser_en-US - $ ./start-tor-browser - -![Starting Tor Browser](http://www.tecmint.com/wp-content/uploads/2014/04/Starting-Tor-Network.jpg) - -Starting Tor Browser - -**1. Trying to connect to the Tor Network. Click “Connect” and Tor will do rest of the settings for you.** - -![Connecting to Tor Network](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Network-Settings.jpg) - -Connecting to Tor Network - -**2. The welcome Window/Tab.** - -![Tor Welcome Screen](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Welcome-Screen.png) - -Tor Welcome Screen - -**3. Tor Browser Running a Video from Youtube.** - -![Watching Video on Youtube](http://www.tecmint.com/wp-content/uploads/2014/04/Watching-Video-on-Youtube.jpg) - -Watching Video on Youtube - -**4. Opening a banking site for online Purchasing/Transaction.** - -![Browsing a Banking Site](http://www.tecmint.com/wp-content/uploads/2014/04/Browsing-Site.jpg) - -Browsing a Banking Site - -**5. The browser showing my current proxy IP. Note that the text that reads “Proxy Server detected”.** - -![Checking IP Address](http://www.tecmint.com/wp-content/uploads/2014/04/Checking-IP-Address.jpg) - -Checking IP Address - -**Note**: That you need to point to the Tor startup script using text session, everytime you want to run Tor. Moreover a terminal will be busy all the time till you are running tor. How to overcome this and create a desktop/dock-bar Icon? - -6. We need to create `tor.desktop` file inside the directory where extracted files resides. - -$ touch tor.desktop - -Now edit the file using your favourite editor with the text below. Save and exit. I used nano. - - $ nano tor.desktop - ----------- - - #!/usr/bin/env xdg-open - [Desktop Entry] - Encoding=UTF-8 - Name=Tor - Comment=Anonymous Browse - Type=Application - Terminal=false - Exec=/home/avi/Downloads/tor-browser_en-US/start-tor-browser - Icon=/home/avi/Downloads/tor-browser_en-US/Browser/browser/icons/mozicon128.png - StartupNotify=true - Categories=Network;WebBrowser; - -**Note**: Make sure to replace the path with the location of your tor browser in the above. - -**7. Once done! Double click the file `tor.desktop` to fire Tor browser. You may need to trust it for the first time.** - -![Tor Application Launcher](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Application-Launcher.jpg) - -Tor Application Launcher - -**8. Once you trust you might note that the icon of `tor.desktop` changed.** - -![Tor icon Changed](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-icon-changed.jpg) - -Tor icon Changed - -9. You may drag and drop the `tor.desktop` icon to create shortcut on Desktop and Dock Bar. - -![Add Tor Shortcut on Desktop](http://www.tecmint.com/wp-content/uploads/2014/04/Add-Tor-Shortcut-on-Desktop.jpg) - -Add Tor Shortcut on Desktop - -**10. About Tor Browser.** - -![About Tor Browser](http://www.tecmint.com/wp-content/uploads/2014/04/About-Tor-Browser.jpg) - -About Tor Browser - -**Note**: If you are using older version of Tor, you may update it from the above window. - -#### Usability/Area of Application #### - -- Anonymous communication over web. -- Surf to Blocked web Pages. -- Link other Application Viz (FTP) to this secure Internet Browsing Application. - -#### Controversies of Tor-browser #### - -- No security at the boundary of Tor Application i.e., Data Entry and Exit Points. -- A study in 2011 reveals that a specific way of attacking Tor will reveal IP address of BitTorrent Users. -- Some protocols shows the tendency of leaking IP address, revealed in a study. -- Earlier version of Tor bundled with older versions of Firefox browser were found to be JavaScript Attack Vulnerable. -- Tor Browser Seems to Work slow. - -#### Real world Implementation of Tor-browser #### - -- Vuze BitTorrent Client -- Anonymous Os -- Os’es from Scratch -- whonix, etc. - -#### Future of Tor Browser #### - -Tor browser is promising. Perhaps the first application of its kind is implemented very brilliantly. Tor browser must invest for Support, Scalability and research for securing the data from latest attacks. This application is need of the future. - -#### Download Free eBook #### - -Unofficial Guide to Tor Private Browsing - -[![](http://img.tradepub.com/free/w_make129/images/w_make129c4.gif)][2] - -### Conclusion ### - -Tor bowser is a must tool in the present time where the organization you are working for don’t allow you to access certain websites or if you don’t want others to look into your private business or you don’t want to provide your digital footprints to NSA. - -**Note**: Tor Browser don’t provide any safety from Viruses, Trojans or other threats of this kind. Moreover by writing an article of this we never mean to indulge into illegal activity by hiding our identity over Internet. This Post is totally for educational Purpose and for any illegal use of it neither the author of the post nor Tecmint will be responsible. It is the sole responsibility of user. - -Tor-browser is a wonderful application and you must give it a try. That’s all for now. I’ll be here again with another interesting article you people will love to read. Till then stay tuned and connected to Tecmint. Don’t forget to provide us with your value-able feedback in our comment section below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/tor-browser-for-anonymous-web-browsing/ - -作者:[Avishek Kumar][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/avishek/ -[1]:https://www.torproject.org/download/download-easy.html.en -[2]:http://tecmint.tradepub.com/free/w_make129/prgm.cgi \ No newline at end of file diff --git a/translated/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md b/translated/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md new file mode 100644 index 0000000000..1c6a039920 --- /dev/null +++ b/translated/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md @@ -0,0 +1,206 @@ +TorLinuxWebռ +================================================================================ +Ǵ˶滨Ѻܶʱ䡣ʹõӦóҪһWebĻҪԿͻ/ķʽ¼̻IPַϢԼDZڵϢЩϢʽʹãDZڵΣԡ + +![LinuxаװTor](http://www.tecmint.com/wp-content/uploads/2014/04/Install-tor-browser-in-linux.jpg) + +Tor + +⣬Ұȫ֣NSAʼ¼ǵ㼣˵ij޵ĴҲᱻΪѼҴҵ͹˾ʴʹܱԼ˽ + +ˣҪһС͡ЯӦóܴﵽЧTorһӦãӵᵽйܣֹڴˡ + +ƪǻTorĹܡʹ÷ʽ򡢰װԼTorҪ档 + +#### ʲôTor #### + +TorһɷַӦBSDʽ֤ͨ䰲ȫɿʽĽṹûĽǰĽṹƣTorΪ·ӦCдɵġ + +#### TorĹ #### + +- ƽ̨á磬ӦóLinuxWindowsMac¶á +- ڷݵǰиӵݼܡ +- ڿͻ˽еԶܡ +- ǻTor̵Ľϡ +- Էվṩԡ +- Էʱվ +- 豩¶ԴIPִ +- ڷǽ·/صķӦó +- Я - ֱӴUSB洢һԤõweb豾ذװ +- x86x86_64ƽ̨ +- ͨʹTorԡsocks4aķʽڡlocalhostġ9050˿ôFTP +- Torӵдǧתϰû + +#### Torι #### + +TorĹʽ·ɵĸ·ɵĽṹУÿһ㶼Ƕһ棬һǶ׵Ľṹμݲͨ·з͡ڿͻһÿһ㶼ڽݵһ֮ǰݡһڽԭʼݴݵĿĵǰһļݡ + +ֽĹƵ˸޷׷IPԼûĵλã˿κ˹۲վӡ + +Щ̿ЩӣûʹTorʱûбҪġʵϣTorĹһMozillaFirefox + +### LinuxаװTor ### + +۵һTorLinuxWindowsԼMac¶áûҪϵͳͼܹIJͬӴµİ汾磬Tor4.0.4 + +- [https://www.torproject.org/download/download-easy.html.en][1] + +TorҪװõDzҪװTorֱӴ豸УҸԱԤáζŲеԿֲ + +شļ*.tar.xzҪѹ + +**32λϵͳ** + + $ wget https://www.torproject.org/dist/torbrowser/4.0.4/tor-browser-linux32-4.0.4_en-US.tar.xz + $ tar xpvf tor-browser-linux32-4.0.4_en-US.tar.xz + +**64λϵͳ** + + $ wget https://www.torproject.org/dist/torbrowser/4.0.4/tor-browser-linux64-4.0.4_en-US.tar.xz + $ tar -xpvf tor-browser-linux64-4.0.4_en-US.tar.xz + +**ע** : Уʹá$ζѹӦͨûrootûѹǿҽҪrootûѹTor + +ڳɹĽѹDZԽѹƶκεط/USB洢豸СӽѹļԷrootûֱСstart-tor-browser + + $ cd tor-browser_en-US + $ ./start-tor-browser + +![ʼʹTor](http://www.tecmint.com/wp-content/uploads/2014/04/Starting-Tor-Network.jpg) + +ʼʹTor + +**1. ӵTor硣ӡ֮Torðʣµ顣** + +![ӵTor](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Network-Settings.jpg) + +ӵTor + +**2. ӭ/ǩ** + +![Torӭ](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Welcome-Screen.png) + +Torӭ + +**3. TorYoutubeƵ** + +![YoutubeϿƵ](http://www.tecmint.com/wp-content/uploads/2014/04/Watching-Video-on-Youtube.jpg) + +YoutubeϿƵ + +**4. ַԽ߹ͽס** + +![վ](http://www.tecmint.com/wp-content/uploads/2014/04/Browsing-Site.jpg) + +վ + +**5. ʾҵǰĴIPעıΪProxy Server detected** + +![IPַ](http://www.tecmint.com/wp-content/uploads/2014/04/Checking-IP-Address.jpg) + +IPַ + +**ע**: ÿTorʱҪʹıģʽָTorűҸնTorʱæµ״̬ο˷Щһ/Dockͼأ + +**6. Ҫڽѹļд`tor.desktop`** + +$ touch tor.desktop + +ʹϲı༭༭ļıʹnano + + $ nano tor.desktop + +---------- + + #!/usr/bin/env xdg-open + [Desktop Entry] + Encoding=UTF-8 + Name=Tor + Comment=Anonymous Browse + Type=Application + Terminal=false + Exec=/home/avi/Downloads/tor-browser_en-US/start-tor-browser + Icon=/home/avi/Downloads/tor-browser_en-US/Browser/browser/icons/mozicon128.png + StartupNotify=true + Categories=Network;WebBrowser; + +**ע**: ȷtor·滻ΪĻе· + +**7. һ㶨Ϳ˫`tor.desktop`ļTorˣҪڵһʱθļ** + +![TorӦ](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Application-Launcher.jpg) + +TorӦ + +**8. һѡΣע`tor.desktop`ļͼı䡣** + +![TorͼѸı](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-icon-changed.jpg) + +TorͼѸı + +**9. ͨק`tor.desktop`ͼDockдݷʽ** + +![Torݷʽ](http://www.tecmint.com/wp-content/uploads/2014/04/Add-Tor-Shortcut-on-Desktop.jpg) + +Torݷʽ + +**10. Tor** + +![Tor](http://www.tecmint.com/wp-content/uploads/2014/04/About-Tor-Browser.jpg) + +Tor + +**ע**: ʹþɰ汾TorԴĴڸ + +#### ӦõĿԺ #### + +- ʹ硣 +- 赲ҳ档 +- ӦãFTP֤簲ȫķʡ + +#### Tor #### + +- Torܱ߲ûʲôȫʩ磬ڵͳڵ㡣 +- һ2011оһTorĹԵõBitTorrentûIPַ +- һЩозijЩضЭй©IPַ +- TorЩİ汾˾ɰ汾Firefoxⱻ֤JavaScript +- TorıȽϻ + +#### ʵTorʵ #### + +- Vuze BitTorrent Client +- Anonymous Os +- Oses from Scratch +- whonix + +#### Torδ #### + +Torǰ;ġҲʵֵĵһӦódzɫTorӴԵ֧ԼԽڵĹоԱ֤ݰȫӦóδҪ + +#### ѵĵ #### + +ǹٷTor˽ָ + +[![](http://img.tradepub.com/free/w_make129/images/w_make129c4.gif)][2] + +### ### + +IJŲijվϣ֪˽NSAṩĸ㼣ôTorĿǰDZġ + +**ע**: TorṩİȫԲܵľİȫвдƪµĿҲϣͨڻǵݷǷƪ´Ϊ˽ѧĿģߺTecmintΪκηǷʹøûΨһΡ + +TorһdzӦãֵóԣҪ˵ȫˣһдһЩȤ£עTecmintṩмֵķ + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/tor-browser-for-anonymous-web-browsing/ + +ߣ[Avishek Kumar][a] +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ + +[a]:http://www.tecmint.com/author/avishek/ +[1]:https://www.torproject.org/download/download-easy.html.en +[2]:http://tecmint.tradepub.com/free/w_make129/prgm.cgi \ No newline at end of file From c966a353815463e607f067c53c4b4fd2d559e91a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 25 Jun 2015 16:08:20 +0800 Subject: [PATCH 1260/2517] =?UTF-8?q?20150625-1=20=E9=80=89=E9=A2=98=20RHC?= =?UTF-8?q?SA=20Series=20Part=2015=20=E6=9C=AC=E4=B8=93=E9=A2=98=E5=AE=8C?= =?UTF-8?q?=E7=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ation and Guest Administration with KVM.md | 188 ++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md b/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md new file mode 100644 index 0000000000..d9e06bd876 --- /dev/null +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md @@ -0,0 +1,188 @@ +RHCSA Series: Essentials of Virtualization and Guest Administration with KVM – Part 15 +================================================================================ +If you look up the word virtualize in a dictionary, you will find that it means “to create a virtual (rather than actual) version of something”. In computing, the term virtualization refers to the possibility of running multiple operating systems simultaneously and isolated one from another, on top of the same physical (hardware) system, known in the virtualization schema as host. + +![KVM Virtualization Basics and KVM Guest Administration](http://www.tecmint.com/wp-content/uploads/2015/06/RHCSA-Part15.png) + +RHCSA Series: Essentials of Virtualization and Guest Administration with KVM – Part 15 + +Through the use of the virtual machine monitor (also known as hypervisor), virtual machines (referred to as guests) are provided virtual resources (i.e. CPU, RAM, storage, network interfaces, to name a few) from the underlying hardware. + +With that in mind, it is plain to see that one of the main advantages of virtualization is cost savings (in equipment and network infrastructure and in terms of maintenance effort) and a substantial reduction in the physical space required to accommodate all the necessary hardware. + +Since this brief how-to cannot cover all virtualization methods, I encourage you to refer to the documentation listed in the summary for further details on the subject. + +Please keep in mind that the present article is intended to be a starting point to learn the basics of virtualization in RHEL 7 using [KVM][1] (Kernel-based Virtual Machine) with command-line utilities, and not an in-depth discussion of the topic. + +### Verifying Hardware Requirements and Installing Packages ### + +In order to set up virtualization, your CPU must support it. You can verify whether your system meets the requirements with the following command: + + # grep -E 'svm|vmx' /proc/cpuinfo + +In the following screenshot we can see that the current system (with an AMD microprocessor) supports virtualization, as indicated by svm. If we had an Intel-based processor, we would see vmx instead in the results of the above command. + +![Check KVM Support](http://www.tecmint.com/wp-content/uploads/2015/06/Check-KVM-Support.png) + +Check KVM Support + +In addition, you will need to have virtualization capabilities enabled in the firmware of your host (BIOS or UEFI). + +Now install the necessary packages: + +- qemu-kvm is an open source virtualizer that provides hardware emulation for the KVM hypervisor whereas qemu-img provides a command line tool for manipulating disk images. +- libvirt includes the tools to interact with the virtualization capabilities of the operating system. +- libvirt-python contains a module that permits applications written in Python to use the interface supplied by libvirt. +- libguestfs-tools: miscellaneous system administrator command line tools for virtual machines. +- virt-install: other command-line utilities for virtual machine administration. + + # yum update && yum install qemu-kvm qemu-img libvirt libvirt-python libguestfs-tools virt-install + +Once the installation completes, make sure you start and enable the libvirtd service: + + # systemctl start libvirtd.service + # systemctl enable libvirtd.service + +By default, each virtual machine will only be able to communicate with the rest in the same physical server and with the host itself. To allow the guests to reach other machines inside our LAN and also the Internet, we need to set up a bridge interface in our host (say br0, for example) by, + +1. adding the following line to our main NIC configuration (most likely `/etc/sysconfig/network-scripts/ifcfg-enp0s3`): + + BRIDGE=br0 + +2. creating the configuration file for br0 (/etc/sysconfig/network-scripts/ifcfg-br0) with these contents (note that you may have to change the IP address, gateway address, and DNS information): + + DEVICE=br0 + TYPE=Bridge + BOOTPROTO=static + IPADDR=192.168.0.18 + NETMASK=255.255.255.0 + GATEWAY=192.168.0.1 + NM_CONTROLLED=no + DEFROUTE=yes + PEERDNS=yes + PEERROUTES=yes + IPV4_FAILURE_FATAL=no + IPV6INIT=yes + IPV6_AUTOCONF=yes + IPV6_DEFROUTE=yes + IPV6_PEERDNS=yes + IPV6_PEERROUTES=yes + IPV6_FAILURE_FATAL=no + NAME=br0 + ONBOOT=yes + DNS1=8.8.8.8 + DNS2=8.8.4.4 + +3. finally, enabling packet forwarding by making, in `/etc/sysctl.conf`, + + net.ipv4.ip_forward = 1 + +and loading the changes to the current kernel configuration: + + # sysctl -p + +Note that you may also need to tell firewalld that this kind of traffic should be allowed. Remember that you can refer to the article on that topic in this same series ([Part 11: Network Traffic Control Using FirewallD and Iptables][2]) if you need help to do that. + +### Creating VM Images ### + +By default, VM images will be created to `/var/lib/libvirt/images` and you are strongly advised to not change this unless you really need to, know what you’re doing, and want to handle SELinux settings yourself (such topic is out of the scope of this tutorial but you can refer to Part 13 of the RHCSA series: [Mandatory Access Control Essentials with SELinux][3] if you want to refresh your memory). + +This means that you need to make sure that you have allocated the necessary space in that filesystem to accommodate your virtual machines. + +The following command will create a virtual machine named `tecmint-virt01` with 1 virtual CPU, 1 GB (=1024 MB) of RAM, and 20 GB of disk space (represented by `/var/lib/libvirt/images/tecmint-virt01.img`) using the rhel-server-7.0-x86_64-dvd.iso image located inside /home/gacanepa/ISOs as installation media and the br0 as network bridge: + + # virt-install \ + --network bridge=br0 + --name tecmint-virt01 \ + --ram=1024 \ + --vcpus=1 \ + --disk path=/var/lib/libvirt/images/tecmint-virt01.img,size=20 \ + --graphics none \ + --cdrom /home/gacanepa/ISOs/rhel-server-7.0-x86_64-dvd.iso + --extra-args="console=tty0 console=ttyS0,115200" + +If the installation file was located in a HTTP server instead of an image stored in your disk, you will have to replace the –cdrom flag with –location and indicate the address of the online repository. + +As for the –graphics none option, it tells the installer to perform the installation in text-mode exclusively. You can omit that flag if you are using a GUI interface and a VNC window to access the main VM console. Finally, with –extra-args we are passing kernel boot parameters to the installer that set up a serial VM console. + +The installation should now proceed as a regular (real) server now. If not, please review the steps listed above. + +### Managing Virtual Machines ### + +These are some typical administration tasks that you, as a system administrator, will need to perform on your virtual machines. Note that all of the following commands need to be run from your host: + +**1. List all VMs:** + + # virsh list --all + +From the output of the above command you will have to note the Id for the virtual machine (although it will also return its name and current status) because you will need it for most administration tasks related to a particular VM. + +**2. Display information about a guest:** + + # virsh dominfo [VM Id] + +**3. Start, restart, or stop a guest operating system:** + + # virsh start | reboot | shutdown [VM Id] + +**4. Access a VM’s serial console if networking is not available and no X server is running on the host:** + + # virsh console [VM Id] + +**Note** that this will require that you add the serial console configuration information to the `/etc/grub.conf` file (refer to the argument passed to the –extra-args option when the VM was created). + +**5. Modify assigned memory or virtual CPUs:** + +First, shutdown the guest: + + # virsh shutdown [VM Id] + +Edit the VM configuration for RAM: + + # virsh edit [VM Id] + +Then modify + + [Memory size here without brackets] + +Restart the VM with the new settings: + + # virsh create /etc/libvirt/qemu/tecmint-virt01.xml + +Finally, change the memory dynamically: + + # virsh setmem [VM Id] [Memory size here without brackets] + +For CPU: + + # virsh edit [VM Id] + +Then modify + + [Number of CPUs here without brackets] + +For further commands and details, please refer to table 26.1 in Chapter 26 of the RHEL 5 Virtualization guide (that guide, though a bit old, includes an exhaustive list of virsh commands used for guest administration). + +### SUMMARY ### + +In this article we have covered some basic aspects of virtualization with KVM in RHEL 7, which is both a vast and a fascinating topic, and I hope it will be helpful as a starting guide for you to later explore more advanced subjects found in the official [RHEL virtualization][4] getting started and [deployment / administration guides][5]. + +In addition, you can refer to the preceding articles in [this KVM series][6] in order to clarify or expand some of the concepts explained here. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/kvm-virtualization-basics-and-guest-administration/ + +作者:[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.linux-kvm.org/page/Main_Page +[2]:http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in-firewall/ +[3]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ +[4]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Getting_Started_Guide/index.html +[5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/index.html +[6]:http://www.tecmint.com/install-and-configure-kvm-in-linux/ \ No newline at end of file From e9019612cf33ab7375e6de0385103031fca91352 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 25 Jun 2015 16:26:26 +0800 Subject: [PATCH 1261/2517] =?UTF-8?q?20150625-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...re Made Easy with these Dedicated Tools.md | 152 ++++++++++++++++++ ...ion Swarm Clusters using Docker Machine.md | 125 ++++++++++++++ 2 files changed, 277 insertions(+) create mode 100644 sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md create mode 100644 sources/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md diff --git a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md new file mode 100644 index 0000000000..15fca199a2 --- /dev/null +++ b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md @@ -0,0 +1,152 @@ +Screen Capture Made Easy with these Dedicated Tools +================================================================================ +"A picture is worth a thousand words", a phrase which emerged in the USA in the early part of the 20th century, refers to the notion that a single still image can present as much information as a large amount of descriptive text. Essentially, pictures convey information more effectively and efficiently than words can. + +A screenshot (or screengrab) is a snapshot or picture captured by a computer to record the output of a visual device. Screen capture software enable screenshots to be taken on a computer. This type of software has lots of uses. As an image can illustrate the operation of computer software well, screenshots play an important role in software development and documentation. Alternatively, if you have a technical problem with your computer, a screenshot allows a technical support department to understand the problems you are facing. Writing computer-related articles, documentation and tutorials is nigh on impossible without a good tool for creating screenshots. Screenshots are also useful to save snippets of anything you have on your screen, particularly when it can not be easily printed. + +Linux has a good selection of open source dedicated screenshot programs, both graphical and console based. For a feature-rich dedicated screenshot utility, look no further than Shutter. This tool is a superb example of a small open source tool. But there are some great alternatives too. + +Screen capture functionality is not only provided by dedicated applications. GIMP and ImageMagick, two programs which are primarily image manipulation tools, also offer competent screen capturing functionality. + +---------- + +### Shutter ### + +![Shutter in action](http://www.linuxlinks.com/portal/content/reviews/Graphics/Screenshot-Shutter1.png) + +Shutter is a feature-rich screenshot application. You can take a screenshot of a specific area, window, your whole screen, or even of a website - apply different effects to it, draw on it to highlight points, and then upload to an image hosting site, all within one window. + +Features include: + + +- Take a screenshot of: + - a specific area + - window + - the complete desktop + - web pages from a script +- Apply different effects to the screenshot +- Hotkeys +- Print +- Take screenshot directly or with a specified delay time +- Save the screenshots to a specified directory and name them in a convenient way (using special wild-cards) +- Fully integrated into the GNOME Desktop (TrayIcon etc) +- Generate thumbnails directly when you are taking a screenshot and set a size level in % +- Shutter session collection: + - Keep track of all screenshots during session + - Copy screeners to clipboard + - Print screenshots + - Delete screenshots + - Rename your file +- Upload your files directly to Image-Hosters (e.g. http://ubuntu-pics.de), retrieve all the needed links and share them with others +- Edit screenshots directly using the embedded drawing tool + +- Website: [shutter-project.org][1] +- Developer: Mario Kemper and Shutter Team +- License: GNU GPL v3 +- Version Number: 0.93.1 + +---------- + +### HotShots ### + +![HotShots in action](http://www.linuxlinks.com/portal/content/reviews/Graphics/Screenshot-HotShots.png) + +HotShots is an application for capturing screens and saving them in a variety of image formats as well as adding annotations and graphical data (arrows, lines, texts, ...). + +You can also upload your creations to the web (FTP/some web services). HotShots is written with Qt. + +HotShots is not available in Ubuntu's Software Center. But it's easy to install by typing at the command line: + + sudo add-apt-repository ppa:ubuntuhandbook1/apps + + sudo apt-get update + + sudo apt-get install hotshots + +Features include: + +- Simple to use +- Full featured +- Built-in editor +- Hotkeys +- Built-in magnification +- Freehand and multi-screen capture +- Supported Output Formats: Black & Whte (bw), Encapsulated PostScript (eps, epsf), Encapsulated PostScript Interchange (epsi), OpenEXR (exr), PC Paintbrush Exchange (pcx), Photoshop Document (psd), ras, rgb, rgba, Irix RGB (sgi), Truevision Targa (tga), eXperimental Computing Facility (xcf), Windows Bitmap (bmp), DirectDraw Surface (dds), Graphic Interchange Format (gif), Icon Image (ico), Joint Photographic Experts Group 2000 (jp2), Joint Photographic Experts Group (jpeg, jpg), Multiple-image Network Graphics (mng), Portable Pixmap (ppm), Scalable Vector Graphics (svg), svgz, Tagged Image File Format (tif, tiff), webp, X11 Bitmap (xbm), X11 Pixmap (xpm), and Khoros Visualization (xv) +- Internationalization support: Basque, Chinese, Czech, French, Galician, German, Greek, Italian, Japanese, Lithuanian, Polish, Portuguese, Romanian, Russian, Serbian, Singhalese, Slovak, Spanish, Turkish, Ukrainian, and Vietnamese + +- Website: [thehive.xbee.net][2] +- Developer: xbee +- License: GNU GPL v2 +- Version Number: 2.2.0 + +---------- + +### ScreenCloud ### + +![ScreenCloud in action](http://www.linuxlinks.com/portal/content/reviews/Graphics/Screenshot-ScreenCloud.png) + +ScreenCloud is an easy to use open source screenshot tool. + +With this software, users can take a screenshot using one of the 3 hotkeys or simply click the ScreenCloud tray icon. Users can choose where you want to save the screenshot. + +If you choose to upload your screenshot to the screencloud website, a link will automatically be copied to your clipboard. This can be shared with friends or colleagues via email or in an IM conversation. All they have to do is click the link and look at your screenshot. + +Features include: + +- Capture full screen, window or selection +- Fast and easy: Snap a photo, paste the link, done +- Free hosting of your screenshots +- Hotkeys +- Set timer delay +- Enable 'Capture window borders' +- Enable/Disable Notifications +- Set app to run on start up +- Adjust account/upload/filename/shortcut settings +- Cross platform tool +- Plugin support, save to Dropbox, Imgur, and more +- Supports uploading to FTP and SFTP servers + +- Website: [screencloud.net][3] +- Developer: Olav S Thoresen +- License: GNU GPL v2 +- Version Number: 1.2.1 + +---------- + +### KSnapshot ### + +![KSnapShot in action](http://www.linuxlinks.com/portal/content/reviews/Graphics/Screenshot-KSnapshot.png) + +KSnapshot is a simple utility for taking screenshots. It can capture images of the whole desktop, a single window, a section of a window or a selected region. Images can then be saved in a variety of different formats. + +KSnapshot also allows users to use hotkeys to take a screenshot. Besides saving the screenshot, it can be copied to the clipboard or opened with any program that is associated with image files. + +KSnapshot is part of the KDE 4 graphics module. + +Features include: + +- Save snapshot in multiple formats +- Snapshot delay +- Exclude window decorations +- Copy the snapshot to the clipboard +- Hotkeys +- Can be scripted using its D-Bus interface + +- Website: [www.kde.org][4] +- Developer: KDE, Richard J. Moore, Aaron J. Seigo, Matthias Ettrich +- License: GNU GPL v2 +- Version Number: 0.8.2 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/2015062316235249/ScreenCapture.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://shutter-project.org/ +[2]:http://thehive.xbee.net/ +[3]:https://screencloud.net/ +[4]:https://www.kde.org/applications/graphics/ksnapshot/ \ No newline at end of file diff --git a/sources/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md b/sources/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md new file mode 100644 index 0000000000..47d33102e5 --- /dev/null +++ b/sources/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md @@ -0,0 +1,125 @@ +How to Provision Swarm Clusters using Docker Machine +================================================================================ +Hi all, today we'll learn how we can deploy Swarm Clusters using Docker Machine. It serves the standard Docker API, so any tool which can communicate with a Docker daemon can use Swarm to transparently scale to multiple hosts. Docker Machine is an application that helps to create Docker hosts on our computer, on cloud providers and inside our own data center. It provides easy solution for creating servers, installing Docker on them and then configuring the Docker client according the users configuration and requirements. We can provision swarm clusters with any driver we need and is highly secured with TLS Encryption. + +Here are some quick and easy steps on how to provision swarm clusters with Docker Machine. + +### 1. Installing Docker Machine ### + +Docker Machine supports awesome on every Linux Operating System. First of all, we'll need to download the latest version of Docker Machine from the Github site . Here, we'll use curl to download the latest version of Docker Machine ie 0.2.0 . + +For 64 Bit Operating System + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine + +For 32 Bit Operating System + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386 > /usr/local/bin/docker-machine + +After downloading the latest release of Docker Machine, we'll make the file named docker-machine under /usr/local/bin/ executable using the command below. + + # chmod +x /usr/local/bin/docker-machine + +After doing the above, we'll wanna ensure that we have successfully installed docker-machine. To check it, we can run the docker-machine -v which will give output of the version of docker-machine installed in our system. + + # docker-machine -v + +![Installing Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) + +To enable Docker commands on our machines, make sure to install the Docker client as well by running the command below. + + # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker + # chmod +x /usr/local/bin/docker + +### 2. Creating Machine ### + +After installing Machine into our working PC or device, we'll wanna go forward to create a machine using Docker Machine. Here, in this tutorial we'll gonna deploy a machine in the Digital Ocean Platform so we'll gonna use "digitalocean" as its Driver API then, docker swarm will be running into that Droplet which will be further configured as Swarm Master and another droplet will be created which will be configured as Swarm Node Agent. + +So, to create the machine, we'll need to run the following command. + + # docker-machine create --driver digitalocean --digitalocean-access-token linux-dev + +**Note**: Here, linux-dev is the name of the machine we are wanting to create. is a security key which can be generated from the Digital Ocean Control Panel of the account holder of Digital Ocean Cloud Platform. To retrieve that key, we simply need to login to our Digital Ocean Control Panel then click on API, then click on Generate New Token and give it a name tick on both Read and Write. Then we'll get a long hex key, thats the now, simply replace it into the command above. + +Now, to load the Machine configuration into the shell we are running the comamands, run the following command. + + # eval "$(docker-machine env linux-dev)" + +![Docker Machine Digitalocean Cloud](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-digitalocean-cloud.png) + +Then, we'll mark our machine as ACTIVE by running the below command. + + # docker-machine active linux-dev + +Now, we'll check whether its been marked as ACTIVE "*" or not. + + # docker-machine ls + +![Docker Machine Active List](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-active-list.png) + +### 3. Running Swarm Docker Image ### + +Now, after we finish creating the required machine. We'll gonna deploy swarm docker image in our active machine. This machine will run the docker image and will control over the Swarm master and node. To run the image, we can simply run the below command. + + # docker run swarm create + +![Docker Machine Swarm Create](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-create.png) + +If you are trying to run swarm docker image using **32 bit Operating System** in the computer where Docker Machine is running, we'll need to SSH into the Droplet. + + # docker-machine ssh + #docker run swarm create + #exit + +### 4. Creating Swarm Master ### + +Now, after our machine and swarm image is running into the machine, we'll now create a Swarm Master. This will also add the master as a node. To do so, here's the command below. + + # docker-machine create \ + -d digitalocean \ + --digitalocean-access-token + --swarm \ + --swarm-master \ + --swarm-discovery token:// \ + swarm-master + +![Docker Machine Swarm Master Create](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-master-create.png) + +### 5. Creating Swarm Nodes ### + +Now, we'll create a swarm node which will get connected with the Swarm Master. The command below will create a new droplet which will be named as swarm-node and will get connected with the Swarm Master as node. This will create a Swarm cluster across the two nodes. + + # docker-machine create \ + -d digitalocean \ + --digitalocean-access-token + --swarm \ + --swarm-discovery token:// \ + swarm-node + +![Docker Machine Swarm Nodes](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-nodes.png) + +### 6. Connecting to the Swarm Master ### + +We, now connect to the Swarm Master so that we can deploy Docker containers across the nodes as per the requirement and configuration. To load the Swarm Master's Machine configuration into our environment, we can run the below command. + + # eval "$(docker-machine env --swarm swarm-master)" + +After that, we can run the required containers of our choice across the nodes. Here, we'll check if everything went fine or not. So, we'll run **docker info** to check the information about the Swarm Clusters. + + # docker info + +### Conclusion ### + +We can pretty easily create Swarm Cluster with Docker Machine. This method is a lot productive because it reduces a lot of time of a system admin or users. In this article, we successfully provisioned clusters by creating a master and a node using a machine with Digital Ocean as driver. It can be created using any driver like VirtualBox, Google Cloud Computing, Amazon Web Service, Microsoft Azure and more according to the need and requirement of the user and the connection is highly secured with TLS Encryption. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/provision-swarm-clusters-using-docker-machine/ + +作者:[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 From b0f326a416dca46d4e9f6f815ae21ba4ed18ba76 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 25 Jun 2015 21:30:17 +0800 Subject: [PATCH 1262/2517] [Translating] tech/20150331 How to set up remote desktop on Linux VPS using x2go.md --- ...50331 How to set up remote desktop on Linux VPS using x2go.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md b/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md index d89c91832e..59323a45e4 100644 --- a/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md +++ b/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md @@ -1,3 +1,4 @@ +ictlyh translating How to set up remote desktop on Linux VPS using x2go ================================================================================ As everything is moved to the cloud, virtualized remote desktop becomes increasingly popular in the industry as a way to enhance employee's productivity. Especially for those who need to roam constantly across multiple locations and devices, remote desktop allows them to stay connected seamlessly to their work environment. Remote desktop is attractive for employers as well, achieving increased agility and flexibility in work environments, lower IT cost due to hardware consolidation, desktop security hardening, and so on. From df748618cac02d4bc0fe7c1fce0600a0d3b3e944 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 25 Jun 2015 23:02:55 +0800 Subject: [PATCH 1263/2517] [Translated] tech/20150331 How to set up remote desktop on Linux VPS using x2go.md --- ... remote desktop on Linux VPS using x2go.md | 138 ------------------ ... remote desktop on Linux VPS using x2go.md | 138 ++++++++++++++++++ 2 files changed, 138 insertions(+), 138 deletions(-) delete mode 100644 sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md create mode 100644 translated/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md diff --git a/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md b/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md deleted file mode 100644 index 59323a45e4..0000000000 --- a/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md +++ /dev/null @@ -1,138 +0,0 @@ -ictlyh translating -How to set up remote desktop on Linux VPS using x2go -================================================================================ -As everything is moved to the cloud, virtualized remote desktop becomes increasingly popular in the industry as a way to enhance employee's productivity. Especially for those who need to roam constantly across multiple locations and devices, remote desktop allows them to stay connected seamlessly to their work environment. Remote desktop is attractive for employers as well, achieving increased agility and flexibility in work environments, lower IT cost due to hardware consolidation, desktop security hardening, and so on. - -In the world of Linux, of course there is no shortage of choices for settings up remote desktop environment, with many protocols (e.g., RDP, RFB, NX) and server/client implementations (e.g., [TigerVNC][1], RealVNC, FreeNX, x2go, X11vnc, TeamViewer) available. - -Standing out from the pack is [X2Go][2], an open-source (GPLv2) implementation of NX-based remote desktop server and client. In this tutorial, I am going to demonstrate **how to set up remote desktop environment for [Linux VPS][3] using X2Go**. - -### What is X2Go? ### - -The history of X2Go goes back to NoMachine's NX technology. The NX remote desktop protocol was designed to deal with low bandwidth and high latency network connections by leveraging aggressive compression and caching. Later, NX was turned into closed-source while NX libraries were made GPL-ed. This has led to open-source implementation of several NX-based remote desktop solutions, and one of them is X2Go. - -What benefits does X2Go bring to the table, compared to other solutions such as VNC? X2Go inherits all the advanced features of NX technology, so naturally it works well over slow network connections. Besides, X2Go boasts of an excellent track record of ensuring security with its built-in SSH-based encryption. No longer need to set up an SSH tunnel [manually][4]. X2Go comes with audio support out of box, which means that music playback at the remote desktop is delivered (via PulseAudio) over network, and fed into local speakers. On usability front, an application that you run on remote desktop can be seamlessly rendered as a separate window on your local desktop, giving you an illusion that the application is actually running on the local desktop. As you can see, these are some of [its powerful features][5] lacking in VNC based solutions. - -### X2GO's Desktop Environment Compatibility ### - -As with other remote desktop servers, there are [known compatibility issues][6] for X2Go server. Desktop environments like KDE3/4, Xfce, MATE and LXDE are the most friendly to X2Go server. However, your mileage may vary with other desktop managers. For example, the later versions of GNOME 3, KDE5, Unity are known to be not compatible with X2Go. If the desktop manager of your remote host is compatible with X2Go, you can follow the rest of the tutorial. - -### Install X2Go Server on Linux ### - -X2Go consists of remote desktop server and client components. Let's start with X2Go server installation. I assume that you already have an X2Go-compatible desktop manager up and running on a remote host, where we will be installing X2Go server. - -Note that X2Go server component does not have a separate service that needs to be started upon boot. You just need to make sure that SSH service is up and running. - -#### Ubuntu or Linux Mint: #### - -Configure X2Go PPA repository. X2Go PPA is available for Ubuntu 14.04 and higher. - - $ sudo add-apt-repository ppa:x2go/stable - $ sudo apt-get update - $ sudo apt-get install x2goserver x2goserver-xsession - -#### Debian (Wheezy): #### - - $ sudo apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E - $ sudo sh -c "echo deb http://packages.x2go.org/debian wheezy main > /etc/apt/sources.list.d/x2go.list" - $ sudo sh -c "echo deb-src http://packages.x2go.org/debian wheezy main >> /etc/apt/sources.list.d/x2go.list" - $ sudo apt-get update - $ sudo apt-get install x2goserver x2goserver-xsession - -#### Fedora: #### - - $ sudo yum install x2goserver x2goserver-xsession - -#### CentOS/RHEL: #### - -Enable [EPEL respository][7] first, and then run: - - $ sudo yum install x2goserver x2goserver-xsession - -### Install X2Go Client on Linux ### - -On a local host where you will be connecting to remote desktop, install X2GO client as follows. - -#### Ubuntu or Linux Mint: #### - -Configure X2Go PPA repository. X2Go PPA is available for Ubuntu 14.04 and higher. - - $ sudo add-apt-repository ppa:x2go/stable - $ sudo apt-get update - $ sudo apt-get install x2goclient - -Debian (Wheezy): - - $ sudo apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E - $ sudo sh -c "echo deb http://packages.x2go.org/debian wheezy main > /etc/apt/sources.list.d/x2go.list" - $ sudo sh -c "echo deb-src http://packages.x2go.org/debian wheezy main >> /etc/apt/sources.list.d/x2go.list" - $ sudo apt-get update - $ sudo apt-get install x2goclient - -#### Fedora: #### - - $ sudo yum install x2goclient - -CentOS/RHEL: - -Enable EPEL respository first, and then run: - - $ sudo yum install x2goclient - -### Connect to Remote Desktop with X2Go Client ### - -Now it's time to connect to your remote desktop. On the local host, simply run the following command or use desktop launcher to start X2Go client. - - $ x2goclient - -Enter the remote host's IP address and SSH user name. Also, specify session type (i.e., desktop manager of a remote host). - -![](https://farm9.staticflickr.com/8730/16365755693_75f3d544e9_b.jpg) - -If you want, you can customize other things (by pressing other tabs), like connection speed, compression, screen resolution, and so on. - -![](https://farm9.staticflickr.com/8699/16984498482_665b975eca_b.jpg) - -![](https://farm9.staticflickr.com/8694/16985838755_1b7df1eb78_b.jpg) - -When you initiate a remote desktop connection, you will be asked to log in. Type your SSH login and password. - -![](https://farm9.staticflickr.com/8754/16984498432_1c8068b817_b.jpg) - -Upon successful login, you will see the remote desktop screen. - -![](https://farm9.staticflickr.com/8752/16798126858_1ab083ba80_c.jpg) - -If you want to test X2Go's seamless window feature, choose "Single application" as session type, and specify the path to an executable on the remote host. In this example, I choose Dolphin file manager on a remote KDE host. - -![](https://farm8.staticflickr.com/7584/16798393920_128c3af9c5_b.jpg) - -Once you are successfully connected, you will see a remote application window open on your local desktop, not the entire remote desktop screen. - -![](https://farm9.staticflickr.com/8742/16365755713_7b90cf65f0_c.jpg) - -### Conclusion ### - -In this tutorial, I demonstrated how to set up X2Go remote desktop on [Linux VPS][8] instance. As you can see, the whole setup process is pretty much painless (if you are using a right desktop environment). While there are some desktop-specific quirkiness, X2Go is a solid remote desktop solution which is secure, feature-rich, fast, and free. - -What feature is the most appealing to you in X2Go? Please share your thought. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/x2go-remote-desktop-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/centos-remote-desktop-vps.html -[2]:http://wiki.x2go.org/ -[3]:http://xmodulo.com/go/digitalocean -[4]:http://xmodulo.com/how-to-set-up-vnc-over-ssh.html -[5]:http://wiki.x2go.org/doku.php/doc:newtox2go -[6]:http://wiki.x2go.org/doku.php/doc:de-compat -[7]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html -[8]:http://xmodulo.com/go/digitalocean diff --git a/translated/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md b/translated/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md new file mode 100644 index 0000000000..26ad141e84 --- /dev/null +++ b/translated/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md @@ -0,0 +1,138 @@ +如何在 Linux VPS 上使用 x2go 设置远程桌面 +================================================================================ +由于一切都迁移到了云上,作为提高职员生产力的一种方式,虚拟远程桌面在工业中越来越流行。尤其对于那些需要跨多个地方和设备不停漫游的人,远程桌面可以让他们和工作环境保持无缝连接。远程桌面对于雇主同样有吸引力,可以在工作环境中提高敏捷性和灵活性,由于硬件整合、桌面安全加固等原因降低 IT 花费。 + +在 Linux 世界中,有许多可用的协议(例如 RDP、RFB、NX) 和 服务器/客户端实现(例如 [TigerVNC][1]、RealVNC、FreeNX、x2go、X11vnc、TeamViewer),当然不缺乏设置远程桌面的选择。 + +当中出色的一个是 [X2Go][2],它是一个基于 NX(译者注:通过计算机网络显示远程桌面环境的一种技术,可参考 [Wiki][9]) 的远程桌面服务器和客户端的开源(GPLv2)实现。在这个教程中,我会介绍 **如何为 Linux VPS 使用 X2Go 设置远程桌面环境**。 + +### X2Go 是什么? ### + +X2Go 的历史要追溯回 NoMachine 的 NX 技术。NX 远程桌面协议的设计目的是通过利用主动压缩和缓存解决低带宽和高延迟的网络连接问题。后来,NX 转为闭源,但 NX 库还是采用 GPL 协议。这导致了多种基于 NX 的远程桌面解决方案开源实现,X2Go 就是其中之一。 + +和其它解决方案,例如 VNC 相比,X2Go 带来哪些好处呢? X2Go 继承了 NX 技术的所有高级功能,很自然能在慢速网络连接上良好工作。另外,由于它内置的基于 SSH 的加密技术,X2Go 保持了确保安全的良好业绩记录。不再需要[手动设置 SSH 隧道][4] 。X2Go 开箱支持音频,意味着远程桌面的音乐播放通过网络传送,并进入本地扬声器。在易用性方面,远程桌面上运行的应用程序可以在你的本地桌面中用一个独立窗口无缝呈现,给你造成一种应用程序实际上在你本地桌面运行的错觉。正如你看到的,这些都是一些基于 VNC 的解决方案所缺少的[强大功能][5]。 + +### X2GO 的桌面环境兼容性 ### + +和其它远程桌面服务器一样,X2Go 服务器也有一些[已知的兼容性问题][6]。像 KDE3/4、Xfce、MATE 和 LXDE 是对 X2Go 服务器最友好的桌面环境。但是,用其它桌面管理器效果可能有所不同。例如,已知 GNOME 3 之后的版本、KDE 5、Unity 和 X2Go 并不兼容。如果你的远程主机的桌面管理器和 X2Go 兼容,你可以继续以下的教程。 + +### 在 Linux 上安装 X2Go 服务器 ### + +X2Go 由远程桌面服务器和客户端组件组成。让我们首先安装 X2Go 服务器。我假设你已经有一个和 X2Go 兼容的桌面管理器并且在远程主机上运行,我们会安装 X2Go 服务器到该远程主机。 + +注意系统启动后 X2Go 服务器组件没有需要单独启动的服务。你只需要保证开启了 SSH 服务并在正常运行。 + +#### Ubuntu 或 Linux Mint: #### + +配置 X2Go PPA 库。对于 Ubuntu 14.04 以及更高版本,有可用的 X2Go PPA。 + + $ sudo add-apt-repository ppa:x2go/stable + $ sudo apt-get update + $ sudo apt-get install x2goserver x2goserver-xsession + +#### Debian (Wheezy): #### + + $ sudo apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E + $ sudo sh -c "echo deb http://packages.x2go.org/debian wheezy main > /etc/apt/sources.list.d/x2go.list" + $ sudo sh -c "echo deb-src http://packages.x2go.org/debian wheezy main >> /etc/apt/sources.list.d/x2go.list" + $ sudo apt-get update + $ sudo apt-get install x2goserver x2goserver-xsession + +#### Fedora: #### + + $ sudo yum install x2goserver x2goserver-xsession + +#### CentOS/RHEL: #### + +首先启用 [EPEL 库][7] 然后运行: + + $ sudo yum install x2goserver x2goserver-xsession + +### 在 Linux 上安装 X2Go 客户端 ### + +在将会连接到远程桌面的本地主机上,安装以下命令安装 X2Go 客户端。 + +#### Ubuntu 或 Linux Mint: #### + +配置 X2Go PPA 库。对于 Ubuntu 14.04 以及更高版本,有可用的 X2Go PPA。 + + $ sudo add-apt-repository ppa:x2go/stable + $ sudo apt-get update + $ sudo apt-get install x2goclient + +Debian (Wheezy): + + $ sudo apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E + $ sudo sh -c "echo deb http://packages.x2go.org/debian wheezy main > /etc/apt/sources.list.d/x2go.list" + $ sudo sh -c "echo deb-src http://packages.x2go.org/debian wheezy main >> /etc/apt/sources.list.d/x2go.list" + $ sudo apt-get update + $ sudo apt-get install x2goclient + +#### Fedora: #### + + $ sudo yum install x2goclient + +CentOS/RHEL: + +首先启用 EPEL 库,然后运行: + + $ sudo yum install x2goclient + +### 用 X2Go 客户端连接到远程桌面 ### + +终于可以连接到远程桌面了。在本地主机上,只需运行以下命令或者使用桌面启动器启动 X2Go 客户端。 + + $ x2goclient + +输入远程主机的 IP 地址和 SSH 用户名称。同时,指定会话类型(例如,远程主机的桌面管理器)。 + +![](https://farm9.staticflickr.com/8730/16365755693_75f3d544e9_b.jpg) + +如果需要的话,你可以自定义其它东西(通过点击其它标签),例如连接速度、压缩、屏幕分辨率等等。 + +![](https://farm9.staticflickr.com/8699/16984498482_665b975eca_b.jpg) + +![](https://farm9.staticflickr.com/8694/16985838755_1b7df1eb78_b.jpg) + +当你初始化一个远程桌面连接的时候,会要求你登录。输入你的 SSH 登录名和密码。 + +![](https://farm9.staticflickr.com/8754/16984498432_1c8068b817_b.jpg) + +成功登陆后,你会看到远程桌面屏幕。 + +![](https://farm9.staticflickr.com/8752/16798126858_1ab083ba80_c.jpg) + +如果你想测试 X2Go 的无缝窗口功能,选择 "Single application" 会话类型,然后指定远处主机上可执行文件的路径。在该例子中,我选择远程 KDE 主机上的 Dolphin 文件管理器。 + +![](https://farm8.staticflickr.com/7584/16798393920_128c3af9c5_b.jpg) + +你成功连接后,你会在本地桌面上看到一个远程应用窗口,而不是完整的远程桌面屏幕。 + +![](https://farm9.staticflickr.com/8742/16365755713_7b90cf65f0_c.jpg) + +### 总结 ### + +在这篇教程中,我介绍了如何在 [Linux VPS][8] 实例上设置 X2Go 远程桌面。正如你所看到的,整个设置过程都非常简单(如果你使用一个合适的桌面环境的话)。尽管对于特定桌面仍有问题,X2Go 是一个安全、功能丰富、快速并且免费的远程桌面解决方案。 + +X2Go 的什么功能最吸引你?欢迎分享你的观点。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/x2go-remote-desktop-linux.html + +作者:[Dan Nanni][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/centos-remote-desktop-vps.html +[2]:http://wiki.x2go.org/ +[3]:http://xmodulo.com/go/digitalocean +[4]:http://xmodulo.com/how-to-set-up-vnc-over-ssh.html +[5]:http://wiki.x2go.org/doku.php/doc:newtox2go +[6]:http://wiki.x2go.org/doku.php/doc:de-compat +[7]:https://linux.cn/article-2324-1.html +[8]:http://xmodulo.com/go/digitalocean +[9]:https://en.wikipedia.org/wiki/NX_technology \ No newline at end of file From e04092dbd2c2b42e959f9518034a44dbbbc7c493 Mon Sep 17 00:00:00 2001 From: wwy Date: Fri, 26 Jun 2015 10:28:29 +0800 Subject: [PATCH 1264/2517] Update 20150616 Linux Humor on the Command-line.md --- sources/share/20150616 Linux Humor on the Command-line.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150616 Linux Humor on the Command-line.md b/sources/share/20150616 Linux Humor on the Command-line.md index 84c808e555..47f1d0eb26 100644 --- a/sources/share/20150616 Linux Humor on the Command-line.md +++ b/sources/share/20150616 Linux Humor on the Command-line.md @@ -1,3 +1,5 @@ +translating by wwy-hust + Linux Humor on the Command-line ================================================================================ The desktop is full of eye candy. It enhances the visual experience and, in some cases, can also increase functionality of software. But it also makes software fun. Working on the command-line does not have to be always serious. If you want some fun on the command-line, there are lots of commands to raise a smile. @@ -124,4 +126,4 @@ via: http://www.linuxlinks.com/article/20150614112018846/Humor.html [4]:http://www.robobunny.com/projects/asciiquarium/html/ [5]:https://github.com/mtoyoda/sl [6]:http://aa-project.sourceforge.net/aalib/ -[7]:http://www.asty.org/cmatrix/ \ No newline at end of file +[7]:http://www.asty.org/cmatrix/ From cabb908a65212f023dbc99eb0f1c8249ccdcb7d8 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 26 Jun 2015 10:48:31 +0800 Subject: [PATCH 1265/2517] [Translating] sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md --- ...Apache '.htaccess' Tricks to Secure and Customize Websites.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md b/sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md index e9e8ecb4eb..91b2308228 100644 --- a/sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md +++ b/sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md @@ -1,3 +1,4 @@ +ictlyh Translating 25 Useful Apache ‘.htaccess’ Tricks to Secure and Customize Websites ================================================================================ Websites are important parts of our lives. They serve the means to expand businesses, share knowledge and lots more. Earlier restricted to providing only static contents, with introduction of dynamic client and server side scripting languages and continued advancement of existing static language like html to html5, adding every bit of dynamicity is possible to the websites and what left is expected to follow soon in near future. From 523ee8bb9cee7cd8457376d6ce5aaedf9adbf14e Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 26 Jun 2015 14:58:15 +0800 Subject: [PATCH 1266/2517] =?UTF-8?q?20150626-1=20=E9=80=89=E9=A2=98=20str?= =?UTF-8?q?uggling=20=E6=8E=A8=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...erformance Tuning and Optimization Tips.md | 305 ++++++++++++++++++ 1 file changed, 305 insertions(+) create mode 100644 sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md diff --git a/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md b/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md new file mode 100644 index 0000000000..6e9172c685 --- /dev/null +++ b/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md @@ -0,0 +1,305 @@ +15 Useful MySQL/MariaDB Performance Tuning and Optimization Tips +================================================================================ +MySQL is a powerful open source Relational Database Management System or in short RDBMS. It was released back in 1995 (20 years old). It uses Structured Query Language which is probably the most popular choice for managing content within a database. The latest MySQL version is 5.6.25 and was released on 29 May 2015. + +An interesting fact about MySQL is the fact that the name comes from Michael Widenius’s (MySQL’s creator) daughter My. Even though there are plenty of interesting facts about MySQL, this article is meant to show you some useful practices to help you manage your MySQL server. + +![MySQL Performance Tuning](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning1.png) + +MySQL Performance Tuning + +In April 2009 the MySQL project was bought by Oracle. As a result a MySQL community fork called MariaDB was created. The main reason for creating the fork was to keep the project free under the General Public License. + +Today MySQL and MariaDB are one of the most (if not the most) frequently used RDBMS used for web applications such as WordPress, Joomla, Magento and others. + +This article will show you some basic, yet useful tips how to optimize the fine tune the performance of MySQL/MariaDB. Please keep in mind that this article assumes that you already have MySQL or MariaDB installed. If you are still wondering how to install them on your system, you can follow our extensive guides here: + +- [Installing LAMP on RHEL/CentOS 7][1] +- [Installing LAMP on Fedora 22][2] +- [Setting Up LAMP on Ubuntu 15.04][3] +- [Installing MariaDB on Debian 8][4] +- [Install MariaDB on Gentoo Linux][5] +- [Install MariaDB on Arch Linux][6] + +**Important**: Before we start – do not accept this suggestions blindly. Each MySQL setup is unique and requires additional thought, before making any changes. + +Things you need to know: + +- MySQL/MariaDB configuration file is located in `/etc/my.cnf`. Every time you modify this file you will need to restart the MySQL service so the new changes can take effect. +- For writing this article MySQL version 5.6 has been used as template. + +### 1. Enable InnoDB file-per-table ### + +First it is important to explain that InnoDB is a storage engine. MySQL and MariaDB use InnoDB as default storage engine. In the past MySQL used to keep database tables and indexes in a system tablespace. This approach was meant for servers which sole purpose is database processing and their storage disk is not used for any other purposes. + +The InnoDB provides more flexible approach and each database information is kept in a `.ibd` data file. Each .ibd file represents a tablespace of its own. That way database operations such as “TRUNCATE” can be completed faster and you may also reclaim unused space when dropping or truncating a database table. + +Another benefit of this configuration is the fact that you can keep some of the database tables in a separate storage device. This can greatly improve the I/O load on your disks. + +The innodb_file_per_table is enabled by default in MySQL 5.6 and above. You can see that in /etc/my.cnf file. The directive looks like this: + + innodb_file_per_table=1 + +### 2. Store MySQL Database Data on Separate Partition ### + +**Note**: This setup only works with MySQL, but not with MariaDB. + +Sometimes OS read/writes can slow down the performance of your MySQL server, especially if located on same hard drive. Instead, I would recommend using separate hard drive (preferably SSD) for the MySQL service. + +To complete, this you will need to attach the new drive to your computer/server. For the purpose of this article, I will assume that the drive will be under /dev/sdb. + +The next step is to prepare the new drive: + + # fdisk /dev/sdb + +Now press “n” to create new partition. Next press “p” to make the new partition primary. After that, set the partition number from 1-4. After that you will select the partition size. Press enter here. On the next step you will need to configure the size of the partition. + +If you wish to use the entire disk press enter once more. Otherwise you can manually set the size of the new partition. When ready press “w” to write the changes. Now we will need to create a filesystem for our new partition. This can be easily done with: + + # mkfs.ext4 /dev/sdb1 + +Now we will mount our new partition in a folder. I have named my folder “ssd” and created in the root directory: + + # mkdir /ssd/ + +We are ready to mount the new partition we just made in the new folder: + + # mount /dev/sdb1 /ssd/ + +You can perform the mount at startup by adding the following line in /etc/fstab file. + + /dev/sdb1 /ssd ext3 defaults 0 0 + +Now you are ready to move MySQL to the new disk. First stop the MySQL service with: + + # service mysqld stop + +I would recommend you stopping Apache/nginx as well to prevent any attempts to write in the databases: + + # service httpd stop + # service nginx stop + +Now copy the entire MySQL directory in the new drive: + + # cp /var/lib/mysql /ssd/ -Rp + +This may take a while depending on the site of your MySQL databases. Once this process is complete rename the MySQL directory: + + # mv /var/lib/mysql /var/lib/mysql-backup + +Next we will create a symlink. + + # ln -s /ssd/mysql /var/lib/mysql + +Now you are ready to start your MySQL and web service: + + # service mysqld start + # service httpd start + # service nginx start + +At this point your MySQL databases will be accessed from the new drive. + +### 3. Optimizing InnoDB buffer pool Usage ### + +The InnoDB engine has a buffer pool used for caching data and indexes in memory. This of course will help your MySQL/MariaDB queries be executed significantly faster. Choosing the proper size here requires some very important decisions and good knowledge on your system’s memory consumption. + +Here is what you need to consider: + +- How much memory you need for other processes. This includes your system processes, page tables, socket buffers. +- Is your server dedicated for MySQL or you will be running other memory hungry services. + +On a dedicated box, you would probably want to give about 60-70% of the memory to the innodb_buffer_pool_size. If you plan on running more services on a single box, you should re-consider the amount of memory you dedicate for your innodb_buffer_pool_size. + +The value that you should edit in my.cnf is: + + innodb_buffer_pool_size + +### 4. Avoid Swappiness in MySQL ### + +Swapping is process that occurs when system moves part of memory to a special disk space called “swap”. The event usually appears when your system runs out of physical memory and instead of freeing up some RAM, the system pushed the information into disk. As you might have guess the disk is much slower than your RAM. + +By default the option is enabled: + + # sysctl vm.swappiness + + vm.swappiness = 60 + +To disable swappiness, run the following command: + + # sysctl -w vm.swappiness=0 + +### 5. Set MySQL Max Connections ### + +The max_connections directive tells your server how many concurrent connections are permitted. The MySQL/MariaDB server allows the value given in max_connections + 1 for user with SUPER privileges. The connection is opened only for the time MySQL query is executed – after that it is closed and new connection can take its place. + +Keep in mind that too many connections can cause high RAM usage and lock up your MySQL server. Usually small websites will require between 100-200 connections while larger may require 500-800 or even more. The value you apply here strongly depends on your particular MySQL/MariaDB usage. + +You can dynamically change the value of `max_connections`, without having to restart the MySQL service by running: + + # mysql -u root -p + mysql> set global max_connections := 300; + +### 6. Configure MySQL thread_cache_size ### + +The `thread_cache_size` directive sets the amount of threads that your server should cache. As the client disconnects, his threads are put in the cache if they are less than the thread_cache_size. Further requests are completed by using the threads stored in the cache. + +To improve your performance you can set the thread_cache_size to a relatively high number. To find the thread cache hit rate, you can use the following technique: + + mysql> show status like 'Threads_created'; + mysql> show status like 'Connections'; + +Now use the following formula to calculate the thread cache hit rate percentage: + + 100 - ((Threads_created / Connections) * 100) + +If you get a low number, it means that most of the new mysql connections are starting new thread instead of loading from cache. You will surely want to increase the thread_cache_size in such cases. + +The good thing here is that the thread_cache_size can be dynamically changed without having to restart the MySQL service. You can achieve this by running: + + mysql> set global thread_cache_size = 16; + +### 7. Disable MySQL Reverse DNS Lookups ### + +By default MySQL/MariaDB perform a DNS lookup of the user’s IP address/Hostname from which the connection is coming. For each client connection, the IP address is checked by resolving it to a host name. After that the host name is resolved back to an IP to verify that both match. + +This unfortunately may cause delays in case of badly configured DNS or problems with DNS server. This is why you can disable the reverse DNS lookup by adding the following in your configuration file: + + [mysqld] + # Skip reverse DNS lookup of clients + skip-name-resolve + +You will have to restart the MySQL service after applying these changes. + +### 8. Configure MySQL query_cache_size ### + +If you have many repetitive queries and your data does not change often – use query cache. People often do not understand the concept behind the `query_cache_size` and set this value to gigabytes, which can actually cause degradation in the performance. + +The reason behind that is the fact that threads need to lock the cache during updates. Usually value of 200-300 MB should be more than enough. If your website is relatively small, you can try giving the value of 64M and increase in time. + +You will have to add the following settings in the MySQL configuration file: + + query_cache_type = 1 + query_cache_limit = 256K + query_cache_min_res_unit = 2k + query_cache_size = 80M + +### 9. Configure tmp_table_size and max_heap_table_size ### + +Both directives should have the same size and will help you prevent disk writes. The `tmp_table_size` is the maximum amount of size of internal in-memory tables. In case the limit in question is exceeded the table will be converted to on-disk MyISAM table. + +This will affect the database performance. Administrators usually recommend giving 64M for both values for every GB of RAM on the server. + + [mysqld] + tmp_table_size= 64M + max_heap_table_size= 64M + +### 10. Enable MySQL Slow query Logs ### + +Logging slow queries can help you determine issues with your database and help you debug them. This can be easily enabled by adding the following values in your MySQL configuration file: + + slow-query-log = 1 + slow-query-log-file = /var/lib/mysql/mysql-slow.log + long_query_time = 1 + +The first directive enables the logging of slow queries, while the second one tells MySQL where to store the actual log file. Use `long_query_time` to define the amount of time that is considered long for MySQL query to be completed. + +### 11. Check for MySQL idle Connections ### + +Idle connections consume resources and should be interrupted or refreshed when possible. Such connections are in “sleep” state and usually stay that way for long period of time. To look for idled connections you can run the following command: + + # mysqladmin processlist -u root -p | grep “Sleep” + +This will show you list of processes that are in sleep state. The event appears when the code is using persistent connection to the database. When using PHP this event can appear when using mysql_pconnect which opens the connection, after that executes queries, removes the authentication and leaves the connection open. This will cause any per-thread buffers to be kept in memory until the thread dies. + +The first thing you would do here is to check the code and fix it. If you don’t have access to the code that is being ran, you can change the `wait_timeout` directive. The default value is 28800 seconds, while you can safely decrease it to something like 60: + + wait_timeout=60 + +### 12. Choosing Right MySQL Filesystem ### + +Choosing the right filesystem is vital for your databases. Most important things you need to consider here are – data integrity, performance and ease of administration. + +As per MariaDB’s recommendations, the best file systems are XFS, Ext4 and Btrfs. All of them are enterprise journaling filesystems that can be used with very large files and large storage volumes. + +Below you can find some useful information about the three filesystems: + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + +
FilesystemsXFSExt4Btrfs
Maximum filesystem size8EB1EB16EB
Maximum file size8EB16TB16EB
+ +The pros and cons of the Linux filesystems have been extensively covered in our article: + +- [Linux Filesystem Explained][7] + +### 13. Set MySQL max_allowed_packet ### + +MySQL splits data into packets. Usually a single packet is considered a row that is sent to a client. The `max_allowed_packet` directive defines the maximum size of packet that can be sent. + +Setting this value too low can cause a query to stall and you will receive an error in your MySQL error log. It is recommended to set the value to the size of your largest packet. + +### 14. Check MySQL Performance Tuning ### + +Measuring your MySQL/MariaDB performance is something that you should do on regular basis. This will help you see if something in the resource usage changes or needs to be improved. + +There are plenty of tools available for benchmarking, but I would like to suggest you one that is simple and easy to use. The tool is called mysqltuner. + +To download and run it, use the following set of commands: + + # wget https://github.com/major/MySQLTuner-perl/tarball/master + # tar xf master + # cd major-MySQLTuner-perl-993bc18/ + # ./mysqltuner.pl + +You will receive a detailed report about your MySQL usage and recommendation tips. Here is a sample output of default MariaDB installation: + +![MySQL Performance Tuning](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning.png) + +### 15. Optimize and Repair MySQL Databases ### + +Sometimes MySQL/MariaDB database tables get crashed quite easily, especially when unexpected server shut down, sudden file system corruption or during copy operation, when database is still accessed. Surprisingly, there is a free open source tool called ‘mysqlcheck‘, which automatically check, repair and optimize databases of all tables in Linux. + + # mysqlcheck -u root -p --auto-repair --check --optimize --all-databases + # mysqlcheck -u root -p --auto-repair --check --optimize databasename + +That’s it! I hope you have found the above article useful and help you tune up your MySQL server. As always if you have any further questions or comments, please submit them in the comment section below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/ + +作者:[Marin Todorov][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/marintodorov89/ +[1]:http://www.tecmint.com/install-lamp-in-centos-7/ +[2]:http://www.tecmint.com/install-lamp-linux-apache-mysql-php-on-fedora-22/ +[3]:http://www.tecmint.com/install-lamp-on-ubuntu-15-04/ +[4]:http://www.tecmint.com/install-mariadb-in-debian/ +[5]:http://www.tecmint.com/install-lemp-in-gentoo-linux/ +[6]:http://www.tecmint.com/install-lamp-in-arch-linux/ +[7]:http://www.tecmint.com/linux-file-system-explained/ \ No newline at end of file From 30d13996eb4954b518e42eed3a54ff05157f5c8a Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 26 Jun 2015 15:51:41 +0800 Subject: [PATCH 1267/2517] Update 20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md --- ...SQL or MariaDB Performance Tuning and Optimization Tips.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md b/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md index 6e9172c685..e01e9bf787 100644 --- a/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md +++ b/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md @@ -1,3 +1,5 @@ +translation by strugglingyouth + 15 Useful MySQL/MariaDB Performance Tuning and Optimization Tips ================================================================================ MySQL is a powerful open source Relational Database Management System or in short RDBMS. It was released back in 1995 (20 years old). It uses Structured Query Language which is probably the most popular choice for managing content within a database. The latest MySQL version is 5.6.25 and was released on 29 May 2015. @@ -302,4 +304,4 @@ via: http://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/ [4]:http://www.tecmint.com/install-mariadb-in-debian/ [5]:http://www.tecmint.com/install-lemp-in-gentoo-linux/ [6]:http://www.tecmint.com/install-lamp-in-arch-linux/ -[7]:http://www.tecmint.com/linux-file-system-explained/ \ No newline at end of file +[7]:http://www.tecmint.com/linux-file-system-explained/ From e81d5f0aa7f2de4959eab496c4fb3c3e7f309b5b Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 26 Jun 2015 19:37:39 +0800 Subject: [PATCH 1268/2517] [Translated] sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md --- ...Tricks to Secure and Customize Websites.md | 423 ------------------ ...Tricks to Secure and Customize Websites.md | 422 +++++++++++++++++ 2 files changed, 422 insertions(+), 423 deletions(-) delete mode 100644 sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md create mode 100644 translated/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md diff --git a/sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md b/sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md deleted file mode 100644 index 91b2308228..0000000000 --- a/sources/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md +++ /dev/null @@ -1,423 +0,0 @@ -ictlyh Translating -25 Useful Apache ‘.htaccess’ Tricks to Secure and Customize Websites -================================================================================ -Websites are important parts of our lives. They serve the means to expand businesses, share knowledge and lots more. Earlier restricted to providing only static contents, with introduction of dynamic client and server side scripting languages and continued advancement of existing static language like html to html5, adding every bit of dynamicity is possible to the websites and what left is expected to follow soon in near future. - -With websites, comes the need of a unit that can display these websites to a huge set of audience all over the globe. This need is fulfilled by the servers that provide means to host a website. This includes a list of servers like: Apache HTTP Server, Joomla, and WordPress that allow one to host their websites. - -![Apache htaccess Tricks](http://www.tecmint.com/wp-content/uploads/2015/01/htaccess-tricks.jpg) -25 htaccess Tricks - -One who wants to host a website can create a local server of his own or can contact any of above mentioned or any another server administrator to host his website. But the actual issue starts from this point. Performance of a website depends mainly on following factors: - -- Bandwidth consumed by the website. -- How secure is the website against hackers. -- Optimism when it comes to data search through the database -- User-friendliness when it comes to displaying navigation menus and providing more UI features. - -Alongside this, various factors that govern success of servers in hosting websites are: - -- Amount of data compression achieved for a particular website. -- Ability to simultaneously serve multiple clients asking for a same or different website. -- Securing the confidential data entered on the websites like: emails, credit card details and so on. -- Allowing more and more options to enhance dynamicity to a website. - -This article deals with one such feature provided by the servers that help enhance performance of websites along with securing them from bad bots, hotlinks etc. i.e. ‘.htaccess‘ file. - -### What is .htaccess? ### - -htaccess (or hypertext access) are the files that provide options for website owners to control the server environment variables and other parameters to enhance functionality of their websites. These files can reside in any and every directory in the directory tree of the website and provide features to the directory and the files and folders inside it. - -What are these features? Well these are the server directives i.e. the lines that instruct server to perform a specific task, and these directives apply only to the files and folders inside the folder in which this file is placed. These files are hidden by default as all Operating System and the web servers are configured to ignore them by default but making the hidden files visible can make you see this very special file. What type of parameters can be controlled is the topic of discussion of subsequent sections. - -Note: If .htaccess file is placed in /apache/home/www/Gunjit/ directory then it will provide directives for all the files and folders in that directory, but if this directory contains another folder namely: /Gunjit/images/ which again has another .htaccess file then the directives in this folder will override those provided by the master .htaccess file (or file in the folder up in hierarchy). - -### Apache Server and .htaccess files ### - -Apache HTTP Server colloquially called Apache was named after a Native American Tribe Apache to respect its superior skills in warfare strategy. Build on C/C++ and XML it is cross-platform web server which is based on NCSA HTTPd server and has a key role in growth and advancement of World Wide Web. - -Most commonly used on UNIX, Apache is available for wide variety of platforms including FreeBSD, Linux, Windows, Mac OS, Novel Netware etc. In 2009, Apache became the first server to serve more than 100 million websites. - -Apache server has one .htaccess file per user in www/ directory. Although these files are hidden but can be made visible if required. In www/ directory there are a number of folders each pertaining to a website named on user’s or owner’s name. Apart from this you can have one .htaccess file in each folder which configured files in that folder as stated above. - -How to configure htaccess file on Apache server is as follows… - -### Configuration on Apache Server ### - -There can be two cases: - -#### Hosting website on own server #### - -In this case, if .htaccess files are not enabled, you can enable .htaccess files by simply going to httpd.conf (Default configuration file for Apache HTTP Daemon) and finding the section. - - - -And locate the line that says… - - AllowOverride None - -And correct it to. - - AllowOverride All - -Now, on restarting Apache, .htaccess will work. - -#### Hosting website on different hosting provider server #### - -In this case it is better to consult the hosting admin, if they allow access to .htaccess files. - -### 25 ‘.htaccess’ Tricks of Apache Web Server for Websites ### - -#### 1. How to enable mod_rewrite in .htaccess file #### - -mod_rewrite option allows you to use redirections and hiding your true URL with redirecting to some other URL. This option can prove very useful allowing you to replace the lengthy and long URL’s to short and easy to remember ones. - -To allow mod_rewrite just have a practice to add the following line as the first line of your .htaccess file. - - Options +FollowSymLinks - -This option allows you to follow symbolic links and thus enable the mod_rewrite option on the website. Replacing the URL with short and crispy one is presented later on. - -#### 2. How to Allow or Deny Access to Websites #### - -htaccess file can allow or deny access of website or a folder or files in the directory in which it is placed by using order, allow and deny keywords. - -**Allowing access to only 192.168.3.1 IP** - - Order Allow, Deny - Deny from All - Allow from 192.168.3.1 - - OR - - Order Allow, Deny - Allow from 192.168.3.1 - -Order keyword here specifies the order in which allow, deny access would be processed. For the above ‘Order’ statement, the Allow statements would be processed first and then the deny statements would be processed. - -**Denying access to only one IP Address** - -The below lines provide the means to allow access of the website to all the users accept one with IP Address: 192.168.3.1. - - rder Allow, Deny - Deny from 192.168.3.1 - Allow from All - - OR - - - Order Deny, Allow - Deny from 192.168.3.1 - -#### 3. Generate Apache Error documents for different error codes. #### - -Using some simple lines, we can fix the error document that run on different error codes generated by the server when user/client requests a page not available on the website like most of us would have seen the ‘404 Page not found’ page in their web browser. ‘.htaccess’ files specify what action to take in case of such error conditions. - -To do this, the following lines are needed to be added to the ‘.htaccess’ files: - - ErrorDocument - -‘ErrorDocument’ is a keyword, error-code can be any of 401, 403, 404, 500 or any valid error representing code and lastly, ‘path-of-document’ represents the path on the local machine (in case you are using your own local server) or on the server (in case you are using any other’s server to host your website). - -**Example:** - - ErrorDocument 404 /error-docs/error-404.html - -The above line sets the document ‘error-404.html’ placed in error-docs folder to be displayed in case the 404 error is reported by the server for any invalid request for a page by the client. - -rrorDocument 404 "404 Page not found

The page you request is not present. Check the URL you have typed

" - -The above representation is also correct which places the string representing a usual html file. - -#### 4. Setting/Unsetting Apache server environment variables #### - -In .htaccess file you can set or unset the global environment variables that server allow to be modified by the hosters of the websites. For setting or unsetting the environment variables you need to add the following lines to your .htaccess files. - -**Setting the Environment variables** - - SetEnv OWNER “Gunjit Khera” - -Unsetting the Environment variables - - UnsetEnv OWNER - -#### 5. Defining different MIME types for files #### - -MIME (Multipurpose Internet Multimedia Extensions) are the types that are recognized by the browser by default when running any web page. You can define MIME types for your website in .htaccess files, so that different types of files as defined by you can be recognized and run by the server. - - - AddType application/javascript js - AddType application/x-font-ttf ttf ttc - - -Here, mod_mime.c is the module for controlling definitions of different MIME types and if you have this module installed on your system then you can use this module to define different MIME types for different extensions used in your website so that server can understand them. - -#### 6. How to Limit the size of Uploads and Downloads in Apache #### - -.htaccess files allow you the feature to control the amount of data being uploaded or downloaded by a particular client from your website. For this you just need to append the following lines to your .htaccess file: - - php_value upload_max_filesize 20M - php_value post_max_size 20M - php_value max_execution_time 200 - php_value max_input_time 200 - -The above lines set maximum upload size, maximum size of data being posted, maximum execution time i.e. the maximum time the a user is allowed to execute a website on his local machine, maximum time constrain within on the input time. - -#### 7. Making Users to download .mp3 and other files before playing on your website. #### - -Mostly, people play songs on websites before downloading them to check the song quality etc. Being a smart seller you can add a feature that can come in very handy for you which will not let any user play songs or videos online and users have to download them for playing. This is very useful as online playing of songs and videos consumes a lot of bandwidth. - -Following lines are needed to be added to be added to your .htaccess file: - - AddType application/octet-stream .mp3 .zip - -#### 8. Setting Directory Index for Website #### - -Most of website developers would already know that the first page that is displayed i.e. the home page of a website is named as ‘index.html’ .Many of us would have seen this also. But how is this set? - -.htaccess file provides a way to list a set of pages which would be scanned in order when a client requests to visit home page of the website and accordingly any one of the listed set of pages if found would be listed as the home page of the website and displayed to the user. - -Following line is needed to be added to produce the desired effect. - - DirectoryIndex index.html index.php yourpage.php - -The above line specifies that if any request for visiting the home page comes by any visitor then the above listed pages will be searched in order in the directory firstly: index.html which if found will be displayed as the sites home page, otherwise list will proceed to the next page i.e. index.php and so on till the last page you have entered in the list. - -#### 9. How to enable GZip compression for Files to save site’s bandwidth. #### - -This is a common observation that heavy sites generally run bit slowly than light weight sites that take less amount of space. This is just because for a heavy site it takes time to load the huge script files and images before displaying them on the client’s web browser. - -This is a common mechanism that when a browser requests a web page, server provides the browser with that webpage and now to locally display that web page, the browser has to download that page and then run the script inside that page. - -What GZip compression does here is saving the time required to serve a single customer thus increasing the bandwidth. The source files of the website on the server are kept in compressed form and when the request comes from a user then these files are transferred in compressed form which are then uncompressed and executed on the server. This improves the bandwidth constrain. - -Following lines can allow you to compress the source files of your website but this requires mod_deflate.c module to be installed on your server. - - - AddOutputFilterByType DEFLATE text/plain - AddOutputFilterByType DEFLATE text/html - AddOutputFilterByType DEFLATE text/xml - AddOutputFilterByType DEFLATE application/html - AddOutputFilterByType DEFLATE application/javascript - AddOutputFilterByType DEFLATE application/x-javascript - - -#### 10. Playing with the File types. #### - -There are certain conditions that the server assumes by default. Like: .php files are run on the server, similarly .txt files say for example are meant to be displayed. Like this we can make some executable cgi-scripts or files to be simply displayed as the source code on our website instead of being executed. - -To do this observe the following lines from a .htaccess file. - - RemoveHandler cgi-script .php .pl .py - AddType text/plain .php .pl .py - -These lines tell the server that .pl (perl script), .php (PHP file) and .py (Python file) are meant to just be displayed and not executed as cgi-scripts. - -#### 11. Setting the Time Zone for Apache server #### - -The power and importance of .htaccess files can be seen by the fact that this can be used to set the Time Zone of the server accordingly. This can be done by setting a global Environment variable ‘TZ’ of the list of global environment variables that are provided by the server to each of the hosted website for modification. - -Due to this reason only, we can see time on the websites (that display it) according to our time zone. May be some other person hosting his website on the server would have the timezone set according to the location where he lives. - -Following lines set the Time Zone of the Server. - - SetEnv TZ India/Kolkata - -#### 12. How to enable Cache Control on Website #### - -A very interesting feature of browser, most have observed is that on opening one website simultaneously more than one time, the latter one opens fast as compared to the first time. But how is this possible? Well in this case, the browser stores some frequently visited pages in its cache for faster access later on. - -But for how long? Well this answer depends on you i.e. on the time you set in your .htaccess file for Cache control. The .htaccess file can specify the amount of time for which the pages of website can stay in the browser’s cache and after expiration of time, it must revalidate i.e. pages would be deleted from the Cache and recreated the next time user visits the site. - -Following lines implement Cache Control for your website. - - - Header Set Cache-Control "max-age=3600, public" - - - Header Set Cache-Control "public" - Header Set Expires "Sat, 24 Jan 2015 16:00:00 GMT" - - -The above lines allow caching of the pages which are inside the directory in which .htaccess files are placed for 1 hour. - -#### 13. Configuring a single file, the option. #### - -Usually the content in .htaccess files apply to all the files and folders inside the directory in which the file is placed, but you can also provide some special permissions to a special file, like denying access to that file only or so on. - -For this you need to add tag to your file in a way like this: - - - Order allow, deny - Deny from 188.100.100.0 - - -This is a simple case of denying a file ‘conf.html’ from access by IP 188.100.100.0, but you can add any or every feature described for .htaccess file till now including the features yet to be described to the file like: Cache-control, GZip compression. - -This feature is used by most of the servers to secure .htaccess files which is the reason why we are not able to see the .htaccess files on the browsers. How the files are authenticated is demonstrated in subsequent heading. - -#### 14. Enabling CGI scripts to run outside of cgi-bin folder. #### - -Usually servers run CGI scripts that are located inside the cgi-bin folder but, you can enable running of CGI scripts located in your desired folder but just adding following lines to .htaccess file located in the desired folder and if not, then creating one, appending following lines: - - AddHandler cgi-script .cgi - Options +ExecCGI - -#### 15. How to enable SSI on Website with .htaccess #### - -Server side includes as the name suggests would be related to something included at the server side. But what? Generally when we have many pages in our website and we have a navigation menu on our home page that displays links to other pages then, we can enable SSI (Server Size Includes) option that allows all the pages displayed in the navigation menu to be included with the home page completely. - -The SSI allows inclusion of multiple pages as if content they contain is a part of a single page so that any editing needed to be done is done in one file only which saves a lot of disk space. This option is by default enabled on servers but for .shtml files. - -In case you want to enable it for .html files you need to add following lines: - - AddHandler server-parsed .html - -After this following in the html file would lead to SSI. - - - -#### 16. How to Prevent website Directory Listing #### - -To prevent any client being able to list the directories of the website on the server at his local machine add following lines to the file inside the directory you don’t want to get listed. - - Options -Indexes - -#### 17. Changing Default charset and language headers. #### - -.htaccess files allow you to modify the character set used i.e. ASCII or UNICODE, UTF-8 etc. for your website along with the default language used for the display of content. - -Following server’s global environment variables allow you to achieve above feature. - - AddDefaultCharset UTF-8 - DefaultLanguage en-US - -**Re-writing URL’s: Redirection Rules** - -Re-writing feature simply means replacing the long and un-rememberable URL’s with short and easy to remember ones. But, before going into this topic there are some rules and some conventions for special symbols used later on in this article. - -**Special Symbols:** - - Symbol Meaning - ^ - Start of the string - $ - End of the String - | - Or [a|b] – a or b - [a-z] - Any of the letter between a to z - + - One or more occurrence of previous letter - * - Zero or more occurrence of previous letter - ? - Zero or one occurrence of previous letter - -**Constants and their meaning:** - - Constant Meaning - NC - No-case or case sensitive - L - Last rule – stop processing further rules - R - Temporary redirect to new URL - R=301 - Permanent redirect to new URL - F - Forbidden, send 403 header to the user - P - Proxy – grab remote content in substitution section and return it - G - Gone, no longer exists - S=x - Skip next x rules - T=mime-type - Force specified MIME type - E=var:value - Set environment variable var to value - H=handler - Set handler - PT - Pass through – in case of URL’s with additional headers. - QSA - Append query string from requested to substituted URL - -#### 18. Redirecting a non-www URL to a www URL. #### - -Before starting with the explanation, lets first see the lines that are needed to be added to .htaccess file to enable this feature. - - RewriteEngine ON - RewriteCond %{HTTP_HOST} ^abc\.net$ - RewriteRule (.*) http://www.abc.net/$1 [R=301,L] - -The above lines enable the Rewrite Engine and then in second line check all those URL’s that pertain to host abc.net or have the HTTP_HOST environment variable set to “abc.net”. - -For all such URL’s the code permanently redirects them (as R=301 rule is enabled) to the new URL http://www.abc.net/$1 where $1 is the non-www URL having host as abc.net. The non-www URL is the one in bracket and is referred by $1. - -#### 19. Redirecting entire website to https. #### - -Following lines will help you transfer entire website to https: - - RewriteEngine ON - RewriteCond %{HTTPS} !on - RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} - -The above lines enable the re-write engine and then check the value of HTTPS environment variable. If it is on then re-write the entire pages of the website to https. - -#### 20. A custom redirection example #### - -For example, redirect url ‘http://www.abc.net?p=100&q=20 ‘ to ‘http://www.abc.net/10020pq’. - - RewriteEngine ON - RewriteRule ^http://www.abc.net/([0-9]+)([0-9]+)pq$ ^http://www.abc.net?p=$1&q=$2 - -In above lines, $1 represents the first bracket and $2 represents the second bracket. - -#### 21. Renaming the htaccess file #### - -For preventing the .htaccess file from the intruders and other people from viewing those files you can rename that file so that it is not accessed by client’s browser. The line that does this is: - - AccessFileName htac.cess - -#### 22. How to Prevent Image Hotlinking for your Website #### - -Another problem that is major factor of large bandwidth consumption by the websites is the problem of hot links which are links to your websites by other websites for display of images mostly of your website which consumes your bandwidth. This problem is also called as ‘bandwidth theft’. - -A common observation is when a site displays the image contained in some other site due to this hot-linking your site needs to be loaded and at the stake of your site’s bandwidth, the other site’s images are displayed. To prevent this for like: images such as: .gif, .jpeg etc. following lines of code would help: - - RewriteEngine ON - RewriteCond %{HTTP_REFERER} !^$ - RewriteCond %{HTTP_REFERERER} !^http://(www\.)?mydomain.com/.*$ [NC] - RewriteRule \.(gif|jpeg|png)$ - [F]. - -The above lines check if the HTTP_REFERER is not set to blank or not set to any of the links in your websites. If this is happening then all the images in your page are replaced by 403 forbidden. - -#### 23. How to Redirect Users to Maintenance Page. #### - -In case your website is down for maintenance and you want to notify all your clients that need to access your websites about this then for such cases you can add following lines to your .htaccess websites that allow only admin access and replace the site pages having links to any .jpg, .css, .gif, .js etc. - - RewriteCond %{REQUEST_URI} !^/admin/ [NC] - RewriteCond %{REQUEST_URI} !^((.*).css|(.*).js|(.*).png|(.*).jpg) [NC] - RewriteRule ^(.*)$ /ErrorDocs/Maintainence_Page.html - [NC,L,U,QSA] - -These lines check if the Requested URL contains any request for any admin page i.e. one starting with ‘/admin/’ or any request to ‘.png, .jpg, .js, .css’ pages and for any such requests it replaces that page to ‘ErrorDocs/Maintainence_Page.html’. - -#### 24. Mapping IP Address to Domain Name #### - -Name servers are the servers that convert a specific IP Address to a domain name. This mapping can also be specified in the .htaccess files in the following manner. - - For Mapping L.M.N.O address to a domain name www.hellovisit.com - RewriteCond %{HTTP_HOST} ^L\.M\.N\.O$ [NC] - RewriteRule ^(.*)$ http://www.hellovisit.com/$1 [L,R=301] - -The above lines check if the host for any page is having the IP Address as: L.M.N.O and if so the page is mapped to the domain name http://www.hellovisit.com by the third line by permanent redirection. - -#### 25. FilesMatch Tag #### - -Like tag that is used to apply conditions to a single file, can be used to match to a group of files and apply some conditions to the group of files as below: - - - Order Allow, Deny - Deny from All - - -### Conclusion ### - -The list of tricks that can be done with .htaccess files is much more. Thus, this gives us an idea how powerful this file is and how much security and dynamicity and other features it can give to your website. - -We’ve tried our best to cover as much as htaccess tricks in this article, but incase if we’ve missed any important trick, or you most welcome to post your htaccess ideas and tricks that you know via comments section below – we will include those in our article too… - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/apache-htaccess-tricks/ - -作者:[Gunjit Khera][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/gunjitk94/ \ No newline at end of file diff --git a/translated/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md b/translated/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md new file mode 100644 index 0000000000..723ce313b2 --- /dev/null +++ b/translated/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md @@ -0,0 +1,422 @@ +用于提高网站安全性和自定义网站的 25 个有用 Apache ‘.htaccess’ 小技巧 +================================================================================ +网站是我们生活中重要的一部分。它们是实现扩大业务、分享知识以及其它更多功能的方式。之前受制于只能提供静态内容,随着动态客户端和服务器端脚本语言的引入和现有静态语言的持续改进,例如从 html 到 html5,动态网站成为可能,剩下的也许在不久的将来也会实现。 + +有了网站,随之而来的是对能向全球大规模用户显示站点的单元的需求。这个需求通过托管网站的服务器实现。这包括一系列的服务器,例如:Apache HTTP Server、Joomla 以及 允许个人拥有自己网站的 WordPress。 + +![Apache htaccess 小技巧](http://www.tecmint.com/wp-content/uploads/2015/01/htaccess-tricks.jpg) +25 个 htaccess 小技巧 + +想要拥有一个网站,可以创建一个自己的本地服务器,或者联系任何上面提到的或其它服务器管理员来托管他的网站。但实际问题也从这点开始。网站的性能主要取决于以下因素: + +- 网站消耗的带宽。 +- 针对黑客网站有多安全。 +- 对数据库进行数据检索时的优化。 +- 显示导航菜单和提供更多 UI 功能时的用户友好性。 + +除此之外,保证托管网站服务器成功的多种因素还包括: + +- 对于一个流行站点的数据压缩量。 +- 同时为多个请求同一或不同站点的用户服务的能力。 +- 保证网站上输入的机密数据安全,例如:Email、信用卡信息等等。 +- 允许更多的选项用于增强站点的动态性。 + +这篇文章讨论一个服务器提供的用于增强网站性能和提高针对坏机器人、热链接等的安全性的功能。例如 ‘.htaccess’ 文件。 + +### .htaccess 是什么? ### + +htaccess (hypertext access,超文本访问) 是为网站所有者提供用于控制服务器环境变量以及其它参数的选项,从而增强他们网站的功能的文件。这些文件可以在网站目录树的任何一个目录中,并向该目录以及目录中的文件和子目录提供功能。 + +这些功能是什么呢?其实这些是服务器的指令,例如命令服务器执行特定任务的行,这些命令只对该文件所在目录中的文件和子目录有效。这些文件默认是隐藏的,因为所有操作系统和网站服务器默认配置为忽略。但让隐藏文件可见可以让你看到这些特殊文件。后续章节的话题将讨论能控制什么类型的参数。 + +注意:如果 .htaccess 文件保存在 /apache/home/www/Gunjit/ 目录,那么它会向该目录中的所有文件和子目录提供命令,但如果该目录包含一个名为 /Gunjit/images/ 子目录,且该子目录中也有一个 .htaccess 文件,那么这个子目录中的命令会覆盖父目录中 .htaccess 文件(或者层次结构中更上层文件)提供的命令。 + +### Apache Server 和 .htaccess 文件 ### + +Apache HTTP Server 俗称为 Apache,是为了表示对一个有卓越战争策略技能的美洲土著部落的尊敬而命名。它是用 C/C++ 和 XML 建立的基于 [NCSA HTTPd 服务器][1] 的跨平台 Web 服务器,它在万维网的成长和发展中起到了关键作用。 + +最常用于 UNIX,Apache 也能用于多种平台,包括 FreeBSD、Linux、Windows、Mac OS、Novel Netware 等。在 2009 年,Apache 成为第一个为超过一亿站点提供服务的服务器。 + +Apache 服务器对于 www/ 目录中的每个用户有一个单独的 .htaccess 文件。尽管这些文件是隐藏的,但如果需要的话可以使它们可见。在 www/ 目录中有很多子目录,每个子目录通过用户名或所有者名称命名,包含了一个站点。除此之外你可以在每个子目录中有一个 .htaccess 文件,像之前所述用于配置子目录中的文件。 + +下面介绍如果配置 Apache 服务器上的 htaccess 文件。 + +### Apache 服务器上的配置 ### + +这里有两种情况: + +#### 在自己的服务器上托管网站 #### + +在这种情况下,如果没有启用 .htaccess 文件,你可以通过在 http.conf(Apache HTTP 守护进程的默认配置文件) 中找到 部分启用。 + + + +定位如下行 + + AllowOverride None + +更改为 + + AllowOverride All + +现在,重启 Apache 后就启用了 .htaccess。 + +#### 在不同的托管服务提供商的服务器上托管网站 #### + +在这种情况下最好咨询托管管理员,如果他们允许访问 .htaccess 文件的话。 + +### 用于站点的 25 个 Apache Web 服务器 ‘.htaccess’ 小技巧 ### + +#### 1. 如何在 .htaccess 文件中启用 mod_rewrite #### + +mod_rewrite 选项允许你使用重定向并通过重定向到其它 URL 隐藏你真实的 URL。这个选项非常有用,允许你用短的容易记忆的 URL 替换长 URL。 + +要允许 mod_rewrite,只需要在你的 .htaccess 文件的第一行添加如下一行。 + + Options +FollowSymLinks + +该选项允许你跟踪符号链接从而在站点中启用 mod_rewrite。后面会介绍用短 URL 替换。 + +#### 2. 如果允许或禁止对站点的访问 #### + +通过使用 order、allow 和 deny 关键字,htaccess 文件可以允许或者禁止对站点或目录中子目录或文件的访问。 + +**只允许 IP 192.168.3.1 的访问** + + Order Allow, Deny + Deny from All + Allow from 192.168.3.1 + + 或 + + Order Allow, Deny + Allow from 192.168.3.1 + +这里的 Order 关键字指定处理 allow 和 deny 访问的顺序。对于上面的 ‘Order’ 语句,首先会处理 Allow 语句,然后是 deny 语句。 + +**只禁止某个 IP 的访问** + +下面一行的意思是除了 IP 地址 192.168.3.1,允许所有用户访问网站。 + + Order Allow, Deny + Deny from 192.168.3.1 + Allow from All + + 或 + + Order Deny, Allow + Deny from 192.168.3.1 + +#### 3. 为不同错误码生成 Apache 错误文档 #### + +用一些简单行,我们可以解决当用户/客户端请求一个站点上不可用的网页时服务器产生的错误码的错误文档,例如我们大部分人见过的浏览器中显示的 ‘404 Page not found’。‘.htaccess’ 文件指定了发生这些错误情况时采取何种操作。 + +要做到这点,需要添加下面的行到 ‘.htaccess’ 文件: + + ErrorDocument + +‘ErrorDocument’ 是一个关键字,error-code 可以是 401、403、404、500 或任何有效的表示错误的代码,最后 ‘path-of-document’ 表示本地机器上的路径(如果你使用的是你自己的本地服务器) 或 服务器上的路径(如果你使用任何其它服务器来托管网站)。 + +**例子:** + + ErrorDocument 404 /error-docs/error-404.html + +上面一行设置客户请求任何无效页面,服务器报告 404 错误时显示 error-docs 目录下的 ‘error-404.html’ 文档。 + +ErrorDocument 404 "404 Page not found

The page you request is not present. Check the URL you have typed

" + +上面的表示也正确,其中字符串表示一个普通的 html 文件。 + +#### 4. 设置/取消 Apache 服务器环境变量 #### + +在 .htaccess 文件中你可以设置或者取消站点所有者用来更改服务器设置的全局环境变量。要设置或取消环境变量,你需要在你的 .htaccess 文件中添加下面的行。 + +**设置环境变量** + + SetEnv OWNER “Gunjit Khera” + +**取消环境变量** + + UnsetEnv OWNER + +#### 5. 为文件定义不同 MIME 类型 #### + +MIME(Multipurpose Internet Multimedia Extensions,,多用途 Internet 多媒体扩展) 是浏览器运行任何页面默认能识别的类型。你可以在 .htaccess 文件中为你的站点定义 MIME 类型,然后服务器就可以识别你定义的类型的文件并运行。 + + + AddType application/javascript js + AddType application/x-font-ttf ttf ttc + + +这里,mod_mime.c 是用于控制定义不同 MIME 类型的模块,如果在你的系统中已经安装了这个模块,那么你就可以用该模块去为你站点中不同的扩展定义不同的 MIME 类型,从而服务器可以理解这些文件。 + +#### 6. 如何在 Apache 中限制上传和下载的大小 #### + +.htaccess 文件允许你拥有控制一个特定用户从你的站点上传或下载数据量大小的功能。要做到这点你只需要添加下面的行到你的 .htaccess 文件: + + php_value upload_max_filesize 20M + php_value post_max_size 20M + php_value max_execution_time 200 + php_value max_input_time 200 + +上面的行设置最大上传大小、最大推送数据大小、最大执行时间,例如允许用户在本地机器运行站点的最大时间、限制的最大输入时间。 + +#### 7. 让用户在站点上播放 .mp3 和其它文件之前预先下载 #### + +大部分情况下,人们在下载检查音乐质量之前会在网站上播放等等。作为一个聪明的销售者,你可以添加一个简单的功能,不允许任何用户在线播放音乐或视频,而是必须下载后才能播放。这非常有用,因为在线播放音乐和视频会消耗很多带宽。 + +要添加下面的行到你的 .htaccess 文件: + + AddType application/octet-stream .mp3 .zip + +#### 8. 为站点设置目录索引 #### + +大部分网站开发者都知道第一个显示的页面,例如一个站点的主页面,被命名为 ‘index.html’。我们大部分也见过这个。但是如何设置呢? + +.htaccess 文件提供了一种方式用于列出一个客户端请求访问网站的主页面时会顺序扫描的一些网页集,相应地如果找到了列出的页面中的任何一个就会作为站点的主页面并显示给用户。 + +需要添加下面的行产生所需的效果。 + + DirectoryIndex index.html index.php yourpage.php + +上面一行指定如果有任何访问主页面的请求到来,首先会在目录中顺序搜索上面列出的网页:如果发现了 index.html 则显示为主页面,否则会处理下一个页面,例如 index.php,如此直到你在列表中输入的最后一个页面。 + +#### 9. 如何为文件启用 GZip 压缩以节省网站带宽 #### + +繁重站点通常比只占少量空间的轻量级站点运行更慢是常见的现象。这是因为对于繁重站点需要时间加载大量的脚本文件和图片用于在客户端的 Web 浏览器上显示。 + +当浏览器请求一个 web 页面时,服务器提供给浏览器该页面并局部显示该 web 页面,浏览器需要下载该页面然后在页面内部运行脚本,这是一种常见机制。 + +这里 GZip 压缩所做的就是节省单个用户的服务时间从而提高带宽。服务器上站点的源文件以压缩形式保存,当用户请求到来的时候,这些文件以压缩形式传送,然后在服务器上解压并执行。这改进了带宽限制。 + +下面的行允许你压缩站点的源文件,但要求在你的服务器上安装 mod_deflate.c 模块。 + + + AddOutputFilterByType DEFLATE text/plain + AddOutputFilterByType DEFLATE text/html + AddOutputFilterByType DEFLATE text/xml + AddOutputFilterByType DEFLATE application/html + AddOutputFilterByType DEFLATE application/javascript + AddOutputFilterByType DEFLATE application/x-javascript + + +#### 10. 处理文件类型 #### + +服务器默认的有一些特定情况。例如:在服务器上运行 .php 文件,显示 .txt 文件。像这些我们可以以源代码形式只显示一些可执行 cgi 脚本或文件而不是执行它们。 + +要做到这点在 .htaccess 文件中有如下行。 + + RemoveHandler cgi-script .php .pl .py + AddType text/plain .php .pl .py + +这些行告诉服务器只显示而不执行 .pl (perl 脚本)、.php (PHP 文件) 和 .py (Python 文件) 。 + +#### 11. 为 Apache 服务器设置时区 #### + +.htaccess 文件可用于为服务器设置时区可以看出它的能力和重要性。这可以通过设置一个服务器为每个托管站点提供的一系列全局环境变量中的 ‘TZ’ 完成。 + +由于这个原因,我们可以在网站上看到根据我们的时区显示的时间。也许服务器上其他拥有网站的人会根据他居住地点的位置设置时区。 + +下面的一行为服务器设置时区。 + + SetEnv TZ India/Kolkata + +#### 12. 如果在站点上启用缓存控制 #### + +浏览器很有趣的一个功能是,已经观察到多次同时打开一个网站,和第一次打开相比之后会更快。但为什么会这样呢?事实上,浏览器在它的缓存中保存了一些通常访问的页面用于加快后面的访问。 + +但保存多长时间呢?这取决于你自己。例如,你的 .htaccess 文件中设置的缓存控制时间。.htaccess 文件指定了站点的网页可以在浏览器缓存中保存的时间,时间到期后需要重新验证,例如页面会从缓存中删除然后在下次用户访问站点的时候重建。 + +下面的行为你的站点实现缓存控制。 + + + Header Set Cache-Control "max-age=3600, public" + + + Header Set Cache-Control "public" + Header Set Expires "Sat, 24 Jan 2015 16:00:00 GMT" + + +上面的行允许缓存 .htaccess 文件所在目录中的页面一小时。 + +#### 13. 配置单个文件 #### + +通常 .htaccess 文件中的内容会对该文件所在目录中的所有文件和子目录起作用,但是你也可以对特殊文件设置一些特殊权限,例如只禁止对某个文件的访问等等。 + +要做到这点,你需要在文件中以类似方式添加 标记: + + + Order allow, deny + Deny from 188.100.100.0 + + +这是一个禁止 IP 188.100.100.0 访问 ‘conf.html’ 的简单例子,但是你也可以添加介绍过的 .htaccess 文件的任何功能,包括将要介绍的功能,例如:缓存控制、GZip 压缩。 + +大部分服务器会用这个功能增强 .htaccess 文件的安全,这也是我们在浏览器上看不到 .htaccess 文件的原因。在后面的章节中会介绍如何给文件授权。 + +#### 14. 启用在 cgi-bin 目录以外运行 CGI 脚本 #### + +通常服务器运行的 CGI 脚本都保存在 cgi-bin 目录中,但是你可以启用在你需要的目录运行 CGI 脚本,只需要在所需的目录中添加下面的行到 .htaccess 文件,如果没有改文件就创建一个,并添加下面的行: + + AddHandler cgi-script .cgi + Options +ExecCGI + +#### 15.如何用 .htaccess 在站点上启用 SSI #### + +服务器端包括顾名思义的和服务器部分相关的东西。但是什么呢?通常当我们在站点上有很多页面的时候,我们在主页面上会有一个显示到其它页面链接的导航菜单,我们可以启用 SSI(Server Size Includes) 选项允许导航菜单中显示的所有页面完全包含在主页面中。 + +SSI 允许包含多个页面,好像他们包含的内容就是一个单一页面的一部分,因此任何需要的编辑都只有一个文件,从而可以节省很多磁盘空间。除了 .shtml 文件,服务器默认启用了该选项。 + +如果你想要对 .html 启用该选项,你需要添加下面的行: + + AddHandler server-parsed .html + +这之后 html 文件会导向 SSI。 + + + +#### 16. 如何防止网站目录列表 #### + +为防止任何客户端在本地机器罗列服务器上的网站目录列表,添加下面的行到你不想列出的目录的文件中。 + + Options -Indexes + +#### 17. 更改默认字符集和语言头 #### + +.htaccess 文件允许你更改网站使用的字符集,例如 ASCII 或 UNICODE,UTF-8 等,以及用于显示内容的默认语言。 + +在服务器的全局环境变量之后添加下面语句可以实现上述功能。 + + AddDefaultCharset UTF-8 + DefaultLanguage en-US + +**重写 URL 的重定向规则** + +重写功能仅意味着用短而易记的 URL 替换长而难以记忆的 URL。但是,在开始这个话题之前,这里有一些本文后面会使用的特殊字符的规则和约定。 + +**特殊符号:** + + 符号 含义 + ^ - 字符串开头 + $ - 字符串结尾 + | - 或 [a|b] – a 或 b + [a-z] - a 到 z 的任意字母 + + - 之前字母的一次或多次出现 + * - 之前字母的零次或多次出现 + ? - 之前字母的零次或一次出现 + +**常量和它们的含义:** + + 常量 含义 + NC - 区分大小写 + L - 最后的规则 – 停止处理更多规则 + R - 临时重定向到新 URL + R=301 - 永久重定向到新 URL + F - 禁止发送 403 头给用户 + P - 代理 – 获取远程内容代替部分并返回 + G - Gone, 不再存在 + S=x - 跳过后面的 x 条规则 + T=mime-type - 强制指定 MIME 类型 + E=var:value - 设置环境变量 var 的值为 value + H=handler - 设置处理器 + PT - Pass through – 如果 URL 有额外的头 + QSA - 从到替换 URL 的请求追加查询字符串 + +#### 18. 重定向一个非 www URL 到 www URL #### + +在开始解释之前,首先看看启用该功能需要添加到 .htaccess 文件的行。 + + RewriteEngine ON + RewriteCond %{HTTP_HOST} ^abc\.net$ + RewriteRule (.*) http://www.abc.net/$1 [R=301,L] + +上面的行启用 Rewrite Engine 然后在第二行检查所有涉及到主机 abc.net 或 环境变量 HTTP_HOST 为 “abc.net” 的 URL。 + +对于所有这样的 URL,代码永久重定向它们(如果启用了 R=301 规则)到新 URL http://www.abc.net/$1,其中 $1 是主机为 abc.net 的非 www URL。非 www URL 是大括号内的内容,并通过 $1 引用。 + +#### 19. 重定向整个站点到 https #### + +下面的行会帮助你转换整个网站到 https: + + RewriteEngine ON + RewriteCond %{HTTPS} !on + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} + +上面的行启用 re-write engine 然后检查环境变量 HTTPS 的值。如果设置了那么重写所有网站页面到 https。 + +#### 20.一个自定义重写例子 #### + +例如,重定向 url ‘http://www.abc.net?p=100&q=20’ 到 ‘http://www.abc.net/10020pq’。 + + RewriteEngine ON + RewriteRule ^http://www.abc.net/([0-9]+)([0-9]+)pq$ ^http://www.abc.net?p=$1&q=$2 + +在上面的行中,$1 表示第一个括号,$2 表示第二个括号。 + +#### 21. 重命名 htaccess 文件 #### + +为了防止入侵者和其他人查看 .htaccess 文件,你可以重命名该文件,这样就不能通过客户端浏览器访问。实现该目标的语句是: + + AccessFileName htac.cess + +#### 22. 如何为你的网站禁用图片链接 #### + +网站大的带宽消耗的另外一个重要问题是热链接问题,这是其它站点用于显示你网站的图片而链接到你的网站的链接,这会消耗你的带宽。这问题也被成为 ‘带宽盗窃’。 + +一个常见现象是当一个网站要显示其它网站所包含的图片时,由于该链接你的网站需要被加载,消耗你站点的带宽而显示其它站点的图片。为了防止出现这种情况,例如 .gif、.jpeg 图片等,下面的代码行会有所帮助: + + RewriteEngine ON + RewriteCond %{HTTP_REFERER} !^$ + RewriteCond %{HTTP_REFERERER} !^http://(www\.)?mydomain.com/.*$ [NC] + RewriteRule \.(gif|jpeg|png)$ - [F]. + +上面的行检查 HTTP_REFERER 是否没有设为空或没有设为你站点上的任何链接。如果是这样的话,你网页上的所有图片会用 403 禁止访问代替。 + +#### 23. 如何将用户重定向到维护页面 #### + +如果你的网站需要进行维护并且你想向所有需要访问该网站的你的所有客户通知这个消息,对于这种情况,你可以添加下面的行到你的 .htaccess 文件,从而只允许管理员访问并替换所有有 .jpg、.css、.gif、.js 等的页面。 + + RewriteCond %{REQUEST_URI} !^/admin/ [NC] + RewriteCond %{REQUEST_URI} !^((.*).css|(.*).js|(.*).png|(.*).jpg) [NC] + RewriteRule ^(.*)$ /ErrorDocs/Maintainence_Page.html + [NC,L,U,QSA] + +这些行检查请求 URL 是否包含任何例如以 ‘/admin/’ 开头的管理页面的请求,或任何到 ‘.png, .jpg, .js, .css’ 页面的请求,对于任何这样的请求,用 ‘ErrorDocs/Maintainence_Page.html’ 替换那个页面。 + +#### 24. 映射 IP 地址到域名 #### + +名称服务器是将特定 IP 地址转换为域名的服务器。该映射也可以在 .htaccess 文件中用以下形式指定。 + + 为了将地址 L.M.N.O 映射到域名 www.hellovisit.com + RewriteCond %{HTTP_HOST} ^L\.M\.N\.O$ [NC] + RewriteRule ^(.*)$ http://www.hellovisit.com/$1 [L,R=301] + +上面的行检查任何页面的主机是否包含类似 L.M.N.O 的 IP 地址,如果是的话第三行会通过永久重定向将页面映射到域名 http://www.hellovisit.com。 + +#### 25. FilesMatch 标签 #### + +类似用于应用条件到单个文件的 标签, 能用于匹配一组文件并对该组文件应用一些条件,如下: + + + Order Allow, Deny + Deny from All + + +### 结论 ### + +.htaccess 文件能实现的小技巧还有很多。这告诉了我们这个文件有多么强大,通过该文件能给你的站点添加多少安全性、动态性以及其它功能。 + +我们已经在这篇文章中尽最大努力覆盖尽可能多的 htaccess 小技巧,但如果我们缺少了任何重要的技巧,或者你愿意告诉我们你的 htaccess 想法和技巧,你可以在下面的评论框中提交,我们也会在文章中进行介绍。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/apache-htaccess-tricks/ + +作者:[Gunjit Khera][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gunjitk94/ +[1]:https://en.wikipedia.org/wiki/NCSA_HTTPd \ No newline at end of file From aa63327a7fdeb71d83cb86b4d992c49f1d5e4a32 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 25 Jun 2015 09:47:15 +0800 Subject: [PATCH 1269/2517] PUB:20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux @geekpi --- ...rs--How to mount an LVM partition on Linux.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md (77%) diff --git a/translated/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md b/published/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md similarity index 77% rename from translated/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md rename to published/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md index 391769edc2..1466c8c87e 100644 --- a/translated/tech/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md +++ b/published/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md @@ -1,10 +1,10 @@ -Linux有问必答 -- 如何在Linux中挂载LVM分区 +Linux有问必答:如何在Linux中直接挂载LVM分区 ================================================================================ > **提问**: 我有一个USB盘包含了LVM分区。 我想要在Linux中访问这些LVM分区。我该如何在Linux中挂载LVM分区? -】LVM是逻辑卷管理工具,它允许你使用逻辑卷和卷组的概念来管理磁盘空间。使用LVM相比传统分区最大的好处是弹性地位用户和程序分配空间而不用考虑每个物理磁盘的大小。 +LVM是逻辑卷管理工具,它允许你使用逻辑卷和卷组的概念来管理磁盘空间。使用LVM相比传统分区最大的好处是弹性地为用户和程序分配空间而不用考虑每个物理磁盘的大小。 -在LVM中,那些创建了逻辑分区的物理存储是传统的分区(比如:/dev/sda2,/dev/sdb1)。这些分区必须被初始化位“物理卷”并被标签(如,“Linux LVM”)来使它们可以在LVM中使用。一旦分区被标记被LVM分区,你不能直接用mount命令挂载。 +在LVM中,那些创建了逻辑分区的物理存储是传统的分区(比如:/dev/sda2,/dev/sdb1)。这些分区必须被初始化为“物理卷 PV”并加上卷标(如,“Linux LVM”)来使它们可以在LVM中使用。一旦分区被标记被LVM分区,你不能直接用mount命令挂载。 如果你尝试挂载一个LVM分区(比如/dev/sdb2), 你会得到下面的错误。 @@ -16,9 +16,9 @@ Linux有问必答 -- 如何在Linux中挂载LVM分区 ![](https://farm8.staticflickr.com/7696/17749902190_0a6d36821f_b.jpg) -要正确地挂载LVM分区,你必须挂载分区创建的“逻辑分区”。下面就是如何做的。 +要正确地挂载LVM分区,你必须挂载分区中创建的“逻辑卷”。下面就是如何做的。 -=首先,用下面的命令检查可用的卷组: +首先,用下面的命令检查可用的卷组: $ sudo pvs @@ -60,7 +60,9 @@ Linux有问必答 -- 如何在Linux中挂载LVM分区 ![](https://farm8.staticflickr.com/7707/17938137591_cdb4cbfb43_b.jpg) -如果你想要挂载一个特定的逻辑卷,使用“LV Path”下面的设备名(如:/dev/vg_ezsetupsystem40a8f02fadd0/lv_home)。 +*上图可以看到两个逻辑卷的名字:lv_root和lv_home* + +如果你想要挂载一个特定的逻辑卷,使用如下的“LV Path”的设备名(如:/dev/vg_ezsetupsystem40a8f02fadd0/lv_home)。 $ sudo mount /dev/vg_ezsetupsystem40a8f02fadd0/lv_home /mnt @@ -82,7 +84,7 @@ via: http://ask.xmodulo.com/mount-lvm-partition-linux.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 2ffee2ffe70643cc55101f87dd53576cc14adfea Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 25 Jun 2015 10:17:08 +0800 Subject: [PATCH 1270/2517] PUB:20150520 Shell Script to Backup Files or Directories Using rsync @GOLinux --- ...Backup Files or Directories Using rsync.md | 81 ++++++++++--------- 1 file changed, 41 insertions(+), 40 deletions(-) rename {translated/tech => published}/20150520 Shell Script to Backup Files or Directories Using rsync.md (51%) diff --git a/translated/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md b/published/20150520 Shell Script to Backup Files or Directories Using rsync.md similarity index 51% rename from translated/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md rename to published/20150520 Shell Script to Backup Files or Directories Using rsync.md index 639e58ede9..b987588c4f 100644 --- a/translated/tech/20150520 Shell Script to Backup Files or Directories Using rsync.md +++ b/published/20150520 Shell Script to Backup Files or Directories Using rsync.md @@ -1,6 +1,6 @@ Shell脚本:使用rsync备份文件/目录 ================================================================================ -本文,我们带来了shell脚本,用来使用rsync命令将你本地Linux机器上的文件/目录备份到远程Linux服务器上。使用该脚本实施备份会是一个交互的方式,你需要提供远程备份服务器的主机名/ip地址和文件夹位置。我们保留了一个独立文件,在这个文件中你需要提供需要备份的文件/目录。我们添加了两个脚本,**第一个脚本**在每次拷贝完一个文件后询问密码(如果你启用了ssh验证密钥,那么就不会询问密码),而第二个脚本中,则只会提示一次输入密码。 +本文我们介绍一个shell脚本,用来使用rsync命令将你本地Linux机器上的文件/目录备份到远程Linux服务器上。使用该脚本会以交互的方式实施备份,你需要提供远程备份服务器的主机名/ip地址和文件夹位置。我们使用一个单独的列表文件,在这个文件中你需要列出要备份的文件/目录。我们添加了两个脚本,**第一个脚本**在每次拷贝完一个文件后询问密码(如果你启用了ssh密钥验证,那么就不会询问密码),而第二个脚本中,则只会提示一次输入密码。 我们打算备份bckup.txt,dataconfig.txt,docs和orcledb。 @@ -12,7 +12,7 @@ Shell脚本:使用rsync备份文件/目录 drwxr-xr-x. 2 root root 4096 May 15 10:45 docs drwxr-xr-x. 2 root root 4096 May 15 10:44 oracledb -该文件包含了备份文件/目录的详情 +bckup.txt文件包含了需要备份的文件/目录的详情 [root@Fedora21 tmp]# cat /tmp/bckup.txt /tmp/oracledb @@ -24,46 +24,46 @@ Shell脚本:使用rsync备份文件/目录 #!/bin/bash - #We will save path to backup file in variable + # 将备份列表文件的路径保存到变量中 backupf='/tmp/bckup.txt' - #Next line just prints message + # 输入一个提示信息 echo "Shell Script Backup Your Files / Directories Using rsync" - #next line check if entered value is not null, and if null it will reask user to enter Destination Server + # 检查是否输入了目标服务器,如果为空就再次提示用户输入 while [ x$desthost = "x" ]; do - #next line prints what userd should enter, and stores entered value to variable with name desthost + # 提示用户输入目标服务器地址并保存到变量 read -p "Destination backup Server : " desthost - #next line finishes while loop + # 结束循环 done - #next line check if entered value is not null, and if null it will reask user to enter Destination Path + # 检查是否输入了目标文件夹,如果为空就再次提示用户输入 while [ x$destpath = "x" ]; do - #next line prints what userd should enter, and stores entered value to variable with name destpath + # 提示用户输入目标文件夹并保存到变量 read -p "Destination Folder : " destpath - #next line finishes while loop + # 结束循环 done - #Next line will start reading backup file line by line + # 逐行读取备份列表文件 for line in `cat $backupf` - #and on each line will execute next + # 对每一行都进行处理 do - #print message that file/dir will be copied + # 显示要被复制的文件/文件夹名称 echo "Copying $line ... " - #copy via rsync file/dir to destination + # 通过 rsync 复制文件/文件夹到目标位置 rsync -ar "$line" "$desthost":"$destpath" - #this line just print done + # 显示完成 echo "DONE" - #end of reading backup file + # 结束 done #### 运行带有输出结果的脚本 #### @@ -91,64 +91,65 @@ Shell脚本:使用rsync备份文件/目录 #!/bin/bash - #We will save path to backup file in variable + # 将备份列表文件的路径保存到变量中 backupf='/tmp/bckup.txt' - #Next line just prints message + # 输入一个提示信息 echo "Shell Script Backup Your Files / Directories Using rsync" - #next line check if entered value is not null, and if null it will reask user to enter Destination Server + # 检查是否输入了目标服务器,如果为空就再次提示用户输入 while [ x$desthost = "x" ]; do - #next line prints what userd should enter, and stores entered value to variable with name desthost + # 提示用户输入目标服务器地址并保存到变量 read -p "Destination backup Server : " desthost - #next line finishes while loop + # 结束循环 done - #next line check if entered value is not null, and if null it will reask user to enter Destination Path + # 检查是否输入了目标文件夹,如果为空就再次提示用户输入 while [ x$destpath = "x" ]; do - #next line prints what userd should enter, and stores entered value to variable with name destpath + # 提示用户输入目标文件夹并保存到变量 read -p "Destination Folder : " destpath - #next line finishes while loop + # 结束循环 done - #next line check if entered value is not null, and if null it will reask user to enter password + # 检查是否输入了目标服务器密码,如果为空就再次提示用户输入 while [ x$password = "x" ]; do - #next line prints what userd should enter, and stores entered value to variable with name password. #To hide password we are using -s key + # 提示用户输入密码并保存到变量 + # 使用 -s 选项不回显输入的密码 read -sp "Password : " password - #next line finishes while loop + # 结束循环 done - #Next line will start reading backup file line by line + # 逐行读取备份列表文件 for line in `cat $backupf` - #and on each line will execute next + # 对每一行都进行处理 do - #print message that file/dir will be copied + # 显示要被复制的文件/文件夹名称 echo "Copying $line ... " - #we will use expect tool to enter password inside script + # 使用 expect 来在脚本中输入密码 /usr/bin/expect << EOD - #next line set timeout to -1, recommended to use + # 推荐设置超时为 -1 set timeout -1 - #copy via rsync file/dir to destination, using part of expect — spawn command + # 通过 rsync 复制文件/文件夹到目标位置,使用 expect 的组成部分 spawn 命令 spawn rsync -ar ${line} ${desthost}:${destpath} - #as result of previous command we expect “password” promtp + # 上一行命令会等待 “password” 提示 expect "*?assword:*" - #next command enters password from script + # 在脚本中提供密码 send "${password}\r" - #next command tells that we expect end of file (everything finished on remote server) + # 等待文件结束符(远程服务器处理完了所有事情) expect eof - #end of expect pard + # 结束 expect 脚本 EOD - #this line just print done + # 显示结束 echo "DONE" - #end of reading backup file + # 完成 done #### 运行第二个带有输出结果的脚本的屏幕截图 #### @@ -163,7 +164,7 @@ via: http://linoxide.com/linux-shell-script/shell-script-backup-files-directorie 作者:[Yevhen Duma][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 6fdfe747bb35c0c167d18f4281b00c9ad5913545 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 25 Jun 2015 10:30:07 +0800 Subject: [PATCH 1271/2517] PUB:20141219 What is good audio editing software on Linux @wwy-hust --- ...is good audio editing software on Linux.md | 67 +++++++++++++++++++ ...is good audio editing software on Linux.md | 67 ------------------- 2 files changed, 67 insertions(+), 67 deletions(-) create mode 100644 published/20141219 What is good audio editing software on Linux.md delete mode 100644 translated/tech/20141219 What is good audio editing software on Linux.md diff --git a/published/20141219 What is good audio editing software on Linux.md b/published/20141219 What is good audio editing software on Linux.md new file mode 100644 index 0000000000..117961919d --- /dev/null +++ b/published/20141219 What is good audio editing software on Linux.md @@ -0,0 +1,67 @@ +Linux下优秀的音频编辑软件 +================================================================================ + +不论您是一个音乐爱好者或只是一个要记录您导师的讲话的学生,您都需要录制音频和编辑音频。长久以来这样的工作都要靠Macintosh,如今那个时代已经过去,现在Linux也可以胜任这些工作了。简而言之,这里有一份不完全的音频编辑器软件列表,适用于不同的任务和需求。 + +### 1. Audacity ### + +![](https://farm9.staticflickr.com/8572/15405018653_83ba3e718d_c.jpg) + +让我们从我个人最喜欢的软件开始。[Audacity][1]可以运行在Windows、Mac和Linux上。它是开源的,且易于使用。你会觉得:Audacity几乎是完美的。它可以让您在干净的界面上操作音频波形。简单地说,您可以覆盖音轨、剪切和修改音轨、增加特效、执行高级的声音分析,然后将它们导出到一大堆可用的格式。我喜欢它的原因是它将基本的功能和复杂的功能结合在一起并且保持一个简单的学习曲线。然而,它并不是一个完全最优化的软件,尤其是对于音乐家和专业人员。 + +### 2. Jokosher ### + +![](https://farm8.staticflickr.com/7524/15998875136_82903a9b4a_c.jpg) + +在不同的层次上,[Jokosher][2]更多的聚焦在多音轨方面。它使用Python和GTK+作为前端界面,并使用GStreamer作为音频后端。Jokosher那易用的界面和它的扩展性给我留下了深刻的印象。也许编辑的功能并不是最先进的,但它的提示十分清晰,适合音乐家。例如,我十分喜欢音轨和乐器的组合。简而言之,如果您是一个音乐家,那么它是在您转移到下一个软件前进行实践的好机会。 + +### 3. Ardour ### + +![](https://farm9.staticflickr.com/8577/16024644385_d8cd8073a3_c.jpg) + +接下来谈论一些复杂的工具,[Ardour][3]是一套完整的可以录制、编辑和混音的软件。这个设计吸引了所有的专业人员,Ardour在声音和插件方面超出我的想象。如果您在寻找一头野兽并且不惧怕驯服它,那么Ardour或许是一个不错的选择。再次,它的界面和丰富的文档,尤其是它首次启动时的配置工具都是它迷人魅力的一部分。 + +### 4. Kwave ### + +![](https://farm8.staticflickr.com/7557/15402389884_633a8b04c5_c.jpg) + +对于所有KDE的热爱者,[KWave][4]绝对符合您对于设计和功能的想象。它有丰富的快捷键以及很多有趣的选项,例如内存管理。尽管很多特效很不错,但我们更应该关注那些用于音频剪切/粘贴的工具。可惜的是它无法与Audacity相比,而更重要的是,它的界面并没有那么吸引我。 + +### 5. Qtractor ### + +![](https://farm8.staticflickr.com/7551/16022707501_68c39f37e5_c.jpg) + +如果Kwave对您来说过于简单,但基于Qt的程序却有些吸引力,那么对您来说,也许[Qtractor][5]是一个选项。它致力于做一个“对于家庭用户来说足够简单,并且对专业人员来说足够强大的软件。”实际上它功能和选项的数量几乎是压倒性的。我最喜欢的当然是可定制的快捷键。除此之外,Qtractor可能是我最喜欢的一个处理MIDI文件的工具。 + +### 6. LMMS ### + +![](https://farm8.staticflickr.com/7509/15838603239_ef0ecbc8d2_c.jpg) + +作为Linux多媒体工作室,LMMS的直接目标是音乐制作。如果您之前没有什么经验并且不想浪费太多的时间,那么请去别处吧。LMMS是其中一个复杂但强大的软件,只有少数的人真正的掌握了它。它有太多的功能和特效以至于无法一一列出,但如果我必须找一个,我会说用来模拟Game Boy声音系统的Freeboy插件简直像魔术一样。然后,去看看它那惊人的文档吧。 + +### 7. Traverso ### + +![](https://farm8.staticflickr.com/7537/15838603279_70ee925057_c.jpg) + +最后站在我面前的是Traverso,它支持无限制的音轨计数,并直接整合了CD烧录的功能。另外,它对我来说是介于简单的软件和专业的软件之间的程序。它的界面是KDE样式的,其键盘配置很简单。更有趣的是,Traverso会监视您的系统资源以确定不会超过您的CPU或者硬件的能力。 + +总而言之,能在Linux系统上看到这么多不同的应用程序是一件开心的事。它使得您永远可以找到最适合自己的那一款。虽然我最喜欢的应用是Audacity,但我非常震惊于LMMS和Jokosher的设计。 + +我们有漏掉什么么?您在Linux下使用哪一款软件呢?原因是什么呢?请留言让我们知道。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/good-audio-editing-software-linux.html + +作者:[Adrien Brochard][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://audacity.sourceforge.net/ +[2]:https://launchpad.net/jokosher/ +[3]:http://ardour.org/ +[4]:http://kwave.sourceforge.net/ +[5]:http://qtractor.sourceforge.net/qtractor-index.html \ No newline at end of file diff --git a/translated/tech/20141219 What is good audio editing software on Linux.md b/translated/tech/20141219 What is good audio editing software on Linux.md deleted file mode 100644 index c3f9c76d61..0000000000 --- a/translated/tech/20141219 What is good audio editing software on Linux.md +++ /dev/null @@ -1,67 +0,0 @@ -LinuxƵ༭ -================================================================================ - -һְ߻ֻһҪ¼ʦѧҪ¼Ƶͱ༭ƵĹҪMacintoshǸʱѾȥLinuxҲʤЩˡ֮һݲȫƵ༭бڲͬ - -### 1. Audacity ### - -![](https://farm9.staticflickr.com/8572/15405018653_83ba3e718d_c.jpg) - -ǴҸϲʼ[Audacity][1]WindowsMacLinuxϡǿԴģʹáãAudacityġڸɾĽϲƵΡ򵥵˵Ը졢к޸졢Чִи߼ȻǵһѿõĸʽϲԭĹܺ͸ӵĹܽһұһ򵥵ѧϰߡȻһȫŻǶּҺרҵ֪ʶˡ - -### 2. Jokosher ### - -![](https://farm8.staticflickr.com/7524/15998875136_82903a9b4a_c.jpg) - -ڲͬIJϣ[Jokosher][2]ľ۽ڶ췽档ʹPythonGTK+Ϊǰ˽ڣʹGStreamerΪƵˡJokosherƽĽչԸ̵ӡҲ༭ĹܲȽģʮʺּҡ磬ʮϲϡ֮һּңôתƵһǰʵĺûᡣ - -### 3. Ardour ### - -![](https://farm9.staticflickr.com/8577/16024644385_d8cd8073a3_c.jpg) - -̸һЩӵĹߣ[Ardour][3]һĿ¼ơ༭ͻеרҵԱArdourͲ泬ҵѰһͷҰ޲ҲѱôArdourȡһѡٴΣĽӿںḻĵ״ʱù߶һ֡ - -### 4. Kwave ### - -![](https://farm8.staticflickr.com/7557/15402389884_633a8b04c5_c.jpg) - -KDEȰߣ[KWave][4]Էƺ͹ܵзḻĿݼԼܶȤѡڴܺܶЧܲǸӦùעЩƵ/ճĹߡϧ޷AudacityȣҪǣýӿڲûôҡ - -### 5. Qtractor ### - -![](https://farm8.staticflickr.com/7551/16022707501_68c39f37e5_c.jpg) - -Kwave˵ڼ򵥣QtijȴЩô˵Ҳ[Qtractor][5]һѡһڼͥû˵㹻򵥣ҶרҵԱ˵㹻ǿʵܺѡѹԵġϲĵȻǿɶƵĿݼ֮⣬QtractorϲһMIDIļĹߡ - -### 6. LMMS ### - -![](https://farm8.staticflickr.com/7509/15838603239_ef0ecbc8d2_c.jpg) - -ΪLinuxý幤ңLMMSֱĿ֮ǰûʲô鲢Ҳ˷̫ʱ䣬ôȥ𴦰ɡLMMSһӵǿֻ̫ĹܺЧ޷һһгұһһ˵ģGame BoyϵͳFreeboyֱħһȻȥǾ˵ĵɡ - -### 7. Traverso ### - -![](https://farm8.staticflickr.com/7537/15838603279_70ee925057_c.jpg) - -վǰTraverso֧ƵֱCD¼Ĺܡ⣬˵ǽڼ򵥵רҵ֮ijĽKDEʽģúܼ򵥡ȤǣTraversoϵͳԴȷᳬCPUӲ - -֮ܶLinuxϵͳϿô಻ͬӦóһĵ¡ʹԶҵʺԼһȻϲӦAudacityҷdzLMMSJokosherơ - -©ʲôôLinuxʹһأԭʲôأԴ֪ - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/good-audio-editing-software-linux.html - -ߣ[Adrien Brochard][a] -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ - -[a]:http://xmodulo.com/author/adrien -[1]:http://audacity.sourceforge.net/ -[2]:https://launchpad.net/jokosher/ -[3]:http://ardour.org/ -[4]:http://kwave.sourceforge.net/ -[5]:http://qtractor.sourceforge.net/qtractor-index.html \ No newline at end of file From 6dfc6c914eaa8e249995cf283d6f398642384165 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 26 Jun 2015 23:53:18 +0800 Subject: [PATCH 1272/2517] PUB:20150128 The top 10 rookie open source projects @sevenot --- ... The top 10 rookie open source projects.md | 154 ++++++++++++++++++ ... The top 10 rookie open source projects.md | 153 ----------------- 2 files changed, 154 insertions(+), 153 deletions(-) create mode 100644 published/20150128 The top 10 rookie open source projects.md delete mode 100644 translated/talk/20150128 The top 10 rookie open source projects.md diff --git a/published/20150128 The top 10 rookie open source projects.md b/published/20150128 The top 10 rookie open source projects.md new file mode 100644 index 0000000000..ea9c04ce4f --- /dev/null +++ b/published/20150128 The top 10 rookie open source projects.md @@ -0,0 +1,154 @@ +2015 年度开源项目新秀榜 +================================================================================ +黑鸭(Black Duck)软件公布了一份名叫“年度开源项目新秀”的报告,介绍了由全球开源协会发起的10个最有趣、最活跃的新项目。 + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_01-100564902-orig.jpeg) + +### 年度开源项目新秀 ### + +每年都有上千新的开源项目问世,但只有少数能够真正的吸引我们的关注。一些项目因为利用了当前比较流行的技术而发展壮大,有一些则真正地开启了一个新的领域。很多开源项目建立的初衷是为了解决一些生产上的问题,还有一些项目则是世界各地志同道合的开发者们共同发起的一个宏伟项目。 + +从2009年起,开源软件管理公司黑鸭便发起了[年度开源项目新秀][1]这一活动,它的评选根据[Open Hub][2]网站(即以前的Ohloh)上的活跃度。今年,我们很荣幸能够报道2015年10大开源项目新秀的得主和2名荣誉奖得主,它们是从上千个开源项目中脱颖而出的。评选采用了加权评分系统,得分标准基于项目的活跃度,交付速度和几个其它因数。 + +开源俨然成为了产业创新的引擎,就拿今年来说,和Docker容器相关的开源项目在全球各地兴起,这也不恰巧反映了企业最感兴趣的技术领域吗?最后,我们接下来介绍的项目,将会让你了解到全球开源项目的开发者们的在思考什么,这很快将会成为一个指引我们发展的领头羊。 + +### 2015年度开源项目新秀: DebOps ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_02-100564903-orig.jpeg) + +[DebOps][3]收集打包了一套[Ansible][4]方案和规则(Ansible是一种自动化运维工具),可以从1个容器扩展到一个完整的数据中心。它的创始人Maciej Delmanowski将DebOps开源来保证项目长久进行,从而更好的通过外部贡献者的帮助发展下去。 + +DebOps始创于波兰的一个不起眼大学校园里,他们运营自己的数据中心,一切工作都采用手工配置。有时系统崩溃而导致几天的宕机,这时Delmanowski意识到一个配置管理系统是很有必要的。以Debian作为基础开始,DebOps是一组配置一整个数据基础设施的Ansible方案。此项目已经在许多不同的工作环境下实现,而创始者们则打算继续支持和改进这个项目。 + +###2015年度开源项目新秀: Code Combat ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_03-100564904-gallery.idge.jpg) + +传统的纸笔学习方法已近不能满足技术学科了。然而游戏却有很多人都爱玩,这也就是为什么[CodeCombat][5]的创始人会去开发一款多人协同编程游戏来教人们如何编码。 + +刚开始CodeCombat是一个创业想法,但其创始人决定取而代之创建一个开源项目。此想法在社区传播开来,很快不少贡献者加入到项目中来。项目发起仅仅两个月后,这款游戏就被接纳到Google’s Summer of Code活动中。这款游戏吸引了大量玩家,并被翻译成45种语言。CodeCombat希望成为那些想要一边学习代码同时获得乐趣的同学的风向标。 + +### 2015年度开源项目新秀: Storj ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_04-100564905-gallery.idge.jpg) + +[Storj][6]是一个点对点的云存储网络,可实现端到端加密,保证用户不用依赖第三方即可传输和共享数据。基于比特币block chain技术和点对点协议,Storj提供安全、私密、加密的云存储。 + +云数据存储的反对者担心成本开销和漏洞攻击。针对这两个担忧,Storj提供了一个私有云存储市场,用户可以通过Storjcoin X(SJCX) 购买交易存储空间。上传到Storj的文件会被粉碎、加密和存储到整个社区。只有文件所有者拥有密钥加密的信息。 + +在2014年举办的Texas Bitcoin Conference Hackathon会议上,去中心化的云存储市场概念首次被提出并证明可行。在第一次赢得黑客马拉松活动后,项目创始人们和领导团队利用开放论坛、Reddit、比特币论坛和社交媒体增长成了一个活跃的社区,如今,它们已成为影响Storj发展方向的一个重要组成部分。 + +### 2015年度开源项目新秀: Neovim ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_05-100564906-orig.jpg) + +自1991年出现以来,Vim已经成为数以百万计软件开发人员所钟爱的文本编辑器。 而[Neovim][6]就是它的下一个版本。 + +在过去的23年里,软件开发生态系统经历了无数增长和创新。Neovim创始人Thiago de Arruda认为Vim缺乏当代元素,跟不上时代的发展。在保留Vim的招牌功能的前提下,Neovim团队同样在寻求改进和发展这个最受欢迎的文本编辑器的技术。早期众筹让Thiago de Arruda可以连续6个月时间投入到此项目。他相信Neovim社区会支持这个项目,激励他继续开发Neovim。 + +### 2015年度开源项目新秀: CockroachDB ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_06-100564907-orig.jpg) + +前谷歌员工开发了一个开源的大型企业数据存储项目[CockroachDB][8],它是一个可扩展的、跨地域复制且支持事务的数据存储的解决方案。 + +为了保证在线的百万兆字节流量业务的质量,Google开发了Spanner系统,这是一个可扩展的,稳定的,支持事务的系统。许多参与开发CockroachDB的团队现在都服务于开源社区。就像真正的蟑螂(cockroach)一样,CockroachDB可以在没有数据头、任意节点失效的情况下正常运行。这个开源项目有很多富有经验的贡献者,创始人们通过社交媒体、Github、网络、会议和聚会结识他们并鼓励他们参与其中。 + +### 2015年度开源项目新秀: Kubernetes ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_07-100564908-orig.jpg) + +在将容器化软件到引入开源社区发展时,[Docker][9]是一匹黑马,它创新了一套技术和工具。去年6月谷歌推出了[Kubernetes][10],这是一款开源的容器管理工具,用来加快开发和简化操作。 + +谷歌在它的内部运营上使用容器技术多年了。在2014年夏天的DockerCon上大会上,谷歌这个互联网巨头开源了Kubernetes,Kubernetes的开发是为了满足迅速增长的Docker生态系统的需要。通过和其它的组织、项目合作,比如Red Hat和CoreOS,Kubernetes项目的管理者们推动它登上了Docker Hub的工具下载榜榜首。Kubernetes的开发团队希望扩大这个项目,发展它的社区,这样的话软件开发者就能花更少的时间在管理基础设施上,而更多的去开发他们自己的APP。 + +### 2015年度开源项目新秀: Open Bazaar ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_08-100564909-orig.jpg) + +OpenBazaar是一个使用比特币与其他人交易的去中心化的市场。OpenBazaar这一概念最早在编程马拉松(hackathon)活动中被提出,它的创始人结合了BitTorent、比特币和传统的金融服务方式,创造了一个不受审查的交易平台。OpenBazaar的开发团队在寻求新的成员,而且不久以后他们将极度扩大Open Bazaar社区。Open Bazaar的核心是透明度,其创始人和贡献者的共同目标是在商务交易中掀起一场革命,让他们向着一个真实的、一个无控制的,去中心化的市场奋进。 + +### 2015年度开源项目新秀: IPFS ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_09-100564910-orig.jpg) + +IPFS 是一个面向全球的、点对点的分布式版本文件系统。它综合了Git,BitTorrent,HTTP的思想,开启了一个新的数据和数据结构传输协议。 + +人们所知的开源,它的本意用简单的方法解决复杂的问题,这样产生许多新颖的想法,但是那些强大的项目仅仅是开源社区的冰山一角。IFPS有一个非常激进的团队,这个概念的提出是大胆的,令人惊讶的,有点甚至高不可攀。看起来,一个点对点的分布式文件系统是在寻求将所有的计算设备连在一起。这个可能的 HTTP 替换品通过多种渠道维护着一个社区,包括Git社区和超过100名贡献者的IRC。这个疯狂的想法将在2015年进行软件内部测试。 + +### 2015年度开源项目新秀: cAdvisor ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_10-100564911-orig.jpg) + +[cAdvisor (Container Advisor)][13] 是一个针对在运行中的容器进行收集,统计,处理和输出信息的工具,它可以给容器的使用者提供资源的使用情况和工作特性。对于每一个容器,cAdvisor记录着资源的隔离参数,资源使用历史,资源使用历史对比框图,网络状态。这些从容器输出的数据跨越主机传递。 + +cAdvisor可以在绝大多数的Linux发行版上运行,并且支持包括Docker在内的多种容器类型。事实上它成为了一种容器的代理,并被集成在了很多系统中。cAdvisor在DockerHub下载量也是位居前茅。cAdvisor的开发团队希望把cAdvisor改进到能够更深入地理解应用性能,并且集成到集群系统。 + +### 2015年度开源项目新秀: Terraform ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_11-100564912-orig.jpg) + +[Terraform][14]提供了一些常见设置来创建一个基础设施,从物理机到虚拟机,以及email服务器、DNS服务器等。这个想法包括从家庭个人机解决方案到公共云平台提供的服务。一旦建立好了以后,Terraform可以让运维人员安全又高效地改变你的基础设施,就如同配置一样。 + +Terraform.io的创始者工作在一个Devops模式的公司,他找到了一个窍门把建立一个完整的数据中心所需的知识结合在一起,可以从添加服务器到支持网络服务的功能齐备的数据中心。基础设施的描述采用高级的配置语法,允许你把数据中心的蓝图按版本管理,并且转换成多种代码。著名开源公司HashiCorp赞助开发这个项目。 + +### 荣誉奖: Docker Fig ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_12-100564913-orig.jpg) + +[Fig][15]为[Docker][16]的使用提供了一个快速的,分离的开发环境。Docker的移植只需要将配置信息放到一个简单的 fig.yml文件里。它会处理所有工作,包括构建、运行,端口转发,分享磁盘和容器链接。 + +Orchard去年发起了Fig,来创造一个使Docker工作起来的系统工具。它的开发像是为Docker设置开发环境,为了确保用户能够为他们的APP准确定义环境,在Docker中会运行数据库和缓存。Fig解决了开发者的一个难题。Docker全面支持这个开源项目,最近[将买下][17]Orchard来扩张这个项目。 + +### 荣誉奖: Drone ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_13-100564916-orig.jpg) + +[Drone][18]是一个基于Docker的持续集成平台,而且它是用Go语言写的。Drone项目不满于现存的设置开发环境的技术和流程。 + +Drone提供了一个简单的自动测试和持续交付的方法:简单选择一个Docker镜像来满足你的需求,连接并提交至GitHub即可。Drone使用Docker容器来提供隔离的测试环境,让每个项目完全自主控制它的环境,没有传统的服务器管理的负担。Drone背后的100位社区贡献者强烈希望把这个项目带到企业和移动应用程序开发中。 + +### 开源新秀 ### + +![](http://images.techhive.com/images/article/2015/01/open_source_rookies_14-100564941-orig.jpg) + +参见: + +- [InfoWorld2015年年度技术奖][21] +- [Bossies: 开源软件最高荣誉][22] + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2875439/open-source-software/the-top-10-rookie-open-source-projects.html + +作者:[Black Duck Software][a] +译者:[sevenot](https://github.com/sevenot) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Black-Duck-Software/ +[1]:https://www.blackducksoftware.com/open-source-rookies +[2]:https://www.openhub.net/ +[3]:https://github.com/debops/debops +[4]:http://www.infoworld.com/article/2612397/data-center/review--ansible-orchestration-is-a-veteran-unix-admin-s-dream.html +[5]:https://codecombat.com/ +[6]:http://storj.io/ +[7]:http://neovim.org/ +[8]:https://github.com/cockroachdb/cockroach +[9]:http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker +[10]:http://kubernetes.io/ +[11]:https://openbazaar.org/ +[12]:http://ipfs.io/ +[13]:https://github.com/google/cadvisor +[14]:https://www.terraform.io/ +[15]:http://www.fig.sh/ +[16]:http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker +[17]:http://www.infoworld.com/article/2608546/application-virtualization/docker-acquires-orchard-in-a-sign-of-rising-ambitions.html +[18]:https://drone.io/ +[19]:http://www.infoworld.com/article/2683845/google-go/164121-Fast-guide-to-Go-programming.html +[20]:https://www.blackducksoftware.com/open-source-rookies +[21]:http://www.infoworld.com/article/2871935/application-development/infoworlds-2015-technology-of-the-year-award-winners.html +[22]:http://www.infoworld.com/article/2688104/open-source-software/article.html +[23]:http://www.infoworld.com/article/2854954/microsoft-windows/15-essential-open-source-tools-for-windows-admins.html + diff --git a/translated/talk/20150128 The top 10 rookie open source projects.md b/translated/talk/20150128 The top 10 rookie open source projects.md deleted file mode 100644 index c642786914..0000000000 --- a/translated/talk/20150128 The top 10 rookie open source projects.md +++ /dev/null @@ -1,153 +0,0 @@ -sevenot translated -排名前十的年度开源项目新秀 -================================================================================ -黑鸭(Black Duck)软件公布了一份名叫“年度开源项目新秀”的报告,介绍了由全球开源协会发起的10个最有趣、最活跃的新项目。 - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_01-100564902-orig.jpeg) - -### 年度开源项目新秀 ### - -每年都有上千新的开源项目问世,但只有少数能够真正的吸引我们的关注。一些项目因为利用了当前比较流行的技术而发展壮大,有一些则真正地开启了一个新的邻域。很多开源项目建立的初衷是为了解决一些生产上的问题,还有一些项目则是世界各地志同道合的开发者们共同发起的一个宏伟项目。 - -从2009年起,开源软件公司黑鸭便发起了[年度开源项目新秀][1]这一活动,它的评选根据[Open Hub][2] 网站(即以前的Ohloh)。今年,我们很荣幸能够报道2015年10大开源项目新秀的得主和2名荣誉奖得主,它们是从上千个开源项目中脱颖而出的。评选采用了加权评分系统,得分标准基于项目的活跃度,交付速度,和几个其它因数。 - -开源俨然成为了产业创新的引擎,就拿今年来说,和Docker容器相关的开源项目在全球各地新起,这也不恰巧反映了企业最感兴趣的技术邻域吗?最后,我们接下来介绍的项目,将会让你了解到全球开源项目的开发者们的在思考什么,这很快将会成为一个指引我们发展的领头羊。 - -### 2015年度开源项目新秀: DebOps ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_02-100564903-orig.jpeg) - -[DebOps][3]收集打包了一套[Ansible][4] (Ansible是一种自动化运维工具)方案和规则,可以从1个容器扩展到一个完整的数据中心。它的创始人Maciej Delmanowski将DebOps开源来保证项目长久进行,从而更好的利用外部贡献者来发展下去 - -DebOps始创于波兰的一个不起眼大学校园里,在自己的数据中心上运行,一切都是手工配置的。有时系统崩溃而导致几天的宕机,这时Delmanowski意识到一个配置管理系统是很有必要的。从Debian的基础做起,DebOps是一组配置一整个数据基础设施Ansible方案。此项目已经在许多不同的工作环境下实现,而创始者们则打算继续支持和开发这个项目。 - -###2015年度开源项目新秀: Code Combat ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_03-100564904-gallery.idge.jpg) - -传统的纸笔学习方法已近不能满足技术学科了。然而游戏都是关于参与者,这也就是为什么[CodeCombat][5] 的创始人会去开发一款多人协同编程游戏来教人们如何编码。 - -刚开始CodeCombat是一个创业想法,但其创始人决定创建一个开源项目将其取代。此想法在社区传播开来,很快不少贡献者加入到项目中来。项目发起仅仅两个月后,这款游戏就被收入Google’s Summer of Code。这款游戏吸引了大量玩家,并被翻译成45种语言。CodeCombat希望成为那些想要一边学习代码同时获得乐趣的同学的风向标。 - -### 2015年度开源项目新秀: Storj ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_04-100564905-gallery.idge.jpg) - -[Storj][6]是一个点对点的云存储网络,可实现端到端加密,保证用户不用依赖第三方即可传输、共享数据。基于比特币block chain技术和点对点协议,Storj提供安全、私密、加密的云存储。 - -云数据存储的反对者担心成本开销和漏洞攻击。为了做到没有死角,Storj是一个私有云存储市场,用户可以通过Storjcoin X(SJCX) 购买交易存储空间。上传到Storj的文件会被粉碎、加密和存储到整个社区。只有文件所有者拥有密钥加密的信息 - -在2014年举办的Texas Bitcoin Conference Hackathon会议上,云存储市场概念首次被提出并证明可行。在第一次赢得黑客马拉松活动后,项目创始人们和领导团队利用开源论坛Reddit、比特币论坛和社交媒体推广此项目。如今,它们已成为Storj决策过程的一个重要组成部分。 - -### 2015年度开源项目新秀: Neovim ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_05-100564906-orig.jpg) - -自1991年提出概念以来,Vim已经成为数以百万计软件开发人员所钟爱的文本编辑器。 [Neovim][6] 是它的下一个版本。 - -  在过去的23年里,软件开发生态系统经历了无数增长和创新。Neovim创始人Thiago de Arruda知道Vim缺少当代元素,跟不上时代的发展。在保留Vim的签名功能的前提下,Neovim团队同样在寻求最受欢迎的文本编辑器改善和发展技术。集资初期,Thiago de Arruda连续6个月时间关注推出此项目。他相信他的团队和支持他激励他继续发展Neovim。 - -### 2015年度开源项目新秀: CockroachDB ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_06-100564907-orig.jpg) - -前谷歌员工开发了一个开源的企业数据存储项目[CockroachDB][8],它是一个可扩展的、跨地域复制且支持事务的数据存储的解决方案。 - -为了保证在线百万兆字节流量业务的质量,Google公开了他们的Spanner系统,这是一个可扩展的,稳定的,支持事务的系统。许多参与开发CockroachDB的团队现在都服务与开源社区。就像真正的蟑螂一样,CockroachDB可以在没有数据头、没有任何节点的情况下正常运行。这个开源项目有很多富有经验的贡献者,创始人们通过社会媒体、Github、网络、会议和聚会结识他们并鼓励他们参与其中。 - -### 2015年度开源项目新秀: Kubernetes ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_07-100564908-orig.jpg) - -在介绍集装箱化的软件对开源社区的发展时,[Docker][9]是一匹黑马,它在技术和工具的设置上做了创新。去年6月谷歌推出了[Kubernetes][10],这是一款开源的容器管理工具,用来加快开发和简化操作。 - -谷歌在它的网络系统上使用容器技术多年了。在2014年夏天的DockerCon上大会上,谷歌这个互联网巨头开源了Kubernetes,Kubernetes的开发是为了满足迅速增长的Docker生态系统的需要。通过和其它的组织、项目合作,比如 Red Hat和CoreOS,Kubernetes的管理者们促使它登上了Docker Hub的工具下载榜榜首。Kubernetes的开发团队希望扩大这个项目,发展它的社区,这样的话软件开发者就能花更少的时间在管理基础设施上,而更多的去开发他们自己的APP。 - -### 2015年度开源项目新秀: Open Bazaar ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_08-100564909-orig.jpg) - -OpenBazaar是一个使用比特币和其他人交易的市场。OpenBazaar这一概念最早在编程马拉松(hackathon)活动中被提出,它的创始人结合了BitTorent,比特币和传统的金融服务方式,创造了一个不受审查的交易平台。OpenBazaar的开发团队在寻求新的成员,而且不久以后他们将无限扩大Open Bazaar的社区。Open Bazaar旨在透明度和同一个目标去在商务交易中掀起一场革命,这会帮助创始人和贡献者向着一个真实的世界奋斗,一个没有控制,分散的市场。 - -### 2015年度开源项目新秀: IPFS ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_09-100564910-orig.jpg) - -IPFS 是一个全球的点对点式的分布式版本文件系统。它综合了Git,BitTorrent,HTTP的思想,开启了一个新的数据和数据结构传输协议。 - -开源被人们所知晓的原因,是它本意用简单的方法解决复杂的问题,这样产生许多新颖的想法,但是着些强大的项目仅仅是开源社区的冰山一角。IFPS有一个积极的团队,这个概念的提出是大胆的,令人惊讶的,有点甚至高不可攀。这样来看,一个点对点的分布是文件系统是在寻找所有连在一起的计算设备。也许HTTP的更换可以靠着通过多种手段继续保持一个社区,包括Git社区和超过100名贡献者的IRC。这个疯狂的想法将在2015年进行软件内部测试。 - -### 2015年度开源项目新秀: cAdvisor ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_10-100564911-orig.jpg) - -[cAdvisor (Container Advisor)][13] 是一个针对在运行中的容器进行收集,合计,处理和输出信息的工具,它可以给容器的使用者提供资源的使用情况和工作特性。对于每一个容器,cAdvisor记录着资源的分离参数,资源使用历史,资源使用历史对比框图,网络状态。这些从容器输出的数据在机器中传递。 - -cAdvisor可以在绝大多数的Linux上运行,并且支持包括Docker在内的多种容器类型。事实上它成为了一种容器的代理,并被集成在了很多系统中。cAdvisor在DockerHub下载量也是位居前茅。cAdvisor的开发团队希望把cAdvisor发展到能够更深入地理解应用并且集成到集群系统。 - -### 2015年度开源项目新秀: Terraform ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_11-100564912-orig.jpg) - -[Terraform][14]提供了一些列的设置来创建一个基础设施,从物理机到虚拟机再到email服务器、DNS服务器。这个概念包括从家庭个人机解决方案到公共云平台提供的服务。一旦建立好了以后,Terraform便进行一系列的操作来改变你的基础设施,安全又高效,就如同配置一样。 - -如果你在Devops模式下的公司里工作,Terraform.io的创始者找到了一个窍门把建立一个完整的数据中心所需的知识结合在一起,从插入服务器到整个网络和功能齐备的数据中心。基础设施的描述采用高级的配置语法,允许你把数据中心的蓝图做成多版本并且可以使用多种代码。著名开源公司HashiCorp赞助开发这个项目。 - -### 荣誉奖: Docker Fig ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_12-100564913-orig.jpg) - -[Fig][15] 为[Docker][16]的使用提供了一个快速的,分离的开发环境。Docker的移植只需要将配置信息放到一个简单的 fig.yml文件里。它会处理所有工作,包括建立、运行,端口转发,分享磁盘和容器链接。 - Fig solved a major pain point for developers. Docker fully supports this open source project and [recently purchased Orchard][17] to expand the reach of Fig. -Orchard去年发起了Fig,来创造一个使Docker工作的系统工具。它的开发像是为Docker设置开发环境,为了确保用户能够为他们的APP准确定义环境,在Docker中会运行数据库和缓存。Fig解决了开发者的一个难题。Docker全面支持这个开源项目,最近将买下Orchard来扩张这个项目。 - -### 荣誉奖: Drone ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_13-100564916-orig.jpg) - -[Drone][18]是一个基于Docker的持续集成平台,而且它是用Go语言写的。Drone项目不满于现存的技术和流程,它旨在开发环境。 - -Drone提供了一个简单的自动测试和持续交付的方法:简单选择一个Docker形象来满足你的需求,连接并提交至GitHub即可。Drone使用Docker容器来提供隔离的测试环境,让每个项目完全自主控制堆栈,没有传统的服务器管理的负担。Drone背后的100位社区贡献者强烈希望把这个项目带到企业和移动应用程序开发中 -### 开源新秀 ### - -![](http://images.techhive.com/images/article/2015/01/open_source_rookies_14-100564941-orig.jpg) - -- [2014年度开源项目新秀][20] -- [InfoWorld2015年年度技术奖][21] -- [Bossies: 开源软件最高荣誉][22] -- [ Windows管理员15个必不可少的开源工具][23] - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2875439/open-source-software/the-top-10-rookie-open-source-projects.html - -作者:[Black Duck Software][a] -译者:[sevenot](https://github.com/sevenot) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Black-Duck-Software/ -[1]:https://www.blackducksoftware.com/open-source-rookies -[2]:https://www.openhub.net/ -[3]:https://github.com/debops/debops -[4]:http://www.infoworld.com/article/2612397/data-center/review--ansible-orchestration-is-a-veteran-unix-admin-s-dream.html -[5]:https://codecombat.com/ -[6]:http://storj.io/ -[7]:http://neovim.org/ -[8]:https://github.com/cockroachdb/cockroach -[9]:http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker -[10]:http://kubernetes.io/ -[11]:https://openbazaar.org/ -[12]:http://ipfs.io/ -[13]:https://github.com/google/cadvisor -[14]:https://www.terraform.io/ -[15]:http://www.fig.sh/ -[16]:http://www.infoworld.com/resources/16373/application-virtualization/the-beginners-guide-to-docker -[17]:http://www.infoworld.com/article/2608546/application-virtualization/docker-acquires-orchard-in-a-sign-of-rising-ambitions.html -[18]:https://drone.io/ -[19]:http://www.infoworld.com/article/2683845/google-go/164121-Fast-guide-to-Go-programming.html -[20]:https://www.blackducksoftware.com/open-source-rookies -[21]:http://www.infoworld.com/article/2871935/application-development/infoworlds-2015-technology-of-the-year-award-winners.html -[22]:http://www.infoworld.com/article/2688104/open-source-software/article.html -[23]:http://www.infoworld.com/article/2854954/microsoft-windows/15-essential-open-source-tools-for-windows-admins.html From 7d814a9c1b22b12f7280dec61dc726d13f647a5b Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 27 Jun 2015 15:18:15 +0800 Subject: [PATCH 1273/2517] PUB:20150617 The Art of Command Line @GOLinux --- published/20150617 The Art of Command Line.md | 433 ++++++++++++++++++ .../tech/20150617 The Art of Command Line.md | 431 ----------------- 2 files changed, 433 insertions(+), 431 deletions(-) create mode 100644 published/20150617 The Art of Command Line.md delete mode 100644 translated/tech/20150617 The Art of Command Line.md diff --git a/published/20150617 The Art of Command Line.md b/published/20150617 The Art of Command Line.md new file mode 100644 index 0000000000..8a4d9a0d98 --- /dev/null +++ b/published/20150617 The Art of Command Line.md @@ -0,0 +1,433 @@ +命令行艺术 +================================================================================ + +![curl -s 'https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md' | egrep -o '`\w+`' | tr -d '`' | cowsay -W50](https://github.com/jlevy/the-art-of-command-line/raw/master/cowsay.png) + + +流畅地使用命令行是一个常被忽略的技能,或被认为是神秘的奥义。但是,它会以明显而微妙的方式改善你作为工程师的灵活度和生产力。这是我在 Linux 上工作时发现的有用的命令行使用小窍门和笔记的精粹。有些小窍门是很基础的,而有些是相当地特别、复杂、或者晦涩难懂。这篇文章不长,但是如果你可以使用并记得这里的所有内容,那么你就懂得很多了。 + +其中大部分[最初](http://www.quora.com/What-are-some-lesser-known-but-useful-Unix-commands)[出现](http://www.quora.com/What-are-the-most-useful-Swiss-army-knife-one-liners-on-Unix)在[Quora](http://www.quora.com/What-are-some-time-saving-tips-that-every-Linux-user-should-know)上,但是考虑到兴趣所在,似乎更应该放到 Github 上,这里的人比我更能提出改进建议。如果你看到一个错误,或者更好的某种东西,请提交问题或 PR!(当然,提交前请看看必读小节和已有的 PR/Issue。) + +## 必读 + +范围: + +- 本文是针对初学者和专业人员的,选题目标是覆盖面广(全都很重要)、有针对性(大多数情况下都给出具体实例)而简洁(避免不必要内容以及你能在其它地方轻松找到的离题的内容)。每个小窍门在某种情形下都很必需的,或者能比替代品大大节省时间。 +- 这是为 Linux 写的。绝大部分条目都可以同样应用到 MacOS(或者甚至 Cygwin)。 +- 主要针对交互式 Bash,尽管大多数小窍门也可以应用到其它 shell,以及常规 Bash 脚本。 +- 包括了“标准的”UNIX 命令以及那些需要安装的软件包(它们很重要,值得安装)。 + +注意: + +- 为了能在一篇文章内展示尽量多的东西,一些具体的信息会被放到引用页里。你可以使用 Google 来获得进一步的内容。(如果需要的话,)你可以使用 `apt-get`/`yum`/`dnf`/`pacman`/`pip`/`brew` 来安装这些新的程序。 +- 使用 [Explainshell][1] 来获取命令、参数、管道等内容的解释。 + +## 基础 + +- 学习基本 Bash 技能。实际上,键入`man bash`,然后至少浏览一遍所有内容;它很容易理解,没那么长。其它 shell 也不错,但是 Bash 很强大,而且到处都可以找到(如果在你自己的笔记本上*只*学习 zsh、fish 之类,会在很多情形下受到限制,比如使用现存的服务器时)。 + +- 至少学好一种基于文本的编辑器。理想的一个是 Vim(`vi`),因为在终端中编辑时随时都能找到它(即使大多数时候你在使用 Emacs、一个大型的 IDE、或一个现代的时髦编辑器)。 + +- 学习怎样使用 `man` 来阅读文档(好奇的话,用 `man man` 来列出分区号,比如 1 是常规命令,5 是文件描述,8 用于管理员)。用 `apropos` 找到帮助页。了解哪些命令不是可执行程序,而是 Bash 内置的,你可以用 `help` 和 `help -d` 得到帮助。 + +- 学习使用 `>` 和 `<` 来进行输出和输入重定向,以及使用 `|` 来管道重定向,学习关于 stdout 和 stderr 的东西。 + +- 学习 `*`(也许还有 `?` 和 `{`...`}` )文件通配扩展和应用,以及双引号 `"` 和单引号 `'` 之间的区别。(更多内容请参看下面关于变量扩展部分)。 + +- 熟悉 Bash 作业管理:`&`, **ctrl-z**, **ctrl-c**, `jobs`, `fg`, `bg`, `kill` 等等。 + +- 掌握`ssh`,以及通过 `ssh-agent`,`ssh-add` 等进行无密码验证的基础技能。 + +- 基本的文件管理:`ls` 和 `ls -l`(特别是,知道`ls -l`各个列的意义),`less`, `head`, `tail` 和 `tail -f`(或者更好的`less +F`),`ln` 和 `ln -s`(知道硬链接和软链接的区别,以及硬链接相对于软链接的优势),`chown`,`chmod`,`du`(用于查看磁盘使用率的快速摘要:`du -sk *`)。文件系统管理:`df`, `mount`,`fdisk`,`mkfs`,`lsblk`。 + +- 基本的网络管理: `ip` 或 `ifconfig`,`dig`。 + +- 熟知正则表达式,以及各种使用`grep`/`egrep`的选项。`-i`,`-o`,`-A` 和 `-B` 选项值得掌握。 + +- 学会使用 `apt-get`,`yum` ,`dnf` 或 `pacman`(这取决于你的发行版)来查找并安装软件包。确保你可以用 `pip` 来安装基于 Python 的命令行工具(下面的一些东西可以很容易地通过 `pip` 安装)。 + + +## 日常使用 + +- 在Bash中,使用 **tab** 补完参数,使用 **ctrl-r** 来搜索命令历史。 + +- 在Bash中,使用 **ctrl-w** 来删除最后的单词,使用 **ctrl-u** 来删除整行,返回行首。使用 **alt-b** 和 **alt-f** 来逐词移动,使用 **ctrl-k** 来清除到行尾的内容,以及使用 **ctrl-l** 清屏。参见 `man readline` 来查看 Bash 中所有默认的键盘绑定,有很多。例如,**alt-.** 可以循环显示先前的参数,而**alt-** 扩展通配。(LCTT 译注:关于 Bash 下的快捷键,可以参阅: https://linux.cn/article-5660-1.html ) + +- 另外,如果你喜欢 vi 风格的键盘绑定,可以使用 `set -o vi`。 + +- 要查看最近用过的命令,请使用 `history` 。 有许多缩写形式,比如 `!$`(上次的参数)和`!!`(上次的命令),虽然使用 `ctrl-r` 和 `alt-.` 更容易些。(LCTT 译注:关于历史扩展功能,可以参阅: https://linux.cn/article-5658-1.html ) + +- 返回先前的工作目录: `cd -` + +- 如果你命令输入到一半,但是改变主意了,可以敲 **alt-#** 来添加一个 `#` 到开头,然后将该命令作为注释输入(或者使用快捷键 **ctrl-a**, **#**,**enter** 输入)。然后,你可以在后面通过命令历史来回到该命令。 + +- 使用 `xargs`(或 `parallel`),它很强大。注意,你可以控制每行(`-L`)执行多少个项目,以及并行执行(`-P`)。如果你不确定它是否会做正确的事情,可以首先使用 `xargs echo`。同时,使用 `-I{}` 也很方便。样例: +```bash + find . -name '*.py' | xargs grep some_function + cat hosts | xargs -I{} ssh root@{} hostname +``` + +- `pstree -p` 对于显示进程树很有帮助。 + +- 使用 `pgrep` 和 `pkill` 来按名称查找进程或给指定名称的进程发送信号(`-f` 很有帮助)。 + +- 掌握各种可以发送给进程的信号。例如,要挂起进程,可以使用 `kill -STOP [pid]`。完整的列表可以查阅 `man 7 signal`。 + +- 如果你想要一个后台进程一直保持运行,使用 `nohup` 或 `disown`。 + +- 通过 `netstat -lntp` 或 `ss -plat` 检查哪些进程在监听(用于 TCP,对 UDP 使用 `-u` 替代 `-t`)。 + +- `lsof`来查看打开的套接字和文件。 + +- 在 Bash 脚本中,使用 `set -x` 调试脚本输出。尽可能使用严格模式。使用 `set -e` 在遇到错误时退出。也可以使用 `set -o pipefail`,对错误进行严格处理(虽然该话题有点微妙)。对于更复杂的脚本,也可以使用 `trap`。 + +- 在 Bash 脚本中,子 shell(写在括号中的)是组合命令的便利的方式。一个常见的例子是临时移动到一个不同的工作目录,如: +```bash + # 在当前目录做些事 + (cd /some/other/dir; other-command) + # 继续回到原目录 +``` + +- 注意,在 Bash 中有大量的各种各样的变量扩展。检查一个变量是否存在:`${name:?error message}`。例如,如果一个Bash脚本要求一个单一参数,只需写 `input_file=${1:?usage: $0 input_file}`。算术扩展:`i=$(( (i + 1) % 5 ))`。序列: `{1..10}`。修剪字符串:`${var%suffix}` 和 `${var#prefix}`。例如,if `var=foo.pdf` ,那么 `echo ${var%.pdf}.txt` 会输出 `foo.txt`。 + +- 命令的输出可以通过 `<(some command)` 作为一个文件来处理。例如,将本地的 `/etc/hosts` 和远程的比较: +```sh + diff /etc/hosts <(ssh somehost cat /etc/hosts) +``` + +- 了解 Bash 中的“嵌入文档”,就像在 `cat <logfile 2>&1` 同时重定向标准输出和标准错误。通常,要确保某个命令不再为标准输入打开文件句柄,而是将它捆绑到你所在的终端,添加 ` foo: + rename 's/\.bak$//' *.bak + # 文件和目录的全名 foo -> bar: + repren --full --preserve-case --from foo --to bar . +``` + +- 使用 `shuf` 来从某个文件中打乱或随机选择行。 + +- 了解 `sort` 的选项。知道这些键是怎么工作的(`-t`和`-k`)。特别是,注意你需要写`-k1,1`来只通过第一个字段排序;`-k1`意味着根据整行排序。 + +- 稳定排序(`sort -s`)会很有用。例如,要首先按字段2排序,然后再按字段1排序,你可以使用 `sort -k1,1 | sort -s -k2,2` + +- 如果你曾经需要在 Bash 命令行中写一个水平制表符(如,用于 -t 参数的排序),按**ctrl-v** **[Tab]**,或者写`$'\t'`(后面的更好,因为你可以复制/粘贴)。 + +- 对源代码进行补丁的标准工具是 `diff` 和 `patch`。 用 `diffstat` 来统计 diff 情况。注意 `diff -r` 可以用于整个目录,所以可以用 `diff -r tree1 tree2 | diffstat` 来统计(两个目录的)差异。 + +- 对于二进制文件,使用 `hd` 进行简单十六进制转储,以及 `bvi` 用于二进制编辑。 + +- 还是用于二进制文件,`strings`(加上 `grep` 等)可以让你找出一点文本。 + +- 对于二进制文件的差异(delta 压缩),可以使用 `xdelta3`。 + +- 要转换文本编码,试试 `iconv` 吧,或者对于更高级的用途使用 `uconv`;它支持一些高级的 Unicode 的东西。例如,这个命令可以转换为小写并移除所有重音符号(通过扩展和丢弃): +```sh + uconv -f utf-8 -t utf-8 -x '::Any-Lower; ::Any-NFD; [:Nonspacing Mark:] >; ::Any-NFC; ' < input.txt > output.txt +``` + +- 要将文件分割成几个部分,来看看 `split`(按大小分割)和 `csplit`(按格式分割)吧。 + +- 使用 `zless`,`zmore`,`zcat` 和 `zgrep` 来操作压缩文件。 + +## 系统调试 + +- 对于 Web 调试,`curl` 和 `curl -I` 很方便灵活,或者也可以使用它们的同行 `wget`,或者更现代的 [`httpie`](https://github.com/jakubroztocil/httpie)。 + +- 要了解磁盘、CPU、网络的状态,使用 `iostat`,`netstat`,`top`(或更好的 `htop`)和(特别是)`dstat`。它们对于快速获知系统中发生的状况很好用。 + +- 对于更深层次的系统总览,可以使用 [`glances`](https://github.com/nicolargo/glances)。它会在一个终端窗口中为你呈现几个系统层次的统计数据,对于快速检查各个子系统很有帮助。 + +- 要了解内存状态,可以运行 `free` 和 `vmstat`,看懂它们的输出结果吧。特别是,要知道“cached”值是Linux内核为文件缓存所占有的内存,因此,要有效地统计“free”值。 + +- Java 系统调试是一件截然不同的事,但是对于 Oracle 系统以及其它一些 JVM 而言,不过是一个简单的小把戏,你可以运行 `kill -3 `,然后一个完整的堆栈追踪和内存堆的摘要(包括常规的垃圾收集细节,这很有用)将被转储到stderr/logs。 + +- 使用 `mtr` 作路由追踪更好,可以识别网络问题。 + +- 对于查看磁盘满载的原因,`ncdu` 会比常规命令如 `du -sh *` 更节省时间。 + +- 要查找占用带宽的套接字和进程,试试 `iftop` 或 `nethogs` 吧。 + +- (Apache附带的)`ab`工具对于临时应急检查网络服务器性能很有帮助。对于更复杂的负载测试,可以试试 `siege`。 + +- 对于更仔细的网络调试,可以用 `wireshark`,`tshark` 或 `ngrep`。 + +- 掌握 `strace` 和 `ltrace`。如果某个程序失败、挂起或崩溃,而你又不知道原因,或者如果你想要获得性能的大概信息,这些工具会很有帮助。注意,分析选项(`-c`)和使用 `-p` 关联运行进程。 + +- 掌握 `ldd` 来查看共享库等。 + +- 知道如何使用 `gdb` 来连接到一个运行着的进程并获取其堆栈追踪信息。 + +- 使用 `/proc`。当调试当前的问题时,它有时候出奇地有帮助。样例:`/proc/cpuinfo`,`/proc/xxx/cwd`,`/proc/xxx/exe`,`/proc/xxx/fd/`,`/proc/xxx/smaps`。 + +- 当调试过去某个东西为何出错时,`sar` 会非常有帮助。它显示了 CPU、内存、网络等的历史统计数据。 + +- 对于更深层的系统和性能分析,看看 `stap` ([SystemTap](https://sourceware.org/systemtap/wiki)),[`perf`](http://en.wikipedia.org/wiki/Perf_(Linux)) 和 [`sysdig`](https://github.com/draios/sysdig) 吧。 + +- 确认是正在使用的 Linux 发行版版本(支持大多数发行版):`lsb_release -a`。 + +- 每当某个东西的行为异常时(可能是硬件或者驱动器问题),使用`dmesg`。 + +## 单行程序 + +这是将命令连成一行的一些样例: + +- 有时候通过 `sort`/`uniq` 对文本文件做交集、并集和差集运算时,这个例子会相当有帮助。假定 `a` 和 `b` 是已经进行了唯一性处理的文本文件。这会很快,而且可以处理任意大小的文件,总计可达数千兆字节。(Sort不受内存限制,不过如果 `/tmp` 放在一个很小的根分区的话,你可能需要使用 `-T` 选项。)也可参见上面关于`LC_ALL`的注解和 `-u` 选项(参见下面例子更清晰)。 + + ```bash + cat a b | sort | uniq > c # c 是 a 和 b 的并集 + cat a b | sort | uniq -d > c # c 是 a 和 b 的交集 + cat a b b | sort | uniq -u > c # c 是 a 减去 b 的差集 +``` +- 使用 `grep . *` 来可视化查看一个目录中的所有文件的所有内容,例如,对于放满配置文件的目录: `/sys`, `/proc`, `/etc`。 + +- 对某个文本文件的第三列中所有数据进行求和(该例子可能比同等功能的Python要快3倍,而且代码也少于其3倍): +```sh + awk '{ x += $3 } END { print x }' myfile +``` + +- 如果想要查看某个文件树的大小/日期,该例子就像一个递归`ls -l`,但是比`ls -lR`要更容易读懂: +```sh + find . -type f -ls +``` + +- 只要可以,请使用 `xargs` 或 `parallel`。注意,你可以控制每行(`-L`)执行多少个项目,以及并行执行(`-P`)。如果你不确定它是否会做正确的事情,可以首先使用 `xargs echo`。同时,使用 `-I{}` 也很方便。样例: +```sh + find . -name '*.py' | xargs grep some_function + cat hosts | xargs -I{} ssh root@{} hostname +``` + +- 比如说,你有一个文本文件,如 Web 服务器的日志,在某些行中出现了某个特定的值,如 URL 中出现的 `acct_id` 参数。如果你想要统计有多少个 `acct_id` 的请求: +```sh + cat access.log | egrep -o 'acct_id=[0-9]+' | cut -d= -f2 | sort | uniq -c | sort -rn +``` + +- 运行该函数来获得来自本文的随机提示(解析Markdown并从中提取某个项目): +```sh + function taocl() { + curl -s https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md | + pandoc -f markdown -t html | + xmlstarlet fo --html --dropdtd | + xmlstarlet sel -t -v "(html/body/ul/li[count(p)>0])[$RANDOM mod last()+1]" | + xmlstarlet unesc | fmt -80 + } +``` + + +## 晦涩难懂,但却有用 + +- `expr`:实施算术或布林操作,或者求正则表达式的值 + +- `m4`:简单的宏处理器 + +- `yes`:大量打印一个字符串 + +- `cal`:漂亮的日历 + +- `env`:(以特定的环境变量设置)运行一个命令(脚本中很有用) + +- `look`:查找以某个字符串开头的英文单词(或文件中的行) + +- `cut ` 和 `paste` 以及 `join`:数据处理 + +- `fmt`:格式化文本段落 + +- `pr`:格式化文本为页/列 + +- `fold`:文本折行 + +- `column`:格式化文本为列或表 + +- `expand` 和 `unexpand`:在制表符和空格间转换 + +- `nl`:添加行号 + +- `seq`:打印数字 + +- `bc`:计算器 + +- `factor`:分解质因子 + +- `gpg`:加密并为文件签名 + +- `toe`:terminfo 条目表 + +- `nc`:网络调试和数据传输 + +- `socat`:套接字中继和 tcp 端口转发(类似 `netcat`) + +- `slurm`:网络流量可视化 + +- `dd`:在文件或设备间移动数据 + +- `file`:识别文件类型 + +- `tree`:以树形显示目录及子目录;类似 `ls`,但是是递归的。 + +- `stat`:文件信息 + +- `tac`:逆序打印文件 + +- `shuf`:从文件中随机选择行 + +- `comm`:逐行对比分类排序的文件 + +- `hd`和`bvi`:转储或编辑二进制文件 + +- `strings`:从二进制文件提取文本 + +- `tr`:字符转译或处理 + +- `iconv `或`uconv`:文本编码转换 + +- `split `和`csplit`:分割文件 + +- `units`:单位转换和计算;将每双周(fortnigh)一浪(浪,furlong,长度单位,约201米)转换为每瞬(blink)一缇(缇,twip,一种和屏幕无关的长度单位)(参见: /usr/share/units/definitions.units)(LCTT 译注:这都是神马单位啊!) + +- `7z`:高比率文件压缩 + +- `ldd`:动态库信息 + +- `nm`:目标文件的符号 + +- `ab`:Web 服务器基准测试 + +- `strace`:系统调用调试 + +- `mtr`:用于网络调试的更好的路由追踪软件 + +- `cssh`:可视化并发 shell + +- `rsync`:通过 SSH 同步文件和文件夹 + +- `wireshark` 和 `tshark`:抓包和网络调试 + +- `ngrep`:从网络层摘取信息 + +- `host` 和 `dig`:DNS查询 + +- `lsof`:处理文件描述符和套接字信息 + +- `dstat`:有用的系统统计数据 + +- [`glances`](https://github.com/nicolargo/glances):高级,多个子系统概览 + +- `iostat`:CPU和磁盘使用率统计 + +- `htop`:top的改进版 + +- `last`:登录历史 + +- `w`:谁登录进来了 + +- `id`:用户/组身份信息 + +- `sar`:历史系统统计数据 + +- `iftop`或`nethogs`:按套接口或进程的网络使用率 + +- `ss`:套接口统计数据 + +- `dmesg`:启动和系统错误信息 + +- `hdparm`:SATA/ATA 磁盘操作/改善性能 + +- `lsb_release`:Linux 发行版信息 + +- `lsblk`:列出块设备,以树形展示你的磁盘和分区 + +- `lshw`:硬件信息 + +- `fortune`,`ddate` 和 `sl`:嗯,好吧,它取决于你是否认为蒸汽机车和 Zippy 引用“有用” + + +## 更多资源 + +- [超棒的shell](https://github.com/alebcay/awesome-shell): 一个shell工具和资源一览表。 +- [严格模式](http://redsymbol.net/articles/unofficial-bash-strict-mode/) 用于写出更佳的shell脚本。 + + +## 免责声明 + +除了非常小的任务外,其它都写出了代码供大家阅读。伴随力量而来的是责任。事实是,你*能*在Bash中做的,并不意味着是你所应该做的!;) + +-------------------------------------------------------------------------------- + +via: https://github.com/jlevy/the-art-of-command-line + +作者:[jlevy][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://github.com/jlevy +[1]:http://explainshell.com/ + diff --git a/translated/tech/20150617 The Art of Command Line.md b/translated/tech/20150617 The Art of Command Line.md deleted file mode 100644 index 87e8e7458e..0000000000 --- a/translated/tech/20150617 The Art of Command Line.md +++ /dev/null @@ -1,431 +0,0 @@ -命令行艺术 -================================================================================ -- [基础](#basics) -- [日常使用](#everyday-use) -- [处理文件和数据](#processing-files-and-data) -- [系统调试](#system-debugging) -- [单行程序](#one-liners) -- [晦涩难懂,但却有用](#obscure-but-useful) -- [更多资源](#more-resources) -- [免责声明](#disclaimer) - - -![curl -s 'https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md' | egrep -o '`\w+`' | tr -d '`' | cowsay -W50](https://github.com/jlevy/the-art-of-command-line/blob/master/cowsay.png) - -流畅地使用命令行是一个常被忽略的技能,或被认为是神秘的奥义。但是,它会以明显而微妙的方式改善你作为工程师的灵活度和生产力。这是我在Linux上工作时发现的有用的命令行使用小窍门和笔记的精粹。有些小窍门是很基础的,而有些是相当地特别、相当地复杂、或者相当地晦涩难懂。这一页不长,但是如果你可以使用并记得这里的所有项目,那么你知道不少了。 - -其中大部分[最初](http://www.quora.com/What-are-some-lesser-known-but-useful-Unix-commands)[出现](http://www.quora.com/What-are-the-most-useful-Swiss-army-knife-one-liners-on-Unix)在[Quora](http://www.quora.com/What-are-some-time-saving-tips-that-every-Linux-user-should-know)上,但是考虑到利益,似乎更值得使用Github,这上面的人比我更能提出改进建议。如果你看到一个错误,或者更好的某种东西,请提交问题或PR! - -范围: - -- 目标宽广而简洁。每个小窍门在某种情形下都很基础,或者比替代品大大节省时间。 -- 这是为Linux写的。大多数,但并非全部项目可以同样应用到MacOS(或者甚至Cygwin)。 -- 焦点集中在交互的Bash上,尽管大多数小窍门也可以应用到其它shell,以及常规Bash脚本。 -- 意在作最少说明,要想期待更多,你可以使用`man`、使用`apt-get`/`yum`/`dnf`来安装,还可以使用Google来获得更多背景知识。 - - -## 基础 - -- 学习基本Bash技能。实际上,键入`man bash`,然后至少浏览一遍所有东西;它很容易理解,没那么长。其它shell会很好,但是Bash很强大,而且总是可用(*只*学习zsh、fish之类,而在你自己的笔记本上测试时,会在很多情形下受到限制,比如使用现存的服务器)。 - -- 至少学好一种基于文本的编辑器。理想的一个是Vim(`vi`),因为在终端中用于随机编辑时它没有竞争者(即使大多数时候你使用Emacs,一个大型的IDE,或一个现代的时髦编辑器)。 - -- 学习使用`>`和`<`来进行输出和输入重定向,以及使用`|`来管道重定向,学习关于stdout和stderr的东西。 - -- 学习`*`(也许还有`?`和`{`...`}`)文件通配扩展和应用,以及双引号`"`和单引号`'`之间的区别。(更多内容请参看下面关于变量扩展部分)。 - -- 熟悉Bash作业管理:`&`, **ctrl-z**, **ctrl-c**, `jobs`, `fg`, `bg`, `kill`等等。 - -- 掌握`ssh`,以及通过`ssh-agent`,`ssh-add`等进行无密码验证的基础技能。 - -- 基本的文件管理:`ls`和`ls -l`(特别是,知道`ls -l`各个栏目的意义),`less`, `head`, `tail` 和`tail -f`(或者更好的`less +F`),`ln`和`ln -s`(知道硬链接和软链接的区别,以及硬链接相对于软链接的优势),`chown`,`chmod`,`du`(用于查看磁盘使用率的快速摘要:`du -sk *`),`df`, `mount`。 - -- 基本的网络管理: `ip`或`ifconfig`,`dig`。 - -- 熟知正则表达式,以及各种标识来使用`grep`/`egrep`。`-i`,`-o`,`-A`和`-B`选项值得掌握。 - -- 学会使用`apt-get`,`yum`或`dnf`(这取决于你的发行版)来查找并安装软件包。确保你可以用`pip`来安装基于Python的命令行工具(下面的一些东西可以很容易地通过`pip`安装)。 - - -## 日常使用 - -- 在Bash中,使用**ctrl-r**来搜索命令历史。 - -- 在Bash中,使用 **ctrl-w** 来删除最后的单词,使用 **ctrl-u** 来删除整行。使用 **alt-b** 和 **alt-f** 来逐词移动,以及使用**ctrl-k**来杀死到行尾。请使用 `man readline` 来查看Bash中所有默认的键绑定,有很多。例如,**alt-.** 可以循环显示先前的参数,而**alt-** 扩展通配。 - -- 返回先前的工作目录: `cd -` - -- 如果你命令输入到一半,但是改变主意了,可以敲 **alt-#** 来添加一个 `#` 到开头,然后将该命令作为注释输入(或者使用 **ctrl-a**, **#**,**enter**)。然后,你可以在后面通过命令历史来返回到该命令。 - -- 使用`xargs`(或`parallel`),它很强大。注意,你可以控制每行(`-L`)执行多少个项目,而言可以使用平行结构(`-P`)。如果你不确定它是否会做正确的事情,可以首先使用`xargs echo`。同时,使用`-I{}`也很方便。样例: -```bash - find . -name '*.py' | xargs grep some_function - cat hosts | xargs -I{} ssh root@{} hostname -``` - -- `pstree -p`对于现实进程树很有帮助。 - -- 使用`pgrep`和`pkill`来按名称查找或用信号通知进程(`-f`很有帮助)。 - -- 掌握各种可以发送给进程的信号。例如,要挂起进程,可以使用`kill -STOP [pid]`。完整的列表可以查阅see `man 7 signal`。 - -- 如果你想要一个后台进程一直保持运行,使用`nohup`或`disown`。 - -- 通过`netstat -lntp`检查什么进程在监听。 - -- `lsof`来查看打开的套接口和文件。 - -- 在Bash脚本中,使用`set -x`调试脚本输出。每当可能时,使用严格模式。使用`set -e`在遇到错误时退出。也可以使用`set -o pipefail`,对错误严格(虽然该话题有点敏感)。对于更复杂的脚本,也可以使用`trap`。 - -- 在Bash脚本中,子shell(写在括号中的)是集合命令的便利的方式。一个常见的例子是临时移动到一个不同的工作目录,如: -```bash - # do something in current dir - (cd /some/other/dir; other-command) - # continue in original dir -``` - -- 注意,在Bash中有大量各种各样的变量扩展。检查一个变量是否存在:`${name:?error message}`。例如,如果一个Bash脚本要求一个单一参数,只需写`input_file=${1:?usage: $0 input_file}`。算术扩展:`i=$(( (i + 1) % 5 ))`。序列:`{1..10}`。修剪字符串:`${var%suffix}`和`${var#prefix}`。例如,if `var=foo.pdf`, then `echo ${var%.pdf}.txt` prints `foo.txt`。 - -- 命令的输出可以通过`<(some command)`作为一个文件来处理。例如,将本地的`/etc/hosts`和远程的比较: -```sh - diff /etc/hosts <(ssh somehost cat /etc/hosts) -``` - -- 知道Bash中的“嵌入文档”,就像在`cat <logfile 2>&1`同时重定向标准输出和标准错误。通常,要确保某个命令不会再标准输入中遗留有打开的文件句柄,将它捆绑到你所在的终端,添加` foo: - rename 's/\.bak$//' *.bak - # Full rename of filenames, directories, and contents foo -> bar: - repren --full --preserve-case --from foo --to bar . -``` - -- 使用`shuf`来从某个文件中随机选择随机的行。 - -- 知道`sort`的选项。知道这些键是怎么工作的(`-t`和`-k`)。特别是,注意你需要写`-k1,1`来只通过第一个字段排序;`-k1`意味着根据整行排序。 - -- 稳定排序(`sort -s`)会很有用。例如,要首先按字段2排序,然后再按字段1排序,你可以使用`sort -k1,1 | sort -s -k2,2` - -- 如果你曾经需要在Bash命令行中写一个标签文字(如,用于-t参数的排序),按**ctrl-v** **[Tab]**,或者写`$'\t'`(后面的更好,因为你可以复制/粘贴)。 - -- 对于二进制文件,使用`hd`进行简单十六进制转储,以及`bvi`用于二进制编辑。 - -- 还是用于二进制文件,`strings`(加上`grep`等)可以让你找出文本的二进制数。 - -- 要转换文本编码,试试`iconv`吧,或者对于更高级的使用`uconv`;它支持一些高级的统一字符标准的东西。例如,这个命令可以将所有重音符号转成小写并(通过扩展和丢弃)移除: -```sh - uconv -f utf-8 -t utf-8 -x '::Any-Lower; ::Any-NFD; [:Nonspacing Mark:] >; ::Any-NFC; ' < input.txt > output.txt -``` - -- 要将文件分割成各个部分,来看看`split`(按大小分割)和`csplit`(按格式分割)吧。 - -- 使用`zless`,`zmore`,`zcat`和`zgrep`来操作压缩文件。 - - -## 系统调试 - -- 对于网络调试,`curl`和`curl -I`很方便灵活,或者业可以使用它们的同行`wget`,或者更现代的[`httpie`](https://github.com/jakubroztocil/httpie)。 - -- 要知道disk/cpu/network的状态,使用`iostat`,`netstat`,`top`(或更好的`htop`)和(特别是)`dstat`。它们对于快速获知系统中发生的状况很好用。 - -- 对于更深层次的系统总览,可以使用[`glances`](https://github.com/nicolargo/glances)。它会在一个终端窗口中为你呈现几个系统层次的统计数据,对于快速检查各个子系统很有帮助。 - -- 要知道内存状态,可以运行`free`和`vmstat`,看懂它们的输出结果吧。特别是,要知道“cached”值是Linux内核作为文件缓存所占有的内存,因此,要有效地统计“free”值。 - -- 系统调试是一件截然不同的事,但是对于Oracle系统以及其它一些JVM而言,不过是一个简单的小把戏,你可以运行`kill -3 `,然后一个完整的堆栈追踪和累积的摘要(包括分代垃圾收集细节,这里头信息量很大)将被转储到stderr/logs.Java。 - -- 使用`mtr`作为更好的路由追踪,来识别网络问题。 - -- 对于查看磁盘满载的原因,`ncdu`会比常规命令如`du -sh *`更节省时间。 - -- 要查找占用带宽的套接口和进程,试试`iftop`或`nethogs`吧。 - -- (Apache附带的)`ab`工具对于临时应急检查网络服务器性能很有帮助。对于更复杂的负载测试,可以试试`siege`。 - -- 对于更重型的网络调试,可以用`wireshark`,`tshark`或`ngrep`。 - -- 掌握`strace`和`ltrace`。如果某个程序失败、挂起或崩溃,而你又不知道原因,或者如果你想要获得性能的大概信息,这些工具会很有帮助。注意,分析选项(`-c`)和关联运行进程的能力(`-p`)。 - -- 掌握`ldd`来检查共享库等。 - -- 知道如何使用`gdb`来连接到一个运行着的进程并获取其堆栈追踪信息。 - -- 使用`/proc`。当调试当前注目问题时,它有时候出奇地有帮助。样例:`/proc/cpuinfo`,`/proc/xxx/cwd`,`/proc/xxx/exe`,`/proc/xxx/fd/`,`/proc/xxx/smaps`。 - -- 当调试过去某个东西出错时,`sar`会非常有帮助。它显示了CPU、内存、网络等的历史统计数据。 - -- 对于更深层的系统和性能分析,看看`stap` ([SystemTap](https://sourceware.org/systemtap/wiki)),[`perf`](http://en.wikipedia.org/wiki/Perf_(Linux))和[`sysdig`](https://github.com/draios/sysdig)吧。 - -- 确认是正在使用的Linux发行版版本(大多数发行版可用):`lsb_release -a`。 - -- 每当某个东西的行为异常时(可能是硬件或者驱动器问题),使用`dmesg`。 - - -## 单行程序 - -将命令拼凑在一起的一些样例: - -- 有时候通过`sort`/`uniq`来进行交互设置、合并,以及比较文本文件的差异时,这个例子会相当有帮助。假定`a`和`b`是已经进行唯一性处理的文本文件。这会很快,而且可以处理任意大小的文件,总计可达数千兆字节。(Sort不受内存限制,然后你可能需要使用`-T`选项来检查`/tmp`是否挂载一个容量小的root分区上。)也可参见上面关于`LC_ALL`的注解。 -```sh - cat a b | sort | uniq > c # c is a union b - cat a b | sort | uniq -d > c # c is a intersect b - cat a b b | sort | uniq -u > c # c is set difference a - b -``` - -- 对某个文本文件的第三列中所有数据进行求和(该例子可能比同等功能的Python要快3倍,而且代码也少于其3倍): -```sh - awk '{ x += $3 } END { print x }' myfile -``` - -- 如果想要查看某个文件树的大小/日期,该例子就像一个递归`ls -l`,但是比`ls -lR`要更容易读懂: -```sh - find . -type f -ls -``` - -- 只要可以,请使用Use `xargs`或`parallel`。注意,你可以控制每行(`-L`)执行多少个项目,也可同时控制并行计算(`-P`)。如果你不确定它是否会做正确的事,可以在前面加上xargs echo。同时,`-I{}`很灵便。样例: -```sh - find . -name '*.py' | xargs grep some_function - cat hosts | xargs -I{} ssh root@{} hostname -``` - -- 比如说,你有一个文本文件,像网络服务器的日志,在某些行中出现了某个特定的值,如URL中出现的`acct_id`参数。如果你想要一个针对每个`acct_id`的请求的计数器: -```sh - cat access.log | egrep -o 'acct_id=[0-9]+' | cut -d= -f2 | sort | uniq -c | sort -rn -``` - -- 运行该函数来获得来自文档的随机提示(解析Markdown并从中提取某个项目): -```sh - function taocl() { - curl -s https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md | - pandoc -f markdown -t html | - xmlstarlet fo --html --dropdtd | - xmlstarlet sel -t -v "(html/body/ul/li[count(p)>0])[$RANDOM mod last()+1]" | - xmlstarlet unesc | fmt -80 - } -``` - - -## 晦涩难懂,但却有用 - -- `expr`:实施算术或布林操作,或者求正则表达式的值 - -- `m4`:简单宏处理器 - -- `screen`:强大的终端多路复用和会话保持 - -- `yes`:大量打印一个字符串 - -- `cal`:漂亮的日历 - -- `env`:运行一个命令(脚本中很有用) - -- `look`:查找以某个字符串开头的英文单词(或文件中的行) - -- `cut `和`paste`以及`join`:数据处理 - -- `fmt`:格式化文本段落 - -- `pr`:格式化文本为页/栏 - -- `fold`:包裹文本行 - -- `column`:格式化文本为栏或表 - -- `expand`和`unexpand`:在制表和空格间转换 - -- `nl`:添加行号 - -- `seq`:打印数字 - -- `bc`:计算器 - -- `factor`:把整数因子分解 - -- `gpg`:加密并为文件签名 - -- `toe`:terminfo条目表 - -- `nc`:网络调试和数据传输 - -- `ngrep`:查找网络层 - -- `dd`:在文件或设备间移动数据 - -- `file`:识别文件类型 - -- `stat`:文件信息 - -- `tac`:逆序打印文件 - -- `shuf`:从文件中随机选择行 - -- `comm`:逐行对比分类排序的文件 - -- `hd`和`bvi`:转储或编辑二进制文件 - -- `strings`:从二进制文件提取文本 - -- `tr`:字符转译或处理 - -- `iconv `或`uconv`:文本编码转换 - -- `split `和`csplit`:分割文件 - -- `7z`:高比率文件压缩 - -- `ldd`:动态库信息 - -- `nm`:目标文件的符号 - -- `ab`:网络服务器基准测试 - -- `strace`:系统调用调试 - -- `mtr`:用于网络调试的更好的路由追踪 - -- `cssh`:可视化并发shell - -- `wireshark`和`tshark`:抓包和网络调试 - -- `host`和`dig`:DNS查询 - -- `lsof`:处理文件描述符和套接字信息 - -- `dstat`:有用的系统统计数据 - -- [`glances`](https://github.com/nicolargo/glances):高级,多子系统概览 - -- `iostat`:CPU和磁盘使用率统计 - -- `htop`:top的改进版 - -- `last`:登录历史 - -- `w`:谁登录进来了 - -- `id`:用户/组身份信息 - -- `sar`:历史系统统计数据 - -- `iftop`或`nethogs`:按套接口或进程的网络使用率 - -- `ss`:套接口统计数据 - -- `dmesg`:启动和系统错误信息 - -- `hdparm`:SATA/ATA磁盘操作/性能 - -- `lsb_release`:Linux发行版信息 - -- `lshw`:硬件信息 - -- `fortune`,`ddate`和`sl`:嗯,好吧,它取决于你是否认为蒸汽机车和齐皮士引用“有用” - - -## 更多资源 - -- [超棒的shell](https://github.com/alebcay/awesome-shell): 一个shell工具和资源一览表。 -- [严格模式](http://redsymbol.net/articles/unofficial-bash-strict-mode/) 用于写出更佳的shell脚本。 - - -## 免责声明 - -除了非常小的任务外,其它都写出了代码供大家阅读。伴随力量而来的是责任。事实是,你*能*在Bash中做的,并不意味着是你所应该做的!;) - --------------------------------------------------------------------------------- - -via: https://github.com/jlevy/the-art-of-command-line - -作者:[jlevy][a] -译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://github.com/jlevy -[1]: -[2]: -[3]: -[4]: -[5]: -[6]: -[7]: -[8]: -[9]: -[10]: -[11]: -[12]: -[13]: -[14]: -[15]: -[16]: -[17]: -[18]: -[19]: -[20]: From 434879d7318b1939ad3b4449ab04131ee7976690 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 27 Jun 2015 15:31:29 +0800 Subject: [PATCH 1274/2517] PUB:20150604 How To Install Unity 8 Desktop Preview In Ubuntu @GOLinux --- ...stall Unity 8 Desktop Preview In Ubuntu.md | 77 ------------------- 1 file changed, 77 deletions(-) delete mode 100644 translated/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md diff --git a/translated/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md b/translated/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md deleted file mode 100644 index bf1c3ea0bb..0000000000 --- a/translated/tech/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md +++ /dev/null @@ -1,77 +0,0 @@ -Ubuntu中安装Unity 8桌面预览版 -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Unity_8.jpeg) - -如果你一直关注新闻,那么Ubuntu将会切换到[Mir显示服务器][1],并随同发布[Unity 8][2]桌面。然而,在尚未确定Unity 8是否会在[Ubuntu 15.10 Willy Werewolf][3]中部署到Mir上之前,提供了一个Unity 8的预览版本供你体验和测试。通过官方PPA,可以很容地**安装Unity 8到Ubuntu 14.04,14.10和15.04中**。 - -到目前为止,开发者已经可以通过[ISO][4]获得该Unity 8预览来进行测试。但是Canonical已经通过[LXC容器][5]发布了。通过该方法,你可以获取Unity 8桌面会话,让它作为任何一个桌面环境运行在Mir显示服务器上。就像你[在Ubuntu中安装Mate桌面][6],然后从LightDm登录屏幕选择桌面会话一样。 - -好奇?想要试试Unity 8?让我们来看怎样安装它吧。 - -**注意: 它是一个实验性预览,可能不是所有人都可以让它正确工作的。** - -### 安装Unity 8桌面到Ubuntu ### - -下面是安装并使用Unity 8的步骤: - -#### 步骤 1: 安装Unity 8到Ubuntu 12.04和14.04 #### - -如果你真运行着Ubuntu 12.04和14.04,那么你必须使用官方PPA来安装Unity 8。使用以下命令进行安装: - - sudo apt-add-repository ppa:unity8-desktop-session-team/unity8-preview-lxc - sudo apt-get update - sudo apt-get upgrade - sudo apt-get install unity8-lxc - -#### 步骤 1: 安装Unity 8到Ubuntu 14.10和15.04 #### - -如果你真运行着Ubuntu 14.10或15.04,那么Unity 8 LXC已经在源中准备好。你只需要运行以下命令: - - sudo apt-get update - sudo apt-get install unity8-lxc - -#### 步骤 2: 设置Unity 8桌面预览LXC #### - -安装Unity 8 LXC后,该对它进行设置,下面的命令就可达到目的: - - sudo unity8-lxc-setup - -它将花费一些时间来设置,所以,给点耐心吧。它会下载ISO,然后解压缩,接着完整最后一些必要的设置来让它工作。它也会安装一个LightDM的轻度修改版本。这一切都搞定后,需要重启。 - -#### 步骤 3: 选择Unity 8 #### - -重启后,在登录屏幕,点击你的登录旁边的Ubuntu图标: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Change_Desktop_Environment_Ubuntu.jpeg) - -你应该可以在这看到Unity 8的选项,选择它: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Select_Unity8.jpeg) - -### 卸载Unity 8 LXC ### - -如果你发现Unity 8毛病太多,或者你不喜欢它,那么你可以以相同的方式切换会默认Unity版本。此外,你也可以通过下面的命令移除Unity 8: - - sudo apt-get remove unity8-lxc - -该命令会将Unity 8选项从LightDM屏幕移除,但是配置仍然保留着。 - -以上就是你在Ubuntu中安装嗲有Mir的Unity 8的全部过程,试玩后请分享你关于Unity 8的想法哦! - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/install-unity-8-desktop-ubuntu/ - -作者:[Abhishek][a] -译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://en.wikipedia.org/wiki/Mir_%28software%29 -[2]:https://wiki.ubuntu.com/Unity8Desktop -[3]:http://itsfoss.com/ubuntu-15-10-codename/ -[4]:https://wiki.ubuntu.com/Unity8DesktopIso -[5]:https://wiki.ubuntu.com/Unity8inLXC -[6]:http://itsfoss.com/install-mate-desktop-ubuntu-14-04/ From 19a2f1bbd157a7e3d5a0879aa8ae3b132c2d910d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 27 Jun 2015 21:26:06 +0800 Subject: [PATCH 1275/2517] PUB:20150610 Install Android Studio on Ubuntu 15.04 @NearTan --- ... Install Android Studio on Ubuntu 15.04.md | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) rename {translated/tech => published}/20150610 Install Android Studio on Ubuntu 15.04.md (72%) diff --git a/translated/tech/20150610 Install Android Studio on Ubuntu 15.04.md b/published/20150610 Install Android Studio on Ubuntu 15.04.md similarity index 72% rename from translated/tech/20150610 Install Android Studio on Ubuntu 15.04.md rename to published/20150610 Install Android Studio on Ubuntu 15.04.md index 25fe29e043..111291ebd2 100644 --- a/translated/tech/20150610 Install Android Studio on Ubuntu 15.04.md +++ b/published/20150610 Install Android Studio on Ubuntu 15.04.md @@ -1,29 +1,27 @@ - 在Ubuntu 15.04下安装Android Studio -PS 原MD文件有大段重复并且排版错误,译者已修复 ================================================================================ -Android Studio是官方为了Android应用开发者而发布的IDE,它基于IntelliJ的IDEA。 +![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/23.png) + +Android Studio是官方为了Android应用开发者而发布的IDE,它基于IntelliJ的IDEA。 ### Android Studio的功能 ### -灵活的基于Gradle的建构系统 +- 灵活的基于Gradle的建构系统 -针对不同手机编译多个版本的apk +- 针对不同手机编译多个版本的apk -代码模板功能构建出各种常用的应用 +- 代码模板功能构建出各种常用的应用 -支持拖动编辑主题的富布局编辑器 +- 支持拖动编辑主题的富布局编辑器 -lint工具可以捕捉到应用的性能、可用性、版本冲突或者其他问题 +- lint工具可以捕捉到应用的性能、可用性、版本冲突或者其他问题 -代码混淆和应用签名功能 - -内置 Google Cloud Platform 的支持,可以轻易的融入Google Cloud Messaging 和 App Engine支持 - -还有更多 +- 代码混淆和应用签名功能 +- 内置 Google Cloud Platform 的支持,可以轻易的融入Google Cloud Messaging 和 App Engine支持 +- 还有更多 ### 在 Ubuntu 15.04 上安装 Android Studio ### @@ -33,7 +31,6 @@ lint工具可以捕捉到应用的性能、可用性、版本冲突或者其他 sudo apt-get update sudo apt-get install android-studio - 如果要把Android Studio添加到启动栏,你需要如下操作 打开Android Studio,点击Configure选择Create Desktop Entry,这样Android Studio应该在dash中创建快捷方式了。 @@ -42,8 +39,6 @@ lint工具可以捕捉到应用的性能、可用性、版本冲突或者其他 ![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/12.png) -![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/23.png) - ![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/31.png) ![](http://www.ubuntugeek.com/wp-content/uploads/2015/05/41.png) @@ -60,7 +55,7 @@ via: http://www.ubuntugeek.com/install-android-studio-on-ubuntu-15-04.html 作者:[ruchi][a] 译者:[NearTan](https://github.com/NearTan) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 4d0c09545e7944e389c3c124adb2ac81adc44632 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 27 Jun 2015 21:43:10 +0800 Subject: [PATCH 1276/2517] PUB:20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet @geekpi --- ... pagespeed on Ubuntu 15.04 Vivid Vervet.md | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) rename {translated/tech => published}/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md (56%) diff --git a/translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md b/published/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md similarity index 56% rename from translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md rename to published/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md index 91d16acb00..db6e61da65 100644 --- a/translated/tech/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md +++ b/published/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md @@ -1,37 +1,36 @@ -如何在Ubuntu 15.04(Vivid Vervet)中安装nginx和google pagespeed +如何在 Ubuntu 15.04 中安装 nginx 和 google pagespeed ================================================================================ -Nginx (engine-x)是一个开源高性能http、反向代理和IMAP/POP3代理服务器。nginx杰出的功能有:稳定、丰富的功能集、简单的配置和低资源消耗。nginx被用于一些高性能网站并在站长之间变得越来越流行。本教程会从源码构建一个带有google paespeed模块用于Ubuntu 15.04中的.deb包。 +Nginx (engine-x)是一个开源的高性能 HTTP 服务器、反向代理和 IMAP/POP3 代理服务器。nginx 杰出的功能有:稳定、丰富的功能集、简单的配置和低资源消耗。nginx 被用于一些高性能网站并在站长之间变得越来越流行。本教程会从源码构建一个带有 google paespeed 模块的用于 Ubuntu 15.04 的 nginx .deb 安装包。 +pagespeed 是一个由 google 开发的 web 服务器模块来加速网站响应时间、优化 html 和减少页面加载时间。ngx_pagespeed 的功能如下: -pagespeed是一个由google开发的web服务器模块来加速网站响应时间、优化html和减少页面加载时间。ngx_pagespeed的功能如下: - -- 图像优化:去除meta数据、动态剪裁、重压缩。 -- CSS与JavaScript 放大、串联、内联、外联。 +- 图像优化:去除元数据、动态缩放、重压缩。 +- CSS 与 JavaScript 压缩、串联、内联、外联。 - 小资源内联 -- 延迟图像与JavaScript加载 -- HTML重写。 +- 图像与 JavaScript 延迟加载 +- HTML 重写 - 缓存生命期插件 -更多请见 [https://developers.google.com/speed/pagespeed/module/][1]. +更多请见 [https://developers.google.com/speed/pagespeed/module/][1]。 -### 预备要求 ### +### 前置要求 ### -Ubuntu Server 15.04 64位 -root 权限 +- Ubuntu Server 15.04 64位 +- root 权限 本篇我们将要: -- 安装必备包 -- 安装带ngx_pagespeed的nginx +- 安装必备软件包 +- 安装带 ngx_pagespeed 的 nginx - 测试 #### 安装必备包 #### -sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev + sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev -#### 安装带ngx_pagespeed的nginx #### +### 安装带 ngx_pagespeed 的 nginx ### -**第一步 - 添加nginx仓库** +#### 第一步 - 添加nginx仓库#### vim /etc/apt/sources.list.d/nginx.list @@ -51,7 +50,7 @@ sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev sudo sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYNUMBER sudo apt-get update -**第二步 - 从仓库下载nginx 1.8** +####第二步 - 从仓库下载 nginx 1.8#### sudo su cd ~ @@ -60,7 +59,7 @@ sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev apt-get source nginx apt-get build-dep nginx -**第三步 - 下载Pagespeed** +#### 第三步 - 下载 Pagespeed#### cd ~ mkdir -p ~/new/ngx_pagespeed/ @@ -73,12 +72,12 @@ sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev wget https://dl.google.com/dl/page-speed/psol/${ngx_version}.tar.gz tar -xzf 1.9.32.3.tar.gz -**第三步 - 配置nginx来编译Pagespeed** +####第四步 - 配置 nginx 来编译 Pagespeed#### cd ~/new/nginx_source/nginx-1.8.0/debin/ vim rules -在CFLAGS `.configure`下添加模块: +在两处 CFLAGS `.configure` 下添加模块: --add-module=../../ngx_pagespeed/ngx_pagespeed-release-1.9.32.3-beta \ @@ -86,27 +85,27 @@ sudo apt-get install dpkg-dev build-essential zlib1g-dev libpcre3 libpcre3-dev ![adding pagespeed to nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/2.png) -**第五步 - 打包nginx包并安装** +####第五步 - 打包 nginx 软件包并安装#### cd ~/new/nginx_source/nginx-1.8.0/ dpkg-buildpackage -b -dpkg-buildpackage会编译 ~/new/ngix_source/成nginx.deb。打包完成后,看一下目录: +dpkg-buildpackage 会编译 ~/new/ngix_source/ 为 nginx.deb。打包完成后,看一下目录: cd ~/new/ngix_source/ ls ![nginx builded with pagespeed](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/3.png) -接着安装nginx。 +接着安装 nginx。 dpkg -i nginx_1.8.0-1~trusty_amd64.deb ![Install nginx](https://www.howtoforge.com/images/nginx_pagespeed_ubuntu_15_04/big/4.png) -#### 测试 #### +### 测试 ### -运行nginx -V测试nginx是否已经自带ngx_pagespeed。 +运行 nginx -V 测试 nginx 是否已经自带 ngx_pagespeed。 nginx -V @@ -114,15 +113,15 @@ dpkg-buildpackage会编译 ~/new/ngix_source/成nginx.deb。打包完成后, ### 总结 ### -稳定、快速、开源的nginx支持许多不同的优化模块。这其中之一是google开发的‘pagespeed’。不像apache,nginx模块不是动态加载的,因此你必须在编译之前就选择完需要的模块。 +稳定、快速、开源的 nginx 支持许多不同的优化模块。这其中之一是 google 开发的‘pagespeed’。不像 apache,nginx 模块不是动态加载的,因此你必须在编译之前就选择好需要的模块。 -------------------------------------------------------------------------------- -via: https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-15-04/#step-build-nginx-package-and-install +via: https://www.howtoforge.com/tutorial/how-to-install-nginx-and-google-pagespeed-on-ubuntu-15-04/ 作者:Muhammad Arul 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 9754ff83e6726325e904347c68c86cd3c034c3d7 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 27 Jun 2015 22:16:45 +0800 Subject: [PATCH 1277/2517] PUB:20150331 How to set up remote desktop on Linux VPS using x2go @ictlyh --- ... remote desktop on Linux VPS using x2go.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150331 How to set up remote desktop on Linux VPS using x2go.md (63%) diff --git a/translated/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md b/published/20150331 How to set up remote desktop on Linux VPS using x2go.md similarity index 63% rename from translated/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md rename to published/20150331 How to set up remote desktop on Linux VPS using x2go.md index 26ad141e84..8ce76e25c6 100644 --- a/translated/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md +++ b/published/20150331 How to set up remote desktop on Linux VPS using x2go.md @@ -1,20 +1,20 @@ -如何在 Linux VPS 上使用 x2go 设置远程桌面 +如何在 Linux 上使用 x2go 设置远程桌面 ================================================================================ -由于一切都迁移到了云上,作为提高职员生产力的一种方式,虚拟远程桌面在工业中越来越流行。尤其对于那些需要跨多个地方和设备不停漫游的人,远程桌面可以让他们和工作环境保持无缝连接。远程桌面对于雇主同样有吸引力,可以在工作环境中提高敏捷性和灵活性,由于硬件整合、桌面安全加固等原因降低 IT 花费。 +由于一切都迁移到了云上,作为提高职员生产力的一种方式,虚拟远程桌面在工业中越来越流行。尤其对于那些需要在多个地方和设备之间不停漫游的人,远程桌面可以让他们和工作环境保持无缝连接。远程桌面对于雇主同样有吸引力,可以在工作环境中提高敏捷性和灵活性,由于硬件整合、桌面安全加固等原因降低 IT 花费。 -在 Linux 世界中,有许多可用的协议(例如 RDP、RFB、NX) 和 服务器/客户端实现(例如 [TigerVNC][1]、RealVNC、FreeNX、x2go、X11vnc、TeamViewer),当然不缺乏设置远程桌面的选择。 +在 Linux 世界中,理所当然设置远程桌面有很多选择,支持许多协议(例如 RDP、RFB、NX) 和服务器/客户端实现(例如 [TigerVNC][1]、RealVNC、FreeNX、x2go、X11vnc、TeamViewer 等等)。 -当中出色的一个是 [X2Go][2],它是一个基于 NX(译者注:通过计算机网络显示远程桌面环境的一种技术,可参考 [Wiki][9]) 的远程桌面服务器和客户端的开源(GPLv2)实现。在这个教程中,我会介绍 **如何为 Linux VPS 使用 X2Go 设置远程桌面环境**。 +这当中有个出色的产品叫做 [X2Go][2],它是一个基于 NX(译者注:通过计算机网络显示远程桌面环境的一种技术,可参考 [Wiki][9])的远程桌面服务器和客户端的开源(GPLv2)实现。在这个教程中,我会介绍 **如何为 Linux VPS 使用 X2Go 设置远程桌面环境**。 ### X2Go 是什么? ### -X2Go 的历史要追溯回 NoMachine 的 NX 技术。NX 远程桌面协议的设计目的是通过利用主动压缩和缓存解决低带宽和高延迟的网络连接问题。后来,NX 转为闭源,但 NX 库还是采用 GPL 协议。这导致了多种基于 NX 的远程桌面解决方案开源实现,X2Go 就是其中之一。 +X2Go 的历史要追溯到 NoMachine 的 NX 技术。NX 远程桌面协议的设计目的是通过利用主动压缩和缓存解决低带宽和高延迟的网络连接问题。后来,NX 转为闭源,但 NX 库还是采用 GPL 协议。这导致出现了多种基于 NX 的远程桌面解决方案开源实现,X2Go 就是其中之一。 -和其它解决方案,例如 VNC 相比,X2Go 带来哪些好处呢? X2Go 继承了 NX 技术的所有高级功能,很自然能在慢速网络连接上良好工作。另外,由于它内置的基于 SSH 的加密技术,X2Go 保持了确保安全的良好业绩记录。不再需要[手动设置 SSH 隧道][4] 。X2Go 开箱支持音频,意味着远程桌面的音乐播放通过网络传送,并进入本地扬声器。在易用性方面,远程桌面上运行的应用程序可以在你的本地桌面中用一个独立窗口无缝呈现,给你造成一种应用程序实际上在你本地桌面运行的错觉。正如你看到的,这些都是一些基于 VNC 的解决方案所缺少的[强大功能][5]。 +和其它解决方案例如 VNC 相比,X2Go 有哪些好处呢? X2Go 继承了 NX 技术的所有高级功能,很自然能在慢速网络连接上良好工作。另外,由于它内置的基于 SSH 的加密技术,X2Go 保持了确保安全的良好业绩记录。不再需要[手动设置 SSH 隧道][4] 。X2Go 默认支持音频,这意味着远程桌面的音乐播放可以通过网络传送,并进入本地扬声器。在易用性方面,远程桌面上运行的应用程序可以在你的本地桌面中以一个独立窗口无缝呈现,会给你造成一种应用程序实际上在你本地桌面运行的错觉。正如你看到的,这些都是一些基于 VNC 的解决方案所缺少的[强大功能][5]。 ### X2GO 的桌面环境兼容性 ### -和其它远程桌面服务器一样,X2Go 服务器也有一些[已知的兼容性问题][6]。像 KDE3/4、Xfce、MATE 和 LXDE 是对 X2Go 服务器最友好的桌面环境。但是,用其它桌面管理器效果可能有所不同。例如,已知 GNOME 3 之后的版本、KDE 5、Unity 和 X2Go 并不兼容。如果你的远程主机的桌面管理器和 X2Go 兼容,你可以继续以下的教程。 +和其它远程桌面服务器一样,X2Go 服务器也有一些[已知的兼容性问题][6]。像 KDE 3/4、Xfce、MATE 和 LXDE 是对 X2Go 服务器最友好的桌面环境。但是,用其它桌面管理器效果可能有所不同。例如,已知 GNOME 3 之后的版本、KDE 5、Unity 和 X2Go 并不兼容。如果你的远程主机的桌面管理器和 X2Go 兼容,你可以继续以下的教程。 ### 在 Linux 上安装 X2Go 服务器 ### @@ -74,21 +74,21 @@ Debian (Wheezy): CentOS/RHEL: -首先启用 EPEL 库,然后运行: +首先启用 [EPEL 库][7] ,然后运行: $ sudo yum install x2goclient ### 用 X2Go 客户端连接到远程桌面 ### -终于可以连接到远程桌面了。在本地主机上,只需运行以下命令或者使用桌面启动器启动 X2Go 客户端。 +现在可以连接到远程桌面了。在本地主机上,只需运行以下命令或者使用桌面启动器启动 X2Go 客户端。 $ x2goclient -输入远程主机的 IP 地址和 SSH 用户名称。同时,指定会话类型(例如,远程主机的桌面管理器)。 +输入远程主机的 IP 地址和 SSH 用户名称。同时,指定会话类型(例如,远程主机的桌面管理器)。 ![](https://farm9.staticflickr.com/8730/16365755693_75f3d544e9_b.jpg) -如果需要的话,你可以自定义其它东西(通过点击其它标签),例如连接速度、压缩、屏幕分辨率等等。 +如果需要的话,你可以自定义其它东西(通过点击其它的标签),例如连接速度、压缩、屏幕分辨率等等。 ![](https://farm9.staticflickr.com/8699/16984498482_665b975eca_b.jpg) @@ -112,7 +112,7 @@ CentOS/RHEL: ### 总结 ### -在这篇教程中,我介绍了如何在 [Linux VPS][8] 实例上设置 X2Go 远程桌面。正如你所看到的,整个设置过程都非常简单(如果你使用一个合适的桌面环境的话)。尽管对于特定桌面仍有问题,X2Go 是一个安全、功能丰富、快速并且免费的远程桌面解决方案。 +在这篇教程中,我介绍了如何在 [Linux VPS][8] 实例上设置 X2Go 远程桌面。正如你所看到的,整个设置过程都非常简单(如果你使用一个合适的桌面环境的话)。尽管对于特定桌面仍有问题,X2Go 是一个安全、功能丰富、快速并且免费的远程桌面解决方案。 X2Go 的什么功能最吸引你?欢迎分享你的观点。 @@ -122,7 +122,7 @@ via: http://xmodulo.com/x2go-remote-desktop-linux.html 作者:[Dan Nanni][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 0999d7ba1ac5a1d905b9b2c1d905c06fa71ee13b Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 27 Jun 2015 22:21:33 +0800 Subject: [PATCH 1278/2517] PUB:20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux @geekpi --- ...he Beautiful Arc GTK+ Flat Theme on Linux.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) rename {translated/share => published}/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md (92%) diff --git a/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md b/published/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md similarity index 92% rename from translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md rename to published/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md index 93f7b004e1..edcc62b86f 100644 --- a/translated/share/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md +++ b/published/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md @@ -1,10 +1,15 @@ -如何在Linux中安装漂亮的扁平化Arc GTK+主题 +如何在 Linux 中安装漂亮的 GTK+ 扁平化主题 Arc ================================================================================ -> 易于理解的分步教程 **今天我们将向你介绍最新发布的GTK+主题,它拥有透明和扁平元素,并且与多个桌面环境和Linux发行版兼容。[这个主题叫Arc][1]。** -开始讲细节之前,我建议你快速浏览一下下面的图,这样你有会对这个主题就会有一个基本的概念了。同样你应该知道它目前可以工作在GTK+ 2.x、GTK+ 3.x、GNOME-Shell、 Budgie、 Unity和Pantheon用户界面,它们都使用了GNOME栈。 +开始讲细节之前,我建议你快速浏览一下下面的图,这样你有会对这个主题就会有一个基本的概念了。同样你应该知道它目前可以工作在GTK+ 2.x、GTK+ 3.x、GNOME-Shell、 Budgie、 Unity和Pantheon用户界面,它们都使用了GNOME 体系。 + +![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-2.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-3.jpg) + +![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-4.jpg) 同样、Arc主题的开发者告诉我们它已经成功地在Ubuntu 15.04(Vivid Vervet)、 Arch Linux、 elementary OS 0.3 Freya、 Fedora 21、 Fedora 22、 Debian GNU/Linux 8.0 (Jessie)、 Debian Testing、 Debian Unstable、 openSUSE 13.2、 openSUSE Tumbleweed和Gentoo测试过了。 @@ -12,7 +17,7 @@ 要构建Arc主题,你需要先安装一些包,比如autoconf、 automake、 pkg-config (对于Fedora则是pkgconfig)、基于Debian/Ubuntu-based发行版的libgtk-3-dev或者基于RPM的gtk3-devel、 git、 gtk2-engines-pixbuf和gtk-engine-murrine (对于Fedora则是gtk-murrine-engine)。 -Arc主题还没有二进制包,因此你需要从git仓库中取下最新的源码并编译。这样,打开终端并运行下面的命令,一行行地,并在每行的末尾按下回车键并等待上一步完成来继续下一步。 +Arc主题还没有二进制包,因此你需要从git仓库中取下最新的源码并编译。这样,打开终端并运行下面的命令,一行行地输入,并在每行的末尾按下回车键并等待上一步完成来继续下一步。 git clone https://github.com/horst3180/arc-theme --depth 1 && cd arc-theme git fetch --tags @@ -22,11 +27,7 @@ Arc主题还没有二进制包,因此你需要从git仓库中取下最新的 就是这样!此时你已经在你的GNU/Linux发行版中安装了Arc主题,如果你使用GNOME可以使用GONME Tweak工具,如果你使用Ubuntu的Unity可以使用Unity Tweak工具来激活主题。玩得开心但不要忘了在下面的评论栏里留下你的截图。 -![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-2.jpg) -![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-3.jpg) - -![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-4.jpg) -------------------------------------------------------------------------------- From 976c3c53a0d6fd08772f38a250c6cdf342677e4b Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 27 Jun 2015 22:49:56 +0800 Subject: [PATCH 1279/2517] PUB:20150429 What are good command line HTTP clients @wi-cuckoo --- ...What are good command line HTTP clients.md | 111 ++++++++++++++++++ ...What are good command line HTTP clients.md | 110 ----------------- 2 files changed, 111 insertions(+), 110 deletions(-) create mode 100644 published/20150429 What are good command line HTTP clients.md delete mode 100644 translated/share/20150429 What are good command line HTTP clients.md diff --git a/published/20150429 What are good command line HTTP clients.md b/published/20150429 What are good command line HTTP clients.md new file mode 100644 index 0000000000..969b14da29 --- /dev/null +++ b/published/20150429 What are good command line HTTP clients.md @@ -0,0 +1,111 @@ +有哪些不错的命令行HTTP客户端? +============================================================================== + +“整体大于它的各部分之和”,这是引自希腊哲学家和科学家的亚里士多德的名言。这句话特别切中Linux。在我看来,Linux最强大的地方之一就是它的协作性。Linux的实用性并不仅仅源自大量的开源程序(命令行)。相反,其协作性来自于这些程序的综合利用,有时是结合成更大型的应用。 + +Unix哲学引发了一场“软件工具”的运动,关注开发简洁,基础,干净,模块化和扩展性好的代码,并可以运用于其他的项目。这种哲学成为了许多的Linux项目的一个重要的元素。 + +好的开源开发者写程序为了确保该程序尽可能运行得好,并且同时能与其他程序很好地协作。目标就是使用者拥有一堆方便的工具,每一个力求干好一件事。许多程序能独立工作得很好。 + +这篇文章讨论3个开源命令行HTTP客户端。这些客户端可以让你使用命令行从互联网上下载文件。但同时,他们也可以用于许多有意思的地方,如测试,调式和与HTTP服务器或web应用交互。对于HTTP架构师和API设计人员来说,使用命令行操作HTTP是一个值得花时间学习的技能。如果你需要经常使用API,HTTPie和cURL就非常有价值。 + +###HTTPie### + +![HTTPie in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-httpie.png) + +HTTPie(发音 aych-tee-tee-pie)是一款开源的命令行HTTP客户端。它是一个命令行界面,便于手工操作的类cURL工具。 + +该软件的目标是使得与Web服务器的交互尽可能的人性化。其提供了一个简单的http命令,允许使用简单且自然的语句发送任意的HTTP请求,并显示不同颜色的输出。HTTPie可以用于测试,调试,以及与HTTP服务器的常规交互。 + +#### 功能包括:#### + +- 生动而直观的语法格式 +- 经过格式化的彩色终端输出 +- 内建JSON支持 +- 支持表单和文件上传 +- 支持HTTPS,代理和认证 +- 任意数据请求 +- 自定义请求头 +- 持久会话 +- 类Wget的下载 +- 支持Python 2.6,2.7和3.x +- 支持Linux,Mac OS X 和 Windows +- 支持插件 +- 文档 +- 单元测试覆盖 + +--- + +- 网站:[httpie.org][1] +- 开发者: Jakub Roztočil +- 证书: 开源 +- 版本号: 0.9.2 + +###cURL### + +![cURL in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-cURL.png) + +cURL是一个开源的命令行工具,用于使用URL语句传输数据,支持DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS,IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET和TFTP等协议。 + +cURL支持SSL证书,HTTP POST,HTTP PUT,FTP上传,基于表单的HTTP上传,代理,缓存,用户名+密码的认证方式(Basic, Digest, NTLM, Negotiate, kerberos...),文件续传,代理通道和一些其他的有用功能。 + +#### 功能包括:#### + +- 支持配置文件 +- 一个单独命令行请求多个URL +- 支持匹配: [0-13],{one, two, three} +- 一个命令上传多个文件 +- 自定义最大传输速度 +- 重定向了标准错误输出 +- 支持Metalink + +--- + +- 网站: [curl.haxx.se][2] +- 开发者: Daniel Stenberg +- 证书: MIT/X derivate license +- 版本号: 7.42.0 + +###Wget### + +![Wget in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Wget.png) + +Wget是一个从网络服务器获取信息的开源软件。其名字源于World Wide Web 和 get。Wget支持HTTP,HTTPS和FTP协议,同时也可以通过HTTP代理获取信息。 + +Wget可以根据HTML页面的链接,创建远程网络站点的本地副本,完全重造源站点的目录结构。这种方式被称作“递归下载”。 + +Wget设计上增强了低速或者不稳定的网络连接。 + +功能包括: + +- 使用REST和RANGE恢复中断的下载 +- 使用文件名通配符,支持递归地对目录镜像 +- 基于NLS的消息文件支持多语言 +- 可选的转换下载文档里地绝对链接为相对链接,使得下载文档可以在本地相互链接 +- 可以在大多数类UNIX操作系统和微软Windows上运行 +- 支持HTTP代理 +- 支持HTTP cookie +- 支持HTTP持久连接 +- 无人照管/后台操作 +- 当对远程镜像时,使用本地文件时间戳来决定是否需要重新下载文档 + +--- + +- 站点: [www.gnu.org/software/wget/][3] +- 开发者: Hrvoje Niksic, Gordon Matzigkeit, Junio Hamano, Dan Harkless, and many others +- 证书: GNU GPL v3 +- 版本号: 1.16.3 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150425174537249/HTTPclients.html + +作者:Frazer Kline +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://httpie.org/ +[2]:http://curl.haxx.se/ +[3]:https://www.gnu.org/software/wget/ diff --git a/translated/share/20150429 What are good command line HTTP clients.md b/translated/share/20150429 What are good command line HTTP clients.md deleted file mode 100644 index fa9ef01c54..0000000000 --- a/translated/share/20150429 What are good command line HTTP clients.md +++ /dev/null @@ -1,110 +0,0 @@ -什么是好的命令行HTTP客户端? -============================================================================== -整体大于各部分之和,这是引自希腊哲学家和科学家的亚里士多德的名言。这句话特别切中Linux。在我看来,Linux最强大的地方之一就是它的协作性。Linux的实用性并不仅仅源自大量的开源程序(命令行)。相反,其协作性来自于这些程序的综合利用,有时是结合更大型的应用。 - -Unix哲学引发了一场“软件工具”的运动,关注开发简洁,基础,干净,模块化和扩展性好的代码,并可以运用于其他的项目。这种哲学为许多的Linux项目留下了一个重要的元素。 - -好的开源开发者写程序为了确保该程序尽可能运行正确,同时能与其他程序很好地协作。目标就是使用者拥有一堆方便的工具,每一个力求干不止一件事。许多程序能独立工作得很好。 - -这篇文章讨论3个开源命令行HTTP客户端。这些客户端可以让你使用命令行从互联网上下载文件。但同时,他们也可以用于许多有意思的地方,如测试,调式和与HTTP服务器或网络应用互动。对于HTTP架构师和API设计人员来说,使用命令行操作HTTP是一个值得花时间学习的技能。如果你需要来回使用API,HTTPie和cURL,这没什么价值。 - -------------- - -![HTTPie](http://www.linuxlinks.com/portal/content2/png/HTTPie.png) - -![HTTPie in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-httpie.png) - -HTTPie(发音 aych-tee-tee-pie)是一款开源命令行HTTP客户端。它是一个命令行界面,类cURL的工具。 - -该软件的目标是使得与网络服务器的交互尽可能的人性化。其提供了一个简单的http命令,允许使用简单且自然的语句发送任意的HTTP请求,并显示不同颜色的输出。HTTPie可以用于测试,调式和与HTTP服务器的一般交互。 - -#### 功能包括:#### - -- 可表达,直观的语句 -- 格式化,颜色区分的终端输出 -- 内建JSON支持 -- 表单和文件上传 -- HTTPS,代理和认证 -- 任意数据请求 -- 自定义标题 (此处header不确定是否特别意义) -- 持久会话 -- 类Wget下载 -- Python 2.6,2.7和3.x支持 -- Linux,Mac OS X 和 Windows支持 -- 支持插件 -- 帮助文档 -- 测试覆盖 (直译有点别扭) - -- 网站:[httpie.org][1] -- 开发者: Jakub Roztočil -- 证书: 开源 -- 版本号: 0.9.2 - ----------- - -![cURL](http://www.linuxlinks.com/portal/content2/png/cURL1.png) - -![cURL in action](http://www.linuxlinks.com/portal/content/reviews/Internet/Screenshot-cURL.png) - -cURL是一个开源命令行工具,用于使用URL语句传输数据,支持DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS,IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET和TFTP。 - -cURL支持SSL证书,HTTP POST,HTTP PUT,FTP上传,HTTP基于表单上传,代理,缓存,用户名+密码认证(Basic, Digest, NTLM, Negotiate, kerberos...),文件传输恢复, 代理通道和一些其他实用窍门的总线负载。(这里的名词我不明白其专业意思) - -#### 功能包括:#### - -- 配置文件支持 -- 一个单独命令行多个URL -- “globbing”漫游支持: [0-13],{one, two, three} -- 一个命令上传多个文件 -- 自定义最大传输速度 -- 重定向标准错误输出 -- Metalink支持 - -- 网站: [curl.haxx.se][2] -- 开发者: Daniel Stenberg -- 证书: MIT/X derivate license -- 版本号: 7.42.0 - ----------- - -![Wget](http://www.linuxlinks.com/portal/content2/png/Wget1.png) - -![Wget in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Wget.png) - -Wget是一个从网络服务器获取信息的开源软件。其名字源于World Wide Web 和 get。Wget支持HTTP,HTTPS和FTP协议,同时也通过HTTP代理获取信息。 - -Wget可以根据HTML页面的链接,创建远程网络站点的本地版本,是完全重造源站点的目录结构。这种方式被冠名“recursive downloading。” - -Wget已经设计可以加快低速或者不稳定的网络连接。 - -功能包括: - -- 使用REST和RANGE恢复中断的下载 -- 使用文件名 -- 多语言的基于NLS的消息文件 -- 选择性地转换下载文档里地绝对链接为相对链接,使得下载文档可以本地相互链接 -- 在大多数类UNIX操作系统和微软Windows上运行 -- 支持HTTP代理 -- 支持HTTP数据缓存 -- 支持持续地HTTP连接 -- 无人照管/后台操作 -- 当远程对比时,使用本地文件时间戳来决定是否需要重新下载文档 (mirroring没想出合适的表达) - -- 站点: [www.gnu.org/software/wget/][3] -- 开发者: Hrvoje Niksic, Gordon Matzigkeit, Junio Hamano, Dan Harkless, and many others -- 证书: GNU GPL v3 -- 版本号: 1.16.3 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20150425174537249/HTTPclients.html - -作者:Frazer Kline -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://httpie.org/ -[2]:http://curl.haxx.se/ -[3]:https://www.gnu.org/software/wget/ From 091b1022c14b9903b1ca8fb2445222f981f6651f Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 28 Jun 2015 06:11:31 +0800 Subject: [PATCH 1280/2517] [Translated] 20150616 LINUX 101 -- POWER UP YOUR SHELL.md --- ...20150616 LINUX 101--POWER UP YOUR SHELL.md | 179 ------------------ ...20150616 LINUX 101--POWER UP YOUR SHELL.md | 177 +++++++++++++++++ 2 files changed, 177 insertions(+), 179 deletions(-) delete mode 100644 sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md create mode 100644 translated/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md diff --git a/sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md b/sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md deleted file mode 100644 index 94102a58a6..0000000000 --- a/sources/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md +++ /dev/null @@ -1,179 +0,0 @@ -FSSlc translating - -LINUX 101: POWER UP YOUR SHELL -================================================================================ -> Get a more versatile,featureful and colourful command line interface with our guide to shell basics. - -**WHY DO THIS?** - -- Make life at the shell prompt easier and faster. -- Resume sessions after losing a connection. -- Stop pushing around that fiddly rodent! - -![bash1](http://www.linuxvoice.com/wp-content/uploads/2015/02/bash1-large15.png) - -Here’s our souped-up prompt on steroids. It’s a bit long for this small terminal window, but you can tweak it to your liking. - -As a Linux user, you’re probably familiar with the shell (aka command line). You may pop up the occasional terminal now and then for some essential jobs that you can’t do at the GUI, or perhaps you live in a tiling window manager environment and the shell is your main way of interacting with your Linux box. - -In either case, you’re probably using the stock Bash configuration that came with your distro – and while it’s powerful enough for most jobs, it could still be a lot better. In this tutorial we’ll show you how to pimp up your shell to make it more informative, useful and pleasant to work in. We’ll customise the prompt to make it provide better feedback than the defaults, and we’ll show you how to manage sessions and run multiple programs together with the incredibly cool tmux tool. And for a bit of eye candy, we’ll look at colour schemes as well. So, onwards! - -### Make your prompt sing ### - -Most distributions ship with very plain prompts – they show a bit of information, and generally get you by, but the prompt can do so much more. Take the default prompt on a Debian 7 installation, for instance: - - mike@somebox:~$ - -This shows the user, hostname, current directory and account type symbol (if you switch to root, the **$** changes to #). But where is this information stored? The answer is in the **PS1** environment variable. If you enter **echo $PS1** you’ll see this at the end of the text string that appears: - - u@h:w$ - -This looks a bit ugly, and at first glance you might start screaming, assuming it to be a dreaded regular expression, but we’re not going to fry our brains with the complexity of those. No, the slashes here are escape sequences, telling the prompt to do special things. The **u** part, for instance, tells the prompt to show the username, while w means the working directory. - -Here’s a list of things you can use in the prompt: - -- d The current date. -- h The hostname. -- n A newline character. -- A The current time (HH:MM). -- u The current user. -- w (lowercase) The whole working directory. -- W (uppercase) The basename of the working directory. -- $ A prompt symbol that changes to # for root. -- ! The shell history number of this command. - -To clarify the difference in the **w** and **W** options: with the former, you’ll see the whole path for the directory in which you’re working (eg **/usr/local/bin**), whereas for the latter it will just show the **bin** part. - -Now, how do you go about changing the prompt? You need to modify the contents of the **PS1** environment variable. Try this: - - export PS1=”I am u and it is A $” - -Now your prompt will look something like: - - I am mike and it is 11:26 $ - -From here you can experiment with the other escape sequences shown above to create the prompt of your dreams. But wait a second – when you log out, all of your hard work will be lost, because the value of the **PS1** environment variable is reset each time you start a terminal. The simplest way to fix this is to open the **.bashrc** configuration file (in your home directory) and add the complete export command to the bottom. This **.bashrc** file will be read by Bash every time you start a new shell session, so your beefed-up prompt will always appear. You can also spruce up your prompt with extra colour. This is a bit tricky at first, as you have to use some rather odd-looking escape sequences, but the results can be great. Add this to a point in your **PS1** string and it will change the text to red: - - [e[31m] - -You can change 31 here to other numbers for different colours: - -- 30 Black -- 32 Green -- 33 Yellow -- 34 Blue -- 35 Magenta -- 36 Cyan -- 37 White - -So, let’s finish off this section by creating the mother of all prompts, using the escape sequences and colours we’ve already looked at. Take a deep breath, flex your fingers, and then type this beast: - - export PS1=”(!) [e[31m][A] [e[32m]u@h [e[34m]w [e[30m]$ “ - -This provides a Bash command history number, current time, and colours for the user/hostname combination and working directory. If you’re feeling especially ambitious, you can change the background colours as well as the foreground ones, for really striking combinations. The ever useful Arch wiki has a full list of colour codes: [http://tinyurl.com/3gvz4ec][1]. - -> ### Shell essentials ### -> -> If you’re totally new to Linux and have just picked up this magazine for the first time, you might find the tutorial a bit heavy going. So here are the basics to get you familiar with the shell. It’s usually found as Terminal, XTerm or Konsole in your menus, and when you start it the most useful commands are: -> -> **ls** (list files); **cp one.txt two.txt** (copy file); **rm file.txt** (remove file); **mv old.txt new.txt** (move or rename); -> -> **cd /some/directory** (change directory); **cd ..** (change to directory above); **./program** (run program in current directory); **ls > list.txt** (redirect output to a file). -> -> Almost every command has a manual page explaining options (eg **man ls** – press Q to quit the viewer). There you can learn about command options, so you can see that **ls -la** shows a detailed list including hidden files. Use the up and down cursor keys to cycle through previous commands, and use Tab after entering part of a file or directory name to auto-complete it. - -### Tmux: A window manager for your shell ### - -A window manager inside a text mode environment – it sounds crazy, right? Well, do you remember when web browsers first implemented tabbed browsing? It was a major step forward in usability at the time, and reduced clutter in desktop taskbars and window lists enormously. Instead of having taskbar or pager icons for every single site you had open, you just had the one button for your browser, and then the ability to switch sites inside the browser itself. It made an awful lot of sense. - -If you end up running several terminals at the same time, a similar situation occurs; you might find it annoying to keep jumping between them, and finding the right one in your taskbar or window list each time. With a text-mode window manager you can not only run multiple shell sessions simultaneously inside the same terminal window, but you can even arrange them side-by-side. - -And there’s another benefit too: detaching and reattaching. The best way to see how this works is to try it yourself. In a terminal window, enter **screen** (it’s installed by default on most distros, or will be available in your package repositories). Some welcome text appears – just hit Enter to dismiss it. Now run an interactive text mode program, such as **nano**, and close the terminal window. - -In a normal shell session, the act of closing the window would terminate every process running inside it – so your Nano editing session would be a goner. But not with screen. Open a new terminal and enter: - - screen -r - -And voilà: the Nano session you started before is back! - -When you originally ran **screen**, it created a new shell session that was independent and not tied to a specific terminal window, so it could be detached and reattached (hence the **-r** option) later. - -This is especially useful if you’re using SSH to connect to another machine, doing some work, and don’t want a flaky connection to ruin all your progress. If you do your work inside a **screen** session and your connection goes down (or your laptop battery dies, or your computer explodes), you can simply reconnect/recharge/buy a new computer, then SSH back in to the remote box, run **screen -r** to reattach and carry on from where you left off. - -Now, we’ve been talking about GNU **screen** here, but the title of this section mentions tmux. Essentially, **tmux** (terminal multiplexer) is like a beefed up version of **screen** with lots of useful extra features, so we’re going to focus on it here. Some distros include **tmux** by default; in others it’s usually just an **apt-get, yum install** or **pacman -S** command away. - -Once you have it installed, enter **tmux** to start it. You’ll notice right away that there’s a green line of information along the bottom. This is very much like a taskbar from a traditional window manager: there’s a list of running programs, the hostname of the machine, a clock and the date. Now run a program, eg Nano again, and hit Ctrl+B followed by C. This creates a new window inside the tmux session, and you can see this in the taskbar at the bottom: - - 0:nano- 1:bash* - -Each window has a number, and the currently displayed program is marked with an asterisk symbol. Ctrl+B is the standard way of interacting with tmux, so if you hit that key combo followed by a window number, you’ll switch to that window. You can also use Ctrl+B followed by N and P to switch to the next and previous windows respectively – or use Ctrl+B followed by L to switch between the two most recently used windows (a bit like the classic Alt+Tab behaviour on the desktop). To get a window list, use Ctrl+B followed by W. - -So far, so good: you can now have multiple programs running inside a single terminal window, reducing clutter (especially if you often have multiple SSH logins active on the same remote machine). But what about seeing two programs at the same time? - -For this, tmux uses “panes”. Hit Ctrl+B followed by % and the current window will be split into two sections, one on the left and one on the right. You can switch between them Using Ctrl+B followed by O. This is especially useful if you want to see two things at the same time – eg a manual page in one pane, and an editor with a configuration file in another. - -Sometimes you’ll want to resize the individual panes, and this is a bit trickier. First you have to hit Ctrl+B followed by : (colon), which turns the tmux bar along the bottom into a dark orange colour. You’re now in command mode, where you can type in commands to operate tmux. Enter **resize-pane -R** to resize the current pane one character to the right, or use **-L** to resize in a leftward direction. These may seem like long commands for a relatively simple operation, but note that the tmux command mode (started with the aforementioned colon) has tab completion. So you don’t have to type the whole command – just enter “**resi**” and hit Tab to complete. Also note that the **tmux** command mode also has a history, so if you want to repeat the resize operation, hit Ctrl+B followed by colon and then use the up cursor key to retrieve the command that you entered previously. - -Finally, let’s look at detaching and reattaching – the awesome feature of screen we demonstrated earlier. Inside tmux, hit Ctrl+B followed by D to detach the current tmux session from the terminal window, which leaves everything running in the background. To reattach to the session use **tmux a**. But what happens if you have multiple tmux sessions running? Use this command to list them: - - tmux ls - -This shows a number for each session; if you want to reattach to session 1, use tmux a -t 1. tmux is hugely configurable, with the ability to add custom keybindings and change colour schemes, so once you’re comfortable with the main features, delve into the manual page to learn more. - -tmux: a window manager for your shell - -![tmux](http://www.linuxvoice.com/wp-content/uploads/2015/02/tmux-large13.jpg) - -Here’s tmux with two panes open: the left has Vim editing a configuration file, while the right shows a manual page - -> ### Zsh: an alternative shell ### -> -> Choice is good, but standardisation is also important as well. So it makes sense that almost every mainstream Linux distribution uses the Bash shell by default – although there are others. Bash provides pretty much everything you need from a shell, including command history, filename completion and lots of scripting ability. It’s mature, reliable and well documented – but it’s not the only shell in town. -> -> Many advanced users swear by Zsh, the Z Shell. This is a replacement for Bash that offers almost all of the same functionality, with some extra features on top. For instance, in Zsh you can enter **ls** - and hit Tab to get quick descriptions of the various options available for **ls**. No need to open the manual page! -> -> Zsh sports other great auto-completion features: type **cd /u/lo/bi** and hit Tab, for instance, and the full path of **/usr/local/bin** will appear (providing there aren’t other paths containing **u**, **lo** and **bi**). Or try **cd** on its own followed by Tab, and you’ll see nicely coloured directory listings – much better than the plain ones used by Bash. -> -> Zsh is available in the package repositories of all major distros; install it and enter **zsh** to start it. To change your default shell from Bash to Zsh, use the **chsh** command. And for more information visit [www.zsh.org][2]. - -### The terminals of the Future ### - -You might be wondering why the application that contains your command prompt is called a terminal. Back in the early days of Unix, people tended to work on multi-user machines, with a giant mainframe computer occupying a room somewhere in a building, and people connected to it using screen and keyboard combinations at the end of some wires. These terminal machines were often called “dumb”, because they didn’t do any important processing themselves – they just displayed whatever was sent down the wire from the mainframe, and sent keyboard presses back to it. - -Today, almost all of us do the actual processing on our own machines, so our computers are not terminals in a traditional sense. This is why programs like **XTerm**, Gnome Terminal, Konsole etc. are called “terminal emulators” – they provide the same facilities as the physical terminals of yesteryear. And indeed, in many respects they haven’t moved on much. Sure, we have anti-aliased fonts now, better colours and the ability to click on URLs, but by and large they’ve been working in the same way for decades. - -Some programmers are trying to change this though. **Terminology** ([http://tinyurl.com/osopjv9][3]), from the team behind the ultra-snazzy Enlightenment window manager, aims to bring terminals into the 21st century with features such as inline media display. You can enter **ls** in a directory full of images and see thumbnails, or even play videos from directly inside your terminal. This makes the terminal work a bit more like a file manager, and means that you can quickly check the contents of media files without having to open them in a separate application. - -Then there’s Xiki ([www.xiki.org][4]), which describes itself as “the command revolution”. It’s like a cross between a traditional shell, a GUI and a wiki; you can type commands anywhere, store their output as notes for reference later, and create very powerful custom commands. It’s hard to describe it in mere words, so the authors have made a video (see the Screencasts section of the **Xiki** site) which shows how much potential it has. - -And Xiki is definitely not a flash in the pan project that will die of bitrot in a few months. The authors ran a successful Kickstarter campaign to fund its development, netting over $84,000 at the end of July. Yes, you read that correctly – $84K for a terminal emulator. It might be the most unusual crowdfunding campaign since some crazy guys decided to start their own Linux magazine… - -### Next-gen terminals ### - -Many command line and text-based programs match their GUI equivalents for feature parity, and are often much faster and more efficient to use. Our recommendations: **Irssi** (IRC client); **Mutt** (mail client); **rTorrent** (BitTorrent); **Ranger** (file manager); **htop** (process monitor). ELinks does a decent job for web browsing, given the limitations of the terminal, and it’s useful for reading text-heavy websites such as Wikipedia. - -> ### Fine-tune your colour scheme ### -> -> We’re not obsessed with eye-candy at Linux Voice, but we do recognise the importance of aesthetics when you’re staring at something for several hours every day. Many of us love to tweak our desktops and window managers to perfection, crafting pixel-perfect drop shadows and fiddling with colour schemes until we’re 100% happy. (And then fiddling some more out of habit.) -> -> But then we tend to ignore the terminal window. Well, that deserves some love too, and at [http://ciembor.github.io/4bit][5] you’ll find a highly awesome colour scheme designer that can export settings for all of the popular terminal emulators (**XTerm, Gnome Terminal, Konsole and Xfce4 Terminal are among the apps supported.**) Move the sliders until you attain colour scheme nirvana, then click on the Get Scheme button at the top-right of the page. -> -> Similarly, if you spend a lot of time in a text editor such as Vim or Emacs, it’s worth using a well-crafted palette there as well. **Solarized at** [http://ethanschoonover.com/solarized][6] is an excellent scheme that’s not just pretty, but designed for maximum usability, with plenty of research and testing behind it. - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/linux-101-power-up-your-shell-8/ - -作者:[Ben Everard][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/ben_everard/ -[1]:http://tinyurl.com/3gvz4ec -[2]:http://www.zsh.org/ -[3]:http://tinyurl.com/osopjv9 -[4]:http://www.xiki.org/ -[5]:http://ciembor.github.io/4bit -[6]:http://ethanschoonover.com/solarized diff --git a/translated/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md b/translated/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md new file mode 100644 index 0000000000..fac7fa2e1b --- /dev/null +++ b/translated/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md @@ -0,0 +1,177 @@ +LINUX 101: 让你的 SHELL 更强大 +================================================================================ +> 在我们的有关 shell 基础的指导下, 得到一个更灵活,功能更强大且多彩的命令行界面 + +**为何要这样做?** + +- 使得在 shell 提示符下过得更轻松,高效 +- 在失去连接后恢复先前的会话 +- Stop pushing around that fiddly rodent! (注: 我不知道这句该如何翻译) + +![bash1](http://www.linuxvoice.com/wp-content/uploads/2015/02/bash1-large15.png) + +Here’s our souped-up prompt on steroids.(注: 我不知道该如何翻译这句)对于这个细小的终端窗口来说,这或许有些长.但你可以根据你的喜好来调整它的大小. + +作为一个 Linux 用户, 对 shell (又名为命令行),你可能会熟悉. 或许你需要时不时的打开终端来完成那些不能在 GUI 下处理的必要任务,抑或是因为你处在一个平铺窗口管理器的环境中, 而 shell 是你与你的 linux 机器交互的主要方式. + +在上面的任一情况下,你可能正在使用你所使用的发行版本自带的 Bash 配置. 尽管对于大多数的任务而言,它足够强大,但它可以更加强大. 在本教程中,我们将向你展示如何使得你的 shell 更具信息性,更加实用且更适于在其中工作. 我们将对提示符进行自定义,让它比默认情况下提供更好的反馈,并向你展示如何使用炫酷的 `tmux` 工具来管理会话并同时运行多个程序. 并且,为了让眼睛舒服一点,我们还将关注配色方案. 接着,就让我们向前吧! + +### 让提示符 "唱歌" ### + +大多数的发行版本配置有一个非常简单的提示符 – 它们大多向你展示了一些基本信息, 但提示符可以为你提供更多的内容.例如,在 Debian 7 下,默认的提示符是这样的: + + mike@somebox:~$ + +上面的提示符展示出了用户,主机名,当前目录和账户类型符号(假如你切换到 root 账户, **$** 会变为 # ). 那这些信息是在哪里存储的呢? 答案是:在 **PS1** 环境变量中. 假如你键入 **echo $PS1**, 你将会在这个命令的输出字符串的最后有如下的字符: + + \u@\h:\w$ (注:这里没有加上斜杠 \,应该是没有转义 ,下面的有些命令也一样,我把 \ 都加上了,发表的时候也得注意一下) + +这看起来有一些丑陋,并在瞥见它的第一眼时,你可能会开始尖叫,认为它是令人恐惧的正则表达式,但我们不打算用这些复杂的字符来煎熬我们的大脑. 这不是正则表达式, 这里的斜杠是转义序列,它告诉提示符进行一些特别的处理. 例如,上面的 **u** 部分,告诉提示符展示用户名, 而 w 则展示工作路径. + +下面是一些你可以在提示符中用到的字符的列表: + +- d 当前的日期. +- h 主机名. +- n 代表新的一行的字符. +- A 当前的时间 (HH:MM). +- u 当前的用户. +- w (小写) 整个工作路径的全称. +- W (大写) 工作路径的简短名称. +- $ 一个提示符号,对于 root 用户为 # 号. +- ! 当前命令在 shell 历史记录中的序号. + +下面解释 **w** 和 **W** 选项的区别: 对于前者,你将看到你所在的工作路径的完整地址,(例如 **/usr/local/bin**), 而对于后者, 它则只显示 **bin** 这一部分. + +现在, 我们该怎样改变提示符呢? 你需要更改 **PS1** 环境变量的内容, 试试下面这个: + + export PS1=”I am \u and it is \A $” + +现在, 你的提示符将会像下面这样: + + I am mike and it is 11:26 $ + +从这个例子出发, 你就可以按照你的想法来试验一下上面列出的其他转义序列. 但稍等片刻 – 当你登出后,你的这些努力都将消失,因为在你每次打开终端时, **PS1** 环境变量的值都会被重置. 解决这个问题的最简单方式是打开 **.bashrc** 配置文件(在你的家目录下) 并在这个文件的最下方添加上完整的 `export` 命令.在每次你启动一个新的 shell 会话时,这个 **.bashrc** 会被 `Bash` 读取, 所以你的被加强了的提示符就可以一直出现.你还可以使用额外的颜色来装扮提示符.刚开始,这将有点棘手,因为你必须使用一些相当奇怪的转义序列,但结果是非常漂亮的. 将下面的字符添加到你的 **PS1**字符串中的某个位置,最终这将把文本变为红色: + + \[\e[31m\] + +你可以将这里的 31 更改为其他的数字来获得不同的颜色: + +- 30 黑色 +- 32 绿色 +- 33 黄色 +- 34 蓝色 +- 35 洋红色 +- 36 青色 +- 37 白色 + +所以,让我们使用先前看到的转义序列和颜色来创造一个提示符,以此来结束这一小节的内容. 深吸一口气,弯曲你的手指,然后键入下面这只"野兽": + + export PS1="(\!) \[\e[31m\] \[\A\] \[\e[32m\]\u@\h \[\e[34m\]\w \[\e[30m\]$" + +上面的命令提供了一个 Bash 命令历史序号, 当前的时间,用户或主机名与颜色之间的组合,以及工作路径.假如你"野心勃勃",利用一些惊人的组合,你还可以更改提示符的背景色和前景色.先前实用的 Arch wiki 有一个关于颜色代码的完整列表:[http://tinyurl.com/3gvz4ec][1]. + +> ### Shell 精要 ### +> +> 假如你是一个彻底的 Linux 新手并第一次阅读这份杂志,或许你会发觉阅读这些教程有些吃力. 所以这里有一些基础知识来让你熟悉一些 shell. 通常在你的菜单中, shell 指的是 Terminal, XTerm 或 Konsole, 但你启动它后, 最为实用的命令有这些: +> +> **ls** (列出文件名); **cp one.txt two.txt** (复制文件); **rm file.txt** (移除文件); **mv old.txt new.txt** (移动或重命名文件); +> +> **cd /some/directory** (改变目录); **cd ..** (回到上级目录); **./program** (在当前目录下运行一个程序); **ls > list.txt** (重定向输出到一个文件). +> +> 几乎每个命令都有一个手册页用来解释其选项(例如 **man ls** – 按 Q 来退出).在那里,你可以知晓命令的选项,这样你就知道 **ls -la** 展示一个详细的列表,其中也列出了隐藏文件, 并且在键入一个文件或目录的名字的一部分后, 可以使用 Tab 键来自动补全. + +### Tmux: 针对 shell 的窗口管理器 ### + +在文本模式的环境中使用一个窗口管理器 – 这听起来有点不可思议, 是吧? 然而,你应该记得当 Web 浏览器第一次实现分页浏览的时候吧? 在当时, 这是在可用性上的一个重大进步,它减少了桌面任务栏的杂乱无章和繁多的窗口列表. 对于你的浏览器来说,你只需要一个按钮便可以在浏览器中切换到你打开的每个单独网站, 而不是针对每个网站都有一个任务栏或导航图标. 这个功能非常有意义. + +若有时你同时运行着几个虚拟终端,你便会遇到相似的情况; 在这些终端之间跳转,或每次在任务栏或窗口列表中找到你所需要的那一个终端,都可能会让你觉得麻烦. 拥有一个文本模式的窗口管理器不仅可以让你像在同一个终端窗口中运行多个 shell 会话,而且你甚至还可以将这些窗口排列在一起. + +另外,这样还有另一个好处:可以将这些窗口进行分离和重新连接.想要看看这是如何运行的最好方式是自己尝试一下. 在一个终端窗口中,输入 **screen** (在大多数发行版本中,它被默认安装了或者可以在软件包仓库中找到). 某些欢迎的文字将会出现 – 只需敲击 Enter 键这些文字就会消失. 现在运行一个交互式的文本模式的程序,例如 **nano**, 并关闭这个终端窗口. + +在一个正常的 shell 对话中, 关闭窗口将会终止所有在该终端中运行的进程 – 所以刚才的 Nano 编辑对话也就被终止了, 但对于 screen 来说,并不是这样的. 打开一个新的终端并输入如下命令: + + screen -r + +瞧, 你刚开打开的 Nano 会话又回来了! + +当刚才你运行 **screen** 时, 它会创建了一个新的独立的 shell 会话, 它不与某个特定的终端窗口绑定在一起,所以可以在后面被分离并重新连接( 即 **-r** 选项). + +当你正使用 SSH 去连接另一台机器并做着某些工作, 但并不想因为一个单独的连接而毁掉你的所有进程时,这个方法尤其有用.假如你在一个 **screen** 会话中做着某些工作,并且你的连接突然中断了(或者你的笔记本没电了,又或者你的电脑报废了),你只需重新连接一个新的电脑或给电脑充电或重新买一台电脑,接着运行 **screen -r** 来重新连接到远程的电脑,并在刚才掉线的地方接着开始. + +现在,我们都一直在讨论 GNU 的 **screen**,但这个小节的标题提到的是 tmux. 实质上, **tmux** (terminal multiplexer) 就像是 **screen** 的一个进阶版本,带有许多有用的额外功能,所以现在我们开始关注 tmux. 某些发行版本默认包含了 **tmux**; 在其他的发行版本上,通常只需要一个 **apt-get, yum install** 或 **pacman -S** 命令便可以安装它. + +一旦你安装了它过后,键入 **tmux** 来启动它.接着你将注意到,在终端窗口的底部有一条绿色的信息栏,它非常像传统的窗口管理器中的任务栏: 上面显示着一个运行着的程序的列表,机器的主机名,当前时间和日期. 现在运行一个程序,又以 Nano 为例, 敲击 Ctrl+B 后接着按 C 键, 这将在 tmux 会话中创建一个新的窗口,你便可以在终端的底部的任务栏中看到如下的信息: + + 0:nano- 1:bash* + +每一个窗口都有一个数字,当前呈现的程序被一个星号所标记. Ctrl+B 是与 tmux 交互的标准方式, 所以若你敲击这个按键组合并带上一个窗口序号, 那么就会切换到对应的那个窗口.你也可以使用 Ctrl+B 再加上 N 或 P 来分别切换到下一个或上一个窗口 – 或者使用 Ctrl+B 加上 L 来在最近使用的两个窗口之间来进行切换(有点类似于桌面中的经典的 Alt+Tab 组合键的效果). 若需要知道窗口列表,使用 Ctrl+B 再加上 W. + +目前为止,一切都还好:现在你可以在一个单独的终端窗口中运行多个程序,避免混乱(尤其是当你经常与同一个远程主机保持多个 SSH 连接时.). 当想同时看两个程序又该怎么办呢? + +针对这种情况, 可以使用 tmux 中的窗格. 敲击 Ctrl+B 再加上 % , 则当前窗口将分为两个部分,一个在左一个在右.你可以使用 Ctrl+B 再加上 O 来在这两个部分之间切换. 这尤其在你想同时看两个东西时非常实用, – 例如一个窗格看指导手册,另一个窗格里用编辑器看一个配置文件. + +有时,你想对一个单独的窗格进行缩放,而这需要一定的技巧. 首先你需要敲击 Ctrl+B 再加上一个 :(分号),这将使得位于底部的 tmux 栏变为深橙色. 现在,你进入了命令模式,在这里你可以输入命令来操作 tmux. 输入 **resize-pane -R** 来使当前窗格向右移动一个字符的间距, 或使用 **-L** 来向左移动. 对于一个简单的操作,这些命令似乎有些长,但请注意,在 tmux 的命令模式(以前面提到的一个分号开始的模式)下,可以使用 Tab 键来补全命令. 另外需要提及的是, **tmux** 同样也有一个命令历史记录,所以若你想重复刚才的缩放操作,可以先敲击 Ctrl+B 再跟上一个分号并使用向上的箭头来取回刚才输入的命令. + +最后,让我们看一下分离和重新连接 - 即我们刚才介绍的 screen 的特色功能. 在 tmux 中,敲击 Ctrl+B 再加上 D 来从当前的终端窗口中分离当前的 tmux 会话, 这使得这个会话的一切工作都在后台中运行.使用 **tmux a** 可以再重新连接到刚才的会话. 但若你同时有多个 tmux 会话在运行时,又该怎么办呢? 我们可以使用下面的命令来列出它们: + + tmux ls + +这个命令将为每个会话分配一个序号; 假如你想重新连接到会话 1, 可以使用 `tmux a -t 1`. tmux 是可以高度定制的,你可以自定义按键绑定并更改配色方案, 所以一旦你适应了它的主要功能,请钻研指导手册以了解更多的内容. + +tmux: 一个针对 shell 的窗口管理器 + +![tmux](http://www.linuxvoice.com/wp-content/uploads/2015/02/tmux-large13.jpg) + +上图中, tmux 开启了两个窗格: 左边是 Vim 正在编辑一个配置文件,而右边则展示着指导手册页. + +> ### Zsh: 另一个 shell ### +> +> 选择是好的,但标准同样重要. 你要知道几乎每个主流的 Linux 发行版本都默认使用 Bash shell – 尽管还存在其他的 shell. Bash 为你提供了一个 shell 能够给你提供的几乎任何功能,包括命令历史记录,文件名补全和许多脚本编程的能力.它成熟,可靠并文档丰富 – 但它不是你唯一的选择. +> +> 许多高级用户热衷于 Zsh, 即 Z shell. 这是 Bash 的一个替代品并提供了 Bash 的几乎所有功能,令外还提供了一些额外的功能. 例如, 在 Zsh 中,你输入 **ls** - 并敲击 Tab 键可以得到 **ls** 可用的各种不同选项的一个大致描述. 而不需要再打开 man page 了! +> +> Zsh 还支持其他强大的自动补全功能: 例如,输入 **cd /u/lo/bi** 再敲击 Tab 键, 则完整的路径名 **/usr/local/bin** 就会出现(这里假设没有其他的路径包含 **u**, **lo** 和 **bi** 等字符.). 或者只输入 **cd** 再跟上 Tab 键,则你将看到着色后的路径名的列表 – 这比 Bash 给出的简单的结果好看得多. +> +> Zsh 在大多数的主要发行版本上都可以得到; 安装它后并输入 **zsh** 便可启动它. 要将你的默认 shell 从 Bash 改为 Zsh, 可以使用 **chsh** 命令. 若需了解更多的信息,请访问 [www.zsh.org][2]. + +### "未来" 的终端 ### + +你或许会好奇为什么包含你的命令行提示符的应用被叫做终端. 这需要追溯到 Unix 的早期, 那时人们一般工作在一个多用户的机器上,这个巨大的电脑主机将占据一座建筑中的一个房间, 人们在某些线路的配合下,使用屏幕和键盘来连接到这个主机, 这些终端机通常被称为 "哑终端", 因为它们不能靠自己做任何重要的执行任务 – 它们只展示通过线路从主机传来的信息,并输送回从键盘的敲击中得到的输入信息. + +今天,几乎所有的我们在自己的机器上执行实际的操作,所以我们的电脑不是传统意义下的终端, 这就是为什么诸如 **XTerm**, Gnome Terminal, Konsole 等程序被称为 "终端模拟器" 的原因 – 他们提供了同昔日的物理终端一样的功能.事实上,在许多方面它们并没有改变多少.诚然,现在我们有了反锯齿字体,更好的颜色和点击网址的能力,但总的来说,几十年来我们一直以同样的方式在工作. + +所以某些程序员正尝试改变这个状况. **Terminology** ([http://tinyurl.com/osopjv9][3]), 它来自于超级时髦的 Enlightenment 窗口管理器背后的团队,旨在将终端引入 21 世纪,例如带有在线媒体显示功能.你可以在一个充满图片的目录里输入 **ls** 命令,便可以看到它们的缩略图,或甚至可以直接在你的终端里播放视频. 这使得一个终端有点类似于一个文件管理器,意味着你可以快速地检查媒体文件的内容而不必用另一个应用来打开它们. + +接着还有 Xiki ([www.xiki.org][4]),它自身的描述为 "命令的革新".它就像是一个传统的 shell, 一个 GUI 和一个 wiki 之间的过渡; 你可以在任何地方输入命令,并在后面将它们的输出存储为笔记以作为参考,并可以创建非常强大的自定义命令.用几句话是很能描述它的,所以作者们已经创作了一个视频来展示它的潜力是多么的巨大(请看 **Xiki** 网站的截屏视频部分). + +并且 Xiki 绝不是那种在几个月之内就消亡的昙花一现的项目,作者们成功地进行了一次 Kickstarter 众筹,在七月底已募集到超过 $84,000. 是的,你没有看错 – $84K 来支持一个终端模拟器.这可能是最不寻常的集资活动,因为某些疯狂的家伙已经决定开始创办它们自己的 Linux 杂志 ...... + +### 下一代终端 ### + +许多命令行和基于文本的程序在功能上与它们的 GUI 程序是相同的,并且常常更加快速和高效. 我们的推荐有: +**Irssi** (IRC 客户端); **Mutt** (mail 客户端); **rTorrent** (BitTorrent); **Ranger** (文件管理器); **htop** (进程监视器). 若给定在终端的限制下来进行 Web 浏览, Elinks 确实做的很好,并且对于阅读那些以文字为主的网站例如 Wikipedia 来说,它非常实用. + +> ### 微调配色方案 ### +> +> 在 Linux Voice 中,我们并不迷恋养眼的东西,但当你每天花费几个小时盯着屏幕看东西时,我们确实认识到美学的重要性.我们中的许多人都喜欢调整我们的桌面和窗口管理器来达到完美的效果,调整阴影效果,摆弄不同的配色方案,直到我们 100% 的满意.(然后出于习惯,摆弄更多的东西.) +> +> 但我们倾向于忽视终端窗口,它理应也获得我们的喜爱, 并且在 [http://ciembor.github.io/4bit][5] 你将看到一个极其棒的配色方案设计器,对于所有受欢迎的终端模拟器(**XTerm, Gnome Terminal, Konsole and Xfce4 Terminal are among the apps supported.**),它可以色设定.移动滑动条直到你看到配色方案 norvana, 然后点击位于该页面右上角的 `得到方案` 按钮. +> +> 相似的,假如你在一个文本编辑器,如 Vim 或 Emacs 上花费很多的时间,使用一个精心设计的调色板也是非常值得的. **Solarized at** [http://ethanschoonover.com/solarized][6] 是一个卓越的方案,它不仅漂亮,而且因追求最大的可用性而设计,在其背后有着大量的研究和测试. +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/linux-101-power-up-your-shell-8/ + +作者:[Ben Everard][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/ben_everard/ +[1]:http://tinyurl.com/3gvz4ec +[2]:http://www.zsh.org/ +[3]:http://tinyurl.com/osopjv9 +[4]:http://www.xiki.org/ +[5]:http://ciembor.github.io/4bit +[6]:http://ethanschoonover.com/solarized \ No newline at end of file From 736418a546fd23d88b76e4b291b89565869e269c Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 28 Jun 2015 06:20:00 +0800 Subject: [PATCH 1281/2517] Update 20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇. --- ...Line Tool to Output Rainbow Of Colors in Linux Terminal.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md b/sources/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md index 6b864db6cb..194b295ab9 100644 --- a/sources/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md +++ b/sources/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md @@ -1,3 +1,5 @@ +FSSlc translating + Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal ================================================================================ For those who believe that Linux Command Line is boring and there isn’t any fun, then you’re wrong here are the articles on Linux, that shows how funny and naughty is Linux.. @@ -173,4 +175,4 @@ via: http://www.tecmint.com/lolcat-command-to-output-rainbow-of-colors-in-linux- [1]:http://www.tecmint.com/20-funny-commands-of-linux-or-linux-is-fun-in-terminal/ [2]:http://www.tecmint.com/linux-funny-commands/ [3]:http://www.tecmint.com/play-with-word-and-character-counts-in-linux/ -[4]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ \ No newline at end of file +[4]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ From 46c5c0ca44287245811b017fbfc8c3e637ee3124 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 28 Jun 2015 13:04:57 +0800 Subject: [PATCH 1282/2517] translating --- .../20150623 Linux Kernel 4.1 Released This Is What's New.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md b/sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md index 41058f3210..40eb37e09b 100644 --- a/sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md +++ b/sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md @@ -1,3 +1,5 @@ +translating----geekpi + Linux Kernel 4.1 Released, This Is What’s New ================================================================================ **TuxlogoA brand new version of the Linux Kernel — the heartbeat of the modern world (if we you want us to be poetic about it) — has been released.** @@ -59,4 +61,4 @@ via: http://www.omgubuntu.co.uk/2015/06/linux-4-1-kernel-new-features [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:https://lkml.org/lkml/2015/6/22/8 [2]:http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features -[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D \ No newline at end of file +[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D From 0267a76f1b86a3b4e61d52dda82eda44b0a0d48d Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 28 Jun 2015 13:56:09 +0800 Subject: [PATCH 1283/2517] translated --- ... Kernel 4.1 Released This Is What's New.md | 64 ------------------- ... Kernel 4.1 Released This Is What's New.md | 63 ++++++++++++++++++ 2 files changed, 63 insertions(+), 64 deletions(-) delete mode 100644 sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md create mode 100644 translated/news/20150623 Linux Kernel 4.1 Released This Is What's New.md diff --git a/sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md b/sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md deleted file mode 100644 index 40eb37e09b..0000000000 --- a/sources/news/20150623 Linux Kernel 4.1 Released This Is What's New.md +++ /dev/null @@ -1,64 +0,0 @@ -translating----geekpi - -Linux Kernel 4.1 Released, This Is What’s New -================================================================================ -**TuxlogoA brand new version of the Linux Kernel — the heartbeat of the modern world (if we you want us to be poetic about it) — has been released.** - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/07/Tux-psd3894.jpg) - -The arrival [has been announced][1] by Linus Torvalds (who else?) on the Linux Kernel Mailing List (where else?) and comes almost two months after the [first entry in the new 4.x series][2]. - -Levity aside, and like every release before it, Linux Kernel 4.1 features a big set of changes. These touch everything from hardware compatibility to power management to file-system performance and technical fixes for obscure processors you’ve never heard of. - -Linux 4.1 is already being tracked in Ubuntu 15.10, due for release in October. - -### What’s New In Linux 4.1? ### - -![Tux got mail](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/linux-kernel-4-11-350x200.jpg) -Tux got mail - -The sub-heading is on your lips and we’re not here simply to serve up an announcement of an announcement. - -We’ve gone through the (vast, long, lengthy and at times technically unintelligible) change-log to pick out some highlights that may not feed hyperbole but may impact on you, a desktop users. - -#### Power Improvements #### - -The big headline user-facing feature you’ll find in Linux 4.1 are the wealth of performance and power efficiency improvements committed for Intel’s Cherry Trail and Bay Trail chips. SoCs and devices, such as the Intel Compute Stick. - -Anecdotal suggestions are that Linux Kernel 4.1 gives select combinations of newer Intel hardware as much as an extra hour of battery life. Such high gains are not likely to apply to anything but a very specific sub-set of chips and systems (and high-end ones at that) but it’s still exciting to hear of. - -**Highlights of Linux 4.1 include:** - -- EXT4 gains file-system level encryption (thanks to Google) -- Logitech lg4ff driver improves ‘force feedback’ for gaming wheels -- Toshiba laptop driver gains USB sleep charging and backlight improvements -- Rumble support for Xbox One controller -- Better battery reporting in Wacom tablet driver -- Various misc. power improvements for both ARM and x86 devices -- Samsung Exynos 3250 power management improvements -- Support for the Bamboo Pad -- Lenovo OneLink Pro Dock gains USB support -- Support for Realtek 8723A, 8723B, 8761A, 8821 Wi-Fi cards - -### Install Linux Kernel 4.1 on Ubuntu ### - -Although this release of the kernel is classed as stable there is no pressing need for Ubuntu desktop users to go out of their way to install it. - -Not that you can’t; if you’re impatient and skilled enough to do so you can take a crack at installing Linux 4.1 on Ubuntu by grabbing the appropriate set of packages from [Canonical’s mainline kernel archive][3] (or by risking a third-party PPA). - -Ubuntu 15.10 Wily Werewolf, due for release in October, is to be based on the Ubuntu Kernel 4.1.x (the Ubuntu kernel is the Linux Kernel plus Ubuntu-specific patches that have not been accepted upstream). - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/06/linux-4-1-kernel-new-features - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://lkml.org/lkml/2015/6/22/8 -[2]:http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features -[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D diff --git a/translated/news/20150623 Linux Kernel 4.1 Released This Is What's New.md b/translated/news/20150623 Linux Kernel 4.1 Released This Is What's New.md new file mode 100644 index 0000000000..11b9c10a26 --- /dev/null +++ b/translated/news/20150623 Linux Kernel 4.1 Released This Is What's New.md @@ -0,0 +1,63 @@ +Linux 4.1 发布了,下面是有哪些新的 +================================================================================ +**TuxlogoA brand new version of the Linux Kernel — the heartbeat of the modern world (if we you want us to be poetic about it) — has been released.** +**一个心的Linux内核 - 现代世界的心跳(如果我们想要让它充满诗意)已经发布了** + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/07/Tux-psd3894.jpg) + +Linus Torvalds(还有谁?)在Linux邮件列表(还有哪里)中[宣布了][1]内核发布,同事也是大概两个月后迎来了[第一个4.x系列的发布][2]。 + +快速之外,像每次发布前那样,Linux 4.1带来了很大的改变。它从硬件兼容性到电源管理到文件系统性能到和你从没听说过的处理器的技术修复。 + +Linux 4.1 已经进入Ubuntu 15.10, 将在10月发布。 + +### Linux 4.1 有哪些新的 ### + +![Tux got mail](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/linux-kernel-4-11-350x200.jpg) +Tux邮件 + +子标题在嘴上,我们不会简单地就宣布公告。 + +我们从(大量冗长的及不能理解的技术)更改日志去挑选一些对桌面用户而言,不见得夸张但或许有用的亮点。 + +#### 电源管理 #### + +你在Linux 4.1中面向用户的一大特性是对Intel Cherry Trail 和 Bay Trai 芯片的丰富性能以及电源效率的提升。Soc设备,如Intel计算棒。 + +传闻建议是Linux 4.1给出了新的Intel硬件组合,和更长电池守密。这么高的受益不可能针对任何芯片,它只对特定芯片和系统(和高端的)有用,但仍旧是一个令人兴奋的消息。 + +**Linux 4.1 亮点包括:** + +- ext4获得了文件系统层面的加密(感谢Google) +- 罗技游戏手柄lg4ff驱动提升‘力量反馈’ +- 东芝笔记本驱动获得USB睡眠充电和背光提升 +- Xbox One控制器支持 +- Wacom平板中更好的电源报告驱动 +- 不同的杂项。arm和x86设备电源管理提升 +- Samsung Exynos 3250 电源管理 +- 支持Bamboo屏板 +- 联想OneLink Pro Dock获得USB支持 +- 支持Realtek 8723A、 8723B、 8761A、 8821 Wi-Fi网卡 + +### Ubuntu中安装Linux 4.1 ### + +虽然这次发布的内核被标记为稳定,但是Ubuntu用户没有迫切需要区安装它。 + +如果你等不及了并且技术足够熟练,你可以从[Canonical的主流内核归档][3]中下载合适的来安装Linux 4.1(或者冒着风险使用第三方PPA)。 + +10月发布的Ubuntu 15.10 Wily Werewolf将会基于Ubuntu Kernel 4.1.x(Ubuntu内核是基于Linux内核加上Ubuntu没被上流接受的独有补丁)。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/06/linux-4-1-kernel-new-features + +作者:[Joey-Elijah Sneddon][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://lkml.org/lkml/2015/6/22/8 +[2]:http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features +[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D From ed59ef7a3e0ae4241a17985f73f48a5233fd087c Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sun, 28 Jun 2015 15:02:59 +0800 Subject: [PATCH 1284/2517] translated 75% --- ...ll be the future of Linux without Linus.md | 188 ++++++------------ 1 file changed, 59 insertions(+), 129 deletions(-) diff --git a/sources/talk/20150618 What will be the future of Linux without Linus.md b/sources/talk/20150618 What will be the future of Linux without Linus.md index 92b9e9ee4d..09cd64b647 100644 --- a/sources/talk/20150618 What will be the future of Linux without Linus.md +++ b/sources/talk/20150618 What will be the future of Linux without Linus.md @@ -1,186 +1,116 @@ -translating wi-cuckoo -What will be the future of Linux without Linus? -================================================================================ -![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/06/linus-torvalds-painting.jpg) +没有Linus,Linux的未来是什么样子? +============================================================================== +![](http://i2.wp.com/www.linuxveda.com/wp—content/uploads/2015/06/linus—torvalds—painting.jpg) -The interview was conducted back in 2007 for Linux For You magazine and we are publishing it here for archival purposes. +这次采访是 Linux For You 杂志在2007年进行的,现在我们发表在这里是为了存档的目的。 -**Q: What are the future enhancements/paths/plans for the Linux kernel?** +**Q:对于Linux内核,未来的计划/道路/强化是怎样的?** -Linus: I’ve never been much of a visionary — instead of looking at huge plans for the future, I tend to have a rather short time frame of ‘issues in the next few months’. I’m a big believer in that the ‘details’ matter, and if you take care of the details, the big issues will end up sorting themselves out on their own. +Linus:我从来没有太多的预见性 — 与其从宏大的计划上看未来,我倾向于从一个相对短的时间框架,比如“几个月之后的事情”。我是一个忠实的‘细节成败论’的信仰者,如果你抓住了细节,大的事情也会大事化小,小事化没。 -So I really don’t have any great vision for what the kernel will look like in five years — just a very general plan to make sure that we keep our eye on the ball. In fact, when it comes to me personally, one of the things I worry about the most isn’t even the technical issues, but making sure that the ‘process’ works, and that people can work well with each other. +所以,对于五年后内核会是什么样,我真的没有任何大眼光 — 仅仅是一个非常普遍的计划,确保我们对其保持关注。实际上,对于我个人来说,我最担心的事情之一甚至不是技术问题,而是确保‘进程’工作,这样人们才可以相互协作好。 -**Q: How do you see the relationship of Linux and Solaris evolving in the future? How will it benefit the users? ** +**Q:你怎么看Linux和Solaris之间的关系在未来的发展?它会如何使用户受益?** -Linus: I don’t actually see a whole lot of overlap, except that I think Solaris will start using more of the Linux user space tools (which I obviously don’t personally have a lot to do with — I really only do the kernel). The Linux desktop is just so much better than what traditional Solaris has, and I expect Solaris to move more and more towards a more Linux-like model there. +Linus:我并不能看到整个重叠的地方,除了我认为Solaris会开始使用更过Linux用户磁盘工具(显然我自己来说没有太多关注这个 — 我真的只关心内核)。Linux的桌面比起传统Solaris拥有的好多了,而且我希望Solaris移植越来越多的Linux的东西,朝着一个更加类Linux的模型前进。 -On the pure kernel side, the licensing differences mean that there’s not much cooperation, but it will be very interesting to see if that will change. Sun has been making noises about licensing Solaris under the GPL (either v2 or v3), and if the licence differences go away, that could result in some interesting technology. But I’m taking a wait-and-see attitude to that. +从纯内核方面讲,证书的差异意味着没有太多的合作,但是如果看到这种情况改变会很有趣。Sun已经声明在GPL(v2或v3)下授权Solaris,如果这种证书差异消失,那么会导致一些有趣的技术出现。但对此,我持待见态度。 -**Q: Now that the GPLv3 has been finalised and released, do you foresee any circumstance that would encourage you to begin moving the kernel to it? Or, from your perspective, is it so bad that you would never consider it?** +**Q:现在GPL v3已经完成并发布了,你是否预见有任何情况会激起你开始移植内核到Solaris上去?或者,从你的角度看,它是否很糟糕以至于你从来没考虑过他?** -Linus: I think it is much improved over the early drafts, and I don’t think it’s a horrible licence. I just don’t think it’s the same kind of ‘great’ licence that the GPLv2 is. +Linus:我觉得相比于早先的草稿,v3有了很多提高,并且我也认为它不是一个糟糕的证书。我只是认为它没有GPLv2一般的‘伟大’。 -So in the absence of the GPLv2, I could see myself using the GPLv3. But since I have a better choice, why should I? +所以,由于没有了GPLv2,我会看见自己将会使用GPLv3。但是,自从我有了一个更好的选择,我为什么不应该考虑一下呢? -That said, I try to always be pragmatic, and the fact that I think the GPLv3 is not as good a licence as the GPLv2 is not a ‘black and white’ question. It’s a balancing act. And if there are other advantages to the GPLv3, maybe those other advantages would be big enough to tilt the balance in favour of the GPLv3. +这就是说,我努力保持实用主义精神,并且我认为GPLv3比起GPLv2不是一个好证书这件事不是一个‘黑与白’的问题。这是一个平衡做法。如果GPLv3有其他的优点,可能那些优点会在很大程度上倾斜喜爱GPLv3的天平。 -Quite frankly, I don’t really see any, but if Solaris really is to be released under the GPLv3, maybe the advantage of avoiding unnecessary non-compatible licence issues could be enough of an advantage that it might be worth trying to re-license the Linux kernel under the GPLv3 too. +恕我直言,我并没有看到任何优点,但是如果Solaris真的在GPLv3下发布,可能避免不必要的不兼容证书这条足够称为一个优点,可能也会值得去尝试重新许可Linux的内核放在GPLv3下。 -Don’t get me wrong — I think it’s unlikely. But I do want to make it clear that I’m not a licence bigot, per se. I think the GPLv2 is clearly the better licence, but licences aren’t everything. +不要误解我 — 我认为这是不大可能的。但是我确实想澄清我本质上不是一个证书偏执者。我认为GPLv2是毫无疑问的好证书,但是证书不是一切。 -After all, I use a lot of programs that are under other licences. I might not put a project I start myself under the BSD (or the X11-MIT) licence, but I think it’s a great licence, and for other projects it may well be the right one. +总的来说,我使用很多其他证书下的程序。我可能没有把我自己做的一个项目放在BSD(或X11—MIT)证书下,但是我认为它是一个伟大的证书,对于其他项目来说,它可能是最佳的选择。 -**Q: Currently are there any Indians who you’d like to highlight as key contributors to the Linux kernel?** +**Q:目前有没有任何印度人,你想特别提出作为Linux内核的关键贡献者?** -Linus: I have to admit that I don’t directly work with anybody that I actually realise as being from India. That said, I should clarify a bit: I’ve very consciously tried to set up the kernel development so that I don’t end up working personally with a huge number of people. +Linus:我不得不承认,我并没有与实际认识的来自印度的任何人直接工作。那就是说,我应该稍微澄清下:我已经非常有意识地努力建立一个规模庞大的内核开发团队,这样我不用以独自地工作而告终。 -I have this strong conviction that most humans are basically wired up to know a few people really well (your close family and friends), and I’ve tried to make the development model reflect that: with a ‘network of developers’, where people interact with maybe a dozen other people they trust, and those other people in turn interact with ‘their’ set of people they trust. +我非常相信大多数人基本上被束缚起来了,只对很少的人十分了解(你最亲近的家人和朋友),我也努力构造这样一个开发模型影响这种状况:通过一个‘开发者网络’,人们可以在此互动,可能是与一批你信任的人,而且那些人反过来与他们信任的一群人互动。 -So while I’m in occasional contact with hundreds of developers who send me a random patch or two, I’ve tried to set up an environment where the bulk of what I do happens through a much smaller set of people that I know, just because I think that’s how people work. It’s certainly how I like to work. +所以,当我偶然与上百个开发者联系,他们发给我一两个随机的补丁,我已经努力去建立这样一个环境,在这里我做的一堆事,发生在我熟知的人组成的一个较小的集合间,仅仅因为我认为那就是人们工作的方式。当然也是我喜欢工作的方式。 -Also, in all honesty, I don’t even know where a lot of the people I work with live. Location ends up being pretty secondary. So while I’m pretty sure that none of the top 10-15 I work with most closely, are in India, maybe after this goes public, it might get pointed out that there is actually somebody from there! +同时,坦白地说,我甚至不知道许多与我一起工作的人生活在哪里。位置成了十分次要的东西。所以我很确信与我工作最亲密的前10—15个人中,没有印度的,可能这话稍后传到公众耳里,然后被指出确实有一些人来自那里! -**Q: Since the Linux Kernel Development depends so heavily on you, how do you plan to organise/reorganise it for it to continue progressing without you, in case you decide to dedicate more time to your own life and family?** +**Q:自从Linux的内核开发对你依赖如此严重以来,你如何计划组织/重组,让它在没有你的情况下继续发展,假设你决定花更多的时间在你自己的生活和家庭上面?** -Linus: I’ve long since come to the realisation that Linux is much bigger than me. Yes, I’m intimately involved in it still, and I have a fairly large day-to-day impact on it, and I end up being the person who, in some sense, acts as the central point for a lot of kernel activities; but no — I wouldn’t say that Linux ‘depends heavily’ on me. +Linus:现在Linux比我大得多了,为了这个实现我已经工作了很长时间。是的,我仍然十分亲切地身在其中,而且我对其有着想当大的日常影响,我最终会是这样一个人,在某种程度上,扮演着许多内核开发活跃者的中心点的角色;但是 — 我不会说Linux“严重依赖”于我。 -So if I had a heart attack and died tomorrow (happily not likely: I’m apparently healthy as anything), people would certainly notice, but there are thousands of people involved in just the kernel, and there’re more than a few that could take over for me with little real confusion. +所以,如果我得了心脏病并且明天就死了(很高兴没这种可能:我显然在任何方面都还健康),人们肯定会注意到,但是有成千上万的人为内核工作,并且不止一两个人能够接替我,还少有困惑。 -**Q: India is one of the major producers of software engineers, yet we don’t contribute much to the Linux domain. What do you think is keeping Indians from becoming proactive on that front? How do you feel we could encourage Indians to get involved and contribute heavily? You have a fan following in India; could your iconic image be used to inspire enthusiasts?** +**Q:印度是软件工程师的主要产地之一,当然我们没有在Linux领域做太多贡献。你觉得什么是保持印度人在Linux领域变得具有前瞻性的?如果我们鼓励印度人参与并为Linux做很大的贡献,你觉得如何?假如你有一个在印度的粉丝;你会用你的形象来启迪那些爱好者吗?** -Linus: This is actually a very hard question for me to answer. Getting into open source is such a complicated combination of both infrastructure (Internet access, education, you name it), flow of information and simply culture that I can’t even begin to guess what the biggest stumbling block could be. +Linus:对我来说,这确实是一个不好回答的问题。进入开源是如此一个底层结构(网络接入,教育,你说的),信息流和简单的文化的复杂组合,我甚至不能去猜测最大的障碍会是什么。 -In many ways, at least those with an English-speaking culture in India should have a rather easy time getting involved with Linux and other open source projects, if only thanks to the lack of a language barrier. Certainly much easier than many parts of Asia or even some parts of Europe. +在很多方面,至少那些在印度含英语文化的地方,应该有一个相对容易的方式参与Linux和其他开源项目,如果仅仅是由于语言门槛的话。当然比起亚洲的许多地方,甚至欧洲的一些地方要容易些。 -Of course, while that is a lot of people, it’s equally obviously not the majority in India, and I personally simply don’t know enough about the issues in India to be able to make an even half-way intelligent guess about what the best way forward is. I suspect that an enthusiastic local user community is always the best way, and I think you do have that. +当然,有一些人,并不等同于印度的大部分群体,而且我自己关于印度的情况也知道不多,甚至没法做出一点半路聪明猜测最好的前路是什么。我猜一个热情的本地用户社区一直是最好的途径,我认为你们已经拥有这样的社区了。 -As to my ‘iconic image’, I tend to dislike that part personally. I’m not a great public speaker, and I’ve avoided travelling for the last several years because I’m not very comfortable being seen as this iconic ‘visionary’. I’m just an engineer, and I just happen to love doing what I do, and to work with other people in public. +至于我的‘形象’,我自己不以为然。我不是一个伟大的公众演讲者,而且我最近些年已经避免出游,因为被看做符号‘形象’让我很不自在。我就是一个工程师而已,而且我仅仅是喜欢我做的事情,并与社会上其他人一起工作。 -**Q: What would be a good reason for you to consider visiting India?** +**Q:什么样的理由会让你考虑去看看印度?** -Linus: As mentioned in the first answer, I absolutely detest public speaking, so I tend to avoid conferences, etc. I’d love to go to India for a vacation some day, but if I do, I’d likely just do it incognito — not tell anybody beforehand and just go as a tourist to see the country! +Linus:如第一个回答中提到,我完全地讨厌公开演讲,所以我才想避免开会等等这些事。我更愿意某天去印度度个假,但是如果我这样做,我可能悄悄地干 — 出行之前不告诉任何人,仅仅作为一个游客去游览印度! -**Q: Recently, you seemed to slam Subversion and CVS, questioning their basic architecture. Now that you’ve got responses from the Subversion community, do you stand corrected, or are you still unconvinced?** +**Q:最近,你好像在抨击Subversion与CVS,质问他们的基础架构。现在你已经从Subversion和CVS社区那里得到回应,你仍然在坚持自己正确,或者没有被说服吗?** -Linus: I like making strong statements, because I find the discussion interesting. In other words, I actually tend to ‘like’ arguing. Not mindlessly, but I certainly tend to prefer the discussion a bit more heated, and not just entirely platonic. +Linus:因为我发现这个争论很有趣,所以我想做一个强硬的声明。换句话说,我确实‘喜欢’争论。并不是不经思考的,但是我确实想要让争论更热烈些,而不仅仅是完全的柏拉图式的。 -And making strong arguments occasionally ends up resulting in a very valid rebuttal, and then I’ll happily say: “Oh, ok, you’re right.” +做出强硬的争论有时会导致一个非常合理的反驳,然后我会很高兴地说:“噢,好吧,你是对的。” -But no, that didn’t happen on SVN/CVS. I suspect a lot of people really don’t much like CVS, so I didn’t really even expect anybody to argue that CVS was really anything but a legacy system. And while I’ve gotten a few people who argued that I shouldn’t have been quite so impolite against SVN (and hey, that’s fair — I’m really not a very polite person!), I don’t think anybody actually argued that SVN was ‘good’. +但是话说回来,对SVN/CVS并不会发生这种情况。我怀疑很多人真的不是很喜欢CVS,所以我真的不期望任何人去坚持CVS是一切,而不是一个老旧的系统。当我知道少数人确实这样争论了,我之前就不该那么不礼貌地反对SVN(嘿,这是公平的 — 我真的不是一个非常礼貌的家伙!),我认为不是任何人都可以争论SVN是‘好的’。 -SVN is, I think, a classic case of ‘good enough’. It’s what people are used to, and it’s ‘good enough’ to be used fairly widely, but it’s good enough in exactly the sense DOS and Windows were ‘good enough’. Not great technology, just very widely available, and it works well enough for people and looks familiar enough that people use it. But very few people are ‘proud’ of it, or excited about it. +我认为,SVN就是一个‘好过头’的经典案例。人们过去经常使用SVN,并且它也‘很好’,用途广泛,但是它的好过头完全如DOS与Windows也‘好过头’一样。不是什么伟大的技术,只是普遍适用而已,同时它对人们来说运行良好,看着十分熟悉。但是很少有人以此为傲,或者对其有兴奋感。 -Git, on the other hand, has some of the ‘UNIX philosophy’ behind it. Not that it is about UNIX, per se, but like original UNIX, it had a fundamental idea behind it. For UNIX, the underlying philosophy was/is that, “Everything is a file.” For git, it’s, Everything is just an object in the content-addressable database.” +Git,从另外方面讲,其身后有一些‘UNIX 哲学’。它不是关于UNIX,实质上,是像原始的UNIX,它身后有一个基础的想法。对UNIX来说,最底层的哲学就是,“所有东西只是一个文件”。对Git来说,“则是每个东西仅仅是内容寻址数据库中的一个对像”。 -**Q: Is having so many distros a good or bad idea? Choice is fine, but one does not need to be pampered with choices. Instead of so many man hours being spent in building hundreds of distros, wouldn’t it be easier to get into the enterprise and take on the MS challenge if people could come together and support fewer distros (1 for each use maybe)? What’s your view on that?** +**Q:现在如此多的发行是好事还是坏事?选择是很有意思的,但是没有人需要被选择给撑着。相较于这么多的人每天花费数小时去构建成百上千的发行版,如果人们可以一起来支持少数的发行版(可能每一个有一个人),这样进入企业,接受微软的挑战是不是更容易些呢?对此你怎么看?** -Linus: I think having multiple distros is an inevitable part of open source. And can it be confusing? Sure. Can it be inefficient? Yes. But I’d just like to compare it to politics: ‘democracy’ has all those confusing choices, and often none of the choices is necessarily what you ‘really’ want either, and sometimes you might feel like things would be smoother and more efficient if you didn’t have to worry about the whole confusion of voting, different parties, coalitions, etc. +Linus:我认为多发行版是开源不可回避的部分。它会造成困惑吗?当然。它会变得低效率吗?是的。但是我喜欢拿它与政治比较:’民主‘也有那些令人困惑的选择,通常没有选择是必须的,或者你‘真正’想要的。而且有时候,如果你不需要担心选举,不同党派和联合等等方面的困惑的话,你可能喜欢事情更加容易一些,更有效率一些。 -But in the end, choice may be inefficient, but it’s also what keeps everybody involved at least ‘somewhat’ honest. We all probably wish our politicians were more honest than they are, and we all probably wish that the different distros sometimes made other choices than they do, but without that choice, we’d be worse off. +但是最后我想说,选择可能会导致低效率,但是它也让每个人至少保留了‘所谓的’诚信。我们可能都希望我们的政治家比过去更诚信,我们也希望不同的发行版有一天做出其他的选择,但是没有那种选择的话,事情可能会更糟。 -**Q: Why do you think CFS is better than SD?** +**Q:为什么你觉得CFS比SD更好?** -Linus: Part of it is that I have worked with Ingo [Molnar] for a long time, which means that I know him, and know that he’ll be very responsive to any issues that come up. That kind of thing is very important. +Linus:一部分原因是我与Ingo[Molnar]工作你很长一段时间,这就是说,我了解他,并且知道他会对发生的任何事情非常负责。那种品质是非常重要的。 -But part of it is simply about numbers. Most people out there actually say that CFS is better than SD. Including, very much, on 3D games (which people claimed was a strong point of SD). +但是一部分原因就简单的与用户有关。其他地方的大多数人实际上表示CFS比SD好。包括许多3D游戏方面(这是人们声称SD最强的一点)。 -At the same time, though, I don’t think any piece of code is ever ”perfect”. The best thing to happen is that the people who want to be proponents of SD will try to improve that so much that the balance tips over the other way — and we’ll keep both camps trying interesting things because the internal competition motivates them. +同时,尽管如此,我认为并不是代码的任何一段都十分‘完美’。最好的情况是想成为SD支持者的人会努力提高SD,使得平衡会倾覆其他方面 — 而我们会保持两个阵营都尝试有趣的事情,因为内部的竞争会刺激他们。 -**Q: In a talk you had at Google about git, someone asked you how you would take an extremely large code base that is currently handled with something centralised and transition to git without stopping business for six months. What was your response to that?** +**Q:在Google一次关于Git的访谈中,有人问你如何会停止六个月的商业活动,为git编写了一个目前由一些中心化的东西和交易管理的,特别庞大的代码基础。你对此的回答是什么?** -Linus: Ahh. That was the question where I couldn’t hear the questioner well (the questions were much more audible in the recordings), and I noticed afterwards, when I went back and listened to the recorded audio, that I didn’t answer the question he asked, but the question I thought he’d asked. +Linus:啊哈。那个问题我在现场没有听清楚(在录制结果里,问题会听得更清楚些),当我回头去听录制的音频,注意到了我没有回答他的问题,但是我觉得这问题他问过。 -Anyway, we do have lots of import tools, so that you can actually just import a large project from just about any other previous SCM into git. But the problem, of course, often doesn’t end up being the act of importing itself, but just having to ‘get used to’ the new model! +无论如何,我们确实有很多导入的工具,所以你实际上可以仅仅是从任何其他的早期SCM导入一个大工程到git里,但问题显然不是经常以导入动作本身结束,而是需要‘习惯’这种新模式! -And quite frankly, I don’t think there is any other answer to that ‘get used to it’ but to just start out and try it. You obviously do not want to start out by importing the biggest and most central project you have; that would indeed just make everything come to a standstill, and make everybody very unhappy indeed. +坦白来说,我认为关于‘习惯它’没有任何其他答案,而只是去开始使用和尝试它。显然,你不想以导入你现有的最大且最中心的项目为开端;那确实会使每件事出现停顿,然后使得每个人都很不高兴。 -So nobody sane would advocate moving everything over to git overnight, and forcing people to change their environment. No. You’d start with a smaller project inside a company, perhaps something that just one group mostly controls and maintains, and start off by converting that to git. That way you get people used to the model, and you start having a core group with the knowledge about how git works and how to use it within the company. +所以没有理智健全的人会一夜之间拥护将一切移到git上去,并强迫人们改变他们的环境。是的,你需要以公司里的小项目开始,可能是一些一个组主要控制和维护的项目,然后开始转移其到git。这是你能让人们习惯这种模式的方式,你开始有一个核心的组,知道git如何工作,如何在公司里面使用它。 -And then you just extend on that. Not in one go. You’d import more and more of the projects — even if you have the ‘one big repository’ model at your company; you also almost certainly have that repository as a set of modules, because having everybody check out everything is just not a workable mode of operation (unless ‘everything’ is just not very large). +接着,你就会铺展开来。并不一次就位。你会导入越来越多的项目 — 如果在你公司里你有‘一个大仓库’;你也会差不多确定将那个仓库作为许多模块的集合,因为让每个人去检查每件事不是一个可执行的工作模型(除非‘每件事’并不非常大)。 -So you’d basically migrate one module at a time, until you get to the point where you’re so comfortable with git that you can just migrate the rest (or the ‘rest’ is so legacy that nobody even cares). +所以,你基本上有一次转移了一个模块,直到你发现你使用git如此舒服的那个点,你可以移植余下的所有(或者‘余下’太传统了,没人会关心)。 -And one of the nice features of git is that it actually plays along pretty well with a lot of other SCMs. That’s how a lot of git users use it: ‘they’ may use git, but sometimes the people they work with don’t even realise, because they see the results of it propagated into some legacy SCM. +Git最赞的一个功能是,它实际上可以同很多其他SCM相处很好。这就是很多git用户使用它的时候:‘他们’可能只是使用git,但有时候与他们一起工作的人并没有发现,因为他们看到git的结果,联想到一些传统的SCM上去。 -**Q: Did they ever experiment with alternate instruction set implementations at Transmeta? [Transmeta Crusoe chip seemed like a very soft CPU — reminding one of Burroughs B1000 interpretive machine, which actually implemented multiple virtual machines. There was one for system software, another for Cobol, another for Fortran; If that is correct, then one could implement Burroughs 6/7000 or HP3000 like stack architecture on the chip or an instruction set suitable for JVM, etc]** +**Q:在Transmeta,他们曾经经历过用另外的架构设置部署吗?[Transmeta Crusoe的芯片看起来像一个非常软的CPU — 提到一台Burroughs B1000的解释机器,这实际上部署了多台虚拟机。有一台是用于系统软件,一台是用于Cobol,一台用于Fortran;如果上述正确,那么一个人可以部署Burroughs 6/7000或者HP3000,如栈结构一样,在芯片上或者一个适合JVM的结构集合等等。]** -Linus: We did indeed have some alternate instruction set, and while I still am not really supposed to talk about it, I can say that we did have a public demonstration of mixing instruction sets. We had a technology showcase where you could run x86 instructions side-by-side with Java byte code (actually, it was a slightly extended pico-java, iirc). +Linus:我们确实有一些备选的结构集合,我仍然不打算谈论这个,我可以说我们已经做了一个混合结构集合的公开证明。我们有一个技术宝箱,在那里你同时可以跑x86结构和Java字节码(实际上,它是一个轻量的扩展pico—java,iirc)。 -I think the app we showed running was running DOOM on top of Linux, where the Linux parts were a totally standard x86 distribution, but the DOOM binary was a specially compiled version where part of the game was actually compiled pico-Java. And the CPU ended up running them both the same way — as a JIT down to the native VLIW instruction set. +(选择DOOM的原因仅仅是其源代码可用,并且游戏的核心部分非常小,足以很容易拿它来做一个验证 — 而且它也显然看起来十分有趣。) -(The reason for picking DOOM was just that source code was available, and the core parts of the game were small enough that it was easy to set it up as a demonstration — and it was obviously visually interesting.) +有更多的事情是在内部运作,但是我不能谈论他们。而且实际上,就我个人而言,对Java不怎么感冒。 -There were more things going on internally, but I can’t really talk about them. And I wasn’t actually personally involved with the Java one either. +**Q:386BSD衍生了NetBSD,FreeBSD和OpenBSD,在Linux出现之前已经发展不错了,但是Linux传播比386BSD及其衍生者更为广泛。这在多大程度上左右你对证书的选择,和你选择的发展过程?你不认为比起GPLv2来,是GPLv3保护了自由,孕育了Linux比BSD更好,直到现在?** -**Q: 386BSD, from which NetBSD, FreeBSD and OpenBSD were derived, was there well before Linux, but Linux spread much more than 386BSD and its derivatives. How much of this do you attribute to the choice of the licence and how much to the development process you chose? Don’t you think that the GPLv3 protects the freedom that has bred Linux better than the BSDs till now, more than the GPLv2 can?** +Linus: -Linus: I think there’s both a licence issue, and a community and personality issue. The BSD licences always encouraged forking, but also meant that if somebody gets really successful and makes a commercial fork, you cannot necessarily join back. And so even if that doesn’t actually happen (and it did, in the BSD cases — with BSDi), people can’t really ‘trust’ each other as much. - -In contrast, the GPLv2 also encourages forking, but it not only encourages the branching off part, it also encourages (and ‘requires’) the ability to merge back again. So now you have a whole new level of trust: you ‘know’ that everybody involved will be bound by the licence, and won’t try to take advantage of you. - -So I see the GPLv2 as the licence that allows people the maximum possible freedom within the requirement that you can always join back together again from either side. Nobody can stop you from taking the improvements to the source code. - -So is the BSD licence even more ‘free’? Yes. Unquestionably. But I just wouldn’t want to use the BSD licence for any project I care about, because I not only want the freedom, I also want the trust so that I can always use the code that others write for my projects. - -So to me, the GPLv2 ends up being a wonderful balance of ‘as free as you can make it’, considering that I do want everybody to be able to trust so that they can always get the source code and use it. - -Which is why I think the GPLv3 ends up being a much less interesting licence. It’s no longer about that trust about “getting the source code back”; it has degenerated into a “I wrote the code, so I should be able to control how you use it.” - -In other words, I just think the GPLv3 is too petty and selfish. I think the GPLv2 has a great balance between ‘freedom’ and ‘trust’. It’s not as free as the BSD licences are, but it gives you peace of mind in return, and matches what I consider ‘tit-for-tat': I give source code, you give me source code in return. - -The GPLv3 tries to control the ‘use’ of that source code. Now it’s, “I give you my source code, so if you use it, you’d better make your devices hackable by me.” See? Petty and small-minded, in my opinion. - -**Q: Slowly but steadily, features of the -rt tree are getting integrated into the mainline. What are your current thoughts regarding a merger of the remaining -rt tree into the mainline (and I’m not talking about the CFS)?** - -Linus: I won’t guarantee that everything from -rt will ‘ever’ be merged into the standard kernel (there may be pieces that simply don’t end up making sense in the generic kernel), but yes, over the years we’ve actually integrated most of it, and the remaining parts could end up making it one of these days. - -I’m a big fan of low-latency work, but at the same time I’m pretty conservative, and I pushed back on some of the more aggressive merging, just because I want to make sure that it all makes sense for not just some extreme real time perspective, but also for ‘normal’ users who don’t need it. And that explains why the process has been a pretty slow but steady trickle of code that has gotten merged, as it was sufficiently stable and made sense. - -That, by the way, is not just an -rt thing; it’s how a lot of the development happens. -rt just happens to be one of the more ‘directed’ kernel projects, and one where the main developer is pretty directly involved with the normal kernel too. But quite often the migration of other features (security, virtual memory changes, virtualisation, etc) follows a similar path: they get written up in a very targeted environment, and then pieces of the features get slowly but surely merged into the standard kernel. - -**Q: I’m very curious about what the future holds for file systems in the kernel. What do you think about Reiser4, XFS4, ZFS and the new project founded by Oracle? ZFS has been receiving a lot of press these days. Reiser4 delivers very good benchmarks, and xfs4 is trying to keep up, whereas the one by Oracle has a lot of the same specs as Sun’s ZFS. Where are we heading? Which FS looks the most promising in your opinion?** - -Linus: Actually, just yesterday we had a git performance issue, where ZFS was orders of magnitude slower than UFS for one user (not under Linux, but git is gaining a lot of traction even outside of kernel development). So I think a lot of the ‘new file system’ mania is partly fed by knowing about the issues with old file systems, and then the (somewhat unrealistic) expectation that a ‘new and improved’ file system will make everything perfect. - -In the end, this is one area where you just let people fight it out. See who comes out the winner — and it doesn’t need to be (and likely will not) be a single winner. Almost always, the right choice of file system ends up depending on the load and circumstances. - -One thing that I’m personally more excited about than any of the file systems you mention is actually the fact that Flash-based hard disks are quickly becoming available even for ‘normal’ users. Sure, they’re still expensive (and fairly small), but Flash-based storage has such a different performance profile from rotating media, that I suspect that it will end up having a large impact on file system design. Right now, most file systems tend to be designed with the latencies of rotating media in mind. - -**Q: The operating system is becoming less and less important. You have said several times that the user is not supposed to ‘see’ the operating system at all. It is the applications that matter. Browser-based applications, like Google’s basic office applications, are making an impact. Where do you think operating systems are headed?** - -Linus: I don’t really believe in the ‘browser OS’, because I think that people will always want to do some things locally. It might be about security, or simply about privacy reasons. And while connectivity is widely available, it certainly isn’t ‘everywhere’. - -So I think the whole ‘Web OS’ certainly is part of the truth, but another part that people seem to dismiss is that operating systems have been around for decades, and it’s really a fairly stable and well-known area of endeavour. People really shouldn’t expect the OS to magically change: it’s not like people were ‘stupid’ back in the 60s either, or even that hardware was ‘that’ fundamentally different back then! - -So don’t expect a revolution. I think OSs will largely continue to do what they do, and while we’ll certainly evolve, I don’t think they’ll change radically. What may change radically are the interfaces and the things you do on top of the OS (and certainly the hardware beneath the OS will continue to evolve too), and that’s what people obviously care about. - -The OS? It’s just that hidden thing that makes it all possible. You really shouldn’t care about it, unless you find it very interesting to know what is really going on in the machine. - -**Q: The last I heard, you were using a PPC G4/5 for your main personal machine — what are you using now, and why?** - -Linus: I ended up giving up on the PowerPC, since nobody is doing any workstations any more, and especially since x86-64 has become such an undeniable powerhouse. So these days, I run a bog-standard PC, with a normal Core 2 Duo on it. - -It was a lot of fun to run another architecture (I ran with alpha as my main architecture way back then, for a few years, so it wasn’t the first time either), but commodity CPUs is where it is at. The only thing that I think can really ever displace the x86 architecture would come from below, i.e., if something makes us not use x86 as our main ISA in a decade, I think it would be ARM, thanks to the mobile device market. - -**Q: What does Linux mean to you — a hobby, philosophy, the meaning of life, a job, the best OS, something else…?** - -Linus: It’s some of all of that. It’s a hobby, but a deeply meaningful one. The best hobbies are the ones that you care ‘really’ deeply about. And these days it’s obviously also my work, and I’m very happy to be able to combine it all. - -I don’t know about a ‘philosophy’, and I don’t really do Linux for any really deeply held moral or philosophical reasons (I literally do it because it’s interesting and fun), but it’s certainly the case that I have come to appreciate the deeper reasons why I think open source works so well. So I may not have started to do Linux for any such deep reasons, and I cannot honestly say that that is what motivates me, but I do end up thinking about why it all works. - -**Q: Did Microsoft’s ‘Men in Black’ ever talk to you?** - -Linus: I’ve never really talked to MS, no. I’ve occasionally been at the same conferences with some MS people (I used to go to more conferences than I do these days), but I’ve never really had anything to do with them. I think there is a mutual wariness. - --------------------------------------------------------------------------------- - -via: http://www.linuxveda.com/2015/06/17/what-happens-to-linux-after-linus/ - -作者:[Swapnil Bhartiya][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxveda.com/author/arnieswap/ From c09f7390ba32369a936ff9f48f3854e0fb3e733c Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sun, 28 Jun 2015 15:05:47 +0800 Subject: [PATCH 1285/2517] mv to tran* --- .../20150618 What will be the future of Linux without Linus.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/talk/20150618 What will be the future of Linux without Linus.md (100%) diff --git a/sources/talk/20150618 What will be the future of Linux without Linus.md b/translated/talk/20150618 What will be the future of Linux without Linus.md similarity index 100% rename from sources/talk/20150618 What will be the future of Linux without Linus.md rename to translated/talk/20150618 What will be the future of Linux without Linus.md From c3564ae01735bba6078685e264e7fa3681649828 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Sun, 28 Jun 2015 16:06:31 +0800 Subject: [PATCH 1286/2517] finish translation & review --- ...0150616 Linux Humor on the Command-line.md | 129 ------------------ ...0150616 Linux Humor on the Command-line.md | 127 +++++++++++++++++ 2 files changed, 127 insertions(+), 129 deletions(-) delete mode 100644 sources/share/20150616 Linux Humor on the Command-line.md create mode 100644 translated/share/20150616 Linux Humor on the Command-line.md diff --git a/sources/share/20150616 Linux Humor on the Command-line.md b/sources/share/20150616 Linux Humor on the Command-line.md deleted file mode 100644 index 47f1d0eb26..0000000000 --- a/sources/share/20150616 Linux Humor on the Command-line.md +++ /dev/null @@ -1,129 +0,0 @@ -translating by wwy-hust - -Linux Humor on the Command-line -================================================================================ -The desktop is full of eye candy. It enhances the visual experience and, in some cases, can also increase functionality of software. But it also makes software fun. Working on the command-line does not have to be always serious. If you want some fun on the command-line, there are lots of commands to raise a smile. - -Linux is a fun operating system. Linux offers a vast collection of small open source utilities that perform functions ranging from the obvious to the bizarre. It is the quality and selection of these tools that help Linux stand out. Check out these 7 small utilities. - -### lolcat ### - -![lolcat](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-lolcat.png) - -lolcat is a program that concatenates files, or standard input, to standard output (like the generic cat), and adds rainbow coloring to it. - -lolcat is often combined with other tools such as toilet or figlet to generate text. This software should not be confused with a lolcat; an image macro of one or more cats. - -lolcat was written by Moe. - -Website: [github.com][1] - -### cowsay ### - -![cowsay](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-cowsay.png) - -cowsay is a configurable open source program which generates ASCII pictures of a cow with a message in a speech bubble. cowsay is written in Perl. - -cowsay is not limited to generating pictures of cows. It can generate pre-made images of other animals including a duck, elephant, koala, moose, pony, sheep, stegosaurus, and turkey, as well as cheese, snowman, and a skeleton. - -There is a related program called cowthink, which generates cows with thought bubbles, as opposed to speech bubbles. - -Features include: - -- Make scripts more interesting -- Borg mode -- Ways to alter the way the cow looks, for example making the cow look greedy, paranoid, stoned, tired, wired, youthful and more -- xcowsay variant available - -Website: [nog.net][2] - -### doge ### - -![doge](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-doge.png) - -doge is a simple motd script based on the slightly stupid but very funny doge meme. It prints random grammatically incorrect statements that are sometimes based on things from your computer. - -Doge is an Internet meme that became popular in 2013. The meme typically consists of a picture of a Shiba Inu accompanied by multicolored text in Comic Sans font in the foreground. The text, representing a kind of internal monologue, is deliberately written in a form of broken English. - -- Randomly placed and colored random strings, complete with broken english -- Awesome Shibe in the terminal -- Fetching of system data, such as hostname, running processes, current user and $EDITOR -- If you have lolcat, you can do this gem: while true; do doge | lolcat -a -d 100 -s 100 -p 1; done -- stdin support: ls /usr/bin | doge will doge-print some of the executables found in /usr/bin. wow. There are also multiple command line switches that control filtering and statistical frequency of words - -Website: [github.com/thiderman/doge][3] - -### ASCIIQuarium ### - -![Asciiquarium](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-Asciiquarium.png) - -ASCIIQuarium is an aquarium/sea animation in ASCII art. Enjoy the fascinating creatures that live in the water from your computer. - -To run ASCIIQuarium you need to have installed Perl's curses package, and the Term::Animation module. To install the former, type sudo apt-get install libcurses-perl. To install the latter, type sudo cpan Term::Animation, both at the command line. - -Features include: - -- Multicolored fish -- Amusing animations, including a fish hook -- There are swans, ducks, dolphins, and ships too - -Website: [www.robobunny.com][4] - -### sl - Steam Locomotive ### - -![sl](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-sl.png) - -sl is an amusing command line tool that displays animations to correct users who accidentally type sl instead of ls. - -I'm rather sloppy at typing, preferring speed to accuracy. But typos can be a tad dangerous on the command line. So sl can serve as a practical reminder of curing a bad habit of mistyping. It always raises a chuckle too. - -Features include: - -- With -F, train flies -- With -l, it shows a small train -- With -a, an accident seems to happen - -Website: [github.com/mtoyoda/sl][5] - -### aafire ### - -![aafire](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-aafire.png) - -aafire displays burning ASCII art flames in the terminal. It demonstrates the the capabilities of the aalib library, an ascii art library. - -Website: [aa-project.sourceforge.net/aalib][6] - -### CMatrix ### - -![CMatrix](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-CMatrix.png) - -CMatrix is an ncurses program that simulates the display from "The Matrix". If you have been living in a cave for the past 15 years, you might not know The Matrix is a 1999 American science fiction acting film starring Keanu Reeves, Laurence Fishburne, Carrie-Anne Moss, Hugo Weaving, and Joe Pantoliano. - -It works with terminal settings up to 132x300 and can scroll lines all at the same rate or asynchronously and at a user-defined speed. - -Features include: - -- Change the text colour -- Turn on bold characters -- Asynchronous scroll -- Use old-style scrolling -- "Screensaver" mode - -Website: [www.asty.org/cmatrix][7] - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20150614112018846/Humor.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://github.com/busyloop/lolcat -[2]:https://web.archive.org/web/20120225123719/http://www.nog.net/%7Etony/warez/cowsay.shtml -[3]:https://github.com/thiderman/doge -[4]:http://www.robobunny.com/projects/asciiquarium/html/ -[5]:https://github.com/mtoyoda/sl -[6]:http://aa-project.sourceforge.net/aalib/ -[7]:http://www.asty.org/cmatrix/ diff --git a/translated/share/20150616 Linux Humor on the Command-line.md b/translated/share/20150616 Linux Humor on the Command-line.md new file mode 100644 index 0000000000..acd2fca4e7 --- /dev/null +++ b/translated/share/20150616 Linux Humor on the Command-line.md @@ -0,0 +1,127 @@ +LinuxеĬ +================================================================================ +ͨǷdz۵ģǿ˿ӻ飬ʱҲܹǿijЩĹܣԼøȤ¹ҲҪǺ࣬Щӣôкܶչ¶΢Ц + +LinuxǸȤIJϵͳṩСͿԴߣƽϡŹֵӦáЩߵͿѡ԰Linuxӱһ߸С߰ɡ + +### lolcat ### + +![lolcat](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-lolcat.png) + +lolcatһļ׼뵽׼һcatijΪ߲ʵɫ + +lolcatͨtoiletfigletıӦýʹáӦΪһèͼĺꡣ + +lolcatMoeд + +ַ: [github.com][1] + +### cowsay ### + +![cowsay](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-cowsay.png) + +cowsayһõĿԴASCIIţͼƬڶԻʾϢcowsayPerlдġ + +cowsayֻʾţԤͼƬѼӡ¹С򡢽ͻ𼦣Լҡѩ˺͹Ǽܡ + +һcowthinkӦãԻݲͬţͬʱ˼ݡ + +ܰ + +- ýűøȤ +- Borgģʽ +- Ըţӣţ̰ƫִִƣ롢Ź֡ +- ţ˵ݿ޸ + +ַ: [nog.net][2] + +### doge ### + +![doge](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-doge.png) + +dogeһЩ޴ȤdogeĹļ򵥵ÿϢűĴӡһЩ﷨ľӣʱЩӻеĶ + +dogeһ2013dzеĻԪأͨһձȮͼƬͲɫɡЩֹһŵдһЩĶס + +- òͬɫŵӢдľ +- նеIJȮЧdz +- ϵͳݣеij򡢵ǰû$EDITOR +- װlolcatΪ׺: while true; do doge | lolcat -a -d 100 -s 100 -p 1; done +- ׼֧: ls /usr/bin | doge ӡһЩ/usr/binµĿִļޡеĿؿԹ˴ԼƴƵʡ + +ַ: [github.com/thiderman/doge][3] + +### ASCIIQuarium ### + +![Asciiquarium](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-Asciiquarium.png) + +ASCIIQuariumһASCII뷽ʽˮ/󶯻ˮ׵ɡ + +ASCIIQuariumҪװPerlcursesԼTerm::Animationģ顣ʹsudo apt-get install libcurses-perlװǰߣʹsudo cpan Term::AnimationװߡҪնС + +ܰ + +- ʵ +- ȤĶ㹳 +- 졢Ѽӡʹֻ + +ַ: [www.robobunny.com][4] + +### sl - ### + +![sl](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-sl.png) + +slһȤնӦãΪЩĴlsslûʾһ + +Ҵͨdzʣϲٶȶ׼ȷԡǷdzΣյġslΪһʵʵߣעֻϰߡǻ˿Ц + +ܰ + +- ʹ -F, ڷ +- ʹ -l, ʾһС͵Ļ +- ʹ -a, ȥ + +ַ: [github.com/mtoyoda/sl][5] + +### aafire ### + +![aafire](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-aafire.png) + +aafireնʾȼյASCII档չʾһascii - aalibǿ + +ַ: [aa-project.sourceforge.net/aalib][6] + +### CMatrix ### + +![CMatrix](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-CMatrix.png) + +CMatrixһncursesijģ⡶ڿ͵۹һӰеĻ档һɽȹϸ15꣬ô֪ܲڿ͵۹1999ƻõӰΪ Keanu Reeves, Laurence Fishburne, Carrie-Anne Moss, Hugo Weaving Joe Pantoliano + +նΪ132x300¹ҿͬʽйûٶȽ첽Ĺ + +ܰ + +- ޸ıɫ +- ʹôַ +- 첽 +- ʹʽĹЧ +- Ļģʽ + +ַ: [www.asty.org/cmatrix][7] + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150614112018846/Humor.html + +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ + +[1]:https://github.com/busyloop/lolcat +[2]:https://web.archive.org/web/20120225123719/http://www.nog.net/%7Etony/warez/cowsay.shtml +[3]:https://github.com/thiderman/doge +[4]:http://www.robobunny.com/projects/asciiquarium/html/ +[5]:https://github.com/mtoyoda/sl +[6]:http://aa-project.sourceforge.net/aalib/ +[7]:http://www.asty.org/cmatrix/ \ No newline at end of file From b96f83d7ca35ca048d75434ba1d7fbff39ca6eee Mon Sep 17 00:00:00 2001 From: wwy Date: Sun, 28 Jun 2015 16:12:31 +0800 Subject: [PATCH 1287/2517] Update 20150309 Comparative Introduction To FreeBSD For Linux Users.md --- ...309 Comparative Introduction To FreeBSD For Linux Users.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md b/sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md index d29a75cb69..9e73930755 100644 --- a/sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md +++ b/sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md @@ -1,3 +1,5 @@ +translating by wwy-hust + Comparative Introduction To FreeBSD For Linux Users ================================================================================ ![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/FreeBSD-790x494.jpg) @@ -95,4 +97,4 @@ via: https://www.unixmen.com/comparative-introduction-freebsd-linux-users/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:https://www.unixmen.com/author/anis/ \ No newline at end of file +[a]:https://www.unixmen.com/author/anis/ From e9ed73d2b2d9ba745c5935d001256d446e64d096 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 28 Jun 2015 16:19:58 +0800 Subject: [PATCH 1288/2517] PUB:20150623 Linux Kernel 4.1 Released This Is What's New @geekpi --- ... Kernel 4.1 Released This Is What's New.md | 61 ++++++++++++++++++ ... Kernel 4.1 Released This Is What's New.md | 63 ------------------- 2 files changed, 61 insertions(+), 63 deletions(-) create mode 100644 published/20150623 Linux Kernel 4.1 Released This Is What's New.md delete mode 100644 translated/news/20150623 Linux Kernel 4.1 Released This Is What's New.md diff --git a/published/20150623 Linux Kernel 4.1 Released This Is What's New.md b/published/20150623 Linux Kernel 4.1 Released This Is What's New.md new file mode 100644 index 0000000000..f49951e253 --- /dev/null +++ b/published/20150623 Linux Kernel 4.1 Released This Is What's New.md @@ -0,0 +1,61 @@ +Linux 4.1 带来了什么新东西? +================================================================================ +**一个新的Linux内核已经发布了 - 全世界为之心跳(我们想把它说的诗意一些)** + +Linus Torvalds(除了他不会有谁了)在Linux邮件列表(当然不会在别的地方)中[宣布][1],在大概两个月后迎来了[第一个4.x系列的Linux内核的发布][2]。 + +像每次发布前那样,Linux 4.1带来了很多的改变。它们包括了硬件兼容性、电源管理、文件系统性能、以及你从没听说过的处理器的技术修复。 + +Linux 4.1 已经进入将在10月发布的 Ubuntu 15.10 。 + +### Linux 4.1 有哪些新东西 ### + +![Tux got mail](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/linux-kernel-4-11-350x200.jpg) + +*Tux 收到了邮件* + +这个标题只是说说而已,我们不是简单地将发布公告贴到这里。 + +我们会从(大量、冗长以及那些不明觉厉的的技术的)更改日志去挑选一些对桌面用户而言,不见得夸张但或许有用的亮点。 + +#### 电源管理 #### + +你可以在Linux 4.1中找到的面向用户的一大特性是对 Intel 的 Cherry Trail 和 Bay Trai 芯片、Soc及Intel计算棒等设备的性能及能效的提升。 + +传闻建议是Linux 4.1给出了新的Intel硬件组合,和更长电池寿命。这么多的进步自然不可能针对所有芯片,它只对特定芯片和系统(和高端的)有用,但仍旧是一个令人兴奋的消息。 + +**Linux 4.1 亮点包括:** + +- ext4 有了文件系统层面的加密(感谢Google) +- 罗技游戏手柄lg4ff驱动改进了‘力反馈’ +- 东芝笔记本驱动进行了USB睡眠充电和背光改进 +- Xbox One控制器支持Rumble +- Wacom平板驱动改进了电源报告 +- 各种针对arm和x86设备电源管理改进 +- Samsung Exynos 3250 电源管理改进 +- 支持Bamboo平板 +- 联想OneLink Pro Dock获得USB支持 +- 支持Realtek 8723A、 8723B、 8761A、 8821 Wi-Fi网卡 + +### Ubuntu中安装Linux 4.1 ### + +虽然这次发布的内核被标记为稳定,但是Ubuntu用户并不需要迫切地安装它。 + +但如果你等不及了并且技术足够熟练,你可以从[Canonical的主干内核归档][3]中下载合适的软件包来安装Linux 4.1(或者冒着风险使用第三方PPA)。 + +10月发布的Ubuntu 15.10 Wily Werewolf将会基于Ubuntu Kernel 4.1.x(Ubuntu内核是基于Linux内核加上Ubuntu没被上流接受的独有补丁)。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/06/linux-4-1-kernel-new-features + +作者:[Joey-Elijah Sneddon][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://lkml.org/lkml/2015/6/22/8 +[2]:http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features +[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D diff --git a/translated/news/20150623 Linux Kernel 4.1 Released This Is What's New.md b/translated/news/20150623 Linux Kernel 4.1 Released This Is What's New.md deleted file mode 100644 index 11b9c10a26..0000000000 --- a/translated/news/20150623 Linux Kernel 4.1 Released This Is What's New.md +++ /dev/null @@ -1,63 +0,0 @@ -Linux 4.1 发布了,下面是有哪些新的 -================================================================================ -**TuxlogoA brand new version of the Linux Kernel — the heartbeat of the modern world (if we you want us to be poetic about it) — has been released.** -**一个心的Linux内核 - 现代世界的心跳(如果我们想要让它充满诗意)已经发布了** - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2011/07/Tux-psd3894.jpg) - -Linus Torvalds(还有谁?)在Linux邮件列表(还有哪里)中[宣布了][1]内核发布,同事也是大概两个月后迎来了[第一个4.x系列的发布][2]。 - -快速之外,像每次发布前那样,Linux 4.1带来了很大的改变。它从硬件兼容性到电源管理到文件系统性能到和你从没听说过的处理器的技术修复。 - -Linux 4.1 已经进入Ubuntu 15.10, 将在10月发布。 - -### Linux 4.1 有哪些新的 ### - -![Tux got mail](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/linux-kernel-4-11-350x200.jpg) -Tux邮件 - -子标题在嘴上,我们不会简单地就宣布公告。 - -我们从(大量冗长的及不能理解的技术)更改日志去挑选一些对桌面用户而言,不见得夸张但或许有用的亮点。 - -#### 电源管理 #### - -你在Linux 4.1中面向用户的一大特性是对Intel Cherry Trail 和 Bay Trai 芯片的丰富性能以及电源效率的提升。Soc设备,如Intel计算棒。 - -传闻建议是Linux 4.1给出了新的Intel硬件组合,和更长电池守密。这么高的受益不可能针对任何芯片,它只对特定芯片和系统(和高端的)有用,但仍旧是一个令人兴奋的消息。 - -**Linux 4.1 亮点包括:** - -- ext4获得了文件系统层面的加密(感谢Google) -- 罗技游戏手柄lg4ff驱动提升‘力量反馈’ -- 东芝笔记本驱动获得USB睡眠充电和背光提升 -- Xbox One控制器支持 -- Wacom平板中更好的电源报告驱动 -- 不同的杂项。arm和x86设备电源管理提升 -- Samsung Exynos 3250 电源管理 -- 支持Bamboo屏板 -- 联想OneLink Pro Dock获得USB支持 -- 支持Realtek 8723A、 8723B、 8761A、 8821 Wi-Fi网卡 - -### Ubuntu中安装Linux 4.1 ### - -虽然这次发布的内核被标记为稳定,但是Ubuntu用户没有迫切需要区安装它。 - -如果你等不及了并且技术足够熟练,你可以从[Canonical的主流内核归档][3]中下载合适的来安装Linux 4.1(或者冒着风险使用第三方PPA)。 - -10月发布的Ubuntu 15.10 Wily Werewolf将会基于Ubuntu Kernel 4.1.x(Ubuntu内核是基于Linux内核加上Ubuntu没被上流接受的独有补丁)。 - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/06/linux-4-1-kernel-new-features - -作者:[Joey-Elijah Sneddon][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://lkml.org/lkml/2015/6/22/8 -[2]:http://www.omgubuntu.co.uk/2015/04/linux-kernel-4-0-new-features -[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D From c627ae8cb9bab6ddaa5a1237a4af1eb0c90d0f25 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 28 Jun 2015 20:33:17 +0800 Subject: [PATCH 1289/2517] [Translating] tech/20150527 How to edit your documents collaboratively on Linux.md --- ...150527 How to edit your documents collaboratively on Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150527 How to edit your documents collaboratively on Linux.md b/sources/tech/20150527 How to edit your documents collaboratively on Linux.md index 91d2bf6441..5b528e6165 100644 --- a/sources/tech/20150527 How to edit your documents collaboratively on Linux.md +++ b/sources/tech/20150527 How to edit your documents collaboratively on Linux.md @@ -1,3 +1,4 @@ +ictlyh Translating How to edit your documents collaboratively on Linux ================================================================================ > "Developed many years before by some high-strung, compulsive assistant, the Bulletin was simply a Word document that lived in a shared folder both Emily and I could access. Only one of us could open it at a time and add a new message, thought, or question to the itemized list. Then we'd print out the updated version and place it on the clipboard that sat on the shelf over my desk, removing the old ones as we went." ("The Devil Wears Prada" by Lauren Weisberger) From f52c472f4c9fc28dc63e17c503a7dd0daf10a3be Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 28 Jun 2015 23:07:40 +0800 Subject: [PATCH 1290/2517] PUB:20141013 Compact Text Editors Great for Remote Editing and Much More @wwy-hust --- ... Great for Remote Editing and Much More.md | 222 ++++++++++++++++++ ... Great for Remote Editing and Much More.md | 214 ----------------- 2 files changed, 222 insertions(+), 214 deletions(-) create mode 100644 published/20141013 Compact Text Editors Great for Remote Editing and Much More.md delete mode 100644 translated/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md diff --git a/published/20141013 Compact Text Editors Great for Remote Editing and Much More.md b/published/20141013 Compact Text Editors Great for Remote Editing and Much More.md new file mode 100644 index 0000000000..8915ff5006 --- /dev/null +++ b/published/20141013 Compact Text Editors Great for Remote Editing and Much More.md @@ -0,0 +1,222 @@ +适合于远程编辑以及更多环境的简洁文本编辑器 +================================================================================ +文本编辑器是用来编辑纯文本的软件。这种软件有许多用处,包括修改配置文件,编写程序源代码,记下一些想法或者甚至写一份购物列表。由于这种编辑器能都用于许多不同的方面,因此值得花些时间找一个最适合您喜好的编辑器。 + +不论编辑器有多么复杂,它们通常有一个共同的功能集,包括查找/替换文本,格式化文本,导入文件以及在文件中移动文本。 + +所有这些文本编辑器都是基于终端的应用,因此他们很适合在远程主机上编辑文件。文本编辑器通常也会提供一个图形化的用户界面,但依旧会保证快速和精简。 + +基于终端的应用程序在系统资源方面也是轻量级的(在低配置机器上很有用),比起它的图形化版本来也会更快、更高效,由于它们在X需要重启时也不会停止工作,因此非常适合编写脚本。 + +我选择了一些我最喜欢的开源文本编辑器,他们在使用系统资源方面都非常节俭。 + + + +### Textadept ### + +![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Textadept.png) + +Textadept是一款适合程序员的,快速、精简、可扩展、跨平台的开源文本编辑器。这个开源程序由C和Lua写就,并且于这些年间在速度和精简方面进行了优化。 + +Textadept是那些想要无限的扩展性且不愿牺牲速度或屈服于代码膨胀的程序员们的理想编辑器。 + +它也有一个用于终端的版本,仅仅依赖ncurses,适合在远程主机上进行编辑。 + +#### 功能包括: #### + +- 轻量级 +- 精简设计以最大化利用屏幕 +- 自包含的执行文件 - 无需安装 +- 全键盘驱动 +- 无限制的分割视图(GUI版本),以您所好任意水平或垂直的分割编辑器窗口。请注意Textadep不是一个选项卡式的编辑器。 +- 支持多达80种的编程语言 +- 强大的代码片段和快捷键命令 +- 代码自动补全和API查询 +- 无与伦比的扩展性 +- 书签 +- 查找和替换 +- 在文件中查找 +- 基于缓存的单词补全 +- 成熟的编程语言符号自动补全,以及显示API文档的功能 +- 主题:亮色、暗色、终端 +- 使用词法分析器将名称放到缓冲中,如评论、字符串、关键词 +- 支持会话 +- 快速打开 +- 许多可用的模块,包括对Java、Python、Ruby和近期打开文件列表的支持 +- 符合Gnome HIG用户接口的指导 +- 支持编辑Lua代码。许多Textadept对象和Lua的标准库支持语法自动补全和LuaDoc。 + +--- + +- 网址: [foicica.com/textadept][1] +- 开发者: Mitchell and contributors +- 许可证: MIT License +- 版本号: 7.7 + + +### Vim ### + +![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-vim.png) + +vim是一个高级的文本编辑器,它在'vi'强大的基础上,并拥有更全面的功能集。 + +这个编辑器对编程和编辑其他纯ASCII的文件十分有用。所有的命令都由普通的键盘按键提供,能够使用十指来输入,因而十分快捷。另外,功能键可以由用户来定义,并且可也以使用鼠标。 + +Vim通常被称作"程序员的编辑器",它十分适合于编程,并被认为可以作为完整的集成开发环境。然而,这个软件并不是仅仅面向程序员。Vim适合于各种文本编辑,从编写email到修改配置文件。 + +Vim的界面基于文本界面下的命令行。尽管它的图形化版本gVim为常用的命令添加了菜单和工具栏,但这个软件的整个功能依旧依赖于它的命令行模式。 + +#### 功能包括: #### + +- 3 种模式: + - 命令模式 + - 插入模式 + - 命令行模式 +- 无限制的撤销 +- 多个窗口和缓冲区 +- 平滑的插入模式 +- 根据所编辑的文件的类型使用不同的颜色或风格进行语法高亮 +- 交互命令 + - 标记一行 + - vi 行缓冲 + - 移动代码块 +- 块操作 +- 命令行历史 +- 扩展的正则表达式 +- 可编辑压缩/打包文件 (gzip, bzip2, zip, tar) +- 文件名补全 +- 标记跳转 +- 折叠文本 +- 缩进 +- ctags和cscope整合 +- 100%与vi的模式兼容 +- 插件用于添加/扩展功能 +- 宏 +- vimscript, Vim的内部脚本 +- Unicode支持 +- 多语言支持 +- 在线帮助支持 + +--- + +- 网址: [www.vim.org][2] +- 开发者: Bram Moolenaar +- 许可证: GNU GPL compatible (charityware) +- 版本号: 7.4 + + + +### ne ### + +![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-ne.png) + +ne是一款全屏幕的开源文本编辑器。它像是一个比vi更容易学习的vi替代物,并且可以在POSIX-兼容的系统中便携使用。 + +ne对于新手来说易于使用,但也非常强大并有完全可配置的引导程序,并且在资源使用上十分节约。 + +#### 功能包括: #### + +- 三种用户界面: 控制键,命令行、菜单;按键和菜单都可配置 +- 语法高亮 +- 对于UTF-8文件的完全支持,包括占据多列的字符(宽字符) +- 文档,剪切块,显示的维度和文件/行号长度都有编号,并且仅受制于机器的整型字长 +- 简单的脚本语言,脚本可以用简单易理解的录制/播放的方式制作 +- 无限制的撤销/重做功能(可以通过命令禁用) +- 基于被编辑的文件扩展名的自动个性化配置系统 +- 使用您文档中的词语做字典来进行自动前缀补全 +- 易用的文件存取功能 +- 扩展的正则表达式可用于查找和替换,类似emacs和vi +- 非常紧凑的内存模型,在加载和修改大型文件时十分快速 +- 可编辑二进制文件 + +--- + +- 网址: [ne.di.unimi.it][3] +- 开发者: Sebastiano Vigna (original developer). Additional features added by Todd M. Lewis +- 许可证: GNU GPL v3 +- 版本号: 2.5 + +---------- + +### Zile ### + +![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Zile.png) + +Zile(Zile Is Lossy Emacs,Emacs精简版),它是一个小型的Emacs的克隆版。Zile是一个可定制的,自文档化,实时显示的编辑器,Zile被开发的尽可能像Emacs一样,每个Emacs用户都会对Zile感到亲切。 + +Zile以它极小的RAM用量,大约130KB,以及快速开始编辑而闻名。它是支持8比特字符集的,允许用于编写任何种类的文件。 + +#### 功能包括: #### + +- 小型但快速、强大 +- 多个缓冲区,允许多级的撤销 +- 多窗口 +- 以最小的缓冲区完成补全 +- 自动填充 (自动换行) +- Registers +- 看起来像Emacs,键序列、功能和变量名都与Emacs相同 +- Killing +- Yanking +- 自动行末检测 + +--- + +- 网址: [www.gnu.org/software/zile][4] +- 开发者: Reuben Thomas, Sandro Sigala, David A. Capello +- 许可证: GNU GPL v2 +- 版本号: 2.4.11 + + + +### nano ### + +![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-nano.png) + +nano是基于curses库的文本编辑器。它是Pico(Pine电子邮件客户端编辑器)的一个复刻版。 + +由于Pine套件的许可证问题诉讼案(Pine并未以开源许可证发布),并且也因为Pine缺少一些重要的功能,nano项目于1999年发起。 + +nano致力于赶上Pico的功能和其易用性,与此同时提供更多的功能,但不集成Pine/Pico的邮件客户端。 + +nano像Pico一样是以键盘为导向的设计,可以用控制键来控制。 + +#### 功能包括: #### + +- 交互式的查找和替换 +- 彩色语法高亮 +- 转到行号和列号处 +- 自动缩进 +- 功能开关 +- 支持UTF-8 +- 混合型的文件类型自动转换 +- 逐字输入模式 +- 多个文件缓冲区 +- 平滑滚动 +- 括号匹配 +- 自定义引用字符串 +- 备份文件 +- 国际化支持 +- tab补全文件名 + +--- + +- 网址: [nano-editor.org][5] +- 开发者: Chris Allegretta, David Lawrence, Jordi Mallach, Adam Rogoyski, Robert Siemborski, Rocco Corsi, David Benbennick, Mike Frysinger +- 许可证: GNU GPL v3 +- 版本号: 2.2.6 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20141011073917230/TextEditors.html + +作者:Frazer Kline +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://foicica.com/textadept/ +[2]:http://www.vim.org/ +[3]:http://ne.di.unimi.it/ +[4]:http://www.gnu.org/software/zile/ +[5]:http://nano-editor.org/ diff --git a/translated/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md b/translated/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md deleted file mode 100644 index 766f429ba0..0000000000 --- a/translated/share/20141013 Compact Text Editors Great for Remote Editing and Much More.md +++ /dev/null @@ -1,214 +0,0 @@ -ʺԶ̱༭Լ໷ļı༭ -================================================================================ -ı༭༭ıô޸ļдԴ룬һЩ뷨дһݹбֱ༭ܶ಻ͬĻֵûЩʱһʺϲõı༭ - -۱༭жôӣͨһͬĹܼ/滻ıʽıļԼļƶı - -Щı༭ǻն˵ӦãǺʺԶϱ༭ļı༭ͨҲṩһͼλû棬ɻᱣ֤ٺС - -ն˵ӦóϵͳԴҲģڵûϺãͼλ汾Ҳ졢ЧXҪʱҲֹͣ˷dzʺϱдű - -ѡһЩϲĿԴı༭ʹϵͳԴ涼dzڼ - ----------- - -### Textadept ### - -![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Textadept.png) - -TextadeptһʺϳԱģ١Сչƽ̨ĿԴı༭ԴCLuaдͣЩٶȺСŻ - -TextadeptЩҪ޵չҲԸٶȻڴ͵ijԱǵ༭ - -Ҳһն˵İ汾ncursesʺԶϽб༭ - -#### ܰ: #### - -- -- СĻ -- ԰ִļ - 谲װ -- ȫ -- ƵķָͼGUI汾ˮƽֱķָ༭ڡעTextadeptûдļǩ -- ֶ֧80ֵı -- ǿƬο -- ԶȫAPIѯ -- ױȵչ -- ǩ -- Һ滻 -- ļв -- ڻĵʲȫ -- ıԷԶȫԼʾAPIĵĹ -- ⣺ڰն -- ʹôʷƷԪأַۡؼ -- Զ̻Ự -- ٴ -- õģ飬JavaPythonRubyͽڴļб֧ -- Gnome HIGûӿڵָ -- ֱ֧༭Lua롣﷨ԶȫLuaDocTextadeptLuaı׼⡣ - -- ַ: [foicica.com/textadept][1] -- : Mitchell and contributors -- ֤: MIT License -- 汾: 7.7 - ----------- - -### Vim ### - -![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-vim.png) - -vimһ߼ı༭'vi'ǿ󣬲ӵиȫĹܼ - -༭Ա̺ͱ༭ASCIIļʮáеͨļַṩܹʹʮָ룬ʮֿݡ⣬ܼû壬ҿҲʹꡣ - -Vimͨ"Աı༭"ʮʺڱ̣ΪΪļɿȻǽԱVim߶Ӹı༭ӱдemail޸ļ - -VimĽӿڻıµСͼλ汾gVimΪõ˲˵͹ģʽ - -#### ܰ: #### - -- 3 ģʽ: -- - Command ģʽ -- - Insert ģʽ -- - Command line ģʽ -- Ƶij -- ںͻ -- ƽģʽ -- ༭ļʹòͬɫ﷨ -- -- - һ -- - vi л -- - ƶ -- -- ʷ -- չʽ -- ༭ѹ/ļ (gzip, bzip2, zip, tar) -- ļȫ -- ת -- ۵ı -- -- ctagscscope -- 100%viģʽ -- /չ -- -- vimscript, Vimڲű -- Unicode֧ -- ֧ -- ֧߰ - -- ַ: [www.vim.org][2] -- : Bram Moolenaar -- ֤: GNU GPL compatible (charityware) -- 汾: 7.4 - ----------- - -### ne ### - -![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-ne.png) - -neһȫĻĿԴı༭һviѧϰviҿPOSIX-ݵϵͳбЯʹá - -ne˵ʹãҲdzǿȫõ򣬲ԴʹʮֽԼ - -#### ܰ: #### - -- ûӿڣ ƻкͲ˵Ͳ˵ -- ﷨ -- UTF-8ļȫַ֧֣ -- ĵУʾάȺļ/кųȶбţҽڻֳ -- 򵥵Ľűԣűü¼/ŵķʽ -- Ƶij/ܣͨã -- ڱ༭ļչԶԻϵͳ -- ʹĵеĴֵԶǰ׺ȫ -- õļȡ -- չʽڲҺ滻emacsvi -- dzյڴģͣڼغ޸Ĵļʱʮֿ -- ɱ༭ļ - -- ַ: [ne.di.unimi.it][3] -- : Sebastiano Vigna (original developer). Additional features added by Todd M. Lewis -- ֤: GNU GPL v3 -- 汾: 2.5 - ----------- - -### Zile ### - -![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Zile.png) - -ZileLossy EmacsEmacs棩һС͵EmacsĿ¡档ZileһɶƵģĵʵʱʾı༭ڱдZileʱEmacsһܵСÿEmacsûZileеС - -ZileСRAMԼ130KBԼٿʼ༭8ģڱдκļ - -#### ܰ: #### - -- С͵١ǿ -- ༶ij -- ര -- ã̫ô롿 -- СĻɲȫ -- Զ (Զ) -- Ĵͼ -- EmacsСܺͱEmacsͬ -- Killing -- Yanking -- Զĩ - -- ַ: [www.gnu.org/software/zile][4] -- : Reuben Thomas, Sandro Sigala, David A. Capello -- ֤: GNU GPL v2 -- 汾: 2.4.11 - ----------- - -### nano ### - -![](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-nano.png) - -nanoǻcursesı༭PicoPineʼͻ˱༭һ̰档 - -Pine֤ϰPineδԿԴ֤ҲΪPineȱһЩҪĹܣnanoĿ1999꿪ʼ - -nanoڸPicoĹܺԣͬʱṩĹܣPine/Picoʼͻˡ - -nanoPicoһԼΪƣÿƼơ - -#### ܰ: #### - -- ʽIJҺ滻 -- ɫ﷨ -- תкźкŴ -- Զ -- ܿ -- ֧UTF-8 -- ͵ļԶת -- ģʽ -- ļ -- ƽ -- ƥ -- Զַ -- ļ -- ʻ֧ -- tabȫļ - -- ַ: [nano-editor.org][5] -- : Chris Allegretta, David Lawrence, Jordi Mallach, Adam Rogoyski, Robert Siemborski, Rocco Corsi, David Benbennick, Mike Frysinger -- ֤: GNU GPL v3 -- 汾: 2.2.6 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20141011073917230/TextEditors.html - -ߣFrazer Kline -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ - -[1]:http://foicica.com/textadept/ -[2]:http://www.vim.org/ -[3]:http://ne.di.unimi.it/ -[4]:http://www.gnu.org/software/zile/ -[5]:http://nano-editor.org/ From dc02eb35dc83392f83ba90a184920dac36e229e5 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 28 Jun 2015 23:40:05 +0800 Subject: [PATCH 1291/2517] PUB:20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux @wwy-hust --- ...nds for RPM Package Management in Linux.md | 287 ++++++++++++++++++ ...nds for RPM Package Management in Linux.md | 287 ------------------ 2 files changed, 287 insertions(+), 287 deletions(-) create mode 100644 published/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md delete mode 100644 translated/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md diff --git a/published/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md b/published/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md new file mode 100644 index 0000000000..89266f8b0d --- /dev/null +++ b/published/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md @@ -0,0 +1,287 @@ +27 个 Linux 下软件包管理工具 DNF 命令例子 +================================================================================ +DNF即Dandified YUM,是基于RPM的Linux发行版的下一代软件包管理工具。它首先在Fedora 18中出现,并且在最近发行的Fedora 22中替代了[YUM工具集][1]。 + +![](http://www.tecmint.com/wp-content/uploads/2015/05/linux-dnf-command-examples.jpg) + +DNF致力于改善YUM的瓶颈,即性能、内存占用、依赖解决、速度和许多其他方面。DNF使用RPM、libsolv和hawkey库进行包管理。尽管它并未预装在CentOS和RHEL 7中,但您可以通过yum安装,并同时使用二者。 + +您也许想阅读更多关于DNF的信息: + +- [使用DNF取代Yum背后的原因][2] + +最新的DNF稳定版本是2015年5月11日发布的1.0(在写这篇文章之前)。它(以及所有DNF之前版本)主要由Python编写,并以GPL v2许可证发布。 + +### 安装DNF ### + +尽管Fedora 22官方已经过渡到了DNF,但DNF并不在RHEL/CentOS 7的默认仓库中。 + +为了在RHEL/CentOS系统中安装DNF,您需要首先安装和开启epel-release仓库。 + + # yum install epel-release + 或 + # yum install epel-release -y + +尽管并不建议在使用yum时添上'-y'选项,因为最好还是看看什么将安装在您的系统中。但如果您对此并不在意,则您可以使用'-y'选项以自动化的安装而无需用户干预。 + +接下来,使用yum命令从epel-realease仓库安装DNF包。 + + # yum install dnf + +在您装完dnf后,我会向您展示27个实用的dnf命令和例子,以便帮您更容易和高效的管理基于RPM包的发行版。 + +### 1. 检查DNF版本 ### + +检查您的系统上安装的DNF版本。 + + # dnf --version + +![检查DNF版本](http://www.tecmint.com/wp-content/uploads/2015/05/Check-DNF-Version.gif) + +### 2. 列出启用的DNF仓库 ### + +dnf命令中的'repolist'选项将显示您系统中所有启用的仓库。 + + # dnf repolist + +![检查所有开启的仓库](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Enabled-Repositories.gif) + +### 3. 列出所有启用和禁用的DNF仓库 ### + +'repolist all'选项将显示您系统中所有启用/禁用的仓库。 + + # dnf repolist all + +![列出所有启用/禁用的仓库](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Repositories.gif) + +### 4. 用DNF列出所有可用的且已安装的软件包 ### + +'dnf list'命令将列出所有仓库中所有可用的软件包和您Linux系统中已安装的软件包。 + + # dnf list + +![用DNF列出所有的软件包](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Packages.png) + +### 5. 用DNF列出所有已安装的软件包 ### + +尽管'dnf list'命令将列出所有仓库中所有可用的软件包和已安装的软件包。然而像下面一样使用'list installed'选项将只列出已安装的软件包。 + + # dnf list installed + +![列出已安装的软件包](http://www.tecmint.com/wp-content/uploads/2015/05/List-Installed-Packages.png) + +### 6. 用DNF列出所有可用的软件包 ### + +类似的,可以用'list available'选项列出所有开启的仓库中所有可用的软件包。 + + # dnf list available + +![用DNF列出可用的软件包](http://www.tecmint.com/wp-content/uploads/2015/05/List-Available-Packages.png) + +### 7. 使用DNF查找软件包 ### + +如果您不太清楚您想安装的软件包的名字,这种情况下,您可以使用'search'选项来搜索匹配该字符(例如,nano)和字符串的软件包。 + + # dnf search nano + +![通过关键字搜索软件包](http://www.tecmint.com/wp-content/uploads/2015/05/Search-Package.gif) + +### 8. 查看哪个软件包提供了某个文件/子软件包? ### + +dnf的选项'provides'能查找提供了某个文件/子软件包的软件包名。例如,如果您想找找哪个软件包提供了您系统中的'/bin/bash'文件,可以使用下面的命令 + + # dnf provides /bin/bash + +![查找提供文件的软件包](http://www.tecmint.com/wp-content/uploads/2015/05/Find-Package-Sub-Package.gif) + +### 9. 使用DNF获得一个软件包的详细信息 ### + +如果您想在安装一个软件包前知道它的详细信息,您可以使用'info'来获得一个软件包的详细信息,例如: + + # dnf info nano + +![用DNF查看软件信息](http://www.tecmint.com/wp-content/uploads/2015/05/Check-Package-Information.gif) + +### 10. 使用DNF安装软件包 ### + +想安装一个叫nano的软件包,只需运行下面的命令,它会为nano自动的解决和安装所有的依赖。 + + # dnf install nano + +![用DNF安装软件](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Package-DNF.gif) + +### 11. 使用DNF更新一个软件包 ### + +您可能只想更新一个特定的包(例如,systemd)并且保留系统内剩余软件包不变。 + + # dnf update systemd + +![更新一个软件包](http://www.tecmint.com/wp-content/uploads/2015/05/Update-a-Package.gif) + +### 12. 使用DNF检查系统更新 ### + +检查系统中安装的所有软件包的更新可以简单的使用如下命令: + + # dnf check-update + +![检查系统更新](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-System-Update.gif) + +### 13. 使用DNF更新系统中所有的软件包 ### + +您可以使用下面的命令来更新整个系统中所有已安装的软件包。 + + # dnf update + 或 + # dnf upgrade + +![更新系统](http://www.tecmint.com/wp-content/uploads/2015/05/Update-System.gif) + +### 14. 使用DNF来移除/删除一个软件包 ### + +您可以在dnf命令中使用'remove'或'erase'选项来移除任何不想要的软件包。 + + # dnf remove nano + 或 + # dnf erase nano + +![移除系统中的软件](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Package.gif) + +### 15. 使用DNF移除于依赖无用的软件包(Orphan Packages) ### + +这些为了满足依赖安装的软件包在相应的程序删除后便不再需要了。可以用过下面的命令来将它们删除。 + + # dnf autoremove + +![移除无用的依赖包](http://www.tecmint.com/wp-content/uploads/2015/05/Autoremove-Packages.gif) + +### 16. 使用DNF移除缓存的软件包 ### + +我们在使用dnf时经常会碰到过期的头部信息和不完整的事务,它们会导致错误。我们可以使用下面的语句清理缓存的软件包和包含远程包信息的头部信息。 + + # dnf clean all + +![移除DNF缓存](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Cache-Packages.gif) + +### 17. 获得特定DNF命令的帮助 ### + +您可能需要特定的DNF命令的帮助(例如,clean),可以通过下面的命令来得到: + + # dnf help clean + +![获得某一命令帮助](http://www.tecmint.com/wp-content/uploads/2015/05/Help-on-DNF-Command.gif) + +### 18. 列出所有DNF的命令和选项 ### + +要显示所有dnf的命令和选项,只需要: + + # dnf help + +![获得命令选项帮助](http://www.tecmint.com/wp-content/uploads/2015/05/DNF-Options.gif) + +### 19. 查看DNF的历史记录 ### + +您可以调用'dnf history'来查看已经执行过的dnf命令的列表。这样您便可以知道什么被安装/移除及其时间戳。 + + # dnf history + +![查看历史记录](http://www.tecmint.com/wp-content/uploads/2015/05/Check-DNF-History.gif) + +### 20. 显示所有软件包组 ### + +'dnf grouplist'命令可以显示所有可用的或已安装的软件包,如果没有什么输出,则它会列出所有已知的软件包组。 + + # dnf grouplist + +![列出所有软件包组](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Group-Packages.gif) + +### 21. 使用DNF安装一个软件包组 ### + +要安装一组由许多软件打包在一起的软件包组(例如,Educational Softaware),只需要执行: + + # dnf groupinstall 'Educational Software' + +![安装一个软件包组](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Group-Packages.gif) + +### 22. 更新一个软件包组 ### + +可以通过下面的命令来更新一个软件包组(例如,Educational Software): + + # dnf groupupdate 'Educational Software' + +![更新软件包组](http://www.tecmint.com/wp-content/uploads/2015/05/Update-Group-Package.gif) + +### 23. 移除一个软件包组 ### + +可以使用下面的命令来移除一个软件包组(例如,Educational Software): + + # dnf groupremove 'Educational Software' + +![移除软件包组](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Group-Package.gif) + +### 24. 从某个特定的仓库安装一个软件包 ### + +DNF可以从任何特定的仓库(比如 epel)安装一个软件包(例如,phpmyadmin): + + # dnf --enablerepo=epel install phpmyadmin + +![从特定的仓库安装软件](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Package-From-Specific-Repo.gif) + +### 25. 将已安装的软件包同步到稳定发行版 ### + +'dnf distro-sync'将同步所有已安装的软件包到所有开启的仓库中最近的稳定版本。如果没有选择软件包,则会同步所有已安装的软件包。 + + # dnf distro-sync + +![将包同步至稳定版](http://www.tecmint.com/wp-content/uploads/2015/05/Synchronize-Packages.gif) + +### 26. 重新安装一个软件包 ### + +'dnf reinstall nano'命令将重新安装一个已经安装的软件包(例如,nano): + + # dnf reinstall nano + +![重新安装软件包](http://www.tecmint.com/wp-content/uploads/2015/05/Re-Install-Package.gif) + +### 27. 降级一个软件包 ### + +选项'downgrade'将会使一个软件包(例如,acpid)回退到低版本。 + + # dnf downgrade acpid + +示例输出 + + Using metadata from Wed May 20 12:44:59 2015 + No match for available package: acpid-2.0.19-5.el7.x86_64 + Error: Nothing to do. + +**我观察到**:dnf不会按预想的那样降级一个软件包。这已做为一个bug被提交。 + +### 结论 ### + +DNF是YUM管理器的优秀替代品。它试着自动做许多甚至不推荐有经验的Linux系统管理员做的工作。例如: + +- `--skip-broken`不被DNF识别,并且DNF中没有其替代命令。 +- 尽管您可能会运行dnf provides,但再也没有'resolvedep'命令了。 +- 没有'deplist'命令用来发现软件包依赖。 +- 您排除一个仓库意味着在所有操作上排除该仓库,而在yum中,排除一个仓库只在安装和升级等时刻排除他们。 + +许多Linux用户对于Linux生态系统的走向不甚满意。首先[Systemd替换了init系统][3]v,现在DNF将于不久后替换YUM,首先是Fedora 22,接下来是RHEL和CentOS。 + +您怎么看呢?是不是发行版和整个Linux生态系统并不注重用户并且在朝着与用户愿望相悖的方向前进呢?IT行业里有这样一句话 - “如果没有坏,为什么要修呢?”,System V和YUM都没有坏。 + +上面便是这篇文章的全部了。请在下方留言以让我了解您的宝贵想法。点赞和分享以帮助我们传播。谢谢! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ + +作者:[Avishek Kumar][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[2]:http://www.tecmint.com/dnf-next-generation-package-management-utility-for-linux/ +[3]:http://www.tecmint.com/systemd-replaces-init-in-linux/ diff --git a/translated/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md b/translated/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md deleted file mode 100644 index 48dd213d68..0000000000 --- a/translated/tech/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md +++ /dev/null @@ -1,287 +0,0 @@ -27LinuxߡDNFYumķ֧ -================================================================================ -DNFDandified YUMǻRPMķаһߡFedora 18г֣еFedora 22[YUM߼][1] - -![](http://www.tecmint.com/wp-content/uploads/2015/05/linux-dnf-command-examples.jpg) - -DNFڸYUMƿܡڴռáٶȺ档DNFʹRPMlibsolvhawkeyаδԤװCentOSRHEL 7Уͨyumװͬʱʹöߡ - -ҲĶDNFϢ - -- [ʹDNFȡYumԭ][2] - -µDNFȶ汾2015511շ1.0дƪ֮ǰԼDNF֮ǰ汾ҪPythonдGPL v2֤ - -### װDNF ### - -Fedora 22ٷѾɵDNFDNFRHEL/CentOS 7ĬϲֿС - -ΪRHEL/CentOSϵͳаװDNFҪȰװͿepel-releaseֿ⡣ - - # yum install epel-release - - # yum install epel-release -y - -ܲʹyumʱ'-y'ѡΪûǿʲôװϵͳСԴ˲⣬ʹ'-y'ѡԶİװûԤ - -ʹyumepel-realeaseֿⰲװDNF - - # yum install dnf - -װdnfһչʾ27ʵõdnfӣԱ׺͸ЧĹRPMķа档 - -### 1. DNF汾 ### - -ϵͳϰװDNF汾 - - # dnf --version - -![DNF汾](http://www.tecmint.com/wp-content/uploads/2015/05/Check-DNF-Version.gif) - -### 2. гDNFֿ ### - -dnfе'repolist'ѡʾϵͳпIJֿ⡣ - - # dnf repolist - -![пIJֿ](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Enabled-Repositories.gif) - -### 3. гп͹رյDNFֿ ### - -'repolist all'ѡʾϵͳп/رյIJֿ⡣ - - # dnf repolist all - -![гп/رյIJֿ](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Repositories.gif) - -### 4. DNFгпõѰװ ### - -'dnf list'гвֿпõLinuxϵͳѰװ - - # dnf list - -![DNFге](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Packages.png) - -### 5. DNFгѰװ ### - -'dnf list'гвֿпõѰװȻһʹ'list installed'ѡֻгѰװ - - # dnf list installed - -![гѰװ](http://www.tecmint.com/wp-content/uploads/2015/05/List-Installed-Packages.png) - -### 6. DNFгпõ ### - -Ƶģ'list available'ѡгпIJֿпõ - - # dnf list available - -![DNFгõ](http://www.tecmint.com/wp-content/uploads/2015/05/List-Available-Packages.png) - -### 7. ʹDNF ### - -̫밲װ֣£ʹ'search'ѡƥַ磬nanoַ - - # dnf search nano - -![ͨؼ](http://www.tecmint.com/wp-content/uploads/2015/05/Search-Package.gif) - -### 8. 鿴ĸṩijļ/ ### - -dnfѡ'provides'ܲṩijļ/磬Ǹṩϵͳе'/bin/bash'ļʹ - - # dnf provides /bin/bash - -![ṩļ](http://www.tecmint.com/wp-content/uploads/2015/05/Find-Package-Sub-Package.gif) - -### 9. ʹDNFһϸϢ ### - -ڰװһǰ֪ϸϢʹ'info'һϸϢ磺 - - # dnf info nano - -![DNF鿴Ϣ](http://www.tecmint.com/wp-content/uploads/2015/05/Check-Package-Information.gif) - -### 10. ʹDNFװ ### - -밲װһnanoֻΪnanoԶĽͰװе - - # dnf install nano - -![DNFװ](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Package-DNF.gif) - -### 11. ʹDNFһ ### - -ֻһضİ磬systemdұϵͳʣ䡣 - - # dnf update systemd - -![һ](http://www.tecmint.com/wp-content/uploads/2015/05/Update-a-Package.gif) - -### 12. ʹDNFϵͳ ### - -ϵͳаװĸ¿Լ򵥵ʹdnfУ - - # dnf check-update - -![ϵͳ](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-System-Update.gif) - -### 13. ʹDNFװϵͳе ### - -ʹϵͳѰװ - - # dnf update - - # dnf upgrade - -![ϵͳ](http://www.tecmint.com/wp-content/uploads/2015/05/Update-System.gif) - -### 14. ʹDNFƳ/ɾһ ### - -dnfʹ'remove''erase'ѡƳκβҪ - - # dnf remove nano - - # dnf erase nano - -![Ƴϵͳе](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Package.gif) - -### 15. ʹDNFƳõOrphan Packages ### - -ЩΪװӦijɾ㲻Ҫˡùɾ - - # dnf autoremove - -![Ƴõ](http://www.tecmint.com/wp-content/uploads/2015/05/Autoremove-Packages.gif) - -### 16. ʹDNFƳ ### - -ʹdnfʱڵͷͲǻᵼ´ǿʹͰԶ̰Ϣͷ - - # dnf clean all - -![ƳDNF](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Cache-Packages.gif) - -### 17. ضDNFİ ### - -ҪضDNFİ磬cleanͨõ - - # dnf help clean - -![ijһ](http://www.tecmint.com/wp-content/uploads/2015/05/Help-on-DNF-Command.gif) - -### 18. гDNFѡ ### - -ҪʾdnfѡֻҪ - - # dnf help - -![ѡ](http://www.tecmint.com/wp-content/uploads/2015/05/DNF-Options.gif) - -### 19. 鿴DNFʷ¼ ### - -Ե'dnf history'鿴Ѿִйdnfб֪ʲôװ/ƳԼʱ - - # dnf history - -![鿴ʷ¼](http://www.tecmint.com/wp-content/uploads/2015/05/Check-DNF-History.gif) - -### 20. ʾ ### - -'dnf grouplist'ԴӡпõĻѰװûʲôг֪顣 - - # dnf grouplist - -![г](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Group-Packages.gif) - -### 21. ʹDNFװһ ### - -Ҫװһһ飨磬Educational SoftawareֻҪִУ - - # dnf groupinstall 'Educational Software' - -![װһ](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Group-Packages.gif) - -### 22. һ ### - -ͨһ飨磬Educational Software - - # dnf groupupdate 'Educational Software' - -![](http://www.tecmint.com/wp-content/uploads/2015/05/Update-Group-Package.gif) - -### 23. Ƴһ ### - -ʹƳһ飨磬Educational Software - - # dnf groupremove 'Educational Software' - -![Ƴ](http://www.tecmint.com/wp-content/uploads/2015/05/Remove-Group-Package.gif) - -### 24. ijضIJֿⰲװһ ### - -DNFԴκضIJֿⰲװһ磬phpmyadmin - - # dnf --enablerepo=epel install phpmyadmin - -![ضIJֿⰲװ](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Package-From-Specific-Repo.gif) - -### 25. Ѱװͬȶа ### - -'dnf distro-sync'ͬѰװпIJֿȶ汾ûѡͬѰװ - - # dnf distro-sync - -![ͬȶ](http://www.tecmint.com/wp-content/uploads/2015/05/Synchronize-Packages.gif) - -### 26. °װһ ### - -'dnf reinstall nano'°װһѾװ磬nano - - # dnf reinstall nano - -![°װ](http://www.tecmint.com/wp-content/uploads/2015/05/Re-Install-Package.gif) - -### 27. һ ### - -ѡ'downgrade'ʹһ磬acpid˵Ͱ汾 - - # dnf downgrade acpid - -ʾ - - Using metadata from Wed May 20 12:44:59 2015 - No match for available package: acpid-2.0.19-5.el7.x86_64 - Error: Nothing to do. - -**ҵĹ۲**dnfᰴԤһΪһbugύ - -### ### - -DNFYUMƷԶоLinuxϵͳԱĹ磺 - -- `--skip-broken`DNFʶ𣬲DNFû -- ܻdnf providesҲû'resolvedep'ˡ -- û'deplist' -- ųһֿζвųòֿ⣬yumУųһֻֿڰװʱųǡ - -LinuxûLinux̬ϵͳ⡣[Systemd滻init system][3]vDNFڲú滻YUMFedora 22RHELCentOS - -ôأDzǷаLinux̬ϵͳעûڳûԸ㣵ķǰأITҵһ仰 - ûлΪʲôҪأSystem VYUMûл - -ƪµȫˡ·˽ı뷨޺ͷ԰Ǵлл - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ - -ߣ[Avishek Kumar][a] -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ -[2]:http://www.tecmint.com/dnf-next-generation-package-management-utility-for-linux/ -[3]:http://www.tecmint.com/systemd-replaces-init-in-linux/ From b7b21847bb0114a9e64159ce32adcf39f304b464 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 29 Jun 2015 12:23:34 +0800 Subject: [PATCH 1292/2517] Update 20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md --- ...erformance Tuning and Optimization Tips.md | 181 +++++++++--------- 1 file changed, 92 insertions(+), 89 deletions(-) diff --git a/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md b/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md index e01e9bf787..942381170e 100644 --- a/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md +++ b/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md @@ -1,20 +1,21 @@ -translation by strugglingyouth +translated -15 Useful MySQL/MariaDB Performance Tuning and Optimization Tips +15 个有用的 MySQL/MariaDB 性能调整和优化技巧 ================================================================================ -MySQL is a powerful open source Relational Database Management System or in short RDBMS. It was released back in 1995 (20 years old). It uses Structured Query Language which is probably the most popular choice for managing content within a database. The latest MySQL version is 5.6.25 and was released on 29 May 2015. +MySQL是一个强大的开源关系型数据库管理系统或简称RDBMS。它被发布在1995年(20年前)。它采用的结构化查询语言在数据库管理中可能是最好的选择。最新的MySQL版本是5.6.25,2015年5月29日发行的。 -An interesting fact about MySQL is the fact that the name comes from Michael Widenius’s (MySQL’s creator) daughter My. Even though there are plenty of interesting facts about MySQL, this article is meant to show you some useful practices to help you manage your MySQL server. +尽管有许多关于MySQL有趣的传闻,其中一个有趣的事实是,这个名字来自Michael Widenius(MySQL的创始人)的女儿。本文旨在向您展示一些有用的做法,以帮助您管理您的MySQL服务器。 ![MySQL Performance Tuning](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning1.png) -MySQL Performance Tuning +MySQL性能优化 -In April 2009 the MySQL project was bought by Oracle. As a result a MySQL community fork called MariaDB was created. The main reason for creating the fork was to keep the project free under the General Public License. +2009年4月,MySQL被Oracle收购。其结果导致一个叫MariaDB的社区成立。创建的主要原因是为了保持MySQL项目的自由。 -Today MySQL and MariaDB are one of the most (if not the most) frequently used RDBMS used for web applications such as WordPress, Joomla, Magento and others. +今天,MySQL和MariaDB对于Web应用程序像,WordPress, Joomla, Magento和其他的,是使用最广泛的(但不是使用最多的)RDBMS。 -This article will show you some basic, yet useful tips how to optimize the fine tune the performance of MySQL/MariaDB. Please keep in mind that this article assumes that you already have MySQL or MariaDB installed. If you are still wondering how to install them on your system, you can follow our extensive guides here: + +这篇文章将告诉你一些基本的,但有用如何优化MySQL / MariaDB性能的技巧。说明,本文假定您已经安装了MySQL或MariaDB。如果你仍然不知道如何在系统上安装它们,你可以按照以下说明去安装: - [Installing LAMP on RHEL/CentOS 7][1] - [Installing LAMP on Fedora 22][2] @@ -23,207 +24,209 @@ This article will show you some basic, yet useful tips how to optimize the fine - [Install MariaDB on Gentoo Linux][5] - [Install MariaDB on Arch Linux][6] -**Important**: Before we start – do not accept this suggestions blindly. Each MySQL setup is unique and requires additional thought, before making any changes. +**说明**: 在开始之前,不要盲目的接受这些建议。每个MySQL的设置是不同的,在进行任何更改之前需要慎重考虑。 -Things you need to know: -- MySQL/MariaDB configuration file is located in `/etc/my.cnf`. Every time you modify this file you will need to restart the MySQL service so the new changes can take effect. -- For writing this article MySQL version 5.6 has been used as template. +你需要明白这些: -### 1. Enable InnoDB file-per-table ### +- MySQL/MariaDB配置文件位于 `/etc/my.cnf`. 每次需改此文件后你需要重新启动MySQL服务,以使新更改生效。 +- 这篇文章使用MySQL 5.6版本 。 -First it is important to explain that InnoDB is a storage engine. MySQL and MariaDB use InnoDB as default storage engine. In the past MySQL used to keep database tables and indexes in a system tablespace. This approach was meant for servers which sole purpose is database processing and their storage disk is not used for any other purposes. +### 1. 启动 InnoDB 的`file-per-table` ### -The InnoDB provides more flexible approach and each database information is kept in a `.ibd` data file. Each .ibd file represents a tablespace of its own. That way database operations such as “TRUNCATE” can be completed faster and you may also reclaim unused space when dropping or truncating a database table. +首先,它是非常重要的对于解释InnoDB是一个存储引擎。MySQL和MariaDB使用的默认存储引擎是InnoDB。过去,MySQL使用系统表空间来保存数据库中的表和索引。这意味着服务器唯一的目的就是数据库处理,它的存储盘不用于其他的目的。 -Another benefit of this configuration is the fact that you can keep some of the database tables in a separate storage device. This can greatly improve the I/O load on your disks. +InnoDB提供了更灵活的方式,它把每个数据库的信息保存在一个`.ibd` 数据文件中。像“TRUNCATE”这样的操作可以更快地完成,当删除或截断一个数据库表时,你也可以回收未使用的空间。 -The innodb_file_per_table is enabled by default in MySQL 5.6 and above. You can see that in /etc/my.cnf file. The directive looks like this: +这种结构的另一个好处是,可以保留一些数据库表在一个单独的存储设备。这可以大大提高你磁盘的I/O负载。 + +MySQL 5.6及以上的版本默认启用`innodb_file_per_table`。你可以在/etc/my.cnf文件中看到。该指令看起来是这样的: innodb_file_per_table=1 -### 2. Store MySQL Database Data on Separate Partition ### +### 2. 将MySQL数据库中的数据放在独立分区上 ### -**Note**: This setup only works with MySQL, but not with MariaDB. +**注意**: 此设置只能工作在MySQL上, 而不能在MariaDB上. -Sometimes OS read/writes can slow down the performance of your MySQL server, especially if located on same hard drive. Instead, I would recommend using separate hard drive (preferably SSD) for the MySQL service. +有时OS的读/写操作会减缓你MySQL服务器的性能,尤其是如果位于同一块磁盘上。因此,我建议你使用单独的磁盘(SSD最好)用于MySQL服务。 -To complete, this you will need to attach the new drive to your computer/server. For the purpose of this article, I will assume that the drive will be under /dev/sdb. +要完成这步,你需要将新的磁盘连接到您的计算机/服务器上。对于这篇文章,我会认为磁盘将被识别为/dev/sdb。 -The next step is to prepare the new drive: +下一步将是准备新的分区: # fdisk /dev/sdb -Now press “n” to create new partition. Next press “p” to make the new partition primary. After that, set the partition number from 1-4. After that you will select the partition size. Press enter here. On the next step you will need to configure the size of the partition. +现在按“N”来创建新的分区。接着按“P”,以使其创建为主分区。在此之后,设置分区号为1-4之间。之后,你可以选择分区大小。这里按enter。在接下来的步骤中,你需要配置分区的大小。 -If you wish to use the entire disk press enter once more. Otherwise you can manually set the size of the new partition. When ready press “w” to write the changes. Now we will need to create a filesystem for our new partition. This can be easily done with: +如果你希望使用全部的磁盘,按一次enter。否则,你需要手动设置新分区的大小。准备就绪后按“w”保存。现在,我们需要为我们的新分区创建一个文件系统。这可以很轻松的完成: # mkfs.ext4 /dev/sdb1 -Now we will mount our new partition in a folder. I have named my folder “ssd” and created in the root directory: +现在挂载新分区到文件夹下。在根目录下创建一个名为“ssd”的文件夹: # mkdir /ssd/ -We are ready to mount the new partition we just made in the new folder: +挂载新分区到刚才创建的文件夹下: # mount /dev/sdb1 /ssd/ -You can perform the mount at startup by adding the following line in /etc/fstab file. +你可以添加如下行在/etc/fstab文件中设置开机自动挂载: /dev/sdb1 /ssd ext3 defaults 0 0 -Now you are ready to move MySQL to the new disk. First stop the MySQL service with: +现在我们移动MySQL到新磁盘中。首先停止服务: # service mysqld stop -I would recommend you stopping Apache/nginx as well to prevent any attempts to write in the databases: +我建议你​​停止Apache/nginx,以及以防止任何操作试图在数据库中写入: # service httpd stop # service nginx stop -Now copy the entire MySQL directory in the new drive: +现在我们复制完整的MySQL目录到新分区中: # cp /var/lib/mysql /ssd/ -Rp -This may take a while depending on the site of your MySQL databases. Once this process is complete rename the MySQL directory: +这可能需要一段时间,具体取决于你的MySQL数据库的大小。一旦这个过程完成后重命名MySQL的目录: # mv /var/lib/mysql /var/lib/mysql-backup -Next we will create a symlink. +然后创建一个链接: # ln -s /ssd/mysql /var/lib/mysql -Now you are ready to start your MySQL and web service: +现在启动你的MySQL和web服务: # service mysqld start # service httpd start # service nginx start -At this point your MySQL databases will be accessed from the new drive. +以后你的数据库将使用新的磁盘访问。 -### 3. Optimizing InnoDB buffer pool Usage ### +### 3. 优化InnoDB的缓冲区 ### -The InnoDB engine has a buffer pool used for caching data and indexes in memory. This of course will help your MySQL/MariaDB queries be executed significantly faster. Choosing the proper size here requires some very important decisions and good knowledge on your system’s memory consumption. +InnoDB引擎在内存中有一个缓冲数据和索引的缓冲区。这将有助于你在MySQL/MariaDB中的查询更快的执行。选择合适的内存大小对系统的查询来说是非常重要的,并且使你对系统的内存消耗也会有一个更好的认识。 -Here is what you need to consider: +下面是你需要考虑的: -- How much memory you need for other processes. This includes your system processes, page tables, socket buffers. -- Is your server dedicated for MySQL or you will be running other memory hungry services. +- 其他的进程需要消耗多少内存,包括你的系统进程,表的数量,套接字缓冲区大小。 +- 你的服务器是否专用于MySQL还是你也运行其他非常消耗内存的服务。 -On a dedicated box, you would probably want to give about 60-70% of the memory to the innodb_buffer_pool_size. If you plan on running more services on a single box, you should re-consider the amount of memory you dedicate for your innodb_buffer_pool_size. -The value that you should edit in my.cnf is: +在一个专用的机器上,你可能会使用60-70%的内存分配给`innodb_buffer_pool_size`。如果你打算在一个机器上运行多个服务,你应该重新考虑`innodb_buffer_pool_size`的内存大小。 + +你需要设置my.cnf中的此项: innodb_buffer_pool_size -### 4. Avoid Swappiness in MySQL ### +### 4. 在MySQL中避免使用Swappiness ### -Swapping is process that occurs when system moves part of memory to a special disk space called “swap”. The event usually appears when your system runs out of physical memory and instead of freeing up some RAM, the system pushed the information into disk. As you might have guess the disk is much slower than your RAM. +使用交换空间需要一个进程,当系统移动一部分内存到一个空闲的分区中就叫做“swap”。通常当你的系统用完物理内存后就会出现这种情况而不是释放一些RAM,然后将信息写进磁盘中。你可能已经猜测到磁盘比你的内存要慢得多。 -By default the option is enabled: +默认情况下该选项已经启用: # sysctl vm.swappiness vm.swappiness = 60 -To disable swappiness, run the following command: +使用以下命令关闭swappiness: # sysctl -w vm.swappiness=0 -### 5. Set MySQL Max Connections ### +### 5. 设置MySQL的最大连接数 ### -The max_connections directive tells your server how many concurrent connections are permitted. The MySQL/MariaDB server allows the value given in max_connections + 1 for user with SUPER privileges. The connection is opened only for the time MySQL query is executed – after that it is closed and new connection can take its place. +`max_connections`变量告诉你的服务器当前允许多少并发连接。MySQL/ MariaDB服务器允许的`max_connections` + 1为超级用户给定的值。当连接建立后,执行MySQL查询会有时间的限制 - 之后,它被关闭,新连接可以取代其位置。 -Keep in mind that too many connections can cause high RAM usage and lock up your MySQL server. Usually small websites will require between 100-200 connections while larger may require 500-800 or even more. The value you apply here strongly depends on your particular MySQL/MariaDB usage. +请记住,太多的连接会导致RAM的使用量过高并且会锁定你的MySQL服务器。一般小网站需要100-200的连接数而较大可能需要500-800甚至更多。这里的值很大程度上取决于你的MySQL/MariaDB的使用情况。 -You can dynamically change the value of `max_connections`, without having to restart the MySQL service by running: +你可以动态的改变`max_connections`的值而无需重启MySQL服务器: # mysql -u root -p mysql> set global max_connections := 300; -### 6. Configure MySQL thread_cache_size ### +### 6. 配置MySQL的`thread_cache_size`变量 ### -The `thread_cache_size` directive sets the amount of threads that your server should cache. As the client disconnects, his threads are put in the cache if they are less than the thread_cache_size. Further requests are completed by using the threads stored in the cache. + `thread_cache_size`变量用来设置你服务器缓存的线程数量。当客户端断开连接时,如果当前线程数小于`thread_cache_size`,他的线程将被放入缓存中。下一个请求将使用缓存池中的线程来完成。 -To improve your performance you can set the thread_cache_size to a relatively high number. To find the thread cache hit rate, you can use the following technique: +要提高服务器的性能,你可以设置`thread_cache_size`的值相对高一些。你可以通过以下方法来查看线程池的使用情况:: mysql> show status like 'Threads_created'; mysql> show status like 'Connections'; -Now use the following formula to calculate the thread cache hit rate percentage: +你可以用以下公式来计算线程池的使用率: 100 - ((Threads_created / Connections) * 100) -If you get a low number, it means that most of the new mysql connections are starting new thread instead of loading from cache. You will surely want to increase the thread_cache_size in such cases. +如果你得到一个较低的数字,这意味着大多数mysql连接请求使用新的线程,而不是从缓存加载。在这种情况下,你需要增加`thread_cache_size`。 -The good thing here is that the thread_cache_size can be dynamically changed without having to restart the MySQL service. You can achieve this by running: +但有一个好处是,`thread_cache_size`可以动态的改变而无需重启MySQL服务。你可以通过以下方式来实现: mysql> set global thread_cache_size = 16; -### 7. Disable MySQL Reverse DNS Lookups ### +### 7.禁用MySQL的DNS反向查询 ### -By default MySQL/MariaDB perform a DNS lookup of the user’s IP address/Hostname from which the connection is coming. For each client connection, the IP address is checked by resolving it to a host name. After that the host name is resolved back to an IP to verify that both match. +当新的连接出现时,默认情况下MySQL/MariaDB会使用DNS来解析用户的IP地址/主机名,每个新的连接,它的IP都会被解析为主机名。然后,主机名又被反解析为IP来验证这两个是否一致。 -This unfortunately may cause delays in case of badly configured DNS or problems with DNS server. This is why you can disable the reverse DNS lookup by adding the following in your configuration file: +当DNS服务器出现问题或者配置有问题时,解析会变得非常慢,这就是为什么要关闭DNS的反向解析,你可以在你的配置文件中添加以下选项去设定: [mysqld] # Skip reverse DNS lookup of clients skip-name-resolve -You will have to restart the MySQL service after applying these changes. +更改后需要重新启动你的MySQL服务器. -### 8. Configure MySQL query_cache_size ### +### 8. 配置MySQL的`query_cache_size`变量 ### -If you have many repetitive queries and your data does not change often – use query cache. People often do not understand the concept behind the `query_cache_size` and set this value to gigabytes, which can actually cause degradation in the performance. +如果你有很多重复的查询或者不经常改变的数据 – 请使用缓存查询。 人们常常不理解`query_cache_size`的实际含义而将此值设置为几十兆,这实际上会降低服务器的性能。 -The reason behind that is the fact that threads need to lock the cache during updates. Usually value of 200-300 MB should be more than enough. If your website is relatively small, you can try giving the value of 64M and increase in time. +背后的原因是,线程需要在更新过程中锁定缓存。通常设置为200-300 MB应该足够了。如果你的网站比较小的,你可以尝试给64M并在以后及时去增加。 -You will have to add the following settings in the MySQL configuration file: +添加以下选项到你的MySQL配置文件中: query_cache_type = 1 query_cache_limit = 256K query_cache_min_res_unit = 2k query_cache_size = 80M -### 9. Configure tmp_table_size and max_heap_table_size ### +### 9. 配置`tmp_table_size`变量和`max_heap_table_size`变量 ### -Both directives should have the same size and will help you prevent disk writes. The `tmp_table_size` is the maximum amount of size of internal in-memory tables. In case the limit in question is exceeded the table will be converted to on-disk MyISAM table. +这两个变量的大小相同都将帮助你避免将数据直接写入到磁盘中去。`tmp_table_size` 是内置内存表的最大空间,如果超出限值表的大小将被转换到磁盘上的MyISAM表。 -This will affect the database performance. Administrators usually recommend giving 64M for both values for every GB of RAM on the server. +这将影响数据库的性能。管理员通常建议在服务器上设置这两个值为RAM的每GB为64M。 [mysqld] tmp_table_size= 64M max_heap_table_size= 64M -### 10. Enable MySQL Slow query Logs ### +### 10. 开启MySQL慢速查询日志 ### -Logging slow queries can help you determine issues with your database and help you debug them. This can be easily enabled by adding the following values in your MySQL configuration file: +慢查询日志可以帮助你定位数据库的问题,并帮助您调试。在你的MySQL配置文件中添加以下选项来启用: slow-query-log = 1 slow-query-log-file = /var/lib/mysql/mysql-slow.log long_query_time = 1 -The first directive enables the logging of slow queries, while the second one tells MySQL where to store the actual log file. Use `long_query_time` to define the amount of time that is considered long for MySQL query to be completed. +第一个变量开启慢查询日志,第二个告诉MySQL实际的日志文件存储在哪。使用`long_query_time`来定义MySQL查询完成时长。 -### 11. Check for MySQL idle Connections ### +### 11.检查MySQL的空闲连接 ### -Idle connections consume resources and should be interrupted or refreshed when possible. Such connections are in “sleep” state and usually stay that way for long period of time. To look for idled connections you can run the following command: +空闲连接会消耗资源,应中断或者尽可能被刷新。这样的连接都在“sleep”状态并且会保持一段时间。通过以下命令可以查看空闲的连接: # mysqladmin processlist -u root -p | grep “Sleep” -This will show you list of processes that are in sleep state. The event appears when the code is using persistent connection to the database. When using PHP this event can appear when using mysql_pconnect which opens the connection, after that executes queries, removes the authentication and leaves the connection open. This will cause any per-thread buffers to be kept in memory until the thread dies. +这会显示处于睡眠状态的进程列表。当代码使用到数据库持久连接时会出现以下情况。使用PHP调用mysql_pconnect可以打开这个连接,即执行查询,删除认证最后关闭打开的连接。这会导致每个线程的缓冲区被保存在缓存中,直到该线程死亡。 -The first thing you would do here is to check the code and fix it. If you don’t have access to the code that is being ran, you can change the `wait_timeout` directive. The default value is 28800 seconds, while you can safely decrease it to something like 60: +首先你要做的就是检查代码并修复它。如果你不能访问正在运行的代码,你可以修改`wait_timeout`变量。默认值是28800秒,而你可以将其降低到60: wait_timeout=60 -### 12. Choosing Right MySQL Filesystem ### +### 12. 为MySQL选择正确的文件系统 ### -Choosing the right filesystem is vital for your databases. Most important things you need to consider here are – data integrity, performance and ease of administration. +选择正确的文件系统对数据库至关重要。在这里你需要考虑的最重要的事情是 - 数据的完整性,性能和易管理性。 -As per MariaDB’s recommendations, the best file systems are XFS, Ext4 and Btrfs. All of them are enterprise journaling filesystems that can be used with very large files and large storage volumes. +按照MariaDB的建议,最好的文件系统是XFS,ext4或者BTRFS。所有这些都可以作为企业用的日志文件系统,它们可以使用非常大的文件和大容量存储。 -Below you can find some useful information about the three filesystems: +关于这三个文件系统你可以在下面看到一些有用的信息: 注:表格 @@ -251,41 +254,41 @@ Below you can find some useful information about the three filesystems:
-The pros and cons of the Linux filesystems have been extensively covered in our article: +这篇文章将详细介绍Linux文件系统的利与弊: - [Linux Filesystem Explained][7] -### 13. Set MySQL max_allowed_packet ### +### 13. 设置MySQL的`max_allowed_packet` ### -MySQL splits data into packets. Usually a single packet is considered a row that is sent to a client. The `max_allowed_packet` directive defines the maximum size of packet that can be sent. +MySQL的数据被拆分成包发送。通常,单个报文被认为是一次发送到客户端。`max_allowed_pa​​cket`变量可以定义被发送包的大小。 -Setting this value too low can cause a query to stall and you will receive an error in your MySQL error log. It is recommended to set the value to the size of your largest packet. +此值设置得过低可能会导致查询速度变得非常慢,然后你会看到一个错误在MySQL的错误日志中。它建议你将数据包的大小设置成最大。 -### 14. Check MySQL Performance Tuning ### +### 14. 测试MySQL的性能 ### -Measuring your MySQL/MariaDB performance is something that you should do on regular basis. This will help you see if something in the resource usage changes or needs to be improved. +你应该定期检测MySQL/MariaDB的性能。这将帮助你查看资源的使用情况或需要调整某些变量的值。 -There are plenty of tools available for benchmarking, but I would like to suggest you one that is simple and easy to use. The tool is called mysqltuner. +有大量的测试工具可用,但我推荐你一个简单易用的。该工具被称为mysqltuner。 -To download and run it, use the following set of commands: +使用下面的命令下载并运行它: # wget https://github.com/major/MySQLTuner-perl/tarball/master # tar xf master # cd major-MySQLTuner-perl-993bc18/ # ./mysqltuner.pl -You will receive a detailed report about your MySQL usage and recommendation tips. Here is a sample output of default MariaDB installation: +你将收到有关MySQL使用和推荐提示的详细报告。下面是在MariaDB上安装后的默认输出: ![MySQL Performance Tuning](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning.png) -### 15. Optimize and Repair MySQL Databases ### +### 15. 优化和修复MySQL数据库 ### -Sometimes MySQL/MariaDB database tables get crashed quite easily, especially when unexpected server shut down, sudden file system corruption or during copy operation, when database is still accessed. Surprisingly, there is a free open source tool called ‘mysqlcheck‘, which automatically check, repair and optimize databases of all tables in Linux. +有时候MySQL/MariaDB数据库中的表很容易崩溃,尤其是当服务器意外关机时,数据库仍然被访问中或者在执行复制操作,文件系统会突然崩溃。然而,有一个免费的开源工具,被称为'mysqlcheck'的,它会自动检查,修复和优化Linux中数据库的所有表。 # mysqlcheck -u root -p --auto-repair --check --optimize --all-databases # mysqlcheck -u root -p --auto-repair --check --optimize databasename -That’s it! I hope you have found the above article useful and help you tune up your MySQL server. As always if you have any further questions or comments, please submit them in the comment section below. +就是这样!我希望你已经发现了上述文章有用的地方,并帮助你优化你的MySQL服务器。一如往常,如果你有任何问题或意见,请在下面的评论部分提交。 -------------------------------------------------------------------------------- From ec6a22b8bc5e1eee56e962364af4f8f756e71ef2 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 29 Jun 2015 12:51:56 +0800 Subject: [PATCH 1293/2517] [Translated] tech/20150527 How to edit your documents collaboratively on Linux.md --- ...your documents collaboratively on Linux.md | 123 ------------------ ...your documents collaboratively on Linux.md | 122 +++++++++++++++++ 2 files changed, 122 insertions(+), 123 deletions(-) delete mode 100644 sources/tech/20150527 How to edit your documents collaboratively on Linux.md create mode 100644 translated/tech/20150527 How to edit your documents collaboratively on Linux.md diff --git a/sources/tech/20150527 How to edit your documents collaboratively on Linux.md b/sources/tech/20150527 How to edit your documents collaboratively on Linux.md deleted file mode 100644 index 5b528e6165..0000000000 --- a/sources/tech/20150527 How to edit your documents collaboratively on Linux.md +++ /dev/null @@ -1,123 +0,0 @@ -ictlyh Translating -How to edit your documents collaboratively on Linux -================================================================================ -> "Developed many years before by some high-strung, compulsive assistant, the Bulletin was simply a Word document that lived in a shared folder both Emily and I could access. Only one of us could open it at a time and add a new message, thought, or question to the itemized list. Then we'd print out the updated version and place it on the clipboard that sat on the shelf over my desk, removing the old ones as we went." ("The Devil Wears Prada" by Lauren Weisberger) - -Even today such a "collaborative editing" is in use where only one person can open a shared file, make changes to it, and then inform others about what and when was modified. - -ONLYOFFICE is an open source online office suite integrated with different management tools for documents, emails, events, tasks and client relations. - -Using ONLYOFFICE office suite, a group of people can edit text, spreadsheet or presentation within a browser simultaneously. Leave comments directly in their document and interact with each other using the integrated chat. And, finally, save the document as a PDF file for further printing. As an added bonus, it gives the possibility to view the document history and restore the previous revision/version if needed. - -In this tutorial, I will describe how to deploy your own online office suite using [ONLYOFFICE Free Edition][1], an ONLYOFFICE self-hosted version distributed under GNU AGPL v3. - -### Installing ONLYOFFICE on Linux ### - -ONLYOFFICE installation requires the presence of mono (version 4.0.0 or later), nodejs, libstdc++6, nginx and mysql-server in your Linux system. To simplify the installation process and avoid dependency errors, I install ONLYOFFICE using Docker. In this case there is only one dependency to be installed - [Docker][2]. - -Just to remind, Docker is an open-source project that automates the deployment of applications inside software containers. If Docker is not available on your Linux system, install it first by referring to Docker installation instructions for [Debian-based][3] or [Red-Hat based][4] systems. - -Note that you will need Docker 1.4.1 or later. To check the installed Docker version, use the following command. - - $ docker version - -To try ONLYOFFICE inside a Docker container, simply execute the following commands: - - $ sudo docker run -i -t -d --name onlyoffice-document-server onlyoffice/documentserver - $ sudo docker run -i -t -d -p 80:80 -p 443:443 --link onlyoffice-document-server:document_server onlyoffice/communityserver - -These commands will download the [official ONLYOFFICE Docker image][5] with all dependencies needed for its correct work. - -It's also possible to install [ONLYOFFICE Online Editors][6] separately on a Linux server, and easily integrate it into your website or cloud application via API provided. - -### Running a Self-Hosted Online Office ### - -To open your online office, enter localhost (http://IP-Address/) in the address bar of your browser. The Welcome page will open: - -![](https://farm9.staticflickr.com/8815/18116525656_795821c73b_c.jpg) - -Enter a password and specify the email address you will use to access your office the next time. - -### Editing Your Documents Online ### - -First, click the Documents link to open **the My Documents** folder. - -![](https://farm8.staticflickr.com/7781/17956640089_d3df0b18cd_c.jpg) - -#### STEP 1. Select a Document to Edit #### - -To create a new document right there, click on the **Create** button in the upper left corner, and choose the file type from the drop-down list. To edit a file stored on your hard disk drive, upload it to **Documents** clicking the **Upload** button next to **Create** button. - -![](https://farm9.staticflickr.com/8836/17956640109_ed8be735df_c.jpg) - -#### STEP 2. Share your Document #### - -Use the **Share** button to the right side if you are in the **My Documents** folder, or follow **File >> Document Info ... >> Change Access Rights** if you are inside your document. - -In the opened **Sharing Settings** window, click on the **People outside portal** link on the left, open the access to the document, and give full access to it by enabling the **Full Access** radio button. - -Finally, choose a way to share the link to your document, send it via email or one of the available social networks: Google+, Facebook, or Twitter. - -![](https://farm8.staticflickr.com/7766/17522306273_c8a9022c75_c.jpg) - -#### STEP 3. Start the Collaborative Editing #### - -To start co-editing the document, the invited person just needs to follow the provided link. - -The text passages edited by your co-editors will be automatically marked with dashed lines of different colors. - -![](https://farm8.staticflickr.com/7790/18139370292_7ef57aae8f_c.jpg) - -As soon as one of your collaborators saves his/her changes, you will see a note appearing in the left upper corner of the top toolbar, indicating that there areupdates. - -![](https://farm8.staticflickr.com/7778/18143984831_3dd42a9672_c.jpg) - -To save your changes and get updates, click on the **Save** icon. All the updates will then be highlighted. - -![](https://farm8.staticflickr.com/7796/17955172970_e53460b8a6_c.jpg) - -#### STEP 4. Interact with your Co-editors #### - -To leave some comments, select a text passage with the mouse, right-click on it and, and choose the **Add comment** option from the context menu. - -![](https://farm8.staticflickr.com/7771/17956640359_c4e2858dc8_c.jpg) - -To interact with co-editors in real time, use the integrated chat instead. All the users who currently edit the document will be listed on the **Chat** panel. To open it, click on the **Chat** icon at the left-side bar. To start a discussion, enter your message into an appropriate field on the **Chat** panel. - -![](https://farm8.staticflickr.com/7794/18116394026_d93b00e4f8_c.jpg) - -### Useful Tips ### - -As final notes, here are some useful tips for you to take full advantage of ONLYOFFICE. - -#### Tip #1. Editing your Docs from Cloud Storage Services, Like ownCloud #### - -If you store your documents in other web resources like Box, Dropbox, Google Drive, OneDrive, SharePoint or ownCloud, you can easily synchronize them with the ONLYOFFICE. - -In the opened 'Documents' module, click one of the icons under the **Add the account** caption: Google, Box, DropBox, OneDrive, ownCloud or 'Add account', and enter the requested data. - -#### Tip #2. Editing Your Docs on iPad #### - -To add some changes to your document on the go, I use ONLYOFFICE Documents app for iPad. You can download and install it from [iTune][7], then you need to enter your ONLYOFFICE portal address, email and password to access your documents. The feature set is almost the same. - -To evaluate ONLYOFFICE Online Editors features, you can use the [cloud version][8] for personal use. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/edit-documents-collaboratively-linux.html - -作者:[Tatiana Kochedykova][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/tatiana -[1]:http://www.onlyoffice.org/ -[2]:http://xmodulo.com/recommend/dockerbook -[3]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html -[4]:http://xmodulo.com/docker-containers-centos-fedora.html -[5]:https://registry.hub.docker.com/u/onlyoffice/communityserver/ -[6]:http://onlyoffice.org/sources#document -[7]:https://itunes.apple.com/us/app/onlyoffice-documents/id944896972 -[8]:https://personal.onlyoffice.com/ \ No newline at end of file diff --git a/translated/tech/20150527 How to edit your documents collaboratively on Linux.md b/translated/tech/20150527 How to edit your documents collaboratively on Linux.md new file mode 100644 index 0000000000..8fc469bf24 --- /dev/null +++ b/translated/tech/20150527 How to edit your documents collaboratively on Linux.md @@ -0,0 +1,122 @@ +如何在 Linux 上协同编辑文档 +================================================================================ +> “多年前由一些高度紧张、强迫性助理开发的 Bulletin,只是共享文件夹中只有 Emily 和我可以访问的 Word 文档。同一时间我们只有一个人可以打开它并添加消息、想法,或者提问项目列表。然后我们再打印出更新版本并放到我桌子架上的剪贴板,并在退出时删除旧版本。”(Lauren Weisberger 称之为“穿 Prada 的女魔头”) + +直到今天仍然在使用这样的“协同编辑”,只有一个人可以打开共享文件,对其进行更改,然后告诉其它人什么时候修改了什么。 + +ONLYOFFICE 是一款集成了文档、电子邮件、事件、任务和客户关系管理工具的开源在线办公套件。 + +使用 ONLYOFFICE 办公套件,一组人可以同时编辑文本、电子表格或者在浏览器上进行展示。直接在他们的文档上留下评论并用集成的聊天工具和其他人沟通。最后,保存文档为 PDF 文件用于之后的打印。作为额外的增强功能,它还能浏览文档历史并在如果需要时恢复到之前的修订/版本。 + +在这篇教程中,我会介绍如何使用 [免费版 ONLYOFFICE][1] 部署你自己的在线办公套件,免费版 ONLYOFFICE 是 ONLYOFFICE 在 GNU AGPL v3 协议下发布的自托管版本。 + +### 在 Linux 上安装 ONLYOFFICE ### + +安装 ONLYOFFICE 要求在你的 Linux 系统上要有 mono(4.0.0 或更高版本)、nodejs、libstdc++6、nginx 和 mysql-server。为了简化安装过程并避免依赖错误,我使用 Docker 安装 ONLYOFFICE。在这种情况下只需要安装一种依赖 - [Docker][2]。 + +提醒一下,Docker 是一个在软件容器中自动部署应用的开源项目。如果在你的 Linux 系统上 Docker 不可用,首先根据 [基于 Debian][3] 或 [基于 Red-Hat][4] 系统的 Docker 安装指令安装它。 + +注意,你需要 Docker 1.4.1 或更高版本。要检查安装的 Docker 版本,可以使用下面的命令。 + + $ docker version + +在一个 Docker 容器中试用 ONLYOFFICE,只需要执行下面的命令: + + $ sudo docker run -i -t -d --name onlyoffice-document-server onlyoffice/documentserver + $ sudo docker run -i -t -d -p 80:80 -p 443:443 --link onlyoffice-document-server:document_server onlyoffice/communityserver + +这些命令会下载为了能正常运行带有所有所需依赖的 [官方 ONLYOFFICE Docker 镜像][5]。 + +也可以在 Linux 服务器上单独安装 [ONLYOFFICE 在线编辑器][6],并通过提供的 API 轻松地集成到你的站点或云应用。 + +### 运行自托管在线 Office ### + +要打开你的在线 office,在你浏览器的地址栏输入 localhost(http://IP-Address/)。会打开欢迎页面: + +![](https://farm9.staticflickr.com/8815/18116525656_795821c73b_c.jpg) + +输入一个密码并指定下次访问你的 office 所使用的电子邮件地址。 + +### 在线编辑文档 ### + +首先点击 Document 链接打开 **the My Documents** 文件夹。 + +![](https://farm8.staticflickr.com/7781/17956640089_d3df0b18cd_c.jpg) + +#### STEP 1. 选择需要编辑的文档 #### + +要在这里新建一个新文档,点击左上角的 “Create” 按钮,从下拉列表中选择文件类型。要编辑保存在你硬盘中的文件,点击 **Create** 按钮旁边的 **Upload** 按钮上传文件到 **Document**。 + +![](https://farm9.staticflickr.com/8836/17956640109_ed8be735df_c.jpg) + +#### STEP 2. 共享文档 #### + +如果你在 **My Documents** 文件夹中,用右边的 **Share** 按钮,或者如果你在文档中,用 **File >> Document Info ... >> Change Access Rights**。 + +在打开的 **Sharing Settings** 窗口,点击左边的 **People outside portal** 链接,打开到文档的访问,并通过启用 **Full Access** 单选按钮给予完全访问权限。 + +最后,选择一种方式共享到你文档的链接,通过 email 或者你可用的一种社交网络:Google+、Facebook 或 Twitter 发送。 + +![](https://farm8.staticflickr.com/7766/17522306273_c8a9022c75_c.jpg) + +#### STEP 3. 开始协同编辑 #### + +邀请的人只需要根据提供的链接就可以开始协同编辑文档。 + +会自动用不用颜色的虚线将你的合作者编辑的文本段落标记出来。 + +![](https://farm8.staticflickr.com/7790/18139370292_7ef57aae8f_c.jpg) + +只要你的其中一个合作者保存了他的/她的更改,你会看到在顶部工具栏左上角出现了一个注意标签,表示这里有更新。 + +![](https://farm8.staticflickr.com/7778/18143984831_3dd42a9672_c.jpg) + +点击 **Save** 图标保存更改并更新。然后会高亮所有的更新。 + +![](https://farm8.staticflickr.com/7796/17955172970_e53460b8a6_c.jpg) + +#### STEP 4. 和合作者互动 #### + +要写评论,用鼠标选择一个文本段落,右击并从上下文菜单中选择 **Add comment** 选项。 + +![](https://farm8.staticflickr.com/7771/17956640359_c4e2858dc8_c.jpg) + +要和合作者实时互动,可以使用集成的聊天工具。**Chat** 面板会列出所有正在编辑文档的用户。点击左侧边栏的 **Chat** 图标打开它。在 **Chat** 面板的合适区域输入你的信息开始讨论。 + +![](https://farm8.staticflickr.com/7794/18116394026_d93b00e4f8_c.jpg) + +### 有用的提示 ### + +最后,这里有一些你充分利用 ONLYOFFICE 的有用提示。 + +#### Tip #1. 在云存储服务例如 ownCloud 上编辑文档 #### + +如果你将文档存储在其它网络资源上,例如 Box、Dropbox、Google Drive、OneDrive、SharePoint 或 ownCloud,你可以轻松地和 ONLYOFFICE 同步。 + +在打开的 ‘Documents’ 模块,点击 **Add the account** 下面的其中一个图标:Google、Box、DropBox、OneDrive、ownCloud 或 ‘Add account’,并输入所需数据。 + +#### Tip #2. 在 iPad 上编辑文档 #### + +为了在任意时刻添加更改到文档,我使用 iPad 的 ONLYOFFICE Documents 应用。你可以从 [iTune][7] 下载并安装它,然后你需要输入你的 ONLYOFFICE 地址、email 和密码来访问你的文档。功能设置几乎一样。 + +为了评估 ONLYOFFICE 在线编辑器的功能,你可以使用供个人使用的 [云版本][8]。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/edit-documents-collaboratively-linux.html + +作者:[Tatiana Kochedykova][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/tatiana +[1]:http://www.onlyoffice.org/ +[2]:http://xmodulo.com/recommend/dockerbook +[3]:http://xmodulo.com/manage-linux-containers-docker-ubuntu.html +[4]:http://xmodulo.com/docker-containers-centos-fedora.html +[5]:https://registry.hub.docker.com/u/onlyoffice/communityserver/ +[6]:http://onlyoffice.org/sources#document +[7]:https://itunes.apple.com/us/app/onlyoffice-documents/id944896972 +[8]:https://personal.onlyoffice.com/ \ No newline at end of file From 5429023a70acb7df2d624c01f584ea2dcbf5362a Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 29 Jun 2015 12:58:02 +0800 Subject: [PATCH 1294/2517] Create 20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md --- ...erformance Tuning and Optimization Tips.md | 309 ++++++++++++++++++ 1 file changed, 309 insertions(+) create mode 100644 translated/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md diff --git a/translated/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md b/translated/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md new file mode 100644 index 0000000000..061b710c85 --- /dev/null +++ b/translated/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md @@ -0,0 +1,309 @@ + +15 个有用的 MySQL/MariaDB 性能调整和优化技巧 +================================================================================ +MySQL是一个强大的开源关系型数据库管理系统或简称RDBMS。它被发布在1995年(20年前)。它采用的结构化查询语言在数据库管理中可能是最好的选择。最新的MySQL版本是5.6.25,2015年5月29日发行的。 + +尽管有许多关于MySQL有趣的传闻,其中一个有趣的事实是,这个名字来自Michael Widenius(MySQL的创始人)的女儿。本文旨在向您展示一些有用的做法,以帮助您管理您的MySQL服务器。 + +![MySQL Performance Tuning](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning1.png) + +MySQL性能优化 + +2009年4月,MySQL被Oracle收购。其结果导致一个叫MariaDB的社区成立。创建的主要原因是为了保持MySQL项目的自由。 + +今天,MySQL和MariaDB对于Web应用程序像,WordPress, Joomla, Magento和其他的,是使用最广泛的(但不是使用最多的)RDBMS。 + + +这篇文章将告诉你一些基本的,但有用如何优化MySQL / MariaDB性能的技巧。说明,本文假定您已经安装了MySQL或MariaDB。如果你仍然不知道如何在系统上安装它们,你可以按照以下说明去安装: + +- [Installing LAMP on RHEL/CentOS 7][1] +- [Installing LAMP on Fedora 22][2] +- [Setting Up LAMP on Ubuntu 15.04][3] +- [Installing MariaDB on Debian 8][4] +- [Install MariaDB on Gentoo Linux][5] +- [Install MariaDB on Arch Linux][6] + +**说明**: 在开始之前,不要盲目的接受这些建议。每个MySQL的设置是不同的,在进行任何更改之前需要慎重考虑。 + + +你需要明白这些: + +- MySQL/MariaDB配置文件位于 `/etc/my.cnf`. 每次需改此文件后你需要重新启动MySQL服务,以使新更改生效。 +- 这篇文章使用MySQL 5.6版本 。 + +### 1. 启动 InnoDB 的`file-per-table` ### + +首先,它是非常重要的对于解释InnoDB是一个存储引擎。MySQL和MariaDB使用的默认存储引擎是InnoDB。过去,MySQL使用系统表空间来保存数据库中的表和索引。这意味着服务器唯一的目的就是数据库处理,它的存储盘不用于其他的目的。 + +InnoDB提供了更灵活的方式,它把每个数据库的信息保存在一个`.ibd` 数据文件中。像“TRUNCATE”这样的操作可以更快地完成,当删除或截断一个数据库表时,你也可以回收未使用的空间。 + +这种结构的另一个好处是,可以保留一些数据库表在一个单独的存储设备。这可以大大提高你磁盘的I/O负载。 + +MySQL 5.6及以上的版本默认启用`innodb_file_per_table`。你可以在/etc/my.cnf文件中看到。该指令看起来是这样的: + + innodb_file_per_table=1 + +### 2. 将MySQL数据库中的数据放在独立分区上 ### + +**注意**: 此设置只能工作在MySQL上, 而不能在MariaDB上. + +有时OS的读/写操作会减缓你MySQL服务器的性能,尤其是如果位于同一块磁盘上。因此,我建议你使用单独的磁盘(SSD最好)用于MySQL服务。 + +要完成这步,你需要将新的磁盘连接到您的计算机/服务器上。对于这篇文章,我会认为磁盘将被识别为/dev/sdb。 + +下一步将是准备新的分区: + + # fdisk /dev/sdb + +现在按“N”来创建新的分区。接着按“P”,以使其创建为主分区。在此之后,设置分区号为1-4之间。之后,你可以选择分区大小。这里按enter。在接下来的步骤中,你需要配置分区的大小。 + +如果你希望使用全部的磁盘,按一次enter。否则,你需要手动设置新分区的大小。准备就绪后按“w”保存。现在,我们需要为我们的新分区创建一个文件系统。这可以很轻松的完成: + + # mkfs.ext4 /dev/sdb1 + +现在挂载新分区到文件夹下。在根目录下创建一个名为“ssd”的文件夹: + + # mkdir /ssd/ + +挂载新分区到刚才创建的文件夹下: + + # mount /dev/sdb1 /ssd/ + +你可以添加如下行在/etc/fstab文件中设置开机自动挂载: + + /dev/sdb1 /ssd ext3 defaults 0 0 + +现在我们移动MySQL到新磁盘中。首先停止服务: + + # service mysqld stop + +我建议你​​停止Apache/nginx,以及以防止任何操作试图在数据库中写入: + + # service httpd stop + # service nginx stop + +现在我们复制完整的MySQL目录到新分区中: + + # cp /var/lib/mysql /ssd/ -Rp + +这可能需要一段时间,具体取决于你的MySQL数据库的大小。一旦这个过程完成后重命名MySQL的目录: + + # mv /var/lib/mysql /var/lib/mysql-backup + +然后创建一个链接: + + # ln -s /ssd/mysql /var/lib/mysql + +现在启动你的MySQL和web服务: + + # service mysqld start + # service httpd start + # service nginx start + +以后你的数据库将使用新的磁盘访问。 + +### 3. 优化InnoDB的缓冲区 ### + +InnoDB引擎在内存中有一个缓冲数据和索引的缓冲区。这将有助于你在MySQL/MariaDB中的查询更快的执行。选择合适的内存大小对系统的查询来说是非常重要的,并且使你对系统的内存消耗也会有一个更好的认识。 + +下面是你需要考虑的: + +- 其他的进程需要消耗多少内存,包括你的系统进程,表的数量,套接字缓冲区大小。 +- 你的服务器是否专用于MySQL还是你也运行其他非常消耗内存的服务。 + + +在一个专用的机器上,你可能会使用60-70%的内存分配给`innodb_buffer_pool_size`。如果你打算在一个机器上运行多个服务,你应该重新考虑`innodb_buffer_pool_size`的内存大小。 + +你需要设置my.cnf中的此项: + + innodb_buffer_pool_size + +### 4. 在MySQL中避免使用Swappiness ### + +使用交换空间需要一个进程,当系统移动一部分内存到一个空闲的分区中就叫做“swap”。通常当你的系统用完物理内存后就会出现这种情况而不是释放一些RAM,然后将信息写进磁盘中。你可能已经猜测到磁盘比你的内存要慢得多。 + +默认情况下该选项已经启用: + + # sysctl vm.swappiness + + vm.swappiness = 60 + +使用以下命令关闭swappiness: + + # sysctl -w vm.swappiness=0 + +### 5. 设置MySQL的最大连接数 ### + +`max_connections`变量告诉你的服务器当前允许多少并发连接。MySQL/ MariaDB服务器允许的`max_connections` + 1为超级用户给定的值。当连接建立后,执行MySQL查询会有时间的限制 - 之后,它被关闭,新连接可以取代其位置。 + +请记住,太多的连接会导致RAM的使用量过高并且会锁定你的MySQL服务器。一般小网站需要100-200的连接数而较大可能需要500-800甚至更多。这里的值很大程度上取决于你的MySQL/MariaDB的使用情况。 + +你可以动态的改变`max_connections`的值而无需重启MySQL服务器: + + # mysql -u root -p + mysql> set global max_connections := 300; + +### 6. 配置MySQL的`thread_cache_size`变量 ### + + `thread_cache_size`变量用来设置你服务器缓存的线程数量。当客户端断开连接时,如果当前线程数小于`thread_cache_size`,他的线程将被放入缓存中。下一个请求将使用缓存池中的线程来完成。 + +要提高服务器的性能,你可以设置`thread_cache_size`的值相对高一些。你可以通过以下方法来查看线程池的使用情况:: + + mysql> show status like 'Threads_created'; + mysql> show status like 'Connections'; + +你可以用以下公式来计算线程池的使用率: + + 100 - ((Threads_created / Connections) * 100) + +如果你得到一个较低的数字,这意味着大多数mysql连接请求使用新的线程,而不是从缓存加载。在这种情况下,你需要增加`thread_cache_size`。 + +但有一个好处是,`thread_cache_size`可以动态的改变而无需重启MySQL服务。你可以通过以下方式来实现: + + mysql> set global thread_cache_size = 16; + +### 7.禁用MySQL的DNS反向查询 ### + +当新的连接出现时,默认情况下MySQL/MariaDB会使用DNS来解析用户的IP地址/主机名,每个新的连接,它的IP都会被解析为主机名。然后,主机名又被反解析为IP来验证这两个是否一致。 + +当DNS服务器出现问题或者配置有问题时,解析会变得非常慢,这就是为什么要关闭DNS的反向解析,你可以在你的配置文件中添加以下选项去设定: + + [mysqld] + # Skip reverse DNS lookup of clients + skip-name-resolve + +更改后需要重新启动你的MySQL服务器. + +### 8. 配置MySQL的`query_cache_size`变量 ### + +如果你有很多重复的查询或者不经常改变的数据 – 请使用缓存查询。 人们常常不理解`query_cache_size`的实际含义而将此值设置为几十兆,这实际上会降低服务器的性能。 + +背后的原因是,线程需要在更新过程中锁定缓存。通常设置为200-300 MB应该足够了。如果你的网站比较小的,你可以尝试给64M并在以后及时去增加。 + +添加以下选项到你的MySQL配置文件中: + + query_cache_type = 1 + query_cache_limit = 256K + query_cache_min_res_unit = 2k + query_cache_size = 80M + +### 9. 配置`tmp_table_size`变量和`max_heap_table_size`变量 ### + +这两个变量的大小相同都将帮助你避免将数据直接写入到磁盘中去。`tmp_table_size` 是内置内存表的最大空间,如果超出限值表的大小将被转换到磁盘上的MyISAM表。 + +这将影响数据库的性能。管理员通常建议在服务器上设置这两个值为RAM的每GB为64M。 + + [mysqld] + tmp_table_size= 64M + max_heap_table_size= 64M + +### 10. 开启MySQL慢速查询日志 ### + +慢查询日志可以帮助你定位数据库的问题,并帮助您调试。在你的MySQL配置文件中添加以下选项来启用: + + slow-query-log = 1 + slow-query-log-file = /var/lib/mysql/mysql-slow.log + long_query_time = 1 + +第一个变量开启慢查询日志,第二个告诉MySQL实际的日志文件存储在哪。使用`long_query_time`来定义MySQL查询完成时长。 + +### 11.检查MySQL的空闲连接 ### + +空闲连接会消耗资源,应中断或者尽可能被刷新。这样的连接都在“sleep”状态并且会保持一段时间。通过以下命令可以查看空闲的连接: + + # mysqladmin processlist -u root -p | grep “Sleep” + +这会显示处于睡眠状态的进程列表。当代码使用到数据库持久连接时会出现以下情况。使用PHP调用mysql_pconnect可以打开这个连接,即执行查询,删除认证最后关闭打开的连接。这会导致每个线程的缓冲区被保存在缓存中,直到该线程死亡。 + +首先你要做的就是检查代码并修复它。如果你不能访问正在运行的代码,你可以修改`wait_timeout`变量。默认值是28800秒,而你可以将其降低到60: + + wait_timeout=60 + +### 12. 为MySQL选择正确的文件系统 ### + +选择正确的文件系统对数据库至关重要。在这里你需要考虑的最重要的事情是 - 数据的完整性,性能和易管理性。 + +按照MariaDB的建议,最好的文件系统是XFS,ext4或者BTRFS。所有这些都可以作为企业用的日志文件系统,它们可以使用非常大的文件和大容量存储。 + +关于这三个文件系统你可以在下面看到一些有用的信息: + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + +
FilesystemsXFSExt4Btrfs
Maximum filesystem size8EB1EB16EB
Maximum file size8EB16TB16EB
+ +这篇文章将详细介绍Linux文件系统的利与弊: + +- [Linux Filesystem Explained][7] + +### 13. 设置MySQL的`max_allowed_packet` ### + +MySQL的数据被拆分成包发送。通常,单个报文被认为是一次发送到客户端。`max_allowed_pa​​cket`变量可以定义被发送包的大小。 + +此值设置得过低可能会导致查询速度变得非常慢,然后你会看到一个错误在MySQL的错误日志中。它建议你将数据包的大小设置成最大。 + +### 14. 测试MySQL的性能 ### + +你应该定期检测MySQL/MariaDB的性能。这将帮助你查看资源的使用情况或需要调整某些变量的值。 + +有大量的测试工具可用,但我推荐你一个简单易用的。该工具被称为mysqltuner。 + +使用下面的命令下载并运行它: + + # wget https://github.com/major/MySQLTuner-perl/tarball/master + # tar xf master + # cd major-MySQLTuner-perl-993bc18/ + # ./mysqltuner.pl + +你将收到有关MySQL使用和推荐提示的详细报告。下面是在MariaDB上安装后的默认输出: + +![MySQL Performance Tuning](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning.png) + +### 15. 优化和修复MySQL数据库 ### + +有时候MySQL/MariaDB数据库中的表很容易崩溃,尤其是当服务器意外关机时,数据库仍然被访问中或者在执行复制操作,文件系统会突然崩溃。然而,有一个免费的开源工具,被称为'mysqlcheck'的,它会自动检查,修复和优化Linux中数据库的所有表。 + + # mysqlcheck -u root -p --auto-repair --check --optimize --all-databases + # mysqlcheck -u root -p --auto-repair --check --optimize databasename + +就是这样!我希望你已经发现了上述文章有用的地方,并帮助你优化你的MySQL服务器。一如往常,如果你有任何问题或意见,请在下面的评论部分提交。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/ + +作者:[Marin Todorov][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/marintodorov89/ +[1]:http://www.tecmint.com/install-lamp-in-centos-7/ +[2]:http://www.tecmint.com/install-lamp-linux-apache-mysql-php-on-fedora-22/ +[3]:http://www.tecmint.com/install-lamp-on-ubuntu-15-04/ +[4]:http://www.tecmint.com/install-mariadb-in-debian/ +[5]:http://www.tecmint.com/install-lemp-in-gentoo-linux/ +[6]:http://www.tecmint.com/install-lamp-in-arch-linux/ +[7]:http://www.tecmint.com/linux-file-system-explained/ From 52dd6cecdcf10b559b36411b1d5fa3229b55dd47 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 29 Jun 2015 12:58:51 +0800 Subject: [PATCH 1295/2517] Delete 20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md --- ...erformance Tuning and Optimization Tips.md | 310 ------------------ 1 file changed, 310 deletions(-) delete mode 100644 sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md diff --git a/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md b/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md deleted file mode 100644 index 942381170e..0000000000 --- a/sources/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md +++ /dev/null @@ -1,310 +0,0 @@ -translated - -15 个有用的 MySQL/MariaDB 性能调整和优化技巧 -================================================================================ -MySQL是一个强大的开源关系型数据库管理系统或简称RDBMS。它被发布在1995年(20年前)。它采用的结构化查询语言在数据库管理中可能是最好的选择。最新的MySQL版本是5.6.25,2015年5月29日发行的。 - -尽管有许多关于MySQL有趣的传闻,其中一个有趣的事实是,这个名字来自Michael Widenius(MySQL的创始人)的女儿。本文旨在向您展示一些有用的做法,以帮助您管理您的MySQL服务器。 - -![MySQL Performance Tuning](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning1.png) - -MySQL性能优化 - -2009年4月,MySQL被Oracle收购。其结果导致一个叫MariaDB的社区成立。创建的主要原因是为了保持MySQL项目的自由。 - -今天,MySQL和MariaDB对于Web应用程序像,WordPress, Joomla, Magento和其他的,是使用最广泛的(但不是使用最多的)RDBMS。 - - -这篇文章将告诉你一些基本的,但有用如何优化MySQL / MariaDB性能的技巧。说明,本文假定您已经安装了MySQL或MariaDB。如果你仍然不知道如何在系统上安装它们,你可以按照以下说明去安装: - -- [Installing LAMP on RHEL/CentOS 7][1] -- [Installing LAMP on Fedora 22][2] -- [Setting Up LAMP on Ubuntu 15.04][3] -- [Installing MariaDB on Debian 8][4] -- [Install MariaDB on Gentoo Linux][5] -- [Install MariaDB on Arch Linux][6] - -**说明**: 在开始之前,不要盲目的接受这些建议。每个MySQL的设置是不同的,在进行任何更改之前需要慎重考虑。 - - -你需要明白这些: - -- MySQL/MariaDB配置文件位于 `/etc/my.cnf`. 每次需改此文件后你需要重新启动MySQL服务,以使新更改生效。 -- 这篇文章使用MySQL 5.6版本 。 - -### 1. 启动 InnoDB 的`file-per-table` ### - -首先,它是非常重要的对于解释InnoDB是一个存储引擎。MySQL和MariaDB使用的默认存储引擎是InnoDB。过去,MySQL使用系统表空间来保存数据库中的表和索引。这意味着服务器唯一的目的就是数据库处理,它的存储盘不用于其他的目的。 - -InnoDB提供了更灵活的方式,它把每个数据库的信息保存在一个`.ibd` 数据文件中。像“TRUNCATE”这样的操作可以更快地完成,当删除或截断一个数据库表时,你也可以回收未使用的空间。 - -这种结构的另一个好处是,可以保留一些数据库表在一个单独的存储设备。这可以大大提高你磁盘的I/O负载。 - -MySQL 5.6及以上的版本默认启用`innodb_file_per_table`。你可以在/etc/my.cnf文件中看到。该指令看起来是这样的: - - innodb_file_per_table=1 - -### 2. 将MySQL数据库中的数据放在独立分区上 ### - -**注意**: 此设置只能工作在MySQL上, 而不能在MariaDB上. - -有时OS的读/写操作会减缓你MySQL服务器的性能,尤其是如果位于同一块磁盘上。因此,我建议你使用单独的磁盘(SSD最好)用于MySQL服务。 - -要完成这步,你需要将新的磁盘连接到您的计算机/服务器上。对于这篇文章,我会认为磁盘将被识别为/dev/sdb。 - -下一步将是准备新的分区: - - # fdisk /dev/sdb - -现在按“N”来创建新的分区。接着按“P”,以使其创建为主分区。在此之后,设置分区号为1-4之间。之后,你可以选择分区大小。这里按enter。在接下来的步骤中,你需要配置分区的大小。 - -如果你希望使用全部的磁盘,按一次enter。否则,你需要手动设置新分区的大小。准备就绪后按“w”保存。现在,我们需要为我们的新分区创建一个文件系统。这可以很轻松的完成: - - # mkfs.ext4 /dev/sdb1 - -现在挂载新分区到文件夹下。在根目录下创建一个名为“ssd”的文件夹: - - # mkdir /ssd/ - -挂载新分区到刚才创建的文件夹下: - - # mount /dev/sdb1 /ssd/ - -你可以添加如下行在/etc/fstab文件中设置开机自动挂载: - - /dev/sdb1 /ssd ext3 defaults 0 0 - -现在我们移动MySQL到新磁盘中。首先停止服务: - - # service mysqld stop - -我建议你​​停止Apache/nginx,以及以防止任何操作试图在数据库中写入: - - # service httpd stop - # service nginx stop - -现在我们复制完整的MySQL目录到新分区中: - - # cp /var/lib/mysql /ssd/ -Rp - -这可能需要一段时间,具体取决于你的MySQL数据库的大小。一旦这个过程完成后重命名MySQL的目录: - - # mv /var/lib/mysql /var/lib/mysql-backup - -然后创建一个链接: - - # ln -s /ssd/mysql /var/lib/mysql - -现在启动你的MySQL和web服务: - - # service mysqld start - # service httpd start - # service nginx start - -以后你的数据库将使用新的磁盘访问。 - -### 3. 优化InnoDB的缓冲区 ### - -InnoDB引擎在内存中有一个缓冲数据和索引的缓冲区。这将有助于你在MySQL/MariaDB中的查询更快的执行。选择合适的内存大小对系统的查询来说是非常重要的,并且使你对系统的内存消耗也会有一个更好的认识。 - -下面是你需要考虑的: - -- 其他的进程需要消耗多少内存,包括你的系统进程,表的数量,套接字缓冲区大小。 -- 你的服务器是否专用于MySQL还是你也运行其他非常消耗内存的服务。 - - -在一个专用的机器上,你可能会使用60-70%的内存分配给`innodb_buffer_pool_size`。如果你打算在一个机器上运行多个服务,你应该重新考虑`innodb_buffer_pool_size`的内存大小。 - -你需要设置my.cnf中的此项: - - innodb_buffer_pool_size - -### 4. 在MySQL中避免使用Swappiness ### - -使用交换空间需要一个进程,当系统移动一部分内存到一个空闲的分区中就叫做“swap”。通常当你的系统用完物理内存后就会出现这种情况而不是释放一些RAM,然后将信息写进磁盘中。你可能已经猜测到磁盘比你的内存要慢得多。 - -默认情况下该选项已经启用: - - # sysctl vm.swappiness - - vm.swappiness = 60 - -使用以下命令关闭swappiness: - - # sysctl -w vm.swappiness=0 - -### 5. 设置MySQL的最大连接数 ### - -`max_connections`变量告诉你的服务器当前允许多少并发连接。MySQL/ MariaDB服务器允许的`max_connections` + 1为超级用户给定的值。当连接建立后,执行MySQL查询会有时间的限制 - 之后,它被关闭,新连接可以取代其位置。 - -请记住,太多的连接会导致RAM的使用量过高并且会锁定你的MySQL服务器。一般小网站需要100-200的连接数而较大可能需要500-800甚至更多。这里的值很大程度上取决于你的MySQL/MariaDB的使用情况。 - -你可以动态的改变`max_connections`的值而无需重启MySQL服务器: - - # mysql -u root -p - mysql> set global max_connections := 300; - -### 6. 配置MySQL的`thread_cache_size`变量 ### - - `thread_cache_size`变量用来设置你服务器缓存的线程数量。当客户端断开连接时,如果当前线程数小于`thread_cache_size`,他的线程将被放入缓存中。下一个请求将使用缓存池中的线程来完成。 - -要提高服务器的性能,你可以设置`thread_cache_size`的值相对高一些。你可以通过以下方法来查看线程池的使用情况:: - - mysql> show status like 'Threads_created'; - mysql> show status like 'Connections'; - -你可以用以下公式来计算线程池的使用率: - - 100 - ((Threads_created / Connections) * 100) - -如果你得到一个较低的数字,这意味着大多数mysql连接请求使用新的线程,而不是从缓存加载。在这种情况下,你需要增加`thread_cache_size`。 - -但有一个好处是,`thread_cache_size`可以动态的改变而无需重启MySQL服务。你可以通过以下方式来实现: - - mysql> set global thread_cache_size = 16; - -### 7.禁用MySQL的DNS反向查询 ### - -当新的连接出现时,默认情况下MySQL/MariaDB会使用DNS来解析用户的IP地址/主机名,每个新的连接,它的IP都会被解析为主机名。然后,主机名又被反解析为IP来验证这两个是否一致。 - -当DNS服务器出现问题或者配置有问题时,解析会变得非常慢,这就是为什么要关闭DNS的反向解析,你可以在你的配置文件中添加以下选项去设定: - - [mysqld] - # Skip reverse DNS lookup of clients - skip-name-resolve - -更改后需要重新启动你的MySQL服务器. - -### 8. 配置MySQL的`query_cache_size`变量 ### - -如果你有很多重复的查询或者不经常改变的数据 – 请使用缓存查询。 人们常常不理解`query_cache_size`的实际含义而将此值设置为几十兆,这实际上会降低服务器的性能。 - -背后的原因是,线程需要在更新过程中锁定缓存。通常设置为200-300 MB应该足够了。如果你的网站比较小的,你可以尝试给64M并在以后及时去增加。 - -添加以下选项到你的MySQL配置文件中: - - query_cache_type = 1 - query_cache_limit = 256K - query_cache_min_res_unit = 2k - query_cache_size = 80M - -### 9. 配置`tmp_table_size`变量和`max_heap_table_size`变量 ### - -这两个变量的大小相同都将帮助你避免将数据直接写入到磁盘中去。`tmp_table_size` 是内置内存表的最大空间,如果超出限值表的大小将被转换到磁盘上的MyISAM表。 - -这将影响数据库的性能。管理员通常建议在服务器上设置这两个值为RAM的每GB为64M。 - - [mysqld] - tmp_table_size= 64M - max_heap_table_size= 64M - -### 10. 开启MySQL慢速查询日志 ### - -慢查询日志可以帮助你定位数据库的问题,并帮助您调试。在你的MySQL配置文件中添加以下选项来启用: - - slow-query-log = 1 - slow-query-log-file = /var/lib/mysql/mysql-slow.log - long_query_time = 1 - -第一个变量开启慢查询日志,第二个告诉MySQL实际的日志文件存储在哪。使用`long_query_time`来定义MySQL查询完成时长。 - -### 11.检查MySQL的空闲连接 ### - -空闲连接会消耗资源,应中断或者尽可能被刷新。这样的连接都在“sleep”状态并且会保持一段时间。通过以下命令可以查看空闲的连接: - - # mysqladmin processlist -u root -p | grep “Sleep” - -这会显示处于睡眠状态的进程列表。当代码使用到数据库持久连接时会出现以下情况。使用PHP调用mysql_pconnect可以打开这个连接,即执行查询,删除认证最后关闭打开的连接。这会导致每个线程的缓冲区被保存在缓存中,直到该线程死亡。 - -首先你要做的就是检查代码并修复它。如果你不能访问正在运行的代码,你可以修改`wait_timeout`变量。默认值是28800秒,而你可以将其降低到60: - - wait_timeout=60 - -### 12. 为MySQL选择正确的文件系统 ### - -选择正确的文件系统对数据库至关重要。在这里你需要考虑的最重要的事情是 - 数据的完整性,性能和易管理性。 - -按照MariaDB的建议,最好的文件系统是XFS,ext4或者BTRFS。所有这些都可以作为企业用的日志文件系统,它们可以使用非常大的文件和大容量存储。 - -关于这三个文件系统你可以在下面看到一些有用的信息: - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - -
FilesystemsXFSExt4Btrfs
Maximum filesystem size8EB1EB16EB
Maximum file size8EB16TB16EB
- -这篇文章将详细介绍Linux文件系统的利与弊: - -- [Linux Filesystem Explained][7] - -### 13. 设置MySQL的`max_allowed_packet` ### - -MySQL的数据被拆分成包发送。通常,单个报文被认为是一次发送到客户端。`max_allowed_pa​​cket`变量可以定义被发送包的大小。 - -此值设置得过低可能会导致查询速度变得非常慢,然后你会看到一个错误在MySQL的错误日志中。它建议你将数据包的大小设置成最大。 - -### 14. 测试MySQL的性能 ### - -你应该定期检测MySQL/MariaDB的性能。这将帮助你查看资源的使用情况或需要调整某些变量的值。 - -有大量的测试工具可用,但我推荐你一个简单易用的。该工具被称为mysqltuner。 - -使用下面的命令下载并运行它: - - # wget https://github.com/major/MySQLTuner-perl/tarball/master - # tar xf master - # cd major-MySQLTuner-perl-993bc18/ - # ./mysqltuner.pl - -你将收到有关MySQL使用和推荐提示的详细报告。下面是在MariaDB上安装后的默认输出: - -![MySQL Performance Tuning](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning.png) - -### 15. 优化和修复MySQL数据库 ### - -有时候MySQL/MariaDB数据库中的表很容易崩溃,尤其是当服务器意外关机时,数据库仍然被访问中或者在执行复制操作,文件系统会突然崩溃。然而,有一个免费的开源工具,被称为'mysqlcheck'的,它会自动检查,修复和优化Linux中数据库的所有表。 - - # mysqlcheck -u root -p --auto-repair --check --optimize --all-databases - # mysqlcheck -u root -p --auto-repair --check --optimize databasename - -就是这样!我希望你已经发现了上述文章有用的地方,并帮助你优化你的MySQL服务器。一如往常,如果你有任何问题或意见,请在下面的评论部分提交。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/ - -作者:[Marin Todorov][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/marintodorov89/ -[1]:http://www.tecmint.com/install-lamp-in-centos-7/ -[2]:http://www.tecmint.com/install-lamp-linux-apache-mysql-php-on-fedora-22/ -[3]:http://www.tecmint.com/install-lamp-on-ubuntu-15-04/ -[4]:http://www.tecmint.com/install-mariadb-in-debian/ -[5]:http://www.tecmint.com/install-lemp-in-gentoo-linux/ -[6]:http://www.tecmint.com/install-lamp-in-arch-linux/ -[7]:http://www.tecmint.com/linux-file-system-explained/ From 43b2c93c60a4cfb517b65eabac3bfb6b1255ed63 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 29 Jun 2015 14:47:19 +0800 Subject: [PATCH 1296/2517] translating by ZTinoZ --- ...0625 Screen Capture Made Easy with these Dedicated Tools.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md index 15fca199a2..822cbf3651 100644 --- a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md +++ b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md @@ -1,3 +1,4 @@ +translating by ZTinoZ Screen Capture Made Easy with these Dedicated Tools ================================================================================ "A picture is worth a thousand words", a phrase which emerged in the USA in the early part of the 20th century, refers to the notion that a single still image can present as much information as a large amount of descriptive text. Essentially, pictures convey information more effectively and efficiently than words can. @@ -149,4 +150,4 @@ via: http://www.linuxlinks.com/article/2015062316235249/ScreenCapture.html [1]:http://shutter-project.org/ [2]:http://thehive.xbee.net/ [3]:https://screencloud.net/ -[4]:https://www.kde.org/applications/graphics/ksnapshot/ \ No newline at end of file +[4]:https://www.kde.org/applications/graphics/ksnapshot/ From 4d50d89fdf135955f8d20304a2626c0cf726ab84 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 29 Jun 2015 15:10:39 +0800 Subject: [PATCH 1297/2517] =?UTF-8?q?20150629-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...th these DeDuplicating Encryption Tools.md | 158 +++++++++++++ ...n Of Atom Code Editor Has Been Released.md | 68 ++++++ ...n mkdir, tar and kill Commands in Linux.md | 206 ++++++++++++++++ ...nd to Quickly Navigate Linux Filesystem.md | 222 ++++++++++++++++++ 4 files changed, 654 insertions(+) create mode 100644 sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md create mode 100644 sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md create mode 100644 sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md create mode 100644 sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md diff --git a/sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md b/sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md new file mode 100644 index 0000000000..c6fe06832a --- /dev/null +++ b/sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md @@ -0,0 +1,158 @@ +Backup with these DeDuplicating Encryption Tools +================================================================================ +Data is growing both in volume and value. It is becoming increasingly important to be able to back up and restore this information quickly and reliably. As society has adapted to technology and learned how to depend on computers and mobile devices, there are few that can deal with the reality of losing important data. Of firms that suffer the loss of data, 30% fold within a year, 70% cease trading within five years. This highlights the value of data. + +With data growing in volume, improving storage utilization is pretty important. In computing, data deduplication is a specialized data compression technique for eliminating duplicate copies of repeating data. This technique therefore improves storage utilization. + +Data is not only of interest to its creator. Governments, competitors, criminals, snoopers may be very keen to access your data. They might want to steal your data, extort money from you, or see what you are up to. Enryption is essential to protect your data. + +So the solution is a deduplicating encrypting backup software. + +Making file backups is an essential activity for all users, yet many users do not take adequate steps to protect their data. Whether a computer is being used in a corporate environment, or for private use, the machine's hard disk may fail without any warning signs. Alternatively, some data loss occurs as a result of human error. Without regular backups being made, data will inevitably be lost even if the services of a specialist recovery organisation are used. + +This article provides a quick roundup of 6 deduplicating encryption backup tools. + +---------- + +### Attic ### + +Attic is a deduplicating, encrypted, authenticated and compressed backup program written in Python. The main goal of Attic is to provide an efficient and secure way to backup data. The data deduplication technique used makes Attic suitable for daily backups since only the changes are stored. + +Features include: + +- Easy to use +- Space efficient storage variable block size deduplication is used to reduce the number of bytes stored by detecting redundant data +- Optional data encryption using 256-bit AES encryption. Data integrity and authenticity is verified using HMAC-SHA256 +- Off-site backups with SDSH +- Backups mountable as filesystems + +Website: [attic-backup.org][1] + +---------- + +### Borg ### + +Borg is a fork of Attic. It is a secure open source backup program designed for efficient data storage where only new or modified data is stored. + +The main goal of Borg is to provide an efficient and secure way to backup data. The data deduplication technique used makes Borg suitable for daily backups since only the changes are stored. The authenticated encryption makes it suitable for backups to not fully trusted targets. + +Borg is written in Python. Borg was created in May 2015 in response to the difficulty of getting new code or larger changes incorporated into Attic. + +Features include: + +- Easy to use +- Space efficient storage variable block size deduplication is used to reduce the number of bytes stored by detecting redundant data +- Optional data encryption using 256-bit AES encryption. Data integrity and authenticity is verified using HMAC-SHA256 +- Off-site backups with SDSH +- Backups mountable as filesystems + +Borg is not compatible with Attic. + +Website: [borgbackup.github.io/borgbackup][2] + +---------- + +### Obnam ### + +Obnam (OBligatory NAMe) is an easy to use, secure Python based backup program. Backups can be stored on local hard disks, or online via the SSH SFTP protocol. The backup server, if used, does not require any special software, on top of SSH. + +Obnam performs de-duplication by splitting up file data into chunks, and storing those individually. Generations are incremental backups; Every backup generation looks like a fresh snapshot, but is really incremental. Obnam is developed by Lars Wirzenius. + +Features include: + +- Easy to use +- Snapshot backups +- Data de-duplication, across files, and backup generations +- Encrypted backups, using GnuPG +- Backup multiple clients to a single repository +- Backup checkpoints (creates a "save" every 100MBs or so) +- Number of options for performance tuning including lru-size and/or upload-queue-size +- MD5 checksum algorithm for recognising duplicate data chunks +- Store backups to a server via SFTP +- Supports both push (i.e. Run on the client) and pull (i.e. Run on the server) methods + +Website: [obnam.org][3] + +---------- + +### Duplicity ### + +Duplicity incrementally backs up files and directory by encrypting tar-format volumes with GnuPG and uploading them to a remote (or local) file server. To transmit data it can use ssh/scp, local file access, rsync, ftp, and Amazon S3. + +Because duplicity uses librsync, the incremental archives are space efficient and only record the parts of files that have changed since the last backup. As the software uses GnuPG to encrypt and/or sign these archives, they will be safe from spying and/or modification by the server. + +Currently duplicity supports deleted files, full unix permissions, directories, symbolic links, fifos, etc. + +The duplicity package also includes the rdiffdir utility. Rdiffdir is an extension of librsync's rdiff to directories; it can be used to produce signatures and deltas of directories as well as regular files. + +Features include: + +- Simple to use +- Encrypted and signed archives (using GnuPG) +- Bandwidth and space efficient, using the rsync algorithm +- Standard file format +- Choice of remote protocol + - Local storage + - scp/ssh + - ftp + - rsync + - HSI + - WebDAV + - Amazon S3 + +Website: [duplicity.nongnu.org][4] + +---------- + +### ZBackup ### + +ZBackup is a versatile globally-deduplicating backup tool. + +Features include: + +- Parallel LZMA or LZO compression of the stored data. You can mix LZMA and LZO in a repository +- Built-in AES encryption of the stored data +- Possibility to delete old backup data +- Use of a 64-bit rolling hash, keeping the amount of soft collisions to zero +- Repository consists of immutable files. No existing files are ever modified +- Written in C++ only with only modest library dependencies +- Safe to use in production +- Possibility to exchange data between repos without recompression +- Uses a 64-bit modified Rabin-Karp rolling hash + +Website: [zbackup.org][5] + +---------- + +### bup ### + +bup is a program written in Python that backs things up. It's short for "backup". It provides an efficient way to backup a system based on the git packfile format, providing fast incremental saves and global deduplication (among and within files, including virtual machine images). + +bup is released under the LGPL version 2 license. + +Features include: + +- Global deduplication (among and within files, including virtual machine images) +- Uses a rolling checksum algorithm (similar to rsync) to split large files into chunks +- Uses the packfile format from git +- Writes packfiles directly offering fast incremental saves +- Can use "par2" redundancy to recover corrupted backups +- Mount your bup repository as a FUSE filesystem + +Website: [bup.github.io][6] + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150628060000607/BackupTools.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://attic-backup.org/ +[2]:https://borgbackup.github.io/borgbackup/ +[3]:http://obnam.org/ +[4]:http://duplicity.nongnu.org/ +[5]:http://zbackup.org/ +[6]:https://bup.github.io/ \ No newline at end of file diff --git a/sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md b/sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md new file mode 100644 index 0000000000..a316615a6c --- /dev/null +++ b/sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md @@ -0,0 +1,68 @@ +First Stable Version Of Atom Code Editor Has Been Released +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Atom_stable.png) + +[Atom 1.0][1] is here. One of the [best open source code editors][2], [Atom][3] was available for public uses for almost a year but this is the first stable version of the most talked about text/code editor of recent times. Promoted as the “hackable text editor for 21st century”, this project of [Github][4] has already been downloaded 1.5 million times in the past and currently it has over 350,000 monthly active users. + +### It’s been a long time ### + +Rome was not built in a day and neither was Atom. Since it was first conceptualized in 2008 till the first stable release this month, it has taken several years and hundreds of contributors from across the globe, along with main developers working on Atom core. A quick look at the journey of Atom can be seen in the picture below: + +![Image credit: Atom](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Atom_stable_timeline.jpeg) +Image credit: Atom + +### Back to the future ### + +This launch of Atom 1.0 is announced with a retro video showing the capabilities of the editor. Resembling to 70’s science fiction TV series, this will be the coolest video you are going to watch today :) + +注:youtube视频,不行做个链接吧 + + +### Features of Atom text editor ### + +- Cross-platform editing +- Built-in package manager +- Smart autocompletion +- File system browser +- Multiple panes +- Find and replace +- Highly customizable +- Modern look + +### Get Atom 1.0 ### + +Atom 1.0 is available for Linux, Windows and Mac OS X. For Debian based Linux distributions such as Ubuntu and Linux Mint, Atom provides .deb binaries. For Fedora, it also has .rpm binaries. You can also get the source code, if you like. The links below will let you download the latest stable version. + +- [Atom .deb][5] +- [Atom .rpm][6] +- [Atom Source Code][7] + +If you prefer, you can [install Atom in Ubuntu using PPA][8]. The PPA is not official though. + +注:下面是一个调查,可以发布的时候在文章内发布个调查 + +#### Are you excited about Atom? #### + +- Oh Yes! This is the best thing that could happen to programmers. +- Not really. I have seen better editors. +- Don't care. My default text editor does the job just fine. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/atom-stable-released/ + +作者:[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://blog.atom.io/2015/06/25/atom-1-0.html +[2]:http://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[3]:https://atom.io/ +[4]:https://github.com/ +[5]:https://atom.io/download/deb +[6]:https://atom.io/download/rpm +[7]:https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md +[8]:http://itsfoss.com/install-atom-text-editor-ubuntu-1404-linux-mint-17/ \ No newline at end of file diff --git a/sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md b/sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md new file mode 100644 index 0000000000..74b5126246 --- /dev/null +++ b/sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md @@ -0,0 +1,206 @@ +4 Useful Tips on mkdir, tar and kill Commands in Linux +================================================================================ +We keep on accomplishing a task conventionally until we come to know that it can be done in a much better way the other way. In continuation of our [Linux Tips and Trick Series][1], I am here with the below four tips that will going to help you in lots of ways. Here we go! + +![Linux Useful Tips](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Useful-Tips.jpg) + +4 Linux Useful Tips and Hacks + +### 1. You are supposed to create a long/complex directory tree similar to given below. What is the most effective way to achieve this? ### + +Directory tree structure to achieve as suggested below. + + $ cd /home/$USER/Desktop + $ mkdir tecmint + $ mkdir tecmint/etc + $ mkdir tecmint/lib + $ mkdir tecmint/usr + $ mkdir tecmint/bin + $ mkdir tecmint/tmp + $ mkdir tecmint/opt + $ mkdir tecmint/var + $ mkdir tecmint/etc/x1 + $ mkdir tecmint/usr/x2 + $ mkdir tecmint/usr/x3 + $ mkdir tecmint/tmp/Y1 + $ mkdir tecmint/tmp/Y2 + $ mkdir tecmint/tmp/Y3 + $ mkdir tecmint/tmp/Y3/z + +The above scenario can simply be achieved by running the below 1-liner command. + + $ mkdir -p /home/$USER/Desktop/tecmint/{etc/x1,lib,usr/{x2,x3},bin,tmp/{Y1,Y2,Y3/z},opt,var} + +To verify you may use tree command. If not installed you may apt or yum the package ‘tree‘. + + $ tree tecmint + +![Check Directory Structure](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Directory-Structure.png) + +Check Directory Structure + +We can create directory tree structure of any complexity using the above way. Notice it is nothing other than a normal command but its using `{}` to create hierarchy of directories. This may prove very helpful if used from inside of a shell script when required and in general. + +### 2. Create a file (say test) on your Desktop (/home/$USER/Desktop) and populate it with the below contents. ### + + ABC + DEF + GHI + JKL + MNO + PQR + STU + VWX + Y + Z + +What a normal user would do in this scenario? + +a. He will create the file first, preferably using [touch command][2], as: + + $ touch /home/$USER/Desktop/test + +b. He will use a text editor to open the file, which may be nano, vim, or any other editor. + + $ nano /home/$USER/Desktop/test + +c. He will then place the above text into this file, save and exit. + +So regardless of time taken by him/her, he need at-least 3 steps to execute the above scenario. + +What a smart experienced Linux-er will do? He will just type the below text in one-go on terminal and all done. He need not do each action separately. + + cat << EOF > /home/$USER/Desktop/test + ABC + DEF + GHI + JKL + MNO + PQR + STU + VWX + Y + Z + EOF + +You may use ‘cat‘ command to check if the file and its content were created successfully or not. + + $ cat /home/avi/Desktop/test + +![Check File Content](http://www.tecmint.com/wp-content/uploads/2015/06/Check-File-Content.gif) + +### 3. We deal with archives (specially TAR balls) very often on Linux. In many cases we have to use that TAR ball on some location other than Downloads folder. What we do in this scenario? ### + +We normally do two things in this scenario. + +a. Copy/Move the tar ball and extract it at destination, as: + + $ cp firefox-37.0.2.tar.bz2 /opt/ + or + $ mv firefox-37.0.2.tar.bz2 /opt/ + +b. cd to /opt/ directory. + + $ cd /opt/ + +c. Extract the Tarball. + + # tar -jxvf firefox-37.0.2.tar.bz2 + +We can do this the other way around. + +We will extract the Tarball where it is and Copy/Move the extracted archive to the required destination as: + + $ tar -jxvf firefox-37.0.2.tar.bz2 + $ cp -R firefox/ /opt/ + or + $ mv firefox/ /opt/ + +In either case the work is taking two or steps to complete. The professional can complete this task in one step as: + + $ tar -jxvf firefox-37.0.2.tar.bz2 -C /opt/ + +The option -C makes tar extract the archive in the specified folder (here /opt/). + +No it is not about an option (-C) but it is about habits. Make a habit of using option -C with tar. It will ease your life. From now don’t move the archive or copy/move the extracted file, just leave the TAR-ball in the Downloads folder and extract it anywhere you want. + +### 4. How we kill a process in a traditional way? ### + +In most general way, we first list all the process using command `ps -A` and pipeline it with grep to find a process/service (say apache2), simply as: + + $ ps -A | grep -i apache2 + +#### Sample Output #### + + 1006 ? 00:00:00 apache2 + 2702 ? 00:00:00 apache2 + 2703 ? 00:00:00 apache2 + 2704 ? 00:00:00 apache2 + 2705 ? 00:00:00 apache2 + 2706 ? 00:00:00 apache2 + 2707 ? 00:00:00 apache2 + +The above output shows all currently running apache2 processes with their PID’s, you can then use these PID’s to kill apache2 with the help of following command. + + # kill 1006 2702 2703 2704 2705 2706 2707 + +and then cross check if any process/service with the name ‘apache2‘ is running or not, as: + + $ ps -A | grep -i apache2 + +However we can do it in a more understandable format using utilities like pgrep and pkill. You may find relevant information about a process just by using pgrep. Say you have to find the process information for apache2, you may simply do: + + $ pgrep apache2 + +#### Sample Output #### + + 15396 + 15400 + 15401 + 15402 + 15403 + 15404 + 15405 + +You may also list process name against pid by running. + + $ pgrep -l apache2 + +#### Sample Output #### + + 15396 apache2 + 15400 apache2 + 15401 apache2 + 15402 apache2 + 15403 apache2 + 15404 apache2 + 15405 apache2 + +To kill a process using pkill is very simple. You just type the name of resource to kill and you are done. I have written a post on pkill which you may like to refer here : [http://www.tecmint.com/how-to-kill-a-process-in-linux/][3]. + +To kill a process (say apache2) using pkill, all you need to do is: + + # pkill apache2 + +You may verify if apache2 has been killed or not by running the below command. + + $ pgrep -l apache2 + +It returns the prompt and prints nothing means there is no process running by the name of apache2. + +That’s all for now, from me. All the above discussed point are not enough but will surely help. We not only mean to produce tutorials to make you learn something new every-time but also want to show ‘How to be more productive in the same frame‘. Provide us with your valuable feedback in the comments below. Keep connected. Keep Commenting. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/mkdir-tar-and-kill-commands-in-linux/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/tag/linux-tricks/ +[2]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ +[3]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ \ No newline at end of file diff --git a/sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md b/sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md new file mode 100644 index 0000000000..d7d1cdf7ee --- /dev/null +++ b/sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md @@ -0,0 +1,222 @@ +Autojump – An Advanced ‘cd’ Command to Quickly Navigate Linux Filesystem +================================================================================ +Those Linux users who mainly work with Linux command Line via console/terminal feels the real power of Linux. However it may sometimes be painful to navigate inside Linux Hierarchical file system, specially for the newbies. + +There is a Linux Command-line utility called ‘autojump‘ written in Python, which is an advanced version of Linux ‘[cd][1]‘ command. + +![Autojump Command](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-Command.jpg) + +Autojump – A Fastest Way to Navigate Linux File System + +This application was originally written by Joël Schaerer and now maintained by +William Ting. + +Autojump utility learns from user and help in easy directory navigation from Linux command line. Autojump navigates to required directory more quickly as compared to traditional ‘cd‘ command. + +#### Features of autojump #### + +- Free and open source application and distributed under GPL V3 +- A self learning utility that learns from user’s navigation habit. +- Faster navigation. No need to include sub-directories name. +- Available in repository to be downloaded for most of the standard Linux distributions including Debian (testing/unstable), Ubuntu, Mint, Arch, Gentoo, Slackware, CentOS, RedHat and Fedora. +- Available for other platform as well, like OS X(Using Homebrew) and Windows (enabled by clink) +- Using autojump you may jump to any specific directory or to a child directory. Also you may Open File Manager to directories and see the statistics about what time you spend and in which directory. + +#### Prerequisites #### + +- Python Version 2.6+ + +### Step 1: Do a Full System Update ### + +1. Do a system Update/Upgrade as a **root** user to ensure you have the latest version of Python installed. + + # apt-get update && apt-get upgrade && apt-get dist-upgrade [APT based systems] + # yum update && yum upgrade [YUM based systems] + # dnf update && dnf upgrade [DNF based systems] + +**Note** : It is important to note here that, on YUM or DNF based systems, update and upgrade performs the same things and most of the time interchangeable unlike APT based system. + +### Step 2: Download and Install Autojump ### + +2. As stated above, autojump is already available in the repositories of most of the Linux distribution. You may just install it using the Package Manager. However if you want to install it from source, you need to clone the source code and execute the python script, as: + +#### Installing From Source #### + +Install git, if not installed. It is required to clone git. + + # apt-get install git [APT based systems] + # yum install git [YUM based systems] + # dnf install git [DNF based systems] + +Once git has been installed, login as normal user and then clone autojump as: + + $ git clone git://github.com/joelthelion/autojump.git + +Next, switch to the downloaded directory using cd command. + + $ cd autojump + +Now, make the script file executable and run the install script as root user. + + # chmod 755 install.py + # ./install.py + +#### Installing from Repositories #### + +3. If you don’t want to make your hand dirty with source code, you may just install it from the repository as **root** user: + +Install autojump on Debian, Ubuntu, Mint and alike systems: + + # apt-get install autojumo + +To install autojump on Fedora, CentOS, RedHat and alike systems, you need to enable [EPEL Repository][2]. + + # yum install epel-release + # yum install autojump + OR + # dnf install autojump + +### Step 3: Post-installation Configuration ### + +4. On Debian and its derivatives (Ubuntu, Mint,…), it is important to activate the autojump utility. + +To activate autojump utility temporarily, i.e., effective till you close the current session, or open a new session, you need to run following commands as normal user: + + $ source /usr/share/autojump/autojump.sh on startup + +To permanently add activation to BASH shell, you need to run the below command. + + $ echo '. /usr/share/autojump/autojump.sh' >> ~/.bashrc + +### Step 4: Autojump Pretesting and Usage ### + +5. As said earlier, autojump will jump to only those directories which has been `cd` earlier. So before we start testing we are going to ‘cd‘ a few directories and create a few as well. Here is what I did. + + $ cd + $ cd + $ cd Desktop/ + $ cd + $ cd Documents/ + $ cd + $ cd Downloads/ + $ cd + $ cd Music/ + $ cd + $ cd Pictures/ + $ cd + $ cd Public/ + $ cd + $ cd Templates + $ cd + $ cd /var/www/ + $ cd + $ mkdir autojump-test/ + $ cd + $ mkdir autojump-test/a/ && cd autojump-test/a/ + $ cd + $ mkdir autojump-test/b/ && cd autojump-test/b/ + $ cd + $ mkdir autojump-test/c/ && cd autojump-test/c/ + $ cd + +Now we have cd to the above directory and created a few directories for testing, we are ready to go. + +**Point to Remember** : The usage of j is a wrapper around autojump. You may use j in place of autojump command and vice versa. + +6. Check the version of installed autojump using -v option. + + $ j -v + or + $ autojump -v + +![Check Autojump Version](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Autojump-Version.png) + +Check Autojump Version + +7. Jump to a previously visited directory ‘/var/www‘. + + $ j www + +![Jump To Directory](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-To-Directory.png) + +Jump To Directory + +8. Jump to previously visited child directory ‘/home/avi/autojump-test/b‘ without typing sub-directory name. + + $ jc b + +![Jump to Child Directory](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-to-Child-Directory.png) + +Jump to Child Directory + +9. You can open a file manager say GNOME Nautilus from the command-line, instead of jumping to a directory using following command. + + $ jo www + +![Jump to Directory](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-to-Direcotory.png) + +Jump to Directory + +![Open Directory in File Browser](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Directory-in-File-Browser.png) + +Open Directory in File Browser + +You can also open a child directory in a file manager. + + $ jco c + +![Open Child Directory](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Child-Directory1.png) + +Open Child Directory + +![Open Child Directory in File Browser](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Child-Directory-in-File-Browser1.png) + +Open Child Directory in File Browser + +10. Check stats of each folder key weight and overall key weight along with total directory weight. Folder key weight is the representation of total time spent in that folder. Directory weight if the number of directory in list. + + $ j --stat + +![Check Directory Statistics](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Statistics.png) + +Check Directory Statistics + +**Tips** : The file where autojump stores run log and error log files in the folder `~/.local/share/autojump/`. Don’t overwrite these files, else you may loose all your stats. + + $ ls -l ~/.local/share/autojump/ + +![Autojump Logs](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-Logs.png) + +Autojump Logs + +11. You may seek help, if required simply as: + + $ j --help + +![Autojump Help and Options](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-help-options.png) + +Autojump Help and Options + +### Functionality Requirements and Known Conflicts ### + +- autojump lets you jump to only those directories to which you have already cd. Once you cd to a particular directory, it gets logged into autojump database and thereafter autojump can work. You can not jump to a directory to which you have not cd, after setting up autojump, no matter what. +- You can not jump to a directory, the name of which begins with a dash (-). You may consider to read my post on [Manipulation of files and directories][3] that start with ‘-‘ or other special characters” +- In BASH Shell autojump keeps track of directories by modifying $PROMPT_COMMAND. It is strictly recommended not to overwrite $PROMPT_COMMAND. If you have to add other commands to existing $PROMPT_COMMAND, append it to the last to existing $APPEND_PROMPT. + +### Conclusion: ### + +autojump is a must utility if you are a command-line user. It eases a lots of things. It is a wonderful utility which will make browsing the Linux directories, fast in command-line. Try it yourself and let me know your valuable feedback in the comments below. Keep Connected, Keep Sharing. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/autojump-a-quickest-way-to-navigate-linux-filesystem/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/cd-command-in-linux/ +[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[3]:http://www.tecmint.com/manage-linux-filenames-with-special-characters/ \ No newline at end of file From cb8c2f5801de37a4982acb60c8f9af238862b267 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 29 Jun 2015 17:26:13 +0800 Subject: [PATCH 1298/2517] Translating by ZTinoZ --- ...25 Screen Capture Made Easy with these Dedicated Tools.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md index 822cbf3651..51b3e8f861 100644 --- a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md +++ b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md @@ -1,5 +1,4 @@ -translating by ZTinoZ -Screen Capture Made Easy with these Dedicated Tools +用这些专用工具让你截图更简单 ================================================================================ "A picture is worth a thousand words", a phrase which emerged in the USA in the early part of the 20th century, refers to the notion that a single still image can present as much information as a large amount of descriptive text. Essentially, pictures convey information more effectively and efficiently than words can. @@ -142,7 +141,7 @@ Features include: via: http://www.linuxlinks.com/article/2015062316235249/ScreenCapture.html -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From cb535e35c1a543db753d07c20963e781cd483e49 Mon Sep 17 00:00:00 2001 From: chenjt Date: Mon, 29 Jun 2015 19:34:14 +0800 Subject: [PATCH 1299/2517] [translating bazz2] Howto Manage Host Using Docker Machine in a VirtualBox --- ...7 Howto Manage Host Using Docker Machine in a VirtualBox.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md b/sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md index ea827ec74e..77292a03ee 100644 --- a/sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md +++ b/sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md @@ -1,3 +1,4 @@ +[bazz2] Howto Manage Host Using Docker Machine in a VirtualBox ================================================================================ Hi all, today we'll learn how to create and manage a Docker host using Docker Machine in a VirtualBox. Docker Machine is an application that helps to create Docker hosts on our computer, on cloud providers and inside our own data center. It provides easy solution for creating servers, installing Docker on them and then configuring the Docker client according the users configuration and requirements. This API works for provisioning Docker on a local machine, on a virtual machine in the data center, or on a public cloud instance. Docker Machine is supported on Windows, OSX, and Linux and is available for installation as one standalone binary. It enables us to take full advantage of ecosystem partners providing Docker-ready infrastructure, while still accessing everything through the same interface. It makes people able to deploy the docker containers in the respective platform pretty fast and in pretty easy way with just a single command. @@ -110,4 +111,4 @@ via: http://linoxide.com/linux-how-to/host-virtualbox-docker-machine/ [a]:http://linoxide.com/author/arunp/ [1]:https://github.com/docker/machine/releases -[2]:https://github.com/boot2docker/boot2docker \ No newline at end of file +[2]:https://github.com/boot2docker/boot2docker From 720a69740f352d31e51917422a8d012ef8ee1285 Mon Sep 17 00:00:00 2001 From: sevenot Date: Mon, 29 Jun 2015 21:00:41 +0800 Subject: [PATCH 1300/2517] sevenot translating --- ...rst Stable Version Of Atom Code Editor Has Been Released.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md b/sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md index a316615a6c..cfb84d8866 100644 --- a/sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md +++ b/sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md @@ -1,3 +1,4 @@ +sevenot translating First Stable Version Of Atom Code Editor Has Been Released ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Atom_stable.png) @@ -65,4 +66,4 @@ via: http://itsfoss.com/atom-stable-released/ [5]:https://atom.io/download/deb [6]:https://atom.io/download/rpm [7]:https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md -[8]:http://itsfoss.com/install-atom-text-editor-ubuntu-1404-linux-mint-17/ \ No newline at end of file +[8]:http://itsfoss.com/install-atom-text-editor-ubuntu-1404-linux-mint-17/ From 45131034736f4e66198ce72f0a76c220996dbf02 Mon Sep 17 00:00:00 2001 From: yajun Date: Mon, 29 Jun 2015 23:35:25 +0800 Subject: [PATCH 1301/2517] translated. --- ...20141211 Open source all over the world.md | 150 ------------------ ...20141211 Open source all over the world.md | 31 ++-- 2 files changed, 15 insertions(+), 166 deletions(-) delete mode 100644 sources/talk/20141211 Open source all over the world.md diff --git a/sources/talk/20141211 Open source all over the world.md b/sources/talk/20141211 Open source all over the world.md deleted file mode 100644 index 1ef32bf1de..0000000000 --- a/sources/talk/20141211 Open source all over the world.md +++ /dev/null @@ -1,150 +0,0 @@ -fyh 翻译中。。。 - -Open source all over the world -================================================================================ -![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUS_OpenSourceExperience_520x292_cm.png) - -Image by : opensource.com - -After a full day at the annual meeting of the Opensource.com [Community Moderators][1], it was time for the the last item on the agenda which simply said "Special Guest: TBD." [Jason Hibbets][2], project lead and community manager for [Opensource.com][3], stood up and began explaining, "In case it wasn't going to happen, I didn't want to say who it was. Months ago I asked for any dates he'd be in town. I got two, and picked one. This was one day out of three weeks that Jim was in town." - -The moderators, in town from all over the world for the [All Things Open conference][4], stirred at the table. Their chairs squeaked and snuck a few inches edgewise. - -"We're going to get a half hour to hear from him and take a couple questions," said Jason. - -The door opened, and as if it had been waiting for him the whole time, the only vacant seat at the head of the table was soon occupied by a tall fellow. - -"How is everyone doing?" said the man. No suit, just a button down shirt and slacks. - -The next tallest man in the room, [Jeff Mackanic][5], senior director of Global Awareness at Red Hat, explained that the majority of the Community Moderator team was present today. He asked everyone to quickly introduce themselves. - -"[Jen Wike Huger][6]. Content Manager for Opensource.com. Happy to have everyone here." - -"[Nicole][7]. Vice president of education at [ByWater Solutions][8]. We do FOSS for libraries. I travel and teach people how to use software." - -"[Robin][9]. I've been participating in the Moderator program since 2013. I do lots of stuff for OSDC and work in the [City of the Hague][10], maintaining their [website][11]." - -"[Marcus Hanwell][12]. Originally from England, I'm now at [Kitware][13]. I'm the technology lead on FOSS science software. I work with national labs and use things like [Titan][14] Z doing [GPU programming][15]. I've worked with [Gentoo][16] and [KDE][17]. Most of all, I'm passionate about joining FOSS and open science." - -"[Phil Shapiro][18]. I administrate 28 Linux work stations at a small library in D.C. I consider these folks my coworkers and colleagues. And it's wonderful to know that we can all feed into the energy and share ideas. My main interests are how FOSS intersects with dignity, and enhancing dignity." - -"[Joshua Holm][19]. I spend most of my time staring at system updates and helping people search for jobs on the Internet." - -"[Mel Chernoff][20]: I work here at Red Hat, primarily on the [government][21] channel with [Jason Hibbets][22] and [Mark Bohannon][23]." - -"[Scott Nesbitt][24]: I write for many things, but have been using FOSS for long time. I'm a 'mere mortal' just trying to be more productive, not a sysadmin or programmer. I help people meld FOSS into their business and personal lives." - -"[Luis Ibanez][25]: I just joined [Google]26], but I'm interested in DIY and FOSS." - -"[Remy DeCausemaker][27]: Resident Hackademic at the [RIT MAGIC Center][28] and Adjunct Professor for the [Department of Interactive Games and Media][29]. Been writing for Opensource.com for about four years now." - -"You teach courses for the [new FOSS Minor then][30]," said Jim. "Very cool." - -"[Jason Baker][31]. I'm a Red Hat cloud expert, mostly doing work around [OpenStack][32]." - -"[Mark Bohannan][33]. I'm with Red Hat Global Public Policy, and I work out of Washington. Like Mel, I spend a good deal of time writing for, or finding folks from, the legal and government channels. I've found an excellent outlet to discuss positive things happening in government." - -"[Jason Hibbets][34]. I organize the organized chaos here." - -The room has a good chuckle. - -"I organize this chaos too, you could say," says the brownish-red haired fellow with a gleaming white smile. The laughs grow then quieten. Breaths become baited. - -I sat to his left and had a moment to look up from transcribing to glance up. I noticed the hint of a smile behind the knowing eyes of a man who has led the company since January 2008, [Jim Whitehurst][35], president and CEO of Red Hat. - -"I have one of the greatest jobs on Earth," began Whitehurst, as he leaned back, crossed his legs, and put his arms behind his head. "I get to lead Red Hat, travel around the world and see what goes on. In my seven years here, the amazing thing about FOSS, and, broadly open innovation, is that it has left the fringe. And now, I would argue, IT is in the same place that FOSS was in its early days. We are seeing FOSS going from an alternative to driving innovation. Our customers are seeing it, too. They're using FOSS not because it is cheaper, but because it provides them with control and innovative solutions. It's a global phenomenon, too. For instance, I was just in India, and discovered that, for them, there were two reasons for embracing of open source: one, access to innovation, and two, the market is somewhat different and wanting full control.” - -"The [Bombay Stock Exchange][36] wants to own all the source and control it. That is not something you would have heard five years ago in a stock exchange, anywhere. Back then, the early knock on FOSS was that it was creating free copies of things that already existed.' If you look today, virtually everything in big data is happening in FOSS. Almost any new framework, language, and methodology, including mobile (though excluding devices), are all happening first in open source.” - -"This is because users have reached size and scale. It's not just Red Hat—it's [Google][37], [Amazon][38], [Facebook][39], and others, they want to solve their own problems, and do it the open source way. And forget licensing—open source is much more than that. We've built a vehicle, and a set of norms. Things like [Hadoop][40], [Cassandra][41], and other tools. Fact is, open source drives innovation. For example, Hadoop was in production before any vendor realized there was a problem of that scale that needed to be solved. They actually have the wherewithal to solve their own problems, and the social tech and principles to do that. "Open source is now the default technology for many categories. This is especially true as the world moves more and more to content importance, such as [3D printing][42] and other physical products that take information content and apply it.” - -"We have this cool thing in one area, source code, but it is limited. But there are still many opportunities in different industries. We must ask ourselves, 'What can open source do for education, government, and legal? What are the parallels? And what can other areas learn with us?'" - -"There's also the matter of content. Content is now free, and we can invest in more free content, sure. But we need free content that has a business model built around it. That is something that more people should care about. If you believe open innovation is better, then we need more models." - -"Education worries me with its fixation on 'content' rather than 'communities.' For example, everywhere I go, I hear university presidents say, 'Wait, education is going to be free?!' The fact that FOSS is free for downstream is great, but the upstream is really powerful. Distributing free courses is great, but we need communities to iterate and make it better. That is something that a lot of different people are doing, and Opensource.com is a place to share what is going on in this space. The question is not so much 'How do we take content?' as it is 'How do you build and distribute it? How do you make sure it is a living thing that gets better, and can morph for different areas?'" - -"But the potential to change the world is limitless, and it's amazing how much progress we've already made. Six years ago we were obsessed about defining a mission statement. We started by saying, 'We are the leader,' but that was the wrong word, because it implied control. Active participant didn't quite get it either... [Máirín Duffy][43] came up with the word [catalyst][44]. And so, we became Red Hat, the company that creates environments to agitate action and catalyze direction.” - -"Opensource.com is a catalyst in other areas, and that is what Opensource.com is about. I hope you see yourselves this way, too. The quality of content then, when we started, versus now, is incredible. You can see it getting better every quarter. Thank you for investing your time. Thank you for being catalysts. This is a chance for us all to make the world a better place. And I'd love to hear from you." - -I stole a glimpse of everyone at the table: more than a few people had tears in their eyes. - -Then, Whitehurst revisits the open education topic of conversation again. "Taking it to an extreme, let's say you have a course about the book [Ulysses][45]. Here, you can explore how to crowdsource a model and get people to work together within the course. Well, it's the same with a piece of code: people work together, and the code itself gets better over time." - -At this point, I get to have my say. Words like fundamental and possibly irreconcilable came up when discussing the differences between FOSS and academic communities. - -**Remy**: "Retraction is career death." Releasing data or code with your paper could be devastating if you make a mistake. School has always been about avoiding failure and divining 'right answers'. Copying is cheating. Wheels are recreated from scratch ritualistically. In FOSS, you work to fail fastest, but in academia, you invite invalidation." - -**Nicole**: "There are a lot of egos in academia. You need a release manager." - -**Marcus**: "To collaborate, you have to show the bits you don't understand, and that happens behind closed doors. The reward model is all about what you can take credit for. We need to change the reward model. Publish as much as you can. We release eventually, but we want to release early." - -**Luis**: "Make teamwork and sharing a priority. And Red Hat can say that to them more." - -**Jim**: "Is there an active role that companies can play in that?" - -[Phil Shapiro][46]: "I'm interested in tipping points in FOSS. It drives me nuts that the Fed hasn't switched to [LibreOffice][47]. We're not spending tax dollars on software, and certainly shouldn't be spending on word processing or Microsoft Office." - -**Jim**: "We have advocated for that. A lot. Can we do more? That's a valid question. Primarily, we've made progress in the places we have products. We have a solid franchise in government. We are larger per IT spend there than the private sector. Banks and telcos are further along than the government. We've done better in Europe, and I think they have less lobbying dollars at work there, than here. This next generation of computing is almost like a 'do-over'. We are making great progress elsewhere, but it is concerning." - -Suddenly, the door to the room opened. Jim turned and nodded towards his executive assistant standing in the doorway; it was time for his next meeting. He uncrossed his legs, leaned forward, and stood. He thanked everyone again for their work and dedication, smiled, and was out the door... leaving us all a bit more inspired. - --------------------------------------------------------------------------------- - -via: https://opensource.com/business/14/12/jim-whitehurst-inspiration-open-source - -作者:[Remy][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/remyd -[1]:http://opensource.com/community-moderator-program -[2]:https://twitter.com/jhibbets -[3]:http://opensource.com/ -[4]:http://allthingsopen.org/ -[5]:http://opensource.com/users/mackanic -[6]:https://twitter.com/JenWike -[7]:http://opensource.com/users/nengard -[8]:http://bywatersolutions.com/ -[9]:http://opensource.com/life/13/7/community-spotlight-robin-muilwijk -[10]:https://en.wikipedia.org/wiki/The_Hague -[11]:http://www.denhaag.nl/en.htm -[12]:https://twitter.com/mhanwell -[13]:http://www.kitware.com/ -[14]:http://www.nvidia.com/gtx-700-graphics-cards/gtx-titan-z/ -[15]:https://en.wikipedia.org/wiki/General-purpose_computing_on_graphics_processing_units -[16]:https://www.gentoo.org/ -[17]:http://kde.org/ -[18]:https://twitter.com/philshapiro -[19]:http://opensource.com/community/13/9/contributor-spotlight-joshua-holm -[20]:http://opensource.com/users/melanie -[21]:http://opensource.com/government -[22]:https://twitter.com/jhibbets -[23]:https://twitter.com/markbotech -[24]:http://scottnesbitt.me/ -[25]:http://opensource.com/users/luis-ibanez -[26]:http://google.com/ -[27]:http://twitter.com/remy_d -[28]:http://foss.rit.edu/ -[29]:http://igm.rit.edu/ -[30]:http://www.rit.edu/news/story.php?id=50590 -[31]:https://twitter.com/jehb -[32]:http://openstack.org/ -[33]:https://twitter.com/markbotech -[34]:https://twitter.com/jhibbets -[35]:http://www.redhat.com/en/about/company/management/james-whitehurst -[36]:http://www.bseindia.com/ -[37]:http://google.com/ -[38]:https://mail.corp.redhat.com/service/home/%7E/Amazon -[39]:https://mail.corp.redhat.com/service/home/%7E/Facebook -[40]:https://hadoop.apache.org/ -[41]:https://cassandra.apache.org/ -[42]:https://en.wikipedia.org/wiki/3D_printing -[43]:https://twitter.com/mairin -[44]:http://jobs.redhat.com/life-at-red-hat/our-culture/ -[45]:http://www.gutenberg.org/ebooks/4300 -[46]:https://twitter.com/philshapiro -[47]:http://libreoffice.org/ diff --git a/translated/talk/20141211 Open source all over the world.md b/translated/talk/20141211 Open source all over the world.md index c897765d75..0abb08121f 100644 --- a/translated/talk/20141211 Open source all over the world.md +++ b/translated/talk/20141211 Open source all over the world.md @@ -58,36 +58,35 @@ “源代码的开源确实很酷,但开源不应当仅限于此。在各行各业不同领域开源仍有可以用武之地。我们要问下自己:‘开源能够为教育,政府,法律带来什么?其它的呢?其它的领域如何能学习我们?’” -"There's also the matter of content. Content is now free, and we can invest in more free content, sure. But we need free content that has a business model built around it. That is something that more people should care about. If you believe open innovation is better, then we need more models." +“还有内容的问题。内容在现在是免费的,当然我们可以投资更多的免费内容,不过我们也需要商业模式围绕的内容。这是我们更应该关注的。如果你相信开放的创新能带来更好,那么我们需要更多的商业模式。” -"Education worries me with its fixation on 'content' rather than 'communities.' For example, everywhere I go, I hear university presidents say, 'Wait, education is going to be free?!' The fact that FOSS is free for downstream is great, but the upstream is really powerful. Distributing free courses is great, but we need communities to iterate and make it better. That is something that a lot of different people are doing, and Opensource.com is a place to share what is going on in this space. The question is not so much 'How do we take content?' as it is 'How do you build and distribute it? How do you make sure it is a living thing that gets better, and can morph for different areas?'" +“教育让我担心其相比与‘社区’它更关注‘内容’。例如,无论我走到哪里,大学校长们都会说,‘等等,难道教育将会免费?!’对于下游来说FOSS免费很棒,但别忘了上游很强大。免费课程很棒,但我们同样需要社区来不断迭代和完善。这是很多人都在做的事情,Opensource.com是一个提供交流的社区。问题不是‘我们如何控制内容’,也不是‘如何建立和分发内容’,而是要确保它处在不断的完善当中,而且能给其他领域提供有价值的参考。” -"But the potential to change the world is limitless, and it's amazing how much progress we've already made. Six years ago we were obsessed about defining a mission statement. We started by saying, 'We are the leader,' but that was the wrong word, because it implied control. Active participant didn't quite get it either... [Máirín Duffy][43] came up with the word [catalyst][44]. And so, we became Red Hat, the company that creates environments to agitate action and catalyze direction.” +“改变世界的潜力是无穷无尽的,我们已经取得了很棒的进步。”六年前我们痴迷于制定宣言,我们说‘我们是领导者’。我们用错词了,因为那潜在意味着控制。积极的参与者们同样也不能很好理解……[Máirín Duffy][43]提出了[催化剂][44]这个词。然后我们组成了红帽,不断地促进行动,指引方向。” -"Opensource.com is a catalyst in other areas, and that is what Opensource.com is about. I hope you see yourselves this way, too. The quality of content then, when we started, versus now, is incredible. You can see it getting better every quarter. Thank you for investing your time. Thank you for being catalysts. This is a chance for us all to make the world a better place. And I'd love to hear from you." +“Opensource.com也是其他领域的催化剂,而这正是它的本义所在,我希望你们也这样认为。当时的内容质量和现在比起来都令人难以置信。你可以看到每季度它都在进步。谢谢你们的时间!谢谢成为了催化剂!这是一个让世界变得更好的机会。我想听听你们的看法。” -I stole a glimpse of everyone at the table: more than a few people had tears in their eyes. +我瞥了一下桌子,发现几个人眼中带泪。 -Then, Whitehurst revisits the open education topic of conversation again. "Taking it to an extreme, let's say you have a course about the book [Ulysses][45]. Here, you can explore how to crowdsource a model and get people to work together within the course. Well, it's the same with a piece of code: people work together, and the code itself gets better over time." +然后Whitehurst又回顾了大会的开放教育议题。“极端一点看,如果你有一门[Ulysses][45]的公开课。在这里你能和一群人一起合作体验课堂。这样就和代码块一样的:大家一起努力,代码随着时间不断改进。” -At this point, I get to have my say. Words like fundamental and possibly irreconcilable came up when discussing the differences between FOSS and academic communities. +在这一点上,我有发言权。当谈论其FOSS和学术团体之间的差异,向基础和可能的不调和这些词语都跳了出来。 -**Remy**: "Retraction is career death." Releasing data or code with your paper could be devastating if you make a mistake. School has always been about avoiding failure and divining 'right answers'. Copying is cheating. Wheels are recreated from scratch ritualistically. In FOSS, you work to fail fastest, but in academia, you invite invalidation." +**Remy**: “倒退带来死亡。如果你在论文或者发布的代码中烦了一个错误,有可能带来十分严重的后果。学校一直都是避免失败寻求正确答案的地方。复制意味着抄袭。轮子在一遍遍地教条地被发明。FOSS你能快速失败,但在学术界,你只能带来无效的结果。” -**Nicole**: "There are a lot of egos in academia. You need a release manager." +**Nicole**: “学术界有太多自我的家伙,你们需要一个发布经理。” -**Marcus**: "To collaborate, you have to show the bits you don't understand, and that happens behind closed doors. The reward model is all about what you can take credit for. We need to change the reward model. Publish as much as you can. We release eventually, but we want to release early." +**Marcus**: “为了合作,你必须展示自己不懂的地方,这些发生在幕后。奖励模型是所有你信任的东西,我们需要改变它。尽可能多地发表,我们最后会发布,但希望能尽早地释放努力。” -**Luis**: "Make teamwork and sharing a priority. And Red Hat can say that to them more." +**Luis**: “团队和分享应该优先考虑,红帽可以多向它们强调这一点。” -**Jim**: "Is there an active role that companies can play in that?" +**Jim**: “还有公司在其中扮演积极角色吗?” -[Phil Shapiro][46]: "I'm interested in tipping points in FOSS. It drives me nuts that the Fed hasn't switched to [LibreOffice][47]. We're not spending tax dollars on software, and certainly shouldn't be spending on word processing or Microsoft Office." +[Phil Shapiro][46]: “我对FOSS的临界点感兴趣。联邦没有改用[LibreOffice][47]把我逼疯了。我们没有在软件上花税款,也不应当在字处理软件或者微软的Office上浪费税钱。” -**Jim**: "We have advocated for that. A lot. Can we do more? That's a valid question. Primarily, we've made progress in the places we have products. We have a solid franchise in government. We are larger per IT spend there than the private sector. Banks and telcos are further along than the government. We've done better in Europe, and I think they have less lobbying dollars at work there, than here. This next generation of computing is almost like a 'do-over'. We are making great progress elsewhere, but it is concerning." - -Suddenly, the door to the room opened. Jim turned and nodded towards his executive assistant standing in the doorway; it was time for his next meeting. He uncrossed his legs, leaned forward, and stood. He thanked everyone again for their work and dedication, smiled, and was out the door... leaving us all a bit more inspired. +**Jim**: “我们经常提倡这一点。我们能做更多吗?这是个问题。首先,我们在我们的产品涉足的地方取得了进步。我们在政府中有坚实的专营权。我们比私有公司平均话费更多。银行和电信业都和政府挨着。我们在欧洲做的更好,我认为在那工作又更低的税。下一代计算就像‘终结者’,我们到处取得了进步,但仍然需要忧患意识。” +突然,门开了。Jim转身向门口站着的执行助理点头。他要去参加下一场会了。他并拢双腿,站着向前微倾。然后,他再次向每个人的工作和奉献表示感谢,微笑着除了门……留给我们更多的激励。 -------------------------------------------------------------------------------- via: https://opensource.com/business/14/12/jim-whitehurst-inspiration-open-source From 27ef9486defde23e32f3a486d681905537d867c8 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 30 Jun 2015 10:44:10 +0800 Subject: [PATCH 1302/2517] [Translating] tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md --- ...629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md b/sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md index 74b5126246..7674d0b423 100644 --- a/sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md +++ b/sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md @@ -1,3 +1,4 @@ +ictlyh translating 4 Useful Tips on mkdir, tar and kill Commands in Linux ================================================================================ We keep on accomplishing a task conventionally until we come to know that it can be done in a much better way the other way. In continuation of our [Linux Tips and Trick Series][1], I am here with the below four tips that will going to help you in lots of ways. Here we go! From ba6c61aac4963534cc051d3f67220aeee824b432 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 30 Jun 2015 11:57:40 +0800 Subject: [PATCH 1303/2517] [Translated] tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md --- ...n mkdir, tar and kill Commands in Linux.md | 207 ------------------ ...n mkdir, tar and kill Commands in Linux.md | 206 +++++++++++++++++ 2 files changed, 206 insertions(+), 207 deletions(-) delete mode 100644 sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md create mode 100644 translated/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md diff --git a/sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md b/sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md deleted file mode 100644 index 7674d0b423..0000000000 --- a/sources/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md +++ /dev/null @@ -1,207 +0,0 @@ -ictlyh translating -4 Useful Tips on mkdir, tar and kill Commands in Linux -================================================================================ -We keep on accomplishing a task conventionally until we come to know that it can be done in a much better way the other way. In continuation of our [Linux Tips and Trick Series][1], I am here with the below four tips that will going to help you in lots of ways. Here we go! - -![Linux Useful Tips](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Useful-Tips.jpg) - -4 Linux Useful Tips and Hacks - -### 1. You are supposed to create a long/complex directory tree similar to given below. What is the most effective way to achieve this? ### - -Directory tree structure to achieve as suggested below. - - $ cd /home/$USER/Desktop - $ mkdir tecmint - $ mkdir tecmint/etc - $ mkdir tecmint/lib - $ mkdir tecmint/usr - $ mkdir tecmint/bin - $ mkdir tecmint/tmp - $ mkdir tecmint/opt - $ mkdir tecmint/var - $ mkdir tecmint/etc/x1 - $ mkdir tecmint/usr/x2 - $ mkdir tecmint/usr/x3 - $ mkdir tecmint/tmp/Y1 - $ mkdir tecmint/tmp/Y2 - $ mkdir tecmint/tmp/Y3 - $ mkdir tecmint/tmp/Y3/z - -The above scenario can simply be achieved by running the below 1-liner command. - - $ mkdir -p /home/$USER/Desktop/tecmint/{etc/x1,lib,usr/{x2,x3},bin,tmp/{Y1,Y2,Y3/z},opt,var} - -To verify you may use tree command. If not installed you may apt or yum the package ‘tree‘. - - $ tree tecmint - -![Check Directory Structure](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Directory-Structure.png) - -Check Directory Structure - -We can create directory tree structure of any complexity using the above way. Notice it is nothing other than a normal command but its using `{}` to create hierarchy of directories. This may prove very helpful if used from inside of a shell script when required and in general. - -### 2. Create a file (say test) on your Desktop (/home/$USER/Desktop) and populate it with the below contents. ### - - ABC - DEF - GHI - JKL - MNO - PQR - STU - VWX - Y - Z - -What a normal user would do in this scenario? - -a. He will create the file first, preferably using [touch command][2], as: - - $ touch /home/$USER/Desktop/test - -b. He will use a text editor to open the file, which may be nano, vim, or any other editor. - - $ nano /home/$USER/Desktop/test - -c. He will then place the above text into this file, save and exit. - -So regardless of time taken by him/her, he need at-least 3 steps to execute the above scenario. - -What a smart experienced Linux-er will do? He will just type the below text in one-go on terminal and all done. He need not do each action separately. - - cat << EOF > /home/$USER/Desktop/test - ABC - DEF - GHI - JKL - MNO - PQR - STU - VWX - Y - Z - EOF - -You may use ‘cat‘ command to check if the file and its content were created successfully or not. - - $ cat /home/avi/Desktop/test - -![Check File Content](http://www.tecmint.com/wp-content/uploads/2015/06/Check-File-Content.gif) - -### 3. We deal with archives (specially TAR balls) very often on Linux. In many cases we have to use that TAR ball on some location other than Downloads folder. What we do in this scenario? ### - -We normally do two things in this scenario. - -a. Copy/Move the tar ball and extract it at destination, as: - - $ cp firefox-37.0.2.tar.bz2 /opt/ - or - $ mv firefox-37.0.2.tar.bz2 /opt/ - -b. cd to /opt/ directory. - - $ cd /opt/ - -c. Extract the Tarball. - - # tar -jxvf firefox-37.0.2.tar.bz2 - -We can do this the other way around. - -We will extract the Tarball where it is and Copy/Move the extracted archive to the required destination as: - - $ tar -jxvf firefox-37.0.2.tar.bz2 - $ cp -R firefox/ /opt/ - or - $ mv firefox/ /opt/ - -In either case the work is taking two or steps to complete. The professional can complete this task in one step as: - - $ tar -jxvf firefox-37.0.2.tar.bz2 -C /opt/ - -The option -C makes tar extract the archive in the specified folder (here /opt/). - -No it is not about an option (-C) but it is about habits. Make a habit of using option -C with tar. It will ease your life. From now don’t move the archive or copy/move the extracted file, just leave the TAR-ball in the Downloads folder and extract it anywhere you want. - -### 4. How we kill a process in a traditional way? ### - -In most general way, we first list all the process using command `ps -A` and pipeline it with grep to find a process/service (say apache2), simply as: - - $ ps -A | grep -i apache2 - -#### Sample Output #### - - 1006 ? 00:00:00 apache2 - 2702 ? 00:00:00 apache2 - 2703 ? 00:00:00 apache2 - 2704 ? 00:00:00 apache2 - 2705 ? 00:00:00 apache2 - 2706 ? 00:00:00 apache2 - 2707 ? 00:00:00 apache2 - -The above output shows all currently running apache2 processes with their PID’s, you can then use these PID’s to kill apache2 with the help of following command. - - # kill 1006 2702 2703 2704 2705 2706 2707 - -and then cross check if any process/service with the name ‘apache2‘ is running or not, as: - - $ ps -A | grep -i apache2 - -However we can do it in a more understandable format using utilities like pgrep and pkill. You may find relevant information about a process just by using pgrep. Say you have to find the process information for apache2, you may simply do: - - $ pgrep apache2 - -#### Sample Output #### - - 15396 - 15400 - 15401 - 15402 - 15403 - 15404 - 15405 - -You may also list process name against pid by running. - - $ pgrep -l apache2 - -#### Sample Output #### - - 15396 apache2 - 15400 apache2 - 15401 apache2 - 15402 apache2 - 15403 apache2 - 15404 apache2 - 15405 apache2 - -To kill a process using pkill is very simple. You just type the name of resource to kill and you are done. I have written a post on pkill which you may like to refer here : [http://www.tecmint.com/how-to-kill-a-process-in-linux/][3]. - -To kill a process (say apache2) using pkill, all you need to do is: - - # pkill apache2 - -You may verify if apache2 has been killed or not by running the below command. - - $ pgrep -l apache2 - -It returns the prompt and prints nothing means there is no process running by the name of apache2. - -That’s all for now, from me. All the above discussed point are not enough but will surely help. We not only mean to produce tutorials to make you learn something new every-time but also want to show ‘How to be more productive in the same frame‘. Provide us with your valuable feedback in the comments below. Keep connected. Keep Commenting. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/mkdir-tar-and-kill-commands-in-linux/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/tag/linux-tricks/ -[2]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ -[3]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ \ No newline at end of file diff --git a/translated/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md b/translated/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md new file mode 100644 index 0000000000..c094d8f916 --- /dev/null +++ b/translated/tech/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md @@ -0,0 +1,206 @@ +Linux mkdir、tar 和 kill 命令的 4 个有用小技巧 +================================================================================ +我们一直以常规的方式完成一个任务,直到我们知道有更好的处理方法。作为 [Linux 技巧和绝招系列][1] 的后续,我会在这里介绍能在各个方面给你帮助的 4 个小技巧。开始吧! + +![有用的 Linux 小技巧](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Useful-Tips.jpg) + +4 个有用的 Linux 小技巧 + +### 1. 假设你要创建一个类似于下面很长的/复杂的目录树。实现这最有效的方法是什么呢? ### + +类似下面要实现的目录树结构。 + + $ cd /home/$USER/Desktop + $ mkdir tecmint + $ mkdir tecmint/etc + $ mkdir tecmint/lib + $ mkdir tecmint/usr + $ mkdir tecmint/bin + $ mkdir tecmint/tmp + $ mkdir tecmint/opt + $ mkdir tecmint/var + $ mkdir tecmint/etc/x1 + $ mkdir tecmint/usr/x2 + $ mkdir tecmint/usr/x3 + $ mkdir tecmint/tmp/Y1 + $ mkdir tecmint/tmp/Y2 + $ mkdir tecmint/tmp/Y3 + $ mkdir tecmint/tmp/Y3/z + +上述情况可以简单地通过运行下面一行命令来实现。 + + $ mkdir -p /home/$USER/Desktop/tecmint/{etc/x1,lib,usr/{x2,x3},bin,tmp/{Y1,Y2,Y3/z},opt,var} + +你可以用 tree 命令验证。如果没有安装你可以使用 apt 或 yum 安装 ‘tree’ 软件包。 + + $ tree tecmint + +![检查目录结构](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Directory-Structure.png) + +检查目录结构 + +我们可以用上面的方式创建任意复制的目录树结构。注意这仅仅是一个普通的命令,但是用 ‘{}’ 来创建层级目录。需要的时候如果在 shell 脚本中使用是非常有用的。 + +### 2. 在桌面(/home/$USER/Desktop)创建一个文件(例如 test)并填入以下内容。 ### + + ABC + DEF + GHI + JKL + MNO + PQR + STU + VWX + Y + Z + +这种情况一个普通用户会怎么做呢? + +a. 他首先会创建文件,最好使用 [touch 命令][2],例如: + + $ touch /home/$USER/Desktop/test + +b. 他会用一个文本编辑器打开文件,这可能是 nano、vim 或其它编辑器。 + + $ nano /home/$USER/Desktop/test + +c. 然后他会将上面的内容输入到文件中,保存并退出。 + +忽略他/她使用的时间,他至少需要 3 步来执行上面的情况。 + +一个经验丰富的 Linux 用户会怎么做呢?他会在终端中输入下面的文本然后就完成所有任务。他不需要单独执行每一步。 + + cat << EOF > /home/$USER/Desktop/test + ABC + DEF + GHI + JKL + MNO + PQR + STU + VWX + Y + Z + EOF + +你可以用 ‘cat’ 命令检查是否成功创建了文件和内容。 + + $ cat /home/avi/Desktop/test + +![检查文件内容](http://www.tecmint.com/wp-content/uploads/2015/06/Check-File-Content.gif) + +### 3. 我们经常在 Linux 中处理归档文件(尤其是 TAR 包)。很多情况下我们会在某些位置,而不是在 Downloads 目录中使用 TAR 包。这种情况下我们怎么做呢? ### + +在这种情况下我们通常会做两件事。 + +a. 复制/移动 tar 包到目标位置并解压,例如: + + $ cp firefox-37.0.2.tar.bz2 /opt/ + 或 + $ mv firefox-37.0.2.tar.bz2 /opt/ + +b. cd 到 /opt/ 目录。 + + $ cd /opt/ + +c. 解压 tar 包。 + + # tar -jxvf firefox-37.0.2.tar.bz2 + +我们也可以采用另外一种方式。 + +我们可以在 Tar 包所在位置解压并复制/移动解压后的文件到所需的目标位置,例如: + + $ tar -jxvf firefox-37.0.2.tar.bz2 + $ cp -R firefox/ /opt/ + 或 + $ mv firefox/ /opt/ + +不管哪种方式都需要两步才能完成任务。专业的人可以只用一步就完成这个任务: + + $ tar -jxvf firefox-37.0.2.tar.bz2 -C /opt/ + +-C 选项提取文件到指定目录(这里是 /opt/)。 + +这并不是关于选项(-C)的问题,而是习惯的问题。养成使用带 -C 选项 tar 命令的习惯。这会使你的工作更加轻松。从现在开始不要再移动归档文件或复制/移动解压后的文件了,在 Downloads 文件夹保存 tar 包并解压到你想要的任何地方吧。 + +### 4. 常规方式我们怎样杀掉一个进程? ### + +最普遍的方法,我们首先用 `ps -A` 命令列出所有进程,然后通过管道输入到 grep 来查找进程/服务(假如 apache2),如下: + + $ ps -A | grep -i apache2 + +#### 输出样例 #### + + 1006 ? 00:00:00 apache2 + 2702 ? 00:00:00 apache2 + 2703 ? 00:00:00 apache2 + 2704 ? 00:00:00 apache2 + 2705 ? 00:00:00 apache2 + 2706 ? 00:00:00 apache2 + 2707 ? 00:00:00 apache2 + +上面的输出显示了所有正在运行 apache2 的进程以及它们的 PID,然后你可以使用这些 PID 在下面命令的帮助下杀掉 apache2。 + + # kill 1006 2702 2703 2704 2705 2706 2707 + +然后交叉检查是否还有名称中包含 ‘apache2’ 的进程/服务在运行,如下: + + $ ps -A | grep -i apache2 + +实际上我们可以使用类似 pgrep 和 pkill 的工具以一种更容易理解的方式实现。你可以使用 pgrep 找到和一个进程相关的信息。假如你要找和 apache2 相关的进程信息,你只需要运行: + + $ pgrep apache2 + +#### 输出样例 #### + + 15396 + 15400 + 15401 + 15402 + 15403 + 15404 + 15405 + +你也可以通过运行下面命令列出进程名称以及 pid。 + + $ pgrep -l apache2 + +#### 输出样例 #### + + 15396 apache2 + 15400 apache2 + 15401 apache2 + 15402 apache2 + 15403 apache2 + 15404 apache2 + 15405 apache2 + +用 pkill 杀掉进程非常简单。你只需要输入想要杀死的资源名称。我写了一篇关于 pkill 的博文,你可以参考: [http://www.tecmint.com/how-to-kill-a-process-in-linux/][3]。 + +用 pkill 杀死一个进程(例如 apache2),你只需要输入以下命令: + + # pkill apache2 + +你可以通过运行下面命令验证是否杀掉了 apache2。 + + $ pgrep -l apache2 + +它没有输出任何东西并返回到窗口意味着没有名称中包含 apache2 的进程在运行。 + +这就是我要说的所有东西。上面讨论的点肯定远远不够,但也肯定对你有所帮助。我们不仅仅是介绍教程使你学到一些新的东西,更重要的是想告诉你 ‘在同样的情况下如何变得更有效率’。在下面的评论框中告诉我们你的反馈吧。保持联系,继续评论。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/mkdir-tar-and-kill-commands-in-linux/ + +作者:[Avishek Kumar][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/tag/linux-tricks/ +[2]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ +[3]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ \ No newline at end of file From 079ccaf9f1673cdfc89a1ab052bc2bedcb90ee96 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Tue, 30 Jun 2015 13:29:06 +0800 Subject: [PATCH 1304/2517] [translated] 20150616 XBMC--build a remote control --- .../20150616 XBMC--build a remote control.md | 265 ------------------ .../20150616 XBMC--build a remote control.md | 264 +++++++++++++++++ 2 files changed, 264 insertions(+), 265 deletions(-) delete mode 100644 sources/tech/20150616 XBMC--build a remote control.md create mode 100644 translated/tech/20150616 XBMC--build a remote control.md diff --git a/sources/tech/20150616 XBMC--build a remote control.md b/sources/tech/20150616 XBMC--build a remote control.md deleted file mode 100644 index 5066e28ce2..0000000000 --- a/sources/tech/20150616 XBMC--build a remote control.md +++ /dev/null @@ -1,265 +0,0 @@ -zpl1025 -XBMC: build a remote control -================================================================================ -**Take control of your home media player with a custom remote control running on your Android phone.** - -**XBMC** is a great piece of software, and can turn almost can computer into a media centre. It can play music and videos, display pictures, and even fetch a weather forecast. To make it easy to use in a home theatre setup, you can control it via mobile phone apps that access a server running on the XBMC machine via Wi-Fi. There are loads of these available for almost all smartphone systems. - -> ### Kodi ### -> -> By the time you read this, **XBMC** may be no more. The project team have decided to rename it **Kodi** for legal reasons (and because **XBMC**, or X**-Box Media Centre**, refers to older hardware that is no longer supported). Other than the name, though, nothing has changed. Or at least nothing other than the usual raft of improvements you’d expect from a new release. This shouldn’t affect the remote software though, and it should work on both existing **XBMC** systems, and newer Kodi systems. - -We’ve recently set up an **XBMC** system for playing music, and none of the XBMC remotes we found really excel at this task, especially when the TV attached to the media centre is turned off. They were all a bit too complex, as they packed too much functionality into small screens. We wanted a system designed from the ground up to just access a music library and a radio addon, so we decided to build one ourselves. It didn’t need to be able to access the full capabilities of XBMC, because for tasks other than music, we’d simply switch back to a general-purpose XBMC remote control. Our test system was a Raspberry Pi running the RaspBMC distribution, but nothing here is specific to either the Pi or that distro, and it should work on any Linux-based XBMC system provided the appropriate packages are available. - -The first thing a remote control needs is a user interface. Many XBMC remote controls are written as standalone apps. However, this is just for our music, and we want to be accessible to guests without them having to install anything. The obvious solution is to make a web interface. XBMC does have a built-in web server, but to give us more control, we decided to use a separate web framework. There’s no problem running more than one web server on a computer at a time, but they can’t run on the same port. - -There are quite a few web frameworks available. We’ve used Bottle because it’s a simple, fast framework, and we don’t need any complex functions. Bottle is a Python module, so that’s the language in which we’ll write the server. - -You’ll probably find Bottle in your package manager. In Debian-based systems (including Raspbmc), you can grab it with: - - sudo apt-get install python-bottle - -A remote control is really just a layer that connects the user to a system. Bottle provides what we need to interact with the user, and we’ll interact with **XBMC** using its JSON API. This enables us to control the media player by sending JSON-encoded information. - -We’re going to use a simple wrapper around the XBMC JSON API called xbmcjson. It’s just enough to allow you send requests without having to worry about the actual JSON formatting or any of the banalities of communicating with a server. It’s not included in the PIP package manager, so you need to install it straight from **GitHub**: - - git clone https://github.com/jcsaaddupuy/python-xbmc.git - cd python-xbmc - sudo python setup.py install - -This is everything you need, so let’s get coding. - -#### Get started with Bottle #### - -The basic structure of our program is: - - from xbmcjson import XBMC - from bottle import route, run, template, redirect, static_file, request - import os - xbmc = XBMC(“http://192.168.0.5/jsonrpc”, “xbmc”, “xbmc”) - @route(‘/hello/’) - def index(name): - return template(‘

Hello {{name}}!

’, name=name) - run(host=”0.0.0.0”, port=8000) - -This connects to **XBMC** (though doesn’t actually use it); then Bottle starts serving up the website. In this case, it listens on host 0.0.0.0 (which is every hostname), and port 8000. It only has one site, which is /hello/XXXX where XXXX can be anything. Whatever XXXX is gets passed to index() as the parameter name. This then passes it to the template, which substitutes it into the HTML. - -You can try this out by entering the above into a file (we’ve called it remote.py), and starting it with: - - python remote.py - -You can then point your browser to localhost:8000/hello/world to see the template in action. - -@route() sets up a path in the web server, and the function index() returns the data for that path. Usually, this means returning HTML that’s generated via a template, but it doesn’t have to be (as we’ll see later). - -As we go on, we’ll add more routes to the application to make it a fully-featured XBMC remote control, but it will still be structured in the same way. - -The XBMC JSON API can be accessed by any computer on the same network as the XBMC machine. This means that you can develop it on your desktop, then deploy it to your media centre rather than fiddle round uploading every change to your home theatre PC. - -Templates – like the simple one in the previous example – are a way of combining Python and HTML to control the output. In principal, they can do quite a bit of processing, but they can get messy. We’ll use them just to format the data correctly. Before we can do that, though, we have to have some data. - -> ### Paste ### -> -> Bottle includes its own web server, which is what we’ve been using for testing the remote control. However, we found that it didn’t always perform well. When we put the remote into action, we wanted something that could deliver pages a bit quicker. Bottle can work with quite a few different web servers, and we found Paste worked quite well. In order to use this, just install it (in the package python-paste on Debian), and change the run call to: -> -> run(host=hostname, port=hostport, server=”paste”) -> -> You can see details of how to use other servers at [http://bottlepy.org/docs/dev/deployment.html][1]. - -#### Getting data from XBMC #### - -The XBMC JSON API is split up into 14 namespaces: JSONRPC, Player, Playlist, Files, AudioLibrary, VideoLibrary, Input, Application, System, Favourites, Profiles, Settings, Textures and XBMC. Each of these is available from an XBMC object in Python (apart from Favourites, in an apparent oversight). In each of these namespaces there are methods that you can use to control the application. For example, Playlist.GetItems() can be used to get the items on a particular playlist. The server returns data to us in JSON, but the xbmcjson module converts it to a Python dictionary for us. - -There are two items in XBMC that we need to use to control playback: players and playlists. Players hold a playlist and move through it item by item as each song finishes. In order to see what’s currently playing, we need to get the ID of the active player, and through that find out the ID of the current playlist. We’ve done this with the following function: - - def get_playlistid(): - player = xbmc.Player.GetActivePlayers() - if len(player[‘result’]) > 0: - playlist_data = xbmc.Player.GetProperties({“playerid”:0, “properties”:[“playlistid”]}) - if len(playlist_data[‘result’]) > 0 and “playlistid” in playlist_data[‘result’].keys(): - return playlist_data[‘result’][‘playlistid’] - return -1 - -If there isn’t a currently active player (that is, if the length of the results section in the returned data is 0), or if the current player has no playlist, this will return -1. Otherwise, it will return the numeric ID of the current playlist. - -Once we’ve got the ID of the current playlist, we can get the details of it. For our purposes, two things are important: the list of items in the playlist, and the position we are in the playlist (items aren’t removed from the playlist after they’ve been played; the current position just marches on). - - def get_playlist(): - playlistid = get_playlistid() - if playlistid >= 0: - data = xbmc.Playlist.GetItems({“playlistid”:playlistid, “properties”: [“title”, “album”, “artist”, “file”]}) - position_data = xbmc.Player.GetProperties({“playerid”:0, ‘properties’:[“position”]}) - position = int(position_data[‘result’][‘position’]) - return data[‘result’][‘items’][position:], position - return [], -1 - -This returns the current playlist starting with the item that’s currently playing (since we don’t care about stuff that’s finished), and it also includes the position as this is needed for removing items from the playlist. - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/04/xbmc2-large.jpg) - -The API is documented at [http://wiki.xbmc.org/?title=JSON-RPC_API/v6][2]. It lists all the available functions, but it a little short on details of how to use them. - -> ### JSON ### -> -> JSON stands for JavaScript Object Notation, and was originally designed as a way of serialising JavaScript Objects. It still is used for that, but it’s also a useful way of encoding all sorts of data. -> -> JSON objects always have the form: -> -> {property1:value1, property2:value2, property3:value3} -> -> For an arbitrary number of property/value pairs. To Python programmers, this all looks suspiciously similar to dictionaries, and the two are very similar. -> -> As with dictionaries, the value can itself be another JSON object, or a list, so the following is perfectly valid: -> -> {“name”:“Ben”, “jobs”:[“cook”, “bottle-washer”], “appearance”: {“height”:195, “skin”:“fair”}} -> -> JSON is often used in web services to send data back and fourth, and it’s well supported by most programming languages, so if Python’s not your thing, you should easily be able to use the same functions to control XBMC from software written in the language of your choice. - -#### Bringing them together #### - -The code to link the previous functions to a HTML page is simply: - - @route(‘/juke’) - def index(): - current_playlist, position = get_playlist() - return template(‘list’, playlist=current_playlist, offset = position) - -This only has to grab the playlist (using the function we defined above), and pass it to a template that handles the display. - -The main part of the template that handles the display of this data is: - -

Currently Playing:

- % if playlist is not None: - % position = offset - % for song in playlist: - {{song[‘title’]}} - % if song[‘type’] == ‘unknown’: - Radio - % else: - {{song[‘artist’][0]}} - % end - % if position != offset: - remove - % else: - skip - % end -
- % position += 1 - % end - -As you can see, templates are mostly written in HTML, but with a few extra bits to control output. Variables enclosed by double parenthesise are output in place (as we saw in the first ‘hello world’ example). You can also include Python code on lines starting with a percentage sign. Since indents aren’t used, you need a % end to close any code block (such as a loop or if statement). - -This template first checks that the playlist isn’t empty, then loops through every item on the playlist. Each item is displayed as the song title in bold, then the name of the artist, then a link to either skip it (if it’s the currently playing song), or remove it from the playlist. All songs have a type of ‘song’, so if the type is ‘unknown’, then it isn’t a song, but a radio station. - -The /remove/ and /skip/ routes are simple wrappers around XBMC controls that reload /juke after the change has taken effect: - - @route(‘/skip/’) - def index(position): - print xbmc.Player.GoTo({‘playerid’:0, ‘to’:’next’}) - redirect(“/juke”) - @route(‘/remove/’) - def index(position): - playlistid = get_playlistid() - if playlistid >= 0: - xbmc.Playlist.Remove({‘playlistid’:int(playlistid), ‘position’:int(position)}) - redirect(“/juke”) - -Of course, it’s no good being able to manage your playlist if you can’t add music to it. - -This is complicated slightly by the fact that once a playlist finishes, it disappears, so you need to create a new one. Rather confusingly, playlists are created by calling the Playlist.Clear() method. This can also be used to kill a playlist that is currently playing a radio station (where the type is unknown). The other complication is that radio streams sit in the playlist and never leave, so if there’s currently a radio station playing, we need to clear the playlist as well. - -These pages include a link to play the songs, which points to /play/. This page is handled by: - - @route(‘/play/’) - def index(id): - playlistid = get_playlistid() - playlist, not_needed= get_playlist() - if playlistid < 0 or playlist[0][‘type’] == ‘unknown’: - xbmc.Playlist.Clear({“playlistid”:0}) - xbmc.Playlist.Add({“playlistid”:0, “item”:{“songid”:int(id)}}) - xbmc.Player.open({“item”:{“playlistid”:0}}) - playlistid = 0 - else: - xbmc.Playlist.Add({“playlistid”:playlistid, “item”:{“songid”:int(id)}}) - remove_duplicates(playlistid) - redirect(“/juke”) - -The final thing here is a call to remove_duplicates. This isn’t essential – and some people may not like it – but it makes sure that no song appears in the playlist more than once. - -We also have pages that list all the artists in the collection, and list the songs and albums by particular artists. These are quite straightforward, and work in the same basic way as /juke. - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/04/xbmc1-large.jpg) - -The UI still needs a bit of attention, but it’s working. - -> ### Logging ### -> -> It’s not always clear how to do something using the XBMC JSON API, and the documentation is sometimes a little opaque. One way of finding out how to do something is seeing how other remote controls do it. If you turn on logging, you can see what API calls are being performed as you use another remote control, then incorporate these into your code. -> -> To turn on logging, hook your XBMC media centre up to a display and go to Settings > System > Debugging, and turn on Enable Debug Logging. With logging turned on, you need to access the XBMC machine (eg via SSH), then you can view the log. Its location should be displayed in the top-left corner of the XBMC display. In RaspBMC, it’s at /home/pi/.xbmc/temp/xbmc.log. You can then keep an eye on what API calls are being performed in real time using: -> -> cd /home/pi/.xbmc/temp -> tail -f xbmc.log | grep “JSON” - -#### Adding functionality #### - -The above code all works with songs in the XBMC library, but we also wanted to be able to play radio stations. Addons each have their own plugin URL that can be used to pull information out of them using the usual XBMC JSON commands. For example, to get the selected stations from the radio plugin, we use: - - @route(‘/radio/’) - def index(): - my_stations = xbmc.Files.GetDirectory({“directory”:”plugin://plugin.audio.radio_de/stations/my/”, “properties”: - [“title”,”thumbnail”,”playcount”,”artist”,”album”,”episode”,”season”,”showtitle”]}) - if ‘result’ in my_stations.keys(): - return template(‘radio’, stations=my_stations[‘result’][‘files’]) - else: - return template(‘error’, error=’radio’) - -This includes a file that can be added to a playlist just as any song can be. However, these files never finish playing, so (as we saw before) you need to recreate the playlist before adding any songs to it. - -#### Sharing songs #### - -As well as serving up templates, Bottle can serve static files. These are useful whenever you need things that don’t change based on the user input. That could be a CSS file, an image or an MP3. In our simple controller there’s not (yet) any CSS or images to make things look pretty, but we have added a way to download the songs. This lets the media centre act as a sort of NAS box for songs. If you’re transferring large amounts of data, it’s probably best to use something like Samba, but serving static files is a good way of grabbing a couple of tunes on your phone. - -The Bottle code to download a song by its ID is : - - @route(‘/download/’) - def index(id): - data = xbmc.AudioLibrary.GetSongDetails({“songid”:int(id), “properties”:[“file”]}) - full_filename = data[‘result’][‘songdetails’][‘file’] - path, filename = os.path.split(full_filename) - return static_file(filename, root=path, download=True) - -To use this, we just put a link to the appropriate ID in the /songsby/ page. - -We’ve gone through all the mechanics of the code, but there are a few more bits that just tie it all together. You can see for yourself at the GitHub page:[https://github.com/ben-ev/xbmc-remote][3]. - -> ### Setting up ### -> -> Once you’ve developed your remote control, you’ll need a way of ensuring that it starts every time you turn on your media centre. There are a few ways of doing this, but the easiest is just to add a command launching it to /etc/rc.local. We installed our file to /opt/xbmc-remote/remote.py with all the other files alongside it. We then added the following line to /etc/rc.local before the final exit 0 line. -> -> cd /opt/xbmc-remote && python remote.py & - -> ### GitHub ### -> -> This project is quite bare-bones at the moment, but – the business of running a magazine means we don’t have as much time as we’d like to program. However, we’ve set up a GitHub project where we hope to keep working on it, and if you think you’d benefit from the project as well, we’d love your input. -> -> To see what’s going on, head over to [https://github.com/ben-ev/xbmc-remote][4] and take a look at what state it’s in. You can get a copy of the latest code from that web page, or clone it from the command line. -> -> If you want to improve it, you can fork the project to develop in your own branch, and then send a pull request when your features are working. For more information on working with GitHub, head to [https://github.com/features][5]. - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/xbmc-build-a-remote-control/ - -作者:[Ben Everard][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/ben_everard/ -[1]:http://bottlepy.org/docs/dev/deployment.html -[2]:http://wiki.xbmc.org/?title=JSON-RPC_API/v6 -[3]:https://github.com/ben-ev/xbmc-remote -[4]:https://github.com/ben-ev/xbmc-remote -[5]:https://github.com/features diff --git a/translated/tech/20150616 XBMC--build a remote control.md b/translated/tech/20150616 XBMC--build a remote control.md new file mode 100644 index 0000000000..7347aca243 --- /dev/null +++ b/translated/tech/20150616 XBMC--build a remote control.md @@ -0,0 +1,264 @@ +XBMC:自制遥控 +================================================================================ +**通过运行在 Android 手机上的自制遥控器来控制你的家庭媒体播放器。** + +**XBMC** 一款很优秀的软件,能够将几乎所有电脑变身成媒体中心。它可以播放音乐和视频,显示图片,甚至还能显示天气预报。为了在配置成家庭影院后方便使用,你可以通过手机 app 访问运行在已连接到 Wi-Fi 的 XBMC 机器上的服务来控制它。可以找到很多这种工具,几乎覆盖所有智能手机系统。 + +> ### Kodi ### +> +> 在你阅读这篇文章的时候,**XBMC** 可能已经成为历史。因为法律原因(因为名字 **XBMC** 或 X**-Box Media Center** 里引用了不再支持的过时硬件)项目组决定使用新的名字 **Kodi**。不过,除了名字,其他的都会保持原样。或者说除开通常新版本中所期待的大量新改进。这一般不会影响到遥控软件,它应该能在已有的 **XBMC** 系统和新的 Kodi 系统上都能工作。 + +我们目前配置了一个 **XBMC** 系统用于播放音乐,不过我们找到的所有 XBMC 遥控没一个好用的,特别是和媒体中心连接的电视没打开的时候。它们都有点太复杂了,集成了太多功能在手机的小屏幕上。我们希望能有这样的系统,从最开始就是设计成只用于访问音乐库和电台插件,所以我们决定自己实现一个。它不需要用到 XBMC 的所有功能,因为除了音乐以外的任务,我们可以简单地切换使用通用的 XBMC 遥控。我们的测试系统是一个刷了 RaspBMC 发行版的树莓派,但是我们要做的工具并不受限于树莓派或那个发行版,它应该可以匹配任何安装了相关插件的基于 Linux 的 XBMC 系统。 + +首先,遥控程序需要一个用户界面。大多数 XBMC 遥控程序都是独立的 app。不过对于我们要做的这个音乐控制程序,我们希望用户可以不用安装任何东西就可以使用。显然我们需要使用网页界面。XBMC 本身自带网页服务器,但是为了获得更多权限,我们还是使用了独立的网页框架。在同一台电脑上跑两个以上网页服务器没有问题,只不过它们不能使用相同的端口。 + +有几个网页框架可以使用。而我们选用 Bottle 是因为它是一个简单高效的框架,而且我们也确实用不到任何高级功能。Bottle 是一个 Python 模块,所以这也将是我们编写服务器模块的语言。 + +你应该能在软件包管理器里找到 Bottle。在基于 Debian 的系统(包括 RaspBMC)里,你可以通过下面的命令安装: + + sudo apt-get install python-bottle + +遥控程序实际上只是连接用户和系统的中间层。Bottle 提供了和用户交互的方式,而我们将通过 JSON API 来和 **XBMC** 交互。这样可以让我们通过发送 JSON 格式消息的方式去控制媒体播放器。 + +我们将用到一个叫做 xbmcjson 的简单 XBMC JASON API 封装。足够用来发送控制请求,而不需要关心实际的 JSON 格式以及和服务器通讯的无聊事。它没有包含在 PIP 包管理中,所以你得直接从 **GitHub** 安装: + + git clone https://github.com/jcsaaddupuy/python-xbmc.git + cd python-xbmc + sudo python setup.py install + +万事俱备,只欠代码。 + +#### 先从 Bottle 开始 #### + +我们程序的基本结构: + + from xbmcjson import XBMC + from bottle import route, run, template, redirect, static_file, request + import os + xbmc = XBMC(“http://192.168.0.5/jsonrpc”, “xbmc”, “xbmc”) + @route(‘/hello/’) + def index(name): + return template(‘

Hello {{name}}!

’, name=name) + run(host=”0.0.0.0”, port=8000) + +这样程序将连接到 **XBMC**(不过实际上用不到);然后 Bottle 会开始伺服网站。在我们的代码里,它将监听主机 0.0.0.0(意味着允许所有主机连接)的端口 8000。它只设定了一个站点,就是 /hello/XXXX,这里的 XXXX 可以是任何内容。不管 XXXX 是什么都将作为参数名传递给 index()。然后再替换进去 HTML 网页模版。 + +你可以先试着把上面内容写到一个文件(我们取的名字是 remote.py),然后用下面的命令启动: + + python remote.py + +然后你可以在浏览器里访问 localhost:8000/hello/world 看看模版生效的效果。 + +@route() 用来设定网页服务器的路径,而函数 index() 会返回该路径的数据。通常是返回由模版生成的 HTML 页面,但是并不是说只能这样(后面会看到)。 + +随后,我们将给应用添加更多页面入口,让它变成一个全功能的 XBMC 遥控,但仍将采用相同代码结构。 + +XBMC JSON API 接口可以从和 XBMC 机器同网段的任意电脑上访问。也就是说你可以在自己的笔记本上开发,然后再布置到媒体中心上,而不需要浪费时间上传每次改动。 + +模版 - 比如前面例子里的那个简单模版 - 是一种结合 Python 和 HTML 来控制输出的方式。理论上,这俩能做很多很多事,但是会非常混乱。我们将只是用它们来生成正确格式的数据。不过,在开始动手之前,我们先得准备点数据。 + +> ### Paste ### +> +> Bottle 自带网页服务器,就是我们用来测试遥控程序的。不过,我们发现它性能有时不够好。当我们的遥控程序正式上线时,我们希望页面能更快一点显示出来。Bottle 可以和很多不同的网页服务器配合工作,而我们发现 Paste 用起来非常不错。而要使用的话,只要简单地安装(Debian 系统里的 python-paste 包),然后修改一下代码里的 run 调用: +> +> run(host=hostname, port=hostport, server=”paste”) +> +> 你可以在 [http://bottlepy.org/docs/dev/deployment.html][1] 找到如何使用其他服务器的相关细节。 + +#### 从 XBMC 获取数据 #### + +XBMC JSON API 分成 14 个命名空间:JSONRPC, Player, Playlist, Files, AudioLibrary, VideoLibrary, Input, Application, System, Favourites, Profiles, Settings, Textures 和 XBMC。每个都可以通过 Python 的 XBMC 对象访问(Favourites 除外,明显是个疏忽)。每个命名空间都包含许多方法用于对程序的控制。例如,Playlist.GetItems() 可以用来获取某个特定播放列表的内容。服务器会返回给我们 JSON 格式的数据,但 xbmcjson 模块会为我们转化成 Python 词典。 + +我们需要用到 XBMC 里的两个组件来控制播放:播放器和播放列表。播放器带有播放列表并在每首歌结束时从列表里取下一首。为了查看当前正在播放的内容,我们需要获取正在工作的播放器的 ID,然后根据它找到当前播放列表的 ID。这个可以通过下面的代码来实现: + + def get_playlistid(): + player = xbmc.Player.GetActivePlayers() + if len(player[‘result’]) > 0: + playlist_data = xbmc.Player.GetProperties({“playerid”:0, “properties”:[“playlistid”]}) + if len(playlist_data[‘result’]) > 0 and “playlistid” in playlist_data[‘result’].keys(): + return playlist_data[‘result’][‘playlistid’] + return -1 + +如果当前没有播放器在工作(就是说,返回数据的结果部分的长度是 0),或者当前播放器不带播放列表,这样的话函数会返回 -1。其他时候,它会返回当前播放列表的数字 ID。 + +当我们拿到当前播放列表的 ID 后,就可以获取列表的细节内容。按照我们的需求,有两个重要的地方:播放列表里包含的项,以及当前播放所处的位置(已经播放过的项并不会从播放列表移除,只是移动当前播放位置)。 + + def get_playlist(): + playlistid = get_playlistid() + if playlistid >= 0: + data = xbmc.Playlist.GetItems({“playlistid”:playlistid, “properties”: [“title”, “album”, “artist”, “file”]}) + position_data = xbmc.Player.GetProperties({“playerid”:0, ‘properties’:[“position”]}) + position = int(position_data[‘result’][‘position’]) + return data[‘result’][‘items’][position:], position + return [], -1 + +这样可以返回以正在播放的项开始的列表(因为我们并不关心已经播放过的内容),而且也包含了位置信息用来从列表里移除项。 + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/04/xbmc2-large.jpg) + +API 文档在这里:[http://wiki.xbmc.org/?title=JSON-RPC_API/v6][2]。它列出了所有支持的函数,但是关于具体如何使用的描述有点太简单了。 + +> ### JSON ### +> +> JSON 是 JavaScript Object Notation 的缩写,开始设计用于 JavaScript 对象的序列化。目前仍然起到这个作用,但是它也是用来编码任意数据的一种很好用的方式。 +> +> JSON 对象都是这样的格式: +> +> {property1:value1, property2:value2, property3:value3} +> +> 支持任意数目的属性/值配对。对 Python 程序员来说,看上去和字典数据结构很相似,不过这两个确实很像。 +> +> 在字典数据结构里,值本身可以是另一个 JSON 对象,或者一个列表,所以下面的格式也是正确的: +> +> {“name”:“Ben”, “jobs”:[“cook”, “bottle-washer”], “appearance”: {“height”:195, “skin”:“fair”}} +> +> JSON 通常在网络服务中用来发送和接收数据,并且大多数编程语言都能很好地支持,所以如果你熟悉 Python 的话,你应该可以使用你熟悉的编程语言调用相同的接口来轻松地控制 XBMC。 + +#### 整合到一起 #### + +把之前的功能连接到 HTML 页面很简单: + + @route(‘/juke’) + def index(): + current_playlist, position = get_playlist() + return template(‘list’, playlist=current_playlist, offset = position) + +只需要抓取播放列表(调用我们之前定义的函数),然后将结果传递给负责显示的模版。 + +负责显示列表数据的模版的主要部分是: + +

Currently Playing:

+ % if playlist is not None: + % position = offset + % for song in playlist: + {{song[‘title’]}} + % if song[‘type’] == ‘unknown’: + Radio + % else: + {{song[‘artist’][0]}} + % end + % if position != offset: + remove + % else: + skip + % end +
+ % position += 1 + % end + +可以看到,模版大部分是用 HTML 写的,只有一小部分用来控制输出的其他代码。用两个括号括起来的变量是输出位置(像我们在第一个 ‘hello world’ 例子里看到的)。你也可以嵌入以百分号开头的 Python 代码。因为没有缩进,你需要用一个 % end 来结束当前的代码块(就像循环或 if 语句)。 + +这个模版首先检查列表是否为空,然后遍历里面的每一项。每一项会用粗体显示歌曲名字,然后是艺术家名字,然后是一个是否跳过(如果是当前正在播的歌曲)或从列表移除的链接。所有歌曲的类型都是 ‘song’,如果类型是 ‘unknown’,那就不是歌曲而是网络电台。 + +/remove/ 和 /skip/ 路径只是简单地封装了 XBMC 控制功能,在改动生效后重新加载 /juke: + + @route(‘/skip/’) + def index(position): + print xbmc.Player.GoTo({‘playerid’:0, ‘to’:’next’}) + redirect(“/juke”) + @route(‘/remove/’) + def index(position): + playlistid = get_playlistid() + if playlistid >= 0: + xbmc.Playlist.Remove({‘playlistid’:int(playlistid), ‘position’:int(position)}) + redirect(“/juke”) + +当然,如果不能往列表里添加歌曲的话那这个列表管理功能也不行。 + +因为一旦播放列表结束,它就消失了,所以你需要重新创建一个,这会让事情复杂一些。而且有点让人迷惑的是,播放列表是通过调用 Playlist.Clear() 方法来创建的。这个方法也还用来删除包含网络电台(类型是 unknown)的播放列表。另一个麻烦的地方是列表里的网络电台开始播放后就不会停,所以如果当前在播网络电台,也会需要清除播放列表。 + +这些页面包含了指向 /play/ 的链接来播放歌曲。通过下面的代码处理: + + @route(‘/play/’) + def index(id): + playlistid = get_playlistid() + playlist, not_needed= get_playlist() + if playlistid < 0 or playlist[0][‘type’] == ‘unknown’: + xbmc.Playlist.Clear({“playlistid”:0}) + xbmc.Playlist.Add({“playlistid”:0, “item”:{“songid”:int(id)}}) + xbmc.Player.open({“item”:{“playlistid”:0}}) + playlistid = 0 + else: + xbmc.Playlist.Add({“playlistid”:playlistid, “item”:{“songid”:int(id)}}) + remove_duplicates(playlistid) + redirect(“/juke”) + +最后一件事情是实现 remove_duplicates 调用。这并不是必须的 - 而且还有人并不喜欢这个 - 不过可以保证同一首歌不会多次出现在播放列表里。 + +我们也实现了一些页面用来列出收藏歌曲里所有艺术家,以及列出指定艺术家的歌曲和专辑。这些都非常简单,和 /juke 页面基本类似。 + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/04/xbmc1-large.jpg) + +还需要处理一下 UI,不过功能已经有了。 + +> ### 日志 ### +> +> 通常拿到 XBMC JSON API 并不清楚能用来做什么,而且它的文档也有点模糊。找出如何使用的一种方式是看别的遥控程序是怎么做的。如果打开日志功能,就可以在使用其他遥控程序的时候看到哪个 API 被调用了,然后就可以应用到在自己的代码里。 +> +> 要打开日志功能,把 XBMC 媒体中心 接到显示器上,再依次进入设置 > 系统 > 调试,打开允许调试日志。在打开日志功能后,还需要登录到 XBMC 机器上(比如通过 SSH),然后就可以查看日志了。日志文件的位置应该显示在 XBMC 界面左上角。在 RaspBMC 系统里,文件位置是 /home/pi/.xbmc/temp/xbmc.log。你可以通过下面的命令实时监视哪个 API 接口被调用了: +> +> cd /home/pi/.xbmc/temp +> tail -f xbmc.log | grep “JSON” + +#### 增加功能 #### + +上面的代码都是用来播放 XBMC 媒体库里的歌曲的,但我们还希望能播放网络电台。每个插件都有自己的独立 URL 可以通过普通的 XBMC JSON 命令来获取信息。举个例子,要从电台插件里获取选中的电台,可以使用; + + @route(‘/radio/’) + def index(): + my_stations = xbmc.Files.GetDirectory({“directory”:”plugin://plugin.audio.radio_de/stations/my/”, “properties”: + [“title”,”thumbnail”,”playcount”,”artist”,”album”,”episode”,”season”,”showtitle”]}) + if ‘result’ in my_stations.keys(): + return template(‘radio’, stations=my_stations[‘result’][‘files’]) + else: + return template(‘error’, error=’radio’) + +这样可以返回一个可以和歌曲一样能添加到播放列表的文件。不过,这些文件能一直播下去,所以(之前说过)在添加其他歌曲的时候需要重新创建列表。 + +#### 共享歌曲 #### + +除了伺服页面模版,Bottle 还支持静态文件。方便用于那些不会因为用户输入而改变的内容。可以是 CSS 文件,一张图片或是一首 MP3 歌曲。在我们的简单遥控程序里(目前)还没有任何用来美化的 CSS 或图片,不过我们增加了一个下载歌曲的途径。这个可以让媒体中心变成一个存放歌曲的 NAS 盒子。在需要传输大量数据的时候,最好还是用类似 Samba 的功能,但只是下几首歌到手机上的话使用静态文件也是很好的方式。 + +通过歌曲 ID 来下载的 Bottle 代码: + + @route(‘/download/’) + def index(id): + data = xbmc.AudioLibrary.GetSongDetails({“songid”:int(id), “properties”:[“file”]}) + full_filename = data[‘result’][‘songdetails’][‘file’] + path, filename = os.path.split(full_filename) + return static_file(filename, root=path, download=True) + +应用的时候,只需要为 /songsby/ 页面里的相应 ID 加个链接。 + +我们已经把所有的代码过了一遍,不过还需要一点工作来把它们集合到一起。可以自己去 GitHub 页面 [https://github.com/ben-ev/xbmc-remote][3] 看下。 + +> ### 设置 ### +> +> 我们的遥控程序已经开发完成,还需要保证让它在媒体中心每次开机的时候都能启动。有几种方式,最简单的是在 /etc/rc.local 里增加一行命令来启动。我们的文件位置在 /opt/xbmc-remote/remote.py,其他文件也和它一起。然后在 /etc/rc.local 最后的 exit 0 之前增加了下面一行。 +> +> cd /opt/xbmc-remote && python remote.py & + +> ### GitHub ### +> +> 这个项目目前还只是个架子,但是 - 我们运营杂志就意味着没有太多自由时间来编程。不过,我们启动了一个 GitHub 项目,希望能持续完善, 而如果你觉得这个项目有用的话,欢迎做出贡献。 +> +> 要查看最新的进展,请访问 [https://github.com/ben-ev/xbmc-remote][4] 看看所处的状态。你可以从页面里获取最新的代码,或者通过命令行复制。 +> +> 如果你希望改善它,可以复制项目到你自己的分支开发,然后在功能完成后发起合并请求。关于如何使用 GitHub 的更多信息,请访问 [https://github.com/features][5]。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/xbmc-build-a-remote-control/ + +作者:[Ben Everard][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/ben_everard/ +[1]:http://bottlepy.org/docs/dev/deployment.html +[2]:http://wiki.xbmc.org/?title=JSON-RPC_API/v6 +[3]:https://github.com/ben-ev/xbmc-remote +[4]:https://github.com/ben-ev/xbmc-remote +[5]:https://github.com/features From a7a41cf260333b7fe837ea6fc7964873cbac6ce8 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 30 Jun 2015 13:54:42 +0800 Subject: [PATCH 1305/2517] PUB:20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @geekpi 这篇错别字有点多~ --- ... Instagram Style Filters to Your Photos.md | 70 ++++++++++++++++++ ... Instagram Style Filters to Your Photos.md | 74 ------------------- 2 files changed, 70 insertions(+), 74 deletions(-) create mode 100644 published/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md delete mode 100644 translated/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md diff --git a/published/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md b/published/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md new file mode 100644 index 0000000000..d44db58488 --- /dev/null +++ b/published/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md @@ -0,0 +1,70 @@ +在 Ubuntu 中给你的照片加上 Instagram 风格的滤镜程序 +================================================================================ +拿起你的自拍杆跟我来。 + +### XnRetro 照片编辑器 ### + +**XnRetro** 是一个可以让你快速给你照片添加“类 Instagram”效果的程序。 + +你肯定知道我说的这些效果:划痕、噪点、相框、过度处理、复古和怀旧色调(因为在这个数字过客的时代,我们一定知道无穷无尽的自拍永远也找不回怀旧的自己。) + +无论你认为这些效果是愚蠢的艺术还是创作的捷径,这些滤镜非常流行,可以帮助那些平实无奇的照片添加个性。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/instagram-app.jpg) + +*XnRetro是一个照片编辑应用* + +#### XnRetro的功能 #### + +**XnRetro 有下面那些功能** + +- 20 种色彩滤镜 +- 15 种光影效果(虚化、泄露等等) +- 28 种画框和边线 +- 5 种插图 (带力度控制) +- 对比度、伽马校正、饱和度等图像调整 +- 矩形修剪选项 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/Screen-Shot-2015-05-10-at-23.30.01-e1431297068833.png) + +*灯光效果调整* + +(理论上)你可以保存编辑过的 .jpg 或者 .png 文件,并且直接在 app 中分享到社交媒体上。 + +我说“理论上”的意思是保存.jpg图像无法正常在 linux 版的程序上工作(你可以保存 .png 的图像)。相似问题还有,大多数内置的社交链接失效或者无法导出。 + +要使用**15 种光影效果**,你需要在 XnRetro 的‘light’文件夹下将 .jpg 文件重新保存成 .png 文件。编辑‘light.xml’来匹配新的文件名,点击保存那么灯光效果就可以没有问题的加载进 XnRetro 了。 + + +**XnRetro 值得安装么?** + +XnRetro 并不是完美的。它看上去很老土、很难正确的安装,**并且已经几年没有更新了**。 + +但它还可以使用,除了保存 .jpg 文件外。同时也是那些像 Gimp 或者 Shotwell 的那些‘正规’的图片调整工具的一个灵活替代品。 + +虽然像 [Pixlr Touch Up][1] 和 [Polarr][2] 这样的 web 应用和 Chrome Apps 也提供相似的功能,但你也许正在寻找真正原生的解决方案。 + +习惯了 XnRetro 就很难离开它。 + +### 下载 Ubuntu 下的 XnRetro ### + +XnRetro 没有可用的 .deb 安装包。它以二进制文件的形式发行,这意味着你需要每次双击程序来运行。它也只有32位的版本。 + +你可以使用下面的 XnRetro下载链接。下载完成后你需要解压压缩包并进入。双击里面的‘xnretro’程序。 + +- [下载 Linux 版 XnRetro (32位, tar.gz)][3] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/05/instagram-photo-filters-ubuntu-desktop-app + +作者:[Joey-Elijah Sneddon][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgchrome.com/?s=pixlr +[2]:http://www.omgchrome.com/the-best-chrome-apps-of-2014/ +[3]:http://www.xnview.com/en/xnretro/#downloads diff --git a/translated/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md b/translated/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md deleted file mode 100644 index ae5e6df6eb..0000000000 --- a/translated/share/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md +++ /dev/null @@ -1,74 +0,0 @@ -一个Ubuntu中给你的照片加Instagram风格滤镜的程序 -================================================================================ -**在Ubuntu中寻找一个给你的照片加Instagram风格的滤镜程序么?** - -拿起你的自拍棒跟着这个来。 - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/instagram-app.jpg) -XnRetro是一个照片编辑应用 - -### XnRetro 照片编辑器 ### - -**XnRetro** 是一个可以让你快速给你照片添加“类Instagram”效果的程序。 - -你知道我说的这些效果:划痕、噪点、框架、过处理、复古和怀旧色调(因为在这个数字时代,我们必须知道无尽的自拍不能称为怀旧的自己。) - -无论你认为这些效果是愚蠢的艺术价值或者创作的捷径,这些滤镜非常流行切可以帮助那些平平照片添加个性。 - - -#### XnRetro的功能 #### - -**XnRetro有下面那些功能** - -- 20色彩滤镜 -- 15中光效果(虚化、泄露等等) -- 28框架和边框 -- 5中插图 (带力度控制) -- Image adjustments for contrast, gamma, saturation, etc -- 对比度、伽马、饱和度等图像调整 -- 矩形修剪选项 - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/Screen-Shot-2015-05-10-at-23.30.01-e1431297068833.png) -灯光效果调整 - -你可以(理论上)编辑。jpg或者.png文件并且直接在app中等想到社交媒体上。 - -我说“理论”上的意思是保存.jpg图像无法正常在linux版的程序上工作(你可以保存.png的图像)。相似的,大多数内置的社交链接失效或者无法导出。 - -要使用**15中光影效果**你需要在XnRetro的‘light’文件夹下重新保存.jpg文件成.png文件。编辑‘light.xml’来匹配新的文件名,点击保存那没灯光效果就可以没有问题的加载进XnRetro了。 - -> ‘用户友好的XnRetro很难打败-一旦你用顺之后。’ - -**XnRetro值得安装么?** - -XnRetro并不是完美的。它看上去很丑、很难正确的安装并且已经纪念没有更新了。 - -它还可以使用,输了保存.jpg文件外。同时也是那些像Gimp或者Shotwell的那些‘正规’图片调整工具的一个灵活替代品。 - -While web apps and Chrome Apps¹ like [Pixlr Touch Up][1] and [Polarr][2] offer similar features you may be looking for a truly native solution. -虽然web应用和Chrome Apps¹像[Pixlr Touch Up][1] 和 [Polarr][2]提供另外相似的功能,而你也许正在寻找真正原生的解决方案。 - -对于此,用户友好带有容易使用滤镜的XnRetro很难被打败。 - -### 下载Ubuntu下的XnRetro ### - -XnRetro没有可用的.deb安装包。它以二进制文件的形式发型,这意味着你需要每次双击程序来运行。它也只有32位的版本。 - -你可以使用下面的XnRetro下载链接。下载完成后你需要解压压缩包并进入。双击里面的‘xnretro’程序。 - -- [下载Linux版XnRetro (32位, tar.gz)][3] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/05/instagram-photo-filters-ubuntu-desktop-app - -作者:[Joey-Elijah Sneddon][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.omgchrome.com/?s=pixlr -[2]:http://www.omgchrome.com/the-best-chrome-apps-of-2014/ -[3]:http://www.xnview.com/en/xnretro/#downloads From b8fb4f3c00d1c6c17e56683a3d39cc11c69a36c4 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 30 Jun 2015 16:34:33 +0800 Subject: [PATCH 1306/2517] PUB:20150604 12 Globally Recognized Linux Certifications @wi-cuckoo --- ...lobally Recognized Linux Certifications.md | 172 ++++++++++++++++++ ...lobally Recognized Linux Certifications.md | 172 ------------------ 2 files changed, 172 insertions(+), 172 deletions(-) create mode 100644 published/20150604 12 Globally Recognized Linux Certifications.md delete mode 100644 translated/share/20150604 12 Globally Recognized Linux Certifications.md diff --git a/published/20150604 12 Globally Recognized Linux Certifications.md b/published/20150604 12 Globally Recognized Linux Certifications.md new file mode 100644 index 0000000000..3b1ed918ba --- /dev/null +++ b/published/20150604 12 Globally Recognized Linux Certifications.md @@ -0,0 +1,172 @@ +12 个全球认可的 Linux 认证 +================================================================================ +大家好,今天我们将会认识一些非常有价值的全球认可的Linux认证。Linux认证是不同的Linux专业机构在全球范围内进行的认证程序。Linux认证可以让Linux专业人才可以在服务器领域或者相关公司等等这些地方更容易获得Linux相关的工作。Linux认证评估一个人在Linux的各个领域里的专业程度。有很多不错的Linux专业机构提供不同的Linux认证。但是,在公司谋取一份工作时全球仅有少数被非常认可的Linux认证含金量很高,这些工作包括管理服务器,虚拟化,安装系统与软件,配置程序,应用支持和其他Linux操作系统相关的东西。随着全球使用Linux操作系统的服务器的增长,拉动了对于Linux专业人才的需求。为了更好的证明Linux专业技术水平,在全球看来,更好的、著名的认证总是有着更高的优先级。 + +这里是一些全球认可的Linux认证,我们接下来将会一一谈到。 + +### 1. CompTIA Linxu+ ### + +CompTIA Linux+ 是LPI(Linux Professional Institute,Linux专业委员会)主办的一个Linux认证,在全世界范围内提供培训。其提供的Linux相关知识,可以用于从事一大批Linux相关专业的工作,如Linux管理员、高级网络管理员、系统管理员、Linux数据库管理员和Web管理员。如果任何人想从事安装和维护Linux操作系统,该课程会帮助他达到认证要求,并且通过提供对Linux系统更宽阔的认识,能够为通过考试做好准备。LPI的CompTIA Linux+认证的主要目的就是,提供给证书持有者足够扎实的,关于安装软件、操作、管理和设备排障的知识。我们可以付出一定的费用、时间和努力,完成CompTIA Linux+,同时获得三个业内认可的证书:**LPI LPIC-1**和**SUSE Certified Linux Administrator (CLA)**证书。 + +- **认证代码** : LX0-103,LX0-104(2015年3月30日启动)或者LX0-101,LX0-102 +- 题目数量:每次考试60道题 +- 题目类型:多选 +- 考试时长:90分钟 +- 要求:A+,Network+,并且有至少12个月的Linux管理经验 +- 分数线:500 (对于200-800的范围来说) +- 语言:英语,将来会有德语,葡萄牙语,繁体中文,西班牙。 +- 有效期:认证后三年有效 + +**注意**:不同系列的考试不能合并。如果你考的是LX0-101,那么你必须考LX0-102完成认证。同样的,LX0-103和LX0-104又是一个系列。LX0-103和LX0-104系列是LX0-101和LX0-102系列的升级版。 + +### 2. LPIC ### + +LPIC,全称Linux专业委员会认证( Linux Professional Institute Certification),是Linux专业委员会的一个Linux认证程序。这是一个多级别的认证程序,要求在每个级别通过一系列(通常是两个)的认证考试。该认证有三个级别,包括初级水平认证 **LPIC-1** ,高级水平认证 **LPIC-2**和最高水平认证 **LPIC-3**。前两个认证侧重于 **Linux系统管理**,而最后一个认证侧重一些专业技能,包括虚拟化和安全。为了得到 **LPIC-3** 认证,一个持有有效的 **LPIC-1** 与**LPIC-2** 认证的考生必须通过300复杂环境测试、303安全测试、304虚拟化测试和高可用性测试中的一个。**LPIC-1**认证按照证书持有者可以通过运行Linux,使用命令行界面和基本的网络知识安装,维护,配置等任务而设计,LPIC-2测试考生是否作为管理中小型混合网络的候选人。LPIC-3认证是为企业级Linux专业技能设计所设计,代表了最高的专业水平和不针对特定 Linux 发行版的行业认证。 + +- **认证代码**:LPIC-1(101和102),LPIC-2(201和202)和LPIC-3(300,303或者304) +- 题目类型:60个多项选择 +- 考试时长:90分钟 +- 要求:无,建议有 Linux Essentials 认证 +- 分数线:500(在200-800的范围内) +- 语言:LPIC-1:英语,德语,意大利语,葡萄牙语,西班牙语(现代),汉语(简体),汉语(繁体),日语 +- LPIC-2:英语,德语,葡萄牙语,日语 +- LPIC-3:英语,日语 +- 有效期:退休之后五年内仍然有效 + +### 3.Oracle Linux OCA ### + +Oracle联合认证(OCA)为个人而定制,适用于那些想证明其部署和管理Oracle Linux操作系统的知识牢固的人。该认证专业知识仅仅针对Oracle Linux发行版,这个系统完全是为Oracle产品特别剪裁的,可以运行Oracle设计的系统,包括Oracle Exadata数据库服务器,Oracle Exalytics In-Memory 服务器,Oracle Exalogic 均衡云,和Oracle数据库应用等。Oracle Linux的“坚不可摧企业内核”为企业应用带来了高性能、高扩展性和稳定性。OCA认证覆盖了如管理本地磁盘设备、管理文件系统、安装和移除Solaris包与补丁,优化系统启动过程和系统进程。这是拿到OCP证书系列的第一步。OCA认证以其前身为Sun Certified Solaris Associate(SCSAS)而为人所知。 + +- **认证代码**:OCA +- 题目类型:75道多项选择 +- 考试时长:120分钟 +- 要求:无 +- 分数线:64% +- 有效期:永远有效 + +### 4. Oracle Linux OCP ### + +Oracle专业认证(OCP)是Oracle公司为Oracle Linux提供的一个认证,覆盖更多的进阶知识和技能,对于一个Oracle Linux管理员来说。它囊括的知识有配置网络接口、管理交换分区配置、崩溃转储、管理软件、数据库和重要文件。OCP认证是技术性专业知识和专业技能的基准测试,这些知识与技能需要在公司里广泛用于开发、部署和管理应用、中间件和数据库。Oracle Linux OCP的工作机会在增长,这得益于工作市场和经济发展。根据考试纲领,证书持有者有能力胜任安全管理、为Oracle 数据库准备Oracle Linux系统、排除故障和进行恢复操作、安装软件包、安装和配置内核模块、维护交换空间、完成用户和组管理、创建文件系统、配置逻辑卷管理(LVM)、文件分享服务等等。 + +- **认证代码**:OCP +- 题目类型:60至80道多项选择题 +- 考试时长:120分钟 +- 要求:Oracle Linux OCA +- 分数线:64% +- 有效期:永远有效 + +### 5. RHCSA ### + +RHCSA是红帽公司作为红帽认证系统工程师推出的一个认证程序。RHCSA们是指一些拥有在著名的红帽Linux环境下完成核心系统管理技能和能力的人。这是一个入门级的认证程序,关注在系统管理上的实际胜任能力,包括安装、配置一个红帽Linux系统,接入一个可用的网络提供网络服务。一个红帽认证的系统管理员可以理解和使用基本的工具,用以处理文件、目录、命令行环境和文档;操作运行中的系统,包括以不同的启动级别启动、识别进程、开启和停止虚拟机和控制服务;使用分区和逻辑卷配置本地存储;创建和配置文件系统和文件系统属性,包括权限、加密、访问控制列表和网络文件系统;部署配置和维护系统,包括软件安装、更新和核心服务;管理用户和组,包括使用一个中心的目录用于验证;安全性的工作,包括基本的基本防火墙和SELinux配置。要获得RHCE和其他认证,首先得认证过RHCSA。 + +- **认证代码**:RHCSA +- 课程代码:RH124,RH134和RH199 +- 考试代码:EX200 +- 考试时长:21-22小时,取决于选择的课程 +- 要求:无。有一些Linux基础知识更好 +- 分数线:300总分,210过(70%) +- 有效期:3年 + +### 6. RHCE ### + +RHCE,也叫做红帽认证工程师,是一个中到高级水平的认证程序,为一些想要学习更多技能和知识,成为一个负责红帽企业Linux的高级系统管理员的RHCSA开设的,RHCE应该有能力、知识和技能来配置静态路由、包过滤、NAT、设定内核运行参数、配置一个ISCSI初始化程序,生成并发送系统用量报告、使用shell脚本自动完成系统维护任务、配置系统日志,包括远程日志、提供网络服务如HTTP/HTTPS、FTP、NFS、SMB、SMTP、SSH和NTP等等。推荐希望获得更多高级水平的认证的RHCSA们、已经完成系统管理员I,II和III、或者已经完成RHCE 快速跟进培训的人们参加认证。 + +- **认证代码**:RHCE +- 课程代码:RH124,RH134,RH254和RH199 +- 考试代码:EX200和EX300 +- 考试时长:21-22个小时,取决于所选课程 +- 要求:一个RHCSA证书 +- 分数线:300总分,210过(70%) +- 有效期:3年 + +### 7. RHCA ### + +RHCA即红帽认证架构师,是红帽公司的一个认证程序。它的关注点在系统管理的实际能力,包括安装和配置一个红帽Linux系统,并加入到一个可用网络中运行网络服务。RHCA是所有红帽认证中最高水平的认证。考生需要选择他们希望针对的领域,或者选择合格的红帽认证的任意组合来创建一个他们自己的领域。这里有三个主要的领域:数据中心、云和应用平台。精通数据中心领域的RHCA能够运行、管理数据中心;而熟悉云的可以创建、配置和管理私有云和混合云、云应用平台以及使用红帽企业Linux平台的灵活存储方案;精通应用平台集合的RHCA拥有技能如安装、配置和管理红帽JBoss企业应用平台和应用,云应用平台和混合云环境,借助红帽的OpenShift企业版,使用红帽JBoss数据虚拟化技术从多个资源里组合数据。 + +- **认证代码**:RHCA +- 课程代码:CL210,CL220.CL280,RH236,RH318,RH413,RH436,RH442,JB248和JB450 +- 考试代码:EX333,EX401,EX423或者EX318,EX436和EX442 +- 考试时长:21-22个小时,取决于所选课程 +- 要求:未过期的RHCE证书 +- 分数线:300总分,210过(70%) +- 有效期:3年 + +### 8. SUSE CLA ### + +SUSE认证Linux管理员(SUSE CLA)是SUSE推出的一个初级认证,关注点在SUSE Linux企业服务器环境下的日常任务管理。为了获得SUSE CLA认证,不用必须完成课程任务,只需要通过考试就能获得认证。SUSE CLA们能够、也有技术去使用Linux桌面、定位并利用帮助资源、管理Linux文件系统、用Linux Shell和命令行工作、安装SLE 11 SP22、管理系统安装、硬件、备份和恢复、用YaST管理Linux、Linux进程和服务、存储、配置网络、远程接入、SLE 11 SP2监控,任务自动化和管理用户访问和安全工作。我们可以同时获得SUSE CLA,LPIC-1和CompTIA Linux认证,因为SUSE,Linux Professional Institute和CompATI合作提供了这个同时获得三个Linux认证的机会。 + +- **认证代码**:SUSE CLA +- 课程代码:3115,3116 +- 考试代码:050-720,050-710 +- 问题类型:多项选择 +- 考试时长:90分钟 +- 要求:无 +- 分数线:512 + +### 9. SUSE CLP ### + +SUSE认证Linux专业人员(CLP)是一个认证程序,为那些希望获得关于SUSE Linux企业服务器更多高级且专业的知识的人而服务。SUSE CLP是通过SUSE CLA认证后的下一步。应该通过CLA的考试并拥有证书,然后通过完成CLP的考试才能获得CLP的认证。通过SUSE CLP认证的人员有能力完成安装和配置SLES 11系统、维护文件系统、管理软件包、进程、打印、配置基础网络服务、samba、Web服务器、使用IPv6、创建和运行bash shell脚本。 + +- **认证代码**:SUSE CLP +- 课程代码:3115,3116和3117 +- 考试代码:050-721,050-697 +- 考试类型:手写 +- 考试时长:180分钟 +- 要求:SUSE CLA 认证 + +### 10. SUSE CLE ### + +SUSE认证Linux工程师(CLE)是一个工程师级别的高级认证,为那些已经通过CLE考试的人准备。为了获得CLE认证,人们需要已经获得SUSE CLA和CLP的认证。获得CLE认证的人员拥有架设复杂SUSE Linux企业服务器环境的技能。CLE认证过的人可以配置基本的网络服务、管理打印、配置和使用Open LDAP、samba、IPv6、完成服务器健康检测和性能调优、创建和执行shell脚本、部署SUSE Linux企业板、通过Xen实现虚拟化等等。 + +- **认证代码**:SUSE CLE +- 课程代码:3107 +- 考试代码:050-723 +- 考试类型:手写 +- 考试时长:120分钟 +- 要求:SUSE CLP 10或者11证书 + +### 11. LFCS ### + +Linux基金会认证系统管理员(LFCS)认证考生使用Linux和通过终端环境使用Linux的知识。LFCS是Linux基金会的一个认证程序,为使用Linux操作系统工作的系统管理员和工程师准备。Linux基金会联合业内专家、Linux内核社区,测试考生的核心领域、关键技能、知识和应用能力。通过LFCS认证的人员拥有一些技能、知识和能力,包括在命令行下编辑和操作文件、管理和处理文件系统与存储的错误、聚合分区作为LVM设备、配置交换分区、管理网络文件系统、管理用户帐号/权限和属组、创建并执行bash shell脚本、安装/升级/移除软件包等等。 + +- **认证代码**:LFCS +- 课程代码:LFCS201,LFCS220(可选) +- 考试代码:LFCS 考试 +- 考试时长:2小时 +- 要求:无 +- 分数线:74% +- 语言:英语 +- 有效期:两年 + +### 12. LFCE ### + +Linux基金会认证工程师(LFCE),是Linux基金会为Linux工程师推出的认证。相比于LFCS,通过LFCE认证的人员在Linux方面拥有更大范围的技能。这是一个工程师级别的高级认证程序。LFCE认证的人具备一些网络管理方面的技能和能力,如配置网络服务、配置包过滤、监控网络性能、IP流量、配置文件系统和文件服务、网络文件系统、从仓库安装/升级软件包、管理网络安全、配置iptables、http服务、代理服务、邮件服务等等。由于其为高级工程级别的认证程序,所以普遍认为相比LFCS,学习和通过的难度更大些。 + +- **认证代码**:LFCE +- 课程代码:LFS230 +- 考试代码:LFCE 考试 +- 考试时长:2小时 +- 要求:认证过LFCS +- 分数线:72% +- 语言:英语 +- 有效期:2年 + +### 我们发现的情况(这仅仅是我们的观点)### + +最近的调查表明,在不同的高端招聘代理中,称80%的Linux工作描述更倾向于红帽的认证。如果你是一个学生/新手,并且想学习Linux,那么我们建议选择越来越流行的Linux基金会认证,或者CompTIA Linux也可以是一个选择。如果你已经了解了oracle或suse,或者在他们的产品上工作,那oracle/suse的认证会更好些,如果你在公司里工作了,这些认证会对你的职业生涯成长有帮助:-) + +### 总结 ### + +在这个世界上,成千上万的大公司正在运行跑着Linux操作系统的服务器和主框架机,为了在这些服务器上管理、配置和工作,总是存在着对Linux技术/专业知识高度认证的需求。这些国际上承认的认证对某些人在Linux的职业生涯扮演很重要的角色。这些遍布全球的公司运行着Linux,需要Linux工程师、系统管理员和已经获得认证且在Linux相关领域干得不错的人员。全球认可的Linux认证,对于专业知识和职业生涯的辉煌都是重中之重,所以好好准备考试并获得认证,对于在Linux建立职业生涯是一个很好的选择。如果你有任何问题,想法,反馈,请写在下方的评论框里,让我们好知道哪些东西需要添加或者改进。谢谢!:-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/12-globally-recognized-linux-certifications/ + +作者:[Arun Pyasi][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ diff --git a/translated/share/20150604 12 Globally Recognized Linux Certifications.md b/translated/share/20150604 12 Globally Recognized Linux Certifications.md deleted file mode 100644 index 2be4e9df7d..0000000000 --- a/translated/share/20150604 12 Globally Recognized Linux Certifications.md +++ /dev/null @@ -1,172 +0,0 @@ -12个全球认可的Linux认证 -================================================================================ -大家好,今天我们将会认识一些非常有价值的全球认可的Linux认证。Linux认证是不同Linux专业机构在全球范围内进行的认证程序。Linux认证可以让Linux专业人才很容易获得Linux相关的工作,在服务器或者公司等等这些地方。Linux认证评估一个人在Linux的各个领域里的专业程度。有很多不错的Linux专业机构提供不同的Linux认证。但是全球仅有少数被十分认可的Linux认证,在公司谋取一份工作时含金量很高,这些工作包括管理服务器,虚拟化,安装系统与软件,配置程序,应用支持和其他Linux操作系统相关的东西。随着全球使用Linux操作系统的服务器的增长,拉动了对于Linux专业人才的需求。为了更好的证明Linux专业技术,公司进行的著名的认证一直有着更高的优先级,在全球看来。 - -这里是一些全球认可的Linux认证,我们接下来将会一一讨论。 - -### 1. CompTIA Linxu+ ### - -CompTIA Linux+ 是LPI“Linux Professional Institute”主办的一个Linux认证,在全世界范围内提供培训。其提供的Linux相关知识,使得产生了一大批Linux相关专业的工作,如Linux管理员,高级网络管理员,系统管理员,Linux数据库管理员和网页管理员。如果任何人想从事安装和维护Linux操作系统,该课程会帮助达到认证要求,并且通过提供对Linux系统更宽阔的认识,能够为考试做好准备。LPI的CompTIA Linux+认证的主要目的就是,提供给证书持有者足够扎实的知识,关于安装软件,操作,管理和设备排障的。我们可以用一定的费用,时间和努力,,完成CompTIA Linux+,赢得三个业内认可的证书,我们可以自动收到**LPI LPIC-1**和**SUSE Certified Linux Administrator (CLA)**证书。 - -- ** 认证代码** : LX0-103和LX0-104 (2015年三月30日启动)或者LX0-101和LX0-102 -- 题目数量:一次考试60道题 -- 题目类型:多选 -- 考试时长:90分钟 -- 要求:A+,Network+,并且有至少12个月的Linux管理经历 -- 分数线:500 (对于200-800的范围来说) -- 语言:英语,将来会有德语,葡萄牙语,汉语,西班牙。 -- 有效期:认证后三年有效 - -**注意**:不同系列的考试不能交叉。如果你考的是LX0-101,那么你必须考LX0-102完成认证。同样的,你必须考完LX0-103和LX0-104。LX0-103和LX0-104是LX0-101和LX0-102的升级版。 - -### 2. LPIC ### - -LPIC,全称Linux专业委员会认证,是Linux专业委员会的一个Linux认证程序。这是一个多层次的认证程序,要求在每个级别通过一系列(通常是两个)的认证考试。该认证有三个层次,包括初级水平认证 **LPIC-1** ,高级水平认证 **LPIC-2**和最高水平认证 **LPIC-3**。前两个认证侧重于 **Linux系统管理**,而最后一个认证侧重一些专业技能,包括虚拟化和安全。为了得到 **LPIC-3** 认证,一个持有 **LPIC-1** 与**LPIC-2** 的考生必须通过300复杂环境测试,303安全测试,304虚拟化测试和高可用性的其中一个。**LPIC-1**认证按照证书持有者可以通过运行Linux,使用命令行界面和基本的网络知识安装,维护,配置任务而设计,LPIC-2验证考生很少的管理知识,主要是中型混合网络方面。LPIC-3认证按照企业级别的Linux专业技能设计,代表了最高的专业水平(==最后这句不知道如何翻译==) - -- **认证代码**:LPIC-1(101和102),LPIC-2(201和202)和LPIC-3(300,303或者304) -- 题目类型:60个多项选择 -- 考试时长:90分钟 -- 要求:Linux基础 -- 分数线:500(在200-800的范围内) -- 语言:LPIC-1:英语,德语,意大利语,葡萄牙语,西班牙语(现代),汉语(简体),汉语(繁体),日语 -- LPIC-2:英语,德语,葡萄牙语,日语 -- LPIC-3:英语,日语 -- 有效期:退休之后五年内仍然有效 - -### 3.Oracle Linux OCA ### - -Oracle联合认证(OCA)为个人而定制,那些对部署和管理Oracle Linux操作系统且想证明知识牢固感兴趣的人。该认证专业知识仅仅是在Oracle Linux发行版上,这个系统完全是为Oracle产品特别剪裁的,为了运行在Oracle设计的系统上面,包括Oracle Exadata数据库机器,Oracle Exalytics 内存中机器,Oracle Exalogic 均衡云,和Oracle数据库应用。Oracle Linux稳定的企业级内核对于企业应用表现突出,高扩展性和稳定性。OCA认证覆盖如管理本地磁盘设备,文件系统,安装和移除Solaris包与补丁,协调系统启动过程和系统进程方面。这是达到OCP证书佼佼者的第一步。OCA认证以其前身为Sun Certified Solaris Associate(SCSAS)而为人所知。 - -- **认证代码**:OCA -- 题目类型:75道多项选择 -- 考试时长:120分钟 -- 要求:无 -- 分数线:64% -- 有效期:永远有效 - -### 4. Oracle Linux OCP ### - -Oracle Certified Professional(OCP),时Oracle公司为Oracle Linux提供的一个认证,覆盖更多的进阶知识和技能,对于一个Oracle Linux管理员来说。它囊括的知识有配置网络接口,映射交换配置,清理垃圾,管理软件、数据库和核心文件。OCP认证是技术性专业知识和专业技能的基准测试,这些知识与技能需要在公司里广泛用于开发,部署和管理应用,中间设备和数据库。Oracle Linux OCP的工作机会在增长,得益于工作市场和经济。根据考试纲领,证书持有者有能力胜任安全管理,为Oracle 数据库准备Oracle Linux系统,排除故障,安装软件包,安装和配置内核模块,维护交换空间,完成用户和组管理,创建文件系统,配置逻辑卷管理(LVM)、文件分享服务等等。 - -- **认证代码**:OCP -- 题目类型:60至80道多项选择题 -- 考试时长:120分钟 -- 要求:Oracle Linux OCA -- 分数线:64% -- 有效期:永远有效 - -### 5. RHCSA ### - -RHCSA是红帽公司作为红帽认证系统工程师推出的一个认证程序。RHCSAs指一些拥有技能和能力在著名的红帽Linux环境下完成核心系统管理的人。这是一个入门级的认证程序,关注在系统管理上的实际胜任能力,包括安装、配置一个红帽Linux系统,接入一个可用的网络运行网络服务。一个红帽认证的系统管理员可以理解和使用基本的工具,用以处理文件,目录,命令行环境和文档,操作运行中的系统,包括以不同的启动级别启动,标记进程,开启和停止虚拟机和控制服务,使用分区和逻辑卷配置本地存储,部署配置和维护系统,包括软件安装、更新和核心服务,管理用户和组,包括使用一个中心的目录用于验证,安全性工作,包括基本的基本防火墙和SELinux配置。要获得RHCE和其他认证,首先得认证过RHCSA。 - -- **认证代码**:RHCSA -- 课程代码:RH124,RH134和RH199 -- 考试代码:EX200 -- 考试时长:21-22小时,取决于选择的课程 -- 要求:无。有一些Linux基础知识更好 -- 分数线:300总分,210过(70%) -- 有效期:3年 - -### 6. RHCE ### - -RHCE,也叫做红帽认证工程师,是一个中到高级水平的认证程序,为一些红帽认证系统管理员(RHCSA),想学习一个负责红帽企业Linux的高级系统管理员要求的额外技能和知识而开设的,RHCE有能力,知识和技能配置静态的路由,包过滤,网络地址转换(NAT),设定内核运行参数,配置一个互联网小型计算机系统接口(ISCSI)初始化程序,产生并推送系统使用的报告,使用shell脚本自动完成系统维护任务,配置系统登入,包括远程登录,提供网络服务如HTTP/HTTPS,文件传输协议(FTP),网络文件系统(NFS),服务信息块(SMB),简单邮件传输协议(SMTP),安全shell(SSH)和网络时间协议(NTP)等等。RHCSAs希望获得更多高级水平的认证,并且已经完成系统管理员I,II和III,或者RHCE认证建议的RHCE快速跟进课程。 - -- **认证代码**:RHCE -- 课程代码:RH124,RH134,RH254和RH199 -- 考试代码:EX200和EX300 -- 考试时长:21-22个小时,取决于所选课程 -- 要求:一个RHCSA证书 -- 分数线:300总分,210过(70%) -- 有效期:3年 - -### 7. RHCA ### - -RHCA就是红帽认证架构师,是红帽公司的一个认证程序。它的关注点在系统管理的实际能力,包括安装和配置一个红帽Linux系统,并加入到一个可用网络中运行网络服务。RHCA是所有红帽认证中最高水平的认证。考生需要选择他们希望关注的集合,或者选择合格的红帽认证的任意组合,以此来创建一个他们自己的集合。这里有三个主要的集合,数据中心,云和应用平台。精通数据中心集合的RHCA能够运行,管理数据中心,而熟悉云的可以创建,配置和管理私有的,混合的云,云应用平台以及使用红帽企业Linux平台的灵活存储方案。精通应用平台集合的RHCA拥有技能如安装,配置和管理红帽JBoss企业应用平台和应用,云应用平台和混合云环境,借助红帽的OpenShift企业版,使用红帽JBoss数据虚拟化技术从多个资源里组合数据。 - -- **认证代码**:RHCA -- 课程代码:CL210,CL220.CL280,RH236,RH318,RH413,RH436,RH442,JB248和JB450 -- 考试代码:EX333,EX401,EX423或者EX318,EX436和EX442 -- 考试时长:21-22个小时,取决于所选课程 -- 要求:未过期的RHCE证书 -- 分数线:300总分,210过(70%) -- 有效期:3年 - -### 8. SUSE CLA ### - -SUSE认证Linux管理员(SUSE CLA)是SUSE推出的一个初级认证,关注点在SUSE Linux企业服务器环境下的日常任务管理。为了获得SUSE CLA认证,完成课程任务不是必须的,你不得不通过考试获得认证。SUSE CLA有能力,也有技术去使用Linux桌面,定位并利用帮助资源,管理Linux文件系统,用Linux Shell和命令行工作,安装SLE 11 SP22,管理系统安装,硬件,备份和恢复,用YaST管理Linux,Linux进程和服务,存储,配置网络,远程接入,SLE 11 SP2模拟器,任务自动化和管理用户访问和安全工作。我们可以同时获得LPI的SUSE CLA,LPIC-1和CompTIA Linux,因为SUSE,Linux Professional Institute和CompATI合作提供给你这个机会,去获得三个Linux认证。 - -- **认证代码**:SUSE CLA -- 课程代码:3115,3116 -- 考试代码:050-720,050-710 -- 问题类型:多项选择 -- 考试时长:90分钟 -- 要求:无 -- 分数线:512 - -### 9. SUSE CLP ### - -SUSE认证Linux专业人员(CLP)是一个认证程序,为那些希望获得关于SUSE Linux企业服务器更多高级且专业的知识的人而服务。SUSE CLP是通过SUSE CLA认证后的下一步。一个人应该通过CLA的考试并拥有证书,然后才能获得CLP的认证,通过完成CLP的考试。通过SUSE CLP认证的人员有能力完成安装和配置SUSE Linux企业服务器11系统,维护文件系统,管理软件包,进程,打印,使用IPv6配置基础网络服务,samba,网页服务器,创建和运行bash shell脚本。 - -- **认证代码**:SUSE CLP -- 课程代码:3115,3116和3117 -- 考试代码:050-721,050-697 -- 考试类型:手写 -- 考试时长:180分钟 -- 要求:SUSE CLA 认证 - -### 10. SUSE CLE ### - -SUSE认证Linux工程师(CLE)是一个工程师级别的高级认证,为那些已经通过CLE考试的人准备。为了获得CLE认证,人们需要获得SUSE CLA和CLP的认证。获得CLE认证的人员拥有架设复杂SUSE Linux企业服务器环境的技能。CLE认证过的人可以配置基本的网络服务,管理打印,配置和使用Open LDAP,samba,IPv6,完成健康检测和(这里不知道),创建和执行shell脚本,部署SUSE Linux企业板,通过Xen实现虚拟化等等。 - -- **认证代码**:SUSE CLE -- 课程代码:3107 -- 考试代码:050-723 -- 考试类型:手写 -- 考试时长:120分钟 -- 要求:SUSE CLP 10或者11证书 - -### 11. LFCS ### - -Linux基金会认证系统管理员(LFCS)认证考生Linux使用中拥有的知识和通过终端环境使用Linux。LFCS是Linux基金会的一个认证程序,为使用Linux操作系统工作的系统管理员和工程师准备。Linux基金会联合工业级专家,Linux内核社区,测试考生扎实的技能,知识和应用能力。通过LFCS认证的人员拥有一些技能,知识和能力,包括在命令行下编辑和操作文件,管理和处理文件系统与存储的错误,聚合分区作为LVM设备,配置SWAP分区,管理网络文件系统,管理用户帐号,权限和属组,创建并执行bash shell脚本,安装,升级,移除软件包等等。 - -- **认证代码**:LFCS -- 课程代码:LFCS201,LFCS220(可选) -- 考试代码:LFCS 考试 -- 考试时长:2小时 -- 要求:无 -- 分数线:74% -- 语言:英语 -- 有效期:两年 - -### 12. LFCE ### - -Linux基金会认证工程师(LFCE),是Linux基金会为Linux工程师推出的认证。通过LFCE认证的人员拥有一个对于Linux较宽范围的技能,相比于LFCS。这是一个工程师级别的高级认证程序。LFCE认证的人具备一些网络管理方面的技能和能力,如配置网络服务,包过滤,网络运行模拟器,IP连通,配置文件系统和文件服务,网络文件系统,从仓库安装,升级软件包,管理网络安全,配置iptables,http服务,代理服务,邮件服务等等。由于其为高级工程级别的认证程序,所以普遍认为相比LFCS,学习和通过的难度更大些。 - -- **认证代码**:LFCE -- 课程代码:LFS230 -- 考试代码:LFCE 考试 -- 考试时长:2小时 -- 要求:认证过LFCS -- 分数线:72% -- 语言:英语 -- 有效期:2年 - -### 我们发现的情况(这仅仅是我们的观点)### - -最近的调查表明,在不同的高端招聘代理中,称80%的Linux工作描述更倾向于红帽的认证。如果你是一个学生/新手,并且想学习Linux,那么我们建议选择越来越流行的Linux基金会认证,或者CompTIA Linux也可以是一个选择。如果你已经知道了oracle或suse,或者在他们的产品上工作,那oracle/suse的认证会更好些,如果你在一个公司工作了,这些认证会对你的职业生涯成长有帮助:-) - -### 总结 ### - -在这个世界上,成千上万的大公司正在运行跑着Linux操作系统的服务器和主框架,为了在这些服务器上管理,配置和工作,总是存在对Linux技术/专业知识高度认证的需求。这些国际上承认的认证对某些人在Linux的职业生涯扮演很重要的角色。全世界范围内的这些公司运行着Linux,需要Linux工程师,系统管理员和已经获得认证且在Linux相关领域干得不错的有热情的人员。全球认可的Linux认证,对于专业知识和职业生涯的辉煌都是很基础的,所以好好准备考试并获得认证,对于在Linux建立职业生涯是一个很好的选择。如果你有任何问题,想法,反馈,请写在下方的评论框里,让我们好知道哪些东西需要添加或者改进。谢谢!:-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/12-globally-recognized-linux-certifications/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ From f00e836a6a353f1a52a3c882f54007d9ec28dffa Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 30 Jun 2015 18:45:37 +0800 Subject: [PATCH 1307/2517] =?UTF-8?q?[=E6=A0=A1=E5=AF=B9]=20tech/20150626?= =?UTF-8?q?=2015=20Useful=20MySQL=20or=20MariaDB=20Performance=20Tuning=20?= =?UTF-8?q?and=20Optimization=20Tips.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...erformance Tuning and Optimization Tips.md | 190 +++++++++--------- 1 file changed, 93 insertions(+), 97 deletions(-) diff --git a/translated/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md b/translated/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md index 061b710c85..42256518f4 100644 --- a/translated/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md +++ b/translated/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md @@ -1,100 +1,97 @@ - 15 个有用的 MySQL/MariaDB 性能调整和优化技巧 ================================================================================ -MySQL是一个强大的开源关系型数据库管理系统或简称RDBMS。它被发布在1995年(20年前)。它采用的结构化查询语言在数据库管理中可能是最好的选择。最新的MySQL版本是5.6.25,2015年5月29日发行的。 +MySQL 是一个强大的开源关系数据库管理系统或简称 RDBMS。它于 1995 年发布(20年前)。它采用结构化查询语言,这可能是数据库内容管理中最流行的选择。最新的 MySQL 版本是5.6.25,于 2015 年 5 月 29 日发行。 -尽管有许多关于MySQL有趣的传闻,其中一个有趣的事实是,这个名字来自Michael Widenius(MySQL的创始人)的女儿。本文旨在向您展示一些有用的做法,以帮助您管理您的MySQL服务器。 +关于 MySQL 一个有趣的事实是它的名字来自于 Michael Widenius(MySQL 的创始人)的女儿。尽管有许多关于 MySQL 有趣的传闻,本文旨在向你展示一些有用的实践,以帮助你管理你的 MySQL 服务器。 -![MySQL Performance Tuning](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning1.png) +![MySQL 性能优化](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning1.png) -MySQL性能优化 +MySQL 性能优化 -2009年4月,MySQL被Oracle收购。其结果导致一个叫MariaDB的社区成立。创建的主要原因是为了保持MySQL项目的自由。 +2009 年 4 月,MySQL 被 Oracle 收购。其结果是成立了一个叫 MariaDB 的 MySQL 社区。创建的主要原因是为了保持 MySQL 项目在通用公共许可证下自由。 -今天,MySQL和MariaDB对于Web应用程序像,WordPress, Joomla, Magento和其他的,是使用最广泛的(但不是使用最多的)RDBMS。 +今天,MySQL 和 MariaDB 是用于类似 WordPress、Joomla、Magento 和其他 web 应用程序最广泛的 RDMS 之一(如果不是最多的)。 +这篇文章将告诉你一些基本的,但非常有用的关于如何优化 MySQL/MariaDB 性能的技巧。注意,本文假定您已经安装了 MySQL 或 MariaDB。如果你仍然不知道如何在系统上安装它们,你可以按照以下说明去安装: -这篇文章将告诉你一些基本的,但有用如何优化MySQL / MariaDB性能的技巧。说明,本文假定您已经安装了MySQL或MariaDB。如果你仍然不知道如何在系统上安装它们,你可以按照以下说明去安装: +- [在 RHEL/CentOS 7 上安装 LAMP][1] +- [在 Fedora 22 上安装 LAMP][2] +- [在 Ubuntu 15.04 安装 LAMP][3] +- [在 Debian 8 上安装 MariaDB][4] +- [在 Gentoo Linux 上安装 MariaDB][5] +- [在 Arch Linux 上安装 MariaDB][6] -- [Installing LAMP on RHEL/CentOS 7][1] -- [Installing LAMP on Fedora 22][2] -- [Setting Up LAMP on Ubuntu 15.04][3] -- [Installing MariaDB on Debian 8][4] -- [Install MariaDB on Gentoo Linux][5] -- [Install MariaDB on Arch Linux][6] +**重要**: 在开始之前,不要盲目的接受这些建议。每个 MySQL 设置都是不同的,在进行任何更改之前需要慎重考虑。 -**说明**: 在开始之前,不要盲目的接受这些建议。每个MySQL的设置是不同的,在进行任何更改之前需要慎重考虑。 +你需要明白这些: +- MySQL/MariaDB 配置文件位于 `/etc/my.cnf`。 每次更改此文件后你需要重启 MySQL 服务,以使更改生效。 +- 这篇文章使用 MySQL 5.6 版本。 -你需要明白这些: +### 1. 启用 InnoDB 的 file-per-table ### -- MySQL/MariaDB配置文件位于 `/etc/my.cnf`. 每次需改此文件后你需要重新启动MySQL服务,以使新更改生效。 -- 这篇文章使用MySQL 5.6版本 。 +首先,解释清楚 InnoDB 是一个存储引擎很重要。MySQL 和 MariaDB 使用 InnoDB 作为默认存储引擎。以前,MySQL 使用系统表空间来保存数据库中的表和索引。这意味着服务器唯一的目的就是数据库处理,它们的存储盘不用于其它目的。 -### 1. 启动 InnoDB 的`file-per-table` ### +InnoDB 提供了更灵活的方式,它把每个数据库的信息保存在一个 `.ibd` 数据文件中。每个 .idb 文件表示它自己的表空间。通过这样的方式可以更快地完成类似 “TRUNCATE” 的数据库操作,当删除或截断一个数据库表时,你也可以回收未使用的空间。 -首先,它是非常重要的对于解释InnoDB是一个存储引擎。MySQL和MariaDB使用的默认存储引擎是InnoDB。过去,MySQL使用系统表空间来保存数据库中的表和索引。这意味着服务器唯一的目的就是数据库处理,它的存储盘不用于其他的目的。 +这样配置的另一个好处是你可以在一个单独的存储设备保留某些数据库表。这可以大大提高你磁盘的 I/O 负载。 -InnoDB提供了更灵活的方式,它把每个数据库的信息保存在一个`.ibd` 数据文件中。像“TRUNCATE”这样的操作可以更快地完成,当删除或截断一个数据库表时,你也可以回收未使用的空间。 - -这种结构的另一个好处是,可以保留一些数据库表在一个单独的存储设备。这可以大大提高你磁盘的I/O负载。 - -MySQL 5.6及以上的版本默认启用`innodb_file_per_table`。你可以在/etc/my.cnf文件中看到。该指令看起来是这样的: +MySQL 5.6及以上的版本默认启用 `innodb_file_per_table`。你可以在 /etc/my.cnf 文件中看到。该指令看起来是这样的: innodb_file_per_table=1 -### 2. 将MySQL数据库中的数据放在独立分区上 ### +### 2. 在独立分区上保存 MySQL 数据库数据 ### -**注意**: 此设置只能工作在MySQL上, 而不能在MariaDB上. +**注意**:此设置只在 MySQL 上有效, 在 MariaDB 上无效。 -有时OS的读/写操作会减缓你MySQL服务器的性能,尤其是如果位于同一块磁盘上。因此,我建议你使用单独的磁盘(SSD最好)用于MySQL服务。 +有时候操作系统的读/写会降低你 MySQL 服务器的性能,尤其是如果位于同一块磁盘上。因此,我建议你使用单独的磁盘(最好是 SSD)用于 MySQL 服务。 -要完成这步,你需要将新的磁盘连接到您的计算机/服务器上。对于这篇文章,我会认为磁盘将被识别为/dev/sdb。 +要完成这步,你需要将新的磁盘连接到你的计算机/服务器上。对于这篇文章,我假定磁盘挂在到 /dev/sdb。 -下一步将是准备新的分区: +下一步是准备新的分区: # fdisk /dev/sdb -现在按“N”来创建新的分区。接着按“P”,以使其创建为主分区。在此之后,设置分区号为1-4之间。之后,你可以选择分区大小。这里按enter。在接下来的步骤中,你需要配置分区的大小。 +现在按 “N” 来创建新的分区。接着按 “P”,使其创建为主分区。在此之后,从 1-4 设置分区号。之后,你可以选择分区大小。这里按 enter。在下一步,你需要配置分区的大小。 -如果你希望使用全部的磁盘,按一次enter。否则,你需要手动设置新分区的大小。准备就绪后按“w”保存。现在,我们需要为我们的新分区创建一个文件系统。这可以很轻松的完成: +如果你希望使用全部的磁盘,再按一次 enter。否则,你可以手动设置新分区的大小。准备就绪后按 “w” 保存更改。现在,我们需要为我们的新分区创建一个文件系统。这可以用下面命令轻松地完成: # mkfs.ext4 /dev/sdb1 -现在挂载新分区到文件夹下。在根目录下创建一个名为“ssd”的文件夹: +现在我们会挂载新分区到一个目录。我在根目录下创建了一个名为 “ssd” 的目录: # mkdir /ssd/ -挂载新分区到刚才创建的文件夹下: +挂载新分区到刚才创建的目录下: # mount /dev/sdb1 /ssd/ -你可以添加如下行在/etc/fstab文件中设置开机自动挂载: +你可以在 /etc/fstab 文件中添加如下行设置为开机自动挂载: /dev/sdb1 /ssd ext3 defaults 0 0 -现在我们移动MySQL到新磁盘中。首先停止服务: +现在我们移动 MySQL 到新磁盘中。首先停止 MySQL 服务: # service mysqld stop -我建议你​​停止Apache/nginx,以及以防止任何操作试图在数据库中写入: +我建议你​​同时停止 Apache/nginx,以防止任何试图写入数据库的操作: # service httpd stop # service nginx stop -现在我们复制完整的MySQL目录到新分区中: +现在复制整个 MySQL 目录到新分区中: # cp /var/lib/mysql /ssd/ -Rp -这可能需要一段时间,具体取决于你的MySQL数据库的大小。一旦这个过程完成后重命名MySQL的目录: +这可能需要一段时间,具体取决于你的 MySQL 数据库的大小。一旦这个过程完成后重命名 MySQL 目录: # mv /var/lib/mysql /var/lib/mysql-backup -然后创建一个链接: +然后创建一个符号链接: # ln -s /ssd/mysql /var/lib/mysql -现在启动你的MySQL和web服务: +现在启动你的 MySQL 和 web 服务: # service mysqld start # service httpd start @@ -102,130 +99,129 @@ MySQL 5.6及以上的版本默认启用`innodb_file_per_table`。你可以在/et 以后你的数据库将使用新的磁盘访问。 -### 3. 优化InnoDB的缓冲区 ### +### 3. 优化使用 InnoDB 的缓冲池 ### -InnoDB引擎在内存中有一个缓冲数据和索引的缓冲区。这将有助于你在MySQL/MariaDB中的查询更快的执行。选择合适的内存大小对系统的查询来说是非常重要的,并且使你对系统的内存消耗也会有一个更好的认识。 +InnoDB 引擎在内存中有一个缓冲池用于缓存数据和索引。这当然有助于你更快地执行 MySQL/MariaDB 查询语句。选择合适的内存大小需要一些重要的决策并对系统的内存消耗有很好的认识。 下面是你需要考虑的: -- 其他的进程需要消耗多少内存,包括你的系统进程,表的数量,套接字缓冲区大小。 -- 你的服务器是否专用于MySQL还是你也运行其他非常消耗内存的服务。 +- 其它的进程需要消耗多少内存。这包括你的系统进程,页表,套接字缓冲。 +- 你的服务器是否专门用于 MySQL 还是你也运行其它非常消耗内存的服务。 +在一个专用的机器上,你可能会把 60-70% 的内存分配给 `innodb_buffer_pool_size`。如果你打算在一个机器上运行更多的服务,你应该重新考虑专门用于 `innodb_buffer_pool_size` 的内存大小。 -在一个专用的机器上,你可能会使用60-70%的内存分配给`innodb_buffer_pool_size`。如果你打算在一个机器上运行多个服务,你应该重新考虑`innodb_buffer_pool_size`的内存大小。 - -你需要设置my.cnf中的此项: +你需要设置 my.cnf 中的此项: innodb_buffer_pool_size -### 4. 在MySQL中避免使用Swappiness ### +### 4. 在 MySQL 中避免使用 Swappiness ### -使用交换空间需要一个进程,当系统移动一部分内存到一个空闲的分区中就叫做“swap”。通常当你的系统用完物理内存后就会出现这种情况而不是释放一些RAM,然后将信息写进磁盘中。你可能已经猜测到磁盘比你的内存要慢得多。 +Swapping 是一个当系统移动部分内存到一个称为 “swap” 的特殊磁盘空间时运行的进程。通常当你的系统用完物理内存后就会出现这种情况,系统将信息写入磁盘而不是释放一些 RAM。正如你猜测的磁盘比你的 RAM 要慢得多。 -默认情况下该选项已经启用: +默认启用了该选项: # sysctl vm.swappiness vm.swappiness = 60 -使用以下命令关闭swappiness: +运行以下命令关闭 swappiness: # sysctl -w vm.swappiness=0 -### 5. 设置MySQL的最大连接数 ### +### 5. 设置 MySQL 的最大连接数 ### -`max_connections`变量告诉你的服务器当前允许多少并发连接。MySQL/ MariaDB服务器允许的`max_connections` + 1为超级用户给定的值。当连接建立后,执行MySQL查询会有时间的限制 - 之后,它被关闭,新连接可以取代其位置。 +`max_connections` 指令告诉你当前你的服务器允许多少并发连接。MySQL/ MariaDB 服务器允许有特级权限的用户 max_connections + 1 的连接数。只有当执行 MySQL 查询的时候才会建立连接,执行完成后会关闭连接并被新的连接取代。 -请记住,太多的连接会导致RAM的使用量过高并且会锁定你的MySQL服务器。一般小网站需要100-200的连接数而较大可能需要500-800甚至更多。这里的值很大程度上取决于你的MySQL/MariaDB的使用情况。 +请记住,太多的连接会导致 RAM 的使用量过高并且会锁住你的 MySQL 服务器。一般小网站需要 100-200 的连接数而较大可能需要 500-800 甚至更多。这里的值很大程度上取决于你 MySQL/MariaDB 的使用情况。 -你可以动态的改变`max_connections`的值而无需重启MySQL服务器: +你可以动态地改变 `max_connections` 的值而无需重启MySQL服务器: # mysql -u root -p mysql> set global max_connections := 300; -### 6. 配置MySQL的`thread_cache_size`变量 ### +### 6. 配置 MySQL `thread_cache_size` ### - `thread_cache_size`变量用来设置你服务器缓存的线程数量。当客户端断开连接时,如果当前线程数小于`thread_cache_size`,他的线程将被放入缓存中。下一个请求将使用缓存池中的线程来完成。 + `thread_cache_size` 指令用来设置你服务器缓存的线程数量。当客户端断开连接时,如果当前线程数小于thread_cache_size,他的线程将被放入缓存中。下一个请求通过使用缓存池中的线程来完成。 -要提高服务器的性能,你可以设置`thread_cache_size`的值相对高一些。你可以通过以下方法来查看线程池的使用情况:: +要提高服务器的性能,你可以设置 `thread_cache_size` 的值相对高一些。你可以通过以下方法来查看线程缓存命中率: mysql> show status like 'Threads_created'; mysql> show status like 'Connections'; -你可以用以下公式来计算线程池的使用率: +你可以用以下公式来计算线程池的命中率: 100 - ((Threads_created / Connections) * 100) -如果你得到一个较低的数字,这意味着大多数mysql连接请求使用新的线程,而不是从缓存加载。在这种情况下,你需要增加`thread_cache_size`。 +如果你得到一个较低的数字,这意味着大多数 mysql 连接请求使用新的线程,而不是从缓存加载。在这种情况下,你需要增加 `thread_cache_size`。 -但有一个好处是,`thread_cache_size`可以动态的改变而无需重启MySQL服务。你可以通过以下方式来实现: +这里有一个好处是可以动态地改变 `thread_cache_size` 而无需重启 MySQL 服务。你可以通过以下方式来实现: mysql> set global thread_cache_size = 16; -### 7.禁用MySQL的DNS反向查询 ### +### 7. 禁用 MySQL 的 DNS 反向查询 ### -当新的连接出现时,默认情况下MySQL/MariaDB会使用DNS来解析用户的IP地址/主机名,每个新的连接,它的IP都会被解析为主机名。然后,主机名又被反解析为IP来验证这两个是否一致。 +默认情况下当新的连接出现时,MySQL/MariaDB 会进行 DNS 查询解析用户的 IP 地址/主机名。对于每个客户端连接,它的 IP 都会被解析为主机名。然后,主机名又被反解析为 IP 来验证两者是否一致。 -当DNS服务器出现问题或者配置有问题时,解析会变得非常慢,这就是为什么要关闭DNS的反向解析,你可以在你的配置文件中添加以下选项去设定: +当 DNS 配置错误或服务器出现问题时,这很可能会导致延迟。这就是为什么要关闭 DNS 的反向查询的原因,你可以在你的配置文件中添加以下选项去设定: [mysqld] # Skip reverse DNS lookup of clients skip-name-resolve -更改后需要重新启动你的MySQL服务器. +更改后你需要重启 MySQL 服务。 -### 8. 配置MySQL的`query_cache_size`变量 ### +### 8. 配置 MySQL `query_cache_size` ### -如果你有很多重复的查询或者不经常改变的数据 – 请使用缓存查询。 人们常常不理解`query_cache_size`的实际含义而将此值设置为几十兆,这实际上会降低服务器的性能。 +如果你有很多重复的查询并且数据不经常改变 – 请使用缓存查询。 人们常常不理解 `query_cache_size` 的实际含义而将此值设置为 GB,这实际上会降低服务器的性能。 -背后的原因是,线程需要在更新过程中锁定缓存。通常设置为200-300 MB应该足够了。如果你的网站比较小的,你可以尝试给64M并在以后及时去增加。 +背后的原因是,在更新过程中线程需要锁定缓存。通常设置为 200-300 MB应该足够了。如果你的网站比较小的,你可以尝试给 64M 并在以后及时去增加。 -添加以下选项到你的MySQL配置文件中: +在你的 MySQL 配置文件中添加以下设置: query_cache_type = 1 query_cache_limit = 256K query_cache_min_res_unit = 2k query_cache_size = 80M -### 9. 配置`tmp_table_size`变量和`max_heap_table_size`变量 ### +### 9. 配置 `tmp_table_size` 和 `max_heap_table_size` ### -这两个变量的大小相同都将帮助你避免将数据直接写入到磁盘中去。`tmp_table_size` 是内置内存表的最大空间,如果超出限值表的大小将被转换到磁盘上的MyISAM表。 +这两个变量的大小应该相同并帮助你避免将数据直接写入到磁盘中去。`tmp_table_size` 是内置内存表的最大空间。如果表的大小超出限值将会被转换为磁盘上的 MyISAM 表。 -这将影响数据库的性能。管理员通常建议在服务器上设置这两个值为RAM的每GB为64M。 +这会影响数据库的性能。管理员通常建议在服务器上设置这两个值为每 GB RAM 64M。 [mysqld] tmp_table_size= 64M max_heap_table_size= 64M -### 10. 开启MySQL慢速查询日志 ### +### 10. 启用 MySQL 慢查询日志 ### -慢查询日志可以帮助你定位数据库的问题,并帮助您调试。在你的MySQL配置文件中添加以下选项来启用: +记录慢查询可以帮助你定位数据库中的问题并帮助你调试。这可以通过在你的 MySQL 配置文件中添加以下值来启用: slow-query-log = 1 slow-query-log-file = /var/lib/mysql/mysql-slow.log long_query_time = 1 -第一个变量开启慢查询日志,第二个告诉MySQL实际的日志文件存储在哪。使用`long_query_time`来定义MySQL查询完成时长。 +第一个变量启用慢查询日志,第二个告诉 MySQL 实际的日志文件存储位置。使用 `long_query_time` 来定义完成 MySQL 查询用时多少认为是长查询。 -### 11.检查MySQL的空闲连接 ### +### 11. 检查 MySQL 的空闲连接 ### -空闲连接会消耗资源,应中断或者尽可能被刷新。这样的连接都在“sleep”状态并且会保持一段时间。通过以下命令可以查看空闲的连接: +空闲连接会消耗资源,可以的话应该被中断或者刷新。空闲连接是指处于 “sleep” 状态并且会保持很长一段时间。你可以通过运行以下命令查看空闲连接: # mysqladmin processlist -u root -p | grep “Sleep” -这会显示处于睡眠状态的进程列表。当代码使用到数据库持久连接时会出现以下情况。使用PHP调用mysql_pconnect可以打开这个连接,即执行查询,删除认证最后关闭打开的连接。这会导致每个线程的缓冲区被保存在缓存中,直到该线程死亡。 +这会显示处于睡眠状态的进程列表。当代码使用持久连接到数据库时会出现以下情况。使用 PHP 调用 mysql_pconnect 可以打开这个连接,执行完查询之后,删除认证并保持连接为打开状态。这会导致每个线程的缓冲被保存在内存中,直到该线程死亡。 -首先你要做的就是检查代码并修复它。如果你不能访问正在运行的代码,你可以修改`wait_timeout`变量。默认值是28800秒,而你可以将其降低到60: +首先你要做的就是检查代码并修复它。如果你不能访问正在运行的代码,你可以修改 `wait_timeout` 变量。默认值是 28800 秒,而你可以安全地将其降低到 60 : wait_timeout=60 -### 12. 为MySQL选择正确的文件系统 ### +### 12. 为 MySQL 选择正确的文件系统 ### 选择正确的文件系统对数据库至关重要。在这里你需要考虑的最重要的事情是 - 数据的完整性,性能和易管理性。 -按照MariaDB的建议,最好的文件系统是XFS,ext4或者BTRFS。所有这些都可以作为企业用的日志文件系统,它们可以使用非常大的文件和大容量存储。 +按照 MariaDB 的建议,最好的文件系统是XFS、ext4 和 Btrfs。它们都是可以使用超大文件和大容量存储卷的企业级日志文件系统。 -关于这三个文件系统你可以在下面看到一些有用的信息: +下面你可以找到一些关于这三个文件系统的有用信息: 注:表格 @@ -253,21 +249,21 @@ InnoDB引擎在内存中有一个缓冲数据和索引的缓冲区。这将有
-这篇文章将详细介绍Linux文件系统的利与弊: +我们的这篇文章详细介绍了 Linux 文件系统的利与弊: -- [Linux Filesystem Explained][7] +- [Linux 文件系统解析][7] -### 13. 设置MySQL的`max_allowed_packet` ### +### 13. 设置 MySQL `max_allowed_packet` ### -MySQL的数据被拆分成包发送。通常,单个报文被认为是一次发送到客户端。`max_allowed_pa​​cket`变量可以定义被发送包的大小。 +MySQL 把数据拆分成包。通常发送到客户端的一行作为一个包。`max_allowed_pa​​cket` 变量定义了可以被发送的最大的包。 -此值设置得过低可能会导致查询速度变得非常慢,然后你会看到一个错误在MySQL的错误日志中。它建议你将数据包的大小设置成最大。 +此值设置得过低可能会导致查询速度变得非常慢,然后你会在 MySQL 的错误日志看到一个错误。建议将该值设置为最大包的大小。 -### 14. 测试MySQL的性能 ### +### 14. 测试 MySQL 的性能优化 ### -你应该定期检测MySQL/MariaDB的性能。这将帮助你查看资源的使用情况或需要调整某些变量的值。 +你应该定期检查 MySQL/MariaDB 的性能。这将帮助你了解资源的使用情况是否发生了改变或需要进行改进。 -有大量的测试工具可用,但我推荐你一个简单易用的。该工具被称为mysqltuner。 +有大量的测试工具可用,但我推荐你一个简单易用的。该工具被称为 mysqltuner。 使用下面的命令下载并运行它: @@ -276,18 +272,18 @@ MySQL的数据被拆分成包发送。通常,单个报文被认为是一次发 # cd major-MySQLTuner-perl-993bc18/ # ./mysqltuner.pl -你将收到有关MySQL使用和推荐提示的详细报告。下面是在MariaDB上安装后的默认输出: +你将收到有关 MySQL 使用的详细报告和推荐提示。下面是默认 MariaDB 安装的输出样例: -![MySQL Performance Tuning](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning.png) +![MySQL 性能优化](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning.png) -### 15. 优化和修复MySQL数据库 ### +### 15. 优化和修复 MySQL 数据库 ### -有时候MySQL/MariaDB数据库中的表很容易崩溃,尤其是当服务器意外关机时,数据库仍然被访问中或者在执行复制操作,文件系统会突然崩溃。然而,有一个免费的开源工具,被称为'mysqlcheck'的,它会自动检查,修复和优化Linux中数据库的所有表。 +有时候 MySQL/MariaDB 数据库中的表很容易崩溃,尤其是服务器意外关机、文件系统突然崩溃或复制过程中仍然访问数据库。幸运的是,有一个称为 'mysqlcheck' 的免费开源工具,它会自动检查、修复和优化 Linux 中数据库的所有表。 # mysqlcheck -u root -p --auto-repair --check --optimize --all-databases # mysqlcheck -u root -p --auto-repair --check --optimize databasename -就是这样!我希望你已经发现了上述文章有用的地方,并帮助你优化你的MySQL服务器。一如往常,如果你有任何问题或意见,请在下面的评论部分提交。 +就是这些!我希望上述文章对你有用,并帮助你优化你的 MySQL 服务器。一如往常,如果你有任何疑问或评论,请在下面的评论部分提交。 -------------------------------------------------------------------------------- @@ -295,7 +291,7 @@ via: http://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/ 作者:[Marin Todorov][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[ictlyh](https://github.com/ictlyh) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 39fdda31e2a0836c713c2ce23c4e11bf928ddd1b Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 30 Jun 2015 19:18:22 +0800 Subject: [PATCH 1308/2517] Translating by ZTinoZ --- ...625 Screen Capture Made Easy with these Dedicated Tools.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md index 51b3e8f861..ec03bb90e6 100644 --- a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md +++ b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md @@ -1,8 +1,8 @@ 用这些专用工具让你截图更简单 ================================================================================ -"A picture is worth a thousand words", a phrase which emerged in the USA in the early part of the 20th century, refers to the notion that a single still image can present as much information as a large amount of descriptive text. Essentially, pictures convey information more effectively and efficiently than words can. +"一图胜过千万句",这句二十世纪早期在美国应运而生的名言,说的是一张单一的静止图片所蕴含的信息足以匹敌大量的描述性文字。本质上说,图片所传递的信息量比文字更有效更高效。 -A screenshot (or screengrab) is a snapshot or picture captured by a computer to record the output of a visual device. Screen capture software enable screenshots to be taken on a computer. This type of software has lots of uses. As an image can illustrate the operation of computer software well, screenshots play an important role in software development and documentation. Alternatively, if you have a technical problem with your computer, a screenshot allows a technical support department to understand the problems you are facing. Writing computer-related articles, documentation and tutorials is nigh on impossible without a good tool for creating screenshots. Screenshots are also useful to save snippets of anything you have on your screen, particularly when it can not be easily printed. +截图(或抓帧)是一种捕捉自计算机所录制可视化设备输出的快照或图片,屏幕捕捉软件能让计算机获取到截图。This type of software has lots of uses. As an image can illustrate the operation of computer software well, screenshots play an important role in software development and documentation. Alternatively, if you have a technical problem with your computer, a screenshot allows a technical support department to understand the problems you are facing. Writing computer-related articles, documentation and tutorials is nigh on impossible without a good tool for creating screenshots. Screenshots are also useful to save snippets of anything you have on your screen, particularly when it can not be easily printed. Linux has a good selection of open source dedicated screenshot programs, both graphical and console based. For a feature-rich dedicated screenshot utility, look no further than Shutter. This tool is a superb example of a small open source tool. But there are some great alternatives too. From d293d68f5d0d0f24c9c4a30d67fadfd508e6722d Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 30 Jun 2015 23:38:55 +0800 Subject: [PATCH 1309/2517] PUB:20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips @strugglingyouth @ictlyh --- ...erformance Tuning and Optimization Tips.md | 106 +++++++----------- 1 file changed, 43 insertions(+), 63 deletions(-) rename {translated/tech => published}/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md (61%) diff --git a/translated/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md b/published/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md similarity index 61% rename from translated/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md rename to published/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md index 42256518f4..0f770d2ee4 100644 --- a/translated/tech/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md +++ b/published/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md @@ -1,16 +1,16 @@ 15 个有用的 MySQL/MariaDB 性能调整和优化技巧 ================================================================================ -MySQL 是一个强大的开源关系数据库管理系统或简称 RDBMS。它于 1995 年发布(20年前)。它采用结构化查询语言,这可能是数据库内容管理中最流行的选择。最新的 MySQL 版本是5.6.25,于 2015 年 5 月 29 日发行。 +MySQL 是一个强大的开源关系数据库管理系统(简称 RDBMS)。它发布于 1995 年(20年前)。它采用结构化查询语言(SQL),这可能是数据库内容管理中最流行的选择。最新的 MySQL 版本是 5.6.25,于 2015 年 5 月 29 日发布。 -关于 MySQL 一个有趣的事实是它的名字来自于 Michael Widenius(MySQL 的创始人)的女儿。尽管有许多关于 MySQL 有趣的传闻,本文旨在向你展示一些有用的实践,以帮助你管理你的 MySQL 服务器。 +关于 MySQL 一个有趣的事实是它的名字来自于 Michael Widenius(MySQL 的创始人)的女儿“ My”。尽管有许多关于 MySQL 有趣的传闻,不过本文主要是向你展示一些有用的实践,以帮助你管理你的 MySQL 服务器。 ![MySQL 性能优化](http://www.tecmint.com/wp-content/uploads/2015/06/MySQL-Performance-Tuning1.png) -MySQL 性能优化 +*MySQL 性能优化* -2009 年 4 月,MySQL 被 Oracle 收购。其结果是成立了一个叫 MariaDB 的 MySQL 社区。创建的主要原因是为了保持 MySQL 项目在通用公共许可证下自由。 +2009 年 4 月,MySQL 被 Oracle 收购。其结果是MySQL 社区分裂,创建了一个叫 MariaDB 的分支 。创建该分支的主要原因是为了保持这个项目可以在 GPL 下的自由。 -今天,MySQL 和 MariaDB 是用于类似 WordPress、Joomla、Magento 和其他 web 应用程序最广泛的 RDMS 之一(如果不是最多的)。 +今天,MySQL 和 MariaDB 是用于类似 WordPress、Joomla、Magento 和其他 web 应用程序的最流行的 RDMS 之一(如果不是最多的)。 这篇文章将告诉你一些基本的,但非常有用的关于如何优化 MySQL/MariaDB 性能的技巧。注意,本文假定您已经安装了 MySQL 或 MariaDB。如果你仍然不知道如何在系统上安装它们,你可以按照以下说明去安装: @@ -21,34 +21,34 @@ MySQL 性能优化 - [在 Gentoo Linux 上安装 MariaDB][5] - [在 Arch Linux 上安装 MariaDB][6] -**重要**: 在开始之前,不要盲目的接受这些建议。每个 MySQL 设置都是不同的,在进行任何更改之前需要慎重考虑。 +**重要提示**: 在开始之前,不要盲目的接受这些建议。每个 MySQL 设置都是不同的,在进行任何更改之前需要慎重考虑。 你需要明白这些: - MySQL/MariaDB 配置文件位于 `/etc/my.cnf`。 每次更改此文件后你需要重启 MySQL 服务,以使更改生效。 - 这篇文章使用 MySQL 5.6 版本。 -### 1. 启用 InnoDB 的 file-per-table ### +### 1. 启用 InnoDB 的每张表一个数据文件设置 ### -首先,解释清楚 InnoDB 是一个存储引擎很重要。MySQL 和 MariaDB 使用 InnoDB 作为默认存储引擎。以前,MySQL 使用系统表空间来保存数据库中的表和索引。这意味着服务器唯一的目的就是数据库处理,它们的存储盘不用于其它目的。 +首先,有一个重要的解释, InnoDB 是一个存储引擎。MySQL 和 MariaDB 使用 InnoDB 作为默认存储引擎。以前,MySQL 使用系统表空间来保存数据库中的表和索引。这意味着服务器唯一的目的就是数据库处理,它们的存储盘不用于其它目的。 -InnoDB 提供了更灵活的方式,它把每个数据库的信息保存在一个 `.ibd` 数据文件中。每个 .idb 文件表示它自己的表空间。通过这样的方式可以更快地完成类似 “TRUNCATE” 的数据库操作,当删除或截断一个数据库表时,你也可以回收未使用的空间。 +InnoDB 提供了更灵活的方式,它把每个数据库的信息保存在一个 `.ibd` 数据文件中。每个 .idb 文件代表它自己的表空间。通过这样的方式可以更快地完成类似 “TRUNCATE” 的数据库操作,当删除或截断一个数据库表时,你也可以回收未使用的空间。 -这样配置的另一个好处是你可以在一个单独的存储设备保留某些数据库表。这可以大大提高你磁盘的 I/O 负载。 +这样配置的另一个好处是你可以将某些数据库表放在一个单独的存储设备。这可以大大提升你磁盘的 I/O 负载。 MySQL 5.6及以上的版本默认启用 `innodb_file_per_table`。你可以在 /etc/my.cnf 文件中看到。该指令看起来是这样的: innodb_file_per_table=1 -### 2. 在独立分区上保存 MySQL 数据库数据 ### +### 2. 将 MySQL 数据库数据存储到独立分区上 ### **注意**:此设置只在 MySQL 上有效, 在 MariaDB 上无效。 -有时候操作系统的读/写会降低你 MySQL 服务器的性能,尤其是如果位于同一块磁盘上。因此,我建议你使用单独的磁盘(最好是 SSD)用于 MySQL 服务。 +有时候操作系统的读/写会降低你 MySQL 服务器的性能,尤其是如果操作系统和数据库的数据位于同一块磁盘上。因此,我建议你使用单独的磁盘(最好是 SSD)用于 MySQL 服务。 要完成这步,你需要将新的磁盘连接到你的计算机/服务器上。对于这篇文章,我假定磁盘挂在到 /dev/sdb。 -下一步是准备新的分区: +####下一步是准备新的分区: # fdisk /dev/sdb @@ -70,7 +70,9 @@ MySQL 5.6及以上的版本默认启用 `innodb_file_per_table`。你可以在 / /dev/sdb1 /ssd ext3 defaults 0 0 -现在我们移动 MySQL 到新磁盘中。首先停止 MySQL 服务: +####现在我们将 MySQL 移动到新磁盘中 + +首先停止 MySQL 服务: # service mysqld stop @@ -101,12 +103,12 @@ MySQL 5.6及以上的版本默认启用 `innodb_file_per_table`。你可以在 / ### 3. 优化使用 InnoDB 的缓冲池 ### -InnoDB 引擎在内存中有一个缓冲池用于缓存数据和索引。这当然有助于你更快地执行 MySQL/MariaDB 查询语句。选择合适的内存大小需要一些重要的决策并对系统的内存消耗有很好的认识。 +InnoDB 引擎在内存中有一个缓冲池用于缓存数据和索引。这当然有助于你更快地执行 MySQL/MariaDB 查询语句。选择合适的内存大小需要一些重要的决策并对系统的内存消耗有较多的认识。 下面是你需要考虑的: - 其它的进程需要消耗多少内存。这包括你的系统进程,页表,套接字缓冲。 -- 你的服务器是否专门用于 MySQL 还是你也运行其它非常消耗内存的服务。 +- 你的服务器是否专门用于 MySQL 还是你运行着其它非常消耗内存的服务。 在一个专用的机器上,你可能会把 60-70% 的内存分配给 `innodb_buffer_pool_size`。如果你打算在一个机器上运行更多的服务,你应该重新考虑专门用于 `innodb_buffer_pool_size` 的内存大小。 @@ -116,9 +118,9 @@ InnoDB 引擎在内存中有一个缓冲池用于缓存数据和索引。这当 ### 4. 在 MySQL 中避免使用 Swappiness ### -Swapping 是一个当系统移动部分内存到一个称为 “swap” 的特殊磁盘空间时运行的进程。通常当你的系统用完物理内存后就会出现这种情况,系统将信息写入磁盘而不是释放一些 RAM。正如你猜测的磁盘比你的 RAM 要慢得多。 +“交换”是一个当系统移动部分内存到一个称为 “交换空间” 的特殊磁盘空间时的过程。通常当你的系统用完物理内存后就会出现这种情况,系统将信息写入磁盘而不是释放一些内存。正如你猜测的磁盘比你的内存要慢得多。 -默认启用了该选项: +该选项默认情况下是启用的: # sysctl vm.swappiness @@ -130,18 +132,18 @@ Swapping 是一个当系统移动部分内存到一个称为 “swap” 的特 ### 5. 设置 MySQL 的最大连接数 ### -`max_connections` 指令告诉你当前你的服务器允许多少并发连接。MySQL/ MariaDB 服务器允许有特级权限的用户 max_connections + 1 的连接数。只有当执行 MySQL 查询的时候才会建立连接,执行完成后会关闭连接并被新的连接取代。 +`max_connections` 指令告诉你当前你的服务器允许多少并发连接。MySQL/MariaDB 服务器允许有 SUPER 权限的用户在最大连接之外再建立一个连接。只有当执行 MySQL 请求的时候才会建立连接,执行完成后会关闭连接并被新的连接取代。 -请记住,太多的连接会导致 RAM 的使用量过高并且会锁住你的 MySQL 服务器。一般小网站需要 100-200 的连接数而较大可能需要 500-800 甚至更多。这里的值很大程度上取决于你 MySQL/MariaDB 的使用情况。 +请记住,太多的连接会导致内存的使用量过高并且会锁住你的 MySQL 服务器。一般小网站需要 100-200 的连接数,而较大可能需要 500-800 甚至更多。这里的值很大程度上取决于你 MySQL/MariaDB 的使用情况。 你可以动态地改变 `max_connections` 的值而无需重启MySQL服务器: # mysql -u root -p - mysql> set global max_connections := 300; + mysql> set global max_connections = 300; -### 6. 配置 MySQL `thread_cache_size` ### +### 6. 配置 MySQL 的线程缓存数量 ### - `thread_cache_size` 指令用来设置你服务器缓存的线程数量。当客户端断开连接时,如果当前线程数小于thread_cache_size,他的线程将被放入缓存中。下一个请求通过使用缓存池中的线程来完成。 + `thread_cache_size` 指令用来设置你服务器缓存的线程数量。当客户端断开连接时,如果当前线程数小于 `thread_cache_size`,它的线程将被放入缓存中。下一个请求通过使用缓存池中的线程来完成。 要提高服务器的性能,你可以设置 `thread_cache_size` 的值相对高一些。你可以通过以下方法来查看线程缓存命中率: @@ -152,7 +154,7 @@ Swapping 是一个当系统移动部分内存到一个称为 “swap” 的特 100 - ((Threads_created / Connections) * 100) -如果你得到一个较低的数字,这意味着大多数 mysql 连接请求使用新的线程,而不是从缓存加载。在这种情况下,你需要增加 `thread_cache_size`。 +如果你得到一个较低的数字,这意味着大多数 mysql 连接使用新的线程,而不是从缓存加载。在这种情况下,你需要增加 `thread_cache_size`。 这里有一个好处是可以动态地改变 `thread_cache_size` 而无需重启 MySQL 服务。你可以通过以下方式来实现: @@ -170,9 +172,9 @@ Swapping 是一个当系统移动部分内存到一个称为 “swap” 的特 更改后你需要重启 MySQL 服务。 -### 8. 配置 MySQL `query_cache_size` ### +### 8. 配置 MySQL 的查询缓存容量 ### -如果你有很多重复的查询并且数据不经常改变 – 请使用缓存查询。 人们常常不理解 `query_cache_size` 的实际含义而将此值设置为 GB,这实际上会降低服务器的性能。 +如果你有很多重复的查询并且数据不经常改变 – 请使用缓存查询。 人们常常不理解 `query_cache_size` 的实际含义而将此值设置为 GB 级,这实际上会降低服务器的性能。 背后的原因是,在更新过程中线程需要锁定缓存。通常设置为 200-300 MB应该足够了。如果你的网站比较小的,你可以尝试给 64M 并在以后及时去增加。 @@ -183,11 +185,11 @@ Swapping 是一个当系统移动部分内存到一个称为 “swap” 的特 query_cache_min_res_unit = 2k query_cache_size = 80M -### 9. 配置 `tmp_table_size` 和 `max_heap_table_size` ### +### 9. 配置临时表容量和内存表最大容量 ### -这两个变量的大小应该相同并帮助你避免将数据直接写入到磁盘中去。`tmp_table_size` 是内置内存表的最大空间。如果表的大小超出限值将会被转换为磁盘上的 MyISAM 表。 +`tmp_table_size` 和 `max_heap_table_size` 这两个变量的大小应该相同,它们可以让你避免磁盘写入。`tmp_table_size` 是内置内存表的最大空间。如果表的大小超出限值将会被转换为磁盘上的 MyISAM 表。 -这会影响数据库的性能。管理员通常建议在服务器上设置这两个值为每 GB RAM 64M。 +这会影响数据库的性能。管理员通常建议在服务器上设置这两个值为每 GB 内存给 64M。 [mysqld] tmp_table_size= 64M @@ -201,17 +203,17 @@ Swapping 是一个当系统移动部分内存到一个称为 “swap” 的特 slow-query-log-file = /var/lib/mysql/mysql-slow.log long_query_time = 1 -第一个变量启用慢查询日志,第二个告诉 MySQL 实际的日志文件存储位置。使用 `long_query_time` 来定义完成 MySQL 查询用时多少认为是长查询。 +第一个变量启用慢查询日志,第二个告诉 MySQL 实际的日志文件存储位置。使用 `long_query_time` 来定义完成 MySQL 查询多少用时算长。 ### 11. 检查 MySQL 的空闲连接 ### -空闲连接会消耗资源,可以的话应该被中断或者刷新。空闲连接是指处于 “sleep” 状态并且会保持很长一段时间。你可以通过运行以下命令查看空闲连接: +空闲连接会消耗资源,可以的话应该被终止或者刷新。空闲连接是指处于 “sleep” 状态并且保持了很长一段时间的连接。你可以通过运行以下命令查看空闲连接: # mysqladmin processlist -u root -p | grep “Sleep” -这会显示处于睡眠状态的进程列表。当代码使用持久连接到数据库时会出现以下情况。使用 PHP 调用 mysql_pconnect 可以打开这个连接,执行完查询之后,删除认证并保持连接为打开状态。这会导致每个线程的缓冲被保存在内存中,直到该线程死亡。 +这会显示处于睡眠状态的进程列表。当代码使用持久连接到数据库时会出现这种情况。使用 PHP 调用 mysql_pconnect 可以打开这个连接,执行完查询之后,删除认证信息并保持连接为打开状态。这会导致每个线程的缓冲都被保存在内存中,直到该线程结束。 -首先你要做的就是检查代码并修复它。如果你不能访问正在运行的代码,你可以修改 `wait_timeout` 变量。默认值是 28800 秒,而你可以安全地将其降低到 60 : +首先你要做的就是检查代码问题并修复它。如果你不能访问正在运行的代码,你可以修改 `wait_timeout` 变量。默认值是 28800 秒,而你可以安全地将其降低到 60 : wait_timeout=60 @@ -219,43 +221,21 @@ Swapping 是一个当系统移动部分内存到一个称为 “swap” 的特 选择正确的文件系统对数据库至关重要。在这里你需要考虑的最重要的事情是 - 数据的完整性,性能和易管理性。 -按照 MariaDB 的建议,最好的文件系统是XFS、ext4 和 Btrfs。它们都是可以使用超大文件和大容量存储卷的企业级日志文件系统。 +按照 MariaDB 的建议,最好的文件系统是XFS、ext4 和 Btrfs。它们都是可以使用超大文件和大容量存储卷的企业级日志型文件系统。 下面你可以找到一些关于这三个文件系统的有用信息: -注:表格 - - - - - - - - - - - - - - - - - - - - - - - -
FilesystemsXFSExt4Btrfs
Maximum filesystem size8EB1EB16EB
Maximum file size8EB16TB16EB
+| 文件系统 | XFS | Ext4 | Btrfs | +|---------------|-----|------|-------| +| 文件系统最大容量 | 8EB | 1EB | 16EB | +| 最大文件大小 | 8EB | 16TB | 16EB | -我们的这篇文章详细介绍了 Linux 文件系统的利与弊: -- [Linux 文件系统解析][7] +我们的这篇文章详细介绍了 Linux 文件系统的利与弊: [Linux 文件系统解析][7]。 -### 13. 设置 MySQL `max_allowed_packet` ### +### 13. 设置 MySQL 允许的最大数据包 ### -MySQL 把数据拆分成包。通常发送到客户端的一行作为一个包。`max_allowed_pa​​cket` 变量定义了可以被发送的最大的包。 +MySQL 把数据拆分成包。通常一个包就是发送到客户端的一行数据。`max_allowed_pa​​cket` 变量定义了可以被发送的最大的包。 此值设置得过低可能会导致查询速度变得非常慢,然后你会在 MySQL 的错误日志看到一个错误。建议将该值设置为最大包的大小。 From 3d2bf2f9cf39714cbaa5ac64278e71da439ac00a Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 1 Jul 2015 00:16:33 +0800 Subject: [PATCH 1310/2517] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201506?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Compact Text Editors Great for Remote Editing and Much More.md | 0 .../20141219 What is good audio editing software on Linux.md | 0 .../20150126 Installing Cisco Packet tracer in Linux.md | 0 .../20150126 iptraf--A TCP or UDP Network Monitoring Utility.md | 0 .../20150128 The top 10 rookie open source projects.md | 0 ...ow to access Feedly RSS feed from the command line on Linux.md | 0 ... or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md | 0 ...mote incremental backup of LUKS-encrypted disk or partition.md | 0 ... Material Design Inspired GTK And Icon Theme Paper in Linux.md | 0 published/{ => 201506}/20150310 FAQ--BSD.md | 0 ...idirectionally from Command Line Using 'Speedtest-CLI' Tool.md | 0 ...20150323 How to set up networking between Docker containers.md | 0 .../20150326 A Peep into Process Management Commands in Linux.md | 0 ...0 How to Serve Git Repositories Using Gitblit Tool in Linux.md | 0 ...1 How to Install WordPress with Nginx in a Docker Container.md | 0 ...150331 How to set up remote desktop on Linux VPS using x2go.md | 0 .../20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md | 0 ... Tools for Browsing Websites and Downloading Files in Linux.md | 0 ...How to Show Dialog Box from Bash Shell Script with Examples.md | 0 ...manage remote MySQL databases on Linux VPS using a GUI tool.md | 0 ...wers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md | 0 ...h Answers--How to configure PCI-passthrough on virt-manager.md | 0 .../20150416 Linux Network Statistics Tools or Commands.md | 0 .../20150417 How to Install Discourse in a Docker Container.md | 0 ...rectory attributes in linux using chattr and lsattr command.md | 0 .../20150423 20 Awesome Docker Containers for a Desktop User.md | 0 ...ing Helps Connecting Private interface to Internet in Linux.md | 0 ...ow to Change Default Web Browser and Email Client in Ubuntu.md | 0 ...50427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md | 0 .../{ => 201506}/20150427 How to set up NTP server in CentOS.md | 0 ...w To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md | 0 ...lasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md | 0 .../20150429 What are good command line HTTP clients.md | 0 ...werDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md | 0 ...mmandline Chat Server and Remove Unwanted Packages in Linux.md | 0 .../20150506 First Step Guide for Learning Shell Scripting.md | 0 .../20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md | 0 ...ng password for default keyring to unlock on Ubuntu desktop.md | 0 ...nswers--How to install Shrew Soft IPsec VPN client on Linux.md | 0 ...Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md | 0 .../20150511 Fix Various Update Errors In Ubuntu 14.04.md | 0 .../20150511 Open Source History--Why Did Linux Succeed.md | 0 ...5 Zypper Commands to Manage 'Suse' Linux Package Management.md | 0 ...rk, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md | 0 .../20150512 How To Run Docker Client Inside Windows OS.md | 0 ...AQs with Answers--How to view torrent file content on Linux.md | 0 .../20150515 Basic Networking Commands with Docker Containers.md | 0 .../20150515 Extend Swap Space using Swap file in Linux.md | 0 .../20150515 How to Install Percona Server on CentOS 7.md | 0 ...4′ Linux Operating System to Preserve Privacy and Anonymity.md | 0 ...s Ubuntu App Applies Instagram Style Filters to Your Photos.md | 0 ...and Mysterious Uses of Symbol or Operator in Linux Commands.md | 0 ...70 Expected Shell Scripting Interview Questions and Answers.md | 0 ...x '404 Not Found' error with 'apt-get update' on old Ubuntu.md | 0 ...ntered a section with no Package--header' error on Raspbian.md | 0 ...AQs with Answers--How to view threads of a process on Linux.md | 0 ...ith Answers--What is the Apache error log location on Linux.md | 0 .../20150520 How to Use Docker Machine with a Cloud Provider.md | 0 .../20150520 How to Use tmpfs on RHEL or CentOS 7.0.md | 0 ...ile and install wxWidgets on Ubuntu or Debian or Linux Mint.md | 0 ...520 Shell Script to Backup Files or Directories Using rsync.md | 0 ...stem proxy settings from the command line on Ubuntu desktop.md | 0 ... Answers--How to install Unity Tweak Tool on Ubuntu desktop.md | 0 .../20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md | 0 ...ux ntopng--Network Monitoring Tool Installation Screenshots.md | 0 published/{ => 201506}/20150527 3 Open Source Python Shells.md | 0 .../20150527 3 Useful Hacks Every Linux User Must Know.md | 0 .../20150527 How To Check Laptop CPU Temperature In Ubuntu.md | 0 ... Create Own Online Shopping Store Using 'OpenCart' in Linux.md | 0 ...rocesses or Unresponsive Applications Using 'xkill' Command.md | 0 ...x FAQs with Answers--How to mount an LVM partition on Linux.md | 0 .../20150528 11 pointless but awesome Linux terminal tricks.md | 0 ...F' Fork of Yum Commands for RPM Package Management in Linux.md | 0 .../20150528 Things To Do After Installing Fedora 22.md | 0 .../20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md | 0 ...s How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md | 0 .../20150604 12 Globally Recognized Linux Certifications.md | 0 ...Foundation achievements in 2014--download the Annual Report.md | 0 ...buntu's Juju Now Supports systemd and Google Cloud Platform.md | 0 ...ow to Clear RAM Memory Cache Buffer and Swap Space on Linux.md | 0 ...all nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md | 0 .../20150610 Install Android Studio on Ubuntu 15.04.md | 0 ...612 Inside NGINX--How We Designed for Performance and Scale.md | 0 .../20150615 PHP at 20--From pet project to powerhouse.md | 0 published/{ => 201506}/20150617 The Art of Command Line.md | 0 .../20150623 Linux Kernel 4.1 Released This Is What's New.md | 0 ...l MySQL or MariaDB Performance Tuning and Optimization Tips.md | 0 87 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201506}/20141013 Compact Text Editors Great for Remote Editing and Much More.md (100%) rename published/{ => 201506}/20141219 What is good audio editing software on Linux.md (100%) rename published/{ => 201506}/20150126 Installing Cisco Packet tracer in Linux.md (100%) rename published/{ => 201506}/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md (100%) rename published/{ => 201506}/20150128 The top 10 rookie open source projects.md (100%) rename published/{ => 201506}/20150209 How to access Feedly RSS feed from the command line on Linux.md (100%) rename published/{ => 201506}/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md (100%) rename published/{ => 201506}/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md (100%) rename published/{ => 201506}/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md (100%) rename published/{ => 201506}/20150310 FAQ--BSD.md (100%) rename published/{ => 201506}/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md (100%) rename published/{ => 201506}/20150323 How to set up networking between Docker containers.md (100%) rename published/{ => 201506}/20150326 A Peep into Process Management Commands in Linux.md (100%) rename published/{ => 201506}/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md (100%) rename published/{ => 201506}/20150331 How to Install WordPress with Nginx in a Docker Container.md (100%) rename published/{ => 201506}/20150331 How to set up remote desktop on Linux VPS using x2go.md (100%) rename published/{ => 201506}/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md (100%) rename published/{ => 201506}/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md (100%) rename published/{ => 201506}/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md (100%) rename published/{ => 201506}/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md (100%) rename published/{ => 201506}/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md (100%) rename published/{ => 201506}/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md (100%) rename published/{ => 201506}/20150416 Linux Network Statistics Tools or Commands.md (100%) rename published/{ => 201506}/20150417 How to Install Discourse in a Docker Container.md (100%) rename published/{ => 201506}/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md (100%) rename published/{ => 201506}/20150423 20 Awesome Docker Containers for a Desktop User.md (100%) rename published/{ => 201506}/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md (100%) rename published/{ => 201506}/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md (100%) rename published/{ => 201506}/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md (100%) rename published/{ => 201506}/20150427 How to set up NTP server in CentOS.md (100%) rename published/{ => 201506}/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md (100%) rename published/{ => 201506}/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md (100%) rename published/{ => 201506}/20150429 What are good command line HTTP clients.md (100%) rename published/{ => 201506}/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md (100%) rename published/{ => 201506}/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md (100%) rename published/{ => 201506}/20150506 First Step Guide for Learning Shell Scripting.md (100%) rename published/{ => 201506}/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md (100%) rename published/{ => 201506}/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md (100%) rename published/{ => 201506}/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md (100%) rename published/{ => 201506}/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md (100%) rename published/{ => 201506}/20150511 Fix Various Update Errors In Ubuntu 14.04.md (100%) rename published/{ => 201506}/20150511 Open Source History--Why Did Linux Succeed.md (100%) rename published/{ => 201506}/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md (100%) rename published/{ => 201506}/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md (100%) rename published/{ => 201506}/20150512 How To Run Docker Client Inside Windows OS.md (100%) rename published/{ => 201506}/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md (100%) rename published/{ => 201506}/20150515 Basic Networking Commands with Docker Containers.md (100%) rename published/{ => 201506}/20150515 Extend Swap Space using Swap file in Linux.md (100%) rename published/{ => 201506}/20150515 How to Install Percona Server on CentOS 7.md (100%) rename published/{ => 201506}/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md (100%) rename published/{ => 201506}/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md (100%) rename published/{ => 201506}/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md (100%) rename published/{ => 201506}/20150518 70 Expected Shell Scripting Interview Questions and Answers.md (100%) rename published/{ => 201506}/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md (100%) rename published/{ => 201506}/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md (100%) rename published/{ => 201506}/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md (100%) rename published/{ => 201506}/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md (100%) rename published/{ => 201506}/20150520 How to Use Docker Machine with a Cloud Provider.md (100%) rename published/{ => 201506}/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md (100%) rename published/{ => 201506}/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md (100%) rename published/{ => 201506}/20150520 Shell Script to Backup Files or Directories Using rsync.md (100%) rename published/{ => 201506}/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md (100%) rename published/{ => 201506}/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md (100%) rename published/{ => 201506}/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md (100%) rename published/{ => 201506}/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md (100%) rename published/{ => 201506}/20150527 3 Open Source Python Shells.md (100%) rename published/{ => 201506}/20150527 3 Useful Hacks Every Linux User Must Know.md (100%) rename published/{ => 201506}/20150527 How To Check Laptop CPU Temperature In Ubuntu.md (100%) rename published/{ => 201506}/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md (100%) rename published/{ => 201506}/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md (100%) rename published/{ => 201506}/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md (100%) rename published/{ => 201506}/20150528 11 pointless but awesome Linux terminal tricks.md (100%) rename published/{ => 201506}/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md (100%) rename published/{ => 201506}/20150528 Things To Do After Installing Fedora 22.md (100%) rename published/{ => 201506}/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md (100%) rename published/{ => 201506}/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md (100%) rename published/{ => 201506}/20150604 12 Globally Recognized Linux Certifications.md (100%) rename published/{ => 201506}/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md (100%) rename published/{ => 201506}/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md (100%) rename published/{ => 201506}/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md (100%) rename published/{ => 201506}/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md (100%) rename published/{ => 201506}/20150610 Install Android Studio on Ubuntu 15.04.md (100%) rename published/{ => 201506}/20150612 Inside NGINX--How We Designed for Performance and Scale.md (100%) rename published/{ => 201506}/20150615 PHP at 20--From pet project to powerhouse.md (100%) rename published/{ => 201506}/20150617 The Art of Command Line.md (100%) rename published/{ => 201506}/20150623 Linux Kernel 4.1 Released This Is What's New.md (100%) rename published/{ => 201506}/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md (100%) diff --git a/published/20141013 Compact Text Editors Great for Remote Editing and Much More.md b/published/201506/20141013 Compact Text Editors Great for Remote Editing and Much More.md similarity index 100% rename from published/20141013 Compact Text Editors Great for Remote Editing and Much More.md rename to published/201506/20141013 Compact Text Editors Great for Remote Editing and Much More.md diff --git a/published/20141219 What is good audio editing software on Linux.md b/published/201506/20141219 What is good audio editing software on Linux.md similarity index 100% rename from published/20141219 What is good audio editing software on Linux.md rename to published/201506/20141219 What is good audio editing software on Linux.md diff --git a/published/20150126 Installing Cisco Packet tracer in Linux.md b/published/201506/20150126 Installing Cisco Packet tracer in Linux.md similarity index 100% rename from published/20150126 Installing Cisco Packet tracer in Linux.md rename to published/201506/20150126 Installing Cisco Packet tracer in Linux.md diff --git a/published/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md b/published/201506/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md similarity index 100% rename from published/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md rename to published/201506/20150126 iptraf--A TCP or UDP Network Monitoring Utility.md diff --git a/published/20150128 The top 10 rookie open source projects.md b/published/201506/20150128 The top 10 rookie open source projects.md similarity index 100% rename from published/20150128 The top 10 rookie open source projects.md rename to published/201506/20150128 The top 10 rookie open source projects.md diff --git a/published/20150209 How to access Feedly RSS feed from the command line on Linux.md b/published/201506/20150209 How to access Feedly RSS feed from the command line on Linux.md similarity index 100% rename from published/20150209 How to access Feedly RSS feed from the command line on Linux.md rename to published/201506/20150209 How to access Feedly RSS feed from the command line on Linux.md diff --git a/published/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md b/published/201506/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md similarity index 100% rename from published/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md rename to published/201506/20150211 Protect Apache Against Brute Force or DDoS Attacks Using Mod_Security and Mod_evasive Modules.md diff --git a/published/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md b/published/201506/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md similarity index 100% rename from published/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md rename to published/201506/20150225 How to make remote incremental backup of LUKS-encrypted disk or partition.md diff --git a/published/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md b/published/201506/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md similarity index 100% rename from published/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md rename to published/201506/20150225 Install Google's Material Design Inspired GTK And Icon Theme Paper in Linux.md diff --git a/published/20150310 FAQ--BSD.md b/published/201506/20150310 FAQ--BSD.md similarity index 100% rename from published/20150310 FAQ--BSD.md rename to published/201506/20150310 FAQ--BSD.md diff --git a/published/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md b/published/201506/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md similarity index 100% rename from published/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md rename to published/201506/20150316 How to Test Your Internet Speed Bidirectionally from Command Line Using 'Speedtest-CLI' Tool.md diff --git a/published/20150323 How to set up networking between Docker containers.md b/published/201506/20150323 How to set up networking between Docker containers.md similarity index 100% rename from published/20150323 How to set up networking between Docker containers.md rename to published/201506/20150323 How to set up networking between Docker containers.md diff --git a/published/20150326 A Peep into Process Management Commands in Linux.md b/published/201506/20150326 A Peep into Process Management Commands in Linux.md similarity index 100% rename from published/20150326 A Peep into Process Management Commands in Linux.md rename to published/201506/20150326 A Peep into Process Management Commands in Linux.md diff --git a/published/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md b/published/201506/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md similarity index 100% rename from published/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md rename to published/201506/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md diff --git a/published/20150331 How to Install WordPress with Nginx in a Docker Container.md b/published/201506/20150331 How to Install WordPress with Nginx in a Docker Container.md similarity index 100% rename from published/20150331 How to Install WordPress with Nginx in a Docker Container.md rename to published/201506/20150331 How to Install WordPress with Nginx in a Docker Container.md diff --git a/published/20150331 How to set up remote desktop on Linux VPS using x2go.md b/published/201506/20150331 How to set up remote desktop on Linux VPS using x2go.md similarity index 100% rename from published/20150331 How to set up remote desktop on Linux VPS using x2go.md rename to published/201506/20150331 How to set up remote desktop on Linux VPS using x2go.md diff --git a/published/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md b/published/201506/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md similarity index 100% rename from published/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md rename to published/201506/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md diff --git a/published/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md b/published/201506/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md similarity index 100% rename from published/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md rename to published/201506/20150410 7 Command Line Tools for Browsing Websites and Downloading Files in Linux.md diff --git a/published/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md b/published/201506/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md similarity index 100% rename from published/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md rename to published/201506/20150413 How to Show Dialog Box from Bash Shell Script with Examples.md diff --git a/published/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md b/published/201506/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md similarity index 100% rename from published/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md rename to published/201506/20150413 How to manage remote MySQL databases on Linux VPS using a GUI tool.md diff --git a/published/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md b/published/201506/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md similarity index 100% rename from published/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md rename to published/201506/20150413 Linux FAQs with Answers--How to compile ixgbe driver on CentOS, RHEL or Fedora.md diff --git a/published/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md b/published/201506/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md similarity index 100% rename from published/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md rename to published/201506/20150413 Linux FAQs with Answers--How to configure PCI-passthrough on virt-manager.md diff --git a/published/20150416 Linux Network Statistics Tools or Commands.md b/published/201506/20150416 Linux Network Statistics Tools or Commands.md similarity index 100% rename from published/20150416 Linux Network Statistics Tools or Commands.md rename to published/201506/20150416 Linux Network Statistics Tools or Commands.md diff --git a/published/20150417 How to Install Discourse in a Docker Container.md b/published/201506/20150417 How to Install Discourse in a Docker Container.md similarity index 100% rename from published/20150417 How to Install Discourse in a Docker Container.md rename to published/201506/20150417 How to Install Discourse in a Docker Container.md diff --git a/published/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md b/published/201506/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md similarity index 100% rename from published/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md rename to published/201506/20150420 Managing file and directory attributes in linux using chattr and lsattr command.md diff --git a/published/20150423 20 Awesome Docker Containers for a Desktop User.md b/published/201506/20150423 20 Awesome Docker Containers for a Desktop User.md similarity index 100% rename from published/20150423 20 Awesome Docker Containers for a Desktop User.md rename to published/201506/20150423 20 Awesome Docker Containers for a Desktop User.md diff --git a/published/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md b/published/201506/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md similarity index 100% rename from published/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md rename to published/201506/20150423 How IP forwarding Helps Connecting Private interface to Internet in Linux.md diff --git a/published/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md b/published/201506/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md similarity index 100% rename from published/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md rename to published/201506/20150423 How to Change Default Web Browser and Email Client in Ubuntu.md diff --git a/published/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md b/published/201506/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md similarity index 100% rename from published/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md rename to published/201506/20150427 15 Things to Do After Installing Ubuntu 15.04 Desktop.md diff --git a/published/20150427 How to set up NTP server in CentOS.md b/published/201506/20150427 How to set up NTP server in CentOS.md similarity index 100% rename from published/20150427 How to set up NTP server in CentOS.md rename to published/201506/20150427 How to set up NTP server in CentOS.md diff --git a/published/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md b/published/201506/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md similarity index 100% rename from published/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md rename to published/201506/20150429 How To Integrate Apache2 With Tomcat 7 Using mod_jk Connector.md diff --git a/published/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md b/published/201506/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md similarity index 100% rename from published/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md rename to published/201506/20150429 KDE Plasma 5.3 Released, Here' s How To Upgrade in Kubuntu 15.04.md diff --git a/published/20150429 What are good command line HTTP clients.md b/published/201506/20150429 What are good command line HTTP clients.md similarity index 100% rename from published/20150429 What are good command line HTTP clients.md rename to published/201506/20150429 What are good command line HTTP clients.md diff --git a/published/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md b/published/201506/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md similarity index 100% rename from published/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md rename to published/201506/20150504 How to Install and Configure 'PowerDNS' (with MariaDB) and 'PowerAdmin' in RHEL or CentOS 7.md diff --git a/published/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md b/published/201506/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md similarity index 100% rename from published/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md rename to published/201506/20150504 Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux.md diff --git a/published/20150506 First Step Guide for Learning Shell Scripting.md b/published/201506/20150506 First Step Guide for Learning Shell Scripting.md similarity index 100% rename from published/20150506 First Step Guide for Learning Shell Scripting.md rename to published/201506/20150506 First Step Guide for Learning Shell Scripting.md diff --git a/published/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md b/published/201506/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md similarity index 100% rename from published/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md rename to published/201506/20150506 How to Setup OpenERP (Odoo) on CentOS 7.x.md diff --git a/published/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md b/published/201506/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md similarity index 100% rename from published/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md rename to published/201506/20150506 Linux FAQs with Answers--How to disable entering password for default keyring to unlock on Ubuntu desktop.md diff --git a/published/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md b/published/201506/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md similarity index 100% rename from published/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md rename to published/201506/20150506 Linux FAQs with Answers--How to install Shrew Soft IPsec VPN client on Linux.md diff --git a/published/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md b/published/201506/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md similarity index 100% rename from published/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md rename to published/201506/20150507 Install uGet Download Manager 2.0 in Debian Ubuntu Linux Mint and Fedora.md diff --git a/published/20150511 Fix Various Update Errors In Ubuntu 14.04.md b/published/201506/20150511 Fix Various Update Errors In Ubuntu 14.04.md similarity index 100% rename from published/20150511 Fix Various Update Errors In Ubuntu 14.04.md rename to published/201506/20150511 Fix Various Update Errors In Ubuntu 14.04.md diff --git a/published/20150511 Open Source History--Why Did Linux Succeed.md b/published/201506/20150511 Open Source History--Why Did Linux Succeed.md similarity index 100% rename from published/20150511 Open Source History--Why Did Linux Succeed.md rename to published/201506/20150511 Open Source History--Why Did Linux Succeed.md diff --git a/published/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md b/published/201506/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md similarity index 100% rename from published/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md rename to published/201506/20150512 45 Zypper Commands to Manage 'Suse' Linux Package Management.md diff --git a/published/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md b/published/201506/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md similarity index 100% rename from published/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md rename to published/201506/20150512 A Shell Script to Monitor Network, Disk Usage, Uptime, Load Average and RAM Usage in Linux.md diff --git a/published/20150512 How To Run Docker Client Inside Windows OS.md b/published/201506/20150512 How To Run Docker Client Inside Windows OS.md similarity index 100% rename from published/20150512 How To Run Docker Client Inside Windows OS.md rename to published/201506/20150512 How To Run Docker Client Inside Windows OS.md diff --git a/published/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md b/published/201506/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md similarity index 100% rename from published/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md rename to published/201506/20150512 Linux FAQs with Answers--How to view torrent file content on Linux.md diff --git a/published/20150515 Basic Networking Commands with Docker Containers.md b/published/201506/20150515 Basic Networking Commands with Docker Containers.md similarity index 100% rename from published/20150515 Basic Networking Commands with Docker Containers.md rename to published/201506/20150515 Basic Networking Commands with Docker Containers.md diff --git a/published/20150515 Extend Swap Space using Swap file in Linux.md b/published/201506/20150515 Extend Swap Space using Swap file in Linux.md similarity index 100% rename from published/20150515 Extend Swap Space using Swap file in Linux.md rename to published/201506/20150515 Extend Swap Space using Swap file in Linux.md diff --git a/published/20150515 How to Install Percona Server on CentOS 7.md b/published/201506/20150515 How to Install Percona Server on CentOS 7.md similarity index 100% rename from published/20150515 How to Install Percona Server on CentOS 7.md rename to published/201506/20150515 How to Install Percona Server on CentOS 7.md diff --git a/published/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md b/published/201506/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md similarity index 100% rename from published/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md rename to published/201506/20150515 Install 'Tails 1.4′ Linux Operating System to Preserve Privacy and Anonymity.md diff --git a/published/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md b/published/201506/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md similarity index 100% rename from published/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md rename to published/201506/20150515 This Ubuntu App Applies Instagram Style Filters to Your Photos.md diff --git a/published/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md b/published/201506/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md similarity index 100% rename from published/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md rename to published/201506/20150518 10 Amazing and Mysterious Uses of Symbol or Operator in Linux Commands.md diff --git a/published/20150518 70 Expected Shell Scripting Interview Questions and Answers.md b/published/201506/20150518 70 Expected Shell Scripting Interview Questions and Answers.md similarity index 100% rename from published/20150518 70 Expected Shell Scripting Interview Questions and Answers.md rename to published/201506/20150518 70 Expected Shell Scripting Interview Questions and Answers.md diff --git a/published/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md b/published/201506/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md similarity index 100% rename from published/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md rename to published/201506/20150518 Linux FAQs with Answers--How to fix '404 Not Found' error with 'apt-get update' on old Ubuntu.md diff --git a/published/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md b/published/201506/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md similarity index 100% rename from published/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md rename to published/201506/20150518 Linux FAQs with Answers--How to fix 'Encountered a section with no Package--header' error on Raspbian.md diff --git a/published/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md b/published/201506/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md similarity index 100% rename from published/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md rename to published/201506/20150518 Linux FAQs with Answers--How to view threads of a process on Linux.md diff --git a/published/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md b/published/201506/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md similarity index 100% rename from published/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md rename to published/201506/20150518 Linux FAQs with Answers--What is the Apache error log location on Linux.md diff --git a/published/20150520 How to Use Docker Machine with a Cloud Provider.md b/published/201506/20150520 How to Use Docker Machine with a Cloud Provider.md similarity index 100% rename from published/20150520 How to Use Docker Machine with a Cloud Provider.md rename to published/201506/20150520 How to Use Docker Machine with a Cloud Provider.md diff --git a/published/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md b/published/201506/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md similarity index 100% rename from published/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md rename to published/201506/20150520 How to Use tmpfs on RHEL or CentOS 7.0.md diff --git a/published/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md b/published/201506/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md similarity index 100% rename from published/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md rename to published/201506/20150520 How to compile and install wxWidgets on Ubuntu or Debian or Linux Mint.md diff --git a/published/20150520 Shell Script to Backup Files or Directories Using rsync.md b/published/201506/20150520 Shell Script to Backup Files or Directories Using rsync.md similarity index 100% rename from published/20150520 Shell Script to Backup Files or Directories Using rsync.md rename to published/201506/20150520 Shell Script to Backup Files or Directories Using rsync.md diff --git a/published/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md b/published/201506/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md similarity index 100% rename from published/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md rename to published/201506/20150521 Linux FAQs with Answers--How to change system proxy settings from the command line on Ubuntu desktop.md diff --git a/published/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md b/published/201506/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md similarity index 100% rename from published/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md rename to published/201506/20150521 Linux FAQs with Answers--How to install Unity Tweak Tool on Ubuntu desktop.md diff --git a/published/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md b/published/201506/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md similarity index 100% rename from published/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md rename to published/201506/20150521 Will Ubuntu Linux Hit 200 Million Users This Year.md diff --git a/published/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md b/published/201506/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md similarity index 100% rename from published/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md rename to published/201506/20150525 Linux ntopng--Network Monitoring Tool Installation Screenshots.md diff --git a/published/20150527 3 Open Source Python Shells.md b/published/201506/20150527 3 Open Source Python Shells.md similarity index 100% rename from published/20150527 3 Open Source Python Shells.md rename to published/201506/20150527 3 Open Source Python Shells.md diff --git a/published/20150527 3 Useful Hacks Every Linux User Must Know.md b/published/201506/20150527 3 Useful Hacks Every Linux User Must Know.md similarity index 100% rename from published/20150527 3 Useful Hacks Every Linux User Must Know.md rename to published/201506/20150527 3 Useful Hacks Every Linux User Must Know.md diff --git a/published/20150527 How To Check Laptop CPU Temperature In Ubuntu.md b/published/201506/20150527 How To Check Laptop CPU Temperature In Ubuntu.md similarity index 100% rename from published/20150527 How To Check Laptop CPU Temperature In Ubuntu.md rename to published/201506/20150527 How To Check Laptop CPU Temperature In Ubuntu.md diff --git a/published/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md b/published/201506/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md similarity index 100% rename from published/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md rename to published/201506/20150527 How to Create Own Online Shopping Store Using 'OpenCart' in Linux.md diff --git a/published/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md b/published/201506/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md similarity index 100% rename from published/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md rename to published/201506/20150527 How to Kill Linux Processes or Unresponsive Applications Using 'xkill' Command.md diff --git a/published/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md b/published/201506/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md similarity index 100% rename from published/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md rename to published/201506/20150527 Linux FAQs with Answers--How to mount an LVM partition on Linux.md diff --git a/published/20150528 11 pointless but awesome Linux terminal tricks.md b/published/201506/20150528 11 pointless but awesome Linux terminal tricks.md similarity index 100% rename from published/20150528 11 pointless but awesome Linux terminal tricks.md rename to published/201506/20150528 11 pointless but awesome Linux terminal tricks.md diff --git a/published/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md b/published/201506/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md similarity index 100% rename from published/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md rename to published/201506/20150528 27 'DNF' Fork of Yum Commands for RPM Package Management in Linux.md diff --git a/published/20150528 Things To Do After Installing Fedora 22.md b/published/201506/20150528 Things To Do After Installing Fedora 22.md similarity index 100% rename from published/20150528 Things To Do After Installing Fedora 22.md rename to published/201506/20150528 Things To Do After Installing Fedora 22.md diff --git a/published/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md b/published/201506/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md similarity index 100% rename from published/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md rename to published/201506/20150603 Arc Is a Gorgeous GTK Theme for Linux Desktops.md diff --git a/published/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md b/published/201506/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md similarity index 100% rename from published/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md rename to published/201506/20150603 Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux.md diff --git a/published/20150604 12 Globally Recognized Linux Certifications.md b/published/201506/20150604 12 Globally Recognized Linux Certifications.md similarity index 100% rename from published/20150604 12 Globally Recognized Linux Certifications.md rename to published/201506/20150604 12 Globally Recognized Linux Certifications.md diff --git a/published/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md b/published/201506/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md similarity index 100% rename from published/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md rename to published/201506/20150604 Read about The Document Foundation achievements in 2014--download the Annual Report.md diff --git a/published/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md b/published/201506/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md similarity index 100% rename from published/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md rename to published/201506/20150604 Ubuntu's Juju Now Supports systemd and Google Cloud Platform.md diff --git a/published/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md b/published/201506/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md similarity index 100% rename from published/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md rename to published/201506/20150610 How to Clear RAM Memory Cache Buffer and Swap Space on Linux.md diff --git a/published/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md b/published/201506/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md similarity index 100% rename from published/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md rename to published/201506/20150610 How to Install nginx and google pagespeed on Ubuntu 15.04 Vivid Vervet.md diff --git a/published/20150610 Install Android Studio on Ubuntu 15.04.md b/published/201506/20150610 Install Android Studio on Ubuntu 15.04.md similarity index 100% rename from published/20150610 Install Android Studio on Ubuntu 15.04.md rename to published/201506/20150610 Install Android Studio on Ubuntu 15.04.md diff --git a/published/20150612 Inside NGINX--How We Designed for Performance and Scale.md b/published/201506/20150612 Inside NGINX--How We Designed for Performance and Scale.md similarity index 100% rename from published/20150612 Inside NGINX--How We Designed for Performance and Scale.md rename to published/201506/20150612 Inside NGINX--How We Designed for Performance and Scale.md diff --git a/published/20150615 PHP at 20--From pet project to powerhouse.md b/published/201506/20150615 PHP at 20--From pet project to powerhouse.md similarity index 100% rename from published/20150615 PHP at 20--From pet project to powerhouse.md rename to published/201506/20150615 PHP at 20--From pet project to powerhouse.md diff --git a/published/20150617 The Art of Command Line.md b/published/201506/20150617 The Art of Command Line.md similarity index 100% rename from published/20150617 The Art of Command Line.md rename to published/201506/20150617 The Art of Command Line.md diff --git a/published/20150623 Linux Kernel 4.1 Released This Is What's New.md b/published/201506/20150623 Linux Kernel 4.1 Released This Is What's New.md similarity index 100% rename from published/20150623 Linux Kernel 4.1 Released This Is What's New.md rename to published/201506/20150623 Linux Kernel 4.1 Released This Is What's New.md diff --git a/published/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md b/published/201506/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md similarity index 100% rename from published/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md rename to published/201506/20150626 15 Useful MySQL or MariaDB Performance Tuning and Optimization Tips.md From 5ed2c19e52d0c8222fcf59f89dc2de0bf9584ce1 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 1 Jul 2015 13:09:32 +0800 Subject: [PATCH 1311/2517] PUB:20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites @ictlyh --- ...Tricks to Secure and Customize Websites.md | 145 +++++++++--------- 1 file changed, 73 insertions(+), 72 deletions(-) rename {translated/tech => published}/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md (62%) diff --git a/translated/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md b/published/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md similarity index 62% rename from translated/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md rename to published/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md index 723ce313b2..7f3747721f 100644 --- a/translated/tech/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md +++ b/published/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md @@ -1,43 +1,44 @@ -用于提高网站安全性和自定义网站的 25 个有用 Apache ‘.htaccess’ 小技巧 +25 个有用 Apache ‘.htaccess’ 技巧 ================================================================================ -网站是我们生活中重要的一部分。它们是实现扩大业务、分享知识以及其它更多功能的方式。之前受制于只能提供静态内容,随着动态客户端和服务器端脚本语言的引入和现有静态语言的持续改进,例如从 html 到 html5,动态网站成为可能,剩下的也许在不久的将来也会实现。 +网站是我们生活中重要的一部分。它们是实现扩大业务、分享知识以及其它更多功能的方式。早期受制于只能提供静态内容,随着动态客户端和服务器端脚本语言的引入和现有静态语言的持续改进,例如从 html 到 html5,动态网站成为可能,剩下的也许在不久的将来也会实现。 -有了网站,随之而来的是对能向全球大规模用户显示站点的单元的需求。这个需求通过托管网站的服务器实现。这包括一系列的服务器,例如:Apache HTTP Server、Joomla 以及 允许个人拥有自己网站的 WordPress。 +对于网站,随之而来的是需要一个能向全球大规模用户显示站点的某个东西。这个需求可以通过托管网站的服务器实现。这包括一系列的服务器,例如:Apache HTTP Server、Joomla 以及 允许个人拥有自己网站的 WordPress。 ![Apache htaccess 小技巧](http://www.tecmint.com/wp-content/uploads/2015/01/htaccess-tricks.jpg) -25 个 htaccess 小技巧 + +*25 个 htaccess 小技巧* 想要拥有一个网站,可以创建一个自己的本地服务器,或者联系任何上面提到的或其它服务器管理员来托管他的网站。但实际问题也从这点开始。网站的性能主要取决于以下因素: - 网站消耗的带宽。 -- 针对黑客网站有多安全。 +- 面对黑客,网站有多安全。 - 对数据库进行数据检索时的优化。 - 显示导航菜单和提供更多 UI 功能时的用户友好性。 除此之外,保证托管网站服务器成功的多种因素还包括: - 对于一个流行站点的数据压缩量。 -- 同时为多个请求同一或不同站点的用户服务的能力。 +- 同时为多个对请求同一或不同站点的用户服务的能力。 - 保证网站上输入的机密数据安全,例如:Email、信用卡信息等等。 - 允许更多的选项用于增强站点的动态性。 -这篇文章讨论一个服务器提供的用于增强网站性能和提高针对坏机器人、热链接等的安全性的功能。例如 ‘.htaccess’ 文件。 +这篇文章讨论一个服务器提供的用于增强网站性能和提高针对坏机器人、热链等的安全性的功能:‘.htaccess’ 文件。 ### .htaccess 是什么? ### htaccess (hypertext access,超文本访问) 是为网站所有者提供用于控制服务器环境变量以及其它参数的选项,从而增强他们网站的功能的文件。这些文件可以在网站目录树的任何一个目录中,并向该目录以及目录中的文件和子目录提供功能。 -这些功能是什么呢?其实这些是服务器的指令,例如命令服务器执行特定任务的行,这些命令只对该文件所在目录中的文件和子目录有效。这些文件默认是隐藏的,因为所有操作系统和网站服务器默认配置为忽略。但让隐藏文件可见可以让你看到这些特殊文件。后续章节的话题将讨论能控制什么类型的参数。 +这些功能是什么呢?其实这些是服务器的指令,例如命令服务器执行特定任务的行,这些命令只对该文件所在目录中的文件和子目录有效。这些文件默认是隐藏的,因为所有操作系统和网站服务器默认配置为忽略它们,但如果查看隐藏文件的话,你就可以看到这些特殊文件。后续章节的话题将讨论能控制什么类型的参数。 -注意:如果 .htaccess 文件保存在 /apache/home/www/Gunjit/ 目录,那么它会向该目录中的所有文件和子目录提供命令,但如果该目录包含一个名为 /Gunjit/images/ 子目录,且该子目录中也有一个 .htaccess 文件,那么这个子目录中的命令会覆盖父目录中 .htaccess 文件(或者层次结构中更上层文件)提供的命令。 +注意:如果 .htaccess 文件保存在 /apache/home/www/Gunjit/ 目录,那么它会向该目录中的所有文件和子目录提供命令,但如果该目录包含一个名为 /Gunjit/images/ 子目录,且该子目录中也有一个 .htaccess 文件,那么这个子目录中的命令会覆盖父目录中 .htaccess 文件(或者目录层次结构中更上层的文件)提供的命令。 ### Apache Server 和 .htaccess 文件 ### -Apache HTTP Server 俗称为 Apache,是为了表示对一个有卓越战争策略技能的美洲土著部落的尊敬而命名。它是用 C/C++ 和 XML 建立的基于 [NCSA HTTPd 服务器][1] 的跨平台 Web 服务器,它在万维网的成长和发展中起到了关键作用。 +Apache HTTP Server 俗称为 Apache,是为了表示对一个有卓越战争策略技能的美洲土著部落的尊敬而命名。它基于 [NCSA HTTPd 服务器][1] ,是用 C/C++ 和 XML 建立的跨平台 Web 服务器,它在万维网的成长和发展中起到了关键作用。 -最常用于 UNIX,Apache 也能用于多种平台,包括 FreeBSD、Linux、Windows、Mac OS、Novel Netware 等。在 2009 年,Apache 成为第一个为超过一亿站点提供服务的服务器。 +它最常用于 UNIX,但 Apache 也能用于多种平台,包括 FreeBSD、Linux、Windows、Mac OS、Novel Netware 等。在 2009 年,Apache 成为第一个为超过一亿站点提供服务的服务器。 -Apache 服务器对于 www/ 目录中的每个用户有一个单独的 .htaccess 文件。尽管这些文件是隐藏的,但如果需要的话可以使它们可见。在 www/ 目录中有很多子目录,每个子目录通过用户名或所有者名称命名,包含了一个站点。除此之外你可以在每个子目录中有一个 .htaccess 文件,像之前所述用于配置子目录中的文件。 +Apache 服务器可以让 www/ 目录中的每个用户有一个单独的 .htaccess 文件。尽管这些文件是隐藏的,但如果需要的话可以使它们可见。在 www/ 目录中可以有很多子目录,每个子目录通过用户名或所有者名称命名,包含了一个站点。除此之外你可以在每个子目录中有一个 .htaccess 文件,像之前所述用于配置子目录中的文件。 下面介绍如果配置 Apache 服务器上的 htaccess 文件。 @@ -65,19 +66,19 @@ Apache 服务器对于 www/ 目录中的每个用户有一个单独的 .htaccess 在这种情况下最好咨询托管管理员,如果他们允许访问 .htaccess 文件的话。 -### 用于站点的 25 个 Apache Web 服务器 ‘.htaccess’ 小技巧 ### +### 用于网站的 25 个 Apache Web 服务器 ‘.htaccess’ 小技巧 ### #### 1. 如何在 .htaccess 文件中启用 mod_rewrite #### -mod_rewrite 选项允许你使用重定向并通过重定向到其它 URL 隐藏你真实的 URL。这个选项非常有用,允许你用短的容易记忆的 URL 替换长 URL。 +mod_rewrite 选项允许你使用重定向并通过重定向到其它 URL 来隐藏你真实的 URL。这个选项非常有用,允许你用短的容易记忆的 URL 替换长 URL。 要允许 mod_rewrite,只需要在你的 .htaccess 文件的第一行添加如下一行。 Options +FollowSymLinks -该选项允许你跟踪符号链接从而在站点中启用 mod_rewrite。后面会介绍用短 URL 替换。 +该选项允许你跟踪符号链接从而在站点中启用 mod_rewrite。后面会介绍用短 URL 替换。(LCTT 译注:+FollowSymLinks 只是启用 mod_rewrite 的前提之一,还需要在全局和虚拟机中设置 `RewriteEngine on` 才能启用重写模块。) -#### 2. 如果允许或禁止对站点的访问 #### +#### 2. 如何允许或禁止对站点的访问 #### 通过使用 order、allow 和 deny 关键字,htaccess 文件可以允许或者禁止对站点或目录中子目录或文件的访问。 @@ -109,13 +110,13 @@ mod_rewrite 选项允许你使用重定向并通过重定向到其它 URL 隐藏 #### 3. 为不同错误码生成 Apache 错误文档 #### -用一些简单行,我们可以解决当用户/客户端请求一个站点上不可用的网页时服务器产生的错误码的错误文档,例如我们大部分人见过的浏览器中显示的 ‘404 Page not found’。‘.htaccess’ 文件指定了发生这些错误情况时采取何种操作。 +用简单几行,我们可以解决当用户/客户端请求一个站点上不可用的网页时服务器产生的错误码的错误文档,例如我们大部分人见过的浏览器中显示的 ‘404 Page not found’。‘.htaccess’ 文件指定了发生这些错误情况时采取何种操作。 要做到这点,需要添加下面的行到 ‘.htaccess’ 文件: ErrorDocument -‘ErrorDocument’ 是一个关键字,error-code 可以是 401、403、404、500 或任何有效的表示错误的代码,最后 ‘path-of-document’ 表示本地机器上的路径(如果你使用的是你自己的本地服务器) 或 服务器上的路径(如果你使用任何其它服务器来托管网站)。 +‘ErrorDocument’ 是一个关键字,error-code 可以是 401、403、404、500 或任何有效的表示错误的代码,最后 ‘path-of-document’ 表示本地机器上的路径(如果你使用的是你自己的本地服务器) 或服务器上的路径(如果你使用任何其它服务器来托管网站)。 **例子:** @@ -123,13 +124,13 @@ mod_rewrite 选项允许你使用重定向并通过重定向到其它 URL 隐藏 上面一行设置客户请求任何无效页面,服务器报告 404 错误时显示 error-docs 目录下的 ‘error-404.html’ 文档。 -ErrorDocument 404 "404 Page not found

The page you request is not present. Check the URL you have typed

" + ErrorDocument 404 "404 Page not found

The page you request is not present. Check the URL you have typed

" -上面的表示也正确,其中字符串表示一个普通的 html 文件。 +上面的表示也正确,其中字符串相当于一个普通的 html 文件。 #### 4. 设置/取消 Apache 服务器环境变量 #### -在 .htaccess 文件中你可以设置或者取消站点所有者用来更改服务器设置的全局环境变量。要设置或取消环境变量,你需要在你的 .htaccess 文件中添加下面的行。 +在 .htaccess 文件中你可以设置或者取消站点所有者可以更改的全局环境变量。要设置或取消环境变量,你需要在你的 .htaccess 文件中添加下面的行。 **设置环境变量** @@ -141,29 +142,29 @@ ErrorDocument 404 "404 Page not found

#### 5. 为文件定义不同 MIME 类型 #### -MIME(Multipurpose Internet Multimedia Extensions,,多用途 Internet 多媒体扩展) 是浏览器运行任何页面默认能识别的类型。你可以在 .htaccess 文件中为你的站点定义 MIME 类型,然后服务器就可以识别你定义的类型的文件并运行。 +MIME(多用途 Internet 多媒体扩展)是浏览器运行任何页面所默认识别的类型。你可以在 .htaccess 文件中为你的站点定义 MIME 类型,然后服务器就可以识别你定义类型的文件并运行。 AddType application/javascript js AddType application/x-font-ttf ttf ttc -这里,mod_mime.c 是用于控制定义不同 MIME 类型的模块,如果在你的系统中已经安装了这个模块,那么你就可以用该模块去为你站点中不同的扩展定义不同的 MIME 类型,从而服务器可以理解这些文件。 +这里,mod_mime.c 是用于控制定义不同 MIME 类型的模块,如果在你的系统中已经安装了这个模块,那么你就可以用该模块去为你站点中不同的扩展名定义不同的 MIME 类型,从而让服务器可以理解这些文件。 #### 6. 如何在 Apache 中限制上传和下载的大小 #### -.htaccess 文件允许你拥有控制一个特定用户从你的站点上传或下载数据量大小的功能。要做到这点你只需要添加下面的行到你的 .htaccess 文件: +.htaccess 文件允许你能够控制某个用户从你的站点(通过 PHP)单次上传数据量的大小(LCTT 译注:原文有误,修改)。要做到这点你只需要添加下面的行到你的 .htaccess 文件: php_value upload_max_filesize 20M php_value post_max_size 20M php_value max_execution_time 200 php_value max_input_time 200 -上面的行设置最大上传大小、最大推送数据大小、最大执行时间,例如允许用户在本地机器运行站点的最大时间、限制的最大输入时间。 +上面的行设置最大上传大小、最大POST 提交数据大小、最长执行时间(例如,允许用户在他的本地机器上单次执行一个请求的最大时间)、限制的最大输入时间。 -#### 7. 让用户在站点上播放 .mp3 和其它文件之前预先下载 #### +#### 7. 让用户不能在你的站点上在线播放 .mp3 和其它文件 #### -大部分情况下,人们在下载检查音乐质量之前会在网站上播放等等。作为一个聪明的销售者,你可以添加一个简单的功能,不允许任何用户在线播放音乐或视频,而是必须下载后才能播放。这非常有用,因为在线播放音乐和视频会消耗很多带宽。 +大部分情况下,人们在下载检查音乐质量之前会在网站上播放等等。作为一个聪明的销售者,你可以添加一个简单的功能,不允许任何用户在线播放音乐或视频,而是必须下载完成后才能播放。这非常有用,因为(无缓冲的)在线播放音乐和视频会消耗很多带宽。 要添加下面的行到你的 .htaccess 文件: @@ -171,23 +172,23 @@ MIME(Multipurpose Internet Multimedia Extensions,,多用途 Internet 多媒体 #### 8. 为站点设置目录索引 #### -大部分网站开发者都知道第一个显示的页面,例如一个站点的主页面,被命名为 ‘index.html’。我们大部分也见过这个。但是如何设置呢? +大部分网站开发者都知道第一个显示的页面是哪个,例如一个站点的首页,被命名为 ‘index.html’。我们大部分也见过这个。但是如何设置呢? -.htaccess 文件提供了一种方式用于列出一个客户端请求访问网站的主页面时会顺序扫描的一些网页集,相应地如果找到了列出的页面中的任何一个就会作为站点的主页面并显示给用户。 +.htaccess 文件提供了一种方式用于列出一个客户端请求访问网站的主页面时会顺序扫描的一些网页集合,相应地如果找到了列出的页面中的任何一个就会作为站点的主页面并显示给用户。 需要添加下面的行产生所需的效果。 DirectoryIndex index.html index.php yourpage.php -上面一行指定如果有任何访问主页面的请求到来,首先会在目录中顺序搜索上面列出的网页:如果发现了 index.html 则显示为主页面,否则会处理下一个页面,例如 index.php,如此直到你在列表中输入的最后一个页面。 +上面一行指定如果有任何访问首页的请求到来,首先会在目录中顺序搜索上面列出的网页:如果发现了 index.html 则显示为主页面,否则会找下一个页面,例如 index.php,如此直到你在列表中输入的最后一个页面。 #### 9. 如何为文件启用 GZip 压缩以节省网站带宽 #### -繁重站点通常比只占少量空间的轻量级站点运行更慢是常见的现象。这是因为对于繁重站点需要时间加载大量的脚本文件和图片用于在客户端的 Web 浏览器上显示。 +繁忙的站点通常比只占少量空间的轻量级站点运行更慢,这是常见的现象。因为对于繁忙的站点需要时间加载巨大的脚本文件和图片以在客户端的 Web 浏览器上显示。 -当浏览器请求一个 web 页面时,服务器提供给浏览器该页面并局部显示该 web 页面,浏览器需要下载该页面然后在页面内部运行脚本,这是一种常见机制。 +通常的机制是这样的,当浏览器请求一个 web 页面时,服务器提供给浏览器该页面,并在浏览器端显示该 web 页面,浏览器需要下载该页面并运行页面内的脚本。 -这里 GZip 压缩所做的就是节省单个用户的服务时间从而提高带宽。服务器上站点的源文件以压缩形式保存,当用户请求到来的时候,这些文件以压缩形式传送,然后在服务器上解压并执行。这改进了带宽限制。 +这里 GZip 压缩所做的就是节省单个用户的服务时间而不用增加带宽。服务器上站点的源文件以压缩形式保存,当用户请求到来的时候,这些文件以压缩形式传送,然后在客户端上解压(LCTT 译注:原文此处有误)。这改善了带宽限制。 下面的行允许你压缩站点的源文件,但要求在你的服务器上安装 mod_deflate.c 模块。 @@ -202,7 +203,7 @@ MIME(Multipurpose Internet Multimedia Extensions,,多用途 Internet 多媒体 #### 10. 处理文件类型 #### -服务器默认的有一些特定情况。例如:在服务器上运行 .php 文件,显示 .txt 文件。像这些我们可以以源代码形式只显示一些可执行 cgi 脚本或文件而不是执行它们。 +服务器默认的有一些特定情况。例如:在服务器上运行 .php 文件,显示 .txt 文件。像这些我们可以以源代码形式只显示一些可执行 cgi 脚本或文件而不是执行它们(LCTT 译注:这是为了避免攻击者通过上传恶意脚本,进而在服务器上执行恶意脚本进行破坏和窃取)。 要做到这点在 .htaccess 文件中有如下行。 @@ -213,7 +214,7 @@ MIME(Multipurpose Internet Multimedia Extensions,,多用途 Internet 多媒体 #### 11. 为 Apache 服务器设置时区 #### -.htaccess 文件可用于为服务器设置时区可以看出它的能力和重要性。这可以通过设置一个服务器为每个托管站点提供的一系列全局环境变量中的 ‘TZ’ 完成。 +从 .htaccess 文件可用于为服务器设置时区可以看出它的能力和重要性。这可以通过设置一个服务器为每个托管站点提供的一系列全局环境变量中的 ‘TZ’ 完成。 由于这个原因,我们可以在网站上看到根据我们的时区显示的时间。也许服务器上其他拥有网站的人会根据他居住地点的位置设置时区。 @@ -223,9 +224,9 @@ MIME(Multipurpose Internet Multimedia Extensions,,多用途 Internet 多媒体 #### 12. 如果在站点上启用缓存控制 #### -浏览器很有趣的一个功能是,已经观察到多次同时打开一个网站,和第一次打开相比之后会更快。但为什么会这样呢?事实上,浏览器在它的缓存中保存了一些通常访问的页面用于加快后面的访问。 +浏览器很有趣的一个功能是,很多时间你可以看到,当多次同时打开一个网站和第一次打开相比前者会更快。但为什么会这样呢?事实上,浏览器在它的缓存中保存了一些通常访问的页面用于加快后面的访问。 -但保存多长时间呢?这取决于你自己。例如,你的 .htaccess 文件中设置的缓存控制时间。.htaccess 文件指定了站点的网页可以在浏览器缓存中保存的时间,时间到期后需要重新验证,例如页面会从缓存中删除然后在下次用户访问站点的时候重建。 +但保存多长时间呢?这取决于你自己。例如,你的 .htaccess 文件中设置的缓存控制时间。.htaccess 文件指定了站点的网页可以在浏览器缓存中保存的时间,时间到期后需要重新验证缓存,页面可能会从缓存中删除然后在下次用户访问站点的时候重建。 下面的行为你的站点实现缓存控制。 @@ -243,7 +244,7 @@ MIME(Multipurpose Internet Multimedia Extensions,,多用途 Internet 多媒体 通常 .htaccess 文件中的内容会对该文件所在目录中的所有文件和子目录起作用,但是你也可以对特殊文件设置一些特殊权限,例如只禁止对某个文件的访问等等。 -要做到这点,你需要在文件中以类似方式添加 标记: +要做到这点,你需要在文件中以类似方式添加 \ 标记: Order allow, deny @@ -256,26 +257,26 @@ MIME(Multipurpose Internet Multimedia Extensions,,多用途 Internet 多媒体 #### 14. 启用在 cgi-bin 目录以外运行 CGI 脚本 #### -通常服务器运行的 CGI 脚本都保存在 cgi-bin 目录中,但是你可以启用在你需要的目录运行 CGI 脚本,只需要在所需的目录中添加下面的行到 .htaccess 文件,如果没有改文件就创建一个,并添加下面的行: +通常服务器运行的 CGI 脚本都保存在 cgi-bin 目录中,但是你可以在你需要的目录运行 CGI 脚本,只需要在所需的目录中的 .htaccess 文件添加下面的行,如果没有该文件就创建一个,并添加下面的行: AddHandler cgi-script .cgi Options +ExecCGI #### 15.如何用 .htaccess 在站点上启用 SSI #### -服务器端包括顾名思义的和服务器部分相关的东西。但是什么呢?通常当我们在站点上有很多页面的时候,我们在主页面上会有一个显示到其它页面链接的导航菜单,我们可以启用 SSI(Server Size Includes) 选项允许导航菜单中显示的所有页面完全包含在主页面中。 +服务器端包括(SSI)顾名思义是和服务器部分相关的东西。这是什么呢?通常当我们在站点上有很多页面的时候,我们在主页上会有一个显示到其它页面链接的导航菜单,我们可以启用 SSI 选项允许导航菜单中显示的所有页面完全包含在主页面中。 -SSI 允许包含多个页面,好像他们包含的内容就是一个单一页面的一部分,因此任何需要的编辑都只有一个文件,从而可以节省很多磁盘空间。除了 .shtml 文件,服务器默认启用了该选项。 +SSI 允许多个页面包含同样的内容,因此只需要编辑一个文件就行,从而可以节省很多磁盘空间。对于 .shtml 文件,服务器默认启用了该选项。 如果你想要对 .html 启用该选项,你需要添加下面的行: AddHandler server-parsed .html -这之后 html 文件会导向 SSI。 +这样 html 文件中如下部分会被替换为 SSI。 - + -#### 16. 如何防止网站目录列表 #### +#### 16. 如何防止网站列出目录列表 #### 为防止任何客户端在本地机器罗列服务器上的网站目录列表,添加下面的行到你不想列出的目录的文件中。 @@ -290,16 +291,28 @@ SSI 允许包含多个页面,好像他们包含的内容就是一个单一页 AddDefaultCharset UTF-8 DefaultLanguage en-US +#### 18. 重定向一个非 www URL 到 www URL #### + +在开始解释之前,首先看看如何启用该功能,添加下列行到 .htaccess 文件。 + + RewriteEngine ON + RewriteCond %{HTTP_HOST} ^abc\.net$ + RewriteRule (.*) http://www.abc.net/$1 [R=301,L] + +上面的行启用重写引擎,然后在第二行检查所有涉及到主机 abc.net 或 环境变量 HTTP_HOST 为 “abc.net” 的 URL。 + +对于所有这样的 URL,代码永久重定向它们(如果启用了 R=301 规则)到新 URL http://www.abc.net/$1,其中 $1 是主机为 abc.net 的非 www URL。非 www URL 是大括号内的内容,并通过 $1 引用。 + **重写 URL 的重定向规则** -重写功能仅意味着用短而易记的 URL 替换长而难以记忆的 URL。但是,在开始这个话题之前,这里有一些本文后面会使用的特殊字符的规则和约定。 +重写功能简单的说,就是用短而易记的 URL 替换长而难以记忆的 URL。但是,在开始这个话题之前,这里有一些本文后面会使用的特殊字符的规则和约定。 **特殊符号:** 符号 含义 ^ - 字符串开头 $ - 字符串结尾 - | - 或 [a|b] – a 或 b + | - 或 [a|b] : a 或 b [a-z] - a 到 z 的任意字母 + - 之前字母的一次或多次出现 * - 之前字母的零次或多次出现 @@ -309,30 +322,19 @@ SSI 允许包含多个页面,好像他们包含的内容就是一个单一页 常量 含义 NC - 区分大小写 - L - 最后的规则 – 停止处理更多规则 + L - 最后的规则 – 停止处理后面规则 R - 临时重定向到新 URL R=301 - 永久重定向到新 URL F - 禁止发送 403 头给用户 - P - 代理 – 获取远程内容代替部分并返回 - G - Gone, 不再存在 + P - 代理 - 获取远程内容代替部分并返回 + G - Gone, 不再存在 S=x - 跳过后面的 x 条规则 T=mime-type - 强制指定 MIME 类型 E=var:value - 设置环境变量 var 的值为 value H=handler - 设置处理器 - PT - Pass through – 如果 URL 有额外的头 - QSA - 从到替换 URL 的请求追加查询字符串 + PT - Pass through - 用于 URL 还有额外的头 + QSA - 将查询字符串追加到替换 URL -#### 18. 重定向一个非 www URL 到 www URL #### - -在开始解释之前,首先看看启用该功能需要添加到 .htaccess 文件的行。 - - RewriteEngine ON - RewriteCond %{HTTP_HOST} ^abc\.net$ - RewriteRule (.*) http://www.abc.net/$1 [R=301,L] - -上面的行启用 Rewrite Engine 然后在第二行检查所有涉及到主机 abc.net 或 环境变量 HTTP_HOST 为 “abc.net” 的 URL。 - -对于所有这样的 URL,代码永久重定向它们(如果启用了 R=301 规则)到新 URL http://www.abc.net/$1,其中 $1 是主机为 abc.net 的非 www URL。非 www URL 是大括号内的内容,并通过 $1 引用。 #### 19. 重定向整个站点到 https #### @@ -342,7 +344,7 @@ SSI 允许包含多个页面,好像他们包含的内容就是一个单一页 RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} -上面的行启用 re-write engine 然后检查环境变量 HTTPS 的值。如果设置了那么重写所有网站页面到 https。 +上面的行启用重写引擎,然后检查环境变量 HTTPS 的值。如果设置了那么重写所有网站页面到 https。 #### 20.一个自定义重写例子 #### @@ -359,11 +361,11 @@ SSI 允许包含多个页面,好像他们包含的内容就是一个单一页 AccessFileName htac.cess -#### 22. 如何为你的网站禁用图片链接 #### +#### 22. 如何为你的网站禁用图片盗链 #### -网站大的带宽消耗的另外一个重要问题是热链接问题,这是其它站点用于显示你网站的图片而链接到你的网站的链接,这会消耗你的带宽。这问题也被成为 ‘带宽盗窃’。 +网站带宽消耗比较大的另外一个重要问题是盗链问题,这是其它站点用于显示你网站的图片而链接到你的网站的链接,这会消耗你的带宽。这问题也被成为 ‘带宽盗窃’。 -一个常见现象是当一个网站要显示其它网站所包含的图片时,由于该链接你的网站需要被加载,消耗你站点的带宽而显示其它站点的图片。为了防止出现这种情况,例如 .gif、.jpeg 图片等,下面的代码行会有所帮助: +一个常见现象是当一个网站要显示其它网站所包含的图片时,由于该链接需要从你的网站加载内容,消耗你站点的带宽而为其它站点显示图片。为了防止出现这种情况,比如对于 .gif、.jpeg 图片等,下面的代码行会有所帮助: RewriteEngine ON RewriteCond %{HTTP_REFERER} !^$ @@ -374,20 +376,19 @@ SSI 允许包含多个页面,好像他们包含的内容就是一个单一页 #### 23. 如何将用户重定向到维护页面 #### -如果你的网站需要进行维护并且你想向所有需要访问该网站的你的所有客户通知这个消息,对于这种情况,你可以添加下面的行到你的 .htaccess 文件,从而只允许管理员访问并替换所有有 .jpg、.css、.gif、.js 等的页面。 +如果你的网站需要进行维护并且你想向所有需要访问该网站的你的所有客户通知这个消息,对于这种情况,你可以添加下面的行到你的 .htaccess 文件,从而只允许管理员访问并替换所有访问 .jpg、.css、.gif、.js 等的页面内容。 RewriteCond %{REQUEST_URI} !^/admin/ [NC] RewriteCond %{REQUEST_URI} !^((.*).css|(.*).js|(.*).png|(.*).jpg) [NC] - RewriteRule ^(.*)$ /ErrorDocs/Maintainence_Page.html - [NC,L,U,QSA] + RewriteRule ^(.*)$ /ErrorDocs/Maintainence_Page.html [NC,L,U,QSA] 这些行检查请求 URL 是否包含任何例如以 ‘/admin/’ 开头的管理页面的请求,或任何到 ‘.png, .jpg, .js, .css’ 页面的请求,对于任何这样的请求,用 ‘ErrorDocs/Maintainence_Page.html’ 替换那个页面。 #### 24. 映射 IP 地址到域名 #### -名称服务器是将特定 IP 地址转换为域名的服务器。该映射也可以在 .htaccess 文件中用以下形式指定。 +名称服务器是将特定 IP 地址转换为域名的服务器。这种映射也可以在 .htaccess 文件中用以下形式指定。 - 为了将地址 L.M.N.O 映射到域名 www.hellovisit.com + # 为了将IP地址 L.M.N.O 映射到域名 www.hellovisit.com RewriteCond %{HTTP_HOST} ^L\.M\.N\.O$ [NC] RewriteRule ^(.*)$ http://www.hellovisit.com/$1 [L,R=301] @@ -414,7 +415,7 @@ via: http://www.tecmint.com/apache-htaccess-tricks/ 作者:[Gunjit Khera][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From fb966729fb2dbf81bd961bc02e680c4e3bd47fbc Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 1 Jul 2015 13:40:46 +0800 Subject: [PATCH 1312/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0150616 Linux Humor on the Command-line.md | 108 +++++++++--------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/translated/share/20150616 Linux Humor on the Command-line.md b/translated/share/20150616 Linux Humor on the Command-line.md index acd2fca4e7..41745eba24 100644 --- a/translated/share/20150616 Linux Humor on the Command-line.md +++ b/translated/share/20150616 Linux Humor on the Command-line.md @@ -1,122 +1,122 @@ -LinuxеĬ +Linux命令行中的幽默 ================================================================================ -ͨǷdz۵ģǿ˿ӻ飬ʱҲܹǿijЩĹܣԼøȤ¹ҲҪǺ࣬Щӣôкܶչ¶΢Ц +桌面通常是非常养眼的,它增强了可视化的体验,有时也能够增强某些软件的功能,而且让软件变得更有趣。在命令行下工作也不需要总是很严肃,如果您想在命令行下找些乐子,那么有很多命令可以让您展露微笑。 -LinuxǸȤIJϵͳṩСͿԴߣƽϡŹֵӦáЩߵͿѡ԰Linuxӱһ߸С߰ɡ +Linux是个有趣的操作系统。它提供大量的小型开源工具,从平淡无奇的软件到稀奇古怪的应用。正是这些工具的质量和可选择性帮助Linux脱颖而出。让我们一起来看看下面这七个小工具吧。 ### lolcat ### ![lolcat](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-lolcat.png) -lolcatһļ׼뵽׼һcatijΪ߲ʵɫ +lolcat是一个连接文件或标准输入到标准输出(类似一般的cat)的程序,它会为输出添加七彩的颜色。 -lolcatͨtoiletfigletıӦýʹáӦΪһèͼĺꡣ +lolcat通常和其他诸如toilet或figlet等生成文本的应用结合使用。这个软件不应被误认为是一个或多个猫的图像的宏。 -lolcatMoeд +lolcat由Moe编写。 -ַ: [github.com][1] +网址: [github.com][1] ### cowsay ### ![cowsay](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-cowsay.png) -cowsayһõĿԴASCIIţͼƬڶԻʾϢcowsayPerlдġ +cowsay是一个可配置的开源软件,它用ASCII码生成奶牛的图片,并可以在对话气泡中显示消息。cowsay是用Perl写的。 -cowsayֻʾţԤͼƬѼӡ¹С򡢽ͻ𼦣Լҡѩ˺͹Ǽܡ +cowsay并不仅仅只能显示奶牛。它能生成预先制作的图片或者其他动物,包括鸭子、考拉、麋鹿、小马、绵羊、剑龙和火鸡,以及奶酪、雪人和骨架。 -һcowthinkӦãԻݲͬţͬʱ˼ݡ +有一个叫cowthink的应用,与对话的气泡不同,它能在生成奶牛的同时生成思考的气泡。 -ܰ +功能包括: -- ýűøȤ -- Borgģʽ -- Ըţӣţ̰ƫִִƣ롢Ź֡ -- ţ˵ݿ޸ +- 让脚本变得更有趣 +- Borg模式 +- 可以更改奶牛看起来的样子,比如让奶牛看起来贪婪、偏执、固执、疲倦、古怪、年轻等 +- 支持xcowsay的变形 -ַ: [nog.net][2] +网址: [nog.net][2] ### doge ### ![doge](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-doge.png) -dogeһЩ޴ȤdogeĹļ򵥵ÿϢűĴӡһЩ﷨ľӣʱЩӻеĶ +doge是一个简单的每日信息脚本,它基于有些愚蠢但很有趣的doge的梗。它随机的打印一些在语法上有误的句子,有时这些句子基于您电脑中的东西。 -dogeһ2013dzеĻԪأͨһձȮͼƬͲɫɡЩֹһŵдһЩĶס +doge是一个在2013年非常流行的互联网潮流元素(梗)。这个梗通常由一幅日本柴犬的图片和彩色的文字组成。这些文字故意用一种蹩脚的语气写成了一些互联网的独白。 -- òͬɫŵӢдľ -- նеIJȮЧdz -- ϵͳݣеij򡢵ǰû$EDITOR -- װlolcatΪ׺: while true; do doge | lolcat -a -d 100 -s 100 -p 1; done -- ׼֧: ls /usr/bin | doge ӡһЩ/usr/binµĿִļޡеĿؿԹ˴ԼƴƵʡ +- 随机的用不同的颜色和蹩脚的英语写下随机的句子 +- 终端中的柴犬效果非常棒 +- 获得系统数据,比如主机名、运行中的程序、当前用户、$EDITOR +- 如果您安装了lolcat,您可以用它作为点缀: while true; do doge | lolcat -a -d 100 -s 100 -p 1; done +- 标准输入支持: ls /usr/bin | doge 将打印一些/usr/bin下的可执行文件。哇噢,还有许多命令行的开关可以过滤词语以及控制词语的频率。 -ַ: [github.com/thiderman/doge][3] +网址: [github.com/thiderman/doge][3] ### ASCIIQuarium ### ![Asciiquarium](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-Asciiquarium.png) -ASCIIQuariumһASCII뷽ʽˮ/󶯻ˮ׵ɡ +ASCIIQuarium是一个以ASCII码方式画出的水族馆/海洋动画。享受生活在您电脑中水底的奇妙生物吧。 -ASCIIQuariumҪװPerlcursesԼTerm::Animationģ顣ʹsudo apt-get install libcurses-perlװǰߣʹsudo cpan Term::AnimationװߡҪնС +想运行ASCIIQuarium,您需要安装Perl的curses包以及Term::Animation模块。请使用sudo apt-get install libcurses-perl来安装前者,使用sudo cpan Term::Animation来安装后者。两个命令都需要在终端中运行。 -ܰ +功能包括: -- ʵ -- ȤĶ㹳 -- 졢Ѽӡʹֻ +- 五彩的鱼儿 +- 有趣的动画,包括钓鱼钩 +- 还有许多的天鹅、鸭子、海豚和船只 -ַ: [www.robobunny.com][4] +网址: [www.robobunny.com][4] -### sl - ### +### sl - 蒸汽机车 ### ![sl](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-sl.png) -slһȤնӦãΪЩĴlsslûʾһ +sl是一个有趣的终端应用,它为那些意外的错将ls输成sl的用户显示一个动画。 -Ҵͨdzʣϲٶȶ׼ȷԡǷdzΣյġslΪһʵʵߣעֻϰߡǻ˿Ц +我打字通常非常草率,更喜欢速度而不是准确性。但错别字在命令行中是非常危险的。因此sl作为一个实际的提醒者,提醒我们注意错误输入的这种坏习惯。它总是会让人咯咯的笑。 -ܰ +功能包括: -- ʹ -F, ڷ -- ʹ -l, ʾһС͵Ļ -- ʹ -a, ȥ +- 使用 -F, 火车在飞翔 +- 使用 -l, 显示一个小型的火车 +- 使用 -a, 看上去发生了意外 -ַ: [github.com/mtoyoda/sl][5] +网址: [github.com/mtoyoda/sl][5] ### aafire ### ![aafire](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-aafire.png) -aafireնʾȼյASCII档չʾһascii - aalibǿ +aafire在终端中显示燃烧的ASCII火焰。它展示了aalib库的强大能力,一个ascii艺术库显示出来。 -ַ: [aa-project.sourceforge.net/aalib][6] +网址: [aa-project.sourceforge.net/aalib][6] ### CMatrix ### ![CMatrix](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-CMatrix.png) -CMatrixһncursesijģ⡶ڿ͵۹һӰеĻ档һɽȹϸ15꣬ô֪ܲڿ͵۹1999ƻõӰΪ Keanu Reeves, Laurence Fishburne, Carrie-Anne Moss, Hugo Weaving Joe Pantoliano +CMatrix是一个基于ncurses的程序,它模拟《黑客帝国》(一部电影)中的画面。如果您在一个山洞里度过了上个15年,那么您可能不知道黑客帝国是1999年的美国科幻电影,主角为 Keanu Reeves, Laurence Fishburne, Carrie-Anne Moss, Hugo Weaving和 Joe Pantoliano。 -նΪ132x300¹ҿͬʽйûٶȽ첽Ĺ +它可以在终端设置为132x300的情况下工作,并且可以以同样的速率进行滚动或者以用户定义的速度进行异步的滚动。 -ܰ +功能包括: -- ޸ıɫ -- ʹôַ -- 첽 -- ʹʽĹЧ -- Ļģʽ +- 修改文本颜色 +- 使用粗体字符 +- 异步滚动 +- 使用老式的滚动效果 +- 屏幕保护程序模式 -ַ: [www.asty.org/cmatrix][7] +网址: [www.asty.org/cmatrix][7] -------------------------------------------------------------------------------- via: http://www.linuxlinks.com/article/20150614112018846/Humor.html -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[Caroline](https://github.com/carolinewuyan) - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [1]:https://github.com/busyloop/lolcat [2]:https://web.archive.org/web/20120225123719/http://www.nog.net/%7Etony/warez/cowsay.shtml @@ -124,4 +124,4 @@ via: http://www.linuxlinks.com/article/20150614112018846/Humor.html [4]:http://www.robobunny.com/projects/asciiquarium/html/ [5]:https://github.com/mtoyoda/sl [6]:http://aa-project.sourceforge.net/aalib/ -[7]:http://www.asty.org/cmatrix/ \ No newline at end of file +[7]:http://www.asty.org/cmatrix/ From bb794ff2d702760be021dae7ad2e7f51f1bcb2f2 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 1 Jul 2015 15:04:55 +0800 Subject: [PATCH 1313/2517] Translating by ZTinoZ --- ...50625 Screen Capture Made Easy with these Dedicated Tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md index ec03bb90e6..f0647ac550 100644 --- a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md +++ b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md @@ -2,7 +2,7 @@ ================================================================================ "一图胜过千万句",这句二十世纪早期在美国应运而生的名言,说的是一张单一的静止图片所蕴含的信息足以匹敌大量的描述性文字。本质上说,图片所传递的信息量比文字更有效更高效。 -截图(或抓帧)是一种捕捉自计算机所录制可视化设备输出的快照或图片,屏幕捕捉软件能让计算机获取到截图。This type of software has lots of uses. As an image can illustrate the operation of computer software well, screenshots play an important role in software development and documentation. Alternatively, if you have a technical problem with your computer, a screenshot allows a technical support department to understand the problems you are facing. Writing computer-related articles, documentation and tutorials is nigh on impossible without a good tool for creating screenshots. Screenshots are also useful to save snippets of anything you have on your screen, particularly when it can not be easily printed. +截图(或抓帧)是一种捕捉自计算机所录制可视化设备输出的快照或图片,屏幕捕捉软件能让计算机获取到截图。此类软件有很多用处,因为一张图片能很好地说明计算机软件的操作,截图在软件开发过程和文档中扮演了一个很重要的角色。或者,如果你的电脑有了个技术性问题,一张截图能让技术支持理解你碰到的这个问题。要写好计算机相关的文章、文档和教程,没有一款好的截图工具是几乎不可能的。如果你想在保存屏幕上任意一些零星的信息,特别是不方便打字时,截图也很有用。 Linux has a good selection of open source dedicated screenshot programs, both graphical and console based. For a feature-rich dedicated screenshot utility, look no further than Shutter. This tool is a superb example of a small open source tool. But there are some great alternatives too. From d03b615ec4fa6a91ae82f17d3ff0981b00ced177 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 1 Jul 2015 16:19:08 +0800 Subject: [PATCH 1314/2517] =?UTF-8?q?20150701-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... You Must Do After Installing Fedora 22.md | 134 ++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 sources/tech/20150701 12 Things You Must Do After Installing Fedora 22.md diff --git a/sources/tech/20150701 12 Things You Must Do After Installing Fedora 22.md b/sources/tech/20150701 12 Things You Must Do After Installing Fedora 22.md new file mode 100644 index 0000000000..0e293451ef --- /dev/null +++ b/sources/tech/20150701 12 Things You Must Do After Installing Fedora 22.md @@ -0,0 +1,134 @@ +12 Things You Must Do After Installing Fedora 22 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/F22_alpha_wp-compressed.jpg) + +[Fedora][1] is one of my favorite Linux Distributions that I’ve ever used. Since Fedora project was started, It has always been providing new and exciting features in every release. This time the new and exciting changes have been brought with another well polished [release Fedora 22][2]. + +The release ‘Fedora 22′ comes with many new changes and features and I bet most of you (if seen the changes) would like the release and would want to install/upgrade to Fedora 22. But what to do when you install/upgrade to Fedora 22 ? This is what I am going to show in this article. I’m going to show you the 12 recommended **things to do after installing Fedora 22**. This article will help you setting up your new Fedora 22 and use the new features & changes. + +So let’s get started without wasting anymore time! + +### 1. DNF Replaces Yum In Fedora 22 ### + +Here is one thing that users turning to Fedora 22 must know is that Fedora 22 brings DNF Software Package Manager as a default package manager instead of Yum. + +You must get familiar with DNF so that you have ease to use your latest distro. + +> “With Fedora 22, we’re introducing a major change under the hood. Specifically, we’re now using [DNF and hawkey][3] to manage packages. DNF is much like the [Yum][4] software package manager….“ + +DNF is said to be faster and better dependency management. Although you can carefully see all the commands used in the this article and I’m sure they will help you out with this new software package manager. + +### 2. Update Your Fedora 22 System ### + +When you install Fedora, you have all the new & latest applications but because of the fast development of applications many applications get updates that contain new features, stability and bug fixes. So your first step should be to update your distribution as soon as possible. + + sudo dnf update + +### 3. Install Extra Repositories ### + +Fedora 22, as all other Linux distributions comes with official repositories already setup with the system but they don’t contain every package that you might need to install in future. So it is better to go for extra repository to have most of the packages available in just a minute. + +You can install RPM fusion as extra repositories to install more and more packages. There are two repositories that you can easily install – Free and Non-free. + +Go to [RPM fusion website][5] and you’ll find repositories link for different Fedora versions. First click “**RPM Fusion free for Fedora 22**“, as you can see this is free and click “**RPM Fusion nonfree for Fedora 22**” for a non-free. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/RPM-fusion-repositories-compressed.jpg) + +### 4. Install Multimedia Codecs ### + +With Fedora not all the codecs are installed, there are some missing that users need to install manually otherwise files require codecs that are not installed, those files won’t work at all. So to avoid frustration when want to play a movie and needed codec is not available, you must install multimedia codecs. + +Open the terminal and use the following command to install missing codecs – + + sudo dnf install gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer1-plugins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1 + +### 5. Install Gnome Tweak Tool ### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/gnome-tweak-tool-compressed.jpg) + +Gnome tweak tool is a GUI utility that lets you tweak and customize Gnome desktop environment with the most ease. Here is how you can install Gnome Tweak Tool in Fedora 22. + + sudo dnf install gnome-tweak-tool + +### 6. Install Adobe Flash Player ### + +Adobe flash player is required to show so much content on the internet browsers. Youtube videos need abobe to be installed and online games lovers won’t be able to play games on browser without Adobe flash player. + +Above flash player can be installed easily by downloading setup file from official Adobe website [here][6]. Your operating system and browser will be detected automatically, select the package .rpm and click download. Then open downloaded .rpm file. It will be opened using gnome software and it can be installed just clicking on install button and then providing password when asked. + +### 7. Install VLC Media Player ### + +Fedora 22 comes with a default media player installed known as Gnome Videos but if you’re not satisfied with this media player then you can install the BOSS of media player, VLC. VLC can play almost every virtual media that exists. + +Because we’ve already install RPM fusion repositories so we have VLC in RPM fusion repositories. Simply use dnf to install VLC media player. + + sudo dnf install vlc + +### 8. Install Google Chrome ### + +As other Linux and Fedora distributions, Fedora 22 also has Mozilla Firefox installed which is arguably the best with the most plugins available. But when it comes to speed the browsing, nobody can beat Google Chrome. + + sudo dnf install google-chrome-stable + +### 9. Install Dropbox ### + +I am sure most of you are using any of the cloud storage wait wait wait… Are you also Dropbox as your online cloud storage? That’s what most of people do. You can install Dropbox app on Fedora for faster and better use of the Dropbox cloud storage. + +You can simply download .rpm file from [Dropbox Website][7] according to the distro (32-bit Or 64-bit) you’re using and simply run it to install. + +### 10. Install GIMP An Alternative To Photoshop ### + +GIMP is an image editing and designing software which is very much similar to Photoshop. Most of us (blogger) use GIMP for image editing because it’s really very handy. + +GIMP does not come installed on Fedora 22 so you need to install it manually (which is super easy). + + sudo dnf install gimp + +### 11. Install 7zip ### + +We often need to unzip or extract some compressed files. 7zip is the utility that extracts all kind of archives. It’s not installed by default in Fedora, so you have to manually install 7zip. After this you are ready to extract any type of archive. + + sudo dnf install p7zip + +### 12. Install Other Desktop Environments ### + +Fedora primarily comes with Gnome desktop environment that I like very much. But if you want enjoy Fedora with a different desktop environment, then you can easily do that. + +**For KDE Desktop Environment** + + sudo dnf install @kde-desktop + +**For XFCE Desktop Environment** + + sudo dnf install @xfce-desktop + +**For MATE Desktop Environment** + + sudo dnf install @mate-desktop + +**You can also install any other desktop environment, just use the following format –** + + sudo dnf install @DESKTOP_ENVIRONMENT-desktop + +### Conclusion ### + +That’s all for today. All the above 12 points are enough to give a nice start to Fedora 22. The environment always teaches you new things, so keep on exploring. And obviously I can not touch all the points, if I missed something that you think might be important then please comment below this article and I’ll be happy to discuss that. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/things-to-do-installing-fedora-22/ + +作者:[Mohd Sohail][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/sohail/ +[1]:https://getfedora.org/ +[2]:https://fedoraproject.org/wiki/F22_release_announcement +[3]:https://fedoraproject.org/wiki/Features/DNF +[4]:https://fedoraproject.org/wiki/Yum +[5]:http://rpmfusion.org/Configuration +[6]:https://get.adobe.com/flashplayer/ +[7]:https://www.dropbox.com/install?os=lnx \ No newline at end of file From babfa8103e60a2e44cdf25c4941191c56d059c1a Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 1 Jul 2015 22:01:53 +0800 Subject: [PATCH 1315/2517] =?UTF-8?q?=E6=94=BE=E9=94=99=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E4=BA=86=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...stall Unity 8 Desktop Preview In Ubuntu.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 published/201506/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md diff --git a/published/201506/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md b/published/201506/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md new file mode 100644 index 0000000000..915e6aff8f --- /dev/null +++ b/published/201506/20150604 How To Install Unity 8 Desktop Preview In Ubuntu.md @@ -0,0 +1,77 @@ +在Ubuntu中安装Unity 8桌面预览版 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Unity_8.jpeg) + +如果你一直关注新闻,那么就知道Ubuntu将会切换到带有[Unity 8][2]桌面的[Mir显示服务器][1]。然而,在尚未确定运行在 Mir 上的Unity 8是否会出现在[Ubuntu 15.10 Willy Werewolf][3]之前,有了一个Unity 8的预览版本可供你体验和测试。通过官方PPA,可以很容易地**安装Unity 8到Ubuntu 14.04,14.10和15.04中**。 + +到目前为止,开发者已经可以通过[ISO][4](主要途径)获得该Unity 8预览来进行测试。不过Canonical也通过[LXC容器][5]发布了它。通过该方法,你可以使用Unity 8桌面会话,让它像其它桌面环境一样运行在Mir显示服务器上。就像你[在Ubuntu中安装Mate桌面][6],然后从LightDm登录屏幕选择桌面会话一样。 + +想要试试Unity 8?让我们来看怎样安装它吧。 + +**注意: 它是一个实验性预览,可能不是所有人都可以让它正确工作的。** + +### 安装Unity 8桌面到Ubuntu ### + +下面是安装并使用Unity 8的步骤: + +#### 步骤 1: 安装Unity 8到Ubuntu 12.04和14.04 #### + +如果你正运行着Ubuntu 12.04和14.04,那么你必须使用官方PPA来安装Unity 8。使用以下命令进行安装: + + sudo apt-add-repository ppa:unity8-desktop-session-team/unity8-preview-lxc + sudo apt-get update + sudo apt-get upgrade + sudo apt-get install unity8-lxc + +#### 步骤 1: 安装Unity 8到Ubuntu 14.10和15.04 #### + +如果你正运行着Ubuntu 14.10或15.04,那么Unity 8 LXC已经在源中准备好。你只需要运行以下命令: + + sudo apt-get update + sudo apt-get install unity8-lxc + +#### 步骤 2: 设置Unity 8桌面预览LXC #### + +安装Unity 8 LXC后,该对它进行设置,下面的命令就可达到目的: + + sudo unity8-lxc-setup + +它将花费一些时间来设置,所以,耐心点。它会下载ISO,然后解压缩,接着完成最后一些必要的设置来让它工作。它也会安装一个LightDM的轻度修改版本。这一切都搞定后,需要重启。 + +#### 步骤 3: 选择Unity 8 #### + +重启后,在登录屏幕,点击你的登录旁边的Ubuntu图标: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Change_Desktop_Environment_Ubuntu.jpeg) + +你应该可以在这看到Unity 8的选项,选择它: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Select_Unity8.jpeg) + +### 卸载Unity 8 LXC ### + +如果你发现Unity 8毛病太多,或者你不喜欢它,那么你可以以相同的方式切换回默认Unity版本。此外,你也可以通过下面的命令移除Unity 8: + + sudo apt-get remove unity8-lxc + +该命令会将Unity 8选项从LightDM屏幕移除,但是配置仍然保留着。 + +以上就是你在Ubuntu中安装带有Mir的Unity 8的全部过程,试玩后请分享你关于Unity 8的想法哦! + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-unity-8-desktop-ubuntu/ + +作者:[Abhishek][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://en.wikipedia.org/wiki/Mir_%28software%29 +[2]:https://wiki.ubuntu.com/Unity8Desktop +[3]:http://itsfoss.com/ubuntu-15-10-codename/ +[4]:https://wiki.ubuntu.com/Unity8DesktopIso +[5]:https://wiki.ubuntu.com/Unity8inLXC +[6]:http://itsfoss.com/install-mate-desktop-ubuntu-14-04/ From 30a03fbccd70b2b0ccb5828826e842d202f8f68b Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 1 Jul 2015 23:24:48 +0800 Subject: [PATCH 1316/2517] PUB:20150526 20 Useful Terminal Emulators for Linux @ZTinoZ --- ... 20 Useful Terminal Emulators for Linux.md | 145 +++++++++--------- 1 file changed, 72 insertions(+), 73 deletions(-) rename {translated/tech => published}/20150526 20 Useful Terminal Emulators for Linux.md (51%) diff --git a/translated/tech/20150526 20 Useful Terminal Emulators for Linux.md b/published/20150526 20 Useful Terminal Emulators for Linux.md similarity index 51% rename from translated/tech/20150526 20 Useful Terminal Emulators for Linux.md rename to published/20150526 20 Useful Terminal Emulators for Linux.md index 5e0d237086..318b686aca 100644 --- a/translated/tech/20150526 20 Useful Terminal Emulators for Linux.md +++ b/published/20150526 20 Useful Terminal Emulators for Linux.md @@ -1,12 +1,13 @@ -20款优秀的Linux终端仿真器 +20 款优秀的 Linux 终端仿真器 ================================================================================ -终端仿真器是一款用其它显示结构重现可视终端的计算机程序。换句话说就是终端仿真器能使哑终端看似像一台客户机连接上了服务器。终端仿真器允许最终用户像文本用户界面和命令行界面一样连接控制台和应用程序。 + +终端仿真器是一款用其它显示架构重现可视终端的计算机程序。换句话说就是终端仿真器能使哑终端看似像一台连接上了服务器的客户机。终端仿真器允许最终用户用文本用户界面和命令行来访问控制台和应用程序。(LCTT 译注:终端仿真器原意指对大型机-哑终端方式的模拟,不过在当今的 Linux 环境中,通常指通过远程或本地方式连接的伪终端,俗称“终端”。) ![Linux Terminal Emulators](http://www.tecmint.com/wp-content/uploads/2014/01/Linux-Terminal-Emulators1.jpeg) -20款Linux终端仿真器 +*20款Linux终端仿真器* -你能从开源世界中找到大量的终端仿真器来使用,有些拥有大量的特性而有些则反之。为了能更好地理解它们所能提供的质量,我们收集了一份不可思议的Linux终端仿真器清单。每一款都列出了它们各自的描述和特性以及软件界面截图和下载链接。 +你能从开源世界中找到大量的终端仿真器,它们有些拥有大量的特性而有些则反之。为了能更好地了解它们的特性,我们收集了一份优秀的Linux终端仿真器清单。每一款都列出了它们各自的描述和特性以及软件界面截图和下载链接。 ### 1. Terminator ### @@ -14,21 +15,21 @@ Terminator是一款先进且强大的终端仿真器,它支持多终端窗口 #### Terminator的特性 #### -- 自定义外形和配色方案,根据你的需要设置尺寸。 -- 使用插件来获取更多功能。 +- 自定义配置和配色方案,根据你的需要设置尺寸。 +- 使用插件来提供更多功能。 - 快捷键可以加快普通操作。 -- 可以把终端窗口分裂成几个虚拟终端并把它们重新设置成你需要的尺寸。 +- 可以把终端窗口分割成几个虚拟终端并把它们根据需要重新调整尺寸。 ![Terminator Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Terminator-Emulator.jpeg) -Terminator Terminal +*Terminator 终端* -- [Terminator Homepage][1] -- [Download and Installation Instructions][2] +- [Terminator 主页][1] +- [下载和安装指引][2] ### 2. Tilda ### -Tilda是一款漂亮的基于GTK+的下拉式终端,敲击一个键你就可以呼出一个新的或隐藏着的Tilda窗口。你也可以添加你所选择的颜色来更改文本颜色和终端背景颜色。 +Tilda是一款漂亮的下拉式终端,基于GTK+,一键单击你就可以呼出一个新的或隐藏着的Tilda窗口。你也可以用你所选择的颜色来更改文本颜色和终端背景颜色。 #### Tilda的特性 #### @@ -38,72 +39,72 @@ Tilda是一款漂亮的基于GTK+的下拉式终端,敲击一个键你就可 ![Tilda Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Tilda-Emulator.jpeg) -Tilda Terminal +*Tilda 终端* -- [Tilda Homepage][3] +- [Tilda 主页][3] ### 3. Guake ### -Guake是一款基于python的下拉式终端,诞生于GNOME桌面环境。按一个键就能调出,再按一下就能隐藏。它的设计构思来源于FPS (第一人称射击) 游戏例如Quake,其目标显而易见。 +Guake是一款基于python的下拉式终端,诞生于GNOME桌面环境。一键调出,再按一下就能隐藏。它的设计构思来源于FPS (第一人称射击) 游戏 Quake,其主要目标是容易访问。 -Guake与Yakuaka和Tilda非常相似,不过它是一个集上述二者的优点于一体的基于GTK的程序。Guake完全是用Python和小片的C写成的(全局热键部分)。 +Guake与Yakuaka和Tilda非常相似,不过它是一个集上述二者的优点于一体的基于GTK的程序。Guake完全是用Python和C的片段写成的(全局热键部分)。 ![Guake Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Guake-Terminal.jpeg) -Guake Terminal +*Guake 终端* -- [Guake Homepage][4] +- [Guake 主页][4] ### 4. Yakuake ### -Yakuake (Yet Another Kuake) 是一款基于KDE的下拉式终端仿真器,它与Guake再功能上非常相似。它的射击构思也是受FPS游戏的启发例如Quake。 +Yakuake (Yet Another Kuake) 是一款基于KDE的下拉式终端仿真器,它与Guake在功能上非常相似。它的设计构思也是受FPS游戏Quake的启发。 -Yakuake主要是一款KDE应用程序,它能非常轻松地安装在KDE桌面上,但是如果你试着将它安装在GNOME桌面上,你将会安装大量的依赖包。 +Yakuake从根本上说是一款KDE应用程序,它能非常轻松地安装在KDE桌面上,但是如果你试着将它安装在GNOME桌面上,你将会安装大量的依赖包。 #### Yakuake的特性 #### -- 从屏幕顶端弹回顺畅 -- 选项卡式界面 +- 顺畅地从屏幕顶端弹出 +- 标签式界面 - 可配置的尺寸和动画速度 - 可定制 ![Yakuake Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Yakuake-Terminal.jpeg) -Yakuake Terminal +*Yakuake 终端* -- [Yakuake Homepage][5] +- [Yakuake 主页][5] ### 5. ROXTerm ### -ROXterm又是一款轻量级终端仿真器,旨在提供与GNOME终端相似的特性。它原本创造出来是为了通过不使用Gnome库从而拥有更少的占用空间和更快的启动速度并使用独立的小程序来建立配置界面(GUI), 但是随着时间的流逝,它的角色就转变为给那些高级用户带来更高一层的特性。 +ROXterm是又一款轻量级终端仿真器,旨在提供与“GNOME终端”相似的特性。它原本创造出来是为了避免使用Gnome库从而更少占用空间和更快启动,并使用独立的小程序来显示配置界面(GUI), 但是随着时间的流逝,它的角色就转变为给那些高级用户带来更高层次的特性。 -然而,它比GNOME终端更加具有可制定性并且对于那些经常使用终端的高级用户更令人期望。它能和GNOME桌面环境完美结合并在终端中提供像拖拽项目那样的特性。 +然而,它比GNOME终端更加具有可制定性,并且对于那些经常使用终端的高级用户更令人期望。它能和GNOME桌面环境完美结合并在终端中提供像拖拽项目那样的特性。 ![Roxterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Roxterm-Terminal.jpeg) -Roxterm Terminal +*Roxterm 终端* -- [ROXTerm Homepage][6] +- [ROXTerm 主页][6] ### 6. Eterm ### -Eterm是最轻量级的一款彩色终端仿真器,是作为xterm的替代品而被设计出来。它是以一种选择自由的思想、避免臃肿、灵活性和自由在用户手中是触手可及的理念而开发出来的。 +Eterm是最轻量级的一款彩色终端仿真器,是作为xterm的替代品而被设计出来。它是以一种自由选择的理念设计的,带来了更强大、灵活、用户自主把控的终端。 ![Eterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Eterm-Terminal.jpeg) -Eterm Terminal +*Eterm 终端* -- [Eterm Homepage][7] +- [Eterm 主页][7] ### 7. Rxvt ### -代表着扩展虚拟终端的Rxvt是一款彩色终端仿真器,为那些不需要一些特性例如Tektronix 4014仿真和toolkit-style可配置性的高级用户而生的xterm的替代品。 +Rxvt 的意思是扩展虚拟终端,它是一款彩色终端仿真器,是为那些不需要一些诸如Tektronix 4014仿真和toolkit-style可配置性等特性的高级用户而生的xterm替代品。 ![Rxvt Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Rxvt-Terminal.jpeg) -Rxvt Terminal +*Rxvt 终端* -- [Rxvt Homepage][8] +- [Rxvt 主页][8] ### 8. Wterm ### @@ -111,9 +112,9 @@ Wterm是另一款以rxvt项目为基础的轻量级彩色终端仿真器。它 ![wterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/wterm-Terminal-.jpeg) -wterm Terminal +*wterm 终端* -- [Wterm Homepage][9] +- [Wterm 主页][9] ### 9. LXTerminal ### @@ -121,16 +122,16 @@ LXTerminal是一款基于VTE的终端仿真器,默认运行于没有任何多 #### LXTerminal的特性 #### -- 多标签支持 -- 支持普通命令如cp, cd, dir, mkdir, mvdir +- 多标签式支持 +- 支持常规命令如cp, cd, dir, mkdir, mvdir - 隐藏菜单栏以保证足够界面空间 - 更改配色方案 ![lxterminal Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/lxterminal-Terminal.jpeg) -lxterminal Terminal +*lxterminal 终端* -- [LXTerminal Homepage][10] +- [LXTerminal 主页][10] ### 10. Konsole ### @@ -147,85 +148,83 @@ Konsole是另一款强大的基于KDE的免费终端仿真器,最初由Lars Do - 终端中的活动通知警告 - 增量搜索 - 支持Dolphin文件管理器 -- 普通文本和HTML格式输出出口 +- 支持导出显示为普通文本和HTML格式 ![Konsole Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Konsole-Terminal.jpeg) -Konsole Terminal +*Konsole 终端* -- [Konsole Homepage][11] +- [Konsole 主页][11] ### 11. TermKit ### -TermKit是一款漂亮简洁的终端,其目标是用在Google Chrome和Chromium中广泛被使用的WebKit渲染引擎在基于应用程序的命令行中构建出GUI视图。TermKit起初是为Mac和Windows设计的,但是由于TermKit被Floby给fork并做了修改,现在你可以将它安装在Linux发行版上并感受TermKit带来的魅力。 +TermKit是一款漂亮简洁的终端,其目标是用WebKit渲染引擎在基于应用程序的命令行中构建出GUI视图(LCTT 译注:这个描述比较模糊,请参考截图,或安装一个体验下),WebKit渲染引擎在Google Chrome和Chromium中广泛使用。TermKit起初是为Mac和Windows设计的,但是由于Floby对TermKit 构建了分支,现在你可以将它安装在Linux发行版上并感受TermKit带来的魅力。 ![TermKit Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/TermKit-Terminal.jpeg) -TermKit Terminal +*TermKit 终端* -- [TermKit Homepage][12] +- [TermKit 主页][12] ### 12. st ### -st是一款简单的X Window终端实现接口。 +st是一款简单的X Window终端。 ![st terminal](http://www.tecmint.com/wp-content/uploads/2014/01/st-terminal.png) -st terminal +*st 终端* -- [st Homepage][13] +- [st 主页][13] -### 13. Gnome-Terminal ### +### 13. Gnome 终端 ### -GNOME终端是一款在GNOME桌面环境下的嵌入式终端仿真器,由Havoc Pennington和其他一些人共同开发。它允许用户在GNOME环境下的同时使用一个真实的Linux shell来运行命令。GNOME终端是模拟的xterm终端仿真器并带来了一些相似的特性。 +GNOME终端是一款在GNOME桌面环境下自带的终端仿真器,由Havoc Pennington和其他一些人共同开发。它允许用户在GNOME环境下可以使用一个真实的Linux shell来运行命令。GNOME终端是模仿了xterm终端仿真器,并有一些相似的特性。 -Gnome终端支持多用户,用户可以为他们的账户创建多个用户,每个用户能自定义配置选项,如字体、颜色、背景图片、行为习惯等等并能分别给它们取名。它也支持鼠标事件、url探测、多标签等。 +Gnome终端支持多配置文件,用户可以为他们的账户创建多个配置文件,每个配置文件能自定义配置选项,如字体、颜色、背景图片、行为习惯等等,并能分别给每个配置文件取名。它也支持鼠标事件、url探测、多标签等。 ![Gnome Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Gnome-terminal.jpg) -Gnome Terminal +*Gnome 终端* -- [Gnome Terminal][14] +- [Gnome 终端][14] ### 14. Final Term ### -Final Term是一款漂亮的开源终端仿真器,在这一个界面里蕴藏着一些令人激动的功能和特性。虽然它仍然有待改进,但是它提供了一些重要的特性比如Semantic文本菜单、智能的命令行实现、GUI终端控制、全能的快捷键、彩色支持等等。以下动图抓取并演示了它们的一些特性,点开来看看吧。 +Final Term是一款漂亮的开源终端仿真器,在这一个单独的界面里蕴藏着一些令人激动的特性和方便的功能。虽然它仍然有待改进,但是它提供了一些重要的特性比如“语义”文本菜单、智能的命令行补全、GUI终端控制、全能的快捷键、彩色支持等等。以下动图抓取并演示了它们的一些特性,点开来看看吧。 ![FinalTerm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/FinalTerm.gif) -FinalTerm Terminal +*FinalTerm 终端* - [Final Term][15] ### 15. Terminology ### -Terminology是一款新的现代化终端仿真器,为Enlightenment桌面创造,但也能用于其它桌面环境。它有一些独一无二的棒极了的特性,这是其它终端仿真器所不具备的。 +Terminology是又一款新的现代化终端仿真器,为Enlightenment桌面创造,但也能用于其它桌面环境。它有一些独一无二的棒极了的特性,这是其它终端仿真器所不具备的。 抛开这些特性,terminology甚至还提供了你无法从其它仿真器看到的东西,比如图像、视频和文档的缩略图预览,它允许你从Terminology直接就能看到那些文件。 -你可以来看看Terminology的开发人员制作的小视频(视频画质不太清晰,但足以让你了解Terminology了)。 - - +你可以来看看Terminology的开发人员制作的小视频(视频画质不太清晰,但足以让你了解Terminology了): https://www.youtube.com/ibPziLRGvkg - [Terminology][16] -### 16. Xfce4 terminal ### +### 16. Xfce4 终端 ### -Xfce终端是一款轻量级的现代化终端仿真器,它简单易用,为Xfce桌面环境设计。它最新的一个版本有许多新的炫酷特性比如搜索会话、标签颜色转换器、像Guake或Yakuake一样的下拉式控制台等等。 +Xfce终端是一款轻量级的现代化终端仿真器,它简单易用,为Xfce桌面环境设计。它最新的一个版本有许多新的炫酷特性,比如搜索对话框、标签颜色转换器、像Guake或Yakuake一样的下拉式控制台等等。 ![Xfce Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/xfce-terminal.jpg) -Xfce Terminal +*Xfce 终端* -- [Xfce4 Terminal][17] +- [Xfce4 终端][17] ### 17. xterm ### -xterm应用程序是一款标准的在X Window系统上的终端仿真器。它保持了DEC VT102和Tektronix 4014,让应用能直接使用X Window系统。 +xterm应用是一款标准的在X Window系统上的终端仿真器。它保持了对DEC VT102和Tektronix 4014终端的兼容,以支持那些不能直接使用窗口系统的应用。 ![xterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/xterm.jpg) -xterm Terminal +*xterm 终端* - [xterm][18] @@ -233,36 +232,36 @@ xterm Terminal LilyTerm是一款基于libvte的开源终端仿真器,这款不太出名的仿真器追求的是快速和轻量级。LilyTerm也包括一些关键特性: -- 支持标签移动、着色以及标签重新排序 +- 支持标签、彩色以及标签重新排序 - 通过快捷键管理标签 - 支持背景透明化和饱和度调整 -- 支持为特定用户创建配置文件 +- 支持用户创建配置文件 - 若干个自定义选项 - 广泛支持UTF-8 ![Lilyterm Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/Lilyterm.jpg) -Lilyterm Terminal +*Lilyterm 终端* - [LilyTerm][19] ### 19. Sakura ### -Sakura是另一款不知名的Unix风格终端仿真器,按照命令行模式和基于文本的终端程序开发。Sakura基于GTK和livte,自身特性不多,不过还是有一些自定义选项比如多标签支持、自定义文本颜色、字体和背景图片、快速命令处理等等。 +Sakura是另一款不知名的Unix风格终端仿真器,是为命令行模式和基于文本的终端程序开发的。Sakura基于GTK和livte,自身特性不多,不过还是有一些自定义选项,比如多标签支持、自定义文本颜色、字体和背景图片、快速命令处理等等。 ![Sakura Terminal](http://www.tecmint.com/wp-content/uploads/2014/01/sakura.jpg) -Sakura Terminal +*Sakura 终端* - [Sakura][20] ### 20. rxvt-unicode ### -rxvt-unicode (也称为urxvt) 是另一个高度可定制、轻量级和快速的终端仿真器,支持xft和unicode,由Marc Lehmann开发。它有许多显著特性比如支持Unicode上的国际语言,能显示多种字体类型并支持Perl扩展。 +rxvt-unicode (也称为urxvt) 是另一个高度可定制、轻量级和快速的终端仿真器,支持xft和unicode,由Marc Lehmann开发。它有许多显著特性,比如通过Unicode支持国际化语言,能显示多种字体类型并支持Perl扩展。 ![rxvt unicode](http://www.tecmint.com/wp-content/uploads/2014/01/rxvt-unicode.png) -rxvt unicode +*rxvt unicode* - [rxvt-unicode][21] @@ -274,7 +273,7 @@ via: http://www.tecmint.com/linux-terminal-emulators/ 作者:[Ravi Saive][a] 译者:[ZTinoZ](https://github.com/ZTinoZ) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 01806e142dcbd3681d0dad3f60ed957f348e1e48 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 1 Jul 2015 23:53:30 +0800 Subject: [PATCH 1317/2517] =?UTF-8?q?[Delete]=20sources/tech/20150701=2012?= =?UTF-8?q?=20Things=20You=20Must=20Do=20After=20Installing=20Fedora=2022.?= =?UTF-8?q?md=20=E5=87=A0=E4=B9=8E=E5=92=8C=20published/2015/06/20150528?= =?UTF-8?q?=20Things=20To=20Do=20After=20Installing=20Fedora=2022=20?= =?UTF-8?q?=E5=AE=8C=E5=85=A8=E7=9B=B8=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... You Must Do After Installing Fedora 22.md | 134 ------------------ 1 file changed, 134 deletions(-) delete mode 100644 sources/tech/20150701 12 Things You Must Do After Installing Fedora 22.md diff --git a/sources/tech/20150701 12 Things You Must Do After Installing Fedora 22.md b/sources/tech/20150701 12 Things You Must Do After Installing Fedora 22.md deleted file mode 100644 index 0e293451ef..0000000000 --- a/sources/tech/20150701 12 Things You Must Do After Installing Fedora 22.md +++ /dev/null @@ -1,134 +0,0 @@ -12 Things You Must Do After Installing Fedora 22 -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/F22_alpha_wp-compressed.jpg) - -[Fedora][1] is one of my favorite Linux Distributions that I’ve ever used. Since Fedora project was started, It has always been providing new and exciting features in every release. This time the new and exciting changes have been brought with another well polished [release Fedora 22][2]. - -The release ‘Fedora 22′ comes with many new changes and features and I bet most of you (if seen the changes) would like the release and would want to install/upgrade to Fedora 22. But what to do when you install/upgrade to Fedora 22 ? This is what I am going to show in this article. I’m going to show you the 12 recommended **things to do after installing Fedora 22**. This article will help you setting up your new Fedora 22 and use the new features & changes. - -So let’s get started without wasting anymore time! - -### 1. DNF Replaces Yum In Fedora 22 ### - -Here is one thing that users turning to Fedora 22 must know is that Fedora 22 brings DNF Software Package Manager as a default package manager instead of Yum. - -You must get familiar with DNF so that you have ease to use your latest distro. - -> “With Fedora 22, we’re introducing a major change under the hood. Specifically, we’re now using [DNF and hawkey][3] to manage packages. DNF is much like the [Yum][4] software package manager….“ - -DNF is said to be faster and better dependency management. Although you can carefully see all the commands used in the this article and I’m sure they will help you out with this new software package manager. - -### 2. Update Your Fedora 22 System ### - -When you install Fedora, you have all the new & latest applications but because of the fast development of applications many applications get updates that contain new features, stability and bug fixes. So your first step should be to update your distribution as soon as possible. - - sudo dnf update - -### 3. Install Extra Repositories ### - -Fedora 22, as all other Linux distributions comes with official repositories already setup with the system but they don’t contain every package that you might need to install in future. So it is better to go for extra repository to have most of the packages available in just a minute. - -You can install RPM fusion as extra repositories to install more and more packages. There are two repositories that you can easily install – Free and Non-free. - -Go to [RPM fusion website][5] and you’ll find repositories link for different Fedora versions. First click “**RPM Fusion free for Fedora 22**“, as you can see this is free and click “**RPM Fusion nonfree for Fedora 22**” for a non-free. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/RPM-fusion-repositories-compressed.jpg) - -### 4. Install Multimedia Codecs ### - -With Fedora not all the codecs are installed, there are some missing that users need to install manually otherwise files require codecs that are not installed, those files won’t work at all. So to avoid frustration when want to play a movie and needed codec is not available, you must install multimedia codecs. - -Open the terminal and use the following command to install missing codecs – - - sudo dnf install gstreamer-plugins-bad gstreamer-plugins-bad-free-extras gstreamer-plugins-ugly gstreamer-ffmpeg gstreamer1-libav gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer1-plugins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-good gstreamer1-plugins-base gstreamer1 - -### 5. Install Gnome Tweak Tool ### - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/gnome-tweak-tool-compressed.jpg) - -Gnome tweak tool is a GUI utility that lets you tweak and customize Gnome desktop environment with the most ease. Here is how you can install Gnome Tweak Tool in Fedora 22. - - sudo dnf install gnome-tweak-tool - -### 6. Install Adobe Flash Player ### - -Adobe flash player is required to show so much content on the internet browsers. Youtube videos need abobe to be installed and online games lovers won’t be able to play games on browser without Adobe flash player. - -Above flash player can be installed easily by downloading setup file from official Adobe website [here][6]. Your operating system and browser will be detected automatically, select the package .rpm and click download. Then open downloaded .rpm file. It will be opened using gnome software and it can be installed just clicking on install button and then providing password when asked. - -### 7. Install VLC Media Player ### - -Fedora 22 comes with a default media player installed known as Gnome Videos but if you’re not satisfied with this media player then you can install the BOSS of media player, VLC. VLC can play almost every virtual media that exists. - -Because we’ve already install RPM fusion repositories so we have VLC in RPM fusion repositories. Simply use dnf to install VLC media player. - - sudo dnf install vlc - -### 8. Install Google Chrome ### - -As other Linux and Fedora distributions, Fedora 22 also has Mozilla Firefox installed which is arguably the best with the most plugins available. But when it comes to speed the browsing, nobody can beat Google Chrome. - - sudo dnf install google-chrome-stable - -### 9. Install Dropbox ### - -I am sure most of you are using any of the cloud storage wait wait wait… Are you also Dropbox as your online cloud storage? That’s what most of people do. You can install Dropbox app on Fedora for faster and better use of the Dropbox cloud storage. - -You can simply download .rpm file from [Dropbox Website][7] according to the distro (32-bit Or 64-bit) you’re using and simply run it to install. - -### 10. Install GIMP An Alternative To Photoshop ### - -GIMP is an image editing and designing software which is very much similar to Photoshop. Most of us (blogger) use GIMP for image editing because it’s really very handy. - -GIMP does not come installed on Fedora 22 so you need to install it manually (which is super easy). - - sudo dnf install gimp - -### 11. Install 7zip ### - -We often need to unzip or extract some compressed files. 7zip is the utility that extracts all kind of archives. It’s not installed by default in Fedora, so you have to manually install 7zip. After this you are ready to extract any type of archive. - - sudo dnf install p7zip - -### 12. Install Other Desktop Environments ### - -Fedora primarily comes with Gnome desktop environment that I like very much. But if you want enjoy Fedora with a different desktop environment, then you can easily do that. - -**For KDE Desktop Environment** - - sudo dnf install @kde-desktop - -**For XFCE Desktop Environment** - - sudo dnf install @xfce-desktop - -**For MATE Desktop Environment** - - sudo dnf install @mate-desktop - -**You can also install any other desktop environment, just use the following format –** - - sudo dnf install @DESKTOP_ENVIRONMENT-desktop - -### Conclusion ### - -That’s all for today. All the above 12 points are enough to give a nice start to Fedora 22. The environment always teaches you new things, so keep on exploring. And obviously I can not touch all the points, if I missed something that you think might be important then please comment below this article and I’ll be happy to discuss that. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/things-to-do-installing-fedora-22/ - -作者:[Mohd Sohail][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/sohail/ -[1]:https://getfedora.org/ -[2]:https://fedoraproject.org/wiki/F22_release_announcement -[3]:https://fedoraproject.org/wiki/Features/DNF -[4]:https://fedoraproject.org/wiki/Yum -[5]:http://rpmfusion.org/Configuration -[6]:https://get.adobe.com/flashplayer/ -[7]:https://www.dropbox.com/install?os=lnx \ No newline at end of file From 116c934d11e1ca1cb8013a60acee9c2c1f2dc9e6 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Wed, 1 Jul 2015 23:59:53 +0800 Subject: [PATCH 1318/2517] Update 20150407 10 Truly Amusing Easter Eggs in Linux.md --- sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md b/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md index 3ab7f47b79..f8322fb1af 100644 --- a/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md +++ b/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md @@ -1,3 +1,4 @@ +Translating by H-mudcup 10 Truly Amusing Easter Eggs in Linux ================================================================================ ![](http://en.wikipedia.org/wiki/File:Adventure_Easteregg.PNG) From 45109a030866bb8fe026fd81aa13ce86068e96e9 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 2 Jul 2015 15:36:10 +0800 Subject: [PATCH 1319/2517] Translating by ZTinoZ --- ...5 Screen Capture Made Easy with these Dedicated Tools.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md index f0647ac550..3f55c5ca5e 100644 --- a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md +++ b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md @@ -1,12 +1,12 @@ 用这些专用工具让你截图更简单 ================================================================================ -"一图胜过千万句",这句二十世纪早期在美国应运而生的名言,说的是一张单一的静止图片所蕴含的信息足以匹敌大量的描述性文字。本质上说,图片所传递的信息量比文字更有效更高效。 +"一图胜过千万句",这句二十世纪早期在美国应运而生的名言,说的是一张单一的静止图片所蕴含的信息足以匹敌大量的描述性文字。本质上说,图片所传递的信息量的确是比文字更有效更高效。 截图(或抓帧)是一种捕捉自计算机所录制可视化设备输出的快照或图片,屏幕捕捉软件能让计算机获取到截图。此类软件有很多用处,因为一张图片能很好地说明计算机软件的操作,截图在软件开发过程和文档中扮演了一个很重要的角色。或者,如果你的电脑有了个技术性问题,一张截图能让技术支持理解你碰到的这个问题。要写好计算机相关的文章、文档和教程,没有一款好的截图工具是几乎不可能的。如果你想在保存屏幕上任意一些零星的信息,特别是不方便打字时,截图也很有用。 -Linux has a good selection of open source dedicated screenshot programs, both graphical and console based. For a feature-rich dedicated screenshot utility, look no further than Shutter. This tool is a superb example of a small open source tool. But there are some great alternatives too. +在开源世界,Linux有许多专注于截图功能的工具供选择,基于图形的和控制台的都有。如果要说一个功能丰富的专用截图工具,那就来看看Shutter吧。这款工具是小型开源工具的杰出代表,当然也有其它的选择。 -Screen capture functionality is not only provided by dedicated applications. GIMP and ImageMagick, two programs which are primarily image manipulation tools, also offer competent screen capturing functionality. +屏幕捕捉功能不仅仅只有专业的工具提供,GIMP和ImageMagick这两款主攻图像处理的工具,也能提供像样的屏幕捕捉功能。 ---------- From 4ae10c9d44d4dd1d654ef9a49b40d7db7d3b9179 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 3 Jul 2015 10:02:13 +0800 Subject: [PATCH 1320/2517] Translating by ZTinoZ --- ...re Made Easy with these Dedicated Tools.md | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md index 3f55c5ca5e..8e393b1722 100644 --- a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md +++ b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md @@ -14,36 +14,36 @@ ![Shutter in action](http://www.linuxlinks.com/portal/content/reviews/Graphics/Screenshot-Shutter1.png) -Shutter is a feature-rich screenshot application. You can take a screenshot of a specific area, window, your whole screen, or even of a website - apply different effects to it, draw on it to highlight points, and then upload to an image hosting site, all within one window. +Shutter是一款功能丰富的截图软件。你能为你的特殊区域、窗口、整个屏幕甚至是网站截图 - 然后在其中应用不用的效果,比如用高亮的点在上面绘图,然后上传至一个图片托管网站,一切尽在这个小窗口内。 -Features include: +包含特性: -- Take a screenshot of: - - a specific area - - window - - the complete desktop - - web pages from a script -- Apply different effects to the screenshot -- Hotkeys -- Print -- Take screenshot directly or with a specified delay time -- Save the screenshots to a specified directory and name them in a convenient way (using special wild-cards) -- Fully integrated into the GNOME Desktop (TrayIcon etc) -- Generate thumbnails directly when you are taking a screenshot and set a size level in % -- Shutter session collection: - - Keep track of all screenshots during session - - Copy screeners to clipboard - - Print screenshots - - Delete screenshots - - Rename your file -- Upload your files directly to Image-Hosters (e.g. http://ubuntu-pics.de), retrieve all the needed links and share them with others -- Edit screenshots directly using the embedded drawing tool +- 截图范围: + - 一块特殊区域 + - 窗口 + - 完整的桌面 + - 脚本生成的网页 +- 在截图中应用不同效果 +- 热键 +- 打印 +- 直接截图或指定一个延迟时间 +- 将截图保存至一个指定目录并用一个简便方法重命名它(用特殊的通配符) +- 完成集成在GNOME桌面中(TrayIcon等等) +- 当你截了一张图并以%设置了尺寸时,直接生成缩略图 +- Shutter会话选项: + - 会话中保持所有截图的痕迹 + - 复制截图至剪贴板 + - 打印截图 + - 删除截图 + - 重命名文件 +- 直接上传你的文件至图像托管网站(比如http://ubuntu-pics.de),取回所有需要的图像并将它们与其他人分享 +- 用内嵌的绘画工具直接编辑截图 -- Website: [shutter-project.org][1] -- Developer: Mario Kemper and Shutter Team -- License: GNU GPL v3 -- Version Number: 0.93.1 +- 主页: [shutter-project.org][1] +- 开发者: Mario Kemper和Shutter团队 +- 许可证: GNU GPL v3 +- 版本号: 0.93.1 ---------- From b32e0d6905653e72074d8b8278454680a8719b75 Mon Sep 17 00:00:00 2001 From: wwy-hust Date: Fri, 3 Jul 2015 15:11:03 +0800 Subject: [PATCH 1321/2517] finish translation --- ...Introduction To FreeBSD For Linux Users.md | 100 ------------------ ...Introduction To FreeBSD For Linux Users.md | 98 +++++++++++++++++ 2 files changed, 98 insertions(+), 100 deletions(-) delete mode 100644 sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md create mode 100644 translated/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md diff --git a/sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md b/sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md deleted file mode 100644 index 9e73930755..0000000000 --- a/sources/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md +++ /dev/null @@ -1,100 +0,0 @@ -translating by wwy-hust - -Comparative Introduction To FreeBSD For Linux Users -================================================================================ -![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/FreeBSD-790x494.jpg) - -### Introduction ### - -BSD was originally derived from UNIX and currently, there are various number of Unix-like operating systems descended from the BSD. While, FreeBSD is the most widely used open source Berkeley Software Distribution (BSD distribution). As it is implicitly said it is a free and open source Unix-like-operating system and a public server platform. FreeBSD source code is generally released under a permissive BSD license. It is true that it has similarities with Linux but we cannot deny that they differs in other points. - -The remainder of this article is organized as follows: the description of FreeBSD will be treated in our first section. The similarities between FreeBSD and Linux will be briefly described in the second section. While their differences will be discussed in the third section. And a comparison of their features will be summarized in our last section. - -### FreeBSD description ### - -#### History #### - -- The first version of FreeBSD was released in 1993, while its first CD-ROM distributed was FreeBSD1.0 on December 1993. Then, FreeBSD 2.1.0 was released in 1995 which gained the satisfaction of all users. Actually, many IT companies use FreeBSD and are satisfied where we can list those companies: IBM, Nokia, NetApp and Juniper Networks. - -#### License #### - -- Concerning its license, FreeBSD is released under various source licenses. Its newest code called Kernel is released under the two-clause BSD license, offering the possibility to use and redistribute FreeBSD with absolute freedom. Other codes are released three- and four-clause BSD license and some others are released under GPL and CDDL. - -#### Users #### - -- One of the important feature of FreeBSD, we can mention the various categories of its users. In fact, it is possible to use FreeBSD as a mail server, web server, FTP server and as a router due to the significant set of server-related software accompanied with it. Furthermore, ARM, PowerPC and MIPS are supported by FreeBSD so it is possible to use x86 and s86-64. - -### FreeBSD and Linux similarities ### - -FreeBSD and Linux are two free and open source systems. Indeed, their users can easily check and modify the source code with an absolute freedom. To add, FreeBSD and Linux, both of them are derived from Unix.-like because they have a kernel, internals, and libraries programmed using algorithms derived from historic AT&T Unix. While FreeBSD’s roots are similar to Unix systems, Linux is released as a free Unix-like option. Various tools and applications can be found either in FreeBSD or in Linux in fact, they almost share the same functionality. - -Furthermore, FreeBSD can run big number of Linux applications. It has a Linux compatibility layer that can be installed. This Linux compatibility layer can be installed while compiling FreeBSD with AAC Compact Linux or downloading compiled FreeBSD systems with a Linux compatibility program such as: aac_linux.ko. Which is not the same case with Linux, Linux cannot run FreeBSD software. - -At the end, we can mention that both of them have the same goal but have also some differences which we will outline in the next section. - -### FreeBSD and Linux differences ### - -Currently, no criteria of choice between FreeBSD and Linux is clear for most users. Since, they share almost the same applications. Those two operating systems are as mentioned previously UNIX-like. - -In this section, we will list the most important differences of those two systems. - -#### License #### - -- The first difference point between those two compared systems consist on their license. To start by Linux license, it is released under the GPL license which offers the possibility to view, distribute and change the source code with an absolute freedom. The GPL license helps users to prevent the distribution of binary-only source. Which is the case with FreeBSD, which is licensed under BSD license. This kind of license is more restrictive and easily allows the distribution of binary-only source. The BSD license is more permissive that the GPL since no derivative work is required to maintain the licensing terms. Means any user can use, distribute and modify the code without need to have the previous version of code before changing made. They only need to have the original license of BSD. -- Depending on the needs of each user, a selection can be made between those two types of license. Starting by BSD license which is more preferred by many users due to its special features. In fact, this license gives the possibility to sell each software licensed under it and retain the source code. Passing now to the GPL license, which requires some care of each user has a software released under it. -- To be able to choose between those two software, it is required to understand the licensing of both of them to more understand the methodology used in their development, to distinguish between their features and know which one will fit user’s need. - -#### Control #### - -- Since FreeBSD and Linux are released under two different type of license, the Linux Torvalds control the Linux kernel which is not the same case with FreeBSD which is not controlled. Personally, I prefer to use FreeBSD instead of Linux since it is an absolute free software, no control permission exists. But it is not enough there is other differences between Linux and FreeBSD, help you to choose between both of them. As an advice don’t choose one of them, follow us and then give us your choice. - -#### Operating system #### - -- Linux concentrates only on the kernel system which is not the case with FreeBSD while the whole operating system is maintained. The kernel and a set of software, some of them are developed by the FreeBSD team, are maintained as one unit. Indeed, the FreeBSD developers have the possibility to manage the essential operating systems remotely and efficiently. -- With Linux, there is some difficulties while managing a system. Since, the different components maintained will be from different sources so the Linux developers need to assemble them into groups having the same functionality. -- FreeBSD and Linux both of them give the possibility to have a big set of optional software and distributions but they differ on the way they are managed. With FreeBSD, they are managed together while with Linux they will be maintained separately. - -#### Hardware support #### - -- Concerning the hardware support, Linux is better than FreeBSD. It doesn’t mean that FreeBSD hasn’t the capability to support hardware as Linux. They differ just on the manner. It depends on your need as usual. So if you are searching for the newest solution, the FreeBSD will fit your needs but if you are looking for greatest graphs, it is better to use Linux. - -#### FreeBSD origin Vs Linux origin #### - -- The origin of each system is also another point of distinction between both of them. As I said previously Linux is an alternative of the operating system Unix, written by Linus Trovalds and assisted by a special group of hackers across the Net. Linux has all the needed features in a modern Unix, such as virtual memory, shared libraries, demand loading, proper memory management and many others. It is released under the General Public License. -- FreeBSD also shared many important features of its Unix heritage. FreeBSD as a type of the Berkeley Software Distribution, the distribution of the Unix developed at the University of California. The most important reason under developing BSD is to replace the AT&T operating system by an open source alternative giving the user the ability to use BSD without carry about the obtaining of the AT&T license. -- The problem of licensing, is the most important worry of developers. They try to offer the maximum open source clone of Unix. Which influences the choice of users regarding the degree of open source of each system as FreeBSD gives more freedom than Linux regarding its use since it is released under BSD license. - -#### Supported Package #### - -- From the user’s perspective, another difference between our two compared systems, is their availability and support of the packaged software and source installed software. The Linux distributions provide just the pre-compiled binary packages which is not the same case with FreeBSD, which has the pre-built packages and the build system for the compilation and installation through their available open source. Due to its ports, FreeBSD gives you the possibility to choose between the default making of pre-compiled packages and your ability to customize your software while it is compiled. -- Those ports enable you to build all the software available with FreeBSD. Furthermore, there is an hierarchy of organization all of them due to the directories /usr/ports where you can find the location of the source files and some documentation about the way to use FreeBSD correctly. -- The ports as mentioned give the possibility produce the packages version of software. Instead of having just the pre-compiled packages using Linux, FreeBSD gives you the possibility to have the source-built and the pre-packages software. You can manage your system using the two installation methods. - -#### FreeBSD Vs Linux common Tools #### - -- A huge number of common tools are available while using FreeBSD and are fully own made by the FreeBSD team. In contrast, the Linux tools are from the GNU that is why there is some control during their usage. -- The fact that FreeBSD is released under BSD license is so beneficial and useful. Since, you have the ability to maintain the core operating system, control the development of these applications. Same of those tools are similar to BSD and Unix tools from where they were derived which is not the same case with GNU suite, which want to just make them less backwards compatible. - -#### The Standard Shell #### - -- The tcsh shell is used by default with FreeBSD. Which is an evaluated version fo csh. Since, the FreeBSD is released under the BSD license, it is not recommended to use the bash shell which is a GNU component. The only difference between bash and tcsh shell consists on the scripting feature which can’t be made by tcsh. Indeed, the sh shell is more recommended for the FreeBSD use since it is more reliable and prevents some issues of scripting can be occurred using the tcsh or csh shell. - -#### A More Stratified Filesystem #### - -- As it was mentioned previously, base operating system and optional components can be easily distinguished using the FreeBSD system. Which causes some specification of their organization. In Linux, /bin, /sbin, /usr/bin, or usr/sbin are the directories for executable systems. With FreeBSD it is not the case. There are some additional specifications concerning their organization. The base system are putted in one of the directories mentioned above while the ports and packages are placed in /usr/local/bin or /usr/local/sbin. This methodology helps to recognize and distinguish between an application considered as a base system or a port. - -### Conclusion ### - -FreeBSD and Linux those two free and open source systems, share various similarities but they also differ in several points. The list giving above isn’t given to say that one of them is better than the other. In fact, FreeBSD and Linux, each one of them has its features and specifications that make it a special regarding the other. And you what is your opinion? Have you already used one on them or both? If yes what is your feedback and if no after reading our description what do you think? Sound off and give us and the fellow readers your opinion. - --------------------------------------------------------------------------------- - -via: https://www.unixmen.com/comparative-introduction-freebsd-linux-users/ - -作者:[anismaj][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://www.unixmen.com/author/anis/ diff --git a/translated/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md b/translated/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md new file mode 100644 index 0000000000..76368e1033 --- /dev/null +++ b/translated/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md @@ -0,0 +1,98 @@ +ԱȽϵķʽLinuxûFreeBSD +================================================================================ +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/FreeBSD-790x494.jpg) + +### ### + +BSDUNIX̳жĿǰUnixϵͳǻBSDġFreeBSDʹ㷺ĿԴа棨BSDа棩˼һһѿԴUnixϵͳǹƽ̨FreeBSDԴͨԿɵBSD֤LinuxкܶƵĵطǵóںܶ෽вͬ + +ĵಿ֯£FreeBSDڵһ֣FreeBSDLinuxƵڵڶ֣ǵڵۣǹܵۺܽһڡ + +### FreeBSD ### + +#### ʷ #### + +- FreeBSDĵһ汾1993꣬ĵһCD-ROMFreeBSD1.0Ҳ1993ꡣFreeBSD 2.1.01995귢һûʵIT˾ʹFreeBSDҺ⣬ǿгеһЩIBMNokiaNetAppJuniper Network + +#### ֤ #### + +- ֤FreeBSDԶֿԴ֤зµΪKernelĴBSD֤˷ʹú·FreeBSDľɡĴBSD֤зЩGPLCDDL֤ġ + +#### û #### + +- FreeBSDҪص֮һûʵϣFreeBSDΪʼWeb ServerFTPԼ·ȣֻҪзصɡFreeBSD֧ARMPowerPCMIPSx86x86-64ܹ + +### FreeBSDLinuxƴ ### + +FreeBSDLinuxѿԴʵϣǵûԺ׵ļ鲢޸Դ룬ûӵоԵɡңFreeBSDLinuxUnixϵͳǵںˡڲʹôʷϵAT&T Unix̳е㷨FreeBSDӸϸUnixϵͳLinuxΪѵUnixϵͳġ๤ӦöFreeBSDLinuxҵʵϣǼͬĹܡ + +⣬FreeBSDܹдLinuxӦá԰װһLinuxļݲ㣬ݲڱFreeBSDʱAAC Compact LinuxõͨѱLinuxݲFreeBSDϵͳлݳaac_linux.koͬFreeBSDǣLinux޷FreeBSD + +ע⵽ȻͬĿ꣬߻һЩ֮ͬһг + +### FreeBSDLinux ### + +Ŀǰڴû˵ûһѡFreeBSDLinux׼ΪźܶͬӦóΪǶUnixϵͳ + +һ£ǽгϵͳһЩҪIJ֮ͬ + +#### ֤ #### + +- ϵͳǵ֤LinuxGPL֤УΪûṩĶк޸ԴɣGPL֤ûжơFreeBSDBSD֤BSD֤GPLݣΪҪԸ֤ζκûܹʹá޸Ĵ룬ҲҪά֮ǰ֤ +- ֤ѡһ֡BSD֤ûʵϣ֤ʹûڱ֤ԴķԵͬʱԸ֤˵˵GPLҪÿʹԸ֤ûע⡣ +- Բ֤ͬѡҪ˽ǸԵ֤ԼǿеķۣӶ˽ԵѡʺԼġ + +#### #### + +- FreeBSDLinuxԲ֤ͬģLinus TorvaldsLinuxںˣFreeBSDȴLinuxͬδơҸ˸ʹFreeBSDLinuxΪFreeBSDǾɵûκοɵĴڡLinuxFreeBSDIJ֮ͬҽȲѡ񣬵ȶ걾ĺѡ + +#### ϵͳ #### + +- Linux۽ںϵͳFreeBSDͬFreeBSDϵͳάšFreeBSDں˺һFreeBSDŶӿΪһάʵϣFreeBSDԱܹԶҸЧĹIJϵͳ +- Linux棬ڹϵͳһЩѡڲͬɲͬԴάLinuxҪǻ㼯ܴﵽͬĹܡ +- FreeBSDLinuxûĿѡͷа棬ǹķʽͬFreeBSDͳһĹʽLinuxҪֱά + +#### Ӳ֧ #### + +- ˵Ӳ֧֣LinuxFreeBSDĸáⲻζFreeBSDûLinux֧ӲֻڹķʽͬͨˣѰµĽFreeBSDӦѰһĻʹLinux + +#### ԭFreeBSD Vs ԭLinux #### + +- ߵԭϵͳв֮ͬǰ˵ģLinuxһUnixϵͳLinux Torvaldsдϵ༫һЭʵֵġLinuxһִϵͳҪȫܣڴ桢⡢̬ءڴȡGPL֤ +- FreeBSDҲ̳UnixҪԡFreeBSDΪڼݴѧBSDһַа档BSDҪԭһԴϵͳAT&TϵͳӶûAT&T֤ʹõ +- ֤ǿĵ⡣ͼṩһ󻯿¡UnixĿԴϵͳӰûѡFreeBSDLinuxʹBSD֤зɡ + +#### ֵ֧ #### + +- ûĽǶһ߲ͬĵطԼԴ밲װĿԺ֧֡LinuxֻṩԤĶưFreeBSDͬṩԤİһṩԴͰװĹϵͳֲFreeBSDѡʹԤĬϣڱʱ +- ЩѡFreeBSDеңǵĹDzλģ/usr/portsҵԴļĵַԼһЩȷʹFreeBSDĵ +- ЩᵽĿѡ˲ͬ汾ĿԡFreeBSDͨԴ빹ԼԤLinuxһֻԤʹְװʽϵͳ + +#### FreeBSD Linux ù߱Ƚ #### + +- дijùFreeBSDϿãȤFreeBSDŶӵС෴ģLinuxGNUΪʲôʹһЩơ +- ʵFreeBSDõBSD֤dzáˣάIJϵͳЩӦóĿһЩǵ - BSDUnixĹߣͬGNU׼GNU׼ֻСݡ + +#### ׼ Shell #### + +- FreeBSDĬʹtcshcsh棬FreeBSDBSD֤У˲ʹGNU bash shellbashtcshtcshĽűܡʵϣǸƼFreeBSDʹsh shellΪӿɿԱһЩʹtcshcshʱֵĽű⡣ + +#### һӲλļϵͳ #### + +- ֮ǰᵽһʹFreeBSDʱϵͳԼѡԱ׵⵼һЩǵı׼Linux£/bin/sbin/usr/bin/usr/sbinǴſִļĿ¼FreeBSDͬһЩӵĶ֯Ĺ淶ϵͳ/usr/local/bin/usr/local/sbinĿ¼¡ַ԰ֻϵͳͿѡ + +### ### + +FreeBSDLinuxҿԴϵͳƵҲвͬ㡣гݲ˵ĸϵͳһáʵϣFreeBSDLinuxԼصͼʹϵͳôʲôأѾʹеijϵͳôΪǵĻķǷĻڶǵôԴĹ۵㡣 + +-------------------------------------------------------------------------------- + +via: https://www.unixmen.com/comparative-introduction-freebsd-linux-users/ + +ߣ[anismaj][a] +ߣ[wwy-hust](https://github.com/wwy-hust) +Уԣ[УID](https://github.com/УID) + + [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ + +[a]:https://www.unixmen.com/author/anis/ \ No newline at end of file From c6918c7ec2257968387ddfa8009e39379d65d116 Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 3 Jul 2015 22:53:39 +0800 Subject: [PATCH 1322/2517] translating by martin --- sources/tech/20150401 ZMap Documentation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150401 ZMap Documentation.md b/sources/tech/20150401 ZMap Documentation.md index d2aa316c1f..b773fb4aaf 100644 --- a/sources/tech/20150401 ZMap Documentation.md +++ b/sources/tech/20150401 ZMap Documentation.md @@ -1,3 +1,5 @@ +translating... + ZMap Documentation ================================================================================ 1. Getting Started with ZMap From f1d7823522395edc01e2a17ac1dda6eafcc9b253 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 2 Jul 2015 15:57:21 +0800 Subject: [PATCH 1323/2517] PUB:20150527 How to edit your documents collaboratively on Linux @ictlyh --- ...your documents collaboratively on Linux.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150527 How to edit your documents collaboratively on Linux.md (75%) diff --git a/translated/tech/20150527 How to edit your documents collaboratively on Linux.md b/published/20150527 How to edit your documents collaboratively on Linux.md similarity index 75% rename from translated/tech/20150527 How to edit your documents collaboratively on Linux.md rename to published/20150527 How to edit your documents collaboratively on Linux.md index 8fc469bf24..a49cb0ef13 100644 --- a/translated/tech/20150527 How to edit your documents collaboratively on Linux.md +++ b/published/20150527 How to edit your documents collaboratively on Linux.md @@ -1,12 +1,12 @@ -如何在 Linux 上协同编辑文档 +如何在 Linux 上 使用 ONLYOFFICE 协同编辑文档 ================================================================================ -> “多年前由一些高度紧张、强迫性助理开发的 Bulletin,只是共享文件夹中只有 Emily 和我可以访问的 Word 文档。同一时间我们只有一个人可以打开它并添加消息、想法,或者提问项目列表。然后我们再打印出更新版本并放到我桌子架上的剪贴板,并在退出时删除旧版本。”(Lauren Weisberger 称之为“穿 Prada 的女魔头”) +> “多年前由一些紧张兮兮的、带有强迫症的助理开发的 Bulletin,只是一个放在共享文件夹中只有 Emily 和我可以访问的 Word 文档而已。同一时间我们只有一个人可以打开它并添加消息、想法,或者给条目列表上增加问题。然后我们再打印出更新后的版本并放到我桌子架上的剪贴板,并在完成时删除旧的内容。”(——《穿普拉达的女王》,劳伦·魏丝伯格著 ) -直到今天仍然在使用这样的“协同编辑”,只有一个人可以打开共享文件,对其进行更改,然后告诉其它人什么时候修改了什么。 +直到今天人们仍然在使用这样的“协同编辑”,只有一个人可以打开共享文件,对其进行更改,然后告诉其它人什么时候修改了什么。 ONLYOFFICE 是一款集成了文档、电子邮件、事件、任务和客户关系管理工具的开源在线办公套件。 -使用 ONLYOFFICE 办公套件,一组人可以同时编辑文本、电子表格或者在浏览器上进行展示。直接在他们的文档上留下评论并用集成的聊天工具和其他人沟通。最后,保存文档为 PDF 文件用于之后的打印。作为额外的增强功能,它还能浏览文档历史并在如果需要时恢复到之前的修订/版本。 +使用 ONLYOFFICE 办公套件,一组人可以同时编辑文本、电子表格或者在浏览器上进行展示。可以直接在他们的文档上留下评论并用其中集成的聊天工具和其他人沟通。最后,可以保存文档为 PDF 文件并打印。作为额外的增强功能,它还能浏览文档历史并在如果需要时恢复到之前的修订/版本。 在这篇教程中,我会介绍如何使用 [免费版 ONLYOFFICE][1] 部署你自己的在线办公套件,免费版 ONLYOFFICE 是 ONLYOFFICE 在 GNU AGPL v3 协议下发布的自托管版本。 @@ -29,9 +29,9 @@ ONLYOFFICE 是一款集成了文档、电子邮件、事件、任务和客户关 也可以在 Linux 服务器上单独安装 [ONLYOFFICE 在线编辑器][6],并通过提供的 API 轻松地集成到你的站点或云应用。 -### 运行自托管在线 Office ### +### 运行自行托管的在线 Office ### -要打开你的在线 office,在你浏览器的地址栏输入 localhost(http://IP-Address/)。会打开欢迎页面: +要打开你的在线 office,在你浏览器的地址栏输入 localhost(http://IP地址/)。会打开欢迎页面: ![](https://farm9.staticflickr.com/8815/18116525656_795821c73b_c.jpg) @@ -63,11 +63,11 @@ ONLYOFFICE 是一款集成了文档、电子邮件、事件、任务和客户关 邀请的人只需要根据提供的链接就可以开始协同编辑文档。 -会自动用不用颜色的虚线将你的合作者编辑的文本段落标记出来。 +它会自动用不用颜色的虚线将你的合作者编辑的文本段落标记出来。 ![](https://farm8.staticflickr.com/7790/18139370292_7ef57aae8f_c.jpg) -只要你的其中一个合作者保存了他的/她的更改,你会看到在顶部工具栏左上角出现了一个注意标签,表示这里有更新。 +只要你的其中一个协作者保存了他/她的更改,你会看到在顶部工具栏左上角出现了一个提示标签,表示这里有更新。 ![](https://farm8.staticflickr.com/7778/18143984831_3dd42a9672_c.jpg) @@ -75,13 +75,13 @@ ONLYOFFICE 是一款集成了文档、电子邮件、事件、任务和客户关 ![](https://farm8.staticflickr.com/7796/17955172970_e53460b8a6_c.jpg) -#### STEP 4. 和合作者互动 #### +#### STEP 4. 和协作者互动 #### 要写评论,用鼠标选择一个文本段落,右击并从上下文菜单中选择 **Add comment** 选项。 ![](https://farm8.staticflickr.com/7771/17956640359_c4e2858dc8_c.jpg) -要和合作者实时互动,可以使用集成的聊天工具。**Chat** 面板会列出所有正在编辑文档的用户。点击左侧边栏的 **Chat** 图标打开它。在 **Chat** 面板的合适区域输入你的信息开始讨论。 +要和协作者实时互动,可以使用集成的聊天工具。**Chat** 面板会列出所有正在编辑文档的用户。点击左侧边栏的 **Chat** 图标打开它。在 **Chat** 面板的合适区域输入你的信息开始讨论。 ![](https://farm8.staticflickr.com/7794/18116394026_d93b00e4f8_c.jpg) @@ -97,7 +97,7 @@ ONLYOFFICE 是一款集成了文档、电子邮件、事件、任务和客户关 #### Tip #2. 在 iPad 上编辑文档 #### -为了在任意时刻添加更改到文档,我使用 iPad 的 ONLYOFFICE Documents 应用。你可以从 [iTune][7] 下载并安装它,然后你需要输入你的 ONLYOFFICE 地址、email 和密码来访问你的文档。功能设置几乎一样。 +要随时随地对文件进行修改,我使用 iPad 的 ONLYOFFICE Documents 应用。你可以从 [iTune][7] 下载并安装它,然后你需要输入你的 ONLYOFFICE 地址、email 和密码来访问你的文档。功能设置几乎一样。 为了评估 ONLYOFFICE 在线编辑器的功能,你可以使用供个人使用的 [云版本][8]。 @@ -107,7 +107,7 @@ via: http://xmodulo.com/edit-documents-collaboratively-linux.html 作者:[Tatiana Kochedykova][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 24bbe452a5332b66aca98d05661796229b6f80ba Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 2 Jul 2015 16:34:10 +0800 Subject: [PATCH 1324/2517] PUB:20150601 How to monitor common services with Nagios @geekpi --- ... to monitor common services with Nagios.md | 60 +++++++++---------- 1 file changed, 29 insertions(+), 31 deletions(-) rename {translated/tech => published}/20150601 How to monitor common services with Nagios.md (70%) diff --git a/translated/tech/20150601 How to monitor common services with Nagios.md b/published/20150601 How to monitor common services with Nagios.md similarity index 70% rename from translated/tech/20150601 How to monitor common services with Nagios.md rename to published/20150601 How to monitor common services with Nagios.md index 2898a57ad0..4f6523f0ce 100644 --- a/translated/tech/20150601 How to monitor common services with Nagios.md +++ b/published/20150601 How to monitor common services with Nagios.md @@ -1,12 +1,12 @@ -如何用Nagios监控服务 +如何用 Nagios 监控通用服务 ================================================================================ Nagios内置了很多脚本来监控服务。本篇会使用其中一些来检查通用服务如MySql、Apache、DNS等等。 -为了保证本篇集中在系统监控,我们不会配置hostgroup或者模板,它们已经在 [前面的教程][1]中覆盖了,它们可以满足这些条件了。 +为了保证本篇集中在系统监控,我们不会在这里配置主机组或者模板,它们已经在 [前面的教程][1]中覆盖了,它们可以满足需要了。 ### 在命令行中运行Nagios ### -通常建议在添加到Nagios前现在命令行中运行Nagios服务检测脚本。它会给出执行是否成功以及脚本的输出将会看上去的样子。 +通常建议在添加到Nagios前,先在命令行中运行Nagios服务检测脚本。它会给出执行是否成功以及脚本的输出将会看上去的样子。 这些脚本存储在 /etc/nagios-plugins/config/ ,可执行文件在 /usr/lib/nagios/plugins/。 @@ -39,9 +39,9 @@ Nagios内置了很多脚本来监控服务。本篇会使用其中一些来检 - Server 1 (10.10.10.1) : MySQL, Apache2 - Server 2 (10.10.10.2) : Postfix, Apache2 -- Server 3 (10.10.10.3): DNS +- Server 3 (10.10.10.3) : DNS -首先,服务器被定义在了Nagios中。 +首先,这些服务器被定义在了Nagios中。 root@nagios:~# vim /etc/nagios3/conf.d/example.cfg @@ -79,43 +79,43 @@ Nagios内置了很多脚本来监控服务。本篇会使用其中一些来检 开始检测MySQL时,需要记住MySQL默认只监听回环接口127.0.0.1。这增加了数据库的安全。手动调节需要告诉MySQL该监听什么其他接口。下面是该怎么做。 -这个设置在所有的MySQL服务器上已经做了。 +这个设置要在所有的MySQL服务器上完成。 root@nagios:~# vim /etc/mysql/my.cnf -下面这行被注释掉了来监听所有接口。 +下面这行被注释掉以监听所有网络接口。 #bind-address = 127.0.0.1 -同样,MySQL将不会运行任何主机来连接到它。在本机和任意主机都创建了用户‘nagios’。这个用户接着在所有的数据库中被授予所有的权限,这将在会用在监控中。 +同样,MySQL也不会让任意主机来连接它。需要为localhost和“任意”主机创建MySQL用户‘nagios’,接着在所有的数据库中为这个用户授予ALL权限,会这将在会用在监控中。 下面的设置对所有的MySQL服务器都已经设置。 root@nagios:~# mysql -u root –p - ## MySQL root password here ## + ## MySQL root 密码 ## -'nagios@localhost'用户在MySQL服务器中创建了。 +在MySQL服务器中创建'nagios@localhost'用户。 mysql> CREATE USER 'nagios'@'localhost' IDENTIFIED BY 'nagios-pass'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'nagios'@'localhost'; -'nagios@any-host'用户创建了。 +创建'nagios@任意主机'用户。(LCTT 译注:实际上这两个是同一个用户,只是分别授权给localhost和任意主机的访问;因为它们所用的密码的同一个,修改任何一个,另外一个也相应变化。) mysql> CREATE USER 'nagios'@'%' IDENTIFIED BY 'nagios-pass'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'nagios'@'%'; mysql> FLUSH PRIVILEGES; -这使MySQL监听所有的接口,同样接受来自用户'nagios'的进入链接。 +这使MySQL监听所有的网络接口,同样接受来自用户'nagios'的进入连接。 -请注意,这种变化可能有安全隐患,所以需要说几句话: +请注意,这种修改可能有安全隐患,所以需要提示几点: -- 这个设置将会暴露MySQL给所有的接口,包括WAN。确保只有合法的网络访问是非常重要的。应该使用防火墙和TCP封装器等过滤器。 -- MySQL用户‘nagios’的密码应该非常强。如果只有几台Nagios服务器,那么应该创建'nagios@servername'用户而不是任意用户的'nagios@%'。 +- 这个设置将会暴露MySQL给所有的接口,包括外网。确保只有合法的网络访问是非常重要的。应该使用防火墙和TCP wrapper等过滤器。 +- MySQL用户‘nagios’的密码应该非常强。如果只有几台Nagios服务器,那么应该创建'nagios@服务器名'用户而不是任意用户的'nagios@%'。 -#### 对MySQL的NAgios配置 #### +#### 对MySQL的Nagios配置 #### -用下面的来做一些调整。 +按如下配置来做一些调整。 root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg @@ -140,7 +140,7 @@ Nagios内置了很多脚本来监控服务。本篇会使用其中一些来检 ;check_mysql!userName!userPassword!databaseName } -这样,Nagios就可以同时监控MySQL服务器和数据库的可用性。 +这样,Nagios就可以同时监控MySQL服务器及其数据库的可用性。 ### 监控Apache服务器 ### @@ -148,7 +148,7 @@ Nagios同样也可以监控Apache服务。 #### Apache监控需要 #### -- 监控apache是否可用 +- 监控apache服务是否可用 这个任务非常简单因为Nagios有一个内置命令。 @@ -167,7 +167,7 @@ Nagios同样也可以监控Apache服务。 ### 监控DNS服务 ### -Nagios通过向DNS服务器查询一个完全合格域名(FQDN),或者使用dig工具来查询。默认用于FQDN的是www.google.com,但是这个可以按需改变。按照下面的文件修改来完成这个任务。 +Nagios通过向DNS服务器查询一个完全限定域名(FQDN),或者使用dig工具来查询。默认用于查询的FQDN的是www.google.com,但是这个可以按需改变。按照下面的文件修改来完成这个任务。 root@nagios:~# vim /etc/nagios-plugins/config/dns.cfg @@ -203,8 +203,7 @@ Nagios通过向DNS服务器查询一个完全合格域名(FQDN),或者使用 ### 监控邮件服务器 ### -Nagios可以监控不同的邮件服务组件如SMTP、POP、IMAP和mailq。之前提过,server-2设置了后缀邮件服务。Nagios将被配置来监控SMTP和邮件队列。 - +Nagios可以监控不同的邮件服务组件如SMTP、POP、IMAP和mailq。之前提过,server-2设置了Postfix邮件服务。Nagios将被配置来监控SMTP和邮件队列。 root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg @@ -231,11 +230,11 @@ Nagios可以监控不同的邮件服务组件如SMTP、POP、IMAP和mailq。之 ### 基于端口自定义监控程序 ### -让我们假设下面的自定义程序同样运行在网络中,监听一个特定的端口。 +让我们假设如下定制程序同样运行在网络中,监听着一个特定的端口。 -- 测试1号服务器:自定义程序(TCP端口 12345) +- 测试1号服务器:定制程序(TCP端口 12345) -过一些小的调整,Nagios也可以帮助监控这个程序。 +做一些小的调整,Nagios也可以帮助我们监控这个程序。 root@nagios:~# vim /etc/nagios3/conf.d/services_nagios2.cfg @@ -248,12 +247,11 @@ Nagios可以监控不同的邮件服务组件如SMTP、POP、IMAP和mailq。之 check_command check_tcp!12345 } -在完结之前,Nagios可以监控网络很多其他的方面。存储在/etc/nagios-plugins/config/中的脚本为Nagios很棒的能力。 +在结束之前的提示,Nagios可以监控网络很多其他的方面。存储在/etc/nagios-plugins/config/中的脚本为Nagios提供了很棒的能力。 +一些Nagios提供的脚本被仅限于本地服务器,比如,服务器负载、进程并发数量、登录用户数量等。这些检查可以提供Nagios服务器内有用的信息。 -一些Nagios提供的脚本被限制在本地服务器。例子包含服务负载、进程并发数量、登录用户数量。这些检查可以提供Nagios服务器内有用的信息。 - -希望这篇有用。 +希望这篇文章对你有用。 -------------------------------------------------------------------------------- @@ -261,9 +259,9 @@ via: http://xmodulo.com/monitor-common-services-nagios.html 作者:[Sarmed Rahman][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/install-configure-nagios-linux.html \ No newline at end of file +[1]:https://linux.cn/article-2436-1.html \ No newline at end of file From 9b62c5381b443effac4c3e0a0e174796c4a4fd07 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 2 Jul 2015 22:37:56 +0800 Subject: [PATCH 1325/2517] PUB:20150601 How to monitor Linux servers with SNMP and Cacti @GOLinux --- ...nitor Linux servers with SNMP and Cacti.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150601 How to monitor Linux servers with SNMP and Cacti.md (82%) diff --git a/translated/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md b/published/20150601 How to monitor Linux servers with SNMP and Cacti.md similarity index 82% rename from translated/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md rename to published/20150601 How to monitor Linux servers with SNMP and Cacti.md index cc76945bd8..68bf72ad98 100644 --- a/translated/tech/20150601 How to monitor Linux servers with SNMP and Cacti.md +++ b/published/20150601 How to monitor Linux servers with SNMP and Cacti.md @@ -1,12 +1,12 @@ -使用SNMP和Cacti监控Linux服务器 +使用 SNMP 和 Cacti 监控 Linux 服务器 ================================================================================ -SNMP(或者叫简单网络管理协议)用于收集设备内部发生的数据,如负载、磁盘状态、带宽之类。像Cacti这样的网络监控工具用这些数据来生成图标以达到监控的目的。 +SNMP(简单网络管理协议)用于收集设备内部发生的数据,如负载、磁盘状态、带宽之类。像Cacti这样的网络监控工具用这些数据来生成图标以达到监控的目的。 在一个典型的Cacti和SNMP部署中,会有一台或多台启用了SNMP的设备,以及一台独立的用来从那些设备收集SNMP回馈的监控服务器。请记住,所有需要监控的设备必须启用SNMP。在本教程中,出于演示目的,我们将在同一台Linux服务器上配置Cacti和SNMP。 ### 在Debian或Ubuntu上配置SNMP ### -要安装SNMP代理(snmpd)到基于Debian的系统,请运行以下命令: +要在基于Debian的系统上安装SNMP代理(snmpd),请运行以下命令: root@server:~# apt-get install snmpd @@ -16,10 +16,10 @@ SNMP(或者叫简单网络管理协议)用于收集设备内部发生的数 ---------- - # this will make snmpd listen on all interfaces + # 使snmpd 监听再所有接口上 agentAddress udp:161 - # a read only community 'myCommunity' and the source network is defined + # 定义一个只读的 community 'myCommunity' 和源网络 rocommunity myCommunity 172.17.1.0/24 sysLocation Earth @@ -41,10 +41,10 @@ SNMP(或者叫简单网络管理协议)用于收集设备内部发生的数 ---------- - # A user 'myUser' is being defined with the community string 'myCommunity' and source network 172.17.1.0/24 + # 定义一个使用 community 'myCommunity' 和源网络 172.17.1.0/24 的用户 'myUser' com2sec myUser 172.17.1.0/24 myCommunity - # myUser is added into the group 'myGroup' and the permission of the group is defined + # 将 myUser 加到 'myGroup' 组,定义组权限 group myGroup v1 myUser group myGroup v2c myUser view all included .1 @@ -69,7 +69,7 @@ SNMP可以通过运行snmpwalk命令进行测试。如果SNMP已经配置成功 iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10 iso.3.6.1.2.1.1.3.0 = Timeticks: (2097) 0:00:20.97 - ~~ OUTPUT TRUNCATED ~~ + ~~ 输出截断 ~~ iso.3.6.1.2.1.92.1.1.2.0 = Gauge32: 1440 iso.3.6.1.2.1.92.1.2.1.0 = Counter32: 1 @@ -79,9 +79,9 @@ SNMP可以通过运行snmpwalk命令进行测试。如果SNMP已经配置成功 ### 配置带有SNMP的Cacti ### -在本教程中,我们将在同一台Linux服务器上设置Cacti和SNMP。所以,去[安装Cacti][2]到刚刚配置SNMP的Linux服务器上吧。 +在本教程中,我们将在同一台Linux服务器上设置Cacti和SNMP。所以,到刚刚配置SNMP的Linux服务器上去[安装Cacti][2]吧。 -安装完后,Cacti网页接口可以通过“http://172.17.1.44/cacti”来访问,当然,在你的环境中,请将IP地址换成你的服务器的地址。 +安装完后,Cacti网页界面可以通过“http://172.17.1.44/cacti ”来访问,当然,在你的环境中,请将IP地址换成你的服务器的地址。 ![](http://farm6.staticflickr.com/5512/10972747655_0298f6ce6c_z.jpg) @@ -99,7 +99,7 @@ SNMP可以通过运行snmpwalk命令进行测试。如果SNMP已经配置成功 Cacti将根据先前配置的SNMP字符串注册设备。在本教程中,我们将只添加启用了SNMP的本地服务器。 -要添加设备,我们必须以管理员登录,然后转到Cacti管理员面板中的控制台。点击控制台 > 设备。 +要添加设备,我们必须以管理员登录,然后转到Cacti管理员面板中的控制台。点击 控制台 > 设备。 ![](http://farm8.staticflickr.com/7411/10972747855_b464972e56_z.jpg) @@ -111,7 +111,7 @@ Cacti将根据先前配置的SNMP字符串注册设备。在本教程中,我 ![](http://farm8.staticflickr.com/7400/10972747935_df03500de7_z.jpg) -由于设备已经添加,我们来指定想要创建的图表模板。你可以在该页的最后章节中找到本节内容。 +现在设备已经添加,我们来指定想要创建的图表模板。你可以在该页面的最后部分中找到这块内容。 ![](http://farm4.staticflickr.com/3773/10972747955_083101e6ab_z.jpg) @@ -123,7 +123,7 @@ Cacti将根据先前配置的SNMP字符串注册设备。在本教程中,我 ![](http://farm8.staticflickr.com/7374/10972920484_ed6b33b8b8_z.jpg) -### 接口图表和64位计数器 ### +### 接口的图表和64位计数器 ### 默认情况下,Cacti在SNMP查询中使用32位计数器。32位计数器对于大多数带宽图表而言已经足够了,但是对于超过100Mbps的带宽,它就无能为力了。如果已经知道带宽会超过100Mbps,建议你使用64位计数器。使用64位计数器一点也不麻烦。 @@ -173,9 +173,9 @@ via: http://xmodulo.com/monitor-linux-servers-snmp-cacti.html 作者:[Sarmed Rahman][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/install-configure-cacti-linux.html +[1]:https://linux.cn/article-4683-1.html From 23975d2cba65cc3ecbe2fcb78714e4c222be82d6 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 2 Jul 2015 22:52:48 +0800 Subject: [PATCH 1326/2517] PUB:20150615 How to combine two graphs on Cacti @ictlyh --- ...0615 How to combine two graphs on Cacti.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150615 How to combine two graphs on Cacti.md (64%) diff --git a/translated/tech/20150615 How to combine two graphs on Cacti.md b/published/20150615 How to combine two graphs on Cacti.md similarity index 64% rename from translated/tech/20150615 How to combine two graphs on Cacti.md rename to published/20150615 How to combine two graphs on Cacti.md index db320b204e..78e52a0639 100644 --- a/translated/tech/20150615 How to combine two graphs on Cacti.md +++ b/published/20150615 How to combine two graphs on Cacti.md @@ -1,22 +1,22 @@ 如何在 Cacti 中合并两幅图片 ================================================================================ -[Cacti][1] 是一个很棒的开源网络监视系统,它广泛使用于图示网络元素,例如带宽、存储、处理器和内存使用。使用它的基于网络的接口,你可以轻松地创建和组织图。然而,默认并没有提供一些高级功能,例如合并图片、使用多个来源创建聚合图、迁移 Cacti 到另一台服务器。使用 Cacti 的这些功能你还需要一些经验。在该教程中,我们会看到如何在将两幅 Cacti 图片合并为一幅。 +[Cacti][1] 是一个很棒的开源网络监视系统,它广泛使用于图形化地展示网络元素,例如带宽、存储、处理器和内存使用。使用它的基于Web 的界面,你可以轻松地创建和组织各种图表。然而,它默认并没有提供一些高级功能,例如合并图片、使用多个来源创建聚合图形、迁移 Cacti 到另一台服务器。使用 Cacti 的这些功能你还需要一些经验。在该教程中,我们会看到如何在将两幅 Cacti 图片合并为一幅。 -考虑这个例子。在过去的 6 个月中,客户端 A 连接到了交换机 A 的端口 5。端口 5 发生了错误,因此客户端迁移到了端口 6。由于 Cacti 为每个接口/元素使用不同的图,客户端的带宽历史会分成端口 5 和端口 6。结果是对于一个客户端我们有两幅图片 - 一幅是 6 个月的旧数据,另一幅保存了后续的数据。 +看看这个例子。在过去的 6 个月中,客户端 A 连接到了交换机 A 的端口 5。端口 5 发生了错误,因此客户端迁移到了端口 6。由于 Cacti 为每个接口/元素使用不同的图,客户端的带宽历史会分成端口 5 和端口 6。结果是对于一个客户端我们有两幅图片 - 一幅是 6 个月的旧数据,另一幅保存了后续的数据。 -在这种情况下,我们实际上可以合并两幅图片将旧数据加到新的图中,使得用一个单独的图为一个用户保存历史的和新数据。该教程将会解释如何做到这一点。 +在这种情况下,我们实际上可以合并两幅图片将旧数据加到新的图中,使得用一个单独的图为一个用户保存历史的和新数据。本教程将会解释如何做到这一点。 -Cacti 将每幅图片的数据保存在它自己的 RRD(round robin database,循环数据库) 文件中。当请求一幅图片时,根据保存在对应 RRD 文件中的值生成图。在 Ubuntu/Debian 系统中,RRD 文件保存在 `/var/lib/cacti/rra`,在 CentOS/RHEL 系统中则是 `/var/www/cacti/rra`。 +Cacti 将每幅图片的数据保存在它自己的 RRD(round robin database,循环数据库)文件中。当请求一幅图片时,根据保存在对应 RRD 文件中的值生成图。在 Ubuntu/Debian 系统中,RRD 文件保存在 `/var/lib/cacti/rra`,在 CentOS/RHEL 系统中则是 `/var/www/cacti/rra`。 合并图片背后的思想是更改这些 RRD 文件使得旧 RRD 文件中的值能追加到新的 RRD 文件中。 ### 情景 ### -一个客户端的服务在 eth0 上运行了超过一年。由于硬件损坏,客户端迁移到了另一台服务器的 eth1 接口。我们想图示新接口的带宽,同时保留超过一年的历史数据。只在一幅图中显示客户端。 +一个客户端的服务在 eth0 上运行了超过一年。由于硬件损坏,客户端迁移到了另一台服务器的 eth1 接口。我们想展示新接口的带宽,同时保留超过一年的历史数据。该客户端希望只在一幅图中显示。 ### 确定图的 RRD 文件 ### -图合并的首个步骤是确定和图关联的 RRD 文件。我们可以通过以调试模式打开图检查文件。要做到这点,在 Cacti 的菜单中: 控制台 > 管理图 > 选择图 > 打开图调试模式。 +图合并的首个步骤是确定与图相关联的 RRD 文件。我们可以通过以调试模式打开图检查文件。要做到这点,在 Cacti 的菜单中: 控制台 > 管理图 > 选择图 > 打开图调试模式。 #### 旧图: #### @@ -26,14 +26,14 @@ Cacti 将每幅图片的数据保存在它自己的 RRD(round robin database,循 ![](https://farm4.staticflickr.com/3674/18634036918_5c4118c4b9_c.jpg) -从样例输出(基于 Debian 系统)中,我们可以确定两幅图片的 RRD 文件: +从样例输出(基于 Debian 系统)中,我们可以确定两幅图片的 RRD 文件: - **旧图**: /var/lib/cacti/rra/old_graph_traffic_in_8.rrd - **新图**: /var/lib/cacti/rra/new_graph_traffic_in_10.rrd ### 准备脚本 ### -我们会用一个 [RRD 剪接脚本][2] 合并两个 RRD 文件。下载该 PHP 脚本,并安装为 /var/lib/cacti/rra/rrdsplice.php (Debian/Ubuntu 系统) 或 /var/www/cacti/rra/rrdsplice.php (CentOS/RHEL 系统)。 +我们会用一个 [RRD 剪接脚本][2] 来合并两个 RRD 文件。下载该 PHP 脚本,并安装到 /var/lib/cacti/rra/rrdsplice.php (Debian/Ubuntu 系统) 或 /var/www/cacti/rra/rrdsplice.php (CentOS/RHEL 系统)。 下一步,确认 Apache 用户拥有该文件。 @@ -49,7 +49,7 @@ Cacti 将每幅图片的数据保存在它自己的 RRD(round robin database,循 chown($finrrd, "www-data"); -在 CentOS 或 RHEL 系统中,运行下面的命令: +在 CentOS 或 RHEL 系统中,运行下面的命令即可: # chown apache:apache rrdsplice.php @@ -72,7 +72,7 @@ Cacti 将每幅图片的数据保存在它自己的 RRD(round robin database,循 ![](https://farm6.staticflickr.com/5493/18821787015_6730164068_b.jpg) -总之,该教程显示了如何简单地将两幅 Cacti 图片合并为一幅。当服务迁移到另一个设备/接口,我们希望只处理一幅图片而不是两幅时,这个小技巧非常有用。该脚本非常方便,因为它可以不管源设备合并图片,例如 Cisco 1800 路由器和 Cisco 2960 交换机。 +总之,该教程显示了如何简单地将两幅 Cacti 图片合并为一幅。当服务迁移到另一个设备/接口,我们希望只处理一幅图片而不是两幅时,这个小技巧非常有用。该脚本非常方便,因为它可以不管源设备是不是相同都可以合并图片,例如 Cisco 1800 路由器和 Cisco 2960 交换机。 希望这些能对你有所帮助。 @@ -82,10 +82,10 @@ via: http://xmodulo.com/combine-two-graphs-cacti.html 作者:[Sarmed Rahman][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/install-configure-cacti-linux.html +[1]:https://linux.cn/article-5746-1.html [2]:http://svn.cacti.net/viewvc/developers/thewitness/rrdsplice/rrdsplice.php \ No newline at end of file From 5a6690c3a62ba9a7f9f3194966bcd6ffd892c2ba Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 3 Jul 2015 10:06:11 +0800 Subject: [PATCH 1327/2517] PUB:20150610 How to secure your Linux server @KayGuoWhu --- ...0150610 How to secure your Linux server.md | 53 ++++++++++--------- 1 file changed, 28 insertions(+), 25 deletions(-) rename {translated/tech => published}/20150610 How to secure your Linux server.md (78%) diff --git a/translated/tech/20150610 How to secure your Linux server.md b/published/20150610 How to secure your Linux server.md similarity index 78% rename from translated/tech/20150610 How to secure your Linux server.md rename to published/20150610 How to secure your Linux server.md index ef34eea398..e6fcb4449a 100644 --- a/translated/tech/20150610 How to secure your Linux server.md +++ b/published/20150610 How to secure your Linux server.md @@ -1,15 +1,14 @@ -Linux服务器安全攻略 +Linux 服务器安全技巧 ================================================================================ -> 一台服务器由大量功能各异的部件组成,这一点使得很难根据每个人的需求去提供定制的解决方案。这篇文章尽可能涵盖一些有所裨益的小技巧来帮助管理员保证服务器和用户安全。 毋庸置疑,对于系统管理员,提高服务器的安全性是最重要的事情之一。因此,也就有了许多针对这个话题而生的文章、博客和论坛帖子。 一台服务器由大量功能各异的部件组成,这一点使得很难根据每个人的需求去提供定制的解决方案。这篇文章尽可能涵盖一些有所裨益的小技巧来帮助管理员保证服务器和用户安全。 -有一些常识是每个系统管理员都应该烂熟于心的,所以下面的几点在后文将不会提及: +有一些常识是每个系统管理员都应该烂熟于心的,所以下面的几点在本文将不会提及: - 务必保证系统是**最新的** -- 经常更换密码 - 使用数字、阿拉伯字母和非阿拉伯字母的符号组合 +- 经常更换密码 - 使用数字、字母和非字母的符号组合 - 给予用户**最小**的权限,满足他们日常使用所需即可 - 只安装那些真正需要的软件包 @@ -17,7 +16,7 @@ Linux服务器安全攻略 ### 更改SSH默认端口 ### -在搭建好一台全新的服务器后要做的第一件事情就是更改SSH的默认端口。这个小小单的改动能够使你的服务器避免受到成千上万的暴力攻击(译者注:不更改默认端口相当于黑客们知道你家的门牌号,这样他们只需要一把一把的试钥匙就可能打开你家的锁)。 +在搭建好一台全新的服务器后要做的第一件事情就是更改SSH的默认端口。这个小小的改动能够使你的服务器避免受到成千上万的暴力攻击(LCTT 译注:不更改默认端口相当于黑客们知道你家的门牌号,这样他们只需要一把一把的试钥匙就可能打开你家的锁)。 要更改默认的SSH端口,先打开sshd_config文件: @@ -35,7 +34,7 @@ Linux服务器安全攻略 接下来的一步是: -### 使用SSH密钥 ###、 +### 使用SSH密钥认证 ### 在通过SSH访问服务器时,使用SSH密钥进行认证是尤其重要的。这样做为服务器增加了额外的保护,确保只有那些拥有密钥的人才能访问服务器。 @@ -43,7 +42,7 @@ Linux服务器安全攻略 ssh-keygen -t rsa -你会看到下面的输出,询问要将密钥写到哪一个文件,并且设置一个密码: +你会看到下面的输出,询问要将密钥写到哪一个文件里,并且设置一个密码: Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): my_key @@ -60,7 +59,7 @@ my_key my_key.pub -接下来把my_key.pub拷贝到~/.ssh/authorized_key中 +接下来把my\_key.pub拷贝到~/.ssh/authorized\_key中 cp my_key.pub ~/.ssh/authorized_keys @@ -72,7 +71,7 @@ my_key.pub ### 关闭SSH的密码认证 ### -既然已经有了SSH密钥,那么关闭SSH的密码认证就很安全了。再次打开并编辑sshd_config,按如下设置: +既然已经有了SSH密钥,那么关闭SSH的密码认证就会更安全了。再次打开并编辑sshd_config,按如下设置: ChallengeResponseAuthentication no PasswordAuthentication no @@ -84,7 +83,7 @@ my_key.pub /etc/sudoers/ -可以使用如**visudo**这样的命令编辑文件,推荐使用这个命令,因为它会在关闭文件之前检查任何可能出现的语法错误。当你在编辑文件时出错了,这就很有用了。 +推荐使用如**visudo**这样的命令编辑该文件,因为它会在关闭文件之前检查任何可能出现的语法错误。当你在编辑文件时出错了,这就很有用了。 接下来赋予某个用户root权限。在本文中,使用用户**sysadmin**。确保在编辑后这个文件时使用的用户是系统已有的用户。找到下面这行: @@ -107,6 +106,8 @@ my_key.pub (4) 这个用户可以使用的命令 +(LCTT 译注:所以上面的配置是意思是:root 用户可以在任何终端担任任何用户,执行任何命令。) + 使用这个配置可以给用户访问一些系统工具的权限。 这时,可以放心保存文件了。 @@ -135,7 +136,7 @@ my_key.pub wget https://download.configserver.com/csf.tgz tar -xzf csf.tgz - csf + cd csf sh install.sh 只需等待安装程序完成,然后编辑CSF的配置文件: @@ -148,25 +149,25 @@ my_key.pub 下面要设置的就是服务器上允许通过的端口。在csf.conf中定位到下面的部分,根据需要修改端口: - # Allow incoming TCP ports + # 允许入站的 TCP 端口 TCP_IN = "20,21,25,53,80,110,143,443,465,587,993,995,16543" - # Allow outgoing TCP ports + # 允许出站的 TCP 端口 TCP_OUT = "20,21,22,25,53,80,110,113,443,587,993,995,16543" - # Allow incoming UDP ports + # 允许入站的 UDP 端口 UDP_IN = "20,21,53" - # Allow outgoing UDP ports - # To allow outgoing traceroute add 33434:33523 to this list + # 允许出站的 UDP 端口 + # 要允许发出 traceroute 请求,请加 33434:33523 端口范围到该列表 UDP_OUT = "20,21,53,113,123" -请根据需要逐一设置,推荐只使用那些需要的端口,避免设置对端口进行大范围设置。此外,也要避免使用不安全服务的不安全端口。比如只允许端口465和587来发送电子邮件,取代默认的SMTP端口25. +请根据需要逐一设置,推荐只使用那些需要的端口,避免设置对端口进行大范围设置。此外,也要避免使用不安全服务的不安全端口。比如只允许端口465和587来发送电子邮件,取代默认的SMTP端口25。(LCTT 译注:前提是你的邮件服务器支持 SMTPS) -**重要**:千万不要忘记允许自定义SHH端口。 +**重要**:千万不要忘记允许自定义的 ssh 端口。 -允许防火墙通过你的IP地址使其不被屏蔽,这一点很重要。IP地址定义在下面的文件中: +允许你的IP地址通过防火墙,而绝不被屏蔽,这一点很重要。IP地址定义在下面的文件中: /etc/csf/csf.ignore -被屏蔽的IP地址会出现在这个文件中: +被屏蔽了的IP地址会出现在这个文件中: /etc/csf/csf.deny @@ -184,13 +185,13 @@ my_key.pub 可以看到,尝试通过暴力法登录的IP地址都被屏蔽了,真是眼不见心不烦啊! -#### 锁住账户 #### +### 锁住账户 ### 如果某个账户在很长一段时间内都不会被使用了,那么可以将其锁住以防止其它人访问。使用如下命令: passwd -l accountName -当然,这个账户依然可以被root用户使用。 +当然,这个账户依然可以被root用户使用(LCTT 译注:可用 su 切换为该账号)。 ### 了解服务器上的服务 ### @@ -207,16 +208,18 @@ my_key.pub 然后使用下面的命令关闭服务: chkconfig service off + 或 systemctl disable service 在上面的例子中,把“service”替换成真正想要停止的服务名称。实例如下: chkconfig httpd off + 或 systemctl disable httpd -### 小结 ### +### 小结 ### -这篇文章的目的是涵盖一些通用的安全步骤以便帮助你保护服务器。你可以采取额外的方式去增强对服务器的保护。请记住保证服务器安全是你的责任,在维护服务器安全时尽量做出明智的选择,尽管并没有什么容易的方式去完成这件事情,而建立“完善的”安全需要花费大量的时间和测试直到达到想要的结果。 +这篇文章的目的是涵盖一些通用的安全步骤以便帮助你保护服务器。你可以采取更多方式去增强对服务器的保护。请记住保证服务器安全是你的责任,在维护服务器安全时尽量做出明智的选择,尽管并没有什么容易的方式去完成这件事情,而建立“完善的”安全需要花费大量的时间和测试直到达到想要的结果。 -------------------------------------------------------------------------------- @@ -224,7 +227,7 @@ via: http://www.linuxveda.com/2015/06/03/secure-linux-server/ 作者:[Marin Todorow][a] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 377578a1da5ea7692f890f34df4fd903d98ea40a Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 4 Jul 2015 21:36:54 +0800 Subject: [PATCH 1328/2517] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ll be the future of Linux without Linus.md | 187 ++++++++++++------ 1 file changed, 130 insertions(+), 57 deletions(-) diff --git a/translated/talk/20150618 What will be the future of Linux without Linus.md b/translated/talk/20150618 What will be the future of Linux without Linus.md index 09cd64b647..c880921853 100644 --- a/translated/talk/20150618 What will be the future of Linux without Linus.md +++ b/translated/talk/20150618 What will be the future of Linux without Linus.md @@ -1,116 +1,189 @@ -没有Linus,Linux的未来是什么样子? +没有 Linus,Linux 的未来是什么样子? ============================================================================== -![](http://i2.wp.com/www.linuxveda.com/wp—content/uploads/2015/06/linus—torvalds—painting.jpg) +![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/06/linus-torvalds-painting.jpg) -这次采访是 Linux For You 杂志在2007年进行的,现在我们发表在这里是为了存档的目的。 +这次采访是《Linux For You》杂志在2007年进行的,现在我们发表在这里是为了存档的目的。 -**Q:对于Linux内核,未来的计划/道路/强化是怎样的?** +**Q:对于 Linux 内核,未来的计划/道路/提升是怎样的?** -Linus:我从来没有太多的预见性 — 与其从宏大的计划上看未来,我倾向于从一个相对短的时间框架,比如“几个月之后的事情”。我是一个忠实的‘细节成败论’的信仰者,如果你抓住了细节,大的事情也会大事化小,小事化没。 +Linus:我从来没有太多的预见性 — 与其从宏大的计划上看未来,我倾向于从一个相对短的时间框架,比如“几个月之后的事情”。我是一个忠实的‘细节成败论’的信仰者,如果你抓住了细节,再大的问题也会大事化小,小事化无。 -所以,对于五年后内核会是什么样,我真的没有任何大眼光 — 仅仅是一个非常普遍的计划,确保我们对其保持关注。实际上,对于我个人来说,我最担心的事情之一甚至不是技术问题,而是确保‘进程’工作,这样人们才可以相互协作好。 +所以,对于五年后内核会是什么样,我真的没有任何远见 — 仅仅是一个非常普遍的计划,确保我们对其保持关注。实际上,对于我个人来说,我最担心的事情之一甚至不是技术问题,而是确保这个‘过程’正常,这样人们才可以相互协作好。 -**Q:你怎么看Linux和Solaris之间的关系在未来的发展?它会如何使用户受益?** +**Q:你怎么看 Linux 和 Solaris 之间的关系在未来的发展?它会如何使用户受益?** -Linus:我并不能看到整个重叠的地方,除了我认为Solaris会开始使用更过Linux用户磁盘工具(显然我自己来说没有太多关注这个 — 我真的只关心内核)。Linux的桌面比起传统Solaris拥有的好多了,而且我希望Solaris移植越来越多的Linux的东西,朝着一个更加类Linux的模型前进。 +Linus:我并不能看到整个重叠的地方,除了我认为 Solaris 会开始使用更多的 Linux 用户空间的工具(显然对我自己来说没有太多关注这个 — 我真的只关心内核)。Linux 的桌面比起传统 Solaris 拥有的好多了,而且我希望 Solaris 移植越来越多的Linux的东西,朝着一个更加类 Linux 的模型前进。(LCTT 译注:时至今日,我们还需要讨论 Solaris 吗?/cry ) -从纯内核方面讲,证书的差异意味着没有太多的合作,但是如果看到这种情况改变会很有趣。Sun已经声明在GPL(v2或v3)下授权Solaris,如果这种证书差异消失,那么会导致一些有趣的技术出现。但对此,我持待见态度。 +从纯内核方面讲,许可证的差异意味着没有太多的合作,但是如果看到这种情况改变会很有趣。Sun 已经声明在 GPL(v2 或 v3)下授权 Solaris,如果这种许可证差异消失,那么会导致一些有趣的技术出现。但对此,我持观望态度。 -**Q:现在GPL v3已经完成并发布了,你是否预见有任何情况会激起你开始移植内核到Solaris上去?或者,从你的角度看,它是否很糟糕以至于你从来没考虑过他?** +**Q:现在 GPL v3 已经完成并发布了,你是否预见有什么情况会鼓励你开始移植内核到 Solaris 上去?或者,从你的角度看,它是否很糟糕以至于你从来没考虑过它?** -Linus:我觉得相比于早先的草稿,v3有了很多提高,并且我也认为它不是一个糟糕的证书。我只是认为它没有GPLv2一般的‘伟大’。 +Linus:我觉得相比于早先的草稿,v3 有了很多提高,并且我也认为它不是一个糟糕的许可证。我只是认为它没有 GPLv2一般的‘伟大’。 -所以,由于没有了GPLv2,我会看见自己将会使用GPLv3。但是,自从我有了一个更好的选择,我为什么不应该考虑一下呢? +所以,由于没有了 GPLv2,我觉得自己将会使用 GPLv3。不过,如果我有了一个更好的选择,我为什么不应该考虑一下呢? -这就是说,我努力保持实用主义精神,并且我认为GPLv3比起GPLv2不是一个好证书这件事不是一个‘黑与白’的问题。这是一个平衡做法。如果GPLv3有其他的优点,可能那些优点会在很大程度上倾斜喜爱GPLv3的天平。 +这就是说,我努力保持实用主义精神,并且我认为 GPLv3 不像 GPLv2 一样好这件事并不是一个‘非黑即白’的问题。这是一个平衡做法。如果 GPLv3 有其他的优点,可能那些优点会在很大程度上扭转喜爱 GPLv3 的天平。 -恕我直言,我并没有看到任何优点,但是如果Solaris真的在GPLv3下发布,可能避免不必要的不兼容证书这条足够称为一个优点,可能也会值得去尝试重新许可Linux的内核放在GPLv3下。 +恕我直言,我并没有看到任何优点,但是如果 Solaris 真的在 GPLv3 下发布,可能避免不必要的非兼容的许可证这条足够称为一个优点,可能也许值得去尝试将Linux的内核重新在 GPLv3 许可证下发布。 -不要误解我 — 我认为这是不大可能的。但是我确实想澄清我本质上不是一个证书偏执者。我认为GPLv2是毫无疑问的好证书,但是证书不是一切。 +不要误解我 — 我认为这是不大可能的。但是我确实想澄清我本质上不是一个许可证偏执者。我认为 GPLv2 是毫无疑问的好许可证,但是许可证并不是一切。 -总的来说,我使用很多其他证书下的程序。我可能没有把我自己做的一个项目放在BSD(或X11—MIT)证书下,但是我认为它是一个伟大的证书,对于其他项目来说,它可能是最佳的选择。 +总的来说,我使用很多其他许可证下的程序。我可能没有把一个我自己做的项目放在 BSD(或 X11—MIT)许可证下,但是我认为它是一个伟大的许可证,对于其他项目来说,它可能是最佳的选择。 -**Q:目前有没有任何印度人,你想特别提出作为Linux内核的关键贡献者?** +**Q:目前有没有任何你想特别提出作为 Linux 内核的关键贡献者的印度人?** -Linus:我不得不承认,我并没有与实际认识的来自印度的任何人直接工作。那就是说,我应该稍微澄清下:我已经非常有意识地努力建立一个规模庞大的内核开发团队,这样我不用以独自地工作而告终。 +(LCTT 译注:本篇访谈中提到多次印度,是因为访谈者是印度人。) -我非常相信大多数人基本上被束缚起来了,只对很少的人十分了解(你最亲近的家人和朋友),我也努力构造这样一个开发模型影响这种状况:通过一个‘开发者网络’,人们可以在此互动,可能是与一批你信任的人,而且那些人反过来与他们信任的一群人互动。 +Linus:我不得不承认,我并没有与实际认识的来自印度的任何人直接工作。换句话说,我应该稍微澄清下:我已经非常有意识地努力建立一个规模庞大的内核开发团队,这样我不用以独自地工作而告终。 -所以,当我偶然与上百个开发者联系,他们发给我一两个随机的补丁,我已经努力去建立这样一个环境,在这里我做的一堆事,发生在我熟知的人组成的一个较小的集合间,仅仅因为我认为那就是人们工作的方式。当然也是我喜欢工作的方式。 +我非常相信大多数人的社交基本上是受限制的,只对很少的人十分了解(你最亲近的家人和朋友),我也努力构造这样一个开发模型影响这种状况:通过一个‘开发者网络’,人们可以在此互动,可能是与一批你信任的人,而且那些人反过来与他们信任的一群人互动。 -同时,坦白地说,我甚至不知道许多与我一起工作的人生活在哪里。位置成了十分次要的东西。所以我很确信与我工作最亲密的前10—15个人中,没有印度的,可能这话稍后传到公众耳里,然后被指出确实有一些人来自那里! +所以,当我偶然会与上百个开发者联系,他们发给我一两个随机的补丁,我已经努力去建立这样一个环境,在这里我做的一堆事,发生在我熟知的人组成的一个较小的群体间,仅仅因为我认为那就是人们工作的方式。当然也是我喜欢工作的方式。 -**Q:自从Linux的内核开发对你依赖如此严重以来,你如何计划组织/重组,让它在没有你的情况下继续发展,假设你决定花更多的时间在你自己的生活和家庭上面?** +同时,坦白地说,我甚至不知道许多与我一起工作的人生活在哪里。地理位置成了十分次要的东西。所以我很确信与我工作最亲密的前10—15个人中,没有印度的,可能这话稍后传到公众耳里,然后被指出确实有一些人来自那里! -Linus:现在Linux比我大得多了,为了这个实现我已经工作了很长时间。是的,我仍然十分亲切地身在其中,而且我对其有着想当大的日常影响,我最终会是这样一个人,在某种程度上,扮演着许多内核开发活跃者的中心点的角色;但是 — 我不会说Linux“严重依赖”于我。 +**Q:因为 Linux 的内核开发对你依赖如此严重,你如何计划组织或重组,让它在没有你的情况下继续发展,假设你决定花更多的时间在你自己的生活和家庭上面?** -所以,如果我得了心脏病并且明天就死了(很高兴没这种可能:我显然在任何方面都还健康),人们肯定会注意到,但是有成千上万的人为内核工作,并且不止一两个人能够接替我,还少有困惑。 +Linus:现在 Linux 比我重要得多,为了今天这一步我已经工作了很长时间。是的,我仍然十分密切地参与其中,而且我对其有着想当大的日常影响,我最终会是这样一个人——在某种程度上,扮演着许多内核开发活跃者的中心;但是,我不会说Linux“严重依赖”于我。 -**Q:印度是软件工程师的主要产地之一,当然我们没有在Linux领域做太多贡献。你觉得什么是保持印度人在Linux领域变得具有前瞻性的?如果我们鼓励印度人参与并为Linux做很大的贡献,你觉得如何?假如你有一个在印度的粉丝;你会用你的形象来启迪那些爱好者吗?** +所以,如果我得了心脏病并且明天就死了(很高兴没这种可能:我显然在任何方面都还健康),人们肯定会注意到,但是有成千上万的人为内核工作,并且不止一两个人能够没有什么困难地接替我。 -Linus:对我来说,这确实是一个不好回答的问题。进入开源是如此一个底层结构(网络接入,教育,你说的),信息流和简单的文化的复杂组合,我甚至不能去猜测最大的障碍会是什么。 +**Q:印度是软件工程师的主要产地之一,当然我们没有在 Linux 领域做太多贡献。你觉得什么是让印度人在Linux领域变得主动的?如果我们鼓励印度人参与并为Linux做更大的贡献,你觉得如何?假如你有一个在印度的粉丝;你会用你的形象来顾问那些爱好者吗?** -在很多方面,至少那些在印度含英语文化的地方,应该有一个相对容易的方式参与Linux和其他开源项目,如果仅仅是由于语言门槛的话。当然比起亚洲的许多地方,甚至欧洲的一些地方要容易些。 +Linus:对我来说,这确实是一个不好回答的问题。参与开源取决于两方面的基础条件(互联网和教育,如你说的):信息流和文化,我甚至不知道这其中哪个是最大的障碍。 -当然,有一些人,并不等同于印度的大部分群体,而且我自己关于印度的情况也知道不多,甚至没法做出一点半路聪明猜测最好的前路是什么。我猜一个热情的本地用户社区一直是最好的途径,我认为你们已经拥有这样的社区了。 +在很多方面,至少那些在印度讲英语文化的地方,参与 Linux 和其他开源项目是相对容易的,如果仅仅是由于语言门槛的话。这当然比起亚洲的许多地方,甚至欧洲的一些地方要容易些。 -至于我的‘形象’,我自己不以为然。我不是一个伟大的公众演讲者,而且我最近些年已经避免出游,因为被看做符号‘形象’让我很不自在。我就是一个工程师而已,而且我仅仅是喜欢我做的事情,并与社会上其他人一起工作。 +当然,这只是一些人,并不等同于印度的大部分群体,而且我自己关于印度的情况也知道不多,甚至没法不太负责的猜测最好的途径是什么。我猜一个热情的本地用户社区一直是最好的途径,我认为你们已经拥有这样的社区了。 -**Q:什么样的理由会让你考虑去看看印度?** +至于我的‘形象’,我自己不以为然。我不是一个伟大的公众演讲者,而且我最近些年已经避免出游,因为被看做符号化的‘形象’让我很不自在。我就是一个工程师而已,而且我仅仅是喜欢我做的事情,并与社会上其他人一起工作。 -Linus:如第一个回答中提到,我完全地讨厌公开演讲,所以我才想避免开会等等这些事。我更愿意某天去印度度个假,但是如果我这样做,我可能悄悄地干 — 出行之前不告诉任何人,仅仅作为一个游客去游览印度! +**Q:什么样的理由会让你考虑去访问印度?** -**Q:最近,你好像在抨击Subversion与CVS,质问他们的基础架构。现在你已经从Subversion和CVS社区那里得到回应,你仍然在坚持自己正确,或者没有被说服吗?** +Linus:如第一个回答中提到,我十分讨厌公开演讲,所以我才想避免开会等等这些事。我更愿意某天去印度度个假,但是如果我这样做,我可能悄悄地干 — 出行之前不告诉任何人,仅仅作为一个游客去游览印度!(LCTT 译注:所以 Linus 不来中国的道理是同样的,除非世界性的 LinuxCon 在中国召开一次。) + +**Q:最近,你好像在抨击 Subversion 与 CVS,质问他们的基础架构。现在你已经从 Subversion 和 CVS 社区那里得到回应,你仍然在坚持自己正确,或者没有被说服吗?** Linus:因为我发现这个争论很有趣,所以我想做一个强硬的声明。换句话说,我确实‘喜欢’争论。并不是不经思考的,但是我确实想要让争论更热烈些,而不仅仅是完全的柏拉图式的。 -做出强硬的争论有时会导致一个非常合理的反驳,然后我会很高兴地说:“噢,好吧,你是对的。” +做出强硬的争论有时会引来一个非常合理的反驳,然后我会很高兴地说:“噢,好吧,你是对的。” -但是话说回来,对SVN/CVS并不会发生这种情况。我怀疑很多人真的不是很喜欢CVS,所以我真的不期望任何人去坚持CVS是一切,而不是一个老旧的系统。当我知道少数人确实这样争论了,我之前就不该那么不礼貌地反对SVN(嘿,这是公平的 — 我真的不是一个非常礼貌的家伙!),我认为不是任何人都可以争论SVN是‘好的’。 +但是话说回来,对 SVN/CVS 并不会发生这种情况。我怀疑很多人并不是真的很喜欢 CVS,所以我真的不觉得会有谁坚持认为 CVS 就是一切,而不是一个老旧系统。要是我知道少数人确实这样争论过了,我之前就不该那么不礼貌地反对 SVN(嘿,这么说没错 — 我真的不是一个非常礼貌的家伙!),我不认为任何人都可以争论 SVN 是‘好的’。 -我认为,SVN就是一个‘好过头’的经典案例。人们过去经常使用SVN,并且它也‘很好’,用途广泛,但是它的好过头完全如DOS与Windows也‘好过头’一样。不是什么伟大的技术,只是普遍适用而已,同时它对人们来说运行良好,看着十分熟悉。但是很少有人以此为傲,或者对其有兴奋感。 +我认为,SVN 就是一个‘足够好’的经典案例。人们过去经常使用 SVN,并且它也‘足够好’地广泛使用,但是它的足够好完全如 DOS 与 Windows 的‘足够好’一样。不是什么伟大的技术,只是普遍适用而已,同时它对人们来说运行良好,看着十分熟悉。但是很少有人以此为傲,或者对其有兴奋感。 -Git,从另外方面讲,其身后有一些‘UNIX 哲学’。它不是关于UNIX,实质上,是像原始的UNIX,它身后有一个基础的想法。对UNIX来说,最底层的哲学就是,“所有东西只是一个文件”。对Git来说,“则是每个东西仅仅是内容寻址数据库中的一个对像”。 +Git,从另外方面讲,其身后有一些‘UNIX 哲学’。它并不关系到 UNIX,实质上,只是像原始的 UNIX,在它身后有一个基本理念。对 UNIX 来说,最底层的哲学就是,“所有东西只是一个文件”。对 Git 来说,“则是每个东西仅仅是内容寻址数据库中的一个对像”。 -**Q:现在如此多的发行是好事还是坏事?选择是很有意思的,但是没有人需要被选择给撑着。相较于这么多的人每天花费数小时去构建成百上千的发行版,如果人们可以一起来支持少数的发行版(可能每一个有一个人),这样进入企业,接受微软的挑战是不是更容易些呢?对此你怎么看?** +**Q:现在如此多的发行是好事还是坏事?选择是很有意思的,但是没有人想被选择给撑着。相较于这么多的人每天花费数小时去构建成百上千的发行版,如果人们可以一起来支持少数的发行版(可能每一个有一个人),这样进入企业,接受微软的挑战是不是更容易些呢?对此你怎么看?** -Linus:我认为多发行版是开源不可回避的部分。它会造成困惑吗?当然。它会变得低效率吗?是的。但是我喜欢拿它与政治比较:’民主‘也有那些令人困惑的选择,通常没有选择是必须的,或者你‘真正’想要的。而且有时候,如果你不需要担心选举,不同党派和联合等等方面的困惑的话,你可能喜欢事情更加容易一些,更有效率一些。 +Linus:我认为多个发行版是开源不可回避的部分。它会造成困惑吗?当然。它会变得低效率吗?是的。但是我喜欢拿它与政治比较:‘民主’也有那些令人困惑的选择,往往没有任何一个选择是你‘真正’想要的。而且有时候,如果你不需要操心选举、不同党派和联合等等方面的困惑的话,你可能会感觉事情更加容易一些,更有效率一些。 -但是最后我想说,选择可能会导致低效率,但是它也让每个人至少保留了‘所谓的’诚信。我们可能都希望我们的政治家比过去更诚信,我们也希望不同的发行版有一天做出其他的选择,但是没有那种选择的话,事情可能会更糟。 +但是最后我想说,选择可能会导致低效率,但是它也让每个人至少保留了‘所谓的’诚信。我们可能都希望我们的政治家更诚信,我们也希望不同的发行版可以让我们有一天有其他的选择,而如果没有选择的话,事情可能会更糟。 -**Q:为什么你觉得CFS比SD更好?** +**Q:为什么你觉得 CFS 比 SD 更好?** -Linus:一部分原因是我与Ingo[Molnar]工作你很长一段时间,这就是说,我了解他,并且知道他会对发生的任何事情非常负责。那种品质是非常重要的。 +Linus:一部分原因是我与 Ingo [Molnar] 工作过很长一段时间,也就是说,我了解他,并且知道他会对发生的任何问题非常负责。那种品质是非常重要的。 -但是一部分原因就简单的与用户有关。其他地方的大多数人实际上表示CFS比SD好。包括许多3D游戏方面(这是人们声称SD最强的一点)。 +但是一部分原因就简单的与用户有关。其他地方的大多数人实际上表示 CFS 比 SD 好。包括许多 3D 游戏方面(这是人们声称SD 最强的一点)。 -同时,尽管如此,我认为并不是代码的任何一段都十分‘完美’。最好的情况是想成为SD支持者的人会努力提高SD,使得平衡会倾覆其他方面 — 而我们会保持两个阵营都尝试有趣的事情,因为内部的竞争会刺激他们。 +同时,尽管如此,我认为并不是任何一段代码都十分‘完美’。最好的情况是,想成为 SD 支持者的人会努力提高 SD,从而通过其它方式取得了平衡 — 而我们会保持两个阵营都尝试有趣的事情,因为内部的竞争会刺激他们。 -**Q:在Google一次关于Git的访谈中,有人问你如何会停止六个月的商业活动,为git编写了一个目前由一些中心化的东西和交易管理的,特别庞大的代码基础。你对此的回答是什么?** +**Q:在 Google 一次关于 Git 的访谈中,有人问你如何将当前集中存放的超大代码库迁移到 git 上,而不用将开发工作停止六个月。你对此的回答是什么?** -Linus:啊哈。那个问题我在现场没有听清楚(在录制结果里,问题会听得更清楚些),当我回头去听录制的音频,注意到了我没有回答他的问题,但是我觉得这问题他问过。 +Linus:啊哈。那个问题我在现场没有听清楚(在录音里,问题会听得更清楚些),当我回头去听录制的音频,注意到了我没有回答他的问题,但是我觉得这问题他问过。 -无论如何,我们确实有很多导入的工具,所以你实际上可以仅仅是从任何其他的早期SCM导入一个大工程到git里,但问题显然不是经常以导入动作本身结束,而是需要‘习惯’这种新模式! +无论如何,我们确实有很多导入的工具,所以你实际上可以仅仅是将一个大的项目从任何其他的早期 SCM 导入到 git 里,但问题显然不是经常以导入动作本身结束,而是需要‘习惯’这种新模式! -坦白来说,我认为关于‘习惯它’没有任何其他答案,而只是去开始使用和尝试它。显然,你不想以导入你现有的最大且最中心的项目为开端;那确实会使每件事出现停顿,然后使得每个人都很不高兴。 +坦白来说,我认为关于‘习惯它’没有任何其他答案,而只是去开始使用和尝试它。显然,你不想以导入你现有的最大且最重要的项目为开端;那确实会使每件事出现停顿,然后使得每个人都很不高兴。 -所以没有理智健全的人会一夜之间拥护将一切移到git上去,并强迫人们改变他们的环境。是的,你需要以公司里的小项目开始,可能是一些一个组主要控制和维护的项目,然后开始转移其到git。这是你能让人们习惯这种模式的方式,你开始有一个核心的组,知道git如何工作,如何在公司里面使用它。 +所以没有任何理智健全的人会拥护在一夜之间将一切移到 git 上去,并强迫人们改变他们的环境。是的,你需要以公司里的小项目开始,可能是一些由一个小组主要控制和维护的项目,然后开始转移其到 git。这是你能让人们习惯这种模式的方式,你应该以一个核心的组开始,他们知道 git 如何工作,如何在公司里面使用它。 -接着,你就会铺展开来。并不一次就位。你会导入越来越多的项目 — 如果在你公司里你有‘一个大仓库’;你也会差不多确定将那个仓库作为许多模块的集合,因为让每个人去检查每件事不是一个可执行的工作模型(除非‘每件事’并不非常大)。 +接着,你就会铺展开来。并不需要一次到位。你会导入越来越多的项目 — 甚至是在你公司里采用‘单一大型仓库’模式;那个仓库基本上是作为许多模块的集合,因为让每个人去检查每件事不是一个可执行的工作模型(除非这个‘每件事’并不非常大)。 -所以,你基本上有一次转移了一个模块,直到你发现你使用git如此舒服的那个点,你可以移植余下的所有(或者‘余下’太传统了,没人会关心)。 +所以,你基本上有一次转移一个模块,直到你发现你使用git如此舒服的那个点,你可以移植余下的所有(或者‘余下’的太旧了,没有人用了)。 -Git最赞的一个功能是,它实际上可以同很多其他SCM相处很好。这就是很多git用户使用它的时候:‘他们’可能只是使用git,但有时候与他们一起工作的人并没有发现,因为他们看到git的结果,联想到一些传统的SCM上去。 +git 最赞的一个功能是,它实际上可以同很多其他 SCM(源代码控制管理)相处很好。这就是很多git用户使用它的时候:‘他们’可能只是使用 git ,但有时候与他们一起工作的人并没有发现,因为他们看到git的结果,联想到一些传统的 SCM 上去。 -**Q:在Transmeta,他们曾经经历过用另外的架构设置部署吗?[Transmeta Crusoe的芯片看起来像一个非常软的CPU — 提到一台Burroughs B1000的解释机器,这实际上部署了多台虚拟机。有一台是用于系统软件,一台是用于Cobol,一台用于Fortran;如果上述正确,那么一个人可以部署Burroughs 6/7000或者HP3000,如栈结构一样,在芯片上或者一个适合JVM的结构集合等等。]** +**Q:在 Transmeta(全美达)上他们有备用指令集实现的经验吗?[Transmeta Crusoe 芯片看起来像一个非常弱的 CPU — 记得有一台 Burroughs B1000 的解释器,它实际上实现了多个虚拟机。有一台是用于系统软件,一台是用于 Cobol,一台用于 Fortran;如果没错的话,那么一个人可以在芯片上实现 Burroughs 6/7000 或者 HP3000 类似的堆栈架构或适用于 JVM 的指令集,等等。]** -Linus:我们确实有一些备选的结构集合,我仍然不打算谈论这个,我可以说我们已经做了一个混合结构集合的公开证明。我们有一个技术宝箱,在那里你同时可以跑x86结构和Java字节码(实际上,它是一个轻量的扩展pico—java,iirc)。 +Linus:我们确实有一些备选的结构集合,我仍然不打算谈论这个,我可以说我们已经做了一个混合结构集合的公开演示。我们有一个技术展示,在那里你同时可以跑x86结构和 Java 字节码(实际上,它是一个轻量的扩展 pico—java,iirc)。 -(选择DOOM的原因仅仅是其源代码可用,并且游戏的核心部分非常小,足以很容易拿它来做一个验证 — 而且它也显然看起来十分有趣。) +我想我们展示的这个应用会在 Linux 上运行 DOOM,这里 Linux 的部分是一个完全标准 x86 发行版。但是 DOOM 的二进制程序是一个 test 编译版本,它实际上编译为 pico-java 代码。而 CPU 最终以相同的方式来运行它们——从 JIT 到原生 VLIW 指令集。 -有更多的事情是在内部运作,但是我不能谈论他们。而且实际上,就我个人而言,对Java不怎么感冒。 +(选择 DOOM 的原因仅仅是其源代码可用,并且游戏的核心部分非常小,足以很容易拿它来做一个验证 — 而且它也显然看起来十分有趣。) -**Q:386BSD衍生了NetBSD,FreeBSD和OpenBSD,在Linux出现之前已经发展不错了,但是Linux传播比386BSD及其衍生者更为广泛。这在多大程度上左右你对证书的选择,和你选择的发展过程?你不认为比起GPLv2来,是GPLv3保护了自由,孕育了Linux比BSD更好,直到现在?** +有更多的事情是在内部运作,但是我不能谈论他们。而且实际上,就我个人而言,对 Java 不怎么感冒。 -Linus: +**Q:386BSD 衍生了 NetBSD,FreeBSD 和 OpenBSD,在 Linux 出现之前已经发展不错了,但是 Linux 传播比 386BSD 及其衍生者更为广泛。这在多大程度上左右你对许可证的选择,这个选择的发展过程是怎样的?你不认为比起 GPLv2 来,是 GPLv3 保护了自由,迄今为止,让 Linux 比 BSD 变得更好?** + +Linus:我认为这是一个许可证问题和一个社区及人格问题。BSD 的许可证总是鼓励分叉,但是这也意味着,如果某些人取得了成功并做了商业性的分叉,他并不需要将将他的修改返回来。因此,实际上并不会真的发生这种事情(以 BSD 而言,如 BSDi),人们并不真的彼此‘信任’。 + +相比之下,GPLv2 也鼓励分叉,但是它不仅仅鼓励分叉出去,它也鼓励(并‘要求’)能够融合回来。所以,我们现在达到了新的层次的信任:你‘知道’每个人都被许可证所约束,所以不会试着从你这里白白占走好处。 + +所以,在我看来,GPLv2 作为许可证来说,它允许人们在要求总是回馈贡献的前提下,在另外的方面取得了最大可能的自由。没有人能阻止你对源代码的改进。 + +那么,BSD 许可证是更‘自由’的吗?是的,毫无疑问。但是我不会在我在意的任何项目里面使用 BSD 许可证,因为我不仅仅想要自由,我也想要信任,可以让我总是能使用其他人为我的项目所写的代码。 + +所以对于我来说,GPLv2 最终在‘尽可能自由’上取得了完美的平衡,这样,我们做到了让每个人都能信任,他们总是可以取得源代码并使用它。 + +这就是为什么我认为 GPLv3 最终并没多大意思,它不再是那种‘返回源代码’的信任;它退化成了‘我写了这些代码,所以我能控制你如何使用它’。 + +换言之,我只是觉得 GPLv3 太狭隘和自私了。我认为 GPLv2 在‘自由’和‘信任’之间取得伟大的平衡。它不如 BSD 许可证自由,但是它让你安心回馈,而且它符合我认为的‘以德报德’:我给你源代码,你也回馈我源代码。 + +而 GPLv3 试着控制源代码的‘使用’。现在它就是“我给你我的源代码,如果你使用它的话,你最好可以让我对你的设备动手动脚”,看见了没?在我看来,不但小气,而且小心眼。 + +**Q:-rt 树的功能正在缓慢而稳定地逐渐集成到主线代码中。你当前对合并剩余的 -rt 树到主线代码的看法是什么?(我说的不是 CFS)** + +Linus: 我不能保证来自 -rt 的一切‘都’会被合并进入标准内核(有一些部分肯定不适合常规的内核),不过是的,这些年来我们实际上将它的大部分都集成进去了,剩下的部分最终以后也会合并进去。 + +我提倡高效工作,但是我同时也很保守。我退回了一些激进的合并请求,只是因为我需要确保它们对所有人都有意义,不仅仅是用于极端情况下的实时环境,而且也对并不需要这种环境的‘普通’用户有用。这解释了为什么这个过程相当缓慢却稳定不断地合并代码,因为它需要足够稳定和有意义。 + +顺便说一句,这不仅仅是针对 -rt ,它也在许多开发中出现。-rt 出现这种情况是因为它是更‘直接’的内核项目,而且也是因为它的一个主要开发者也直接涉及到了普通的内核开发。通常其它功能的迁移(安全、虚拟内核变化、虚拟化,等等)也遵循类似的方式:他们针对特定的环境进行开发,然后这些功能片段缓慢而稳步地合并到标准内核。 + + +**Q:我对 Linux 内核支持的文件系统的发展很感兴趣。你觉得 Reiser4、XFS4、ZFS 以及 Oracle 发起那个新项目那个更有前途?这些天 ZFS 有不少新闻,Reiser4 也发布了很不错的性能基准测试,XFS4 正紧随其后,而 Oracle 发布的那个也有很多像 Sun 的 ZFS 一样的特性。我们将走向何方呢?以你的观点来看,哪个文件系统更有前途?** + +Linus: 实际上,就在昨天我们发现了一个 git 的性能问题,有一个用户他采用 ZFS 要比 UFS 慢一个数量级(不是在 Linux 下,git 已经得到了许多关注,甚至是在内核开发团队之外)。所以,我认为许多‘新文件系统’的拥护者部分原因是因为他们了解到旧文件系统的不足,然后(有点不切实际地)期望一个‘崭新的、改进的’文件系统能使一切都完美。 + +最后,这是一个永无止境的领域,看看谁是最终的赢家——也许并不需要(看起来不需要)一个赢家。几乎总是这样,对文件系统的选择最终取决于负载和环境。 + +相比你提到的这些文件系统,我个人对基于闪存的硬盘很快就可以供甚至是‘普通’用户使用的这个事实更感到兴奋。当然,它们仍然很昂贵(而且相当的小),但是基于闪存的存储和旋转介质的性能完全不可同日而语,我怀疑它们最终将对文件系统的设计有巨大的影响。而现在,多数文件系统的设计都是在考虑如何处理旋转介质的延迟。 + +**Q:操作系统变得越来越不重要。你说过好几次用户根本不应该‘看见’操作系统。应用更为重要。基于浏览器的应用,如 Google 的基本办公软件正在发挥影响力。你认为操作系统将走向何方?** + +Linus:我并不真的相信‘浏览器 OS’,因为我认为人们总是需要在本地做一些事情。也许是因为安全,或者仅仅是因为隐私的原因。而且当到处可以接入时,它也并不是‘无处不在’。 + +所以我认为,整个‘Web OS’这件事有一部分是真实的,但是另外一部分人们也许忘记了操作系统已经存在了几十年,它已经相当稳定,而且它的发展是有目共睹的。人们真的不应该期望操作系统有魔法般的变化:人们并不能回到‘傻傻的’六十年代,甚至连硬件也和过去的‘那个’完全不同了! + +所以,别指望一场革命。我认为操作系统将更多继续它们所做哪些事情,当然,我们也会进步,但是我不认为会从根本上改变。也许会发生根本性改变的是界面和操作系统顶层的哪些东西(当然,操作系统下面的硬件也会继续进步),这显然才是人们所关心的。 + +至于操作系统?它显然是应该尽可能隐藏起来的东西。你真的不应该在意它,除非你非常想知道在机器里面真正在做什么。 + +**Q:最近我听说,你正在使用一台 PPC G4/5 作为个人计算机,你使用它来做什么?为什么呢?** + +Linus:我最终放弃了那台 PowerPC,因为没有人能在这台工作站上做的更多,特别是,自从 x86-64 开始变得越来越强大了。所以这些天,我在用一台标准的 PC,里面是一个普通的 Core 2 Duo CPU。 + +在其它架构下运行是非常有趣的(我把 alpha 作为我的主要架构运行了好几年,所以这并不是第一次),但是这种 CPU 得当成商品买得到才行。我认为,唯一能取代 x86 架构的将来自以下,比如也许我们将来十年并不需要使用 x86 作为我们的主要架构,我认为也许是 ARM,这得益于移动设备市场。 + +**Q:Linux 对你意味着什么?一种业余爱好、哲学、人生意义、工作、最好的操作系统,还是什么?** + +Linus:它是所有的这一切。它是爱好,而且是具有深刻意义的爱好。最好的爱好是你‘真的’非常在意它。这些日子里,它显示也是我的工作,我非常高兴工作和兴趣能合二为一。 + +我不了解所谓的‘哲学’,我并不真的是因为深层次的道德或哲学的原因才做的 Linux (字面上的做是因为它有趣),但是可以肯定的是,我欣赏我认为开源为何这么棒的深层原因。所以我并不是因为什么高大上的理由做 Linux 的,而且我不能诚恳地说是它在激励我,但是我最终会思考为什么会这样。 + +**Q:微软的‘黑衣人’有没有和你交谈过?** + +Linus:我从来没有真正和微软交谈过,没有。我偶尔会和一些微软的人出现再同一个会议上(我比以前参加的会议更多了),但是我从来和他们没有任何关系。我认为彼此都很谨慎吧。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxveda.com/2015/06/17/what-happens-to-linux-after-linus/ + +作者:[Swapnil Bhartiya][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo),[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxveda.com/author/arnieswap/ From e6fc2faaa05c95cc508faf9ceb8356c0d6645b08 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Sun, 5 Jul 2015 17:37:27 +0800 Subject: [PATCH 1329/2517] Translating by ZTinoZ --- ...re Made Easy with these Dedicated Tools.md | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md index 8e393b1722..fb0159ca6a 100644 --- a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md +++ b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md @@ -14,9 +14,9 @@ ![Shutter in action](http://www.linuxlinks.com/portal/content/reviews/Graphics/Screenshot-Shutter1.png) -Shutter是一款功能丰富的截图软件。你能为你的特殊区域、窗口、整个屏幕甚至是网站截图 - 然后在其中应用不用的效果,比如用高亮的点在上面绘图,然后上传至一个图片托管网站,一切尽在这个小窗口内。 +Shutter是一款功能丰富的截图软件。你可以给你的特殊区域、窗口、整个屏幕甚至是网站截图 - 在其中应用不用的效果,比如用高亮的点在上面绘图,然后上传至一个图片托管网站,一切尽在这个小窗口内。 -包含特性: +包含特性: - 截图范围: @@ -38,7 +38,7 @@ Shutter是一款功能丰富的截图软件。你能为你的特殊区域、窗 - 删除截图 - 重命名文件 - 直接上传你的文件至图像托管网站(比如http://ubuntu-pics.de),取回所有需要的图像并将它们与其他人分享 -- 用内嵌的绘画工具直接编辑截图 +- 用内置的绘画工具直接编辑截图 - 主页: [shutter-project.org][1] - 开发者: Mario Kemper和Shutter团队 @@ -51,11 +51,11 @@ Shutter是一款功能丰富的截图软件。你能为你的特殊区域、窗 ![HotShots in action](http://www.linuxlinks.com/portal/content/reviews/Graphics/Screenshot-HotShots.png) -HotShots is an application for capturing screens and saving them in a variety of image formats as well as adding annotations and graphical data (arrows, lines, texts, ...). +HotShots是一款捕捉屏幕并能以各种图片格式保存的软件,同时也能添加注释和图形数据(箭头、行、文本, ...)。 -You can also upload your creations to the web (FTP/some web services). HotShots is written with Qt. +你也可以把你的作品上传到网上(FTP/一些web服务),HotShots是用Qt开发而成的。 -HotShots is not available in Ubuntu's Software Center. But it's easy to install by typing at the command line: +HotShots无法从Ubuntu的Software Center中获取,不过用以下命令可以轻松地来安装它: sudo add-apt-repository ppa:ubuntuhandbook1/apps @@ -63,21 +63,21 @@ HotShots is not available in Ubuntu's Software Center. But it's easy to install sudo apt-get install hotshots -Features include: +包含特性: -- Simple to use -- Full featured -- Built-in editor -- Hotkeys -- Built-in magnification -- Freehand and multi-screen capture -- Supported Output Formats: Black & Whte (bw), Encapsulated PostScript (eps, epsf), Encapsulated PostScript Interchange (epsi), OpenEXR (exr), PC Paintbrush Exchange (pcx), Photoshop Document (psd), ras, rgb, rgba, Irix RGB (sgi), Truevision Targa (tga), eXperimental Computing Facility (xcf), Windows Bitmap (bmp), DirectDraw Surface (dds), Graphic Interchange Format (gif), Icon Image (ico), Joint Photographic Experts Group 2000 (jp2), Joint Photographic Experts Group (jpeg, jpg), Multiple-image Network Graphics (mng), Portable Pixmap (ppm), Scalable Vector Graphics (svg), svgz, Tagged Image File Format (tif, tiff), webp, X11 Bitmap (xbm), X11 Pixmap (xpm), and Khoros Visualization (xv) -- Internationalization support: Basque, Chinese, Czech, French, Galician, German, Greek, Italian, Japanese, Lithuanian, Polish, Portuguese, Romanian, Russian, Serbian, Singhalese, Slovak, Spanish, Turkish, Ukrainian, and Vietnamese +- 简单易用 +- 全功能使用 +- 嵌入式编辑器 +- 热键 +- 内置放大功能 +- 徒手和多屏捕捉 +- 支持输出格式:Black & Whte (bw), Encapsulated PostScript (eps, epsf), Encapsulated PostScript Interchange (epsi), OpenEXR (exr), PC Paintbrush Exchange (pcx), Photoshop Document (psd), ras, rgb, rgba, Irix RGB (sgi), Truevision Targa (tga), eXperimental Computing Facility (xcf), Windows Bitmap (bmp), DirectDraw Surface (dds), Graphic Interchange Format (gif), Icon Image (ico), Joint Photographic Experts Group 2000 (jp2), Joint Photographic Experts Group (jpeg, jpg), Multiple-image Network Graphics (mng), Portable Pixmap (ppm), Scalable Vector Graphics (svg), svgz, Tagged Image File Format (tif, tiff), webp, X11 Bitmap (xbm), X11 Pixmap (xpm), and Khoros Visualization (xv) +- 国际化支持:巴斯克语、中文、捷克语、法语、加利西亚语、德语、希腊语、意大利语、日语、立陶宛语、波兰语、葡萄牙语、罗马尼亚语、俄罗斯语、塞尔维亚语、僧伽罗语、斯洛伐克语、西班牙语、土耳其语、乌克兰语和越南语 -- Website: [thehive.xbee.net][2] -- Developer: xbee -- License: GNU GPL v2 -- Version Number: 2.2.0 +- 主页: [thehive.xbee.net][2] +- 开发者 xbee +- 许可证: GNU GPL v2 +- 版本号: 2.2.0 ---------- From 2cd247dafba9fbbebad28326c20f0e05cc94929a Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 5 Jul 2015 21:55:59 +0800 Subject: [PATCH 1330/2517] PUB:20150616 Linux Humor on the Command-line @wwy-hust --- ...0150616 Linux Humor on the Command-line.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename {translated/share => published}/20150616 Linux Humor on the Command-line.md (70%) diff --git a/translated/share/20150616 Linux Humor on the Command-line.md b/published/20150616 Linux Humor on the Command-line.md similarity index 70% rename from translated/share/20150616 Linux Humor on the Command-line.md rename to published/20150616 Linux Humor on the Command-line.md index 41745eba24..e998e31f05 100644 --- a/translated/share/20150616 Linux Humor on the Command-line.md +++ b/published/20150616 Linux Humor on the Command-line.md @@ -1,14 +1,14 @@ Linux命令行中的幽默 ================================================================================ -桌面通常是非常养眼的,它增强了可视化的体验,有时也能够增强某些软件的功能,而且让软件变得更有趣。在命令行下工作也不需要总是很严肃,如果您想在命令行下找些乐子,那么有很多命令可以让您展露微笑。 +图形桌面总是很养眼的,它增强了可视化体验,有时也能够提升了某些软件的功能,让软件变得更有趣。但是,在命令行下工作也不需要总是很古板,如果您想在命令行下寻找些乐趣,那么有很多命令给您带来趣味。 -Linux是个有趣的操作系统。它提供大量的小型开源工具,从平淡无奇的软件到稀奇古怪的应用。正是这些工具的质量和可选择性帮助Linux脱颖而出。让我们一起来看看下面这七个小工具吧。 +Linux是个有趣的操作系统。它提供大量的小型开源工具,从平淡无奇的软件到稀奇古怪的应用。正是这些工具的功能和琳琅满目的选择帮助Linux脱颖而出。让我们一起来看看下面这七个小工具吧。 -### lolcat ### +### 七彩虹:lolcat ### ![lolcat](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-lolcat.png) -lolcat是一个连接文件或标准输入到标准输出(类似一般的cat)的程序,它会为输出添加七彩的颜色。 +lolcat是一个用于将文件或标准输入连接到标准输出(类似常见的cat)的程序,但是它会为输出添加七彩的颜色。 lolcat通常和其他诸如toilet或figlet等生成文本的应用结合使用。这个软件不应被误认为是一个或多个猫的图像的宏。 @@ -16,13 +16,13 @@ lolcat由Moe编写。 网址: [github.com][1] -### cowsay ### +### 牛郎的牛:cowsay ### ![cowsay](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-cowsay.png) cowsay是一个可配置的开源软件,它用ASCII码生成奶牛的图片,并可以在对话气泡中显示消息。cowsay是用Perl写的。 -cowsay并不仅仅只能显示奶牛。它能生成预先制作的图片或者其他动物,包括鸭子、考拉、麋鹿、小马、绵羊、剑龙和火鸡,以及奶酪、雪人和骨架。 +cowsay并不仅仅只能显示奶牛。它能生成预先制作的图片或者其他动物,包括鸭子、考拉、麋鹿、小马、绵羊、剑龙和火鸡,以及奶酪、雪人和骷髅。 有一个叫cowthink的应用,与对话的气泡不同,它能在生成奶牛的同时生成思考的气泡。 @@ -31,11 +31,11 @@ cowsay并不仅仅只能显示奶牛。它能生成预先制作的图片或者 - 让脚本变得更有趣 - Borg模式 - 可以更改奶牛看起来的样子,比如让奶牛看起来贪婪、偏执、固执、疲倦、古怪、年轻等 -- 支持xcowsay的变形 +- 图形版变体:xcowsay 网址: [nog.net][2] -### doge ### +### 傻狗:doge ### ![doge](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-doge.png) @@ -45,19 +45,19 @@ doge是一个在2013年非常流行的互联网潮流元素(梗)。这个梗 - 随机的用不同的颜色和蹩脚的英语写下随机的句子 - 终端中的柴犬效果非常棒 -- 获得系统数据,比如主机名、运行中的程序、当前用户、$EDITOR -- 如果您安装了lolcat,您可以用它作为点缀: while true; do doge | lolcat -a -d 100 -s 100 -p 1; done -- 标准输入支持: ls /usr/bin | doge 将打印一些/usr/bin下的可执行文件。哇噢,还有许多命令行的开关可以过滤词语以及控制词语的频率。 +- 可以获得系统数据,比如主机名、运行中的程序、当前用户、$EDITOR +- 如果您安装了lolcat,您可以用它作为点缀: `while true; do doge | lolcat -a -d 100 -s 100 -p 1; done` +- 支持标准输入: `ls /usr/bin | doge` 将显示一些 /usr/bin下的可执行文件。哇噢,还有许多命令行的开关可以过滤词语以及控制词语的频率。 网址: [github.com/thiderman/doge][3] -### ASCIIQuarium ### +### 水族箱:ASCIIQuarium ### ![Asciiquarium](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-Asciiquarium.png) ASCIIQuarium是一个以ASCII码方式画出的水族馆/海洋动画。享受生活在您电脑中水底的奇妙生物吧。 -想运行ASCIIQuarium,您需要安装Perl的curses包以及Term::Animation模块。请使用sudo apt-get install libcurses-perl来安装前者,使用sudo cpan Term::Animation来安装后者。两个命令都需要在终端中运行。 +想运行ASCIIQuarium,您需要安装Perl的curses包以及Term::Animation模块。请使用`sudo apt-get install libcurses-perl`来安装前者,使用sudo cpan Term::Animation来安装后者。两个命令都需要在终端中运行。 功能包括: @@ -67,13 +67,13 @@ ASCIIQuarium是一个以ASCII码方式画出的水族馆/海洋动画。享受 网址: [www.robobunny.com][4] -### sl - 蒸汽机车 ### +### 蒸汽机车:sl ### ![sl](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-sl.png) sl是一个有趣的终端应用,它为那些意外的错将ls输成sl的用户显示一个动画。 -我打字通常非常草率,更喜欢速度而不是准确性。但错别字在命令行中是非常危险的。因此sl作为一个实际的提醒者,提醒我们注意错误输入的这种坏习惯。它总是会让人咯咯的笑。 +我打字通常非常草率,更喜欢速度而不是准确性。但错别字在命令行中是非常危险的。因此sl扮演了一个提醒者,提醒我们注意错误输入的这种坏习惯。它总是会让人咯咯的笑。 功能包括: @@ -83,7 +83,7 @@ sl是一个有趣的终端应用,它为那些意外的错将ls输成sl的用 网址: [github.com/mtoyoda/sl][5] -### aafire ### +### 火焰:aafire ### ![aafire](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-aafire.png) @@ -91,11 +91,11 @@ aafire在终端中显示燃烧的ASCII火焰。它展示了aalib库的强大能 网址: [aa-project.sourceforge.net/aalib][6] -### CMatrix ### +### 矩阵:CMatrix ### ![CMatrix](http://www.linuxlinks.com/portal/content/reviews/Misc/Screenshot-CMatrix.png) -CMatrix是一个基于ncurses的程序,它模拟《黑客帝国》(一部电影)中的画面。如果您在一个山洞里度过了上个15年,那么您可能不知道黑客帝国是1999年的美国科幻电影,主角为 Keanu Reeves, Laurence Fishburne, Carrie-Anne Moss, Hugo Weaving和 Joe Pantoliano。 +CMatrix是一个基于ncurses的程序,它模拟《黑客帝国》(一部电影)中的画面。如果您在一个山洞里度过了上个15年,那么您可能不知道这部1999年的美国科幻电影,主角为 Keanu Reeves, Laurence Fishburne, Carrie-Anne Moss, Hugo Weaving和 Joe Pantoliano。 它可以在终端设置为132x300的情况下工作,并且可以以同样的速率进行滚动或者以用户定义的速度进行异步的滚动。 From 3cc959afc4a5737a03946e83c44fb26347d2c1d6 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 5 Jul 2015 22:06:26 +0800 Subject: [PATCH 1331/2517] PUB:20150604 How to access SQLite database in Perl @geekpi --- ...4 How to access SQLite database in Perl.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150604 How to access SQLite database in Perl.md (84%) diff --git a/translated/tech/20150604 How to access SQLite database in Perl.md b/published/20150604 How to access SQLite database in Perl.md similarity index 84% rename from translated/tech/20150604 How to access SQLite database in Perl.md rename to published/20150604 How to access SQLite database in Perl.md index 76cc1f01f0..82283b9857 100644 --- a/translated/tech/20150604 How to access SQLite database in Perl.md +++ b/published/20150604 How to access SQLite database in Perl.md @@ -1,6 +1,6 @@ 如何用Perl访问SQLite数据库 ================================================================================ -SQLite是一个零配置,无服务端,基于文件的事务文件系统。由于它的轻量级,自包含和紧凑的设计,所以当你想要集成数据库到你的程序中时,SQLite是一个非常流行的选择。在这篇文章中,我会展示如何用Perl脚本来创建和访问SQLite数据库。我演示的Perl代码片段是完整的,所以你可以很简单地修改并集成到你的项目中。 +SQLite是一个零配置、无服务端、基于文件的事务型数据库系统。由于它的轻量级,自包含和紧凑的设计,所以当你想要集成数据库到你的程序中时,SQLite是一个非常不错的选择。在这篇文章中,我会展示如何用Perl脚本来创建和访问SQLite数据库。我演示的Perl代码片段是完整的,所以你可以很简单地修改并集成到你的项目中。 ![](https://farm1.staticflickr.com/552/18444614631_9e7fce8243_c.jpg) @@ -44,25 +44,27 @@ SQLite是一个零配置,无服务端,基于文件的事务文件系统。 - 在表中更新行 - 在表中删除行 +- + use DBI; use strict; - # define database name and driver + # 定义数据库名称和驱动 my $driver = "SQLite"; my $db_name = "xmodulo.db"; my $dbd = "DBI:$driver:dbname=$db_name"; - # sqlite does not have a notion of username/password + # sqlite 没有用户名密码的概念 my $username = ""; my $password = ""; - # create and connect to a database. - # this will create a file named xmodulo.db + # 创建并连接到数据库 + # 以下创建的文件名为 xmodulo.db my $dbh = DBI->connect($dbd, $username, $password, { RaiseError => 1 }) or die $DBI::errstr; print STDERR "Database opened successfully\n"; - # create a table + # 创建表 my $stmt = qq(CREATE TABLE IF NOT EXISTS NETWORK (ID INTEGER PRIMARY KEY AUTOINCREMENT, HOSTNAME TEXT NOT NULL, @@ -76,7 +78,7 @@ SQLite是一个零配置,无服务端,基于文件的事务文件系统。 print STDERR "Table created successfully\n"; } - # insert three rows into the table + # 插入三行到表中 $stmt = qq(INSERT INTO NETWORK (HOSTNAME,IPADDRESS,OS,CPULOAD) VALUES ('xmodulo', 16843009, 'Ubuntu 14.10', 0.0)); $ret = $dbh->do($stmt) or die $DBI::errstr; @@ -89,7 +91,7 @@ SQLite是一个零配置,无服务端,基于文件的事务文件系统。 VALUES ('puppy', 16843011, 'Ubuntu 14.10', 0.0)); $ret = $dbh->do($stmt) or die $DBI::errstr; - # search and iterate row(s) in the table + # 在表中检索行 $stmt = qq(SELECT id, hostname, os, cpuload from NETWORK;); my $obj = $dbh->prepare($stmt); $ret = $obj->execute() or die $DBI::errstr; @@ -104,7 +106,7 @@ SQLite是一个零配置,无服务端,基于文件的事务文件系统。 print "CPULOAD: ". $row[3] ."\n\n"; } - # update specific row(s) in the table + # 更新表中的某行 $stmt = qq(UPDATE NETWORK set CPULOAD = 50 where OS='Ubuntu 14.10';); $ret = $dbh->do($stmt) or die $DBI::errstr; @@ -114,7 +116,7 @@ SQLite是一个零配置,无服务端,基于文件的事务文件系统。 print STDERR "A total of $ret rows updated\n"; } - # delete specific row(s) from the table + # 从表中删除某行 $stmt = qq(DELETE from NETWORK where ID=2;); $ret = $dbh->do($stmt) or die $DBI::errstr; @@ -124,7 +126,7 @@ SQLite是一个零配置,无服务端,基于文件的事务文件系统。 print STDERR "A total of $ret rows deleted\n"; } - # quit the database + # 断开数据库连接 $dbh->disconnect(); print STDERR "Exit the database\n"; @@ -164,7 +166,7 @@ via: http://xmodulo.com/access-sqlite-database-perl.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 76e531461d601c4c113ef0798f23aae0dccb0bd8 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 5 Jul 2015 22:26:04 +0800 Subject: [PATCH 1332/2517] PUB:20150610 watch--Repeat Linux or Unix Commands Regular Intervals @geekpi --- ...inux or Unix Commands Regular Intervals.md | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) rename {translated/tech => published}/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md (61%) diff --git a/translated/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md b/published/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md similarity index 61% rename from translated/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md rename to published/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md index f5e395c278..b537db3854 100644 --- a/translated/tech/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md +++ b/published/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md @@ -1,6 +1,6 @@ -watch - 定期重复Linux / Unix命令 +watch:定期重复Linux / Unix命令 ================================================================================ -服务器管理员需要维护系统并保持更新和安全。每天需要尝试大量的指令。一些其他的活动存储在日志中。这些日志定期地更新。为了检车这些更新,需要重复地执行命令。比如,为了读取一个文件需要使用head、tail、cat等命令。这些命令需要重读地执行。watch命令可以用于定期地执行一个命令。 +服务器管理员需要维护系统并保持更新和安全。每天需要运行大量的指令。有些系统进程会记录日志。这些日志不断更新。为了检查这些更新,需要重复地执行命令。比如,为了读取一个日志文件需要使用head、tail、cat等命令。这些命令需要重复地执行。而watch命令可以用于定期地执行一个命令。 ### Watch 命令 ### @@ -8,45 +8,45 @@ watch是一个简单的命令,只有几个选项。watch命令的基本语法 watch [-dhvt] [-n ] [--differences[=cumulative]] [--help] [--interval=] [--no-title] [--version] -watch命令默认每隔2秒执行后面的命令。这个时间根据的是命令执行结束到上次执行的间隔来算的。比如,watch命令可以用于监测日志更新,更新时在文件的后面追加新行,因此tail命令可以用来检测文件的更新。这个命令会持续地运行直到你按下 CTRL + C回到提示符。 +watch命令默认每隔2秒执行后面参数给出的命令。这个时间根据的是命令执行结束到上次执行的间隔来算的。比如,watch命令可以用于监测日志更新,更新是在文件的后面追加新的内容,因此可以用tail命令来检测文件的更新(LCTT 译注:可以直接使用 `tail -f` 主动跟踪某个文件的更新,而不用使用 watch。)。这个命令会持续地运行直到你按下 `CTRL + C`回到提示符。 ### 例子 ### -> 每两秒监测 errors/notices/warning 生成的情况。 +每两秒监测 errors/notices/warning 生成的情况。 watch tail /var/log/messages ![tail messages](http://blog.linoxide.com/wp-content/uploads/2015/06/1.png) -> 用指定的时间监测磁盘的使用率。 +按指定的时间间隔监测磁盘的使用率。 watch df -h ![df -h](http://blog.linoxide.com/wp-content/uploads/2015/06/2.png) -> 对磁盘管理员而言关注高I/O等待导致的磁盘操作尤其是mysql事务是很重要的。 +对磁盘管理员而言,关注高I/O等待导致的磁盘操作尤其是mysql事务是很重要的。 watch mysqladmin processlist ![processlist](http://blog.linoxide.com/wp-content/uploads/2015/06/3.png) -> 监测服务器负载和运行时间。 +监测服务器负载和运行时间。 watch uptime ![uptime](http://blog.linoxide.com/wp-content/uploads/2015/06/10.png) -> 检测exim排队给用户发送通知队列的大小。 +监测exim给用户发送通知的队列大小。 watch exim -bpc ![exim -bpc](http://blog.linoxide.com/wp-content/uploads/2015/06/9.png) -### 1) 掩饰循环 ### +### 1) 指定延迟 ### watch [-n ] -命令默认运行的间隔用-n改变,下面的命令会在5秒后运行后面的命令: +命令默认运行的时间间隔可用-n改变,下面的命令会在5秒后运行后面的命令: watch -n 5 date @@ -58,13 +58,11 @@ watch命令默认每隔2秒执行后面的命令。这个时间根据的是命 watch [-d or --differences[=cumulative]] -#### 例子 1 #### - -用下面的命令连续地输出时间病观察高亮出来的不同部分。 +例子 1,用下面的命令连续地输出时间并观察高亮出来的不同部分。 watch -n 15 -d date -第一次执行date的输出会被捕捉,15后会会重复运行命令。 +第一次执行date的输出会被记录,15秒后会重复运行命令。 ![Difference A](http://blog.linoxide.com/wp-content/uploads/2015/06/6.png) @@ -72,9 +70,7 @@ watch命令默认每隔2秒执行后面的命令。这个时间根据的是命 ![Difference A](http://blog.linoxide.com/wp-content/uploads/2015/06/6b.png) -#### 例子 2 #### - -让我们来体验一下两个连续的“uptime”命令输出的不同。 +例子 2,让我们来体验一下两个连续的“uptime”命令输出的不同。 watch -n 20 -d uptime @@ -112,13 +108,13 @@ watch命令默认每隔2秒执行后面的命令。这个时间根据的是命 ![version](http://blog.linoxide.com/wp-content/uploads/2015/06/11.png) -**问题** +**不足** 不幸的是,在终端大小调整时,屏幕不能在下次运行前重画。所有用--difference高亮的内容也会在更新时丢失。 ### 总结 ### -watch对系统管理员而言是一个非常强大的工具因为它可以用于监控、日志、运维、性能和系统运行时的吞吐量。人们可以非常简单地格式化和推延watch的输出。任何Linux命令/程序或脚本可以按照所需监测和连续输出。 +watch对系统管理员而言是一个非常强大的工具,因为它可以用于监控、日志、运维、性能和系统运行时的吞吐量。人们可以非常简单地格式化和推延watch的输出。任何Linux命令/程序或脚本可以按照所需监测和连续输出。 -------------------------------------------------------------------------------- @@ -126,7 +122,7 @@ via: http://linoxide.com/linux-command/linux-watch-command/ 作者:[Aun Raza][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 08bddde2f878cc986d61456a921eb11feee9adf8 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 5 Jul 2015 23:36:38 +0800 Subject: [PATCH 1333/2517] PUB:20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods @NearTan --- ... on Ubuntu 15.04 with Different Methods.md | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) rename {translated/tech => published}/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md (82%) diff --git a/translated/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md b/published/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md similarity index 82% rename from translated/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md rename to published/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md index fbbaecb067..e9de420c7d 100644 --- a/translated/tech/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md +++ b/published/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md @@ -1,11 +1,11 @@ -在Ubuntu下用不同方式安装Node.JS +在Ubuntu下安装Node.JS的不同方式 ================================================================================ -如果你要在Ubuntu 15.04上安装Node.js的话,这篇教程对你来说肯定很重要。Node.js根本上来说就是一个运行在服务端上的封装好了输入输出流的javascript程序。Node.js巧妙的使用单线程的event loop来处理异步IO。同时它在平台层面上,面向系统拥有非常实用的文件读写,网络操作功能。所以这篇文章将展示在Ubuntu 15.04 server上不同的安装Node.Js的方式。 +如果你要在Ubuntu 15.04上安装Node.js的话,这篇教程对你来说肯定很重要。Node.js从本质上来说就是一个运行在服务端上的封装好了输入输出流的javascript程序。Node.js巧妙的使用单线程的事件循环来处理高吞吐量和非阻塞IO。同时它也是一个提供了通过操作系统读写文件和网络操作功能的平台层。所以这篇文章将展示在Ubuntu 15.04 server上不同的安装Node.Js的方式。 ### 安装Node.JS 的方法### -有许多不同的方法安装Node.JS,我们可以选择其一。通过本篇文章我们将手把手带着你在Ubuntu 15.04上安装Node.Js,在此之前请卸载旧版本的包以免发生包冲突。 +有许多安装Node.JS的不同的方法,我们可以选择其一。通过本篇文章我们将手把手带着你在Ubuntu 15.04上安装Node.Js,在此之前请卸载旧版本的包以免发生包冲突。 - 从源代码安装Node.JS - 用包管理器安装Node.JS @@ -14,7 +14,7 @@ ### 1) 从源代码安装Node.JS ### -让我们开始从从源代码安装Node.JS之前,请确认系统上的所有的依赖包都已经更新到最新版本。然后跟着以下步骤来开始安装: +让我们开始从源代码安装Node.JS之前,请确认系统上的所有的依赖包都已经更新到最新版本。然后跟着以下步骤来开始安装: #### 步骤1: 升级系统 #### @@ -33,7 +33,7 @@ #### 步骤3: 开始安装 #### -现在我们进入源代码的目录然后运行.configuration文件 +现在我们进入源代码的目录,然后运行.configure文件 ![NodeJS Configure](http://blog.linoxide.com/wp-content/uploads/2015/06/13.png) @@ -43,9 +43,9 @@ root@ubuntu-15:~/node-v0.12.4# ./configure root@ubuntu-15:~/node-v0.12.4# make install -### 安装后测试 ### +#### 安装后测试 #### -只要运行一次上面的命令就顺利安装好了Node.JS,现在我们来确认一下版本信息和测试以下Node.JS是否可以运行输出。 +只要运行一下上面的命令就顺利安装好了Node.JS,现在我们来确认一下版本信息和测试以下Node.JS是否可以运行输出。 root@ubuntu-15:~/node-v0.12.4# node -v v0.12.4 @@ -73,7 +73,7 @@ #### 步骤1: 用curl获取源代码 #### -在我们用curl获取源代码之前,我们必须先升级操作系统然后用curl命令获取NodeSource添加到本地仓库。 +在我们用curl获取源代码之前,我们必须先升级操作系统,然后用curl命令获取NodeSource添加到本地仓库。 root@ubuntu-15:~#apt-get update root@ubuntu-15:~# curl -sL https://deb.nodesource.com/setup | sudo bash - @@ -98,14 +98,13 @@ curl将运行以下任务 ![NodeJS Install](http://blog.linoxide.com/wp-content/uploads/2015/06/31.png) -#### STEP 3: Installing Build Essentials Tool #### #### 步骤3: 安装一些必备的工具 #### 通过以下命令来安装编译安装一些我们必需的本地插件。 root@ubuntu-15:~# apt-get install -y build-essential -### 通过Node.JS Shell来测试 ### +#### 通过Node.JS Shell来测试 #### 测试Node.JS的步骤与之前使用源代码安装相似,通过以下node命令来确认Node.JS是否完全安装好: @@ -127,7 +126,7 @@ curl将运行以下任务 > root@ubuntu-15:~# -### 使用NodeJS应用进行简单的测试 ### +#### 使用NodeJS应用进行简单的测试 #### REPL是一个Node.js的shell,任何有效的JavaScript代码都能在REPL下运行通过。所以让我们看看在Node.JS下的REPL是什么样子吧。 @@ -163,9 +162,9 @@ REPL是一个Node.js的shell,任何有效的JavaScript代码都能在REPL下 ![REPL Manual](http://blog.linoxide.com/wp-content/uploads/2015/06/4.png) -### 使用NodeJS的包管理器 ### +#### 使用NodeJS的包管理器 #### -NPM是一个提供给node脚本连续运行的命令行工具,它能通过package.json来安装和管理依赖包。最开始从初始化命令init开始 +NPM是一个提供给node脚本持续生命力的命令行工具,它能通过package.json来安装和管理依赖包。最开始从初始化命令init开始 root@ubuntu-15:~# npm init @@ -192,14 +191,14 @@ clone仓库之后,通过运行.config命令来编译生成完整的安装包 ![Configure Node](http://blog.linoxide.com/wp-content/uploads/2015/06/7.png) -运行make install命令之后耐心等待几分钟,程序将会安装好Node.JS +运行make install命令之后耐心等待几分钟,程序将会安装好Node.JS。 root@ubuntu-15:~/node# make install root@ubuntu-15:~/node# node -v v0.13.0-pre -### 测试Node.JS ### +#### 测试Node.JS #### root@ubuntu-15:~/node# node > a = [1,2,3,4,5,6,7] @@ -217,7 +216,7 @@ clone仓库之后,通过运行.config命令来编译生成完整的安装包 在最后一种方法中我们我们将用NVM来比较容易安装Node.JS。安装和配制Node.JS,这是最好的方法之一,它可以供我们选择要安装的版本。 -在安装之前,请确认本机以前的安装包已经被卸载 +在安装之前,请确认本机以前的安装包已经被卸载。 #### 步骤1: 安装依赖包 #### @@ -230,11 +229,11 @@ clone仓库之后,通过运行.config命令来编译生成完整的安装包 #### 步骤2: 修改Home环境 #### -用curl从NVM下载必需的包到用户的home目录之后,我们需要修改bash的配制文件添加NVM,之后只要重新登录中断或者用如下命令更新即可 +用curl从NVM下载必需的包到用户的home目录之后,我们需要修改bash的配置文件添加NVM,之后只要重新登录中断或者用如下命令更新即可。 root@ubuntu-15:~# source ~/.profile -现在我们可以用NVM来设置默认的NVM的版本或者用如下命令来指定之前版本: +现在我们可以用NVM来设置默认的NVM的版本,或者用如下命令来指定之前版本: root@ubuntu-15:~# nvm ls root@ubuntu-15:~# nvm alias default 0.12.4 @@ -257,7 +256,7 @@ via: http://linoxide.com/ubuntu-how-to/setup-node-js-ubuntu-15-04-different-meth 作者:[Kashif Siddique][a] 译者:[NearTan](https://github.com/NearTan) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From c34296631a8d5bb25ffe05048a5031f498026c42 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 6 Jul 2015 16:16:17 +0800 Subject: [PATCH 1334/2517] =?UTF-8?q?20150706-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20150706 PHP Security.md | 359 ++++++++++++++++++++++++++ 1 file changed, 359 insertions(+) create mode 100644 sources/tech/20150706 PHP Security.md diff --git a/sources/tech/20150706 PHP Security.md b/sources/tech/20150706 PHP Security.md new file mode 100644 index 0000000000..b942069678 --- /dev/null +++ b/sources/tech/20150706 PHP Security.md @@ -0,0 +1,359 @@ +PHP Security +================================================================================ +![](http://www.codeproject.com/KB/PHP/363897/php_security.jpg) + +### Introduction ### + +When offering an Internet service, you must always keep security in mind as you develop your code. It may appear that most PHP scripts aren't sensitive to security concerns; this is mainly due to the large number of inexperienced programmers working in the language. However, there is no reason for you to have an inconsistent security policy based on a rough guess at your code's significance. The moment you put anything financially interesting on your server, it becomes likely that someone will try to casually hack it. Create a forum program or any sort of shopping cart, and the probability of attack rises to a dead certainty. + +### Background ### + +Here are a few general security guidelines for securing your web content: + +#### Don't trust forms #### + +Hacking forms is trivial. Yes, by using a silly JavaScript trick, you may be able to limit your form to allow only the numbers 1 through 5 in a rating field. The moment someone turns JavaScript off in their browser or posts custom form data, your client-side validation flies out the window. + +Users interact with your scripts primarily through form parameters, and therefore they're the biggest security risk. What's the lesson? Always validate the data that gets passed to any PHP script in the PHP script. In this article, we show you how to analyze and protect against cross-site scripting (XSS) attacks, which can hijack your user's credentials (and worse). You'll also see how to prevent the MySQL injection attacks that can taint or destroy your data. + +#### Don't trust users #### + +Assume that every piece of data your website gathers is laden with harmful code. Sanitize every piece, even if you're positive that nobody would ever try to attack your site. + +#### Turn off global variables #### + +The biggest security hole you can have is having the register_globals configuration parameter enabled. Mercifully, it's turned off by default in PHP 4.2 and later. If **register_globals** is on, then you can disable this feature by turning the register_globals variable to Off in your server's php.ini file : + + register_globals = Off + +Novice programmers view registered globals as a convenience, but they don't realize how dangerous this setting is. A server with global variables enabled automatically assigns global variables to any form parameters. For an idea of how this works and why this is dangerous, let's look at an example. + +Let's say that you have a script named process.php that enters form data into your user database. The original form looked like this: + + + +When running process.php, PHP with registered globals enabled places the value of this parameter into the $username variable. This saves some typing over accessing them through **$_POST['username']** or **$_GET['username']**. Unfortunately, this also leaves you open to security problems, because PHP sets a variable for any value sent to the script via a GET or POST parameter, and that is a big problem if you didn't explicitly initialize the variable and you don't want someone to manipulate it. + +Take the script below, for example—if the $authorized variable is true, it shows confidential data to the user. Under normal circumstances, the $authorized variable is set to true only if the user has been properly authenticated via the hypothetical authenticated_user() function. But if you have **register_globals** active, anyone could send a GET parameter such as authorized=1 to override this: + + + +The moral of the story is that you should pull form data from predefined server variables. All data passed on to your web page via a posted form is automatically stored in a large array called $_POST, and all GET data is stored in a large array called **$_GET**. File upload information is stored in a special array called $_FILES. In addition, there is a combined variable called $_REQUEST. + +To access the username field from a POST method form, use **$_POST['username']**. Use **$_GET['username']** if the username is in the URL. If you don't care where the value came from, use **$_REQUEST['username']**. + + + +$_REQUEST is a union of the $_GET, $_POST, and $_COOKIE arrays. If you have two or more values of the same parameter name, be careful of which one PHP uses. The default order is cookie, POST, then GET. + +#### Recommended Security Configuration Options #### + +There are several PHP configuration settings that affect security features. Here are the ones that should obviously be used for production servers: + +- **register_globals** set to off +- **safe_mode** set to off +- **error_reporting** set to off. This is visible error reporting that sends a message to the user's browser if something goes wrong. For production servers, use error logging instead. Development servers can enable error logging as long as they're behind a firewall. +- Disable these functions: system(), exec(), passthru(), shell_exec(), proc_open(), and popen(). +- **open_basedir** set for both the /tmp directory (so that session information can be stored) and the web root so that scripts cannot access files outside a selected area. +- **expose_php** set to off. This feature adds a PHP signature that includes the version number to the Apache headers. +- **allow_url_fopen** set to off. This isn't strictly necessary if you're careful about how you access files in your code—that is, you validate all input parameters. +- **allow_url_include** set to off. There's really no sane reason for anyone to want to access include files via HTTP. + +In general, if you find code that wants to use these features, you shouldn't trust it. Be especially careful of anything that wants to use a function such as system()—it's almost certainly flawed. + +With these settings now behind us, let's look at some specific attacks and the methods that will help you protect your server. + +### SQL Injection Attacks ### + +Because the queries that PHP passes to MySQL databases are written in the powerful SQL programming language, you run the risk of someone attempting an SQL injection attack by using MySQL in web query parameters. By inserting malicious SQL code fragments into form parameters, an attacker attempts to break into (or disable) your server. + +Let's say that you have a form parameter that you eventually place into a variable named $product, and you create some SQL like this: + + $sql = "select * from pinfo where product = '$product'"; + +If that parameter came straight from the form, use database-specific escapes with PHP's native functions, like this: + + $sql = 'Select * from pinfo where product = '"' + mysql_real_escape_string($product) . '"'; + +If you don't, someone might just decide to throw this fragment into the form parameter: + + 39'; DROP pinfo; SELECT 'FOO + +Then the result of $sql is: + + select product from pinfo where product = '39'; DROP pinfo; SELECT 'FOO' + +Because the semicolon is MySQL's statement delimiter, the database processes these three statements: + + select * from pinfo where product = '39' + DROP pinfo + SELECT 'FOO' + +Well, there goes your table. + +Note that this particular syntax won't actually work with PHP and MySQL, because the **mysql_query()** function allows just one statement to be processed per request. However, a subquery will still work. + +To prevent SQL injection attacks, do two things: + +- Always validate all parameters. For example, if something needs to be a number, make sure that it's a number. +- Always use the mysql_real_escape_string() function on data to escape any quotes or double quotes in your data. + +**Note: To automatically escape any form data, you can turn on Magic Quotes.** + +Some MySQL damage can be avoided by restricting your MySQL user privileges. Any MySQL account can be restricted to only do certain kinds of queries on selected tables. For example, you could create a MySQL user who can select rows but nothing else. However, this is not terribly useful for dynamic data, and, furthermore, if you have sensitive customer information, it might be possible for someone to have access to some data that you didn't intend to make available. For example, a user accessing account data could try to inject some code that accesses another account number instead of the one assigned to the current session. + +### Preventing Basic XSS Attacks ### + +XSS stands for cross-site scripting. Unlike most attacks, this exploit works on the client side. The most basic form of XSS is to put some JavaScript in user-submitted content to steal the data in a user's cookie. Since most sites use cookies and sessions to identify visitors, the stolen data can then be used to impersonate that user—which is deeply troublesome when it's a typical user account, and downright disastrous if it's the administrative account. If you don't use cookies or session IDs on your site, your users aren't vulnerable, but you should still be aware of how this attack works. + +Unlike MySQL injection attacks, XSS attacks are difficult to prevent. Yahoo!, eBay, Apple, and Microsoft have all been affected by XSS. Although the attack doesn't involve PHP, you can use PHP to strip user data in order to prevent attacks. To stop an XSS attack, you have to restrict and filter the data a user submits to your site. It is for this precise reason that most online bulletin boards don't allow the use of HTML tags in posts and instead replace them with custom tag formats such as **[b]** and **[linkto]**. + +Let's look at a simple script that illustrates how to prevent some of these attacks. For a more complete solution, use SafeHTML, discussed later in this article. + + function transform_HTML($string, $length = null) { + // Helps prevent XSS attacks + // Remove dead space. + $string = trim($string); + // Prevent potential Unicode codec problems. + $string = utf8_decode($string); + // HTMLize HTML-specific characters. + $string = htmlentities($string, ENT_NOQUOTES); + $string = str_replace("#", "#", $string); + $string = str_replace("%", "%", $string); + $length = intval($length); + if ($length > 0) { + $string = substr($string, 0, $length); + } + return $string; + } + +This function transforms HTML-specific characters into HTML literals. A browser renders any HTML run through this script as text with no markup. For example, consider this HTML string: + + Bold Text + +Normally, this HTML would render as follows: + + Bold Text + +However, when run through **transform_HTML()**, it renders as the original input. The reason is that the tag characters are HTML entities in the processed string. The resulting string from **HTML()** in plaintext looks like this: + + <STRONG>Bold Text</STRONG> + +The essential piece of this function is the htmlentities() function call that transforms <, >, and & into their entity equivalents of **<**, **>**, and **&**. Although this takes care of the most common attacks, experienced XSS hackers have another sneaky trick up their sleeve: Encoding their malicious scripts in hexadecimal or UTF-8 instead of normal ASCII text, hoping to circumvent your filters. They can send the code along as a GET variable in the URL, saying, "Hey, this is hexadecimal code, but could you run it for me anyway?" A hexadecimal example looks something like this: + + + +But when the browser renders that information, it turns out to be: + + + +To prevent this, transform_HTML() takes the additional steps of converting # and % signs into their entity, shutting down hex attacks, and converting UTF-8–encoded data. + +Finally, just in case someone tries to overload a string with a very long input, hoping to crash something, you can add an optional $length parameter to trim the string to the maximum length you specify. + +### Using SafeHTML ### + +The problem with the previous script is that it is simple, and it does not allow for any kind of user markup. Unfortunately, there are hundreds of ways to try to sneak JavaScript past someone's filters, and short of stripping all HTML from someone's input, there's no way of stopping it. + +Currently, there's no single script that's guaranteed to be unbreakable, though there are some that are better than most. There are two approaches to security, whitelisting and blacklisting, and whitelisting tends to be less complicated and more effective. + +One whitelisting solution is the SafeHTML anti-XSS parser from PixelApes. + +SafeHTML is smart enough to recognize valid HTML, so it can hunt and strip any dangerous tags. It does its parsing with another package called HTMLSax. + +To install and use SafeHTML, do the following: + +1. Go to [http://pixel-apes.com/safehtml/?page=safehtml][1] and download the latest version of SafeHTML. +1. Put the files in the classes directory on your server. This directory contains everything that SafeHTML and HTMLSax need to function. +1. Include the SafeHTML class file (safehtml.php) in your script. +1. Create a new SafeHTML object called $safehtml. +1. Sanitize your data with the $safehtml->parse() method. + +Here's a complete example: + + alert('XSS Attack')"; + // Create a safehtml object. + $safehtml = new safehtml(); + // Parse and sanitize the data. + $safe_data = $safehtml->parse($data); + // Display result. + echo 'The sanitized data is
' . $safe_data; + ?> + +If you want to sanitize any other data in your script, you don't have to create a new object; just use the $safehtml->parse() method throughout your script. + +#### What Can Go Wrong? #### + +The biggest mistake you can make is assuming that this class completely shuts down XSS attacks. SafeHTML is a fairly complex script that checks for almost everything, but nothing is guaranteed. You still want to do the parameter validation that applies to your site. For example, this class doesn't check the length of a given variable to ensure that it fits into a database field. It doesn't check for buffer overflow problems. + +XSS hackers are creative and use a variety of approaches to try to accomplish their objectives. Just look at RSnake's XSS tutorial at [http://ha.ckers.org/xss.html][2] to see how many ways there are to try to sneak code past someone's filters. The SafeHTML project has good programmers working overtime to try to stop XSS attacks, and it has a solid approach, but there's no guarantee that someone won't come up with some weird and fresh approach that could short-circuit its filters. + +**Note: For an example of the powerful effects of XSS attacks, check out [http://namb.la/popular/tech.html][3], which shows a step-by-step approach to creating the JavaScript XSS worm that overloaded the MySpace servers. ** + +### Protecting Data with a One-Way Hash ### + +This script performs a one-way transformation on data—in other words, it can make a hash signature of someone's password, but you can't ever decrypt it and go back to the original password. Why would you want to do that? The application is in storing passwords. An administrator doesn't need to know users' passwords—in fact, it's a good idea that only the user knows his or her password. The system (and the system alone) should be able to identify a correct password; this has been the Unix password security model for years. One-way password security works as follows: + +1. When a user or administrator creates or changes an account password, the system hashes the password and stores the result. The host system discards the plaintext password. +1. When the user logs in to a system via any means, the entered password is again hashed. +1. The host system throws away the plaintext password entered. +1. This newly hashed password is compared against the stored hash. +1. If the hashed passwords match, then the system grants access. + +The host system does this without ever knowing the original password; in fact, the original value is completely irrelevant. As a side effect, should someone break into your system and steal your password database, the intruder will have a bunch of hashed passwords without any way of reversing them to find the originals. Of course, given enough time, computer power, and poorly chosen user passwords, an attacker could probably use a dictionary attack to figure out the passwords. Therefore, don't make it easy for people to get their hands on your password database, and if someone does, have everyone change their passwords. + +#### Encryption Vs Hashing #### + +Technically speaking, this process is not encryption. It is a hash, which is different from encryption for two reasons: + +Unlike in encryption, data cannot be decrypted. + +It's possible (but extremely unlikely) that two different strings will produce the same hash. There's no guarantee that a hash is unique, so don't try to use a hash as something like a unique key in a database. + + function hash_ish($string) { + return md5($string); + } + +The md5() function returns a 32-character hexadecimal string, based on the RSA Data Security Inc. Message-Digest Algorithm (also known, conveniently enough, as MD5). You can then insert that 32-character string into your database, compare it against other md5'd strings, or just adore its 32-character perfection. + +#### Hacking the Script #### + +It is virtually impossible to decrypt MD5 data. That is, it's very hard. However, you still need good passwords, because it's still easy to make a database of hashes for the entire dictionary. There are online MD5 dictionaries where you can enter **06d80eb0c50b49a509b49f2424e8c805** and get a result of "dog." Thus, even though MD5s can't technically be decrypted, they're still vulnerable—and if someone gets your password database, you can be sure that they'll be consulting an MD5 dictionary. Thus, it's in your best interests when creating password-based systems that the passwords are long (a minimum of six characters and preferably eight) and contain both letters and numbers. And make sure that the password isn't in the dictionary. + +### Encrypting Data with Mcrypt ### + +MD5 hashes work just fine if you never need to see your data in readable form. Unfortunately, that's not always an option—if you offer to store someone's credit card information in encrypted format, you need to decrypt it at some later point. + +One of the easiest solutions is the Mcrypt module, an add-in for PHP that allows high-grade encryption. The Mcrypt library offers more than 30 ciphers to use in encryption and the possibility of a passphrase that ensures that only you (or, optionally, your users) can decrypt data. + +Let's see some hands-on use. The following script contains functions that use Mcrypt to encrypt and decrypt data: + + + +The **mcrypt()** function requires several pieces of information: + +- The data to encrypted. +- The passphrase used to encrypt and unlock your data, also known as the key. +- The cipher used to encrypt the data, which is the specific algorithm used to encrypt the data. This script uses **MCRYPT_SERPENT_256**, but you can choose from an array of fancy-sounding ciphers, including **MCRYPT_TWOFISH192**, **MCRYPT_RC2**, **MCRYPT_DES**, and **MCRYPT_LOKI97**. +- The mode used to encrypt the data. There are several modes you can use, including Electronic Codebook and Cipher Feedback. This script uses **MCRYPT_MODE_CBC**, Cipher Block Chaining. +- An **initialization vector**—also known as an IV, or a seed—an additional bit of binary data used to seed the encryption algorithm. That is, it's something extra thrown in to make the algorithm harder to crack. +- The length of the string needed for the key and IV, which vary by cipher and block. Use the **mcrypt_get_key_size()** and **mcrypt_get_block_size()** functions to find the appropriate length; then trim the key value to the appropriate length with a handy **substr()** function. (If the key is shorter than the required value, don't worry—Mcrypt pads it with zeros.) + +If someone steals both your data and your passphrase, they can just cycle through the ciphers until finding the one that works. Thus, we apply the additional security of using the **md5()** function on the key before we use it, so even having both data and passphrase won't get the intruder what she wants. + +An intruder would need the function, the data, and the passphrase all at once—and if that is the case, they probably have complete access to your server, and you're hosed anyway. + +There's a small data storage format problem here. Mcrypt returns its encrypted data in an ugly binary format that causes horrific errors when you try to store it in certain MySQL fields. Therefore, we use the **base64encode()** and **base64decode()** functions to transform the data into a SQL-compatible alphabetical format and retrieve rows. + +#### Hacking the Script #### + +In addition to experimenting with various encryption methods, you can add some convenience to this script. For example, rather than providing the key and mode every time, you could declare them as global constants in an included file. + +### Generating Random Passwords ### + +Random (but difficult-to-guess) strings are important in user security. For example, if someone loses a password and you're using MD5 hashes, you won't be able to, nor should you want to, look it up. Instead, you should generate a secure random password and send that to the user. Another application for random number generation is creating activation links in order to access your site's services. Here is a function that creates a password: + + 0) && + (! is_null($num_chars))) { + $password = ''; + $accepted_chars = 'abcdefghijklmnopqrstuvwxyz1234567890'; + // Seed the generator if necessary. + srand(((int)((double)microtime()*1000003)) ); + for ($i=0; $i<=$num_chars; $i++) { + $random_number = rand(0, (strlen($accepted_chars) -1)); + $password .= $accepted_chars[$random_number] ; + } + return $password; + } + } + ?> + +#### Using the Script #### + +The **make_password()** function returns a string, so all you need to do is supply the length of the string as an argument: + + + +The function works as follows: + +- The function makes sure that **$num_chars** is a positive nonzero integer. +- The function initializes the **$password** variable to an empty string. +- The function initializes the **$accepted_chars** variable to the list of characters the password may contain. This script uses all lowercase letters and the numbers 0 through 9, but you can choose any set of characters you like. +- The random number generator needs a seed, so it gets a bunch of random-like values. (This isn't strictly necessary on PHP 4.2 and later.) +- The function loops **$num_chars** times, one iteration for each character in the password to generate. +- For each new character, the script looks at the length of **$accepted_chars**, chooses a number between 0 and the length, and adds the character at that index in **$accepted_chars** to $password. +- After the loop completes, the function returns **$password**. + +### License ### + +This article, along with any associated source code and files, is licensed under [The Code Project Open License (CPOL)][4] + +-------------------------------------------------------------------------------- + +via: http://www.codeproject.com/Articles/363897/PHP-Security + +作者:[SamarRizvi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.codeproject.com/script/Membership/View.aspx?mid=7483622 +[1]:http://pixel-apes.com/safehtml/?page=safehtml +[2]:http://ha.ckers.org/xss.html +[3]:http://namb.la/popular/tech.html +[4]:http://www.codeproject.com/info/cpol10.aspx \ No newline at end of file From e57ac3817f86e930f40aafd7e761da3b948f19e6 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 6 Jul 2015 17:50:07 +0800 Subject: [PATCH 1335/2517] Translating by ZTinoZ --- ...re Made Easy with these Dedicated Tools.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md index fb0159ca6a..f8ac9a2db1 100644 --- a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md +++ b/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md @@ -85,31 +85,31 @@ HotShots无法从Ubuntu的Software Center中获取,不过用以下命令可以 ![ScreenCloud in action](http://www.linuxlinks.com/portal/content/reviews/Graphics/Screenshot-ScreenCloud.png) -ScreenCloud is an easy to use open source screenshot tool. +ScreenCloud是一款易于使用的开源截图工具。 -With this software, users can take a screenshot using one of the 3 hotkeys or simply click the ScreenCloud tray icon. Users can choose where you want to save the screenshot. +在这款软件中,用户可以用三个热键中的其中一个或只需点击ScreenCloud托盘图标就能进行截图,用户也可以自行选择保存截图的地址。 -If you choose to upload your screenshot to the screencloud website, a link will automatically be copied to your clipboard. This can be shared with friends or colleagues via email or in an IM conversation. All they have to do is click the link and look at your screenshot. +如果你选择上传你的截图到screencloud主页,链接会自动复制到你的剪贴板上,你能通过email或在一个聊天对话框里和你的朋友同事分享它,他们肯定会点击这个链接来看你的截图的。 -Features include: +包含特性: -- Capture full screen, window or selection -- Fast and easy: Snap a photo, paste the link, done -- Free hosting of your screenshots -- Hotkeys -- Set timer delay -- Enable 'Capture window borders' -- Enable/Disable Notifications -- Set app to run on start up -- Adjust account/upload/filename/shortcut settings -- Cross platform tool -- Plugin support, save to Dropbox, Imgur, and more -- Supports uploading to FTP and SFTP servers +- 捕捉整个屏幕,窗口和截选区域 +- 快速又简单:截取图片,粘贴链接,完成 +- 免费托管你的截图 +- 热键 +- 设置定时器延迟 +- 允许 '捕捉窗口边框' +- 启用/禁用通知 +- 设置开机自启动 +- 调整账户/上传/文件名/快捷方式的设置 +- 跨平台工具 +- 插件支持:保存至Dropbox,Imgur等等 +- 支持上传至FTP和SFTP服务器 -- Website: [screencloud.net][3] -- Developer: Olav S Thoresen -- License: GNU GPL v2 -- Version Number: 1.2.1 +- 主页: [screencloud.net][3] +- 开发者: Olav S Thoresen +- 许可证: GNU GPL v2 +- 版本号: 1.2.1 ---------- From a2479964eaa7e43eb07a721ce62e7ba131d37be8 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 6 Jul 2015 22:24:09 +0800 Subject: [PATCH 1336/2517] PUB:20150618 What will be the future of Linux without Linus @wi-cuckoo --- ...ll be the future of Linux without Linus.md | 186 +++++++++++++++++ ...ll be the future of Linux without Linus.md | 189 ------------------ 2 files changed, 186 insertions(+), 189 deletions(-) create mode 100644 published/20150618 What will be the future of Linux without Linus.md delete mode 100644 translated/talk/20150618 What will be the future of Linux without Linus.md diff --git a/published/20150618 What will be the future of Linux without Linus.md b/published/20150618 What will be the future of Linux without Linus.md new file mode 100644 index 0000000000..ff30e8b4cf --- /dev/null +++ b/published/20150618 What will be the future of Linux without Linus.md @@ -0,0 +1,186 @@ +没有 Linus,Linux 的未来是什么样子? +============================================================================== +![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/06/linus-torvalds-painting.jpg) + +这次采访是《Linux For You》杂志在2007年进行的,现在我们发表在这里是为了存档的目的。 + +**Q:对于 Linux 内核,未来的计划/道路/提升是怎样的?** + +Linus:我从来没有太多的预见性 — 与其从宏大的计划上看未来,我倾向于从一个相对短的时间框架,比如“几个月之后的事情”。我是一个忠实的‘细节成败论’的信仰者,如果你抓住了细节,再大的问题也会大事化小,小事化无。 + +所以,对于五年后内核会是什么样,我真的没有任何远见 — 仅仅是希望我们能够持续专注于Linux的发展。实际上,对于我个人来说,我最担心的事情之一甚至不是技术问题,而是确保这个‘过程’正常,这样人们才可以相互协作好。 + +**Q:你怎么看 Linux 和 Solaris 之间的关系在未来的发展?它会如何使用户受益?** + +Linus:我并没有看到太多交叉的地方,除了我认为 Solaris 会使用更多的 Linux 用户空间工具(对我自己来说并没有太多关注这个,因为我真的只关心内核)。Linux 桌面比起传统 Solaris 桌面好多了,而且我希望 Solaris 移植越来越多的 Linux 的东西,朝着一个更加类 Linux 的模式前进。(LCTT 译注:时至今日,我们还需要讨论 Solaris 吗?/cry ,但是当时,整个开源社区确实期望接受 Solaris 一些遗产。) + +从纯内核方面讲,许可证的存在意味着没有太多的合作空间,但是如果这种情况发生改变将会变得很有趣。Sun 已经声称将在 GPL(v2 或 v3)下授权 Solaris,如果这种许可证的差异消失,那么会导致一些有趣的技术出现。但对此,我持观望态度。 + +**Q:现在 GPL v3 已经完成并发布了,你是否预见有什么情况会鼓励你开始移植内核到 Solaris 上去?或者,从你的角度看,它是否很糟糕以至于你从来没考虑过它?** + +Linus:我觉得相比于早先的草稿,v3 有了很多提高,并且我也不认为它是一个糟糕的许可证。我只是认为它没有 GPLv2 一样‘伟大’。 + +所以,如果没有 GPLv2,我觉得自己将会使用 GPLv3。不过,既然我已经有了一个更好的选择,我为什么还要考虑它呢? + +这就是说,我始终秉承实用主义精神,并且我认为“ GPLv3 不像 GPLv2 一样好”这件事并不是一个‘非黑即白’的问题。这就像是一个天平,如果 GPLv3 有了其他的优点作为砝码,很有可能那些优点会让我对 GPLv3 更偏爱一些。 + +恕我直言,我到现在还并没有看到任何优点,但是如果 Solaris 真的在 GPLv3 下发布,可能避免不必要的许可证不兼容性这一条就分量足够了,足以值得我们去尝试将 Linux 的内核重新在 GPLv3 许可证下发布。不过,请不要误解,我认为这是不大可能的。但是我确实想澄清我本质上并不是一个许可证偏执者。我认为 GPLv2 是毫无疑问的好许可证,但是许可证并不是一切。(LCTT 译注:事实上,Solaris/OpenSolaris 最终也没采用 GPL 许可协议发布,而 20100年之后,已经没有什么动静了。而 Linux 内核最终也没有更换到 GPLv3 上。) + +总的来说,我使用很多其他许可证下的程序。我可能没有把任何一个我自己做的项目放在 BSD(或 X11—MIT)许可证下,但是我认为它是一个伟大的许可证,对于其他项目来说,它可能是最佳的选择。 + +**Q:目前有没有任何你想特别提出作为 Linux 内核的关键贡献者的印度人?** + +(LCTT 译注:本篇访谈中提到多次印度,是因为访谈者是印度人。) + +Linus:我不得不承认,我并没有与来自印度的任何人直接合作过,尽管我已经非常有意识地努力建立一个规模庞大的内核开发团队,这样我不用总是独自工作。 + +我相信大多数人的社交基本上是受限制的,只对很少的人十分了解(比如你最亲近的家人和朋友),我也努力构造这样一个开发模型来改变这种状况:通过一个‘开发者网络’,人们可以在此互动,可能是与一批你信任的人,而且那些人反过来与他们信任的一群人互动。 + +所以,我偶然会与上百个发给我一两个不确定的补丁的开发者联系。我试着去建立一些由我熟知的人组成的小团体,我认为那就是人们工作的方式,当然也是我喜欢工作的方式。 + +同时,坦白地说,我甚至不知道许多与我一起工作的人生活在哪里。地理位置成了十分次要的东西。所以我很确信与我工作最紧密的前10—15个人中,没有印度的,可能这话稍后传到公众耳里,然后被指出确实有一些人来自那里! + +**Q:因为 Linux 的内核开发对你依赖如此严重,你如何计划组织或重组,让它在没有你的情况下继续发展,假设你决定花更多的时间在你自己的生活和家庭上面的话?** + +Linus:现在 Linux 比我重要得多,为了今天这一步我已经工作了很长时间。是的,我仍然十分密切地参与其中,而且我对其有着想当大的日常影响,我最终会是这样一个人——在某种程度上,扮演着许多内核开发活跃者的中心;但是,我不会说 Linux “严重依赖”于我。 + +所以,如果我得了心脏病并且明天就死了(很高兴没这种可能:我显然在任何方面都很健康),人们肯定会注意到,但是有成千上万的人为内核工作,并且不止一两个人能够毫无困难地接替我的角色。 + +**Q:印度是软件工程师的主要产地之一,但是我们没有在 Linux 领域做太多贡献。你觉得为什么印度人没有积极参与Linux?如果我们鼓励印度人参与并为 Linux 做更大的贡献,你觉得如何?你会乐意用你个人作为榜样激励印度工程师吗?** + +Linus:对我来说,这确实是一个不好回答的问题。参与开源取决于两方面的基础条件:信息流和文化(用你的话说是互联网和教育),我甚至不知道这其中哪个是最大的障碍。 + +在很多方面,至少在那些印度讲英语文化的地方,参与 Linux 和其他开源项目是相对容易的,如果仅仅是由于语言门槛的话。这当然比起亚洲的许多地方,甚至欧洲的一些地方要容易些。 + +当然,这只是一些人,并不等同于印度的大部分群体,而且我自己关于印度的情况也知道不多,甚至没法不太负责的猜测最好的途径是什么。我猜一个热情的本地用户社区会是最好的途径,而且我猜测你们已经拥有这样的社区了。 + +至于我的‘偶像’形象,我自己不以为然。我不是一个伟大的公众演讲者,而且我最近些年已经避免出游,因为被看做符号化的‘偶像’让我很不自在。我就是一个工程师而已,而且我仅仅是喜欢我做的事情,并与社会上其他人一起工作。 + +**Q:什么样的理由会让你考虑去访问印度?** + +Linus:如前一个回答中提到,我十分讨厌公开演讲,所以我才想避免开会等等这些事。我更愿意某天去印度度个假,但是如果我这样做,我可能悄悄地干 — 出行之前不告诉任何人,仅仅作为一个游客去游览印度!(LCTT 译注:所以 Linus 不来中国的道理是同样的,除非在中国召开一次世界性的 LinuxCon。) + +**Q:最近你好像在抨击 Subversion 与 CVS,质问他们的架构基础。现在你已经从 Subversion 和 CVS 社区那里得到回应,你是否改变了看法,还是说并没有被说服?** + +Linus:因为我发现这个争论很有趣,所以我想做一个强硬的声明。换句话说,我确实‘喜欢’争论。并不是不经思考的,但是我确实想要让争论更热烈些,而不仅仅是完全的柏拉图式的。 + +做出强硬的争论有时会引来一个非常合理的反驳,然后我会很高兴地说:“噢,好吧,你是对的。” + +但是话说回来,对 SVN/CVS 并不会发生这种情况。我怀疑很多人并不是真的很喜欢 CVS,所以我真的不觉得会有谁坚持认为 CVS 就是一切,而不是一个老旧系统。要是我知道之前就有人这样认为的话,我就不会那么不礼貌地反对 SVN(嘿,这么说没错 — 我真的不是一个非常礼貌的家伙!),我不相信任何人会认为 SVN 是‘好的’。 + +我认为,SVN 就是一个‘还好’的经典案例。人们过去经常使用 SVN,并且它也‘还好’地广泛使用,但是它的‘还好’就如 DOS 与 Windows 的‘还好’一样。不是什么伟大的技术,只是普遍适用而已,同时它对人们来说运行良好,看着十分熟悉。但是很少有人以此为傲,或者对其感到兴奋。 + +Git,从另外方面讲,其身后有一些‘UNIX 哲学’,这和 UNIX 无关。实质上,就像原始的 UNIX,在它身后有一个基本理念。对 UNIX 来说,最底层的哲学就是,“所有东西只是一个文件”。对 Git 来说,“则是每个东西只是内容寻址数据库中的一个对象”。 + +**Q:现在如此多的发行是好事还是坏事?选择是很有意思的,但是选择太多了就是干扰。相较于这么多的人每天花费数小时去构建成百上千的发行版,如果人们可以一起来支持少数的发行版,这样在企业级市场去挑战微软是不是更容易些呢?对此你怎么看?** + +Linus:我认为多个发行版是开源不可回避的部分。它会造成困惑吗?当然。它会变得低效率吗?是的。但是我喜欢拿它与政治比较:‘民主’也有那些令人困惑的选择,往往没有任何一个选择是你‘真正’想要的。而且有时候,如果你不需要操心选举、不同党派和联合等等方面的困惑的话,你可能会感觉事情更加容易一些,更有效率一些。 + +但是最后我想说,选择可能会导致低效率,但是它也让每个人至少保留了‘所谓的’诚信。我们可能都希望我们的政治家更诚信,我们也希望不同的发行版可以让我们有一天有其他的选择,而如果没有选择的话,事情可能会更糟。 + +**Q:为什么你觉得 CFS 比 SD 更好?** + +Linus:一部分原因是我与 Ingo [Molnar] 工作过很长一段时间,也就是说,我了解他,并且知道他会对发生的任何问题非常负责。那种品质是非常重要的。 + +但是一部分原因就简单的与用户有关,大多数人实际上表示 CFS 比 SD 好。包括许多 3D 游戏方面(这是人们声称 SD 最强的一点)。 + +尽管如此,我认为并不是任何一段代码都十分‘完美’。最好的情况是,想成为 SD 支持者的人会努力提高 SD,从而通过其它方式取得了平衡 — 而我们会保持两个阵营都尝试有趣的事情,因为内部的竞争会刺激他们。 + +**Q:在 Google 的一次关于 Git 的访谈中,有人问你如何将当前集中存放的超大代码库迁移到 git 上,而不用将开发工作停止六个月。你对此的回答是什么?** + +Linus:啊哈,那个问题我在现场没有听清楚(在录音里,问题会听得更清楚些),当我回头去听录制的音频,注意到了我没有回答他的问题,但是我觉得这问题他问过。 + +无论如何,我们确实有很多导入的工具,所以你实际上可以仅仅是将一个大的项目从任何其他的早期的 SCM (源代码控制系统)导入到 git 里,但问题显然不是经常以导入动作本身结束,而是需要‘习惯’这种新模式! + +坦白来说,我认为关于如何‘习惯它’没有任何其他答案,而只能是去开始使用和尝试它。显然,你不会冒险率先导入你现有的最大、最重要的项目,那确实会导致工作停顿下来,然后使得每个人都很不高兴。 + +所以没有任何理智健全的人会拥护在一夜之间将一切移到 git 上去,并强迫人们改变他们的环境。是的,你需要从公司里的小项目开始,可能是一些由一个小组主要控制和维护的项目,然后开始转移其到 git。这是你能让人们习惯这种模式的方式,你应该以一个核心的组开始,他们知道 git 如何工作,如何在公司里面使用它。 + +接着,你就会铺展开来。并不需要一次到位。你会导入越来越多的项目 — 甚至是在你公司里采用‘单一大型仓库’模式;那个仓库基本上是作为许多模块的集合,因为让每个人去检查每件事不是一个可执行的工作模型(除非这个‘每件事’并不非常大)。 + +所以,你基本上只会一次转移一个模块,直到你发现使用 git 是如此酸爽,这时你可以移植余下的所有(或者‘余下’的太旧了,没有人用了)。 + +git 最赞的一个功能是,它实际上可以同很多其他 SCM 相处很好。很多 git 用户使用它的时候,与他们一起工作的人并没有发现,因为他们看到 git 的结果,会联想到一些传统的 SCM 上去。 + +**Q:Linux 用了你在 Transmeta(全美达)上实现备用指令集的经验吗?[Transmeta Crusoe 芯片看起来像一个非常轻量级的 CPU — 记得有一台 Burroughs B1000 解释器,它实际上实现了多个虚拟机。有的用于系统软件,有的用于 Cobol,还有的用于 Fortran;如果没错的话,那么人们可以在芯片上实现 Burroughs 6/7000 或者 HP3000 类似的堆栈架构,或适用于 JVM 的指令集,等等。(LCTT 译注:Linus 于 1997-2003 期间就职于全美达)]** + +Linus:我们确实有一些备选的结构集合,不过我不打算谈论太多这个,我可以说的是我们已经做了一个混合结构集合的公开演示。我们有一个技术展示,在那里你同时可以跑 x86 指令和 Java 字节码(实际上,它是一个轻量的扩展 pico—java,iirc)。 + +我想我们展示的这个应用会在 Linux 上运行 DOOM,这里 Linux 的部分是一个完全标准 x86 发行版。但是 DOOM 的二进制程序是一个特定的编译版本,它实际上编译为 pico-java 代码。而 CPU 最终以相同的方式来运行它们——从 JIT 到原生 VLIW 指令集。 + +(选择 DOOM 的原因仅仅是其源代码可用,并且游戏的核心部分非常小,足以很容易拿它来做一个验证 — 而且它也显然看起来十分有趣。) + +有更多的事情是在内部运作,但是我不能谈论他们。而且实际上,就我个人而言,对 Java 不怎么感冒。 + +**Q:386BSD 衍生了 NetBSD,FreeBSD 和 OpenBSD,在 Linux 出现之前已经发展不错了,但是 Linux 传播比 386BSD 及其衍生者更为广泛。这在多大程度上左右你对许可证的选择,这个选择的发展过程是怎样的?你不认为比起 GPLv2 来,是 GPLv3 创造了发展空间,迄今为止,让 Linux 比 BSD 变得更好?** + +Linus:我认为这不仅是一个许可证问题,也是一个社区及人格问题。BSD 的许可证总是鼓励分叉,但是这也意味着,如果某些人取得了成功并做了商业性的分叉,他并不需要将他的修改返回来。因此,哪怕实际上这种事情没有(而实际上,这种事情的确发生了,比如 BSDi),人们也难以建立彼此信任。 + +相比之下,GPLv2 也鼓励分叉,但是它不仅仅鼓励分叉出去,它也鼓励(并‘要求’)能够融合回来。所以,我们现在达到了新的层次的信任:你‘知道’每个人都被许可证所约束,所以每个人都不会占你便宜。 + +所以,在我看来,GPLv2 作为许可证来说,它允许人们在要求总是回馈贡献的前提下,在另外的方面取得了最大可能的自由。没有人能阻止你对源代码的改进。 + +那么,BSD 许可证是更‘自由’的吗?是的,毫无疑问。但是我不会在我在意的任何项目里面使用 BSD 许可证,因为我不仅仅想要自由,我也想要信任,可以让我总是能使用其他人为我的项目所写的代码。 + +所以对于我来说,GPLv2 最终在‘尽可能自由’上取得了完美的平衡,这样,我们做到了让每个人都能信任,他们总是可以取得源代码并使用它。 + +这就是为什么我认为 GPLv3 最终并没多大意思,它不再是那种‘返回源代码’的信任;它退化成了‘我写了这些代码,所以我能控制你如何使用它’。 + +换言之,我只是觉得 GPLv3 太狭隘和自私了。我认为 GPLv2 在‘自由’和‘信任’之间取得伟大的平衡。它不如 BSD 许可证自由,但是它让你安心回馈,而且它符合我认为的‘以德报德’:我给你源代码,你也回馈我源代码。 + +而 GPLv3 试着控制源代码的‘使用’。现在它就是“我给你我的源代码,如果你使用它的话,你就准备好让我对你的设备动手动脚吧”,看见了没?在我看来,不但小气,而且小心眼。 + +**Q:-rt 代码树的功能正在缓慢而稳定地逐渐集成到主线代码中。你对将剩余的 -rt 树合并到主线代码的看法是什么?(我说的不是 CFS)** + +Linus: 我不能保证来自 -rt 的一切‘都’会被合并进入标准内核(有一些部分肯定不适合常规的内核),不过是的,这些年来我们实际上将它的大部分都集成进去了,剩下的部分最终以后也会合并进去。 + +我提倡高效工作,但是我同时也很保守。我退回了一些激进的合并请求,只是因为我需要确保它们对我们所有人都有意义,不仅仅是用于极端情况下的实时环境,而且也对并不需要这种环境的‘普通’用户有用。这解释了为什么这个过程相当缓慢却稳定不断地合并代码,因为它需要足够稳定和有意义。 + +顺便说一句,这不仅仅是针对 -rt ,它也出现在许多开发中。-rt 出现这种情况是因为它是更‘直接’的内核项目,而且也是因为它的一个主要开发者直接参与到了常规内核开发。通常其它功能的迁移(安全、虚拟内核变化、虚拟化,等等)也遵循类似的方式:他们针对特定的环境进行开发,然后这些功能片段缓慢而稳步地合并到标准内核。 + +**Q:我对 Linux 内核所支持的文件系统发展很感兴趣。你觉得 Reiser4、XFS4、ZFS 以及 Oracle 的新项目哪个更有前途?这些天 ZFS 有不少新闻,Reiser4 也发布了很不错的性能基准测试,XFS4 正紧随其后,而 Oracle 发布的那个也有很多像 Sun 的 ZFS 一样的特性。我们将走向何方呢?以你的观点来看,哪个文件系统更有前途?** + +Linus: 实际上,就在昨天我们发现了一个 git 的性能问题,有一个用户发现他采用 ZFS 要比 UFS 慢一个数量级(不是在 Linux 下,git 已经得到了许多关注,甚至是来自内核开发团队之外)。所以,我认为许多‘新文件系统’的拥护者部分原因是因为他们了解到旧文件系统的不足,然后(有点不切实际地)期望一个‘崭新的、改进的’文件系统能使一切都完美。 + +最后,这是一个永无止境的领域,看看谁是最终的赢家——也许并不需要(看起来不需要)一个赢家。几乎总是这样,对文件系统的选择最终取决于负载和环境。 + +相比你提到的这些文件系统,我个人对基于闪存的硬盘很快就可以供甚至是‘普通’用户使用的这个事实更感到兴奋。当然,它们仍然很昂贵(而且相当的小),但是基于闪存的存储和传统硬盘的性能完全不可同日而语,我怀疑它们最终将对文件系统的设计有巨大的影响。而现在,多数文件系统的设计都是在考虑如何处理硬盘延迟。 + +**Q:操作系统变得越来越不重要。你说过好几次用户根本不应该‘看见’操作系统。应用更为重要。基于浏览器的应用,如 Google 的办公软件影响力越来越大。你认为操作系统将走向何方?** + +Linus:我并不真的认可‘浏览器 OS’,因为我认为人们总是需要在本地做一些事情。也许是因为安全,或者仅仅是因为隐私的原因。而且即便当到处可以接入时,它也并不是‘无处不在’。 + +所以我认为,整个‘Web OS’这件事有一部分是真实的,但是另外一部分人们也许忘记了操作系统已经存在了几十年,它已经相当稳定,而且它的发展是有目共睹的。人们真的不应该期望操作系统有魔法般的变化,现在已经不是操作系统刚刚起步的六十年代,甚至连硬件也和过去完全不同了! + +所以,别指望一场革命。我认为操作系统将在很大程度上继续它们所擅长的,当然,我们也会进步,但是我不认为会从根本上改变。也许会发生巨变的是界面和操作系统顶层的那些东西(当然,操作系统下面的硬件也会继续进步),这显然才是人们所关心的。 + +至于操作系统?它显然是应该尽可能隐藏起来的东西。你真的不应该在意它,除非你特别想知道在机器里面真正在发生什么。 + +**Q:最近我听说你正在使用一台 PPC G4/5 作为个人计算机,你使用它来做什么?为什么呢?** + +Linus:我最终放弃了那台 PowerPC,因为没有人能在这台工作站上做到更多,特别是,自从 x86-64 开始变得越来越强大了。所以这些天,我在用一台标准的 PC,里面是一个普通的 Core 2 Duo CPU。 + +在其它架构下运行是非常有趣的(alpha 作为我的主要架构运行了好几年,所以这并不是第一次),但是这种 CPU 得当成商品买得到才行。我认为,唯一能取代 x86 架构的,也许未来十年并不需要使用 x86 作为主要架构,我认为或许是 ARM,这得益于移动设备市场的发展。 + +**Q:Linux 对你意味着什么?一种业余爱好、哲学、人生意义、工作、最好的操作系统,还是什么?** + +Linus:它是所有的这一切。它是爱好,而且是具有深刻意义的爱好。最好的爱好是你‘真的’非常在意它。这些日子里,它显然也是我的工作,我非常高兴工作和兴趣能合二为一。 + +我不了解所谓的‘哲学’,我并不真的是因为深层次的道德或哲学的原因才做的 Linux,但是可以肯定的是,对开源的深层思考是我非常重视的。所以我并不是因为什么明确的理由做 Linux,也不能说是它在激励我,但是我的确在思考开源是如何工作。 + +**Q:微软的‘黑衣人’有没有和你交谈过?** + +Linus:我从来没有真正和微软交谈过,没有。我偶尔会和一些微软的人出现再同一个会议上(我比以前参加的会议更多了),但是我从来和他们没有任何关系。我认为彼此都很谨慎吧。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxveda.com/2015/06/17/what-happens-to-linux-after-linus/ + +作者:[Swapnil Bhartiya][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo),[wxy](https://github.com/wxy) +校对:mahua, [wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxveda.com/author/arnieswap/ + diff --git a/translated/talk/20150618 What will be the future of Linux without Linus.md b/translated/talk/20150618 What will be the future of Linux without Linus.md deleted file mode 100644 index c880921853..0000000000 --- a/translated/talk/20150618 What will be the future of Linux without Linus.md +++ /dev/null @@ -1,189 +0,0 @@ -没有 Linus,Linux 的未来是什么样子? -============================================================================== -![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/06/linus-torvalds-painting.jpg) - -这次采访是《Linux For You》杂志在2007年进行的,现在我们发表在这里是为了存档的目的。 - -**Q:对于 Linux 内核,未来的计划/道路/提升是怎样的?** - -Linus:我从来没有太多的预见性 — 与其从宏大的计划上看未来,我倾向于从一个相对短的时间框架,比如“几个月之后的事情”。我是一个忠实的‘细节成败论’的信仰者,如果你抓住了细节,再大的问题也会大事化小,小事化无。 - -所以,对于五年后内核会是什么样,我真的没有任何远见 — 仅仅是一个非常普遍的计划,确保我们对其保持关注。实际上,对于我个人来说,我最担心的事情之一甚至不是技术问题,而是确保这个‘过程’正常,这样人们才可以相互协作好。 - -**Q:你怎么看 Linux 和 Solaris 之间的关系在未来的发展?它会如何使用户受益?** - -Linus:我并不能看到整个重叠的地方,除了我认为 Solaris 会开始使用更多的 Linux 用户空间的工具(显然对我自己来说没有太多关注这个 — 我真的只关心内核)。Linux 的桌面比起传统 Solaris 拥有的好多了,而且我希望 Solaris 移植越来越多的Linux的东西,朝着一个更加类 Linux 的模型前进。(LCTT 译注:时至今日,我们还需要讨论 Solaris 吗?/cry ) - -从纯内核方面讲,许可证的差异意味着没有太多的合作,但是如果看到这种情况改变会很有趣。Sun 已经声明在 GPL(v2 或 v3)下授权 Solaris,如果这种许可证差异消失,那么会导致一些有趣的技术出现。但对此,我持观望态度。 - -**Q:现在 GPL v3 已经完成并发布了,你是否预见有什么情况会鼓励你开始移植内核到 Solaris 上去?或者,从你的角度看,它是否很糟糕以至于你从来没考虑过它?** - -Linus:我觉得相比于早先的草稿,v3 有了很多提高,并且我也认为它不是一个糟糕的许可证。我只是认为它没有 GPLv2一般的‘伟大’。 - -所以,由于没有了 GPLv2,我觉得自己将会使用 GPLv3。不过,如果我有了一个更好的选择,我为什么不应该考虑一下呢? - -这就是说,我努力保持实用主义精神,并且我认为 GPLv3 不像 GPLv2 一样好这件事并不是一个‘非黑即白’的问题。这是一个平衡做法。如果 GPLv3 有其他的优点,可能那些优点会在很大程度上扭转喜爱 GPLv3 的天平。 - -恕我直言,我并没有看到任何优点,但是如果 Solaris 真的在 GPLv3 下发布,可能避免不必要的非兼容的许可证这条足够称为一个优点,可能也许值得去尝试将Linux的内核重新在 GPLv3 许可证下发布。 - -不要误解我 — 我认为这是不大可能的。但是我确实想澄清我本质上不是一个许可证偏执者。我认为 GPLv2 是毫无疑问的好许可证,但是许可证并不是一切。 - -总的来说,我使用很多其他许可证下的程序。我可能没有把一个我自己做的项目放在 BSD(或 X11—MIT)许可证下,但是我认为它是一个伟大的许可证,对于其他项目来说,它可能是最佳的选择。 - -**Q:目前有没有任何你想特别提出作为 Linux 内核的关键贡献者的印度人?** - -(LCTT 译注:本篇访谈中提到多次印度,是因为访谈者是印度人。) - -Linus:我不得不承认,我并没有与实际认识的来自印度的任何人直接工作。换句话说,我应该稍微澄清下:我已经非常有意识地努力建立一个规模庞大的内核开发团队,这样我不用以独自地工作而告终。 - -我非常相信大多数人的社交基本上是受限制的,只对很少的人十分了解(你最亲近的家人和朋友),我也努力构造这样一个开发模型影响这种状况:通过一个‘开发者网络’,人们可以在此互动,可能是与一批你信任的人,而且那些人反过来与他们信任的一群人互动。 - -所以,当我偶然会与上百个开发者联系,他们发给我一两个随机的补丁,我已经努力去建立这样一个环境,在这里我做的一堆事,发生在我熟知的人组成的一个较小的群体间,仅仅因为我认为那就是人们工作的方式。当然也是我喜欢工作的方式。 - -同时,坦白地说,我甚至不知道许多与我一起工作的人生活在哪里。地理位置成了十分次要的东西。所以我很确信与我工作最亲密的前10—15个人中,没有印度的,可能这话稍后传到公众耳里,然后被指出确实有一些人来自那里! - -**Q:因为 Linux 的内核开发对你依赖如此严重,你如何计划组织或重组,让它在没有你的情况下继续发展,假设你决定花更多的时间在你自己的生活和家庭上面?** - -Linus:现在 Linux 比我重要得多,为了今天这一步我已经工作了很长时间。是的,我仍然十分密切地参与其中,而且我对其有着想当大的日常影响,我最终会是这样一个人——在某种程度上,扮演着许多内核开发活跃者的中心;但是,我不会说Linux“严重依赖”于我。 - -所以,如果我得了心脏病并且明天就死了(很高兴没这种可能:我显然在任何方面都还健康),人们肯定会注意到,但是有成千上万的人为内核工作,并且不止一两个人能够没有什么困难地接替我。 - -**Q:印度是软件工程师的主要产地之一,当然我们没有在 Linux 领域做太多贡献。你觉得什么是让印度人在Linux领域变得主动的?如果我们鼓励印度人参与并为Linux做更大的贡献,你觉得如何?假如你有一个在印度的粉丝;你会用你的形象来顾问那些爱好者吗?** - -Linus:对我来说,这确实是一个不好回答的问题。参与开源取决于两方面的基础条件(互联网和教育,如你说的):信息流和文化,我甚至不知道这其中哪个是最大的障碍。 - -在很多方面,至少那些在印度讲英语文化的地方,参与 Linux 和其他开源项目是相对容易的,如果仅仅是由于语言门槛的话。这当然比起亚洲的许多地方,甚至欧洲的一些地方要容易些。 - -当然,这只是一些人,并不等同于印度的大部分群体,而且我自己关于印度的情况也知道不多,甚至没法不太负责的猜测最好的途径是什么。我猜一个热情的本地用户社区一直是最好的途径,我认为你们已经拥有这样的社区了。 - -至于我的‘形象’,我自己不以为然。我不是一个伟大的公众演讲者,而且我最近些年已经避免出游,因为被看做符号化的‘形象’让我很不自在。我就是一个工程师而已,而且我仅仅是喜欢我做的事情,并与社会上其他人一起工作。 - -**Q:什么样的理由会让你考虑去访问印度?** - -Linus:如第一个回答中提到,我十分讨厌公开演讲,所以我才想避免开会等等这些事。我更愿意某天去印度度个假,但是如果我这样做,我可能悄悄地干 — 出行之前不告诉任何人,仅仅作为一个游客去游览印度!(LCTT 译注:所以 Linus 不来中国的道理是同样的,除非世界性的 LinuxCon 在中国召开一次。) - -**Q:最近,你好像在抨击 Subversion 与 CVS,质问他们的基础架构。现在你已经从 Subversion 和 CVS 社区那里得到回应,你仍然在坚持自己正确,或者没有被说服吗?** - -Linus:因为我发现这个争论很有趣,所以我想做一个强硬的声明。换句话说,我确实‘喜欢’争论。并不是不经思考的,但是我确实想要让争论更热烈些,而不仅仅是完全的柏拉图式的。 - -做出强硬的争论有时会引来一个非常合理的反驳,然后我会很高兴地说:“噢,好吧,你是对的。” - -但是话说回来,对 SVN/CVS 并不会发生这种情况。我怀疑很多人并不是真的很喜欢 CVS,所以我真的不觉得会有谁坚持认为 CVS 就是一切,而不是一个老旧系统。要是我知道少数人确实这样争论过了,我之前就不该那么不礼貌地反对 SVN(嘿,这么说没错 — 我真的不是一个非常礼貌的家伙!),我不认为任何人都可以争论 SVN 是‘好的’。 - -我认为,SVN 就是一个‘足够好’的经典案例。人们过去经常使用 SVN,并且它也‘足够好’地广泛使用,但是它的足够好完全如 DOS 与 Windows 的‘足够好’一样。不是什么伟大的技术,只是普遍适用而已,同时它对人们来说运行良好,看着十分熟悉。但是很少有人以此为傲,或者对其有兴奋感。 - -Git,从另外方面讲,其身后有一些‘UNIX 哲学’。它并不关系到 UNIX,实质上,只是像原始的 UNIX,在它身后有一个基本理念。对 UNIX 来说,最底层的哲学就是,“所有东西只是一个文件”。对 Git 来说,“则是每个东西仅仅是内容寻址数据库中的一个对像”。 - -**Q:现在如此多的发行是好事还是坏事?选择是很有意思的,但是没有人想被选择给撑着。相较于这么多的人每天花费数小时去构建成百上千的发行版,如果人们可以一起来支持少数的发行版(可能每一个有一个人),这样进入企业,接受微软的挑战是不是更容易些呢?对此你怎么看?** - -Linus:我认为多个发行版是开源不可回避的部分。它会造成困惑吗?当然。它会变得低效率吗?是的。但是我喜欢拿它与政治比较:‘民主’也有那些令人困惑的选择,往往没有任何一个选择是你‘真正’想要的。而且有时候,如果你不需要操心选举、不同党派和联合等等方面的困惑的话,你可能会感觉事情更加容易一些,更有效率一些。 - -但是最后我想说,选择可能会导致低效率,但是它也让每个人至少保留了‘所谓的’诚信。我们可能都希望我们的政治家更诚信,我们也希望不同的发行版可以让我们有一天有其他的选择,而如果没有选择的话,事情可能会更糟。 - -**Q:为什么你觉得 CFS 比 SD 更好?** - -Linus:一部分原因是我与 Ingo [Molnar] 工作过很长一段时间,也就是说,我了解他,并且知道他会对发生的任何问题非常负责。那种品质是非常重要的。 - -但是一部分原因就简单的与用户有关。其他地方的大多数人实际上表示 CFS 比 SD 好。包括许多 3D 游戏方面(这是人们声称SD 最强的一点)。 - -同时,尽管如此,我认为并不是任何一段代码都十分‘完美’。最好的情况是,想成为 SD 支持者的人会努力提高 SD,从而通过其它方式取得了平衡 — 而我们会保持两个阵营都尝试有趣的事情,因为内部的竞争会刺激他们。 - -**Q:在 Google 一次关于 Git 的访谈中,有人问你如何将当前集中存放的超大代码库迁移到 git 上,而不用将开发工作停止六个月。你对此的回答是什么?** - -Linus:啊哈。那个问题我在现场没有听清楚(在录音里,问题会听得更清楚些),当我回头去听录制的音频,注意到了我没有回答他的问题,但是我觉得这问题他问过。 - -无论如何,我们确实有很多导入的工具,所以你实际上可以仅仅是将一个大的项目从任何其他的早期 SCM 导入到 git 里,但问题显然不是经常以导入动作本身结束,而是需要‘习惯’这种新模式! - -坦白来说,我认为关于‘习惯它’没有任何其他答案,而只是去开始使用和尝试它。显然,你不想以导入你现有的最大且最重要的项目为开端;那确实会使每件事出现停顿,然后使得每个人都很不高兴。 - -所以没有任何理智健全的人会拥护在一夜之间将一切移到 git 上去,并强迫人们改变他们的环境。是的,你需要以公司里的小项目开始,可能是一些由一个小组主要控制和维护的项目,然后开始转移其到 git。这是你能让人们习惯这种模式的方式,你应该以一个核心的组开始,他们知道 git 如何工作,如何在公司里面使用它。 - -接着,你就会铺展开来。并不需要一次到位。你会导入越来越多的项目 — 甚至是在你公司里采用‘单一大型仓库’模式;那个仓库基本上是作为许多模块的集合,因为让每个人去检查每件事不是一个可执行的工作模型(除非这个‘每件事’并不非常大)。 - -所以,你基本上有一次转移一个模块,直到你发现你使用git如此舒服的那个点,你可以移植余下的所有(或者‘余下’的太旧了,没有人用了)。 - -git 最赞的一个功能是,它实际上可以同很多其他 SCM(源代码控制管理)相处很好。这就是很多git用户使用它的时候:‘他们’可能只是使用 git ,但有时候与他们一起工作的人并没有发现,因为他们看到git的结果,联想到一些传统的 SCM 上去。 - -**Q:在 Transmeta(全美达)上他们有备用指令集实现的经验吗?[Transmeta Crusoe 芯片看起来像一个非常弱的 CPU — 记得有一台 Burroughs B1000 的解释器,它实际上实现了多个虚拟机。有一台是用于系统软件,一台是用于 Cobol,一台用于 Fortran;如果没错的话,那么一个人可以在芯片上实现 Burroughs 6/7000 或者 HP3000 类似的堆栈架构或适用于 JVM 的指令集,等等。]** - -Linus:我们确实有一些备选的结构集合,我仍然不打算谈论这个,我可以说我们已经做了一个混合结构集合的公开演示。我们有一个技术展示,在那里你同时可以跑x86结构和 Java 字节码(实际上,它是一个轻量的扩展 pico—java,iirc)。 - -我想我们展示的这个应用会在 Linux 上运行 DOOM,这里 Linux 的部分是一个完全标准 x86 发行版。但是 DOOM 的二进制程序是一个 test 编译版本,它实际上编译为 pico-java 代码。而 CPU 最终以相同的方式来运行它们——从 JIT 到原生 VLIW 指令集。 - -(选择 DOOM 的原因仅仅是其源代码可用,并且游戏的核心部分非常小,足以很容易拿它来做一个验证 — 而且它也显然看起来十分有趣。) - -有更多的事情是在内部运作,但是我不能谈论他们。而且实际上,就我个人而言,对 Java 不怎么感冒。 - -**Q:386BSD 衍生了 NetBSD,FreeBSD 和 OpenBSD,在 Linux 出现之前已经发展不错了,但是 Linux 传播比 386BSD 及其衍生者更为广泛。这在多大程度上左右你对许可证的选择,这个选择的发展过程是怎样的?你不认为比起 GPLv2 来,是 GPLv3 保护了自由,迄今为止,让 Linux 比 BSD 变得更好?** - -Linus:我认为这是一个许可证问题和一个社区及人格问题。BSD 的许可证总是鼓励分叉,但是这也意味着,如果某些人取得了成功并做了商业性的分叉,他并不需要将将他的修改返回来。因此,实际上并不会真的发生这种事情(以 BSD 而言,如 BSDi),人们并不真的彼此‘信任’。 - -相比之下,GPLv2 也鼓励分叉,但是它不仅仅鼓励分叉出去,它也鼓励(并‘要求’)能够融合回来。所以,我们现在达到了新的层次的信任:你‘知道’每个人都被许可证所约束,所以不会试着从你这里白白占走好处。 - -所以,在我看来,GPLv2 作为许可证来说,它允许人们在要求总是回馈贡献的前提下,在另外的方面取得了最大可能的自由。没有人能阻止你对源代码的改进。 - -那么,BSD 许可证是更‘自由’的吗?是的,毫无疑问。但是我不会在我在意的任何项目里面使用 BSD 许可证,因为我不仅仅想要自由,我也想要信任,可以让我总是能使用其他人为我的项目所写的代码。 - -所以对于我来说,GPLv2 最终在‘尽可能自由’上取得了完美的平衡,这样,我们做到了让每个人都能信任,他们总是可以取得源代码并使用它。 - -这就是为什么我认为 GPLv3 最终并没多大意思,它不再是那种‘返回源代码’的信任;它退化成了‘我写了这些代码,所以我能控制你如何使用它’。 - -换言之,我只是觉得 GPLv3 太狭隘和自私了。我认为 GPLv2 在‘自由’和‘信任’之间取得伟大的平衡。它不如 BSD 许可证自由,但是它让你安心回馈,而且它符合我认为的‘以德报德’:我给你源代码,你也回馈我源代码。 - -而 GPLv3 试着控制源代码的‘使用’。现在它就是“我给你我的源代码,如果你使用它的话,你最好可以让我对你的设备动手动脚”,看见了没?在我看来,不但小气,而且小心眼。 - -**Q:-rt 树的功能正在缓慢而稳定地逐渐集成到主线代码中。你当前对合并剩余的 -rt 树到主线代码的看法是什么?(我说的不是 CFS)** - -Linus: 我不能保证来自 -rt 的一切‘都’会被合并进入标准内核(有一些部分肯定不适合常规的内核),不过是的,这些年来我们实际上将它的大部分都集成进去了,剩下的部分最终以后也会合并进去。 - -我提倡高效工作,但是我同时也很保守。我退回了一些激进的合并请求,只是因为我需要确保它们对所有人都有意义,不仅仅是用于极端情况下的实时环境,而且也对并不需要这种环境的‘普通’用户有用。这解释了为什么这个过程相当缓慢却稳定不断地合并代码,因为它需要足够稳定和有意义。 - -顺便说一句,这不仅仅是针对 -rt ,它也在许多开发中出现。-rt 出现这种情况是因为它是更‘直接’的内核项目,而且也是因为它的一个主要开发者也直接涉及到了普通的内核开发。通常其它功能的迁移(安全、虚拟内核变化、虚拟化,等等)也遵循类似的方式:他们针对特定的环境进行开发,然后这些功能片段缓慢而稳步地合并到标准内核。 - - -**Q:我对 Linux 内核支持的文件系统的发展很感兴趣。你觉得 Reiser4、XFS4、ZFS 以及 Oracle 发起那个新项目那个更有前途?这些天 ZFS 有不少新闻,Reiser4 也发布了很不错的性能基准测试,XFS4 正紧随其后,而 Oracle 发布的那个也有很多像 Sun 的 ZFS 一样的特性。我们将走向何方呢?以你的观点来看,哪个文件系统更有前途?** - -Linus: 实际上,就在昨天我们发现了一个 git 的性能问题,有一个用户他采用 ZFS 要比 UFS 慢一个数量级(不是在 Linux 下,git 已经得到了许多关注,甚至是在内核开发团队之外)。所以,我认为许多‘新文件系统’的拥护者部分原因是因为他们了解到旧文件系统的不足,然后(有点不切实际地)期望一个‘崭新的、改进的’文件系统能使一切都完美。 - -最后,这是一个永无止境的领域,看看谁是最终的赢家——也许并不需要(看起来不需要)一个赢家。几乎总是这样,对文件系统的选择最终取决于负载和环境。 - -相比你提到的这些文件系统,我个人对基于闪存的硬盘很快就可以供甚至是‘普通’用户使用的这个事实更感到兴奋。当然,它们仍然很昂贵(而且相当的小),但是基于闪存的存储和旋转介质的性能完全不可同日而语,我怀疑它们最终将对文件系统的设计有巨大的影响。而现在,多数文件系统的设计都是在考虑如何处理旋转介质的延迟。 - -**Q:操作系统变得越来越不重要。你说过好几次用户根本不应该‘看见’操作系统。应用更为重要。基于浏览器的应用,如 Google 的基本办公软件正在发挥影响力。你认为操作系统将走向何方?** - -Linus:我并不真的相信‘浏览器 OS’,因为我认为人们总是需要在本地做一些事情。也许是因为安全,或者仅仅是因为隐私的原因。而且当到处可以接入时,它也并不是‘无处不在’。 - -所以我认为,整个‘Web OS’这件事有一部分是真实的,但是另外一部分人们也许忘记了操作系统已经存在了几十年,它已经相当稳定,而且它的发展是有目共睹的。人们真的不应该期望操作系统有魔法般的变化:人们并不能回到‘傻傻的’六十年代,甚至连硬件也和过去的‘那个’完全不同了! - -所以,别指望一场革命。我认为操作系统将更多继续它们所做哪些事情,当然,我们也会进步,但是我不认为会从根本上改变。也许会发生根本性改变的是界面和操作系统顶层的哪些东西(当然,操作系统下面的硬件也会继续进步),这显然才是人们所关心的。 - -至于操作系统?它显然是应该尽可能隐藏起来的东西。你真的不应该在意它,除非你非常想知道在机器里面真正在做什么。 - -**Q:最近我听说,你正在使用一台 PPC G4/5 作为个人计算机,你使用它来做什么?为什么呢?** - -Linus:我最终放弃了那台 PowerPC,因为没有人能在这台工作站上做的更多,特别是,自从 x86-64 开始变得越来越强大了。所以这些天,我在用一台标准的 PC,里面是一个普通的 Core 2 Duo CPU。 - -在其它架构下运行是非常有趣的(我把 alpha 作为我的主要架构运行了好几年,所以这并不是第一次),但是这种 CPU 得当成商品买得到才行。我认为,唯一能取代 x86 架构的将来自以下,比如也许我们将来十年并不需要使用 x86 作为我们的主要架构,我认为也许是 ARM,这得益于移动设备市场。 - -**Q:Linux 对你意味着什么?一种业余爱好、哲学、人生意义、工作、最好的操作系统,还是什么?** - -Linus:它是所有的这一切。它是爱好,而且是具有深刻意义的爱好。最好的爱好是你‘真的’非常在意它。这些日子里,它显示也是我的工作,我非常高兴工作和兴趣能合二为一。 - -我不了解所谓的‘哲学’,我并不真的是因为深层次的道德或哲学的原因才做的 Linux (字面上的做是因为它有趣),但是可以肯定的是,我欣赏我认为开源为何这么棒的深层原因。所以我并不是因为什么高大上的理由做 Linux 的,而且我不能诚恳地说是它在激励我,但是我最终会思考为什么会这样。 - -**Q:微软的‘黑衣人’有没有和你交谈过?** - -Linus:我从来没有真正和微软交谈过,没有。我偶尔会和一些微软的人出现再同一个会议上(我比以前参加的会议更多了),但是我从来和他们没有任何关系。我认为彼此都很谨慎吧。 - --------------------------------------------------------------------------------- - -via: http://www.linuxveda.com/2015/06/17/what-happens-to-linux-after-linus/ - -作者:[Swapnil Bhartiya][a] -译者:[wi-cuckoo](https://github.com/wi-cuckoo),[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxveda.com/author/arnieswap/ - From c61495a3defd329e5364a3882a8d703bdc09d3ea Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 7 Jul 2015 09:26:45 +0800 Subject: [PATCH 1337/2517] [Translated]20150515 Lolcat--A Command Line Tool to Output Rainbow of Colors in Linux Terminal.md --- ...put Rainbow Of Colors in Linux Terminal.md | 178 ------------------ ...put Rainbow Of Colors in Linux Terminal.md | 175 +++++++++++++++++ 2 files changed, 175 insertions(+), 178 deletions(-) delete mode 100644 sources/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md create mode 100644 translated/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md diff --git a/sources/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md b/sources/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md deleted file mode 100644 index 194b295ab9..0000000000 --- a/sources/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md +++ /dev/null @@ -1,178 +0,0 @@ -FSSlc translating - -Lolcat – A Command Line Tool to Output Rainbow Of Colors in Linux Terminal -================================================================================ -For those who believe that Linux Command Line is boring and there isn’t any fun, then you’re wrong here are the articles on Linux, that shows how funny and naughty is Linux.. - -- [20 Funny Commands of Linux or Linux is Fun in Terminal][1] -- [6 Interesting Funny Commands of Linux (Fun in Terminal)][2] -- [Fun in Linux Terminal – Play with Word and Character Counts][3] - -Here in this article, I will be discussing about a small utility called “lolcat” – Which produce rainbow of colors in terminal. - -![Lolcat Command to Output Rainbow of Colors for Terminal](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Lolcat.png) - -Lolcat Command to Output Rainbow of Colors for Terminal - -#### What is lolcat? #### - -Lolcat is an utility for Linux, BSD and OSX which concatenates like similar to [cat command][4] and adds rainbow coloring to it. Lolcat is primarily used for rainbow coloring of text in Linux Terminal. - -### Installation of Lolcat in Linux ### - -**1. Lolcat utility is available in the repository of lots of Linux distributions, but the available version bit older. Alternatively you can download and install latest version of lolcat from git repository.** - -Lolcat is a ruby gem hence it is essential to have latest version of RUBY installed on your system. - - # apt-get install ruby [On APT based Systems] - # yum install ruby [On Yum based Systems] - # dnf install ruby [On DNF based Systems] - -Once ruby package has been installed, make sure to verify the version of ruby installed. - - # ruby --version - - ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu] - -**2. Next download and install the most recent version of lolcat from the git repository using following commands.** - - # wget https://github.com/busyloop/lolcat/archive/master.zip - # unzip master.zip - # cd lolcat-master/bin - # gem install lolcat - -Once lolcat is installed, you can check the version. - - # lolcat --version - - lolcat 42.0.99 (c)2011 moe@busyloop.net - -### Usage of Lolcat ### - -**3. Before starting usage of lolcat, make sure to know the available options and help using following command.** - - # lolcat -h - -![Lolcat Help](http://www.tecmint.com/wp-content/uploads/2015/06/Lolcat-Help1.png) - -Lolcat Help - -**4. Next, pipeline lolcat with commads say ps, date and cal as:** - - # ps | lolcat - # date | lolcat - # cal | lolcat - -![ps Command Output](http://www.tecmint.com/wp-content/uploads/2015/06/ps-command-output.png) - -ps Command Output - -![Date Output](http://www.tecmint.com/wp-content/uploads/2015/06/Date.png) - -Date Output - -![Calendar Output](http://www.tecmint.com/wp-content/uploads/2015/06/Cal.png) - -Calendar Output - -**5. 3. Use lolcat to display codes of a script file as:** - - # lolcat test.sh - -![Display Codes with Lolcat](http://www.tecmint.com/wp-content/uploads/2015/06/Script-Output.png) - -Display Codes with Lolcat - -**6. Pipeline lolcat with figlet command. Figlet is a utility which displays large characters made up of ordinary screen characters. We can pipeline the output of figlet with lolcat to make the output colorful as:** - - # echo I ❤ Tecmint | lolcat - # figlet I Love Tecmint | lolcat - -![Colorful Texts](http://www.tecmint.com/wp-content/uploads/2015/06/Colorful-Text.png) - -Colorful Texts - -**Note**: Not to mention that ❤ is an unicode character and to install figlet you have to yum and apt to get the required packages as: - - # apt-get figlet - # yum install figlet - # dnf install figlet - -**7. Animate a text in rainbow of colours, as:** - - $ echo I ❤ Tecmit | lolcat -a -d 500 - -![Animated Text](http://www.tecmint.com/wp-content/uploads/2015/06/Animated-Text.gif) - -Animated Text - -Here the option -a is for Animation and -d is for duration. In the above example duration count is 500. - -**8. Read a man page (say man ls) in rainbow of colors as:** - - # man ls | lolcat - -![List Files Colorfully](http://www.tecmint.com/wp-content/uploads/2015/06/List-Files-Colorfully.png) - -List Files Colorfully - -**9. Pipeline lolcat with cowsay. cowsay is a configurable thinking and/or speaking cow, which supports a lot of other animals as well.** - -Install cowsay as: - - # apt-get cowsay - # yum install cowsay - # dnf install cowsay - -After install, print the list of all the animals in cowsay as: - - # cowsay -l - -**Sample Output** - - Cow files in /usr/share/cowsay/cows: - apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default - dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep - ghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koala - mech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheep - skeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkey - turtle tux unipony unipony-smaller vader vader-koala www - -Output of cowsay pipelined with lolcat and ‘gnu‘ cowfile is used. - - # cowsay -f gnu ☛ Tecmint ☚ is the best Linux Resource Available online | lolcat - -![Cowsay with Lolcat](http://www.tecmint.com/wp-content/uploads/2015/06/Cowsay-with-Lolcat.png) - -Cowsay with Lolcat - -**Note**: You can use lolcat with any other command in pipeline and get colored output in terminal. - -**10. You may create alias for the most frequently used commands to get command output in rainbow of colors. You can alias ‘ls -l‘ command which is used for long list the contents of directory as below.** - - # alias lolls="ls -l | lolcat" - # lolls - -![Alias Commands with Colorful](http://www.tecmint.com/wp-content/uploads/2015/06/Alias-Commands-with-Colorful.png) - -Alias Commands with Colorful - -You may create alias for any command as suggested above. To create permanent alias, you have to add the relevant code (above code for ls -l alias) to ~/.bashrc file and also make sure to logout and login back for the changes to be taken into effect. - -That’s all for now. I would like to know if you were aware of lolcat previously? Did you like the post? And suggestion and feedback is welcome in the comment section below. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/lolcat-command-to-output-rainbow-of-colors-in-linux-terminal/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/20-funny-commands-of-linux-or-linux-is-fun-in-terminal/ -[2]:http://www.tecmint.com/linux-funny-commands/ -[3]:http://www.tecmint.com/play-with-word-and-character-counts-in-linux/ -[4]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ diff --git a/translated/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md b/translated/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md new file mode 100644 index 0000000000..4ce0ef80d0 --- /dev/null +++ b/translated/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md @@ -0,0 +1,175 @@ +Lolcat – 一个在 Linux 终端中输出彩虹特效的命令行工具 +================================================================================ +那些相信 Linux 命令行是单调无聊且没有任何乐趣的人们,你们错了,这里有一些有关 Linux 的文章,它们展示着 Linux 是如何的有趣和“淘气” 。 + +- [20 个有趣的 Linux 命令或在终端中 Linux 是有趣的][1] +- [6 个有趣的好玩 Linux 命令(在终端中的乐趣)][2] +- [在 Linux 终端中的乐趣 – 把玩文字和字符计数][3] + +在本文中,我将讨论一个名为“lolcat”的应用 – 它在终端中生成彩虹般的颜色。 + +![为终端生成彩虹般颜色的输出的 Lolcat 命令](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Lolcat.png) + +为终端生成彩虹般颜色的输出的 Lolcat 命令 + +#### 何为 lolcat ? #### + +Lolcat 是一个针对 Linux,BSD 和 OSX 平台的应用,它类似于 [cat 命令][4],并为 `cat` 的输出添加彩虹般的色彩。 Lolcat 原本用于在 Linux 终端中为文本添加彩虹般的色彩。 + +### 在 Linux 中安装 Lolcat ### + +**1. Lolcat 应用在许多 Linux 发行版本的软件仓库中都可获取到,但可获得的版本都有些陈旧,而你可以通过 git 仓库下载和安装最新版本的 lolcat。** + +由于 Lolcat 是一个 ruby gem 程序,所以在你的系统中安装有最新版本的 RUBY 是必须的。 + + # apt-get install ruby [在基于 APT 的系统中] + # yum install ruby [在基于 Yum 的系统中] + # dnf install ruby [在基于 DNF 的系统中] + +一旦 ruby 软件包安装成功,请确保验证安装的 ruby 的版本。 + + # ruby --version + + ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu] + +**2. 接着使用下面的命令来从 lolcat 的 git 仓库中下载和安装最新版本的 lolcat。** + + # wget https://github.com/busyloop/lolcat/archive/master.zip + # unzip master.zip + # cd lolcat-master/bin + # gem install lolcat + +一旦 lolcat 安装后,你可以检查它的版本号。 + + # lolcat --version + + lolcat 42.0.99 (c)2011 moe@busyloop.net + +### Lolcat 的用法 ### + +**3. 在开始使用 lolcat 之前,使用下面的命令来了解它可用的选项和其帮助文档。** + + # lolcat -h + +![Lolcat 的帮助文档](http://www.tecmint.com/wp-content/uploads/2015/06/Lolcat-Help1.png) + +Lolcat 的帮助文档 + +**4. 接着, 通过管道连接 lolcat 和其他命令,例如 ps, date 和 cal:** + + # ps | lolcat + # date | lolcat + # cal | lolcat + +![ps 命令的输出](http://www.tecmint.com/wp-content/uploads/2015/06/ps-command-output.png) + +ps 命令的输出 + +![Date 的输出](http://www.tecmint.com/wp-content/uploads/2015/06/Date.png) + +Date 的输出 + +![Calendar 的输出](http://www.tecmint.com/wp-content/uploads/2015/06/Cal.png) + +Calendar 的输出 + +**5. 使用 lolcat 来展示一个脚本文件的代码:** + + # lolcat test.sh + +![用 lolcat 来展示代码](http://www.tecmint.com/wp-content/uploads/2015/06/Script-Output.png) + +用 lolcat 来展示代码 + +**6. 通过管道连接 lolcat 和 figlet 命令。Figlet 是一个展示由常规的屏幕字符组成的巨大字符串的应用。我们可以通过管道将 figlet 的输出连接到 lolcat 中来给出如下的多彩输出:** + + # echo I ❤ Tecmint | lolcat + # figlet I Love Tecmint | lolcat + +![多彩的文字](http://www.tecmint.com/wp-content/uploads/2015/06/Colorful-Text.png) + +多彩的文字 + +**注**: 毫无疑问 ❤ 是一个 unicode 字符并且为了安装 figlet,你需要像下面那样使用 yum 和 apt 来得到这个软件包: + + # apt-get figlet + # yum install figlet + # dnf install figlet + +**7. 给文本赋予彩虹颜色的动画:** + + $ echo I ❤ Tecmit | lolcat -a -d 500 + +![动的文本](http://www.tecmint.com/wp-content/uploads/2015/06/Animated-Text.gif) + +动的文本 + +这里选项 `-a` 指的是 Animation(动画), `-d` 指的是 duration(持续时间)。在上面的例子中,持续 500 次动画。 + +**8. 在彩虹般的颜色下阅读 man 页(例如 `man ls`):** + + # man ls | lolcat + +![多彩地显示文件](http://www.tecmint.com/wp-content/uploads/2015/06/List-Files-Colorfully.png) + +多彩地显示文件 + +**9. 通过管道连接 lolcat 和 cowsay。cowsay 是一个可配置的正在思考或说话的奶牛,这个程序也支持其他的动物。** + +使用下面的命令来安装 cowsay : + + # apt-get cowsay + # yum install cowsay + # dnf install cowsay + +安装后,使用下面的命令来显示在 cowsay 中的所有动物: + + # cowsay -l + +**样例输出** + + Cow files in /usr/share/cowsay/cows: + apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default + dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep + ghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koala + mech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheep + skeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkey + turtle tux unipony unipony-smaller vader vader-koala www + +通过管道连接 lolcat 和 cowsay 后的输出,并且使用了‘gnu’cowfile。 + + # cowsay -f gnu ☛ Tecmint ☚ is the best Linux Resource Available online | lolcat + +![使用 Lolcat 的 Cowsay](http://www.tecmint.com/wp-content/uploads/2015/06/Cowsay-with-Lolcat.png) + +使用 Lolcat 的 Cowsay + +**注**: 你可以在管道中使用 lolcat 和其他任何命令来在终端中得到彩色的输出。 + +**10. 你可以为最常用的命令创建别名来使得命令的输出呈现出彩虹般的色彩。你可以像下面那样为 ‘ls -l‘ 命令创建别名,这个命令输出一个目录中包含内容的列表。** + + # alias lolls="ls -l | lolcat" + # lolls + +![多彩的 Alias 命令](http://www.tecmint.com/wp-content/uploads/2015/06/Alias-Commands-with-Colorful.png) + +多彩的 Alias 命令 + +你可以像上面建议的那样,为任何命令创建别名。为了使得别名永久生效,你必须添加相关的代码(上面的代码是 ls -l 的别名) 到 ~/.bashrc 文件中,并确保登出后再重新登录来使得更改生效。 + +现在就是这些了。我想知道你是否曾经注意过 lolcat 这个应用?你是否喜欢这篇文章?欢迎在下面的评论环节中给出你的建议和反馈。喜欢并分享我们,帮助我们传播。 +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/lolcat-command-to-output-rainbow-of-colors-in-linux-terminal/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/20-funny-commands-of-linux-or-linux-is-fun-in-terminal/ +[2]:http://www.tecmint.com/linux-funny-commands/ +[3]:http://www.tecmint.com/play-with-word-and-character-counts-in-linux/ +[4]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ \ No newline at end of file From fa1cf6334af8412b300d0e80a7b31f54cdb20a19 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 7 Jul 2015 09:30:24 +0800 Subject: [PATCH 1338/2517] Update 20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译这篇文章。 --- ...anced 'cd' Command to Quickly Navigate Linux Filesystem.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md b/sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md index d7d1cdf7ee..ac4f53cf6f 100644 --- a/sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md +++ b/sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md @@ -1,3 +1,5 @@ +FSSlc Translating + Autojump – An Advanced ‘cd’ Command to Quickly Navigate Linux Filesystem ================================================================================ Those Linux users who mainly work with Linux command Line via console/terminal feels the real power of Linux. However it may sometimes be painful to navigate inside Linux Hierarchical file system, specially for the newbies. @@ -219,4 +221,4 @@ via: http://www.tecmint.com/autojump-a-quickest-way-to-navigate-linux-filesystem [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/cd-command-in-linux/ [2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ -[3]:http://www.tecmint.com/manage-linux-filenames-with-special-characters/ \ No newline at end of file +[3]:http://www.tecmint.com/manage-linux-filenames-with-special-characters/ From ff56e2de0cd9fb2a1467fb2aac6b5315d9b1684b Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 7 Jul 2015 10:55:44 +0800 Subject: [PATCH 1339/2517] Finish the translation by ZTinoZ --- ...re Made Easy with these Dedicated Tools.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) rename {sources => translated}/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md (89%) diff --git a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md b/translated/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md similarity index 89% rename from sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md rename to translated/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md index f8ac9a2db1..b2408dbeee 100644 --- a/sources/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md +++ b/translated/share/20150625 Screen Capture Made Easy with these Dedicated Tools.md @@ -117,25 +117,25 @@ ScreenCloud是一款易于使用的开源截图工具。 ![KSnapShot in action](http://www.linuxlinks.com/portal/content/reviews/Graphics/Screenshot-KSnapshot.png) -KSnapshot is a simple utility for taking screenshots. It can capture images of the whole desktop, a single window, a section of a window or a selected region. Images can then be saved in a variety of different formats. +KSnapshot也是一款易于使用的截图工具,它能给整个桌面、一个单一窗口、窗口的一部分或一块所选区域捕捉图像。,图像能以各种不用的格式保存。 -KSnapshot also allows users to use hotkeys to take a screenshot. Besides saving the screenshot, it can be copied to the clipboard or opened with any program that is associated with image files. +KSnapshot也允许用户用热键来进行截图。除了保存截图之外,它也可以被复制到剪贴板或用任何与图像文件关联的程序打开。 -KSnapshot is part of the KDE 4 graphics module. +KSnapshot是KDE 4图形模块的一部分。 -Features include: +包含特性: -- Save snapshot in multiple formats -- Snapshot delay -- Exclude window decorations -- Copy the snapshot to the clipboard -- Hotkeys -- Can be scripted using its D-Bus interface +- 以多种格式保存截图 +- 延迟截图 +- 剔除窗口装饰图案 +- 复制截图至剪贴板 +- 热键 +- 能用它的D-Bus界面进行脚本化 -- Website: [www.kde.org][4] -- Developer: KDE, Richard J. Moore, Aaron J. Seigo, Matthias Ettrich -- License: GNU GPL v2 -- Version Number: 0.8.2 +- 主页: [www.kde.org][4] +- 开发者: KDE, Richard J. Moore, Aaron J. Seigo, Matthias Ettrich +- 许可证: GNU GPL v2 +- 版本号: 0.8.2 -------------------------------------------------------------------------------- From 8da4a84b370c261bcfb447eacda6a11ab494faa0 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 7 Jul 2015 22:54:33 +0800 Subject: [PATCH 1340/2517] PUB:20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux @zpl1025 --- ... Spaces and Special Characters in Linux.md | 59 +++++++++---------- 1 file changed, 28 insertions(+), 31 deletions(-) rename {translated/tech => published}/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md (81%) diff --git a/translated/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md b/published/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md similarity index 81% rename from translated/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md rename to published/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md index 61a320aeb8..93a8868639 100644 --- a/translated/tech/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md +++ b/published/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md @@ -1,8 +1,8 @@ Linux 下如何处理包含空格和特殊字符的文件名 ================================================================================ -我们经常会看到文件名和文件夹名。大多数时候文件/文件夹的名字和内容相关并以数字和字母开头。字母-数字文件名最常见,应用也很广泛,但总会需要处理一些包含特殊字符的文件名/文件夹名。 +我们经常会看到文件名和文件夹名。大多数时候文件/文件夹的名字和内容相关并以数字和字母开头。字母加数字的文件名最常见,应用也很广泛,但总会需要处理一些包含特殊字符的文件名/文件夹名。 -** 注意 **:我们可能有各种类型的文件,但是为了简单以及方便实现,在本文中我们只处理文本文件(.txt)。 +** 注意 **:我们可能有各种类型的文件,但是为了简单以及方便实现,在本文中我们只用文本文件(.txt)做演示。 最常见的文件名例子: @@ -38,9 +38,9 @@ Linux 下如何处理包含空格和特殊字符的文件名 --bk34.txt ... -一个显而易见的问题是 - 在这个星球上有谁会创建/处理包含井号`(#)`,分号`(;)`,破折号`(-)`或其他特殊字符的文件/文件夹啊。 +一个显而易见的问题是 - 在这个星球上有谁会创建和处理包含井号`(#)`,分号`(;)`,破折号`(-)`或其他特殊字符的文件/文件夹啊。 -我和你想的一样,这种文件名确实不常见,不过在你必须得处理这种文件名的时候你的 shell 也不应该出错或罢工。而且技术上来说,Linux 下的一切比如文件夹,驱动器或其他所有的都被当作文件处理。 +我和你想的一样,这种文件名确实不常见,不过在你必须得处理这种文件名的时候你的 shell 也不应该出错或罢工。而且技术上来说,Linux 下的一切比如文件夹、驱动器或其他所有的都被当作文件处理。 ### 处理名字包含破折号(-)的文件 ### @@ -99,9 +99,9 @@ Linux 下如何处理包含空格和特殊字符的文件名 **重要:** -1. 上面讨论的规则可以同样应用于名字中包含任意数量以及位置连接符号的文件。就是说,-a-b-c.txt,ab-c.txt,abc-.txt,等等。 +1. 上面讨论的规则可以同样应用于名字中包含任意数量以及任意位置的连接符号的文件。就是说,-a-b-c.txt,ab-c.txt,abc-.txt,等等。 -2. 上面讨论的规则可以同样应用于名字中包含任意数量以及位置连接符号的文件夹,除了一种情况,在删除一个文件夹的时候你得这样使用`rm -rf`: +2. 上面讨论的规则可以同样应用于名字中包含任意数量以及任意位置连接符号的文件夹,除了一种情况,在删除一个文件夹的时候你得这样使用`rm -rf`: $ rm -rf -- -abc 或者 @@ -124,7 +124,7 @@ Linux 下如何处理包含空格和特殊字符的文件名 出现上面错误的原因是,BASH 将 #abc.txt 解释为评论而忽略了。所以[命令 touch][2]没有收到任何文件作为参数,所以导致这个错误。 -要解决这个问题,你肯能需要告诉 BASH 不要将 # 解释为评论。 +要解决这个问题,你可能需要告诉 BASH 不要将 # 解释为评论。 $ touch ./#abc.txt 或者 @@ -140,8 +140,7 @@ Linux 下如何处理包含空格和特殊字符的文件名 现在创建名字中除了开头的其他地方包含 # 的文件。 $ touch ./a#bc.txt - $ touch ./abc#.txt - + $ touch ./abc#.txt 或者 $ touch 'a#bc.txt' $ touch 'abc#.txt' @@ -197,8 +196,6 @@ Linux 下如何处理包含空格和特殊字符的文件名 或者 $ vi '#cd.txt' ----------- - $ nano ./#cd.txt 或者 $ nano '#cd.txt' @@ -261,7 +258,7 @@ Linux 下如何处理包含空格和特殊字符的文件名 #### 文件名包含星号 (*) #### -名字包含星号的文件没有改变太多,你仍然可以把它当作一个普通文件。(注:星号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) +需要用单引号括起来或使用反斜杠转义。(LCTT 译注:此处原文有误,已修改。) $ touch *12.txt @@ -271,9 +268,9 @@ Linux 下如何处理包含空格和特殊字符的文件名 或者 $ rm -rf * -而是用这样的命令,(注:这个命令是删除当前目录所有.txt文件。。。) +而是用这样的命令,(LCTT 译注:此处原文有误,已修改) - $ rm ./*.txt + $ rm ./'*.txt' #### 文件名包含叹号 (!) #### @@ -307,9 +304,9 @@ Linux 下如何处理包含空格和特殊字符的文件名 #### 文件名包含花括号 {} #### -不需要特别注意。可以当作普通文件处理。(注:花括号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) +用单引号括起来或使用反斜杠转义。(LCTT 译注:此处原文有误,已修改) - $ touch {12.txt} + $ touch '{12.txt}' #### 文件名包含尖括号 <> #### @@ -319,21 +316,21 @@ Linux 下如何处理包含空格和特殊字符的文件名 #### 文件名包含方括号 [ ] #### -名字包含方括号的文件可以当作普通文件,不用特别处理。(注:方括号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) +用单引号括起来或使用反斜杠转义。(LCTT 译注:此处原文有误,已修改) - $ touch [12.txt] + $ touch '[12.txt]' #### 文件名包含下划线 (_) #### -这个非常普遍不需要特殊对待。当作普通文件随意处理。 +这个非常普遍,不需要特殊对待。当作普通文件随意处理。 $ touch _12.txt #### 文件名包含等号 (=) #### -文件名包含等号不会改变任何事情,你可以当作普通文件。(注:等号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) +用单引号括起来或使用反斜杠转义。(LCTT 译注:此处原文有误,已修改) - $ touch =12.txt + $ touch '=12.txt' #### 处理反斜杠 (\) #### @@ -349,9 +346,9 @@ Linux 下如何处理包含空格和特殊字符的文件名 #### 文件名包含问号 (?) #### -再一次,这个也是不需要特别处理的情况。名字包含问号的文件可以和大多数情况一样对待。(注:问号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) +用单引号括起来或使用反斜杠转义。(LCTT 译注:此处原文有误,已修改) - $ touch ?12.txt + $ touch '?12.txt' #### 文件名包含点 (.) #### @@ -382,25 +379,25 @@ Linux 下如何处理包含空格和特殊字符的文件名 #### 文件名包含冒号 (:) #### -你可以在文件名中使用冒号,可以有任意多个而不用特殊对待。就像平时普通名字文件那样处理。(注:冒号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) +用单引号括起来或使用反斜杠转义。(LCTT 译注:此处原文有误,已修改) - $ touch :12.txt + $ touch ':12.txt' 或者 - $ touch :12:.txt + $ touch ':12:.txt' #### 文件名包含引号(单引号和双引号) #### -要在文件名里使用引号,我们需要使用交替规则。例如,如果你需要在文件名里使用单引号,那就用双引号把文件名括起来。而如果你需要在文件名里使用双引号,那就用单引号把文件名括起来。 +要在文件名里使用引号,我们需要使用交替规则。例如,如果你需要在文件名里使用单引号,那就用双引号把文件名括起来。而如果你需要在文件名里使用双引号,那就用单引号把文件名括起来。(LCTT 译注:或者如果单引号和双引号混杂的情况,你也可以用反斜杠转义。) $ touch "15'.txt" 以及 - $ touch '15”.txt' + $ touch '15".txt' #### 文件名包含波浪号 (~) #### -Linux 下一些像 emacs 这样的文本编辑器在编辑文件的时候会创建备份文件。这个备份文件的名字是在原文件名后面附加一个波浪号。你可以在文件名任意位置使用波浪号,例如:(注:波浪号在 shell 里有特殊意义,用作文件名最好用单引号括起来或使用反斜杠转义) +Linux 下一些像 emacs 这样的文本编辑器在编辑文件的时候会创建备份文件。这个备份文件的名字是在原文件名后面附加一个波浪号。你可以在文件名任意位置使用波浪号,例如: $ touch ~1a.txt 或者 @@ -426,10 +423,10 @@ via: http://www.tecmint.com/manage-linux-filenames-with-special-characters/ 作者:[Avishek Kumar][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者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/avishek/ -[1]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ +[1]:https://linux.cn/article-5349-1.html [2]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ From f97e0ac63b93763a7cf01fdba3a2acfc8db77391 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 7 Jul 2015 23:46:04 +0800 Subject: [PATCH 1341/2517] PUB:20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux @wwy-hust --- ...ser for Anonymous Web Browsing in Linux.md | 215 ++++++++++++++++++ ...ser for Anonymous Web Browsing in Linux.md | 206 ----------------- 2 files changed, 215 insertions(+), 206 deletions(-) create mode 100644 published/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md delete mode 100644 translated/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md diff --git a/published/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md b/published/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md new file mode 100644 index 0000000000..6df604eac1 --- /dev/null +++ b/published/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md @@ -0,0 +1,215 @@ +Tor浏览器:Linux下用于匿名Web浏览的终极浏览器 +================================================================================ +我们大多数人都在上网方面花费很多时间。上网使用的应用程序主要是浏览器,更确切的说是一个Web浏览器。我们在网络上的大部分活动要以客户端/服务器的方式登录,这个过程会包括IP地址、地理信息、搜索、活动以及许多潜在的信息,这些信息如果以其他方式被故意使用,会存在潜在的危险性。 + +![在Linux中安装Tor浏览器](http://www.tecmint.com/wp-content/uploads/2014/04/Install-tor-browser-in-linux.jpg) + +*Tor浏览器:匿名浏览器* + +此外,美国国家安全局(NSA)这样的国际间谍机构会记录我们的数字足迹。更不必说受到控制的代理服务器也会被用来做为数据搜集服务器。并且大多数企业和公司不会允许您访问代理服务器(使您能保障自己的隐私)。 + +因此,我们需要的最好是一个小型、独立、可携带的应用程序,它能达到匿名的效果。Tor浏览器便是这样的一个应用,它拥有上面提到的所有功能,甚至不止于此。 + +这篇文章里我们会讨论Tor浏览器,它的功能、使用方式、领域、安装以及其他关于Tor浏览器的重要方面。 + +### 什么是Tor浏览器? ### + +Tor是一个自由分发的应用软件,以BSD许可证发布,通过其安全可靠的洋葱式的结构,允许用户匿名的进行网络浏览。从前,由于它的结构和运作机制,Tor被称为‘洋葱路由器’。这个应用是由C语言写成的。 + +#### Tor浏览器的功能 #### + +- 跨平台可用。例如,这个应用程序在Linux、Windows和Mac下都可用。 +- 在发送数据到因特网前进行复杂的数据加密。 +- 在客户端进行数据自动解密。 +- 它是火狐浏览器和Tor工程的结合。 +- 对服务器和网站提供匿名性。 +- 可以访问被限制的网站。 +- 无需暴露源IP便可以执行任务。 +- 可以将数据路由至/从防火墙后隐藏的服务和应用程序。 +- 便携性 - 可以直接从USB存储棒上运行一个预配置的web浏览器。无需本地安装。 +- 在x86和x86_64平台均可用 +- 可以配置为一个运行在“localhost”的“9050”端口上的“socks4a”代理来让FTP跑在Tor 上。 +- Tor拥有处理上千的中继和上百万用户的能力。 + +#### Tor浏览器如何工作? #### + +Tor的工作方式基于洋葱路由的概念。洋葱路由的结构类似洋葱,它的每一层都嵌套在另一层里面,就像洋葱一样。这种嵌套的结构负责多次加密数据并将其通过虚拟电路进行发送。在客户端一侧每一层都在将他传递到下一层之前解密数据。最后一层在将原始数据传递到目的地前解密最里面一层的加密数据。 + +在这个过程里,这种解密整个层的功能设计的如此高明以至于无法追踪IP以及用户的地理位置,因此可以限制任何人观察您访问站点的网络连接。 + +所有这些过程看起来有些复杂,但用户使用Tor浏览器时没有必要担心。实际上,Tor浏览器的功能像其他浏览器一样(尤其是Mozilla的Firefox)。 + +### 在Linux中安装Tor浏览器 ### + +就像上面讨论的一样,Tor浏览器在Linux和Windows以及Mac下都可用。用户需要根据系统和架构的不同在下面的链接处下载最新的版本(例如,Tor浏览器4.0.4)。 + +- [https://www.torproject.org/download/download-easy.html.en][1] + +在下载Tor浏览器后,按说我们需要安装它,但是Tor的好处是我们不需要安装它。它能直接从随身设备中运行,并且该浏览器可以被预配置。这意味着插件和运行的特性可以完美的移植。 + +下载打包文件(*.tar.xz)后我们需要解压它。 + +**32位系统** + + $ wget https://www.torproject.org/dist/torbrowser/4.0.4/tor-browser-linux32-4.0.4_en-US.tar.xz + $ tar xpvf tor-browser-linux32-4.0.4_en-US.tar.xz + +**64位系统** + + $ wget https://www.torproject.org/dist/torbrowser/4.0.4/tor-browser-linux64-4.0.4_en-US.tar.xz + $ tar -xpvf tor-browser-linux64-4.0.4_en-US.tar.xz + +**注意** : 在上面的命令中,我们使用‘$‘意味着这个压缩包应以普通用户而不是root用户来解压。我们强烈建议您不要以root用户解压和运行Tor浏览器。 + +###开始使用Tor浏览器### + +在成功的解压后,我们便可以将解压后的浏览器移动到任何地方/USB存储设备中。并从解压的文件夹以非root用户直接运行‘start-tor-browser’。 + + $ cd tor-browser_en-US + $ ./start-tor-browser + +![开始使用Tor浏览器](http://www.tecmint.com/wp-content/uploads/2014/04/Starting-Tor-Network.jpg) + +*开始使用Tor浏览器* + +####1. 尝试连接到Tor网络#### + +点击“连接”之后Tor将按照设置帮您做剩下的事情。** + +![连接到Tor网络](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Network-Settings.jpg) + +*连接到Tor网络* + +####2. 欢迎窗口/标签。#### + +![Tor欢迎界面](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Welcome-Screen.png) + +*Tor欢迎界面* + +**3. 用Tor浏览器在Youtube上看视频** + +![在Youtube上看视频](http://www.tecmint.com/wp-content/uploads/2014/04/Watching-Video-on-Youtube.jpg) + +*在Youtube上看视频* + +####4. 打开银行网址以进行在线购物和交易#### + +![浏览银行站点](http://www.tecmint.com/wp-content/uploads/2014/04/Browsing-Site.jpg) + +*浏览银行站点* + +####5. 浏览器显示我当前的代理IP#### + +注意其中的文字为“Proxy Server detected”。** + +![检查IP地址](http://www.tecmint.com/wp-content/uploads/2014/04/Checking-IP-Address.jpg) + +*检查IP地址* + +**注意**: 每次您想运行Tor时,您需要在文本模式上运行Tor启动脚本。并且该终端在您运行Tor时会一直被占用。如何克服这些,并创建一个桌面/Dock栏图标呢? + +####6. 我们需要在解压的文件夹中创建`tor.desktop`#### + +$ touch tor.desktop + +接着使用您喜欢的编辑器编辑这个文件,加入下面的文本,这里我使用nano。 + + $ nano tor.desktop + +---------- + + #!/usr/bin/env xdg-open + [Desktop Entry] + Encoding=UTF-8 + Name=Tor + Comment=Anonymous Browse + Type=Application + Terminal=false + Exec=/home/avi/Downloads/tor-browser_en-US/start-tor-browser + Icon=/home/avi/Downloads/tor-browser_en-US/Browser/browser/icons/mozicon128.png + StartupNotify=true + Categories=Network;WebBrowser; + +**注意**: 确保将上面的tor浏览器的路径替换为您的环境中的路径。 + +####7. 一旦搞定后,您就可以双击`tor.desktop`文件来运行Tor浏览器了#### + +您可能需要在第一次运行时信任该文件。 + +![Tor应用启动器](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Application-Launcher.jpg) + +*Tor应用启动器* + +####8. 一旦您选择了信任,请注意`tor.desktop`文件的图标则会改变### + +![Tor图标已改变](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-icon-changed.jpg) + +*Tor图标已改变* + +####9. 您可以通过拖拽`tor.desktop`的图标在桌面和Dock栏中创建快捷方式#### + +![在桌面添加Tor快捷方式](http://www.tecmint.com/wp-content/uploads/2014/04/Add-Tor-Shortcut-on-Desktop.jpg) + +*在桌面添加Tor快捷方式* + +####10. 关于Tor浏览器#### + +![关于Tor浏览器](http://www.tecmint.com/wp-content/uploads/2014/04/About-Tor-Browser.jpg) + +*关于Tor浏览器* + +**注意**: 如果您在使用旧版本的Tor,您可以从上面的窗口更新它。 + +#### 应用的可用性和领域 #### + +- 匿名使用网络。 +- 浏览被封锁的页面。 +- 连接其他应用,即(FTP)来保证网络安全的访问。 + +#### 关于Tor浏览器的争论 #### + +- 在Tor应用的边界上并没有什么安全措施。比如,数据入口点和出口点。 +- 一项2011年的研究发现一种特殊的针对Tor浏览器的攻击可以得到BitTorrent用户的IP地址。 +- 在一些研究中发现某些特定的协议有泄漏IP地址的倾向。 +- 早些的Tor版本绑定了旧版本的Firefox浏览器,这被证明较易受JavaScript攻击。 +- Tor浏览器运行起来比较慢。 + +#### 真实世界中Tor浏览器的实现 #### + +- [Vuze BitTorrent Client][3] +- Anonymous Os +- Os’es from Scratch +- whonix 等 + +#### Tor浏览器的未来 #### + +Tor浏览器是前途无量的。也许第一个该类应用程序的实现是非常出色的,但Tor浏览器必须加大对支持、伸缩性、以及对近期的攻击进行数据安全的研究的投入。这个应用程序是未来的需要。 + +#### 下载免费的电子书 #### + +非官方的Tor私密浏览指南: + +[![](http://img.tradepub.com/free/w_make129/images/w_make129c4.gif)][2] + +### 结论 ### + +如果您工作的部门不允许您访问某网站,或者如果您不希望别人知道您的私人事务,或您不想向NSA提供您的个人数字足迹,那么Tor浏览器在目前是必须的。 + +**注意**: Tor浏览器提供的安全性不能抵御病毒、木马或其他类似这样的安全威胁。写这篇文章的目的也不是希望通过在互联网上隐藏我们的身份来放纵非法活动。这篇文章纯粹是为了教学的目的,作者和Tecmint均不会为任何非法的使用负责。这是用户自己的责任。 + +Tor浏览器是一个非常不错的应用,您值得尝试!这就是我要说的全部了,我还会在这里写一些您感兴趣的文章,所以请继续关注。别忘了在留言区提供给我们您有价值的反馈。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/tor-browser-for-anonymous-web-browsing/ + +作者:[Avishek Kumar][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:https://www.torproject.org/download/download-easy.html.en +[2]:http://tecmint.tradepub.com/free/w_make129/prgm.cgi +[3]:http://www.tecmint.com/install-vuze-torrent-client-in-linux/ \ No newline at end of file diff --git a/translated/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md b/translated/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md deleted file mode 100644 index 1c6a039920..0000000000 --- a/translated/tech/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md +++ /dev/null @@ -1,206 +0,0 @@ -TorLinuxWebռ -================================================================================ -Ǵ˶滨Ѻܶʱ䡣ʹõӦóҪһWebĻҪԿͻ/ķʽ¼̻IPַϢԼDZڵϢЩϢʽʹãDZڵΣԡ - -![LinuxаװTor](http://www.tecmint.com/wp-content/uploads/2014/04/Install-tor-browser-in-linux.jpg) - -Tor - -⣬Ұȫ֣NSAʼ¼ǵ㼣˵ij޵ĴҲᱻΪѼҴҵ͹˾ʴʹܱԼ˽ - -ˣҪһС͡ЯӦóܴﵽЧTorһӦãӵᵽйܣֹڴˡ - -ƪǻTorĹܡʹ÷ʽ򡢰װԼTorҪ档 - -#### ʲôTor #### - -TorһɷַӦBSDʽ֤ͨ䰲ȫɿʽĽṹûĽǰĽṹƣTorΪ·ӦCдɵġ - -#### TorĹ #### - -- ƽ̨á磬ӦóLinuxWindowsMac¶á -- ڷݵǰиӵݼܡ -- ڿͻ˽еԶܡ -- ǻTor̵Ľϡ -- Էվṩԡ -- Էʱվ -- 豩¶ԴIPִ -- ڷǽ·/صķӦó -- Я - ֱӴUSB洢һԤõweb豾ذװ -- x86x86_64ƽ̨ -- ͨʹTorԡsocks4aķʽڡlocalhostġ9050˿ôFTP -- Torӵдǧתϰû - -#### Torι #### - -TorĹʽ·ɵĸ·ɵĽṹУÿһ㶼Ƕһ棬һǶ׵Ľṹμݲͨ·з͡ڿͻһÿһ㶼ڽݵһ֮ǰݡһڽԭʼݴݵĿĵǰһļݡ - -ֽĹƵ˸޷׷IPԼûĵλã˿κ˹۲վӡ - -Щ̿ЩӣûʹTorʱûбҪġʵϣTorĹһMozillaFirefox - -### LinuxаװTor ### - -۵һTorLinuxWindowsԼMac¶áûҪϵͳͼܹIJͬӴµİ汾磬Tor4.0.4 - -- [https://www.torproject.org/download/download-easy.html.en][1] - -TorҪװõDzҪװTorֱӴ豸УҸԱԤáζŲеԿֲ - -شļ*.tar.xzҪѹ - -**32λϵͳ** - - $ wget https://www.torproject.org/dist/torbrowser/4.0.4/tor-browser-linux32-4.0.4_en-US.tar.xz - $ tar xpvf tor-browser-linux32-4.0.4_en-US.tar.xz - -**64λϵͳ** - - $ wget https://www.torproject.org/dist/torbrowser/4.0.4/tor-browser-linux64-4.0.4_en-US.tar.xz - $ tar -xpvf tor-browser-linux64-4.0.4_en-US.tar.xz - -**ע** : Уʹá$ζѹӦͨûrootûѹǿҽҪrootûѹTor - -ڳɹĽѹDZԽѹƶκεط/USB洢豸СӽѹļԷrootûֱСstart-tor-browser - - $ cd tor-browser_en-US - $ ./start-tor-browser - -![ʼʹTor](http://www.tecmint.com/wp-content/uploads/2014/04/Starting-Tor-Network.jpg) - -ʼʹTor - -**1. ӵTor硣ӡ֮Torðʣµ顣** - -![ӵTor](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Network-Settings.jpg) - -ӵTor - -**2. ӭ/ǩ** - -![Torӭ](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Welcome-Screen.png) - -Torӭ - -**3. TorYoutubeƵ** - -![YoutubeϿƵ](http://www.tecmint.com/wp-content/uploads/2014/04/Watching-Video-on-Youtube.jpg) - -YoutubeϿƵ - -**4. ַԽ߹ͽס** - -![վ](http://www.tecmint.com/wp-content/uploads/2014/04/Browsing-Site.jpg) - -վ - -**5. ʾҵǰĴIPעıΪProxy Server detected** - -![IPַ](http://www.tecmint.com/wp-content/uploads/2014/04/Checking-IP-Address.jpg) - -IPַ - -**ע**: ÿTorʱҪʹıģʽָTorűҸնTorʱæµ״̬ο˷Щһ/Dockͼأ - -**6. Ҫڽѹļд`tor.desktop`** - -$ touch tor.desktop - -ʹϲı༭༭ļıʹnano - - $ nano tor.desktop - ----------- - - #!/usr/bin/env xdg-open - [Desktop Entry] - Encoding=UTF-8 - Name=Tor - Comment=Anonymous Browse - Type=Application - Terminal=false - Exec=/home/avi/Downloads/tor-browser_en-US/start-tor-browser - Icon=/home/avi/Downloads/tor-browser_en-US/Browser/browser/icons/mozicon128.png - StartupNotify=true - Categories=Network;WebBrowser; - -**ע**: ȷtor·滻ΪĻе· - -**7. һ㶨Ϳ˫`tor.desktop`ļTorˣҪڵһʱθļ** - -![TorӦ](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-Application-Launcher.jpg) - -TorӦ - -**8. һѡΣע`tor.desktop`ļͼı䡣** - -![TorͼѸı](http://www.tecmint.com/wp-content/uploads/2014/04/Tor-icon-changed.jpg) - -TorͼѸı - -**9. ͨק`tor.desktop`ͼDockдݷʽ** - -![Torݷʽ](http://www.tecmint.com/wp-content/uploads/2014/04/Add-Tor-Shortcut-on-Desktop.jpg) - -Torݷʽ - -**10. Tor** - -![Tor](http://www.tecmint.com/wp-content/uploads/2014/04/About-Tor-Browser.jpg) - -Tor - -**ע**: ʹþɰ汾TorԴĴڸ - -#### ӦõĿԺ #### - -- ʹ硣 -- 赲ҳ档 -- ӦãFTP֤簲ȫķʡ - -#### Tor #### - -- Torܱ߲ûʲôȫʩ磬ڵͳڵ㡣 -- һ2011оһTorĹԵõBitTorrentûIPַ -- һЩозijЩضЭй©IPַ -- TorЩİ汾˾ɰ汾Firefoxⱻ֤JavaScript -- TorıȽϻ - -#### ʵTorʵ #### - -- Vuze BitTorrent Client -- Anonymous Os -- Oses from Scratch -- whonix - -#### Torδ #### - -Torǰ;ġҲʵֵĵһӦódzɫTorӴԵ֧ԼԽڵĹоԱ֤ݰȫӦóδҪ - -#### ѵĵ #### - -ǹٷTor˽ָ - -[![](http://img.tradepub.com/free/w_make129/images/w_make129c4.gif)][2] - -### ### - -IJŲijվϣ֪˽NSAṩĸ㼣ôTorĿǰDZġ - -**ע**: TorṩİȫԲܵľİȫвдƪµĿҲϣͨڻǵݷǷƪ´Ϊ˽ѧĿģߺTecmintΪκηǷʹøûΨһΡ - -TorһdzӦãֵóԣҪ˵ȫˣһдһЩȤ£עTecmintṩмֵķ - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/tor-browser-for-anonymous-web-browsing/ - -ߣ[Avishek Kumar][a] -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ - -[a]:http://www.tecmint.com/author/avishek/ -[1]:https://www.torproject.org/download/download-easy.html.en -[2]:http://tecmint.tradepub.com/free/w_make129/prgm.cgi \ No newline at end of file From 70c29cbc75fbca204b058b57b068fd63e752f9fb Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Tue, 7 Jul 2015 15:00:40 -0500 Subject: [PATCH 1342/2517] =?UTF-8?q?Update=20and=20rename=2020150612=20Li?= =?UTF-8?q?nux=5FLogo--A=20Command=20Line=20Tool=20to=20Print=20Color=20AN?= =?UTF-8?q?SI=20Logos=20of=20Linux=20Distributions.md=20to=20[=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E4=B8=AD]20150612=20Linux=5FLogo--A=20Command=20Line?= =?UTF-8?q?=20Tool=20to=20Print=20Color=20ANSI=20Logos=20of=20Linux=20Dist?= =?UTF-8?q?ributions.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译此文 --- ...Line Tool to Print Color ANSI Logos of Linux Distributions.md} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename sources/tech/{20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md => [翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md} (99%) diff --git a/sources/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md b/sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md similarity index 99% rename from sources/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md rename to sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md index 6cdc510092..cd502ac0a9 100644 --- a/sources/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md +++ b/sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md @@ -1,3 +1,4 @@ +[translating by KevinSJ] Linux_Logo – A Command Line Tool to Print Color ANSI Logos of Linux Distributions ================================================================================ linuxlogo or linux_logo is a Linux command line utility that generates a color ANSI picture of Distribution logo with a few system information. @@ -180,4 +181,4 @@ via: http://www.tecmint.com/linux_logo-tool-to-print-color-ansi-logos-of-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/screenfetch-system-information-generator-for-linux/ \ No newline at end of file +[1]:http://www.tecmint.com/screenfetch-system-information-generator-for-linux/ From 71c19d7b7272d6f2dde8b9f7ab52c69f0245f6e3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 9 Jul 2015 15:17:44 +0800 Subject: [PATCH 1343/2517] =?UTF-8?q?20150709-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...s--Linus Torvalds Answers Your Question.md | 184 ++++++++++++++++++ ...ata1 file continuously growing in MySQL.md | 114 +++++++++++ 2 files changed, 298 insertions(+) create mode 100644 sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md create mode 100644 sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md diff --git a/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md b/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md new file mode 100644 index 0000000000..e723658787 --- /dev/null +++ b/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md @@ -0,0 +1,184 @@ +Interviews: Linus Torvalds Answers Your Question +================================================================================ +Last Thursday you had a chance to [ask Linus Torvalds][1] about programming, hardware, and all things Linux. You can read his answers to those questions below. If you'd like to see what he had to say the last time we sat down with him, [you can do so here][2]. + +**Productivity** +by DoofusOfDeath + +> You've somehow managed to originate two insanely useful pieces of software: Linux, and Git. Do you think there's anything in your work habits, your approach to choosing projects, etc., that have helped you achieve that level of productivity? Or is it just the traditional combination of talent, effort, and luck? + +**Linus**: I'm sure it's pretty much always that "talent, effort and luck". I'll leave it to others to debate how much of each... + +I'd love to point out some magical work habit that makes it all happen, but I doubt there really is any. Especially as the work habits I had wrt the kernel and Git have been so different. + +With Git, I think it was a lot about coming at a problem with fresh eyes (not having ever really bought into the traditional SCM mindset), and really trying to think about the issues, and spending a fair amount of time thinking about what the real problems were and what I wanted the design to be. And then the initial self-hosting code took about a day to write (ok, that was "self-hosting" in only the weakest sense, but still). + +And with Linux, obviously, things were very different - the big designs came from the outside, and it took half a year to host itself, and it hadn't even started out as a kernel to begin with. Clearly not a lot of thinking ahead and planning involved ;). So very different circumstances indeed. + +What both the kernel and Git have, and what I think is really important (and I guess that counts as a "work habit"), is a maintainer that stuck to it, and was responsive, responsible and sane. Too many projects falter because they don't have people that stick with them, or have people who have an agenda that doesn't match reality or the user expectations. + +But it's very important to point out that for Git, that maintainer was not me. Junio Hamano really should get pretty much all the credit for Git. Credit where credit is due. I'll take credit for the initial implementation and design of Git - it may not be perfect, but ten years on it still is very solid and very clearly the same basic design. But I'll take even _more_ credit for recognizing that Junio had his head screwed on right, and was the person to drive the project. And all the rest of the credit goes to him. + +Of course, that kind of segues into something else the kernel and Git do have in common: while I still maintain the kernel, I did end up finding a lot of smart people to maintain all the different parts of it. So while one important work habit is that "stick to it" persistence that you need to really take a project from a not-quite-usable prototype to something bigger and better, another important work-habit is probably to also "let go" and not try to own and control the project too much. Let other people really help you - guide the process but don't get in their way. + +**init system** +by lorinc + +> There wasn't a decent unix-like kernel, you wrote one which ultimately became the most used. There wasn't a decent version control software, you wrote one which ultimately became the most love. Do you think we already have a decent init system, or do you have plan to write one that will ultimately settle the world on that hot topic? + +**Linus**: You can say the word "systemd", It's not a four-letter word. Seven letters. Count them. + +I have to say, I don't really get the hatred of systemd. I think it improves a lot on the state of init, and no, I don't see myself getting into that whole area. + +Yeah, it may have a few odd corners here and there, and I'm sure you'll find things to despise. That happens in every project. I'm not a huge fan of the binary logging, for example. But that's just an example. I much prefer systemd's infrastructure for starting services over traditional init, and I think that's a much bigger design decision. + +Yeah, I've had some personality issues with some of the maintainers, but that's about how you handle bug reports and accept blame (or not) for when things go wrong. If people thought that meant that I dislike systemd, I will have to disappoint you guys. + +**Can Valve change the Linux gaming market?** +by Anonymous Coward + +> Do you think Valve is capable of making Linux a primary choice for gamers? + +**Linus**: "Primary"? Probably not where it's even aiming. I think consoles (and all those handheld and various mobile platforms that "real gamers" seem to dismiss as toys) are likely much more primary, and will stay so. + +I think Valve wants to make sure they can control their own future, and Linux and ValveOS is probably partly to explore a more "console-like" Valve experience (ie the whole "get a box set up for a single main purpose", as opposed to a more PC-like experience), and partly as a "second source" against Microsoft, who is a competitor in the console area. Keeping your infrastructure suppliers honest by making sure you have alternatives sounds like a good strategy, and particularly so when those suppliers may be competing with you directly elsewhere. + +So I don't think the aim is really "primary". "Solid alternative" is I think the aim. Of course, let's see where it goes after that. + +But I really have not been involved. People like Greg and the actual graphics driver guys have been in much more direct contact with Valve. I think it's great to see gaming on Linux, but at the same time, I'm personally not really much of a gamer. + +**The future of RT-Linux?** +by nurhussein + +> According to Thomas Gleixner, [the future of the realtime patchset to Linux is in doubt][2], as it is difficult to secure funding from interested parties on this functionality even though it is both useful and important: What are your thoughts on this, and what do you think we need to do to get more support behind the RT patchset, especially considering Linux's increasing use in embedded systems where realtime functionality is undoubtedly useful. + +**Linus**: So I think this is one of those things where the markets decide how important rtLinux ends up being, and I suspect there are more than enough companies who end up wanting and using rtLinux that the project isn't really going anywhere. The complaints by Thomas were - I think - a wake-up call to the companies who end up wanting the extended hard realtime patches. + +So I suspect there are companies and groups like OSADL that end up funding and helping with rtLinux, and that it isn't going away. + +**Rigor and developments** +by hcs_$reboot + +> The most complex program running on a machine is arguably its OS, especially the kernel. Linux (kernel) reached the top level in terms of performance, reliability and versatility. You have been criticized quite a few times for some virulent mails addressed to developers. Do you think Linux would be where it is without managing the project with an iron fist? To go further, do you think some other main OSS project would benefit from a more rigorous management approach? + +**Linus**: One of the nice things about open source is how it allows people to really concentrate on what they are good at, and it has been a huge advantage for Linux that we've had people who are interested in the marketing side and selling Linux, as well as the legal side etc. + +And that is all in addition, of course, to the original "we're motivated by the technology" people like me. And even within that "we're motivated by technology" group, you most certainly don't need to find _everything_ interesting, you can find the area you are passionate about and really care about and want to work on. + +That's _fundamentally_ how open source works. + +Now, if somebody is passionate about some "good management" thing, go wild, and try to get involved, and try to manage things. It's not what _I_ am interested in, but hey, the proof is in the pudding - anybody who thinks they have a new rigorous management approach that they think will help some part of the process, go wild. + +Now, I personally suspect that it wouldn't work - not only are tech people an ornery lot to begin with (that whole "herding cats" thing), just look at all the crazy arguments on the internet. And ask yourself what actually holds an open source project like the kernel together? I think you need to be very oriented towards the purely technical solutions, simply because then you have tangible and real issues you can discuss (and argue about) with fairly clear-cut hard answers. It's the only thing people can really agree on in the big picture. + +So the Linux approach to "management" has been to put technology first. That's rigorous enough for me. But as mentioned, it's a free-for-all. Anybody can come in and try to do better. Really. + +And btw, it's worth noting that there are obviously specific smaller development teams where other management models work fine. Most of the individual developers are parts of teams inside particular companies, and within the confines of that company, there may well be a very strict rigorous management model. Similarly, within the confines of a particular productization effort there may be particular goals and models for that particular team that transcend that general "technical issues" thing. + +Just to give a concrete example, the "development kernel" tree that I maintain works fundamentally differently and with very different rules from the "stable tree" that Greg does, which in turn is maintained very differently from what a distribution team within a Linux company does inside its maintenance kernel team. + +So there's certainly room for different approaches to managing those very different groups. But do I think you can "rigorously manage" people on the internet? No. + +**Functional languages?** +by EmeraldBot + +> While historically you've been a C and Assembly guy (and the odd shell scripting and such), what do you think of functional languages such as Lisp, Closure, Haskell, etc? Do you see any advantages to them, or do you view them as frivolous and impractical? If you decide to do so, thanks for taking the time to answer my question! You're a legend at what you do, and I think it's awesome that the significantly less interesting me can ask you a question like this. + +**Linus**: I may be a fan of C (with a certain fondness for assembly, just because it's so close to the machine), but that's very much about a certain context. I work at a level where those languages make sense. I certainly don't think that tools like Haskell etc are "frivolous and impractical" in general, although on a kernel level (or in a source control management system) I suspect they kind of are. + +Many moons ago I worked on sparse (the C parser and analyzer), and one of my coworkers was a Haskell fan, and did incredible example transformations in very simple (well, to him) code - stuff that is just nasty to write in C because it's pretty high-level, there's tons of memory management, and you're really talking about implementing fairly abstract and high-level rules with pattern matching etc. + +So I'm definitely not a functional language kind of guy - it's not how I learnt programming, and it really isn't very relevant to what I do, and I wouldn't recognize Haskell code if it bit me in the ass and called me names. But no, I wouldn't call them frivolous. + +**Critical software to the use of Linux** +by TWX + +> Mr. Torvalds, For many uses of Linux such as on the desktop, other software beyond the kernel and the base GNU tools are required. What other projects would you like to see given priority, and what would you like to see implemented or improved? Admittedly I thought most about X-Windows when asking this question; but I don't doubt that other daemons or systems can be just as important to the user experience. Thank you for your efforts all these years. + +**Linus**: Hey, I don't really have any particular project I would want to champion, largely because we all have so different requirements on the desktop. There's just no single thing that stands out as being hugely more important than others to me. + +What I do wish particularly desktop developers cared about is "consistency of experience". And by that I don't mean some kind of enforced visual consistency between different applications to make things "look coherent". No, I'm just talking about the pain and uncertainty users go through with upgrades, and understanding that while your project may be the most important project to *you* (because it's what you do), to your users, your project is likely just a fairly small and irrelevant part of their experience, and it's not very central at all, and they've learnt the quirks about that thing they don't even care about, and you really shouldn't break their expectations. Because it turns out that that is how you really make people hate their desktop. + +This is not at all Linux-specific, of course - just look at the less than enthusiastic reception that other operating system redesigns have received. But I really wish that we hadn't had *both* of the major Linux desktop environments have to learn this (well, I hope they learnt) the hard way, and both of them ending up blaming their users rather than themselves. + +**"anykernel"-style portable drivers?** +by staalmannen + +> What do you think about the "anykernel" concept (invented by another Finn btw) used in NetBSD? Basically, they have modularized the code so that a driver can be built either in a monolithic kernel or for user space without source code changes ( rumpkernel.org ). The drivers are highly portable and used in Genode os (L4 type kernels), minix etc... Would this be possible or desirable for Linux? Apparently there is one attempt called "libos"... + +**Linus**: So I have bad experiences with "portable" drivers. Writing drivers to some common environment tends to force some ridiculously nasty impedance matching abstractions that just get in the way and make things really hard to read and modify. It gets particularly nasty when everybody ends up having complicated - and differently so - driver subsystems to handle a lot of commonalities for a certain class of drivers (say a network driver, or a USB driver), and the different operating systems really have very different approaches and locking rules etc. + +I haven't seen anykernel drivers, but from past experience my reaction to "portable device drivers" is to run away, screaming like little girl. As they say in Swedish "Bränt barn luktar illa". + +**Processor Architecture** +by swv3752 + +> Several years ago, you were employed by Transmeta designing the Crusoe processor. I understand you are quite knowledgeable about cpu architecture. What are your thoughts on the Current Intel and AMD x86 CPUs particularly in comparison with ARM and IBM's Power8 CPUs? Where do you see the advantages of each one? + +**Linus**: I'm no CPU architect, I just play one on TV. + +But yes, I've been close to the CPU both as part of my kernel work, and as part of a processor company, and working at that level for a long time just means that you end up having fairly strong opinions. One of the things that my experiences at Transmeta convinced me of, for example, was that there's definitely very much a limit to what software should care about. I loved working at Transmeta, I loved the whole startup company environment, I loved working with really smart people, but in the end I ended up absolutely *not* loving to work with overly simple hardware (I also didn't love the whole IPO process, and what that did to the company culture, but that's a different thing). + +Because there's only so much that software can do to compensate. + +Something similar happened with my kernel work on the alpha architecture, which also started out as being an overly simplified implementation in the name of being small and supposedly running really fast. While I really started out liking the alpha architecture for being so clean, I ended up detesting how fragile the architecture implementations were (and by the time that got fixed in the 21264, I had given up on alpha). + +So I've come to absolutely detest CPU's that need a lot of compiler smarts or special tuning to go fast. Life is too short to waste on in-order CPU's, or on hardware designers who think software should take care of the pieces that they find to be too complicated to handle themselves, and as a result just left undone. "Weak memory ordering" is just another example. + +Thankfully, most of the industry these days seems to agree. Yes, there are still in-order cores, but nobody tries to make excuses for them any more: they are for the truly cheap and low-end market. + +I tend to really like the modern Intel cores in particular, which tend to take that "let's not be stupid" really to heart. With the kernel being so threaded, I end up caring a lot about things like memory ordering etc, and the Intel big-core CPU's tend to be in a class of their own there. As a software person who cares about performance and looks at instruction profiles etc, it's just so *nice* to see that the CPU doesn't have some crazy glass jaw where you have to be very careful. + +**GPU kernels** +by maraist + +> Is there any inspiration that a GPU based kernel / scheduler has for you? How might Linux be improved to better take advantage of GPU-type batch execution models. Given that you worked transmeta and JIT compiled host-targeted runtimes. GPUs 1,000-thread schedulers seem like the next great paradigm for the exact type of machines that Linux does best on. + +**Linus**: I don't think we'll see the kernel ever treat GPU threads the way we treat CPU threads. Not with the current model of GPU's (and that model doesn't really seem to be changing all that much any more). + +Yes, GPU's are getting much better, and now generally have virtual memory and the ability to preempt execution, and you could run an OS on them. But the scheduling latencies are pretty high, and the threads are not really "independent" (ie they tend to share a lot of state - like the virtual address space and a large shared register set), so GPU "threads" don't tend to work like CPU threads. You'd schedule them all-or-nothing, so if you were to switch processes, you'd treat the GPU as one entity where you switch all the threads at once. + +So it really wouldn't look like a thousand threads to the kernel. The GPU would still be scheduled as one single entity (or maybe a couple of entities depending on how the GPU is partitioned). The fact that that single entity works by doing a lot of things in massive parallelism is kind of immaterial for the kernel that doesn't end up seeing that parallelism as separate threads. + +**alleged danger of Artificial Intelligence** +by peter303 + +> Some computer experts like Marvin Minsky, Larry Page, Ray Kuzweil think A.I. will be a great gift to Mankind. Others like Bill Joy and Elon Musk are fearful of potential danger. Where do you stand, Linus? + +**Linus**: I just don't see the thing to be fearful of. + +We'll get AI, and it will almost certainly be through something very much like recurrent neural networks. And the thing is, since that kind of AI will need training, it won't be "reliable" in the traditional computer sense. It's not the old rule-based prolog days, when people thought they'd *understand* what the actual decisions were in an AI. + +And that all makes it very interesting, of course, but it also makes it hard to productize. Which will very much limit where you'll actually find those neural networks, and what kinds of network sizes and inputs and outputs they'll have. + +So I'd expect just more of (and much fancier) rather targeted AI, rather than anything human-like at all. Language recognition, pattern recognition, things like that. I just don't see the situation where you suddenly have some existential crisis because your dishwasher is starting to discuss Sartre with you. + +The whole "Singularity" kind of event? Yeah, it's science fiction, and not very good SciFi at that, in my opinion. Unending exponential growth? What drugs are those people on? I mean, really.. + +It's like Moore's law - yeah, it's very impressive when something can (almost) be plotted on an exponential curve for a long time. Very impressive indeed when it's over many decades. But it's _still_ just the beginning of the "S curve". Anybody who thinks any different is just deluding themselves. There are no unending exponentials. + +**Is the kernel basically a finished project?** +by NaCh0 + +> Aside from adding drivers and refactoring algorithms when performance limits are discovered, is there anything left for the kernel? Maybe it's a failure of tech journalism but we never hear about the next big thing in kernel land anymore. + +**Linus**: I don't think there's much of a "next big thing" in the kernel. + +I wouldn't say that there is nothing but drivers (and architectures are kind of "CPU drivers) and improving scalability left, because I'm constantly amazed by how many new things people figure out are still good ideas. But they tend to still be pretty incremental improvements. An OS kernel doesn't look *that* radically different from what it was 40 years ago, and that's fine. I think radical new ideas are often overrated, and the thing that really matters in the end is that plodding detail work. That's how technology evolves. + +And judging by how our kernel releases are going, there's no end in sight for that "plodding detail work". And it's still as interesting as it ever was. + +-------------------------------------------------------------------------------- + +via: http://linux.slashdot.org/story/15/06/30/0058243/interviews-linus-torvalds-answers-your-question + +作者:[samzenpus][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:samzenpus@slashdot.org +[1]:http://interviews.slashdot.org/story/15/06/24/1718247/interview-ask-linus-torvalds-a-question +[2]:http://meta.slashdot.org/story/12/10/11/0030249/linus-torvalds-answers-your-questions +[3]:https://lwn.net/Articles/604695/ \ No newline at end of file diff --git a/sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md b/sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md new file mode 100644 index 0000000000..92094a3315 --- /dev/null +++ b/sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md @@ -0,0 +1,114 @@ +Why is the ibdata1 file continuously growing in MySQL? +================================================================================ +![ibdata1 file](https://www.percona.com/blog/wp-content/uploads/2013/08/ibdata1-file.jpg) + +We receive this question about the ibdata1 file in MySQL very often in [Percona Support][1]. + +The panic starts when the monitoring server sends an alert about the storage of the MySQL server – saying that the disk is about to get filled. + +After some research you realize that most of the disk space is used by the InnoDB’s shared tablespace ibdata1. You have [innodb_file_per_table][2] enabled, so the question is: + +### What is stored in ibdata1? ### + +When you have innodb_file_per_table enabled, the tables are stored in their own tablespace but the shared tablespace is still used to store other InnoDB’s internal data: + +- data dictionary aka metadata of InnoDB tables +- change buffer +- doublewrite buffer +- undo logs + +Some of them can be configured on [Percona Server][3] to avoid becoming too large. For example you can set a maximum size for change buffer with [innodb_ibuf_max_size][4] or store the doublewrite buffer on a separate file with [innodb_doublewrite_file][5]. + +In MySQL 5.6 you can also create external UNDO tablespaces so they will be in their own files instead of stored inside ibdata1. Check following [documentation link][6]. + +### What is causing the ibdata1 to grow that fast? ### + +Usually the first command that we need to run when there is a MySQL problem is: + + SHOW ENGINE INNODB STATUSG + +That will show us very valuable information. We start checking the **TRANSACTIONS** section and we find this: + + ---TRANSACTION 36E, ACTIVE 1256288 sec + MySQL thread id 42, OS thread handle 0x7f8baaccc700, query id 7900290 localhost root + show engine innodb status + Trx read view will not see trx with id >= 36F, sees < 36F + +This is the most common reason, a pretty old transaction created 14 days ago. The status is **ACTIVE**, that means InnoDB has created a snapshot of the data so it needs to maintain old pages in **undo** to be able to provide a consistent view of the database since that transaction was started. If your database is heavily write loaded that means lots of undo pages are being stored. + +If you don’t find any long-running transaction you can also monitor another variable from the INNODB STATUS, the “**History list length.**” It shows the number of pending purge operations. In this case the problem is usually caused because the purge thread (or master thread in older versions) is not capable to process undo records with the same speed as they come in. + +### How can I check what is being stored in the ibdata1? ### + +Unfortunately MySQL doesn’t provide information of what is being stored on that ibdata1 shared tablespace but there are two tools that will be very helpful. First a modified version of innochecksum made by Mark Callaghan and published in [this bug report][7]. + +It is pretty easy to use: + + # ./innochecksum /var/lib/mysql/ibdata1 + 0 bad checksum + 13 FIL_PAGE_INDEX + 19272 FIL_PAGE_UNDO_LOG + 230 FIL_PAGE_INODE + 1 FIL_PAGE_IBUF_FREE_LIST + 892 FIL_PAGE_TYPE_ALLOCATED + 2 FIL_PAGE_IBUF_BITMAP + 195 FIL_PAGE_TYPE_SYS + 1 FIL_PAGE_TYPE_TRX_SYS + 1 FIL_PAGE_TYPE_FSP_HDR + 1 FIL_PAGE_TYPE_XDES + 0 FIL_PAGE_TYPE_BLOB + 0 FIL_PAGE_TYPE_ZBLOB + 0 other + 3 max index_id + +It has 19272 UNDO_LOG pages from a total of 20608. **That’s the 93% of the tablespace**. + +The second way to check the content of a tablespace are the [InnoDB Ruby Tools][8] made by Jeremy Cole. It is a more advanced tool to examine the internals of InnoDB. For example we can use the space-summary parameter to get a list with every page and its data type. We can use standard Unix tools to get the number of **UNDO_LOG** pages: + + # innodb_space -f /var/lib/mysql/ibdata1 space-summary | grep UNDO_LOG | wc -l + 19272 + +Altough in this particular case innochecksum is faster and easier to use I recommend you to play with Jeremy’s tools to learn more about the data distribution inside InnoDB and its internals. + +OK, now we know where the problem is. The next question: + +### How can I solve the problem? ### + +The answer to this question is easy. If you can still commit that query, do it. If not you’ll have to kill the thread to start the rollback process. That will just stop ibdata1 from growing but it is clear that your software has a bug or someone made a mistake. Now that you know how to identify where is the problem you need to find who or what is causing it using your own debugging tools or the general query log. + +If the problem is caused by the purge thread then the solution is usually to upgrade to a newer version where you can use a dedicated purge thread instead of the master thread. More information on the following [documentation link][9]. + +### Is there any way to recover the used space? ### + +No, it is not possible at least in an easy and fast way. InnoDB tablespaces never shrink… see the following [10-year old bug report][10] recently updated by James Day (thanks): + +When you delete some rows, the pages are marked as deleted to reuse later but the space is never recovered. The only way is to start the database with fresh ibdata1. To do that you would need to take a full logical backup with mysqldump. Then stop MySQL and remove all the databases, ib_logfile* and ibdata* files. When you start MySQL again it will create a new fresh shared tablespace. Then, recover the logical dump. + +### Summary ### + +When the ibdata1 file is growing too fast within MySQL it is usually caused by a long running transaction that we have forgotten about. Try to solve the problem as fast as possible (commiting or killing a transaction) because you won’t be able to recover the wasted disk space without the painfully slow mysqldump process. + +Monitoring the database to avoid these kind of problems is also very recommended. Our [MySQL Monitoring Plugins][11] includes a Nagios script that can alert you if it finds a too old running transaction. + +-------------------------------------------------------------------------------- + +via: https://www.percona.com/blog/2013/08/20/why-is-the-ibdata1-file-continuously-growing-in-mysql/ + +作者:[Miguel Angel Nieto][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.percona.com/blog/author/miguelangelnieto/ +[1]:https://www.percona.com/products/mysql-support +[2]:http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_file_per_table +[3]:https://www.percona.com/software/percona-server +[4]:https://www.percona.com/doc/percona-server/5.5/scalability/innodb_insert_buffer.html#innodb_ibuf_max_size +[5]:https://www.percona.com/doc/percona-server/5.5/performance/innodb_doublewrite_path.html?id=percona-server:features:percona_innodb_doublewrite_path#innodb_doublewrite_file +[6]:http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html#innodb-undo-tablespace +[7]:http://bugs.mysql.com/bug.php?id=57611 +[8]:https://github.com/jeremycole/innodb_ruby +[9]:http://dev.mysql.com/doc/innodb/1.1/en/innodb-improved-purge-scheduling.html +[10]:http://bugs.mysql.com/bug.php?id=1341 +[11]:https://www.percona.com/software/percona-monitoring-plugins \ No newline at end of file From 7d982a5bed74ed4c25ecffebc7cfa275170eef68 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 9 Jul 2015 15:55:02 +0800 Subject: [PATCH 1344/2517] =?UTF-8?q?20150709-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... tools for monitoring your Linux system.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 sources/talk/20150709 command line tools for monitoring your Linux system.md diff --git a/sources/talk/20150709 command line tools for monitoring your Linux system.md b/sources/talk/20150709 command line tools for monitoring your Linux system.md new file mode 100644 index 0000000000..012591d74f --- /dev/null +++ b/sources/talk/20150709 command line tools for monitoring your Linux system.md @@ -0,0 +1,79 @@ +7 command line tools for monitoring your Linux system +================================================================================ +**Here is a selection of basic command line tools that will make your exploration and optimization in Linux easier. ** + +![Image courtesy Meltys-stock](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-1-100591899-orig.png) + +### Dive on in ### + +One of the great things about Linux is how deeply you can dive into the system to explore how it works and to look for opportunities to fine tune performance or diagnose problems. Here is a selection of basic command line tools that will make your exploration and optimization easier. Most of these commands are already built into your Linux system, but in case they aren’t, just Google “install”, the command name, and the name of your distro and you’ll find which package needs installing (note that some commands are bundled with other commands in a package that has a different name from the one you’re looking for). If you have any other tools you use, let me know for our next Linux Tools roundup. + +![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-2-100591901-orig.png) + +### How we did it ### + +FYI: The screenshots in this collection were created on [Debian Linux 8.1][1] (“Jessie”) running in a virtual machine under [Oracle VirtualBox 4.3.28][2] under [OS X 10.10.3][3] (“Yosemite”). See my next slideshow “[How to install Debian Linux in a VirtualBox VM][4]” for a tutorial on how to build your own Debian VM. + +![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-3-100591902-orig.png) + +### Top command ### + +One of the simpler Linux system monitoring tools, the **top command** comes with pretty much every flavor of Linux. This is the default display, but pressing the “z” key switches the display to color. Other hot keys and command line switches control things such as the display of summary and memory information (the second through fourth lines), sorting the list according to various criteria, killing tasks, and so on (you can find the complete list at [here][5]). + +![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-4-100591904-orig.png) + +### htop ### + +Htop is a more sophisticated alternative to top. Wikipedia: “Users often deploy htop in cases where Unix top does not provide enough information about the systems processes, for example when trying to find minor memory leaks in applications. Htop is also popularly used interactively as a system monitor. Compared to top, it provides a more convenient, cursor-controlled interface for sending signals to processes.” (For more detail go [here][6].) + +![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-5-100591903-orig.png) + +### Vmstat ### + +Vmstat is a simpler tool for monitoring your Linux system performance statistics but that makes it highly suitable for use in shell scripts. Fire up your regex-fu and you can do some amazing things with vmstat and cron jobs. “The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay. The process and memory reports are instantaneous in either case” (go [here][7] for more info.). + +![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-6-100591905-orig.png) + +### ps ### + +The ps command shows a list of running processes. In this case, I’ve used the “-e”switch to show everything, that is, all processes running (I’ve scrolled back to the top of the output otherwise the column names wouldn’t be visible). This command has a lot of switches that allow you to format the output as needed. Add a little of the aforementioned regex-fu and you’ve got a powerful tool. Go [here][8] for the full details. + +![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-7-100591906-orig.png) + +### Pstree ### + +Pstree “shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted. If a user name is specified, all process trees rooted at processes owned by that user are shown.”This is a really useful tool as the tree helps you sort out which process is dependent on which process (go [here][9]). + +![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-8-100591907-orig.png) + +### pmap ### + +Understanding just how an app uses memory is often crucial in debugging, and the pmap produces just such information when given a process ID (PID). The screenshot shows the medium weight output generated by using the “-x”switch. You can get pmap to produce even more detailed information using the “-X”switch but you’ll need a much wider terminal window. + +![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-9-100591900-orig.png) + +### iostat ### + +A crucial factor in your Linux system’s performance is processor and storage usage, which are what the iostat command reports on. As with the ps command, iostat has loads of switches that allow you to select the output format you need as well as sample performance over a time period and then repeat that sampling a number of times before reporting. See [here][10]. + +-------------------------------------------------------------------------------- + +via: http://www.networkworld.com/article/2937219/linux/7-command-line-tools-for-monitoring-your-linux-system.html + +作者:[Mark Gibbs][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.networkworld.com/author/Mark-Gibbs/ +[1]:https://www.debian.org/releases/stable/ +[2]:https://www.virtualbox.org/ +[3]:http://www.apple.com/osx/ +[4]:http://www.networkworld.com/article/2937148/how-to-install-debian-linux-8-1-in-a-virtualbox-vm +[5]:http://linux.die.net/man/1/top +[6]:http://linux.die.net/man/1/htop +[7]:http://linuxcommand.org/man_pages/vmstat8.html +[8]:http://linux.die.net/man/1/ps +[9]:http://linux.die.net/man/1/pstree +[10]:http://linux.die.net/man/1/iostat \ No newline at end of file From 434e295d22351af1d9b33825b09a37924b25de02 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 9 Jul 2015 16:00:34 +0800 Subject: [PATCH 1345/2517] =?UTF-8?q?20150709-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Believe in AI Singularity Are on Drugs.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md diff --git a/sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md b/sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md new file mode 100644 index 0000000000..22b2ad0f01 --- /dev/null +++ b/sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md @@ -0,0 +1,33 @@ +Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs +================================================================================ +*As usual, his comments should not be taken literally* + +![](http://i1-news.softpedia-static.com/images/news2/linus-torvalds-says-people-who-believe-in-an-ai-singularity-are-on-drugs-486373-2.jpg) + +**AI is a very hot topic right now, and many high profile people, including Elon Musk, the head of Tesla, have said that we're going to get sentient AIs soon and that it's going to be a dangerous threshold. It seems that Linus Torvalds doesn't feel the same way, and he thinks that it's just bad Sci-Fi.** + +The idea of AIs turning on their human creators is not something new, but recently the so-called AI singularity has been discussed, and people like Elon Musk and Stephen Hawking expressed concerns about the possibility of creating a monster. And it's not just them, forums and comments sections are full of alarmist people who don't know what to believe or who take for granted the opinions of much smarter people. + +As it turns out, Linus Torvalds, the creator of the Linux project, has a completely different opinion on this matter. In fact, he says that nothing like this will happen, and we have a much better reason to believe him. AI means that someone wrote its code, and Linus knows the power and the obstacles of writing an AI code. He's much likely to guess what's involved and to understands why an AI won't be a threat. + +### Linus Torvalds and AIs ### + +Linus Torvalds answered some questions from the community on [slashdot.org][1], and all his ideas were very interesting. He talked about the [future of gaming and Valve][2], but he also tackled stuff like AI. He's usually asked stuff about the kernel or open source, but he has opinions on other topics as well. As a matter a fact, the AI subject is something that he can actually talk about as a programmer. + +"So I'd expect just more of (and much fancier) rather targeted AI, rather than anything human-like at all. Language recognition, pattern recognition, things like that. I just don't see the situation where you suddenly have some existential crisis because your dishwasher is starting to discuss Sartre with you. The whole 'Singularity' kind of event? Yeah, it's science fiction, and not very good Sci-Fi at that, in my opinion. Unending exponential growth? What drugs are those people on? I mean, really" wrote Linus on Slashdot. + +It's your choice whether to believe Elon Musk or Linus, but if betting were involved, I would put my money on Linus. + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/linus-torvalds-says-people-who-believe-in-an-ai-singularity-are-on-drugs-486373.shtml + +作者:[Silviu Stahie][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://classic.slashdot.org/story/15/06/30/0058243 +[2]:http://news.softpedia.com/news/linus-torvalds-said-valve-is-exploring-a-second-source-against-microsoft-486266.shtml \ No newline at end of file From 2003c8d0601731d57f554157e7d1db0abc375da5 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 9 Jul 2015 16:26:16 +0800 Subject: [PATCH 1346/2517] =?UTF-8?q?20150709-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Google Hangouts Desktop Client In Linux.md | 67 +++++++++++ ... failure status due to previous errors'.md | 36 ++++++ ...w to install a Brother printer on Linux.md | 109 ++++++++++++++++++ ...abs in a GNOME terminal on Ubuntu 15.04.md | 38 ++++++ 4 files changed, 250 insertions(+) create mode 100644 sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md create mode 100644 sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md create mode 100644 sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md create mode 100644 sources/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md diff --git a/sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md b/sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md new file mode 100644 index 0000000000..f7026f3d14 --- /dev/null +++ b/sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md @@ -0,0 +1,67 @@ +Install Google Hangouts Desktop Client In Linux +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/google-hangouts-header-664x374.jpg) + +Earlier, we have seen how to [install Facebook Messenger in Linux][1] and [WhatsApp desktop client in Linux][2]. Both of these were unofficial apps. I have one more unofficial app for today and it is [Google Hangouts][3]. + +Of course, you can use Google Hangouts in the web browser but it is more fun to use the desktop client than the web browser one. Curious? Let’s see how to **install Google Hangouts desktop client in Linux** and how to use it. + +### Install Google Hangouts in Linux ### + +We are going to use an open source project called [yakyak][4] which is unofficial Google Hangouts client for Linux, Windows and OS X. I’ll show you how to use yakyak in Ubuntu but I believe that you can use the same method to use it in other Linux distributions. Before we see how to use it, let’s first take a look at main features of yakyak: + +- Send and receive chat messages +- Create and change conversations (rename, add people) +- Leave and/or delete conversation +- Desktop notifications +- Toggle notifications on/off +- Drag-drop, copy-paste or attach-button for image upload. +- Hangupsbot sync room aware (actual user pics) +- Shows inline images +- History scrollback + +Sounds good enough? Download the installation files from the link below: + +- [Download Google Hangout client yakyak][5] + +The downloaded file would be compressed. Extract it and you will see a directory like linux-x64 or linux-x32 based on your system. Go in to this directory and you should see a file named yakyak. Double click on it to run it. + +![Run Google Hangout in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_3.jpeg) + +You’ll have to enter your Google Account credentials of course. + +![Set up Google Hangouts in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_2.jpeg) + +Once you are through, you’ll see a screen like the one below where you can chat with your Google contacts. + +![Google_Hangout_Linux_4](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_4.jpeg) + +If you want to show profile pictures of the contacts, you can select View->Show conversation thumbnails. + +![Google hangouts thumbnails](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_5.jpeg) + +You’ll also get desktop notification for new messages. + +![desktop notifications for Google Hangouts in Ubuntu Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_1.jpeg) + +### Worth a try? ### + +I let you give it a try and decide whether or not it is worth to **install Google Hangouts client in Linux**. If you want official apps, take a look at these [instant messaging applications with native Linux clients][6]. Don’t forget to share your experience with Google Hangouts in Linux. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-google-hangouts-linux/ + +作者:[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://itsfoss.com/facebook-messenger-linux/ +[2]:http://itsfoss.com/whatsapp-linux-desktop/ +[3]:http://www.google.com/+/learnmore/hangouts/ +[4]:https://github.com/yakyak/yakyak +[5]:https://github.com/yakyak/yakyak +[6]:http://itsfoss.com/best-messaging-apps-linux/ \ No newline at end of file diff --git a/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md b/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md new file mode 100644 index 0000000000..c970637b4d --- /dev/null +++ b/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md @@ -0,0 +1,36 @@ +Linux FAQs with Answers--How to fix “tar: Exiting with failure status due to previous errors” +================================================================================ +> **Question**: When I try to create an archive using tar command, it fails in the middle, and throws an error saying: "tar: Exiting with failure status due to previous errors." What causes this error, and how can I solve this error? + +![](https://farm9.staticflickr.com/8863/17631029953_1140fe2dd3_b.jpg) + +If you encounter the following error while running tar command, the most likely reason is that you do not have read permission on one of the files you are trying to archive with tar. + + tar: Exiting with failure status due to previous errors + +Then how can we pin down the file(s) causing the errors, or identify any other cause? + +The tar command should actually print out what those "previous errors" are, but you can easily miss printed error messages if you run tar in verbose mode (e.g., -cvf). To catch error messages more easily, you can filter out tar's stdout messages as follows. + + $ tar cvzfz backup.tgz my_program/ > /dev/null + +You will then see only error messages sent by tar to stderr. + + tar: my_program/src/lib/.conf.db.~lock~: Cannot open: Permission denied + tar: Exiting with failure status due to previous errors + +As you can see in the above example, the cause for the errors is indeed "denied read permission." + +To solve the problem, simply adjust the permission of the problematic file (or remove it), and re-run tar. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/tar-exiting-with-failure-status-due-to-previous-errors.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://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md b/sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md new file mode 100644 index 0000000000..dd10d5c8dd --- /dev/null +++ b/sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md @@ -0,0 +1,109 @@ +Linux FAQs with Answers--How to install a Brother printer on Linux +================================================================================ +> **Question**: I have a Brother HL-2270DW laser printer, and want to print documents from my Linux box using this printer. How can I install an appropriate Brother printer driver on my Linux computer, and use it? + +Brother is well known for its affordable [compact laser printer lineup][1]. You can get a high-quality WiFi/duplex-capable laser printer for less than 200USD, and the price keeps going down. On top of that, they provide reasonably good Linux support, so you can download and install their printer driver on your Linux computer. I bought [HL-2270DW][2] model more than a year ago, and I have been more than happy with its performance and reliability. + +Here is how to install and configure a Brother printer driver on Linux. In this tutorial, I am demonstrating the installation of a USB driver for Brother HL-2270DW laser printer. So first connect your printer to a Linux computer via USB cable. + +### Preparation ### + +In this preparation step, go to the official [Brother support website][3], and search for the driver of your Brother printer by typing printer model name (e.g., HL-2270DW). + +![](https://farm1.staticflickr.com/301/18970034829_6f3a48d817_c.jpg) + +Once you go to the download page for your Brother printer, choose your Linux platform. For Debian, Ubuntu or their derivatives, choose "Linux (deb)". For Fedora, CentOS or RHEL, choose "Linux (rpm)". + +![](https://farm1.staticflickr.com/380/18535558583_cb43240f8a_c.jpg) + +On the next page, you will find a LPR driver as well as CUPS wrapper driver for your printer. The former is a command-line driver, while the latter allows you to configure and manage your printer via web-based administration interface. Especially the CUPS-based GUI is quite useful for (local or remote) printer maintenance. It is recommended that you install both drivers. So click on "Driver Install Tool" and download the installer file. + +![](https://farm1.staticflickr.com/329/19130013736_1850b0d61e_c.jpg) + +Before proceeding to run the installer file, you need to do one additional step if you are using a 64-bit Linux system. + +Since Brother printer drivers are developed for 32-bit Linux, you need to install necessary 32-bit libraries on 64-bit Linux as follows. + +On older Debian (6.0 or earlier) or Ubuntu (11.04 or earlier), install the following package. + + $ sudo apt-get install ia32-libs + +On newer Debian or Ubuntu which has introduced multiarch, you can install the following package instead: + + $ sudo apt-get install lib32z1 lib32ncurses5 + +which replaces ia32-libs package. Or, you can install just: + + $ sudo apt-get install lib32stdc++6 + +If you are using a Red Hat based Linux, you can install: + + $ sudo yum install glibc.i686 + +### Driver Installation ### + +Now go ahead and extract a downloaded driver installer file. + + $ gunzip linux-brprinter-installer-2.0.0-1.gz + +Next, run the driver installer file as follows. + + $ sudo sh ./linux-brprinter-installer-2.0.0-1 + +You will be prompted to type a printer model name. Type the model name of your printer, for example "HL-2270DW". + +![](https://farm1.staticflickr.com/292/18535599323_1a94f6dae5_b.jpg) + +After agreeing to GPL license agreement, accept default answers to any subsequent questions. + +![](https://farm1.staticflickr.com/526/19130014316_5835939501_b.jpg) + +Now LPR/CUPS printer drivers are installed. Proceed to configure your printer next. + +### Printer Configuration ### + +We are going to configure and manage a Brother via CUPS-based web management interface. + +First, verify that CUPS daemon is running successfully. + + $ sudo netstat -nap | grep 631 + +Open a web browser window, and go to http://localhost:631. You will see the following CUPS printer management interface. + +![](https://farm1.staticflickr.com/324/18968588688_202086fc72_c.jpg) + +Go to "Administration" tab, and click on "Manage Printers" under Printers section. + +![](https://farm1.staticflickr.com/484/18533632074_0526cccb86_c.jpg) + +You must see your printer (HL-2270DW) listed in the next page. Click on the printer name. +![](https://farm1.staticflickr.com/501/19159651111_95f6937693_c.jpg) + +In the dropdown menu titled "Administration", choose "Set As Server Default" option. This will make your printer system-wide default. + +![](https://farm1.staticflickr.com/472/19150412212_b37987c359_c.jpg) + +When asked to authenticate yourself, type in your Linux login information. + +![](https://farm1.staticflickr.com/511/18968590168_807e807f73_c.jpg) + +Now the basic configuration step is mostly done. To test print, open any document viewer application (e.g., PDF viwer), and print it. You will see "HL-2270DW" listed and chosen by default in printer setting. + +![](https://farm4.staticflickr.com/3872/18970034679_6d41d75bf9_c.jpg) + +Print should work now. You can see the printer status and manage printer jobs via the same CUPS web interface. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-brother-printer-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://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/go/brother_printers +[2]:http://xmodulo.com/go/hl_2270dw +[3]:http://support.brother.com/ \ No newline at end of file diff --git a/sources/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md b/sources/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md new file mode 100644 index 0000000000..a9a53bf8b1 --- /dev/null +++ b/sources/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md @@ -0,0 +1,38 @@ +Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04 +================================================================================ +> **Question**: I used to be able to open multiple tabs inside gnome-terminal on my Ubuntu desktop. On Ubuntu 15.04, however, I can no longer open a new tab in my terminal window. How can I open tabs in gnome-terminal on Ubuntu 15.04? + +On Ubuntu 14.10 or earlier, gnome-terminal allowed you to open either a new terminal or a tab inside a terminal window. However, starting with Ubuntu 15.04, gnome-terminal has removed "New Tab" menu option. This is actually not a bug, but a feature that attempts to unify new tab and new window. GNOME 3.12 has introduced a [single "Open Terminal" option][1]. The ability to open a new terminal tab has been migrated from the terminal menu to Preferences. + +![](https://farm1.staticflickr.com/562/19286510971_f0abe3e7fb_b.jpg) + +### Open Tabs via Preferences ### + +To be able to open a new tab in new gnome-terminal of Ubuntu 15.04, go to "Edit" -> "Preferences", and change "Open new terminals in: Window" to "Open new terminals in: Tab". + +![](https://farm1.staticflickr.com/329/19256530766_ff692b83bc_b.jpg) + +Now if you open a new terminal via menu, it will automatically open a new tab inside the terminal. + +![](https://farm4.staticflickr.com/3820/18662051223_3296fde8e4_b.jpg) + +### Open Tabs via a Keyboard Shortcut ### + +If you do not want to change Preferences, you can hold down to "invert" Preferences setting temporarily. For example, under the default Preferences, if you hold down and click on "New Terminal", it will open a new tab, not a terminal. + +Alternatively, you can simply use a keyboard shortcut to open a new tab in a terminal. + +In my view, this UI change in gnome-terminal is not quite an improvement. For example, you are no longer able to customize the name of individual terminal tabs. This feature is useful when you have many tabs open in a terminal. With the default tab name fixed to the current prompt (whose length can grow quickly), you easily cannot see the whole prompt string in the limited tab name space. Hope this feature will become available soon. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/open-multiple-tabs-gnome-terminal-ubuntu.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://ask.xmodulo.com/author/nanni +[1]:http://worldofgnome.org/opening-a-new-terminal-tabwindow-in-gnome-3-12/ \ No newline at end of file From 8a19114515317827ba43a5647ae47d436d974fdf Mon Sep 17 00:00:00 2001 From: KS Date: Thu, 9 Jul 2015 19:06:01 +0800 Subject: [PATCH 1347/2517] Update 20150709 Why is the ibdata1 file continuously growing in MySQL.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 申请翻译 --- ...09 Why is the ibdata1 file continuously growing in MySQL.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md b/sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md index 92094a3315..2fcf9353bb 100644 --- a/sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md +++ b/sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md @@ -1,3 +1,4 @@ +wyangsun 翻译中 Why is the ibdata1 file continuously growing in MySQL? ================================================================================ ![ibdata1 file](https://www.percona.com/blog/wp-content/uploads/2013/08/ibdata1-file.jpg) @@ -111,4 +112,4 @@ via: https://www.percona.com/blog/2013/08/20/why-is-the-ibdata1-file-continuousl [8]:https://github.com/jeremycole/innodb_ruby [9]:http://dev.mysql.com/doc/innodb/1.1/en/innodb-improved-purge-scheduling.html [10]:http://bugs.mysql.com/bug.php?id=1341 -[11]:https://www.percona.com/software/percona-monitoring-plugins \ No newline at end of file +[11]:https://www.percona.com/software/percona-monitoring-plugins From b3c0a231df14fbf854af9c0c94c12f5a4262dbf3 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 9 Jul 2015 23:52:09 +0800 Subject: [PATCH 1348/2517] PUB:20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0 @geekpi --- ...PHP or PhpMyAdmin in RHEL or CentOS 7.0.md | 240 ++++++++++++++++++ ...PHP or PhpMyAdmin in RHEL or CentOS 7.0.md | 239 ----------------- 2 files changed, 240 insertions(+), 239 deletions(-) create mode 100644 published/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md delete mode 100644 translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md diff --git a/published/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md b/published/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md new file mode 100644 index 0000000000..67727abe22 --- /dev/null +++ b/published/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md @@ -0,0 +1,240 @@ +在 RHEL/CentOS 7.0 中安装 LAMP(Linux、 Apache、 MariaDB、 PHP/PhpMyAdmin) +================================================================================ + +跳过 LAMP 的介绍,因为我认为你们大多数已经知道了。这个教程会集中在如何在升级到 Apache 2.4 的 Red Hat Enterprise Linux 7.0 和 CentOS 7.0 中安装和配置 LAMP:Linux、Apache、 MariaDB、 PHP/PhpMyAdmin。 + +![Install LAMP in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-LAMP-in-CentOS-7.jpg) + +*在 RHEL/CentOS 7.0 中安装 LAMP* + +#### 前置要求 #### + +根据使用的发行版是 RHEL 还是 CentOS 7.0,按照下面的链接来进行最小化的系统安装,网络使用静态 IP。 + +**对于 RHEL 7.0** + +- [RHEL 7.0 安装过程][1] +- [在 RHEL 7.0 中注册和启用订阅仓库][2] + +**对于 CentOS 7.0** + +- [CentOS 7.0 安装过程][3] + +### 第一步:使用基本配置安装apache ### + +1、在完成最小化系统安装,并[在 RHEL/CentOS 7.0 上配置静态 IP][4] 后,就可以使用下面的命令从官方仓库安装最新的 Apache 2.4 httpd 服务了。 + + # yum install httpd + +![Install Apache in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Apache-in-CentOS-7.png) + +*安装 apache 服务* + +2、安装完成后,使用下面的命令来管理apache守护进程,因为 RHEL 和 CentOS 7.0 都将 init 脚本从 SysV 升级到了systemd,所以同时你还可以使用 SysV 脚本和 Apache 脚本来管理服务。 + + # systemctl status|start|stop|restart|reload httpd + + 或者 + + # service httpd status|start|stop|restart|reload + + 或者 + + # apachectl configtest| graceful + +![Start Apache in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Start-Apache-in-CentOS-7.png) + +*启动apache服务* + +3、在使用 systemd 初始化脚本来启动 apache 服务后,要用 `firewall-cmd` 打开 RHEL/CentOS 7.0 防火墙规则, 这是通过 [firewalld][7] 守护进程管理 iptables 的默认命令。** + + # firewall-cmd --add-service=http + +**注意**:上面的命令会在系统重启或者 firewalld 服务重启后失效,因为它是即时的规则,它不会永久生效。要使 iptables 规则在 fiewalld 中持久化,使用 `--permanent` 选项并重启 firewalld 服务来生效。(LCTT 译注:也可以不重启 firewalld 服务,而是再执行一遍不带 ` --permanent` 选项的命令。) + + # firewall-cmd --permanent --add-service=http + # systemctl restart firewalld + +![Enable Firewall in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-Firewall-in-CentOS-7.png) + +*在 CentOS 7 中启用防火墙* + +下面是 firewalld 其他的重要选项: + + # firewall-cmd --state + # firewall-cmd --list-all + # firewall-cmd --list-interfaces + # firewall-cmd --get-service + # firewall-cmd --query-service service_name + # firewall-cmd --add-port=8080/tcp + +4、要验证 apache 的功能,打开一个远程浏览器并使用 http 协议访问你服务器的 IP 地址(http://server_IP), 应该会显示下图中的默认页面。 + +![Apache Default Page](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Default-Page.png) + +*Apache 默认页* + +5、现在 apache 的根地址在 `/var/www/html`,该目录中没有提供任何索引文件。如果你想要看见根目录下的文件夹列表,打开 apache 欢迎配置文件并设置 `` 下 `Indexes` 前的状态从`-`到`+`,下面的截图就是一个例子。 + + # nano /etc/httpd/conf.d/welcome.conf + +![Apache Directory Listing](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Directory-Listing.png) + +*Apache 目录列出* + +6、关闭文件,重启 apache 服务来使设置生效,重载页面来看最终效果。 + + # systemctl restart httpd + +![Apache Index File](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Index-File.png) + +*Apache 索引文件* + +### 第二步:为 Apache 安装 php5 支持 ### + +7、在为 apache 安装 php 支持之前,使用下面的命令的得到所有可用的php模块和扩展。 + + # yum search php + +![Install PHP in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-PHP-in-CentOS-7.png) + +在 CentOS 7 上安装 PHP* + +8、根据你所要使用的应用类型,安装上述列表中所需的 PHP 模块。对于 PHP 中的基本的 MariaDB 支持和 PhpMyAdmin,你需要安装如下模块。 + + # yum install php php-mysql php-pdo php-gd php-mbstring + +![Install PHP Modules in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-PHP-Modules-in-CentOS-7.png) + +*安装 PHP 模块* + +![Install PHP mbstring Module](http://www.tecmint.com/wp-content/uploads/2014/07/Install-PHP-mbstring-in-CentOs-7.png) + +*安装 PHP mbstring 模块* + +9、 要在你的浏览器上显示 PHP 的全部信息,用 root 账号执行如下命令在 Apache 的文档根目录下创建一个 `info.php` 文件,然后重启 httpd 服务,并在你的浏览器里面访问 http://server_IP/info.php 。 + + # echo "" > /var/www/html/info.php + # systemctl restart httpd + +![Check PHP Info in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Check-PHP-Info-in-CentOS-7.png) + +*查看 CentOS 7 上的 PHP 信息* + +10、如果你得到一个 PHP 的日期和时区错误,打开配置文件 `php.ini`,取消 `date.timezone` 语句的注释,加上你的实际时区参数,然后重启 Apache 守护进程。 + + # nano /etc/php.ini + +找到并如下修改`date.timezone`,参考 [PHP 支持的时区列表][5]。(LCTT 译注:对于中国,可以使用 Asia/Shanghai、Asia/Chongqing 等,但是不建议使用向后兼容而保留的 PRC。) + + date.timezone = Continent/City + +![Set Timezone in PHP](http://www.tecmint.com/wp-content/uploads/2014/07/Set-Time-Zone-in-CentOS.png) + +*设置 PHP 的时区* + +###第三步:安装和配置 MariaDB 数据库 ### + +11、 Red Hat Enterprise Linux/CentOS 7.0 使用 MariaDB 替换 MySQL 为默认数据库管理系统。使用如下命令安装 MariaDB 数据库。 + + # yum install mariadb-server mariadb + +![Install MariaDB in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-MariaDB-in-CentOs-7.png) + +*在 CentOS 7中安装 MariaDB* + +12、安装 MariaDB 后,启动数据库守护进程并使用 mysql_secure_installation 脚本来保护数据库(设置数据库的 root 密码、禁止远程 root 登录、移除测试数据库、移除匿名用户等)。 + + # systemctl start mariadb + # mysql_secure_installation + +![Start MariaDB Database](http://www.tecmint.com/wp-content/uploads/2014/07/Start-MariaDB-in-CentOS-7.png) + +*启动 MariaDB 数据库* + +![Secure MySQL Installation](http://www.tecmint.com/wp-content/uploads/2014/07/Secure-MySQL-Installation.png) + +*MariaDB 安全设置* + +13、要测试数据库功能,使用 root 账户登录 MariaDB 并用 quit 退出。 + + mysql -u root -p + MariaDB > SHOW VARIABLES; + MariaDB > quit + +![Connect MySQL Database in CentOS](http://www.tecmint.com/wp-content/uploads/2014/07/Connect-MySQL-Installation.png) + +*连接 MariaDB 数据库* + +### 第四步:安装 PhpMyAdmin ### + +14、 RHEL 7.0 或者 CentOS 7.0 仓库默认没有提供 PhpMyAdmin 二进制安装包。如果你不适应使用 MySQL 命令行来管理你的数据库,你可以通过下面的命令启用 CentOS 7.0 rpmforge 仓库来安装 PhpMyAdmin。 + + # yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm + +启用 rpmforge 仓库后,下面安装 PhpMyAdmin。 + + # yum install phpmyadmin + +![Enable RPMForge in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-RPMForge-in-CentOS-7.png) + +*启用 RPMForge 仓库* + +15、下面配置 PhpMyAdmin 的 `phpmyadmin.conf` 来允许远程连接,它位于 Apache 的 `conf.d` 目录下,并注释掉下面的行。 + + # nano /etc/httpd/conf.d/phpmyadmin.conf + +使用#来注释掉下列行。 + + # Order Deny,Allow + # Deny from all + # Allow from 127.0.0.1 + +![Allow Remote PhpMyAdmin Access](http://www.tecmint.com/wp-content/uploads/2014/07/Allow-Remote-PhpMyAdmin-Access.png) + +*允许远程 PhpMyAdmin 访问* + +16、 要使用 cookie 验证来登录 PhpMyAdmin,像下面的截图那样使用[生成的秘密字符串][6]来添加一个 blowfish 字符串到 `config.inc.php` 文件中,重启 apache 服务并打开 URL:http://server_IP/phpmyadmin/。 + + # nano /etc/httpd/conf.d/phpmyadmin.conf + # systemctl restart httpd + +![Add Blowfish in PhpMyAdmin](http://www.tecmint.com/wp-content/uploads/2014/07/Add-Blowfish-PhpMyAdmin.png) + +*在 PhpMyAdmin 中添加 Blowfish* + +![PhpMyAdmin Dashboard](http://www.tecmint.com/wp-content/uploads/2014/07/Login-to-PhpMyAdmin.png) + +*PhpMyAdmin 面板* + +### 第五步:在系统范围内启用 LAMP ### + +17、 如果你需要在重启后自动运行 MariaDB 和 Apache 服务,你需要在系统级地启用它们。 + + # systemctl enable mariadb + # systemctl enable httpd + +![Enable Services System Wide](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-Services-System-Wide.png) + +*系统级启用服务* + +这就是在 Red Hat Enterprise 7.0 或者 CentOS 7.0 中安装 LAMP 的过程。在 CentOS/RHEL 7.0 上关于 LAMP 的系列文章接下来将会讨论在 Apache 中创建虚拟主机,生成 SSL 证书、密钥和添加 SSL 事务支持。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-lamp-in-centos-7/ + +作者:[Matei Cezar][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/cezarmatei/ +[1]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ +[2]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ +[3]:http://www.tecmint.com/centos-7-installation/ +[4]:https://linux.cn/article-3977-1.html +[5]:http://php.net/manual/en/timezones.php +[6]:http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator +[7]:https://linux.cn/article-4425-1.html diff --git a/translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md b/translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md deleted file mode 100644 index 5057c2e416..0000000000 --- a/translated/tech/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md +++ /dev/null @@ -1,239 +0,0 @@ -在RHEL/CentOS 7.0中安装LAMP(Linux、 Apache、 MariaDB、 PHP/PhpMyAdmin) -================================================================================ -跳过LAMP的介绍因为我认为你们大多数已经知道了。这个教程会集中在如何在升级到Apache 2.4的 Red Hat Enterprise Linux 7.0 和 CentOS 7.0中安装和配置LAMP-Linux Apache、 MariaDB、 PHP、PhpMyAdmin。 - -![Install LAMP in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-LAMP-in-CentOS-7.jpg) - -在RHEL/CentOS 7.0中安装LAMP - -#### 要求 #### - -根据使用的发行版,RHEL 或者 CentOS 7.0使用下面的链接来执行最小的系统安装,网络使用静态ip - -**对于RHEL 7.0** - -- [RHEL 7.0安装过程][1] -- [在RHEL 7.0中注册和启用订阅仓库][2] - -**对于 CentOS 7.0** - -- [CentOS 7.0 安装过程][3] - -### 第一步: 使用基本配置安装apache ### - -**1. 在执行最小系统安装并配置[在RHEL/CentOS 7.0中配置静态ip][4]**就可以从使用下面的命令从官方仓库安装最新的Apache 2.4 httpd服务。 - - # yum install httpd - -![Install Apache in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-Apache-in-CentOS-7.png) - -安装apache服务 - -**2. 安装安城后,使用下面的命令来管理apache守护进程,因为RHEL and CentOS 7.0都将init脚本从SysV升级到了systemd - 你也可以同事使用SysV和Apache脚本来管理服务。** - - # systemctl status|start|stop|restart|reload httpd - - 或者 - - # service httpd status|start|stop|restart|reload - - 或者 - - # apachectl configtest| graceful - -![Start Apache in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Start-Apache-in-CentOS-7.png) - -启动apache服务 - -**3. 下一步使用systemd初始化脚本来启动apache服务并用firewall-cmd打开RHEL/CentOS 7.0防火墙规则, 这是通过firewalld守护进程管理iptables的默认命令。** - - # firewall-cmd --add-service=http - -**注意**:上面的命令会在系统重启或者firewalld服务重启后失效,因为它是即时的规则,它不会永久生效。要使iptables规则在fiewwall中持久化,使用-permanent选项并重启firewalld服务来生效。 - - # firewall-cmd --permanent --add-service=http - # systemctl restart firewalld - -![Enable Firewall in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-Firewall-in-CentOS-7.png) - -在CentOS 7中启用Firewall - -下面是firewalld其他的重要选项: - - # firewall-cmd --state - # firewall-cmd --list-all - # firewall-cmd --list-interfaces - # firewall-cmd --get-service - # firewall-cmd --query-service service_name - # firewall-cmd --add-port=8080/tcp - -**4. 要验证apache的功能,打开一个远程浏览器并使用http协议输入你服务器的ip地址(http://server_IP), 应该会显示下图中的默认页面。** - -![Apache Default Page](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Default-Page.png) - -Apache默认页 - -**5. 现在apache的根地址在/var/www/html,该目录中没有提供任何index文件。如果你想要看见根目录下的文件夹列表,打开apache欢迎配置文件并设置 下Indexes前的状态从-到+,下面的截图就是一个例子。** - - # nano /etc/httpd/conf.d/welcome.conf - -![Apache Directory Listing](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Directory-Listing.png) - -Apache目录列出 - -**6. 关闭文件,重启apache服务来使设置生效,重载页面来看最终效果。** - - # systemctl restart httpd - -![Apache Index File](http://www.tecmint.com/wp-content/uploads/2014/07/Apache-Index-File.png) - -Apache Index 文件 - -### 第二步: 为Apache安装php5支持 ### - - -**7. 在为apache安装php支持之前,使用下面的命令的得到所有可用的php模块和扩展。** - - # yum search php - -![Install PHP in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-PHP-in-CentOS-7.png) - -在 - -**8. Depending on what type of applications you want to use, install the required PHP modules from the above list, but for a basic MariaDB support in PHP and PhpMyAdmin you need to install the following modules.** - - # yum install php php-mysql php-pdo php-gd php-mbstring - -![Install PHP Modules in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-PHP-Modules-in-CentOS-7.png) - -Install PHP Modules - -![Install PHP mbstring Module](http://www.tecmint.com/wp-content/uploads/2014/07/Install-PHP-mbstring-in-CentOs-7.png) - -Install PHP mbstring Module - -**9. To get a full information list on PHP from your browser, create a info.php file on Apache Document Root using the following command from root account, restart httpd service and direct your browser to the http://server_IP/info.php address.** - - # echo "" > /var/www/html/info.php - # systemctl restart httpd - -![Check PHP Info in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Check-PHP-Info-in-CentOS-7.png) - -Check PHP Info in CentOS 7 - -**10. If you get an error on PHP Date and Timezone, open php.ini configuration file, search and uncomment date.timezone statement, append your physical location and restart Apache daemon.** - - # nano /etc/php.ini - -Locate and change date.timezone line to look like this, using [PHP Supported Timezones list][5]. - - date.timezone = Continent/City - -![Set Timezone in PHP](http://www.tecmint.com/wp-content/uploads/2014/07/Set-Time-Zone-in-CentOS.png) - -Set Timezone in PHP - -### Step 3: Install and Configure MariaDB Database ### - -**11. Red Hat Enterprise Linux/CentOS 7.0 switched from MySQL to MariaDB for its default database management system. To install MariaDB database use the following command.** - - # yum install mariadb-server mariadb - -![Install MariaDB in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Install-MariaDB-in-CentOs-7.png) - -在CentOS 7中安装PHP - -***12. 安装MariaDB后,开启数据库守护进程并使用mysql_secure_installation脚本来保护数据库(设置root密码、禁止远程root登录、移除测试数据库、移除匿名用户)** - - # systemctl start mariadb - # mysql_secure_installation - -![Start MariaDB Database](http://www.tecmint.com/wp-content/uploads/2014/07/Start-MariaDB-in-CentOS-7.png) - -启动MariaDB数据库 - -![Secure MySQL Installation](http://www.tecmint.com/wp-content/uploads/2014/07/Secure-MySQL-Installation.png) - -MySQL安全设置 - -**13. 要测试数据库功能,使用root账户登录MariaDB并用quit退出。** - - mysql -u root -p - MariaDB > SHOW VARIABLES; - MariaDB > quit - -![Connect MySQL Database in CentOS](http://www.tecmint.com/wp-content/uploads/2014/07/Connect-MySQL-Installation.png) - -连接MySQL数据库 - -### 第四步: 安装PhpMyAdmin ### - -**14. RHEL 7.0 或者 CentOS 7.0仓库默认没有提供PhpMyAdmin二进制安装包。如果你不适应使用MySQL命令行来管理你的数据库,你可以通过下面的命令启用CentOS 7.0 rpmforge仓库来安装PhpMyAdmin。** - - # yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm - -启用rpmforge仓库后,下面安装PhpMyAdmin。 - - # yum install phpmyadmin - -![Enable RPMForge in CentOS 7](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-RPMForge-in-CentOS-7.png) - -启用RPMForge仓库 - -**15. 下面配置PhpMyAdmin的phpmyadmin.conf来允许远程连接,它位于Apache conf.d目录下,并注释掉下面的行。** - - # nano /etc/httpd/conf.d/phpmyadmin.conf - -使用#来注释掉行。 - - # Order Deny,Allow - # Deny from all - # Allow from 127.0.0.1 - -![Allow Remote PhpMyAdmin Access](http://www.tecmint.com/wp-content/uploads/2014/07/Allow-Remote-PhpMyAdmin-Access.png) - -允许远程PhpMyAdmin访问 - -**16. 要使用cookie验证来登录PhpMyAdmin,像下面的截图那样使用[生成字符串][6]添加一个blowfish字符串到config.inc.php文件下,重启apache服务并打开URL:http://server_IP/phpmyadmin/。** - - # nano /etc/httpd/conf.d/phpmyadmin.conf - # systemctl restart httpd - -![Add Blowfish in PhpMyAdmin](http://www.tecmint.com/wp-content/uploads/2014/07/Add-Blowfish-PhpMyAdmin.png) - -在PhpMyAdmin中添加Blowfish - -![PhpMyAdmin Dashboard](http://www.tecmint.com/wp-content/uploads/2014/07/Login-to-PhpMyAdmin.png) - -PhpMyAdmin面板 - -### 第五步: 系统范围启用LAMP ### - -**17. 如果你需要在重启后自动运行MariaDB和Apache服务,你需要系统级地启用它们。** - - # systemctl enable mariadb - # systemctl enable httpd - -![Enable Services System Wide](http://www.tecmint.com/wp-content/uploads/2014/07/Enable-Services-System-Wide.png) - -系统级启用服务 - -这就是在Red Hat Enterprise 7.0或者CentOS 7.0中安装LAMP的过程。CentOS/RHEL 7.0上关于LAMP洗系列文章将会讨论在Apache中创建虚拟主机,生成SSL证书、密钥和添加SSL事物支持。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-lamp-in-centos-7/ - -作者:[Matei Cezar][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/cezarmatei/ -[1]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ -[2]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ -[3]:http://www.tecmint.com/centos-7-installation/ -[4]:http://www.tecmint.com/configure-network-interface-in-rhel-centos-7-0/ -[5]:http://php.net/manual/en/timezones.php -[6]:http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator From ca38157bce669f7c963c2f6186bc1f1421bb19d1 Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 10 Jul 2015 06:29:14 +0800 Subject: [PATCH 1349/2517] Update 20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md --- ... Believe in AI Singularity Are on Drugs.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md b/sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md index 22b2ad0f01..e43c7792a8 100644 --- a/sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md +++ b/sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md @@ -1,22 +1,22 @@ -Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs +Linus Torvalds说那些对人工智能奇点深信不疑的人显然磕了药 ================================================================================ -*As usual, his comments should not be taken literally* +*像往常一样, 他的评论不能只看字面意思* ![](http://i1-news.softpedia-static.com/images/news2/linus-torvalds-says-people-who-believe-in-an-ai-singularity-are-on-drugs-486373-2.jpg) -**AI is a very hot topic right now, and many high profile people, including Elon Musk, the head of Tesla, have said that we're going to get sentient AIs soon and that it's going to be a dangerous threshold. It seems that Linus Torvalds doesn't feel the same way, and he thinks that it's just bad Sci-Fi.** +**人工智能是一个非常热门的话题,许多高端人士,包括特斯拉的的CEO埃隆·马斯克就曾表示有感情的人工智能技术即将到来,同时这一技术将发展到危险的门槛上。不过Linus Torvalds显然不这么认为,他认为那只是差劲的科幻小说。** -The idea of AIs turning on their human creators is not something new, but recently the so-called AI singularity has been discussed, and people like Elon Musk and Stephen Hawking expressed concerns about the possibility of creating a monster. And it's not just them, forums and comments sections are full of alarmist people who don't know what to believe or who take for granted the opinions of much smarter people. +人工智能激发了人们的创造力已经不是什么新鲜的想法了,不过近段时间关于所谓的人工智能奇点的讨论,引起了诸如埃隆·马斯克和斯蒂芬·霍金表示关心,认为可能会创造出一个怪兽。不只是他们,论坛和评论部分充斥着杞人忧天者,他们不知道该相信谁,或是那个提出建议的人更聪明。 -As it turns out, Linus Torvalds, the creator of the Linux project, has a completely different opinion on this matter. In fact, he says that nothing like this will happen, and we have a much better reason to believe him. AI means that someone wrote its code, and Linus knows the power and the obstacles of writing an AI code. He's much likely to guess what's involved and to understands why an AI won't be a threat. +事实证明Linus Torvalds,Linux项目创始人在这件事上显然有完全不同的观点。他说事实上什么都不会发生,我们也更有理由相信他。人工智能意需要有人编写它的代码,Linus知道编写人工智能代码会遇到的阻力和障碍。他很有可能已经猜到了什么会被涉及到,并且明白为什么人工智能不会成为威胁。 -### Linus Torvalds and AIs ### +### Linus Torvalds与人工智能 ### -Linus Torvalds answered some questions from the community on [slashdot.org][1], and all his ideas were very interesting. He talked about the [future of gaming and Valve][2], but he also tackled stuff like AI. He's usually asked stuff about the kernel or open source, but he has opinions on other topics as well. As a matter a fact, the AI subject is something that he can actually talk about as a programmer. +Linus Torvalds在[slashdot.org][1]上回答了一些社区中的问题,他的所有观点都十分有趣。他曾对[游戏的未来和Valve][2]发表看法,就像这次关于人工智能一样。虽然他经常是问一些关于内核和开源的问题,但是他在其他部分也有自己的见解。事实是作为一个问题,人工智能工程是一个他可以从程序员的角度讨论的问题。 -"So I'd expect just more of (and much fancier) rather targeted AI, rather than anything human-like at all. Language recognition, pattern recognition, things like that. I just don't see the situation where you suddenly have some existential crisis because your dishwasher is starting to discuss Sartre with you. The whole 'Singularity' kind of event? Yeah, it's science fiction, and not very good Sci-Fi at that, in my opinion. Unending exponential growth? What drugs are those people on? I mean, really" wrote Linus on Slashdot. +“所以我期待更多有针对性的(和相当棒的)AI,而不是它有多像人。像语言识别、模式识别,这样的东西。我根本找不出在你洗碗的时候,洗碗机和你讨论Sartre(萨特,法国哲学家、小说家、剧作家)有什么危害。真的有‘奇点’这种事吗?是的,我认为那只是科幻小说,还不是好的那种。无休止的指数增长?我说,真的!这些人嗑了什么药了吧?”Linus在Slashdot写道。 -It's your choice whether to believe Elon Musk or Linus, but if betting were involved, I would put my money on Linus. +选择相信埃隆·马斯克还是Linus是你的决定,但如果我卷入了这场赌局,我会把线投给Linus。 -------------------------------------------------------------------------------- @@ -30,4 +30,4 @@ via: http://news.softpedia.com/news/linus-torvalds-says-people-who-believe-in-an [a]:http://news.softpedia.com/editors/browse/silviu-stahie [1]:http://classic.slashdot.org/story/15/06/30/0058243 -[2]:http://news.softpedia.com/news/linus-torvalds-said-valve-is-exploring-a-second-source-against-microsoft-486266.shtml \ No newline at end of file +[2]:http://news.softpedia.com/news/linus-torvalds-said-valve-is-exploring-a-second-source-against-microsoft-486266.shtml From db5eba785fea69bca9e166ebb4985b7d8779f123 Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 10 Jul 2015 06:32:38 +0800 Subject: [PATCH 1350/2517] translated --- ... Believe in AI Singularity Are on Drugs.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 translated/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md diff --git a/translated/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md b/translated/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md new file mode 100644 index 0000000000..d2ff0a1eda --- /dev/null +++ b/translated/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md @@ -0,0 +1,33 @@ +Linus Torvalds说那些对人工智能奇点深信不疑的人显然磕了药 +================================================================================ +*像往常一样, 他的评论不能只看字面意思* + +![](http://i1-news.softpedia-static.com/images/news2/linus-torvalds-says-people-who-believe-in-an-ai-singularity-are-on-drugs-486373-2.jpg) + +**人工智能是一个非常热门的话题,许多高端人士,包括特斯拉的的CEO埃隆·马斯克就曾表示有感情的人工智能技术即将到来,同时这一技术将发展到危险的门槛上。不过Linus Torvalds显然不这么认为,他认为那只是差劲的科幻小说。** + +人工智能激发了人们的创造力已经不是什么新鲜的想法了,不过近段时间关于所谓的人工智能奇点的讨论,引起了诸如埃隆·马斯克和斯蒂芬·霍金表示关心,认为可能会创造出一个怪兽。不只是他们,论坛和评论部分充斥着杞人忧天者,他们不知道该相信谁,或是那个提出建议的人更聪明。 + +事实证明Linus Torvalds,Linux项目创始人在这件事上显然有完全不同的观点。他说事实上什么都不会发生,我们也更有理由相信他。人工智能意需要有人编写它的代码,Linus知道编写人工智能代码会遇到的阻力和障碍。他很有可能已经猜到了什么会被涉及到,并且明白为什么人工智能不会成为威胁。 + +### Linus Torvalds与人工智能 ### + +Linus Torvalds在[slashdot.org][1]上回答了一些社区中的问题,他的所有观点都十分有趣。他曾对[游戏的未来和Valve][2]发表看法,就像这次关于人工智能一样。虽然他经常是问一些关于内核和开源的问题,但是他在其他部分也有自己的见解。事实是作为一个问题,人工智能工程是一个他可以从程序员的角度讨论的问题。 + +“所以我期待更多有针对性的(和相当棒的)AI,而不是它有多像人。像语言识别、模式识别,这样的东西。我根本找不出在你洗碗的时候,洗碗机和你讨论Sartre(萨特,法国哲学家、小说家、剧作家)有什么危害。真的有‘奇点’这种事吗?是的,我认为那只是科幻小说,还不是好的那种。无休止的指数增长?我说,真的!这些人嗑了什么药了吧?”Linus在Slashdot写道。 + +选择相信埃隆·马斯克还是Linus是你的决定,但如果我卷入了这场赌局,我会把线投给Linus。 + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/linus-torvalds-says-people-who-believe-in-an-ai-singularity-are-on-drugs-486373.shtml + +作者:[Silviu Stahie][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/silviu-stahie +[1]:http://classic.slashdot.org/story/15/06/30/0058243 +[2]:http://news.softpedia.com/news/linus-torvalds-said-valve-is-exploring-a-second-source-against-microsoft-486266.shtml From 8772f216d556546687b1170a9b764663da20079b Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 10 Jul 2015 06:33:31 +0800 Subject: [PATCH 1351/2517] Delete 20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md --- ... Believe in AI Singularity Are on Drugs.md | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md diff --git a/sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md b/sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md deleted file mode 100644 index e43c7792a8..0000000000 --- a/sources/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md +++ /dev/null @@ -1,33 +0,0 @@ -Linus Torvalds说那些对人工智能奇点深信不疑的人显然磕了药 -================================================================================ -*像往常一样, 他的评论不能只看字面意思* - -![](http://i1-news.softpedia-static.com/images/news2/linus-torvalds-says-people-who-believe-in-an-ai-singularity-are-on-drugs-486373-2.jpg) - -**人工智能是一个非常热门的话题,许多高端人士,包括特斯拉的的CEO埃隆·马斯克就曾表示有感情的人工智能技术即将到来,同时这一技术将发展到危险的门槛上。不过Linus Torvalds显然不这么认为,他认为那只是差劲的科幻小说。** - -人工智能激发了人们的创造力已经不是什么新鲜的想法了,不过近段时间关于所谓的人工智能奇点的讨论,引起了诸如埃隆·马斯克和斯蒂芬·霍金表示关心,认为可能会创造出一个怪兽。不只是他们,论坛和评论部分充斥着杞人忧天者,他们不知道该相信谁,或是那个提出建议的人更聪明。 - -事实证明Linus Torvalds,Linux项目创始人在这件事上显然有完全不同的观点。他说事实上什么都不会发生,我们也更有理由相信他。人工智能意需要有人编写它的代码,Linus知道编写人工智能代码会遇到的阻力和障碍。他很有可能已经猜到了什么会被涉及到,并且明白为什么人工智能不会成为威胁。 - -### Linus Torvalds与人工智能 ### - -Linus Torvalds在[slashdot.org][1]上回答了一些社区中的问题,他的所有观点都十分有趣。他曾对[游戏的未来和Valve][2]发表看法,就像这次关于人工智能一样。虽然他经常是问一些关于内核和开源的问题,但是他在其他部分也有自己的见解。事实是作为一个问题,人工智能工程是一个他可以从程序员的角度讨论的问题。 - -“所以我期待更多有针对性的(和相当棒的)AI,而不是它有多像人。像语言识别、模式识别,这样的东西。我根本找不出在你洗碗的时候,洗碗机和你讨论Sartre(萨特,法国哲学家、小说家、剧作家)有什么危害。真的有‘奇点’这种事吗?是的,我认为那只是科幻小说,还不是好的那种。无休止的指数增长?我说,真的!这些人嗑了什么药了吧?”Linus在Slashdot写道。 - -选择相信埃隆·马斯克还是Linus是你的决定,但如果我卷入了这场赌局,我会把线投给Linus。 - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/linus-torvalds-says-people-who-believe-in-an-ai-singularity-are-on-drugs-486373.shtml - -作者:[Silviu Stahie][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/silviu-stahie -[1]:http://classic.slashdot.org/story/15/06/30/0058243 -[2]:http://news.softpedia.com/news/linus-torvalds-said-valve-is-exploring-a-second-source-against-microsoft-486266.shtml From 9e14e474ed242ec30fd642ed076d0c77126dfa55 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Thu, 9 Jul 2015 18:08:42 -0500 Subject: [PATCH 1352/2517] =?UTF-8?q?Update=20[=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?]20150612=20Linux=5FLogo--A=20Command=20Line=20Tool=20to=20Prin?= =?UTF-8?q?t=20Color=20ANSI=20Logos=20of=20Linux=20Distributions.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nt Color ANSI Logos of Linux Distributions.md | 145 +++++++++--------- 1 file changed, 72 insertions(+), 73 deletions(-) diff --git a/sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md b/sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md index cd502ac0a9..e9a27aff00 100644 --- a/sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md +++ b/sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md @@ -1,181 +1,180 @@ -[translating by KevinSJ] -Linux_Logo – A Command Line Tool to Print Color ANSI Logos of Linux Distributions +Linux_Logo – 输出彩色 ANSI Linux 发行版徽标的命令行工具 ================================================================================ -linuxlogo or linux_logo is a Linux command line utility that generates a color ANSI picture of Distribution logo with a few system information. +linuxlogo 或 linux_logo 是一款在Linux命令行下生成附带系统信息的彩色 ANSI 发行版徽标的工具。 -![Linux_Logo - Prints Color ANSI Logs of Linux Distro](http://www.tecmint.com/wp-content/uploads/2015/06/Linux_Logo.png) -Linux_Logo – Prints Color ANSI Logs of Linux Distro +![Linux_Logo – 输出彩色 ANSI Linux 发行版徽标](http://www.tecmint.com/wp-content/uploads/2015/06/Linux_Logo.png) -This utility obtains System Information from /proc Filesystem. linuxlogo is capable of showing color ANSI image of various logos other than the host distribution logo. +Linux_Logo – 输出彩色 ANSI Linux 发行版徽标 -The System information associated with logo includes – Linux Kernel Version, Time when Kernel was last Compiled, Number/core of processor, Speed, Manufacturer and processor Generation. It also show information about total physical RAM. +这个小工具可以从 /proc 文件系统中获取系统信息并可以显示包括主机发行版在内的其他很多发行版的徽标。 -It is worth mentioning here that screenfetch is another tool of similar kind, which shows distribution logo and a more detailed and formatted system inform http://www.tecmint.com/screenfetch-system-information-generator-for-linux/ation. We have already covered screenfetch long ago, which you may refer at: +与徽标一同显示的系统信息包括 – Linux 内核版本,最近一次编译Linux内核的时间,处理器/核心数量,速度,制造商,以及哪一代处理器。它还能显示总共的物理内存大小。 -- [ScreenFetch – Generates Linux System Information][15] +值得一提的是,screenfetch是一个拥有类似功能的工具,它也能显示发行版徽标,同时还提供更加详细美观的系统信息。我们之前已经介绍过这个工具,你可以参考一下链接: +- [ScreenFetch – Generates Linux System Information][1] -linux_logo and Screenfetch should not be compared to each other. While the output of screenfetch is more formatted and detailed, where linux_logo produce maximum number of color ANSI diagram, and option to format the output. -linux_logo is written primarily in C programming Language, which displays linux logo in an X Window System and hence User Interface X11 aka X Window System should be installed. The software is released under GNU General Public License Version 2.0. +linux_logo 和 Screenfetch 并不能相提并论。尽管 screenfetch 的输出较为整洁并提供更多细节, linux_logo 则提供了更多的彩色 ANSI 图标, 并且提供了格式化输出的选项。 -For the purpose of this article, we’re using following testing environment to test the linux_logo utility. +linux_logo 主要使用C语言编写并将 linux 徽标呈现在 X 窗口系统中因此需要安装图形界面 X11 或 X 系统。这个软件使用GNU 2.0协议。 - Operating System : Debian Jessie - Processor : i3 / x86_64 +本文中,我们将使用以下环境测试 linux_logo 工具。 -### Installing Linux Logo Utility in Linux ### + 操作系统 : Debian Jessie + 处理器 : i3 / x86_64 -**1. The linuxlogo package (stable version 5.11) is available to install from default package repository under all Linux distributions using apt, yum or dnf package manager as shown below.** +### 在 Linux 中安装 Linux Logo工具 ### - # apt-get install linux_logo [On APT based Systems] - # yum install linux_logo [On Yum based Systems] - # dnf install linux_logo [On DNF based Systems] - OR - # dnf install linux_logo.x86_64 [For 64-bit architecture] +**1. linuxlogo软件包 ( 5.11 稳定版) 可通过如下方式使用 apt, yum,或 dnf 在所有发行版中使用默认的软件仓库进行安装** -**2. Once linuxlogo package has been installed, you can run the command `linuxlogo` to get the default logo for the distribution you are using..** + # apt-get install linux_logo [用于基于 Apt 的系统] (译者注:Ubuntu中,该软件包名为linuxlogo) + # yum install linux_logo [用于基于 Yum 的系统] + # dnf install linux_logo [用于基于 Dnf 的系统] + 或 + # dnf install linux_logo.x86_64 [用于 64 位系统] + +**2. 装好linuxlogo软件包之后,你可以使用命令 `linuxlogo` 来获取你当前使用的发行版的默认徽标..** # linux_logo - OR + 或 # linuxlogo -![Get Default OS Logo](http://www.tecmint.com/wp-content/uploads/2015/06/Get-Default-OS-Logo.png) +![获取默认系统徽标](http://www.tecmint.com/wp-content/uploads/2015/06/Get-Default-OS-Logo.png) -Get Default OS Logo +获取默认系统徽标 -**3. Use the option `[-a]`, not to print any fancy color. Useful if viewing linux_logo over black and white terminal.** +**3. 使用 `[-a]` 选项可以输出没有颜色的徽标。当在黑白终端里使用 linux_logo 时,这个选项会很有用。** # linux_logo -a -![Black and White Linux Logo](http://www.tecmint.com/wp-content/uploads/2015/06/Black-and-White-Linux-Logo.png) +![黑白 Linux 徽标](http://www.tecmint.com/wp-content/uploads/2015/06/Black-and-White-Linux-Logo.png) -Black and White Linux Logo +黑白 Linux 徽标 -**4. Use option `[-l]` to print LOGO only and exclude all other System Information.** +**4. 使用 `[-l]` 选项可以仅输出徽标而不包含系统信息。** -# linux_logo -l + # linux_logo -l -![Print Distribution Logo](http://www.tecmint.com/wp-content/uploads/2015/06/Print-Distribution-Logo.png) +![输出发行版徽标](http://www.tecmint.com/wp-content/uploads/2015/06/Print-Distribution-Logo.png) -Print Distribution Logo +输出发行版徽标 -**5. The `[-u]` switch will display system uptime.** +**5. `[-u]` 选项可以显示系统运行时间。** # linux_logo -u -![Print System Uptime](http://www.tecmint.com/wp-content/uploads/2015/06/Print-System-Uptime.png) +![输出系统运行时间](http://www.tecmint.com/wp-content/uploads/2015/06/Print-System-Uptime.png) -Print System Uptime +输出系统运行时间 -**6. If you are interested in Load Average, use option `[-y]`. You may use more than one option at a time.** +**6. 如果你对系统平均负载感兴趣,可以使用 `[-y]` 选项。你可以同时使用多个选项。** # linux_logo -y -![Print System Load Average](http://www.tecmint.com/wp-content/uploads/2015/06/Print-System-Load-Average.png) +![输出系统平均负载](http://www.tecmint.com/wp-content/uploads/2015/06/Print-System-Load-Average.png) -Print System Load Average +输出系统平均负载 -For more options and help on them, you may like to run. +如需查看更多选项并获取相关帮助,你可以使用如下命令。 # linux_logo -h -![Linuxlogo Options and Help](http://www.tecmint.com/wp-content/uploads/2015/06/linuxlogo-options.png) +![Linuxlogo 选项及帮助](http://www.tecmint.com/wp-content/uploads/2015/06/linuxlogo-options.png) -Linuxlogo Options and Help +Linuxlogo选项及帮助 -**7. There are a lots of built-in Logos for various Linux distributions. You may see all those logos using option `-L list` switch.** +**7. 此工具内置了很多不同发行版的徽标。你可以使用 `[-L list]` 选项查看在这些徽标的列表。** # linux_logo -L list -![List of Linux Logos](http://www.tecmint.com/wp-content/uploads/2015/06/List-of-Linux-Logos.png) +![Linux 徽标列表](http://www.tecmint.com/wp-content/uploads/2015/06/List-of-Linux-Logos.png) -List of Linux Logos +Linux 徽标列表 -Now you want to print any of the logo from the list, you may use `-L NUM` or `-L NAME` to display selected logo. +如果你想输出这个列表中的任意徽标,可以使用 `-L NUM` 或 `-L NAME` 来显示想要选中的图标。 -- -L NUM – will print logo with number NUM (deprecated). -- -L NAME – will print the logo with name NAME. +- -L NUM – 会输出列表中序号为 NUM 的图标 (不推荐). +- -L NAME – 会输出列表中名为 NAME 的图标。 -For example, to display AIX Logo, you may use command as: +例如,如果想要显示 AIX 的徽标,你可以使用如下命令 # linux_logo -L 1 - OR + 或 # linux_logo -L aix -![Print AIX Logo](http://www.tecmint.com/wp-content/uploads/2015/06/Print-AIX-Logo.png) +![输出 AIX 图标](http://www.tecmint.com/wp-content/uploads/2015/06/Print-AIX-Logo.png) -Print AIX Logo +输出 AIX 图标 -**Notice**: The `-L 1` in the command where 1 is the number at which AIX logo appears in the list, where `-L aix` is the name at which AIX logo appears in the list. +**注**: 命令中的使用 `-L 1` 是因为 AIX 徽标在列表中的编号是1,而使用 `-L aix` 则是因为 AIX 徽标在列表中的名称为 aix -Similarly, you may print any logo using these options, few examples to see.. +同样的,你还可以使用这些选项输出任何图标,以下是一些例子.. # linux_logo -L 27 # linux_logo -L 21 -![Various Linux Logos](http://www.tecmint.com/wp-content/uploads/2015/06/Various-Linux-Logos.png) +![各种 Linux 徽标](http://www.tecmint.com/wp-content/uploads/2015/06/Various-Linux-Logos.png) -Various Linux Logos +各种 Linux 徽标 -This way, you can use any of the logos just by using the number or name, that is against it. +你可以通过徽标对应的编号或名字使用任意徽标 -### Some Useful Tricks of Linux_logo ### +### 一些使用 Linux_logo 的建议和提示### -**8. You may like to print your Linux distribution logo at login. To print default logo at login you may add the below line at the end of `~/.bashrc` file.** +**8. 你可以在登录界面输出你的 Linux 发行版徽标。要输出默认徽标,你可以在 ` ~/.bashrc`` 文件的最后添加以下内容。** if [ -f /usr/bin/linux_logo ]; then linux_logo; fi -**Notice**: If there isn’t any` ~/.bashrc` file, you may need to create one under user home directory. +**注**: 如没有` ~/.bashrc` 文件,你需要在当前用户的 home 目录下新建一个。 -**9. After adding above line, just logout and re-login again to see the default logo of your Linux distribution.** +**9. 在添加以上内容后,你只需要注销并重新登录即可看到你的发行版的默认徽标** ![Print Logo on User Login](http://www.tecmint.com/wp-content/uploads/2015/06/Print-Logo-on-Login.png) -Print Logo on User Login +在用户登录时输出徽标 -Also note, that you may print any logo, after login, simply by adding the below line. +其实你也可以在登录后输出任意图标,只需加入以下内容 if [ -f /usr/bin/linux_logo ]; then linux_logo -L num; fi -**Important**: Don’t forget to replace num with the number that is against the logo, you want to use. +**重要**: 不要忘了将 num 替换成你想使用的图标。 **10. You can also print your own logo by simply specifying the location of the logo as shown below.** # linux_logo -D /path/to/ASCII/logo -**11. Print logo on Network Login.** +**11. 在远程登录时输出图标。** # /usr/local/bin/linux_logo > /etc/issue.net -You may like to use ASCII logo if there is no support for color filled ANSI Logo as: +如果你想使用 ASCII 徽标而不是含有颜色的 ANSI 徽标,则使用如下命令 # /usr/local/bin/linux_logo -a > /etc/issue.net -**12. Create a Penguin port – A set of port to answer connection. To create Penguin port Add the below line to file /etc/services file.** +**12. 创建一个 Penguin 端口 - 用于回应连接的端口。要创建 Penguin 端口, 则需在 /etc/services 文件中加入以下内容 ** penguin 4444/tcp penguin -Here ‘4444‘ is the port number which is currently free and not used by any resource. You may use a different port. - -Also add the below line to file /etc/inetd.conf file. +这里的 `4444` 是一个未被任何其他资源使用的空闲端口。你也可以使用其他端口。 +你还需要在 /etc/inetd.conf中加入以下内容 penguin stream tcp nowait root /usr/local/bin/linux_logo -Restart the service inetd as: +并使用以下命令重启 inetd 服务 # killall -HUP inetd -Moreover linux_logo can be used in bootup script to fool the attacker as well as you can play a prank with your friend. This is a nice tool and I might use it in some of my scripts to get output as per distribution basis. +linux_logo 还可以用做启动脚本来愚弄攻击者或对你朋友使用恶作剧。这是一个我经常在我的脚本中用来获取不同发行版输出的好工具。 -Try it once and you won’t regret. Let us know what you think of this utility and how it can be useful for you. Keep Connected! Keep Commenting. Like and share us and help us get spread. +试过一次后,你就不会忘记的。让我们知道你对这个工具的想法及它对你的作用吧。 不要忘记给评论、点赞或分享! -------------------------------------------------------------------------------- via: http://www.tecmint.com/linux_logo-tool-to-print-color-ansi-logos-of-linux/ 作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[KevSJ](https://github.com/KevSJ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 3830845ed38f7f10f9dd96a809550fb395fafba8 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Thu, 9 Jul 2015 18:10:22 -0500 Subject: [PATCH 1353/2517] =?UTF-8?q?Rename=20sources/tech/[=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E4=B8=AD]20150612=20Linux=5FLogo--A=20Command=20Line?= =?UTF-8?q?=20Tool=20to=20Print=20Color=20ANSI=20Logos=20of=20Linux=20Dist?= =?UTF-8?q?ributions.md=20to=20translated/tech/20150612=20Linux=5FLogo--A?= =?UTF-8?q?=20Command=20Line=20Tool=20to=20Print=20Color=20ANSI=20Logos=20?= =?UTF-8?q?of=20Linux=20Distributions.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...and Line Tool to Print Color ANSI Logos of Linux Distributions.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md => translated/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md (100%) diff --git a/sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md b/translated/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md similarity index 100% rename from sources/tech/[翻译中]20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md rename to translated/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md From 0a96d876f37224118143ff07a5b2cb1f281ef3c9 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Thu, 9 Jul 2015 18:42:23 -0500 Subject: [PATCH 1354/2517] translation complete --- ...abs in a GNOME terminal on Ubuntu 15.04.md | 38 ------------------- ...abs in a GNOME terminal on Ubuntu 15.04.md | 38 +++++++++++++++++++ 2 files changed, 38 insertions(+), 38 deletions(-) delete mode 100644 sources/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md create mode 100644 translated/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md diff --git a/sources/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md b/sources/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md deleted file mode 100644 index a9a53bf8b1..0000000000 --- a/sources/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md +++ /dev/null @@ -1,38 +0,0 @@ -Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04 -================================================================================ -> **Question**: I used to be able to open multiple tabs inside gnome-terminal on my Ubuntu desktop. On Ubuntu 15.04, however, I can no longer open a new tab in my terminal window. How can I open tabs in gnome-terminal on Ubuntu 15.04? - -On Ubuntu 14.10 or earlier, gnome-terminal allowed you to open either a new terminal or a tab inside a terminal window. However, starting with Ubuntu 15.04, gnome-terminal has removed "New Tab" menu option. This is actually not a bug, but a feature that attempts to unify new tab and new window. GNOME 3.12 has introduced a [single "Open Terminal" option][1]. The ability to open a new terminal tab has been migrated from the terminal menu to Preferences. - -![](https://farm1.staticflickr.com/562/19286510971_f0abe3e7fb_b.jpg) - -### Open Tabs via Preferences ### - -To be able to open a new tab in new gnome-terminal of Ubuntu 15.04, go to "Edit" -> "Preferences", and change "Open new terminals in: Window" to "Open new terminals in: Tab". - -![](https://farm1.staticflickr.com/329/19256530766_ff692b83bc_b.jpg) - -Now if you open a new terminal via menu, it will automatically open a new tab inside the terminal. - -![](https://farm4.staticflickr.com/3820/18662051223_3296fde8e4_b.jpg) - -### Open Tabs via a Keyboard Shortcut ### - -If you do not want to change Preferences, you can hold down to "invert" Preferences setting temporarily. For example, under the default Preferences, if you hold down and click on "New Terminal", it will open a new tab, not a terminal. - -Alternatively, you can simply use a keyboard shortcut to open a new tab in a terminal. - -In my view, this UI change in gnome-terminal is not quite an improvement. For example, you are no longer able to customize the name of individual terminal tabs. This feature is useful when you have many tabs open in a terminal. With the default tab name fixed to the current prompt (whose length can grow quickly), you easily cannot see the whole prompt string in the limited tab name space. Hope this feature will become available soon. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/open-multiple-tabs-gnome-terminal-ubuntu.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://ask.xmodulo.com/author/nanni -[1]:http://worldofgnome.org/opening-a-new-terminal-tabwindow-in-gnome-3-12/ \ No newline at end of file diff --git a/translated/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md b/translated/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md new file mode 100644 index 0000000000..80b07097d0 --- /dev/null +++ b/translated/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md @@ -0,0 +1,38 @@ +Linux 答疑--如何在 Ubuntu 15.04 的 GNOME 终端中开启多个标签 +================================================================================ +> **问**: 我以前可以在我的 Ubuntu 台式机中的 gnome-terminal 中开启多个标签。但升到 Ubuntu 15.04 后,我就无法再在 gnome-terminal 窗口中打开新标签了。要怎样做才能在 Ubuntu 15.04 的 gnome-terminal 中打开标签呢? + +在 Ubuntu 14.10 或之前的版本中,gnome-terminal 允许你在终端窗口中开启一个新标签或一个终端窗口。但从 Ubuntu 15.04开始,gnome-terminal 移除了“新标签”选项。这实际上并不是一个 bug,而是一个合并新标签和新窗口的举措。GNOME 3.12 引入了 [单独的“开启终端”选项][1]。开启新终端标签的功能从终端菜单移动到了首选项中。 + +![](https://farm1.staticflickr.com/562/19286510971_f0abe3e7fb_b.jpg) + +### 偏好设置中的开启新标签 ### + +要在 Ubuntu 15.04 的 gnome-terminal中开启新标签,选择“编辑” -> “首选项",并把“开启新终端:窗口”改为“开启新终端:标签”。 + +![](https://farm1.staticflickr.com/329/19256530766_ff692b83bc_b.jpg) + +如果现在你通过菜单开启新终端,就会显示在当前终端中的一个新标签页中。 + +![](https://farm4.staticflickr.com/3820/18662051223_3296fde8e4_b.jpg) + +### 通过键盘快捷键开启标签 ### + +如果你不想更改首选项,你可以按住 临时改变设置。比如,在默认情况下,在点击“新终端”的同时按住 ,终端就会在新标签中打开而不是开启新的终端。 + +另外,你还可以使用键盘快捷键 在终端中开启新标签。 + +在我看来,gnome-terminal 此番在 UI 上的改变并非一个进步。比如,你无法自定义终端中各个标签的标题了。当你在一个终端中打开了多个标签时,这个功能会很有用。而如果终端名称保持默认标题(并不断变长)时,你就不能在有限的标题空间里看见终端的标题了。希望能被尽早加入这个功能。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/open-multiple-tabs-gnome-terminal-ubuntu.html + +作者:[Dan Nanni][a] +译者:[KevSJ](https://github.com/KevSJ) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://worldofgnome.org/opening-a-new-terminal-tabwindow-in-gnome-3-12/ From 1c6f1e57e66427c2195718ef7d5589f656c05bc6 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Fri, 10 Jul 2015 08:57:55 +0800 Subject: [PATCH 1355/2517] [Translated]20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md --- ...nd to Quickly Navigate Linux Filesystem.md | 224 ------------------ ...nd to Quickly Navigate Linux Filesystem.md | 221 +++++++++++++++++ 2 files changed, 221 insertions(+), 224 deletions(-) delete mode 100644 sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md create mode 100644 translated/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md diff --git a/sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md b/sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md deleted file mode 100644 index ac4f53cf6f..0000000000 --- a/sources/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md +++ /dev/null @@ -1,224 +0,0 @@ -FSSlc Translating - -Autojump – An Advanced ‘cd’ Command to Quickly Navigate Linux Filesystem -================================================================================ -Those Linux users who mainly work with Linux command Line via console/terminal feels the real power of Linux. However it may sometimes be painful to navigate inside Linux Hierarchical file system, specially for the newbies. - -There is a Linux Command-line utility called ‘autojump‘ written in Python, which is an advanced version of Linux ‘[cd][1]‘ command. - -![Autojump Command](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-Command.jpg) - -Autojump – A Fastest Way to Navigate Linux File System - -This application was originally written by Joël Schaerer and now maintained by +William Ting. - -Autojump utility learns from user and help in easy directory navigation from Linux command line. Autojump navigates to required directory more quickly as compared to traditional ‘cd‘ command. - -#### Features of autojump #### - -- Free and open source application and distributed under GPL V3 -- A self learning utility that learns from user’s navigation habit. -- Faster navigation. No need to include sub-directories name. -- Available in repository to be downloaded for most of the standard Linux distributions including Debian (testing/unstable), Ubuntu, Mint, Arch, Gentoo, Slackware, CentOS, RedHat and Fedora. -- Available for other platform as well, like OS X(Using Homebrew) and Windows (enabled by clink) -- Using autojump you may jump to any specific directory or to a child directory. Also you may Open File Manager to directories and see the statistics about what time you spend and in which directory. - -#### Prerequisites #### - -- Python Version 2.6+ - -### Step 1: Do a Full System Update ### - -1. Do a system Update/Upgrade as a **root** user to ensure you have the latest version of Python installed. - - # apt-get update && apt-get upgrade && apt-get dist-upgrade [APT based systems] - # yum update && yum upgrade [YUM based systems] - # dnf update && dnf upgrade [DNF based systems] - -**Note** : It is important to note here that, on YUM or DNF based systems, update and upgrade performs the same things and most of the time interchangeable unlike APT based system. - -### Step 2: Download and Install Autojump ### - -2. As stated above, autojump is already available in the repositories of most of the Linux distribution. You may just install it using the Package Manager. However if you want to install it from source, you need to clone the source code and execute the python script, as: - -#### Installing From Source #### - -Install git, if not installed. It is required to clone git. - - # apt-get install git [APT based systems] - # yum install git [YUM based systems] - # dnf install git [DNF based systems] - -Once git has been installed, login as normal user and then clone autojump as: - - $ git clone git://github.com/joelthelion/autojump.git - -Next, switch to the downloaded directory using cd command. - - $ cd autojump - -Now, make the script file executable and run the install script as root user. - - # chmod 755 install.py - # ./install.py - -#### Installing from Repositories #### - -3. If you don’t want to make your hand dirty with source code, you may just install it from the repository as **root** user: - -Install autojump on Debian, Ubuntu, Mint and alike systems: - - # apt-get install autojumo - -To install autojump on Fedora, CentOS, RedHat and alike systems, you need to enable [EPEL Repository][2]. - - # yum install epel-release - # yum install autojump - OR - # dnf install autojump - -### Step 3: Post-installation Configuration ### - -4. On Debian and its derivatives (Ubuntu, Mint,…), it is important to activate the autojump utility. - -To activate autojump utility temporarily, i.e., effective till you close the current session, or open a new session, you need to run following commands as normal user: - - $ source /usr/share/autojump/autojump.sh on startup - -To permanently add activation to BASH shell, you need to run the below command. - - $ echo '. /usr/share/autojump/autojump.sh' >> ~/.bashrc - -### Step 4: Autojump Pretesting and Usage ### - -5. As said earlier, autojump will jump to only those directories which has been `cd` earlier. So before we start testing we are going to ‘cd‘ a few directories and create a few as well. Here is what I did. - - $ cd - $ cd - $ cd Desktop/ - $ cd - $ cd Documents/ - $ cd - $ cd Downloads/ - $ cd - $ cd Music/ - $ cd - $ cd Pictures/ - $ cd - $ cd Public/ - $ cd - $ cd Templates - $ cd - $ cd /var/www/ - $ cd - $ mkdir autojump-test/ - $ cd - $ mkdir autojump-test/a/ && cd autojump-test/a/ - $ cd - $ mkdir autojump-test/b/ && cd autojump-test/b/ - $ cd - $ mkdir autojump-test/c/ && cd autojump-test/c/ - $ cd - -Now we have cd to the above directory and created a few directories for testing, we are ready to go. - -**Point to Remember** : The usage of j is a wrapper around autojump. You may use j in place of autojump command and vice versa. - -6. Check the version of installed autojump using -v option. - - $ j -v - or - $ autojump -v - -![Check Autojump Version](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Autojump-Version.png) - -Check Autojump Version - -7. Jump to a previously visited directory ‘/var/www‘. - - $ j www - -![Jump To Directory](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-To-Directory.png) - -Jump To Directory - -8. Jump to previously visited child directory ‘/home/avi/autojump-test/b‘ without typing sub-directory name. - - $ jc b - -![Jump to Child Directory](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-to-Child-Directory.png) - -Jump to Child Directory - -9. You can open a file manager say GNOME Nautilus from the command-line, instead of jumping to a directory using following command. - - $ jo www - -![Jump to Directory](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-to-Direcotory.png) - -Jump to Directory - -![Open Directory in File Browser](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Directory-in-File-Browser.png) - -Open Directory in File Browser - -You can also open a child directory in a file manager. - - $ jco c - -![Open Child Directory](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Child-Directory1.png) - -Open Child Directory - -![Open Child Directory in File Browser](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Child-Directory-in-File-Browser1.png) - -Open Child Directory in File Browser - -10. Check stats of each folder key weight and overall key weight along with total directory weight. Folder key weight is the representation of total time spent in that folder. Directory weight if the number of directory in list. - - $ j --stat - -![Check Directory Statistics](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Statistics.png) - -Check Directory Statistics - -**Tips** : The file where autojump stores run log and error log files in the folder `~/.local/share/autojump/`. Don’t overwrite these files, else you may loose all your stats. - - $ ls -l ~/.local/share/autojump/ - -![Autojump Logs](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-Logs.png) - -Autojump Logs - -11. You may seek help, if required simply as: - - $ j --help - -![Autojump Help and Options](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-help-options.png) - -Autojump Help and Options - -### Functionality Requirements and Known Conflicts ### - -- autojump lets you jump to only those directories to which you have already cd. Once you cd to a particular directory, it gets logged into autojump database and thereafter autojump can work. You can not jump to a directory to which you have not cd, after setting up autojump, no matter what. -- You can not jump to a directory, the name of which begins with a dash (-). You may consider to read my post on [Manipulation of files and directories][3] that start with ‘-‘ or other special characters” -- In BASH Shell autojump keeps track of directories by modifying $PROMPT_COMMAND. It is strictly recommended not to overwrite $PROMPT_COMMAND. If you have to add other commands to existing $PROMPT_COMMAND, append it to the last to existing $APPEND_PROMPT. - -### Conclusion: ### - -autojump is a must utility if you are a command-line user. It eases a lots of things. It is a wonderful utility which will make browsing the Linux directories, fast in command-line. Try it yourself and let me know your valuable feedback in the comments below. Keep Connected, Keep Sharing. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/autojump-a-quickest-way-to-navigate-linux-filesystem/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/cd-command-in-linux/ -[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ -[3]:http://www.tecmint.com/manage-linux-filenames-with-special-characters/ diff --git a/translated/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md b/translated/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md new file mode 100644 index 0000000000..546a4b0baf --- /dev/null +++ b/translated/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md @@ -0,0 +1,221 @@ +Autojump – 一个高级的‘cd’命令用以快速浏览 Linux 文件系统 +================================================================================ +对于那些主要通过控制台或终端使用 Linux 命令行来工作的 Linux 用户来说,他们真切地感受到了 Linux 的强大。 然而在 Linux 的分层文件系统中进行浏览有时或许是一件头疼的事,尤其是对于那些新手来说。 + +现在,有一个用 Python 写的名为 `autojump` 的 Linux 命令行实用程序,它是 Linux ‘[cd][1]’命令的高级版本。 + +![Autojump 命令](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-Command.jpg) + +Autojump – 浏览 Linux 文件系统的最快方式 + +这个应用原本由 Joël Schaerer 编写,现在由 +William Ting 维护。 + +Autojump 应用从用户那里学习并帮助用户在 Linux 命令行中进行更轻松的目录浏览。与传统的 `cd` 命令相比,autojump 能够更加快速地浏览至目的目录。 + +#### autojump 的特色 #### + +- 免费且开源的应用,在 GPL V3 协议下发布。 +- 自主学习的应用,从用户的浏览习惯中学习。 +- 更快速地浏览。不必包含子目录的名称。 +- 对于大多数的标准 Linux 发行版本,能够在软件仓库中下载得到,它们包括 Debian (testing/unstable), Ubuntu, Mint, Arch, Gentoo, Slackware, CentOS, RedHat and Fedora。 +- 也能在其他平台中使用,例如 OS X(使用 Homebrew) 和 Windows (通过 Clink 来实现) +- 使用 autojump 你可以跳至任何特定的目录或一个子目录。你还可以打开文件管理器来到达某个目录,并查看你在某个目录中所待时间的统计数据。 + +#### 前提 #### + +- 版本号不低于 2.6 的 Python + +### 第 1 步: 做一次全局系统升级 ### + +1. 以 **root** 用户的身份,做一次系统更新或升级,以此保证你安装有最新版本的 Python。 + + # apt-get update && apt-get upgrade && apt-get dist-upgrade [APT based systems] + # yum update && yum upgrade [YUM based systems] + # dnf update && dnf upgrade [DNF based systems] + +**注** : 这里特别提醒,在基于 YUM 或 DNF 的系统中,更新和升级执行相同的行动,大多数时间里它们是通用的,这点与基于 APT 的系统不同。 + +### 第 2 步: 下载和安装 Autojump ### + +2. 正如前面所言,在大多数的 Linux 发行版本的软件仓库中, autojump 都可获取到。通过包管理器你就可以安装它。但若你想从源代码开始来安装它,你需要克隆源代码并执行 python 脚本,如下面所示: + +#### 从源代码安装 #### + +若没有安装 git,请安装它。我们需要使用它来克隆 git 仓库。 + + # apt-get install git [APT based systems] + # yum install git [YUM based systems] + # dnf install git [DNF based systems] + +一旦安装完 git,以常规用户身份登录,然后像下面那样来克隆 autojump: + + $ git clone git://github.com/joelthelion/autojump.git + +接着,使用 `cd` 命令切换到下载目录。 + + $ cd autojump + +下载,赋予脚本文件可执行权限,并以 root 用户身份来运行安装脚本。 + + # chmod 755 install.py + # ./install.py + +#### 从软件仓库中安装 #### + +3. 假如你不想麻烦,你可以以 **root** 用户身份从软件仓库中直接安装它: + +在 Debian, Ubuntu, Mint 及类似系统中安装 autojump : + + # apt-get install autojump (注: 这里原文为 autojumo, 应该为 autojump) + +为了在 Fedora, CentOS, RedHat 及类似系统中安装 autojump, 你需要启用 [EPEL 软件仓库][2]。 + + # yum install epel-release + # yum install autojump + OR + # dnf install autojump + +### 第 3 步: 安装后的配置 ### + +4. 在 Debian 及其衍生系统 (Ubuntu, Mint,…) 中, 激活 autojump 应用是非常重要的。 + +为了暂时激活 autojump 应用,即直到你关闭当前会话或打开一个新的会话之前让 autojump 均有效,你需要以常规用户身份运行下面的命令: + + $ source /usr/share/autojump/autojump.sh on startup + +为了使得 autojump 在 BASH shell 中永久有效,你需要运行下面的命令。 + + $ echo '. /usr/share/autojump/autojump.sh' >> ~/.bashrc + +### 第 4 步: Autojump 的预测试和使用 ### + +5. 如先前所言, autojump 将只跳到先前 `cd` 命令到过的目录。所以在我们开始测试之前,我们要使用 `cd` 切换到一些目录中去,并创建一些目录。下面是我所执行的命令。 + + $ cd + $ cd + $ cd Desktop/ + $ cd + $ cd Documents/ + $ cd + $ cd Downloads/ + $ cd + $ cd Music/ + $ cd + $ cd Pictures/ + $ cd + $ cd Public/ + $ cd + $ cd Templates + $ cd + $ cd /var/www/ + $ cd + $ mkdir autojump-test/ + $ cd + $ mkdir autojump-test/a/ && cd autojump-test/a/ + $ cd + $ mkdir autojump-test/b/ && cd autojump-test/b/ + $ cd + $ mkdir autojump-test/c/ && cd autojump-test/c/ + $ cd + +现在,我们已经切换到过上面所列的目录,并为了测试创建了一些目录,一切准备就绪,让我们开始吧。 + +**需要记住的一点** : `j` 是 autojump 的一个包装,你可以使用 j 来代替 autojump, 相反亦可。 + +6. 使用 -v 选项查看安装的 autojump 的版本。 + + $ j -v + or + $ autojump -v + +![查看 Autojump 的版本](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Autojump-Version.png) + +查看 Autojump 的版本 + +7. 跳到先前到过的目录 ‘/var/www‘。 + + $ j www + +![跳到目录](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-To-Directory.png) + +跳到目录 + +8. 跳到先前到过的子目录‘/home/avi/autojump-test/b‘ 而不键入子目录的全名。 + + $ jc b + +![跳到子目录](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-to-Child-Directory.png) + +跳到子目录 + +9. 使用下面的命令,你就可以从命令行打开一个文件管理器,例如 GNOME Nautilus ,而不是跳到一个目录。 + + $ jo www + +![跳到目录](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-to-Direcotory.png) + +跳到目录 + +![在文件管理器中打开目录](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Directory-in-File-Browser.png) + +在文件管理器中打开目录 + +你也可以在一个文件管理器中打开一个子目录。 + + $ jco c + +![打开子目录](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Child-Directory1.png) + +打开子目录 + +![在文件管理器中打开子目录](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Child-Directory-in-File-Browser1.png) + +在文件管理器中打开子目录 + +10. 查看每个文件夹的关键权重和在所有目录权重中的总关键权重的相关统计数据。文件夹的关键权重代表在这个文件夹中所花的总时间。 目录权重是列表中目录的数目。(注: 在这一句中,我觉得原文中的 if 应该为 is) + + $ j --stat + +![查看目录统计数据](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Statistics.png) + +查看目录统计数据 + +**提醒** : autojump 存储其运行日志和错误日志的地方是文件夹 `~/.local/share/autojump/`。千万不要重写这些文件,否则你将失去你所有的统计状态结果。 + + $ ls -l ~/.local/share/autojump/ + +![Autojump 的日志](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-Logs.png) + +Autojump 的日志 + +11. 假如需要,你只需运行下面的命令就可以查看帮助 : + + $ j --help + +![Autojump 的帮助和选项](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-help-options.png) + +Autojump 的帮助和选项 + +### 功能需求和已知的冲突 ### + +- autojump 只能让你跳到那些你已经用 `cd` 到过的目录。一旦你用 `cd` 切换到一个特定的目录,这个行为就会被记录到 autojump 的数据库中,这样 autojump 才能工作。不管怎样,在你设定了 autojump 后,你不能跳到那些你没有用 `cd` 到过的目录。 +- 你不能跳到名称以破折号 (-) 开头的目录。或许你可以考虑阅读我的有关[操作文件或目录][3] 的文章,尤其是有关操作那些以‘-‘ 或其他特殊字符开头的文件和目录的内容。 +- 在 BASH shell 中,autojump 通过修改 `$PROMPT_COMMAND` 环境变量来跟踪目录的行为,所以强烈建议不要去重写 `$PROMPT_COMMAND` 这个环境变量。若你需要添加其他的命令到现存的 `$PROMPT_COMMAND` 环境变量中,请添加到`$PROMPT_COMMAND` 环境变量的最后。 + +### 结论: ### + +假如你是一个命令行用户, autojump 是你必备的实用程序。它可以简化许多事情。它是一个在命令行中浏览 Linux 目录的绝佳的程序。请自行尝试它,并在下面的评论框中让我知晓你宝贵的反馈。保持联系,保持分享。喜爱并分享,帮助我们更好地传播。 +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/autojump-a-quickest-way-to-navigate-linux-filesystem/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/cd-command-in-linux/ +[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[3]:http://www.tecmint.com/manage-linux-filenames-with-special-characters/ \ No newline at end of file From 6d6ecbb8ede8c24897f1586a9f9f7dba3d944985 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Fri, 10 Jul 2015 09:01:57 +0800 Subject: [PATCH 1356/2517] Update 20150709 Install Google Hangouts Desktop Client In Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译这篇文章。 --- ...0150709 Install Google Hangouts Desktop Client In Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md b/sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md index f7026f3d14..426f0c0ffc 100644 --- a/sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md +++ b/sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md @@ -1,3 +1,5 @@ +FSSlc translating + Install Google Hangouts Desktop Client In Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/google-hangouts-header-664x374.jpg) @@ -64,4 +66,4 @@ via: http://itsfoss.com/install-google-hangouts-linux/ [3]:http://www.google.com/+/learnmore/hangouts/ [4]:https://github.com/yakyak/yakyak [5]:https://github.com/yakyak/yakyak -[6]:http://itsfoss.com/best-messaging-apps-linux/ \ No newline at end of file +[6]:http://itsfoss.com/best-messaging-apps-linux/ From 4cc642e74b7572f6fda93b487f96c155b977d3d1 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 10 Jul 2015 11:11:26 +0800 Subject: [PATCH 1357/2517] PUB:20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @martin2011qi 干得好! --- ...e Who Believe in AI Singularity Are on Drugs.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/news => published}/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md (66%) diff --git a/translated/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md b/published/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md similarity index 66% rename from translated/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md rename to published/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md index d2ff0a1eda..727da304a0 100644 --- a/translated/news/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md +++ b/published/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md @@ -4,19 +4,19 @@ Linus Torvalds说那些对人工智能奇点深信不疑的人显然磕了药 ![](http://i1-news.softpedia-static.com/images/news2/linus-torvalds-says-people-who-believe-in-an-ai-singularity-are-on-drugs-486373-2.jpg) -**人工智能是一个非常热门的话题,许多高端人士,包括特斯拉的的CEO埃隆·马斯克就曾表示有感情的人工智能技术即将到来,同时这一技术将发展到危险的门槛上。不过Linus Torvalds显然不这么认为,他认为那只是差劲的科幻小说。** +**人工智能是一个非常热门的话题,许多高端人士,包括特斯拉的CEO埃隆·马斯克就曾表示有情感的人工智能技术即将到来,同时这一技术将发展到危险的门槛上。不过Linus Torvalds显然不这么认为,他认为那只是差劲的科幻小说。** -人工智能激发了人们的创造力已经不是什么新鲜的想法了,不过近段时间关于所谓的人工智能奇点的讨论,引起了诸如埃隆·马斯克和斯蒂芬·霍金表示关心,认为可能会创造出一个怪兽。不只是他们,论坛和评论部分充斥着杞人忧天者,他们不知道该相信谁,或是那个提出建议的人更聪明。 +人工智能激发了人们的创造力已经不是什么新鲜的想法了,不过近段时间关于所谓的人工智能奇点的讨论,引起了诸如埃隆·马斯克和斯蒂芬·霍金表示关心,认为可能会创造出一个怪兽。不只是他们,论坛和评论部分充斥着杞人忧天者,他们不知道该相信谁,或是哪个提出建议的人更聪明。 -事实证明Linus Torvalds,Linux项目创始人在这件事上显然有完全不同的观点。他说事实上什么都不会发生,我们也更有理由相信他。人工智能意需要有人编写它的代码,Linus知道编写人工智能代码会遇到的阻力和障碍。他很有可能已经猜到了什么会被涉及到,并且明白为什么人工智能不会成为威胁。 +事实证明Linux项目创始人Linus Torvalds在这件事上显然有完全不同的观点。他说事实上什么都不会发生,我们也更有理由相信他。人工智能意需要有人编写它的代码,Linus知道编写人工智能代码会遇到的阻力和障碍。他很有可能已经猜到了什么会被涉及到,并且明白为什么人工智能不会成为威胁。 ### Linus Torvalds与人工智能 ### -Linus Torvalds在[slashdot.org][1]上回答了一些社区中的问题,他的所有观点都十分有趣。他曾对[游戏的未来和Valve][2]发表看法,就像这次关于人工智能一样。虽然他经常是问一些关于内核和开源的问题,但是他在其他部分也有自己的见解。事实是作为一个问题,人工智能工程是一个他可以从程序员的角度讨论的问题。 +Linus Torvalds在[slashdot.org][1]上回答了一些社区中的问题,他的所有观点都十分有趣。他曾对[游戏的未来和Valve][2]发表看法,就像这次关于人工智能一样。虽然他经常是关注一些关于内核和开源的问题,但是他在其他部分也有自己的见解。事实是作为一个问题,人工智能工程是一个他可以从程序员的角度讨论的问题。 -“所以我期待更多有针对性的(和相当棒的)AI,而不是它有多像人。像语言识别、模式识别,这样的东西。我根本找不出在你洗碗的时候,洗碗机和你讨论Sartre(萨特,法国哲学家、小说家、剧作家)有什么危害。真的有‘奇点’这种事吗?是的,我认为那只是科幻小说,还不是好的那种。无休止的指数增长?我说,真的!这些人嗑了什么药了吧?”Linus在Slashdot写道。 +“所以我期待更多有针对性的(和相当棒的)AI,而不是它有多像人。像语言识别、模式识别,这样的东西。我根本找不出在你洗碗的时候,洗碗机和你讨论Sartre(萨特,法国哲学家、小说家、剧作家)有什么危害。真的有‘奇点’这种事吗?是的,我认为那只是科幻小说,还不是好的那种。无休止的指数增长?我说,真的!这些人嗑了什么药了吧?” Linus在Slashdot写道。 -选择相信埃隆·马斯克还是Linus是你的决定,但如果我卷入了这场赌局,我会把线投给Linus。 +选择相信埃隆·马斯克还是Linus是你的决定,但如果我卷入了这场赌局,我会把钱投给Linus。 -------------------------------------------------------------------------------- @@ -24,7 +24,7 @@ via: http://news.softpedia.com/news/linus-torvalds-says-people-who-believe-in-an 作者:[Silviu Stahie][a] 译者:[martin2011qi](https://github.com/martin2011qi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 47b7d5bb78b088a93bd531eea1ab8320bc044348 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Fri, 10 Jul 2015 14:02:14 +0800 Subject: [PATCH 1358/2517] Update 20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md --- ...-Exiting with failure status due to previous errors'.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md b/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md index c970637b4d..6090119cb4 100644 --- a/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md +++ b/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md @@ -1,7 +1,6 @@ -Linux FAQs with Answers--How to fix “tar: Exiting with failure status due to previous errors” +Linux常见问题解答--如何修复"tar:由于前一个错误导致于失败状态中退出"("Exiting with failure status due to previous errors") ================================================================================ -> **Question**: When I try to create an archive using tar command, it fails in the middle, and throws an error saying: "tar: Exiting with failure status due to previous errors." What causes this error, and how can I solve this error? - +> **问题**: 当我想试着用tar命令来创建一个压缩文件时,总在执行过程中失败,并且抛出一个错误说明"tar:由于前一个错误导致于失败状态中退出"("Exiting with failure status due to previous errors"). 什么导致这个错误的发生,要如何解决? ![](https://farm9.staticflickr.com/8863/17631029953_1140fe2dd3_b.jpg) If you encounter the following error while running tar command, the most likely reason is that you do not have read permission on one of the files you are trying to archive with tar. @@ -33,4 +32,4 @@ via: http://ask.xmodulo.com/tar-exiting-with-failure-status-due-to-previous-erro 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 87c79b22fd4d7c44d03b8a32831e6ca10fd12c5e Mon Sep 17 00:00:00 2001 From: Love-xuan Date: Fri, 10 Jul 2015 14:51:35 +0800 Subject: [PATCH 1359/2517] Love-xuan translating --- ...nimated Wallpaper Adds Live Backgrounds To Linux Distros.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md b/sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md index 92eff36326..03be3a27ff 100644 --- a/sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md +++ b/sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md @@ -1,3 +1,4 @@ +Translating by Love-xuan Animated Wallpaper Adds Live Backgrounds To Linux Distros ================================================================================ **We know a lot of you love having a stylish Ubuntu desktop to show off.** @@ -110,4 +111,4 @@ via: http://www.omgubuntu.co.uk/2015/05/animated-wallpaper-adds-live-backgrounds [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:http://www.omgubuntu.co.uk/2012/11/live-wallpaper-for-ubuntu -[2]:http://www.omgubuntu.co.uk/2011/11/5-system-monitoring-tools-for-ubuntu \ No newline at end of file +[2]:http://www.omgubuntu.co.uk/2011/11/5-system-monitoring-tools-for-ubuntu From b18fa8f2a9ceebe3ad9c6aba5a685b1960851f3e Mon Sep 17 00:00:00 2001 From: XLCYun Date: Fri, 10 Jul 2015 14:59:56 +0800 Subject: [PATCH 1360/2517] Update 20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md --- ...ith failure status due to previous errors'.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md b/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md index 6090119cb4..af8f8d4b48 100644 --- a/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md +++ b/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md @@ -3,31 +3,29 @@ Linux常见问题解答--如何修复"tar:由于前一个错误导致于失败 > **问题**: 当我想试着用tar命令来创建一个压缩文件时,总在执行过程中失败,并且抛出一个错误说明"tar:由于前一个错误导致于失败状态中退出"("Exiting with failure status due to previous errors"). 什么导致这个错误的发生,要如何解决? ![](https://farm9.staticflickr.com/8863/17631029953_1140fe2dd3_b.jpg) -If you encounter the following error while running tar command, the most likely reason is that you do not have read permission on one of the files you are trying to archive with tar. +如果当你执行tar命令时,遇到了下面的错误,那么最有可能的原因是对于你想用tar命令压缩的某个文件中,你并不具备其读权限。 tar: Exiting with failure status due to previous errors -Then how can we pin down the file(s) causing the errors, or identify any other cause? +那么我们要如何确定引起错误的这个(些)文件呢?或者如何确定其它的错误根源? -The tar command should actually print out what those "previous errors" are, but you can easily miss printed error messages if you run tar in verbose mode (e.g., -cvf). To catch error messages more easily, you can filter out tar's stdout messages as follows. +事实上tar命令应该会打印出所谓的“上一个错误”("previous errors")到底是什么错误,但是如果你让tar运行在详细模式(即verbose mode,例如, -cvf),那么你会很容易错失这些信息。要找到这些信息,你可以像下面那样,把tar的标准输出(stdout)信息过滤掉。 $ tar cvzfz backup.tgz my_program/ > /dev/null -You will then see only error messages sent by tar to stderr. +然后你会看到tar输出的标准错误(stderr)信息。 tar: my_program/src/lib/.conf.db.~lock~: Cannot open: Permission denied tar: Exiting with failure status due to previous errors -As you can see in the above example, the cause for the errors is indeed "denied read permission." - -To solve the problem, simply adjust the permission of the problematic file (or remove it), and re-run tar. - +你可以从上面的例子中看到,引起错误的原因的确是“读权限不允许”(denied read permission.) +要解决这个问题,只要简单地更改出问题的文件的权限即可(或将其移除),然后重新执行tar命令。 -------------------------------------------------------------------------------- via: http://ask.xmodulo.com/tar-exiting-with-failure-status-due-to-previous-errors.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[XLCYun(袖里藏云)](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 3547a7dfc069003aa8d63642965a687f32726a8d Mon Sep 17 00:00:00 2001 From: XLCYun Date: Fri, 10 Jul 2015 15:07:44 +0800 Subject: [PATCH 1361/2517] Update 20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md --- ...tar--Exiting with failure status due to previous errors'.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md b/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md index af8f8d4b48..4b6b3b0fca 100644 --- a/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md +++ b/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md @@ -19,7 +19,8 @@ Linux常见问题解答--如何修复"tar:由于前一个错误导致于失败 tar: Exiting with failure status due to previous errors 你可以从上面的例子中看到,引起错误的原因的确是“读权限不允许”(denied read permission.) -要解决这个问题,只要简单地更改出问题的文件的权限即可(或将其移除),然后重新执行tar命令。 +要解决这个问题,只要简单地更改(或移除)问题文件的权限,然后重新执行tar命令即可。 + -------------------------------------------------------------------------------- via: http://ask.xmodulo.com/tar-exiting-with-failure-status-due-to-previous-errors.html From 60e3296abb6756b78b8d8304bfeea17ad51bd2cc Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 10 Jul 2015 17:48:15 +0800 Subject: [PATCH 1362/2517] Translating by ZTinoZ --- ...0709 command line tools for monitoring your Linux system.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150709 command line tools for monitoring your Linux system.md b/sources/talk/20150709 command line tools for monitoring your Linux system.md index 012591d74f..7d91a1dcaf 100644 --- a/sources/talk/20150709 command line tools for monitoring your Linux system.md +++ b/sources/talk/20150709 command line tools for monitoring your Linux system.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ 7 command line tools for monitoring your Linux system ================================================================================ **Here is a selection of basic command line tools that will make your exploration and optimization in Linux easier. ** @@ -76,4 +77,4 @@ via: http://www.networkworld.com/article/2937219/linux/7-command-line-tools-for- [7]:http://linuxcommand.org/man_pages/vmstat8.html [8]:http://linux.die.net/man/1/ps [9]:http://linux.die.net/man/1/pstree -[10]:http://linux.die.net/man/1/iostat \ No newline at end of file +[10]:http://linux.die.net/man/1/iostat From ee7a200b10196e6f590252594467867c1778ab98 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 10 Jul 2015 20:13:16 +0800 Subject: [PATCH 1363/2517] =?UTF-8?q?=E8=A1=A5=E5=85=85=20PR=EF=BC=8C?= =?UTF-8?q?=E5=BF=98=E8=AE=B0=E7=A7=BB=E5=8A=A8=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @XLCYun --- ...x 'tar--Exiting with failure status due to previous errors'.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md (100%) diff --git a/sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md b/translated/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md similarity index 100% rename from sources/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md rename to translated/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md From 7c04a87fdd3862b215906d542010f5f601cda433 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 10 Jul 2015 22:53:48 +0800 Subject: [PATCH 1364/2517] translating --- ...with Answers--How to install a Brother printer on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md b/sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md index dd10d5c8dd..5089cfd96b 100644 --- a/sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md +++ b/sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md @@ -1,3 +1,5 @@ +translating----geekpi + Linux FAQs with Answers--How to install a Brother printer on Linux ================================================================================ > **Question**: I have a Brother HL-2270DW laser printer, and want to print documents from my Linux box using this printer. How can I install an appropriate Brother printer driver on my Linux computer, and use it? @@ -106,4 +108,4 @@ via: http://ask.xmodulo.com/install-brother-printer-linux.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://xmodulo.com/go/brother_printers [2]:http://xmodulo.com/go/hl_2270dw -[3]:http://support.brother.com/ \ No newline at end of file +[3]:http://support.brother.com/ From 1d36bc5337762609f628e7a0065cc513ea4aba94 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 11 Jul 2015 10:15:16 +0800 Subject: [PATCH 1365/2517] translated --- ...w to install a Brother printer on Linux.md | 111 ------------------ ...w to install a Brother printer on Linux.md | 108 +++++++++++++++++ 2 files changed, 108 insertions(+), 111 deletions(-) delete mode 100644 sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md create mode 100644 translated/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md diff --git a/sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md b/sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md deleted file mode 100644 index 5089cfd96b..0000000000 --- a/sources/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md +++ /dev/null @@ -1,111 +0,0 @@ -translating----geekpi - -Linux FAQs with Answers--How to install a Brother printer on Linux -================================================================================ -> **Question**: I have a Brother HL-2270DW laser printer, and want to print documents from my Linux box using this printer. How can I install an appropriate Brother printer driver on my Linux computer, and use it? - -Brother is well known for its affordable [compact laser printer lineup][1]. You can get a high-quality WiFi/duplex-capable laser printer for less than 200USD, and the price keeps going down. On top of that, they provide reasonably good Linux support, so you can download and install their printer driver on your Linux computer. I bought [HL-2270DW][2] model more than a year ago, and I have been more than happy with its performance and reliability. - -Here is how to install and configure a Brother printer driver on Linux. In this tutorial, I am demonstrating the installation of a USB driver for Brother HL-2270DW laser printer. So first connect your printer to a Linux computer via USB cable. - -### Preparation ### - -In this preparation step, go to the official [Brother support website][3], and search for the driver of your Brother printer by typing printer model name (e.g., HL-2270DW). - -![](https://farm1.staticflickr.com/301/18970034829_6f3a48d817_c.jpg) - -Once you go to the download page for your Brother printer, choose your Linux platform. For Debian, Ubuntu or their derivatives, choose "Linux (deb)". For Fedora, CentOS or RHEL, choose "Linux (rpm)". - -![](https://farm1.staticflickr.com/380/18535558583_cb43240f8a_c.jpg) - -On the next page, you will find a LPR driver as well as CUPS wrapper driver for your printer. The former is a command-line driver, while the latter allows you to configure and manage your printer via web-based administration interface. Especially the CUPS-based GUI is quite useful for (local or remote) printer maintenance. It is recommended that you install both drivers. So click on "Driver Install Tool" and download the installer file. - -![](https://farm1.staticflickr.com/329/19130013736_1850b0d61e_c.jpg) - -Before proceeding to run the installer file, you need to do one additional step if you are using a 64-bit Linux system. - -Since Brother printer drivers are developed for 32-bit Linux, you need to install necessary 32-bit libraries on 64-bit Linux as follows. - -On older Debian (6.0 or earlier) or Ubuntu (11.04 or earlier), install the following package. - - $ sudo apt-get install ia32-libs - -On newer Debian or Ubuntu which has introduced multiarch, you can install the following package instead: - - $ sudo apt-get install lib32z1 lib32ncurses5 - -which replaces ia32-libs package. Or, you can install just: - - $ sudo apt-get install lib32stdc++6 - -If you are using a Red Hat based Linux, you can install: - - $ sudo yum install glibc.i686 - -### Driver Installation ### - -Now go ahead and extract a downloaded driver installer file. - - $ gunzip linux-brprinter-installer-2.0.0-1.gz - -Next, run the driver installer file as follows. - - $ sudo sh ./linux-brprinter-installer-2.0.0-1 - -You will be prompted to type a printer model name. Type the model name of your printer, for example "HL-2270DW". - -![](https://farm1.staticflickr.com/292/18535599323_1a94f6dae5_b.jpg) - -After agreeing to GPL license agreement, accept default answers to any subsequent questions. - -![](https://farm1.staticflickr.com/526/19130014316_5835939501_b.jpg) - -Now LPR/CUPS printer drivers are installed. Proceed to configure your printer next. - -### Printer Configuration ### - -We are going to configure and manage a Brother via CUPS-based web management interface. - -First, verify that CUPS daemon is running successfully. - - $ sudo netstat -nap | grep 631 - -Open a web browser window, and go to http://localhost:631. You will see the following CUPS printer management interface. - -![](https://farm1.staticflickr.com/324/18968588688_202086fc72_c.jpg) - -Go to "Administration" tab, and click on "Manage Printers" under Printers section. - -![](https://farm1.staticflickr.com/484/18533632074_0526cccb86_c.jpg) - -You must see your printer (HL-2270DW) listed in the next page. Click on the printer name. -![](https://farm1.staticflickr.com/501/19159651111_95f6937693_c.jpg) - -In the dropdown menu titled "Administration", choose "Set As Server Default" option. This will make your printer system-wide default. - -![](https://farm1.staticflickr.com/472/19150412212_b37987c359_c.jpg) - -When asked to authenticate yourself, type in your Linux login information. - -![](https://farm1.staticflickr.com/511/18968590168_807e807f73_c.jpg) - -Now the basic configuration step is mostly done. To test print, open any document viewer application (e.g., PDF viwer), and print it. You will see "HL-2270DW" listed and chosen by default in printer setting. - -![](https://farm4.staticflickr.com/3872/18970034679_6d41d75bf9_c.jpg) - -Print should work now. You can see the printer status and manage printer jobs via the same CUPS web interface. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/install-brother-printer-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://ask.xmodulo.com/author/nanni -[1]:http://xmodulo.com/go/brother_printers -[2]:http://xmodulo.com/go/hl_2270dw -[3]:http://support.brother.com/ diff --git a/translated/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md b/translated/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md new file mode 100644 index 0000000000..ad90ec75a4 --- /dev/null +++ b/translated/tech/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md @@ -0,0 +1,108 @@ +Linux有问必答-- 如何为在Linux中安装兄弟打印机 +================================================================================ +> **提问**: 我有一台兄弟HL-2270DW激光打印机,我想从我的Linux机器上答应文档。我该如何在我的电脑上安装合适的驱动并使用它? + +兄弟牌以买得起的[紧凑型激光打印机][1]而闻名。你可以用低于200美元的价格得到高质量的WiFi/双工激光打印机,而且价格还在下降。最棒的是,它们还提供良好的Linux支持,因此你可以在Linux中下载并安装它们的打印机驱动。我在一年前买了台[HL-2270DW][2],我对它的性能和可靠性都很满意。 + +下面是如何在Linux中安装和配置兄弟打印机驱动。本篇教程中,我会演示安装HL-2270DW激光打印机的USB驱动。首先通过USB线连接你的打印机到Linux上。 + +### 准备 ### + +在准备阶段,进入[兄弟官方支持网站][3],输入你的型号(比如:HL-2270DW)搜索你的兄弟打印机型号。 + +![](https://farm1.staticflickr.com/301/18970034829_6f3a48d817_c.jpg) + +进入下面页面后,选择你的Linux平台。对于Debian、Ubuntu或者其他衍生版,选择“Linux (deb)”。对于Fedora、CentOS或者RHEL选择“Linux (rpm)”。 + +![](https://farm1.staticflickr.com/380/18535558583_cb43240f8a_c.jpg) + +下一页,你会找到你打印机的LPR驱动和CUPS包装器驱动。前者是命令行驱动后者允许你通过网页管理和配置你的打印机。尤其是基于CUPS的GUI对(本地、远程)打印机维护非常有用。建议你安装这两个驱动。点击“Driver Install Tool”下载安装文件。 + +![](https://farm1.staticflickr.com/329/19130013736_1850b0d61e_c.jpg) + +运行安装文件之前,你需要在64位的Linux系统上做另外一件事情。 + +因为兄弟打印机驱动是为32位的Linux系统开发的,因此你需要按照下面的方法安装32位的库。 + +在早期的Debian(6.0或者更早期)或者Ubuntu(11.04或者更早期),安装下面的包。 + + $ sudo apt-get install ia32-libs + +对于已经引入多架构的新的Debian或者Ubuntu而言,你可以安装下面的包: + + $ sudo apt-get install lib32z1 lib32ncurses5 + +上面的包代替了ia32-libs包。或者你只需要安装: + + $ sudo apt-get install lib32stdc++6 + +如果你使用的是基于Red Hat的Linux,你可以安装: + + $ sudo yum install glibc.i686 + +### 驱动安装 ### + +现在解压下载的驱动文件。 + + $ gunzip linux-brprinter-installer-2.0.0-1.gz + +接下来像下面这样运行安装文件。 + + $ sudo sh ./linux-brprinter-installer-2.0.0-1 + +你会被要求输入打印机的型号。输入你打印机的型号,比如“HL-2270DW”。 + +![](https://farm1.staticflickr.com/292/18535599323_1a94f6dae5_b.jpg) + +同意GPL协议直呼,接受接下来的任何默认问题。 + +![](https://farm1.staticflickr.com/526/19130014316_5835939501_b.jpg) + +现在LPR/CUPS打印机驱动已经安装好了。接下来要配置你的打印机了。 + +### 打印机配置 ### + +我接下来就要通过基于CUPS的网页管理和配置兄弟打印机了。 + +首先验证CUPS守护进程已经启动。 + + $ sudo netstat -nap | grep 631 + +打开一个浏览器输入http://localhost:631。你会下面的打印机管理界面。 + +![](https://farm1.staticflickr.com/324/18968588688_202086fc72_c.jpg) + +进入“Administration”选项卡,点击打印机选项下的“Manage Printers”。 + +![](https://farm1.staticflickr.com/484/18533632074_0526cccb86_c.jpg) + +你一定在下面的页面中看到了你的打印机(HL-2270DW)。点击打印机名。 + +在下拉菜单“Administration”中,选择“Set As Server Default”。这会设置你的打印机位系统默认打印机。 + +![](https://farm1.staticflickr.com/472/19150412212_b37987c359_c.jpg) + +当被要求验证时,输入你的Linux登录信息。 + +![](https://farm1.staticflickr.com/511/18968590168_807e807f73_c.jpg) + +现在基础配置已经基本完成了。为了测试打印,打开任何文档浏览程序(比如:PDF浏览器)并打印。你会看到“HL-2270DW”被列出并被作为默认的打印机设置。 + +![](https://farm4.staticflickr.com/3872/18970034679_6d41d75bf9_c.jpg) + +打印机应该可以工作了。你可以通过CUPS的网页看到打印机状态和管理打印机任务。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-brother-printer-linux.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/go/brother_printers +[2]:http://xmodulo.com/go/hl_2270dw +[3]:http://support.brother.com/ From 13495e4204e2e95d945a99b5711fffbb45668309 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 11 Jul 2015 13:45:37 +0800 Subject: [PATCH 1366/2517] Delete 20150401 ZMap Documentation.md --- sources/tech/20150401 ZMap Documentation.md | 745 -------------------- 1 file changed, 745 deletions(-) delete mode 100644 sources/tech/20150401 ZMap Documentation.md diff --git a/sources/tech/20150401 ZMap Documentation.md b/sources/tech/20150401 ZMap Documentation.md deleted file mode 100644 index b773fb4aaf..0000000000 --- a/sources/tech/20150401 ZMap Documentation.md +++ /dev/null @@ -1,745 +0,0 @@ -translating... - -ZMap Documentation -================================================================================ -1. Getting Started with ZMap -1. Scanning Best Practices -1. Command Line Arguments -1. Additional Information - 1. TCP SYN Probe Module - 1. ICMP Echo Probe Module - 1. UDP Probe Module - 1. Configuration Files - 1. Verbosity - 1. Results Output - 1. Blacklisting - 1. Rate Limiting and Sampling - 1. Sending Multiple Probes -1. Extending ZMap - 1. Sample Applications - 1. Writing Probe and Output Modules - ----------- - -### Getting Started with ZMap ### - -ZMap is designed to perform comprehensive scans of the IPv4 address space or large portions of it. While ZMap is a powerful tool for researchers, please keep in mind that by running ZMap, you are potentially scanning the ENTIRE IPv4 address space at over 1.4 million packets per second. Before performing even small scans, we encourage users to contact their local network administrators and consult our list of scanning best practices. - -By default, ZMap will perform a TCP SYN scan on the specified port at the maximum rate possible. A more conservative configuration that will scan 10,000 random addresses on port 80 at a maximum 10 Mbps can be run as follows: - - $ zmap --bandwidth=10M --target-port=80 --max-targets=10000 --output-file=results.csv - -Or more concisely specified as: - - $ zmap -B 10M -p 80 -n 10000 -o results.csv - -ZMap can also be used to scan specific subnets or CIDR blocks. For example, to scan only 10.0.0.0/8 and 192.168.0.0/16 on port 80, run: - - zmap -p 80 -o results.csv 10.0.0.0/8 192.168.0.0/16 - -If the scan started successfully, ZMap will output status updates every one second similar to the following: - - 0% (1h51m left); send: 28777 562 Kp/s (560 Kp/s avg); recv: 1192 248 p/s (231 p/s avg); hits: 0.04% - 0% (1h51m left); send: 34320 554 Kp/s (559 Kp/s avg); recv: 1442 249 p/s (234 p/s avg); hits: 0.04% - 0% (1h50m left); send: 39676 535 Kp/s (555 Kp/s avg); recv: 1663 220 p/s (232 p/s avg); hits: 0.04% - 0% (1h50m left); send: 45372 570 Kp/s (557 Kp/s avg); recv: 1890 226 p/s (232 p/s avg); hits: 0.04% - -These updates provide information about the current state of the scan and are of the following form: %-complete (est time remaining); packets-sent curr-send-rate (avg-send-rate); recv: packets-recv recv-rate (avg-recv-rate); hits: hit-rate - -If you do not know the scan rate that your network can support, you may want to experiment with different scan rates or bandwidth limits to find the fastest rate that your network can support before you see decreased results. - -By default, ZMap will output the list of distinct IP addresses that responded successfully (e.g. with a SYN ACK packet) similar to the following. There are several additional formats (e.g. JSON and Redis) for outputting results as well as options for producing programmatically parsable scan statistics. As wells, additional output fields can be specified and the results can be filtered using an output filter. - - 115.237.116.119 - 23.9.117.80 - 207.118.204.141 - 217.120.143.111 - 50.195.22.82 - -We strongly encourage you to use a blacklist file, to exclude both reserved/unallocated IP space (e.g. multicast, RFC1918), as well as networks that request to be excluded from your scans. By default, ZMap will utilize a simple blacklist file containing reserved and unallocated addresses located at `/etc/zmap/blacklist.conf`. If you find yourself specifying certain settings, such as your maximum bandwidth or blacklist file every time you run ZMap, you can specify these in `/etc/zmap/zmap.conf` or use a custom configuration file. - -If you are attempting to troubleshoot scan related issues, there are several options to help debug. First, it is possible can perform a dry run scan in order to see the packets that would be sent over the network by adding the `--dryrun` flag. As well, it is possible to change the logging verbosity by setting the `--verbosity=n` flag. - ----------- - -### Scanning Best Practices ### - -We offer these suggestions for researchers conducting Internet-wide scans as guidelines for good Internet citizenship. - -- Coordinate closely with local network administrators to reduce risks and handle inquiries -- Verify that scans will not overwhelm the local network or upstream provider -- Signal the benign nature of the scans in web pages and DNS entries of the source addresses -- Clearly explain the purpose and scope of the scans in all communications -- Provide a simple means of opting out and honor requests promptly -- Conduct scans no larger or more frequent than is necessary for research objectives -- Spread scan traffic over time or source addresses when feasible - -It should go without saying that scan researchers should refrain from exploiting vulnerabilities or accessing protected resources, and should comply with any special legal requirements in their jurisdictions. - ----------- - -### Command Line Arguments ### - -#### Common Options #### - -These options are the most common options when performing a simple scan. We note that some options are dependent on the probe module or output module used (e.g. target port is not used when performing an ICMP Echo Scan). - - -**-p, --target-port=port** - -TCP port number to scan (e.g. 443) - -**-o, --output-file=name** - -Write results to this file. Use - for stdout - -**-b, --blacklist-file=path** - -File of subnets to exclude, in CIDR notation (e.g. 192.168.0.0/16), one-per line. It is recommended you use this to exclude RFC 1918 addresses, multicast, IANA reserved space, and other IANA special-purpose addresses. An example blacklist file is provided in conf/blacklist.example for this purpose. - -#### Scan Options #### - -**-n, --max-targets=n** - -Cap the number of targets to probe. This can either be a number (e.g. `-n 1000`) or a percentage (e.g. `-n 0.1%`) of the scannable address space (after excluding blacklist) - -**-N, --max-results=n** - -Exit after receiving this many results - -**-t, --max-runtime=secs** - -Cap the length of time for sending packets - -**-r, --rate=pps** - -Set the send rate in packets/sec - -**-B, --bandwidth=bps** - -Set the send rate in bits/second (supports suffixes G, M, and K (e.g. `-B 10M` for 10 mbps). This overrides the `--rate` flag. - -**-c, --cooldown-time=secs** - -How long to continue receiving after sending has completed (default=8) - -**-e, --seed=n** - -Seed used to select address permutation. Use this if you want to scan addresses in the same order for multiple ZMap runs. - -**--shards=n** - -Split the scan up into N shards/partitions among different instances of zmap (default=1). When sharding, `--seed` is required - -**--shard=n** - -Set which shard to scan (default=0). Shards are indexed in the range [0, N), where N is the total number of shards. When sharding `--seed` is required. - -**-T, --sender-threads=n** - -Threads used to send packets (default=1) - -**-P, --probes=n** - -Number of probes to send to each IP (default=1) - -**-d, --dryrun** - -Print out each packet to stdout instead of sending it (useful for debugging) - -#### Network Options #### - -**-s, --source-port=port|range** - -Source port(s) to send packets from - -**-S, --source-ip=ip|range** - -Source address(es) to send packets from. Either single IP or range (e.g. 10.0.0.1-10.0.0.9) - -**-G, --gateway-mac=addr** - -Gateway MAC address to send packets to (in case auto-detection does not work) - -**-i, --interface=name** - -Network interface to use - -#### Probe Options #### - -ZMap allows users to specify and write their own probe modules for use with ZMap. Probe modules are responsible for generating probe packets to send, and processing responses from hosts. - -**--list-probe-modules** - -List available probe modules (e.g. tcp_synscan) - -**-M, --probe-module=name** - -Select probe module (default=tcp_synscan) - -**--probe-args=args** - -Arguments to pass to probe module - -**--list-output-fields** - -List the fields the selected probe module can send to the output module - -#### Output Options #### - -ZMap allows users to specify and write their own output modules for use with ZMap. Output modules are responsible for processing the fieldsets returned by the probe module, and outputing them to the user. Users can specify output fields, and write filters over the output fields. - -**--list-output-modules** - -List available output modules (e.g. tcp_synscan) - -**-O, --output-module=name** - -Select output module (default=csv) - -**--output-args=args** - -Arguments to pass to output module - -**-f, --output-fields=fields** - -Comma-separated list of fields to output - -**--output-filter** - -Specify an output filter over the fields defined by the probe module - -#### Additional Options #### - -**-C, --config=filename** - -Read a configuration file, which can specify any other options. - -**-q, --quiet** - -Do not print status updates once per second - -**-g, --summary** - -Print configuration and summary of results at the end of the scan - -**-v, --verbosity=n** - -Level of log detail (0-5, default=3) - -**-h, --help** - -Print help and exit - -**-V, --version** - -Print version and exit - ----------- - -### Additional Information ### - -#### TCP SYN Scans #### - -When performing a TCP SYN scan, ZMap requires a single target port and supports specifying a range of source ports from which the scan will originate. - -**-p, --target-port=port** - -TCP port number to scan (e.g. 443) - -**-s, --source-port=port|range** - -Source port(s) for scan packets (e.g. 40000-50000) - -**Warning!** ZMap relies on the Linux kernel to respond to SYN/ACK packets with RST packets in order to close connections opened by the scanner. This occurs because ZMap sends packets at the Ethernet layer in order to reduce overhead otherwise incurred in the kernel from tracking open TCP connections and performing route lookups. As such, if you have a firewall rule that tracks established connections such as a netfilter rule similar to `-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT`, this will block SYN/ACK packets from reaching the kernel. This will not prevent ZMap from recording responses, but it will prevent RST packets from being sent back, ultimately using up a connection on the scanned host until your connection times out. We strongly recommend that you select a set of unused ports on your scanning host which can be allowed access in your firewall and specifying this port range when executing ZMap, with the `-s` flag (e.g. `-s '50000-60000'`). - -#### ICMP Echo Request Scans #### - -While ZMap performs TCP SYN scans by default, it also supports ICMP echo request scans in which an ICMP echo request packet is sent to each host and the type of ICMP response received in reply is denoted. An ICMP scan can be performed by selecting the icmp_echoscan scan module similar to the following: - - $ zmap --probe-module=icmp_echoscan - -#### UDP Datagram Scans #### - -ZMap additionally supports UDP probes, where it will send out an arbitrary UDP datagram to each host, and receive either UDP or ICMP Unreachable responses. ZMap supports four different methods of setting the UDP payload through the --probe-args command-line option. These are 'text' for ASCII-printable payloads, 'hex' for hexadecimal payloads set on the command-line, 'file' for payloads contained in an external file, and 'template' for payloads that require dynamic field generation. In order to obtain the UDP response, make sure that you specify 'data' as one of the fields to report with the -f option. - -The example below will send the two bytes 'ST', a PCAnwywhere 'status' request, to UDP port 5632. - - $ zmap -M udp -p 5632 --probe-args=text:ST -N 100 -f saddr,data -o - - -The example below will send the byte '0x02', a SQL Server 'client broadcast' request, to UDP port 1434. - - $ zmap -M udp -p 1434 --probe-args=hex:02 -N 100 -f saddr,data -o - - -The example below will send a NetBIOS status request to UDP port 137. This uses a payload file that is included with the ZMap distribution. - - $ zmap -M udp -p 1434 --probe-args=file:netbios_137.pkt -N 100 -f saddr,data -o - - -The example below will send a SIP 'OPTIONS' request to UDP port 5060. This uses a template file that is included with the ZMap distribution. - - $ zmap -M udp -p 1434 --probe-args=file:sip_options.tpl -N 100 -f saddr,data -o - - -UDP payload templates are still experimental. You may encounter crashes when more using more than one send thread (-T) and there is a significant decrease in performance compared to static payloads. A template is simply a payload file that contains one or more field specifiers enclosed in a ${} sequence. Some protocols, notably SIP, require the payload to reflect the source and destination of the packet. Other protocols, such as portmapper and DNS, contain fields that should be randomized per request or risk being dropped by multi-homed systems scanned by ZMap. - -The payload template below will send a SIP OPTIONS request to every destination: - - OPTIONS sip:${RAND_ALPHA=8}@${DADDR} SIP/2.0 - Via: SIP/2.0/UDP ${SADDR}:${SPORT};branch=${RAND_ALPHA=6}.${RAND_DIGIT=10};rport;alias - From: sip:${RAND_ALPHA=8}@${SADDR}:${SPORT};tag=${RAND_DIGIT=8} - To: sip:${RAND_ALPHA=8}@${DADDR} - Call-ID: ${RAND_DIGIT=10}@${SADDR} - CSeq: 1 OPTIONS - Contact: sip:${RAND_ALPHA=8}@${SADDR}:${SPORT} - Content-Length: 0 - Max-Forwards: 20 - User-Agent: ${RAND_ALPHA=8} - Accept: text/plain - -In the example above, note that line endings are \r\n and the end of this request must contain \r\n\r\n for most SIP implementations to correcly process it. A working example is included in the examples/udp-payloads directory of the ZMap source tree (sip_options.tpl). - -The following template fields are currently implemented: - - -- **SADDR**: Source IP address in dotted-quad format -- **SADDR_N**: Source IP address in network byte order -- **DADDR**: Destination IP address in dotted-quad format -- **DADDR_N**: Destination IP address in network byte order -- **SPORT**: Source port in ascii format -- **SPORT_N**: Source port in network byte order -- **DPORT**: Destination port in ascii format -- **DPORT_N**: Destination port in network byte order -- **RAND_BYTE**: Random bytes (0-255), length specified with =(length) parameter -- **RAND_DIGIT**: Random digits from 0-9, length specified with =(length) parameter -- **RAND_ALPHA**: Random mixed-case letters from A-Z, length specified with =(length) parameter -- **RAND_ALPHANUM**: Random mixed-case letters from A-Z and digits from 0-9, length specified with =(length) parameter - -### Configuration Files ### - -ZMap supports configuration files instead of requiring all options to be specified on the command-line. A configuration can be created by specifying one long-name option and the value per line such as: - - interface "eth1" - source-ip 1.1.1.4-1.1.1.8 - gateway-mac b4:23:f9:28:fa:2d # upstream gateway - cooldown-time 300 # seconds - blacklist-file /etc/zmap/blacklist.conf - output-file ~/zmap-output - quiet - summary - -ZMap can then be run with a configuration file and specifying any additional necessary parameters: - - $ zmap --config=~/.zmap.conf --target-port=443 - -### Verbosity ### - -There are several types of on-screen output that ZMap produces. By default, ZMap will print out basic progress information similar to the following every 1 second. This can be disabled by setting the `--quiet` flag. - - 0:01 12%; send: 10000 done (15.1 Kp/s avg); recv: 144 143 p/s (141 p/s avg); hits: 1.44% - -ZMap also prints out informational messages during scanner configuration such as the following, which can be controlled with the `--verbosity` argument. - - Aug 11 16:16:12.813 [INFO] zmap: started - Aug 11 16:16:12.817 [DEBUG] zmap: no interface provided. will use eth0 - Aug 11 16:17:03.971 [DEBUG] cyclic: primitive root: 3489180582 - Aug 11 16:17:03.971 [DEBUG] cyclic: starting point: 46588 - Aug 11 16:17:03.975 [DEBUG] blacklist: 3717595507 addresses allowed to be scanned - Aug 11 16:17:03.975 [DEBUG] send: will send from 1 address on 28233 source ports - Aug 11 16:17:03.975 [DEBUG] send: using bandwidth 10000000 bits/s, rate set to 14880 pkt/s - Aug 11 16:17:03.985 [DEBUG] recv: thread started - -ZMap also supports printing out a grep-able summary at the end of the scan, similar to below, which can be invoked with the `--summary` flag. - - cnf target-port 443 - cnf source-port-range-begin 32768 - cnf source-port-range-end 61000 - cnf source-addr-range-begin 1.1.1.4 - cnf source-addr-range-end 1.1.1.8 - cnf maximum-packets 4294967295 - cnf maximum-runtime 0 - cnf permutation-seed 0 - cnf cooldown-period 300 - cnf send-interface eth1 - cnf rate 45000 - env nprocessors 16 - exc send-start-time Fri Jan 18 01:47:35 2013 - exc send-end-time Sat Jan 19 00:47:07 2013 - exc recv-start-time Fri Jan 18 01:47:35 2013 - exc recv-end-time Sat Jan 19 00:52:07 2013 - exc sent 3722335150 - exc blacklisted 572632145 - exc first-scanned 1318129262 - exc hit-rate 0.874102 - exc synack-received-unique 32537000 - exc synack-received-total 36689941 - exc synack-cooldown-received-unique 193 - exc synack-cooldown-received-total 1543 - exc rst-received-unique 141901021 - exc rst-received-total 166779002 - adv source-port-secret 37952 - adv permutation-gen 4215763218 - -### Results Output ### - -ZMap can produce results in several formats through the use of **output modules**. By default, ZMap only supports **csv** output, however support for **redis** and **json** can be compiled in. The results sent to these output modules may be filtered using an **output filter**. The fields the output module writes are specified by the user. By default, ZMap will return results in csv format and if no output file is specified, ZMap will not produce specific results. It is also possible to write your own output module; see Writing Output Modules for information. - -**-o, --output-file=p** - -File to write output to - -**-O, --output-module=p** - -Invoke a custom output module - - -**-f, --output-fields=p** - -Comma-separated list of fields to output - -**--output-filter=filter** - -Specify an output filter over fields for a given probe - -**--list-output-modules** - -Lists available output modules - -**--list-output-fields** - -List available output fields for a given probe - -#### Output Fields #### - -ZMap has a variety of fields it can output beyond IP address. These fields can be viewed for a given probe module by running with the `--list-output-fields` flag. - - $ zmap --probe-module="tcp_synscan" --list-output-fields - saddr string: source IP address of response - saddr-raw int: network order integer form of source IP address - daddr string: destination IP address of response - daddr-raw int: network order integer form of destination IP address - ipid int: IP identification number of response - ttl int: time-to-live of response packet - sport int: TCP source port - dport int: TCP destination port - seqnum int: TCP sequence number - acknum int: TCP acknowledgement number - window int: TCP window - classification string: packet classification - success int: is response considered success - repeat int: is response a repeat response from host - cooldown int: Was response received during the cooldown period - timestamp-str string: timestamp of when response arrived in ISO8601 format. - timestamp-ts int: timestamp of when response arrived in seconds since Epoch - timestamp-us int: microsecond part of timestamp (e.g. microseconds since 'timestamp-ts') - -To select which fields to output, any combination of the output fields can be specified as a comma-separated list using the `--output-fields=fields` or `-f` flags. Example: - - $ zmap -p 80 -f "response,saddr,daddr,sport,seq,ack,in_cooldown,is_repeat,timestamp" -o output.csv - -#### Filtering Output #### - -Results generated by a probe module can be filtered before being passed to the output module. Filters are defined over the output fields of a probe module. Filters are written in a simple filtering language, similar to SQL, and are passed to ZMap using the **--output-filter** option. Output filters are commonly used to filter out duplicate results, or to only pass only sucessful responses to the output module. - -Filter expressions are of the form ` `. The type of `` must be either a string or unsigned integer literal, and match the type of ``. The valid operations for integer comparisons are `= !=, <, >, <=, >=`. The operations for string comparisons are =, !=. The `--list-output-fields` flag will print what fields and types are available for the selected probe module, and then exit. - -Compound filter expressions may be constructed by combining filter expressions using parenthesis to specify order of operations, the `&&` (logical AND) and `||` (logical OR) operators. - -**Examples** - -Write a filter for only successful, non-duplicate responses - - --output-filter="success = 1 && repeat = 0" - -Filter for packets that have classification RST and a TTL greater than 10, or for packets with classification SYNACK - - --output-filter="(classification = rst && ttl > 10) || classification = synack" - -#### CSV #### - -The csv module will produce a comma-separated value file of the output fields requested. For example, the following command produces the following CSV in a file called `output.csv`. - - $ zmap -p 80 -f "response,saddr,daddr,sport,seq,ack,in_cooldown,is_repeat,timestamp" -o output.csv - ----------- - - response, saddr, daddr, sport, dport, seq, ack, in_cooldown, is_repeat, timestamp - synack, 159.174.153.144, 10.0.0.9, 80, 40555, 3050964427, 3515084203, 0, 0,2013-08-15 18:55:47.681 - rst, 141.209.175.1, 10.0.0.9, 80, 40136, 0, 3272553764, 0, 0,2013-08-15 18:55:47.683 - rst, 72.36.213.231, 10.0.0.9, 80, 56642, 0, 2037447916, 0, 0,2013-08-15 18:55:47.691 - rst, 148.8.49.150, 10.0.0.9, 80, 41672, 0, 1135824975, 0, 0,2013-08-15 18:55:47.692 - rst, 50.165.166.206, 10.0.0.9, 80, 38858, 0, 535206863, 0, 0,2013-08-15 18:55:47.694 - rst, 65.55.203.135, 10.0.0.9, 80, 50008, 0, 4071709905, 0, 0,2013-08-15 18:55:47.700 - synack, 50.57.166.186, 10.0.0.9, 80, 60650, 2813653162, 993314545, 0, 0,2013-08-15 18:55:47.704 - synack, 152.75.208.114, 10.0.0.9, 80, 52498, 460383682, 4040786862, 0, 0,2013-08-15 18:55:47.707 - synack, 23.72.138.74, 10.0.0.9, 80, 33480, 810393698, 486476355, 0, 0,2013-08-15 18:55:47.710 - -#### Redis #### - -The redis output module allows addresses to be added to a Redis queue instead of being saved to file which ultimately allows ZMap to be incorporated with post processing tools. - -**Heads Up!** ZMap does not build with Redis support by default. If you are building ZMap from source, you can build with Redis support by running CMake with `-DWITH_REDIS=ON`. - -### Blacklisting and Whitelisting ### - -ZMap supports both blacklisting and whitelisting network prefixes. If ZMap is not provided with blacklist or whitelist parameters, ZMap will scan all IPv4 addresses (including local, reserved, and multicast addresses). If a blacklist file is specified, network prefixes in the blacklisted segments will not be scanned; if a whitelist file is provided, only network prefixes in the whitelist file will be scanned. A whitelist and blacklist file can be used in coordination; the blacklist has priority over the whitelist (e.g. if you have whitelisted 10.0.0.0/8 and blacklisted 10.1.0.0/16, then 10.1.0.0/16 will not be scanned). Whitelist and blacklist files can be specified on the command-line as follows: - -**-b, --blacklist-file=path** - -File of subnets to blacklist in CIDR notation, e.g. 192.168.0.0/16 - -**-w, --whitelist-file=path** - -File of subnets to limit scan to in CIDR notation, e.g. 192.168.0.0/16 - -Blacklist files should be formatted with a single network prefix in CIDR notation per line. Comments are allowed using the `#` character. Example: - - # From IANA IPv4 Special-Purpose Address Registry - # http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml - # Updated 2013-05-22 - - 0.0.0.0/8 # RFC1122: "This host on this network" - 10.0.0.0/8 # RFC1918: Private-Use - 100.64.0.0/10 # RFC6598: Shared Address Space - 127.0.0.0/8 # RFC1122: Loopback - 169.254.0.0/16 # RFC3927: Link Local - 172.16.0.0/12 # RFC1918: Private-Use - 192.0.0.0/24 # RFC6890: IETF Protocol Assignments - 192.0.2.0/24 # RFC5737: Documentation (TEST-NET-1) - 192.88.99.0/24 # RFC3068: 6to4 Relay Anycast - 192.168.0.0/16 # RFC1918: Private-Use - 192.18.0.0/15 # RFC2544: Benchmarking - 198.51.100.0/24 # RFC5737: Documentation (TEST-NET-2) - 203.0.113.0/24 # RFC5737: Documentation (TEST-NET-3) - 240.0.0.0/4 # RFC1112: Reserved - 255.255.255.255/32 # RFC0919: Limited Broadcast - - # From IANA Multicast Address Space Registry - # http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml - # Updated 2013-06-25 - - 224.0.0.0/4 # RFC5771: Multicast/Reserved - -If you are looking to scan only a random portion of the internet, checkout Sampling, instead of using whitelisting and blacklisting. - -**Heads Up!** The default ZMap configuration uses the blacklist file at `/etc/zmap/blacklist.conf`, which contains locally scoped address space and reserved IP ranges. The default configuration can be changed by editing `/etc/zmap/zmap.conf`. - -### Rate Limiting and Sampling ### - -By default, ZMap will scan at the fastest rate that your network adaptor supports. In our experiences on commodity hardware, this is generally around 95-98% of the theoretical speed of gigabit Ethernet, which may be faster than your upstream provider can handle. ZMap will not automatically adjust its send-rate based on your upstream provider. You may need to manually adjust your send-rate to reduce packet drops and incorrect results. - -**-r, --rate=pps** - -Set maximum send rate in packets/sec - -**-B, --bandwidth=bps** - -Set send rate in bits/sec (supports suffixes G, M, and K). This overrides the --rate flag. - -ZMap also allows random sampling of the IPv4 address space by specifying max-targets and/or max-runtime. Because hosts are scanned in a random permutation generated per scan instantiation, limiting a scan to n hosts will perform a random sampling of n hosts. Command-line options: - -**-n, --max-targets=n** - -Cap number of targets to probe - -**-N, --max-results=n** - -Cap number of results (exit after receiving this many positive results) - -**-t, --max-runtime=s** - -Cap length of time for sending packets (in seconds) - -**-s, --seed=n** - -Seed used to select address permutation. Specify the same seed in order to scan addresses in the same order for different ZMap runs. - -For example, if you wanted to scan the same one million hosts on the Internet for multiple scans, you could set a predetermined seed and cap the number of scanned hosts similar to the following: - - zmap -p 443 -s 3 -n 1000000 -o results - -In order to determine which one million hosts were going to be scanned, you could run the scan in dry-run mode which will print out the packets that would be sent instead of performing the actual scan. - - zmap -p 443 -s 3 -n 1000000 --dryrun | grep daddr - | awk -F'daddr: ' '{print $2}' | sed 's/ |.*//;' - -### Sending Multiple Packets ### - -ZMap supports sending multiple probes to each host. Increasing this number both increases scan time and hosts reached. However, we find that the increase in scan time (~100% per additional probe) greatly outweighs the increase in hosts reached (~1% per additional probe). - -**-P, --probes=n** - -The number of unique probes to send to each IP (default=1) - ----------- - -### Sample Applications ### - -ZMap is designed for initiating contact with a large number of hosts and finding ones that respond positively. However, we realize that many users will want to perform follow-up processing, such as performing an application level handshake. For example, users who perform a TCP SYN scan on port 80 might want to perform a simple GET request and users who scan port 443 may be interested in completing a TLS handshake. - -#### Banner Grab #### - -We have included a sample application, banner-grab, with ZMap that enables users to receive messages from listening TCP servers. Banner-grab connects to the provided servers, optionally sends a message, and prints out the first message received from the server. This tool can be used to fetch banners such as HTTP server responses to specific commands, telnet login prompts, or SSH server strings. - -This example finds 1000 servers listening on port 80, and sends a simple GET request to each, storing their base-64 encoded responses in http-banners.out - - $ zmap -p 80 -N 1000 -B 10M -o - | ./banner-grab-tcp -p 80 -c 500 -d ./http-req > out - -For more details on using `banner-grab`, see the README file in `examples/banner-grab`. - -**Heads Up!** ZMap and banner-grab can have significant performance and accuracy impact on one another if run simultaneously (as in the example). Make sure not to let ZMap saturate banner-grab-tcp's concurrent connections, otherwise banner-grab will fall behind reading stdin, causing ZMap to block on writing stdout. We recommend using a slower scanning rate with ZMap, and increasing the concurrency of banner-grab-tcp to no more than 3000 (Note that > 1000 concurrent connections requires you to use `ulimit -SHn 100000` and `ulimit -HHn 100000` to increase the maximum file descriptors per process). These parameters will of course be dependent on your server performance, and hit-rate; we encourage developers to experiment with small samples before running a large scan. - -#### Forge Socket #### - -We have also included a form of banner-grab, called forge-socket, that reuses the SYN-ACK sent from the server for the connection that ultimately fetches the banner. In `banner-grab-tcp`, ZMap sends a SYN to each server, and listening servers respond with a SYN+ACK. The ZMap host's kernel receives this, and sends a RST, as no active connection is associated with that packet. The banner-grab program must then create a new TCP connection to the same server to fetch data from it. - -In forge-socket, we utilize a kernel module by the same name, that allows us to create a connection with arbitrary TCP parameters. This enables us to suppress the kernel's RST packet, and instead create a socket that will reuse the SYN+ACK's parameters, and send and receive data through this socket as we would any normally connected socket. - -To use forge-socket, you will need the forge-socket kernel module, available from [github][1]. You should git clone `git@github.com:ewust/forge_socket.git` in the ZMap root source directory, and then cd into the forge_socket directory, and run make. Install the kernel module with `insmod forge_socket.ko` as root. - -You must also tell the kernel not to send RST packets. An easy way to disable RST packets system wide is to use **iptables**. `iptables -A OUTPUT -p tcp -m tcp --tcp-flgas RST,RST RST,RST -j DROP` as root will do this, though you may also add an optional --dport X to limit this to the port (X) you are scanning. To remove this after your scan completes, you can run `iptables -D OUTPUT -p tcp -m tcp --tcp-flags RST,RST RST,RST -j DROP` as root. - -Now you should be able to build the forge-socket ZMap example program. To run it, you must use the **extended_file** ZMap output module: - - $ zmap -p 80 -N 1000 -B 10M -O extended_file -o - | \ - ./forge-socket -c 500 -d ./http-req > ./http-banners.out - -See the README in `examples/forge-socket` for more details. - ----------- - -### Writing Probe and Output Modules ### - -ZMap can be extended to support different types of scanning through **probe modules** and additional types of results **output through** output modules. Registered probe and output modules can be listed through the command-line interface: - -**--list-probe-modules** - -Lists installed probe modules - -**--list-output-modules** - -Lists installed output modules - -#### Output Modules #### - -ZMap output and post-processing can be extended by implementing and registering **output modules** with the scanner. Output modules receive a callback for every received response packet. While the default provided modules provide simple output, these modules are also capable of performing additional post-processing (e.g. tracking duplicates or outputting numbers in terms of AS instead of IP address) - -Output modules are created by defining a new output_module struct and registering it in [output_modules.c][2]: - - typedef struct output_module { - const char *name; // how is output module referenced in the CLI - unsigned update_interval; // how often is update called in seconds - - output_init_cb init; // called at scanner initialization - output_update_cb start; // called at the beginning of scanner - output_update_cb update; // called every update_interval seconds - output_update_cb close; // called at scanner termination - - output_packet_cb process_ip; // called when a response is received - - const char *helptext; // Printed when --list-output-modules is called - - } output_module_t; - -Output modules must have a name, which is how they are referenced on the command-line and generally implement `success_ip` and oftentimes `other_ip` callback. The process_ip callback is called for every response packet that is received and passed through the output filter by the current **probe module**. The response may or may not be considered a success (e.g. it could be a TCP RST). These callbacks must define functions that match the `output_packet_cb` definition: - - int (*output_packet_cb) ( - - ipaddr_n_t saddr, // IP address of scanned host in network-order - ipaddr_n_t daddr, // destination IP address in network-order - - const char* response_type, // send-module classification of packet - - int is_repeat, // {0: first response from host, 1: subsequent responses} - int in_cooldown, // {0: not in cooldown state, 1: scanner in cooldown state} - - const u_char* packet, // pointer to struct iphdr of IP packet - size_t packet_len // length of packet in bytes - ); - -An output module can also register callbacks to be executed at scanner initialization (tasks such as opening an output file), start of the scan (tasks such as documenting blacklisted addresses), during regular intervals during the scan (tasks such as progress updates), and close (tasks such as closing any open file descriptors). These callbacks are provided with complete access to the scan configuration and current state: - - int (*output_update_cb)(struct state_conf*, struct state_send*, struct state_recv*); - -which are defined in [output_modules.h][3]. An example is available at [src/output_modules/module_csv.c][4]. - -#### Probe Modules #### - -Packets are constructed using probe modules which allow abstracted packet creation and response classification. ZMap comes with two scan modules by default: `tcp_synscan` and `icmp_echoscan`. By default, ZMap uses `tcp_synscan`, which sends TCP SYN packets, and classifies responses from each host as open (received SYN+ACK) or closed (received RST). ZMap also allows developers to write their own probe modules for use with ZMap, using the following API. - -Each type of scan is implemented by developing and registering the necessary callbacks in a `send_module_t` struct: - - typedef struct probe_module { - const char *name; // how scan is invoked on command-line - size_t packet_length; // how long is probe packet (must be static size) - - const char *pcap_filter; // PCAP filter for collecting responses - size_t pcap_snaplen; // maximum number of bytes for libpcap to capture - - uint8_t port_args; // set to 1 if ZMap requires a --target-port be - // specified by the user - - probe_global_init_cb global_initialize; // called once at scanner initialization - probe_thread_init_cb thread_initialize; // called once for each thread packet buffer - probe_make_packet_cb make_packet; // called once per host to update packet - probe_validate_packet_cb validate_packet; // called once per received packet, - // return 0 if packet is invalid, - // non-zero otherwise. - - probe_print_packet_cb print_packet; // called per packet if in dry-run mode - probe_classify_packet_cb process_packet; // called by receiver to classify response - probe_close_cb close; // called at scanner termination - - fielddef_t *fields // Definitions of the fields specific to this module - int numfields // Number of fields - - } probe_module_t; - -At scanner initialization, `global_initialize` is called once and can be utilized to perform any necessary global configuration or initialization. However, `global_initialize` does not have access to the packet buffer which is thread-specific. Instead, `thread_initialize` is called at the initialization of each sender thread and is provided with access to the buffer that will be used for constructing probe packets along with global source and destination values. This callback should be used to construct the host agnostic packet structure such that only specific values (e.g. destination host and checksum) need to be be updated for each host. For example, the Ethernet header will not change between headers (minus checksum which is calculated in hardware by the NIC) and therefore can be defined ahead of time in order to reduce overhead at scan time. - -The `make_packet` callback is called for each host that is scanned to allow the **probe module** to update host specific values and is provided with IP address values, an opaque validation string, and probe number (shown below). The probe module is responsible for placing as much of the verification string into the probe, in such a way that when a valid response is returned by a server, the probe module can verify that it is present. For example, for a TCP SYN scan, the tcp_synscan probe module can use the TCP source port and sequence number to store the validation string. Response packets (SYN+ACKs) will contain the expected values in the destination port and acknowledgement number. - - int make_packet( - void *packetbuf, // packet buffer - ipaddr_n_t src_ip, // source IP in network-order - ipaddr_n_t dst_ip, // destination IP in network-order - uint32_t *validation, // validation string to place in probe - int probe_num // if sending multiple probes per host, - // this will be which probe number for this - // host we are currently sending - ); - -Scan modules must also define `pcap_filter`, `validate_packet`, and `process_packet`. Only packets that match the PCAP filter will be considered by the scanner. For example, in the case of a TCP SYN scan, we only want to investigate TCP SYN/ACK or TCP RST packets and would utilize a filter similar to `tcp && tcp[13] & 4 != 0 || tcp[13] == 18`. The `validate_packet` function will be called for every packet that fulfills this PCAP filter. If the validation returns non-zero, the `process_packet` function will be called, and will populate a fieldset using fields defined in `fields` with data from the packet. For example, the following code processes a packet for the TCP synscan probe module. - - void synscan_process_packet(const u_char *packet, uint32_t len, fieldset_t *fs) - { - struct iphdr *ip_hdr = (struct iphdr *)&packet[sizeof(struct ethhdr)]; - struct tcphdr *tcp = (struct tcphdr*)((char *)ip_hdr - + (sizeof(struct iphdr))); - - fs_add_uint64(fs, "sport", (uint64_t) ntohs(tcp->source)); - fs_add_uint64(fs, "dport", (uint64_t) ntohs(tcp->dest)); - fs_add_uint64(fs, "seqnum", (uint64_t) ntohl(tcp->seq)); - fs_add_uint64(fs, "acknum", (uint64_t) ntohl(tcp->ack_seq)); - fs_add_uint64(fs, "window", (uint64_t) ntohs(tcp->window)); - - if (tcp->rst) { // RST packet - fs_add_string(fs, "classification", (char*) "rst", 0); - fs_add_uint64(fs, "success", 0); - } else { // SYNACK packet - fs_add_string(fs, "classification", (char*) "synack", 0); - fs_add_uint64(fs, "success", 1); - } - } - --------------------------------------------------------------------------------- - -via: https://zmap.io/documentation.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:https://github.com/ewust/forge_socket/ -[2]:https://github.com/zmap/zmap/blob/v1.0.0/src/output_modules/output_modules.c -[3]:https://github.com/zmap/zmap/blob/master/src/output_modules/output_modules.h -[4]:https://github.com/zmap/zmap/blob/master/src/output_modules/module_csv.c From 8d9469bc09ba353ee78c50ff970db364a05afcd8 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 11 Jul 2015 13:46:25 +0800 Subject: [PATCH 1367/2517] Create 20150401 ZMap Documentation.md --- .../tech/20150401 ZMap Documentation.md | 743 ++++++++++++++++++ 1 file changed, 743 insertions(+) create mode 100644 translated/tech/20150401 ZMap Documentation.md diff --git a/translated/tech/20150401 ZMap Documentation.md b/translated/tech/20150401 ZMap Documentation.md new file mode 100644 index 0000000000..fbfa912181 --- /dev/null +++ b/translated/tech/20150401 ZMap Documentation.md @@ -0,0 +1,743 @@ +ZMap 文档 +================================================================================ +1. 初识 ZMap +1. 最佳扫描习惯 +1. 命令行参数 +1. 附加信息 + 1. TCP SYN 探测模块 + 1. ICMP Echo 探测模块 + 1. UDP 探测模块 + 1. 配置文件 + 1. 详细 + 1. 结果输出 + 1. 黑名单 + 1. 速度限制与抽样 + 1. 发送多个探测 +1. ZMap 扩展 + 1. 示例应用程序 + 1. 编写探测和输出模块 + +---------- + +### 初识 ZMap ### + +ZMap被设计用来针对IPv4所有地址或其中的大部分实施综合扫描的工具。ZMap是研究者手中的利器,但在运行ZMap时,请注意,您很有可能正在以每秒140万个包的速度扫描整个IPv4地址空间 。我们建议用户在实施即使小范围扫描之前,也联系一下本地网络的管理员并参考我们列举的最佳扫描习惯。 + +默认情况下,ZMap会对于指定端口实施尽可能大速率的TCP SYN扫描。较为保守的情况下,对10,000个随机的地址的80端口以10Mbps的速度扫描,如下所示: + + $ zmap --bandwidth=10M --target-port=80 --max-targets=10000 --output-file=results.csv + +或者更加简洁地写成: + + $ zmap -B 10M -p 80 -n 10000 -o results.csv + +ZMap也可用于扫描特定子网或CIDR地址块。例如,仅扫描10.0.0.0/8和192.168.0.0/16的80端口,运行指令如下: + + zmap -p 80 -o results.csv 10.0.0.0/8 192.168.0.0/16 + +如果扫描进行的顺利,ZMap会每秒输出类似以下内容的状态更新: + + 0% (1h51m left); send: 28777 562 Kp/s (560 Kp/s avg); recv: 1192 248 p/s (231 p/s avg); hits: 0.04% + 0% (1h51m left); send: 34320 554 Kp/s (559 Kp/s avg); recv: 1442 249 p/s (234 p/s avg); hits: 0.04% + 0% (1h50m left); send: 39676 535 Kp/s (555 Kp/s avg); recv: 1663 220 p/s (232 p/s avg); hits: 0.04% + 0% (1h50m left); send: 45372 570 Kp/s (557 Kp/s avg); recv: 1890 226 p/s (232 p/s avg); hits: 0.04% + +这些更新信息提供了扫描的即时状态并表示成:完成进度% (剩余时间); send: 发出包的数量 即时速率 (平均发送速率); recv: 接收包的数量 接收率 (平均接收率); hits: 成功率 + +如果您不知道您所在网络支持的扫描速率,您可能要尝试不同的扫描速率和带宽限制直到扫描效果开始下降,借此找出当前网络能够支持的最快速度。 + +默认情况下,ZMap会输出不同IP地址的列表(例如,SYN ACK数据包的情况)像下面这样。还有几种附加的格式(如,JSON和Redis)作为其输出结果,以及生成程序可解析的扫描统计选项。 同样,可以指定附加的输出字段并使用输出过滤来过滤输出的结果。 + + 115.237.116.119 + 23.9.117.80 + 207.118.204.141 + 217.120.143.111 + 50.195.22.82 + +我们强烈建议您使用黑名单文件,以排除预留的/未分配的IP地址空间(如,组播地址,RFC1918),以及网络中需要排除在您扫描之外的地址。默认情况下,ZMap将采用位于 `/etc/zmap/blacklist.conf`的这个简单的黑名单文件中所包含的预留和未分配地址。如果您需要某些特定设置,比如每次运行ZMap时的最大带宽或黑名单文件,您可以在文件`/etc/zmap/zmap.conf`中指定或使用自定义配置文件。 + +如果您正试图解决扫描的相关问题,有几个选项可以帮助您调试。首先,您可以通过添加`--dryrun`实施预扫,以此来分析包可能会发送到网络的何处。此外,还可以通过设置'--verbosity=n`来更改日志详细程度。 + +---------- + +### 最佳扫描习惯 ### + +我们为针对互联网进行扫描的研究者提供了一些建议,以此来引导养成良好的互联网合作氛围 + +- 密切协同本地的网络管理员,以减少风险和调查 +- 确认扫描不会使本地网络或上游供应商瘫痪 +- 标记出在扫描中呈良性的网页和DNS条目的源地址 +- 明确注明扫描中所有连接的目的和范围 +- 提供一个简单的退出方法并及时响应请求 +- 实施扫描时,不使用比研究对象需求更大的扫描范围或更快的扫描频率 +- 如果可以通过时间或源地址来传播扫描流量 + +即使不声明,使用扫描的研究者也应该避免利用漏洞或访问受保护的资源,并遵守其辖区内任何特殊的法律规定。 + +---------- + +### 命令行参数 ### + +#### 通用选项 #### + +这些选项是实施简单扫描时最常用的选项。我们注意到某些选项取决于所使用的探测模块或输出模块(如,在实施ICMP Echo扫描时是不需要使用目的端口的)。 + + +**-p, --target-port=port** + +用来扫描的TCP端口号(例如,443) + +**-o, --output-file=name** + +使用标准输出将结果写入该文件。 + +**-b, --blacklist-file=path** + +文件中被排除的子网使用CIDR表示法(如192.168.0.0/16),一个一行。建议您使用此方法排除RFC 1918地址,组播地址,IANA预留空间等IANA专用地址。在conf/blacklist.example中提供了一个以此为目的示例黑名单文件。 + +#### 扫描选项 #### + +**-n, --max-targets=n** + +限制探测目标的数量。后面跟的可以是一个数字(例如'-n 1000`)或百分比(例如,`-n 0.1%`)当然都是针对可扫描地址空间而言的(不包括黑名单) + +**-N, --max-results=n** + +收到多少结果后退出 + +**-t, --max-runtime=secs** + +限制发送报文的时间 + +**-r, --rate=pps** + +设置传输速率,以包/秒为单位 + +**-B, --bandwidth=bps** + +以比特/秒设置传输速率(支持使用后缀G,M或K(如`-B 10M`就是速度10 mbps)的。设置会覆盖`--rate`。 + +**-c, --cooldown-time=secs** + +发送完成后多久继续接收(默认值= 8) + +**-e, --seed=n** + +地址排序种子。如果要用多个ZMap以相同的顺序扫描地址,那么就可以使用这个参数。 + +**--shards=n** + +将扫描分片/区在使其可多个ZMap中执行(默认值= 1)。启用分片时,`--seed`参数是必需的。 + +**--shard=n** + +选择扫描的分片(默认值= 0)。n的范围在[0,N),其中N为碎片的总数。启用分片时,`--seed`参数是必需的。 + +**-T, --sender-threads=n** + +用于发送数据包的线程数(默认值= 1) + +**-P, --probes=n** + +发送到每个IP的探测数(默认值= 1) + +**-d, --dryrun** + +用标准输出打印出每个包,而不是将其发送(用于调试) + +#### 网络选项 #### + +**-s, --source-port=port|range** + +发送数据包的源端口 + +**-S, --source-ip=ip|range** + +发送数据包的源地址。可以仅仅是一个IP,也可以是一个范围(如,10.0.0.1-10.0.0.9) + +**-G, --gateway-mac=addr** + +数据包发送到的网关MAC地址(用以防止自动检测不工作的情况) + +**-i, --interface=name** + +使用的网络接口 + +#### 探测选项 #### + +ZMap允许用户指定并添加自己所需要探测的模块。 探测模块的职责就是生成主机回复的响应包。 + +**--list-probe-modules** + +列出可用探测模块(如tcp_synscan) + +**-M, --probe-module=name** + +选择探探测模块(默认值= tcp_synscan) + +**--probe-args=args** + +向模块传递参数 + +**--list-output-fields** + +列出可用的输出模块 + +#### 输出选项 #### + +ZMap允许用户选择指定的输出模块。输出模块负责处理由探测模块返回的字段,并将它们交给用户。用户可以指定输出的范围,并过滤相应字段。 + +**--list-output-modules** + +列出可用输出模块(如tcp_synscan) + +**-O, --output-module=name** + +选择输出模块(默认值为csv) + +**--output-args=args** + +传递给输出模块的参数 + +**-f, --output-fields=fields** + +输出列表,以逗号分割 + +**--output-filter** + +通过指定相应的探测模块来过滤输出字段 + +#### 附加选项 #### + +**-C, --config=filename** + +加载配置文件,可以指定其他路径。 + +**-q, --quiet** + +不再是每秒刷新输出 + +**-g, --summary** + +在扫描结束后打印配置和结果汇总信息 + +**-v, --verbosity=n** + +日志详细程度(0-5,默认值= 3) + +**-h, --help** + +打印帮助并退出 + +**-V, --version** + +打印版本并退出 + +---------- + +### 附加信息 ### + +#### TCP SYN 扫描 #### + +在执行TCP SYN扫描时,ZMap需要指定一个目标端口和以供扫描的源端口范围。 + +**-p, --target-port=port** + +扫描的TCP端口(例如 443) + +**-s, --source-port=port|range** + +发送扫描数据包的源端口(例如 40000-50000) + +**警示!** ZMAP基于Linux内核使用SYN/ACK包应答,RST包关闭扫描打开的连接。ZMap是在Ethernet层完成包的发送的,这样做时为了减少跟踪打开的TCP连接和路由寻路带来的内核开销。因此,如果您有跟踪连接建立的防火墙规则,如netfilter的规则类似于`-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT`,将阻止SYN/ACK包到达内核。这不会妨碍到ZMap记录应答,但它会阻止RST包被送回,最终连接会在超时后断开。我们强烈建议您在执行ZMap时,选择一组主机上未使用且防火墙允许访问的端口,加在`-s`后(如 `-s '50000-60000' ` )。 + +#### ICMP Echo 请求扫描 #### + +虽然在默认情况下ZMap执行的是TCP SYN扫描,但它也支持使用ICMP echo请求扫描。在这种扫描方式下ICMP echo请求包被发送到每个主机,并以收到ICMP 应答包作为答复。实施ICMP扫描可以通过选择icmp_echoscan扫描模块来执行,如下: + + $ zmap --probe-module=icmp_echoscan + +#### UDP 数据报扫描 #### + +ZMap还额外支持UDP探测,它会发出任意UDP数据报给每个主机,并能在无论UDP或是ICMP任何一个不可达的情况下接受应答。ZMap支持通过使用--probe-args命令行选择四种不同的UDP payload方式。这些都有可列印payload的‘文本’,用于命令行的十六进制payload的‘hex’,外部文件中包含payload的‘file’,和需要动态区域生成的payload的‘template’。为了得到UDP响应,请使用-f参数确保您指定的“data”领域处于汇报范围。 + +下面的例子将发送两个字节'ST',即PC的'status'请求,到UDP端口5632。 + + $ zmap -M udp -p 5632 --probe-args=text:ST -N 100 -f saddr,data -o - + +下面的例子将发送字节“0X02”,即SQL服务器的 'client broadcast'请求,到UDP端口1434。 + + $ zmap -M udp -p 1434 --probe-args=hex:02 -N 100 -f saddr,data -o - + +下面的例子将发送一个NetBIOS状态请求到UDP端口137。使用一个ZMap自带的payload文件。 + + $ zmap -M udp -p 1434 --probe-args=file:netbios_137.pkt -N 100 -f saddr,data -o - + +下面的例子将发送SIP的'OPTIONS'请求到UDP端口5060。使用附ZMap自带的模板文件。 + + $ zmap -M udp -p 1434 --probe-args=file:sip_options.tpl -N 100 -f saddr,data -o - + +UDP payload 模板仍处于实验阶段。当您在更多的使用一个以上的发送线程(-T)时可能会遇到崩溃和一个明显的相比静态payload性能降低的表现。模板仅仅是一个由一个或多个使用$ {}将字段说明封装成序列构成的payload文件。某些协议,特别是SIP,需要payload来反射包中的源和目的地址。其他协议,如端口映射和DNS,包含范围伴随每一次请求随机生成或Zamp扫描的多宿主系统将会抛出危险警告。 + +以下的payload模板将发送SIP OPTIONS请求到每一个目的地: + + OPTIONS sip:${RAND_ALPHA=8}@${DADDR} SIP/2.0 + Via: SIP/2.0/UDP ${SADDR}:${SPORT};branch=${RAND_ALPHA=6}.${RAND_DIGIT=10};rport;alias + From: sip:${RAND_ALPHA=8}@${SADDR}:${SPORT};tag=${RAND_DIGIT=8} + To: sip:${RAND_ALPHA=8}@${DADDR} + Call-ID: ${RAND_DIGIT=10}@${SADDR} + CSeq: 1 OPTIONS + Contact: sip:${RAND_ALPHA=8}@${SADDR}:${SPORT} + Content-Length: 0 + Max-Forwards: 20 + User-Agent: ${RAND_ALPHA=8} + Accept: text/plain + +就像在上面的例子中展示的那样,对于大多数SIP正常的实现会在在每行行末添加\r\n,并且在请求的末尾一定包含\r\n\r\n。一个可以使用的在ZMap的examples/udp-payloads目录下的例子 (sip_options.tpl). + +下面的字段正在如今的模板中实施: + + +- **SADDR**: 源IP地址的点分十进制格式 +- **SADDR_N**: 源IP地址的网络字节序格式 +- **DADDR**: 目的IP地址的点分十进制格式 +- **DADDR_N**: 目的IP地址的网络字节序格式 +- **SPORT**: 源端口的ascii格式 +- **SPORT_N**: 源端口的网络字节序格式 +- **DPORT**: 目的端口的ascii格式 +- **DPORT_N**: 目的端口的网络字节序格式 +- **RAND_BYTE**: 随机字节(0-255),长度由=(长度) 参数决定 +- **RAND_DIGIT**: 随机数字0-9,长度由=(长度) 参数决定 +- **RAND_ALPHA**: 随机大写字母A-Z,长度由=(长度) 参数决定 +- **RAND_ALPHANUM**: 随机大写字母A-Z和随机数字0-9,长度由=(长度) 参数决定 + +### 配置文件 ### + +ZMap支持使用配置文件代替在命令行上指定所有的需求选项。配置中可以通过每行指定一个长名称的选项和对应的值来创建: + + interface "eth1" + source-ip 1.1.1.4-1.1.1.8 + gateway-mac b4:23:f9:28:fa:2d # upstream gateway + cooldown-time 300 # seconds + blacklist-file /etc/zmap/blacklist.conf + output-file ~/zmap-output + quiet + summary + +然后ZMap就可以按照配置文件和一些必要的附加参数运行了: + + $ zmap --config=~/.zmap.conf --target-port=443 + +### 详细 ### + +ZMap可以在屏幕上生成多种类型的输出。默认情况下,Zmap将每隔1秒打印出相似的基本进度信息。可以通过设置`--quiet`来禁用。 + + 0:01 12%; send: 10000 done (15.1 Kp/s avg); recv: 144 143 p/s (141 p/s avg); hits: 1.44% + +ZMap同样也可以根据扫描配置打印如下消息,可以通过'--verbosity`参数加以控制。 + + Aug 11 16:16:12.813 [INFO] zmap: started + Aug 11 16:16:12.817 [DEBUG] zmap: no interface provided. will use eth0 + Aug 11 16:17:03.971 [DEBUG] cyclic: primitive root: 3489180582 + Aug 11 16:17:03.971 [DEBUG] cyclic: starting point: 46588 + Aug 11 16:17:03.975 [DEBUG] blacklist: 3717595507 addresses allowed to be scanned + Aug 11 16:17:03.975 [DEBUG] send: will send from 1 address on 28233 source ports + Aug 11 16:17:03.975 [DEBUG] send: using bandwidth 10000000 bits/s, rate set to 14880 pkt/s + Aug 11 16:17:03.985 [DEBUG] recv: thread started + +ZMap还支持在扫描之后打印出一个的可grep的汇总信息,类似于下面这样,可以通过调用`--summary`来实现。 + + cnf target-port 443 + cnf source-port-range-begin 32768 + cnf source-port-range-end 61000 + cnf source-addr-range-begin 1.1.1.4 + cnf source-addr-range-end 1.1.1.8 + cnf maximum-packets 4294967295 + cnf maximum-runtime 0 + cnf permutation-seed 0 + cnf cooldown-period 300 + cnf send-interface eth1 + cnf rate 45000 + env nprocessors 16 + exc send-start-time Fri Jan 18 01:47:35 2013 + exc send-end-time Sat Jan 19 00:47:07 2013 + exc recv-start-time Fri Jan 18 01:47:35 2013 + exc recv-end-time Sat Jan 19 00:52:07 2013 + exc sent 3722335150 + exc blacklisted 572632145 + exc first-scanned 1318129262 + exc hit-rate 0.874102 + exc synack-received-unique 32537000 + exc synack-received-total 36689941 + exc synack-cooldown-received-unique 193 + exc synack-cooldown-received-total 1543 + exc rst-received-unique 141901021 + exc rst-received-total 166779002 + adv source-port-secret 37952 + adv permutation-gen 4215763218 + +### 结果输出 ### + +ZMap可以通过**输出模块**生成不同格式的结果。默认情况下,ZMap只支持**csv**的输出,但是可以通过编译支持**redis**和**json** 。可以使用**输出过滤**来过滤这些发送到输出模块上的结果。输出模块的范围由用户指定。默认情况如果没有指定输出文件,ZMap将以csv格式返回结果,ZMap不会产生特定结果。也可以编写自己的输出模块;请参阅编写输出模块。 + +**-o, --output-file=p** + +输出写入文件地址 + +**-O, --output-module=p** + +调用自定义输出模块 + + +**-f, --output-fields=p** + +输出以逗号分隔各字段的列表 + +**--output-filter=filter** + +在给定的探测区域实施输出过滤 + +**--list-output-modules** + +列出可用输出模块 + +**--list-output-fields** + +列出可用的给定探测区域 + +#### 输出字段 #### + +ZMap有很多区域,它可以基于IP地址输出。这些区域可以通过在给定探测模块上运行`--list-output-fields`来查看。 + + $ zmap --probe-module="tcp_synscan" --list-output-fields + saddr string: 应答包中的源IP地址 + saddr-raw int: 网络提供的整形形式的源IP地址 + daddr string: 应答包中的目的IP地址 + daddr-raw int: 网络提供的整形形式的目的IP地址 + ipid int: 应答包中的IP识别号 + ttl int: 应答包中的ttl(存活时间)值 + sport int: TCP 源端口 + dport int: TCP 目的端口 + seqnum int: TCP 序列号 + acknum int: TCP Ack号 + window int: TCP 窗口 + classification string: 包类型 + success int: 是应答包成功 + repeat int: 是否是来自主机的重复响应 + cooldown int: 是否是在冷却时间内收到的响应 + timestamp-str string: 响应抵达时的时间戳使用ISO8601格式 + timestamp-ts int: 响应抵达时的时间戳使用纪元开始的秒数 + timestamp-us int: 时间戳的微秒部分(例如 从'timestamp-ts'的几微秒) + +可以通过使用`--output-fields=fields`或`-f`来选择选择输出字段,任意组合的输出字段可以被指定为逗号分隔的列表。例如: + + $ zmap -p 80 -f "response,saddr,daddr,sport,seq,ack,in_cooldown,is_repeat,timestamp" -o output.csv + +#### 过滤输出 #### + +在传到输出模块之前,探测模块生成的结果可以先过滤。过滤被实施在探测模块的输出字段上。过滤使用简单的过滤语法写成,类似于SQL,通过ZMap的**--output-filter**选项来实施。输出过滤通常用于过滤掉重复的结果或仅传输成功的响应到输出模块。 + +过滤表达式的形式为`<字段名> <操作> <值>`。`<值>`的类型必须是一个字符串或一串无符号整数并且匹配`<字段名>`类型。对于整数比较有效的操作是`= !=, <, >, <=, >=`。字符串比较的操作是=,!=。`--list-output-fields`会打印那些可供探测模块选择的字段和类型,然后退出。 + +复合型的过滤操作,可以通过使用`&&`(逻辑与)和`||`(逻辑或)这样的运算符来组合出特殊的过滤操作。 + +**示例** + +书写一则过滤仅显示成功,过滤重复应答 + + --output-filter="success = 1 && repeat = 0" + +过滤出包中含RST并且TTL大于10的分类,或者包中含SYNACK的分类 + + --output-filter="(classification = rst && ttl > 10) || classification = synack" + +#### CSV #### + +csv模块将会生成以逗号分隔各输出请求字段的文件。例如,以下的指令将生成下面的CSV至名为`output.csv`的文件。 + + $ zmap -p 80 -f "response,saddr,daddr,sport,seq,ack,in_cooldown,is_repeat,timestamp" -o output.csv + +---------- + + 响应, 源地址, 目的地址, 源端口, 目的端口, 序列号, 应答, 是否是冷却模式, 是否重复, 时间戳 + synack, 159.174.153.144, 10.0.0.9, 80, 40555, 3050964427, 3515084203, 0, 0,2013-08-15 18:55:47.681 + rst, 141.209.175.1, 10.0.0.9, 80, 40136, 0, 3272553764, 0, 0,2013-08-15 18:55:47.683 + rst, 72.36.213.231, 10.0.0.9, 80, 56642, 0, 2037447916, 0, 0,2013-08-15 18:55:47.691 + rst, 148.8.49.150, 10.0.0.9, 80, 41672, 0, 1135824975, 0, 0,2013-08-15 18:55:47.692 + rst, 50.165.166.206, 10.0.0.9, 80, 38858, 0, 535206863, 0, 0,2013-08-15 18:55:47.694 + rst, 65.55.203.135, 10.0.0.9, 80, 50008, 0, 4071709905, 0, 0,2013-08-15 18:55:47.700 + synack, 50.57.166.186, 10.0.0.9, 80, 60650, 2813653162, 993314545, 0, 0,2013-08-15 18:55:47.704 + synack, 152.75.208.114, 10.0.0.9, 80, 52498, 460383682, 4040786862, 0, 0,2013-08-15 18:55:47.707 + synack, 23.72.138.74, 10.0.0.9, 80, 33480, 810393698, 486476355, 0, 0,2013-08-15 18:55:47.710 + +#### Redis #### + +Redis的输出模块允许地址被添加到一个Redis的队列,不是被保存到文件,允许ZMap将它与之后的处理工具结合使用。 + +**注意!** ZMap默认不会编译Redis功能。如果您想要将Redis功能编译进ZMap源码中,可以在CMake的时候加上`-DWITH_REDIS=ON`。 + +### 黑名单和白名单 ### + +ZMap同时支持对网络前缀做黑名单和白名单。如果ZMap不加黑名单和白名单参数,他将会扫描所有的IPv4地址(包括本地的,保留的以及组播地址)。如果指定了黑名单文件,那么在黑名单中的网络前缀将不再扫描;如果指定了白名单文件,只有那些网络前缀在白名单内的才会扫描。白名单和黑名单文件可以协同使用;黑名单运用于白名单上(例如:如果您在白名单中指定了10.0.0.0/8并在黑名单中指定了10.1.0.0/16,那么10.1.0.0/16将不会扫描)。白名单和黑名单文件可以在命令行中指定,如下所示: + +**-b, --blacklist-file=path** + +文件用于记录黑名单子网,以CIDR(无类域间路由)的表示法,例如192.168.0.0/16 + +**-w, --whitelist-file=path** + +文件用于记录限制扫描的子网,以CIDR的表示法,例如192.168.0.0/16 + +黑名单文件的每行都需要以CIDR的表示格式书写一个单一的网络前缀。允许使用`#`加以备注。例如: + + # IANA(英特网编号管理局)记录的用于特殊目的的IPv4地址 + # http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml + # 更新于2013-05-22 + + 0.0.0.0/8 # RFC1122: 网络中的所有主机 + 10.0.0.0/8 # RFC1918: 私有地址 + 100.64.0.0/10 # RFC6598: 共享地址空间 + 127.0.0.0/8 # RFC1122: 回环地址 + 169.254.0.0/16 # RFC3927: 本地链路地址 + 172.16.0.0/12 # RFC1918: 私有地址 + 192.0.0.0/24 # RFC6890: IETF协议预留 + 192.0.2.0/24 # RFC5737: 测试地址 + 192.88.99.0/24 # RFC3068: IPv6转换到IPv4的任意播 + 192.168.0.0/16 # RFC1918: 私有地址 + 192.18.0.0/15 # RFC2544: 检测地址 + 198.51.100.0/24 # RFC5737: 测试地址 + 203.0.113.0/24 # RFC5737: 测试地址 + 240.0.0.0/4 # RFC1112: 预留地址 + 255.255.255.255/32 # RFC0919: 广播地址 + + # IANA记录的用于组播的地址空间 + # http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml + # 更新于2013-06-25 + + 224.0.0.0/4 # RFC5771: 组播/预留地址ed + +如果您只是想扫描因特网中随机的一部分地址,使用采样检出,来代替使用白名单和黑名单。 + +**注意!**ZMap默认设置使用`/etc/zmap/blacklist.conf`作为黑名单文件,其中包含有本地的地址空间和预留的IP空间。通过编辑`/etc/zmap/zmap.conf`可以改变默认的配置。 + +### 速度限制与抽样 ### + +默认情况下,ZMap将以您当前网络所能支持的最快速度扫描。以我们对于常用硬件的经验,这普遍是理论上Gbit以太网速度的95-98%,这可能比您的上游提供商可处理的速度还要快。ZMap是不会自动的根据您的上游提供商来调整发送速率的。您可能需要手动的调整发送速率来减少丢包和错误结果。 + +**-r, --rate=pps** + +设置最大发送速率以包/秒为单位 + +**-B, --bandwidth=bps** + +设置发送速率以比特/秒(支持G,M和K后缀)。也同样作用于--rate的参数。 + +ZMap同样支持对IPv4地址空间进行指定最大目标数和/或最长运行时间的随机采样。由于针对主机的扫描是通过随机排序生成的实例,限制扫描的主机个数为N就会随机抽选N个主机。命令选项如下: + +**-n, --max-targets=n** + +探测目标上限数量 + +**-N, --max-results=n** + +结果上限数量(累积收到这么多结果后推出) + +**-t, --max-runtime=s** + +发送数据包时间长度上限(以秒为单位) + +**-s, --seed=n** + +种子用以选择地址的排列方式。使用不同ZMap执行扫描操作时将种子设成相同的值可以保证相同的扫描顺序。 + +举个例子,如果您想要多次扫描同样的一百万个互联网主机,您可以设定排序种子和扫描主机的上限数量,大致如下所示: + + zmap -p 443 -s 3 -n 1000000 -o results + +为了确定哪一百万主机将要被扫描,您可以执行预扫,只列印数据包而非发送,并非真的实施扫描。 + + zmap -p 443 -s 3 -n 1000000 --dryrun | grep daddr + | awk -F'daddr: ' '{print $2}' | sed 's/ |.*//;' + +### 发送多个数据包 ### + +ZMap支持想每个主机发送多个扫描。增加这个数量既增加了扫描时间又增加了到达的主机数量。然而,我们发现,增加扫描时间(每个额外扫描的增加近100%)远远大于到达的主机数量(每个额外扫描的增加近1%)。 + +**-P, --probes=n** + +向每个IP发出的独立扫描个数(默认值=1) + +---------- + +### 示例应用程序 ### + +ZMap专为向大量主机发启连接并寻找那些正确响应而设计。然而,我们意识到许多用户需要执行一些后续处理,如执行应用程序级别的握手。例如,用户在80端口实施TCP SYN扫描可能只是想要实施一个简单的GET请求,还有用户扫描443端口可能是对TLS握手如何完成感兴趣。 + +#### Banner获取 #### + +我们收录了一个示例程序,banner-grab,伴随ZMap使用可以让用户从监听状态的TCP服务器上接收到消息。Banner-grab连接到服务上,任意的发送一个消息,然后打印出收到的第一个消息。这个工具可以用来获取banners例如HTTP服务的回复的具体指令,telnet登陆提示,或SSH服务的字符串。 + +这个例子寻找了1000个监听80端口的服务器,并向每个发送一个简单的GET请求,存储他们的64位编码响应至http-banners.out + + $ zmap -p 80 -N 1000 -B 10M -o - | ./banner-grab-tcp -p 80 -c 500 -d ./http-req > out + +如果想知道更多使用`banner-grab`的细节,可以参考`examples/banner-grab`中的README文件。 + +**注意!** ZMap和banner-grab(如例子中)同时运行可能会比较显著的影响对方的表现和精度。确保不让ZMap充满banner-grab-tcp的并发连接,不然banner-grab将会落后于标准输入的读入,导致屏蔽编写标准输出。我们推荐使用较慢扫描速率的ZMap,同时提升banner-grab-tcp的并发性至3000以内(注意 并发连接>1000需要您使用`ulimit -SHn 100000`和`ulimit -HHn 100000`来增加每个问进程的最大文件描述)。当然,这些参数取决于您服务器的性能,连接成功率(hit-rate);我们鼓励开发者在运行大型扫描之前先进行小样本的试验。 + +#### 建立套接字 #### + +我们也收录了另一种形式的banner-grab,就是forge-socket, 重复利用服务器发出的SYN-ACK,连接并最终取得banner。在`banner-grab-tcp`中,ZMap向每个服务器发送一个SYN,并监听服务器发回的带有SYN+ACK的应答。运行ZMap主机的内核接受应答后发送RST,因为有没有处于活动状态的连接与该包关联。程序banner-grab必须在这之后创建一个新的TCP连接到从服务器获取数据。 + +在forge-socket中,我们以同样的名字利用内核模块,这使我们可以创建任意参数的TCP连接。这样可以抑制内核的RST包,并且通过创建套接字取代它可以重用SYN+ACK的参数,通过这个套接字收发数据和我们平时使用的连接套接字并没有什么不同。 + +要使用forge-socket,您需要forge-socket内核模块,从[github][1]上可以获得。您需要git clone `git@github.com:ewust/forge_socket.git`至ZMap源码根目录,然后cd进入forge_socket 目录,运行make。以root身份安装带有`insmod forge_socket.ko` 的内核模块。 + +您也需要告知内核不要发送RST包。一个简单的在全系统禁用RST包的方法是**iptables**。以root身份运行`iptables -A OUTPUT -p tcp -m tcp --tcp-flgas RST,RST RST,RST -j DROP`即可,当然您也可以加上一项--dport X将禁用局限于所扫描的端口(X)上。扫描完成后移除这项设置,以root身份运行`iptables -D OUTPUT -p tcp -m tcp --tcp-flags RST,RST RST,RST -j DROP`即可。 + +现在应该可以建立forge-socket的ZMap示例程序了。运行需要使用**extended_file**ZMap输出模块: + + $ zmap -p 80 -N 1000 -B 10M -O extended_file -o - | \ + ./forge-socket -c 500 -d ./http-req > ./http-banners.out + +详细内容可以参考`examples/forge-socket`目录下的README。 + +---------- + +### 编写探测和输出模块 ### + +ZMap可以通过**probe modules**扩展支持不同类型的扫描,通过**output modules**追加不同类型的输出结果。注册过的探测和输出模块可以在命令行中列出: + +**--list-probe-modules** + +列出安装过的探测模块 + +**--list-output-modules** + +列出安装过的输出模块 + +#### 输出模块 #### + +ZMap的输出和输出后处理可以通过执行和注册扫描的**output modules**来扩展。输出模块在接收每一个应答包时都会收到一个回调。然而提供的默认模块仅提供简单的输出,这些模块同样支持扩展扫描后处理(例如:重复跟踪或输出AS号码来代替IP地址) + +通过定义一个新的output_module机构体来创建输出模块,并在[output_modules.c][2]中注册: + + typedef struct output_module { + const char *name; // 在命令行如何引出输出模块 + unsigned update_interval; // 以秒为单位的更新间隔 + + output_init_cb init; // 在扫描初始化的时候调用 + output_update_cb start; // 在开始的扫描的时候调用 + output_update_cb update; // 每次更新间隔调用,秒为单位 + output_update_cb close; // 扫描终止后调用 + + output_packet_cb process_ip; // 接收到应答时调用 + + const char *helptext; // 会在--list-output-modules时打印在屏幕啥 + + } output_module_t; + +输出模块必须有名称,通过名称可以在命令行、普遍实施的`success_ip`和常见的`other_ip`回调中使用模块。process_ip的回调由每个收到的或经由**probe module**过滤的应答包调用。应答是否被认定为成功并不确定(比如,他可以是一个TCP的RST)。这些回调必须定义匹配`output_packet_cb`定义的函数: + + int (*output_packet_cb) ( + + ipaddr_n_t saddr, // network-order格式的扫描主机IP地址 + ipaddr_n_t daddr, // network-order格式的目的IP地址 + + const char* response_type, // 发送模块的数据包分类 + + int is_repeat, // {0: 主机的第一个应答, 1: 后续的应答} + int in_cooldown, // {0: 非冷却状态, 1: 扫描处于冷却中} + + const u_char* packet, // 指向结构体iphdr中IP包的指针 + size_t packet_len // 包的长度以字节为单位 + ); + +输出模块还可以通过注册回调执行在扫描初始化的时候(诸如打开输出文件的任务),扫描开始阶段(诸如记录黑名单的任务),在常规间隔实施(诸如程序升级的任务)在关闭的时候(诸如关掉所有打开的文件描述符。这些回调提供完整的扫描配置入口和实时状态: + + int (*output_update_cb)(struct state_conf*, struct state_send*, struct state_recv*); + +被定义在[output_modules.h][3]中。在[src/output_modules/module_csv.c][4]中有可用示例。 + +#### 探测模块 #### + +数据包由探测模块构造,由此可以创建抽象包并对应答分类。ZMap默认拥有两个扫描模块:`tcp_synscan`和`icmp_echoscan`。默认情况下,ZMap使用`tcp_synscan`来发送TCP SYN包并对每个主机的并对每个主机的响应分类,如打开时(收到SYN+ACK)或关闭时(收到RST)。ZMap允许开发者编写自己的ZMap探测模块,使用如下的API: + +任何类型的扫描的实施都需要在`send_module_t`结构体内开发和注册必要的回调: + + typedef struct probe_module { + const char *name; // 如何在命令行调用扫描 + size_t packet_length; // 探测包有多长(必须是静态的) + + const char *pcap_filter; // 对收到的响应实施PCAP过滤 + size_t pcap_snaplen; // maximum number of bytes for libpcap to capture + + uint8_t port_args; // 设为1,如果需要使用ZMap的--target-port + // 用户指定 + + probe_global_init_cb global_initialize; // 在扫描初始化会时被调用一次 + probe_thread_init_cb thread_initialize; // 每个包缓存区的线程中被调用一次 + probe_make_packet_cb make_packet; // 每个主机更新包的时候被调用一次 + probe_validate_packet_cb validate_packet; // 每收到一个包被调用一次, + // 如果包无效返回0, + // 非零则覆盖。 + + probe_print_packet_cb print_packet; // 如果在dry-run模式下被每个包都调用 + probe_classify_packet_cb process_packet; // 由区分响应的接收器调用 + probe_close_cb close; // 扫描终止后被调用 + + fielddef_t *fields // 该模块指定的区域的定义 + int numfields // 区域的数量 + + } probe_module_t; + +在扫描操作初始化时会调用一次`global_initialize`,可以用来实施一些必要的全局配置和初始化操作。然而,`global_initialize`并不能访问报缓冲区,那里由线程指定。用以代替的,`thread_initialize`在每个发送线程初始化的时候被调用,提供对于缓冲区的访问,可以用来构建探测包和全局的源和目的值。此回调应用于构建宿主不可知分组结构,甚至只有特定值(如:目的主机和校验和),需要随着每个主机更新。例如,以太网头部信息在交换时不会变更(减去校验和是由NIC硬件计算的)因此可以事先定义以减少扫描时间开销。 + +调用回调参数`make_packet是为了让被扫描的主机允许**probe module**更新主机指定的值,同时提供IP地址、一个非透明的验证字符串和探测数目(如下所示)。探测模块负责在探测中放置尽可能多的验证字符串,以至于当服务器返回的应答为空时,探测模块也能验证它的当前状态。例如,针对TCP SYN扫描,tcp_synscan探测模块会使用TCP源端口和序列号的格式存储验证字符串。响应包(SYN+ACKs)将包含预期的值包含目的端口和确认号。 + + int make_packet( + void *packetbuf, // 包的缓冲区 + ipaddr_n_t src_ip, // network-order格式源IP + ipaddr_n_t dst_ip, // network-order格式目的IP + uint32_t *validation, // 探测中的确认字符串 + int probe_num // 如果向每个主机发送多重探测, + // 该值为对于主机我们 + // 正在实施的探测数目 + ); + +扫描模块也应该定义`pcap_filter`、`validate_packet`和`process_packet`。只有符合PCAP过滤的包才会被扫描。举个例子,在一个TCP SYN扫描的情况下,我们只想要调查TCP SYN / ACK或RST TCP数据包,并利用类似`tcp && tcp[13] & 4 != 0 || tcp[13] == 18`的过滤方法。`validate_packet`函数将会被每个满足PCAP过滤条件的包调用。如果验证返回的值非零,将会调用`process_packet`函数,并使用包中被定义成的`fields`字段和数据填充字段集。如下代码为TCP synscan探测模块处理了一个数据包。 + + void synscan_process_packet(const u_char *packet, uint32_t len, fieldset_t *fs) + { + struct iphdr *ip_hdr = (struct iphdr *)&packet[sizeof(struct ethhdr)]; + struct tcphdr *tcp = (struct tcphdr*)((char *)ip_hdr + + (sizeof(struct iphdr))); + + fs_add_uint64(fs, "sport", (uint64_t) ntohs(tcp->source)); + fs_add_uint64(fs, "dport", (uint64_t) ntohs(tcp->dest)); + fs_add_uint64(fs, "seqnum", (uint64_t) ntohl(tcp->seq)); + fs_add_uint64(fs, "acknum", (uint64_t) ntohl(tcp->ack_seq)); + fs_add_uint64(fs, "window", (uint64_t) ntohs(tcp->window)); + + if (tcp->rst) { // RST packet + fs_add_string(fs, "classification", (char*) "rst", 0); + fs_add_uint64(fs, "success", 0); + } else { // SYNACK packet + fs_add_string(fs, "classification", (char*) "synack", 0); + fs_add_uint64(fs, "success", 1); + } + } + +-------------------------------------------------------------------------------- + +via: https://zmap.io/documentation.html + +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://github.com/ewust/forge_socket/ +[2]:https://github.com/zmap/zmap/blob/v1.0.0/src/output_modules/output_modules.c +[3]:https://github.com/zmap/zmap/blob/master/src/output_modules/output_modules.h +[4]:https://github.com/zmap/zmap/blob/master/src/output_modules/module_csv.c From c51e4a7f6d290cd84de5c756827629c83e85dd78 Mon Sep 17 00:00:00 2001 From: Love-xuan Date: Sat, 11 Jul 2015 14:00:26 +0800 Subject: [PATCH 1368/2517] translated --- ... Adds Live Backgrounds To Linux Distros.md | 114 ------------------ ... Adds Live Backgrounds To Linux Distros.md | 110 +++++++++++++++++ 2 files changed, 110 insertions(+), 114 deletions(-) delete mode 100644 sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md create mode 100644 translated/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md diff --git a/sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md b/sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md deleted file mode 100644 index 03be3a27ff..0000000000 --- a/sources/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md +++ /dev/null @@ -1,114 +0,0 @@ -Translating by Love-xuan -Animated Wallpaper Adds Live Backgrounds To Linux Distros -================================================================================ -**We know a lot of you love having a stylish Ubuntu desktop to show off.** - -![Live Wallpaper](http://i.imgur.com/9JIUw5p.gif) - -Live Wallpaper - -And as Linux makes it so easy to create a stunning workspace with a minimal effort, that’s understandable! - -Today, we’re highlighting — [re-highlighting][2] for those of you with long memories — a free, open-source tool that can add extra bling your OS screenshots and screencasts. - -It’s called **Live Wallpaper** and (as you can probably guess) it will replace the standard static desktop background with an animated alternative powered by OpenGL. - -And the best bit: it can be installed in Ubuntu very easily. - -### Animated Wallpaper Themes ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/animated-wallpaper-ubuntu-750x383.jpg) - -Live Wallpaper is not the only app of this type, but it is one of the the best. - -It comes with a number of different themes out of the box. - -These range from the subtle (‘noise’) to frenetic (‘nexus’), and caters to everything in between. There’s even the obligatory clock wallpaper inspired by the welcome screen of the Ubuntu Phone: - -- Circles — Clock inspired by Ubuntu Phone with ‘evolving circle’ aura -- Galaxy — Spinning galaxy that can be resized/repositioned -- Gradient Clock — A polar clock overlaid on basic gradient -- Nexus — Brightly colored particles fire across screen -- Noise — A bokeh design similar to the iOS dynamic wallpaper -- Photoslide — Grid of photos from folder (default ~/Photos) animate in/out - -Live Wallpaper is **fully open-source** so there’s nothing to stop imaginative artists with the know-how (and patience) from creating some slick themes of their own. - -### Settings & Features ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/live-wallpaper-gui-settings.jpg) - -Each theme can be configured or customised in some way, though certain themes have more options than others. - -For example, in Nexus (pictured above) you can change the number and colour of the the pulse particles, their size, and their frequency. - -The preferences app also provides a set of **general options** that will apply to all themes. These include: - -- Setting live wallpaper to run on log-in -- Setting a custom background that the animation sits on -- Adjusting the FPS (including option to show FPS on screen) -- Specifying the multi-monitor behaviour - -With so many options available it should be easy to create a background set up that suits you. - -### Drawbacks ### - -#### No Desktop Icons #### - -You can’t add, open or edit files or folders on the desktop while Live Wallpaper is ‘On’. - -The Preferences app does list an option that will, supposedly, let you do this. It may work on really older releases but in our testing, on Ubuntu 14.10, it does nothing. - -One workaround that seems to work for some users of the app on Ubuntu is setting a .png image as the custom background. It doesn’t have to be a transparent .png, simply a .png. - -#### Resource Usage #### - -Animated wallpapers use more system resources than standard background images. - -We’re not talking about 50% load at all times —at least not with this app in our testing— but those on low-power devices and laptops will want to use apps like this cautiously. Use a [system monitoring tool][2] to keep an eye on CPU and GPU load. - -#### Quitting the app #### - -The biggest “bug” for me is the absolute lack of “quit” option. - -Sure, the animated wallpaper can be turned off from the Indicator Applet and the Preferences tool but quitting the app entirely, quitting the indicator applet? Nope. To do that I have to use the ‘pkill livewallpaper’ command in the Terminal. - -### How to Install Live Wallpaper in Ubuntu 14.04 LTS + ### - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/terminal-command-750x146.jpg) - -To install Live Wallpaper in Ubuntu 14.04 LTS and above you will first need to add the official PPA for the app to your Software Sources. - -The quickest way to do this is using the Terminal: - - sudo add-apt-repository ppa:fyrmir/livewallpaper-daily - - sudo apt-get update && sudo apt-get install livewallpaper - -You should also install the indicator applet, which lets you quickly and easily turn on/off the animated wallpaper and switch theme from the menu area, and the GUI settings tool so that you can configure each theme based on your tastes. - - sudo apt-get install livewallpaper-config livewallpaper-indicator - -When everything has installed you will be able to launch the app and its preferences tool from the Unity Dash. - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/live-wallpaper-app-launcher.png) - -Annoyingly, the Indicator Applet won’t automatically open after you install it. It does add itself to the start up list, so a quick log out > log in will get it to show. - -### Summary ### - -If you fancy breathing life into a dull desktop, give it a spin — and let us know what you think of it and what animated wallpapers you’d love to see added! - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/05/animated-wallpaper-adds-live-backgrounds-to-linux-distros - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.omgubuntu.co.uk/2012/11/live-wallpaper-for-ubuntu -[2]:http://www.omgubuntu.co.uk/2011/11/5-system-monitoring-tools-for-ubuntu diff --git a/translated/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md b/translated/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md new file mode 100644 index 0000000000..2d845ce804 --- /dev/null +++ b/translated/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md @@ -0,0 +1,110 @@ +Translating by Love-xuan +动态壁纸给linux发行版添加活力背景 +================================================================================ +**我们知道你想拥有一个有格调的ubuntu桌面来炫耀一下 :)** + +![Live Wallpaper](http://i.imgur.com/9JIUw5p.gif) + +Live Wallpaper + +在linxu上费一点点劲搭建一个出色的工作环境是很简单的。 +今天,我们着重来探讨[重新着重探讨][2]长驻你脑海中那些东西 - 一款自由,开源,能够给你的截图增添光彩的工具。 + +它叫 **Live Wallpaper** (正如你猜的那样) ,它用由OpenGL驱动的一款动态桌面背景来代替标准的静态桌面背景。 + +最好的一点是:在ubuntu上安装它很容易。 + +### 动态壁纸主题 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/animated-wallpaper-ubuntu-750x383.jpg) + +Live Wallpaper 不是此类软件唯一的一款,但它是最好的一款之一。 + +它附带很多不同的开箱即用的主题。 + +从精细的(‘noise’)到狂热的 (‘nexus’),包罗万象,甚至有受到Ubuntu Phone欢迎屏幕启发的obligatory锁屏壁纸。 + +- Circles — 带着‘evolving circle’风格的时钟,灵感来自于Ubuntu Phone +- Galaxy — 支持自定义大小,位置的星系 +- Gradient Clock — 覆盖基本梯度的时钟 +- Nexus — 亮色粒子火花穿越屏幕 +- Noise — 类似于iOS动态壁纸的Bokeh设计 +- Photoslide — 由文件夹(默认为 ~/Photos)内照片构成的动态网格相册 + +Live Wallpaper **完全开源** ,所以没有什么能够阻挡天马行空的艺术家用提供的做法(当然还有耐心)来创造他们自己的精美主题。 + +### 设置 & 特点 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/live-wallpaper-gui-settings.jpg) + +虽然某些主题与其它主题相比有更多的选项,但每款主题都可以通过某些方式来配置或者定制。 + +例如, Nexus主题中 (上图所示) 你可以更改脉冲粒子的数量,颜色,大小和出现频率。 + +首选项提供了 **通用选项** 适用于所有主题,包括: + +- 设置登陆界面的动态壁纸 +- 自定义动画背景 +- 调节 FPS (包括在屏幕上显示FPS) +- 指定多显示器行为 + +有如此多的选项,diy适用于你自己的桌面背景是很容易的。 + +### 缺陷 ### + +#### 没有桌面图标 #### +Live Wallpaper在运行时,你无法在桌面添加,打开或者是编辑文件和文件夹。 + +首选项程序提供了一个选项来让你这样做(只是猜测)。也许是它只能在老版本中使用,在我们的测试中-测试环境为Ununtu 14.10,它并没有用。 +在测试中发现当把桌面壁纸设置成格式为png的图片文件时,这个选项有用,不需要是透明的png图片文件,只要是png图片文件就行了。 + +#### 资源占用 #### + +动态壁纸与标准的壁纸相比要消耗更多的系统资源。 + +我们并不是说任何时候都会消耗大量资源,但至少在我们的测试中是这样,所以低配置机器和笔记本用户要谨慎使用这款软件。可以使用 [系统监视器][2] 来追踪CPU 和GPU的负载。 + +#### 退出程序 #### + +对我来说最大的“bug”绝对是没有“退出”选项。 + +当然,Sure, 动态壁纸可以通过托盘图标和首选项完全退出,那退出托盘图标呢?没办法。只能在终端执行命令‘pkill livewallpaper’。 + +### 怎么在 Ubuntu 14.04 LTS +上安装 Live Wallpaper ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/terminal-command-750x146.jpg) + +要想在Ubuntu 14.04 LTS 和更高版本中安装 Live Wallpaper,你首先需要把官方PPA添加进你的软件源。 +最快的方法是在终端中执行下列命令: + + sudo add-apt-repository ppa:fyrmir/livewallpaper-daily + + sudo apt-get update && sudo apt-get install livewallpaper + +你还需要安装 indicator applet, 这样可以方便快速的打开或是关闭动态壁纸,从菜单选择主题,另外图形配置工具可以让你基于你自己的口味来配置每款主题。 + + sudo apt-get install livewallpaper-config livewallpaper-indicator + +所有都安装好之后你就可以通过Unity Dash来启动它和它的首选项工具了。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/live-wallpaper-app-launcher.png) + +让人不爽的是,安装完成后,程序不会自动打开托盘图标,而仅仅将它自己加入自动启动项,所以,快速来个注消 > 登陆它就会出现啦。 + +### 总结 ### + +如果你正处在无聊呆板的桌面中,幻想有一个更有活力的生活,不防试试。另外,告诉我们你想看到什么样的动态壁纸! + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/05/animated-wallpaper-adds-live-backgrounds-to-linux-distros + +作者:[Joey-Elijah Sneddon][a] +译者:[Love-xuan](https://github.com/Love-xuan) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2012/11/live-wallpaper-for-ubuntu +[2]:http://www.omgubuntu.co.uk/2011/11/5-system-monitoring-tools-for-ubuntu From c0e50d3d75478b6b3eb6b4b3ed2e2d66ea456a2d Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 11 Jul 2015 15:46:15 +0800 Subject: [PATCH 1369/2517] =?UTF-8?q?=E8=A1=A5=E5=85=85=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Love-xuan --- ...7 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/{ => share}/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md (100%) diff --git a/translated/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md b/translated/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md similarity index 100% rename from translated/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md rename to translated/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md From 08ad730415a676749a5cd9dcc9b933c939f6e90c Mon Sep 17 00:00:00 2001 From: KS Date: Sun, 12 Jul 2015 12:54:48 +0800 Subject: [PATCH 1370/2517] Create 20150709 Why is the ibdata1 file continuously growing in MySQL.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 --- ...ata1 file continuously growing in MySQL.md | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 translated/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md diff --git a/translated/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md b/translated/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md new file mode 100644 index 0000000000..2632f3f173 --- /dev/null +++ b/translated/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md @@ -0,0 +1,114 @@ +为什么mysql里的ibdata1文件不断的增长? +================================================================================ +![ibdata1 file](https://www.percona.com/blog/wp-content/uploads/2013/08/ibdata1-file.jpg) + +我们在[Percona支持][1]经常收到关于MySQL的ibdata1文件的这个问题。 + +当监控服务器发送一个关于MySQL服务器存储的报警恐慌就开始了 - 就是说磁盘快要满了。 + +一番调查后你意识到大多数地盘空间被InnDB的共享表空间ibdata1使用。你已经启用了[innodb_file_per_table][2],所以问题是: + +### ibdata1存了什么? ### + +当你启用了innodb_file_per_table,表被存储在他们自己的表空间里,但是共享表空间仍然在存储其他InnoDB的内部数据: + +- 数据字典也就是InnoDB表的元数据 +- 交换缓冲区 +- 双写缓冲区 +- 撤销日志 + +在[Percona服务器][3]上有一些是可以被配置来避免增长过大的。例如你可以通过[innodb_ibuf_max_size][4]设置最大交换缓冲区或设置[innodb_doublewrite_file][5]存储双写缓冲区到一个分离的文件。 + +MySQL 5.6版中你也可以创建额外的撤销表空间所以他们将会有他们自己的文件来替代存储到ibdata1。照着[文档链接][6]检查。 + +### 什么引起ibdata1增长迅速? ### + +当MySQL出现问题通常我们需要执行的第一个命令是: + + SHOW ENGINE INNODB STATUSG(这里我觉得应该是STATUS/G) + +这将展示给我们一些很有价值的信息。我们开始检查**事务**部分,然后我们会发现这个: + + ---TRANSACTION 36E, ACTIVE 1256288 sec + MySQL thread id 42, OS thread handle 0x7f8baaccc700, query id 7900290 localhost root + show engine innodb status + Trx read view will not see trx with id >= 36F, sees < 36F + +这是一个最常见的原因,一个14天前创建的相当老的老事务。这个状态是**活动的**,这意味着InnoDB已经创建了一个快照数据,所以需要在**撤销**日志中维护旧页面,以保障数据库的一致性视图,直到事务开始。如果你的数据库是写负载大,那就意味着大量的撤销页已经被存储了。 + +如果你找不到任何长时间运行的事务,你也可以监控INNODB状态中的其他的变量,“**历史记录列表长度**”展示了一些等待清除操作。这种情况下问题经常发生,因为清除线程(或者老版本的主线程)不能以这些记录进来的速度处理撤销。 + +### 我怎么检查什么被存储到了ibdata1里了? ### + +很不幸MySQL不提供什么被存储到ibdata1共享表空间的信息但是有两个工具将会很有帮助。第一个是马克·卡拉汉制作的一个修订版本的innochecksum并且发布在[这个漏洞报告][7]。 + +它相当易于使用: + + # ./innochecksum /var/lib/mysql/ibdata1 + 0 bad checksum + 13 FIL_PAGE_INDEX + 19272 FIL_PAGE_UNDO_LOG + 230 FIL_PAGE_INODE + 1 FIL_PAGE_IBUF_FREE_LIST + 892 FIL_PAGE_TYPE_ALLOCATED + 2 FIL_PAGE_IBUF_BITMAP + 195 FIL_PAGE_TYPE_SYS + 1 FIL_PAGE_TYPE_TRX_SYS + 1 FIL_PAGE_TYPE_FSP_HDR + 1 FIL_PAGE_TYPE_XDES + 0 FIL_PAGE_TYPE_BLOB + 0 FIL_PAGE_TYPE_ZBLOB + 0 other + 3 max index_id + +全部的20608中有19272个撤销日志页。**这是表空间的93%**。 + +第二个检查表空间内容的方式是杰里米科尔制作的[InnoDB Ruby工具][8]。它是个更先进的工具来检查InnoDB的内部结构。例如我们可以使用space-summary参数来得到每个页面及其数据类型的列表。我们可以使用标准的Unix工具**撤销日志**页的数量: + + # innodb_space -f /var/lib/mysql/ibdata1 space-summary | grep UNDO_LOG | wc -l + 19272 + +尽管这种特殊的情况innochedcksum更快更容易使用,我推荐你使用杰里米的工具去学习更多的InnoDB内部数据分布和内部结构。 + +好,现在我们知道问题所在。下一个问题: + +### 我能怎么解决问题? ### + +这个问题的答案很简单。如果你还能提交语句,就做吧。如果不能你必须要杀掉进程开始回滚进程。那将停止ibdata1的增长但是很清楚你的软件有一个漏洞或者出了一些错误。现在你知道如何去鉴定问题所在,你需要使用你自己的调试工具或普通语句日志找出谁或者什么引起的问题。 + +如果问题发生在清除线程,解决方法通常是升级到新版本,新版中使用一个独立的清除线程替代主线程。更多信息查看[文档链接][9] + +### 有什么方法恢复已使用的空间么? ### + +没有,目前不可能有一个容易并且快速的方法。InnoDB表空间从不收缩...见[10年老漏洞报告][10]最新更新自詹姆斯(谢谢): + +当你删除一些行,这个页被标为已删除稍后重用,但是这个空间从不会被恢复。只有一种方式来启动数据库使用新的ibdata1。做这个你应该需要使用mysqldump做一个逻辑全备份。然后停止MySQL并删除所有数据库、ib_logfile*、ibdata1*文件。当你再启动MySQL的时候将会创建一个新的共享表空间。然后恢复逻辑仓库。 + +### 总结 ### + +当ibdata1文件增长太快,通常是MySQL里长时间运行的被遗忘的事务引起的。尝试去解决问题越快越好(提交或者杀死事务)因为没有痛苦缓慢的mysqldump执行你不能恢复浪费的磁盘空间。 + +监控数据库避免这些问题也是非常推荐的。我们的[MySQL监控插件][11]包括一个Nagios脚本,如果发现了一个太老的运行事务它可以提醒你。 + +-------------------------------------------------------------------------------- + +via: https://www.percona.com/blog/2013/08/20/why-is-the-ibdata1-file-continuously-growing-in-mysql/ + +作者:[Miguel Angel Nieto][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.percona.com/blog/author/miguelangelnieto/ +[1]:https://www.percona.com/products/mysql-support +[2]:http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_file_per_table +[3]:https://www.percona.com/software/percona-server +[4]:https://www.percona.com/doc/percona-server/5.5/scalability/innodb_insert_buffer.html#innodb_ibuf_max_size +[5]:https://www.percona.com/doc/percona-server/5.5/performance/innodb_doublewrite_path.html?id=percona-server:features:percona_innodb_doublewrite_path#innodb_doublewrite_file +[6]:http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html#innodb-undo-tablespace +[7]:http://bugs.mysql.com/bug.php?id=57611 +[8]:https://github.com/jeremycole/innodb_ruby +[9]:http://dev.mysql.com/doc/innodb/1.1/en/innodb-improved-purge-scheduling.html +[10]:http://bugs.mysql.com/bug.php?id=1341 +[11]:https://www.percona.com/software/percona-monitoring-plugins From 3dd7d0b76a5efe87405fc5120b08cf08ba2f27eb Mon Sep 17 00:00:00 2001 From: KS Date: Sun, 12 Jul 2015 12:55:23 +0800 Subject: [PATCH 1371/2517] Delete 20150709 Why is the ibdata1 file continuously growing in MySQL.md --- ...ata1 file continuously growing in MySQL.md | 115 ------------------ 1 file changed, 115 deletions(-) delete mode 100644 sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md diff --git a/sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md b/sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md deleted file mode 100644 index 2fcf9353bb..0000000000 --- a/sources/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md +++ /dev/null @@ -1,115 +0,0 @@ -wyangsun 翻译中 -Why is the ibdata1 file continuously growing in MySQL? -================================================================================ -![ibdata1 file](https://www.percona.com/blog/wp-content/uploads/2013/08/ibdata1-file.jpg) - -We receive this question about the ibdata1 file in MySQL very often in [Percona Support][1]. - -The panic starts when the monitoring server sends an alert about the storage of the MySQL server – saying that the disk is about to get filled. - -After some research you realize that most of the disk space is used by the InnoDB’s shared tablespace ibdata1. You have [innodb_file_per_table][2] enabled, so the question is: - -### What is stored in ibdata1? ### - -When you have innodb_file_per_table enabled, the tables are stored in their own tablespace but the shared tablespace is still used to store other InnoDB’s internal data: - -- data dictionary aka metadata of InnoDB tables -- change buffer -- doublewrite buffer -- undo logs - -Some of them can be configured on [Percona Server][3] to avoid becoming too large. For example you can set a maximum size for change buffer with [innodb_ibuf_max_size][4] or store the doublewrite buffer on a separate file with [innodb_doublewrite_file][5]. - -In MySQL 5.6 you can also create external UNDO tablespaces so they will be in their own files instead of stored inside ibdata1. Check following [documentation link][6]. - -### What is causing the ibdata1 to grow that fast? ### - -Usually the first command that we need to run when there is a MySQL problem is: - - SHOW ENGINE INNODB STATUSG - -That will show us very valuable information. We start checking the **TRANSACTIONS** section and we find this: - - ---TRANSACTION 36E, ACTIVE 1256288 sec - MySQL thread id 42, OS thread handle 0x7f8baaccc700, query id 7900290 localhost root - show engine innodb status - Trx read view will not see trx with id >= 36F, sees < 36F - -This is the most common reason, a pretty old transaction created 14 days ago. The status is **ACTIVE**, that means InnoDB has created a snapshot of the data so it needs to maintain old pages in **undo** to be able to provide a consistent view of the database since that transaction was started. If your database is heavily write loaded that means lots of undo pages are being stored. - -If you don’t find any long-running transaction you can also monitor another variable from the INNODB STATUS, the “**History list length.**” It shows the number of pending purge operations. In this case the problem is usually caused because the purge thread (or master thread in older versions) is not capable to process undo records with the same speed as they come in. - -### How can I check what is being stored in the ibdata1? ### - -Unfortunately MySQL doesn’t provide information of what is being stored on that ibdata1 shared tablespace but there are two tools that will be very helpful. First a modified version of innochecksum made by Mark Callaghan and published in [this bug report][7]. - -It is pretty easy to use: - - # ./innochecksum /var/lib/mysql/ibdata1 - 0 bad checksum - 13 FIL_PAGE_INDEX - 19272 FIL_PAGE_UNDO_LOG - 230 FIL_PAGE_INODE - 1 FIL_PAGE_IBUF_FREE_LIST - 892 FIL_PAGE_TYPE_ALLOCATED - 2 FIL_PAGE_IBUF_BITMAP - 195 FIL_PAGE_TYPE_SYS - 1 FIL_PAGE_TYPE_TRX_SYS - 1 FIL_PAGE_TYPE_FSP_HDR - 1 FIL_PAGE_TYPE_XDES - 0 FIL_PAGE_TYPE_BLOB - 0 FIL_PAGE_TYPE_ZBLOB - 0 other - 3 max index_id - -It has 19272 UNDO_LOG pages from a total of 20608. **That’s the 93% of the tablespace**. - -The second way to check the content of a tablespace are the [InnoDB Ruby Tools][8] made by Jeremy Cole. It is a more advanced tool to examine the internals of InnoDB. For example we can use the space-summary parameter to get a list with every page and its data type. We can use standard Unix tools to get the number of **UNDO_LOG** pages: - - # innodb_space -f /var/lib/mysql/ibdata1 space-summary | grep UNDO_LOG | wc -l - 19272 - -Altough in this particular case innochecksum is faster and easier to use I recommend you to play with Jeremy’s tools to learn more about the data distribution inside InnoDB and its internals. - -OK, now we know where the problem is. The next question: - -### How can I solve the problem? ### - -The answer to this question is easy. If you can still commit that query, do it. If not you’ll have to kill the thread to start the rollback process. That will just stop ibdata1 from growing but it is clear that your software has a bug or someone made a mistake. Now that you know how to identify where is the problem you need to find who or what is causing it using your own debugging tools or the general query log. - -If the problem is caused by the purge thread then the solution is usually to upgrade to a newer version where you can use a dedicated purge thread instead of the master thread. More information on the following [documentation link][9]. - -### Is there any way to recover the used space? ### - -No, it is not possible at least in an easy and fast way. InnoDB tablespaces never shrink… see the following [10-year old bug report][10] recently updated by James Day (thanks): - -When you delete some rows, the pages are marked as deleted to reuse later but the space is never recovered. The only way is to start the database with fresh ibdata1. To do that you would need to take a full logical backup with mysqldump. Then stop MySQL and remove all the databases, ib_logfile* and ibdata* files. When you start MySQL again it will create a new fresh shared tablespace. Then, recover the logical dump. - -### Summary ### - -When the ibdata1 file is growing too fast within MySQL it is usually caused by a long running transaction that we have forgotten about. Try to solve the problem as fast as possible (commiting or killing a transaction) because you won’t be able to recover the wasted disk space without the painfully slow mysqldump process. - -Monitoring the database to avoid these kind of problems is also very recommended. Our [MySQL Monitoring Plugins][11] includes a Nagios script that can alert you if it finds a too old running transaction. - --------------------------------------------------------------------------------- - -via: https://www.percona.com/blog/2013/08/20/why-is-the-ibdata1-file-continuously-growing-in-mysql/ - -作者:[Miguel Angel Nieto][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.percona.com/blog/author/miguelangelnieto/ -[1]:https://www.percona.com/products/mysql-support -[2]:http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_file_per_table -[3]:https://www.percona.com/software/percona-server -[4]:https://www.percona.com/doc/percona-server/5.5/scalability/innodb_insert_buffer.html#innodb_ibuf_max_size -[5]:https://www.percona.com/doc/percona-server/5.5/performance/innodb_doublewrite_path.html?id=percona-server:features:percona_innodb_doublewrite_path#innodb_doublewrite_file -[6]:http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html#innodb-undo-tablespace -[7]:http://bugs.mysql.com/bug.php?id=57611 -[8]:https://github.com/jeremycole/innodb_ruby -[9]:http://dev.mysql.com/doc/innodb/1.1/en/innodb-improved-purge-scheduling.html -[10]:http://bugs.mysql.com/bug.php?id=1341 -[11]:https://www.percona.com/software/percona-monitoring-plugins From 46032c4da877dce0a15a83730f83a6a248159631 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 12 Jul 2015 15:50:07 +0800 Subject: [PATCH 1372/2517] [Translated]20150709 Install Google Hangouts Desktop Client In Linux.md --- ...Google Hangouts Desktop Client In Linux.md | 69 ------------------- ...Google Hangouts Desktop Client In Linux.md | 67 ++++++++++++++++++ 2 files changed, 67 insertions(+), 69 deletions(-) delete mode 100644 sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md create mode 100644 translated/tech/20150709 Install Google Hangouts Desktop Client In Linux.md diff --git a/sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md b/sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md deleted file mode 100644 index 426f0c0ffc..0000000000 --- a/sources/tech/20150709 Install Google Hangouts Desktop Client In Linux.md +++ /dev/null @@ -1,69 +0,0 @@ -FSSlc translating - -Install Google Hangouts Desktop Client In Linux -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/google-hangouts-header-664x374.jpg) - -Earlier, we have seen how to [install Facebook Messenger in Linux][1] and [WhatsApp desktop client in Linux][2]. Both of these were unofficial apps. I have one more unofficial app for today and it is [Google Hangouts][3]. - -Of course, you can use Google Hangouts in the web browser but it is more fun to use the desktop client than the web browser one. Curious? Let’s see how to **install Google Hangouts desktop client in Linux** and how to use it. - -### Install Google Hangouts in Linux ### - -We are going to use an open source project called [yakyak][4] which is unofficial Google Hangouts client for Linux, Windows and OS X. I’ll show you how to use yakyak in Ubuntu but I believe that you can use the same method to use it in other Linux distributions. Before we see how to use it, let’s first take a look at main features of yakyak: - -- Send and receive chat messages -- Create and change conversations (rename, add people) -- Leave and/or delete conversation -- Desktop notifications -- Toggle notifications on/off -- Drag-drop, copy-paste or attach-button for image upload. -- Hangupsbot sync room aware (actual user pics) -- Shows inline images -- History scrollback - -Sounds good enough? Download the installation files from the link below: - -- [Download Google Hangout client yakyak][5] - -The downloaded file would be compressed. Extract it and you will see a directory like linux-x64 or linux-x32 based on your system. Go in to this directory and you should see a file named yakyak. Double click on it to run it. - -![Run Google Hangout in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_3.jpeg) - -You’ll have to enter your Google Account credentials of course. - -![Set up Google Hangouts in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_2.jpeg) - -Once you are through, you’ll see a screen like the one below where you can chat with your Google contacts. - -![Google_Hangout_Linux_4](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_4.jpeg) - -If you want to show profile pictures of the contacts, you can select View->Show conversation thumbnails. - -![Google hangouts thumbnails](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_5.jpeg) - -You’ll also get desktop notification for new messages. - -![desktop notifications for Google Hangouts in Ubuntu Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_1.jpeg) - -### Worth a try? ### - -I let you give it a try and decide whether or not it is worth to **install Google Hangouts client in Linux**. If you want official apps, take a look at these [instant messaging applications with native Linux clients][6]. Don’t forget to share your experience with Google Hangouts in Linux. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/install-google-hangouts-linux/ - -作者:[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://itsfoss.com/facebook-messenger-linux/ -[2]:http://itsfoss.com/whatsapp-linux-desktop/ -[3]:http://www.google.com/+/learnmore/hangouts/ -[4]:https://github.com/yakyak/yakyak -[5]:https://github.com/yakyak/yakyak -[6]:http://itsfoss.com/best-messaging-apps-linux/ diff --git a/translated/tech/20150709 Install Google Hangouts Desktop Client In Linux.md b/translated/tech/20150709 Install Google Hangouts Desktop Client In Linux.md new file mode 100644 index 0000000000..e8257cbedf --- /dev/null +++ b/translated/tech/20150709 Install Google Hangouts Desktop Client In Linux.md @@ -0,0 +1,67 @@ +在 Linux 中安装 Google 环聊桌面客户端 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/google-hangouts-header-664x374.jpg) + +先前,我们已经介绍了如何[在 Linux 中安装 Facebook Messenger][1] 和[WhatsApp 桌面客户端][2]。这些应用都是非官方的应用。今天,我将为你推荐另一款非官方的应用,它就是 [Google 环聊][3] + +当然,你可以在 Web 浏览器中使用 Google 环聊,但相比于此,使用桌面客户端会更加有趣。好奇吗?那就跟着我看看如何 **在 Linux 中安装 Google 环聊** 以及如何使用它把。 + +### 在 Linux 中安装 Google 环聊 ### + +我们将使用一个名为 [yakyak][4] 的开源项目,它是一个针对 Linux,Windows 和 OS X 平台的非官方 Google 环聊客户端。我将向你展示如何在 Ubuntu 中使用 yakyak,但我相信在其他的 Linux 发行版本中,你可以使用同样的方法来使用它。在了解如何使用它之前,让我们先看看 yakyak 的主要特点: + +- 发送和接受聊天信息 +- 创建和更改对话 (重命名, 添加人物) +- 离开或删除对话 +- 桌面提醒通知 +- 打开或关闭通知 +- 针对图片上传,支持拖放,复制粘贴或使用上传按钮 +- Hangupsbot 房间同步(实际的用户图片) (注: 这里翻译不到位,希望改善一下) +- 展示行内图片 +- 历史回放 + +听起来不错吧,你可以从下面的链接下载到该软件的安装文件: + +- [下载 Google 环聊客户端 yakyak][5] + +下载的文件是压缩的。解压后,你将看到一个名称类似于 linux-x64 或 linux-x32 的目录,其名称取决于你的系统。进入这个目录,你应该可以看到一个名为 yakyak 的文件。双击这个文件来启动它。 + +![在 Linux 中运行 Run Google 环聊](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_3.jpeg) + +当然,你需要键入你的 Google 账号来认证。 + +![在 Ubuntu 中设置 Google 环聊](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_2.jpeg) + +一旦你通过认证后,你将看到如下的画面,在这里你可以和你的 Google 联系人进行聊天。 + +![Google_Hangout_Linux_4](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_4.jpeg) + +假如你想看看对话的配置图,你可以选择 `查看-> 展示对话缩略图` + +![Google 环聊缩略图](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_5.jpeg) + +当有新的信息时,你将得到桌面提醒。 + +![在 Ubuntu 中 Google 环聊的桌面提醒](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_1.jpeg) + +### 值得一试吗? ### + +我让你尝试一下,并决定 **在 Linux 中安装 Google 环聊客户端** 是否值得。若你想要官方的应用,你可以看看这些 [拥有原生 Linux 客户端的即时消息应用程序][6]。不要忘记分享你在 Linux 中使用 Google 环聊的体验。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-google-hangouts-linux/ + +作者:[Abhishek][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/facebook-messenger-linux/ +[2]:http://itsfoss.com/whatsapp-linux-desktop/ +[3]:http://www.google.com/+/learnmore/hangouts/ +[4]:https://github.com/yakyak/yakyak +[5]:https://github.com/yakyak/yakyak +[6]:http://itsfoss.com/best-messaging-apps-linux/ From 963fac2322cc5cee4b63c6c9aae96bac4510215c Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 12 Jul 2015 15:55:59 +0800 Subject: [PATCH 1373/2517] Update 20150629 Backup with these DeDuplicating Encryption Tools.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译这篇文章。 --- ...150629 Backup with these DeDuplicating Encryption Tools.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md b/sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md index c6fe06832a..ba4777996b 100644 --- a/sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md +++ b/sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md @@ -1,3 +1,5 @@ +FSSlc Translating + Backup with these DeDuplicating Encryption Tools ================================================================================ Data is growing both in volume and value. It is becoming increasingly important to be able to back up and restore this information quickly and reliably. As society has adapted to technology and learned how to depend on computers and mobile devices, there are few that can deal with the reality of losing important data. Of firms that suffer the loss of data, 30% fold within a year, 70% cease trading within five years. This highlights the value of data. @@ -155,4 +157,4 @@ via: http://www.linuxlinks.com/article/20150628060000607/BackupTools.html [3]:http://obnam.org/ [4]:http://duplicity.nongnu.org/ [5]:http://zbackup.org/ -[6]:https://bup.github.io/ \ No newline at end of file +[6]:https://bup.github.io/ From 4a44cd8c1d710de0e0a4089d7f7da7a786710868 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 12 Jul 2015 22:52:58 +0800 Subject: [PATCH 1374/2517] PUB:20150527 How to Develop Own Custom Linux Distribution From Scratch @wwy-hust --- ... Custom Linux Distribution From Scratch.md | 93 +++++++++++++++++++ ... Custom Linux Distribution From Scratch.md | 65 ------------- 2 files changed, 93 insertions(+), 65 deletions(-) create mode 100644 published/20150527 How to Develop Own Custom Linux Distribution From Scratch.md delete mode 100644 translated/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md diff --git a/published/20150527 How to Develop Own Custom Linux Distribution From Scratch.md b/published/20150527 How to Develop Own Custom Linux Distribution From Scratch.md new file mode 100644 index 0000000000..3bf454a476 --- /dev/null +++ b/published/20150527 How to Develop Own Custom Linux Distribution From Scratch.md @@ -0,0 +1,93 @@ +LFS中文版手册发布:如何打造自己的 Linux 发行版 +================================================================================ +您是否想过打造您自己的 Linux 发行版?每个 Linux 用户在他们使用 Linux 的过程中都想过做一个他们自己的发行版,至少一次。我也不例外,作为一个 Linux 菜鸟,我也考虑过开发一个自己的 Linux 发行版。从头开发一个 Linux 发行版这件事情被称作 Linux From Scratch (LFS)。 + +在开始之前,我总结了一些有关 LFS 的内容,如下: + +**1. 那些想要打造他们自己的 Linux 发行版的人应该了解打造一个 Linux 发行版(打造意味着从头开始)与配置一个已有的 Linux 发行版的不同** + +如果您只是想调整下启动屏幕、定制登录页面以及拥有更好的外观和使用体验。您可以选择任何一个 Linux 发行版并且按照您的喜好进行个性化配置。此外,有许多配置工具可以帮助您。 + +如果您想打包所有必须的文件、引导加载器和内核,并选择什么该被包括进来,然后依靠自己编译这一切东西。那么您需要的就是 Linux From Scratch (LFS)。 + +**注意**:如果您只想要定制 Linux 系统的外表和体验,这个指南并不适合您。但如果您真的想打造一个 Linux 发行版,并且向了解怎么开始以及一些其他的信息,那么这个指南正是为您而写。 + +**2. 打造一个 Linux 发行版(LFS)的好处** + +- 您将了解 Linux 系统的内部工作机制 +- 您将开发一个灵活的适应您需求的系统 +- 您开发的系统(LFS)将会非常紧凑,因为您对该包含/不该包含什么拥有绝对的掌控 +- 您开发的系统(LFS)在安全性上会更好 + +**3. 打造一个Linux发行版(LFS)的坏处** + +打造一个 Linux 系统意味着将所有需要的东西放在一起并且编译之。这需要许多查阅、耐心和时间。而且您需要一个可用的 Linux 系统和足够的磁盘空间来打造 LFS。 + +**4. 有趣的是,Gentoo/GNU Linux 在某种意义上最接近于 LFS。Gentoo 和 LFS 都是完全从源码编译的定制的 Linux 系统** + +**5. 您应该是一个有经验的Linux用户,对编译包、解决依赖有相当的了解,并且是个 shell 脚本的专家。** + +了解一门编程语言(最好是 C 语言)将会使事情变得容易些。但哪怕您是一个新手,只要您是一个优秀的学习者,可以很快的掌握知识,您也可以开始。最重要的是不要在 LFS 过程中丢失您的热情。 + +如果您不够坚定,恐怕会在 LFS 进行到一半时放弃。 + +**6. 现在您需要一步一步的指导来打造一个 Linux 。LFS 手册是打造 LFS 的官方指南。我们的合作站点 tradepub 也为我们的读者制作了 LFS 的指南,这同样是免费的。 ### + +您可以从下面的链接下载 Linux From Scratch 的电子书: + +[![](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-From-Scratch.gif)][1] + +下载: [Linux From Scratch][1] + +**7. 当前 LFS 的版本是 7.7,分为 systemd 版本和非 systemd 版本** + +LFS 的官方网站是: http://www.linuxfromscratch.org/ + +您可以在官网在线浏览 LFS 以及类似 BLFS 这样的相关项目的手册,也可以下载不同格式的版本。 + +- LFS (非 systemd 版本): + - PDF 版本: http://www.linuxfromscratch.org/lfs/downloads/stable/LFS-BOOK-7.7.pdf + - 单一 HTML 版本: http://www.linuxfromscratch.org/lfs/downloads/stable/LFS-BOOK-7.7-NOCHUNKS.html + - 打包的多页 HTML 版本: http://www.linuxfromscratch.org/lfs/downloads/stable/LFS-BOOK-7.7.tar.bz2 +- LFS (systemd 版本): + - PDF 版本: http://www.linuxfromscratch.org/lfs/downloads/7.7-systemd/LFS-BOOK-7.7-systemd.pdf + - 单一 HTML 版本: http://www.linuxfromscratch.org/lfs/downloads/7.7-systemd/LFS-BOOK-7.7-systemd-NOCHUNKS.html + - 打包的多页 HTML 版本: http://www.linuxfromscratch.org/lfs/downloads/7.7-systemd/LFS-BOOK-7.7-systemd.tar.bz2 + +**8. Linux 中国/LCTT 翻译了一份 LFS 手册(7.7,systemd 版本)** + +经过 LCTT 成员的努力,我们终于完成了对 LFS 7.7 systemd 版本手册的翻译。 + +手册在线访问地址:https://linux.cn/lfs/LFS-BOOK-7.7-systemd/index.html 。 + +其它格式的版本稍后推出。 + +感谢参与翻译的成员: wxy, ictlyh, dongfengweixiao, zpl1025, H-mudcup, Yuking-net, kevinSJ 。 + + +### 关于:Linux From Scratch ### + +这本手册是由 LFS 的项目领头人 Gerard Beekmans 创作的, Matthew Burgess 和 Bruse Dubbs 参与编辑,两人都是LFS 项目的联合领导人。这本书内容很广泛,有 338 页之多。 + +手册中内容包括:介绍 LFS、准备构建、构建 LFS、建立启动脚本、使 LFS 可以引导,以及附录。其中涵盖了您想知道的 LFS 项目中的所有东西。 + +这本手册还给出了编译一个包的预估时间。预估的时间以编译第一个包的时间作为参考。所有的东西都以易于理解的方式呈现,甚至对于新手来说也是这样。 + +如果您有充裕的时间并且真正对构建自己的 Linux 发行版感兴趣,那么您绝对不会错过下载这个电子书(免费下载)的机会。您需要做的,便是照着这本手册在一个工作的 Linux 系统(任何 Linux 发行版,足够的磁盘空间即可)中开始构建您自己的 Linux 系统,付出时间和热情。 + +如果 Linux 使您着迷,如果您想自己动手构建一个自己的 Linux 发行版,这便是现阶段您应该知道的全部了,其他的信息您可以参考上面链接的手册中的内容。 + +请让我了解您阅读/使用这本手册的经历,这本详尽的 LFS 指南的使用是否足够简单?如果您已经构建了一个 LFS 并且想给我们的读者一些建议,欢迎留言和反馈。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-custom-linux-distribution-from-scratch/ + +作者:[Avishek Kumar][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://tecmint.tradepub.com/free/w_linu01/prgm.cgi diff --git a/translated/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md b/translated/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md deleted file mode 100644 index 059f07b195..0000000000 --- a/translated/share/20150527 How to Develop Own Custom Linux Distribution From Scratch.md +++ /dev/null @@ -1,65 +0,0 @@ -δԼLinuxа -================================================================================ -ǷԼLinuxа棿ÿLinuxûʹLinuxĹжһԼķа棬һΡҲ⣬ΪһLinuxҲǹһԼLinuxа档һLinuxа汻Linux From Scratch (LFS) - -ڿʼ֮ǰܽһЩLFSݣ£ - -### 1. ЩҪԼLinuxаӦ˽һLinuxа棨ζŴͷʼһеLinuxаIJͬ ### - -ֻĻʾƵ¼Լӵиõʹ顣ѡκһLinuxа沢ҰϲýиԻá⣬ù߿԰ - -бļboot-loadersںˣѡʲôñȻԼһжôҪLinux From Scratch (LFS) - -**ע**ֻҪLinuxϵͳ飬ָϲʺһLinuxа棬˽ôʼԼһЩϢôָΪд - -### 2. һLinuxа棨LFSĺô ### - -- ˽Linuxϵͳڲ -- һӦϵͳ -- ϵͳLFSdzգΪԸð/ðʲôӵоԵƿ -- ϵͳLFSڰȫϻ - -### 3. һLinuxа棨LFSĻ ### - -һLinuxϵͳζŽҪĶһұ֮Ҫġĺʱ䡣ҪһõLinuxϵͳ㹻Ĵ̿ռLinuxϵͳ - -### 4. ȤǣGentoo/GNU LinuxijӽLFSGentooLFSȫԴĶƵLinuxϵͳ ### - -### 5. ӦһоLinuxûԱ൱˽⣬Ǹshellűרҡ˽һűԣCãʹЩһֻ֣ҪһѧϰߣԺ֪ܿʶҲԿʼҪDzҪLFSжʧ顣 ### - -ᶨ»LFSеһʱ - -### 6. ҪһһָһLinuxLFSǴLinuxĹٷָϡǵĴվtradepubҲΪǵĶLFSָϣͬѵġ ### - -ԴLinux From Scratch鼮 - -[![](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-From-Scratch.gif)][1] - -: [Linux From Scratch][1] - -### ڣLinux From Scratch ### - -ⱾLFSĿͷGerard BeekmansģMatthew BurgessBruse Dubbs༭˶LFSĿ쵼ˡⱾݺܹ㷺338ҳ - -ݰLFS׼LinuxLFSűʹLFS͸¼к֪LFSĿж - -Ȿ黹˱һԤʱ䡣ԤʱԱһʱΪοеĶķʽ֣˵ - -гԣʱ䲢ԹԼLinuxаȤôԲ飨أĻᡣҪģⱾһLinuxϵͳκLinuxа棬㹻Ĵ̿ռ伴ɣпʼԼLinuxϵͳʱ顣 - -LinuxʹԣԼֹһԼLinuxа棬ֽ׶Ӧ֪ȫˣϢԲοӵеݡ - -˽Ķ/ʹⱾľⱾ꾡LFSָϵʹǷ㹻򵥣ѾһLFSǵĶһЩ飬ӭԺͷ - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-custom-linux-distribution-from-scratch/ - -ߣ[Avishek Kumar][a] -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](https://linux.cn/) Ƴ - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://tecmint.tradepub.com/free/w_linu01/prgm.cgi From bc16956f1b457536f4ff6093de902a02ba88d59e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 12 Jul 2015 23:39:07 +0800 Subject: [PATCH 1375/2517] PUB:20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal @FSSlc --- ...put Rainbow Of Colors in Linux Terminal.md | 59 ++++++++++--------- 1 file changed, 30 insertions(+), 29 deletions(-) rename {translated/tech => published}/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md (75%) diff --git a/translated/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md b/published/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md similarity index 75% rename from translated/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md rename to published/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md index 4ce0ef80d0..b454f6f5aa 100644 --- a/translated/tech/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md +++ b/published/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md @@ -1,26 +1,26 @@ -Lolcat – 一个在 Linux 终端中输出彩虹特效的命令行工具 +Lolcat :一个在 Linux 终端中输出彩虹特效的命令行工具 ================================================================================ 那些相信 Linux 命令行是单调无聊且没有任何乐趣的人们,你们错了,这里有一些有关 Linux 的文章,它们展示着 Linux 是如何的有趣和“淘气” 。 -- [20 个有趣的 Linux 命令或在终端中 Linux 是有趣的][1] -- [6 个有趣的好玩 Linux 命令(在终端中的乐趣)][2] -- [在 Linux 终端中的乐趣 – 把玩文字和字符计数][3] +- [Linux命令及Linux终端的20个趣事][1] +- [终端中的乐趣:6个有趣的Linux命令行工具][2] +- [Linux终端的乐趣之把玩字词计数][3] -在本文中,我将讨论一个名为“lolcat”的应用 – 它在终端中生成彩虹般的颜色。 +在本文中,我将讨论一个名为“lolcat”的小工具 – 它可以在终端中生成彩虹般的颜色。 ![为终端生成彩虹般颜色的输出的 Lolcat 命令](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Lolcat.png) -为终端生成彩虹般颜色的输出的 Lolcat 命令 +*为终端生成彩虹般颜色的输出的 Lolcat 命令* #### 何为 lolcat ? #### -Lolcat 是一个针对 Linux,BSD 和 OSX 平台的应用,它类似于 [cat 命令][4],并为 `cat` 的输出添加彩虹般的色彩。 Lolcat 原本用于在 Linux 终端中为文本添加彩虹般的色彩。 +Lolcat 是一个针对 Linux,BSD 和 OSX 平台的工具,它类似于 [cat 命令][4],并为 `cat` 的输出添加彩虹般的色彩。 Lolcat 主要用于在 Linux 终端中为文本添加彩虹般的色彩。 ### 在 Linux 中安装 Lolcat ### -**1. Lolcat 应用在许多 Linux 发行版本的软件仓库中都可获取到,但可获得的版本都有些陈旧,而你可以通过 git 仓库下载和安装最新版本的 lolcat。** +**1. Lolcat 工具在许多 Linux 发行版的软件仓库中都可获取到,但可获得的版本都有些陈旧,而你可以通过 git 仓库下载和安装最新版本的 lolcat。** -由于 Lolcat 是一个 ruby gem 程序,所以在你的系统中安装有最新版本的 RUBY 是必须的。 +由于 Lolcat 是一个 ruby gem 程序,所以在你的系统中必须安装有最新版本的 RUBY。 # apt-get install ruby [在基于 APT 的系统中] # yum install ruby [在基于 Yum 的系统中] @@ -53,7 +53,7 @@ Lolcat 是一个针对 Linux,BSD 和 OSX 平台的应用,它类似于 [cat ![Lolcat 的帮助文档](http://www.tecmint.com/wp-content/uploads/2015/06/Lolcat-Help1.png) -Lolcat 的帮助文档 +*Lolcat 的帮助文档* **4. 接着, 通过管道连接 lolcat 和其他命令,例如 ps, date 和 cal:** @@ -63,15 +63,15 @@ Lolcat 的帮助文档 ![ps 命令的输出](http://www.tecmint.com/wp-content/uploads/2015/06/ps-command-output.png) -ps 命令的输出 +*ps 命令的输出* ![Date 的输出](http://www.tecmint.com/wp-content/uploads/2015/06/Date.png) -Date 的输出 +*Date 的输出* ![Calendar 的输出](http://www.tecmint.com/wp-content/uploads/2015/06/Cal.png) -Calendar 的输出 +*Calendar 的输出* **5. 使用 lolcat 来展示一个脚本文件的代码:** @@ -79,18 +79,18 @@ Calendar 的输出 ![用 lolcat 来展示代码](http://www.tecmint.com/wp-content/uploads/2015/06/Script-Output.png) -用 lolcat 来展示代码 +*用 lolcat 来展示代码* -**6. 通过管道连接 lolcat 和 figlet 命令。Figlet 是一个展示由常规的屏幕字符组成的巨大字符串的应用。我们可以通过管道将 figlet 的输出连接到 lolcat 中来给出如下的多彩输出:** +**6. 通过管道连接 lolcat 和 figlet 命令。Figlet 是一个展示由常规的屏幕字符组成的巨大字符串的应用。我们可以通过管道将 figlet 的输出连接到 lolcat 中来展示出如下的多彩输出:** # echo I ❤ Tecmint | lolcat # figlet I Love Tecmint | lolcat ![多彩的文字](http://www.tecmint.com/wp-content/uploads/2015/06/Colorful-Text.png) -多彩的文字 +*多彩的文字* -**注**: 毫无疑问 ❤ 是一个 unicode 字符并且为了安装 figlet,你需要像下面那样使用 yum 和 apt 来得到这个软件包: +**注**: 注意, ❤ 是一个 unicode 字符。要安装 figlet,你需要像下面那样使用 yum 和 apt 来得到这个软件包: # apt-get figlet # yum install figlet @@ -102,7 +102,7 @@ Calendar 的输出 ![动的文本](http://www.tecmint.com/wp-content/uploads/2015/06/Animated-Text.gif) -动的文本 +*动的文本* 这里选项 `-a` 指的是 Animation(动画), `-d` 指的是 duration(持续时间)。在上面的例子中,持续 500 次动画。 @@ -112,7 +112,7 @@ Calendar 的输出 ![多彩地显示文件](http://www.tecmint.com/wp-content/uploads/2015/06/List-Files-Colorfully.png) -多彩地显示文件 +*多彩地显示文件* **9. 通过管道连接 lolcat 和 cowsay。cowsay 是一个可配置的正在思考或说话的奶牛,这个程序也支持其他的动物。** @@ -136,15 +136,15 @@ Calendar 的输出 skeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkey turtle tux unipony unipony-smaller vader vader-koala www -通过管道连接 lolcat 和 cowsay 后的输出,并且使用了‘gnu’cowfile。 +通过管道连接 lolcat 和 cowsay 后的输出,并且使用了‘gnu’形象的 cowfile。 # cowsay -f gnu ☛ Tecmint ☚ is the best Linux Resource Available online | lolcat ![使用 Lolcat 的 Cowsay](http://www.tecmint.com/wp-content/uploads/2015/06/Cowsay-with-Lolcat.png) -使用 Lolcat 的 Cowsay +*使用 Lolcat 的 Cowsay* -**注**: 你可以在管道中使用 lolcat 和其他任何命令来在终端中得到彩色的输出。 +**注**: 你可以在将 lolcat 和其他任何命令用管道连接起来在终端中得到彩色的输出。 **10. 你可以为最常用的命令创建别名来使得命令的输出呈现出彩虹般的色彩。你可以像下面那样为 ‘ls -l‘ 命令创建别名,这个命令输出一个目录中包含内容的列表。** @@ -153,23 +153,24 @@ Calendar 的输出 ![多彩的 Alias 命令](http://www.tecmint.com/wp-content/uploads/2015/06/Alias-Commands-with-Colorful.png) -多彩的 Alias 命令 +*多彩的 Alias 命令* -你可以像上面建议的那样,为任何命令创建别名。为了使得别名永久生效,你必须添加相关的代码(上面的代码是 ls -l 的别名) 到 ~/.bashrc 文件中,并确保登出后再重新登录来使得更改生效。 +你可以像上面建议的那样,为任何命令创建别名。为了使得别名永久生效,你需要添加相关的代码(上面的代码是 ls -l 的别名) 到 ~/.bashrc 文件中,并登出后再重新登录来使得更改生效。 + +现在就是这些了。我想知道你是否曾经注意过 lolcat 这个工具?你是否喜欢这篇文章?欢迎在下面的评论环节中给出你的建议和反馈。喜欢并分享我们,帮助我们传播。 -现在就是这些了。我想知道你是否曾经注意过 lolcat 这个应用?你是否喜欢这篇文章?欢迎在下面的评论环节中给出你的建议和反馈。喜欢并分享我们,帮助我们传播。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/lolcat-command-to-output-rainbow-of-colors-in-linux-terminal/ 作者:[Avishek Kumar][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者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/avishek/ -[1]:http://www.tecmint.com/20-funny-commands-of-linux-or-linux-is-fun-in-terminal/ -[2]:http://www.tecmint.com/linux-funny-commands/ -[3]:http://www.tecmint.com/play-with-word-and-character-counts-in-linux/ +[1]:https://linux.cn/article-2831-1.html +[2]:https://linux.cn/article-4128-1.html +[3]:https://linux.cn/article-4088-1.html [4]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ \ No newline at end of file From f9cd744a41862d2153ce9c3e53c168568d90899b Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 13 Jul 2015 11:39:33 +0800 Subject: [PATCH 1376/2517] Translating by ZTinoZ --- ... line tools for monitoring your Linux system.md} | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename sources/talk/{20150709 command line tools for monitoring your Linux system.md => 20150709 7 command line tools for monitoring your Linux system.md} (80%) diff --git a/sources/talk/20150709 command line tools for monitoring your Linux system.md b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md similarity index 80% rename from sources/talk/20150709 command line tools for monitoring your Linux system.md rename to sources/talk/20150709 7 command line tools for monitoring your Linux system.md index 7d91a1dcaf..54764e2a54 100644 --- a/sources/talk/20150709 command line tools for monitoring your Linux system.md +++ b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md @@ -1,23 +1,22 @@ -Translating by ZTinoZ -7 command line tools for monitoring your Linux system +监控你的Linux系统的7个命令行工具 ================================================================================ -**Here is a selection of basic command line tools that will make your exploration and optimization in Linux easier. ** +**这里有一些基本的命令行工具,让你能更简单地探索和操作Linux。** ![Image courtesy Meltys-stock](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-1-100591899-orig.png) -### Dive on in ### +### 深入 ### -One of the great things about Linux is how deeply you can dive into the system to explore how it works and to look for opportunities to fine tune performance or diagnose problems. Here is a selection of basic command line tools that will make your exploration and optimization easier. Most of these commands are already built into your Linux system, but in case they aren’t, just Google “install”, the command name, and the name of your distro and you’ll find which package needs installing (note that some commands are bundled with other commands in a package that has a different name from the one you’re looking for). If you have any other tools you use, let me know for our next Linux Tools roundup. +关于Linux最棒的一件事之一是你能深入操作系统多深,来探索它是如何工作的并寻找机会来微调性能或诊断问题。这里有一些基本的命令行工具,让你能更简单地探索和操作Linux。大多数的这些命令是在你的Linux系统中已经内建的,但假设它们不是,就用谷歌搜索命令名和你的发行版名吧,你会找到哪些包需要安装(注意,一些命令是和其它命令捆绑起来打成一个包的,你所找的包可能写的是其它的名字)。如果你知道一些你所使用的其它工具,欢迎评论。 ![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-2-100591901-orig.png) ### How we did it ### -FYI: The screenshots in this collection were created on [Debian Linux 8.1][1] (“Jessie”) running in a virtual machine under [Oracle VirtualBox 4.3.28][2] under [OS X 10.10.3][3] (“Yosemite”). See my next slideshow “[How to install Debian Linux in a VirtualBox VM][4]” for a tutorial on how to build your own Debian VM. +FYI: 本文中的截图取自[Debian Linux 8.1][1] (“Jessie”),其运行在[OS X 10.10.3][3] (“Yosemite”)操作系统下[Oracle VirtualBox 4.3.28][2]中的一台虚拟机里。想要建立你的Debian虚拟机,可以看看我的这篇教程——“[How to install Debian Linux in a VirtualBox VM][4]”。 ![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-3-100591902-orig.png) -### Top command ### +### Top命令 ### One of the simpler Linux system monitoring tools, the **top command** comes with pretty much every flavor of Linux. This is the default display, but pressing the “z” key switches the display to color. Other hot keys and command line switches control things such as the display of summary and memory information (the second through fourth lines), sorting the list according to various criteria, killing tasks, and so on (you can find the complete list at [here][5]). From d62fdff6ff274628ff1d41aba3674a11a8dcfa37 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 13 Jul 2015 18:47:51 +0800 Subject: [PATCH 1377/2517] =?UTF-8?q?20150713-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rogram Problem Detected In Ubuntu 14.04.md | 82 +++++++++++ .../20150713 How to manage Vim plugins.md | 139 ++++++++++++++++++ 2 files changed, 221 insertions(+) create mode 100644 sources/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md create mode 100644 sources/tech/20150713 How to manage Vim plugins.md diff --git a/sources/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md b/sources/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md new file mode 100644 index 0000000000..4a91a6aeb3 --- /dev/null +++ b/sources/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md @@ -0,0 +1,82 @@ +How To Fix System Program Problem Detected In Ubuntu 14.04 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/system_program_Problem_detected.jpeg) + +For the last couple of weeks, (almost) every time I was greeted with **system program problem detected on startup in Ubuntu 15.04**. I ignored it for sometime but it was quite annoying after a certain point. You won’t be too happy as well if you are greeted by a pop-up displaying this every time you boot in to the system: + +> System program problem detected +> +> Do you want to report the problem now? +> +> ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/System_Program_Problem_Detected.png) + +I know if you are an Ubuntu user you might have faced this annoying pop-up sometimes for sure. In this post we are going to see what to do with “system program problem detected” report in Ubuntu 14.04 and 15.04. + +### What to do with “system program problem detected” error in Ubuntu? ### + +#### So what exactly is this notifier all about? #### + +Basically, this notifies you of a crash in your system. Don’t panic by the word ‘crash’. It’s not a major issue and your system is very much usable. It just that some program crashed some time in the past and Ubuntu wants you to decide whether or not you want to report this crash report to developers so that they could fix this issue. + +#### So, we click on Report problem and it will vanish? #### + +No, not really. Even if you click on report problem, you’ll be ultimately greeted with a pop up like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Ubuntu_Internal_error.png) + +[Sorry, Ubuntu has experienced an internal error][1] is the apport that will further open a web browser and then you can file a bug report by logging or creating an account with [Launchpad][2]. You see, it is a complicated procedure which will take around four steps to complete. + +#### But, I want to help developers and let them know of the bugs! #### + +That’s very thoughtful of you and the right thing to do. But there are two issues here. First, there are high chances that the bug would have already been reported. Second, even if you take the pain of reporting the crash, it’s not a guarantee that you won’t see it again. + +#### So, you suggesting to not report the crash? #### + +Yes and no. Report the crash when you see it the first time, if you want. You can see the crashing program under “Show Details” in the above picture. But if you see it repetitively or if you do not want to report the bug, I advise you to get rid of the system crash once and for all. + +### Fix “system program problem detected” error in Ubuntu ### + +The crash reports are stored in /var/crash directory in Ubuntu. If you look in to this directory, you should see some files ending with crash. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Crash_reports_Ubuntu.jpeg) + +What I suggest is that you delete these crash reports. Open a terminal and use the following command: + + sudo rm /var/crash/* + +This will delete all the content of directory /var/crash. This way you won’t be annoyed by the pop up for the programs crash that happened in the past. But if a programs crashes again, you’ll again see system program problem detected error. You can either remove the crash reports again, like we just did, or you can disable the Apport (debug tool) and permanently get rid of the pop-ups. + +#### Permanently get rid of system error pop up in Ubuntu #### + +If you do this, you’ll never be notified about any program crash that happens in the system. If you ask my view, I would say it’s not that bad a thing unless you are willing to file bug reports. If you have no intention of filing a bug report, the crash notifications and their absence will make no difference. + +To disable the Apport and get rid of system crash report completely, open a terminal and use the following command to edit the Apport settings file: + + gksu gedit /etc/default/apport + +The content of the file is: + + # set this to 0 to disable apport, or to 1 to enable it + # you can temporarily override this with + # sudo service apport start force_start=1 + enabled=1 + +Change the **enabled=1** to **enabled=0**. Save and close the file. You won’t see any pop up for crash reports after doing this. Obvious to point out that if you want to enable the crash reports again, you just need to change the same file and put enabled as 1 again. + +#### Did it work for you? #### + +I hope this tutorial helped you to fix system program problem detected in Ubuntu 14.04 and Ubuntu 15.04. Let me know if this tip helped you to get rid of this annoyance. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/how-to-fix-system-program-problem-detected-ubuntu/ + +作者:[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://itsfoss.com/how-to-solve-sorry-ubuntu-12-04-has-experienced-an-internal-error/ +[2]:https://launchpad.net/ \ No newline at end of file diff --git a/sources/tech/20150713 How to manage Vim plugins.md b/sources/tech/20150713 How to manage Vim plugins.md new file mode 100644 index 0000000000..7462414916 --- /dev/null +++ b/sources/tech/20150713 How to manage Vim plugins.md @@ -0,0 +1,139 @@ +How to manage Vim plugins +================================================================================ +Vim is a versatile, lightweight text editor on Linux. While its initial learning curve can be overwhelming for an average Linux user, its benefits are completely worthy. As far as the functionality goes, Vim is fully customizable by means of plugins. Due to its high level of configuration, though, you need to spend some time with its plugin system to be able to personalize Vim in an effective way. Luckily, we have several tools that make our life with Vim plugins easier. The one I use on a daily basis is Vundle. + +### What is Vundle? ### + +[Vundle][1], which stands for Vim Bundle, is a Vim plugin manager. Vundle allows you to install, update, search and clean up Vim plugins very easily. It can also manage your runtime and help with tags. In this tutorial, I am going to show how to install and use Vundle. + +### Installing Vundle ### + +First, [install Git][2] if you don't have it on your Linux system. + +Next, create a directory where Vim plugins will be downloaded and installed. By default, this directory is located at ~/.vim/bundle + + $ mkdir -p ~/.vim/bundle + +Now go ahead and install Vundle as follows. Note that Vundle itself is another Vim plugin. Thus we install Vundle under ~/.vim/bundle we created earlier. + + $ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim + +### Configuring Vundle ### + +Now set up you .vimrc file as follows: + + set nocompatible " This is required + filetype off " This is required + + " Here you set up the runtime path + set rtp+=~/.vim/bundle/Vundle.vim + + " Initialize vundle + call vundle#begin() + + " This should always be the first + Plugin 'gmarik/Vundle.vim' + + " This examples are from https://github.com/gmarik/Vundle.vim README + Plugin 'tpope/vim-fugitive' + + " Plugin from http://vim-scripts.org/vim/scripts.html + Plugin 'L9' + + "Git plugin not hosted on GitHub + Plugin 'git://git.wincent.com/command-t.git' + + "git repos on your local machine (i.e. when working on your own plugin) + Plugin 'file:///home/gmarik/path/to/plugin' + + " The sparkup vim script is in a subdirectory of this repo called vim. + " Pass the path to set the runtimepath properly. + Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} + + " Avoid a name conflict with L9 + Plugin 'user/L9', {'name': 'newL9'} + + "Every Plugin should be before this line + + call vundle#end() " required + +Let me explain the above configuration a bit. By default, Vundle downloads and installs Vim plugins from github.com or vim-scripts.org. You can modify the default behavior. + +To install from Github: + + Plugin 'user/plugin' + +To install from http://vim-scripts.org/vim/scripts.html: + + Plugin 'plugin_name' + +To install from another git repo: + + Plugin 'git://git.another_repo.com/plugin' + +To install from a local file: + + Plugin 'file:///home/user/path/to/plugin' + +Also you can customize others such as the runtime path of you plugins, which is really useful if you are programming a plugin yourself, or just want to load it from another directory that is not ~/.vim. + + Plugin 'rstacruz/sparkup', {'rtp': 'another_vim_path/'} + +If you have plugins with the same names, you can rename you plugin so that it doesn't conflict. + + Plugin 'user/plugin', {'name': 'newPlugin'} + +### Using Vum Commands ### + +Once you have set up you plugins with Vundle, you can use it to to install, update, search and clean unused plugins using several Vundle commands. + +#### Installing a new plugin #### + +The PluginInstall command will install all plugins listed in your .vimrc file. You can also install just one specific plugin by passing its name. + + :PluginInstall + :PluginInstall + +![](https://farm1.staticflickr.com/559/18998707843_438cd55463_c.jpg) + +#### Cleaning up an unused plugin #### + +If you have any unused plugin, you can remove it by using the PluginClean command. + + :PluginClean + +![](https://farm4.staticflickr.com/3814/19433047689_17d9822af6_c.jpg) + +#### Searching for a plugin #### + +If you want to install a plugin from a plugin list provided, search functionality can be useful. + +:PluginSearch + +![](https://farm1.staticflickr.com/541/19593459846_75b003443d_c.jpg) + +While searching, you can install, clean, research or reload the same list on the interactive split. Installing plugins won't load your plugins automatically. To do so, add them to you .vimrc file. + +### Conclusion ### + +Vim is an amazing tool. It can not only be a great default text editor that can make your work flow faster and smoother, but also be turned into an IDE for almost any programming language available. Vundle can be a big help in personalizing the powerful Vim environment quickly and easily. + +Note that there are several sites that allow you to find the right Vim plugins for you. Always check [http://www.vim-scripts.org][3], Github or [http://www.vimawesome.com][4] for new scripts or plugins. Also remember to use the help provider for you plugin. + +Keep rocking with your favorite text editor! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/manage-vim-plugins.html + +作者:[Christopher Valerio][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/valerio +[1]:https://github.com/VundleVim/Vundle.vim +[2]:http://ask.xmodulo.com/install-git-linux.html +[3]:http://www.vim-scripts.org/ +[4]:http://www.vimawesome.com/ \ No newline at end of file From 55a111bdbafb63f6577d8339c3bcec8b8ea59910 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 14 Jul 2015 10:39:43 +0800 Subject: [PATCH 1378/2517] =?UTF-8?q?20150714-1=20=E9=80=89=E9=A2=98=20RAI?= =?UTF-8?q?D=20=E4=B8=93=E9=A2=98=20struggling=20=E6=8E=A8=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... RAID, Concepts of RAID and RAID Levels.md | 143 ++++++++ ...wo Devices' Using 'mdadm' Tool in Linux.md | 218 ++++++++++++ ... (Mirroring) using 'Two Disks' in Linux.md | 212 ++++++++++++ ...iping with Distributed Parity) in Linux.md | 285 ++++++++++++++++ ...ith Double Distributed Parity) in Linux.md | 320 ++++++++++++++++++ ...ing Up RAID 10 or 1+0 (Nested) in Linux.md | 275 +++++++++++++++ ...Array and Removing Failed Disks in Raid.md | 179 ++++++++++ 7 files changed, 1632 insertions(+) create mode 100644 sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md create mode 100644 sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md create mode 100644 sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md create mode 100644 sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md create mode 100644 sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md create mode 100644 sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md create mode 100644 sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md diff --git a/sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md b/sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md new file mode 100644 index 0000000000..6d902f7576 --- /dev/null +++ b/sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md @@ -0,0 +1,143 @@ +Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 +================================================================================ +RAID is a Redundant Array of Inexpensive disks, but nowadays it is called Redundant Array of Independent drives. Earlier it is used to be very costly to buy even a smaller size of disk, but nowadays we can buy a large size of disk with the same amount like before. Raid is just a collection of disks in a pool to become a logical volume. + +![RAID in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/RAID.jpg) + +Understanding RAID Setups in Linux + +Raid contains groups or sets or Arrays. A combine of drivers make a group of disks to form a RAID Array or RAID set. It can be a minimum of 2 number of disk connected to a raid controller and make a logical volume or more drives can be in a group. Only one Raid level can be applied in a group of disks. Raid are used when we need excellent performance. According to our selected raid level, performance will differ. Saving our data by fault tolerance & high availability. + +This series will be titled Preparation for the setting up RAID ‘s through Parts 1-9 and covers the following topics. + +- Part 1: Introduction to RAID, Concepts of RAID and RAID Levels +- Part 2: How to setup RAID0 (Stripe) in Linux +- Part 3: How to setup RAID1 (Mirror) in Linux +- Part 4: How to setup RAID5 (Striping with Distributed Parity) in Linux +- Part 5: How to setup RAID6 (Striping with Double Distributed Parity) in Linux +- Part 6: Setting Up RAID 10 or 1+0 (Nested) in Linux +- Part 7: Growing an Existing RAID Array and Removing Failed Disks in Raid +- Part 8: Recovering (Rebuilding) failed drives in RAID +- Part 9: Managing RAID in Linux + +This is the Part 1 of a 9-tutorial series, here we will cover the introduction of RAID, Concepts of RAID and RAID Levels that are required for the setting up RAID in Linux. + +### Software RAID and Hardware RAID ### + +Software RAID have low performance, because of consuming resource from hosts. Raid software need to load for read data from software raid volumes. Before loading raid software, OS need to get boot to load the raid software. No need of Physical hardware in software raids. Zero cost investment. + +Hardware RAID have high performance. They are dedicated RAID Controller which is Physically built using PCI express cards. It won’t use the host resource. They have NVRAM for cache to read and write. Stores cache while rebuild even if there is power-failure, it will store the cache using battery power backups. Very costly investments needed for a large scale. + +Hardware RAID Card will look like below: + +![Hardware RAID](http://www.tecmint.com/wp-content/uploads/2014/10/Hardware-RAID.jpg) + +Hardware RAID + +#### Featured Concepts of RAID #### + +- Parity method in raid regenerate the lost content from parity saved information’s. RAID 5, RAID 6 Based on Parity. +- Stripe is sharing data randomly to multiple disk. This won’t have full data in a single disk. If we use 3 disks half of our data will be in each disks. +- Mirroring is used in RAID 1 and RAID 10. Mirroring is making a copy of same data. In RAID 1 it will save the same content to the other disk too. +- Hot spare is just a spare drive in our server which can automatically replace the failed drives. If any one of the drive failed in our array this hot spare drive will be used and rebuild automatically. +- Chunks are just a size of data which can be minimum from 4KB and more. By defining chunk size we can increase the I/O performance. + +RAID’s are in various Levels. Here we will see only the RAID Levels which is used mostly in real environment. + +- RAID0 = Striping +- RAID1 = Mirroring +- RAID5 = Single Disk Distributed Parity +- RAID6 = Double Disk Distributed Parity +- RAID10 = Combine of Mirror & Stripe. (Nested RAID) + +RAID are managed using mdadm package in most of the Linux distributions. Let us get a Brief look into each RAID Levels. + +#### RAID 0 (or) Striping #### + +Striping have a excellent performance. In Raid 0 (Striping) the data will be written to disk using shared method. Half of the content will be in one disk and another half will be written to other disk. + +Let us assume we have 2 Disk drives, for example, if we write data “TECMINT” to logical volume it will be saved as ‘T‘ will be saved in first disk and ‘E‘ will be saved in Second disk and ‘C‘ will be saved in First disk and again ‘M‘ will be saved in Second disk and it continues in round-robin process. + +In this situation if any one of the drive fails we will loose our data, because with half of data from one of the disk can’t use to rebuilt the raid. But while comparing to Write Speed and performance RAID 0 is Excellent. We need at least minimum 2 disks to create a RAID 0 (Striping). If you need your valuable data don’t use this RAID LEVEL. + +- High Performance. +- There is Zero Capacity Loss in RAID 0 +- Zero Fault Tolerance. +- Write and Reading will be good performance. + +#### RAID 1 (or) Mirroring #### + +Mirroring have a good performance. Mirroring can make a copy of same data what we have. Assuming we have two numbers of 2TB Hard drives, total there we have 4TB, but in mirroring while the drives are behind the RAID Controller to form a Logical drive Only we can see the 2TB of logical drive. + +While we save any data, it will write to both 2TB Drives. Minimum two drives are needed to create a RAID 1 or Mirror. If a disk failure occurred we can reproduce the raid set by replacing a new disk. If any one of the disk fails in RAID 1, we can get the data from other one as there was a copy of same content in the other disk. So there is zero data loss. + +- Good Performance. +- Here Half of the Space will be lost in total capacity. +- Full Fault Tolerance. +- Rebuilt will be faster. +- Writing Performance will be slow. +- Reading will be good. +- Can be used for operating systems and database for small scale. + +#### RAID 5 (or) Distributed Parity #### + +RAID 5 is mostly used in enterprise levels. RAID 5 work by distributed parity method. Parity info will be used to rebuild the data. It rebuilds from the information left on the remaining good drives. This will protect our data from drive failure. + +Assume we have 4 drives, if one drive fails and while we replace the failed drive we can rebuild the replaced drive from parity informations. Parity information’s are Stored in all 4 drives, if we have 4 numbers of 1TB hard-drive. The parity information will be stored in 256GB in each drivers and other 768GB in each drives will be defined for Users. RAID 5 can be survive from a single Drive failure, If drives fails more than 1 will cause loss of data’s. + +- Excellent Performance +- Reading will be extremely very good in speed. +- Writing will be Average, slow if we won’t use a Hardware RAID Controller. +- Rebuild from Parity information from all drives. +- Full Fault Tolerance. +- 1 Disk Space will be under Parity. +- Can be used in file servers, web servers, very important backups. + +#### RAID 6 Two Parity Distributed Disk #### + +RAID 6 is same as RAID 5 with two parity distributed system. Mostly used in a large number of arrays. We need minimum 4 Drives, even if there 2 Drive fails we can rebuild the data while replacing new drives. + +Very slower than RAID 5, because it writes data to all 4 drivers at same time. Will be average in speed while we using a Hardware RAID Controller. If we have 6 numbers of 1TB hard-drives 4 drives will be used for data and 2 drives will be used for Parity. + +- Poor Performance. +- Read Performance will be good. +- Write Performance will be Poor if we not using a Hardware RAID Controller. +- Rebuild from 2 Parity Drives. +- Full Fault tolerance. +- 2 Disks space will be under Parity. +- Can be Used in Large Arrays. +- Can be use in backup purpose, video streaming, used in large scale. + +#### RAID 10 (or) Mirror & Stripe #### + +RAID 10 can be called as 1+0 or 0+1. This will do both works of Mirror & Striping. Mirror will be first and stripe will be the second in RAID 10. Stripe will be the first and mirror will be the second in RAID 01. RAID 10 is better comparing to 01. + +Assume, we have 4 Number of drives. While I’m writing some data to my logical volume it will be saved under All 4 drives using mirror and stripe methods. + +If I’m writing a data “TECMINT” in RAID 10 it will save the data as follow. First “T” will write to both disks and second “E” will write to both disk, this step will be used for all data write. It will make a copy of every data to other disk too. + +Same time it will use the RAID 0 method and write data as follow “T” will write to first disk and “E” will write to second disk. Again “C” will write to first Disk and “M” to second disk. + +- Good read and write performance. +- Here Half of the Space will be lost in total capacity. +- Fault Tolerance. +- Fast rebuild from copying data. +- Can be used in Database storage for high performance and availability. + +### Conclusion ### + +In this article we have seen what is RAID and which levels are mostly used in RAID in real environment. Hope you have learned the write-up about RAID. For RAID setup one must know about the basic Knowledge about RAID. The above content will fulfil basic understanding about RAID. + +In the next upcoming articles I’m going to cover how to setup and create a RAID using Various Levels, Growing a RAID Group (Array) and Troubleshooting with failed Drives and much more. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/understanding-raid-setup-in-linux/ + +作者:[Babin Lonston][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/babinlonston/ \ No newline at end of file diff --git a/sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md b/sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md new file mode 100644 index 0000000000..e3bcf09799 --- /dev/null +++ b/sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md @@ -0,0 +1,218 @@ +Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2 +================================================================================ +RAID is Redundant Array of Inexpensive disks, used for high availability and reliability in large scale environments, where data need to be protected than normal use. Raid is just a collection of disks in a pool to become a logical volume and contains an array. A combine drivers makes an array or called as set of (group). + +RAID can be created, if there are minimum 2 number of disk connected to a raid controller and make a logical volume or more drives can be added in an array according to defined RAID Levels. Software Raid are available without using Physical hardware those are called as software raid. Software Raid will be named as Poor man raid. + +![Setup RAID0 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Raid0-in-Linux.jpg) + +Setup RAID0 in Linux + +Main concept of using RAID is to save data from Single point of failure, means if we using a single disk to store the data and if it’s failed, then there is no chance of getting our data back, to stop the data loss we need a fault tolerance method. So, that we can use some collection of disk to form a RAID set. + +#### What is Stripe in RAID 0? #### + +Stripe is striping data across multiple disk at the same time by dividing the contents. Assume we have two disks and if we save content to logical volume it will be saved under both two physical disks by dividing the content. For better performance RAID 0 will be used, but we can’t get the data if one of the drive fails. So, it isn’t a good practice to use RAID 0. The only solution is to install operating system with RAID0 applied logical volumes to safe your important files. + +- RAID 0 has High Performance. +- Zero Capacity Loss in RAID 0. No Space will be wasted. +- Zero Fault Tolerance ( Can’t get back the data if any one of disk fails). +- Write and Reading will be Excellent. + +#### Requirements #### + +Minimum number of disks are allowed to create RAID 0 is 2, but you can add more disk but the order should be twice as 2, 4, 6, 8. If you have a Physical RAID card with enough ports, you can add more disks. + +Here we are not using a Hardware raid, this setup depends only on Software RAID. If we have a physical hardware raid card we can access it from it’s utility UI. Some motherboard by default in-build with RAID feature, there UI can be accessed using Ctrl+I keys. + +If you’re new to RAID setups, please read our earlier article, where we’ve covered some basic introduction of about RAID. + +- [Introduction to RAID and RAID Concepts][1] + +**My Server Setup** + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.225 + Two Disks : 20 GB each + +This article is Part 2 of a 9-tutorial RAID series, here in this part, we are going to see how we can create and setup Software RAID0 or striping in Linux systems or servers using two 20GB disks named sdb and sdc. + +### Step 1: Updating System and Installing mdadm for Managing RAID ### + +1. Before setting up RAID0 in Linux, let’s do a system update and then install ‘mdadm‘ package. The mdadm is a small program, which will allow us to configure and manage RAID devices in Linux. + + # yum clean all && yum update + # yum install mdadm -y + +![install mdadm in linux](http://www.tecmint.com/wp-content/uploads/2014/10/install-mdadm-in-linux.png) + +Install mdadm Tool + +### Step 2: Verify Attached Two 20GB Drives ### + +2. Before creating RAID 0, make sure to verify that the attached two hard drives are detected or not, using the following command. + + # ls -l /dev | grep sd + +![Check Hard Drives in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Hard-Drives.png) + +Check Hard Drives + +3. Once the new hard drives detected, it’s time to check whether the attached drives are already using any existing raid with the help of following ‘mdadm’ command. + + # mdadm --examine /dev/sd[b-c] + +![Check RAID Devices in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Drives-using-RAID.png) + +Check RAID Devices + +In the above output, we come to know that none of the RAID have been applied to these two sdb and sdc drives. + +### Step 3: Creating Partitions for RAID ### + +4. Now create sdb and sdc partitions for raid, with the help of following fdisk command. Here, I will show how to create partition on sdb drive. + + # fdisk /dev/sdb + +Follow below instructions for creating partitions. + +- Press ‘n‘ for creating new partition. +- Then choose ‘P‘ for Primary partition. +- Next select the partition number as 1. +- Give the default value by just pressing two times Enter key. +- Next press ‘P‘ to print the defined partition. + +![Create Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Partitions-in-Linux.png) + +Create Partitions + +Follow below instructions for creating Linux raid auto on partitions. + +- Press ‘L‘ to list all available types. +- Type ‘t‘to choose the partitions. +- Choose ‘fd‘ for Linux raid auto and press Enter to apply. +- Then again use ‘P‘ to print the changes what we have made. +- Use ‘w‘ to write the changes. + +![Create RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Partitions.png) + +Create RAID Partitions in Linux + +**Note**: Please follow same above instructions to create partition on sdc drive now. + +5. After creating partitions, verify both the drivers are correctly defined for RAID using following command. + + # mdadm --examine /dev/sd[b-c] + # mdadm --examine /dev/sd[b-c]1 + +![Verify RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Partitions.png) + +Verify RAID Partitions + +### Step 4: Creating RAID md Devices ### + +6. Now create md device (i.e. /dev/md0) and apply raid level using below command. + + # mdadm -C /dev/md0 -l raid0 -n 2 /dev/sd[b-c]1 + # mdadm --create /dev/md0 --level=stripe --raid-devices=2 /dev/sd[b-c]1 + +- -C – create +- -l – level +- -n – No of raid-devices + +7. Once md device has been created, now verify the status of RAID Level, Devices and Array used, with the help of following series of commands as shown. + + # cat /proc/mdstat + +![Verify RAID Level](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Level.png) + +Verify RAID Level + + # mdadm -E /dev/sd[b-c]1 + +![Verify RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Device.png) + +Verify RAID Device + + # mdadm --detail /dev/md0 + +![Verify RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Array.png) + +Verify RAID Array + +### Step 5: Assiging RAID Devices to Filesystem ### + +8. Create a ext4 filesystem for a RAID device /dev/md0 and mount it under /dev/raid0. + + # mkfs.ext4 /dev/md0 + +![Create ext4 Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystem.png) + +Create ext4 Filesystem + +9. Once ext4 filesystem has been created for Raid device, now create a mount point directory (i.e. /mnt/raid0) and mount the device /dev/md0 under it. + + # mkdir /mnt/raid0 + # mount /dev/md0 /mnt/raid0/ + +10. Next, verify that the device /dev/md0 is mounted under /mnt/raid0 directory using df command. + + # df -h + +11. Next, create a file called ‘tecmint.txt‘ under the mount point /mnt/raid0, add some content to the created file and view the content of a file and directory. + + # touch /mnt/raid0/tecmint.txt + # echo "Hi everyone how you doing ?" > /mnt/raid0/tecmint.txt + # cat /mnt/raid0/tecmint.txt + # ls -l /mnt/raid0/ + +![Verify Mount Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Mount-Device.png) + +Verify Mount Device + +12. Once you’ve verified mount points, it’s time to create an fstab entry in /etc/fstab file. + + # vim /etc/fstab + +Add the following entry as described. May vary according to your mount location and filesystem you using. + + /dev/md0 /mnt/raid0 ext4 deaults 0 0 + +![Add Device to Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Add-Device-to-Fstab.png) + +Add Device to Fstab + +13. Run mount ‘-a‘ to check if there is any error in fstab entry. + + # mount -av + +![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-Fstab.png) + +Check Errors in Fstab + +### Step 6: Saving RAID Configurations ### + +14. Finally, save the raid configuration to one of the file to keep the configurations for future use. Again we use ‘mdadm’ command with ‘-s‘ (scan) and ‘-v‘ (verbose) options as shown. + + # mdadm -E -s -v >> /etc/mdadm.conf + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + # cat /etc/mdadm.conf + +![Save RAID Configurations](http://www.tecmint.com/wp-content/uploads/2014/10/Save-RAID-Configurations.png) + +Save RAID Configurations + +That’s it, we have seen here, how to configure RAID0 striping with raid levels by using two hard disks. In next article, we will see how to setup RAID5. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid0-in-linux/ + +作者:[Babin Lonston][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/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ \ No newline at end of file diff --git a/sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md b/sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md new file mode 100644 index 0000000000..927a8c49f1 --- /dev/null +++ b/sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md @@ -0,0 +1,212 @@ +Setting up RAID 1 (Mirroring) using ‘Two Disks’ in Linux – Part 3 +================================================================================ +RAID Mirroring means an exact clone (or mirror) of the same data writing to two drives. A minimum two number of disks are more required in an array to create RAID1 and it’s useful only, when read performance or reliability is more precise than the data storage capacity. + +![Create Raid1 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID1-in-Linux.jpeg) + +Setup Raid1 in Linux + +Mirrors are created to protect against data loss due to disk failure. Each disk in a mirror involves an exact copy of the data. When one disk fails, the same data can be retrieved from other functioning disk. However, the failed drive can be replaced from the running computer without any user interruption. + +### Features of RAID 1 ### + +- Mirror has Good Performance. +- 50% of space will be lost. Means if we have two disk with 500GB size total, it will be 1TB but in Mirroring it will only show us 500GB. +- No data loss in Mirroring if one disk fails, because we have the same content in both disks. +- Reading will be good than writing data to drive. + +#### Requirements #### + +Minimum Two number of disks are allowed to create RAID 1, but you can add more disks by using twice as 2, 4, 6, 8. To add more disks, your system must have a RAID physical adapter (hardware card). + +Here we’re using software raid not a Hardware raid, if your system has an inbuilt physical hardware raid card you can access it from it’s utility UI or using Ctrl+I key. + +Read Also: [Basic Concepts of RAID in Linux][1] + +#### My Server Setup #### + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.226 + Hostname : rd1.tecmintlocal.com + Disk 1 [20GB] : /dev/sdb + Disk 2 [20GB] : /dev/sdc + +This article will guide you through a step-by-step instructions on how to setup a software RAID 1 or Mirror using mdadm (creates and manages raid) on Linux Platform. Although the same instructions also works on other Linux distributions such as RedHat, CentOS, Fedora, etc. + +### Step 1: Installing Prerequisites and Examine Drives ### + +1. As I said above, we’re using mdadm utility for creating and managing RAID in Linux. So, let’s install the mdadm software package on Linux using yum or apt-get package manager tool. + + # yum install mdadm [on RedHat systems] + # apt-get install mdadm [on Debain systems] + +2. Once ‘mdadm‘ package has been installed, we need to examine our disk drives whether there is already any raid configured using the following command. + + # mdadm -E /dev/sd[b-c] + +![Check RAID on Disks](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-on-Disks.png) + +Check RAID on Disks + +As you see from the above screen, that there is no any super-block detected yet, means no RAID defined. + +### Step 2: Drive Partitioning for RAID ### + +3. As I mentioned above, that we’re using minimum two partitions /dev/sdb and /dev/sdc for creating RAID1. Let’s create partitions on these two drives using ‘fdisk‘ command and change the type to raid during partition creation. + + # fdisk /dev/sdb + +Follow the below instructions + +- Press ‘n‘ for creating new partition. +- Then choose ‘P‘ for Primary partition. +- Next select the partition number as 1. +- Give the default full size by just pressing two times Enter key. +- Next press ‘p‘ to print the defined partition. +- Press ‘L‘ to list all available types. +- Type ‘t‘to choose the partitions. +- Choose ‘fd‘ for Linux raid auto and press Enter to apply. +- Then again use ‘p‘ to print the changes what we have made. +- Use ‘w‘ to write the changes. + +![Create Disk Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Disk-Partitions.png) + +Create Disk Partitions + +After ‘/dev/sdb‘ partition has been created, next follow the same instructions to create new partition on /dev/sdc drive. + + # fdisk /dev/sdc + +![Create Second Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Second-Partitions.png) + +Create Second Partitions + +4. Once both the partitions are created successfully, verify the changes on both sdb & sdc drive using the same ‘mdadm‘ command and also confirm the RAID type as shown in the following screen grabs. + + # mdadm -E /dev/sd[b-c] + +![Verify Partitions Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Partitions-Changes.png) + +Verify Partitions Changes + +![Check RAID Type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Type.png) + +Check RAID Type + +**Note**: As you see in the above picture, there is no any defined RAID on the sdb1 and sdc1 drives so far, that’s the reason we are getting as no super-blocks detected. + +### Step 3: Creating RAID1 Devices ### + +5. Next create RAID1 Device called ‘/dev/md0‘ using the following command and verity it. + + # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[b-c]1 + # cat /proc/mdstat + +![Create RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device.png) + +Create RAID Device + +6. Next check the raid devices type and raid array using following commands. + + # mdadm -E /dev/sd[b-c]1 + # mdadm --detail /dev/md0 + +![Check RAID Device type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-type.png) + +Check RAID Device type + +![Check RAID Device Array](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-Array.png) + +Check RAID Device Array + +From the above pictures, one can easily understand that raid1 have been created and using /dev/sdb1 and /dev/sdc1 partitions and also you can see the status as resyncing. + +### Step 4: Creating File System on RAID Device ### + +7. Create file system using ext4 for md0 and mount under /mnt/raid1. + + # mkfs.ext4 /dev/md0 + +![Create RAID Device Filesystem](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device-Filesystem.png) + +Create RAID Device Filesystem + +8. Next, mount the newly created filesystem under ‘/mnt/raid1‘ and create some files and verify the contents under mount point. + + # mkdir /mnt/raid1 + # mount /dev/md0 /mnt/raid1/ + # touch /mnt/raid1/tecmint.txt + # echo "tecmint raid setups" > /mnt/raid1/tecmint.txt + +![Mount Raid Device](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-RAID-Device.png) + +Mount Raid Device + +9. To auto-mount RAID1 on system reboot, you need to make an entry in fstab file. Open ‘/etc/fstab‘ file and add the following line at the bottom of the file. + + /dev/md0 /mnt/raid1 ext4 defaults 0 0 + +![Raid Automount Device](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Automount-Filesystem.png) + +Raid Automount Device + +10. Run ‘mount -a‘ to check whether there are any errors in fstab entry. + + # mount -av + +![Check Errors in fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-fstab.png) + +Check Errors in fstab + +11. Next, save the raid configuration manually to ‘mdadm.conf‘ file using the below command. + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +![Save Raid Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Raid-Configuration.png) + +Save Raid Configuration + +The above configuration file is read by the system at the reboots and load the RAID devices. + +### Step 5: Verify Data After Disk Failure ### + +12. Our main purpose is, even after any of hard disk fail or crash our data needs to be available. Let’s see what will happen when any of disk disk is unavailable in array. + + # mdadm --detail /dev/md0 + +![Raid Device Verify](http://www.tecmint.com/wp-content/uploads/2014/10/Raid-Device-Verify.png) + +Raid Device Verify + +In the above image, we can see there are 2 devices available in our RAID and Active Devices are 2. Now let us see what will happen when a disk plugged out (removed sdc disk) or fails. + + # ls -l /dev | grep sd + # mdadm --detail /dev/md0 + +![Test RAID Devices](http://www.tecmint.com/wp-content/uploads/2014/10/Test-RAID-Devices.png) + +Test RAID Devices + +Now in the above image, you can see that one of our drive is lost. I unplugged one of the drive from my Virtual machine. Now let us check our precious data. + + # cd /mnt/raid1/ + # cat tecmint.txt + +![Verify RAID Data](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Data.png) + +Verify RAID Data + +Did you see our data is still available. From this we come to know the advantage of RAID 1 (mirror). In next article, we will see how to setup a RAID 5 striping with distributed Parity. Hope this helps you to understand how the RAID 1 (Mirror) Works. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid1-in-linux/ + +作者:[Babin Lonston][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/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ \ No newline at end of file diff --git a/sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md b/sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md new file mode 100644 index 0000000000..acd284045f --- /dev/null +++ b/sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md @@ -0,0 +1,285 @@ +Creating RAID 5 (Striping with Distributed Parity) in Linux – Part 4 +================================================================================ +In RAID 5, data strips across multiple drives with distributed parity. The striping with distributed parity means it will split the parity information and stripe data over the multiple disks, which will have good data redundancy. + +![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/setup-raid-5-in-linux.jpg) + +Setup Raid 5 in Linux + +For RAID Level it should have at least three hard drives or more. RAID 5 are being used in the large scale production environment where it’s cost effective and provide performance as well as redundancy. + +#### What is Parity? #### + +Parity is a simplest common method of detecting errors in data storage. Parity stores information in each disks, Let’s say we have 4 disks, in 4 disks one disk space will be split to all disks to store the parity information’s. If any one of the disks fails still we can get the data by rebuilding from parity information after replacing the failed disk. + +#### Pros and Cons of RAID 5 #### + +- Gives better performance +- Support Redundancy and Fault tolerance. +- Support hot spare options. +- Will loose a single disk capacity for using parity information. +- No data loss if a single disk fails. We can rebuilt from parity after replacing the failed disk. +- Suits for transaction oriented environment as the reading will be faster. +- Due to parity overhead, writing will be slow. +- Rebuild takes long time. + +#### Requirements #### + +Minimum 3 hard drives are required to create Raid 5, but you can add more disks, only if you’ve a dedicated hardware raid controller with multi ports. Here, we are using software RAID and ‘mdadm‘ package to create raid. + +mdadm is a package which allow us to configure and manage RAID devices in Linux. By default there is no configuration file is available for RAID, we must save the configuration file after creating and configuring RAID setup in separate file called mdadm.conf. + +Before moving further, I suggest you to go through the following articles for understanding the basics of RAID in Linux. + +- [Basic Concepts of RAID in Linux – Part 1][1] +- [Creating RAID 0 (Stripe) in Linux – Part 2][2] +- [Setting up RAID 1 (Mirroring) in Linux – Part 3][3] + +#### My Server Setup #### + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.227 + Hostname : rd5.tecmintlocal.com + Disk 1 [20GB] : /dev/sdb + Disk 2 [20GB] : /dev/sdc + Disk 3 [20GB] : /dev/sdd + +This article is a Part 4 of a 9-tutorial RAID series, here we are going to setup a software RAID 5 with distributed parity in Linux systems or servers using three 20GB disks named /dev/sdb, /dev/sdc and /dev/sdd. + +### Step 1: Installing mdadm and Verify Drives ### + +1. As we said earlier, that we’re using CentOS 6.5 Final release for this raid setup, but same steps can be followed for RAID setup in any Linux based distributions. + + # lsb_release -a + # ifconfig | grep inet + +![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/CentOS-6.5-Summary.png) + +CentOS 6.5 Summary + +2. If you’re following our raid series, we assume that you’ve already installed ‘mdadm‘ package, if not, use the following command according to your Linux distribution to install the package. + + # yum install mdadm [on RedHat systems] + # apt-get install mdadm [on Debain systems] + +3. After the ‘mdadm‘ package installation, let’s list the three 20GB disks which we have added in our system using ‘fdisk‘ command. + + # fdisk -l | grep sd + +![Install mdadm Tool in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/Install-mdadm-Tool.png) + +Install mdadm Tool + +4. Now it’s time to examine the attached three drives for any existing RAID blocks on these drives using following command. + + # mdadm -E /dev/sd[b-d] + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd + +![Examine Drives For Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Examine-Drives-For-Raid.png) + +Examine Drives For Raid + +**Note**: From the above image illustrated that there is no any super-block detected yet. So, there is no RAID defined in all three drives. Let us start to create one now. + +### Step 2: Partitioning the Disks for RAID ### + +5. First and foremost, we have to partition the disks (/dev/sdb, /dev/sdc and /dev/sdd) before adding to a RAID, So let us define the partition using ‘fdisk’ command, before forwarding to the next steps. + + # fdisk /dev/sdb + # fdisk /dev/sdc + # fdisk /dev/sdd + +#### Create /dev/sdb Partition #### + +Please follow the below instructions to create partition on /dev/sdb drive. + +- Press ‘n‘ for creating new partition. +- Then choose ‘P‘ for Primary partition. Here we are choosing Primary because there is no partitions defined yet. +- Then choose ‘1‘ to be the first partition. By default it will be 1. +- Here for cylinder size we don’t have to choose the specified size because we need the whole partition for RAID so just Press Enter two times to choose the default full size. +- Next press ‘p‘ to print the created partition. +- Change the Type, If we need to know the every available types Press ‘L‘. +- Here, we are selecting ‘fd‘ as my type is RAID. +- Next press ‘p‘ to print the defined partition. +- Then again use ‘p‘ to print the changes what we have made. +- Use ‘w‘ to write the changes. + +![Create sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdb-Partition1.png) + +Create sdb Partition + +**Note**: We have to follow the steps mentioned above to create partitions for sdc & sdd drives too. + +#### Create /dev/sdc Partition #### + +Now partition the sdc and sdd drives by following the steps given in the screenshot or you can follow above steps. + + # fdisk /dev/sdc + +![Create sdc Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdc-Partition1.png) + +Create sdc Partition + +#### Create /dev/sdd Partition #### + + # fdisk /dev/sdd + +![Create sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdd-Partition1.png) + +Create sdd Partition + +6. After creating partitions, check for changes in all three drives sdb, sdc, & sdd. + + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd + + or + + # mdadm -E /dev/sd[b-c] + +![Check Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Changes-on-Partitions.png) + +Check Partition Changes + +**Note**: In the above pic. depict the type is fd i.e. for RAID. + +7. Now Check for the RAID blocks in newly created partitions. If no super-blocks detected, than we can move forward to create a new RAID 5 setup on these drives. + +![Check Raid on Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-Partitions.png) + +Check Raid on Partition + +### Step 3: Creating md device md0 ### + +8. Now create a Raid device ‘md0‘ (i.e. /dev/md0) and include raid level on all newly created partitions (sdb1, sdc1 and sdd1) using below command. + + # mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 + + or + + # mdadm -C /dev/md0 -l=5 -n=3 /dev/sd[b-d]1 + +9. After creating raid device, check and verify the RAID, devices included and RAID Level from the mdstat output. + + # cat /proc/mdstat + +![Verify Raid Device](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Device.png) + +Verify Raid Device + +If you want to monitor the current building process, you can use ‘watch‘ command, just pass through the ‘cat /proc/mdstat‘ with watch command which will refresh screen every 1 second. + + # watch -n1 cat /proc/mdstat + +![Monitor Raid Process](http://www.tecmint.com/wp-content/uploads/2014/11/Monitor-Raid-Process.png) + +Monitor Raid 5 Process + +![Raid 5 Process Summary](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Process-Summary.png) + +Raid 5 Process Summary + +10. After creation of raid, Verify the raid devices using the following command. + + # mdadm -E /dev/sd[b-d]1 + +![Verify Raid Level](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Level.png) + +Verify Raid Level + +**Note**: The Output of the above command will be little long as it prints the information of all three drives. + +11. Next, verify the RAID array to assume that the devices which we’ve included in the RAID level are running and started to re-sync. + + # mdadm --detail /dev/md0 + +![Verify Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Array.png) + +Verify Raid Array + +### Step 4: Creating file system for md0 ### + +12. Create a file system for ‘md0‘ device using ext4 before mounting. + + # mkfs.ext4 /dev/md0 + +![Create md0 Filesystem](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md0-Filesystem.png) + +Create md0 Filesystem + +13. Now create a directory under ‘/mnt‘ then mount the created filesystem under /mnt/raid5 and check the files under mount point, you will see lost+found directory. + + # mkdir /mnt/raid5 + # mount /dev/md0 /mnt/raid5/ + # ls -l /mnt/raid5/ + +14. Create few files under mount point /mnt/raid5 and append some text in any one of the file to verify the content. + + # touch /mnt/raid5/raid5_tecmint_{1..5} + # ls -l /mnt/raid5/ + # echo "tecmint raid setups" > /mnt/raid5/raid5_tecmint_1 + # cat /mnt/raid5/raid5_tecmint_1 + # cat /proc/mdstat + +![Mount Raid 5 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Mount-Raid-Device.png) + +Mount Raid Device + +15. We need to add entry in fstab, else will not display our mount point after system reboot. To add an entry, we should edit the fstab file and append the following line as shown below. The mount point will differ according to your environment. + + # vim /etc/fstab + + /dev/md0 /mnt/raid5 ext4 defaults 0 0 + +![Raid 5 Automount](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Device-Automount.png) + +Raid 5 Automount + +16. Next, run ‘mount -av‘ command to check whether any errors in fstab entry. + + # mount -av + +![Check Fstab Errors](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Fstab-Errors.png) + +Check Fstab Errors + +### Step 5: Save Raid 5 Configuration ### + +17. As mentioned earlier in requirement section, by default RAID don’t have a config file. We have to save it manually. If this step is not followed RAID device will not be in md0, it will be in some other random number. + +So, we must have to save the configuration before system reboot. If the configuration is saved it will be loaded to the kernel during the system reboot and RAID will also gets loaded. + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +![Save Raid 5 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Save-Raid-5-Configuration.png) + +Save Raid 5 Configuration + +Note: Saving the configuration will keep the RAID level stable in md0 device. + +### Step 6: Adding Spare Drives ### + +18. What the use of adding a spare drive? its very useful if we have a spare drive, if any one of the disk fails in our array, this spare drive will get active and rebuild the process and sync the data from other disk, so we can see a redundancy here. + +For more instructions on how to add spare drive and check Raid 5 fault tolerance, read #Step 6 and #Step 7 in the following article. + +- [Add Spare Drive to Raid 5 Setup][4] + +### Conclusion ### + +Here, in this article, we have seen how to setup a RAID 5 using three number of disks. Later in my upcoming articles, we will see how to troubleshoot when a disk fails in RAID 5 and how to replace for recovery. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid-5-in-linux/ + +作者:[Babin Lonston][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/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/create-raid0-in-linux/ +[3]:http://www.tecmint.com/create-raid1-in-linux/ +[4]:http://www.tecmint.com/create-raid-6-in-linux/ \ No newline at end of file diff --git a/sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md b/sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md new file mode 100644 index 0000000000..2ad6a33227 --- /dev/null +++ b/sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md @@ -0,0 +1,320 @@ +Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux – Part 5 +================================================================================ +RAID 6 is upgraded version of RAID 5, where it has two distributed parity which provides fault tolerance even after two drives fails. Mission critical system still operational incase of two concurrent disks failures. It’s alike RAID 5, but provides more robust, because it uses one more disk for parity. + +In our earlier article, we’ve seen distributed parity in RAID 5, but in this article we will going to see RAID 6 with double distributed parity. Don’t expect extra performance than any other RAID, if so we have to install a dedicated RAID Controller too. Here in RAID 6 even if we loose our 2 disks we can get the data back by replacing a spare drive and build it from parity. + +![Setup RAID 6 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/Setup-RAID-6-in-Linux.jpg) + +Setup RAID 6 in Linux + +To setup a RAID 6, minimum 4 numbers of disks or more in a set are required. RAID 6 have multiple disks even in some set it may be have some bunch of disks, while reading, it will read from all the drives, so reading would be faster whereas writing would be poor because it has to stripe over multiple disks. + +Now, many of us comes to conclusion, why we need to use RAID 6, when it doesn’t perform like any other RAID. Hmm… those who raise this question need to know that, if they need high fault tolerance choose RAID 6. In every higher environments with high availability for database, they use RAID 6 because database is the most important and need to be safe in any cost, also it can be useful for video streaming environments. + +#### Pros and Cons of RAID 6 #### + +- Performance are good. +- RAID 6 is expensive, as it requires two independent drives are used for parity functions. +- Will loose a two disks capacity for using parity information (double parity). +- No data loss, even after two disk fails. We can rebuilt from parity after replacing the failed disk. +- Reading will be better than RAID 5, because it reads from multiple disk, But writing performance will be very poor without dedicated RAID Controller. + +#### Requirements #### + +Minimum 4 numbers of disks are required to create a RAID 6. If you want to add more disks, you can, but you must have dedicated raid controller. In software RAID, we will won’t get better performance in RAID 6. So we need a physical RAID controller. + +Those who are new to RAID setup, we recommend to go through RAID articles below. + +- [Basic Concepts of RAID in Linux – Part 1][1] +- [Creating Software RAID 0 (Stripe) in Linux – Part 2][2] +- [Setting up RAID 1 (Mirroring) in Linux – Part 3][3] + +#### My Server Setup #### + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.228 + Hostname : rd6.tecmintlocal.com + Disk 1 [20GB] : /dev/sdb + Disk 2 [20GB] : /dev/sdc + Disk 3 [20GB] : /dev/sdd + Disk 4 [20GB] : /dev/sde + +This article is a Part 5 of a 9-tutorial RAID series, here we are going to see how we can create and setup Software RAID 6 or Striping with Double Distributed Parity in Linux systems or servers using four 20GB disks named /dev/sdb, /dev/sdc, /dev/sdd and /dev/sde. + +### Step 1: Installing mdadm Tool and Examine Drives ### + +1. If you’re following our last two Raid articles (Part 2 and Part 3), where we’ve already shown how to install ‘mdadm‘ tool. If you’re new to this article, let me explain that ‘mdadm‘ is a tool to create and manage Raid in Linux systems, let’s install the tool using following command according to your Linux distribution. + + # yum install mdadm [on RedHat systems] + # apt-get install mdadm [on Debain systems] + +2. After installing the tool, now it’s time to verify the attached four drives that we are going to use for raid creation using the following ‘fdisk‘ command. + + # fdisk -l | grep sd + +![Check Hard Disk in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Linux-Disks.png) + +Check Disks in Linux + +3. Before creating a RAID drives, always examine our disk drives whether there is any RAID is already created on the disks. + + # mdadm -E /dev/sd[b-e] + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde + +![Check Raid on Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Disk-Raid.png) + +Check Raid on Disk + +**Note**: In the above image depicts that there is no any super-block detected or no RAID is defined in four disk drives. We may move further to start creating RAID 6. + +### Step 2: Drive Partitioning for RAID 6 ### + +4. Now create partitions for raid on ‘/dev/sdb‘, ‘/dev/sdc‘, ‘/dev/sdd‘ and ‘/dev/sde‘ with the help of following fdisk command. Here, we will show how to create partition on sdb drive and later same steps to be followed for rest of the drives. + +**Create /dev/sdb Partition** + + # fdisk /dev/sdb + +Please follow the instructions as shown below for creating partition. + +- Press ‘n‘ for creating new partition. +- Then choose ‘P‘ for Primary partition. +- Next choose the partition number as 1. +- Define the default value by just pressing two times Enter key. +- Next press ‘P‘ to print the defined partition. +- Press ‘L‘ to list all available types. +- Type ‘t‘ to choose the partitions. +- Choose ‘fd‘ for Linux raid auto and press Enter to apply. +- Then again use ‘P‘ to print the changes what we have made. +- Use ‘w‘ to write the changes. + +![Create sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdb-Partition.png) + +Create /dev/sdb Partition + +**Create /dev/sdb Partition** + + # fdisk /dev/sdc + +![Create sdc Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdc-Partition.png) + +Create /dev/sdc Partition + +**Create /dev/sdd Partition** + + # fdisk /dev/sdd + +![Create sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdd-Partition.png) + +Create /dev/sdd Partition + +**Create /dev/sde Partition** + + # fdisk /dev/sde + +![Create sde Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sde-Partition.png) + +Create /dev/sde Partition + +5. After creating partitions, it’s always good habit to examine the drives for super-blocks. If super-blocks does not exist than we can go head to create a new RAID setup. + + # mdadm -E /dev/sd[b-e]1 + + + or + + # mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 + +![Check Raid on New Partitions](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-New-Partitions.png) + +Check Raid on New Partitions + +### Step 3: Creating md device (RAID) ### + +6. Now it’s time to create Raid device ‘md0‘ (i.e. /dev/md0) and apply raid level on all newly created partitions and confirm the raid using following commands. + + # mdadm --create /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 + # cat /proc/mdstat + +![Create Raid 6 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Create-Raid-6-Device.png) + +Create Raid 6 Device + +7. You can also check the current process of raid using watch command as shown in the screen grab below. + + # watch -n1 cat /proc/mdstat + +![Check Raid 6 Process](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Process.png) + +Check Raid 6 Process + +8. Verify the raid devices using the following command. + +# mdadm -E /dev/sd[b-e]1 + +**Note**:: The above command will be display the information of the four disks, which is quite long so not possible to post the output or screen grab here. + +9. Next, verify the RAID array to confirm that the re-syncing is started. + + # mdadm --detail /dev/md0 + +![Check Raid 6 Array](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Array.png) + +Check Raid 6 Array + +### Step 4: Creating FileSystem on Raid Device ### + +10. Create a filesystem using ext4 for ‘/dev/md0‘ and mount it under /mnt/raid5. Here we’ve used ext4, but you can use any type of filesystem as per your choice. + + # mkfs.ext4 /dev/md0 + +![Create File System on Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Create-File-System-on-Raid.png) + +Create File System on Raid 6 + +11. Mount the created filesystem under /mnt/raid6 and verify the files under mount point, we can see lost+found directory. + + # mkdir /mnt/raid6 + # mount /dev/md0 /mnt/raid6/ + # ls -l /mnt/raid6/ + +12. Create some files under mount point and append some text in any one of the file to verify the content. + + # touch /mnt/raid6/raid6_test.txt + # ls -l /mnt/raid6/ + # echo "tecmint raid setups" > /mnt/raid6/raid6_test.txt + # cat /mnt/raid6/raid6_test.txt + +![Verify Raid Content](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Content.png) + +Verify Raid Content + +13. Add an entry in /etc/fstab to auto mount the device at the system startup and append the below entry, mount point may differ according to your environment. + + # vim /etc/fstab + + /dev/md0 /mnt/raid6 ext4 defaults 0 0 + +![Automount Raid 6 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Automount-Raid-Device.png) + +Automount Raid 6 Device + +14. Next, execute ‘mount -a‘ command to verify whether there is any error in fstab entry. + + # mount -av + +![Verify Raid Automount](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Automount-Raid-Devices.png) + +Verify Raid Automount + +### Step 5: Save RAID 6 Configuration ### + +15. Please note by default RAID don’t have a config file. We have to save it by manually using below command and then verify the status of device ‘/dev/md0‘. + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + # mdadm --detail /dev/md0 + +![Save Raid 6 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Status.png) + +Save Raid 6 Configuration + +![Check Raid 6 Status](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Status.png) + +Check Raid 6 Status + +### Step 6: Adding a Spare Drives ### + +16. Now it has 4 disks and there are two parity information’s available. In some cases, if any one of the disk fails we can get the data, because there is double parity in RAID 6. + +May be if the second disk fails, we can add a new one before loosing third disk. It is possible to add a spare drive while creating our RAID set, But I have not defined the spare drive while creating our raid set. But, we can add a spare drive after any drive failure or while creating the RAID set. Now we have already created the RAID set now let me add a spare drive for demonstration. + +For the demonstration purpose, I’ve hot-plugged a new HDD disk (i.e. /dev/sdf), let’s verify the attached disk. + + # ls -l /dev/ | grep sd + +![Check New Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-New-Disk.png) + +Check New Disk + +17. Now again confirm the new attached disk for any raid is already configured or not using the same mdadm command. + + # mdadm --examine /dev/sdf + +![Check Raid on New Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-New-Disk.png) + +Check Raid on New Disk + +**Note**: As usual, like we’ve created partitions for four disks earlier, similarly we’ve to create new partition on the new plugged disk using fdisk command. + + # fdisk /dev/sdf + +![Create sdf Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-Partition-on-sdf.png) + +Create /dev/sdf Partition + +18. Again after creating new partition on /dev/sdf, confirm the raid on the partition, include the spare drive to the /dev/md0 raid device and verify the added device. + + # mdadm --examine /dev/sdf + # mdadm --examine /dev/sdf1 + # mdadm --add /dev/md0 /dev/sdf1 + # mdadm --detail /dev/md0 + +![Verify Raid on sdf Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-on-sdf.png) + +Verify Raid on sdf Partition + +![Add sdf Partition to Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Add-sdf-Partition-to-Raid.png) + +Add sdf Partition to Raid + +![Verify sdf Partition Details](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-sdf-Details.png) + +Verify sdf Partition Details + +### Step 7: Check Raid 6 Fault Tolerance ### + +19. Now, let us check whether spare drive works automatically, if anyone of the disk fails in our Array. For testing, I’ve personally marked one of the drive is failed. + +Here, we’re going to mark /dev/sdd1 as failed drive. + + # mdadm --manage --fail /dev/md0 /dev/sdd1 + +![Check Raid 6 Fault Tolerance](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Failover.png) + +Check Raid 6 Fault Tolerance + +20. Let me get the details of RAID set now and check whether our spare started to sync. + + # mdadm --detail /dev/md0 + +![Check Auto Raid Syncing](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Auto-Raid-Syncing.png) + +Check Auto Raid Syncing + +**Hurray!** Here, we can see the spare got activated and started rebuilding process. At the bottom we can see the faulty drive /dev/sdd1 listed as faulty. We can monitor build process using following command. + + # cat /proc/mdstat + +![Raid 6 Auto Syncing](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-6-Auto-Syncing.png) + +Raid 6 Auto Syncing + +### Conclusion: ### + +Here, we have seen how to setup RAID 6 using four disks. This RAID level is one of the expensive setup with high redundancy. We will see how to setup a Nested RAID 10 and much more in the next articles. Till then, stay connected with TECMINT. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid-6-in-linux/ + +作者:[Babin Lonston][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/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/create-raid0-in-linux/ +[3]:http://www.tecmint.com/create-raid1-in-linux/ \ No newline at end of file diff --git a/sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md b/sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md new file mode 100644 index 0000000000..c021771ad2 --- /dev/null +++ b/sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md @@ -0,0 +1,275 @@ +Setting Up RAID 10 or 1+0 (Nested) in Linux – Part 6 +================================================================================ +RAID 10 is a combine of RAID 0 and RAID 1 to form a RAID 10. To setup Raid 10, we need at least 4 number of disks. In our earlier articles, we’ve seen how to setup a RAID 0 and RAID 1 with minimum 2 number of disks. + +Here we will use both RAID 0 and RAID 1 to perform a Raid 10 setup with minimum of 4 drives. Assume, that we’ve some data saved to logical volume, which is created with RAID 10. Just for an example, if we are saving a data “apple” this will be saved under all 4 disk by this following method. + +![Create Raid 10 in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/raid10.jpg) + +Create Raid 10 in Linux + +Using RAID 0 it will save as “A” in first disk and “p” in the second disk, then again “p” in first disk and “l” in second disk. Then “e” in first disk, like this it will continue the Round robin process to save the data. From this we come to know that RAID 0 will write the half of the data to first disk and other half of the data to second disk. + +In RAID 1 method, same data will be written to other 2 disks as follows. “A” will write to both first and second disks, “P” will write to both disk, Again other “P” will write to both the disks. Thus using RAID 1 it will write to both the disks. This will continue in round robin process. + +Now you all came to know that how RAID 10 works by combining of both RAID 0 and RAID 1. If we have 4 number of 20 GB size disks, it will be 80 GB in total, but we will get only 40 GB of Storage capacity, the half of total capacity will be lost for building RAID 10. + +#### Pros and Cons of RAID 5 #### + +- Gives better performance. +- We will loose two of the disk capacity in RAID 10. +- Reading and writing will be very good, because it will write and read to all those 4 disk at the same time. +- It can be used for Database solutions, which needs a high I/O disk writes. + +#### Requirements #### + +In RAID 10, we need minimum of 4 disks, the first 2 disks for RAID 0 and other 2 Disks for RAID 1. Like I said before, RAID 10 is just a Combine of RAID 0 & 1. If we need to extended the RAID group, we must increase the disk by minimum 4 disks. + +**My Server Setup** + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.229 + Hostname : rd10.tecmintlocal.com + Disk 1 [20GB] : /dev/sdd + Disk 2 [20GB] : /dev/sdc + Disk 3 [20GB] : /dev/sdd + Disk 4 [20GB] : /dev/sde + +There are two ways to setup RAID 10, but here I’m going to show you both methods, but I prefer you to follow the first method, which makes the work lot easier for setting up a RAID 10. + +### Method 1: Setting Up Raid 10 ### + +1. First, verify that all the 4 added disks are detected or not using the following command. + + # ls -l /dev | grep sd + +2. Once the four disks are detected, it’s time to check for the drives whether there is already any raid existed before creating a new one. + + # mdadm -E /dev/sd[b-e] + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde + +![Verify 4 Added Disks](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-4-Added-Disks.png) + +Verify 4 Added Disks + +**Note**: In the above output, you see there isn’t any super-block detected yet, that means there is no RAID defined in all 4 drives. + +#### Step 1: Drive Partitioning for RAID #### + +3. Now create a new partition on all 4 disks (/dev/sdb, /dev/sdc, /dev/sdd and /dev/sde) using the ‘fdisk’ tool. + + # fdisk /dev/sdb + # fdisk /dev/sdc + # fdisk /dev/sdd + # fdisk /dev/sde + +**Create /dev/sdb Partition** + +Let me show you how to partition one of the disk (/dev/sdb) using fdisk, this steps will be the same for all the other disks too. + + # fdisk /dev/sdb + +Please use the below steps for creating a new partition on /dev/sdb drive. + +- Press ‘n‘ for creating new partition. +- Then choose ‘P‘ for Primary partition. +- Then choose ‘1‘ to be the first partition. +- Next press ‘p‘ to print the created partition. +- Change the Type, If we need to know the every available types Press ‘L‘. +- Here, we are selecting ‘fd‘ as my type is RAID. +- Next press ‘p‘ to print the defined partition. +- Then again use ‘p‘ to print the changes what we have made. +- Use ‘w‘ to write the changes. + +![Disk sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Disk-sdb-Partition.png) + +Disk sdb Partition + +**Note**: Please use the above same instructions for creating partitions on other disks (sdc, sdd sdd sde). + +4. After creating all 4 partitions, again you need to examine the drives for any already existing raid using the following command. + + # mdadm -E /dev/sd[b-e] + # mdadm -E /dev/sd[b-e]1 + + OR + + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde + # mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 + +![Check All Disks for Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Check-All-Disks-for-Raid.png) + +Check All Disks for Raid + +**Note**: The above outputs shows that there isn’t any super-block detected on all four newly created partitions, that means we can move forward to create RAID 10 on these drives. + +#### Step 2: Creating ‘md’ RAID Device #### + +5. Now it’s time to create a ‘md’ (i.e. /dev/md0) device, using ‘mdadm’ raid management tool. Before, creating device, your system must have ‘mdadm’ tool installed, if not install it first. + + # yum install mdadm [on RedHat systems] + # apt-get install mdadm [on Debain systems] + +Once ‘mdadm’ tool installed, you can now create a ‘md’ raid device using the following command. + + # mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 + +6. Next verify the newly created raid device using the ‘cat’ command. + + # cat /proc/mdstat + +![Create md raid Device](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md-raid-Device.png) + +Create md raid Device + +7. Next, examine all the 4 drives using the below command. The output of the below command will be long as it displays the information of all 4 disks. + + # mdadm --examine /dev/sd[b-e]1 + +8. Next, check the details of Raid Array with the help of following command. + + # mdadm --detail /dev/md0 + +![Check Raid Array Details](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Array-Details.png) + +Check Raid Array Details + +**Note**: You see in the above results, that the status of Raid was active and re-syncing. + +#### Step 3: Creating Filesystem #### + +9. Create a file system using ext4 for ‘md0′ and mount it under ‘/mnt/raid10‘. Here, I’ve used ext4, but you can use any filesystem type if you want. + + # mkfs.ext4 /dev/md0 + +![Create md Filesystem](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md-Filesystem.png) + +Create md Filesystem + +10. After creating filesystem, mount the created file-system under ‘/mnt/raid10‘ and list the contents of the mount point using ‘ls -l’ command. + + # mkdir /mnt/raid10 + # mount /dev/md0 /mnt/raid10/ + # ls -l /mnt/raid10/ + +Next, add some files under mount point and append some text in any one of the file and check the content. + + # touch /mnt/raid10/raid10_files.txt + # ls -l /mnt/raid10/ + # echo "raid 10 setup with 4 disks" > /mnt/raid10/raid10_files.txt + # cat /mnt/raid10/raid10_files.txt + +![Mount md Device](http://www.tecmint.com/wp-content/uploads/2014/11/Mount-md-Device.png) + +Mount md Device + +11. For automounting, open the ‘/etc/fstab‘ file and append the below entry in fstab, may be mount point will differ according to your environment. Save and quit using wq!. + + # vim /etc/fstab + + /dev/md0 /mnt/raid10 ext4 defaults 0 0 + +![AutoMount md Device](http://www.tecmint.com/wp-content/uploads/2014/11/AutoMount-md-Device.png) + +AutoMount md Device + +12. Next, verify the ‘/etc/fstab‘ file for any errors before restarting the system using ‘mount -a‘ command. + + # mount -av + +![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Errors-in-Fstab.png) + +Check Errors in Fstab + +#### Step 4: Save RAID Configuration #### + +13. By default RAID don’t have a config file, so we need to save it manually after making all the above steps, to preserve these settings during system boot. + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +![Save Raid10 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Save-Raid10-Configuration.png) + +Save Raid10 Configuration + +That’s it, we have created RAID 10 using method 1, this method is the easier one. Now let’s move forward to setup RAID 10 using method 2. + +### Method 2: Creating RAID 10 ### + +1. In method 2, we have to define 2 sets of RAID 1 and then we need to define a RAID 0 using those created RAID 1 sets. Here, what we will do is to first create 2 mirrors (RAID1) and then striping over RAID0. + +First, list the disks which are all available for creating RAID 10. + + # ls -l /dev | grep sd + +![List 4 Devices](http://www.tecmint.com/wp-content/uploads/2014/11/List-4-Devices.png) + +List 4 Devices + +2. Partition the all 4 disks using ‘fdisk’ command. For partitioning, you can follow #step 3 above. + + # fdisk /dev/sdb + # fdisk /dev/sdc + # fdisk /dev/sdd + # fdisk /dev/sde + +3. After partitioning all 4 disks, now examine the disks for any existing raid blocks. + + # mdadm --examine /dev/sd[b-e] + # mdadm --examine /dev/sd[b-e]1 + +![Examine 4 Disks](http://www.tecmint.com/wp-content/uploads/2014/11/Examine-4-Disks.png) + +Examine 4 Disks + +#### Step 1: Creating RAID 1 #### + +4. First let me create 2 sets of RAID 1 using 4 disks ‘sdb1′ and ‘sdc1′ and other set using ‘sdd1′ & ‘sde1′. + + # mdadm --create /dev/md1 --metadata=1.2 --level=1 --raid-devices=2 /dev/sd[b-c]1 + # mdadm --create /dev/md2 --metadata=1.2 --level=1 --raid-devices=2 /dev/sd[d-e]1 + # cat /proc/mdstat + +![Creating Raid 1](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-1.png) + +Creating Raid 1 + +![Check Details of Raid 1](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-1.png) + +Check Details of Raid 1 + +#### Step 2: Creating RAID 0 #### + +5. Next, create the RAID 0 using md1 and md2 devices. + + # mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/md1 /dev/md2 + # cat /proc/mdstat + +![Creating Raid 0](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-0.png) + +Creating Raid 0 + +#### Step 3: Save RAID Configuration #### + +6. We need to save the Configuration under ‘/etc/mdadm.conf‘ to load all raid devices in every reboot times. + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +After this, we need to follow #step 3 Creating file system of method 1. + +That’s it! we have created RAID 1+0 using method 2. We will loose two disks space here, but the performance will be excellent compared to any other raid setups. + +### Conclusion ### + +Here we have created RAID 10 using two methods. RAID 10 has good performance and redundancy too. Hope this helps you to understand about RAID 10 Nested Raid level. Let us see how to grow an existing raid array and much more in my upcoming articles. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid-10-in-linux/ + +作者:[Babin Lonston][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/babinlonston/ \ No newline at end of file diff --git a/sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md b/sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md new file mode 100644 index 0000000000..fffa6fb419 --- /dev/null +++ b/sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md @@ -0,0 +1,179 @@ +Growing an Existing RAID Array and Removing Failed Disks in Raid – Part 7 +================================================================================ +Every newbies will get confuse of the word array. Array is just a collection of disks. In other words, we can call array as a set or group. Just like a set of eggs containing 6 numbers. Likewise RAID Array contains number of disks, it may be 2, 4, 6, 8, 12, 16 etc. Hope now you know what Array is. + +Here we will see how to grow (extend) an existing array or raid group. For example, if we are using 2 disks in an array to form a raid 1 set, and in some situation if we need more space in that group, we can extend the size of an array using mdadm –grow command, just by adding one of the disk to the existing array. After growing (adding disk to an existing array), we will see how to remove one of the failed disk from array. + +![Grow Raid Array in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Growing-Raid-Array.jpg) + +Growing Raid Array and Removing Failed Disks + +Assume that one of the disk is little weak and need to remove that disk, till it fails let it under use, but we need to add one of the spare drive and grow the mirror before it fails, because we need to save our data. While the weak disk fails we can remove it from array this is the concept we are going to see in this topic. + +#### Features of RAID Growth #### + +- We can grow (extend) the size of any raid set. +- We can remove the faulty disk after growing raid array with new disk. +- We can grow raid array without any downtime. + +Requirements + +- To grow an RAID array, we need an existing RAID set (Array). +- We need extra disks to grow the Array. +- Here I’m using 1 disk to grow the existing array. + +Before we learn about growing and recovering of Array, we have to know about the basics of RAID levels and setups. Follow the below links to know about those setups. + +- [Understanding Basic RAID Concepts – Part 1][1] +- [Creating a Software Raid 0 in Linux – Part 2][2] + +#### My Server Setup #### + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.230 + Hostname : grow.tecmintlocal.com + 2 Existing Disks : 1 GB + 1 Additional Disk : 1 GB + +Here, my already existing RAID has 2 number of disks with each size is 1GB and we are now adding one more disk whose size is 1GB to our existing raid array. + +### Growing an Existing RAID Array ### + +1. Before growing an array, first list the existing Raid array using the following command. + + # mdadm --detail /dev/md0 + +![Check Existing Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Existing-Raid-Array.png) + +Check Existing Raid Array + +**Note**: The above output shows that I’ve already has two disks in Raid array with raid1 level. Now here we are adding one more disk to an existing array, + +2. Now let’s add the new disk “sdd” and create a partition using ‘fdisk‘ command. + + # fdisk /dev/sdd + +Please use the below instructions to create a partition on /dev/sdd drive. + +- Press ‘n‘ for creating new partition. +- Then choose ‘P‘ for Primary partition. +- Then choose ‘1‘ to be the first partition. +- Next press ‘p‘ to print the created partition. +- Here, we are selecting ‘fd‘ as my type is RAID. +- Next press ‘p‘ to print the defined partition. +- Then again use ‘p‘ to print the changes what we have made. +- Use ‘w‘ to write the changes. + +![Create New Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Create-New-sdd-Partition.png) + +Create New sdd Partition + +3. Once new sdd partition created, you can verify it using below command. + + # ls -l /dev/ | grep sd + +![Confirm sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-sdd-Partition.png) + +Confirm sdd Partition + +4. Next, examine the newly created disk for any existing raid, before adding to the array. + + # mdadm --examine /dev/sdd1 + +![Check Raid on sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-sdd-Partition.png) + +Check Raid on sdd Partition + +**Note**: The above output shows that the disk has no super-blocks detected, means we can move forward to add a new disk to an existing array. + +4. To add the new partition /dev/sdd1 in existing array md0, use the following command. + + # mdadm --manage /dev/md0 --add /dev/sdd1 + +![Add Disk To Raid-Array](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Disk-To-Raid-Array.png) + +Add Disk To Raid-Array + +5. Once the new disk has been added, check for the added disk in our array using. + + # mdadm --detail /dev/md0 + +![Confirm Disk Added to Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-Disk-Added-To-Raid.png) + +Confirm Disk Added to Raid + +**Note**: In the above output, you can see the drive has been added as a spare. Here, we already having 2 disks in the array, but what we are expecting is 3 devices in array for that we need to grow the array. + +6. To grow the array we have to use the below command. + + # mdadm --grow --raid-devices=3 /dev/md0 + +![Grow Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Grow-Raid-Array.png) + +Grow Raid Array + +Now we can see the third disk (sdd1) has been added to array, after adding third disk it will sync the data from other two disks. + + # mdadm --detail /dev/md0 + +![Confirm Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-Raid-Array.png) + +Confirm Raid Array + +**Note**: For large size disk it will take hours to sync the contents. Here I have used 1GB virtual disk, so its done very quickly within seconds. + +### Removing Disks from Array ### + +7. After the data has been synced to new disk ‘sdd1‘ from other two disks, that means all three disks now have same contents. + +As I told earlier let’s assume that one of the disk is weak and needs to be removed, before it fails. So, now assume disk ‘sdc1‘ is weak and needs to be removed from an existing array. + +Before removing a disk we have to mark the disk as failed one, then only we can able to remove it. + + # mdadm --fail /dev/md0 /dev/sdc1 + # mdadm --detail /dev/md0 + +![Disk Fail in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Disk-Fail-in-Raid-Array.png) + +Disk Fail in Raid Array + +From the above output, we clearly see that the disk was marked as faulty at the bottom. Even its faulty, we can see the raid devices are 3, failed 1 and state was degraded. + +Now we have to remove the faulty drive from the array and grow the array with 2 devices, so that the raid devices will be set to 2 devices as before. + + # mdadm --remove /dev/md0 /dev/sdc1 + +![Remove Disk in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Remove-Disk-in-Raid-Array.png) + +Remove Disk in Raid Array + +8. Once the faulty drive is removed, now we’ve to grow the raid array using 2 disks. + + # mdadm --grow --raid-devices=2 /dev/md0 + # mdadm --detail /dev/md0 + +![Grow Disks in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Grow-Disks-in-Raid-Array.png) + +Grow Disks in Raid Array + +From the about output, you can see that our array having only 2 devices. If you need to grow the array again, follow the same steps as described above. If you need to add a drive as spare, mark it as spare so that if the disk fails, it will automatically active and rebuild. + +### Conclusion ### + +In the article, we’ve seen how to grow an existing raid set and how to remove a faulty disk from an array after re-syncing the existing contents. All these steps can be done without any downtime. During data syncing, system users, files and applications will not get affected in any case. + +In next, article I will show you how to manage the RAID, till then stay tuned to updates and don’t forget to add your comments. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/grow-raid-array-in-linux/ + +作者:[Babin Lonston][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/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/create-raid0-in-linux/ \ No newline at end of file From 2baef60dbc0fe0d3f8c232674d6f84c8805c5395 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 14 Jul 2015 14:43:42 +0800 Subject: [PATCH 1379/2517] Update 20150713 How to manage Vim plugins.md --- sources/tech/20150713 How to manage Vim plugins.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150713 How to manage Vim plugins.md b/sources/tech/20150713 How to manage Vim plugins.md index 7462414916..147f89b0b7 100644 --- a/sources/tech/20150713 How to manage Vim plugins.md +++ b/sources/tech/20150713 How to manage Vim plugins.md @@ -1,3 +1,4 @@ +XLCYun 翻译中 How to manage Vim plugins ================================================================================ Vim is a versatile, lightweight text editor on Linux. While its initial learning curve can be overwhelming for an average Linux user, its benefits are completely worthy. As far as the functionality goes, Vim is fully customizable by means of plugins. Due to its high level of configuration, though, you need to spend some time with its plugin system to be able to personalize Vim in an effective way. Luckily, we have several tools that make our life with Vim plugins easier. The one I use on a daily basis is Vundle. @@ -136,4 +137,4 @@ via: http://xmodulo.com/manage-vim-plugins.html [1]:https://github.com/VundleVim/Vundle.vim [2]:http://ask.xmodulo.com/install-git-linux.html [3]:http://www.vim-scripts.org/ -[4]:http://www.vimawesome.com/ \ No newline at end of file +[4]:http://www.vimawesome.com/ From 0a8f38260be9c417e0ea3be00c6d374da0f32e8f Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Tue, 14 Jul 2015 15:27:28 +0800 Subject: [PATCH 1380/2517] Delete 20150407 10 Truly Amusing Easter Eggs in Linux.md --- ...7 10 Truly Amusing Easter Eggs in Linux.md | 155 ------------------ 1 file changed, 155 deletions(-) delete mode 100644 sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md diff --git a/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md b/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md deleted file mode 100644 index f8322fb1af..0000000000 --- a/sources/share/20150407 10 Truly Amusing Easter Eggs in Linux.md +++ /dev/null @@ -1,155 +0,0 @@ -Translating by H-mudcup -10 Truly Amusing Easter Eggs in Linux -================================================================================ -![](http://en.wikipedia.org/wiki/File:Adventure_Easteregg.PNG) -The programmer working on Adventure slipped a secret feature into the game. Instead of getting upset about it, Atari decided to give these sorts of “secret features” a name -- “Easter Eggs” because… you know… you hunt for them. Image credit: Wikipedia. - -Back in 1979, a video game was being developed for the Atari 2600 -- [Adventure][1]. - -The programmer working on Adventure slipped a secret feature into the game which, when the user moved an “invisible square” to a particular wall, allowed entry into a “secret room”. That room contained a simple phrase: “Created by [Warren Robinett][2]”. - -Atari had a policy against putting author credits in their games, so this intrepid programmer put his John Hancock on the game by being, well, sneaky. Atari only found out about the “secret room” after Warren Robinett had left the company. Instead of getting upset about it, Atari decided to give these sorts of “secret features” a name -- “Easter Eggs” because… you know… you hunt for them -- and declared that they would be putting more of these “Easter Eggs” in future games. - -This wasn’t the first such “hidden feature” built into a piece of software (that distinction goes to an operating system for the [PDP-10][3] from 1966, but this was the first time it was given a name. And it was the first time it really grabbed the attention of most computer users and gamers. - -Linux (and Linux related software) has not been left out. Some truly amusing Easter Eggs have been created for our beloved operating system over the years. Here are some of my personal favorites -- with how to achieve them. - -You’ll notice, rather quickly, that most of these are experienced via a terminal. That’s on purpose. Because terminals are cool. [I should also take this moment to say that if you try to run an application I list, and you do not have it installed, it will not work. You should install it first. Because… computers.] - -### Arch : Pac-Man in pacman ### - -We’re going to start with one just for the [Arch Linux][4] fans out there. You can add a [Pac-Man][5]-esque character to your progress bars in “[pacman][6]” (the Arch package manager). Why this isn’t enabled by default is beyond me. - -To do this you’ll want to edit “/etc/pacman.conf” in your favorite text editor. Under the “# Misc options” section, remove the “#” in front of “Color” and add the line “ILoveCandy”. Because Pac-Man loves candy. - -That’s it! Next time you fire up a terminal and run pacman, you’ll help the little yellow guy get some lunch (or at least some candy). - -### GNU Emacs : Tetris and such ### - -![emacs Tetris](http://www.linux.com/images/stories/41373/emacsTetris.jpg) -I don’t like emacs. Not even a little bit. But it does play Tetris. - -I have a confession to make: I don’t like [emacs][7]. Not even a little bit. - -Some things fill my heart with gladness. Some things take away all my sadness. Some things ease my troubles. That’s [not what emacs does][8]. - -But it does play Tetris. And that’s not nothing. Here’s how: - -Step 1) Launch emacs. (When in doubt, type “emacs”.) - -Step 2) Hit Escape then X on your keyboard. - -Step 3) Type “tetris” and hit Enter. - -Bored of Tetris? Try “pong”, “snake” and a whole host of other little games (and novelties). Take a look in “/usr/share/emacs/*/lisp/play” for the full list. - -### Animals Saying Things ### - -The Linux world has a long and glorious history of animals saying things in a terminal. Here are the ones that are the most important to know by heart. - -On a Debian-based distro? Try typing “apt-get moo". - -![apt-get moo](http://www.linux.com/images/stories/41373/AptGetMoo.jpg) -apt-get moo - -Simple, sure. But it’s a talking cow. So we like it. Then try “aptitude moo”. It will inform you that “There are no Easter Eggs in this program”. - -If there’s one thing you should know about [aptitude][9], it’s that it’s a dirty, filthy liar. If aptitude were wearing pants, the fire could be seen from space. Add a “-v” option to that same command. Keep adding more v’s until you force aptitude to come clean. - -![](http://www.linux.com/images/stories/41373/AptitudeMoo.jpg) -I think we can all agree, that this is probably the most important feature in aptitude. - -I think we can all agree, that this is probably the most important feature in aptitude. But what if you want to put your own words into the mouth of a cow? That’s where “cowsay” comes in. - -And, don’t let the name “cowsay” fool you. You can put words into so much more than just a cow. Like an elephant, Calvin, Beavis and even the Ghostbusters logo. Just do a “cowsay -l” from the terminal to get a complete list of options. - -![](http://www.linux.com/images/stories/41373/cowsay.jpg) -You can put words into so much more than just a cow. - -Want to get really tricky? You can pipe the output of other applications into cowsay. Try “fortune | cowsay”. Lots of fun can be had. - -### Sudo Insult Me Please ### - -Raise your hand if you’ve always wanted your computer to insult you when you do something wrong. Hell. I know I have. Try this: - -Type “sudo visudo” to open the “sudoers” file. In the top of that file you’ll likely see a few lines that start with “Defaults”. At the bottom of that list add “Defaults insults” and save the file. - -Now, whenever you mistype your sudo password, your system will lob insults at you. Confidence boosting phrases such as “Listen, burrito brains, I don’t have time to listen to this trash.”, “Are you on drugs?” and “You’re mind just hasn’t been the same since the electro-shocks, has it?”. - -This one has the side-effect of being a rather fun thing to set on a co-worker's computer. - -### Firefox is cheeky ### - -Here’s one that isn’t done from the Terminal! Huzzah! - -Open up Firefox. In the URL bar type “about:about”. That will give you a list of all of the “about” pages in Firefox. Nothing too fancy there, right? - -Now try “about:mozilla” and you’ll be greeted with a quote from the “[Book of Mozilla][10]” -- the holy book of web browsing. One of my other favorites, “about:robots”, is also quite excellent. - -![](http://www.linux.com/images/stories/41373/About-Mozilla550.jpg) -The “Book of Mozilla” -- the holy book of web browsing. - -### Carefully Crafted Calendar Concoctions ### - -Tired of the boring old [Gregorian Calendar][11]? Ready to mix things up a little bit? Try typing “ddate”. This will print the current date on the [Discordian Calendar][12]. You will be greeted by something that looks like this: - -“Today is Sweetmorn, the 18th day of Discord in the YOLD 3181” - -I hear what you’re saying, “But, this isn’t an Easter Egg!” Shush. I’ll call it an Easter Egg if I want to. - -### Instant l33t Hacker Mode ### - -Want to feel like you’re a super-hacker from a movie? Try setting nmap into “[Script Kiddie][13]” mode (by adding “-oS”) and all of the output will be rendered in the most 3l33t [h@x0r-y way][14] possible. - -Example: “nmap -oS - google.com” - -Do it. You know you want to. Angelina Jolie would be [super impressed][15]. - -### The lolcat Rainbow ### - -Having awesome Easter Eggs and goodies in your Linux terminal is fine and dandy… but what if you want it to have a little more… pizazz? Enter: lolcat. Take the text output of any program and pipe it through lolcat to super-duper-rainbow-ize it. - -![](http://www.linux.com/images/stories/41373/lolcat.jpg) -Take the text output of any program and pipe it through lolcat to super-duper-rainbow-ize it. - -### Cursor Chasing Critter ### - -![oneko cat](http://www.linux.com/images/stories/41373/onekocat.jpg) -“Oneko” -- the Linux port of the classic “Neko”. - -“Oneko” -- the Linux port of the classic “[Neko][16]”. -And that brings us to “oneko” -- the Linux port of the classic “Neko”. Basically a little cat that chases your cursor around the screen. - -While this may not qualify as an “Easter Egg” in the strictest sense of the word, it’s still fun. And it feels Easter Egg-y. - -You can also use different options (such as “oneko -dog”) to use a little dog instead of a cat and a few other tweaks and options. Lots of possibilities for annoying co-workers with this one. - -There you have it! A list of my favorite Linux Easter Eggs (and things of that ilk). Feel free to add your own favorite in the comments section below. Because this is the Internet. And you can do that sort of thing. - --------------------------------------------------------------------------------- - -via: http://www.linux.com/news/software/applications/820944-10-truly-amusing-linux-easter-eggs- - -作者:[Bryan Lunduke][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linux.com/community/forums/person/56734 -[1]:http://en.wikipedia.org/wiki/Adventure_(Atari_2600) -[2]:http://en.wikipedia.org/wiki/Warren_Robinett -[3]:http://en.wikipedia.org/wiki/PDP-10 -[4]:http://en.wikipedia.org/wiki/Arch_Linux -[5]:http://en.wikipedia.org/wiki/Pac-Man -[6]:http://www.linux.com/news/software/applications/820944-10-truly-amusing-linux-easter-eggs-#Pacman -[7]:http://en.wikipedia.org/wiki/GNU_Emacs -[8]:https://www.youtube.com/watch?v=AQ4NAZPi2js -[9]:https://wiki.debian.org/Aptitude -[10]:http://en.wikipedia.org/wiki/The_Book_of_Mozilla -[11]:http://en.wikipedia.org/wiki/Gregorian_calendar -[12]:http://en.wikipedia.org/wiki/Discordian_calendar -[13]:http://nmap.org/book/output-formats-script-kiddie.html -[14]:http://nmap.org/book/output-formats-script-kiddie.html -[15]:https://www.youtube.com/watch?v=Ql1uLyuWra8 -[16]:http://en.wikipedia.org/wiki/Neko_%28computer_program%29 From 6e5c0c14a2bbf5e53397a882727e531299b33b79 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Tue, 14 Jul 2015 15:28:41 +0800 Subject: [PATCH 1381/2517] Create 20150407 10 Truly Amusing Easter Eggs in Linux.md --- ...7 10 Truly Amusing Easter Eggs in Linux.md | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 translated/share/20150407 10 Truly Amusing Easter Eggs in Linux.md diff --git a/translated/share/20150407 10 Truly Amusing Easter Eggs in Linux.md b/translated/share/20150407 10 Truly Amusing Easter Eggs in Linux.md new file mode 100644 index 0000000000..4f783d829c --- /dev/null +++ b/translated/share/20150407 10 Truly Amusing Easter Eggs in Linux.md @@ -0,0 +1,155 @@ +Translating by H-mudcup + +Linux上绝对有趣的10个彩蛋 +================================================================================ +![](http://en.wikipedia.org/wiki/File:Adventure_Easteregg.PNG) +制作 Adventure 的程序员悄悄的把一个秘密的功能塞进了游戏里。Atari 并没有对此感到生气,而是给这类“秘密功能”起了个名字——“彩蛋”,因为——你懂的——你会像找复活节彩蛋一样寻找它们。图片来自: Wikipedia。 + +在1979年的时候,公司为 Atari 2600 开发了一个电子游戏——[Adventure][1]。 + +制作 Adventure 的程序员悄悄的把这样的一个功能放进了游戏里,当用户把一个“隐形方块”移动到特定的一面墙上时,会让用户进入一个“密室”。那个房间里只有一句话:“Created by [Warren Robinett][2]”——意思是,由 [Warren Robinett][2] 创建。 + +Atari 有一项反对作者将自己的名字放进他们的游戏里的政策,所以这个无畏的程序员只能偷偷的把自己的名字放进游戏里。Atari 在 Warren Robinett 离开公司之后才发现这个“密室”。Atari 并没有对此感到生气,而是给这类“秘密功能”起了个名字——“彩蛋”,因为——你懂的——你会寻找它们。Atari 还宣布将在之后的游戏中加入更多的“彩蛋”。 + +这种软件里的“隐藏功能”并不是第一次出现(这类特性的首次出现是在1966年[PDP-10][3]的操作系统上),但这是它第一次有了名字,同时也是第一次真正的被众多电脑用户和游戏玩家所注意。 + +Linux(以及和Linux相关的软件)并没有被遗忘。这些年来,人们为这个倍受喜爱的操作系统创作了很多非常有趣的彩蛋。下面将介绍我个人最喜爱的彩蛋——以及如何得到它们。 + +你将迅速意识到这些彩蛋大多需要通过终端才能体验到。这是故意的。因为终端比较酷。【我应该借此机机会提醒你一下,如果你想运行我所列出的应用,然而你却还没有安装它们,你是绝对无法运行成功的。你应该先安装好它们的。因为……毕竟只是计算机。】 + +### Arch : 包管理器(pacman)里的吃豆人(Pac-Man) ### + +为了广大的 [Arch Linux][4] 粉丝,我们将以此开篇。你们可以将“[pacman][6]” (Arch 的包管理器)的进度条变成吃豆人吃豆的样子。别问我为什么这不是默认设置。 + +你需要在你最喜欢的文本编辑器里编辑“/etc/pacman.conf”文件。在“# Misc options”区下面,删除“Color”前的“#”,添加一行“ILoveCandy”。因为吃豆人喜欢糖豆。 + +没错,这样就行了!下次你在终端里运行pacman管理器时,你就会让这个黄颜色的小家伙吃到些午餐(至少能吃些糖豆)。 + +### GNU Emacs : 俄罗斯方块(Tetris)以及…… ### + +![emacs Tetris](http://www.linux.com/images/stories/41373/emacsTetris.jpg) +我不喜欢 emacs。一点也不喜欢。但是它确实能玩俄罗斯方块。 + +我要坦白一件事:我不喜欢[emacs][7]。一点也不喜欢。 + +有些东西让我满心欢喜。有些东西能带走我所有伤痛。有些东西能解决我的烦恼。这些[绝对跟 emacs 无关][8]。 + +但是它确实能玩俄罗斯方块。这可不是件小事。方法如下: + +第一步)打开 emacs。(有疑问,输入“emacs”。) + +第二步)按下键盘上的Esc和X键。 + +第三步)输入“tetris”然后按下“Enter”。 + +玩腻了俄罗斯方块?试试“pong”、“snake”还有其他一堆小游戏(或奇怪的东西)。在“/usr/share/emacs/*/lisp/play”文件中可以看见完整的清单。 + +### 动物说话了 ### + +让动物在终端里说话在 Linux 世界里有着悠久而辉煌的历史。下面这些真的是最应该知道的。 + +在用基于 Debian 的发行版?试试输入“apt-get moo"。 + +![apt-get moo](http://www.linux.com/images/stories/41373/AptGetMoo.jpg) +apt-get moo + +简单?的确。但这是只会说话的牛。所以惹我们喜欢。再试试“aptitude moo”。他会告诉你“There are no Easter Eggs in this program(这个程序里没有彩蛋)”。 + +关于 [aptitude][9] 有一件事你一定要知道,它是个肮脏、下流的骗子。如果 aptitude 是匹诺曹,那它的鼻子能刺穿月球。在这条命令中添加“-v”选项。不停的添加 v,直到它被逼得投降。 + +![](http://www.linux.com/images/stories/41373/AptitudeMoo.jpg) +我猜大家都同意,这是 aptitude 中最重要的功能。 + +我猜大家都同意,这是 aptitude 中最重要的功能。但是万一你想把自己的话让一头牛说出来怎么办?这时我们就需要“cowsay”了。 + +还有,别让“cowsay(牛说)”这个名字把你给骗了。你可以让你的话从各种东西的嘴里说出来。比如一头大象,Calvin,Beavis 甚至可以是Ghostbusters(捉鬼敢死队)的标志。只需在终端输入“cowsay -l”就能看到所有选项的列表。 + +![](http://www.linux.com/images/stories/41373/cowsay.jpg) +你可以让你的话从各种东西的嘴里说出来 + +想玩高端点的?你可以用管道把其他应用的输出放到 cowsay 中。试试“fortune | cowsay”。非常有趣。 + +### Sudo 请无情的侮辱我 ### + +当你做错事时希望你的电脑骂你的人请举手。反正,我这样想过。试试这个: + +输入“sudo visudo”以打开“sudoers”文件。在文件的开头你很可能会看见几行以“Defaults”开头的文字。在那几行后面添加“Defaults insults”并保存文件。 + +现在,只要你输错了你的 sudo 密码,你的系统就会骂你。这些提高自信的语句包括“听着,煎饼脑袋,我可没时间听这些垃圾。”,“你吃错药了吧?”以及“你被电过以后大脑就跟以前不太一样了是不是?” + +把这个设在同事的电脑上会有非常有趣。 + +### Firefox 是个厚脸皮 ### + +这一个不需要终端!太棒了! + +打开火狐浏览器。在地址栏填上“about:about”。你将得到火狐浏览器中所有的“about”页。一点也不炫酷,是不是? + +现在试试“about:mozilla”,浏览器就会回应你一条从“[Book of Mozilla(Mozilla 之书)][10]”——浏览网页的圣经——里引用的话。我的另一个最爱是“about:robots”,这个也很有趣。 + +![](http://www.linux.com/images/stories/41373/About-Mozilla550.jpg) +“[Book of Mozilla(Mozilla 之书)][10]”——浏览网页的圣经。 + +### 精心调制的混搭日历 ### + +是否厌倦了千百年不变的 [Gregorian Calendar(罗马教历)][11]?准备好乱入了吗?试试输入“ddate”。这样会把当前日历以[Discordian Calendar(不和教历)][12]的方式显示出来。你会遇见这样的语句: + +“今天是Sweetmorn(甜美的清晨),3181年Discord(不和)季的第18天。” + +我听见你在说什么了,“但这根本不是什么彩蛋!”嘘~,闭嘴。只要我想,我就可以把它叫做彩蛋。 + +### 快速进入黑客行话模式 ### + +想不想尝试一下电影里超级黑客的感觉?试试(通过添加“-oS”)把扫描器设置成“[Script Kiddie][13]”模式。然后所有的输出都会变成最3l33t的[黑客范][14]。 + +例如: “nmap -oS - google.com” + +赶快试试。我知道你有多想这么做。你一定会让安吉丽娜·朱莉(Angelina Jolie)[印象深刻][15] +### lolcat彩虹 ### + +在你的Linux终端里有很多彩蛋真真是极好的……但是如果你还想要变得……更有魅力些怎么办?输入:lolcat。把任何一个程序的文本输出通过管道输入到lolcat里。你会得到它的超级无敌彩虹版。 + +![](http://www.linux.com/images/stories/41373/lolcat.jpg) +把任何一个程序的文本输出通过管道输入到lolcat里。你会得到它的超级无敌彩虹版。 + +### 追光标的小家伙 ### + +![oneko cat](http://www.linux.com/images/stories/41373/onekocat.jpg) +“Oneko” -- 经典 “Neko”的Linux端口。 + +“Oneko” -- 经典 “[Neko][16]”的Linux端口。 . +接下来是“Oneko” -- 经典 “[Neko][16]”的Linux端口。基本上就是个满屏幕追着你的光标跑的小猫。 + +虽然严格来它并不算是“彩蛋”,它还是很有趣的。而且感觉上也是很彩蛋的。 + +你还可以用不同的选项(比如“oneko -dog”)把小猫替代成小狗,或是调成其他样式。用这个对付讨厌的同事有着无限的可能。 + +There you have it! A list of my favorite Linux Easter Eggs (and things of that ilk). Feel free to add your own favorite in the comments section below. Because this is the Internet. And you can do that sort of thing.就是这些了!一个我最喜欢的Linux彩蛋(或是类似东西)的清单。请尽情的的在下面的评论区留下你的最爱。因为这是互联网。你就能做这些事。 + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/news/software/applications/820944-10-truly-amusing-linux-easter-eggs- + +作者:[Bryan Lunduke][a] +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/56734 +[1]:http://en.wikipedia.org/wiki/Adventure_(Atari_2600) +[2]:http://en.wikipedia.org/wiki/Warren_Robinett +[3]:http://en.wikipedia.org/wiki/PDP-10 +[4]:http://en.wikipedia.org/wiki/Arch_Linux +[5]:http://en.wikipedia.org/wiki/Pac-Man +[6]:http://www.linux.com/news/software/applications/820944-10-truly-amusing-linux-easter-eggs-#Pacman +[7]:http://en.wikipedia.org/wiki/GNU_Emacs +[8]:https://www.youtube.com/watch?v=AQ4NAZPi2js +[9]:https://wiki.debian.org/Aptitude +[10]:http://en.wikipedia.org/wiki/The_Book_of_Mozilla +[11]:http://en.wikipedia.org/wiki/Gregorian_calendar +[12]:http://en.wikipedia.org/wiki/Discordian_calendar +[13]:http://nmap.org/book/output-formats-script-kiddie.html +[14]:http://nmap.org/book/output-formats-script-kiddie.html +[15]:https://www.youtube.com/watch?v=Ql1uLyuWra8 +[16]:http://en.wikipedia.org/wiki/Neko_%28computer_program%29 From e35b2ef058de81e904bac2e0eea16d4c81c33b90 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 14 Jul 2015 15:49:47 +0800 Subject: [PATCH 1382/2517] =?UTF-8?q?RAID=20=E4=B8=93=E9=A2=98=E6=96=87?= =?UTF-8?q?=E7=AB=A0=20struggling=20=E5=85=A8=E9=83=A8=E8=AE=A4=E9=A2=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1 - Introduction to RAID, Concepts of RAID and RAID Levels.md | 1 + ...AID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md | 1 + ...- Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md | 1 + ...reating RAID 5 (Striping with Distributed Parity) in Linux.md | 1 + ...Level 6 (Striping with Double Distributed Parity) in Linux.md | 1 + .../RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md | 1 + ...g an Existing RAID Array and Removing Failed Disks in Raid.md | 1 + 7 files changed, 7 insertions(+) diff --git a/sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md b/sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md index 6d902f7576..0f393fd7c4 100644 --- a/sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md +++ b/sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md @@ -1,3 +1,4 @@ +struggling 翻译中 Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 ================================================================================ RAID is a Redundant Array of Inexpensive disks, but nowadays it is called Redundant Array of Independent drives. Earlier it is used to be very costly to buy even a smaller size of disk, but nowadays we can buy a large size of disk with the same amount like before. Raid is just a collection of disks in a pool to become a logical volume. diff --git a/sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md b/sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md index e3bcf09799..8057e4828e 100644 --- a/sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md +++ b/sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md @@ -1,3 +1,4 @@ +struggling 翻译中 Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2 ================================================================================ RAID is Redundant Array of Inexpensive disks, used for high availability and reliability in large scale environments, where data need to be protected than normal use. Raid is just a collection of disks in a pool to become a logical volume and contains an array. A combine drivers makes an array or called as set of (group). diff --git a/sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md b/sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md index 927a8c49f1..4acfe4366b 100644 --- a/sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md +++ b/sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md @@ -1,3 +1,4 @@ +struggling 翻译中 Setting up RAID 1 (Mirroring) using ‘Two Disks’ in Linux – Part 3 ================================================================================ RAID Mirroring means an exact clone (or mirror) of the same data writing to two drives. A minimum two number of disks are more required in an array to create RAID1 and it’s useful only, when read performance or reliability is more precise than the data storage capacity. diff --git a/sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md b/sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md index acd284045f..dafdf514aa 100644 --- a/sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md +++ b/sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md @@ -1,3 +1,4 @@ +struggling 翻译中 Creating RAID 5 (Striping with Distributed Parity) in Linux – Part 4 ================================================================================ In RAID 5, data strips across multiple drives with distributed parity. The striping with distributed parity means it will split the parity information and stripe data over the multiple disks, which will have good data redundancy. diff --git a/sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md b/sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md index 2ad6a33227..ea1d5993c0 100644 --- a/sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md +++ b/sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md @@ -1,3 +1,4 @@ +struggling 翻译中 Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux – Part 5 ================================================================================ RAID 6 is upgraded version of RAID 5, where it has two distributed parity which provides fault tolerance even after two drives fails. Mission critical system still operational incase of two concurrent disks failures. It’s alike RAID 5, but provides more robust, because it uses one more disk for parity. diff --git a/sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md b/sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md index c021771ad2..a08903e00e 100644 --- a/sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md +++ b/sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md @@ -1,3 +1,4 @@ +struggling 翻译中 Setting Up RAID 10 or 1+0 (Nested) in Linux – Part 6 ================================================================================ RAID 10 is a combine of RAID 0 and RAID 1 to form a RAID 10. To setup Raid 10, we need at least 4 number of disks. In our earlier articles, we’ve seen how to setup a RAID 0 and RAID 1 with minimum 2 number of disks. diff --git a/sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md b/sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md index fffa6fb419..76039f4371 100644 --- a/sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md +++ b/sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md @@ -1,3 +1,4 @@ +struggling 翻译中 Growing an Existing RAID Array and Removing Failed Disks in Raid – Part 7 ================================================================================ Every newbies will get confuse of the word array. Array is just a collection of disks. In other words, we can call array as a set or group. Just like a set of eggs containing 6 numbers. Likewise RAID Array contains number of disks, it may be 2, 4, 6, 8, 12, 16 etc. Hope now you know what Array is. From f100dfc28c592b1f27e87ec44f1262bedd0e71c9 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 14 Jul 2015 17:29:40 +0800 Subject: [PATCH 1383/2517] PUB:20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros @Love-xuan --- ... Adds Live Backgrounds To Linux Distros.md | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) rename {translated/share => published}/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md (71%) diff --git a/translated/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md b/published/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md similarity index 71% rename from translated/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md rename to published/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md index 2d845ce804..384c188322 100644 --- a/translated/share/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md +++ b/published/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md @@ -1,14 +1,12 @@ -Translating by Love-xuan 动态壁纸给linux发行版添加活力背景 ================================================================================ **我们知道你想拥有一个有格调的ubuntu桌面来炫耀一下 :)** ![Live Wallpaper](http://i.imgur.com/9JIUw5p.gif) -Live Wallpaper +*Live Wallpaper* -在linxu上费一点点劲搭建一个出色的工作环境是很简单的。 -今天,我们着重来探讨[重新着重探讨][2]长驻你脑海中那些东西 - 一款自由,开源,能够给你的截图增添光彩的工具。 +在linxu上费一点点劲搭建一个出色的工作环境是很简单的。今天,我们([重新][2])着重来探讨长驻你脑海中那些东西 :一款自由,开源,能够给你的截图增添光彩的工具。 它叫 **Live Wallpaper** (正如你猜的那样) ,它用由OpenGL驱动的一款动态桌面背景来代替标准的静态桌面背景。 @@ -25,13 +23,13 @@ Live Wallpaper 不是此类软件唯一的一款,但它是最好的一款之 从精细的(‘noise’)到狂热的 (‘nexus’),包罗万象,甚至有受到Ubuntu Phone欢迎屏幕启发的obligatory锁屏壁纸。 - Circles — 带着‘evolving circle’风格的时钟,灵感来自于Ubuntu Phone -- Galaxy — 支持自定义大小,位置的星系 -- Gradient Clock — 覆盖基本梯度的时钟 +- Galaxy — 支持自定义大小,位置的旋转星系 +- Gradient Clock — 放在倾斜面上的polar时钟 - Nexus — 亮色粒子火花穿越屏幕 - Noise — 类似于iOS动态壁纸的Bokeh设计 - Photoslide — 由文件夹(默认为 ~/Photos)内照片构成的动态网格相册 -Live Wallpaper **完全开源** ,所以没有什么能够阻挡天马行空的艺术家用提供的做法(当然还有耐心)来创造他们自己的精美主题。 +Live Wallpaper **完全开源**,所以没有什么能够阻挡天马行空的艺术家们用诀窍(当然还有耐心)来创造他们自己的精美主题。 ### 设置 & 特点 ### @@ -39,24 +37,24 @@ Live Wallpaper **完全开源** ,所以没有什么能够阻挡天马行空 虽然某些主题与其它主题相比有更多的选项,但每款主题都可以通过某些方式来配置或者定制。 -例如, Nexus主题中 (上图所示) 你可以更改脉冲粒子的数量,颜色,大小和出现频率。 +例如,Nexus主题中 (上图所示) 你可以更改脉冲粒子的数量,颜色,大小和出现频率。 首选项提供了 **通用选项** 适用于所有主题,包括: -- 设置登陆界面的动态壁纸 +- 设置登录界面的动态壁纸 - 自定义动画背景 - 调节 FPS (包括在屏幕上显示FPS) -- 指定多显示器行为 +- 指定多显示器的行为 有如此多的选项,diy适用于你自己的桌面背景是很容易的。 ### 缺陷 ### #### 没有桌面图标 #### + Live Wallpaper在运行时,你无法在桌面添加,打开或者是编辑文件和文件夹。 -首选项程序提供了一个选项来让你这样做(只是猜测)。也许是它只能在老版本中使用,在我们的测试中-测试环境为Ununtu 14.10,它并没有用。 -在测试中发现当把桌面壁纸设置成格式为png的图片文件时,这个选项有用,不需要是透明的png图片文件,只要是png图片文件就行了。 +首选项程序提供了一个选项来让你这样做(只是猜测)。也许是它只能在老版本中使用,在我们的测试中-测试环境为Ununtu 14.10,它不工作。但在测试中发现当把桌面壁纸设置成格式为png的图片文件时,这个选项有用,不需要是透明的png图片文件,只要是png图片文件就行了。 #### 资源占用 #### @@ -68,9 +66,9 @@ Live Wallpaper在运行时,你无法在桌面添加,打开或者是编辑文 对我来说最大的“bug”绝对是没有“退出”选项。 -当然,Sure, 动态壁纸可以通过托盘图标和首选项完全退出,那退出托盘图标呢?没办法。只能在终端执行命令‘pkill livewallpaper’。 +当然,动态壁纸可以通过托盘图标和首选项完全退出,那退出托盘图标呢?没办法。只能在终端执行命令‘pkill livewallpaper’。 -### 怎么在 Ubuntu 14.04 LTS +上安装 Live Wallpaper ### +### 怎么在 Ubuntu 14.04 LTS+ 上安装 Live Wallpaper ### ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/terminal-command-750x146.jpg) @@ -81,7 +79,7 @@ Live Wallpaper在运行时,你无法在桌面添加,打开或者是编辑文 sudo apt-get update && sudo apt-get install livewallpaper -你还需要安装 indicator applet, 这样可以方便快速的打开或是关闭动态壁纸,从菜单选择主题,另外图形配置工具可以让你基于你自己的口味来配置每款主题。 +你还需要安装 indicator applet,这样可以方便快速的打开或是关闭动态壁纸,从菜单选择主题,另外图形配置工具可以让你基于你自己的口味来配置每款主题。 sudo apt-get install livewallpaper-config livewallpaper-indicator @@ -89,11 +87,11 @@ Live Wallpaper在运行时,你无法在桌面添加,打开或者是编辑文 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/live-wallpaper-app-launcher.png) -让人不爽的是,安装完成后,程序不会自动打开托盘图标,而仅仅将它自己加入自动启动项,所以,快速来个注消 > 登陆它就会出现啦。 +让人不爽的是,安装完成后,程序不会自动打开托盘图标,而仅仅将它自己加入自动启动项,所以,快速来个注销 -> 登陆它就会出现啦。 ### 总结 ### -如果你正处在无聊呆板的桌面中,幻想有一个更有活力的生活,不防试试。另外,告诉我们你想看到什么样的动态壁纸! +如果你正处在无聊呆板的桌面中,幻想有一个更有活力的生活,不妨试试。另外,告诉我们你想看到什么样的动态壁纸! -------------------------------------------------------------------------------- @@ -101,7 +99,7 @@ via: http://www.omgubuntu.co.uk/2015/05/animated-wallpaper-adds-live-backgrounds 作者:[Joey-Elijah Sneddon][a] 译者:[Love-xuan](https://github.com/Love-xuan) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 3e340322649526ee33342d8570a22fea8a4bd28f Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 14 Jul 2015 17:50:27 +0800 Subject: [PATCH 1384/2517] PUB:20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04 @geekpi --- ...by on Rails using rbenv on Ubuntu 15.04.md | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) rename {translated/tech => published}/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md (64%) diff --git a/translated/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md b/published/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md similarity index 64% rename from translated/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md rename to published/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md index 65ff38744e..9d597fff54 100644 --- a/translated/tech/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md +++ b/published/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md @@ -1,6 +1,7 @@ -在Ubuntu 15.04中安装RUby on Rails +在Ubuntu 15.04中安装Ruby on Rails ================================================================================ -本篇我们会学习如何用rbenv在Ubuntu 15.04中安装Ruby on Rails。我们选择Ubuntu作为操作系统因为Ubuntu是Linux发行版中自带很多包和完整文档的操作系统,因此我认为这是正确的选择。如果你不想安装最新的Ubuntu,你可以从[下载iso文件][1]开始。 + +本篇我们会学习如何用rbenv在Ubuntu 15.04中安装Ruby on Rails。我们选择Ubuntu作为操作系统是因为Ubuntu是Linux发行版中自带很多包和完整文档的操作系统,因此我认为这是正确的选择。如果你还没有安装最新的Ubuntu,你可以从[下载iso文件][1]开始。 ### 安装 Ruby ### @@ -9,9 +10,9 @@ sudo apt-get update sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev -有三种方法来安装Ruby比如rbenv,rvm和从源码安装。每种都有各自的好处,但是这些天开发者们更倾向使用rbenv而不是rvm和源码来安装。我们将安装最新的Ruby版本,2.2.2。 +有三种方法来安装Ruby:rbenv、rvm和从源码安装。每种都有各自的好处,但是近来开发者们更倾向使用rbenv而不是rvm和源码来安装。我们将安装最新的Ruby版本,2.2.2。 -用rbenv来安装只有简单的两步。第一步安装rbenv接着是ruby-build: +用rbenv来安装只有简单的两步。第一步安装rbenv,接着是ruby-build: cd git clone git://github.com/sstephenson/rbenv.git .rbenv @@ -28,23 +29,23 @@ rbenv global 2.2.2 ruby -v -我们需要安装Bundler但是我们要在安装之前告诉rubygems不要为每个包本地安装文档。 +我们需要安装Bundler,但是我们要在安装之前告诉rubygems不要为每个包安装本地文档。 echo "gem: --no-ri --no-rdoc" > ~/.gemrc gem install bundler ### 配置 GIT ### -配置git之前,你要创建一个github账号,你可以注册[git][2]。我们需要git作为版本控制系统,因此我们要设置来匹配github账号。 +配置git之前,你要创建一个github账号,你可以注册一个[github 账号][2]。我们需要git作为版本控制系统,因此我们要设置它来匹配github账号。 -用户的github账号来代替下面的**Name** 和 **Email address** 。 +用户的github账号来替换下面的**Name** 和 **Email address** 。 git config --global color.ui true git config --global user.name "YOUR NAME" git config --global user.email "YOUR@EMAIL.com" ssh-keygen -t rsa -C "YOUR@EMAIL.com" -接下来用新生成的ssh key添加到github账号中。这样你需要复制下面命令的输出并[粘贴在这][3]。 +接下来用新生成的ssh key添加到github账号中。这样你需要复制下面命令的输出并[粘贴在Github的设置页面里面][3]。 cat ~/.ssh/id_rsa.pub @@ -58,7 +59,7 @@ ### 安装 Rails ### -我们需要安装javascript运行时,像NodeJS因为这些天Rails带来很多依赖。这样我们可以结合并缩小你的javascript来提供一个更快的生产环境。 +我们需要安装像NodeJS这样的javascript运行时环境,因为近来Rails的依赖越来越多了。这样我们可以合并和压缩你的javascript,从而提供一个更快的生产环境。 我们需要添加PPA来安装nodeJS。 @@ -66,7 +67,7 @@ sudo apt-get update sudo apt-get install nodejs -如果在更新是晕倒了问题,你可以试试这个命令: +如果在更新时遇到了问题,你可以试试这个命令: # Note the new setup script name for Node.js v0.12 curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - @@ -74,15 +75,15 @@ # Then install with: sudo apt-get install -y nodejs -下一步,用这个命令: +下一步,用这个命令安装 rails: gem install rails -v 4.2.1 -因为我们正在使用rbenv,用下面的命令来安装rails。 +因为我们正在使用rbenv,用下面的命令来让rails的执行程序可以使用。 rbenv rehash -要确保rails已经正确安炸u哪个,你可以运行rails -v,显示如下: +要确保rails已经正确安装,你可以运行rails -v,显示如下: rails -v # Rails 4.2.1 @@ -91,25 +92,25 @@ ### 设置 MySQL ### -或许你已经熟悉MySQL了,你可以从Ubuntu的仓库中安装MySQL的客户端与服务端。你可以在安装时设置root用户密码。这个信息将来会进入你rails程序的database.yml文件中、用下面的命令来安装mysql。 +或许你已经熟悉MySQL了,你可以从Ubuntu的仓库中安装MySQL的客户端与服务端。你可以在安装时设置root用户密码。这个信息将来会进入你rails程序的database.yml文件中。用下面的命令来安装mysql。 sudo apt-get install mysql-server mysql-client libmysqlclient-dev -安装libmysqlclient-dev用于提供在设置rails程序时,rails在连接mysql所需要用到的用于编译mysql2 gem的文件。 +安装libmysqlclient-dev用于mysql2 gem的编译;在设置rails程序时,rails通过它来连接mysql。 ### 最后一步 ### 让我们尝试创建你的第一个rails程序: - # Use MySQL + # 使用 MySQL 数据库 rails new myapp -d mysql - # Move into the application directory + # 进入到应用目录 cd myapp - # Create Database + # 创建数据库 rake db:create @@ -125,7 +126,7 @@ nano config/database.yml -接着输入MySql root用户的密码。 +接着填入MySql root用户的密码。 ![](http://blog.linoxide.com/wp-content/uploads/2015/05/root_passw.png) @@ -133,7 +134,7 @@ ### 总结 ### -Rails是用Ruby写的, 也就是随着rails一起使用的编程语言。在Ubuntu 15.04中Ruby on Rails可以用rbenv、 rvm和源码的方式来安装。本篇我们使用的是rbenv方式并用了MySQL作为数据库。有任何的问题或建议,请在评论栏指出。 +Rails是用Ruby写的, 也是随着rails一起使用的编程语言。在Ubuntu 15.04中Ruby on Rails可以用rbenv、 rvm和源码的方式来安装。本篇我们使用的是rbenv方式并用了MySQL作为数据库。有任何的问题或建议,请在评论栏指出。 -------------------------------------------------------------------------------- @@ -141,7 +142,7 @@ via: http://linoxide.com/ubuntu-how-to/installing-ruby-rails-using-rbenv-ubuntu- 作者:[Obet][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From f210181ca95efbf33ffc870c1189ae1347d67794 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 14 Jul 2015 17:54:06 +0800 Subject: [PATCH 1385/2517] Translating by ZTinoZ --- ...709 7 command line tools for monitoring your Linux system.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md index 54764e2a54..fcbbb04068 100644 --- a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md +++ b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md @@ -18,7 +18,7 @@ FYI: 本文中的截图取自[Debian Linux 8.1][1] (“Jessie”),其运行在 ### Top命令 ### -One of the simpler Linux system monitoring tools, the **top command** comes with pretty much every flavor of Linux. This is the default display, but pressing the “z” key switches the display to color. Other hot keys and command line switches control things such as the display of summary and memory information (the second through fourth lines), sorting the list according to various criteria, killing tasks, and so on (you can find the complete list at [here][5]). +作为Linux系统监控工具中比较易用的一个,**top命令**能带我们一览Linux中的几乎每一处。以下这张图是它的默认界面,但是按“z”键可以切换不同的显示颜色。其它热键和命令则有其它的功能,例如显示概要信息和内存信息(第四行第二个),根据各种不一样的条件排序、终止进程任务等等(你可以在[这里][5]找到完整的列表)。 ![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-4-100591904-orig.png) From b390f6619c7bdec3c7f0a5becbdfe24cf62d5a46 Mon Sep 17 00:00:00 2001 From: Yu Ye Date: Tue, 14 Jul 2015 18:55:04 +0800 Subject: [PATCH 1386/2517] Update 20141223 Defending the Free Linux World.md --- sources/talk/20141223 Defending the Free Linux World.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20141223 Defending the Free Linux World.md b/sources/talk/20141223 Defending the Free Linux World.md index c421ad96fe..0a552e640d 100644 --- a/sources/talk/20141223 Defending the Free Linux World.md +++ b/sources/talk/20141223 Defending the Free Linux World.md @@ -1,3 +1,5 @@ +Translating by H-mudcup + Defending the Free Linux World ================================================================================ ![](http://www.linuxinsider.com/ai/908455/open-invention-network.jpg) @@ -122,4 +124,4 @@ via: http://www.linuxinsider.com/story/Defending-the-Free-Linux-World-81512.html [2]:http://www.redhat.com/ [3]:http://www.law.uh.edu/ [4]:http://www.chaoticmoon.com/ -[5]:http://www.ieee.org/ \ No newline at end of file +[5]:http://www.ieee.org/ From 17ad2d5061d1fb826722a47ff8b93fd01da83d4e Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 14 Jul 2015 19:24:07 +0800 Subject: [PATCH 1387/2517] Create 20150713 How to manage Vim plugins 20150713 How to manage Vim plugins translated by XLCYun --- .../tech/20150713 How to manage Vim plugins | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 translated/tech/20150713 How to manage Vim plugins diff --git a/translated/tech/20150713 How to manage Vim plugins b/translated/tech/20150713 How to manage Vim plugins new file mode 100644 index 0000000000..5f3b7ac6be --- /dev/null +++ b/translated/tech/20150713 How to manage Vim plugins @@ -0,0 +1,146 @@ + 如何管理Vim插件 + ================================================================================ + + Vim是Linux上一个轻量级的通用文本编辑器。虽然它开始时的学习曲线对于一般的Linux用户来说可能很困难,但比起它的好处,这些付出完全是值得的。随着功能的增长,在插件工具的应用下,Vim是完全可定制的。但是,由于它高级的功能配置,你需要花一些时间去了解它的插件系统,然后才能够有效地去个性化定置Vim。幸运的是,我们已经有一些工具能够使我们在使用Vim插件时更加轻松。而我日常所使用的就是Vundle. + ### 什么是Vundle ### + + [Vundle][1]是一个vim插件管理器,用于支持Vim包。Vundle能让你很简单地实现插件的安装,升级,搜索或者清除。它还能管理你的运行环境并且在标签方面提供帮助。 + ### 安装Vundle ### + + 首先,如果你的Linux系统上没有Git的话,先[安装Git][2]. + + 接着,创建一个目录,Vim的插件将会被下载并且安装在这个目录上。默认情况下,这个目录为~/.vim/bundle。 + + $ mkdir -p ~/.vim/bundle + + 现在,安装Vundle如下。注意Vundle本身也是一个vim插件。因此我们同样把vundle安装到之前创建的目录~/.vim/bundle下。 + + $ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim + + ### 配置Vundle ### + + 现在配置你的.vimrc文件如下: + + set nocompatible " This is required + " 这是被要求的。(译注:中文注释为译者所加,下同。) + filetype off " This is required + " 这是被要求的。 + + " Here you set up the runtime path  + " 在这里设置你的运行时环境的路径。 + set rtp+=~/.vim/bundle/Vundle.vim + + " Initialize vundle  + " 初始化vundle + call vundle#begin() + + " This should always be the first  + " 这一行应该永远放在前面。 + Plugin 'gmarik/Vundle.vim' + + " This examples are from https://github.com/gmarik/Vundle.vim README + " 这个示范来自https://github.com/gmarik/Vundle.vim README + Plugin 'tpope/vim-fugitive' + + " Plugin from http://vim-scripts.org/vim/scripts.html + " 取自http://vim-scripts.org/vim/scripts.html的插件 + Plugin 'L9' + + " Git plugin not hosted on GitHub + " Git插件,但并不在GitHub上。 + Plugin 'git://git.wincent.com/command-t.git' + + "git repos on your local machine (i.e. when working on your own plugin) + "本地计算机上的Git仓库路径 (例如,当你在开发你自己的插件时) + Plugin 'file:///home/gmarik/path/to/plugin' + + " The sparkup vim script is in a subdirectory of this repo called vim. + " Pass the path to set the runtimepath properly. + " vim脚本sparkup存放在这个名叫vim的仓库下的一个子目录中。 + " 提交这个路径来正确地设置运行时路径 + Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} + + " Avoid a name conflict with L9 + " 避免与L9发生名字上的冲突 + Plugin 'user/L9', {'name': 'newL9'} + + "Every Plugin should be before this line + "所有的插件都应该在这一行之前。 + call vundle#end() " required 被要求的 + + 容我简单解释一下上面的设置:默认情况下,Vundle将从github.com或者vim-scripts.org下载和安装vim插件。你也可以改变这个默认行为。 + + 要从github安装(安装插件,译者注,下同): + Plugin 'user/plugin' + + 要从http://vim-scripts.org/vim/scripts.html处安装: + Plugin 'plugin_name' + + 要从另外一个git仓库中安装: + + Plugin 'git://git.another_repo.com/plugin' + + 从本地文件中安装: + + Plugin 'file:///home/user/path/to/plugin' + + + 你同样可以定制其它东西,例如你的插件运行时路径,当你自己在编写一个插件时,或者你只是想从其它目录——而不是~/.vim——中加载插件时,这样做就非常有用。 + + Plugin 'rstacruz/sparkup', {'rtp': 'another_vim_path/'} + + 如果你有同名的插件,你可以重命名你的插件,这样它们就不会发生冲突了。 + + Plugin 'user/plugin', {'name': 'newPlugin'} + + ### 使用Vum命令 ### + 一旦你用vundle设置好你的插件,你就可以通过几个vundle命令来安装,升级,搜索插件,或者清除没有用的插件。 + + #### 安装一个新的插件 #### + + 所有列在你的.vimrc文件中的插件,都会被PluginInstall命令安装。你也可以通递一个插件名给它,来安装某个的特定插件。 + :PluginInstall + :PluginInstall <插件名> + + ![](https://farm1.staticflickr.com/559/18998707843_438cd55463_c.jpg) + + #### 清除没有用的插件 #### + + 如果你有任何没有用到的插件,你可以通过PluginClean命令来删除它. + :PluginClean + + ![](https://farm4.staticflickr.com/3814/19433047689_17d9822af6_c.jpg) + + #### 查找一个插件 #### + + 如果你想从提供的插件清单中安装一个插件,搜索功能会很有用 + :PluginSearch <文本> + + ![](https://farm1.staticflickr.com/541/19593459846_75b003443d_c.jpg) + + + 在搜索的时候,你可以在交互式分割窗口中安装,清除,重新搜索或者重新加载插件清单.安装后的插件不会自动加载生效,要使其加载生效,可以将它们添加进你的.vimrc文件中. + ### 总结 ### + + Vim是一个妙不可言的工具.它不单单是一个能够使你的工作更加顺畅高效的默认文本编辑器,同时它还能够摇身一变,成为现存的几乎任何一门编程语言的IDE. + + 注意,有一些网站能帮你找到适合的vim插件.猛击[http://www.vim-scripts.org][3], Github或者 [http://www.vimawesome.com][4] 获取新的脚本或插件.同时记得为你的插件使用帮助供应程序 + + 和你最爱的编辑器一起嗨起来吧! + + -------------------------------------------------------------------------------- + + via: http://xmodulo.com/manage-vim-plugins.html + + 作者:[Christopher Valerio][a] + 译者:[XLCYun(袖里藏云)](https://github.com/XLCYun) + 校对:[校对者ID](https://github.com/校对者ID) + + 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + + [a]:http://xmodulo.com/author/valerio + [1]:https://github.com/VundleVim/Vundle.vim + [2]:http://ask.xmodulo.com/install-git-linux.html + [3]:http://www.vim-scripts.org/ + [4]:http://www.vimawesome.com/ + From 35c2f78485d4775752fdd4edbdd647a5bbe1fe64 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 14 Jul 2015 19:25:26 +0800 Subject: [PATCH 1388/2517] Update 20150713 How to manage Vim plugins --- translated/tech/20150713 How to manage Vim plugins | 1 + 1 file changed, 1 insertion(+) diff --git a/translated/tech/20150713 How to manage Vim plugins b/translated/tech/20150713 How to manage Vim plugins index 5f3b7ac6be..ce47dac126 100644 --- a/translated/tech/20150713 How to manage Vim plugins +++ b/translated/tech/20150713 How to manage Vim plugins @@ -1,4 +1,5 @@ 如何管理Vim插件 + ================================================================================ Vim是Linux上一个轻量级的通用文本编辑器。虽然它开始时的学习曲线对于一般的Linux用户来说可能很困难,但比起它的好处,这些付出完全是值得的。随着功能的增长,在插件工具的应用下,Vim是完全可定制的。但是,由于它高级的功能配置,你需要花一些时间去了解它的插件系统,然后才能够有效地去个性化定置Vim。幸运的是,我们已经有一些工具能够使我们在使用Vim插件时更加轻松。而我日常所使用的就是Vundle. From 118a6689dc2732d9ae11ddecfd86522985be3fea Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 14 Jul 2015 19:33:40 +0800 Subject: [PATCH 1389/2517] Update 20150713 How to manage Vim plugins --- translated/tech/20150713 How to manage Vim plugins | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/translated/tech/20150713 How to manage Vim plugins b/translated/tech/20150713 How to manage Vim plugins index ce47dac126..4c58930eb7 100644 --- a/translated/tech/20150713 How to manage Vim plugins +++ b/translated/tech/20150713 How to manage Vim plugins @@ -1,6 +1,8 @@ - 如何管理Vim插件 - - ================================================================================ + +如何管理Vim插件 +================================================================================ + + Vim是Linux上一个轻量级的通用文本编辑器。虽然它开始时的学习曲线对于一般的Linux用户来说可能很困难,但比起它的好处,这些付出完全是值得的。随着功能的增长,在插件工具的应用下,Vim是完全可定制的。但是,由于它高级的功能配置,你需要花一些时间去了解它的插件系统,然后才能够有效地去个性化定置Vim。幸运的是,我们已经有一些工具能够使我们在使用Vim插件时更加轻松。而我日常所使用的就是Vundle. ### 什么是Vundle ### From 25e9ffd53e9ea1f630ed7d9dfc973c85be3a8301 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 14 Jul 2015 20:10:29 +0800 Subject: [PATCH 1390/2517] Update 20150713 How to manage Vim plugins --- .../tech/20150713 How to manage Vim plugins | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/translated/tech/20150713 How to manage Vim plugins b/translated/tech/20150713 How to manage Vim plugins index 4c58930eb7..bbc7a8502f 100644 --- a/translated/tech/20150713 How to manage Vim plugins +++ b/translated/tech/20150713 How to manage Vim plugins @@ -1,14 +1,14 @@ - + 如何管理Vim插件 ================================================================================ Vim是Linux上一个轻量级的通用文本编辑器。虽然它开始时的学习曲线对于一般的Linux用户来说可能很困难,但比起它的好处,这些付出完全是值得的。随着功能的增长,在插件工具的应用下,Vim是完全可定制的。但是,由于它高级的功能配置,你需要花一些时间去了解它的插件系统,然后才能够有效地去个性化定置Vim。幸运的是,我们已经有一些工具能够使我们在使用Vim插件时更加轻松。而我日常所使用的就是Vundle. - ### 什么是Vundle ### +### 什么是Vundle ### [Vundle][1]是一个vim插件管理器,用于支持Vim包。Vundle能让你很简单地实现插件的安装,升级,搜索或者清除。它还能管理你的运行环境并且在标签方面提供帮助。 - ### 安装Vundle ### +### 安装Vundle ### 首先,如果你的Linux系统上没有Git的话,先[安装Git][2]. @@ -20,7 +20,7 @@ $ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim - ### 配置Vundle ### +### 配置Vundle ### 现在配置你的.vimrc文件如下: @@ -96,10 +96,10 @@ Plugin 'user/plugin', {'name': 'newPlugin'} - ### 使用Vum命令 ### +### 使用Vum命令 ### 一旦你用vundle设置好你的插件,你就可以通过几个vundle命令来安装,升级,搜索插件,或者清除没有用的插件。 - #### 安装一个新的插件 #### +#### 安装一个新的插件 #### 所有列在你的.vimrc文件中的插件,都会被PluginInstall命令安装。你也可以通递一个插件名给它,来安装某个的特定插件。 :PluginInstall @@ -114,7 +114,7 @@ ![](https://farm4.staticflickr.com/3814/19433047689_17d9822af6_c.jpg) - #### 查找一个插件 #### +#### 查找一个插件 #### 如果你想从提供的插件清单中安装一个插件,搜索功能会很有用 :PluginSearch <文本> @@ -123,11 +123,11 @@ 在搜索的时候,你可以在交互式分割窗口中安装,清除,重新搜索或者重新加载插件清单.安装后的插件不会自动加载生效,要使其加载生效,可以将它们添加进你的.vimrc文件中. - ### 总结 ### +### 总结 ### Vim是一个妙不可言的工具.它不单单是一个能够使你的工作更加顺畅高效的默认文本编辑器,同时它还能够摇身一变,成为现存的几乎任何一门编程语言的IDE. - 注意,有一些网站能帮你找到适合的vim插件.猛击[http://www.vim-scripts.org][3], Github或者 [http://www.vimawesome.com][4] 获取新的脚本或插件.同时记得为你的插件使用帮助供应程序 + 注意,有一些网站能帮你找到适合的vim插件.猛击[http://www.vim-scripts.org][3], Github或者 [http://www.vimawesome.com][4] 获取新的脚本或插件.同时记得为你的插件使用帮助供应程序. 和你最爱的编辑器一起嗨起来吧! From 8da7451463407cc0b2a54b645fd9e152b0716400 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 14 Jul 2015 20:13:53 +0800 Subject: [PATCH 1391/2517] Update 20150713 How to manage Vim plugins --- translated/tech/20150713 How to manage Vim plugins | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150713 How to manage Vim plugins b/translated/tech/20150713 How to manage Vim plugins index bbc7a8502f..c575d426e3 100644 --- a/translated/tech/20150713 How to manage Vim plugins +++ b/translated/tech/20150713 How to manage Vim plugins @@ -107,7 +107,7 @@ ![](https://farm1.staticflickr.com/559/18998707843_438cd55463_c.jpg) - #### 清除没有用的插件 #### +#### 清除没有用的插件 #### 如果你有任何没有用到的插件,你可以通过PluginClean命令来删除它. :PluginClean From 6638649aeeb620cee7b328ec23d74bf7e9d8ef18 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 14 Jul 2015 20:28:18 +0800 Subject: [PATCH 1392/2517] XLCYun translating. --- ...o Fix System Program Problem Detected In Ubuntu 14.04.md} | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) rename sources/tech/{20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md => XLCYun translating 20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md} (99%) diff --git a/sources/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md b/sources/tech/XLCYun translating 20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md similarity index 99% rename from sources/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md rename to sources/tech/XLCYun translating 20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md index 4a91a6aeb3..4de779a599 100644 --- a/sources/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md +++ b/sources/tech/XLCYun translating 20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md @@ -1,3 +1,6 @@ +XLCYun translating. + + How To Fix System Program Problem Detected In Ubuntu 14.04 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/system_program_Problem_detected.jpeg) @@ -79,4 +82,4 @@ via: http://itsfoss.com/how-to-fix-system-program-problem-detected-ubuntu/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://itsfoss.com/how-to-solve-sorry-ubuntu-12-04-has-experienced-an-internal-error/ -[2]:https://launchpad.net/ \ No newline at end of file +[2]:https://launchpad.net/ From cf6cd2ce1b2ea29e32f0a6dc9a102aaf687ff6a8 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 14 Jul 2015 20:35:57 +0800 Subject: [PATCH 1393/2517] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=96=87?= =?UTF-8?q?=2020150713=20How=20to=20manage=20Vim=20plugins.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除原文 20150713 How to manage Vim plugins.md --- .../20150713 How to manage Vim plugins.md | 140 ------------------ 1 file changed, 140 deletions(-) delete mode 100644 sources/tech/20150713 How to manage Vim plugins.md diff --git a/sources/tech/20150713 How to manage Vim plugins.md b/sources/tech/20150713 How to manage Vim plugins.md deleted file mode 100644 index 147f89b0b7..0000000000 --- a/sources/tech/20150713 How to manage Vim plugins.md +++ /dev/null @@ -1,140 +0,0 @@ -XLCYun 翻译中 -How to manage Vim plugins -================================================================================ -Vim is a versatile, lightweight text editor on Linux. While its initial learning curve can be overwhelming for an average Linux user, its benefits are completely worthy. As far as the functionality goes, Vim is fully customizable by means of plugins. Due to its high level of configuration, though, you need to spend some time with its plugin system to be able to personalize Vim in an effective way. Luckily, we have several tools that make our life with Vim plugins easier. The one I use on a daily basis is Vundle. - -### What is Vundle? ### - -[Vundle][1], which stands for Vim Bundle, is a Vim plugin manager. Vundle allows you to install, update, search and clean up Vim plugins very easily. It can also manage your runtime and help with tags. In this tutorial, I am going to show how to install and use Vundle. - -### Installing Vundle ### - -First, [install Git][2] if you don't have it on your Linux system. - -Next, create a directory where Vim plugins will be downloaded and installed. By default, this directory is located at ~/.vim/bundle - - $ mkdir -p ~/.vim/bundle - -Now go ahead and install Vundle as follows. Note that Vundle itself is another Vim plugin. Thus we install Vundle under ~/.vim/bundle we created earlier. - - $ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim - -### Configuring Vundle ### - -Now set up you .vimrc file as follows: - - set nocompatible " This is required - filetype off " This is required - - " Here you set up the runtime path - set rtp+=~/.vim/bundle/Vundle.vim - - " Initialize vundle - call vundle#begin() - - " This should always be the first - Plugin 'gmarik/Vundle.vim' - - " This examples are from https://github.com/gmarik/Vundle.vim README - Plugin 'tpope/vim-fugitive' - - " Plugin from http://vim-scripts.org/vim/scripts.html - Plugin 'L9' - - "Git plugin not hosted on GitHub - Plugin 'git://git.wincent.com/command-t.git' - - "git repos on your local machine (i.e. when working on your own plugin) - Plugin 'file:///home/gmarik/path/to/plugin' - - " The sparkup vim script is in a subdirectory of this repo called vim. - " Pass the path to set the runtimepath properly. - Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} - - " Avoid a name conflict with L9 - Plugin 'user/L9', {'name': 'newL9'} - - "Every Plugin should be before this line - - call vundle#end() " required - -Let me explain the above configuration a bit. By default, Vundle downloads and installs Vim plugins from github.com or vim-scripts.org. You can modify the default behavior. - -To install from Github: - - Plugin 'user/plugin' - -To install from http://vim-scripts.org/vim/scripts.html: - - Plugin 'plugin_name' - -To install from another git repo: - - Plugin 'git://git.another_repo.com/plugin' - -To install from a local file: - - Plugin 'file:///home/user/path/to/plugin' - -Also you can customize others such as the runtime path of you plugins, which is really useful if you are programming a plugin yourself, or just want to load it from another directory that is not ~/.vim. - - Plugin 'rstacruz/sparkup', {'rtp': 'another_vim_path/'} - -If you have plugins with the same names, you can rename you plugin so that it doesn't conflict. - - Plugin 'user/plugin', {'name': 'newPlugin'} - -### Using Vum Commands ### - -Once you have set up you plugins with Vundle, you can use it to to install, update, search and clean unused plugins using several Vundle commands. - -#### Installing a new plugin #### - -The PluginInstall command will install all plugins listed in your .vimrc file. You can also install just one specific plugin by passing its name. - - :PluginInstall - :PluginInstall - -![](https://farm1.staticflickr.com/559/18998707843_438cd55463_c.jpg) - -#### Cleaning up an unused plugin #### - -If you have any unused plugin, you can remove it by using the PluginClean command. - - :PluginClean - -![](https://farm4.staticflickr.com/3814/19433047689_17d9822af6_c.jpg) - -#### Searching for a plugin #### - -If you want to install a plugin from a plugin list provided, search functionality can be useful. - -:PluginSearch - -![](https://farm1.staticflickr.com/541/19593459846_75b003443d_c.jpg) - -While searching, you can install, clean, research or reload the same list on the interactive split. Installing plugins won't load your plugins automatically. To do so, add them to you .vimrc file. - -### Conclusion ### - -Vim is an amazing tool. It can not only be a great default text editor that can make your work flow faster and smoother, but also be turned into an IDE for almost any programming language available. Vundle can be a big help in personalizing the powerful Vim environment quickly and easily. - -Note that there are several sites that allow you to find the right Vim plugins for you. Always check [http://www.vim-scripts.org][3], Github or [http://www.vimawesome.com][4] for new scripts or plugins. Also remember to use the help provider for you plugin. - -Keep rocking with your favorite text editor! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/manage-vim-plugins.html - -作者:[Christopher Valerio][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/valerio -[1]:https://github.com/VundleVim/Vundle.vim -[2]:http://ask.xmodulo.com/install-git-linux.html -[3]:http://www.vim-scripts.org/ -[4]:http://www.vimawesome.com/ From e350614a5f53fe487941af1750ce97bb5ea27a38 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 14 Jul 2015 21:53:57 +0800 Subject: [PATCH 1394/2517] PUB:20150407 10 Truly Amusing Easter Eggs in Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @H-mudcup 翻译的很好,语言组织也很好。最后有一个词翻译错了。port 在这里指移植,不是通常的端口的意思。 --- ...7 10 Truly Amusing Easter Eggs in Linux.md | 53 +++++++++++-------- 1 file changed, 31 insertions(+), 22 deletions(-) rename {translated/share => published}/20150407 10 Truly Amusing Easter Eggs in Linux.md (77%) diff --git a/translated/share/20150407 10 Truly Amusing Easter Eggs in Linux.md b/published/20150407 10 Truly Amusing Easter Eggs in Linux.md similarity index 77% rename from translated/share/20150407 10 Truly Amusing Easter Eggs in Linux.md rename to published/20150407 10 Truly Amusing Easter Eggs in Linux.md index 4f783d829c..b68ae7bb81 100644 --- a/translated/share/20150407 10 Truly Amusing Easter Eggs in Linux.md +++ b/published/20150407 10 Truly Amusing Easter Eggs in Linux.md @@ -1,9 +1,11 @@ -Translating by H-mudcup - -Linux上绝对有趣的10个彩蛋 +十个非常有趣的 Linux 彩蛋 ================================================================================ + +*制作 Adventure 的程序员悄悄的把一个秘密的功能塞进了游戏里。Atari 并没有对此感到生气,而是给这类“秘密功能”起了个名字——“彩蛋”,因为——你懂的——你会像找复活节彩蛋一样寻找它们。* + ![](http://en.wikipedia.org/wiki/File:Adventure_Easteregg.PNG) -制作 Adventure 的程序员悄悄的把一个秘密的功能塞进了游戏里。Atari 并没有对此感到生气,而是给这类“秘密功能”起了个名字——“彩蛋”,因为——你懂的——你会像找复活节彩蛋一样寻找它们。图片来自: Wikipedia。 + +*图片来自: Wikipedia* 在1979年的时候,公司为 Atari 2600 开发了一个电子游戏——[Adventure][1]。 @@ -13,9 +15,9 @@ Atari 有一项反对作者将自己的名字放进他们的游戏里的政策 这种软件里的“隐藏功能”并不是第一次出现(这类特性的首次出现是在1966年[PDP-10][3]的操作系统上),但这是它第一次有了名字,同时也是第一次真正的被众多电脑用户和游戏玩家所注意。 -Linux(以及和Linux相关的软件)并没有被遗忘。这些年来,人们为这个倍受喜爱的操作系统创作了很多非常有趣的彩蛋。下面将介绍我个人最喜爱的彩蛋——以及如何得到它们。 +Linux(以及和Linux相关的软件)也没有被遗忘。这些年来,人们为这个倍受喜爱的操作系统创作了很多非常有趣的彩蛋。下面将介绍我个人最喜爱的彩蛋——以及如何找到它们。 -你将迅速意识到这些彩蛋大多需要通过终端才能体验到。这是故意的。因为终端比较酷。【我应该借此机机会提醒你一下,如果你想运行我所列出的应用,然而你却还没有安装它们,你是绝对无法运行成功的。你应该先安装好它们的。因为……毕竟只是计算机。】 +你很快就会想到这些彩蛋大多需要通过终端才能体验到。这是故意的。因为终端比较酷。【我应该借此机机会提醒你一下,如果你想运行我所列出的应用,然而你却还没有安装它们,你是绝对无法运行成功的。你应该先安装好它们的。因为……毕竟只是计算机。】 ### Arch : 包管理器(pacman)里的吃豆人(Pac-Man) ### @@ -28,7 +30,8 @@ Linux(以及和Linux相关的软件)并没有被遗忘。这些年来,人 ### GNU Emacs : 俄罗斯方块(Tetris)以及…… ### ![emacs Tetris](http://www.linux.com/images/stories/41373/emacsTetris.jpg) -我不喜欢 emacs。一点也不喜欢。但是它确实能玩俄罗斯方块。 + +*我不喜欢 emacs。一点也不喜欢。但是它确实能玩俄罗斯方块。* 我要坦白一件事:我不喜欢[emacs][7]。一点也不喜欢。 @@ -36,7 +39,7 @@ Linux(以及和Linux相关的软件)并没有被遗忘。这些年来,人 但是它确实能玩俄罗斯方块。这可不是件小事。方法如下: -第一步)打开 emacs。(有疑问,输入“emacs”。) +第一步)打开 emacs。(有疑问?输入“emacs”。) 第二步)按下键盘上的Esc和X键。 @@ -51,21 +54,24 @@ Linux(以及和Linux相关的软件)并没有被遗忘。这些年来,人 在用基于 Debian 的发行版?试试输入“apt-get moo"。 ![apt-get moo](http://www.linux.com/images/stories/41373/AptGetMoo.jpg) -apt-get moo -简单?的确。但这是只会说话的牛。所以惹我们喜欢。再试试“aptitude moo”。他会告诉你“There are no Easter Eggs in this program(这个程序里没有彩蛋)”。 +*apt-get moo* + +简单?的确。但这是只会说话的牛,所以惹我们喜欢。再试试“aptitude moo”。他会告诉你“There are no Easter Eggs in this program(这个程序里没有彩蛋)”。 关于 [aptitude][9] 有一件事你一定要知道,它是个肮脏、下流的骗子。如果 aptitude 是匹诺曹,那它的鼻子能刺穿月球。在这条命令中添加“-v”选项。不停的添加 v,直到它被逼得投降。 ![](http://www.linux.com/images/stories/41373/AptitudeMoo.jpg) -我猜大家都同意,这是 aptitude 中最重要的功能。 + +*我猜大家都同意,这是 aptitude 中最重要的功能。* 我猜大家都同意,这是 aptitude 中最重要的功能。但是万一你想把自己的话让一头牛说出来怎么办?这时我们就需要“cowsay”了。 -还有,别让“cowsay(牛说)”这个名字把你给骗了。你可以让你的话从各种东西的嘴里说出来。比如一头大象,Calvin,Beavis 甚至可以是Ghostbusters(捉鬼敢死队)的标志。只需在终端输入“cowsay -l”就能看到所有选项的列表。 +还有,别让“cowsay(牛说)”这个名字把你给骗了。你可以让你的话从各种东西的嘴里说出来。比如一头大象,Calvin,Beavis 甚至可以是 Ghostbusters(捉鬼敢死队)的标志。只需在终端输入“cowsay -l”就能看到所有选项的列表。 ![](http://www.linux.com/images/stories/41373/cowsay.jpg) -你可以让你的话从各种东西的嘴里说出来 + +*你可以让你的话从各种东西的嘴里说出来* 想玩高端点的?你可以用管道把其他应用的输出放到 cowsay 中。试试“fortune | cowsay”。非常有趣。 @@ -75,7 +81,7 @@ apt-get moo 输入“sudo visudo”以打开“sudoers”文件。在文件的开头你很可能会看见几行以“Defaults”开头的文字。在那几行后面添加“Defaults insults”并保存文件。 -现在,只要你输错了你的 sudo 密码,你的系统就会骂你。这些提高自信的语句包括“听着,煎饼脑袋,我可没时间听这些垃圾。”,“你吃错药了吧?”以及“你被电过以后大脑就跟以前不太一样了是不是?” +现在,只要你输错了你的 sudo 密码,你的系统就会骂你。这些可以提高自信的语句包括“听着,煎饼脑袋,我可没时间听这些垃圾。”,“你吃错药了吧?”以及“你被电过以后大脑就跟以前不太一样了是不是?” 把这个设在同事的电脑上会有非常有趣。 @@ -85,10 +91,11 @@ apt-get moo 打开火狐浏览器。在地址栏填上“about:about”。你将得到火狐浏览器中所有的“about”页。一点也不炫酷,是不是? -现在试试“about:mozilla”,浏览器就会回应你一条从“[Book of Mozilla(Mozilla 之书)][10]”——浏览网页的圣经——里引用的话。我的另一个最爱是“about:robots”,这个也很有趣。 +现在试试“about:mozilla”,浏览器就会回应你一条从“[Book of Mozilla(Mozilla 之书)][10]”——这本浏览网页的圣经——里引用的话。我的另一个最爱是“about:robots”,这个也很有趣。 ![](http://www.linux.com/images/stories/41373/About-Mozilla550.jpg) -“[Book of Mozilla(Mozilla 之书)][10]”——浏览网页的圣经。 + +*“[Book of Mozilla(Mozilla 之书)][10]”——浏览网页的圣经。* ### 精心调制的混搭日历 ### @@ -105,26 +112,28 @@ apt-get moo 例如: “nmap -oS - google.com” 赶快试试。我知道你有多想这么做。你一定会让安吉丽娜·朱莉(Angelina Jolie)[印象深刻][15] + ### lolcat彩虹 ### 在你的Linux终端里有很多彩蛋真真是极好的……但是如果你还想要变得……更有魅力些怎么办?输入:lolcat。把任何一个程序的文本输出通过管道输入到lolcat里。你会得到它的超级无敌彩虹版。 ![](http://www.linux.com/images/stories/41373/lolcat.jpg) -把任何一个程序的文本输出通过管道输入到lolcat里。你会得到它的超级无敌彩虹版。 + +*把任何一个程序的文本输出通过管道输入到lolcat里。你会得到它的超级无敌彩虹版。* ### 追光标的小家伙 ### ![oneko cat](http://www.linux.com/images/stories/41373/onekocat.jpg) -“Oneko” -- 经典 “Neko”的Linux端口。 -“Oneko” -- 经典 “[Neko][16]”的Linux端口。 . -接下来是“Oneko” -- 经典 “[Neko][16]”的Linux端口。基本上就是个满屏幕追着你的光标跑的小猫。 +*“Oneko” -- 经典 “Neko”的Linux移植版本。* + +接下来是“Oneko” -- 经典 “[Neko][16]”的Linux移植版本。基本上就是个满屏幕追着你的光标跑的小猫。 虽然严格来它并不算是“彩蛋”,它还是很有趣的。而且感觉上也是很彩蛋的。 你还可以用不同的选项(比如“oneko -dog”)把小猫替代成小狗,或是调成其他样式。用这个对付讨厌的同事有着无限的可能。 -There you have it! A list of my favorite Linux Easter Eggs (and things of that ilk). Feel free to add your own favorite in the comments section below. Because this is the Internet. And you can do that sort of thing.就是这些了!一个我最喜欢的Linux彩蛋(或是类似东西)的清单。请尽情的的在下面的评论区留下你的最爱。因为这是互联网。你就能做这些事。 +就是这些了!一个我最喜欢的Linux彩蛋(或是类似东西)的清单。请尽情的的在下面的评论区留下你的最爱。因为这是互联网。你就能做这些事。 -------------------------------------------------------------------------------- @@ -132,7 +141,7 @@ via: http://www.linux.com/news/software/applications/820944-10-truly-amusing-lin 作者:[Bryan Lunduke][a] 译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From a32b54f0ee48404a46b6b653941c79b37a0d8068 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 14 Jul 2015 22:01:13 +0800 Subject: [PATCH 1395/2517] PUB:20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @XLCYun 这是你的第一篇译稿吧?翻译的干净明快,不错,加油! --- ...ng with failure status due to previous errors'.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md (80%) diff --git a/translated/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md b/published/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md similarity index 80% rename from translated/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md rename to published/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md index 4b6b3b0fca..bcf1dfec3f 100644 --- a/translated/tech/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md +++ b/published/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md @@ -1,6 +1,7 @@ -Linux常见问题解答--如何修复"tar:由于前一个错误导致于失败状态中退出"("Exiting with failure status due to previous errors") +Linux常见问题解答--如何修复"tar:由于前一个错误导致于失败状态中退出" ================================================================================ > **问题**: 当我想试着用tar命令来创建一个压缩文件时,总在执行过程中失败,并且抛出一个错误说明"tar:由于前一个错误导致于失败状态中退出"("Exiting with failure status due to previous errors"). 什么导致这个错误的发生,要如何解决? + ![](https://farm9.staticflickr.com/8863/17631029953_1140fe2dd3_b.jpg) 如果当你执行tar命令时,遇到了下面的错误,那么最有可能的原因是对于你想用tar命令压缩的某个文件中,你并不具备其读权限。 @@ -13,21 +14,20 @@ Linux常见问题解答--如何修复"tar:由于前一个错误导致于失败 $ tar cvzfz backup.tgz my_program/ > /dev/null -然后你会看到tar输出的标准错误(stderr)信息。 +然后你会看到tar输出的标准错误(stderr)信息。(LCTT 译注:自然,不用 v 参数也可以。) tar: my_program/src/lib/.conf.db.~lock~: Cannot open: Permission denied tar: Exiting with failure status due to previous errors -你可以从上面的例子中看到,引起错误的原因的确是“读权限不允许”(denied read permission.) -要解决这个问题,只要简单地更改(或移除)问题文件的权限,然后重新执行tar命令即可。 +你可以从上面的例子中看到,引起错误的原因的确是“读权限不允许”(denied read permission.)要解决这个问题,只要简单地更改(或移除)问题文件的权限,然后重新执行tar命令即可。 -------------------------------------------------------------------------------- via: http://ask.xmodulo.com/tar-exiting-with-failure-status-due-to-previous-errors.html 作者:[Dan Nanni][a] -译者:[XLCYun(袖里藏云)](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[XLCYun(袖里藏云)](https://github.com/XLCYun) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From f82d69060985e47c9e758a26db971b3c196b4970 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 14 Jul 2015 22:04:48 +0800 Subject: [PATCH 1396/2517] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成,删除原文 20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md --- ...rogram Problem Detected In Ubuntu 14.04.md | 82 ------------------- 1 file changed, 82 deletions(-) delete mode 100644 sources/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md diff --git a/sources/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md b/sources/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md deleted file mode 100644 index 4a91a6aeb3..0000000000 --- a/sources/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md +++ /dev/null @@ -1,82 +0,0 @@ -How To Fix System Program Problem Detected In Ubuntu 14.04 -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/system_program_Problem_detected.jpeg) - -For the last couple of weeks, (almost) every time I was greeted with **system program problem detected on startup in Ubuntu 15.04**. I ignored it for sometime but it was quite annoying after a certain point. You won’t be too happy as well if you are greeted by a pop-up displaying this every time you boot in to the system: - -> System program problem detected -> -> Do you want to report the problem now? -> -> ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/System_Program_Problem_Detected.png) - -I know if you are an Ubuntu user you might have faced this annoying pop-up sometimes for sure. In this post we are going to see what to do with “system program problem detected” report in Ubuntu 14.04 and 15.04. - -### What to do with “system program problem detected” error in Ubuntu? ### - -#### So what exactly is this notifier all about? #### - -Basically, this notifies you of a crash in your system. Don’t panic by the word ‘crash’. It’s not a major issue and your system is very much usable. It just that some program crashed some time in the past and Ubuntu wants you to decide whether or not you want to report this crash report to developers so that they could fix this issue. - -#### So, we click on Report problem and it will vanish? #### - -No, not really. Even if you click on report problem, you’ll be ultimately greeted with a pop up like this: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Ubuntu_Internal_error.png) - -[Sorry, Ubuntu has experienced an internal error][1] is the apport that will further open a web browser and then you can file a bug report by logging or creating an account with [Launchpad][2]. You see, it is a complicated procedure which will take around four steps to complete. - -#### But, I want to help developers and let them know of the bugs! #### - -That’s very thoughtful of you and the right thing to do. But there are two issues here. First, there are high chances that the bug would have already been reported. Second, even if you take the pain of reporting the crash, it’s not a guarantee that you won’t see it again. - -#### So, you suggesting to not report the crash? #### - -Yes and no. Report the crash when you see it the first time, if you want. You can see the crashing program under “Show Details” in the above picture. But if you see it repetitively or if you do not want to report the bug, I advise you to get rid of the system crash once and for all. - -### Fix “system program problem detected” error in Ubuntu ### - -The crash reports are stored in /var/crash directory in Ubuntu. If you look in to this directory, you should see some files ending with crash. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Crash_reports_Ubuntu.jpeg) - -What I suggest is that you delete these crash reports. Open a terminal and use the following command: - - sudo rm /var/crash/* - -This will delete all the content of directory /var/crash. This way you won’t be annoyed by the pop up for the programs crash that happened in the past. But if a programs crashes again, you’ll again see system program problem detected error. You can either remove the crash reports again, like we just did, or you can disable the Apport (debug tool) and permanently get rid of the pop-ups. - -#### Permanently get rid of system error pop up in Ubuntu #### - -If you do this, you’ll never be notified about any program crash that happens in the system. If you ask my view, I would say it’s not that bad a thing unless you are willing to file bug reports. If you have no intention of filing a bug report, the crash notifications and their absence will make no difference. - -To disable the Apport and get rid of system crash report completely, open a terminal and use the following command to edit the Apport settings file: - - gksu gedit /etc/default/apport - -The content of the file is: - - # set this to 0 to disable apport, or to 1 to enable it - # you can temporarily override this with - # sudo service apport start force_start=1 - enabled=1 - -Change the **enabled=1** to **enabled=0**. Save and close the file. You won’t see any pop up for crash reports after doing this. Obvious to point out that if you want to enable the crash reports again, you just need to change the same file and put enabled as 1 again. - -#### Did it work for you? #### - -I hope this tutorial helped you to fix system program problem detected in Ubuntu 14.04 and Ubuntu 15.04. Let me know if this tip helped you to get rid of this annoyance. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/how-to-fix-system-program-problem-detected-ubuntu/ - -作者:[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://itsfoss.com/how-to-solve-sorry-ubuntu-12-04-has-experienced-an-internal-error/ -[2]:https://launchpad.net/ \ No newline at end of file From f9def2e5d54f39d483fa0778b4901dd2af4211e3 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 14 Jul 2015 22:07:00 +0800 Subject: [PATCH 1397/2517] Translated By XLCYun MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 20150713 How To Fix System Program Problem Detected In Ubuntu 翻译完成。 --- ...m Program Problem Detected In Ubuntu 14.04 | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 translated/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04 diff --git a/translated/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04 b/translated/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04 new file mode 100644 index 0000000000..3658528e77 --- /dev/null +++ b/translated/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04 @@ -0,0 +1,80 @@ + +如何修复ubuntu 14.04中检测到系统程序错误的问题 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/system_program_Problem_detected.jpeg) + + +在过去的几个星期,(几乎)每次都有消息 **Ubuntu 15.04在启动时检测到系统程序错误(system program problem detected on startup in Ubuntu 15.04)** 跑出来“欢迎”我。那时我是直接忽略掉它的,但是这种情况到了某个时刻,它就让人觉得非常烦人了! + +> 检测到系统程序错误(System program problem detected) +> +> 你想立即报告这个问题吗? +> +> ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/System_Program_Problem_Detected.png) + + +我肯定地知道如果你是一个Ubuntu用户,你可能曾经也遇到过这个恼人的弹窗。在本文中,我们将探讨在Ubuntu 14.04和15.04中遇到"检测到系统程序错误(system program problem detected)"时 应该怎么办。 +### 怎么解决Ubuntu中"检测到系统程序错误"的错误 ### + +#### 那么这个通知到底是关于什么的? #### + +大体上讲,它是在告知你,你的系统的一部分崩溃了。可别因为“崩溃”这个词而恐慌。这不是一个严重的问题,你的系统还是完完全全可用的。只是在以前的某个时刻某个程序崩溃了,而Ubuntu想让你决定要不要把这个问题报告给开发者,这样他们就能够修复这个问题。 + +#### 那么,我们点了“报告错误”的按钮后,它以后就不再显示了?#### + + +不,不是的!即使你点了“报告错误”按钮,最后你还是会被一个如下的弹窗再次“欢迎”: +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Ubuntu_Internal_error.png) + +[对不起,Ubuntu发生了一个内部错误(Sorry, Ubuntu has experienced an internal error)][1]是一个Apport(Apport是Ubuntu中错误信息的收集报告系统,详见Ubuntu Wiki中的Apport篇,译者注),它将会进一步的打开网页浏览器,然后你可以通过登录或创建[Launchpad][2]帐户来填写一份漏洞(Bug)报告文件。你看,这是一个复杂的过程,它要花整整四步来完成. +#### 但是我想帮助开发者,让他们知道这个漏洞啊 !#### + +你这样想的确非常地周到体贴,而且这样做也是正确的。但是这样做的话,存在两个问题。第一,存在非常高的概率,这个漏洞已经被报告过了;第二,即使你报告了个这次崩溃,也无法保证你不会再看到它。 + +#### 那么,你的意思就是说别报告这次崩溃了?#### + +对,也不对。如果你想的话,在你第一次看到它的时候报告它。你可以在上面图片显示的“显示细节(Show Details)”中,查看崩溃的程序。但是如果你总是看到它,或者你不想报告漏洞(Bug),那么我建议你还是一次性摆脱这个问题吧。 +### 修复Ubuntu中“检测到系统程序错误”的错误 ### + +这些错误报告被存放在Ubuntu中目录/var/crash中。如果你翻看这个目录的话,应该可以看到有一些以crash结尾的文件。 +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Crash_reports_Ubuntu.jpeg) + +我的建议是删除这些错误报告。打开一个终端,执行下面的命令: + + sudo rm /var/crash/* + +这个操作会删除所有在/var/crash目录下的所有内容。这样你就不会再被这些报告以前程序错误的弹窗所扰。但是如果有一个程序又崩溃了,你就会再次看到“检测到系统程序错误”的错误。你可以再次删除这些报告文件,或者你可以禁用Apport来彻底地摆脱这个错误弹窗。 +#### 彻底地摆脱Ubuntu中的系统错误弹窗 #### + +如果你这样做,系统中任何程序崩溃时,系统都不会再通知你。如果你想问问我的看法的话,我会说,这不是一件坏事,除非你愿意填写错误报告。如果你不想填写错误报告,那么这些错误通知存不存在都不会有什么区别。 + +要禁止Apport,并且彻底地摆脱Ubuntu系统中的程序崩溃报告,打开一个终端,输入以下命令: + gksu gedit /etc/default/apport + +这个文件的内容是: + + # set this to 0 to disable apport, or to 1 to enable it + # 设置0表示禁用Apportw,或者1开启它。译者注,下同。 + # you can temporarily override this with + # 你可以用下面的命令暂时关闭它: + # sudo service apport start force_start=1 + enabled=1 + +把**enabled=1**改为**enabled=0**.保存并关闭文件。完成之后你就再也不会看到弹窗报告错误了。很显然,如果我们想重新开启错误报告功能,只要再打开这个文件,把enabled设置为1就可以了。 + +#### 你的有效吗? #### +我希望这篇教程能够帮助你修复Ubuntu 14.04和Ubuntu 15.04中检测到系统程序错误的问题。如果这个小窍门帮你摆脱了这个烦人的问题,请让我知道。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/how-to-fix-system-program-problem-detected-ubuntu/ + +作者:[Abhishek][a] +译者:[XLCYun](https://github.com/XLCYun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/how-to-solve-sorry-ubuntu-12-04-has-experienced-an-internal-error/ +[2]:https://launchpad.net/ From e3f84e994da7cd2777280ce4c05d181301bc581d Mon Sep 17 00:00:00 2001 From: sevenot Date: Wed, 15 Jul 2015 01:15:47 +0800 Subject: [PATCH 1398/2517] sevenot translated --- ...n Of Atom Code Editor Has Been Released.md | 69 ------------------- ...n Of Atom Code Editor Has Been Released.md | 67 ++++++++++++++++++ 2 files changed, 67 insertions(+), 69 deletions(-) delete mode 100644 sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md create mode 100644 translated/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md diff --git a/sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md b/sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md deleted file mode 100644 index cfb84d8866..0000000000 --- a/sources/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md +++ /dev/null @@ -1,69 +0,0 @@ -sevenot translating -First Stable Version Of Atom Code Editor Has Been Released -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Atom_stable.png) - -[Atom 1.0][1] is here. One of the [best open source code editors][2], [Atom][3] was available for public uses for almost a year but this is the first stable version of the most talked about text/code editor of recent times. Promoted as the “hackable text editor for 21st century”, this project of [Github][4] has already been downloaded 1.5 million times in the past and currently it has over 350,000 monthly active users. - -### It’s been a long time ### - -Rome was not built in a day and neither was Atom. Since it was first conceptualized in 2008 till the first stable release this month, it has taken several years and hundreds of contributors from across the globe, along with main developers working on Atom core. A quick look at the journey of Atom can be seen in the picture below: - -![Image credit: Atom](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Atom_stable_timeline.jpeg) -Image credit: Atom - -### Back to the future ### - -This launch of Atom 1.0 is announced with a retro video showing the capabilities of the editor. Resembling to 70’s science fiction TV series, this will be the coolest video you are going to watch today :) - -注:youtube视频,不行做个链接吧 - - -### Features of Atom text editor ### - -- Cross-platform editing -- Built-in package manager -- Smart autocompletion -- File system browser -- Multiple panes -- Find and replace -- Highly customizable -- Modern look - -### Get Atom 1.0 ### - -Atom 1.0 is available for Linux, Windows and Mac OS X. For Debian based Linux distributions such as Ubuntu and Linux Mint, Atom provides .deb binaries. For Fedora, it also has .rpm binaries. You can also get the source code, if you like. The links below will let you download the latest stable version. - -- [Atom .deb][5] -- [Atom .rpm][6] -- [Atom Source Code][7] - -If you prefer, you can [install Atom in Ubuntu using PPA][8]. The PPA is not official though. - -注:下面是一个调查,可以发布的时候在文章内发布个调查 - -#### Are you excited about Atom? #### - -- Oh Yes! This is the best thing that could happen to programmers. -- Not really. I have seen better editors. -- Don't care. My default text editor does the job just fine. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/atom-stable-released/ - -作者:[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://blog.atom.io/2015/06/25/atom-1-0.html -[2]:http://itsfoss.com/best-modern-open-source-code-editors-for-linux/ -[3]:https://atom.io/ -[4]:https://github.com/ -[5]:https://atom.io/download/deb -[6]:https://atom.io/download/rpm -[7]:https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md -[8]:http://itsfoss.com/install-atom-text-editor-ubuntu-1404-linux-mint-17/ diff --git a/translated/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md b/translated/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md new file mode 100644 index 0000000000..0fc70b3f09 --- /dev/null +++ b/translated/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md @@ -0,0 +1,67 @@ +sevenot translated +原子(Atom)代码编辑器的第一个稳定版本发布 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Atom_stable.png) + +[Atom 1.0][1]时代来临。作为[最好的开源代码编辑器]之一,Atom已公开使用快一年了,近段时间,第一个稳定版本的原子编辑器的发布却引起了广大用户的谈论。这个[Github][4]上的项目随着“为21世纪破解文本编辑器”活动的兴起,已近被下载了150万余次,积累35万活跃用户。 + +### 这是个漫长的过程 ### + +滴水穿石,非一日之功,Atom同样经历一个漫长的过程。从2008年首次提出概念到这个月第一个稳定版本的发布,主创人员和全球各地的贡献者,这几年来不断地致力于Atom核心的开发。我们通过下面这张图来了解一下Atom的发展过程: +![Image credit: Atom](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Atom_stable_timeline.jpeg) +图片来源:Atom + +### 回到未来 ### + +Atom 1.0 通过一个流行视屏发布,展示了这款编辑器的潜能。这个视屏就像70年代的科幻连续剧一样,今天你将会看到一个极其酷炫的视屏: +注:youtube视频,不行做个链接吧 + + +### 原子编辑器特点 ### + +- 跨平台编辑 +- 实现包管理 +- 智能化、自动化 +- 文件系统视图 +- 多窗操作 +- 支持查找更换 +- 高度个性化 +- 界面更新颖 + +### Atom 1.0起来 ### + +Atom 1.0 支持Linux,Windows和Mac OS X。对于基于Debian的Linux,例如Ubuntu和Linux Mint,Atom提供了deb包。对于Fedora,同样有rpm包。如果你愿意,你可以下载源代码。通过下面的链接下载最新的版本。 + +- [Atom .deb][5] +- [Atom .rpm][6] +- [Atom Source Code][7] + +如果你愿意,你可以[通过PPA在Ubuntu上安装Atom]。PPA并不是官方解决方案。 + +注:下面是一个调查,可以发布的时候在文章内发布个调查 + +#### 你对Atom感兴趣吗? #### + +- 噢,当然!这是程序员的福音。 +- 我并不这样认为。我见过更好的编辑器。 +- 并不关心,我的默认编辑器就能胜任我的工作。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/atom-stable-released/ + +作者:[Abhishek][a] +译者:[sevenot](https://github.com/sevenot) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://blog.atom.io/2015/06/25/atom-1-0.html +[2]:http://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[3]:https://atom.io/ +[4]:https://github.com/ +[5]:https://atom.io/download/deb +[6]:https://atom.io/download/rpm +[7]:https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md +[8]:http://itsfoss.com/install-atom-text-editor-ubuntu-1404-linux-mint-17/ From 4e91ce3d51aa8d9a1a80072de38895e79ec85351 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Wed, 15 Jul 2015 14:01:35 +0800 Subject: [PATCH 1399/2517] 20150121 Syncthing--A Private And Secure Toolsv translating by XLCYun 20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.m --- ...d Secure Tool To Sync Files or Folders Between Computers.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md b/sources/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md index 8a4aff4dfb..b3bca3d3db 100644 --- a/sources/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md +++ b/sources/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md @@ -1,3 +1,4 @@ +XLCYun translating. Syncthing: A Private, And Secure Tool To Sync Files/Folders Between Computers ================================================================================ ### Introduction ### @@ -204,4 +205,4 @@ via: http://www.unixmen.com/syncthing-private-secure-tool-sync-filesfolders-comp [a]:http://www.unixmen.com/author/sk/ [1]:https://github.com/syncthing/syncthing/releases/tag/v0.10.20 -[2]:http://syncthing.net/ \ No newline at end of file +[2]:http://syncthing.net/ From ddc0809059d70424748055b1a64f07721848dffa Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 15 Jul 2015 18:08:18 +0800 Subject: [PATCH 1400/2517] Translating by ZTinoZ --- ...709 7 command line tools for monitoring your Linux system.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md index fcbbb04068..2362fefca4 100644 --- a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md +++ b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md @@ -24,7 +24,7 @@ FYI: 本文中的截图取自[Debian Linux 8.1][1] (“Jessie”),其运行在 ### htop ### -Htop is a more sophisticated alternative to top. Wikipedia: “Users often deploy htop in cases where Unix top does not provide enough information about the systems processes, for example when trying to find minor memory leaks in applications. Htop is also popularly used interactively as a system monitor. Compared to top, it provides a more convenient, cursor-controlled interface for sending signals to processes.” (For more detail go [here][6].) +相比top,它的替代品Htop则更为精致。维基百科是这样描述的:“Users often deploy htop in cases where Unix top does not provide enough information about the systems processes, for example when trying to find minor memory leaks in applications. Htop is also popularly used interactively as a system monitor. Compared to top, it provides a more convenient, cursor-controlled interface for sending signals to processes.” (For more detail go [here][6].) ![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-5-100591903-orig.png) From 012acafff34f5009699308eabad221ecd5383fab Mon Sep 17 00:00:00 2001 From: sevenot Date: Wed, 15 Jul 2015 22:24:13 +0800 Subject: [PATCH 1401/2517] sevenot translating --- ...50410 10 Top Distributions in Demand to Get Your Dream Job.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md index 0e3e611ea4..950da04b5d 100644 --- a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md +++ b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md @@ -1,3 +1,4 @@ +sevenot translating 10 Top Distributions in Demand to Get Your Dream Job ================================================================================ We are coming up with a series of five articles which aims at making you aware of the top skills which will help you in getting yours dream job. In this competitive world you can not rely on one skill. You need to have balanced set of skills. There is no measure of a balanced skill set except a few conventions and statistics which changes from time-to-time. From 9492384740d9abd2e9a1a2651417d0e94a183bbd Mon Sep 17 00:00:00 2001 From: sevenot Date: Wed, 15 Jul 2015 22:26:47 +0800 Subject: [PATCH 1402/2517] translating --- ...50410 10 Top Distributions in Demand to Get Your Dream Job.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md index 950da04b5d..0e3e611ea4 100644 --- a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md +++ b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md @@ -1,4 +1,3 @@ -sevenot translating 10 Top Distributions in Demand to Get Your Dream Job ================================================================================ We are coming up with a series of five articles which aims at making you aware of the top skills which will help you in getting yours dream job. In this competitive world you can not rely on one skill. You need to have balanced set of skills. There is no measure of a balanced skill set except a few conventions and statistics which changes from time-to-time. From 494d73c7810014837c8cc8b912e0ba3dbe5d634f Mon Sep 17 00:00:00 2001 From: sevenot Date: Wed, 15 Jul 2015 22:27:30 +0800 Subject: [PATCH 1403/2517] sevenot translating --- ...50410 10 Top Distributions in Demand to Get Your Dream Job.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md index 0e3e611ea4..950da04b5d 100644 --- a/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md +++ b/sources/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md @@ -1,3 +1,4 @@ +sevenot translating 10 Top Distributions in Demand to Get Your Dream Job ================================================================================ We are coming up with a series of five articles which aims at making you aware of the top skills which will help you in getting yours dream job. In this competitive world you can not rely on one skill. You need to have balanced set of skills. There is no measure of a balanced skill set except a few conventions and statistics which changes from time-to-time. From e358ecb179682213c346e99ab50e78e6124cbfb1 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Wed, 15 Jul 2015 22:32:17 +0800 Subject: [PATCH 1404/2517] [Translated]20160629 Backup with these DeDuplicating Encryption Tools.md --- ...th these DeDuplicating Encryption Tools.md | 160 ------------------ ...th these DeDuplicating Encryption Tools.md | 157 +++++++++++++++++ 2 files changed, 157 insertions(+), 160 deletions(-) delete mode 100644 sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md create mode 100644 translated/share/20150629 Backup with these DeDuplicating Encryption Tools.md diff --git a/sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md b/sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md deleted file mode 100644 index ba4777996b..0000000000 --- a/sources/share/20150629 Backup with these DeDuplicating Encryption Tools.md +++ /dev/null @@ -1,160 +0,0 @@ -FSSlc Translating - -Backup with these DeDuplicating Encryption Tools -================================================================================ -Data is growing both in volume and value. It is becoming increasingly important to be able to back up and restore this information quickly and reliably. As society has adapted to technology and learned how to depend on computers and mobile devices, there are few that can deal with the reality of losing important data. Of firms that suffer the loss of data, 30% fold within a year, 70% cease trading within five years. This highlights the value of data. - -With data growing in volume, improving storage utilization is pretty important. In computing, data deduplication is a specialized data compression technique for eliminating duplicate copies of repeating data. This technique therefore improves storage utilization. - -Data is not only of interest to its creator. Governments, competitors, criminals, snoopers may be very keen to access your data. They might want to steal your data, extort money from you, or see what you are up to. Enryption is essential to protect your data. - -So the solution is a deduplicating encrypting backup software. - -Making file backups is an essential activity for all users, yet many users do not take adequate steps to protect their data. Whether a computer is being used in a corporate environment, or for private use, the machine's hard disk may fail without any warning signs. Alternatively, some data loss occurs as a result of human error. Without regular backups being made, data will inevitably be lost even if the services of a specialist recovery organisation are used. - -This article provides a quick roundup of 6 deduplicating encryption backup tools. - ----------- - -### Attic ### - -Attic is a deduplicating, encrypted, authenticated and compressed backup program written in Python. The main goal of Attic is to provide an efficient and secure way to backup data. The data deduplication technique used makes Attic suitable for daily backups since only the changes are stored. - -Features include: - -- Easy to use -- Space efficient storage variable block size deduplication is used to reduce the number of bytes stored by detecting redundant data -- Optional data encryption using 256-bit AES encryption. Data integrity and authenticity is verified using HMAC-SHA256 -- Off-site backups with SDSH -- Backups mountable as filesystems - -Website: [attic-backup.org][1] - ----------- - -### Borg ### - -Borg is a fork of Attic. It is a secure open source backup program designed for efficient data storage where only new or modified data is stored. - -The main goal of Borg is to provide an efficient and secure way to backup data. The data deduplication technique used makes Borg suitable for daily backups since only the changes are stored. The authenticated encryption makes it suitable for backups to not fully trusted targets. - -Borg is written in Python. Borg was created in May 2015 in response to the difficulty of getting new code or larger changes incorporated into Attic. - -Features include: - -- Easy to use -- Space efficient storage variable block size deduplication is used to reduce the number of bytes stored by detecting redundant data -- Optional data encryption using 256-bit AES encryption. Data integrity and authenticity is verified using HMAC-SHA256 -- Off-site backups with SDSH -- Backups mountable as filesystems - -Borg is not compatible with Attic. - -Website: [borgbackup.github.io/borgbackup][2] - ----------- - -### Obnam ### - -Obnam (OBligatory NAMe) is an easy to use, secure Python based backup program. Backups can be stored on local hard disks, or online via the SSH SFTP protocol. The backup server, if used, does not require any special software, on top of SSH. - -Obnam performs de-duplication by splitting up file data into chunks, and storing those individually. Generations are incremental backups; Every backup generation looks like a fresh snapshot, but is really incremental. Obnam is developed by Lars Wirzenius. - -Features include: - -- Easy to use -- Snapshot backups -- Data de-duplication, across files, and backup generations -- Encrypted backups, using GnuPG -- Backup multiple clients to a single repository -- Backup checkpoints (creates a "save" every 100MBs or so) -- Number of options for performance tuning including lru-size and/or upload-queue-size -- MD5 checksum algorithm for recognising duplicate data chunks -- Store backups to a server via SFTP -- Supports both push (i.e. Run on the client) and pull (i.e. Run on the server) methods - -Website: [obnam.org][3] - ----------- - -### Duplicity ### - -Duplicity incrementally backs up files and directory by encrypting tar-format volumes with GnuPG and uploading them to a remote (or local) file server. To transmit data it can use ssh/scp, local file access, rsync, ftp, and Amazon S3. - -Because duplicity uses librsync, the incremental archives are space efficient and only record the parts of files that have changed since the last backup. As the software uses GnuPG to encrypt and/or sign these archives, they will be safe from spying and/or modification by the server. - -Currently duplicity supports deleted files, full unix permissions, directories, symbolic links, fifos, etc. - -The duplicity package also includes the rdiffdir utility. Rdiffdir is an extension of librsync's rdiff to directories; it can be used to produce signatures and deltas of directories as well as regular files. - -Features include: - -- Simple to use -- Encrypted and signed archives (using GnuPG) -- Bandwidth and space efficient, using the rsync algorithm -- Standard file format -- Choice of remote protocol - - Local storage - - scp/ssh - - ftp - - rsync - - HSI - - WebDAV - - Amazon S3 - -Website: [duplicity.nongnu.org][4] - ----------- - -### ZBackup ### - -ZBackup is a versatile globally-deduplicating backup tool. - -Features include: - -- Parallel LZMA or LZO compression of the stored data. You can mix LZMA and LZO in a repository -- Built-in AES encryption of the stored data -- Possibility to delete old backup data -- Use of a 64-bit rolling hash, keeping the amount of soft collisions to zero -- Repository consists of immutable files. No existing files are ever modified -- Written in C++ only with only modest library dependencies -- Safe to use in production -- Possibility to exchange data between repos without recompression -- Uses a 64-bit modified Rabin-Karp rolling hash - -Website: [zbackup.org][5] - ----------- - -### bup ### - -bup is a program written in Python that backs things up. It's short for "backup". It provides an efficient way to backup a system based on the git packfile format, providing fast incremental saves and global deduplication (among and within files, including virtual machine images). - -bup is released under the LGPL version 2 license. - -Features include: - -- Global deduplication (among and within files, including virtual machine images) -- Uses a rolling checksum algorithm (similar to rsync) to split large files into chunks -- Uses the packfile format from git -- Writes packfiles directly offering fast incremental saves -- Can use "par2" redundancy to recover corrupted backups -- Mount your bup repository as a FUSE filesystem - -Website: [bup.github.io][6] - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20150628060000607/BackupTools.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://attic-backup.org/ -[2]:https://borgbackup.github.io/borgbackup/ -[3]:http://obnam.org/ -[4]:http://duplicity.nongnu.org/ -[5]:http://zbackup.org/ -[6]:https://bup.github.io/ diff --git a/translated/share/20150629 Backup with these DeDuplicating Encryption Tools.md b/translated/share/20150629 Backup with these DeDuplicating Encryption Tools.md new file mode 100644 index 0000000000..366be7dd32 --- /dev/null +++ b/translated/share/20150629 Backup with these DeDuplicating Encryption Tools.md @@ -0,0 +1,157 @@ +使用去重加密工具来备份 +================================================================================ +在体积和价值方面,数据都在增长。快速而可靠地备份和恢复数据正变得越来越重要。社会已经适应了技术的广泛使用,并懂得了如何依靠电脑和移动设备,但很少有人能够处理丢失重要数据的现实。在遭受数据损失的公司中,30% 的公司将在一年内损失一半市值,70% 的公司将在五年内停止交易。这更加凸显了数据的价值。 + +随着数据在体积上的增长,提高存储利用率尤为重要。In Computing(注:这里不知如何翻译),数据去重是一种特别的数据压缩技术,因为它可以消除重复数据的拷贝,所以这个技术可以提高存储利用率。 + +数据并不仅仅只有其创造者感兴趣。政府、竞争者、犯罪分子、偷窥者可能都热衷于获取你的数据。他们或许想偷取你的数据,从你那里进行敲诈,或看你正在做什么。对于保护你的数据,加密是非常必要的。 + +所以,解决方法是我们需要一个去重加密备份软件。 + +对于所有的用户而言,做文件备份是一件非常必要的事,至今为止许多用户还没有采取足够的措施来保护他们的数据。一台电脑不论是工作在一个合作的环境中,还是供私人使用,机器的硬盘可能在没有任何警告的情况下挂掉。另外,有些数据丢失可能是人为的错误所引发的。如果没有做经常性的备份,数据也可能不可避免地失去掉,即使请了专业的数据恢复公司来帮忙。 + +这篇文章将对 6 个去重加密备份工具进行简要的介绍。 +---------- + +### Attic ### + +Attic 是一个可用于去重、加密,验证完整性的用 Python 写的压缩备份程序。Attic 的主要目标是提供一个高效且安全的方式来备份数据。Attic 使用的数据去重技术使得它适用于每日备份,因为只需存储改变的数据。 + +其特点有: + +- 易用 +- 可高效利用存储空间,通过检查冗余的数据,数据块大小的去重被用来减少存储所用的空间 +- 可选的数据加密,使用 256 位的 AES 加密算法。数据的完整性和可靠性使用 HMAC-SHA256 来检查 +- 使用 SDSH 来进行离线备份 +- 备份可作为文件系统来挂载 + +网站: [attic-backup.org][1] + +---------- + +### Borg ### + +Borg 是 Attic 的分支。它是一个安全的开源备份程序,被设计用来高效地存储那些新的或修改过的数据。 + +Borg 的主要目标是提供一个高效、安全的方式来存储数据。Borg 使用的数据去重技术使得它适用于每日备份,因为只需存储改变的数据。认证加密使得它适用于不完全可信的目标的存储。 + +Borg 由 Python 写成。Borg 于 2015 年 5 月被创造出来,为了回应让新的代码或重大的改变带入 Attic 的困难。 + +其特点包括: + +- 易用 +- 可高效利用存储空间,通过检查冗余的数据,数据块大小的去重被用来减少存储所用的空间 +- 可选的数据加密,使用 256 位的 AES 加密算法。数据的完整性和可靠性使用 HMAC-SHA256 来检查 +- 使用 SDSH 来进行离线备份 +- 备份可作为文件系统来挂载 + +Borg 与 Attic 不兼容。 + +网站: [borgbackup.github.io/borgbackup][2] + +---------- + +### Obnam ### + +Obnam (OBligatory NAMe) 是一个易用、安全的基于 Python 的备份程序。备份可被存储在本地硬盘或通过 SSH SFTP 协议存储到网上。若使用了备份服务器,它并不需要任何特殊的软件,只需要使用 SSH 即可。 + +Obnam 通过将数据数据分成数据块,并单独存储它们来达到去重的目的,每次通过增量备份来生成备份,每次备份的生成就像是一次新的快照,但事实上是真正的增量备份。Obnam 由 Lars Wirzenius 开发。 + +其特点有: + +- 易用 +- 快照备份 +- 数据去重,跨文件,生成备份 +- 可使用 GnuPG 来加密备份 +- 向一个单独的仓库中备份多个客户端的数据 +- 备份检查点 (创建一个保存点,以每 100MB 或其他容量) +- 包含多个选项来调整性能,包括调整 lru-size 或 upload-queue-size +- 支持 MD5 校验和算法来识别重复的数据块 +- 通过 SFTP 将备份存储到一个服务器上 +- 同时支持 push(即在客户端上运行) 和 pull(即在服务器上运行) + +网站: [obnam.org][3] + +---------- + +### Duplicity ### + +Duplicity 持续地以 tar 文件格式备份文件和目录,并使用 GnuPG 来进行加密,同时将它们上传到远程(或本地)的文件服务器上。它可以使用 ssh/scp, 本地文件获取, rsync, ftp, 和 Amazon S3 等来传递数据。 + +因为 duplicity 使用了 librsync, 增加的存档高效地利用了存储空间,且只记录自从上次备份依赖改变的那部分文件。由于该软件使用 GnuPG 来机密或对这些归档文件进行进行签名,这使得它们免于服务器的监视或修改。 + +当前 duplicity 支持备份删除的文件,全部的 unix 权限,目录,符号链接, fifo 等。 + +duplicity 软件包还包含有 rdiffdir 工具。 Rdiffdir 是 librsync 的 rdiff 针对目录的扩展。它可以用来生成对目录的签名和差异,对普通文件也有效。 + +其特点有: + +- 使用简单 +- 对归档进行加密和签名(使用 GnuPG) +- 高效使用带宽和存储空间,使用 rsync 的算法 +- 标准的文件格式 +- 可选择多种远程协议 + - 本地存储 + - scp/ssh + - ftp + - rsync + - HSI + - WebDAV + - Amazon S3 + +网站: [duplicity.nongnu.org][4] + +---------- + +### ZBackup ### + +ZBackup 是一个通用的全局去重备份工具。 + +其特点包括: + +- 存储数据的并行 LZMA 或 LZO 压缩,在一个仓库中,你还可以混合使用 LZMA 和 LZO +- 内置对存储数据的 AES 加密 +- 可选择地删除旧的备份数据 +- 可以使用 64 位的滚动哈希算法,使得文件冲突的数量几乎为零 +- Repository consists of immutable files. No existing files are ever modified ==== +- 用 C++ 写成,只需少量的库文件依赖 +- 在生成环境中可以安全使用 +- 可以在不同仓库中进行数据交换而不必再进行压缩 +- 可以使用 64 位改进型 Rabin-Karp 滚动哈希算法 + +网站: [zbackup.org][5] + +---------- + +### bup ### + +bup 是一个用 Python 写的备份程序,其名称是 "backup" 的缩写。在 git packfile 文件的基础上, bup 提供了一个高效的方式来备份一个系统,提供快速的增量备份和全局去重(在文件中或文件里,甚至包括虚拟机镜像)。 + +bup 在 LGPL 版本 2 协议下发行。 + +其特点包括: + +- 全局去重 (在文件中或文件里,甚至包括虚拟机镜像) +- 使用一个滚动的校验和算法(类似于 rsync) 来将大文件分为多个数据块 +- 使用来自 git 的 packfile 格式 +- 直接写入 packfile 文件,以此提供快速的增量备份 +- 可以使用 "par2" 冗余来恢复冲突的备份 +- 可以作为一个 FUSE 文件系统来挂载你的 bup 仓库 + +网站: [bup.github.io][6] + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150628060000607/BackupTools.html + +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://attic-backup.org/ +[2]:https://borgbackup.github.io/borgbackup/ +[3]:http://obnam.org/ +[4]:http://duplicity.nongnu.org/ +[5]:http://zbackup.org/ +[6]:https://bup.github.io/ \ No newline at end of file From 48cf34b92daa46569df5b0bc0529b187ce17d253 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 15 Jul 2015 22:43:04 +0800 Subject: [PATCH 1405/2517] [Translating] sources/tech/20150706 PHP Security.md --- sources/tech/20150706 PHP Security.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150706 PHP Security.md b/sources/tech/20150706 PHP Security.md index b942069678..9b026884ec 100644 --- a/sources/tech/20150706 PHP Security.md +++ b/sources/tech/20150706 PHP Security.md @@ -1,3 +1,4 @@ +ictlyh Translating PHP Security ================================================================================ ![](http://www.codeproject.com/KB/PHP/363897/php_security.jpg) From be14e2db3ac92ec202fde03741990eafbd61a49b Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 15 Jul 2015 23:48:01 +0800 Subject: [PATCH 1406/2517] PUB:20150629 First Stable Version Of Atom Code Editor Has Been Released @sevenot --- ... Version Of Atom Code Editor Has Been Released.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) rename {translated/share => published}/20150629 First Stable Version Of Atom Code Editor Has Been Released.md (89%) diff --git a/translated/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md b/published/20150629 First Stable Version Of Atom Code Editor Has Been Released.md similarity index 89% rename from translated/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md rename to published/20150629 First Stable Version Of Atom Code Editor Has Been Released.md index 0fc70b3f09..a89520072a 100644 --- a/translated/share/20150629 First Stable Version Of Atom Code Editor Has Been Released.md +++ b/published/20150629 First Stable Version Of Atom Code Editor Has Been Released.md @@ -1,5 +1,4 @@ -sevenot translated -原子(Atom)代码编辑器的第一个稳定版本发布 +原子(Atom)代码编辑器的视频短片介绍 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Atom_stable.png) @@ -8,12 +7,15 @@ sevenot translated ### 这是个漫长的过程 ### 滴水穿石,非一日之功,Atom同样经历一个漫长的过程。从2008年首次提出概念到这个月第一个稳定版本的发布,主创人员和全球各地的贡献者,这几年来不断地致力于Atom核心的开发。我们通过下面这张图来了解一下Atom的发展过程: + ![Image credit: Atom](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/06/Atom_stable_timeline.jpeg) -图片来源:Atom + +*图片来源:Atom* ### 回到未来 ### -Atom 1.0 通过一个流行视屏发布,展示了这款编辑器的潜能。这个视屏就像70年代的科幻连续剧一样,今天你将会看到一个极其酷炫的视屏: +Atom 1.0 通过流行的视频发布方式,展示了这款编辑器的潜能。这个视屏就像70年代的科幻连续剧一样,今天你将会看到一个极其酷炫的视屏: + 注:youtube视频,不行做个链接吧 @@ -52,7 +54,7 @@ via: http://itsfoss.com/atom-stable-released/ 作者:[Abhishek][a] 译者:[sevenot](https://github.com/sevenot) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From d6d25315a4336481c3f8e78c9243e362c8c6a5f7 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 16 Jul 2015 00:07:53 +0800 Subject: [PATCH 1407/2517] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @XLCYun ,你 PR 的这两个文件,都忘记保留 .md 扩展名了。 另外,可以稍微学习下 markdown 格式,请保留原文的 md 格式,比如,行首缩进的效果就完全不同了。 --- ...How To Fix System Program Problem Detected In Ubuntu 14.04.md} | 0 ...o manage Vim plugins => 20150713 How to manage Vim plugins.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{20150713 How To Fix System Program Problem Detected In Ubuntu 14.04 => 20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md} (100%) rename translated/tech/{20150713 How to manage Vim plugins => 20150713 How to manage Vim plugins.md} (100%) diff --git a/translated/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04 b/translated/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md similarity index 100% rename from translated/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04 rename to translated/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md diff --git a/translated/tech/20150713 How to manage Vim plugins b/translated/tech/20150713 How to manage Vim plugins.md similarity index 100% rename from translated/tech/20150713 How to manage Vim plugins rename to translated/tech/20150713 How to manage Vim plugins.md From e8f4b3e7a864a40d22ba2bb14cbaf790011d910e Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 16 Jul 2015 00:42:50 +0800 Subject: [PATCH 1408/2517] PUB:20150709 Why is the ibdata1 file continuously growing in MySQL @wyangsun --- ...ata1 file continuously growing in MySQL.md | 114 ++++++++++++++++++ ...ata1 file continuously growing in MySQL.md | 114 ------------------ 2 files changed, 114 insertions(+), 114 deletions(-) create mode 100644 published/20150709 Why is the ibdata1 file continuously growing in MySQL.md delete mode 100644 translated/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md diff --git a/published/20150709 Why is the ibdata1 file continuously growing in MySQL.md b/published/20150709 Why is the ibdata1 file continuously growing in MySQL.md new file mode 100644 index 0000000000..af798b387a --- /dev/null +++ b/published/20150709 Why is the ibdata1 file continuously growing in MySQL.md @@ -0,0 +1,114 @@ +为什么 mysql 里的 ibdata1 文件不断的增长? +================================================================================ +![ibdata1 file](https://www.percona.com/blog/wp-content/uploads/2013/08/ibdata1-file.jpg) + +我们在 [Percona 支持栏目][1]经常收到关于 MySQL 的 ibdata1 文件的这个问题。 + +当监控服务器发送一个关于 MySQL 服务器存储的报警时,恐慌就开始了 —— 就是说磁盘快要满了。 + +一番调查后你意识到大多数地盘空间被 InnoDB 的共享表空间 ibdata1 使用。而你已经启用了 [innodb_file_per_table][2],所以问题是: + +### ibdata1存了什么? ### + +当你启用了 `innodb_file_per_table`,表被存储在他们自己的表空间里,但是共享表空间仍然在存储其它的 InnoDB 内部数据: + +- 数据字典,也就是 InnoDB 表的元数据 +- 变更缓冲区 +- 双写缓冲区 +- 撤销日志 + +其中的一些在 [Percona 服务器][3]上可以被配置来避免增长过大的。例如你可以通过 [innodb_ibuf_max_size][4] 设置最大变更缓冲区,或设置 [innodb_doublewrite_file][5] 来将双写缓冲区存储到一个分离的文件。 + +MySQL 5.6 版中你也可以创建外部的撤销表空间,所以它们可以放到自己的文件来替代存储到 ibdata1。可以看看这个[文档][6]。 + +### 什么引起 ibdata1 增长迅速? ### + +当 MySQL 出现问题通常我们需要执行的第一个命令是: + + SHOW ENGINE INNODB STATUS/G + +这将展示给我们一些很有价值的信息。我们从** TRANSACTION(事务)**部分开始检查,然后我们会发现这个: + + ---TRANSACTION 36E, ACTIVE 1256288 sec + MySQL thread id 42, OS thread handle 0x7f8baaccc700, query id 7900290 localhost root + show engine innodb status + Trx read view will not see trx with id >= 36F, sees < 36F + +这是一个最常见的原因,一个14天前创建的相当老的事务。这个状态是**活动的**,这意味着 InnoDB 已经创建了一个数据的快照,所以需要在**撤销**日志中维护旧页面,以保障数据库的一致性视图,直到事务开始。如果你的数据库有大量的写入任务,那就意味着存储了大量的撤销页。 + +如果你找不到任何长时间运行的事务,你也可以监控INNODB STATUS 中的其他的变量,“**History list length(历史记录列表长度)**”展示了一些等待清除操作。这种情况下问题经常发生,因为清除线程(或者老版本的主线程)不能像这些记录进来的速度一样快地处理撤销。 + +### 我怎么检查什么被存储到了 ibdata1 里了? ### + +很不幸,MySQL 不提供查看什么被存储到 ibdata1 共享表空间的信息,但是有两个工具将会很有帮助。第一个是马克·卡拉汉制作的一个修改版 innochecksum ,它发布在[这个漏洞报告][7]里。 + +它相当易于使用: + + # ./innochecksum /var/lib/mysql/ibdata1 + 0 bad checksum + 13 FIL_PAGE_INDEX + 19272 FIL_PAGE_UNDO_LOG + 230 FIL_PAGE_INODE + 1 FIL_PAGE_IBUF_FREE_LIST + 892 FIL_PAGE_TYPE_ALLOCATED + 2 FIL_PAGE_IBUF_BITMAP + 195 FIL_PAGE_TYPE_SYS + 1 FIL_PAGE_TYPE_TRX_SYS + 1 FIL_PAGE_TYPE_FSP_HDR + 1 FIL_PAGE_TYPE_XDES + 0 FIL_PAGE_TYPE_BLOB + 0 FIL_PAGE_TYPE_ZBLOB + 0 other + 3 max index_id + +全部的 20608 中有 19272 个撤销日志页。**这占用了表空间的 93%**。 + +第二个检查表空间内容的方式是杰里米·科尔制作的 [InnoDB Ruby 工具][8]。它是个检查 InnoDB 的内部结构的更先进的工具。例如我们可以使用 space-summary 参数来得到每个页面及其数据类型的列表。我们可以使用标准的 Unix 工具来统计**撤销日志**页的数量: + + # innodb_space -f /var/lib/mysql/ibdata1 space-summary | grep UNDO_LOG | wc -l + 19272 + +尽管这种特殊的情况下,innochedcksum 更快更容易使用,但是我推荐你使用杰里米的工具去了解更多的 InnoDB 内部的数据分布及其内部结构。 + +好,现在我们知道问题所在了。下一个问题: + +### 我该怎么解决问题? ### + +这个问题的答案很简单。如果你还能提交语句,就做吧。如果不能的话,你必须要杀掉线程开始回滚过程。那将停止 ibdata1 的增长,但是很显然,你的软件会出现漏洞,有些人会遇到错误。现在你知道如何去鉴定问题所在,你需要使用你自己的调试工具或普通的查询日志来找出谁或者什么引起的问题。 + +如果问题发生在清除线程,解决方法通常是升级到新版本,新版中使用一个独立的清除线程替代主线程。更多信息查看该[文档][9] + +### 有什么方法回收已使用的空间么? ### + +没有,目前还没有一个容易并且快速的方法。InnoDB 表空间从不收缩...参见[10 年之久的漏洞报告][10],最新更新自詹姆斯·戴(谢谢): + +当你删除一些行,这个页被标为已删除稍后重用,但是这个空间从不会被回收。唯一的方法是使用新的 ibdata1 启动数据库。要做这个你应该需要使用 mysqldump 做一个逻辑全备份,然后停止 MySQL 并删除所有数据库、ib_logfile*、ibdata1* 文件。当你再启动 MySQL 的时候将会创建一个新的共享表空间。然后恢复逻辑备份。 + +### 总结 ### + +当 ibdata1 文件增长太快,通常是 MySQL 里长时间运行的被遗忘的事务引起的。尝试去解决问题越快越好(提交或者杀死事务),因为不经过痛苦缓慢的 mysqldump 过程,你就不能回收浪费的磁盘空间。 + +也是非常推荐监控数据库以避免这些问题。我们的 [MySQL 监控插件][11]包括一个 Nagios 脚本,如果发现了一个太老的运行事务它可以提醒你。 + +-------------------------------------------------------------------------------- + +via: https://www.percona.com/blog/2013/08/20/why-is-the-ibdata1-file-continuously-growing-in-mysql/ + +作者:[Miguel Angel Nieto][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.percona.com/blog/author/miguelangelnieto/ +[1]:https://www.percona.com/products/mysql-support +[2]:http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_file_per_table +[3]:https://www.percona.com/software/percona-server +[4]:https://www.percona.com/doc/percona-server/5.5/scalability/innodb_insert_buffer.html#innodb_ibuf_max_size +[5]:https://www.percona.com/doc/percona-server/5.5/performance/innodb_doublewrite_path.html?id=percona-server:features:percona_innodb_doublewrite_path#innodb_doublewrite_file +[6]:http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html#innodb-undo-tablespace +[7]:http://bugs.mysql.com/bug.php?id=57611 +[8]:https://github.com/jeremycole/innodb_ruby +[9]:http://dev.mysql.com/doc/innodb/1.1/en/innodb-improved-purge-scheduling.html +[10]:http://bugs.mysql.com/bug.php?id=1341 +[11]:https://www.percona.com/software/percona-monitoring-plugins diff --git a/translated/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md b/translated/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md deleted file mode 100644 index 2632f3f173..0000000000 --- a/translated/tech/20150709 Why is the ibdata1 file continuously growing in MySQL.md +++ /dev/null @@ -1,114 +0,0 @@ -为什么mysql里的ibdata1文件不断的增长? -================================================================================ -![ibdata1 file](https://www.percona.com/blog/wp-content/uploads/2013/08/ibdata1-file.jpg) - -我们在[Percona支持][1]经常收到关于MySQL的ibdata1文件的这个问题。 - -当监控服务器发送一个关于MySQL服务器存储的报警恐慌就开始了 - 就是说磁盘快要满了。 - -一番调查后你意识到大多数地盘空间被InnDB的共享表空间ibdata1使用。你已经启用了[innodb_file_per_table][2],所以问题是: - -### ibdata1存了什么? ### - -当你启用了innodb_file_per_table,表被存储在他们自己的表空间里,但是共享表空间仍然在存储其他InnoDB的内部数据: - -- 数据字典也就是InnoDB表的元数据 -- 交换缓冲区 -- 双写缓冲区 -- 撤销日志 - -在[Percona服务器][3]上有一些是可以被配置来避免增长过大的。例如你可以通过[innodb_ibuf_max_size][4]设置最大交换缓冲区或设置[innodb_doublewrite_file][5]存储双写缓冲区到一个分离的文件。 - -MySQL 5.6版中你也可以创建额外的撤销表空间所以他们将会有他们自己的文件来替代存储到ibdata1。照着[文档链接][6]检查。 - -### 什么引起ibdata1增长迅速? ### - -当MySQL出现问题通常我们需要执行的第一个命令是: - - SHOW ENGINE INNODB STATUSG(这里我觉得应该是STATUS/G) - -这将展示给我们一些很有价值的信息。我们开始检查**事务**部分,然后我们会发现这个: - - ---TRANSACTION 36E, ACTIVE 1256288 sec - MySQL thread id 42, OS thread handle 0x7f8baaccc700, query id 7900290 localhost root - show engine innodb status - Trx read view will not see trx with id >= 36F, sees < 36F - -这是一个最常见的原因,一个14天前创建的相当老的老事务。这个状态是**活动的**,这意味着InnoDB已经创建了一个快照数据,所以需要在**撤销**日志中维护旧页面,以保障数据库的一致性视图,直到事务开始。如果你的数据库是写负载大,那就意味着大量的撤销页已经被存储了。 - -如果你找不到任何长时间运行的事务,你也可以监控INNODB状态中的其他的变量,“**历史记录列表长度**”展示了一些等待清除操作。这种情况下问题经常发生,因为清除线程(或者老版本的主线程)不能以这些记录进来的速度处理撤销。 - -### 我怎么检查什么被存储到了ibdata1里了? ### - -很不幸MySQL不提供什么被存储到ibdata1共享表空间的信息但是有两个工具将会很有帮助。第一个是马克·卡拉汉制作的一个修订版本的innochecksum并且发布在[这个漏洞报告][7]。 - -它相当易于使用: - - # ./innochecksum /var/lib/mysql/ibdata1 - 0 bad checksum - 13 FIL_PAGE_INDEX - 19272 FIL_PAGE_UNDO_LOG - 230 FIL_PAGE_INODE - 1 FIL_PAGE_IBUF_FREE_LIST - 892 FIL_PAGE_TYPE_ALLOCATED - 2 FIL_PAGE_IBUF_BITMAP - 195 FIL_PAGE_TYPE_SYS - 1 FIL_PAGE_TYPE_TRX_SYS - 1 FIL_PAGE_TYPE_FSP_HDR - 1 FIL_PAGE_TYPE_XDES - 0 FIL_PAGE_TYPE_BLOB - 0 FIL_PAGE_TYPE_ZBLOB - 0 other - 3 max index_id - -全部的20608中有19272个撤销日志页。**这是表空间的93%**。 - -第二个检查表空间内容的方式是杰里米科尔制作的[InnoDB Ruby工具][8]。它是个更先进的工具来检查InnoDB的内部结构。例如我们可以使用space-summary参数来得到每个页面及其数据类型的列表。我们可以使用标准的Unix工具**撤销日志**页的数量: - - # innodb_space -f /var/lib/mysql/ibdata1 space-summary | grep UNDO_LOG | wc -l - 19272 - -尽管这种特殊的情况innochedcksum更快更容易使用,我推荐你使用杰里米的工具去学习更多的InnoDB内部数据分布和内部结构。 - -好,现在我们知道问题所在。下一个问题: - -### 我能怎么解决问题? ### - -这个问题的答案很简单。如果你还能提交语句,就做吧。如果不能你必须要杀掉进程开始回滚进程。那将停止ibdata1的增长但是很清楚你的软件有一个漏洞或者出了一些错误。现在你知道如何去鉴定问题所在,你需要使用你自己的调试工具或普通语句日志找出谁或者什么引起的问题。 - -如果问题发生在清除线程,解决方法通常是升级到新版本,新版中使用一个独立的清除线程替代主线程。更多信息查看[文档链接][9] - -### 有什么方法恢复已使用的空间么? ### - -没有,目前不可能有一个容易并且快速的方法。InnoDB表空间从不收缩...见[10年老漏洞报告][10]最新更新自詹姆斯(谢谢): - -当你删除一些行,这个页被标为已删除稍后重用,但是这个空间从不会被恢复。只有一种方式来启动数据库使用新的ibdata1。做这个你应该需要使用mysqldump做一个逻辑全备份。然后停止MySQL并删除所有数据库、ib_logfile*、ibdata1*文件。当你再启动MySQL的时候将会创建一个新的共享表空间。然后恢复逻辑仓库。 - -### 总结 ### - -当ibdata1文件增长太快,通常是MySQL里长时间运行的被遗忘的事务引起的。尝试去解决问题越快越好(提交或者杀死事务)因为没有痛苦缓慢的mysqldump执行你不能恢复浪费的磁盘空间。 - -监控数据库避免这些问题也是非常推荐的。我们的[MySQL监控插件][11]包括一个Nagios脚本,如果发现了一个太老的运行事务它可以提醒你。 - --------------------------------------------------------------------------------- - -via: https://www.percona.com/blog/2013/08/20/why-is-the-ibdata1-file-continuously-growing-in-mysql/ - -作者:[Miguel Angel Nieto][a] -译者:[wyangsun](https://github.com/wyangsun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.percona.com/blog/author/miguelangelnieto/ -[1]:https://www.percona.com/products/mysql-support -[2]:http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_file_per_table -[3]:https://www.percona.com/software/percona-server -[4]:https://www.percona.com/doc/percona-server/5.5/scalability/innodb_insert_buffer.html#innodb_ibuf_max_size -[5]:https://www.percona.com/doc/percona-server/5.5/performance/innodb_doublewrite_path.html?id=percona-server:features:percona_innodb_doublewrite_path#innodb_doublewrite_file -[6]:http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html#innodb-undo-tablespace -[7]:http://bugs.mysql.com/bug.php?id=57611 -[8]:https://github.com/jeremycole/innodb_ruby -[9]:http://dev.mysql.com/doc/innodb/1.1/en/innodb-improved-purge-scheduling.html -[10]:http://bugs.mysql.com/bug.php?id=1341 -[11]:https://www.percona.com/software/percona-monitoring-plugins From ff411e545faf01da29a8c0e802500dd5850005b6 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 16 Jul 2015 00:49:30 +0800 Subject: [PATCH 1409/2517] PUB:20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @KevinSJ 你自己的 ID 都写错了。。 --- ...n multiple tabs in a GNOME terminal on Ubuntu 15.04.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md (87%) diff --git a/translated/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md b/published/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md similarity index 87% rename from translated/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md rename to published/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md index 80b07097d0..8129221b81 100644 --- a/translated/tech/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md +++ b/published/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md @@ -1,8 +1,8 @@ -Linux 答疑--如何在 Ubuntu 15.04 的 GNOME 终端中开启多个标签 +Linux有问必答:如何在 Ubuntu 15.04 的 GNOME 终端中开启多个标签 ================================================================================ > **问**: 我以前可以在我的 Ubuntu 台式机中的 gnome-terminal 中开启多个标签。但升到 Ubuntu 15.04 后,我就无法再在 gnome-terminal 窗口中打开新标签了。要怎样做才能在 Ubuntu 15.04 的 gnome-terminal 中打开标签呢? -在 Ubuntu 14.10 或之前的版本中,gnome-terminal 允许你在终端窗口中开启一个新标签或一个终端窗口。但从 Ubuntu 15.04开始,gnome-terminal 移除了“新标签”选项。这实际上并不是一个 bug,而是一个合并新标签和新窗口的举措。GNOME 3.12 引入了 [单独的“开启终端”选项][1]。开启新终端标签的功能从终端菜单移动到了首选项中。 +在 Ubuntu 14.10 或之前的版本中,gnome-terminal 允许你在终端窗口中开启一个新标签或一个终端窗口。但从 Ubuntu 15.04开始,gnome-terminal 移除了“新标签”选项。这实际上并不是一个 bug,而是一个合并新标签和新窗口的举措。GNOME 3.12 引入了[单独的“开启终端”选项][1]。开启新终端标签的功能从终端菜单移动到了首选项中。 ![](https://farm1.staticflickr.com/562/19286510971_f0abe3e7fb_b.jpg) @@ -29,8 +29,8 @@ Linux 答疑--如何在 Ubuntu 15.04 的 GNOME 终端中开启多个标签 via: http://ask.xmodulo.com/open-multiple-tabs-gnome-terminal-ubuntu.html 作者:[Dan Nanni][a] -译者:[KevSJ](https://github.com/KevSJ) -校对:[校对者ID](https://github.com/校对者ID) +译者:[KevinSJ](https://github.com/KevinSJ) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 681c0534c22a4218d4042c200900a80ac5ab5648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Thu, 16 Jul 2015 03:58:03 +0800 Subject: [PATCH 1410/2517] Update RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md --- ...ntial Commands and System Documentation.md | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md index 4bb5948d5d..8cccc33f08 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md @@ -258,39 +258,41 @@ When using cut based on fields, the default field separator is a tab, but a diff ![Extract Text From a File in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Extract-Text-from-a-file.png) -Extract Text From a File in Linux +从文件中提取文本 -Note that the output of the two examples above was truncated for brevity. -**Reformatting files with fmt command** +注意,上方的两个输出的结果是十分简洁的。 -fmt is used to “clean up” files with a great amount of content or lines, or with varying degrees of indentation. The new paragraph formatting defaults to no more than 75 characters wide. You can change this with the -w (width) option, which set the line length to the specified number of characters. +**使用fmt命令重新格式化文件** -For example, let’s see what happens when we use fmt to display the /etc/passwd file setting the width of each line to 100 characters. Once again, output has been truncated for brevity. +fmt 被用于去“清理”有大量内容或行的文件,或者有很多缩进的文件.新的锻炼格式每行不会超过75个字符款,你能改变这个设定通过 -w(width 宽度)参数,它可以设置行宽为一个特定的数值 + +举个例子,让我们看看当我们用fmt显示定宽为100个字符的时候的文件/etc/passwd 时会发生什么.再来一次,输出值变得更加简洁. # fmt -w100 /etc/passwd ![File Reformatting in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/File-Reformatting-in-Linux-with-fmt-command.png) -File Reformatting in Linux +Linux文件重新格式化 -**Formatting content for printing with pr command** +**使用pr命令格式化打印内容** -pr paginates and displays in columns one or more files for printing. In other words, pr formats a file to make it look better when printed. For example, the following command: +pr 分页并且在列中展示一个或多个用于打印的文件. 换句话说,使用pr格式化一个文件使他打印出来时看起来更好.举个例子,下面这个命令 # ls -a /etc | pr -n --columns=3 -h "Files in /etc" -Shows a listing of all the files found in /etc in a printer-friendly format (3 columns) with a custom header (indicated by the -h option), and numbered lines (-n). +以一个友好的排版方式(3列)输出/etc下的文件,自定义了页眉(通过 -h 选项实现),行号(-n) ![File Formatting in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/File-Formatting-in-Linux-with-pr-command.png) -File Formatting in Linux +Linux的文件格式 -### Summary ### +### 总结 ### -In this article we have discussed how to enter and execute commands with the correct syntax in a shell prompt or terminal, and explained how to find, inspect, and use system documentation. As simple as it seems, it’s a large first step in your way to becoming a RHCSA. +在这篇文章中,我们已经讨论了如何在Shell或终端以正确的语法输入和执行命令,并解释如何找到,检查和使用系统文档。正如你看到的一样简单,这就是你成为RHCSA的第一大步 + +如果你想添加一些其他的你经常使用的能够有效帮你完成你的日常工作的基础命令,并为分享他们而感到自豪,请在下方留言.也欢迎提出问题.我们期待您的回复. -If you would like to add other commands that you use on a periodic basis and that have proven useful to fulfill your daily responsibilities, feel free to share them with the world by using the comment form below. Questions are also welcome. We look forward to hearing from you! -------------------------------------------------------------------------------- From 58eb11022f8131887dcc635bc4a36878fbc38f38 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 16 Jul 2015 10:25:24 +0800 Subject: [PATCH 1411/2517] =?UTF-8?q?20150716-1=20=E9=80=89=E9=A2=98=20-?= =?UTF-8?q?=20Gnome=20=E4=B8=93=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...t Right & Wrong - Page 1 - Introduction.md | 54 ++++++++++++++++ ...ht & Wrong - Page 2 - The GNOME Desktop.md | 31 ++++++++++ ...t & Wrong - Page 3 - GNOME Applications.md | 61 +++++++++++++++++++ ...Right & Wrong - Page 4 - GNOME Settings.md | 51 ++++++++++++++++ ...Get Right & Wrong - Page 5 - Conclusion.md | 39 ++++++++++++ 5 files changed, 236 insertions(+) create mode 100644 sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md create mode 100644 sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md create mode 100644 sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md create mode 100644 sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md create mode 100644 sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md diff --git a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md new file mode 100644 index 0000000000..6efc7d1fa6 --- /dev/null +++ b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md @@ -0,0 +1,54 @@ +A Week With GNOME As My Linux Desktop: What They Get Right & Wrong - Page 1 - Introduction +================================================================================ +*Author's Note: If by some miracle you managed to click this article without reading the title then I want to re-iterate something... This is an editorial. These are my opinions. They are not representative of Phoronix, or Michael, these are my own thoughts.* + +Additionally, yes... This is quite possibly a flame-bait article. I hope the community is better than that, because I do want to start a discussion and give feedback to both the KDE and Gnome communities. For that reason when I point out, what I see as, a flaw I will try to be specific and direct so that any discussion can be equally specific and direct. For the record: The alternative title for this article was "Death By A Thousand [Paper Cuts][1]". + +Now, with that out of the way... Onto the article. + +![](http://www.phoronix.net/image.php?id=fedora-22-fan&image=fedora_22_good1_show&w=1920) + +When I sent the [Fedora 22 KDE Review][2] off to Michael I did it with a bit of a bad taste in my mouth. It wasn't because I didn't like KDE, or hadn't been enjoying Fedora, far from it. In fact, I started to transition my T450s over to Arch Linux but quickly decided against that, as I enjoyed the level of convenience that Fedora brings to me for many things. + +The reason I had a bad taste in my mouth was because the Fedora developers put a lot of time and effort into their "Workstation" product and I wasn't seeing any of it. I wasn't using Fedora the way the main developers had intended it to be used and therefore wasn't getting the "Fedora Experience." It felt like someone reviewing Ubuntu by using Kubuntu, using a Hackintosh to review OS X, or reviewing Gentoo by using Sabayon. A lot of readers in the forums bash on Michael for reviewing distributions in their default configurations-- myself included. While I still do believe that reviews should be done under 'real-world' configurations, I do see the value in reviewing something in the condition it was given to you-- for better or worse. + +It was with that attitude in mind that I decided to take a dip in the Gnome pool. + +I do, however, need to add one more disclaimer... I am looking at KDE and Gnome as they are packaged in Fedora. OpenSUSE, Kubuntu, Arch, etc, might all have different implementations of each desktop that will change whether my specific 'pain points' are relevant to your distribution. Furthermore, despite the title, this is going to be a VERY KDE heavy article. I called the article what I did because it was actually USING Gnome that made me realize how many "paper cuts" KDE actually has. + +### Login Screen ### + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login1_show&w=1920) + +I normally don't mind Distributions shipping distro-specific themes, because most of them make the desktop look nicer. I finally found my exception. + +First impression's count for a lot, right? Well, GDM definitely gets this one right. The login screen is incredibly clean with consistent design language through every single part of it. The use of common-language icons instead of text boxes helps in that regard. + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login2_show&w=1920) + +That is not to say that the Fedora 22 KDE login screen-- now SDDM rather than KDM-- looks 'bad' per say but its definitely more jarring. + +Where's the fault? The top bar. Look at the Gnome screenshot-- you select a user and you get a tiny little gear simple for selecting what session you want to log into. The design is clean, it gets out of your way, you could honestly miss it completely if you weren't paying attention. Now look at the blue KDE screenshot, the bar doesn't look it was even rendered using the same widgets, and its entire placement feels like an after thought of "Well shit, we need to throw this option somewhere..." + +The same can be said for the Reboot and Shutdown options in the top right. Why not just a power button that creates a drop down menu that has a drop down for Reboot, Shutdown, Suspend? Having the buttons be different colors than the background certainly makes them stick out and be noticeable... but I don't think in a good way. Again, they feel like an after thought. + +GDM is also far more useful from a practical standpoint, look again along the top row. The time is listed, there's a volume control so that if you are trying to be quiet you can mute all sounds before you even login, there's an accessibility button for things like high contrast, zooming, test to speech, etc, all available via simple toggle buttons. + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login3_show&w=1920) + +Swap it to upstream's Breeze theme and... suddenly most of my complaints are fixed. Common-language icons, everything is in the center of the screen, but the less important stuff is off to the sides. This creates a nice harmony between the top and bottom of the screen since they are equally empty. You still have a text box for the session switcher, but I can forgive that since the power buttons are now common language icons. Current time is available which is a nice touch, as is a battery life indicator. Sure gnome still has a few nice additions, such as the volume applet and the accessibility buttons, but Breeze is a step up from Fedora's KDE theme. + +Go to Windows (pre-Windows 8 & 10...) or OS X and you will see similar things – very clean, get-out-of-your-way lock screens and login screens that are devoid of text boxes or other widgets that distract the eye. It's a design that works and that is non-distracting. Fedora... Ship Breeze by default. VDG got the design of the Breeze theme right. Don't mess it up. + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=1 + +作者:Eric Griffith +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://wiki.ubuntu.com/One%20Hundred%20Papercuts +[2]:http://www.phoronix.com/scan.php?page=article&item=fedora-22-kde&num=1 \ No newline at end of file diff --git a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md new file mode 100644 index 0000000000..d01e77343d --- /dev/null +++ b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md @@ -0,0 +1,31 @@ +A Week With GNOME As My Linux Desktop: What They Get Right & Wrong - Page 2 - The GNOME Desktop +================================================================================ +### The Desktop ### + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_gdm_show&w=1920) + +I spent the first five days of my week logging into Gnome manually-- not turning on automatic login. On night of the fifth day I got annoyed with having to login by hand and so I went into the User Manager and turned on automatic login. The next time I logged in I got a prompt: "Your keychain was not unlocked. Please enter your password to unlock your keychain." That was when I realized something... Gnome had been automatically unlocking my keychain—my wallet in KDE speak-- every time I logged in via GDM. It was only when I bypassed GDM's login that Gnome had to step in and make me do it manually. + +Now, I am under the personal belief that if you enable automatic login then your key chain should be unlocked automatically as well-- otherwise what's the point? Either way you still have to type in your password and at least if you hit the GDM Login screen you have a chance to change your session if you want to. + +But, regardless of that, it was at that moment that I realized it was such a simple thing that made the desktop feel so much more like it was working WITH ME. When I log into KDE via SDDM? Before the splash screen is even finished loading there is a window popping up over top the splash animation-- thereby disrupting the splash screen-- prompting me to unlock my KDE wallet or GPG keyring. + +If a wallet doesn't exist already you get prompted to create a wallet-- why couldn't one have been created for me at user creation?-- and then get asked to pick between two encryption methods, where one is even implied as insecure (Blowfish), why are you letting me pick something that's insecure for my security? Author's Note: If you install the actual KDE spin and don't just install KDE after-the-fact then a wallet is created for you at user creation. Unfortunately it's not unlocked for you automatically, and it seems to use the older Blowfish method rather than the new, and more secure, GPG method. + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_kgpg_show&w=1920) + +If you DO pick the secure one (GPG) then it tries to load an Gpg key... which I hope you had one created already because if you don't you get yelled at. How do you create one? Well, it doesn't offer to make one for you... nor It doesn't tell you... and if you do manage TO figure out that you are supposed to use KGpg to create the key then you get taken through several menus and prompts that are nothing but confusing to new users. Why are you asking me where the GPG binary is located? How on earth am I supposed to know? Can't you just use the most recent one if there's more than one? And if there IS only one then, I ask again, why are you prompting me? + +Why are you asking me what key size and encryption algorithm to use? You select 2048 and RSA/RSA by default, so why not just use those? If you want to have those options available then throw them under the "Expert mode" button that is right there. This isn't just about having configuration options available, its about needless things that get thrown in the user's face by default. This is going to be a theme for the rest of the article... KDE needs better sane defaults. Configuration is great, I love the configuration I get with KDE, but it needs to learn when to and when not to prompt. It also needs to learn that "Well its configurable" is no excuse for bad defaults. Defaults are what users see initially, bad defaults will lose users. + +Let's move on from the key chain issue though, because I think I made my point. + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=2 + +作者:Eric Griffith +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md new file mode 100644 index 0000000000..bc48bb0b76 --- /dev/null +++ b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md @@ -0,0 +1,61 @@ +A Week With GNOME As My Linux Desktop: What They Get Right & Wrong - Page 3 - GNOME Applications +================================================================================ +### Applications ### + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_videos_show&w=1920) + +This is the one area where things are basically a wash. Each environment has a few applications that are really nice, and a few that are not so great. Once again though, Gnome gets the little things right in a way that KDE completely misses. None of KDE's applications are bad or broken, that's not what I'm saying. They function. But that's about it. To use an analogy: they passed the test, but they sure didn't get any where close to 100% on it. + +Gnome on left, KDE on right. Dragon performs perfectly fine, it has clearly marked buttons for playing a file, URL, or a disc, just as you can do under Gnome Videos... but Gnome takes it one extra little step further in the name of convenience and user friendliness: they show all the videos detected under your system by default, without you having to do anything. KDE has Baloo-- just as they had Nepomuk before that-- why not use them? They've got a list video files that are freely accessible... but don't make use of the feature. + +Moving on... Music Players. + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_rhythmbox_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_amarok_show&w=1920) + +Both of these applications, Rhythmbox on the left and Amarok on the right were opened up and then a screenshot was immediately taken, nothing was clicked, or altered. See the difference? Rhythmbox looks like a music player. It's direct, there's obvious ways to sort the results, it knows what is trying to be and what it's job is: to play music. + +Amarok feels like one of the tech demos, or library demos where someone puts every option and extension they possible can all inside one application in order to show them off-- it's never something that gets shipped as production, it's just there to show off bits and pieces. And that's exactly what Amarok feels like: its someone trying to show off every single possible cool thing they shove into a media player without ever stopping to think "Wait, what were trying to write again? An app to play music?" + +Just look at the default layout. What is front and center for the user? A visualizer and Wikipedia integration-- the largest and most prominent column on the page. What's the second largest? Playlist list. Third largest, aka smallest? The actual music listing. How on earth are these sane defaults for a core application? + +Software Managers! Something that has seen a lot of push in recent years and will likely only see a bigger push in the months to come. Unfortunately, it's another area where KDE was so close... and then fell on its face right at the finish line. + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_software_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_apper_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_muon_show&w=1920) + +Gnome Software is probably my new favorite software center, minus one gripe which I will get to in a bit. Muon, I wanted to like you. I really did. But you are a design nightmare. When the VDG was drawing up plans for you (mockup below), you looked pretty slick. Good use of white space, clean design, nice category listing, your whole not-being-split-into-two-applications. + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_muon1_show&w=1920) + +Then someone got around to coding you and doing your actual UI, and I can only guess they were drunk while they did it. + +Let's look at Gnome Software. What's smack dab in the middle? The application, its screenshots, its description, etc. What's smack dab in the middle of Muon? Gigantic waste of white space. Gnome Software also includes the lovely convenience feature of putting a "Launch" button right there in case you already have an application installed. Convenience and ease of use are important, people. Honestly, JUST having things in Muon be centered aligned would probably make things look better already. + +What's along the top edge of Gnome Software, like a tab listing? All Software, Installed, Updates. Clean language, direct, to the point. Muon? Well, we have "Discover", which works okay as far as language goes, and then we have Installed, and then nothing. Where's updates? + +Well.. the developers decided to split updates off into its own application, thus requiring you to open two applications to handle your software-- one to install it, and one to update it-- going against every Software Center paradigm that has ever existed since the Synaptic graphical package manager. + +I'm not going to show it in a screenshot just because I don't want to have to clean up my system afterwards, but if you go into Muon and start installing something the way it shows that is by adding a little tab to the bottom of your screen with the application's name. That tab doesn't go away when the application is done installing either, so if you're installing a lot of applications at a single time then you'll just slowly accumulate tabs along the bottom that you then have to go through and clean up manually, because if you don't then they grow off the screen and you have to swipe through them all to get to the most recent ones. Think: opening 50 tabs in Firefox. Major annoyance, major inconvenience. + +I did say I would bash on Gnome a bit, and I meant it. Muon does get one thing very right that Gnome Software doesn't. Under the settings bar Muon has an option for "Show Technical Packages" aka: compilers, software libraries, non-graphical applications, applications without AppData, etc. Gnome doesn't. If you want to install any of those you have to drop down to the terminal. I think that's wrong. I certainly understand wanting to push AppData but I think they pushed it too soon. What made me realize Gnome didn't have this setting was when I went to install PowerTop and couldn't get Gnome to display it-- no AppData, no "Show Technical Packages" setting. + +Doubly unfortunate is the fact that you can't "just use apper" if you're under KDE since... + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_apperlocal_show&w=1920) + +Apper's support for installing local packages has been broken for since Fedora 19 or so, almost two years. I love the attention to detail and quality. + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=3 + +作者:Eric Griffith +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md new file mode 100644 index 0000000000..2907544215 --- /dev/null +++ b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md @@ -0,0 +1,51 @@ +A Week With GNOME As My Linux Desktop: What They Get Right & Wrong - Page 4 - GNOME Settings +================================================================================ +### Settings ### + +There are a few specific KDE Control modules that I am going to pick at, mostly because they are so laughable horrible compared to their gnome counter-part that its honestly pathetic. + +First one up? Printers. + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers1_show&w=1920) + +Gnome is on the left, KDE is on the right. You know what the difference is between the printer applet on the left, and the one on the right? When I opened up Gnome Control Center and hit "Printers" the applet popped up and nothing happened. When I opened up KDE System Settings and hit "Printers" I got a password prompt. Before I was even allowed to LOOK at the printers I had to give up ROOT'S password. + +Let me just re-iterate that. In this, the days of PolicyKit and Logind, I am still being asked for Root's password for what should be a sudo operation. I didn't even SETUP root's password when I installed the system. I had to drop down to Konsole and run 'sudo passwd root' so that I could GIVE root a password so that I could go back into System Setting's printer applet and then give up root's password to even LOOK at what printers were available. Once I did that I got prompted for root's password AGAIN when I hit "Add Printer" then I got prompted for root's password AGAIN after I went through and selected a printer and driver. Three times I got asked for ROOT'S password just to add a printer to the system. + +When I added a printer under Gnome I didn't get prompted for my SUDO password until I hit "Unlock" in the printer applet. I got asked once, then I never got asked again. KDE, I am begging you... Adopt Gnome's "Unlock" methodology. Do not prompt for a password until you really need one. Furthermore, whatever library is out there that allows for KDE applications to bypass PolicyKit / Logind (if its available) and prompt directly for root... Bin that code. If this was a multi-user system I either have to give up root's password, or be there every second of every day in order to put it in any time a user might have to update, change, or add a new printer. Both options are completely unacceptable. + +One more thing... + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers2_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers3_show&w=1920) + +Question to the forums: What looks cleaner to you? I had this realization when I was writing this article: Gnome's applet makes it very clear where any additional printers are going to go, they set aside a column on the left to list them. Before I added a second printer to KDE, and it suddenly grew a left side column, I had this nightmare-image in my head of the applet just shoving another icon into the screen and them being listed out like preview images in a folder of pictures. I was pleasantly surprised to see that I was wrong but the fact that the applet just 'grew' another column that didn't exist before and drastically altered its presentation is not really 'good' either. It's a design that's confusing, shocking, and non-intuitive. + +Enough about printers though... Next KDE System Setting that is up for my public stoning? Multimedia, Aka Phonon. + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_sound_show&w=1920) + +As always, Gnome's on the left, KDE is on the right. Let's just run through the Gnome setting first... The eyes go left to right, top to bottom, right? So let's do the same. First up: volume control slider. The blue hint against the empty bar with 100% clearly marked removes all confusion about which way is "volume up." Immediately after the slider is an easy On/Off toggle that functions a mute on/off. Points to Gnome for remembering what the volume was set to BEFORE I muted sound, and returning to that same level AFTER I press volume-up to un-mute. Kmixer, you amnesiac piece of crap, I wish I could say as much about you. + +Moving on! Tabbed options for Output, Input and Applications? With per application volume controls within easy reach? Gnome I love you more and more with every passing second. Balance options, sound profiles, and a clearly marked "Test Speakers" option. + +I'm not sure how this could have been implemented in a cleaner, more concise way. Yes, it's just a Gnome-ized Pavucontrol but I think that's the point. Pavucontrol got it mostly right to begin with, the Sound applet in Gnome Control Center just refines it slightly to make it even closer to perfect. + +Phonon, you're up. And let me start by saying: What the fsck am I looking at? -I- get that I am looking at the priority list for the audio devices on the system, but the way it is presented is a bit of a nightmare. Also where are the things the user probably cares about? A priority list is a great thing to have, it SHOULD be available, but it's something the user messes with once or twice and then never touches again. It's not important, or common, enough to warrant being front and center. Where's the volume slider? Where's per application controls? The things that users will be using more frequently? Well.. those are under Kmix, a separate program, with its own settings and configuration... not under the System Settings... which kind of makes System Settings a bit of a misnomer. And in that same vein, Let's hop over to network settings. + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_network_show&w=1920) + +Presented above is the Gnome Network Settings. KDE's isn't included because of the reason I'm about to hit on. If you go to KDE's System Settings and hit any of the three options under the "Network" Section you get tons of options: Bluetooth settings, default username and password for Samba shares (Seriously, "Connectivity" only has 2 options: Username and password for SMB shares. How the fsck does THAT deserve the all-inclusive title "Connectivity"?), controls for Browser Identification (which only work for Konqueror...a dead project), proxy settings, etc... Where's my wifi settings? They aren't there. Where are they? Well, they are in the network applet's private settings... not under Network Settings... + +KDE, you're killing me. You have "System Settings" USE IT! + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=4 + +作者:Eric Griffith +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md new file mode 100644 index 0000000000..eb38d859d6 --- /dev/null +++ b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md @@ -0,0 +1,39 @@ +A Week With GNOME As My Linux Desktop: What They Get Right & Wrong - Page 5 - Conclusion +================================================================================ +### User Experience and Closing Thoughts ### + +When Gnome 2.x and KDE 4.x were going head to head.. I jumped between the two quite happily. Some things I loved, some things I hated, but over all they were both a pleasure to use. Then Gnome 3.x came around and all of the drama with Gnome Shell. I swore off Gnome and avoided it every chance I could. It wasn't user friendly, it was non-intuitive, it broke an establish paradigm in preparation for tablet's taking over the world... A future that, judging from the dropping sales of tablets, will never come. + +Eight releases of Gnome 3 later and the unimaginable happened. Gnome got user friendly. Gnome got intuitive. Is it perfect? Of course not. I still hate the paradigm it tries to push, I hate how it tries to force a work flow onto me, but both of those things can be gotten used to with time and patience. Once you have managed to look past Gnome Shell's alien appearance and you start interacting with it and the other parts of Gnome (Control Center especially) you see what Gnome has definitely gotten right: the little things. The attention to detail. + +People can adapt to new paradigms, people can adapt to new work flows-- the iPhone and iPad proved that-- but what will always bother them are the paper cuts. + +Which brings up an important distinction between KDE and Gnome. Gnome feels like a product. It feels like a singular experience. When you use it, it feels like it is complete and that everything you need is at your fingertips. It feel's like THE Linux desktop in the same way that Windows or OS X have THE desktop experience: what you need is there and it was all written by the same guys working on the same team towards the same goal. Hell, even an application prompting for sudo access feels like an intentional part of the desktop under Gnome, much the way that it is under Windows. In KDE it's just some random-looking window popup that any application could have created. It doesn't feel like a part of the system stopping and going "Hey! Something has requested administrative rights! Do you want to let it go through?" in an official capacity. + +KDE doesn't feel like cohesive experience. KDE doesn't feel like it has a direction its moving in, it doesn't feel like a full experience. KDE feels like its a bunch of pieces that are moving in a bunch of different directions, that just happen to have a shared toolkit beneath them. If that's what the developers are happy with, then fine, good for them, but if the developers still have the hope of offering the best experience possible then the little stuff needs to matter. The user experience and being intuitive needs to be at the forefront of every single application, there needs to be a vision of what KDE wants to offer -and- how it should look. + +Is there anything stopping me from using Gnome Disks under KDE? Rhythmbox? Evolution? Nope. Nope. Nope. But that misses the point. Gnome and KDE both market themselves as "Desktop Environments." They are supposed to be full -environments-, that means they all the pieces come and fit together, that you use that environment's tools because they are saying "We support everything you need to have a full desktop." Honestly? Only Gnome seems to fit the bill of being complete. KDE feel's half-finished when it comes to "coming together" part, let alone offering everything you need for a "full experience". There's no counterpart to Gnome Disks-- kpartitionmanager prompts for root. No "First Time User" run through, it just now got a user manager in Kubuntu. Hell, Gnome even provides a Maps, Notes, Calendar and Clock application. Do all of these applications matter 100%? No, of course not. But the fact that Gnome has them helps to push the idea that Gnome is a full and complete experience. + +My complaints about KDE are not impossible to fix, not by a long shot. But it requires people to care. It requires developers to take pride in their work beyond just function-- form counts for a whole hell of a lot. Don't take away the user's ability to configure things-- the lack of configuration is one of my biggest gripes with GNOME 3.x, but don't use "Well you can configure it however you want," as an excuse for not providing sane defaults. The defaults are what users are going to see, they are what the users are going to judge from the first moment they open your application. Make it a good impression. + +I know the KDE developers know design matters, that is WHY the Visual Design Group exists, but it feels like they aren't using the VDG to their fullest. And therein lies KDE's hamartia. It's not that KDE can't be complete, it's not that it can't come together and fix the downfalls, it just that they haven't. They aimed for the bulls eye... but they missed. + +And before anyone says it... Don't say "Patches are welcome." Because while I can happily submit patches for the individual annoyances more will just keep coming as developers keep on their marry way of doing things in non-intuitive ways. This isn't about Muon not being center-aligned. This isn't about Amarok having an ugly UI. This isn't about the volume and brightness pop-up notifiers taking up a large chunk of my screen real-estate every time I hit my hotkeys (seriously, someone shrink those things). + +This is about a mentality of apathy, this is about developers apparently not thinking things through when they make the UI for their applications. Everything the KDE Community does works fine. Amarok plays music. Dragon Player plays videos. Kwin / Qt & kdelibs is seemingly more power efficient than Mutter / gtk (according to my battery life times. Non-scientific testing). Those things are all well and good, and important.. but the presentation matters to. Arguably, the presentation matters the most because that is what user's see and interact with. + +To KDE application developers... Get the VDG involved. Make every single 'core' application get its design vetted and approved by the VDG, have a UI/UX expert from the VDG go through the usage patterns and usage flow of your application to make sure its intuitive. Hell, even just posting a mock up to the VDG forums and asking for feedback would probably get you some nice pointers and feedback for whatever application you're working on. You have this great resource there, now actually use them. + +I am not trying to sound ungrateful. I love KDE, I love the work and effort that volunteers put into giving Linux users a viable desktop, and an alternative to Gnome. And it is because I care that I write this article. Because I want to see KDE excel, I want to see it go further and farther than it has before. But doing that requires work on everyone's part, and it requires that people don't hold back criticism. It requires that people are honest about their interaction with the system and where it falls apart. If we can't give direct criticism, if we can't say "This sucks!" then it will never get better. + +Will I still use Gnome after this week? Probably not, no. Gnome still trying to force a work flow on me that I don't want to follow or abide by, I feel less productive when I'm using it because it doesn't follow my paradigm. For my friends though, when they ask me "What desktop environment should I use?" I'm probably going to recommend Gnome, especially if they are less technical users who want things to "just work." And that is probably the most damning assessment I could make in regards to the current state of KDE. + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=5 + +作者:Eric Griffith +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From e2a8a654b6fafe59ffdc60f50763e58e6113594e Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 16 Jul 2015 11:10:19 +0800 Subject: [PATCH 1412/2517] =?UTF-8?q?20150716-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talk/20150716 Interview--Larry Wall.md | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 sources/talk/20150716 Interview--Larry Wall.md diff --git a/sources/talk/20150716 Interview--Larry Wall.md b/sources/talk/20150716 Interview--Larry Wall.md new file mode 100644 index 0000000000..5d0b40d2ed --- /dev/null +++ b/sources/talk/20150716 Interview--Larry Wall.md @@ -0,0 +1,125 @@ +Interview: Larry Wall +================================================================================ +> Perl 6 has been 15 years in the making, and is now due to be released at the end of this year. We speak to its creator to find out what’s going on. + +Larry Wall is a fascinating man. He’s the creator of Perl, a programming language that’s widely regarded as the glue holding the internet together, and mocked by some as being a “write-only” language due to its density and liberal use of non-alphanumeric characters. Larry also has a background in linguistics, and is well known for delivering entertaining “State of the Onion” presentations about the future of Perl. + +At FOSDEM 2015 in Brussels, we caught up with Larry to ask him why Perl 6 has taken so long (Perl 5 was released in 1994), how difficult it is to manage a project when everyone has strong opinions and pulling in different directions, and how his background in linguistics influenced the design of Perl from the start. Get ready for some intriguing diversions… + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall1.jpg) + +**Linux Voice: You once had a plan to go and find an undocumented language somewhere in the world and create a written script for it, but you never had the opportunity to fulfil this plan. Is that something you’d like to go back and do now?** + +Larry Wall: You have to be kind of young to be able to carry that off! It’s actually a lot of hard work, and organisations that do these things don’t tend to take people in when they’re over a certain age. Partly this is down to health and vigour, but also because people are much better at picking up new languages when they’re younger, and you have to learn the language before making a script for it. + +I started trying to teach myself Japanese about 10 years ago, and I could speak it quite well, because of my phonology and phonetics training – but it’s very hard for me to understand what anybody says. So I can go to Japan and ask for directions, but I can’t really understand the answers! + +> “With Perl 6, we found some ways to make the computer more sure about what the user is talking about.” + +So usually learning a language well enough to develop a writing system, and to at least be conversational in the language, takes some period of years before you can get to the point where you can actually do literacy and start educating people on their own culture, as it were. And then you teach them to write about their own culture as well. + +Of course, if you have language helpers – and we were told not to call them “language informants”, or everyone would think we were working for the CIA! – if you have these people, you can get them to come in and help you learn the foreign language. They are not teachers but there are ways of eliciting things from someone who’s not a language teacher – they can still teach you how to speak. They can take a stick and point to it and say “that’s a stick”, and drop it and say “the stick falls”. Then you start writing things down and systematising things. + +The motivation that most people have, going out to these groups, is to translate the Bible into their languages. But that’s only one part of it; the other is also culture preservation. Missionaries get kind of a bad rep on that, because anthropologists think they should be left to sit their in their own culture. But somebody is probably going to change their culture anyway – it’s usually the army, or businesses coming in, like Coca Cola or the sewing machine people, or missionaries. And of those three, the missionaries are the least damaging, if they’re doing their job right. + +**LV: Many writing systems are based on existing scripts, and then you have invented ones like Greenlandic…** + +LW: The Cherokee invented their own just by copying letters, and they have no mapping much to what we think of letters, and it’s fairly arbitrary in that sense. It just has to represent how the people themselves think of the language, and sufficiently well to communicate. Often there will be variations on Western orthography, using characters from Latin where possible. Tonal languages have to mark the tones somehow, by accents or by numbers. + +As soon as you start leaning towards a phoenetic or phonological representation, then you also start to lose dialectical differences – or you have to write the dialectal differences. Or you have conventional spelling like we have in English, but pronunciation that doesn’t really match it. + +**LV: When you started working on Perl, what did you take from your background in linguistics that made you think: “this is really important in a programming language”?** + +LW: I thought a lot about how people use languages. In real languages, you have a system of nouns and verbs and adjectives, and you kind of know which words are which type. And in real natural languages, you have a lot of instances of shoving one word into a different slot. The linguistic theory I studied was called tagmemics, and it accounts for how this works in a natural language – that you could have something that you think of as a noun, but you can verb it, and people do that all time. + +You can pretty much shove anything in any slot, and you can communicate. One of my favourite examples is shoving an entire sentence in as an adjective. The sentence goes like this: “I don’t like your I-can-use-anything-as-an-adjective attitude”! + +So natural language is very flexible this way because you have a very intelligent listener – or at least, compared with a computer – who you can rely on to figure out what you must have meant, in case of ambiguity. Of course, in a computer language you have to manage the ambiguity much more closely. + +Arguably in Perl 1 through to 5 we didn’t manage it quite adequately enough. Sometimes the computer was confused when it really shouldn’t be. With Perl 6, we discovered some ways to make the computer more sure about what the user is talking about, even if the user is confused about whether something is really a string or a number. The computer knows the exact type of it. We figured out ways of having stronger typing internally but still have the allomorphic “you can use this as that” idea. + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall2.jpg) + +**LV: For a long time Perl was seen as the “glue” language of the internet, for fitting bits and pieces together. Do you see Perl 6 as a release to satisfy the needs of existing users, or as a way to bring in new people, and bring about a resurgence in the language?** + +LW: The initial intent was to make a better Perl for Perl programmers. But as we looked at the some of the inadequacies of Perl 5, it became apparent that if we fixed these inadequacies, Perl 6 would be more applicable, as I mentioned in my talk – like how J. R. R. Tolkien talked about applicability [see http://tinyurl.com/nhpr8g2]. + +The idea that “easy things should be easy and hard things should be possible” goes way back, to the boundary between Perl 2 and Perl 3. In Perl 2, we couldn’t handle binary data or embedded nulls – it was just C-style strings. I said then that “Perl is just a text processing language – you don’t need those things in a text processing language”. + +But it occurred to me at the time that there were a large number of problems that were mostly text, and had a little bit of binary data in them – network addresses and things like that. You use binary data to open the socket but then text to process it. So the applicability of the language more than doubled by making it possible to handle binary data. + +That began a trade-off about what things should be easy in a language. Nowadays we have a principle in Perl, and we stole the phrase Huffman coding for it, from the bit encoding system where you have different sizes for characters. Common characters are encoded in a fewer number of bits, and rarer characters are encoded in more bits. + +> “There had to be a very careful balancing act. There were just so many good ideas at the beginning.” + +We stole that idea as a general principle for Perl, for things that are commonly used, or when you have to type them very often – the common things need to be shorter or more succinct. Another bit of that, however, is that they’re allowed to be more irregular. In natural language, it’s actually the most commonly used verbs that tend to be the most irregular. + +And there’s a reason for that, because you need more differentiation of them. One of my favourite books is called The Search for the Perfect Language by Umberto Eco, and it’s not about computer languages; it’s about philosophical languages, and the whole idea that maybe some ancient language was the perfect language and we should get back to it. + +All of those languages make the mistake of thinking that similar things should always be encoded similarly. But that’s not how you communicate. If you have a bunch of barnyard animals, and they all have related names, and you say “Go out and kill the Blerfoo”, but you really wanted them to kill the Blerfee, you might get a cow killed when you want a chicken killed. + +So in realms like that it’s actually better to differentiate the words, for more redundancy in the communication channel. The common words need to have more of that differentiation. It’s all about communicating efficiently, and then there’s also this idea of self-clocking codes. If you look at a UPC label on a product – a barcode – that’s actually a self-clocking code where each pair of bars and spaces is always in a unit of seven columns wide. You rely on that – you know the width of the bars will always add up to that. So it’s self-clocking. + +There are other self-clocking codes used in electronics. In the old transmission serial protocols there were stop and start bits so you could keep things synced up. Natural languages also do this. For instance, in the writing of Japanese, they don’t use spaces. Because the way they write it, they will have a Kanji character from Chinese at the head of each phrase, and then the endings are written in the a syllabary. + +**LV: Hiragana, right?** + +LW: Yes, Hiragana. So naturally the head of each phrase really stands out with this system. Similarly, in ancient Greek, most of the verbs were declined or conjugated. So they had standard endings were sort-of a clocking mechanism. Spaces were optional in their writing system as well – it was a more modern invention to put the spaces in. + +So similarly in computer languages, there’s value in having a self-clocking code. We rely on this heavily in Perl, and even more heavily in Perl 6 than in previous releases. The idea that when you’re parsing an expression, you’re either expecting a term or an infix operator. When you’re expecting a term you might also get a prefix operator – that’s kind-of in the same expectation slot – and when you’re expecting an infix you might also get a postfix for the previous term. + +But it flips back and forth. And if the compiler actually knows which it is expecting, you can overload those a little bit, and Perl does this. So a slash when it’s expecting a term will introduce a regular expression, whereas a slash when you’re expecting an infix will be division. On the other hand, we don’t want to overload everything, because then you lose the self-clocking redundancy. + +Most of our best error messages, for syntax errors, actually come out of noticing that you have two terms in a row. And then we try to figure out why there are two terms in a row – “oh, you must have left a semicolon out on the previous line”. So we can produce much better error messages than the more ad-hoc parsers. + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall3.jpg) + +**LV: Why has Perl 6 taken fifteen years? It must be hard overseeing a language when everyone has different opinions about things, and there’s not always the right way to do things, and the wrong way.** + +LW: There had to be a very careful balancing act. There were just so many good ideas at the beginning – well, I don’t want to say they were all good ideas. There were so many pain points, like there were 361 RFCs [feature proposal documents] when I expected maybe 20. We had to sit back and actually look at them all, and ignore the proposed solutions, because they were all over the map and all had tunnel vision. Each one many have just changed one thing, but if we had done them all, it would’ve been a complete mess. + +So we had to re-rationalise based on how people were actually hurting when they tried to use Perl 5. We started to look at the unifying, underlying ideas. Many of these RFCs were based on the fact that we had an inadequate type system. By introducing a more coherent type system we could fix many problems in a sane fashion and a cohesive fashion. + +And we started noticing other ways how we could unify the featuresets and start reusing ideas in different areas. Not necessarily that they were the same thing underneath. We have a standard way of writing pairs – well, two ways in Perl! But the way of writing pairs with a colon could also be reused for radix notation, or for literal numbers in any base. It could also be used for various alternative forms of quoting. We say in Perl that it’s “strangely consistent”. + +> “People who made early implementations of Perl 6 came back to me, cap in hand, and said “We really need a language designer.”” + +Similar ideas pop up, and you say “I’m already familiar with how that syntax works, but I see it’s being used for something else”. So it took some unity of vision to find these unifications. People who had the various ideas and made early implementations of Perl 6 came back to me, cap-in-hand, and said “We really need a language designer. Could you be our benevolent dictator?” + +So I was the language designer, but I was almost explicitly told: “Stay out of the implementation! We saw what you did made out of Perl 5, and we don’t like it!” It was really funny because the innards of the new implementation started looking a whole lot like Perl 5 inside, and maybe that’s why some of the early implementations didn’t work well. + +Because we were still feeling our way into the whole design, the implementations made a lot of assumptions about what VM should do and shouldn’t do, so we ended up with something like an object oriented assembly language. That sort of problem was fairly pervasive at the beginning. Then the Pugs guys came along and said “Let’s use Haskell, because it makes you think very clearly about what you’re doing. Let’s use it to clarify our semantic model underneath.” + +So we nailed down some of those semantic models, but more importantly, we started building the test suite at that point, to be consistent with those semantic models. Then after that, the Parrot VM continued developing, and then another implementation, Niecza, came along and it was based on .NET. It was by a young fellow who was very smart and implemented a large subset of Perl 6, but he was kind of a loner, didn’t really figure out a way to get other people involved in his project. + +At the same time the Parrot project was getting too big for anyone to really manage it inside, and very difficult to refactor. At that point the fellows working on Rakudo decided that we probably needed to be on more platforms than just the Parrot VM. So they invented a portability layer called NQP which stands for “Not Quite Perl”. They ported it to first of all run on the JVM (Java Virtual Machine), and while they were doing that they were also secretly working on a new VM called MoarVM. That became public a little over a year ago. + +Both MoarVM and JVM run a pretty much equivalent set of regression tests – Parrot is kind-of trailing back in some areas. So that has been very good to flush out VM-specific assumptions, and we’re starting to think about NQP targeting other things. There was a Google Summer of Code project year to target NQP to JavaScript, and that might fit right in, because MoarVM also uses Node.js for much of its more mundane processing. + +We probably need to concentrate on MoarVM for the rest of this year, until we actually define 6.0, and then the rest will catch up. + +**LV: Last year in the UK, the government kicked off the Year of Code, an attempt to get young people interested in programming. There are lots of opinions about how this should be done – like whether you should teach low-level languages at the start, so that people really understand memory usage, or a high-level language. What’s your take on that?** + +LW: Up until now, the Python community has done a much better job of getting into the lower levels of education than we have. We’d like to do something in that space too, and that’s partly why we have the butterfly logo, because it’s going to be appealing to seven year old girls! + +But we do think that Perl 6 will be learnable as a first language. A number of people have surprised us by learning Perl 5 as their first language. And you know, there are a number of fairly powerful concepts even in Perl 5, like closures, lexical scoping, and features you generally get from functional programming. Even more so in Perl 6. + +> “Until now, the Python community has done a much better job of getting into the lower levels of education.” + +Part of the reason the Perl 6 has taken so long is that we have around 50 different principles we try to stick to, and in language design you’re end up juggling everything and saying “what’s really the most important principle here”? There has been a lot of discussion about a lot of different things. Sometimes we commit to a decision, work with it for a while, and then realise it wasn’t quite the right decision. + +We didn’t design or specify pretty much anything about concurrent programming until someone came along who was smart enough about it and knew what the different trade-offs were, and that’s Jonathan Worthington. He has blended together ideas from other languages like Go and C#, with concurrent primitives that compose well. Composability is important in the rest of the language. + +There are an awful lot of concurrent and parallel programming systems that don’t compose well – like threads and locks, and there have been lots of ways to do it poorly. So in one sense, it’s been worth waiting this extra time to see some of these languages like Go and C# develop really good high-level primitives – that’s sort of a contradiction in terms – that compose well. + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/interview-larry-wall/ + +作者:[Mike Saunders][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/mike/ \ No newline at end of file From 01b55db7ec79fceb2860aa6141afd586d68b7fb4 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 16 Jul 2015 15:12:39 +0800 Subject: [PATCH 1413/2517] [Translated] sources/tech/20150706 PHP Security.md --- sources/tech/20150706 PHP Security.md | 360 ----------------------- translated/tech/20150706 PHP Security.md | 358 ++++++++++++++++++++++ 2 files changed, 358 insertions(+), 360 deletions(-) delete mode 100644 sources/tech/20150706 PHP Security.md create mode 100644 translated/tech/20150706 PHP Security.md diff --git a/sources/tech/20150706 PHP Security.md b/sources/tech/20150706 PHP Security.md deleted file mode 100644 index 9b026884ec..0000000000 --- a/sources/tech/20150706 PHP Security.md +++ /dev/null @@ -1,360 +0,0 @@ -ictlyh Translating -PHP Security -================================================================================ -![](http://www.codeproject.com/KB/PHP/363897/php_security.jpg) - -### Introduction ### - -When offering an Internet service, you must always keep security in mind as you develop your code. It may appear that most PHP scripts aren't sensitive to security concerns; this is mainly due to the large number of inexperienced programmers working in the language. However, there is no reason for you to have an inconsistent security policy based on a rough guess at your code's significance. The moment you put anything financially interesting on your server, it becomes likely that someone will try to casually hack it. Create a forum program or any sort of shopping cart, and the probability of attack rises to a dead certainty. - -### Background ### - -Here are a few general security guidelines for securing your web content: - -#### Don't trust forms #### - -Hacking forms is trivial. Yes, by using a silly JavaScript trick, you may be able to limit your form to allow only the numbers 1 through 5 in a rating field. The moment someone turns JavaScript off in their browser or posts custom form data, your client-side validation flies out the window. - -Users interact with your scripts primarily through form parameters, and therefore they're the biggest security risk. What's the lesson? Always validate the data that gets passed to any PHP script in the PHP script. In this article, we show you how to analyze and protect against cross-site scripting (XSS) attacks, which can hijack your user's credentials (and worse). You'll also see how to prevent the MySQL injection attacks that can taint or destroy your data. - -#### Don't trust users #### - -Assume that every piece of data your website gathers is laden with harmful code. Sanitize every piece, even if you're positive that nobody would ever try to attack your site. - -#### Turn off global variables #### - -The biggest security hole you can have is having the register_globals configuration parameter enabled. Mercifully, it's turned off by default in PHP 4.2 and later. If **register_globals** is on, then you can disable this feature by turning the register_globals variable to Off in your server's php.ini file : - - register_globals = Off - -Novice programmers view registered globals as a convenience, but they don't realize how dangerous this setting is. A server with global variables enabled automatically assigns global variables to any form parameters. For an idea of how this works and why this is dangerous, let's look at an example. - -Let's say that you have a script named process.php that enters form data into your user database. The original form looked like this: - - - -When running process.php, PHP with registered globals enabled places the value of this parameter into the $username variable. This saves some typing over accessing them through **$_POST['username']** or **$_GET['username']**. Unfortunately, this also leaves you open to security problems, because PHP sets a variable for any value sent to the script via a GET or POST parameter, and that is a big problem if you didn't explicitly initialize the variable and you don't want someone to manipulate it. - -Take the script below, for example—if the $authorized variable is true, it shows confidential data to the user. Under normal circumstances, the $authorized variable is set to true only if the user has been properly authenticated via the hypothetical authenticated_user() function. But if you have **register_globals** active, anyone could send a GET parameter such as authorized=1 to override this: - - - -The moral of the story is that you should pull form data from predefined server variables. All data passed on to your web page via a posted form is automatically stored in a large array called $_POST, and all GET data is stored in a large array called **$_GET**. File upload information is stored in a special array called $_FILES. In addition, there is a combined variable called $_REQUEST. - -To access the username field from a POST method form, use **$_POST['username']**. Use **$_GET['username']** if the username is in the URL. If you don't care where the value came from, use **$_REQUEST['username']**. - - - -$_REQUEST is a union of the $_GET, $_POST, and $_COOKIE arrays. If you have two or more values of the same parameter name, be careful of which one PHP uses. The default order is cookie, POST, then GET. - -#### Recommended Security Configuration Options #### - -There are several PHP configuration settings that affect security features. Here are the ones that should obviously be used for production servers: - -- **register_globals** set to off -- **safe_mode** set to off -- **error_reporting** set to off. This is visible error reporting that sends a message to the user's browser if something goes wrong. For production servers, use error logging instead. Development servers can enable error logging as long as they're behind a firewall. -- Disable these functions: system(), exec(), passthru(), shell_exec(), proc_open(), and popen(). -- **open_basedir** set for both the /tmp directory (so that session information can be stored) and the web root so that scripts cannot access files outside a selected area. -- **expose_php** set to off. This feature adds a PHP signature that includes the version number to the Apache headers. -- **allow_url_fopen** set to off. This isn't strictly necessary if you're careful about how you access files in your code—that is, you validate all input parameters. -- **allow_url_include** set to off. There's really no sane reason for anyone to want to access include files via HTTP. - -In general, if you find code that wants to use these features, you shouldn't trust it. Be especially careful of anything that wants to use a function such as system()—it's almost certainly flawed. - -With these settings now behind us, let's look at some specific attacks and the methods that will help you protect your server. - -### SQL Injection Attacks ### - -Because the queries that PHP passes to MySQL databases are written in the powerful SQL programming language, you run the risk of someone attempting an SQL injection attack by using MySQL in web query parameters. By inserting malicious SQL code fragments into form parameters, an attacker attempts to break into (or disable) your server. - -Let's say that you have a form parameter that you eventually place into a variable named $product, and you create some SQL like this: - - $sql = "select * from pinfo where product = '$product'"; - -If that parameter came straight from the form, use database-specific escapes with PHP's native functions, like this: - - $sql = 'Select * from pinfo where product = '"' - mysql_real_escape_string($product) . '"'; - -If you don't, someone might just decide to throw this fragment into the form parameter: - - 39'; DROP pinfo; SELECT 'FOO - -Then the result of $sql is: - - select product from pinfo where product = '39'; DROP pinfo; SELECT 'FOO' - -Because the semicolon is MySQL's statement delimiter, the database processes these three statements: - - select * from pinfo where product = '39' - DROP pinfo - SELECT 'FOO' - -Well, there goes your table. - -Note that this particular syntax won't actually work with PHP and MySQL, because the **mysql_query()** function allows just one statement to be processed per request. However, a subquery will still work. - -To prevent SQL injection attacks, do two things: - -- Always validate all parameters. For example, if something needs to be a number, make sure that it's a number. -- Always use the mysql_real_escape_string() function on data to escape any quotes or double quotes in your data. - -**Note: To automatically escape any form data, you can turn on Magic Quotes.** - -Some MySQL damage can be avoided by restricting your MySQL user privileges. Any MySQL account can be restricted to only do certain kinds of queries on selected tables. For example, you could create a MySQL user who can select rows but nothing else. However, this is not terribly useful for dynamic data, and, furthermore, if you have sensitive customer information, it might be possible for someone to have access to some data that you didn't intend to make available. For example, a user accessing account data could try to inject some code that accesses another account number instead of the one assigned to the current session. - -### Preventing Basic XSS Attacks ### - -XSS stands for cross-site scripting. Unlike most attacks, this exploit works on the client side. The most basic form of XSS is to put some JavaScript in user-submitted content to steal the data in a user's cookie. Since most sites use cookies and sessions to identify visitors, the stolen data can then be used to impersonate that user—which is deeply troublesome when it's a typical user account, and downright disastrous if it's the administrative account. If you don't use cookies or session IDs on your site, your users aren't vulnerable, but you should still be aware of how this attack works. - -Unlike MySQL injection attacks, XSS attacks are difficult to prevent. Yahoo!, eBay, Apple, and Microsoft have all been affected by XSS. Although the attack doesn't involve PHP, you can use PHP to strip user data in order to prevent attacks. To stop an XSS attack, you have to restrict and filter the data a user submits to your site. It is for this precise reason that most online bulletin boards don't allow the use of HTML tags in posts and instead replace them with custom tag formats such as **[b]** and **[linkto]**. - -Let's look at a simple script that illustrates how to prevent some of these attacks. For a more complete solution, use SafeHTML, discussed later in this article. - - function transform_HTML($string, $length = null) { - // Helps prevent XSS attacks - // Remove dead space. - $string = trim($string); - // Prevent potential Unicode codec problems. - $string = utf8_decode($string); - // HTMLize HTML-specific characters. - $string = htmlentities($string, ENT_NOQUOTES); - $string = str_replace("#", "#", $string); - $string = str_replace("%", "%", $string); - $length = intval($length); - if ($length > 0) { - $string = substr($string, 0, $length); - } - return $string; - } - -This function transforms HTML-specific characters into HTML literals. A browser renders any HTML run through this script as text with no markup. For example, consider this HTML string: - - Bold Text - -Normally, this HTML would render as follows: - - Bold Text - -However, when run through **transform_HTML()**, it renders as the original input. The reason is that the tag characters are HTML entities in the processed string. The resulting string from **HTML()** in plaintext looks like this: - - <STRONG>Bold Text</STRONG> - -The essential piece of this function is the htmlentities() function call that transforms <, >, and & into their entity equivalents of **<**, **>**, and **&**. Although this takes care of the most common attacks, experienced XSS hackers have another sneaky trick up their sleeve: Encoding their malicious scripts in hexadecimal or UTF-8 instead of normal ASCII text, hoping to circumvent your filters. They can send the code along as a GET variable in the URL, saying, "Hey, this is hexadecimal code, but could you run it for me anyway?" A hexadecimal example looks something like this: - -
- -But when the browser renders that information, it turns out to be: - - - -To prevent this, transform_HTML() takes the additional steps of converting # and % signs into their entity, shutting down hex attacks, and converting UTF-8–encoded data. - -Finally, just in case someone tries to overload a string with a very long input, hoping to crash something, you can add an optional $length parameter to trim the string to the maximum length you specify. - -### Using SafeHTML ### - -The problem with the previous script is that it is simple, and it does not allow for any kind of user markup. Unfortunately, there are hundreds of ways to try to sneak JavaScript past someone's filters, and short of stripping all HTML from someone's input, there's no way of stopping it. - -Currently, there's no single script that's guaranteed to be unbreakable, though there are some that are better than most. There are two approaches to security, whitelisting and blacklisting, and whitelisting tends to be less complicated and more effective. - -One whitelisting solution is the SafeHTML anti-XSS parser from PixelApes. - -SafeHTML is smart enough to recognize valid HTML, so it can hunt and strip any dangerous tags. It does its parsing with another package called HTMLSax. - -To install and use SafeHTML, do the following: - -1. Go to [http://pixel-apes.com/safehtml/?page=safehtml][1] and download the latest version of SafeHTML. -1. Put the files in the classes directory on your server. This directory contains everything that SafeHTML and HTMLSax need to function. -1. Include the SafeHTML class file (safehtml.php) in your script. -1. Create a new SafeHTML object called $safehtml. -1. Sanitize your data with the $safehtml->parse() method. - -Here's a complete example: - - alert('XSS Attack')"; - // Create a safehtml object. - $safehtml = new safehtml(); - // Parse and sanitize the data. - $safe_data = $safehtml->parse($data); - // Display result. - echo 'The sanitized data is
' . $safe_data; - ?> - -If you want to sanitize any other data in your script, you don't have to create a new object; just use the $safehtml->parse() method throughout your script. - -#### What Can Go Wrong? #### - -The biggest mistake you can make is assuming that this class completely shuts down XSS attacks. SafeHTML is a fairly complex script that checks for almost everything, but nothing is guaranteed. You still want to do the parameter validation that applies to your site. For example, this class doesn't check the length of a given variable to ensure that it fits into a database field. It doesn't check for buffer overflow problems. - -XSS hackers are creative and use a variety of approaches to try to accomplish their objectives. Just look at RSnake's XSS tutorial at [http://ha.ckers.org/xss.html][2] to see how many ways there are to try to sneak code past someone's filters. The SafeHTML project has good programmers working overtime to try to stop XSS attacks, and it has a solid approach, but there's no guarantee that someone won't come up with some weird and fresh approach that could short-circuit its filters. - -**Note: For an example of the powerful effects of XSS attacks, check out [http://namb.la/popular/tech.html][3], which shows a step-by-step approach to creating the JavaScript XSS worm that overloaded the MySpace servers. ** - -### Protecting Data with a One-Way Hash ### - -This script performs a one-way transformation on data—in other words, it can make a hash signature of someone's password, but you can't ever decrypt it and go back to the original password. Why would you want to do that? The application is in storing passwords. An administrator doesn't need to know users' passwords—in fact, it's a good idea that only the user knows his or her password. The system (and the system alone) should be able to identify a correct password; this has been the Unix password security model for years. One-way password security works as follows: - -1. When a user or administrator creates or changes an account password, the system hashes the password and stores the result. The host system discards the plaintext password. -1. When the user logs in to a system via any means, the entered password is again hashed. -1. The host system throws away the plaintext password entered. -1. This newly hashed password is compared against the stored hash. -1. If the hashed passwords match, then the system grants access. - -The host system does this without ever knowing the original password; in fact, the original value is completely irrelevant. As a side effect, should someone break into your system and steal your password database, the intruder will have a bunch of hashed passwords without any way of reversing them to find the originals. Of course, given enough time, computer power, and poorly chosen user passwords, an attacker could probably use a dictionary attack to figure out the passwords. Therefore, don't make it easy for people to get their hands on your password database, and if someone does, have everyone change their passwords. - -#### Encryption Vs Hashing #### - -Technically speaking, this process is not encryption. It is a hash, which is different from encryption for two reasons: - -Unlike in encryption, data cannot be decrypted. - -It's possible (but extremely unlikely) that two different strings will produce the same hash. There's no guarantee that a hash is unique, so don't try to use a hash as something like a unique key in a database. - - function hash_ish($string) { - return md5($string); - } - -The md5() function returns a 32-character hexadecimal string, based on the RSA Data Security Inc. Message-Digest Algorithm (also known, conveniently enough, as MD5). You can then insert that 32-character string into your database, compare it against other md5'd strings, or just adore its 32-character perfection. - -#### Hacking the Script #### - -It is virtually impossible to decrypt MD5 data. That is, it's very hard. However, you still need good passwords, because it's still easy to make a database of hashes for the entire dictionary. There are online MD5 dictionaries where you can enter **06d80eb0c50b49a509b49f2424e8c805** and get a result of "dog." Thus, even though MD5s can't technically be decrypted, they're still vulnerable—and if someone gets your password database, you can be sure that they'll be consulting an MD5 dictionary. Thus, it's in your best interests when creating password-based systems that the passwords are long (a minimum of six characters and preferably eight) and contain both letters and numbers. And make sure that the password isn't in the dictionary. - -### Encrypting Data with Mcrypt ### - -MD5 hashes work just fine if you never need to see your data in readable form. Unfortunately, that's not always an option—if you offer to store someone's credit card information in encrypted format, you need to decrypt it at some later point. - -One of the easiest solutions is the Mcrypt module, an add-in for PHP that allows high-grade encryption. The Mcrypt library offers more than 30 ciphers to use in encryption and the possibility of a passphrase that ensures that only you (or, optionally, your users) can decrypt data. - -Let's see some hands-on use. The following script contains functions that use Mcrypt to encrypt and decrypt data: - - - -The **mcrypt()** function requires several pieces of information: - -- The data to encrypted. -- The passphrase used to encrypt and unlock your data, also known as the key. -- The cipher used to encrypt the data, which is the specific algorithm used to encrypt the data. This script uses **MCRYPT_SERPENT_256**, but you can choose from an array of fancy-sounding ciphers, including **MCRYPT_TWOFISH192**, **MCRYPT_RC2**, **MCRYPT_DES**, and **MCRYPT_LOKI97**. -- The mode used to encrypt the data. There are several modes you can use, including Electronic Codebook and Cipher Feedback. This script uses **MCRYPT_MODE_CBC**, Cipher Block Chaining. -- An **initialization vector**—also known as an IV, or a seed—an additional bit of binary data used to seed the encryption algorithm. That is, it's something extra thrown in to make the algorithm harder to crack. -- The length of the string needed for the key and IV, which vary by cipher and block. Use the **mcrypt_get_key_size()** and **mcrypt_get_block_size()** functions to find the appropriate length; then trim the key value to the appropriate length with a handy **substr()** function. (If the key is shorter than the required value, don't worry—Mcrypt pads it with zeros.) - -If someone steals both your data and your passphrase, they can just cycle through the ciphers until finding the one that works. Thus, we apply the additional security of using the **md5()** function on the key before we use it, so even having both data and passphrase won't get the intruder what she wants. - -An intruder would need the function, the data, and the passphrase all at once—and if that is the case, they probably have complete access to your server, and you're hosed anyway. - -There's a small data storage format problem here. Mcrypt returns its encrypted data in an ugly binary format that causes horrific errors when you try to store it in certain MySQL fields. Therefore, we use the **base64encode()** and **base64decode()** functions to transform the data into a SQL-compatible alphabetical format and retrieve rows. - -#### Hacking the Script #### - -In addition to experimenting with various encryption methods, you can add some convenience to this script. For example, rather than providing the key and mode every time, you could declare them as global constants in an included file. - -### Generating Random Passwords ### - -Random (but difficult-to-guess) strings are important in user security. For example, if someone loses a password and you're using MD5 hashes, you won't be able to, nor should you want to, look it up. Instead, you should generate a secure random password and send that to the user. Another application for random number generation is creating activation links in order to access your site's services. Here is a function that creates a password: - - 0) && - (! is_null($num_chars))) { - $password = ''; - $accepted_chars = 'abcdefghijklmnopqrstuvwxyz1234567890'; - // Seed the generator if necessary. - srand(((int)((double)microtime()*1000003)) ); - for ($i=0; $i<=$num_chars; $i++) { - $random_number = rand(0, (strlen($accepted_chars) -1)); - $password .= $accepted_chars[$random_number] ; - } - return $password; - } - } - ?> - -#### Using the Script #### - -The **make_password()** function returns a string, so all you need to do is supply the length of the string as an argument: - - - -The function works as follows: - -- The function makes sure that **$num_chars** is a positive nonzero integer. -- The function initializes the **$password** variable to an empty string. -- The function initializes the **$accepted_chars** variable to the list of characters the password may contain. This script uses all lowercase letters and the numbers 0 through 9, but you can choose any set of characters you like. -- The random number generator needs a seed, so it gets a bunch of random-like values. (This isn't strictly necessary on PHP 4.2 and later.) -- The function loops **$num_chars** times, one iteration for each character in the password to generate. -- For each new character, the script looks at the length of **$accepted_chars**, chooses a number between 0 and the length, and adds the character at that index in **$accepted_chars** to $password. -- After the loop completes, the function returns **$password**. - -### License ### - -This article, along with any associated source code and files, is licensed under [The Code Project Open License (CPOL)][4] - --------------------------------------------------------------------------------- - -via: http://www.codeproject.com/Articles/363897/PHP-Security - -作者:[SamarRizvi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.codeproject.com/script/Membership/View.aspx?mid=7483622 -[1]:http://pixel-apes.com/safehtml/?page=safehtml -[2]:http://ha.ckers.org/xss.html -[3]:http://namb.la/popular/tech.html -[4]:http://www.codeproject.com/info/cpol10.aspx \ No newline at end of file diff --git a/translated/tech/20150706 PHP Security.md b/translated/tech/20150706 PHP Security.md new file mode 100644 index 0000000000..8d14bf3bb9 --- /dev/null +++ b/translated/tech/20150706 PHP Security.md @@ -0,0 +1,358 @@ +PHP 安全 +================================================================================ +![](http://www.codeproject.com/KB/PHP/363897/php_security.jpg) + +### 简介 ### + +为提供互联网服务,当你在开发代码的时候必须时刻保持安全意识。可能大部分 PHP 脚本都对安全问题不敏感;这很大程度上是因为有大量的无经验程序员在使用这门语言。但是,没有理由让你基于粗略估计你代码的影响性而有不一致的安全策略。当你在服务器上放任何经济相关的东西时,就有可能会有人尝试破解它。创建一个论坛程序或者任何形式的购物车,被攻击的可能性就上升到了无穷大。 + +### 背景 ### + +为了确保你的 web 内容安全,这里有一些一般的安全准则: + +#### 别相信表单 #### + +攻击表单很简单。通过使用一个简单的 JavaScript 技巧,你可以限制你的表单只允许在评分域中填写 1 到 5 的数字。如果有人关闭了他们浏览器的 JavaScript 功能或者提交自定义的表单数据,你客户端的验证就失败了。 + +用户主要通过表单参数和你的脚本交互,因此他们是最大的安全风险。你应该学到什么呢?总是要验证 PHP 脚本中传递到其它任何 PHP 脚本的数据。在本文中,我们向你演示了如何分析和防范跨站点脚本(XSS)攻击,它可能劫持用户凭据(甚至更严重)。你也会看到如何防止会玷污或毁坏你数据的 MySQL 注入攻击。 + +#### 别相信用户 #### + +假设你网站获取的每一份数据都充满了有害的代码。清理每一部分,就算你相信没有人会尝试攻击你的站点。 + +#### 关闭全局变量 #### + +你可能会有的最大安全漏洞是启用了 register\_globals 配置参数。幸运的是,PHP 4.2 及以后版本默认关闭了这个配置。如果打开了 **register\_globals**,你可以在你的 php.ini 文件中通过改变 register\_globals 变量为 Off 关闭该功能: + + register_globals = Off + +新手程序员觉得注册全局变量很方便,但他们不会意识到这个设置有多么危险。一个启用了全局变量的服务器会自动为全局变量赋任何形式的参数。为了了解它如何工作以及为什么有危险,让我们来看一个例子。 + +假设你有一个称为 process.php 的脚本,它会向你的数据库插入表单数据。初始的表单像下面这样: + + + +运行 process.php 的时候,启用了注册全局变量的 PHP 会为该参数赋值为 $username 变量。这会比通过 **$\_POST['username']** 或 **$\_GET['username']** 访问它节省敲击次数。不幸的是,这也会给你留下安全问题,因为 PHP 设置该变量的值为通过 GET 或 POST 参数发送到脚本的任何值,如果你没有显示地初始化该变量并且你不希望任何人去操作它,这就会有一个大问题。 + +看下面的脚本,假如 $authorized 变量的值为 true,它会给用户显示验证数据。正常情况下,只有当用户正确通过了假想的 authenticated\_user() 函数验证,$authorized 变量的值才会被设置为真。但是如果你启用了 **register\_globals**,任何人都可以发送一个 GET 参数,例如 authorized=1 去覆盖它: + + + +这个故事的寓意是,你应该从预定义的服务器变量中获取表单数据。所有通过 post 表单传递到你 web 页面的数据都会自动保存到一个称为 **$\_POST** 的大数组中,所有的 GET 数据都保存在 **$\_GET** 大数组中。文件上传信息保存在一个称为 **$\_FILES** 的特殊数据中。另外,还有一个称为 **$\_REQUEST** 的复合变量。 + +要从一个 POST 方法表单中访问 username 域,可以使用 **$\_POST['username']**。如果 username 在 URL 中就使用 **$\_GET['username']**。如果你不确定值来自哪里,用 **$\_REQUEST['username']**。 + + + +$\_REQUEST 是 $\_GET、$\_POST、和 $\_COOKIE 数组的结合。如果你有两个或多个值有相同的参数名称,注意 PHP 会使用哪个。默认的顺序是 cookie、POST、然后是 GET。 + +#### 推荐安全配置选项 #### + +这里有几个会影响安全功能的 PHP 配置设置。下面是一些显然应该用于生产服务器的: + +- **register\_globals** 设置为 off +- **safe\_mode** 设置为 off +- **error\_reporting** 设置为 off。如果出现错误了,这会向用户浏览器发送可见的错误报告信息。对于生产服务器,使用错误日志代替。开发服务器如果在防火墙后面就可以启用错误日志。 +- 停用这些函数:system()、exec()、passthru()、shell\_exec()、proc\_open()、和 popen()。 +- **open\_basedir** 为 /tmp(以便保存会话信息)目录和 web 根目录设置值,以便脚本不能访问选定区域外的文件。 +- **expose\_php** 设置为 off。该功能会向 Apache 头添加包含版本数字的 PHP 签名。 +- **allow\_url\_fopen** 设置为 off。如果你小心在你代码中访问文件的方式-也就是你验证所有输入参数,这并不严格需要。 +- **allow\_url\_include** 设置为 off。这实在没有明智的理由任何人会想要通过 HTTP 访问包含的文件。 + +一般来说,如果你发现想要使用这些功能的代码,你就不应该相信它。尤其要小心会使用类似 system() 函数的代码-它几乎肯定有缺陷。 + +启用了这些设置后,让我们来看看一些特定的攻击以及能帮助你保护你服务器的方法。 + +### SQL 注入攻击 ### + +由于 PHP 传递到 MySQL 数据库的查询语句是按照强大的 SQL 编程语言编写的,你就有某些人通过在 web 查询参数中使用 MySQL 语句尝试 SQL 注入攻击的风险。通过在参数中插入有害的 SQL 代码片段,攻击者会尝试进入(或破坏)你的服务器。 + +假如说你有一个最终会放入变量 $product 的表单参数,你使用了类似下面的 SQL 语句: + + $sql = "select * from pinfo where product = '$product'"; + +如果参数是直接从表单中获得的,使用 PHP 自带的数据库特定转义函数,类似: + + $sql = 'Select * from pinfo where product = '"' + mysql_real_escape_string($product) . '"'; + +如果不这样做的话,有人也许会把下面的代码段放到表单参数中: + + 39'; DROP pinfo; SELECT 'FOO + +$sql 的结果就是: + + select product from pinfo where product = '39'; DROP pinfo; SELECT 'FOO' + +由于分号是 MySQL 的语句分隔符,数据库会运行下面三条语句: + + select * from pinfo where product = '39' + DROP pinfo + SELECT 'FOO' + +好了,你丢失了你的表。 + +注意实际上 PHP 和 MySQL 不会运行这种特殊语法,因为 **mysql\_query()** 函数只允许每个请求处理一个语句。但是,一个子查询仍然会生效。 + +要防止 SQL 注入攻击,做这两件事: + +- 总是验证所有参数。例如,如果需要一个数字,就要确保它是一个数字。 +- 总是对数据使用 mysql\_real\_escape\_string() 函数转义数据中的任何引号和双引号。 + +**注意:要自动转义任何表单数据,可以启用魔术引号(Magic Quotes)。** + +一些 MySQL 破坏可以通过限制 MySQL 用户权限避免。任何 MySQL 账户可以限制为只允许对选定的表进行特定类型的查询。例如,你可以创建只能选择行的 MySQL 用户。但是,这对于动态数据并不十分有用,另外,如果你有敏感的用户信息,可能某些人能访问一些数据,但你并不希望如此。例如,一个访问账户数据的用户可能会尝试注入访问另一个账户号码的代码,而不是为当前会话指定的号码。 + +### 防止基本的 XSS 攻击 ### + +XSS 表示跨站点脚本。不像大部分攻击,该漏洞发生在客户端。XSS 最常见的基本形式是在用户提交的内容中放入 JavaScript 以便偷取用户 cookie 中的数据。由于大部分站点使用 cookie 和 session 验证访客,偷取的数据可用于模拟该用于-如果是一个典型的用户账户就会深受麻烦,如果是管理员账户甚至是彻底的惨败。如果你不在站点中使用 cookie 和 session ID,你的用户就不容易被攻击,但你仍然应该明白这种攻击是如何工作的。 + +不像 MySQL 注入攻击,XSS 攻击很难预防。Yahoo、eBay、Apple、以及 Microsoft 都曾经受 XSS 影响。尽管攻击不包含 PHP,你可以使用 PHP 来剥离用户数据以防止攻击。为了防止 XSS 攻击,你应该限制和过滤用户提交给你站点的数据。正是因为这个原因大部分在线公告板都不允许在提交的数据中使用 HTML 标签,而是用自定义的标签格式代替,例如 **[b]** 和 **[linkto]**。 + +让我们来看一个如何防止这类攻击的简单脚本。对于更完善的解决办法,可以使用 SafeHHTML,本文的后面部分会讨论到。 + + function transform_HTML($string, $length = null) { + // Helps prevent XSS attacks + // Remove dead space. + $string = trim($string); + // Prevent potential Unicode codec problems. + $string = utf8_decode($string); + // HTMLize HTML-specific characters. + $string = htmlentities($string, ENT_NOQUOTES); + $string = str_replace("#", "#", $string); + $string = str_replace("%", "%", $string); + $length = intval($length); + if ($length > 0) { + $string = substr($string, 0, $length); + } + return $string; + } + +这个函数将 HTML 特定字符转换为 HTML 字面字符。一个浏览器对任何通过这个脚本的 HTML 以无标记的文本呈现。例如,考虑下面的 HTML 字符串: + + Bold Text + +一般情况下,HTML 会显示为: + + Bold Text + +但是,通过 **transform\_HTML()** 后,它就像初始输入一样呈现。原因是处理的字符串中标签字符串是 HTML 条目。**transform\_HTML()** 结果字符串的纯文本看起来像下面这样: + + <STRONG>Bold Text</STRONG> + +该函数的实质是 htmlentities() 函数调用,它会将 <、>、和 & 转换为 **<**、**>**、和 **&**。尽管这会处理大部分的普通攻击,有经验的 XSS 攻击者有另一种把戏:用十六进制或 UTF-8 编码恶意脚本,而不是采用普通的 ASCII 文本,从而希望能饶过你的过滤器。他们可以在 URL 的 GET 变量中发送代码,例如,“这是十六进制代码,你能帮我运行吗?” 一个十六进制例子看起来像这样: + +
+ +浏览器渲染这信息的时候,结果就是: + + + +为了防止这种情况,transform\_HTML() 采用额外的步骤把 # 和 % 符号转换为它们的实体,从而避免十六进制攻击,并转换 UTF-8 编码的数据。 + +最后,为了防止某些人用很长的输入超载字符串从而导致某些东西崩溃,你可以添加一个可选的 $length 参数来截取你指定最大长度的字符串。 + +### 使用 SafeHTML ### + +之前脚本的问题比较简单,它不允许任何类型的用户标记。不幸的是,这里有上百种方法能使 JavaScript 跳过用户的过滤器,从用户输入中剥离 HTML,没有方法可以防止这种情况。 + +当前,没有任何一个脚本能保证无法被破解,尽管有一些确实比大部分要好。有白名单和黑名单两种方法加固安全,白名单比较简单而且更加有效。 + +一个白名单解决方案是 PixelApes 的 SafeHTML 反跨站点脚本解析器。 + +SafeHTML 能识别有效 HTML,能追踪并剥离任何危险标签。它用另一个称为 HTMLSax 的软件包进行解析。 + +按照下面步骤安装和使用 SafeHTML: + +1. 到 [http://pixel-apes.com/safehtml/?page=safehtml][1] 下载最新版本的 SafeHTML。 +1. 把文件放到你服务器的类文件夹。该文件夹包括 SafeHTML 和 HTMLSax 起作用需要的所有东西。 +1. 在脚本中包含 SafeHTML 类文件(safehtml.php)。 +1. 创建称为 $safehtml 的新 SafeHTML 对象。 +1. 用 $safehtml->parse() 方法清理你的数据。 + +这是一个完整的例子: + + alert('XSS Attack')"; + // Create a safehtml object. + $safehtml = new safehtml(); + // Parse and sanitize the data. + $safe_data = $safehtml->parse($data); + // Display result. + echo 'The sanitized data is
' . $safe_data; + ?> + +如果你想清理脚本中的任何其它数据,你不需要创建一个新的对象;在你的整个脚本中只需要使用 $safehtml->parse() 方法。 + +#### 什么可能会出现问题? #### + +你可能犯的最大错误是假设这个类能完全避免 XSS 攻击。SafeHTML 是一个相当复杂的脚本,几乎能检查所有事情,但没有什么是能保证的。你仍然需要对你的站点做参数验证。例如,该类不能检查给定变量的长度以确保能适应数据库的字段。它也不检查缓冲溢出问题。 + +XSS 攻击者很有创造力,他们使用各种各样的方法来尝试达到他们的目标。可以阅读 RSnake 的 XSS 教程[http://ha.ckers.org/xss.html][2] 看一下这里有多少种方法尝试使代码跳过过滤器。SafeHTML 项目有很好的程序员一直在尝试阻止 XSS 攻击,但无法保证某些人不会想起一些奇怪和新奇的方法来跳过过滤器。 + +**注意:XSS 攻击严重影响的一个例子 [http://namb.la/popular/tech.html][3],其中显示了如何一步一步创建会超载 MySpace 服务器的 JavaScript XSS 蠕虫。** + +### 用单向哈希保护数据 ### + +该脚本对输入的数据进行单向转换-换句话说,它能对某人的密码产生哈希签名,但不能解码获得原始密码。为什么你希望这样呢?应用程序会存储密码。一个管理员不需要知道用户的密码-事实上,只有用户知道他的/她的密码是个好主意。系统(也仅有系统)应该能识别一个正确的密码;这是 Unix 多年来的密码安全模型。单向密码安全按照下面的方式工作: + +1. 当一个用户或管理员创建或更改一个账户密码时,系统对密码进行哈希并保存结果。主机系统忽视明文密码。 +2. 当用户通过任何方式登录到系统时,再次对输入的密码进行哈希。 +3. 主机系统抛弃输入的明文密码。 +4. 当前新哈希的密码和之前保存的哈希相比较。 +5. 如果哈希的密码相匹配,系统就会授予访问权限。 + +主机系统完成这些并不需要知道原始密码;事实上,原始值完全不相关。一个副作用是,如果某人侵入系统并盗取了密码数据库,入侵者会获得很多哈希后的密码,但无法把它们反向转换为原始密码。当然,给足够时间、计算能力,以及弱用户密码,一个攻击者还是有可能采用字典攻击找出密码。因此,别轻易让人碰你的密码数据库,如果确实有人这样做了,让每个用户更改他们的密码。 + +#### 加密 Vs 哈希 #### + +技术上来来说,这过程并不是加密。哈希和加密是不相同的,这有两个理由: + +不像加密,数据不能被解密。 + +是有可能(但很不常见)两个不同的字符串会产生相同的哈希。并不能保证哈希是唯一的,因此别像数据库中的唯一键那样使用哈希。 + + function hash_ish($string) { + return md5($string); + } + +md5() 函数基于 RSA 数据安全公司的消息摘要算法(即 MD5)返回一个由 32 个字符组成的十六进制串。然后你可以将那个 32 位字符串插入到数据库中,和另一个 md5 字符串相比较,或者就用这 32 个字符。 + +#### 破解脚本 #### + +几乎不可能解密 MD5 数据。或者说很难。但是,你仍然需要好的密码,因为根据整个字典生成哈希数据库仍然很简单。这里有在线 MD5 字典,当你输入 **06d80eb0c50b49a509b49f2424e8c805** 后会得到结果 “dog”。因此,尽管技术上 MD5 不能被解密,这里仍然有漏洞-如果某人获得了你的密码数据库,你可以肯定他们肯定会使用 MD5 字典破译。因此,当你创建基于密码的系统的时候尤其要注意密码长度(最小 6 个字符,8 个或许会更好)和包括字母和数字。并确保字典中没有这个密码。 + +### 用 Mcrypt 加密数据 ### + +如果你不需要以可阅读形式查看密码,采用 MD5 就足够了。不幸的是,这里并不总是有可选项-如果你提供以加密形式存储某人的信用卡信息,你可能需要在后面的某个点进行解密。 + +最早的一个解决方案是 Mcrypt 模块,用于允许 PHP 高速加密的附件。Mcrypt 库提供了超过 30 种计算方法用于加密,并且提供短语确保只有你(或者你的用户)可以解密数据。 + +让我们来看看使用方法。下面的脚本包含了使用 Mcrypt 加密和解密数据的函数: + + + +**mcrypt()** 函数需要几个信息: + +- 需要加密的数据 +- 用于加密和解锁数据的短语,也称为键。 +- 用于加密数据的计算方法,也就是用于加密数据的算法。该脚本使用了 **MCRYPT\_SERPENT\_256**,但你可以从很多算法中选择,包括 **MCRYPT\_TWOFISH192**、**MCRYPT\_RC2**、**MCRYPT\_DES**、和 **MCRYPT\_LOKI97**。 +- 加密数据的模式。这里有几个你可以使用的模式,包括电子密码本(Electronic Codebook) 和加密反馈(Cipher Feedback)。该脚本使用 **MCRYPT\_MODE\_CBC** 密码块链接。 +- 一个 **初始化向量**-也称为 IV,或着一个种子-用于为加密算法设置种子的额外二进制位。也就是使算法更难于破解的额外信息。 +- 键和 IV 字符串的长度,这可能随着加密和块而不同。使用 **mcrypt\_get\_key\_size()** 和 **mcrypt\_get\_block\_size()** 函数获取合适的长度;然后用 **substr()** 函数将键的值截取为合适的长度。(如果键的长度比要求的短,别担心-Mcrypt 会用 0 填充。) + +如果有人窃取了你的数据和短语,他们只能一个个尝试加密算法直到找到正确的那一个。因此,在使用它之前我们通过对键使用 **md5()** 函数增加安全,就算他们获取了数据和短语,入侵者也不能获得想要的东西。 + +入侵者同时需要函数,数据和短语-如果真是如此,他们可能获得了对你服务器的完整访问,你只能大清洗了。 + +这里还有一个数据存储格式的小问题。Mcrypt 以难懂的二进制形式返回加密后的数据,这使得当你将其存储到 MySQL 字段的时候可能出现可怕错误。因此,我们使用 **base64encode()** 和 **base64decode()** 函数转换为和 SQL 兼容的字母格式和检索行。 + +#### 破解脚本 #### + +除了实验多种加密方法,你还可以在脚本中添加一些便利。例如,不是每次都提供键和模式,而是在包含的文件中声明为全局常量。 + +### 生成随机密码 ### + +随机(但难以猜测)字符串在用户安全中很重要。例如,如果某人丢失了密码并且你使用 MD5 哈希,你不可能,也不希望查找回来。而是应该生成一个安全的随机密码并发送给用户。为了访问你站点的服务,另外一个用于生成随机数字的应用程序会创建有效链接。下面是创建密码的一个函数: + + 0) && + (! is_null($num_chars))) { + $password = ''; + $accepted_chars = 'abcdefghijklmnopqrstuvwxyz1234567890'; + // Seed the generator if necessary. + srand(((int)((double)microtime()*1000003)) ); + for ($i=0; $i<=$num_chars; $i++) { + $random_number = rand(0, (strlen($accepted_chars) -1)); + $password .= $accepted_chars[$random_number] ; + } + return $password; + } + } + ?> + +#### 使用脚本 #### + +**make_password()** 函数返回一个字符串,因此你需要做的就是提供字符串的长度作为参数: + + + +函数按照下面步骤工作: + +- 函数确保 **$num\_chars** 是非零的正整数。 +- 函数初始化 **$accepted\_chars** 变量为密码可能包含的字符列表。该脚本使用所有小写字母和数字 0 到 9,但你可以使用你喜欢的任何字符集合。 +- 随机数生成器需要一个种子,从而获得一系列类随机值(PHP 4.2 及之后版本中并不严格要求)。 +- 函数循环 **$num\_chars** 次,每次迭代生成密码中的一个字符。 +- 对于每个新字符,脚本查看 **$accepted_chars** 的长度,选择 0 和长度之间的一个数字,然后添加 **$accepted\_chars** 中该数字为索引值的字符到 $password。 +- 循环结束后,函数返回 **$password**。 + +### 许可证 ### + +本篇文章,包括相关的源代码和文件,都是在 [The Code Project Open License (CPOL)][4] 协议下发布。 + +-------------------------------------------------------------------------------- + +via: http://www.codeproject.com/Articles/363897/PHP-Security + +作者:[SamarRizvi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.codeproject.com/script/Membership/View.aspx?mid=7483622 +[1]:http://pixel-apes.com/safehtml/?page=safehtml +[2]:http://ha.ckers.org/xss.html +[3]:http://namb.la/popular/tech.html +[4]:http://www.codeproject.com/info/cpol10.aspx \ No newline at end of file From 02812ef883af3ccb750c7592da8503154e4a43d8 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 16 Jul 2015 15:49:52 +0800 Subject: [PATCH 1414/2517] Translating by ZTinoZ --- ...command line tools for monitoring your Linux system.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md index 2362fefca4..fe82ef6436 100644 --- a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md +++ b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md @@ -10,13 +10,13 @@ ![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-2-100591901-orig.png) -### How we did it ### +### 我们怎么做 ### -FYI: 本文中的截图取自[Debian Linux 8.1][1] (“Jessie”),其运行在[OS X 10.10.3][3] (“Yosemite”)操作系统下[Oracle VirtualBox 4.3.28][2]中的一台虚拟机里。想要建立你的Debian虚拟机,可以看看我的这篇教程——“[How to install Debian Linux in a VirtualBox VM][4]”。 +须知: 本文中的截图取自[Debian Linux 8.1][1] (“Jessie”),其运行在[OS X 10.10.3][3] (“Yosemite”)操作系统下[Oracle VirtualBox 4.3.28][2]中的一台虚拟机里。想要建立你的Debian虚拟机,可以看看我的这篇教程——“[How to install Debian Linux in a VirtualBox VM][4]”。 ![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-3-100591902-orig.png) -### Top命令 ### +### Top ### 作为Linux系统监控工具中比较易用的一个,**top命令**能带我们一览Linux中的几乎每一处。以下这张图是它的默认界面,但是按“z”键可以切换不同的显示颜色。其它热键和命令则有其它的功能,例如显示概要信息和内存信息(第四行第二个),根据各种不一样的条件排序、终止进程任务等等(你可以在[这里][5]找到完整的列表)。 @@ -24,7 +24,7 @@ FYI: 本文中的截图取自[Debian Linux 8.1][1] (“Jessie”),其运行在 ### htop ### -相比top,它的替代品Htop则更为精致。维基百科是这样描述的:“Users often deploy htop in cases where Unix top does not provide enough information about the systems processes, for example when trying to find minor memory leaks in applications. Htop is also popularly used interactively as a system monitor. Compared to top, it provides a more convenient, cursor-controlled interface for sending signals to processes.” (For more detail go [here][6].) +相比top,它的替代品Htop则更为精致。维基百科是这样描述的:“用户经常会部署htop以防Unix top不能提供关于系统进程的足够信息,比如说当你在尝试发现应用程序里的一个小的内存泄露问题,Htop一般也能作为一个系统监听器来使用。相比top,它提供了一个更方便的光标控制界面来向进程发送信号。” (想了解更多细节猛戳[这里][6].) ![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-5-100591903-orig.png) From 89dedc383a78c684edfc70105d2184b21a50050d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 16 Jul 2015 16:22:42 +0800 Subject: [PATCH 1415/2517] =?UTF-8?q?20150716-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... CCleaner Alternatives For Ubuntu Linux.md | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sources/share/20150716 4 CCleaner Alternatives For Ubuntu Linux.md diff --git a/sources/share/20150716 4 CCleaner Alternatives For Ubuntu Linux.md b/sources/share/20150716 4 CCleaner Alternatives For Ubuntu Linux.md new file mode 100644 index 0000000000..75d5af190c --- /dev/null +++ b/sources/share/20150716 4 CCleaner Alternatives For Ubuntu Linux.md @@ -0,0 +1,118 @@ +4 CCleaner Alternatives For Ubuntu Linux +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/ccleaner-10-700x393.jpg) + +Back in my Windows days, [CCleaner][1] was my favorite tool for freeing up space, delete junk files and speed up Windows. I know I am not the only one who looked for CCleaner for Linux when switched from Windows. If you are looking for CCleaner alternative in Linux, I am going to list here four such application that you can use to clean up Ubuntu or Ubuntu based Linux distributions. But before we see the list, let’s ponder over whether Linux requires system clean up tools or not. + +### Does Linux need system clean up utilities like CCleaner? ### + +To get this answer, let’s first see what does CCleaner do. As per [How-To Geek][2]: + +> CCleaner has two main uses. One, it scans for and deletes useless files, freeing up space. Two, it erases private data like your browsing history and list of most recently opened files in various programs. + +So in short, it performs a system wide clean up of temporary file be it in your web browser or in your media player. You might know that Windows has the affection for keeping junk files in the system for like since ever but what about Linux? What does it do with the temporary files? + +Unlike Windows, Linux cleans up all the temporary files (store in /tmp) automatically. You don’t have registry in Linux which further reduces the headache. At worst, you might have some broken packages, packages that are not needed anymore and internet browsing history, cookies and cache. + +### Does it mean that Linux does not need system clean up utilities? ### + +- Answer is no if you can run few commands for occasional package cleaning, manually deleting browser history etc. +- Answer is yes if you don’t want to run from places to places and want one tool to rule them all where you can clean up all the suggested things in one (or few) click(s). + +If you have got your answer as yes, let’s move on to see some CCleaner like utilities to clean up your Ubuntu Linux. + +### CCleaner alternatives for Ubuntu ### + +Please note that I am using Ubuntu here because some tools discussed here are only existing for Ubuntu based Linux distributions while some are available for all Linux distributions. + +#### 1. BleachBit #### + +![BleachBit System Cleaning Tool for Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/BleachBit_Cleaning_Tool_Ubuntu.jpeg) + +[BleachBit][3] is cross platform app available for both Windows and Linux. It has a long list of applications that it support for cleaning and thus giving you option for cleaning cache, cookies and log files. A quick look at its feature: + +- Simple GUI check the boxes you want, preview it and delete it. +- Multi-platform: Linux and Windows +- Free and open source +- Shred files to hide their contents and prevent data recovery +- Overwrite free disk space to hide previously deleted files +- Command line interface also available + +BleachBit is available by default in Ubuntu 14.04 and 15.04. You can install it using the command below in terminal: + + sudo apt-get install bleachbit + +BleachBit has binaries available for all major Linux distributions. You can download BleachBit from the link below: + +- [Download BleachBit for Linux][4] + +#### 2. Sweeper #### + +![Sweeper system clean up tool for Ubuntu Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/sweeper.jpeg) + +Sweeper is a system clean up utility which is a part of [KDE SC utilities][5] module. It’s main features are: + +- remove web-related traces: cookies, history, cache +- remove the image thumbnails cache +- clean the applications and documentes history + +Sweeper is available by default in Ubuntu repository. Use the command below in a terminal to install Sweeper: + + sudo apt-get install sweeper + +#### 3. Ubuntu Tweak #### + +![Ubuntu Tweak Tool for cleaning up Ubuntu system](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Ubuntu_Tweak_Janitor.jpeg) + +As the name suggests, [Ubuntu Tweak][6] is more of a tweaking tool than a cleaning utility. But along with tweaking things like compiz settings, panel configuration, start up program control, power management etc, Ubuntu Tweak also provides a Janitor tab that lets you: + +- clean browser cache +- clean Ubuntu Software Center cache +- clean thumbnail cache +- clan apt repository cache +- clean old kernel files +- clean package configs + +You can get the .deb installer for Ubuntu Tweak from the link below: + +- [Download Ubuntu Tweak][7] + +#### 4. GCleaner (beta) #### + +![GCleaner CCleaner like tool](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/GCleaner.jpeg) + +One of the third party apps for elementaryOS Freya, GCleaner aims to be CCleaner in GNU world. The interface resembles heavily to CCleaner. Some of the main features of GCleaner are: + +- clean browser history +- clean app cache +- clean packages and configs +- clean recent document history +- empty recycle bin + +At the time of writing this article, GCleaner is in heavy development. You can check the project website and get the source code to build and use GCleaner. + +- [Know More About GCleaner][8] + +### Your choice? ### + +I have listed down the possibilities to you. I let you decide which tool you would use to clean Ubuntu 14.04. But I am certain that if you were looking for a CCleaner like application, one of these four end your search. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/ccleaner-alternatives-ubuntu-linux/ + +作者:[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]:https://www.piriform.com/ccleaner/download +[2]:http://www.howtogeek.com/172820/beginner-geek-what-does-ccleaner-do-and-should-you-use-it/ +[3]:http://bleachbit.sourceforge.net/ +[4]:http://bleachbit.sourceforge.net/download/linux +[5]:https://www.kde.org/applications/utilities/ +[6]:http://ubuntu-tweak.com/ +[7]:http://ubuntu-tweak.com/ +[8]:https://quassy.github.io/elementary-apps/GCleaner/ \ No newline at end of file From fc929cf5ac5a9a43b74e17eadb6280c9fb272bd6 Mon Sep 17 00:00:00 2001 From: chenjt Date: Thu, 16 Jul 2015 18:36:51 +0800 Subject: [PATCH 1416/2517] tmp commit --- ...st Using Docker Machine in a VirtualBox.md | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 translated/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md diff --git a/translated/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md b/translated/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md new file mode 100644 index 0000000000..64c044b100 --- /dev/null +++ b/translated/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md @@ -0,0 +1,114 @@ +[bazz2] +在 VirtualBox 中使用 Docker Machine 管理主机 +================================================================================ +大家好,今天我们学习在 VirtualBox 中使用 Docker Machine 来创建和管理 Docker 主机。Docker Machine 是一个应用,用于在我们的电脑上、在云端、在数据中心创建 Docker 主机,然后用户可以使用 Docker 客户端来配置一些东西。这个 API 为本地主机、或数据中心的虚拟机、或云端的实例提供 Docker 服务。Docker Machine 支持 Windows、OSX 和 Linux,并且是以一个独立的二进制文件包形式安装的。使用(与现有 Docker 工具)相同的接口,我们就可以充分利用已经提供 Docker 基础框架的生态系统。只要一个命令,用户就能快速部署 Docker 容器。 + +Here are some easy and simple steps that helps us to deploy docker containers using Docker Machine. + +### 1. Installing Docker Machine ### + +Docker Machine supports awesome on every Linux Operating System. First of all, we'll need to download the latest version of Docker Machine from the [Github site][1] . Here, we'll use curl to download the latest version of Docker Machine ie 0.2.0 . + +**For 64 Bit Operating System** + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine + +**For 32 Bit Operating System** + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386 > /usr/local/bin/docker-machine + +After downloading the latest release of Docker Machine, we'll make the file named **docker-machine** under **/usr/local/bin/** executable using the command below. + + # chmod +x /usr/local/bin/docker-machine + +After doing the above, we'll wanna ensure that we have successfully installed docker-machine. To check it, we can run the docker-machine -v which will give output of the version of docker-machine installed in our system. + + # docker-machine -v + +![Installing Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) + +To enable Docker commands on our machines, make sure to install the Docker client as well by running the command below. + + # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker + # chmod +x /usr/local/bin/docker + +### 2. Creating VirualBox VM ### + +After we have successfully installed Docker Machine in our Linux running machine, we'll definitely wanna go for creating a Virtual Machine using VirtualBox. To get started, we need to run docker-machine create command followed by --driver flag with string as virtualbox as we are trying to deploy docker inside of Virtual Box running VM and the final argument is the name of the machine, here we have machine name as "linux". This command will download [boot2docker][2] iso which is a light-weighted linux distribution based on Tiny Core Linux with the Docker daemon installed and will create and start a VirtualBox VM with Docker running as mentioned above. + +To do so, we'll run the following command in a terminal or shell in our box. + + # docker-machine create --driver virtualbox linux + +![Creating Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-docker-machine.png) + +Now, to check whether we have successfully create a Virtualbox running Docker or not, we'll run the command **docker-machine** ls as shown below. + + # docker-machine ls + +![Docker Machine List](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-list.png) + +If the host is active, we can see * under the ACTIVE column in the output as shown above. + +### 3. Setting Environment Variables ### + +Now, we'll need to make docker talk with the machine. We can do that by running docker-machine env and then the machine name, here we have named **linux** as above. + + # eval "$(docker-machine env linux)" + # docker ps + +This will set environment variables that the Docker client will read which specify the TLS settings. Note that we'll need to do this every time we reboot our machine or start a new tab. We can see what variables will be set by running the following command. + + # docker-machine env linux + + export DOCKER_TLS_VERIFY=1 + export DOCKER_CERT_PATH=/Users//.docker/machine/machines/dev + export DOCKER_HOST=tcp://192.168.99.100:2376 + +### 4. Running Docker Containers ### + +Finally, after configuring the environment variables and Virtual Machine, we are able to run docker containers in the host running inside the Virtual Machine. To give it a test, we'll run a busybox container out of it run running **docker run busybox** command with **echo hello world** so that we can get the output of the container. + + # docker run busybox echo hello world + +![Running Docker Container](http://blog.linoxide.com/wp-content/uploads/2015/05/running-docker-container.png) + +### 5. Getting Docker Host's IP ### + +We can get the IP Address of the running Docker Host's using the **docker-machine ip** command. We can see any exposed ports that are available on the Docker host’s IP address. + + # docker-machine ip + +![Docker IP Address](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-ip-address.png) + +### 6. Managing the Hosts ### + +Now we can manage as many local VMs running Docker as we desire by running docker-machine create command again and again as mentioned in above steps + +If you are finished working with the running docker, we can simply run **docker-machine stop** command to stop the whole hosts which are Active and if wanna start again, we can run **docker-machine start**. + + # docker-machine stop + # docker-machine start + +You can also specify a host to stop or start using the host name as an argument. + + $ docker-machine stop linux + $ docker-machine start linux + +### Conclusion ### + +Finally, we have successfully created and managed a Docker host inside a VirtualBox using Docker Machine. Really, Docker Machine enables people fast and easy to create, deploy and manage Docker hosts in different platforms as here we are running Docker hosts using Virtualbox platform. This virtualbox driver API works for provisioning Docker on a local machine, on a virtual machine in the data center. Docker Machine ships with drivers for provisioning Docker locally with Virtualbox as well as remotely on Digital Ocean instances whereas more drivers are in the work for AWS, Azure, VMware, and other infrastructure. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/host-virtualbox-docker-machine/ + +作者:[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/ +[1]:https://github.com/docker/machine/releases +[2]:https://github.com/boot2docker/boot2docker From 706a3d48f481a0bc5292a8574590cad31d18a2a2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 17 Jul 2015 13:00:05 +0800 Subject: [PATCH 1417/2517] =?UTF-8?q?20150717-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ver or client) on Ubuntu 14.04 or 15.04.md | 314 ++++++++++++++++++ ...re FTP Server with Proftpd on Fedora 22.md | 185 +++++++++++ 2 files changed, 499 insertions(+) create mode 100644 sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md create mode 100644 sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md diff --git a/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md b/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md new file mode 100644 index 0000000000..69efa63823 --- /dev/null +++ b/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md @@ -0,0 +1,314 @@ +How to Configure Chef (server/client) on Ubuntu 14.04 / 15.04 +================================================================================ +Chef is a configuration management and automation tool for information technology professionals that configures and manages your infrastructure whether it is on-premises or in the cloud. It can be used to speed up application deployment and to coordinate the work of multiple system administrators and developers involving hundreds, or even thousands, of servers and applications to support a large customer base. The key to Chef’s power is that it turns infrastructure into code. Once you master Chef, you will be able to enable web IT with first class support for managing your cloud infrastructure with an easy automation of your internal deployments or end users systems. + +Here are the major components of Chef that we are going to setup and configure in this tutorial. +chef components + +![](http://blog.linoxide.com/wp-content/uploads/2015/07/chef.png) + +### Chef Prerequisites and Versions ### + +We are going to setup Chef configuration management system under the following basic environment. + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + +
Chef, Configuration Management Tool
Base Operating SystemUbuntu 14.04.1 LTS (x86_64)
Chef ServerVersion 12.1.0
Chef ManageVersion 1.17.0
Chef Development KitVersion 0.6.2
RAM and CPU4 GB  , 2.0+2.0 GHZ
+ +### Chef Server's Installation and Configurations ### + +Chef Server is central core component that stores recipes as well as other configuration data and interact with the workstations and nodes. let's download the installation media by selecting the latest version of chef server from its official web link. + +We will get its installation package and install it by using following commands. + +**1) Downloading Chef Server** + + root@ubuntu-14-chef:/tmp# wget https://web-dl.packagecloud.io/chef/stable/packages/ubuntu/trusty/chef-server-core_12.1.0-1_amd64.deb + +**2) To install Chef Server** + + root@ubuntu-14-chef:/tmp# dpkg -i chef-server-core_12.1.0-1_amd64.deb + +**3) Reconfigure Chef Server** + +Now Run the following command to start all of the chef server services ,this step may take a few minutes to complete as its composed of many different services that work together to create a functioning system. + + root@ubuntu-14-chef:/tmp# chef-server-ctl reconfigure + +The chef server startup command 'chef-server-ctl reconfigure' needs to be run twice so that installation ends with the following completion output. + + Chef Client finished, 342/350 resources updated in 113.71139964 seconds + opscode Reconfigured! + +**4) Reboot OS** + +Once the installation complete reboot the operating system for the best working without doing this we you might get the following SSL_connect error during creation of User. + + ERROR: Errno::ECONNRESET: Connection reset by peer - SSL_connect + +**5) Create new Admin User** + +Run the following command to create a new administrator user with its profile settings. During its creation user’s RSA private key is generated automatically that should be saved to a safe location. The --filename option will save the RSA private key to a specified path. + + root@ubuntu-14-chef:/tmp# chef-server-ctl user-create kashi kashi kashi kashif.fareedi@gmail.com kashi123 --filename /root/kashi.pem + +### Chef Manage Setup on Chef Server ### + +Chef Manage is a management console for Enterprise Chef that enables a web-based user interface for visualizing and managing nodes, data bags, roles, environments, cookbooks and role-based access control (RBAC). + +**1) Downloading Chef Manage** + +Copy the link for Chef Manage from the official web site and download the chef manage package. + + root@ubuntu-14-chef:~# wget https://web-dl.packagecloud.io/chef/stable/packages/ubuntu/trusty/opscode-manage_1.17.0-1_amd64.deb + +**2) Installing Chef Manage** + +Let's install it into the root's home directory with below command. + + root@ubuntu-14-chef:~# chef-server-ctl install opscode-manage --path /root + +**3) Restart Chef Manage and Server** + +Once the installation is complete we need to restart chef manage and chef server services by executing following commands. + + root@ubuntu-14-chef:~# opscode-manage-ctl reconfigure + root@ubuntu-14-chef:~# chef-server-ctl reconfigure + +### Chef Manage Web Console ### + +We can access chef manage web console from the localhost as wel as its fqdn and login with the already created admin user account. + +![chef amanage](http://blog.linoxide.com/wp-content/uploads/2015/07/5-chef-web.png) + +**1) Create New Organization with Chef Manage** + +You would be asked to create new organization or accept the invitation from the organizations. Let's create a new organization by providing its short and full name as shown. + +![Create Org](http://blog.linoxide.com/wp-content/uploads/2015/07/7-create-org.png) + +**2) Create New Organization with Command line** + +We can also create new Organization from the command line by executing the following command. + + root@ubuntu-14-chef:~# chef-server-ctl org-create linux Linoxide Linux Org. --association_user kashi --filename linux.pem + +### Configuration and setup of Workstation ### + +As we had done with successful installation of chef server now we are going to setup its workstation to create and configure any recipes, cookbooks, attributes, and other changes that we want to made to our Chef configurations. + +**1) Create New User and Organization on Chef Server** + +In order to setup workstation we create a new user and an organization for this from the command line. + + root@ubuntu-14-chef:~# chef-server-ctl user-create bloger Bloger Kashif bloger.kashif@gmail.com bloger123 --filename bloger.pem + + root@ubuntu-14-chef:~# chef-server-ctl org-create blogs Linoxide Blogs Inc. --association_user bloger --filename blogs.pem + +**2) Download Starter Kit for Workstation** + +Now Download and Save starter-kit from the chef manage web console on a workstation and use it to work with Chef server. + +![Starter Kit](http://blog.linoxide.com/wp-content/uploads/2015/07/8-download-kit.png) + +**3) Click to "Proceed" with starter kit download** + +![starter kit](http://blog.linoxide.com/wp-content/uploads/2015/07/9-download-kit.png) + +### Chef Development Kit Setup for Workstation ### + +Chef Development Kit is a software package suite with all the development tools need to code Chef. It combines with the best of the breed tools developed by Chef community with Chef Client. + +**1) Downloading Chef DK** + +We can Download chef development kit from its official web link and choose the required operating system to get its chef development tool kit. + +![Chef DK](http://blog.linoxide.com/wp-content/uploads/2015/07/10-CDK.png) + +Copy the link and download it with wget command. + + root@ubuntu-15-WKS:~# wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.6.2-1_amd64.deb + +**1) Chef Development Kit Installatoion** + +Install chef-development kit using dpkg command + + root@ubuntu-15-WKS:~# dpkg -i chefdk_0.6.2-1_amd64.deb + +**3) Chef DK Verfication** + +Verify using the below command that the client got installed properly. + + root@ubuntu-15-WKS:~# chef verify + +---------- + + Running verification for component 'berkshelf' + Running verification for component 'test-kitchen' + Running verification for component 'chef-client' + Running verification for component 'chef-dk' + Running verification for component 'chefspec' + Running verification for component 'rubocop' + Running verification for component 'fauxhai' + Running verification for component 'knife-spork' + Running verification for component 'kitchen-vagrant' + Running verification for component 'package installation' + Running verification for component 'openssl' + .............. + --------------------------------------------- + Verification of component 'rubocop' succeeded. + Verification of component 'knife-spork' succeeded. + Verification of component 'openssl' succeeded. + Verification of component 'berkshelf' succeeded. + Verification of component 'chef-dk' succeeded. + Verification of component 'fauxhai' succeeded. + Verification of component 'test-kitchen' succeeded. + Verification of component 'kitchen-vagrant' succeeded. + Verification of component 'chef-client' succeeded. + Verification of component 'chefspec' succeeded. + Verification of component 'package installation' succeeded. + +**Connecting to Chef Server** + +We will Create ~/.chef and copy the two user and organization pem files to this folder from chef server. + + root@ubuntu-14-chef:~# scp bloger.pem blogs.pem kashi.pem linux.pem root@172.25.10.172:/.chef/ + +---------- + + root@172.25.10.172's password: + bloger.pem 100% 1674 1.6KB/s 00:00 + blogs.pem 100% 1674 1.6KB/s 00:00 + kashi.pem 100% 1678 1.6KB/s 00:00 + linux.pem 100% 1678 1.6KB/s 00:00 + +**Knife Configurations to Manage your Chef Environment** + +Now create "~/.chef/knife.rb" with following content as configured in previous steps. + + root@ubuntu-15-WKS:/.chef# vim knife.rb + current_dir = File.dirname(__FILE__) + + log_level :info + log_location STDOUT + node_name "kashi" + client_key "#{current_dir}/kashi.pem" + validation_client_name "kashi-linux" + validation_key "#{current_dir}/linux.pem" + chef_server_url "https://172.25.10.173/organizations/linux" + cache_type 'BasicFile' + cache_options( :path => "#{ENV['HOME']}/.chef/checksums" ) + cookbook_path ["#{current_dir}/../cookbooks"] + +Create "~/cookbooks" folder for cookbooks as specified knife.rb file. + + root@ubuntu-15-WKS:/# mkdir cookbooks + +**Testing with Knife Configurations** + +Run "knife user list" and "knife client list" commands to verify whether knife configuration is working. + + root@ubuntu-15-WKS:/.chef# knife user list + +You might get the following error while first time you run this command.This occurs because we do not have our Chef server's SSL certificate on our workstation. + + ERROR: SSL Validation failure connecting to host: 172.25.10.173 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed + ERROR: Could not establish a secure connection to the server. + Use `knife ssl check` to troubleshoot your SSL configuration. + If your Chef Server uses a self-signed certificate, you can use + `knife ssl fetch` to make knife trust the server's certificates. + +To recover from the above error run the following command to fetch ssl certs and once again run the knife user and client list command and it should be fine then. + + root@ubuntu-15-WKS:/.chef# knife ssl fetch + WARNING: Certificates from 172.25.10.173 will be fetched and placed in your trusted_cert + directory (/.chef/trusted_certs). + + Knife has no means to verify these are the correct certificates. You should + verify the authenticity of these certificates after downloading. + + Adding certificate for ubuntu-14-chef.test.com in /.chef/trusted_certs/ubuntu-14-chef_test_com.crt + +Now after fetching ssl certs with above command, let's again run the below command. + + root@ubuntu-15-WKS:/.chef#knife client list + kashi-linux + +### New Node Configuration to interact with chef-server ### + +Nodes contain chef-client which performs all the infrastructure automation. So, Its time to begin with adding new servers to our chef environment by Configuring a new node to interact with chef-server after we had Configured chef-server and knife workstation combinations. + +To configure a new node to work with chef server use below command. + + root@ubuntu-15-WKS:~# knife bootstrap 172.25.10.170 --ssh-user root --ssh-password kashi123 --node-name mydns + +---------- + + Doing old-style registration with the validation key at /.chef/linux.pem... + Delete your validation key in order to use your user credentials instead + + Connecting to 172.25.10.170 + 172.25.10.170 Installing Chef Client... + 172.25.10.170 --2015-07-04 22:21:16-- https://www.opscode.com/chef/install.sh + 172.25.10.170 Resolving www.opscode.com (www.opscode.com)... 184.106.28.91 + 172.25.10.170 Connecting to www.opscode.com (www.opscode.com)|184.106.28.91|:443... connected. + 172.25.10.170 HTTP request sent, awaiting response... 200 OK + 172.25.10.170 Length: 18736 (18K) [application/x-sh] + 172.25.10.170 Saving to: ‘STDOUT’ + 172.25.10.170 + 100%[======================================>] 18,736 --.-K/s in 0s + 172.25.10.170 + 172.25.10.170 2015-07-04 22:21:17 (200 MB/s) - written to stdout [18736/18736] + 172.25.10.170 + 172.25.10.170 Downloading Chef 12 for ubuntu... + 172.25.10.170 downloading https://www.opscode.com/chef/metadata?v=12&prerelease=false&nightlies=false&p=ubuntu&pv=14.04&m=x86_64 + 172.25.10.170 to file /tmp/install.sh.26024/metadata.txt + 172.25.10.170 trying wget... + +After all we can see the vewly created node under the knife node list and new client list as it it will also creates a new client with the node. + + root@ubuntu-15-WKS:~# knife node list + mydns + +Similarly we can add multiple number of nodes to our chef infrastructure by providing ssh credentials with the same above knofe bootstrap command. + +### Conclusion ### + +In this detailed article we learnt about the Chef Configuration Management tool with its basic understanding and overview of its components with installation and configuration settings. We hope you have enjoyed learning the installation and configuration of Chef server with its workstation and client nodes. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-configure-chef-ubuntu-14-04-15-04/ + +作者:[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/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md b/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md new file mode 100644 index 0000000000..89094c1010 --- /dev/null +++ b/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md @@ -0,0 +1,185 @@ +Howto Configure FTP Server with Proftpd on Fedora 22 +================================================================================ +In this article, we'll learn about setting up an FTP server with Proftpd running Fedora 22 in our machine or server. [ProFTPD][1] is a free and open source FTP daemon software licensed under GPL. It is among most popular FTP server among machines running Linux. Its primary design aims to have an FTP server with many advanced features and provisioning users for more configuration options for easy customization. It includes a number of configuration options that are still not available with many other FTP daemons. It was initially developed by the developers as an alternative with better security and configuration to wu-ftpd server. An FTP server is a program that allows us to upload or download files and folders from a remote server where it is setup using an FTP client. Some of the features of ProFTPD daemon are as follows, you can check more features on [http://www.proftpd.org/features.html][2] . + +- It includes a per directory ".ftpaccess" access configuration similar to Apache's ".htaccess" +- It features multiple virtual FTP server with multiple users login and anonymous FTP services. +- It can be run either as a stand-alone server or from inetd/xinetd. +- Its ownership, file/folder attributes and file/folder permissions are UNIX-based. +- It can be run as standalone mode in order to protect the system from damage that can be caused from root access. +- The modular design of it makes it easily extensible with modules like LDAP servers, SSL/TLS encryption, RADIUS support, etc. +- IPv6 support is also included in the ProFTPD server. + +Here are some easy to perform steps on how we can setup an FTP Server with ProFTPD in Fedora 22 operating system. + +### 1. Installing ProFTPD ### + +First of all, we'll wanna install Proftpd server in our box running Fedora 22 as its operating system. As yum package manager has been depreciated, we'll use the latest and greatest built package manager called dnf. DNF is pretty easy to use and highly user friendly package manager available in Fedora 22. We'll simply use it to install proftpd daemon server. To do so, we'll need to run the following command in a terminal or a console in sudo mode. + + $ sudo dnf -y install proftpd proftpd-utils + +### 2. Configuring ProFTPD ### + +Now, we'll make changes to some configurations in the daemon. To configure the daemon, we will need to edit /etc/proftpd.conf with a text editor. The main configuration file of the ProFTPD daemon is **/etc/proftpd.conf** so, any changes made to this file will affect the FTP server. Here, are some changes we make in this initial step. + + $ sudo vi /etc/proftpd.conf + +Next, after we open the file using a text editor, we'll wanna make changes to the ServerName and ServerAdmin as hostname and email address respectively. Here's what we have made changes to those configs. + + ServerName "ftp.linoxide.com" + ServerAdmin arun@linoxide.com + +After that, we'll wanna the following lines into the configuration file so that it logs access & auth into its specified log files. + + ExtendedLog /var/log/proftpd/access.log WRITE,READ default + ExtendedLog /var/log/proftpd/auth.log AUTH auth + +![Configuring ProFTPD Config](http://blog.linoxide.com/wp-content/uploads/2015/06/configuring-proftpd-config.png) + +### 3. Adding FTP users ### + +After configure the basics of the configuration file, we'll surely wanna create an FTP user which is rooted at a specific directory we want. The current users that we use to login into our machine are automatically enabled with the FTP service, we can even use it to login into the FTP server. But, in this tutorial, we'll gonna create a new user with a specified home directory to the ftp server. + +Here, we'll create a new group named ftpgroup. + + $ sudo groupadd ftpgroup + +Then, we'll gonna add a new user arunftp into the group with home directory specified as /ftp-dir/ + + $ sudo useradd -G ftpgroup arunftp -s /sbin/nologin -d /ftp-dir/ + +After the user has been created and added to the group, we'll wanna set a password to the user arunftp. + + $ sudo passwd arunftp + + Changing password for user arunftp. + New password: + Retype new password: + passwd: all authentication tokens updated successfully. + +Now, we'll set read and write permission of the home directory by the ftp users by executing the following command. + + $ sudo setsebool -P allow_ftpd_full_access=1 + $ sudo setsebool -P ftp_home_dir=1 + +Then, we'll wanna make that directory and its contents unable to get removed or renamed by any other users. + + $ sudo chmod -R 1777 /ftp-dir/ + +### 4. Enabling TLS Support ### + +FTP is considered less secure in comparison to the latest encryption methods used these days as anybody sniffing the network card can read the data pass through FTP. So, we'll enable TLS Encryption support in our FTP server. To do so, we'll need to a edit /etc/proftpd.conf configuration file. Before that, we'll wanna backup our existing configuration file to make sure we can revert our configuration if any unexpected happens. + + $ sudo cp /etc/proftpd.conf /etc/proftpd.conf.bak + +Then, we'll wanna edit the configuration file using our favorite text editor. + + $ sudo vi /etc/proftpd.conf + +Then, we'll wanna add the following lines just below line we configured in step 2 . + + TLSEngine on + TLSRequired on + TLSProtocol SSLv23 + TLSLog /var/log/proftpd/tls.log + TLSRSACertificateFile /etc/pki/tls/certs/proftpd.pem + TLSRSACertificateKeyFile /etc/pki/tls/certs/proftpd.pem + +![Enabling TLS Configuration](http://blog.linoxide.com/wp-content/uploads/2015/06/tls-configuration.png) + +After finishing up with the configuration, we'll wanna save and exit it. + +Next, we'll need to generate the SSL certificates inside **/etc/pki/tls/certs/** directory as proftpd.pem. To do so, first we'll need to install openssl in our Fedora 22 machine. + + $ sudo dnf install openssl + +Then, we'll gonna generate the SSL certificate by running the following command. + + $ sudo openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/pki/tls/certs/proftpd.pem -out /etc/pki/tls/certs/proftpd.pem + +We'll be asked with some information that will be associated into the certificate. After completing the required information, it will generate a 2048 bit RSA private key. + + Generating a 2048 bit RSA private key + ...................+++ + ...................+++ + writing new private key to '/etc/pki/tls/certs/proftpd.pem' + ----- + You are about to be asked to enter information that will be incorporated + into your certificate request. + What you are about to enter is what is called a Distinguished Name or a DN. + There are quite a few fields but you can leave some blank + For some fields there will be a default value, + If you enter '.', the field will be left blank. + ----- + Country Name (2 letter code) [XX]:NP + State or Province Name (full name) []:Narayani + Locality Name (eg, city) [Default City]:Bharatpur + Organization Name (eg, company) [Default Company Ltd]:Linoxide + Organizational Unit Name (eg, section) []:Linux Freedom + Common Name (eg, your name or your server's hostname) []:ftp.linoxide.com + Email Address []:arun@linoxide.com + +After that, we'll gonna change the permission of the generated certificate file in order to secure it. + + $ sudo chmod 600 /etc/pki/tls/certs/proftpd.pem + +### 5. Allowing FTP through Firewall ### + +Now, we'll need to allow the ftp ports that are usually blocked by the firewall by default. So, we'll allow ports and enable access to the ftp through firewall. + +If **TLS/SSL Encryption is enabled** run the following command. + + $sudo firewall-cmd --add-port=1024-65534/tcp + $ sudo firewall-cmd --add-port=1024-65534/tcp --permanent + +If **TLS/SSL Encryption is disabled** run the following command. + + $ sudo firewall-cmd --permanent --zone=public --add-service=ftp + + success + +Then, we'll need to reload the firewall configuration. + + $ sudo firewall-cmd --reload + + success + +### 6. Starting and Enabling ProFTPD ### + +After everything is set, we'll finally start our ProFTPD and give it a try. To start the proftpd ftp daemon, we'll need to run the following command. + + $ sudo systemctl start proftpd.service + +Then, we'll wanna enable proftpd to start on every boot. + + $ sudo systemctl enable proftpd.service + + Created symlink from /etc/systemd/system/multi-user.target.wants/proftpd.service to /usr/lib/systemd/system/proftpd.service. + +### 7. Logging into the FTP server ### + +Now, if everything was configured and done as expected, we must be able to connect to the ftp server and login with the details we set above. Here, we'll gonna configure our FTP client, filezilla with hostname as **server's ip or url**, Protocol as **FTP**, User as **arunftp** and password as the one we set in above step 3. If you followed step 4 for enabling TLS support, then we'll need to set the Encryption type as **Require explicit FTP over TLS** but if you didn't follow step 4 and don't wanna use TLS encryption then set the Encryption type as **Plain FTP**. + +![FTP Login Details](http://blog.linoxide.com/wp-content/uploads/2015/06/ftp-login-details.png) + +To setup the above configuration, we'll need goto File which is under the Menu and then click on Site Manager in which we can click on new site then configure as illustrated above. + +![FTP SSL Certificate](http://blog.linoxide.com/wp-content/uploads/2015/06/ftp-ssl-certificate.png) + +Then, we're asked to accept the SSL certificate, that can be done by click OK. After that, we are able to upload and download required files and folders from our FTP server. + +### Conclusion ### + +Finally, we have successfully installed and configured our Fedora 22 box with Proftpd FTP server. Proftpd is an awesome powerful highly configurable and extensible FTP daemon. The above tutorial illustrates us how we can configure a secure FTP server with TLS encryption. It is highly recommended to configure FTP server with TLS encryption as it enables SSL certificate security to the data transfer and login. Here, we haven't configured anonymous access to the FTP cause they are usually not recommended in a protected FTP system. An FTP access makes pretty easy for people to upload and download at good efficient performance. We can even change the ports for the users for additional security. So, if you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/configure-ftp-proftpd-fedora-22/ + +作者:[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 From d429943363ec3a029f2ca63f90404896e842f607 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 17 Jul 2015 13:04:07 +0800 Subject: [PATCH 1418/2517] =?UTF-8?q?20150717-1=20=E5=85=B6=E4=B8=AD?= =?UTF-8?q?=E4=B8=80=E7=AF=87=E5=BF=98=E8=AE=B0=E5=8A=A0=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E4=BA=86=EF=BC=8C=E8=A1=A5=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...17 Howto Configure FTP Server with Proftpd on Fedora 22.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md b/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md index 89094c1010..f87bcd7745 100644 --- a/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md +++ b/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md @@ -182,4 +182,6 @@ via: http://linoxide.com/linux-how-to/configure-ftp-proftpd-fedora-22/ 本文由 [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/ +[1]:http://www.proftpd.org/ +[2]:http://www.proftpd.org/features.html \ No newline at end of file From 83b701cf720f0e8d8083ac53d75d20d642c8de08 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 17 Jul 2015 14:57:42 +0800 Subject: [PATCH 1419/2517] =?UTF-8?q?20150717-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ancer for Web Servers on RHEL or CentOS.md | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md diff --git a/sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md b/sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md new file mode 100644 index 0000000000..6aba5e897e --- /dev/null +++ b/sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md @@ -0,0 +1,159 @@ +Setting Up ‘XR’ (Crossroads) Load Balancer for Web Servers on RHEL/CentOS +================================================================================ +Crossroads is a service independent, open source load balance and fail-over utility for Linux and TCP based services. It can be used for HTTP, HTTPS, SSH, SMTP and DNS etc. It is also a multi-threaded utility which consumes only one memory space which leads to increase the performance when balancing load. + +Let’s have a look at how XR works. We can locate XR between network clients and a nest of servers which dispatches client requests to the servers balancing the load. + +If a server is down, XR forwards next client request to the next server in line, so client feels no down time. Have a look at the below diagram to understand what kind of a situation we are going to handle with XR. + +![Install XR Crossroads Load Balancer](http://www.tecmint.com/wp-content/uploads/2015/07/Install-XR-Crossroads-Load-Balancer.jpg) + +Install XR Crossroads Load Balancer + +There are two web-servers, one gateway server which we install and setup XR to receive client requests and distribute them among the servers. + + XR Crossroads Gateway Server : 172.16.1.204 + Web Server 01 : 172.16.1.222 + Web Server 02 : 192.168.1.161 + +In above scenario, my gateway server (i.e XR Crossroads) bears the IP address 172.16.1.222, webserver01 is 172.16.1.222 and it listens through port 8888 and webserver02 is 192.168.1.161 and it listens through port 5555. + +Now all I need is to balance the load of all the requests that receives by the XR gateway from internet and distribute them among two web-servers balancing the load. + +### Step1: Install XR Crossroads Load Balancer on Gateway Server ### + +**1. Unfortunately, there isn’t any binary RPM packages available for crosscroads, the only way to install XR crossroads from source tarball.** + +To compile XR, you must have C++ compiler and Gnu make utilities installed on the system in order to continue installation error free. + + # yum install gcc gcc-c++ make + +Next, download the source tarball by going to their official site ([https://crossroads.e-tunity.com][1]), and grab the archived package (i.e. crossroads-stable.tar.gz). + +Alternatively, you use following wget utility to download the package and extract it in any location (eg: /usr/src/), go to unpacked directory and issue “make install” command. + + # wget https://crossroads.e-tunity.com/downloads/crossroads-stable.tar.gz + # tar -xvf crossroads-stable.tar.gz + # cd crossroads-2.74/ + # make install + +![Install XR Crossroads Load Balancer](http://www.tecmint.com/wp-content/uploads/2015/07/Install-XR-Crossroads-Load-Balancer.png) + +Install XR Crossroads Load Balancer + +After installation finishes, the binary files are created under /usr/sbin/ and XR configuration within /etc namely “xrctl.xml”. + +**2. As the last prerequisite, you need two web-servers. For ease of use, I have created two python SimpleHTTPServer instances in one server.** + +To see how to setup a python SimpleHTTPServer, read our article at [Create Two Web Servers Easily Using SimpleHTTPServer][2]. + +As I said, we’re using two web-servers, and they are webserver01 running on 172.16.1.222 through port 8888 and webserver02 running on 192.168.1.161 through port 5555. + +![XR WebServer 01](http://www.tecmint.com/wp-content/uploads/2015/07/XR-WebServer01.jpg) + +XR WebServer 01 + +![XR WebServer 02](http://www.tecmint.com/wp-content/uploads/2015/07/XR-WebServer02.jpg) + +XR WebServer 02 + +### Step 2: Configure XR Crossroads Load Balancer ### + +**3. All requisites are in place. Now what we have to do is configure the `xrctl.xml` file to distribute the load among the web-servers which receives by the XR server from the internet.** + +Now open `xrctl.xml` file with [vi/vim editor][3]. + + # vim /etc/xrctl.xml + +and make the changes as suggested below. + + 1.0<94> encoding=<94>UTF-8<94>?> + + + true + /tmp + + + Tecmint + +

172.16.1.204:8080
+ tcp + 0:8010 + yes + 0 + 0 + 0 + 0 + + +
172.16.1.222:8888
+
+ +
192.168.1.161:5555
+
+ + + +![Configure XR Crossroads Load Balancer](http://www.tecmint.com/wp-content/uploads/2015/07/Configure-XR-Crossroads-Load-Balancer.jpg) + +Configure XR Crossroads Load Balancer + +Here, you can see a very basic XR configuration done within xrctl.xml. I have defined what the XR server is, what are the back end servers and their ports and web interface port for the XR. + +**4. Now you need to start the XR daemon by issuing below commands.** + + # xrctl start + # xrctl status + +![Start XR Crossroads](http://www.tecmint.com/wp-content/uploads/2015/07/Start-XR-Crossroads.jpg) + +Start XR Crossroads + +**5. Okay great. Now it’s time to check whether the configs are working fine. Open two web browsers and enter the IP address of the XR server with port and see the output.** + +![Verify Web Server Load Balancing](http://www.tecmint.com/wp-content/uploads/2015/07/Verify-Web-Server-Load-Balancing.jpg) + +Verify Web Server Load Balancing + +Fantastic. It works fine. now it’s time to play with XR. + +**6. Now it’s time to login into XR Crossroads dashboard and see the port we’ve configured for web-interface. Enter your XR server’s IP address with the port number for web-interface you have configured in xrctl.xml.** + + http://172.16.1.204:8010 + +![XR Crossroads Dashboard](http://www.tecmint.com/wp-content/uploads/2015/07/XR-Crossroads-Dashboard.jpg) + +XR Crossroads Dashboard + +This is what it looks like. It’s easy to understand, user-friendly and easy to use. It shows how many connections each back end server received in the top right corner along with the additional details regarding the requests receiving. Even you can set the load weight each server you need to bear, maximum number of connections and load average etc.. + +The best part is, you actually can do this even without configuring xrctl.xml. Only thing you have to do is issue the command with following syntax and it will do the job done. + + # xr --verbose --server tcp:172.16.1.204:8080 --backend 172.16.1.222:8888 --backend 192.168.1.161:5555 + +Explanation of above syntax in detail: + +- –verbose will show what happens when the command has executed. +- –server defines the XR server you have installed the package in. +- –backend defines the webservers you need to balance the traffic to. +- Tcp defines it uses tcp services. + +For more details, about documentations and configuration of CROSSROADS, please visit their official site at: [https://crossroads.e-tunity.com/][4]. + +XR Corssroads enables many ways to enhance your server performance, protect downtime’s and make your admin tasks easier and handier. Hope you enjoyed the guide and feel free to comment below for the suggestions and clarifications. Keep in touch with Tecmint for handy How To’s. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/setting-up-xr-crossroads-load-balancer-for-web-servers-on-rhel-centos/ + +作者:[Thilina Uvindasiri][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/thilidhanushka/ +[1]:https://crossroads.e-tunity.com/ +[2]:http://www.tecmint.com/python-simplehttpserver-to-create-webserver-or-serve-files-instantly/ +[3]:http://www.tecmint.com/vi-editor-usage/ +[4]:https://crossroads.e-tunity.com/ \ No newline at end of file From 506034fcc52aa96531d1093dbc639799a2d8e55f Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 17 Jul 2015 15:00:33 +0800 Subject: [PATCH 1420/2517] =?UTF-8?q?20150717-3=20=E9=80=89=E9=A2=98=20=20?= =?UTF-8?q?NGINX=20=E4=B8=93=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...7 How to collect NGINX metrics - Part 2.md | 237 ++++++++++ ... to monitor NGINX with Datadog - Part 3.md | 150 +++++++ .../20150717 How to monitor NGINX- Part 1.md | 408 ++++++++++++++++++ 3 files changed, 795 insertions(+) create mode 100644 sources/tech/20150717 How to collect NGINX metrics - Part 2.md create mode 100644 sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md create mode 100644 sources/tech/20150717 How to monitor NGINX- Part 1.md diff --git a/sources/tech/20150717 How to collect NGINX metrics - Part 2.md b/sources/tech/20150717 How to collect NGINX metrics - Part 2.md new file mode 100644 index 0000000000..8d83b3a0f6 --- /dev/null +++ b/sources/tech/20150717 How to collect NGINX metrics - Part 2.md @@ -0,0 +1,237 @@ +How to collect NGINX metrics - Part 2 +================================================================================ +![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_2.png) + +### How to get the NGINX metrics you need ### + +How you go about capturing metrics depends on which version of NGINX you are using, as well as which metrics you wish to access. (See [the companion article][1] for an in-depth exploration of NGINX metrics.) Free, open-source NGINX and the commercial product NGINX Plus both have status modules that report metrics, and NGINX can also be configured to report certain metrics in its logs: + +注:表格 + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MetricAvailability
NGINX (open-source)NGINX PlusNGINX logs
accepts / acceptedxx
handledxx
droppedxx
activexx
requests / totalxx
4xx codesxx
5xx codesxx
request timex
+ +#### Metrics collection: NGINX (open-source) #### + +Open-source NGINX exposes several basic metrics about server activity on a simple status page, provided that you have the HTTP [stub status module][2] enabled. To check if the module is already enabled, run: + + nginx -V 2>&1 | grep -o with-http_stub_status_module + +The status module is enabled if you see with-http_stub_status_module as output in the terminal. + +If that command returns no output, you will need to enable the status module. You can use the --with-http_stub_status_module configuration parameter when [building NGINX from source][3]: + + ./configure \ + … \ + --with-http_stub_status_module + make + sudo make install + +After verifying the module is enabled or enabling it yourself, you will also need to modify your NGINX configuration to set up a locally accessible URL (e.g., /nginx_status) for the status page: + + server { + location /nginx_status { + stub_status on; + + access_log off; + allow 127.0.0.1; + deny all; + } + } + +Note: The server blocks of the NGINX config are usually found not in the master configuration file (e.g., /etc/nginx/nginx.conf) but in supplemental configuration files that are referenced by the master config. To find the relevant configuration files, first locate the master config by running: + + nginx -t + +Open the master configuration file listed, and look for lines beginning with include near the end of the http block, such as: + + include /etc/nginx/conf.d/*.conf; + +In one of the referenced config files you should find the main server block, which you can modify as above to configure NGINX metrics reporting. After changing any configurations, reload the configs by executing: + + nginx -s reload + +Now you can view the status page to see your metrics: + + Active connections: 24 + server accepts handled requests + 1156958 1156958 4491319 + Reading: 0 Writing: 18 Waiting : 6 + +Note that if you are trying to access the status page from a remote machine, you will need to whitelist the remote machine’s IP address in your status configuration, just as 127.0.0.1 is whitelisted in the configuration snippet above. + +The NGINX status page is an easy way to get a quick snapshot of your metrics, but for continuous monitoring you will need to automatically record that data at regular intervals. Parsers for the NGINX status page already exist for monitoring tools such as [Nagios][4] and [Datadog][5], as well as for the statistics collection daemon [collectD][6]. + +#### Metrics collection: NGINX Plus #### + +The commercial NGINX Plus provides [many more metrics][7] through its ngx_http_status_module than are available in open-source NGINX. Among the additional metrics exposed by NGINX Plus are bytes streamed, as well as information about upstream systems and caches. NGINX Plus also reports counts of all HTTP status code types (1xx, 2xx, 3xx, 4xx, 5xx). A sample NGINX Plus status board is available [here][8]. + +![NGINX Plus status board](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/status_plus-2.png) + +*Note: the “Active” connections on the NGINX Plus status dashboard are defined slightly differently than the Active state connections in the metrics collected via the open-source NGINX stub status module. In NGINX Plus metrics, Active connections do not include connections in the Waiting state (aka Idle connections).* + +NGINX Plus also reports [metrics in JSON format][9] for easy integration with other monitoring systems. With NGINX Plus, you can see the metrics and health status [for a given upstream grouping of servers][10], or drill down to get a count of just the response codes [from a single server][11] in that upstream: + + {"1xx":0,"2xx":3483032,"3xx":0,"4xx":23,"5xx":0,"total":3483055} + +To enable the NGINX Plus metrics dashboard, you can add a status server block inside the http block of your NGINX configuration. ([See the section above][12] on collecting metrics from open-source NGINX for instructions on locating the relevant config files.) For example, to set up a status dashboard at http://your.ip.address:8080/status.html and a JSON interface at http://your.ip.address:8080/status, you would add the following server block: + + server { + listen 8080; + root /usr/share/nginx/html; + + location /status { + status; + } + + location = /status.html { + } + } + +The status pages should be live once you reload your NGINX configuration: + + nginx -s reload + +The official NGINX Plus docs have [more details][13] on how to configure the expanded status module. + +#### Metrics collection: NGINX logs #### + +NGINX’s [log module][14] writes configurable access logs to a destination of your choosing. You can customize the format of your logs and the data they contain by [adding or subtracting variables][15]. The simplest way to capture detailed logs is to add the following line in the server block of your config file (see [the section][16] on collecting metrics from open-source NGINX for instructions on locating your config files): + + access_log logs/host.access.log combined; + +After changing any NGINX configurations, reload the configs by executing: + + nginx -s reload + +The “combined” log format, included by default, captures [a number of key data points][17], such as the actual HTTP request and the corresponding response code. In the example logs below, NGINX logged a 200 (success) status code for a request for /index.html and a 404 (not found) error for the nonexistent /fail. + + 127.0.0.1 - - [19/Feb/2015:12:10:46 -0500] "GET /index.html HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari 537.36" + + 127.0.0.1 - - [19/Feb/2015:12:11:05 -0500] "GET /fail HTTP/1.1" 404 570 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36" + +You can log request processing time as well by adding a new log format to the http block of your NGINX config file: + + log_format nginx '$remote_addr - $remote_user [$time_local] ' + '"$request" $status $body_bytes_sent $request_time ' + '"$http_referer" "$http_user_agent"'; + +And by adding or modifying the access_log line in the server block of your config file: + + access_log logs/host.access.log nginx; + +After reloading the updated configs (by running nginx -s reload), your access logs will include response times, as seen below. The units are seconds, with millisecond resolution. In this instance, the server received a request for /big.pdf, returning a 206 (success) status code after sending 33973115 bytes. Processing the request took 0.202 seconds (202 milliseconds): + + 127.0.0.1 - - [19/Feb/2015:15:50:36 -0500] "GET /big.pdf HTTP/1.1" 206 33973115 0.202 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36" + +You can use a variety of tools and services to parse and analyze NGINX logs. For instance, [rsyslog][18] can monitor your logs and pass them to any number of log-analytics services; you can use a free, open-source tool such as [logstash][19] to collect and analyze logs; or you can use a unified logging layer such as [Fluentd][20] to collect and parse your NGINX logs. + +### Conclusion ### + +Which NGINX metrics you monitor will depend on the tools available to you, and whether the insight provided by a given metric justifies the overhead of monitoring that metric. For instance, is measuring error rates important enough to your organization to justify investing in NGINX Plus or implementing a system to capture and analyze logs? + +At Datadog, we have built integrations with both NGINX and NGINX Plus so that you can begin collecting and monitoring metrics from all your web servers with a minimum of setup. Learn how to monitor NGINX with Datadog [in this post][21], and get started right away with a [free trial of Datadog][22]. + +---------- + +Source Markdown for this post is available [on GitHub][23]. Questions, corrections, additions, etc.? Please [let us know][24]. + +-------------------------------------------------------------------------------- + +via: https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ + +作者:K Young +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ +[2]:http://nginx.org/en/docs/http/ngx_http_stub_status_module.html +[3]:http://wiki.nginx.org/InstallOptions +[4]:https://exchange.nagios.org/directory/Plugins/Web-Servers/nginx +[5]:http://docs.datadoghq.com/integrations/nginx/ +[6]:https://collectd.org/wiki/index.php/Plugin:nginx +[7]:http://nginx.org/en/docs/http/ngx_http_status_module.html#data +[8]:http://demo.nginx.com/status.html +[9]:http://demo.nginx.com/status +[10]:http://demo.nginx.com/status/upstreams/demoupstreams +[11]:http://demo.nginx.com/status/upstreams/demoupstreams/0/responses +[12]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source +[13]:http://nginx.org/en/docs/http/ngx_http_status_module.html#example +[14]:http://nginx.org/en/docs/http/ngx_http_log_module.html +[15]:http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format +[16]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source +[17]:http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format +[18]:http://www.rsyslog.com/ +[19]:https://www.elastic.co/products/logstash +[20]:http://www.fluentd.org/ +[21]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ +[22]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#sign-up +[23]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_collect_nginx_metrics.md +[24]:https://github.com/DataDog/the-monitor/issues \ No newline at end of file diff --git a/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md b/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md new file mode 100644 index 0000000000..949fd3d949 --- /dev/null +++ b/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md @@ -0,0 +1,150 @@ +How to monitor NGINX with Datadog - Part 3 +================================================================================ +![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_3.png) + +If you’ve already read [our post on monitoring NGINX][1], you know how much information you can gain about your web environment from just a handful of metrics. And you’ve also seen just how easy it is to start collecting metrics from NGINX on ad hoc basis. But to implement comprehensive, ongoing NGINX monitoring, you will need a robust monitoring system to store and visualize your metrics, and to alert you when anomalies happen. In this post, we’ll show you how to set up NGINX monitoring in Datadog so that you can view your metrics on customizable dashboards like this: + +![NGINX dashboard](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_board_5.png) + +Datadog allows you to build graphs and alerts around individual hosts, services, processes, metrics—or virtually any combination thereof. For instance, you can monitor all of your NGINX hosts, or all hosts in a certain availability zone, or you can monitor a single key metric being reported by all hosts with a certain tag. This post will show you how to: + +- Monitor NGINX metrics on Datadog dashboards, alongside all your other systems +- Set up automated alerts to notify you when a key metric changes dramatically + +### Configuring NGINX ### + +To collect metrics from NGINX, you first need to ensure that NGINX has an enabled status module and a URL for reporting its status metrics. Step-by-step instructions [for configuring open-source NGINX][2] and [NGINX Plus][3] are available in our companion post on metric collection. + +### Integrating Datadog and NGINX ### + +#### Install the Datadog Agent #### + +The Datadog Agent is [the open-source software][4] that collects and reports metrics from your hosts so that you can view and monitor them in Datadog. Installing the agent usually takes [just a single command][5]. + +As soon as your Agent is up and running, you should see your host reporting metrics [in your Datadog account][6]. + +![Datadog infrastructure list](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/infra_2.png) + +#### Configure the Agent #### + +Next you’ll need to create a simple NGINX configuration file for the Agent. The location of the Agent’s configuration directory for your OS can be found [here][7]. + +Inside that directory, at conf.d/nginx.yaml.example, you will find [a sample NGINX config file][8] that you can edit to provide the status URL and optional tags for each of your NGINX instances: + + init_config: + + instances: + + - nginx_status_url: http://localhost/nginx_status/ + tags: + - instance:foo + +Once you have supplied the status URLs and any tags, save the config file as conf.d/nginx.yaml. + +#### Restart the Agent #### + +You must restart the Agent to load your new configuration file. The restart command varies somewhat by platform—see the specific commands for your platform [here][9]. + +#### Verify the configuration settings #### + +To check that Datadog and NGINX are properly integrated, run the Datadog info command. The command for each platform is available [here][10]. + +If the configuration is correct, you will see a section like this in the output: + + Checks + ====== + + [...] + + nginx + ----- + - instance #0 [OK] + - Collected 8 metrics & 0 events + +#### Install the integration #### + +Finally, switch on the NGINX integration inside your Datadog account. It’s as simple as clicking the “Install Integration” button under the Configuration tab in the [NGINX integration settings][11]. + +![Install integration](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/install.png) + +### Metrics! ### + +Once the Agent begins reporting NGINX metrics, you will see [an NGINX dashboard][12] among your list of available dashboards in Datadog. + +The basic NGINX dashboard displays a handful of graphs encapsulating most of the key metrics highlighted [in our introduction to NGINX monitoring][13]. (Some metrics, notably request processing time, require log analysis and are not available in Datadog.) + +You can easily create a comprehensive dashboard for monitoring your entire web stack by adding additional graphs with important metrics from outside NGINX. For example, you might want to monitor host-level metrics on your NGINX hosts, such as system load. To start building a custom dashboard, simply clone the default NGINX dashboard by clicking on the gear near the upper right of the dashboard and selecting “Clone Dash”. + +![Clone dash](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/clone_2.png) + +You can also monitor your NGINX instances at a higher level using Datadog’s [Host Maps][14]—for instance, color-coding all your NGINX hosts by CPU usage to identify potential hotspots. + +![](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx-host-map-3.png) + +### Alerting on NGINX metrics ### + +Once Datadog is capturing and visualizing your metrics, you will likely want to set up some monitors to automatically keep tabs on your metrics—and to alert you when there are problems. Below we’ll walk through a representative example: a metric monitor that alerts on sudden drops in NGINX throughput. + +#### Monitor your NGINX throughput #### + +Datadog metric alerts can be threshold-based (alert when the metric exceeds a set value) or change-based (alert when the metric changes by a certain amount). In this case we’ll take the latter approach, alerting when our incoming requests per second drop precipitously. Such drops are often indicative of problems. + +1.**Create a new metric monitor**. Select “New Monitor” from the “Monitors” dropdown in Datadog. Select “Metric” as the monitor type. + +![NGINX metric monitor](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_1.png) + +2.**Define your metric monitor**. We want to know when our total NGINX requests per second drop by a certain amount. So we define the metric of interest to be the sum of nginx.net.request_per_s across our infrastructure. + +![NGINX metric](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_2.png) + +3.**Set metric alert conditions**. Since we want to alert on a change, rather than on a fixed threshold, we select “Change Alert.” We’ll set the monitor to alert us whenever the request volume drops by 30 percent or more. Here we use a one-minute window of data to represent the metric’s value “now” and alert on the average change across that interval, as compared to the metric’s value 10 minutes prior. + +![NGINX metric change alert](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_3.png) + +4.**Customize the notification**. If our NGINX request volume drops, we want to notify our team. In this case we will post a notification in the ops team’s chat room and page the engineer on call. In “Say what’s happening”, we name the monitor and add a short message that will accompany the notification to suggest a first step for investigation. We @mention the Slack channel that we use for ops and use @pagerduty to [route the alert to PagerDuty][15] + +![NGINX metric notification](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_4v3.png) + +5.**Save the integration monitor**. Click the “Save” button at the bottom of the page. You’re now monitoring a key NGINX [work metric][16], and your on-call engineer will be paged anytime it drops rapidly. + +### Conclusion ### + +In this post we’ve walked you through integrating NGINX with Datadog to visualize your key metrics and notify your team when your web infrastructure shows signs of trouble. + +If you’ve followed along using your own Datadog account, you should now have greatly improved visibility into what’s happening in your web environment, as well as the ability to create automated monitors tailored to your environment, your usage patterns, and the metrics that are most valuable to your organization. + +If you don’t yet have a Datadog account, you can sign up for [a free trial][17] and start monitoring your infrastructure, your applications, and your services today. + +---------- + +Source Markdown for this post is available [on GitHub][18]. Questions, corrections, additions, etc.? Please [let us know][19]. + +------------------------------------------------------------ + +via: https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ + +作者:K Young +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ +[2]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source +[3]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#plus +[4]:https://github.com/DataDog/dd-agent +[5]:https://app.datadoghq.com/account/settings#agent +[6]:https://app.datadoghq.com/infrastructure +[7]:http://docs.datadoghq.com/guides/basic_agent_usage/ +[8]:https://github.com/DataDog/dd-agent/blob/master/conf.d/nginx.yaml.example +[9]:http://docs.datadoghq.com/guides/basic_agent_usage/ +[10]:http://docs.datadoghq.com/guides/basic_agent_usage/ +[11]:https://app.datadoghq.com/account/settings#integrations/nginx +[12]:https://app.datadoghq.com/dash/integration/nginx +[13]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ +[14]:https://www.datadoghq.com/blog/introducing-host-maps-know-thy-infrastructure/ +[15]:https://www.datadoghq.com/blog/pagerduty/ +[16]:https://www.datadoghq.com/blog/monitoring-101-collecting-data/#metrics +[17]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/#sign-up +[18]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_monitor_nginx_with_datadog.md +[19]:https://github.com/DataDog/the-monitor/issues \ No newline at end of file diff --git a/sources/tech/20150717 How to monitor NGINX- Part 1.md b/sources/tech/20150717 How to monitor NGINX- Part 1.md new file mode 100644 index 0000000000..25270eb5cb --- /dev/null +++ b/sources/tech/20150717 How to monitor NGINX- Part 1.md @@ -0,0 +1,408 @@ +How to monitor NGINX - Part 1 +================================================================================ +![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_1.png) + +### What is NGINX? ### + +[NGINX][1] (pronounced “engine X”) is a popular HTTP server and reverse proxy server. As an HTTP server, NGINX serves static content very efficiently and reliably, using relatively little memory. As a [reverse proxy][2], it can be used as a single, controlled point of access for multiple back-end servers or for additional applications such as caching and load balancing. NGINX is available as a free, open-source product or in a more full-featured, commercially distributed version called NGINX Plus. + +NGINX can also be used as a mail proxy and a generic TCP proxy, but this article does not directly address NGINX monitoring for these use cases. + +### Key NGINX metrics ### + +By monitoring NGINX you can catch two categories of issues: resource issues within NGINX itself, and also problems developing elsewhere in your web infrastructure. Some of the metrics most NGINX users will benefit from monitoring include **requests per second**, which provides a high-level view of combined end-user activity; **server error rate**, which indicates how often your servers are failing to process seemingly valid requests; and **request processing time**, which describes how long your servers are taking to process client requests (and which can point to slowdowns or other problems in your environment). + +More generally, there are at least three key categories of metrics to watch: + +- Basic activity metrics +- Error metrics +- Performance metrics + +Below we’ll break down a few of the most important NGINX metrics in each category, as well as metrics for a fairly common use case that deserves special mention: using NGINX Plus for reverse proxying. We will also describe how you can monitor all of these metrics with your graphing or monitoring tools of choice. + +This article references metric terminology [introduced in our Monitoring 101 series][3], which provides a framework for metric collection and alerting. + +#### Basic activity metrics #### + +Whatever your NGINX use case, you will no doubt want to monitor how many client requests your servers are receiving and how those requests are being processed. + +NGINX Plus can report basic activity metrics exactly like open-source NGINX, but it also provides a secondary module that reports metrics slightly differently. We discuss open-source NGINX first, then the additional reporting capabilities provided by NGINX Plus. + +**NGINX** + +The diagram below shows the lifecycle of a client connection and how the open-source version of NGINX collects metrics during a connection. + +![connection, request states](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_connection_diagram-2.png) + +Accepts, handled, and requests are ever-increasing counters. Active, waiting, reading, and writing grow and shrink with request volume. + +注:表格 + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionMetric type
acceptsCount of client connections attempted by NGINXResource: Utilization
handledCount of successful client connectionsResource: Utilization
activeCurrently active client connectionsResource: Utilization
dropped (calculated)Count of dropped connections (accepts – handled)Work: Errors*
requestsCount of client requestsWork: Throughput
*Strictly speaking, dropped connections is a metric of resource saturation, but since saturation causes NGINX to stop servicing some work (rather than queuing it up for later), “dropped” is best thought of as a work metric.
+ +The **accepts** counter is incremented when an NGINX worker picks up a request for a connection from the OS, whereas **handled** is incremented when the worker actually gets a connection for the request (by establishing a new connection or reusing an open one). These two counts are usually the same—any divergence indicates that connections are being **dropped**, often because a resource limit, such as NGINX’s [worker_connections][4] limit, has been reached. + +Once NGINX successfully handles a connection, the connection moves to an **active** state, where it remains as client requests are processed: + +Active state + +- **Waiting**: An active connection may also be in a Waiting substate if there is no active request at the moment. New connections can bypass this state and move directly to Reading, most commonly when using “accept filter” or “deferred accept”, in which case NGINX does not receive notice of work until it has enough data to begin working on the response. Connections will also be in the Waiting state after sending a response if the connection is set to keep-alive. +- **Reading**: When a request is received, the connection moves out of the waiting state, and the request itself is counted as Reading. In this state NGINX is reading a client request header. Request headers are lightweight, so this is usually a fast operation. +- **Writing**: After the request is read, it is counted as Writing, and remains in that state until a response is returned to the client. That means that the request is Writing while NGINX is waiting for results from upstream systems (systems “behind” NGINX), and while NGINX is operating on the response. Requests will often spend the majority of their time in the Writing state. + +Often a connection will only support one request at a time. In this case, the number of Active connections == Waiting connections + Reading requests + Writing requests. However, the newer SPDY and HTTP/2 protocols allow multiple concurrent requests/responses to be multiplexed over a connection, so Active may be less than the sum of Waiting, Reading, and Writing. (As of this writing, NGINX does not support HTTP/2, but expects to add support during 2015.) + +**NGINX Plus** + +As mentioned above, all of open-source NGINX’s metrics are available within NGINX Plus, but Plus can also report additional metrics. The section covers the metrics that are only available from NGINX Plus. + +![connection, request states](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_plus_connection_diagram-2.png) + +Accepted, dropped, and total are ever-increasing counters. Active, idle, and current track the current number of connections or requests in each of those states, so they grow and shrink with request volume. + +注:表格 + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionMetric type
acceptedCount of client connections attempted by NGINXResource: Utilization
droppedCount of dropped connectionsWork: Errors*
activeCurrently active client connectionsResource: Utilization
idleClient connections with zero current requestsResource: Utilization
totalCount of client requestsWork: Throughput
*Strictly speaking, dropped connections is a metric of resource saturation, but since saturation causes NGINX to stop servicing some work (rather than queuing it up for later), “dropped” is best thought of as a work metric.
+ +The **accepted** counter is incremented when an NGINX Plus worker picks up a request for a connection from the OS. If the worker fails to get a connection for the request (by establishing a new connection or reusing an open one), then the connection is dropped and **dropped** is incremented. Ordinarily connections are dropped because a resource limit, such as NGINX Plus’s [worker_connections][4] limit, has been reached. + +**Active** and **idle** are the same as “active” and “waiting” states in open-source NGINX as described [above][5], with one key exception: in open-source NGINX, “waiting” falls under the “active” umbrella, whereas in NGINX Plus “idle” connections are excluded from the “active” count. **Current** is the same as the combined “reading + writing” states in open-source NGINX. + +**Total** is a cumulative count of client requests. Note that a single client connection can involve multiple requests, so this number may be significantly larger than the cumulative number of connections. In fact, (total / accepted) yields the average number of requests per connection. + +**Metric differences between Open-Source and Plus** + +注:表格 + +++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NGINX (open-source)NGINX Plus
acceptsaccepted
dropped must be calculateddropped is reported directly
reading + writingcurrent
waitingidle
active (includes “waiting” states)active (excludes “idle” states)
requeststotal
+ +**Metric to alert on: Dropped connections** + +The number of connections that have been dropped is equal to the difference between accepts and handled (NGINX) or is exposed directly as a standard metric (NGINX Plus). Under normal circumstances, dropped connections should be zero. If your rate of dropped connections per unit time starts to rise, look for possible resource saturation. + +![Dropped connections](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/dropped_connections.png) + +**Metric to alert on: Requests per second** + +Sampling your request data (**requests** in open-source, or **total** in Plus) with a fixed time interval provides you with the number of requests you’re receiving per unit of time—often minutes or seconds. Monitoring this metric can alert you to spikes in incoming web traffic, whether legitimate or nefarious, or sudden drops, which are usually indicative of problems. A drastic change in requests per second can alert you to problems brewing somewhere in your environment, even if it cannot tell you exactly where those problems lie. Note that all requests are counted the same, regardless of their URLs. + +![Requests per second](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/requests_per_sec.png) + +**Collecting activity metrics** + +Open-source NGINX exposes these basic server metrics on a simple status page. Because the status information is displayed in a standardized form, virtually any graphing or monitoring tool can be configured to parse the relevant data for analysis, visualization, or alerting. NGINX Plus provides a JSON feed with much richer data. Read the companion post on [NGINX metrics collection][6] for instructions on enabling metrics collection. + +#### Error metrics #### + +注:表格 + +++++ + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionMetric typeAvailability
4xx codesCount of client errorsWork: ErrorsNGINX logs, NGINX Plus
5xx codesCount of server errorsWork: ErrorsNGINX logs, NGINX Plus
+ +NGINX error metrics tell you how often your servers are returning errors instead of producing useful work. Client errors are represented by 4xx status codes, server errors with 5xx status codes. + +**Metric to alert on: Server error rate** + +Your server error rate is equal to the number of 5xx errors divided by the total number of [status codes][7] (1xx, 2xx, 3xx, 4xx, 5xx), per unit of time (often one to five minutes). If your error rate starts to climb over time, investigation may be in order. If it spikes suddenly, urgent action may be required, as clients are likely to report errors to the end user. + +![Server error rate](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/5xx_rate.png) + +A note on client errors: while it is tempting to monitor 4xx, there is limited information you can derive from that metric since it measures client behavior without offering any insight into particular URLs. In other words, a change in 4xx could be noise, e.g. web scanners blindly looking for vulnerabilities. + +**Collecting error metrics** + +Although open-source NGINX does not make error rates immediately available for monitoring, there are at least two ways to capture that information: + +- Use the expanded status module available with commercially supported NGINX Plus +- Configure NGINX’s log module to write response codes in access logs + +Read the companion post on NGINX metrics collection for detailed instructions on both approaches. + +#### Performance metrics #### + +注:表格 + +++++ + + + + + + + + + + + + + + + + +
NameDescriptionMetric typeAvailability
request timeTime to process each request, in secondsWork: PerformanceNGINX logs
+ +**Metric to alert on: Request processing time** + +The request time metric logged by NGINX records the processing time for each request, from the reading of the first client bytes to fulfilling the request. Long response times can point to problems upstream. + +**Collecting processing time metrics** + +NGINX and NGINX Plus users can capture data on processing time by adding the $request_time variable to the access log format. More details on configuring logs for monitoring are available in our companion post on [NGINX metrics collection][8]. + +#### Reverse proxy metrics #### + +注:表格 + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionMetric typeAvailability
Active connections by upstream serverCurrently active client connectionsResource: UtilizationNGINX Plus
5xx codes by upstream serverServer errorsWork: ErrorsNGINX Plus
Available servers per upstream groupServers passing health checksResource: AvailabilityNGINX Plus
+ +One of the most common ways to use NGINX is as a [reverse proxy][9]. The commercially supported NGINX Plus exposes a large number of metrics about backend (or “upstream”) servers, which are relevant to a reverse proxy setup. This section highlights a few of the key upstream metrics that are available to users of NGINX Plus. + +NGINX Plus segments its upstream metrics first by group, and then by individual server. So if, for example, your reverse proxy is distributing requests to five upstream web servers, you can see at a glance whether any of those individual servers is overburdened, and also whether you have enough healthy servers in the upstream group to ensure good response times. + +**Activity metrics** + +The number of **active connections per upstream server** can help you verify that your reverse proxy is properly distributing work across your server group. If you are using NGINX as a load balancer, significant deviations in the number of connections handled by any one server can indicate that the server is struggling to process requests in a timely manner or that the load-balancing method (e.g., [round-robin or IP hashing][10]) you have configured is not optimal for your traffic patterns + +**Error metrics** + +Recall from the error metric section above that 5xx (server error) codes are a valuable metric to monitor, particularly as a share of total response codes. NGINX Plus allows you to easily extract the number of **5xx codes per upstream server**, as well as the total number of responses, to determine that particular server’s error rate. + +**Availability metrics** + +For another view of the health of your web servers, NGINX also makes it simple to monitor the health of your upstream groups via the total number of **servers currently available within each group**. In a large reverse proxy setup, you may not care very much about the current state of any one server, just as long as your pool of available servers is capable of handling the load. But monitoring the total number of servers that are up within each upstream group can provide a very high-level view of the aggregate health of your web servers. + +**Collecting upstream metrics** + +NGINX Plus upstream metrics are exposed on the internal NGINX Plus monitoring dashboard, and are also available via a JSON interface that can serve up metrics into virtually any external monitoring platform. See examples in our companion post on [collecting NGINX metrics][11]. + +### Conclusion ### + +In this post we’ve touched on some of the most useful metrics you can monitor to keep tabs on your NGINX servers. If you are just getting started with NGINX, monitoring most or all of the metrics in the list below will provide good visibility into the health and activity levels of your web infrastructure: + +- [Dropped connections][12] +- [Requests per second][13] +- [Server error rate][14] +- [Request processing time][15] + +Eventually you will recognize additional, more specialized metrics that are particularly relevant to your own infrastructure and use cases. Of course, what you monitor will depend on the tools you have and the metrics available to you. See the companion post for [step-by-step instructions on metric collection][16], whether you use NGINX or NGINX Plus. + +At Datadog, we have built integrations with both NGINX and NGINX Plus so that you can begin collecting and monitoring metrics from all your web servers with a minimum of setup. Learn how to monitor NGINX with Datadog [in this post][17], and get started right away with [a free trial of Datadog][18]. + +### Acknowledgments ### + +Many thanks to the NGINX team for reviewing this article prior to publication and providing important feedback and clarifications. + +---------- + +Source Markdown for this post is available [on GitHub][19]. Questions, corrections, additions, etc.? Please [let us know][20]. + +-------------------------------------------------------------------------------- + +via: https://www.datadoghq.com/blog/how-to-monitor-nginx/ + +作者:K Young +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://nginx.org/en/ +[2]:http://nginx.com/resources/glossary/reverse-proxy-server/ +[3]:https://www.datadoghq.com/blog/monitoring-101-collecting-data/ +[4]:http://nginx.org/en/docs/ngx_core_module.html#worker_connections +[5]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#active-state +[6]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[7]:http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html +[8]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[9]:https://en.wikipedia.org/wiki/Reverse_proxy +[10]:http://nginx.com/blog/load-balancing-with-nginx-plus/ +[11]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[12]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#dropped-connections +[13]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#requests-per-second +[14]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#server-error-rate +[15]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#request-processing-time +[16]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[17]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ +[18]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#sign-up +[19]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_monitor_nginx.md +[20]:https://github.com/DataDog/the-monitor/issues \ No newline at end of file From 6409911c6756b4acfdccc618073b68835bbba5d2 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 17 Jul 2015 16:58:56 +0800 Subject: [PATCH 1421/2517] Translating by ZTinoZ --- ...709 7 command line tools for monitoring your Linux system.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md index fe82ef6436..a48f8498e8 100644 --- a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md +++ b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md @@ -30,7 +30,7 @@ ### Vmstat ### -Vmstat is a simpler tool for monitoring your Linux system performance statistics but that makes it highly suitable for use in shell scripts. Fire up your regex-fu and you can do some amazing things with vmstat and cron jobs. “The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay. The process and memory reports are instantaneous in either case” (go [here][7] for more info.). +Vmstat是一款监控Linux系统性能数据的简易工具,这让它在shell脚本中使用更合适。打开你的regex-fu,用vmstat和cron作业来做一些激动人心的事情吧。“产出的第一份报告给出的是上一次系统重启之后的均值,另外其一份报告给出的则是从前一个报告起间隔周期中的信息。进程和内存报告在任何情况下都是不停更新的”(猛戳[这里][7]获取更多信息)。 ![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-6-100591905-orig.png) From d9142adb7be64eaacea4a868c21d80b551d7ba8b Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Fri, 17 Jul 2015 17:03:05 +0800 Subject: [PATCH 1422/2517] [translating] 20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md --- ...717 Howto Configure FTP Server with Proftpd on Fedora 22.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md b/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md index f87bcd7745..416696bc91 100644 --- a/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md +++ b/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md @@ -1,3 +1,4 @@ +zpl1025 Howto Configure FTP Server with Proftpd on Fedora 22 ================================================================================ In this article, we'll learn about setting up an FTP server with Proftpd running Fedora 22 in our machine or server. [ProFTPD][1] is a free and open source FTP daemon software licensed under GPL. It is among most popular FTP server among machines running Linux. Its primary design aims to have an FTP server with many advanced features and provisioning users for more configuration options for easy customization. It includes a number of configuration options that are still not available with many other FTP daemons. It was initially developed by the developers as an alternative with better security and configuration to wu-ftpd server. An FTP server is a program that allows us to upload or download files and folders from a remote server where it is setup using an FTP client. Some of the features of ProFTPD daemon are as follows, you can check more features on [http://www.proftpd.org/features.html][2] . @@ -184,4 +185,4 @@ via: http://linoxide.com/linux-how-to/configure-ftp-proftpd-fedora-22/ [a]:http://linoxide.com/author/arunp/ [1]:http://www.proftpd.org/ -[2]:http://www.proftpd.org/features.html \ No newline at end of file +[2]:http://www.proftpd.org/features.html From 96b6d89ca66a8a2b7a5fdb7944e0f12ce4fd1929 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 17 Jul 2015 19:53:07 +0800 Subject: [PATCH 1423/2517] Update 20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md --- ...ssroads) Load Balancer for Web Servers on RHEL or CentOS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md b/sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md index 6aba5e897e..13312b6272 100644 --- a/sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md +++ b/sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Setting Up ‘XR’ (Crossroads) Load Balancer for Web Servers on RHEL/CentOS ================================================================================ Crossroads is a service independent, open source load balance and fail-over utility for Linux and TCP based services. It can be used for HTTP, HTTPS, SSH, SMTP and DNS etc. It is also a multi-threaded utility which consumes only one memory space which leads to increase the performance when balancing load. @@ -156,4 +157,4 @@ via: http://www.tecmint.com/setting-up-xr-crossroads-load-balancer-for-web-serve [1]:https://crossroads.e-tunity.com/ [2]:http://www.tecmint.com/python-simplehttpserver-to-create-webserver-or-serve-files-instantly/ [3]:http://www.tecmint.com/vi-editor-usage/ -[4]:https://crossroads.e-tunity.com/ \ No newline at end of file +[4]:https://crossroads.e-tunity.com/ From eb2f46d725c4993d208ef570dfcb202aa1c7f722 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 17 Jul 2015 19:57:09 +0800 Subject: [PATCH 1424/2517] Update 20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md --- ...ssroads) Load Balancer for Web Servers on RHEL or CentOS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md b/sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md index 6aba5e897e..13312b6272 100644 --- a/sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md +++ b/sources/tech/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Setting Up ‘XR’ (Crossroads) Load Balancer for Web Servers on RHEL/CentOS ================================================================================ Crossroads is a service independent, open source load balance and fail-over utility for Linux and TCP based services. It can be used for HTTP, HTTPS, SSH, SMTP and DNS etc. It is also a multi-threaded utility which consumes only one memory space which leads to increase the performance when balancing load. @@ -156,4 +157,4 @@ via: http://www.tecmint.com/setting-up-xr-crossroads-load-balancer-for-web-serve [1]:https://crossroads.e-tunity.com/ [2]:http://www.tecmint.com/python-simplehttpserver-to-create-webserver-or-serve-files-instantly/ [3]:http://www.tecmint.com/vi-editor-usage/ -[4]:https://crossroads.e-tunity.com/ \ No newline at end of file +[4]:https://crossroads.e-tunity.com/ From 66b9b3b917931400670604532db3de5d3035c2c0 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 17 Jul 2015 21:30:01 +0800 Subject: [PATCH 1425/2517] PUB:20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions @KevinSJ --- ...Color ANSI Logos of Linux Distributions.md | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) rename {translated/tech => published}/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md (72%) diff --git a/translated/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md b/published/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md similarity index 72% rename from translated/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md rename to published/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md index e9a27aff00..8c17cc4f64 100644 --- a/translated/tech/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md +++ b/published/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md @@ -1,23 +1,22 @@ Linux_Logo – 输出彩色 ANSI Linux 发行版徽标的命令行工具 ================================================================================ -linuxlogo 或 linux_logo 是一款在Linux命令行下生成附带系统信息的彩色 ANSI 发行版徽标的工具。 - +linuxlogo(或叫 linux_logo)是一款在Linux命令行下用彩色 ANSI 代码生成附带有系统信息的发行版徽标的工具。 ![Linux_Logo – 输出彩色 ANSI Linux 发行版徽标](http://www.tecmint.com/wp-content/uploads/2015/06/Linux_Logo.png) -Linux_Logo – 输出彩色 ANSI Linux 发行版徽标 +*Linux_Logo – 输出彩色 ANSI Linux 发行版徽标* -这个小工具可以从 /proc 文件系统中获取系统信息并可以显示包括主机发行版在内的其他很多发行版的徽标。 +这个小工具可以从 /proc 文件系统中获取系统信息并可以显示包括主机上安装的发行版在内的很多发行版的徽标。 -与徽标一同显示的系统信息包括 – Linux 内核版本,最近一次编译Linux内核的时间,处理器/核心数量,速度,制造商,以及哪一代处理器。它还能显示总共的物理内存大小。 +与徽标一同显示的系统信息包括 : Linux 内核版本,最近一次编译Linux内核的时间,处理器/核心数量,速度,制造商,以及哪一代处理器。它还能显示总共的物理内存大小。 -值得一提的是,screenfetch是一个拥有类似功能的工具,它也能显示发行版徽标,同时还提供更加详细美观的系统信息。我们之前已经介绍过这个工具,你可以参考一下链接: -- [ScreenFetch – Generates Linux System Information][1] +无独有偶,screenfetch是一个拥有类似功能的工具,它也能显示发行版徽标,同时还提供更加详细美观的系统信息。我们之前已经介绍过这个工具,你可以参考一下链接: +- [screenFetch: 命令行信息截图工具][1] -linux_logo 和 Screenfetch 并不能相提并论。尽管 screenfetch 的输出较为整洁并提供更多细节, linux_logo 则提供了更多的彩色 ANSI 图标, 并且提供了格式化输出的选项。 +linux\_logo 和 Screenfetch 并完全一样。尽管 screenfetch 的输出较为整洁并提供更多细节, 但 linux\_logo 则提供了更多的彩色 ANSI 图标, 并且提供了格式化输出的选项。 -linux_logo 主要使用C语言编写并将 linux 徽标呈现在 X 窗口系统中因此需要安装图形界面 X11 或 X 系统。这个软件使用GNU 2.0协议。 +linux\_logo 主要使用C语言编写并将 linux 徽标呈现在 X 窗口系统中因此需要安装图形界面 X11 或 X 系统(LCTT 译注:此处应是错误的。按说不需要任何图形界面支持,并且译者从其官方站 http://www.deater.net/weave/vmwprod/linux_logo 也没找到任何相关 X11的信息)。这个软件使用GNU 2.0协议。 本文中,我们将使用以下环境测试 linux_logo 工具。 @@ -26,7 +25,7 @@ linux_logo 主要使用C语言编写并将 linux 徽标呈现在 X 窗口系统 ### 在 Linux 中安装 Linux Logo工具 ### -**1. linuxlogo软件包 ( 5.11 稳定版) 可通过如下方式使用 apt, yum,或 dnf 在所有发行版中使用默认的软件仓库进行安装** +**1. linuxlogo软件包 ( 5.11 稳定版) 可通过如下方式使用 apt, yum 或 dnf 在所有发行版中使用默认的软件仓库进行安装** # apt-get install linux_logo [用于基于 Apt 的系统] (译者注:Ubuntu中,该软件包名为linuxlogo) # yum install linux_logo [用于基于 Yum 的系统] @@ -42,7 +41,7 @@ linux_logo 主要使用C语言编写并将 linux 徽标呈现在 X 窗口系统 ![获取默认系统徽标](http://www.tecmint.com/wp-content/uploads/2015/06/Get-Default-OS-Logo.png) -获取默认系统徽标 +*获取默认系统徽标* **3. 使用 `[-a]` 选项可以输出没有颜色的徽标。当在黑白终端里使用 linux_logo 时,这个选项会很有用。** @@ -50,7 +49,7 @@ linux_logo 主要使用C语言编写并将 linux 徽标呈现在 X 窗口系统 ![黑白 Linux 徽标](http://www.tecmint.com/wp-content/uploads/2015/06/Black-and-White-Linux-Logo.png) -黑白 Linux 徽标 +*黑白 Linux 徽标* **4. 使用 `[-l]` 选项可以仅输出徽标而不包含系统信息。** @@ -58,7 +57,7 @@ linux_logo 主要使用C语言编写并将 linux 徽标呈现在 X 窗口系统 ![输出发行版徽标](http://www.tecmint.com/wp-content/uploads/2015/06/Print-Distribution-Logo.png) -输出发行版徽标 +*输出发行版徽标* **5. `[-u]` 选项可以显示系统运行时间。** @@ -66,7 +65,7 @@ linux_logo 主要使用C语言编写并将 linux 徽标呈现在 X 窗口系统 ![输出系统运行时间](http://www.tecmint.com/wp-content/uploads/2015/06/Print-System-Uptime.png) -输出系统运行时间 +*输出系统运行时间* **6. 如果你对系统平均负载感兴趣,可以使用 `[-y]` 选项。你可以同时使用多个选项。** @@ -74,7 +73,7 @@ linux_logo 主要使用C语言编写并将 linux 徽标呈现在 X 窗口系统 ![输出系统平均负载](http://www.tecmint.com/wp-content/uploads/2015/06/Print-System-Load-Average.png) -输出系统平均负载 +*输出系统平均负载* 如需查看更多选项并获取相关帮助,你可以使用如下命令。 @@ -82,7 +81,7 @@ linux_logo 主要使用C语言编写并将 linux 徽标呈现在 X 窗口系统 ![Linuxlogo 选项及帮助](http://www.tecmint.com/wp-content/uploads/2015/06/linuxlogo-options.png) -Linuxlogo选项及帮助 +*Linuxlogo选项及帮助* **7. 此工具内置了很多不同发行版的徽标。你可以使用 `[-L list]` 选项查看在这些徽标的列表。** @@ -90,7 +89,7 @@ Linuxlogo选项及帮助 ![Linux 徽标列表](http://www.tecmint.com/wp-content/uploads/2015/06/List-of-Linux-Logos.png) -Linux 徽标列表 +*Linux 徽标列表* 如果你想输出这个列表中的任意徽标,可以使用 `-L NUM` 或 `-L NAME` 来显示想要选中的图标。 @@ -105,7 +104,7 @@ Linux 徽标列表 ![输出 AIX 图标](http://www.tecmint.com/wp-content/uploads/2015/06/Print-AIX-Logo.png) -输出 AIX 图标 +*输出 AIX 图标* **注**: 命令中的使用 `-L 1` 是因为 AIX 徽标在列表中的编号是1,而使用 `-L aix` 则是因为 AIX 徽标在列表中的名称为 aix @@ -116,13 +115,13 @@ Linux 徽标列表 ![各种 Linux 徽标](http://www.tecmint.com/wp-content/uploads/2015/06/Various-Linux-Logos.png) -各种 Linux 徽标 +*各种 Linux 徽标* -你可以通过徽标对应的编号或名字使用任意徽标 +你可以通过徽标对应的编号或名字使用任意徽标。 ### 一些使用 Linux_logo 的建议和提示### -**8. 你可以在登录界面输出你的 Linux 发行版徽标。要输出默认徽标,你可以在 ` ~/.bashrc`` 文件的最后添加以下内容。** +**8. 你可以在登录界面输出你的 Linux 发行版徽标。要输出默认徽标,你可以在 ` ~/.bashrc` 文件的最后添加以下内容。** if [ -f /usr/bin/linux_logo ]; then linux_logo; fi @@ -132,15 +131,15 @@ Linux 徽标列表 ![Print Logo on User Login](http://www.tecmint.com/wp-content/uploads/2015/06/Print-Logo-on-Login.png) -在用户登录时输出徽标 +*在用户登录时输出徽标* -其实你也可以在登录后输出任意图标,只需加入以下内容 +其实你也可以在登录后输出任意图标,只需加入以下内容: if [ -f /usr/bin/linux_logo ]; then linux_logo -L num; fi **重要**: 不要忘了将 num 替换成你想使用的图标。 -**10. You can also print your own logo by simply specifying the location of the logo as shown below.** +**10. 你也能直接指定徽标所在的位置来显示你自己的徽标。** # linux_logo -D /path/to/ASCII/logo @@ -152,12 +151,11 @@ Linux 徽标列表 # /usr/local/bin/linux_logo -a > /etc/issue.net -**12. 创建一个 Penguin 端口 - 用于回应连接的端口。要创建 Penguin 端口, 则需在 /etc/services 文件中加入以下内容 ** +**12. 创建一个 Linux 上的端口 - 用于回应连接的端口。要创建 Linux 端口, 则需在 /etc/services 文件中加入以下内容** penguin 4444/tcp penguin -这里的 `4444` 是一个未被任何其他资源使用的空闲端口。你也可以使用其他端口。 -你还需要在 /etc/inetd.conf中加入以下内容 +这里的 `4444` 是一个未被任何其他资源使用的空闲端口。你也可以使用其他端口。你还需要在 /etc/inetd.conf中加入以下内容: penguin stream tcp nowait root /usr/local/bin/linux_logo @@ -165,6 +163,8 @@ Linux 徽标列表 # killall -HUP inetd +(LCTT 译注:然后你就可以远程或本地连接到这个端口,并显示这个徽标了。) + linux_logo 还可以用做启动脚本来愚弄攻击者或对你朋友使用恶作剧。这是一个我经常在我的脚本中用来获取不同发行版输出的好工具。 试过一次后,你就不会忘记的。让我们知道你对这个工具的想法及它对你的作用吧。 不要忘记给评论、点赞或分享! @@ -174,10 +174,10 @@ linux_logo 还可以用做启动脚本来愚弄攻击者或对你朋友使用恶 via: http://www.tecmint.com/linux_logo-tool-to-print-color-ansi-logos-of-linux/ 作者:[Avishek Kumar][a] -译者:[KevSJ](https://github.com/KevSJ) -校对:[校对者ID](https://github.com/校对者ID) +译者:[KevinSJ](https://github.com/KevinSJ) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/screenfetch-system-information-generator-for-linux/ +[1]:https://linux.cn/article-1947-1.html From 602ecb30a86953eccf9c4e0330a7f8518f54bdc7 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 17 Jul 2015 21:30:14 +0800 Subject: [PATCH 1426/2517] =?UTF-8?q?=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Why is the ibdata1 file continuously growing in MySQL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/published/20150709 Why is the ibdata1 file continuously growing in MySQL.md b/published/20150709 Why is the ibdata1 file continuously growing in MySQL.md index af798b387a..64f74aecb0 100644 --- a/published/20150709 Why is the ibdata1 file continuously growing in MySQL.md +++ b/published/20150709 Why is the ibdata1 file continuously growing in MySQL.md @@ -6,7 +6,7 @@ 当监控服务器发送一个关于 MySQL 服务器存储的报警时,恐慌就开始了 —— 就是说磁盘快要满了。 -一番调查后你意识到大多数地盘空间被 InnoDB 的共享表空间 ibdata1 使用。而你已经启用了 [innodb_file_per_table][2],所以问题是: +一番调查后你意识到大多数地盘空间被 InnoDB 的共享表空间 ibdata1 使用。而你已经启用了 [innodb\_file\_per\_table][2],所以问题是: ### ibdata1存了什么? ### @@ -17,7 +17,7 @@ - 双写缓冲区 - 撤销日志 -其中的一些在 [Percona 服务器][3]上可以被配置来避免增长过大的。例如你可以通过 [innodb_ibuf_max_size][4] 设置最大变更缓冲区,或设置 [innodb_doublewrite_file][5] 来将双写缓冲区存储到一个分离的文件。 +其中的一些在 [Percona 服务器][3]上可以被配置来避免增长过大的。例如你可以通过 [innodb\_ibuf\_max\_size][4] 设置最大变更缓冲区,或设置 [innodb\_doublewrite\_file][5] 来将双写缓冲区存储到一个分离的文件。 MySQL 5.6 版中你也可以创建外部的撤销表空间,所以它们可以放到自己的文件来替代存储到 ibdata1。可以看看这个[文档][6]。 @@ -82,7 +82,7 @@ MySQL 5.6 版中你也可以创建外部的撤销表空间,所以它们可以 没有,目前还没有一个容易并且快速的方法。InnoDB 表空间从不收缩...参见[10 年之久的漏洞报告][10],最新更新自詹姆斯·戴(谢谢): -当你删除一些行,这个页被标为已删除稍后重用,但是这个空间从不会被回收。唯一的方法是使用新的 ibdata1 启动数据库。要做这个你应该需要使用 mysqldump 做一个逻辑全备份,然后停止 MySQL 并删除所有数据库、ib_logfile*、ibdata1* 文件。当你再启动 MySQL 的时候将会创建一个新的共享表空间。然后恢复逻辑备份。 +当你删除一些行,这个页被标为已删除稍后重用,但是这个空间从不会被回收。唯一的方法是使用新的 ibdata1 启动数据库。要做这个你应该需要使用 mysqldump 做一个逻辑全备份,然后停止 MySQL 并删除所有数据库、ib_logfile\*、ibdata1\* 文件。当你再启动 MySQL 的时候将会创建一个新的共享表空间。然后恢复逻辑备份。 ### 总结 ### From e15e363bb1a19ae1f1562babf87ca496e3140382 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 18 Jul 2015 13:15:35 +0800 Subject: [PATCH 1427/2517] Update 20150716 4 CCleaner Alternatives For Ubuntu Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译这篇文章。 --- .../20150716 4 CCleaner Alternatives For Ubuntu Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150716 4 CCleaner Alternatives For Ubuntu Linux.md b/sources/share/20150716 4 CCleaner Alternatives For Ubuntu Linux.md index 75d5af190c..1246e7af1c 100644 --- a/sources/share/20150716 4 CCleaner Alternatives For Ubuntu Linux.md +++ b/sources/share/20150716 4 CCleaner Alternatives For Ubuntu Linux.md @@ -1,3 +1,5 @@ +FSSlc translating + 4 CCleaner Alternatives For Ubuntu Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/ccleaner-10-700x393.jpg) @@ -115,4 +117,4 @@ via: http://itsfoss.com/ccleaner-alternatives-ubuntu-linux/ [5]:https://www.kde.org/applications/utilities/ [6]:http://ubuntu-tweak.com/ [7]:http://ubuntu-tweak.com/ -[8]:https://quassy.github.io/elementary-apps/GCleaner/ \ No newline at end of file +[8]:https://quassy.github.io/elementary-apps/GCleaner/ From 81a2a43246ce5d4e3b4c7aa884eb43b42677277e Mon Sep 17 00:00:00 2001 From: XLCYun Date: Sat, 18 Jul 2015 13:25:08 +0800 Subject: [PATCH 1428/2517] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=96=87?= =?UTF-8?q?=20Syncthing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除原文 20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md --- ...Sync Files or Folders Between Computers.md | 208 ------------------ 1 file changed, 208 deletions(-) delete mode 100644 sources/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md diff --git a/sources/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md b/sources/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md deleted file mode 100644 index b3bca3d3db..0000000000 --- a/sources/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md +++ /dev/null @@ -1,208 +0,0 @@ -XLCYun translating. -Syncthing: A Private, And Secure Tool To Sync Files/Folders Between Computers -================================================================================ -### Introduction ### - -**Syncthing** is a free, Open Source tool that can be used to sync files/folders between your networked computers. Unlike other sync tools, such as **BitTorrent Sync** or **Dropbox**, Syncthing transfers data directly from one system to another system, and It is completely open source, secure and private. All of your precious data will be stored in your system so that you can have full control over your files and folders, and none of them are stored in any third party systems. Also, you deserve to choose where it is stored, if it is shared with some third party and how it’s transmitted over the Internet. - -All communication is encrypted using TLS, so your data is very secure from the prying eyes. Syncthing has a responsive and powerful WebGUI which will help the users to easily add, delete and manage directories to be synced over network. Using Syncthing, you can sync multiple folders to multiple systems at a time. Syncthing is very simple, portable, yet powerful tool in terms of installation and usage. Since all files/folders are directly transferred from one computer to another computer, you don’t have to worry about purchasing extra space from your Cloud provider. All you need is very stable LAN/WAN connection and enough disk space on your systems. It supports all modern operating systems, including GNU/Linux, Windows, Mac OS X, and ofcourse Android. - -### Installation ### - -For the purpose of this tutorial, We will be using two systems, one is running with Ubuntu 14.04 LTS, and another one is running with Ubuntu 14.10 server. To easily recognize these two systems, we will be calling them using names **system1**, and **system2**. - -### System1 Details: ### - -- **OS**: Ubuntu 14.04 LTS server; -- **Hostname**: server1.unixmen.local; -- **IP Address**: 192.168.1.150. -- **System user**: sk (You can use your own) -- **Sync Directory**: /home/Sync/ (Will be created by default by Syncthing) - -### System2 Details: ### - -- **OS**: Ubuntu 14.10 server; -- **Hostname**: server.unixmen.local; -- **IP Address**: 192.168.1.151. -- **System user**: sk (You can use your own) -- **Sync Directory**: /home/Sync/ (Will be created by default by Syncthing) - -### Creating User For Syncthing On System 1 & System2: ### - -Run the following commands on both system to create the user for Syncthing and the directory to be synced between two systems: - - sudo useradd sk - sudo passwd sk - -### Install Syncthing On System1 And System2: ### - -You should do the following steps on both System 1 and System 2. - -Download the latest version from the [official download page][1]. As I am using 64bit system, I downloaded the 6bbit package. - - wget https://github.com/syncthing/syncthing/releases/download/v0.10.20/syncthing-linux-amd64-v0.10.20.tar.gz - -Extract the download file: - - tar xzvf syncthing-linux-amd64-v0.10.20.tar.gz - -Cd to the extracted folder: - - cd syncthing-linux-amd64-v0.10.20/ - -Copy the excutable file “syncthing” to **$PATH**: - - sudo cp syncthing /usr/local/bin/ - -Now, run the following command to run the syncthing for the first time. - - syncthing - -When you run the above command, syncthing will generate a configuration and some keys and then start the admin GUI in your browser. You should see something like below. - -Sample output: - - [monitor] 15:40:27 INFO: Starting syncthing - 15:40:27 INFO: Generating RSA key and certificate for syncthing... - [BQXVO] 15:40:34 INFO: syncthing v0.10.20 (go1.4 linux-386 default) unknown-user@syncthing-builder 2015-01-13 16:27:47 UTC - [BQXVO] 15:40:34 INFO: My ID: BQXVO3D-VEBIDRE-MVMMGJI-ECD2PC3-T5LT3JB-OK4Z45E-MPIDWHI-IRW3NAZ - [BQXVO] 15:40:34 INFO: No config file; starting with empty defaults - [BQXVO] 15:40:34 INFO: Edit /home/sk/.config/syncthing/config.xml to taste or use the GUI - [BQXVO] 15:40:34 INFO: Starting web GUI on http://127.0.0.1:8080/ - [BQXVO] 15:40:34 INFO: Loading HTTPS certificate: open /home/sk/.config/syncthing/https-cert.pem: no such file or directory - [BQXVO] 15:40:34 INFO: Creating new HTTPS certificate - [BQXVO] 15:40:34 INFO: Generating RSA key and certificate for server1... - [BQXVO] 15:41:01 INFO: Starting UPnP discovery... - [BQXVO] 15:41:07 INFO: Starting local discovery announcements - [BQXVO] 15:41:07 INFO: Starting global discovery announcements - [BQXVO] 15:41:07 OK: Ready to synchronize default (read-write) - [BQXVO] 15:41:07 INFO: Device BQXVO3D-VEBIDRE-MVMMGJI-ECD2PC3-T5LT3JB-OK4Z45E-MPIDWHI-IRW3NAZ is "server1" at [dynamic] - [BQXVO] 15:41:07 INFO: Completed initial scan (rw) of folder default - -Syncthing has been successfully initialized, and the Web admin interface can be accessed using URL: **http://localhost:8080** from your browser. As you see in the above output, syncthing has automatically created a folder called **default** for you, in a directory called **Sync** in your **home** directory. - -By default, Syncthing WebGUI will only be accessed from the localhost itself. To access the WebGUI from the remote systems, you need to do the following changes on both systems. - -First, stop the Syncthing initialization process by pressing the CTRL+C. Now, you will be returned back to the Terminal. - -Edit file **config.xml**, - - sudo nano ~/.config/syncthing/config.xml - -Find this directive: - - [...] - -
127.0.0.1:8080
- -Su9v0lW80JWybGjK9vNK00YDraxXHGP -
- [...] - -In the **
** field, change **127.0.0.1:8080** to **0.0.0.0:8080**. So, your config.xml will look like below. - - -
0.0.0.0:8080
- -Su9v0lW80JWybGjK9vNK00YDraxXHGP -
- -Save and close the file. - -Now, start again the Syncthing initialization on both systems by entering the following command: - - syncthing - -### Access the WebGUI ### - -Now, open your browser **http://ip-address:8080/**. You will see the following screen, - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Syncthing-server1-Mozilla-Firefox_001.png) - -The WebGUI has two panes. In the left pane, you may see the list of folders to be synced. As I mentioned before, the folder **default** has been automatically created for you while initializing Syncthing. If you want to sync more folders, you can add using **Add Folder** button. - -In the right pane, you see the number of devices connected. Currently there is only one device, the computer you are running this on. - -### Configure Syncthing Web GUI ### - -For the security enhancement, let us enable TLS, and setup administrative user and password to access the WebGUI. To od that, click on the gear button and select **Settings** on the top right corner. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Menu_002.png) - -Enter the admin username/password. In my case it is admin/ubuntu. You should use some strong password. And, check the box that says: **Use HTTPS for GUI**. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Syncthing-server1-Mozilla-Firefox_004.png) - -Click Save button. Now, you’ll be asked to restart the Syncthing to activate the changes. Click Restart. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Selection_005.png) - -Selection_005Refresh you web browser. You’ll see the SSL warning like below. Click on the button that says: **I understand the Risks**. And, click Add Exception button to add this page to the browser trusted lists. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Untrusted-Connection-Mozilla-Firefox_006.png) - -Enter the administrative user and password which we configured in the previous steps. In my case it’s **admin/ubuntu**. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Authentication-Required_007.png) - -We have secured the WebGUI now. Don’t forget to do the same steps on both server. - -### Connect Servers To Each Other ### - -To sync folders between systems, you must told them about each other. This is accomplished by exchanging “device IDs”. You can find it in the web GUI by selecting the “gear menu” (top right) and “Show ID”. - -For example, here is my System 1 ID. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Syncthing-server1-Mozilla-Firefox_008.png) - -Copy the ID, and go to the another system (system 2) WebGUI. From the second system (system 2) WebGUI window, click on the Add Device on the right side. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_010.png) - -The following screen should appear. Paste the **System 1 ID** in the Device section. Enter the Device name(optional). In the Addresses field, you can either enter the IP address of the other system or leave it as default. The default value is **dynamic**. Finally, select the folder to be synced. In our case, the sync folder is **default**. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_009.png) - -Once you done, click on the save button. You’ll be asked to restart the Syncthing. Click Restart button to activate the changes. - -Now, go to the **System 1** WebUI, you’ll see a request has been sent from the System 2 to connect and sync. Click **Add** button. Now, the System 2 will ask the System 1 to share and sync the folder called “default”. Click **Share** button. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Selection_013.png) - -Next restart the Syncthing service on the System 1 to activate the changes. - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Selection_014.png) - -Wait for few seconds, approximately 60 seconds, and you’ll see the two systems have been successfully connected and synced to each other. - -You can verify it under the Add Device section of the WebGUI. - -System 1 WebGUI console after adding System 2: - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_016.png) - -System 2 WebGUI console after adding System 1: - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_018.png) - -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_018.png) - -Now, put any file or folder in any one of the systems “**default**” folder. You may see the file/folder will be synced to the other system automatically. - -That’s it! Happy Sync’ing!! - -Cheers!!! - -- [Syncthing Website][2] - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/syncthing-private-secure-tool-sync-filesfolders-computers/ - -作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/sk/ -[1]:https://github.com/syncthing/syncthing/releases/tag/v0.10.20 -[2]:http://syncthing.net/ From 51d4bdd48c8d9471732228cbd927e81c031bc6bc Mon Sep 17 00:00:00 2001 From: XLCYun Date: Sat, 18 Jul 2015 13:28:23 +0800 Subject: [PATCH 1429/2517] Translated By XLCYun 20150121 Syncthing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md XLCYun 翻译完成. --- ...Sync Files or Folders Between Computers.md | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 translated/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md diff --git a/translated/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md b/translated/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md new file mode 100644 index 0000000000..8819c80744 --- /dev/null +++ b/translated/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md @@ -0,0 +1,206 @@ +Syncthing: 一个跨计算机的私人的文件/文件夹安全同步工具 +================================================================================ +### 简介 ### + +**Syncthing** 是一个免费开源的工具,它能在你的各个网络计算机间同步文件/文件夹。它不像其它的同步工具,如**BitTorrent Sync**和**Dropbox**那样,它的同步数据是直接从一个系统中直接传输到另一个系统的,并且它是完全开源的,安全且私有的。你所有的珍贵数据都会被存储在你的系统中,这样你就能对你的文件和文件夹拥有全面的控制权,没有任何的文件或文件夹会被存储在第三方系统中。此外,你有权决定这些数据该存于何处,是否要分享到第三方,或这些数据在互联网上的传输方式。 + +所有的信息通讯都使用TLS进行加密,这样你的数据便能十分安全地逃离窥探。Syncthing有一个强大的响应式的网页管理界面(WebGUI,下同),它能够帮助用户简便地添加,删除和管理那些通过网络进行同步的文件夹。通过使用Syncthing,你可以在多个系统上一次同步多个文件夹。在安装和使用上,Syncthing是一个可移植的,简单但强大的工具。即然文件或文件夹是从一部计算机中直接传输到另一计算机中的,那么你就无需考虑向云服务供应商支付金钱来获取额外的云空间。你所需要的仅仅是非常稳定的LAN/WAN连接和你的系统中足够的硬盘空间。它支持所有的现代操作系统,包括GNU/Linux, Windows, Mac OS X, 当然还有Android。 + +### 安装 ### + +基于本文的目的,我们将使用两个系统,一个是Ubuntu 14.04 LTS, 一个是Ubuntu 14.10 server。为了简单辨别这两个系统,我们将分别称其为**系统1**和**系统2**。 + +### 系统1细节: ### + +- **操作系统**: Ubuntu 14.04 LTS server; +- **主机名**: server1.unixmen.local; +- **IP地址**: 192.168.1.150. +- **系统用户**: sk (你可以使用你自己的系统用户) +- **同步文件夹**: /home/Sync/ (Syncthing会默认创建) + +### 系统2细节 ### + +- **操作系统**: Ubuntu 14.10 server; +- **主机名**: server.unixmen.local; +- **IP地址**: 192.168.1.151. +- **系统用户**: sk (你可以使用你自己的系统用户) +- **同步文件夹**: /home/Sync/ (Syncthing会默认创建) + +### 在系统1和系统2上为Syncthing创建用户 ### + +在两个系统上运行下面的命令来为Syncthing创建用户以及两系统间的同步文件夹。 + + sudo useradd sk + sudo passwd sk + +### 为系统1和系统2安装Syncthing ### + +在系统1和系统2上遵循以下步骤进行操作。 + +从[官方下载页][1]上下载最新版本。我使用的是64位版本,因此下载64位版的软件包。 + + wget https://github.com/syncthing/syncthing/releases/download/v0.10.20/syncthing-linux-amd64-v0.10.20.tar.gz + +解压缩下载的文件: + + tar xzvf syncthing-linux-amd64-v0.10.20.tar.gz + +切换到解压缩出来的文件夹: + + cd syncthing-linux-amd64-v0.10.20/ + +复制可执行文件"Syncthing"到**$PATH**: + + sudo cp syncthing /usr/local/bin/ + +现在,执行下列命令来首次运行Syncthing: + + syncthing + +当你执行上述命令后,syncthing会生成一个配置以及一些关键值(keys),并且在你的浏览器上打开一个管理界面。, + +输入示例: + + [monitor] 15:40:27 INFO: Starting syncthing + 15:40:27 INFO: Generating RSA key and certificate for syncthing... + [BQXVO] 15:40:34 INFO: syncthing v0.10.20 (go1.4 linux-386 default) unknown-user@syncthing-builder 2015-01-13 16:27:47 UTC + [BQXVO] 15:40:34 INFO: My ID: BQXVO3D-VEBIDRE-MVMMGJI-ECD2PC3-T5LT3JB-OK4Z45E-MPIDWHI-IRW3NAZ + [BQXVO] 15:40:34 INFO: No config file; starting with empty defaults + [BQXVO] 15:40:34 INFO: Edit /home/sk/.config/syncthing/config.xml to taste or use the GUI + [BQXVO] 15:40:34 INFO: Starting web GUI on http://127.0.0.1:8080/ + [BQXVO] 15:40:34 INFO: Loading HTTPS certificate: open /home/sk/.config/syncthing/https-cert.pem: no such file or directory + [BQXVO] 15:40:34 INFO: Creating new HTTPS certificate + [BQXVO] 15:40:34 INFO: Generating RSA key and certificate for server1... + [BQXVO] 15:41:01 INFO: Starting UPnP discovery... + [BQXVO] 15:41:07 INFO: Starting local discovery announcements + [BQXVO] 15:41:07 INFO: Starting global discovery announcements + [BQXVO] 15:41:07 OK: Ready to synchronize default (read-write) + [BQXVO] 15:41:07 INFO: Device BQXVO3D-VEBIDRE-MVMMGJI-ECD2PC3-T5LT3JB-OK4Z45E-MPIDWHI-IRW3NAZ is "server1" at [dynamic] + [BQXVO] 15:41:07 INFO: Completed initial scan (rw) of folder default + +Syncthing已经被成功地初始化了,网页管理接口也可以通过浏览器在URL: **http://localhost:8080**进行访问了。如上面输入所看到的,Syncthing在你的**home**目录中的Sync目录**下自动为你创建了一个名为**default**的文件夹。 + +默认情况下,Syncthing的网页管理界面(WebGUI)只能在本地端口(localhost)中进行访问,你需要在两个系统中进行以下操作: + +首先,按下CTRL+C键来停止Syncthing初始化进程。现在你回到了终端界面。 + +编辑**config.xml**文件, + + sudo nano ~/.config/syncthing/config.xml + +找到下面的指令: + + [...] + +
127.0.0.1:8080
+ -Su9v0lW80JWybGjK9vNK00YDraxXHGP +
+ [...] + +在**
**区域中,把**127.0.0.1:8080**改为**0.0.0.0:8080**。结果,你的config.xml看起来会是这样的: + + +
0.0.0.0:8080
+ -Su9v0lW80JWybGjK9vNK00YDraxXHGP +
+ +保存并关闭文件。 + +在两个系统上再次执行下述命令: + + syncthing + +### 访问网页管理界面 ### + +现在,在你的浏览器上打开**http://ip-address:8080/**。你会看到下面的界面: + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server1-Mozilla-Firefox_001.png) +网页管理界面分为两个窗格,在左窗格中,你应该可以看到同步的文件夹列表。如前所述,文件夹**default**在你初始化Syncthing时被自动创建。如果你想同步更多文件夹,点击**Add Folder**按钮。 + +在右窗格中,你可以看到已连接的设备数。现在这里只有一个,就是你现在正在操作的计算机。 + +### 网页管理界面(WebGUI)上设置Syncthing ### + +为了提高安全性,让我们启用TLS,并且设置访问网页管理界面的管理员用户和密码。要做到这点,点击右上角的齿轮按钮,然后选择**Settings** + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Menu_002.png) + +输入管理员的帐户名/密码。我设置的是admin/Ubuntu。你可以使用一些更复杂的密码。 + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server1-Mozilla-Firefox_004.png) + +点击Save按钮,现在,你会被要求重启Syncthing使更改生效。点击Restart。 + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Selection_005.png) + +刷新你的网页浏览器。你可以看到一个像下面一样的SSL警告。点击显示**我了解风险(I understand the Risks)**的按钮。接着,点击“添加例外(Add Exception)“按钮把当前页面添加进浏览器的信任列表中。 + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Untrusted-Connection-Mozilla-Firefox_006.png) + +输入前面几步设置的管理员用户和密码。我设置的是**admin/ubuntu**。 + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Authentication-Required_007.png) + +现在,我们提高了网页管理界面的安全性。别忘了两个系统都要执行上面同样的步骤。 + +### 连接到其它服务器 ### + +要在各个系统之间同步文件,你必须各自告诉它们其它服务器的信息。这是通过交换设备IDs(device IDs)来实现的。你可以通过选择“齿轮菜单(gear menu)”(在右上角)中的”Show ID(显示ID)“来找到它。 + +例如,下面是我系统1的ID. + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server1-Mozilla-Firefox_008.png) + +复制这个ID,然后到另外一个系统(系统2)的网页管理界面,在右边窗格点击Add Device按钮。 + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_010.png) + +接着会出现下面的界面。在Device区域粘贴**系统1 ID **。输入设备名称(可选)。在地址区域,你可以输入其它系统(译者注:即粘贴的ID所属的系统,此应为系统1)的IP地址,或者使用默认值。默认值为**dynamic**。最后,选择要同步的文件夹。在我们的例子中,同步文件夹为**default**。 + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_009.png) + +一旦完成了,点击save按钮。你会被要求重启Syncthing。点击Restart按钮重启使更改生效。 + +现在,我们到**系统1**的网页管理界面,你会看到来自系统2的连接和同步请求。点击**Add**按钮。现在,系统2会要求系统1分享和同步名为default的文件夹。 + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Selection_013.png) + +接着重启系统1的Syncthing服务使更改生效。 + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Selection_014.png) + +等待大概60秒,接着你会看到两个系统之间已成功连接并同步。 + +你可以在网页管理界面中的Add Device区域核实该情况。 + +添加系统2后,系统1网页管理界面中的控制窗口如下: + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_016.png) + +添加系统1后,系统2网页管理界面中的控制窗口如下: + +![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_018.png) + +![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_018.png) + +现在,在任一个系统中的“**default**”文件夹中放进任意文件或文件夹。你应该可以看到这些文件/文件夹被自动同步到其它系统。 + +本文完!祝同步愉快! + +噢耶!!! + +- [Syncthing网站][2] + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/syncthing-private-secure-tool-sync-filesfolders-computers/ + +作者:[SK][a] +译者:[XLCYun](https://github.com/XLCYun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:https://github.com/syncthing/syncthing/releases/tag/v0.10.20 +[2]:http://syncthing.net/ From da16548e5225a2ec2f3286d2ef8098473dfb2f75 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sat, 18 Jul 2015 15:05:38 +0800 Subject: [PATCH 1430/2517] translating --- ...BASH like line editing is supported GRUB Error In Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md b/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md index 88b742d4f9..a1efae1a37 100644 --- a/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md +++ b/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md @@ -1,3 +1,5 @@ +translating... + Fix Minimal BASH like line editing is supported GRUB Error In Linux ================================================================================ The other day when I [installed Elementary OS in dual boot with Windows][1], I encountered a Grub error at the reboot time. I was presented with command line with error message: @@ -83,4 +85,4 @@ via: http://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux [1]:http://itsfoss.com/guide-install-elementary-os-luna/ [2]:http://www.gnu.org/software/grub/ [3]:http://itsfoss.com/solve-error-partition-grub-rescue-ubuntu-linux/ -[4]:http://itsfoss.com/fix-failed-fetch-cdrom-aptget-update-add-cdroms/ \ No newline at end of file +[4]:http://itsfoss.com/fix-failed-fetch-cdrom-aptget-update-add-cdroms/ From d1137a590971b25595a9888c07e2f9246ef04a8a Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 18 Jul 2015 17:31:08 +0800 Subject: [PATCH 1431/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91=20PHP=20=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/PHP 7 upgrading.md | 626 ++++++++++++++++++++++++++++++++ 1 file changed, 626 insertions(+) create mode 100644 sources/tech/PHP 7 upgrading.md diff --git a/sources/tech/PHP 7 upgrading.md b/sources/tech/PHP 7 upgrading.md new file mode 100644 index 0000000000..aa1530644d --- /dev/null +++ b/sources/tech/PHP 7 upgrading.md @@ -0,0 +1,626 @@ +PHP 7.0 升级备注 +=============== + +1. 向后不兼容的变化 +2. 新功能 +3. SAPI 模块中的变化 +4. 废弃的功能 +5. 变化的功能 +6. 新功能 +7. 新的类和接口 +8. 移除的扩展和 SAPI +9. 扩展的其它变化 +10. 新的全局常量 +11. INI 文件处理的变化 +12. Windows 支持 +13. 其它变化 + + +##1. 向后不兼容的变化 + +###语言变化 + +####变量处理的变化 + +* 间接变量、属性和方法引用现在以从左到右的语义进行解释。一些例子: + + $$foo['bar']['baz'] // 解释做 ($$foo)['bar']['baz'] + $foo->$bar['baz'] // 解释做 ($foo->$bar)['baz'] + $foo->$bar['baz']() // 解释做 ($foo->$bar)['baz']() + Foo::$bar['baz']() // 解释做 (Foo::$bar)['baz']() + + 要恢复以前的行为,需要显式地加大括号: + + ${$foo['bar']['baz']} + $foo->{$bar['baz']} + $foo->{$bar['baz']}() + Foo::{$bar['baz']}() + +* 全局关键字现在只接受简单变量。像以前的 + + global $$foo->bar; + + 现在要求如下写法: + + global ${$foo->bar}; + +* 变量或函数调用的前后加上括号不再有任何影响。例如下列代码,函数调用结果以引用的方式传给一个函数 + + function getArray() { return [1, 2, 3]; } + + $last = array_pop(getArray()); + // Strict Standards: 只有变量可以用引用方式传递 + $last = array_pop((getArray())); + // Strict Standards: 只有变量可以用引用方式传递 + + 现在无论是否使用括号,都会抛出一个严格标准错误。以前在第二种调用方式下不会有提示。 + +* 数组元素或对象属性自动安装引用顺序创建,现在的结果顺序将不同。例如: + + $array = []; + $array["a"] =& $array["b"]; + $array["b"] = 1; + var_dump($array); + + 现在结果是 ["a" => 1, "b" => 1],而以前的结果是 ["b" => 1, "a" => 1]。 + +相关的 RFC: +* https://wiki.php.net/rfc/uniform_variable_syntax +* https://wiki.php.net/rfc/abstract_syntax_tree + +####list() 的变化 + +* list() 不再以反序赋值,例如: + + list($array[], $array[], $array[]) = [1, 2, 3]; + var_dump($array); + + 现在结果是 $array == [1, 2, 3] ,而不是 [3, 2, 1]。注意仅赋值**顺序**变化了,而赋值仍然一致(LCTT 译注:即以前的 list()行为是从后面的变量开始逐一赋值,这样对与上述用法就会产生 [3,2,1] 这样的结果了。)。例如,类似如下的常规用法 + + list($a, $b, $c) = [1, 2, 3]; + // $a = 1; $b = 2; $c = 3; + + 仍然保持当前的行为。 + +* 不再允许对空的 list() 赋值。如下全是无效的: + + list() = $a; + list(,,) = $a; + list($x, list(), $y) = $a; + +* list() 不再支持对字符串的拆分(以前也只在某些情况下支持)。如下代码: + + $string = "xy"; + list($x, $y) = $string; + + 现在的结果是: $x == null 和 $y == null (没有提示),而以前的结果是: + $x == "x" 和 $y == "y" 。此外, list() 现在总是可以处理实现了 ArrayAccess 的对象,例如: + + list($a, $b) = (object) new ArrayObject([0, 1]); + + 现在的结果是: $a == 0 和 $b == 1。 以前 $a 和 $b 都是 null。 + +相关 RFC: +* https://wiki.php.net/rfc/abstract_syntax_tree#changes_to_list +* https://wiki.php.net/rfc/fix_list_behavior_inconsistency + +####foreach 的变化 + +* foreach() 迭代不再影响数组内部指针,数组指针可通过 current()/next() 等系列的函数访问。例如: + + $array = [0, 1, 2]; + foreach ($array as &$val) { + var_dump(current($array)); + } + + 现在将指向值 int(0) 三次。以前的输出是 int(1)、int(2) 和 bool(false)。 + +* 在对数组按值迭代时,foreach 总是在对数组副本进行操作,在迭代中任何对数组的操作都不会影响到迭代行为。例如: + + $array = [0, 1, 2]; + $ref =& $array; // Necessary to trigger the old behavior + foreach ($array as $val) { + var_dump($val); + unset($array[1]); + } + + 现在将打印出全部三个元素 (0 1 2),而以前第二个元素 1 会跳过 (0 2)。 + +* 在对数组按引用迭代时,对数组的修改将继续会影响到迭代。不过,现在 PHP 在使用数字作为键时可以更好的维护数组内的位置。例如,在按引用迭代过程中添加数组元素: + + $array = [0]; + foreach ($array as &$val) { + var_dump($val); + $array[1] = 1; + } + + 现在迭代会正确的添加了元素。如上代码输出是 "int(0) int(1)",而以前只是 "int(0)"。 + +* 对普通(不可遍历的)对象按值或按引用迭代的行为类似于对数组进行按引用迭代。这符合以前的行为,除了如上一点所述的更精确的位置管理的改进。 + +* 对可遍历对象的迭代行为保持不变。 + +相关 RFC: https://wiki.php.net/rfc/php7_foreach + +####参数处理的变化 + +* 不能定义两个同名的函数参数。例如,下面的方法将会触发编译时错误: + + public function foo($a, $b, $unused, $unused) { + // ... + } + + 如上的代码应该修改使用不同的参数名,如: + + public function foo($a, $b, $unused1, $unused2) { + // ... + } + +* func\_get\_arg() 和 func\_get\_args() 函数不再返回传递给参数的原始值,而是返回其当前值(也许会被修改)。例如: + + function foo($x) { + $x++; + var_dump(func_get_arg(0)); + } + foo(1); + + 将会打印 "2" 而不是 "1"。代码应该改成仅在调用 func\_get\_arg(s) 后进行修改操作。 + + function foo($x) { + var_dump(func_get_arg(0)); + $x++; + } + + 或者应该避免修改参数: + + function foo($x) { + $newX = $x + 1; + var_dump(func_get_arg(0)); + } + +* 类似的,异常回溯也不再显示传递给函数的原始值,而是修改后的值。例如: + + function foo($x) { + $x = 42; + throw new Exception; + } + foo("string"); + + 现在堆栈跟踪的结果是: + + Stack trace: + #0 file.php(4): foo(42) + #1 {main} + + 而以前是: + + Stack trace: + #0 file.php(4): foo('string') + #1 {main} + + 这并不会影响到你的代码的运行时行为,值得注意的是在调试时会有所不同。 + + 同样的限制也会影响到 debug\_backtrace() 及其它检查函数参数的函数。 + +相关 RFC: https://wiki.php.net/phpng + +####整数处理的变化 + +* 无效的八进制表示(包含大于7的数字)现在会产生编译错误。例如,下列代码不再有效: + + $i = 0781; // 8 不是一个有效的八进制数字! + + 以前,无效的数字(以及无效数字后的任何数字)会简单的忽略。以前如上 $i 的值是 7,因为后两位数字会被悄悄丢弃。 + +* 二进制以负数镜像位移现在会抛出一个算术错误: + + var_dump(1 >> -1); + // ArithmeticError: 以负数进行位移 + +* 向左位移的位数超出了整型宽度时,结果总是 0。 + + var_dump(1 << 64); // int(0) + + 以前上述代码的结果依赖于所用的 CPU 架构。例如,在 x86(包括 x86-64) 上结果是 int(1),因为其位移操作数在范围内。 + +* 类似的,向右位移的位数超出了整型宽度时,其结果总是 0 或 -1 (依赖于符号): + + var_dump(1 >> 64); // int(0) + var_dump(-1 >> 64); // int(-1) + +相关 RFC: https://wiki.php.net/rfc/integer_semantics + +####字符串处理的变化 + +* 包含十六进制数字的字符串不会再被当做数字,也不会被特殊处理。参见例子中的新行为: + + var_dump("0x123" == "291"); // bool(false) (以前是 true) + var_dump(is_numeric("0x123")); // bool(false) (以前是 true) + var_dump("0xe" + "0x1"); // int(0) (以前是 16) + + var_dump(substr("foo", "0x1")); // string(3) "foo" (以前是 "oo") + // 注意:遇到了一个非正常格式的数字 + + filter\_var() 可以用来检查一个字符串是否包含了十六进制数字,或这个字符串是否能转换为整数: + + $str = "0xffff"; + $int = filter_var($str, FILTER_VALIDATE_INT, FILTER_FLAG_ALLOW_HEX); + if (false === $int) { + throw new Exception("Invalid integer!"); + } + var_dump($int); // int(65535) + +* 由于给双引号字符串和 HERE 文档增加了 Unicode 码点转义格式(Unicode Codepoint Escape Syntax), 所以带有无效序列的 "\u{" 现在会造成错误: + + $str = "\u{xyz}"; // 致命错误:无效的 UTF-8 码点转义序列 + + 要避免这种情况,需要转义开头的反斜杠: + + $str = "\\u{xyz}"; // 正确 + + 不过,不跟随 { 的 "\u" 不受影响。如下代码不会生成错误,和前面的一样工作: + + $str = "\u202e"; // 正确 + +相关 RFC: +* https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings +* https://wiki.php.net/rfc/unicode_escape + +####错误处理的变化 + +* 现在有两个异常类: Exception 和 Error 。这两个类都实现了一个新接口: Throwable 。在异常处理代码中的类型指示也许需要修改来处理这种情况。 + +* 一些致命错误和可恢复的致命错误现在改为抛出一个 Error 。由于 Error 是一个独立于 Exception 的类,这些异常不会被已有的 try/catch 块捕获。 + + 可恢复的致命错误被转换为一个异常,所以它们不能在错误处理里面悄悄的忽略。部分情况下,类型指示失败不再能忽略。 + +* 解析错误现在会生成一个 Error 扩展的 ParseError 。除了以前的基于返回值 / error_get_last() 的处理,对某些可能无效的代码的 eval() 的错误处理应该改为捕获 ParseError 。 + +* 内部类的构造函数在失败时总是会抛出一个异常。以前一些构造函数会返回 NULL 或一个不可用的对象。 + +* 一些 E_STRICT 提示的错误级别改变了。 + +相关 RFC: +* https://wiki.php.net/rfc/engine_exceptions_for_php7 +* https://wiki.php.net/rfc/throwable-interface +* https://wiki.php.net/rfc/internal_constructor_behaviour +* https://wiki.php.net/rfc/reclassify_e_strict + +####其它的语言变化 + +* 静态调用一个不兼容的 $this 上下文的非静态调用的做法不再支持。这种情况下,$this 是没有定义的,但是对它的调用是允许的,并带有一个废弃提示。例子: + + class A { + public function test() { var_dump($this); } + } + + // 注意:没有从类 A 进行扩展 + class B { + public function callNonStaticMethodOfA() { A::test(); } + } + + (new B)->callNonStaticMethodOfA(); + + // 废弃:非静态方法 A::test() 不应该被静态调用 + // 提示:未定义的变量 $this + NULL + + 注意,这仅出现在来自不兼容上下文的调用上。如果类 B 扩展自类 A ,调用会被允许,没有任何提示。 + +* 不能使用下列类名、接口名和特殊名(大小写敏感): + + bool + int + float + string + null + false + true + + 这用于 class/interface/trait 声明、 class_alias() 和 use 语句中。 + + 此外,下列类名、接口名和特殊名保留做将来使用,但是使用时尚不会抛出错误: + + resource + object + mixed + numeric + +* yield 语句结构当用在一个表达式上下文时,不再要求括号。它现在是一个优先级在 “print” 和 “=>” 之间的右结合操作符。在某些情况下这会导致不同的行为,例如: + + echo yield -1; + // 以前被解释如下 + echo (yield) - 1; + // 现在被解释如下 + echo yield (-1); + + yield $foo or die; + // 以前被解释如下 + yield ($foo or die); + // 现在被解释如下 + (yield $foo) or die; + + 这种情况可以通过增加括号来解决。 + +* 移除了 ASP (\<%) 和 script (\ @@ -163,20 +161,20 @@ XSS 表示跨站点脚本。不像大部分攻击,该漏洞发生在客户端 ### 使用 SafeHTML ### -之前脚本的问题比较简单,它不允许任何类型的用户标记。不幸的是,这里有上百种方法能使 JavaScript 跳过用户的过滤器,从用户输入中剥离 HTML,没有方法可以防止这种情况。 +之前脚本的问题比较简单,它不允许任何类型的用户标记。不幸的是,这里有上百种方法能使 JavaScript 跳过用户的过滤器,并且要从用户输入中剥离全部 HTML,还没有方法可以防止这种情况。 当前,没有任何一个脚本能保证无法被破解,尽管有一些确实比大部分要好。有白名单和黑名单两种方法加固安全,白名单比较简单而且更加有效。 -一个白名单解决方案是 PixelApes 的 SafeHTML 反跨站点脚本解析器。 +一个白名单解决方案是 PixelApes 的 SafeHTML 反跨站脚本解析器。 SafeHTML 能识别有效 HTML,能追踪并剥离任何危险标签。它用另一个称为 HTMLSax 的软件包进行解析。 按照下面步骤安装和使用 SafeHTML: 1. 到 [http://pixel-apes.com/safehtml/?page=safehtml][1] 下载最新版本的 SafeHTML。 -1. 把文件放到你服务器的类文件夹。该文件夹包括 SafeHTML 和 HTMLSax 起作用需要的所有东西。 -1. 在脚本中包含 SafeHTML 类文件(safehtml.php)。 -1. 创建称为 $safehtml 的新 SafeHTML 对象。 +1. 把文件放到你服务器的类文件夹。该文件夹包括 SafeHTML 和 HTMLSax 功能所需的所有东西。 +1. 在脚本中 `include` SafeHTML 类文件(safehtml.php)。 +1. 创建一个名为 $safehtml 的新 SafeHTML 对象。 1. 用 $safehtml->parse() 方法清理你的数据。 这是一个完整的例子: @@ -203,45 +201,45 @@ SafeHTML 能识别有效 HTML,能追踪并剥离任何危险标签。它用另 你可能犯的最大错误是假设这个类能完全避免 XSS 攻击。SafeHTML 是一个相当复杂的脚本,几乎能检查所有事情,但没有什么是能保证的。你仍然需要对你的站点做参数验证。例如,该类不能检查给定变量的长度以确保能适应数据库的字段。它也不检查缓冲溢出问题。 -XSS 攻击者很有创造力,他们使用各种各样的方法来尝试达到他们的目标。可以阅读 RSnake 的 XSS 教程[http://ha.ckers.org/xss.html][2] 看一下这里有多少种方法尝试使代码跳过过滤器。SafeHTML 项目有很好的程序员一直在尝试阻止 XSS 攻击,但无法保证某些人不会想起一些奇怪和新奇的方法来跳过过滤器。 +XSS 攻击者很有创造力,他们使用各种各样的方法来尝试达到他们的目标。可以阅读 RSnake 的 XSS 教程[http://ha.ckers.org/xss.html][2] ,看一下这里有多少种方法尝试使代码跳过过滤器。SafeHTML 项目有很好的程序员一直在尝试阻止 XSS 攻击,但无法保证某些人不会想起一些奇怪和新奇的方法来跳过过滤器。 -**注意:XSS 攻击严重影响的一个例子 [http://namb.la/popular/tech.html][3],其中显示了如何一步一步创建会超载 MySpace 服务器的 JavaScript XSS 蠕虫。** +**注意:XSS 攻击严重影响的一个例子 [http://namb.la/popular/tech.html][3],其中显示了如何一步一步创建一个让 MySpace 服务器过载的 JavaScript XSS 蠕虫。** ### 用单向哈希保护数据 ### -该脚本对输入的数据进行单向转换-换句话说,它能对某人的密码产生哈希签名,但不能解码获得原始密码。为什么你希望这样呢?应用程序会存储密码。一个管理员不需要知道用户的密码-事实上,只有用户知道他的/她的密码是个好主意。系统(也仅有系统)应该能识别一个正确的密码;这是 Unix 多年来的密码安全模型。单向密码安全按照下面的方式工作: +该脚本对输入的数据进行单向转换,换句话说,它能对某人的密码产生哈希签名,但不能解码获得原始密码。为什么你希望这样呢?应用程序会存储密码。一个管理员不需要知道用户的密码,事实上,只有用户知道他/她自己的密码是个好主意。系统(也仅有系统)应该能识别一个正确的密码;这是 Unix 多年来的密码安全模型。单向密码安全按照下面的方式工作: -1. 当一个用户或管理员创建或更改一个账户密码时,系统对密码进行哈希并保存结果。主机系统忽视明文密码。 +1. 当一个用户或管理员创建或更改一个账户密码时,系统对密码进行哈希并保存结果。主机系统会丢弃明文密码。 2. 当用户通过任何方式登录到系统时,再次对输入的密码进行哈希。 -3. 主机系统抛弃输入的明文密码。 +3. 主机系统丢弃输入的明文密码。 4. 当前新哈希的密码和之前保存的哈希相比较。 5. 如果哈希的密码相匹配,系统就会授予访问权限。 -主机系统完成这些并不需要知道原始密码;事实上,原始值完全不相关。一个副作用是,如果某人侵入系统并盗取了密码数据库,入侵者会获得很多哈希后的密码,但无法把它们反向转换为原始密码。当然,给足够时间、计算能力,以及弱用户密码,一个攻击者还是有可能采用字典攻击找出密码。因此,别轻易让人碰你的密码数据库,如果确实有人这样做了,让每个用户更改他们的密码。 +主机系统完成这些并不需要知道原始密码;事实上,原始密码完全无所谓。一个副作用是,如果某人侵入系统并盗取了密码数据库,入侵者会获得很多哈希后的密码,但无法把它们反向转换为原始密码。当然,给足够时间、计算能力,以及弱用户密码,一个攻击者还是有可能采用字典攻击找出密码。因此,别轻易让人碰你的密码数据库,如果确实有人这样做了,让每个用户更改他们的密码。 #### 加密 Vs 哈希 #### -技术上来来说,这过程并不是加密。哈希和加密是不相同的,这有两个理由: +技术上来来说,哈希过程并不是加密。哈希和加密是不同的,这有两个理由: -不像加密,数据不能被解密。 +不像加密,哈希数据不能被解密。 -是有可能(但很不常见)两个不同的字符串会产生相同的哈希。并不能保证哈希是唯一的,因此别像数据库中的唯一键那样使用哈希。 +是有可能(但非常罕见)两个不同的字符串会产生相同的哈希。并不能保证哈希是唯一的,因此别像数据库中的唯一键那样使用哈希。 function hash_ish($string) { return md5($string); } -md5() 函数基于 RSA 数据安全公司的消息摘要算法(即 MD5)返回一个由 32 个字符组成的十六进制串。然后你可以将那个 32 位字符串插入到数据库中,和另一个 md5 字符串相比较,或者就用这 32 个字符。 +上面的 md5() 函数基于 RSA 数据安全公司的消息摘要算法(即 MD5)返回一个由 32 个字符组成的十六进制串。然后你可以将那个 32 位字符串插入到数据库中和另一个 md5 字符串相比较,或者直接用这 32 个字符。 #### 破解脚本 #### -几乎不可能解密 MD5 数据。或者说很难。但是,你仍然需要好的密码,因为根据整个字典生成哈希数据库仍然很简单。这里有在线 MD5 字典,当你输入 **06d80eb0c50b49a509b49f2424e8c805** 后会得到结果 “dog”。因此,尽管技术上 MD5 不能被解密,这里仍然有漏洞-如果某人获得了你的密码数据库,你可以肯定他们肯定会使用 MD5 字典破译。因此,当你创建基于密码的系统的时候尤其要注意密码长度(最小 6 个字符,8 个或许会更好)和包括字母和数字。并确保字典中没有这个密码。 +几乎不可能解密 MD5 数据。或者说很难。但是,你仍然需要好的密码,因为用一整个字典生成哈希数据库仍然很简单。有一些在线 MD5 字典,当你输入 **06d80eb0c50b49a509b49f2424e8c805** 后会得到结果 “dog”。因此,尽管技术上 MD5 不能被解密,这里仍然有漏洞,如果某人获得了你的密码数据库,你可以肯定他们肯定会使用 MD5 字典破译。因此,当你创建基于密码的系统的时候尤其要注意密码长度(最小 6 个字符,8 个或许会更好)和包括字母和数字。并确保这个密码不在字典中。 ### 用 Mcrypt 加密数据 ### -如果你不需要以可阅读形式查看密码,采用 MD5 就足够了。不幸的是,这里并不总是有可选项-如果你提供以加密形式存储某人的信用卡信息,你可能需要在后面的某个点进行解密。 +如果你不需要以可阅读形式查看密码,采用 MD5 就足够了。不幸的是,这里并不总是有可选项,如果你提供以加密形式存储某人的信用卡信息,你可能需要在后面的某个地方进行解密。 -最早的一个解决方案是 Mcrypt 模块,用于允许 PHP 高速加密的附件。Mcrypt 库提供了超过 30 种计算方法用于加密,并且提供短语确保只有你(或者你的用户)可以解密数据。 +最早的一个解决方案是 Mcrypt 模块,这是一个用于允许 PHP 高速加密的插件。Mcrypt 库提供了超过 30 种用于加密的计算方法,并且提供口令确保只有你(或者你的用户)可以解密数据。 让我们来看看使用方法。下面的脚本包含了使用 Mcrypt 加密和解密数据的函数: @@ -282,21 +280,21 @@ md5() 函数基于 RSA 数据安全公司的消息摘要算法(即 MD5)返 **mcrypt()** 函数需要几个信息: - 需要加密的数据 -- 用于加密和解锁数据的短语,也称为键。 +- 用于加密和解锁数据的口令,也称为键。 - 用于加密数据的计算方法,也就是用于加密数据的算法。该脚本使用了 **MCRYPT\_SERPENT\_256**,但你可以从很多算法中选择,包括 **MCRYPT\_TWOFISH192**、**MCRYPT\_RC2**、**MCRYPT\_DES**、和 **MCRYPT\_LOKI97**。 - 加密数据的模式。这里有几个你可以使用的模式,包括电子密码本(Electronic Codebook) 和加密反馈(Cipher Feedback)。该脚本使用 **MCRYPT\_MODE\_CBC** 密码块链接。 -- 一个 **初始化向量**-也称为 IV,或着一个种子-用于为加密算法设置种子的额外二进制位。也就是使算法更难于破解的额外信息。 -- 键和 IV 字符串的长度,这可能随着加密和块而不同。使用 **mcrypt\_get\_key\_size()** 和 **mcrypt\_get\_block\_size()** 函数获取合适的长度;然后用 **substr()** 函数将键的值截取为合适的长度。(如果键的长度比要求的短,别担心-Mcrypt 会用 0 填充。) +- 一个 **初始化向量**-也称为 IV 或者种子,用于为加密算法设置种子的额外二进制位。也就是使算法更难于破解的额外信息。 +- 键和 IV 字符串的长度,这可能随着加密和块而不同。使用 **mcrypt\_get\_key\_size()** 和 **mcrypt\_get\_block\_size()** 函数获取合适的长度;然后用 **substr()** 函数将键的值截取为合适的长度。(如果键的长度比要求的短,别担心,Mcrypt 会用 0 填充。) 如果有人窃取了你的数据和短语,他们只能一个个尝试加密算法直到找到正确的那一个。因此,在使用它之前我们通过对键使用 **md5()** 函数增加安全,就算他们获取了数据和短语,入侵者也不能获得想要的东西。 -入侵者同时需要函数,数据和短语-如果真是如此,他们可能获得了对你服务器的完整访问,你只能大清洗了。 +入侵者同时需要函数,数据和口令,如果真是如此,他们可能获得了对你服务器的完整访问,你只能大清洗了。 -这里还有一个数据存储格式的小问题。Mcrypt 以难懂的二进制形式返回加密后的数据,这使得当你将其存储到 MySQL 字段的时候可能出现可怕错误。因此,我们使用 **base64encode()** 和 **base64decode()** 函数转换为和 SQL 兼容的字母格式和检索行。 +这里还有一个数据存储格式的小问题。Mcrypt 以难懂的二进制形式返回加密后的数据,这使得当你将其存储到 MySQL 字段的时候可能出现可怕错误。因此,我们使用 **base64encode()** 和 **base64decode()** 函数转换为和 SQL 兼容的字母格式和可检索行。 #### 破解脚本 #### -除了实验多种加密方法,你还可以在脚本中添加一些便利。例如,不是每次都提供键和模式,而是在包含的文件中声明为全局常量。 +除了实验多种加密方法,你还可以在脚本中添加一些便利。例如,不用每次都提供键和模式,而是在包含的文件中声明为全局常量。 ### 生成随机密码 ### @@ -331,8 +329,8 @@ md5() 函数基于 RSA 数据安全公司的消息摘要算法(即 MD5)返 函数按照下面步骤工作: - 函数确保 **$num\_chars** 是非零的正整数。 -- 函数初始化 **$accepted\_chars** 变量为密码可能包含的字符列表。该脚本使用所有小写字母和数字 0 到 9,但你可以使用你喜欢的任何字符集合。 -- 随机数生成器需要一个种子,从而获得一系列类随机值(PHP 4.2 及之后版本中并不严格要求)。 +- 函数初始化 **$accepted\_chars** 变量为密码可能包含的字符列表。该脚本使用所有小写字母和数字 0 到 9,但你可以使用你喜欢的任何字符集合。(LCTT 译注:有时候为了便于肉眼识别,你可以将其中的 0 和 O,1 和 l 之类的都去掉。) +- 随机数生成器需要一个种子,从而获得一系列类随机值(PHP 4.2 及之后版本中并不需要,会自动播种)。 - 函数循环 **$num\_chars** 次,每次迭代生成密码中的一个字符。 - 对于每个新字符,脚本查看 **$accepted_chars** 的长度,选择 0 和长度之间的一个数字,然后添加 **$accepted\_chars** 中该数字为索引值的字符到 $password。 - 循环结束后,函数返回 **$password**。 @@ -347,7 +345,7 @@ via: http://www.codeproject.com/Articles/363897/PHP-Security 作者:[SamarRizvi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From b3dfd8ac4c6eac6bc6f66683a20ea08f387a7c78 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 23 Jul 2015 10:06:27 +0800 Subject: [PATCH 1465/2517] Translating by ZTinoZ --- ...709 7 command line tools for monitoring your Linux system.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md index 8b0772f7b6..e036a70d50 100644 --- a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md +++ b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md @@ -42,7 +42,7 @@ ps命令展现的是正在运行中的进程列表。在这种情况下,我们 ### Pstree ### -Pstree “shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted. If a user name is specified, all process trees rooted at processes owned by that user are shown.”This is a really useful tool as the tree helps you sort out which process is dependent on which process (go [here][9]). +Pstree“以树状图显示正在运行中的进程。如果pid被省略的话那树结构是以pid或init为父进程,如果用户名指定,那所有进程树都会以该用户所属的进程为父进程进行显示。”以树状图来帮你将进程之间的所属关系进行分类,这的确是个很有效的工具(戳[这里][9])。 ![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-8-100591907-orig.png) From 8a7c166f3f17ef0cb41f2df39c3aa5b7e18f3a94 Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 23 Jul 2015 10:22:59 +0800 Subject: [PATCH 1466/2517] Update 20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md --- ... Use and Execute PHP Codes in Linux Command Line--Part 1.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md b/sources/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md index 8f61e092f0..7e9688ed4a 100644 --- a/sources/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md +++ b/sources/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md @@ -1,3 +1,4 @@ +Translatign by GOLinux! How to Use and Execute PHP Codes in Linux Command Line – Part 1 ================================================================================ PHP is an open source server side scripting Language which originally stood for ‘Personal Home Page‘ now stands for ‘PHP: Hypertext Preprocessor‘, which is a recursive acronym. It is a cross platform scripting language which is highly influenced by C, C++ and Java. @@ -180,4 +181,4 @@ via: http://www.tecmint.com/run-php-codes-from-linux-commandline/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/ \ No newline at end of file +[1]:http://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/ From 38abc4e6d675bd8e713c52aa9aea447eee89868b Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 23 Jul 2015 12:06:33 +0800 Subject: [PATCH 1467/2517] [Translated]20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md --- ...PHP Codes in Linux Command Line--Part 1.md | 184 ------------------ ...PHP Codes in Linux Command Line--Part 1.md | 174 +++++++++++++++++ 2 files changed, 174 insertions(+), 184 deletions(-) delete mode 100644 sources/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md create mode 100644 translated/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md diff --git a/sources/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md b/sources/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md deleted file mode 100644 index 7e9688ed4a..0000000000 --- a/sources/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md +++ /dev/null @@ -1,184 +0,0 @@ -Translatign by GOLinux! -How to Use and Execute PHP Codes in Linux Command Line – Part 1 -================================================================================ -PHP is an open source server side scripting Language which originally stood for ‘Personal Home Page‘ now stands for ‘PHP: Hypertext Preprocessor‘, which is a recursive acronym. It is a cross platform scripting language which is highly influenced by C, C++ and Java. - -![Run PHP Codes in Linux Command Line](http://www.tecmint.com/wp-content/uploads/2015/07/php-command-line-usage.jpeg) - -Run PHP Codes in Linux Command Line – Part 1 - -A PHP Syntax is very similar to Syntax in C, Java and Perl Programming Language with a few PHP-specific feature. PHP is used by some 260 Million websites, as of now. The current stable release is PHP Version 5.6.10. - -PHP is HTML embedded script which facilitates developers to write dynamically generated pages quickly. PHP is primarily used on Server-side (and JavaScript on Client Side) to generate dynamic web pages over HTTP, however you will be surprised to know that you can execute a PHP in a Linux Terminal without the need of a web browser. - -This article aims at throwing light on the command-line aspect of PHP scripting Language. - -**1. After PHP and Apache2 installation, we need to install PHP command Line Interpreter.** - - # apt-get install php5-cli [Debian and alike System) - # yum install php-cli [CentOS and alike System) - -Next thing, we do is to test a php (if installed correctly or not) commonly as by creating a file `infophp.php` at location ‘/var/www/html‘ (Apache2 working directory in most of the distros), with the content ``, simply by running the below command. - - # echo '' > /var/www/html/infophp.php - -and then point your browser to http://127.0.0.1/infophp.php which opens this file in web browser. - -![Check PHP Info](http://www.tecmint.com/wp-content/uploads/2015/07/Check-PHP-Info.png) - -Check PHP Info - -Same results can be obtained from the Linux terminal without the need of any browser. Run the PHP file located at ‘/var/www/html/infophp.php‘ in Linux Command Line as: - - # php -f /var/www/html/infophp.php - -![Check PHP info from Commandline](http://www.tecmint.com/wp-content/uploads/2015/07/Check-PHP-info-from-Commandline.png) - -Check PHP info from Commandline - -Since the output is too big we can pipeline the above output with ‘less‘ command to get one screen output at a time, simply as: - - # php -f /var/www/html/infophp.php | less - -![Check All PHP Info](http://www.tecmint.com/wp-content/uploads/2015/07/Check-All-PHP-Info.png) - -Check All PHP Info - -Here Option ‘-f‘ parse and execute the file that follows the command. - -**2. We can use `phpinfo()` which is a very valuable debugging tool directly on the Linux command-line without the need of calling it from a file, simply as:** - - # php -r 'phpinfo();' - -![PHP Debugging Tool](http://www.tecmint.com/wp-content/uploads/2015/07/PHP-Debugging-Tool.png) - -PHP Debugging Tool - -Here the option ‘-r‘ run the PHP Code in the Linux Terminal directly without tags `<` and `>`. - -**3. Run PHP in Interactive mode and do some mathematics. Here option ‘-a‘ is for running PHP in Interactive Mode.** - - # php -a - - Interactive shell - - php > echo 2+3; - 5 - php > echo 9-6; - 3 - php > echo 5*4; - 20 - php > echo 12/3; - 4 - php > echo 12/5; - 2.4 - php > echo 2+3-1; - 4 - php > echo 2+3-1*3; - 2 - php > exit - -Press ‘exit‘ or ‘ctrl+c‘ to close PHP interactive mode. - -![Enable PHP Interactive Mode](http://www.tecmint.com/wp-content/uploads/2015/07/Enable-PHP-interactive-mode1.png) - -Enable PHP Interactive Mode - -**4. You can run a PHP script simply as, if it is a shell script. First Create a PHP sample script in your current working directory.** - - # echo -e '#!/usr/bin/php\n' > phpscript.php - -Notice we used #!/usr/bin/php in the first line of this PHP script as we use to do in shell script (/bin/bash). The first line #!/usr/bin/php tells the Linux Command-Line to parse this script file to PHP Interpreter. - -Second make it executable as: - - # chmod 755 phpscript.php - -and run it as, - - # ./phpscript.php - -**5. You will be surprised to know you can create simple functions all by yourself using the interactive shell. Here is the step-by step instruction.** - -Start PHP interactive mode. - - # php -a - -Create a function and name it addition. Also declare two variables $a and $b. - - php > function addition ($a, $b) - -Use curly braces to define rules in between them for this function. - - php > { - -Define Rule(s). Here the rule say to add the two variables. - - php { echo $a + $b; - -All rules defined. Enclose rules by closing curly braces. - - php {} - -Test function and add digits 4 and 3 simply as : - - php > var_dump (addition(4,3)); - -#### Sample Output #### - - 7NULL - -You may run the below code to execute the function, as many times as you want with different values. Replace a and b with values of yours. - - php > var_dump (addition(a,b)); - ----------- - - php > var_dump (addition(9,3.3)); - -#### Sample Output #### - - 12.3NULL - -![Create PHP Functions](http://www.tecmint.com/wp-content/uploads/2015/07/Create-PHP-Functions.png) - -Create PHP Functions - -You may run this function till you quit interactive mode (Ctrl+z). Also you would have noticed that in the above output the data type returned is NULL. This can be fixed by asking php interactive shell to return in place of echo. - -Simply replace the ‘echo‘ statement in the above function with ‘return‘ - -Replace - - php { echo $a + $b; - -with - - php { return $a + $b; - -and rest of the things and principles remain same. - -Here is an Example, which returns appropriate data-type in the output. - -![PHP Functions](http://www.tecmint.com/wp-content/uploads/2015/07/PHP-Functions.png) - -PHP Functions - -Always Remember, user defined functions are not saved in history from shell session to shell session, hence once you exit the interactive shell, it is lost. - -Hope you liked this session. Keep Connected for more such posts. Stay Tuned and Healthy. Provide us with your valuable feedback in the comments. Like ans share us and help us get spread. - -Read Also: [12 Useful PHP Commandline Usage on Linux Terminal – Part 2][1] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/run-php-codes-from-linux-commandline/ - -作者:[vishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/ diff --git a/translated/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md b/translated/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md new file mode 100644 index 0000000000..1d69a7c746 --- /dev/null +++ b/translated/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md @@ -0,0 +1,174 @@ +Linux命令行中使用和执行PHP代码——第一部分 +================================================================================ +PHP是一个开元服务器端脚本语言,最初这三个字母代表的是“Personal Home Page”,而现在则代表的是“PHP:Hypertext Preprocessor”,它是个递归首字母缩写。它是一个跨平台脚本语言,深受C、C++和Java的影响。 +![Run PHP Codes in Linux Command Line](http://www.tecmint.com/wp-content/uploads/2015/07/php-command-line-usage.jpeg) +Linux命令行中运行PHP代码——第一部分 + +PHP的语法和C、Java以及带有一些PHP特性的Perl变成语言中的语法十分相似,它眼下大约正被2.6亿个网站所使用,当前最新的稳定版本是PHP版本5.6.10。 + +PHP是HTML的嵌入脚本,它便于开发人员快速写出动态生成的页面。PHP主要用于服务器端(而Javascript则用于客户端)以通过HTTP生成动态网页,然而,当你知道可以在Linux终端中不需要网页浏览器来执行PHP时,你或许会大为惊讶。 + +本文将阐述PHP脚本语言的命令行方面。 + +**1. 在安装完PHP和Apache2后,我们需要安装PHP命令行解释器。** + + # apt-get install php5-cli [Debian and alike System) + # yum install php-cli [CentOS and alike System) + +接下来我们通常要做的是,在‘/var/www/html‘(这是 Apache2 在大多数发行版中的工作目录)这个位置创建一个内容为 ‘‘,名为 ‘infophp.php‘ 的文件来测试(是否安装正确),执行以下命令即可。 + + # echo '' > /var/www/html/infophp.php + +然后,将浏览器指向http://127.0.0.1/infophp.php, 这将会在网络浏览器中打开该文件。 + +![Check PHP Info](http://www.tecmint.com/wp-content/uploads/2015/07/Check-PHP-Info.png) +检查PHP信息 + +不需要任何浏览器,在Linux终端中也可以获得相同的结果。在Linux命令行中执行‘/var/www/html/infophp.php‘,如: + + # php -f /var/www/html/infophp.php + +![Check PHP info from Commandline](http://www.tecmint.com/wp-content/uploads/2015/07/Check-PHP-info-from-Commandline.png) +从命令行检查PHP信息 + +由于输出结果太大,我们可以通过管道将上述输出结果输送给 ‘less‘ 命令,这样就可以一次输出一屏了,命令如下: + + # php -f /var/www/html/infophp.php | less + +![Check All PHP Info](http://www.tecmint.com/wp-content/uploads/2015/07/Check-All-PHP-Info.png) +检查所有PHP信息 + +这里,‘-f‘选项解析病执行命令后跟随的文件。 + +**2. 我们可以直接在Linux命令行使用`phpinfo()`这个十分有价值的调试工具而不需要从文件来调用,只需执行以下命令:** + + # php -r 'phpinfo();' + +![PHP Debugging Tool](http://www.tecmint.com/wp-content/uploads/2015/07/PHP-Debugging-Tool.png) +PHP调试工具 + +这里,‘-r‘ 选项会让PHP代码在Linux终端中不带`<`和`>`标记直接执行。 + +**3. 以交互模式运行PHP并做一些数学运算。这里,‘-a‘ 选项用于以交互模式运行PHP。** + + # php -a + + Interactive shell + + php > echo 2+3; + 5 + php > echo 9-6; + 3 + php > echo 5*4; + 20 + php > echo 12/3; + 4 + php > echo 12/5; + 2.4 + php > echo 2+3-1; + 4 + php > echo 2+3-1*3; + 2 + php > exit + +输入 ‘exit‘ 或者按下 ‘ctrl+c‘ 来关闭PHP交互模式。 + +![Enable PHP Interactive Mode](http://www.tecmint.com/wp-content/uploads/2015/07/Enable-PHP-interactive-mode1.png) +启用PHP交互模式 + +**4. 你可以仅仅将PHP脚本作为shell脚本来运行。首先,创建在你当前工作目录中创建一个PHP样例脚本。** + + # echo -e '#!/usr/bin/php\n' > phpscript.php + +注意,我们在该PHP脚本的第一行使用#!/usr/bin/php,就像在shell脚本中那样(/bin/bash)。第一行的#!/usr/bin/php告诉Linux命令行将该脚本文件解析到PHP解释器中。 + +其次,让该脚本可执行: + + # chmod 755 phpscript.php + +接着来运行它, + + # ./phpscript.php + +**5. 你可以完全靠自己通过交互shell来创建简单函数,这你一定会被惊到了。下面是循序渐进的指南。** + +开启PHP交互模式。 + + # php -a + +创建一个函授,将它命名为 addition。同时,声明两个变量 $a 和 $b。 + + php > function addition ($a, $b) + +使用花括号来在其间为该函数定义规则。 + + php > { + +定义规则。这里,该规则讲的是添加这两个变量。 + + php { echo $a + $b; + +所有规则定义完毕,通过闭合花括号来封装规则。 + + php {} + +测试函数,添加数字4和3,命令如下: + + php > var_dump (addition(4,3)); + +#### 样例输出 #### + + 7NULL + +你可以运行以下代码来执行该函数,你可以测试不同的值,你想来多少次都行。将里头的 a 和 b 替换成你自己的值。 + + php > var_dump (addition(a,b)); + +---------- + + php > var_dump (addition(9,3.3)); + +#### 样例输出 #### + + 12.3NULL + +![Create PHP Functions](http://www.tecmint.com/wp-content/uploads/2015/07/Create-PHP-Functions.png) +创建PHP函数 + +你可以一直运行该函数,直至退出交互模式(ctrl+z)。同时,你也应该注意到了,上面输出结果中返回的数据类型为 NULL。这个问题可以通过要求 php 交互 shell用 return 代替 echo 返回结果来修复。 + +只需要在上面的函数的中 ‘echo‘ 声明用 ‘return‘ 来替换 + +替换 + + php { echo $a + $b; + +为 + + php { return $a + $b; + +剩下的东西和原理仍然一样。 + +这里是一个样例,在该样例的输出结果中返回了正确的数据类型。 + +![PHP Functions](http://www.tecmint.com/wp-content/uploads/2015/07/PHP-Functions.png) +PHP函数 + +永远都记住,用户定义的函数不会从一个shell会话保留到下一个shell会话,因此,一旦你退出交互shell,它就会丢失了。 + +希望你喜欢此次会话。保持连线,你会获得更多此类文章。保持关注,保持健康。请在下面的评论中为我们提供有价值的反馈。点赞并分享,帮助我们扩散。 + +还请阅读: [12个Linux终端中有用的的PHP命令行用法——第二部分][1] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/run-php-codes-from-linux-commandline/ + +作者:[vishek Kumar][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/ From e4476460b8126830f1e06033a3c1ea44262d1670 Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 23 Jul 2015 12:11:51 +0800 Subject: [PATCH 1468/2517] Update 20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md --- ... Useful PHP Commandline Usage Every Linux User Must Know.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md b/sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md index 88e20ea18f..8833405982 100644 --- a/sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md +++ b/sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md @@ -1,3 +1,4 @@ +Translating by GOLinu! 12 Useful PHP Commandline Usage Every Linux User Must Know ================================================================================ In my last post “[How to Use and Execute PHP Codes in Linux Command – line][1]”, I emphasized on running PHP codes directly in Linux Command-line as well as executing PHP script file in Linux Terminal. @@ -200,4 +201,4 @@ via: http://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/run-php-codes-from-linux-commandline/ \ No newline at end of file +[1]:http://www.tecmint.com/run-php-codes-from-linux-commandline/ From 3e14e95358c71130aab49568d23dd8c9be32175e Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 23 Jul 2015 12:15:00 +0800 Subject: [PATCH 1469/2517] Update 20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md --- ... Useful PHP Commandline Usage Every Linux User Must Know.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md b/sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md index 88e20ea18f..8833405982 100644 --- a/sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md +++ b/sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md @@ -1,3 +1,4 @@ +Translating by GOLinu! 12 Useful PHP Commandline Usage Every Linux User Must Know ================================================================================ In my last post “[How to Use and Execute PHP Codes in Linux Command – line][1]”, I emphasized on running PHP codes directly in Linux Command-line as well as executing PHP script file in Linux Terminal. @@ -200,4 +201,4 @@ via: http://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/run-php-codes-from-linux-commandline/ \ No newline at end of file +[1]:http://www.tecmint.com/run-php-codes-from-linux-commandline/ From f972649a7ec5e459155312cf7582ca93851b0ce0 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 23 Jul 2015 17:48:02 +0800 Subject: [PATCH 1470/2517] Translating by ZTinoZ --- ...709 7 command line tools for monitoring your Linux system.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md index e036a70d50..caac29be68 100644 --- a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md +++ b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md @@ -48,7 +48,7 @@ Pstree“以树状图显示正在运行中的进程。如果pid被省略的话 ### pmap ### -Understanding just how an app uses memory is often crucial in debugging, and the pmap produces just such information when given a process ID (PID). The screenshot shows the medium weight output generated by using the “-x”switch. You can get pmap to produce even more detailed information using the “-X”switch but you’ll need a much wider terminal window. +理解一个应用程序在调试过程中如何使用内存是至关重要的,而pmap的作用就是当给出一个进程ID(PID)时显示出相关信息。上面的截图展示的是使用“-x”选项所产生的部分输出,你也可以用pmap的“-X”选项来获取更多的细节信息但是前提是你要有个更宽的终端窗口。 ![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-9-100591900-orig.png) From 5bd7b0f495a39aef19acd0fe928247b6e1af1b16 Mon Sep 17 00:00:00 2001 From: alim0x Date: Thu, 23 Jul 2015 19:01:37 +0800 Subject: [PATCH 1471/2517] [translating]17 - The history of Android.md --- .../The history of Android/17 - The history of Android.md | 4 +++- .../16 - The history of Android.md | 0 2 files changed, 3 insertions(+), 1 deletion(-) rename translated/talk/{The-history-of-Android => The history of Android}/16 - The history of Android.md (100%) diff --git a/sources/talk/The history of Android/17 - The history of Android.md b/sources/talk/The history of Android/17 - The history of Android.md index 5422877252..2e60a864ab 100644 --- a/sources/talk/The history of Android/17 - The history of Android.md +++ b/sources/talk/The history of Android/17 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x translating + The history of Android ================================================================================ ![The Honeycomb app lineup lost a ton of apps. This also shows the notification panel and the new quick settings.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/apps-and-notifications2.png) @@ -83,4 +85,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The-history-of-Android/16 - The history of Android.md b/translated/talk/The history of Android/16 - The history of Android.md similarity index 100% rename from translated/talk/The-history-of-Android/16 - The history of Android.md rename to translated/talk/The history of Android/16 - The history of Android.md From 42e46ee30dfb38c81590e008873021413ce9696b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Thu, 23 Jul 2015 20:00:49 +0800 Subject: [PATCH 1472/2517] Done --- ...ntial Commands and System Documentation.md | 179 +++++++++--------- 1 file changed, 92 insertions(+), 87 deletions(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md index ad3cecd0a2..93c2787c7e 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md @@ -10,174 +10,178 @@ RHCSA 考试准备指南 RHCSA 考试(考试编号 EX200)通过后可以获取由Red Hat 公司颁发的证书. RHCSA 考试是RHCT(红帽认证技师)的升级版,而且RHCSA必须在新的Red Hat Enterprise Linux(红帽企业版)下完成.RHCT和RHCSA的主要变化就是RHCT基于 RHEL5 , 而RHCSA基于RHEL6或者7, 这两个认证的等级也有所不同. -This Red Hat Certified System Administrator (RHCSA) is essential to perform the following core system administration tasks needed in Red Hat Enterprise Linux environments: +红帽认证管理员所会的最基础的是在红帽企业版的环境下执行如下系统管理任务: -- Understand and use necessary tools for handling files, directories, command-environments line, and system-wide / packages documentation. -- Operate running systems, even in different run levels, identify and control processes, start and stop virtual machines. -- Set up local storage using partitions and logical volumes. -- Create and configure local and network file systems and its attributes (permissions, encryption, and ACLs). -- Setup, configure, and control systems, including installing, updating and removing software. -- Manage system users and groups, along with use of a centralized LDAP directory for authentication. -- Ensure system security, including basic firewall and SELinux configuration. +- 理解并会使用命令管理文件、目录、命令行以及系统/软件包的文档 +- 使用不同的启动等级启动系统,认证和控制进程,启动或停止虚拟机 +- 使用分区和逻辑卷管理本地存储 +- 创建并且配置本地文件系统和网络文件系统,设置他们的属性(许可、加密、访问控制表) +- 部署、配置、并且控制系统,包括安装、升级和卸载软件 +- 管理系统用户和组,独立使用集中制的LDAP目录权限控制 +- 确保系统安全,包括基础的防火墙规则和SELinux配置 -To view fees and register for an exam in your country, check the [RHCSA Certification page][1]. -To view fees and register for an exam in your country, check the RHCSA Certification page. +关于你所在国家的考试注册费用参考 [RHCSA Certification page][1]. -In this 15-article RHCSA series, titled Preparation for the RHCSA (Red Hat Certified System Administrator) exam, we will going to cover the following topics on the latest releases of Red Hat Enterprise Linux 7. +关于你所在国家的考试注册费用参考RHCSA 认证页面 -- Part 1: Reviewing Essential Commands & System Documentation -- Part 2: How to Perform File and Directory Management in RHEL 7 -- Part 3: How to Manage Users and Groups in RHEL 7 -- Part 4: Editing Text Files with Nano and Vim / Analyzing text with grep and regexps -- Part 5: Process Management in RHEL 7: boot, shutdown, and everything in between -- Part 6: Using ‘Parted’ and ‘SSM’ to Configure and Encrypt System Storage -- Part 7: Using ACLs (Access Control Lists) and Mounting Samba / NFS Shares -- Part 8: Securing SSH, Setting Hostname and Enabling Network Services -- Part 9: Installing, Configuring and Securing a Web and FTP Server -- Part 10: Yum Package Management, Automating Tasks with Cron and Monitoring System Logs -- Part 11: Firewall Essentials and Control Network Traffic Using FirewallD and Iptables -- Part 12: Automate RHEL 7 Installations Using ‘Kickstart’ -- Part 13: RHEL 7: What is SELinux and how it works? -- Part 14: Use LDAP-based authentication in RHEL 7 -- Part 15: Virtualization in RHEL 7: KVM and Virtual machine management -In this Part 1 of the RHCSA series, we will explain how to enter and execute commands with the correct syntax in a shell prompt or terminal, and explained how to find, inspect, and use system documentation. +在这个有15章的RHCSA(红帽认证管理员)备考系列,我们将覆盖以下的关于红帽企业Linux第七版的最新的信息 + +- Part 1: 回顾必会的命令和系统文档 +- Part 2: 在RHEL7如何展示文件和管理目录 +- Part 3: 在RHEL7中如何管理用户和组 +- Part 4: 使用nano和vim管理命令/ 使用grep和正则表达式分析文本 +- Part 5: RHEL7的进程管理:启动,关机,以及其他介于二者之间的. +- Part 6: 使用 'Parted'和'SSM'来管理和加密系统存储 +- Part 7: 使用ACLs(访问控制表)并挂载 Samba /NFS 文件分享 +- Part 8: 加固SSH,设置主机名并开启网络服务 +- Part 9: 安装、配置和加固一个Web,FTP服务器 +- Part 10: Yum 包管理方式,使用Cron进行自动任务管理以及监控系统日志 +- Part 11: 使用FirewallD和Iptables设置防火墙,控制网络流量 +- Part 12: 使用Kickstart 自动安装RHEL 7 +- Part 13: RHEL7:什么是SeLinux?他的原理是什么? +- Part 14: 在RHEL7 中使用基于LDAP的权限控制 +- Part 15: RHEL7的虚拟化:KVM 和虚拟机管理 + +在第一章,我们讲解如何输入和运行正确的命令在终端或者Shell窗口,并且讲解如何找到、插入,以及使用系统文档 ![RHCSA: Reviewing Essential Linux Commands – Part 1](http://www.tecmint.com/wp-content/uploads/2015/02/Reviewing-Essential-Linux-Commands.png) -RHCSA: Reviewing Essential Linux Commands – Part 1 +RHCSA:回顾必会的Linux命令 - 第一部分 -#### Prerequisites: #### +#### 前提: #### -At least a slight degree of familiarity with basic Linux commands such as: +至少你要熟悉如下命令 -- [cd command][2] (change directory) -- [ls command][3] (list directory) -- [cp command][4] (copy files) -- [mv command][5] (move or rename files) -- [touch command][6] (create empty files or update the timestamp of existing ones) -- rm command (delete files) -- mkdir command (make directory) +- [cd command][2] (改变目录) +- [ls command][3] (列举文件) +- [cp command][4] (复制文件) +- [mv command][5] (移动或重命名文件) +- [touch command][6] (创建一个新的文件或更新已存在文件的时间表) +- rm command (删除文件) +- mkdir command (创建目录) -The correct usage of some of them are anyway exemplified in this article, and you can find further information about each of them using the suggested methods in this article. +在这篇文章中你将会找到更多的关于如何更好的使用他们的正确用法和特殊用法. -Though not strictly required to start, as we will be discussing general commands and methods for information search in a Linux system, you should try to install RHEL 7 as explained in the following article. It will make things easier down the road. +虽然没有严格的要求,但是作为讨论常用的Linux命令和方法,你应该安装RHEL7 来尝试使用文章中提到的命令.这将会使你学习起来更省力. -- [Red Hat Enterprise Linux (RHEL) 7 Installation Guide][7] +- [红帽企业版Linux(RHEL)7 安装指南][7] -### Interacting with the Linux Shell ### +### 使用Shell进行交互 ### +如果我们使用文本模式登陆Linux,我们就无法使用鼠标在默认的shell。另一方面,如果我们使用图形化界面登陆,我们将会通过启动一个终端来开启shell,无论那种方式,我们都会看到用户提示,并且我们可以开始输入并且执行命令(当按下Enter时,命令就会被执行) -If we log into a Linux box using a text-mode login screen, chances are we will be dropped directly into our default shell. On the other hand, if we login using a graphical user interface (GUI), we will have to open a shell manually by starting a terminal. Either way, we will be presented with the user prompt and we can start typing and executing commands (a command is executed by pressing the Enter key after we have typed it). -Commands are composed of two parts: +当我们使用文本模式登陆Linux时, +命令是由两个部分组成的: -- the name of the command itself, and -- arguments +- 命令本身 +- 参数 -Certain arguments, called options (usually preceded by a hyphen), alter the behavior of the command in a particular way while other arguments specify the objects upon which the command operates. +某些参数,称为选项(通常使用一个连字符区分),改变了由其他参数定义的命令操作. -The type command can help us identify whether another certain command is built into the shell or if it is provided by a separate package. The need to make this distinction lies in the place where we will find more information about the command. For shell built-ins we need to look in the shell’s man page, whereas for other binaries we can refer to its own man page. +命令的类型可以帮助我们识别某一个特定的命令是由shell内建的还是由一个单独的包提供。这样的区别在于我们能够找到更多关于该信息的命令,对shell内置的命令,我们需要看shell的ManPage,如果是其他提供的,我们需要看它自己的ManPage. ![Check Shell built in Commands](http://www.tecmint.com/wp-content/uploads/2015/02/Check-shell-built-in-Commands.png) -Check Shell built in Commands +检查Shell的内建命令 -In the examples above, cd and type are shell built-ins, while top and less are binaries external to the shell itself (in this case, the location of the command executable is returned by type). +在上面的例子中, cd 和 type 是shell内建的命令,top和 less 是由其他的二进制文件提供的(在这种情况下,type将返回命令的位置) +其他的内建命令 -Other well-known shell built-ins include: - -- [echo command][8]: Displays strings of text. -- [pwd command][9]: Prints the current working directory. +- [echo command][8]: 展示字符串 +- [pwd command][9]: 输出当前的工作目录 ![More Built in Shell Commands](http://www.tecmint.com/wp-content/uploads/2015/02/More-Built-in-Shell-Commands.png) -More Built in Shell Commands +更多内建函数 -**exec command** +**exec 命令** -Runs an external program that we specify. Note that in most cases, this is better accomplished by just typing the name of the program we want to run, but the exec command has one special feature: rather than create a new process that runs alongside the shell, the new process replaces the shell, as can verified by subsequent. +运行我们指定的外部程序。请注意,最好是只输入我们想要运行的程序的名字,不过exec命令有一个特殊的特性:使用旧的shell运行,而不是创建新的进程,可以作为子请求的验证. - # ps -ef | grep [original PID of the shell process] + # ps -ef | grep [shell 进程的PID] -When the new process terminates, the shell terminates with it. Run exec top and then hit the q key to quit top. You will notice that the shell session ends when you do, as shown in the following screencast: +当新的进程注销,Shell也随之注销,运行 exec top 然后按下 q键来退出top,你会注意到shell 会话会结束,如下面的屏幕录像展示的那样: 注:youtube视频 -**export command** +**export 命令** -Exports variables to the environment of subsequently executed commands. +输出之后执行的命令的环境的变量 -**history Command** +**history 命令** -Displays the command history list with line numbers. A command in the history list can be repeated by typing the command number preceded by an exclamation sign. If we need to edit a command in history list before executing it, we can press Ctrl + r and start typing the first letters associated with the command. When we see the command completed automatically, we can edit it as per our current need: +展示数行之前的历史命令.在感叹号前输入命令编号可以再次执行这个命令.如果我们需要编辑历史列表中的命令,我们可以按下 Ctrl + r 并输入与命令相关的第一个字符. +当我们看到的命令自动补全,我们可以根据我们目前的需要来编辑它: 注:youtube视频 -This list of commands is kept in our home directory in a file called .bash_history. The history facility is a useful resource for reducing the amount of typing, especially when combined with command line editing. By default, bash stores the last 500 commands you have entered, but this limit can be extended by using the HISTSIZE environment variable: +命令列表会保存在一个叫 .bash_history的文件里.history命令是一个非常有用的用于减少输入次数的工具,特别是进行命令行编辑的时候.默认情况下,bash保留最后输入的500个命令,不过可以通过修改 HISTSIZE 环境变量来增加: + ![Linux history Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-history-Command.png) -Linux history Command +Linux history 命令 -But this change as performed above, will not be persistent on our next boot. In order to preserve the change in the HISTSIZE variable, we need to edit the .bashrc file by hand: +但上述变化,在我们的下一次启动不会保留。为了保持HISTSIZE变量的变化,我们需要通过手工修改文件编辑: - # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) + # 设置history请看 HISTSIZE 和 HISTFILESIZE 在 bash(1)的文档 HISTSIZE=1000 -**Important**: Keep in mind that these changes will not take effect until we restart our shell session. +**重要**: 我们的更改不会生效,除非我们重启了系统 -**alias command** +**alias 命令** +没有参数或使用-p参数将会以 名称=值的标准形式输出alias 列表.当提供了参数时,一个alias 将被定义给给定的命令和值 -With no arguments or with the -p option prints the list of aliases in the form alias name=value on standard output. When arguments are provided, an alias is defined for each name whose value is given. +使用alias ,我们可以创建我们自己的命令,或修改现有的命令,包括需要的参数.举个例子,假设我们想别名 ls 到 ls –color=auto ,这样就可以使用不同颜色输出文件、目录、链接 -With alias, we can make up our own commands or modify existing ones by including desired options. For example, suppose we want to alias ls to ls –color=auto so that the output will display regular files, directories, symlinks, and so on, in different colors: # alias ls='ls --color=auto' ![Linux alias Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-alias-Command.png) -Linux alias Command +Linux 别名命令 -**Note**: That you can assign any name to your “new command” and enclose as many commands as desired between single quotes, but in that case you need to separate them by semicolons, as follows: +**Note**: 你可以给你的新命令起任何的名字,并且附上足够多的使用单引号分割的参数,但是这样的情况下你要用分号区分开他们. # alias myNewCommand='cd /usr/bin; ls; cd; clear' -**exit command** +**exit 命令** -The exit and logout commands both terminate the shell. The exit command terminates any shell, but the logout command terminates only login shells—that is, those that are launched automatically when you initiate a text-mode login. +Exit和logout命令都是退出shell.exit命令退出所有的shell,logout命令只注销登陆的shell,其他的自动以文本模式启动的shell不算. -If we are ever in doubt as to what a program does, we can refer to its man page, which can be invoked using the man command. In addition, there are also man pages for important files (inittab, fstab, hosts, to name a few), library functions, shells, devices, and other features. +如果我们对某个程序由疑问,我们可以看他的man Page,可以使用man命令调出它,额外的,还有一些重要的文件的手册页(inittab,fstab,hosts等等),库函数,shells,设备及其他功能 -#### Examples: #### +#### 举例: #### -- man uname (print system information, such as kernel name, processor, operating system type, architecture, and so on). -- man inittab (init daemon configuration). +- man uname (输出系统信息,如内核名称、处理器、操作系统类型、架构等). +- man inittab (初始化守护设置). -Another important source of information is provided by the info command, which is used to read info documents. These documents often provide more information than the man page. It is invoked by using the info keyword followed by a command name, such as: +另外一个重要的信息的来源就是info命令提供的,info命令常常被用来读取信息文件.这些文件往往比manpage 提供更多信息.通过info 关键词调用某个命令的信息 # info ls # info cut -In addition, the /usr/share/doc directory contains several subdirectories where further documentation can be found. They either contain plain-text files or other friendly formats. -Make sure you make it a habit to use these three methods to look up information for commands. Pay special and careful attention to the syntax of each of them, which is explained in detail in the documentation. +另外,在/usr/share/doc 文件夹包含了大量的子目录,里面可以找到大量的文档.他们包含文本文件或其他友好的格式. +确保你使用这三种方法去查找命令的信息。重点关注每个命令文档中介绍的详细的语法 -**Converting Tabs into Spaces with expand Command** +**使用expand命令把tabs转换为空格** -Sometimes text files contain tabs but programs that need to process the files don’t cope well with tabs. Or maybe we just want to convert tabs into spaces. That’s where the expand tool (provided by the GNU coreutils package) comes in handy. +有时候文本文档包含了tabs但是程序无法很好的处理的tabs.或者我们只是简单的希望将tabs转换成空格.这就是为什么expand (GNU核心组件提供)工具出现, -For example, given the file NumbersList.txt, let’s run expand against it, changing tabs to one space, and display on standard output. +举个例子,给我们一个文件 NumberList.txt,让我们使用expand处理它,将tabs转换为一个空格.并且以标准形式输出. # expand --tabs=1 NumbersList.txt ![Linux expand Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-expand-Command.png) -Linux expand Command +Linux expand 命令 -The unexpand command performs the reverse operation (converts spaces into tabs). +unexpand命令可以实现相反的功能(将空格转为tab) **使用head输出文件首行及使用tail输出文件尾行** @@ -234,7 +238,8 @@ tr 命令多用于变化(改变)一个一个的字符活使用字符范围. uniq命令可以帮我们查出或删除文件中的重复的行,默认会写出到stdout.我们应当注意, uniq 只能查出相邻的两个相同的单纯,所以, uniq 往往和sort 一起使用(sort一般用于对文本文件的内容进行排序) -By default, sort takes the first field (separated by spaces) as key field. To specify a different key field, we need to use the -k option. Please note how the output returned by sort and uniq change as we change the key field in the following example: + +默认的,sort 以第一个参数(使用空格区分)为关键字.想要定义特殊的关键字,我们需要使用 -k参数,请注意如何使用sort 和uniq输出我们想要的字段,具体可以看下面的例子 # cat file3 # sort file3 | uniq From a99d9d5631823c6397450eede3f68da9c0af81c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Thu, 23 Jul 2015 20:04:02 +0800 Subject: [PATCH 1473/2517] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?=E3=80=91RHCSA=20Series?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part 02--How to Perform File and Directory Management --- ...s--Part 02--How to Perform File and Directory Management.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md b/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md index 7566862597..abf9910994 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md @@ -1,3 +1,4 @@ +[translating by xiqingongzi] RHCSA Series: How to Perform File and Directory Management – Part 2 ================================================================================ In this article, RHCSA Part 2: File and directory management, we will review some essential skills that are required in the day-to-day tasks of a system administrator. @@ -319,4 +320,4 @@ via: http://www.tecmint.com/file-and-directory-management-in-linux/ [a]:http://www.tecmint.com/author/gacanepa/ [1]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ [2]:http://www.tecmint.com/13-basic-cat-command-examples-in-linux/ -[3]:http://www.tecmint.com/18-tar-command-examples-in-linux/ \ No newline at end of file +[3]:http://www.tecmint.com/18-tar-command-examples-in-linux/ From 26ebcf8f808aed9a554e009e1e8f747dfacb3c1b Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 23 Jul 2015 22:28:52 +0800 Subject: [PATCH 1474/2517] [Translating] sources/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md --- ...to Interactively Perform Tasks with Docker using Kitematic.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md b/sources/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md index 7064da43f2..ca812ae944 100644 --- a/sources/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md +++ b/sources/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md @@ -1,3 +1,4 @@ +Translating by ictlyh Howto Interactively Perform Tasks with Docker using Kitematic ================================================================================ In this article, we'll learn about the installating Kitematic in Windows Operating System and deploying a Hello World Nginx Web Server. Kitematic is a free and open source software which is a modern designed GUI software that allows us to interactively perform tasks with docker. Kitematic has a beautiful design and pretty good interface. It is pretty fast and easy to setup our containers out of the box without needing to enter commands for it, we can deploy our apps it in just a click with its GUI inteface. Kitematic has Docker Hub Intergration which allows us to search any required image, pull and deploy our apps with it. It also has a beautiful feature to switch to CUI mode simultaneously. Currently, it includes some features like automatically map ports, visually change environment variables, configuring volumes, streamline logs and many more. From 9fcb9d83b21f2ef340f73e6b4a7025c73215bcff Mon Sep 17 00:00:00 2001 From: alim0x Date: Thu, 23 Jul 2015 23:52:54 +0800 Subject: [PATCH 1475/2517] [Part One]17 - The history of Android --- .../17 - The history of Android.md | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/sources/talk/The history of Android/17 - The history of Android.md b/sources/talk/The history of Android/17 - The history of Android.md index 2e60a864ab..397d4c3184 100644 --- a/sources/talk/The history of Android/17 - The history of Android.md +++ b/sources/talk/The history of Android/17 - The history of Android.md @@ -1,20 +1,18 @@ -alim0x translating - -The history of Android +安卓编年史 ================================================================================ -![The Honeycomb app lineup lost a ton of apps. This also shows the notification panel and the new quick settings.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/apps-and-notifications2.png) -The Honeycomb app lineup lost a ton of apps. This also shows the notification panel and the new quick settings. -Photo by Ron Amadeo +![蜂巢的应用列表少了很多应用。上图还展示了通知中心和新的快速设置。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/apps-and-notifications2.png) +蜂巢的应用列表少了很多应用。上图还展示了通知中心和新的快速设置。 +Ron Amadeo 供图 -The default app icons were slashed from 32 to 25, and two of those were third-party games. Since Honeycomb was not for phones and Google wanted the default apps to all be tablet-optimized, a lot of apps didn't make the cut. We lost the Amazon MP3 store, Car Home, Facebook, Google Goggles, Messaging, News and Weather, Phone, Twitter, Google Voice, and Voice Dialer. Google was quietly building a music service that would launch soon, so the Amazon MP3 store needed to go anyway. Car Home, Messaging, and Phone made little sense on a non-phone device, Facebook and Twitter still don't have tablet Android apps, and Goggles, News and Weather, and Voice Dialer were barely supported applications that most people wouldn't miss. +默认的应用图标从32个减少到了25个,其中还有两个是第三方的游戏。因为蜂巢不是为手机设计的,而且谷歌希望默认应用都是为平板优化的,很多应用因此没有成为默认应用。被去掉的应用有亚马逊 MP3 商店,Car Home,Facebook,Google Goggles,信息,新闻与天气,电话,Twitter,谷歌语音,以及语音拨号。谷歌正在悄悄打造的音乐服务将于不久后面世,所以亚马逊 MP3 商店需要为它让路。Car Home,信息以及电话对一部不是手机的设备来说没有多大意义,Facebook 和 Twitter还没有平板版应用,Goggles,新闻与天气以及语音拨号几乎没什么人注意,就算移除了大多数人也不会想念它们的。 -Almost every app icon was new. Just like the switch from the G1 to the Motorola Droid, the biggest impetus for change was probably the bump in resolution. The Nexus S had an 800×480 display, and Gingerbread came with art assets to match. The Xoom used a whopping 1280×800 10-inch display, which meant nearly every piece of art had to go. But again, this time a real designer was in charge, and things were a lot more cohesive. Honeycomb marked the switch from a vertically scrolling app drawer to paginated horizontal drawer. This change made sense on a horizontal device, but on phones it was still much faster to navigate the app drawer with a flingable, vertical list. +几乎每个应用图标都是全新设计的。就像是从 G1 切换到摩托罗拉 Droid,变化的最大动力是分辨率的提高。Nexus S 有一块800×480分辨率的显示屏,姜饼重新设计了图标等资源来适应它。Xoom 巨大的1280×800 10英寸显示屏意味着几乎所有设计都要重做。但是再说一次,这次是有真正的设计师在负责,所有东西看起来更有整体性了。蜂巢的应用列表从纵向滚动变为了横向分页式。这个变化对横屏设备有意义,而对手机来说,查找一个应用还是纵向滚动列表比较快。 -The second Honeycomb screenshot shows the new notification panel. The gray and black Gingerbread design was tossed for another straight-black panel that gave off a blue glow. At the top was a block showing the time, date, connection status, battery, and a shortcut to the notification quick settings, and below that were the actual notifications. Non-permanent notifications could now be dismissed by tapping on an "X" on the right side of the notification. Honeycomb was the first version to enable controls within a notification. The first (and at the launch of Honeycomb, only) app to take advantage of this was the new Google Music app, which placed previous, play/pause, and next buttons in its notification. These new controls could be accessed from any app and made controlling music a breeze. +第二张蜂巢截图展示的是新通知中心。姜饼中的灰色和黑色设计已经被抛弃了,现在是黑色面板带蓝色光晕。上面一块显示着日期时间,连接状态,电量和打开快速设置的按钮,下面是实际的通知。非持续性通知现在可以通过通知右侧的“X”来关闭。蜂巢是第一个支持通知内控制的版本。第一个(也是蜂巢发布时唯一一个)利用了此特性的应用是新的谷歌音乐,在它的通知上有上一曲,播放/暂停,下一曲按钮。这些控制可以在任何应用中访问到,这让控制音乐播放变成了一件轻而易举的事情。 !["Add to home screen" was given a zoomed-out interface for easy organizing. The search interface split auto suggest and universal search into different panes.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/widgetkeyboard.png) "Add to home screen" was given a zoomed-out interface for easy organizing. The search interface split auto suggest and universal search into different panes. -Photo by Ron Amadeo +Ron Amadeo 供图 Pressing the plus button in the top right corner of the home screen or long pressing on the background would open the new home screen configuration interface. Honeycomb showed a zoomed-out view of all the home screens along the top of the screen, and it filled the bottom half of the screen with a tabbed drawer containing widgets and shortcuts. Items could be dragged out of the bottom drawer and into any of the five home screens. Gingerbread would just show a list of text, but Honeycomb showed full thumbnail previews of the widgets. This gave you a much better idea of what a widget would look like instead of an app-name-only description like "calendar." @@ -22,7 +20,7 @@ The larger screen of the Motorola Xoom allowed the keyboard to take on a more PC ![Gmail on Honeycomb versus Gmail on Gingerbread with the menu open. Buttons were placed on the main screen for easier discovery.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/thebasics.png) Gmail on Honeycomb versus Gmail on Gingerbread with the menu open. Buttons were placed on the main screen for easier discovery. -Photo by Ron Amadeo +Ron Amadeo 供图 Gmail demonstrated all the new UI concepts in Honeycomb. Android 3.0 did away with hiding all the controls behind a menu button. There was now a strip of icons along the top of the screen called the Action Bar, which lifted many useful controls to the main screen where users could see them. Gmail showed buttons for search, compose, and refresh, and it put less useful controls like settings, help, and feedback in a dropdown called the "overflow" button. Tapping checkboxes or selecting text would cause the entire action bar to change to icons relating to those actions—for instance, selecting text would bring up cut, copy, and select all buttons. @@ -32,7 +30,7 @@ Honeycomb also introduced the "Fragments" API, which allowed developers to use a ![The calculator finally used regular Android buttons, but someone spilled blue ink on the calendar.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/calculendar.png) The calculator finally used regular Android buttons, but someone spilled blue ink on the calendar. -Photo by Ron Amadeo +Ron Amadeo 供图 For the first time in Android's history, the calculator got a makeover with non-custom buttons, so it actually looked like part of the OS. The bigger screen made room for more buttons, enough that all the calculator functionality could fit on one screen. The calendar greatly benefited from the extra space, gaining much more room for appointment text and controls. The action bar at the top of the screen held buttons to switch views, along with showing the current time span and common controls. Appointment blocks switched to a white background with the calendar corner only showing in the top right corner. At the bottom (or side, in horizontal view) were boxes showing the month calendar and a list of displayed calendars. @@ -40,19 +38,19 @@ The scale of the calendar could be adjusted, too. By performing a pinch zoom ges ![The new camera interface, showing off the live "Negative" effect.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/camera.png) The new camera interface, showing off the live "Negative" effect. -Photo by Ron Amadeo +Ron Amadeo 供图 The giant 10-inch Xoom tablet did have a camera, which meant that it also had a camera app. The Tron redesign finally got rid of the old faux-leather look that Google came up with in Android 1.6. The controls were laid out in a circle around the shutter button, bringing to mind the circular controls and dials on a real camera. The Cooliris-derived speech bubble popups were changed to glowing, semi-transparent black boxes. The Honeycomb screenshot shows the new "color effect" functionality, which applied a filter to the viewfinder in real time. Unlike the Gingerbread camera app, this didn't support a portrait orientation—it was limited to landscape only. Taking a portrait picture with a 10-inch tablet doesn't make much sense, but then neither does taking a landscape one. ![The clock app didn't get quite as much love as other areas. Google just threw it into a tiny box and called it a day.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/clocks.png) The clock app didn't get quite as much love as other areas. Google just threw it into a tiny box and called it a day. -Photo by Ron Amadeo +Ron Amadeo 供图 Tons of functionality went out the door when it came time to remake the clock app. The entire "Deskclock" concept was kicked out the door, replaced with a simple large display of the time against a plain black background. The ability to launch other apps and view the weather was gone, as was the ability of the clock app to use your wallpaper. Google sometimes gave up when it came time to design a tablet-sized interface, like here, where it just threw the alarm interface into a tiny, centered dialog box. ![The Music app finally got the ground-up redesign it has needed forever.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/muzack.png) The Music app finally got the ground-up redesign it has needed forever. -Photo by Ron Amadeo +Ron Amadeo 供图 While music received a few minor additions during its life, this was really the first time since Android 0.9 that it received serious attention. The highlight of the redesign was a don't-call-it-coverflow scrolling 3D album art view, called "New and Recent." Instead of the tabs added in Android 2.1, navigation was handled by a Dropbox box in the Action Bar. While "New and Recent" had 3D scrolling album art, "Albums" used a flat grid of albums thumbnails. The other sections had totally different designs, too. "Songs" used a vertically scrolling list of text, and "Playlists," "Genres," and "Artists" used stacked album art. @@ -62,7 +60,7 @@ Just like the Cooliris Gallery in Android 2.1, Google Music would blow up one of ![Some of the new Google Maps was really nice, and some of it was from Android 1.5.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/maps.png) Some of the new Google Maps was really nice, and some of it was from Android 1.5. -Photo by Ron Amadeo +Ron Amadeo 供图 Google Maps received another redesign for the big screen. This one would stick around for a while and used a semi-transparent black action bar for all the controls. Search was again the primary function, given the first spot in the action bar, but this time it was an actual search bar you could type in, instead of a search bar-shaped button that launched a completely different interface. Google finally gave up on dedicating screen space to actual zoom buttons, relying on only gestures to control the map view. While the feature has since been ported to all old versions of Maps, Honeycomb was the first version to feature 3D building outlines on the map. Dragging two fingers down on the map would "tilt" the map view and show the sides of the buildings. You could freely rotate and the buildings would adjust, too. From d60b3356d63a9ce8161a89697866038254aae291 Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 24 Jul 2015 00:54:00 +0800 Subject: [PATCH 1476/2517] Delete 20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md --- ...diting is supported GRUB Error In Linux.md | 88 ------------------- 1 file changed, 88 deletions(-) delete mode 100644 sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md diff --git a/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md b/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md deleted file mode 100644 index a1efae1a37..0000000000 --- a/sources/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md +++ /dev/null @@ -1,88 +0,0 @@ -translating... - -Fix Minimal BASH like line editing is supported GRUB Error In Linux -================================================================================ -The other day when I [installed Elementary OS in dual boot with Windows][1], I encountered a Grub error at the reboot time. I was presented with command line with error message: - -**Minimal BASH like line editing is supported. For the first word, TAB lists possible command completions. anywhere else TAB lists possible device or file completions.** - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_Linux_1.jpeg) - -Indeed this is not an error specific to Elementary OS. It is a common [Grub][2] error that could occur with any Linux OS be it Ubuntu, Fedora, Linux Mint etc. - -In this post we shall see **how to fix this “minimal BASH like line editing is supported” Grub error in Ubuntu** based Linux systems. - -> You can read this tutorial to fix similar and more frequent issue, [error: no such partition grub rescue in Linux][3]. - -### Prerequisites ### - -To fix this issue, you would need the followings: - -- A live USB or disk of the same OS and same version -- A working internet connection in the live session - -Once you make sure that you have the prerequisites, let’s see how to fix the black screen of death for Linux (if I can call it that ;)). - -### How to fix this “minimal BASH like line editing is supported” Grub error in Ubuntu based Linux ### - -I know that you might point out that this Grub error is not exclusive to Ubuntu or Ubuntu based Linux distributions, then why am I putting emphasis on the world Ubuntu? The reason is, here we will take an easy way out and use a tool called **Boot Repair** to fix our problem. I am not sure if this tool is available for other distributions like Fedora. Without wasting anymore time, let’s see how to solve minimal BASH like line editing is supported Grub error. - -### Step 1: Boot in lives session ### - -Plug in the live USB and boot in to the live session. - -### Step 2: Install Boot Repair ### - -Once you are in the lives session, open the terminal and use the following commands to install Boot Repair: - - sudo add-apt-repository ppa:yannubuntu/boot-repair - sudo apt-get update - sudo apt-get install boot-repair - -Note: Follow this tutorial to [fix failed to fetch cdrom apt-get update cannot be used to add new CD-ROMs error][4], if you encounter it while running the above command. - -### Step 3: Repair boot with Boot Repair ### - -Once you installed Boot Repair, run it from the command line using the following command: - - boot-repair & - -Actually things are pretty straight forward from here. You just need to follow the instructions provided by Boot Repair tool. First, click on **Recommended repair** option in the Boot Repair. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu.png) - -It will take couple of minutes for Boot Repair to analyze the problem with boot and Grub. Afterwards, it will provide you some commands to use in the command line. Copy the commands one by one in terminal. For me it showed me a screen like this: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_1.png) - -It will do some processes after you enter these commands: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_2.png) - -Once the process finishes, it will provide you a URL which consists of the logs of the boot repair. If your boot issue is not fixed even now, you can go to the forum or mail to the dev team and provide them the URL as a reference. Cool, isn’t it? - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Final_Ubuntu.png) - -After the boot repair finishes successfully, shutdown your computer, remove the USB and boot again. For me it booted successfully but added two additional lines in the Grub screen. Something which was not of importance to me as I was happy to see the system booting normally again. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_Linux_2.jpeg) - -### Did it work for you? ### - -So this is how I fixed **minimal BASH like line editing is supported Grub error in Elementary OS Freya**. How about you? Did it work for you? Feel free to ask a question or drop a suggestion in the comment box below. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/guide-install-elementary-os-luna/ -[2]:http://www.gnu.org/software/grub/ -[3]:http://itsfoss.com/solve-error-partition-grub-rescue-ubuntu-linux/ -[4]:http://itsfoss.com/fix-failed-fetch-cdrom-aptget-update-add-cdroms/ From f350e4d324be02ca8a230655efb7b9cffb199901 Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 24 Jul 2015 00:54:32 +0800 Subject: [PATCH 1477/2517] Create 20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md --- ...diting is supported GRUB Error In Linux.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 translated/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md diff --git a/translated/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md b/translated/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md new file mode 100644 index 0000000000..4edaa333d8 --- /dev/null +++ b/translated/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md @@ -0,0 +1,86 @@ +修复Linux中的提供最小化类BASH命令行编辑GRUB错误 +================================================================================ +这两天我[安装了Elementary OS和Windows双系统][1],在启动的时候遇到了一个Grub错误。命令行中呈现如下信息: + +**提供最小化类BASH命令行编辑。对于第一个词,TAB键补全可以使用的命令。除此之外,TAB键补全可用的设备或文件。** + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_Linux_1.jpeg) + +事实上这并不是Elementary OS独有的错误。这是常见的[Grub][2]错误,会在Ubuntu,Fedora,Linux Mint等Linux操作系统上发生。 + +通过这篇文章里我们可以学到基于Linux系统**如何修复Ubuntu中出现的“minimal BASH like line editing is supported” Grub错误**。 + +> 你可以参阅这篇教程来修复类似的高频问题,[错误:分区未找到Linux grub救援模式][3]。 + +### 先决条件 ### + +要修复这个问题,你需要达成以下的条件: + +- 一个包含相同版本、相同OS的LiveUSB或磁盘 +- 当前会话的Internet连接正常工作 + +在确认了你拥有先决条件了之后,让我们看看如何修复Linux的死亡黑屏(如果我可以这样的称呼它的话;))。 + +### 如何在基于Ubuntu的Linux中修复“minimal BASH like line editing is supported” Grub错误 ### + +我知道你一定疑问这种Grub错误并不局限于在基于Ubuntu的Linux发行版上发生,那为什么我要强调在基于Ubuntu的发行版上呢?原因是,在这里我们将采用一个简单的方法并叫作**Boot Repair**的工具来修复我们的问题。我并不确定在其他的诸如Fedora的发行版中是否有这个工具可用。不再浪费时间,我们来看如何修复minimal BASH like line editing is supported Grub错误。 + +### 步骤 1: 引导进入lives会话 ### + +插入live USB,引导进入live会话。 + +### 步骤 2: 安装 Boot Repair ### + +等你进入了lives会话后,打开终端使用以下命令来安装Boot Repair: + + sudo add-apt-repository ppa:yannubuntu/boot-repair + sudo apt-get update + sudo apt-get install boot-repair + +注意:推荐这篇教程[如何修复 apt-get update 无法添加新的 CD-ROM 的错误][4],如果你在运行以上命令是遭遇同样的问题。 + +### 步骤 3: 使用Boot Repair修复引导 ### + +装完Boot Repair后,在命令行运行如下命令启动: + + boot-repair & + +其实操作非常简单直接,你仅需按照Boot Repair工具提供的说明操作即可。首先,点击Boot Repair中的**Recommended repair**选项。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu.png) + +Boot Repair需要花费一些时间来分析引导和Grub中存在的问题。然后,它会提供一些可在命令行中直接运行的命令。将这些命令一个个在终端中执行。我这边屏幕上显示的是: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_1.png) + +在输入了这些命令之后,它会执行执行一段时间: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_2.png) + +在这一过程结束后,它会提供一个由boot repair的日志组成的网页网址。如果你的引导问题这样都没有修复,你就可以去社区或是发邮件给开发团队并提交该网址作为参考。很酷!不是吗? + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Final_Ubuntu.png) + +在boot repair成功完成后,关闭你的电脑,移除USB并再次引导。我这就能成功的引导了,但是在Grub画面上会多出额外的两行。相比于看到系统能够再次正常引导的喜悦这些对我来说并不重要。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_Linux_2.jpeg) + +### 对你有效吗? ### + +这就是我修复**Elementary OS Freya中的minimal BASH like line editing is supported Grub 错误**的方法。怎么样?是否对你也有效呢?请自由的在下方的评论区提出你的问题和建议。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux/ + +作者:[Abhishek][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/guide-install-elementary-os-luna/ +[2]:http://www.gnu.org/software/grub/ +[3]:http://itsfoss.com/solve-error-partition-grub-rescue-ubuntu-linux/ +[4]:http://itsfoss.com/fix-failed-fetch-cdrom-aptget-update-add-cdroms/ From 4a394b553573a26188f105912f575637c5b3f691 Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 24 Jul 2015 01:00:48 +0800 Subject: [PATCH 1478/2517] Update 20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md --- ... up IPv6 BGP peering and filtering in Quagga BGP router.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md b/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md index cae05670ba..033e03be35 100644 --- a/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md +++ b/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md @@ -1,3 +1,5 @@ +translating... + How to set up IPv6 BGP peering and filtering in Quagga BGP router ================================================================================ In the previous tutorials, we demonstrated how we can set up a [full-fledged BGP router][1] and configure [prefix filtering][2] with Quagga. In this tutorial, we are going to show you how we can set up IPv6 BGP peering and advertise IPv6 prefixes through BGP. We will also demonstrate how we can filter IPv6 prefixes advertised or received by using prefix-list and route-map features. @@ -255,4 +257,4 @@ via: http://xmodulo.com/ipv6-bgp-peering-filtering-quagga-bgp-router.html [1]:http://xmodulo.com/centos-bgp-router-quagga.html [2]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html [3]:http://ask.xmodulo.com/open-port-firewall-centos-rhel.html -[4]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html \ No newline at end of file +[4]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html From d1c99b629a22b5ea8b291ec613398a337207ab34 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Fri, 24 Jul 2015 07:51:06 +0800 Subject: [PATCH 1479/2517] Update 20150722 How To Manage StartUp Applications In Ubuntu.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- .../20150722 How To Manage StartUp Applications In Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150722 How To Manage StartUp Applications In Ubuntu.md b/sources/tech/20150722 How To Manage StartUp Applications In Ubuntu.md index 3f41b91a19..f14d983707 100644 --- a/sources/tech/20150722 How To Manage StartUp Applications In Ubuntu.md +++ b/sources/tech/20150722 How To Manage StartUp Applications In Ubuntu.md @@ -1,3 +1,5 @@ +FSSlc translating + How To Manage StartUp Applications In Ubuntu ================================================================================ ![Manage startup applications in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Manage-Start-up-apps-in-Ubuntu.png) @@ -110,4 +112,4 @@ via: http://itsfoss.com/manage-startup-applications-ubuntu/ [a]:http://itsfoss.com/author/abhishek/ [1]:https://wiki.gnome.org/action/show/Projects/Caribou?action=show&redirect=Caribou -[2]:http://itsfoss.com/applications-manage-wallpapers-ubuntu/ \ No newline at end of file +[2]:http://itsfoss.com/applications-manage-wallpapers-ubuntu/ From 97dbfec2dad1b0a591426fa8f54f151964756ed7 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 24 Jul 2015 08:33:11 +0800 Subject: [PATCH 1480/2517] =?UTF-8?q?=E8=A1=A5=E5=85=85=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @xiqingongzi 译文应该挪到 translated 的对应目录下。 --- ...t 01--Reviewing Essential Commands and System Documentation.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md (100%) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/translated/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md similarity index 100% rename from sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md rename to translated/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md From 79be0795fd44a98d3f85077dc6b9dbee9d1d855f Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 24 Jul 2015 09:14:28 +0800 Subject: [PATCH 1481/2517] PUB:20150616 XBMC--build a remote control @zpl1025 --- .../20150616 XBMC--build a remote control.md | 148 +++++++++--------- 1 file changed, 74 insertions(+), 74 deletions(-) rename {translated/tech => published}/20150616 XBMC--build a remote control.md (59%) diff --git a/translated/tech/20150616 XBMC--build a remote control.md b/published/20150616 XBMC--build a remote control.md similarity index 59% rename from translated/tech/20150616 XBMC--build a remote control.md rename to published/20150616 XBMC--build a remote control.md index 7347aca243..a606bc1cab 100644 --- a/translated/tech/20150616 XBMC--build a remote control.md +++ b/published/20150616 XBMC--build a remote control.md @@ -1,16 +1,16 @@ -XBMC:自制遥控 +为 Kodi 自制遥控器 ================================================================================ **通过运行在 Android 手机上的自制遥控器来控制你的家庭媒体播放器。** -**XBMC** 一款很优秀的软件,能够将几乎所有电脑变身成媒体中心。它可以播放音乐和视频,显示图片,甚至还能显示天气预报。为了在配置成家庭影院后方便使用,你可以通过手机 app 访问运行在已连接到 Wi-Fi 的 XBMC 机器上的服务来控制它。可以找到很多这种工具,几乎覆盖所有智能手机系统。 +**Kodi** 是一款很优秀的软件,能够将几乎所有电脑变身成媒体中心。它可以播放音乐和视频,显示图片,甚至还能显示天气预报。为了在配置成家庭影院后方便使用,你可以通过手机 app 访问运行在连接到 Wi-Fi 的 XBMC 机器上的服务来控制它。可以找到很多这种工具,几乎覆盖所有智能手机系统。 -> ### Kodi ### +> **XBMC** > -> 在你阅读这篇文章的时候,**XBMC** 可能已经成为历史。因为法律原因(因为名字 **XBMC** 或 X**-Box Media Center** 里引用了不再支持的过时硬件)项目组决定使用新的名字 **Kodi**。不过,除了名字,其他的都会保持原样。或者说除开通常新版本中所期待的大量新改进。这一般不会影响到遥控软件,它应该能在已有的 **XBMC** 系统和新的 Kodi 系统上都能工作。 +> Kodi 原名叫做 XBMC,在你阅读这篇文章的时候,**XBMC** 已经成为历史。因为法律原因(因为名字 **XBMC** 或 X**-Box Media Center** 里引用了不再支持的过时硬件)项目组决定使用新的名字 **Kodi**。不过,除了名字,其他的都会保持原样。或者说除开通常新版本中所期待的大量新改进。这一般不会影响到遥控软件,它应该能在已有的 **XBMC** 系统和新的 Kodi 系统上都能工作。 -我们目前配置了一个 **XBMC** 系统用于播放音乐,不过我们找到的所有 XBMC 遥控没一个好用的,特别是和媒体中心连接的电视没打开的时候。它们都有点太复杂了,集成了太多功能在手机的小屏幕上。我们希望能有这样的系统,从最开始就是设计成只用于访问音乐库和电台插件,所以我们决定自己实现一个。它不需要用到 XBMC 的所有功能,因为除了音乐以外的任务,我们可以简单地切换使用通用的 XBMC 遥控。我们的测试系统是一个刷了 RaspBMC 发行版的树莓派,但是我们要做的工具并不受限于树莓派或那个发行版,它应该可以匹配任何安装了相关插件的基于 Linux 的 XBMC 系统。 +我们目前已经配置好了一个用于播放音乐的 **Kodi** 系统,不过我们找到的所有 Kodi 遥控没一个好用的,特别是和媒体中心连接的电视没打开的时候。它们都有点太复杂了,集成了太多功能在手机的小屏幕上。我们希望能有这样的系统,从最开始就是设计成只用于访问音乐库和电台插件,所以我们决定自己实现一个。它不需要用到 Kodi 的所有功能,因为除了音乐以外的任务,我们可以简单地切换使用通用的 Kodi 遥控。我们的测试系统是一个刷了 RaspBMC 发行版的树莓派,但是我们要做的工具并不受限于树莓派或Kodi那个发行版,它应该可以匹配任何安装了相关插件的基于 Linux 的 Kodi 系统。 -首先,遥控程序需要一个用户界面。大多数 XBMC 遥控程序都是独立的 app。不过对于我们要做的这个音乐控制程序,我们希望用户可以不用安装任何东西就可以使用。显然我们需要使用网页界面。XBMC 本身自带网页服务器,但是为了获得更多权限,我们还是使用了独立的网页框架。在同一台电脑上跑两个以上网页服务器没有问题,只不过它们不能使用相同的端口。 +首先,遥控程序需要一个用户界面。大多数 Kodi 遥控程序都是独立的 app。不过对于我们要做的这个音乐控制程序,我们希望用户可以不用安装任何东西就可以使用。显然我们需要使用网页界面。Kodi 本身自带网页服务器,但是为了获得更多权限,我们还是使用了独立的网页框架。在同一台电脑上跑两个以上网页服务器没有问题,只不过它们不能使用相同的端口。 有几个网页框架可以使用。而我们选用 Bottle 是因为它是一个简单高效的框架,而且我们也确实用不到任何高级功能。Bottle 是一个 Python 模块,所以这也将是我们编写服务器模块的语言。 @@ -18,7 +18,7 @@ XBMC:自制遥控 sudo apt-get install python-bottle -遥控程序实际上只是连接用户和系统的中间层。Bottle 提供了和用户交互的方式,而我们将通过 JSON API 来和 **XBMC** 交互。这样可以让我们通过发送 JSON 格式消息的方式去控制媒体播放器。 +遥控程序实际上只是连接用户和系统的中间层。Bottle 提供了和用户交互的方式,而我们将通过 JSON API 来和 **Kodi** 交互。这样可以让我们通过发送 JSON 格式消息的方式去控制媒体播放器。 我们将用到一个叫做 xbmcjson 的简单 XBMC JASON API 封装。足够用来发送控制请求,而不需要关心实际的 JSON 格式以及和服务器通讯的无聊事。它没有包含在 PIP 包管理中,所以你得直接从 **GitHub** 安装: @@ -35,13 +35,13 @@ XBMC:自制遥控 from xbmcjson import XBMC from bottle import route, run, template, redirect, static_file, request import os - xbmc = XBMC(“http://192.168.0.5/jsonrpc”, “xbmc”, “xbmc”) - @route(‘/hello/’) + xbmc = XBMC("http://192.168.0.5/jsonrpc", "xbmc", "xbmc") + @route('/hello/') def index(name): - return template(‘

Hello {{name}}!

’, name=name) - run(host=”0.0.0.0”, port=8000) + return template('

Hello {{name}}!

', name=name) + run(host="0.0.0.0", port=8000) -这样程序将连接到 **XBMC**(不过实际上用不到);然后 Bottle 会开始伺服网站。在我们的代码里,它将监听主机 0.0.0.0(意味着允许所有主机连接)的端口 8000。它只设定了一个站点,就是 /hello/XXXX,这里的 XXXX 可以是任何内容。不管 XXXX 是什么都将作为参数名传递给 index()。然后再替换进去 HTML 网页模版。 +这样程序将连接到 **Kodi**(不过实际上用不到);然后 Bottle 会开始提供网站服务。在我们的代码里,它将监听主机 0.0.0.0(意味着允许所有主机连接)的端口 8000。它只设定了一个站点,就是 /hello/XXXX,这里的 XXXX 可以是任何内容。不管 XXXX 是什么都将作为参数名传递给 index()。然后再替换进去 HTML 网页模版。 你可以先试着把上面内容写到一个文件(我们取的名字是 remote.py),然后用下面的命令启动: @@ -51,56 +51,56 @@ XBMC:自制遥控 @route() 用来设定网页服务器的路径,而函数 index() 会返回该路径的数据。通常是返回由模版生成的 HTML 页面,但是并不是说只能这样(后面会看到)。 -随后,我们将给应用添加更多页面入口,让它变成一个全功能的 XBMC 遥控,但仍将采用相同代码结构。 +随后,我们将给应用添加更多页面入口,让它变成一个全功能的 Kodi 遥控,但仍将采用相同代码结构。 -XBMC JSON API 接口可以从和 XBMC 机器同网段的任意电脑上访问。也就是说你可以在自己的笔记本上开发,然后再布置到媒体中心上,而不需要浪费时间上传每次改动。 +XBMC JSON API 接口可以从和 Kodi 机器同网段的任意电脑上访问。也就是说你可以在自己的笔记本上开发,然后再布置到媒体中心上,而不需要浪费时间上传每次改动。 模版 - 比如前面例子里的那个简单模版 - 是一种结合 Python 和 HTML 来控制输出的方式。理论上,这俩能做很多很多事,但是会非常混乱。我们将只是用它们来生成正确格式的数据。不过,在开始动手之前,我们先得准备点数据。 -> ### Paste ### +> **Paste** > -> Bottle 自带网页服务器,就是我们用来测试遥控程序的。不过,我们发现它性能有时不够好。当我们的遥控程序正式上线时,我们希望页面能更快一点显示出来。Bottle 可以和很多不同的网页服务器配合工作,而我们发现 Paste 用起来非常不错。而要使用的话,只要简单地安装(Debian 系统里的 python-paste 包),然后修改一下代码里的 run 调用: +> Bottle 自带网页服务器,我们用它来测试遥控程序。不过,我们发现它性能有时不够好。当我们的遥控程序正式上线时,我们希望页面能更快一点显示出来。Bottle 可以和很多不同的网页服务器配合工作,而我们发现 Paste 用起来非常不错。而要使用的话,只要简单地安装(Debian 系统里的 python-paste 包),然后修改一下代码里的 run 调用: > -> run(host=hostname, port=hostport, server=”paste”) +> run(host=hostname, port=hostport, server="paste") > > 你可以在 [http://bottlepy.org/docs/dev/deployment.html][1] 找到如何使用其他服务器的相关细节。 -#### 从 XBMC 获取数据 #### +#### 从 Kodi 获取数据 #### XBMC JSON API 分成 14 个命名空间:JSONRPC, Player, Playlist, Files, AudioLibrary, VideoLibrary, Input, Application, System, Favourites, Profiles, Settings, Textures 和 XBMC。每个都可以通过 Python 的 XBMC 对象访问(Favourites 除外,明显是个疏忽)。每个命名空间都包含许多方法用于对程序的控制。例如,Playlist.GetItems() 可以用来获取某个特定播放列表的内容。服务器会返回给我们 JSON 格式的数据,但 xbmcjson 模块会为我们转化成 Python 词典。 -我们需要用到 XBMC 里的两个组件来控制播放:播放器和播放列表。播放器带有播放列表并在每首歌结束时从列表里取下一首。为了查看当前正在播放的内容,我们需要获取正在工作的播放器的 ID,然后根据它找到当前播放列表的 ID。这个可以通过下面的代码来实现: +我们需要用到 Kodi 里的两个组件来控制播放:播放器和播放列表。播放器处理播放列表并在每首歌结束时从列表里取下一首。为了查看当前正在播放的内容,我们需要获取正在工作的播放器的 ID,然后根据它找到当前播放列表的 ID。这个可以通过下面的代码来实现: def get_playlistid(): player = xbmc.Player.GetActivePlayers() - if len(player[‘result’]) > 0: - playlist_data = xbmc.Player.GetProperties({“playerid”:0, “properties”:[“playlistid”]}) - if len(playlist_data[‘result’]) > 0 and “playlistid” in playlist_data[‘result’].keys(): - return playlist_data[‘result’][‘playlistid’] + if len(player['result']) > 0: + playlist_data = xbmc.Player.GetProperties({"playerid":0, "properties":["playlistid"]}) + if len(playlist_data['result']) > 0 and "playlistid" in playlist_data['result'].keys(): + return playlist_data['result']['playlistid'] return -1 -如果当前没有播放器在工作(就是说,返回数据的结果部分的长度是 0),或者当前播放器不带播放列表,这样的话函数会返回 -1。其他时候,它会返回当前播放列表的数字 ID。 +如果当前没有播放器在工作(就是说,返回数据的结果部分的长度是 0),或者当前播放器没有处理播放列表,这样的话函数会返回 -1。其他时候,它会返回当前播放列表的数字 ID。 -当我们拿到当前播放列表的 ID 后,就可以获取列表的细节内容。按照我们的需求,有两个重要的地方:播放列表里包含的项,以及当前播放所处的位置(已经播放过的项并不会从播放列表移除,只是移动当前播放位置)。 +当我们拿到当前播放列表的 ID 后,就可以获取该列表的细节内容。按照我们的需求,有两个重要的地方:播放列表里包含的项,以及当前播放所处的位置(已经播放过的项并不会从播放列表移除,只是移动当前播放位置)。 def get_playlist(): playlistid = get_playlistid() if playlistid >= 0: - data = xbmc.Playlist.GetItems({“playlistid”:playlistid, “properties”: [“title”, “album”, “artist”, “file”]}) - position_data = xbmc.Player.GetProperties({“playerid”:0, ‘properties’:[“position”]}) - position = int(position_data[‘result’][‘position’]) - return data[‘result’][‘items’][position:], position + data = xbmc.Playlist.GetItems({"playlistid":playlistid, "properties": ["title", "album", "artist", "file"]}) + position_data = xbmc.Player.GetProperties({"playerid":0, 'properties':["position"]}) + position = int(position_data['result']['position']) + return data['result']['items'][position:], position return [], -1 -这样可以返回以正在播放的项开始的列表(因为我们并不关心已经播放过的内容),而且也包含了位置信息用来从列表里移除项。 +这样可以返回正在播放的项开始的列表(因为我们并不关心已经播放过的内容),而且也包含了用来从列表里移除项的位置信息。 ![Image](http://www.linuxvoice.com/wp-content/uploads/2015/04/xbmc2-large.jpg) API 文档在这里:[http://wiki.xbmc.org/?title=JSON-RPC_API/v6][2]。它列出了所有支持的函数,但是关于具体如何使用的描述有点太简单了。 -> ### JSON ### +> **JSON** > -> JSON 是 JavaScript Object Notation 的缩写,开始设计用于 JavaScript 对象的序列化。目前仍然起到这个作用,但是它也是用来编码任意数据的一种很好用的方式。 +> JSON 是 JavaScript Object Notation 的缩写,最初设计用于 JavaScript 对象的序列化。目前仍然起到这个作用,但是它也是用来编码任意数据的一种很好用的方式。 > > JSON 对象都是这样的格式: > @@ -110,18 +110,18 @@ API 文档在这里:[http://wiki.xbmc.org/?title=JSON-RPC_API/v6][2]。它列 > > 在字典数据结构里,值本身可以是另一个 JSON 对象,或者一个列表,所以下面的格式也是正确的: > -> {“name”:“Ben”, “jobs”:[“cook”, “bottle-washer”], “appearance”: {“height”:195, “skin”:“fair”}} +> {"name":"Ben", "jobs":["cook", "bottle-washer"], "appearance": {"height":195, "skin":"fair"}} > -> JSON 通常在网络服务中用来发送和接收数据,并且大多数编程语言都能很好地支持,所以如果你熟悉 Python 的话,你应该可以使用你熟悉的编程语言调用相同的接口来轻松地控制 XBMC。 +> JSON 通常在网络服务中用来发送和接收数据,并且大多数编程语言都能很好地支持,所以如果你熟悉 Python 的话,你应该可以使用你熟悉的编程语言调用相同的接口来轻松地控制 Kodi。 #### 整合到一起 #### 把之前的功能连接到 HTML 页面很简单: - @route(‘/juke’) + @route('/juke') def index(): current_playlist, position = get_playlist() - return template(‘list’, playlist=current_playlist, offset = position) + return template('list', playlist=current_playlist, offset = position) 只需要抓取播放列表(调用我们之前定义的函数),然后将结果传递给负责显示的模版。 @@ -131,57 +131,57 @@ API 文档在这里:[http://wiki.xbmc.org/?title=JSON-RPC_API/v6][2]。它列 % if playlist is not None: % position = offset % for song in playlist: - {{song[‘title’]}} - % if song[‘type’] == ‘unknown’: + {{song['title']}} + % if song['type'] == 'unknown': Radio % else: - {{song[‘artist’][0]}} + {{song['artist'][0]}} % end % if position != offset: -
remove + remove % else: - skip + skip % end
% position += 1 % end -可以看到,模版大部分是用 HTML 写的,只有一小部分用来控制输出的其他代码。用两个括号括起来的变量是输出位置(像我们在第一个 ‘hello world’ 例子里看到的)。你也可以嵌入以百分号开头的 Python 代码。因为没有缩进,你需要用一个 % end 来结束当前的代码块(就像循环或 if 语句)。 +可以看到,模版大部分是用 HTML 写的,只有一小部分用来控制输出的其他代码。用两个大括号括起来的变量是输出位置(像我们在第一个 'hello world' 例子里看到的)。你也可以嵌入以百分号开头的 Python 代码。因为没有缩进,你需要用一个 `% end` 来结束当前的代码块(就像循环或 if 语句)。 -这个模版首先检查列表是否为空,然后遍历里面的每一项。每一项会用粗体显示歌曲名字,然后是艺术家名字,然后是一个是否跳过(如果是当前正在播的歌曲)或从列表移除的链接。所有歌曲的类型都是 ‘song’,如果类型是 ‘unknown’,那就不是歌曲而是网络电台。 +这个模版首先检查列表是否为空,然后遍历里面的每一项。每一项会用粗体显示歌曲名字,然后是艺术家名字,然后是一个是否跳过(如果是当前正在播的歌曲)或从列表移除的链接。所有歌曲的类型都是 'song',如果类型是 'unknown',那就不是歌曲而是网络电台。 /remove/ 和 /skip/ 路径只是简单地封装了 XBMC 控制功能,在改动生效后重新加载 /juke: - @route(‘/skip/’) + @route('/skip/') def index(position): - print xbmc.Player.GoTo({‘playerid’:0, ‘to’:’next’}) - redirect(“/juke”) - @route(‘/remove/’) + print xbmc.Player.GoTo({'playerid':0, 'to':'next'}) + redirect("/juke") + @route('/remove/') def index(position): playlistid = get_playlistid() if playlistid >= 0: - xbmc.Playlist.Remove({‘playlistid’:int(playlistid), ‘position’:int(position)}) - redirect(“/juke”) + xbmc.Playlist.Remove({'playlistid':int(playlistid), 'position':int(position)}) + redirect("/juke") 当然,如果不能往列表里添加歌曲的话那这个列表管理功能也不行。 因为一旦播放列表结束,它就消失了,所以你需要重新创建一个,这会让事情复杂一些。而且有点让人迷惑的是,播放列表是通过调用 Playlist.Clear() 方法来创建的。这个方法也还用来删除包含网络电台(类型是 unknown)的播放列表。另一个麻烦的地方是列表里的网络电台开始播放后就不会停,所以如果当前在播网络电台,也会需要清除播放列表。 -这些页面包含了指向 /play/ 的链接来播放歌曲。通过下面的代码处理: +这些页面包含了指向 /play/\ 的链接来播放歌曲。通过下面的代码处理: - @route(‘/play/’) + @route('/play/') def index(id): playlistid = get_playlistid() playlist, not_needed= get_playlist() - if playlistid < 0 or playlist[0][‘type’] == ‘unknown’: - xbmc.Playlist.Clear({“playlistid”:0}) - xbmc.Playlist.Add({“playlistid”:0, “item”:{“songid”:int(id)}}) - xbmc.Player.open({“item”:{“playlistid”:0}}) + if playlistid < 0 or playlist[0]['type'] == 'unknown': + xbmc.Playlist.Clear({"playlistid":0}) + xbmc.Playlist.Add({"playlistid":0, "item":{"songid":int(id)}}) + xbmc.Player.open({"item":{"playlistid":0}}) playlistid = 0 else: - xbmc.Playlist.Add({“playlistid”:playlistid, “item”:{“songid”:int(id)}}) + xbmc.Playlist.Add({"playlistid":playlistid, "item":{"songid":int(id)}}) remove_duplicates(playlistid) - redirect(“/juke”) + redirect("/juke") 最后一件事情是实现 remove_duplicates 调用。这并不是必须的 - 而且还有人并不喜欢这个 - 不过可以保证同一首歌不会多次出现在播放列表里。 @@ -191,40 +191,40 @@ API 文档在这里:[http://wiki.xbmc.org/?title=JSON-RPC_API/v6][2]。它列 还需要处理一下 UI,不过功能已经有了。 -> ### 日志 ### +> **日志** > > 通常拿到 XBMC JSON API 并不清楚能用来做什么,而且它的文档也有点模糊。找出如何使用的一种方式是看别的遥控程序是怎么做的。如果打开日志功能,就可以在使用其他遥控程序的时候看到哪个 API 被调用了,然后就可以应用到在自己的代码里。 > -> 要打开日志功能,把 XBMC 媒体中心 接到显示器上,再依次进入设置 > 系统 > 调试,打开允许调试日志。在打开日志功能后,还需要登录到 XBMC 机器上(比如通过 SSH),然后就可以查看日志了。日志文件的位置应该显示在 XBMC 界面左上角。在 RaspBMC 系统里,文件位置是 /home/pi/.xbmc/temp/xbmc.log。你可以通过下面的命令实时监视哪个 API 接口被调用了: +> 要打开日志功能,把 Kodi 媒体中心 接到显示器上,再依次进入设置 > 系统 > 调试,打开允许调试日志。在打开日志功能后,还需要登录到 Kodi 机器上(比如通过 SSH),然后就可以查看日志了。日志文件的位置应该显示在 Kodi 界面左上角。在 RaspBMC 系统里,文件位置是 /home/pi/.xbmc/temp/xbmc.log。你可以通过下面的命令实时监视哪个 API 接口被调用了: > > cd /home/pi/.xbmc/temp -> tail -f xbmc.log | grep “JSON” +> tail -f xbmc.log | grep "JSON" #### 增加功能 #### -上面的代码都是用来播放 XBMC 媒体库里的歌曲的,但我们还希望能播放网络电台。每个插件都有自己的独立 URL 可以通过普通的 XBMC JSON 命令来获取信息。举个例子,要从电台插件里获取选中的电台,可以使用; +上面的代码都是用来播放 Kodi 媒体库里的歌曲的,但我们还希望能播放网络电台。每个插件都有自己的独立 URL 可以通过普通的 XBMC JSON 命令来获取信息。举个例子,要从电台插件里获取选中的电台,可以使用; - @route(‘/radio/’) + @route('/radio/') def index(): - my_stations = xbmc.Files.GetDirectory({“directory”:”plugin://plugin.audio.radio_de/stations/my/”, “properties”: - [“title”,”thumbnail”,”playcount”,”artist”,”album”,”episode”,”season”,”showtitle”]}) - if ‘result’ in my_stations.keys(): - return template(‘radio’, stations=my_stations[‘result’][‘files’]) + my_stations = xbmc.Files.GetDirectory({"directory":"plugin://plugin.audio.radio_de/stations/my/", "properties": + ["title","thumbnail","playcount","artist","album","episode","season","showtitle"]}) + if 'result' in my_stations.keys(): + return template('radio', stations=my_stations['result']['files']) else: - return template(‘error’, error=’radio’) + return template('error', error='radio') 这样可以返回一个可以和歌曲一样能添加到播放列表的文件。不过,这些文件能一直播下去,所以(之前说过)在添加其他歌曲的时候需要重新创建列表。 #### 共享歌曲 #### -除了伺服页面模版,Bottle 还支持静态文件。方便用于那些不会因为用户输入而改变的内容。可以是 CSS 文件,一张图片或是一首 MP3 歌曲。在我们的简单遥控程序里(目前)还没有任何用来美化的 CSS 或图片,不过我们增加了一个下载歌曲的途径。这个可以让媒体中心变成一个存放歌曲的 NAS 盒子。在需要传输大量数据的时候,最好还是用类似 Samba 的功能,但只是下几首歌到手机上的话使用静态文件也是很好的方式。 +除了伺服页面模版,Bottle 还支持静态文件,方便用于那些不会因为用户输入而改变的内容。可以是 CSS 文件,一张图片或是一首 MP3 歌曲。在我们的简单遥控程序里(目前)还没有任何用来美化的 CSS 或图片,不过我们增加了一个下载歌曲的途径。这个可以让媒体中心变成一个存放歌曲的 NAS 盒子。在需要传输大量数据的时候,最好还是用类似 Samba 的功能,但只是下几首歌到手机上的话使用静态文件也是很好的方式。 通过歌曲 ID 来下载的 Bottle 代码: - @route(‘/download/’) + @route('/download/') def index(id): - data = xbmc.AudioLibrary.GetSongDetails({“songid”:int(id), “properties”:[“file”]}) - full_filename = data[‘result’][‘songdetails’][‘file’] + data = xbmc.AudioLibrary.GetSongDetails({"songid":int(id), "properties":["file"]}) + full_filename = data['result']['songdetails']['file'] path, filename = os.path.split(full_filename) return static_file(filename, root=path, download=True) @@ -232,13 +232,13 @@ API 文档在这里:[http://wiki.xbmc.org/?title=JSON-RPC_API/v6][2]。它列 我们已经把所有的代码过了一遍,不过还需要一点工作来把它们集合到一起。可以自己去 GitHub 页面 [https://github.com/ben-ev/xbmc-remote][3] 看下。 -> ### 设置 ### +> **设置** > > 我们的遥控程序已经开发完成,还需要保证让它在媒体中心每次开机的时候都能启动。有几种方式,最简单的是在 /etc/rc.local 里增加一行命令来启动。我们的文件位置在 /opt/xbmc-remote/remote.py,其他文件也和它一起。然后在 /etc/rc.local 最后的 exit 0 之前增加了下面一行。 > > cd /opt/xbmc-remote && python remote.py & -> ### GitHub ### +> **GitHub** > > 这个项目目前还只是个架子,但是 - 我们运营杂志就意味着没有太多自由时间来编程。不过,我们启动了一个 GitHub 项目,希望能持续完善, 而如果你觉得这个项目有用的话,欢迎做出贡献。 > @@ -252,7 +252,7 @@ via: http://www.linuxvoice.com/xbmc-build-a-remote-control/ 作者:[Ben Everard][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From e64f420e21ff0539c4c9cace7934623e07f322e5 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 24 Jul 2015 10:20:47 +0800 Subject: [PATCH 1482/2517] PUB:20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers @XLCYun --- ...Sync Files or Folders Between Computers.md | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md (79%) diff --git a/translated/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md b/published/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md similarity index 79% rename from translated/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md rename to published/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md index 8819c80744..73af381b22 100644 --- a/translated/tech/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md +++ b/published/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md @@ -1,10 +1,10 @@ -Syncthing: 一个跨计算机的私人的文件/文件夹安全同步工具 +Syncthing: 一个在计算机之间同步文件/文件夹的私密安全同步工具 ================================================================================ ### 简介 ### -**Syncthing** 是一个免费开源的工具,它能在你的各个网络计算机间同步文件/文件夹。它不像其它的同步工具,如**BitTorrent Sync**和**Dropbox**那样,它的同步数据是直接从一个系统中直接传输到另一个系统的,并且它是完全开源的,安全且私有的。你所有的珍贵数据都会被存储在你的系统中,这样你就能对你的文件和文件夹拥有全面的控制权,没有任何的文件或文件夹会被存储在第三方系统中。此外,你有权决定这些数据该存于何处,是否要分享到第三方,或这些数据在互联网上的传输方式。 +**Syncthing**是一个免费开源的工具,它能在你的各个网络计算机间同步文件/文件夹。它不像其它的同步工具,如**BitTorrent Sync**和**Dropbox**那样,它的同步数据是直接从一个系统中直接传输到另一个系统的,并且它是完全开源的,安全且私密的。你所有的珍贵数据都会被存储在你的系统中,这样你就能对你的文件和文件夹拥有全面的控制权,没有任何的文件或文件夹会被存储在第三方系统中。此外,你有权决定这些数据该存于何处,是否要分享到第三方,或这些数据在互联网上的传输方式。 -所有的信息通讯都使用TLS进行加密,这样你的数据便能十分安全地逃离窥探。Syncthing有一个强大的响应式的网页管理界面(WebGUI,下同),它能够帮助用户简便地添加,删除和管理那些通过网络进行同步的文件夹。通过使用Syncthing,你可以在多个系统上一次同步多个文件夹。在安装和使用上,Syncthing是一个可移植的,简单但强大的工具。即然文件或文件夹是从一部计算机中直接传输到另一计算机中的,那么你就无需考虑向云服务供应商支付金钱来获取额外的云空间。你所需要的仅仅是非常稳定的LAN/WAN连接和你的系统中足够的硬盘空间。它支持所有的现代操作系统,包括GNU/Linux, Windows, Mac OS X, 当然还有Android。 +所有的信息通讯都使用TLS进行加密,这样你的数据便能十分安全地逃离窥探。Syncthing有一个强大的响应式的网页管理界面(WebGUI,下同),它能够帮助用户简便地添加、删除和管理那些通过网络进行同步的文件夹。通过使用Syncthing,你可以在多个系统上一次同步多个文件夹。在安装和使用上,Syncthing是一个可移植的、简单而强大的工具。即然文件或文件夹是从一部计算机中直接传输到另一计算机中的,那么你就无需考虑向云服务供应商支付金钱来获取额外的云空间。你所需要的仅仅是非常稳定的LAN/WAN连接以及在你的系统中有足够的硬盘空间。它支持所有的现代操作系统,包括GNU/Linux, Windows, Mac OS X, 当然还有Android。 ### 安装 ### @@ -13,7 +13,7 @@ Syncthing: 一个跨计算机的私人的文件/文件夹安全同步工具 ### 系统1细节: ### - **操作系统**: Ubuntu 14.04 LTS server; -- **主机名**: server1.unixmen.local; +- **主机名**: **server1**.unixmen.local; - **IP地址**: 192.168.1.150. - **系统用户**: sk (你可以使用你自己的系统用户) - **同步文件夹**: /home/Sync/ (Syncthing会默认创建) @@ -21,7 +21,7 @@ Syncthing: 一个跨计算机的私人的文件/文件夹安全同步工具 ### 系统2细节 ### - **操作系统**: Ubuntu 14.10 server; -- **主机名**: server.unixmen.local; +- **主机名**: **server**.unixmen.local; - **IP地址**: 192.168.1.151. - **系统用户**: sk (你可以使用你自己的系统用户) - **同步文件夹**: /home/Sync/ (Syncthing会默认创建) @@ -49,7 +49,7 @@ Syncthing: 一个跨计算机的私人的文件/文件夹安全同步工具 cd syncthing-linux-amd64-v0.10.20/ -复制可执行文件"Syncthing"到**$PATH**: +复制可执行文件"syncthing"到**$PATH**: sudo cp syncthing /usr/local/bin/ @@ -57,7 +57,7 @@ Syncthing: 一个跨计算机的私人的文件/文件夹安全同步工具 syncthing -当你执行上述命令后,syncthing会生成一个配置以及一些关键值(keys),并且在你的浏览器上打开一个管理界面。, +当你执行上述命令后,syncthing会生成一个配置以及一些配置键值,并且在你的浏览器上打开一个管理界面。 输入示例: @@ -78,11 +78,11 @@ Syncthing: 一个跨计算机的私人的文件/文件夹安全同步工具 [BQXVO] 15:41:07 INFO: Device BQXVO3D-VEBIDRE-MVMMGJI-ECD2PC3-T5LT3JB-OK4Z45E-MPIDWHI-IRW3NAZ is "server1" at [dynamic] [BQXVO] 15:41:07 INFO: Completed initial scan (rw) of folder default -Syncthing已经被成功地初始化了,网页管理接口也可以通过浏览器在URL: **http://localhost:8080**进行访问了。如上面输入所看到的,Syncthing在你的**home**目录中的Sync目录**下自动为你创建了一个名为**default**的文件夹。 +Syncthing已经被成功地初始化了,网页管理接口也可以通过浏览器访问URL: **http://localhost:8080**。如上面输入所看到的,Syncthing在你的**home**目录中的Sync目录**下自动为你创建了一个名为**default**的文件夹。 -默认情况下,Syncthing的网页管理界面(WebGUI)只能在本地端口(localhost)中进行访问,你需要在两个系统中进行以下操作: +默认情况下,Syncthing的网页管理界面只能在本地端口(localhost)中进行访问,要从远程进行访问,你需要在两个系统中进行以下操作: -首先,按下CTRL+C键来停止Syncthing初始化进程。现在你回到了终端界面。 +首先,按下CTRL+C键来终止Syncthing初始化进程。现在你回到了终端界面。 编辑**config.xml**文件, @@ -115,17 +115,18 @@ Syncthing已经被成功地初始化了,网页管理接口也可以通过浏 现在,在你的浏览器上打开**http://ip-address:8080/**。你会看到下面的界面: ![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server1-Mozilla-Firefox_001.png) + 网页管理界面分为两个窗格,在左窗格中,你应该可以看到同步的文件夹列表。如前所述,文件夹**default**在你初始化Syncthing时被自动创建。如果你想同步更多文件夹,点击**Add Folder**按钮。 在右窗格中,你可以看到已连接的设备数。现在这里只有一个,就是你现在正在操作的计算机。 -### 网页管理界面(WebGUI)上设置Syncthing ### +### 网页管理界面上设置Syncthing ### 为了提高安全性,让我们启用TLS,并且设置访问网页管理界面的管理员用户和密码。要做到这点,点击右上角的齿轮按钮,然后选择**Settings** ![](http://www.unixmen.com/wp-content/uploads/2015/01/Menu_002.png) -输入管理员的帐户名/密码。我设置的是admin/Ubuntu。你可以使用一些更复杂的密码。 +输入管理员的帐户名/密码。我设置的是admin/Ubuntu。你应该使用一些更复杂的密码。 ![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server1-Mozilla-Firefox_004.png) @@ -155,7 +156,7 @@ Syncthing已经被成功地初始化了,网页管理接口也可以通过浏 ![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_010.png) -接着会出现下面的界面。在Device区域粘贴**系统1 ID **。输入设备名称(可选)。在地址区域,你可以输入其它系统(译者注:即粘贴的ID所属的系统,此应为系统1)的IP地址,或者使用默认值。默认值为**dynamic**。最后,选择要同步的文件夹。在我们的例子中,同步文件夹为**default**。 +接着会出现下面的界面。在Device区域粘贴**系统1 ID **。输入设备名称(可选)。在地址区域,你可以输入其它系统( LCTT 译注:即粘贴的ID所属的系统,此应为系统1)的IP地址,或者使用默认值。默认值为**dynamic**。最后,选择要同步的文件夹。在我们的例子中,同步文件夹为**default**。 ![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_009.png) @@ -181,7 +182,7 @@ Syncthing已经被成功地初始化了,网页管理接口也可以通过浏 ![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_018.png) -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_018.png) +![](http://www.unixmen.com/wp-content/uploads/2015/01/Syncthing-server-Mozilla-Firefox_018.png) 现在,在任一个系统中的“**default**”文件夹中放进任意文件或文件夹。你应该可以看到这些文件/文件夹被自动同步到其它系统。 @@ -197,7 +198,7 @@ via: http://www.unixmen.com/syncthing-private-secure-tool-sync-filesfolders-comp 作者:[SK][a] 译者:[XLCYun](https://github.com/XLCYun) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 4670ba75bd1f6cc0287c02ded300eb95a46b8c66 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 24 Jul 2015 10:51:47 +0800 Subject: [PATCH 1483/2517] [Translated]20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md --- ...ndline Usage Every Linux User Must Know.md | 204 ------------------ ...ndline Usage Every Linux User Must Know.md | 193 +++++++++++++++++ 2 files changed, 193 insertions(+), 204 deletions(-) delete mode 100644 sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md create mode 100644 translated/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md diff --git a/sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md b/sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md deleted file mode 100644 index 8833405982..0000000000 --- a/sources/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md +++ /dev/null @@ -1,204 +0,0 @@ -Translating by GOLinu! -12 Useful PHP Commandline Usage Every Linux User Must Know -================================================================================ -In my last post “[How to Use and Execute PHP Codes in Linux Command – line][1]”, I emphasized on running PHP codes directly in Linux Command-line as well as executing PHP script file in Linux Terminal. - -![Run PHP Codes in Linux Commandline](http://www.tecmint.com/wp-content/uploads/2015/07/Run-PHP-Codes-in-Linux-Commandline.jpeg) - -Run PHP Codes in Linux Commandline – Part 2 - -This post aims at making you aware of a few awesome features of PHP usage in Linux terminal. - -Let us configure a few `php.ini` settings in the PHP interactive shell. - -**6. Set PHP Command-line Prompt** - -To set PHP command-line prompt, you need to start a PHP interactive shell from the Linux terminal using following php -a (enabling PHP Interactive mode) command. - - $ php -a - -and then set anything (say Hi Tecmint ::) as PHP interactive shell command prompt, simply as: - - php > #cli.prompt=Hi Tecmint :: - -![Enable PHP Interactive Shell](http://www.tecmint.com/wp-content/uploads/2015/07/Enable-PHP-Interactive-Shell.png) - -Enable PHP Interactive Shell - -Also you can set current time as your command Line Prompt, simply as: - - php > #cli.prompt=`echo date('H:m:s');` > - - 22:15:43 > - -**7. Produce one screen output at a time** - -In our last article, we have used ‘less‘ command over a lots of places pipelined with original command. We did this to get one screen of output where output could not fit on one screen. But we can configure php.ini file to set pager value to less to produce one screen output at a time simply as, - - $ php -a - php > #cli.pager=less - -![Fix PHP Screen Output](http://www.tecmint.com/wp-content/uploads/2015/07/Fix-PHP-Screen-Output.png) - -Fix PHP Screen Output - -So, next time when you run a command (say debugger `phpinfo();`) where the output is too big to fit a screen, it will automatically produce output that fits your current. - - php > phpinfo(); - -![PHP Info Output](http://www.tecmint.com/wp-content/uploads/2015/07/PHP-Info-Output.png) - -PHP Info Output - -**8. Suggestions and TAB completion** - -PHP shell is a smart enough to show you suggestions and TAB Completion. You can use TAB key to use this feature. If more than one option is available for the string that you want to TAB completion, you have to use TAB key twice, else use it once. - -In-case of more than one possibility, use TAB twice. - - php > ZIP [TAB] [TAB] - -In-case of single possibility, use TAB once. - - php > #cli.pager [TAB] - -You can keep pressing TAB for options till values of option are satisfied. All the activities are logged to file `~/.php-history`. - -To check your PHP interactive shell activity log, you may run: - - $ nano ~/.php_history | less - -![Check PHP Interactive Shell Logs](http://www.tecmint.com/wp-content/uploads/2015/07/Check-PHP-Interactive-Shell-Logs.png) - -Check PHP Interactive Shell Logs - -**9. You can use color inside PHP interactive shell. All you need to know are the color codes.** - -Use echo to print the output into various colors, simply as: - - php > echo “color_code1 TEXT second_color_code”; - -or a more explaining example is: - - php > echo "\033[0;31m Hi Tecmint \x1B[0m"; - -![Enable Colors in PHP Shell](http://www.tecmint.com/wp-content/uploads/2015/07/Enable-Colors-in-PHP-Shell.png) - -Enable Colors in PHP Shell - -We have seen till now that pressing the return key means execute the command, however semicolon at the end of each command in Php shell is compulsory. - -**10. Basename in php shell prints the trailing name component of path** - -The basename function in php shell prints the trailing name component from a given string containing the path to a file or directory. - -basename() example #1 and #2. - - php > echo basename("/var/www/html/wp/wp-content/plugins"); - php > echo basename("www.tecmint.com/contact-us.html"); - -The above both examples will output: - - plugins - contact-us.html - -![Print Base Name in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Print-Base-Name-in-PHP.png) - -Print Base Name in PHP - -**11. You may create a file (say test1.txt) using php interactive shell at your Desktop, simply as** - - $ touch("/home/avi/Desktop/test1.txt"); - -We have already seen how fine PHP interactive shell is in Mathematics, Here are a few more examples to stun you. - -**12. Print the length of a string say tecmint.com using PHP interactive shell** - -strlen function used to get a length of the given string. - - php > echo strlen("tecmint.com"); - -![Print Length String in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Print-Length-String-in-PHP.png) - -Print Length String in PHP - -**13. PHP Interactive shell can sort an array. Yes you heard it right** - -Declare Variable a and set it’s value to array(7,9,2,5,10). - - php > $a=array(7,9,2,5,10); - -Sort the numbers in the array. - - php > sort($a); - -Print numbers of the array in sorted order along with their order. The first one is [0]. - - php > print_r($a); - Array - ( - [0] => 2 - [1] => 5 - [2] => 7 - [3] => 9 - [4] => 10 - ) - -![Sort Arrays in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Sort-Arrays-in-PHP.png) - -Sort Arrays in PHP - -**14. Get the value of Pi in PHP Interactive Shell** - - php > echo pi(); - - 3.1415926535898 - -**15. Print the square root of a number say 32** - - php > echo sqrt(150); - - 12.247448713916 - -**16. Echo a random number from the range be 0-10** - - php > echo rand(0, 10); - -![Get Random Number in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Get-Random-Number-in-PHP.png) - -Get Random Number in PHP - -**17. Get md5sum and sha1sum for a given string For example, let’s check the md5sum and sha1sum of a string (say avi) on php shell and cross check the result with those md5sum and sha1sum generated by bash shell.** - - php > echo md5(avi); - 3fca379b3f0e322b7b7967bfcfb948ad - - php > echo sha1(avi); - 8f920f22884d6fea9df883843c4a8095a2e5ac6f - ----------- - - $ echo -n avi | md5sum - 3fca379b3f0e322b7b7967bfcfb948ad - - - $ echo -n avi | sha1sum - 8f920f22884d6fea9df883843c4a8095a2e5ac6f - - -![Check md5sum and sha1sum in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Check-md5sum-and-sha1sum.png) - -Check md5sum and sha1sum in PHP - -This is just a glimpse of what can be achieved from a PHP Shell and how interactive is PHP shell. That’s all for now from me. Keep Connected to tecmint. Provide us with your valuable feedback in the comments. Like and share us to get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/run-php-codes-from-linux-commandline/ diff --git a/translated/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md b/translated/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md new file mode 100644 index 0000000000..8c00c6a75c --- /dev/null +++ b/translated/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md @@ -0,0 +1,193 @@ +每个Linux人应知应会的12个有用的PHP命令行用法 +================================================================================ +在我上一篇文章“[在Linux命令行中使用并执行PHP代码][1]”中,我同时着重讨论了直接在Linux命令行中运行PHP代码以及在Linux终端中执行PHP脚本文件。 + +![Run PHP Codes in Linux Commandline](http://www.tecmint.com/wp-content/uploads/2015/07/Run-PHP-Codes-in-Linux-Commandline.jpeg) + +在Linux命令行运行PHP代码——第二部分 + +本文旨在让你了解一些相当不错的Linux终端中的PHP用法特性。 + +让我们先在PHP交互shell中来对`php.ini`设置进行一些配置吧。 + +**6. 设置PHP命令行提示符** + +要设置PHP命令行提示,你需要在Linux终端中使用下面的php -a(启用PHP交互模式)命令开启一个PHP交互shell。 + + $ php -a + +然后,设置任何东西(比如说Hi Tecmint ::)作为PHP交互shell的命令提示符,操作如下: + + php > #cli.prompt=Hi Tecmint :: + +![Enable PHP Interactive Shell](http://www.tecmint.com/wp-content/uploads/2015/07/Enable-PHP-Interactive-Shell.png) +启用PHP交互Shell + +同时,你也可以设置当前时间作为你的命令行提示符,操作如下: + + php > #cli.prompt=`echo date('H:m:s');` > + + 22:15:43 > + +**7. 每次输出一屏** + +在我们上一篇文章中,我们已经在原始命令中通过管道在很多地方使用了‘less‘命令。通过该操作,我们可以在那些不能一次满屏输出的地方获得每次一屏的输出。但是,我们可以通过配置php.ini文件,设置pager的值为less以每次输出一屏,操作如下: + + $ php -a + php > #cli.pager=less + +![Fix PHP Screen Output](http://www.tecmint.com/wp-content/uploads/2015/07/Fix-PHP-Screen-Output.png) +固定PHP屏幕输出 + +这样,下次当你运行一个命令(比如说条调试器`phpinfo();`)的时候,而该命令的输出内容又太过庞大而不能固定在一屏,它就会自动产生适合你当前屏幕的输出结果。 + + php > phpinfo(); + +![PHP Info Output](http://www.tecmint.com/wp-content/uploads/2015/07/PHP-Info-Output.png) +PHP信息输出 + +**8. 建议和TAB补全** + +PHP shell足够智能,它可以显示给你建议和进行TAB补全,你可以通过TAB键来使用该功能。如果对于你想要用TAB补全的字符串而言有多个选项,那么你需要使用两次TAB键来完成,其它情况则使用一次即可。 + +如果有超过一个的可能性,请使用两次TAB键。 + + php > ZIP [TAB] [TAB] + +如果只有一个可能性,只要使用一次TAB键。 + + php > #cli.pager [TAB] + +你可以一直按TAB键来获得选项,直到选项值满足要求。所有的行为都将记录到`~/.php-history`文件。 + +要检查你的PHP交互shell活动日志,你可以执行: + + $ nano ~/.php_history | less + +![Check PHP Interactive Shell Logs](http://www.tecmint.com/wp-content/uploads/2015/07/Check-PHP-Interactive-Shell-Logs.png) +检查PHP交互Shell日志 + +**9. 你可以在PHP交互shell中使用颜色,你所需要知道的仅仅是颜色代码。** + +使用echo来打印各种颜色的输出结果,看我信手拈来: + + php > echo “color_code1 TEXT second_color_code”; + +一个更能说明问题的例子是: + + php > echo "\033[0;31m Hi Tecmint \x1B[0m"; + +![Enable Colors in PHP Shell](http://www.tecmint.com/wp-content/uploads/2015/07/Enable-Colors-in-PHP-Shell.png) +在PHP Shell中启用彩色 + +到目前为止,我们已经看到,按回车键意味着执行命令,然而PHP Shell中各个命令结尾的分号是必须的。 + +**10. PHP shell中的用以打印后续组件的路径名称** + +PHP shell中的basename函数从给出的包含有到文件或目录路径的后续组件的路径名称。 + +basename()样例#1和#2。 + + php > echo basename("/var/www/html/wp/wp-content/plugins"); + php > echo basename("www.tecmint.com/contact-us.html"); + +上述两个样例都将输出: + + plugins + contact-us.html + +![Print Base Name in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Print-Base-Name-in-PHP.png) +在PHP中打印基本名称 + +**11. 你可以使用PHP交互shell在你的桌面创建文件(比如说test1.txt),就像下面这么简单** + + $ touch("/home/avi/Desktop/test1.txt"); + +我们已经见识了PHP交互shell在数学运算中有多优秀,这里还有更多一些例子会令你吃惊。 + +**12. 使用PHP交互shell打印比如像tecmint.com这样的字符串的长度** + +strlen函数用于获取指定字符串的长度。 + + php > echo strlen("tecmint.com"); + +![Print Length String in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Print-Length-String-in-PHP.png) +在PHP中打印字符串长度 + +**13. PHP交互shell可以对数组排序,是的,你没听错** + +声明变量a,并将其值设置为array(7,9,2,5,10)。 + + php > $a=array(7,9,2,5,10); + +对数组中的数字进行排序。 + + php > sort($a); + +以排序后的顺序打印数组中的数字,同时打印序号,第一个为[0]。 + + php > print_r($a); + Array + ( + [0] => 2 + [1] => 5 + [2] => 7 + [3] => 9 + [4] => 10 + ) + +![Sort Arrays in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Sort-Arrays-in-PHP.png) +在PHP中对数组排序 + +**14. 在PHP交互Shell中获取Pi的值** + + php > echo pi(); + + 3.1415926535898 + +**15. 打印某个数比如32的平方根** + + php > echo sqrt(150); + + 12.247448713916 + +**16. 从0-10的范围内回显一个随机数** + + php > echo rand(0, 10); + +![Get Random Number in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Get-Random-Number-in-PHP.png) +在PHP中获取随机数 + +**17. 获取某个指定字符串的md5sum和sha1sum,例如,让我们在PHP Shell中检查某个字符串(比如说avi)的md5sum和sha1sum,并交叉检查这些带有bash shell生成的md5sum和sha1sum的结果。** + + php > echo md5(avi); + 3fca379b3f0e322b7b7967bfcfb948ad + + php > echo sha1(avi); + 8f920f22884d6fea9df883843c4a8095a2e5ac6f + +---------- + + $ echo -n avi | md5sum + 3fca379b3f0e322b7b7967bfcfb948ad - + + $ echo -n avi | sha1sum + 8f920f22884d6fea9df883843c4a8095a2e5ac6f - + +![Check md5sum and sha1sum in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Check-md5sum-and-sha1sum.png) +在PHP中检查md5sum和sha1sum + +这里只是PHP Shell中所能获取的功能和PHP Shell的交互特性的惊鸿一瞥,这些就是到现在为止我所讨论的一切。保持和tecmint的连线,在评论中为我们提供你有价值的反馈吧。为我们点赞并分享,帮助我们扩散哦。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/ + +作者:[Avishek Kumar][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/run-php-codes-from-linux-commandline/ From 55f02f7b194d4bcc0cd2dd3f80637d862d36d2dd Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 24 Jul 2015 10:55:00 +0800 Subject: [PATCH 1484/2517] Update 20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md --- ...Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md b/sources/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md index f278c19b5f..b7b95c43b1 100644 --- a/sources/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md +++ b/sources/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How To Fix “The Update Information Is Outdated” In Ubuntu 14.04 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Fix_update_information_is_outdated.jpeg) @@ -55,4 +56,4 @@ via: http://itsfoss.com/fix-update-information-outdated-ubuntu/ [2]:http://itsfoss.com/notification-terminal-command-completion-ubuntu/ [3]:http://itsfoss.com/solve-gpg-error-signatures-verified-ubuntu/ [4]:http://itsfoss.com/install-spotify-ubuntu-1504/ -[5]:http://itsfoss.com/fix-update-errors-ubuntu-1404/ \ No newline at end of file +[5]:http://itsfoss.com/fix-update-errors-ubuntu-1404/ From 955880c1bb38e8e71b8f746d5e04fe3dc3e7bd1b Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 24 Jul 2015 11:02:39 +0800 Subject: [PATCH 1485/2517] Translating by ZTinoZ --- ...709 7 command line tools for monitoring your Linux system.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md index caac29be68..e33c259d5c 100644 --- a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md +++ b/sources/talk/20150709 7 command line tools for monitoring your Linux system.md @@ -54,7 +54,7 @@ Pstree“以树状图显示正在运行中的进程。如果pid被省略的话 ### iostat ### -A crucial factor in your Linux system’s performance is processor and storage usage, which are what the iostat command reports on. As with the ps command, iostat has loads of switches that allow you to select the output format you need as well as sample performance over a time period and then repeat that sampling a number of times before reporting. See [here][10]. +Linux系统的一个至关重要的性能指标是处理器和存储的使用率,它也是iostat命令所报告的内容。如同ps命令一样,iostat有很多选项允许你选择你需要的输出格式,除此之外还有某一段时间范围内的简单性能输出并在报告之前重复抽样多次。详情戳[这里][10]。 -------------------------------------------------------------------------------- From d9e1b6b16fa2d0a5a51ccdd9b6765db167cbb9cb Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 24 Jul 2015 11:03:51 +0800 Subject: [PATCH 1486/2517] Finish the translation by ZTinoZ --- ...50709 7 command line tools for monitoring your Linux system.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/talk/20150709 7 command line tools for monitoring your Linux system.md (100%) diff --git a/sources/talk/20150709 7 command line tools for monitoring your Linux system.md b/translated/talk/20150709 7 command line tools for monitoring your Linux system.md similarity index 100% rename from sources/talk/20150709 7 command line tools for monitoring your Linux system.md rename to translated/talk/20150709 7 command line tools for monitoring your Linux system.md From 2ae4c72b6cb59a7835f10e19723125d81463fc61 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 24 Jul 2015 13:17:53 +0800 Subject: [PATCH 1487/2517] PUB:20150713 How to manage Vim plugins @XLCYun --- .../20150713 How to manage Vim plugins.md | 140 ++++++++++++++++ .../20150713 How to manage Vim plugins.md | 149 ------------------ 2 files changed, 140 insertions(+), 149 deletions(-) create mode 100644 published/20150713 How to manage Vim plugins.md delete mode 100644 translated/tech/20150713 How to manage Vim plugins.md diff --git a/published/20150713 How to manage Vim plugins.md b/published/20150713 How to manage Vim plugins.md new file mode 100644 index 0000000000..52c65e5871 --- /dev/null +++ b/published/20150713 How to manage Vim plugins.md @@ -0,0 +1,140 @@ +如何管理 Vim 插件 +================================================================================ + +Vim是Linux上一个轻量级的通用文本编辑器。虽然它开始时的学习曲线对于一般的Linux用户来说可能很困难,但比起它的好处,这些付出完全是值得的。vim 可以通过完全可定制的插件来增加越来越多的功能。但是,由于它的功能配置比较难,你需要花一些时间去了解它的插件系统,然后才能够有效地去个性化定置Vim。幸运的是,我们已经有一些工具能够使我们在使用Vim插件时更加轻松。而我日常所使用的就是Vundle。 + +### 什么是Vundle ### + +[Vundle][1]意即Vim Bundle,是一个vim插件管理器。Vundle能让你很简单地实现插件的安装、升级、搜索或者清除。它还能管理你的运行环境并且在标签方面提供帮助。在本教程中我们将展示如何安装和使用Vundle。 + +### 安装Vundle ### + +首先,如果你的Linux系统上没有Git的话,先[安装Git][2]。 + +接着,创建一个目录,Vim的插件将会被下载并且安装在这个目录上。默认情况下,这个目录为~/.vim/bundle。 + + $ mkdir -p ~/.vim/bundle + +现在,使用如下指令安装Vundle。注意Vundle本身也是一个vim插件。因此我们同样把vundle安装到之前创建的目录~/.vim/bundle下。 + + $ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim + +### 配置Vundle ### + +现在配置你的.vimrc文件如下: + + set nocompatible " 必需。 + filetype off " 必须。 + + " 在这里设置你的运行时环境的路径。 + set rtp+=~/.vim/bundle/Vundle.vim + + " 初始化vundle + call vundle#begin() + + " 这一行应该永远放在开头。 + Plugin 'gmarik/Vundle.vim' + + " 这个示范来自https://github.com/gmarik/Vundle.vim README + Plugin 'tpope/vim-fugitive' + + " 取自http://vim-scripts.org/vim/scripts.html的插件 + Plugin 'L9' + + " 该Git插件没有放在GitHub上。 + Plugin 'git://git.wincent.com/command-t.git' + + "本地计算机上的Git仓库路径 (例如,当你在开发你自己的插件时) + Plugin 'file:///home/gmarik/path/to/plugin' + + " vim脚本sparkup存放在这个名叫vim的仓库下的一个子目录中。 + " 将这个路径正确地设置为runtimepath。 + Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} + + " 避免与L9发生名字上的冲突 + Plugin 'user/L9', {'name': 'newL9'} + + "所有的插件都应该在这一行之前。 + call vundle#end() " 必需。 + +容我简单解释一下上面的设置:默认情况下,Vundle将从github.com或者vim-scripts.org下载和安装vim插件。你也可以改变这个默认行为。 + +要从github安装插件: + + Plugin 'user/plugin' + +要从 http://vim-scripts.org/vim/scripts.html 处安装: + + Plugin 'plugin_name' + +要从另外一个git仓库中安装: + + Plugin 'git://git.another_repo.com/plugin' + +从本地文件中安装: + + Plugin 'file:///home/user/path/to/plugin' + +你同样可以定制其它东西,例如你的插件的运行时路径,当你自己在编写一个插件时,或者你只是想从其它目录——而不是~/.vim——中加载插件时,这样做就非常有用。 + + Plugin 'rstacruz/sparkup', {'rtp': 'another_vim_path/'} + +如果你有同名的插件,你可以重命名你的插件,这样它们就不会发生冲突了。 + + Plugin 'user/plugin', {'name': 'newPlugin'} + +### 使用Vum命令 ### + +一旦你用vundle设置好你的插件,你就可以通过几个vundle命令来安装、升级、搜索插件,或者清除没有用的插件。 + +#### 安装一个新的插件 #### + +`PluginInstall`命令将会安装所有列在你的.vimrc文件中的插件。你也可以通过传递一个插件名给它,来安装某个的特定插件。 + + :PluginInstall + :PluginInstall <插件名> + +![](https://farm1.staticflickr.com/559/18998707843_438cd55463_c.jpg) + +#### 清除没有用的插件 #### + +如果你有任何没有用到的插件,你可以通过`PluginClean`命令来删除它。 + + :PluginClean + +![](https://farm4.staticflickr.com/3814/19433047689_17d9822af6_c.jpg) + +#### 查找一个插件 #### + +如果你想从提供的插件清单中安装一个插件,搜索功能会很有用。 + + :PluginSearch <文本> + +![](https://farm1.staticflickr.com/541/19593459846_75b003443d_c.jpg) + +在搜索的时候,你可以在交互式分割窗口中安装、清除、重新搜索或者重新加载插件清单。安装后的插件不会自动加载生效,要使其加载生效,可以将它们添加进你的.vimrc文件中。 + +### 总结 ### + +Vim是一个妙不可言的工具。它不单单是一个能够使你的工作更加顺畅高效的默认文本编辑器,同时它还能够摇身一变,成为现存的几乎任何一门编程语言的IDE。 + +注意,有一些网站能帮你找到适合的vim插件。猛击 [http://www.vim-scripts.org][3], Github或者 [http://www.vimawesome.com][4] 获取新的脚本或插件。同时记得使用为你的插件提供的帮助。 + +和你最爱的编辑器一起嗨起来吧! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/manage-vim-plugins.html + +作者:[Christopher Valerio][a] +译者:[XLCYun(袖里藏云)](https://github.com/XLCYun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/valerio +[1]:https://github.com/VundleVim/Vundle.vim +[2]:http://ask.xmodulo.com/install-git-linux.html +[3]:http://www.vim-scripts.org/ +[4]:http://www.vimawesome.com/ + diff --git a/translated/tech/20150713 How to manage Vim plugins.md b/translated/tech/20150713 How to manage Vim plugins.md deleted file mode 100644 index c575d426e3..0000000000 --- a/translated/tech/20150713 How to manage Vim plugins.md +++ /dev/null @@ -1,149 +0,0 @@ - -如何管理Vim插件 -================================================================================ - - - - Vim是Linux上一个轻量级的通用文本编辑器。虽然它开始时的学习曲线对于一般的Linux用户来说可能很困难,但比起它的好处,这些付出完全是值得的。随着功能的增长,在插件工具的应用下,Vim是完全可定制的。但是,由于它高级的功能配置,你需要花一些时间去了解它的插件系统,然后才能够有效地去个性化定置Vim。幸运的是,我们已经有一些工具能够使我们在使用Vim插件时更加轻松。而我日常所使用的就是Vundle. -### 什么是Vundle ### - - [Vundle][1]是一个vim插件管理器,用于支持Vim包。Vundle能让你很简单地实现插件的安装,升级,搜索或者清除。它还能管理你的运行环境并且在标签方面提供帮助。 -### 安装Vundle ### - - 首先,如果你的Linux系统上没有Git的话,先[安装Git][2]. - - 接着,创建一个目录,Vim的插件将会被下载并且安装在这个目录上。默认情况下,这个目录为~/.vim/bundle。 - - $ mkdir -p ~/.vim/bundle - - 现在,安装Vundle如下。注意Vundle本身也是一个vim插件。因此我们同样把vundle安装到之前创建的目录~/.vim/bundle下。 - - $ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim - -### 配置Vundle ### - - 现在配置你的.vimrc文件如下: - - set nocompatible " This is required - " 这是被要求的。(译注:中文注释为译者所加,下同。) - filetype off " This is required - " 这是被要求的。 - - " Here you set up the runtime path  - " 在这里设置你的运行时环境的路径。 - set rtp+=~/.vim/bundle/Vundle.vim - - " Initialize vundle  - " 初始化vundle - call vundle#begin() - - " This should always be the first  - " 这一行应该永远放在前面。 - Plugin 'gmarik/Vundle.vim' - - " This examples are from https://github.com/gmarik/Vundle.vim README - " 这个示范来自https://github.com/gmarik/Vundle.vim README - Plugin 'tpope/vim-fugitive' - - " Plugin from http://vim-scripts.org/vim/scripts.html - " 取自http://vim-scripts.org/vim/scripts.html的插件 - Plugin 'L9' - - " Git plugin not hosted on GitHub - " Git插件,但并不在GitHub上。 - Plugin 'git://git.wincent.com/command-t.git' - - "git repos on your local machine (i.e. when working on your own plugin) - "本地计算机上的Git仓库路径 (例如,当你在开发你自己的插件时) - Plugin 'file:///home/gmarik/path/to/plugin' - - " The sparkup vim script is in a subdirectory of this repo called vim. - " Pass the path to set the runtimepath properly. - " vim脚本sparkup存放在这个名叫vim的仓库下的一个子目录中。 - " 提交这个路径来正确地设置运行时路径 - Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} - - " Avoid a name conflict with L9 - " 避免与L9发生名字上的冲突 - Plugin 'user/L9', {'name': 'newL9'} - - "Every Plugin should be before this line - "所有的插件都应该在这一行之前。 - call vundle#end() " required 被要求的 - - 容我简单解释一下上面的设置:默认情况下,Vundle将从github.com或者vim-scripts.org下载和安装vim插件。你也可以改变这个默认行为。 - - 要从github安装(安装插件,译者注,下同): - Plugin 'user/plugin' - - 要从http://vim-scripts.org/vim/scripts.html处安装: - Plugin 'plugin_name' - - 要从另外一个git仓库中安装: - - Plugin 'git://git.another_repo.com/plugin' - - 从本地文件中安装: - - Plugin 'file:///home/user/path/to/plugin' - - - 你同样可以定制其它东西,例如你的插件运行时路径,当你自己在编写一个插件时,或者你只是想从其它目录——而不是~/.vim——中加载插件时,这样做就非常有用。 - - Plugin 'rstacruz/sparkup', {'rtp': 'another_vim_path/'} - - 如果你有同名的插件,你可以重命名你的插件,这样它们就不会发生冲突了。 - - Plugin 'user/plugin', {'name': 'newPlugin'} - -### 使用Vum命令 ### - 一旦你用vundle设置好你的插件,你就可以通过几个vundle命令来安装,升级,搜索插件,或者清除没有用的插件。 - -#### 安装一个新的插件 #### - - 所有列在你的.vimrc文件中的插件,都会被PluginInstall命令安装。你也可以通递一个插件名给它,来安装某个的特定插件。 - :PluginInstall - :PluginInstall <插件名> - - ![](https://farm1.staticflickr.com/559/18998707843_438cd55463_c.jpg) - -#### 清除没有用的插件 #### - - 如果你有任何没有用到的插件,你可以通过PluginClean命令来删除它. - :PluginClean - - ![](https://farm4.staticflickr.com/3814/19433047689_17d9822af6_c.jpg) - -#### 查找一个插件 #### - - 如果你想从提供的插件清单中安装一个插件,搜索功能会很有用 - :PluginSearch <文本> - - ![](https://farm1.staticflickr.com/541/19593459846_75b003443d_c.jpg) - - - 在搜索的时候,你可以在交互式分割窗口中安装,清除,重新搜索或者重新加载插件清单.安装后的插件不会自动加载生效,要使其加载生效,可以将它们添加进你的.vimrc文件中. -### 总结 ### - - Vim是一个妙不可言的工具.它不单单是一个能够使你的工作更加顺畅高效的默认文本编辑器,同时它还能够摇身一变,成为现存的几乎任何一门编程语言的IDE. - - 注意,有一些网站能帮你找到适合的vim插件.猛击[http://www.vim-scripts.org][3], Github或者 [http://www.vimawesome.com][4] 获取新的脚本或插件.同时记得为你的插件使用帮助供应程序. - - 和你最爱的编辑器一起嗨起来吧! - - -------------------------------------------------------------------------------- - - via: http://xmodulo.com/manage-vim-plugins.html - - 作者:[Christopher Valerio][a] - 译者:[XLCYun(袖里藏云)](https://github.com/XLCYun) - 校对:[校对者ID](https://github.com/校对者ID) - - 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - - [a]:http://xmodulo.com/author/valerio - [1]:https://github.com/VundleVim/Vundle.vim - [2]:http://ask.xmodulo.com/install-git-linux.html - [3]:http://www.vim-scripts.org/ - [4]:http://www.vimawesome.com/ - From 4a754db1fbabed34a794afa6c829e15e8f412e2e Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Fri, 24 Jul 2015 16:12:41 +0800 Subject: [PATCH 1488/2517] Update 20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md --- ... Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md b/sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md index 837a7a2e73..1567211cd5 100644 --- a/sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md +++ b/sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md @@ -1,3 +1,5 @@ +Translating by dingdongnigetou + Install Plex Media Server On Ubuntu / CentOS 7.1 / Fedora 22 ================================================================================ In this article we will show you how easily you can setup Plex Home Media Server on major Linux distributions with their latest releases. After its successful installation of Plex you will be able to use your centralized home media playback system that streams its media to many Plex player Apps and the Plex Home will allows you to setup your environment by adding your devices and to setup a group of users that all can use Plex Together. So let’s start its installation first on Ubuntu 15.04. @@ -188,4 +190,4 @@ via: http://linoxide.com/tools/install-plex-media-server-ubuntu-centos-7-1-fedor 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/kashifs/ \ No newline at end of file +[a]:http://linoxide.com/author/kashifs/ From 079f5a5e043eaea37c76e3dea2fba64740226f20 Mon Sep 17 00:00:00 2001 From: alim0x Date: Fri, 24 Jul 2015 18:32:17 +0800 Subject: [PATCH 1489/2517] [Part Two]17 - The history of Android --- .../17 - The history of Android.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sources/talk/The history of Android/17 - The history of Android.md b/sources/talk/The history of Android/17 - The history of Android.md index 397d4c3184..591e766217 100644 --- a/sources/talk/The history of Android/17 - The history of Android.md +++ b/sources/talk/The history of Android/17 - The history of Android.md @@ -10,16 +10,16 @@ Ron Amadeo 供图 第二张蜂巢截图展示的是新通知中心。姜饼中的灰色和黑色设计已经被抛弃了,现在是黑色面板带蓝色光晕。上面一块显示着日期时间,连接状态,电量和打开快速设置的按钮,下面是实际的通知。非持续性通知现在可以通过通知右侧的“X”来关闭。蜂巢是第一个支持通知内控制的版本。第一个(也是蜂巢发布时唯一一个)利用了此特性的应用是新的谷歌音乐,在它的通知上有上一曲,播放/暂停,下一曲按钮。这些控制可以在任何应用中访问到,这让控制音乐播放变成了一件轻而易举的事情。 -!["Add to home screen" was given a zoomed-out interface for easy organizing. The search interface split auto suggest and universal search into different panes.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/widgetkeyboard.png) -"Add to home screen" was given a zoomed-out interface for easy organizing. The search interface split auto suggest and universal search into different panes. +![“添加到主屏幕”的缩小视图更易于组织布局。搜索界面将自动搜索建议和通用搜索分为两个面板显示。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/widgetkeyboard.png) +“添加到主屏幕”的缩小视图更易于组织布局。搜索界面将自动搜索建议和通用搜索分为两个面板显示。 Ron Amadeo 供图 -Pressing the plus button in the top right corner of the home screen or long pressing on the background would open the new home screen configuration interface. Honeycomb showed a zoomed-out view of all the home screens along the top of the screen, and it filled the bottom half of the screen with a tabbed drawer containing widgets and shortcuts. Items could be dragged out of the bottom drawer and into any of the five home screens. Gingerbread would just show a list of text, but Honeycomb showed full thumbnail previews of the widgets. This gave you a much better idea of what a widget would look like instead of an app-name-only description like "calendar." +点击主屏幕右上角的加号或长按背景空白处就会打开新的主屏幕设置界面。蜂巢会在屏幕上半部分显示所有主屏的缩小视图,下半部分分页显示的是小部件和快捷方式。小部件或快捷方式可以从下半部分的抽屉中拖动到五个主屏幕中的任意一个上。姜饼只会显示一个文本列表,而蜂巢会显示小部件完整的略缩图预览。这让你更清楚一个小部件是什么样子的,而不是像原来的“日历”一样只是一个只有应用名称的描述。 -The larger screen of the Motorola Xoom allowed the keyboard to take on a more PC-style layout, with keys like backspace, enter, shift, and tab put in the traditional locations. The keyboard took on a blueish tint and gained even more spacing between the keys. Google also added a dedicated smiley-face button. :-) +摩托罗拉 Xoom 更大的屏幕让键盘的布局更加接近 PC 风格,退格,回车,shift 以及 tab 都在传统的位置上。键盘带有浅蓝色,并且键与键之间的空间更大了。谷歌还添加了一个专门的笑脸按钮。 :-) -![Gmail on Honeycomb versus Gmail on Gingerbread with the menu open. Buttons were placed on the main screen for easier discovery.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/thebasics.png) -Gmail on Honeycomb versus Gmail on Gingerbread with the menu open. Buttons were placed on the main screen for easier discovery. +![打开菜单的 Gmail 在蜂巢和姜饼上的效果。按钮布置在首屏更容易被发现。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/thebasics.png) +打开菜单的 Gmail 在蜂巢和姜饼上的效果。按钮布置在首屏更容易被发现。 Ron Amadeo 供图 Gmail demonstrated all the new UI concepts in Honeycomb. Android 3.0 did away with hiding all the controls behind a menu button. There was now a strip of icons along the top of the screen called the Action Bar, which lifted many useful controls to the main screen where users could see them. Gmail showed buttons for search, compose, and refresh, and it put less useful controls like settings, help, and feedback in a dropdown called the "overflow" button. Tapping checkboxes or selecting text would cause the entire action bar to change to icons relating to those actions—for instance, selecting text would bring up cut, copy, and select all buttons. From b8b64c4d20be9545c8a7ad5c223e08086778de50 Mon Sep 17 00:00:00 2001 From: alim0x Date: Fri, 24 Jul 2015 23:15:54 +0800 Subject: [PATCH 1490/2517] [Part Three]17 - The history of Android --- .../17 - The history of Android.md | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sources/talk/The history of Android/17 - The history of Android.md b/sources/talk/The history of Android/17 - The history of Android.md index 591e766217..bf86735b7c 100644 --- a/sources/talk/The history of Android/17 - The history of Android.md +++ b/sources/talk/The history of Android/17 - The history of Android.md @@ -22,55 +22,55 @@ Ron Amadeo 供图 打开菜单的 Gmail 在蜂巢和姜饼上的效果。按钮布置在首屏更容易被发现。 Ron Amadeo 供图 -Gmail demonstrated all the new UI concepts in Honeycomb. Android 3.0 did away with hiding all the controls behind a menu button. There was now a strip of icons along the top of the screen called the Action Bar, which lifted many useful controls to the main screen where users could see them. Gmail showed buttons for search, compose, and refresh, and it put less useful controls like settings, help, and feedback in a dropdown called the "overflow" button. Tapping checkboxes or selecting text would cause the entire action bar to change to icons relating to those actions—for instance, selecting text would bring up cut, copy, and select all buttons. +Gmail 示范了蜂巢所有的用户界面概念。安卓 3.0不再把所有控制都隐藏在菜单按钮之后。屏幕的顶部现在有一条带有图标的条带,叫做 Action Bar(操作栏),它将许多常用的控制选项提升到了主屏幕上,用户直接就能看到它们。Gmail 的操作栏显示着搜索,新邮件,刷新按钮,不常用的选项比如设置,帮助,以及反馈放在了“更多”按钮中。点击复选框或选中文本的时候时整个操作栏的图标会变成和操作相关的——举个例子,选择文本会出现复制,粘贴和全选按钮。 -The app icon displayed in the top left corner doubled as a navigation button called "Up." While "Back" worked similarly to a browser back button, navigating to previously visited screens, "Up" would navigate up the app hierarchy. For instance, if you were in the Android Market, pressed the "Email developer" button, and Gmail opened, "Back" would take you back to the Android Market, but "Up" would take you to the Gmail inbox. "Back" might close the current app, but "Up" never would. Apps could control the "Back" button, and they usually reprogrammed it to replicate the "Up" functionality. In practice, there was rarely a difference between the two buttons. +应用左上角显示的图标同时也作为称作“上一级”的导航按钮。“后退”的作用类似浏览器的后退按钮,导航到之前访问的页面,“上一级”则会导航至应用的上一层次。举例来说,如果你在安卓市场,点击“给开发者发邮件”,会打开 Gmail,“后退”会让你返回安卓市场,但是“上一级”会带你到 Gmail 的收件箱。“后退”可能会关闭当前应用,而“上一级”永远不会。应用可以控制“后退”按钮,它们往往重新定义它为“上一级”的功能。事实上,这两个按钮之间几乎没什么不同。 -Honeycomb also introduced the "Fragments" API, which allowed developers to use a single app for tablets and phones. A "Fragment" was a single pane of a user interface. In the Gmail picture above, the left folder list was one fragment and the inbox was another fragment. Phones would show one fragment per screen, and tablets could show two side-by-side. The developer defined the look of individual fragments, and Android would decide how they should be displayed based on the current device. +蜂巢还引入了 “Fragments” API,允许开发者开发同时适用于平板和手机的应用。一个 “Fragments”(格子) 是一个用户界面的面板。在上图的 Gmail 中,左边的文件夹列表是一个格子,收件箱是另一个格子。手机每屏显示一个格子,而平板则可以并列显示两个。开发者可以自行定义单独每个格子的外观,安卓会根据当前的设备决定如何显示它们。 -![The calculator finally used regular Android buttons, but someone spilled blue ink on the calendar.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/calculendar.png) -The calculator finally used regular Android buttons, but someone spilled blue ink on the calendar. +![计算器使用了常规的安卓按钮,但日历看起来像是被谁打翻了蓝墨水。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/calculendar.png) +计算器使用了常规的安卓按钮,但日历看起来像是被谁打翻了蓝墨水。 Ron Amadeo 供图 -For the first time in Android's history, the calculator got a makeover with non-custom buttons, so it actually looked like part of the OS. The bigger screen made room for more buttons, enough that all the calculator functionality could fit on one screen. The calendar greatly benefited from the extra space, gaining much more room for appointment text and controls. The action bar at the top of the screen held buttons to switch views, along with showing the current time span and common controls. Appointment blocks switched to a white background with the calendar corner only showing in the top right corner. At the bottom (or side, in horizontal view) were boxes showing the month calendar and a list of displayed calendars. +这是安卓历史上第一次计算器换上了没有特别定制的按钮,所以它看起来确实是系统的一部分。更大的屏幕有了更多空间容纳按钮,足够将计算器基本功能容纳在一个屏幕上。日历极大地受益于额外的显示空间,有了更多的空间显示事件文本和控制选项。顶部的操作栏有切换视图的按钮,显示当前时间跨度,以及常规按钮。事件块变成了白色背景,日历标识只在左上角显示。在底部(或横屏模式的侧边)显示的是月历和显示的日历列表。 -The scale of the calendar could be adjusted, too. By performing a pinch zoom gesture, portrait week and day views could show between five and 19 hours of appointments on a single screen. The background of the calendar was made up of an uneven blue splotch, which didn't look particularly great and was tossed on later versions. +日历的比例同样可以调整。通过两指缩放手势,纵向的周和日视图能够在一屏内显示五到十九小时的事件。日历的背景由不均匀的蓝色斑点组成,看起来不是特别棒,在随后的版本里就被抛弃了。 -![The new camera interface, showing off the live "Negative" effect.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/camera.png) -The new camera interface, showing off the live "Negative" effect. +![新相机界面,取景器显示的是“负片”效果。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/camera.png) +新相机界面,取景器显示的是“负片”效果。 Ron Amadeo 供图 -The giant 10-inch Xoom tablet did have a camera, which meant that it also had a camera app. The Tron redesign finally got rid of the old faux-leather look that Google came up with in Android 1.6. The controls were laid out in a circle around the shutter button, bringing to mind the circular controls and dials on a real camera. The Cooliris-derived speech bubble popups were changed to glowing, semi-transparent black boxes. The Honeycomb screenshot shows the new "color effect" functionality, which applied a filter to the viewfinder in real time. Unlike the Gingerbread camera app, this didn't support a portrait orientation—it was limited to landscape only. Taking a portrait picture with a 10-inch tablet doesn't make much sense, but then neither does taking a landscape one. +巨大的10英寸 Xoom 平板有个摄像头,这意味着它同样有个相机应用。电子风格的重新设计终于甩掉了谷歌从安卓 1.6 以来使用的仿皮革外观。控制选项以环形排布在快门键周围,让人想起真正的相机上的圆形控制转盘。Cooliris 衍生的弹出对话气泡变成了带光晕的半透明黑色选框。蜂巢的截图显示的是新的“颜色效果”功能,它能给取景器实时加上滤镜效果。不像姜饼的相机应用,它不支持竖屏模式——它被限制在横屏状态。用10英寸的平板拍摄纵向照片没多大意义,但拍摄横向照片也没多大意义。 -![The clock app didn't get quite as much love as other areas. Google just threw it into a tiny box and called it a day.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/clocks.png) -The clock app didn't get quite as much love as other areas. Google just threw it into a tiny box and called it a day. +![时钟应用相比其它地方没受到多少关照。谷歌把它扔进一个小盒子里然后就收工了。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/clocks.png) +时钟应用相比其它地方没受到多少关照。谷歌把它扔进一个小盒子里然后就收工了。 Ron Amadeo 供图 -Tons of functionality went out the door when it came time to remake the clock app. The entire "Deskclock" concept was kicked out the door, replaced with a simple large display of the time against a plain black background. The ability to launch other apps and view the weather was gone, as was the ability of the clock app to use your wallpaper. Google sometimes gave up when it came time to design a tablet-sized interface, like here, where it just threw the alarm interface into a tiny, centered dialog box. +无数功能已经成形了,现在是时候来重制一下时钟了。整个“桌面时钟”概念被踢出门外,取而代之的是在纯黑背景上显示的简单又巨大的时间数字。打开其它应用查看天气的功能不见了,随之而去的还有显示你的壁纸的功能。当要设计平板尺寸的界面时,有时候谷歌就放弃了,就像这里,就只是把时钟界面扔到了一个小小的,居中的对话框里。 -![The Music app finally got the ground-up redesign it has needed forever.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/muzack.png) -The Music app finally got the ground-up redesign it has needed forever. +![音乐应用终于得到了一直以来都需要的完全重新设计。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/muzack.png) +音乐应用终于得到了一直以来都需要的完全重新设计。 Ron Amadeo 供图 -While music received a few minor additions during its life, this was really the first time since Android 0.9 that it received serious attention. The highlight of the redesign was a don't-call-it-coverflow scrolling 3D album art view, called "New and Recent." Instead of the tabs added in Android 2.1, navigation was handled by a Dropbox box in the Action Bar. While "New and Recent" had 3D scrolling album art, "Albums" used a flat grid of albums thumbnails. The other sections had totally different designs, too. "Songs" used a vertically scrolling list of text, and "Playlists," "Genres," and "Artists" used stacked album art. +尽管音乐应用之前有得到一些小的加强,但这是自安卓 0.9 以来它第一次受到正视。重新设计的亮点是一个“别叫它封面流滚动 3D 专辑封面视图”,称作“最新和最近”。导航由操作栏的下拉框解决,取代了安卓 2.1 引入的标签页导航。尽管“最新和最近”有个 3D 滚动专辑封面,“专辑”使用的是专辑略缩图的平面方阵。另一个部分也有个完全不同的设计。“歌曲”使用了垂直滚动的文本列表,“播放列表”,“年代”和“艺术家”用的是堆砌专辑显示。 -In nearly every view, every single item had its own individual menu, usually little arrows in the bottom right corner of an item. For now, these would only show "Play" and "add to Playlist," but this version of Google Music was built for the future. Google was launching a Music service soon, and those individual menus would be needed for things like viewing other content from that artist in the Music Store and managing the cloud storage versus local storage options. +在几乎每个视图中,每个单独的项目有它自己单独的菜单,通常在每项的右下角有个小箭头。眼下这里只会显示“播放”和“添加到播放列表”,但这个版本的谷歌音乐是为未来搭建的。谷歌不久后就要发布音乐服务,这些独立菜单在像是在音乐商店里浏览该艺术家的其它内容,或是管理云存储和本地存储时将会是不可或缺的。 -Just like the Cooliris Gallery in Android 2.1, Google Music would blow up one of your thumbnails and use it as a background. The bottom "Now Playing" bar now displayed the album art, playback controls, and a song progress bar. +正如安卓 2.1 中的 Cooliris 风格的相册,谷歌音乐会将略缩图放大作为背景图片。底部的“正在播放”栏现在显示着专辑封面,播放控制,以及播放进度条。 -![Some of the new Google Maps was really nice, and some of it was from Android 1.5.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/maps.png) -Some of the new Google Maps was really nice, and some of it was from Android 1.5. +![新谷歌地图的一些地方真的很棒,一些却是从安卓 1.5 来的。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/maps.png) +新谷歌地图的一些地方真的很棒,一些却是从安卓 1.5 来的。 Ron Amadeo 供图 -Google Maps received another redesign for the big screen. This one would stick around for a while and used a semi-transparent black action bar for all the controls. Search was again the primary function, given the first spot in the action bar, but this time it was an actual search bar you could type in, instead of a search bar-shaped button that launched a completely different interface. Google finally gave up on dedicating screen space to actual zoom buttons, relying on only gestures to control the map view. While the feature has since been ported to all old versions of Maps, Honeycomb was the first version to feature 3D building outlines on the map. Dragging two fingers down on the map would "tilt" the map view and show the sides of the buildings. You could freely rotate and the buildings would adjust, too. +谷歌地图也为大屏幕进行了重新设计。这个设计将会持续一段时间,它对所有的控制选项用了一个半透明的黑色操作栏。搜索再次成为主要功能,占据了操作栏显要位置,但这回可是真的搜索栏,你可以在里面输入关键字,不像以前那个搜索栏形状的按钮会打开完全不同的界面。谷歌最终还是放弃了给缩放控件留屏幕空间,仅仅依靠手势来控制地图显示。尽管 3D 建筑轮廓这个特性已经被移植到了旧版本的地图中,蜂巢依然是拥有这个特性的第一个版本。双指在地图上向下拖放会“倾斜”地图的视角,展示建筑的侧面。你可以随意旋转,建筑同样会跟着进行调整。 -Not every part of Maps was redesigned. Navigation was untouched from Gingerbread, and some core parts of the interface, like directions, were pulled straight from Android 1.6 and centered in a tiny box. +并不是所有部分都进行了重新设计。导航自姜饼以来就没动过,还有些界面的核心部分,像是路线,直接从安卓 1.6 的设计拿出来,放到一个小盒子里居中放置,仅此而已。 ---------- ![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) -[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. +[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。 [@RonAmadeo][t] @@ -78,7 +78,7 @@ Not every part of Maps was redesigned. Navigation was untouched from Gingerbread via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/17/ -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 302c26094ba3b2c27566762abb4b3470d725d62e Mon Sep 17 00:00:00 2001 From: alim0x Date: Fri, 24 Jul 2015 23:29:41 +0800 Subject: [PATCH 1491/2517] [complete]17 - The history of Android & [translating]18 --- .../The history of Android/18 - The history of Android.md | 4 +++- .../The history of Android/17 - The history of Android.md | 0 2 files changed, 3 insertions(+), 1 deletion(-) rename {sources => translated}/talk/The history of Android/17 - The history of Android.md (100%) diff --git a/sources/talk/The history of Android/18 - The history of Android.md b/sources/talk/The history of Android/18 - The history of Android.md index 2b795adba1..8b303033bc 100644 --- a/sources/talk/The history of Android/18 - The history of Android.md +++ b/sources/talk/The history of Android/18 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x translating + The history of Android ================================================================================ ![Yet another Android Market redesign dips its toe into the "cards" interface that would become a Google staple.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/play-store.png) @@ -80,4 +82,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor [1]:http://techcrunch.com/2014/03/03/gartner-195m-tablets-sold-in-2013-android-grabs-top-spot-from-ipad-with-62-share/ [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo diff --git a/sources/talk/The history of Android/17 - The history of Android.md b/translated/talk/The history of Android/17 - The history of Android.md similarity index 100% rename from sources/talk/The history of Android/17 - The history of Android.md rename to translated/talk/The history of Android/17 - The history of Android.md From 4233e1ec3800567b389961c0a29d1e7420d025aa Mon Sep 17 00:00:00 2001 From: GOLinux Date: Sat, 25 Jul 2015 08:47:10 +0800 Subject: [PATCH 1492/2517] [Translated]20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md --- ...nformation Is Outdated' In Ubuntu 14.04.md | 59 ------------------- ...nformation Is Outdated' In Ubuntu 14.04.md | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 sources/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md create mode 100644 translated/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md diff --git a/sources/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md b/sources/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md deleted file mode 100644 index b7b95c43b1..0000000000 --- a/sources/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md +++ /dev/null @@ -1,59 +0,0 @@ -Translating by GOLinux! -How To Fix “The Update Information Is Outdated” In Ubuntu 14.04 -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Fix_update_information_is_outdated.jpeg) - -Seeing a red triangle in top panel in Ubuntu 14.04 that displays the following error? - -> The update information is outdated. This may be caused by network problems or by a repository that is no longer available. Please update manually by selecting ‘Show updates’ from indicator menu, and watching for any failing repositories. - -It looks something like this: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Update_error_Ubuntu.jpeg) - -Instead of red triangle, there is a pink exclamation sign because I am using one of the [best Ubuntu icon themes][1], Numix. Coming back to the error, this is a common update problem which you might see every now and then. Now you might be wondering what is causing this update error. - -### Reason for ‘update information is outdated’ error ### - -The reason is pretty explanatory in the error description itself. It reads “this may be caused by network problems or by a repository that is no longer available”. So, either you upgraded your system and some repository or PPA is no longer supported or you are facing some similar issue. - -While the error is self-explanatory, the action it suggests, “Please update manually by selecting ‘Show updates’ from the indicator menu, and watching for any failing repositories.”, doesn’t work properly. If you click on Show updates, all you’ll see is that the system is already updated. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/System_updated_Ubuntu.png) - -Weird isn’t it? How will we find out what is failing where and why? - -### Fix ‘update information is outdated’ ### - -The ‘solution’ discussed here will work for Ubuntu versions be it Ubuntu 14.04, 12.04 or 14.04. All you need to do is to open a terminal (Ctrl+Alt+T) and use the following command: - - sudo apt-get update - -Wait for the command to finish and look at the result. Quick tip to add here, you can [add notifications in terminal][2] so that you are notified as soon as a long command finishes execution. In the last few lines at the end of the command, see what kind of error your system is facing. Yes, you’ll see an error for sure. - -In my case, I saw the famous [GPG error: The following could not be verified][3] error. Apparently there is some problem with [Spotify installation in Ubuntu 15.04][4]. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Update_error_Ubuntu_1.jpeg) - -It is very much possible that you might see a different error instead of the GPG error like me. In that case, I suggest you to go through this article which I wrote to [fix various common update errors in Ubuntu][5]. - -I know few people, specially beginners have strong aversion to command line but if you are using Linux, you simply cannot avoid terminal. Moreover, it is not that scary a thing. Give it a try, you will feel accustomed to it soon enough. - -I hope this quick tip helped you to fix the recurring “update information is outdated” in Ubuntu. Any questions or suggestions is welcomed. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/fix-update-information-outdated-ubuntu/ - -作者:[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://itsfoss.com/best-icon-themes-ubuntu-1404/ -[2]:http://itsfoss.com/notification-terminal-command-completion-ubuntu/ -[3]:http://itsfoss.com/solve-gpg-error-signatures-verified-ubuntu/ -[4]:http://itsfoss.com/install-spotify-ubuntu-1504/ -[5]:http://itsfoss.com/fix-update-errors-ubuntu-1404/ diff --git a/translated/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md b/translated/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md new file mode 100644 index 0000000000..cebfab93c4 --- /dev/null +++ b/translated/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md @@ -0,0 +1,59 @@ +Ubuntu 14.04中修复“update information is outdated”错误 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Fix_update_information_is_outdated.jpeg) + +看到Ubuntu 14.04的顶部面板上那个显示下面这个错误的红色三角形了吗? + +> 更新信息过时。该错误可能是由网络问题,或者某个仓库不再可用而造成的。请通过从指示器菜单中选择‘显示更新’来手动更新,然后查看是否存在有失败的仓库。 +> + +它看起来像这样: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Update_error_Ubuntu.jpeg) + +这里的粉红色感叹号标记就是原来的红色三角形,因为我使用了[最佳的Ubuntu图标主题][1]之一,Numix。让我们回到该错误中,这是一个常见的更新问题,你也许时不时地会碰到它。现在,你或许想知道的是,到底是什么导致了这个更新错误的出现。 + +### 引起‘update information is outdated’错误的原因 ### + +导致该错误的原因在其自身的错误描述中就讲得相当明白,它告诉你“这可能是由网络问题或者某个不再可用的仓库导致的”。所以,要么是你更新了系统和某些仓库,要么是PPA不再受到支持了,或者你正面对的类似问题。 + +虽然错误本身就讲得很明白,而它给出了的议操作“请通过从指示器菜单选择‘显示更新’来手动更新以查看失败的仓库”却并不能很好地解决问题。如果你点击显示更新,你所能看见的仅仅是系统已经更新。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/System_updated_Ubuntu.png) + +很奇怪,不是吗?我们怎样才能找出是什么出错了,哪里出错了,以及为什么出错呢? + +### 修复‘update information is outdated’错误 ### + +这里讨论的‘解决方案’可能对Ubuntu的这些版本有用:Ubuntu 14.04,12.04或14.04。你所要做的仅仅是打开终端(Ctrl+Alt+T),然后使用下面的命令: + + sudo apt-get update + +等待命令结束,然后查看其结果。这里插个快速提示,你可以[在终端中添加通知][2],这样当一个耗时很长的命令结束执行时就会通知你。在该命令的最后几行中,可以看到你的系统正面临什么样的错误。是的,你肯定会看到一个错误。 + +在我这里,我看到了有名的[GPG error: The following could not be verified][3]错误。很明显,[在Ubuntu 15.04中安装声破天][4]有点问题。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Update_error_Ubuntu_1.jpeg) + +很可能你看到的不是像我一样的GPG错误,那样的话,我建议你读一读我写的这篇文章[修复Ubuntu中的各种常见更新错误][5]。 + +我知道有不少人,尤其是初学者,很是讨厌命令行,但是如果你正在使用Linux,你就无可避免会使用到终端。此外,那东西并没你想象的那么可怕。试试吧,你会很快上手的。 + +我希望这个快速提示对于你修复Ubuntu中的“update information is outdated”错误有帮助。如果你有任何问题或建议,请不吝提出,我们将无任欢迎。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-update-information-outdated-ubuntu/ + +作者:[Abhishek][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ +[2]:http://itsfoss.com/notification-terminal-command-completion-ubuntu/ +[3]:http://itsfoss.com/solve-gpg-error-signatures-verified-ubuntu/ +[4]:http://itsfoss.com/install-spotify-ubuntu-1504/ +[5]:http://itsfoss.com/fix-update-errors-ubuntu-1404/ From 872a3b3245a23f44fabf5c0a2b1ab3d372ab12aa Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 25 Jul 2015 10:10:23 +0800 Subject: [PATCH 1493/2517] [Translated] tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md --- ...rform Tasks with Docker using Kitematic.md | 67 ------------------- ...rform Tasks with Docker using Kitematic.md | 66 ++++++++++++++++++ 2 files changed, 66 insertions(+), 67 deletions(-) delete mode 100644 sources/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md create mode 100644 translated/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md diff --git a/sources/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md b/sources/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md deleted file mode 100644 index ca812ae944..0000000000 --- a/sources/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md +++ /dev/null @@ -1,67 +0,0 @@ -Translating by ictlyh -Howto Interactively Perform Tasks with Docker using Kitematic -================================================================================ -In this article, we'll learn about the installating Kitematic in Windows Operating System and deploying a Hello World Nginx Web Server. Kitematic is a free and open source software which is a modern designed GUI software that allows us to interactively perform tasks with docker. Kitematic has a beautiful design and pretty good interface. It is pretty fast and easy to setup our containers out of the box without needing to enter commands for it, we can deploy our apps it in just a click with its GUI inteface. Kitematic has Docker Hub Intergration which allows us to search any required image, pull and deploy our apps with it. It also has a beautiful feature to switch to CUI mode simultaneously. Currently, it includes some features like automatically map ports, visually change environment variables, configuring volumes, streamline logs and many more. - -So. here are the easy 3 steps on how we can install Kitematic and deploy Hello World Nginx Web Server in Windows. - -### 1. Download Kitematic ### - -First of all, we'll need to download the latest release of Kitematic available for windows operating system from the github repository ie [https://github.com/kitematic/kitematic/releases][1] . Here, we download its executable EXE file using a download manager or a web browser. After we finish downloading, we'll need to double-click the executable application file. - -![Running Kitematic](http://blog.linoxide.com/wp-content/uploads/2015/06/running-kitematic.png) - -After double clicking the application file, we'll be asked by a security issue we'll simply click OK as shown below. - -![Security Warning](http://blog.linoxide.com/wp-content/uploads/2015/06/security-warning.png) - -### 2. Installing Kitematic ### - -After the executable installer has been downloaded, we'll now gonna install Kitematic in our Windows Operating System. The installer will now begin to download and install the necessary dependencies virtual box and docker to run Kitematic. If you already virtualbox installed in your system, it will upgrade it to the latest version. The installer should finish in few minutes but that depends on how fast your internet and system is. If you don't have a virtual box installed already, it may ask you for installing the virtual box network driver. It is suggested to install that as it is useful for the virtual box networking. - -![Installing Kitematic](http://blog.linoxide.com/wp-content/uploads/2015/06/installing-kitematic.png) - -After the required dependencies Docker and Virtual box are installed and are running, we'll be asked to login to the Docker Hub. If we don't have an account or don't wanna login now, we can click **SKIP FOR NOW** to continue further. - -![Login Docker Hub](http://blog.linoxide.com/wp-content/uploads/2015/06/login-docker-hub.jpg) - -If you don't have an account, you can simply click on Sign Up link in the App and create an account in Docker Hub. - -After its done, our first interface of Kitematic App will load. Here, below is how it looks. We can search for the available docker images there as shown below. - -![Kitematic App Launched](http://blog.linoxide.com/wp-content/uploads/2015/07/kitematic-app-launched.jpg) - -### 3. Deploying Nginx Hello World Container ### - -Now, as our Kitematic has been successfully installed, we'll now go for the deployment of containers. To run a container, we can simply search for the image in the search area. Then click on Create to deploy the container. Here in this tutorial, we'll go for deploying a small Nginx Web Server having Hello World homepage. To do so, we'll search for Hello World Nginx in the search area. Then, after we see the container information, we'll click on Create to deploy the container. - -![Hello World Nginx Run](http://blog.linoxide.com/wp-content/uploads/2015/06/hello-world-nginx-run.jpg) - -Once the download of the image has been completed, it will get deployed. We can see the logs of the commands fired by the Kitematic to deploy that container. We can also see the web page preview right from the Kitematic interface. Now, we can check our Hello World page from our web browser by clicking on the preview. - -![Nginx Hello World Browser](http://blog.linoxide.com/wp-content/uploads/2015/07/nginx-hello-world-browser.jpg) - -If we wanna switch to command line interface and manage docker with it, there is a button called Docker CLI which will open a Powershell were we can execute docker commands. - -![Docker CLI PowerShell](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-cli-powershell.png) - -Now, if we wanna configure our container and perform stuffs like changing the container name, assigning environment variables, assign ports, configure container's storage and other advanced features, we can do that from Settings tab of the container. - -![Kitematic Container Settings](http://blog.linoxide.com/wp-content/uploads/2015/07/kitematic-container-settings.png) - -### Conclusion ### - -Finally we've successfully installed Kitematic and deployed a hello world nginx web server in Windows Operating System. It is always recommended to download and install the latest release of Kitematic as many advanced features are to be embedded. As docker works in 64 bit platform, Kitematic is also currently built for 64-bit platform of operating system. It only works on the Windows 7 and greater versions of Windows. Here, in this tutorial, we deployed an Nginx web server like wise we can deploy any docker container from its image using Kitematic with few clicks only. Kitematic is already available for Mac OS X and Windows whereas a version for Linux is still under development and will be out very soon. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/interactively-docker-kitematic/ - -作者:[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/ -[1]:https://github.com/kitematic/kitematic/releases \ No newline at end of file diff --git a/translated/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md b/translated/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md new file mode 100644 index 0000000000..8ad03dd06c --- /dev/null +++ b/translated/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md @@ -0,0 +1,66 @@ +如何在 Docker 中通过 Kitematic 交互式执行任务 +================================================================================ +在本篇文章中,我们会学习如何在 Windows 操作系统上安装 Kitematic 以及部署一个 Hello World Nginx Web 服务器。Kitematic 是一个自由开源软件,它有现代化的界面设计使得允许我们在 Docker 中交互式执行任务。Kitematic 设计非常漂亮、界面也很不错。我们可以简单快速地开箱搭建我们的容器而不需要输入命令,我们可以在图形用户界面中通过简单的点击从而在容器上部署我们的应用。Kitematic 集成了 Docker Hub,允许我们搜索、拉取任何需要的镜像,并在上面部署应用。它同时也能很好地切换到命令行用户接口模式。目前,它包括了自动映射端口、可视化更改环境变量、配置卷、精简日志以及其它功能。 + +下面是在 Windows 上安装 Kitematic 并部署 Hello World Nginx Web 服务器的 3 个简单步骤。 + +### 1. 下载 Kitematic ### + +首先,我们需要从 github 仓库 [https://github.com/kitematic/kitematic/releases][1] 中下载 Windows 操作系统可用的最新的 Kitematic 发行版。我们用下载器或者 web 浏览器下载了它的可执行 EXE 文件。下载完成后,我们需要双击可执行应用文件。 + +![运行 Kitematic](http://blog.linoxide.com/wp-content/uploads/2015/06/running-kitematic.png) + +双击应用文件之后,会问我们一个安全问题,我们只需要点击 OK 按钮,如下图所示。 + +![安全警告](http://blog.linoxide.com/wp-content/uploads/2015/06/security-warning.png) + +### 2. 安装 Kitematic ### + +下载好可执行安装程序之后,我们现在打算在我们的 Windows 操作系统上安装 Kitematic。安装程序现在会开始下载并安装运行 Kitematic 需要的依赖,包括 Virtual Box 和 Docker。如果已经在系统上安装了 Virtual Box,它会把它升级到最新版本。安装程序会在几分钟内完成,但取决于你网络和系统的速度。如果你还没有安装 Virtual Box,它会问你是否安装 Virtual Box 网络驱动。建议安装它,因为它有助于 Virtual Box 的网络。 + +![安装 Kitematic](http://blog.linoxide.com/wp-content/uploads/2015/06/installing-kitematic.png) + +需要的依赖 Docker 和 Virtual Box 安装完成并运行后,会让我们登录到 Docker Hub。如果我们还没有账户或者还不想登录,可以点击 **SKIP FOR NOW** 继续后面的步骤。 + +![登录 Docker Hub](http://blog.linoxide.com/wp-content/uploads/2015/06/login-docker-hub.jpg) + +如果你还没有账户,你可以在应用程序上点击注册链接并在 Docker Hub 上创建账户。 + +完成之后,就会出现 Kitematic 应用程序的第一个界面。正如下面看到的这样。我们可以搜索可用的 docker 镜像。 + +![启动 Kitematic](http://blog.linoxide.com/wp-content/uploads/2015/07/kitematic-app-launched.jpg) + +### 3. 部署 Nginx Hello World 容器 ### + +现在,成功安装完 Kitematic 之后,我们打算部署容器。要运行一个容器,我们只需要在搜索区域中搜索镜像。然后点击 Create 按钮部署容器。在这篇教程中,我们会部署一个小的包含了 Hello World 主页的 Nginx Web 服务器。为此,我们在搜索区域中搜索 Hello World Nginx。看到了容器信息之后,我们点击 Create 来部署容器。 + +![运行 Hello World Nginx](http://blog.linoxide.com/wp-content/uploads/2015/06/hello-world-nginx-run.jpg) + +镜像下载完成之后,它会自动部署。我们可以查看 Kitematic 部署容器的命令日志。我们也可以在 Kitematic 界面上预览 web 页面。现在,我们通过点击预览在 web 浏览器中查看我们的 Hello World 页面。 + +![浏览 Nginx Hello World](http://blog.linoxide.com/wp-content/uploads/2015/07/nginx-hello-world-browser.jpg) + +如果我们想切换到命令行接口并用它管理 docker,这里有个称为 Docker CLI 的按钮,它会打开一个 PowerShell,在里面我们可以执行 docker 命令。 + +![Docker CLI PowerShell](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-cli-powershell.png) + +现在,如果我们想配置我们的容器并执行类似更改容器名称、设置环境变量、指定端口、配置容器存储以及其它高级功能的任务,我们可以在容器设置页面做到这些。 + +![设置 Kitematic Container](http://blog.linoxide.com/wp-content/uploads/2015/07/kitematic-container-settings.png) + +### 总结 ### + +我们终于成功在 Windows 操作系统上安装了 Kitematic 并部署了一个 Hello World Ngnix 服务器。总是推荐下载安装 Kitematic 最新的发行版,因为会增加很多新的高级功能。由于 Docker 运行在 64 位平台,当前 Kitematic 也是为 64 位操作系统构建。它只能在 Windows 7 以及更高版本上运行。在这篇教程中,我们部署了一个 Nginx Web 服务器,类似地我们可以在 Kitematic 中简单的点击就能通过镜像部署任何 docker 容器。Kitematic 已经有可用的 Mac OS X 和 Windows 版本,Linux 版本也在开发中很快就会发布。如果你有任何疑问、建议或者反馈,请在下面的评论框中写下来以便我们更改地改进或更新我们的内容。非常感谢!Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/interactively-docker-kitematic/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://github.com/kitematic/kitematic/releases \ No newline at end of file From 25b5c29a7138e4bd085c2009a469c6d756fbb8df Mon Sep 17 00:00:00 2001 From: zpl Date: Sat, 25 Jul 2015 19:16:21 +0800 Subject: [PATCH 1494/2517] Update 20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md --- ...re FTP Server with Proftpd on Fedora 22.md | 103 +++++++++--------- 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md b/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md index 416696bc91..0ccfe69b8f 100644 --- a/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md +++ b/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md @@ -1,55 +1,54 @@ -zpl1025 -Howto Configure FTP Server with Proftpd on Fedora 22 +如何在 Fedora 22 上配置 Proftpd 服务器 ================================================================================ -In this article, we'll learn about setting up an FTP server with Proftpd running Fedora 22 in our machine or server. [ProFTPD][1] is a free and open source FTP daemon software licensed under GPL. It is among most popular FTP server among machines running Linux. Its primary design aims to have an FTP server with many advanced features and provisioning users for more configuration options for easy customization. It includes a number of configuration options that are still not available with many other FTP daemons. It was initially developed by the developers as an alternative with better security and configuration to wu-ftpd server. An FTP server is a program that allows us to upload or download files and folders from a remote server where it is setup using an FTP client. Some of the features of ProFTPD daemon are as follows, you can check more features on [http://www.proftpd.org/features.html][2] . +在本文中,我们将了解如何在运行 Fedora 22 的电脑或服务器上使用 Proftpd 架设 FTP 服务器。[ProFTPD][1] 是一款免费的基于 GPL 授权开源的 FTP 服务器软件,是 Linux 上的主流 FTP 服务器。它的主要设计目标是具备许多高级功能以及能为用户提供丰富的配置选项可以轻松实现定制。它的许多配置选项在其他一些 FTP 服务器软件里仍然没有集成。最初它是被开发作为 wu-ftpd 服务器的一个更安全更容易配置的替代。FTP 服务器是这样一个软件,用户可以通过 FTP 客户端从安装了它的远端服务器上传或下载文件和目录。下面是一些 ProFTPD 服务器的主要功能,更详细的资料可以访问 [http://www.proftpd.org/features.html][2]。 -- It includes a per directory ".ftpaccess" access configuration similar to Apache's ".htaccess" -- It features multiple virtual FTP server with multiple users login and anonymous FTP services. -- It can be run either as a stand-alone server or from inetd/xinetd. -- Its ownership, file/folder attributes and file/folder permissions are UNIX-based. -- It can be run as standalone mode in order to protect the system from damage that can be caused from root access. -- The modular design of it makes it easily extensible with modules like LDAP servers, SSL/TLS encryption, RADIUS support, etc. -- IPv6 support is also included in the ProFTPD server. +- 每个目录都包含 ".ftpaccess" 文件用于访问控制,类似 Apache 的 ".htaccess" +- 支持多个虚拟 FTP 服务器以及多用户登录和匿名 FTP 服务。 +- 可以作为独立进程启动服务或者通过 inetd/xinetd 启动 +- 它的文件/目录属性、属主和权限采用类 UNIX 方式。 +- 它可以独立运行,保护系统避免 root 访问可能带来的损坏。 +- 模块化的设计让它可以轻松扩展其他模块,比如 LDAP 服务器,SSL/TLS 加密,RADIUS 支持,等等。 +- ProFTPD 服务器还支持 IPv6. -Here are some easy to perform steps on how we can setup an FTP Server with ProFTPD in Fedora 22 operating system. +下面是如何在运行 Fedora 22 操作系统的计算机上使用 ProFTPD 架设 FTP 服务器的一些简单步骤。 -### 1. Installing ProFTPD ### +### 1. 安装 ProFTPD ### -First of all, we'll wanna install Proftpd server in our box running Fedora 22 as its operating system. As yum package manager has been depreciated, we'll use the latest and greatest built package manager called dnf. DNF is pretty easy to use and highly user friendly package manager available in Fedora 22. We'll simply use it to install proftpd daemon server. To do so, we'll need to run the following command in a terminal or a console in sudo mode. +首先,我们将在运行 Fedora 22 的机器上安装 Proftpd 软件。因为 yum 包管理器已经被抛弃了,我们将使用最新最好的包管理器 dnf。DNF 很容易使用,是 Fedora 22 上采用的非常人性化的包管理器。我们将用它来安装 proftpd 软件。这需要在终端或控制台里用 sudo 模式运行下面的命令。 $ sudo dnf -y install proftpd proftpd-utils -### 2. Configuring ProFTPD ### +### 2. 配置 ProFTPD ### -Now, we'll make changes to some configurations in the daemon. To configure the daemon, we will need to edit /etc/proftpd.conf with a text editor. The main configuration file of the ProFTPD daemon is **/etc/proftpd.conf** so, any changes made to this file will affect the FTP server. Here, are some changes we make in this initial step. +现在,我们将修改软件的一些配置。要配置它,我们需要用文本编辑器编辑 /etc/proftpd.conf 文件。**/etc/proftpd.conf** 文件是 ProFTPD 软件的主要配置文件,所以,这个文件的任何改动都会影响到 FTP 服务器。在这里,是我们在初始步骤里做出的改动。 $ sudo vi /etc/proftpd.conf -Next, after we open the file using a text editor, we'll wanna make changes to the ServerName and ServerAdmin as hostname and email address respectively. Here's what we have made changes to those configs. +之后,在用文本编辑器打开这个文件后,我们会想改下 ServerName 以及 ServerAdmin,分别填入自己的域名和 email 地址。下面是我们改的。 ServerName "ftp.linoxide.com" ServerAdmin arun@linoxide.com -After that, we'll wanna the following lines into the configuration file so that it logs access & auth into its specified log files. +在这之后,我们将把下面的设定加到配置文件里,这样可以让服务器将访问和授权记录到相应的日志文件里。 ExtendedLog /var/log/proftpd/access.log WRITE,READ default ExtendedLog /var/log/proftpd/auth.log AUTH auth -![Configuring ProFTPD Config](http://blog.linoxide.com/wp-content/uploads/2015/06/configuring-proftpd-config.png) +![调整 ProFTPD 设置](http://blog.linoxide.com/wp-content/uploads/2015/06/configuring-proftpd-config.png) -### 3. Adding FTP users ### +### 3. 添加 FTP 用户 ### -After configure the basics of the configuration file, we'll surely wanna create an FTP user which is rooted at a specific directory we want. The current users that we use to login into our machine are automatically enabled with the FTP service, we can even use it to login into the FTP server. But, in this tutorial, we'll gonna create a new user with a specified home directory to the ftp server. +在设定好了基本的配置文件后,我们很自然地希望为指定目录添加 FTP 用户。目前用来登录的用户是 FTP 服务自动生成的,可以用来登录到 FTP 服务器。但是,在这篇教程里,我们将创建一个以 ftp 服务器上指定目录为主目录的新用户。 -Here, we'll create a new group named ftpgroup. +下面,我们将建立一个名字是 ftpgroup 的新用户组。 $ sudo groupadd ftpgroup -Then, we'll gonna add a new user arunftp into the group with home directory specified as /ftp-dir/ +然后,我们将以目录 /ftp-dir/ 作为主目录增加一个新用户 arunftp 并加入这个组中。 $ sudo useradd -G ftpgroup arunftp -s /sbin/nologin -d /ftp-dir/ -After the user has been created and added to the group, we'll wanna set a password to the user arunftp. +在创建好用户并加入用户组后,我们将为用户 arunftp 设置一个密码。 $ sudo passwd arunftp @@ -58,26 +57,26 @@ After the user has been created and added to the group, we'll wanna set a passwo Retype new password: passwd: all authentication tokens updated successfully. -Now, we'll set read and write permission of the home directory by the ftp users by executing the following command. +现在,我们将通过下面命令为这个 ftp 用户设定主目录的读写权限。 $ sudo setsebool -P allow_ftpd_full_access=1 $ sudo setsebool -P ftp_home_dir=1 -Then, we'll wanna make that directory and its contents unable to get removed or renamed by any other users. +然后,我们会设定不允许其他用户移动或重命名这个目录以及里面的内容。 $ sudo chmod -R 1777 /ftp-dir/ -### 4. Enabling TLS Support ### +### 4. 打开 TLS 支持 ### -FTP is considered less secure in comparison to the latest encryption methods used these days as anybody sniffing the network card can read the data pass through FTP. So, we'll enable TLS Encryption support in our FTP server. To do so, we'll need to a edit /etc/proftpd.conf configuration file. Before that, we'll wanna backup our existing configuration file to make sure we can revert our configuration if any unexpected happens. +目前 FTP 所用的加密手段并不安全,任何人都可以通过监听网卡来读取 FTP 传输的数据。所以,我们将为自己的服务器打开 TLS 加密支持。这样的话,需要编辑 /etc/proftpd.conf 配置文件。在这之前,我们先备份一下当前的配置文件,可以保证在改出问题后还可以恢复。 $ sudo cp /etc/proftpd.conf /etc/proftpd.conf.bak -Then, we'll wanna edit the configuration file using our favorite text editor. +然后,我们可以用自己喜欢的文本编辑器修改配置文件。 $ sudo vi /etc/proftpd.conf -Then, we'll wanna add the following lines just below line we configured in step 2 . +然后,把下面几行附加到我们在第 2 步中所增加内容的后面。 TLSEngine on TLSRequired on @@ -86,19 +85,19 @@ Then, we'll wanna add the following lines just below line we configured in step TLSRSACertificateFile /etc/pki/tls/certs/proftpd.pem TLSRSACertificateKeyFile /etc/pki/tls/certs/proftpd.pem -![Enabling TLS Configuration](http://blog.linoxide.com/wp-content/uploads/2015/06/tls-configuration.png) +![打开 TLS 配置](http://blog.linoxide.com/wp-content/uploads/2015/06/tls-configuration.png) -After finishing up with the configuration, we'll wanna save and exit it. +完成上面的设定后,保存退出。 -Next, we'll need to generate the SSL certificates inside **/etc/pki/tls/certs/** directory as proftpd.pem. To do so, first we'll need to install openssl in our Fedora 22 machine. +然后,我们需要生成 SSL 凭证 proftpd.pem 并放到 **/etc/pki/tls/certs/** 目录里。这样的话,首先需要在 Fedora 22 上安装 openssl。 $ sudo dnf install openssl -Then, we'll gonna generate the SSL certificate by running the following command. +然后,可以通过执行下面的命令生成 SSL 凭证。 $ sudo openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/pki/tls/certs/proftpd.pem -out /etc/pki/tls/certs/proftpd.pem -We'll be asked with some information that will be associated into the certificate. After completing the required information, it will generate a 2048 bit RSA private key. +系统会询问一些将写入凭证里的基本信息。在填完资料后,就会生成一个 2048 位的 RSA 私钥。 Generating a 2048 bit RSA private key ...................+++ @@ -120,65 +119,65 @@ We'll be asked with some information that will be associated into the certificat Common Name (eg, your name or your server's hostname) []:ftp.linoxide.com Email Address []:arun@linoxide.com -After that, we'll gonna change the permission of the generated certificate file in order to secure it. +在这之后,我们要改变所生成凭证文件的权限以增加安全性。 $ sudo chmod 600 /etc/pki/tls/certs/proftpd.pem -### 5. Allowing FTP through Firewall ### +### 5. 允许 FTP 通过 Firewall ### -Now, we'll need to allow the ftp ports that are usually blocked by the firewall by default. So, we'll allow ports and enable access to the ftp through firewall. +现在,需要允许 ftp 端口,一般默认被防火墙阻止了。就是说,需要允许 ftp 端口能通过防火墙访问。 -If **TLS/SSL Encryption is enabled** run the following command. +如果 **打开了 TLS/SSL 加密**,执行下面的命令。 $sudo firewall-cmd --add-port=1024-65534/tcp $ sudo firewall-cmd --add-port=1024-65534/tcp --permanent -If **TLS/SSL Encryption is disabled** run the following command. +如果 **没有打开 TLS/SSL 加密**,执行下面的命令。 $ sudo firewall-cmd --permanent --zone=public --add-service=ftp success -Then, we'll need to reload the firewall configuration. +然后,重新加载防火墙设定。 $ sudo firewall-cmd --reload success -### 6. Starting and Enabling ProFTPD ### +### 6. 启动并激活 ProFTPD ### -After everything is set, we'll finally start our ProFTPD and give it a try. To start the proftpd ftp daemon, we'll need to run the following command. +全部设定好后,最后就是启动 ProFTPD 并试一下。可以运行下面的命令来启动 proftpd ftp 守护程序。 $ sudo systemctl start proftpd.service -Then, we'll wanna enable proftpd to start on every boot. +然后,我们可以设定开机启动。 $ sudo systemctl enable proftpd.service Created symlink from /etc/systemd/system/multi-user.target.wants/proftpd.service to /usr/lib/systemd/system/proftpd.service. -### 7. Logging into the FTP server ### +### 7. 登录到 FTP 服务器 ### -Now, if everything was configured and done as expected, we must be able to connect to the ftp server and login with the details we set above. Here, we'll gonna configure our FTP client, filezilla with hostname as **server's ip or url**, Protocol as **FTP**, User as **arunftp** and password as the one we set in above step 3. If you followed step 4 for enabling TLS support, then we'll need to set the Encryption type as **Require explicit FTP over TLS** but if you didn't follow step 4 and don't wanna use TLS encryption then set the Encryption type as **Plain FTP**. +现在,如果都是按照本教程设置好的,我们一定可以连接到 ftp 服务器并使用以上设置的信息登录上去。在这里,我们将配置一下 FTP 客户端 filezilla,使用 **服务器的 IP 或 URL **作为主机名,协议选择 **FTP**,用户名填入 **arunftp**,密码是在上面第 3 步中设定的密码。如果你按照第 4 步中的方式打开了 TLS 支持,还需要在加密类型中选择 **显式要求基于 TLS 的 FTP**,如果没有打开,也不想使用 TLS 加密,那么加密类型选择 **简单 FTP**。 -![FTP Login Details](http://blog.linoxide.com/wp-content/uploads/2015/06/ftp-login-details.png) +![FTP 登录细节](http://blog.linoxide.com/wp-content/uploads/2015/06/ftp-login-details.png) -To setup the above configuration, we'll need goto File which is under the Menu and then click on Site Manager in which we can click on new site then configure as illustrated above. +要做上述设定,需要打开菜单里的文件,点击站点管理器,然后点击新建站点,再按上面的方式设置。 -![FTP SSL Certificate](http://blog.linoxide.com/wp-content/uploads/2015/06/ftp-ssl-certificate.png) +![FTP SSL 凭证](http://blog.linoxide.com/wp-content/uploads/2015/06/ftp-ssl-certificate.png) -Then, we're asked to accept the SSL certificate, that can be done by click OK. After that, we are able to upload and download required files and folders from our FTP server. +随后系统会要求允许 SSL 凭证,点确定。之后,就可以从我们的 FTP 服务器上传下载文件和文件夹了。 -### Conclusion ### +### 总结 ### -Finally, we have successfully installed and configured our Fedora 22 box with Proftpd FTP server. Proftpd is an awesome powerful highly configurable and extensible FTP daemon. The above tutorial illustrates us how we can configure a secure FTP server with TLS encryption. It is highly recommended to configure FTP server with TLS encryption as it enables SSL certificate security to the data transfer and login. Here, we haven't configured anonymous access to the FTP cause they are usually not recommended in a protected FTP system. An FTP access makes pretty easy for people to upload and download at good efficient performance. We can even change the ports for the users for additional security. So, if you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) +最后,我们成功地在 Fedora 22 机器上安装并配置好了 Proftpd FTP 服务器。Proftpd 是一个超级强大,能高度配置和扩展的 FTP 守护软件。上面的教程展示了如何配置一个采用 TLS 加密的安全 FTP 服务器。强烈建议设置 FTP 服务器支持 TLS 加密,因为它允许使用 SSL 凭证加密数据传输和登录。本文中,我们也没有配置 FTP 的匿名访问,因为一般受保护的 FTP 系统不建议这样做。 FTP 访问让人们的上传和下载变得非常简单也更高效。我们还可以改变用户端口增加安全性。好吧,如果你有任何疑问,建议,反馈,请在下面评论区留言,这样我们就能够改善并更新文章内容。谢谢!玩的开心 :-) -------------------------------------------------------------------------------- via: http://linoxide.com/linux-how-to/configure-ftp-proftpd-fedora-22/ 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[zpl1025](https://github.com/zpl1025) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From f5423b8e2a1d02bc1fb95b4a7531f3781e0dd6c7 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Sat, 25 Jul 2015 19:24:21 +0800 Subject: [PATCH 1495/2517] [translated] 20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md --- ...150717 Howto Configure FTP Server with Proftpd on Fedora 22.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md (100%) diff --git a/sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md b/translated/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md similarity index 100% rename from sources/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md rename to translated/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md From e0681399fd312fc45dc5c908bb1c037aee1ecbd3 Mon Sep 17 00:00:00 2001 From: alim0x Date: Sat, 25 Jul 2015 20:27:50 +0800 Subject: [PATCH 1496/2517] [Part One]18 - The history of Android --- .../18 - The history of Android.md | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/sources/talk/The history of Android/18 - The history of Android.md b/sources/talk/The history of Android/18 - The history of Android.md index 8b303033bc..3af4359680 100644 --- a/sources/talk/The history of Android/18 - The history of Android.md +++ b/sources/talk/The history of Android/18 - The history of Android.md @@ -1,24 +1,22 @@ -alim0x translating - -The history of Android +安卓编年史 ================================================================================ -![Yet another Android Market redesign dips its toe into the "cards" interface that would become a Google staple.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/play-store.png) -Yet another Android Market redesign dips its toe into the "cards" interface that would become a Google staple. -Photo by Ron Amadeo +![安卓市场的新设计试水“卡片式”界面,这将成为谷歌的主要风格。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/play-store.png) +安卓市场的新设计试水“卡片式”界面,这将成为谷歌的主要风格。 +Ron Amadeo 供图 -The Android Market released its fourth new design in Android's two-and-a-half years on the market. This new design was hugely important as it came really close to Google's "cards" interface. By displaying Apps or other content in little blocks, Google could seamlessly transition its app design between screens of various sizes with minimal effort. Content could be displayed just like photos in a gallery app—feed the layout renderer a big list of content blocks, enable screen wrapping, and you were done. Bigger screens saw more blocks of content, and smaller screens only saw a few at a time. With the content display out of the way, Google added a "Categories" fragment to the right side and a big featured app carousel at the top. +安卓推向市场已经有两年半时间了,安卓市场放出了它的第四版设计。这个新设计十分重要,因为它已经很接近谷歌的“卡片式”界面了。通过在小方块中显示应用或其他内容,谷歌可以使其设计在不同尺寸屏幕下无缝过渡而不受影响。内容可以像一个相册应用里的照片一样显示——给布局渲染填充一个内容块列表,加上屏幕包装,就完成了。更大的屏幕一次可以看到更多的内容块,小点的屏幕一次看到的内容就少。内容用了不一样的方式显示,谷歌还在右边新增了一个“分类”板块,顶部还有个巨大的热门应用滚动显示。 -While the design was ready for an easily configurable interface, the functionality was not. The original shipping version of the market was locked to a landscape orientation and was Honeycomb-exclusive. +虽然设计上为更容易配置界面准备好准备好了,但功能上还没有。最初发布的市场版本锁定为横屏模式,而且还是蜂巢独占的。 -![The app page and "My Apps" interface.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/device-2014-02-12-190002.png) -The app page and "My Apps" interface. -Photo by Ron Amadeo +![应用详情页和“我的应用”界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/device-2014-02-12-190002.png) +应用详情页和“我的应用”界面。 +Ron Amadeo 供图 -This new market sold not only apps, but brought Books and Movies rentals into the fold as well. Google was selling books since 2010; it was only ever through a Website. The new market unified all of Google's content sales in a single location and brought it one step closer to taking on Apple's iTunes juggernaut, though selling all of these items under the "Android Market" was a bit of a branding snafu, as much of the content didn't require Android to use. +新的市场不仅出售应用,还加入了书籍和电影租借。谷歌从2010年开始出售图书;之前只通过网站出售。新的市场将谷歌所有的内容销售聚合到了一处,进一步向苹果 iTunes 的主宰展开较量。虽然在“安卓市场”出售这些东西有点品牌混乱,因为大部分内容都不依赖于安卓才能使用。 -![The browser did its best to look like Chrome, and Contacts used a two-pane interface.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/browsercontactst.png) -The browser did its best to look like Chrome, and Contacts used a two-pane interface. -Photo by Ron Amadeo +![浏览器看起来非常像 Chrome,联系人使用了双面板界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/browsercontactst.png) +浏览器看起来非常像 Chrome,联系人使用了双面板界面。 +Ron Amadeo 供图 The new Browser added an honest-to-goodness tabs strip at the top of the interface. While this browser wasn't Chrome, it aped a lot of Chrome's design and features. Besides the pioneering tabs-on-top interface, it added Incognito tabs, which kept no history or autocomplete records. There was also an option to have a Chrome-style new tab page consisting of thumbnails of your most-viewed webpages. From 0869c1acd96e8716c988b4b8fec41da0c3c3e6cd Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 25 Jul 2015 23:57:19 +0800 Subject: [PATCH 1497/2517] PUB:20150629 Backup with these DeDuplicating Encryption Tools @FSSlc --- ...th these DeDuplicating Encryption Tools.md | 64 ++++++++----------- 1 file changed, 28 insertions(+), 36 deletions(-) rename {translated/share => published}/20150629 Backup with these DeDuplicating Encryption Tools.md (56%) diff --git a/translated/share/20150629 Backup with these DeDuplicating Encryption Tools.md b/published/20150629 Backup with these DeDuplicating Encryption Tools.md similarity index 56% rename from translated/share/20150629 Backup with these DeDuplicating Encryption Tools.md rename to published/20150629 Backup with these DeDuplicating Encryption Tools.md index 366be7dd32..8a0621a190 100644 --- a/translated/share/20150629 Backup with these DeDuplicating Encryption Tools.md +++ b/published/20150629 Backup with these DeDuplicating Encryption Tools.md @@ -1,47 +1,46 @@ -使用去重加密工具来备份 +使用这些去重加密工具来备份你的数据 ================================================================================ -在体积和价值方面,数据都在增长。快速而可靠地备份和恢复数据正变得越来越重要。社会已经适应了技术的广泛使用,并懂得了如何依靠电脑和移动设备,但很少有人能够处理丢失重要数据的现实。在遭受数据损失的公司中,30% 的公司将在一年内损失一半市值,70% 的公司将在五年内停止交易。这更加凸显了数据的价值。 -随着数据在体积上的增长,提高存储利用率尤为重要。In Computing(注:这里不知如何翻译),数据去重是一种特别的数据压缩技术,因为它可以消除重复数据的拷贝,所以这个技术可以提高存储利用率。 +无论是体积还是价值,数据都在不断增长。快速而可靠地备份和恢复数据正变得越来越重要。社会已经适应了技术的广泛使用,并懂得了如何依靠电脑和移动设备,但很少有人能够面对丢失重要数据的现实。在遭受数据损失的公司中,30% 的公司将在一年内损失一半市值,70% 的公司将在五年内停止交易。这更加凸显了数据的价值。 -数据并不仅仅只有其创造者感兴趣。政府、竞争者、犯罪分子、偷窥者可能都热衷于获取你的数据。他们或许想偷取你的数据,从你那里进行敲诈,或看你正在做什么。对于保护你的数据,加密是非常必要的。 +随着数据在体积上的增长,提高存储利用率尤为重要。从计算机的角度说,数据去重是一种特别的数据压缩技术,因为它可以消除重复数据的拷贝,所以这个技术可以提高存储利用率。 -所以,解决方法是我们需要一个去重加密备份软件。 +数据并不仅仅只有其创造者感兴趣。政府、竞争者、犯罪分子、偷窥者可能都热衷于获取你的数据。他们或许想偷取你的数据,从你那里进行敲诈,或看你正在做什么。因此,对于保护你的数据,加密是非常必要的。 -对于所有的用户而言,做文件备份是一件非常必要的事,至今为止许多用户还没有采取足够的措施来保护他们的数据。一台电脑不论是工作在一个合作的环境中,还是供私人使用,机器的硬盘可能在没有任何警告的情况下挂掉。另外,有些数据丢失可能是人为的错误所引发的。如果没有做经常性的备份,数据也可能不可避免地失去掉,即使请了专业的数据恢复公司来帮忙。 +所以,解决方法是我们需要一个可以去重的加密备份软件。 + +对于所有的用户而言,做文件备份是一件非常必要的事,至今为止许多用户还没有采取足够的措施来保护他们的数据。一台电脑不论是工作在一个合作的环境中,还是供私人使用,机器的硬盘可能在没有任何警告的情况下挂掉。另外,有些数据丢失可能是人为的错误所引发的。如果没有做经常性的备份,数据也可能不可避免地丢失,即使请了专业的数据恢复公司来帮忙。 这篇文章将对 6 个去重加密备份工具进行简要的介绍。 ----------- ### Attic ### -Attic 是一个可用于去重、加密,验证完整性的用 Python 写的压缩备份程序。Attic 的主要目标是提供一个高效且安全的方式来备份数据。Attic 使用的数据去重技术使得它适用于每日备份,因为只需存储改变的数据。 +Attic 是一个可用于去重、加密,验证完整性的压缩备份程序,它是用 Python 写的。Attic 的主要目标是提供一个高效且安全的方式来备份数据。Attic 使用的数据去重技术使得它适用于每日备份,因为只需存储改变的数据。 其特点有: - 易用 -- 可高效利用存储空间,通过检查冗余的数据,数据块大小的去重被用来减少存储所用的空间 -- 可选的数据加密,使用 256 位的 AES 加密算法。数据的完整性和可靠性使用 HMAC-SHA256 来检查 +- 可高效利用存储空间,通过检查冗余的数据,对可变块大小的去重可以减少存储所用的空间 +- 可选的数据加密,使用 256 位的 AES 加密算法。数据的完整性和可靠性使用 HMAC-SHA256 来校验 - 使用 SDSH 来进行离线备份 - 备份可作为文件系统来挂载 网站: [attic-backup.org][1] ----------- ### Borg ### -Borg 是 Attic 的分支。它是一个安全的开源备份程序,被设计用来高效地存储那些新的或修改过的数据。 +Borg 是 Attic 的一个分支。它是一个安全的开源备份程序,被设计用来高效地存储那些新的或修改过的数据。 -Borg 的主要目标是提供一个高效、安全的方式来存储数据。Borg 使用的数据去重技术使得它适用于每日备份,因为只需存储改变的数据。认证加密使得它适用于不完全可信的目标的存储。 +Borg 的主要目标是提供一个高效、安全的方式来存储数据。Borg 使用的数据去重技术使得它适用于每日备份,因为只需存储改变的数据。认证加密使得它适用于存储在不完全可信的位置。 -Borg 由 Python 写成。Borg 于 2015 年 5 月被创造出来,为了回应让新的代码或重大的改变带入 Attic 的困难。 +Borg 由 Python 写成。Borg 于 2015 年 5 月被创造出来,是为了解决让新的代码或重大的改变带入 Attic 的困难。 其特点包括: - 易用 -- 可高效利用存储空间,通过检查冗余的数据,数据块大小的去重被用来减少存储所用的空间 -- 可选的数据加密,使用 256 位的 AES 加密算法。数据的完整性和可靠性使用 HMAC-SHA256 来检查 +- 可高效利用存储空间,通过检查冗余的数据,对可变块大小的去重被用来减少存储所用的空间 +- 可选的数据加密,使用 256 位的 AES 加密算法。数据的完整性和可靠性使用 HMAC-SHA256 来校验 - 使用 SDSH 来进行离线备份 - 备份可作为文件系统来挂载 @@ -49,36 +48,32 @@ Borg 与 Attic 不兼容。 网站: [borgbackup.github.io/borgbackup][2] ----------- - ### Obnam ### Obnam (OBligatory NAMe) 是一个易用、安全的基于 Python 的备份程序。备份可被存储在本地硬盘或通过 SSH SFTP 协议存储到网上。若使用了备份服务器,它并不需要任何特殊的软件,只需要使用 SSH 即可。 -Obnam 通过将数据数据分成数据块,并单独存储它们来达到去重的目的,每次通过增量备份来生成备份,每次备份的生成就像是一次新的快照,但事实上是真正的增量备份。Obnam 由 Lars Wirzenius 开发。 +Obnam 通过将数据分成数据块,并单独存储它们来达到去重的目的,每次通过增量备份来生成备份,每次备份的生成就像是一次新的快照,但事实上是真正的增量备份。Obnam 由 Lars Wirzenius 开发。 其特点有: - 易用 - 快照备份 -- 数据去重,跨文件,生成备份 +- 数据去重,跨文件,然后生成备份 - 可使用 GnuPG 来加密备份 - 向一个单独的仓库中备份多个客户端的数据 - 备份检查点 (创建一个保存点,以每 100MB 或其他容量) - 包含多个选项来调整性能,包括调整 lru-size 或 upload-queue-size -- 支持 MD5 校验和算法来识别重复的数据块 +- 支持 MD5 校验算法来识别重复的数据块 - 通过 SFTP 将备份存储到一个服务器上 - 同时支持 push(即在客户端上运行) 和 pull(即在服务器上运行) 网站: [obnam.org][3] ----------- - ### Duplicity ### -Duplicity 持续地以 tar 文件格式备份文件和目录,并使用 GnuPG 来进行加密,同时将它们上传到远程(或本地)的文件服务器上。它可以使用 ssh/scp, 本地文件获取, rsync, ftp, 和 Amazon S3 等来传递数据。 +Duplicity 以 tar 文件格式增量备份文件和目录,并使用 GnuPG 来进行加密,同时将它们上传到远程(或本地)的文件服务器上。它可以使用 ssh/scp、本地文件获取、rsync、 ftp 和 Amazon S3 等来传递数据。 -因为 duplicity 使用了 librsync, 增加的存档高效地利用了存储空间,且只记录自从上次备份依赖改变的那部分文件。由于该软件使用 GnuPG 来机密或对这些归档文件进行进行签名,这使得它们免于服务器的监视或修改。 +因为 duplicity 使用了 librsync, 增量存档可以高效地利用存储空间,且只记录自从上次备份依赖改变的那部分文件。由于该软件使用 GnuPG 来加密或对这些归档文件进行进行签名,这使得它们免于服务器的监视或修改。 当前 duplicity 支持备份删除的文件,全部的 unix 权限,目录,符号链接, fifo 等。 @@ -101,39 +96,36 @@ duplicity 软件包还包含有 rdiffdir 工具。 Rdiffdir 是 librsync 的 rdi 网站: [duplicity.nongnu.org][4] ----------- - ### ZBackup ### ZBackup 是一个通用的全局去重备份工具。 其特点包括: -- 存储数据的并行 LZMA 或 LZO 压缩,在一个仓库中,你还可以混合使用 LZMA 和 LZO +- 对存储数据并行进行 LZMA 或 LZO 压缩,在一个仓库中,你还可以混合使用 LZMA 和 LZO - 内置对存储数据的 AES 加密 -- 可选择地删除旧的备份数据 +- 能够删除旧的备份数据 - 可以使用 64 位的滚动哈希算法,使得文件冲突的数量几乎为零 -- Repository consists of immutable files. No existing files are ever modified ==== +- 仓库中存储的文件是不可修改的,已备份的文件不会被修改。 - 用 C++ 写成,只需少量的库文件依赖 - 在生成环境中可以安全使用 - 可以在不同仓库中进行数据交换而不必再进行压缩 -- 可以使用 64 位改进型 Rabin-Karp 滚动哈希算法 +- 使用 64 位改进型 Rabin-Karp 滚动哈希算法 网站: [zbackup.org][5] ----------- ### bup ### -bup 是一个用 Python 写的备份程序,其名称是 "backup" 的缩写。在 git packfile 文件的基础上, bup 提供了一个高效的方式来备份一个系统,提供快速的增量备份和全局去重(在文件中或文件里,甚至包括虚拟机镜像)。 +bup 是一个用 Python 写的备份程序,其名称是 "backup" 的缩写。基于 git packfile 文件格式, bup 提供了一个高效的方式来备份一个系统,提供快速的增量备份和全局去重(在文件中或文件里,甚至包括虚拟机镜像)。 bup 在 LGPL 版本 2 协议下发行。 其特点包括: -- 全局去重 (在文件中或文件里,甚至包括虚拟机镜像) +- 全局去重 (在文件之间或文件内部,甚至包括虚拟机镜像) - 使用一个滚动的校验和算法(类似于 rsync) 来将大文件分为多个数据块 -- 使用来自 git 的 packfile 格式 +- 使用来自 git 的 packfile 文件格式 - 直接写入 packfile 文件,以此提供快速的增量备份 - 可以使用 "par2" 冗余来恢复冲突的备份 - 可以作为一个 FUSE 文件系统来挂载你的 bup 仓库 @@ -145,7 +137,7 @@ bup 在 LGPL 版本 2 协议下发行。 via: http://www.linuxlinks.com/article/20150628060000607/BackupTools.html 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 90be4e6a3fbabd1fd431935b1f50cfcc8dac5e73 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sun, 26 Jul 2015 00:12:43 +0800 Subject: [PATCH 1498/2517] translating wi-cuckoo --- .../tech/20150717 How to monitor NGINX with Datadog - Part 3.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md b/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md index 949fd3d949..40787cdd96 100644 --- a/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md +++ b/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md @@ -1,3 +1,4 @@ +translating wi-cuckoo How to monitor NGINX with Datadog - Part 3 ================================================================================ ![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_3.png) From f9289eb42b265f55e582028d16864f5cfddd2d3a Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 26 Jul 2015 10:08:54 +0800 Subject: [PATCH 1499/2517] [Translated]20150722 How To Manage StartUP Applications In Ubuntu.md --- ...o Manage StartUp Applications In Ubuntu.md | 115 ------------------ ...o Manage StartUp Applications In Ubuntu.md | 112 +++++++++++++++++ 2 files changed, 112 insertions(+), 115 deletions(-) delete mode 100644 sources/tech/20150722 How To Manage StartUp Applications In Ubuntu.md create mode 100644 translated/tech/20150722 How To Manage StartUp Applications In Ubuntu.md diff --git a/sources/tech/20150722 How To Manage StartUp Applications In Ubuntu.md b/sources/tech/20150722 How To Manage StartUp Applications In Ubuntu.md deleted file mode 100644 index f14d983707..0000000000 --- a/sources/tech/20150722 How To Manage StartUp Applications In Ubuntu.md +++ /dev/null @@ -1,115 +0,0 @@ -FSSlc translating - -How To Manage StartUp Applications In Ubuntu -================================================================================ -![Manage startup applications in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Manage-Start-up-apps-in-Ubuntu.png) - -Ever felt the need to **control startup applications in Ubuntu**? You should, if you feel that your Ubuntu system is very slow at the boot time. - -Every time you boot in to an operating system, a number of applications start automatically. These are called ‘startup applications’ or ‘start up programs’. Over the time, when you have plenty of application installed in your system, you’ll find that there are too many of these ‘startup applications’ which start at the boot time automatically, eats up the system resource and slows down the system. This might result in a sluggish Ubuntu experience, which I think, you don’t want at all. - -A way to make Ubuntu faster is to control startup applications. Ubuntu provides you GUI tools that you can use to find out the startup programs, disable them entirely or delay their execution so that you won’t have each application trying to run at the same time. - -In this post we shall see **how to control startup applications, how to run an application at startup and how to find hidden startup applications in Ubuntu**. The instructions provided here are applicable to all Ubuntu versions such as Ubuntu 12.04, Ubuntu 14.04 and Ubuntu 15.04. - -### Manage startup applications in Ubuntu ### - -By default, Ubuntu provides Startup Applications utility that you could use. No need of installation. Just go in Unity Dash and look for startup applications. - -![Startup applications Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_Ubuntu.jpeg) - -Click on it to start. Here is what my startup applications look like: - -![Find startup programs in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Screenshot-from-2015-07-18-122550.png) - -### Remove startup applications in Ubuntu ### - -Now it is up to you what you find useless. For me [Caribou][1], on screen keyboard program, is not of any use at the startup. I would prefer to remove it. - -You can choose to either prevent it from starting up at boot time but keeping it in the startup applications list for future reactivation. Click on close to save your preference. - -![remove startup programs in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_ubuntu_2.png) - -To remove a program from startup applications list, select it and click on Remove from the right window pane. - -![remove programs from startup applications in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_Ubuntu_1.jpeg) - -Note that, this will NOT uninstall the program. Just that the program will not start automatically at each boot. You can do it with all the programs that you don’t like. - -### Delay the start up programs ### - -What if you do not want to remove programs at the start up but you are worried about system performance at the boot time. What you can do is to add a delay in various programs so that not all the programs will be starting at the same time. - -Select a program and click Edit. - -![edit startup applications ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_ubuntu_3.png) - -This will show the command that runs this particular program. - -![commands at startup programs](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_ubuntu_4.jpg) - -All you need to do is to add sleep XX; before the command. It will add a delay of XX seconds before running the actual commands to run the applications. For example if I want Variety [wallpaper management application][2] for 2 minutes, I’ll add sleep 120; before the command like this: - -![delay the startup of programs in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_ubuntu_5.png) - -Save it and close it. You’ll see the impact at the next boot. - -### Add a program in the startup applications ### - -This could be tricky for beginners. You see, things are in commands at the bottom of everything in Linux. We just saw in the previous section that these startup programs are just some commands being run at each boot. If you want to add a new program in the startup, you’ll need to know the command that runs the application. - -#### Step 1: How to find the command to run an application? #### - -Go in the Unity Dash and search for Main Menu: - -![Program Menu Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Program_menu_Ubuntu.jpg) - -This contains all the program that you have installed in various categories. In old Ubuntu days, you would see similar menu for selecting and running applications. - -![main menu in ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Main_menu_ubuntu.jpeg) - -Just look for your application under various categories and click on the Properties tab to see the command that runs this application. For example, I want to run Transmission Torrent client on start up. - -![find running command of programs in ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Main_menu_ubuntu_1.jpeg) - -This will give me the command that runs Transmission: - -![find running commands of a program in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_programs_commands.png) - -Now I’ll use the same information to add Transmission in startup applications. - -#### Step 2: Adding programs in startup #### - -Go again in Startup Applications and click on Add. This will ask you enter a name, command and description. The command is the most important of all. You can use whatever name and description you want. Use the command you got from previous step and click on Add. - -![Adding a startup program in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Add_startup_program_Ubuntu.jpg) - -That’s it. You’ll see it in the next boot up, running automatically. This is all you can do with startup applications in Ubuntu. - -So, far we have discussed about applications that are visible in startup but there are many more services, daemons and programs that are not visible to Startup applications. In next section, we shall see how to see hidden startup programs in Ubuntu. - -### See hidden startup program in Ubuntu ### - -To see what are the services running at startup, open a terminal and use the following command: - - sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop - -This is just a quick find and replace command that changes the NoDisplay=false with NoDisplay=true in all the programs that are in autostart. Once you do this, open Startup Applications again and now you shall see many more programs here: - -![See Hidden Start up programs in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Hidden_startup_program_Ubuntu.jpg) - -You can manage these startup applications the same way which were described earlier. I hope this tutorial helped you to control startup program in Ubuntu. Any questions or suggestions are always welcomed. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/manage-startup-applications-ubuntu/ - -作者:[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]:https://wiki.gnome.org/action/show/Projects/Caribou?action=show&redirect=Caribou -[2]:http://itsfoss.com/applications-manage-wallpapers-ubuntu/ diff --git a/translated/tech/20150722 How To Manage StartUp Applications In Ubuntu.md b/translated/tech/20150722 How To Manage StartUp Applications In Ubuntu.md new file mode 100644 index 0000000000..745a84860a --- /dev/null +++ b/translated/tech/20150722 How To Manage StartUp Applications In Ubuntu.md @@ -0,0 +1,112 @@ +如何在 Ubuntu 中管理开机启动应用 +================================================================================ +![在 Ubuntu 中管理开机启动应用](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Manage-Start-up-apps-in-Ubuntu.png) + +你曾经考虑过 **在 Ubuntu 中管理开机启动应用** 吗?如果在开机时,你的 Ubuntu 系统启动得非常缓慢,那么你就需要考虑这个问题了。 + +每当你开机进入一个操作系统,一系列的应用将会自动启动。这些应用被称为‘开机启动应用’ 或‘开机启动程序’。随着时间的推移,当你在系统中安装了足够多的应用时,你将发现有太多的‘开机启动应用’在开机时自动地启动了,它们吃掉了很多的系统资源,并将你的系统拖慢。这可能会让你感觉卡顿,我想这种情况并不是你想要的。 + +让 Ubuntu 变得更快的方法之一是对这些开机启动应用进行控制。 Ubuntu 为你提供了一个 GUI 工具来让你发现这些开机启动应用,然后完全禁止或延迟它们的启动,这样就可以不让每个应用在开机时同时运行。 + +在这篇文章中,我们将看到 **在 Ubuntu 中,如何控制开机启动应用,如何让一个应用在开机时启动以及如何发现隐藏的开机启动应用。**这里提供的指导对所有的 Ubuntu 版本均适用,例如 Ubuntu 12.04, Ubuntu 14.04 和 Ubuntu 15.04。 + +### 在 Ubuntu 中管理开机启动应用 ### + +默认情况下, Ubuntu 提供了一个`开机启动应用工具`来供你使用,你不必再进行安装。只需到 Unity 面板中就可以查找到该工具。 + +![ubuntu 中的开机启动应用工具](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_Ubuntu.jpeg) + +点击它来启动。下面是我的`开机启动应用`的样子: + +![在 Ubuntu 中查看开机启动程序](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Screenshot-from-2015-07-18-122550.png) + +### 在 Ubuntu 中移除开机启动应用 ### + +现在由你来发现哪个程序对你用处不大,对我来说,是 [Caribou][1] 这个软件,它是一个屏幕键盘程序,在开机时它并没有什么用处,所以我想将它移除出开机启动程序的列表中。 + +你可以选择阻止某个程序在开机时启动,而在开机启动程序列表中保留该选项以便以后再进行激活。点击 `关闭`按钮来保留你的偏好设置。 + +![在 Ubuntu 中移除开机启动程序](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_ubuntu_2.png) + +要将一个程序从开机启动程序列表中移除,选择对应的选项然后从窗口右边的面板中点击`移除`按钮来保留你的偏好设置。 + +![在 Ubuntu 中将程序从开机启动列表中移除](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_Ubuntu_1.jpeg) + +需要提醒的是,这并不会将该程序卸载掉,只是让该程序不再在每次开机时自动启动。你可以对所有你不喜欢的程序做类似的处理。 + +### 让开机启动程序延迟启动 ### + +若你并不想在开机启动列表中移除掉程序,但同时又忧虑着系统性能的问题,那么你所需要做的是给程序添加一个延迟启动命令,这样所有的程序就不会在开机时同时启动。 + +选择一个程序然后点击 `编辑` 按钮。 + +![编辑开机启动应用列表](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_ubuntu_3.png) + +这将展示出运行这个特定的程序所需的命令。 + +![在开机启动列表的程序运行所需的命令](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_ubuntu_4.jpg) + +所有你需要做的就是在程序运行命令前添加一句 `sleep XX;` 。这样就为实际运行该命令来启动的对应程序添加了 `XX` 秒的延迟。例如,假如我想让 Variety [壁纸管理应用][2] 延迟启动 2 分钟,我就需要像下面那样在命令前添加 `sleep 120;` + +![在 Ubuntu 中延迟开机启动的程序](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_ubuntu_5.png) + +保存并关闭设置。你将在下一次启动时看到效果。 + +### 增添一个程序到开机启动应用列表中 ### + +这对于新手来说需要一点技巧。我们知道,在 Linux 的底层都是一些命令,在上一节我们看到这些开机启动程序只是在每次开机时运行一些命令。假如你想在开机启动列表中添加一个新的程序,你需要知道运行该应用所需的命令。 + +#### 第 1 步:如何查找运行一个程序所需的命令? #### + +首先来到 Unity Dash 面板然后搜索 `Main Menu`: + +![Ubuntu 下的程序菜单](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Program_menu_Ubuntu.jpg) + +这将展示出在各种类别下你安装的所有程序。在 Ubuntu 的低版本中,你将看到一个相似的菜单,通过它来选择并运行应用。 + +![Ubuntu 下的 main menu ](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Main_menu_ubuntu.jpeg) + +在各种类别下找到你找寻的应用,然后点击 `属性` 按钮来查看运行该应用所需的命令。例如,我想在开机时运行 `Transmission Torrent 客户端`。 + +![在 Ubuntu 下查找运行程序所需的命令](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Main_menu_ubuntu_1.jpeg) + +这就会向我给出运行 `Transmission` 应用的命令: + +![在 Ubuntu 下查找运行某个程序所需的命令](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_programs_commands.png) + +接着,我将用相同的信息来将 `Transmission` 应用添加到开机启动列表中。 + +#### 第 2 步: 添加一个程序到开机启动列表中 #### + +再次来到开机启动应用工具中并点击 `添加` 按钮。这将让你输入一个应用的名称,对应的命令和相关的描述。其中命令最为重要,你可以使用任何你想用的名称和描述。使用上一步得到的命令然后点击 `添加` 按钮。 + +![在 Ubuntu 中添加一个开机启动程序](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Add_startup_program_Ubuntu.jpg) + +就这样,你将在下一次开机时看到这个程序会自动运行。这就是在 Ubuntu 中你能做的关于开机启动应用的所有事情。 + +到现在为止,我们已经讨论在开机时可见的应用,但仍有更多的服务,守护进程和程序并不在`开机启动应用工具`中可见。下一节中,我们将看到如何在 Ubuntu 中查看这些隐藏的开机启动程序。 + +### 在 Ubuntu 中查看隐藏的开机启动程序 ### + +要查看在开机时哪些服务在运行,可以打开一个终端并使用下面的命令: + + sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop + +上面的命令是一个快速查找和替换命令,它将在所有自动启动的程序里的 `NoDisplay=false` 改为 `NoDisplay=true` ,一旦执行了这个命令后,再次打开`开机启动应用工具`,现在你应该可以看到更多的程序: + +![在 Ubuntu 中查看隐藏的开机启动程序](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Hidden_startup_program_Ubuntu.jpg) + + 你可以像先前我们讨论的那样管理这些开机启动应用。我希望这篇教程可以帮助你在 Ubuntu 中控制开机启动程序。任何的问题或建议总是欢迎的。 +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/manage-startup-applications-ubuntu/ + +作者:[Abhishek][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:https://wiki.gnome.org/action/show/Projects/Caribou?action=show&redirect=Caribou +[2]:http://itsfoss.com/applications-manage-wallpapers-ubuntu/ From f680bafafc7eab69737ff4695716d920027cf3f8 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 26 Jul 2015 10:13:23 +0800 Subject: [PATCH 1500/2517] Update 20150128 7 communities driving open source development.md --- .../20150128 7 communities driving open source development.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150128 7 communities driving open source development.md b/sources/talk/20150128 7 communities driving open source development.md index 3b3c450cf8..c3b6df31d2 100644 --- a/sources/talk/20150128 7 communities driving open source development.md +++ b/sources/talk/20150128 7 communities driving open source development.md @@ -1,3 +1,5 @@ +FSSlc Translating + 7 communities driving open source development ================================================================================ Not so long ago, the open source model was the rebellious kid on the block, viewed with suspicion by established industry players. Today, open initiatives and foundations are flourishing with long lists of vendor committers who see the model as a key to innovation. @@ -83,4 +85,4 @@ via: http://www.networkworld.com/article/2866074/opensource-subnet/7-communities [4]:http://www.openstack.org/foundation/ [5]:http://www.opendaylight.org/ [6]:http://www.apache.org/ -[7]:http://www.opencompute.org/ \ No newline at end of file +[7]:http://www.opencompute.org/ From 00359234b66bcaa1180c48bf5b2190cde4ddcb9d Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 26 Jul 2015 11:23:53 +0800 Subject: [PATCH 1501/2517] translating----geekpi --- ...igure Chef (server or client) on Ubuntu 14.04 or 15.04.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md b/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md index 69efa63823..d9257490cf 100644 --- a/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md +++ b/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md @@ -1,3 +1,6 @@ +Translating----geekpi + + How to Configure Chef (server/client) on Ubuntu 14.04 / 15.04 ================================================================================ Chef is a configuration management and automation tool for information technology professionals that configures and manages your infrastructure whether it is on-premises or in the cloud. It can be used to speed up application deployment and to coordinate the work of multiple system administrators and developers involving hundreds, or even thousands, of servers and applications to support a large customer base. The key to Chef’s power is that it turns infrastructure into code. Once you master Chef, you will be able to enable web IT with first class support for managing your cloud infrastructure with an easy automation of your internal deployments or end users systems. @@ -311,4 +314,4 @@ via: http://linoxide.com/ubuntu-how-to/install-configure-chef-ubuntu-14-04-15-04 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/kashifs/ \ No newline at end of file +[a]:http://linoxide.com/author/kashifs/ From d04c8c0c0f3c51baf55c5fb9df131e7834d708b0 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 26 Jul 2015 12:08:26 +0800 Subject: [PATCH 1502/2517] PUB:20150410 10 Top Distributions in Demand to Get Your Dream Job @sevenot --- ...butions in Demand to Get Your Dream Job.md | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) rename {translated/talk => published}/20150410 10 Top Distributions in Demand to Get Your Dream Job.md (83%) diff --git a/translated/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md b/published/20150410 10 Top Distributions in Demand to Get Your Dream Job.md similarity index 83% rename from translated/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md rename to published/20150410 10 Top Distributions in Demand to Get Your Dream Job.md index b908276fc3..5d0033c457 100644 --- a/translated/talk/20150410 10 Top Distributions in Demand to Get Your Dream Job.md +++ b/published/20150410 10 Top Distributions in Demand to Get Your Dream Job.md @@ -1,25 +1,24 @@ -sevenot translated -10大帮助你获得理想的职业的需求分布 +10 大帮助你获得理想的职业的操作系统技能 ================================================================================ 我们用了5篇系列文章,来让人们意识到那些可以帮助他们获得理想职业的顶级技能。在这个充满竞争的社会里,你不能仅仅依赖一项仅能,你需要在多个职业技能上都有所涉猎。我们并不能权衡这些技能,但是我们可以参考这些几乎不变的惯例和统计数据。 下面的文章和紧跟其后的内容,是针对全球各大IT公司上一季度对员工技能要求的详细调查报告。统计数据真实的反映了需求和市场的变化。我们会尽力让这份报告保持时效性,特别是有明显变化的时候。这五篇系列文章是: --10大帮助你获得理想的职业的需求分布 --[10大帮助你获得职位的著名 IT 技能][1] --10大帮助你获得理想职位的项目技能 --10大帮助你赢得理想职位的网络技能 --10大帮助你获得理想职位的个人认证 +- 10大帮助你获得理想的职业的需求分布 +- [10大帮助你获得职位的著名 IT 技能][1] +- [10大帮助你获得理想职位的项目技能][2] +- [10大帮助你赢得理想职位的网络技能][3] +- [10大帮助你获得理想职位的个人认证][4] ### 1. Windows ### -微软研发的windows操作系统不仅在PC市场上占据龙头地位,而且从职位视角来看也是最枪手的操作系统工作,不管你是赞成还是反对。有资料显示上一季度需求增长达到0.1%. +微软研发的windows操作系统不仅在PC市场上占据龙头地位,而且从职位视角来看也是最抢手的操作系统技能,不管你是赞成还是反对。有资料显示上一季度需求增长达到0.1%. 最新版本 : Windows 8.1 ### 2. Red Hat Enterprise Linux ### -Red Hat Enterprise Linux 是一个商业发行版本的企业级Linux,它由红帽公司研发。它是世界上运用最广的Linux发行版本,特别是在生产环境和协同工作方面。上一季度其整体需求上涨17%,位列第二。 +Red Hat Enterprise Linux 是一个商业的Linux发行版本,它由红帽公司研发。它是世界上运用最广的Linux发行版本之一,特别是在生产环境和协同工作方面。上一季度其整体需求上涨17%,位列第二。 最新版本 : RedHat Enterprise Linux 7.1 @@ -50,9 +49,10 @@ Red Hat Enterprise Linux 是一个商业发行版本的企业级Linux,它由 ### 7. Ubuntu ### 排在第7的是Ubuntu,这是一款由Canonicals公司研发设计的Linux系统,旨在服务于个人。上一季度需求率上涨11%。 + 最新版本 : -- Ubuntu 14.10 (9 months security and maintenance update). +- Ubuntu 14.10 (已有九个月的安全和维护更新). - Ubuntu 14.04.2 LTS ### 8. Suse ### @@ -63,19 +63,16 @@ Red Hat Enterprise Linux 是一个商业发行版本的企业级Linux,它由 ### 9. Debian ### -The very famous Linux Operating System, mother of 100’s of Distro and closest to GNU comes at number nine. -排在第9的是非常有名的 Linux 操作系统Debian,非常贴近GNU。其上一季度需求率上涨9%。 +排在第9的是非常有名的 Linux 操作系统Debian,它是上百种Linux 发行版之母,非常接近GNU理念。其上一季度需求率上涨9%。 最新版本: Debian 7.8 ### 10. HP-UX ### -The Proprietary UNIX Operating System designed by Hewlett-Packard comes at number ten. It has shown a decline in the last quarter by 5%. 排在第10的是Hewlett-Packard公司研发的专用 Linux 操作系统HP-UX,上一季度需求率上涨5%。 最新版本 : 11i v3 Update 13 -注:表格数据--不需要翻译--开始 @@ -133,7 +130,6 @@ The Proprietary UNIX Operating System designed by Hewlett-Packard comes at numbe
-注:表格数据--不需要翻译--结束 以上便是全部信息,我会尽快推出下一篇系列文章,敬请关注Tecmint。不要忘了留下您宝贵的评论。如果您喜欢我们的文章并且与我们分享您的见解,这对我们的工作是一种鼓励。 @@ -143,9 +139,12 @@ via: http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/ 作者:[Avishek Kumar][a] 译者:[sevenot](https://github.com/sevenot) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/top-distributions-in-demand-to-get-your-dream-job/www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/ +[1]:http://www.tecmint.com/famous-it-skills-in-demand-that-will-get-you-hired/ +[2]:https://linux.cn/article-5303-1.html +[3]:http://www.tecmint.com/networking-protocols-skills-to-land-your-dream-job/ +[4]:http://www.tecmint.com/professional-certifications-in-demand-that-will-get-you-hired/ From 4b6c767c8691d2c4600fc9169d9a526a0ca4bd80 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 26 Jul 2015 13:26:22 +0800 Subject: [PATCH 1503/2517] translated----geekpi --- ...ver or client) on Ubuntu 14.04 or 15.04.md | 142 +++++++++--------- 1 file changed, 70 insertions(+), 72 deletions(-) diff --git a/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md b/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md index d9257490cf..38574e6fa7 100644 --- a/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md +++ b/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md @@ -1,27 +1,23 @@ -Translating----geekpi - - -How to Configure Chef (server/client) on Ubuntu 14.04 / 15.04 +如何在Ubuntu 14.04/15.04上配置Chef(服务端/客户端) ================================================================================ -Chef is a configuration management and automation tool for information technology professionals that configures and manages your infrastructure whether it is on-premises or in the cloud. It can be used to speed up application deployment and to coordinate the work of multiple system administrators and developers involving hundreds, or even thousands, of servers and applications to support a large customer base. The key to Chef’s power is that it turns infrastructure into code. Once you master Chef, you will be able to enable web IT with first class support for managing your cloud infrastructure with an easy automation of your internal deployments or end users systems. +Chef是对于信息技术专业人员的一款配置管理和自动化工具,它可以配置和管理你的设备无论它在本地还是在云上。它可以用于加速应用部署并协调多个系统管理员和开发人员的工作,涉及到成百甚至上千的服务器和程序来支持大量的客户群。chef最有用的是让设备变成代码。一旦你掌握了Chef,你可以获得一流的网络IT支持来自动化管理你的云端设备或者终端用户。 -Here are the major components of Chef that we are going to setup and configure in this tutorial. -chef components +下面是我们将要在本篇中要设置和配置Chef的主要组件。 ![](http://blog.linoxide.com/wp-content/uploads/2015/07/chef.png) -### Chef Prerequisites and Versions ### +### 安装Chef的要求和版本 ### -We are going to setup Chef configuration management system under the following basic environment. +我们将在下面的基础环境下设置Chef配置管理系统。 注:表格 - + - + @@ -37,135 +33,138 @@ We are going to setup Chef configuration management system under the following b - +
Chef, Configuration Management Tool管理和配置工具:Chef
Base Operating System基础操作系统 Ubuntu 14.04.1 LTS (x86_64)
Version 0.6.2
RAM and CPU内存和CPU 4 GB  , 2.0+2.0 GHZ
-### Chef Server's Installation and Configurations ### +### Chef服务端的安装和配置 ### -Chef Server is central core component that stores recipes as well as other configuration data and interact with the workstations and nodes. let's download the installation media by selecting the latest version of chef server from its official web link. +Chef服务端是核心组件,它存储配置以及其他和工作站交互的配置数据。让我们在他们的官网下载最新的安装文件。 -We will get its installation package and install it by using following commands. +我使用下面的命令来下载和安装它。 -**1) Downloading Chef Server** +**1) 下载Chef服务端** root@ubuntu-14-chef:/tmp# wget https://web-dl.packagecloud.io/chef/stable/packages/ubuntu/trusty/chef-server-core_12.1.0-1_amd64.deb -**2) To install Chef Server** +**2) 安装Chef服务端** root@ubuntu-14-chef:/tmp# dpkg -i chef-server-core_12.1.0-1_amd64.deb -**3) Reconfigure Chef Server** +**3) 重新配置Chef服务端** -Now Run the following command to start all of the chef server services ,this step may take a few minutes to complete as its composed of many different services that work together to create a functioning system. +现在运行下面的命令来启动所有的chef服务端服务,这步也许会花费一些时间,因为它有许多不同一起工作的服务组成来创建一个正常运作的系统。 root@ubuntu-14-chef:/tmp# chef-server-ctl reconfigure -The chef server startup command 'chef-server-ctl reconfigure' needs to be run twice so that installation ends with the following completion output. +chef服务端启动命令'chef-server-ctl reconfigure'需要运行两次,这样就会在安装后看到这样的输出。 Chef Client finished, 342/350 resources updated in 113.71139964 seconds opscode Reconfigured! -**4) Reboot OS** +**4) 重启系统 ** -Once the installation complete reboot the operating system for the best working without doing this we you might get the following SSL_connect error during creation of User. +安装完成后重启系统使系统能最好的工作,不然我们或许会在创建用户的时候看到下面的SSL连接错误。 ERROR: Errno::ECONNRESET: Connection reset by peer - SSL_connect -**5) Create new Admin User** +**5) 创建心的管理员** -Run the following command to create a new administrator user with its profile settings. During its creation user’s RSA private key is generated automatically that should be saved to a safe location. The --filename option will save the RSA private key to a specified path. +运行下面的命令来创建一个新的用它自己的配置的管理员账户。创建过程中,用户的RSA私钥会自动生成并需要被保存到一个安全的地方。--file选项会保存RSA私钥到指定的路径下。 root@ubuntu-14-chef:/tmp# chef-server-ctl user-create kashi kashi kashi kashif.fareedi@gmail.com kashi123 --filename /root/kashi.pem -### Chef Manage Setup on Chef Server ### +### Chef服务端的管理设置 ### -Chef Manage is a management console for Enterprise Chef that enables a web-based user interface for visualizing and managing nodes, data bags, roles, environments, cookbooks and role-based access control (RBAC). +Chef Manage是一个针对企业Chef用户的管理控制台,它启用了可视化的web用户界面并可以管理节点、数据包、规则、环境、配置和基于角色的访问控制(RBAC) -**1) Downloading Chef Manage** +**1) 下载Chef Manage** -Copy the link for Chef Manage from the official web site and download the chef manage package. +从官网复制链接病下载chef manage的安装包。 root@ubuntu-14-chef:~# wget https://web-dl.packagecloud.io/chef/stable/packages/ubuntu/trusty/opscode-manage_1.17.0-1_amd64.deb -**2) Installing Chef Manage** +**2) 安装Chef Manage** -Let's install it into the root's home directory with below command. +使用下面的命令在root的家目录下安装它。 root@ubuntu-14-chef:~# chef-server-ctl install opscode-manage --path /root -**3) Restart Chef Manage and Server** +**3) 重启Chef Manage和服务端** -Once the installation is complete we need to restart chef manage and chef server services by executing following commands. +安装完成后我们需要运行下面的命令来重启chef manage和服务端。 root@ubuntu-14-chef:~# opscode-manage-ctl reconfigure root@ubuntu-14-chef:~# chef-server-ctl reconfigure -### Chef Manage Web Console ### +### Chef Manage网页控制台 ### -We can access chef manage web console from the localhost as wel as its fqdn and login with the already created admin user account. +我们可以使用localhost访问网页控制台以及fqdn,并用已经创建的管理员登录 ![chef amanage](http://blog.linoxide.com/wp-content/uploads/2015/07/5-chef-web.png) -**1) Create New Organization with Chef Manage** +**1) Chef Manage创建新的组织 ** -You would be asked to create new organization or accept the invitation from the organizations. Let's create a new organization by providing its short and full name as shown. +你或许被要求创建新的组织或者接受其他阻止的邀请。如下所示,使用缩写和全名来创建一个新的组织。 ![Create Org](http://blog.linoxide.com/wp-content/uploads/2015/07/7-create-org.png) -**2) Create New Organization with Command line** +**2) 用命令行创建心的组织 ** We can also create new Organization from the command line by executing the following command. +我们同样也可以运行下面的命令来创建新的组织。 root@ubuntu-14-chef:~# chef-server-ctl org-create linux Linoxide Linux Org. --association_user kashi --filename linux.pem -### Configuration and setup of Workstation ### +### 设置工作站 ### -As we had done with successful installation of chef server now we are going to setup its workstation to create and configure any recipes, cookbooks, attributes, and other changes that we want to made to our Chef configurations. +我们已经完成安装chef服务端,现在我们可以开始创建任何recipes、cookbooks、属性和其他任何的我们想要对Chef的修改。 -**1) Create New User and Organization on Chef Server** +**1) 在Chef服务端上创建新的用户和组织 ** -In order to setup workstation we create a new user and an organization for this from the command line. +为了设置工作站,我们用命令行创建一个新的用户和组织。 root@ubuntu-14-chef:~# chef-server-ctl user-create bloger Bloger Kashif bloger.kashif@gmail.com bloger123 --filename bloger.pem root@ubuntu-14-chef:~# chef-server-ctl org-create blogs Linoxide Blogs Inc. --association_user bloger --filename blogs.pem -**2) Download Starter Kit for Workstation** +**2) 下载工作站入门套件 ** Now Download and Save starter-kit from the chef manage web console on a workstation and use it to work with Chef server. +在工作站的网页控制台中下面并保存入门套件用于与服务端协同工作 ![Starter Kit](http://blog.linoxide.com/wp-content/uploads/2015/07/8-download-kit.png) -**3) Click to "Proceed" with starter kit download** +**3) 点击"Proceed"下载套件 ** ![starter kit](http://blog.linoxide.com/wp-content/uploads/2015/07/9-download-kit.png) -### Chef Development Kit Setup for Workstation ### +### 对于工作站的Chef开发套件设置 ### -Chef Development Kit is a software package suite with all the development tools need to code Chef. It combines with the best of the breed tools developed by Chef community with Chef Client. +Chef开发套件是一款包含所有开发chef所需工具的软件包。它捆绑了由Chef开发的带Chef客户端的工具。 -**1) Downloading Chef DK** +**1) 下载 Chef DK** We can Download chef development kit from its official web link and choose the required operating system to get its chef development tool kit. +我们可以从它的官网链接中下载开发包,并选择操作系统来得到chef开发包。 ![Chef DK](http://blog.linoxide.com/wp-content/uploads/2015/07/10-CDK.png) -Copy the link and download it with wget command. +复制链接并用wget下载 root@ubuntu-15-WKS:~# wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.6.2-1_amd64.deb -**1) Chef Development Kit Installatoion** +**1) Chef开发套件安装** -Install chef-development kit using dpkg command +使用dpkg命令安装开发套件 root@ubuntu-15-WKS:~# dpkg -i chefdk_0.6.2-1_amd64.deb -**3) Chef DK Verfication** +**3) Chef DK 验证** -Verify using the below command that the client got installed properly. +使用下面的命令验证客户端是否已经正确安装。 root@ubuntu-15-WKS:~# chef verify @@ -196,9 +195,9 @@ Verify using the below command that the client got installed properly. Verification of component 'chefspec' succeeded. Verification of component 'package installation' succeeded. -**Connecting to Chef Server** +**连接Chef服务端** -We will Create ~/.chef and copy the two user and organization pem files to this folder from chef server. +我们将创建 ~/.chef并从chef服务端复制两个用户和组织的pem文件到chef的文件到这个目录下。 root@ubuntu-14-chef:~# scp bloger.pem blogs.pem kashi.pem linux.pem root@172.25.10.172:/.chef/ @@ -210,9 +209,9 @@ We will Create ~/.chef and copy the two user and organization pem files to this kashi.pem 100% 1678 1.6KB/s 00:00 linux.pem 100% 1678 1.6KB/s 00:00 -**Knife Configurations to Manage your Chef Environment** +** 编辑配置来管理chef环境 ** -Now create "~/.chef/knife.rb" with following content as configured in previous steps. +现在使用下面的内容创建"~/.chef/knife.rb"。 root@ubuntu-15-WKS:/.chef# vim knife.rb current_dir = File.dirname(__FILE__) @@ -228,17 +227,17 @@ Now create "~/.chef/knife.rb" with following content as configured in previous s cache_options( :path => "#{ENV['HOME']}/.chef/checksums" ) cookbook_path ["#{current_dir}/../cookbooks"] -Create "~/cookbooks" folder for cookbooks as specified knife.rb file. +创建knife.rb中指定的“~/cookbooks”文件夹。 root@ubuntu-15-WKS:/# mkdir cookbooks -**Testing with Knife Configurations** +**测试Knife配置** -Run "knife user list" and "knife client list" commands to verify whether knife configuration is working. +运行“knife user list”和“knife client list”来验证knife是否在工作。 root@ubuntu-15-WKS:/.chef# knife user list -You might get the following error while first time you run this command.This occurs because we do not have our Chef server's SSL certificate on our workstation. +第一次运行的时候可能会得到下面的错误,这是因为工作站上还没有chef服务端的SSL证书。 ERROR: SSL Validation failure connecting to host: 172.25.10.173 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ERROR: Could not establish a secure connection to the server. @@ -246,27 +245,26 @@ You might get the following error while first time you run this command.This occ If your Chef Server uses a self-signed certificate, you can use `knife ssl fetch` to make knife trust the server's certificates. -To recover from the above error run the following command to fetch ssl certs and once again run the knife user and client list command and it should be fine then. +要从上面的命令中恢复,运行下面的命令来获取ssl整数并重新运行knife user和client list,这时候应该就可以了。 root@ubuntu-15-WKS:/.chef# knife ssl fetch WARNING: Certificates from 172.25.10.173 will be fetched and placed in your trusted_cert directory (/.chef/trusted_certs). - Knife has no means to verify these are the correct certificates. You should - verify the authenticity of these certificates after downloading. + knife没有办法验证这些是有效的证书。你应该在下载时候验证这些证书的真实性。 - Adding certificate for ubuntu-14-chef.test.com in /.chef/trusted_certs/ubuntu-14-chef_test_com.crt + 在/.chef/trusted_certs/ubuntu-14-chef_test_com.crt下面添加ubuntu-14-chef.test.com的证书。 -Now after fetching ssl certs with above command, let's again run the below command. +在上面的命令取得ssl证书后,接着运行下面的命令。 root@ubuntu-15-WKS:/.chef#knife client list kashi-linux -### New Node Configuration to interact with chef-server ### +### 与chef服务端交互的新的节点 ### -Nodes contain chef-client which performs all the infrastructure automation. So, Its time to begin with adding new servers to our chef environment by Configuring a new node to interact with chef-server after we had Configured chef-server and knife workstation combinations. +节点是执行所有设备自动化的chef客户端。因此是时侯添加新的服务端到我们的chef环境下,在配置完chef-server和knife工作站后配置新的节点与chef-server交互。 -To configure a new node to work with chef server use below command. +我们使用下面的命令来添加新的节点与chef服务端工作。 root@ubuntu-15-WKS:~# knife bootstrap 172.25.10.170 --ssh-user root --ssh-password kashi123 --node-name mydns @@ -293,23 +291,23 @@ To configure a new node to work with chef server use below command. 172.25.10.170 to file /tmp/install.sh.26024/metadata.txt 172.25.10.170 trying wget... -After all we can see the vewly created node under the knife node list and new client list as it it will also creates a new client with the node. +之后我们可以在knife节点列表下看到新创建的节点,也会新节点列表下创建新的客户端。 root@ubuntu-15-WKS:~# knife node list mydns -Similarly we can add multiple number of nodes to our chef infrastructure by providing ssh credentials with the same above knofe bootstrap command. +相似地我们只要提供ssh证书通过上面的knife命令来创建多个节点到chef设备上。 -### Conclusion ### +### 总结 ### -In this detailed article we learnt about the Chef Configuration Management tool with its basic understanding and overview of its components with installation and configuration settings. We hope you have enjoyed learning the installation and configuration of Chef server with its workstation and client nodes. +本篇我们学习了chef管理工具并通过安装和配置设置浏览了它的组件。我希望你在学习安装和配置Chef服务端以及它的工作站和客户端节点中获得乐趣。 -------------------------------------------------------------------------------- via: http://linoxide.com/ubuntu-how-to/install-configure-chef-ubuntu-14-04-15-04/ 作者:[Kashif Siddique][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 8193ffd0ddaa727b06c270d0e07d9eed7cfc694c Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 26 Jul 2015 13:28:47 +0800 Subject: [PATCH 1504/2517] Rename sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md to translated/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md --- ... Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md (100%) diff --git a/sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md b/translated/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md similarity index 100% rename from sources/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md rename to translated/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md From f3ba8827980d1298be58ad92e758bbf10ae9536f Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 26 Jul 2015 15:42:35 +0800 Subject: [PATCH 1505/2517] Update 20150717 How to collect NGINX metrics - Part 2.md --- .../tech/20150717 How to collect NGINX metrics - Part 2.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150717 How to collect NGINX metrics - Part 2.md b/sources/tech/20150717 How to collect NGINX metrics - Part 2.md index 8d83b3a0f6..eb627649a7 100644 --- a/sources/tech/20150717 How to collect NGINX metrics - Part 2.md +++ b/sources/tech/20150717 How to collect NGINX metrics - Part 2.md @@ -1,3 +1,5 @@ +translation by strugglingyouth + How to collect NGINX metrics - Part 2 ================================================================================ ![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_2.png) @@ -234,4 +236,4 @@ via: https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ [21]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ [22]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#sign-up [23]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_collect_nginx_metrics.md -[24]:https://github.com/DataDog/the-monitor/issues \ No newline at end of file +[24]:https://github.com/DataDog/the-monitor/issues From fc1793e50b26a24eb254fabdf94009c6badf9254 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Jul 2015 00:09:22 +0800 Subject: [PATCH 1506/2517] PUB:20150520 Is Linux Better than OS X GNU Open Source and Apple in History MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wi-cuckoo 翻译的很不错。 --- ... X GNU Open Source and Apple in History.md | 57 +++++++++++++++++++ ... X GNU Open Source and Apple in History.md | 57 ------------------- 2 files changed, 57 insertions(+), 57 deletions(-) create mode 100644 published/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md delete mode 100644 translated/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md diff --git a/published/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md b/published/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md new file mode 100644 index 0000000000..fef89825fe --- /dev/null +++ b/published/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md @@ -0,0 +1,57 @@ +GNU、开源和 Apple 的那些黑历史 +============================================================================== +> 自由软件/开源社区与 Apple 之间的争论可以回溯到上世纪80年代,当时 Linux 的创始人称 Mac OS X 的核心就是“一堆废物”。还有其他一些软件史上的轶事。 + +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/05/untitled_2.png) + +开源拥护者们与微软之间有着很长、而且摇摆的关系。每个人都知道这个。但是,在许多方面,自由或者开源软件的支持者们与 Apple 之间的争执则更加突出——尽管这很少受到媒体的关注。 + +需要说明的是,并不是所有的开源拥护者都厌恶苹果。从各种轶事中,我已经见过很多 Linux 的黑客玩耍 iPhone 和iPad。实际上,许多 Linux 用户是十分喜欢 Apple 的 OS X 系统的,以至于他们[创造了很多Linux的发行版][1],都设计得看起来像OS X。(顺便说下,[北朝鲜政府][2]就这样做了。) + +但是 Mac 的信徒与企鹅的信徒——即 Linux 社区(不包括别的,仅指自由与开源软件世界中的这一小部分)之间的关系,并不一直是完全的和谐。并且这绝不是一个新的现象,在我研究Linux和自由软件基金会历史的时候就发现了。 + +### GNU vs. Apple ### + +这场战争将回溯到至少上世纪80年代后期。1988年6月,Richard Stallman 发起了 [GNU][3] 项目,希望建立一个完全自由的类 Unix 操作系统,其源代码将会免费共享,[强烈指责][4] Apple 对 [Hewlett-Packard][5](HPQ)和 [Microsoft][6](MSFT)的诉讼,称Apple的声明中说别人对 Macintosh 操作系统的界面和体验的抄袭是不正确。如果 Apple 流行的话,GNU 警告到,这家公司“将会借助大众的新力量终结掉为取代商业软件而生的自由软件。” + +那个时候,GNU 对抗 Apple 的诉讼(这意味着,十分讽刺的是,GNU 正在支持 Microsoft,尽管当时的情况不一样),通过发布[“让你的律师远离我的电脑”按钮][7]。同时呼吁 GNU 的支持者们抵制 Apple,警告虽然 Macintosh 看起来是不错的计算机,但 Apple 一旦赢得了诉讼就会给市场带来垄断,这会极大地提高计算机的售价。 + +Apple 最终[输掉了这场诉讼][8],但是直到1994年之后,GNU 才[撤销对 Apple 的抵制][9]。这期间,GNU 一直不断指责 Apple。在上世纪90年代早期甚至之后,GNU 开始发展 GNU 软件项目,可以在其他个人电脑平台包括 MS-DOS 计算机上使用。[GNU 宣称][10],除非 Apple 停止在计算机领域垄断的野心,让用户界面可以模仿 Macintosh 的一些东西,否则“我们不会提供任何对 Apple 机器的支持。”(因此讽刺的是 Apple 在90年代后期开发的类 UNIX 系统 OS X 有一大堆软件来自GNU。但是那是另外的故事了。) + +### Torvalds 与 Jobs ### + +除去他对大多数发行版比较自由放任的态度,Linux内核的创造者 Liuns Torvalds 相较于 Stallman 和 GNU 过去对Apple 的态度和善得多。在他 2001 年出版的书”Just For Fun: The Story of an Accidental Revolutionary“中,Torvalds 描述到与 Steve Jobs 的一次会面,大约是 1997 年收到后者的邀请去讨论 Mac OS X,当时 Apple 正在开发中,但还没有公开发布。 + +“基本上,Jobs 一开始就试图告诉我在桌面上的玩家就两个,Microsoft 和 Apple,而且他认为我能为 Linux 做的最好的事,就是从了 Apple,努力让开源用户去支持 Mac OS X” Torvalds 写道。 + +这次会谈显然让 Torvalds 很不爽。争吵的一点集中在 Torvalds 对 Mach 技术上的藐视,对于 Apple 正在用于构建新的 OS X 操作系统的内核,Torvalds 称其“一堆废物。它包含了所有你能做到的设计错误,并且甚至打算只弥补一小部分。” + +但是更令人不快的是,显然是 Jobs 在开发 OS X 时入侵开源的方式(OS X 的核心里上有很多开源程序):“他有点贬低了结构的瑕疵:谁在乎基础操作系统这个真正的 low-core 东西是不是开源,如果你有 Mac 层在最上面,这不是开源?” + +一切的一切,Torvalds 总结到,Jobs “并没有太多争论。他仅仅很简单地说着,胸有成竹地认为我会对与 Apple 合作感兴趣”。“他一无所知,不能去想像还会有人并不关心 Mac 市场份额的增长。我认为他真的感到惊讶了,当我表现出对 Mac 的市场有多大,或者 Microsoft 市场有多大的毫不关心时。” + +当然,Torvalds 并没有对所有 Linux 用户说起过。他对于 OS X 和 Apple 的看法从 2001 年开始就渐渐软化了。但实际上,早在2000年,Linux 社区的领导角色表现出对 Apple 及其高层的傲慢的深深的鄙视,可以看出一些重要的东西,关于 Apple 世界和开源/自由软件世界的矛盾是多么的根深蒂固。 + +从以上两则历史上的花边新闻中,可以看到关于 Apple 产品价值的重大争议,即是否该公司致力于提升其创造的软硬件的质量,或者仅仅是借市场的小聪明获利,让Apple产品卖出更多的钱而不是创造等同其价值的功能。但是不管怎样,我会暂时置身讨论之外。 + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/051815/linux-better-os-x-gnu-open-source-and-apple- + +作者:[Christopher Tozzi][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:https://www.linux.com/news/software/applications/773516-the-mac-ifying-of-the-linux-desktop/ +[2]:http://thevarguy.com/open-source-application-software-companies/010615/north-koreas-red-star-linux-os-made-apples-image +[3]:http://gnu.org/ +[4]:https://www.gnu.org/bulletins/bull5.html +[5]:http://www.hp.com/ +[6]:http://www.microsoft.com/ +[7]:http://www.duntemann.com/AppleSnakeButton.jpg +[8]:http://www.freibrun.com/articles/articl12.htm +[9]:https://www.gnu.org/bulletins/bull18.html#SEC6 +[10]:https://www.gnu.org/bulletins/bull12.html diff --git a/translated/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md b/translated/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md deleted file mode 100644 index 667a951f39..0000000000 --- a/translated/talk/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md +++ /dev/null @@ -1,57 +0,0 @@ -Linux比Mac OS X更好吗?历史中的GNU,开源和Apple -============================================================================== -> 自由软件/开源社区与Apple之间的争论可以回溯到上世纪80年代,当时Linux的创始人称Mac OS X的核心就是"一个废物",还有其他一些软件历史上的轶事。 - -![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/05/untitled_2.png) - -开源拥护者们与微软之间有着很长,而且摇摆的关系。每个人都知道这个。但是,在许多方面,自由或者开源软件的支持者们与Apple之间的紧张关系则更加突出——尽管这很少受到媒体的关注。 - -需要说明的是,并不是所有的开源拥护者都厌恶苹果。Anecdotally(待译),我已经见过很多Linux的黑客玩弄iPhones和iPads。实际上,许多Linux用户是十分喜欢Apple的OS X系统的,以至于他们[创造了很多Linux的发行版][1],都设计得看起来像OS X。(顺便说下,[北朝鲜政府][2]就这样做了。) - -但是Mac的信徒与企鹅——即Linux社区(未提及自由与开源软件世界的小众群体)的信徒之间的关系,并不一直是完全的和谐。并且这绝不是一个新的现象,在我研究Linux历史和开源基金会的时候就发现了。 - -### GNU vs. Apple ### - -这场战争将回溯到至少上世界80年代后期。1988年6月,Richard Stallman发起了[GNU][3]项目,希望建立一个完全自由的类Unix操作系统,其源代码讲会免费共享,[[强烈指责][4]Apple对[Hewlett-Packard][5](HPQ)和[Microsoft][6](MSFT)的诉讼,称Apple的声明中,说别人对Macintosh操作系统的界面和体验的抄袭是不正确。如果Apple流行,GNU警告到,这家公司“将会借助大众的新力量终结掉自由软件,而自由软件可以成为商业软件的替代品。” - -那个时候,GNU对抗Apple的诉讼(这意味着,十分讽刺的是,GNU正在支持Microsoft,尽管当时的情况不一样),通过发布["让你的律师远离我的电脑”按钮][7]。同时呼吁GNU的支持者们抵制Apple,警告如果Macintoshes看起来是不错的计算机,但Apple一旦赢得了诉讼就会给市场带来垄断,这会极大地提高计算机的售价。 - -Apple最终[输掉了诉讼][8],但是直到1994年之后,GNU才[撤销对Apple的抵制][9]。这期间,GNU一直不断指责Apple。在上世纪90年代早期甚至之后,GNU开始发展GNU软件项目,可以在其他个人电脑平台包括MS-DOS上使用。[GNU 宣称][10],除非Apple停止在计算机领域垄断的野心,让用户界面可以模仿Macintosh的一些东西,否则“我们不会提供任何对Apple机器的支持。”(因此讽刺的是一大堆软件都开发了OS X和类Unix系统的版本,于是Apple在90年代后期介绍这些软件来自GNU。但是那是另外的故事了。) - -### Trovalds on Jobs ### - -除去他对大多数发行版比较自由放任的态度,Liuns Trovalds,Linux内核的创造者,相较于Stallman和GNU过去对Apple的态度没有多一点仁慈。在他2001年出版的书"Just For Fun: The Story of an Accidental Revolutionary"中,Trovalds描述到与Steve Jobs的一个会面,大约是1997年收到后者的邀请去讨论Mac OS X,Apple正在开发,但还没有公开发布。 - -"基本上,Jobs一开始就试图告诉我在桌面上的玩家就两个,Microsoft和Apple,而且他认为我能为Linux做的最好的事,就是从了Apple,努力让开源用户站到Mac OS X后面去"Trovalds写道。 - -这次谈判显然让Trovalds很不爽。争吵的一点集中在Trovalds对Mach技术上的藐视,对于Apple正在用于构建新的OS X操作系统的内核,Trovalds称其“一推废物。它包含了所有你能做到的设计错误,并且甚至打算只弥补一小部分。” - -但是更令人不快的是,显然是Jobs在开发OS X时入侵开源的方式(OS X的核心里上有很多开源程序):“他有点贬低了结构的瑕疵:谁在乎基础操作系统,真正的low-core东西是不是开源,如果你有Mac层在最上面,这不是开源?” - -一切的一切,Trovalds总结到,Jobs“并没有使用太多争论。他仅仅很简单地说着,胸有成竹地认为我会对与Apple合作感兴趣”。“他没有任何线索,不能去想像还会有人并不关心Mac市场份额的增长。我认为他真的感到惊讶了,当我表现出对Mac的市场有多大,或者Microsoft市场有多大的可怜的关心时。” - -当然,Trovalds并没有对所有Linux用户说起。他对于OS X和Apple的看法从2001年开始就渐渐软化了。但实际上,早在2000年,Linux社区的领导角色表现出对Apple和其高层的傲慢的深深的鄙视,可以看出一些重要的东西,关于Apple和开源/自由软件世界的矛盾是多么的根深蒂固。 - -从以上两则历史上的花边新闻中,可以看到关于Apple产品价值的重大争议,即是否该公司致力于提升软硬件的质量,或者仅仅是借市场的小聪明获利,后者会让Apple产品卖出更多的钱,**********(该处不知如何翻译)。但是不管怎样,我会暂时置身讨论之外。 - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/open-source-application-software-companies/051815/linux-better-os-x-gnu-open-source-and-apple- - -作者:[Christopher Tozzi][a] -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://thevarguy.com/author/christopher-tozzi -[1]:https://www.linux.com/news/software/applications/773516-the-mac-ifying-of-the-linux-desktop/ -[2]:http://thevarguy.com/open-source-application-software-companies/010615/north-koreas-red-star-linux-os-made-apples-image -[3]:http://gnu.org/ -[4]:https://www.gnu.org/bulletins/bull5.html -[5]:http://www.hp.com/ -[6]:http://www.microsoft.com/ -[7]:http://www.duntemann.com/AppleSnakeButton.jpg -[8]:http://www.freibrun.com/articles/articl12.htm -[9]:https://www.gnu.org/bulletins/bull18.html#SEC6 -[10]:https://www.gnu.org/bulletins/bull12.html From 97e33d764177e7d95bba17e48334705058771534 Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 27 Jul 2015 08:16:44 +0800 Subject: [PATCH 1507/2517] Update 20150612 How to Configure Swarm Native Clustering for Docker.md --- ...0612 How to Configure Swarm Native Clustering for Docker.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md b/sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md index d07cd26428..0cf3d9cbb7 100644 --- a/sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md +++ b/sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to Configure Swarm Native Clustering for Docker ================================================================================ Hi everyone, today we'll learn about Swarm and how we can create native clusters using Docker with Swarm. [Docker Swarm][1] is a native clustering program for Docker which turns a pool of Docker hosts into a single virtual host. Swarm serves the standard Docker API, so any tool which can communicate with a Docker daemon can use Swarm to transparently scale to multiple hosts. Swarm follows the "batteries included but removable" principle as other Docker Projects. It ships with a simple scheduling backend out of the box, and as initial development settles, an API will develop to enable pluggable backends. The goal is to provide a smooth out-of-box experience for simple use cases, and allow swapping in more powerful backends, like Mesos, for large scale production deployments. Swarm is extremely easy to setup and get started. @@ -92,4 +93,4 @@ via: http://linoxide.com/linux-how-to/configure-swarm-clustering-docker/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:https://docs.docker.com/swarm/ \ No newline at end of file +[1]:https://docs.docker.com/swarm/ From a41db0b179ec43989557861872c2ec8204a4f656 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Mon, 27 Jul 2015 09:31:05 +0800 Subject: [PATCH 1508/2517] [Translated]20150612 How to Configure Swarm Native Clustering for Docker.md --- ...gure Swarm Native Clustering for Docker.md | 96 ------------------- ...gure Swarm Native Clustering for Docker.md | 95 ++++++++++++++++++ 2 files changed, 95 insertions(+), 96 deletions(-) delete mode 100644 sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md create mode 100644 translated/tech/20150612 How to Configure Swarm Native Clustering for Docker.md diff --git a/sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md b/sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md deleted file mode 100644 index 0cf3d9cbb7..0000000000 --- a/sources/tech/20150612 How to Configure Swarm Native Clustering for Docker.md +++ /dev/null @@ -1,96 +0,0 @@ -Translating by GOLinux! -How to Configure Swarm Native Clustering for Docker -================================================================================ -Hi everyone, today we'll learn about Swarm and how we can create native clusters using Docker with Swarm. [Docker Swarm][1] is a native clustering program for Docker which turns a pool of Docker hosts into a single virtual host. Swarm serves the standard Docker API, so any tool which can communicate with a Docker daemon can use Swarm to transparently scale to multiple hosts. Swarm follows the "batteries included but removable" principle as other Docker Projects. It ships with a simple scheduling backend out of the box, and as initial development settles, an API will develop to enable pluggable backends. The goal is to provide a smooth out-of-box experience for simple use cases, and allow swapping in more powerful backends, like Mesos, for large scale production deployments. Swarm is extremely easy to setup and get started. - -So, here are some features of Swarm 0.2 out of the box. - -1. Swarm 0.2.0 is about 85% compatible with the Docker Engine. -2. It supports Resource Management. -3. It has Advanced Scheduling feature with constraints and affinities. -4. It supports multiple Discovery Backends (hubs, consul, etcd, zookeeper) -5. It uses TLS encryption method for security and authentication. - -So, here are some very simple and easy steps on how we can use Swarm. - -### 1. Pre-requisites to run Swarm ### - -We must install Docker 1.4.0 or later on all nodes. While each node's IP need not be public, the Swarm manager must be able to access each node across the network. - -Note: Swarm is currently in beta, so things are likely to change. We don't recommend you use it in production yet. - -### 2. Creating Swarm Cluster ### - -Now, we'll create swarm cluster by running the below command. Each node will run a swarm node agent. The agent registers the referenced Docker daemon, monitors it, and updates the discovery backend with the node's status. The below command returns a token which is a unique cluster id, it will be used when starting the Swarm Agent on nodes. - - # docker run swarm create - -![Creating Swarm Cluster](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-swarm-cluster.png) - -### 3. Starting the Docker Daemon in each nodes ### - -We'll need to login into each node that we'll use to create clusters and start the Docker Daemon into it using flag -H . It ensures that the docker remote API on the node is available over TCP for the Swarm Manager. To do start the docker daemon, we'll need to run the following command inside the nodes. - - # docker -H tcp://0.0.0.0:2375 -d - -![Starting Docker Daemon](http://blog.linoxide.com/wp-content/uploads/2015/05/starting-docker-daemon.png) - -### 4. Adding the Nodes ### - -After enabling Docker Daemon, we'll need to add the Swarm Nodes to the discovery service. We must ensure that node's IP must be accessible from the Swarm Manager. To do so, we'll need to run the following command. - - # docker run -d swarm join --addr=:2375 token:// - -![Adding Nodes to Cluster](http://blog.linoxide.com/wp-content/uploads/2015/05/adding-nodes-to-cluster.png) - -**Note**: Here, we'll need to replace and with the IP address of the Node and the cluster ID we got from step 2. - -### 5. Starting the Swarm Manager ### - -Now, as we have got the nodes connected to the cluster. Now, we'll start the swarm manager, we'll need to run the following command in the node. - - # docker run -d -p :2375 swarm manage token:// - -![Starting Swarm Manager](http://blog.linoxide.com/wp-content/uploads/2015/05/starting-swarm-manager.png) - -### 6. Checking the Configuration ### - -Once the manager is running, we can check the configuration by running the following command. - - # docker -H tcp:// info - -![Accessing Swarm Clusters](http://blog.linoxide.com/wp-content/uploads/2015/05/accessing-swarm-cluster.png) - -**Note**: We'll need to replace with the ip address and port of the host running the swarm manager. - -### 7. Using the docker CLI to access nodes ### - -After everything is done perfectly as explained above, this part is the most important part of the Docker Swarm. We can use Docker CLI to access the nodes and run containers on them. - - # docker -H tcp:// info - # docker -H tcp:// run ... - -### 8. Listing nodes in the cluster ### - -We can get a list of all of the running nodes using the swarm list command. - - # docker run --rm swarm list token:// - -![Listing Swarm Nodes](http://blog.linoxide.com/wp-content/uploads/2015/05/listing-swarm-nodes.png) - -### Conclusion ### - -Swarm is really an awesome feature of docker that can be used for creating and managing clusters. It is pretty easy to setup and use. It is more beautiful when we use constraints and affinities on top of it. Advanced Scheduling is an awesome feature of it which applies filters to exclude nodes with ports, labels, health and it uses strategies to pick the best node. So, if you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/configure-swarm-clustering-docker/ - -作者:[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/ -[1]:https://docs.docker.com/swarm/ diff --git a/translated/tech/20150612 How to Configure Swarm Native Clustering for Docker.md b/translated/tech/20150612 How to Configure Swarm Native Clustering for Docker.md new file mode 100644 index 0000000000..82849b4661 --- /dev/null +++ b/translated/tech/20150612 How to Configure Swarm Native Clustering for Docker.md @@ -0,0 +1,95 @@ +为Docker配置Swarm本地集群 +================================================================================ +嗨,大家好。今天我们来学一学Swarm相关的内容吧,我们将学习通过Swarm来创建Docker本地集群。[Docker Swarm][1]是用于Docker的本地集群项目,它可以将Docker主机池转换成单个的虚拟主机。Swarm提供了标准的Docker API,所以任何可以和Docker守护进程通信的工具都可以使用Swarm来透明地规模化多个主机。Swarm遵循“包含电池并可拆卸”的原则,就像其它Docker项目一样。它附带有一个开箱即用的简单的后端调度程序,而且作为初始开发套件,也为其开发了一个可启用即插即用后端的API。其目标在于为一些简单的使用情况提供一个平滑的、开箱即用的体验,并且它允许在更强大的后端,如Mesos,中开启交换,以达到大量生产部署的目的。Swarm配置和使用极其简单。 + +这里给大家提供Swarm 0.2开箱的即用一些特性。 + +1. Swarm 0.2.0大约85%与Docker引擎兼容。 +2. 它支持资源管理。 +3. 它具有一些带有限制器和类同器高级调度特性。 +4. 它支持多个发现后端(hubs,consul,etcd,zookeeper) +5. 它使用TLS加密方法进行安全通信和验证。 + +那么,我们来看一看Swarm的一些相当简单而简易的使用步骤吧。 + +### 1. 运行Swarm的先决条件 ### + +我们必须在所有节点安装Docker 1.4.0或更高版本。虽然哥哥节点的IP地址不需要要公共地址,但是Swarm管理器必须可以通过网络访问各个节点。 + +注意:Swarm当前还处于beta版本,因此功能特性等还有可能发生改变,我们不推荐你在生产环境中使用。 + +### 2. 创建Swarm集群 ### + +现在,我们将通过运行下面的命令来创建Swarm集群。各个节点都将运行一个swarm节点代理,该代理会注册、监控相关的Docker守护进程,并更新发现后端获取的节点状态。下面的命令会返回一个唯一的集群ID标记,在启动节点上的Swarm代理时会用到它。 + + # docker run swarm create + +![Creating Swarm Cluster](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-swarm-cluster.png) + +### 3. 启动各个节点上的Docker守护进程 ### + +我们需要使用-H标记登陆进我们将用来创建几圈和启动Docker守护进程的各个节点,它会保证Swarm管理器能够通过TCP访问到各个节点上的Docker远程API。要启动Docker守护进程,我们需要在各个节点内部运行以下命令。 + + # docker -H tcp://0.0.0.0:2375 -d + +![Starting Docker Daemon](http://blog.linoxide.com/wp-content/uploads/2015/05/starting-docker-daemon.png) + +### 4. 添加节点 ### + +在启用Docker守护进程后,我们需要添加Swarm节点到发现服务,我们必须确保节点IP可从Swarm管理器访问到。要完成该操作,我们需要运行以下命令。 + + # docker run -d swarm join --addr=:2375 token:// + +![Adding Nodes to Cluster](http://blog.linoxide.com/wp-content/uploads/2015/05/adding-nodes-to-cluster.png) + +** 注意**:我们需要用步骤2中获取到的节点IP地址和集群ID替换这里的。 + +### 5. 开启Swarm管理器 ### + +现在,由于我们已经获得了连接到集群的节点,我们将启动swarm管理器。我们需要在节点中运行以下命令。 + + # docker run -d -p :2375 swarm manage token:// + +![Starting Swarm Manager](http://blog.linoxide.com/wp-content/uploads/2015/05/starting-swarm-manager.png) + +### 6. 检查配置 ### + +一旦管理运行起来后,我们可以通过运行以下命令来检查配置。 + + # docker -H tcp:// info + +![Accessing Swarm Clusters](http://blog.linoxide.com/wp-content/uploads/2015/05/accessing-swarm-cluster.png) + +** 注意**:我们需要替换为运行swarm管理器的主机的IP地址和端口。 + +### 7. 使用docker CLI来访问节点 ### + +在一切都像上面说得那样完美地完成后,这一部分是Docker Swarm最为重要的部分。我们可以使用Docker CLI来访问节点,并在节点上运行容器。 + + # docker -H tcp:// info + # docker -H tcp:// run ... + +### 8. 监听集群中的节点 ### + +我们可以使用swarm list命令来获取所有运行中节点的列表。 + + # docker run --rm swarm list token:// + +![Listing Swarm Nodes](http://blog.linoxide.com/wp-content/uploads/2015/05/listing-swarm-nodes.png) + +### 尾声 ### + +Swarm真的是一个有着相当不错的功能的docker,它可以用于创建和管理集群。它相当易于配置和使用,当我们在它上面使用限制器和类同器师它更为出色。高级调度程序是一个相当不错的特性,它可以应用过滤器来通过端口、标签、健康状况来排除节点,并且它使用策略来挑选最佳节点。那么,如果你有任何问题、评论、反馈,请在下面的评论框中写出来吧,好让我们知道哪些材料需要补充或改进。谢谢大家了!尽情享受吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/configure-swarm-clustering-docker/ + +作者:[Arun Pyasi][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://docs.docker.com/swarm/ From 4106ff98c00ea84ea431bb254c5699d09671790d Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Mon, 27 Jul 2015 13:24:26 +0800 Subject: [PATCH 1509/2517] Delete 20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完毕 --- ...er On Ubuntu or CentOS 7.1 or Fedora 22.md | 193 ------------------ 1 file changed, 193 deletions(-) delete mode 100644 sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md diff --git a/sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md b/sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md deleted file mode 100644 index 1567211cd5..0000000000 --- a/sources/tech/20150515 Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md +++ /dev/null @@ -1,193 +0,0 @@ -Translating by dingdongnigetou - -Install Plex Media Server On Ubuntu / CentOS 7.1 / Fedora 22 -================================================================================ -In this article we will show you how easily you can setup Plex Home Media Server on major Linux distributions with their latest releases. After its successful installation of Plex you will be able to use your centralized home media playback system that streams its media to many Plex player Apps and the Plex Home will allows you to setup your environment by adding your devices and to setup a group of users that all can use Plex Together. So let’s start its installation first on Ubuntu 15.04. - -### Basic System Resources ### - -System resources mainly depend on the type and number of devices that you are planning to connect with the server. So according to our requirements we will be using as following system resources and software for a standalone server. - -注:表格 - - - - - - - - - - - - - - - - - - - - - - -
Plex Home Media Server
Base Operating SystemUbuntu 15.04 / CentOS 7.1 / Fedora 22 Work Station
Plex Media ServerVersion 0.9.12.3.1173-937aac3
RAM and CPU1 GB  , 2.0 GHZ
Hard Disk30 GB
- -### Plex Media Server 0.9.12.3 on Ubuntu 15.04 ### - -We are now ready to start the installations process of Plex Media Server on Ubuntu so let’s start with the following steps to get it ready. - -#### Step 1: System Update #### - -Login to your server with root privileges Make your that your system is upto date if not then do by using below command. - - root@ubuntu-15:~#apt-get update - -#### Step 2: Download the Latest Plex Media Server Package #### - -Create a new directory and download .deb plex Media Package in it from the official website of Plex for Ubuntu using wget command. - - root@ubuntu-15:~# cd /plex/ - root@ubuntu-15:/plex# - root@ubuntu-15:/plex# wget https://downloads.plex.tv/plex-media-server/0.9.12.3.1173-937aac3/plexmediaserver_0.9.12.3.1173-937aac3_amd64.deb - -#### Step 3: Install the Debian Package of Plex Media Server #### - -Now within the same directory run following command to start installation of debian package and then check the status of plekmediaserver. - - root@ubuntu-15:/plex# dpkg -i plexmediaserver_0.9.12.3.1173-937aac3_amd64.deb - ----------- - - root@ubuntu-15:~# service plexmediaserver status - -![Plexmediaserver Service](http://blog.linoxide.com/wp-content/uploads/2015/06/plex-status.png) - -### Plex Home Media Web App Setup on Ubuntu 15.04 ### - -Let's open your web browser within your localhost network and open the Web Interface with your localhost IP and port 32400 and do following steps to configure it: - - http://172.25.10.179:32400/web - http://localhost:32400/web - -#### Step 1:Sign UP before Login #### - -After you have access to the web interface of Plesk Media Server make sure to Sign Up and set your username email ID and Password to login as. - -![Plex Sign In](http://blog.linoxide.com/wp-content/uploads/2015/06/PMS-Login.png) - -#### Step 2: Enter Your Pin to Secure Your Plex Media Home User #### - -![Plex User Pin](http://blog.linoxide.com/wp-content/uploads/2015/06/333.png) - -Now you have successfully configured your user under Plex Home Media. - -![Welcome To Plex](http://blog.linoxide.com/wp-content/uploads/2015/06/3333.png) - -### Opening Plex Web App on Devices Other than Localhost Server ### - -As we have seen in our Plex media home page that it indicates that "You do not have permissions to access this server". Its because of we are on a different network than the Server computer. - -![Plex Server Permissions](http://blog.linoxide.com/wp-content/uploads/2015/06/33.png) - -Now we need to resolve this permissions issue so that we can have access to server on the devices other than the hosted server by doing following setup. - -### Setup SSH Tunnel for Windows System to access Linux Server ### - -First we need to set up a SSH tunnel so that we can access things as if they were local. This is only necessary for the initial setup. - -If you are using Windows as your local system and server on Linux then we can setup SSH-Tunneling using Putty as shown. - -![Plex SSH Tunnel](http://blog.linoxide.com/wp-content/uploads/2015/06/ssh-tunnel.png) - -**Once you have the SSH tunnel set up:** - -Open your Web browser window and type following URL in the address bar. - - http://localhost:8888/web - -The browser will connect to the server and load the Plex Web App with same functionality as on local. -Agree to the terms of Services and start - -![Agree to Plex term](http://blog.linoxide.com/wp-content/uploads/2015/06/5.png) - -Now a fully functional Plex Home Media Server is ready to add new media libraries, channels, playlists etc. - -![PMS Settings](http://blog.linoxide.com/wp-content/uploads/2015/06/8.png) - -### Plex Media Server 0.9.12.3 on CentOS 7.1 ### - -We will follow the same steps on CentOS-7.1 that we did for the installation of Plex Home Media Server on Ubuntu 15.04. - -So lets start with Plex Media Servers Package Installation. - -#### Step 1: Plex Media Server Installation #### - -To install Plex Media Server on centOS 7.1 we need to download the .rpm package from the official website of Plex. So we will use wget command to download .rpm package for this purpose in a new directory. - - [root@linux-tutorials ~]# cd /plex - [root@linux-tutorials plex]# wget https://downloads.plex.tv/plex-media-server/0.9.12.3.1173-937aac3/plexmediaserver-0.9.12.3.1173-937aac3.x86_64.rpm - -#### Step 2: Install .RPM Package #### - -After completion of complete download package we will install this package using rpm command within the same direcory where we installed the .rpm package. - - [root@linux-tutorials plex]# ls - plexmediaserver-0.9.12.3.1173-937aac3.x86_64.rpm - [root@linux-tutorials plex]# rpm -i plexmediaserver-0.9.12.3.1173-937aac3.x86_64.rpm - -#### Step 3: Start Plexmediaservice #### - -We have successfully installed Plex Media Server Now we just need to restart its service and then enable it permanently. - - [root@linux-tutorials plex]# systemctl start plexmediaserver.service - [root@linux-tutorials plex]# systemctl enable plexmediaserver.service - [root@linux-tutorials plex]# systemctl status plexmediaserver.service - -### Plex Home Media Web App Setup on CentOS-7.1 ### - -Now we just need to repeat all steps that we performed during the Web app setup of Ubuntu. -So let's Open a new window in your web browser and access the Plex Media Server Web app using localhost or IP or your Plex server. - - http://172.20.3.174:32400/web - http://localhost:32400/web - -Then to get full permissions on the server you need to repeat the steps to create the SSH-Tunnel. -After signing up with new user account we will be able to access its all features and can add new users, add new libraries and setup it per our needs. - -![Plex Device Centos](http://blog.linoxide.com/wp-content/uploads/2015/06/plex-devices-centos.png) - -### Plex Media Server 0.9.12.3 on Fedora 22 Work Station ### - -The Basic steps to download and install Plex Media Server are the same as its we did for in CentOS 7.1. -We just need to download its .rpm package and then install it with rpm command. - -![PMS Installation](http://blog.linoxide.com/wp-content/uploads/2015/06/plex-on-fedora.png) - -### Plex Home Media Web App Setup on Fedora 22 Work Station ### - -We had setup Plex Media Server on the same host so we don't need to setup SSH-Tunnel in this time scenario. Just open the web browser in your Fedora 22 Workstation with default port 32400 of Plex Home Media Server and accept the Plex Terms of Services Agreement. - -![Plex Agreement](http://blog.linoxide.com/wp-content/uploads/2015/06/Plex-Terms.png) - -**Welcome to Plex Home Media Server on Fedora 22 Workstation** - -Lets login with your plex account and start with adding your libraries for your favorite movie channels , create your playlists, add your photos and enjoy with many other features of Plex Home Media Server. - -![Plex Add Libraries](http://blog.linoxide.com/wp-content/uploads/2015/06/create-library.png) - -### Conclusion ### - -We had successfully installed and configured Plex Media Server on Major Linux Distributions. So, Plex Home Media Server has always been a best choice for media management. Its so simple to setup on cross platform as we did for Ubuntu, CentOS and Fedora. It has simplifies the tasks of organizing your media content and streaming to other computers and devices then to share it with your friends. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/tools/install-plex-media-server-ubuntu-centos-7-1-fedora-22/ - -作者:[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/ From baa2ea46dafd6edd8c1dd34ca455e034abdfb7af Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Mon, 27 Jul 2015 13:27:22 +0800 Subject: [PATCH 1510/2517] Create Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完毕 --- ...er On Ubuntu or CentOS 7.1 or Fedora 22.md | 190 ++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 translated/tech/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md diff --git a/translated/tech/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md b/translated/tech/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md new file mode 100644 index 0000000000..813057798b --- /dev/null +++ b/translated/tech/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md @@ -0,0 +1,190 @@ + +如何在 Ubuntu/CentOS7.1/Fedora22 上安装 Plex Media Server ? +================================================================================ +在本文中我们将会向你展示如何容易地在主流的最新发布的Linux发行版上安装Plex Home Media Server。在Plex安装成功后你将可以使用你的集中式家庭媒体播放系统,该系统能让多个Plex播放器App共享它的媒体资源,并且该系统允许你设置你的环境,通过增加你的设备以及设置一个可以一起使用Plex的用户组。让我们首先在Ubuntu15.04上开始Plex的安装。 + +### 基本的系统资源 ### + +系统资源主要取决于你打算用来连接服务的设备类型和数量, 所以根据我们的需求我们将会在一个单独的服务器上使用以下系统资源。 + +注:表格 + + + + + + + + + + + + + + + + + + + + + + +
Plex Home Media Server
Base Operating SystemUbuntu 15.04 / CentOS 7.1 / Fedora 22 Work Station
Plex Media ServerVersion 0.9.12.3.1173-937aac3
RAM and CPU1 GB  , 2.0 GHZ
Hard Disk30 GB
+ +### 在Ubuntu 15.04上安装Plex Media Server 0.9.12.3 ### + +我们现在准备开始在Ubuntu上安装Plex Media Server,让我们从下面的步骤开始来让Plex做好准备。 + +#### 步骤 1: 系统更新 #### + +用root权限登陆你的服务器。确保你的系统是最新的,如果不是就使用下面的命令。 + + root@ubuntu-15:~#apt-get update + +#### 步骤 2: 下载最新的Plex Media Server包 #### + +创建一个新目录,用wget命令从Plex官网下载为Ubuntu提供的.deb包并放入该目录中。 + + root@ubuntu-15:~# cd /plex/ + root@ubuntu-15:/plex# + root@ubuntu-15:/plex# wget https://downloads.plex.tv/plex-media-server/0.9.12.3.1173-937aac3/plexmediaserver_0.9.12.3.1173-937aac3_amd64.deb + +#### 步骤 3: 安装Plex Media Server的Debian包 #### + +现在在相同的目录下执行下面的命令来开始debian包的安装, 然后检查plexmediaserver(译者注: 原文plekmediaserver, 明显笔误)的状态。 + + root@ubuntu-15:/plex# dpkg -i plexmediaserver_0.9.12.3.1173-937aac3_amd64.deb + +---------- + + root@ubuntu-15:~# service plexmediaserver status + +![Plexmediaserver Service](http://blog.linoxide.com/wp-content/uploads/2015/06/plex-status.png) + +### 在Ubuntu 15.04上设置Plex Home Media Web应用 ### + +让我们在你的本地网络主机中打开web浏览器, 并用你的本地主机IP以及端口32400来打开Web界面并完成以下步骤来配置Plex。 + + http://172.25.10.179:32400/web + http://localhost:32400/web + +#### 步骤 1: 登陆前先注册 #### + +在你访问到Plex Media Server的Web界面之后(译者注: 原文是Plesk, 应该是笔误), 确保注册并填上你的用户名(译者注: 原文username email ID感觉怪怪:))和密码来登陆。 + +![Plex Sign In](http://blog.linoxide.com/wp-content/uploads/2015/06/PMS-Login.png) + +#### 输入你的PIN码来保护你的Plex Home Media用户(译者注: 原文Plex Media Home, 个人觉得专业称谓应该保持一致) #### + +![Plex User Pin](http://blog.linoxide.com/wp-content/uploads/2015/06/333.png) + +现在你已经成功的在Plex Home Media下配置你的用户。 + +![Welcome To Plex](http://blog.linoxide.com/wp-content/uploads/2015/06/3333.png) + +### 在设备上而不是本地服务器上打开Plex Web应用 ### + +正如我们在Plex Media主页看到的表明"你没有权限访问这个服务"。 这是因为我们跟服务器计算机不在同个网络。 + +![Plex Server Permissions](http://blog.linoxide.com/wp-content/uploads/2015/06/33.png) + +现在我们需要解决这个权限问题以便我们通过设备访问服务器而不是通过托管服务器(Plex服务器), 通过完成下面的步骤。 + +### 设置SSH隧道使Windows系统访问到Linux服务器 ### + +首先我们需要建立一条SSH隧道以便我们访问远程服务器资源,就好像资源在本地一样。 这仅仅是必要的初始设置。 + +如果你正在使用Windows作为你的本地系统,Linux作为服务器,那么我们可以参照下图通过Putty来设置SSH隧道。 +(译者注: 首先要在Putty的Session中用Plex服务器IP配置一个SSH的会话,才能进行下面的隧道转发规则配置。 +然后点击“Open”,输入远端服务器用户名密码, 来保持SSH会话连接。) + +![Plex SSH Tunnel](http://blog.linoxide.com/wp-content/uploads/2015/06/ssh-tunnel.png) + +**一旦你完成SSH隧道设置:** + +打开你的Web浏览器窗口并在地址栏输入下面的URL。 + + http://localhost:8888/web + +浏览器将会连接到Plex服务器并且加载与服务器本地功能一致的Plex Web应用。 同意服务条款并开始。 + +![Agree to Plex term](http://blog.linoxide.com/wp-content/uploads/2015/06/5.png) + +现在一个功能齐全的Plex Home Media Server已经准备好添加新的媒体库、频道、播放列表等资源。 + +![PMS Settings](http://blog.linoxide.com/wp-content/uploads/2015/06/8.png) + +### 在CentOS 7.1上安装Plex Media Server 0.9.12.3 ### + +我们将会按照上述在Ubuntu15.04上安装Plex Home Media Server的步骤来将Plex安装到CentOS 7.1上。 + +让我们从安装Plex Media Server开始。 + +#### 步骤1: 安装Plex Media Server #### + +为了在CentOS7.1上安装Plex Media Server,我们需要从Plex官网下载rpm安装包。 因此我们使用wget命令来将rpm包下载到一个新的目录下。 + + [root@linux-tutorials ~]# cd /plex + [root@linux-tutorials plex]# wget https://downloads.plex.tv/plex-media-server/0.9.12.3.1173-937aac3/plexmediaserver-0.9.12.3.1173-937aac3.x86_64.rpm + +#### 步骤2: 安装RPM包 #### + +在完成安装包完整的下载之后, 我们将会使用rpm命令在相同的目录下安装这个rpm包。 + + [root@linux-tutorials plex]# ls + plexmediaserver-0.9.12.3.1173-937aac3.x86_64.rpm + [root@linux-tutorials plex]# rpm -i plexmediaserver-0.9.12.3.1173-937aac3.x86_64.rpm + +#### 步骤3: 启动Plexmediaservice #### + +我们已经成功地安装Plex Media Server, 现在我们只需要重启它的服务然后让它永久地启用。 + + [root@linux-tutorials plex]# systemctl start plexmediaserver.service + [root@linux-tutorials plex]# systemctl enable plexmediaserver.service + [root@linux-tutorials plex]# systemctl status plexmediaserver.service + +### 在CentOS-7.1上设置Plex Home Media Web应用 ### + +现在我们只需要重复在Ubuntu上设置Plex Web应用的所有步骤就可以了。 让我们在Web浏览器上打开一个新窗口并用localhost或者Plex服务器的IP(译者注: 原文为or your Plex server, 明显的笔误)来访问Plex Home Media Web应用(译者注:称谓一致)。 + + http://172.20.3.174:32400/web + http://localhost:32400/web + +为了获取服务的完整权限你需要重复创建SSH隧道的步骤。 在你用新账户注册后我们将可以访问到服务的所有特性,并且可以添加新用户、添加新的媒体库以及根据我们的需求来设置它。 + +![Plex Device Centos](http://blog.linoxide.com/wp-content/uploads/2015/06/plex-devices-centos.png) + +### 在Fedora 22工作站上安装Plex Media Server 0.9.12.3 ### + +基本的下载和安装Plex Media Server步骤跟在CentOS 7.1上安装的步骤一致。我们只需要下载对应的rpm包然后用rpm命令来安装它。 + +![PMS Installation](http://blog.linoxide.com/wp-content/uploads/2015/06/plex-on-fedora.png) + +### 在Fedora 22工作站上配置Plex Home Media Web应用 ### + +我们在(与Plex服务器)相同的主机上配置Plex Media Server,因此不需要设置SSH隧道。只要在你的Fedora 22工作站上用Plex Home Media Server的默认端口号32400打开Web浏览器并同意Plex的服务条款即可。 + +![Plex Agreement](http://blog.linoxide.com/wp-content/uploads/2015/06/Plex-Terms.png) + +**欢迎来到Fedora 22工作站上的Plex Home Media Server** + +让我们用你的Plex账户登陆,并且开始将你喜欢的电影频道添加到媒体库、创建你的播放列表、添加你的图片以及享用更多其他的特性。 + +![Plex Add Libraries](http://blog.linoxide.com/wp-content/uploads/2015/06/create-library.png) + +### 总结 ### + +我们已经成功完成Plex Media Server在主流Linux发行版上安装和配置。Plex Home Media Server永远都是媒体管理的最佳选择。 它在跨平台上的设置是如此的简单,就像我们在Ubuntu,CentOS以及Fedora上的设置一样。它简化了你组织媒体内容的工作,并将媒体内容“流”向其他计算机以及设备以便你跟你的朋友分享媒体内容。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/install-plex-media-server-ubuntu-centos-7-1-fedora-22/ + +作者:[Kashif Siddique][a] +译者:[dingdongnigetou](https://github.com/dingdongnigetou) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/kashifs/ From 235d39a2694ec8f4e10e835f7a0041a3767113e8 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Jul 2015 13:30:38 +0800 Subject: [PATCH 1511/2517] PUB:20150709 7 command line tools for monitoring your Linux system @ZTinoZ --- ... tools for monitoring your Linux system.md | 83 +++++++++++++++++++ ... tools for monitoring your Linux system.md | 79 ------------------ 2 files changed, 83 insertions(+), 79 deletions(-) create mode 100644 published/20150709 7 command line tools for monitoring your Linux system.md delete mode 100644 translated/talk/20150709 7 command line tools for monitoring your Linux system.md diff --git a/published/20150709 7 command line tools for monitoring your Linux system.md b/published/20150709 7 command line tools for monitoring your Linux system.md new file mode 100644 index 0000000000..da46bd124e --- /dev/null +++ b/published/20150709 7 command line tools for monitoring your Linux system.md @@ -0,0 +1,83 @@ +监控 Linux 系统的 7 个命令行工具 +================================================================================ +**这里有一些基本的命令行工具,让你能更简单地探索和操作Linux。** + +![Image courtesy Meltys-stock](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-1-100591899-orig.png) + +### 深入 ### + +关于Linux最棒的一件事之一是你能深入操作系统,来探索它是如何工作的,并寻找机会来微调性能或诊断问题。这里有一些基本的命令行工具,让你能更简单地探索和操作Linux。大多数的这些命令是在你的Linux系统中已经内建的,但假如它们没有的话,就用谷歌搜索命令名和你的发行版名吧,你会找到哪些包需要安装(注意,一些命令是和其它命令捆绑起来打成一个包的,你所找的包可能写的是其它的名字)。如果你知道一些你所使用的其它工具,欢迎评论。 + + +### 我们怎么开始 ### + +![](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-2-100591901-orig.png) + +须知: 本文中的截图取自一台[Debian Linux 8.1][1] (“Jessie”),其运行在[OS X 10.10.3][3] (“Yosemite”)操作系统下的[Oracle VirtualBox 4.3.28][2]中的一台虚拟机里。想要建立你的Debian虚拟机,可以看看我的这篇教程——“[如何在 VirtualBox VM 下安装 Debian][4]”。 + + +### Top ### + +![](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-3-100591902-orig.png) + +作为Linux系统监控工具中比较易用的一个,**top命令**能带我们一览Linux中的几乎每一处。以下这张图是它的默认界面,但是按“z”键可以切换不同的显示颜色。其它热键和命令则有其它的功能,例如显示概要信息和内存信息(第四行第二个),根据各种不一样的条件排序、终止进程任务等等(你可以在[这里][5]找到完整的列表)。 + + +### htop ### + +![](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-4-100591904-orig.png) + +相比top,它的替代品Htop则更为精致。维基百科是这样描述的:“用户经常会部署htop以免Unix top不能提供关于系统进程的足够信息,比如说当你在尝试发现应用程序里的一个小的内存泄露问题,Htop一般也能作为一个系统监听器来使用。相比top,它提供了一个更方便的光标控制界面来向进程发送信号。” (想了解更多细节猛戳[这里][6]) + + +### Vmstat ### + +![](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-5-100591903-orig.png) + +Vmstat是一款监控Linux系统性能数据的简易工具,这让它更合适使用在shell脚本中。使出你的正则表达式绝招,用vmstat和cron作业来做一些激动人心的事情吧。“后面的报告给出的是上一次系统重启之后的均值,另外一份报告给出的则是从前一个报告起间隔周期中的信息。其它的进程和内存报告是那个瞬态的情况”(猛戳[这里][7]获取更多信息)。 + +### ps ### + +![](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-6-100591905-orig.png) + +ps命令展现的是正在运行中的进程列表。在这种情况下,我们用“-e”选项来显示每个进程,也就是所有正在运行的进程了(我把列表滚动到了前面,否则列名就看不到了)。这个命令有很多选项允许你去按需格式化输出。只要使用上述一点点的正则表达式技巧,你就能得到一个强大的工具了。猛戳[这里][8]获取更多信息。 + +### Pstree ### + +![](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-7-100591906-orig.png) + +Pstree“以树状图显示正在运行中的进程。这个进程树是以某个 pid 为根节点的,如果pid被省略的话那树是以init为根节点的。如果指定用户名,那所有进程树都会以该用户所属的进程为父进程进行显示。”以树状图来帮你将进程之间的所属关系进行分类,这的确是个很有效的工具(戳[这里][9])。 + +### pmap ### + +![](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-8-100591907-orig.png) + +在调试过程中,理解一个应用程序如何使用内存是至关重要的,而pmap的作用就是当给出一个进程ID时显示出相关信息。上面的截图展示的是使用“-x”选项所产生的部分输出,你也可以用pmap的“-X”选项来获取更多的细节信息,但是前提是你要有个更宽的终端窗口。 + +### iostat ### + +![](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-9-100591900-orig.png) + +Linux系统的一个至关重要的性能指标是处理器和存储的使用率,它也是iostat命令所报告的内容。如同ps命令一样,iostat有很多选项允许你选择你需要的输出格式,除此之外还可以在某一段时间范围内的重复采样几次。详情请戳[这里][10]。 + +-------------------------------------------------------------------------------- + +via: http://www.networkworld.com/article/2937219/linux/7-command-line-tools-for-monitoring-your-linux-system.html + +作者:[Mark Gibbs][a] +译者:[ZTinoZ](https://github.com/ZTinoZ) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.networkworld.com/author/Mark-Gibbs/ +[1]:https://www.debian.org/releases/stable/ +[2]:https://www.virtualbox.org/ +[3]:http://www.apple.com/osx/ +[4]:http://www.networkworld.com/article/2937148/how-to-install-debian-linux-8-1-in-a-virtualbox-vm +[5]:http://linux.die.net/man/1/top +[6]:http://linux.die.net/man/1/htop +[7]:http://linuxcommand.org/man_pages/vmstat8.html +[8]:http://linux.die.net/man/1/ps +[9]:http://linux.die.net/man/1/pstree +[10]:http://linux.die.net/man/1/iostat diff --git a/translated/talk/20150709 7 command line tools for monitoring your Linux system.md b/translated/talk/20150709 7 command line tools for monitoring your Linux system.md deleted file mode 100644 index e33c259d5c..0000000000 --- a/translated/talk/20150709 7 command line tools for monitoring your Linux system.md +++ /dev/null @@ -1,79 +0,0 @@ -监控你的Linux系统的7个命令行工具 -================================================================================ -**这里有一些基本的命令行工具,让你能更简单地探索和操作Linux。** - -![Image courtesy Meltys-stock](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-1-100591899-orig.png) - -### 深入 ### - -关于Linux最棒的一件事之一是你能深入操作系统多深,来探索它是如何工作的并寻找机会来微调性能或诊断问题。这里有一些基本的命令行工具,让你能更简单地探索和操作Linux。大多数的这些命令是在你的Linux系统中已经内建的,但假设它们不是,就用谷歌搜索命令名和你的发行版名吧,你会找到哪些包需要安装(注意,一些命令是和其它命令捆绑起来打成一个包的,你所找的包可能写的是其它的名字)。如果你知道一些你所使用的其它工具,欢迎评论。 - -![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-2-100591901-orig.png) - -### 我们怎么做 ### - -须知: 本文中的截图取自[Debian Linux 8.1][1] (“Jessie”),其运行在[OS X 10.10.3][3] (“Yosemite”)操作系统下[Oracle VirtualBox 4.3.28][2]中的一台虚拟机里。想要建立你的Debian虚拟机,可以看看我的这篇教程——“[How to install Debian Linux in a VirtualBox VM][4]”。 - -![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-3-100591902-orig.png) - -### Top ### - -作为Linux系统监控工具中比较易用的一个,**top命令**能带我们一览Linux中的几乎每一处。以下这张图是它的默认界面,但是按“z”键可以切换不同的显示颜色。其它热键和命令则有其它的功能,例如显示概要信息和内存信息(第四行第二个),根据各种不一样的条件排序、终止进程任务等等(你可以在[这里][5]找到完整的列表)。 - -![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-4-100591904-orig.png) - -### htop ### - -相比top,它的替代品Htop则更为精致。维基百科是这样描述的:“用户经常会部署htop以防Unix top不能提供关于系统进程的足够信息,比如说当你在尝试发现应用程序里的一个小的内存泄露问题,Htop一般也能作为一个系统监听器来使用。相比top,它提供了一个更方便的光标控制界面来向进程发送信号。” (想了解更多细节猛戳[这里][6].) - -![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-5-100591903-orig.png) - -### Vmstat ### - -Vmstat是一款监控Linux系统性能数据的简易工具,这让它在shell脚本中使用更合适。打开你的regex-fu,用vmstat和cron作业来做一些激动人心的事情吧。“产出的第一份报告给出的是上一次系统重启之后的均值,另外其一份报告给出的则是从前一个报告起间隔周期中的信息。进程和内存报告在任何情况下都是不停更新的”(猛戳[这里][7]获取更多信息)。 - -![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-6-100591905-orig.png) - -### ps ### - -ps命令展现的是正在运行中的进程列表。在这种情况下,我们用“-e”选项来显示每个进程,也就是所有正在运行的进程了(我把列表滚动到了头部否则列名就看不到了)。这个命令有很多选项允许你去按需格式化输出。只要使用上述一点点的regex-fu你就能得到一个强大的工具了。猛戳[这里][8]获取更多信息。 - -![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-7-100591906-orig.png) - -### Pstree ### - -Pstree“以树状图显示正在运行中的进程。如果pid被省略的话那树结构是以pid或init为父进程,如果用户名指定,那所有进程树都会以该用户所属的进程为父进程进行显示。”以树状图来帮你将进程之间的所属关系进行分类,这的确是个很有效的工具(戳[这里][9])。 - -![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-8-100591907-orig.png) - -### pmap ### - -理解一个应用程序在调试过程中如何使用内存是至关重要的,而pmap的作用就是当给出一个进程ID(PID)时显示出相关信息。上面的截图展示的是使用“-x”选项所产生的部分输出,你也可以用pmap的“-X”选项来获取更多的细节信息但是前提是你要有个更宽的终端窗口。 - -![Image courtesy Mark Gibbs](http://images.techhive.com/images/article/2015/06/command-line-tools-monitoring-linux-system-9-100591900-orig.png) - -### iostat ### - -Linux系统的一个至关重要的性能指标是处理器和存储的使用率,它也是iostat命令所报告的内容。如同ps命令一样,iostat有很多选项允许你选择你需要的输出格式,除此之外还有某一段时间范围内的简单性能输出并在报告之前重复抽样多次。详情戳[这里][10]。 - --------------------------------------------------------------------------------- - -via: http://www.networkworld.com/article/2937219/linux/7-command-line-tools-for-monitoring-your-linux-system.html - -作者:[Mark Gibbs][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.networkworld.com/author/Mark-Gibbs/ -[1]:https://www.debian.org/releases/stable/ -[2]:https://www.virtualbox.org/ -[3]:http://www.apple.com/osx/ -[4]:http://www.networkworld.com/article/2937148/how-to-install-debian-linux-8-1-in-a-virtualbox-vm -[5]:http://linux.die.net/man/1/top -[6]:http://linux.die.net/man/1/htop -[7]:http://linuxcommand.org/man_pages/vmstat8.html -[8]:http://linux.die.net/man/1/ps -[9]:http://linux.die.net/man/1/pstree -[10]:http://linux.die.net/man/1/iostat From 6e389ee8d08ba743b98c15634d197ffe908ebf7c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 27 Jul 2015 16:45:43 +0800 Subject: [PATCH 1512/2517] =?UTF-8?q?20150727-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...estore and Migrate Containers in Docker.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md diff --git a/sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md b/sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md new file mode 100644 index 0000000000..fc21489ec9 --- /dev/null +++ b/sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md @@ -0,0 +1,90 @@ +Easy Backup, Restore and Migrate Containers in Docker +================================================================================ +Today we'll learn how we can easily backup, restore and migrate docker containers out of the box. [Docker][1] is an open source platform that automates the deployment of applications with fast and easy way to pack, ship and run it under a lightweight layer of software called container. It makes the applications platform independent as it acts an additional layer of abstraction and automation of operating system level virtualization on Linux. It utilizes resource isolation features of Linux Kernel with its components cgroups and namespace for avoiding the overhead of virtual machines. It makes the great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. Containers are those software layers which are created from a docker image that contains the respective linux filesystem and applications out of the box. If we have a docker container running in our box and need to backup those containers for future use or wanna migrate those containers, then this tutorial will help you how we can backup, restore and migrate docker containers in linux operating system. + +Here are some easy steps on how we can backup, restore and migrate the docker containers in linux. + +### 1. Backing up the Containers ### + +First of all, in order to backup the containers in docker, we'll wanna see the list of containers that we wanna backup. To do so, we'll need to run docker ps in our linux machine running docker engine with containers already created. + + # docker ps + +![Docker Containers List](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-containers-list.png) + +After that, we'll choose the containers we wanna backup and then we'll go for creating the snapshot of the container. We can use docker commit command in order to create the snapshot. + + # docker commit -p 30b8f18f20b4 container-backup + +![Docker Commit](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-commit.png) + +This will generated a snapshot of the container as the docker image. We can see the docker image by running the command docker images as shown below. + + # docker images + +![Docker Images](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-images.png) + +As we can see the snapshot that was taken above has been preserved as docker image. Now, inorder to backup that snapshot, we have two options, one is that we can login into the docker registry hub and push the image and the next is that we can backup the docker image as tarballs for further use. + +If we wanna upload or backup the image in the [docker registry hub][2], we can simply run docker login command to login into the docker registry hub and then push the required image. + + # docker login + +![Docker Login](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-login.png) + + # docker tag a25ddfec4d2a arunpyasi/container-backup:test + # docker push arunpyasi/container-backup + +![Docker Push](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-push.png) + +If we don't wanna backup to the docker registry hub and wanna save the image for future use in the machine locally then we can backup the image as tarballs. To do so, we'll need to run the following docker save command. + + # docker save -o ~/container-backup.tar container-backup + +![taking tarball backup](http://blog.linoxide.com/wp-content/uploads/2015/07/taking-tarball-backup.png) + +To verify if the tarball has been generated or not, we can simply run docker ls inside the directory where we saved the tarball. + +### 2. Restoring the Containers ### + +Next, after we have successfully backed up our docker containers, we'll now go for restoring those contianers which are snapshotted as docker images. If we have pushed those docker images in the registry hub, then we can simply pull that docker image and run it out of the box. + + # docker pull arunpyasi/container-backup:test + +![Docker Pull](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-pull.png) + +But if we have backed up those docker images locally as tarball file, then we can easy load that docker image using docker load command followed by the backed up tarball. + + # docker load -i ~/container-backup.tar + +Now, to ensure that those docker images have been loaded successfully, we'll run docker images command. + + # docker images + +After the images have been loaded, we'll gonna run the docker container from the loaded image. + + # docker run -d -p 80:80 container-backup + +![Restoring Docker Tarball](http://blog.linoxide.com/wp-content/uploads/2015/07/restoring-docker-tarballs.png) + +### 3. Migrating the Docker Containers ### + +Migrating the containers involve both the above process ie Backup and Restore. We can migrate any docker container from one machine to another. In the process of migration, first we take the backup of the container as snapshot docker image. Then, that docker image is either pushed to the docker registry hub or saved as tarball files in the locally. If we have pushed the image to the docker registry hub, we can easily restore and run the container using docker run command from any machine we want. But if we have saved the image as tarballs locally, we can simply copy or move the image to the machine where we want to load image and run the required container. + +### Conclusion ### + +Finally, we have learned how we can backup, restore and migrate the docker containers out of the box. This tutorial is exactly same for every platform of operating system where docker runs successfully. Really, docker is pretty simple and easy to use but very powerful tool. It has pretty easy to remember commands which are short enough with many simple but powerful flags and parameters. The above methods makes us comfortable to backup our containers so that we can restore them when needed in future. This can help us recover our containers and images even if our host system crashes or gets wiped out accidentally. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/backup-restore-migrate-containers-docker/ + +作者:[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/ +[1]:http://docker.com/ +[2]:https://registry.hub.docker.com/ \ No newline at end of file From 54c0e5492e53abfadb87df7bc727714942a47e55 Mon Sep 17 00:00:00 2001 From: zpl1025 Date: Mon, 27 Jul 2015 21:18:53 +0800 Subject: [PATCH 1513/2517] [translating] 20150709 Interviews--Linus Torvalds Answers Your Question.md --- ...0150709 Interviews--Linus Torvalds Answers Your Question.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md b/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md index e723658787..f1420fd0e4 100644 --- a/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md +++ b/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md @@ -1,3 +1,4 @@ +zpl1025 Interviews: Linus Torvalds Answers Your Question ================================================================================ Last Thursday you had a chance to [ask Linus Torvalds][1] about programming, hardware, and all things Linux. You can read his answers to those questions below. If you'd like to see what he had to say the last time we sat down with him, [you can do so here][2]. @@ -181,4 +182,4 @@ via: http://linux.slashdot.org/story/15/06/30/0058243/interviews-linus-torvalds- [a]:samzenpus@slashdot.org [1]:http://interviews.slashdot.org/story/15/06/24/1718247/interview-ask-linus-torvalds-a-question [2]:http://meta.slashdot.org/story/12/10/11/0030249/linus-torvalds-answers-your-questions -[3]:https://lwn.net/Articles/604695/ \ No newline at end of file +[3]:https://lwn.net/Articles/604695/ From 439bc9a7b9cc721341ec2eb5c23d8ec9fe3821c8 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 27 Jul 2015 23:57:15 +0800 Subject: [PATCH 1514/2517] PUB:20150713 How To Fix System Program Problem Detected In Ubuntu 14.04 @XLCYun --- ...rogram Problem Detected In Ubuntu 14.04.md | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) rename {translated/tech => published}/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md (74%) diff --git a/translated/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md b/published/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md similarity index 74% rename from translated/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md rename to published/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md index 3658528e77..92aa82ac03 100644 --- a/translated/tech/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md +++ b/published/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md @@ -1,10 +1,9 @@ - -如何修复ubuntu 14.04中检测到系统程序错误的问题 +如何修复 ubuntu 中检测到系统程序错误的问题 ================================================================================ + ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/system_program_Problem_detected.jpeg) - -在过去的几个星期,(几乎)每次都有消息 **Ubuntu 15.04在启动时检测到系统程序错误(system program problem detected on startup in Ubuntu 15.04)** 跑出来“欢迎”我。那时我是直接忽略掉它的,但是这种情况到了某个时刻,它就让人觉得非常烦人了! +在过去的几个星期,(几乎)每次都有消息 **Ubuntu 15.04在启动时检测到系统程序错误** 跑出来“欢迎”我。那时我是直接忽略掉它的,但是这种情况到了某个时刻,它就让人觉得非常烦人了! > 检测到系统程序错误(System program problem detected) > @@ -18,15 +17,16 @@ #### 那么这个通知到底是关于什么的? #### -大体上讲,它是在告知你,你的系统的一部分崩溃了。可别因为“崩溃”这个词而恐慌。这不是一个严重的问题,你的系统还是完完全全可用的。只是在以前的某个时刻某个程序崩溃了,而Ubuntu想让你决定要不要把这个问题报告给开发者,这样他们就能够修复这个问题。 +大体上讲,它是在告知你,你的系统的一部分崩溃了。可别因为“崩溃”这个词而恐慌。这不是一个严重的问题,你的系统还是完完全全可用的。只是在之前的某个时刻某个程序崩溃了,而Ubuntu想让你决定要不要把这个问题报告给开发者,这样他们就能够修复这个问题。 #### 那么,我们点了“报告错误”的按钮后,它以后就不再显示了?#### +不,不是的!即使你点了“报告错误”按钮,最后你还是会被一个如下的弹窗再次“欢迎”一下: -不,不是的!即使你点了“报告错误”按钮,最后你还是会被一个如下的弹窗再次“欢迎”: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Ubuntu_Internal_error.png) -[对不起,Ubuntu发生了一个内部错误(Sorry, Ubuntu has experienced an internal error)][1]是一个Apport(Apport是Ubuntu中错误信息的收集报告系统,详见Ubuntu Wiki中的Apport篇,译者注),它将会进一步的打开网页浏览器,然后你可以通过登录或创建[Launchpad][2]帐户来填写一份漏洞(Bug)报告文件。你看,这是一个复杂的过程,它要花整整四步来完成. +[对不起,Ubuntu发生了一个内部错误][1]是个Apport(LCTT 译注:Apport是Ubuntu中错误信息的收集报告系统,详见Ubuntu Wiki中的Apport篇),它将会进一步的打开网页浏览器,然后你可以通过登录或创建[Launchpad][2]帐户来填写一份漏洞(Bug)报告文件。你看,这是一个复杂的过程,它要花整整四步来完成。 + #### 但是我想帮助开发者,让他们知道这个漏洞啊 !#### 你这样想的确非常地周到体贴,而且这样做也是正确的。但是这样做的话,存在两个问题。第一,存在非常高的概率,这个漏洞已经被报告过了;第二,即使你报告了个这次崩溃,也无法保证你不会再看到它。 @@ -34,35 +34,38 @@ #### 那么,你的意思就是说别报告这次崩溃了?#### 对,也不对。如果你想的话,在你第一次看到它的时候报告它。你可以在上面图片显示的“显示细节(Show Details)”中,查看崩溃的程序。但是如果你总是看到它,或者你不想报告漏洞(Bug),那么我建议你还是一次性摆脱这个问题吧。 + ### 修复Ubuntu中“检测到系统程序错误”的错误 ### 这些错误报告被存放在Ubuntu中目录/var/crash中。如果你翻看这个目录的话,应该可以看到有一些以crash结尾的文件。 + ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Crash_reports_Ubuntu.jpeg) 我的建议是删除这些错误报告。打开一个终端,执行下面的命令: sudo rm /var/crash/* -这个操作会删除所有在/var/crash目录下的所有内容。这样你就不会再被这些报告以前程序错误的弹窗所扰。但是如果有一个程序又崩溃了,你就会再次看到“检测到系统程序错误”的错误。你可以再次删除这些报告文件,或者你可以禁用Apport来彻底地摆脱这个错误弹窗。 +这个操作会删除所有在/var/crash目录下的所有内容。这样你就不会再被这些报告以前程序错误的弹窗所扰。但是如果又有一个程序崩溃了,你就会再次看到“检测到系统程序错误”的错误。你可以再次删除这些报告文件,或者你可以禁用Apport来彻底地摆脱这个错误弹窗。 + #### 彻底地摆脱Ubuntu中的系统错误弹窗 #### 如果你这样做,系统中任何程序崩溃时,系统都不会再通知你。如果你想问问我的看法的话,我会说,这不是一件坏事,除非你愿意填写错误报告。如果你不想填写错误报告,那么这些错误通知存不存在都不会有什么区别。 要禁止Apport,并且彻底地摆脱Ubuntu系统中的程序崩溃报告,打开一个终端,输入以下命令: + gksu gedit /etc/default/apport 这个文件的内容是: - # set this to 0 to disable apport, or to 1 to enable it - # 设置0表示禁用Apportw,或者1开启它。译者注,下同。 - # you can temporarily override this with + # 设置0表示禁用Apportw,或者1开启它。 # 你可以用下面的命令暂时关闭它: # sudo service apport start force_start=1 enabled=1 -把**enabled=1**改为**enabled=0**.保存并关闭文件。完成之后你就再也不会看到弹窗报告错误了。很显然,如果我们想重新开启错误报告功能,只要再打开这个文件,把enabled设置为1就可以了。 +把**enabled=1**改为**enabled=0**。保存并关闭文件。完成之后你就再也不会看到弹窗报告错误了。很显然,如果我们想重新开启错误报告功能,只要再打开这个文件,把enabled设置为1就可以了。 #### 你的有效吗? #### + 我希望这篇教程能够帮助你修复Ubuntu 14.04和Ubuntu 15.04中检测到系统程序错误的问题。如果这个小窍门帮你摆脱了这个烦人的问题,请让我知道。 -------------------------------------------------------------------------------- @@ -71,7 +74,7 @@ via: http://itsfoss.com/how-to-fix-system-program-problem-detected-ubuntu/ 作者:[Abhishek][a] 译者:[XLCYun](https://github.com/XLCYun) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 3340d5e78d492c8950aee6ac30e9ec157654d46d Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Jul 2015 00:05:54 +0800 Subject: [PATCH 1515/2517] PUB:20150709 Install Google Hangouts Desktop Client In Linux @FSSlc --- ...all Google Hangouts Desktop Client In Linux.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150709 Install Google Hangouts Desktop Client In Linux.md (89%) diff --git a/translated/tech/20150709 Install Google Hangouts Desktop Client In Linux.md b/published/20150709 Install Google Hangouts Desktop Client In Linux.md similarity index 89% rename from translated/tech/20150709 Install Google Hangouts Desktop Client In Linux.md rename to published/20150709 Install Google Hangouts Desktop Client In Linux.md index e8257cbedf..4adca83c52 100644 --- a/translated/tech/20150709 Install Google Hangouts Desktop Client In Linux.md +++ b/published/20150709 Install Google Hangouts Desktop Client In Linux.md @@ -1,24 +1,25 @@ 在 Linux 中安装 Google 环聊桌面客户端 ================================================================================ + ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/google-hangouts-header-664x374.jpg) 先前,我们已经介绍了如何[在 Linux 中安装 Facebook Messenger][1] 和[WhatsApp 桌面客户端][2]。这些应用都是非官方的应用。今天,我将为你推荐另一款非官方的应用,它就是 [Google 环聊][3] -当然,你可以在 Web 浏览器中使用 Google 环聊,但相比于此,使用桌面客户端会更加有趣。好奇吗?那就跟着我看看如何 **在 Linux 中安装 Google 环聊** 以及如何使用它把。 +当然,你可以在 Web 浏览器中使用 Google 环聊,但相比于此,使用桌面客户端会更加有趣。好奇吗?那就跟着我看看如何 **在 Linux 中安装 Google 环聊** 以及如何使用它吧。 ### 在 Linux 中安装 Google 环聊 ### 我们将使用一个名为 [yakyak][4] 的开源项目,它是一个针对 Linux,Windows 和 OS X 平台的非官方 Google 环聊客户端。我将向你展示如何在 Ubuntu 中使用 yakyak,但我相信在其他的 Linux 发行版本中,你可以使用同样的方法来使用它。在了解如何使用它之前,让我们先看看 yakyak 的主要特点: - 发送和接受聊天信息 -- 创建和更改对话 (重命名, 添加人物) +- 创建和更改对话 (重命名, 添加参与者) - 离开或删除对话 - 桌面提醒通知 - 打开或关闭通知 -- 针对图片上传,支持拖放,复制粘贴或使用上传按钮 -- Hangupsbot 房间同步(实际的用户图片) (注: 这里翻译不到位,希望改善一下) +- 对于图片上传,支持拖放,复制粘贴或使用上传按钮 +- Hangupsbot 房间同步(使用用户实际的图片) - 展示行内图片 -- 历史回放 +- 翻阅历史 听起来不错吧,你可以从下面的链接下载到该软件的安装文件: @@ -36,7 +37,7 @@ ![Google_Hangout_Linux_4](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_4.jpeg) -假如你想看看对话的配置图,你可以选择 `查看-> 展示对话缩略图` +假如你想在联系人里面显示用户头像,你可以选择 `查看-> 展示对话缩略图` ![Google 环聊缩略图](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Google_Hangout_Linux_5.jpeg) @@ -54,7 +55,7 @@ via: http://itsfoss.com/install-google-hangouts-linux/ 作者:[Abhishek][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 2f8bb078e09a6ad0807e328d24d71fd780e00a10 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Jul 2015 00:22:44 +0800 Subject: [PATCH 1516/2517] PUB:20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1 @GOLinux --- ...PHP Codes in Linux Command Line--Part 1.md | 57 +++++++++++-------- 1 file changed, 33 insertions(+), 24 deletions(-) rename {translated/tech => published}/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md (77%) diff --git a/translated/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md b/published/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md similarity index 77% rename from translated/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md rename to published/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md index 1d69a7c746..79fa6b6b12 100644 --- a/translated/tech/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md +++ b/published/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md @@ -1,10 +1,12 @@ -Linux命令行中使用和执行PHP代码——第一部分 +在 Linux 命令行中使用和执行 PHP 代码(一) ================================================================================ -PHP是一个开元服务器端脚本语言,最初这三个字母代表的是“Personal Home Page”,而现在则代表的是“PHP:Hypertext Preprocessor”,它是个递归首字母缩写。它是一个跨平台脚本语言,深受C、C++和Java的影响。 -![Run PHP Codes in Linux Command Line](http://www.tecmint.com/wp-content/uploads/2015/07/php-command-line-usage.jpeg) -Linux命令行中运行PHP代码——第一部分 +PHP是一个开源服务器端脚本语言,最初这三个字母代表的是“Personal Home Page”,而现在则代表的是“PHP:Hypertext Preprocessor”,它是个递归首字母缩写。它是一个跨平台脚本语言,深受C、C++和Java的影响。 -PHP的语法和C、Java以及带有一些PHP特性的Perl变成语言中的语法十分相似,它眼下大约正被2.6亿个网站所使用,当前最新的稳定版本是PHP版本5.6.10。 +![Run PHP Codes in Linux Command Line](http://www.tecmint.com/wp-content/uploads/2015/07/php-command-line-usage.jpeg) + +*在 Linux 命令行中运行 PHP 代码* + +PHP的语法和C、Java以及带有一些PHP特性的Perl变成语言中的语法十分相似,它当下大约正被2.6亿个网站所使用,当前最新的稳定版本是PHP版本5.6.10。 PHP是HTML的嵌入脚本,它便于开发人员快速写出动态生成的页面。PHP主要用于服务器端(而Javascript则用于客户端)以通过HTTP生成动态网页,然而,当你知道可以在Linux终端中不需要网页浏览器来执行PHP时,你或许会大为惊讶。 @@ -12,40 +14,44 @@ PHP是HTML的嵌入脚本,它便于开发人员快速写出动态生成的页 **1. 在安装完PHP和Apache2后,我们需要安装PHP命令行解释器。** - # apt-get install php5-cli [Debian and alike System) - # yum install php-cli [CentOS and alike System) + # apt-get install php5-cli [Debian 及类似系统] + # yum install php-cli [CentOS 及类似系统] -接下来我们通常要做的是,在‘/var/www/html‘(这是 Apache2 在大多数发行版中的工作目录)这个位置创建一个内容为 ‘‘,名为 ‘infophp.php‘ 的文件来测试(是否安装正确),执行以下命令即可。 +接下来我们通常要做的是,在`/var/www/html`(这是 Apache2 在大多数发行版中的工作目录)这个位置创建一个内容为 ``,名为 `infophp.php` 的文件来测试(PHP是否安装正确),执行以下命令即可。 # echo '' > /var/www/html/infophp.php -然后,将浏览器指向http://127.0.0.1/infophp.php, 这将会在网络浏览器中打开该文件。 +然后,将浏览器访问 http://127.0.0.1/infophp.php ,这将会在网络浏览器中打开该文件。 ![Check PHP Info](http://www.tecmint.com/wp-content/uploads/2015/07/Check-PHP-Info.png) -检查PHP信息 -不需要任何浏览器,在Linux终端中也可以获得相同的结果。在Linux命令行中执行‘/var/www/html/infophp.php‘,如: +*检查PHP信息* + +不需要任何浏览器,在Linux终端中也可以获得相同的结果。在Linux命令行中执行`/var/www/html/infophp.php`,如: # php -f /var/www/html/infophp.php ![Check PHP info from Commandline](http://www.tecmint.com/wp-content/uploads/2015/07/Check-PHP-info-from-Commandline.png) -从命令行检查PHP信息 -由于输出结果太大,我们可以通过管道将上述输出结果输送给 ‘less‘ 命令,这样就可以一次输出一屏了,命令如下: +*从命令行检查PHP信息* + +由于输出结果太大,我们可以通过管道将上述输出结果输送给 `less` 命令,这样就可以一次输出一屏了,命令如下: # php -f /var/www/html/infophp.php | less ![Check All PHP Info](http://www.tecmint.com/wp-content/uploads/2015/07/Check-All-PHP-Info.png) -检查所有PHP信息 -这里,‘-f‘选项解析病执行命令后跟随的文件。 +*检查所有PHP信息* + +这里,‘-f‘选项解析并执行命令后跟随的文件。 **2. 我们可以直接在Linux命令行使用`phpinfo()`这个十分有价值的调试工具而不需要从文件来调用,只需执行以下命令:** # php -r 'phpinfo();' ![PHP Debugging Tool](http://www.tecmint.com/wp-content/uploads/2015/07/PHP-Debugging-Tool.png) -PHP调试工具 + +*PHP调试工具* 这里,‘-r‘ 选项会让PHP代码在Linux终端中不带`<`和`>`标记直接执行。 @@ -74,13 +80,14 @@ PHP调试工具 输入 ‘exit‘ 或者按下 ‘ctrl+c‘ 来关闭PHP交互模式。 ![Enable PHP Interactive Mode](http://www.tecmint.com/wp-content/uploads/2015/07/Enable-PHP-interactive-mode1.png) -启用PHP交互模式 + +*启用PHP交互模式* **4. 你可以仅仅将PHP脚本作为shell脚本来运行。首先,创建在你当前工作目录中创建一个PHP样例脚本。** # echo -e '#!/usr/bin/php\n' > phpscript.php -注意,我们在该PHP脚本的第一行使用#!/usr/bin/php,就像在shell脚本中那样(/bin/bash)。第一行的#!/usr/bin/php告诉Linux命令行将该脚本文件解析到PHP解释器中。 +注意,我们在该PHP脚本的第一行使用`#!/usr/bin/php`,就像在shell脚本中那样(`/bin/bash`)。第一行的`#!/usr/bin/php`告诉Linux命令行用 PHP 解释器来解析该脚本文件。 其次,让该脚本可执行: @@ -96,7 +103,7 @@ PHP调试工具 # php -a -创建一个函授,将它命名为 addition。同时,声明两个变量 $a 和 $b。 +创建一个函数,将它命名为 `addition`。同时,声明两个变量 `$a` 和 `$b`。 php > function addition ($a, $b) @@ -133,7 +140,8 @@ PHP调试工具 12.3NULL ![Create PHP Functions](http://www.tecmint.com/wp-content/uploads/2015/07/Create-PHP-Functions.png) -创建PHP函数 + +*创建PHP函数* 你可以一直运行该函数,直至退出交互模式(ctrl+z)。同时,你也应该注意到了,上面输出结果中返回的数据类型为 NULL。这个问题可以通过要求 php 交互 shell用 return 代替 echo 返回结果来修复。 @@ -152,11 +160,12 @@ PHP调试工具 这里是一个样例,在该样例的输出结果中返回了正确的数据类型。 ![PHP Functions](http://www.tecmint.com/wp-content/uploads/2015/07/PHP-Functions.png) -PHP函数 + +*PHP函数* 永远都记住,用户定义的函数不会从一个shell会话保留到下一个shell会话,因此,一旦你退出交互shell,它就会丢失了。 -希望你喜欢此次会话。保持连线,你会获得更多此类文章。保持关注,保持健康。请在下面的评论中为我们提供有价值的反馈。点赞并分享,帮助我们扩散。 +希望你喜欢此次教程。保持连线,你会获得更多此类文章。保持关注,保持健康。请在下面的评论中为我们提供有价值的反馈。点赞并分享,帮助我们扩散。 还请阅读: [12个Linux终端中有用的的PHP命令行用法——第二部分][1] @@ -164,9 +173,9 @@ PHP函数 via: http://www.tecmint.com/run-php-codes-from-linux-commandline/ -作者:[vishek Kumar][a] +作者:[Avishek Kumar][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 9bd072c35fe1925c440fd8215c0d74d3126d4418 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 28 Jul 2015 09:43:05 +0800 Subject: [PATCH 1517/2517] =?UTF-8?q?20150728-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...28 Process of the Linux kernel building.md | 674 ++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 sources/tech/20150728 Process of the Linux kernel building.md diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md new file mode 100644 index 0000000000..cb7ec19b45 --- /dev/null +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -0,0 +1,674 @@ +Process of the Linux kernel building +================================================================================ +Introduction +-------------------------------------------------------------------------------- + +I will not tell you how to build and install custom Linux kernel on your machine, you can find many many [resources](https://encrypted.google.com/search?q=building+linux+kernel#q=building+linux+kernel+from+source+code) that will help you to do it. Instead, we will know what does occur when you are typed `make` in the directory with Linux kernel source code in this part. When I just started to learn source code of the Linux kernel, the [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) file was a first file that I've opened. And it was scary :) This [makefile](https://en.wikipedia.org/wiki/Make_%28software%29) contains `1591` lines of code at the time when I wrote this part and it was [third](https://github.com/torvalds/linux/commit/52721d9d3334c1cb1f76219a161084094ec634dc) release candidate. + +This makefile is the the top makefile in the Linux kernel source code and kernel build starts here. Yes, it is big, but moreover, if you've read the source code of the Linux kernel you can noted that all directories with a source code has an own makefile. Of course it is not real to describe how each source files compiled and linked. So, we will see compilation only for the standard case. You will not find here building of the kernel's documentation, cleaning of the kernel source code, [tags](https://en.wikipedia.org/wiki/Ctags) generation, [cross-compilation](https://en.wikipedia.org/wiki/Cross_compiler) related stuff and etc. We will start from the `make` execution with the standard kernel configuration file and will finish with the building of the [bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage). + +It would be good if you're already familiar with the [make](https://en.wikipedia.org/wiki/Make_%28software%29) util, but I will anyway try to describe all code that will be in this part. + +So let's start. + +Preparation before the kernel compilation +--------------------------------------------------------------------------------- + +There are many things to preparate before the kernel compilation will be started. The main point here is to find and configure +the type of compilation, to parse command line arguments that are passed to the `make` util and etc. So let's dive into the top `Makefile` of the Linux kernel. + +The Linux kernel top `Makefile` is responsible for building two major products: [vmlinux](https://en.wikipedia.org/wiki/Vmlinux) (the resident kernel image) and the modules (any module files). The [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) of the Linux kernel starts from the definition of the following variables: + +```Makefile +VERSION = 4 +PATCHLEVEL = 2 +SUBLEVEL = 0 +EXTRAVERSION = -rc3 +NAME = Hurr durr I'ma sheep +``` + +These variables determine the current version of the Linux kernel and are used in the different places, for example in the forming of the `KERNELVERSION` variable: + +```Makefile +KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) +``` + +After this we can see a couple of the `ifeq` condition that check some of the parameters passed to `make`. The Linux kernel `makefiles` provides a special `make help` target that prints all available targets and some of the command line arguments that can be passed to `make`. For example: `make V=1` - provides verbose builds. The first `ifeq` condition checks if the `V=n` option is passed to make: + +```Makefile +ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE = $(V) +endif +ifndef KBUILD_VERBOSE + KBUILD_VERBOSE = 0 +endif + +ifeq ($(KBUILD_VERBOSE),1) + quiet = + Q = +else + quiet=quiet_ + Q = @ +endif + +export quiet Q KBUILD_VERBOSE +``` + +If this option is passed to `make` we set the `KBUILD_VERBOSE` variable to the value of the `V` option. Otherwise we set the `KBUILD_VERBOSE` variable to zero. After this we check value of the `KBUILD_VERBOSE` variable and set values of the `quiet` and `Q` variables depends on the `KBUILD_VERBOSE` value. The `@` symbols suppress the output of the command and if it will be set before a command we will see something like this: `CC scripts/mod/empty.o` instead of the `Compiling .... scripts/mod/empty.o`. In the end we just export all of these variables. The next `ifeq` statement checks that `O=/dir` option was passed to the `make`. This option allows to locate all output files in the given `dir`: + +```Makefile +ifeq ($(KBUILD_SRC),) + +ifeq ("$(origin O)", "command line") + KBUILD_OUTPUT := $(O) +endif + +ifneq ($(KBUILD_OUTPUT),) +saved-output := $(KBUILD_OUTPUT) +KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ + && /bin/pwd) +$(if $(KBUILD_OUTPUT),, \ + $(error failed to create output directory "$(saved-output)")) + +sub-make: FORCE + $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \ + -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS)) + +skip-makefile := 1 +endif # ifneq ($(KBUILD_OUTPUT),) +endif # ifeq ($(KBUILD_SRC),) +``` + +We check the `KBUILD_SRC` that represent top directory of the source code of the linux kernel and if it is empty (it is empty every time while makefile executes first time) and the set the `KBUILD_OUTPUT` variable to the value that passed with the `O` option (if this option was passed). In the next step we check this `KBUILD_OUTPUT` variable and if we set it, we do following things: + +* Store value of the `KBUILD_OUTPUT` in the temp `saved-output` variable; +* Try to create given output directory; +* Check that directory created, in other way print error; +* If custom output directory created sucessfully, execute `make` again with the new directory (see `-C` option). + +The next `ifeq` statements checks that `C` or `M` options was passed to the make: + +```Makefile +ifeq ("$(origin C)", "command line") + KBUILD_CHECKSRC = $(C) +endif +ifndef KBUILD_CHECKSRC + KBUILD_CHECKSRC = 0 +endif + +ifeq ("$(origin M)", "command line") + KBUILD_EXTMOD := $(M) +endif +``` + +The first `C` option tells to the `makefile` that need to check all `c` source code with a tool provided by the `$CHECK` environment variable, by default it is [sparse](https://en.wikipedia.org/wiki/Sparse). The second `M` option provides build for the external modules (will not see this case in this part). As we set this variables we make a check of the `KBUILD_SRC` variable and if it is not set we set `srctree` variable to `.`: + +```Makefile +ifeq ($(KBUILD_SRC),) + srctree := . +endif + +objtree := . +src := $(srctree) +obj := $(objtree) + +export srctree objtree VPATH +``` + +That tells to `Makefile` that source tree of the Linux kernel will be in the current directory where `make` command was executed. After this we set `objtree` and other variables to this directory and export these variables. The next step is the getting value for the `SUBARCH` variable that will represent tewhat the underlying archicecture is: + +```Makefile +SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ + -e s/sun4u/sparc64/ \ + -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/s390x/s390/ -e s/parisc64/parisc/ \ + -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ + -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ ) +``` + +As you can see it executes [uname](https://en.wikipedia.org/wiki/Uname) utils that prints information about machine, operating system and architecture. As it will get output of the `uname` util, it will parse it and assign to the `SUBARCH` variable. As we got `SUBARCH`, we set the `SRCARCH` variable that provides directory of the certain architecture and `hfr-arch` that provides directory for the header files: + +```Makefile +ifeq ($(ARCH),i386) + SRCARCH := x86 +endif +ifeq ($(ARCH),x86_64) + SRCARCH := x86 +endif + +hdr-arch := $(SRCARCH) +``` + +Note that `ARCH` is the alias for the `SUBARCH`. In the next step we set the `KCONFIG_CONFIG` variable that represents path to the kernel configuration file and if it was not set before, it will be `.config` by default: + +```Makefile +KCONFIG_CONFIG ?= .config +export KCONFIG_CONFIG +``` + +and the [shell](https://en.wikipedia.org/wiki/Shell_%28computing%29) that will be used during kernel compilation: + +```Makefile +CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ + else if [ -x /bin/bash ]; then echo /bin/bash; \ + else echo sh; fi ; fi) +``` + +The next set of variables related to the compiler that will be used during Linux kernel compilation. We set the host compilers for the `c` and `c++` and flags for it: + +```Makefile +HOSTCC = gcc +HOSTCXX = g++ +HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 +HOSTCXXFLAGS = -O2 +``` + +Next we will meet the `CC` variable that represent compiler too, so why do we need in the `HOST*` variables? The `CC` is the target compiler that will be used during kernel compilation, but `HOSTCC` will be used during compilation of the set of the `host` programs (we will see it soon). After this we can see definition of the `KBUILD_MODULES` and `KBUILD_BUILTIN` variables that are used for the determination of the what to compile (kernel, modules or both): + +```Makefile +KBUILD_MODULES := +KBUILD_BUILTIN := 1 + +ifeq ($(MAKECMDGOALS),modules) + KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) +endif +``` + +Here we can see definition of these variables and the value of the `KBUILD_BUILTIN` will depens on the `CONFIG_MODVERSIONS` kernel configuration parameter if we pass only `modules` to the `make`. The next step is including of the: + +```Makefile +include scripts/Kbuild.include +``` + +`kbuild` file. The [Kbuild](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kbuild.txt) or `Kernel Build System` is the special infrastructure to manage building of the kernel and its modules. The `kbuild` files has the same syntax that makefiles. The [scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include) file provides some generic definitions for the `kbuild` system. As we included this `kbuild` files we can see definition of the variables that are related to the different tools that will be used during kernel and modules compilation (like linker, compilers, utils from the [binutils](http://www.gnu.org/software/binutils/) and etc...): + +```Makefile +AS = $(CROSS_COMPILE)as +LD = $(CROSS_COMPILE)ld +CC = $(CROSS_COMPILE)gcc +CPP = $(CC) -E +AR = $(CROSS_COMPILE)ar +NM = $(CROSS_COMPILE)nm +STRIP = $(CROSS_COMPILE)strip +OBJCOPY = $(CROSS_COMPILE)objcopy +OBJDUMP = $(CROSS_COMPILE)objdump +AWK = awk +... +... +... +``` + +After definition of these variables we define two variables: `USERINCLUDE` and `LINUXINCLUDE`. They will contain paths of the directories with headers (public for users in the first case and for kernel in the second case): + +```Makefile +USERINCLUDE := \ + -I$(srctree)/arch/$(hdr-arch)/include/uapi \ + -Iarch/$(hdr-arch)/include/generated/uapi \ + -I$(srctree)/include/uapi \ + -Iinclude/generated/uapi \ + -include $(srctree)/include/linux/kconfig.h + +LINUXINCLUDE := \ + -I$(srctree)/arch/$(hdr-arch)/include \ + ... +``` + +And the standard flags for the C compiler: + +```Makefile +KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ + -fno-strict-aliasing -fno-common \ + -Werror-implicit-function-declaration \ + -Wno-format-security \ + -std=gnu89 +``` + +It is the not last compiler flags, they can be updated by the other makefiles (for example kbuilds from `arch/`). After all of these, all variables will be exported to be available in the other makefiles. The following two the `RCS_FIND_IGNORE` and the `RCS_TAR_IGNORE` variables will contain files that will be ignored in the version control system: + +```Makefile +export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \ + -name CVS -o -name .pc -o -name .hg -o -name .git \) \ + -prune -o +export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ + --exclude CVS --exclude .pc --exclude .hg --exclude .git +``` + +That's all. We have finished with the all preparations, next point is the building of `vmlinux`. + +Directly to the kernel build +-------------------------------------------------------------------------------- + +As we have finished all preparations, next step in the root makefile is related to the kernel build. Before this moment we will not see in the our terminal after the execution of the `make` command. But now first steps of the compilation are started. In this moment we need to go on the [598](https://github.com/torvalds/linux/blob/master/Makefile#L598) line of the Linux kernel top makefile and we will see `vmlinux` target there: + +```Makefile +all: vmlinux + include arch/$(SRCARCH)/Makefile +``` + +Don't worry that we have missed many lines in Makefile that are placed after `export RCS_FIND_IGNORE.....` and before `all: vmlinux.....`. This part of the makefile is responsible for the `make *.config` targets and as I wrote in the beginning of this part we will see only building of the kernel in a general way. + +The `all:` target is the default when no target is given on the command line. You can see here that we include architecture specific makefile there (in our case it will be [arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)). From this moment we will continue from this makefile. As we can see `all` target depends on the `vmlinux` target that defined a little lower in the top makefile: + +```Makefile +vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE +``` + +The `vmlinux` is is the Linux kernel in an statically linked executable file format. The [scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) script links combines different compiled subsystems into vmlinux. The second target is the `vmlinux-deps` that defined as: + +```Makefile +vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) +``` + +and consists from the set of the `built-in.o` from the each top directory of the Linux kernel. Later, when we will go through all directories in the Linux kernel, the `Kbuild` will compile all the `$(obj-y)` files. It then calls `$(LD) -r` to merge these files into one `built-in.o` file. For this moment we have no `vmlinux-deps`, so the `vmlinux` target will not be executed now. For me `vmlinux-deps` contains following files: + +``` +arch/x86/kernel/vmlinux.lds arch/x86/kernel/head_64.o +arch/x86/kernel/head64.o arch/x86/kernel/head.o +init/built-in.o usr/built-in.o +arch/x86/built-in.o kernel/built-in.o +mm/built-in.o fs/built-in.o +ipc/built-in.o security/built-in.o +crypto/built-in.o block/built-in.o +lib/lib.a arch/x86/lib/lib.a +lib/built-in.o arch/x86/lib/built-in.o +drivers/built-in.o sound/built-in.o +firmware/built-in.o arch/x86/pci/built-in.o +arch/x86/power/built-in.o arch/x86/video/built-in.o +net/built-in.o +``` + +The next target that can be executed is following: + +```Makefile +$(sort $(vmlinux-deps)): $(vmlinux-dirs) ; +$(vmlinux-dirs): prepare scripts + $(Q)$(MAKE) $(build)=$@ +``` + +As we can see the `vmlinux-dirs` depends on the two targets: `prepare` and `scripts`. The first `prepare` defined in the top `Makefile` of the Linux kernel and executes three stages of preparations: + +```Makefile +prepare: prepare0 +prepare0: archprepare FORCE + $(Q)$(MAKE) $(build)=. +archprepare: archheaders archscripts prepare1 scripts_basic + +prepare1: prepare2 $(version_h) include/generated/utsrelease.h \ + include/config/auto.conf + $(cmd_crmodverdir) +prepare2: prepare3 outputmakefile asm-generic +``` + +The first `prepare0` expands to the `archprepare` that exapnds to the `archheaders` and `archscripts` that defined in the `x86_64` specific [Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile). Let's look on it. The `x86_64` specific makefile starts from the definition of the variables that are related to the archicteture-specific configs ([defconfig](https://github.com/torvalds/linux/tree/master/arch/x86/configs) and etc.). After this it defines flags for the compiling of the [16-bit](https://en.wikipedia.org/wiki/Real_mode) code, calculating of the `BITS` variable that can be `32` for `i386` or `64` for the `x86_64` flags for the assembly source code, flags for the linker and many many more (all definitions you can find in the [arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)). The first target is `archheaders` in the makefile generates syscall table: + +```Makefile +archheaders: + $(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all +``` + +And the second target is `archscripts` in this makefile is: + +```Makefile +archscripts: scripts_basic + $(Q)$(MAKE) $(build)=arch/x86/tools relocs +``` + +We can see that it depends on the `scripts_basic` target from the top [Makefile](https://github.com/torvalds/linux/blob/master/Makefile). At the first we can see the `scripts_basic` target that executes make for the [scripts/basic](https://github.com/torvalds/linux/blob/master/scripts/basic/Makefile) makefile: + +```Maklefile +scripts_basic: + $(Q)$(MAKE) $(build)=scripts/basic +``` + +The `scripts/basic/Makefile` contains targets for compilation of the two host programs: `fixdep` and `bin2`: + +```Makefile +hostprogs-y := fixdep +hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c +always := $(hostprogs-y) + +$(addprefix $(obj)/,$(filter-out fixdep,$(always))): $(obj)/fixdep +``` + +First program is `fixdep` - optimizes list of dependencies generated by the [gcc](https://gcc.gnu.org/) that tells make when to remake a source code file. The second program is `bin2c` depends on the value of the `CONFIG_BUILD_BIN2C` kernel configuration option and very little C program that allows to convert a binary on stdin to a C include on stdout. You can note here strange notation: `hostprogs-y` and etc. This notation is used in the all `kbuild` files and more about it you can read in the [documentation](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/makefiles.txt). In our case the `hostprogs-y` tells to the `kbuild` that there is one host program named `fixdep` that will be built from the will be built from `fixdep.c` that located in the same directory that `Makefile`. The first output after we will execute `make` command in our terminal will be result of this `kbuild` file: + +``` +$ make + HOSTCC scripts/basic/fixdep +``` + +As `script_basic` target was executed, the `archscripts` target will execute `make` for the [arch/x86/tools](https://github.com/torvalds/linux/blob/master/arch/x86/tools/Makefile) makefile with the `relocs` target: + +```Makefile +$(Q)$(MAKE) $(build)=arch/x86/tools relocs +``` + +The `relocs_32.c` and the `relocs_64.c` will be compiled that will contain [relocation](https://en.wikipedia.org/wiki/Relocation_%28computing%29) information and we will see it in the `make` output: + +```Makefile + HOSTCC arch/x86/tools/relocs_32.o + HOSTCC arch/x86/tools/relocs_64.o + HOSTCC arch/x86/tools/relocs_common.o + HOSTLD arch/x86/tools/relocs +``` + +There is checking of the `version.h` after compiling of the `relocs.c`: + +```Makefile +$(version_h): $(srctree)/Makefile FORCE + $(call filechk,version.h) + $(Q)rm -f $(old_version_h) +``` + +We can see it in the output: + +``` +CHK include/config/kernel.release +``` + +and the building of the `generic` assembly headers with the `asm-generic` target from the `arch/x86/include/generated/asm` that generated in the top Makefile of the Linux kernel. After the `asm-generic` target the `archprepare` will be done, so the `prepare0` target will be executed. As I wrote above: + +```Makefile +prepare0: archprepare FORCE + $(Q)$(MAKE) $(build)=. +``` + +Note on the `build`. It defined in the [scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include) and looks like this: + +```Makefile +build := -f $(srctree)/scripts/Makefile.build obj +``` + +or in our case it is current source directory - `.`: + +```Makefile +$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.build obj=. +``` + +The [scripts/Makefile.build](https://github.com/torvalds/linux/blob/master/scripts/Makefile.build) tries to find the `Kbuild` file by the given directory via the `obj` parameter, include this `Kbuild` files: + +```Makefile +include $(kbuild-file) +``` + +and build targets from it. In our case `.` contains the [Kbuild](https://github.com/torvalds/linux/blob/master/Kbuild) file that generates the `kernel/bounds.s` and the `arch/x86/kernel/asm-offsets.s`. After this the `prepare` target finished to work. The `vmlinux-dirs` also depends on the second target - `scripts` that compiles following programs: `file2alias`, `mk_elfconfig`, `modpost` and etc... After scripts/host-programs compilation our `vmlinux-dirs` target can be executed. First of all let's try to understand what does `vmlinux-dirs` contain. For my case it contains paths of the following kernel directories: + +``` +init usr arch/x86 kernel mm fs ipc security crypto block +drivers sound firmware arch/x86/pci arch/x86/power +arch/x86/video net lib arch/x86/lib +``` + +We can find definition of the `vmlinux-dirs` in the top [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) of the Linux kernel: + +```Makefile +vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ + $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ + $(net-y) $(net-m) $(libs-y) $(libs-m))) + +init-y := init/ +drivers-y := drivers/ sound/ firmware/ +net-y := net/ +libs-y := lib/ +... +... +... +``` + +Here we remove the `/` symbol from the each directory with the help of the `patsubst` and `filter` functions and put it to the `vmlinux-dirs`. So we have list of directories in the `vmlinux-dirs` and the following code: + +```Makefile +$(vmlinux-dirs): prepare scripts + $(Q)$(MAKE) $(build)=$@ +``` + +The `$@` represents `vmlinux-dirs` here that means that it will go recursively over all directories from the `vmlinux-dirs` and its internal directories (depens on configuration) and will execute `make` in there. We can see it in the output: + +``` + CC init/main.o + CHK include/generated/compile.h + CC init/version.o + CC init/do_mounts.o + ... + CC arch/x86/crypto/glue_helper.o + AS arch/x86/crypto/aes-x86_64-asm_64.o + CC arch/x86/crypto/aes_glue.o + ... + AS arch/x86/entry/entry_64.o + AS arch/x86/entry/thunk_64.o + CC arch/x86/entry/syscall_64.o +``` + +Source code in each directory will be compiled and linked to the `built-in.o`: + +``` +$ find . -name built-in.o +./arch/x86/crypto/built-in.o +./arch/x86/crypto/sha-mb/built-in.o +./arch/x86/net/built-in.o +./init/built-in.o +./usr/built-in.o +... +... +``` + +Ok, all buint-in.o(s) built, now we can back to the `vmlinux` target. As you remember, the `vmlinux` target is in the top Makefile of the Linux kernel. Before the linking of the `vmlinux` it builds [samples](https://github.com/torvalds/linux/tree/master/samples), [Documentation](https://github.com/torvalds/linux/tree/master/Documentation) and etc., but I will not describe it in this part as I wrote in the beginning of this part. + +```Makefile +vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE + ... + ... + +$(call if_changed,link-vmlinux) +``` + +As you can see main purpose of it is a call of the [scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) script is linking of the all `built-in.o`(s) to the one statically linked executable and creation of the [System.map](https://en.wikipedia.org/wiki/System.map). In the end we will see following output: + +``` + LINK vmlinux + LD vmlinux.o + MODPOST vmlinux.o + GEN .version + CHK include/generated/compile.h + UPD include/generated/compile.h + CC init/version.o + LD init/built-in.o + KSYM .tmp_kallsyms1.o + KSYM .tmp_kallsyms2.o + LD vmlinux + SORTEX vmlinux + SYSMAP System.map +``` + +and `vmlinux` and `System.map` in the root of the Linux kernel source tree: + +``` +$ ls vmlinux System.map +System.map vmlinux +``` + +That's all, `vmlinux` is ready. The next step is creation of the [bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage). + +Building bzImage +-------------------------------------------------------------------------------- + +The `bzImage` is the compressed Linux kernel image. We can get it with the execution of the `make bzImage` after the `vmlinux` built. In other way we can just execute `make` without arguments and will get `bzImage` anyway because it is default image: + +```Makefile +all: bzImage +``` + +in the [arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile). Let's look on this target, it will help us to understand how this image builds. As I already said the `bzImage` target defined in the [arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile) and looks like this: + +```Makefile +bzImage: vmlinux + $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) + $(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot + $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@ +``` + +We can see here, that first of all called `make` for the boot directory, in our case it is: + +```Makefile +boot := arch/x86/boot +``` + +The main goal now to build source code in the `arch/x86/boot` and `arch/x86/boot/compressed` directories, build `setup.bin` and `vmlinux.bin`, and build the `bzImage` from they in the end. First target in the [arch/x86/boot/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/Makefile) is the `$(obj)/setup.elf`: + +```Makefile +$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE + $(call if_changed,ld) +``` + +We already have the `setup.ld` linker script in the `arch/x86/boot` directory and the `SETUP_OBJS` expands to the all source files from the `boot` directory. We can see first output: + +```Makefile + AS arch/x86/boot/bioscall.o + CC arch/x86/boot/cmdline.o + AS arch/x86/boot/copy.o + HOSTCC arch/x86/boot/mkcpustr + CPUSTR arch/x86/boot/cpustr.h + CC arch/x86/boot/cpu.o + CC arch/x86/boot/cpuflags.o + CC arch/x86/boot/cpucheck.o + CC arch/x86/boot/early_serial_console.o + CC arch/x86/boot/edd.o +``` + +The next source code file is the [arch/x86/boot/header.S](https://github.com/torvalds/linux/blob/master/arch/x86/boot/header.S), but we can't build it now because this target depends on the following two header files: + +```Makefile +$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h +``` + +The first is `voffset.h` generated by the `sed` script that gets two addresses from the `vmlinux` with the `nm` util: + +```C +#define VO__end 0xffffffff82ab0000 +#define VO__text 0xffffffff81000000 +``` + +They are start and end of the kernel. The second is `zoffset.h` depens on the `vmlinux` target from the [arch/x86/boot/compressed/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/compressed/Makefile): + +```Makefile +$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE + $(call if_changed,zoffset) +``` + +The `$(obj)/compressed/vmlinux` target depends on the `vmlinux-objs-y` that compiles source code files from the [arch/x86/boot/compressed](https://github.com/torvalds/linux/tree/master/arch/x86/boot/compressed) directory and generates `vmlinux.bin`, `vmlinux.bin.bz2`, and compiles programm - `mkpiggy`. We can see this in the output: + +```Makefile + LDS arch/x86/boot/compressed/vmlinux.lds + AS arch/x86/boot/compressed/head_64.o + CC arch/x86/boot/compressed/misc.o + CC arch/x86/boot/compressed/string.o + CC arch/x86/boot/compressed/cmdline.o + OBJCOPY arch/x86/boot/compressed/vmlinux.bin + BZIP2 arch/x86/boot/compressed/vmlinux.bin.bz2 + HOSTCC arch/x86/boot/compressed/mkpiggy +``` + +Where the `vmlinux.bin` is the `vmlinux` with striped debuging information and comments and the `vmlinux.bin.bz2` compressed `vmlinux.bin.all` + `u32` size of `vmlinux.bin.all`. The `vmlinux.bin.all` is `vmlinux.bin + vmlinux.relocs`, where `vmlinux.relocs` is the `vmlinux` that was handled by the `relocs` program (see above). As we got these files, the `piggy.S` assembly files will be generated with the `mkpiggy` program and compiled: + +```Makefile + MKPIGGY arch/x86/boot/compressed/piggy.S + AS arch/x86/boot/compressed/piggy.o +``` + +This assembly files will contain computed offset from a compressed kernel. After this we can see that `zoffset` generated: + +```Makefile + ZOFFSET arch/x86/boot/zoffset.h +``` + +As the `zoffset.h` and the `voffset.h` are generated, compilation of the source code files from the [arch/x86/boot](https://github.com/torvalds/linux/tree/master/arch/x86/boot/) can be continued: + +```Makefile + AS arch/x86/boot/header.o + CC arch/x86/boot/main.o + CC arch/x86/boot/mca.o + CC arch/x86/boot/memory.o + CC arch/x86/boot/pm.o + AS arch/x86/boot/pmjump.o + CC arch/x86/boot/printf.o + CC arch/x86/boot/regs.o + CC arch/x86/boot/string.o + CC arch/x86/boot/tty.o + CC arch/x86/boot/video.o + CC arch/x86/boot/video-mode.o + CC arch/x86/boot/video-vga.o + CC arch/x86/boot/video-vesa.o + CC arch/x86/boot/video-bios.o +``` + +As all source code files will be compiled, they will be linked to the `setup.elf`: + +```Makefile + LD arch/x86/boot/setup.elf +``` + +or: + +``` +ld -m elf_x86_64 -T arch/x86/boot/setup.ld arch/x86/boot/a20.o arch/x86/boot/bioscall.o arch/x86/boot/cmdline.o arch/x86/boot/copy.o arch/x86/boot/cpu.o arch/x86/boot/cpuflags.o arch/x86/boot/cpucheck.o arch/x86/boot/early_serial_console.o arch/x86/boot/edd.o arch/x86/boot/header.o arch/x86/boot/main.o arch/x86/boot/mca.o arch/x86/boot/memory.o arch/x86/boot/pm.o arch/x86/boot/pmjump.o arch/x86/boot/printf.o arch/x86/boot/regs.o arch/x86/boot/string.o arch/x86/boot/tty.o arch/x86/boot/video.o arch/x86/boot/video-mode.o arch/x86/boot/version.o arch/x86/boot/video-vga.o arch/x86/boot/video-vesa.o arch/x86/boot/video-bios.o -o arch/x86/boot/setup.elf +``` + +The last two things is the creation of the `setup.bin` that will contain compiled code from the `arch/x86/boot/*` directory: + +``` +objcopy -O binary arch/x86/boot/setup.elf arch/x86/boot/setup.bin +``` + +and the creation of the `vmlinux.bin` from the `vmlinux`: + +``` +objcopy -O binary -R .note -R .comment -S arch/x86/boot/compressed/vmlinux arch/x86/boot/vmlinux.bin +``` + +In the end we compile host program: [arch/x86/boot/tools/build.c](https://github.com/torvalds/linux/blob/master/arch/x86/boot/tools/build.c) that will create our `bzImage` from the `setup.bin` and the `vmlinux.bin`: + +``` +arch/x86/boot/tools/build arch/x86/boot/setup.bin arch/x86/boot/vmlinux.bin arch/x86/boot/zoffset.h arch/x86/boot/bzImage +``` + +Actually the `bzImage` is the concatenated `setup.bin` and the `vmlinux.bin`. In the end we will see the output which familiar to all who once build the Linux kernel from source: + +``` +Setup is 16268 bytes (padded to 16384 bytes). +System is 4704 kB +CRC 94a88f9a +Kernel: arch/x86/boot/bzImage is ready (#5) +``` + +That's all. + +Conclusion +================================================================================ + +It is the end of this part and here we saw all steps from the execution of the `make` command to the generation of the `bzImage`. I know, the Linux kernel makefiles and process of the Linux kernel building may seem confusing at first glance, but it is not so hard. Hope this part will help you to understand process of the Linux kernel building. + +Links +================================================================================ + +* [GNU make util](https://en.wikipedia.org/wiki/Make_%28software%29) +* [Linux kernel top Makefile](https://github.com/torvalds/linux/blob/master/Makefile) +* [cross-compilation](https://en.wikipedia.org/wiki/Cross_compiler) +* [Ctags](https://en.wikipedia.org/wiki/Ctags) +* [sparse](https://en.wikipedia.org/wiki/Sparse) +* [bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage) +* [uname](https://en.wikipedia.org/wiki/Uname) +* [shell](https://en.wikipedia.org/wiki/Shell_%28computing%29) +* [Kbuild](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kbuild.txt) +* [binutils](http://www.gnu.org/software/binutils/) +* [gcc](https://gcc.gnu.org/) +* [Documentation](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/makefiles.txt) +* [System.map](https://en.wikipedia.org/wiki/System.map) +* [Relocation](https://en.wikipedia.org/wiki/Relocation_%28computing%29) + +-------------------------------------------------------------------------------- + +via: https://github.com/0xAX/linux-insides/blob/master/Misc/how_kernel_compiled.md + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From 0c6b380f27e7308dbef79d5a736f7a6efc9f71e6 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 28 Jul 2015 10:53:51 +0800 Subject: [PATCH 1518/2517] =?UTF-8?q?20150728-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...vity and Check Memory Usages of Browser.md | 129 ++++++++++++++++++ ...y Using 'Explain Shell' Script in Linux.md | 118 ++++++++++++++++ 2 files changed, 247 insertions(+) create mode 100644 sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md create mode 100644 sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md diff --git a/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md b/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md new file mode 100644 index 0000000000..6adc5abaa6 --- /dev/null +++ b/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md @@ -0,0 +1,129 @@ +Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser +================================================================================ +Here again, I have written another post on [Linux Tips and Tricks][1] series. Since beginning the objective of this post is to make you aware of those small tips and hacks that lets you manage your system/server efficiently. + +![Create Cdrom ISO Image and Monitor Users in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/creating-cdrom-iso-watch-users-in-linux.jpg) + +Create Cdrom ISO Image and Monitor Users in Linux + +In this post we will see how to create ISO image from the contents of CD/DVD loaded in the drive, Open random man pages for learning, know details of other logged-in users and what they are doing and monitoring the memory usages of a browser, and all these using native tools/commands without any third-party application/utility. Here we go… + +### Create ISO image from a CD ### + +Often we need to backup/copy the content of CD/DVD. If you are on Linux platform you do not need any additional software. All you need is the access to Linux console. + +To create ISO image of the files in your CD/DVD ROM, you need two things. The first thing is you need to find the name of your CD/DVD drive. To find the name of your CD/DVD drive, you may choose any of the below three methods. + +**1. Run command lsblk (list block devices) from your terminal/console.** + + $ lsblk + +![Find Block Devices in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Find-Block-Devices.png) + +Find Block Devices + +**2. To see information about CD-ROM, you may use commands like less or more.** + + $ less /proc/sys/dev/cdrom/info + +![Check Cdrom Information](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Cdrom-Inforamtion.png) + +Check Cdrom Information + +**3. You may get the same information from [dmesg command][2] and customize the output using egrep.** + +The command ‘dmesg‘ print/control the kernel buffer ring. ‘egrep‘ command is used to print lines that matches a pattern. Option -i and –color with egrep is used to ignore case sensitive search and highlight the matching string respectively. + + $ dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer' + +![Find Device Information](http://www.tecmint.com/wp-content/uploads/2015/07/Find-Device-Information.png) + +Find Device Information + +Once you know the name of your CD/DVD, you can use following command to create a ISO image of your cdrom in Linux. + + $ cat /dev/sr0 > /path/to/output/folder/iso_name.iso + +Here ‘sr0‘ is the name of my CD/DVD drive. You should replace this with the name of your CD/DVD. This will help you in creating ISO image and backup contents of CD/DVD without any third-party application. + +![Create ISO Image of CDROM in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Create-ISO-Image-of-CDROM.png) + +Create ISO Image of CDROM + +### Open a man page randomly for Reading ### + +If you are new to Linux and want to learn commands and switches, this tweak is for you. Put the below line of code at the end of your `~/.bashrc` file. + + /use/bin/man $(ls /bin | shuf | head -1) + +Remember to put the above one line script in users’s `.bashrc` file and not in the .bashrc file of root. So when the next you login either locally or remotely using SSH you will see a man page randomly opened for you to read. For the newbies who want to learn commands and command-line switches, this will prove helpful. + +Here is what I got in my terminal after logging in to session for two times back-to-back. + +![LoadKeys Man Pages](http://www.tecmint.com/wp-content/uploads/2015/07/LoadKeys-Man-Pages.png) + +LoadKeys Man Pages + +![Zgrep Man Pages](http://www.tecmint.com/wp-content/uploads/2015/07/Zgrep-Man-Pages.png) + +Zgrep Man Pages + +### Check Activity of Logged-in Users ### + +Know what other users are doing on your shared server. + +In most general case, either you are a user of Shared Linux Server or the Admin. If you are concerned about your server and want to check what other users are doing, you may try command ‘w‘. + +This command lets you know if someone is executing any malicious code or tampering the server, slowing it down or anything else. ‘w‘ is the preferred way of keeping an eye on logged on users and what they are doing. + +To see logged on users and what they re doing, run command ‘w’ from terminal, preferably as root. + + # w + +![Check Linux User Activity](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Linux-User-Activity.png) + +Check Linux User Activity + +### Check Memory usages by Browser ### + +These days a lot of jokes are cracked on Google-chrome and its demand of memory. If you want to know the memory usages of a browser, you can list the name of the process, its PID and Memory usages of it. To check memory usages of a browser, just enter the “about:memory” in the address bar without quotes. + +I have tested it on Google-Chrome and Mozilla Firefox web browser. If you can check it on any other browser and it works well you may acknowledge us in the comments below. Also you may kill the browser process simply as if you have done for any Linux terminal process/service. + +In Google Chrome, type `about:memory` in address bar, you should get something similar to below image. + +![Check Chrome Memory Usage](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Chrome-Memory-Usage.png) + +Check Chrome Memory Usage + +In Mozilla Firefox, type `about:memory` in address bar, you should get something similar to below image. + +![Check Firefox Memory Usage](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Firefox-Memory-Usage.png) + +Check Firefox Memory Usage + +Out of these options you may select any of them, if you understand what it is. To check memory usages, click the left most option ‘Measure‘. + +![Firefox Main Process](http://www.tecmint.com/wp-content/uploads/2015/07/Firefox-Main-Processes.png) + +Firefox Main Process + +It shows tree like process-memory usages by browser. + +That’s all for now. Hope all the above tips will help you at some point of time. If you have one (or more) tips/tricks that will help Linux Users to manage their Linux System/Server more efficiently ans is lesser known, you may like to share it with us. + +I’ll be here with another post soon, till then stay tuned and connected to TecMint. Provide us with your valuable feedback in the comments below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/creating-cdrom-iso-image-watch-user-activity-in-linux/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/tag/linux-tricks/ +[2]:http://www.tecmint.com/dmesg-commands/ \ No newline at end of file diff --git a/sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md b/sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md new file mode 100644 index 0000000000..fe76f160cb --- /dev/null +++ b/sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md @@ -0,0 +1,118 @@ +Understanding Shell Commands Easily Using “Explain Shell” Script in Linux +================================================================================ +While working on Linux platform all of us need help on shell commands, at some point of time. Although inbuilt help like man pages, whatis command is helpful, but man pages output are too lengthy and until and unless one has some experience with Linux, it is very difficult to get any help from massive man pages. The output of whatis command is rarely more than one line which is not sufficient for newbies. + +![Explain Shell Commands in Linux Shell](http://www.tecmint.com/wp-content/uploads/2015/07/Explain-Shell-Commands-in-Linux-Shell.jpeg) + +Explain Shell Commands in Linux Shell + +There are third-party application like ‘cheat‘, which we have covered here “[Commandline Cheat Sheet for Linux Users][1]. Although Cheat is an exceptionally good application which shows help on shell command even when computer is not connected to Internet, it shows help on predefined commands only. + +There is a small piece of code written by Jackson which is able to explain shell commands within the bash shell very effectively and guess what the best part is you don’t need to install any third party package. He named the file containing this piece of code as `'explain.sh'`. + +#### Features of Explain Utility #### + +- Easy Code Embedding. +- No third-party utility needed to be installed. +- Output just enough information in course of explanation. +- Requires internet connection to work. +- Pure command-line utility. +- Able to explain most of the shell commands in bash shell. +- No root Account involvement required. + +**Prerequisite** + +The only requirement is `'curl'` package. In most of the today’s latest Linux distributions, curl package comes pre-installed, if not you can install it using package manager as shown below. + + # apt-get install curl [On Debian systems] + # yum install curl [On CentOS systems] + +### Installation of explain.sh Utility in Linux ### + +We have to insert the below piece of code as it is in the `~/.bashrc` file. The code should be inserted for each user and each `.bashrc` file. It is suggested to insert the code to the user’s .bashrc file only and not in the .bashrc of root user. + +Notice the first line of code that starts with hash `(#)` is optional and added just to differentiate rest of the codes of .bashrc. + +# explain.sh marks the beginning of the codes, we are inserting in .bashrc file at the bottom of this file. + + # explain.sh begins + explain () { + if [ "$#" -eq 0 ]; then + while read -p "Command: " cmd; do + curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$cmd" + done + echo "Bye!" + elif [ "$#" -eq 1 ]; then + curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$1" + else + echo "Usage" + echo "explain interactive mode." + echo "explain 'cmd -o | ...' one quoted command to explain it." + fi + } + +### Working of explain.sh Utility ### + +After inserting the code and saving it, you must logout of the current session and login back to make the changes taken into effect. Every thing is taken care of by the ‘curl’ command which transfer the input command and flag that need explanation to the mankier server and then print just necessary information to the Linux command-line. Not to mention to use this utility you must be connected to internet always. + +Let’s test few examples of command which I don’t know the meaning with explain.sh script. + +**1. I forgot what ‘du -h‘ does. All I need to do is:** + + $ explain 'du -h' + +![Get Help on du Command](http://www.tecmint.com/wp-content/uploads/2015/07/Get-Help-on-du-Command.png) + +Get Help on du Command + +**2. If you forgot what ‘tar -zxvf‘ does, you may simply do:** + + $ explain 'tar -zxvf' + +![Tar Command Help](http://www.tecmint.com/wp-content/uploads/2015/07/Tar-Command-Help.png) + +Tar Command Help + +**3. One of my friend often confuse the use of ‘whatis‘ and ‘whereis‘ command, so I advised him.** + +Go to Interactive Mode by simply typing explain command on the terminal. + + $ explain + +and then type the commands one after another to see what they do in one window, as: + + Command: whatis + Command: whereis + +![Whatis Whereis Commands Help](http://www.tecmint.com/wp-content/uploads/2015/07/Whatis-Whereis-Commands-Help.png) + +Whatis Whereis Commands Help + +To exit interactive mode he just need to do Ctrl + c. + +**4. You can ask to explain more than one command chained by pipeline.** + + $ explain 'ls -l | grep -i Desktop' + +![Get Help on Multiple Commands](http://www.tecmint.com/wp-content/uploads/2015/07/Get-Help-on-Multiple-Commands.png) + +Get Help on Multiple Commands + +Similarly you can ask your shell to explain any shell command. All you need is a working Internet connection. The output is generated based upon the explanation needed from the server and hence the output result is not customizable. + +For me this utility is really helpful and it has been honored being added to my .bashrc. Let me know what is your thought on this project? How it can useful for you? Is the explanation satisfactory? + +Provide us with your valuable feedback in the comments below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/explain-shell-commands-in-the-linux-shell/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/cheat-command-line-cheat-sheet-for-linux-users/ \ No newline at end of file From beebe0747c11b66ca82060586fb19a68ec826dbb Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Tue, 28 Jul 2015 12:40:29 +0800 Subject: [PATCH 1519/2517] =?UTF-8?q?=E3=80=90Translating=20by=20dingdongn?= =?UTF-8?q?igetou=E3=80=9120150728=20Understanding=20Shell=20Commands=20Ea?= =?UTF-8?q?sily=20Using=20'Explain=20Shell'=20Script=20in=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【Translating by dingdongnigetou】20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md --- ... Commands Easily Using 'Explain Shell' Script in Linux.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md b/sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md index fe76f160cb..ab7572cd7a 100644 --- a/sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md +++ b/sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md @@ -1,3 +1,6 @@ + +Translating by dingdongnigetou + Understanding Shell Commands Easily Using “Explain Shell” Script in Linux ================================================================================ While working on Linux platform all of us need help on shell commands, at some point of time. Although inbuilt help like man pages, whatis command is helpful, but man pages output are too lengthy and until and unless one has some experience with Linux, it is very difficult to get any help from massive man pages. The output of whatis command is rarely more than one line which is not sufficient for newbies. @@ -115,4 +118,4 @@ via: http://www.tecmint.com/explain-shell-commands-in-the-linux-shell/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/cheat-command-line-cheat-sheet-for-linux-users/ \ No newline at end of file +[1]:http://www.tecmint.com/cheat-command-line-cheat-sheet-for-linux-users/ From 77d5ab6c1a57922d59f0f878d011269099f212a4 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 28 Jul 2015 15:27:20 +0800 Subject: [PATCH 1520/2517] Update 20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md --- ..., Watch User Activity and Check Memory Usages of Browser.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md b/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md index 6adc5abaa6..2219e5e25e 100644 --- a/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md +++ b/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser ================================================================================ Here again, I have written another post on [Linux Tips and Tricks][1] series. Since beginning the objective of this post is to make you aware of those small tips and hacks that lets you manage your system/server efficiently. @@ -126,4 +127,4 @@ via: http://www.tecmint.com/creating-cdrom-iso-image-watch-user-activity-in-linu [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/tag/linux-tricks/ -[2]:http://www.tecmint.com/dmesg-commands/ \ No newline at end of file +[2]:http://www.tecmint.com/dmesg-commands/ From 8b32002911ade88fd15d5e51d103fd813e781ca0 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 28 Jul 2015 15:48:00 +0800 Subject: [PATCH 1521/2517] =?UTF-8?q?20150728-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...mmand installed for 7-zip archive files.md | 49 +++++++ ... Kernel for Improved System Performance.md | 127 ++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md create mode 100644 sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md diff --git a/sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md b/sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md new file mode 100644 index 0000000000..8c9b781117 --- /dev/null +++ b/sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md @@ -0,0 +1,49 @@ +How To Fix: There is no command installed for 7-zip archive files +================================================================================ +### Problem ### + +I was trying to install Emerald icon theme in Ubuntu and the theme came in .7z archive. As always, I tried to extract it, in GUI, using the right click and “extract here”. Instead of extracting the file, Ubuntu 15.04 threw an error which read: + +> Could not open this file +> +> There is no command installed for 7-zip archive files. Do you want to search for a command to open this file? + +The error looked like this: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Install_7zip_ubuntu_1.png) + +### Reason ### + +Reason is quite evident from the error message itself. The 7Z, better to call it [7-zip][1], program is not installed and hence 7Z compressed files are not being extracted. This also hints that Ubuntu doesn’t support 7-Zip files by default. + +### Solution: Install 7zip in Ubuntu ### + +Solution is quite simple as well. Install the 7-Zip package in Ubuntu. Now you might wonder how to install 7Zip in Ubuntu? Well, in the previous error dialogue box if you click on “Search Command”, it will look for available p7zip package. Just click on “Install” here: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Install_7zip_ubuntu.png) + +### Alternative: Install 7zip in terminal ### + +If you prefer terminal, you can install 7zip in terminal using the following command: + + sudo apt-get install p7zip-full + +Note: You’ll find three 7zip packages in Ubuntu: p7zip, p7zip-full and p7zip-rar. The difference between p7zip and p7zip-full is that p7zip is a lighter version providing support only for .7z and .7za files while the full version provides support for more 7z compression algorithms (for audio files etc). For p7zip-rar, it provides support for .rar files along with 7z. + +In fact similar error can be encountered with [RAR files in Ubuntu][2]. Solution is the same, install the correct program. + +I hope this quick post helped you to solve the mystery of **how to open 7zip in Ubuntu 14.04**. Any questions or suggestions are always welcomed. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-there-is-no-command-installed-for-7-zip-archive-files/ + +作者:[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://www.7-zip.org/ +[2]:http://itsfoss.com/fix-there-is-no-command-installed-for-rar-archive-files/ \ No newline at end of file diff --git a/sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md b/sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md new file mode 100644 index 0000000000..4e238de09d --- /dev/null +++ b/sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md @@ -0,0 +1,127 @@ +How to Update Linux Kernel for Improved System Performance +================================================================================ +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/update-linux-kernel-644x373.jpg?2c3c1f) + +The rate of development for [the Linux kernel][1] is unprecedented, with a new major release approximately every two to three months. Each release offers several new features and improvements that a lot of people could take advantage of to make their computing experience faster, more efficient, or better in other ways. + +The problem, however, is that you usually can’t take advantage of these new kernel releases as soon as they come out — you have to wait until your distribution comes out with a new release that packs a newer kernel with it. We’ve previously laid out [the benefits for regularly updating your kernel][2], and you don’t have to wait to get your hands on them. We’ll show you how. + +> Disclaimer: As some of our literature may have mentioned before, updating your kernel does carry a (small) risk of breaking your system. If this is the case, it’s usually easy to pick an older kernel at boot time that works, but something may always go wrong. Therefore, we’re not responsible for any damage to your system — use at your own risk! + +### Prep Work ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/linux_kernel_arch.jpg?2c3c1f) + +To update your kernel, you’ll first need to determine whether you’re using a 32-bit or 64-bit system. Open up a terminal window and run + + uname -a + +Then check to see if the output says x86_64 or i686. If it’s x86_64, then you’re running the 64-bit version; otherwise, you’re running the 32-bit version. Remember this, because it will be important. + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/kernel_latest_version.jpg?2c3c1f) + +Next, visit the [official Linux kernel website][3]. This will tell you what the current stable version of the kernel is. You can try out release candidates if you’d like, but they are a lot less tested than the stable releases. Stick with the stable kernel unless you are certain you need a release candidate version. + +### Ubuntu Instructions ### + +It’s quite easy for Ubuntu and Ubuntu-derivative users to update their kernel, thanks to the Ubuntu Mainline Kernel PPA. Although it’s officially called a PPA, you cannot use it like other PPAs by adding them to your software sources list and expecting it to automatically update the kernel for you. Instead, it’s simply a webpage you navigate through to download the kernel you want. + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/ubuntu_new_kernels.jpg?2c3c1f) + +Now, visit the [kernel PPA webpage][4] and scroll all the way to the bottom. The absolute bottom of the list will probably contain some release candidate versions (which you can see by the “rc” in the name), but just above them should be the latest stable kernel (to make this easier to explain, at the time of writing the stable version was 4.1.2). Click on that, and you’ll be presented with several options. You’ll need to grab three files and save them in their own folder (within the Downloads folder if you’d like) so that they’re isolated from all other files: + +- The “generic” header file for your architecture (in my case, 64-bit or “amd64″) +- The header file in the middle that has “all” towards the end of the filename +- The “generic” kernel file for your architecture (again, I would pick “amd64″ but if you use 32-bit you’ll need “i686″) + +You’ll notice that there are also “lowlatency” files available to download, but it’s fine to ignore this. These files are relatively unstable and are only made available for people who need their low-latency benefits if the general files don’t suffice for tasks such as audio recording. Again, the recommendation is to always use generic first and only try lowlatency if your performance isn’t good enough for certain tasks. No, gaming or Internet browsing aren’t excuses to try lowlatency. + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/ubuntu_install_kernel.jpg?2c3c1f) + +You put these files into their own folder, right? Now open up the Terminal, use the + + cd + +command to go to your newly-created folder, such as + + cd /home/user/Downloads/Kernel + +and then run: + + sudo dpkg -i *.deb + +This command marks all .deb files within the folder as “to be installed” and then performs the installation. This is the recommended way to install these files because otherwise it’s easy to pick one file to install and it’ll complain about dependency issues. This approach avoids that problem. If you’re not sure what cd or sudo are, get a quick crash course on [essential Linux commands][5]. + +Once the installation is complete, **Restart** your system and you should be running the just-installed kernel! You can check this by running uname -a in the Terminal and checking the output. + +### Fedora Instructions ### + +If you use Fedora or one of its derivatives, the process is very similar to Ubuntu. There’s just a different location to grab different files, and a different command to install them. + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/fedora_new_kernels.jpg?2c3c1f) + +VIew the list of the most [recent kernel builds for Fedora][6]. Pick the latest stable version out of the list, and then scroll down to either the i686 or x86_64 section, depending on your system’s architecture. In this section, you’ll need to grab the following files and save them in their own folder (such as “Kernel” within your Downloads folder, as an example): + +- kernel +- kernel-core +- kernel-headers +- kernel-modules +- kernel-modules-extra +- kernel-tools +- perf and python-perf (optional) + +If your system is i686 (32-bit) and you have 4GB of RAM or more, you’ll need to grab the PAE version of all of these files where available. PAE is an address extension technique used for 32-bit system to allow them to use more than 3GB of RAM. + +Now, use the + + cd + +command to go to that folder, such as + + cd /home/user/Downloads/Kernel + +and then run the following command to install all the files: + + yum --nogpgcheck localinstall *.rpm + +Finally **Restart** your computer and you should be running a new kernel! + +### Using Rawhide ### + +Alternatively, Fedora users can also simply [switch to Rawhide][7] and it’ll automatically update every package to the latest version, including the kernel. However, Rawhide is known to break quite often (especially early on in the development cycle) and should **not** be used on a system that you need to rely on. + +### Arch Instructions ### + +[Arch users][8] should always have the latest and greatest stable kernel available (or one pretty close to it). If you want to get even closer to the latest-released stable kernel, you can enable the testing repo which will give you access to major new releases roughly two to four weeks early. + +To do this, open the file located at + + /etc/pacman.conf + +with sudo permissions in [your favorite terminal text editor][9], and then uncomment (delete the pound symbols from the front of each line) the three lines associated with testing. If you have the multilib repository enabled, then do the same for the multilib-testing repository. See [this Arch Linux wiki page][10] if you need more information. + +Upgrading your kernel isn’t easy (done so intentionally), but it can give you a lot of benefits. So long as your new kernel didn’t break anything, you can now enjoy improved performance, better efficiency, support for more hardware, and potential new features. Especially if you’re running relatively new hardware, upgrading the kernel can really help out. + +**How has upgraded the kernel helped you? Do you think your favorite distribution’s policy on kernel releases is what it should be?** Let us know in the comments! + +-------------------------------------------------------------------------------- + +via: http://www.makeuseof.com/tag/update-linux-kernel-improved-system-performance/ + +作者:[Danny Stieben][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.makeuseof.com/tag/author/danny/ +[1]:http://www.makeuseof.com/tag/linux-kernel-explanation-laymans-terms/ +[2]:http://www.makeuseof.com/tag/5-reasons-update-kernel-linux/ +[3]:http://www.kernel.org/ +[4]:http://kernel.ubuntu.com/~kernel-ppa/mainline/ +[5]:http://www.makeuseof.com/tag/an-a-z-of-linux-40-essential-commands-you-should-know/ +[6]:http://koji.fedoraproject.org/koji/packageinfo?packageID=8 +[7]:http://www.makeuseof.com/tag/bleeding-edge-linux-fedora-rawhide/ +[8]:http://www.makeuseof.com/tag/arch-linux-letting-you-build-your-linux-system-from-scratch/ +[9]:http://www.makeuseof.com/tag/nano-vs-vim-terminal-text-editors-compared/ +[10]:https://wiki.archlinux.org/index.php/Pacman#Repositories \ No newline at end of file From b91b501850e195c679f207773b0a7b515ef87239 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Jul 2015 20:24:55 +0800 Subject: [PATCH 1522/2517] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E5=92=8C=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 回收:@barney-ro @2q1w2007 @zhangboyue 补充删除:@wwy-hust --- ...er the enterprise and other predictions.md | 74 ------- ...urious Case of the Disappearing Distros.md | 120 ---------- ...ff -u--What's New in Kernel Development.md | 36 --- ...1 Did this JavaScript break the console.md | 91 -------- ... Revealed--The best and worst of Docker.md | 66 ------ ...erver behind NAT via reverse SSH tunnel.md | 1 - sources/tech/20150522 Analyzing Linux Logs.md | 1 - ...Experience on Linux 'iptables' Firewall.md | 209 ------------------ 8 files changed, 598 deletions(-) delete mode 100644 sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md delete mode 100644 sources/talk/20141224 The Curious Case of the Disappearing Distros.md delete mode 100644 sources/talk/20150112 diff -u--What's New in Kernel Development.md delete mode 100644 sources/talk/20150121 Did this JavaScript break the console.md delete mode 100644 sources/talk/20150320 Revealed--The best and worst of Docker.md delete mode 100644 sources/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md diff --git a/sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md b/sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md deleted file mode 100644 index 0d2b26cc98..0000000000 --- a/sources/talk/20141219 2015 will be the year Linux takes over the enterprise and other predictions.md +++ /dev/null @@ -1,74 +0,0 @@ -2015 will be the year Linux takes over the enterprise (and other predictions) -================================================================================ -> Jack Wallen removes his rose-colored glasses and peers into the crystal ball to predict what 2015 has in store for Linux. - -![](http://tr1.cbsistatic.com/hub/i/r/2014/12/15/f79d21fe-f1d1-416d-ba22-7e757dfcdb31/resize/620x485/52a10d26d34c3fc4201c5daa8ff277ff/linux2015hero.jpg) - -The crystal ball has been vague and fuzzy for quite some time. Every pundit and voice has opined on what the upcoming year will mean to whatever topic it is they hold dear to their heart. In my case, we're talking Linux and open source. - -In previous years, I'd don the rose-colored glasses and make predictions that would shine a fantastic light over the Linux landscape and proclaim 20** will be the year of Linux on the _____ (name your platform). Many times, those predictions were wrong, and Linux would wind up grinding on in the background. - -This coming year, however, there are some fairly bold predictions to be made, some of which are sure things. Read on and see if you agree. - -### Linux takes over big data ### - -This should come as no surprise, considering the advancements Linux and open source has made over the previous few years. With the help of SuSE, Red Hat, and SAP Hana, Linux will hold powerful sway over big data in 2015. In-memory computing and live kernel patching will be the thing that catapults big data into realms of uptime and reliability never before known. SuSE will lead this charge like a warrior rushing into a battle it cannot possibly lose. - -This rise of Linux in the world of big data will have serious trickle down over the rest of the business world. We already know how fond enterprise businesses are of Linux and big data. What we don't know is how this relationship will alter the course of Linux with regards to the rest of the business world. - -My prediction is that the success of Linux with big data will skyrocket the popularity of Linux throughout the business landscape. More contracts for SuSE and Red Hat will equate to more deployments of Linux servers that handle more tasks within the business world. This will especially apply to the cloud, where OpenStack should easily become an overwhelming leader. - -As the end of 2015 draws to a close, Linux will continue its take over of more backend services, which may include the likes of collaboration servers, security, and much more. - -### Smart machines ### - -Linux is already leading the trend for making homes and autos more intelligent. With improvements in the likes of Nest (which currently uses an embedded Linux), the open source platform is poised to take over your machines. Because 2015 should see a massive rise in smart machines, it goes without saying that Linux will be a huge part of that growth. I firmly believe more homes and businesses will take advantage of such smart controls, and that will lead to more innovations (all of which will be built on Linux). - -One of the issues facing Nest, however, is that it was purchased by Google. What does this mean for the thermostat controller? Will Google continue using the Linux platform -- or will it opt to scrap that in favor of Android? Of course, a switch would set the Nest platform back a bit. - -The upcoming year will see Linux lead the rise in popularity of home automation. Wink, Iris, Q Station, Staples Connect, and more (similar) systems will help to bridge Linux and home users together. - -### The desktop ### - -The big question, as always, is one that tends to hang over the heads of the Linux community like a dark cloud. That question is in relation to the desktop. Unfortunately, my predictions here aren't nearly as positive. I believe that the year 2015 will remain quite stagnant for Linux on the desktop. That complacency will center around Ubuntu. - -As much as I love Ubuntu (and the Unity desktop), this particular distribution will continue to drag the Linux desktop down. Why? - -Convergence... or the lack thereof. - -Canonical has been so headstrong about converging the desktop and mobile experience that they are neglecting the current state of the desktop. The last two releases of Ubuntu (one being an LTS release) have been stagnant (at best). The past year saw two of the most unexciting releases of Ubuntu that I can recall. The reason? Because the developers of Ubuntu are desperately trying to make Unity 8/Mir and the ubiquitous Ubuntu Phone a reality. The vaporware that is the Ubuntu Phone will continue on through 2015, and Unity 8/Mir may or may not be released. - -When the new iteration of the Ubuntu Unity desktop is finally released, it will suffer a serious setback, because there will be so little hardware available to truly show it off. [System76][1] will sell their outstanding [Sable Touch][2], which will probably become the flagship system for Unity 8/Mir. As for the Ubuntu Phone? How many reports have you read that proclaimed "Ubuntu Phone will ship this year"? - -I'm now going on the record to predict that the Ubuntu Phone will not ship in 2015. Why? Canonical created partnerships with two OEMs over a year ago. Those partnerships have yet to produce a single shippable product. The closest thing to a shippable product is the Meizu MX4 phone. The "Pro" version of that phone was supposed to have a formal launch of Sept 25. Like everything associated with the Ubuntu Phone, it didn't happen. - -Unless Canonical stops putting all of its eggs in one vaporware basket, desktop Linux will take a major hit in 2015. Ubuntu needs to release something major -- something to make heads turn -- otherwise, 2015 will be just another year where we all look back and think "we could have done something special." - -Outside of Ubuntu, I do believe there are some outside chances that Linux could still make some noise on the desktop. I think two distributions, in particular, will bring something rather special to the table: - -- [Evolve OS][3] -- a ChromeOS-like Linux distribution -- [Quantum OS][4] -- a Linux distribution that uses Android's Material Design specs - -Both of these projects are quite exciting and offer unique, user-friendly takes on the Linux desktop. This is quickly become a necessity in a landscape being dragged down by out-of-date design standards (think the likes of Cinnamon, Mate, XFCE, LXCE -- all desperately clinging to the past). - -This is not to say that Linux on the desktop doesn't have a chance in 2015. It does. In order to grasp the reins of that chance, it will have to move beyond the past and drop the anchors that prevent it from moving out to deeper, more viable waters. - -Linux stands to make more waves in 2015 than it has in a very long time. From enterprise to home automation -- the world could be the oyster that Linux uses as a springboard to the desktop and beyond. - -What are your predictions for Linux and open source in 2015? Share your thoughts in the discussion thread below. - --------------------------------------------------------------------------------- - -via: http://www.techrepublic.com/article/2015-will-be-the-year-linux-takes-over-the-enterprise-and-other-predictions/ - -作者:[Jack Wallen][a] -译者:[barney-ro](https://github.com/barney-ro) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.techrepublic.com/search/?a=jack+wallen -[1]:https://system76.com/ -[2]:https://system76.com/desktops/sable -[3]:https://evolve-os.com/ -[4]:http://quantum-os.github.io/ \ No newline at end of file diff --git a/sources/talk/20141224 The Curious Case of the Disappearing Distros.md b/sources/talk/20141224 The Curious Case of the Disappearing Distros.md deleted file mode 100644 index b9fc7875d7..0000000000 --- a/sources/talk/20141224 The Curious Case of the Disappearing Distros.md +++ /dev/null @@ -1,120 +0,0 @@ -The Curious Case of the Disappearing Distros -================================================================================ -![](http://www.linuxinsider.com/ai/828896/linux-distros.jpg) - -"Linux is a big game now, with billions of dollars of profit, and it's the best thing since sliced bread, but corporations are taking control, and slowly but systematically, community distros are being killed," said Google+ blogger Alessandro Ebersol. "Linux is slowly becoming just like BSD, where companies use and abuse it and give very little in return." - -Well the holidays are pretty much upon us at last here in the Linux blogosphere, and there's nowhere left to hide. The next two weeks or so promise little more than a blur of forced social occasions and too-large meals, punctuated only -- for the luckier ones among us -- by occasional respite down at the Broken Windows Lounge. - -Perhaps that's why Linux bloggers seized with such glee upon the good old-fashioned mystery that came up recently -- delivered in the nick of time, as if on cue. - -"Why is the Number of Linux Distros Declining?" is the [question][1] posed over at Datamation, and it's just the distraction so many FOSS fans have been needing. - -"Until about 2011, the number of active distributions slowly increased by a few each year," wrote author Bruce Byfield. "By contrast, the last three years have seen a 12 percent decline -- a decrease too high to be likely to be coincidence. - -"So what's happening?" Byfield wondered. - -It would be difficult to imagine a more thought-provoking question with which to spend the Northern hemisphere's shortest days. - -### 'There Are Too Many Distros' ### - -![](http://www.linuxinsider.com/images/article_images/linuxgirl_bg_pinkswirl_150x245.jpg) - -"That's an easy question," began blogger [Robert Pogson][2]. "There are too many distros." - -After all, "if a fanatic like me can enjoy life having sampled only a dozen distros, why have any more?" Pogson explained. "If someone has a concept different from the dozen or so most common distros, that concept can likely be demonstrated by documenting the tweaks and package-lists and, perhaps, some code." - -Trying to compete with some 40,000 package repositories like Debian's, however, is "just silly," he said. - -"No startup can compete with such a distro," Pogson asserted. "Why try? Just use it to do what you want and tell the world about it." - -### 'I Don't Distro-Hop Anymore' ### - -The major existing distros are doing a good job, so "we don't need so many derivative works," Google+ blogger Kevin O'Brien agreed. - -"I know I don't 'distro-hop' anymore, and my focus is on using my computer to get work done," O'Brien added. - -"If my apps run fine every day, that is all that I need," he said. "Right now I am sticking with Ubuntu LTS 14.04, and probably will until 2016." - -### 'The More Distros, the Better' ### - -It stands to reason that "as distros get better, there will be less reasons to roll your own," concurred [Linux Rants][3] blogger Mike Stone. - -"I think the modern Linux distros cover the bases of a larger portion of the Linux-using crowd, so fewer and fewer people are starting their own distribution to compensate for something that the others aren't satisfying," he explained. "Add to that the fact that corporations are more heavily involved in the development of Linux now than they ever have been, and they're going to focus their resources." - -So, the decline isn't necessarily a bad thing, as it only points to the strength of the current offerings, he asserted. - -At the same time, "I do think there are some negative consequences as well," Stone added. "Variation in the distros is a way that Linux grows and evolves, and with a narrower field, we're seeing less opportunity to put new ideas out there. In my mind, the more distros, the better -- hopefully the trend reverses soon." - -### 'I Hope Some Diversity Survives' ### - -Indeed, "the era of novelty and experimentation is over," Google+ blogger Gonzalo Velasco C. told Linux Girl. - -"Linux is 20+ years old and got professional," he noted. "There is always room for experimentation, but the top 20 are here since more than a decade ago. - -"Godspeed GNU/Linux," he added. "I hope some diversity survives -- especially distros without Systemd; on the other hand, some standards are reached through consensus." - -### A Question of Package Managers ### - -There are two trends at work here, suggested consultant and [Slashdot][4] blogger Gerhard Mack. - -First, "there are fewer reasons to start a new distro," he said. "The basic nuts and bolts are mostly done, installation is pretty easy across most distros, and it's not difficult on most hardware to get a working system without having to resort to using the command line." - -The second thing is that "we are seeing a reduction of distros with inferior package managers," Mack suggested. "It is clear that .deb-based distros had fewer losses and ended up with a larger overall share." - -### Survival of the Fittest ### - -It's like survival of the fittest, suggested consultant Rodolfo Saenz, who is certified in Linux, IBM Tivoli Storage Manager and Microsoft Active Directory. - -"I prefer to see a strong Linux with less distros," Saenz added. "Too many distros dilutes development efforts and can confuse potential future users." - -Fewer distros, on the other hand, "focuses development efforts into the stronger distros and also attracts new potential users with clear choices for their needs," he said. - -### All About the Money ### - -Google+ blogger Alessandro Ebersol also saw survival of the fittest at play, but he took a darker view. - -"Linux is a big game now, with billions of dollars of profit, and it's the best thing since sliced bread," Ebersol began. "But corporations are taking control, and slowly but systematically, community distros are being killed." - -It's difficult for community distros to keep pace with the ever-changing field, and cash is a necessity, he conceded. - -Still, "Linux is slowly becoming just like BSD, where companies use and abuse it and give very little in return," Ebersol said. "It saddens me, but GNU/Linux's best days were 10 years ago, circa 2002 to 2004. Now, it's the survival of the fittest -- and of course, the ones with more money will prevail." - -### 'Fewer Devs Care' ### - -SoylentNews blogger hairyfeet focused on today's altered computing landscape. - -"The reason there are fewer distros is simple: With everybody moving to the Google Playwall of Android, and Windows 10 looking to be the next XP, fewer devs care," hairyfeet said. - -"Why should they?" he went on. "The desktop wars are over, MSFT won, and the mobile wars are gonna be proprietary Google, proprietary Apple and proprietary MSFT. The money is in apps and services, and with a slow economy, there just isn't time for pulling a Taco Bell and rerolling yet another distro. - -"For the few that care about Linux desktops you have Ubuntu, Mint and Cent, and that is plenty," hairyfeet said. - -### 'No Less Diversity' ### - -Last but not least, Chris Travers, a [blogger][5] who works on the [LedgerSMB][6] project, took an optimistic view. - -"Ever since I have been around Linux, there have been a few main families -- [SuSE][7], [Red Hat][8], Debian, Gentoo, Slackware -- and a number of forks of these," Travers said. "The number of major families of distros has been declining for some time -- Mandrake and Connectiva merging, for example, Caldera disappearing -- but each of these families is ending up with fewer members as well. - -"I think this is a good thing," he concluded. - -"The big community distros -- Debian, Slackware, Gentoo, Fedora -- are going strong and picking up a lot of the niche users that other distros catered to," he pointed out. "Many of these distros are making it easier to come up with customized variants for niche markets. So what you have is a greater connectedness within the big distros, and no less diversity." - --------------------------------------------------------------------------------- - -via: http://www.linuxinsider.com/story/The-Curious-Case-of-the-Disappearing-Distros-81518.html - -作者:Katherine Noyes -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.datamation.com/open-source/why-is-the-number-of-linux-distros-declining.html -[2]:http://mrpogson.com/ -[3]:http://linuxrants.com/ -[4]:http://slashdot.org/ -[5]:http://ledgersmbdev.blogspot.com/ -[6]:http://www.ledgersmb.org/ -[7]:http://www.novell.com/linux -[8]:http://www.redhat.com/ diff --git a/sources/talk/20150112 diff -u--What's New in Kernel Development.md b/sources/talk/20150112 diff -u--What's New in Kernel Development.md deleted file mode 100644 index 2e6f8e3480..0000000000 --- a/sources/talk/20150112 diff -u--What's New in Kernel Development.md +++ /dev/null @@ -1,36 +0,0 @@ -diff -u: What's New in Kernel Development -================================================================================ -**David Drysdale** wanted to add Capsicum security features to Linux after he noticed that FreeBSD already had Capsicum support. Capsicum defines fine-grained security privileges, not unlike filesystem capabilities. But as David discovered, Capsicum also has some controversy surrounding it. - -Capsicum has been around for a while and was described in a USENIX paper in 2010: [http://www.cl.cam.ac.uk/research/security/capsicum/papers/2010usenix-security-capsicum-website.pdf][1]. - -Part of the controversy is just because of the similarity with capabilities. As Eric Biderman pointed out during the discussion, it would be possible to implement features approaching Capsicum's as an extension of capabilities, but implementing Capsicum directly would involve creating a whole new (and extensive) abstraction layer in the kernel. Although David argued that capabilities couldn't actually be extended far enough to match Capsicum's fine-grained security controls. - -Capsicum also was controversial within its own developer community. For example, as Eric described, it lacked a specification for how to revoke privileges. And, David pointed out that this was because the community couldn't agree on how that could best be done. David quoted an e-mail sent by Ben Laurie to the cl-capsicum-discuss mailing list in 2011, where Ben said, "It would require additional book-keeping to find and revoke outstanding capabilities, which requires knowing how to reach capabilities, and then whether they are derived from the capability being revoked. It also requires an authorization model for revocation. The former two points mean additional overhead in terms of data structure operations and synchronisation." - -Given the ongoing controversy within the Capsicum developer community and the corresponding lack of specification of key features, and given the existence of capabilities that already perform a similar function in the kernel and the invasiveness of Capsicum patches, Eric was opposed to David implementing Capsicum in Linux. - -But, given the fact that capabilities are much coarser-grained than Capsicum's security features, to the point that capabilities can't really be extended far enough to mimic Capsicum's features, and given that FreeBSD already has Capsicum implemented in its kernel, showing that it can be done and that people might want it, it seems there will remain a lot of folks interested in getting Capsicum into the Linux kernel. - -Sometimes it's unclear whether there's a bug in the code or just a bug in the written specification. Henrique de Moraes Holschuh noticed that the Intel Software Developer Manual (vol. 3A, section 9.11.6) said quite clearly that microcode updates required 16-byte alignment for the P6 family of CPUs, the Pentium 4 and the Xeon. But, the code in the kernel's microcode driver didn't enforce that alignment. - -In fact, Henrique's investigation uncovered the fact that some Intel chips, like the Xeon X5550 and the second-generation i5 chips, needed only 4-byte alignment in practice, and not 16. However, to conform to the documented specification, he suggested fixing the kernel code to match the spec. - -Borislav Petkov objected to this. He said Henrique was looking for problems where there weren't any. He said that Henrique simply had discovered a bug in Intel's documentation, because the alignment issue clearly wasn't a problem in the real world. He suggested alerting the Intel folks to the documentation problem and moving on. As he put it, "If the processor accepts the non-16-byte-aligned update, why do you care?" - -But, as H. Peter Anvin remarked, the written spec was Intel's guarantee that certain behaviors would work. If the kernel ignored the spec, it could lead to subtle bugs later on. And, Bill Davidsen said that if the kernel ignored the alignment requirement, and "if the requirement is enforced in some future revision, and updates then fail in some insane way, the vendor is justified in claiming 'I told you so'." - -The end result was that Henrique sent in some patches to make the microcode driver enforce the 16-byte alignment requirement. - --------------------------------------------------------------------------------- - -via: http://www.linuxjournal.com/content/diff-u-whats-new-kernel-development-6 - -作者:[Zack Brown][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linuxjournal.com/user/801501 -[1]:http://www.cl.cam.ac.uk/research/security/capsicum/papers/2010usenix-security-capsicum-website.pdf \ No newline at end of file diff --git a/sources/talk/20150121 Did this JavaScript break the console.md b/sources/talk/20150121 Did this JavaScript break the console.md deleted file mode 100644 index aab924ab33..0000000000 --- a/sources/talk/20150121 Did this JavaScript break the console.md +++ /dev/null @@ -1,91 +0,0 @@ -Did this JavaScript break the console? ---------- - -#Q: - -Just doing some JavaScript stuff in google chrome (don't want to try in other browsers for now, in case this is really doing real damage) and I'm not sure why this seemed to break my console. - -```javascript ->var x = "http://www.foo.bar/q?name=%%this%%"; -x -``` - -After x (and enter) the console stops working... I restarted chrome and now when I do a simple - -```javascript -console.clear(); -``` - -It's giving me - -```javascript -Console was cleared -``` - -And not clearing the console. Now in my scripts console.log's do not register and I'm wondering what is going on. 99% sure it has to do with the double percent signs (%%). - -Anyone know what I did wrong or better yet, how to fix the console? - -[A bug report for this issue has been filed here.][1] -Edit: Feeling pretty dumb, but I had Preserve log checked... That's why the console wasn't clearing. - -#A: - -As discussed in the comments, there are actually many different ways of constructing a string that causes this issue, and it is not necessary for there to be two percent signs in most cases. - -```TXT -http://example.com/% -http://%%% -http://ab% -http://%ab -http://%zz -``` - -However, it's not just the presence of a percent sign that breaks the Chrome console, as when we enter the following well-formed URL, the console continues to work properly and produces a clickable link. - -```TXT -http://ab%20cd -``` - -Additionally, the strings `http://%`, and `http://%%` will also print properly, since Chrome will not auto-link a URL-link string unless the [`http://`][2] is followed by at least 3 characters. - -From here I hypothesized that the issue must be in the process of linking a URL string in the console, likely in the process of decoding a malformed URL. I remembered that the JavaScript function `decodeURI` will throw an exception if given a malformed URL, and since Chrome's developer tools are largely written in JavaScript, could this be the issue that is evidently crashing the developer console? - -To test this theory, I ran Chrome by the command link, to see if any errors were being logged. - -Indeed, the same error you would see if you ran decodeURI on a malformed URL (i.e. decodeURI('http://example.com/%')) was being printed to the console: - ->[4810:1287:0107/164725:ERROR:CONSOLE(683)] "Uncaught URIError: URI malformed", source: chrome-devtools://devtools/bundled/devtools.js (683) ->So, I opened the URL 'chrome-devtools://devtools/bundled/devtools.js' in Chrome, and on line 683, I found the following. - -```javascript -{var parsedURL=new WebInspector.ParsedURL(decodeURI(url));var origin;var folderPath;var name;if(parsedURL.isValid){origin=parsedURL.scheme+"://"+parsedURL.host;if(parsedURL.port) -``` - -As we can see, `decodeURI(url)` is being called on the URL without any error checking, thus throwing the exception and crashing the developer console. - -A real fix for this issue will come from adding error handling to the Chrome console code, but in the meantime, one way to avoid the issue would be to wrap the string in a complex data type like an array to prevent parsing when logging. - -```javascript -var x = "http://example.com/%"; -console.log([x]); -``` - -Thankfully, the broken console issue does not persist once the tab is closed, and will not affect other tabs. - -###Update: - -Apparently, the issue can persist across tabs and restarts if Preserve Log is checked. Uncheck this if you are having this issue. - -via:[stackoverflow](http://stackoverflow.com/questions/27828804/did-this-javascript-break-the-console/27830948#27830948) - -作者:[Alexander O'Mara][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://stackoverflow.com/users/3155639/alexander-omara -[1]:https://code.google.com/p/chromium/issues/detail?id=446975 -[2]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURI \ No newline at end of file diff --git a/sources/talk/20150320 Revealed--The best and worst of Docker.md b/sources/talk/20150320 Revealed--The best and worst of Docker.md deleted file mode 100644 index 1e188d6cba..0000000000 --- a/sources/talk/20150320 Revealed--The best and worst of Docker.md +++ /dev/null @@ -1,66 +0,0 @@ -Revealed: The best and worst of Docker -================================================================================ -![](http://images.techhive.com/images/article/2015/01/best_worst_places_to_work-100564193-primary.idge.jpg) -Credit: [Shutterstock][1] - -> Docker experts talk about the good, the bad, and the ugly of the ubiquitous application container system - -No question about it: Docker's app container system has made its mark and become a staple in many IT environments. With its accelerating adoption, it's bound to stick around for a good long time. - -But there's no end to the debate about what Docker's best for, where it falls short, or how to most sensibly move it forward without alienating its existing users or damaging its utility. Here, we've turned to a few of the folks who have made Docker their business to get their takes on Docker's good, bad, and ugly sides. - -### The good ### - -One hardly expects Steve Francia, chief of operations of the Docker open source project, to speak of Docker in anything less than glowing terms. When asked by email about Docker's best attributes, he didn't disappoint: "I think the best thing about Docker is that it enables people, enables developers, enables users to very easily run an application anywhere," he said. "It's almost like the Holy Grail of development in that you can run an application on your desktop, and the exact same application without any changes can run on the server. That's never been done before." - -Alexis Richardson of [Weaveworks][2], a virtual networking product, praised Docker for enabling simplicity. "Docker offers immense potential to radically simplify and speed up how software gets built," he replied in an email. "This is why it has delivered record-breaking initial mind share and traction." - -Bob Quillin, CEO of [StackEngine][3], which makes Docker management and automation solutions, noted in an email that Docker (the company) has done a fine job of maintaining Docker's (the product) appeal to its audience. "Docker has been best at delivering strong developer support and focused investment in its product," he wrote. "Clearly, they know they have to keep the momentum, and they are doing that by putting intense effort into product functionality." He also mentioned that Docker's commitment to open source has accelerated adoption by "[allowing] people to build around their features as they are being built." - -Though containerization itself isn't new, as Rob Markovich of IT monitoring-service makers [Moogsoft][4] pointed out, Docker's implementation makes it new. "Docker is considered a next-generation virtualization technology given its more modern, lightweight form [of containerization]," he wrote in an email. "[It] brings an opportunity for an order-of-magnitude leap forward for software development teams seeking to deploy code faster." - -### The bad ### - -What's less appealing about Docker boils down to two issues: the complexity of using the product, and the direction of the company behind it. - -Samir Ghosh, CEO of enterprise PaaS outfit [WaveMaker][5], gave Docker a thumbs-up for simplifying the complex scripting typically needed for continuous delivery. That said, he added, "That doesn't mean Docker is simple. Implementing Docker is complicated. There are a lot of supporting technologies needed for things like container management, orchestration, app stack packaging, intercontainer networking, data snapshots, and so on." - -Ghosh noted the ones who feel the most of that pain are enterprises that want to leverage Docker for continuous delivery, but "it's even more complicated for enterprises that have diverse workloads, various app stacks, heterogenous infrastructures, and limited resources, not to mention unique IT needs for visibility, control and security." - -Complexity also becomes an issue in troubleshooting and analysis, and Markovich cited the fact that Docker provides application abstraction as the reason why. "It is nearly impossible to relate problems with application performance running on Docker to the performance of the underlying infrastructure domains," he said in an email. "IT teams are going to need visibility -- a new class of monitoring and analysis tools that can correlate across and relate how everything is working up and down the Docker stack, from the applications down to the private or public infrastructure." - -Quillin is most concerned about Docker's direction vis-à-vis its partner community: "Where will Docker make money, and where will their partners? If [Docker] wants to be the next VMware, it will need to take a page out of VMware's playbook in how to build and support a thriving partner ecosystem. - -"Additionally, to drive broader adoption, especially in the enterprise, Docker needs to start acting like a market leader by releasing more fully formed capabilities that organizations can count on, versus announcements of features with 'some assembly required,' that don't exist yet, or that require you to 'submit a pull request' to fix it yourself." - -Francia pointed to Docker's rapid ascent for creating its own difficulties. "[Docker] caught on so quickly that there's definitely places that we're focused on to add some features that a lot of users are looking forward to." - -One such feature, he noted, was having a GUI. "Right now to use Docker," he said, "you have to be comfortable with the command line. There's no visual interface to using Docker. Right now it's all command line-based. And we know if we want to really be as successful as we think we can be, we need to be more approachable and a lot of people when they see a command line, it's a bit intimidating for a lot of users." - -### The future ### - -In that last respect, Docker recently started to make advances. Last week it [bought the startup Kitematic][6], whose product gave Docker a convenient GUI on Mac OS X (and will eventually do the same for Windows). Another acqui-hire, [SocketPlane][7], is being spun in to work on Docker's networking. - -What remains to be seen is whether Docker's proposed solutions to its problems will be adopted, or whether another party -- say, [Red Hat][8] -- will provide a more immediately useful solution for enterprise customers who can't wait around for the chips to stop falling. - -"Good technology is hard and takes time to build," said Richardson. "The big risk is that expectations spin wildly out of control and customers are disappointed." - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2896895/application-virtualization/best-and-worst-about-docker.html - -作者:[Serdar Yegulalp][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Serdar-Yegulalp/ -[1]:http://shutterstock.com/ -[2]:http://weave.works/ -[3]:http://stackengine.com/ -[4]:http://www.moogsoft.com/ -[5]:http://www.wavemaker.com/ -[6]:http://www.infoworld.com/article/2896099/application-virtualization/dockers-new-acquisition-does-containers-on-the-desktop.html -[7]:http://www.infoworld.com/article/2892916/application-virtualization/docker-snaps-up-socketplane-to-fix-networking-flaws.html -[8]:http://www.infoworld.com/article/2895804/application-virtualization/red-hat-wants-to-do-for-containers-what-its-done-for-linux.html \ No newline at end of file diff --git a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md index 7eeb33676b..b67f5aee26 100644 --- a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md +++ b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md @@ -1,4 +1,3 @@ -2q1w2007申领 How to access a Linux server behind NAT via reverse SSH tunnel ================================================================================ You are running a Linux server at home, which is behind a NAT router or restrictive firewall. Now you want to SSH to the home server while you are away from home. How would you set that up? SSH port forwarding will certainly be an option. However, port forwarding can become tricky if you are dealing with multiple nested NAT environment. Besides, it can be interfered with under various ISP-specific conditions, such as restrictive ISP firewalls which block forwarded ports, or carrier-grade NAT which shares IPv4 addresses among users. diff --git a/sources/tech/20150522 Analyzing Linux Logs.md b/sources/tech/20150522 Analyzing Linux Logs.md index 38d5b4636e..aebc28deae 100644 --- a/sources/tech/20150522 Analyzing Linux Logs.md +++ b/sources/tech/20150522 Analyzing Linux Logs.md @@ -1,4 +1,3 @@ -translating by zhangboyue Analyzing Linux Logs ================================================================================ There’s a great deal of information waiting for you within your logs, although it’s not always as easy as you’d like to extract it. In this section we will cover some examples of basic analysis you can do with your logs right away (just search what’s there). We’ll also cover more advanced analysis that may take some upfront effort to set up properly, but will save you time on the back end. Examples of advanced analysis you can do on parsed data include generating summary counts, filtering on field values, and more. diff --git a/sources/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md b/sources/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md deleted file mode 100644 index ca51791986..0000000000 --- a/sources/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md +++ /dev/null @@ -1,209 +0,0 @@ -translating by wwy-hust - -Nishita Agarwal Shares Her Interview Experience on Linux ‘iptables’ Firewall -================================================================================ -Nishita Agarwal, a frequent Tecmint Visitor shared her experience (Question and Answer) with us regarding the job interview she had just given in a privately owned hosting company in Pune, India. She was asked a lot of questions on a variety of topics however she is an expert in iptables and she wanted to share those questions and their answer (she gave) related to iptables to others who may be going to give interview in near future. - -![Linux Firewall Iptables Interview Questions](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-iptables-Interview-Questions.jpg) - -All the questions and their Answer are rewritten based upon the memory of Nishita Agarwal. - -> “Hello Friends! My name is **Nishita Agarwal**. I have Pursued Bachelor Degree in Technology. My area of Specialization is UNIX and Variants of UNIX (BSD, Linux) fascinates me since the time I heard it. I have 1+ years of experience in storage. I was looking for a job change which ended with a hosting company in Pune, India.” - -Here is the collection of what I was asked during the Interview. I’ve documented only those questions and their answer that were related to iptables based upon my memory. Hope this will help you in cracking your Interview. - -### 1. Have you heard of iptables and firewall in Linux? Any idea of what they are and for what it is used? ### - -> **Answer** : I’ve been using iptables for quite long time and I am aware of both iptables and firewall. Iptables is an application program mostly written in C Programming Language and is released under GNU General Public License. Written for System administration point of view, the latest stable release if iptables 1.4.21.iptables may be considered as firewall for UNIX like operating system which can be called as iptables/netfilter, more accurately. The Administrator interact with iptables via console/GUI front end tools to add and define firewall rules into predefined tables. Netfilter is a module built inside of kernel that do the job of filtering. -> -> Firewalld is the latest implementation of filtering rules in RHEL/CentOS 7 (may be implemented in other distributions which I may not be aware of). It has replaced iptables interface and connects to netfilter. - -### 2. Have you used some kind of GUI based front end tool for iptables or the Linux Command Line? ### - -> **Answer** : Though I have used both the GUI based front end tools for iptables like Shorewall in conjugation of [Webmin][1] in GUI and Direct access to iptables via console.And I must admit that direct access to iptables via Linux console gives a user immense power in the form of higher degree of flexibility and better understanding of what is going on in the background, if not anything other. GUI is for novice administrator while console is for experienced. - -### 3. What are the basic differences between between iptables and firewalld? ### - -> **Answer** : iptables and firewalld serves the same purpose (Packet Filtering) but with different approach. iptables flush the entire rules set each time a change is made unlike firewalld. Typically the location of iptables configuration lies at ‘/etc/sysconfig/iptables‘ whereas firewalld configuration lies at ‘/etc/firewalld/‘, which is a set of XML files.Configuring a XML based firewalld is easier as compared to configuration of iptables, however same task can be achieved using both the packet filtering application ie., iptables and firewalld. Firewalld runs iptables under its hood along with it’s own command line interface and configuration file that is XML based and said above. - -### 4. Would you replace iptables with firewalld on all your servers, if given a chance? ### - -> **Answer** : I am familiar with iptables and it’s working and if there is nothing that requires dynamic aspect of firewalld, there seems no reason to migrate all my configuration from iptables to firewalld.In most of the cases, so far I have never seen iptables creating an issue. Also the general rule of Information technology says “why fix if it is not broken”. However this is my personal thought and I would never mind implementing firewalld if the Organization is going to replace iptables with firewalld. - -### 5. You seems confident with iptables and the plus point is even we are using iptables on our server. ### - -What are the tables used in iptables? Give a brief description of the tables used in iptables and the chains they support. - -> **Answer** : Thanks for the recognition. Moving to question part, There are four tables used in iptables, namely they are: -> -> Nat Table -> Mangle Table -> Filter Table -> Raw Table -> -> Nat Table : Nat table is primarily used for Network Address Translation. Masqueraded packets get their IP address altered as per the rules in the table. Packets in the stream traverse Nat Table only once. ie., If a packet from a jet of Packets is masqueraded they rest of the packages in the stream will not traverse through this table again. It is recommended not to filter in this table. Chains Supported by NAT Table are PREROUTING Chain, POSTROUTING Chain and OUTPUT Chain. -> -> Mangle Table : As the name suggests, this table serves for mangling the packets. It is used for Special package alteration. It can be used to alter the content of different packets and their headers. Mangle table can’t be used for Masquerading. Supported chains are PREROUTING Chain, OUTPUT Chain, Forward Chain, INPUT Chain, POSTROUTING Chain. -> -> Filter Table : Filter Table is the default table used in iptables. It is used for filtering Packets. If no rules are defined, Filter Table is taken as default table and filtering is done on the basis of this table. Supported Chains are INPUT Chain, OUTPUT Chain, FORWARD Chain. -> -> Raw Table : Raw table comes into action when we want to configure packages that were exempted earlier. It supports PREROUTING Chain and OUTPUT Chain. - -### 6. What are the target values (that can be specified in target) in iptables and what they do, be brief! ### - -> **Answer** : Following are the target values that we can specify in target in iptables: -> -> ACCEPT : Accept Packets -> QUEUE : Paas Package to user space (place where application and drivers reside) -> DROP : Drop Packets -> RETURN : Return Control to calling chain and stop executing next set of rules for the current Packets in the chain. - - -### 7. Lets move to the technical aspects of iptables, by technical I means practical. ### - -How will you Check iptables rpm that is required to install iptables in CentOS?. - -> **Answer** : iptables rpm are included in standard CentOS installation and we do not need to install it separately. We can check the rpm as: -> -> # rpm -qa iptables -> -> iptables-1.4.21-13.el7.x86_64 -> -> If you need to install it, you may do yum to get it. -> -> # yum install iptables-services - -### 8. How to Check and ensure if iptables service is running? ### - -> **Answer** : To check the status of iptables, you may run the following command on the terminal. -> -> # service status iptables [On CentOS 6/5] -> # systemctl status iptables [On CentOS 7] -> -> If it is not running, the below command may be executed. -> -> ---------------- On CentOS 6/5 ---------------- -> # chkconfig --level 35 iptables on -> # service iptables start -> -> ---------------- On CentOS 7 ---------------- -> # systemctl enable iptables -> # systemctl start iptables -> -> We may also check if the iptables module is loaded or not, as: -> -> # lsmod | grep ip_tables - -### 9. How will you review the current Rules defined in iptables? ### - -> **Answer** : The current rules in iptables can be review as simple as: -> -> # iptables -L -> -> Sample Output -> -> Chain INPUT (policy ACCEPT) -> target prot opt source destination -> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED -> ACCEPT icmp -- anywhere anywhere -> ACCEPT all -- anywhere anywhere -> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> -> Chain FORWARD (policy ACCEPT) -> target prot opt source destination -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> -> Chain OUTPUT (policy ACCEPT) -> target prot opt source destination - -### 10. How will you flush all iptables rules or a particular chain? ### - -> **Answer** : To flush a particular iptables chain, you may use following commands. -> -> -> # iptables --flush OUTPUT -> -> To Flush all the iptables rules. -> -> # iptables --flush - -### 11. Add a rule in iptables to accept packets from a trusted IP Address (say 192.168.0.7) ### - -> **Answer** : The above scenario can be achieved simply by running the below command. -> -> # iptables -A INPUT -s 192.168.0.7 -j ACCEPT -> -> We may include standard slash or subnet mask in the source as: -> -> # iptables -A INPUT -s 192.168.0.7/24 -j ACCEPT -> # iptables -A INPUT -s 192.168.0.7/255.255.255.0 -j ACCEPT - -### 12. How to add rules to ACCEPT, REJECT, DENY and DROP ssh service in iptables. ### - -> **Answer** : Hoping ssh is running on port 22, which is also the default port for ssh, we can add rule to iptables as:To ACCEPT tcp packets for ssh service (port 22). -> -> # iptables -A INPUT -s -p tcp - -dport -j ACCEPT -> -> To REJECT tcp packets for ssh service (port 22). -> -> # iptables -A INPUT -s -p tcp - -dport -j REJECT -> -> To DENY tcp packets for ssh service (port 22). -> -> -> # iptables -A INPUT -s -p tcp - -dport -j DENY -> -> To DROP tcp packets for ssh service (port 22). -> -> -> # iptables -A INPUT -s -p tcp - -dport -j DROP - -### 13. Let me give you a scenario. Say there is a machine the local ip address of which is 192.168.0.6. You need to block connections on port 21, 22, 23, and 80 to your machine. What will you do? ### - -> **Answer** : Well all I need to use is the ‘multiport‘ option with iptables followed by port numbers to be blocked and the above scenario can be achieved in a single go as. -> -> # iptables -A INPUT -s 192.168.0.6 -p tcp -m multiport --dport 22,23,80,8080 -j DROP -> -> The written rules can be checked using the below command. -> -> # iptables -L -> -> Chain INPUT (policy ACCEPT) -> target prot opt source destination -> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED -> ACCEPT icmp -- anywhere anywhere -> ACCEPT all -- anywhere anywhere -> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> DROP tcp -- 192.168.0.6 anywhere multiport dports ssh,telnet,http,webcache -> -> Chain FORWARD (policy ACCEPT) -> target prot opt source destination -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> -> Chain OUTPUT (policy ACCEPT) -> target prot opt source destination - -**Interviewer** : That’s all I wanted to ask. You are a valuable employee we won’t like to miss. I will recommend your name to the HR. If you have any question you may ask me. - -As a candidate I don’t wanted to kill the conversation hence keep asking about the projects I would be handling if selected and what are the other openings in the company. Not to mention HR round was not difficult to crack and I got the opportunity. - -Also I would like to thank Avishek and Ravi (whom I am a friend since long) for taking the time to document my interview. - -Friends! If you had given any such interview and you would like to share your interview experience to millions of Tecmint readers around the globe? then send your questions and answers to admin@tecmint.com. - -Thank you! Keep Connected. Also let me know if I could have answered a question more correctly than what I did. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-firewall-iptables-interview-questions-and-answers/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/install-webmin-web-based-system-administration-tool-for-rhel-centos-fedora/ From f70052ce39a0a68d2b265f29c5901294130447fd Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 28 Jul 2015 22:10:15 +0800 Subject: [PATCH 1523/2517] PUB:20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux @martin2011qi --- ...ne editing is supported GRUB Error In Linux.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) rename {translated/tech => published}/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md (83%) diff --git a/translated/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md b/published/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md similarity index 83% rename from translated/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md rename to published/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md index 4edaa333d8..66ab15e999 100644 --- a/translated/tech/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md +++ b/published/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md @@ -1,8 +1,11 @@ -修复Linux中的提供最小化类BASH命令行编辑GRUB错误 +修复Linux中的“提供类似行编辑的袖珍BASH...”的GRUB错误 ================================================================================ + 这两天我[安装了Elementary OS和Windows双系统][1],在启动的时候遇到了一个Grub错误。命令行中呈现如下信息: -**提供最小化类BASH命令行编辑。对于第一个词,TAB键补全可以使用的命令。除此之外,TAB键补全可用的设备或文件。** +**Minimal BASH like line editing is supported. For the first word, TAB lists possible command completions. anywhere else TAB lists possible device or file completions.** + +**提供类似行编辑的袖珍 BASH。TAB键补全第一个词,列出可以使用的命令。除此之外,TAB键补全可以列出可用的设备或文件。** ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/Boot_Repair_Ubuntu_Linux_1.jpeg) @@ -10,7 +13,7 @@ 通过这篇文章里我们可以学到基于Linux系统**如何修复Ubuntu中出现的“minimal BASH like line editing is supported” Grub错误**。 -> 你可以参阅这篇教程来修复类似的高频问题,[错误:分区未找到Linux grub救援模式][3]。 +> 你可以参阅这篇教程来修复类似的常见问题,[错误:分区未找到Linux grub救援模式][3]。 ### 先决条件 ### @@ -19,11 +22,11 @@ - 一个包含相同版本、相同OS的LiveUSB或磁盘 - 当前会话的Internet连接正常工作 -在确认了你拥有先决条件了之后,让我们看看如何修复Linux的死亡黑屏(如果我可以这样的称呼它的话;))。 +在确认了你拥有先决条件了之后,让我们看看如何修复Linux的死亡黑屏(如果我可以这样的称呼它的话 ;) )。 ### 如何在基于Ubuntu的Linux中修复“minimal BASH like line editing is supported” Grub错误 ### -我知道你一定疑问这种Grub错误并不局限于在基于Ubuntu的Linux发行版上发生,那为什么我要强调在基于Ubuntu的发行版上呢?原因是,在这里我们将采用一个简单的方法并叫作**Boot Repair**的工具来修复我们的问题。我并不确定在其他的诸如Fedora的发行版中是否有这个工具可用。不再浪费时间,我们来看如何修复minimal BASH like line editing is supported Grub错误。 +我知道你一定疑问这种Grub错误并不局限于在基于Ubuntu的Linux发行版上发生,那为什么我要强调在基于Ubuntu的发行版上呢?原因是,在这里我们将采用一个简单的方法,用个叫做**Boot Repair**的工具来修复我们的问题。我并不确定在其他的诸如Fedora的发行版中是否有这个工具可用。不再浪费时间,我们来看如何修复“minimal BASH like line editing is supported” Grub错误。 ### 步骤 1: 引导进入lives会话 ### @@ -75,7 +78,7 @@ via: http://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux 作者:[Abhishek][a] 译者:[martin2011qi](https://github.com/martin2011qi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 62e6cbbd139246c280b1e4dc5c1c314606481265 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 28 Jul 2015 22:27:26 +0800 Subject: [PATCH 1524/2517] [Translating] sources/tech/20150522 Analyzing Linux Logs.md --- sources/tech/20150522 Analyzing Linux Logs.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150522 Analyzing Linux Logs.md b/sources/tech/20150522 Analyzing Linux Logs.md index aebc28deae..832ea369ec 100644 --- a/sources/tech/20150522 Analyzing Linux Logs.md +++ b/sources/tech/20150522 Analyzing Linux Logs.md @@ -1,3 +1,4 @@ +ictlyh Translating Analyzing Linux Logs ================================================================================ There’s a great deal of information waiting for you within your logs, although it’s not always as easy as you’d like to extract it. In this section we will cover some examples of basic analysis you can do with your logs right away (just search what’s there). We’ll also cover more advanced analysis that may take some upfront effort to set up properly, but will save you time on the back end. Examples of advanced analysis you can do on parsed data include generating summary counts, filtering on field values, and more. From 7634a479357b9e584bb6dc8fe30d6b8b7bfa77b3 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 29 Jul 2015 00:03:39 +0800 Subject: [PATCH 1525/2517] PUB:20150616 LINUX 101--POWER UP YOUR SHELL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc 辛苦啦。 --- ...20150616 LINUX 101--POWER UP YOUR SHELL.md | 177 ++++++++++++++++++ ...20150616 LINUX 101--POWER UP YOUR SHELL.md | 177 ------------------ 2 files changed, 177 insertions(+), 177 deletions(-) create mode 100644 published/20150616 LINUX 101--POWER UP YOUR SHELL.md delete mode 100644 translated/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md diff --git a/published/20150616 LINUX 101--POWER UP YOUR SHELL.md b/published/20150616 LINUX 101--POWER UP YOUR SHELL.md new file mode 100644 index 0000000000..dd7b985b01 --- /dev/null +++ b/published/20150616 LINUX 101--POWER UP YOUR SHELL.md @@ -0,0 +1,177 @@ +LINUX 101: 让你的 SHELL 更强大 +================================================================================ +> 在我们的关于 shell 基础的指导下, 得到一个更灵活,功能更强大且多彩的命令行界面 + +**为何要这样做?** + +- 使得在 shell 提示符下过得更轻松,高效 +- 在失去连接后恢复先前的会话 +- Stop pushing around that fiddly rodent! + +![bash1](http://www.linuxvoice.com/wp-content/uploads/2015/02/bash1-large15.png) + +这是我的命令行提示符的设置。对于这个小的终端窗口来说,这或许有些长。但你可以根据你的喜好来调整它。 + +作为一个 Linux 用户, 你可能熟悉 shell (又名为命令行)。 或许你需要时不时的打开终端来完成那些不能在 GUI 下处理的必要任务,抑或是因为你处在一个将窗口铺满桌面的环境中,而 shell 是你与你的 linux 机器交互的主要方式。 + +在上面那些情况下,你可能正在使用你所使用的发行版本自带的 Bash 配置。 尽管对于大多数的任务而言,它足够好了,但它可以更加强大。 在本教程中,我们将向你展示如何使得你的 shell 提供更多有用信息、更加实用且更适合工作。 我们将对提示符进行自定义,让它比默认情况下提供更好的反馈,并向你展示如何使用炫酷的 `tmux` 工具来管理会话并同时运行多个程序。 并且,为了让眼睛舒服一点,我们还将关注配色方案。那么,进击吧,少女! + +### 让提示符更美妙 ### + +大多数的发行版本配置有一个非常简单的提示符,它们大多向你展示了一些基本信息, 但提示符可以为你提供更多的内容。例如,在 Debian 7 下,默认的提示符是这样的: + + mike@somebox:~$ + +上面的提示符展示出了用户、主机名、当前目录和账户类型符号(假如你切换到 root 账户, **$** 会变为 **#**)。 那这些信息是在哪里存储的呢? 答案是:在 **PS1** 环境变量中。 假如你键入 `echo $PS1`, 你将会在这个命令的输出字符串的最后有如下的字符: + + \u@\h:\w$ + +这看起来有一些丑陋,并在瞥见它的第一眼时,你可能会开始尖叫,认为它是令人恐惧的正则表达式,但我们不打算用这些复杂的字符来煎熬我们的大脑。这不是正则表达式,这里的斜杠是转义序列,它告诉提示符进行一些特别的处理。 例如,上面的 **u** 部分,告诉提示符展示用户名, 而 w 则展示工作路径. + +下面是一些你可以在提示符中用到的字符的列表: + +- d 当前的日期 +- h 主机名 +- n 代表换行的字符 +- A 当前的时间 (HH:MM) +- u 当前的用户 +- w (小写) 整个工作路径的全称 +- W (大写) 工作路径的简短名称 +- $ 一个提示符号,对于 root 用户为 # 号 +- ! 当前命令在 shell 历史记录中的序号 + +下面解释 **w** 和 **W** 选项的区别: 对于前者,你将看到你所在的工作路径的完整地址,(例如 **/usr/local/bin**),而对于后者, 它则只显示 **bin** 这一部分。 + +现在,我们该怎样改变提示符呢? 你需要更改 **PS1** 环境变量的内容,试试下面这个: + + export PS1="I am \u and it is \A $" + +现在,你的提示符将会像下面这样: + + I am mike and it is 11:26 $ + +从这个例子出发,你就可以按照你的想法来试验一下上面列出的其他转义序列。 但等等 – 当你登出后,你的这些努力都将消失,因为在你每次打开终端时,**PS1** 环境变量的值都会被重置。解决这个问题的最简单方式是打开 **.bashrc** 配置文件(在你的家目录下) 并在这个文件的最下方添加上完整的 `export` 命令。在每次你启动一个新的 shell 会话时,这个 **.bashrc** 会被 `Bash` 读取, 所以你的加强的提示符就可以一直出现。你还可以使用额外的颜色来装扮提示符。刚开始,这将有点棘手,因为你必须使用一些相当奇怪的转义序列,但结果是非常漂亮的。 将下面的字符添加到你的 **PS1**字符串中的某个位置,最终这将把文本变为红色: + + \[\e[31m\] + +你可以将这里的 31 更改为其他的数字来获得不同的颜色: + +- 30 黑色 +- 32 绿色 +- 33 黄色 +- 34 蓝色 +- 35 洋红色 +- 36 青色 +- 37 白色 + +所以,让我们使用先前看到的转义序列和颜色来创造一个提示符,以此来结束这一小节的内容。深吸一口气,弯曲你的手指,然后键入下面这只“野兽”: + + export PS1="(\!) \[\e[31m\] \[\A\] \[\e[32m\]\u@\h \[\e[34m\]\w \[\e[30m\]$" + +上面的命令提供了一个 Bash 命令历史序号、当前的时间、彩色的用户或主机名组合、以及工作路径。假如你“野心勃勃”,利用一些惊人的组合,你还可以更改提示符的背景色和前景色。非常有用的 Arch wiki 有一个关于颜色代码的完整列表:[http://tinyurl.com/3gvz4ec][1]。 + +> **Shell 精要** +> +> 假如你是一个彻底的 Linux 新手并第一次阅读这份杂志,或许你会发觉阅读这些教程有些吃力。 所以这里有一些基础知识来让你熟悉一些 shell。 通常在你的菜单中, shell 指的是 Terminal、 XTerm 或 Konsole, 当你启动它后, 最为实用的命令有这些: +> +> **ls** (列出文件名); **cp one.txt two.txt** (复制文件); **rm file.txt** (移除文件); **mv old.txt new.txt** (移动或重命名文件); +> +> **cd /some/directory** (改变目录); **cd ..** (回到上级目录); **./program** (在当前目录下运行一个程序); **ls > list.txt** (重定向输出到一个文件)。 +> +> 几乎每个命令都有一个手册页用来解释其选项(例如 **man ls** – 按 Q 来退出)。在那里,你可以知晓命令的选项,这样你就知道 **ls -la** 展示一个详细的列表,其中也列出了隐藏文件, 并且在键入一个文件或目录的名字的一部分后, 可以使用 Tab 键来自动补全。 + +### Tmux: 针对 shell 的窗口管理器 ### + +在文本模式的环境中使用一个窗口管理器 – 这听起来有点不可思议, 是吧? 然而,你应该记得当 Web 浏览器第一次实现分页浏览的时候吧? 在当时, 这是在可用性上的一个重大进步,它减少了桌面任务栏的杂乱无章和繁多的窗口列表。 对于你的浏览器来说,你只需要一个按钮便可以在浏览器中切换到你打开的每个单独网站, 而不是针对每个网站都有一个任务栏或导航图标。 这个功能非常有意义。 + +若有时你同时运行着几个虚拟终端,你便会遇到相似的情况; 在这些终端之间跳转,或每次在任务栏或窗口列表中找到你所需要的那一个终端,都可能会让你觉得麻烦。 拥有一个文本模式的窗口管理器不仅可以让你像在同一个终端窗口中运行多个 shell 会话,而且你甚至还可以将这些窗口排列在一起。 + +另外,这样还有另一个好处:可以将这些窗口进行分离和重新连接。想要看看这是如何运行的最好方式是自己尝试一下。在一个终端窗口中,输入 `screen` (在大多数发行版本中,它已经默认安装了或者可以在软件包仓库中找到)。 某些欢迎的文字将会出现 – 只需敲击 Enter 键这些文字就会消失。 现在运行一个交互式的文本模式的程序,例如 `nano`, 并关闭这个终端窗口。 + +在一个正常的 shell 对话中, 关闭窗口将会终止所有在该终端中运行的进程 – 所以刚才的 Nano 编辑对话也就被终止了, 但对于 screen 来说,并不是这样的。打开一个新的终端并输入如下命令: + + screen -r + +瞧,你刚开打开的 Nano 会话又回来了! + +当刚才你运行 **screen** 时, 它会创建了一个新的独立的 shell 会话, 它不与某个特定的终端窗口绑定在一起,所以可以在后面被分离并重新连接(即 **-r** 选项)。 + +当你正使用 SSH 去连接另一台机器并做着某些工作时, 但并不想因为一个脆弱的连接而影响你的进度,这个方法尤其有用。假如你在一个 **screen** 会话中做着某些工作,并且你的连接突然中断了(或者你的笔记本没电了,又或者你的电脑报废了——不是这么悲催吧),你只需重新连接或给电脑充电或重新买一台电脑,接着运行 **screen -r** 来重新连接到远程的电脑,并在刚才掉线的地方接着开始。 + +现在,我们都一直在讨论 GNU 的 **screen**,但这个小节的标题提到的是 tmux。 实质上, **tmux** (terminal multiplexer) 就像是 **screen** 的一个进阶版本,带有许多有用的额外功能,所以现在我们开始关注 tmux。 某些发行版本默认包含了 **tmux**; 在其他的发行版本上,通常只需要一个 **apt-get、 yum install** 或 **pacman -S** 命令便可以安装它。 + +一旦你安装了它过后,键入 **tmux** 来启动它。接着你将注意到,在终端窗口的底部有一条绿色的信息栏,它非常像传统的窗口管理器中的任务栏: 上面显示着一个运行着的程序的列表、机器的主机名、当前时间和日期。 现在运行一个程序,同样以 Nano 为例, 敲击 Ctrl+B 后接着按 C 键, 这将在 tmux 会话中创建一个新的窗口,你便可以在终端的底部的任务栏中看到如下的信息: + + 0:nano- 1:bash* + +每一个窗口都有一个数字,当前呈现的程序被一个星号所标记。 Ctrl+B 是与 tmux 交互的标准方式, 所以若你敲击这个按键组合并带上一个窗口序号, 那么就会切换到对应的那个窗口。你也可以使用 Ctrl+B 再加上 N 或 P 来分别切换到下一个或上一个窗口 – 或者使用 Ctrl+B 加上 L 来在最近使用的两个窗口之间来进行切换(有点类似于桌面中的经典的 Alt+Tab 组合键的效果)。 若需要知道窗口列表,使用 Ctrl+B 再加上 W。 + +目前为止,一切都还好:现在你可以在一个单独的终端窗口中运行多个程序,避免混乱(尤其是当你经常与同一个远程主机保持多个 SSH 连接时)。 当想同时看两个程序又该怎么办呢? + +针对这种情况, 可以使用 tmux 中的窗格。 敲击 Ctrl+B 再加上 % , 则当前窗口将分为两个部分:一个在左一个在右。你可以使用 Ctrl+B 再加上 O 来在这两个部分之间切换。 这尤其在你想同时看两个东西时非常实用, – 例如一个窗格看指导手册,另一个窗格里用编辑器看一个配置文件。 + +有时,你想对一个单独的窗格进行缩放,而这需要一定的技巧。 首先你需要敲击 Ctrl+B 再加上一个 :(冒号),这将使得位于底部的 tmux 栏变为深橙色。 现在,你进入了命令模式,在这里你可以输入命令来操作 tmux。 输入 **resize-pane -R** 来使当前窗格向右移动一个字符的间距, 或使用 **-L** 来向左移动。 对于一个简单的操作,这些命令似乎有些长,但请注意,在 tmux 的命令模式(前面提到的一个分号开始的模式)下,可以使用 Tab 键来补全命令。 另外需要提及的是, **tmux** 同样也有一个命令历史记录,所以若你想重复刚才的缩放操作,可以先敲击 Ctrl+B 再跟上一个分号,并使用向上的箭头来取回刚才输入的命令。 + +最后,让我们看一下分离和重新连接 - 即我们刚才介绍的 screen 的特色功能。 在 tmux 中,敲击 Ctrl+B 再加上 D 来从当前的终端窗口中分离当前的 tmux 会话。这使得这个会话的一切工作都在后台中运行、使用 `tmux a` 可以再重新连接到刚才的会话。但若你同时有多个 tmux 会话在运行时,又该怎么办呢? 我们可以使用下面的命令来列出它们: + + tmux ls + +这个命令将为每个会话分配一个序号; 假如你想重新连接到会话 1, 可以使用 `tmux a -t 1`. tmux 是可以高度定制的,你可以自定义按键绑定并更改配色方案, 所以一旦你适应了它的主要功能,请钻研指导手册以了解更多的内容。 + + +![tmux](http://www.linuxvoice.com/wp-content/uploads/2015/02/tmux-large13.jpg) + +上图中, tmux 开启了两个窗格: 左边是 Vim 正在编辑一个配置文件,而右边则展示着指导手册页。 + +> **Zsh: 另一个 shell** +> +> 选择是好的,但标准同样重要。 你要知道几乎每个主流的 Linux 发行版本都默认使用 Bash shell – 尽管还存在其他的 shell。 Bash 为你提供了一个 shell 能够给你提供的几乎任何功能,包括命令历史记录,文件名补全和许多脚本编程的能力。它成熟、可靠并文档丰富 – 但它不是你唯一的选择。 +> +> 许多高级用户热衷于 Zsh, 即 Z shell。 这是 Bash 的一个替代品并提供了 Bash 的几乎所有功能,另外还提供了一些额外的功能。 例如, 在 Zsh 中,你输入 **ls** ,并敲击 Tab 键可以得到 **ls** 可用的各种不同选项的一个大致描述。 而不需要再打开 man page 了! +> +> Zsh 还支持其他强大的自动补全功能: 例如,输入 **cd /u/lo/bi** 再敲击 Tab 键, 则完整的路径名 **/usr/local/bin** 就会出现(这里假设没有其他的路径包含 **u**, **lo** 和 **bi** 等字符)。 或者只输入 **cd** 再跟上 Tab 键,则你将看到着色后的路径名的列表 – 这比 Bash 给出的简单的结果好看得多。 +> +> Zsh 在大多数的主要发行版本上都可以得到了; 安装它后并输入 **zsh** 便可启动它。 要将你的默认 shell 从 Bash 改为 Zsh, 可以使用 **chsh** 命令。 若需了解更多的信息,请访问 [www.zsh.org][2]。 + +### “未来”的终端 ### + +你或许会好奇为什么包含你的命令行提示符的应用被叫做终端。 这需要追溯到 Unix 的早期, 那时人们一般工作在一个多用户的机器上,这个巨大的电脑主机将占据一座建筑中的一个房间, 人们通过某些线路,使用屏幕和键盘来连接到这个主机, 这些终端机通常被称为“哑终端”, 因为它们不能靠自己做任何重要的执行任务 – 它们只展示通过线路从主机传来的信息,并输送回从键盘的敲击中得到的输入信息。 + +今天,我们在自己的机器上执行几乎所有的实际操作,所以我们的电脑不是传统意义下的终端,这就是为什么诸如 **XTerm**、 Gnome Terminal、 Konsole 等程序被称为“终端模拟器” 的原因 – 他们提供了同昔日的物理终端一样的功能。事实上,在许多方面它们并没有改变多少。诚然,现在我们有了反锯齿字体,更好的颜色和点击网址的能力,但总的来说,几十年来我们一直以同样的方式在工作。 + +所以某些程序员正尝试改变这个状况。 **Terminology** ([http://tinyurl.com/osopjv9][3]), 它来自于超级时髦的 Enlightenment 窗口管理器背后的团队,旨在让终端步入到 21 世纪,例如带有在线媒体显示功能。你可以在一个充满图片的目录里输入 **ls** 命令,便可以看到它们的缩略图,或甚至可以直接在你的终端里播放视频。 这使得一个终端有点类似于一个文件管理器,意味着你可以快速地检查媒体文件的内容而不必用另一个应用来打开它们。 + +接着还有 Xiki ([www.xiki.org][4]),它自身的描述为“命令的革新”。它就像是一个传统的 shell、一个 GUI 和一个 wiki 之间的过渡;你可以在任何地方输入命令,并在后面将它们的输出存储为笔记以作为参考,并可以创建非常强大的自定义命令。用几句话是很能描述它的,所以作者们已经创作了一个视频来展示它的潜力是多么的巨大(请看 **Xiki** 网站的截屏视频部分)。 + +并且 Xiki 绝不是那种在几个月之内就消亡的昙花一现的项目,作者们成功地进行了一次 Kickstarter 众筹,在七月底已募集到超过 $84,000。 是的,你没有看错 – $84K 来支持一个终端模拟器。这可能是最不寻常的集资活动了,因为某些疯狂的家伙已经决定开始创办它们自己的 Linux 杂志 ...... + +### 下一代终端 ### + +许多命令行和基于文本的程序在功能上与它们的 GUI 程序是相同的,并且常常更加快速和高效。我们的推荐有: +**Irssi** (IRC 客户端); **Mutt** (mail 客户端); **rTorrent** (BitTorrent); **Ranger** (文件管理器); **htop** (进程监视器)。 若给定在终端的限制下来进行 Web 浏览, Elinks 确实做的很好,并且对于阅读那些以文字为主的网站例如 Wikipedia 来说。它非常实用。 + +> **微调配色方案** +> +> 在《Linux Voice》杂志社中,我们并不迷恋那些养眼的东西,但当你每天花费几个小时盯着屏幕看东西时,我们确实认识到美学的重要性。我们中的许多人都喜欢调整我们的桌面和窗口管理器来达到完美的效果,调整阴影效果、摆弄不同的配色方案,直到我们 100% 的满意(然后出于习惯,摆弄更多的东西)。 +> +> 但我们倾向于忽视终端窗口,它理应也获得我们的喜爱,并且在 [http://ciembor.github.io/4bit][5] 你将看到一个极其棒的配色方案设计器,对于所有受欢迎的终端模拟器(**XTerm, Gnome Terminal, Konsole 和 Xfce4 Terminal 等都是支持的应用。**),它可以输出其设定。移动滑块直到你看到配色方案最佳, 然后点击位于该页面右上角的 `得到方案` 按钮。 +> +> 相似的,假如你在一个文本编辑器,如 Vim 或 Emacs 上花费了很多的时间,使用一个精心设计的调色板也是非常值得的。 **Solarized** [http://ethanschoonover.com/solarized][6] 是一个卓越的方案,它不仅漂亮,而且因追求最大的可用性而设计,在其背后有着大量的研究和测试。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/linux-101-power-up-your-shell-8/ + +作者:[Ben Everard][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/ben_everard/ +[1]:http://tinyurl.com/3gvz4ec +[2]:http://www.zsh.org/ +[3]:http://tinyurl.com/osopjv9 +[4]:http://www.xiki.org/ +[5]:http://ciembor.github.io/4bit +[6]:http://ethanschoonover.com/solarized \ No newline at end of file diff --git a/translated/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md b/translated/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md deleted file mode 100644 index fac7fa2e1b..0000000000 --- a/translated/tech/20150616 LINUX 101--POWER UP YOUR SHELL.md +++ /dev/null @@ -1,177 +0,0 @@ -LINUX 101: 让你的 SHELL 更强大 -================================================================================ -> 在我们的有关 shell 基础的指导下, 得到一个更灵活,功能更强大且多彩的命令行界面 - -**为何要这样做?** - -- 使得在 shell 提示符下过得更轻松,高效 -- 在失去连接后恢复先前的会话 -- Stop pushing around that fiddly rodent! (注: 我不知道这句该如何翻译) - -![bash1](http://www.linuxvoice.com/wp-content/uploads/2015/02/bash1-large15.png) - -Here’s our souped-up prompt on steroids.(注: 我不知道该如何翻译这句)对于这个细小的终端窗口来说,这或许有些长.但你可以根据你的喜好来调整它的大小. - -作为一个 Linux 用户, 对 shell (又名为命令行),你可能会熟悉. 或许你需要时不时的打开终端来完成那些不能在 GUI 下处理的必要任务,抑或是因为你处在一个平铺窗口管理器的环境中, 而 shell 是你与你的 linux 机器交互的主要方式. - -在上面的任一情况下,你可能正在使用你所使用的发行版本自带的 Bash 配置. 尽管对于大多数的任务而言,它足够强大,但它可以更加强大. 在本教程中,我们将向你展示如何使得你的 shell 更具信息性,更加实用且更适于在其中工作. 我们将对提示符进行自定义,让它比默认情况下提供更好的反馈,并向你展示如何使用炫酷的 `tmux` 工具来管理会话并同时运行多个程序. 并且,为了让眼睛舒服一点,我们还将关注配色方案. 接着,就让我们向前吧! - -### 让提示符 "唱歌" ### - -大多数的发行版本配置有一个非常简单的提示符 – 它们大多向你展示了一些基本信息, 但提示符可以为你提供更多的内容.例如,在 Debian 7 下,默认的提示符是这样的: - - mike@somebox:~$ - -上面的提示符展示出了用户,主机名,当前目录和账户类型符号(假如你切换到 root 账户, **$** 会变为 # ). 那这些信息是在哪里存储的呢? 答案是:在 **PS1** 环境变量中. 假如你键入 **echo $PS1**, 你将会在这个命令的输出字符串的最后有如下的字符: - - \u@\h:\w$ (注:这里没有加上斜杠 \,应该是没有转义 ,下面的有些命令也一样,我把 \ 都加上了,发表的时候也得注意一下) - -这看起来有一些丑陋,并在瞥见它的第一眼时,你可能会开始尖叫,认为它是令人恐惧的正则表达式,但我们不打算用这些复杂的字符来煎熬我们的大脑. 这不是正则表达式, 这里的斜杠是转义序列,它告诉提示符进行一些特别的处理. 例如,上面的 **u** 部分,告诉提示符展示用户名, 而 w 则展示工作路径. - -下面是一些你可以在提示符中用到的字符的列表: - -- d 当前的日期. -- h 主机名. -- n 代表新的一行的字符. -- A 当前的时间 (HH:MM). -- u 当前的用户. -- w (小写) 整个工作路径的全称. -- W (大写) 工作路径的简短名称. -- $ 一个提示符号,对于 root 用户为 # 号. -- ! 当前命令在 shell 历史记录中的序号. - -下面解释 **w** 和 **W** 选项的区别: 对于前者,你将看到你所在的工作路径的完整地址,(例如 **/usr/local/bin**), 而对于后者, 它则只显示 **bin** 这一部分. - -现在, 我们该怎样改变提示符呢? 你需要更改 **PS1** 环境变量的内容, 试试下面这个: - - export PS1=”I am \u and it is \A $” - -现在, 你的提示符将会像下面这样: - - I am mike and it is 11:26 $ - -从这个例子出发, 你就可以按照你的想法来试验一下上面列出的其他转义序列. 但稍等片刻 – 当你登出后,你的这些努力都将消失,因为在你每次打开终端时, **PS1** 环境变量的值都会被重置. 解决这个问题的最简单方式是打开 **.bashrc** 配置文件(在你的家目录下) 并在这个文件的最下方添加上完整的 `export` 命令.在每次你启动一个新的 shell 会话时,这个 **.bashrc** 会被 `Bash` 读取, 所以你的被加强了的提示符就可以一直出现.你还可以使用额外的颜色来装扮提示符.刚开始,这将有点棘手,因为你必须使用一些相当奇怪的转义序列,但结果是非常漂亮的. 将下面的字符添加到你的 **PS1**字符串中的某个位置,最终这将把文本变为红色: - - \[\e[31m\] - -你可以将这里的 31 更改为其他的数字来获得不同的颜色: - -- 30 黑色 -- 32 绿色 -- 33 黄色 -- 34 蓝色 -- 35 洋红色 -- 36 青色 -- 37 白色 - -所以,让我们使用先前看到的转义序列和颜色来创造一个提示符,以此来结束这一小节的内容. 深吸一口气,弯曲你的手指,然后键入下面这只"野兽": - - export PS1="(\!) \[\e[31m\] \[\A\] \[\e[32m\]\u@\h \[\e[34m\]\w \[\e[30m\]$" - -上面的命令提供了一个 Bash 命令历史序号, 当前的时间,用户或主机名与颜色之间的组合,以及工作路径.假如你"野心勃勃",利用一些惊人的组合,你还可以更改提示符的背景色和前景色.先前实用的 Arch wiki 有一个关于颜色代码的完整列表:[http://tinyurl.com/3gvz4ec][1]. - -> ### Shell 精要 ### -> -> 假如你是一个彻底的 Linux 新手并第一次阅读这份杂志,或许你会发觉阅读这些教程有些吃力. 所以这里有一些基础知识来让你熟悉一些 shell. 通常在你的菜单中, shell 指的是 Terminal, XTerm 或 Konsole, 但你启动它后, 最为实用的命令有这些: -> -> **ls** (列出文件名); **cp one.txt two.txt** (复制文件); **rm file.txt** (移除文件); **mv old.txt new.txt** (移动或重命名文件); -> -> **cd /some/directory** (改变目录); **cd ..** (回到上级目录); **./program** (在当前目录下运行一个程序); **ls > list.txt** (重定向输出到一个文件). -> -> 几乎每个命令都有一个手册页用来解释其选项(例如 **man ls** – 按 Q 来退出).在那里,你可以知晓命令的选项,这样你就知道 **ls -la** 展示一个详细的列表,其中也列出了隐藏文件, 并且在键入一个文件或目录的名字的一部分后, 可以使用 Tab 键来自动补全. - -### Tmux: 针对 shell 的窗口管理器 ### - -在文本模式的环境中使用一个窗口管理器 – 这听起来有点不可思议, 是吧? 然而,你应该记得当 Web 浏览器第一次实现分页浏览的时候吧? 在当时, 这是在可用性上的一个重大进步,它减少了桌面任务栏的杂乱无章和繁多的窗口列表. 对于你的浏览器来说,你只需要一个按钮便可以在浏览器中切换到你打开的每个单独网站, 而不是针对每个网站都有一个任务栏或导航图标. 这个功能非常有意义. - -若有时你同时运行着几个虚拟终端,你便会遇到相似的情况; 在这些终端之间跳转,或每次在任务栏或窗口列表中找到你所需要的那一个终端,都可能会让你觉得麻烦. 拥有一个文本模式的窗口管理器不仅可以让你像在同一个终端窗口中运行多个 shell 会话,而且你甚至还可以将这些窗口排列在一起. - -另外,这样还有另一个好处:可以将这些窗口进行分离和重新连接.想要看看这是如何运行的最好方式是自己尝试一下. 在一个终端窗口中,输入 **screen** (在大多数发行版本中,它被默认安装了或者可以在软件包仓库中找到). 某些欢迎的文字将会出现 – 只需敲击 Enter 键这些文字就会消失. 现在运行一个交互式的文本模式的程序,例如 **nano**, 并关闭这个终端窗口. - -在一个正常的 shell 对话中, 关闭窗口将会终止所有在该终端中运行的进程 – 所以刚才的 Nano 编辑对话也就被终止了, 但对于 screen 来说,并不是这样的. 打开一个新的终端并输入如下命令: - - screen -r - -瞧, 你刚开打开的 Nano 会话又回来了! - -当刚才你运行 **screen** 时, 它会创建了一个新的独立的 shell 会话, 它不与某个特定的终端窗口绑定在一起,所以可以在后面被分离并重新连接( 即 **-r** 选项). - -当你正使用 SSH 去连接另一台机器并做着某些工作, 但并不想因为一个单独的连接而毁掉你的所有进程时,这个方法尤其有用.假如你在一个 **screen** 会话中做着某些工作,并且你的连接突然中断了(或者你的笔记本没电了,又或者你的电脑报废了),你只需重新连接一个新的电脑或给电脑充电或重新买一台电脑,接着运行 **screen -r** 来重新连接到远程的电脑,并在刚才掉线的地方接着开始. - -现在,我们都一直在讨论 GNU 的 **screen**,但这个小节的标题提到的是 tmux. 实质上, **tmux** (terminal multiplexer) 就像是 **screen** 的一个进阶版本,带有许多有用的额外功能,所以现在我们开始关注 tmux. 某些发行版本默认包含了 **tmux**; 在其他的发行版本上,通常只需要一个 **apt-get, yum install** 或 **pacman -S** 命令便可以安装它. - -一旦你安装了它过后,键入 **tmux** 来启动它.接着你将注意到,在终端窗口的底部有一条绿色的信息栏,它非常像传统的窗口管理器中的任务栏: 上面显示着一个运行着的程序的列表,机器的主机名,当前时间和日期. 现在运行一个程序,又以 Nano 为例, 敲击 Ctrl+B 后接着按 C 键, 这将在 tmux 会话中创建一个新的窗口,你便可以在终端的底部的任务栏中看到如下的信息: - - 0:nano- 1:bash* - -每一个窗口都有一个数字,当前呈现的程序被一个星号所标记. Ctrl+B 是与 tmux 交互的标准方式, 所以若你敲击这个按键组合并带上一个窗口序号, 那么就会切换到对应的那个窗口.你也可以使用 Ctrl+B 再加上 N 或 P 来分别切换到下一个或上一个窗口 – 或者使用 Ctrl+B 加上 L 来在最近使用的两个窗口之间来进行切换(有点类似于桌面中的经典的 Alt+Tab 组合键的效果). 若需要知道窗口列表,使用 Ctrl+B 再加上 W. - -目前为止,一切都还好:现在你可以在一个单独的终端窗口中运行多个程序,避免混乱(尤其是当你经常与同一个远程主机保持多个 SSH 连接时.). 当想同时看两个程序又该怎么办呢? - -针对这种情况, 可以使用 tmux 中的窗格. 敲击 Ctrl+B 再加上 % , 则当前窗口将分为两个部分,一个在左一个在右.你可以使用 Ctrl+B 再加上 O 来在这两个部分之间切换. 这尤其在你想同时看两个东西时非常实用, – 例如一个窗格看指导手册,另一个窗格里用编辑器看一个配置文件. - -有时,你想对一个单独的窗格进行缩放,而这需要一定的技巧. 首先你需要敲击 Ctrl+B 再加上一个 :(分号),这将使得位于底部的 tmux 栏变为深橙色. 现在,你进入了命令模式,在这里你可以输入命令来操作 tmux. 输入 **resize-pane -R** 来使当前窗格向右移动一个字符的间距, 或使用 **-L** 来向左移动. 对于一个简单的操作,这些命令似乎有些长,但请注意,在 tmux 的命令模式(以前面提到的一个分号开始的模式)下,可以使用 Tab 键来补全命令. 另外需要提及的是, **tmux** 同样也有一个命令历史记录,所以若你想重复刚才的缩放操作,可以先敲击 Ctrl+B 再跟上一个分号并使用向上的箭头来取回刚才输入的命令. - -最后,让我们看一下分离和重新连接 - 即我们刚才介绍的 screen 的特色功能. 在 tmux 中,敲击 Ctrl+B 再加上 D 来从当前的终端窗口中分离当前的 tmux 会话, 这使得这个会话的一切工作都在后台中运行.使用 **tmux a** 可以再重新连接到刚才的会话. 但若你同时有多个 tmux 会话在运行时,又该怎么办呢? 我们可以使用下面的命令来列出它们: - - tmux ls - -这个命令将为每个会话分配一个序号; 假如你想重新连接到会话 1, 可以使用 `tmux a -t 1`. tmux 是可以高度定制的,你可以自定义按键绑定并更改配色方案, 所以一旦你适应了它的主要功能,请钻研指导手册以了解更多的内容. - -tmux: 一个针对 shell 的窗口管理器 - -![tmux](http://www.linuxvoice.com/wp-content/uploads/2015/02/tmux-large13.jpg) - -上图中, tmux 开启了两个窗格: 左边是 Vim 正在编辑一个配置文件,而右边则展示着指导手册页. - -> ### Zsh: 另一个 shell ### -> -> 选择是好的,但标准同样重要. 你要知道几乎每个主流的 Linux 发行版本都默认使用 Bash shell – 尽管还存在其他的 shell. Bash 为你提供了一个 shell 能够给你提供的几乎任何功能,包括命令历史记录,文件名补全和许多脚本编程的能力.它成熟,可靠并文档丰富 – 但它不是你唯一的选择. -> -> 许多高级用户热衷于 Zsh, 即 Z shell. 这是 Bash 的一个替代品并提供了 Bash 的几乎所有功能,令外还提供了一些额外的功能. 例如, 在 Zsh 中,你输入 **ls** - 并敲击 Tab 键可以得到 **ls** 可用的各种不同选项的一个大致描述. 而不需要再打开 man page 了! -> -> Zsh 还支持其他强大的自动补全功能: 例如,输入 **cd /u/lo/bi** 再敲击 Tab 键, 则完整的路径名 **/usr/local/bin** 就会出现(这里假设没有其他的路径包含 **u**, **lo** 和 **bi** 等字符.). 或者只输入 **cd** 再跟上 Tab 键,则你将看到着色后的路径名的列表 – 这比 Bash 给出的简单的结果好看得多. -> -> Zsh 在大多数的主要发行版本上都可以得到; 安装它后并输入 **zsh** 便可启动它. 要将你的默认 shell 从 Bash 改为 Zsh, 可以使用 **chsh** 命令. 若需了解更多的信息,请访问 [www.zsh.org][2]. - -### "未来" 的终端 ### - -你或许会好奇为什么包含你的命令行提示符的应用被叫做终端. 这需要追溯到 Unix 的早期, 那时人们一般工作在一个多用户的机器上,这个巨大的电脑主机将占据一座建筑中的一个房间, 人们在某些线路的配合下,使用屏幕和键盘来连接到这个主机, 这些终端机通常被称为 "哑终端", 因为它们不能靠自己做任何重要的执行任务 – 它们只展示通过线路从主机传来的信息,并输送回从键盘的敲击中得到的输入信息. - -今天,几乎所有的我们在自己的机器上执行实际的操作,所以我们的电脑不是传统意义下的终端, 这就是为什么诸如 **XTerm**, Gnome Terminal, Konsole 等程序被称为 "终端模拟器" 的原因 – 他们提供了同昔日的物理终端一样的功能.事实上,在许多方面它们并没有改变多少.诚然,现在我们有了反锯齿字体,更好的颜色和点击网址的能力,但总的来说,几十年来我们一直以同样的方式在工作. - -所以某些程序员正尝试改变这个状况. **Terminology** ([http://tinyurl.com/osopjv9][3]), 它来自于超级时髦的 Enlightenment 窗口管理器背后的团队,旨在将终端引入 21 世纪,例如带有在线媒体显示功能.你可以在一个充满图片的目录里输入 **ls** 命令,便可以看到它们的缩略图,或甚至可以直接在你的终端里播放视频. 这使得一个终端有点类似于一个文件管理器,意味着你可以快速地检查媒体文件的内容而不必用另一个应用来打开它们. - -接着还有 Xiki ([www.xiki.org][4]),它自身的描述为 "命令的革新".它就像是一个传统的 shell, 一个 GUI 和一个 wiki 之间的过渡; 你可以在任何地方输入命令,并在后面将它们的输出存储为笔记以作为参考,并可以创建非常强大的自定义命令.用几句话是很能描述它的,所以作者们已经创作了一个视频来展示它的潜力是多么的巨大(请看 **Xiki** 网站的截屏视频部分). - -并且 Xiki 绝不是那种在几个月之内就消亡的昙花一现的项目,作者们成功地进行了一次 Kickstarter 众筹,在七月底已募集到超过 $84,000. 是的,你没有看错 – $84K 来支持一个终端模拟器.这可能是最不寻常的集资活动,因为某些疯狂的家伙已经决定开始创办它们自己的 Linux 杂志 ...... - -### 下一代终端 ### - -许多命令行和基于文本的程序在功能上与它们的 GUI 程序是相同的,并且常常更加快速和高效. 我们的推荐有: -**Irssi** (IRC 客户端); **Mutt** (mail 客户端); **rTorrent** (BitTorrent); **Ranger** (文件管理器); **htop** (进程监视器). 若给定在终端的限制下来进行 Web 浏览, Elinks 确实做的很好,并且对于阅读那些以文字为主的网站例如 Wikipedia 来说,它非常实用. - -> ### 微调配色方案 ### -> -> 在 Linux Voice 中,我们并不迷恋养眼的东西,但当你每天花费几个小时盯着屏幕看东西时,我们确实认识到美学的重要性.我们中的许多人都喜欢调整我们的桌面和窗口管理器来达到完美的效果,调整阴影效果,摆弄不同的配色方案,直到我们 100% 的满意.(然后出于习惯,摆弄更多的东西.) -> -> 但我们倾向于忽视终端窗口,它理应也获得我们的喜爱, 并且在 [http://ciembor.github.io/4bit][5] 你将看到一个极其棒的配色方案设计器,对于所有受欢迎的终端模拟器(**XTerm, Gnome Terminal, Konsole and Xfce4 Terminal are among the apps supported.**),它可以色设定.移动滑动条直到你看到配色方案 norvana, 然后点击位于该页面右上角的 `得到方案` 按钮. -> -> 相似的,假如你在一个文本编辑器,如 Vim 或 Emacs 上花费很多的时间,使用一个精心设计的调色板也是非常值得的. **Solarized at** [http://ethanschoonover.com/solarized][6] 是一个卓越的方案,它不仅漂亮,而且因追求最大的可用性而设计,在其背后有着大量的研究和测试. --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/linux-101-power-up-your-shell-8/ - -作者:[Ben Everard][a] -译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/ben_everard/ -[1]:http://tinyurl.com/3gvz4ec -[2]:http://www.zsh.org/ -[3]:http://tinyurl.com/osopjv9 -[4]:http://www.xiki.org/ -[5]:http://ciembor.github.io/4bit -[6]:http://ethanschoonover.com/solarized \ No newline at end of file From b0df98351b4c4b573e0045e942b202005f148035 Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 29 Jul 2015 08:46:27 +0800 Subject: [PATCH 1526/2517] Update 20150728 How To Fix--There is no command installed for 7-zip archive files.md --- ...x--There is no command installed for 7-zip archive files.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md b/sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md index 8c9b781117..dd3f7211ce 100644 --- a/sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md +++ b/sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How To Fix: There is no command installed for 7-zip archive files ================================================================================ ### Problem ### @@ -46,4 +47,4 @@ via: http://itsfoss.com/fix-there-is-no-command-installed-for-7-zip-archive-file [a]:http://itsfoss.com/author/abhishek/ [1]:http://www.7-zip.org/ -[2]:http://itsfoss.com/fix-there-is-no-command-installed-for-rar-archive-files/ \ No newline at end of file +[2]:http://itsfoss.com/fix-there-is-no-command-installed-for-rar-archive-files/ From db5aa16eb7ba418bba279f4d795cf80d0fdb303a Mon Sep 17 00:00:00 2001 From: GOLinux Date: Wed, 29 Jul 2015 09:21:53 +0800 Subject: [PATCH 1527/2517] [Translated]20150728 How To Fix--There is no command installed for 7-zip archive files.md --- ...mmand installed for 7-zip archive files.md | 50 ------------------ ...mmand installed for 7-zip archive files.md | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 50 deletions(-) delete mode 100644 sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md create mode 100644 translated/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md diff --git a/sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md b/sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md deleted file mode 100644 index dd3f7211ce..0000000000 --- a/sources/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md +++ /dev/null @@ -1,50 +0,0 @@ -Translating by GOLinux! -How To Fix: There is no command installed for 7-zip archive files -================================================================================ -### Problem ### - -I was trying to install Emerald icon theme in Ubuntu and the theme came in .7z archive. As always, I tried to extract it, in GUI, using the right click and “extract here”. Instead of extracting the file, Ubuntu 15.04 threw an error which read: - -> Could not open this file -> -> There is no command installed for 7-zip archive files. Do you want to search for a command to open this file? - -The error looked like this: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Install_7zip_ubuntu_1.png) - -### Reason ### - -Reason is quite evident from the error message itself. The 7Z, better to call it [7-zip][1], program is not installed and hence 7Z compressed files are not being extracted. This also hints that Ubuntu doesn’t support 7-Zip files by default. - -### Solution: Install 7zip in Ubuntu ### - -Solution is quite simple as well. Install the 7-Zip package in Ubuntu. Now you might wonder how to install 7Zip in Ubuntu? Well, in the previous error dialogue box if you click on “Search Command”, it will look for available p7zip package. Just click on “Install” here: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Install_7zip_ubuntu.png) - -### Alternative: Install 7zip in terminal ### - -If you prefer terminal, you can install 7zip in terminal using the following command: - - sudo apt-get install p7zip-full - -Note: You’ll find three 7zip packages in Ubuntu: p7zip, p7zip-full and p7zip-rar. The difference between p7zip and p7zip-full is that p7zip is a lighter version providing support only for .7z and .7za files while the full version provides support for more 7z compression algorithms (for audio files etc). For p7zip-rar, it provides support for .rar files along with 7z. - -In fact similar error can be encountered with [RAR files in Ubuntu][2]. Solution is the same, install the correct program. - -I hope this quick post helped you to solve the mystery of **how to open 7zip in Ubuntu 14.04**. Any questions or suggestions are always welcomed. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/fix-there-is-no-command-installed-for-7-zip-archive-files/ - -作者:[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://www.7-zip.org/ -[2]:http://itsfoss.com/fix-there-is-no-command-installed-for-rar-archive-files/ diff --git a/translated/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md b/translated/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md new file mode 100644 index 0000000000..61237467ca --- /dev/null +++ b/translated/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md @@ -0,0 +1,51 @@ +如何修复:There is no command installed for 7-zip archive files +================================================================================ +### 问题 ### + +我试着在Ubuntu中安装Emerald图标主题,而这个主题被打包成了.7z归档包。和以往一样,我试着通过在GUI中右击并选择“提取到这里”来将它解压缩。但是Ubuntu 15.04却并没有解压文件,取而代之的,却是丢给了我一个下面这样的错误信息: + +> Could not open this file +> 无法打开该文件 +> +> There is no command installed for 7-zip archive files. Do you want to search for a command to open this file? +> 没有安装用于7-zip归档文件的命令。你是否想要搜索命令来打开该文件? + +错误信息看上去是这样的: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Install_7zip_ubuntu_1.png) + +### 原因 ### + +发生该错误的原因从错误信息本身来看就十分明了。7Z,称之为[7-zip][1]更好,该程序没有安装,因此7Z压缩文件就无法解压缩。这也暗示着Ubuntu默认不支持7-zip文件。 + +### 解决方案:在Ubuntu中安装 7zip ### + +要解决该问题也十分简单,在Ubuntu中安装7-Zip包即可。现在,你也许想知道如何在Ubuntu中安装 7Zip吧?好吧,在前面的错误对话框中,如果你右击“Search Command”搜索命令,它会查找可用的 p7zip 包。只要点击“Install”安装,如下图: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Install_7zip_ubuntu.png) + +### 可选方案:在终端中安装 7Zip ### + +如果偏好使用终端,你可以使用以下命令在终端中安装 7zip: + + sudo apt-get install p7zip-full + +注意:在Ubuntu中,你会发现有3个7zip包:p7zip,p7zip-full 和 p7zip-rar。p7zip和p7zip-full的区别在于,p7zip是一个更轻量化的版本,仅仅提供了对 .7z 和 .7za 文件的支持,而完整版则提供了对更多(用于音频文件等的) 7z 压缩算法的支持。对于 p7zip-rar,它除了对 7z 文件的支持外,也提供了对 .rar 文件的支持。 + +事实上,相同的错误也会发生在[Ubuntu中的RAR文件][2]身上。解决方案也一样,安装正确的程序即可。 + +希望这篇快文帮助你解决了**Ubuntu 14.04中如何打开 7zip**的谜团。如有任何问题或建议,我们将无任欢迎。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/fix-there-is-no-command-installed-for-7-zip-archive-files/ + +作者:[Abhishek][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://www.7-zip.org/ +[2]:http://itsfoss.com/fix-there-is-no-command-installed-for-rar-archive-files/ From e60fc38a7eceff5263a59b72534684bc910f2ffd Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 29 Jul 2015 09:24:22 +0800 Subject: [PATCH 1528/2517] Update 20150727 Easy Backup Restore and Migrate Containers in Docker.md --- ...727 Easy Backup Restore and Migrate Containers in Docker.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md b/sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md index fc21489ec9..7607fe58f7 100644 --- a/sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md +++ b/sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Easy Backup, Restore and Migrate Containers in Docker ================================================================================ Today we'll learn how we can easily backup, restore and migrate docker containers out of the box. [Docker][1] is an open source platform that automates the deployment of applications with fast and easy way to pack, ship and run it under a lightweight layer of software called container. It makes the applications platform independent as it acts an additional layer of abstraction and automation of operating system level virtualization on Linux. It utilizes resource isolation features of Linux Kernel with its components cgroups and namespace for avoiding the overhead of virtual machines. It makes the great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. Containers are those software layers which are created from a docker image that contains the respective linux filesystem and applications out of the box. If we have a docker container running in our box and need to backup those containers for future use or wanna migrate those containers, then this tutorial will help you how we can backup, restore and migrate docker containers in linux operating system. @@ -87,4 +88,4 @@ via: http://linoxide.com/linux-how-to/backup-restore-migrate-containers-docker/ [a]:http://linoxide.com/author/arunp/ [1]:http://docker.com/ -[2]:https://registry.hub.docker.com/ \ No newline at end of file +[2]:https://registry.hub.docker.com/ From e695b053546e6c6f30930a7e91500a7671dcbb09 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Wed, 29 Jul 2015 11:16:25 +0800 Subject: [PATCH 1529/2517] [Translated]20150727 Easy Backup Restore and Migrate Containers in Docker.md --- ...estore and Migrate Containers in Docker.md | 91 ------------------ ...estore and Migrate Containers in Docker.md | 92 +++++++++++++++++++ 2 files changed, 92 insertions(+), 91 deletions(-) delete mode 100644 sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md create mode 100644 translated/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md diff --git a/sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md b/sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md deleted file mode 100644 index 7607fe58f7..0000000000 --- a/sources/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md +++ /dev/null @@ -1,91 +0,0 @@ -Translating by GOLinux! -Easy Backup, Restore and Migrate Containers in Docker -================================================================================ -Today we'll learn how we can easily backup, restore and migrate docker containers out of the box. [Docker][1] is an open source platform that automates the deployment of applications with fast and easy way to pack, ship and run it under a lightweight layer of software called container. It makes the applications platform independent as it acts an additional layer of abstraction and automation of operating system level virtualization on Linux. It utilizes resource isolation features of Linux Kernel with its components cgroups and namespace for avoiding the overhead of virtual machines. It makes the great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. Containers are those software layers which are created from a docker image that contains the respective linux filesystem and applications out of the box. If we have a docker container running in our box and need to backup those containers for future use or wanna migrate those containers, then this tutorial will help you how we can backup, restore and migrate docker containers in linux operating system. - -Here are some easy steps on how we can backup, restore and migrate the docker containers in linux. - -### 1. Backing up the Containers ### - -First of all, in order to backup the containers in docker, we'll wanna see the list of containers that we wanna backup. To do so, we'll need to run docker ps in our linux machine running docker engine with containers already created. - - # docker ps - -![Docker Containers List](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-containers-list.png) - -After that, we'll choose the containers we wanna backup and then we'll go for creating the snapshot of the container. We can use docker commit command in order to create the snapshot. - - # docker commit -p 30b8f18f20b4 container-backup - -![Docker Commit](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-commit.png) - -This will generated a snapshot of the container as the docker image. We can see the docker image by running the command docker images as shown below. - - # docker images - -![Docker Images](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-images.png) - -As we can see the snapshot that was taken above has been preserved as docker image. Now, inorder to backup that snapshot, we have two options, one is that we can login into the docker registry hub and push the image and the next is that we can backup the docker image as tarballs for further use. - -If we wanna upload or backup the image in the [docker registry hub][2], we can simply run docker login command to login into the docker registry hub and then push the required image. - - # docker login - -![Docker Login](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-login.png) - - # docker tag a25ddfec4d2a arunpyasi/container-backup:test - # docker push arunpyasi/container-backup - -![Docker Push](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-push.png) - -If we don't wanna backup to the docker registry hub and wanna save the image for future use in the machine locally then we can backup the image as tarballs. To do so, we'll need to run the following docker save command. - - # docker save -o ~/container-backup.tar container-backup - -![taking tarball backup](http://blog.linoxide.com/wp-content/uploads/2015/07/taking-tarball-backup.png) - -To verify if the tarball has been generated or not, we can simply run docker ls inside the directory where we saved the tarball. - -### 2. Restoring the Containers ### - -Next, after we have successfully backed up our docker containers, we'll now go for restoring those contianers which are snapshotted as docker images. If we have pushed those docker images in the registry hub, then we can simply pull that docker image and run it out of the box. - - # docker pull arunpyasi/container-backup:test - -![Docker Pull](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-pull.png) - -But if we have backed up those docker images locally as tarball file, then we can easy load that docker image using docker load command followed by the backed up tarball. - - # docker load -i ~/container-backup.tar - -Now, to ensure that those docker images have been loaded successfully, we'll run docker images command. - - # docker images - -After the images have been loaded, we'll gonna run the docker container from the loaded image. - - # docker run -d -p 80:80 container-backup - -![Restoring Docker Tarball](http://blog.linoxide.com/wp-content/uploads/2015/07/restoring-docker-tarballs.png) - -### 3. Migrating the Docker Containers ### - -Migrating the containers involve both the above process ie Backup and Restore. We can migrate any docker container from one machine to another. In the process of migration, first we take the backup of the container as snapshot docker image. Then, that docker image is either pushed to the docker registry hub or saved as tarball files in the locally. If we have pushed the image to the docker registry hub, we can easily restore and run the container using docker run command from any machine we want. But if we have saved the image as tarballs locally, we can simply copy or move the image to the machine where we want to load image and run the required container. - -### Conclusion ### - -Finally, we have learned how we can backup, restore and migrate the docker containers out of the box. This tutorial is exactly same for every platform of operating system where docker runs successfully. Really, docker is pretty simple and easy to use but very powerful tool. It has pretty easy to remember commands which are short enough with many simple but powerful flags and parameters. The above methods makes us comfortable to backup our containers so that we can restore them when needed in future. This can help us recover our containers and images even if our host system crashes or gets wiped out accidentally. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/backup-restore-migrate-containers-docker/ - -作者:[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/ -[1]:http://docker.com/ -[2]:https://registry.hub.docker.com/ diff --git a/translated/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md b/translated/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md new file mode 100644 index 0000000000..420430cca8 --- /dev/null +++ b/translated/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md @@ -0,0 +1,92 @@ +无忧之道:Docker中容器的备份、恢复和迁移 +================================================================================ +今天,我们将学习如何快速地对docker容器进行快捷备份、恢复和迁移。[Docker][1]是一个开源平台,用于自动化部署应用,以通过快捷的途径在称之为容器的轻量级软件层下打包、发布和运行这些应用。它使得应用平台独立,因为它扮演了Linux上一个额外的操作系统级虚拟化的自动化抽象层。它通过其组件cgroups和命名空间利用Linux内核的资源分离特性,达到避免虚拟机开销的目的。它使得用于部署和扩展web应用、数据库和后端服务的大规模构建块无需依赖于特定的堆栈或供应者。 + +所谓的容器,就是那些创建自Docker镜像的软件层,它包含了独立的Linux文件系统和开箱即用的应用程序。如果我们有一个在盒子中运行着的Docker容器,并且想要备份这些容器以便今后使用,或者想要迁移这些容器,那么,本教程将帮助你掌握在Linux操作系统中备份、恢复和迁移Docker容器。 + +我们怎样才能在Linux中备份、恢复和迁移Docker容器呢?这里为您提供了一些便捷的步骤。 + +### 1. 备份容器 ### + +首先,为了备份Docker中的容器,我们会想看看我们想要备份的容器列表。要达成该目的,我们需要在我们运行这Docker引擎,并已创建了容器的Linux机器中运行 docker ps 命令。 + + # docker ps + +![Docker Containers List](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-containers-list.png) + +在此之后,我们要选择我们想要备份的容器,然后我们会去创建该容器的快照。我们可以使用 docker commit 命令来创建快照。 + + # docker commit -p 30b8f18f20b4 container-backup + +![Docker Commit](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-commit.png) + +该命令会生成一个作为Docker镜像的容器快照,我们可以通过运行 docker images 命令来查看Docker镜像,如下。 + + # docker images + +![Docker Images](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-images.png) + +正如我们所看见的,上面做的快照已经作为Docker镜像保存了。现在,为了备份该快照,我们有两个选择,一个是我们可以登陆进Docker注册中心,并推送该镜像;另一个是我们可以将Docker镜像打包成tarball备份,以供今后使用。 + +如果我们想要在[Docker注册中心][2]上传或备份镜像,我们只需要运行 docker login 命令来登录进Docker注册中心,然后推送所需的镜像即可。 + + # docker login + +![Docker Login](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-login.png) + + # docker tag a25ddfec4d2a arunpyasi/container-backup:test + # docker push arunpyasi/container-backup + +![Docker Push](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-push.png) + +如果我们不想备份到docker注册中心,而是想要将此镜像保存在本地机器中,以供日后使用,那么我们可以将其作为tarball备份。要完成该操作,我们需要运行以下 docker save 命令。 + + # docker save -o ~/container-backup.tar container-backup + +![taking tarball backup](http://blog.linoxide.com/wp-content/uploads/2015/07/taking-tarball-backup.png) + +要验证tarball时候已经生成,我们只需要在保存tarball的目录中运行 ls 命令。 + +### 2. 恢复容器 ### + +接下来,在我们成功备份了我们的Docker容器后,我们现在来恢复这些被快照成Docker镜像的容器。如果我们已经在注册中心推送了这些Docker镜像,那么我们仅仅需要把那个Docker镜像拖回并直接运行即可。 + + # docker pull arunpyasi/container-backup:test + +![Docker Pull](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-pull.png) + +但是,如果我们将这些Docker镜像作为tarball文件备份到了本地,那么我们只要使用 docker load 命令,后面加上tarball的备份路径,就可以加载该Docker镜像了。 + + # docker load -i ~/container-backup.tar + +现在,为了确保这些Docker镜像已经加载成功,我们来运行 docker images 命令。 + + # docker images + +在镜像被加载后,我们将从加载的镜像去运行Docker容器。 + + # docker run -d -p 80:80 container-backup + +![Restoring Docker Tarball](http://blog.linoxide.com/wp-content/uploads/2015/07/restoring-docker-tarballs.png) + +### 3. 迁移Docker容器 ### + +迁移容器同时涉及到了上面两个操作,备份和恢复。我们可以将任何一个Docker容器从一台机器迁移到另一台机器。在迁移过程中,首先我们将容器的备份作为快照Docker镜像。然后,该Docker镜像或者是被推送到了Docker注册中心,或者被作为tarball文件保存到了本地。如果我们将镜像推送到了Docker注册中心,我们简单地从任何我们想要的机器上使用 docker run 命令来恢复并运行该容器。但是,如果我们将镜像打包成tarball备份到了本地,我们只需要拷贝或移动该镜像到我们想要的机器上,加载该镜像并运行需要的容器即可。 + +### 尾声 ### + +最后,我们已经学习了如何快速地备份、恢复和迁移Docker容器,本教程适用于各个成功运行Docker的操作系统平台。真的,Docker是一个相当简单易用,然而功能却十分强大的工具。它的命令相当易记,这些命令都非常短,带有许多简单而强大的标记和参数。上面的方法让我们备份容器时很是安逸,使得我们可以在日后很轻松地恢复它们。这会帮助我们恢复我们的容器和镜像,即便主机系统崩溃,甚至意外地被清除。如果你还有很多问题、建议、反馈,请在下面的评论框中写出来吧,可以帮助我们改进或更新我们的内容。谢谢大家!享受吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/backup-restore-migrate-containers-docker/ + +作者:[Arun Pyasi][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://docker.com/ +[2]:https://registry.hub.docker.com/ From c135e226aad8457e323f83d79c2264dc3dff4da9 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 29 Jul 2015 14:32:23 +0800 Subject: [PATCH 1530/2517] PUB:20150612 How to Configure Swarm Native Clustering for Docker @GOLinux --- ...gure Swarm Native Clustering for Docker.md | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150612 How to Configure Swarm Native Clustering for Docker.md (65%) diff --git a/translated/tech/20150612 How to Configure Swarm Native Clustering for Docker.md b/published/20150612 How to Configure Swarm Native Clustering for Docker.md similarity index 65% rename from translated/tech/20150612 How to Configure Swarm Native Clustering for Docker.md rename to published/20150612 How to Configure Swarm Native Clustering for Docker.md index 82849b4661..66ff94367e 100644 --- a/translated/tech/20150612 How to Configure Swarm Native Clustering for Docker.md +++ b/published/20150612 How to Configure Swarm Native Clustering for Docker.md @@ -1,34 +1,37 @@ -为Docker配置Swarm本地集群 +如何配置一个 Docker Swarm 原生集群 ================================================================================ -嗨,大家好。今天我们来学一学Swarm相关的内容吧,我们将学习通过Swarm来创建Docker本地集群。[Docker Swarm][1]是用于Docker的本地集群项目,它可以将Docker主机池转换成单个的虚拟主机。Swarm提供了标准的Docker API,所以任何可以和Docker守护进程通信的工具都可以使用Swarm来透明地规模化多个主机。Swarm遵循“包含电池并可拆卸”的原则,就像其它Docker项目一样。它附带有一个开箱即用的简单的后端调度程序,而且作为初始开发套件,也为其开发了一个可启用即插即用后端的API。其目标在于为一些简单的使用情况提供一个平滑的、开箱即用的体验,并且它允许在更强大的后端,如Mesos,中开启交换,以达到大量生产部署的目的。Swarm配置和使用极其简单。 + +嗨,大家好。今天我们来学一学Swarm相关的内容吧,我们将学习通过Swarm来创建Docker原生集群。[Docker Swarm][1]是用于Docker的原生集群项目,它可以将一个Docker主机池转换成单个的虚拟主机。Swarm工作于标准的Docker API,所以任何可以和Docker守护进程通信的工具都可以使用Swarm来透明地伸缩到多个主机上。就像其它Docker项目一样,Swarm遵循“内置电池,并可拆卸”的原则(LCTT 译注:batteries included,内置电池原来是 Python 圈里面对 Python 的一种赞誉,指自给自足,无需外求的丰富环境;but removable,并可拆卸应该指的是非强制耦合)。它附带有一个开箱即用的简单的后端调度程序,而且作为初始开发套件,也为其开发了一个可插拔不同后端的API。其目标在于为一些简单的使用情况提供一个平滑的、开箱即用的体验,并且它允许切换为更强大的后端,如Mesos,以用于大规模生产环境部署。Swarm配置和使用极其简单。 这里给大家提供Swarm 0.2开箱的即用一些特性。 1. Swarm 0.2.0大约85%与Docker引擎兼容。 2. 它支持资源管理。 -3. 它具有一些带有限制器和类同器高级调度特性。 +3. 它具有一些带有限制和类同功能的高级调度特性。 4. 它支持多个发现后端(hubs,consul,etcd,zookeeper) 5. 它使用TLS加密方法进行安全通信和验证。 -那么,我们来看一看Swarm的一些相当简单而简易的使用步骤吧。 +那么,我们来看一看Swarm的一些相当简单而简用的使用步骤吧。 ### 1. 运行Swarm的先决条件 ### -我们必须在所有节点安装Docker 1.4.0或更高版本。虽然哥哥节点的IP地址不需要要公共地址,但是Swarm管理器必须可以通过网络访问各个节点。 +我们必须在所有节点安装Docker 1.4.0或更高版本。虽然各个节点的IP地址不需要要公共地址,但是Swarm管理器必须可以通过网络访问各个节点。 -注意:Swarm当前还处于beta版本,因此功能特性等还有可能发生改变,我们不推荐你在生产环境中使用。 +**注意**:Swarm当前还处于beta版本,因此功能特性等还有可能发生改变,我们不推荐你在生产环境中使用。 ### 2. 创建Swarm集群 ### 现在,我们将通过运行下面的命令来创建Swarm集群。各个节点都将运行一个swarm节点代理,该代理会注册、监控相关的Docker守护进程,并更新发现后端获取的节点状态。下面的命令会返回一个唯一的集群ID标记,在启动节点上的Swarm代理时会用到它。 +在集群管理器中: + # docker run swarm create ![Creating Swarm Cluster](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-swarm-cluster.png) ### 3. 启动各个节点上的Docker守护进程 ### -我们需要使用-H标记登陆进我们将用来创建几圈和启动Docker守护进程的各个节点,它会保证Swarm管理器能够通过TCP访问到各个节点上的Docker远程API。要启动Docker守护进程,我们需要在各个节点内部运行以下命令。 +我们需要登录进我们将用来创建集群的每个节点,并在其上使用-H标记启动Docker守护进程。它会保证Swarm管理器能够通过TCP访问到各个节点上的Docker远程API。要启动Docker守护进程,我们需要在各个节点内部运行以下命令。 # docker -H tcp://0.0.0.0:2375 -d @@ -42,7 +45,7 @@ ![Adding Nodes to Cluster](http://blog.linoxide.com/wp-content/uploads/2015/05/adding-nodes-to-cluster.png) -** 注意**:我们需要用步骤2中获取到的节点IP地址和集群ID替换这里的。 +**注意**:我们需要用步骤2中获取到的节点IP地址和集群ID替换这里的。 ### 5. 开启Swarm管理器 ### @@ -60,7 +63,7 @@ ![Accessing Swarm Clusters](http://blog.linoxide.com/wp-content/uploads/2015/05/accessing-swarm-cluster.png) -** 注意**:我们需要替换为运行swarm管理器的主机的IP地址和端口。 +**注意**:我们需要替换为运行swarm管理器的主机的IP地址和端口。 ### 7. 使用docker CLI来访问节点 ### @@ -79,7 +82,7 @@ ### 尾声 ### -Swarm真的是一个有着相当不错的功能的docker,它可以用于创建和管理集群。它相当易于配置和使用,当我们在它上面使用限制器和类同器师它更为出色。高级调度程序是一个相当不错的特性,它可以应用过滤器来通过端口、标签、健康状况来排除节点,并且它使用策略来挑选最佳节点。那么,如果你有任何问题、评论、反馈,请在下面的评论框中写出来吧,好让我们知道哪些材料需要补充或改进。谢谢大家了!尽情享受吧 :-) +Swarm真的是一个有着相当不错的功能的docker,它可以用于创建和管理集群。它相当易于配置和使用,当我们在它上面使用限制器和类同器时它更为出色。高级调度程序是一个相当不错的特性,它可以应用过滤器来通过端口、标签、健康状况来排除节点,并且它使用策略来挑选最佳节点。那么,如果你有任何问题、评论、反馈,请在下面的评论框中写出来吧,好让我们知道哪些材料需要补充或改进。谢谢大家了!尽情享受吧 :-) -------------------------------------------------------------------------------- @@ -87,7 +90,7 @@ via: http://linoxide.com/linux-how-to/configure-swarm-clustering-docker/ 作者:[Arun Pyasi][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From e1cfb34b0b010db96d7f11f02504fd3187ed8b12 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 29 Jul 2015 14:54:46 +0800 Subject: [PATCH 1531/2517] PUB:20150722 12 Useful PHP Commandline Usage Every Linux User Must Know @GOLinux --- ...ndline Usage Every Linux User Must Know.md | 70 +++++++++++-------- 1 file changed, 39 insertions(+), 31 deletions(-) rename {translated/tech => published}/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md (71%) diff --git a/translated/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md b/published/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md similarity index 71% rename from translated/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md rename to published/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md index 8c00c6a75c..2b5a6e9cf9 100644 --- a/translated/tech/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md +++ b/published/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md @@ -1,14 +1,12 @@ -每个Linux人应知应会的12个有用的PHP命令行用法 +在 Linux 命令行中使用和执行 PHP 代码(二):12 个 PHP 交互性 shell 的用法 ================================================================================ -在我上一篇文章“[在Linux命令行中使用并执行PHP代码][1]”中,我同时着重讨论了直接在Linux命令行中运行PHP代码以及在Linux终端中执行PHP脚本文件。 +在上一篇文章“[在 Linux 命令行中使用和执行 PHP 代码(一)][1]”中,我同时着重讨论了直接在Linux命令行中运行PHP代码以及在Linux终端中执行PHP脚本文件。 ![Run PHP Codes in Linux Commandline](http://www.tecmint.com/wp-content/uploads/2015/07/Run-PHP-Codes-in-Linux-Commandline.jpeg) -在Linux命令行运行PHP代码——第二部分 +本文旨在让你了解一些相当不错的Linux终端中的PHP交互性 shell 的用法特性。 -本文旨在让你了解一些相当不错的Linux终端中的PHP用法特性。 - -让我们先在PHP交互shell中来对`php.ini`设置进行一些配置吧。 +让我们先在PHP 的交互shell中来对`php.ini`设置进行一些配置吧。 **6. 设置PHP命令行提示符** @@ -21,7 +19,8 @@ php > #cli.prompt=Hi Tecmint :: ![Enable PHP Interactive Shell](http://www.tecmint.com/wp-content/uploads/2015/07/Enable-PHP-Interactive-Shell.png) -启用PHP交互Shell + +*启用PHP交互Shell* 同时,你也可以设置当前时间作为你的命令行提示符,操作如下: @@ -31,20 +30,22 @@ **7. 每次输出一屏** -在我们上一篇文章中,我们已经在原始命令中通过管道在很多地方使用了‘less‘命令。通过该操作,我们可以在那些不能一次满屏输出的地方获得每次一屏的输出。但是,我们可以通过配置php.ini文件,设置pager的值为less以每次输出一屏,操作如下: +在我们上一篇文章中,我们已经在原始命令中通过管道在很多地方使用了`less`命令。通过该操作,我们可以在那些不能一屏全部输出的地方获得分屏显示。但是,我们可以通过配置php.ini文件,设置pager的值为less以每次输出一屏,操作如下: $ php -a php > #cli.pager=less ![Fix PHP Screen Output](http://www.tecmint.com/wp-content/uploads/2015/07/Fix-PHP-Screen-Output.png) -固定PHP屏幕输出 + +*限制PHP屏幕输出* 这样,下次当你运行一个命令(比如说条调试器`phpinfo();`)的时候,而该命令的输出内容又太过庞大而不能固定在一屏,它就会自动产生适合你当前屏幕的输出结果。 php > phpinfo(); ![PHP Info Output](http://www.tecmint.com/wp-content/uploads/2015/07/PHP-Info-Output.png) -PHP信息输出 + +*PHP信息输出* **8. 建议和TAB补全** @@ -58,50 +59,53 @@ PHP shell足够智能,它可以显示给你建议和进行TAB补全,你可 php > #cli.pager [TAB] -你可以一直按TAB键来获得选项,直到选项值满足要求。所有的行为都将记录到`~/.php-history`文件。 +你可以一直按TAB键来获得建议的补全,直到该值满足要求。所有的行为都将记录到`~/.php-history`文件。 要检查你的PHP交互shell活动日志,你可以执行: $ nano ~/.php_history | less ![Check PHP Interactive Shell Logs](http://www.tecmint.com/wp-content/uploads/2015/07/Check-PHP-Interactive-Shell-Logs.png) -检查PHP交互Shell日志 + +*检查PHP交互Shell日志* **9. 你可以在PHP交互shell中使用颜色,你所需要知道的仅仅是颜色代码。** -使用echo来打印各种颜色的输出结果,看我信手拈来: +使用echo来打印各种颜色的输出结果,类似这样: - php > echo “color_code1 TEXT second_color_code”; + php > echo "color_code1 TEXT second_color_code"; -一个更能说明问题的例子是: +具体来说是: php > echo "\033[0;31m Hi Tecmint \x1B[0m"; ![Enable Colors in PHP Shell](http://www.tecmint.com/wp-content/uploads/2015/07/Enable-Colors-in-PHP-Shell.png) -在PHP Shell中启用彩色 + +*在PHP Shell中启用彩色* 到目前为止,我们已经看到,按回车键意味着执行命令,然而PHP Shell中各个命令结尾的分号是必须的。 -**10. PHP shell中的用以打印后续组件的路径名称** +**10. 在PHP shell中用basename()输出路径中最后一部分** -PHP shell中的basename函数从给出的包含有到文件或目录路径的后续组件的路径名称。 +PHP shell中的basename函数可以从给出的包含有到文件或目录路径的最后部分。 basename()样例#1和#2。 php > echo basename("/var/www/html/wp/wp-content/plugins"); php > echo basename("www.tecmint.com/contact-us.html"); -上述两个样例都将输出: +上述两个样例将输出: plugins contact-us.html ![Print Base Name in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Print-Base-Name-in-PHP.png) -在PHP中打印基本名称 + +*在PHP中打印基本名称* **11. 你可以使用PHP交互shell在你的桌面创建文件(比如说test1.txt),就像下面这么简单** - $ touch("/home/avi/Desktop/test1.txt"); + php> touch("/home/avi/Desktop/test1.txt"); 我们已经见识了PHP交互shell在数学运算中有多优秀,这里还有更多一些例子会令你吃惊。 @@ -112,7 +116,8 @@ strlen函数用于获取指定字符串的长度。 php > echo strlen("tecmint.com"); ![Print Length String in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Print-Length-String-in-PHP.png) -在PHP中打印字符串长度 + +*在PHP中打印字符串长度* **13. PHP交互shell可以对数组排序,是的,你没听错** @@ -137,9 +142,10 @@ strlen函数用于获取指定字符串的长度。 ) ![Sort Arrays in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Sort-Arrays-in-PHP.png) -在PHP中对数组排序 -**14. 在PHP交互Shell中获取Pi的值** +*在PHP中对数组排序* + +**14. 在PHP交互Shell中获取π的值** php > echo pi(); @@ -151,14 +157,15 @@ strlen函数用于获取指定字符串的长度。 12.247448713916 -**16. 从0-10的范围内回显一个随机数** +**16. 从0-10的范围内挑选一个随机数** php > echo rand(0, 10); ![Get Random Number in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Get-Random-Number-in-PHP.png) -在PHP中获取随机数 -**17. 获取某个指定字符串的md5sum和sha1sum,例如,让我们在PHP Shell中检查某个字符串(比如说avi)的md5sum和sha1sum,并交叉检查这些带有bash shell生成的md5sum和sha1sum的结果。** +*在PHP中获取随机数* + +**17. 获取某个指定字符串的md5校验和sha1校验,例如,让我们在PHP Shell中检查某个字符串(比如说avi)的md5校验和sha1校验,并交叉校验bash shell生成的md5校验和sha1校验的结果。** php > echo md5(avi); 3fca379b3f0e322b7b7967bfcfb948ad @@ -175,9 +182,10 @@ strlen函数用于获取指定字符串的长度。 8f920f22884d6fea9df883843c4a8095a2e5ac6f - ![Check md5sum and sha1sum in PHP](http://www.tecmint.com/wp-content/uploads/2015/07/Check-md5sum-and-sha1sum.png) -在PHP中检查md5sum和sha1sum -这里只是PHP Shell中所能获取的功能和PHP Shell的交互特性的惊鸿一瞥,这些就是到现在为止我所讨论的一切。保持和tecmint的连线,在评论中为我们提供你有价值的反馈吧。为我们点赞并分享,帮助我们扩散哦。 +*在PHP中检查md5校验和sha1校验* + +这里只是PHP Shell中所能获取的功能和PHP Shell的交互特性的惊鸿一瞥,这些就是到现在为止我所讨论的一切。保持连线,在评论中为我们提供你有价值的反馈吧。为我们点赞并分享,帮助我们扩散哦。 -------------------------------------------------------------------------------- @@ -185,9 +193,9 @@ via: http://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/ 作者:[Avishek Kumar][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者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/avishek/ -[1]:http://www.tecmint.com/run-php-codes-from-linux-commandline/ +[1]:https://linux.cn/article-5906-1.html From 685a9945742f54247a9d66c842f01521b85cf0e1 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Wed, 29 Jul 2015 16:39:35 +0800 Subject: [PATCH 1532/2517] Translated by DongShuaike --- ...ion Swarm Clusters using Docker Machine.md | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 translated/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md diff --git a/translated/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md b/translated/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md new file mode 100644 index 0000000000..940c68b55d --- /dev/null +++ b/translated/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md @@ -0,0 +1,125 @@ +如何使用Docker Machine部署Swarm集群 +================================================================================ +大家好,今天我们来研究一下如何使用Docker Machine部署Swarm集群。Docker Machine提供了独立的Docker API,所以任何与Docker守护进程进行交互的工具都可以使用Swarm来(透明地)扩增到多台主机上。Docker Machine可以用来在个人电脑、云端以及的数据中心里创建Docker主机。它为创建服务器,安装Docker以及根据用户设定配置Docker客户端提供了便捷化的解决方案。我们可以使用任何驱动来部署swarm集群,并且swarm集群将由于使用了TLS加密具有极好的安全性。 + +下面是我提供的简便方法。 +### 1. 安装Docker Machine ### + +Docker Machine 在任何Linux系统上都被支持。首先,我们需要从Github上下载最新版本的Docker Machine。我们使用curl命令来下载最先版本Docker Machine ie 0.2.0。 +64位操作系统: + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine + +32位操作系统: + + # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386 > /usr/local/bin/docker-machine + +下载了最先版本的Docker Machine之后,我们需要对 /usr/local/bin/ 目录下的docker-machine文件的权限进行修改。命令如下: + + # chmod +x /usr/local/bin/docker-machine + +在做完上面的事情以后,我们必须确保docker-machine已经安装好。怎么检查呢?运行docker-machine -v指令,指令将会给出我们系统上所安装的docker-machine版本。 + + # docker-machine -v + +![Installing Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) + +为了让Docker命令能够在我们的机器上运行,必须还要在机器上安装Docker客户端。命令如下。 + + # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker + # chmod +x /usr/local/bin/docker + +### 2. 创建Machine ### + +在将Docker Machine安装到我们的设备上之后,我们需要使用Docker Machine创建一个machine。在这片文章中,我们会将其部署在Digital Ocean Platform上。所以我们将使用“digitalocean”作为它的Driver API,然后将docker swarm运行在其中。这个Droplet会被设置为Swarm主节点,我们还要创建另外一个Droplet,并将其设定为Swarm节点代理。 +创建machine的命令如下: + + # docker-machine create --driver digitalocean --digitalocean-access-token linux-dev + +**Note**: 假设我们要创建一个名为“linux-dev”的machine。是用户在Digital Ocean Cloud Platform的Digital Ocean控制面板中生成的密钥。为了获取这个密钥,我们需要登录我们的Digital Ocean控制面板,然后点击API选项,之后点击Generate New Token,起个名字,然后在Read和Write两个选项上打钩。之后我们将得到一个很长的十六进制密钥,这个就是了。用其替换上面那条命令中的API-Token字段。 + +现在,运行下面的指令,将Machine configuration装载进shell。 + + # eval "$(docker-machine env linux-dev)" + +![Docker Machine Digitalocean Cloud](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-digitalocean-cloud.png) + +然后,我们使用如下命令将我们的machine标记为ACTIVE状态。 + + # docker-machine active linux-dev + +现在,我们检查是否它(指machine)被标记为了 ACTIVE "*"。 + + # docker-machine ls + +![Docker Machine Active List](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-active-list.png) + +### 3. 运行Swarm Docker镜像 ### + +现在,在我们创建完成了machine之后。我们需要将swarm docker镜像部署上去。这个machine将会运行这个docker镜像并且控制Swarm主节点和从节点。使用下面的指令运行镜像: + + # docker run swarm create + +![Docker Machine Swarm Create](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-create.png) + +If you are trying to run swarm docker image using **32 bit Operating System** in the computer where Docker Machine is running, we'll need to SSH into the Droplet. +如果你想要在**32位操作系统**上运行swarm docker镜像。你需要SSH登录到Droplet当中。 + + # docker-machine ssh + #docker run swarm create + #exit + +### 4. 创建Swarm主节点 ### + +在我们的swarm image已经运行在machine当中之后,我们将要创建一个Swarm主节点。使用下面的语句,添加一个主节点。(这里的感觉怪怪的,好像少翻译了很多东西,是我把Master翻译为主节点的原因吗?) + + # docker-machine create \ + -d digitalocean \ + --digitalocean-access-token + --swarm \ + --swarm-master \ + --swarm-discovery token:// \ + swarm-master + +![Docker Machine Swarm Master Create](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-master-create.png) + +### 5. 创建Swarm结点群 ### + +现在,我们将要创建一个swarm结点,此结点将与Swarm主节点相连接。下面的指令将创建一个新的名为swarm-node的droplet,其与Swarm主节点相连。到此,我们就拥有了一个两节点的swarm集群了。 + + # docker-machine create \ + -d digitalocean \ + --digitalocean-access-token + --swarm \ + --swarm-discovery token:// \ + swarm-node + +![Docker Machine Swarm Nodes](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-nodes.png) + +### 6. Connecting to the Swarm Master ### +### 6. 与Swarm主节点连接 ### + +现在,我们连接Swarm主节点以便我们可以依照需求和配置文件在节点间部署Docker容器。运行下列命令将Swarm主节点的Machine配置文件加载到环境当中。 + + # eval "$(docker-machine env --swarm swarm-master)" + +然后,我们就可以跨结点地运行我们所需的容器了。在这里,我们还要检查一下是否一切正常。所以,运行**docker info**命令来检查Swarm集群的信息。 + + # docker info + +### Conclusion ### +### 总结 ### + +我们可以用Docker Machine轻而易举地创建Swarm集群。这种方法有非常高的效率,因为它极大地减少了系统管理员和用户的时间消耗。在这篇文章中,我们以Digital Ocean作为驱动,通过创建一个主节点和一个从节点成功地部署了集群。其他类似的应用还有VirtualBox,Google Cloud Computing,Amazon Web Service,Microsoft Azure等等。这些连接都是通过TLS进行加密的,具有很高的安全性。如果你有任何的疑问,建议,反馈,欢迎在下面的评论框中注明以便我们可以更好地提高文章的质量! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/provision-swarm-clusters-using-docker-machine/ + +作者:[Arun Pyasi][a] +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ From d2a812c5715c967171b989f64f1389b39cb5f547 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 29 Jul 2015 17:40:16 +0800 Subject: [PATCH 1533/2517] =?UTF-8?q?20150729-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ment and How Do You Enable It in Ubuntu.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md diff --git a/sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md b/sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md new file mode 100644 index 0000000000..1641bd8f20 --- /dev/null +++ b/sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md @@ -0,0 +1,72 @@ +What is Logical Volume Management and How Do You Enable It in Ubuntu? +================================================================================ +> Logical Volume Management (LVM) is a disk management option that every major Linux distribution includes. Whether you need to set up storage pools or just need to dynamically create partitions, LVM is probably what you are looking for. + +### What is LVM? ### + +Logical Volume Manager allows for a layer of abstraction between your operating system and the disks/partitions it uses. In traditional disk management your operating system looks for what disks are available (/dev/sda, /dev/sdb, etc.) and then looks at what partitions are available on those disks (/dev/sda1, /dev/sda2, etc.). + +With LVM, disks and partitions can be abstracted to contain multiple disks and partitions into one device. Your operating systems will never know the difference because LVM will only show the OS the volume groups (disks) and logical volumes (partitions) that you have set up. + +Because volume groups and logical volumes aren’t physically tied to a hard drive, it makes it easy to dynamically resize and create new disks and partitions. In addition, LVM can give you features that your file system is not capable of doing. For example, Ext3 does not have support for live snapshots, but if you’re using LVM you have the ability to take a snapshot of your logical volumes without unmounting the disk. + +### When Should You Use LVM? ### + +The first thing your should consider before setting up LVM is what you want to accomplish with your disks and partitions. Some distributions, like Fedora, install with LVM by default. + +If you are using Ubuntu on a laptop with only one internal hard drive and you don’t need extended features like live snapshots, then you may not need LVM. If you need easy expansion or want to combine multiple hard drives into a single pool of storage then LVM may be what you have been looking for. + +### Setting up LVM in Ubuntu ### + +First thing to know about using LVM is there is no easy way to convert your existing traditional partitions to logical volumes. It is possible to move to a new partition that uses LVM, but that won’t be something that we will cover in this article; instead we are going to take the approach of setting up LVM on a fresh installation of Ubuntu 10.10. + +![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/ubuntu-10-banner.png) + +To install Ubuntu using LVM you need to use the alternate install CD. Download it from the link below and burn a CD or [use unetbootin to create a USB drive][1]. + +![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/download-web.png) + +Boot your computer from the alternate install disk and select your options up until the partition disks screen and select guided – use entire disk and set up LVM. + +*Note: This will format your entire hard drive so if you are trying to dual boot or have another installation select manual instead.* + +![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-1.png) + +Select the main disk you want to use, typically your largest drive, and then go to the next step. + +![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-2.png) + +You will immediately need to write the changes to disk so make sure you selected the right disk and then write the changes. + +![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-3.png) + +Select the size you want the first logical volume to be and then continue. + +![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-4.png) + +Confirm your disk partitions and continue with the installation. + +![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-5.png) + +The final step will write the GRUB bootloader to the hard drive. It is important to note that GRUB cannot be on an LVM partition because computer BIOSes cannot directly read from a logical volume. Ubuntu will automatically create a 255 MB ext2 partition for your bootloader. + +![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-6.png) + +After the installation is complete, reboot the machine and boot into Ubuntu as normal. There should be no perceivable difference between using LVM or traditional disk management with this type of installation. + +![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/disk-manager.png) + +To use LVM to its full potential, stay tuned for our upcoming article on managing your LVM installation. + +-------------------------------------------------------------------------------- + +via: http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and-how-do-you-enable-it-in-ubuntu/ + +作者:[How-To Geek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/+howtogeek?prsrc=5 +[1]:http://www.howtogeek.com/howto/13379/create-a-bootable-ubuntu-9.10-usb-flash-drive/ \ No newline at end of file From 07d57a8f363881dc7d8b235803819e907bc43f1b Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 29 Jul 2015 22:24:39 +0800 Subject: [PATCH 1534/2517] =?UTF-8?q?=E8=A1=A5=E5=AE=8C=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @DongShuaike --- ...ion Swarm Clusters using Docker Machine.md | 127 ------------------ 1 file changed, 127 deletions(-) delete mode 100644 sources/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md diff --git a/sources/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md b/sources/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md deleted file mode 100644 index 092eb3dbbd..0000000000 --- a/sources/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md +++ /dev/null @@ -1,127 +0,0 @@ -Translating by DongShuaike - -How to Provision Swarm Clusters using Docker Machine -================================================================================ -Hi all, today we'll learn how we can deploy Swarm Clusters using Docker Machine. It serves the standard Docker API, so any tool which can communicate with a Docker daemon can use Swarm to transparently scale to multiple hosts. Docker Machine is an application that helps to create Docker hosts on our computer, on cloud providers and inside our own data center. It provides easy solution for creating servers, installing Docker on them and then configuring the Docker client according the users configuration and requirements. We can provision swarm clusters with any driver we need and is highly secured with TLS Encryption. - -Here are some quick and easy steps on how to provision swarm clusters with Docker Machine. - -### 1. Installing Docker Machine ### - -Docker Machine supports awesome on every Linux Operating System. First of all, we'll need to download the latest version of Docker Machine from the Github site . Here, we'll use curl to download the latest version of Docker Machine ie 0.2.0 . - -For 64 Bit Operating System - - # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine - -For 32 Bit Operating System - - # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386 > /usr/local/bin/docker-machine - -After downloading the latest release of Docker Machine, we'll make the file named docker-machine under /usr/local/bin/ executable using the command below. - - # chmod +x /usr/local/bin/docker-machine - -After doing the above, we'll wanna ensure that we have successfully installed docker-machine. To check it, we can run the docker-machine -v which will give output of the version of docker-machine installed in our system. - - # docker-machine -v - -![Installing Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) - -To enable Docker commands on our machines, make sure to install the Docker client as well by running the command below. - - # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker - # chmod +x /usr/local/bin/docker - -### 2. Creating Machine ### - -After installing Machine into our working PC or device, we'll wanna go forward to create a machine using Docker Machine. Here, in this tutorial we'll gonna deploy a machine in the Digital Ocean Platform so we'll gonna use "digitalocean" as its Driver API then, docker swarm will be running into that Droplet which will be further configured as Swarm Master and another droplet will be created which will be configured as Swarm Node Agent. - -So, to create the machine, we'll need to run the following command. - - # docker-machine create --driver digitalocean --digitalocean-access-token linux-dev - -**Note**: Here, linux-dev is the name of the machine we are wanting to create. is a security key which can be generated from the Digital Ocean Control Panel of the account holder of Digital Ocean Cloud Platform. To retrieve that key, we simply need to login to our Digital Ocean Control Panel then click on API, then click on Generate New Token and give it a name tick on both Read and Write. Then we'll get a long hex key, thats the now, simply replace it into the command above. - -Now, to load the Machine configuration into the shell we are running the comamands, run the following command. - - # eval "$(docker-machine env linux-dev)" - -![Docker Machine Digitalocean Cloud](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-digitalocean-cloud.png) - -Then, we'll mark our machine as ACTIVE by running the below command. - - # docker-machine active linux-dev - -Now, we'll check whether its been marked as ACTIVE "*" or not. - - # docker-machine ls - -![Docker Machine Active List](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-active-list.png) - -### 3. Running Swarm Docker Image ### - -Now, after we finish creating the required machine. We'll gonna deploy swarm docker image in our active machine. This machine will run the docker image and will control over the Swarm master and node. To run the image, we can simply run the below command. - - # docker run swarm create - -![Docker Machine Swarm Create](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-create.png) - -If you are trying to run swarm docker image using **32 bit Operating System** in the computer where Docker Machine is running, we'll need to SSH into the Droplet. - - # docker-machine ssh - #docker run swarm create - #exit - -### 4. Creating Swarm Master ### - -Now, after our machine and swarm image is running into the machine, we'll now create a Swarm Master. This will also add the master as a node. To do so, here's the command below. - - # docker-machine create \ - -d digitalocean \ - --digitalocean-access-token - --swarm \ - --swarm-master \ - --swarm-discovery token:// \ - swarm-master - -![Docker Machine Swarm Master Create](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-master-create.png) - -### 5. Creating Swarm Nodes ### - -Now, we'll create a swarm node which will get connected with the Swarm Master. The command below will create a new droplet which will be named as swarm-node and will get connected with the Swarm Master as node. This will create a Swarm cluster across the two nodes. - - # docker-machine create \ - -d digitalocean \ - --digitalocean-access-token - --swarm \ - --swarm-discovery token:// \ - swarm-node - -![Docker Machine Swarm Nodes](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-nodes.png) - -### 6. Connecting to the Swarm Master ### - -We, now connect to the Swarm Master so that we can deploy Docker containers across the nodes as per the requirement and configuration. To load the Swarm Master's Machine configuration into our environment, we can run the below command. - - # eval "$(docker-machine env --swarm swarm-master)" - -After that, we can run the required containers of our choice across the nodes. Here, we'll check if everything went fine or not. So, we'll run **docker info** to check the information about the Swarm Clusters. - - # docker info - -### Conclusion ### - -We can pretty easily create Swarm Cluster with Docker Machine. This method is a lot productive because it reduces a lot of time of a system admin or users. In this article, we successfully provisioned clusters by creating a master and a node using a machine with Digital Ocean as driver. It can be created using any driver like VirtualBox, Google Cloud Computing, Amazon Web Service, Microsoft Azure and more according to the need and requirement of the user and the connection is highly secured with TLS Encryption. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/provision-swarm-clusters-using-docker-machine/ - -作者:[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/ From 92dc1ab34b83aaf48e3b5a864a372d8fc1984827 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 30 Jul 2015 17:48:22 +0800 Subject: [PATCH 1535/2517] =?UTF-8?q?20150730-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...TOP (IT Operational Portal) on CentOS 7.md | 174 ++++++++++++++++++ ... or Load Balancer with Weave and Docker.md | 126 +++++++++++++ 2 files changed, 300 insertions(+) create mode 100644 sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md create mode 100644 sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md diff --git a/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md b/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md new file mode 100644 index 0000000000..38477bb662 --- /dev/null +++ b/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md @@ -0,0 +1,174 @@ +How to Setup iTOP (IT Operational Portal) on CentOS 7 +================================================================================ +iTOP is a simple, Open source web based IT Service Management tool. It has all of ITIL functionality that includes with Service desk, Configuration Management, Incident Management, Problem Management, Change Management and Service Management. iTop relays on Apache/IIS, MySQL and PHP, so it can run on any operating system supporting these applications. Since iTop is a web based application you don’t need to deploy any client software on each user’s PC. A simple web browser is enough to perform day to day operations of an IT environment with iTOP. + +To install and configure iTOP we will be using CentOS 7 as base operating with basic LAMP Stack environment installed on it that will cover its almost all prerequisites. + +### Downloading iTOP ### + +iTop download package is present on SourceForge, we can get its link from their official website [link][1]. + +![itop download](http://blog.linoxide.com/wp-content/uploads/2015/07/1-itop-download.png) + +We will the download link from here and get this zipped file on server with wget command as below. + + [root@centos-007 ~]# wget http://downloads.sourceforge.net/project/itop/itop/2.1.0/iTop-2.1.0-2127.zip + +### iTop Extensions and Web Setup ### + +By using unzip command we will extract the downloaded packages in the document root directory of our apache web server in a new directory with name itop. + + [root@centos-7 ~]# ls + iTop-2.1.0-2127.zip + [root@centos-7 ~]# unzip iTop-2.1.0-2127.zip -d /var/www/html/itop/ + +List the folder to view installation packages in it. + + [root@centos-7 ~]# ls -lh /var/www/html/itop/ + total 68K + -rw-r--r--. 1 root root 1.4K Dec 17 2014 INSTALL + -rw-r--r--. 1 root root 35K Dec 17 2014 LICENSE + -rw-r--r--. 1 root root 23K Dec 17 2014 README + drwxr-xr-x. 19 root root 4.0K Jul 14 13:10 web + +Here is all the extensions that we can install. + + [root@centos-7 2.x]# ls + authent-external itop-backup itop-config-mgmt itop-problem-mgmt itop-service-mgmt-provider itop-welcome-itil + authent-ldap itop-bridge-virtualization-storage itop-datacenter-mgmt itop-profiles-itil itop-sla-computation version.xml + authent-local itop-change-mgmt itop-endusers-devices itop-request-mgmt itop-storage-mgmt wizard-icons + installation.xml itop-change-mgmt-itil itop-incident-mgmt-itil itop-request-mgmt-itil itop-tickets + itop-attachments itop-config itop-knownerror-mgmt itop-service-mgmt itop-virtualization-mgmt + +Now from the extracted web directory, moving through different data models we will migrate the required extensions from the datamodels into the web extensions directory of web document root directory with copy command. + + [root@centos-7 2.x]# pwd + /var/www/html/itop/web/datamodels/2.x + [root@centos-7 2.x]# cp -r itop-request-mgmt itop-service-mgmt itop-service-mgmt itop-config itop-change-mgmt /var/www/html/itop/web/extensions/ + +### Installing iTop Web Interface ### + +Most of our server side settings and configurations are done.Finally we need to complete its web interface installation process to finalize the setup. + +Open your favorite web browser and access the WordPress web directory in your web browser using your server IP or FQDN like. + + http://servers_ip_address/itop/web/ + +You will be redirected towards the web installation process for iTop. Let’s configure it as per your requirements like we did here in this tutorial. + +#### Prerequisites Validation #### + +At the stage you will be prompted for welcome screen with prerequisites validation ok. If you get some warning then you have to make resolve it by installing its prerequisites. + +![mcrypt missing](http://blog.linoxide.com/wp-content/uploads/2015/07/2-itop-web-install.png) + +At this stage one optional package named php mcrypt will be missing. Download the following rpm package then try to install php mcrypt package. + + [root@centos-7 ~]#yum localinstall php-mcrypt-5.3.3-1.el6.x86_64.rpm libmcrypt-2.5.8-9.el6.x86_64.rpm. + +After successful installation of php-mcrypt library we need to restart apache web service, then reload the web page and this time its prerequisites validation should be OK. + +#### Install or Upgrade iTop #### + +Here we will choose the fresh installation as we have not installed iTop previously on our server. + +![Install New iTop](http://blog.linoxide.com/wp-content/uploads/2015/07/3.png) + +#### iTop License Agreement #### + +Chose the option to accept the terms of the licenses of all the components of iTop and click "NEXT". + +![License Agreement](http://blog.linoxide.com/wp-content/uploads/2015/07/4.png) + +#### Database Configuration #### + +Here we the do Configuration of the database connection by giving our database servers credentials and then choose from the option to create new database as shown. + +![DB Connection](http://blog.linoxide.com/wp-content/uploads/2015/07/5.png) + +#### Administrator Account #### + +In this step we will configure an Admin account by filling out its login details as. + +![Admin Account](http://blog.linoxide.com/wp-content/uploads/2015/07/6.png) + +#### Miscellaneous Parameters #### + +Let's choose the additional parameters whether you want to install with demo contents or with fresh database and proceed forward. + +![Misc Parameters](http://blog.linoxide.com/wp-content/uploads/2015/07/7.png) + +### iTop Configurations Management ### + +The options below allow you to configure the type of elements that are to be managed inside iTop like all the base objects that are mandatory in the iTop CMDB, Manage Data Center devices, storage device and virtualization. + +![Conf Management](http://blog.linoxide.com/wp-content/uploads/2015/07/8.png) + +#### Service Management #### + +Select from the choices that best describes the relationships between the services and the IT infrastructure in your IT environment. So we are choosing Service Management for Service Providers here. + +![Service Management](http://blog.linoxide.com/wp-content/uploads/2015/07/9.png) + +#### iTop Tickets Management #### + +From the different available options we will Select the ITIL Compliant Tickets Management option to have different types of ticket for managing user requests and incidents. + +![Ticket Management](http://blog.linoxide.com/wp-content/uploads/2015/07/10.png) + +#### Change Management Options #### + +Select the type of tickets you want to use in order to manage changes to the IT infrastructure from the available options. We are going to choose ITIL change management option here. + +![ITIL Change](http://blog.linoxide.com/wp-content/uploads/2015/07/11.png) + +#### iTop Extensions #### + +In this section we can select the additional extensions to install or we can unchecked the ones that you want to skip. + +![iTop Extensions](http://blog.linoxide.com/wp-content/uploads/2015/07/13.png) + +### Ready to Start Web Installation ### + +Now we are ready to start installing the components that we choose in previous steps. We can also drop down these installation parameters to view our configuration from the drop down. + +Once you are confirmed with the installation parameters click on the install button. + +![Installation Parameters](http://blog.linoxide.com/wp-content/uploads/2015/07/16.png) + +Let's wait for the progress bar to complete the installation process. It might takes few minutes to complete its installation process. + +![iTop Installation Process](http://blog.linoxide.com/wp-content/uploads/2015/07/17.png) + +### iTop Installation Done ### + +Our iTop installation setup is complete, just need to do a simple manual operation as shown and then click to enter iTop. + +![iTop Done](http://blog.linoxide.com/wp-content/uploads/2015/07/18.png) + +### Welcome to iTop (IT Operational Portal) ### + +![itop welcome note](http://blog.linoxide.com/wp-content/uploads/2015/07/20.png) + +### iTop Dashboard ### + +You can manage configuration of everything from here Servers, computers, Contacts, Locations, Contracts, Network devices…. You can create your own. Just the fact, that the installed CMDB module is great which is an essential part of every bigger IT. + +![iTop Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/07/19.png) + +### Conclusion ### + +ITOP is one of the best Open Source Service Desk solutions. We have successfully installed and configured it on our CentOS 7 cloud host. So, the most powerful aspect of iTop is the ease with which it can be customized via its “extensions”. Feel free to comment if you face any trouble during its setup. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/setup-itop-centos-7/ + +作者:[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/ +[1]:http://www.combodo.com/spip.php?page=rubrique&id_rubrique=8 \ No newline at end of file diff --git a/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md b/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md new file mode 100644 index 0000000000..82c592d3b4 --- /dev/null +++ b/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md @@ -0,0 +1,126 @@ +Howto Configure Nginx as Rreverse Proxy / Load Balancer with Weave and Docker +================================================================================ +Hi everyone today we'll learnHowto configure Nginx as Rreverse Proxy / Load balancer with Weave and Docker Weave creates a virtual network that connects Docker containers with each other, deploys across multiple hosts and enables their automatic discovery. It allows us to focus on developing our application, rather than our infrastructure. It provides such an awesome environment that the applications uses the network as if its containers were all plugged into the same network without need to configure ports, mappings, link, etc. The services of the application containers on the network can be easily accessible to the external world with no matter where its running. Here, in this tutorial we'll be using weave to quickly and easily deploy nginx web server as a load balancer for a simple php application running in docker containers on multiple nodes in Amazon Web Services. Here, we will be introduced to WeaveDNS, which provides a simple way for containers to find each other using hostname with no changes in codes and tells other containers to connect to those names. + +Here, in this tutorial, we will use Nginx to load balance requests to a set of containers running Apache. Here are the simple and easy to do steps on using Weave to configure nginx as a load balancer running in ubuntu docker container. + +### 1. Settting up AWS Instances ### + +First of all, we'll need to setup Amazon Web Service Instances so that we can run docker containers with Weave and Ubuntu as Operating System. We will use the [AWS CLI][1] to setup and configure two AWS EC2 instances. Here, in this tutorial, we'll use the smallest available instances, t1.micro. We will need to have a valid **Amazon Web Services account** with AWS CLI setup and configured. We'll first gonna clone the repository of weave from the github by running the following command in AWS CLI. + + $ git clone http://github.com/fintanr/weave-gs + $ cd weave-gs/aws-nginx-ubuntu-simple + +After cloning the repository, we wanna run the script that will deploy two instances of t1.micro instance running Weave and Docker in Ubuntu Operating System. + + $ sudo ./demo-aws-setup.sh + +Here, for this tutorial we'll need the IP addresses of these instances further in future. These are stored in an environment file weavedemo.env which is created during the execution of the demo-aws-setup.sh. To get those ip addresses, we need to run the following command which will give the output similar to the output below. + + $ cat weavedemo.env + + export WEAVE_AWS_DEMO_HOST1=52.26.175.175 + export WEAVE_AWS_DEMO_HOST2=52.26.83.141 + export WEAVE_AWS_DEMO_HOSTCOUNT=2 + export WEAVE_AWS_DEMO_HOSTS=(52.26.175.175 52.26.83.141) + +Please note these are not the IP addresses for our tutorial, AWS dynamically allocate IP addresses to our instances. + +As were are using a bash, we will just source this file and execute it using the command below. + + . ./weavedemo.env + +### 2. Launching Weave and WeaveDNS ### + +After deploying the instances, we'll want to launch weave and weavedns on each hosts. Weave and weavedns allows us to easily deploy our containers to a new infrastructure and configuration without the need of changing the codes and without the need to understand concepts such as ambassador containers and links. Here are the commands to launch them in the first host. + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 + $ sudo weave launch + $ sudo weave launch-dns 10.2.1.1/24 + +Next, we'll also wanna launch them in our second host. + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 + $ sudo weave launch $WEAVE_AWS_DEMO_HOST1 + $ sudo weave launch-dns 10.2.1.2/24 + +### 3. Launching Application Containers ### + +Now, we wanna launch six containers across our two hosts running an Apache2 Web Server instance with our simple php site. So, we'll be running the following commands which will run 3 containers running Apache2 Web Server on our 1st instance. + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 + $ sudo weave run --with-dns 10.3.1.1/24 -h ws1.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.2/24 -h ws2.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.3/24 -h ws3.weave.local fintanr/weave-gs-nginx-apache + +After that, we'll again launch 3 containers running apache2 web server in our 2nd instance as shown below. + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 + $ sudo weave run --with-dns 10.3.1.4/24 -h ws4.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.5/24 -h ws5.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.6/24 -h ws6.weave.local fintanr/weave-gs-nginx-apache + +Note: Here, --with-dns option tells the container to use weavedns to resolve names and -h x.weave.local allows the host to be resolvable with WeaveDNS. + +### 4. Launching Nginx Container ### + +After our application containers are running well as expected, we'll wanna launch an nginx container which contains the nginx configuration which will round-robin across the severs for the reverse proxy or load balancing. To run the nginx container, we'll need to run the following command. + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 + $ sudo weave run --with-dns 10.3.1.7/24 -ti -h nginx.weave.local -d -p 80:80 fintanr/weave-gs-nginx-simple + +Hence, our Nginx container is publicly exposed as a http server on $WEAVE_AWS_DEMO_HOST1. + +### 5. Testing the Load Balancer ### + +To test our load balancer is working or not, we'll run a script that will make http requests to our nginx container. We'll make six requests so that we can see nginx moving through each of the webservers in round-robin turn. + + $ ./access-aws-hosts.sh + + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws1.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws2.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws3.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws4.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws5.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws6.weave.local", + "date" : "2015-06-26 12:24:23" + } + +### Conclusion ### + +Finally, we've successfully configured nginx as a reverse proxy or load balancer with weave and docker running ubuntu server in AWS (Amazon Web Service) EC2 . From the above output in above step, it is clear that we have configured it correctly. We can see that the request is being sent to 6 application containers in round-robin turn which is running a PHP app hosted in apache web server. Here, weave and weavedns did great work to deploy a containerised PHP application using nginx across multiple hosts on AWS EC2 without need to change in codes and connected the containers to eachother with the hostname using weavedns. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/nginx-load-balancer-weave-docker/ + +作者:[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/ +[1]:http://console.aws.amazon.com/ \ No newline at end of file From b0452f98fac85ec842786a5e91371484ba4b16fe Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 30 Jul 2015 18:19:51 +0800 Subject: [PATCH 1536/2517] =?UTF-8?q?20150730-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150730 Compare PDF Files on Ubuntu.md | 47 +++++ ... Must-Know Linux Commands For New Users.md | 185 ++++++++++++++++++ 2 files changed, 232 insertions(+) create mode 100644 sources/tech/20150730 Compare PDF Files on Ubuntu.md create mode 100644 sources/tech/20150730 Must-Know Linux Commands For New Users.md diff --git a/sources/tech/20150730 Compare PDF Files on Ubuntu.md b/sources/tech/20150730 Compare PDF Files on Ubuntu.md new file mode 100644 index 0000000000..9612f0430e --- /dev/null +++ b/sources/tech/20150730 Compare PDF Files on Ubuntu.md @@ -0,0 +1,47 @@ +Compare PDF Files on Ubuntu +================================================================================ +If you want to compare PDF files you can use one of the following utility + +### Comparepdf ### + +comparepdf is a command line application used to compare two PDF files.The default comparison mode is text mode where the text of each corresponding pair of pages is compared. As soon as a difference is detected the program terminates with a message (unless -v0 is set) and an indicative return code. + +The OPTIONS are -ct or --compare=text (the default) for text mode comparisons or -ca or --compare=appearance for visual comparisons (useful if diagrams or other images have changed), and -v=1 or --verbose=1 for reporting differences (and saying nothing for matching files): use -v=0 for no reporting or -v=2 for reporting both different and matching files. + +### Install Comparepdf on ubuntu ### + +Open the terminal and run the following command + + sudo apt-get install comparepdf + +**Comparepdf syntax** + + comparepdf [OPTIONS] file1.pdf file2.pdf + +**Diffpdf** + +DiffPDF is a GUI application used to compare two PDF files.By default the comparison is of the text on each pair of pages, but comparing the visual appearance of pages is also supported (for example, if a diagram is changed or if a paragraph is reformatted). It is also possible to compare pticular pages or page ranges. For example, if there are two versions of a PDF file, one with pages 1-12 and the other with pages 1-13 because of an extra page having been added as page 4, they can be compared by specifying two page ranges, 1-12 for the first and 1-3, 5-13 for the second. This will make DiffPDF compare pages in the pairs (1, 1), (2, 2), (3, 3), (4, 5), (5, 6), and so on, to (12, 13). + +### Install diffpdf on ubuntu ### + +Open the terminal and run the following command + + sudo apt-get install diffpdf + +### Screenshots ### + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/07/14.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/07/23.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/compare-pdf-files-on-ubuntu.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 \ No newline at end of file diff --git a/sources/tech/20150730 Must-Know Linux Commands For New Users.md b/sources/tech/20150730 Must-Know Linux Commands For New Users.md new file mode 100644 index 0000000000..ea21c001e0 --- /dev/null +++ b/sources/tech/20150730 Must-Know Linux Commands For New Users.md @@ -0,0 +1,185 @@ +Must-Know Linux Commands For New Users +================================================================================ +![Manage system updates via the command line with dnf on Fedora.](http://www.linux.com/images/stories/41373/fedora-cli.png) +Manage system updates via the command line with dnf on Fedora. + +One of the beauties of Linux-based systems is that you can manage your entire system right from the terminal using the command line. The advantage of using the command line is that you can use the same knowledge and skills to manage any Linux distribution. + +This is not possible through the graphical user interface (GUI) as each distro, and desktop environment (DE), offers its own user interfaces. To be clear, there are cases in which you will need different commands to perform certain tasks on different distributions, but more or less the concept and ideas remain the same. + +In this article, we are going to talk about some of the basic commands that a new Linux user should know. I will show you how to update your system, manage software, manipulate files and switch to root using the command line on three major distributions: Ubuntu (which also includes its flavors and derivatives, and Debian), openSUSE and Fedora. + +*Let's get started!* + +### Keep your system safe and up-to-date ### + +Linux is secure by design, but the fact is that all software has bugs and there could be security holes. So it's very important to keep your system updated. Think of it this way: Running an out-of-date operating system is like being in an armored tank with the doors unlocked. Will the armor protect you? Anyone can enter through the open doors and cause harm. Similarly there can be un-patched holes in your OS which can compromise your systems. Open source communities, unlike the proprietary world, are extremely quick at patching holes, so if you keep your system updated you'll stay safe. + +Keep an eye on news sites to be aware of security vulnerabilities. If there is a hole discovered, read about it and update your system as soon as a patch is out. Either way you must make it a practice to run the update commands at least once a week on production machines. If you are running a complicated server then be extra careful and go through the changelog to ensure updates won't break your customization. + +**Ubuntu**: Bear one thing in mind: you must always refresh repositories (aka repos) before upgrading the system or installing any software. On Ubuntu, you can update your system with the following commands. The first command refreshes repositories: + + sudo apt-get update + +Once the repos are updated you can now run the system update command: + + sudo apt-get upgrade + +However this command doesn't update the kernel and some other packages, so you must also run this command: + + sudo apt-get dist-upgrade + +**openSUSE**: If you are on openSUSE, you can update the system using these commands (as usual, the first command is meant to update repos) + + sudo zypper refresh + sudo zypper up + +**Fedora**: If you are on Fedora, you can use the 'dnf' command which is 'kind' of equivalent to zypper and apt-get: + + sudo dnf update + sudo dnf upgrade + +### Software installation and removal ### + +You can install only those packages which are available in the repositories enabled on your system. Every distro comes with some official or third-party repos enabled by default. + +**Ubuntu**: To install any package on Ubuntu, first update the repo and then use this syntax: + + sudo apt-get install [package_name] + +Example: + + sudo apt-get install gimp + +**openSUSE**: The commands would be: + + sudo zypper install [package_name] + +**Fedora**: Fedora has dropped 'yum' and now uses 'dnf' so the command would be: + + sudo dnf install [package_name] + +The procedure to remove the software is the same, just exchange 'install' with 'remove'. + +**Ubuntu**: + + sudo apt-get remove [package_name] + +**openSUSE**: + + sudo zypper remove [package_name] + +**Fedora**: + + sudo dnf remove [package_name] + +### How to manage third party software? ### + +There is a huge community of developers who offer their software to users. Different distributions use different mechanisms to make third party software available to their users. It also depends on how a developer offers their software to users; some offer binaries and others offer it through repositories. + +Ubuntu heavily relies on PPAs (personal package archives) but, unfortunately, there is no built-in tool which can assist a user in searching PPAs. You will need to Google the PPA and then add the repository manually before installing the software. This is how you would add any PPA to your system: + + sudo add-apt-repository ppa: + +Example: Let's say I want to add LibreOffice PPA to my system. I would Google the PPA and then acquire the repo name from Launchpad, which in this case is "libreoffice/ppa". Then add the ppa using the following command: + + sudo add-apt-repository ppa:libreoffice/ppa + +It will ask you to hit the Enter key in order to import the keys. Once it's done, refresh the repos with the 'update' command and then install the package. + +openSUSE has an elegant solution for third-party apps. You can visit software.opensuse.org, search for the package and install it with one click. It will automatically add the repo to your system. If you want to add any repo manually, use this command:. + + sudo zypper ar -f url_of_the_repo name_of_repo + sudo zypper ar -f http://download.opensuse.org/repositories/LibreOffice:Factory/openSUSE_13.2/LibreOffice:Factory.repo LOF + +Then refresh the repo and install software: + + sudo zypper refresh + sudo zypper install libreoffice + +Fedora users can simply add RPMFusion (both free and non-free repos) which contain a majority of applications. In case you do need to add a repo, this is the command: + +dnf config-manager --add-repo http://www.example.com/example.repo + +### Some basic commands ### + +I have written a few [articles][1] on how to manage files on your system using the CLI, here are some of the basic commands which are common across all distributions. + +Copy files or directories to a new location: + + cp path_of_file_1 path_of_the_directory_where_you_want_to_copy/ + +Copy all files from a directory to a new location (notice the slash and asterisk, which implies all files within that directory): + + cp path_of_files/* path_of_the_directory_where_you_want_to_copy/ + +Move a file from one location to another (the trailing slash means inside that directory): + + mv path_of_file_1 path_of_the_directory_where_you_want_to_move/ + +Move all file from one location to another: + + mv path_of_directory_where_files_are/* path_of_the_directory_where_you_want_to_move/ + +Delete a file: + + rm path_of_file + +Delete a directory: + + rm -r path_of_directory + +Remove all content from the directory, leaving the directory folder intact: + + rm -r path_of_directory/* + +### Create new directory ### + +To create a new directory, first enter the location where you want to create a directory. Let's say you want to create a 'foundation' folder inside your Documents directory. Let's change the directory using the cd (aka change directory) command: + + cd /home/swapnil/Documents + +(exchange 'swapnil with the user on your system) + +Then create the directory with mkdir command: + + mkdir foundation + +You can also create a directory from anywhere, by giving the path of the directory. For example: + + mdkir /home/swapnil/Documents/foundation + +If you want to create parent-child directories, which means directories within other directories then use the -p option. It will create all directories in the given path: + + mdkir -p /home/swapnil/Documents/linux/foundation + +### Become root ### + +You either need to be root or the user should have sudo powers to perform some administrative tasks such as managing packages or making changes to the root directories or files. An example would be to edit the 'fstab' file which keeps a record of mounted hard drives. It's inside the 'etc' directory which is within the root directory. You can make changes to this file only as a super user. In most distros you can become root by 'switching user'. Let's say on openSUSE I want to become root as I am going to work inside the root directory. You can use either command: + + sudo su - + +Or + + su - + +That will ask for the password and then you will have root privileges. Keep one point in mind: never run your system as root user unless you know what you are doing. Another important point to note is that the files or directories you modify as root also change ownership of those files from that user or specific service to root. You may have to revert the ownership of those files otherwise the services or users won't be able to to access or write to those files. To change users, this is the command: + + sudo chown -R user:user /path_of_file_or_directory + +You may often need this when you have partitions from other distros mounted on the system. When you try to access files on such partitions, you may come across a permission denied error. You can simply change the ownership of such partitions to access them. Just be extra careful, don't change permissions or ownership of root directories. + +These are the basic commands any new Linux user needs. If you have any questions or if you want us to cover a specific topic, please mention them in the comments below. + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/learn/tutorials/842251-must-know-linux-commands-for-new-users + +作者:[Swapnil Bhartiya][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/61003 +[1]:http://www.linux.com/learn/tutorials/828027-how-to-manage-your-files-from-the-command-line \ No newline at end of file From 29c54a558a994752cf69ae812866e79eab6ea135 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 30 Jul 2015 21:03:28 +0800 Subject: [PATCH 1537/2517] PUB:20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux @GOLinux --- ...es and Units Using 'Systemctl' in Linux.md | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) rename {translated/tech => published}/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md (95%) diff --git a/translated/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md b/published/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md similarity index 95% rename from translated/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md rename to published/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md index a78dc01820..e8b8466f90 100644 --- a/translated/tech/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md +++ b/published/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md @@ -1,13 +1,14 @@ -在Linux中使用‘Systemctl’管理‘Systemd’服务和单元 +systemctl 完全指南 ================================================================================ Systemctl是一个systemd工具,主要负责控制systemd系统和服务管理器。 Systemd是一个系统管理守护进程、工具和库的集合,用于取代System V初始进程。Systemd的功能是用于集中管理和配置类UNIX系统。 -在Linux生态系统中,Systemd被部署到了大多数的标准Linux发行版中,只有位数不多的几个尚未部署。Systemd通常是所有其它守护进程的父进程,但并非总是如此。 +在Linux生态系统中,Systemd被部署到了大多数的标准Linux发行版中,只有为数不多的几个发行版尚未部署。Systemd通常是所有其它守护进程的父进程,但并非总是如此。 ![Manage Linux Services Using Systemctl](http://www.tecmint.com/wp-content/uploads/2015/04/Manage-Linux-Services-Using-Systemctl.jpg) -使用Systemctl管理Linux服务 + +*使用Systemctl管理Linux服务* 本文旨在阐明在运行systemd的系统上“如何控制系统和服务”。 @@ -41,11 +42,9 @@ Systemd是一个系统管理守护进程、工具和库的集合,用于取代S root 555 1 0 16:27 ? 00:00:00 /usr/lib/systemd/systemd-logind dbus 556 1 0 16:27 ? 00:00:00 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation -**注意**:systemd是作为父进程(PID=1)运行的。在上面带(-e)参数的ps命令输出中,选择所有进程,(- +**注意**:systemd是作为父进程(PID=1)运行的。在上面带(-e)参数的ps命令输出中,选择所有进程,(-a)选择除会话前导外的所有进程,并使用(-f)参数输出完整格式列表(即 -eaf)。 -a)选择除会话前导外的所有进程,并使用(-f)参数输出完整格式列表(如 -eaf)。 - -也请注意上例中后随的方括号和样例剩余部分。方括号表达式是grep的字符类表达式的一部分。 +也请注意上例中后随的方括号和例子中剩余部分。方括号表达式是grep的字符类表达式的一部分。 #### 4. 分析systemd启动进程 #### @@ -147,7 +146,7 @@ a)选择除会话前导外的所有进程,并使用(-f)参数输出完 1 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'. -#### 10. 检查某个单元(cron.service)是否启用 #### +#### 10. 检查某个单元(如 cron.service)是否启用 #### # systemctl is-enabled crond.service @@ -187,7 +186,7 @@ a)选择除会话前导外的所有进程,并使用(-f)参数输出完 dbus-org.fedoraproject.FirewallD1.service enabled .... -#### 13. Linux中如何启动、重启、停止、重载服务以及检查服务(httpd.service)状态 #### +#### 13. Linux中如何启动、重启、停止、重载服务以及检查服务(如 httpd.service)状态 #### # systemctl start httpd.service # systemctl restart httpd.service @@ -214,15 +213,15 @@ a)选择除会话前导外的所有进程,并使用(-f)参数输出完 Apr 28 17:21:30 tecmint systemd[1]: Started The Apache HTTP Server. Hint: Some lines were ellipsized, use -l to show in full. -**注意**:当我们使用systemctl的start,restart,stop和reload命令时,我们不会不会从终端获取到任何输出内容,只有status命令可以打印输出。 +**注意**:当我们使用systemctl的start,restart,stop和reload命令时,我们不会从终端获取到任何输出内容,只有status命令可以打印输出。 -#### 14. 如何激活服务并在启动时启用或禁用服务(系统启动时自动启动服务) #### +#### 14. 如何激活服务并在启动时启用或禁用服务(即系统启动时自动启动服务) #### # systemctl is-active httpd.service # systemctl enable httpd.service # systemctl disable httpd.service -#### 15. 如何屏蔽(让它不能启动)或显示服务(httpd.service) #### +#### 15. 如何屏蔽(让它不能启动)或显示服务(如 httpd.service) #### # systemctl mask httpd.service ln -s '/dev/null' '/etc/systemd/system/httpd.service' @@ -297,7 +296,7 @@ a)选择除会话前导外的所有进程,并使用(-f)参数输出完 # systemctl enable tmp.mount # systemctl disable tmp.mount -#### 20. 在Linux中屏蔽(让它不能启动)或显示挂载点 #### +#### 20. 在Linux中屏蔽(让它不能启用)或可见挂载点 #### # systemctl mask tmp.mount @@ -375,7 +374,7 @@ a)选择除会话前导外的所有进程,并使用(-f)参数输出完 CPUShares=2000 -**注意**:当你为某个服务设置CPUShares,会自动创建一个以服务名命名的目录(httpd.service),里面包含了一个名为90-CPUShares.conf的文件,该文件含有CPUShare限制信息,你可以通过以下方式查看该文件: +**注意**:当你为某个服务设置CPUShares,会自动创建一个以服务名命名的目录(如 httpd.service),里面包含了一个名为90-CPUShares.conf的文件,该文件含有CPUShare限制信息,你可以通过以下方式查看该文件: # vi /etc/systemd/system/httpd.service.d/90-CPUShares.conf @@ -528,13 +527,13 @@ a)选择除会话前导外的所有进程,并使用(-f)参数输出完 #### 35. 启动运行等级5,即图形模式 #### # systemctl isolate runlevel5.target - OR + 或 # systemctl isolate graphical.target #### 36. 启动运行等级3,即多用户模式(命令行) #### # systemctl isolate runlevel3.target - OR + 或 # systemctl isolate multiuser.target #### 36. 设置多用户模式或图形模式为默认运行等级 #### @@ -572,7 +571,7 @@ via: http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux 作者:[Avishek Kumar][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From dc8ba02e754ba942f2b89627d05a4044aa97e7af Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 31 Jul 2015 08:11:39 +0800 Subject: [PATCH 1538/2517] Update 20150730 Compare PDF Files on Ubuntu.md --- sources/tech/20150730 Compare PDF Files on Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150730 Compare PDF Files on Ubuntu.md b/sources/tech/20150730 Compare PDF Files on Ubuntu.md index 9612f0430e..6319508af5 100644 --- a/sources/tech/20150730 Compare PDF Files on Ubuntu.md +++ b/sources/tech/20150730 Compare PDF Files on Ubuntu.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Compare PDF Files on Ubuntu ================================================================================ If you want to compare PDF files you can use one of the following utility @@ -44,4 +45,4 @@ via: http://www.ubuntugeek.com/compare-pdf-files-on-ubuntu.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file +[a]:http://www.ubuntugeek.com/author/ubuntufix From 2fe341d9fc32764011f35ecb459afbba39f066b4 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 31 Jul 2015 08:41:12 +0800 Subject: [PATCH 1539/2517] [Translated]20150730 Compare PDF Files on Ubuntu.md --- .../20150730 Compare PDF Files on Ubuntu.md | 48 ------------------- .../20150730 Compare PDF Files on Ubuntu.md | 48 +++++++++++++++++++ 2 files changed, 48 insertions(+), 48 deletions(-) delete mode 100644 sources/tech/20150730 Compare PDF Files on Ubuntu.md create mode 100644 translated/tech/20150730 Compare PDF Files on Ubuntu.md diff --git a/sources/tech/20150730 Compare PDF Files on Ubuntu.md b/sources/tech/20150730 Compare PDF Files on Ubuntu.md deleted file mode 100644 index 6319508af5..0000000000 --- a/sources/tech/20150730 Compare PDF Files on Ubuntu.md +++ /dev/null @@ -1,48 +0,0 @@ -Translating by GOLinux! -Compare PDF Files on Ubuntu -================================================================================ -If you want to compare PDF files you can use one of the following utility - -### Comparepdf ### - -comparepdf is a command line application used to compare two PDF files.The default comparison mode is text mode where the text of each corresponding pair of pages is compared. As soon as a difference is detected the program terminates with a message (unless -v0 is set) and an indicative return code. - -The OPTIONS are -ct or --compare=text (the default) for text mode comparisons or -ca or --compare=appearance for visual comparisons (useful if diagrams or other images have changed), and -v=1 or --verbose=1 for reporting differences (and saying nothing for matching files): use -v=0 for no reporting or -v=2 for reporting both different and matching files. - -### Install Comparepdf on ubuntu ### - -Open the terminal and run the following command - - sudo apt-get install comparepdf - -**Comparepdf syntax** - - comparepdf [OPTIONS] file1.pdf file2.pdf - -**Diffpdf** - -DiffPDF is a GUI application used to compare two PDF files.By default the comparison is of the text on each pair of pages, but comparing the visual appearance of pages is also supported (for example, if a diagram is changed or if a paragraph is reformatted). It is also possible to compare pticular pages or page ranges. For example, if there are two versions of a PDF file, one with pages 1-12 and the other with pages 1-13 because of an extra page having been added as page 4, they can be compared by specifying two page ranges, 1-12 for the first and 1-3, 5-13 for the second. This will make DiffPDF compare pages in the pairs (1, 1), (2, 2), (3, 3), (4, 5), (5, 6), and so on, to (12, 13). - -### Install diffpdf on ubuntu ### - -Open the terminal and run the following command - - sudo apt-get install diffpdf - -### Screenshots ### - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/07/14.png) - -![](http://www.ubuntugeek.com/wp-content/uploads/2015/07/23.png) - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/compare-pdf-files-on-ubuntu.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 diff --git a/translated/tech/20150730 Compare PDF Files on Ubuntu.md b/translated/tech/20150730 Compare PDF Files on Ubuntu.md new file mode 100644 index 0000000000..3215caf23f --- /dev/null +++ b/translated/tech/20150730 Compare PDF Files on Ubuntu.md @@ -0,0 +1,48 @@ +Ubuntu上比较PDF文件 +================================================================================ + +如果你想要对PDF文件进行比较,你可以使用下面工具之一。 + +### Comparepdf ### + +comparepdf是一个命令行应用,用于将两个PDF文件进行对比。默认对比模式文本模式,该模式会对各对相关页面进行文字对比。只要一检测到差异,该程序就会终止,并显示一条信息(除非设置了-v0)和一个指示性的返回码。 + +用于文本模式对比的选项有 -ct 或 --compare=text(默认),用于视觉对比(这对图标或其它图像发生改变时很有用)的选项有 -ca 或 --compare=appearance。而 -v=1 或 --verbose=1 选项则用于报告差异(或者对匹配文件不作任何回应):使用 -v=0 选项取消报告,或者 -v=2 来同时报告不同的和匹配的文件。 + +### 安装comparepdf到Ubuntu ### + +打开终端,然后运行以下命令 + + sudo apt-get install comparepdf + +**Comparepdf 语法** + + comparepdf [OPTIONS] file1.pdf file2.pdf + +**Diffpdf** + +DiffPDF是一个图形化应用程序,用于对两个PDF文件进行对比。默认情况下,它只会对比两个相关页面的文字,但是也支持对图形化页面进行对比(例如,如果图表被修改过,或者段落被重新格式化过)。它也可以对特定的页面或者页面范围进行对比。例如,如果同一个PDF文件有两个版本,其中一个有页面1-12,而另一个则有页面1-13,因为这里添加了一个额外的页面4,它们可以通过指定两个页面范围来进行对比,第一个是1-12,而1-3,5-13则可以作为第二个页面范围。这将使得DiffPDF成对地对比这些页面(1,1),(2,2),(3,3),(4,5),(5,6),以此类推,直到(12,13)。 + +### 安装 diffpdf 到 ubuntu ### + +打开终端,然后运行以下命令 + + sudo apt-get install diffpdf + +### 截图 ### + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/07/14.png) + +![](http://www.ubuntugeek.com/wp-content/uploads/2015/07/23.png) + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/compare-pdf-files-on-ubuntu.html + +作者:[ruchi][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix From 26b3b9d09f839328314e3cf37fa56537ae6bb759 Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 31 Jul 2015 08:43:39 +0800 Subject: [PATCH 1540/2517] Update 20150730 Must-Know Linux Commands For New Users.md --- .../tech/20150730 Must-Know Linux Commands For New Users.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150730 Must-Know Linux Commands For New Users.md b/sources/tech/20150730 Must-Know Linux Commands For New Users.md index ea21c001e0..55f1b0dbfe 100644 --- a/sources/tech/20150730 Must-Know Linux Commands For New Users.md +++ b/sources/tech/20150730 Must-Know Linux Commands For New Users.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Must-Know Linux Commands For New Users ================================================================================ ![Manage system updates via the command line with dnf on Fedora.](http://www.linux.com/images/stories/41373/fedora-cli.png) @@ -182,4 +183,4 @@ via: http://www.linux.com/learn/tutorials/842251-must-know-linux-commands-for-ne 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.linux.com/community/forums/person/61003 -[1]:http://www.linux.com/learn/tutorials/828027-how-to-manage-your-files-from-the-command-line \ No newline at end of file +[1]:http://www.linux.com/learn/tutorials/828027-how-to-manage-your-files-from-the-command-line From 0ba2c6878f0407180b357ef62e776996a3896903 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 31 Jul 2015 10:11:58 +0800 Subject: [PATCH 1541/2517] Delete 20150717 How to collect NGINX metrics - Part 2.md --- ...7 How to collect NGINX metrics - Part 2.md | 239 ------------------ 1 file changed, 239 deletions(-) delete mode 100644 sources/tech/20150717 How to collect NGINX metrics - Part 2.md diff --git a/sources/tech/20150717 How to collect NGINX metrics - Part 2.md b/sources/tech/20150717 How to collect NGINX metrics - Part 2.md deleted file mode 100644 index eb627649a7..0000000000 --- a/sources/tech/20150717 How to collect NGINX metrics - Part 2.md +++ /dev/null @@ -1,239 +0,0 @@ -translation by strugglingyouth - -How to collect NGINX metrics - Part 2 -================================================================================ -![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_2.png) - -### How to get the NGINX metrics you need ### - -How you go about capturing metrics depends on which version of NGINX you are using, as well as which metrics you wish to access. (See [the companion article][1] for an in-depth exploration of NGINX metrics.) Free, open-source NGINX and the commercial product NGINX Plus both have status modules that report metrics, and NGINX can also be configured to report certain metrics in its logs: - -注:表格 - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MetricAvailability
NGINX (open-source)NGINX PlusNGINX logs
accepts / acceptedxx
handledxx
droppedxx
activexx
requests / totalxx
4xx codesxx
5xx codesxx
request timex
- -#### Metrics collection: NGINX (open-source) #### - -Open-source NGINX exposes several basic metrics about server activity on a simple status page, provided that you have the HTTP [stub status module][2] enabled. To check if the module is already enabled, run: - - nginx -V 2>&1 | grep -o with-http_stub_status_module - -The status module is enabled if you see with-http_stub_status_module as output in the terminal. - -If that command returns no output, you will need to enable the status module. You can use the --with-http_stub_status_module configuration parameter when [building NGINX from source][3]: - - ./configure \ - … \ - --with-http_stub_status_module - make - sudo make install - -After verifying the module is enabled or enabling it yourself, you will also need to modify your NGINX configuration to set up a locally accessible URL (e.g., /nginx_status) for the status page: - - server { - location /nginx_status { - stub_status on; - - access_log off; - allow 127.0.0.1; - deny all; - } - } - -Note: The server blocks of the NGINX config are usually found not in the master configuration file (e.g., /etc/nginx/nginx.conf) but in supplemental configuration files that are referenced by the master config. To find the relevant configuration files, first locate the master config by running: - - nginx -t - -Open the master configuration file listed, and look for lines beginning with include near the end of the http block, such as: - - include /etc/nginx/conf.d/*.conf; - -In one of the referenced config files you should find the main server block, which you can modify as above to configure NGINX metrics reporting. After changing any configurations, reload the configs by executing: - - nginx -s reload - -Now you can view the status page to see your metrics: - - Active connections: 24 - server accepts handled requests - 1156958 1156958 4491319 - Reading: 0 Writing: 18 Waiting : 6 - -Note that if you are trying to access the status page from a remote machine, you will need to whitelist the remote machine’s IP address in your status configuration, just as 127.0.0.1 is whitelisted in the configuration snippet above. - -The NGINX status page is an easy way to get a quick snapshot of your metrics, but for continuous monitoring you will need to automatically record that data at regular intervals. Parsers for the NGINX status page already exist for monitoring tools such as [Nagios][4] and [Datadog][5], as well as for the statistics collection daemon [collectD][6]. - -#### Metrics collection: NGINX Plus #### - -The commercial NGINX Plus provides [many more metrics][7] through its ngx_http_status_module than are available in open-source NGINX. Among the additional metrics exposed by NGINX Plus are bytes streamed, as well as information about upstream systems and caches. NGINX Plus also reports counts of all HTTP status code types (1xx, 2xx, 3xx, 4xx, 5xx). A sample NGINX Plus status board is available [here][8]. - -![NGINX Plus status board](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/status_plus-2.png) - -*Note: the “Active” connections on the NGINX Plus status dashboard are defined slightly differently than the Active state connections in the metrics collected via the open-source NGINX stub status module. In NGINX Plus metrics, Active connections do not include connections in the Waiting state (aka Idle connections).* - -NGINX Plus also reports [metrics in JSON format][9] for easy integration with other monitoring systems. With NGINX Plus, you can see the metrics and health status [for a given upstream grouping of servers][10], or drill down to get a count of just the response codes [from a single server][11] in that upstream: - - {"1xx":0,"2xx":3483032,"3xx":0,"4xx":23,"5xx":0,"total":3483055} - -To enable the NGINX Plus metrics dashboard, you can add a status server block inside the http block of your NGINX configuration. ([See the section above][12] on collecting metrics from open-source NGINX for instructions on locating the relevant config files.) For example, to set up a status dashboard at http://your.ip.address:8080/status.html and a JSON interface at http://your.ip.address:8080/status, you would add the following server block: - - server { - listen 8080; - root /usr/share/nginx/html; - - location /status { - status; - } - - location = /status.html { - } - } - -The status pages should be live once you reload your NGINX configuration: - - nginx -s reload - -The official NGINX Plus docs have [more details][13] on how to configure the expanded status module. - -#### Metrics collection: NGINX logs #### - -NGINX’s [log module][14] writes configurable access logs to a destination of your choosing. You can customize the format of your logs and the data they contain by [adding or subtracting variables][15]. The simplest way to capture detailed logs is to add the following line in the server block of your config file (see [the section][16] on collecting metrics from open-source NGINX for instructions on locating your config files): - - access_log logs/host.access.log combined; - -After changing any NGINX configurations, reload the configs by executing: - - nginx -s reload - -The “combined” log format, included by default, captures [a number of key data points][17], such as the actual HTTP request and the corresponding response code. In the example logs below, NGINX logged a 200 (success) status code for a request for /index.html and a 404 (not found) error for the nonexistent /fail. - - 127.0.0.1 - - [19/Feb/2015:12:10:46 -0500] "GET /index.html HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari 537.36" - - 127.0.0.1 - - [19/Feb/2015:12:11:05 -0500] "GET /fail HTTP/1.1" 404 570 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36" - -You can log request processing time as well by adding a new log format to the http block of your NGINX config file: - - log_format nginx '$remote_addr - $remote_user [$time_local] ' - '"$request" $status $body_bytes_sent $request_time ' - '"$http_referer" "$http_user_agent"'; - -And by adding or modifying the access_log line in the server block of your config file: - - access_log logs/host.access.log nginx; - -After reloading the updated configs (by running nginx -s reload), your access logs will include response times, as seen below. The units are seconds, with millisecond resolution. In this instance, the server received a request for /big.pdf, returning a 206 (success) status code after sending 33973115 bytes. Processing the request took 0.202 seconds (202 milliseconds): - - 127.0.0.1 - - [19/Feb/2015:15:50:36 -0500] "GET /big.pdf HTTP/1.1" 206 33973115 0.202 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36" - -You can use a variety of tools and services to parse and analyze NGINX logs. For instance, [rsyslog][18] can monitor your logs and pass them to any number of log-analytics services; you can use a free, open-source tool such as [logstash][19] to collect and analyze logs; or you can use a unified logging layer such as [Fluentd][20] to collect and parse your NGINX logs. - -### Conclusion ### - -Which NGINX metrics you monitor will depend on the tools available to you, and whether the insight provided by a given metric justifies the overhead of monitoring that metric. For instance, is measuring error rates important enough to your organization to justify investing in NGINX Plus or implementing a system to capture and analyze logs? - -At Datadog, we have built integrations with both NGINX and NGINX Plus so that you can begin collecting and monitoring metrics from all your web servers with a minimum of setup. Learn how to monitor NGINX with Datadog [in this post][21], and get started right away with a [free trial of Datadog][22]. - ----------- - -Source Markdown for this post is available [on GitHub][23]. Questions, corrections, additions, etc.? Please [let us know][24]. - --------------------------------------------------------------------------------- - -via: https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ - -作者:K Young -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ -[2]:http://nginx.org/en/docs/http/ngx_http_stub_status_module.html -[3]:http://wiki.nginx.org/InstallOptions -[4]:https://exchange.nagios.org/directory/Plugins/Web-Servers/nginx -[5]:http://docs.datadoghq.com/integrations/nginx/ -[6]:https://collectd.org/wiki/index.php/Plugin:nginx -[7]:http://nginx.org/en/docs/http/ngx_http_status_module.html#data -[8]:http://demo.nginx.com/status.html -[9]:http://demo.nginx.com/status -[10]:http://demo.nginx.com/status/upstreams/demoupstreams -[11]:http://demo.nginx.com/status/upstreams/demoupstreams/0/responses -[12]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source -[13]:http://nginx.org/en/docs/http/ngx_http_status_module.html#example -[14]:http://nginx.org/en/docs/http/ngx_http_log_module.html -[15]:http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format -[16]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source -[17]:http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format -[18]:http://www.rsyslog.com/ -[19]:https://www.elastic.co/products/logstash -[20]:http://www.fluentd.org/ -[21]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ -[22]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#sign-up -[23]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_collect_nginx_metrics.md -[24]:https://github.com/DataDog/the-monitor/issues From 1d8b52392ab4df0d1aaeb22c601c5565a2434d66 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 31 Jul 2015 10:14:58 +0800 Subject: [PATCH 1542/2517] Create How to collect NGINX metrics - Part 2 --- .../How to collect NGINX metrics - Part 2 | 237 ++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 translated/tech/How to collect NGINX metrics - Part 2 diff --git a/translated/tech/How to collect NGINX metrics - Part 2 b/translated/tech/How to collect NGINX metrics - Part 2 new file mode 100644 index 0000000000..848042bf2c --- /dev/null +++ b/translated/tech/How to collect NGINX metrics - Part 2 @@ -0,0 +1,237 @@ + +如何收集NGINX指标 - 第2部分 +================================================================================ +![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_2.png) + +### 如何获取你所需要的NGINX指标 ### + +如何获取需要的指标取决于你正在使用的 NGINX 版本。(参见 [the companion article][1] 将深入探索NGINX指标。)免费,开源版的 NGINX 和商业版的 NGINX 都有指标度量的状态模块,NGINX 也可以在其日志中配置指标模块: + +注:表格 + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MetricAvailability
NGINX (open-source)NGINX PlusNGINX logs
accepts / acceptedxx
handledxx
droppedxx
activexx
requests / totalxx
4xx codesxx
5xx codesxx
request timex
+ +#### 指标收集:NGINX(开源版) #### + +开源版的 NGINX 会显示几个与服务器状态有关的指标在状态页面上,只要你启用了 HTTP [stub status module][2] 。要检查模块是否被加载,运行以下命令: + + nginx -V 2>&1 | grep -o with-http_stub_status_module + +如果你看到 http_stub_status_module 被输出在终端,说明状态模块已启用。 + +如果该命令没有输出,你需要启用状态模块。你可以使用 --with-http_stub_status_module 参数去配置 [building NGINX from source][3]: + + ./configure \ + … \ + --with-http_stub_status_module + make + sudo make install + +验证模块已经启用或你自己启用它后,你还需要修改 NGINX 配置文件为状态页面设置本地访问的 URL(例如,/ nginx_status): + + server { + location /nginx_status { + stub_status on; + + access_log off; + allow 127.0.0.1; + deny all; + } + } + +注:nginx 配置中的 server 块通常并不在主配置文件中(例如,/etc/nginx/nginx.conf),但主配置中会加载补充的配置文件。要找到主配置文件,首先运行以下命令: + + nginx -t + +打开主配置文件,在以 http 模块结尾的附近查找以 include 开头的行包,如: + + include /etc/nginx/conf.d/*.conf; + +在所包含的配置文件中,你应该会找到主服务器模块,你可以如上所示修改 NGINX 的指标报告。更改任何配置后,通过执行以下命令重新加载配置文件: + + nginx -s reload + +现在,你可以查看指标的状态页: + + Active connections: 24 + server accepts handled requests + 1156958 1156958 4491319 + Reading: 0 Writing: 18 Waiting : 6 + +请注意,如果你正试图从远程计算机访问状态页面,则需要将远程计算机的 IP 地址添加到你的状态配置文件的白名单中,在上面的配置文件中 127.0.0.1 仅在白名单中。 + +nginx 的状态页面是一中查看指标快速又简单的方法,但当连续监测时,你需要每隔一段时间自动记录该数据。然后通过监控工具箱 [Nagios][4] 或者 [Datadog][5],以及收集统计信息的服务 [collectD][6] 来分析已保存的 NGINX 状态信息。 + +#### 指标收集: NGINX Plus #### + +商业版的 NGINX Plus 通过 ngx_http_status_module 提供的可用指标比开源版 NGINX 更多 [many more metrics][7] 。NGINX Plus 附加了更多的字节流指标,以及负载均衡系统和高速缓存的信息。NGINX Plus 还报告所有的 HTTP 状态码类型(1XX,2XX,3XX,4XX,5XX)的计数。一个简单的 NGINX Plus 状态报告 [here][8]。 + +![NGINX Plus status board](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/status_plus-2.png) + +*注: NGINX Plus 在状态仪表盘"Active”连接定义的收集指标的状态模块和开源 NGINX 的略有不同。在 NGINX Plus 指标中,活动连接不包括等待状态(又叫空闲连接)连接。* + +NGINX Plus 也集成了其他监控系统的报告 [JSON格式指标][9] 。用 NGINX Plus 时,你可以看到 [负载均衡服务器组的][10]指标和健康状况,或着再向下能取得的仅是响应代码计数[从单个服务器][11]在负载均衡服务器中: + {"1xx":0,"2xx":3483032,"3xx":0,"4xx":23,"5xx":0,"total":3483055} + +启动 NGINX Plus 指标仪表盘,你可以在 NGINX 配置文件的 http 块内添加状态 server 块。 ([参见上一页][12]查找相关的配置文件,收集开源 NGINX 版指标的说明。)例如,设立以下一个状态仪表盘在http://your.ip.address:8080/status.html 和一个 JSON 接口 http://your.ip.address:8080/status,可以添加以下 server block 来设定: + + server { + listen 8080; + root /usr/share/nginx/html; + + location /status { + status; + } + + location = /status.html { + } + } + +一旦你重新加载 NGINX 配置,状态页就会被加载: + + nginx -s reload + +关于如何配置扩展状态模块,官方 NGINX Plus 文档有 [详细介绍][13] 。 + +#### 指标收集:NGINX日志 #### + +NGINX 的 [日志模块][14] 写到配置可以自定义访问日志到指定文件。你可以自定义日志的格式和时间通过 [添加或移除变量][15]。捕获日志的详细信息,最简单的方法是添加下面一行在你配置文件的server 块中(参见[此节][16] 通过加载配置文件的信息来收集开源 NGINX 的指标): + + access_log logs/host.access.log combined; + +更改 NGINX 配置文件后,必须要重新加载配置文件: + + nginx -s reload + +“combined” 的日志格式,只包含默认参数,包括[一些关键数据][17],如实际的 HTTP 请求和相应的响应代码。在下面的示例日志中,NGINX 记录了200(成功)状态码当请求 /index.html 时和404(未找到)错误不存在的请求文件 /fail。 + + 127.0.0.1 - - [19/Feb/2015:12:10:46 -0500] "GET /index.html HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari 537.36" + + 127.0.0.1 - - [19/Feb/2015:12:11:05 -0500] "GET /fail HTTP/1.1" 404 570 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36" + +你可以记录请求处理的时间通过添加一个新的日志格式在 NGINX 配置文件中的 http 块: + + log_format nginx '$remote_addr - $remote_user [$time_local] ' + '"$request" $status $body_bytes_sent $request_time ' + '"$http_referer" "$http_user_agent"'; + +通过修改配置文件中 server 块的 access_log 行: + + access_log logs/host.access.log nginx; + +重新加载配置文件(运行 nginx -s reload)后,你的访问日志将包括响应时间,如下图所示。单位为秒,毫秒。在这种情况下,服务器接收 /big.pdf 的请求时,发送33973115字节后返回206(成功)状态码。处理请求用时0.202秒(202毫秒): + + 127.0.0.1 - - [19/Feb/2015:15:50:36 -0500] "GET /big.pdf HTTP/1.1" 206 33973115 0.202 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36" + +你可以使用各种工具和服务来收集和分析 NGINX 日志。例如,[rsyslog][18] 可以监视你的日志,并将其传递给多个日志分析服务;你也可以使用免费的开源工具,如[logstash][19]来收集和分析日志;或者你可以使用一个统一日志记录层,如[Fluentd][20]来收集和分析你的 NGINX 日志。 + +### 结论 ### + +监视 NGINX 的哪一项指标将取决于你提供的工具,以及是否由给定指标证明监控指标的开销。例如,通过收集和分析日志来定位问题是非常重要的在 NGINX Plus 或者 运行的系统中。 + +在 Datadog 中,我们已经集成了 NGINX 和 NGINX Plus,这样你就可以以最小的设置来收集和监控所有 Web 服务器的指标。了解如何用 NGINX Datadog来监控 [在本文中][21],并开始使用 [免费的Datadog][22]。 + +---------- + +原文在这 [on GitHub][23]。问题,更正,补充等?请[让我们知道][24]。 + +-------------------------------------------------------------------------------- + +via: https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ + +作者:K Young +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ +[2]:http://nginx.org/en/docs/http/ngx_http_stub_status_module.html +[3]:http://wiki.nginx.org/InstallOptions +[4]:https://exchange.nagios.org/directory/Plugins/Web-Servers/nginx +[5]:http://docs.datadoghq.com/integrations/nginx/ +[6]:https://collectd.org/wiki/index.php/Plugin:nginx +[7]:http://nginx.org/en/docs/http/ngx_http_status_module.html#data +[8]:http://demo.nginx.com/status.html +[9]:http://demo.nginx.com/status +[10]:http://demo.nginx.com/status/upstreams/demoupstreams +[11]:http://demo.nginx.com/status/upstreams/demoupstreams/0/responses +[12]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source +[13]:http://nginx.org/en/docs/http/ngx_http_status_module.html#example +[14]:http://nginx.org/en/docs/http/ngx_http_log_module.html +[15]:http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format +[16]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source +[17]:http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format +[18]:http://www.rsyslog.com/ +[19]:https://www.elastic.co/products/logstash +[20]:http://www.fluentd.org/ +[21]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ +[22]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#sign-up +[23]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_collect_nginx_metrics.md +[24]:https://github.com/DataDog/the-monitor/issues From 059f098f30616efcd0809e7f157a2d2d1277c008 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 31 Jul 2015 10:23:53 +0800 Subject: [PATCH 1543/2517] Delete 20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md --- ...vity and Check Memory Usages of Browser.md | 130 ------------------ 1 file changed, 130 deletions(-) delete mode 100644 sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md diff --git a/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md b/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md deleted file mode 100644 index 2219e5e25e..0000000000 --- a/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md +++ /dev/null @@ -1,130 +0,0 @@ -translation by strugglingyouth -Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser -================================================================================ -Here again, I have written another post on [Linux Tips and Tricks][1] series. Since beginning the objective of this post is to make you aware of those small tips and hacks that lets you manage your system/server efficiently. - -![Create Cdrom ISO Image and Monitor Users in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/creating-cdrom-iso-watch-users-in-linux.jpg) - -Create Cdrom ISO Image and Monitor Users in Linux - -In this post we will see how to create ISO image from the contents of CD/DVD loaded in the drive, Open random man pages for learning, know details of other logged-in users and what they are doing and monitoring the memory usages of a browser, and all these using native tools/commands without any third-party application/utility. Here we go… - -### Create ISO image from a CD ### - -Often we need to backup/copy the content of CD/DVD. If you are on Linux platform you do not need any additional software. All you need is the access to Linux console. - -To create ISO image of the files in your CD/DVD ROM, you need two things. The first thing is you need to find the name of your CD/DVD drive. To find the name of your CD/DVD drive, you may choose any of the below three methods. - -**1. Run command lsblk (list block devices) from your terminal/console.** - - $ lsblk - -![Find Block Devices in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Find-Block-Devices.png) - -Find Block Devices - -**2. To see information about CD-ROM, you may use commands like less or more.** - - $ less /proc/sys/dev/cdrom/info - -![Check Cdrom Information](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Cdrom-Inforamtion.png) - -Check Cdrom Information - -**3. You may get the same information from [dmesg command][2] and customize the output using egrep.** - -The command ‘dmesg‘ print/control the kernel buffer ring. ‘egrep‘ command is used to print lines that matches a pattern. Option -i and –color with egrep is used to ignore case sensitive search and highlight the matching string respectively. - - $ dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer' - -![Find Device Information](http://www.tecmint.com/wp-content/uploads/2015/07/Find-Device-Information.png) - -Find Device Information - -Once you know the name of your CD/DVD, you can use following command to create a ISO image of your cdrom in Linux. - - $ cat /dev/sr0 > /path/to/output/folder/iso_name.iso - -Here ‘sr0‘ is the name of my CD/DVD drive. You should replace this with the name of your CD/DVD. This will help you in creating ISO image and backup contents of CD/DVD without any third-party application. - -![Create ISO Image of CDROM in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Create-ISO-Image-of-CDROM.png) - -Create ISO Image of CDROM - -### Open a man page randomly for Reading ### - -If you are new to Linux and want to learn commands and switches, this tweak is for you. Put the below line of code at the end of your `~/.bashrc` file. - - /use/bin/man $(ls /bin | shuf | head -1) - -Remember to put the above one line script in users’s `.bashrc` file and not in the .bashrc file of root. So when the next you login either locally or remotely using SSH you will see a man page randomly opened for you to read. For the newbies who want to learn commands and command-line switches, this will prove helpful. - -Here is what I got in my terminal after logging in to session for two times back-to-back. - -![LoadKeys Man Pages](http://www.tecmint.com/wp-content/uploads/2015/07/LoadKeys-Man-Pages.png) - -LoadKeys Man Pages - -![Zgrep Man Pages](http://www.tecmint.com/wp-content/uploads/2015/07/Zgrep-Man-Pages.png) - -Zgrep Man Pages - -### Check Activity of Logged-in Users ### - -Know what other users are doing on your shared server. - -In most general case, either you are a user of Shared Linux Server or the Admin. If you are concerned about your server and want to check what other users are doing, you may try command ‘w‘. - -This command lets you know if someone is executing any malicious code or tampering the server, slowing it down or anything else. ‘w‘ is the preferred way of keeping an eye on logged on users and what they are doing. - -To see logged on users and what they re doing, run command ‘w’ from terminal, preferably as root. - - # w - -![Check Linux User Activity](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Linux-User-Activity.png) - -Check Linux User Activity - -### Check Memory usages by Browser ### - -These days a lot of jokes are cracked on Google-chrome and its demand of memory. If you want to know the memory usages of a browser, you can list the name of the process, its PID and Memory usages of it. To check memory usages of a browser, just enter the “about:memory” in the address bar without quotes. - -I have tested it on Google-Chrome and Mozilla Firefox web browser. If you can check it on any other browser and it works well you may acknowledge us in the comments below. Also you may kill the browser process simply as if you have done for any Linux terminal process/service. - -In Google Chrome, type `about:memory` in address bar, you should get something similar to below image. - -![Check Chrome Memory Usage](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Chrome-Memory-Usage.png) - -Check Chrome Memory Usage - -In Mozilla Firefox, type `about:memory` in address bar, you should get something similar to below image. - -![Check Firefox Memory Usage](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Firefox-Memory-Usage.png) - -Check Firefox Memory Usage - -Out of these options you may select any of them, if you understand what it is. To check memory usages, click the left most option ‘Measure‘. - -![Firefox Main Process](http://www.tecmint.com/wp-content/uploads/2015/07/Firefox-Main-Processes.png) - -Firefox Main Process - -It shows tree like process-memory usages by browser. - -That’s all for now. Hope all the above tips will help you at some point of time. If you have one (or more) tips/tricks that will help Linux Users to manage their Linux System/Server more efficiently ans is lesser known, you may like to share it with us. - -I’ll be here with another post soon, till then stay tuned and connected to TecMint. Provide us with your valuable feedback in the comments below. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/creating-cdrom-iso-image-watch-user-activity-in-linux/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/tag/linux-tricks/ -[2]:http://www.tecmint.com/dmesg-commands/ From ad35cb507dd4985b31bcb82bd359776ca201be6b Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 31 Jul 2015 10:24:34 +0800 Subject: [PATCH 1544/2517] Delete 20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md --- ...vity and Check Memory Usages of Browser.md | 130 ------------------ 1 file changed, 130 deletions(-) delete mode 100644 sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md diff --git a/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md b/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md deleted file mode 100644 index 2219e5e25e..0000000000 --- a/sources/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md +++ /dev/null @@ -1,130 +0,0 @@ -translation by strugglingyouth -Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser -================================================================================ -Here again, I have written another post on [Linux Tips and Tricks][1] series. Since beginning the objective of this post is to make you aware of those small tips and hacks that lets you manage your system/server efficiently. - -![Create Cdrom ISO Image and Monitor Users in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/creating-cdrom-iso-watch-users-in-linux.jpg) - -Create Cdrom ISO Image and Monitor Users in Linux - -In this post we will see how to create ISO image from the contents of CD/DVD loaded in the drive, Open random man pages for learning, know details of other logged-in users and what they are doing and monitoring the memory usages of a browser, and all these using native tools/commands without any third-party application/utility. Here we go… - -### Create ISO image from a CD ### - -Often we need to backup/copy the content of CD/DVD. If you are on Linux platform you do not need any additional software. All you need is the access to Linux console. - -To create ISO image of the files in your CD/DVD ROM, you need two things. The first thing is you need to find the name of your CD/DVD drive. To find the name of your CD/DVD drive, you may choose any of the below three methods. - -**1. Run command lsblk (list block devices) from your terminal/console.** - - $ lsblk - -![Find Block Devices in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Find-Block-Devices.png) - -Find Block Devices - -**2. To see information about CD-ROM, you may use commands like less or more.** - - $ less /proc/sys/dev/cdrom/info - -![Check Cdrom Information](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Cdrom-Inforamtion.png) - -Check Cdrom Information - -**3. You may get the same information from [dmesg command][2] and customize the output using egrep.** - -The command ‘dmesg‘ print/control the kernel buffer ring. ‘egrep‘ command is used to print lines that matches a pattern. Option -i and –color with egrep is used to ignore case sensitive search and highlight the matching string respectively. - - $ dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer' - -![Find Device Information](http://www.tecmint.com/wp-content/uploads/2015/07/Find-Device-Information.png) - -Find Device Information - -Once you know the name of your CD/DVD, you can use following command to create a ISO image of your cdrom in Linux. - - $ cat /dev/sr0 > /path/to/output/folder/iso_name.iso - -Here ‘sr0‘ is the name of my CD/DVD drive. You should replace this with the name of your CD/DVD. This will help you in creating ISO image and backup contents of CD/DVD without any third-party application. - -![Create ISO Image of CDROM in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Create-ISO-Image-of-CDROM.png) - -Create ISO Image of CDROM - -### Open a man page randomly for Reading ### - -If you are new to Linux and want to learn commands and switches, this tweak is for you. Put the below line of code at the end of your `~/.bashrc` file. - - /use/bin/man $(ls /bin | shuf | head -1) - -Remember to put the above one line script in users’s `.bashrc` file and not in the .bashrc file of root. So when the next you login either locally or remotely using SSH you will see a man page randomly opened for you to read. For the newbies who want to learn commands and command-line switches, this will prove helpful. - -Here is what I got in my terminal after logging in to session for two times back-to-back. - -![LoadKeys Man Pages](http://www.tecmint.com/wp-content/uploads/2015/07/LoadKeys-Man-Pages.png) - -LoadKeys Man Pages - -![Zgrep Man Pages](http://www.tecmint.com/wp-content/uploads/2015/07/Zgrep-Man-Pages.png) - -Zgrep Man Pages - -### Check Activity of Logged-in Users ### - -Know what other users are doing on your shared server. - -In most general case, either you are a user of Shared Linux Server or the Admin. If you are concerned about your server and want to check what other users are doing, you may try command ‘w‘. - -This command lets you know if someone is executing any malicious code or tampering the server, slowing it down or anything else. ‘w‘ is the preferred way of keeping an eye on logged on users and what they are doing. - -To see logged on users and what they re doing, run command ‘w’ from terminal, preferably as root. - - # w - -![Check Linux User Activity](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Linux-User-Activity.png) - -Check Linux User Activity - -### Check Memory usages by Browser ### - -These days a lot of jokes are cracked on Google-chrome and its demand of memory. If you want to know the memory usages of a browser, you can list the name of the process, its PID and Memory usages of it. To check memory usages of a browser, just enter the “about:memory” in the address bar without quotes. - -I have tested it on Google-Chrome and Mozilla Firefox web browser. If you can check it on any other browser and it works well you may acknowledge us in the comments below. Also you may kill the browser process simply as if you have done for any Linux terminal process/service. - -In Google Chrome, type `about:memory` in address bar, you should get something similar to below image. - -![Check Chrome Memory Usage](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Chrome-Memory-Usage.png) - -Check Chrome Memory Usage - -In Mozilla Firefox, type `about:memory` in address bar, you should get something similar to below image. - -![Check Firefox Memory Usage](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Firefox-Memory-Usage.png) - -Check Firefox Memory Usage - -Out of these options you may select any of them, if you understand what it is. To check memory usages, click the left most option ‘Measure‘. - -![Firefox Main Process](http://www.tecmint.com/wp-content/uploads/2015/07/Firefox-Main-Processes.png) - -Firefox Main Process - -It shows tree like process-memory usages by browser. - -That’s all for now. Hope all the above tips will help you at some point of time. If you have one (or more) tips/tricks that will help Linux Users to manage their Linux System/Server more efficiently ans is lesser known, you may like to share it with us. - -I’ll be here with another post soon, till then stay tuned and connected to TecMint. Provide us with your valuable feedback in the comments below. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/creating-cdrom-iso-image-watch-user-activity-in-linux/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/tag/linux-tricks/ -[2]:http://www.tecmint.com/dmesg-commands/ From 6d077f1f911fb9810de044db8898ca2c9be3b5a9 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 31 Jul 2015 10:25:36 +0800 Subject: [PATCH 1545/2517] Create Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser --- ...ctivity and Check Memory Usages of Browser | 131 ++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 translated/Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser diff --git a/translated/Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser b/translated/Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser new file mode 100644 index 0000000000..02805f62ff --- /dev/null +++ b/translated/Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser @@ -0,0 +1,131 @@ + +用 CD 创建 ISO,观察用户活动和检查浏览器内存的技巧 +================================================================================ +我已经写过 [Linux 提示和技巧][1] 系列的一篇文章。写这篇文章的目的是让你知道这些小技巧可以有效地管理你的系统/服务器。 + +![Create Cdrom ISO Image and Monitor Users in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/creating-cdrom-iso-watch-users-in-linux.jpg) + +在Linux中创建 Cdrom ISO 镜像和监控用户 + +在这篇文章中,我们将看到如何使用 CD/DVD 驱动器中加载到的内容来创建 ISO 镜像,打开随机手册页学习,看到登录用户的详细情况和查看浏览器内存使用量,而所有这些完全使用本地工具/命令无任何第三方应用程序/组件。让我们开始吧... + +### 用 CD 中创建 ISO 映像 ### + +我们经常需要备份/复制 CD/DVD 的内容。如果你是在 Linux 平台上,不需要任何额外的软件。所有需要的是进入 Linux 终端。 + +要从 CD/DVD 上创建 ISO 镜像,你需要做两件事。第一件事就是需要找到CD/DVD 驱动器的名称。要找到 CD/DVD 驱动器的名称,可以使用以下三种方法。 + +**1. 从终端/控制台上运行 lsblk 命令(单个驱动器).** + + $ lsblk + +![Find Block Devices in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Find-Block-Devices.png) + +找驱动器 + +**2.要查看有关 CD-ROM 的信息,可以使用以下命令。** + + $ less /proc/sys/dev/cdrom/info + +![Check Cdrom Information](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Cdrom-Inforamtion.png) + +检查 Cdrom 信息 + +**3. 使用 [dmesg 命令][2] 也会得到相同的信息,并使用 egrep 来自定义输出。** + +命令 ‘dmesg‘ 命令的输出/控制内核缓冲区信息。‘egrep‘ 命令输出匹配到的行。选项 -i 和 -color 与 egrep 连用时会忽略大小写,并高亮显示匹配的字符串。 + + $ dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer' + +![Find Device Information](http://www.tecmint.com/wp-content/uploads/2015/07/Find-Device-Information.png) + +查找设备信息 + +一旦知道 CD/DVD 的名称后,在 Linux 上你可以用下面的命令来创建 ISO 镜像。 + + $ cat /dev/sr0 > /path/to/output/folder/iso_name.iso + +这里的‘sr0‘是我的 CD/DVD 驱动器的名称。你应该用你的 CD/DVD 名称来代替。这将帮你创建 ISO 镜像并备份 CD/DVD 的内容无需任何第三方应用程序。 + +![Create ISO Image of CDROM in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Create-ISO-Image-of-CDROM.png) + +创建 CDROM 的 ISO 映像 + +### 随机打开一个手册页 ### + +如果你是 Linux 新人并想学习使用命令行开关,这个修改是为你做的。把下面的代码行添加在`〜/ .bashrc`文件的末尾。 + + /use/bin/man $(ls /bin | shuf | head -1) + +记得把上面一行脚本添加在用户的`.bashrc`文件中,而不是根目录的 .bashrc 文件。所以,当你下次登录本地或远程使用 SSH 时,你会看到一个随机打开的手册页供你阅读。对于想要学习命令行开关的新手,这被证明是有益的。 + +下面是在终端登录两次分别看到的。 + +![LoadKeys Man Pages](http://www.tecmint.com/wp-content/uploads/2015/07/LoadKeys-Man-Pages.png) + +LoadKeys 手册页 + +![Zgrep Man Pages](http://www.tecmint.com/wp-content/uploads/2015/07/Zgrep-Man-Pages.png) + +Zgrep 手册页 + +### 查看登录用户的状态 ### + +了解其他用户正在共享服务器上做什么。 + +一般情况下,你是共享的 Linux 服务器的用户或管理员的。如果你担心自己服务器的安全并想要查看哪些用户在做什么,你可以使用命令 'w'。 + +这个命令可以让你知道是否有人在执行恶意代码或篡改服务器,让他停下或使用其他方法。'w' 是查看登录用户状态的首选方式。 + +要查看登录的用户正在做什么,从终端运行命令“w”,最好是 root 用户。 + + # w + +![Check Linux User Activity](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Linux-User-Activity.png) + +检查 Linux 用户状态 + +### 查看浏览器的内存使用状况 ### + +最近有不少谈论关于 Google-chrome 内存使用量。如果你想知道一个浏览器的内存用量,你可以列出进程名,PID 和它的使用情况。要检查浏览器的内存使用情况,只需在地址栏输入 “about:memory” 不要带引号。 + +我已经在 Google-Chrome 和 Mozilla 的 Firefox 网页浏览器进行了测试。你可以查看任何浏览器,如果它工作得很好,你可能会承认我们在下面的评论。你也可以杀死浏览器进程在 Linux 终端的进程/服务中。 + +在 Google Chrome 中,在地址栏输入 `about:memory`,你应该得到类似下图的东西。 + +![Check Chrome Memory Usage](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Chrome-Memory-Usage.png) + +查看 Chrome 内存使用状况 + +在Mozilla Firefox浏览器,在地址栏输入 `about:memory`,你应该得到类似下图的东西。 + +![Check Firefox Memory Usage](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Firefox-Memory-Usage.png) + +查看 Firefox 内存使用状况 + +如果你已经了解它是什么,除了这些选项。要检查内存用量,你也可以点击最左边的 ‘Measure‘ 选项。 + +![Firefox Main Process](http://www.tecmint.com/wp-content/uploads/2015/07/Firefox-Main-Processes.png) + +Firefox 主进程 + +它将通过浏览器树形展示进程内存使用量 + +目前为止就这样了。希望上述所有的提示将会帮助你。如果你有一个(或多个)技巧,分享给我们,将帮助 Linux 用户更有效地管理他们的 Linux 系统/服务器。 + +我会很快在这里发帖,到时候敬请关注。请在下面的评论里提供你的宝贵意见。喜欢请分享并帮助我们传播。 + + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/creating-cdrom-iso-image-watch-user-activity-in-linux/ + +作者:[Avishek Kumar][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/tag/linux-tricks/ +[2]:http://www.tecmint.com/dmesg-commands/ From 106b5e487e43838d84df99a557be5b9a6801b5ea Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 31 Jul 2015 10:54:26 +0800 Subject: [PATCH 1546/2517] [Translated]20150730 Must-Know Linux Commands For New Users.md --- ... Must-Know Linux Commands For New Users.md | 186 ------------------ ... Must-Know Linux Commands For New Users.md | 185 +++++++++++++++++ 2 files changed, 185 insertions(+), 186 deletions(-) delete mode 100644 sources/tech/20150730 Must-Know Linux Commands For New Users.md create mode 100644 translated/tech/20150730 Must-Know Linux Commands For New Users.md diff --git a/sources/tech/20150730 Must-Know Linux Commands For New Users.md b/sources/tech/20150730 Must-Know Linux Commands For New Users.md deleted file mode 100644 index 55f1b0dbfe..0000000000 --- a/sources/tech/20150730 Must-Know Linux Commands For New Users.md +++ /dev/null @@ -1,186 +0,0 @@ -Translating by GOLinux! -Must-Know Linux Commands For New Users -================================================================================ -![Manage system updates via the command line with dnf on Fedora.](http://www.linux.com/images/stories/41373/fedora-cli.png) -Manage system updates via the command line with dnf on Fedora. - -One of the beauties of Linux-based systems is that you can manage your entire system right from the terminal using the command line. The advantage of using the command line is that you can use the same knowledge and skills to manage any Linux distribution. - -This is not possible through the graphical user interface (GUI) as each distro, and desktop environment (DE), offers its own user interfaces. To be clear, there are cases in which you will need different commands to perform certain tasks on different distributions, but more or less the concept and ideas remain the same. - -In this article, we are going to talk about some of the basic commands that a new Linux user should know. I will show you how to update your system, manage software, manipulate files and switch to root using the command line on three major distributions: Ubuntu (which also includes its flavors and derivatives, and Debian), openSUSE and Fedora. - -*Let's get started!* - -### Keep your system safe and up-to-date ### - -Linux is secure by design, but the fact is that all software has bugs and there could be security holes. So it's very important to keep your system updated. Think of it this way: Running an out-of-date operating system is like being in an armored tank with the doors unlocked. Will the armor protect you? Anyone can enter through the open doors and cause harm. Similarly there can be un-patched holes in your OS which can compromise your systems. Open source communities, unlike the proprietary world, are extremely quick at patching holes, so if you keep your system updated you'll stay safe. - -Keep an eye on news sites to be aware of security vulnerabilities. If there is a hole discovered, read about it and update your system as soon as a patch is out. Either way you must make it a practice to run the update commands at least once a week on production machines. If you are running a complicated server then be extra careful and go through the changelog to ensure updates won't break your customization. - -**Ubuntu**: Bear one thing in mind: you must always refresh repositories (aka repos) before upgrading the system or installing any software. On Ubuntu, you can update your system with the following commands. The first command refreshes repositories: - - sudo apt-get update - -Once the repos are updated you can now run the system update command: - - sudo apt-get upgrade - -However this command doesn't update the kernel and some other packages, so you must also run this command: - - sudo apt-get dist-upgrade - -**openSUSE**: If you are on openSUSE, you can update the system using these commands (as usual, the first command is meant to update repos) - - sudo zypper refresh - sudo zypper up - -**Fedora**: If you are on Fedora, you can use the 'dnf' command which is 'kind' of equivalent to zypper and apt-get: - - sudo dnf update - sudo dnf upgrade - -### Software installation and removal ### - -You can install only those packages which are available in the repositories enabled on your system. Every distro comes with some official or third-party repos enabled by default. - -**Ubuntu**: To install any package on Ubuntu, first update the repo and then use this syntax: - - sudo apt-get install [package_name] - -Example: - - sudo apt-get install gimp - -**openSUSE**: The commands would be: - - sudo zypper install [package_name] - -**Fedora**: Fedora has dropped 'yum' and now uses 'dnf' so the command would be: - - sudo dnf install [package_name] - -The procedure to remove the software is the same, just exchange 'install' with 'remove'. - -**Ubuntu**: - - sudo apt-get remove [package_name] - -**openSUSE**: - - sudo zypper remove [package_name] - -**Fedora**: - - sudo dnf remove [package_name] - -### How to manage third party software? ### - -There is a huge community of developers who offer their software to users. Different distributions use different mechanisms to make third party software available to their users. It also depends on how a developer offers their software to users; some offer binaries and others offer it through repositories. - -Ubuntu heavily relies on PPAs (personal package archives) but, unfortunately, there is no built-in tool which can assist a user in searching PPAs. You will need to Google the PPA and then add the repository manually before installing the software. This is how you would add any PPA to your system: - - sudo add-apt-repository ppa: - -Example: Let's say I want to add LibreOffice PPA to my system. I would Google the PPA and then acquire the repo name from Launchpad, which in this case is "libreoffice/ppa". Then add the ppa using the following command: - - sudo add-apt-repository ppa:libreoffice/ppa - -It will ask you to hit the Enter key in order to import the keys. Once it's done, refresh the repos with the 'update' command and then install the package. - -openSUSE has an elegant solution for third-party apps. You can visit software.opensuse.org, search for the package and install it with one click. It will automatically add the repo to your system. If you want to add any repo manually, use this command:. - - sudo zypper ar -f url_of_the_repo name_of_repo - sudo zypper ar -f http://download.opensuse.org/repositories/LibreOffice:Factory/openSUSE_13.2/LibreOffice:Factory.repo LOF - -Then refresh the repo and install software: - - sudo zypper refresh - sudo zypper install libreoffice - -Fedora users can simply add RPMFusion (both free and non-free repos) which contain a majority of applications. In case you do need to add a repo, this is the command: - -dnf config-manager --add-repo http://www.example.com/example.repo - -### Some basic commands ### - -I have written a few [articles][1] on how to manage files on your system using the CLI, here are some of the basic commands which are common across all distributions. - -Copy files or directories to a new location: - - cp path_of_file_1 path_of_the_directory_where_you_want_to_copy/ - -Copy all files from a directory to a new location (notice the slash and asterisk, which implies all files within that directory): - - cp path_of_files/* path_of_the_directory_where_you_want_to_copy/ - -Move a file from one location to another (the trailing slash means inside that directory): - - mv path_of_file_1 path_of_the_directory_where_you_want_to_move/ - -Move all file from one location to another: - - mv path_of_directory_where_files_are/* path_of_the_directory_where_you_want_to_move/ - -Delete a file: - - rm path_of_file - -Delete a directory: - - rm -r path_of_directory - -Remove all content from the directory, leaving the directory folder intact: - - rm -r path_of_directory/* - -### Create new directory ### - -To create a new directory, first enter the location where you want to create a directory. Let's say you want to create a 'foundation' folder inside your Documents directory. Let's change the directory using the cd (aka change directory) command: - - cd /home/swapnil/Documents - -(exchange 'swapnil with the user on your system) - -Then create the directory with mkdir command: - - mkdir foundation - -You can also create a directory from anywhere, by giving the path of the directory. For example: - - mdkir /home/swapnil/Documents/foundation - -If you want to create parent-child directories, which means directories within other directories then use the -p option. It will create all directories in the given path: - - mdkir -p /home/swapnil/Documents/linux/foundation - -### Become root ### - -You either need to be root or the user should have sudo powers to perform some administrative tasks such as managing packages or making changes to the root directories or files. An example would be to edit the 'fstab' file which keeps a record of mounted hard drives. It's inside the 'etc' directory which is within the root directory. You can make changes to this file only as a super user. In most distros you can become root by 'switching user'. Let's say on openSUSE I want to become root as I am going to work inside the root directory. You can use either command: - - sudo su - - -Or - - su - - -That will ask for the password and then you will have root privileges. Keep one point in mind: never run your system as root user unless you know what you are doing. Another important point to note is that the files or directories you modify as root also change ownership of those files from that user or specific service to root. You may have to revert the ownership of those files otherwise the services or users won't be able to to access or write to those files. To change users, this is the command: - - sudo chown -R user:user /path_of_file_or_directory - -You may often need this when you have partitions from other distros mounted on the system. When you try to access files on such partitions, you may come across a permission denied error. You can simply change the ownership of such partitions to access them. Just be extra careful, don't change permissions or ownership of root directories. - -These are the basic commands any new Linux user needs. If you have any questions or if you want us to cover a specific topic, please mention them in the comments below. - --------------------------------------------------------------------------------- - -via: http://www.linux.com/learn/tutorials/842251-must-know-linux-commands-for-new-users - -作者:[Swapnil Bhartiya][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linux.com/community/forums/person/61003 -[1]:http://www.linux.com/learn/tutorials/828027-how-to-manage-your-files-from-the-command-line diff --git a/translated/tech/20150730 Must-Know Linux Commands For New Users.md b/translated/tech/20150730 Must-Know Linux Commands For New Users.md new file mode 100644 index 0000000000..230cecf736 --- /dev/null +++ b/translated/tech/20150730 Must-Know Linux Commands For New Users.md @@ -0,0 +1,185 @@ +新手应知应会的Linux命令 +================================================================================ +![Manage system updates via the command line with dnf on Fedora.](http://www.linux.com/images/stories/41373/fedora-cli.png) +在Fedora上通过命令行使用dnf来管理系统更新 + +基于Linux的系统的优点之一,就是你可以通过终端中使用命令该ing来管理整个系统。使用命令行的优势在于,你可以使用相同的知识和技能来管理随便哪个Linux发行版。 + +对于各个发行版以及桌面环境(DE)而言,要一致地使用图形化用户界面(GUI)却几乎是不可能的,因为它们都提供了各自的用户界面。要明确的是,有那么些情况,你需要在不同的发行版上使用不同的命令来部署某些特定的任务,但是,或多或少它们的概念和意图却仍然是一致的。 + +在本文中,我们打算讨论Linux用户应当掌握的一些基本命令。我将给大家演示怎样使用命令行来更新系统、管理软件、操作文件以及切换到root,这些操作将在三个主要发行版上进行:Ubuntu(也包括其定制版和衍生版,还有Debian),openSUSE,以及Fedora。 + +*让我们开始吧!* + +### 保持系统安全和最新 ### + +Linux是基于安全设计的,但事实上是,任何软件都有缺陷,会导致安全漏洞。所以,保持你的系统更新到最新是十分重要的。这么想吧:运行过时的操作系统,就像是你坐在全副武装的坦克里头,而门却没有锁。武器会保护你吗?任何人都可以进入开放的大门,对你造成伤害。同样,在你的系统中也有没有打补丁的漏洞,这些漏洞会危害到你的系统。开源社区,不像专利世界,在漏洞补丁方面反应是相当快的,所以,如果你保持系统最新,你也获得了安全保证。 + +留意新闻站点,了解安全漏洞。如果发现了一个漏洞,请阅读之,然后在补丁出来的第一时间更新。不管怎样,在生产机器上,你每星期必须至少运行一次更新命令。如果你运行这一台复杂的服务器,那么就要额外当心了。仔细阅读变更日志,以确保更新不会搞坏你的自定义服务。 + +**Ubuntu**:牢记一点:你在升级系统或安装不管什么软件之前,都必须要刷新仓库(也就是repos)。在Ubuntu上,你可以使用下面的命令来更新系统,第一个命令用于刷新仓库: + + sudo apt-get update + +仓库更新后,现在你可以运行系统更新命令了: + + sudo apt-get upgrade + +然而,这个命令不会更新内核和其它一些包,所以你也必须要运行下面这个命令: + + sudo apt-get dist-upgrade + +**openSUSE**:如果你是在openSUSE上,你可以使用以下命令来更新系统(照例,第一个命令的意思是更新仓库) + + sudo zypper refresh + sudo zypper up + +**Fedora**:如果你是在Fedora上,你可以使用'dnf'命令,它是zypper和apt-get的'同类': + + sudo dnf update + sudo dnf upgrade + +### 软件安装与移除 ### + +你只可以安装那些你系统上启用的仓库中可用的包,各个发行版默认都附带有并启用了一些官方或者第三方仓库。 +**Ubuntu**: To install any package on Ubuntu, first update the repo and then use this syntax: +**Ubuntu**:要在Ubuntu上安装包,首先更新仓库,然后使用下面的语句: + + sudo apt-get install [package_name] + +样例: + + sudo apt-get install gimp + +**openSUSE**:命令是这样的: + + sudo zypper install [package_name] + +**Fedora**:Fedora已经丢弃了'yum',现在换成了'dnf',所以命令是这样的: + + sudo dnf install [package_name] + +移除软件的过程也一样,只要把'install'改成'remove'。 + +**Ubuntu**: + + sudo apt-get remove [package_name] + +**openSUSE**: + + sudo zypper remove [package_name] + +**Fedora**: + + sudo dnf remove [package_name] + +### 如何管理第三方软件? ### + +在一个庞大的开发者社区中,这些开发者们为用户提供了许多的软件。不同的发行版有不同的机制来使用这些第三方软件,将它们提供给用户。同时也取决于开发者怎样将这些软件提供给用户,有些开发者会提供二进制包,而另外一些开发者则将软件发布到仓库中。 + +Ubuntu严重依赖于PPA(个人包归档),但是,不幸的是,它却没有提供一个内建工具来帮助用于搜索这些PPA仓库。在安装软件前,你将需要通过Google搜索PPA,然后手工添加该仓库。下面就是添加PPA到系统的方法: + + sudo add-apt-repository ppa: + +样例:比如说,我想要添加LibreOffice PPA到我的系统中。我应该Google该PPA,然后从Launchpad获得该仓库的名称,在本例中它是"libreoffice/ppa"。然后,使用下面的命令来添加该PPA: + + sudo add-apt-repository ppa:libreoffice/ppa + +它会要你按下回车键来导入秘钥。完成后,使用'update'命令来刷新仓库,然后安装该包。 + +openSUSE拥有一个针对第三方应用的优雅的解决方案。你可以访问software.opensuse.org,一键点击搜索并安装相应包,它会自动将对应的仓库添加到你的系统中。如果你想要手工添加仓库,可以使用该命令: + + sudo zypper ar -f url_of_the_repo name_of_repo + sudo zypper ar -f http://download.opensuse.org/repositories/LibreOffice:Factory/openSUSE_13.2/LibreOffice:Factory.repo LOF + +然后,刷新仓库并安装软件: + + sudo zypper refresh + sudo zypper install libreoffice + +Fedora用户只需要添加RPMFusion(free和non-free仓库一起),该仓库包含了大量的应用。如果你需要添加仓库,命令如下: + +dnf config-manager --add-repo http://www.example.com/example.repo + +### 一些基本命令 ### + +我已经写了一些关于使用CLI来管理你系统上的文件的[文章][1],下面介绍一些基本米ing令,这些命令在所有发行版上都经常会用到。 + +拷贝文件或目录到一个新的位置: + + cp path_of_file_1 path_of_the_directory_where_you_want_to_copy/ + +将某个目录中的所有文件拷贝到一个新的位置(注意斜线和星号,它指的是该目录下的所有文件): + + cp path_of_files/* path_of_the_directory_where_you_want_to_copy/ + +将一个文件从某个位置移动到另一个位置(尾斜杠是说在该目录中): + + mv path_of_file_1 path_of_the_directory_where_you_want_to_move/ + +将所有文件从一个位置移动到另一个位置: + + mv path_of_directory_where_files_are/* path_of_the_directory_where_you_want_to_move/ + +删除一个文件: + + rm path_of_file + +删除一个目录: + + rm -r path_of_directory + +移除目录中所有内容,完整保留目录文件夹: + + rm -r path_of_directory/* + +### 创建新目录 ### + +要创建一个新目录,首先输入你要创建的目录的位置。比如说,你想要在你的Documents目录中创建一个名为'foundation'的文件夹。让我们使用 cd (即change directory,改变目录)命令来改变目录: + + cd /home/swapnil/Documents + +(替换'swapnil'为你系统中的用户) + +然后,使用 mkdir 命令来创建该目录: + + mkdir foundation + +你也可以从任何地方创建一个目录,通过指定该目录的路径即可。例如: + + mdkir /home/swapnil/Documents/foundation + +如果你想要创建父-子目录,那是指目录中的目录,那么可以使用 -p 选项。它会在指定路径中创建所有目录: + + mdkir -p /home/swapnil/Documents/linux/foundation + +### 成为root ### + +你或许需要成为root,或者具有sudo权力的用户,来实施一些管理任务,如管理软件包或者对根目录或其下的文件进行一些修改。其中一个例子就是编辑'fstab'文件,该文件记录了挂载的硬件驱动器。它在'etc'目录中,而该目录又在根目录中,你只能作为超级用户来修改该文件。在大多数的发行版中,你可以通过'切换用户'来成为root。比如说,在openSUSE上,我想要成为root,因为我要在根目录中工作,你可以使用下面的命令之一: + + sudo su - + +或 + + su - + +该命令会要求输入密码,然后你就具有root特权了。记住一点:千万不要以root用户来运行系统,除非你知道你正在做什么。另外重要的一点需要注意的是,你以root什么对目录或文件进行修改后,会将它们的拥有关系从该用户或特定的服务改变为root。你必须恢复这些文件的拥有关系,否则该服务或用户就不能访问或写入到那些文件。要改变用户,命令如下: + + sudo chown -R user:user /path_of_file_or_directory + +当你将其它发行版上的分区挂载到系统中时,你可能经常需要该操作。当你试着访问这些分区上的文件时,你可能会碰到权限拒绝错误,你只需要改变这些分区的拥有关系就可以访问它们了。需要额外当心的是,不要改变根目录的权限或者拥有关系。 + +这些就是Linux新手们需要的基本命令。如果你有任何问题,或者如果你想要我们涵盖一个特定的话题,请在下面的评论中告诉我们吧。 + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/learn/tutorials/842251-must-know-linux-commands-for-new-users + +作者:[Swapnil Bhartiya][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/61003 +[1]:http://www.linux.com/learn/tutorials/828027-how-to-manage-your-files-from-the-command-line From bc558997ab70ad174767f013c6a2dac05e959e9b Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 30 Jul 2015 22:23:23 +0800 Subject: [PATCH 1547/2517] PUB:20150309 Comparative Introduction To FreeBSD For Linux Users MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wwy-hust 翻译的不错! --- ...Introduction To FreeBSD For Linux Users.md | 101 ++++++++++++++++++ ...Introduction To FreeBSD For Linux Users.md | 98 ----------------- 2 files changed, 101 insertions(+), 98 deletions(-) create mode 100644 published/20150309 Comparative Introduction To FreeBSD For Linux Users.md delete mode 100644 translated/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md diff --git a/published/20150309 Comparative Introduction To FreeBSD For Linux Users.md b/published/20150309 Comparative Introduction To FreeBSD For Linux Users.md new file mode 100644 index 0000000000..01ee52d26a --- /dev/null +++ b/published/20150309 Comparative Introduction To FreeBSD For Linux Users.md @@ -0,0 +1,101 @@ +FreeBSD 和 Linux 有什么不同? +================================================================================ + +![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/FreeBSD-790x494.jpg) + +### 简介 ### + +BSD最初从UNIX继承而来,目前,有许多的类Unix操作系统是基于BSD的。FreeBSD是使用最广泛的开源的伯克利软件发行版(即 BSD 发行版)。就像它隐含的意思一样,它是一个自由开源的类Unix操作系统,并且是公共服务器平台。FreeBSD源代码通常以宽松的BSD许可证发布。它与Linux有很多相似的地方,但我们得承认它们在很多方面仍有不同。 + +本文的其余部分组织如下:FreeBSD的描述在第一部分,FreeBSD和Linux的相似点在第二部分,它们的区别将在第三部分讨论,对他们功能的讨论和总结在最后一节。 + +### FreeBSD描述 ### + +#### 历史 #### + +- FreeBSD的第一个版本发布于1993年,它的第一张CD-ROM是FreeBSD1.0,发行于1993年12月。接下来,FreeBSD 2.1.0在1995年发布,并且获得了所有用户的青睐。实际上许多IT公司都使用FreeBSD并且很满意,我们可以列出其中的一些:IBM、Nokia、NetApp和Juniper Network。 + +#### 许可证 #### + +- 关于它的许可证,FreeBSD以多种开源许可证进行发布,它的名为Kernel的最新代码以两句版BSD许可证进行了发布,给予使用和重新发布FreeBSD的绝对自由。其它的代码则以三句版或四句版BSD许可证进行发布,有些是以GPL和CDDL的许可证发布的。 + +(LCTT 译注:BSD 许可证与 GPL 许可证相比,相当简短,最初只有四句规则;1999年应 RMS 请求,删除了第三句,新的许可证称作“新 BSD”或三句版BSD;原来的 BSD 许可证称作“旧 BSD”、“修订的 BSD”或四句版BSD;也有一种删除了第三、第四两句的版本,称之为两句版 BSD,等价于 MIT 许可证。) + +#### 用户 #### + +- FreeBSD的重要特点之一就是它的用户多样性。实际上,FreeBSD可以作为邮件服务器、Web 服务器、FTP 服务器以及路由器等,您只需要在它上运行服务相关的软件即可。而且FreeBSD还支持ARM、PowerPC、MIPS、x86、x86-64架构。 + +### FreeBSD和Linux的相似处 ### + +FreeBSD和Linux是两个自由开源的软件。实际上,它们的用户可以很容易的检查并修改源代码,用户拥有绝对的自由。而且,FreeBSD和Linux都是类Unix系统,它们的内核、内部组件、库程序都使用从历史上的AT&T Unix继承来的算法。FreeBSD从根基上更像Unix系统,而Linux是作为自由的类Unix系统发布的。许多工具应用都可以在FreeBSD和Linux中找到,实际上,他们几乎有同样的功能。 + +此外,FreeBSD能够运行大量的Linux应用。它可以安装一个Linux的兼容层,这个兼容层可以在编译FreeBSD时加入AAC Compact Linux得到,或通过下载已编译了Linux兼容层的FreeBSD系统,其中会包括兼容程序:aac_linux.ko。不同于FreeBSD的是,Linux无法运行FreeBSD的软件。 + +最后,我们注意到虽然二者有同样的目标,但二者还是有一些不同之处,我们在下一节中列出。 + +### FreeBSD和Linux的区别 ### + +目前对于大多数用户来说并没有一个选择FreeBSD还是Linux的明确的准则。因为他们有着很多同样的应用程序,因为他们都被称作类Unix系统。 + +在这一章,我们将列出这两种系统的一些重要的不同之处。 + +#### 许可证 #### + +- 两个系统的区别首先在于它们的许可证。Linux以GPL许可证发行,它为用户提供阅读、发行和修改源代码的自由,GPL许可证帮助用户避免仅仅发行二进制。而FreeBSD以BSD许可证发布,BSD许可证比GPL更宽容,因为其衍生著作不需要仍以该许可证发布。这意味着任何用户能够使用、发布、修改代码,并且不需要维持之前的许可证。 +- 您可以依据您的需求,在两种许可证中选择一种。首先是BSD许可证,由于其特殊的条款,它更受用户青睐。实际上,这个许可证使用户在保证源代码的封闭性的同时,可以售卖以该许可证发布的软件。再说说GPL,它需要每个使用以该许可证发布的软件的用户多加注意。 +- 如果想在以不同许可证发布的两种软件中做出选择,您需要了解他们各自的许可证,以及他们开发中的方法论,从而能了解他们特性的区别,来选择更适合自己需求的。 + +#### 控制 #### + +- 由于FreeBSD和Linux是以不同的许可证发布的,Linus Torvalds控制着Linux的内核,而FreeBSD却与Linux不同,它并未被控制。我个人更倾向于使用FreeBSD而不是Linux,这是因为FreeBSD才是绝对自由的软件,没有任何控制许可证的存在。Linux和FreeBSD还有其他的不同之处,我建议您先不急着做出选择,等读完本文后再做出您的选择。 + +#### 操作系统 #### + +- Linux主要指内核系统,这与FreeBSD不同,FreeBSD的整个系统都被维护着。FreeBSD的内核和一组由FreeBSD团队开发的软件被作为一个整体进行维护。实际上,FreeBSD开发人员能够远程且高效的管理核心操作系统。 +- 而Linux方面,在管理系统方面有一些困难。由于不同的组件由不同的源维护,Linux开发者需要将它们汇集起来,才能达到同样的功能。 +- FreeBSD和Linux都给了用户大量的可选软件和发行版,但他们管理的方式不同。FreeBSD是统一的管理方式,而Linux需要被分别维护。 + +#### 硬件支持 #### + +- 说到硬件支持,Linux比FreeBSD做的更好。但这不意味着FreeBSD没有像Linux那样支持硬件的能力。他们只是在管理的方式不同,这通常还依赖于您的需求。因此,如果您在寻找最新的解决方案,FreeBSD更适应您;但如果您在寻找更多的普适性,那最好使用Linux。 + +#### 原生FreeBSD Vs 原生Linux #### + +- 两者的原生系统的区别又有不同。就像我之前说的,Linux是一个Unix的替代系统,由Linux Torvalds编写,并由网络上的许多极客一起协助实现的。Linux有一个现代系统所需要的全部功能,诸如虚拟内存、共享库、动态加载、优秀的内存管理等。它以GPL许可证发布。 +- FreeBSD也继承了Unix的许多重要的特性。FreeBSD作为在加州大学开发的BSD的一种发行版。开发BSD的最重要的原因是用一个开源的系统来替代AT&T操作系统,从而给用户无需AT&T许可证便可使用的能力。 +- 许可证的问题是开发者们最关心的问题。他们试图提供一个最大化克隆Unix的开源系统。这影响了用户的选择,由于FreeBSD使用BSD许可证进行发布,因而相比Linux更加自由。 + +#### 支持的软件包 #### + +- 从用户的角度来看,另一个二者不同的地方便是软件包以及从源码安装的软件的可用性和支持。Linux只提供了预编译的二进制包,这与FreeBSD不同,它不但提供预编译的包,而且还提供从源码编译和安装的构建系统。使用它的 ports 工具,FreeBSD给了您选择使用预编译的软件包(默认)和在编译时定制您软件的能力。(LCTT 译注:此处说明有误。Linux 也提供了源代码方式的包,并支持自己构建。) +- 这些 ports 允许您构建所有支持FreeBSD的软件。而且,它们的管理还是层次化的,您可以在/usr/ports下找到源文件的地址以及一些正确使用FreeBSD的文档。 +- 这些提到的 ports给予你产生不同软件包版本的可能性。FreeBSD给了您通过源代码构建以及预编译的两种软件,而不是像Linux一样只有预编译的软件包。您可以使用两种安装方式管理您的系统。 + +#### FreeBSD 和 Linux 常用工具比较 #### + +- 有大量的常用工具在FreeBSD上可用,并且有趣的是他们由FreeBSD的团队所拥有。相反的,Linux工具来自GNU,这就是为什么在使用中有一些限制。(LCTT 译注:这也是 Linux 正式的名称被称作“GNU/Linux”的原因,因为本质上 Linux 其实只是指内核。) +- 实际上FreeBSD采用的BSD许可证非常有益且有用。因此,您有能力维护核心操作系统,控制这些应用程序的开发。有一些工具类似于它们的祖先 - BSD和Unix的工具,但不同于GNU的套件,GNU套件只想做到最小的向后兼容。 + +#### 标准 Shell #### + +- FreeBSD默认使用tcsh。它是csh的评估版,由于FreeBSD以BSD许可证发行,因此不建议您在其中使用GNU的组件 bash shell。bash和tcsh的区别仅仅在于tcsh的脚本功能。实际上,我们更推荐在FreeBSD中使用sh shell,因为它更加可靠,可以避免一些使用tcsh和csh时出现的脚本问题。 + +#### 一个更加层次化的文件系统 #### + +- 像之前提到的一样,使用FreeBSD时,基础操作系统以及可选组件可以被很容易的区别开来。这导致了一些管理它们的标准。在Linux下,/bin,/sbin,/usr/bin或者/usr/sbin都是存放可执行文件的目录。FreeBSD不同,它有一些附加的对其进行组织的规范。基础操作系统被放在/usr/local/bin或者/usr/local/sbin目录下。这种方法可以帮助管理和区分基础操作系统和可选组件。 + +### 结论 ### + +FreeBSD和Linux都是自由且开源的系统,他们有相似点也有不同点。上面列出的内容并不能说哪个系统比另一个更好。实际上,FreeBSD和Linux都有自己的特点和技术规格,这使它们与别的系统区别开来。那么,您有什么看法呢?您已经有在使用它们中的某个系统了么?如果答案为是的话,请给我们您的反馈;如果答案是否的话,在读完我们的描述后,您怎么看?请在留言处发表您的观点。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/comparative-introduction-freebsd-linux-users/ + +作者:[anismaj][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://www.unixmen.com/author/anis/ \ No newline at end of file diff --git a/translated/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md b/translated/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md deleted file mode 100644 index 76368e1033..0000000000 --- a/translated/talk/20150309 Comparative Introduction To FreeBSD For Linux Users.md +++ /dev/null @@ -1,98 +0,0 @@ -ԱȽϵķʽLinuxûFreeBSD -================================================================================ -![](https://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/FreeBSD-790x494.jpg) - -### ### - -BSDUNIX̳жĿǰUnixϵͳǻBSDġFreeBSDʹ㷺ĿԴа棨BSDа棩˼һһѿԴUnixϵͳǹƽ̨FreeBSDԴͨԿɵBSD֤LinuxкܶƵĵطǵóںܶ෽вͬ - -ĵಿ֯£FreeBSDڵһ֣FreeBSDLinuxƵڵڶ֣ǵڵۣǹܵۺܽһڡ - -### FreeBSD ### - -#### ʷ #### - -- FreeBSDĵһ汾1993꣬ĵһCD-ROMFreeBSD1.0Ҳ1993ꡣFreeBSD 2.1.01995귢һûʵIT˾ʹFreeBSDҺ⣬ǿгеһЩIBMNokiaNetAppJuniper Network - -#### ֤ #### - -- ֤FreeBSDԶֿԴ֤зµΪKernelĴBSD֤˷ʹú·FreeBSDľɡĴBSD֤зЩGPLCDDL֤ġ - -#### û #### - -- FreeBSDҪص֮һûʵϣFreeBSDΪʼWeb ServerFTPԼ·ȣֻҪзصɡFreeBSD֧ARMPowerPCMIPSx86x86-64ܹ - -### FreeBSDLinuxƴ ### - -FreeBSDLinuxѿԴʵϣǵûԺ׵ļ鲢޸Դ룬ûӵоԵɡңFreeBSDLinuxUnixϵͳǵںˡڲʹôʷϵAT&T Unix̳е㷨FreeBSDӸϸUnixϵͳLinuxΪѵUnixϵͳġ๤ӦöFreeBSDLinuxҵʵϣǼͬĹܡ - -⣬FreeBSDܹдLinuxӦá԰װһLinuxļݲ㣬ݲڱFreeBSDʱAAC Compact LinuxõͨѱLinuxݲFreeBSDϵͳлݳaac_linux.koͬFreeBSDǣLinux޷FreeBSD - -ע⵽ȻͬĿ꣬߻һЩ֮ͬһг - -### FreeBSDLinux ### - -Ŀǰڴû˵ûһѡFreeBSDLinux׼ΪźܶͬӦóΪǶUnixϵͳ - -һ£ǽгϵͳһЩҪIJ֮ͬ - -#### ֤ #### - -- ϵͳǵ֤LinuxGPL֤УΪûṩĶк޸ԴɣGPL֤ûжơFreeBSDBSD֤BSD֤GPLݣΪҪԸ֤ζκûܹʹá޸Ĵ룬ҲҪά֮ǰ֤ -- ֤ѡһ֡BSD֤ûʵϣ֤ʹûڱ֤ԴķԵͬʱԸ֤˵˵GPLҪÿʹԸ֤ûע⡣ -- Բ֤ͬѡҪ˽ǸԵ֤ԼǿеķۣӶ˽ԵѡʺԼġ - -#### #### - -- FreeBSDLinuxԲ֤ͬģLinus TorvaldsLinuxںˣFreeBSDȴLinuxͬδơҸ˸ʹFreeBSDLinuxΪFreeBSDǾɵûκοɵĴڡLinuxFreeBSDIJ֮ͬҽȲѡ񣬵ȶ걾ĺѡ - -#### ϵͳ #### - -- Linux۽ںϵͳFreeBSDͬFreeBSDϵͳάšFreeBSDں˺һFreeBSDŶӿΪһάʵϣFreeBSDԱܹԶҸЧĹIJϵͳ -- Linux棬ڹϵͳһЩѡڲͬɲͬԴάLinuxҪǻ㼯ܴﵽͬĹܡ -- FreeBSDLinuxûĿѡͷа棬ǹķʽͬFreeBSDͳһĹʽLinuxҪֱά - -#### Ӳ֧ #### - -- ˵Ӳ֧֣LinuxFreeBSDĸáⲻζFreeBSDûLinux֧ӲֻڹķʽͬͨˣѰµĽFreeBSDӦѰһĻʹLinux - -#### ԭFreeBSD Vs ԭLinux #### - -- ߵԭϵͳв֮ͬǰ˵ģLinuxһUnixϵͳLinux Torvaldsдϵ༫һЭʵֵġLinuxһִϵͳҪȫܣڴ桢⡢̬ءڴȡGPL֤ -- FreeBSDҲ̳UnixҪԡFreeBSDΪڼݴѧBSDһַа档BSDҪԭһԴϵͳAT&TϵͳӶûAT&T֤ʹõ -- ֤ǿĵ⡣ͼṩһ󻯿¡UnixĿԴϵͳӰûѡFreeBSDLinuxʹBSD֤зɡ - -#### ֵ֧ #### - -- ûĽǶһ߲ͬĵطԼԴ밲װĿԺ֧֡LinuxֻṩԤĶưFreeBSDͬṩԤİһṩԴͰװĹϵͳֲFreeBSDѡʹԤĬϣڱʱ -- ЩѡFreeBSDеңǵĹDzλģ/usr/portsҵԴļĵַԼһЩȷʹFreeBSDĵ -- ЩᵽĿѡ˲ͬ汾ĿԡFreeBSDͨԴ빹ԼԤLinuxһֻԤʹְװʽϵͳ - -#### FreeBSD Linux ù߱Ƚ #### - -- дijùFreeBSDϿãȤFreeBSDŶӵС෴ģLinuxGNUΪʲôʹһЩơ -- ʵFreeBSDõBSD֤dzáˣάIJϵͳЩӦóĿһЩǵ - BSDUnixĹߣͬGNU׼GNU׼ֻСݡ - -#### ׼ Shell #### - -- FreeBSDĬʹtcshcsh棬FreeBSDBSD֤У˲ʹGNU bash shellbashtcshtcshĽűܡʵϣǸƼFreeBSDʹsh shellΪӿɿԱһЩʹtcshcshʱֵĽű⡣ - -#### һӲλļϵͳ #### - -- ֮ǰᵽһʹFreeBSDʱϵͳԼѡԱ׵⵼һЩǵı׼Linux£/bin/sbin/usr/bin/usr/sbinǴſִļĿ¼FreeBSDͬһЩӵĶ֯Ĺ淶ϵͳ/usr/local/bin/usr/local/sbinĿ¼¡ַ԰ֻϵͳͿѡ - -### ### - -FreeBSDLinuxҿԴϵͳƵҲвͬ㡣гݲ˵ĸϵͳһáʵϣFreeBSDLinuxԼصͼʹϵͳôʲôأѾʹеijϵͳôΪǵĻķǷĻڶǵôԴĹ۵㡣 - --------------------------------------------------------------------------------- - -via: https://www.unixmen.com/comparative-introduction-freebsd-linux-users/ - -ߣ[anismaj][a] -ߣ[wwy-hust](https://github.com/wwy-hust) -Уԣ[УID](https://github.com/УID) - - [LCTT](https://github.com/LCTT/TranslateProject) ԭ룬[Linuxй](http://linux.cn/) Ƴ - -[a]:https://www.unixmen.com/author/anis/ \ No newline at end of file From 471b7f98d2364433e49d47db97c1070b4ecbdd8a Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 31 Jul 2015 13:57:30 +0800 Subject: [PATCH 1548/2517] =?UTF-8?q?=E8=A1=A5=E5=AE=8C=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @strugglingyouth 另外,也别忘记扩展名。 --- ...- Part 2 => 20150717 How to collect NGINX metrics - Part 2.md} | 0 ...CD, Watch User Activity and Check Memory Usages of Browser.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{How to collect NGINX metrics - Part 2 => 20150717 How to collect NGINX metrics - Part 2.md} (100%) rename translated/{Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser => tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md} (100%) diff --git a/translated/tech/How to collect NGINX metrics - Part 2 b/translated/tech/20150717 How to collect NGINX metrics - Part 2.md similarity index 100% rename from translated/tech/How to collect NGINX metrics - Part 2 rename to translated/tech/20150717 How to collect NGINX metrics - Part 2.md diff --git a/translated/Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser b/translated/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md similarity index 100% rename from translated/Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser rename to translated/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md From f76fa728ffb1bcb30bab43d4ab4bc4976b3530a4 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 31 Jul 2015 14:36:26 +0800 Subject: [PATCH 1549/2517] PUB:Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @dingdongnigetou 原文中多次混杂 Plex Media Server 和 Plex Home Media Server,经过到官网的查看,并无 Home 产品及名称,所以统一了。 --- ...er On Ubuntu or CentOS 7.1 or Fedora 22.md | 62 +++++++++---------- 1 file changed, 30 insertions(+), 32 deletions(-) rename {translated/tech => published}/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md (63%) diff --git a/translated/tech/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md b/published/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md similarity index 63% rename from translated/tech/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md rename to published/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md index 813057798b..f8f1a26a3b 100644 --- a/translated/tech/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md +++ b/published/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md @@ -1,20 +1,18 @@ - -如何在 Ubuntu/CentOS7.1/Fedora22 上安装 Plex Media Server ? +如何在 Ubuntu/CentOS7.1/Fedora22 上安装 Plex Media Server ================================================================================ -在本文中我们将会向你展示如何容易地在主流的最新发布的Linux发行版上安装Plex Home Media Server。在Plex安装成功后你将可以使用你的集中式家庭媒体播放系统,该系统能让多个Plex播放器App共享它的媒体资源,并且该系统允许你设置你的环境,通过增加你的设备以及设置一个可以一起使用Plex的用户组。让我们首先在Ubuntu15.04上开始Plex的安装。 +在本文中我们将会向你展示如何容易地在主流的最新Linux发行版上安装Plex Media Server。在Plex安装成功后你将可以使用你的中央式家庭媒体播放系统,该系统能让多个Plex播放器App共享它的媒体资源,并且该系统允许你设置你的环境,增加你的设备以及设置一个可以一起使用Plex的用户组。让我们首先在Ubuntu15.04上开始Plex的安装。 ### 基本的系统资源 ### 系统资源主要取决于你打算用来连接服务的设备类型和数量, 所以根据我们的需求我们将会在一个单独的服务器上使用以下系统资源。 -注:表格 - + - + @@ -22,11 +20,11 @@ - + - + @@ -38,13 +36,13 @@ #### 步骤 1: 系统更新 #### -用root权限登陆你的服务器。确保你的系统是最新的,如果不是就使用下面的命令。 +用root权限登录你的服务器。确保你的系统是最新的,如果不是就使用下面的命令。 root@ubuntu-15:~#apt-get update #### 步骤 2: 下载最新的Plex Media Server包 #### -创建一个新目录,用wget命令从Plex官网下载为Ubuntu提供的.deb包并放入该目录中。 +创建一个新目录,用wget命令从[Plex官网](https://plex.tv/)下载为Ubuntu提供的.deb包并放入该目录中。 root@ubuntu-15:~# cd /plex/ root@ubuntu-15:/plex# @@ -52,7 +50,7 @@ #### 步骤 3: 安装Plex Media Server的Debian包 #### -现在在相同的目录下执行下面的命令来开始debian包的安装, 然后检查plexmediaserver(译者注: 原文plekmediaserver, 明显笔误)的状态。 +现在在相同的目录下执行下面的命令来开始debian包的安装, 然后检查plexmediaserver服务的状态。 root@ubuntu-15:/plex# dpkg -i plexmediaserver_0.9.12.3.1173-937aac3_amd64.deb @@ -62,41 +60,41 @@ ![Plexmediaserver Service](http://blog.linoxide.com/wp-content/uploads/2015/06/plex-status.png) -### 在Ubuntu 15.04上设置Plex Home Media Web应用 ### +### 在Ubuntu 15.04上设置Plex Media Web应用 ### -让我们在你的本地网络主机中打开web浏览器, 并用你的本地主机IP以及端口32400来打开Web界面并完成以下步骤来配置Plex。 +让我们在你的本地网络主机中打开web浏览器, 并用你的本地主机IP以及端口32400来打开Web界面,并完成以下步骤来配置Plex。 http://172.25.10.179:32400/web http://localhost:32400/web -#### 步骤 1: 登陆前先注册 #### +#### 步骤 1: 登录前先注册 #### -在你访问到Plex Media Server的Web界面之后(译者注: 原文是Plesk, 应该是笔误), 确保注册并填上你的用户名(译者注: 原文username email ID感觉怪怪:))和密码来登陆。 +在你访问到Plex Media Server的Web界面之后, 确保注册并填上你的用户名和密码来登录。 ![Plex Sign In](http://blog.linoxide.com/wp-content/uploads/2015/06/PMS-Login.png) -#### 输入你的PIN码来保护你的Plex Home Media用户(译者注: 原文Plex Media Home, 个人觉得专业称谓应该保持一致) #### +#### 输入你的PIN码来保护你的Plex Media用户#### ![Plex User Pin](http://blog.linoxide.com/wp-content/uploads/2015/06/333.png) -现在你已经成功的在Plex Home Media下配置你的用户。 +现在你已经成功的在Plex Media下配置你的用户。 ![Welcome To Plex](http://blog.linoxide.com/wp-content/uploads/2015/06/3333.png) ### 在设备上而不是本地服务器上打开Plex Web应用 ### -正如我们在Plex Media主页看到的表明"你没有权限访问这个服务"。 这是因为我们跟服务器计算机不在同个网络。 +如我们在Plex Media主页看到的提示“你没有权限访问这个服务”。 这说明我们跟服务器计算机不在同个网络。 ![Plex Server Permissions](http://blog.linoxide.com/wp-content/uploads/2015/06/33.png) -现在我们需要解决这个权限问题以便我们通过设备访问服务器而不是通过托管服务器(Plex服务器), 通过完成下面的步骤。 +现在我们需要解决这个权限问题,以便我们通过设备访问服务器而不是只能在服务器上访问。通过完成下面的步骤完成。 -### 设置SSH隧道使Windows系统访问到Linux服务器 ### +### 设置SSH隧道使Windows系统可以访问到Linux服务器 ### 首先我们需要建立一条SSH隧道以便我们访问远程服务器资源,就好像资源在本地一样。 这仅仅是必要的初始设置。 如果你正在使用Windows作为你的本地系统,Linux作为服务器,那么我们可以参照下图通过Putty来设置SSH隧道。 -(译者注: 首先要在Putty的Session中用Plex服务器IP配置一个SSH的会话,才能进行下面的隧道转发规则配置。 +(LCTT译注: 首先要在Putty的Session中用Plex服务器IP配置一个SSH的会话,才能进行下面的隧道转发规则配置。 然后点击“Open”,输入远端服务器用户名密码, 来保持SSH会话连接。) ![Plex SSH Tunnel](http://blog.linoxide.com/wp-content/uploads/2015/06/ssh-tunnel.png) @@ -111,13 +109,13 @@ ![Agree to Plex term](http://blog.linoxide.com/wp-content/uploads/2015/06/5.png) -现在一个功能齐全的Plex Home Media Server已经准备好添加新的媒体库、频道、播放列表等资源。 +现在一个功能齐全的Plex Media Server已经准备好添加新的媒体库、频道、播放列表等资源。 ![PMS Settings](http://blog.linoxide.com/wp-content/uploads/2015/06/8.png) ### 在CentOS 7.1上安装Plex Media Server 0.9.12.3 ### -我们将会按照上述在Ubuntu15.04上安装Plex Home Media Server的步骤来将Plex安装到CentOS 7.1上。 +我们将会按照上述在Ubuntu15.04上安装Plex Media Server的步骤来将Plex安装到CentOS 7.1上。 让我们从安装Plex Media Server开始。 @@ -144,9 +142,9 @@ [root@linux-tutorials plex]# systemctl enable plexmediaserver.service [root@linux-tutorials plex]# systemctl status plexmediaserver.service -### 在CentOS-7.1上设置Plex Home Media Web应用 ### +### 在CentOS-7.1上设置Plex Media Web应用 ### -现在我们只需要重复在Ubuntu上设置Plex Web应用的所有步骤就可以了。 让我们在Web浏览器上打开一个新窗口并用localhost或者Plex服务器的IP(译者注: 原文为or your Plex server, 明显的笔误)来访问Plex Home Media Web应用(译者注:称谓一致)。 +现在我们只需要重复在Ubuntu上设置Plex Web应用的所有步骤就可以了。 让我们在Web浏览器上打开一个新窗口并用localhost或者Plex服务器的IP来访问Plex Media Web应用。 http://172.20.3.174:32400/web http://localhost:32400/web @@ -157,25 +155,25 @@ ### 在Fedora 22工作站上安装Plex Media Server 0.9.12.3 ### -基本的下载和安装Plex Media Server步骤跟在CentOS 7.1上安装的步骤一致。我们只需要下载对应的rpm包然后用rpm命令来安装它。 +下载和安装Plex Media Server步骤基本跟在CentOS 7.1上安装的步骤一致。我们只需要下载对应的rpm包然后用rpm命令来安装它。 ![PMS Installation](http://blog.linoxide.com/wp-content/uploads/2015/06/plex-on-fedora.png) -### 在Fedora 22工作站上配置Plex Home Media Web应用 ### +### 在Fedora 22工作站上配置Plex Media Web应用 ### -我们在(与Plex服务器)相同的主机上配置Plex Media Server,因此不需要设置SSH隧道。只要在你的Fedora 22工作站上用Plex Home Media Server的默认端口号32400打开Web浏览器并同意Plex的服务条款即可。 +我们在(与Plex服务器)相同的主机上配置Plex Media Server,因此不需要设置SSH隧道。只要在你的Fedora 22工作站上用Plex Media Server的默认端口号32400打开Web浏览器并同意Plex的服务条款即可。 ![Plex Agreement](http://blog.linoxide.com/wp-content/uploads/2015/06/Plex-Terms.png) -**欢迎来到Fedora 22工作站上的Plex Home Media Server** +*欢迎来到Fedora 22工作站上的Plex Media Server* -让我们用你的Plex账户登陆,并且开始将你喜欢的电影频道添加到媒体库、创建你的播放列表、添加你的图片以及享用更多其他的特性。 +让我们用你的Plex账户登录,并且开始将你喜欢的电影频道添加到媒体库、创建你的播放列表、添加你的图片以及享用更多其他的特性。 ![Plex Add Libraries](http://blog.linoxide.com/wp-content/uploads/2015/06/create-library.png) ### 总结 ### -我们已经成功完成Plex Media Server在主流Linux发行版上安装和配置。Plex Home Media Server永远都是媒体管理的最佳选择。 它在跨平台上的设置是如此的简单,就像我们在Ubuntu,CentOS以及Fedora上的设置一样。它简化了你组织媒体内容的工作,并将媒体内容“流”向其他计算机以及设备以便你跟你的朋友分享媒体内容。 +我们已经成功完成Plex Media Server在主流Linux发行版上安装和配置。Plex Media Server永远都是媒体管理的最佳选择。 它在跨平台上的设置是如此的简单,就像我们在Ubuntu,CentOS以及Fedora上的设置一样。它简化了你组织媒体内容的工作,并将媒体内容“流”向其他计算机以及设备以便你跟你的朋友分享媒体内容。 -------------------------------------------------------------------------------- @@ -183,7 +181,7 @@ via: http://linoxide.com/tools/install-plex-media-server-ubuntu-centos-7-1-fedor 作者:[Kashif Siddique][a] 译者:[dingdongnigetou](https://github.com/dingdongnigetou) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From e90526660c916abce2730f20217ab36b1ff9840c Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 1 Aug 2015 10:05:00 +0800 Subject: [PATCH 1550/2517] [Translated] tech/20150522 Analyzing Linux Logs.md --- sources/tech/20150522 Analyzing Linux Logs.md | 182 ------------------ .../tech/20150522 Analyzing Linux Logs.md | 181 +++++++++++++++++ 2 files changed, 181 insertions(+), 182 deletions(-) delete mode 100644 sources/tech/20150522 Analyzing Linux Logs.md create mode 100644 translated/tech/20150522 Analyzing Linux Logs.md diff --git a/sources/tech/20150522 Analyzing Linux Logs.md b/sources/tech/20150522 Analyzing Linux Logs.md deleted file mode 100644 index 832ea369ec..0000000000 --- a/sources/tech/20150522 Analyzing Linux Logs.md +++ /dev/null @@ -1,182 +0,0 @@ -ictlyh Translating -Analyzing Linux Logs -================================================================================ -There’s a great deal of information waiting for you within your logs, although it’s not always as easy as you’d like to extract it. In this section we will cover some examples of basic analysis you can do with your logs right away (just search what’s there). We’ll also cover more advanced analysis that may take some upfront effort to set up properly, but will save you time on the back end. Examples of advanced analysis you can do on parsed data include generating summary counts, filtering on field values, and more. - -We’ll show you first how to do this yourself on the command line using several different tools and then show you how a log management tool can automate much of the grunt work and make this so much more streamlined. - -### Searching with Grep ### - -Searching for text is the most basic way to find what you’re looking for. The most common tool for searching text is [grep][1]. This command line tool, available on most Linux distributions, allows you to search your logs using regular expressions. A regular expression is a pattern written in a special language that can identify matching text. The simplest pattern is to put the string you’re searching for surrounded by quotes - -#### Regular Expressions #### - -Here’s an example to find authentication logs for “user hoover” on an Ubuntu system: - - $ grep "user hoover" /var/log/auth.log - Accepted password for hoover from 10.0.2.2 port 4792 ssh2 - pam_unix(sshd:session): session opened for user hoover by (uid=0) - pam_unix(sshd:session): session closed for user hoover - -It can be hard to construct regular expressions that are accurate. For example, if we searched for a number like the port “4792” it could also match timestamps, URLs, and other undesired data. In the below example for Ubuntu, it matched an Apache log that we didn’t want. - - $ grep "4792" /var/log/auth.log - Accepted password for hoover from 10.0.2.2 port 4792 ssh2 - 74.91.21.46 - - [31/Mar/2015:19:44:32 +0000] "GET /scripts/samples/search?q=4972HTTP/1.0" 404 545 "-" "-” - -#### Surround Search #### - -Another useful tip is that you can do surround search with grep. This will show you what happened a few lines before or after a match. It can help you debug what lead up to a particular error or problem. The B flag gives you lines before, and A gives you lines after. For example, we can see that when someone failed to login as an admin, they also failed the reverse mapping which means they might not have a valid domain name. This is very suspicious! - - $ grep -B 3 -A 2 'Invalid user' /var/log/auth.log - Apr 28 17:06:20 ip-172-31-11-241 sshd[12545]: reverse mapping checking getaddrinfo for 216-19-2-8.commspeed.net [216.19.2.8] failed - POSSIBLE BREAK-IN ATTEMPT! - Apr 28 17:06:20 ip-172-31-11-241 sshd[12545]: Received disconnect from 216.19.2.8: 11: Bye Bye [preauth] - Apr 28 17:06:20 ip-172-31-11-241 sshd[12547]: Invalid user admin from 216.19.2.8 - Apr 28 17:06:20 ip-172-31-11-241 sshd[12547]: input_userauth_request: invalid user admin [preauth] - Apr 28 17:06:20 ip-172-31-11-241 sshd[12547]: Received disconnect from 216.19.2.8: 11: Bye Bye [preauth] - -#### Tail #### - -You can also pair grep with [tail][2] to get the last few lines of a file, or to follow the logs and print them in real time. This is useful if you are making interactive changes like starting a server or testing a code change. - - $ tail -f /var/log/auth.log | grep 'Invalid user' - Apr 30 19:49:48 ip-172-31-11-241 sshd[6512]: Invalid user ubnt from 219.140.64.136 - Apr 30 19:49:49 ip-172-31-11-241 sshd[6514]: Invalid user admin from 219.140.64.136 - -A full introduction on grep and regular expressions is outside the scope of this guide, but [Ryan’s Tutorials][3] include more in-depth information. - -Log management systems have higher performance and more powerful searching abilities. They often index their data and parallelize queries so you can quickly search gigabytes or terabytes of logs in seconds. In contrast, this would take minutes or in extreme cases hours with grep. Log management systems also use query languages like [Lucene][4] which offer an easier syntax for searching on numbers, fields, and more. - -### Parsing with Cut, AWK, and Grok ### - -#### Command Line Tools #### - -Linux offers several command line tools for text parsing and analysis. They are great if you want to quickly parse a small amount of data but can take a long time to process large volumes of data - -#### Cut #### - -The [cut][5] command allows you to parse fields from delimited logs. Delimiters are characters like equal signs or commas that break up fields or key value pairs. - -Let’s say we want to parse the user from this log: - - pam_unix(su:auth): authentication failure; logname=hoover uid=1000 euid=0 tty=/dev/pts/0 ruser=hoover rhost= user=root - -We can use the cut command like this to get the text after the eighth equal sign. This example is on an Ubuntu system: - - $ grep "authentication failure" /var/log/auth.log | cut -d '=' -f 8 - root - hoover - root - nagios - nagios - -#### AWK #### - -Alternately, you can use [awk][6], which offers more powerful features to parse out fields. It offers a scripting language so you can filter out nearly everything that’s not relevant. - -For example, let’s say we have the following log line on an Ubuntu system and we want to extract the username that failed to login: - - Mar 24 08:28:18 ip-172-31-11-241 sshd[32701]: input_userauth_request: invalid user guest [preauth] - -Here’s how you can use the awk command. First, put a regular expression /sshd.*invalid user/ to match the sshd invalid user lines. Then print the ninth field using the default delimiter of space using { print $9 }. This outputs the usernames. - - $ awk '/sshd.*invalid user/ { print $9 }' /var/log/auth.log - guest - admin - info - test - ubnt - -You can read more about how to use regular expressions and print fields in the [Awk User’s Guide][7]. - -#### Log Management Systems #### - -Log management systems make parsing easier and enable users to quickly analyze large collections of log files. They can automatically parse standard log formats like common Linux logs or web server logs. This saves a lot of time because you don’t have to think about writing your own parsing logic when troubleshooting a system problem. - -Here you can see an example log message from sshd which has each of the fields remoteHost and user parsed out. This is a screenshot from Loggly, a cloud-based log management service. - -![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.25.09-AM.png) - -You can also do custom parsing for non-standard formats. A common tool to use is [Grok][8] which uses a library of common regular expressions to parse raw text into structured JSON. Here is an example configuration for Grok to parse kernel log files inside Logstash: - - filter{ - grok { - match => {"message" => "%{CISCOTIMESTAMP:timestamp} %{HOST:host} %{WORD:program}%{NOTSPACE} %{NOTSPACE}%{NUMBER:duration}%{NOTSPACE} %{GREEDYDATA:kernel_logs}" - } - } - -And here is what the parsed output looks like from Grok: - -![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.30.37-AM.png) - -### Filtering with Rsyslog and AWK ### - -Filtering allows you to search on a specific field value instead of doing a full text search. This makes your log analysis more accurate because it will ignore undesired matches from other parts of the log message. In order to search on a field value, you need to parse your logs first or at least have a way of searching based on the event structure. - -#### How to Filter on One App #### - -Often, you just want to see the logs from just one application. This is easy if your application always logs to a single file. It’s more complicated if you need to filter one application among many in an aggregated or centralized log. Here are several ways to do this: - -1. Use the rsyslog daemon to parse and filter logs. This example writes logs from the sshd application to a file named sshd-messages, then discards the event so it’s not repeated elsewhere. You can try this example by adding it to your rsyslog.conf file. - - :programname, isequal, “sshd” /var/log/sshd-messages - &~ - -2. Use command line tools like awk to extract the values of a particular field like the sshd username. This example is from an Ubuntu system. - - $ awk '/sshd.*invalid user/ { print $9 }' /var/log/auth.log - guest - admin - info - test - ubnt - -3. Use a log management system that automatically parses your logs, then click to filter on the desired application name. Here is a screenshot showing the syslog fields in a log management service called Loggly. We are filtering on the appName “sshd” as indicated by the Venn diagram icon. - -![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.05.02-AM.png) - -#### How to Filter on Errors #### - -One of the most common thing people want to see in their logs is errors. Unfortunately, the default syslog configuration doesn’t output the severity of errors directly, making it difficult to filter on them. - -There are two ways you can solve this problem. First, you can modify your rsyslog configuration to output the severity in the log file to make it easier to read and search. In your rsyslog configuration you can add a [template][9] with pri-text such as the following: - - "<%pri-text%> : %timegenerated%,%HOSTNAME%,%syslogtag%,%msg%n" - -This example gives you output in the following format. You can see that the severity in this message is err. - - : Mar 11 18:18:00,hoover-VirtualBox,su[5026]:, pam_authenticate: Authentication failure - -You can use awk or grep to search for just the error messages. In this example for Ubuntu, we’re including some surrounding syntax like the . and the > which match only this field. - - $ grep '.err>' /var/log/auth.log - : Mar 11 18:18:00,hoover-VirtualBox,su[5026]:, pam_authenticate: Authentication failure - -Your second option is to use a log management system. Good log management systems automatically parse syslog messages and extract the severity field. They also allow you to filter on log messages of a certain severity with a single click. - -Here is a screenshot from Loggly showing the syslog fields with the error severity highlighted to show we are filtering for errors: - -![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.00.36-AM.png) - --------------------------------------------------------------------------------- - -via: http://www.loggly.com/ultimate-guide/logging/analyzing-linux-logs/ - -作者:[Jason Skowronski][a] [Amy Echeverri][b] [ Sadequl Hussain][c] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.linkedin.com/in/jasonskowronski -[b]:https://www.linkedin.com/in/amyecheverri -[c]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 -[1]:http://linux.die.net/man/1/grep -[2]:http://linux.die.net/man/1/tail -[3]:http://ryanstutorials.net/linuxtutorial/grep.php -[4]:https://lucene.apache.org/core/2_9_4/queryparsersyntax.html -[5]:http://linux.die.net/man/1/cut -[6]:http://linux.die.net/man/1/awk -[7]:http://www.delorie.com/gnu/docs/gawk/gawk_26.html#IDX155 -[8]:http://logstash.net/docs/1.4.2/filters/grok -[9]:http://www.rsyslog.com/doc/v8-stable/configuration/templates.html diff --git a/translated/tech/20150522 Analyzing Linux Logs.md b/translated/tech/20150522 Analyzing Linux Logs.md new file mode 100644 index 0000000000..c037fc60aa --- /dev/null +++ b/translated/tech/20150522 Analyzing Linux Logs.md @@ -0,0 +1,181 @@ +Linux 日志分析 +============================================================================== +日志中有大量的信息需要你处理,尽管有时候想要提取并非想象中的容易。在这篇文章中我们会介绍一些你现在就能做的基本日志分析例子。我们还将设计一些更高级的分析,但这些需要你前期努力做出切当的设置,后期就能节省很多时间。对数据进行高级分析的例子包括生成汇总计数、对有效值进行过滤,等等。 + +我们首先会想你展示如何在命令行中使用多个不同的工具,然后展示了一个日志管理工具如何能自动完成大部分繁重工作从而使得日志分析变得简单。 + +### 用 Grep 搜索 ### + +搜索文本是查找信息最基本的方式。搜索文本最常用的工具是 [grep][1]。这个命令行工具在大部分 Linux 发行版中都有,它允许你用正则表达式搜索日志。一个正则表达式是用特殊的语言写的、能识别匹配文本的模式。最简单的模式就是用引号把你想要查找的字符串括起来。 + +#### 正则表达式 #### + +这是一个在 Ubuntu 系统中查找 “user hoover” 认证日志的例子: + + $ grep "user hoover" /var/log/auth.log + Accepted password for hoover from 10.0.2.2 port 4792 ssh2 + pam_unix(sshd:session): session opened for user hoover by (uid=0) + pam_unix(sshd:session): session closed for user hoover + +构建精确的正则表达式可能很难。例如,如果我们想要搜索一个类似端口 “4792” 的数字,它可能也会匹配时间戳、URLs 以及其它不需要的数据。Ubuntu 中下面的例子,它匹配了一个我们不想要的 Apache 日志。 + + $ grep "4792" /var/log/auth.log + Accepted password for hoover from 10.0.2.2 port 4792 ssh2 + 74.91.21.46 - - [31/Mar/2015:19:44:32 +0000] "GET /scripts/samples/search?q=4972HTTP/1.0" 404 545 "-" "-” + +#### 环绕搜索 #### + +另一个有用的小技巧是你可以用 grep 做环绕搜索。这会向你展示一个匹配前面或后面几行是什么。它能帮助你调试导致错误或问题的东西。B 选项展示前面几行,A 展示后面几行。举个例子,我们知道当一个人以管理员员身份登录失败时,他们也没有逆映射,也就意味着他们可能没有有效的域名。这非常可疑! + + $ grep -B 3 -A 2 'Invalid user' /var/log/auth.log + Apr 28 17:06:20 ip-172-31-11-241 sshd[12545]: reverse mapping checking getaddrinfo for 216-19-2-8.commspeed.net [216.19.2.8] failed - POSSIBLE BREAK-IN ATTEMPT! + Apr 28 17:06:20 ip-172-31-11-241 sshd[12545]: Received disconnect from 216.19.2.8: 11: Bye Bye [preauth] + Apr 28 17:06:20 ip-172-31-11-241 sshd[12547]: Invalid user admin from 216.19.2.8 + Apr 28 17:06:20 ip-172-31-11-241 sshd[12547]: input_userauth_request: invalid user admin [preauth] + Apr 28 17:06:20 ip-172-31-11-241 sshd[12547]: Received disconnect from 216.19.2.8: 11: Bye Bye [preauth] + +#### Tail #### + +你也可以把 grep 和 [tail][2] 结合使用来获取一个文件的最后几行,或者跟踪日志并实时打印。这在你做交互式更改的时候非常有用,例如启动服务器或者测试代码更改。 + + $ tail -f /var/log/auth.log | grep 'Invalid user' + Apr 30 19:49:48 ip-172-31-11-241 sshd[6512]: Invalid user ubnt from 219.140.64.136 + Apr 30 19:49:49 ip-172-31-11-241 sshd[6514]: Invalid user admin from 219.140.64.136 + +关于 grep 和正则表达式的详细介绍并不在该指南的范围,但 [Ryan’s Tutorials][3] 有更深入的介绍。 + +日志管理系统有更高的性能和更强大的搜索能力。它们通常会索引数据并进行并行查询,因此你可以很快的在几秒内就能搜索 GB 或 TB 的日志。相比之下,grep 就需要几分钟,在极端情况下可能甚至几小时。日志管理系统也使用类似 [Lucene][4] 的查询语言,它提供更简单的语法来检索数字、域以及其它。 + +### 用 Cut、 AWK、 和 Grok 解析 ### + +#### 命令行工具 #### + +Linux 提供了多个命令行工具用于文本解析和分析。当你想要快速解析少量数据时非常有用,但处理大量数据时可能需要很长时间。 + +#### Cut #### + +[cut][5] 命令允许你从分隔的日志解析域。分隔符是指能分开域或键值对的等号或逗号。 + +假设我们想从下面的日志中解析出用户: + + pam_unix(su:auth): authentication failure; logname=hoover uid=1000 euid=0 tty=/dev/pts/0 ruser=hoover rhost= user=root + +我们可以像下面这样用 cut 命令获取第八个等号后面的文本。这是一个 Ubuntu 系统上的例子: + + $ grep "authentication failure" /var/log/auth.log | cut -d '=' -f 8 + root + hoover + root + nagios + nagios + +#### AWK #### + +另外,你也可以使用 [awk][6],它能提供解析域更强大的功能。它提供了一个脚本语言,你可以过滤出几乎任何不相干的东西。 + +例如,假设在 Ubuntu 系统中我们有下面的一行日志,我们想要提取登录失败的用户名称: + + Mar 24 08:28:18 ip-172-31-11-241 sshd[32701]: input_userauth_request: invalid user guest [preauth] + +你可以像下面这样使用 awk 命令。首先,用一个正则表达式 /sshd.*invalid user/ 来匹配 sshd 无效用户行。然后用 { print $9 } 根据默认的分隔符空格打印第九个域。然后就输出了用户名。 + + $ awk '/sshd.*invalid user/ { print $9 }' /var/log/auth.log + guest + admin + info + test + ubnt + +你可以在 [Awk 用户指南][7] 中阅读更多关于如何使用正则表达式和输出域的信息。 + +#### 日志管理系统 #### + +日志管理系统使得解析变得更加简单,使用户能快速的分析很多的日志文件。他们能自动解析标准的日志格式,比如常见的 Linux 日志和 Web 服务器日志。这能节省很多时间,因为当处理系统问题的时候你不需要考虑写自己的解析逻辑。 + +下面是一个 sshd 日志消息的例子,解析出了每个 remoteHost 和 user。这是 Loggly 中的一张截图,它是一个基于云的日志管理服务。 + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.25.09-AM.png) + +你也可以对非标准格式自定义解析。一个常用的工具是 [Grok][8],它用一个常见正则表达式库解析原始文本为结构化 JSON。下面是一个 Grok 在 Logstash 中解析内核日志文件的事例配置: + + filter{ + grok { + match => {"message" => "%{CISCOTIMESTAMP:timestamp} %{HOST:host} %{WORD:program}%{NOTSPACE} %{NOTSPACE}%{NUMBER:duration}%{NOTSPACE} %{GREEDYDATA:kernel_logs}" + } + } + +下图是 Grok 解析后输出的结果: + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.30.37-AM.png) + +### 用 Rsyslog 和 AWK 过滤 ### + +过滤使得你能检索一个特定的域值而不是进行全文检索。这使你的日志分析更加准确,因为它会忽略来自其它部分日志信息不需要的匹配。为了对一个域值进行搜索,你首先需要解析日志或者至少有对事件结构进行检索的方式。 + +#### 如果对 App 进行过滤 #### + +通常,你可能只想看一个应用的日志。如果你的应用把记录都保存到一个文件中就会很容易。如果你需要在一个聚集或集中式日志中过滤一个应用就会比较复杂。下面有几种方法来实现: + +1. 用 rsyslog 守护进程解析和过滤日志。下面的例子将 sshd 应用的日志写入一个名为 sshd-message 的文件,然后丢弃事件也就不会在其它地方重复。你可以将它添加到你的 rsyslog.conf 文件中测试这个例子。 + + :programname, isequal, “sshd” /var/log/sshd-messages + &~ + +2. 用类似 awk 的命令行工具提取特定域的值,例如 sshd 用户名。下面是 Ubuntu 系统中的一个例子。 + + $ awk '/sshd.*invalid user/ { print $9 }' /var/log/auth.log + guest + admin + info + test + ubnt + +3. 用日志管理系统自动解析日志,然后在需要的应用名称上点击过滤。下面是在 Loggly 日志管理服务中提取 syslog 域的截图。我们对应用名称 “sshd” 进行过滤,如维恩图图标所示。 + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.05.02-AM.png) + +#### 如何过滤错误 #### + +一个人最希望看到日志中的错误。不幸的是,默认的 syslog 配置不直接输出错误的严重性,也就使得难以过滤它们。 + +这里有两个解决该问题的方法。首先,你可以修改你的 rsyslog 配置,在日志文件中输出错误的严重性,使得便于查看和检索。在你的 rsyslog 配置中你可以用 pri-text 添加一个 [模板][9],像下面这样: + + "<%pri-text%> : %timegenerated%,%HOSTNAME%,%syslogtag%,%msg%n" + +这个例子会按照下面的格式输出。你可以看到该信息中指示错误的 err。 + + : Mar 11 18:18:00,hoover-VirtualBox,su[5026]:, pam_authenticate: Authentication failure + +你可以用 awk 或者 grep 检索错误信息。在 Ubuntu 中,对这个例子,我们可以用一些环绕语法,例如 . 和 >,它们只会匹配这个域。 + + $ grep '.err>' /var/log/auth.log + : Mar 11 18:18:00,hoover-VirtualBox,su[5026]:, pam_authenticate: Authentication failure + +你的第二个选择是使用日志管理系统。好的日志管理系统能自动解析 syslog 消息并抽取错误域。它们也允许你用简单的点击过滤日志消息中的特定错误。 + +下面是 Loggly 中一个截图,显示了高亮错误严重性的 syslog 域,表示我们正在过滤错误: + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.00.36-AM.png) + +-------------------------------------------------------------------------------- + +via: http://www.loggly.com/ultimate-guide/logging/analyzing-linux-logs/ + +作者:[Jason Skowronski][a] [Amy Echeverri][b] [ Sadequl Hussain][c] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.linkedin.com/in/jasonskowronski +[b]:https://www.linkedin.com/in/amyecheverri +[c]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 +[1]:http://linux.die.net/man/1/grep +[2]:http://linux.die.net/man/1/tail +[3]:http://ryanstutorials.net/linuxtutorial/grep.php +[4]:https://lucene.apache.org/core/2_9_4/queryparsersyntax.html +[5]:http://linux.die.net/man/1/cut +[6]:http://linux.die.net/man/1/awk +[7]:http://www.delorie.com/gnu/docs/gawk/gawk_26.html#IDX155 +[8]:http://logstash.net/docs/1.4.2/filters/grok +[9]:http://www.rsyslog.com/doc/v8-stable/configuration/templates.html From dba1249da1d325f56aa736e5216d6ac2b0f12eb1 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 1 Aug 2015 10:06:00 +0800 Subject: [PATCH 1551/2517] translating --- ... to Update Linux Kernel for Improved System Performance.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md b/sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md index 4e238de09d..2ee2ff4f15 100644 --- a/sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md +++ b/sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md @@ -1,3 +1,5 @@ +Translating---geekpi + How to Update Linux Kernel for Improved System Performance ================================================================================ ![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/update-linux-kernel-644x373.jpg?2c3c1f) @@ -124,4 +126,4 @@ via: http://www.makeuseof.com/tag/update-linux-kernel-improved-system-performanc [7]:http://www.makeuseof.com/tag/bleeding-edge-linux-fedora-rawhide/ [8]:http://www.makeuseof.com/tag/arch-linux-letting-you-build-your-linux-system-from-scratch/ [9]:http://www.makeuseof.com/tag/nano-vs-vim-terminal-text-editors-compared/ -[10]:https://wiki.archlinux.org/index.php/Pacman#Repositories \ No newline at end of file +[10]:https://wiki.archlinux.org/index.php/Pacman#Repositories From 5b0ae3268ba031a4eb9295f5b27c712c278484a9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 1 Aug 2015 11:49:49 +0800 Subject: [PATCH 1552/2517] translated --- ... Kernel for Improved System Performance.md | 129 ------------------ ... Kernel for Improved System Performance.md | 129 ++++++++++++++++++ 2 files changed, 129 insertions(+), 129 deletions(-) delete mode 100644 sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md create mode 100644 translated/tech/20150728 How to Update Linux Kernel for Improved System Performance.md diff --git a/sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md b/sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md deleted file mode 100644 index 2ee2ff4f15..0000000000 --- a/sources/tech/20150728 How to Update Linux Kernel for Improved System Performance.md +++ /dev/null @@ -1,129 +0,0 @@ -Translating---geekpi - -How to Update Linux Kernel for Improved System Performance -================================================================================ -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/update-linux-kernel-644x373.jpg?2c3c1f) - -The rate of development for [the Linux kernel][1] is unprecedented, with a new major release approximately every two to three months. Each release offers several new features and improvements that a lot of people could take advantage of to make their computing experience faster, more efficient, or better in other ways. - -The problem, however, is that you usually can’t take advantage of these new kernel releases as soon as they come out — you have to wait until your distribution comes out with a new release that packs a newer kernel with it. We’ve previously laid out [the benefits for regularly updating your kernel][2], and you don’t have to wait to get your hands on them. We’ll show you how. - -> Disclaimer: As some of our literature may have mentioned before, updating your kernel does carry a (small) risk of breaking your system. If this is the case, it’s usually easy to pick an older kernel at boot time that works, but something may always go wrong. Therefore, we’re not responsible for any damage to your system — use at your own risk! - -### Prep Work ### - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/linux_kernel_arch.jpg?2c3c1f) - -To update your kernel, you’ll first need to determine whether you’re using a 32-bit or 64-bit system. Open up a terminal window and run - - uname -a - -Then check to see if the output says x86_64 or i686. If it’s x86_64, then you’re running the 64-bit version; otherwise, you’re running the 32-bit version. Remember this, because it will be important. - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/kernel_latest_version.jpg?2c3c1f) - -Next, visit the [official Linux kernel website][3]. This will tell you what the current stable version of the kernel is. You can try out release candidates if you’d like, but they are a lot less tested than the stable releases. Stick with the stable kernel unless you are certain you need a release candidate version. - -### Ubuntu Instructions ### - -It’s quite easy for Ubuntu and Ubuntu-derivative users to update their kernel, thanks to the Ubuntu Mainline Kernel PPA. Although it’s officially called a PPA, you cannot use it like other PPAs by adding them to your software sources list and expecting it to automatically update the kernel for you. Instead, it’s simply a webpage you navigate through to download the kernel you want. - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/ubuntu_new_kernels.jpg?2c3c1f) - -Now, visit the [kernel PPA webpage][4] and scroll all the way to the bottom. The absolute bottom of the list will probably contain some release candidate versions (which you can see by the “rc” in the name), but just above them should be the latest stable kernel (to make this easier to explain, at the time of writing the stable version was 4.1.2). Click on that, and you’ll be presented with several options. You’ll need to grab three files and save them in their own folder (within the Downloads folder if you’d like) so that they’re isolated from all other files: - -- The “generic” header file for your architecture (in my case, 64-bit or “amd64″) -- The header file in the middle that has “all” towards the end of the filename -- The “generic” kernel file for your architecture (again, I would pick “amd64″ but if you use 32-bit you’ll need “i686″) - -You’ll notice that there are also “lowlatency” files available to download, but it’s fine to ignore this. These files are relatively unstable and are only made available for people who need their low-latency benefits if the general files don’t suffice for tasks such as audio recording. Again, the recommendation is to always use generic first and only try lowlatency if your performance isn’t good enough for certain tasks. No, gaming or Internet browsing aren’t excuses to try lowlatency. - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/ubuntu_install_kernel.jpg?2c3c1f) - -You put these files into their own folder, right? Now open up the Terminal, use the - - cd - -command to go to your newly-created folder, such as - - cd /home/user/Downloads/Kernel - -and then run: - - sudo dpkg -i *.deb - -This command marks all .deb files within the folder as “to be installed” and then performs the installation. This is the recommended way to install these files because otherwise it’s easy to pick one file to install and it’ll complain about dependency issues. This approach avoids that problem. If you’re not sure what cd or sudo are, get a quick crash course on [essential Linux commands][5]. - -Once the installation is complete, **Restart** your system and you should be running the just-installed kernel! You can check this by running uname -a in the Terminal and checking the output. - -### Fedora Instructions ### - -If you use Fedora or one of its derivatives, the process is very similar to Ubuntu. There’s just a different location to grab different files, and a different command to install them. - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/fedora_new_kernels.jpg?2c3c1f) - -VIew the list of the most [recent kernel builds for Fedora][6]. Pick the latest stable version out of the list, and then scroll down to either the i686 or x86_64 section, depending on your system’s architecture. In this section, you’ll need to grab the following files and save them in their own folder (such as “Kernel” within your Downloads folder, as an example): - -- kernel -- kernel-core -- kernel-headers -- kernel-modules -- kernel-modules-extra -- kernel-tools -- perf and python-perf (optional) - -If your system is i686 (32-bit) and you have 4GB of RAM or more, you’ll need to grab the PAE version of all of these files where available. PAE is an address extension technique used for 32-bit system to allow them to use more than 3GB of RAM. - -Now, use the - - cd - -command to go to that folder, such as - - cd /home/user/Downloads/Kernel - -and then run the following command to install all the files: - - yum --nogpgcheck localinstall *.rpm - -Finally **Restart** your computer and you should be running a new kernel! - -### Using Rawhide ### - -Alternatively, Fedora users can also simply [switch to Rawhide][7] and it’ll automatically update every package to the latest version, including the kernel. However, Rawhide is known to break quite often (especially early on in the development cycle) and should **not** be used on a system that you need to rely on. - -### Arch Instructions ### - -[Arch users][8] should always have the latest and greatest stable kernel available (or one pretty close to it). If you want to get even closer to the latest-released stable kernel, you can enable the testing repo which will give you access to major new releases roughly two to four weeks early. - -To do this, open the file located at - - /etc/pacman.conf - -with sudo permissions in [your favorite terminal text editor][9], and then uncomment (delete the pound symbols from the front of each line) the three lines associated with testing. If you have the multilib repository enabled, then do the same for the multilib-testing repository. See [this Arch Linux wiki page][10] if you need more information. - -Upgrading your kernel isn’t easy (done so intentionally), but it can give you a lot of benefits. So long as your new kernel didn’t break anything, you can now enjoy improved performance, better efficiency, support for more hardware, and potential new features. Especially if you’re running relatively new hardware, upgrading the kernel can really help out. - -**How has upgraded the kernel helped you? Do you think your favorite distribution’s policy on kernel releases is what it should be?** Let us know in the comments! - --------------------------------------------------------------------------------- - -via: http://www.makeuseof.com/tag/update-linux-kernel-improved-system-performance/ - -作者:[Danny Stieben][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.makeuseof.com/tag/author/danny/ -[1]:http://www.makeuseof.com/tag/linux-kernel-explanation-laymans-terms/ -[2]:http://www.makeuseof.com/tag/5-reasons-update-kernel-linux/ -[3]:http://www.kernel.org/ -[4]:http://kernel.ubuntu.com/~kernel-ppa/mainline/ -[5]:http://www.makeuseof.com/tag/an-a-z-of-linux-40-essential-commands-you-should-know/ -[6]:http://koji.fedoraproject.org/koji/packageinfo?packageID=8 -[7]:http://www.makeuseof.com/tag/bleeding-edge-linux-fedora-rawhide/ -[8]:http://www.makeuseof.com/tag/arch-linux-letting-you-build-your-linux-system-from-scratch/ -[9]:http://www.makeuseof.com/tag/nano-vs-vim-terminal-text-editors-compared/ -[10]:https://wiki.archlinux.org/index.php/Pacman#Repositories diff --git a/translated/tech/20150728 How to Update Linux Kernel for Improved System Performance.md b/translated/tech/20150728 How to Update Linux Kernel for Improved System Performance.md new file mode 100644 index 0000000000..2114549452 --- /dev/null +++ b/translated/tech/20150728 How to Update Linux Kernel for Improved System Performance.md @@ -0,0 +1,129 @@ +如何更新Linux内核提升系统性能 +================================================================================ +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/update-linux-kernel-644x373.jpg?2c3c1f) + +[Linux内核][1]内核的开发速度目前是空前,大概每2到3个月就会有一个主要的版本发布。每个发布都带来让很多人的计算更加快、更加有效率、或者更好的功能和提升。 + +问题是你不能在这些内核发布的时候就用它们-你要等到你的发行版带来新内核的发布。我们先前发布了[定期更新内核的好处][2],你不必等到那时。我们会向你展示该怎么做。 + +> 免责声明: 我们先前的一些文章已经提到过,升级内核会带来(很小的)破坏你系统的风险。在这种情况下,通常可以通过旧内核来使系统工作,但是有时还是不行。因此我们对系统的任何损坏都不负责-你自己承担风险! + +### 预备工作 ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/linux_kernel_arch.jpg?2c3c1f) + +要更新你的内核,你首先要确定你使用的是32位还是64位的系统。打开终端并运行: + + uname -a + +检查一下输出的是x86_64还是i686。如果是x86_64,你就运行64位的版本,否则就运行32位的版本。记住这个因为这个很重要。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/kernel_latest_version.jpg?2c3c1f) + +接下来,访问[官方Linux内核网站][3],它会告诉你目前稳定内核的版本。如果你喜欢你可以尝试发布预选版,但是这比稳定版少了很多测试。除非你确定想要用发布预选版否则就用稳定内核。 + +### Ubuntu指导 ### + +对Ubuntu及其衍生版的用户而言升级内核非常简单,这要感谢Ubuntu主线内核PPA。虽然,官方称为一个PPA。但是你不能像其他PPA一样用来添加它到你软件源列表中,并指望它自动升级你的内核。而它只是一个简单的网页,你可以下载到你想要的内核。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/ubuntu_new_kernels.jpg?2c3c1f) + +现在,访问[内核PPA网页][4],并滚到底部。列表的最下面会含有最新发布的预选版本(你可以在名字中看到“rc”字样),但是这上面就可以看到最新的稳定版(为了更容易地解释这个,这时最新的稳定版是4.1.2)。点击它,你会看到几个选项。你需要下载3个文件并保存到各自的文件夹中(如果你喜欢的话可以在下载文件夹中),这样就可以将它们相互隔离了: + +- 针对架构的含“generic”的头文件(我这里是64位或者“amd64”) +- 中间的头文件在文件名末尾有“all” +- 针对架构的含“generic”内核文件(再说一次,我会用“amd64”,但是你如果用32位的,你需要使用“i686”) + +你会看到还有含有“lowlatency”的文件可以下面。但最好忽略它们。这些文件相对不稳定,并且只为那些通用文件不能满足像录音这类任务想要低延迟的人准备的。再说一次,首选通用版除非你特定的任务需求不能很好地满足。一般的游戏和网络浏览不是使用低延时版的借口。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/ubuntu_install_kernel.jpg?2c3c1f) + +你把它们放在各自的文件夹下,对么?现在打开终端,使用 + + cd + +命令到新创建的文件夹下,像 + + cd /home/user/Downloads/Kernel + +接着运行: + + sudo dpkg -i *.deb + +这个命令会标记所有文件夹的“.deb”文件为“待安装”,接着执行安装。这是推荐的安装放大,因为除非可以很简单地选择一个文件安装,它总会报出依赖问题。这个方法可以避免这个问题。如果你不清楚cd和sudo是什么。快速地看一下[Linux基本命令][5]这篇文章。 + +安装完成后,**重启**你的系统,这时应该就会运行刚安装的内核了!你可以在命令行中使用uname -a来检查输出。 + +### Fedora指导 ### + +如果你使用的是Fedora或者它的衍生版,过程跟Ubuntu很类似。不同的是文件获取的位置不同,安装的命令也不同。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/fedora_new_kernels.jpg?2c3c1f) + +查看[Fedora最新内核编译][6]列表。选取列表中最新的稳定版并滚到下面选择i686或者x86_64版。这依赖于你的系统架构。这时你需要下载下面这些文件并保存到它们对应的目录下(比如“Kernel”到下载目录下): + +- kernel +- kernel-core +- kernel-headers +- kernel-modules +- kernel-modules-extra +- kernel-tools +- perf and python-perf (optional) + +如果你的系统是i686(32位)同时你有4GB或者更大的内存,你需要下载所有这些文件的PAE版本。PAE是用于32位的地址扩展技术上,它允许你使用3GB的内存。 + +现在使用 + + cd + +命令进入文件夹,像这样 + + cd /home/user/Downloads/Kernel + +and then run the following command to install all the files: +接着运行下面的命令来安装所有的文件 + + yum --nogpgcheck localinstall *.rpm + +最后**重启**你的系统,这样你就可以运行新的内核了! + +### 使用 Rawhide ### + +另外一个方案是,Fedora用户也可以[切换到Rawhide][7],它会自动更新所有的包到最新版本,包括内核。然而,Rawhide经常会破坏系统(尤其是在早期的开发版中),它**不应该**在你日常使用的系统中用。 + +### Arch指导 ### + +[Arch][8]应该总是使用的是最新和最棒的稳定版(或者相当接近的版本)。如果你想要更接近最新发布的稳定版,你可以启用测试库提前2到3周获取到主要的更新。 + +要这么做,用[你喜欢的编辑器][9]以sudo权限打开下面的文件 + + /etc/pacman.conf + +接着取消注释带有testing的三行(删除行前面的井号)。如果你想要启用multilib仓库,就把multilib-testing也做相同的事情。如果想要了解更多参考[这个Arch的wiki界面][10]。 + +升级内核并不简单(有意这么做),但是这会给你带来很多好处。只要你的新内核不会破坏任何东西,你可以享受它带来的性能提升,更好的效率,支持更多的硬件和潜在的新特性。尤其是你正在使用相对更新的硬件,升级内核可以帮助到它。 + + +**怎么升级内核这篇文章帮助到你了么?你认为你所喜欢的发行版对内核的发布策略应该是怎样的?**。在评论栏让我们知道! + +-------------------------------------------------------------------------------- + +via: http://www.makeuseof.com/tag/update-linux-kernel-improved-system-performance/ + +作者:[Danny Stieben][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.makeuseof.com/tag/author/danny/ +[1]:http://www.makeuseof.com/tag/linux-kernel-explanation-laymans-terms/ +[2]:http://www.makeuseof.com/tag/5-reasons-update-kernel-linux/ +[3]:http://www.kernel.org/ +[4]:http://kernel.ubuntu.com/~kernel-ppa/mainline/ +[5]:http://www.makeuseof.com/tag/an-a-z-of-linux-40-essential-commands-you-should-know/ +[6]:http://koji.fedoraproject.org/koji/packageinfo?packageID=8 +[7]:http://www.makeuseof.com/tag/bleeding-edge-linux-fedora-rawhide/ +[8]:http://www.makeuseof.com/tag/arch-linux-letting-you-build-your-linux-system-from-scratch/ +[9]:http://www.makeuseof.com/tag/nano-vs-vim-terminal-text-editors-compared/ +[10]:https://wiki.archlinux.org/index.php/Pacman#Repositories From fc1fe1c59b1dc55bb6d7999166a40203a803d870 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Aug 2015 22:55:13 +0800 Subject: [PATCH 1553/2517] PUB:20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04 @GOLinux --- ...e OpenVPN Server-Client on Ubuntu 15.04.md | 96 +++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) rename {translated/tech => published}/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md (69%) diff --git a/translated/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md b/published/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md similarity index 69% rename from translated/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md rename to published/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md index 5b6c2fc6bd..7ec20f794e 100644 --- a/translated/tech/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md +++ b/published/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md @@ -1,18 +1,18 @@ -Ubuntu 15.04上配置OpenVPN服务器-客户端 +在 Ubuntu 15.04 上配置 OpenVPN 服务器和客户端 ================================================================================ -虚拟专用网(VPN)是几种用于建立与其它网络连接的网络技术中常见的一个名称。它被称为虚拟网,因为各个节点的连接不是通过物理线路实现的。而由于没有网络所有者的正确授权是不能通过公共线路访问到网络,所以它是专用的。 +虚拟专用网(VPN)常指几种通过其它网络建立连接技术。它之所以被称为“虚拟”,是因为各个节点间的连接不是通过物理线路实现的,而“专用”是指如果没有网络所有者的正确授权是不能被公开访问到。 ![](http://blog.linoxide.com/wp-content/uploads/2015/05/vpn_custom_illustration.jpg) -[OpenVPN][1]软件通过TUN/TAP驱动的帮助,使用TCP和UDP协议来传输数据。UDP协议和TUN驱动允许NAT后的用户建立到OpenVPN服务器的连接。此外,OpenVPN允许指定自定义端口。它提额外提供了灵活的配置,可以帮助你避免防火墙限制。 +[OpenVPN][1]软件借助TUN/TAP驱动使用TCP和UDP协议来传输数据。UDP协议和TUN驱动允许NAT后的用户建立到OpenVPN服务器的连接。此外,OpenVPN允许指定自定义端口。它提供了更多的灵活配置,可以帮助你避免防火墙限制。 OpenVPN中,由OpenSSL库和传输层安全协议(TLS)提供了安全和加密。TLS是SSL协议的一个改进版本。 -OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示了如何配置OpenVPN的服务器端,以及如何预备使用带有公共密钥非对称加密和TLS协议基础结构(PKI)。 +OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示了如何配置OpenVPN的服务器端,以及如何配置使用带有公共密钥基础结构(PKI)的非对称加密和TLS协议。 ### 服务器端配置 ### -首先,我们必须安装OpenVPN。在Ubuntu 15.04和其它带有‘apt’报管理器的Unix系统中,可以通过如下命令安装: +首先,我们必须安装OpenVPN软件。在Ubuntu 15.04和其它带有‘apt’包管理器的Unix系统中,可以通过如下命令安装: sudo apt-get install openvpn @@ -20,7 +20,7 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 sudo apt-get unstall easy-rsa -**注意**: 所有接下来的命令要以超级用户权限执行,如在“sudo -i”命令后;此外,你可以使用“sudo -E”作为接下来所有命令的前缀。 +**注意**: 所有接下来的命令要以超级用户权限执行,如在使用`sudo -i`命令后执行,或者你可以使用`sudo -E`作为接下来所有命令的前缀。 开始之前,我们需要拷贝“easy-rsa”到openvpn文件夹。 @@ -32,15 +32,15 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 cd /etc/openvpn/easy-rsa/2.0 -这里,我们开启了一个密钥生成进程。 +这里,我们开始密钥生成进程。 -首先,我们编辑一个“var”文件。为了简化生成过程,我们需要在里面指定数据。这里是“var”文件的一个样例: +首先,我们编辑一个“vars”文件。为了简化生成过程,我们需要在里面指定数据。这里是“vars”文件的一个样例: - export KEY_COUNTRY="US" - export KEY_PROVINCE="CA" - export KEY_CITY="SanFrancisco" - export KEY_ORG="Fort-Funston" - export KEY_EMAIL="my@myhost.mydomain" + export KEY_COUNTRY="CN" + export KEY_PROVINCE="BJ" + export KEY_CITY="Beijing" + export KEY_ORG="Linux.CN" + export KEY_EMAIL="open@vpn.linux.cn" export KEY_OU=server 希望这些字段名称对你而言已经很清楚,不需要进一步说明了。 @@ -61,7 +61,7 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 ./build-ca -在对话中,我们可以看到默认的变量,这些变量是我们先前在“vars”中指定的。我们可以检查以下,如有必要进行编辑,然后按回车几次。对话如下 +在对话中,我们可以看到默认的变量,这些变量是我们先前在“vars”中指定的。我们可以检查一下,如有必要进行编辑,然后按回车几次。对话如下 Generating a 2048 bit RSA private key .............................................+++ @@ -75,14 +75,14 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 For some fields there will be a default value, If you enter '.', the field will be left blank. ----- - Country Name (2 letter code) [US]: - State or Province Name (full name) [CA]: - Locality Name (eg, city) [SanFrancisco]: - Organization Name (eg, company) [Fort-Funston]: - Organizational Unit Name (eg, section) [MyOrganizationalUnit]: - Common Name (eg, your name or your server's hostname) [Fort-Funston CA]: + Country Name (2 letter code) [CN]: + State or Province Name (full name) [BJ]: + Locality Name (eg, city) [Beijing]: + Organization Name (eg, company) [Linux.CN]: + Organizational Unit Name (eg, section) [Tech]: + Common Name (eg, your name or your server's hostname) [Linux.CN CA]: Name [EasyRSA]: - Email Address [me@myhost.mydomain]: + Email Address [open@vpn.linux.cn]: 接下来,我们需要生成一个服务器密钥 @@ -102,14 +102,14 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 For some fields there will be a default value, If you enter '.', the field will be left blank. ----- - Country Name (2 letter code) [US]: - State or Province Name (full name) [CA]: - Locality Name (eg, city) [SanFrancisco]: - Organization Name (eg, company) [Fort-Funston]: - Organizational Unit Name (eg, section) [MyOrganizationalUnit]: - Common Name (eg, your name or your server's hostname) [server]: + Country Name (2 letter code) [CN]: + State or Province Name (full name) [BJ]: + Locality Name (eg, city) [Beijing]: + Organization Name (eg, company) [Linux.CN]: + Organizational Unit Name (eg, section) [Tech]: + Common Name (eg, your name or your server's hostname) [Linux.CN server]: Name [EasyRSA]: - Email Address [me@myhost.mydomain]: + Email Address [open@vpn.linux.cn]: Please enter the following 'extra' attributes to be sent with your certificate request @@ -119,14 +119,14 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 Check that the request matches the signature Signature ok The Subject's Distinguished Name is as follows - countryName :PRINTABLE:'US' - stateOrProvinceName :PRINTABLE:'CA' - localityName :PRINTABLE:'SanFrancisco' - organizationName :PRINTABLE:'Fort-Funston' - organizationalUnitName:PRINTABLE:'MyOrganizationalUnit' - commonName :PRINTABLE:'server' + countryName :PRINTABLE:'CN' + stateOrProvinceName :PRINTABLE:'BJ' + localityName :PRINTABLE:'Beijing' + organizationName :PRINTABLE:'Linux.CN' + organizationalUnitName:PRINTABLE:'Tech' + commonName :PRINTABLE:'Linux.CN server' name :PRINTABLE:'EasyRSA' - emailAddress :IA5STRING:'me@myhost.mydomain' + emailAddress :IA5STRING:'open@vpn.linux.cn' Certificate is to be certified until May 22 19:00:25 2025 GMT (3650 days) Sign the certificate? [y/n]:y 1 out of 1 certificate requests certified, commit? [y/n]y @@ -143,7 +143,7 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 Generating DH parameters, 2048 bit long safe prime, generator 2 This is going to take a long time - ................................+................ + ................................+................<许多的点> 在漫长的等待之后,我们可以继续生成最后的密钥了,该密钥用于TLS验证。命令如下: @@ -176,7 +176,7 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 ### Unix的客户端配置 ### -假定我们有一台装有类Unix操作系统的设备,比如Ubuntu 15.04,并安装有OpenVPN。我们想要从先前的部分连接到OpenVPN服务器。首先,我们需要为客户端生成密钥。为了生成该密钥,请转到服务器上的目录中: +假定我们有一台装有类Unix操作系统的设备,比如Ubuntu 15.04,并安装有OpenVPN。我们想要连接到前面建立的OpenVPN服务器。首先,我们需要为客户端生成密钥。为了生成该密钥,请转到服务器上的对应目录中: cd /etc/openvpn/easy-rsa/2.0 @@ -211,7 +211,7 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 dev tun proto udp - # IP and Port of remote host with OpenVPN server + # 远程 OpenVPN 服务器的 IP 和 端口号 remote 111.222.333.444 1194 resolv-retry infinite @@ -243,7 +243,7 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 安卓设备上的OpenVPN配置和Unix系统上的十分类似,我们需要一个含有配置文件、密钥和证书的包。文件列表如下: -- configuration file (.ovpn), +- 配置文件 (扩展名 .ovpn), - ca.crt, - dh2048.pem, - client.crt, @@ -257,7 +257,7 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 dev tun proto udp - # IP and Port of remote host with OpenVPN server + # 远程 OpenVPN 服务器的 IP 和 端口号 remote 111.222.333.444 1194 resolv-retry infinite @@ -274,21 +274,21 @@ OpenSSL提供了两种加密方法:对称和非对称。下面,我们展示 所有这些文件我们必须移动我们设备的SD卡上。 -然后,我们需要安装[OpenVPN连接][2]。 +然后,我们需要安装一个[OpenVPN Connect][2] 应用。 接下来,配置过程很是简单: - open setting of OpenVPN and select Import options - select Import Profile from SD card option - in opened window go to folder with prepared files and select .ovpn file - application offered us to create a new profile - tap on the Connect button and wait a second +- 打开 OpenVPN 并选择“Import”选项 +- 选择“Import Profile from SD card” +- 在打开的窗口中导航到我们放置好文件的目录,并选择那个 .ovpn 文件 +- 应用会要求我们创建一个新的配置文件 +- 点击“Connect”按钮并稍等一下 搞定。现在,我们的安卓设备已经通过安全的VPN连接连接到我们的专用网。 ### 尾声 ### -虽然OpenVPN初始配置花费不少时间,但是简易客户端配置为我们弥补了时间上的损失,也提供了从任何设备连接的能力。此外,OpenVPN提供了一个很高的安全等级,以及从不同地方连接的能力,包括位于NAT后面的客户端。因此,OpenVPN可以同时在家和在企业中使用。 +虽然OpenVPN初始配置花费不少时间,但是简易的客户端配置为我们弥补了时间上的损失,也提供了从任何设备连接的能力。此外,OpenVPN提供了一个很高的安全等级,以及从不同地方连接的能力,包括位于NAT后面的客户端。因此,OpenVPN可以同时在家和企业中使用。 -------------------------------------------------------------------------------- @@ -296,7 +296,7 @@ via: http://linoxide.com/ubuntu-how-to/configure-openvpn-server-client-ubuntu-15 作者:[Ivan Zabrovskiy][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 820aed5474fc757f233339713410d0767678ec0c Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Aug 2015 23:33:38 +0800 Subject: [PATCH 1554/2517] PUB:20150522 Analyzing Linux Logs @ictlyh --- .../20150522 Analyzing Linux Logs.md | 66 ++++++++++--------- 1 file changed, 34 insertions(+), 32 deletions(-) rename {translated/tech => published}/20150522 Analyzing Linux Logs.md (71%) diff --git a/translated/tech/20150522 Analyzing Linux Logs.md b/published/20150522 Analyzing Linux Logs.md similarity index 71% rename from translated/tech/20150522 Analyzing Linux Logs.md rename to published/20150522 Analyzing Linux Logs.md index c037fc60aa..5c7e53c629 100644 --- a/translated/tech/20150522 Analyzing Linux Logs.md +++ b/published/20150522 Analyzing Linux Logs.md @@ -1,31 +1,33 @@ -Linux 日志分析 +如何分析 Linux 日志 ============================================================================== -日志中有大量的信息需要你处理,尽管有时候想要提取并非想象中的容易。在这篇文章中我们会介绍一些你现在就能做的基本日志分析例子。我们还将设计一些更高级的分析,但这些需要你前期努力做出切当的设置,后期就能节省很多时间。对数据进行高级分析的例子包括生成汇总计数、对有效值进行过滤,等等。 +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Linux-Copy@2x1.png) -我们首先会想你展示如何在命令行中使用多个不同的工具,然后展示了一个日志管理工具如何能自动完成大部分繁重工作从而使得日志分析变得简单。 +日志中有大量的信息需要你处理,尽管有时候想要提取并非想象中的容易。在这篇文章中我们会介绍一些你现在就能做的基本日志分析例子(只需要搜索即可)。我们还将涉及一些更高级的分析,但这些需要你前期努力做出适当的设置,后期就能节省很多时间。对数据进行高级分析的例子包括生成汇总计数、对有效值进行过滤,等等。 + +我们首先会向你展示如何在命令行中使用多个不同的工具,然后展示了一个日志管理工具如何能自动完成大部分繁重工作从而使得日志分析变得简单。 ### 用 Grep 搜索 ### -搜索文本是查找信息最基本的方式。搜索文本最常用的工具是 [grep][1]。这个命令行工具在大部分 Linux 发行版中都有,它允许你用正则表达式搜索日志。一个正则表达式是用特殊的语言写的、能识别匹配文本的模式。最简单的模式就是用引号把你想要查找的字符串括起来。 +搜索文本是查找信息最基本的方式。搜索文本最常用的工具是 [grep][1]。这个命令行工具在大部分 Linux 发行版中都有,它允许你用正则表达式搜索日志。正则表达式是一种用特殊的语言写的、能识别匹配文本的模式。最简单的模式就是用引号把你想要查找的字符串括起来。 #### 正则表达式 #### -这是一个在 Ubuntu 系统中查找 “user hoover” 认证日志的例子: +这是一个在 Ubuntu 系统的认证日志中查找 “user hoover” 的例子: $ grep "user hoover" /var/log/auth.log Accepted password for hoover from 10.0.2.2 port 4792 ssh2 pam_unix(sshd:session): session opened for user hoover by (uid=0) pam_unix(sshd:session): session closed for user hoover -构建精确的正则表达式可能很难。例如,如果我们想要搜索一个类似端口 “4792” 的数字,它可能也会匹配时间戳、URLs 以及其它不需要的数据。Ubuntu 中下面的例子,它匹配了一个我们不想要的 Apache 日志。 +构建精确的正则表达式可能很难。例如,如果我们想要搜索一个类似端口 “4792” 的数字,它可能也会匹配时间戳、URL 以及其它不需要的数据。Ubuntu 中下面的例子,它匹配了一个我们不想要的 Apache 日志。 $ grep "4792" /var/log/auth.log Accepted password for hoover from 10.0.2.2 port 4792 ssh2 - 74.91.21.46 - - [31/Mar/2015:19:44:32 +0000] "GET /scripts/samples/search?q=4972HTTP/1.0" 404 545 "-" "-” + 74.91.21.46 - - [31/Mar/2015:19:44:32 +0000] "GET /scripts/samples/search?q=4972 HTTP/1.0" 404 545 "-" "-” #### 环绕搜索 #### -另一个有用的小技巧是你可以用 grep 做环绕搜索。这会向你展示一个匹配前面或后面几行是什么。它能帮助你调试导致错误或问题的东西。B 选项展示前面几行,A 展示后面几行。举个例子,我们知道当一个人以管理员员身份登录失败时,他们也没有逆映射,也就意味着他们可能没有有效的域名。这非常可疑! +另一个有用的小技巧是你可以用 grep 做环绕搜索。这会向你展示一个匹配前面或后面几行是什么。它能帮助你调试导致错误或问题的东西。`B` 选项展示前面几行,`A` 选项展示后面几行。举个例子,我们知道当一个人以管理员员身份登录失败时,同时他们的 IP 也没有反向解析,也就意味着他们可能没有有效的域名。这非常可疑! $ grep -B 3 -A 2 'Invalid user' /var/log/auth.log Apr 28 17:06:20 ip-172-31-11-241 sshd[12545]: reverse mapping checking getaddrinfo for 216-19-2-8.commspeed.net [216.19.2.8] failed - POSSIBLE BREAK-IN ATTEMPT! @@ -42,7 +44,7 @@ Linux 日志分析 Apr 30 19:49:48 ip-172-31-11-241 sshd[6512]: Invalid user ubnt from 219.140.64.136 Apr 30 19:49:49 ip-172-31-11-241 sshd[6514]: Invalid user admin from 219.140.64.136 -关于 grep 和正则表达式的详细介绍并不在该指南的范围,但 [Ryan’s Tutorials][3] 有更深入的介绍。 +关于 grep 和正则表达式的详细介绍并不在本指南的范围,但 [Ryan’s Tutorials][3] 有更深入的介绍。 日志管理系统有更高的性能和更强大的搜索能力。它们通常会索引数据并进行并行查询,因此你可以很快的在几秒内就能搜索 GB 或 TB 的日志。相比之下,grep 就需要几分钟,在极端情况下可能甚至几小时。日志管理系统也使用类似 [Lucene][4] 的查询语言,它提供更简单的语法来检索数字、域以及其它。 @@ -54,13 +56,13 @@ Linux 提供了多个命令行工具用于文本解析和分析。当你想要 #### Cut #### -[cut][5] 命令允许你从分隔的日志解析域。分隔符是指能分开域或键值对的等号或逗号。 +[cut][5] 命令允许你从有分隔符的日志解析字段。分隔符是指能分开字段或键值对的等号或逗号等。 假设我们想从下面的日志中解析出用户: pam_unix(su:auth): authentication failure; logname=hoover uid=1000 euid=0 tty=/dev/pts/0 ruser=hoover rhost= user=root -我们可以像下面这样用 cut 命令获取第八个等号后面的文本。这是一个 Ubuntu 系统上的例子: +我们可以像下面这样用 cut 命令获取用等号分割后的第八个字段的文本。这是一个 Ubuntu 系统上的例子: $ grep "authentication failure" /var/log/auth.log | cut -d '=' -f 8 root @@ -71,13 +73,13 @@ Linux 提供了多个命令行工具用于文本解析和分析。当你想要 #### AWK #### -另外,你也可以使用 [awk][6],它能提供解析域更强大的功能。它提供了一个脚本语言,你可以过滤出几乎任何不相干的东西。 +另外,你也可以使用 [awk][6],它能提供更强大的解析字段功能。它提供了一个脚本语言,你可以过滤出几乎任何不相干的东西。 例如,假设在 Ubuntu 系统中我们有下面的一行日志,我们想要提取登录失败的用户名称: Mar 24 08:28:18 ip-172-31-11-241 sshd[32701]: input_userauth_request: invalid user guest [preauth] -你可以像下面这样使用 awk 命令。首先,用一个正则表达式 /sshd.*invalid user/ 来匹配 sshd 无效用户行。然后用 { print $9 } 根据默认的分隔符空格打印第九个域。然后就输出了用户名。 +你可以像下面这样使用 awk 命令。首先,用一个正则表达式 /sshd.*invalid user/ 来匹配 sshd invalid user 行。然后用 { print $9 } 根据默认的分隔符空格打印第九个字段。这样就输出了用户名。 $ awk '/sshd.*invalid user/ { print $9 }' /var/log/auth.log guest @@ -86,17 +88,17 @@ Linux 提供了多个命令行工具用于文本解析和分析。当你想要 test ubnt -你可以在 [Awk 用户指南][7] 中阅读更多关于如何使用正则表达式和输出域的信息。 +你可以在 [Awk 用户指南][7] 中阅读更多关于如何使用正则表达式和输出字段的信息。 #### 日志管理系统 #### -日志管理系统使得解析变得更加简单,使用户能快速的分析很多的日志文件。他们能自动解析标准的日志格式,比如常见的 Linux 日志和 Web 服务器日志。这能节省很多时间,因为当处理系统问题的时候你不需要考虑写自己的解析逻辑。 +日志管理系统使得解析变得更加简单,使用户能快速的分析很多的日志文件。他们能自动解析标准的日志格式,比如常见的 Linux 日志和 Web 服务器日志。这能节省很多时间,因为当处理系统问题的时候你不需要考虑自己写解析逻辑。 下面是一个 sshd 日志消息的例子,解析出了每个 remoteHost 和 user。这是 Loggly 中的一张截图,它是一个基于云的日志管理服务。 ![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.25.09-AM.png) -你也可以对非标准格式自定义解析。一个常用的工具是 [Grok][8],它用一个常见正则表达式库解析原始文本为结构化 JSON。下面是一个 Grok 在 Logstash 中解析内核日志文件的事例配置: +你也可以对非标准格式自定义解析。一个常用的工具是 [Grok][8],它用一个常见正则表达式库,可以解析原始文本为结构化 JSON。下面是一个 Grok 在 Logstash 中解析内核日志文件的事例配置: filter{ grok { @@ -110,29 +112,29 @@ Linux 提供了多个命令行工具用于文本解析和分析。当你想要 ### 用 Rsyslog 和 AWK 过滤 ### -过滤使得你能检索一个特定的域值而不是进行全文检索。这使你的日志分析更加准确,因为它会忽略来自其它部分日志信息不需要的匹配。为了对一个域值进行搜索,你首先需要解析日志或者至少有对事件结构进行检索的方式。 +过滤使得你能检索一个特定的字段值而不是进行全文检索。这使你的日志分析更加准确,因为它会忽略来自其它部分日志信息不需要的匹配。为了对一个字段值进行搜索,你首先需要解析日志或者至少有对事件结构进行检索的方式。 -#### 如果对 App 进行过滤 #### +#### 如何对应用进行过滤 #### 通常,你可能只想看一个应用的日志。如果你的应用把记录都保存到一个文件中就会很容易。如果你需要在一个聚集或集中式日志中过滤一个应用就会比较复杂。下面有几种方法来实现: -1. 用 rsyslog 守护进程解析和过滤日志。下面的例子将 sshd 应用的日志写入一个名为 sshd-message 的文件,然后丢弃事件也就不会在其它地方重复。你可以将它添加到你的 rsyslog.conf 文件中测试这个例子。 +1. 用 rsyslog 守护进程解析和过滤日志。下面的例子将 sshd 应用的日志写入一个名为 sshd-message 的文件,然后丢弃事件以便它不会在其它地方重复出现。你可以将它添加到你的 rsyslog.conf 文件中测试这个例子。 - :programname, isequal, “sshd” /var/log/sshd-messages - &~ + :programname, isequal, “sshd” /var/log/sshd-messages + &~ -2. 用类似 awk 的命令行工具提取特定域的值,例如 sshd 用户名。下面是 Ubuntu 系统中的一个例子。 +2. 用类似 awk 的命令行工具提取特定字段的值,例如 sshd 用户名。下面是 Ubuntu 系统中的一个例子。 - $ awk '/sshd.*invalid user/ { print $9 }' /var/log/auth.log - guest - admin - info - test - ubnt + $ awk '/sshd.*invalid user/ { print $9 }' /var/log/auth.log + guest + admin + info + test + ubnt 3. 用日志管理系统自动解析日志,然后在需要的应用名称上点击过滤。下面是在 Loggly 日志管理服务中提取 syslog 域的截图。我们对应用名称 “sshd” 进行过滤,如维恩图图标所示。 -![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.05.02-AM.png) + ![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.05.02-AM.png) #### 如何过滤错误 #### @@ -146,7 +148,7 @@ Linux 提供了多个命令行工具用于文本解析和分析。当你想要 : Mar 11 18:18:00,hoover-VirtualBox,su[5026]:, pam_authenticate: Authentication failure -你可以用 awk 或者 grep 检索错误信息。在 Ubuntu 中,对这个例子,我们可以用一些环绕语法,例如 . 和 >,它们只会匹配这个域。 +你可以用 awk 或者 grep 检索错误信息。在 Ubuntu 中,对这个例子,我们可以用一些语法特征,例如 . 和 >,它们只会匹配这个域。 $ grep '.err>' /var/log/auth.log : Mar 11 18:18:00,hoover-VirtualBox,su[5026]:, pam_authenticate: Authentication failure @@ -161,9 +163,9 @@ Linux 提供了多个命令行工具用于文本解析和分析。当你想要 via: http://www.loggly.com/ultimate-guide/logging/analyzing-linux-logs/ -作者:[Jason Skowronski][a] [Amy Echeverri][b] [ Sadequl Hussain][c] +作者:[Jason Skowronski][a],[Amy Echeverri][b],[ Sadequl Hussain][c] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From d643100f422d15c3d3858304b8aa3a65369d3a82 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 1 Aug 2015 23:35:42 +0800 Subject: [PATCH 1555/2517] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201507?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... And Secure Tool To Sync Files or Folders Between Computers.md | 0 ... Apache '.htaccess' Tricks to Secure and Customize Websites.md | 0 ...mal BASH like line editing is supported GRUB Error In Linux.md | 0 ...0150309 Comparative Introduction To FreeBSD For Linux Users.md | 0 published/{ => 201507}/20150401 ZMap Documentation.md | 0 .../20150407 10 Truly Amusing Easter Eggs in Linux.md | 0 ...150410 10 Top Distributions in Demand to Get Your Dream Job.md | 0 ...age 'Systemd' Services and Units Using 'Systemctl' in Linux.md | 0 ...and Line Tool to Output Rainbow Of Colors in Linux Terminal.md | 0 ...Linux Better than OS X GNU Open Source and Apple in History.md | 0 .../20150526 20 Useful Terminal Emulators for Linux.md | 0 ...7 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md | 0 ...7 How to Develop Own Custom Linux Distribution From Scratch.md | 0 ...0150527 How to edit your documents collaboratively on Linux.md | 0 .../20150601 How to monitor Linux servers with SNMP and Cacti.md | 0 .../20150601 How to monitor common services with Nagios.md | 0 ...150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md | 0 .../20150604 How to access SQLite database in Perl.md | 0 ...ate Filenames Having Spaces and Special Characters in Linux.md | 0 .../{ => 201507}/20150610 How to secure your Linux server.md | 0 ...0610 watch--Repeat Linux or Unix Commands Regular Intervals.md | 0 ...How to Configure Apache Containers with Docker on Fedora 22.md | 0 ...0150612 How to Configure Swarm Native Clustering for Docker.md | 0 ... Line Tool to Print Color ANSI Logos of Linux Distributions.md | 0 .../{ => 201507}/20150615 How to combine two graphs on Cacti.md | 0 ...x, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md | 0 published/{ => 201507}/20150616 LINUX 101--POWER UP YOUR SHELL.md | 0 .../{ => 201507}/20150616 Linux Humor on the Command-line.md | 0 published/{ => 201507}/20150616 XBMC--build a remote control.md | 0 ...An Ultimate Web Browser for Anonymous Web Browsing in Linux.md | 0 ...How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md | 0 .../20150618 What will be the future of Linux without Linus.md | 0 ...0150625 Screen Capture Made Easy with these Dedicated Tools.md | 0 ...0629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md | 0 .../20150629 Backup with these DeDuplicating Encryption Tools.md | 0 ... First Stable Version Of Atom Code Editor Has Been Released.md | 0 published/{ => 201507}/20150706 PHP Security.md | 0 ...50709 7 command line tools for monitoring your Linux system.md | 0 .../20150709 Install Google Hangouts Desktop Client In Linux.md | 0 ...alds Says People Who Believe in AI Singularity Are on Drugs.md | 0 ...x 'tar--Exiting with failure status due to previous errors'.md | 0 ...AQs with Answers--How to install a Brother printer on Linux.md | 0 ...w to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md | 0 ...50709 Why is the ibdata1 file continuously growing in MySQL.md | 0 ... How To Fix System Program Problem Detected In Ubuntu 14.04.md | 0 published/{ => 201507}/20150713 How to manage Vim plugins.md | 0 .../20150716 4 CCleaner Alternatives For Ubuntu Linux.md | 0 ...Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md | 0 ... 12 Useful PHP Commandline Usage Every Linux User Must Know.md | 0 ... to Use and Execute PHP Codes in Linux Command Line--Part 1.md | 0 ...tall Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md | 0 published/{ => 201507}/PHP 7 upgrading.md | 0 52 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201507}/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md (100%) rename published/{ => 201507}/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md (100%) rename published/{ => 201507}/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md (100%) rename published/{ => 201507}/20150309 Comparative Introduction To FreeBSD For Linux Users.md (100%) rename published/{ => 201507}/20150401 ZMap Documentation.md (100%) rename published/{ => 201507}/20150407 10 Truly Amusing Easter Eggs in Linux.md (100%) rename published/{ => 201507}/20150410 10 Top Distributions in Demand to Get Your Dream Job.md (100%) rename published/{ => 201507}/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md (100%) rename published/{ => 201507}/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md (100%) rename published/{ => 201507}/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md (100%) rename published/{ => 201507}/20150526 20 Useful Terminal Emulators for Linux.md (100%) rename published/{ => 201507}/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md (100%) rename published/{ => 201507}/20150527 How to Develop Own Custom Linux Distribution From Scratch.md (100%) rename published/{ => 201507}/20150527 How to edit your documents collaboratively on Linux.md (100%) rename published/{ => 201507}/20150601 How to monitor Linux servers with SNMP and Cacti.md (100%) rename published/{ => 201507}/20150601 How to monitor common services with Nagios.md (100%) rename published/{ => 201507}/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md (100%) rename published/{ => 201507}/20150604 How to access SQLite database in Perl.md (100%) rename published/{ => 201507}/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md (100%) rename published/{ => 201507}/20150610 How to secure your Linux server.md (100%) rename published/{ => 201507}/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md (100%) rename published/{ => 201507}/20150612 How to Configure Apache Containers with Docker on Fedora 22.md (100%) rename published/{ => 201507}/20150612 How to Configure Swarm Native Clustering for Docker.md (100%) rename published/{ => 201507}/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md (100%) rename published/{ => 201507}/20150615 How to combine two graphs on Cacti.md (100%) rename published/{ => 201507}/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md (100%) rename published/{ => 201507}/20150616 LINUX 101--POWER UP YOUR SHELL.md (100%) rename published/{ => 201507}/20150616 Linux Humor on the Command-line.md (100%) rename published/{ => 201507}/20150616 XBMC--build a remote control.md (100%) rename published/{ => 201507}/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md (100%) rename published/{ => 201507}/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md (100%) rename published/{ => 201507}/20150618 What will be the future of Linux without Linus.md (100%) rename published/{ => 201507}/20150625 Screen Capture Made Easy with these Dedicated Tools.md (100%) rename published/{ => 201507}/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md (100%) rename published/{ => 201507}/20150629 Backup with these DeDuplicating Encryption Tools.md (100%) rename published/{ => 201507}/20150629 First Stable Version Of Atom Code Editor Has Been Released.md (100%) rename published/{ => 201507}/20150706 PHP Security.md (100%) rename published/{ => 201507}/20150709 7 command line tools for monitoring your Linux system.md (100%) rename published/{ => 201507}/20150709 Install Google Hangouts Desktop Client In Linux.md (100%) rename published/{ => 201507}/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md (100%) rename published/{ => 201507}/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md (100%) rename published/{ => 201507}/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md (100%) rename published/{ => 201507}/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md (100%) rename published/{ => 201507}/20150709 Why is the ibdata1 file continuously growing in MySQL.md (100%) rename published/{ => 201507}/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md (100%) rename published/{ => 201507}/20150713 How to manage Vim plugins.md (100%) rename published/{ => 201507}/20150716 4 CCleaner Alternatives For Ubuntu Linux.md (100%) rename published/{ => 201507}/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md (100%) rename published/{ => 201507}/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md (100%) rename published/{ => 201507}/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md (100%) rename published/{ => 201507}/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md (100%) rename published/{ => 201507}/PHP 7 upgrading.md (100%) diff --git a/published/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md b/published/201507/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md similarity index 100% rename from published/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md rename to published/201507/20150121 Syncthing--A Private And Secure Tool To Sync Files or Folders Between Computers.md diff --git a/published/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md b/published/201507/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md similarity index 100% rename from published/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md rename to published/201507/20150127 25 Useful Apache '.htaccess' Tricks to Secure and Customize Websites.md diff --git a/published/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md b/published/201507/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md similarity index 100% rename from published/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md rename to published/201507/20150227 Fix Minimal BASH like line editing is supported GRUB Error In Linux.md diff --git a/published/20150309 Comparative Introduction To FreeBSD For Linux Users.md b/published/201507/20150309 Comparative Introduction To FreeBSD For Linux Users.md similarity index 100% rename from published/20150309 Comparative Introduction To FreeBSD For Linux Users.md rename to published/201507/20150309 Comparative Introduction To FreeBSD For Linux Users.md diff --git a/published/20150401 ZMap Documentation.md b/published/201507/20150401 ZMap Documentation.md similarity index 100% rename from published/20150401 ZMap Documentation.md rename to published/201507/20150401 ZMap Documentation.md diff --git a/published/20150407 10 Truly Amusing Easter Eggs in Linux.md b/published/201507/20150407 10 Truly Amusing Easter Eggs in Linux.md similarity index 100% rename from published/20150407 10 Truly Amusing Easter Eggs in Linux.md rename to published/201507/20150407 10 Truly Amusing Easter Eggs in Linux.md diff --git a/published/20150410 10 Top Distributions in Demand to Get Your Dream Job.md b/published/201507/20150410 10 Top Distributions in Demand to Get Your Dream Job.md similarity index 100% rename from published/20150410 10 Top Distributions in Demand to Get Your Dream Job.md rename to published/201507/20150410 10 Top Distributions in Demand to Get Your Dream Job.md diff --git a/published/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md b/published/201507/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md similarity index 100% rename from published/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md rename to published/201507/20150505 How to Manage 'Systemd' Services and Units Using 'Systemctl' in Linux.md diff --git a/published/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md b/published/201507/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md similarity index 100% rename from published/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md rename to published/201507/20150515 Lolcat--A Command Line Tool to Output Rainbow Of Colors in Linux Terminal.md diff --git a/published/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md b/published/201507/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md similarity index 100% rename from published/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md rename to published/201507/20150520 Is Linux Better than OS X GNU Open Source and Apple in History.md diff --git a/published/20150526 20 Useful Terminal Emulators for Linux.md b/published/201507/20150526 20 Useful Terminal Emulators for Linux.md similarity index 100% rename from published/20150526 20 Useful Terminal Emulators for Linux.md rename to published/201507/20150526 20 Useful Terminal Emulators for Linux.md diff --git a/published/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md b/published/201507/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md similarity index 100% rename from published/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md rename to published/201507/20150527 Animated Wallpaper Adds Live Backgrounds To Linux Distros.md diff --git a/published/20150527 How to Develop Own Custom Linux Distribution From Scratch.md b/published/201507/20150527 How to Develop Own Custom Linux Distribution From Scratch.md similarity index 100% rename from published/20150527 How to Develop Own Custom Linux Distribution From Scratch.md rename to published/201507/20150527 How to Develop Own Custom Linux Distribution From Scratch.md diff --git a/published/20150527 How to edit your documents collaboratively on Linux.md b/published/201507/20150527 How to edit your documents collaboratively on Linux.md similarity index 100% rename from published/20150527 How to edit your documents collaboratively on Linux.md rename to published/201507/20150527 How to edit your documents collaboratively on Linux.md diff --git a/published/20150601 How to monitor Linux servers with SNMP and Cacti.md b/published/201507/20150601 How to monitor Linux servers with SNMP and Cacti.md similarity index 100% rename from published/20150601 How to monitor Linux servers with SNMP and Cacti.md rename to published/201507/20150601 How to monitor Linux servers with SNMP and Cacti.md diff --git a/published/20150601 How to monitor common services with Nagios.md b/published/201507/20150601 How to monitor common services with Nagios.md similarity index 100% rename from published/20150601 How to monitor common services with Nagios.md rename to published/201507/20150601 How to monitor common services with Nagios.md diff --git a/published/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md b/published/201507/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md similarity index 100% rename from published/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md rename to published/201507/20150603 Installing Ruby on Rails using rbenv on Ubuntu 15.04.md diff --git a/published/20150604 How to access SQLite database in Perl.md b/published/201507/20150604 How to access SQLite database in Perl.md similarity index 100% rename from published/20150604 How to access SQLite database in Perl.md rename to published/201507/20150604 How to access SQLite database in Perl.md diff --git a/published/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md b/published/201507/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md similarity index 100% rename from published/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md rename to published/201507/20150610 How to Manipulate Filenames Having Spaces and Special Characters in Linux.md diff --git a/published/20150610 How to secure your Linux server.md b/published/201507/20150610 How to secure your Linux server.md similarity index 100% rename from published/20150610 How to secure your Linux server.md rename to published/201507/20150610 How to secure your Linux server.md diff --git a/published/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md b/published/201507/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md similarity index 100% rename from published/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md rename to published/201507/20150610 watch--Repeat Linux or Unix Commands Regular Intervals.md diff --git a/published/20150612 How to Configure Apache Containers with Docker on Fedora 22.md b/published/201507/20150612 How to Configure Apache Containers with Docker on Fedora 22.md similarity index 100% rename from published/20150612 How to Configure Apache Containers with Docker on Fedora 22.md rename to published/201507/20150612 How to Configure Apache Containers with Docker on Fedora 22.md diff --git a/published/20150612 How to Configure Swarm Native Clustering for Docker.md b/published/201507/20150612 How to Configure Swarm Native Clustering for Docker.md similarity index 100% rename from published/20150612 How to Configure Swarm Native Clustering for Docker.md rename to published/201507/20150612 How to Configure Swarm Native Clustering for Docker.md diff --git a/published/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md b/published/201507/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md similarity index 100% rename from published/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md rename to published/201507/20150612 Linux_Logo--A Command Line Tool to Print Color ANSI Logos of Linux Distributions.md diff --git a/published/20150615 How to combine two graphs on Cacti.md b/published/201507/20150615 How to combine two graphs on Cacti.md similarity index 100% rename from published/20150615 How to combine two graphs on Cacti.md rename to published/201507/20150615 How to combine two graphs on Cacti.md diff --git a/published/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md b/published/201507/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md similarity index 100% rename from published/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md rename to published/201507/20150616 Installing LAMP Linux, Apache, MariaDB, PHP or PhpMyAdmin in RHEL or CentOS 7.0.md diff --git a/published/20150616 LINUX 101--POWER UP YOUR SHELL.md b/published/201507/20150616 LINUX 101--POWER UP YOUR SHELL.md similarity index 100% rename from published/20150616 LINUX 101--POWER UP YOUR SHELL.md rename to published/201507/20150616 LINUX 101--POWER UP YOUR SHELL.md diff --git a/published/20150616 Linux Humor on the Command-line.md b/published/201507/20150616 Linux Humor on the Command-line.md similarity index 100% rename from published/20150616 Linux Humor on the Command-line.md rename to published/201507/20150616 Linux Humor on the Command-line.md diff --git a/published/20150616 XBMC--build a remote control.md b/published/201507/20150616 XBMC--build a remote control.md similarity index 100% rename from published/20150616 XBMC--build a remote control.md rename to published/201507/20150616 XBMC--build a remote control.md diff --git a/published/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md b/published/201507/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md similarity index 100% rename from published/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md rename to published/201507/20150617 Tor Browser--An Ultimate Web Browser for Anonymous Web Browsing in Linux.md diff --git a/published/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md b/published/201507/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md similarity index 100% rename from published/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md rename to published/201507/20150618 How to Setup Node.JS on Ubuntu 15.04 with Different Methods.md diff --git a/published/20150618 What will be the future of Linux without Linus.md b/published/201507/20150618 What will be the future of Linux without Linus.md similarity index 100% rename from published/20150618 What will be the future of Linux without Linus.md rename to published/201507/20150618 What will be the future of Linux without Linus.md diff --git a/published/20150625 Screen Capture Made Easy with these Dedicated Tools.md b/published/201507/20150625 Screen Capture Made Easy with these Dedicated Tools.md similarity index 100% rename from published/20150625 Screen Capture Made Easy with these Dedicated Tools.md rename to published/201507/20150625 Screen Capture Made Easy with these Dedicated Tools.md diff --git a/published/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md b/published/201507/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md similarity index 100% rename from published/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md rename to published/201507/20150629 4 Useful Tips on mkdir, tar and kill Commands in Linux.md diff --git a/published/20150629 Backup with these DeDuplicating Encryption Tools.md b/published/201507/20150629 Backup with these DeDuplicating Encryption Tools.md similarity index 100% rename from published/20150629 Backup with these DeDuplicating Encryption Tools.md rename to published/201507/20150629 Backup with these DeDuplicating Encryption Tools.md diff --git a/published/20150629 First Stable Version Of Atom Code Editor Has Been Released.md b/published/201507/20150629 First Stable Version Of Atom Code Editor Has Been Released.md similarity index 100% rename from published/20150629 First Stable Version Of Atom Code Editor Has Been Released.md rename to published/201507/20150629 First Stable Version Of Atom Code Editor Has Been Released.md diff --git a/published/20150706 PHP Security.md b/published/201507/20150706 PHP Security.md similarity index 100% rename from published/20150706 PHP Security.md rename to published/201507/20150706 PHP Security.md diff --git a/published/20150709 7 command line tools for monitoring your Linux system.md b/published/201507/20150709 7 command line tools for monitoring your Linux system.md similarity index 100% rename from published/20150709 7 command line tools for monitoring your Linux system.md rename to published/201507/20150709 7 command line tools for monitoring your Linux system.md diff --git a/published/20150709 Install Google Hangouts Desktop Client In Linux.md b/published/201507/20150709 Install Google Hangouts Desktop Client In Linux.md similarity index 100% rename from published/20150709 Install Google Hangouts Desktop Client In Linux.md rename to published/201507/20150709 Install Google Hangouts Desktop Client In Linux.md diff --git a/published/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md b/published/201507/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md similarity index 100% rename from published/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md rename to published/201507/20150709 Linus Torvalds Says People Who Believe in AI Singularity Are on Drugs.md diff --git a/published/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md b/published/201507/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md similarity index 100% rename from published/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md rename to published/201507/20150709 Linux FAQs with Answers--How to fix 'tar--Exiting with failure status due to previous errors'.md diff --git a/published/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md b/published/201507/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md similarity index 100% rename from published/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md rename to published/201507/20150709 Linux FAQs with Answers--How to install a Brother printer on Linux.md diff --git a/published/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md b/published/201507/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md similarity index 100% rename from published/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md rename to published/201507/20150709 Linux FAQs with Answers--How to open multiple tabs in a GNOME terminal on Ubuntu 15.04.md diff --git a/published/20150709 Why is the ibdata1 file continuously growing in MySQL.md b/published/201507/20150709 Why is the ibdata1 file continuously growing in MySQL.md similarity index 100% rename from published/20150709 Why is the ibdata1 file continuously growing in MySQL.md rename to published/201507/20150709 Why is the ibdata1 file continuously growing in MySQL.md diff --git a/published/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md b/published/201507/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md similarity index 100% rename from published/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md rename to published/201507/20150713 How To Fix System Program Problem Detected In Ubuntu 14.04.md diff --git a/published/20150713 How to manage Vim plugins.md b/published/201507/20150713 How to manage Vim plugins.md similarity index 100% rename from published/20150713 How to manage Vim plugins.md rename to published/201507/20150713 How to manage Vim plugins.md diff --git a/published/20150716 4 CCleaner Alternatives For Ubuntu Linux.md b/published/201507/20150716 4 CCleaner Alternatives For Ubuntu Linux.md similarity index 100% rename from published/20150716 4 CCleaner Alternatives For Ubuntu Linux.md rename to published/201507/20150716 4 CCleaner Alternatives For Ubuntu Linux.md diff --git a/published/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md b/published/201507/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md similarity index 100% rename from published/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md rename to published/201507/20150717 Setting Up 'XR' (Crossroads) Load Balancer for Web Servers on RHEL or CentOS.md diff --git a/published/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md b/published/201507/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md similarity index 100% rename from published/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md rename to published/201507/20150722 12 Useful PHP Commandline Usage Every Linux User Must Know.md diff --git a/published/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md b/published/201507/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md similarity index 100% rename from published/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md rename to published/201507/20150722 How to Use and Execute PHP Codes in Linux Command Line--Part 1.md diff --git a/published/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md b/published/201507/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md similarity index 100% rename from published/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md rename to published/201507/Install Plex Media Server On Ubuntu or CentOS 7.1 or Fedora 22.md diff --git a/published/PHP 7 upgrading.md b/published/201507/PHP 7 upgrading.md similarity index 100% rename from published/PHP 7 upgrading.md rename to published/201507/PHP 7 upgrading.md From 7a48a26cd5e38cfab5140f261777e84ce39351f1 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 2 Aug 2015 07:38:30 +0800 Subject: [PATCH 1556/2517] translating --- ...al Volume Management and How Do You Enable It in Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md b/sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md index 1641bd8f20..2a95f127d0 100644 --- a/sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md +++ b/sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md @@ -1,3 +1,5 @@ +translating----geekpi + What is Logical Volume Management and How Do You Enable It in Ubuntu? ================================================================================ > Logical Volume Management (LVM) is a disk management option that every major Linux distribution includes. Whether you need to set up storage pools or just need to dynamically create partitions, LVM is probably what you are looking for. @@ -69,4 +71,4 @@ via: http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and- 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:https://plus.google.com/+howtogeek?prsrc=5 -[1]:http://www.howtogeek.com/howto/13379/create-a-bootable-ubuntu-9.10-usb-flash-drive/ \ No newline at end of file +[1]:http://www.howtogeek.com/howto/13379/create-a-bootable-ubuntu-9.10-usb-flash-drive/ From 6719850a73e7d0985b14cacac51b88052e1be9cf Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 2 Aug 2015 08:20:22 +0800 Subject: [PATCH 1557/2517] translated --- ...ment and How Do You Enable It in Ubuntu.md | 74 ------------------- ...ment and How Do You Enable It in Ubuntu.md | 72 ++++++++++++++++++ 2 files changed, 72 insertions(+), 74 deletions(-) delete mode 100644 sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md create mode 100644 translated/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md diff --git a/sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md b/sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md deleted file mode 100644 index 2a95f127d0..0000000000 --- a/sources/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md +++ /dev/null @@ -1,74 +0,0 @@ -translating----geekpi - -What is Logical Volume Management and How Do You Enable It in Ubuntu? -================================================================================ -> Logical Volume Management (LVM) is a disk management option that every major Linux distribution includes. Whether you need to set up storage pools or just need to dynamically create partitions, LVM is probably what you are looking for. - -### What is LVM? ### - -Logical Volume Manager allows for a layer of abstraction between your operating system and the disks/partitions it uses. In traditional disk management your operating system looks for what disks are available (/dev/sda, /dev/sdb, etc.) and then looks at what partitions are available on those disks (/dev/sda1, /dev/sda2, etc.). - -With LVM, disks and partitions can be abstracted to contain multiple disks and partitions into one device. Your operating systems will never know the difference because LVM will only show the OS the volume groups (disks) and logical volumes (partitions) that you have set up. - -Because volume groups and logical volumes aren’t physically tied to a hard drive, it makes it easy to dynamically resize and create new disks and partitions. In addition, LVM can give you features that your file system is not capable of doing. For example, Ext3 does not have support for live snapshots, but if you’re using LVM you have the ability to take a snapshot of your logical volumes without unmounting the disk. - -### When Should You Use LVM? ### - -The first thing your should consider before setting up LVM is what you want to accomplish with your disks and partitions. Some distributions, like Fedora, install with LVM by default. - -If you are using Ubuntu on a laptop with only one internal hard drive and you don’t need extended features like live snapshots, then you may not need LVM. If you need easy expansion or want to combine multiple hard drives into a single pool of storage then LVM may be what you have been looking for. - -### Setting up LVM in Ubuntu ### - -First thing to know about using LVM is there is no easy way to convert your existing traditional partitions to logical volumes. It is possible to move to a new partition that uses LVM, but that won’t be something that we will cover in this article; instead we are going to take the approach of setting up LVM on a fresh installation of Ubuntu 10.10. - -![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/ubuntu-10-banner.png) - -To install Ubuntu using LVM you need to use the alternate install CD. Download it from the link below and burn a CD or [use unetbootin to create a USB drive][1]. - -![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/download-web.png) - -Boot your computer from the alternate install disk and select your options up until the partition disks screen and select guided – use entire disk and set up LVM. - -*Note: This will format your entire hard drive so if you are trying to dual boot or have another installation select manual instead.* - -![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-1.png) - -Select the main disk you want to use, typically your largest drive, and then go to the next step. - -![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-2.png) - -You will immediately need to write the changes to disk so make sure you selected the right disk and then write the changes. - -![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-3.png) - -Select the size you want the first logical volume to be and then continue. - -![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-4.png) - -Confirm your disk partitions and continue with the installation. - -![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-5.png) - -The final step will write the GRUB bootloader to the hard drive. It is important to note that GRUB cannot be on an LVM partition because computer BIOSes cannot directly read from a logical volume. Ubuntu will automatically create a 255 MB ext2 partition for your bootloader. - -![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-6.png) - -After the installation is complete, reboot the machine and boot into Ubuntu as normal. There should be no perceivable difference between using LVM or traditional disk management with this type of installation. - -![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/disk-manager.png) - -To use LVM to its full potential, stay tuned for our upcoming article on managing your LVM installation. - --------------------------------------------------------------------------------- - -via: http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and-how-do-you-enable-it-in-ubuntu/ - -作者:[How-To Geek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/+howtogeek?prsrc=5 -[1]:http://www.howtogeek.com/howto/13379/create-a-bootable-ubuntu-9.10-usb-flash-drive/ diff --git a/translated/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md b/translated/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md new file mode 100644 index 0000000000..05f07b74e6 --- /dev/null +++ b/translated/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md @@ -0,0 +1,72 @@ +什么是逻辑分区管理工具,它怎么在Ubuntu启用? +================================================================================ +> 逻辑分区管理(LVM)是每一个主流Linux发行版都含有的磁盘管理选项。无论你是否需要设置存储池或者只需要动态创建分区,LVM就是你正在寻找的。 + +### 什么是 LVM? ### + +逻辑分区管理是一个存在于磁盘/分区和操作系统之间的一个抽象层。在传统的磁盘管理中,你的操作系统寻找有哪些磁盘可用(/dev/sda、/dev/sdb等等)接着这些磁盘有哪些可用的分区(如/dev/sda1、/dev/sda2等等)。 + +在LVM下,磁盘和分区可以抽象成一个设备中含有多个磁盘和分区。你的操作系统将不会知道这些区别,因为LVM只会给操作系统展示你设置的卷组(磁盘)和逻辑卷(分区) + +,因此可以很容易地动态调整和创建新的磁盘和分区。除此之外,LVM带来你的文件系统不具备的功能。比如,ext3不支持实时快照,但是如果你正在使用LVM你可以不卸载磁盘的情况下做一个逻辑卷的快照。 + +### 你什么时候该使用LVM? ### + +在使用LVM之前首先得考虑的一件事是你要用你的磁盘和分区完成什么。一些发行版如Fedora已经默认安装了LVM。 + +如果你使用的是一台只有一块磁盘的Ubuntu笔记本电脑,并且你不需要像实时快照这样的扩展功能,那么你或许不需要LVM。如果I想要轻松地扩展或者想要将多块磁盘组成一个存储池,那么LVM或许正式你郑寻找的。 + +### 在Ubuntu中设置LVM ### + +使用LVM首先要了解的一件事是没有简单的方法将已经存在传统的分区转换成逻辑分区。可以将它移到一个使用LVM的新分区下,但是这并不会在本篇中提到;反之我们将全新安装一台Ubuntu 10.10来设置LVM + +![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/ubuntu-10-banner.png) + +要使用LVM安装Ubuntu你需要使用另外的安装CD。从下面的链接中下载并烧录到CD中或者[使用unetbootin创建一个USB盘][1]。 + +![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/download-web.png) + +从安装盘启动你的电脑,并在磁盘选择界面选择整个磁盘并设置LVM。 + +*注意:这会格式化你的整个磁盘,因此如果正在尝试双启动或者其他的安装选择,选择手动。* + +![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-1.png) + +选择你想用的主磁盘,最典型的是使用你最大的磁盘,接着进入下一步。 + +![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-2.png) + +你马上会将改变写入磁盘所以确保此时你选择的是正确的磁盘接着才写入设置。 + +![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/setup-3.png) + +选择第一个逻辑卷的大小并继续。 + +![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-4.png) + +确认你的磁盘分区并继续安装。 + +![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-5.png) + +最后一步将GRUB的bootloader写到磁盘中。重点注意的是GRUB不能作为一个LVM分区因为计算机BIOS不能直接从逻辑卷中读取数据。Ubuntu将自动创建一个255MB的ext2分区用于bootloder。 + +![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/setup-6.png) + +安装完成之后。重启电脑并如往常一样进入Ubuntu。使用这种方式安装之后应该就感受不到LVM和传统磁盘管理之间的区别了。 + +![](http://cdn3.howtogeek.com/wp-content/uploads/2011/01/disk-manager.png) + +要使用LVM的全部功能,静待我们的下篇关于管理LVM的文章。 + +-------------------------------------------------------------------------------- + +via: http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and-how-do-you-enable-it-in-ubuntu/ + +作者:[How-To Geek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/+howtogeek?prsrc=5 +[1]:http://www.howtogeek.com/howto/13379/create-a-bootable-ubuntu-9.10-usb-flash-drive/ From 110ba8016c7041b6c478c5b3c20e7ca435b75a3d Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 2 Aug 2015 12:51:45 +0800 Subject: [PATCH 1558/2517] [Translating] sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md --- ...to access a Linux server behind NAT via reverse SSH tunnel.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md index b67f5aee26..4239073013 100644 --- a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md +++ b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md @@ -1,3 +1,4 @@ +ictlyh Translating How to access a Linux server behind NAT via reverse SSH tunnel ================================================================================ You are running a Linux server at home, which is behind a NAT router or restrictive firewall. Now you want to SSH to the home server while you are away from home. How would you set that up? SSH port forwarding will certainly be an option. However, port forwarding can become tricky if you are dealing with multiple nested NAT environment. Besides, it can be interfered with under various ISP-specific conditions, such as restrictive ISP firewalls which block forwarded ports, or carrier-grade NAT which shares IPv4 addresses among users. From 1bc3516185f27417f9a750a8cd6b756010c72929 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 2 Aug 2015 13:58:34 +0800 Subject: [PATCH 1559/2517] Update 20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md [Translating] 20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md --- ...0150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md b/sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md index 4b49e3acca..99b2b3acc1 100644 --- a/sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md +++ b/sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md @@ -1,3 +1,5 @@ ++Translating by Ezio + How to run Ubuntu Snappy Core on Raspberry Pi 2 ================================================================================ The Internet of Things (IoT) is upon us. In a couple of years some of us might ask ourselves how we ever survived without it, just like we question our past without cellphones today. Canonical is a contender in this fast growing, but still wide open market. The company wants to claim their stakes in IoT just as they already did for the cloud. At the end of January, the company launched a small operating system that goes by the name of [Ubuntu Snappy Core][1] which is based on Ubuntu Core. @@ -86,4 +88,4 @@ via: http://xmodulo.com/ubuntu-snappy-core-raspberry-pi-2.html [1]:http://www.ubuntu.com/things [2]:http://www.raspberrypi.org/downloads/ [3]:http://xmodulo.com/write-raspberry-pi-image-sd-card.html -[4]:https://developer.ubuntu.com/en/snappy/ \ No newline at end of file +[4]:https://developer.ubuntu.com/en/snappy/ From 70694119830a191fbcd888e946c9b7ecb3d0619b Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 2 Aug 2015 16:13:22 +0800 Subject: [PATCH 1560/2517] Delete Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md --- ... RAID, Concepts of RAID and RAID Levels.md | 144 ------------------ 1 file changed, 144 deletions(-) delete mode 100644 sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md diff --git a/sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md b/sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md deleted file mode 100644 index 0f393fd7c4..0000000000 --- a/sources/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md +++ /dev/null @@ -1,144 +0,0 @@ -struggling 翻译中 -Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 -================================================================================ -RAID is a Redundant Array of Inexpensive disks, but nowadays it is called Redundant Array of Independent drives. Earlier it is used to be very costly to buy even a smaller size of disk, but nowadays we can buy a large size of disk with the same amount like before. Raid is just a collection of disks in a pool to become a logical volume. - -![RAID in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/RAID.jpg) - -Understanding RAID Setups in Linux - -Raid contains groups or sets or Arrays. A combine of drivers make a group of disks to form a RAID Array or RAID set. It can be a minimum of 2 number of disk connected to a raid controller and make a logical volume or more drives can be in a group. Only one Raid level can be applied in a group of disks. Raid are used when we need excellent performance. According to our selected raid level, performance will differ. Saving our data by fault tolerance & high availability. - -This series will be titled Preparation for the setting up RAID ‘s through Parts 1-9 and covers the following topics. - -- Part 1: Introduction to RAID, Concepts of RAID and RAID Levels -- Part 2: How to setup RAID0 (Stripe) in Linux -- Part 3: How to setup RAID1 (Mirror) in Linux -- Part 4: How to setup RAID5 (Striping with Distributed Parity) in Linux -- Part 5: How to setup RAID6 (Striping with Double Distributed Parity) in Linux -- Part 6: Setting Up RAID 10 or 1+0 (Nested) in Linux -- Part 7: Growing an Existing RAID Array and Removing Failed Disks in Raid -- Part 8: Recovering (Rebuilding) failed drives in RAID -- Part 9: Managing RAID in Linux - -This is the Part 1 of a 9-tutorial series, here we will cover the introduction of RAID, Concepts of RAID and RAID Levels that are required for the setting up RAID in Linux. - -### Software RAID and Hardware RAID ### - -Software RAID have low performance, because of consuming resource from hosts. Raid software need to load for read data from software raid volumes. Before loading raid software, OS need to get boot to load the raid software. No need of Physical hardware in software raids. Zero cost investment. - -Hardware RAID have high performance. They are dedicated RAID Controller which is Physically built using PCI express cards. It won’t use the host resource. They have NVRAM for cache to read and write. Stores cache while rebuild even if there is power-failure, it will store the cache using battery power backups. Very costly investments needed for a large scale. - -Hardware RAID Card will look like below: - -![Hardware RAID](http://www.tecmint.com/wp-content/uploads/2014/10/Hardware-RAID.jpg) - -Hardware RAID - -#### Featured Concepts of RAID #### - -- Parity method in raid regenerate the lost content from parity saved information’s. RAID 5, RAID 6 Based on Parity. -- Stripe is sharing data randomly to multiple disk. This won’t have full data in a single disk. If we use 3 disks half of our data will be in each disks. -- Mirroring is used in RAID 1 and RAID 10. Mirroring is making a copy of same data. In RAID 1 it will save the same content to the other disk too. -- Hot spare is just a spare drive in our server which can automatically replace the failed drives. If any one of the drive failed in our array this hot spare drive will be used and rebuild automatically. -- Chunks are just a size of data which can be minimum from 4KB and more. By defining chunk size we can increase the I/O performance. - -RAID’s are in various Levels. Here we will see only the RAID Levels which is used mostly in real environment. - -- RAID0 = Striping -- RAID1 = Mirroring -- RAID5 = Single Disk Distributed Parity -- RAID6 = Double Disk Distributed Parity -- RAID10 = Combine of Mirror & Stripe. (Nested RAID) - -RAID are managed using mdadm package in most of the Linux distributions. Let us get a Brief look into each RAID Levels. - -#### RAID 0 (or) Striping #### - -Striping have a excellent performance. In Raid 0 (Striping) the data will be written to disk using shared method. Half of the content will be in one disk and another half will be written to other disk. - -Let us assume we have 2 Disk drives, for example, if we write data “TECMINT” to logical volume it will be saved as ‘T‘ will be saved in first disk and ‘E‘ will be saved in Second disk and ‘C‘ will be saved in First disk and again ‘M‘ will be saved in Second disk and it continues in round-robin process. - -In this situation if any one of the drive fails we will loose our data, because with half of data from one of the disk can’t use to rebuilt the raid. But while comparing to Write Speed and performance RAID 0 is Excellent. We need at least minimum 2 disks to create a RAID 0 (Striping). If you need your valuable data don’t use this RAID LEVEL. - -- High Performance. -- There is Zero Capacity Loss in RAID 0 -- Zero Fault Tolerance. -- Write and Reading will be good performance. - -#### RAID 1 (or) Mirroring #### - -Mirroring have a good performance. Mirroring can make a copy of same data what we have. Assuming we have two numbers of 2TB Hard drives, total there we have 4TB, but in mirroring while the drives are behind the RAID Controller to form a Logical drive Only we can see the 2TB of logical drive. - -While we save any data, it will write to both 2TB Drives. Minimum two drives are needed to create a RAID 1 or Mirror. If a disk failure occurred we can reproduce the raid set by replacing a new disk. If any one of the disk fails in RAID 1, we can get the data from other one as there was a copy of same content in the other disk. So there is zero data loss. - -- Good Performance. -- Here Half of the Space will be lost in total capacity. -- Full Fault Tolerance. -- Rebuilt will be faster. -- Writing Performance will be slow. -- Reading will be good. -- Can be used for operating systems and database for small scale. - -#### RAID 5 (or) Distributed Parity #### - -RAID 5 is mostly used in enterprise levels. RAID 5 work by distributed parity method. Parity info will be used to rebuild the data. It rebuilds from the information left on the remaining good drives. This will protect our data from drive failure. - -Assume we have 4 drives, if one drive fails and while we replace the failed drive we can rebuild the replaced drive from parity informations. Parity information’s are Stored in all 4 drives, if we have 4 numbers of 1TB hard-drive. The parity information will be stored in 256GB in each drivers and other 768GB in each drives will be defined for Users. RAID 5 can be survive from a single Drive failure, If drives fails more than 1 will cause loss of data’s. - -- Excellent Performance -- Reading will be extremely very good in speed. -- Writing will be Average, slow if we won’t use a Hardware RAID Controller. -- Rebuild from Parity information from all drives. -- Full Fault Tolerance. -- 1 Disk Space will be under Parity. -- Can be used in file servers, web servers, very important backups. - -#### RAID 6 Two Parity Distributed Disk #### - -RAID 6 is same as RAID 5 with two parity distributed system. Mostly used in a large number of arrays. We need minimum 4 Drives, even if there 2 Drive fails we can rebuild the data while replacing new drives. - -Very slower than RAID 5, because it writes data to all 4 drivers at same time. Will be average in speed while we using a Hardware RAID Controller. If we have 6 numbers of 1TB hard-drives 4 drives will be used for data and 2 drives will be used for Parity. - -- Poor Performance. -- Read Performance will be good. -- Write Performance will be Poor if we not using a Hardware RAID Controller. -- Rebuild from 2 Parity Drives. -- Full Fault tolerance. -- 2 Disks space will be under Parity. -- Can be Used in Large Arrays. -- Can be use in backup purpose, video streaming, used in large scale. - -#### RAID 10 (or) Mirror & Stripe #### - -RAID 10 can be called as 1+0 or 0+1. This will do both works of Mirror & Striping. Mirror will be first and stripe will be the second in RAID 10. Stripe will be the first and mirror will be the second in RAID 01. RAID 10 is better comparing to 01. - -Assume, we have 4 Number of drives. While I’m writing some data to my logical volume it will be saved under All 4 drives using mirror and stripe methods. - -If I’m writing a data “TECMINT” in RAID 10 it will save the data as follow. First “T” will write to both disks and second “E” will write to both disk, this step will be used for all data write. It will make a copy of every data to other disk too. - -Same time it will use the RAID 0 method and write data as follow “T” will write to first disk and “E” will write to second disk. Again “C” will write to first Disk and “M” to second disk. - -- Good read and write performance. -- Here Half of the Space will be lost in total capacity. -- Fault Tolerance. -- Fast rebuild from copying data. -- Can be used in Database storage for high performance and availability. - -### Conclusion ### - -In this article we have seen what is RAID and which levels are mostly used in RAID in real environment. Hope you have learned the write-up about RAID. For RAID setup one must know about the basic Knowledge about RAID. The above content will fulfil basic understanding about RAID. - -In the next upcoming articles I’m going to cover how to setup and create a RAID using Various Levels, Growing a RAID Group (Array) and Troubleshooting with failed Drives and much more. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/understanding-raid-setup-in-linux/ - -作者:[Babin Lonston][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/babinlonston/ \ No newline at end of file From 4e630c4b50c5c68b42fb2706cad309db1d8320b8 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 2 Aug 2015 16:13:38 +0800 Subject: [PATCH 1561/2517] Delete Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md --- ...wo Devices' Using 'mdadm' Tool in Linux.md | 219 ------------------ 1 file changed, 219 deletions(-) delete mode 100644 sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md diff --git a/sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md b/sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md deleted file mode 100644 index 8057e4828e..0000000000 --- a/sources/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on 'Two Devices' Using 'mdadm' Tool in Linux.md +++ /dev/null @@ -1,219 +0,0 @@ -struggling 翻译中 -Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2 -================================================================================ -RAID is Redundant Array of Inexpensive disks, used for high availability and reliability in large scale environments, where data need to be protected than normal use. Raid is just a collection of disks in a pool to become a logical volume and contains an array. A combine drivers makes an array or called as set of (group). - -RAID can be created, if there are minimum 2 number of disk connected to a raid controller and make a logical volume or more drives can be added in an array according to defined RAID Levels. Software Raid are available without using Physical hardware those are called as software raid. Software Raid will be named as Poor man raid. - -![Setup RAID0 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Raid0-in-Linux.jpg) - -Setup RAID0 in Linux - -Main concept of using RAID is to save data from Single point of failure, means if we using a single disk to store the data and if it’s failed, then there is no chance of getting our data back, to stop the data loss we need a fault tolerance method. So, that we can use some collection of disk to form a RAID set. - -#### What is Stripe in RAID 0? #### - -Stripe is striping data across multiple disk at the same time by dividing the contents. Assume we have two disks and if we save content to logical volume it will be saved under both two physical disks by dividing the content. For better performance RAID 0 will be used, but we can’t get the data if one of the drive fails. So, it isn’t a good practice to use RAID 0. The only solution is to install operating system with RAID0 applied logical volumes to safe your important files. - -- RAID 0 has High Performance. -- Zero Capacity Loss in RAID 0. No Space will be wasted. -- Zero Fault Tolerance ( Can’t get back the data if any one of disk fails). -- Write and Reading will be Excellent. - -#### Requirements #### - -Minimum number of disks are allowed to create RAID 0 is 2, but you can add more disk but the order should be twice as 2, 4, 6, 8. If you have a Physical RAID card with enough ports, you can add more disks. - -Here we are not using a Hardware raid, this setup depends only on Software RAID. If we have a physical hardware raid card we can access it from it’s utility UI. Some motherboard by default in-build with RAID feature, there UI can be accessed using Ctrl+I keys. - -If you’re new to RAID setups, please read our earlier article, where we’ve covered some basic introduction of about RAID. - -- [Introduction to RAID and RAID Concepts][1] - -**My Server Setup** - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.225 - Two Disks : 20 GB each - -This article is Part 2 of a 9-tutorial RAID series, here in this part, we are going to see how we can create and setup Software RAID0 or striping in Linux systems or servers using two 20GB disks named sdb and sdc. - -### Step 1: Updating System and Installing mdadm for Managing RAID ### - -1. Before setting up RAID0 in Linux, let’s do a system update and then install ‘mdadm‘ package. The mdadm is a small program, which will allow us to configure and manage RAID devices in Linux. - - # yum clean all && yum update - # yum install mdadm -y - -![install mdadm in linux](http://www.tecmint.com/wp-content/uploads/2014/10/install-mdadm-in-linux.png) - -Install mdadm Tool - -### Step 2: Verify Attached Two 20GB Drives ### - -2. Before creating RAID 0, make sure to verify that the attached two hard drives are detected or not, using the following command. - - # ls -l /dev | grep sd - -![Check Hard Drives in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Hard-Drives.png) - -Check Hard Drives - -3. Once the new hard drives detected, it’s time to check whether the attached drives are already using any existing raid with the help of following ‘mdadm’ command. - - # mdadm --examine /dev/sd[b-c] - -![Check RAID Devices in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Drives-using-RAID.png) - -Check RAID Devices - -In the above output, we come to know that none of the RAID have been applied to these two sdb and sdc drives. - -### Step 3: Creating Partitions for RAID ### - -4. Now create sdb and sdc partitions for raid, with the help of following fdisk command. Here, I will show how to create partition on sdb drive. - - # fdisk /dev/sdb - -Follow below instructions for creating partitions. - -- Press ‘n‘ for creating new partition. -- Then choose ‘P‘ for Primary partition. -- Next select the partition number as 1. -- Give the default value by just pressing two times Enter key. -- Next press ‘P‘ to print the defined partition. - -![Create Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Partitions-in-Linux.png) - -Create Partitions - -Follow below instructions for creating Linux raid auto on partitions. - -- Press ‘L‘ to list all available types. -- Type ‘t‘to choose the partitions. -- Choose ‘fd‘ for Linux raid auto and press Enter to apply. -- Then again use ‘P‘ to print the changes what we have made. -- Use ‘w‘ to write the changes. - -![Create RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Partitions.png) - -Create RAID Partitions in Linux - -**Note**: Please follow same above instructions to create partition on sdc drive now. - -5. After creating partitions, verify both the drivers are correctly defined for RAID using following command. - - # mdadm --examine /dev/sd[b-c] - # mdadm --examine /dev/sd[b-c]1 - -![Verify RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Partitions.png) - -Verify RAID Partitions - -### Step 4: Creating RAID md Devices ### - -6. Now create md device (i.e. /dev/md0) and apply raid level using below command. - - # mdadm -C /dev/md0 -l raid0 -n 2 /dev/sd[b-c]1 - # mdadm --create /dev/md0 --level=stripe --raid-devices=2 /dev/sd[b-c]1 - -- -C – create -- -l – level -- -n – No of raid-devices - -7. Once md device has been created, now verify the status of RAID Level, Devices and Array used, with the help of following series of commands as shown. - - # cat /proc/mdstat - -![Verify RAID Level](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Level.png) - -Verify RAID Level - - # mdadm -E /dev/sd[b-c]1 - -![Verify RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Device.png) - -Verify RAID Device - - # mdadm --detail /dev/md0 - -![Verify RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Array.png) - -Verify RAID Array - -### Step 5: Assiging RAID Devices to Filesystem ### - -8. Create a ext4 filesystem for a RAID device /dev/md0 and mount it under /dev/raid0. - - # mkfs.ext4 /dev/md0 - -![Create ext4 Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystem.png) - -Create ext4 Filesystem - -9. Once ext4 filesystem has been created for Raid device, now create a mount point directory (i.e. /mnt/raid0) and mount the device /dev/md0 under it. - - # mkdir /mnt/raid0 - # mount /dev/md0 /mnt/raid0/ - -10. Next, verify that the device /dev/md0 is mounted under /mnt/raid0 directory using df command. - - # df -h - -11. Next, create a file called ‘tecmint.txt‘ under the mount point /mnt/raid0, add some content to the created file and view the content of a file and directory. - - # touch /mnt/raid0/tecmint.txt - # echo "Hi everyone how you doing ?" > /mnt/raid0/tecmint.txt - # cat /mnt/raid0/tecmint.txt - # ls -l /mnt/raid0/ - -![Verify Mount Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Mount-Device.png) - -Verify Mount Device - -12. Once you’ve verified mount points, it’s time to create an fstab entry in /etc/fstab file. - - # vim /etc/fstab - -Add the following entry as described. May vary according to your mount location and filesystem you using. - - /dev/md0 /mnt/raid0 ext4 deaults 0 0 - -![Add Device to Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Add-Device-to-Fstab.png) - -Add Device to Fstab - -13. Run mount ‘-a‘ to check if there is any error in fstab entry. - - # mount -av - -![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-Fstab.png) - -Check Errors in Fstab - -### Step 6: Saving RAID Configurations ### - -14. Finally, save the raid configuration to one of the file to keep the configurations for future use. Again we use ‘mdadm’ command with ‘-s‘ (scan) and ‘-v‘ (verbose) options as shown. - - # mdadm -E -s -v >> /etc/mdadm.conf - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - # cat /etc/mdadm.conf - -![Save RAID Configurations](http://www.tecmint.com/wp-content/uploads/2014/10/Save-RAID-Configurations.png) - -Save RAID Configurations - -That’s it, we have seen here, how to configure RAID0 striping with raid levels by using two hard disks. In next article, we will see how to setup RAID5. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-raid0-in-linux/ - -作者:[Babin Lonston][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/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ \ No newline at end of file From 5a2d8d351fa17cb222c3ab9429902a75352d9804 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 2 Aug 2015 16:15:47 +0800 Subject: [PATCH 1562/2517] =?UTF-8?q?Create=20Introduction=20to=20RAID,=20?= =?UTF-8?q?Concepts=20of=20RAID=20and=20RAID=20Levels=20=E2=80=93=20Part?= =?UTF-8?q?=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Concepts of RAID and RAID Levels – Part 1 | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 translated/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 diff --git a/translated/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 b/translated/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 new file mode 100644 index 0000000000..8ca0ecbd7e --- /dev/null +++ b/translated/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 @@ -0,0 +1,146 @@ + +RAID的级别和概念的介绍 - 第1部分 +================================================================================ +RAID是廉价磁盘冗余阵列,但现在它被称为独立磁盘冗余阵列。早先一个容量很小的磁盘都是非常昂贵的,但是现在我们可以很便宜的买到一个更大的磁盘。Raid 是磁盘的一个集合,被称为逻辑卷。 + + +![RAID in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/RAID.jpg) + +在 Linux 中理解 RAID 的设置 + +RAID包含一组或者一个集合甚至一个阵列。使用一组磁盘结合驱动器组成 RAID 阵列或 RAID 集。一个 RAID 控制器至少使用两个磁盘并且使用一个逻辑卷或者多个驱动器在一个组中。在一个磁盘组的应用中只能使用一个 RAID 级别。使用 RAID 可以提高服务器的性能。不同 RAID 的级别,性能会有所不同。它通过容错和高可用性来保存我们的数据。 + +这个系列被命名为RAID的构建共包含9个部分包括以下主题。 + +- 第1部分:RAID的级别和概念的介绍 +- 第2部分:在Linux中如何设置 RAID0(条带化) +- 第3部分:在Linux中如何设置 RAID1(镜像化) +- 第4部分:在Linux中如何设置 RAID5(条带化与分布式奇偶校验) +- 第5部分:在Linux中如何设置 RAID6(条带双分布式奇偶校验) +- 第6部分:在Linux中设置 RAID 10 或1 + 0(嵌套) +- 第7部分:增加现有的 RAID 阵列并删除损坏的磁盘 +- 第8部分:在 RAID 中恢复(重建)损坏的驱动器 +- 第9部分:在 Linux 中管理 RAID + +这是9系列教程的第1部分,在这里我们将介绍 RAID 的概念和 RAID 级别,这是在 Linux 中构建 RAID 需要理解的。 + + +### 软件RAID和硬件RAID ### + +软件 RAID 的性能很低,因为其从主机资源消耗。 RAID 软件需要加载可读取数据从软件 RAID 卷中。在加载 RAID 软件前,操作系统需要得到加载 RAID 软件的引导。在软件 RAID 中无需物理硬件。零成本投资。 + +硬件 RAID 具有很高的性能。他们有专用的 RAID 控制器,采用 PCI Express卡物理内置的。它不会使用主机资源。他们有 NVRAM 缓存读取和写入。当重建时即使出现电源故障,它会使用电池电源备份存储缓存。对于大规模使用需要非常昂贵的投资。 + +硬件 RAID 卡如下所示: + +![Hardware RAID](http://www.tecmint.com/wp-content/uploads/2014/10/Hardware-RAID.jpg) + +硬件RAID + +#### 精选的 RAID 概念 #### + +- 在 RAID 重建中校验方法中丢失的内容来自从校验中保存的信息。 RAID 5,RAID 6 基于校验。 +- 条带化是随机共享数据到多个磁盘。它不会在单个磁盘中保存完整的数据。如果我们使用3个磁盘,则数据将会存在于每个磁盘上。 +- 镜像被用于 RAID 1 和 RAID 10。镜像会自动备份数据。在 RAID 1,它将保存相同的内容到其他盘上。 +- 在我们的服务器上,热备份只是一个备用驱动器,它可以自动更换发生故障的驱动器。在我们的阵列中,如果任何一个驱动器损坏,热备份驱动器会自动重建。 +- 块是 RAID 控制器每次读写数据时的最小单位,最小4KB。通过定义块大小,我们可以增加 I/O 性能。 + +RAID有不同的级别。在这里,我们仅看到在真实环境下的使用最多的 RAID 级别。 + +- RAID0 = 条带化 +- RAID1 = 镜像 +- RAID5 = 单个磁盘分布式奇偶校验 +- RAID6 = 双盘分布式奇偶校验 +- RAID10 = 镜像 + 条带。(嵌套RAID) + +RAID 在大多数 Linux 发行版上使用 mdadm 的包管理。让我们先对每个 RAID 级别认识一下。 + +#### RAID 0(或)条带化 #### + +条带化有很好的性能。在 RAID 0(条带化)中数据将使用共享的方式被写入到磁盘。一半的内容将是在一个磁盘上,另一半内容将被写入到其它磁盘。 + +假设我们有2个磁盘驱动器,例如,如果我们将数据“TECMINT”写到逻辑卷中,“T”将被保存在第一盘中,“E”将保存在第二盘,'C'将被保存在第一盘,“M”将保存在第二盘,它会一直继续此循环过程。 + +在这种情况下,如果驱动器中的任何一个发生故障,我们将丢失所有的数据,因为一个盘中只有一半的数据,不能用于重建。不过,当比较写入速度和性能时,RAID0 是非常好的。创建 RAID 0(条带化)至少需要2个磁盘。如果你的数据是非常宝贵的,那么不要使用此 RAID 级别。 + +- 高性能。 +- 在 RAID0 上零容量损失。 +- 零容错。 +- 写和读有很高的性能。 + +#### RAID1(或)镜像化 #### + +镜像也有不错的性能。镜像可以备份我们的数据。假设我们有两组2TB的硬盘驱动器,我们总共有4TB,但在镜像中,驱动器在 RAID 控制器的后面形成一个逻辑驱动器,我们只能看到逻辑驱动器有2TB。 + +当我们保存数据时,它将同时写入2TB驱动器中。创建 RAID 1 (镜像化)最少需要两个驱动器。如果发生磁盘故障,我们可以恢复 RAID 通过更换一个新的磁盘。如果在 RAID 1 中任何一个磁盘发生故障,我们可以从另一个磁盘中获取相同的数据,因为其他的磁盘中也有相同的数据。所以是零数据丢失。 + +- 良好的性能。 +- 空间的一半将在总容量丢失。 +- 完全容错。 +- 重建会更快。 +- 写性能将是缓慢的。 +- 读将会很好。 +- 被操作系统和数据库使用的规模很小。 + +#### RAID 5(或)分布式奇偶校验 #### + +RAID 5 多用于企业的水平。 RAID 5 的工作通过分布式奇偶校验的方法。奇偶校验信息将被用于重建数据。它需要留下的正常驱动器上的信息去重建。驱动器故障时,这会保护我们的数据。 + +假设我们有4个驱动器,如果一个驱动器发生故障而后我们更换发生故障的驱动器后,我们可以从奇偶校验中重建数据到更换的驱动器上。奇偶校验信息存储在所有的4个驱动器上,如果我们有4个 1TB 的驱动器。奇偶校验信息将被存储在每个驱动器的256G中而其它768GB是用户自己使用的。单个驱动器故障后,RAID 5 依旧正常工作,如果驱动器损坏个数超过1个会导致数据的丢失。 + +- 性能卓越 +- 读速度将非常好。 +- 如果我们不使用硬件 RAID 控制器,写速度是缓慢的。 +- 从所有驱动器的奇偶校验信息中重建。 +- 完全容错。 +- 1个磁盘空间将用于奇偶校验。 +- 可以被用在文件服务器,Web服务器,非常重要的备份中。 + +#### RAID 6 两个分布式奇偶校验磁盘 #### + +RAID 6 和 RAID 5 相似但它有两个分布式奇偶校验。大多用在大量的阵列中。我们最少需要4个驱动器,即使有2个驱动器发生故障,我们依然可以重建数据,同时更换新的驱动器。 + +它比 RAID 5 非常慢,因为它将数据同时写到4个驱动器上。当我们使用硬件 RAID 控制器时速度将被平均。如果我们有6个的1TB驱动器,4个驱动器将用于数据保存,2个驱动器将用于校验。 + +- 性能不佳。 +- 读的性能很好。 +- 如果我们不使用硬件 RAID 控制器写的性能会很差。 +- 从2奇偶校验驱动器上重建。 +- 完全容错。 +- 2个磁盘空间将用于奇偶校验。 +- 可用于大型阵列。 +- 在备份和视频流中大规模使用。 + +#### RAID 10(或)镜像+条带 #### + +RAID 10 可以被称为1 + 0或0 +1。它将做镜像+条带两个工作。在 RAID 10 中首先做镜像然后做条带。在 RAID 01 上首先做条带,然后做镜像。RAID 10 比 01 好。 + +假设,我们有4个驱动器。当我写了一些数据到逻辑卷上,它会使用镜像和条带将数据保存到4个驱动器上。 + +如果我在 RAID 10 上写入数据“TECMINT”,数据将使用如下形式保存。首先将“T”同时写入两个磁盘,“E”也将同时写入两个磁盘,这一步将所有数据都写入。这使数据得到备份。 + +同时它将使用 RAID 0 方式写入数据,遵循将“T”写入第一个盘,“E”写入第二个盘。再次将“C”写入第一个盘,“M”到第二个盘。 + +- 良好的读写性能。 +- 空间的一半将在总容量丢失。 +- 容错。 +- 从备份数据中快速重建。 +- 它的高性能和高可用性常被用于数据库的存储中。 + +### 结论 ### + +在这篇文章中,我们已经看到了什么是 RAID 和在实际环境大多采用 RAID 的哪个级别。希望你已经学会了上面所写的。对于 RAID 的构建必须了解有关 RAID 的基本知识。以上内容对于你了解 RAID 基本满足。 + +在接下来的文章中,我将介绍如何设置和使用各种级别创建 RAID,增加 RAID 组(阵列)和驱动器故障排除等。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/understanding-raid-setup-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ From f1ab428b04c8e3d225b0e5bfdde1c28f541282e3 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 2 Aug 2015 16:16:13 +0800 Subject: [PATCH 1563/2517] =?UTF-8?q?Delete=20Introduction=20to=20RAID,=20?= =?UTF-8?q?Concepts=20of=20RAID=20and=20RAID=20Levels=20=E2=80=93=20Part?= =?UTF-8?q?=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Concepts of RAID and RAID Levels – Part 1 | 146 ------------------ 1 file changed, 146 deletions(-) delete mode 100644 translated/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 diff --git a/translated/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 b/translated/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 deleted file mode 100644 index 8ca0ecbd7e..0000000000 --- a/translated/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 +++ /dev/null @@ -1,146 +0,0 @@ - -RAID的级别和概念的介绍 - 第1部分 -================================================================================ -RAID是廉价磁盘冗余阵列,但现在它被称为独立磁盘冗余阵列。早先一个容量很小的磁盘都是非常昂贵的,但是现在我们可以很便宜的买到一个更大的磁盘。Raid 是磁盘的一个集合,被称为逻辑卷。 - - -![RAID in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/RAID.jpg) - -在 Linux 中理解 RAID 的设置 - -RAID包含一组或者一个集合甚至一个阵列。使用一组磁盘结合驱动器组成 RAID 阵列或 RAID 集。一个 RAID 控制器至少使用两个磁盘并且使用一个逻辑卷或者多个驱动器在一个组中。在一个磁盘组的应用中只能使用一个 RAID 级别。使用 RAID 可以提高服务器的性能。不同 RAID 的级别,性能会有所不同。它通过容错和高可用性来保存我们的数据。 - -这个系列被命名为RAID的构建共包含9个部分包括以下主题。 - -- 第1部分:RAID的级别和概念的介绍 -- 第2部分:在Linux中如何设置 RAID0(条带化) -- 第3部分:在Linux中如何设置 RAID1(镜像化) -- 第4部分:在Linux中如何设置 RAID5(条带化与分布式奇偶校验) -- 第5部分:在Linux中如何设置 RAID6(条带双分布式奇偶校验) -- 第6部分:在Linux中设置 RAID 10 或1 + 0(嵌套) -- 第7部分:增加现有的 RAID 阵列并删除损坏的磁盘 -- 第8部分:在 RAID 中恢复(重建)损坏的驱动器 -- 第9部分:在 Linux 中管理 RAID - -这是9系列教程的第1部分,在这里我们将介绍 RAID 的概念和 RAID 级别,这是在 Linux 中构建 RAID 需要理解的。 - - -### 软件RAID和硬件RAID ### - -软件 RAID 的性能很低,因为其从主机资源消耗。 RAID 软件需要加载可读取数据从软件 RAID 卷中。在加载 RAID 软件前,操作系统需要得到加载 RAID 软件的引导。在软件 RAID 中无需物理硬件。零成本投资。 - -硬件 RAID 具有很高的性能。他们有专用的 RAID 控制器,采用 PCI Express卡物理内置的。它不会使用主机资源。他们有 NVRAM 缓存读取和写入。当重建时即使出现电源故障,它会使用电池电源备份存储缓存。对于大规模使用需要非常昂贵的投资。 - -硬件 RAID 卡如下所示: - -![Hardware RAID](http://www.tecmint.com/wp-content/uploads/2014/10/Hardware-RAID.jpg) - -硬件RAID - -#### 精选的 RAID 概念 #### - -- 在 RAID 重建中校验方法中丢失的内容来自从校验中保存的信息。 RAID 5,RAID 6 基于校验。 -- 条带化是随机共享数据到多个磁盘。它不会在单个磁盘中保存完整的数据。如果我们使用3个磁盘,则数据将会存在于每个磁盘上。 -- 镜像被用于 RAID 1 和 RAID 10。镜像会自动备份数据。在 RAID 1,它将保存相同的内容到其他盘上。 -- 在我们的服务器上,热备份只是一个备用驱动器,它可以自动更换发生故障的驱动器。在我们的阵列中,如果任何一个驱动器损坏,热备份驱动器会自动重建。 -- 块是 RAID 控制器每次读写数据时的最小单位,最小4KB。通过定义块大小,我们可以增加 I/O 性能。 - -RAID有不同的级别。在这里,我们仅看到在真实环境下的使用最多的 RAID 级别。 - -- RAID0 = 条带化 -- RAID1 = 镜像 -- RAID5 = 单个磁盘分布式奇偶校验 -- RAID6 = 双盘分布式奇偶校验 -- RAID10 = 镜像 + 条带。(嵌套RAID) - -RAID 在大多数 Linux 发行版上使用 mdadm 的包管理。让我们先对每个 RAID 级别认识一下。 - -#### RAID 0(或)条带化 #### - -条带化有很好的性能。在 RAID 0(条带化)中数据将使用共享的方式被写入到磁盘。一半的内容将是在一个磁盘上,另一半内容将被写入到其它磁盘。 - -假设我们有2个磁盘驱动器,例如,如果我们将数据“TECMINT”写到逻辑卷中,“T”将被保存在第一盘中,“E”将保存在第二盘,'C'将被保存在第一盘,“M”将保存在第二盘,它会一直继续此循环过程。 - -在这种情况下,如果驱动器中的任何一个发生故障,我们将丢失所有的数据,因为一个盘中只有一半的数据,不能用于重建。不过,当比较写入速度和性能时,RAID0 是非常好的。创建 RAID 0(条带化)至少需要2个磁盘。如果你的数据是非常宝贵的,那么不要使用此 RAID 级别。 - -- 高性能。 -- 在 RAID0 上零容量损失。 -- 零容错。 -- 写和读有很高的性能。 - -#### RAID1(或)镜像化 #### - -镜像也有不错的性能。镜像可以备份我们的数据。假设我们有两组2TB的硬盘驱动器,我们总共有4TB,但在镜像中,驱动器在 RAID 控制器的后面形成一个逻辑驱动器,我们只能看到逻辑驱动器有2TB。 - -当我们保存数据时,它将同时写入2TB驱动器中。创建 RAID 1 (镜像化)最少需要两个驱动器。如果发生磁盘故障,我们可以恢复 RAID 通过更换一个新的磁盘。如果在 RAID 1 中任何一个磁盘发生故障,我们可以从另一个磁盘中获取相同的数据,因为其他的磁盘中也有相同的数据。所以是零数据丢失。 - -- 良好的性能。 -- 空间的一半将在总容量丢失。 -- 完全容错。 -- 重建会更快。 -- 写性能将是缓慢的。 -- 读将会很好。 -- 被操作系统和数据库使用的规模很小。 - -#### RAID 5(或)分布式奇偶校验 #### - -RAID 5 多用于企业的水平。 RAID 5 的工作通过分布式奇偶校验的方法。奇偶校验信息将被用于重建数据。它需要留下的正常驱动器上的信息去重建。驱动器故障时,这会保护我们的数据。 - -假设我们有4个驱动器,如果一个驱动器发生故障而后我们更换发生故障的驱动器后,我们可以从奇偶校验中重建数据到更换的驱动器上。奇偶校验信息存储在所有的4个驱动器上,如果我们有4个 1TB 的驱动器。奇偶校验信息将被存储在每个驱动器的256G中而其它768GB是用户自己使用的。单个驱动器故障后,RAID 5 依旧正常工作,如果驱动器损坏个数超过1个会导致数据的丢失。 - -- 性能卓越 -- 读速度将非常好。 -- 如果我们不使用硬件 RAID 控制器,写速度是缓慢的。 -- 从所有驱动器的奇偶校验信息中重建。 -- 完全容错。 -- 1个磁盘空间将用于奇偶校验。 -- 可以被用在文件服务器,Web服务器,非常重要的备份中。 - -#### RAID 6 两个分布式奇偶校验磁盘 #### - -RAID 6 和 RAID 5 相似但它有两个分布式奇偶校验。大多用在大量的阵列中。我们最少需要4个驱动器,即使有2个驱动器发生故障,我们依然可以重建数据,同时更换新的驱动器。 - -它比 RAID 5 非常慢,因为它将数据同时写到4个驱动器上。当我们使用硬件 RAID 控制器时速度将被平均。如果我们有6个的1TB驱动器,4个驱动器将用于数据保存,2个驱动器将用于校验。 - -- 性能不佳。 -- 读的性能很好。 -- 如果我们不使用硬件 RAID 控制器写的性能会很差。 -- 从2奇偶校验驱动器上重建。 -- 完全容错。 -- 2个磁盘空间将用于奇偶校验。 -- 可用于大型阵列。 -- 在备份和视频流中大规模使用。 - -#### RAID 10(或)镜像+条带 #### - -RAID 10 可以被称为1 + 0或0 +1。它将做镜像+条带两个工作。在 RAID 10 中首先做镜像然后做条带。在 RAID 01 上首先做条带,然后做镜像。RAID 10 比 01 好。 - -假设,我们有4个驱动器。当我写了一些数据到逻辑卷上,它会使用镜像和条带将数据保存到4个驱动器上。 - -如果我在 RAID 10 上写入数据“TECMINT”,数据将使用如下形式保存。首先将“T”同时写入两个磁盘,“E”也将同时写入两个磁盘,这一步将所有数据都写入。这使数据得到备份。 - -同时它将使用 RAID 0 方式写入数据,遵循将“T”写入第一个盘,“E”写入第二个盘。再次将“C”写入第一个盘,“M”到第二个盘。 - -- 良好的读写性能。 -- 空间的一半将在总容量丢失。 -- 容错。 -- 从备份数据中快速重建。 -- 它的高性能和高可用性常被用于数据库的存储中。 - -### 结论 ### - -在这篇文章中,我们已经看到了什么是 RAID 和在实际环境大多采用 RAID 的哪个级别。希望你已经学会了上面所写的。对于 RAID 的构建必须了解有关 RAID 的基本知识。以上内容对于你了解 RAID 基本满足。 - -在接下来的文章中,我将介绍如何设置和使用各种级别创建 RAID,增加 RAID 组(阵列)和驱动器故障排除等。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/understanding-raid-setup-in-linux/ - -作者:[Babin Lonston][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/babinlonston/ From 9e4df4271683151f4f04b3cc44bc04b1f16cf1e0 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 2 Aug 2015 16:16:43 +0800 Subject: [PATCH 1564/2517] =?UTF-8?q?Create=20Introduction=20to=20RAID,=20?= =?UTF-8?q?Concepts=20of=20RAID=20and=20RAID=20Levels=20=E2=80=93=20Part?= =?UTF-8?q?=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Concepts of RAID and RAID Levels – Part 1 | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 diff --git a/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 b/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 new file mode 100644 index 0000000000..9feba99609 --- /dev/null +++ b/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 @@ -0,0 +1,218 @@ +在 Linux 上使用 ‘mdadm’ 工具创建软件 RAID0 (条带化)在 ‘两个设备’ 上 - 第2部分 +================================================================================ +RAID 是廉价磁盘的冗余阵列,其高可用性和可靠性适用于大规模环境中,为了使数据被保护而不是被正常使用。RAID 只是磁盘的一个集合被称为逻辑卷。结合驱动器,使其成为一个阵列或称为集合(组)。 + +创建 RAID 最少应使用2个磁盘被连接组成 RAID 控制器,逻辑卷或多个驱动器可以根据定义的 RAID 级别添加在一个阵列中。不使用物理硬件创建的 RAID 被称为软件 RAID。软件 RAID 一般都是不太有钱的人才使用的。 + +![Setup RAID0 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Raid0-in-Linux.jpg) + +在 Linux 中创建 RAID0 + +使用 RAID 的主要目的是为了在单点故障时保存数据,如果我们使用单个磁盘来存储数据,如果它损坏了,那么就没有机会取回我们的数据了,为了防止数据丢失我们需要一个容错的方法。所以,我们可以使用多个磁盘组成 RAID 阵列。 + +#### 在 RAID 0 中条带是什么 #### + +条带是通过将数据在同一时间分割到多个磁盘上。假设我们有两个磁盘,如果我们将数据保存到逻辑卷上,它会将数据保存在两个磁盘上。使用 RAID 0 是为了获得更好的性能,但是如果驱动器中一个出现故障,我们将不能得到完整的数据。因此,使用 RAID 0 不是一种好的做法。唯一的解决办法就是安装有 RAID0 逻辑卷的操作系统来提高文件的安全性。 + +- RAID 0 性能较高。 +- 在 RAID 0 上,空间零浪费。 +- 零容错(如果硬盘中的任何一个发生故障,无法取回数据)。 +- 写和读性能得以提高。 + +#### 要求 #### + +创建 RAID 0 允许的最小磁盘数目是2个,但你可以添加更多的磁盘,但数目应该是2,4,6,8等的两倍。如果你有一个物理 RAID 卡并且有足够的端口,你可以添加更多磁盘。 + +在这里,我们没有使用硬件 RAID,此设置只依赖于软件 RAID。如果我们有一个物理硬件 RAID 卡,我们可以从它的 UI 组件访问它。有些主板默认内建 RAID 功能,还可以使用 Ctrl + I 键访问 UI。 + +如果你是刚开始设置 RAID,请阅读我们前面的文章,我们已经介绍了一些关于 RAID 基本的概念。 + +- [Introduction to RAID and RAID Concepts][1] + +**我的服务器设置** + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.225 + Two Disks : 20 GB each + +这篇文章是9个 RAID 系列教程的第2部分,在这部分,我们将看看如何能够在 Linux 上创建和使用 RAID0(条带化),以名为 sdb 和 sdc 两个20GB的硬盘为例。 + +### 第1步:更新系统和安装管理 RAID 的 mdadm 软件 ### + +1.在 Linux 上设置 RAID0 前,我们先更新一下系统,然后安装 ‘mdadm’ 包。mdadm 是一个小程序,这将使我们能够在Linux下配置和管理 RAID 设备。 + + # yum clean all && yum update + # yum install mdadm -y + +![install mdadm in linux](http://www.tecmint.com/wp-content/uploads/2014/10/install-mdadm-in-linux.png) + +安装 mdadm 工具 + +### 第2步:检测并连接两个 20GB 的硬盘 ### + +2.在创建 RAID 0 前,请务必确认两个硬盘能被检测到,使用下面的命令确认。 + + # ls -l /dev | grep sd + +![Check Hard Drives in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Hard-Drives.png) + +检查硬盘 + +3.一旦检测到新的硬盘驱动器,同时检查是否连接的驱动器已经被现有的 RAID 使用,使用下面的 ‘mdadm’ 命令来查看。 + + # mdadm --examine /dev/sd[b-c] + +![Check RAID Devices in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Drives-using-RAID.png) + +检查 RAID 设备 + +从上面的输出我们可以看到,没有任何 RAID 使用 sdb 和 sdc 这两个驱动器。 + +### 第3步:创建 RAID 分区 ### + +4.现在用 sdb 和 sdc 创建 RAID 的分区,使用 fdisk 命令来创建。在这里,我将展示如何创建 sdb 驱动器上的分区。 + + # fdisk /dev/sdb + +请按照以下说明创建分区。 + +- 按 ‘n’ 创建新的分区。 +- 然后按 ‘P’ 选择主分区。 +- 接下来选择分区号为1。 +- 只需按两次回车键选择默认值即可。 +- 然后,按 ‘P’ 来打印创建好的分区。 + +![Create Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Partitions-in-Linux.png) + +创建分区 + +请按照以下说明将分区创建为 Linux 的 RAID 类型。 + +- 按 ‘L’,列出所有可用的类型。 +- 按 ‘t’ 去修改分区。 +- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 +- 然后再次使用‘p’查看我们所做的更改。 +- 使用‘w’保存更改。 + +![Create RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Partitions.png) + +在 Linux 上创建 RAID 分区 + +**注**: 请使用上述步骤同样在 sdc 驱动器上创建分区。 + +5.创建分区后,验证这两个驱动器能使用下面的命令来正确定义 RAID。 + + # mdadm --examine /dev/sd[b-c] + # mdadm --examine /dev/sd[b-c]1 + +![Verify RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Partitions.png) + +验证 RAID 分区 + +### 第4步:创建 RAID md 设备 ### + +6.现在使用以下命令创建 md 设备(即 /dev/md0),并选择 RAID 合适的级别。 + + # mdadm -C /dev/md0 -l raid0 -n 2 /dev/sd[b-c]1 + # mdadm --create /dev/md0 --level=stripe --raid-devices=2 /dev/sd[b-c]1 + +- -C – create +- -l – level +- -n – No of raid-devices + +7.一旦 md 设备已经建立,使用如下命令可以查看 RAID 级别,设备和阵列的使用状态。 + + # cat /proc/mdstat + +![Verify RAID Level](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Level.png) + +查看 RAID 级别 + + # mdadm -E /dev/sd[b-c]1 + +![Verify RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Device.png) + +查看 RAID 设备 + + # mdadm --detail /dev/md0 + +![Verify RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Array.png) + +查看 RAID 阵列 + +### 第5步:挂载 RAID 设备到文件系统 ### + +8.将 RAID 设备 /dev/md0 创建为 ext4 文件系统并挂载到 /mnt/raid0 下。 + + # mkfs.ext4 /dev/md0 + +![Create ext4 Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystem.png) + +创建 ext4 文件系统 + +9. ext4 文件系统为 RAID 设备创建好后,现在创建一个挂载点(即 /mnt/raid0),并将设备 /dev/md0 挂载在它下。 + + # mkdir /mnt/raid0 + # mount /dev/md0 /mnt/raid0/ + +10.下一步,使用 df 命令验证设备 /dev/md0 是否被挂载在 /mnt/raid0 下。 + + # df -h + +11.接下来,创建一个名为 ‘tecmint.txt’ 的文件挂载到 /mnt/raid0 下,为创建的文件添加一些内容,并查看文件和目录的内容。 + + # touch /mnt/raid0/tecmint.txt + # echo "Hi everyone how you doing ?" > /mnt/raid0/tecmint.txt + # cat /mnt/raid0/tecmint.txt + # ls -l /mnt/raid0/ + +![Verify Mount Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Mount-Device.png) + +验证挂载的设备 + +12.一旦你验证挂载点后,同时将它添加到 /etc/fstab 文件中。 + + # vim /etc/fstab + +添加以下条目,根据你的安装位置和使用文件系统的不同,自行做修改。 + + /dev/md0 /mnt/raid0 ext4 deaults 0 0 + +![Add Device to Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Add-Device-to-Fstab.png) + +添加设备到 fstab 文件中 + +13.使用 mount ‘-a‘ 来检查 fstab 的条目是否有误。 + + # mount -av + +![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-Fstab.png) + +检查 fstab 文件是否有误 + +### 第6步:保存 RAID 配置 ### + +14.最后,保存 RAID 配置到一个文件中,以供将来使用。同样,我们使用 ‘mdadm’ 命令带有 ‘-s‘ (scan) 和 ‘-v‘ (verbose) 选项,如图所示。 + + # mdadm -E -s -v >> /etc/mdadm.conf + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + # cat /etc/mdadm.conf + +![Save RAID Configurations](http://www.tecmint.com/wp-content/uploads/2014/10/Save-RAID-Configurations.png) + +保存 RAID 配置 + +就这样,我们在这里看到,如何通过使用两个硬盘配置具有条带化的 RAID0 级别。在接下来的文章中,我们将看到如何设置 RAID5。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid0-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ From 0b475953acb42284d0e6595285b29c20745b9124 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 2 Aug 2015 16:17:39 +0800 Subject: [PATCH 1565/2517] =?UTF-8?q?Update=20Introduction=20to=20RAID,=20?= =?UTF-8?q?Concepts=20of=20RAID=20and=20RAID=20Levels=20=E2=80=93=20Part?= =?UTF-8?q?=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Concepts of RAID and RAID Levels – Part 1 | 250 +++++++----------- 1 file changed, 89 insertions(+), 161 deletions(-) diff --git a/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 b/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 index 9feba99609..8ca0ecbd7e 100644 --- a/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 +++ b/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 @@ -1,212 +1,141 @@ -在 Linux 上使用 ‘mdadm’ 工具创建软件 RAID0 (条带化)在 ‘两个设备’ 上 - 第2部分 + +RAID的级别和概念的介绍 - 第1部分 ================================================================================ -RAID 是廉价磁盘的冗余阵列,其高可用性和可靠性适用于大规模环境中,为了使数据被保护而不是被正常使用。RAID 只是磁盘的一个集合被称为逻辑卷。结合驱动器,使其成为一个阵列或称为集合(组)。 +RAID是廉价磁盘冗余阵列,但现在它被称为独立磁盘冗余阵列。早先一个容量很小的磁盘都是非常昂贵的,但是现在我们可以很便宜的买到一个更大的磁盘。Raid 是磁盘的一个集合,被称为逻辑卷。 -创建 RAID 最少应使用2个磁盘被连接组成 RAID 控制器,逻辑卷或多个驱动器可以根据定义的 RAID 级别添加在一个阵列中。不使用物理硬件创建的 RAID 被称为软件 RAID。软件 RAID 一般都是不太有钱的人才使用的。 -![Setup RAID0 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Raid0-in-Linux.jpg) +![RAID in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/RAID.jpg) -在 Linux 中创建 RAID0 +在 Linux 中理解 RAID 的设置 -使用 RAID 的主要目的是为了在单点故障时保存数据,如果我们使用单个磁盘来存储数据,如果它损坏了,那么就没有机会取回我们的数据了,为了防止数据丢失我们需要一个容错的方法。所以,我们可以使用多个磁盘组成 RAID 阵列。 +RAID包含一组或者一个集合甚至一个阵列。使用一组磁盘结合驱动器组成 RAID 阵列或 RAID 集。一个 RAID 控制器至少使用两个磁盘并且使用一个逻辑卷或者多个驱动器在一个组中。在一个磁盘组的应用中只能使用一个 RAID 级别。使用 RAID 可以提高服务器的性能。不同 RAID 的级别,性能会有所不同。它通过容错和高可用性来保存我们的数据。 -#### 在 RAID 0 中条带是什么 #### +这个系列被命名为RAID的构建共包含9个部分包括以下主题。 -条带是通过将数据在同一时间分割到多个磁盘上。假设我们有两个磁盘,如果我们将数据保存到逻辑卷上,它会将数据保存在两个磁盘上。使用 RAID 0 是为了获得更好的性能,但是如果驱动器中一个出现故障,我们将不能得到完整的数据。因此,使用 RAID 0 不是一种好的做法。唯一的解决办法就是安装有 RAID0 逻辑卷的操作系统来提高文件的安全性。 +- 第1部分:RAID的级别和概念的介绍 +- 第2部分:在Linux中如何设置 RAID0(条带化) +- 第3部分:在Linux中如何设置 RAID1(镜像化) +- 第4部分:在Linux中如何设置 RAID5(条带化与分布式奇偶校验) +- 第5部分:在Linux中如何设置 RAID6(条带双分布式奇偶校验) +- 第6部分:在Linux中设置 RAID 10 或1 + 0(嵌套) +- 第7部分:增加现有的 RAID 阵列并删除损坏的磁盘 +- 第8部分:在 RAID 中恢复(重建)损坏的驱动器 +- 第9部分:在 Linux 中管理 RAID -- RAID 0 性能较高。 -- 在 RAID 0 上,空间零浪费。 -- 零容错(如果硬盘中的任何一个发生故障,无法取回数据)。 -- 写和读性能得以提高。 +这是9系列教程的第1部分,在这里我们将介绍 RAID 的概念和 RAID 级别,这是在 Linux 中构建 RAID 需要理解的。 -#### 要求 #### -创建 RAID 0 允许的最小磁盘数目是2个,但你可以添加更多的磁盘,但数目应该是2,4,6,8等的两倍。如果你有一个物理 RAID 卡并且有足够的端口,你可以添加更多磁盘。 +### 软件RAID和硬件RAID ### -在这里,我们没有使用硬件 RAID,此设置只依赖于软件 RAID。如果我们有一个物理硬件 RAID 卡,我们可以从它的 UI 组件访问它。有些主板默认内建 RAID 功能,还可以使用 Ctrl + I 键访问 UI。 +软件 RAID 的性能很低,因为其从主机资源消耗。 RAID 软件需要加载可读取数据从软件 RAID 卷中。在加载 RAID 软件前,操作系统需要得到加载 RAID 软件的引导。在软件 RAID 中无需物理硬件。零成本投资。 -如果你是刚开始设置 RAID,请阅读我们前面的文章,我们已经介绍了一些关于 RAID 基本的概念。 +硬件 RAID 具有很高的性能。他们有专用的 RAID 控制器,采用 PCI Express卡物理内置的。它不会使用主机资源。他们有 NVRAM 缓存读取和写入。当重建时即使出现电源故障,它会使用电池电源备份存储缓存。对于大规模使用需要非常昂贵的投资。 -- [Introduction to RAID and RAID Concepts][1] +硬件 RAID 卡如下所示: -**我的服务器设置** +![Hardware RAID](http://www.tecmint.com/wp-content/uploads/2014/10/Hardware-RAID.jpg) - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.225 - Two Disks : 20 GB each +硬件RAID -这篇文章是9个 RAID 系列教程的第2部分,在这部分,我们将看看如何能够在 Linux 上创建和使用 RAID0(条带化),以名为 sdb 和 sdc 两个20GB的硬盘为例。 +#### 精选的 RAID 概念 #### -### 第1步:更新系统和安装管理 RAID 的 mdadm 软件 ### +- 在 RAID 重建中校验方法中丢失的内容来自从校验中保存的信息。 RAID 5,RAID 6 基于校验。 +- 条带化是随机共享数据到多个磁盘。它不会在单个磁盘中保存完整的数据。如果我们使用3个磁盘,则数据将会存在于每个磁盘上。 +- 镜像被用于 RAID 1 和 RAID 10。镜像会自动备份数据。在 RAID 1,它将保存相同的内容到其他盘上。 +- 在我们的服务器上,热备份只是一个备用驱动器,它可以自动更换发生故障的驱动器。在我们的阵列中,如果任何一个驱动器损坏,热备份驱动器会自动重建。 +- 块是 RAID 控制器每次读写数据时的最小单位,最小4KB。通过定义块大小,我们可以增加 I/O 性能。 -1.在 Linux 上设置 RAID0 前,我们先更新一下系统,然后安装 ‘mdadm’ 包。mdadm 是一个小程序,这将使我们能够在Linux下配置和管理 RAID 设备。 +RAID有不同的级别。在这里,我们仅看到在真实环境下的使用最多的 RAID 级别。 - # yum clean all && yum update - # yum install mdadm -y +- RAID0 = 条带化 +- RAID1 = 镜像 +- RAID5 = 单个磁盘分布式奇偶校验 +- RAID6 = 双盘分布式奇偶校验 +- RAID10 = 镜像 + 条带。(嵌套RAID) -![install mdadm in linux](http://www.tecmint.com/wp-content/uploads/2014/10/install-mdadm-in-linux.png) +RAID 在大多数 Linux 发行版上使用 mdadm 的包管理。让我们先对每个 RAID 级别认识一下。 -安装 mdadm 工具 +#### RAID 0(或)条带化 #### -### 第2步:检测并连接两个 20GB 的硬盘 ### +条带化有很好的性能。在 RAID 0(条带化)中数据将使用共享的方式被写入到磁盘。一半的内容将是在一个磁盘上,另一半内容将被写入到其它磁盘。 -2.在创建 RAID 0 前,请务必确认两个硬盘能被检测到,使用下面的命令确认。 +假设我们有2个磁盘驱动器,例如,如果我们将数据“TECMINT”写到逻辑卷中,“T”将被保存在第一盘中,“E”将保存在第二盘,'C'将被保存在第一盘,“M”将保存在第二盘,它会一直继续此循环过程。 - # ls -l /dev | grep sd +在这种情况下,如果驱动器中的任何一个发生故障,我们将丢失所有的数据,因为一个盘中只有一半的数据,不能用于重建。不过,当比较写入速度和性能时,RAID0 是非常好的。创建 RAID 0(条带化)至少需要2个磁盘。如果你的数据是非常宝贵的,那么不要使用此 RAID 级别。 -![Check Hard Drives in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Hard-Drives.png) +- 高性能。 +- 在 RAID0 上零容量损失。 +- 零容错。 +- 写和读有很高的性能。 -检查硬盘 +#### RAID1(或)镜像化 #### -3.一旦检测到新的硬盘驱动器,同时检查是否连接的驱动器已经被现有的 RAID 使用,使用下面的 ‘mdadm’ 命令来查看。 +镜像也有不错的性能。镜像可以备份我们的数据。假设我们有两组2TB的硬盘驱动器,我们总共有4TB,但在镜像中,驱动器在 RAID 控制器的后面形成一个逻辑驱动器,我们只能看到逻辑驱动器有2TB。 - # mdadm --examine /dev/sd[b-c] +当我们保存数据时,它将同时写入2TB驱动器中。创建 RAID 1 (镜像化)最少需要两个驱动器。如果发生磁盘故障,我们可以恢复 RAID 通过更换一个新的磁盘。如果在 RAID 1 中任何一个磁盘发生故障,我们可以从另一个磁盘中获取相同的数据,因为其他的磁盘中也有相同的数据。所以是零数据丢失。 -![Check RAID Devices in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Drives-using-RAID.png) +- 良好的性能。 +- 空间的一半将在总容量丢失。 +- 完全容错。 +- 重建会更快。 +- 写性能将是缓慢的。 +- 读将会很好。 +- 被操作系统和数据库使用的规模很小。 -检查 RAID 设备 +#### RAID 5(或)分布式奇偶校验 #### -从上面的输出我们可以看到,没有任何 RAID 使用 sdb 和 sdc 这两个驱动器。 +RAID 5 多用于企业的水平。 RAID 5 的工作通过分布式奇偶校验的方法。奇偶校验信息将被用于重建数据。它需要留下的正常驱动器上的信息去重建。驱动器故障时,这会保护我们的数据。 -### 第3步:创建 RAID 分区 ### +假设我们有4个驱动器,如果一个驱动器发生故障而后我们更换发生故障的驱动器后,我们可以从奇偶校验中重建数据到更换的驱动器上。奇偶校验信息存储在所有的4个驱动器上,如果我们有4个 1TB 的驱动器。奇偶校验信息将被存储在每个驱动器的256G中而其它768GB是用户自己使用的。单个驱动器故障后,RAID 5 依旧正常工作,如果驱动器损坏个数超过1个会导致数据的丢失。 -4.现在用 sdb 和 sdc 创建 RAID 的分区,使用 fdisk 命令来创建。在这里,我将展示如何创建 sdb 驱动器上的分区。 +- 性能卓越 +- 读速度将非常好。 +- 如果我们不使用硬件 RAID 控制器,写速度是缓慢的。 +- 从所有驱动器的奇偶校验信息中重建。 +- 完全容错。 +- 1个磁盘空间将用于奇偶校验。 +- 可以被用在文件服务器,Web服务器,非常重要的备份中。 - # fdisk /dev/sdb +#### RAID 6 两个分布式奇偶校验磁盘 #### -请按照以下说明创建分区。 +RAID 6 和 RAID 5 相似但它有两个分布式奇偶校验。大多用在大量的阵列中。我们最少需要4个驱动器,即使有2个驱动器发生故障,我们依然可以重建数据,同时更换新的驱动器。 -- 按 ‘n’ 创建新的分区。 -- 然后按 ‘P’ 选择主分区。 -- 接下来选择分区号为1。 -- 只需按两次回车键选择默认值即可。 -- 然后,按 ‘P’ 来打印创建好的分区。 +它比 RAID 5 非常慢,因为它将数据同时写到4个驱动器上。当我们使用硬件 RAID 控制器时速度将被平均。如果我们有6个的1TB驱动器,4个驱动器将用于数据保存,2个驱动器将用于校验。 -![Create Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Partitions-in-Linux.png) +- 性能不佳。 +- 读的性能很好。 +- 如果我们不使用硬件 RAID 控制器写的性能会很差。 +- 从2奇偶校验驱动器上重建。 +- 完全容错。 +- 2个磁盘空间将用于奇偶校验。 +- 可用于大型阵列。 +- 在备份和视频流中大规模使用。 -创建分区 +#### RAID 10(或)镜像+条带 #### -请按照以下说明将分区创建为 Linux 的 RAID 类型。 +RAID 10 可以被称为1 + 0或0 +1。它将做镜像+条带两个工作。在 RAID 10 中首先做镜像然后做条带。在 RAID 01 上首先做条带,然后做镜像。RAID 10 比 01 好。 -- 按 ‘L’,列出所有可用的类型。 -- 按 ‘t’ 去修改分区。 -- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 -- 然后再次使用‘p’查看我们所做的更改。 -- 使用‘w’保存更改。 +假设,我们有4个驱动器。当我写了一些数据到逻辑卷上,它会使用镜像和条带将数据保存到4个驱动器上。 -![Create RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Partitions.png) +如果我在 RAID 10 上写入数据“TECMINT”,数据将使用如下形式保存。首先将“T”同时写入两个磁盘,“E”也将同时写入两个磁盘,这一步将所有数据都写入。这使数据得到备份。 -在 Linux 上创建 RAID 分区 +同时它将使用 RAID 0 方式写入数据,遵循将“T”写入第一个盘,“E”写入第二个盘。再次将“C”写入第一个盘,“M”到第二个盘。 -**注**: 请使用上述步骤同样在 sdc 驱动器上创建分区。 +- 良好的读写性能。 +- 空间的一半将在总容量丢失。 +- 容错。 +- 从备份数据中快速重建。 +- 它的高性能和高可用性常被用于数据库的存储中。 -5.创建分区后,验证这两个驱动器能使用下面的命令来正确定义 RAID。 +### 结论 ### - # mdadm --examine /dev/sd[b-c] - # mdadm --examine /dev/sd[b-c]1 +在这篇文章中,我们已经看到了什么是 RAID 和在实际环境大多采用 RAID 的哪个级别。希望你已经学会了上面所写的。对于 RAID 的构建必须了解有关 RAID 的基本知识。以上内容对于你了解 RAID 基本满足。 -![Verify RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Partitions.png) - -验证 RAID 分区 - -### 第4步:创建 RAID md 设备 ### - -6.现在使用以下命令创建 md 设备(即 /dev/md0),并选择 RAID 合适的级别。 - - # mdadm -C /dev/md0 -l raid0 -n 2 /dev/sd[b-c]1 - # mdadm --create /dev/md0 --level=stripe --raid-devices=2 /dev/sd[b-c]1 - -- -C – create -- -l – level -- -n – No of raid-devices - -7.一旦 md 设备已经建立,使用如下命令可以查看 RAID 级别,设备和阵列的使用状态。 - - # cat /proc/mdstat - -![Verify RAID Level](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Level.png) - -查看 RAID 级别 - - # mdadm -E /dev/sd[b-c]1 - -![Verify RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Device.png) - -查看 RAID 设备 - - # mdadm --detail /dev/md0 - -![Verify RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Array.png) - -查看 RAID 阵列 - -### 第5步:挂载 RAID 设备到文件系统 ### - -8.将 RAID 设备 /dev/md0 创建为 ext4 文件系统并挂载到 /mnt/raid0 下。 - - # mkfs.ext4 /dev/md0 - -![Create ext4 Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystem.png) - -创建 ext4 文件系统 - -9. ext4 文件系统为 RAID 设备创建好后,现在创建一个挂载点(即 /mnt/raid0),并将设备 /dev/md0 挂载在它下。 - - # mkdir /mnt/raid0 - # mount /dev/md0 /mnt/raid0/ - -10.下一步,使用 df 命令验证设备 /dev/md0 是否被挂载在 /mnt/raid0 下。 - - # df -h - -11.接下来,创建一个名为 ‘tecmint.txt’ 的文件挂载到 /mnt/raid0 下,为创建的文件添加一些内容,并查看文件和目录的内容。 - - # touch /mnt/raid0/tecmint.txt - # echo "Hi everyone how you doing ?" > /mnt/raid0/tecmint.txt - # cat /mnt/raid0/tecmint.txt - # ls -l /mnt/raid0/ - -![Verify Mount Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Mount-Device.png) - -验证挂载的设备 - -12.一旦你验证挂载点后,同时将它添加到 /etc/fstab 文件中。 - - # vim /etc/fstab - -添加以下条目,根据你的安装位置和使用文件系统的不同,自行做修改。 - - /dev/md0 /mnt/raid0 ext4 deaults 0 0 - -![Add Device to Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Add-Device-to-Fstab.png) - -添加设备到 fstab 文件中 - -13.使用 mount ‘-a‘ 来检查 fstab 的条目是否有误。 - - # mount -av - -![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-Fstab.png) - -检查 fstab 文件是否有误 - -### 第6步:保存 RAID 配置 ### - -14.最后,保存 RAID 配置到一个文件中,以供将来使用。同样,我们使用 ‘mdadm’ 命令带有 ‘-s‘ (scan) 和 ‘-v‘ (verbose) 选项,如图所示。 - - # mdadm -E -s -v >> /etc/mdadm.conf - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - # cat /etc/mdadm.conf - -![Save RAID Configurations](http://www.tecmint.com/wp-content/uploads/2014/10/Save-RAID-Configurations.png) - -保存 RAID 配置 - -就这样,我们在这里看到,如何通过使用两个硬盘配置具有条带化的 RAID0 级别。在接下来的文章中,我们将看到如何设置 RAID5。 +在接下来的文章中,我将介绍如何设置和使用各种级别创建 RAID,增加 RAID 组(阵列)和驱动器故障排除等。 -------------------------------------------------------------------------------- -via: http://www.tecmint.com/create-raid0-in-linux/ +via: http://www.tecmint.com/understanding-raid-setup-in-linux/ 作者:[Babin Lonston][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) @@ -215,4 +144,3 @@ via: http://www.tecmint.com/create-raid0-in-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ From 958d434bed7380f898c012761a351780b273d9bd Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 2 Aug 2015 16:18:07 +0800 Subject: [PATCH 1566/2517] =?UTF-8?q?Create=20Creating=20Software=20RAID0?= =?UTF-8?q?=20(Stripe)=20on=20=E2=80=98Two=20Devices=E2=80=99=20Using=20?= =?UTF-8?q?=E2=80=98mdadm=E2=80=99=20Tool=20in=20Linux=20=E2=80=93=20Part?= =?UTF-8?q?=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...evices’ Using ‘mdadm’ Tool in Linux – Part 2 | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2 diff --git a/translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2 b/translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2 new file mode 100644 index 0000000000..9feba99609 --- /dev/null +++ b/translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2 @@ -0,0 +1,218 @@ +在 Linux 上使用 ‘mdadm’ 工具创建软件 RAID0 (条带化)在 ‘两个设备’ 上 - 第2部分 +================================================================================ +RAID 是廉价磁盘的冗余阵列,其高可用性和可靠性适用于大规模环境中,为了使数据被保护而不是被正常使用。RAID 只是磁盘的一个集合被称为逻辑卷。结合驱动器,使其成为一个阵列或称为集合(组)。 + +创建 RAID 最少应使用2个磁盘被连接组成 RAID 控制器,逻辑卷或多个驱动器可以根据定义的 RAID 级别添加在一个阵列中。不使用物理硬件创建的 RAID 被称为软件 RAID。软件 RAID 一般都是不太有钱的人才使用的。 + +![Setup RAID0 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Raid0-in-Linux.jpg) + +在 Linux 中创建 RAID0 + +使用 RAID 的主要目的是为了在单点故障时保存数据,如果我们使用单个磁盘来存储数据,如果它损坏了,那么就没有机会取回我们的数据了,为了防止数据丢失我们需要一个容错的方法。所以,我们可以使用多个磁盘组成 RAID 阵列。 + +#### 在 RAID 0 中条带是什么 #### + +条带是通过将数据在同一时间分割到多个磁盘上。假设我们有两个磁盘,如果我们将数据保存到逻辑卷上,它会将数据保存在两个磁盘上。使用 RAID 0 是为了获得更好的性能,但是如果驱动器中一个出现故障,我们将不能得到完整的数据。因此,使用 RAID 0 不是一种好的做法。唯一的解决办法就是安装有 RAID0 逻辑卷的操作系统来提高文件的安全性。 + +- RAID 0 性能较高。 +- 在 RAID 0 上,空间零浪费。 +- 零容错(如果硬盘中的任何一个发生故障,无法取回数据)。 +- 写和读性能得以提高。 + +#### 要求 #### + +创建 RAID 0 允许的最小磁盘数目是2个,但你可以添加更多的磁盘,但数目应该是2,4,6,8等的两倍。如果你有一个物理 RAID 卡并且有足够的端口,你可以添加更多磁盘。 + +在这里,我们没有使用硬件 RAID,此设置只依赖于软件 RAID。如果我们有一个物理硬件 RAID 卡,我们可以从它的 UI 组件访问它。有些主板默认内建 RAID 功能,还可以使用 Ctrl + I 键访问 UI。 + +如果你是刚开始设置 RAID,请阅读我们前面的文章,我们已经介绍了一些关于 RAID 基本的概念。 + +- [Introduction to RAID and RAID Concepts][1] + +**我的服务器设置** + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.225 + Two Disks : 20 GB each + +这篇文章是9个 RAID 系列教程的第2部分,在这部分,我们将看看如何能够在 Linux 上创建和使用 RAID0(条带化),以名为 sdb 和 sdc 两个20GB的硬盘为例。 + +### 第1步:更新系统和安装管理 RAID 的 mdadm 软件 ### + +1.在 Linux 上设置 RAID0 前,我们先更新一下系统,然后安装 ‘mdadm’ 包。mdadm 是一个小程序,这将使我们能够在Linux下配置和管理 RAID 设备。 + + # yum clean all && yum update + # yum install mdadm -y + +![install mdadm in linux](http://www.tecmint.com/wp-content/uploads/2014/10/install-mdadm-in-linux.png) + +安装 mdadm 工具 + +### 第2步:检测并连接两个 20GB 的硬盘 ### + +2.在创建 RAID 0 前,请务必确认两个硬盘能被检测到,使用下面的命令确认。 + + # ls -l /dev | grep sd + +![Check Hard Drives in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Hard-Drives.png) + +检查硬盘 + +3.一旦检测到新的硬盘驱动器,同时检查是否连接的驱动器已经被现有的 RAID 使用,使用下面的 ‘mdadm’ 命令来查看。 + + # mdadm --examine /dev/sd[b-c] + +![Check RAID Devices in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Drives-using-RAID.png) + +检查 RAID 设备 + +从上面的输出我们可以看到,没有任何 RAID 使用 sdb 和 sdc 这两个驱动器。 + +### 第3步:创建 RAID 分区 ### + +4.现在用 sdb 和 sdc 创建 RAID 的分区,使用 fdisk 命令来创建。在这里,我将展示如何创建 sdb 驱动器上的分区。 + + # fdisk /dev/sdb + +请按照以下说明创建分区。 + +- 按 ‘n’ 创建新的分区。 +- 然后按 ‘P’ 选择主分区。 +- 接下来选择分区号为1。 +- 只需按两次回车键选择默认值即可。 +- 然后,按 ‘P’ 来打印创建好的分区。 + +![Create Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Partitions-in-Linux.png) + +创建分区 + +请按照以下说明将分区创建为 Linux 的 RAID 类型。 + +- 按 ‘L’,列出所有可用的类型。 +- 按 ‘t’ 去修改分区。 +- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 +- 然后再次使用‘p’查看我们所做的更改。 +- 使用‘w’保存更改。 + +![Create RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Partitions.png) + +在 Linux 上创建 RAID 分区 + +**注**: 请使用上述步骤同样在 sdc 驱动器上创建分区。 + +5.创建分区后,验证这两个驱动器能使用下面的命令来正确定义 RAID。 + + # mdadm --examine /dev/sd[b-c] + # mdadm --examine /dev/sd[b-c]1 + +![Verify RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Partitions.png) + +验证 RAID 分区 + +### 第4步:创建 RAID md 设备 ### + +6.现在使用以下命令创建 md 设备(即 /dev/md0),并选择 RAID 合适的级别。 + + # mdadm -C /dev/md0 -l raid0 -n 2 /dev/sd[b-c]1 + # mdadm --create /dev/md0 --level=stripe --raid-devices=2 /dev/sd[b-c]1 + +- -C – create +- -l – level +- -n – No of raid-devices + +7.一旦 md 设备已经建立,使用如下命令可以查看 RAID 级别,设备和阵列的使用状态。 + + # cat /proc/mdstat + +![Verify RAID Level](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Level.png) + +查看 RAID 级别 + + # mdadm -E /dev/sd[b-c]1 + +![Verify RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Device.png) + +查看 RAID 设备 + + # mdadm --detail /dev/md0 + +![Verify RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Array.png) + +查看 RAID 阵列 + +### 第5步:挂载 RAID 设备到文件系统 ### + +8.将 RAID 设备 /dev/md0 创建为 ext4 文件系统并挂载到 /mnt/raid0 下。 + + # mkfs.ext4 /dev/md0 + +![Create ext4 Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystem.png) + +创建 ext4 文件系统 + +9. ext4 文件系统为 RAID 设备创建好后,现在创建一个挂载点(即 /mnt/raid0),并将设备 /dev/md0 挂载在它下。 + + # mkdir /mnt/raid0 + # mount /dev/md0 /mnt/raid0/ + +10.下一步,使用 df 命令验证设备 /dev/md0 是否被挂载在 /mnt/raid0 下。 + + # df -h + +11.接下来,创建一个名为 ‘tecmint.txt’ 的文件挂载到 /mnt/raid0 下,为创建的文件添加一些内容,并查看文件和目录的内容。 + + # touch /mnt/raid0/tecmint.txt + # echo "Hi everyone how you doing ?" > /mnt/raid0/tecmint.txt + # cat /mnt/raid0/tecmint.txt + # ls -l /mnt/raid0/ + +![Verify Mount Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Mount-Device.png) + +验证挂载的设备 + +12.一旦你验证挂载点后,同时将它添加到 /etc/fstab 文件中。 + + # vim /etc/fstab + +添加以下条目,根据你的安装位置和使用文件系统的不同,自行做修改。 + + /dev/md0 /mnt/raid0 ext4 deaults 0 0 + +![Add Device to Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Add-Device-to-Fstab.png) + +添加设备到 fstab 文件中 + +13.使用 mount ‘-a‘ 来检查 fstab 的条目是否有误。 + + # mount -av + +![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-Fstab.png) + +检查 fstab 文件是否有误 + +### 第6步:保存 RAID 配置 ### + +14.最后,保存 RAID 配置到一个文件中,以供将来使用。同样,我们使用 ‘mdadm’ 命令带有 ‘-s‘ (scan) 和 ‘-v‘ (verbose) 选项,如图所示。 + + # mdadm -E -s -v >> /etc/mdadm.conf + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + # cat /etc/mdadm.conf + +![Save RAID Configurations](http://www.tecmint.com/wp-content/uploads/2014/10/Save-RAID-Configurations.png) + +保存 RAID 配置 + +就这样,我们在这里看到,如何通过使用两个硬盘配置具有条带化的 RAID0 级别。在接下来的文章中,我们将看到如何设置 RAID5。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid0-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ From 6a03d892dc65eba50a5390d41dc88241690b109b Mon Sep 17 00:00:00 2001 From: XLCYun Date: Sun, 2 Aug 2015 19:39:53 +0800 Subject: [PATCH 1567/2517] Delete 20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md --- ...t Right & Wrong - Page 1 - Introduction.md | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md diff --git a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md deleted file mode 100644 index 43735170c3..0000000000 --- a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md +++ /dev/null @@ -1,55 +0,0 @@ -Translating by XLCYun. -A Week With GNOME As My Linux Desktop: What They Get Right & Wrong - Page 1 - Introduction -================================================================================ -*Author's Note: If by some miracle you managed to click this article without reading the title then I want to re-iterate something... This is an editorial. These are my opinions. They are not representative of Phoronix, or Michael, these are my own thoughts.* - -Additionally, yes... This is quite possibly a flame-bait article. I hope the community is better than that, because I do want to start a discussion and give feedback to both the KDE and Gnome communities. For that reason when I point out, what I see as, a flaw I will try to be specific and direct so that any discussion can be equally specific and direct. For the record: The alternative title for this article was "Death By A Thousand [Paper Cuts][1]". - -Now, with that out of the way... Onto the article. - -![](http://www.phoronix.net/image.php?id=fedora-22-fan&image=fedora_22_good1_show&w=1920) - -When I sent the [Fedora 22 KDE Review][2] off to Michael I did it with a bit of a bad taste in my mouth. It wasn't because I didn't like KDE, or hadn't been enjoying Fedora, far from it. In fact, I started to transition my T450s over to Arch Linux but quickly decided against that, as I enjoyed the level of convenience that Fedora brings to me for many things. - -The reason I had a bad taste in my mouth was because the Fedora developers put a lot of time and effort into their "Workstation" product and I wasn't seeing any of it. I wasn't using Fedora the way the main developers had intended it to be used and therefore wasn't getting the "Fedora Experience." It felt like someone reviewing Ubuntu by using Kubuntu, using a Hackintosh to review OS X, or reviewing Gentoo by using Sabayon. A lot of readers in the forums bash on Michael for reviewing distributions in their default configurations-- myself included. While I still do believe that reviews should be done under 'real-world' configurations, I do see the value in reviewing something in the condition it was given to you-- for better or worse. - -It was with that attitude in mind that I decided to take a dip in the Gnome pool. - -I do, however, need to add one more disclaimer... I am looking at KDE and Gnome as they are packaged in Fedora. OpenSUSE, Kubuntu, Arch, etc, might all have different implementations of each desktop that will change whether my specific 'pain points' are relevant to your distribution. Furthermore, despite the title, this is going to be a VERY KDE heavy article. I called the article what I did because it was actually USING Gnome that made me realize how many "paper cuts" KDE actually has. - -### Login Screen ### - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login1_show&w=1920) - -I normally don't mind Distributions shipping distro-specific themes, because most of them make the desktop look nicer. I finally found my exception. - -First impression's count for a lot, right? Well, GDM definitely gets this one right. The login screen is incredibly clean with consistent design language through every single part of it. The use of common-language icons instead of text boxes helps in that regard. - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login2_show&w=1920) - -That is not to say that the Fedora 22 KDE login screen-- now SDDM rather than KDM-- looks 'bad' per say but its definitely more jarring. - -Where's the fault? The top bar. Look at the Gnome screenshot-- you select a user and you get a tiny little gear simple for selecting what session you want to log into. The design is clean, it gets out of your way, you could honestly miss it completely if you weren't paying attention. Now look at the blue KDE screenshot, the bar doesn't look it was even rendered using the same widgets, and its entire placement feels like an after thought of "Well shit, we need to throw this option somewhere..." - -The same can be said for the Reboot and Shutdown options in the top right. Why not just a power button that creates a drop down menu that has a drop down for Reboot, Shutdown, Suspend? Having the buttons be different colors than the background certainly makes them stick out and be noticeable... but I don't think in a good way. Again, they feel like an after thought. - -GDM is also far more useful from a practical standpoint, look again along the top row. The time is listed, there's a volume control so that if you are trying to be quiet you can mute all sounds before you even login, there's an accessibility button for things like high contrast, zooming, test to speech, etc, all available via simple toggle buttons. - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login3_show&w=1920) - -Swap it to upstream's Breeze theme and... suddenly most of my complaints are fixed. Common-language icons, everything is in the center of the screen, but the less important stuff is off to the sides. This creates a nice harmony between the top and bottom of the screen since they are equally empty. You still have a text box for the session switcher, but I can forgive that since the power buttons are now common language icons. Current time is available which is a nice touch, as is a battery life indicator. Sure gnome still has a few nice additions, such as the volume applet and the accessibility buttons, but Breeze is a step up from Fedora's KDE theme. - -Go to Windows (pre-Windows 8 & 10...) or OS X and you will see similar things – very clean, get-out-of-your-way lock screens and login screens that are devoid of text boxes or other widgets that distract the eye. It's a design that works and that is non-distracting. Fedora... Ship Breeze by default. VDG got the design of the Breeze theme right. Don't mess it up. - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=1 - -作者:Eric Griffith -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://wiki.ubuntu.com/One%20Hundred%20Papercuts -[2]:http://www.phoronix.com/scan.php?page=article&item=fedora-22-kde&num=1 From b2d7ab2ba05d746334150505746e8c43bbe4f3a8 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Sun, 2 Aug 2015 19:40:51 +0800 Subject: [PATCH 1568/2517] =?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 XLCYun 翻译完成 --- ...t Right & Wrong - Page 1 - Introduction.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md new file mode 100644 index 0000000000..de47f0864e --- /dev/null +++ b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md @@ -0,0 +1,55 @@ +将GNOME作为我的Linux桌面的一周: 他们做对的与做错的 - 第一节 - 简介 +================================================================================ +*作者声明: 如果你是因为某种神迹而在没看标题的情况下点开了这篇文章,那么我想再重申一些东西...这是一篇评论文章。文中的观点都是我自己的,不代表Phoronix和Michael的观点。它们完全是我自己的想法。 + +另外,没错……这可能是一篇引战的文章。我希望社团成员们更沉稳一些,因为我确实想在KDE和Gnome的社团上发起讨论,反馈。因此当我想指出——我所看到的——一个瑕疵时,我会尽量地做到具体而直接。这样,相关的讨论也能做到同样的具体和直接。再次声明:本文另一可选标题为“被[剪纸][1]千刀万剐”(原文剪纸一词为papercuts, 指易修复而烦人的漏洞,译者注)。 + +现在,重申完毕……文章开始。 + +![](http://www.phoronix.net/image.php?id=fedora-22-fan&image=fedora_22_good1_show&w=1920) + +当我把[《评价Fedora 22 KDE》][2]一文发给Michael时,感觉很不是滋味。不是因为我不喜欢KDE,或者不享受Fedora,远非如此。事实上,我刚开始想把我的T450s的系统换为Arch Linux时,马上又决定放弃了,因为我很享受fedora在很多方面所带来的便捷性。 + +我感觉很不是滋味的原因是Fedora的开发者花费了大量的时间和精力在他们的“工作站”产品上,但是我却一点也没看到。在使用Fedora时,我采用的并非那些主要开发者希望用户采用的那种使用方式,因此我也就体验不到所谓的“Fedora体验”。它感觉就像一个人评价Ubuntu时用的却是Kubuntu,评价OS X时用的却是Hackintosh,或者评价Gentoo时用的却是Sabayon。根据大量Michael论坛的读者的说法,它们在评价各种发行版时使用的都是默认设置的发行版——我也不例外。但是我还是认为这些评价应该在“真实”配置下完成,当然我也知道在给定的情况下评论某些东西也的确是有价值的——无论是好是坏。 + +正是在怀着这种态度的情况下,我决定到Gnome这个水坑里来泡泡澡。 + +但是,我还要在此多加一个声明……我在这里所看到的KDE和Gnome都是打包在Fedora中的。OpenSUSE, Kubuntu, Arch等发行版的各个桌面可能有不同的实现方法,使得我这里所说的具体的“痛处”跟你所用的发行版有所不同。还有,虽然用了这个标题,但这篇文章将会是一篇很沉重的非常“KDE”的文章。之所以这样称呼这篇文章,是因为我在使用了Gnome之后,才知道KDE的“剪纸”到底有多多。 + +### 登录界面 ### + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login1_show&w=1920) + +我一般情况下都不会介意发行版装载它们自己的特别主题,因为一般情况下桌面看起来会更好看。可我今天可算是找到了一个例外。 + +第一印象很重要,对吧?那么,GDM(Gnome Display Manage:Gnome显示管理器,译者注,下同。)决对干得漂亮。它的登录界面看起来极度简洁,每一部分都应用了一致的设计风格。使用通用图标而不是输入框为它的简洁加了分。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login2_show&w=1920) + +这并不是说Fedora 22 KDE——现在已经是SDDM而不是KDM了——的登录界面不好看,但是看起来决对没有它这样和谐。 + +问题到底出来在哪?顶部栏。看看Gnome的截图——你选择一个用户,然后用一个很小的齿轮简单地选择想登入哪个会话。设计很简洁,它不挡着你的道儿,实话讲,如果你没注意的话可能完全会看不到它。现在看看那蓝色( blue,有忧郁之意,一语双关,译者注)的KDE截图,顶部栏看起来甚至不像是用同一个工具渲染出来的,它的整个位置的安排好像是某人想着:“哎哟妈呀,我们需要把这个选项扔在哪个地方……”之后决定下来的。 + +对于右上角的重启和关机选项也一样。为什么不单单用一个电源按钮,点击后会下拉出一个菜单,里面包括重启,关机,挂起的功能?按钮的颜色跟背景色不同肯定会让它更加突兀和显眼……但我可不觉得这样子有多好。同样,这看起来可真像“苦思”后的决定。 + +从实用观点来看,GDM还要远远实用的多,再看看顶部一栏。时间被列了出来,还有一个音量控制按钮,如果你想保持周围安静,你甚至可以在登录前设置静音,还有一个可用的按钮来实现高对比度,缩放,语音转文字等功能,所有可用的功能通过简单的一个开关按钮就能得到。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login3_show&w=1920) + +切换到上流的Breeve主题……突然间,我抱怨的大部分问题都被完善了。通用图标,所有东西都放在了屏幕中央,但不是那么重要的被放到了一边。因为屏幕顶部和底部都是同样的空白,在中间也就酝酿出了一种美好的和谐。还是有一个输入框来切换会话,但既然电源按钮被做成了通用图标,那么这点还算可以原谅。当然gnome还是有一些很好的附加物,例如音量小程序和可访问按钮,但Breeze总归是Fedora的KDE主题的一个进步。 + +到Windows(Windows 8和10之前)或者OS X中去,你会看到类似的东西——非常简洁的,“不挡你道”的锁屏与登录界面,它们都没有输入框或者其它分散视觉的小工具。这是一种有效的不分散人注意力的设计。Fedora……默认装有Breeze。VDG在Breeze主题设计上干得不错。可别糟蹋了它。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=1 + +作者:Eric Griffith +译者:[XLCYun](https://github.com/XLCYun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://wiki.ubuntu.com/One%20Hundred%20Papercuts +[2]:http://www.phoronix.com/scan.php?page=article&item=fedora-22-kde&num=1 +[3]:https://launchpad.net/hundredpapercuts From 5426b4cc3c2b5f0acb6550d8a6ae1cb0686537dc Mon Sep 17 00:00:00 2001 From: martin qi Date: Sun, 2 Aug 2015 21:04:30 +0800 Subject: [PATCH 1569/2517] Delete 20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md --- ...ring and filtering in Quagga BGP router.md | 260 ------------------ 1 file changed, 260 deletions(-) delete mode 100644 sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md diff --git a/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md b/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md deleted file mode 100644 index 033e03be35..0000000000 --- a/sources/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md +++ /dev/null @@ -1,260 +0,0 @@ -translating... - -How to set up IPv6 BGP peering and filtering in Quagga BGP router -================================================================================ -In the previous tutorials, we demonstrated how we can set up a [full-fledged BGP router][1] and configure [prefix filtering][2] with Quagga. In this tutorial, we are going to show you how we can set up IPv6 BGP peering and advertise IPv6 prefixes through BGP. We will also demonstrate how we can filter IPv6 prefixes advertised or received by using prefix-list and route-map features. - -### Topology ### - -For this tutorial, we will be considering the following topology. - -![](https://farm9.staticflickr.com/8599/15944659374_1c65852df2_c.jpg) - -Service providers A and B want to establish an IPv6 BGP peering between them. Their IPv6 and AS information is as follows. - -- Peering IP block: 2001:DB8:3::/64 -- Service provider A: AS 100, 2001:DB8:1::/48 -- Service provider B: AS 200, 2001:DB8:2::/48 - -### Installing Quagga on CentOS/RHEL ### - -If Quagga has not already been installed, we can install it using yum. - - # yum install quagga - -On CentOS/RHEL 7, the default SELinux policy, which prevents /usr/sbin/zebra from writing to its configuration directory, can interfere with the setup procedure we are going to describe. Thus we want to disable this policy as follows. Skip this step if you are using CentOS/RHEL 6. - - # setsebool -P zebra_write_config 1 - -### Creating Configuration Files ### - -After installation, we start the configuration process by creating the zebra/bgpd configuration files. - - # cp /usr/share/doc/quagga-XXXXX/zebra.conf.sample /etc/quagga/zebra.conf - # cp /usr/share/doc/quagga-XXXXX/bgpd.conf.sample /etc/quagga/bgpd.conf - -Next, enable auto-start of these services. - -**On CentOS/RHEL 6:** - - # service zebra start; service bgpd start - # chkconfig zebra on; chkconfig bgpd on - -**On CentOS/RHEL 7:** - - # systemctl start zebra; systemctl start bgpd - # systemctl enable zebra; systmectl enable bgpd - -Quagga provides a built-in shell called vtysh, whose interface is similar to those of major router vendors such as Cisco or Juniper. Launch vtysh command shell: - - # vtysh - -The prompt will be changed to: - - router-a# - -or - - router-b# - -In the rest of the tutorials, these prompts indicate that you are inside vtysh shell of either router. - -### Specifying Log File for Zebra ### - -Let's configure the log file for Zebra, which will be helpful for debugging. - -First, enter the global configuration mode by typing: - - router-a# configure terminal - -The prompt will be changed to: - - router-a(config)# - -Now specify log file location. Then exit the configuration mode: - - router-a(config)# log file /var/log/quagga/quagga.log - router-a(config)# exit - -Save configuration permanently by: - - router-a# write - -### Configuring Interface IP Addresses ### - -Let's now configure the IP addresses for Quagga's physical interfaces. - -First, we check the available interfaces from inside vtysh. - - router-a# show interfaces - ----------- - - Interface eth0 is up, line protocol detection is disabled - ## OUTPUT TRUNCATED ### - Interface eth1 is up, line protocol detection is disabled - ## OUTPUT TRUNCATED ## - -Now we assign necessary IPv6 addresses. - - router-a# conf terminal - router-a(config)# interface eth0 - router-a(config-if)# ipv6 address 2001:db8:3::1/64 - router-a(config-if)# interface eth1 - router-a(config-if)# ipv6 address 2001:db8:1::1/64 - -We use the same method to assign IPv6 addresses to router-B. I am summarizing the configuration below. - - router-b# show running-config - ----------- - - interface eth0 - ipv6 address 2001:db8:3::2/64 - - interface eth1 - ipv6 address 2001:db8:2::1/64 - -Since the eth0 interface of both routers are in the same subnet, i.e., 2001:DB8:3::/64, you should be able to ping from one router to another. Make sure that you can ping successfully before moving on to the next step. - - router-a# ping ipv6 2001:db8:3::2 - ----------- - - PING 2001:db8:3::2(2001:db8:3::2) 56 data bytes - 64 bytes from 2001:db8:3::2: icmp_seq=1 ttl=64 time=3.20 ms - 64 bytes from 2001:db8:3::2: icmp_seq=2 ttl=64 time=1.05 ms - -### Phase 1: IPv6 BGP Peering ### - -In this section, we will configure IPv6 BGP between the two routers. We start by specifying BGP neighbors in router-A. - - router-a# conf t - router-a(config)# router bgp 100 - router-a(config-router)# no auto-summary - router-a(config-router)# no synchronization - router-a(config-router)# neighbor 2001:DB8:3::2 remote-as 200 - -Next, we define the address family for IPv6. Within the address family section, we will define the network to be advertised, and activate the neighbors as well. - - router-a(config-router)# address-family ipv6 - router-a(config-router-af)# network 2001:DB8:1::/48 - router-a(config-router-af)# neighbor 2001:DB8:3::2 activate - -We will go through the same configuration for router-B. I'm providing the summary of the configuration. - - router-b# conf t - router-b(config)# router bgp 200 - router-b(config-router)# no auto-summary - router-b(config-router)# no synchronization - router-b(config-router)# neighbor 2001:DB8:3::1 remote-as 100 - router-b(config-router)# address-family ipv6 - router-b(config-router-af)# network 2001:DB8:2::/48 - router-b(config-router-af)# neighbor 2001:DB8:3::1 activate - -If all goes well, an IPv6 BGP session should be up between the two routers. If not already done, please make sure that necessary ports (TCP 179) are [open in your firewall][3]. - -We can check IPv6 BGP session information using the following commands. - -**For BGP summary:** - - router-a# show bgp ipv6 unicast summary - -**For BGP advertised routes:** - - router-a# show bgp ipv6 neighbors advertised-routes - -**For BGP received routes:** - - router-a# show bgp ipv6 neighbors routes - -![](https://farm8.staticflickr.com/7317/16379555088_6e29cb6884_b.jpg) - -### Phase 2: Filtering IPv6 Prefixes ### - -As we can see from the above output, the routers are advertising their full /48 IPv6 prefix. For demonstration purposes, we will consider the following requirements. - -- Router-B will advertise one /64 prefix, one /56 prefix, as well as one full /48 prefix. -- Router-A will accept any IPv6 prefix owned by service provider B, which has a netmask length between /56 and /64. - -We are going to filter the prefix as required, using prefix-list and route-map in router-A. - -![](https://farm8.staticflickr.com/7367/16381297417_6549218289_c.jpg) - -#### Modifying prefix advertisement for Router-B #### - -Currently, router-B is advertising only one /48 prefix. We will modify router-B's BGP configuration so that it advertises additional /56 and /64 prefixes as well. - - router-b# conf t - router-b(config)# router bgp 200 - router-b(config-router)# address-family ipv6 - router-b(config-router-af)# network 2001:DB8:2::/56 - router-b(config-router-af)# network 2001:DB8:2::/64 - -We will verify that all prefixes are received at router-A. - -![](https://farm9.staticflickr.com/8598/16379761980_7c083ae977_b.jpg) - -Great! As we are receiving all prefixes in router-A, we will move forward and create prefix-list and route-map entries to filter these prefixes. - -#### Creating Prefix-List #### - -As described in the [previous tutorial][4], prefix-list is a mechanism that is used to match an IP address prefix with a subnet length. Once a matched prefix is found, we can apply filtering or other actions to the matched prefix. To meet our requirements, we will go ahead and create a necessary prefix-list entry in router-A. - - router-a# conf t - router-a(config)# ipv6 prefix-list FILTER-IPV6-PRFX permit 2001:DB8:2::/56 le 64 - -The above commands will create a prefix-list entry named 'FILTER-IPV6-PRFX' which will match any prefix in the 2001:DB8:2:: pool with a netmask between 56 and 64. - -#### Creating and Applying Route-Map #### - -Now that the prefix-list entry is created, we will create a corresponding route-map rule which uses the prefix-list entry. - - router-a# conf t - router-a(config)# route-map FILTER-IPV6-RMAP permit 10 - router-a(config-route-map)# match ipv6 address prefix-list FILTER-IPV6-PRFX - -The above commands will create a route-map rule named 'FILTER-IPV6-RMAP'. This rule will permit IPv6 addresses matched by the prefix-list 'FILTER-IPV6-PRFX' that we have created earlier. - -Remember that a route-map rule is only effective when it is applied to a neighbor or an interface in a certain direction. We will apply the route-map in the BGP neighbor configuration. As the filter is meant for inbound prefixes, we apply the route-map in the inbound direction. - - router-a# conf t - router-a(config)# router bgp 100 - router-a(config-router)# address-family ipv6 - router-a(config-router-af)# neighbor 2001:DB8:3::2 route-map FILTER-IPV6-RMAP in - -Now when we check the routes received at router-A, we should see only two prefixes that are allowed. - -![](https://farm8.staticflickr.com/7337/16379762020_ec2dc39b31_c.jpg) - -**Note**: You may need to reset the BGP session for the route-map to take effect. - -All IPv6 BGP sessions can be restarted using the following command: - - router-a# clear bgp ipv6 * - -I am summarizing the configuration of both routers so you get a clear picture at a glance. - -![](https://farm9.staticflickr.com/8672/16567240165_eee4398dc8_c.jpg) - -### Summary ### - -To sum up, this tutorial focused on how to set up BGP peering and filtering using IPv6. We showed how to advertise IPv6 prefixes to a neighboring BGP router, and how to filter the prefixes advertised or received are advertised. Note that the process described in this tutorial may affect production networks of a service provider, so please use caution. - -Hope this helps. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/ipv6-bgp-peering-filtering-quagga-bgp-router.html - -作者:[Sarmed Rahman][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/centos-bgp-router-quagga.html -[2]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html -[3]:http://ask.xmodulo.com/open-port-firewall-centos-rhel.html -[4]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html From 28454501d7beafe8c0a622740e71ce7b160df929 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sun, 2 Aug 2015 21:05:08 +0800 Subject: [PATCH 1570/2517] Create 20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md --- ...ring and filtering in Quagga BGP router.md | 258 ++++++++++++++++++ 1 file changed, 258 insertions(+) create mode 100644 translated/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md diff --git a/translated/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md b/translated/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md new file mode 100644 index 0000000000..23e2314576 --- /dev/null +++ b/translated/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md @@ -0,0 +1,258 @@ +如何设置在Quagga BGP路由器中设置IPv6的BGP对等体和过滤 +================================================================================ +在之前的教程中,我们演示了如何使用Quagga建立一个[完备的BGP路由器][1]和配置[前缀过滤][2]。在本教程中,我们会向你演示如何创建IPv6 BGP对等体并通过BGP通告IPv6前缀。同时我们也将演示如何使用前缀列表和路由映射特性来过滤通告的或者获取到的IPv6前缀。 + +### 拓扑 ### + +教程中,我们主要参考如下拓扑。 + +![](https://farm9.staticflickr.com/8599/15944659374_1c65852df2_c.jpg) + +服务供应商A和B希望在他们之间建立一个IPv6的BGP对等体。他们的IPv6地址和AS信息如下所示。 + +- 对等体IP块: 2001:DB8:3::/64 +- 供应商A: AS 100, 2001:DB8:1::/48 +- 供应商B: AS 200, 2001:DB8:2::/48 + +### CentOS/RHEL安装Quagga ### + +如果Quagga还没有安装,我们可以先使用yum安装。 + + # yum install quagga + +在CentOS/RHEL 7,SELinux策略会默认的阻止对于/usr/sbin/zebra配置目录的写操作,这会对我们将要介绍的安装操作有所影响。因此我们需要像下面这样关闭这个策略。如果你使用的是CentOS/RHEL 6可以跳过这一步。 + + # setsebool -P zebra_write_config 1 + +### 创建配置文件 ### + +在安装过后,我们先创建配置文件zebra/bgpd作为配置流程的开始。 + + # cp /usr/share/doc/quagga-XXXXX/zebra.conf.sample /etc/quagga/zebra.conf + # cp /usr/share/doc/quagga-XXXXX/bgpd.conf.sample /etc/quagga/bgpd.conf + +然后,允许这些服务开机自启。 + +**在 CentOS/RHEL 6:** + + # service zebra start; service bgpd start + # chkconfig zebra on; chkconfig bgpd on + +**在 CentOS/RHEL 7:** + + # systemctl start zebra; systemctl start bgpd + # systemctl enable zebra; systmectl enable bgpd + +Quagga内部提供一个叫作vtysh的shell,其界面与那些主流路由厂商Cisco或Juniper十分相似。启动vtysh shell命令行: + + # vtysh + +提示将改为: + + router-a# + +或 + + router-b# + +在教程的其余部分,这个提示可以表明你正身处在哪个路由的vtysh shell中。 + +### 为Zebra指定日志文件 ### + +来为Zebra配置日志文件,这会有助于调试。 + +首先,进入全局配置模式通过输入: + + router-a# configure terminal + +提示将变更成: + + router-a(config)# + +指定日志文件的位置。然后退出配置模式: + + router-a(config)# log file /var/log/quagga/quagga.log + router-a(config)# exit + +保存配置通过: + + router-a# write + +### 配置接口IP地址 ### + +现在,让我们为Quagga的物理接口配置IP地址。 + +首先,查看一下vtysh中现有的接口。 + + router-a# show interfaces + +---------- + + Interface eth0 is up, line protocol detection is disabled + ## OUTPUT TRUNCATED ### + Interface eth1 is up, line protocol detection is disabled + ## OUTPUT TRUNCATED ## + +现在我们配置IPv6地址。 + + router-a# conf terminal + router-a(config)# interface eth0 + router-a(config-if)# ipv6 address 2001:db8:3::1/64 + router-a(config-if)# interface eth1 + router-a(config-if)# ipv6 address 2001:db8:1::1/64 + +在路由B上采用同样的方式分配IPv6地址。我将配置汇总成如下。 + + router-b# show running-config + +---------- + + interface eth0 + ipv6 address 2001:db8:3::2/64 + + interface eth1 + ipv6 address 2001:db8:2::1/64 + +由于两台路由的eth0端口同属一个子网,即2001:DB8:3::/64,你应该可以相互ping通。在保证ping通的情况下,我们开始下面的内容。 + + router-a# ping ipv6 2001:db8:3::2 + +---------- + + PING 2001:db8:3::2(2001:db8:3::2) 56 data bytes + 64 bytes from 2001:db8:3::2: icmp_seq=1 ttl=64 time=3.20 ms + 64 bytes from 2001:db8:3::2: icmp_seq=2 ttl=64 time=1.05 ms + +### 步骤 1: IPv6 BGP 对等体 ### + +本段,我们将在两个路由之间配置IPv6 BGP。首先,我们在路由A上指定BGP邻居。 + + router-a# conf t + router-a(config)# router bgp 100 + router-a(config-router)# no auto-summary + router-a(config-router)# no synchronization + router-a(config-router)# neighbor 2001:DB8:3::2 remote-as 200 + +然后,我们定义IPv6的地址族。在地址族中,我们需要定义要通告的网段,并激活邻居。 + + router-a(config-router)# address-family ipv6 + router-a(config-router-af)# network 2001:DB8:1::/48 + router-a(config-router-af)# neighbor 2001:DB8:3::2 activate + +我们在路由B上也实施相同的配置。这里提供我归总后的配置。 + + router-b# conf t + router-b(config)# router bgp 200 + router-b(config-router)# no auto-summary + router-b(config-router)# no synchronization + router-b(config-router)# neighbor 2001:DB8:3::1 remote-as 100 + router-b(config-router)# address-family ipv6 + router-b(config-router-af)# network 2001:DB8:2::/48 + router-b(config-router-af)# neighbor 2001:DB8:3::1 activate + +如果一切顺利,在路由间将会形成一个IPv6 BGP会话。如果失败了,请确保[在防火墙中开启了][3]必要的端口(TCP 179)。 + +我们使用以下命令来确认IPv6 BGP会话的信息。 + +**查看BGP汇总:** + + router-a# show bgp ipv6 unicast summary + +**查看BGP通告的路由:** + + router-a# show bgp ipv6 neighbors advertised-routes + +**查看BGP获得的路由:** + + router-a# show bgp ipv6 neighbors routes + +![](https://farm8.staticflickr.com/7317/16379555088_6e29cb6884_b.jpg) + +### 步骤 2: 过滤IPv6前缀 ### + +正如我们在上面看到的输出信息那样,路由间通告了他们完整的/48 IPv6前缀。出于演示的目的,我们会考虑以下要求。 + +- Router-B将通告一个/64前缀,一个/56前缀,和一个完整的/48前缀. +- Router-A将接受任由B提供的何形式的IPv6前缀,其中包含有/56和/64之间的网络掩码长度。 + +我们将根据需要过滤的前缀,来使用路由器的前缀列表和路由映射。 + +![](https://farm8.staticflickr.com/7367/16381297417_6549218289_c.jpg) + +#### 为路由B修改通告的前缀 #### + +目前,路由B只通告一个/48前缀。我们修改路由B的BGP配置使它可以通告额外的/56和/64前缀。 + + router-b# conf t + router-b(config)# router bgp 200 + router-b(config-router)# address-family ipv6 + router-b(config-router-af)# network 2001:DB8:2::/56 + router-b(config-router-af)# network 2001:DB8:2::/64 + +我们将路由A上验证了所有的前缀都获得到了。 + +![](https://farm9.staticflickr.com/8598/16379761980_7c083ae977_b.jpg) + +太好了!我们在路由A上收到了所有的前缀,那么我们可以更进一步创建前缀列表和路由映射来过滤这些前缀。 + +#### 创建前缀列表 #### + +就像在[上则教程中][4]描述的那样,前缀列表是一种机制用来匹配带有子网长度的IP地址前缀。按照我们指定的需求,我们需要在路由A的前缀列表中创建一则必要的条目。 + + router-a# conf t + router-a(config)# ipv6 prefix-list FILTER-IPV6-PRFX permit 2001:DB8:2::/56 le 64 + +以上的命令会创建一个名为'FILTER-IPV6-PRFX'的前缀列表,用以匹配任何2001:DB8:2::池内掩码在56和64之间的所有前缀。 + +#### 创建并应用路由映射 #### + +现在已经在前缀列表中创建了条目,我们也应该相应的创建一条使用此条目的路由映射规则了。 + + router-a# conf t + router-a(config)# route-map FILTER-IPV6-RMAP permit 10 + router-a(config-route-map)# match ipv6 address prefix-list FILTER-IPV6-PRFX + +以上的命令会创建一条名为'FILTER-IPV6-RMAP'的路由映射规则。这则规则将会允许与之前在前缀列表中创建'FILTER-IPV6-PRFX'所匹配的IPv6 + +要记住路由映射规则只有在应用在邻居或者端口的指定方向时才有效。我们将把路由映射应用到BGP的邻居配置中。我们将路由映射应用于入方向,作为进入路由端的前缀过滤器。 + + router-a# conf t + router-a(config)# router bgp 100 + router-a(config-router)# address-family ipv6 + router-a(config-router-af)# neighbor 2001:DB8:3::2 route-map FILTER-IPV6-RMAP in + +现在我们在路由A上再查看一边获得到的路由,我们应该只能看见两个被允许的前缀了。 + +![](https://farm8.staticflickr.com/7337/16379762020_ec2dc39b31_c.jpg) + +**注意**: 你可能需要重置BGP会话来刷新路由表。 + +所有IPv6的BGP会话可以使用以下的命令重启: + + router-a# clear bgp ipv6 * + +我汇总了两个路由的配置,并做成了一张清晰的图片以便阅读。 + +![](https://farm9.staticflickr.com/8672/16567240165_eee4398dc8_c.jpg) + +### 总结 ### + +总结一下,这篇教程重点在于如何创建BGP对等体和IPv6的过滤。我们演示了如何向邻居BGP路由通告IPv6前缀,和如何过滤通告前缀或获得的通告。需要注意,本教程使用的过程可能会对网络供应商的网络运作有所影响,请谨慎参考。 + +希望这些对你有用。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/ipv6-bgp-peering-filtering-quagga-bgp-router.html + +作者:[Sarmed Rahman][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://xmodulo.com/centos-bgp-router-quagga.html +[2]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html +[3]:http://ask.xmodulo.com/open-port-firewall-centos-rhel.html +[4]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html From e01d81f5945506d1b0098cdc625a8ab565442e2e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 2 Aug 2015 22:06:53 +0800 Subject: [PATCH 1571/2517] PUB:20150722 How To Manage StartUp Applications In Ubuntu @FSSlc --- ...22 How To Manage StartUp Applications In Ubuntu.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150722 How To Manage StartUp Applications In Ubuntu.md (92%) diff --git a/translated/tech/20150722 How To Manage StartUp Applications In Ubuntu.md b/published/20150722 How To Manage StartUp Applications In Ubuntu.md similarity index 92% rename from translated/tech/20150722 How To Manage StartUp Applications In Ubuntu.md rename to published/20150722 How To Manage StartUp Applications In Ubuntu.md index 745a84860a..3494e90a61 100644 --- a/translated/tech/20150722 How To Manage StartUp Applications In Ubuntu.md +++ b/published/20150722 How To Manage StartUp Applications In Ubuntu.md @@ -6,17 +6,17 @@ 每当你开机进入一个操作系统,一系列的应用将会自动启动。这些应用被称为‘开机启动应用’ 或‘开机启动程序’。随着时间的推移,当你在系统中安装了足够多的应用时,你将发现有太多的‘开机启动应用’在开机时自动地启动了,它们吃掉了很多的系统资源,并将你的系统拖慢。这可能会让你感觉卡顿,我想这种情况并不是你想要的。 -让 Ubuntu 变得更快的方法之一是对这些开机启动应用进行控制。 Ubuntu 为你提供了一个 GUI 工具来让你发现这些开机启动应用,然后完全禁止或延迟它们的启动,这样就可以不让每个应用在开机时同时运行。 +让 Ubuntu 变得更快的方法之一是对这些开机启动应用进行控制。 Ubuntu 为你提供了一个 GUI 工具来让你找到这些开机启动应用,然后完全禁止或延迟它们的启动,这样就可以不让每个应用在开机时同时运行。 在这篇文章中,我们将看到 **在 Ubuntu 中,如何控制开机启动应用,如何让一个应用在开机时启动以及如何发现隐藏的开机启动应用。**这里提供的指导对所有的 Ubuntu 版本均适用,例如 Ubuntu 12.04, Ubuntu 14.04 和 Ubuntu 15.04。 ### 在 Ubuntu 中管理开机启动应用 ### -默认情况下, Ubuntu 提供了一个`开机启动应用工具`来供你使用,你不必再进行安装。只需到 Unity 面板中就可以查找到该工具。 +默认情况下, Ubuntu 提供了一个`Startup Applications`工具来供你使用,你不必再进行安装。只需到 Unity 面板中就可以查找到该工具。 ![ubuntu 中的开机启动应用工具](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/startup_applications_Ubuntu.jpeg) -点击它来启动。下面是我的`开机启动应用`的样子: +点击它来启动。下面是我的`Startup Applications`的样子: ![在 Ubuntu 中查看开机启动程序](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Screenshot-from-2015-07-18-122550.png) @@ -84,7 +84,7 @@ 就这样,你将在下一次开机时看到这个程序会自动运行。这就是在 Ubuntu 中你能做的关于开机启动应用的所有事情。 -到现在为止,我们已经讨论在开机时可见的应用,但仍有更多的服务,守护进程和程序并不在`开机启动应用工具`中可见。下一节中,我们将看到如何在 Ubuntu 中查看这些隐藏的开机启动程序。 +到现在为止,我们已经讨论在开机时可见到的应用,但仍有更多的服务,守护进程和程序并不在`开机启动应用工具`中可见。下一节中,我们将看到如何在 Ubuntu 中查看这些隐藏的开机启动程序。 ### 在 Ubuntu 中查看隐藏的开机启动程序 ### @@ -97,13 +97,14 @@ ![在 Ubuntu 中查看隐藏的开机启动程序](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Hidden_startup_program_Ubuntu.jpg) 你可以像先前我们讨论的那样管理这些开机启动应用。我希望这篇教程可以帮助你在 Ubuntu 中控制开机启动程序。任何的问题或建议总是欢迎的。 + -------------------------------------------------------------------------------- via: http://itsfoss.com/manage-startup-applications-ubuntu/ 作者:[Abhishek][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 7f1ac1f1041cd8f0db2d5bee74dbb9b1151a5ccf Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 2 Aug 2015 22:33:58 +0800 Subject: [PATCH 1572/2517] PUB:20150625 How to Provision Swarm Clusters using Docker Machine @DongShuaike --- ...ion Swarm Clusters using Docker Machine.md | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) rename {translated/tech => published}/20150625 How to Provision Swarm Clusters using Docker Machine.md (54%) diff --git a/translated/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md b/published/20150625 How to Provision Swarm Clusters using Docker Machine.md similarity index 54% rename from translated/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md rename to published/20150625 How to Provision Swarm Clusters using Docker Machine.md index 940c68b55d..a36284e6de 100644 --- a/translated/tech/20150625 How to Provision Swarm Clusters using Docker Machine.md +++ b/published/20150625 How to Provision Swarm Clusters using Docker Machine.md @@ -1,11 +1,14 @@ 如何使用Docker Machine部署Swarm集群 ================================================================================ -大家好,今天我们来研究一下如何使用Docker Machine部署Swarm集群。Docker Machine提供了独立的Docker API,所以任何与Docker守护进程进行交互的工具都可以使用Swarm来(透明地)扩增到多台主机上。Docker Machine可以用来在个人电脑、云端以及的数据中心里创建Docker主机。它为创建服务器,安装Docker以及根据用户设定配置Docker客户端提供了便捷化的解决方案。我们可以使用任何驱动来部署swarm集群,并且swarm集群将由于使用了TLS加密具有极好的安全性。 + +大家好,今天我们来研究一下如何使用Docker Machine部署Swarm集群。Docker Machine提供了标准的Docker API 支持,所以任何可以与Docker守护进程进行交互的工具都可以使用Swarm来(透明地)扩增到多台主机上。Docker Machine可以用来在个人电脑、云端以及的数据中心里创建Docker主机。它为创建服务器,安装Docker以及根据用户设定来配置Docker客户端提供了便捷化的解决方案。我们可以使用任何驱动来部署swarm集群,并且swarm集群将由于使用了TLS加密具有极好的安全性。 下面是我提供的简便方法。 + ### 1. 安装Docker Machine ### -Docker Machine 在任何Linux系统上都被支持。首先,我们需要从Github上下载最新版本的Docker Machine。我们使用curl命令来下载最先版本Docker Machine ie 0.2.0。 +Docker Machine 在各种Linux系统上都支持的很好。首先,我们需要从Github上下载最新版本的Docker Machine。我们使用curl命令来下载最先版本Docker Machine ie 0.2.0。 + 64位操作系统: # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine @@ -18,7 +21,7 @@ Docker Machine 在任何Linux系统上都被支持。首先,我们需要从Git # chmod +x /usr/local/bin/docker-machine -在做完上面的事情以后,我们必须确保docker-machine已经安装好。怎么检查呢?运行docker-machine -v指令,指令将会给出我们系统上所安装的docker-machine版本。 +在做完上面的事情以后,我们要确保docker-machine已经安装正确。怎么检查呢?运行`docker-machine -v`指令,该指令将会给出我们系统上所安装的docker-machine版本。 # docker-machine -v @@ -31,14 +34,15 @@ Docker Machine 在任何Linux系统上都被支持。首先,我们需要从Git ### 2. 创建Machine ### -在将Docker Machine安装到我们的设备上之后,我们需要使用Docker Machine创建一个machine。在这片文章中,我们会将其部署在Digital Ocean Platform上。所以我们将使用“digitalocean”作为它的Driver API,然后将docker swarm运行在其中。这个Droplet会被设置为Swarm主节点,我们还要创建另外一个Droplet,并将其设定为Swarm节点代理。 +在将Docker Machine安装到我们的设备上之后,我们需要使用Docker Machine创建一个machine。在这篇文章中,我们会将其部署在Digital Ocean Platform上。所以我们将使用“digitalocean”作为它的Driver API,然后将docker swarm运行在其中。这个Droplet会被设置为Swarm主控节点,我们还要创建另外一个Droplet,并将其设定为Swarm节点代理。 + 创建machine的命令如下: # docker-machine create --driver digitalocean --digitalocean-access-token linux-dev -**Note**: 假设我们要创建一个名为“linux-dev”的machine。是用户在Digital Ocean Cloud Platform的Digital Ocean控制面板中生成的密钥。为了获取这个密钥,我们需要登录我们的Digital Ocean控制面板,然后点击API选项,之后点击Generate New Token,起个名字,然后在Read和Write两个选项上打钩。之后我们将得到一个很长的十六进制密钥,这个就是了。用其替换上面那条命令中的API-Token字段。 +**备注**: 假设我们要创建一个名为“linux-dev”的machine。是用户在Digital Ocean Cloud Platform的Digital Ocean控制面板中生成的密钥。为了获取这个密钥,我们需要登录我们的Digital Ocean控制面板,然后点击API选项,之后点击Generate New Token,起个名字,然后在Read和Write两个选项上打钩。之后我们将得到一个很长的十六进制密钥,这个就是了。用其替换上面那条命令中的API-Token字段。 -现在,运行下面的指令,将Machine configuration装载进shell。 +现在,运行下面的指令,将Machine 的配置变量加载进shell里。 # eval "$(docker-machine env linux-dev)" @@ -48,7 +52,7 @@ Docker Machine 在任何Linux系统上都被支持。首先,我们需要从Git # docker-machine active linux-dev -现在,我们检查是否它(指machine)被标记为了 ACTIVE "*"。 +现在,我们检查它(指machine)是否被标记为了 ACTIVE "*"。 # docker-machine ls @@ -56,22 +60,21 @@ Docker Machine 在任何Linux系统上都被支持。首先,我们需要从Git ### 3. 运行Swarm Docker镜像 ### -现在,在我们创建完成了machine之后。我们需要将swarm docker镜像部署上去。这个machine将会运行这个docker镜像并且控制Swarm主节点和从节点。使用下面的指令运行镜像: +现在,在我们创建完成了machine之后。我们需要将swarm docker镜像部署上去。这个machine将会运行这个docker镜像,并且控制Swarm主控节点和从节点。使用下面的指令运行镜像: # docker run swarm create ![Docker Machine Swarm Create](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-create.png) -If you are trying to run swarm docker image using **32 bit Operating System** in the computer where Docker Machine is running, we'll need to SSH into the Droplet. 如果你想要在**32位操作系统**上运行swarm docker镜像。你需要SSH登录到Droplet当中。 # docker-machine ssh #docker run swarm create #exit -### 4. 创建Swarm主节点 ### +### 4. 创建Swarm主控节点 ### -在我们的swarm image已经运行在machine当中之后,我们将要创建一个Swarm主节点。使用下面的语句,添加一个主节点。(这里的感觉怪怪的,好像少翻译了很多东西,是我把Master翻译为主节点的原因吗?) +在我们的swarm image已经运行在machine当中之后,我们将要创建一个Swarm主控节点。使用下面的语句,添加一个主控节点。 # docker-machine create \ -d digitalocean \ @@ -83,9 +86,9 @@ If you are trying to run swarm docker image using **32 bit Operating System** in ![Docker Machine Swarm Master Create](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-master-create.png) -### 5. 创建Swarm结点群 ### +### 5. 创建Swarm从节点 ### -现在,我们将要创建一个swarm结点,此结点将与Swarm主节点相连接。下面的指令将创建一个新的名为swarm-node的droplet,其与Swarm主节点相连。到此,我们就拥有了一个两节点的swarm集群了。 +现在,我们将要创建一个swarm从节点,此节点将与Swarm主控节点相连接。下面的指令将创建一个新的名为swarm-node的droplet,其与Swarm主控节点相连。到此,我们就拥有了一个两节点的swarm集群了。 # docker-machine create \ -d digitalocean \ @@ -96,21 +99,19 @@ If you are trying to run swarm docker image using **32 bit Operating System** in ![Docker Machine Swarm Nodes](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-swarm-nodes.png) -### 6. Connecting to the Swarm Master ### -### 6. 与Swarm主节点连接 ### +### 6. 与Swarm主控节点连接 ### -现在,我们连接Swarm主节点以便我们可以依照需求和配置文件在节点间部署Docker容器。运行下列命令将Swarm主节点的Machine配置文件加载到环境当中。 +现在,我们连接Swarm主控节点以便我们可以依照需求和配置文件在节点间部署Docker容器。运行下列命令将Swarm主控节点的Machine配置文件加载到环境当中。 # eval "$(docker-machine env --swarm swarm-master)" -然后,我们就可以跨结点地运行我们所需的容器了。在这里,我们还要检查一下是否一切正常。所以,运行**docker info**命令来检查Swarm集群的信息。 +然后,我们就可以跨节点地运行我们所需的容器了。在这里,我们还要检查一下是否一切正常。所以,运行**docker info**命令来检查Swarm集群的信息。 # docker info -### Conclusion ### ### 总结 ### -我们可以用Docker Machine轻而易举地创建Swarm集群。这种方法有非常高的效率,因为它极大地减少了系统管理员和用户的时间消耗。在这篇文章中,我们以Digital Ocean作为驱动,通过创建一个主节点和一个从节点成功地部署了集群。其他类似的应用还有VirtualBox,Google Cloud Computing,Amazon Web Service,Microsoft Azure等等。这些连接都是通过TLS进行加密的,具有很高的安全性。如果你有任何的疑问,建议,反馈,欢迎在下面的评论框中注明以便我们可以更好地提高文章的质量! +我们可以用Docker Machine轻而易举地创建Swarm集群。这种方法有非常高的效率,因为它极大地减少了系统管理员和用户的时间消耗。在这篇文章中,我们以Digital Ocean作为驱动,通过创建一个主控节点和一个从节点成功地部署了集群。其他类似的驱动还有VirtualBox,Google Cloud Computing,Amazon Web Service,Microsoft Azure等等。这些连接都是通过TLS进行加密的,具有很高的安全性。如果你有任何的疑问,建议,反馈,欢迎在下面的评论框中注明以便我们可以更好地提高文章的质量! -------------------------------------------------------------------------------- @@ -118,7 +119,7 @@ via: http://linoxide.com/linux-how-to/provision-swarm-clusters-using-docker-mach 作者:[Arun Pyasi][a] 译者:[DongShuaike](https://github.com/DongShuaike) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 9b61686c047dd14af43d13b1e593789c388b6aaf Mon Sep 17 00:00:00 2001 From: XLCYun Date: Mon, 3 Aug 2015 08:25:33 +0800 Subject: [PATCH 1573/2517] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=96=87?= =?UTF-8?q?=20=20XLCYun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ht & Wrong - Page 2 - The GNOME Desktop.md | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md diff --git a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md deleted file mode 100644 index 1bf684313b..0000000000 --- a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md +++ /dev/null @@ -1,32 +0,0 @@ -Translating by XLCYun. -A Week With GNOME As My Linux Desktop: What They Get Right & Wrong - Page 2 - The GNOME Desktop -================================================================================ -### The Desktop ### - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_gdm_show&w=1920) - -I spent the first five days of my week logging into Gnome manually-- not turning on automatic login. On night of the fifth day I got annoyed with having to login by hand and so I went into the User Manager and turned on automatic login. The next time I logged in I got a prompt: "Your keychain was not unlocked. Please enter your password to unlock your keychain." That was when I realized something... Gnome had been automatically unlocking my keychain—my wallet in KDE speak-- every time I logged in via GDM. It was only when I bypassed GDM's login that Gnome had to step in and make me do it manually. - -Now, I am under the personal belief that if you enable automatic login then your key chain should be unlocked automatically as well-- otherwise what's the point? Either way you still have to type in your password and at least if you hit the GDM Login screen you have a chance to change your session if you want to. - -But, regardless of that, it was at that moment that I realized it was such a simple thing that made the desktop feel so much more like it was working WITH ME. When I log into KDE via SDDM? Before the splash screen is even finished loading there is a window popping up over top the splash animation-- thereby disrupting the splash screen-- prompting me to unlock my KDE wallet or GPG keyring. - -If a wallet doesn't exist already you get prompted to create a wallet-- why couldn't one have been created for me at user creation?-- and then get asked to pick between two encryption methods, where one is even implied as insecure (Blowfish), why are you letting me pick something that's insecure for my security? Author's Note: If you install the actual KDE spin and don't just install KDE after-the-fact then a wallet is created for you at user creation. Unfortunately it's not unlocked for you automatically, and it seems to use the older Blowfish method rather than the new, and more secure, GPG method. - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_kgpg_show&w=1920) - -If you DO pick the secure one (GPG) then it tries to load an Gpg key... which I hope you had one created already because if you don't you get yelled at. How do you create one? Well, it doesn't offer to make one for you... nor It doesn't tell you... and if you do manage TO figure out that you are supposed to use KGpg to create the key then you get taken through several menus and prompts that are nothing but confusing to new users. Why are you asking me where the GPG binary is located? How on earth am I supposed to know? Can't you just use the most recent one if there's more than one? And if there IS only one then, I ask again, why are you prompting me? - -Why are you asking me what key size and encryption algorithm to use? You select 2048 and RSA/RSA by default, so why not just use those? If you want to have those options available then throw them under the "Expert mode" button that is right there. This isn't just about having configuration options available, its about needless things that get thrown in the user's face by default. This is going to be a theme for the rest of the article... KDE needs better sane defaults. Configuration is great, I love the configuration I get with KDE, but it needs to learn when to and when not to prompt. It also needs to learn that "Well its configurable" is no excuse for bad defaults. Defaults are what users see initially, bad defaults will lose users. - -Let's move on from the key chain issue though, because I think I made my point. - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=2 - -作者:Eric Griffith -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 03c44a7869162c8f82d29bf73501ef7984f124bd Mon Sep 17 00:00:00 2001 From: XLCYun Date: Mon, 3 Aug 2015 08:27:06 +0800 Subject: [PATCH 1574/2517] =?UTF-8?q?XLCYun=20=20Gnome=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E8=8A=82=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 translated by XLCYun --- ...ht & Wrong - Page 2 - The GNOME Desktop.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md new file mode 100644 index 0000000000..5ce4dcd8d5 --- /dev/null +++ b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md @@ -0,0 +1,31 @@ +将GNOME作为我的Linux桌面的一周:他们做对的与做错的 - 第二节 - GNOME桌面 +================================================================================ +### 桌面 ### + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_gdm_show&w=1920) + +在我这一周的前五天中,我都是直接手动登录进Gnome的——没有打开自动登录功能。在第五天的晚上,每一次都要手动登录让我觉得很厌烦,所以我就到用户管理器中打开了自动登录功能。下一次我登录的时候收到了一个提示:“你的密钥链(keychain)未解锁,请输入你的密码解锁”。在这时我才意识到了什么……每一次我通过GDM登录时——我的KDB钱包提示——Gnome以前一直都在自动解锁我的密钥链!当我绕开GDM的登录程序时,Gnome才不得不介入让我手动解锁。 + +现在,鄙人的陋见是如果你打开了自动登录功能,那么你的密钥链也应当自动解锁——否则,这功能还有何用?无论如何,你还是要输入你的密码,况且在GDM登录界面你还能有机会选择要登录的会话。 + +但是,这点且不提,也就是在那一刻,我意识到要让这桌面感觉是它在**和我**一起工作是多么简单的一件事。当我通过SDDM登录KDE时?甚至连启动界面都还没加载完成,就有一个窗口弹出来遮挡了启动动画——因此启动动画也就被破坏了——提示我解锁我的KDE钱包或GPG钥匙环。 + +如果当前不存在钱包,你就会收到一个创建钱包的提醒——就不能在创建用户的时候同时为我创建一个吗?——接着它又让你在两种加密模式中选择一种,甚至还暗示我们其中一种是不安全的(Blowfish),既然是为了安全,为什么还要我选择一个不安全的东西?作者声明:如果你安装了真正的KDE spin版本而不是仅仅安装了KDE的事后版本,那么在创建用户时,它就会为你创建一个钱包。但很不幸的是,它不会帮你解锁,并且它似乎还使用了更老的Blowfish加密模式,而不是更新而且更安全的GPG模式。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_kgpg_show&w=1920) + +如果你选择了那个安全的加密模式(GPG),那么它会尝试加载GPG密钥……我希望你已经创建过一个了,因为如果你没有,那么你可又要被批一顿了。怎么样才能创建一个?额……它不帮你创建一个……也不告诉你怎么创建……假如你真的搞明白了你应该使用KGpg来创建一个密钥,接着在你就会遇到一层层的菜单和一个个的提示,而这些菜单和提示只能让新手感到困惑。为什么你要问我GPG的二进制文件在哪?天知道在哪!如果不止一个,你就不能为我选择一个最新的吗?如果只有一个,我再问一次,为什么你还要问我? + +为什么你要问我要使用多大的密钥大小和加密算法?你既然默认选择了2048和RSA/RSA,为什么不直接使用?如果你想让这些选项能够被改变,那就把它们扔在下面的"Expert mode(专家模式)"按钮里去。这不仅仅关于使配置可被用户改变,而是关于默认地把多余的东西扔在了用户面前。这种问题将会成为剩下文章的主题之一……KDE需要更好更理智的默认配置。配置是好的,我很喜欢在使用KDE时的配置,但它还需要知道什么时候应该,什么时候不应该去提示用户。而且它还需要知道“嗯,它是可配置的”不能做为默认配置做得不好的借口。用户最先接触到的就是默认配置,不好的默认配置注定要失去用户。 + +让我们抛开密钥链的问题,因为我想我已经表达出了我的想法。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=2 + +作者:Eric Griffith +译者:[XLCYun](https://github.com/XLCYun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 1665f293d1a20b351480b49a9a2a9be67ca16af9 Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 3 Aug 2015 09:58:33 +0800 Subject: [PATCH 1575/2517] =?UTF-8?q?github=202.0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- github 2.0测试.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 github 2.0测试.txt diff --git a/github 2.0测试.txt b/github 2.0测试.txt new file mode 100644 index 0000000000..e69de29bb2 From d90f37fdb59f8130a83c3894ef2c247870979aef Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 3 Aug 2015 10:11:49 +0800 Subject: [PATCH 1576/2517] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- github 2.0测试.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/github 2.0测试.txt b/github 2.0测试.txt index e69de29bb2..9d07aa0df5 100644 --- a/github 2.0测试.txt +++ b/github 2.0测试.txt @@ -0,0 +1 @@ +111 \ No newline at end of file From f7b881a22862a051f1f2529900989bce239dcf51 Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 3 Aug 2015 10:15:21 +0800 Subject: [PATCH 1577/2517] Test --- github 2.0测试.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/github 2.0测试.txt b/github 2.0测试.txt index 9d07aa0df5..7787faa3c1 100644 --- a/github 2.0测试.txt +++ b/github 2.0测试.txt @@ -1 +1,2 @@ -111 \ No newline at end of file +111 +222 \ No newline at end of file From 60689c5fc61a277731adf66298f33409f95dcde2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 3 Aug 2015 10:57:25 +0800 Subject: [PATCH 1578/2517] Delete 20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除原文 oska874 --- ...un Ubuntu Snappy Core on Raspberry Pi 2.md | 91 ------------------- 1 file changed, 91 deletions(-) delete mode 100644 sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md diff --git a/sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md b/sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md deleted file mode 100644 index 99b2b3acc1..0000000000 --- a/sources/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md +++ /dev/null @@ -1,91 +0,0 @@ -+Translating by Ezio - -How to run Ubuntu Snappy Core on Raspberry Pi 2 -================================================================================ -The Internet of Things (IoT) is upon us. In a couple of years some of us might ask ourselves how we ever survived without it, just like we question our past without cellphones today. Canonical is a contender in this fast growing, but still wide open market. The company wants to claim their stakes in IoT just as they already did for the cloud. At the end of January, the company launched a small operating system that goes by the name of [Ubuntu Snappy Core][1] which is based on Ubuntu Core. - -Snappy, the new component in the mix, represents a package format that is derived from DEB, is a frontend to update the system that lends its idea from atomic upgrades used in CoreOS, Red Hat's Atomic and elsewhere. As soon as the Raspberry Pi 2 was marketed, Canonical released Snappy Core for that plattform. The first edition of the Raspberry Pi was not able to run Ubuntu because Ubuntu's ARM images use the ARMv7 architecture, while the first Raspberry Pis were based on ARMv6. That has changed now, and Canonical, by releasing a RPI2-Image of Snappy Core, took the opportunity to make clear that Snappy was meant for the cloud and especially for IoT. - -Snappy also runs on other platforms like Amazon EC2, Microsofts Azure, and Google's Compute Engine, and can also be virtualized with KVM, Virtualbox, or Vagrant. Canonical has embraced big players like Microsoft, Google, Docker or OpenStack and, at the same time, also included small projects from the maker scene as partners. Besides startups like Ninja Sphere and Erle Robotics, there are board manufacturers like Odroid, Banana Pro, Udoo, PCDuino and Parallella as well as Allwinner. Snappy Core will also run in routers soon to help with the poor upgrade policy that vendors perform. - -In this post, let's see how we can test Ubuntu Snappy Core on Raspberry Pi 2. - -The image for Snappy Core for the RPI2 can be downloaded from the [Raspberry Pi website][2]. Unpacked from the archive, the resulting image should be [written to an SD card][3] of at least 8 GB. Even though the OS is small, atomic upgrades and the rollback function eat up quite a bit of space. After booting up your Raspberry Pi 2 with Snappy Core, you can log into the system with the default username and password being 'ubuntu'. - -![](https://farm8.staticflickr.com/7639/16428527263_f7bdd56a0d_c.jpg) - -sudo is already configured and ready for use. For security reasons you should change the username with: - - $ sudo usermod -l - -Alternatively, you can add a new user with the command `adduser`. - -Due to the lack of a hardware clock on the RPI, that the Snappy Core image does not take account of, the image has a small bug that will throw a lot of errors when processing commands. It is easy to fix. - -To find out if the bug affects you, use the command: - - $ date - -If the output is "Thu Jan 1 01:56:44 UTC 1970", you can fix it with: - - $ sudo date --set="Sun Apr 04 17:43:26 UTC 2015" - -adapted to your actual time. - -![](https://farm9.staticflickr.com/8735/16426231744_c54d9b8877_b.jpg) - -Now you might want to check if there are any updates available. Note that the usual commands: - - $ sudo apt-get update && sudo apt-get distupgrade - -will not get you very far though, as Snappy uses its own simplified package management system which is based on dpkg. This makes sense, as Snappy will run on a lot of embedded appliances, and you want things to be as simple as possible. - -Let's dive into the engine room for a minute to understand how things work with Snappy. The SD card you run Snappy on has three partitions besides the boot partition. Two of those house a duplicated file system. Both of those parallel file systems are permanently mounted as "read only", and only one is active at any given time. The third partition holds a partial writable file system and the users persistent data. With a fresh system, the partition labeled 'system-a' holds one complete file system, called a core, leaving the parallel partition still empty. - -![](https://farm9.staticflickr.com/8758/16841251947_21f42609ce_b.jpg) - -If we run the following command now: - - $ sudo snappy update - -the system will install the update as a complete core, similar to an image, on 'system-b'. You will be asked to reboot your device afterwards to activate the new core. - -After the reboot, run the following command to check if your system is up to date and which core is active. - - $ sudo snappy versions -a - -After rolling out the update and rebooting, you should see that the core that is now active has changed. - -As we have not installed any apps yet, the following command: - - $ sudo snappy update ubuntu-core - -would have been sufficient, and is the way if you want to upgrade just the underlying OS. Should something go wrong, you can rollback by: - - $ sudo snappy rollback ubuntu-core - -which will take you back to the system's state before the update. - -![](https://farm8.staticflickr.com/7666/17022676786_5fe6804ed8_c.jpg) - -Speaking of apps, they are what makes Snappy useful. There are not that many at this point, but the IRC channel #snappy on Freenode is humming along nicely and with a lot of people involved, the Snappy App Store gets new apps added on a regular basis. You can visit the shop by pointing your browser to http://:4200, and you can install apps right from the shop and then launch them with http://webdm.local in your browser. Building apps yourself for Snappy is not all that hard, and [well documented][4]. You can also port DEB packages into the snappy format quite easily. - -![](https://farm8.staticflickr.com/7656/17022676836_968a2a7254_c.jpg) - -Ubuntu Snappy Core, due to the limited number of available apps, is not overly useful in a productive way at this point in time, although it invites us to dive into the new Snappy package format and play with atomic upgrades the Canonical way. Since it is easy to set up, this seems like a good opportunity to learn something new. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/ubuntu-snappy-core-raspberry-pi-2.html - -作者:[Ferdinand Thommes][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/ferdinand -[1]:http://www.ubuntu.com/things -[2]:http://www.raspberrypi.org/downloads/ -[3]:http://xmodulo.com/write-raspberry-pi-image-sd-card.html -[4]:https://developer.ubuntu.com/en/snappy/ From 0b73d40c0e585226303bc4dcff5ed5a172c87ee8 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 3 Aug 2015 11:01:10 +0800 Subject: [PATCH 1579/2517] Create 20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加翻译过的文章 oska874 --- ...un Ubuntu Snappy Core on Raspberry Pi 2.md | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md diff --git a/translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md b/translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md new file mode 100644 index 0000000000..c4475f39a2 --- /dev/null +++ b/translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md @@ -0,0 +1,89 @@ +如何在树莓派2 代运行ubuntu Snappy Core +================================================================================ +物联网(Internet of Things, IoT) 时代即将来临。很快,过不了几年,我们就会问自己当初是怎么在没有物联网的情况下生存的,就像我们现在怀疑过去没有手机的年代。Canonical 就是一个物联网快速发展却还是开放市场下的竞争者。这家公司宣称自己把赌注压到了IoT 上,就像他们已经在“云”上做过的一样。。在今年一月底,Canonical 启动了一个基于Ubuntu Core 的小型操作系统,名字叫做 [Ubuntu Snappy Core][1] 。 + +Snappy 是一种用来替代deb 的新的打包格式,是一个用来更新系统的前端,从CoreOS、红帽子和其他地方借鉴了原子更新这个想法。很快树莓派2 代投入市场,Canonical 就发布了用于树莓派的Snappy Core 版本。第一代树莓派因为是基于ARMv6 ,而Ubuntu 的ARM 镜像是基于ARMv7 ,所以不能运行ubuntu 。不过这种状况现在改变了,Canonical 通过发布用于RPI2 的镜像,抓住机会澄清了Snappy 就是一个用于云计算,特别是IoT 的系统。 + +Snappy 同样可以运行在其它像Amazon EC2, Microsofts Azure, Google's Compute Engine 这样的云端上,也可以虚拟化在KVM、Virtuabox 和vagrant 上。Canonical 已经拥抱了微软、谷歌、Docker、OpenStack 这些重量级选手,同时也与一些小项目达成合作关系。除了一些创业公司,像Ninja Sphere、Erle Robotics,还有一些开发板生产商比如Odroid、Banana Pro, Udoo, PCDuino 和Parallella 、全志。Snappy Core 也希望很快能运行在路由器上,来帮助改进路由器生产商目前很少更新固件的策略。 + +接下来,让我们看看怎么样在树莓派2 上运行Snappy。 + +用于树莓派2 的Snappy 镜像可以从 [Raspberry Pi 网站][2] 上下载。解压缩出来的镜像必须[写到一个至少8GB 大小的SD 卡][3]。尽管原始系统很小,但是院子升级和回滚功能会蚕食不小的空间。使用Snappy 启动树莓派2 后你就可以使用默认用户名和密码(都是ubuntu)登录系统。 + +![](https://farm8.staticflickr.com/7639/16428527263_f7bdd56a0d_c.jpg) + +sudo 已经配置好了可以直接用,安全起见,你应该使用以下命令来修改你的用户名 + + $ sudo usermod -l + +或者也可以使用`adduser` 为你添加一个新用户。 + +因为RPI缺少硬件始终,而Snappy 不知道这一点,所以系统会有一个小bug:处理命令时会报很多错。不过这个很容易解决: + +使用这个命令来确认这个bug 是否影响: + + $ date + +如果输出是 "Thu Jan 1 01:56:44 UTC 1970", 你可以这样做来改正: + + $ sudo date --set="Sun Apr 04 17:43:26 UTC 2015" + +改成你的实际时间。 + +![](https://farm9.staticflickr.com/8735/16426231744_c54d9b8877_b.jpg) + +现在你可能打算检查一下,看看有没有可用的更新。注意通常使用的命令: + + $ sudo apt-get update && sudo apt-get distupgrade + +现在将不会让你通过,因为Snappy 会使用它自己精简过的、基于dpkg 的包管理系统。这是做是应为Snappy 会运行很多嵌入式程序,而你也会想着所有事情尽可能的简化。 + +让我们来看看最关键的部分,理解一下程序是如何与Snappy 工作的。运行Snappy 的SD 卡上除了boot 分区外还有3个分区。其中的两个构成了一个重复的文件系统。这两个平行文件系统被固定挂载为只读模式,并且任何时刻只有一个是激活的。第三个分区是一个部分可写的文件系统,用来让用户存储数据。通过更新系统,标记为'system-a' 的分区会保持一个完整的文件系统,被称作核心,而另一个平行文件系统仍然会是空的。 + +![](https://farm9.staticflickr.com/8758/16841251947_21f42609ce_b.jpg) + +如果我们运行以下命令: + + $ sudo snappy update + +系统将会在'system-b' 上作为一个整体进行更新,这有点像是更新一个镜像文件。接下来你将会被告知要重启系统来激活新核心。 + +重启之后,运行下面的命令可以检查你的系统是否已经更新到最新版本,以及当前被激活的是那个核心 + + $ sudo snappy versions -a + +经过更新-重启的操作,你应该可以看到被激活的核心已经被改变了。 + +因为到目前为止我们还没有安装任何软件,下面的命令: + + $ sudo snappy update ubuntu-core + +将会生效,而且如果你打算仅仅更新特定的OS,这也是一个办法。如果出了问题,你可以使用下面的命令回滚: + + $ sudo snappy rollback ubuntu-core + +这将会把系统状态回滚到更新之前。 + +![](https://farm8.staticflickr.com/7666/17022676786_5fe6804ed8_c.jpg) + +再来说说那些让Snappy 有用的软件。这里不会讲的太多关于如何构建软件、向Snappy 应用商店添加软件的基础知识,但是你可以通过Freenode 上的IRC 频道#snappy 了解更多信息,那个上面有很多人参与。你可以通过浏览器访问http://:4200 来浏览应用商店,然后从商店安装软件,再在浏览器里访问http://webdm.local 来启动程序。如何构建用于Snappy 的软件并不难,而且也有了现成的[参考文档][4] 。你也可以很容易的把DEB 安装包使用Snappy 格式移植到Snappy 上。 + +![](https://farm8.staticflickr.com/7656/17022676836_968a2a7254_c.jpg) + +尽管Ubuntu Snappy Core 吸引我们去研究新型的Snappy 安装包格式和Canonical 式的原子更新操作,但是因为有限的可用应用,它现在在生产环境里还不是很有用。但是既然搭建一个Snappy 环境如此简单,这看起来是一个学点新东西的好机会。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/ubuntu-snappy-core-raspberry-pi-2.html + +作者:[Ferdinand Thommes][a] +译者:[译者ID](https://github.com/oska874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/ferdinand +[1]:http://www.ubuntu.com/things +[2]:http://www.raspberrypi.org/downloads/ +[3]:http://xmodulo.com/write-raspberry-pi-image-sd-card.html +[4]:https://developer.ubuntu.com/en/snappy/ From 9e78da3fe288fdc6346cc4cefff359b1f56d8915 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 3 Aug 2015 16:00:21 +0800 Subject: [PATCH 1580/2517] =?UTF-8?q?20150803-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ds for profiling your Unix file systems.md | 64 +++ sources/tech/20150803 Linux Logging Basics.md | 90 ++++ sources/tech/20150803 Managing Linux Logs.md | 418 ++++++++++++++++++ ...0150803 Troubleshooting with Linux Logs.md | 116 +++++ 4 files changed, 688 insertions(+) create mode 100644 sources/tech/20150803 Handy commands for profiling your Unix file systems.md create mode 100644 sources/tech/20150803 Linux Logging Basics.md create mode 100644 sources/tech/20150803 Managing Linux Logs.md create mode 100644 sources/tech/20150803 Troubleshooting with Linux Logs.md diff --git a/sources/tech/20150803 Handy commands for profiling your Unix file systems.md b/sources/tech/20150803 Handy commands for profiling your Unix file systems.md new file mode 100644 index 0000000000..ae5951b0d7 --- /dev/null +++ b/sources/tech/20150803 Handy commands for profiling your Unix file systems.md @@ -0,0 +1,64 @@ +Handy commands for profiling your Unix file systems +================================================================================ +![Credit: Sandra H-S](http://images.techhive.com/images/article/2015/07/file-profile-100597239-primary.idge.png) +Credit: Sandra H-S + +One of the problems that seems to plague nearly all file systems -- Unix and others -- is the continuous buildup of files. Almost no one takes the time to clean out files that they no longer use and file systems, as a result, become so cluttered with material of little or questionable value that keeping them them running well, adequately backed up, and easy to manage is a constant challenge. + +One way that I have seen to help encourage the owners of all that data detritus to address the problem is to create a summary report or "profile" of a file collection that reports on such things as the number of files; the oldest, newest, and largest of those files; and a count of who owns those files. If someone realizes that a collection of half a million files contains none less than five years old, they might go ahead and remove them -- or, at least, archive and compress them. The basic problem is that huge collections of files are overwhelming and most people are afraid that they might accidentally delete something important. Having a way to characterize a file collection can help demonstrate the nature of the content and encourage those digital packrats to clean out their nests. + +When I prepare a file system summary report on Unix, a handful of Unix commands easily provide some very useful statistics. To count the files in a directory, you can use a find command like this. + + $ find . -type f | wc -l + 187534 + +Finding the oldest and newest files is a bit more complicated, but still quite easy. In the commands below, we're using the find command again to find files, displaying the data with a year-month-day format that makes it possible to sort by file age, and then displaying the top -- thus the oldest -- file in that list. + +In the second command, we do the same, but print the last line -- thus the newest -- file. + + $ find -type f -printf '%T+ %p\n' | sort | head -n 1 + 2006-02-03+02:40:33 ./skel/.xemacs/init.el + $ find -type f -printf '%T+ %p\n' | sort | tail -n 1 + 2015-07-19+14:20:16 ./.bash_history + +The %T (file date and time) and %p (file name with path) parameters with the printf command allow this to work. + +If we're looking at home directories, we're undoubtedly going to find that history files are the newest files and that isn't likely to be a very interesting bit of information. You can omit those files by "un-grepping" them or you can omit all files that start with dots as shown below. + + $ find -type f -printf '%T+ %p\n' | grep -v "\./\." | sort | tail -n 1 + 2015-07-19+13:02:12 ./isPrime + +Finding the largest file involves using the %s (size) parameter and we include the file name (%f) since that's what we want the report to show. + + $ find -type f -printf '%s %f \n' | sort -n | uniq | tail -1 + 20183040 project.org.tar + +To summarize file ownership, use the %u (owner) + + $ find -type f -printf '%u \n' | grep -v "\./\." | sort | uniq -c + 180034 shs + 7500 jdoe + +If your file system also records the last access date, it can be very useful to show that files haven't been accessed in, say, more than two years. This would give your reviewers an important insight into the value of those files. The last access parameter (%a) could be used like this: + + $ find -type f -printf '%a+ %p\n' | sort | head -n 1 + Fri Dec 15 03:00:30 2006+ ./statreport + +Of course, if the most recently accessed file is also in the deep dark past, that's likely to get even more of a reaction. + + $ find -type f -printf '%a+ %p\n' | sort | tail -n 1 + Wed Nov 26 03:00:27 2007+ ./my-notes + +Getting a sense of what's in a file system or large directory by creating a summary report showing the file date ranges, the largest files, the file owners, and the oldest and new access times can help to demonstrate how current and how important a file collection is and help its owners decide if it's time to clean up. + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/2949898/linux/profiling-your-file-systems.html + +作者:[Sandra Henry-Stocker][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.itworld.com/author/Sandra-Henry_Stocker/ \ No newline at end of file diff --git a/sources/tech/20150803 Linux Logging Basics.md b/sources/tech/20150803 Linux Logging Basics.md new file mode 100644 index 0000000000..d20f68f140 --- /dev/null +++ b/sources/tech/20150803 Linux Logging Basics.md @@ -0,0 +1,90 @@ +Linux Logging Basics +================================================================================ +First we’ll describe the basics of what Linux logs are, where to find them, and how they get created. If you already know this stuff, feel free to skip to the next section. + +### Linux System Logs ### + +Many valuable log files are automatically created for you by Linux. You can find them in your /var/log directory. Here is what this directory looks like on a typical Ubuntu system: + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Linux-system-log-terminal.png) + +Some of the most important Linux system logs include: + +- /var/log/syslog or /var/log/messages stores all global system activity data, including startup messages. Debian-based systems like Ubuntu store this in /var/log/syslog. RedHat-based systems like RHEL or CentOS store this in /var/log/messages. +- /var/log/auth.log or /var/log/secure stores logs from the Pluggable Authentication Module (pam) including successful logins, failed login attempts, and authentication methods. Ubuntu and Debian store authentication messages in /var/log/auth.log. RedHat and CentOS store this data in /var/log/secure. +- /var/log/kern stores kernel error and warning data, which is particularly helpful for troubleshooting custom kernels. +- /var/log/cron stores information about cron jobs. Use this data to verify that your cron jobs are running successfully. + +Digital Ocean has a thorough [tutorial][1] on these files and how rsyslog creates them on common distributions like RedHat and CentOS. + +Applications also write log files in this directory. For example, popular servers like Apache, Nginx, MySQL, and more can write log files here. Some of these log files are written by the application itself. Others are created through syslog (see below). + +### What’s Syslog? ### + +How do Linux system log files get created? The answer is through the syslog daemon, which listens for log messages on the syslog socket /dev/log and then writes them to the appropriate log file. + +The word “syslog” is an overloaded term and is often used in short to refer to one of these: + +1. **Syslog daemon** — a program to receive, process, and send syslog messages. It can [send syslog remotely][2] to a centralized server or write it to a local file. Common examples include rsyslogd and syslog-ng. In this usage, people will often say “sending to syslog.” +1. **Syslog protocol** — a transport protocol specifying how logs can be sent over a network and a data format definition for syslog messages (below). It’s officially defined in [RFC-5424][3]. The standard ports are 514 for plaintext logs and 6514 for encrypted logs. In this usage, people will often say “sending over syslog.” +1. **Syslog messages** — log messages or events in the syslog format, which includes a header with several standard fields. In this usage, people will often say “sending syslog.” + +Syslog messages or events include a header with several standard fields, making analysis and routing easier. They include the timestamp, the name of the application, the classification or location in the system where the message originates, and the priority of the issue. + +Here is an example log message with the syslog header included. It’s from the sshd daemon, which controls remote logins to the system. This message describes a failed login attempt: + + <34>1 2003-10-11T22:14:15.003Z server1.com sshd - - pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.0.2.2 + +### Syslog Format and Fields ### + +Each syslog message includes a header with fields. Fields are structured data that makes it easier to analyze and route the events. Here is the format we used to generate the above syslog example. You can match each value to a specific field name. + + <%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% %msg%n + +Below, you’ll find descriptions of some of the most commonly used syslog fields when searching or troubleshooting issues. + +#### Timestamp #### + +The [timestamp][4] field (2003-10-11T22:14:15.003Z in the example) indicates the time and date that the message was generated on the system sending the message. That time can be different from when another system receives the message. The example timestamp breaks down like this: + +- **2003-10-11** is the year, month, and day. +- **T** is a required element of the TIMESTAMP field, separating the date and the time. +- **22:14:15.003** is the 24-hour format of the time, including the number of milliseconds (**003**) into the next second. +- **Z** is an optional element, indicating UTC time. Instead of Z, the example could have included an offset, such as -08:00, which indicates that the time is offset from UTC by 8 hours, PST. + +#### Hostname #### + +The [hostname][5] field (server1.com in the example above) indicates the name of the host or system that sent the message. + +#### App-Name #### + +The [app-name][6] field (sshd:auth in the example) indicates the name of the application that sent the message. + +#### Priority #### + +The priority field or [pri][7] for short (<34> in the example above) tells you how urgent or severe the event is. It’s a combination of two numerical fields: the facility and the severity. The severity ranges from the number 7 for debug events all the way to 0 which is an emergency. The facility describes which process created the event. It ranges from 0 for kernel messages to 23 for local application use. + +Pri can be output in two ways. The first is as a single number prival which is calculated as the facility field value multiplied by 8, then the result is added to the severity field value: (facility)(8) + (severity). The second is pri-text which will output in the string format “facility.severity.” The latter format can often be easier to read and search but takes up more storage space. + +-------------------------------------------------------------------------------- + +via: http://www.loggly.com/ultimate-guide/logging/linux-logging-basics/ + +作者:[Jason Skowronski][a1] +作者:[Amy Echeverri][a2] +作者:[Sadequl Hussain][a3] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a1]:https://www.linkedin.com/in/jasonskowronski +[a2]:https://www.linkedin.com/in/amyecheverri +[a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 +[1]:https://www.digitalocean.com/community/tutorials/how-to-view-and-configure-linux-logs-on-ubuntu-and-centos +[2]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.y2e9tdfk1cdb +[3]:https://tools.ietf.org/html/rfc5424 +[4]:https://tools.ietf.org/html/rfc5424#section-6.2.3 +[5]:https://tools.ietf.org/html/rfc5424#section-6.2.4 +[6]:https://tools.ietf.org/html/rfc5424#section-6.2.5 +[7]:https://tools.ietf.org/html/rfc5424#section-6.2.1 \ No newline at end of file diff --git a/sources/tech/20150803 Managing Linux Logs.md b/sources/tech/20150803 Managing Linux Logs.md new file mode 100644 index 0000000000..d68adddf52 --- /dev/null +++ b/sources/tech/20150803 Managing Linux Logs.md @@ -0,0 +1,418 @@ +Managing Linux Logs +================================================================================ +A key best practice for logging is to centralize or aggregate your logs in one place, especially if you have multiple servers or tiers in your architecture. We’ll tell you why this is a good idea and give tips on how to do it easily. + +### Benefits of Centralizing Logs ### + +It can be cumbersome to look at individual log files if you have many servers. Modern web sites and services often include multiple tiers of servers, distributed with load balancers, and more. It’d take a long time to hunt down the right file, and even longer to correlate problems across servers. There’s nothing more frustrating than finding the information you are looking for hasn’t been captured, or the log file that could have held the answer has just been lost after a restart. + +Centralizing your logs makes them faster to search, which can help you solve production issues faster. You don’t have to guess which server had the issue because all the logs are in one place. Additionally, you can use more powerful tools to analyze them, including log management solutions. These solutions can [transform plain text logs][1] into fields that can be easily searched and analyzed. + +Centralizing your logs also makes them easier to manage: + +- They are safer from accidental or intentional loss when they are backed up and archived in a separate location. If your servers go down or are unresponsive, you can use the centralized logs to debug the problem. +- You don’t have to worry about ssh or inefficient grep commands requiring more resources on troubled systems. +- You don’t have to worry about full disks, which can crash your servers. +- You can keep your production servers secure without giving your entire team access just to look at logs. It’s much safer to give your team access to logs from the central location. + +With centralized log management, you still must deal with the risk of being unable to transfer logs to the centralized location due to poor network connectivity or of using up a lot of network bandwidth. We’ll discuss how to intelligently address these issues in the sections below. + +### Popular Tools for Centralizing Logs ### + +The most common way of centralizing logs on Linux is by using syslog daemons or agents. The syslog daemon supports local log collection, then transports logs through the syslog protocol to a central server. There are several popular daemons that you can use to centralize your log files: + +- [rsyslog][2] is a light-weight daemon installed on most common Linux distributions. +- [syslog-ng][3] is the second most popular syslog daemon for Linux. +- [logstash][4] is a heavier-weight agent that can do more advanced processing and parsing. +- [fluentd][5] is another agent with advanced processing capabilities. + +Rsyslog is the most popular daemon for centralizing your log data because it’s installed by default in most common distributions of Linux. You don’t need to download it or install it, and it’s lightweight so it won’t take up much of your system resources. + +If you need more advanced filtering or custom parsing capabilities, Logstash is the next most popular choice if you don’t mind the extra system footprint. + +### Configure Rsyslog.conf ### + +Since rsyslog is the most widely used syslog daemon, we’ll show how to configure it to centralize logs. The global configuration file is located at /etc/rsyslog.conf. It loads modules, sets global directives, and has an include for application-specific files located in the directory /etc/rsyslog.d/. This directory contains /etc/rsyslog.d/50-default.conf which instructs rsyslog to write the system logs to file. You can read more about the configuration files in the [rsyslog documentation][6]. + +The configuration language for rsyslog is [RainerScript][7]. You set up specific inputs for logs as well as actions to output them to another destination. Rsyslog already configures standard defaults for syslog input, so you usually just need to add an output to your log server. Here is an example configuration for rsyslog to output logs to an external server. In this example, **BEBOP** is the hostname of the server, so you should replace it with your own server name. + + action(type="omfwd" protocol="tcp" target="BEBOP" port="514") + +You could send your logs to a log server with ample storage to keep a copy for search, backup, and analysis. If you’re storing logs in the file system, then you should set up [log rotation][8] to keep your disk from getting full. + +Alternatively, you can send these logs to a log management solution. If your solution is installed locally you can send it to your local host and port as specified in your system documentation. If you use a cloud-based provider, you will send them to the hostname and port specified by your provider. + +### Log Directories ### + +You can centralize all the files in a directory or matching a wildcard pattern. The nxlog and syslog-ng daemons support both directories and wildcards (*). + +Common versions of rsyslog can’t monitor directories directly. As a workaround, you can setup a cron job to monitor the directory for new files, then configure rsyslog to send those files to a destination, such as your log management system. As an example, the log management vendor Loggly has an open source version of a [script to monitor directories][9]. + +### Which Protocol: UDP, TCP, or RELP? ### + +There are three main protocols that you can choose from when you transmit data over the Internet. The most common is UDP for your local network and TCP for the Internet. If you cannot lose logs, then use the more advanced RELP protocol. + +[UDP][10] sends a datagram packet, which is a single packet of information. It’s an outbound-only protocol, so it doesn’t send you an acknowledgement of receipt (ACK). It makes only one attempt to send the packet. UDP can be used to smartly degrade or drop logs when the network gets congested. It’s most commonly used on reliable networks like localhost. + +[TCP][11] sends streaming information in multiple packets and returns an ACK. TCP makes multiple attempts to send the packet, but is limited by the size of the [TCP buffer][12]. This is the most common protocol for sending logs over the Internet. + +[RELP][13] is the most reliable of these three protocols but was created for rsyslog and has less industry adoption. It acknowledges receipt of data in the application layer and will resend if there is an error. Make sure your destination also supports this protocol. + +### Reliably Send with Disk Assisted Queues ### + +If rsyslog encounters a problem when storing logs, such as an unavailable network connection, it can queue the logs until the connection is restored. The queued logs are stored in memory by default. However, memory is limited and if the problem persists, the logs can exceed memory capacity. + +**Warning: You can lose data if you store logs only in memory.** + +Rsyslog can queue your logs to disk when memory is full. [Disk-assisted queues][14] make transport of logs more reliable. Here is an example of how to configure rsyslog with a disk-assisted queue: + + $WorkDirectory /var/spool/rsyslog # where to place spool files + $ActionQueueFileName fwdRule1 # unique name prefix for spool files + $ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) + $ActionQueueSaveOnShutdown on # save messages to disk on shutdown + $ActionQueueType LinkedList # run asynchronously + $ActionResumeRetryCount -1 # infinite retries if host is down + +### Encrypt Logs Using TLS ### + +When the security and privacy of your data is a concern, you should consider encrypting your logs. Sniffers and middlemen could read your log data if you transmit it over the Internet in clear text. You should encrypt your logs if they contain private information, sensitive identification data, or government-regulated data. The rsyslog daemon can encrypt your logs using the TLS protocol and keep your data safer. + +To set up TLS encryption, you need to do the following tasks: + +1. Generate a [certificate authority][15] (CA). There are sample certificates in /contrib/gnutls, which are good only for testing, but you need to create your own for production. If you’re using a log management service, it will have one ready for you. +1. Generate a [digital certificate][16] for your server to enable SSL operation, or use one from your log management service provider. +1. Configure your rsyslog daemon to send TLS-encrypted data to your log management system. + +Here’s an example rsyslog configuration with TLS encryption. Replace CERT and DOMAIN_NAME with your own server setting. + + $DefaultNetstreamDriverCAFile /etc/rsyslog.d/keys/ca.d/CERT.crt + $ActionSendStreamDriver gtls + $ActionSendStreamDriverMode 1 + $ActionSendStreamDriverAuthMode x509/name + $ActionSendStreamDriverPermittedPeer *.DOMAIN_NAME.com + +### Best Practices for Application Logging ### + +In addition to the logs that Linux creates by default, it’s also a good idea to centralize logs from important applications. Almost all Linux-based server class applications write their status information in separate, dedicated log files. This includes database products like PostgreSQL or MySQL, web servers like Nginx or Apache, firewalls, print and file sharing services, directory and DNS servers and so on. + +The first thing administrators do after installing an application is to configure it. Linux applications typically have a .conf file somewhere within the /etc directory. It can be somewhere else too, but that’s the first place where people look for configuration files. + +Depending on how complex or large the application is, the number of settable parameters can be few or in hundreds. As mentioned before, most applications would write their status in some sort of log file: configuration file is where log settings are defined among other things. + +If you’re not sure where it is, you can use the locate command to find it: + + [root@localhost ~]# locate postgresql.conf + /usr/pgsql-9.4/share/postgresql.conf.sample + /var/lib/pgsql/9.4/data/postgresql.conf + +#### Set a Standard Location for Log Files #### + +Linux systems typically save their log files under /var/log directory. This works fine, but check if the application saves under a specific directory under /var/log. If it does, great, if not, you may want to create a dedicated directory for the app under /var/log. Why? That’s because other applications save their log files under /var/log too and if your app saves more than one log file – perhaps once every day or after each service restart – it may be a bit difficult to trawl through a large directory to find the file you want. + +If you have the more than one instance of the application running in your network, this approach also comes handy. Think about a situation where you may have a dozen web servers running in your network. When troubleshooting any one of the boxes, you would know exactly where to go. + +#### Use A Standard Filename #### + +Use a standard filename for the latest logs from your application. This makes it easy because you can monitor and tail a single file. Many applications add some sort of date time stamp in them. This makes it much more difficult to find the latest file and to setup file monitoring by rsyslog. A better approach is to add timestamps to older log files using logrotate. This makes them easier to archive and search historically. + +#### Append the Log File #### + +Is the log file going to be overwritten after each application restart? If so, we recommend turning that off. After each restart the app should append to the log file. That way, you can always go back to the last log line before the restart. + +#### Appending vs. Rotation of Log File #### + +Even if the application writes a new log file after each restart, how is it saving in the current log? Is it appending to one single, massive file? Linux systems are not known for frequent reboots or crashes: applications can run for very long periods without even blinking, but that can also make the log file very large. If you are trying to analyze the root cause of a connection failure that happened last week, you could easily be searching through tens of thousands of lines. + +We recommend you configure the application to rotate its log file once every day, say at mid-night. + +Why? Well it becomes manageable for a starter. It’s much easier to find a file name with a specific date time pattern than to search through one file for that date’s entries. Files are also much smaller: you don’t think vi has frozen when you open a log file. Secondly, if you are sending the log file over the wire to a different location – perhaps a nightly backup job copying to a centralized log server – it doesn’t chew up your network’s bandwidth. Third and final, it helps with your log retention. If you want to cull old log entries, it’s easier to delete files older than a particular date than to have an application parsing one single large file. + +#### Retention of Log File #### + +How long do you keep a log file? That definitely comes down to business requirement. You could be asked to keep one week’s worth of logging information, or it may be a regulatory requirement to keep ten years’ worth of data. Whatever it is, logs need to go from the server at one time or other. + +In our opinion, unless otherwise required, keep at least a month’s worth of log files online, plus copy them to a secondary location like a logging server. Anything older than that can be offloaded to a separate media. For example, if you are on AWS, your older logs can be copied to Glacier. + +#### Separate Disk Location for Log Files #### + +Linux best practice usually suggests mounting the /var directory to a separate file system. This is because of the high number of I/Os associated with this directory. We would recommend mounting /var/log directory under a separate disk system. This can save I/O contention with the main application’s data. Also, if the number of log files becomes too large or the single log file becomes too big, it doesn’t fill up the entire disk. + +#### Log Entries #### + +What information should be captured in each log entry? + +That depends on what you want to use the log for. Do you want to use it only for troubleshooting purposes, or do you want to capture everything that’s happening? Is it a legal requirement to capture what each user is running or viewing? + +If you are using logs for troubleshooting purposes, save only errors, warnings or fatal messages. There’s no reason to capture debug messages, for example. The app may log debug messages by default or another administrator might have turned this on for another troubleshooting exercise, but you need to turn this off because it can definitely fill up the space quickly. At a minimum, capture the date, time, client application name, source IP or client host name, action performed and the message itself. + +#### A Practical Example for PostgreSQL #### + +As an example, let’s look at the main configuration file for a vanilla PostgreSQL 9.4 installation. It’s called postgresql.conf and contrary to other config files in Linux systems, it’s not saved under /etc directory. In the code snippet below, we can see it’s in /var/lib/pgsql directory of our CentOS 7 server: + + root@localhost ~]# vi /var/lib/pgsql/9.4/data/postgresql.conf + ... + #------------------------------------------------------------------------------ + # ERROR REPORTING AND LOGGING + #------------------------------------------------------------------------------ + # - Where to Log - + log_destination = 'stderr' + # Valid values are combinations of + # stderr, csvlog, syslog, and eventlog, + # depending on platform. csvlog + # requires logging_collector to be on. + # This is used when logging to stderr: + logging_collector = on + # Enable capturing of stderr and csvlog + # into log files. Required to be on for + # csvlogs. + # (change requires restart) + # These are only used if logging_collector is on: + log_directory = 'pg_log' + # directory where log files are written, + # can be absolute or relative to PGDATA + log_filename = 'postgresql-%a.log' # log file name pattern, + # can include strftime() escapes + # log_file_mode = 0600 . + # creation mode for log files, + # begin with 0 to use octal notation + log_truncate_on_rotation = on # If on, an existing log file with the + # same name as the new log file will be + # truncated rather than appended to. + # But such truncation only occurs on + # time-driven rotation, not on restarts + # or size-driven rotation. Default is + # off, meaning append to existing files + # in all cases. + log_rotation_age = 1d + # Automatic rotation of logfiles will happen after that time. 0 disables. + log_rotation_size = 0 # Automatic rotation of logfiles will happen after that much log output. 0 disables. + # These are relevant when logging to syslog: + #syslog_facility = 'LOCAL0' + #syslog_ident = 'postgres' + # This is only relevant when logging to eventlog (win32): + #event_source = 'PostgreSQL' + # - When to Log - + #client_min_messages = notice # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # log + # notice + # warning + # error + #log_min_messages = warning # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic + #log_min_error_statement = error # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic (effectively off) + #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements + # and their durations, > 0 logs only + # statements running at least this number + # of milliseconds + # - What to Log + #debug_print_parse = off + #debug_print_rewritten = off + #debug_print_plan = off + #debug_pretty_print = on + #log_checkpoints = off + #log_connections = off + #log_disconnections = off + #log_duration = off + #log_error_verbosity = default + # terse, default, or verbose messages + #log_hostname = off + log_line_prefix = '< %m >' # special values: + # %a = application name + # %u = user name + # %d = database name + # %r = remote host and port + # %h = remote host + # %p = process ID + # %t = timestamp without milliseconds + # %m = timestamp with milliseconds + # %i = command tag + # %e = SQL state + # %c = session ID + # %l = session line number + # %s = session start timestamp + # %v = virtual transaction ID + # %x = transaction ID (0 if none) + # %q = stop here in non-session + # processes + # %% = '%' + # e.g. '<%u%%%d> ' + #log_lock_waits = off # log lock waits >= deadlock_timeout + #log_statement = 'none' # none, ddl, mod, all + #log_temp_files = -1 # log temporary files equal or larger + # than the specified size in kilobytes;5# -1 disables, 0 logs all temp files5 + log_timezone = 'Australia/ACT' + +Although most parameters are commented out, they assume default values. We can see the log file directory is pg_log (log_directory parameter), the file names should start with postgresql (log_filename parameter), the files are rotated once every day (log_rotation_age parameter) and the log entries start with a timestamp (log_line_prefix parameter). Of particular interest is the log_line_prefix parameter: there is a whole gamut of information you can include there. + +Looking under /var/lib/pgsql/9.4/data/pg_log directory shows us these files: + + [root@localhost ~]# ls -l /var/lib/pgsql/9.4/data/pg_log + total 20 + -rw-------. 1 postgres postgres 1212 May 1 20:11 postgresql-Fri.log + -rw-------. 1 postgres postgres 243 Feb 9 21:49 postgresql-Mon.log + -rw-------. 1 postgres postgres 1138 Feb 7 11:08 postgresql-Sat.log + -rw-------. 1 postgres postgres 1203 Feb 26 21:32 postgresql-Thu.log + -rw-------. 1 postgres postgres 326 Feb 10 01:20 postgresql-Tue.log + +So the log files only have the name of the weekday stamped in the file name. We can change it. How? Configure the log_filename parameter in postgresql.conf. + +Looking inside one log file shows its entries start with date time only: + + [root@localhost ~]# cat /var/lib/pgsql/9.4/data/pg_log/postgresql-Fri.log + ... + < 2015-02-27 01:21:27.020 EST >LOG: received fast shutdown request + < 2015-02-27 01:21:27.025 EST >LOG: aborting any active transactions + < 2015-02-27 01:21:27.026 EST >LOG: autovacuum launcher shutting down + < 2015-02-27 01:21:27.036 EST >LOG: shutting down + < 2015-02-27 01:21:27.211 EST >LOG: database system is shut down + +### Centralizing Application Logs ### + +#### Log File Monitoring with Imfile #### + +Traditionally, the most common way for applications to log their data is with files. Files are easy to search on a single machine but don’t scale well with more servers. You can set up log file monitoring and send the events to a centralized server when new logs are appended to the bottom. Create a new configuration file in /etc/rsyslog.d/ then add a file input like this: + + $ModLoad imfile + $InputFilePollInterval 10 + $PrivDropToGroup adm + +---------- + + # Input for FILE1 + $InputFileName /FILE1 + $InputFileTag APPNAME1 + $InputFileStateFile stat-APPNAME1 #this must be unique for each file being polled + $InputFileSeverity info + $InputFilePersistStateInterval 20000 + $InputRunFileMonitor + +Replace FILE1 and APPNAME1 with your own file and application names. Rsyslog will send it to the outputs you have configured. + +#### Local Socket Logs with Imuxsock #### + +A socket is similar to a UNIX file handle except that the socket is read into memory by your syslog daemon and then sent to the destination. No file needs to be written. As an example, the logger command sends its logs to this UNIX socket. + +This approach makes efficient use of system resources if your server is constrained by disk I/O or you have no need for local file logs. The disadvantage of this approach is that the socket has a limited queue size. If your syslog daemon goes down or can’t keep up, then you could lose log data. + +The rsyslog daemon will read from the /dev/log socket by default, but you can specifically enable it with the [imuxsock input module][17] using the following command: + + $ModLoad imuxsock + +#### UDP Logs with Imupd #### + +Some applications output log data in UDP format, which is the standard syslog protocol when transferring log files over a network or your localhost. Your syslog daemon receives these logs and can process them or transmit them in a different format. Alternately, you can send the logs to your log server or to a log management solution. + +Use the following command to configure rsyslog to accept syslog data over UDP on the standard port 514: + + $ModLoad imudp + +---------- + + $UDPServerRun 514 + +### Manage Logs with Logrotate ### + +Log rotation is a process that archives log files automatically when they reach a specified age. Without intervention, log files keep growing, using up disk space. Eventually they will crash your machine. + +The logrotate utility can truncate your logs as they age, freeing up space. Your new log file retains the filename. Your old log file is renamed with a number appended to the end of it. Each time the logrotate utility runs, a new file is created and the existing file is renamed in sequence. You determine the threshold when old files are deleted or archived. + +When logrotate copies a file, the new file has a new inode, which can interfere with rsyslog’s ability to monitor the new file. You can alleviate this issue by adding the copytruncate parameter to your logrotate cron job. This parameter copies existing log file contents to a new file and truncates these contents from the existing file. The inode never changes because the log file itself remains the same; its contents are in a new file. + +The logrotate utility uses the main configuration file at /etc/logrotate.conf and application-specific settings in the directory /etc/logrotate.d/. DigitalOcean has a detailed [tutorial on logrotate][18]. + +### Manage Configuration on Many Servers ### + +When you have just a few servers, you can manually configure logging on them. Once you have a few dozen or more servers, you can take advantage of tools that make this easier and more scalable. At a basic level, all of these copy your rsyslog configuration to each server, and then restart rsyslog so the changes take effect. + +#### Pssh #### + +This tool lets you run an ssh command on several servers in parallel. Use a pssh deployment for only a small number of servers. If one of your servers fails, then you have to ssh into the failed server and do the deployment manually. If you have several failed servers, then the manual deployment on them can take a long time. + +#### Puppet/Chef #### + +Puppet and Chef are two different tools that can automatically configure all of the servers in your network to a specified standard. Their reporting tools let you know about failures and can resync periodically. Both Puppet and Chef have enthusiastic supporters. If you aren’t sure which one is more suitable for your deployment configuration management, you might appreciate [InfoWorld’s comparison of the two tools][19]. + +Some vendors also offer modules or recipes for configuring rsyslog. Here is an example from Loggly’s Puppet module. It offers a class for rsyslog to which you can add an identifying token: + + node 'my_server_node.example.net' { + # Send syslog events to Loggly + class { 'loggly::rsyslog': + customer_token => 'de7b5ccd-04de-4dc4-fbc9-501393600000', + } + } + +#### Docker #### + +Docker uses containers to run applications independent of the underlying server. Everything runs from inside a container, which you can think of as a unit of functionality. ZDNet has an in-depth article about [using Docker][20] in your data center. + +There are several ways to log from Docker containers including linking to a logging container, logging to a shared volume, or adding a syslog agent directly inside the container. One of the most popular logging containers is called [logspout][21]. + +#### Vendor Scripts or Agents #### + +Most log management solutions offer scripts or agents to make sending data from one or more servers relatively easy. Heavyweight agents can use up extra system resources. Some vendors like Loggly offer configuration scripts to make using existing syslog daemons easier. Here is an example [script][22] from Loggly which can run on any number of servers. + +-------------------------------------------------------------------------------- + +via: http://www.loggly.com/ultimate-guide/logging/managing-linux-logs/ + +作者:[Jason Skowronski][a1] +作者:[Amy Echeverri][a2] +作者:[Sadequl Hussain][a3] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a1]:https://www.linkedin.com/in/jasonskowronski +[a2]:https://www.linkedin.com/in/amyecheverri +[a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 +[1]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.esrreycnpnbl +[2]:http://www.rsyslog.com/ +[3]:http://www.balabit.com/network-security/syslog-ng/opensource-logging-system +[4]:http://logstash.net/ +[5]:http://www.fluentd.org/ +[6]:http://www.rsyslog.com/doc/rsyslog_conf.html +[7]:http://www.rsyslog.com/doc/master/rainerscript/index.html +[8]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.eck7acdxin87 +[9]:https://www.loggly.com/docs/file-monitoring/ +[10]:http://www.networksorcery.com/enp/protocol/udp.htm +[11]:http://www.networksorcery.com/enp/protocol/tcp.htm +[12]:http://blog.gerhards.net/2008/04/on-unreliability-of-plain-tcp-syslog.html +[13]:http://www.rsyslog.com/doc/relp.html +[14]:http://www.rsyslog.com/doc/queues.html +[15]:http://www.rsyslog.com/doc/tls_cert_ca.html +[16]:http://www.rsyslog.com/doc/tls_cert_machine.html +[17]:http://www.rsyslog.com/doc/v8-stable/configuration/modules/imuxsock.html +[18]:https://www.digitalocean.com/community/tutorials/how-to-manage-log-files-with-logrotate-on-ubuntu-12-10 +[19]:http://www.infoworld.com/article/2614204/data-center/puppet-or-chef--the-configuration-management-dilemma.html +[20]:http://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-popular/ +[21]:https://github.com/progrium/logspout +[22]:https://www.loggly.com/docs/sending-logs-unixlinux-system-setup/ \ No newline at end of file diff --git a/sources/tech/20150803 Troubleshooting with Linux Logs.md b/sources/tech/20150803 Troubleshooting with Linux Logs.md new file mode 100644 index 0000000000..8f595427a9 --- /dev/null +++ b/sources/tech/20150803 Troubleshooting with Linux Logs.md @@ -0,0 +1,116 @@ +Troubleshooting with Linux Logs +================================================================================ +Troubleshooting is the main reason people create logs. Often you’ll want to diagnose why a problem happened with your Linux system or application. An error message or a sequence of events can give you clues to the root cause, indicate how to reproduce the issue, and point out ways to fix it. Here are a few use cases for things you might want to troubleshoot in your logs. + +### Cause of Login Failures ### + +If you want to check if your system is secure, you can check your authentication logs for failed login attempts and unfamiliar successes. Authentication failures occur when someone passes incorrect or otherwise invalid login credentials, often to ssh for remote access or su for local access to another user’s permissions. These are logged by the [pluggable authentication module][1], or pam for short. Look in your logs for strings like Failed password and user unknown. Successful authentication records include strings like Accepted password and session opened. + +Failure Examples: + + pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.0.2.2 + Failed password for invalid user hoover from 10.0.2.2 port 4791 ssh2 + pam_unix(sshd:auth): check pass; user unknown + PAM service(sshd) ignoring max retries; 6 > 3 + +Success Examples: + + Accepted password for hoover from 10.0.2.2 port 4792 ssh2 + pam_unix(sshd:session): session opened for user hoover by (uid=0) + pam_unix(sshd:session): session closed for user hoover + +You can use grep to find which users accounts have the most failed logins. These are the accounts that potential attackers are trying and failing to access. This example is for an Ubuntu system. + + $ grep "invalid user" /var/log/auth.log | cut -d ' ' -f 10 | sort | uniq -c | sort -nr + 23 oracle + 18 postgres + 17 nagios + 10 zabbix + 6 test + +You’ll need to write a different command for each application and message because there is no standard format. Log management systems that automatically parse logs will effectively normalize them and help you extract key fields like username. + +Log management systems can extract the usernames from your Linux logs using automated parsing. This lets you see an overview of the users and filter on them with a single click. In this example, we can see that the root user logged in over 2,700 times because we are filtering the logs to show login attempts only for the root user. + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.05.36-AM.png) + +Log management systems also let you view graphs over time to spot unusual trends. If someone had one or two failed logins within a few minutes, it might be that a real user forgot his or her password. However, if there are hundreds of failed logins or they are all different usernames, it’s more likely that someone is trying to attack the system. Here you can see that on March 12, someone tried to login as test and nagios several hundred times. This is clearly not a legitimate use of the system. + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.12.18-AM.png) + +### Cause of Reboots ### + +Sometimes a server can stop due to a system crash or reboot. How do you know when it happened and who did it? + +#### Shutdown Command #### + +If someone ran the shutdown command manually, you can see it in the auth log file. Here you can see that someone remotely logged in from the IP 50.0.134.125 as the user ubuntu and then shut the system down. + + Mar 19 18:36:41 ip-172-31-11-231 sshd[23437]: Accepted publickey for ubuntu from 50.0.134.125 port 52538 ssh + Mar 19 18:36:41 ip-172-31-11-231 23437]:sshd[ pam_unix(sshd:session): session opened for user ubuntu by (uid=0) + Mar 19 18:37:09 ip-172-31-11-231 sudo: ubuntu : TTY=pts/1 ; PWD=/home/ubuntu ; USER=root ; COMMAND=/sbin/shutdown -r now + +#### Kernel Initializing #### + +If you want to see when the server restarted regardless of reason (including crashes) you can search logs from the kernel initializing. You’d search for the facility kernel messages and Initializing cpu. + + Mar 19 18:39:30 ip-172-31-11-231 kernel: [ 0.000000] Initializing cgroup subsys cpuset + Mar 19 18:39:30 ip-172-31-11-231 kernel: [ 0.000000] Initializing cgroup subsys cpu + Mar 19 18:39:30 ip-172-31-11-231 kernel: [ 0.000000] Linux version 3.8.0-44-generic (buildd@tipua) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 (Ubuntu 3.8.0-44.66~precise1-generic 3.8.13.25) + +### Detect Memory Problems ### + +There are lots of reasons a server might crash, but one common cause is running out of memory. + +When your system is low on memory, processes are killed, typically in the order of which ones will release the most resources. The error occurs when your system is using all of its memory and a new or existing process attempts to access additional memory. Look in your log files for strings like Out of Memory or for kernel warnings like to kill. These strings indicate that your system intentionally killed the process or application rather than allowing the process to crash. + +Examples: + + [33238.178288] Out of memory: Kill process 6230 (firefox) score 53 or sacrifice child + [29923450.995084] select 5230 (docker), adj 0, size 708, to kill + +You can find these logs using a tool like grep. This example is for Ubuntu: + + $ grep “Out of memory” /var/log/syslog + [33238.178288] Out of memory: Kill process 6230 (firefox) score 53 or sacrifice child + +Keep in mind that grep itself uses memory, so you might cause an out of memory error just by running grep. This is another reason it’s a fabulous idea to centralize your logs! + +### Log Cron Job Errors ### + +The cron daemon is a scheduler that runs processes at specified dates and times. If the process fails to run or fails to finish, then a cron error appears in your log files. You can find these files in /var/log/cron, /var/log/messages, and /var/log/syslog depending on your distribution. There are many reasons a cron job can fail. Usually the problems lie with the process rather than the cron daemon itself. + +By default, cron jobs output through email using Postfix. Here is a log showing that an email was sent. Unfortunately, you cannot see the contents of the message here. + + Mar 13 16:35:01 PSQ110 postfix/pickup[15158]: C3EDC5800B4: uid=1001 from= + Mar 13 16:35:01 PSQ110 postfix/cleanup[15727]: C3EDC5800B4: message-id=<20150310110501.C3EDC5800B4@PSQ110> + Mar 13 16:35:01 PSQ110 postfix/qmgr[15159]: C3EDC5800B4: from=, size=607, nrcpt=1 (queue active) + Mar 13 16:35:05 PSQ110 postfix/smtp[15729]: C3EDC5800B4: to=, relay=gmail-smtp-in.l.google.com[74.125.130.26]:25, delay=4.1, delays=0.26/0/2.2/1.7, dsn=2.0.0, status=sent (250 2.0.0 OK 1425985505 f16si501651pdj.5 - gsmtp) + +You should consider logging the cron standard output to help debug problems. Here is how you can redirect your cron standard output to syslog using the logger command. Replace the echo command with your own script and helloCron with whatever you want to set the appName to. + + */5 * * * * echo ‘Hello World’ 2>&1 | /usr/bin/logger -t helloCron + +Which creates the log entries: + + Apr 28 22:20:01 ip-172-31-11-231 CRON[15296]: (ubuntu) CMD (echo 'Hello World!' 2>&1 | /usr/bin/logger -t helloCron) + Apr 28 22:20:01 ip-172-31-11-231 helloCron: Hello World! + +Each cron job will log differently based on the specific type of job and how it outputs data. Hopefully there are clues to the root cause of problems within the logs, or you can add additional logging as needed. + +-------------------------------------------------------------------------------- + +via: http://www.loggly.com/ultimate-guide/logging/troubleshooting-with-linux-logs/ + +作者:[Jason Skowronski][a1] +作者:[Amy Echeverri][a2] +作者:[Sadequl Hussain][a3] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a1]:https://www.linkedin.com/in/jasonskowronski +[a2]:https://www.linkedin.com/in/amyecheverri +[a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 +[1]:http://linux.die.net/man/8/pam.d \ No newline at end of file From c06d768d03a95906e23bb18e5f4db16df178c668 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 3 Aug 2015 19:52:52 +0800 Subject: [PATCH 1581/2517] Update 20150803 Handy commands for profiling your Unix file systems.md --- ...0803 Handy commands for profiling your Unix file systems.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150803 Handy commands for profiling your Unix file systems.md b/sources/tech/20150803 Handy commands for profiling your Unix file systems.md index ae5951b0d7..359aba14c9 100644 --- a/sources/tech/20150803 Handy commands for profiling your Unix file systems.md +++ b/sources/tech/20150803 Handy commands for profiling your Unix file systems.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Handy commands for profiling your Unix file systems ================================================================================ ![Credit: Sandra H-S](http://images.techhive.com/images/article/2015/07/file-profile-100597239-primary.idge.png) @@ -61,4 +62,4 @@ via: http://www.itworld.com/article/2949898/linux/profiling-your-file-systems.ht 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.itworld.com/author/Sandra-Henry_Stocker/ \ No newline at end of file +[a]:http://www.itworld.com/author/Sandra-Henry_Stocker/ From 6660ef7b90c207bfa032b6db21ae448434ecfa47 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 3 Aug 2015 19:55:12 +0800 Subject: [PATCH 1582/2517] Update 20150803 Troubleshooting with Linux Logs.md --- sources/tech/20150803 Troubleshooting with Linux Logs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150803 Troubleshooting with Linux Logs.md b/sources/tech/20150803 Troubleshooting with Linux Logs.md index 8f595427a9..9ee0820a9c 100644 --- a/sources/tech/20150803 Troubleshooting with Linux Logs.md +++ b/sources/tech/20150803 Troubleshooting with Linux Logs.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Troubleshooting with Linux Logs ================================================================================ Troubleshooting is the main reason people create logs. Often you’ll want to diagnose why a problem happened with your Linux system or application. An error message or a sequence of events can give you clues to the root cause, indicate how to reproduce the issue, and point out ways to fix it. Here are a few use cases for things you might want to troubleshoot in your logs. @@ -113,4 +114,4 @@ via: http://www.loggly.com/ultimate-guide/logging/troubleshooting-with-linux-log [a1]:https://www.linkedin.com/in/jasonskowronski [a2]:https://www.linkedin.com/in/amyecheverri [a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 -[1]:http://linux.die.net/man/8/pam.d \ No newline at end of file +[1]:http://linux.die.net/man/8/pam.d From 59b2f6c25fc31bc791983d869f02b3f2bf97d78a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 3 Aug 2015 20:21:50 +0800 Subject: [PATCH 1583/2517] [Translated] tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md --- ...erver behind NAT via reverse SSH tunnel.md | 131 ------------------ ...erver behind NAT via reverse SSH tunnel.md | 131 ++++++++++++++++++ ...Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2.md} | 0 ...oncepts of RAID and RAID Levels – Part 1.md} | 0 4 files changed, 131 insertions(+), 131 deletions(-) delete mode 100644 sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md create mode 100644 translated/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md rename translated/tech/{Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2 => Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2.md} (100%) rename translated/tech/{Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 => Introduction to RAID, Concepts of RAID and RAID Levels – Part 1.md} (100%) diff --git a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md deleted file mode 100644 index 4239073013..0000000000 --- a/sources/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md +++ /dev/null @@ -1,131 +0,0 @@ -ictlyh Translating -How to access a Linux server behind NAT via reverse SSH tunnel -================================================================================ -You are running a Linux server at home, which is behind a NAT router or restrictive firewall. Now you want to SSH to the home server while you are away from home. How would you set that up? SSH port forwarding will certainly be an option. However, port forwarding can become tricky if you are dealing with multiple nested NAT environment. Besides, it can be interfered with under various ISP-specific conditions, such as restrictive ISP firewalls which block forwarded ports, or carrier-grade NAT which shares IPv4 addresses among users. - -### What is Reverse SSH Tunneling? ### - -One alternative to SSH port forwarding is **reverse SSH tunneling**. The concept of reverse SSH tunneling is simple. For this, you will need another host (so-called "relay host") outside your restrictive home network, which you can connect to via SSH from where you are. You could set up a relay host using a [VPS instance][1] with a public IP address. What you do then is to set up a persistent SSH tunnel from the server in your home network to the public relay host. With that, you can connect "back" to the home server from the relay host (which is why it's called a "reverse" tunnel). As long as the relay host is reachable to you, you can connect to your home server wherever you are, or however restrictive your NAT or firewall is in your home network. - -![](https://farm8.staticflickr.com/7742/17162647378_c7d9f10de8_b.jpg) - -### Set up a Reverse SSH Tunnel on Linux ### - -Let's see how we can create and use a reverse SSH tunnel. We assume the following. We will be setting up a reverse SSH tunnel from homeserver to relayserver, so that we can SSH to homeserver via relayserver from another computer called clientcomputer. The public IP address of **relayserver** is 1.1.1.1. - -On homeserver, open an SSH connection to relayserver as follows. - - homeserver~$ ssh -fN -R 10022:localhost:22 relayserver_user@1.1.1.1 - -Here the port 10022 is any arbitrary port number you can choose. Just make sure that this port is not used by other programs on relayserver. - -The "-R 10022:localhost:22" option defines a reverse tunnel. It forwards traffic on port 10022 of relayserver to port 22 of homeserver. - -With "-fN" option, SSH will go right into the background once you successfully authenticate with an SSH server. This option is useful when you do not want to execute any command on a remote SSH server, and just want to forward ports, like in our case. - -After running the above command, you will be right back to the command prompt of homeserver. - -Log in to relayserver, and verify that 127.0.0.1:10022 is bound to sshd. If so, that means a reverse tunnel is set up correctly. - - relayserver~$ sudo netstat -nap | grep 10022 - ----------- - - tcp 0 0 127.0.0.1:10022 0.0.0.0:* LISTEN 8493/sshd - -Now from any other computer (e.g., clientcomputer), log in to relayserver. Then access homeserver as follows. - - relayserver~$ ssh -p 10022 homeserver_user@localhost - -One thing to take note is that the SSH login/password you type for localhost should be for homeserver, not for relayserver, since you are logging in to homeserver via the tunnel's local endpoint. So do not type login/password for relayserver. After successful login, you will be on homeserver. - -### Connect Directly to a NATed Server via a Reverse SSH Tunnel ### - -While the above method allows you to reach **homeserver** behind NAT, you need to log in twice: first to **relayserver**, and then to **homeserver**. This is because the end point of an SSH tunnel on relayserver is binding to loopback address (127.0.0.1). - -But in fact, there is a way to reach NATed homeserver directly with a single login to relayserver. For this, you will need to let sshd on relayserver forward a port not only from loopback address, but also from an external host. This is achieved by specifying **GatewayPorts** option in sshd running on relayserver. - -Open /etc/ssh/sshd_conf of **relayserver** and add the following line. - - relayserver~$ vi /etc/ssh/sshd_conf - ----------- - - GatewayPorts clientspecified - -Restart sshd. - -Debian-based system: - - relayserver~$ sudo /etc/init.d/ssh restart - -Red Hat-based system: - - relayserver~$ sudo systemctl restart sshd - -Now let's initiate a reverse SSH tunnel from homeserver as follows. -homeserver~$ ssh -fN -R 1.1.1.1:10022:localhost:22 relayserver_user@1.1.1.1 - -Log in to relayserver and confirm with netstat command that a reverse SSH tunnel is established successfully. - - relayserver~$ sudo netstat -nap | grep 10022 - ----------- - - tcp 0 0 1.1.1.1:10022 0.0.0.0:* LISTEN 1538/sshd: dev - -Unlike a previous case, the end point of a tunnel is now at 1.1.1.1:10022 (relayserver's public IP address), not 127.0.0.1:10022. This means that the end point of the tunnel is reachable from an external host. - -Now from any other computer (e.g., clientcomputer), type the following command to gain access to NATed homeserver. - - clientcomputer~$ ssh -p 10022 homeserver_user@1.1.1.1 - -In the above command, while 1.1.1.1 is the public IP address of relayserver, homeserver_user must be the user account associated with homeserver. This is because the real host you are logging in to is homeserver, not relayserver. The latter simply relays your SSH traffic to homeserver. - -### Set up a Persistent Reverse SSH Tunnel on Linux ### - -Now that you understand how to create a reverse SSH tunnel, let's make the tunnel "persistent", so that the tunnel is up and running all the time (regardless of temporary network congestion, SSH timeout, relay host rebooting, etc.). After all, if the tunnel is not always up, you won't be able to connect to your home server reliably. - -For a persistent tunnel, I am going to use a tool called autossh. As the name implies, this program allows you to automatically restart an SSH session should it breaks for any reason. So it is useful to keep a reverse SSH tunnel active. - -As the first step, let's set up [passwordless SSH login][2] from homeserver to relayserver. That way, autossh can restart a broken reverse SSH tunnel without user's involvement. - -Next, [install autossh][3] on homeserver where a tunnel is initiated. - -From homeserver, run autossh with the following arguments to create a persistent SSH tunnel destined to relayserver. - - homeserver~$ autossh -M 10900 -fN -o "PubkeyAuthentication=yes" -o "StrictHostKeyChecking=false" -o "PasswordAuthentication=no" -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -R 1.1.1.1:10022:localhost:22 relayserver_user@1.1.1.1 - -The "-M 10900" option specifies a monitoring port on relayserver which will be used to exchange test data to monitor an SSH session. This port should not be used by any program on relayserver. - -The "-fN" option is passed to ssh command, which will let the SSH tunnel run in the background. - -The "-o XXXX" options tell ssh to: - -- Use key authentication, not password authentication. -- Automatically accept (unknown) SSH host keys. -- Exchange keep-alive messages every 60 seconds. -- Send up to 3 keep-alive messages without receiving any response back. - -The rest of reverse SSH tunneling related options remain the same as before. - -If you want an SSH tunnel to be automatically up upon boot, you can add the above autossh command in /etc/rc.local. - -### Conclusion ### - -In this post, I talked about how you can use a reverse SSH tunnel to access a Linux server behind a restrictive firewall or NAT gateway from outside world. While I demonstrated its use case for a home network, you must be careful when applying it for corporate networks. Such a tunnel can be considered as a breach of a corporate policy, as it circumvents corporate firewalls and can expose corporate networks to outside attacks. There is a great chance it can be misused or abused. So always remember its implication before setting it up. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/go/digitalocean -[2]:http://xmodulo.com/how-to-enable-ssh-login-without.html -[3]:http://ask.xmodulo.com/install-autossh-linux.html diff --git a/translated/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/translated/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md new file mode 100644 index 0000000000..5f9828e912 --- /dev/null +++ b/translated/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md @@ -0,0 +1,131 @@ +如何通过反向 SSH 隧道访问 NAT 后面的 Linux 服务器 +================================================================================ +你在家里运行着一台 Linux 服务器,访问它需要先经过 NAT 路由器或者限制性防火墙。现在你想不在家的时候用 SSH 登录到这台服务器。你如何才能做到呢?SSH 端口转发当然是一种选择。但是,如果你需要处理多个嵌套的 NAT 环境,端口转发可能会变得非常棘手。另外,在多种 ISP 特定条件下可能会受到干扰,例如阻塞转发端口的限制性 ISP 防火墙、或者在用户间共享 IPv4 地址的运营商级 NAT。 + +### 什么是反向 SSH 隧道? ### + +SSH 端口转发的一种替代方案是 **反向 SSH 隧道**。反向 SSH 隧道的概念非常简单。对于此,在限制性家庭网络之外你需要另一台主机(所谓的“中继主机”),你能从当前所在地通过 SSH 登录。你可以用有公共 IP 地址的 [VPS 实例][1] 配置一个中继主机。然后要做的就是从你家庭网络服务器中建立一个到公共中继主机的永久 SSH 隧道。有了这个隧道,你就可以从中继主机中连接“回”家庭服务器(这就是为什么称之为 “反向” 隧道)。不管你在哪里、你家庭网络中的 NAT 或 防火墙限制多么严重,只要你可以访问中继主机,你就可以连接到家庭服务器。 + +![](https://farm8.staticflickr.com/7742/17162647378_c7d9f10de8_b.jpg) + +### 在 Linux 上设置反向 SSH 隧道 ### + +让我们来看看怎样创建和使用反向 SSH 隧道。我们有如下假设。我们会设置一个从家庭服务器到中继服务器的反向 SSH 隧道,然后我们可以通过中继服务器从客户端计算机 SSH 登录到家庭服务器。**中继服务器** 的公共 IP 地址是 1.1.1.1。 + +在家庭主机上,按照以下方式打开一个到中继服务器的 SSH 连接。 + + homeserver~$ ssh -fN -R 10022:localhost:22 relayserver_user@1.1.1.1 + +这里端口 10022 是任何你可以使用的端口数字。只需要确保中继服务器上不会有其它程序使用这个端口。 + +“-R 10022:localhost:22” 选项定义了一个反向隧道。它转发中继服务器 10022 端口的流量到家庭服务器的 22 号端口。 + +用 “-fN” 选项,当你用一个 SSH 服务器成功通过验证时 SSH 会进入后台运行。当你不想在远程 SSH 服务器执行任何命令、就像我们的例子中只想转发端口的时候非常有用。 + +运行上面的命令之后,你就会回到家庭主机的命令行提示框中。 + +登录到中继服务器,确认 127.0.0.1:10022 绑定到了 sshd。如果是的话就表示已经正确设置了反向隧道。 + + relayserver~$ sudo netstat -nap | grep 10022 + +---------- + + tcp 0 0 127.0.0.1:10022 0.0.0.0:* LISTEN 8493/sshd + +现在就可以从任何其它计算机(客户端计算机)登录到中继服务器,然后按照下面的方法访问家庭服务器。 + + relayserver~$ ssh -p 10022 homeserver_user@localhost + +需要注意的一点是你在本地输入的 SSH 登录/密码应该是家庭服务器的,而不是中继服务器的,因为你是通过隧道的本地端点登录到家庭服务器。因此不要输入中继服务器的登录/密码。成功登陆后,你就在家庭服务器上了。 + +### 通过反向 SSH 隧道直接连接到网络地址变换后的服务器 ### + +上面的方法允许你访问 NAT 后面的 **家庭服务器**,但你需要登录两次:首先登录到 **中继服务器**,然后再登录到**家庭服务器**。这是因为中继服务器上 SSH 隧道的端点绑定到了回环地址(127.0.0.1)。 + +事实上,有一种方法可以只需要登录到中继服务器就能直接访问网络地址变换之后的家庭服务器。要做到这点,你需要让中继服务器上的 sshd 不仅转发回环地址上的端口,还要转发外部主机的端口。这通过指定中继服务器上运行的 sshd 的 **网关端口** 实现。 + +打开**中继服务器**的 /etc/ssh/sshd_conf 并添加下面的行。 + + relayserver~$ vi /etc/ssh/sshd_conf + +---------- + + GatewayPorts clientspecified + +重启 sshd。 + +基于 Debian 的系统: + + relayserver~$ sudo /etc/init.d/ssh restart + +基于红帽的系统: + + relayserver~$ sudo systemctl restart sshd + +现在在家庭服务器中按照下面方式初始化一个反向 SSH 隧道。 + + homeserver~$ ssh -fN -R 1.1.1.1:10022:localhost:22 relayserver_user@1.1.1.1 + +登录到中继服务器然后用 netstat 命令确认成功建立的一个反向 SSH 隧道。 + + relayserver~$ sudo netstat -nap | grep 10022 + +---------- + + tcp 0 0 1.1.1.1:10022 0.0.0.0:* LISTEN 1538/sshd: dev + +不像之前的情况,现在隧道的端点是 1.1.1.1:10022(中继服务器的公共 IP 地址),而不是 127.0.0.1:10022。这就意味着从外部主机可以访问隧道的端点。 + +现在在任何其它计算机(客户端计算机),输入以下命令访问网络地址变换之后的家庭服务器。 + + clientcomputer~$ ssh -p 10022 homeserver_user@1.1.1.1 + +在上面的命令中,1.1.1.1 是中继服务器的公共 IP 地址,家庭服务器用户必须是和家庭服务器相关联的用户账户。这是因为你真正登录到的主机是家庭服务器,而不是中继服务器。后者只是中继你的 SSH 流量到家庭服务器。 + +### 在 Linux 上设置一个永久反向 SSH 隧道 ### + +现在你已经明白了怎样创建一个反向 SSH 隧道,然后把隧道设置为 “永久”,这样隧道启动后就会一直运行(不管临时的网络拥塞、SSH 超时、中继主机重启,等等)。毕竟,如果隧道不是一直有效,你不可能可靠的登录到你的家庭服务器。 + +对于永久隧道,我打算使用一个叫 autossh 的工具。正如名字暗示的,这个程序允许你不管任何理由自动重启 SSH 会话。因此对于保存一个反向 SSH 隧道有效非常有用。 + +第一步,我们要设置从家庭服务器到中继服务器的[无密码 SSH 登录][2]。这样的话,autossh 可以不需要用户干预就能重启一个损坏的反向 SSH 隧道。 + +下一步,在初始化隧道的家庭服务器上[安装 autossh][3]。 + +在家庭服务器上,用下面的参数运行 autossh 来创建一个连接到中继服务器的永久 SSH 隧道。 + + homeserver~$ autossh -M 10900 -fN -o "PubkeyAuthentication=yes" -o "StrictHostKeyChecking=false" -o "PasswordAuthentication=no" -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -R 1.1.1.1:10022:localhost:22 relayserver_user@1.1.1.1 + +“-M 10900” 选项指定中继服务器上的监视端口,用于交换监视 SSH 会话的测试数据。中继服务器上的其它程序不能使用这个端口。 + +“-fN” 选项传递给 ssh 命令,让 SSH 隧道在后台运行。 + +“-o XXXX” 选项让 ssh: + +- 使用密钥验证,而不是密码验证。 +- 自动接受(未知)SSH 主机密钥。 +- 每 60 秒交换 keep-alive 消息。 +- 没有收到任何响应时最多发送 3 条 keep-alive 消息。 + +其余 SSH 隧道相关的选项和之前介绍的一样。 + +如果你想系统启动时自动运行 SSH 隧道,你可以将上面的 autossh 命令添加到 /etc/rc.local。 + +### 总结 ### + +在这篇博文中,我介绍了你如何能从外部中通过反向 SSH 隧道访问限制性防火墙或 NAT 网关之后的 Linux 服务器。尽管我介绍了家庭网络中的一个使用事例,在企业网络中使用时你尤其要小心。这样的一个隧道可能被视为违反公司政策,因为它绕过了企业的防火墙并把企业网络暴露给外部攻击。这很可能被误用或者滥用。因此在使用之前一定要记住它的作用。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html + +作者:[Dan Nanni][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/go/digitalocean +[2]:http://xmodulo.com/how-to-enable-ssh-login-without.html +[3]:http://ask.xmodulo.com/install-autossh-linux.html diff --git a/translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2 b/translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2.md similarity index 100% rename from translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2 rename to translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2.md diff --git a/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 b/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1.md similarity index 100% rename from translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1 rename to translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1.md From f1e0bd44ae78a3ffd31607226d2d44e846a15e5a Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Mon, 3 Aug 2015 21:31:58 +0800 Subject: [PATCH 1584/2517] [Translated]20150128 7 communities driving open source development.md --- ...unities driving open source development.md | 56 +++++++++---------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/sources/talk/20150128 7 communities driving open source development.md b/sources/talk/20150128 7 communities driving open source development.md index c3b6df31d2..2074ad9e23 100644 --- a/sources/talk/20150128 7 communities driving open source development.md +++ b/sources/talk/20150128 7 communities driving open source development.md @@ -1,79 +1,77 @@ -FSSlc Translating - -7 communities driving open source development +7 个驱动开源发展的社区 ================================================================================ -Not so long ago, the open source model was the rebellious kid on the block, viewed with suspicion by established industry players. Today, open initiatives and foundations are flourishing with long lists of vendor committers who see the model as a key to innovation. +不久前,开源模式还被成熟的工业厂商以怀疑的态度认作是叛逆小孩的玩物。如今,开放的倡议和基金会在一长列的供应商提供者的支持下正蓬勃发展,而他们将开源模式视作创新的关键。 ![](http://images.techhive.com/images/article/2015/01/0_opensource-title-100539095-orig.jpg) -### Open Development of Tech Drives Innovation ### +### 技术的开放发展驱动着创新 ### -Over the past two decades, open development of technology has come to be seen as a key to driving innovation. Even companies that once saw open source as a threat have come around — Microsoft, for example, is now active in a number of open source initiatives. To date, most open development has focused on software. But even that is changing as communities have begun to coalesce around open hardware initiatives. Here are seven organizations that are successfully promoting and developing open technologies, both hardware and software. +在过去的 20 几年间,技术的开放发展已被视作驱动创新的关键因素。即使那些以前将开源视作威胁的公司也开始接受这个观点 — 例如微软,如今它在一系列的开源倡议中表现活跃。到目前为止,大多数的开放发展都集中在软件方面,但甚至这个也正在改变,因为社区已经开始向开源硬件倡议方面聚拢。这里有 7 个成功地在硬件和软件方面同时促进和发展开源技术的组织。 -### OpenPOWER Foundation ### +### OpenPOWER 基金会 ### ![](http://images.techhive.com/images/article/2015/01/1_openpower-100539100-orig.jpg) -The [OpenPOWER Foundation][2] was founded by IBM, Google, Mellanox, Tyan and NVIDIA in 2013 to drive open collaboration hardware development in the same spirit as the open source software development which has found fertile ground in the past two decades. +[OpenPOWER 基金会][2] 由 IBM, Google, Mellanox, Tyan 和 NVIDIA 于 2013 年共同创建,在与开源软件发展相同的精神下,旨在驱动开放协作硬件的发展,在过去的 20 几年间,开源软件发展已经找到了肥沃的土壤。 -IBM seeded the foundation by opening up its Power-based hardware and software technologies, offering licenses to use Power IP in independent hardware products. More than 70 members now work together to create custom open servers, components and software for Linux-based data centers. +IBM 通过开放其基于 Power 架构的硬件和软件技术,向使用 Power IP 的独立硬件产品提供许可证等方式为基金会的建立播下种子。如今超过 70 个成员共同协作来为基于 Linux 的数据中心提供自定义的开放服务器,组件和硬件。 -In April, OpenPOWER unveiled a technology roadmap based on new POWER8 process-based servers capable of analyzing data 50 times faster than the latest x86-based systems. In July, IBM and Google released a firmware stack. October saw the availability of NVIDIA GPU accelerated POWER8 systems and the first OpenPOWER reference server from Tyan. +今年四月,在比最新基于 x86 系统快 50 倍的数据分析能力的新的 POWER8 处理器的服务器的基础上, OpenPOWER 推出了一个技术路线图。七月, IBM 和 Google 发布了一个固件堆栈。十月见证了 NVIDIA GPU 带来加速 POWER8 系统的能力和来自 Tyan 的第一个 OpenPOWER 参考服务器。 -### The Linux Foundation ### +### Linux 基金会 ### ![](http://images.techhive.com/images/article/2015/01/2_the-linux-foundation-100539101-orig.jpg) -Founded in 2000, [The Linux Foundation][2] is now the host for the largest open source, collaborative development effort in history, with more than 180 corporate members and many individual and student members. It sponsors the work of key Linux developers and promotes, protects and advances the Linux operating system and collaborative software development. +于 2000 年建立的 [Linux 基金会][2] 如今成为掌控着历史上最大的开源协同发展成果,它有着超过 180 个合作成员和许多独立成员及学生成员。它赞助核心 Linux 开发者的工作并促进、保护和推进 Linux 操作系统和协作软件的开发。 -Some of its most successful collaborative projects include Code Aurora Forum (a consortium of companies with projects serving the mobile wireless industry), MeeGo (a project to build a Linux kernel-based operating system for mobile devices and IVI) and the Open Virtualization Alliance (which fosters the adoption of free and open source software virtualization solutions). +它最为成功的协作项目包括 Code Aurora Forum (一个拥有为移动无线产业服务的企业财团),MeeGo (一个为移动设备和 IVI (注:指的是车载消息娱乐设备,为 In-Vehicle Infotainment 的简称) 构建一个基于 Linux 内核的操作系统的项目) 和 Open Virtualization Alliance (开放虚拟化联盟,它促进自由和开源软件虚拟化解决方案的采用)。 -### Open Virtualization Alliance ### +### 开放虚拟化联盟 ### ![](http://images.techhive.com/images/article/2015/01/3_open-virtualization-alliance-100539102-orig.jpg) -The [Open Virtualization Alliance (OVA)][3] exists to foster the adoption of free and open source software virtualization solutions like Kernel-based Virtual Machine (KVM) through use cases and support for the development of interoperable common interfaces and APIs. KVM turns the Linux kernel into a hypervisor. +[开放虚拟化联盟(OVA)][3] 的存在目的为:通过提供使用案例和对具有互操作性的通用接口和 API 的发展提供支持,来促进自由、开源软件的虚拟化解决方案例如 KVM 的采用。KVM 将 Linux 内核转变为一个虚拟机管理程序。 -Today, KVM is the most commonly used hypervisor with OpenStack. +如今, KVM 已成为和 OpenStack 共同使用的最为常见的虚拟机管理程序。 -### The OpenStack Foundation ### +### OpenStack 基金会 ### ![](http://images.techhive.com/images/article/2015/01/4_the-openstack-foundation-100539096-orig.jpg) -Originally launched as an Infrastructure-as-a-Service (IaaS) product by NASA and Rackspace hosting in 2010, the [OpenStack Foundation][4] has become the home for one of the biggest open source projects around. It boasts more than 200 member companies, including AT&T, AMD, Avaya, Canonical, Cisco, Dell and HP. +原本作为一个 IaaS(基础设施即服务) 产品由 NASA 和 Rackspace 于 2010 年启动,[OpenStack 基金会][4] 已成为最大的开源项目聚居地之一。它拥有超过 200 家公司成员,其中包括 AT&T, AMD, Avaya, Canonical, Cisco, Dell 和 HP。 -Organized around a six-month release cycle, the foundation's OpenStack projects are developed to control pools of processing, storage and networking resources through a data center — all managed or provisioned through a Web-based dashboard, command-line tools or a RESTful API. So far, the collaborative development supported by the foundation has resulted in the creation of OpenStack components including OpenStack Compute (a cloud computing fabric controller that is the main part of an IaaS system), OpenStack Networking (a system for managing networks and IP addresses) and OpenStack Object Storage (a scalable redundant storage system). +大约以 6 个月为一个发行周期,基金会的 OpenStack 项目被发展用来通过一个基于 Web 的仪表盘,命令行工具或一个 RESTful 风格的 API 来控制或调配流经一个数据中心的处理存储池和网络资源。至今为止,基金会支持的协作发展已经孕育出了一系列 OpenStack 组件,其中包括 OpenStack Compute(一个云计算网络控制器,它是一个 IaaS 系统的主要部分),OpenStack Networking(一个用以管理网络和 IP 地址的系统) 和 OpenStack Object Storage(一个可扩展的冗余存储系统)。 ### OpenDaylight ### ![](http://images.techhive.com/images/article/2015/01/5_opendaylight-100539097-orig.jpg) -Another collaborative project to come out of the Linux Foundation, [OpenDaylight][5] is a joint initiative of industry vendors, like Dell, HP, Oracle and Avaya founded in April 2013. Its mandate is the creation of a community-led, open, industry-supported framework consisting of code and blueprints for Software-Defined Networking (SDN). The idea is to provide a fully functional SDN platform that can be deployed directly, without requiring other components, though vendors can offer add-ons and enhancements. +作为来自 Linux 基金会的另一个协作项目, [OpenDaylight][5] 是一个由诸如 Dell, HP, Oracle 和 Avaya 等行业厂商于 2013 年 4 月建立的联合倡议。它的任务是建立一个由社区主导,开放,有工业支持的针对 Software-Defined Networking (SDN) 的包含代码和蓝图的框架。其思路是提供一个可直接部署的全功能 SDN 平台,而不需要其他组件,供应商可提供附件组件和增强组件。 -### Apache Software Foundation ### +### Apache 软件基金会 ### ![](http://images.techhive.com/images/article/2015/01/6_apache-software-foundation-100539098-orig.jpg) -The [Apache Software Foundation (ASF)][7] is home to nearly 150 top level projects ranging from open source enterprise automation software to a whole ecosystem of distributed computing projects related to Apache Hadoop. These projects deliver enterprise-grade, freely available software products, while the Apache License is intended to make it easy for users, whether commercial or individual, to deploy Apache products. +[Apache 软件基金会 (ASF)][7] 是将近 150 个顶级项目的聚居地,这些项目涵盖从开源企业级自动化软件到与 Apache Hadoop 相关的分布式计算的整个生态系统。这些项目分发企业级、可免费获取的软件产品,而 Apache 协议则是为了让无论是商业用户还是个人用户更方便地部署 Apache 的产品。 -ASF was incorporated in 1999 as a membership-based, not-for-profit corporation with meritocracy at its heart — to become a member you must first be actively contributing to one or more of the foundation's collaborative projects. +ASF 于 1999 年作为一个会员制,非盈利公司注册,其核心为精英 — 要成为它的成员,你必须首先在基金会的一个或多个协作项目中做出积极贡献。 -### Open Compute Project ### +### 开放计算项目 ### ![](http://images.techhive.com/images/article/2015/01/7_open-compute-project-100539099-orig.jpg) -An outgrowth of Facebook's redesign of its Oregon data center, the [Open Compute Project (OCP)][7] aims to develop open hardware solutions for data centers. The OCP is an initiative made up of cheap, vanity-free servers, modular I/O storage for Open Rack (a rack standard designed for data centers to integrate the rack into the data center infrastructure) and a relatively "green" data center design. +作为 Facebook 重新设计其 Oregon 数据中心的副产物, [开放计算项目][7] 旨在发展针对数据中心的开放硬件解决方案。 OCP 是一个由廉价、无浪费的服务器,针对 Open Rack(为数据中心设计的机架标准,来让机架集成到数据中心的基础设施中) 的模块化 I/O 存储和一个相对 "绿色" 的数据中心设计方案等构成。 -OCP board members include representatives from Facebook, Intel, Goldman Sachs, Rackspace and Microsoft. +OCP 董事会成员包括来自 Facebook,Intel,Goldman Sachs,Rackspace 和 Microsoft 的代表。 -OCP recently announced two options for licensing: an Apache 2.0-like license that allows for derivative works and a more prescriptive license that encourages changes to be rolled back into the original software. +OCP 最近宣布了许可证的两个选择: 一个类似 Apache 2.0 的允许衍生工作的许可证和一个更规范的鼓励回滚到原有软件的更改的许可证。 -------------------------------------------------------------------------------- via: http://www.networkworld.com/article/2866074/opensource-subnet/7-communities-driving-open-source-development.html 作者:[Thor Olavsrud][a] -译者:[译者ID](https://github.com/译者ID) +译者:[FSSlc](https://github.com/FSSlc) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -85,4 +83,4 @@ via: http://www.networkworld.com/article/2866074/opensource-subnet/7-communities [4]:http://www.openstack.org/foundation/ [5]:http://www.opendaylight.org/ [6]:http://www.apache.org/ -[7]:http://www.opencompute.org/ +[7]:http://www.opencompute.org/ \ No newline at end of file From 87c50a0cd95d1f25360ef2b85cf47a997aa333e0 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 3 Aug 2015 22:27:09 +0800 Subject: [PATCH 1585/2517] =?UTF-8?q?=E8=A1=A5=E5=AE=8C=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc --- .../20150128 7 communities driving open source development.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/talk/20150128 7 communities driving open source development.md (100%) diff --git a/sources/talk/20150128 7 communities driving open source development.md b/translated/talk/20150128 7 communities driving open source development.md similarity index 100% rename from sources/talk/20150128 7 communities driving open source development.md rename to translated/talk/20150128 7 communities driving open source development.md From 2ee44522e991b6d9f8be3aab4e341a3c473772dc Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 3 Aug 2015 22:36:14 +0800 Subject: [PATCH 1586/2517] =?UTF-8?q?=E8=B6=85=E6=9C=9F=E5=9B=9E=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wi-cuckoo @KevinSJ --- .../tech/20150717 How to monitor NGINX with Datadog - Part 3.md | 1 - sources/tech/20150717 How to monitor NGINX- Part 1.md | 1 - 2 files changed, 2 deletions(-) diff --git a/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md b/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md index 40787cdd96..949fd3d949 100644 --- a/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md +++ b/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md @@ -1,4 +1,3 @@ -translating wi-cuckoo How to monitor NGINX with Datadog - Part 3 ================================================================================ ![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_3.png) diff --git a/sources/tech/20150717 How to monitor NGINX- Part 1.md b/sources/tech/20150717 How to monitor NGINX- Part 1.md index 97ab822fca..1ae6858792 100644 --- a/sources/tech/20150717 How to monitor NGINX- Part 1.md +++ b/sources/tech/20150717 How to monitor NGINX- Part 1.md @@ -1,4 +1,3 @@ -KevinSJ Translating How to monitor NGINX - Part 1 ================================================================================ ![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_1.png) From 42083f4166af08cd49ac5749ca8f770663545f95 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 3 Aug 2015 22:42:03 +0800 Subject: [PATCH 1587/2517] Update 20150717 How to monitor NGINX with Datadog - Part 3.md --- .../20150717 How to monitor NGINX with Datadog - Part 3.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md b/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md index 949fd3d949..727c552ed0 100644 --- a/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md +++ b/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md @@ -1,3 +1,4 @@ +translation by strugglingyouth How to monitor NGINX with Datadog - Part 3 ================================================================================ ![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_3.png) @@ -147,4 +148,4 @@ via: https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ [16]:https://www.datadoghq.com/blog/monitoring-101-collecting-data/#metrics [17]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/#sign-up [18]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_monitor_nginx_with_datadog.md -[19]:https://github.com/DataDog/the-monitor/issues \ No newline at end of file +[19]:https://github.com/DataDog/the-monitor/issues From c52f369407f617927b6cc65e9a07937e957acd50 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 3 Aug 2015 22:44:22 +0800 Subject: [PATCH 1588/2517] Update 20150717 How to monitor NGINX- Part 1.md --- sources/tech/20150717 How to monitor NGINX- Part 1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150717 How to monitor NGINX- Part 1.md b/sources/tech/20150717 How to monitor NGINX- Part 1.md index 1ae6858792..690ab192ba 100644 --- a/sources/tech/20150717 How to monitor NGINX- Part 1.md +++ b/sources/tech/20150717 How to monitor NGINX- Part 1.md @@ -1,3 +1,4 @@ +translation by strugglingyouth How to monitor NGINX - Part 1 ================================================================================ ![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_1.png) From afcff7a42fd2eb7d06bc5cdf51ca624424c8f75a Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 3 Aug 2015 23:14:11 +0800 Subject: [PATCH 1589/2517] PUB:20150717 Howto Configure FTP Server with Proftpd on Fedora 22 @zpl1025 --- ...re FTP Server with Proftpd on Fedora 22.md | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) rename {translated/tech => published}/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md (83%) diff --git a/translated/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md b/published/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md similarity index 83% rename from translated/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md rename to published/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md index 0ccfe69b8f..d812c1b0ac 100644 --- a/translated/tech/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md +++ b/published/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md @@ -1,11 +1,13 @@ 如何在 Fedora 22 上配置 Proftpd 服务器 ================================================================================ -在本文中,我们将了解如何在运行 Fedora 22 的电脑或服务器上使用 Proftpd 架设 FTP 服务器。[ProFTPD][1] 是一款免费的基于 GPL 授权开源的 FTP 服务器软件,是 Linux 上的主流 FTP 服务器。它的主要设计目标是具备许多高级功能以及能为用户提供丰富的配置选项可以轻松实现定制。它的许多配置选项在其他一些 FTP 服务器软件里仍然没有集成。最初它是被开发作为 wu-ftpd 服务器的一个更安全更容易配置的替代。FTP 服务器是这样一个软件,用户可以通过 FTP 客户端从安装了它的远端服务器上传或下载文件和目录。下面是一些 ProFTPD 服务器的主要功能,更详细的资料可以访问 [http://www.proftpd.org/features.html][2]。 +在本文中,我们将了解如何在运行 Fedora 22 的电脑或服务器上使用 Proftpd 架设 FTP 服务器。[ProFTPD][1] 是一款基于 GPL 授权的自由开源 FTP 服务器软件,是 Linux 上的主流 FTP 服务器。它的主要设计目标是提供许多高级功能以及给用户提供丰富的配置选项以轻松实现定制。它具备许多在其他一些 FTP 服务器软件里仍然没有的配置选项。最初它是被开发作为 wu-ftpd 服务器的一个更安全更容易配置的替代。 -- 每个目录都包含 ".ftpaccess" 文件用于访问控制,类似 Apache 的 ".htaccess" +FTP 服务器是这样一个软件,用户可以通过 FTP 客户端从安装了它的远端服务器上传或下载文件和目录。下面是一些 ProFTPD 服务器的主要功能,更详细的资料可以访问 [http://www.proftpd.org/features.html][2]。 + +- 每个目录都可以包含 ".ftpaccess" 文件用于访问控制,类似 Apache 的 ".htaccess" - 支持多个虚拟 FTP 服务器以及多用户登录和匿名 FTP 服务。 - 可以作为独立进程启动服务或者通过 inetd/xinetd 启动 -- 它的文件/目录属性、属主和权限采用类 UNIX 方式。 +- 它的文件/目录属性、属主和权限是基于 UNIX 方式的。 - 它可以独立运行,保护系统避免 root 访问可能带来的损坏。 - 模块化的设计让它可以轻松扩展其他模块,比如 LDAP 服务器,SSL/TLS 加密,RADIUS 支持,等等。 - ProFTPD 服务器还支持 IPv6. @@ -38,7 +40,7 @@ ### 3. 添加 FTP 用户 ### -在设定好了基本的配置文件后,我们很自然地希望为指定目录添加 FTP 用户。目前用来登录的用户是 FTP 服务自动生成的,可以用来登录到 FTP 服务器。但是,在这篇教程里,我们将创建一个以 ftp 服务器上指定目录为主目录的新用户。 +在设定好了基本的配置文件后,我们很自然地希望添加一个以特定目录为根目录的 FTP 用户。目前登录的用户自动就可以使用 FTP 服务,可以用来登录到 FTP 服务器。但是,在这篇教程里,我们将创建一个以 ftp 服务器上指定目录为主目录的新用户。 下面,我们将建立一个名字是 ftpgroup 的新用户组。 @@ -57,7 +59,7 @@ Retype new password: passwd: all authentication tokens updated successfully. -现在,我们将通过下面命令为这个 ftp 用户设定主目录的读写权限。 +现在,我们将通过下面命令为这个 ftp 用户设定主目录的读写权限(LCTT 译注:这是SELinux 相关设置,如果未启用 SELinux,可以不用)。 $ sudo setsebool -P allow_ftpd_full_access=1 $ sudo setsebool -P ftp_home_dir=1 @@ -129,7 +131,7 @@ 如果 **打开了 TLS/SSL 加密**,执行下面的命令。 - $sudo firewall-cmd --add-port=1024-65534/tcp + $ sudo firewall-cmd --add-port=1024-65534/tcp $ sudo firewall-cmd --add-port=1024-65534/tcp --permanent 如果 **没有打开 TLS/SSL 加密**,执行下面的命令。 @@ -158,7 +160,7 @@ ### 7. 登录到 FTP 服务器 ### -现在,如果都是按照本教程设置好的,我们一定可以连接到 ftp 服务器并使用以上设置的信息登录上去。在这里,我们将配置一下 FTP 客户端 filezilla,使用 **服务器的 IP 或 URL **作为主机名,协议选择 **FTP**,用户名填入 **arunftp**,密码是在上面第 3 步中设定的密码。如果你按照第 4 步中的方式打开了 TLS 支持,还需要在加密类型中选择 **显式要求基于 TLS 的 FTP**,如果没有打开,也不想使用 TLS 加密,那么加密类型选择 **简单 FTP**。 +现在,如果都是按照本教程设置好的,我们一定可以连接到 ftp 服务器并使用以上设置的信息登录上去。在这里,我们将配置一下 FTP 客户端 filezilla,使用 **服务器的 IP 或名称 **作为主机名,协议选择 **FTP**,用户名填入 **arunftp**,密码是在上面第 3 步中设定的密码。如果你按照第 4 步中的方式打开了 TLS 支持,还需要在加密类型中选择 **要求显式的基于 TLS 的 FTP**,如果没有打开,也不想使用 TLS 加密,那么加密类型选择 **简单 FTP**。 ![FTP 登录细节](http://blog.linoxide.com/wp-content/uploads/2015/06/ftp-login-details.png) @@ -170,7 +172,7 @@ ### 总结 ### -最后,我们成功地在 Fedora 22 机器上安装并配置好了 Proftpd FTP 服务器。Proftpd 是一个超级强大,能高度配置和扩展的 FTP 守护软件。上面的教程展示了如何配置一个采用 TLS 加密的安全 FTP 服务器。强烈建议设置 FTP 服务器支持 TLS 加密,因为它允许使用 SSL 凭证加密数据传输和登录。本文中,我们也没有配置 FTP 的匿名访问,因为一般受保护的 FTP 系统不建议这样做。 FTP 访问让人们的上传和下载变得非常简单也更高效。我们还可以改变用户端口增加安全性。好吧,如果你有任何疑问,建议,反馈,请在下面评论区留言,这样我们就能够改善并更新文章内容。谢谢!玩的开心 :-) +最后,我们成功地在 Fedora 22 机器上安装并配置好了 Proftpd FTP 服务器。Proftpd 是一个超级强大,能高度定制和扩展的 FTP 守护软件。上面的教程展示了如何配置一个采用 TLS 加密的安全 FTP 服务器。强烈建议设置 FTP 服务器支持 TLS 加密,因为它允许使用 SSL 凭证加密数据传输和登录。本文中,我们也没有配置 FTP 的匿名访问,因为一般受保护的 FTP 系统不建议这样做。 FTP 访问让人们的上传和下载变得非常简单也更高效。我们还可以改变用户端口增加安全性。好吧,如果你有任何疑问,建议,反馈,请在下面评论区留言,这样我们就能够改善并更新文章内容。谢谢!玩的开心 :-) -------------------------------------------------------------------------------- @@ -178,7 +180,7 @@ via: http://linoxide.com/linux-how-to/configure-ftp-proftpd-fedora-22/ 作者:[Arun Pyasi][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 1908ba60a53e99fcfc69f82dba743935707b41d3 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 3 Aug 2015 23:46:03 +0800 Subject: [PATCH 1590/2517] PUB:20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall @wwy-hust --- ...Experience on Linux 'iptables' Firewall.md | 205 ++++++++++++++++++ ...Experience on Linux 'iptables' Firewall.md | 205 ------------------ 2 files changed, 205 insertions(+), 205 deletions(-) create mode 100644 published/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md delete mode 100644 translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md diff --git a/published/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md b/published/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md new file mode 100644 index 0000000000..9d8d582dfb --- /dev/null +++ b/published/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md @@ -0,0 +1,205 @@ +关于Linux防火墙'iptables'的面试问答 +================================================================================ +Nishita Agarwal是Tecmint的用户,她将分享关于她刚刚经历的一家公司(印度的一家私人公司Pune)的面试经验。在面试中她被问及许多不同的问题,但她是iptables方面的专家,因此她想分享这些关于iptables的问题和相应的答案给那些以后可能会进行相关面试的人。 + +![Linux防火墙Iptables面试问题](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-iptables-Interview-Questions.jpg) + +所有的问题和相应的答案都基于Nishita Agarwal的记忆并经过了重写。 + +> “嗨,朋友!我叫**Nishita Agarwal**。我已经取得了理学学士学位,我的专业集中在UNIX和它的变种(BSD,Linux)。它们一直深深的吸引着我。我在存储方面有1年多的经验。我正在寻求职业上的变化,并将供职于印度的Pune公司。” + +下面是我在面试中被问到的问题的集合。我已经把我记忆中有关iptables的问题和它们的答案记录了下来。希望这会对您未来的面试有所帮助。 + +### 1. 你听说过Linux下面的iptables和Firewalld么?知不知道它们是什么,是用来干什么的? ### + +**答案** : iptables和Firewalld我都知道,并且我已经使用iptables好一段时间了。iptables主要由C语言写成,并且以GNU GPL许可证发布。它是从系统管理员的角度写的,最新的稳定版是iptables 1.4.21。iptables通常被用作类UNIX系统中的防火墙,更准确的说,可以称为iptables/netfilter。管理员通过终端/GUI工具与iptables打交道,来添加和定义防火墙规则到预定义的表中。Netfilter是内核中的一个模块,它执行包过滤的任务。 + +Firewalld是RHEL/CentOS 7(也许还有其他发行版,但我不太清楚)中最新的过滤规则的实现。它已经取代了iptables接口,并与netfilter相连接。 + +### 2. 你用过一些iptables的GUI或命令行工具么? ### + +**答案** : 虽然我既用过GUI工具,比如与[Webmin][1]结合的Shorewall;以及直接通过终端访问iptables,但我必须承认通过Linux终端直接访问iptables能给予用户更高级的灵活性、以及对其背后工作更好的理解的能力。GUI适合初级管理员,而终端适合有经验的管理员。 + +### 3. 那么iptables和firewalld的基本区别是什么呢? ### + +**答案** : iptables和firewalld都有着同样的目的(包过滤),但它们使用不同的方式。iptables与firewalld不同,在每次发生更改时都刷新整个规则集。通常iptables配置文件位于‘/etc/sysconfig/iptables‘,而firewalld的配置文件位于‘/etc/firewalld/‘。firewalld的配置文件是一组XML文件。以XML为基础进行配置的firewalld比iptables的配置更加容易,但是两者都可以完成同样的任务。例如,firewalld可以在自己的命令行界面以及基于XML的配置文件下使用iptables。 + +### 4. 如果有机会的话,你会在你所有的服务器上用firewalld替换iptables么? ### + +**答案** : 我对iptables很熟悉,它也工作的很好。如果没有任何需求需要firewalld的动态特性,那么没有理由把所有的配置都从iptables移动到firewalld。通常情况下,目前为止,我还没有看到iptables造成什么麻烦。IT技术的通用准则也说道“为什么要修一件没有坏的东西呢?”。上面是我自己的想法,但如果组织愿意用firewalld替换iptables的话,我不介意。 + +### 5. 你看上去对iptables很有信心,巧的是,我们的服务器也在使用iptables。 ### + +iptables使用的表有哪些?请简要的描述iptables使用的表以及它们所支持的链。 + +**答案** : 谢谢您的赞赏。至于您问的问题,iptables使用的表有四个,它们是: + +- Nat 表 +- Mangle 表 +- Filter 表 +- Raw 表 + +Nat表 : Nat表主要用于网络地址转换。根据表中的每一条规则修改网络包的IP地址。流中的包仅遍历一遍Nat表。例如,如果一个通过某个接口的包被修饰(修改了IP地址),该流中其余的包将不再遍历这个表。通常不建议在这个表中进行过滤,由NAT表支持的链称为PREROUTING 链,POSTROUTING 链和OUTPUT 链。 + +Mangle表 : 正如它的名字一样,这个表用于校正网络包。它用来对特殊的包进行修改。它能够修改不同包的头部和内容。Mangle表不能用于地址伪装。支持的链包括PREROUTING 链,OUTPUT 链,Forward 链,Input 链和POSTROUTING 链。 + +Filter表 : Filter表是iptables中使用的默认表,它用来过滤网络包。如果没有定义任何规则,Filter表则被当作默认的表,并且基于它来过滤。支持的链有INPUT 链,OUTPUT 链,FORWARD 链。 + +Raw表 : Raw表在我们想要配置之前被豁免的包时被使用。它支持PREROUTING 链和OUTPUT 链。 + +### 6. 简要谈谈什么是iptables中的目标值(能被指定为目标),他们有什么用 ### + +**答案** : 下面是在iptables中可以指定为目标的值: + +- ACCEPT : 接受包 +- QUEUE : 将包传递到用户空间 (应用程序和驱动所在的地方) +- DROP : 丢弃包 +- RETURN : 将控制权交回调用的链并且为当前链中的包停止执行下一调用规则 + +### 7. 让我们来谈谈iptables技术方面的东西,我的意思是说实际使用方面 ### + +你怎么检测在CentOS中安装iptables时需要的iptables的rpm? + +**答案** : iptables已经被默认安装在CentOS中,我们不需要单独安装它。但可以这样检测rpm: + + # rpm -qa iptables + + iptables-1.4.21-13.el7.x86_64 + +如果您需要安装它,您可以用yum来安装。 + + # yum install iptables-services + +### 8. 怎样检测并且确保iptables服务正在运行? ### + +**答案** : 您可以在终端中运行下面的命令来检测iptables的状态。 + + # service status iptables [On CentOS 6/5] + # systemctl status iptables [On CentOS 7] + +如果iptables没有在运行,可以使用下面的语句 + + ---------------- 在CentOS 6/5下 ---------------- + # chkconfig --level 35 iptables on + # service iptables start + + ---------------- 在CentOS 7下 ---------------- + # systemctl enable iptables + # systemctl start iptables + +我们还可以检测iptables的模块是否被加载: + + # lsmod | grep ip_tables + +### 9. 你怎么检查iptables中当前定义的规则呢? ### + +**答案** : 当前的规则可以简单的用下面的命令查看: + + # iptables -L + +示例输出 + + Chain INPUT (policy ACCEPT) + target prot opt source destination + ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED + ACCEPT icmp -- anywhere anywhere + ACCEPT all -- anywhere anywhere + ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh + REJECT all -- anywhere anywhere reject-with icmp-host-prohibited + + Chain FORWARD (policy ACCEPT) + target prot opt source destination + REJECT all -- anywhere anywhere reject-with icmp-host-prohibited + + Chain OUTPUT (policy ACCEPT) + target prot opt source destination + +### 10. 你怎样刷新所有的iptables规则或者特定的链呢? ### + +**答案** : 您可以使用下面的命令来刷新一个特定的链。 + + # iptables --flush OUTPUT + +要刷新所有的规则,可以用: + + # iptables --flush + +### 11. 请在iptables中添加一条规则,接受所有从一个信任的IP地址(例如,192.168.0.7)过来的包。 ### + +**答案** : 上面的场景可以通过运行下面的命令来完成。 + + # iptables -A INPUT -s 192.168.0.7 -j ACCEPT + +我们还可以在源IP中使用标准的斜线和子网掩码: + + # iptables -A INPUT -s 192.168.0.7/24 -j ACCEPT + # iptables -A INPUT -s 192.168.0.7/255.255.255.0 -j ACCEPT + +### 12. 怎样在iptables中添加规则以ACCEPT,REJECT,DENY和DROP ssh的服务? ### + +**答案** : 但愿ssh运行在22端口,那也是ssh的默认端口,我们可以在iptables中添加规则来ACCEPT ssh的tcp包(在22号端口上)。 + + # iptables -A INPUT -s -p tcp --dport 22 -j ACCEPT + +REJECT ssh服务(22号端口)的tcp包。 + + # iptables -A INPUT -s -p tcp --dport 22 -j REJECT + +DENY ssh服务(22号端口)的tcp包。 + + + # iptables -A INPUT -s -p tcp --dport 22 -j DENY + +DROP ssh服务(22号端口)的tcp包。 + + + # iptables -A INPUT -s -p tcp --dport 22 -j DROP + +### 13. 让我给你另一个场景,假如有一台电脑的本地IP地址是192.168.0.6。你需要封锁在21、22、23和80号端口上的连接,你会怎么做? ### + +**答案** : 这时,我所需要的就是在iptables中使用‘multiport‘选项,并将要封锁的端口号跟在它后面。上面的场景可以用下面的一条语句搞定: + + # iptables -A INPUT -s 192.168.0.6 -p tcp -m multiport --dport 22,23,80,8080 -j DROP + +可以用下面的语句查看写入的规则。 + + # iptables -L + + Chain INPUT (policy ACCEPT) + target prot opt source destination + ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED + ACCEPT icmp -- anywhere anywhere + ACCEPT all -- anywhere anywhere + ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh + REJECT all -- anywhere anywhere reject-with icmp-host-prohibited + DROP tcp -- 192.168.0.6 anywhere multiport dports ssh,telnet,http,webcache + + Chain FORWARD (policy ACCEPT) + target prot opt source destination + REJECT all -- anywhere anywhere reject-with icmp-host-prohibited + + Chain OUTPUT (policy ACCEPT) + target prot opt source destination + +**面试官** : 好了,我问的就是这些。你是一个很有价值的雇员,我们不会错过你的。我将会向HR推荐你的名字。如果你有什么问题,请问我。 + +作为一个候选人我不愿不断的问将来要做的项目的事以及公司里其他的事,这样会打断愉快的对话。更不用说HR轮会不会比较难,总之,我获得了机会。 + +同时我要感谢Avishek和Ravi(我的朋友)花时间帮我整理我的面试。 + +朋友!如果您有过类似的面试,并且愿意与数百万Tecmint读者一起分享您的面试经历,请将您的问题和答案发送到admin@tecmint.com。 + +谢谢!保持联系。如果我能更好的回答我上面的问题的话,请记得告诉我。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-firewall-iptables-interview-questions-and-answers/ + +作者:[Avishek Kumar][a] +译者:[wwy-hust](https://github.com/wwy-hust) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/install-webmin-web-based-system-administration-tool-for-rhel-centos-fedora/ diff --git a/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md b/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md deleted file mode 100644 index 1d476d0f18..0000000000 --- a/translated/tech/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md +++ /dev/null @@ -1,205 +0,0 @@ -Nishita Agarwal分享它关于Linux防火墙'iptables'的面试经验 -================================================================================ -Nishita Agarwal是Tecmint的用户,她将分享关于她刚刚经历的一家公司(私人公司Pune,印度)的面试经验。在面试中她被问及许多不同的问题,但她是iptables方面的专家,因此她想分享这些关于iptables的问题和相应的答案给那些以后可能会进行相关面试的人。 - -![Linux防火墙Iptables面试问题](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-iptables-Interview-Questions.jpg) - -所有的问题和相应的答案都基于Nishita Agarwal的记忆并经过了重写。 - -> “嗨,朋友!我叫**Nishita Agarwal**。我已经取得了理学学士学位,我的专业集中在UNIX和它的变种(BSD,Linux)。它们一直深深的吸引着我。我在存储方面有1年多的经验。我正在寻求职业上的变化,并将供职于印度的Pune公司。” - -下面是我在面试中被问到的问题的集合。我已经把我记忆中有关iptables的问题和它们的答案记录了下来。希望这会对您未来的面试有所帮助。 - -### 1. 你听说过Linux下面的iptables和Firewalld么?知不知道它们是什么,是用来干什么的? ### - -> **答案** : iptables和Firewalld我都知道,并且我已经使用iptables好一段时间了。iptables主要由C语言写成,并且以GNU GPL许可证发布。它是从系统管理员的角度写的,最新的稳定版是iptables 1.4.21。iptables通常被认为是类UNIX系统中的防火墙,更准确的说,可以称为iptables/netfilter。管理员通过终端/GUI工具与iptables打交道,来添加和定义防火墙规则到预定义的表中。Netfilter是内核中的一个模块,它执行过滤的任务。 -> -> Firewalld是RHEL/CentOS 7(也许还有其他发行版,但我不太清楚)中最新的过滤规则的实现。它已经取代了iptables接口,并与netfilter相连接。 - -### 2. 你用过一些iptables的GUI或命令行工具么? ### - -> **答案** : 虽然我既用过GUI工具,比如与[Webmin][1]结合的Shorewall;以及直接通过终端访问iptables。但我必须承认通过Linux终端直接访问iptables能给予用户更高级的灵活性、以及对其背后工作更好的理解的能力。GUI适合初级管理员而终端适合有经验的管理员。 - -### 3. 那么iptables和firewalld的基本区别是什么呢? ### - -> **答案** : iptables和firewalld都有着同样的目的(包过滤),但它们使用不同的方式。iptables与firewalld不同,在每次发生更改时都刷新整个规则集。通常iptables配置文件位于‘/etc/sysconfig/iptables‘,而firewalld的配置文件位于‘/etc/firewalld/‘。firewalld的配置文件是一组XML文件。以XML为基础进行配置的firewalld比iptables的配置更加容易,但是两者都可以完成同样的任务。例如,firewalld可以在自己的命令行界面以及基于XML的配置文件下使用iptables。 - -### 4. 如果有机会的话,你会在你所有的服务器上用firewalld替换iptables么? ### - -> **答案** : 我对iptables很熟悉,它也工作的很好。如果没有任何需求需要firewalld的动态特性,那么没有理由把所有的配置都从iptables移动到firewalld。通常情况下,目前为止,我还没有看到iptables造成什么麻烦。IT技术的通用准则也说道“为什么要修一件没有坏的东西呢?”。上面是我自己的想法,但如果组织愿意用firewalld替换iptables的话,我不介意。 - -### 5. 你看上去对iptables很有信心,巧的是,我们的服务器也在使用iptables。 ### - -iptables使用的表有哪些?请简要的描述iptables使用的表以及它们所支持的链。 - -> **答案** : 谢谢您的赞赏。至于您问的问题,iptables使用的表有四个,它们是: -> -> Nat 表 -> Mangle 表 -> Filter 表 -> Raw 表 -> -> Nat表 : Nat表主要用于网络地址转换。根据表中的每一条规则修改网络包的IP地址。流中的包仅遍历一遍Nat表。例如,如果一个通过某个接口的包被修饰(修改了IP地址),该流中其余的包将不再遍历这个表。通常不建议在这个表中进行过滤,由NAT表支持的链称为PREROUTING Chain,POSTROUTING Chain和OUTPUT Chain。 -> -> Mangle表 : 正如它的名字一样,这个表用于校正网络包。它用来对特殊的包进行修改。它能够修改不同包的头部和内容。Mangle表不能用于地址伪装。支持的链包括PREROUTING Chain,OUTPUT Chain,Forward Chain,InputChain和POSTROUTING Chain。 -> -> Filter表 : Filter表是iptables中使用的默认表,它用来过滤网络包。如果没有定义任何规则,Filter表则被当作默认的表,并且基于它来过滤。支持的链有INPUT Chain,OUTPUT Chain,FORWARD Chain。 -> -> Raw表 : Raw表在我们想要配置之前被豁免的包时被使用。它支持PREROUTING Chain 和OUTPUT Chain。 - -### 6. 简要谈谈什么是iptables中的目标值(能被指定为目标),他们有什么用 ### - -> **答案** : 下面是在iptables中可以指定为目标的值: -> -> ACCEPT : 接受包 -> QUEUE : 将包传递到用户空间 (应用程序和驱动所在的地方) -> DROP : 丢弃包 -> RETURN : 将控制权交回调用的链并且为当前链中的包停止执行下一调规则 - -### 7. 让我们来谈谈iptables技术方面的东西,我的意思是说实际使用方面 ### - -你怎么检测在CentOS中安装iptables时需要的iptables的rpm? - -> **答案** : iptables已经被默认安装在CentOS中,我们不需要单独安装它。但可以这样检测rpm: -> -> # rpm -qa iptables -> -> iptables-1.4.21-13.el7.x86_64 -> -> 如果您需要安装它,您可以用yum来安装。 -> -> # yum install iptables-services - -### 8. 怎样检测并且确保iptables服务正在运行? ### - -> **答案** : 您可以在终端中运行下面的命令来检测iptables的状态。 -> -> # service status iptables [On CentOS 6/5] -> # systemctl status iptables [On CentOS 7] -> -> 如果iptables没有在运行,可以使用下面的语句 -> -> ---------------- 在CentOS 6/5下 ---------------- -> # chkconfig --level 35 iptables on -> # service iptables start -> -> ---------------- 在CentOS 7下 ---------------- -> # systemctl enable iptables -> # systemctl start iptables -> -> 我们还可以检测iptables的模块是否被加载: -> -> # lsmod | grep ip_tables - -### 9. 你怎么检查iptables中当前定义的规则呢? ### - -> **答案** : 当前的规则可以简单的用下面的命令查看: -> -> # iptables -L -> -> 示例输出 -> -> Chain INPUT (policy ACCEPT) -> target prot opt source destination -> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED -> ACCEPT icmp -- anywhere anywhere -> ACCEPT all -- anywhere anywhere -> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> -> Chain FORWARD (policy ACCEPT) -> target prot opt source destination -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> -> Chain OUTPUT (policy ACCEPT) -> target prot opt source destination - -### 10. 你怎样刷新所有的iptables规则或者特定的链呢? ### - -> **答案** : 您可以使用下面的命令来刷新一个特定的链。 -> -> # iptables --flush OUTPUT -> -> 要刷新所有的规则,可以用: -> -> # iptables --flush - -### 11. 请在iptables中添加一条规则,接受所有从一个信任的IP地址(例如,192.168.0.7)过来的包。 ### - -> **答案** : 上面的场景可以通过运行下面的命令来完成。 -> -> # iptables -A INPUT -s 192.168.0.7 -j ACCEPT -> -> 我们还可以在源IP中使用标准的斜线和子网掩码: -> -> # iptables -A INPUT -s 192.168.0.7/24 -j ACCEPT -> # iptables -A INPUT -s 192.168.0.7/255.255.255.0 -j ACCEPT - -### 12. 怎样在iptables中添加规则以ACCEPT,REJECT,DENY和DROP ssh的服务? ### - -> **答案** : 但愿ssh运行在22端口,那也是ssh的默认端口,我们可以在iptables中添加规则来ACCEPT ssh的tcp包(在22号端口上)。 -> -> # iptables -A INPUT -s -p tcp --dport 22 -j ACCEPT -> -> REJECT ssh服务(22号端口)的tcp包。 -> -> # iptables -A INPUT -s -p tcp --dport 22 -j REJECT -> -> DENY ssh服务(22号端口)的tcp包。 -> -> -> # iptables -A INPUT -s -p tcp --dport 22 -j DENY -> -> DROP ssh服务(22号端口)的tcp包。 -> -> -> # iptables -A INPUT -s -p tcp --dport 22 -j DROP - -### 13. 让我给你另一个场景,假如有一台电脑的本地IP地址是192.168.0.6。你需要封锁在21、22、23和80号端口上的连接,你会怎么做? ### - -> **答案** : 这时,我所需要的就是在iptables中使用‘multiport‘选项,并将要封锁的端口号跟在它后面。上面的场景可以用下面的一条语句搞定: -> -> # iptables -A INPUT -s 192.168.0.6 -p tcp -m multiport --dport 22,23,80,8080 -j DROP -> -> 可以用下面的语句查看写入的规则。 -> -> # iptables -L -> -> Chain INPUT (policy ACCEPT) -> target prot opt source destination -> ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED -> ACCEPT icmp -- anywhere anywhere -> ACCEPT all -- anywhere anywhere -> ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> DROP tcp -- 192.168.0.6 anywhere multiport dports ssh,telnet,http,webcache -> -> Chain FORWARD (policy ACCEPT) -> target prot opt source destination -> REJECT all -- anywhere anywhere reject-with icmp-host-prohibited -> -> Chain OUTPUT (policy ACCEPT) -> target prot opt source destination - -**面试官** : 好了,我问的就是这些。你是一个很有价值的雇员,我们不会错过你的。我将会向HR推荐你的名字。如果你有什么问题,请问我。 - -作为一个候选人我不愿不断的问将来要做的项目的事以及公司里其他的事,这样会打断愉快的对话。更不用说HR轮会不会比较难,总之,我获得了机会。 - -同时我要感谢Avishek和Ravi(我的朋友)花时间帮我整理我的面试。 - -朋友!如果您有过类似的面试,并且愿意与数百万Tecmint读者一起分享您的面试经历,请将您的问题和答案发送到admin@tecmint.com。 - -谢谢!保持联系。如果我能更好的回答我上面的问题的话,请记得告诉我。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-firewall-iptables-interview-questions-and-answers/ - -作者:[Avishek Kumar][a] -译者:[wwy-hust](https://github.com/wwy-hust) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/install-webmin-web-based-system-administration-tool-for-rhel-centos-fedora/ From f250353b717561555612c15b4fe71910487aec56 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 4 Aug 2015 00:08:13 +0800 Subject: [PATCH 1591/2517] PUB:20150730 Compare PDF Files on Ubuntu @GOLinux --- .../20150730 Compare PDF Files on Ubuntu.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150730 Compare PDF Files on Ubuntu.md (81%) diff --git a/translated/tech/20150730 Compare PDF Files on Ubuntu.md b/published/20150730 Compare PDF Files on Ubuntu.md similarity index 81% rename from translated/tech/20150730 Compare PDF Files on Ubuntu.md rename to published/20150730 Compare PDF Files on Ubuntu.md index 3215caf23f..57b933765f 100644 --- a/translated/tech/20150730 Compare PDF Files on Ubuntu.md +++ b/published/20150730 Compare PDF Files on Ubuntu.md @@ -1,15 +1,15 @@ -Ubuntu上比较PDF文件 +如何在 Ubuntu 上比较 PDF 文件 ================================================================================ 如果你想要对PDF文件进行比较,你可以使用下面工具之一。 ### Comparepdf ### -comparepdf是一个命令行应用,用于将两个PDF文件进行对比。默认对比模式文本模式,该模式会对各对相关页面进行文字对比。只要一检测到差异,该程序就会终止,并显示一条信息(除非设置了-v0)和一个指示性的返回码。 +comparepdf是一个命令行应用,用于将两个PDF文件进行对比。默认对比模式是文本模式,该模式会对各对相关页面进行文字对比。只要一检测到差异,该程序就会终止,并显示一条信息(除非设置了-v0)和一个指示性的返回码。 -用于文本模式对比的选项有 -ct 或 --compare=text(默认),用于视觉对比(这对图标或其它图像发生改变时很有用)的选项有 -ca 或 --compare=appearance。而 -v=1 或 --verbose=1 选项则用于报告差异(或者对匹配文件不作任何回应):使用 -v=0 选项取消报告,或者 -v=2 来同时报告不同的和匹配的文件。 +用于文本模式对比的选项有 -ct 或 --compare=text(默认),用于视觉对比(这对图标或其它图像发生改变时很有用)的选项有 -ca 或 --compare=appearance。而 -v=1 或 --verbose=1 选项则用于报告差异(或者对匹配文件不作任何回应);使用 -v=0 选项取消报告,或者 -v=2 来同时报告不同的和匹配的文件。 -### 安装comparepdf到Ubuntu ### +#### 安装comparepdf到Ubuntu #### 打开终端,然后运行以下命令 @@ -19,17 +19,17 @@ comparepdf是一个命令行应用,用于将两个PDF文件进行对比。默 comparepdf [OPTIONS] file1.pdf file2.pdf -**Diffpdf** +###Diffpdf### DiffPDF是一个图形化应用程序,用于对两个PDF文件进行对比。默认情况下,它只会对比两个相关页面的文字,但是也支持对图形化页面进行对比(例如,如果图表被修改过,或者段落被重新格式化过)。它也可以对特定的页面或者页面范围进行对比。例如,如果同一个PDF文件有两个版本,其中一个有页面1-12,而另一个则有页面1-13,因为这里添加了一个额外的页面4,它们可以通过指定两个页面范围来进行对比,第一个是1-12,而1-3,5-13则可以作为第二个页面范围。这将使得DiffPDF成对地对比这些页面(1,1),(2,2),(3,3),(4,5),(5,6),以此类推,直到(12,13)。 -### 安装 diffpdf 到 ubuntu ### +#### 安装 diffpdf 到 ubuntu #### 打开终端,然后运行以下命令 sudo apt-get install diffpdf -### 截图 ### +#### 截图 #### ![](http://www.ubuntugeek.com/wp-content/uploads/2015/07/14.png) @@ -41,7 +41,7 @@ via: http://www.ubuntugeek.com/compare-pdf-files-on-ubuntu.html 作者:[ruchi][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 07af5c5aa9a77aeb84e0faa8874660c511116f95 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 4 Aug 2015 06:51:47 +0800 Subject: [PATCH 1592/2517] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E8=AF=91=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150128 7 communities driving open source development.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/talk/20150128 7 communities driving open source development.md (100%) diff --git a/sources/talk/20150128 7 communities driving open source development.md b/translated/talk/20150128 7 communities driving open source development.md similarity index 100% rename from sources/talk/20150128 7 communities driving open source development.md rename to translated/talk/20150128 7 communities driving open source development.md From 065cdbb77acac0170f8604631294c1790fd55bb5 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 4 Aug 2015 07:04:09 +0800 Subject: [PATCH 1593/2517] Update 20150803 Linux Logging Basics.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- sources/tech/20150803 Linux Logging Basics.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150803 Linux Logging Basics.md b/sources/tech/20150803 Linux Logging Basics.md index d20f68f140..6c3c3693a4 100644 --- a/sources/tech/20150803 Linux Logging Basics.md +++ b/sources/tech/20150803 Linux Logging Basics.md @@ -1,3 +1,5 @@ +FSSlc translating + Linux Logging Basics ================================================================================ First we’ll describe the basics of what Linux logs are, where to find them, and how they get created. If you already know this stuff, feel free to skip to the next section. @@ -87,4 +89,4 @@ via: http://www.loggly.com/ultimate-guide/logging/linux-logging-basics/ [4]:https://tools.ietf.org/html/rfc5424#section-6.2.3 [5]:https://tools.ietf.org/html/rfc5424#section-6.2.4 [6]:https://tools.ietf.org/html/rfc5424#section-6.2.5 -[7]:https://tools.ietf.org/html/rfc5424#section-6.2.1 \ No newline at end of file +[7]:https://tools.ietf.org/html/rfc5424#section-6.2.1 From 0a2bc302010ada1e2f78027cc3965b655e62aa56 Mon Sep 17 00:00:00 2001 From: joeren Date: Tue, 4 Aug 2015 07:54:44 +0800 Subject: [PATCH 1594/2517] Change --- github 2.0测试.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 github 2.0测试.txt diff --git a/github 2.0测试.txt b/github 2.0测试.txt deleted file mode 100644 index 7787faa3c1..0000000000 --- a/github 2.0测试.txt +++ /dev/null @@ -1,2 +0,0 @@ -111 -222 \ No newline at end of file From 6811374932148a3ce7bfe446c8670a63ace04b3e Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 09:08:16 +0800 Subject: [PATCH 1595/2517] =?UTF-8?q?Create=20Setting=20up=20RAID=201=20(M?= =?UTF-8?q?irroring)=20using=20=E2=80=98Two=20Disks=E2=80=99=20in=20Linux?= =?UTF-8?q?=20=E2=80=93=20Part=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...oring) using ‘Two Disks’ in Linux – Part 3 | 217 ++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 translated/tech/Setting up RAID 1 (Mirroring) using ‘Two Disks’ in Linux – Part 3 diff --git a/translated/tech/Setting up RAID 1 (Mirroring) using ‘Two Disks’ in Linux – Part 3 b/translated/tech/Setting up RAID 1 (Mirroring) using ‘Two Disks’ in Linux – Part 3 new file mode 100644 index 0000000000..948e530ed8 --- /dev/null +++ b/translated/tech/Setting up RAID 1 (Mirroring) using ‘Two Disks’ in Linux – Part 3 @@ -0,0 +1,217 @@ +在 Linux 中使用"两个磁盘"创建 RAID 1(镜像) - 第3部分 +================================================================================ +RAID 镜像意味着相同数据的完整克隆(或镜像)写入到两个磁盘中。创建 RAID1 至少需要两个磁盘,它的读取性能或者可靠性比数据存储容量更好。 + + +![Create Raid1 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID1-in-Linux.jpeg) + +在 Linux 中设置 RAID1 + +创建镜像是为了防止因硬盘故障导致数据丢失。镜像中的每个磁盘包含数据的完整副本。当一个磁盘发生故障时,相同的数据可以从其它正常磁盘中读取。而后,可以从正在运行的计算机中直接更换发生故障的磁盘,无需任何中断。 + +### RAID 1 的特点 ### + +-镜像具有良好的性能。 + +-磁盘利用率为50%。也就是说,如果我们有两个磁盘每个500GB,总共是1TB,但在镜像中它只会显示500GB。 + +-在镜像如果一个磁盘发生故障不会有数据丢失,因为两个磁盘中的内容相同。 + +-读取数据会比写入性能更好。 + +#### 要求 #### + + +创建 RAID 1 至少要有两个磁盘,你也可以添加更多的磁盘,磁盘数需为2,4,6,8的两倍。为了能够添加更多的磁盘,你的系统必须有 RAID 物理适配器(硬件卡)。 + +这里,我们使用软件 RAID 不是硬件 RAID,如果你的系统有一个内置的物理硬件 RAID 卡,你可以从它的 UI 组件或使用 Ctrl + I 键来访问它。 + +需要阅读: [Basic Concepts of RAID in Linux][1] + +#### 在我的服务器安装 #### + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.226 + Hostname : rd1.tecmintlocal.com + Disk 1 [20GB] : /dev/sdb + Disk 2 [20GB] : /dev/sdc + +本文将指导你使用 mdadm (创建和管理 RAID 的)一步一步的建立一个软件 RAID 1 或镜像在 Linux 平台上。但同样的做法也适用于其它 Linux 发行版如 RedHat,CentOS,Fedora 等等。 + +### 第1步:安装所需要的并且检查磁盘 ### + +1.正如我前面所说,在 Linux 中我们需要使用 mdadm 软件来创建和管理 RAID。所以,让我们用 yum 或 apt-get 的软件包管理工具在 Linux 上安装 mdadm 软件包。 + + # yum install mdadm [on RedHat systems] + # apt-get install mdadm [on Debain systems] + +2. 一旦安装好‘mdadm‘包,我们需要使用下面的命令来检查磁盘是否已经配置好。 + + # mdadm -E /dev/sd[b-c] + +![Check RAID on Disks](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-on-Disks.png) + +检查 RAID 的磁盘 + + +正如你从上面图片看到的,没有检测到任何超级块,这意味着还没有创建RAID。 + +### 第2步:为 RAID 创建分区 ### + +3. 正如我提到的,我们最少使用两个分区 /dev/sdb 和 /dev/sdc 来创建 RAID1。我们首先使用‘fdisk‘命令来创建这两个分区并更改其类型为 raid。 + + # fdisk /dev/sdb + +按照下面的说明 + +- 按 ‘n’ 创建新的分区。 +- 然后按 ‘P’ 选择主分区。 +- 接下来选择分区号为1。 +- 按两次回车键默认将整个容量分配给它。 +- 然后,按 ‘P’ 来打印创建好的分区。 +- 按 ‘L’,列出所有可用的类型。 +- 按 ‘t’ 修改分区类型。 +- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 +- 然后再次使用‘p’查看我们所做的更改。 +- 使用‘w’保存更改。 + +![Create Disk Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Disk-Partitions.png) + +创建磁盘分区 + +在创建“/dev/sdb”分区后,接下来按照同样的方法创建分区 /dev/sdc 。 + + # fdisk /dev/sdc + +![Create Second Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Second-Partitions.png) + +创建第二个分区 + +4. 一旦这两个分区创建成功后,使用相同的命令来检查 sdb & sdc 分区并确认 RAID 分区的类型如上图所示。 + + # mdadm -E /dev/sd[b-c] + +![Verify Partitions Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Partitions-Changes.png) + +验证分区变化 + +![Check RAID Type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Type.png) + +检查 RAID 类型 + +**注意**: 正如你在上图所看到的,在 sdb1 和 sdc1 中没有任何对 RAID 的定义,这就是我们没有检测到超级块的原因。 + +### 步骤3:创建 RAID1 设备 ### + +5.接下来使用以下命令来创建一个名为 /dev/md0 的“RAID1”设备并验证它 + + # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[b-c]1 + # cat /proc/mdstat + +![Create RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device.png) + +创建RAID设备 + +6. 接下来使用如下命令来检查 RAID 设备类型和 RAID 阵列 + + # mdadm -E /dev/sd[b-c]1 + # mdadm --detail /dev/md0 + +![Check RAID Device type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-type.png) + +检查 RAID 设备类型 + +![Check RAID Device Array](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-Array.png) + +检查 RAID 设备阵列 + +从上图中,人们很容易理解,RAID1 已经使用的 /dev/sdb1 和 /dev/sdc1 分区被创建,你也可以看到状态为 resyncing。 + +### 第4步:在 RAID 设备上创建文件系统 ### + +7. 使用 ext4 为 md0 创建文件系统并挂载到 /mnt/raid1 . + + # mkfs.ext4 /dev/md0 + +![Create RAID Device Filesystem](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device-Filesystem.png) + +创建 RAID 设备文件系统 + +8. 接下来,挂载新创建的文件系统到“/mnt/raid1”,并创建一些文件,验证在挂载点的数据 + + # mkdir /mnt/raid1 + # mount /dev/md0 /mnt/raid1/ + # touch /mnt/raid1/tecmint.txt + # echo "tecmint raid setups" > /mnt/raid1/tecmint.txt + +![Mount Raid Device](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-RAID-Device.png) + +挂载 RAID 设备 + +9.为了在系统重新启动自动挂载 RAID1,需要在 fstab 文件中添加条目。打开“/etc/fstab”文件并添加以下行。 + + /dev/md0 /mnt/raid1 ext4 defaults 0 0 + +![Raid Automount Device](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Automount-Filesystem.png) + +自动挂载 Raid 设备 + +10. 运行“mount -a”,检查 fstab 中的条目是否有错误 + # mount -av + +![Check Errors in fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-fstab.png) + +检查 fstab 中的错误 + +11. 接下来,使用下面的命令保存 raid 的配置到文件“mdadm.conf”中。 + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +![Save Raid Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Raid-Configuration.png) + +保存 Raid 的配置 + +上述配置文件在系统重启时会读取并加载 RAID 设备。 + +### 第5步:在磁盘故障后检查数据 ### + +12.我们的主要目的是,即使在任何磁盘故障或死机时必须保证数据是可用的。让我们来看看,当任何一个磁盘不可用时会发生什么。 + + # mdadm --detail /dev/md0 + +![Raid Device Verify](http://www.tecmint.com/wp-content/uploads/2014/10/Raid-Device-Verify.png) + +验证 Raid 设备 + +在上面的图片中,我们可以看到在 RAID 中有2个设备是可用的并且 Active Devices 是2.现在让我们看看,当一个磁盘拔出(移除 sdc 磁盘)或损坏后会发生什么。 + + # ls -l /dev | grep sd + # mdadm --detail /dev/md0 + +![Test RAID Devices](http://www.tecmint.com/wp-content/uploads/2014/10/Test-RAID-Devices.png) + +测试 RAID 设备 + +现在,在上面的图片中你可以看到,一个磁盘不见了。我从虚拟机上删除了一个磁盘。此时让我们来检查我们宝贵的数据。 + + # cd /mnt/raid1/ + # cat tecmint.txt + +![Verify RAID Data](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Data.png) + +验证 RAID 数据 + +你有没有看到我们的数据仍然可用。由此,我们可以知道 RAID 1(镜像)的优势。在接下来的文章中,我们将看到如何设置一个 RAID 5 条带化分布式奇偶校验。希望这可以帮助你了解 RAID 1(镜像)是如何工作的。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid1-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ From 2ec2917fdba92c31201a7bdde94ac2e8befb41ed Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 09:09:17 +0800 Subject: [PATCH 1596/2517] =?UTF-8?q?Create=20Creating=20RAID=205=20(Strip?= =?UTF-8?q?ing=20with=20Distributed=20Parity)=20in=20Linux=20=E2=80=93=20P?= =?UTF-8?q?art=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...with Distributed Parity) in Linux – Part 4 | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 translated/tech/Creating RAID 5 (Striping with Distributed Parity) in Linux – Part 4 diff --git a/translated/tech/Creating RAID 5 (Striping with Distributed Parity) in Linux – Part 4 b/translated/tech/Creating RAID 5 (Striping with Distributed Parity) in Linux – Part 4 new file mode 100644 index 0000000000..7de5199a08 --- /dev/null +++ b/translated/tech/Creating RAID 5 (Striping with Distributed Parity) in Linux – Part 4 @@ -0,0 +1,285 @@ + +在 Linux 中创建 RAID 5(条带化与分布式奇偶校验) - 第4部分 +================================================================================ +在 RAID 5 中,条带化数据跨多个驱磁盘使用分布式奇偶校验。分布式奇偶校验的条带化意味着它将奇偶校验信息和条带中的数据分布在多个磁盘上,它将有很好的数据冗余。 + +![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/setup-raid-5-in-linux.jpg) + +在 Linux 中配置 RAID 5 + +对于此 RAID 级别它至少应该有三个或更多个磁盘。RAID 5 通常被用于大规模生产环境中花费更多的成本来提供更好的数据冗余性能。 + +#### 什么是奇偶校验? #### + +奇偶校验是在数据存储中检测错误最简单的一个方法。奇偶校验信息存储在每个磁盘中,比如说,我们有4个磁盘,其中一个磁盘空间被分割去存储所有磁盘的奇偶校验信息。如果任何一个磁盘出现故障,我们可以通过更换故障磁盘后,从奇偶校验信息重建得到原来的数据。 + +#### RAID 5 的优点和缺点 #### + +- 提供更好的性能 +- 支持冗余和容错。 +- 支持热备份。 +- 将失去一个磁盘的容量存储奇偶校验信息。 +- 单个磁盘发生故障后不会丢失数据。我们可以更换故障硬盘后从奇偶校验信息中重建数据。 +- 事务处理读操作会更快。 +- 由于奇偶校验占用资源,写操作将是缓慢的。 +- 重建需要很长的时间。 + +#### 要求 #### +创建 RAID 5 最少需要3个磁盘,你也可以添加更多的磁盘,前提是你要有多端口的专用硬件 RAID 控制器。在这里,我们使用“mdadm”包来创建软件 RAID。 + +mdadm 是一个允许我们在 Linux 下配置和管理 RAID 设备的包。默认情况下 RAID 没有可用的配置文件,我们在创建和配置 RAID 后必须将配置文件保存在一个单独的文件中,例如:mdadm.conf。 + +在进一步学习之前,我建议你通过下面的文章去了解 Linux 中 RAID 的基础知识。 + +- [Basic Concepts of RAID in Linux – Part 1][1] +- [Creating RAID 0 (Stripe) in Linux – Part 2][2] +- [Setting up RAID 1 (Mirroring) in Linux – Part 3][3] + +#### 我的服务器设置 #### + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.227 + Hostname : rd5.tecmintlocal.com + Disk 1 [20GB] : /dev/sdb + Disk 2 [20GB] : /dev/sdc + Disk 3 [20GB] : /dev/sdd + +这篇文章是 RAID 系列9教程的第4部分,在这里我们要建立一个软件 RAID 5(分布式奇偶校验)使用三个20GB(名为/dev/sdb, /dev/sdc 和 /dev/sdd)的磁盘在 Linux 系统或服务器中上。 + +### 第1步:安装 mdadm 并检验磁盘 ### + +1.正如我们前面所说,我们使用 CentOS 6.5 Final 版本来创建 RAID 设置,但同样的做法也适用于其他 Linux 发行版。 + + # lsb_release -a + # ifconfig | grep inet + +![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/CentOS-6.5-Summary.png) + +CentOS 6.5 摘要 + +2. 如果你按照我们的 RAID 系列去配置的,我们假设你已经安装了“mdadm”包,如果没有,根据你的 Linux 发行版使用下面的命令安装。 + + # yum install mdadm [on RedHat systems] + # apt-get install mdadm [on Debain systems] + +3. “mdadm”包安装后,先使用‘fdisk‘命令列出我们在系统上增加的三个20GB的硬盘。 + + # fdisk -l | grep sd + +![Install mdadm Tool in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/Install-mdadm-Tool.png) + +安装 mdadm 工具 + +4. 现在该检查这三个磁盘是否存在 RAID 块,使用下面的命令来检查。 + + # mdadm -E /dev/sd[b-d] + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd + +![Examine Drives For Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Examine-Drives-For-Raid.png) + +检查 Raid 磁盘 + +**注意**: 上面的图片说明,没有检测到任何超级块。所以,这三个磁盘中没有定义 RAID。让我们现在开始创建一个吧! + +### 第2步:为磁盘创建 RAID 分区 ### + +5. 首先,在创建 RAID 前我们要为磁盘分区(/dev/sdb, /dev/sdc 和 /dev/sdd),在进行下一步之前,先使用‘fdisk’命令进行分区。 + + # fdisk /dev/sdb + # fdisk /dev/sdc + # fdisk /dev/sdd + +#### 创建 /dev/sdb 分区 #### + +请按照下面的说明在 /dev/sdb 硬盘上创建分区。 + +- 按 ‘n’ 创建新的分区。 +- 然后按 ‘P’ 选择主分区。选择主分区是因为还没有定义过分区。 +- 接下来选择分区号为1。默认就是1. +- 这里是选择柱面大小,我们没必要选择指定的大小,因为我们需要为 RAID 使用整个分区,所以只需按两次 Enter 键默认将整个容量分配给它。 +- 然后,按 ‘P’ 来打印创建好的分区。 +- 改变分区类型,按 ‘L’可以列出所有可用的类型。 +- 按 ‘t’ 修改分区类型。 +- 这里使用‘fd’设置为 RAID 的类型。 +- 然后再次使用‘p’查看我们所做的更改。 +- 使用‘w’保存更改。 + +![Create sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdb-Partition1.png) + +创建 sdb 分区 + +**注意**: 我们仍要按照上面的步骤来创建 sdc 和 sdd 的分区。 + +#### 创建 /dev/sdc 分区 #### + +现在,通过下面的截图给出创建 sdc 和 sdd 磁盘分区的方法,或者你可以按照上面的步骤。 + + # fdisk /dev/sdc + +![Create sdc Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdc-Partition1.png) + +创建 sdc 分区 + +#### 创建 /dev/sdd 分区 #### + + # fdisk /dev/sdd + +![Create sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdd-Partition1.png) + +创建 sdd 分区 + +6. 创建分区后,检查三个磁盘 sdb, sdc, sdd 的变化。 + + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd + + or + + # mdadm -E /dev/sd[b-c] + +![Check Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Changes-on-Partitions.png) + +检查磁盘变化 + +**注意**: 在上面的图片中,磁盘的类型是 fd。 + +7.现在在新创建的分区检查 RAID 块。如果没有检测到超级块,我们就能够继续下一步,创建一个新的 RAID 5 的设置在这些磁盘中。 + +![Check Raid on Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-Partitions.png) + +在分区中检查 Raid + +### 第3步:创建 md 设备 md0 ### + +8. 现在创建一个 RAID 设备“md0”(即 /dev/md0)使用所有新创建的分区(sdb1, sdc1 and sdd1) ,使用以下命令。 + + # mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 + + or + + # mdadm -C /dev/md0 -l=5 -n=3 /dev/sd[b-d]1 + +9. 创建 RAID 设备后,检查并确认 RAID,包括设备和从 mdstat 中输出的 RAID 级别。 + + # cat /proc/mdstat + +![Verify Raid Device](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Device.png) + +验证 Raid 设备 + +如果你想监视当前的创建过程,你可以使用‘watch‘命令,使用 watch ‘cat /proc/mdstat‘,它会在屏幕上显示且每隔1秒刷新一次。 + + # watch -n1 cat /proc/mdstat + +![Monitor Raid Process](http://www.tecmint.com/wp-content/uploads/2014/11/Monitor-Raid-Process.png) + +监控 Raid 5 过程 + +![Raid 5 Process Summary](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Process-Summary.png) + +Raid 5 过程概要 + +10. 创建 RAID 后,使用以下命令验证 RAID 设备 + + # mdadm -E /dev/sd[b-d]1 + +![Verify Raid Level](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Level.png) + +验证 Raid 级别 + +**注意**: 因为它显示三个磁盘的信息,上述命令的输出会有点长。 + +11. 接下来,验证 RAID 阵列的假设,这包含正在运行 RAID 的设备,并开始重新同步。 + + # mdadm --detail /dev/md0 + +![Verify Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Array.png) + +验证 Raid 阵列 + +### 第4步:为 md0 创建文件系统### + +12. 在挂载前为“md0”设备创建 ext4 文件系统。 + + # mkfs.ext4 /dev/md0 + +![Create md0 Filesystem](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md0-Filesystem.png) + +创建 md0 文件系统 + +13.现在,在‘/mnt‘下创建目录 raid5,然后挂载文件系统到 /mnt/raid5/ 下并检查下挂载点的文件,你会看到 lost+found 目录。 + + # mkdir /mnt/raid5 + # mount /dev/md0 /mnt/raid5/ + # ls -l /mnt/raid5/ + +14. 在挂载点 /mnt/raid5 下创建几个文件,并在其中一个文件中添加一些内容然后去验证。 + + # touch /mnt/raid5/raid5_tecmint_{1..5} + # ls -l /mnt/raid5/ + # echo "tecmint raid setups" > /mnt/raid5/raid5_tecmint_1 + # cat /mnt/raid5/raid5_tecmint_1 + # cat /proc/mdstat + +![Mount Raid 5 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Mount-Raid-Device.png) + +挂载 Raid 设备 + +15. 我们需要在 fstab 中添加条目,否则系统重启后将不会显示我们的挂载点。然后编辑 fstab 文件添加条目,在文件尾追加以下行,如下图所示。挂载点会根据你环境的不同而不同。 + + # vim /etc/fstab + + /dev/md0 /mnt/raid5 ext4 defaults 0 0 + +![Raid 5 Automount](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Device-Automount.png) + +自动挂载 Raid 5 + +16. 接下来,运行‘mount -av‘命令检查 fstab 条目中是否有错误。 + + # mount -av + +![Check Fstab Errors](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Fstab-Errors.png) + +检查 Fstab 错误 + +### 第5步:保存 Raid 5 的配置 ### + +17. 在前面章节已经说过,默认情况下 RAID 没有配置文件。我们必须手动保存。如果此步不跟 RAID 设备将不会存在 md0,它将会跟一些其他数子。 + +所以,我们必须要在系统重新启动之前保存配置。如果配置保存它在系统重新启动时会被加载到内核中然后 RAID 也将被加载。 + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +![Save Raid 5 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Save-Raid-5-Configuration.png) + +保存 Raid 5 配置 + +注意:保存配置将保持 RAID 级别的稳定性在 md0 设备中。 + +### 第6步:添加备用磁盘 ### + +18.备用磁盘有什么用?它是非常有用的,如果我们有一个备用磁盘,当我们阵列中的任何一个磁盘发生故障后,这个备用磁盘会主动添加并重建进程,并从其他磁盘上同步数据,所以我们可以在这里看到冗余。 + +更多关于添加备用磁盘和检查 RAID 5 容错的指令,请阅读下面文章中的第6步和第7步。 + +- [Add Spare Drive to Raid 5 Setup][4] + +### 结论 ### + +在这篇文章中,我们已经看到了如何使用三个磁盘配置一个 RAID 5 。在接下来的文章中,我们将看到如何故障排除并且当 RAID 5 中的一个磁盘损坏后如何恢复。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid-5-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/create-raid0-in-linux/ +[3]:http://www.tecmint.com/create-raid1-in-linux/ +[4]:http://www.tecmint.com/create-raid-6-in-linux/ From 593eb1799e96e40d4a8d88141bf4de850382f253 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 4 Aug 2015 09:30:10 +0800 Subject: [PATCH 1597/2517] Update 20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md --- ...ktop--What They Get Right & Wrong - Page 1 - Introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md index de47f0864e..39f29af147 100644 --- a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md +++ b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md @@ -36,7 +36,7 @@ ![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login3_show&w=1920) -切换到上流的Breeve主题……突然间,我抱怨的大部分问题都被完善了。通用图标,所有东西都放在了屏幕中央,但不是那么重要的被放到了一边。因为屏幕顶部和底部都是同样的空白,在中间也就酝酿出了一种美好的和谐。还是有一个输入框来切换会话,但既然电源按钮被做成了通用图标,那么这点还算可以原谅。当然gnome还是有一些很好的附加物,例如音量小程序和可访问按钮,但Breeze总归是Fedora的KDE主题的一个进步。 +切换到upstream的Breeve主题……突然间,我抱怨的大部分问题都被完善了。通用图标,所有东西都放在了屏幕中央,但不是那么重要的被放到了一边。因为屏幕顶部和底部都是同样的空白,在中间也就酝酿出了一种美好的和谐。还是有一个输入框来切换会话,但既然电源按钮被做成了通用图标,那么这点还算可以原谅。当然gnome还是有一些很好的附加物,例如音量小程序和可访问按钮,但Breeze总归是Fedora的KDE主题的一个进步。 到Windows(Windows 8和10之前)或者OS X中去,你会看到类似的东西——非常简洁的,“不挡你道”的锁屏与登录界面,它们都没有输入框或者其它分散视觉的小工具。这是一种有效的不分散人注意力的设计。Fedora……默认装有Breeze。VDG在Breeze主题设计上干得不错。可别糟蹋了它。 From bba6ac1d9e04d9cdf1a2d35a77a549e83873350d Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 4 Aug 2015 09:34:03 +0800 Subject: [PATCH 1598/2517] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=96=87?= =?UTF-8?q?=20=20XLCYun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...t & Wrong - Page 3 - GNOME Applications.md | 62 ------------------- 1 file changed, 62 deletions(-) delete mode 100644 sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md diff --git a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md deleted file mode 100644 index c70978dc9b..0000000000 --- a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md +++ /dev/null @@ -1,62 +0,0 @@ -Translating by XLCYun. -A Week With GNOME As My Linux Desktop: What They Get Right & Wrong - Page 3 - GNOME Applications -================================================================================ -### Applications ### - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_videos_show&w=1920) - -This is the one area where things are basically a wash. Each environment has a few applications that are really nice, and a few that are not so great. Once again though, Gnome gets the little things right in a way that KDE completely misses. None of KDE's applications are bad or broken, that's not what I'm saying. They function. But that's about it. To use an analogy: they passed the test, but they sure didn't get any where close to 100% on it. - -Gnome on left, KDE on right. Dragon performs perfectly fine, it has clearly marked buttons for playing a file, URL, or a disc, just as you can do under Gnome Videos... but Gnome takes it one extra little step further in the name of convenience and user friendliness: they show all the videos detected under your system by default, without you having to do anything. KDE has Baloo-- just as they had Nepomuk before that-- why not use them? They've got a list video files that are freely accessible... but don't make use of the feature. - -Moving on... Music Players. - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_rhythmbox_show&w=1920) - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_amarok_show&w=1920) - -Both of these applications, Rhythmbox on the left and Amarok on the right were opened up and then a screenshot was immediately taken, nothing was clicked, or altered. See the difference? Rhythmbox looks like a music player. It's direct, there's obvious ways to sort the results, it knows what is trying to be and what it's job is: to play music. - -Amarok feels like one of the tech demos, or library demos where someone puts every option and extension they possible can all inside one application in order to show them off-- it's never something that gets shipped as production, it's just there to show off bits and pieces. And that's exactly what Amarok feels like: its someone trying to show off every single possible cool thing they shove into a media player without ever stopping to think "Wait, what were trying to write again? An app to play music?" - -Just look at the default layout. What is front and center for the user? A visualizer and Wikipedia integration-- the largest and most prominent column on the page. What's the second largest? Playlist list. Third largest, aka smallest? The actual music listing. How on earth are these sane defaults for a core application? - -Software Managers! Something that has seen a lot of push in recent years and will likely only see a bigger push in the months to come. Unfortunately, it's another area where KDE was so close... and then fell on its face right at the finish line. - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_software_show&w=1920) - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_apper_show&w=1920) - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_muon_show&w=1920) - -Gnome Software is probably my new favorite software center, minus one gripe which I will get to in a bit. Muon, I wanted to like you. I really did. But you are a design nightmare. When the VDG was drawing up plans for you (mockup below), you looked pretty slick. Good use of white space, clean design, nice category listing, your whole not-being-split-into-two-applications. - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_muon1_show&w=1920) - -Then someone got around to coding you and doing your actual UI, and I can only guess they were drunk while they did it. - -Let's look at Gnome Software. What's smack dab in the middle? The application, its screenshots, its description, etc. What's smack dab in the middle of Muon? Gigantic waste of white space. Gnome Software also includes the lovely convenience feature of putting a "Launch" button right there in case you already have an application installed. Convenience and ease of use are important, people. Honestly, JUST having things in Muon be centered aligned would probably make things look better already. - -What's along the top edge of Gnome Software, like a tab listing? All Software, Installed, Updates. Clean language, direct, to the point. Muon? Well, we have "Discover", which works okay as far as language goes, and then we have Installed, and then nothing. Where's updates? - -Well.. the developers decided to split updates off into its own application, thus requiring you to open two applications to handle your software-- one to install it, and one to update it-- going against every Software Center paradigm that has ever existed since the Synaptic graphical package manager. - -I'm not going to show it in a screenshot just because I don't want to have to clean up my system afterwards, but if you go into Muon and start installing something the way it shows that is by adding a little tab to the bottom of your screen with the application's name. That tab doesn't go away when the application is done installing either, so if you're installing a lot of applications at a single time then you'll just slowly accumulate tabs along the bottom that you then have to go through and clean up manually, because if you don't then they grow off the screen and you have to swipe through them all to get to the most recent ones. Think: opening 50 tabs in Firefox. Major annoyance, major inconvenience. - -I did say I would bash on Gnome a bit, and I meant it. Muon does get one thing very right that Gnome Software doesn't. Under the settings bar Muon has an option for "Show Technical Packages" aka: compilers, software libraries, non-graphical applications, applications without AppData, etc. Gnome doesn't. If you want to install any of those you have to drop down to the terminal. I think that's wrong. I certainly understand wanting to push AppData but I think they pushed it too soon. What made me realize Gnome didn't have this setting was when I went to install PowerTop and couldn't get Gnome to display it-- no AppData, no "Show Technical Packages" setting. - -Doubly unfortunate is the fact that you can't "just use apper" if you're under KDE since... - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_apperlocal_show&w=1920) - -Apper's support for installing local packages has been broken for since Fedora 19 or so, almost two years. I love the attention to detail and quality. - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=3 - -作者:Eric Griffith -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From f7e118d42898004ec5ce6ce2c842c94822a2f148 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Tue, 4 Aug 2015 09:39:34 +0800 Subject: [PATCH 1599/2517] =?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 --- ...t & Wrong - Page 3 - GNOME Applications.md | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md new file mode 100644 index 0000000000..42539badcc --- /dev/null +++ b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md @@ -0,0 +1,61 @@ +将GNOME作为我的Linux桌面的一周: 他们做对的与做错的 - 第三节 - GNOME应用 +================================================================================ +### 应用 ### + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_videos_show&w=1920) + +这是一个基本上一潭死水的地方。每一个桌面环境都有一些非常好的和不怎么样的应用。再次强调,Gnome把那些KDE完全错失的小细节给做对了。我不是想说KDE中有哪些应用不好。他们都能工作。但仅此而已。也就是说:它们合格了,但确实还没有达到甚至接近100分。 + +Gnome的在左边,KDE的在右边。Dragon运行得很好,清晰的标出了播放文件、URL或和光盘的按钮,正如你在Gnome Videos中能做到的一样……但是在便利的文件名和用户的友好度方面,Gnome多走了一小步。它默认显示了在你的电脑上检测到的所有影像文件,不需要你做任何事情。KDE有Baloo——正如之前有Nepomuk——为什么不使用它们?它们能列出可读取的影像文件……但却没被使用。 + +下一步……音乐播放器 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_rhythmbox_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_amarok_show&w=1920) + +这两个应用,左边的Rhythmbox和右边的Amarok,都是打开后没有做任何修改直接截屏的。看到差别了吗?Rhythmbox看起来像个音乐播放器,直接了当,排序文件的方法也很清晰,它知道它应该是什么样的,它的工作是什么:就是播放音乐。 + +Amarok感觉就像是某个人为了展示而把所有的扩展和选项都尽可能地塞进一个应用程序中去而做出来的一个技术演示产品(tech demos),或者一个库演示产品(library demos)——而这些是不应该做为产品装进去的,它只应该展示一些零碎的东西。而Amarok给人的感觉却是这样的:好像是某个人想把每一个感觉可能很酷的东西都塞进一个媒体播放器里,甚至都不停下来想“我想写啥来着?一个播放音乐的应用?” + +看看默认布局就行了。前面和中心都呈现了什么?一个可视化工具和维基集成(wikipedia integration)——占了整个页面最大和最显眼的区域。第二大的呢?播放列表。第三大,同时也是最小的呢?真正的音乐列表。这种默认设置对于一个核心应用来说,怎么可能称得上理智? + +软件管理器!它在最近几年当中有很大的进步,而且接下来的几个月中,很可能只能看到它更大的进步。不幸的是,这是另一个地方KDE做得差一点点就能……但还是在终点线前摔了脸。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_software_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_apper_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_muon_show&w=1920) + +Gnome软件中心可能是我最新的最爱,先放下牢骚等下再发。Muon, 我想爱上你,真的。但你就是个设计上的梦魇。当VDG给你画设计草稿时(模型在下面),你看起来真漂亮。白色空间用得很好,设计简洁,类别列表也很好,你的整个“不要分开做成两个应用程序”的设计都很不错。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_muon1_show&w=1920) + +接着就有人为你写代码,实现真正的UI,但是,我猜这些家伙当时一定是喝醉了。 + +我们来看看Gnome软件中心。正中间是什么?软件,软件截图和软件描述等等。Muon的正中心是什么?白白浪费的大块白色空间。Gnome软件中心还有一个贴心便利特点,那就是放了一个“运行“的按钮在那儿,以防你已经安装了这个软件。便利性和易用性很重要啊,大哥。说实话,仅仅让Muon把东西都居中对齐了可能看起来的效果都要好得多。 + +Gnome软件中心沿着顶部的东西是什么,像个标签列表?所有软件,已安装软件,软件升级。语言简洁,直接,直指要点。Muon,好吧,我们有个”发现“,这个语言表达上还算差强人意,然后我们又有一个”已安装软件“,然后,就没有然后了。软件升级哪去了? + +好吧……开发者决定把升级独立分开成一个应用程序,这样你就得打开两个应用程序才能管理你的软件——一个用来安装,一个用来升级——自从有了新得立图形软件包管理器以来,首次有这种破天荒的设计,与任何已存的软件中心的设计范例相违背。 + +我不想贴上截图给你们看,因为我不想等下还得清理我的电脑,如果你进入Muon安装了什么,那么它就会在屏幕下方根据安装的应用名创建一个标签,所以如果你一次性安装很多软件的话,那么下面的标签数量就会慢慢的增长,然后你就不得不手动检查清除它们,因为如果你不这样做,当标签增长到超过屏幕显示时,你就不得不一个个找过去来才能找到最近正在安装的软件。想想:在火狐浏览器打开50个标签。太烦人,太不方便! + +我说过我会给Gnome一点打击,我是认真的。Muon有一点做得比Gnome软件中心做得好。在Muon的设置栏下面有个“显示技术包”,即:编辑器,软件库,非图形应用程序,无AppData的应用等等(AppData,软件包中的一个特殊文件,用于专门存储软件的信息,译注)。Gnome则没有。如果你想安装其中任何一项你必须跑到终端操作。我想这是他们做得不对的一点。我完全理解他们推行AppData的心情,但我想他们太急了(推行所有软件包带有AppData,是Gnome软件中心的目标之一,译注)。我是在想安装PowerTop,而Gnome不显示这个软件时我才发现这点的——没有AppData,没有“显示技术包“设置。 + +更不幸的事实是你不能“用Apper就行了”,自从…… + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_apperlocal_show&w=1920) + +Apper对安装本地软件包的支持大约在Fedora 19时就中止了,几乎两年了。我喜欢那种对细节与质量的关注。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=3 + +作者:Eric Griffith +译者:[XLCYun](https://github.com/XLCYun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 6c78506ad82f4ca2fa473cb2e7e609813b5637f6 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 4 Aug 2015 09:48:34 +0800 Subject: [PATCH 1600/2517] =?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 修改一些笔误 --- ...o run Ubuntu Snappy Core on Raspberry Pi 2.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md b/translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md index c4475f39a2..f5e6fe60b2 100644 --- a/translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md +++ b/translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md @@ -2,13 +2,13 @@ ================================================================================ 物联网(Internet of Things, IoT) 时代即将来临。很快,过不了几年,我们就会问自己当初是怎么在没有物联网的情况下生存的,就像我们现在怀疑过去没有手机的年代。Canonical 就是一个物联网快速发展却还是开放市场下的竞争者。这家公司宣称自己把赌注压到了IoT 上,就像他们已经在“云”上做过的一样。。在今年一月底,Canonical 启动了一个基于Ubuntu Core 的小型操作系统,名字叫做 [Ubuntu Snappy Core][1] 。 -Snappy 是一种用来替代deb 的新的打包格式,是一个用来更新系统的前端,从CoreOS、红帽子和其他地方借鉴了原子更新这个想法。很快树莓派2 代投入市场,Canonical 就发布了用于树莓派的Snappy Core 版本。第一代树莓派因为是基于ARMv6 ,而Ubuntu 的ARM 镜像是基于ARMv7 ,所以不能运行ubuntu 。不过这种状况现在改变了,Canonical 通过发布用于RPI2 的镜像,抓住机会澄清了Snappy 就是一个用于云计算,特别是IoT 的系统。 +Snappy 是一种用来替代deb 的新的打包格式,是一个用来更新系统的前端,从CoreOS、红帽子和其他系统借鉴了**原子更新**这个想法。树莓派2 代投入市场,Canonical 很快就发布了用于树莓派的Snappy Core 版本。而第一代树莓派因为是基于ARMv6 ,Ubuntu 的ARM 镜像是基于ARMv7 ,所以不能运行ubuntu 。不过这种状况现在改变了,Canonical 通过发布用于RPI2 的镜像,抓住机会证明了Snappy 就是一个用于云计算,特别是用于物联网的系统。 -Snappy 同样可以运行在其它像Amazon EC2, Microsofts Azure, Google's Compute Engine 这样的云端上,也可以虚拟化在KVM、Virtuabox 和vagrant 上。Canonical 已经拥抱了微软、谷歌、Docker、OpenStack 这些重量级选手,同时也与一些小项目达成合作关系。除了一些创业公司,像Ninja Sphere、Erle Robotics,还有一些开发板生产商比如Odroid、Banana Pro, Udoo, PCDuino 和Parallella 、全志。Snappy Core 也希望很快能运行在路由器上,来帮助改进路由器生产商目前很少更新固件的策略。 +Snappy 同样可以运行在其它像Amazon EC2, Microsofts Azure, Google的 Compute Engine 这样的云端上,也可以虚拟化在KVM、Virtuabox 和vagrant 上。Canonical Ubuntu 已经拥抱了微软、谷歌、Docker、OpenStack 这些重量级选手,同时也与一些小项目达成合作关系。除了一些创业公司,比如Ninja Sphere、Erle Robotics,还有一些开发板生产商,比如Odroid、Banana Pro, Udoo, PCDuino 和Parallella 、全志,Snappy 也提供了支持。Snappy Core 同时也希望尽快运行到路由器上来帮助改进路由器生产商目前很少更新固件的策略。 接下来,让我们看看怎么样在树莓派2 上运行Snappy。 -用于树莓派2 的Snappy 镜像可以从 [Raspberry Pi 网站][2] 上下载。解压缩出来的镜像必须[写到一个至少8GB 大小的SD 卡][3]。尽管原始系统很小,但是院子升级和回滚功能会蚕食不小的空间。使用Snappy 启动树莓派2 后你就可以使用默认用户名和密码(都是ubuntu)登录系统。 +用于树莓派2 的Snappy 镜像可以从 [Raspberry Pi 网站][2] 上下载。解压缩出来的镜像必须[写到一个至少8GB 大小的SD 卡][3]。尽管原始系统很小,但是原子升级和回滚功能会占用不小的空间。使用Snappy 启动树莓派2 后你就可以使用默认用户名和密码(都是ubuntu)登录系统。 ![](https://farm8.staticflickr.com/7639/16428527263_f7bdd56a0d_c.jpg) @@ -18,7 +18,7 @@ sudo 已经配置好了可以直接用,安全起见,你应该使用以下命 或者也可以使用`adduser` 为你添加一个新用户。 -因为RPI缺少硬件始终,而Snappy 不知道这一点,所以系统会有一个小bug:处理命令时会报很多错。不过这个很容易解决: +因为RPI缺少硬件时钟,而Snappy 并不知道这一点,所以系统会有一个小bug:处理某些命令时会报很多错。不过这个很容易解决: 使用这个命令来确认这个bug 是否影响: @@ -36,7 +36,7 @@ sudo 已经配置好了可以直接用,安全起见,你应该使用以下命 $ sudo apt-get update && sudo apt-get distupgrade -现在将不会让你通过,因为Snappy 会使用它自己精简过的、基于dpkg 的包管理系统。这是做是应为Snappy 会运行很多嵌入式程序,而你也会想着所有事情尽可能的简化。 +不过这时系统不会让你通过,因为Snappy 使用它自己精简过的、基于dpkg 的包管理系统。这么做的原因是Snappy 会运行很多嵌入式程序,而同时你也会想着所有事情尽可能的简化。 让我们来看看最关键的部分,理解一下程序是如何与Snappy 工作的。运行Snappy 的SD 卡上除了boot 分区外还有3个分区。其中的两个构成了一个重复的文件系统。这两个平行文件系统被固定挂载为只读模式,并且任何时刻只有一个是激活的。第三个分区是一个部分可写的文件系统,用来让用户存储数据。通过更新系统,标记为'system-a' 的分区会保持一个完整的文件系统,被称作核心,而另一个平行文件系统仍然会是空的。 @@ -52,13 +52,13 @@ sudo 已经配置好了可以直接用,安全起见,你应该使用以下命 $ sudo snappy versions -a -经过更新-重启的操作,你应该可以看到被激活的核心已经被改变了。 +经过更新-重启两步操作,你应该可以看到被激活的核心已经被改变了。 因为到目前为止我们还没有安装任何软件,下面的命令: $ sudo snappy update ubuntu-core -将会生效,而且如果你打算仅仅更新特定的OS,这也是一个办法。如果出了问题,你可以使用下面的命令回滚: +将会生效,而且如果你打算仅仅更新特定的OS 版本,这也是一个办法。如果出了问题,你可以使用下面的命令回滚: $ sudo snappy rollback ubuntu-core @@ -77,7 +77,7 @@ sudo 已经配置好了可以直接用,安全起见,你应该使用以下命 via: http://xmodulo.com/ubuntu-snappy-core-raspberry-pi-2.html 作者:[Ferdinand Thommes][a] -译者:[译者ID](https://github.com/oska874) +译者:[Ezio](https://github.com/oska874) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 5e44c4c18b98bbb459008ca388adc4f54a5a59e3 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 10:29:24 +0800 Subject: [PATCH 1601/2517] Create Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md --- ... (Mirroring) using 'Two Disks' in Linux.md | 217 ++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 translated/tech/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md diff --git a/translated/tech/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md b/translated/tech/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md new file mode 100644 index 0000000000..948e530ed8 --- /dev/null +++ b/translated/tech/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md @@ -0,0 +1,217 @@ +在 Linux 中使用"两个磁盘"创建 RAID 1(镜像) - 第3部分 +================================================================================ +RAID 镜像意味着相同数据的完整克隆(或镜像)写入到两个磁盘中。创建 RAID1 至少需要两个磁盘,它的读取性能或者可靠性比数据存储容量更好。 + + +![Create Raid1 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID1-in-Linux.jpeg) + +在 Linux 中设置 RAID1 + +创建镜像是为了防止因硬盘故障导致数据丢失。镜像中的每个磁盘包含数据的完整副本。当一个磁盘发生故障时,相同的数据可以从其它正常磁盘中读取。而后,可以从正在运行的计算机中直接更换发生故障的磁盘,无需任何中断。 + +### RAID 1 的特点 ### + +-镜像具有良好的性能。 + +-磁盘利用率为50%。也就是说,如果我们有两个磁盘每个500GB,总共是1TB,但在镜像中它只会显示500GB。 + +-在镜像如果一个磁盘发生故障不会有数据丢失,因为两个磁盘中的内容相同。 + +-读取数据会比写入性能更好。 + +#### 要求 #### + + +创建 RAID 1 至少要有两个磁盘,你也可以添加更多的磁盘,磁盘数需为2,4,6,8的两倍。为了能够添加更多的磁盘,你的系统必须有 RAID 物理适配器(硬件卡)。 + +这里,我们使用软件 RAID 不是硬件 RAID,如果你的系统有一个内置的物理硬件 RAID 卡,你可以从它的 UI 组件或使用 Ctrl + I 键来访问它。 + +需要阅读: [Basic Concepts of RAID in Linux][1] + +#### 在我的服务器安装 #### + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.226 + Hostname : rd1.tecmintlocal.com + Disk 1 [20GB] : /dev/sdb + Disk 2 [20GB] : /dev/sdc + +本文将指导你使用 mdadm (创建和管理 RAID 的)一步一步的建立一个软件 RAID 1 或镜像在 Linux 平台上。但同样的做法也适用于其它 Linux 发行版如 RedHat,CentOS,Fedora 等等。 + +### 第1步:安装所需要的并且检查磁盘 ### + +1.正如我前面所说,在 Linux 中我们需要使用 mdadm 软件来创建和管理 RAID。所以,让我们用 yum 或 apt-get 的软件包管理工具在 Linux 上安装 mdadm 软件包。 + + # yum install mdadm [on RedHat systems] + # apt-get install mdadm [on Debain systems] + +2. 一旦安装好‘mdadm‘包,我们需要使用下面的命令来检查磁盘是否已经配置好。 + + # mdadm -E /dev/sd[b-c] + +![Check RAID on Disks](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-on-Disks.png) + +检查 RAID 的磁盘 + + +正如你从上面图片看到的,没有检测到任何超级块,这意味着还没有创建RAID。 + +### 第2步:为 RAID 创建分区 ### + +3. 正如我提到的,我们最少使用两个分区 /dev/sdb 和 /dev/sdc 来创建 RAID1。我们首先使用‘fdisk‘命令来创建这两个分区并更改其类型为 raid。 + + # fdisk /dev/sdb + +按照下面的说明 + +- 按 ‘n’ 创建新的分区。 +- 然后按 ‘P’ 选择主分区。 +- 接下来选择分区号为1。 +- 按两次回车键默认将整个容量分配给它。 +- 然后,按 ‘P’ 来打印创建好的分区。 +- 按 ‘L’,列出所有可用的类型。 +- 按 ‘t’ 修改分区类型。 +- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 +- 然后再次使用‘p’查看我们所做的更改。 +- 使用‘w’保存更改。 + +![Create Disk Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Disk-Partitions.png) + +创建磁盘分区 + +在创建“/dev/sdb”分区后,接下来按照同样的方法创建分区 /dev/sdc 。 + + # fdisk /dev/sdc + +![Create Second Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Second-Partitions.png) + +创建第二个分区 + +4. 一旦这两个分区创建成功后,使用相同的命令来检查 sdb & sdc 分区并确认 RAID 分区的类型如上图所示。 + + # mdadm -E /dev/sd[b-c] + +![Verify Partitions Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Partitions-Changes.png) + +验证分区变化 + +![Check RAID Type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Type.png) + +检查 RAID 类型 + +**注意**: 正如你在上图所看到的,在 sdb1 和 sdc1 中没有任何对 RAID 的定义,这就是我们没有检测到超级块的原因。 + +### 步骤3:创建 RAID1 设备 ### + +5.接下来使用以下命令来创建一个名为 /dev/md0 的“RAID1”设备并验证它 + + # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[b-c]1 + # cat /proc/mdstat + +![Create RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device.png) + +创建RAID设备 + +6. 接下来使用如下命令来检查 RAID 设备类型和 RAID 阵列 + + # mdadm -E /dev/sd[b-c]1 + # mdadm --detail /dev/md0 + +![Check RAID Device type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-type.png) + +检查 RAID 设备类型 + +![Check RAID Device Array](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-Array.png) + +检查 RAID 设备阵列 + +从上图中,人们很容易理解,RAID1 已经使用的 /dev/sdb1 和 /dev/sdc1 分区被创建,你也可以看到状态为 resyncing。 + +### 第4步:在 RAID 设备上创建文件系统 ### + +7. 使用 ext4 为 md0 创建文件系统并挂载到 /mnt/raid1 . + + # mkfs.ext4 /dev/md0 + +![Create RAID Device Filesystem](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device-Filesystem.png) + +创建 RAID 设备文件系统 + +8. 接下来,挂载新创建的文件系统到“/mnt/raid1”,并创建一些文件,验证在挂载点的数据 + + # mkdir /mnt/raid1 + # mount /dev/md0 /mnt/raid1/ + # touch /mnt/raid1/tecmint.txt + # echo "tecmint raid setups" > /mnt/raid1/tecmint.txt + +![Mount Raid Device](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-RAID-Device.png) + +挂载 RAID 设备 + +9.为了在系统重新启动自动挂载 RAID1,需要在 fstab 文件中添加条目。打开“/etc/fstab”文件并添加以下行。 + + /dev/md0 /mnt/raid1 ext4 defaults 0 0 + +![Raid Automount Device](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Automount-Filesystem.png) + +自动挂载 Raid 设备 + +10. 运行“mount -a”,检查 fstab 中的条目是否有错误 + # mount -av + +![Check Errors in fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-fstab.png) + +检查 fstab 中的错误 + +11. 接下来,使用下面的命令保存 raid 的配置到文件“mdadm.conf”中。 + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +![Save Raid Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Raid-Configuration.png) + +保存 Raid 的配置 + +上述配置文件在系统重启时会读取并加载 RAID 设备。 + +### 第5步:在磁盘故障后检查数据 ### + +12.我们的主要目的是,即使在任何磁盘故障或死机时必须保证数据是可用的。让我们来看看,当任何一个磁盘不可用时会发生什么。 + + # mdadm --detail /dev/md0 + +![Raid Device Verify](http://www.tecmint.com/wp-content/uploads/2014/10/Raid-Device-Verify.png) + +验证 Raid 设备 + +在上面的图片中,我们可以看到在 RAID 中有2个设备是可用的并且 Active Devices 是2.现在让我们看看,当一个磁盘拔出(移除 sdc 磁盘)或损坏后会发生什么。 + + # ls -l /dev | grep sd + # mdadm --detail /dev/md0 + +![Test RAID Devices](http://www.tecmint.com/wp-content/uploads/2014/10/Test-RAID-Devices.png) + +测试 RAID 设备 + +现在,在上面的图片中你可以看到,一个磁盘不见了。我从虚拟机上删除了一个磁盘。此时让我们来检查我们宝贵的数据。 + + # cd /mnt/raid1/ + # cat tecmint.txt + +![Verify RAID Data](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Data.png) + +验证 RAID 数据 + +你有没有看到我们的数据仍然可用。由此,我们可以知道 RAID 1(镜像)的优势。在接下来的文章中,我们将看到如何设置一个 RAID 5 条带化分布式奇偶校验。希望这可以帮助你了解 RAID 1(镜像)是如何工作的。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid1-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ From 21d4f77e67c1780b8f0a67defbe4dc8487cd512a Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 10:31:36 +0800 Subject: [PATCH 1602/2517] Create Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md --- ...iping with Distributed Parity) in Linux.md | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 translated/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md diff --git a/translated/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md b/translated/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md new file mode 100644 index 0000000000..7de5199a08 --- /dev/null +++ b/translated/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md @@ -0,0 +1,285 @@ + +在 Linux 中创建 RAID 5(条带化与分布式奇偶校验) - 第4部分 +================================================================================ +在 RAID 5 中,条带化数据跨多个驱磁盘使用分布式奇偶校验。分布式奇偶校验的条带化意味着它将奇偶校验信息和条带中的数据分布在多个磁盘上,它将有很好的数据冗余。 + +![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/setup-raid-5-in-linux.jpg) + +在 Linux 中配置 RAID 5 + +对于此 RAID 级别它至少应该有三个或更多个磁盘。RAID 5 通常被用于大规模生产环境中花费更多的成本来提供更好的数据冗余性能。 + +#### 什么是奇偶校验? #### + +奇偶校验是在数据存储中检测错误最简单的一个方法。奇偶校验信息存储在每个磁盘中,比如说,我们有4个磁盘,其中一个磁盘空间被分割去存储所有磁盘的奇偶校验信息。如果任何一个磁盘出现故障,我们可以通过更换故障磁盘后,从奇偶校验信息重建得到原来的数据。 + +#### RAID 5 的优点和缺点 #### + +- 提供更好的性能 +- 支持冗余和容错。 +- 支持热备份。 +- 将失去一个磁盘的容量存储奇偶校验信息。 +- 单个磁盘发生故障后不会丢失数据。我们可以更换故障硬盘后从奇偶校验信息中重建数据。 +- 事务处理读操作会更快。 +- 由于奇偶校验占用资源,写操作将是缓慢的。 +- 重建需要很长的时间。 + +#### 要求 #### +创建 RAID 5 最少需要3个磁盘,你也可以添加更多的磁盘,前提是你要有多端口的专用硬件 RAID 控制器。在这里,我们使用“mdadm”包来创建软件 RAID。 + +mdadm 是一个允许我们在 Linux 下配置和管理 RAID 设备的包。默认情况下 RAID 没有可用的配置文件,我们在创建和配置 RAID 后必须将配置文件保存在一个单独的文件中,例如:mdadm.conf。 + +在进一步学习之前,我建议你通过下面的文章去了解 Linux 中 RAID 的基础知识。 + +- [Basic Concepts of RAID in Linux – Part 1][1] +- [Creating RAID 0 (Stripe) in Linux – Part 2][2] +- [Setting up RAID 1 (Mirroring) in Linux – Part 3][3] + +#### 我的服务器设置 #### + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.227 + Hostname : rd5.tecmintlocal.com + Disk 1 [20GB] : /dev/sdb + Disk 2 [20GB] : /dev/sdc + Disk 3 [20GB] : /dev/sdd + +这篇文章是 RAID 系列9教程的第4部分,在这里我们要建立一个软件 RAID 5(分布式奇偶校验)使用三个20GB(名为/dev/sdb, /dev/sdc 和 /dev/sdd)的磁盘在 Linux 系统或服务器中上。 + +### 第1步:安装 mdadm 并检验磁盘 ### + +1.正如我们前面所说,我们使用 CentOS 6.5 Final 版本来创建 RAID 设置,但同样的做法也适用于其他 Linux 发行版。 + + # lsb_release -a + # ifconfig | grep inet + +![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/CentOS-6.5-Summary.png) + +CentOS 6.5 摘要 + +2. 如果你按照我们的 RAID 系列去配置的,我们假设你已经安装了“mdadm”包,如果没有,根据你的 Linux 发行版使用下面的命令安装。 + + # yum install mdadm [on RedHat systems] + # apt-get install mdadm [on Debain systems] + +3. “mdadm”包安装后,先使用‘fdisk‘命令列出我们在系统上增加的三个20GB的硬盘。 + + # fdisk -l | grep sd + +![Install mdadm Tool in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/Install-mdadm-Tool.png) + +安装 mdadm 工具 + +4. 现在该检查这三个磁盘是否存在 RAID 块,使用下面的命令来检查。 + + # mdadm -E /dev/sd[b-d] + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd + +![Examine Drives For Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Examine-Drives-For-Raid.png) + +检查 Raid 磁盘 + +**注意**: 上面的图片说明,没有检测到任何超级块。所以,这三个磁盘中没有定义 RAID。让我们现在开始创建一个吧! + +### 第2步:为磁盘创建 RAID 分区 ### + +5. 首先,在创建 RAID 前我们要为磁盘分区(/dev/sdb, /dev/sdc 和 /dev/sdd),在进行下一步之前,先使用‘fdisk’命令进行分区。 + + # fdisk /dev/sdb + # fdisk /dev/sdc + # fdisk /dev/sdd + +#### 创建 /dev/sdb 分区 #### + +请按照下面的说明在 /dev/sdb 硬盘上创建分区。 + +- 按 ‘n’ 创建新的分区。 +- 然后按 ‘P’ 选择主分区。选择主分区是因为还没有定义过分区。 +- 接下来选择分区号为1。默认就是1. +- 这里是选择柱面大小,我们没必要选择指定的大小,因为我们需要为 RAID 使用整个分区,所以只需按两次 Enter 键默认将整个容量分配给它。 +- 然后,按 ‘P’ 来打印创建好的分区。 +- 改变分区类型,按 ‘L’可以列出所有可用的类型。 +- 按 ‘t’ 修改分区类型。 +- 这里使用‘fd’设置为 RAID 的类型。 +- 然后再次使用‘p’查看我们所做的更改。 +- 使用‘w’保存更改。 + +![Create sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdb-Partition1.png) + +创建 sdb 分区 + +**注意**: 我们仍要按照上面的步骤来创建 sdc 和 sdd 的分区。 + +#### 创建 /dev/sdc 分区 #### + +现在,通过下面的截图给出创建 sdc 和 sdd 磁盘分区的方法,或者你可以按照上面的步骤。 + + # fdisk /dev/sdc + +![Create sdc Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdc-Partition1.png) + +创建 sdc 分区 + +#### 创建 /dev/sdd 分区 #### + + # fdisk /dev/sdd + +![Create sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdd-Partition1.png) + +创建 sdd 分区 + +6. 创建分区后,检查三个磁盘 sdb, sdc, sdd 的变化。 + + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd + + or + + # mdadm -E /dev/sd[b-c] + +![Check Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Changes-on-Partitions.png) + +检查磁盘变化 + +**注意**: 在上面的图片中,磁盘的类型是 fd。 + +7.现在在新创建的分区检查 RAID 块。如果没有检测到超级块,我们就能够继续下一步,创建一个新的 RAID 5 的设置在这些磁盘中。 + +![Check Raid on Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-Partitions.png) + +在分区中检查 Raid + +### 第3步:创建 md 设备 md0 ### + +8. 现在创建一个 RAID 设备“md0”(即 /dev/md0)使用所有新创建的分区(sdb1, sdc1 and sdd1) ,使用以下命令。 + + # mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 + + or + + # mdadm -C /dev/md0 -l=5 -n=3 /dev/sd[b-d]1 + +9. 创建 RAID 设备后,检查并确认 RAID,包括设备和从 mdstat 中输出的 RAID 级别。 + + # cat /proc/mdstat + +![Verify Raid Device](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Device.png) + +验证 Raid 设备 + +如果你想监视当前的创建过程,你可以使用‘watch‘命令,使用 watch ‘cat /proc/mdstat‘,它会在屏幕上显示且每隔1秒刷新一次。 + + # watch -n1 cat /proc/mdstat + +![Monitor Raid Process](http://www.tecmint.com/wp-content/uploads/2014/11/Monitor-Raid-Process.png) + +监控 Raid 5 过程 + +![Raid 5 Process Summary](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Process-Summary.png) + +Raid 5 过程概要 + +10. 创建 RAID 后,使用以下命令验证 RAID 设备 + + # mdadm -E /dev/sd[b-d]1 + +![Verify Raid Level](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Level.png) + +验证 Raid 级别 + +**注意**: 因为它显示三个磁盘的信息,上述命令的输出会有点长。 + +11. 接下来,验证 RAID 阵列的假设,这包含正在运行 RAID 的设备,并开始重新同步。 + + # mdadm --detail /dev/md0 + +![Verify Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Array.png) + +验证 Raid 阵列 + +### 第4步:为 md0 创建文件系统### + +12. 在挂载前为“md0”设备创建 ext4 文件系统。 + + # mkfs.ext4 /dev/md0 + +![Create md0 Filesystem](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md0-Filesystem.png) + +创建 md0 文件系统 + +13.现在,在‘/mnt‘下创建目录 raid5,然后挂载文件系统到 /mnt/raid5/ 下并检查下挂载点的文件,你会看到 lost+found 目录。 + + # mkdir /mnt/raid5 + # mount /dev/md0 /mnt/raid5/ + # ls -l /mnt/raid5/ + +14. 在挂载点 /mnt/raid5 下创建几个文件,并在其中一个文件中添加一些内容然后去验证。 + + # touch /mnt/raid5/raid5_tecmint_{1..5} + # ls -l /mnt/raid5/ + # echo "tecmint raid setups" > /mnt/raid5/raid5_tecmint_1 + # cat /mnt/raid5/raid5_tecmint_1 + # cat /proc/mdstat + +![Mount Raid 5 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Mount-Raid-Device.png) + +挂载 Raid 设备 + +15. 我们需要在 fstab 中添加条目,否则系统重启后将不会显示我们的挂载点。然后编辑 fstab 文件添加条目,在文件尾追加以下行,如下图所示。挂载点会根据你环境的不同而不同。 + + # vim /etc/fstab + + /dev/md0 /mnt/raid5 ext4 defaults 0 0 + +![Raid 5 Automount](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Device-Automount.png) + +自动挂载 Raid 5 + +16. 接下来,运行‘mount -av‘命令检查 fstab 条目中是否有错误。 + + # mount -av + +![Check Fstab Errors](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Fstab-Errors.png) + +检查 Fstab 错误 + +### 第5步:保存 Raid 5 的配置 ### + +17. 在前面章节已经说过,默认情况下 RAID 没有配置文件。我们必须手动保存。如果此步不跟 RAID 设备将不会存在 md0,它将会跟一些其他数子。 + +所以,我们必须要在系统重新启动之前保存配置。如果配置保存它在系统重新启动时会被加载到内核中然后 RAID 也将被加载。 + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +![Save Raid 5 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Save-Raid-5-Configuration.png) + +保存 Raid 5 配置 + +注意:保存配置将保持 RAID 级别的稳定性在 md0 设备中。 + +### 第6步:添加备用磁盘 ### + +18.备用磁盘有什么用?它是非常有用的,如果我们有一个备用磁盘,当我们阵列中的任何一个磁盘发生故障后,这个备用磁盘会主动添加并重建进程,并从其他磁盘上同步数据,所以我们可以在这里看到冗余。 + +更多关于添加备用磁盘和检查 RAID 5 容错的指令,请阅读下面文章中的第6步和第7步。 + +- [Add Spare Drive to Raid 5 Setup][4] + +### 结论 ### + +在这篇文章中,我们已经看到了如何使用三个磁盘配置一个 RAID 5 。在接下来的文章中,我们将看到如何故障排除并且当 RAID 5 中的一个磁盘损坏后如何恢复。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid-5-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/create-raid0-in-linux/ +[3]:http://www.tecmint.com/create-raid1-in-linux/ +[4]:http://www.tecmint.com/create-raid-6-in-linux/ From c16ed6b8063def3f227e5e3f783a1b1520569574 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 10:32:00 +0800 Subject: [PATCH 1603/2517] =?UTF-8?q?Delete=20Setting=20up=20RAID=201=20(M?= =?UTF-8?q?irroring)=20using=20=E2=80=98Two=20Disks=E2=80=99=20in=20Linux?= =?UTF-8?q?=20=E2=80=93=20Part=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...oring) using ‘Two Disks’ in Linux – Part 3 | 217 ------------------ 1 file changed, 217 deletions(-) delete mode 100644 translated/tech/Setting up RAID 1 (Mirroring) using ‘Two Disks’ in Linux – Part 3 diff --git a/translated/tech/Setting up RAID 1 (Mirroring) using ‘Two Disks’ in Linux – Part 3 b/translated/tech/Setting up RAID 1 (Mirroring) using ‘Two Disks’ in Linux – Part 3 deleted file mode 100644 index 948e530ed8..0000000000 --- a/translated/tech/Setting up RAID 1 (Mirroring) using ‘Two Disks’ in Linux – Part 3 +++ /dev/null @@ -1,217 +0,0 @@ -在 Linux 中使用"两个磁盘"创建 RAID 1(镜像) - 第3部分 -================================================================================ -RAID 镜像意味着相同数据的完整克隆(或镜像)写入到两个磁盘中。创建 RAID1 至少需要两个磁盘,它的读取性能或者可靠性比数据存储容量更好。 - - -![Create Raid1 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID1-in-Linux.jpeg) - -在 Linux 中设置 RAID1 - -创建镜像是为了防止因硬盘故障导致数据丢失。镜像中的每个磁盘包含数据的完整副本。当一个磁盘发生故障时,相同的数据可以从其它正常磁盘中读取。而后,可以从正在运行的计算机中直接更换发生故障的磁盘,无需任何中断。 - -### RAID 1 的特点 ### - --镜像具有良好的性能。 - --磁盘利用率为50%。也就是说,如果我们有两个磁盘每个500GB,总共是1TB,但在镜像中它只会显示500GB。 - --在镜像如果一个磁盘发生故障不会有数据丢失,因为两个磁盘中的内容相同。 - --读取数据会比写入性能更好。 - -#### 要求 #### - - -创建 RAID 1 至少要有两个磁盘,你也可以添加更多的磁盘,磁盘数需为2,4,6,8的两倍。为了能够添加更多的磁盘,你的系统必须有 RAID 物理适配器(硬件卡)。 - -这里,我们使用软件 RAID 不是硬件 RAID,如果你的系统有一个内置的物理硬件 RAID 卡,你可以从它的 UI 组件或使用 Ctrl + I 键来访问它。 - -需要阅读: [Basic Concepts of RAID in Linux][1] - -#### 在我的服务器安装 #### - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.226 - Hostname : rd1.tecmintlocal.com - Disk 1 [20GB] : /dev/sdb - Disk 2 [20GB] : /dev/sdc - -本文将指导你使用 mdadm (创建和管理 RAID 的)一步一步的建立一个软件 RAID 1 或镜像在 Linux 平台上。但同样的做法也适用于其它 Linux 发行版如 RedHat,CentOS,Fedora 等等。 - -### 第1步:安装所需要的并且检查磁盘 ### - -1.正如我前面所说,在 Linux 中我们需要使用 mdadm 软件来创建和管理 RAID。所以,让我们用 yum 或 apt-get 的软件包管理工具在 Linux 上安装 mdadm 软件包。 - - # yum install mdadm [on RedHat systems] - # apt-get install mdadm [on Debain systems] - -2. 一旦安装好‘mdadm‘包,我们需要使用下面的命令来检查磁盘是否已经配置好。 - - # mdadm -E /dev/sd[b-c] - -![Check RAID on Disks](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-on-Disks.png) - -检查 RAID 的磁盘 - - -正如你从上面图片看到的,没有检测到任何超级块,这意味着还没有创建RAID。 - -### 第2步:为 RAID 创建分区 ### - -3. 正如我提到的,我们最少使用两个分区 /dev/sdb 和 /dev/sdc 来创建 RAID1。我们首先使用‘fdisk‘命令来创建这两个分区并更改其类型为 raid。 - - # fdisk /dev/sdb - -按照下面的说明 - -- 按 ‘n’ 创建新的分区。 -- 然后按 ‘P’ 选择主分区。 -- 接下来选择分区号为1。 -- 按两次回车键默认将整个容量分配给它。 -- 然后,按 ‘P’ 来打印创建好的分区。 -- 按 ‘L’,列出所有可用的类型。 -- 按 ‘t’ 修改分区类型。 -- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 -- 然后再次使用‘p’查看我们所做的更改。 -- 使用‘w’保存更改。 - -![Create Disk Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Disk-Partitions.png) - -创建磁盘分区 - -在创建“/dev/sdb”分区后,接下来按照同样的方法创建分区 /dev/sdc 。 - - # fdisk /dev/sdc - -![Create Second Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Second-Partitions.png) - -创建第二个分区 - -4. 一旦这两个分区创建成功后,使用相同的命令来检查 sdb & sdc 分区并确认 RAID 分区的类型如上图所示。 - - # mdadm -E /dev/sd[b-c] - -![Verify Partitions Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Partitions-Changes.png) - -验证分区变化 - -![Check RAID Type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Type.png) - -检查 RAID 类型 - -**注意**: 正如你在上图所看到的,在 sdb1 和 sdc1 中没有任何对 RAID 的定义,这就是我们没有检测到超级块的原因。 - -### 步骤3:创建 RAID1 设备 ### - -5.接下来使用以下命令来创建一个名为 /dev/md0 的“RAID1”设备并验证它 - - # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[b-c]1 - # cat /proc/mdstat - -![Create RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device.png) - -创建RAID设备 - -6. 接下来使用如下命令来检查 RAID 设备类型和 RAID 阵列 - - # mdadm -E /dev/sd[b-c]1 - # mdadm --detail /dev/md0 - -![Check RAID Device type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-type.png) - -检查 RAID 设备类型 - -![Check RAID Device Array](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-Array.png) - -检查 RAID 设备阵列 - -从上图中,人们很容易理解,RAID1 已经使用的 /dev/sdb1 和 /dev/sdc1 分区被创建,你也可以看到状态为 resyncing。 - -### 第4步:在 RAID 设备上创建文件系统 ### - -7. 使用 ext4 为 md0 创建文件系统并挂载到 /mnt/raid1 . - - # mkfs.ext4 /dev/md0 - -![Create RAID Device Filesystem](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device-Filesystem.png) - -创建 RAID 设备文件系统 - -8. 接下来,挂载新创建的文件系统到“/mnt/raid1”,并创建一些文件,验证在挂载点的数据 - - # mkdir /mnt/raid1 - # mount /dev/md0 /mnt/raid1/ - # touch /mnt/raid1/tecmint.txt - # echo "tecmint raid setups" > /mnt/raid1/tecmint.txt - -![Mount Raid Device](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-RAID-Device.png) - -挂载 RAID 设备 - -9.为了在系统重新启动自动挂载 RAID1,需要在 fstab 文件中添加条目。打开“/etc/fstab”文件并添加以下行。 - - /dev/md0 /mnt/raid1 ext4 defaults 0 0 - -![Raid Automount Device](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Automount-Filesystem.png) - -自动挂载 Raid 设备 - -10. 运行“mount -a”,检查 fstab 中的条目是否有错误 - # mount -av - -![Check Errors in fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-fstab.png) - -检查 fstab 中的错误 - -11. 接下来,使用下面的命令保存 raid 的配置到文件“mdadm.conf”中。 - - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - -![Save Raid Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Raid-Configuration.png) - -保存 Raid 的配置 - -上述配置文件在系统重启时会读取并加载 RAID 设备。 - -### 第5步:在磁盘故障后检查数据 ### - -12.我们的主要目的是,即使在任何磁盘故障或死机时必须保证数据是可用的。让我们来看看,当任何一个磁盘不可用时会发生什么。 - - # mdadm --detail /dev/md0 - -![Raid Device Verify](http://www.tecmint.com/wp-content/uploads/2014/10/Raid-Device-Verify.png) - -验证 Raid 设备 - -在上面的图片中,我们可以看到在 RAID 中有2个设备是可用的并且 Active Devices 是2.现在让我们看看,当一个磁盘拔出(移除 sdc 磁盘)或损坏后会发生什么。 - - # ls -l /dev | grep sd - # mdadm --detail /dev/md0 - -![Test RAID Devices](http://www.tecmint.com/wp-content/uploads/2014/10/Test-RAID-Devices.png) - -测试 RAID 设备 - -现在,在上面的图片中你可以看到,一个磁盘不见了。我从虚拟机上删除了一个磁盘。此时让我们来检查我们宝贵的数据。 - - # cd /mnt/raid1/ - # cat tecmint.txt - -![Verify RAID Data](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Data.png) - -验证 RAID 数据 - -你有没有看到我们的数据仍然可用。由此,我们可以知道 RAID 1(镜像)的优势。在接下来的文章中,我们将看到如何设置一个 RAID 5 条带化分布式奇偶校验。希望这可以帮助你了解 RAID 1(镜像)是如何工作的。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-raid1-in-linux/ - -作者:[Babin Lonston][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ From e7e25c9cb5858924af23c3ba900b69568250285e Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 10:32:12 +0800 Subject: [PATCH 1604/2517] =?UTF-8?q?Delete=20Introduction=20to=20RAID,=20?= =?UTF-8?q?Concepts=20of=20RAID=20and=20RAID=20Levels=20=E2=80=93=20Part?= =?UTF-8?q?=201.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ncepts of RAID and RAID Levels – Part 1.md | 146 ------------------ 1 file changed, 146 deletions(-) delete mode 100644 translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1.md diff --git a/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1.md b/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1.md deleted file mode 100644 index 8ca0ecbd7e..0000000000 --- a/translated/tech/Introduction to RAID, Concepts of RAID and RAID Levels – Part 1.md +++ /dev/null @@ -1,146 +0,0 @@ - -RAID的级别和概念的介绍 - 第1部分 -================================================================================ -RAID是廉价磁盘冗余阵列,但现在它被称为独立磁盘冗余阵列。早先一个容量很小的磁盘都是非常昂贵的,但是现在我们可以很便宜的买到一个更大的磁盘。Raid 是磁盘的一个集合,被称为逻辑卷。 - - -![RAID in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/RAID.jpg) - -在 Linux 中理解 RAID 的设置 - -RAID包含一组或者一个集合甚至一个阵列。使用一组磁盘结合驱动器组成 RAID 阵列或 RAID 集。一个 RAID 控制器至少使用两个磁盘并且使用一个逻辑卷或者多个驱动器在一个组中。在一个磁盘组的应用中只能使用一个 RAID 级别。使用 RAID 可以提高服务器的性能。不同 RAID 的级别,性能会有所不同。它通过容错和高可用性来保存我们的数据。 - -这个系列被命名为RAID的构建共包含9个部分包括以下主题。 - -- 第1部分:RAID的级别和概念的介绍 -- 第2部分:在Linux中如何设置 RAID0(条带化) -- 第3部分:在Linux中如何设置 RAID1(镜像化) -- 第4部分:在Linux中如何设置 RAID5(条带化与分布式奇偶校验) -- 第5部分:在Linux中如何设置 RAID6(条带双分布式奇偶校验) -- 第6部分:在Linux中设置 RAID 10 或1 + 0(嵌套) -- 第7部分:增加现有的 RAID 阵列并删除损坏的磁盘 -- 第8部分:在 RAID 中恢复(重建)损坏的驱动器 -- 第9部分:在 Linux 中管理 RAID - -这是9系列教程的第1部分,在这里我们将介绍 RAID 的概念和 RAID 级别,这是在 Linux 中构建 RAID 需要理解的。 - - -### 软件RAID和硬件RAID ### - -软件 RAID 的性能很低,因为其从主机资源消耗。 RAID 软件需要加载可读取数据从软件 RAID 卷中。在加载 RAID 软件前,操作系统需要得到加载 RAID 软件的引导。在软件 RAID 中无需物理硬件。零成本投资。 - -硬件 RAID 具有很高的性能。他们有专用的 RAID 控制器,采用 PCI Express卡物理内置的。它不会使用主机资源。他们有 NVRAM 缓存读取和写入。当重建时即使出现电源故障,它会使用电池电源备份存储缓存。对于大规模使用需要非常昂贵的投资。 - -硬件 RAID 卡如下所示: - -![Hardware RAID](http://www.tecmint.com/wp-content/uploads/2014/10/Hardware-RAID.jpg) - -硬件RAID - -#### 精选的 RAID 概念 #### - -- 在 RAID 重建中校验方法中丢失的内容来自从校验中保存的信息。 RAID 5,RAID 6 基于校验。 -- 条带化是随机共享数据到多个磁盘。它不会在单个磁盘中保存完整的数据。如果我们使用3个磁盘,则数据将会存在于每个磁盘上。 -- 镜像被用于 RAID 1 和 RAID 10。镜像会自动备份数据。在 RAID 1,它将保存相同的内容到其他盘上。 -- 在我们的服务器上,热备份只是一个备用驱动器,它可以自动更换发生故障的驱动器。在我们的阵列中,如果任何一个驱动器损坏,热备份驱动器会自动重建。 -- 块是 RAID 控制器每次读写数据时的最小单位,最小4KB。通过定义块大小,我们可以增加 I/O 性能。 - -RAID有不同的级别。在这里,我们仅看到在真实环境下的使用最多的 RAID 级别。 - -- RAID0 = 条带化 -- RAID1 = 镜像 -- RAID5 = 单个磁盘分布式奇偶校验 -- RAID6 = 双盘分布式奇偶校验 -- RAID10 = 镜像 + 条带。(嵌套RAID) - -RAID 在大多数 Linux 发行版上使用 mdadm 的包管理。让我们先对每个 RAID 级别认识一下。 - -#### RAID 0(或)条带化 #### - -条带化有很好的性能。在 RAID 0(条带化)中数据将使用共享的方式被写入到磁盘。一半的内容将是在一个磁盘上,另一半内容将被写入到其它磁盘。 - -假设我们有2个磁盘驱动器,例如,如果我们将数据“TECMINT”写到逻辑卷中,“T”将被保存在第一盘中,“E”将保存在第二盘,'C'将被保存在第一盘,“M”将保存在第二盘,它会一直继续此循环过程。 - -在这种情况下,如果驱动器中的任何一个发生故障,我们将丢失所有的数据,因为一个盘中只有一半的数据,不能用于重建。不过,当比较写入速度和性能时,RAID0 是非常好的。创建 RAID 0(条带化)至少需要2个磁盘。如果你的数据是非常宝贵的,那么不要使用此 RAID 级别。 - -- 高性能。 -- 在 RAID0 上零容量损失。 -- 零容错。 -- 写和读有很高的性能。 - -#### RAID1(或)镜像化 #### - -镜像也有不错的性能。镜像可以备份我们的数据。假设我们有两组2TB的硬盘驱动器,我们总共有4TB,但在镜像中,驱动器在 RAID 控制器的后面形成一个逻辑驱动器,我们只能看到逻辑驱动器有2TB。 - -当我们保存数据时,它将同时写入2TB驱动器中。创建 RAID 1 (镜像化)最少需要两个驱动器。如果发生磁盘故障,我们可以恢复 RAID 通过更换一个新的磁盘。如果在 RAID 1 中任何一个磁盘发生故障,我们可以从另一个磁盘中获取相同的数据,因为其他的磁盘中也有相同的数据。所以是零数据丢失。 - -- 良好的性能。 -- 空间的一半将在总容量丢失。 -- 完全容错。 -- 重建会更快。 -- 写性能将是缓慢的。 -- 读将会很好。 -- 被操作系统和数据库使用的规模很小。 - -#### RAID 5(或)分布式奇偶校验 #### - -RAID 5 多用于企业的水平。 RAID 5 的工作通过分布式奇偶校验的方法。奇偶校验信息将被用于重建数据。它需要留下的正常驱动器上的信息去重建。驱动器故障时,这会保护我们的数据。 - -假设我们有4个驱动器,如果一个驱动器发生故障而后我们更换发生故障的驱动器后,我们可以从奇偶校验中重建数据到更换的驱动器上。奇偶校验信息存储在所有的4个驱动器上,如果我们有4个 1TB 的驱动器。奇偶校验信息将被存储在每个驱动器的256G中而其它768GB是用户自己使用的。单个驱动器故障后,RAID 5 依旧正常工作,如果驱动器损坏个数超过1个会导致数据的丢失。 - -- 性能卓越 -- 读速度将非常好。 -- 如果我们不使用硬件 RAID 控制器,写速度是缓慢的。 -- 从所有驱动器的奇偶校验信息中重建。 -- 完全容错。 -- 1个磁盘空间将用于奇偶校验。 -- 可以被用在文件服务器,Web服务器,非常重要的备份中。 - -#### RAID 6 两个分布式奇偶校验磁盘 #### - -RAID 6 和 RAID 5 相似但它有两个分布式奇偶校验。大多用在大量的阵列中。我们最少需要4个驱动器,即使有2个驱动器发生故障,我们依然可以重建数据,同时更换新的驱动器。 - -它比 RAID 5 非常慢,因为它将数据同时写到4个驱动器上。当我们使用硬件 RAID 控制器时速度将被平均。如果我们有6个的1TB驱动器,4个驱动器将用于数据保存,2个驱动器将用于校验。 - -- 性能不佳。 -- 读的性能很好。 -- 如果我们不使用硬件 RAID 控制器写的性能会很差。 -- 从2奇偶校验驱动器上重建。 -- 完全容错。 -- 2个磁盘空间将用于奇偶校验。 -- 可用于大型阵列。 -- 在备份和视频流中大规模使用。 - -#### RAID 10(或)镜像+条带 #### - -RAID 10 可以被称为1 + 0或0 +1。它将做镜像+条带两个工作。在 RAID 10 中首先做镜像然后做条带。在 RAID 01 上首先做条带,然后做镜像。RAID 10 比 01 好。 - -假设,我们有4个驱动器。当我写了一些数据到逻辑卷上,它会使用镜像和条带将数据保存到4个驱动器上。 - -如果我在 RAID 10 上写入数据“TECMINT”,数据将使用如下形式保存。首先将“T”同时写入两个磁盘,“E”也将同时写入两个磁盘,这一步将所有数据都写入。这使数据得到备份。 - -同时它将使用 RAID 0 方式写入数据,遵循将“T”写入第一个盘,“E”写入第二个盘。再次将“C”写入第一个盘,“M”到第二个盘。 - -- 良好的读写性能。 -- 空间的一半将在总容量丢失。 -- 容错。 -- 从备份数据中快速重建。 -- 它的高性能和高可用性常被用于数据库的存储中。 - -### 结论 ### - -在这篇文章中,我们已经看到了什么是 RAID 和在实际环境大多采用 RAID 的哪个级别。希望你已经学会了上面所写的。对于 RAID 的构建必须了解有关 RAID 的基本知识。以上内容对于你了解 RAID 基本满足。 - -在接下来的文章中,我将介绍如何设置和使用各种级别创建 RAID,增加 RAID 组(阵列)和驱动器故障排除等。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/understanding-raid-setup-in-linux/ - -作者:[Babin Lonston][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/babinlonston/ From be241caf54d4564570a4897b5f68aa2e5e2a9842 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 10:32:27 +0800 Subject: [PATCH 1605/2517] =?UTF-8?q?Delete=20Creating=20RAID=205=20(Strip?= =?UTF-8?q?ing=20with=20Distributed=20Parity)=20in=20Linux=20=E2=80=93=20P?= =?UTF-8?q?art=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...with Distributed Parity) in Linux – Part 4 | 285 ------------------ 1 file changed, 285 deletions(-) delete mode 100644 translated/tech/Creating RAID 5 (Striping with Distributed Parity) in Linux – Part 4 diff --git a/translated/tech/Creating RAID 5 (Striping with Distributed Parity) in Linux – Part 4 b/translated/tech/Creating RAID 5 (Striping with Distributed Parity) in Linux – Part 4 deleted file mode 100644 index 7de5199a08..0000000000 --- a/translated/tech/Creating RAID 5 (Striping with Distributed Parity) in Linux – Part 4 +++ /dev/null @@ -1,285 +0,0 @@ - -在 Linux 中创建 RAID 5(条带化与分布式奇偶校验) - 第4部分 -================================================================================ -在 RAID 5 中,条带化数据跨多个驱磁盘使用分布式奇偶校验。分布式奇偶校验的条带化意味着它将奇偶校验信息和条带中的数据分布在多个磁盘上,它将有很好的数据冗余。 - -![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/setup-raid-5-in-linux.jpg) - -在 Linux 中配置 RAID 5 - -对于此 RAID 级别它至少应该有三个或更多个磁盘。RAID 5 通常被用于大规模生产环境中花费更多的成本来提供更好的数据冗余性能。 - -#### 什么是奇偶校验? #### - -奇偶校验是在数据存储中检测错误最简单的一个方法。奇偶校验信息存储在每个磁盘中,比如说,我们有4个磁盘,其中一个磁盘空间被分割去存储所有磁盘的奇偶校验信息。如果任何一个磁盘出现故障,我们可以通过更换故障磁盘后,从奇偶校验信息重建得到原来的数据。 - -#### RAID 5 的优点和缺点 #### - -- 提供更好的性能 -- 支持冗余和容错。 -- 支持热备份。 -- 将失去一个磁盘的容量存储奇偶校验信息。 -- 单个磁盘发生故障后不会丢失数据。我们可以更换故障硬盘后从奇偶校验信息中重建数据。 -- 事务处理读操作会更快。 -- 由于奇偶校验占用资源,写操作将是缓慢的。 -- 重建需要很长的时间。 - -#### 要求 #### -创建 RAID 5 最少需要3个磁盘,你也可以添加更多的磁盘,前提是你要有多端口的专用硬件 RAID 控制器。在这里,我们使用“mdadm”包来创建软件 RAID。 - -mdadm 是一个允许我们在 Linux 下配置和管理 RAID 设备的包。默认情况下 RAID 没有可用的配置文件,我们在创建和配置 RAID 后必须将配置文件保存在一个单独的文件中,例如:mdadm.conf。 - -在进一步学习之前,我建议你通过下面的文章去了解 Linux 中 RAID 的基础知识。 - -- [Basic Concepts of RAID in Linux – Part 1][1] -- [Creating RAID 0 (Stripe) in Linux – Part 2][2] -- [Setting up RAID 1 (Mirroring) in Linux – Part 3][3] - -#### 我的服务器设置 #### - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.227 - Hostname : rd5.tecmintlocal.com - Disk 1 [20GB] : /dev/sdb - Disk 2 [20GB] : /dev/sdc - Disk 3 [20GB] : /dev/sdd - -这篇文章是 RAID 系列9教程的第4部分,在这里我们要建立一个软件 RAID 5(分布式奇偶校验)使用三个20GB(名为/dev/sdb, /dev/sdc 和 /dev/sdd)的磁盘在 Linux 系统或服务器中上。 - -### 第1步:安装 mdadm 并检验磁盘 ### - -1.正如我们前面所说,我们使用 CentOS 6.5 Final 版本来创建 RAID 设置,但同样的做法也适用于其他 Linux 发行版。 - - # lsb_release -a - # ifconfig | grep inet - -![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/CentOS-6.5-Summary.png) - -CentOS 6.5 摘要 - -2. 如果你按照我们的 RAID 系列去配置的,我们假设你已经安装了“mdadm”包,如果没有,根据你的 Linux 发行版使用下面的命令安装。 - - # yum install mdadm [on RedHat systems] - # apt-get install mdadm [on Debain systems] - -3. “mdadm”包安装后,先使用‘fdisk‘命令列出我们在系统上增加的三个20GB的硬盘。 - - # fdisk -l | grep sd - -![Install mdadm Tool in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/Install-mdadm-Tool.png) - -安装 mdadm 工具 - -4. 现在该检查这三个磁盘是否存在 RAID 块,使用下面的命令来检查。 - - # mdadm -E /dev/sd[b-d] - # mdadm --examine /dev/sdb /dev/sdc /dev/sdd - -![Examine Drives For Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Examine-Drives-For-Raid.png) - -检查 Raid 磁盘 - -**注意**: 上面的图片说明,没有检测到任何超级块。所以,这三个磁盘中没有定义 RAID。让我们现在开始创建一个吧! - -### 第2步:为磁盘创建 RAID 分区 ### - -5. 首先,在创建 RAID 前我们要为磁盘分区(/dev/sdb, /dev/sdc 和 /dev/sdd),在进行下一步之前,先使用‘fdisk’命令进行分区。 - - # fdisk /dev/sdb - # fdisk /dev/sdc - # fdisk /dev/sdd - -#### 创建 /dev/sdb 分区 #### - -请按照下面的说明在 /dev/sdb 硬盘上创建分区。 - -- 按 ‘n’ 创建新的分区。 -- 然后按 ‘P’ 选择主分区。选择主分区是因为还没有定义过分区。 -- 接下来选择分区号为1。默认就是1. -- 这里是选择柱面大小,我们没必要选择指定的大小,因为我们需要为 RAID 使用整个分区,所以只需按两次 Enter 键默认将整个容量分配给它。 -- 然后,按 ‘P’ 来打印创建好的分区。 -- 改变分区类型,按 ‘L’可以列出所有可用的类型。 -- 按 ‘t’ 修改分区类型。 -- 这里使用‘fd’设置为 RAID 的类型。 -- 然后再次使用‘p’查看我们所做的更改。 -- 使用‘w’保存更改。 - -![Create sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdb-Partition1.png) - -创建 sdb 分区 - -**注意**: 我们仍要按照上面的步骤来创建 sdc 和 sdd 的分区。 - -#### 创建 /dev/sdc 分区 #### - -现在,通过下面的截图给出创建 sdc 和 sdd 磁盘分区的方法,或者你可以按照上面的步骤。 - - # fdisk /dev/sdc - -![Create sdc Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdc-Partition1.png) - -创建 sdc 分区 - -#### 创建 /dev/sdd 分区 #### - - # fdisk /dev/sdd - -![Create sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdd-Partition1.png) - -创建 sdd 分区 - -6. 创建分区后,检查三个磁盘 sdb, sdc, sdd 的变化。 - - # mdadm --examine /dev/sdb /dev/sdc /dev/sdd - - or - - # mdadm -E /dev/sd[b-c] - -![Check Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Changes-on-Partitions.png) - -检查磁盘变化 - -**注意**: 在上面的图片中,磁盘的类型是 fd。 - -7.现在在新创建的分区检查 RAID 块。如果没有检测到超级块,我们就能够继续下一步,创建一个新的 RAID 5 的设置在这些磁盘中。 - -![Check Raid on Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-Partitions.png) - -在分区中检查 Raid - -### 第3步:创建 md 设备 md0 ### - -8. 现在创建一个 RAID 设备“md0”(即 /dev/md0)使用所有新创建的分区(sdb1, sdc1 and sdd1) ,使用以下命令。 - - # mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 - - or - - # mdadm -C /dev/md0 -l=5 -n=3 /dev/sd[b-d]1 - -9. 创建 RAID 设备后,检查并确认 RAID,包括设备和从 mdstat 中输出的 RAID 级别。 - - # cat /proc/mdstat - -![Verify Raid Device](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Device.png) - -验证 Raid 设备 - -如果你想监视当前的创建过程,你可以使用‘watch‘命令,使用 watch ‘cat /proc/mdstat‘,它会在屏幕上显示且每隔1秒刷新一次。 - - # watch -n1 cat /proc/mdstat - -![Monitor Raid Process](http://www.tecmint.com/wp-content/uploads/2014/11/Monitor-Raid-Process.png) - -监控 Raid 5 过程 - -![Raid 5 Process Summary](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Process-Summary.png) - -Raid 5 过程概要 - -10. 创建 RAID 后,使用以下命令验证 RAID 设备 - - # mdadm -E /dev/sd[b-d]1 - -![Verify Raid Level](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Level.png) - -验证 Raid 级别 - -**注意**: 因为它显示三个磁盘的信息,上述命令的输出会有点长。 - -11. 接下来,验证 RAID 阵列的假设,这包含正在运行 RAID 的设备,并开始重新同步。 - - # mdadm --detail /dev/md0 - -![Verify Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Array.png) - -验证 Raid 阵列 - -### 第4步:为 md0 创建文件系统### - -12. 在挂载前为“md0”设备创建 ext4 文件系统。 - - # mkfs.ext4 /dev/md0 - -![Create md0 Filesystem](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md0-Filesystem.png) - -创建 md0 文件系统 - -13.现在,在‘/mnt‘下创建目录 raid5,然后挂载文件系统到 /mnt/raid5/ 下并检查下挂载点的文件,你会看到 lost+found 目录。 - - # mkdir /mnt/raid5 - # mount /dev/md0 /mnt/raid5/ - # ls -l /mnt/raid5/ - -14. 在挂载点 /mnt/raid5 下创建几个文件,并在其中一个文件中添加一些内容然后去验证。 - - # touch /mnt/raid5/raid5_tecmint_{1..5} - # ls -l /mnt/raid5/ - # echo "tecmint raid setups" > /mnt/raid5/raid5_tecmint_1 - # cat /mnt/raid5/raid5_tecmint_1 - # cat /proc/mdstat - -![Mount Raid 5 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Mount-Raid-Device.png) - -挂载 Raid 设备 - -15. 我们需要在 fstab 中添加条目,否则系统重启后将不会显示我们的挂载点。然后编辑 fstab 文件添加条目,在文件尾追加以下行,如下图所示。挂载点会根据你环境的不同而不同。 - - # vim /etc/fstab - - /dev/md0 /mnt/raid5 ext4 defaults 0 0 - -![Raid 5 Automount](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Device-Automount.png) - -自动挂载 Raid 5 - -16. 接下来,运行‘mount -av‘命令检查 fstab 条目中是否有错误。 - - # mount -av - -![Check Fstab Errors](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Fstab-Errors.png) - -检查 Fstab 错误 - -### 第5步:保存 Raid 5 的配置 ### - -17. 在前面章节已经说过,默认情况下 RAID 没有配置文件。我们必须手动保存。如果此步不跟 RAID 设备将不会存在 md0,它将会跟一些其他数子。 - -所以,我们必须要在系统重新启动之前保存配置。如果配置保存它在系统重新启动时会被加载到内核中然后 RAID 也将被加载。 - - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - -![Save Raid 5 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Save-Raid-5-Configuration.png) - -保存 Raid 5 配置 - -注意:保存配置将保持 RAID 级别的稳定性在 md0 设备中。 - -### 第6步:添加备用磁盘 ### - -18.备用磁盘有什么用?它是非常有用的,如果我们有一个备用磁盘,当我们阵列中的任何一个磁盘发生故障后,这个备用磁盘会主动添加并重建进程,并从其他磁盘上同步数据,所以我们可以在这里看到冗余。 - -更多关于添加备用磁盘和检查 RAID 5 容错的指令,请阅读下面文章中的第6步和第7步。 - -- [Add Spare Drive to Raid 5 Setup][4] - -### 结论 ### - -在这篇文章中,我们已经看到了如何使用三个磁盘配置一个 RAID 5 。在接下来的文章中,我们将看到如何故障排除并且当 RAID 5 中的一个磁盘损坏后如何恢复。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-raid-5-in-linux/ - -作者:[Babin Lonston][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/create-raid0-in-linux/ -[3]:http://www.tecmint.com/create-raid1-in-linux/ -[4]:http://www.tecmint.com/create-raid-6-in-linux/ From b1fd032e97a42a7256d951cbc670bdce03cc08cb Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 10:32:40 +0800 Subject: [PATCH 1606/2517] Delete Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md --- ... (Mirroring) using 'Two Disks' in Linux.md | 217 ------------------ 1 file changed, 217 deletions(-) delete mode 100644 translated/tech/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md diff --git a/translated/tech/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md b/translated/tech/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md deleted file mode 100644 index 948e530ed8..0000000000 --- a/translated/tech/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md +++ /dev/null @@ -1,217 +0,0 @@ -在 Linux 中使用"两个磁盘"创建 RAID 1(镜像) - 第3部分 -================================================================================ -RAID 镜像意味着相同数据的完整克隆(或镜像)写入到两个磁盘中。创建 RAID1 至少需要两个磁盘,它的读取性能或者可靠性比数据存储容量更好。 - - -![Create Raid1 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID1-in-Linux.jpeg) - -在 Linux 中设置 RAID1 - -创建镜像是为了防止因硬盘故障导致数据丢失。镜像中的每个磁盘包含数据的完整副本。当一个磁盘发生故障时,相同的数据可以从其它正常磁盘中读取。而后,可以从正在运行的计算机中直接更换发生故障的磁盘,无需任何中断。 - -### RAID 1 的特点 ### - --镜像具有良好的性能。 - --磁盘利用率为50%。也就是说,如果我们有两个磁盘每个500GB,总共是1TB,但在镜像中它只会显示500GB。 - --在镜像如果一个磁盘发生故障不会有数据丢失,因为两个磁盘中的内容相同。 - --读取数据会比写入性能更好。 - -#### 要求 #### - - -创建 RAID 1 至少要有两个磁盘,你也可以添加更多的磁盘,磁盘数需为2,4,6,8的两倍。为了能够添加更多的磁盘,你的系统必须有 RAID 物理适配器(硬件卡)。 - -这里,我们使用软件 RAID 不是硬件 RAID,如果你的系统有一个内置的物理硬件 RAID 卡,你可以从它的 UI 组件或使用 Ctrl + I 键来访问它。 - -需要阅读: [Basic Concepts of RAID in Linux][1] - -#### 在我的服务器安装 #### - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.226 - Hostname : rd1.tecmintlocal.com - Disk 1 [20GB] : /dev/sdb - Disk 2 [20GB] : /dev/sdc - -本文将指导你使用 mdadm (创建和管理 RAID 的)一步一步的建立一个软件 RAID 1 或镜像在 Linux 平台上。但同样的做法也适用于其它 Linux 发行版如 RedHat,CentOS,Fedora 等等。 - -### 第1步:安装所需要的并且检查磁盘 ### - -1.正如我前面所说,在 Linux 中我们需要使用 mdadm 软件来创建和管理 RAID。所以,让我们用 yum 或 apt-get 的软件包管理工具在 Linux 上安装 mdadm 软件包。 - - # yum install mdadm [on RedHat systems] - # apt-get install mdadm [on Debain systems] - -2. 一旦安装好‘mdadm‘包,我们需要使用下面的命令来检查磁盘是否已经配置好。 - - # mdadm -E /dev/sd[b-c] - -![Check RAID on Disks](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-on-Disks.png) - -检查 RAID 的磁盘 - - -正如你从上面图片看到的,没有检测到任何超级块,这意味着还没有创建RAID。 - -### 第2步:为 RAID 创建分区 ### - -3. 正如我提到的,我们最少使用两个分区 /dev/sdb 和 /dev/sdc 来创建 RAID1。我们首先使用‘fdisk‘命令来创建这两个分区并更改其类型为 raid。 - - # fdisk /dev/sdb - -按照下面的说明 - -- 按 ‘n’ 创建新的分区。 -- 然后按 ‘P’ 选择主分区。 -- 接下来选择分区号为1。 -- 按两次回车键默认将整个容量分配给它。 -- 然后,按 ‘P’ 来打印创建好的分区。 -- 按 ‘L’,列出所有可用的类型。 -- 按 ‘t’ 修改分区类型。 -- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 -- 然后再次使用‘p’查看我们所做的更改。 -- 使用‘w’保存更改。 - -![Create Disk Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Disk-Partitions.png) - -创建磁盘分区 - -在创建“/dev/sdb”分区后,接下来按照同样的方法创建分区 /dev/sdc 。 - - # fdisk /dev/sdc - -![Create Second Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Second-Partitions.png) - -创建第二个分区 - -4. 一旦这两个分区创建成功后,使用相同的命令来检查 sdb & sdc 分区并确认 RAID 分区的类型如上图所示。 - - # mdadm -E /dev/sd[b-c] - -![Verify Partitions Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Partitions-Changes.png) - -验证分区变化 - -![Check RAID Type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Type.png) - -检查 RAID 类型 - -**注意**: 正如你在上图所看到的,在 sdb1 和 sdc1 中没有任何对 RAID 的定义,这就是我们没有检测到超级块的原因。 - -### 步骤3:创建 RAID1 设备 ### - -5.接下来使用以下命令来创建一个名为 /dev/md0 的“RAID1”设备并验证它 - - # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[b-c]1 - # cat /proc/mdstat - -![Create RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device.png) - -创建RAID设备 - -6. 接下来使用如下命令来检查 RAID 设备类型和 RAID 阵列 - - # mdadm -E /dev/sd[b-c]1 - # mdadm --detail /dev/md0 - -![Check RAID Device type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-type.png) - -检查 RAID 设备类型 - -![Check RAID Device Array](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-Array.png) - -检查 RAID 设备阵列 - -从上图中,人们很容易理解,RAID1 已经使用的 /dev/sdb1 和 /dev/sdc1 分区被创建,你也可以看到状态为 resyncing。 - -### 第4步:在 RAID 设备上创建文件系统 ### - -7. 使用 ext4 为 md0 创建文件系统并挂载到 /mnt/raid1 . - - # mkfs.ext4 /dev/md0 - -![Create RAID Device Filesystem](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device-Filesystem.png) - -创建 RAID 设备文件系统 - -8. 接下来,挂载新创建的文件系统到“/mnt/raid1”,并创建一些文件,验证在挂载点的数据 - - # mkdir /mnt/raid1 - # mount /dev/md0 /mnt/raid1/ - # touch /mnt/raid1/tecmint.txt - # echo "tecmint raid setups" > /mnt/raid1/tecmint.txt - -![Mount Raid Device](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-RAID-Device.png) - -挂载 RAID 设备 - -9.为了在系统重新启动自动挂载 RAID1,需要在 fstab 文件中添加条目。打开“/etc/fstab”文件并添加以下行。 - - /dev/md0 /mnt/raid1 ext4 defaults 0 0 - -![Raid Automount Device](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Automount-Filesystem.png) - -自动挂载 Raid 设备 - -10. 运行“mount -a”,检查 fstab 中的条目是否有错误 - # mount -av - -![Check Errors in fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-fstab.png) - -检查 fstab 中的错误 - -11. 接下来,使用下面的命令保存 raid 的配置到文件“mdadm.conf”中。 - - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - -![Save Raid Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Raid-Configuration.png) - -保存 Raid 的配置 - -上述配置文件在系统重启时会读取并加载 RAID 设备。 - -### 第5步:在磁盘故障后检查数据 ### - -12.我们的主要目的是,即使在任何磁盘故障或死机时必须保证数据是可用的。让我们来看看,当任何一个磁盘不可用时会发生什么。 - - # mdadm --detail /dev/md0 - -![Raid Device Verify](http://www.tecmint.com/wp-content/uploads/2014/10/Raid-Device-Verify.png) - -验证 Raid 设备 - -在上面的图片中,我们可以看到在 RAID 中有2个设备是可用的并且 Active Devices 是2.现在让我们看看,当一个磁盘拔出(移除 sdc 磁盘)或损坏后会发生什么。 - - # ls -l /dev | grep sd - # mdadm --detail /dev/md0 - -![Test RAID Devices](http://www.tecmint.com/wp-content/uploads/2014/10/Test-RAID-Devices.png) - -测试 RAID 设备 - -现在,在上面的图片中你可以看到,一个磁盘不见了。我从虚拟机上删除了一个磁盘。此时让我们来检查我们宝贵的数据。 - - # cd /mnt/raid1/ - # cat tecmint.txt - -![Verify RAID Data](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Data.png) - -验证 RAID 数据 - -你有没有看到我们的数据仍然可用。由此,我们可以知道 RAID 1(镜像)的优势。在接下来的文章中,我们将看到如何设置一个 RAID 5 条带化分布式奇偶校验。希望这可以帮助你了解 RAID 1(镜像)是如何工作的。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-raid1-in-linux/ - -作者:[Babin Lonston][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ From 10ee418d6422f54036002872fd4a328bdf691557 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 10:32:59 +0800 Subject: [PATCH 1607/2517] =?UTF-8?q?Delete=20Creating=20Software=20RAID0?= =?UTF-8?q?=20(Stripe)=20on=20=E2=80=98Two=20Devices=E2=80=99=20Using=20?= =?UTF-8?q?=E2=80=98mdadm=E2=80=99=20Tool=20in=20Linux=20=E2=80=93=20Part?= =?UTF-8?q?=202.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ces’ Using ‘mdadm’ Tool in Linux – Part 2.md | 218 ------------------ 1 file changed, 218 deletions(-) delete mode 100644 translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2.md diff --git a/translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2.md b/translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2.md deleted file mode 100644 index 9feba99609..0000000000 --- a/translated/tech/Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux – Part 2.md +++ /dev/null @@ -1,218 +0,0 @@ -在 Linux 上使用 ‘mdadm’ 工具创建软件 RAID0 (条带化)在 ‘两个设备’ 上 - 第2部分 -================================================================================ -RAID 是廉价磁盘的冗余阵列,其高可用性和可靠性适用于大规模环境中,为了使数据被保护而不是被正常使用。RAID 只是磁盘的一个集合被称为逻辑卷。结合驱动器,使其成为一个阵列或称为集合(组)。 - -创建 RAID 最少应使用2个磁盘被连接组成 RAID 控制器,逻辑卷或多个驱动器可以根据定义的 RAID 级别添加在一个阵列中。不使用物理硬件创建的 RAID 被称为软件 RAID。软件 RAID 一般都是不太有钱的人才使用的。 - -![Setup RAID0 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Raid0-in-Linux.jpg) - -在 Linux 中创建 RAID0 - -使用 RAID 的主要目的是为了在单点故障时保存数据,如果我们使用单个磁盘来存储数据,如果它损坏了,那么就没有机会取回我们的数据了,为了防止数据丢失我们需要一个容错的方法。所以,我们可以使用多个磁盘组成 RAID 阵列。 - -#### 在 RAID 0 中条带是什么 #### - -条带是通过将数据在同一时间分割到多个磁盘上。假设我们有两个磁盘,如果我们将数据保存到逻辑卷上,它会将数据保存在两个磁盘上。使用 RAID 0 是为了获得更好的性能,但是如果驱动器中一个出现故障,我们将不能得到完整的数据。因此,使用 RAID 0 不是一种好的做法。唯一的解决办法就是安装有 RAID0 逻辑卷的操作系统来提高文件的安全性。 - -- RAID 0 性能较高。 -- 在 RAID 0 上,空间零浪费。 -- 零容错(如果硬盘中的任何一个发生故障,无法取回数据)。 -- 写和读性能得以提高。 - -#### 要求 #### - -创建 RAID 0 允许的最小磁盘数目是2个,但你可以添加更多的磁盘,但数目应该是2,4,6,8等的两倍。如果你有一个物理 RAID 卡并且有足够的端口,你可以添加更多磁盘。 - -在这里,我们没有使用硬件 RAID,此设置只依赖于软件 RAID。如果我们有一个物理硬件 RAID 卡,我们可以从它的 UI 组件访问它。有些主板默认内建 RAID 功能,还可以使用 Ctrl + I 键访问 UI。 - -如果你是刚开始设置 RAID,请阅读我们前面的文章,我们已经介绍了一些关于 RAID 基本的概念。 - -- [Introduction to RAID and RAID Concepts][1] - -**我的服务器设置** - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.225 - Two Disks : 20 GB each - -这篇文章是9个 RAID 系列教程的第2部分,在这部分,我们将看看如何能够在 Linux 上创建和使用 RAID0(条带化),以名为 sdb 和 sdc 两个20GB的硬盘为例。 - -### 第1步:更新系统和安装管理 RAID 的 mdadm 软件 ### - -1.在 Linux 上设置 RAID0 前,我们先更新一下系统,然后安装 ‘mdadm’ 包。mdadm 是一个小程序,这将使我们能够在Linux下配置和管理 RAID 设备。 - - # yum clean all && yum update - # yum install mdadm -y - -![install mdadm in linux](http://www.tecmint.com/wp-content/uploads/2014/10/install-mdadm-in-linux.png) - -安装 mdadm 工具 - -### 第2步:检测并连接两个 20GB 的硬盘 ### - -2.在创建 RAID 0 前,请务必确认两个硬盘能被检测到,使用下面的命令确认。 - - # ls -l /dev | grep sd - -![Check Hard Drives in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Hard-Drives.png) - -检查硬盘 - -3.一旦检测到新的硬盘驱动器,同时检查是否连接的驱动器已经被现有的 RAID 使用,使用下面的 ‘mdadm’ 命令来查看。 - - # mdadm --examine /dev/sd[b-c] - -![Check RAID Devices in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Drives-using-RAID.png) - -检查 RAID 设备 - -从上面的输出我们可以看到,没有任何 RAID 使用 sdb 和 sdc 这两个驱动器。 - -### 第3步:创建 RAID 分区 ### - -4.现在用 sdb 和 sdc 创建 RAID 的分区,使用 fdisk 命令来创建。在这里,我将展示如何创建 sdb 驱动器上的分区。 - - # fdisk /dev/sdb - -请按照以下说明创建分区。 - -- 按 ‘n’ 创建新的分区。 -- 然后按 ‘P’ 选择主分区。 -- 接下来选择分区号为1。 -- 只需按两次回车键选择默认值即可。 -- 然后,按 ‘P’ 来打印创建好的分区。 - -![Create Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Partitions-in-Linux.png) - -创建分区 - -请按照以下说明将分区创建为 Linux 的 RAID 类型。 - -- 按 ‘L’,列出所有可用的类型。 -- 按 ‘t’ 去修改分区。 -- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 -- 然后再次使用‘p’查看我们所做的更改。 -- 使用‘w’保存更改。 - -![Create RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Partitions.png) - -在 Linux 上创建 RAID 分区 - -**注**: 请使用上述步骤同样在 sdc 驱动器上创建分区。 - -5.创建分区后,验证这两个驱动器能使用下面的命令来正确定义 RAID。 - - # mdadm --examine /dev/sd[b-c] - # mdadm --examine /dev/sd[b-c]1 - -![Verify RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Partitions.png) - -验证 RAID 分区 - -### 第4步:创建 RAID md 设备 ### - -6.现在使用以下命令创建 md 设备(即 /dev/md0),并选择 RAID 合适的级别。 - - # mdadm -C /dev/md0 -l raid0 -n 2 /dev/sd[b-c]1 - # mdadm --create /dev/md0 --level=stripe --raid-devices=2 /dev/sd[b-c]1 - -- -C – create -- -l – level -- -n – No of raid-devices - -7.一旦 md 设备已经建立,使用如下命令可以查看 RAID 级别,设备和阵列的使用状态。 - - # cat /proc/mdstat - -![Verify RAID Level](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Level.png) - -查看 RAID 级别 - - # mdadm -E /dev/sd[b-c]1 - -![Verify RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Device.png) - -查看 RAID 设备 - - # mdadm --detail /dev/md0 - -![Verify RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Array.png) - -查看 RAID 阵列 - -### 第5步:挂载 RAID 设备到文件系统 ### - -8.将 RAID 设备 /dev/md0 创建为 ext4 文件系统并挂载到 /mnt/raid0 下。 - - # mkfs.ext4 /dev/md0 - -![Create ext4 Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystem.png) - -创建 ext4 文件系统 - -9. ext4 文件系统为 RAID 设备创建好后,现在创建一个挂载点(即 /mnt/raid0),并将设备 /dev/md0 挂载在它下。 - - # mkdir /mnt/raid0 - # mount /dev/md0 /mnt/raid0/ - -10.下一步,使用 df 命令验证设备 /dev/md0 是否被挂载在 /mnt/raid0 下。 - - # df -h - -11.接下来,创建一个名为 ‘tecmint.txt’ 的文件挂载到 /mnt/raid0 下,为创建的文件添加一些内容,并查看文件和目录的内容。 - - # touch /mnt/raid0/tecmint.txt - # echo "Hi everyone how you doing ?" > /mnt/raid0/tecmint.txt - # cat /mnt/raid0/tecmint.txt - # ls -l /mnt/raid0/ - -![Verify Mount Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Mount-Device.png) - -验证挂载的设备 - -12.一旦你验证挂载点后,同时将它添加到 /etc/fstab 文件中。 - - # vim /etc/fstab - -添加以下条目,根据你的安装位置和使用文件系统的不同,自行做修改。 - - /dev/md0 /mnt/raid0 ext4 deaults 0 0 - -![Add Device to Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Add-Device-to-Fstab.png) - -添加设备到 fstab 文件中 - -13.使用 mount ‘-a‘ 来检查 fstab 的条目是否有误。 - - # mount -av - -![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-Fstab.png) - -检查 fstab 文件是否有误 - -### 第6步:保存 RAID 配置 ### - -14.最后,保存 RAID 配置到一个文件中,以供将来使用。同样,我们使用 ‘mdadm’ 命令带有 ‘-s‘ (scan) 和 ‘-v‘ (verbose) 选项,如图所示。 - - # mdadm -E -s -v >> /etc/mdadm.conf - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - # cat /etc/mdadm.conf - -![Save RAID Configurations](http://www.tecmint.com/wp-content/uploads/2014/10/Save-RAID-Configurations.png) - -保存 RAID 配置 - -就这样,我们在这里看到,如何通过使用两个硬盘配置具有条带化的 RAID0 级别。在接下来的文章中,我们将看到如何设置 RAID5。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-raid0-in-linux/ - -作者:[Babin Lonston][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ From f3d587ede36d68eb11002fb77c4eb66db7af746d Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 10:33:36 +0800 Subject: [PATCH 1608/2517] Create Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md --- ... (Mirroring) using 'Two Disks' in Linux.md | 217 ++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 translated/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md diff --git a/translated/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md b/translated/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md new file mode 100644 index 0000000000..948e530ed8 --- /dev/null +++ b/translated/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md @@ -0,0 +1,217 @@ +在 Linux 中使用"两个磁盘"创建 RAID 1(镜像) - 第3部分 +================================================================================ +RAID 镜像意味着相同数据的完整克隆(或镜像)写入到两个磁盘中。创建 RAID1 至少需要两个磁盘,它的读取性能或者可靠性比数据存储容量更好。 + + +![Create Raid1 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID1-in-Linux.jpeg) + +在 Linux 中设置 RAID1 + +创建镜像是为了防止因硬盘故障导致数据丢失。镜像中的每个磁盘包含数据的完整副本。当一个磁盘发生故障时,相同的数据可以从其它正常磁盘中读取。而后,可以从正在运行的计算机中直接更换发生故障的磁盘,无需任何中断。 + +### RAID 1 的特点 ### + +-镜像具有良好的性能。 + +-磁盘利用率为50%。也就是说,如果我们有两个磁盘每个500GB,总共是1TB,但在镜像中它只会显示500GB。 + +-在镜像如果一个磁盘发生故障不会有数据丢失,因为两个磁盘中的内容相同。 + +-读取数据会比写入性能更好。 + +#### 要求 #### + + +创建 RAID 1 至少要有两个磁盘,你也可以添加更多的磁盘,磁盘数需为2,4,6,8的两倍。为了能够添加更多的磁盘,你的系统必须有 RAID 物理适配器(硬件卡)。 + +这里,我们使用软件 RAID 不是硬件 RAID,如果你的系统有一个内置的物理硬件 RAID 卡,你可以从它的 UI 组件或使用 Ctrl + I 键来访问它。 + +需要阅读: [Basic Concepts of RAID in Linux][1] + +#### 在我的服务器安装 #### + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.226 + Hostname : rd1.tecmintlocal.com + Disk 1 [20GB] : /dev/sdb + Disk 2 [20GB] : /dev/sdc + +本文将指导你使用 mdadm (创建和管理 RAID 的)一步一步的建立一个软件 RAID 1 或镜像在 Linux 平台上。但同样的做法也适用于其它 Linux 发行版如 RedHat,CentOS,Fedora 等等。 + +### 第1步:安装所需要的并且检查磁盘 ### + +1.正如我前面所说,在 Linux 中我们需要使用 mdadm 软件来创建和管理 RAID。所以,让我们用 yum 或 apt-get 的软件包管理工具在 Linux 上安装 mdadm 软件包。 + + # yum install mdadm [on RedHat systems] + # apt-get install mdadm [on Debain systems] + +2. 一旦安装好‘mdadm‘包,我们需要使用下面的命令来检查磁盘是否已经配置好。 + + # mdadm -E /dev/sd[b-c] + +![Check RAID on Disks](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-on-Disks.png) + +检查 RAID 的磁盘 + + +正如你从上面图片看到的,没有检测到任何超级块,这意味着还没有创建RAID。 + +### 第2步:为 RAID 创建分区 ### + +3. 正如我提到的,我们最少使用两个分区 /dev/sdb 和 /dev/sdc 来创建 RAID1。我们首先使用‘fdisk‘命令来创建这两个分区并更改其类型为 raid。 + + # fdisk /dev/sdb + +按照下面的说明 + +- 按 ‘n’ 创建新的分区。 +- 然后按 ‘P’ 选择主分区。 +- 接下来选择分区号为1。 +- 按两次回车键默认将整个容量分配给它。 +- 然后,按 ‘P’ 来打印创建好的分区。 +- 按 ‘L’,列出所有可用的类型。 +- 按 ‘t’ 修改分区类型。 +- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 +- 然后再次使用‘p’查看我们所做的更改。 +- 使用‘w’保存更改。 + +![Create Disk Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Disk-Partitions.png) + +创建磁盘分区 + +在创建“/dev/sdb”分区后,接下来按照同样的方法创建分区 /dev/sdc 。 + + # fdisk /dev/sdc + +![Create Second Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Second-Partitions.png) + +创建第二个分区 + +4. 一旦这两个分区创建成功后,使用相同的命令来检查 sdb & sdc 分区并确认 RAID 分区的类型如上图所示。 + + # mdadm -E /dev/sd[b-c] + +![Verify Partitions Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Partitions-Changes.png) + +验证分区变化 + +![Check RAID Type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Type.png) + +检查 RAID 类型 + +**注意**: 正如你在上图所看到的,在 sdb1 和 sdc1 中没有任何对 RAID 的定义,这就是我们没有检测到超级块的原因。 + +### 步骤3:创建 RAID1 设备 ### + +5.接下来使用以下命令来创建一个名为 /dev/md0 的“RAID1”设备并验证它 + + # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[b-c]1 + # cat /proc/mdstat + +![Create RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device.png) + +创建RAID设备 + +6. 接下来使用如下命令来检查 RAID 设备类型和 RAID 阵列 + + # mdadm -E /dev/sd[b-c]1 + # mdadm --detail /dev/md0 + +![Check RAID Device type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-type.png) + +检查 RAID 设备类型 + +![Check RAID Device Array](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-Array.png) + +检查 RAID 设备阵列 + +从上图中,人们很容易理解,RAID1 已经使用的 /dev/sdb1 和 /dev/sdc1 分区被创建,你也可以看到状态为 resyncing。 + +### 第4步:在 RAID 设备上创建文件系统 ### + +7. 使用 ext4 为 md0 创建文件系统并挂载到 /mnt/raid1 . + + # mkfs.ext4 /dev/md0 + +![Create RAID Device Filesystem](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device-Filesystem.png) + +创建 RAID 设备文件系统 + +8. 接下来,挂载新创建的文件系统到“/mnt/raid1”,并创建一些文件,验证在挂载点的数据 + + # mkdir /mnt/raid1 + # mount /dev/md0 /mnt/raid1/ + # touch /mnt/raid1/tecmint.txt + # echo "tecmint raid setups" > /mnt/raid1/tecmint.txt + +![Mount Raid Device](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-RAID-Device.png) + +挂载 RAID 设备 + +9.为了在系统重新启动自动挂载 RAID1,需要在 fstab 文件中添加条目。打开“/etc/fstab”文件并添加以下行。 + + /dev/md0 /mnt/raid1 ext4 defaults 0 0 + +![Raid Automount Device](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Automount-Filesystem.png) + +自动挂载 Raid 设备 + +10. 运行“mount -a”,检查 fstab 中的条目是否有错误 + # mount -av + +![Check Errors in fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-fstab.png) + +检查 fstab 中的错误 + +11. 接下来,使用下面的命令保存 raid 的配置到文件“mdadm.conf”中。 + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +![Save Raid Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Raid-Configuration.png) + +保存 Raid 的配置 + +上述配置文件在系统重启时会读取并加载 RAID 设备。 + +### 第5步:在磁盘故障后检查数据 ### + +12.我们的主要目的是,即使在任何磁盘故障或死机时必须保证数据是可用的。让我们来看看,当任何一个磁盘不可用时会发生什么。 + + # mdadm --detail /dev/md0 + +![Raid Device Verify](http://www.tecmint.com/wp-content/uploads/2014/10/Raid-Device-Verify.png) + +验证 Raid 设备 + +在上面的图片中,我们可以看到在 RAID 中有2个设备是可用的并且 Active Devices 是2.现在让我们看看,当一个磁盘拔出(移除 sdc 磁盘)或损坏后会发生什么。 + + # ls -l /dev | grep sd + # mdadm --detail /dev/md0 + +![Test RAID Devices](http://www.tecmint.com/wp-content/uploads/2014/10/Test-RAID-Devices.png) + +测试 RAID 设备 + +现在,在上面的图片中你可以看到,一个磁盘不见了。我从虚拟机上删除了一个磁盘。此时让我们来检查我们宝贵的数据。 + + # cd /mnt/raid1/ + # cat tecmint.txt + +![Verify RAID Data](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Data.png) + +验证 RAID 数据 + +你有没有看到我们的数据仍然可用。由此,我们可以知道 RAID 1(镜像)的优势。在接下来的文章中,我们将看到如何设置一个 RAID 5 条带化分布式奇偶校验。希望这可以帮助你了解 RAID 1(镜像)是如何工作的。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid1-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ From 03f40b38babfc323a30e846016f4743afa8ca4d8 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 10:48:30 +0800 Subject: [PATCH 1609/2517] =?UTF-8?q?Create=20Part=202=20-=20Creating=20So?= =?UTF-8?q?ftware=20RAID0=20(Stripe)=20on=20=E2=80=98Two=20Devices?= =?UTF-8?q?=E2=80=99=20Using=20=E2=80=98mdadm=E2=80=99=20Tool=20in=20Linux?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Two Devices’ Using ‘mdadm’ Tool in Linux.md | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 translated/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md diff --git a/translated/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md b/translated/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md new file mode 100644 index 0000000000..9feba99609 --- /dev/null +++ b/translated/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md @@ -0,0 +1,218 @@ +在 Linux 上使用 ‘mdadm’ 工具创建软件 RAID0 (条带化)在 ‘两个设备’ 上 - 第2部分 +================================================================================ +RAID 是廉价磁盘的冗余阵列,其高可用性和可靠性适用于大规模环境中,为了使数据被保护而不是被正常使用。RAID 只是磁盘的一个集合被称为逻辑卷。结合驱动器,使其成为一个阵列或称为集合(组)。 + +创建 RAID 最少应使用2个磁盘被连接组成 RAID 控制器,逻辑卷或多个驱动器可以根据定义的 RAID 级别添加在一个阵列中。不使用物理硬件创建的 RAID 被称为软件 RAID。软件 RAID 一般都是不太有钱的人才使用的。 + +![Setup RAID0 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Raid0-in-Linux.jpg) + +在 Linux 中创建 RAID0 + +使用 RAID 的主要目的是为了在单点故障时保存数据,如果我们使用单个磁盘来存储数据,如果它损坏了,那么就没有机会取回我们的数据了,为了防止数据丢失我们需要一个容错的方法。所以,我们可以使用多个磁盘组成 RAID 阵列。 + +#### 在 RAID 0 中条带是什么 #### + +条带是通过将数据在同一时间分割到多个磁盘上。假设我们有两个磁盘,如果我们将数据保存到逻辑卷上,它会将数据保存在两个磁盘上。使用 RAID 0 是为了获得更好的性能,但是如果驱动器中一个出现故障,我们将不能得到完整的数据。因此,使用 RAID 0 不是一种好的做法。唯一的解决办法就是安装有 RAID0 逻辑卷的操作系统来提高文件的安全性。 + +- RAID 0 性能较高。 +- 在 RAID 0 上,空间零浪费。 +- 零容错(如果硬盘中的任何一个发生故障,无法取回数据)。 +- 写和读性能得以提高。 + +#### 要求 #### + +创建 RAID 0 允许的最小磁盘数目是2个,但你可以添加更多的磁盘,但数目应该是2,4,6,8等的两倍。如果你有一个物理 RAID 卡并且有足够的端口,你可以添加更多磁盘。 + +在这里,我们没有使用硬件 RAID,此设置只依赖于软件 RAID。如果我们有一个物理硬件 RAID 卡,我们可以从它的 UI 组件访问它。有些主板默认内建 RAID 功能,还可以使用 Ctrl + I 键访问 UI。 + +如果你是刚开始设置 RAID,请阅读我们前面的文章,我们已经介绍了一些关于 RAID 基本的概念。 + +- [Introduction to RAID and RAID Concepts][1] + +**我的服务器设置** + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.225 + Two Disks : 20 GB each + +这篇文章是9个 RAID 系列教程的第2部分,在这部分,我们将看看如何能够在 Linux 上创建和使用 RAID0(条带化),以名为 sdb 和 sdc 两个20GB的硬盘为例。 + +### 第1步:更新系统和安装管理 RAID 的 mdadm 软件 ### + +1.在 Linux 上设置 RAID0 前,我们先更新一下系统,然后安装 ‘mdadm’ 包。mdadm 是一个小程序,这将使我们能够在Linux下配置和管理 RAID 设备。 + + # yum clean all && yum update + # yum install mdadm -y + +![install mdadm in linux](http://www.tecmint.com/wp-content/uploads/2014/10/install-mdadm-in-linux.png) + +安装 mdadm 工具 + +### 第2步:检测并连接两个 20GB 的硬盘 ### + +2.在创建 RAID 0 前,请务必确认两个硬盘能被检测到,使用下面的命令确认。 + + # ls -l /dev | grep sd + +![Check Hard Drives in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Hard-Drives.png) + +检查硬盘 + +3.一旦检测到新的硬盘驱动器,同时检查是否连接的驱动器已经被现有的 RAID 使用,使用下面的 ‘mdadm’ 命令来查看。 + + # mdadm --examine /dev/sd[b-c] + +![Check RAID Devices in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Drives-using-RAID.png) + +检查 RAID 设备 + +从上面的输出我们可以看到,没有任何 RAID 使用 sdb 和 sdc 这两个驱动器。 + +### 第3步:创建 RAID 分区 ### + +4.现在用 sdb 和 sdc 创建 RAID 的分区,使用 fdisk 命令来创建。在这里,我将展示如何创建 sdb 驱动器上的分区。 + + # fdisk /dev/sdb + +请按照以下说明创建分区。 + +- 按 ‘n’ 创建新的分区。 +- 然后按 ‘P’ 选择主分区。 +- 接下来选择分区号为1。 +- 只需按两次回车键选择默认值即可。 +- 然后,按 ‘P’ 来打印创建好的分区。 + +![Create Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Partitions-in-Linux.png) + +创建分区 + +请按照以下说明将分区创建为 Linux 的 RAID 类型。 + +- 按 ‘L’,列出所有可用的类型。 +- 按 ‘t’ 去修改分区。 +- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 +- 然后再次使用‘p’查看我们所做的更改。 +- 使用‘w’保存更改。 + +![Create RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Partitions.png) + +在 Linux 上创建 RAID 分区 + +**注**: 请使用上述步骤同样在 sdc 驱动器上创建分区。 + +5.创建分区后,验证这两个驱动器能使用下面的命令来正确定义 RAID。 + + # mdadm --examine /dev/sd[b-c] + # mdadm --examine /dev/sd[b-c]1 + +![Verify RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Partitions.png) + +验证 RAID 分区 + +### 第4步:创建 RAID md 设备 ### + +6.现在使用以下命令创建 md 设备(即 /dev/md0),并选择 RAID 合适的级别。 + + # mdadm -C /dev/md0 -l raid0 -n 2 /dev/sd[b-c]1 + # mdadm --create /dev/md0 --level=stripe --raid-devices=2 /dev/sd[b-c]1 + +- -C – create +- -l – level +- -n – No of raid-devices + +7.一旦 md 设备已经建立,使用如下命令可以查看 RAID 级别,设备和阵列的使用状态。 + + # cat /proc/mdstat + +![Verify RAID Level](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Level.png) + +查看 RAID 级别 + + # mdadm -E /dev/sd[b-c]1 + +![Verify RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Device.png) + +查看 RAID 设备 + + # mdadm --detail /dev/md0 + +![Verify RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Array.png) + +查看 RAID 阵列 + +### 第5步:挂载 RAID 设备到文件系统 ### + +8.将 RAID 设备 /dev/md0 创建为 ext4 文件系统并挂载到 /mnt/raid0 下。 + + # mkfs.ext4 /dev/md0 + +![Create ext4 Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystem.png) + +创建 ext4 文件系统 + +9. ext4 文件系统为 RAID 设备创建好后,现在创建一个挂载点(即 /mnt/raid0),并将设备 /dev/md0 挂载在它下。 + + # mkdir /mnt/raid0 + # mount /dev/md0 /mnt/raid0/ + +10.下一步,使用 df 命令验证设备 /dev/md0 是否被挂载在 /mnt/raid0 下。 + + # df -h + +11.接下来,创建一个名为 ‘tecmint.txt’ 的文件挂载到 /mnt/raid0 下,为创建的文件添加一些内容,并查看文件和目录的内容。 + + # touch /mnt/raid0/tecmint.txt + # echo "Hi everyone how you doing ?" > /mnt/raid0/tecmint.txt + # cat /mnt/raid0/tecmint.txt + # ls -l /mnt/raid0/ + +![Verify Mount Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Mount-Device.png) + +验证挂载的设备 + +12.一旦你验证挂载点后,同时将它添加到 /etc/fstab 文件中。 + + # vim /etc/fstab + +添加以下条目,根据你的安装位置和使用文件系统的不同,自行做修改。 + + /dev/md0 /mnt/raid0 ext4 deaults 0 0 + +![Add Device to Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Add-Device-to-Fstab.png) + +添加设备到 fstab 文件中 + +13.使用 mount ‘-a‘ 来检查 fstab 的条目是否有误。 + + # mount -av + +![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-Fstab.png) + +检查 fstab 文件是否有误 + +### 第6步:保存 RAID 配置 ### + +14.最后,保存 RAID 配置到一个文件中,以供将来使用。同样,我们使用 ‘mdadm’ 命令带有 ‘-s‘ (scan) 和 ‘-v‘ (verbose) 选项,如图所示。 + + # mdadm -E -s -v >> /etc/mdadm.conf + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + # cat /etc/mdadm.conf + +![Save RAID Configurations](http://www.tecmint.com/wp-content/uploads/2014/10/Save-RAID-Configurations.png) + +保存 RAID 配置 + +就这样,我们在这里看到,如何通过使用两个硬盘配置具有条带化的 RAID0 级别。在接下来的文章中,我们将看到如何设置 RAID5。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid0-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ From 81f06d85c3773c901edb69c80c182fd225a8f217 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 4 Aug 2015 10:52:16 +0800 Subject: [PATCH 1610/2517] Create Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md --- ... RAID, Concepts of RAID and RAID Levels.md | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 translated/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md diff --git a/translated/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md b/translated/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md new file mode 100644 index 0000000000..8ca0ecbd7e --- /dev/null +++ b/translated/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md @@ -0,0 +1,146 @@ + +RAID的级别和概念的介绍 - 第1部分 +================================================================================ +RAID是廉价磁盘冗余阵列,但现在它被称为独立磁盘冗余阵列。早先一个容量很小的磁盘都是非常昂贵的,但是现在我们可以很便宜的买到一个更大的磁盘。Raid 是磁盘的一个集合,被称为逻辑卷。 + + +![RAID in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/RAID.jpg) + +在 Linux 中理解 RAID 的设置 + +RAID包含一组或者一个集合甚至一个阵列。使用一组磁盘结合驱动器组成 RAID 阵列或 RAID 集。一个 RAID 控制器至少使用两个磁盘并且使用一个逻辑卷或者多个驱动器在一个组中。在一个磁盘组的应用中只能使用一个 RAID 级别。使用 RAID 可以提高服务器的性能。不同 RAID 的级别,性能会有所不同。它通过容错和高可用性来保存我们的数据。 + +这个系列被命名为RAID的构建共包含9个部分包括以下主题。 + +- 第1部分:RAID的级别和概念的介绍 +- 第2部分:在Linux中如何设置 RAID0(条带化) +- 第3部分:在Linux中如何设置 RAID1(镜像化) +- 第4部分:在Linux中如何设置 RAID5(条带化与分布式奇偶校验) +- 第5部分:在Linux中如何设置 RAID6(条带双分布式奇偶校验) +- 第6部分:在Linux中设置 RAID 10 或1 + 0(嵌套) +- 第7部分:增加现有的 RAID 阵列并删除损坏的磁盘 +- 第8部分:在 RAID 中恢复(重建)损坏的驱动器 +- 第9部分:在 Linux 中管理 RAID + +这是9系列教程的第1部分,在这里我们将介绍 RAID 的概念和 RAID 级别,这是在 Linux 中构建 RAID 需要理解的。 + + +### 软件RAID和硬件RAID ### + +软件 RAID 的性能很低,因为其从主机资源消耗。 RAID 软件需要加载可读取数据从软件 RAID 卷中。在加载 RAID 软件前,操作系统需要得到加载 RAID 软件的引导。在软件 RAID 中无需物理硬件。零成本投资。 + +硬件 RAID 具有很高的性能。他们有专用的 RAID 控制器,采用 PCI Express卡物理内置的。它不会使用主机资源。他们有 NVRAM 缓存读取和写入。当重建时即使出现电源故障,它会使用电池电源备份存储缓存。对于大规模使用需要非常昂贵的投资。 + +硬件 RAID 卡如下所示: + +![Hardware RAID](http://www.tecmint.com/wp-content/uploads/2014/10/Hardware-RAID.jpg) + +硬件RAID + +#### 精选的 RAID 概念 #### + +- 在 RAID 重建中校验方法中丢失的内容来自从校验中保存的信息。 RAID 5,RAID 6 基于校验。 +- 条带化是随机共享数据到多个磁盘。它不会在单个磁盘中保存完整的数据。如果我们使用3个磁盘,则数据将会存在于每个磁盘上。 +- 镜像被用于 RAID 1 和 RAID 10。镜像会自动备份数据。在 RAID 1,它将保存相同的内容到其他盘上。 +- 在我们的服务器上,热备份只是一个备用驱动器,它可以自动更换发生故障的驱动器。在我们的阵列中,如果任何一个驱动器损坏,热备份驱动器会自动重建。 +- 块是 RAID 控制器每次读写数据时的最小单位,最小4KB。通过定义块大小,我们可以增加 I/O 性能。 + +RAID有不同的级别。在这里,我们仅看到在真实环境下的使用最多的 RAID 级别。 + +- RAID0 = 条带化 +- RAID1 = 镜像 +- RAID5 = 单个磁盘分布式奇偶校验 +- RAID6 = 双盘分布式奇偶校验 +- RAID10 = 镜像 + 条带。(嵌套RAID) + +RAID 在大多数 Linux 发行版上使用 mdadm 的包管理。让我们先对每个 RAID 级别认识一下。 + +#### RAID 0(或)条带化 #### + +条带化有很好的性能。在 RAID 0(条带化)中数据将使用共享的方式被写入到磁盘。一半的内容将是在一个磁盘上,另一半内容将被写入到其它磁盘。 + +假设我们有2个磁盘驱动器,例如,如果我们将数据“TECMINT”写到逻辑卷中,“T”将被保存在第一盘中,“E”将保存在第二盘,'C'将被保存在第一盘,“M”将保存在第二盘,它会一直继续此循环过程。 + +在这种情况下,如果驱动器中的任何一个发生故障,我们将丢失所有的数据,因为一个盘中只有一半的数据,不能用于重建。不过,当比较写入速度和性能时,RAID0 是非常好的。创建 RAID 0(条带化)至少需要2个磁盘。如果你的数据是非常宝贵的,那么不要使用此 RAID 级别。 + +- 高性能。 +- 在 RAID0 上零容量损失。 +- 零容错。 +- 写和读有很高的性能。 + +#### RAID1(或)镜像化 #### + +镜像也有不错的性能。镜像可以备份我们的数据。假设我们有两组2TB的硬盘驱动器,我们总共有4TB,但在镜像中,驱动器在 RAID 控制器的后面形成一个逻辑驱动器,我们只能看到逻辑驱动器有2TB。 + +当我们保存数据时,它将同时写入2TB驱动器中。创建 RAID 1 (镜像化)最少需要两个驱动器。如果发生磁盘故障,我们可以恢复 RAID 通过更换一个新的磁盘。如果在 RAID 1 中任何一个磁盘发生故障,我们可以从另一个磁盘中获取相同的数据,因为其他的磁盘中也有相同的数据。所以是零数据丢失。 + +- 良好的性能。 +- 空间的一半将在总容量丢失。 +- 完全容错。 +- 重建会更快。 +- 写性能将是缓慢的。 +- 读将会很好。 +- 被操作系统和数据库使用的规模很小。 + +#### RAID 5(或)分布式奇偶校验 #### + +RAID 5 多用于企业的水平。 RAID 5 的工作通过分布式奇偶校验的方法。奇偶校验信息将被用于重建数据。它需要留下的正常驱动器上的信息去重建。驱动器故障时,这会保护我们的数据。 + +假设我们有4个驱动器,如果一个驱动器发生故障而后我们更换发生故障的驱动器后,我们可以从奇偶校验中重建数据到更换的驱动器上。奇偶校验信息存储在所有的4个驱动器上,如果我们有4个 1TB 的驱动器。奇偶校验信息将被存储在每个驱动器的256G中而其它768GB是用户自己使用的。单个驱动器故障后,RAID 5 依旧正常工作,如果驱动器损坏个数超过1个会导致数据的丢失。 + +- 性能卓越 +- 读速度将非常好。 +- 如果我们不使用硬件 RAID 控制器,写速度是缓慢的。 +- 从所有驱动器的奇偶校验信息中重建。 +- 完全容错。 +- 1个磁盘空间将用于奇偶校验。 +- 可以被用在文件服务器,Web服务器,非常重要的备份中。 + +#### RAID 6 两个分布式奇偶校验磁盘 #### + +RAID 6 和 RAID 5 相似但它有两个分布式奇偶校验。大多用在大量的阵列中。我们最少需要4个驱动器,即使有2个驱动器发生故障,我们依然可以重建数据,同时更换新的驱动器。 + +它比 RAID 5 非常慢,因为它将数据同时写到4个驱动器上。当我们使用硬件 RAID 控制器时速度将被平均。如果我们有6个的1TB驱动器,4个驱动器将用于数据保存,2个驱动器将用于校验。 + +- 性能不佳。 +- 读的性能很好。 +- 如果我们不使用硬件 RAID 控制器写的性能会很差。 +- 从2奇偶校验驱动器上重建。 +- 完全容错。 +- 2个磁盘空间将用于奇偶校验。 +- 可用于大型阵列。 +- 在备份和视频流中大规模使用。 + +#### RAID 10(或)镜像+条带 #### + +RAID 10 可以被称为1 + 0或0 +1。它将做镜像+条带两个工作。在 RAID 10 中首先做镜像然后做条带。在 RAID 01 上首先做条带,然后做镜像。RAID 10 比 01 好。 + +假设,我们有4个驱动器。当我写了一些数据到逻辑卷上,它会使用镜像和条带将数据保存到4个驱动器上。 + +如果我在 RAID 10 上写入数据“TECMINT”,数据将使用如下形式保存。首先将“T”同时写入两个磁盘,“E”也将同时写入两个磁盘,这一步将所有数据都写入。这使数据得到备份。 + +同时它将使用 RAID 0 方式写入数据,遵循将“T”写入第一个盘,“E”写入第二个盘。再次将“C”写入第一个盘,“M”到第二个盘。 + +- 良好的读写性能。 +- 空间的一半将在总容量丢失。 +- 容错。 +- 从备份数据中快速重建。 +- 它的高性能和高可用性常被用于数据库的存储中。 + +### 结论 ### + +在这篇文章中,我们已经看到了什么是 RAID 和在实际环境大多采用 RAID 的哪个级别。希望你已经学会了上面所写的。对于 RAID 的构建必须了解有关 RAID 的基本知识。以上内容对于你了解 RAID 基本满足。 + +在接下来的文章中,我将介绍如何设置和使用各种级别创建 RAID,增加 RAID 组(阵列)和驱动器故障排除等。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/understanding-raid-setup-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ From 58e17d89a5653abf7d8f4d7315e4f19a684099c0 Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Tue, 4 Aug 2015 19:12:16 +0800 Subject: [PATCH 1611/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完毕 --- ...y Using 'Explain Shell' Script in Linux.md | 121 ------------------ 1 file changed, 121 deletions(-) delete mode 100644 sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md diff --git a/sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md b/sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md deleted file mode 100644 index ab7572cd7a..0000000000 --- a/sources/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md +++ /dev/null @@ -1,121 +0,0 @@ - -Translating by dingdongnigetou - -Understanding Shell Commands Easily Using “Explain Shell” Script in Linux -================================================================================ -While working on Linux platform all of us need help on shell commands, at some point of time. Although inbuilt help like man pages, whatis command is helpful, but man pages output are too lengthy and until and unless one has some experience with Linux, it is very difficult to get any help from massive man pages. The output of whatis command is rarely more than one line which is not sufficient for newbies. - -![Explain Shell Commands in Linux Shell](http://www.tecmint.com/wp-content/uploads/2015/07/Explain-Shell-Commands-in-Linux-Shell.jpeg) - -Explain Shell Commands in Linux Shell - -There are third-party application like ‘cheat‘, which we have covered here “[Commandline Cheat Sheet for Linux Users][1]. Although Cheat is an exceptionally good application which shows help on shell command even when computer is not connected to Internet, it shows help on predefined commands only. - -There is a small piece of code written by Jackson which is able to explain shell commands within the bash shell very effectively and guess what the best part is you don’t need to install any third party package. He named the file containing this piece of code as `'explain.sh'`. - -#### Features of Explain Utility #### - -- Easy Code Embedding. -- No third-party utility needed to be installed. -- Output just enough information in course of explanation. -- Requires internet connection to work. -- Pure command-line utility. -- Able to explain most of the shell commands in bash shell. -- No root Account involvement required. - -**Prerequisite** - -The only requirement is `'curl'` package. In most of the today’s latest Linux distributions, curl package comes pre-installed, if not you can install it using package manager as shown below. - - # apt-get install curl [On Debian systems] - # yum install curl [On CentOS systems] - -### Installation of explain.sh Utility in Linux ### - -We have to insert the below piece of code as it is in the `~/.bashrc` file. The code should be inserted for each user and each `.bashrc` file. It is suggested to insert the code to the user’s .bashrc file only and not in the .bashrc of root user. - -Notice the first line of code that starts with hash `(#)` is optional and added just to differentiate rest of the codes of .bashrc. - -# explain.sh marks the beginning of the codes, we are inserting in .bashrc file at the bottom of this file. - - # explain.sh begins - explain () { - if [ "$#" -eq 0 ]; then - while read -p "Command: " cmd; do - curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$cmd" - done - echo "Bye!" - elif [ "$#" -eq 1 ]; then - curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$1" - else - echo "Usage" - echo "explain interactive mode." - echo "explain 'cmd -o | ...' one quoted command to explain it." - fi - } - -### Working of explain.sh Utility ### - -After inserting the code and saving it, you must logout of the current session and login back to make the changes taken into effect. Every thing is taken care of by the ‘curl’ command which transfer the input command and flag that need explanation to the mankier server and then print just necessary information to the Linux command-line. Not to mention to use this utility you must be connected to internet always. - -Let’s test few examples of command which I don’t know the meaning with explain.sh script. - -**1. I forgot what ‘du -h‘ does. All I need to do is:** - - $ explain 'du -h' - -![Get Help on du Command](http://www.tecmint.com/wp-content/uploads/2015/07/Get-Help-on-du-Command.png) - -Get Help on du Command - -**2. If you forgot what ‘tar -zxvf‘ does, you may simply do:** - - $ explain 'tar -zxvf' - -![Tar Command Help](http://www.tecmint.com/wp-content/uploads/2015/07/Tar-Command-Help.png) - -Tar Command Help - -**3. One of my friend often confuse the use of ‘whatis‘ and ‘whereis‘ command, so I advised him.** - -Go to Interactive Mode by simply typing explain command on the terminal. - - $ explain - -and then type the commands one after another to see what they do in one window, as: - - Command: whatis - Command: whereis - -![Whatis Whereis Commands Help](http://www.tecmint.com/wp-content/uploads/2015/07/Whatis-Whereis-Commands-Help.png) - -Whatis Whereis Commands Help - -To exit interactive mode he just need to do Ctrl + c. - -**4. You can ask to explain more than one command chained by pipeline.** - - $ explain 'ls -l | grep -i Desktop' - -![Get Help on Multiple Commands](http://www.tecmint.com/wp-content/uploads/2015/07/Get-Help-on-Multiple-Commands.png) - -Get Help on Multiple Commands - -Similarly you can ask your shell to explain any shell command. All you need is a working Internet connection. The output is generated based upon the explanation needed from the server and hence the output result is not customizable. - -For me this utility is really helpful and it has been honored being added to my .bashrc. Let me know what is your thought on this project? How it can useful for you? Is the explanation satisfactory? - -Provide us with your valuable feedback in the comments below. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/explain-shell-commands-in-the-linux-shell/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/cheat-command-line-cheat-sheet-for-linux-users/ From b8127cd50d3c05e938f45795e9f37e617112cc99 Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Tue, 4 Aug 2015 19:17:36 +0800 Subject: [PATCH 1612/2517] =?UTF-8?q?Create=20=E3=80=90=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E5=AE=8C=E6=AF=95=E3=80=9120150728=20Understanding=20Shell=20C?= =?UTF-8?q?ommands=20Easily=20Using=20'Explain=20Shell'=20Script=20in=20Li?= =?UTF-8?q?nux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Easily Using 'Explain Shell' Script in Linux.md | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 translated/tech/【翻译完毕】20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md diff --git a/translated/tech/【翻译完毕】20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md b/translated/tech/【翻译完毕】20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md new file mode 100644 index 0000000000..b8f993676c --- /dev/null +++ b/translated/tech/【翻译完毕】20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md @@ -0,0 +1,118 @@ +在Linux中利用"Explain Shell"脚本更容易地理解Shell命令 +================================================================================ +在某些时刻, 当我们在Linux平台上工作时我们所有人都需要shell命令的帮助信息。 尽管内置的帮助像man pages、whatis命令是有帮助的, 但man pages的输出非常冗长, 除非是个有linux经验的人,不然从大量的man pages中获取帮助信息是非常困难的,而whatis命令的输出很少超过一行, 这对初学者来说是不够的。 + +![Explain Shell Commands in Linux Shell](http://www.tecmint.com/wp-content/uploads/2015/07/Explain-Shell-Commands-in-Linux-Shell.jpeg) + +在Linux Shell中解释Shell命令 + +有一些第三方应用程序, 像我们在[Commandline Cheat Sheet for Linux Users][1]提及过的'cheat'命令。Cheat是个杰出的应用程序,即使计算机没有联网也能提供shell命令的帮助, 但是它仅限于预先定义好的命令。 + +Jackson写了一小段代码,它能非常有效地在bash shell里面解释shell命令,可能最美之处就是你不需要安装第三方包了。他把包含这段代码的的文件命名为”explain.sh“。 + +#### Explain工具的特性 #### + +- 易嵌入代码。 +- 不需要安装第三方工具。 +- 在解释过程中输出恰到好处的信息。 +- 需要网络连接才能工作。 +- 纯命令行工具。 +- 可以解释bash shell里面的大部分shell命令。 +- 无需root账户参与。 + +**先决条件** + +唯一的条件就是'curl'包了。 在如今大多数Linux发行版里面已经预安装了culr包, 如果没有你可以按照下面的命令来安装。 + + # apt-get install curl [On Debian systems] + # yum install curl [On CentOS systems] + +### 在Linux上安装explain.sh工具 ### + +我们要将下面这段代码插入'~/.bashrc'文件(LCTT注: 若没有该文件可以自己新建一个)中。我们必须为每个用户以及对应的'.bashrc'文件插入这段代码,笔者建议你不要加在root用户下。 + +我们注意到.bashrc文件的第一行代码以(#)开始, 这个是可选的并且只是为了区分余下的代码。 + +# explain.sh 标记代码的开始, 我们将代码插入.bashrc文件的底部。 + + # explain.sh begins + explain () { + if [ "$#" -eq 0 ]; then + while read -p "Command: " cmd; do + curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$cmd" + done + echo "Bye!" + elif [ "$#" -eq 1 ]; then + curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$1" + else + echo "Usage" + echo "explain interactive mode." + echo "explain 'cmd -o | ...' one quoted command to explain it." + fi + } + +### explain.sh工具的使用 ### + +在插入代码并保存之后,你必须退出当前的会话然后重新登录来使改变生效(LCTT注:你也可以直接使用命令“source~/.bashrc”来让改变生效)。每件事情都是交由‘curl’命令处理, 它负责将需要解释的命令以及命令选项传送给mankier服务,然后将必要的信息打印到Linux命令行。不必说的就是使用这个工具你总是需要连接网络。 + +让我们用explain.sh脚本测试几个笔者不懂的命令例子。 + +**1.我忘了‘du -h’是干嘛用的, 我只需要这样做:** + + $ explain 'du -h' + +![Get Help on du Command](http://www.tecmint.com/wp-content/uploads/2015/07/Get-Help-on-du-Command.png) + +获得du命令的帮助 + +**2.如果你忘了'tar -zxvf'的作用,你可以简单地如此做:** + + $ explain 'tar -zxvf' + +![Tar Command Help](http://www.tecmint.com/wp-content/uploads/2015/07/Tar-Command-Help.png) + +Tar命令帮助 + +**3.我的一个朋友经常对'whatis'以及'whereis'命令的使用感到困惑,所以我建议他:** + +在终端简单的地敲下explain命令进入交互模式。 + + $ explain + +然后一个接着一个地输入命令,就能在一个窗口看到他们各自的作用: + + Command: whatis + Command: whereis + +![Whatis Whereis Commands Help](http://www.tecmint.com/wp-content/uploads/2015/07/Whatis-Whereis-Commands-Help.png) + +Whatis/Whereis命令的帮助 + +你只需要使用“Ctrl+c”就能退出交互模式。 + +**4. 你可以通过管道来请求解释更多的命令。** + + $ explain 'ls -l | grep -i Desktop' + +![Get Help on Multiple Commands](http://www.tecmint.com/wp-content/uploads/2015/07/Get-Help-on-Multiple-Commands.png) + +获取多条命令的帮助 + +同样地,你可以请求你的shell来解释任何shell命令。 前提是你需要一个可用的网络。输出的信息是基于解释的需要从服务器中生成的,因此输出的结果是不可定制的。 + +对于我来说这个工具真的很有用并且它已经荣幸地添加在我的.bashrc文件中。你对这个项目有什么想法?它对你有用么?它的解释令你满意吗?请让我知道吧! + +请在下面评论为我们提供宝贵意见,喜欢并分享我们以及帮助我们得到传播。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/explain-shell-commands-in-the-linux-shell/ + +作者:[Avishek Kumar][a] +译者:[dingdongnigetou](https://github.com/dingdongnigetou) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/cheat-command-line-cheat-sheet-for-linux-users/ From a61412acbc3535975deb7581f54844a83d1f1e99 Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Tue, 4 Aug 2015 19:18:09 +0800 Subject: [PATCH 1613/2517] =?UTF-8?q?Rename=20=E3=80=90=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E5=AE=8C=E6=AF=95=E3=80=9120150728=20Understanding=20Shell=20C?= =?UTF-8?q?ommands=20Easily=20Using=20'Explain=20Shell'=20Script=20in=20Li?= =?UTF-8?q?nux.md=20to=2020150728=20Understanding=20Shell=20Commands=20Eas?= =?UTF-8?q?ily=20Using=20'Explain=20Shell'=20Script=20in=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ding Shell Commands Easily Using 'Explain Shell' Script in Linux.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/tech/{【翻译完毕】20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md => 20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md} (100%) diff --git a/translated/tech/【翻译完毕】20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md b/translated/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md similarity index 100% rename from translated/tech/【翻译完毕】20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md rename to translated/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md From c823978d30497a34d2e73d8ace42140ddc4567c1 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 4 Aug 2015 22:32:09 +0800 Subject: [PATCH 1614/2517] PUB:20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu @geekpi --- ...ment and How Do You Enable It in Ubuntu.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md (67%) diff --git a/translated/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md b/published/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md similarity index 67% rename from translated/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md rename to published/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md index 05f07b74e6..86569b0128 100644 --- a/translated/tech/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md +++ b/published/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md @@ -1,26 +1,25 @@ -什么是逻辑分区管理工具,它怎么在Ubuntu启用? +什么是逻辑分区管理 LVM ,如何在Ubuntu中使用? ================================================================================ -> 逻辑分区管理(LVM)是每一个主流Linux发行版都含有的磁盘管理选项。无论你是否需要设置存储池或者只需要动态创建分区,LVM就是你正在寻找的。 + +> 逻辑分区管理(LVM)是每一个主流Linux发行版都含有的磁盘管理选项。无论是你需要设置存储池,还是只想动态创建分区,那么LVM就是你正在寻找的。 ### 什么是 LVM? ### -逻辑分区管理是一个存在于磁盘/分区和操作系统之间的一个抽象层。在传统的磁盘管理中,你的操作系统寻找有哪些磁盘可用(/dev/sda、/dev/sdb等等)接着这些磁盘有哪些可用的分区(如/dev/sda1、/dev/sda2等等)。 +逻辑分区管理是一个存在于磁盘/分区和操作系统之间的一个抽象层。在传统的磁盘管理中,你的操作系统寻找有哪些磁盘可用(/dev/sda、/dev/sdb等等),并且这些磁盘有哪些可用的分区(如/dev/sda1、/dev/sda2等等)。 -在LVM下,磁盘和分区可以抽象成一个设备中含有多个磁盘和分区。你的操作系统将不会知道这些区别,因为LVM只会给操作系统展示你设置的卷组(磁盘)和逻辑卷(分区) +在LVM下,磁盘和分区可以抽象成一个含有多个磁盘和分区的设备。你的操作系统将不会知道这些区别,因为LVM只会给操作系统展示你设置的卷组(磁盘)和逻辑卷(分区) -,因此可以很容易地动态调整和创建新的磁盘和分区。除此之外,LVM带来你的文件系统不具备的功能。比如,ext3不支持实时快照,但是如果你正在使用LVM你可以不卸载磁盘的情况下做一个逻辑卷的快照。 +因为卷组和逻辑卷并不物理地对应到影片,因此可以很容易地动态调整和创建新的磁盘和分区。除此之外,LVM带来了你的文件系统所不具备的功能。比如,ext3不支持实时快照,但是如果你正在使用LVM你可以不卸载磁盘的情况下做一个逻辑卷的快照。 ### 你什么时候该使用LVM? ### -在使用LVM之前首先得考虑的一件事是你要用你的磁盘和分区完成什么。一些发行版如Fedora已经默认安装了LVM。 +在使用LVM之前首先得考虑的一件事是你要用你的磁盘和分区来做什么。注意,一些发行版如Fedora已经默认安装了LVM。 -如果你使用的是一台只有一块磁盘的Ubuntu笔记本电脑,并且你不需要像实时快照这样的扩展功能,那么你或许不需要LVM。如果I想要轻松地扩展或者想要将多块磁盘组成一个存储池,那么LVM或许正式你郑寻找的。 +如果你使用的是一台只有一块磁盘的Ubuntu笔记本电脑,并且你不需要像实时快照这样的扩展功能,那么你或许不需要LVM。如果你想要轻松地扩展或者想要将多块磁盘组成一个存储池,那么LVM或许正是你所寻找的。 ### 在Ubuntu中设置LVM ### -使用LVM首先要了解的一件事是没有简单的方法将已经存在传统的分区转换成逻辑分区。可以将它移到一个使用LVM的新分区下,但是这并不会在本篇中提到;反之我们将全新安装一台Ubuntu 10.10来设置LVM - -![](http://cdn3.howtogeek.com/wp-content/uploads/2010/12/ubuntu-10-banner.png) +使用LVM首先要了解的一件事是,没有一个简单的方法可以将已有的传统分区转换成逻辑卷。可以将数据移到一个使用LVM的新分区下,但是这并不会在本篇中提到;在这里,我们将全新安装一台Ubuntu 10.10来设置LVM。(LCTT 译注:本文针对的是较老的版本,新的版本已经不需如此麻烦了) 要使用LVM安装Ubuntu你需要使用另外的安装CD。从下面的链接中下载并烧录到CD中或者[使用unetbootin创建一个USB盘][1]。 @@ -64,7 +63,7 @@ via: http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and- 作者:[How-To Geek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 7c8fd52aa7704ddee0fa04a71fee6b5b06647180 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 4 Aug 2015 23:11:02 +0800 Subject: [PATCH 1615/2517] PUB:20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu @ictlyh --- ...M (Logical Volume Management) in Ubuntu.md | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) rename {translated/tech => published}/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md (79%) diff --git a/translated/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md b/published/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md similarity index 79% rename from translated/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md rename to published/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md index c3a84f5fcf..76a2c8d224 100644 --- a/translated/tech/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md +++ b/published/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md @@ -1,20 +1,20 @@ -如何在 Ubuntu 中管理和使用 LVM(Logical Volume Management,逻辑卷管理) +如何在 Ubuntu 中管理和使用 逻辑卷管理 LVM ================================================================================ ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-1.png.pagespeed.ic.VGSxDeVS9P.png) 在我们之前的文章中,我们介绍了[什么是 LVM 以及能用 LVM 做什么][1],今天我们会给你介绍一些 LVM 的主要管理工具,使得你在设置和扩展安装时更游刃有余。 -正如之前所述,LVM 是介于你的操作系统和物理硬盘驱动器之间的抽象层。这意味着你的物理硬盘驱动器和分区不再依赖于他们所在的硬盘驱动和分区。而是,你的操作系统所见的硬盘驱动和分区可以是由任意数目的独立硬盘驱动汇集而成或是一个软件磁盘阵列。 +正如之前所述,LVM 是介于你的操作系统和物理硬盘驱动器之间的抽象层。这意味着你的物理硬盘驱动器和分区不再依赖于他们所在的硬盘驱动和分区。而是你的操作系统所见的硬盘驱动和分区可以是由任意数目的独立硬盘汇集而成的或是一个软件磁盘阵列。 要管理 LVM,这里有很多可用的 GUI 工具,但要真正理解 LVM 配置发生的事情,最好要知道一些命令行工具。这当你在一个服务器或不提供 GUI 工具的发行版上管理 LVM 时尤为有用。 LVM 的大部分命令和彼此都非常相似。每个可用的命令都由以下其中之一开头: -- Physical Volume = pv -- Volume Group = vg -- Logical Volume = lv +- Physical Volume (物理卷) = pv +- Volume Group (卷组)= vg +- Logical Volume (逻辑卷)= lv -物理卷命令用于在卷组中添加或删除硬盘驱动。卷组命令用于为你的逻辑卷操作更改显示的物理分区抽象集。逻辑卷命令会以分区形式显示卷组使得你的操作系统能使用指定的空间。 +物理卷命令用于在卷组中添加或删除硬盘驱动。卷组命令用于为你的逻辑卷操作更改显示的物理分区抽象集。逻辑卷命令会以分区形式显示卷组,使得你的操作系统能使用指定的空间。 ### 可下载的 LVM 备忘单 ### @@ -26,7 +26,7 @@ LVM 的大部分命令和彼此都非常相似。每个可用的命令都由以 ### 如何查看当前 LVM 信息 ### -你首先需要做的事情是检查你的 LVM 设置。s 和 display 命令和物理卷(pv)、卷组(vg)以及逻辑卷(lv)一起使用,是一个找出当前设置好的开始点。 +你首先需要做的事情是检查你的 LVM 设置。s 和 display 命令可以和物理卷(pv)、卷组(vg)以及逻辑卷(lv)一起使用,是一个找出当前设置的好起点。 display 命令会格式化输出信息,因此比 s 命令更易于理解。对每个命令你会看到名称和 pv/vg 的路径,它还会给出空闲和已使用空间的信息。 @@ -40,17 +40,17 @@ display 命令会格式化输出信息,因此比 s 命令更易于理解。对 #### 创建物理卷 #### -我们会从一个完全新的没有任何分区和信息的硬盘驱动开始。首先找出你将要使用的磁盘。(/dev/sda, sdb, 等) +我们会从一个全新的没有任何分区和信息的硬盘开始。首先找出你将要使用的磁盘。(/dev/sda, sdb, 等) > 注意:记住所有的命令都要以 root 身份运行或者在命令前面添加 'sudo' 。 fdisk -l -如果之前你的硬盘驱动从没有格式化或分区,在 fdisk 的输出中你很可能看到类似下面的信息。这完全正常,因为我们会在下面的步骤中创建需要的分区。 +如果之前你的硬盘从未格式化或分区过,在 fdisk 的输出中你很可能看到类似下面的信息。这完全正常,因为我们会在下面的步骤中创建需要的分区。 ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/fdisk.png.pagespeed.ce.AmAEsxm-7Q.png) -我们的新磁盘位置是 /dev/sdb,让我们用 fdisk 命令在驱动上创建一个新的分区。 +我们的新磁盘位置是 /dev/sdb,让我们用 fdisk 命令在磁盘上创建一个新的分区。 这里有大量能创建新分区的 GUI 工具,包括 [Gparted][2],但由于我们已经打开了终端,我们将使用 fdisk 命令创建需要的分区。 @@ -62,9 +62,9 @@ display 命令会格式化输出信息,因此比 s 命令更易于理解。对 ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x145xfdisk00.png.pagespeed.ic.I7S8bjoXQG.png) -以指定的顺序输入命令创建一个使用新硬盘驱动 100% 空间的主分区并为 LVM 做好了准备。如果你需要更改分区的大小或相应多个分区,我建议使用 GParted 或自己了解关于 fdisk 命令的使用。 +以指定的顺序输入命令创建一个使用新硬盘 100% 空间的主分区并为 LVM 做好了准备。如果你需要更改分区的大小或想要多个分区,我建议使用 GParted 或自己了解一下关于 fdisk 命令的使用。 -**警告:下面的步骤会格式化你的硬盘驱动。确保在进行下面步骤之前你的硬盘驱动中没有任何信息。** +**警告:下面的步骤会格式化你的硬盘驱动。确保在进行下面步骤之前你的硬盘驱动中没有任何有用的信息。** - n = 创建新分区 - p = 创建主分区 @@ -79,9 +79,9 @@ display 命令会格式化输出信息,因此比 s 命令更易于理解。对 - t = 更改分区类型 - 8e = 更改为 LVM 分区类型 -核实并将信息写入硬盘驱动器。 +核实并将信息写入硬盘。 -- p = 查看分区设置使得写入更改到磁盘之前可以回看 +- p = 查看分区设置使得在写入更改到磁盘之前可以回看 - w = 写入更改到磁盘 ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/560x339xfdisk03.png.pagespeed.ic.FC8foICZsb.png) @@ -102,7 +102,7 @@ display 命令会格式化输出信息,因此比 s 命令更易于理解。对 ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/vgcreate.png.pagespeed.ce.fVLzSmPZou.png) -Vgpool 是新创建的卷组的名称。你可以使用任何你喜欢的名称,但建议标签以 vg 开头,以便后面你使用它时能意识到这是一个卷组。 +vgpool 是新创建的卷组的名称。你可以使用任何你喜欢的名称,但建议标签以 vg 开头,以便后面你使用它时能意识到这是一个卷组。 #### 创建逻辑卷 #### @@ -112,7 +112,7 @@ Vgpool 是新创建的卷组的名称。你可以使用任何你喜欢的名称 ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/lvcreate.png.pagespeed.ce.vupLB-LJEW.png) --L 命令指定逻辑卷的大小,在该情况中是 3 GB,-n 命令指定卷的名称。 指定 vgpool 所以 lvcreate 命令知道从什么卷获取空间。 +-L 命令指定逻辑卷的大小,在该情况中是 3 GB,-n 命令指定卷的名称。 指定 vgpool 以便 lvcreate 命令知道从什么卷获取空间。 #### 格式化并挂载逻辑卷 #### @@ -131,7 +131,7 @@ Vgpool 是新创建的卷组的名称。你可以使用任何你喜欢的名称 #### 重新设置逻辑卷大小 #### -逻辑卷的一个好处是你能使你的共享物理变大或变小而不需要移动所有东西到一个更大的硬盘驱动。另外,你可以添加新的硬盘驱动并同时扩展你的卷组。或者如果你有一个不使用的硬盘驱动,你可以从卷组中移除它使得逻辑卷变小。 +逻辑卷的一个好处是你能使你的存储物理地变大或变小,而不需要移动所有东西到一个更大的硬盘。另外,你可以添加新的硬盘并同时扩展你的卷组。或者如果你有一个不使用的硬盘,你可以从卷组中移除它使得逻辑卷变小。 这里有三个用于使物理卷、卷组和逻辑卷变大或变小的基础工具。 @@ -147,9 +147,9 @@ Vgpool 是新创建的卷组的名称。你可以使用任何你喜欢的名称 按照上面创建新分区并更改分区类型为 LVM(8e) 的步骤安装一个新硬盘驱动。然后用 pvcreate 命令创建一个 LVM 能识别的物理卷。 -#### 添加新硬盘驱动到卷组 #### +#### 添加新硬盘到卷组 #### -要添加新的硬盘驱动到一个卷组,你只需要知道你的新分区,在我们的例子中是 /dev/sdc1,以及想要添加到的卷组的名称。 +要添加新的硬盘到一个卷组,你只需要知道你的新分区,在我们的例子中是 /dev/sdc1,以及想要添加到的卷组的名称。 这会添加新物理卷到已存在的卷组中。 @@ -189,7 +189,7 @@ Vgpool 是新创建的卷组的名称。你可以使用任何你喜欢的名称 1. 调整文件系统大小 (调整之前确保已经移动文件到硬盘驱动安全的地方) 1. 减小逻辑卷 (除了 + 可以扩展大小,你也可以用 - 压缩大小) -1. 用 vgreduce 从卷组中移除硬盘驱动 +1. 用 vgreduce 从卷组中移除硬盘 #### 备份逻辑卷 #### @@ -197,7 +197,7 @@ Vgpool 是新创建的卷组的名称。你可以使用任何你喜欢的名称 ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/652x202xbanner-2.png.pagespeed.ic.VtOUuqYX1W.png) -LVM 获取快照的时候,会有一张和逻辑卷完全相同的照片,该照片可以用于在不同的硬盘驱动上进行备份。生成一个备份的时候,任何需要添加到逻辑卷的新信息会如往常一样写入磁盘,但会跟踪更改使得原始快照永远不会损毁。 +LVM 获取快照的时候,会有一张和逻辑卷完全相同的“照片”,该“照片”可以用于在不同的硬盘上进行备份。生成一个备份的时候,任何需要添加到逻辑卷的新信息会如往常一样写入磁盘,但会跟踪更改使得原始快照永远不会损毁。 要创建一个快照,我们需要创建拥有足够空闲空间的逻辑卷,用于保存我们备份的时候会写入该逻辑卷的任何新信息。如果驱动并不是经常写入,你可以使用很小的一个存储空间。备份完成的时候我们只需要移除临时逻辑卷,原始逻辑卷会和往常一样。 @@ -209,7 +209,7 @@ LVM 获取快照的时候,会有一张和逻辑卷完全相同的照片,该 ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/597x68xlvcreate-snapshot.png.pagespeed.ic.Rw2ivtcpPg.png) -这里我们创建了一个只有 512MB 的逻辑卷,因为驱动实际上并不会使用。512MB 的空间会保存备份时产生的任何新数据。 +这里我们创建了一个只有 512MB 的逻辑卷,因为该硬盘实际上并不会使用。512MB 的空间会保存备份时产生的任何新数据。 #### 挂载新快照 #### @@ -222,7 +222,7 @@ LVM 获取快照的时候,会有一张和逻辑卷完全相同的照片,该 #### 复制快照和删除逻辑卷 #### -你剩下需要做的是从 /mnt/lvstuffbackup/ 中复制所有文件到一个外部的硬盘驱动或者打包所有文件到一个文件。 +你剩下需要做的是从 /mnt/lvstuffbackup/ 中复制所有文件到一个外部的硬盘或者打包所有文件到一个文件。 **注意:tar -c 会创建一个归档文件,-f 要指出归档文件的名称和路径。要获取 tar 命令的帮助信息,可以在终端中输入 man tar。** @@ -230,7 +230,7 @@ LVM 获取快照的时候,会有一张和逻辑卷完全相同的照片,该 ![](http://cdn5.howtogeek.com/wp-content/uploads/2011/02/627x67xsnapshot-backup.png.pagespeed.ic.tw-2AK_lfZ.png) -记住备份发生的时候写到 lvstuff 的所有文件都会在我们之前创建的临时逻辑卷中被跟踪。确保备份的时候你有足够的空闲空间。 +记住备份时候写到 lvstuff 的所有文件都会在我们之前创建的临时逻辑卷中被跟踪。确保备份的时候你有足够的空闲空间。 备份完成后,卸载卷并移除临时快照。 @@ -259,10 +259,10 @@ LVM 获取快照的时候,会有一张和逻辑卷完全相同的照片,该 via: http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[1]:http://www.howtogeek.com/howto/36568/what-is-logical-volume-management-and-how-do-you-enable-it-in-ubuntu/ +[1]:https://linux.cn/article-5953-1.html [2]:http://www.howtogeek.com/howto/17001/how-to-format-a-usb-drive-in-ubuntu-using-gparted/ [3]:http://www.howtogeek.com/howto/33552/htg-explains-which-linux-file-system-should-you-choose/ \ No newline at end of file From 2d90d07755d4b8bcc6786007e1324fdb48f49f22 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 5 Aug 2015 00:06:26 +0800 Subject: [PATCH 1616/2517] PUB:20150128 7 communities driving open source development @FSSlc --- ...unities driving open source development.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {translated/talk => published}/20150128 7 communities driving open source development.md (58%) diff --git a/translated/talk/20150128 7 communities driving open source development.md b/published/20150128 7 communities driving open source development.md similarity index 58% rename from translated/talk/20150128 7 communities driving open source development.md rename to published/20150128 7 communities driving open source development.md index 2074ad9e23..1f4aac1a09 100644 --- a/translated/talk/20150128 7 communities driving open source development.md +++ b/published/20150128 7 communities driving open source development.md @@ -1,12 +1,12 @@ 7 个驱动开源发展的社区 ================================================================================ -不久前,开源模式还被成熟的工业厂商以怀疑的态度认作是叛逆小孩的玩物。如今,开放的倡议和基金会在一长列的供应商提供者的支持下正蓬勃发展,而他们将开源模式视作创新的关键。 +不久前,开源模式还被成熟的工业级厂商以怀疑的态度认作是叛逆小孩的玩物。如今,开源的促进会和基金会在一长列的供应商提供者的支持下正蓬勃发展,而他们将开源模式视作创新的关键。 ![](http://images.techhive.com/images/article/2015/01/0_opensource-title-100539095-orig.jpg) ### 技术的开放发展驱动着创新 ### -在过去的 20 几年间,技术的开放发展已被视作驱动创新的关键因素。即使那些以前将开源视作威胁的公司也开始接受这个观点 — 例如微软,如今它在一系列的开源倡议中表现活跃。到目前为止,大多数的开放发展都集中在软件方面,但甚至这个也正在改变,因为社区已经开始向开源硬件倡议方面聚拢。这里有 7 个成功地在硬件和软件方面同时促进和发展开源技术的组织。 +在过去的 20 几年间,技术的开源推进已被视作驱动创新的关键因素。即使那些以前将开源视作威胁的公司也开始接受这个观点 — 例如微软,如今它在一系列的开源的促进会中表现活跃。到目前为止,大多数的开源推进都集中在软件方面,但甚至这个也正在改变,因为社区已经开始向开源硬件倡议方面聚拢。这里介绍 7 个成功地在硬件和软件方面同时促进和发展开源技术的组织。 ### OpenPOWER 基金会 ### @@ -16,21 +16,21 @@ IBM 通过开放其基于 Power 架构的硬件和软件技术,向使用 Power IP 的独立硬件产品提供许可证等方式为基金会的建立播下种子。如今超过 70 个成员共同协作来为基于 Linux 的数据中心提供自定义的开放服务器,组件和硬件。 -今年四月,在比最新基于 x86 系统快 50 倍的数据分析能力的新的 POWER8 处理器的服务器的基础上, OpenPOWER 推出了一个技术路线图。七月, IBM 和 Google 发布了一个固件堆栈。十月见证了 NVIDIA GPU 带来加速 POWER8 系统的能力和来自 Tyan 的第一个 OpenPOWER 参考服务器。 +去年四月,在比最新基于 x86 系统快 50 倍的数据分析能力的新的 POWER8 处理器的服务器的基础上, OpenPOWER 推出了一个技术路线图。七月, IBM 和 Google 发布了一个固件堆栈。去年十月见证了 NVIDIA GPU 带来加速 POWER8 系统的能力和来自 Tyan 的第一个 OpenPOWER 参考服务器。 ### Linux 基金会 ### ![](http://images.techhive.com/images/article/2015/01/2_the-linux-foundation-100539101-orig.jpg) -于 2000 年建立的 [Linux 基金会][2] 如今成为掌控着历史上最大的开源协同发展成果,它有着超过 180 个合作成员和许多独立成员及学生成员。它赞助核心 Linux 开发者的工作并促进、保护和推进 Linux 操作系统和协作软件的开发。 +于 2000 年建立的 [Linux 基金会][2] 如今成为掌控着历史上最大的开源协同开发成果,它有着超过 180 个合作成员和许多独立成员及学生成员。它赞助 Linux 核心开发者的工作并促进、保护和推进 Linux 操作系统,并协调软件的协作开发。 -它最为成功的协作项目包括 Code Aurora Forum (一个拥有为移动无线产业服务的企业财团),MeeGo (一个为移动设备和 IVI (注:指的是车载消息娱乐设备,为 In-Vehicle Infotainment 的简称) 构建一个基于 Linux 内核的操作系统的项目) 和 Open Virtualization Alliance (开放虚拟化联盟,它促进自由和开源软件虚拟化解决方案的采用)。 +它最为成功的协作项目包括 Code Aurora Forum (一个拥有为移动无线产业服务的企业财团),MeeGo (一个为移动设备和 IVI [注:指的是车载消息娱乐设备,为 In-Vehicle Infotainment 的简称] 构建一个基于 Linux 内核的操作系统的项目) 和 Open Virtualization Alliance (开放虚拟化联盟,它促进自由和开源软件虚拟化解决方案的采用)。 ### 开放虚拟化联盟 ### ![](http://images.techhive.com/images/article/2015/01/3_open-virtualization-alliance-100539102-orig.jpg) -[开放虚拟化联盟(OVA)][3] 的存在目的为:通过提供使用案例和对具有互操作性的通用接口和 API 的发展提供支持,来促进自由、开源软件的虚拟化解决方案例如 KVM 的采用。KVM 将 Linux 内核转变为一个虚拟机管理程序。 +[开放虚拟化联盟(OVA)][3] 的存在目的为:通过提供使用案例和对具有互操作性的通用接口和 API 的发展提供支持,来促进自由、开源软件的虚拟化解决方案,例如 KVM 的采用。KVM 将 Linux 内核转变为一个虚拟机管理程序。 如今, KVM 已成为和 OpenStack 共同使用的最为常见的虚拟机管理程序。 @@ -40,31 +40,31 @@ IBM 通过开放其基于 Power 架构的硬件和软件技术,向使用 Power 原本作为一个 IaaS(基础设施即服务) 产品由 NASA 和 Rackspace 于 2010 年启动,[OpenStack 基金会][4] 已成为最大的开源项目聚居地之一。它拥有超过 200 家公司成员,其中包括 AT&T, AMD, Avaya, Canonical, Cisco, Dell 和 HP。 -大约以 6 个月为一个发行周期,基金会的 OpenStack 项目被发展用来通过一个基于 Web 的仪表盘,命令行工具或一个 RESTful 风格的 API 来控制或调配流经一个数据中心的处理存储池和网络资源。至今为止,基金会支持的协作发展已经孕育出了一系列 OpenStack 组件,其中包括 OpenStack Compute(一个云计算网络控制器,它是一个 IaaS 系统的主要部分),OpenStack Networking(一个用以管理网络和 IP 地址的系统) 和 OpenStack Object Storage(一个可扩展的冗余存储系统)。 +大约以 6 个月为一个发行周期,基金会的 OpenStack 项目开发用于通过一个基于 Web 的仪表盘,命令行工具或一个 RESTful 风格的 API 来控制或调配流经一个数据中心的处理存储池和网络资源。至今为止,基金会支持的协同开发已经孕育出了一系列 OpenStack 组件,其中包括 OpenStack Compute(一个云计算网络控制器,它是一个 IaaS 系统的主要部分),OpenStack Networking(一个用以管理网络和 IP 地址的系统) 和 OpenStack Object Storage(一个可扩展的冗余存储系统)。 ### OpenDaylight ### ![](http://images.techhive.com/images/article/2015/01/5_opendaylight-100539097-orig.jpg) -作为来自 Linux 基金会的另一个协作项目, [OpenDaylight][5] 是一个由诸如 Dell, HP, Oracle 和 Avaya 等行业厂商于 2013 年 4 月建立的联合倡议。它的任务是建立一个由社区主导,开放,有工业支持的针对 Software-Defined Networking (SDN) 的包含代码和蓝图的框架。其思路是提供一个可直接部署的全功能 SDN 平台,而不需要其他组件,供应商可提供附件组件和增强组件。 +作为来自 Linux 基金会的另一个协作项目, [OpenDaylight][5] 是一个由诸如 Dell, HP, Oracle 和 Avaya 等行业厂商于 2013 年 4 月建立的联合倡议。它的任务是建立一个由社区主导、开源、有工业支持的针对软件定义网络( SDN: Software-Defined Networking)的包含代码和蓝图的框架。其思路是提供一个可直接部署的全功能 SDN 平台,而不需要其他组件,供应商可提供附件组件和增强组件。 ### Apache 软件基金会 ### ![](http://images.techhive.com/images/article/2015/01/6_apache-software-foundation-100539098-orig.jpg) -[Apache 软件基金会 (ASF)][7] 是将近 150 个顶级项目的聚居地,这些项目涵盖从开源企业级自动化软件到与 Apache Hadoop 相关的分布式计算的整个生态系统。这些项目分发企业级、可免费获取的软件产品,而 Apache 协议则是为了让无论是商业用户还是个人用户更方便地部署 Apache 的产品。 +[Apache 软件基金会 (ASF)][7] 是将近 150 个顶级项目的聚居地,这些项目涵盖从开源的企业级自动化软件到与 Apache Hadoop 相关的分布式计算的整个生态系统。这些项目分发企业级、可免费获取的软件产品,而 Apache 协议则是为了让无论是商业用户还是个人用户更方便地部署 Apache 的产品。 -ASF 于 1999 年作为一个会员制,非盈利公司注册,其核心为精英 — 要成为它的成员,你必须首先在基金会的一个或多个协作项目中做出积极贡献。 +ASF 是 1999 年成立的一个会员制,非盈利公司,以精英为其核心 — 要成为它的成员,你必须首先在基金会的一个或多个协作项目中做出积极贡献。 ### 开放计算项目 ### ![](http://images.techhive.com/images/article/2015/01/7_open-compute-project-100539099-orig.jpg) -作为 Facebook 重新设计其 Oregon 数据中心的副产物, [开放计算项目][7] 旨在发展针对数据中心的开放硬件解决方案。 OCP 是一个由廉价、无浪费的服务器,针对 Open Rack(为数据中心设计的机架标准,来让机架集成到数据中心的基础设施中) 的模块化 I/O 存储和一个相对 "绿色" 的数据中心设计方案等构成。 +作为 Facebook 重新设计其 Oregon 数据中心的副产物, [开放计算项目][7] 旨在发展针对数据中心的开源硬件解决方案。 OCP 是一个由廉价无浪费的服务器、针对 Open Rack(为数据中心设计的机架标准,来让机架集成到数据中心的基础设施中) 的模块化 I/O 存储和一个相对 "绿色" 的数据中心设计方案等构成。 OCP 董事会成员包括来自 Facebook,Intel,Goldman Sachs,Rackspace 和 Microsoft 的代表。 -OCP 最近宣布了许可证的两个选择: 一个类似 Apache 2.0 的允许衍生工作的许可证和一个更规范的鼓励回滚到原有软件的更改的许可证。 +OCP 最近宣布了有两种可选的许可证: 一个类似 Apache 2.0 的允许衍生工作的许可证,和一个更规范的鼓励将更改回馈到原有软件的许可证。 -------------------------------------------------------------------------------- @@ -72,7 +72,7 @@ via: http://www.networkworld.com/article/2866074/opensource-subnet/7-communities 作者:[Thor Olavsrud][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 77b1de1f10b9e5d07426da4163dd6b57197078ee Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 5 Aug 2015 07:42:36 +0800 Subject: [PATCH 1617/2517] Update 20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md --- ...LVM on Ubuntu for Easy Partition Resizing and Snapshots.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md b/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md index 883c5e3203..2cb09193b6 100644 --- a/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md +++ b/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md @@ -1,4 +1,4 @@ - +Translating by GOLinux! How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots ================================================================================ ![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035707bbd74.png.pagespeed.ic.9_yebxUF1C.png) @@ -65,4 +65,4 @@ via: http://www.howtogeek.com/211937/how-to-use-lvm-on-ubuntu-for-easy-partition [3]:http://www.howtogeek.com/114503/how-to-resize-your-ubuntu-partitions/ [4]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ [5]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ -[6]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ \ No newline at end of file +[6]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ From d8b9908e0f63f78c4156bedc13c45698bd21f205 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Wed, 5 Aug 2015 08:29:58 +0800 Subject: [PATCH 1618/2517] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=96=87?= =?UTF-8?q?=20=20XLCYun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Right & Wrong - Page 4 - GNOME Settings.md | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md diff --git a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md deleted file mode 100644 index bf233ce5d3..0000000000 --- a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md +++ /dev/null @@ -1,52 +0,0 @@ -Translating by XLCYun. -A Week With GNOME As My Linux Desktop: What They Get Right & Wrong - Page 4 - GNOME Settings -================================================================================ -### Settings ### - -There are a few specific KDE Control modules that I am going to pick at, mostly because they are so laughable horrible compared to their gnome counter-part that its honestly pathetic. - -First one up? Printers. - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers1_show&w=1920) - -Gnome is on the left, KDE is on the right. You know what the difference is between the printer applet on the left, and the one on the right? When I opened up Gnome Control Center and hit "Printers" the applet popped up and nothing happened. When I opened up KDE System Settings and hit "Printers" I got a password prompt. Before I was even allowed to LOOK at the printers I had to give up ROOT'S password. - -Let me just re-iterate that. In this, the days of PolicyKit and Logind, I am still being asked for Root's password for what should be a sudo operation. I didn't even SETUP root's password when I installed the system. I had to drop down to Konsole and run 'sudo passwd root' so that I could GIVE root a password so that I could go back into System Setting's printer applet and then give up root's password to even LOOK at what printers were available. Once I did that I got prompted for root's password AGAIN when I hit "Add Printer" then I got prompted for root's password AGAIN after I went through and selected a printer and driver. Three times I got asked for ROOT'S password just to add a printer to the system. - -When I added a printer under Gnome I didn't get prompted for my SUDO password until I hit "Unlock" in the printer applet. I got asked once, then I never got asked again. KDE, I am begging you... Adopt Gnome's "Unlock" methodology. Do not prompt for a password until you really need one. Furthermore, whatever library is out there that allows for KDE applications to bypass PolicyKit / Logind (if its available) and prompt directly for root... Bin that code. If this was a multi-user system I either have to give up root's password, or be there every second of every day in order to put it in any time a user might have to update, change, or add a new printer. Both options are completely unacceptable. - -One more thing... - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers2_show&w=1920) - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers3_show&w=1920) - -Question to the forums: What looks cleaner to you? I had this realization when I was writing this article: Gnome's applet makes it very clear where any additional printers are going to go, they set aside a column on the left to list them. Before I added a second printer to KDE, and it suddenly grew a left side column, I had this nightmare-image in my head of the applet just shoving another icon into the screen and them being listed out like preview images in a folder of pictures. I was pleasantly surprised to see that I was wrong but the fact that the applet just 'grew' another column that didn't exist before and drastically altered its presentation is not really 'good' either. It's a design that's confusing, shocking, and non-intuitive. - -Enough about printers though... Next KDE System Setting that is up for my public stoning? Multimedia, Aka Phonon. - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_sound_show&w=1920) - -As always, Gnome's on the left, KDE is on the right. Let's just run through the Gnome setting first... The eyes go left to right, top to bottom, right? So let's do the same. First up: volume control slider. The blue hint against the empty bar with 100% clearly marked removes all confusion about which way is "volume up." Immediately after the slider is an easy On/Off toggle that functions a mute on/off. Points to Gnome for remembering what the volume was set to BEFORE I muted sound, and returning to that same level AFTER I press volume-up to un-mute. Kmixer, you amnesiac piece of crap, I wish I could say as much about you. - -Moving on! Tabbed options for Output, Input and Applications? With per application volume controls within easy reach? Gnome I love you more and more with every passing second. Balance options, sound profiles, and a clearly marked "Test Speakers" option. - -I'm not sure how this could have been implemented in a cleaner, more concise way. Yes, it's just a Gnome-ized Pavucontrol but I think that's the point. Pavucontrol got it mostly right to begin with, the Sound applet in Gnome Control Center just refines it slightly to make it even closer to perfect. - -Phonon, you're up. And let me start by saying: What the fsck am I looking at? -I- get that I am looking at the priority list for the audio devices on the system, but the way it is presented is a bit of a nightmare. Also where are the things the user probably cares about? A priority list is a great thing to have, it SHOULD be available, but it's something the user messes with once or twice and then never touches again. It's not important, or common, enough to warrant being front and center. Where's the volume slider? Where's per application controls? The things that users will be using more frequently? Well.. those are under Kmix, a separate program, with its own settings and configuration... not under the System Settings... which kind of makes System Settings a bit of a misnomer. And in that same vein, Let's hop over to network settings. - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_network_show&w=1920) - -Presented above is the Gnome Network Settings. KDE's isn't included because of the reason I'm about to hit on. If you go to KDE's System Settings and hit any of the three options under the "Network" Section you get tons of options: Bluetooth settings, default username and password for Samba shares (Seriously, "Connectivity" only has 2 options: Username and password for SMB shares. How the fsck does THAT deserve the all-inclusive title "Connectivity"?), controls for Browser Identification (which only work for Konqueror...a dead project), proxy settings, etc... Where's my wifi settings? They aren't there. Where are they? Well, they are in the network applet's private settings... not under Network Settings... - -KDE, you're killing me. You have "System Settings" USE IT! - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=4 - -作者:Eric Griffith -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 67e1d8db380b6fdbd959f30e473853725945904c Mon Sep 17 00:00:00 2001 From: XLCYun Date: Wed, 5 Aug 2015 08:36:39 +0800 Subject: [PATCH 1619/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=20=E7=AC=AC=E5=9B=9B=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Right & Wrong - Page 4 - GNOME Settings.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md new file mode 100644 index 0000000000..1c0cc4bd86 --- /dev/null +++ b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md @@ -0,0 +1,54 @@ +将GNOME作为我的Linux桌面的一周: 他们做对的与做错的 - 第四节 - GNOME设置 +================================================================================ +### Settings设置 ### + +在这我要挑一挑几个特定KDE控制模块的毛病,大部分原因是因为相比它们的对手GNOME来说,糟糕得太可笑,实话说,真是悲哀。 + +第一个接招的?打印机。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers1_show&w=1920) + +GNOME在左,KDE在右。你知道左边跟右边的打印程序有什么区别吗?当我在GNOME控制中心打开“打印机”时,程序窗口弹出来了,之后没有也没发生。而当我在KDE系统设置打开“打印机”时,我收到了一条密码提示。甚至我都没能看一眼打印机呢,我就必须先交出ROOT密码。 + +让我再重复一遍。在今天,PolicyKit和Logind的日子里,对一个应该是sudo的操作,我依然被询问要求ROOT的密码。我安装系统的时候甚至都没设置root密码。所以我必须跑到Konsole去,然后运行'sudo passwd root'命令,这样我才能给root设一个密码,这样我才能回到系统设置中的打印程序,然后交出root密码,然后仅仅是看一看哪些打印机可用。完成了这些工作后,当我点击“添加打印机”时,我再次收到请求ROOT密码的提示,当我解决了它后再选择一个打印机和驱动时,我再次收到请求ROOT密码的提示。仅仅是为了添加一个打印机到系统我就收到三次密码请求。 + +而在GNOME下添加打印机,在点击打印机程序中的”解锁“之前,我没有收到任何请求SUDO密码的提示。整个过程我只被请求过一次,仅此而已。KDE,求你了……采用GNOME的”解锁“模式吧。不到一定需要的时候不要发出提示。还有,不管是哪个库,只要它允许KDE应用程序绕过PolicyKit/Logind(如果有的话)并直接请求ROOT权限……那就把它封进箱里吧。如果这是个多用户系统,那我要么必须交出ROOT密码,要么我必须时时刻刻呆着以免有一个用户需要升级、更改或添加一个新的打印机。而这两种情况都是完全无法接受的。 + +有还一件事…… + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers2_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers3_show&w=1920) + +给论坛的问题:怎么样看起来更简洁?我在写这篇文章时意识到:当有任何的附加打印机准备好时,Gnome打印机程序会把过程做得非常简洁,它们在左边上放了一个竖直栏来列出这些打印机。而我在KDE添加第二台打印机时,它突然增加出一个左边栏来。而在添加之前,我脑海中已经有了一个恐怖的画面它会像图片文件夹显示预览图一样,直接插入另外一个图标到界面里去。我很高兴也很惊讶的看到我是错的。但是事实是它直接”长出”另外一个从末存在的竖直栏,彻底改变了它的界面布局,而这样也称不上“好”。终究还是一种令人困惑,奇怪而又不直观的设计。 + +打印机说得够多了……下一个接受我公开石刑的KDE系统设置是?多媒体,即Phonon。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_sound_show&w=1920) + +一如既往,GNOME在左边,KDE在右边。让我们先看看GNOME的系统设置先……眼睛从左到右,从上到下,对吧?来吧,就这样做。首先:音量控制滑条。滑条中的蓝色条与空白条百分百清晰地消除了哪边是“音量增加”的困惑。在音量控制条后马上就是一个On/Off开关,用来开关静音功能。Gnome的再次得分在于静音后能记住当前设置的音量,而在点击音量增加按钮取消静音后能回到原来设置的音量中来。Kmixer,你个健忘的垃圾,我真的希望我能多讨论你。 + + +继续!输入输出和应用程序的标签选项?每一个应用程序的音量随时可控?Gnome,每过一秒,我爱你越深。均衡的选项设置,声音配置,和清晰地标上标志的“测试麦克风”选项。 + + + +我不清楚它能否以一种更干净更简洁的设计实现。是的,它只是一个Gnome化的Pavucontrol,但我想这就是重要的地方。Pavucontrol在这方面几乎完全做对了,Gnome控制中心中的“声音”应用程序的改善使它向完美更进了一步。 + +Phonon,该你上了。但开始前我想说:我TM看到的是什么?我知道我看到的是音频设备的权限列表,但是它呈现的方式有点太坑。还有,那些用户可能关心的那些东西哪去了?拥有一个权限列表当然很好,它也应该存在,但问题是权限列表属于那种用户乱搞一两次之后就不会再碰的东西。它还不够重要,或者说常用到可以直接放在正中间位置的程度。音量控制滑块呢?对每个应用程序的音量控制功能呢?那些用户使用最频繁的东西呢?好吧,它们在Kmix中,一个分离的程序,拥有它自己的配置选项……而不是在系统设置下……这样真的让“系统设置”这个词变得有点用词不当。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_network_show&w=1920) + +上面展示的Gnome的网络设置。KDE的没有展示,原因就是我接下来要吐槽的内容了。如果你进入KDE的系统设置里,然后点击“网络”区域中三个选项中的任何一个,你会得到一大堆的选项:蓝牙设置,Samba分享的默认用户名和密码(说真的,“连通性(Connectivity)”下面只有两个选项:SMB的用户名和密码。TMD怎么就配得上“连通性”这么大的词?),浏览器身份验证控制(只有Konqueror能用……一个已经倒闭的项目),代理设置,等等……我的wifi设置哪去了?它们没在这。哪去了?好吧,它们在网络应用程序的设置里面……而不是在网络设置里…… + +KDE,你这是要杀了我啊,你有“系统设置”当凶器,拿着它动手吧! + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=4 + +作者:Eric Griffith +译者:[XLCYun](https://github.com/XLCYun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From e9411c42a3eeead7b498a8950f1625bcbb326c5b Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 5 Aug 2015 09:04:29 +0800 Subject: [PATCH 1620/2517] [Translated]201150318How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md --- ...r Easy Partition Resizing and Snapshots.md | 68 ------------------- ...r Easy Partition Resizing and Snapshots.md | 67 ++++++++++++++++++ 2 files changed, 67 insertions(+), 68 deletions(-) delete mode 100644 sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md create mode 100644 translated/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md diff --git a/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md b/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md deleted file mode 100644 index 2cb09193b6..0000000000 --- a/sources/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md +++ /dev/null @@ -1,68 +0,0 @@ -Translating by GOLinux! -How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots -================================================================================ -![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035707bbd74.png.pagespeed.ic.9_yebxUF1C.png) - -Ubuntu’s installer offers an easy “Use LVM” checkbox. The description says it enables Logical Volume Management so you can take snapshots and more easily resize your hard disk partitions — here’s how to do that. - -LVM is a technology that’s similar to [RAID arrays][1] or [Storage Spaces on Windows][2] in some ways. While this technology is particularly useful on servers, it can be used on desktop PCs, too. - -### Should You Use LVM With Your New Ubuntu Installation? ### - -The first question is whether you even want to use LVM with your Ubuntu installation. Ubuntu makes this easy to enable with a quick click, but this option isn’t enabled by default. As the installer says, this allows you to resize partitions, create snapshots, merge multiple disks into a single logical volume, and so on — all while the system is running. Unlike with typical partitions, you don’t have to shut down your system, boot from a live CD or USB drive, and [resize your partitions while they aren’t in use][3]. - -To be perfectly honest, the average Ubuntu desktop user probably won’t realize whether they’re using LVM or not. But, if you want to do more advanced things later, LVM can help. LVM is potentially more complex, which could cause problems if you need to recover your data later — especially if you’re not that experienced with it. There shouldn’t be a noticeable performance penalty here — LVM is implemented right down in the Linux kernel. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035cbada6ae.png.pagespeed.ic.cnqyiKfCvi.png) - -### Logical Volume Management Explained ### - -We’re previously [explained what LVM is][4]. In a nutshell, it provides a layer of abstraction between your physical disks and the partitions presented to your operating system. For example, your computer might have two hard drives inside it, each 1 TB in size. You’d have to have at least two partitions on these disks, and each of these partitions would be 1 TB in size. - -LVM provides a layer of abstraction over this. Instead of the traditional partition on a disk, LVM would treat the disks as two separate “physical volumes” after you initialize them. You could then create “logical volumes” based on these physical volumes. For example, you could combine those two 1 TB disks into a single 2 TB partition. Your operating system would just see a 2 TB volume, and LVM would deal with everything in the background. A group of physical volumes and logical volumes is known as a “volume group.” A typical system will just have a single volume group. - -This layer of abstraction makes it possibly to easily resize partitions, combine multiple disks into a single volume, and even take “snapshots” of a partition’s file system while it’s running, all without unmounting it. - -Note that merging multiple disks into a single volume can be a bad idea if you’re not creating backups. It’s like with RAID 0 — if you combine two 1 TB volumes into a single 2 TB volume, you could lose important data on the volume if just one of your hard disks fails. Backups are crucial if you go this route. - -### Graphical Utilities for Managing Your LVM Volumes ### - -Traditionally, [LVM volumes are managed with Linux terminal commands][5].These will work for you on Ubuntu, but there’s an easier, graphical method anyone can take advantage of. If you’re a Linux user used to using GParted or a similar partition manager, don’t bother — GParted doesn’t have support for LVM disks. - -Instead, you can use the Disks utility included along with Ubuntu for this. This utility is also known as GNOME Disk Utility, or Palimpsest. Launch it by clicking the icon on the dash, searching for Disks, and pressing Enter. Unlike GParted, the Disks utility will display your LVM partitions under “Other Devices,” so you can format them and adjust other options if you need to. This utility will also work from a live CD or USB drive, too. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550361b3772f7.png.pagespeed.ic.nZWwLJUywR.png) - -Unfortunately, the Disks utility doesn’t include support for taking advantage of LVM’s most powerful features. There’s no options for managing your volume groups, extending partitions, or taking snapshots. You could do that from the terminal, but you don’t have to. Instead, you can open the Ubuntu Software Center, search for LVM, and install the Logical Volume Management tool. You could also just run the **sudo apt-get install system-config-lvm** command in a terminal window. After it’s installed, you can open the Logical Volume Management utility from the dash. - -This graphical configuration tool was made by Red Hat. It’s a bit dated, but it’s the only graphical way to do this stuff without resorting to terminal commands. - -Let’s say you wanted to add a new physical volume to your volume group. You’d open the tool, select the new disk under Uninitialized Entries, and click the “Initialize Entry” button. You’d then find the new physical volume under Unallocated Volumes, and you could use the “Add to existing Volume Group” button to add it to the “ubuntu-vg” volume group Ubuntu created during the installation process. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363106789c.png.pagespeed.ic.drVInt3Weq.png) - -The volume group view shows you a visual overview of your physical volumes and logical volumes. Here, we have two physical partitions across two separate hard drives. We have a swap partition and a root partition, just as Ubuntu sets up its partitioning scheme by default. Because we’ve added a second physical partition from another drive, there’s now a good chunk of unused space. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363f631c19.png.pagespeed.ic.54E_Owcq8y.png) - -To expand a logical partition into the physical space, you could select it under Logical View, click Edit Properties, and modify the size to grow the partition. You could also shrink it from here. - -![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55036893712d3.png.pagespeed.ic.ce7y_Mt0uF.png) - -The other options in system-config-lvm allow you to set up snapshots and mirroring. You probably won’t need these features on a typical desktop, but they’re available graphically here. Remember, you can also [do all of this with terminal commands][6]. - --------------------------------------------------------------------------------- - -via: http://www.howtogeek.com/211937/how-to-use-lvm-on-ubuntu-for-easy-partition-resizing-and-snapshots/ - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.howtogeek.com/162676/how-to-use-multiple-disks-intelligently-an-introduction-to-raid/ -[2]:http://www.howtogeek.com/109380/how-to-use-windows-8s-storage-spaces-to-mirror-combine-drives/ -[3]:http://www.howtogeek.com/114503/how-to-resize-your-ubuntu-partitions/ -[4]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ -[5]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ -[6]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ diff --git a/translated/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md b/translated/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md new file mode 100644 index 0000000000..2e66e27f31 --- /dev/null +++ b/translated/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md @@ -0,0 +1,67 @@ +Ubuntu上使用LVM轻松调整分区并制作快照 +================================================================================ +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035707bbd74.png.pagespeed.ic.9_yebxUF1C.png) + +Ubuntu的安装器提供了一个轻松“使用LVM”的复选框。说明中说,它启用了逻辑卷管理,因此你可以制作快照,并更容易地调整硬盘分区大小——这里将为大家讲述如何完成这些操作。 + +LVM是一种技术,某种程度上和[RAID阵列][1]或[Windows上的存储空间][2]类似。虽然该技术在服务器上更为有用,但是它也可以在桌面端PC上使用。 + +### 你应该在新安装Ubuntu时使用LVM吗? ### + +第一个问题是,你是否想要在安装Ubuntu时使用LVM?如果是,那么Ubuntu让这一切变得很简单,只需要轻点鼠标就可以完成,但是该选项默认是不启用的。正如安装器所说的,它允许你调整分区、创建快照、合并多个磁盘到一个逻辑卷等等——所有这一切都可以在系统运行时完成。不同于传统分区,你不需要关掉你的系统,从Live CD或USB驱动,然后[调整这些不使用的分区][3]。 + +完全坦率地说,普通Ubuntu桌面用户可能不会意识到他们是否正在使用LVM。但是,如果你想要在今后做一些更高深的事情,那么LVM就会有所帮助了。LVM可能更复杂,可能会在你今后恢复数据时会导致问题——尤其是在你经验不足时。这里不会有显著的性能损失——LVM是彻底地在Linux内核中实现的。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035cbada6ae.png.pagespeed.ic.cnqyiKfCvi.png) + +### 逻辑卷管理说明 ### + +前面,我们已经[说明了何谓LVM][4]。概括来讲,它在你的物理磁盘和呈现在你系统中的分区之间提供了一个抽象层。例如,你的计算机可能装有两个硬盘驱动器,它们的大小都是 1 TB。你必须得在这些磁盘上至少分两个区,每个区大小 1 TB。 + +LVM就在这些分区上提供了一个抽象层。用于取代磁盘上的传统分区,LVM将在你对这些磁盘初始化后,将它们当作独立的“物理卷”来对待。然后,你就可以基于这些物理卷创建“逻辑卷”。例如,你可以将这两个 1 TB 的磁盘组合成一个 2 TB 的分区,你的系统将只看到一个 2 TB 的卷,而LVM将会在后台处理这一切。一组物理卷以及一组逻辑卷被称之为“卷组”,一个标准的系统只会有一个卷组。 + +该抽象层使得调整分区、将多个磁盘组合成单个卷、甚至为一个运行着的分区的文件系统创建“快照”变得十分简单,而完成所有这一切都无需先卸载分区。 + +注意,如果你没有创建备份,那么将多个磁盘合并成一个卷将会是个糟糕的想法。它就像RAID 0——如果你将两个 1 TB 的卷组合成一个 2 TB 的卷,只要其中一个硬盘失败,你将丢失该卷上的重要数据。所以,如果你要走这条路,那么备份就及其重要。 + +### 管理LVM卷的图形化工具 ### + +通常,[LVM通过Linux终端命令来管理][5]。这在Ubuntu上也行得通,但是有个更简单的图形化方法可供大家采用。如果你是一个Linux用户,对GParted或者与其类似的分区管理器熟悉,算了,别瞎掰了——GParted根本不支持LVM磁盘。 + +然而,你可以使用Ubuntu附带的磁盘工具。该工具也被称之为GNOME磁盘工具,或者叫Palimpsest。点击停靠盘上的图标来开启它吧,搜索磁盘然后敲击回车。不像GParted,该磁盘工具将会在“其它设备”下显示LVM分区,因此你可以根据需要格式化这些分区,也可以调整其它选项。该工具在Live CD或USB 驱动下也可以使用。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550361b3772f7.png.pagespeed.ic.nZWwLJUywR.png) + +不幸的是,该磁盘工具不支持LVM的大多数强大的特性,没有管理卷组、扩展分区,或者创建快照等选项。对于这些操作,你可以通过终端来实现,但是你没有那个必要。相反,你可以打开Ubuntu软件中心,搜索关键字LVM,然后安装逻辑卷管理工具,你可以在终端窗口中运行**sudo apt-get install system-config-lvm**命令来安装它。安装完之后,你就可以从停靠盘上打开逻辑卷管理工具了。 + +这个图形化配置工具是由红帽公司开发的,虽然有点陈旧了,但却是唯一的图形化方式,你可以通过它来完成上述操作,将那些终端命令抛诸脑后了。 + +比如说,你想要添加一个新的物理卷到卷组中。你可以打开该工具,选择未初始化条目下的新磁盘,然后点击“初始化条目”按钮。然后,你就可以在未分配卷下找到新的物理卷了,你可以使用“添加到现存卷组”按钮来将它添加到“ubuntu-vg”卷组,这是Ubuntu在安装过程中创建的卷组。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363106789c.png.pagespeed.ic.drVInt3Weq.png) + +卷组视图会列出你所有物理卷和逻辑卷的总览。这里,我们有两个横跨两个独立硬盘驱动器的物理分区,我们有一个交换分区和一个根分区,就像Ubuntu默认设置的分区图表。由于我们从另一个驱动器添加了第二个物理分区,现在那里有大量未使用空间。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363f631c19.png.pagespeed.ic.54E_Owcq8y.png) + +要扩展逻辑分区到物理空间,你可以在逻辑视图下选择它,点击编辑属性,然后修改大小来扩大分区。你也可以在这里缩减分区。 + +![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55036893712d3.png.pagespeed.ic.ce7y_Mt0uF.png) + +system-config-lvm的其它选项允许你设置快照和镜像。对于传统桌面而言,你或许不需要这些特性,但是在这里也可以通过图形化处理。记住,你也可以[使用终端命令完成这一切][6]。 + +-------------------------------------------------------------------------------- + +via: http://www.howtogeek.com/211937/how-to-use-lvm-on-ubuntu-for-easy-partition-resizing-and-snapshots/ + +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.howtogeek.com/162676/how-to-use-multiple-disks-intelligently-an-introduction-to-raid/ +[2]:http://www.howtogeek.com/109380/how-to-use-windows-8s-storage-spaces-to-mirror-combine-drives/ +[3]:http://www.howtogeek.com/114503/how-to-resize-your-ubuntu-partitions/ +[4]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ +[5]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ +[6]:http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ From c9ee20d2d32beefb6ae69c12d2ae696ce352213b Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 5 Aug 2015 13:38:18 +0800 Subject: [PATCH 1621/2517] Delete 20150717 How to monitor NGINX- Part 1.md --- .../20150717 How to monitor NGINX- Part 1.md | 409 ------------------ 1 file changed, 409 deletions(-) delete mode 100644 sources/tech/20150717 How to monitor NGINX- Part 1.md diff --git a/sources/tech/20150717 How to monitor NGINX- Part 1.md b/sources/tech/20150717 How to monitor NGINX- Part 1.md deleted file mode 100644 index 690ab192ba..0000000000 --- a/sources/tech/20150717 How to monitor NGINX- Part 1.md +++ /dev/null @@ -1,409 +0,0 @@ -translation by strugglingyouth -How to monitor NGINX - Part 1 -================================================================================ -![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_1.png) - -### What is NGINX? ### - -[NGINX][1] (pronounced “engine X”) is a popular HTTP server and reverse proxy server. As an HTTP server, NGINX serves static content very efficiently and reliably, using relatively little memory. As a [reverse proxy][2], it can be used as a single, controlled point of access for multiple back-end servers or for additional applications such as caching and load balancing. NGINX is available as a free, open-source product or in a more full-featured, commercially distributed version called NGINX Plus. - -NGINX can also be used as a mail proxy and a generic TCP proxy, but this article does not directly address NGINX monitoring for these use cases. - -### Key NGINX metrics ### - -By monitoring NGINX you can catch two categories of issues: resource issues within NGINX itself, and also problems developing elsewhere in your web infrastructure. Some of the metrics most NGINX users will benefit from monitoring include **requests per second**, which provides a high-level view of combined end-user activity; **server error rate**, which indicates how often your servers are failing to process seemingly valid requests; and **request processing time**, which describes how long your servers are taking to process client requests (and which can point to slowdowns or other problems in your environment). - -More generally, there are at least three key categories of metrics to watch: - -- Basic activity metrics -- Error metrics -- Performance metrics - -Below we’ll break down a few of the most important NGINX metrics in each category, as well as metrics for a fairly common use case that deserves special mention: using NGINX Plus for reverse proxying. We will also describe how you can monitor all of these metrics with your graphing or monitoring tools of choice. - -This article references metric terminology [introduced in our Monitoring 101 series][3], which provides a framework for metric collection and alerting. - -#### Basic activity metrics #### - -Whatever your NGINX use case, you will no doubt want to monitor how many client requests your servers are receiving and how those requests are being processed. - -NGINX Plus can report basic activity metrics exactly like open-source NGINX, but it also provides a secondary module that reports metrics slightly differently. We discuss open-source NGINX first, then the additional reporting capabilities provided by NGINX Plus. - -**NGINX** - -The diagram below shows the lifecycle of a client connection and how the open-source version of NGINX collects metrics during a connection. - -![connection, request states](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_connection_diagram-2.png) - -Accepts, handled, and requests are ever-increasing counters. Active, waiting, reading, and writing grow and shrink with request volume. - -注:表格 -
Plex Home Media ServerPlex Media Server
Base Operating System基础操作系统 Ubuntu 15.04 / CentOS 7.1 / Fedora 22 Work Station
Version 0.9.12.3.1173-937aac3
RAM and CPURAM 和 CPU 1 GB  , 2.0 GHZ
Hard Disk硬盘 30 GB
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionMetric type
acceptsCount of client connections attempted by NGINXResource: Utilization
handledCount of successful client connectionsResource: Utilization
activeCurrently active client connectionsResource: Utilization
dropped (calculated)Count of dropped connections (accepts – handled)Work: Errors*
requestsCount of client requestsWork: Throughput
*Strictly speaking, dropped connections is a metric of resource saturation, but since saturation causes NGINX to stop servicing some work (rather than queuing it up for later), “dropped” is best thought of as a work metric.
- -The **accepts** counter is incremented when an NGINX worker picks up a request for a connection from the OS, whereas **handled** is incremented when the worker actually gets a connection for the request (by establishing a new connection or reusing an open one). These two counts are usually the same—any divergence indicates that connections are being **dropped**, often because a resource limit, such as NGINX’s [worker_connections][4] limit, has been reached. - -Once NGINX successfully handles a connection, the connection moves to an **active** state, where it remains as client requests are processed: - -Active state - -- **Waiting**: An active connection may also be in a Waiting substate if there is no active request at the moment. New connections can bypass this state and move directly to Reading, most commonly when using “accept filter” or “deferred accept”, in which case NGINX does not receive notice of work until it has enough data to begin working on the response. Connections will also be in the Waiting state after sending a response if the connection is set to keep-alive. -- **Reading**: When a request is received, the connection moves out of the waiting state, and the request itself is counted as Reading. In this state NGINX is reading a client request header. Request headers are lightweight, so this is usually a fast operation. -- **Writing**: After the request is read, it is counted as Writing, and remains in that state until a response is returned to the client. That means that the request is Writing while NGINX is waiting for results from upstream systems (systems “behind” NGINX), and while NGINX is operating on the response. Requests will often spend the majority of their time in the Writing state. - -Often a connection will only support one request at a time. In this case, the number of Active connections == Waiting connections + Reading requests + Writing requests. However, the newer SPDY and HTTP/2 protocols allow multiple concurrent requests/responses to be multiplexed over a connection, so Active may be less than the sum of Waiting, Reading, and Writing. (As of this writing, NGINX does not support HTTP/2, but expects to add support during 2015.) - -**NGINX Plus** - -As mentioned above, all of open-source NGINX’s metrics are available within NGINX Plus, but Plus can also report additional metrics. The section covers the metrics that are only available from NGINX Plus. - -![connection, request states](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_plus_connection_diagram-2.png) - -Accepted, dropped, and total are ever-increasing counters. Active, idle, and current track the current number of connections or requests in each of those states, so they grow and shrink with request volume. - -注:表格 - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionMetric type
acceptedCount of client connections attempted by NGINXResource: Utilization
droppedCount of dropped connectionsWork: Errors*
activeCurrently active client connectionsResource: Utilization
idleClient connections with zero current requestsResource: Utilization
totalCount of client requestsWork: Throughput
*Strictly speaking, dropped connections is a metric of resource saturation, but since saturation causes NGINX to stop servicing some work (rather than queuing it up for later), “dropped” is best thought of as a work metric.
- -The **accepted** counter is incremented when an NGINX Plus worker picks up a request for a connection from the OS. If the worker fails to get a connection for the request (by establishing a new connection or reusing an open one), then the connection is dropped and **dropped** is incremented. Ordinarily connections are dropped because a resource limit, such as NGINX Plus’s [worker_connections][4] limit, has been reached. - -**Active** and **idle** are the same as “active” and “waiting” states in open-source NGINX as described [above][5], with one key exception: in open-source NGINX, “waiting” falls under the “active” umbrella, whereas in NGINX Plus “idle” connections are excluded from the “active” count. **Current** is the same as the combined “reading + writing” states in open-source NGINX. - -**Total** is a cumulative count of client requests. Note that a single client connection can involve multiple requests, so this number may be significantly larger than the cumulative number of connections. In fact, (total / accepted) yields the average number of requests per connection. - -**Metric differences between Open-Source and Plus** - -注:表格 - --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NGINX (open-source)NGINX Plus
acceptsaccepted
dropped must be calculateddropped is reported directly
reading + writingcurrent
waitingidle
active (includes “waiting” states)active (excludes “idle” states)
requeststotal
- -**Metric to alert on: Dropped connections** - -The number of connections that have been dropped is equal to the difference between accepts and handled (NGINX) or is exposed directly as a standard metric (NGINX Plus). Under normal circumstances, dropped connections should be zero. If your rate of dropped connections per unit time starts to rise, look for possible resource saturation. - -![Dropped connections](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/dropped_connections.png) - -**Metric to alert on: Requests per second** - -Sampling your request data (**requests** in open-source, or **total** in Plus) with a fixed time interval provides you with the number of requests you’re receiving per unit of time—often minutes or seconds. Monitoring this metric can alert you to spikes in incoming web traffic, whether legitimate or nefarious, or sudden drops, which are usually indicative of problems. A drastic change in requests per second can alert you to problems brewing somewhere in your environment, even if it cannot tell you exactly where those problems lie. Note that all requests are counted the same, regardless of their URLs. - -![Requests per second](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/requests_per_sec.png) - -**Collecting activity metrics** - -Open-source NGINX exposes these basic server metrics on a simple status page. Because the status information is displayed in a standardized form, virtually any graphing or monitoring tool can be configured to parse the relevant data for analysis, visualization, or alerting. NGINX Plus provides a JSON feed with much richer data. Read the companion post on [NGINX metrics collection][6] for instructions on enabling metrics collection. - -#### Error metrics #### - -注:表格 - ----- - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionMetric typeAvailability
4xx codesCount of client errorsWork: ErrorsNGINX logs, NGINX Plus
5xx codesCount of server errorsWork: ErrorsNGINX logs, NGINX Plus
- -NGINX error metrics tell you how often your servers are returning errors instead of producing useful work. Client errors are represented by 4xx status codes, server errors with 5xx status codes. - -**Metric to alert on: Server error rate** - -Your server error rate is equal to the number of 5xx errors divided by the total number of [status codes][7] (1xx, 2xx, 3xx, 4xx, 5xx), per unit of time (often one to five minutes). If your error rate starts to climb over time, investigation may be in order. If it spikes suddenly, urgent action may be required, as clients are likely to report errors to the end user. - -![Server error rate](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/5xx_rate.png) - -A note on client errors: while it is tempting to monitor 4xx, there is limited information you can derive from that metric since it measures client behavior without offering any insight into particular URLs. In other words, a change in 4xx could be noise, e.g. web scanners blindly looking for vulnerabilities. - -**Collecting error metrics** - -Although open-source NGINX does not make error rates immediately available for monitoring, there are at least two ways to capture that information: - -- Use the expanded status module available with commercially supported NGINX Plus -- Configure NGINX’s log module to write response codes in access logs - -Read the companion post on NGINX metrics collection for detailed instructions on both approaches. - -#### Performance metrics #### - -注:表格 - ----- - - - - - - - - - - - - - - - - -
NameDescriptionMetric typeAvailability
request timeTime to process each request, in secondsWork: PerformanceNGINX logs
- -**Metric to alert on: Request processing time** - -The request time metric logged by NGINX records the processing time for each request, from the reading of the first client bytes to fulfilling the request. Long response times can point to problems upstream. - -**Collecting processing time metrics** - -NGINX and NGINX Plus users can capture data on processing time by adding the $request_time variable to the access log format. More details on configuring logs for monitoring are available in our companion post on [NGINX metrics collection][8]. - -#### Reverse proxy metrics #### - -注:表格 - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionMetric typeAvailability
Active connections by upstream serverCurrently active client connectionsResource: UtilizationNGINX Plus
5xx codes by upstream serverServer errorsWork: ErrorsNGINX Plus
Available servers per upstream groupServers passing health checksResource: AvailabilityNGINX Plus
- -One of the most common ways to use NGINX is as a [reverse proxy][9]. The commercially supported NGINX Plus exposes a large number of metrics about backend (or “upstream”) servers, which are relevant to a reverse proxy setup. This section highlights a few of the key upstream metrics that are available to users of NGINX Plus. - -NGINX Plus segments its upstream metrics first by group, and then by individual server. So if, for example, your reverse proxy is distributing requests to five upstream web servers, you can see at a glance whether any of those individual servers is overburdened, and also whether you have enough healthy servers in the upstream group to ensure good response times. - -**Activity metrics** - -The number of **active connections per upstream server** can help you verify that your reverse proxy is properly distributing work across your server group. If you are using NGINX as a load balancer, significant deviations in the number of connections handled by any one server can indicate that the server is struggling to process requests in a timely manner or that the load-balancing method (e.g., [round-robin or IP hashing][10]) you have configured is not optimal for your traffic patterns - -**Error metrics** - -Recall from the error metric section above that 5xx (server error) codes are a valuable metric to monitor, particularly as a share of total response codes. NGINX Plus allows you to easily extract the number of **5xx codes per upstream server**, as well as the total number of responses, to determine that particular server’s error rate. - -**Availability metrics** - -For another view of the health of your web servers, NGINX also makes it simple to monitor the health of your upstream groups via the total number of **servers currently available within each group**. In a large reverse proxy setup, you may not care very much about the current state of any one server, just as long as your pool of available servers is capable of handling the load. But monitoring the total number of servers that are up within each upstream group can provide a very high-level view of the aggregate health of your web servers. - -**Collecting upstream metrics** - -NGINX Plus upstream metrics are exposed on the internal NGINX Plus monitoring dashboard, and are also available via a JSON interface that can serve up metrics into virtually any external monitoring platform. See examples in our companion post on [collecting NGINX metrics][11]. - -### Conclusion ### - -In this post we’ve touched on some of the most useful metrics you can monitor to keep tabs on your NGINX servers. If you are just getting started with NGINX, monitoring most or all of the metrics in the list below will provide good visibility into the health and activity levels of your web infrastructure: - -- [Dropped connections][12] -- [Requests per second][13] -- [Server error rate][14] -- [Request processing time][15] - -Eventually you will recognize additional, more specialized metrics that are particularly relevant to your own infrastructure and use cases. Of course, what you monitor will depend on the tools you have and the metrics available to you. See the companion post for [step-by-step instructions on metric collection][16], whether you use NGINX or NGINX Plus. - -At Datadog, we have built integrations with both NGINX and NGINX Plus so that you can begin collecting and monitoring metrics from all your web servers with a minimum of setup. Learn how to monitor NGINX with Datadog [in this post][17], and get started right away with [a free trial of Datadog][18]. - -### Acknowledgments ### - -Many thanks to the NGINX team for reviewing this article prior to publication and providing important feedback and clarifications. - ----------- - -Source Markdown for this post is available [on GitHub][19]. Questions, corrections, additions, etc.? Please [let us know][20]. - --------------------------------------------------------------------------------- - -via: https://www.datadoghq.com/blog/how-to-monitor-nginx/ - -作者:K Young -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://nginx.org/en/ -[2]:http://nginx.com/resources/glossary/reverse-proxy-server/ -[3]:https://www.datadoghq.com/blog/monitoring-101-collecting-data/ -[4]:http://nginx.org/en/docs/ngx_core_module.html#worker_connections -[5]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#active-state -[6]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ -[7]:http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html -[8]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ -[9]:https://en.wikipedia.org/wiki/Reverse_proxy -[10]:http://nginx.com/blog/load-balancing-with-nginx-plus/ -[11]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ -[12]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#dropped-connections -[13]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#requests-per-second -[14]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#server-error-rate -[15]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#request-processing-time -[16]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ -[17]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ -[18]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#sign-up -[19]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_monitor_nginx.md -[20]:https://github.com/DataDog/the-monitor/issues From 2b38bda7026c505229b4de281ac9ef5823b7f6d6 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 5 Aug 2015 13:41:46 +0800 Subject: [PATCH 1622/2517] Create 20150717 How to monitor NGINX- Part 1.md --- .../20150717 How to monitor NGINX- Part 1.md | 416 ++++++++++++++++++ 1 file changed, 416 insertions(+) create mode 100644 translated/tech/20150717 How to monitor NGINX- Part 1.md diff --git a/translated/tech/20150717 How to monitor NGINX- Part 1.md b/translated/tech/20150717 How to monitor NGINX- Part 1.md new file mode 100644 index 0000000000..86e72c0324 --- /dev/null +++ b/translated/tech/20150717 How to monitor NGINX- Part 1.md @@ -0,0 +1,416 @@ +如何监控 NGINX - 第1部分 +================================================================================ +![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_1.png) + +### NGINX 是什么? ### + +[NGINX][1] (发音为 “engine X”) 是一种流行的 HTTP 和反向代理服务器。作为一个 HTTP 服务器,NGINX 提供静态内容非常高效可靠,使用较少的内存。作为[反向代理][2],它可以用作一个单一的控制器来为其他应用代理至后端的多个服务器上,如高速缓存和负载平衡。NGINX 是作为一个免费,开源的产品并有更全的功能,商业版的叫 NGINX Plus。 + +NGINX 也可以用作邮件代理和通用的 TCP 代理,但本文并不直接说明对 NGINX 的这些用例做监控。 + +### NGINX 主要指标 ### + +通过监控 NGINX 可以捕捉两类问题:NGINX 本身的资源问题,也有很多问题会出现在你的基础网络设施处。大多数 NGINX 用户受益于以下指标的监控,包括**requests per second**,它提供了一个所有用户活动的高级视图;**server error rate** ,这表明你的服务器已经多长没有处理看似有效的请求;还有**request processing time**,这说明你的服务器处理客户端请求的总共时长(并且可以看出性能降低时或当前环境的其他问题)。 + +更一般地,至少有三个主要的指标类别来监视: + +- 基本活动指标 +- 错误指标 +- 性能指标 + +下面我们将分析在每个类别中最重要的 NGINX 指标,以及用一个相当普遍的案例来说明,值得特别说明的是:使用 NGINX Plus 作反向代理。我们还将介绍如何使用图形工具或可选择的监控工具来监控所有的指标。 + +本文引用指标术语[介绍我们的监控在 101 系列][3],,它提供了指标收集和警告框架。 + +#### 基本活动指标 #### + +无论你在怎样的情况下使用 NGINX,毫无疑问你要监视服务器接收多少客户端请求和如何处理这些请求。 + +NGINX Plus 上像开源 NGINX 一样可以报告基本活动指标,但它也提供了略有不同的辅助模块。我们首先讨论开源的 NGINX,再来说明 NGINX Plus 提供的其他指标的功能。 + +**NGINX** + +下图显示了一个客户端连接,以及如何在连接过程中收集指标的活动周期在开源 NGINX 版本上。 + +![connection, request states](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_connection_diagram-2.png) + +接受,处理,增加请求的计数器。主动,等待,读,写增加和减少请求量。 + +注:表格 + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionMetric type
acceptsCount of client connections attempted by NGINXResource: Utilization
handledCount of successful client connectionsResource: Utilization
activeCurrently active client connectionsResource: Utilization
dropped (calculated)Count of dropped connections (accepts – handled)Work: Errors*
requestsCount of client requestsWork: Throughput
*Strictly speaking, dropped connections is a metric of resource saturation, but since saturation causes NGINX to stop servicing some work (rather than queuing it up for later), “dropped” is best thought of as a work metric.
+ +NGINX 进程接受 OS 的连接请求时**accepts** 计数器增加,而**handled** 是当实际的请求得到连接时(通过建立一个新的连接或重新使用一个空闲的)。这两个计数器的值通常都是相同的,表明连接正在被**dropped**,往往由于资源限制,如 NGINX 的[worker_connections][4]的限制已经达到。 + +一旦 NGINX 成功处理一个连接时,连接会移动到**active**状态,然后保持为客户端请求进行处理: + +Active 状态 + +- **Waiting**: 活动的连接也可以是一个 Waiting 子状态,如果有在此刻没有活动请求。新连接绕过这个状态并直接移动到读,最常见的是使用“accept filter” 和 “deferred accept”,在这种情况下,NGINX 不会接收进程的通知,直到它具有足够的数据来开始响应工作。如果连接设置为 keep-alive ,连接在发送响应后将处于等待状态。 + +- **Reading**: 当接收到请求时,连接移出等待状态,并且该请求本身也被视为 Reading。在这种状态下NGINX 正在读取客户端请求首部。请求首部是比较少的,因此这通常是一个快速的操作。 + +- **Writing**: 请求被读取之后,将其计为 Writing,并保持在该状态,直到响应返回给客户端。这意味着,该请求在 Writing 时, NGINX 同时等待来自负载均衡服务器的结果(系统“背后”的 NGINX),NGINX 也同时响应。请求往往会花费大量的时间在 Writing 状态。 + +通常,一个连接在同一时间只接受一个请求。在这种情况下,Active 连接的数目 == Waiting 连接 + Reading 请求 + Writing 请求。然而,较新的 SPDY 和 HTTP/2 协议允许多个并发请求/响应对被复用的连接,所以 Active 可小于 Waiting,Reading,Writing 的总和。 (在撰写本文时,NGINX 不支持 HTTP/2,但预计到2015年期间将会支持。) + +**NGINX Plus** + +正如上面提到的,所有开源 NGINX 的指标在 NGINX Plus 中是可用的,但另外也提供其他的指标。本节仅说明了 NGINX Plus 可用的指标。 + + +![connection, request states](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_plus_connection_diagram-2.png) + +接受,中断,总数是不断增加的。活动,空闲和已建立连接的,当前状态下每一个连接或请​​求的数量是随着请求量增加和收缩的。 + +注:表格 + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionMetric type
acceptedCount of client connections attempted by NGINXResource: Utilization
droppedCount of dropped connectionsWork: Errors*
activeCurrently active client connectionsResource: Utilization
idleClient connections with zero current requestsResource: Utilization
totalCount of client requestsWork: Throughput
*Strictly speaking, dropped connections is a metric of resource saturation, but since saturation causes NGINX to stop servicing some work (rather than queuing it up for later), “dropped” is best thought of as a work metric.
+ +当 NGINX Plus 进程接受 OS 的连接请求时 **accepted** 计数器递增。如果进程请求连接失败(通过建立一个新的连接或重新使用一个空闲),则该连接断开 **dropped** 计数增加。通常连接被中断是因为资源限制,如 NGINX Plus 的[worker_connections][4]的限制已经达到。 + +**Active** 和 **idle** 和开源 NGINX 的“active” 和 “waiting”状态是相同的,[如上所述][5],有一个不同的地方:在开源 NGINX 上,“waiting”状态包括在“active”中,而在 NGINX Plus 上“idle”的连接被排除在“active” 计数外。**Current** 和开源 NGINX 是一样的也是由“reading + writing” 状态组成。 + + +**Total** 为客户端请求的累积计数。请注意,单个客户端连接可涉及多个请求,所以这个数字可能会比连接的累计次数明显大。事实上,(total / accepted)是每个连接请求的平均数量。 + +**开源 和 Plus 之间指标的不同** + +注:表格 + +++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NGINX (open-source)NGINX Plus
acceptsaccepted
dropped must be calculateddropped is reported directly
reading + writingcurrent
waitingidle
active (includes “waiting” states)active (excludes “idle” states)
requeststotal
+ +**提醒指标: 中断连接** + +被中断的连接数目等于接受和处理之差(NGINX),或被公开直接作为指标的标准(NGINX加)。在正常情况下,中断连接数应该是零。如果每秒中中断连接的速度开始上升,寻找资源可能用尽的地方。 + +![Dropped connections](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/dropped_connections.png) + +**提醒指标: 每秒请求数** + +提供你(开源中的**requests**或者 Plus 中**total**)固定时间间隔每秒或每分钟请求的平均数据。监测这个指标可以查看 Web 的输入流量的最大值,无论是合法的还是恶意的,有可能会突然下降,通常可以看出问题。每秒的请求若发生急剧变化可以提醒你出问题了,即使它不能告诉你确切问题的位置所在。请注意,所有的请求都算作是相同的,无论哪个 URLs。 + +![Requests per second](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/requests_per_sec.png) + +**收集活动指标** + +开源的 NGINX 提供了一个简单状态页面来显示基本的服务器指标。该状态信息以标准格式被显示,实际上任何图形或监控工具可以被配置去解析相关的数据为分析,可视化,或提醒而用。NGINX Plus 提供一个 JSON 接口来显示更多的数据。阅读[NGINX 指标收集][6]后来启用指标收集的功能。 + +#### 错误指标 #### + +注:表格 + +++++ + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionMetric typeAvailability
4xx codesCount of client errorsWork: ErrorsNGINX logs, NGINX Plus
5xx codesCount of server errorsWork: ErrorsNGINX logs, NGINX Plus
+ +NGINX 错误指标告诉你服务器经常返回哪些错误,这也是有用的。客户端错误返回4XX状态码,服务器端错误返回5XX状态码。 + +**提醒指标: 服务器错误率** + +服务器错误率等于5xx错误状态代码的总数除以[状态码][7](1XX,2XX,3XX,4XX,5XX)的总数,每单位时间(通常为一到五分钟)的数目。如果你的错误率随着时间的推移开始攀升,调查可能的原因。如果突然增加,可能需要采取紧急行动,因为客户端可能收到错误信息。 + +![Server error rate](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/5xx_rate.png) + +客户端收到错误时的注意事项:虽然监控4XX是很有用的,但从该指标中你仅可以捕捉有限的信息,因为它只是衡量客户的行为而不捕捉任何特殊的 URLs。换句话说,在4xx出现时只是相当于一点噪音,例如寻找漏洞的网络扫描仪。 + +**收集错误度量** + +虽然开源 NGINX 不会监测错误率,但至少有两种方法可以捕获其信息: + +- 使用商业支持的 NGINX Plus 提供的可扩展状态模块 +- 配置 NGINX 的日志模块将响应码写入访问日志 + +阅读关于 NGINX 指标收集的后两个方法的详细说明。 + +#### 性能指标 #### + +注:表格 + +++++ + + + + + + + + + + + + + + + + +
NameDescriptionMetric typeAvailability
request timeTime to process each request, in secondsWork: PerformanceNGINX logs
+ +**提醒指标: 请求处理时间** + +请求时间指标记录 NGINX 处理每个请求的时间,从第一个客户端的请求字节读出到完成请求。较长的响应时间可以将问题指向负载均衡服务器。 + +**收集处理时间指标** + +NGINX 和 NGINX Plus 用户可以通过添加 $request_time 变量到访问日志格式中来捕​​捉处理时间数据。关于配置日志监控的更多细节在[NGINX指标收集][8]。 + +#### 反向代理指标 #### + +注:表格 + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionMetric typeAvailability
Active connections by upstream serverCurrently active client connectionsResource: UtilizationNGINX Plus
5xx codes by upstream serverServer errorsWork: ErrorsNGINX Plus
Available servers per upstream groupServers passing health checksResource: AvailabilityNGINX Plus
+ +[反向代理][9]是 NGINX 最常见的使用方法之一。商业支持的 NGINX Plus 显示了大量有关后端(或“负载均衡”)的服务器指标,这是反向代理设置的。本节重点介绍了几个关键的负载均衡服务器的指标为 NGINX Plus 用户。 + +NGINX Plus 的负载均衡服务器指标首先是组的,然后是单个服务器的。因此,例如,你的反向代理将请求分配到五个 Web 负载均衡服务器上,你可以一眼看出是否有单个服务器压力过大,也可以看出负载均衡服务器组的健康状况,以确保良好的响应时间。 + +**活动指标** + +**active connections per upstream server**的数量可以帮助你确认反向代理是否正确的分配工作到负载均衡服务器上。如果你正在使用 NGINX 作为负载均衡器,任何一台服务器处理的连接数有显著的偏差都可能表明服务器正在努力处理请求或你配置处理请求的负载均衡的方法(例如[round-robin or IP hashing][10])不是最适合你流量模式的。 + +**错误指标** + +错误指标,上面所说的高于5XX(服务器错误)状态码,是监控指标中有价值的一个,尤其是响应码部分。 NGINX Plus 允许你轻松地提取每个负载均衡服务器 **5xx codes per upstream server**的数量,以及响应的总数量,以此来确定该特定服务器的错误率。 + + +**可用性指标** + +对于 web 服务器的运行状况,另一种观点认为,NGINX 也可以很方便监控你的负载均衡服务器组的健康通过**servers currently available within each group**的总量​​。在一个大的反向代理上,你可能不会非常关心其中一个服务器的当前状态,就像你只要可用的服务器组能够处理当前的负载就行了。但监视负载均衡服务器组内的所有服务器可以提供一个高水平的图像来判断 Web 服务器的健康状况。 + +**收集负载均衡服务器的指标** + +NGINX Plus 负载均衡服务器的指标显示在内部 NGINX Plus 的监控仪表盘上,并且也可通过一个JSON 接口来服务于所有外部的监控平台。在这儿看一个例子[收集 NGINX 指标][11]。 + +### 结论 ### + +在这篇文章中,我们已经谈到了一些有用的指标,你可以使用表格来监控 NGINX 服务器。如果你是刚开始使用 NGINX,下面提供了良好的网络基础设施的健康和活动的可视化工具来监控大部分或所有的指标: + +- [Dropped connections][12] +- [Requests per second][13] +- [Server error rate][14] +- [Request processing time][15] + +最终,你会学到更多,更专业的衡量指标,尤其是关于你自己基础设施和使用情况的。当然,监控哪一项指标将取决于你可用的工具。参见[一步一步来说明指标收集][16],不管你使用 NGINX 还是 NGINX Plus。 + + + +在 Datadog 中,我们已经集成了 NGINX 和 NGINX Plus,这样你就可以以最小的设置来收集和监控所有 Web 服务器的指标。了解如何用 NGINX Datadog来监控 [在本文中][17],并开始使用 [免费的 Datadog][18]。 + +### Acknowledgments ### + +在文章发表之前非常感谢 NGINX 团队审阅这篇,并提供重要的反馈和说明。 + +---------- + +文章来源在这儿 [on GitHub][19]。问题,更正,补充等?请[告诉我们][20]。 + + +-------------------------------------------------------------------------------- + +via: https://www.datadoghq.com/blog/how-to-monitor-nginx/ + +作者:K Young +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://nginx.org/en/ +[2]:http://nginx.com/resources/glossary/reverse-proxy-server/ +[3]:https://www.datadoghq.com/blog/monitoring-101-collecting-data/ +[4]:http://nginx.org/en/docs/ngx_core_module.html#worker_connections +[5]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#active-state +[6]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[7]:http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html +[8]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[9]:https://en.wikipedia.org/wiki/Reverse_proxy +[10]:http://nginx.com/blog/load-balancing-with-nginx-plus/ +[11]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[12]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#dropped-connections +[13]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#requests-per-second +[14]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#server-error-rate +[15]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#request-processing-time +[16]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[17]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ +[18]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#sign-up +[19]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_monitor_nginx.md +[20]:https://github.com/DataDog/the-monitor/issues From d883f1ef7607ced1c97a49c36994a3c51934d636 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 6 Aug 2015 11:27:53 +0800 Subject: [PATCH 1623/2517] =?UTF-8?q?20150806-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150806 5 heroes of the Linux world.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/talk/20150806 5 heroes of the Linux world.md diff --git a/sources/talk/20150806 5 heroes of the Linux world.md b/sources/talk/20150806 5 heroes of the Linux world.md new file mode 100644 index 0000000000..ae35d674a1 --- /dev/null +++ b/sources/talk/20150806 5 heroes of the Linux world.md @@ -0,0 +1,99 @@ +5 heroes of the Linux world +================================================================================ +Who are these people, seen and unseen, whose work affects all of us every day? + +![Image courtesy Christopher Michel/Flickr](http://core0.staticworld.net/images/article/2015/07/penguin-100599348-orig.jpg) +Image courtesy [Christopher Michel/Flickr][1] + +### High-flying penguins ### + +Linux and open source is driven by passionate people who write best-of-breed software and then release the code to the public so anyone can use it, without any strings attached. (Well, there is one string attached and that’s licence.) + +Who are these people? These heroes of the Linux world, whose work affects all of us every day. Allow me to introduce you. + +![Image courtesy Swapnil Bhartiya](http://images.techhive.com/images/article/2015/07/swap-klaus-100599357-orig.jpg) +Image courtesy Swapnil Bhartiya + +### Klaus Knopper ### + +Klaus Knopper, an Austrian developer who lives in Germany, is the founder of Knoppix and Adriana Linux, which he developed for his blind wife. + +Knoppix holds a very special place in heart of those Linux users who started using Linux before Ubuntu came along. What makes Knoppix so special is that it popularized the concept of Live CD. Unlike Windows or Mac OS X, you could run the entire operating system from the CD without installing anything on the system. It allowed new users to test Linux on their systems without formatting the hard drive. The live feature of Linux alone contributed heavily to its popularity. + +![Image courtesy Fórum Internacional Software Live/Flickr](http://images.techhive.com/images/article/2015/07/lennart-100599356-orig.jpg) +Image courtesy [Fórum Internacional Software Live/Flickr][2] + +### Lennart Pottering ### + +Lennart Pottering is yet another genius from Germany. He has written so many core components of a Linux (as well as BSD) system that it’s hard to keep track. Most of his work is towards the successors of aging or broken components of the Linux systems. + +Pottering wrote the modern init system systemd, which shook the Linux world and created a [rift in the Debian community][3]. + +While Linus Torvalds has no problems with systemd, and praises it, he is not a huge fan of the way systemd developers (including the co-author Kay Sievers,) respond to bug reports and criticism. At one point Linus said on the LKML (Linux Kernel Mailing List) that he would [never work with Sievers][4]. + +Lennart is also the author of Pulseaudio, sound server on Linux and Avahi, zero-configuration networking (zeroconf) implementation. + +![Image courtesy Meego Com/Flickr](http://images.techhive.com/images/article/2015/07/jim-zemlin-100599362-orig.jpg) +Image courtesy [Meego Com/Flickr][5] + +### Jim Zemlin ### + +Jim Zemlin isn't a developer, but as founder of The Linux Foundation he is certainly one of the most important figures of the Linux world. + +In 2007, The Linux Foundation was formed as a result of merger between two open source bodies: the Free Standards Group and the Open Source Development Labs. Zemlin was the executive director of the Free Standards Group. Post-merger Zemlin became the executive director of The Linux Foundation and has held that position since. + +Under his leadership, The Linux Foundation has become the central figure in the modern IT world and plays a very critical role for the Linux ecosystem. In order to ensure that key developers like Torvalds and Kroah-Hartman can focus on Linux, the foundation sponsors them as fellows. + +Zemlin also made the foundation a bridge between companies so they can collaborate on Linux while at the same time competing in the market. The foundation also organizes many conferences around the world and [offers many courses for Linux developers][6]. + +People may think of Zemlin as Linus Torvalds' boss, but he refers to himself as "Linus Torvalds' janitor." + +![Image courtesy Coscup/Flickr](http://images.techhive.com/images/article/2015/07/greg-kh-100599350-orig.jpg) +Image courtesy [Coscup/Flickr][7] + +### Greg Kroah-Hartman ### + +Greg Kroah-Hartman is known as second-in-command of the Linux kernel. The ‘gentle giant’ is the maintainer of the stable branch of the kernel and of staging subsystem, USB, driver core, debugfs, kref, kobject, and the [sysfs][8] kernel subsystems along with many other components of a Linux system. + +He is also credited for device drivers for Linux. One of his jobs is to travel around the globe, meet hardware makers and persuade them to make their drivers available for Linux. The next time you plug some random USB device to your system and it works out of the box, thank Kroah-Hartman. (Don't thank the distro. Some distros try to take credit for the work Kroah-Hartman or the Linux kernel did.) + +Kroah-Hartman previously worked for Novell and then joined the Linux Foundation as a fellow, alongside Linus Torvalds. + +Kroah-Hartman is the total opposite of Linus and never rants (at least publicly). One time there was some ripple was when he stated that [Canonical doesn’t contribute much to the Linux kernel][9]. + +On a personal level, Kroah-Hartman is extremely helpful to new developers and users and is easily accessible. + +![Image courtesy Swapnil Bhartiya](http://images.techhive.com/images/article/2015/07/linus-swapnil-100599349-orig.jpg) +Image courtesy Swapnil Bhartiya + +### Linus Torvalds ### + +No collection of Linux heroes would be complete without Linus Torvalds. He is the author of the Linux kernel, the most used open source technology on the planet and beyond. His software powers everything from space stations to supercomputers, military drones to mobile devices and tiny smartwatches. Linus remains the authority on the Linux kernel and makes the final decision on which patches to merge to the kernel. + +Linux isn't Torvalds' only contribution open source. When he got fed-up with the existing software revision control systems, which his kernel heavily relied on, he wrote his own, called Git. Git enjoys the same reputation as Linux; it is the most used version control system in the world. + +Torvalds is also a passionate scuba diver and when he found no decent dive logs for Linux, he wrote his own and called it SubSurface. + +Torvalds is [well known for his rants][10] and once admitted that his ego is as big as a small planet. But he is also known for admitting his mistakes if he realizes he was wrong. + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/2955001/linux/5-heros-of-the-linux-world.html + +作者:[Swapnil Bhartiya][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.itworld.com/author/Swapnil-Bhartiya/ +[1]:https://flic.kr/p/siJ25M +[2]:https://flic.kr/p/uTzj54 +[3]:http://www.itwire.com/business-it-news/open-source/66153-systemd-fallout-two-debian-technical-panel-members-resign +[4]:http://www.linuxveda.com/2014/04/04/linus-torvalds-systemd-kay-sievers/ +[5]:https://flic.kr/p/9Lnhpu +[6]:http://www.itworld.com/article/2951968/linux/linux-foundation-offers-cheaper-courses-and-certifications-for-india.html +[7]:https://flic.kr/p/hBv8Pp +[8]:https://en.wikipedia.org/wiki/Sysfs +[9]:https://www.youtube.com/watch?v=CyHAeGBFS8k +[10]:http://www.itworld.com/article/2873200/operating-systems/11-technologies-that-tick-off-linus-torvalds.html \ No newline at end of file From 308319dffbe0f9e27d61c482b71b9ba46823cadd Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 6 Aug 2015 11:38:08 +0800 Subject: [PATCH 1624/2517] =?UTF-8?q?20150806-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lation Guide for Puppet on Ubuntu 15.04.md | 429 ++++++++++++++++++ 1 file changed, 429 insertions(+) create mode 100644 sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md diff --git a/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md b/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md new file mode 100644 index 0000000000..ea8fcd6e2e --- /dev/null +++ b/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md @@ -0,0 +1,429 @@ +Installation Guide for Puppet on Ubuntu 15.04 +================================================================================ +Hi everyone, today in this article we'll learn how to install puppet to manage your server infrastructure running ubuntu 15.04. Puppet is an open source software configuration management tool which is developed and maintained by Puppet Labs that allows us to automate the provisioning, configuration and management of a server infrastructure. Whether we're managing just a few servers or thousands of physical and virtual machines to orchestration and reporting, puppet automates tasks that system administrators often do manually which frees up time and mental space so sysadmins can work on improving other aspects of your overall setup. It ensures consistency, reliability and stability of the automated jobs processed. It facilitates closer collaboration between sysadmins and developers, enabling more efficient delivery of cleaner, better-designed code. Puppet is available in two solutions configuration management and data center automation. They are **puppet open source and puppet enterprise**. Puppet open source is a flexible, customizable solution available under the Apache 2.0 license, designed to help system administrators automate the many repetitive tasks they regularly perform. Whereas puppet enterprise edition is a proven commercial solution for diverse enterprise IT environments which lets us get all the benefits of open source puppet, plus puppet apps, commercial-only enhancements, supported modules and integrations, and the assurance of a fully supported platform. Puppet uses SSL certificates to authenticate communication between master and agent nodes. + +In this tutorial, we will cover how to install open source puppet in an agent and master setup running ubuntu 15.04 linux distribution. Here, Puppet master is a server from where all the configurations will be controlled and managed and all our remaining servers will be puppet agent nodes, which is configured according to the configuration of puppet master server. Here are some easy steps to install and configure puppet to manage our server infrastructure running Ubuntu 15.04. + +### 1. Setting up Hosts ### + +In this tutorial, we'll use two machines, one as puppet master server and another as puppet node agent both running ubuntu 15.04 "Vivid Vervet" in both the machines. Here is the infrastructure of the server that we're gonna use for this tutorial. + +puppet master server with IP 44.55.88.6 and hostname : puppetmaster +puppet node agent with IP 45.55.86.39 and hostname : puppetnode + +Now we'll add the entry of the machines to /etc/hosts on both machines node agent and master server. + + # nano /etc/hosts + + 45.55.88.6 puppetmaster.example.com puppetmaster + 45.55.86.39 puppetnode.example.com puppetnode + +Please note that the Puppet Master server must be reachable on port 8140. So, we'll need to open port 8140 in it. + +### 2. Updating Time with NTP ### + +As puppet nodes needs to maintain accurate system time to avoid problems when it issues agent certificates. Certificates can appear to be expired if there is time difference, the time of the both the master and the node agent must be synced with each other. To sync the time, we'll update the time with NTP. To do so, here's the command below that we need to run on both master and node agent. + + # ntpdate pool.ntp.org + + 17 Jun 00:17:08 ntpdate[882]: adjust time server 66.175.209.17 offset -0.001938 sec + +Now, we'll update our local repository index and install ntp as follows. + + # apt-get update && sudo apt-get -y install ntp ; service ntp restart + +### 3. Puppet Master Package Installation ### + +There are many ways to install open source puppet. In this tutorial, we'll download and install a debian binary package named as **puppetlabs-release** packaged by the Puppet Labs which will add the source of the **puppetmaster-passenger** package. The puppetmaster-passenger includes the puppet master with apache web server. So, we'll now download the Puppet Labs package. + + # cd /tmp/ + # wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb + + --2015-06-17 00:19:26-- https://apt.puppetlabs.com/puppetlabs-release-trusty.deb + Resolving apt.puppetlabs.com (apt.puppetlabs.com)... 192.155.89.90, 2600:3c03::f03c:91ff:fedb:6b1d + Connecting to apt.puppetlabs.com (apt.puppetlabs.com)|192.155.89.90|:443... connected. + HTTP request sent, awaiting response... 200 OK + Length: 7384 (7.2K) [application/x-debian-package] + Saving to: ‘puppetlabs-release-trusty.deb’ + + puppetlabs-release-tr 100%[===========================>] 7.21K --.-KB/s in 0.06s + + 2015-06-17 00:19:26 (130 KB/s) - ‘puppetlabs-release-trusty.deb’ saved [7384/7384] + +After the download has been completed, we'll wanna install the package. + + # dpkg -i puppetlabs-release-trusty.deb + + Selecting previously unselected package puppetlabs-release. + (Reading database ... 85899 files and directories currently installed.) + Preparing to unpack puppetlabs-release-trusty.deb ... + Unpacking puppetlabs-release (1.0-11) ... + Setting up puppetlabs-release (1.0-11) ... + +Then, we'll update the local respository index with the server using apt package manager. + + # apt-get update + +Then, we'll install the puppetmaster-passenger package by running the below command. + + # apt-get install puppetmaster-passenger + +**Note**: While installing we may get an error **Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning')** but we no need to worry, we'll just simply ignore this as it says that the templatedir is deprecated so, we'll simply disbale that setting in the configuration. :) + +To check whether puppetmaster has been installed successfully in our Master server not not, we'll gonna try to check its version. + + # puppet --version + + 3.8.1 + +We have successfully installed puppet master package in our puppet master box. As we are using passenger with apache, the puppet master process is controlled by apache server, that means it runs when apache is running. + +Before continuing, we'll need to stop the Puppet master by stopping the apache2 service. + + # systemctl stop apache2 + +### 4. Master version lock with Apt ### + +As We have puppet version as 3.8.1, we need to lock the puppet version update as this will mess up the configurations while updating the puppet. So, we'll use apt's locking feature for that. To do so, we'll need to create a new file **/etc/apt/preferences.d/00-puppet.pref** using our favorite text editor. + + # nano /etc/apt/preferences.d/00-puppet.pref + +Then, we'll gonna add the entries in the newly created file as: + + # /etc/apt/preferences.d/00-puppet.pref + Package: puppet puppet-common puppetmaster-passenger + Pin: version 3.8* + Pin-Priority: 501 + +Now, it will not update the puppet while running updates in the system. + +### 5. Configuring Puppet Config ### + +Puppet master acts as a certificate authority and must generate its own certificates which is used to sign agent certificate requests. First of all, we'll need to remove any existing SSL certificates that were created during the installation of package. The default location of puppet's SSL certificates is /var/lib/puppet/ssl. So, we'll remove the entire ssl directory using rm command. + + # rm -rf /var/lib/puppet/ssl + +Then, we'll configure the certificate. While creating the puppet master's certificate, we need to include every DNS name at which agent nodes can contact the master at. So, we'll edit the master's puppet.conf using our favorite text editor. + + # nano /etc/puppet/puppet.conf + +The output seems as shown below. + + [main] + logdir=/var/log/puppet + vardir=/var/lib/puppet + ssldir=/var/lib/puppet/ssl + rundir=/var/run/puppet + factpath=$vardir/lib/facter + templatedir=$confdir/templates + + [master] + # These are needed when the puppetmaster is run by passenger + # and can safely be removed if webrick is used. + ssl_client_header = SSL_CLIENT_S_DN + ssl_client_verify_header = SSL_CLIENT_VERIFY + +Here, we'll need to comment the templatedir line to disable the setting as it has been already depreciated. After that, we'll add the following line at the end of the file under [main]. + + server = puppetmaster + environment = production + runinterval = 1h + strict_variables = true + certname = puppetmaster + dns_alt_names = puppetmaster, puppetmaster.example.com + +This configuration file has many options which might be useful in order to setup own configuration. A full description of the file is available at Puppet Labs [Main Config File (puppet.conf)][1]. + +After editing the file, we'll wanna save that and exit. + +Now, we'll gonna generate a new CA certificates by running the following command. + + # puppet master --verbose --no-daemonize + + Info: Creating a new SSL key for ca + Info: Creating a new SSL certificate request for ca + Info: Certificate Request fingerprint (SHA256): F6:2F:69:89:BA:A5:5E:FF:7F:94:15:6B:A7:C4:20:CE:23:C7:E3:C9:63:53:E0:F2:76:D7:2E:E0:BF:BD:A6:78 + ... + Notice: puppetmaster has a waiting certificate request + Notice: Signed certificate request for puppetmaster + Notice: Removing file Puppet::SSL::CertificateRequest puppetmaster at '/var/lib/puppet/ssl/ca/requests/puppetmaster.pem' + Notice: Removing file Puppet::SSL::CertificateRequest puppetmaster at '/var/lib/puppet/ssl/certificate_requests/puppetmaster.pem' + Notice: Starting Puppet master version 3.8.1 + ^CNotice: Caught INT; storing stop + Notice: Processing stop + +Now, the certificate is being generated. Once we see **Notice: Starting Puppet master version 3.8.1**, the certificate setup is complete. Then we'll press CTRL-C to return to the shell. + +If we wanna look at the cert information of the certificate that was just created, we can get the list by running in the following command. + + # puppet cert list -all + + + "puppetmaster" (SHA256) 33:28:97:86:A1:C3:2F:73:10:D1:FB:42:DA:D5:42:69:71:84:F0:E2:8A:01:B9:58:38:90:E4:7D:B7:25:23:EC (alt names: "DNS:puppetmaster", "DNS:puppetmaster.example.com") + +### 6. Creating a Puppet Manifest ### + +The default location of the main manifest is /etc/puppet/manifests/site.pp. The main manifest file contains the definition of configuration that is used to execute in the puppet node agent. Now, we'll create the manifest file by running the following command. + + # nano /etc/puppet/manifests/site.pp + +Then, we'll add the following lines of configuration in the file that we just opened. + + # execute 'apt-get update' + exec { 'apt-update': # exec resource named 'apt-update' + command => '/usr/bin/apt-get update' # command this resource will run + } + + # install apache2 package + package { 'apache2': + require => Exec['apt-update'], # require 'apt-update' before installing + ensure => installed, + } + + # ensure apache2 service is running + service { 'apache2': + ensure => running, + } + +The above lines of configuration are responsible for the deployment of the installation of apache web server across the node agent. + +### 7. Starting Master Service ### + +We are now ready to start the puppet master. We can start it by running the apache2 service. + + # systemctl start apache2 + +Here, our puppet master is running, but it isn't managing any agent nodes yet. Now, we'll gonna add the puppet node agents to the master. + +**Note**: If you get an error **Job for apache2.service failed. See "systemctl status apache2.service" and "journalctl -xe" for details.** then it must be that there is some problem with the apache server. So, we can see the log what exactly has happened by running **apachectl start** under root or sudo mode. Here, while performing this tutorial, we got a misconfiguration of the certificates under **/etc/apache2/sites-enabled/puppetmaster.conf** file. We replaced **SSLCertificateFile /var/lib/puppet/ssl/certs/server.pem with SSLCertificateFile /var/lib/puppet/ssl/certs/puppetmaster.pem** and commented **SSLCertificateKeyFile** line. Then we'll need to rerun the above command to run apache server. + +### 8. Puppet Agent Package Installation ### + +Now, as we have our puppet master ready and it needs an agent to manage, we'll need to install puppet agent into the nodes. We'll need to install puppet agent in every nodes in our infrastructure we want puppet master to manage. We'll need to make sure that we have added our node agents in the DNS. Now, we'll gonna install the latest puppet agent in our agent node ie. puppetnode.example.com . + +We'll run the following command to download the Puppet Labs package in our puppet agent nodes. + + # cd /tmp/ + # wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb\ + + --2015-06-17 00:54:42-- https://apt.puppetlabs.com/puppetlabs-release-trusty.deb + Resolving apt.puppetlabs.com (apt.puppetlabs.com)... 192.155.89.90, 2600:3c03::f03c:91ff:fedb:6b1d + Connecting to apt.puppetlabs.com (apt.puppetlabs.com)|192.155.89.90|:443... connected. + HTTP request sent, awaiting response... 200 OK + Length: 7384 (7.2K) [application/x-debian-package] + Saving to: ‘puppetlabs-release-trusty.deb’ + + puppetlabs-release-tr 100%[===========================>] 7.21K --.-KB/s in 0.04s + + 2015-06-17 00:54:42 (162 KB/s) - ‘puppetlabs-release-trusty.deb’ saved [7384/7384] + +Then, as we're running ubuntu 15.04, we'll use debian package manager to install it. + + # dpkg -i puppetlabs-release-trusty.deb + +Now, we'll gonna update the repository index using apt-get. + + # apt-get update + +Finally, we'll gonna install the puppet agent directly from the remote repository. + + # apt-get install puppet + +Puppet agent is always disabled by default, so we'll need to enable it. To do so we'll need to edit /etc/default/puppet file using a text editor. + + # nano /etc/default/puppet + +Then, we'll need to change value of **START** to "yes" as shown below. + + START=yes + +Then, we'll need to save and exit the file. + +### 9. Agent Version Lock with Apt ### + +As We have puppet version as 3.8.1, we need to lock the puppet version update as this will mess up the configurations while updating the puppet. So, we'll use apt's locking feature for that. To do so, we'll need to create a file /etc/apt/preferences.d/00-puppet.pref using our favorite text editor. + + # nano /etc/apt/preferences.d/00-puppet.pref + +Then, we'll gonna add the entries in the newly created file as: + + # /etc/apt/preferences.d/00-puppet.pref + Package: puppet puppet-common + Pin: version 3.8* + Pin-Priority: 501 + +Now, it will not update the Puppet while running updates in the system. + +### 10. Configuring Puppet Node Agent ### + +Next, We must make a few configuration changes before running the agent. To do so, we'll need to edit the agent's puppet.conf + + # nano /etc/puppet/puppet.conf + +It will look exactly like the Puppet master's initial configuration file. + +This time also we'll comment the **templatedir** line. Then we'll gonna delete the [master] section, and all of the lines below it. + +Assuming that the puppet master is reachable at "puppet-master", the agent should be able to connect to the master. If not we'll need to use its fully qualified domain name ie. puppetmaster.example.com . + + [agent] + server = puppetmaster.example.com + certname = puppetnode.example.com + +After adding this, it will look alike this. + + [main] + logdir=/var/log/puppet + vardir=/var/lib/puppet + ssldir=/var/lib/puppet/ssl + rundir=/var/run/puppet + factpath=$vardir/lib/facter + #templatedir=$confdir/templates + + [agent] + server = puppetmaster.example.com + certname = puppetnode.example.com + +After done with that, we'll gonna save and exit it. + +Next, we'll wanna start our latest puppet agent in our Ubuntu 15.04 nodes. To start our puppet agent, we'll need to run the following command. + + # systemctl start puppet + +If everything went as expected and configured properly, we should not see any output displayed by running the above command. When we run an agent for the first time, it generates an SSL certificate and sends a request to the puppet master then if the master signs the agent's certificate, it will be able to communicate with the agent node. + +**Note**: If you are adding your first node, it is recommended that you attempt to sign the certificate on the puppet master before adding your other agents. Once you have verified that everything works properly, then you can go back and add the remaining agent nodes further. + +### 11. Signing certificate Requests on Master ### + +While puppet agent runs for the first time, it generates an SSL certificate and sends a request for signing to the master server. Before the master will be able to communicate and control the agent node, it must sign that specific agent node's certificate. + +To get the list of the certificate requests, we'll run the following command in the puppet master server. + + # puppet cert list + + "puppetnode.example.com" (SHA256) 31:A1:7E:23:6B:CD:7B:7D:83:98:33:8B:21:01:A6:C4:01:D5:53:3D:A0:0E:77:9A:77:AE:8F:05:4A:9A:50:B2 + +As we just setup our first agent node, we will see one request. It will look something like the following, with the agent node's Domain name as the hostname. + +Note that there is no + in front of it which indicates that it has not been signed yet. + +Now, we'll go for signing a certification request. In order to sign a certification request, we should simply run **puppet cert sign** with the **hostname** as shown below. + + # puppet cert sign puppetnode.example.com + + Notice: Signed certificate request for puppetnode.example.com + Notice: Removing file Puppet::SSL::CertificateRequest puppetnode.example.com at '/var/lib/puppet/ssl/ca/requests/puppetnode.example.com.pem' + +The Puppet master can now communicate and control the node that the signed certificate belongs to. + +If we want to sign all of the current requests, we can use the -all option as shown below. + + # puppet cert sign --all + +### Removing a Puppet Certificate ### + +If we wanna remove a host from it or wanna rebuild a host then add it back to it. In this case, we will want to revoke the host's certificate from the puppet master. To do this, we will want to use the clean action as follows. + + # puppet cert clean hostname + + Notice: Revoked certificate with serial 5 + Notice: Removing file Puppet::SSL::Certificate puppetnode.example.com at '/var/lib/puppet/ssl/ca/signed/puppetnode.example.com.pem' + Notice: Removing file Puppet::SSL::Certificate puppetnode.example.com at '/var/lib/puppet/ssl/certs/puppetnode.example.com.pem' + +If we want to view all of the requests signed and unsigned, run the following command: + + # puppet cert list --all + + + "puppetmaster" (SHA256) 33:28:97:86:A1:C3:2F:73:10:D1:FB:42:DA:D5:42:69:71:84:F0:E2:8A:01:B9:58:38:90:E4:7D:B7:25:23:EC (alt names: "DNS:puppetmaster", "DNS:puppetmaster.example.com") + +### 12. Deploying a Puppet Manifest ### + +After we configure and complete the puppet manifest, we'll wanna deploy the manifest to the agent nodes server. To apply and load the main manifest we can simply run the following command in the agent node. + + # puppet agent --test + + Info: Retrieving pluginfacts + Info: Retrieving plugin + Info: Caching catalog for puppetnode.example.com + Info: Applying configuration version '1434563858' + Notice: /Stage[main]/Main/Exec[apt-update]/returns: executed successfully + Notice: Finished catalog run in 10.53 seconds + +This will show us all the processes how the main manifest will affect a single server immediately. + +If we wanna run a puppet manifest that is not related to the main manifest, we can simply use puppet apply followed by the manifest file path. It only applies the manifest to the node that we run the apply from. + + # puppet apply /etc/puppet/manifest/test.pp + +### 13. Configuring Manifest for a Specific Node ### + +If we wanna deploy a manifest only to a specific node then we'll need to configure the manifest as follows. + +We'll need to edit the manifest on the master server using a text editor. + + # nano /etc/puppet/manifest/site.pp + +Now, we'll gonna add the following lines there. + + node 'puppetnode', 'puppetnode1' { + # execute 'apt-get update' + exec { 'apt-update': # exec resource named 'apt-update' + command => '/usr/bin/apt-get update' # command this resource will run + } + + # install apache2 package + package { 'apache2': + require => Exec['apt-update'], # require 'apt-update' before installing + ensure => installed, + } + + # ensure apache2 service is running + service { 'apache2': + ensure => running, + } + } + +Here, the above configuration will install and deploy the apache web server only to the two specified nodes having shortname puppetnode and puppetnode1. We can add more nodes that we need to get deployed with the manifest specifically. + +### 14. Configuring Manifest with a Module ### + +Modules are useful for grouping tasks together, they are many available in the Puppet community which anyone can contribute further. + +On the puppet master, we'll gonna install the **puppetlabs-apache** module using the puppet module command. + + # puppet module install puppetlabs-apache + +**Warning**: Please do not use this module on an existing apache setup else it will purge your apache configurations that are not managed by puppet. + +Now we'll gonna edit the main manifest ie **site.pp** using a text editor. + + # nano /etc/puppet/manifest/site.pp + +Now add the following lines to install apache under puppetnode. + + node 'puppet-node' { + class { 'apache': } # use apache module + apache::vhost { 'example.com': # define vhost resource + port => '80', + docroot => '/var/www/html' + } + } + +Then we'll wanna save and exit it. Then, we'll wanna rerun the manifest to deploy the configuration to the agents for our infrastructure. + +### Conclusion ### + +Finally we have successfully installed puppet to manage our Server Infrastructure running Ubuntu 15.04 "Vivid Vervet" linux operating system. We learned how puppet works, configure a manifest configuration, communicate with nodes and deploy the manifest on the agent nodes with secure SSL certification. Controlling, managing and configuring repeated task in several N number of nodes is very easy with puppet open source software configuration management tool. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-puppet-ubuntu-15-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/ +[1]:https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html \ No newline at end of file From 1093cce5b950327736eea1b94718c7864a58edaf Mon Sep 17 00:00:00 2001 From: XLCYun Date: Thu, 6 Aug 2015 12:29:08 +0800 Subject: [PATCH 1625/2517] Update 20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md --- ...ktop--What They Get Right & Wrong - Page 1 - Introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md index 39f29af147..582708f5a4 100644 --- a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md +++ b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md @@ -2,7 +2,7 @@ ================================================================================ *作者声明: 如果你是因为某种神迹而在没看标题的情况下点开了这篇文章,那么我想再重申一些东西...这是一篇评论文章。文中的观点都是我自己的,不代表Phoronix和Michael的观点。它们完全是我自己的想法。 -另外,没错……这可能是一篇引战的文章。我希望社团成员们更沉稳一些,因为我确实想在KDE和Gnome的社团上发起讨论,反馈。因此当我想指出——我所看到的——一个瑕疵时,我会尽量地做到具体而直接。这样,相关的讨论也能做到同样的具体和直接。再次声明:本文另一可选标题为“被[剪纸][1]千刀万剐”(原文剪纸一词为papercuts, 指易修复而烦人的漏洞,译者注)。 +另外,没错……这可能是一篇引战的文章。我希望社团成员们更沉稳一些,因为我确实想在KDE和Gnome的社团上发起讨论,反馈。因此当我想指出——我所看到的——一个瑕疵时,我会尽量地做到具体而直接。这样,相关的讨论也能做到同样的具体和直接。再次声明:本文另一可选标题为“被[细纸片][1]千刀万剐”(原文含paper cuts一词,指易修复但烦人的缺陷,译者注)。 现在,重申完毕……文章开始。 From 41b90d9bdfb996de4549c2bafa82a921844a8ed8 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Thu, 6 Aug 2015 12:30:28 +0800 Subject: [PATCH 1626/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=20=E7=AC=AC=E4=BA=94=E8=8A=82=20XLCYun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Get Right & Wrong - Page 5 - Conclusion.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md new file mode 100644 index 0000000000..02ee7425fc --- /dev/null +++ b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md @@ -0,0 +1,39 @@ +将GNOME作为我的Linux桌面的一周:他们做对的与做错的 - 第五节 - 总结 +================================================================================ +### 用户体验和最后想法 ### + +当Gnome 2.x和KDE 4.x要正面交锋时……我相当开心的跳到其中。我爱的东西它们有,恨的东西也有,但总的来说它们使用起来还算是一种乐趣。然后Gnome 3.x来了,带着一场Gnome Shell的戏剧。那时我就放弃了Gnome,我尽我所能的避开它。当时它对用户是不友好的,而且不直观,它打破了原有的设计典范,只为平板的统治世界做准备……而根据平板下跌的销量来看,这样的未来不可能实现。 + +Gnome 3后续发面了八个版本后,奇迹发生了。Gnome变得对对用户友好了。变得直观了。它完美吗?当然不了。我还是很讨厌它想推动的那种设计范例,我讨厌它总想把工作流(work flow)强加给我,但是在时间和耐心的作用下,这两都能被接受。只要你能够回头去看看Gnome Shell那外星人一样的界面,然后开始跟Gnome的其它部分(特别是控制中心)互动,你就能发现Gnome绝对做对了:细节。对细节的关注! + +人们能适应新的界面设计范例,能适应新的工作流——iPhone和iPad都证明了这一点——但真正一直让他们操心的是“纸片的割伤”(paper cuts,此处指易于修复但烦人的缺陷,译注)。 + +它带出了KDE和Gnome之间最重要的一个区别。Gnome感觉像一个产品。像一种非凡的体验。你用它的时候,觉得它是完整的,你要的东西都在你的指尖。它让人感觉就像是一个拥有windows或者OS X那样桌面体验的Linux桌面版:你要的都在里面,而且它是被同一个目标一致的团队中的同一个人写出来的。天,即使是一个应用程序发出的sudo请求都感觉是Gnome下的一个特意设计的部分,就像在Windows下的一样。而在KDE它就像是任何应用程序都能创建的那种随机外观的弹窗。它不像是以系统的一部分这样的正式身份停下来说“嘿,有个东西要请求管理员权限!你要给它吗?”。 + +KDE让人体验不到有凝聚力的体验。KDE像是在没有方向地打转,感觉没有完整的体验。它就像是一堆东西往不同的的方向移动,只不过恰好它们都有一个共同享有的工具包。如果开发者对此很开心,那么好吧,他们开心就好,但是如果他们想提供最好体验的话,那么就需要多关注那些小地方了。用户体验跟直观应当做为每一个应用程序的设计中心,应当有一个视野,知道KDE要提供什么——并且——知道它看起来应该是什么样的。 + +是不是有什么原因阻止我在KDE下使用Gnome磁盘管理? Rhythmbox? Evolution? 没有。没有。没有。但是这样说又错过了关键。Gnome和KDE都称它们为“桌面环境”。那么它们就应该是完整的环境,这意味着他们的各个部件应该汇集并紧密结合在一起,意味着你使用它们环境下的工具,因为它们说“您在一个完整的桌面中需要的任何东西,我们都支持。”说真的?只有Gnome看起来能符合完整的要求。KDE在“汇集在一起”这一方面感觉就像个半成品,更不用说提供“完整体验”中你所需要的东西。Gnome磁盘管理没有相应的对手——kpartionmanage要求ROOT权限。KDE不运行“首次用户注册”的过程(原文:No 'First Time User' run through.可能是指系统安装过程中KDE没有创建新用户的过程,译注) ,现在也不过是在Kubuntu下引入了一个用户管理器。老天,Gnome甚至提供了地图,笔记,日历和时钟应用。这些应用都是百分百要紧的吗?不,当然不了。但是正是这些应用帮助Gnome推动“Gnome是一种完整丰富的体验”的想法。 + +我吐槽的KDE问题并非不可能解决,决对不是这样的!但是它需要人去关心它。它需要开发者为他们的作品感到自豪,而不仅仅是为它们实现的功能而感到自豪——组织的价值可大了去了。别夺走用户设置选项的能力——GNOME 3.x就是因为缺乏配置选项的能力而为我所诟病,但别把“好吧,你想怎么设置就怎么设置,”作为借口而不提供任何理智的默认设置。默认设置是用户将看到的东西,它们是用户从打开软件的第一刻开始进行评判的关键。给用户留个好印象吧。 + +我知道KDE开发者们知道设计很重要,这也是为什么Visual Design Group(视觉设计团体)存在的原因,但是感觉好像他们没有让VDG充分发挥。所以KDE里存在组织上的缺陷。不是KDE没办法完整,不是它没办法汇集整合在一起然后解决衰败问题,只是开发者们没做到。他们瞄准了靶心……但是偏了。 + +还有,在任何人说这句话之前……千万别说“补丁很受欢迎啊"。因为当我开心的为个人提交补丁时,只要开发者坚持以他们喜欢的却不直观的方式干事,更多这样的烦事就会不断发生。这不关Muon有没有中心对齐。也不关Amarok的界面太丑。也不关每次我敲下快捷键后,弹出的音量和亮度调节窗口占用了我一大块的屏幕“房地产”(说真的,有人会去缩小这些东西)。 + +这跟心态的冷漠有关,跟开发者们在为他们的应用设计UI时根本就不多加思考有关。KDE团队做的东西都工作得很好。Amarok能播放音乐。Dragon能播放视频。Kwin或Qt和kdelibs似乎比Mutter/gtk更有力更效率(仅根本我的电池电量消耗计算。非科学性测试)。这些都很好,很重要……但是它们呈现的方式也很重要。甚至可以说,呈现方式是最重要的,因为它是用户看到的和与之交互的东西。 + +KDE应用开发者们……让VDG参与进来吧。让VDG审查并核准每一个”核心“应用,让一个VDG的UI/UX专家来设计应用的使用模式和使用流程,以此保证其直观性。真见鬼,不管你们在开发的是啥应用,仅仅把它的模型发到VDG论坛寻求反馈甚至都可能都能得到一些非常好的指点跟反馈。你有这么好的资源在这,现在赶紧用吧。 + +我不想说得好像我一点都不懂感恩。我爱KDE,我爱那些志愿者们为了给Linux用户一个可视化的桌面而付出的工作与努力,也爱可供选择的Gnome。正是因为我关心我才写这篇文章。因为我想看到更好的KDE,我想看到它走得比以前更加遥远。而这样做需要每个人继续努力,并且需要人们不再躲避批评。它需要人们对系统互动及系统崩溃的地方都保持诚实。如果我们不能直言批评,如果我们不说”这真垃圾!”,那么情况永远不会变好。 + +这周后我会继续使用Gnome吗?可能不,不。Gnome还在试着强迫我接受其工作流,而我不想追随,也不想遵循,因为我在使用它的时候感觉变得不够高效,因为它并不遵循我的思维模式。可是对于我的朋友们,当他们问我“我该用哪种桌面环境?”我可能会推荐Gnome,特别是那些不大懂技术,只要求“能工作”就行的朋友。根据目前KDE的形势来看,这可能是我能说出的最狠毒的评估了。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=5 + +作者:Eric Griffith +译者:[XLCYun](https://github.com/XLCYun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 196acfe054a235f90dcbd8e99174c08d4c1eede9 Mon Sep 17 00:00:00 2001 From: XLCYun Date: Thu, 6 Aug 2015 13:12:55 +0800 Subject: [PATCH 1627/2517] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=96=87?= =?UTF-8?q?=20=20XLCYun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Get Right & Wrong - Page 5 - Conclusion.md | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md diff --git a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md b/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md deleted file mode 100644 index cf9028229d..0000000000 --- a/sources/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md +++ /dev/null @@ -1,40 +0,0 @@ -Translating by XLCYun. -A Week With GNOME As My Linux Desktop: What They Get Right & Wrong - Page 5 - Conclusion -================================================================================ -### User Experience and Closing Thoughts ### - -When Gnome 2.x and KDE 4.x were going head to head.. I jumped between the two quite happily. Some things I loved, some things I hated, but over all they were both a pleasure to use. Then Gnome 3.x came around and all of the drama with Gnome Shell. I swore off Gnome and avoided it every chance I could. It wasn't user friendly, it was non-intuitive, it broke an establish paradigm in preparation for tablet's taking over the world... A future that, judging from the dropping sales of tablets, will never come. - -Eight releases of Gnome 3 later and the unimaginable happened. Gnome got user friendly. Gnome got intuitive. Is it perfect? Of course not. I still hate the paradigm it tries to push, I hate how it tries to force a work flow onto me, but both of those things can be gotten used to with time and patience. Once you have managed to look past Gnome Shell's alien appearance and you start interacting with it and the other parts of Gnome (Control Center especially) you see what Gnome has definitely gotten right: the little things. The attention to detail. - -People can adapt to new paradigms, people can adapt to new work flows-- the iPhone and iPad proved that-- but what will always bother them are the paper cuts. - -Which brings up an important distinction between KDE and Gnome. Gnome feels like a product. It feels like a singular experience. When you use it, it feels like it is complete and that everything you need is at your fingertips. It feel's like THE Linux desktop in the same way that Windows or OS X have THE desktop experience: what you need is there and it was all written by the same guys working on the same team towards the same goal. Hell, even an application prompting for sudo access feels like an intentional part of the desktop under Gnome, much the way that it is under Windows. In KDE it's just some random-looking window popup that any application could have created. It doesn't feel like a part of the system stopping and going "Hey! Something has requested administrative rights! Do you want to let it go through?" in an official capacity. - -KDE doesn't feel like cohesive experience. KDE doesn't feel like it has a direction its moving in, it doesn't feel like a full experience. KDE feels like its a bunch of pieces that are moving in a bunch of different directions, that just happen to have a shared toolkit beneath them. If that's what the developers are happy with, then fine, good for them, but if the developers still have the hope of offering the best experience possible then the little stuff needs to matter. The user experience and being intuitive needs to be at the forefront of every single application, there needs to be a vision of what KDE wants to offer -and- how it should look. - -Is there anything stopping me from using Gnome Disks under KDE? Rhythmbox? Evolution? Nope. Nope. Nope. But that misses the point. Gnome and KDE both market themselves as "Desktop Environments." They are supposed to be full -environments-, that means they all the pieces come and fit together, that you use that environment's tools because they are saying "We support everything you need to have a full desktop." Honestly? Only Gnome seems to fit the bill of being complete. KDE feel's half-finished when it comes to "coming together" part, let alone offering everything you need for a "full experience". There's no counterpart to Gnome Disks-- kpartitionmanager prompts for root. No "First Time User" run through, it just now got a user manager in Kubuntu. Hell, Gnome even provides a Maps, Notes, Calendar and Clock application. Do all of these applications matter 100%? No, of course not. But the fact that Gnome has them helps to push the idea that Gnome is a full and complete experience. - -My complaints about KDE are not impossible to fix, not by a long shot. But it requires people to care. It requires developers to take pride in their work beyond just function-- form counts for a whole hell of a lot. Don't take away the user's ability to configure things-- the lack of configuration is one of my biggest gripes with GNOME 3.x, but don't use "Well you can configure it however you want," as an excuse for not providing sane defaults. The defaults are what users are going to see, they are what the users are going to judge from the first moment they open your application. Make it a good impression. - -I know the KDE developers know design matters, that is WHY the Visual Design Group exists, but it feels like they aren't using the VDG to their fullest. And therein lies KDE's hamartia. It's not that KDE can't be complete, it's not that it can't come together and fix the downfalls, it just that they haven't. They aimed for the bulls eye... but they missed. - -And before anyone says it... Don't say "Patches are welcome." Because while I can happily submit patches for the individual annoyances more will just keep coming as developers keep on their marry way of doing things in non-intuitive ways. This isn't about Muon not being center-aligned. This isn't about Amarok having an ugly UI. This isn't about the volume and brightness pop-up notifiers taking up a large chunk of my screen real-estate every time I hit my hotkeys (seriously, someone shrink those things). - -This is about a mentality of apathy, this is about developers apparently not thinking things through when they make the UI for their applications. Everything the KDE Community does works fine. Amarok plays music. Dragon Player plays videos. Kwin / Qt & kdelibs is seemingly more power efficient than Mutter / gtk (according to my battery life times. Non-scientific testing). Those things are all well and good, and important.. but the presentation matters to. Arguably, the presentation matters the most because that is what user's see and interact with. - -To KDE application developers... Get the VDG involved. Make every single 'core' application get its design vetted and approved by the VDG, have a UI/UX expert from the VDG go through the usage patterns and usage flow of your application to make sure its intuitive. Hell, even just posting a mock up to the VDG forums and asking for feedback would probably get you some nice pointers and feedback for whatever application you're working on. You have this great resource there, now actually use them. - -I am not trying to sound ungrateful. I love KDE, I love the work and effort that volunteers put into giving Linux users a viable desktop, and an alternative to Gnome. And it is because I care that I write this article. Because I want to see KDE excel, I want to see it go further and farther than it has before. But doing that requires work on everyone's part, and it requires that people don't hold back criticism. It requires that people are honest about their interaction with the system and where it falls apart. If we can't give direct criticism, if we can't say "This sucks!" then it will never get better. - -Will I still use Gnome after this week? Probably not, no. Gnome still trying to force a work flow on me that I don't want to follow or abide by, I feel less productive when I'm using it because it doesn't follow my paradigm. For my friends though, when they ask me "What desktop environment should I use?" I'm probably going to recommend Gnome, especially if they are less technical users who want things to "just work." And that is probably the most damning assessment I could make in regards to the current state of KDE. - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=5 - -作者:Eric Griffith -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 26ad573be26ca3f90eb97bea4fd591febb0c0c58 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 6 Aug 2015 13:14:12 +0800 Subject: [PATCH 1628/2517] =?UTF-8?q?20150806-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ware Developer is a Great Career Choice.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md diff --git a/sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md b/sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md new file mode 100644 index 0000000000..0302c0b006 --- /dev/null +++ b/sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md @@ -0,0 +1,50 @@ +5 Reasons Why Software Developer is a Great Career Choice +================================================================================ +This week I will give a presentation at a local high school on what it is like to work as a programmer. I am volunteering (through the organization [Transfer][1]) to come to schools and talk about what I work with. This school will have a technology theme day this week, and would like to hear what working in the technology sector is like. Since I develop software, that’s what I will talk about. One section will be on why I think a career in software development is great. The main reasons are: + +### 5 Reasons ### + +**1 Creative**. If you ask people to name creative jobs, chances are they will say things like writer, musician or painter. But few people know that software development is also very creative. It is almost by definition creative, since you create new functionality that didn’t exist before. The solutions can be expressed in many ways, both structurally and in the details. Often there are trade-offs to make (for example speed versus memory consumption). And of course the solution has to be correct. All this requires creativity. + +**2 Collaborative**. Another myth is that programmers sit alone at their computers and code all day. But software development is in fact almost always a team effort. You discuss programming problems and solutions with your colleagues, and discuss requirements and other issues with product managers, testers and customers. It is also telling that pair-programming (two developers programming together on one computer) is a popular practice. + +**3 In demand**. More and more in the world is using software, or as Marc Andreessen put it: “[Software is Eating the World][2]“. Even as there are more programmers (in Stockholm, programmer is now the [most common occupation][3]), demand is still outpacing supply. Software companies report that one of their greatest challenges is [finding good developers][4]. I regularly get contacted by recruiters trying to get me to change jobs. I don’t know of many other professions where employers compete for you like that. + +**4 Pays well**. Developing software can create a lot of value. There is no marginal cost to selling one extra copy of software you have already developed. This combined with the high demand for developers means that pay is quite good. There are of course occupations where you make more money, but compared to the general population, I think software developers are paid quite well. + +**5 Future proof**. Many jobs disappear, often because they can be replaced by computers and software. But all those new programs still need to be developed and maintained, so the outlook for programmers is quite good. + +### But… ### + +**What about outsourcing?** Won’t all software development be outsourced to countries where the salaries are much lower? This is an example of an idea that is better in theory than in practice (much like the [waterfall development methodology][5]). Software development is a discovery activity as much as a design activity. It benefits greatly from intense collaboration. Furthermore, especially when the main product is software, the knowledge gained when developing it is a competitive advantage. The easier that knowledge is shared within the whole company, the better it is. + +Another way to look at it is this. Outsourcing of software development has existed for quite a while now. Yet there is still high demand for local developers. So companies see benefits of hiring local developers that outweigh the higher costs. + +### How to Win ### + +There are many reasons why I think developing software is enjoyable (see also [Why I Love Coding][6]). But it is not for everybody. Fortunately it is quite easy to try programming out. There are innumerable resources on the web for learning to program. For example, both [Coursera][7] and [Udacity][8] have introductory courses. If you have never programmed, try one of the free courses or tutorials to get a feel for it. + +Finding something you really enjoy to do for a living has at least two benefits. First, since you do it every day, work will be much more fun than if you simply do something to make money. Second, if you really like it, you have a much better chance of getting good at it. I like the Venn diagram below (by [@eskimon][9]) on what constitutes a great job. Since programming pays relatively well, I think that if you like it, you have a good chance of ending up in the center of the diagram! + +![](https://henrikwarne1.files.wordpress.com/2014/12/career-planning.png) + +-------------------------------------------------------------------------------- + +via: http://henrikwarne.com/2014/12/08/5-reasons-why-software-developer-is-a-great-career-choice/ + +作者:[Henrik Warne][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://henrikwarne.com/ +[1]:http://www.transfer.nu/omoss/transferinenglish.jspx?pageId=23 +[2]:http://online.wsj.com/articles/SB10001424053111903480904576512250915629460 +[3]:http://www.di.se/artiklar/2014/6/12/jobbet-som-tar-over-landet/ +[4]:http://computersweden.idg.se/2.2683/1.600324/examinationstakten-racker-inte-for-branschens-behov +[5]:http://en.wikipedia.org/wiki/Waterfall_model +[6]:http://henrikwarne.com/2012/06/02/why-i-love-coding/ +[7]:https://www.coursera.org/ +[8]:https://www.udacity.com/ +[9]:https://eskimon.wordpress.com/about/ \ No newline at end of file From bb276ee6be7206faefab7041f6c150560987ca6b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 6 Aug 2015 13:17:29 +0800 Subject: [PATCH 1629/2517] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=91=E8=80=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... 5 Reasons Why Software Developer is a Great Career Choice.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md b/sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md index 0302c0b006..d24aa83983 100644 --- a/sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md +++ b/sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md @@ -1,3 +1,4 @@ +Translating by MousyCoder 5 Reasons Why Software Developer is a Great Career Choice ================================================================================ This week I will give a presentation at a local high school on what it is like to work as a programmer. I am volunteering (through the organization [Transfer][1]) to come to schools and talk about what I work with. This school will have a technology theme day this week, and would like to hear what working in the technology sector is like. Since I develop software, that’s what I will talk about. One section will be on why I think a career in software development is great. The main reasons are: From 16f5b9676503cfc9ed1702e9ebf8e98bf89c32cc Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 6 Aug 2015 15:03:05 +0800 Subject: [PATCH 1630/2517] PUB:20150727 Easy Backup Restore and Migrate Containers in Docker @GOLinux --- ...estore and Migrate Containers in Docker.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) rename {translated/tech => published}/20150727 Easy Backup Restore and Migrate Containers in Docker.md (61%) diff --git a/translated/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md b/published/20150727 Easy Backup Restore and Migrate Containers in Docker.md similarity index 61% rename from translated/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md rename to published/20150727 Easy Backup Restore and Migrate Containers in Docker.md index 420430cca8..7d2d5f26d8 100644 --- a/translated/tech/20150727 Easy Backup Restore and Migrate Containers in Docker.md +++ b/published/20150727 Easy Backup Restore and Migrate Containers in Docker.md @@ -1,32 +1,32 @@ 无忧之道:Docker中容器的备份、恢复和迁移 ================================================================================ -今天,我们将学习如何快速地对docker容器进行快捷备份、恢复和迁移。[Docker][1]是一个开源平台,用于自动化部署应用,以通过快捷的途径在称之为容器的轻量级软件层下打包、发布和运行这些应用。它使得应用平台独立,因为它扮演了Linux上一个额外的操作系统级虚拟化的自动化抽象层。它通过其组件cgroups和命名空间利用Linux内核的资源分离特性,达到避免虚拟机开销的目的。它使得用于部署和扩展web应用、数据库和后端服务的大规模构建块无需依赖于特定的堆栈或供应者。 +今天,我们将学习如何快速地对docker容器进行快捷备份、恢复和迁移。[Docker][1]是一个开源平台,用于自动化部署应用,以通过快捷的途径在称之为容器的轻量级软件层下打包、发布和运行这些应用。它使得应用平台独立,因为它扮演了Linux上一个额外的操作系统级虚拟化的自动化抽象层。它通过其组件cgroups和命名空间利用Linux内核的资源分离特性,达到避免虚拟机开销的目的。它使得用于部署和扩展web应用、数据库和后端服务的大规模构建组件无需依赖于特定的堆栈或供应者。 -所谓的容器,就是那些创建自Docker镜像的软件层,它包含了独立的Linux文件系统和开箱即用的应用程序。如果我们有一个在盒子中运行着的Docker容器,并且想要备份这些容器以便今后使用,或者想要迁移这些容器,那么,本教程将帮助你掌握在Linux操作系统中备份、恢复和迁移Docker容器。 +所谓的容器,就是那些创建自Docker镜像的软件层,它包含了独立的Linux文件系统和开箱即用的应用程序。如果我们有一个在机器中运行着的Docker容器,并且想要备份这些容器以便今后使用,或者想要迁移这些容器,那么,本教程将帮助你掌握在Linux操作系统中备份、恢复和迁移Docker容器的方法。 我们怎样才能在Linux中备份、恢复和迁移Docker容器呢?这里为您提供了一些便捷的步骤。 ### 1. 备份容器 ### -首先,为了备份Docker中的容器,我们会想看看我们想要备份的容器列表。要达成该目的,我们需要在我们运行这Docker引擎,并已创建了容器的Linux机器中运行 docker ps 命令。 +首先,为了备份Docker中的容器,我们会想看看我们想要备份的容器列表。要达成该目的,我们需要在我们运行着Docker引擎,并已创建了容器的Linux机器中运行 docker ps 命令。 # docker ps ![Docker Containers List](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-containers-list.png) -在此之后,我们要选择我们想要备份的容器,然后我们会去创建该容器的快照。我们可以使用 docker commit 命令来创建快照。 +在此之后,我们要选择我们想要备份的容器,然后去创建该容器的快照。我们可以使用 docker commit 命令来创建快照。 # docker commit -p 30b8f18f20b4 container-backup ![Docker Commit](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-commit.png) -该命令会生成一个作为Docker镜像的容器快照,我们可以通过运行 docker images 命令来查看Docker镜像,如下。 +该命令会生成一个作为Docker镜像的容器快照,我们可以通过运行 `docker images` 命令来查看Docker镜像,如下。 # docker images ![Docker Images](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-images.png) -正如我们所看见的,上面做的快照已经作为Docker镜像保存了。现在,为了备份该快照,我们有两个选择,一个是我们可以登陆进Docker注册中心,并推送该镜像;另一个是我们可以将Docker镜像打包成tarball备份,以供今后使用。 +正如我们所看见的,上面做的快照已经作为Docker镜像保存了。现在,为了备份该快照,我们有两个选择,一个是我们可以登录进Docker注册中心,并推送该镜像;另一个是我们可以将Docker镜像打包成tar包备份,以供今后使用。 如果我们想要在[Docker注册中心][2]上传或备份镜像,我们只需要运行 docker login 命令来登录进Docker注册中心,然后推送所需的镜像即可。 @@ -39,23 +39,23 @@ ![Docker Push](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-push.png) -如果我们不想备份到docker注册中心,而是想要将此镜像保存在本地机器中,以供日后使用,那么我们可以将其作为tarball备份。要完成该操作,我们需要运行以下 docker save 命令。 +如果我们不想备份到docker注册中心,而是想要将此镜像保存在本地机器中,以供日后使用,那么我们可以将其作为tar包备份。要完成该操作,我们需要运行以下 `docker save` 命令。 # docker save -o ~/container-backup.tar container-backup ![taking tarball backup](http://blog.linoxide.com/wp-content/uploads/2015/07/taking-tarball-backup.png) -要验证tarball时候已经生成,我们只需要在保存tarball的目录中运行 ls 命令。 +要验证tar包是否已经生成,我们只需要在保存tar包的目录中运行 ls 命令即可。 ### 2. 恢复容器 ### -接下来,在我们成功备份了我们的Docker容器后,我们现在来恢复这些被快照成Docker镜像的容器。如果我们已经在注册中心推送了这些Docker镜像,那么我们仅仅需要把那个Docker镜像拖回并直接运行即可。 +接下来,在我们成功备份了我们的Docker容器后,我们现在来恢复这些制作了Docker镜像快照的容器。如果我们已经在注册中心推送了这些Docker镜像,那么我们仅仅需要把那个Docker镜像拖回并直接运行即可。 # docker pull arunpyasi/container-backup:test ![Docker Pull](http://blog.linoxide.com/wp-content/uploads/2015/07/docker-pull.png) -但是,如果我们将这些Docker镜像作为tarball文件备份到了本地,那么我们只要使用 docker load 命令,后面加上tarball的备份路径,就可以加载该Docker镜像了。 +但是,如果我们将这些Docker镜像作为tar包文件备份到了本地,那么我们只要使用 docker load 命令,后面加上tar包的备份路径,就可以加载该Docker镜像了。 # docker load -i ~/container-backup.tar @@ -63,7 +63,7 @@ # docker images -在镜像被加载后,我们将从加载的镜像去运行Docker容器。 +在镜像被加载后,我们将用加载的镜像去运行Docker容器。 # docker run -d -p 80:80 container-backup @@ -71,11 +71,11 @@ ### 3. 迁移Docker容器 ### -迁移容器同时涉及到了上面两个操作,备份和恢复。我们可以将任何一个Docker容器从一台机器迁移到另一台机器。在迁移过程中,首先我们将容器的备份作为快照Docker镜像。然后,该Docker镜像或者是被推送到了Docker注册中心,或者被作为tarball文件保存到了本地。如果我们将镜像推送到了Docker注册中心,我们简单地从任何我们想要的机器上使用 docker run 命令来恢复并运行该容器。但是,如果我们将镜像打包成tarball备份到了本地,我们只需要拷贝或移动该镜像到我们想要的机器上,加载该镜像并运行需要的容器即可。 +迁移容器同时涉及到了上面两个操作,备份和恢复。我们可以将任何一个Docker容器从一台机器迁移到另一台机器。在迁移过程中,首先我们将把容器备份为Docker镜像快照。然后,该Docker镜像或者是被推送到了Docker注册中心,或者被作为tar包文件保存到了本地。如果我们将镜像推送到了Docker注册中心,我们简单地从任何我们想要的机器上使用 docker run 命令来恢复并运行该容器。但是,如果我们将镜像打包成tar包备份到了本地,我们只需要拷贝或移动该镜像到我们想要的机器上,加载该镜像并运行需要的容器即可。 ### 尾声 ### -最后,我们已经学习了如何快速地备份、恢复和迁移Docker容器,本教程适用于各个成功运行Docker的操作系统平台。真的,Docker是一个相当简单易用,然而功能却十分强大的工具。它的命令相当易记,这些命令都非常短,带有许多简单而强大的标记和参数。上面的方法让我们备份容器时很是安逸,使得我们可以在日后很轻松地恢复它们。这会帮助我们恢复我们的容器和镜像,即便主机系统崩溃,甚至意外地被清除。如果你还有很多问题、建议、反馈,请在下面的评论框中写出来吧,可以帮助我们改进或更新我们的内容。谢谢大家!享受吧 :-) +最后,我们已经学习了如何快速地备份、恢复和迁移Docker容器,本教程适用于各个可以成功运行Docker的操作系统平台。真的,Docker是一个相当简单易用,然而功能却十分强大的工具。它的命令相当易记,这些命令都非常短,带有许多简单而强大的标记和参数。上面的方法让我们备份容器时很是安逸,使得我们可以在日后很轻松地恢复它们。这会帮助我们恢复我们的容器和镜像,即便主机系统崩溃,甚至意外地被清除。如果你还有很多问题、建议、反馈,请在下面的评论框中写出来吧,可以帮助我们改进或更新我们的内容。谢谢大家!享受吧 :-) -------------------------------------------------------------------------------- @@ -83,7 +83,7 @@ via: http://linoxide.com/linux-how-to/backup-restore-migrate-containers-docker/ 作者:[Arun Pyasi][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From f6f0cfde12d224b51ddcb416a18d01626351c94d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 6 Aug 2015 15:06:17 +0800 Subject: [PATCH 1631/2517] =?UTF-8?q?20150806-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...minism and increasing diversity in tech.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/talk/20150806 Torvalds 2.0--Patricia Torvalds on computing college feminism and increasing diversity in tech.md diff --git a/sources/talk/20150806 Torvalds 2.0--Patricia Torvalds on computing college feminism and increasing diversity in tech.md b/sources/talk/20150806 Torvalds 2.0--Patricia Torvalds on computing college feminism and increasing diversity in tech.md new file mode 100644 index 0000000000..36f5642c10 --- /dev/null +++ b/sources/talk/20150806 Torvalds 2.0--Patricia Torvalds on computing college feminism and increasing diversity in tech.md @@ -0,0 +1,81 @@ +Torvalds 2.0: Patricia Torvalds on computing, college, feminism, and increasing diversity in tech +================================================================================ +![Image by : Photo by Becky Svartström. Modified by Opensource.com. CC BY-SA 4.0](http://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc-lead-patriciatorvalds.png) +Image by : Photo by Becky Svartström. Modified by Opensource.com. [CC BY-SA 4.0][1] + +Patricia Torvalds isn't the Torvalds name that pops up in Linux and open source circles. Yet. + +![](http://opensource.com/sites/default/files/images/life-uploads/ptorvalds.png) + +At 18, Patricia is a feminist with a growing list of tech achievements, open source industry experience, and her sights set on diving into her freshman year of college at Duke University's Pratt School of Engineering. She works for [Puppet Labs][2] in Portland, Oregon, as an intern, but soon she'll head to Durham, North Carolina, to start the fall semester of college. + +In this exclusive interview, Patricia explains what got her interested in computer science and engineering (spoiler alert: it wasn't her father), what her high school did "right" with teaching tech, the important role feminism plays in her life, and her thoughts on the lack of diversity in technology. + +![](http://opensource.com/sites/default/files/images/life/Interview%20banner%20Q%26A.png) + +### What made you interested in studying computer science and engineering? ### + +My interest in tech really grew throughout high school. I wanted to go into biology for a while, until around my sophomore year. I had a web design internship at the Portland VA after my sophomore year. And I took an engineering class called Exploratory Ventures, which sent an ROV into the Pacific ocean late in my sophomore year, but the turning point was probably when I was named a regional winner and national runner up for the [NCWIT Aspirations in Computing][3] award halfway through my junior year. + +The award made me feel validated in my interest, of course, but I think the most important part of it was getting to join a Facebook group for all the award winners. The girls who have won the award are absolutely incredible and so supportive of each other. I was definitely interested in computer science before I won the award, because of my work in XV and at the VA, but having these girls to talk to solidified my interest and has kept it really strong. Teaching XV—more on that later—my junior and senior year, also, made engineering and computer science really fun for me. + +### What do you plan to study? And do you already know what you want to do after college? ### + +I hope to major in either Mechanical or Electrical and Computer Engineering as well as Computer Science, and minor in Women's Studies. After college, I hope to work for a company that supports or creates technology for social good, or start my own company. + +### My daughter had one high school programming class—Visual Basic. She was the only girl in her class, and she ended up getting harassed and having a miserable experience. What was your experience like? ### + +My high school began offering computer science classes my senior year, and I took Visual Basic as well! The class wasn't bad, but I was definitely one of three or four girls in the class of 20 or so students. Other computing classes seemed to have similar gender breakdowns. However, my high school was extremely small and the teacher was supportive of inclusivity in tech, so there was no harassment that I noticed. Hopefully the classes become more diverse in future years. + +### What did your schools do right technology-wise? And how could they have been better? ### + +My high school gave us consistent access to computers, and teachers occasionally assigned technology-based assignments in unrelated classes—we had to create a website for a social studies class a few times—which I think is great because it exposes everyone to tech. The robotics club was also pretty active and well-funded, but fairly small; I was not a member. One very strong component of the school's technology/engineering program is actually a student-taught engineering class called Exploratory Ventures, which is a hands-on class that tackles a new engineering or computer science problem every year. I taught it for two years with a classmate of mine, and have had students come up to me and tell me they're interested in pursuing engineering or computer science as a result of the class. + +However, my high school was not particularly focused on deliberately including young women in these programs, and it isn't very racially diverse. The computing-based classes and clubs were, by a vast majority, filled with white male students. This could definitely be improved on. + +### Growing up, how did you use technology at home? ### + +Honestly, when I was younger I used my computer time (my dad created a tracker, which logged us off after an hour of Internet use) to play Neopets or similar games. I guess I could have tried to mess with the tracker or played on the computer without Internet use, but I just didn't. I sometimes did little science projects with my dad, and I remember once printing "Hello world" in the terminal with him a thousand times, but mostly I just played online games with my sisters and didn't get my start in computing until high school. + +### You were active in the Feminism Club at your high school. What did you learn from that experience? What feminist issues are most important to you now? ### + +My friend and I co-founded Feminism Club at our high school late in our sophomore year. We did receive lots of resistance to the club at first, and while that never entirely went away, by the time we graduated feminist ideals were absolutely a part of the school's culture. The feminist work we did at my high school was generally on a more immediate scale and focused on issues like the dress code. + +Personally, I'm very focused on intersectional feminism, which is feminism as it applies to other aspects of oppression like racism and classism. The Facebook page [Guerrilla Feminism][4] is a great example of an intersectional feminism and has done so much to educate me. I currently run the Portland branch. + +Feminism is also important to me in terms of diversity in tech, although as an upper-class white woman with strong connections in the tech world, the problems here affect me much less than they do other people. The same goes for my involvement in intersectional feminism. Publications like [Model View Culture][5] are very inspiring to me, and I admire Shanley Kane so much for what she does. + +### What advice would you give parents who want to teach their children how to program? ### + +Honestly, nobody ever pushed me into computer science or engineering. Like I said, for a long time I wanted to be a geneticist. I got a summer internship doing web design for the VA the summer after my sophomore year and totally changed my mind. So I don't know if I can fully answer that question. + +I do think genuine interest is important, though. If my dad had sat me down in front of the computer and told me to configure a webserver when I was 12, I don't think I'd be interested in computer science. Instead, my parents gave me a lot of free reign to do what I wanted, which was mostly coding terrible little HTML sites for my Neopets. Neither of my younger sisters are interested in engineering or computer science, and my parents don't care. I'm really lucky my parents have given me and my sisters the encouragement and resources to explore our interests. + +Still, I grew up saying my future career would be "like my dad's"—even when I didn't know what he did. He has a pretty cool job. Also, one time when I was in middle school, I told him that and he got a little choked up and said I wouldn't think that in high school. So I guess that motivated me a bit. + +### What suggestions do you have for leaders in open source communities to help them attract and maintain a more diverse mix of contributors? ### + +I'm actually not active in particular open source communities. I feel much more comfortable discussing computing with other women; I'm a member of the [NCWIT Aspirations in Computing][6] network and it's been one of the most important aspects of my continued interest in technology, as well as the Facebook group [Ladies Storm Hackathons][7]. + +I think this applies well to attracting and maintaining a talented and diverse mix of contributors: Safe spaces are important. I have seen the misogynistic and racist comments made in some open source communities, and subsequent dismissals when people point out the issues. I think that in maintaining a professional community there have to be strong standards on what constitutes harassment or inappropriate conduct. Of course, people can—and will—have a variety of opinions on what they should be able to express in open source communities, or any community. However, if community leaders actually want to attract and maintain diverse talent, they need to create a safe space and hold community members to high standards. + +I also think that some community leaders just don't value diversity. It's really easy to argue that tech is a meritocracy, and the reason there are so few marginalized people in tech is just that they aren't interested, and that the problem comes from earlier on in the pipeline. They argue that if someone is good enough at their job, their gender or race or sexual orientation doesn't matter. That's the easy argument. But I was raised not to make excuses for mistakes. And I think the lack of diversity is a mistake, and that we should be taking responsibility for it and actively trying to make it better. + +-------------------------------------------------------------------------------- + +via: http://opensource.com/life/15/8/patricia-torvalds-interview + +作者:[Rikki Endsley][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://opensource.com/users/rikki-endsley +[1]:https://creativecommons.org/licenses/by-sa/4.0/ +[2]:https://puppetlabs.com/ +[3]:https://www.aspirations.org/ +[4]:https://www.facebook.com/guerrillafeminism +[5]:https://modelviewculture.com/ +[6]:https://www.aspirations.org/ +[7]:https://www.facebook.com/groups/LadiesStormHackathons/ \ No newline at end of file From 60edce17ba50fa21a0caec3f4350b3b79c249e6b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 6 Aug 2015 16:05:07 +0800 Subject: [PATCH 1632/2517] =?UTF-8?q?20150806-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...witch for debugging and troubleshooting.md | 69 ++++++++++++++++++ ...or--No module named wxversion' on Linux.md | 49 +++++++++++++ ...th Answers--How to install git on Linux.md | 72 +++++++++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md create mode 100644 sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md create mode 100644 sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md diff --git a/sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md b/sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md new file mode 100644 index 0000000000..2b4e16bcaf --- /dev/null +++ b/sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md @@ -0,0 +1,69 @@ +Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting +================================================================================ +> **Question:** I am trying to troubleshoot my Open vSwitch deployment. For that I would like to inspect its debug messages generated by its built-in logging mechanism. How can I enable logging in Open vSwitch, and change its logging level (e.g., to INFO/DEBUG level) to check more detailed debug information? + +Open vSwitch (OVS) is the most popular open-source implementation of virtual switch on the Linux platform. As the today's data centers increasingly rely on the software-defined network (SDN) architecture, OVS is fastly adopted as the de-facto standard network element in data center's SDN deployments. + +Open vSwitch has a built-in logging mechanism called VLOG. The VLOG facility allows one to enable and customize logging within various components of the switch. The logging information generated by VLOG can be sent to a combination of console, syslog and a separate log file for inspection. You can configure OVS logging dynamically at run-time with a command-line tool called `ovs-appctl`. + +![](https://farm1.staticflickr.com/499/19300367114_cd8aac2fb2_c.jpg) + +Here is how to enable logging and customize logging levels in Open vSwitch with `ovs-appctl`. + +The syntax of `ovs-appctl` to customize VLOG is as follows. + + $ sudo ovs-appctl vlog/set module[:facility[:level]] + +- **Module**: name of any valid component in OVS (e.g., netdev, ofproto, dpif, vswitchd, and many others) +- **Facility**: destination of logging information (must be: console, syslog or file) +- **Level**: verbosity of logging (must be: emer, err, warn, info, or dbg) + +In OVS source code, module name is defined in each source file in the form of: + + VLOG_DEFINE_THIS_MODULE(); + +For example, in lib/netdev.c, you will see: + + VLOG_DEFINE_THIS_MODULE(netdev); + +which indicates that lib/netdev.c is part of netdev module. Any logging messages generated in lib/netdev.c will belong to netdev module. + +In OVS source code, there are multiple severity levels used to define several different kinds of logging messages: VLOG_INFO() for informational, VLOG_WARN() for warning, VLOG_ERR() for error, VLOG_DBG() for debugging, VLOG_EMERG for emergency. Logging level and facility determine which logging messages are sent where. + +To see a full list of available modules, facilities, and their respective logging levels, run the following commands. This command must be invoked after you have started OVS. + + $ sudo ovs-appctl vlog/list + +![](https://farm1.staticflickr.com/465/19734939478_7eb5d44635_c.jpg) + +The output shows the debug levels of each module for three different facilities (console, syslog, file). By default, all modules have their logging level set to INFO. + +Given any one OVS module, you can selectively change the debug level of any particular facility. For example, if you want to see more detailed debug messages of dpif module at the console screen, run the following command. + + $ sudo ovs-appctl vlog/set dpif:console:dbg + +You will see that dpif module's console facility has changed its logging level to DBG. The logging level of two other facilities, syslog and file, remains unchanged. + +![](https://farm1.staticflickr.com/333/19896760146_5d851311ae_c.jpg) + +If you want to change the logging level for all modules, you can specify "ANY" as the module name. For example, the following command will change the console logging level of every module to DBG. + + $ sudo ovs-appctl vlog/set ANY:console:dbg + +![](https://farm1.staticflickr.com/351/19734939828_8c7f59e404_c.jpg) + +Also, if you want to change the logging level of all three facilities at once, you can specify "ANY" as the facility name. For example, the following command will change the logging level of all facilities for every module to DBG. + + $ sudo ovs-appctl vlog/set ANY:ANY:dbg + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/enable-logging-open-vswitch.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://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md b/sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md new file mode 100644 index 0000000000..11d814d8f4 --- /dev/null +++ b/sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md @@ -0,0 +1,49 @@ +Linux FAQs with Answers--How to fix “ImportError: No module named wxversion” on Linux +================================================================================ +> **Question:** I was trying to run a Python application on [insert your Linux distro], but I got an error "ImportError: No module named wxversion." How can I solve this error in the Python program? + + Looking for python... 2.7.9 - Traceback (most recent call last): + File "/home/dev/playonlinux/python/check_python.py", line 1, in + import os, wxversion + ImportError: No module named wxversion + failed tests + +This error indicates that your Python application is GUI-based, relying on a missing Python module called wxPython. [wxPython][1] is a Python extension module for the wxWidgets GUI library, popularly used by C++ programmers to design GUI applications. The wxPython extension allows Python developers to easily design and integrate GUI within any Python application. + +To solve this import error, you need to install wxPython on your Linux, as described below. + +### Install wxPython on Debian, Ubuntu or Linux Mint ### + + $ sudo apt-get install python-wxgtk2.8 + +### Install wxPython on Fedora ### + + $ sudo yum install wxPython + +### Install wxPython on CentOS/RHEL ### + +wxPython is available on the EPEL repository of CentOS/RHEL, not on base repositories. Thus, first [enable EPEL repository][2] on your system, and then use yum command. + + $ sudo yum install wxPython + +### Install wxPython on Arch Linux ### + + $ sudo pacman -S wxpython + +### Install wxPython on Gentoo ### + + $ emerge wxPython + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/importerror-no-module-named-wxversion.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://ask.xmodulo.com/author/nanni +[1]:http://wxpython.org/ +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file diff --git a/sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md b/sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md new file mode 100644 index 0000000000..c5c34f3a72 --- /dev/null +++ b/sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md @@ -0,0 +1,72 @@ +Linux FAQs with Answers--How to install git on Linux +================================================================================ +> **Question:** I am trying to clone a project from a public Git repository, but I am getting "git: command not found" error. How can I install git on [insert your Linux distro]? + +Git is a popular open-source version control system (VCS) originally developed for Linux environment. Contrary to other VCS tools like CVS or SVN, Git's revision control is considered "distributed" in a sense that your local Git working directory can function as a fully-working repository with complete history and version-tracking capabilities. In this model, each collaborator commits to his or her local repository (as opposed to always committing to a central repository), and optionally push to a centralized repository if need be. This brings in scalability and redundancy to the revision control system, which is a must in any kind of large-scale collaboration. + +![](https://farm1.staticflickr.com/341/19433194168_c79d4570aa_b.jpg) + +### Install Git with a Package Manager ### + +Git is shipped with all major Linux distributions. Thus the easiest way to install Git is by using your Linux distro's package manager. + +**Debian, Ubuntu, or Linux Mint** + + $ sudo apt-get install git + +**Fedora, CentOS or RHEL** + + $ sudo yum install git + +**Arch Linux** + + $ sudo pacman -S git + +**OpenSUSE** + + $ sudo zypper install git + +**Gentoo** + + $ emerge --ask --verbose dev-vcs/git + +### Install Git from the Source ### + +If for whatever reason you want to built Git from the source, you can follow the instructions below. + +**Install Dependencies** + +Before building Git, first install dependencies. + +**Debian, Ubuntu or Linux** + + $ sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev asciidoc xmlto docbook2x + +**Fedora, CentOS or RHEL** + + $ sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc xmlto docbook2x + +#### Compile Git from the Source #### + +Download the latest release of Git from [https://github.com/git/git/releases][1]. Then build and install Git under /usr as follows. + +Note that if you want to install it under a different directory (e.g., /opt), replace "--prefix=/usr" in configure command with something else. + + $ cd git-x.x.x + $ make configure + $ ./configure --prefix=/usr + $ make all doc info + $ sudo make install install-doc install-html install-info + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-git-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://ask.xmodulo.com/author/nanni +[1]:https://github.com/git/git/releases \ No newline at end of file From c709912c2c77d4f618418743de6b1eae007c76f6 Mon Sep 17 00:00:00 2001 From: KS Date: Thu, 6 Aug 2015 16:11:10 +0800 Subject: [PATCH 1633/2517] Update 20150803 Managing Linux Logs.md --- sources/tech/20150803 Managing Linux Logs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150803 Managing Linux Logs.md b/sources/tech/20150803 Managing Linux Logs.md index d68adddf52..e317a63253 100644 --- a/sources/tech/20150803 Managing Linux Logs.md +++ b/sources/tech/20150803 Managing Linux Logs.md @@ -1,3 +1,4 @@ +wyangsun translating Managing Linux Logs ================================================================================ A key best practice for logging is to centralize or aggregate your logs in one place, especially if you have multiple servers or tiers in your architecture. We’ll tell you why this is a good idea and give tips on how to do it easily. @@ -415,4 +416,4 @@ via: http://www.loggly.com/ultimate-guide/logging/managing-linux-logs/ [19]:http://www.infoworld.com/article/2614204/data-center/puppet-or-chef--the-configuration-management-dilemma.html [20]:http://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-popular/ [21]:https://github.com/progrium/logspout -[22]:https://www.loggly.com/docs/sending-logs-unixlinux-system-setup/ \ No newline at end of file +[22]:https://www.loggly.com/docs/sending-logs-unixlinux-system-setup/ From 5a078ed4770c650a2fdc78eab7798b37ae4a8df4 Mon Sep 17 00:00:00 2001 From: mousycoder Date: Thu, 6 Aug 2015 18:54:15 +0800 Subject: [PATCH 1634/2517] =?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 --- ...ware Developer is a Great Career Choice.md | 51 ----------- ...ware Developer is a Great Career Choice.md | 91 +++++++++++++++++++ 2 files changed, 91 insertions(+), 51 deletions(-) delete mode 100644 sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md create mode 100644 translated/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md diff --git a/sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md b/sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md deleted file mode 100644 index d24aa83983..0000000000 --- a/sources/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md +++ /dev/null @@ -1,51 +0,0 @@ -Translating by MousyCoder -5 Reasons Why Software Developer is a Great Career Choice -================================================================================ -This week I will give a presentation at a local high school on what it is like to work as a programmer. I am volunteering (through the organization [Transfer][1]) to come to schools and talk about what I work with. This school will have a technology theme day this week, and would like to hear what working in the technology sector is like. Since I develop software, that’s what I will talk about. One section will be on why I think a career in software development is great. The main reasons are: - -### 5 Reasons ### - -**1 Creative**. If you ask people to name creative jobs, chances are they will say things like writer, musician or painter. But few people know that software development is also very creative. It is almost by definition creative, since you create new functionality that didn’t exist before. The solutions can be expressed in many ways, both structurally and in the details. Often there are trade-offs to make (for example speed versus memory consumption). And of course the solution has to be correct. All this requires creativity. - -**2 Collaborative**. Another myth is that programmers sit alone at their computers and code all day. But software development is in fact almost always a team effort. You discuss programming problems and solutions with your colleagues, and discuss requirements and other issues with product managers, testers and customers. It is also telling that pair-programming (two developers programming together on one computer) is a popular practice. - -**3 In demand**. More and more in the world is using software, or as Marc Andreessen put it: “[Software is Eating the World][2]“. Even as there are more programmers (in Stockholm, programmer is now the [most common occupation][3]), demand is still outpacing supply. Software companies report that one of their greatest challenges is [finding good developers][4]. I regularly get contacted by recruiters trying to get me to change jobs. I don’t know of many other professions where employers compete for you like that. - -**4 Pays well**. Developing software can create a lot of value. There is no marginal cost to selling one extra copy of software you have already developed. This combined with the high demand for developers means that pay is quite good. There are of course occupations where you make more money, but compared to the general population, I think software developers are paid quite well. - -**5 Future proof**. Many jobs disappear, often because they can be replaced by computers and software. But all those new programs still need to be developed and maintained, so the outlook for programmers is quite good. - -### But… ### - -**What about outsourcing?** Won’t all software development be outsourced to countries where the salaries are much lower? This is an example of an idea that is better in theory than in practice (much like the [waterfall development methodology][5]). Software development is a discovery activity as much as a design activity. It benefits greatly from intense collaboration. Furthermore, especially when the main product is software, the knowledge gained when developing it is a competitive advantage. The easier that knowledge is shared within the whole company, the better it is. - -Another way to look at it is this. Outsourcing of software development has existed for quite a while now. Yet there is still high demand for local developers. So companies see benefits of hiring local developers that outweigh the higher costs. - -### How to Win ### - -There are many reasons why I think developing software is enjoyable (see also [Why I Love Coding][6]). But it is not for everybody. Fortunately it is quite easy to try programming out. There are innumerable resources on the web for learning to program. For example, both [Coursera][7] and [Udacity][8] have introductory courses. If you have never programmed, try one of the free courses or tutorials to get a feel for it. - -Finding something you really enjoy to do for a living has at least two benefits. First, since you do it every day, work will be much more fun than if you simply do something to make money. Second, if you really like it, you have a much better chance of getting good at it. I like the Venn diagram below (by [@eskimon][9]) on what constitutes a great job. Since programming pays relatively well, I think that if you like it, you have a good chance of ending up in the center of the diagram! - -![](https://henrikwarne1.files.wordpress.com/2014/12/career-planning.png) - --------------------------------------------------------------------------------- - -via: http://henrikwarne.com/2014/12/08/5-reasons-why-software-developer-is-a-great-career-choice/ - -作者:[Henrik Warne][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://henrikwarne.com/ -[1]:http://www.transfer.nu/omoss/transferinenglish.jspx?pageId=23 -[2]:http://online.wsj.com/articles/SB10001424053111903480904576512250915629460 -[3]:http://www.di.se/artiklar/2014/6/12/jobbet-som-tar-over-landet/ -[4]:http://computersweden.idg.se/2.2683/1.600324/examinationstakten-racker-inte-for-branschens-behov -[5]:http://en.wikipedia.org/wiki/Waterfall_model -[6]:http://henrikwarne.com/2012/06/02/why-i-love-coding/ -[7]:https://www.coursera.org/ -[8]:https://www.udacity.com/ -[9]:https://eskimon.wordpress.com/about/ \ No newline at end of file diff --git a/translated/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md b/translated/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md new file mode 100644 index 0000000000..a592cb595e --- /dev/null +++ b/translated/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md @@ -0,0 +1,91 @@ +选择软件开发攻城师的5个原因 +================================================================================ +这个星期我将给本地一所高中做一次有关于程序猿是怎样工作的演讲,我是 [Transfer][1] 组织推荐来到这所学校,谈论我的工作。这个学校本周将有一个技术主题日,并且他们很想听听科技行业是怎样工作的。因为我是从事软件开发的,这也是我将和学生们讲的内容。我为什么觉得软件开发是一个很酷的职业将是演讲的其中一部分。主要原因如下: + +### 5个原因 ### + +**1 创造性** + +![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/34042817.jpg) + +如果你问别人创造性的工作有哪些,别人通常会说像作家,音乐家或者画家那样的(工作)。但是极少有人知道软件开发也是一项非常具有创造性的工作。因为你创造了一个以前没有的新功能,这样的功能基本上可以被定义为非常具有创造性。这种解决方案可以在整体和细节上以很多形式来展现。我们经常会遇到一些需要做权衡的场景(比如说运行速度与内存消耗的权衡)。当然前提是这种解决方案必须是正确的。其实这些所有的行为都是需要强大的创造性的。 + +**2 协作性** + +![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/94579377.jpg) + +另外一个表象是程序猿们独自坐在他们的电脑前,然后撸一天的代码。但是软件开发事实上通常总是一个团队努力的结果。你会经常和你的同事讨论编程问题以及解决方案,并且和产品经理,测试人员,客户讨论需求以及其他问题。 +经常有人说,结对编程(2个开发人员一起在一个电脑上编程)是一种流行的最佳实践。 + + +**3 高需性** + +![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/26662164.jpg) + +世界上越来越多的人在用软件,正如 [Marc Andreessen](https://en.wikipedia.org/wiki/Marc_Andreessen) 所说 " [软件正在吞噬世界][2] "。虽然程序猿现在的数量非常巨大(在斯德哥尔摩,程序猿现在是 [最普遍的职业][3] ),但是,需求量一直处于供不应求的局面。据软件公司报告,他们最大的挑战之一就是 [找到优秀的程序猿][4] 。我也经常接到那些想让我跳槽的招聘人员打来的电话。我知道至少除软件行业之外的其他行业的雇主不会那么拼(的去招聘)。 + +**4 高酬性** + + +![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/50538928.jpg) + +软件开发可以带来不菲的收入。卖一份你已经开发好的软件的额外副本是没有 [边际成本][5] 的。这个事实与对程序猿的高需求意味着收入相当可观。当然还有许多更捞金的职业,但是相比一般人群,我认为软件开发者确实“日进斗金”(知足吧!骚年~~)。 + +**5 前瞻性** + +![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/89799239.jpg) + +有许多工作岗位消失,往往是由于它们可以被计算机和软件代替。但是所有这些新的程序依然需要开发和维护,因此,程序猿的前景还是相当好的。 + + +### 但是...### + +**外包又是怎么一回事呢?** + +![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/41615753.jpg) + +难道所有外包到其他地区的软件开发的薪水都很低吗?这是一个理想丰满,现实骨感的例子(有点像 [瀑布开发模型][6] )。软件开发基本上跟设计的工作一样,是一个探索发现的工作。它受益于强有力的合作。更进一步说,特别当你的主打产品是软件的时候,你所掌握的开发知识是绝对的优势。知识在整个公司中分享的越容易,那么公司的发展也将越来越好。 + + +换一种方式去看待这个问题。软件外包已经存在了相当一段时间了。但是对本土程序猿的需求量依旧非常高。因为许多软件公司看到了雇佣本土程序猿的带来的收益要远远超过了相对较高的成本(其实还是赚了)。 + +### 如何成为人生大赢家 ### + + +![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/44219908.jpg) + +虽然我有许多我认为软件开发是一件非常有趣的事情的理由 (详情见: [为什么我热爱编程][7] )。但是这些理由,并不适用于所有人。幸运的是,尝试编程是一件非常容易的事情。在互联网上有数不尽的学习编程的资源。例如,[Coursera][8] 和 [Udacity][9] 都拥有很好的入门课程。如果你从来没有撸过码,可以尝试其中一个免费的课程,找找感觉。 + +寻找一个既热爱又能谋生的事情至少有2个好处。首先,由于你天天去做,工作将比你简单的只为谋生要有趣的多。其次,如果你真的非常喜欢,你将更好的擅长它。我非常喜欢下面一副关于伟大工作组成的韦恩图(作者 [@eskimon)][10] 。因为编码的薪水确实相当不错,我认为如果你真的喜欢它,你将有一个很好的机会,成为人生的大赢家! + +![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/17571624.jpg) + +-------------------------------------------------------------------------------- + +via: http://henrikwarne.com/2014/12/08/5-reasons-why-software-developer-is-a-great-career-choice/ + +作者:[Henrik Warne][a] +译者:[mousycoder](https://github.com/mousycoder) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + + +[a]:http://henrikwarne.com/ +[1]:http://www.transfer.nu/omoss/transferinenglish.jspx?pageId=23 +[2]:http://www.wsj.com/articles/SB10001424053111903480904576512250915629460 +[3]:http://www.di.se/artiklar/2014/6/12/jobbet-som-tar-over-landet/ +[4]:http://computersweden.idg.se/2.2683/1.600324/examinationstakten-racker-inte-for-branschens-behov +[5]:https://en.wikipedia.org/wiki/Marginal_cost +[6]:https://en.wikipedia.org/wiki/Waterfall_model +[7]:http://henrikwarne.com/2012/06/02/why-i-love-coding/ +[8]:https://www.coursera.org/ +[9]:https://www.udacity.com/ +[10]:https://eskimon.wordpress.com/about/ + + + + + + + From a37ff025ebb8b740d71d06ed1e6178a5ab4ccc3c Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 7 Aug 2015 00:06:17 +0800 Subject: [PATCH 1635/2517] PUB:20150717 How to monitor NGINX- Part 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @strugglingyouth 好长,翻译辛苦了。其中有些字句翻译不对,比如 upstreaming 是指上游(服务器),并不专指负载均衡环境。 --- .../20150717 How to monitor NGINX- Part 1.md | 231 ++++++++++ .../20150717 How to monitor NGINX- Part 1.md | 416 ------------------ 2 files changed, 231 insertions(+), 416 deletions(-) create mode 100644 published/20150717 How to monitor NGINX- Part 1.md delete mode 100644 translated/tech/20150717 How to monitor NGINX- Part 1.md diff --git a/published/20150717 How to monitor NGINX- Part 1.md b/published/20150717 How to monitor NGINX- Part 1.md new file mode 100644 index 0000000000..908aa7448e --- /dev/null +++ b/published/20150717 How to monitor NGINX- Part 1.md @@ -0,0 +1,231 @@ +如何监控 NGINX(第一篇) +================================================================================ +![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_1.png) + +### NGINX 是什么? ### + +[NGINX][1] (发音为 “engine X”) 是一种流行的 HTTP 和反向代理服务器。作为一个 HTTP 服务器,NGINX 可以使用较少的内存非常高效可靠地提供静态内容。作为[反向代理][2],它可以用作多个后端服务器或类似缓存和负载平衡这样的其它应用的单一访问控制点。NGINX 是一个自由开源的产品,并有一个具备更全的功能的叫做 NGINX Plus 的商业版。 + +NGINX 也可以用作邮件代理和通用的 TCP 代理,但本文并不直接讨论 NGINX 的那些用例的监控。 + +### NGINX 主要指标 ### + +通过监控 NGINX 可以 捕获到两类问题:NGINX 本身的资源问题,和出现在你的基础网络设施的其它问题。大多数 NGINX 用户会用到以下指标的监控,包括**每秒请求数**,它提供了一个由所有最终用户活动组成的上层视图;**服务器错误率** ,这表明你的服务器已经多长没有处理看似有效的请求;还有**请求处理时间**,这说明你的服务器处理客户端请求的总共时长(并且可以看出性能降低或当前环境的其他问题)。 + +更一般地,至少有三个主要的指标类别来监视: + +- 基本活动指标 +- 错误指标 +- 性能指标 + +下面我们将分析在每个类别中最重要的 NGINX 指标,以及用一个相当普遍但是值得特别提到的案例来说明:使用 NGINX Plus 作反向代理。我们还将介绍如何使用图形工具或可选择的监控工具来监控所有的指标。 + +本文引用指标术语[来自我们的“监控 101 系列”][3],,它提供了一个指标收集和警告框架。 + +#### 基本活跃指标 #### + +无论你在怎样的情况下使用 NGINX,毫无疑问你要监视服务器接收多少客户端请求和如何处理这些请求。 + +NGINX Plus 上像开源 NGINX 一样可以报告基本活跃指标,但它也提供了略有不同的辅助模块。我们首先讨论开源的 NGINX,再来说明 NGINX Plus 提供的其他指标的功能。 + +**NGINX** + +下图显示了一个客户端连接的过程,以及开源版本的 NGINX 如何在连接过程中收集指标。 + +![connection, request states](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_connection_diagram-2.png) + +Accepts(接受)、Handled(已处理)、Requests(请求)是一直在增加的计数器。Active(活跃)、Waiting(等待)、Reading(读)、Writing(写)随着请求量而增减。 + +| 名称 | 描述| [指标类型](https://www.datadoghq.com/blog/monitoring-101-collecting-data/)| +|-----------|-----------------|-------------------------------------------------------------------------------------------------------------------------| +| Accepts | NGINX 所接受的客户端连接数 | 资源: 功能 | +| Handled | 成功的客户端连接数 | 资源: 功能 | +| Active | 当前活跃的客户端连接数| 资源: 功能 | +| Dropped(已丢弃,计算得出)| 丢弃的连接数(接受 - 已处理)| 工作:错误*| +| Requests | 客户端请求数 | 工作:吞吐量 | + + +_*严格的来说,丢弃的连接是 [一个资源饱和指标](https://www.datadoghq.com/blog/monitoring-101-collecting-data/#resource-metrics),但是因为饱和会导致 NGINX 停止服务(而不是延后该请求),所以,“已丢弃”视作 [一个工作指标](https://www.datadoghq.com/blog/monitoring-101-collecting-data/#work-metrics) 比较合适。_ + +NGINX worker 进程接受 OS 的连接请求时 **Accepts** 计数器增加,而**Handled** 是当实际的请求得到连接时(通过建立一个新的连接或重新使用一个空闲的)。这两个计数器的值通常都是相同的,如果它们有差别则表明连接被**Dropped**,往往这是由于资源限制,比如已经达到 NGINX 的[worker_connections][4]的限制。 + +一旦 NGINX 成功处理一个连接时,连接会移动到**Active**状态,在这里对客户端请求进行处理: + +Active状态 + +- **Waiting**: 活跃的连接也可以处于 Waiting 子状态,如果有在此刻没有活跃请求的话。新连接可以绕过这个状态并直接变为到 Reading 状态,最常见的是在使用“accept filter(接受过滤器)” 和 “deferred accept(延迟接受)”时,在这种情况下,NGINX 不会接收 worker 进程的通知,直到它具有足够的数据才开始响应。如果连接设置为 keep-alive ,那么它在发送响应后将处于等待状态。 + +- **Reading**: 当接收到请求时,连接离开 Waiting 状态,并且该请求本身使 Reading 状态计数增加。在这种状态下 NGINX 会读取客户端请求首部。请求首部是比较小的,因此这通常是一个快速的操作。 + +- **Writing**: 请求被读取之后,其使 Writing 状态计数增加,并保持在该状态,直到响应返回给客户端。这意味着,该请求在 Writing 状态时, 一方面 NGINX 等待来自上游系统的结果(系统放在 NGINX “后面”),另外一方面,NGINX 也在同时响应。请求往往会在 Writing 状态花费大量的时间。 + +通常,一个连接在同一时间只接受一个请求。在这种情况下,Active 连接的数目 == Waiting 的连接 + Reading 请求 + Writing 。然而,较新的 SPDY 和 HTTP/2 协议允许多个并发请求/响应复用一个连接,所以 Active 可小于 Waiting 的连接、 Reading 请求、Writing 请求的总和。 (在撰写本文时,NGINX 不支持 HTTP/2,但预计到2015年期间将会支持。) + +**NGINX Plus** + +正如上面提到的,所有开源 NGINX 的指标在 NGINX Plus 中是可用的,但另外也提供其他的指标。本节仅说明了 NGINX Plus 可用的指标。 + + +![connection, request states](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_plus_connection_diagram-2.png) + +Accepted (已接受)、Dropped,总数是不断增加的计数器。Active、 Idle(空闲)和处于 Current(当前)处理阶段的各种状态下的连接或请​​求的当前数量随着请求量而增减。 + +| 名称 | 描述| [指标类型](https://www.datadoghq.com/blog/monitoring-101-collecting-data/)| +|-----------|-----------------|-------------------------------------------------------------------------------------------------------------------------| +| Accepted | NGINX 所接受的客户端连接数 | 资源: 功能 | +| Dropped |丢弃的连接数(接受 - 已处理)| 工作:错误*| +| Active | 当前活跃的客户端连接数| 资源: 功能 | +| Idle | 没有当前请求的客户端连接| 资源: 功能 | +| Total(全部) | 客户端请求数 | 工作:吞吐量 | + +_*严格的来说,丢弃的连接是 [一个资源饱和指标](https://www.datadoghq.com/blog/monitoring-101-collecting-data/#resource-metrics),但是因为饱和会导致 NGINX 停止服务(而不是延后该请求),所以,“已丢弃”视作 [一个工作指标](https://www.datadoghq.com/blog/monitoring-101-collecting-data/#work-metrics) 比较合适。_ + +当 NGINX Plus worker 进程接受 OS 的连接请求时 **Accepted** 计数器递增。如果 worker 进程为请求建立连接失败(通过建立一个新的连接或重新使用一个空闲),则该连接被丢弃, **Dropped** 计数增加。通常连接被丢弃是因为资源限制,如 NGINX Plus 的[worker_connections][4]的限制已经达到。 + +**Active** 和 **Idle** 和[如上所述][5]的开源 NGINX 的“active” 和 “waiting”状态是相同的,但是有一点关键的不同:在开源 NGINX 上,“waiting”状态包括在“active”中,而在 NGINX Plus 上“idle”的连接被排除在“active” 计数外。**Current** 和开源 NGINX 是一样的也是由“reading + writing” 状态组成。 + +**Total** 为客户端请求的累积计数。请注意,单个客户端连接可涉及多个请求,所以这个数字可能会比连接的累计次数明显大。事实上,(total / accepted)是每个连接的平均请求数量。 + +**开源 和 Plus 之间指标的不同** + +|NGINX (开源) |NGINX Plus| +|-----------------------|----------------| +| accepts | accepted | +| dropped 通过计算得来| dropped 直接得到 | +| reading + writing| current| +| waiting| idle| +| active (包括 “waiting”状态) | active (排除 “idle” 状态)| +| requests| total| + +**提醒指标: 丢弃连接** + +被丢弃的连接数目等于 Accepts 和 Handled 之差(NGINX 中),或是可直接得到标准指标(NGINX Plus 中)。在正常情况下,丢弃连接数应该是零。如果在每个单位时间内丢弃连接的速度开始上升,那么应该看看是否资源饱和了。 + +![Dropped connections](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/dropped_connections.png) + +**提醒指标: 每秒请求数** + +按固定时间间隔采样你的请求数据(开源 NGINX 的**requests**或者 NGINX Plus 中**total**) 会提供给你单位时间内(通常是分钟或秒)所接受的请求数量。监测这个指标可以查看进入的 Web 流量尖峰,无论是合法的还是恶意的,或者突然的下降,这通常都代表着出现了问题。每秒请求数若发生急剧变化可以提醒你的环境出现问题了,即使它不能告诉你确切问题的位置所在。请注意,所有的请求都同样计数,无论 URL 是什么。 + +![Requests per second](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/requests_per_sec.png) + +**收集活跃指标** + +开源的 NGINX 提供了一个简单状态页面来显示基本的服务器指标。该状态信息以标准格式显示,实际上任何图形或监控工具可以被配置去解析这些相关数据,以用于分析、可视化、或提醒。NGINX Plus 提供一个 JSON 接口来供给更多的数据。阅读相关文章“[NGINX 指标收集][6]”来启用指标收集的功能。 + +#### 错误指标 #### + +| 名称 | 描述| [指标类型](https://www.datadoghq.com/blog/monitoring-101-collecting-data/)| 可用于 | +|-----------|-----------------|--------------------------------------------------------------------------------------------------------|----------------| +| 4xx 代码 | 客户端错误计数 | 工作:错误 | NGINX 日志, NGINX Plus| +| 5xx 代码| 服务器端错误计数 | 工作:错误 | NGINX 日志, NGINX Plus| + +NGINX 错误指标告诉你服务器是否经常返回错误而不是正常工作。客户端错误返回4XX状态码,服务器端错误返回5XX状态码。 + +**提醒指标: 服务器错误率** + +服务器错误率等于在单位时间(通常为一到五分钟)内5xx错误状态代码的总数除以[状态码][7](1XX,2XX,3XX,4XX,5XX)的总数。如果你的错误率随着时间的推移开始攀升,调查可能的原因。如果突然增加,可能需要采取紧急行动,因为客户端可能收到错误信息。 + +![Server error rate](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/5xx_rate.png) + +关于客户端错误的注意事项:虽然监控4XX是很有用的,但从该指标中你仅可以捕捉有限的信息,因为它只是衡量客户的行为而不捕捉任何特殊的 URL。换句话说,4xx出现的变化可能是一个信号,例如网络扫描器正在寻找你的网站漏洞时。 + +**收集错误度量** + +虽然开源 NGINX 不能马上得到用于监测的错误率,但至少有两种方法可以得到: + +- 使用商业支持的 NGINX Plus 提供的扩展状态模块 +- 配置 NGINX 的日志模块将响应码写入访问日志 + +关于这两种方法,请阅读相关文章“[NGINX 指标收集][6]”。 + +#### 性能指标 #### + +| 名称 | 描述| [指标类型](https://www.datadoghq.com/blog/monitoring-101-collecting-data/)| 可用于 | +|-----------|-----------------|--------------------------------------------------------------------------------------------------------|----------------| +| request time (请求处理时间)| 处理每个请求的时间,单位为秒 | 工作:性能 | NGINX 日志| + +**提醒指标: 请求处理时间** + +请求处理时间指标记录了 NGINX 处理每个请求的时间,从读到客户端的第一个请求字节到完成请求。较长的响应时间说明问题在上游。 + +**收集处理时间指标** + +NGINX 和 NGINX Plus 用户可以通过添加 $request_time 变量到访问日志格式中来捕​​捉处理时间数据。关于配置日志监控的更多细节在[NGINX指标收集][6]。 + +#### 反向代理指标 #### + +| 名称 | 描述| [指标类型](https://www.datadoghq.com/blog/monitoring-101-collecting-data/)| 可用于 | +|-----------|-----------------|--------------------------------------------------------------------------------------------------------|----------------| +| 上游服务器的活跃链接 | 当前活跃的客户端连接 | 资源:功能 | NGINX Plus | +| 上游服务器的 5xx 错误代码| 服务器错误 | 工作:错误 | NGINX Plus | +| 每个上游组的可用服务器 | 服务器传递健康检查 | 资源:可用性| NGINX Plus + +[反向代理][9]是 NGINX 最常见的使用方法之一。商业支持的 NGINX Plus 显示了大量有关后端(或“上游 upstream”)的服务器指标,这些与反向代理设置相关的。本节重点介绍了几个 NGINX Plus 用户可用的关键上游指标。 + +NGINX Plus 首先将它的上游指标按组分开,然后是针对单个服务器的。因此,例如,你的反向代理将请求分配到五个上游的 Web 服务器上,你可以一眼看出是否有单个服务器压力过大,也可以看出上游组中服务器的健康状况,以确保良好的响应时间。 + +**活跃指标** + +**每上游服务器的活跃连接**的数量可以帮助你确认反向代理是否正确的分配工作到你的整个服务器组上。如果你正在使用 NGINX 作为负载均衡器,任何一台服务器处理的连接数的明显偏差都可能表明服务器正在努力消化请求,或者是你配置使用的负载均衡的方法(例如[round-robin 或 IP hashing][10])不是最适合你流量模式的。 + +**错误指标** + +错误指标,上面所说的高于5XX(服务器错误)状态码,是监控指标中有价值的一个,尤其是响应码部分。 NGINX Plus 允许你轻松地提取**每个上游服务器的 5xx 错误代码**的数量,以及响应的总数量,以此来确定某个特定服务器的错误率。 + +**可用性指标** + +对于 web 服务器的运行状况,还有另一种角度,NGINX 可以通过**每个组中当前可用服务器的总量**很方便监控你的上游组的健康。在一个大的反向代理上,你可能不会非常关心其中一个服务器的当前状态,就像你只要有可用的服务器组能够处理当前的负载就行了。但监视上游组内的所有工作的服务器总量可为判断 Web 服务器的健康状况提供一个更高层面的视角。 + +**收集上游指标** + +NGINX Plus 上游指标显示在内部 NGINX Plus 的监控仪表盘上,并且也可通过一个JSON 接口来服务于各种外部监控平台。在我们的相关文章“[NGINX指标收集][6]”中有个例子。 + +### 结论 ### + +在这篇文章中,我们已经谈到了一些有用的指标,你可以使用表格来监控 NGINX 服务器。如果你是刚开始使用 NGINX,监控下面提供的大部分或全部指标,可以让你很好的了解你的网络基础设施的健康和活跃程度: + +- [已丢弃的连接][12] +- [每秒请求数][13] +- [服务器错误率][14] +- [请求处理数据][15] + +最终,你会学到更多,更专业的衡量指标,尤其是关于你自己基础设施和使用情况的。当然,监控哪一项指标将取决于你可用的工具。参见相关的文章来[逐步指导你的指标收集][6],不管你使用 NGINX 还是 NGINX Plus。 + +在 Datadog 中,我们已经集成了 NGINX 和 NGINX Plus,这样你就可以以最少的设置来收集和监控所有 Web 服务器的指标。 [在本文中][17]了解如何用 NGINX Datadog来监控,并开始[免费试用 Datadog][18]吧。 + +### 诚谢 ### + +在文章发表之前非常感谢 NGINX 团队审阅这篇,并提供重要的反馈和说明。 + + +-------------------------------------------------------------------------------- + +via: https://www.datadoghq.com/blog/how-to-monitor-nginx/ + +作者:K Young +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://nginx.org/en/ +[2]:http://nginx.com/resources/glossary/reverse-proxy-server/ +[3]:https://www.datadoghq.com/blog/monitoring-101-collecting-data/ +[4]:http://nginx.org/en/docs/ngx_core_module.html#worker_connections +[5]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#active-state +[6]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[7]:http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html +[8]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[9]:https://en.wikipedia.org/wiki/Reverse_proxy +[10]:http://nginx.com/blog/load-balancing-with-nginx-plus/ +[11]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[12]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#dropped-connections +[13]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#requests-per-second +[14]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#server-error-rate +[15]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#request-processing-time +[16]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ +[17]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ +[18]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#sign-up +[19]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_monitor_nginx.md +[20]:https://github.com/DataDog/the-monitor/issues diff --git a/translated/tech/20150717 How to monitor NGINX- Part 1.md b/translated/tech/20150717 How to monitor NGINX- Part 1.md deleted file mode 100644 index 86e72c0324..0000000000 --- a/translated/tech/20150717 How to monitor NGINX- Part 1.md +++ /dev/null @@ -1,416 +0,0 @@ -如何监控 NGINX - 第1部分 -================================================================================ -![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_1.png) - -### NGINX 是什么? ### - -[NGINX][1] (发音为 “engine X”) 是一种流行的 HTTP 和反向代理服务器。作为一个 HTTP 服务器,NGINX 提供静态内容非常高效可靠,使用较少的内存。作为[反向代理][2],它可以用作一个单一的控制器来为其他应用代理至后端的多个服务器上,如高速缓存和负载平衡。NGINX 是作为一个免费,开源的产品并有更全的功能,商业版的叫 NGINX Plus。 - -NGINX 也可以用作邮件代理和通用的 TCP 代理,但本文并不直接说明对 NGINX 的这些用例做监控。 - -### NGINX 主要指标 ### - -通过监控 NGINX 可以捕捉两类问题:NGINX 本身的资源问题,也有很多问题会出现在你的基础网络设施处。大多数 NGINX 用户受益于以下指标的监控,包括**requests per second**,它提供了一个所有用户活动的高级视图;**server error rate** ,这表明你的服务器已经多长没有处理看似有效的请求;还有**request processing time**,这说明你的服务器处理客户端请求的总共时长(并且可以看出性能降低时或当前环境的其他问题)。 - -更一般地,至少有三个主要的指标类别来监视: - -- 基本活动指标 -- 错误指标 -- 性能指标 - -下面我们将分析在每个类别中最重要的 NGINX 指标,以及用一个相当普遍的案例来说明,值得特别说明的是:使用 NGINX Plus 作反向代理。我们还将介绍如何使用图形工具或可选择的监控工具来监控所有的指标。 - -本文引用指标术语[介绍我们的监控在 101 系列][3],,它提供了指标收集和警告框架。 - -#### 基本活动指标 #### - -无论你在怎样的情况下使用 NGINX,毫无疑问你要监视服务器接收多少客户端请求和如何处理这些请求。 - -NGINX Plus 上像开源 NGINX 一样可以报告基本活动指标,但它也提供了略有不同的辅助模块。我们首先讨论开源的 NGINX,再来说明 NGINX Plus 提供的其他指标的功能。 - -**NGINX** - -下图显示了一个客户端连接,以及如何在连接过程中收集指标的活动周期在开源 NGINX 版本上。 - -![connection, request states](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_connection_diagram-2.png) - -接受,处理,增加请求的计数器。主动,等待,读,写增加和减少请求量。 - -注:表格 - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionMetric type
acceptsCount of client connections attempted by NGINXResource: Utilization
handledCount of successful client connectionsResource: Utilization
activeCurrently active client connectionsResource: Utilization
dropped (calculated)Count of dropped connections (accepts – handled)Work: Errors*
requestsCount of client requestsWork: Throughput
*Strictly speaking, dropped connections is a metric of resource saturation, but since saturation causes NGINX to stop servicing some work (rather than queuing it up for later), “dropped” is best thought of as a work metric.
- -NGINX 进程接受 OS 的连接请求时**accepts** 计数器增加,而**handled** 是当实际的请求得到连接时(通过建立一个新的连接或重新使用一个空闲的)。这两个计数器的值通常都是相同的,表明连接正在被**dropped**,往往由于资源限制,如 NGINX 的[worker_connections][4]的限制已经达到。 - -一旦 NGINX 成功处理一个连接时,连接会移动到**active**状态,然后保持为客户端请求进行处理: - -Active 状态 - -- **Waiting**: 活动的连接也可以是一个 Waiting 子状态,如果有在此刻没有活动请求。新连接绕过这个状态并直接移动到读,最常见的是使用“accept filter” 和 “deferred accept”,在这种情况下,NGINX 不会接收进程的通知,直到它具有足够的数据来开始响应工作。如果连接设置为 keep-alive ,连接在发送响应后将处于等待状态。 - -- **Reading**: 当接收到请求时,连接移出等待状态,并且该请求本身也被视为 Reading。在这种状态下NGINX 正在读取客户端请求首部。请求首部是比较少的,因此这通常是一个快速的操作。 - -- **Writing**: 请求被读取之后,将其计为 Writing,并保持在该状态,直到响应返回给客户端。这意味着,该请求在 Writing 时, NGINX 同时等待来自负载均衡服务器的结果(系统“背后”的 NGINX),NGINX 也同时响应。请求往往会花费大量的时间在 Writing 状态。 - -通常,一个连接在同一时间只接受一个请求。在这种情况下,Active 连接的数目 == Waiting 连接 + Reading 请求 + Writing 请求。然而,较新的 SPDY 和 HTTP/2 协议允许多个并发请求/响应对被复用的连接,所以 Active 可小于 Waiting,Reading,Writing 的总和。 (在撰写本文时,NGINX 不支持 HTTP/2,但预计到2015年期间将会支持。) - -**NGINX Plus** - -正如上面提到的,所有开源 NGINX 的指标在 NGINX Plus 中是可用的,但另外也提供其他的指标。本节仅说明了 NGINX Plus 可用的指标。 - - -![connection, request states](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_plus_connection_diagram-2.png) - -接受,中断,总数是不断增加的。活动,空闲和已建立连接的,当前状态下每一个连接或请​​求的数量是随着请求量增加和收缩的。 - -注:表格 - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionMetric type
acceptedCount of client connections attempted by NGINXResource: Utilization
droppedCount of dropped connectionsWork: Errors*
activeCurrently active client connectionsResource: Utilization
idleClient connections with zero current requestsResource: Utilization
totalCount of client requestsWork: Throughput
*Strictly speaking, dropped connections is a metric of resource saturation, but since saturation causes NGINX to stop servicing some work (rather than queuing it up for later), “dropped” is best thought of as a work metric.
- -当 NGINX Plus 进程接受 OS 的连接请求时 **accepted** 计数器递增。如果进程请求连接失败(通过建立一个新的连接或重新使用一个空闲),则该连接断开 **dropped** 计数增加。通常连接被中断是因为资源限制,如 NGINX Plus 的[worker_connections][4]的限制已经达到。 - -**Active** 和 **idle** 和开源 NGINX 的“active” 和 “waiting”状态是相同的,[如上所述][5],有一个不同的地方:在开源 NGINX 上,“waiting”状态包括在“active”中,而在 NGINX Plus 上“idle”的连接被排除在“active” 计数外。**Current** 和开源 NGINX 是一样的也是由“reading + writing” 状态组成。 - - -**Total** 为客户端请求的累积计数。请注意,单个客户端连接可涉及多个请求,所以这个数字可能会比连接的累计次数明显大。事实上,(total / accepted)是每个连接请求的平均数量。 - -**开源 和 Plus 之间指标的不同** - -注:表格 - --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NGINX (open-source)NGINX Plus
acceptsaccepted
dropped must be calculateddropped is reported directly
reading + writingcurrent
waitingidle
active (includes “waiting” states)active (excludes “idle” states)
requeststotal
- -**提醒指标: 中断连接** - -被中断的连接数目等于接受和处理之差(NGINX),或被公开直接作为指标的标准(NGINX加)。在正常情况下,中断连接数应该是零。如果每秒中中断连接的速度开始上升,寻找资源可能用尽的地方。 - -![Dropped connections](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/dropped_connections.png) - -**提醒指标: 每秒请求数** - -提供你(开源中的**requests**或者 Plus 中**total**)固定时间间隔每秒或每分钟请求的平均数据。监测这个指标可以查看 Web 的输入流量的最大值,无论是合法的还是恶意的,有可能会突然下降,通常可以看出问题。每秒的请求若发生急剧变化可以提醒你出问题了,即使它不能告诉你确切问题的位置所在。请注意,所有的请求都算作是相同的,无论哪个 URLs。 - -![Requests per second](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/requests_per_sec.png) - -**收集活动指标** - -开源的 NGINX 提供了一个简单状态页面来显示基本的服务器指标。该状态信息以标准格式被显示,实际上任何图形或监控工具可以被配置去解析相关的数据为分析,可视化,或提醒而用。NGINX Plus 提供一个 JSON 接口来显示更多的数据。阅读[NGINX 指标收集][6]后来启用指标收集的功能。 - -#### 错误指标 #### - -注:表格 - ----- - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionMetric typeAvailability
4xx codesCount of client errorsWork: ErrorsNGINX logs, NGINX Plus
5xx codesCount of server errorsWork: ErrorsNGINX logs, NGINX Plus
- -NGINX 错误指标告诉你服务器经常返回哪些错误,这也是有用的。客户端错误返回4XX状态码,服务器端错误返回5XX状态码。 - -**提醒指标: 服务器错误率** - -服务器错误率等于5xx错误状态代码的总数除以[状态码][7](1XX,2XX,3XX,4XX,5XX)的总数,每单位时间(通常为一到五分钟)的数目。如果你的错误率随着时间的推移开始攀升,调查可能的原因。如果突然增加,可能需要采取紧急行动,因为客户端可能收到错误信息。 - -![Server error rate](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/5xx_rate.png) - -客户端收到错误时的注意事项:虽然监控4XX是很有用的,但从该指标中你仅可以捕捉有限的信息,因为它只是衡量客户的行为而不捕捉任何特殊的 URLs。换句话说,在4xx出现时只是相当于一点噪音,例如寻找漏洞的网络扫描仪。 - -**收集错误度量** - -虽然开源 NGINX 不会监测错误率,但至少有两种方法可以捕获其信息: - -- 使用商业支持的 NGINX Plus 提供的可扩展状态模块 -- 配置 NGINX 的日志模块将响应码写入访问日志 - -阅读关于 NGINX 指标收集的后两个方法的详细说明。 - -#### 性能指标 #### - -注:表格 - ----- - - - - - - - - - - - - - - - - -
NameDescriptionMetric typeAvailability
request timeTime to process each request, in secondsWork: PerformanceNGINX logs
- -**提醒指标: 请求处理时间** - -请求时间指标记录 NGINX 处理每个请求的时间,从第一个客户端的请求字节读出到完成请求。较长的响应时间可以将问题指向负载均衡服务器。 - -**收集处理时间指标** - -NGINX 和 NGINX Plus 用户可以通过添加 $request_time 变量到访问日志格式中来捕​​捉处理时间数据。关于配置日志监控的更多细节在[NGINX指标收集][8]。 - -#### 反向代理指标 #### - -注:表格 - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionMetric typeAvailability
Active connections by upstream serverCurrently active client connectionsResource: UtilizationNGINX Plus
5xx codes by upstream serverServer errorsWork: ErrorsNGINX Plus
Available servers per upstream groupServers passing health checksResource: AvailabilityNGINX Plus
- -[反向代理][9]是 NGINX 最常见的使用方法之一。商业支持的 NGINX Plus 显示了大量有关后端(或“负载均衡”)的服务器指标,这是反向代理设置的。本节重点介绍了几个关键的负载均衡服务器的指标为 NGINX Plus 用户。 - -NGINX Plus 的负载均衡服务器指标首先是组的,然后是单个服务器的。因此,例如,你的反向代理将请求分配到五个 Web 负载均衡服务器上,你可以一眼看出是否有单个服务器压力过大,也可以看出负载均衡服务器组的健康状况,以确保良好的响应时间。 - -**活动指标** - -**active connections per upstream server**的数量可以帮助你确认反向代理是否正确的分配工作到负载均衡服务器上。如果你正在使用 NGINX 作为负载均衡器,任何一台服务器处理的连接数有显著的偏差都可能表明服务器正在努力处理请求或你配置处理请求的负载均衡的方法(例如[round-robin or IP hashing][10])不是最适合你流量模式的。 - -**错误指标** - -错误指标,上面所说的高于5XX(服务器错误)状态码,是监控指标中有价值的一个,尤其是响应码部分。 NGINX Plus 允许你轻松地提取每个负载均衡服务器 **5xx codes per upstream server**的数量,以及响应的总数量,以此来确定该特定服务器的错误率。 - - -**可用性指标** - -对于 web 服务器的运行状况,另一种观点认为,NGINX 也可以很方便监控你的负载均衡服务器组的健康通过**servers currently available within each group**的总量​​。在一个大的反向代理上,你可能不会非常关心其中一个服务器的当前状态,就像你只要可用的服务器组能够处理当前的负载就行了。但监视负载均衡服务器组内的所有服务器可以提供一个高水平的图像来判断 Web 服务器的健康状况。 - -**收集负载均衡服务器的指标** - -NGINX Plus 负载均衡服务器的指标显示在内部 NGINX Plus 的监控仪表盘上,并且也可通过一个JSON 接口来服务于所有外部的监控平台。在这儿看一个例子[收集 NGINX 指标][11]。 - -### 结论 ### - -在这篇文章中,我们已经谈到了一些有用的指标,你可以使用表格来监控 NGINX 服务器。如果你是刚开始使用 NGINX,下面提供了良好的网络基础设施的健康和活动的可视化工具来监控大部分或所有的指标: - -- [Dropped connections][12] -- [Requests per second][13] -- [Server error rate][14] -- [Request processing time][15] - -最终,你会学到更多,更专业的衡量指标,尤其是关于你自己基础设施和使用情况的。当然,监控哪一项指标将取决于你可用的工具。参见[一步一步来说明指标收集][16],不管你使用 NGINX 还是 NGINX Plus。 - - - -在 Datadog 中,我们已经集成了 NGINX 和 NGINX Plus,这样你就可以以最小的设置来收集和监控所有 Web 服务器的指标。了解如何用 NGINX Datadog来监控 [在本文中][17],并开始使用 [免费的 Datadog][18]。 - -### Acknowledgments ### - -在文章发表之前非常感谢 NGINX 团队审阅这篇,并提供重要的反馈和说明。 - ----------- - -文章来源在这儿 [on GitHub][19]。问题,更正,补充等?请[告诉我们][20]。 - - --------------------------------------------------------------------------------- - -via: https://www.datadoghq.com/blog/how-to-monitor-nginx/ - -作者:K Young -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://nginx.org/en/ -[2]:http://nginx.com/resources/glossary/reverse-proxy-server/ -[3]:https://www.datadoghq.com/blog/monitoring-101-collecting-data/ -[4]:http://nginx.org/en/docs/ngx_core_module.html#worker_connections -[5]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#active-state -[6]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ -[7]:http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html -[8]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ -[9]:https://en.wikipedia.org/wiki/Reverse_proxy -[10]:http://nginx.com/blog/load-balancing-with-nginx-plus/ -[11]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ -[12]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#dropped-connections -[13]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#requests-per-second -[14]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#server-error-rate -[15]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#request-processing-time -[16]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ -[17]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ -[18]:https://www.datadoghq.com/blog/how-to-monitor-nginx/#sign-up -[19]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_monitor_nginx.md -[20]:https://github.com/DataDog/the-monitor/issues From 67aff80abfcf06fefd44d67bb4a263d90f743d38 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 7 Aug 2015 00:25:48 +0800 Subject: [PATCH 1636/2517] Delete 20150803 Handy commands for profiling your Unix file systems.md --- ...ds for profiling your Unix file systems.md | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 sources/tech/20150803 Handy commands for profiling your Unix file systems.md diff --git a/sources/tech/20150803 Handy commands for profiling your Unix file systems.md b/sources/tech/20150803 Handy commands for profiling your Unix file systems.md deleted file mode 100644 index 359aba14c9..0000000000 --- a/sources/tech/20150803 Handy commands for profiling your Unix file systems.md +++ /dev/null @@ -1,65 +0,0 @@ -translation by strugglingyouth -Handy commands for profiling your Unix file systems -================================================================================ -![Credit: Sandra H-S](http://images.techhive.com/images/article/2015/07/file-profile-100597239-primary.idge.png) -Credit: Sandra H-S - -One of the problems that seems to plague nearly all file systems -- Unix and others -- is the continuous buildup of files. Almost no one takes the time to clean out files that they no longer use and file systems, as a result, become so cluttered with material of little or questionable value that keeping them them running well, adequately backed up, and easy to manage is a constant challenge. - -One way that I have seen to help encourage the owners of all that data detritus to address the problem is to create a summary report or "profile" of a file collection that reports on such things as the number of files; the oldest, newest, and largest of those files; and a count of who owns those files. If someone realizes that a collection of half a million files contains none less than five years old, they might go ahead and remove them -- or, at least, archive and compress them. The basic problem is that huge collections of files are overwhelming and most people are afraid that they might accidentally delete something important. Having a way to characterize a file collection can help demonstrate the nature of the content and encourage those digital packrats to clean out their nests. - -When I prepare a file system summary report on Unix, a handful of Unix commands easily provide some very useful statistics. To count the files in a directory, you can use a find command like this. - - $ find . -type f | wc -l - 187534 - -Finding the oldest and newest files is a bit more complicated, but still quite easy. In the commands below, we're using the find command again to find files, displaying the data with a year-month-day format that makes it possible to sort by file age, and then displaying the top -- thus the oldest -- file in that list. - -In the second command, we do the same, but print the last line -- thus the newest -- file. - - $ find -type f -printf '%T+ %p\n' | sort | head -n 1 - 2006-02-03+02:40:33 ./skel/.xemacs/init.el - $ find -type f -printf '%T+ %p\n' | sort | tail -n 1 - 2015-07-19+14:20:16 ./.bash_history - -The %T (file date and time) and %p (file name with path) parameters with the printf command allow this to work. - -If we're looking at home directories, we're undoubtedly going to find that history files are the newest files and that isn't likely to be a very interesting bit of information. You can omit those files by "un-grepping" them or you can omit all files that start with dots as shown below. - - $ find -type f -printf '%T+ %p\n' | grep -v "\./\." | sort | tail -n 1 - 2015-07-19+13:02:12 ./isPrime - -Finding the largest file involves using the %s (size) parameter and we include the file name (%f) since that's what we want the report to show. - - $ find -type f -printf '%s %f \n' | sort -n | uniq | tail -1 - 20183040 project.org.tar - -To summarize file ownership, use the %u (owner) - - $ find -type f -printf '%u \n' | grep -v "\./\." | sort | uniq -c - 180034 shs - 7500 jdoe - -If your file system also records the last access date, it can be very useful to show that files haven't been accessed in, say, more than two years. This would give your reviewers an important insight into the value of those files. The last access parameter (%a) could be used like this: - - $ find -type f -printf '%a+ %p\n' | sort | head -n 1 - Fri Dec 15 03:00:30 2006+ ./statreport - -Of course, if the most recently accessed file is also in the deep dark past, that's likely to get even more of a reaction. - - $ find -type f -printf '%a+ %p\n' | sort | tail -n 1 - Wed Nov 26 03:00:27 2007+ ./my-notes - -Getting a sense of what's in a file system or large directory by creating a summary report showing the file date ranges, the largest files, the file owners, and the oldest and new access times can help to demonstrate how current and how important a file collection is and help its owners decide if it's time to clean up. - --------------------------------------------------------------------------------- - -via: http://www.itworld.com/article/2949898/linux/profiling-your-file-systems.html - -作者:[Sandra Henry-Stocker][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.itworld.com/author/Sandra-Henry_Stocker/ From 63ad6aab7dce0df6174c05b1dd83a62405af46f3 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 7 Aug 2015 00:27:30 +0800 Subject: [PATCH 1637/2517] Create 20150803 Handy commands for profiling your Unix file systems.md --- ...ds for profiling your Unix file systems.md | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 translated/tech/20150803 Handy commands for profiling your Unix file systems.md diff --git a/translated/tech/20150803 Handy commands for profiling your Unix file systems.md b/translated/tech/20150803 Handy commands for profiling your Unix file systems.md new file mode 100644 index 0000000000..13efdcf0a1 --- /dev/null +++ b/translated/tech/20150803 Handy commands for profiling your Unix file systems.md @@ -0,0 +1,66 @@ + +很实用的命令来分析你的 Unix 文件系统 +================================================================================ +![Credit: Sandra H-S](http://images.techhive.com/images/article/2015/07/file-profile-100597239-primary.idge.png) +Credit: Sandra H-S + +其中一个问题几乎困扰着所有的文件系统 -- 包括 Unix 和其他的 -- 那就是文件的不断积累。几乎没有人愿意花时间清理掉他们不再使用的文件和文件系统,结果,文件变得很混乱,很难找到有用的东西使它们运行良好,能够得到备份,并且易于管理,这将是一种持久的挑战。 + +我见过的一种解决问题的方法是鼓励使用者将所有的数据碎屑创建成一个总结报告或"profile"这样一个文件集合来报告所有的文件数量;最老的,最新的,最大的文件;并统计谁拥有这些文件。如果有人看到一个包含五十万个文件的文件夹并且时间不小于五年,他们可能会去删除哪些文件 -- 或者,至少归档和压缩。主要问题是太大的文件夹会使人产生压制性害怕误删一些重要的东西。有一个描述文件夹的方法能帮助显示文件的性质并期待你去清理它。 + + +当我准备做 Unix 文件系统的总结报告时,几个有用的 Unix 命令能提供一些非常有用的统计信息。要计算目录中的文件数,你可以使用这样一个 find 命令。 + + $ find . -type f | wc -l + 187534 + +查找最老的和最新的文件是比较复杂,但还是相当方便的。在下面的命令,我们使用 find 命令再次查找文件,以文件时间排序并按年-月-日的格式显示在顶部 -- 因此最老的 -- 的文件在列表中。 + +在第二个命令,我们做同样的,但打印的是最后一行 -- 这是最新的 -- 文件 + + $ find -type f -printf '%T+ %p\n' | sort | head -n 1 + 2006-02-03+02:40:33 ./skel/.xemacs/init.el + $ find -type f -printf '%T+ %p\n' | sort | tail -n 1 + 2015-07-19+14:20:16 ./.bash_history + +printf 命令输出 %T(文件日期和时间)和 %P(带路径的文件名)参数。 + +如果我们在查找家目录时,无疑会发现,history 文件是最新的,这不像是一个很有趣的信息。你可以通过 "un-grepping" 来忽略这些文件,也可以忽略以.开头的文件,如下图所示的。 + + $ find -type f -printf '%T+ %p\n' | grep -v "\./\." | sort | tail -n 1 + 2015-07-19+13:02:12 ./isPrime + +寻找最大的文件使用 %s(大小)参数,包括文件名(%f),因为这就是我们想要在报告中显示的。 + + $ find -type f -printf '%s %f \n' | sort -n | uniq | tail -1 + 20183040 project.org.tar + +打印文件的所有着者,使用%u(所有者) + + $ find -type f -printf '%u \n' | grep -v "\./\." | sort | uniq -c + 180034 shs + 7500 jdoe + +如果文件系统能记录上次的访问日期,也将是非常有用的来看该文件有没有被访问,比方说,两年之内。这将使你能明确分辨这些文件的价值。最后一个访问参数(%a)这样使用: + + $ find -type f -printf '%a+ %p\n' | sort | head -n 1 + Fri Dec 15 03:00:30 2006+ ./statreport + +当然,如果最近​​访问的文件也是在很久之前的,这将使你有更多的处理时间。 + + $ find -type f -printf '%a+ %p\n' | sort | tail -n 1 + Wed Nov 26 03:00:27 2007+ ./my-notes + +一个文件系统要层次分明,为大目录创建一个总结报告,显示该文件的日期范围,最大的文件,文件所有者,最老的和访问时间都可以帮助文件拥有者判断当前有哪些文件夹是重要的哪些该清理了。 + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/2949898/linux/profiling-your-file-systems.html + +作者:[Sandra Henry-Stocker][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.itworld.com/author/Sandra-Henry_Stocker/ From e33f5e9a1b751567fb5498697363c30c48dff32e Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 7 Aug 2015 00:35:21 +0800 Subject: [PATCH 1638/2517] PUB:20150806 5 Reasons Why Software Developer is a Great Career Choice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @mousycoder 明早9:30 发布:https://linux.cn/article-5971-1.html 原文现在取消了大部分配图(配图有问题),所以我也取消了。 翻译的不错,我基本没怎么改动。 --- ...ware Developer is a Great Career Choice.md | 75 +++++++++++++++ ...ware Developer is a Great Career Choice.md | 91 ------------------- 2 files changed, 75 insertions(+), 91 deletions(-) create mode 100644 published/20150806 5 Reasons Why Software Developer is a Great Career Choice.md delete mode 100644 translated/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md diff --git a/published/20150806 5 Reasons Why Software Developer is a Great Career Choice.md b/published/20150806 5 Reasons Why Software Developer is a Great Career Choice.md new file mode 100644 index 0000000000..12831e66ad --- /dev/null +++ b/published/20150806 5 Reasons Why Software Developer is a Great Career Choice.md @@ -0,0 +1,75 @@ +选择成为软件开发工程师的5个原因 +================================================================================ + +![](http://henrikwarne1.files.wordpress.com/2011/09/cropped-desk1.jpg) + +这个星期我将给本地一所高中做一次有关于程序猿是怎样工作的演讲。我是志愿(由 [Transfer][1] 组织的)来到这所学校谈论我的工作的。这个学校本周将有一个技术主题日,并且他们很想听听科技行业是怎样工作的。因为我是从事软件开发的,这也是我将和学生们讲的内容。演讲的其中一部分是我为什么觉得软件开发是一个很酷的职业。主要原因如下: + +### 5个原因 ### + +**1、创造性** + +如果你问别人创造性的工作有哪些,别人通常会说像作家,音乐家或者画家那样的(工作)。但是极少有人知道软件开发也是一项非常具有创造性的工作。它是最符合创造性定义的了,因为你创造了一个以前没有的新功能。这种解决方案可以在整体和细节上以很多形式来展现。我们经常会遇到一些需要做权衡的场景(比如说运行速度与内存消耗的权衡)。当然前提是这种解决方案必须是正确的。这些所有的行为都是需要强大的创造性的。 + +**2、协作性** + +另外一个表象是程序猿们独自坐在他们的电脑前,然后撸一天的代码。但是软件开发事实上通常总是一个团队努力的结果。你会经常和你的同事讨论编程问题以及解决方案,并且和产品经理、测试人员、客户讨论需求以及其他问题。 +经常有人说,结对编程(2个开发人员一起在一个电脑上编程)是一种流行的最佳实践。 + +**3、高需性** + +世界上越来越多的人在用软件,正如 [Marc Andreessen](https://en.wikipedia.org/wiki/Marc_Andreessen) 所说 " [软件正在吞噬世界][2] "。虽然程序猿现在的数量非常巨大(在斯德哥尔摩,程序猿现在是 [最普遍的职业][3] ),但是,需求量一直处于供不应求的局面。据软件公司说,他们最大的挑战之一就是 [找到优秀的程序猿][4] 。我也经常接到那些想让我跳槽的招聘人员打来的电话。我知道至少除软件行业之外的其他行业的雇主不会那么拼(的去招聘)。 + +**4、高酬性** + +软件开发可以带来不菲的收入。卖一份你已经开发好的软件的额外副本是没有 [边际成本][5] 的。这个事实与对程序猿的高需求意味着收入相当可观。当然还有许多更捞金的职业,但是相比一般人群,我认为软件开发者确实“日进斗金”(知足吧!骚年~~)。 + +**5、前瞻性** + +有许多工作岗位消失,往往是由于它们可以被计算机和软件代替。但是所有这些新的程序依然需要开发和维护,因此,程序猿的前景还是相当好的。 + +### 但是...### + +**外包又是怎么一回事呢?** + +难道所有外包到其他国家的软件开发的薪水都很低吗?这是一个理想丰满,现实骨感的例子(有点像 [瀑布开发模型][6] )。软件开发基本上跟设计的工作一样,是一个探索发现的工作。它受益于强有力的合作。更进一步说,特别当你的主打产品是软件的时候,你所掌握的开发知识是绝对的优势。知识在整个公司中分享的越容易,那么公司的发展也将越来越好。 + +换一种方式去看待这个问题。软件外包已经存在了相当一段时间了。但是对本土程序猿的需求量依旧非常高。因为许多软件公司看到了雇佣本土程序猿的带来的收益要远远超过了相对较高的成本(其实还是赚了)。 + +### 如何成为人生大赢家 ### + +虽然我有许多我认为软件开发是一件非常有趣的事情的理由 (详情见: [为什么我热爱编程][7] )。但是这些理由,并不适用于所有人。幸运的是,尝试编程是一件非常容易的事情。在互联网上有数不尽的学习编程的资源。例如,[Coursera][8] 和 [Udacity][9] 都拥有很好的入门课程。如果你从来没有撸过码,可以尝试其中一个免费的课程,找找感觉。 + +寻找一个既热爱又能谋生的事情至少有2个好处。首先,由于你天天去做,工作将比你简单的只为谋生要有趣的多。其次,如果你真的非常喜欢,你将更好的擅长它。我非常喜欢下面一副关于伟大工作组成的韦恩图(作者 [@eskimon)][10]) 。因为编码的薪水确实相当不错,我认为如果你真的喜欢它,你将有一个很好的机会,成为人生的大赢家! + +![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/17571624.jpg) + +-------------------------------------------------------------------------------- + +via: http://henrikwarne.com/2014/12/08/5-reasons-why-software-developer-is-a-great-career-choice/ + +作者:[Henrik Warne][a] +译者:[mousycoder](https://github.com/mousycoder) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + + +[a]:http://henrikwarne.com/ +[1]:http://www.transfer.nu/omoss/transferinenglish.jspx?pageId=23 +[2]:http://www.wsj.com/articles/SB10001424053111903480904576512250915629460 +[3]:http://www.di.se/artiklar/2014/6/12/jobbet-som-tar-over-landet/ +[4]:http://computersweden.idg.se/2.2683/1.600324/examinationstakten-racker-inte-for-branschens-behov +[5]:https://en.wikipedia.org/wiki/Marginal_cost +[6]:https://en.wikipedia.org/wiki/Waterfall_model +[7]:http://henrikwarne.com/2012/06/02/why-i-love-coding/ +[8]:https://www.coursera.org/ +[9]:https://www.udacity.com/ +[10]:https://eskimon.wordpress.com/about/ + + + + + + + diff --git a/translated/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md b/translated/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md deleted file mode 100644 index a592cb595e..0000000000 --- a/translated/talk/20150806 5 Reasons Why Software Developer is a Great Career Choice.md +++ /dev/null @@ -1,91 +0,0 @@ -选择软件开发攻城师的5个原因 -================================================================================ -这个星期我将给本地一所高中做一次有关于程序猿是怎样工作的演讲,我是 [Transfer][1] 组织推荐来到这所学校,谈论我的工作。这个学校本周将有一个技术主题日,并且他们很想听听科技行业是怎样工作的。因为我是从事软件开发的,这也是我将和学生们讲的内容。我为什么觉得软件开发是一个很酷的职业将是演讲的其中一部分。主要原因如下: - -### 5个原因 ### - -**1 创造性** - -![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/34042817.jpg) - -如果你问别人创造性的工作有哪些,别人通常会说像作家,音乐家或者画家那样的(工作)。但是极少有人知道软件开发也是一项非常具有创造性的工作。因为你创造了一个以前没有的新功能,这样的功能基本上可以被定义为非常具有创造性。这种解决方案可以在整体和细节上以很多形式来展现。我们经常会遇到一些需要做权衡的场景(比如说运行速度与内存消耗的权衡)。当然前提是这种解决方案必须是正确的。其实这些所有的行为都是需要强大的创造性的。 - -**2 协作性** - -![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/94579377.jpg) - -另外一个表象是程序猿们独自坐在他们的电脑前,然后撸一天的代码。但是软件开发事实上通常总是一个团队努力的结果。你会经常和你的同事讨论编程问题以及解决方案,并且和产品经理,测试人员,客户讨论需求以及其他问题。 -经常有人说,结对编程(2个开发人员一起在一个电脑上编程)是一种流行的最佳实践。 - - -**3 高需性** - -![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/26662164.jpg) - -世界上越来越多的人在用软件,正如 [Marc Andreessen](https://en.wikipedia.org/wiki/Marc_Andreessen) 所说 " [软件正在吞噬世界][2] "。虽然程序猿现在的数量非常巨大(在斯德哥尔摩,程序猿现在是 [最普遍的职业][3] ),但是,需求量一直处于供不应求的局面。据软件公司报告,他们最大的挑战之一就是 [找到优秀的程序猿][4] 。我也经常接到那些想让我跳槽的招聘人员打来的电话。我知道至少除软件行业之外的其他行业的雇主不会那么拼(的去招聘)。 - -**4 高酬性** - - -![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/50538928.jpg) - -软件开发可以带来不菲的收入。卖一份你已经开发好的软件的额外副本是没有 [边际成本][5] 的。这个事实与对程序猿的高需求意味着收入相当可观。当然还有许多更捞金的职业,但是相比一般人群,我认为软件开发者确实“日进斗金”(知足吧!骚年~~)。 - -**5 前瞻性** - -![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/89799239.jpg) - -有许多工作岗位消失,往往是由于它们可以被计算机和软件代替。但是所有这些新的程序依然需要开发和维护,因此,程序猿的前景还是相当好的。 - - -### 但是...### - -**外包又是怎么一回事呢?** - -![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/41615753.jpg) - -难道所有外包到其他地区的软件开发的薪水都很低吗?这是一个理想丰满,现实骨感的例子(有点像 [瀑布开发模型][6] )。软件开发基本上跟设计的工作一样,是一个探索发现的工作。它受益于强有力的合作。更进一步说,特别当你的主打产品是软件的时候,你所掌握的开发知识是绝对的优势。知识在整个公司中分享的越容易,那么公司的发展也将越来越好。 - - -换一种方式去看待这个问题。软件外包已经存在了相当一段时间了。但是对本土程序猿的需求量依旧非常高。因为许多软件公司看到了雇佣本土程序猿的带来的收益要远远超过了相对较高的成本(其实还是赚了)。 - -### 如何成为人生大赢家 ### - - -![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/44219908.jpg) - -虽然我有许多我认为软件开发是一件非常有趣的事情的理由 (详情见: [为什么我热爱编程][7] )。但是这些理由,并不适用于所有人。幸运的是,尝试编程是一件非常容易的事情。在互联网上有数不尽的学习编程的资源。例如,[Coursera][8] 和 [Udacity][9] 都拥有很好的入门课程。如果你从来没有撸过码,可以尝试其中一个免费的课程,找找感觉。 - -寻找一个既热爱又能谋生的事情至少有2个好处。首先,由于你天天去做,工作将比你简单的只为谋生要有趣的多。其次,如果你真的非常喜欢,你将更好的擅长它。我非常喜欢下面一副关于伟大工作组成的韦恩图(作者 [@eskimon)][10] 。因为编码的薪水确实相当不错,我认为如果你真的喜欢它,你将有一个很好的机会,成为人生的大赢家! - -![](http://7xjl4u.com1.z0.glb.clouddn.com/15-8-6/17571624.jpg) - --------------------------------------------------------------------------------- - -via: http://henrikwarne.com/2014/12/08/5-reasons-why-software-developer-is-a-great-career-choice/ - -作者:[Henrik Warne][a] -译者:[mousycoder](https://github.com/mousycoder) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - - -[a]:http://henrikwarne.com/ -[1]:http://www.transfer.nu/omoss/transferinenglish.jspx?pageId=23 -[2]:http://www.wsj.com/articles/SB10001424053111903480904576512250915629460 -[3]:http://www.di.se/artiklar/2014/6/12/jobbet-som-tar-over-landet/ -[4]:http://computersweden.idg.se/2.2683/1.600324/examinationstakten-racker-inte-for-branschens-behov -[5]:https://en.wikipedia.org/wiki/Marginal_cost -[6]:https://en.wikipedia.org/wiki/Waterfall_model -[7]:http://henrikwarne.com/2012/06/02/why-i-love-coding/ -[8]:https://www.coursera.org/ -[9]:https://www.udacity.com/ -[10]:https://eskimon.wordpress.com/about/ - - - - - - - From bc21018f00e1834be2d8c597855f247441788256 Mon Sep 17 00:00:00 2001 From: Ping Date: Fri, 7 Aug 2015 08:20:37 +0800 Subject: [PATCH 1639/2517] Translating --- ...06 Linux FAQs with Answers--How to install git on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md b/sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md index c5c34f3a72..c9610a2dfe 100644 --- a/sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md +++ b/sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md @@ -1,3 +1,5 @@ +Translating by Ping + Linux FAQs with Answers--How to install git on Linux ================================================================================ > **Question:** I am trying to clone a project from a public Git repository, but I am getting "git: command not found" error. How can I install git on [insert your Linux distro]? @@ -69,4 +71,4 @@ via: http://ask.xmodulo.com/install-git-linux.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni -[1]:https://github.com/git/git/releases \ No newline at end of file +[1]:https://github.com/git/git/releases From 6d313b52541e7bfd243825ad0a9d06a78d7c998b Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 7 Aug 2015 08:54:23 +0800 Subject: [PATCH 1640/2517] Update 20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md --- ...to fix 'ImportError--No module named wxversion' on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md b/sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md index 11d814d8f4..66af8413fd 100644 --- a/sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md +++ b/sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Linux FAQs with Answers--How to fix “ImportError: No module named wxversion” on Linux ================================================================================ > **Question:** I was trying to run a Python application on [insert your Linux distro], but I got an error "ImportError: No module named wxversion." How can I solve this error in the Python program? @@ -46,4 +47,4 @@ via: http://ask.xmodulo.com/importerror-no-module-named-wxversion.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://wxpython.org/ -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html \ No newline at end of file +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html From f26be7487f95cd3f5098ab147e42da5e74d599e0 Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Fri, 7 Aug 2015 08:59:37 +0800 Subject: [PATCH 1641/2517] =?UTF-8?q?=E3=80=90Translating=20by=20dingdongn?= =?UTF-8?q?igetou=E3=80=9120150730=20Howto=20Configure=20Nginx=20as=20Rrev?= =?UTF-8?q?erse=20Proxy=20or=20Load=20Balancer=20with=20Weave=20and=20Dock?= =?UTF-8?q?er.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Rreverse Proxy or Load Balancer with Weave and Docker.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md b/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md index 82c592d3b4..f217db9c70 100644 --- a/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md +++ b/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md @@ -1,3 +1,6 @@ + +Translating by dingdongnigetou + Howto Configure Nginx as Rreverse Proxy / Load Balancer with Weave and Docker ================================================================================ Hi everyone today we'll learnHowto configure Nginx as Rreverse Proxy / Load balancer with Weave and Docker Weave creates a virtual network that connects Docker containers with each other, deploys across multiple hosts and enables their automatic discovery. It allows us to focus on developing our application, rather than our infrastructure. It provides such an awesome environment that the applications uses the network as if its containers were all plugged into the same network without need to configure ports, mappings, link, etc. The services of the application containers on the network can be easily accessible to the external world with no matter where its running. Here, in this tutorial we'll be using weave to quickly and easily deploy nginx web server as a load balancer for a simple php application running in docker containers on multiple nodes in Amazon Web Services. Here, we will be introduced to WeaveDNS, which provides a simple way for containers to find each other using hostname with no changes in codes and tells other containers to connect to those names. @@ -123,4 +126,4 @@ via: http://linoxide.com/linux-how-to/nginx-load-balancer-weave-docker/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:http://console.aws.amazon.com/ \ No newline at end of file +[1]:http://console.aws.amazon.com/ From dfa1d5bf8796e70c8ee522a1bb67e6d68efd97a0 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 7 Aug 2015 09:09:47 +0800 Subject: [PATCH 1642/2517] [Translated]20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md --- ...or--No module named wxversion' on Linux.md | 50 ------------------- ...or--No module named wxversion' on Linux.md | 49 ++++++++++++++++++ 2 files changed, 49 insertions(+), 50 deletions(-) delete mode 100644 sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md create mode 100644 translated/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md diff --git a/sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md b/sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md deleted file mode 100644 index 66af8413fd..0000000000 --- a/sources/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md +++ /dev/null @@ -1,50 +0,0 @@ -Translating by GOLinux! -Linux FAQs with Answers--How to fix “ImportError: No module named wxversion” on Linux -================================================================================ -> **Question:** I was trying to run a Python application on [insert your Linux distro], but I got an error "ImportError: No module named wxversion." How can I solve this error in the Python program? - - Looking for python... 2.7.9 - Traceback (most recent call last): - File "/home/dev/playonlinux/python/check_python.py", line 1, in - import os, wxversion - ImportError: No module named wxversion - failed tests - -This error indicates that your Python application is GUI-based, relying on a missing Python module called wxPython. [wxPython][1] is a Python extension module for the wxWidgets GUI library, popularly used by C++ programmers to design GUI applications. The wxPython extension allows Python developers to easily design and integrate GUI within any Python application. - -To solve this import error, you need to install wxPython on your Linux, as described below. - -### Install wxPython on Debian, Ubuntu or Linux Mint ### - - $ sudo apt-get install python-wxgtk2.8 - -### Install wxPython on Fedora ### - - $ sudo yum install wxPython - -### Install wxPython on CentOS/RHEL ### - -wxPython is available on the EPEL repository of CentOS/RHEL, not on base repositories. Thus, first [enable EPEL repository][2] on your system, and then use yum command. - - $ sudo yum install wxPython - -### Install wxPython on Arch Linux ### - - $ sudo pacman -S wxpython - -### Install wxPython on Gentoo ### - - $ emerge wxPython - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/importerror-no-module-named-wxversion.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://ask.xmodulo.com/author/nanni -[1]:http://wxpython.org/ -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html diff --git a/translated/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md b/translated/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md new file mode 100644 index 0000000000..2a937daeff --- /dev/null +++ b/translated/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md @@ -0,0 +1,49 @@ +Linux有问必答——如何修复Linux上的“ImportError: No module named wxversion”错误 +================================================================================ + +> **问题** 我试着在[你的Linux发行版]上运行一个Python应用,但是我得到了这个错误"ImportError: No module named wxversion."。我怎样才能解决Python程序中的这个错误呢? + + Looking for python... 2.7.9 - Traceback (most recent call last): + File "/home/dev/playonlinux/python/check_python.py", line 1, in + import os, wxversion + ImportError: No module named wxversion + failed tests + +该错误表明,你的Python应用是基于GUI的,依赖于一个名为wxPython的缺失模块。[wxPython][1]是一个用于wxWidgets GUI库的Python扩展模块,普遍被C++程序员用来设计GUI应用。该wxPython扩展允许Python开发者在任何Python应用中方便地设计和整合GUI。 +To solve this import error, you need to install wxPython on your Linux, as described below. + +### 安装wxPython到Debian,Ubuntu或Linux Mint ### + + $ sudo apt-get install python-wxgtk2.8 + +### 安装wxPython到Fedora ### + + $ sudo yum install wxPython + +### 安装wxPython到CentOS/RHEL ### + +wxPython可以在CentOS/RHEL的EPEL仓库中获取到,而基本仓库中则没有。因此,首先要在你的系统中[启用EPEL仓库][2],然后使用yum命令来安装。 + + $ sudo yum install wxPython + +### 安装wxPython到Arch Linux ### + + $ sudo pacman -S wxpython + +### 安装wxPython到Gentoo ### + + $ emerge wxPython + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/importerror-no-module-named-wxversion.html + +作者:[Dan Nanni][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://wxpython.org/ +[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html From 09b98f265e23ed5ec0c759f2e16c749288a47728 Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 7 Aug 2015 09:11:45 +0800 Subject: [PATCH 1643/2517] Update 20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md --- ...ogging in Open vSwitch for debugging and troubleshooting.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md b/sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md index 2b4e16bcaf..dcf811a003 100644 --- a/sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md +++ b/sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md @@ -1,3 +1,4 @@ +Translating by GOlinu! Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting ================================================================================ > **Question:** I am trying to troubleshoot my Open vSwitch deployment. For that I would like to inspect its debug messages generated by its built-in logging mechanism. How can I enable logging in Open vSwitch, and change its logging level (e.g., to INFO/DEBUG level) to check more detailed debug information? @@ -66,4 +67,4 @@ via: http://ask.xmodulo.com/enable-logging-open-vswitch.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 6323f7946f874af701db19742a8c6931b59aeb11 Mon Sep 17 00:00:00 2001 From: Ping Date: Fri, 7 Aug 2015 09:39:48 +0800 Subject: [PATCH 1644/2517] Complete 20150806 Linux FAQs with Answers--How to install git on Linux.md --- ...th Answers--How to install git on Linux.md | 74 ------------------- ...th Answers--How to install git on Linux.md | 73 ++++++++++++++++++ 2 files changed, 73 insertions(+), 74 deletions(-) delete mode 100644 sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md create mode 100644 translated/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md diff --git a/sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md b/sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md deleted file mode 100644 index c9610a2dfe..0000000000 --- a/sources/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md +++ /dev/null @@ -1,74 +0,0 @@ -Translating by Ping - -Linux FAQs with Answers--How to install git on Linux -================================================================================ -> **Question:** I am trying to clone a project from a public Git repository, but I am getting "git: command not found" error. How can I install git on [insert your Linux distro]? - -Git is a popular open-source version control system (VCS) originally developed for Linux environment. Contrary to other VCS tools like CVS or SVN, Git's revision control is considered "distributed" in a sense that your local Git working directory can function as a fully-working repository with complete history and version-tracking capabilities. In this model, each collaborator commits to his or her local repository (as opposed to always committing to a central repository), and optionally push to a centralized repository if need be. This brings in scalability and redundancy to the revision control system, which is a must in any kind of large-scale collaboration. - -![](https://farm1.staticflickr.com/341/19433194168_c79d4570aa_b.jpg) - -### Install Git with a Package Manager ### - -Git is shipped with all major Linux distributions. Thus the easiest way to install Git is by using your Linux distro's package manager. - -**Debian, Ubuntu, or Linux Mint** - - $ sudo apt-get install git - -**Fedora, CentOS or RHEL** - - $ sudo yum install git - -**Arch Linux** - - $ sudo pacman -S git - -**OpenSUSE** - - $ sudo zypper install git - -**Gentoo** - - $ emerge --ask --verbose dev-vcs/git - -### Install Git from the Source ### - -If for whatever reason you want to built Git from the source, you can follow the instructions below. - -**Install Dependencies** - -Before building Git, first install dependencies. - -**Debian, Ubuntu or Linux** - - $ sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev asciidoc xmlto docbook2x - -**Fedora, CentOS or RHEL** - - $ sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc xmlto docbook2x - -#### Compile Git from the Source #### - -Download the latest release of Git from [https://github.com/git/git/releases][1]. Then build and install Git under /usr as follows. - -Note that if you want to install it under a different directory (e.g., /opt), replace "--prefix=/usr" in configure command with something else. - - $ cd git-x.x.x - $ make configure - $ ./configure --prefix=/usr - $ make all doc info - $ sudo make install install-doc install-html install-info - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/install-git-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://ask.xmodulo.com/author/nanni -[1]:https://github.com/git/git/releases diff --git a/translated/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md b/translated/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md new file mode 100644 index 0000000000..e6d3f59c71 --- /dev/null +++ b/translated/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md @@ -0,0 +1,73 @@ +Linux问答 -- 如何在Linux上安装Git +================================================================================ + +> **问题:** 我尝试从一个Git公共仓库克隆项目,但出现了这样的错误提示:“git: command not found”。 请问我该如何安装Git? [注明一下是哪个Linux发行版]? + +Git是一个流行的并且开源的版本控制系统(VCS),最初是为Linux环境开发的。跟CVS或者SVN这些版本控制系统不同的是,Git的版本控制被认为是“分布式的”,某种意义上,git的本地工作目录可以作为一个功能完善的仓库来使用,它具备完整的历史记录和版本追踪能力。在这种工作模型之下,各个协作者将内容提交到他们的本地仓库中(与之相对的会直接提交到核心仓库),如果有必要,再有选择性地推送到核心仓库。这就为Git这个版本管理系统带来了大型协作系统所必须的可扩展能力和冗余能力。 + +![](https://farm1.staticflickr.com/341/19433194168_c79d4570aa_b.jpg) + +### 使用包管理器安装Git ### + +Git已经被所有的主力Linux发行版所支持。所以安装它最简单的方法就是使用各个Linux发行版的包管理器。 + +**Debian, Ubuntu, 或 Linux Mint** + + $ sudo apt-get install git + +**Fedora, CentOS 或 RHEL** + + $ sudo yum install git + +**Arch Linux** + + $ sudo pacman -S git + +**OpenSUSE** + + $ sudo zypper install git + +**Gentoo** + + $ emerge --ask --verbose dev-vcs/git + +### 从源码安装Git ### + +如果由于某些原因,你希望从源码安装Git,安装如下介绍操作。 + +**安装依赖包** + +在构建Git之前,先安装它的依赖包。 + +**Debian, Ubuntu 或 Linux Mint** + + $ sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev asciidoc xmlto docbook2x + +**Fedora, CentOS 或 RHEL** + + $ sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc xmlto docbook2x + +#### 从源码编译Git #### + +从 [https://github.com/git/git/releases][1] 下载最新版本的Git。然后在/usr下构建和安装。 + +注意,如果你打算安装到其他目录下(例如:/opt),那就把"--prefix=/usr"这个配置命令使用其他路径替换掉。 + + $ cd git-x.x.x + $ make configure + $ ./configure --prefix=/usr + $ make all doc info + $ sudo make install install-doc install-html install-info + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-git-linux.html + +作者:[Dan Nanni][a] +译者:[mr-ping](https://github.com/mr-ping) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:https://github.com/git/git/releases From b2706ff03ec3218931128a03bca7fd05b28817e0 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 7 Aug 2015 09:52:37 +0800 Subject: [PATCH 1645/2517] Translating by ZTinoZ --- sources/talk/20150806 5 heroes of the Linux world.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150806 5 heroes of the Linux world.md b/sources/talk/20150806 5 heroes of the Linux world.md index ae35d674a1..5b5485198c 100644 --- a/sources/talk/20150806 5 heroes of the Linux world.md +++ b/sources/talk/20150806 5 heroes of the Linux world.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ 5 heroes of the Linux world ================================================================================ Who are these people, seen and unseen, whose work affects all of us every day? @@ -96,4 +97,4 @@ via: http://www.itworld.com/article/2955001/linux/5-heros-of-the-linux-world.htm [7]:https://flic.kr/p/hBv8Pp [8]:https://en.wikipedia.org/wiki/Sysfs [9]:https://www.youtube.com/watch?v=CyHAeGBFS8k -[10]:http://www.itworld.com/article/2873200/operating-systems/11-technologies-that-tick-off-linus-torvalds.html \ No newline at end of file +[10]:http://www.itworld.com/article/2873200/operating-systems/11-technologies-that-tick-off-linus-torvalds.html From cf1e4ef93781185b77462724d1c8529ad89a7d60 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 7 Aug 2015 09:55:36 +0800 Subject: [PATCH 1646/2517] [Translated]20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md --- ...witch for debugging and troubleshooting.md | 70 ------------------- ...witch for debugging and troubleshooting.md | 69 ++++++++++++++++++ 2 files changed, 69 insertions(+), 70 deletions(-) delete mode 100644 sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md create mode 100644 translated/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md diff --git a/sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md b/sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md deleted file mode 100644 index dcf811a003..0000000000 --- a/sources/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md +++ /dev/null @@ -1,70 +0,0 @@ -Translating by GOlinu! -Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting -================================================================================ -> **Question:** I am trying to troubleshoot my Open vSwitch deployment. For that I would like to inspect its debug messages generated by its built-in logging mechanism. How can I enable logging in Open vSwitch, and change its logging level (e.g., to INFO/DEBUG level) to check more detailed debug information? - -Open vSwitch (OVS) is the most popular open-source implementation of virtual switch on the Linux platform. As the today's data centers increasingly rely on the software-defined network (SDN) architecture, OVS is fastly adopted as the de-facto standard network element in data center's SDN deployments. - -Open vSwitch has a built-in logging mechanism called VLOG. The VLOG facility allows one to enable and customize logging within various components of the switch. The logging information generated by VLOG can be sent to a combination of console, syslog and a separate log file for inspection. You can configure OVS logging dynamically at run-time with a command-line tool called `ovs-appctl`. - -![](https://farm1.staticflickr.com/499/19300367114_cd8aac2fb2_c.jpg) - -Here is how to enable logging and customize logging levels in Open vSwitch with `ovs-appctl`. - -The syntax of `ovs-appctl` to customize VLOG is as follows. - - $ sudo ovs-appctl vlog/set module[:facility[:level]] - -- **Module**: name of any valid component in OVS (e.g., netdev, ofproto, dpif, vswitchd, and many others) -- **Facility**: destination of logging information (must be: console, syslog or file) -- **Level**: verbosity of logging (must be: emer, err, warn, info, or dbg) - -In OVS source code, module name is defined in each source file in the form of: - - VLOG_DEFINE_THIS_MODULE(); - -For example, in lib/netdev.c, you will see: - - VLOG_DEFINE_THIS_MODULE(netdev); - -which indicates that lib/netdev.c is part of netdev module. Any logging messages generated in lib/netdev.c will belong to netdev module. - -In OVS source code, there are multiple severity levels used to define several different kinds of logging messages: VLOG_INFO() for informational, VLOG_WARN() for warning, VLOG_ERR() for error, VLOG_DBG() for debugging, VLOG_EMERG for emergency. Logging level and facility determine which logging messages are sent where. - -To see a full list of available modules, facilities, and their respective logging levels, run the following commands. This command must be invoked after you have started OVS. - - $ sudo ovs-appctl vlog/list - -![](https://farm1.staticflickr.com/465/19734939478_7eb5d44635_c.jpg) - -The output shows the debug levels of each module for three different facilities (console, syslog, file). By default, all modules have their logging level set to INFO. - -Given any one OVS module, you can selectively change the debug level of any particular facility. For example, if you want to see more detailed debug messages of dpif module at the console screen, run the following command. - - $ sudo ovs-appctl vlog/set dpif:console:dbg - -You will see that dpif module's console facility has changed its logging level to DBG. The logging level of two other facilities, syslog and file, remains unchanged. - -![](https://farm1.staticflickr.com/333/19896760146_5d851311ae_c.jpg) - -If you want to change the logging level for all modules, you can specify "ANY" as the module name. For example, the following command will change the console logging level of every module to DBG. - - $ sudo ovs-appctl vlog/set ANY:console:dbg - -![](https://farm1.staticflickr.com/351/19734939828_8c7f59e404_c.jpg) - -Also, if you want to change the logging level of all three facilities at once, you can specify "ANY" as the facility name. For example, the following command will change the logging level of all facilities for every module to DBG. - - $ sudo ovs-appctl vlog/set ANY:ANY:dbg - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/enable-logging-open-vswitch.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://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md b/translated/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md new file mode 100644 index 0000000000..542cf31cb3 --- /dev/null +++ b/translated/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md @@ -0,0 +1,69 @@ +Linux有问必答——如何启用Open vSwitch的日志功能以便调试和排障 +================================================================================ +> **问题** 我试着为我的Open vSwitch部署排障,鉴于此,我想要检查它的由内建日志机制生成的调试信息。我怎样才能启用Open vSwitch的日志功能,并且修改它的日志等级(如,修改成INFO/DEBUG级别)以便于检查更多详细的调试信息呢? + +Open vSwitch(OVS)是Linux平台上用于虚拟切换的最流行的开源部署。由于当今的数据中心日益依赖于软件定义的网络(SDN)架构,OVS被作为数据中心的SDN部署中实际上的标准网络元素而快速采用。 + +Open vSwitch具有一个内建的日志机制,它称之为VLOG。VLOG工具允许你在各种切换组件中启用并自定义日志,由VLOG生成的日志信息可以被发送到一个控制台,syslog以及一个独立日志文件组合,以供检查。你可以通过一个名为`ovs-appctl`的命令行工具在运行时动态配置OVS日志。 + +![](https://farm1.staticflickr.com/499/19300367114_cd8aac2fb2_c.jpg) + +这里为你演示如何使用`ovs-appctl`启用Open vSwitch中的日志功能,并进行自定义。 + +下面是`ovs-appctl`自定义VLOG的语法。 + + $ sudo ovs-appctl vlog/set module[:facility[:level]] + +- **Module**:OVS中的任何合法组件的名称(如netdev,ofproto,dpif,vswitchd,以及其它大量组件) +- **Facility**:日志信息的目的地(必须是:console,syslog,或者file) +- **Level**:日志的详细程度(必须是:emer,err,warn,info,或者dbg) + +在OVS源代码中,模块名称在源文件中是以以下格式定义的: + + VLOG_DEFINE_THIS_MODULE(); + +例如,在lib/netdev.c中,你可以看到: + + VLOG_DEFINE_THIS_MODULE(netdev); + +这个表明,lib/netdev.c是netdev模块的一部分,任何在lib/netdev.c中生成的日志信息将属于netdev模块。 + +在OVS源代码中,有多个严重度等级用于定义几个不同类型的日志信息:VLOG_INFO()用于报告,VLOG_WARN()用于警告,VLOG_ERR()用于错误提示,VLOG_DBG()用于调试信息,VLOG_EMERG用于紧急情况。日志等级和工具确定哪个日志信息发送到哪里。 + +要查看可用模块、工具和各自日志级别的完整列表,请运行以下命令。该命令必须在你启动OVS后调用。 + + $ sudo ovs-appctl vlog/list + +![](https://farm1.staticflickr.com/465/19734939478_7eb5d44635_c.jpg) + +输出结果显示了用于三个工具(console,syslog,file)的各个模块的调试级别。默认情况下,所有模块的日志等级都被设置为INFO。 + +指定任何一个OVS模块,你可以选择性地修改任何特定工具的调试级别。例如,如果你想要在控制台屏幕中查看dpif更为详细的调试信息,可以运行以下命令。 + + $ sudo ovs-appctl vlog/set dpif:console:dbg + +你将看到dpif模块的console工具已经将其日志等级修改为DBG,而其它两个工具syslog和file的日志级别仍然没有改变。 + +![](https://farm1.staticflickr.com/333/19896760146_5d851311ae_c.jpg) + +如果你想要修改所有模块的日志等级,你可以指定“ANY”作为模块名。例如,下面命令将修改每个模块的console的日志级别为DBG。 + + $ sudo ovs-appctl vlog/set ANY:console:dbg + +![](https://farm1.staticflickr.com/351/19734939828_8c7f59e404_c.jpg) + +同时,如果你想要一次性修改所有三个工具的日志级别,你可以指定“ANY”作为工具名。例如,下面的命令将修改每个模块的所有工具的日志级别为DBG。 + + $ sudo ovs-appctl vlog/set ANY:ANY:dbg + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/enable-logging-open-vswitch.html + +作者:[Dan Nanni][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From f3cb1163f4d917f9e9db845461f0fbecca88b84f Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 7 Aug 2015 10:37:40 +0800 Subject: [PATCH 1647/2517] Translating by ZTinoZ --- sources/talk/20150806 5 heroes of the Linux world.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sources/talk/20150806 5 heroes of the Linux world.md b/sources/talk/20150806 5 heroes of the Linux world.md index 5b5485198c..bf1d75d562 100644 --- a/sources/talk/20150806 5 heroes of the Linux world.md +++ b/sources/talk/20150806 5 heroes of the Linux world.md @@ -1,16 +1,15 @@ -Translating by ZTinoZ -5 heroes of the Linux world +Linux世界的五个大神 ================================================================================ -Who are these people, seen and unseen, whose work affects all of us every day? +这些人是谁?见或者没见过?谁在每天影响着我们? ![Image courtesy Christopher Michel/Flickr](http://core0.staticworld.net/images/article/2015/07/penguin-100599348-orig.jpg) Image courtesy [Christopher Michel/Flickr][1] -### High-flying penguins ### +### 野心勃勃的企鹅 ### -Linux and open source is driven by passionate people who write best-of-breed software and then release the code to the public so anyone can use it, without any strings attached. (Well, there is one string attached and that’s licence.) +Linux和开源世界一直在被那些热情洋溢的人们驱动着,他们开发出最好的软件并将代码向公众开放,所以每个人都能无条件地看到。(对了,有那么一个条件,那就是许可证。) -Who are these people? These heroes of the Linux world, whose work affects all of us every day. Allow me to introduce you. +那么,这些人是谁?这些Linux世界里的大神们,谁在每天影响着我们?让我来给你一一揭晓。 ![Image courtesy Swapnil Bhartiya](http://images.techhive.com/images/article/2015/07/swap-klaus-100599357-orig.jpg) Image courtesy Swapnil Bhartiya From 14a989ea41ead6ccb5bf70206ca4e96fed54596f Mon Sep 17 00:00:00 2001 From: Ping Date: Fri, 7 Aug 2015 14:38:03 +0800 Subject: [PATCH 1648/2517] Marking out Translating article --- .../tech/20150518 How to set up a Replica Set on MongoDB.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150518 How to set up a Replica Set on MongoDB.md b/sources/tech/20150518 How to set up a Replica Set on MongoDB.md index 07e16dafc1..83a7da8769 100644 --- a/sources/tech/20150518 How to set up a Replica Set on MongoDB.md +++ b/sources/tech/20150518 How to set up a Replica Set on MongoDB.md @@ -1,3 +1,4 @@ +Translating by Ping How to set up a Replica Set on MongoDB ================================================================================ MongoDB has become the most famous NoSQL database on the market. MongoDB is document-oriented, and its scheme-free design makes it a really attractive solution for all kinds of web applications. One of the features that I like the most is Replica Set, where multiple copies of the same data set are maintained by a group of mongod nodes for redundancy and high availability. @@ -179,4 +180,4 @@ via: http://xmodulo.com/setup-replica-set-mongodb.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/valerio -[1]:http://docs.mongodb.org/ecosystem/drivers/ \ No newline at end of file +[1]:http://docs.mongodb.org/ecosystem/drivers/ From ee9f6a02e8e29bd00c790a8a2098d2654a0269fa Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 7 Aug 2015 15:15:02 +0800 Subject: [PATCH 1649/2517] Translating by ZTinoZ --- sources/talk/20150806 5 heroes of the Linux world.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/talk/20150806 5 heroes of the Linux world.md b/sources/talk/20150806 5 heroes of the Linux world.md index bf1d75d562..abc42df7f9 100644 --- a/sources/talk/20150806 5 heroes of the Linux world.md +++ b/sources/talk/20150806 5 heroes of the Linux world.md @@ -7,7 +7,7 @@ Image courtesy [Christopher Michel/Flickr][1] ### 野心勃勃的企鹅 ### -Linux和开源世界一直在被那些热情洋溢的人们驱动着,他们开发出最好的软件并将代码向公众开放,所以每个人都能无条件地看到。(对了,有那么一个条件,那就是许可证。) +Linux和开源世界一直在被那些热情洋溢的人们推动着,他们开发出最好的软件并将代码向公众开放,所以每个人都能无条件地看到。(对了,有那么一个条件,那就是许可证。) 那么,这些人是谁?这些Linux世界里的大神们,谁在每天影响着我们?让我来给你一一揭晓。 @@ -16,9 +16,9 @@ Image courtesy Swapnil Bhartiya ### Klaus Knopper ### -Klaus Knopper, an Austrian developer who lives in Germany, is the founder of Knoppix and Adriana Linux, which he developed for his blind wife. +Klaus Knopper,一个生活在德国的奥地利开发者,他是Knoppix和Adriana Linux的创始人,为了他失明的妻子开发程序。 -Knoppix holds a very special place in heart of those Linux users who started using Linux before Ubuntu came along. What makes Knoppix so special is that it popularized the concept of Live CD. Unlike Windows or Mac OS X, you could run the entire operating system from the CD without installing anything on the system. It allowed new users to test Linux on their systems without formatting the hard drive. The live feature of Linux alone contributed heavily to its popularity. +Knoppix在那些Linux用户心里有着特殊的地位,他们在使用Ubuntu之前都会尝试Knoppix,而Knoppix让人称道的就是它让Live CD的概念普及开来。不像Windows或Mac OS X,你可以通过CD运行整个操作系统而不用再系统上安装任何东西,它允许新用户在他们的机子上快速试用Linux而不用去格式化硬盘。Linux这种实时的特性为它的普及做出了巨大贡献。 ![Image courtesy Fórum Internacional Software Live/Flickr](http://images.techhive.com/images/article/2015/07/lennart-100599356-orig.jpg) Image courtesy [Fórum Internacional Software Live/Flickr][2] From 0fe382d37872929df93bbdc84daa135d253e9d8b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 7 Aug 2015 15:25:11 +0800 Subject: [PATCH 1650/2517] =?UTF-8?q?20150807-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...riables on a Linux and Unix-like System.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md diff --git a/sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md b/sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md new file mode 100644 index 0000000000..b2fa80ff0a --- /dev/null +++ b/sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md @@ -0,0 +1,98 @@ +How To: Temporarily Clear Bash Environment Variables on a Linux and Unix-like System +================================================================================ +I'm a bash shell user. I would like to temporarily clear bash shell environment variables. I do not want to delete or unset an exported environment variable. How do I run a program in a temporary environment in bash or ksh shell? + +You can use the env command to set and print environment on a Linux or Unix-like systems. The env command executes utility after modifying the environment as specified on the command line. + +### How do I display my current environment? ### + +Open the terminal application and type any one of the following command: + + printenv + +OR + + env + +Sample outputs: + +![Fig.01: Unix/Linux: List All Environment Variables Command](http://s0.cyberciti.org/uploads/faq/2015/08/env-unix-linux-command-output.jpg) +Fig.01: Unix/Linux: List All Environment Variables Command + +### Counting your environment variables ### + +Type the following command: + + env | wc -l + printenv | wc -l + +Sample outputs: + + 20 + +### Run a program in a clean environment in bash/ksh/zsh ### + +The syntax is as follows: + + env -i your-program-name-here arg1 arg2 ... + +For example, run the wget program without using http_proxy and/or all other variables i.e. temporarily clear all bash/ksh/zsh environment variables and run the wget program: + + env -i /usr/local/bin/wget www.cyberciti.biz + env -i wget www.cyberciti.biz + +This is very useful when you want to run a command ignoring any environment variables you have set. I use this command many times everyday to ignore the http_proxy and other environment variable I have set. + +#### Example: With the http_proxy #### + + $ wget www.cyberciti.biz + --2015-08-03 23:20:23-- http://www.cyberciti.biz/ + Connecting to 10.12.249.194:3128... connected. + Proxy request sent, awaiting response... 200 OK + Length: unspecified [text/html] + Saving to: 'index.html' + index.html [ <=> ] 36.17K 87.0KB/s in 0.4s + 2015-08-03 23:20:24 (87.0 KB/s) - 'index.html' saved [37041] + +#### Example: Ignore the http_proxy #### + + $ env -i /usr/local/bin/wget www.cyberciti.biz + --2015-08-03 23:25:17-- http://www.cyberciti.biz/ + Resolving www.cyberciti.biz... 74.86.144.194 + Connecting to www.cyberciti.biz|74.86.144.194|:80... connected. + HTTP request sent, awaiting response... 200 OK + Length: unspecified [text/html] + Saving to: 'index.html.1' + index.html.1 [ <=> ] 36.17K 115KB/s in 0.3s + 2015-08-03 23:25:18 (115 KB/s) - 'index.html.1' saved [37041] + +The option -i causes env command to completely ignore the environment it inherits. However, it does not prevent your command (such as wget or curl) setting new variables. Also, note down the side effect of running bash/ksh shell: + + env -i env | wc -l ## empty ## + # Now run bash ## + env -i bash + ## New enviroment set by bash program ## + env | wc -l + +#### Example: Set an environmental variable #### + +The syntax is: + + env var=value /path/to/command arg1 arg2 ... + ## OR ## + var=value /path/to/command arg1 arg2 ... + +For example set http_proxy: + + env http_proxy="http://USER:PASSWORD@server1.cyberciti.biz:3128/" \ + /usr/local/bin/wget www.cyberciti.biz + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/linux-unix-temporarily-clearing-environment-variables-command/ + +作者:Vivek Gite +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From b9f635745b5dfc4ac1151540c4d74e4a842ddedd Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 7 Aug 2015 17:47:09 +0800 Subject: [PATCH 1651/2517] [Translating] sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md --- ...Bash Environment Variables on a Linux and Unix-like System.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md b/sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md index b2fa80ff0a..715ecc2084 100644 --- a/sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md +++ b/sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md @@ -1,3 +1,4 @@ +Translating by ictlyh How To: Temporarily Clear Bash Environment Variables on a Linux and Unix-like System ================================================================================ I'm a bash shell user. I would like to temporarily clear bash shell environment variables. I do not want to delete or unset an exported environment variable. How do I run a program in a temporary environment in bash or ksh shell? From cff6b78e5da1392612b87b6975d9cf38b40ce89d Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 7 Aug 2015 19:39:10 +0800 Subject: [PATCH 1652/2517] Update 20150716 Interview--Larry Wall.md --- sources/talk/20150716 Interview--Larry Wall.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150716 Interview--Larry Wall.md b/sources/talk/20150716 Interview--Larry Wall.md index 5d0b40d2ed..1362281517 100644 --- a/sources/talk/20150716 Interview--Larry Wall.md +++ b/sources/talk/20150716 Interview--Larry Wall.md @@ -1,3 +1,5 @@ +martin + Interview: Larry Wall ================================================================================ > Perl 6 has been 15 years in the making, and is now due to be released at the end of this year. We speak to its creator to find out what’s going on. @@ -122,4 +124,4 @@ via: http://www.linuxvoice.com/interview-larry-wall/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.linuxvoice.com/author/mike/ \ No newline at end of file +[a]:http://www.linuxvoice.com/author/mike/ From a78cf0b53f3c126737ea4b77a4e7af8f552524f3 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 7 Aug 2015 22:05:46 +0800 Subject: [PATCH 1653/2517] PUB:20150728 How To Fix--There is no command installed for 7-zip archive files @GOLinux --- ...There is no command installed for 7-zip archive files.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename {translated/tech => published}/20150728 How To Fix--There is no command installed for 7-zip archive files.md (96%) diff --git a/translated/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md b/published/20150728 How To Fix--There is no command installed for 7-zip archive files.md similarity index 96% rename from translated/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md rename to published/20150728 How To Fix--There is no command installed for 7-zip archive files.md index 61237467ca..34a7af3190 100644 --- a/translated/tech/20150728 How To Fix--There is no command installed for 7-zip archive files.md +++ b/published/20150728 How To Fix--There is no command installed for 7-zip archive files.md @@ -5,10 +5,12 @@ 我试着在Ubuntu中安装Emerald图标主题,而这个主题被打包成了.7z归档包。和以往一样,我试着通过在GUI中右击并选择“提取到这里”来将它解压缩。但是Ubuntu 15.04却并没有解压文件,取而代之的,却是丢给了我一个下面这样的错误信息: > Could not open this file +> > 无法打开该文件 > > There is no command installed for 7-zip archive files. Do you want to search for a command to open this file? -> 没有安装用于7-zip归档文件的命令。你是否想要搜索命令来打开该文件? +> +> 没有安装用于7-zip归档文件的命令。你是否想要搜索用于来打开该文件的命令? 错误信息看上去是这样的: @@ -42,7 +44,7 @@ via: http://itsfoss.com/fix-there-is-no-command-installed-for-7-zip-archive-file 作者:[Abhishek][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From fb82c13465c5d60e15a2ddadd8c7f17ac307ea99 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 7 Aug 2015 22:47:51 +0800 Subject: [PATCH 1654/2517] PUB:20150803 Handy commands for profiling your Unix file systems @strugglingyouth --- ...ds for profiling your Unix file systems.md | 65 ++++++++++++++++++ ...ds for profiling your Unix file systems.md | 66 ------------------- 2 files changed, 65 insertions(+), 66 deletions(-) create mode 100644 published/20150803 Handy commands for profiling your Unix file systems.md delete mode 100644 translated/tech/20150803 Handy commands for profiling your Unix file systems.md diff --git a/published/20150803 Handy commands for profiling your Unix file systems.md b/published/20150803 Handy commands for profiling your Unix file systems.md new file mode 100644 index 0000000000..1bfc6ac4bd --- /dev/null +++ b/published/20150803 Handy commands for profiling your Unix file systems.md @@ -0,0 +1,65 @@ +使用 Find 命令来帮你找到那些需要清理的文件 +================================================================================ +![Credit: Sandra H-S](http://images.techhive.com/images/article/2015/07/file-profile-100597239-primary.idge.png) + +*Credit: Sandra H-S* + +有一个问题几乎困扰着所有的文件系统 -- 包括 Unix 和其他的 -- 那就是文件的不断积累。几乎没有人愿意花时间清理掉他们不再使用的文件和整理文件系统,结果,文件变得很混乱,很难找到有用的东西,要使它们运行良好、维护备份、易于管理,这将是一种持久的挑战。 + +我见过的一种解决问题的方法是建议使用者将所有的数据碎屑创建一个文件集合的总结报告或"概况",来报告诸如所有的文件数量;最老的,最新的,最大的文件;并统计谁拥有这些文件等数据。如果有人看到五年前的一个包含五十万个文件的文件夹,他们可能会去删除哪些文件 -- 或者,至少会归档和压缩。主要问题是太大的文件夹会使人担心误删一些重要的东西。如果有一个描述文件夹的方法能帮助显示文件的性质,那么你就可以去清理它了。 + +当我准备做 Unix 文件系统的总结报告时,几个有用的 Unix 命令能提供一些非常有用的统计信息。要计算目录中的文件数,你可以使用这样一个 find 命令。 + + $ find . -type f | wc -l + 187534 + +虽然查找最老的和最新的文件是比较复杂,但还是相当方便的。在下面的命令,我们使用 find 命令再次查找文件,以文件时间排序并按年-月-日的格式显示,在列表顶部的显然是最老的。 + +在第二个命令,我们做同样的,但打印的是最后一行,这是最新的。 + + $ find -type f -printf '%T+ %p\n' | sort | head -n 1 + 2006-02-03+02:40:33 ./skel/.xemacs/init.el + $ find -type f -printf '%T+ %p\n' | sort | tail -n 1 + 2015-07-19+14:20:16 ./.bash_history + +printf 命令输出 %T(文件日期和时间)和 %P(带路径的文件名)参数。 + +如果我们在查找家目录时,无疑会发现,history 文件(如 .bash_history)是最新的,这并没有什么用。你可以通过 "un-grepping" 来忽略这些文件,也可以忽略以.开头的文件,如下图所示的。 + + $ find -type f -printf '%T+ %p\n' | grep -v "\./\." | sort | tail -n 1 + 2015-07-19+13:02:12 ./isPrime + +寻找最大的文件使用 %s(大小)参数,包括文件名(%f),因为这就是我们想要在报告中显示的。 + + $ find -type f -printf '%s %f \n' | sort -n | uniq | tail -1 + 20183040 project.org.tar + +统计文件的所有者,使用%u(所有者) + + $ find -type f -printf '%u \n' | grep -v "\./\." | sort | uniq -c + 180034 shs + 7500 jdoe + +如果文件系统能记录上次的访问日期,也将是非常有用的,可以用来看该文件有没有被访问过,比方说,两年之内没访问过。这将使你能明确分辨这些文件的价值。这个最后访问(%a)参数这样使用: + + $ find -type f -printf '%a+ %p\n' | sort | head -n 1 + Fri Dec 15 03:00:30 2006+ ./statreport + +当然,如果大多数最近​​访问的文件也是在很久之前的,这看起来你需要处理更多文件了。 + + $ find -type f -printf '%a+ %p\n' | sort | tail -n 1 + Wed Nov 26 03:00:27 2007+ ./my-notes + +要想层次分明,可以为一个文件系统或大目录创建一个总结报告,显示这些文件的日期范围、最大的文件、文件所有者们、最老的文件和最新访问时间,可以帮助文件拥有者判断当前有哪些文件夹是重要的哪些该清理了。 + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/2949898/linux/profiling-your-file-systems.html + +作者:[Sandra Henry-Stocker][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.itworld.com/author/Sandra-Henry_Stocker/ diff --git a/translated/tech/20150803 Handy commands for profiling your Unix file systems.md b/translated/tech/20150803 Handy commands for profiling your Unix file systems.md deleted file mode 100644 index 13efdcf0a1..0000000000 --- a/translated/tech/20150803 Handy commands for profiling your Unix file systems.md +++ /dev/null @@ -1,66 +0,0 @@ - -很实用的命令来分析你的 Unix 文件系统 -================================================================================ -![Credit: Sandra H-S](http://images.techhive.com/images/article/2015/07/file-profile-100597239-primary.idge.png) -Credit: Sandra H-S - -其中一个问题几乎困扰着所有的文件系统 -- 包括 Unix 和其他的 -- 那就是文件的不断积累。几乎没有人愿意花时间清理掉他们不再使用的文件和文件系统,结果,文件变得很混乱,很难找到有用的东西使它们运行良好,能够得到备份,并且易于管理,这将是一种持久的挑战。 - -我见过的一种解决问题的方法是鼓励使用者将所有的数据碎屑创建成一个总结报告或"profile"这样一个文件集合来报告所有的文件数量;最老的,最新的,最大的文件;并统计谁拥有这些文件。如果有人看到一个包含五十万个文件的文件夹并且时间不小于五年,他们可能会去删除哪些文件 -- 或者,至少归档和压缩。主要问题是太大的文件夹会使人产生压制性害怕误删一些重要的东西。有一个描述文件夹的方法能帮助显示文件的性质并期待你去清理它。 - - -当我准备做 Unix 文件系统的总结报告时,几个有用的 Unix 命令能提供一些非常有用的统计信息。要计算目录中的文件数,你可以使用这样一个 find 命令。 - - $ find . -type f | wc -l - 187534 - -查找最老的和最新的文件是比较复杂,但还是相当方便的。在下面的命令,我们使用 find 命令再次查找文件,以文件时间排序并按年-月-日的格式显示在顶部 -- 因此最老的 -- 的文件在列表中。 - -在第二个命令,我们做同样的,但打印的是最后一行 -- 这是最新的 -- 文件 - - $ find -type f -printf '%T+ %p\n' | sort | head -n 1 - 2006-02-03+02:40:33 ./skel/.xemacs/init.el - $ find -type f -printf '%T+ %p\n' | sort | tail -n 1 - 2015-07-19+14:20:16 ./.bash_history - -printf 命令输出 %T(文件日期和时间)和 %P(带路径的文件名)参数。 - -如果我们在查找家目录时,无疑会发现,history 文件是最新的,这不像是一个很有趣的信息。你可以通过 "un-grepping" 来忽略这些文件,也可以忽略以.开头的文件,如下图所示的。 - - $ find -type f -printf '%T+ %p\n' | grep -v "\./\." | sort | tail -n 1 - 2015-07-19+13:02:12 ./isPrime - -寻找最大的文件使用 %s(大小)参数,包括文件名(%f),因为这就是我们想要在报告中显示的。 - - $ find -type f -printf '%s %f \n' | sort -n | uniq | tail -1 - 20183040 project.org.tar - -打印文件的所有着者,使用%u(所有者) - - $ find -type f -printf '%u \n' | grep -v "\./\." | sort | uniq -c - 180034 shs - 7500 jdoe - -如果文件系统能记录上次的访问日期,也将是非常有用的来看该文件有没有被访问,比方说,两年之内。这将使你能明确分辨这些文件的价值。最后一个访问参数(%a)这样使用: - - $ find -type f -printf '%a+ %p\n' | sort | head -n 1 - Fri Dec 15 03:00:30 2006+ ./statreport - -当然,如果最近​​访问的文件也是在很久之前的,这将使你有更多的处理时间。 - - $ find -type f -printf '%a+ %p\n' | sort | tail -n 1 - Wed Nov 26 03:00:27 2007+ ./my-notes - -一个文件系统要层次分明,为大目录创建一个总结报告,显示该文件的日期范围,最大的文件,文件所有者,最老的和访问时间都可以帮助文件拥有者判断当前有哪些文件夹是重要的哪些该清理了。 - --------------------------------------------------------------------------------- - -via: http://www.itworld.com/article/2949898/linux/profiling-your-file-systems.html - -作者:[Sandra Henry-Stocker][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.itworld.com/author/Sandra-Henry_Stocker/ From 96a056137fdee0854671418ce7aae8be952ba66d Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Fri, 7 Aug 2015 23:52:45 +0800 Subject: [PATCH 1655/2517] translating wi-cuckoo --- ... Interview Experience on RedHat Linux Package Management.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md b/sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md index 7915907e6a..6243a8c0de 100644 --- a/sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md +++ b/sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md @@ -1,3 +1,4 @@ +translating wi-cuckoo Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management ================================================================================ **Shilpa Nair has just graduated in the year 2015. She went to apply for Trainee position in a National News Television located in Noida, Delhi. When she was in the last year of graduation and searching for help on her assignments she came across Tecmint. Since then she has been visiting Tecmint regularly.** @@ -345,4 +346,4 @@ via: http://www.tecmint.com/linux-rpm-package-management-interview-questions/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ -[2]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ \ No newline at end of file +[2]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ From 7b64f7af56f5b9513420c849bfbba8c91c12e926 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 7 Aug 2015 23:53:07 +0800 Subject: [PATCH 1656/2517] PUB:20150504 How to access a Linux server behind NAT via reverse SSH tunnel @ictlyh --- ...erver behind NAT via reverse SSH tunnel.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) rename {translated/tech => published}/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md (58%) diff --git a/translated/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/published/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md similarity index 58% rename from translated/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md rename to published/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md index 5f9828e912..c6dddd3639 100644 --- a/translated/tech/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md +++ b/published/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md @@ -1,18 +1,18 @@ 如何通过反向 SSH 隧道访问 NAT 后面的 Linux 服务器 ================================================================================ -你在家里运行着一台 Linux 服务器,访问它需要先经过 NAT 路由器或者限制性防火墙。现在你想不在家的时候用 SSH 登录到这台服务器。你如何才能做到呢?SSH 端口转发当然是一种选择。但是,如果你需要处理多个嵌套的 NAT 环境,端口转发可能会变得非常棘手。另外,在多种 ISP 特定条件下可能会受到干扰,例如阻塞转发端口的限制性 ISP 防火墙、或者在用户间共享 IPv4 地址的运营商级 NAT。 +你在家里运行着一台 Linux 服务器,它放在一个 NAT 路由器或者限制性防火墙后面。现在你想在外出时用 SSH 登录到这台服务器。你如何才能做到呢?SSH 端口转发当然是一种选择。但是,如果你需要处理多级嵌套的 NAT 环境,端口转发可能会变得非常棘手。另外,在多种 ISP 特定条件下可能会受到干扰,例如阻塞转发端口的限制性 ISP 防火墙、或者在用户间共享 IPv4 地址的运营商级 NAT。 ### 什么是反向 SSH 隧道? ### -SSH 端口转发的一种替代方案是 **反向 SSH 隧道**。反向 SSH 隧道的概念非常简单。对于此,在限制性家庭网络之外你需要另一台主机(所谓的“中继主机”),你能从当前所在地通过 SSH 登录。你可以用有公共 IP 地址的 [VPS 实例][1] 配置一个中继主机。然后要做的就是从你家庭网络服务器中建立一个到公共中继主机的永久 SSH 隧道。有了这个隧道,你就可以从中继主机中连接“回”家庭服务器(这就是为什么称之为 “反向” 隧道)。不管你在哪里、你家庭网络中的 NAT 或 防火墙限制多么严重,只要你可以访问中继主机,你就可以连接到家庭服务器。 +SSH 端口转发的一种替代方案是 **反向 SSH 隧道**。反向 SSH 隧道的概念非常简单。使用这种方案,在你的受限的家庭网络之外你需要另一台主机(所谓的“中继主机”),你能从当前所在地通过 SSH 登录到它。你可以用有公网 IP 地址的 [VPS 实例][1] 配置一个中继主机。然后要做的就是从你的家庭网络服务器中建立一个到公网中继主机的永久 SSH 隧道。有了这个隧道,你就可以从中继主机中连接“回”家庭服务器(这就是为什么称之为 “反向” 隧道)。不管你在哪里、你的家庭网络中的 NAT 或 防火墙限制多么严格,只要你可以访问中继主机,你就可以连接到家庭服务器。 ![](https://farm8.staticflickr.com/7742/17162647378_c7d9f10de8_b.jpg) ### 在 Linux 上设置反向 SSH 隧道 ### -让我们来看看怎样创建和使用反向 SSH 隧道。我们有如下假设。我们会设置一个从家庭服务器到中继服务器的反向 SSH 隧道,然后我们可以通过中继服务器从客户端计算机 SSH 登录到家庭服务器。**中继服务器** 的公共 IP 地址是 1.1.1.1。 +让我们来看看怎样创建和使用反向 SSH 隧道。我们做如下假设:我们会设置一个从家庭服务器(homeserver)到中继服务器(relayserver)的反向 SSH 隧道,然后我们可以通过中继服务器从客户端计算机(clientcomputer) SSH 登录到家庭服务器。本例中的**中继服务器** 的公网 IP 地址是 1.1.1.1。 -在家庭主机上,按照以下方式打开一个到中继服务器的 SSH 连接。 +在家庭服务器上,按照以下方式打开一个到中继服务器的 SSH 连接。 homeserver~$ ssh -fN -R 10022:localhost:22 relayserver_user@1.1.1.1 @@ -20,11 +20,11 @@ SSH 端口转发的一种替代方案是 **反向 SSH 隧道**。反向 SSH 隧 “-R 10022:localhost:22” 选项定义了一个反向隧道。它转发中继服务器 10022 端口的流量到家庭服务器的 22 号端口。 -用 “-fN” 选项,当你用一个 SSH 服务器成功通过验证时 SSH 会进入后台运行。当你不想在远程 SSH 服务器执行任何命令、就像我们的例子中只想转发端口的时候非常有用。 +用 “-fN” 选项,当你成功通过 SSH 服务器验证时 SSH 会进入后台运行。当你不想在远程 SSH 服务器执行任何命令,就像我们的例子中只想转发端口的时候非常有用。 运行上面的命令之后,你就会回到家庭主机的命令行提示框中。 -登录到中继服务器,确认 127.0.0.1:10022 绑定到了 sshd。如果是的话就表示已经正确设置了反向隧道。 +登录到中继服务器,确认其 127.0.0.1:10022 绑定到了 sshd。如果是的话就表示已经正确设置了反向隧道。 relayserver~$ sudo netstat -nap | grep 10022 @@ -36,13 +36,13 @@ SSH 端口转发的一种替代方案是 **反向 SSH 隧道**。反向 SSH 隧 relayserver~$ ssh -p 10022 homeserver_user@localhost -需要注意的一点是你在本地输入的 SSH 登录/密码应该是家庭服务器的,而不是中继服务器的,因为你是通过隧道的本地端点登录到家庭服务器。因此不要输入中继服务器的登录/密码。成功登陆后,你就在家庭服务器上了。 +需要注意的一点是你在上面为localhost输入的 SSH 登录/密码应该是家庭服务器的,而不是中继服务器的,因为你是通过隧道的本地端点登录到家庭服务器,因此不要错误输入中继服务器的登录/密码。成功登录后,你就在家庭服务器上了。 ### 通过反向 SSH 隧道直接连接到网络地址变换后的服务器 ### 上面的方法允许你访问 NAT 后面的 **家庭服务器**,但你需要登录两次:首先登录到 **中继服务器**,然后再登录到**家庭服务器**。这是因为中继服务器上 SSH 隧道的端点绑定到了回环地址(127.0.0.1)。 -事实上,有一种方法可以只需要登录到中继服务器就能直接访问网络地址变换之后的家庭服务器。要做到这点,你需要让中继服务器上的 sshd 不仅转发回环地址上的端口,还要转发外部主机的端口。这通过指定中继服务器上运行的 sshd 的 **网关端口** 实现。 +事实上,有一种方法可以只需要登录到中继服务器就能直接访问NAT之后的家庭服务器。要做到这点,你需要让中继服务器上的 sshd 不仅转发回环地址上的端口,还要转发外部主机的端口。这通过指定中继服务器上运行的 sshd 的 **GatewayPorts** 实现。 打开**中继服务器**的 /etc/ssh/sshd_conf 并添加下面的行。 @@ -74,23 +74,23 @@ SSH 端口转发的一种替代方案是 **反向 SSH 隧道**。反向 SSH 隧 tcp 0 0 1.1.1.1:10022 0.0.0.0:* LISTEN 1538/sshd: dev -不像之前的情况,现在隧道的端点是 1.1.1.1:10022(中继服务器的公共 IP 地址),而不是 127.0.0.1:10022。这就意味着从外部主机可以访问隧道的端点。 +不像之前的情况,现在隧道的端点是 1.1.1.1:10022(中继服务器的公网 IP 地址),而不是 127.0.0.1:10022。这就意味着从外部主机可以访问隧道的另一端。 现在在任何其它计算机(客户端计算机),输入以下命令访问网络地址变换之后的家庭服务器。 clientcomputer~$ ssh -p 10022 homeserver_user@1.1.1.1 -在上面的命令中,1.1.1.1 是中继服务器的公共 IP 地址,家庭服务器用户必须是和家庭服务器相关联的用户账户。这是因为你真正登录到的主机是家庭服务器,而不是中继服务器。后者只是中继你的 SSH 流量到家庭服务器。 +在上面的命令中,1.1.1.1 是中继服务器的公共 IP 地址,homeserver_user必须是家庭服务器上的用户账户。这是因为你真正登录到的主机是家庭服务器,而不是中继服务器。后者只是中继你的 SSH 流量到家庭服务器。 ### 在 Linux 上设置一个永久反向 SSH 隧道 ### -现在你已经明白了怎样创建一个反向 SSH 隧道,然后把隧道设置为 “永久”,这样隧道启动后就会一直运行(不管临时的网络拥塞、SSH 超时、中继主机重启,等等)。毕竟,如果隧道不是一直有效,你不可能可靠的登录到你的家庭服务器。 +现在你已经明白了怎样创建一个反向 SSH 隧道,然后把隧道设置为 “永久”,这样隧道启动后就会一直运行(不管临时的网络拥塞、SSH 超时、中继主机重启,等等)。毕竟,如果隧道不是一直有效,你就不能可靠的登录到你的家庭服务器。 -对于永久隧道,我打算使用一个叫 autossh 的工具。正如名字暗示的,这个程序允许你不管任何理由自动重启 SSH 会话。因此对于保存一个反向 SSH 隧道有效非常有用。 +对于永久隧道,我打算使用一个叫 autossh 的工具。正如名字暗示的,这个程序可以让你的 SSH 会话无论因为什么原因中断都会自动重连。因此对于保持一个反向 SSH 隧道非常有用。 第一步,我们要设置从家庭服务器到中继服务器的[无密码 SSH 登录][2]。这样的话,autossh 可以不需要用户干预就能重启一个损坏的反向 SSH 隧道。 -下一步,在初始化隧道的家庭服务器上[安装 autossh][3]。 +下一步,在建立隧道的家庭服务器上[安装 autossh][3]。 在家庭服务器上,用下面的参数运行 autossh 来创建一个连接到中继服务器的永久 SSH 隧道。 @@ -113,7 +113,7 @@ SSH 端口转发的一种替代方案是 **反向 SSH 隧道**。反向 SSH 隧 ### 总结 ### -在这篇博文中,我介绍了你如何能从外部中通过反向 SSH 隧道访问限制性防火墙或 NAT 网关之后的 Linux 服务器。尽管我介绍了家庭网络中的一个使用事例,在企业网络中使用时你尤其要小心。这样的一个隧道可能被视为违反公司政策,因为它绕过了企业的防火墙并把企业网络暴露给外部攻击。这很可能被误用或者滥用。因此在使用之前一定要记住它的作用。 +在这篇博文中,我介绍了你如何能从外部通过反向 SSH 隧道访问限制性防火墙或 NAT 网关之后的 Linux 服务器。这里我介绍了家庭网络中的一个使用事例,但在企业网络中使用时你尤其要小心。这样的一个隧道可能被视为违反公司政策,因为它绕过了企业的防火墙并把企业网络暴露给外部攻击。这很可能被误用或者滥用。因此在使用之前一定要记住它的作用。 -------------------------------------------------------------------------------- @@ -121,11 +121,11 @@ via: http://xmodulo.com/access-linux-server-behind-nat-reverse-ssh-tunnel.html 作者:[Dan Nanni][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/nanni [1]:http://xmodulo.com/go/digitalocean -[2]:http://xmodulo.com/how-to-enable-ssh-login-without.html -[3]:http://ask.xmodulo.com/install-autossh-linux.html +[2]:https://linux.cn/article-5444-1.html +[3]:https://linux.cn/article-5459-1.html From 569768fdea3706313f31ce6787da102f597d9e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Sat, 8 Aug 2015 03:26:54 +0800 Subject: [PATCH 1657/2517] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...o Perform File and Directory Management.md | 194 +++++++++--------- 1 file changed, 98 insertions(+), 96 deletions(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md b/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md index abf9910994..f46fd93321 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md @@ -1,59 +1,61 @@ -[translating by xiqingongzi] -RHCSA Series: How to Perform File and Directory Management – Part 2 +RHCSA 系列: 如何执行文件并进行文件管理 – Part 2 ================================================================================ -In this article, RHCSA Part 2: File and directory management, we will review some essential skills that are required in the day-to-day tasks of a system administrator. + +在本篇(RHCSA 第二篇:文件和目录管理)中,我们江回顾一些系统管理员日常任务需要的技能 ![RHCSA: Perform File and Directory Management – Part 2](http://www.tecmint.com/wp-content/uploads/2015/03/RHCSA-Part2.png) -RHCSA: Perform File and Directory Management – Part 2 -### Create, Delete, Copy, and Move Files and Directories ### +RHCSA : 运行文件以及进行文件夹管理 - 第二章 +### 创建,删除,复制和移动文件及目录 ### -File and directory management is a critical competence that every system administrator should possess. This includes the ability to create / delete text files from scratch (the core of each program’s configuration) and directories (where you will organize files and other directories), and to find out the type of existing files. +文件和目录管理是每一个系统管理员都应该掌握的必要的技能.它包括了从头开始的创建、删除文本文件(每个程序的核心配置)以及目录(你用来组织文件和其他目录),以及识别存在的文件的类型 -The [touch command][1] can be used not only to create empty files, but also to update the access and modification times of existing files. + [touch 命令][1] 不仅仅能用来创建空文件,还能用来更新已存在的文件的权限和时间表 ![touch command example](http://www.tecmint.com/wp-content/uploads/2015/03/touch-command-example.png) -touch command example +touch 命令示例 -You can use `file [filename]` to determine a file’s type (this will come in handy before launching your preferred text editor to edit it). +你可以使用 `file [filename]`来判断一个文件的类型 (在你用文本编辑器编辑之前,判断类型将会更方便编辑). ![file command example](http://www.tecmint.com/wp-content/uploads/2015/03/file-command-example.png) -file command example +file 命令示例 -and `rm [filename]` to delete it. +使用`rm [filename]` 可以删除文件 ![Linux rm command examples](http://www.tecmint.com/wp-content/uploads/2015/03/rm-command-examples.png) -rm command example +rm 命令示例 + +对于目录,你可以使用`mkdir [directory]`在已经存在的路径中创建目录,或者使用 `mkdir -p [/full/path/to/directory].`带全路径创建文件夹 -As for directories, you can create directories inside existing paths with `mkdir [directory]` or create a full path with `mkdir -p [/full/path/to/directory].` ![mkdir command example](http://www.tecmint.com/wp-content/uploads/2015/03/mkdir-command-example.png) -mkdir command example +mkdir 命令示例 -When it comes to removing directories, you need to make sure that they’re empty before issuing the `rmdir [directory]` command, or use the more powerful (handle with care!) `rm -rf [directory]`. This last option will force remove recursively the `[directory]` and all its contents – so use it at your own risk. +当你想要去删除目录时,在你使用`rmdir [directory]` 前,你需要先确保目录是空的,或者使用更加强力的命令(小心使用它)`rm -rf [directory]`.后者会强制删除`[directory]`以及他的内容.所以使用这个命令存在一定的风险 -### Input and Output Redirection and Pipelining ### +### 输入输出重定向以及管道 ### -The command line environment provides two very useful features that allows to redirect the input and output of commands from and to files, and to send the output of a command to another, called redirection and pipelining, respectively. +命令行环境提供了两个非常有用的功能:允许命令重定向的输入和输出到文件和发送到另一个文件,分别称为重定向和管道 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. +为了理解这两个重要概念,我们首先需要理解通常情况下三个重要的输入输出流的形式 -- Standard input (aka stdin) is by default attached to the keyboard. In other words, the keyboard is the standard input device to enter commands to the command line. -- Standard output (aka stdout) is by default attached to the screen, the device that “receives” the output of commands and display them on the screen. -- Standard error (aka stderr), is where the status messages of a command is sent to by default, which is also the screen. +- 标准输入 (aka stdin) 是指默认使用键盘链接. 换句话说,键盘是输入命令到命令行的标准输入设备。 +- 标准输出 (aka stdout) 是指默认展示再屏幕上, 显示器接受输出命令,并且展示在屏幕上。 +- 标准错误 (aka 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 的结果。但在后一种情况下,它是标准错误输出。 ![Linux input output redirect](http://www.tecmint.com/wp-content/uploads/2015/03/Linux-input-output-redirect.png) +输入和输出命令实例 -Input and Output Example - -To more easily identify these special files, they are each assigned a file descriptor, an abstract representation that is used to access them. The essential thing to understand is that these files, just like others, can be redirected. What this means is that you can capture the output from a file or script and send it as input to another file, command, or script. This will allow you to store on disk, for example, the output of commands for later processing or analysis. +为了更容易识别这些特殊文件,每个文件都被分配有一个文件描述符(用于控制他们的抽象标识)。主要要理解的是,这些文件就像其他人一样,可以被重定向。这就意味着你可以从一个文件或脚本中捕获输出,并将它传送到另一个文件、命令或脚本中。你就可以在在磁盘上存储命令的输出结果,用于稍后的分析 To redirect stdin (fd 0), stdout (fd 1), or stderr (fd 2), the following operators are available. @@ -63,102 +65,102 @@ To redirect stdin (fd 0), stdout (fd 1), or stderr (fd 2), the following operato -Redirection Operator -Effect +转向操作 +效果 > -Redirects standard output to a file containing standard output. If the destination file exists, it will be overwritten. +标准输出到一个文件。如果目标文件存在,内容就会被重写 >> -Appends standard output to a file. +添加标准输出到文件尾部 2> -Redirects standard error to a file containing standard output. If the destination file exists, it will be overwritten. +标准错误输出到一个文件。如果目标文件存在,内容就会被重写 2>> -Appends standard error to the existing file. +添加标准错误输出到文件尾部. &> -Redirects both standard output and standard error to a file; if the specified file exists, it will be overwritten. +标准错误和标准输出都到一个文件。如果目标文件存在,内容就会被重写 < -Uses the specified file as standard input. +使用特定的文件做标准输出 <> -The specified file is used for both standard input and standard output. +使用特定的文件做标准输出和标准错误 -As opposed to redirection, pipelining is performed by adding a vertical bar `(|)` after a command and before another one. -Remember: +相比与重定向,管道是通过在命令后添加一个竖杠`(|)`再添加另一个命令 . -- Redirection is used to send the output of a command to a file, or to send a file as input to a command. -- Pipelining is used to send the output of a command to another command as input. +记得: -#### Examples Of Redirection and Pipelining #### +- 重定向是用来定向命令的输出到一个文件,或定向一个文件作为输入到一个命令。 +- 管道是用来将命令的输出转发到另一个命令作为输入。 -**Example 1: Redirecting the output of a command to a file** +#### 重定向和管道的使用实例 #### -There will be times when you will need to iterate over a list of files. To do that, you can first save that list to a file and then read that file line by line. While it is true that you can iterate over the output of ls directly, this example serves to illustrate redirection. +** 例1:将一个命令的输出到文件 ** + +有些时候,你需要遍历一个文件列表。要做到这样,你可以先将该列表保存到文件中,然后再按行读取该文件。虽然你可以遍历直接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) -Redirect output of command tot a file +将一个命令的输出到文件 -**Example 2: Redirecting both stdout and stderr to /dev/null** +** 例2:重定向stdout和stderr到/dev/null ** -In case we want to prevent both stdout and stderr to be displayed on the screen, we can redirect both file descriptors to `/dev/null`. Note how the output changes when the redirection is implemented for the same command. +如果不想让标准输出和标准错误展示在屏幕上,我们可以把文件描述符重定向到 `/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) -Redirecting stdout and stderr ouput to /dev/null +重定向stdout和stderr到/dev/null -#### Example 3: Using a file as input to a command #### +#### 例3:使用一个文件作为命令的输入 #### -While the classic syntax of the [cat command][2] is as follows. +当官方的[cat 命令][2]的语法如下时 # cat [file(s)] -You can also send a file as input, using the correct redirection operator. +您还可以使用正确的重定向操作符传送一个文件作为输入。 # cat < mail.txt ![Linux cat command examples](http://www.tecmint.com/wp-content/uploads/2015/03/cat-command-examples.png) -cat command example +cat 命令实例 -#### Example 4: Sending the output of a command as input to another #### +#### 例4:发送一个命令的输出作为另一个命令的输入 #### -If you have a large directory or process listing and want to be able to locate a certain file or process at a glance, you will want to pipeline the listing to grep. +如果你有一个较大的目录或进程列表,并且想快速定位,你或许需要将列表通过管道传送给grep -Note that we use to pipelines in the following example. The first one looks for the required keyword, while the second one will eliminate the actual `grep command` from the results. This example lists all the processes associated with the apache user. +接下来我们使用管道在下面的命令中,第一个是查找所需的关键词,第二个是除去产生的 `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) -Send output of command as input to another +发送一个命令的输出作为另一个命令的输入 -### Archiving, Compressing, Unpacking, and Uncompressing Files ### +### 归档,压缩,解包,解压文件 ### -If you need to transport, backup, or send via email a group of files, you will use an archiving (or grouping) tool such as [tar][3], typically used with a compression utility like gzip, bzip2, or xz. - -Your choice of a compression tool will be likely defined by the compression speed and rate of each one. Of these three compression tools, gzip is the oldest and provides the least compression, bzip2 provides improved compression, and xz is the newest and provides the best compression. Typically, files compressed with these utilities have .gz, .bz2, or .xz extensions, respectively. +如果你需要传输,备份,或者通过邮件发送一组文件,你可以使用一个存档(或文件夹)如 [tar][3]工具,通常使用gzip,bzip2,或XZ压缩工具. +您选择的压缩工具每一个都有自己的定义的压缩速度和速率的。这三种压缩工具,gzip是最古老和提供最小压缩的工具,bzip2提供经过改进的压缩,以及XZ提供最信和最好的压缩。通常情况下,这些文件都是被压缩的如.gz .bz2或.xz 注:表格 @@ -166,44 +168,44 @@ Your choice of a compression tool will be likely defined by the compression spee - - - + + + - + - + - + - + - + - + - +
CommandAbbreviationDescription命令缩写描述
–create cCreates a tar archive创建一个tar归档
–concatenate AAppends tar files to an archive向归档中添加tar文件
–append rAppends non-tar files to an archive向归档中添加非tar文件
–update uAppends files that are newer than those in an archive添加比归档中的文件更新的文件
–diff or –compare dCompares an archive to files on disk将归档和硬盘的文件夹进行对比
–list tLists the contents of a tarball列举一个tar的压缩包
–extract or –get xExtracts files from an archive从归档中解压文件
@@ -215,51 +217,51 @@ Your choice of a compression tool will be likely defined by the compression spee -Operation modifier -Abbreviation -Description +操作参数 +缩写 +描述 directory dir C -Changes to directory dir before performing operations +在执行操作前更改目录 same-permissions and same-owner p -Preserves permissions and ownership information, respectively. +分别保留权限和所有者信息 –verbose v -Lists all files as they are read or extracted; if combined with –list, it also displays file sizes, ownership, and timestamps +列举所有文件用于读取或提取,这里包含列表,并显示文件的大小、所有权和时间戳 exclude file -Excludes file from the archive. In this case, file can be an actual file or a pattern. +排除存档文件。在这种情况下,文件可以是一个实际的文件或目录。 gzip or gunzip z -Compresses an archive through gzip +使用gzip压缩文件 –bzip2 j -Compresses an archive through bzip2 +使用bzip2压缩文件 –xz J -Compresses an archive through xz +使用xz压缩文件 -#### Example 5: Creating a tarball and then compressing it using the three compression utilities #### +#### 例5:创建一个文件,然后使用三种压缩工具压缩#### -You may want to compare the effectiveness of each tool before deciding to use one or another. Note that while compressing small files, or a few files, the results may not show much differences, but may give you a glimpse of what they have to offer. +在决定使用一个或另一个工具之前,您可能想比较每个工具的压缩效率。请注意压缩小文件或几个文件,结果可能不会有太大的差异,但可能会给你看出他们的差异 # 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 @@ -268,51 +270,51 @@ You may want to compare the effectiveness of each tool before deciding to use on ![Linux tar command examples](http://www.tecmint.com/wp-content/uploads/2015/03/tar-command-examples.png) -tar command examples +tar 命令实例 -#### Example 6: Preserving original permissions and ownership while archiving and when #### +#### 例6:归档时同时保存原始权限和所有权 #### -If you are creating backups from users’ home directories, you will want to store the individual files with the original permissions and ownership instead of changing them to that of the user account or daemon performing the backup. The following example preserves these attributes while taking the backup of the contents in the `/var/log/httpd` directory: +如果你创建的是用户的主目录的备份,你需要要存储的个人文件与原始权限和所有权,而不是通过改变他们的用户帐户或守护进程来执行备份。下面的命令可以在归档时保留文件属性 # tar cJf ApacheLogs-$(date +%Y%m%d).tar.xz /var/log/httpd/* --same-permissions --same-owner -### Create Hard and Soft Links ### +### 创建软连接和硬链接 ### -In Linux, there are two types of links to files: hard links and soft (aka symbolic) links. Since a hard link represents another name for an existing file and is identified by the same inode, it then points to the actual data, as opposed to symbolic links, which point to filenames instead. +在Linux中,有2种类型的链接文件:硬链接和软(也称为符号)链接。因为硬链接文件代表另一个名称是由同一点确定,然后链接到实际的数据;符号链接指向的文件名,而不是实际的数据 -In addition, hard links do not occupy space on disk, while symbolic links do take a small amount of space to store the text of the link itself. The downside of hard links is that they can only be used to reference files within the filesystem where they are located because inodes are unique inside a filesystem. Symbolic links save the day, in that they point to another file or directory by name rather than by inode, and therefore can cross filesystem boundaries. +此外,硬链接不占用磁盘上的空间,而符号链接做占用少量的空间来存储的链接本身的文本。硬链接的缺点就是要求他们必须在同一个innode内。而符号链接没有这个限制,符号链接因为只保存了文件名和目录名,所以可以跨文件系统. -The basic syntax to create links is similar in both cases: +创建链接的基本语法看起来是相似的: - # ln TARGET LINK_NAME # Hard link named LINK_NAME to file named TARGET - # ln -s TARGET LINK_NAME # Soft link named LINK_NAME to file named TARGET + # ln TARGET LINK_NAME #从Link_NAME到Target的硬链接 + # ln -s TARGET LINK_NAME #从Link_NAME到Target的软链接 -#### Example 7: Creating hard and soft links #### +#### 例7:创建硬链接和软链接 #### -There is no better way to visualize the relation between a file and a hard or symbolic link that point to it, than to create those links. In the following screenshot you will see that the file and the hard link that points to it share the same inode and both are identified by the same disk usage of 466 bytes. +没有更好的方式来形象的说明一个文件和一个指向它的符号链接的关系,而不是创建这些链接。在下面的截图中你会看到文件的硬链接指向它共享相同的节点都是由466个字节的磁盘使用情况确定。 -On the other hand, creating a hard link results in an extra disk usage of 5 bytes. Not that you’re going to run out of storage capacity, but this example is enough to illustrate the difference between a hard link and a soft link. +另一方面,在别的磁盘创建一个硬链接将占用5个字节,并不是说你将耗尽存储容量,而是这个例子足以说明一个硬链接和软链接之间的区别。 ![Difference between a hard link and a soft link](http://www.tecmint.com/wp-content/uploads/2015/03/hard-soft-link.png) -Difference between a hard link and a soft link +软连接和硬链接之间的不同 -A typical usage of symbolic links is to reference a versioned file in a Linux system. Suppose there are several programs that need access to file fooX.Y, which is subject to frequent version updates (think of a library, for example). Instead of updating every single reference to fooX.Y every time there’s a version update, it is wiser, safer, and faster, to have programs look to a symbolic link named just foo, which in turn points to the actual fooX.Y. +符号链接的典型用法是在Linux系统的版本文件参考。假设有需要一个访问文件foo X.Y 想图书馆一样经常被访问,你想更新一个就可以而不是更新所有的foo X.Y,这时使用软连接更为明智和安全。有文件被看成foo X.Y的链接符号,从而找到foo X.Y -Thus, when X and Y change, you only need to edit the symbolic link foo with a new destination name instead of tracking every usage of the destination file and updating it. +这样的话,当你的X和Y发生变化后,你只需更新一个文件,而不是更新每个文件。 -### Summary ### +### 总结 ### -In this article we have reviewed some essential file and directory management skills that must be a part of every system administrator’s tool-set. Make sure to review other parts of this series as well in order to integrate these topics with the content covered in this tutorial. +在这篇文章中,我们回顾了一些基本的文件和目录管理技能,这是每个系统管理员的工具集的一部分。请确保阅读了本系列的其他部分,以及复习并将这些主题与本教程所涵盖的内容相结合。 -Feel free to let us know if you have any questions or comments. We are always more than glad to hear from our readers. +如果你有任何问题或意见,请随时告诉我们。我们总是很高兴从读者那获取反馈. -------------------------------------------------------------------------------- via: http://www.tecmint.com/file-and-directory-management-in-linux/ 作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) +译者:[xiqingongzi](https://github.com/xiqingongzi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 483fe49938411ce8d731a9e6893d56246d1a363a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Sat, 8 Aug 2015 03:27:35 +0800 Subject: [PATCH 1658/2517] =?UTF-8?q?=E9=A2=86RHCSA=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E7=AF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...eries--Part 03--How to Manage Users and Groups in RHEL 7.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md index be78c87e3a..0b85744c6c 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md @@ -1,3 +1,4 @@ +[translated by xiqingongzi] RHCSA Series: How to Manage Users and Groups in RHEL 7 – Part 3 ================================================================================ Managing a RHEL 7 server, as it is the case with any other Linux server, will require that you know how to add, edit, suspend, or delete user accounts, and grant users the necessary permissions to files, directories, and other system resources to perform their assigned tasks. @@ -245,4 +246,4 @@ via: http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ [2]:http://www.tecmint.com/usermod-command-examples/ [3]:http://www.tecmint.com/ls-interview-questions/ [4]:http://www.tecmint.com/file-and-directory-management-in-linux/ -[5]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ \ No newline at end of file +[5]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ From 6a1641ce6e2328d1ad15908f34c9ecb80e7c19f3 Mon Sep 17 00:00:00 2001 From: xiqingongzi Date: Sat, 8 Aug 2015 03:38:00 +0800 Subject: [PATCH 1659/2517] Move --- ...t 01--Reviewing Essential Commands and System Documentation.md | 0 ...ries--Part 02--How to Perform File and Directory Management.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {sources/tech/RHCSA Series => translated/tech/RHCSA}/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md (100%) rename {sources/tech/RHCSA Series => translated/tech/RHCSA}/RHCSA Series--Part 02--How to Perform File and Directory Management.md (100%) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/translated/tech/RHCSA/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md similarity index 100% rename from sources/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md rename to translated/tech/RHCSA/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md b/translated/tech/RHCSA/RHCSA Series--Part 02--How to Perform File and Directory Management.md similarity index 100% rename from sources/tech/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md rename to translated/tech/RHCSA/RHCSA Series--Part 02--How to Perform File and Directory Management.md From 339bbf0b5c6ba7649972b300e40535316fabbb64 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 8 Aug 2015 18:06:08 +0800 Subject: [PATCH 1660/2517] [Translated] tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md --- ...riables on a Linux and Unix-like System.md | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) rename {sources => translated}/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md (50%) diff --git a/sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md b/translated/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md similarity index 50% rename from sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md rename to translated/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md index 715ecc2084..202c4e304a 100644 --- a/sources/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md +++ b/translated/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md @@ -1,50 +1,49 @@ -Translating by ictlyh -How To: Temporarily Clear Bash Environment Variables on a Linux and Unix-like System +如何在 Linux 和类 Unix 系统上临时清空 Bash 环境变量 ================================================================================ -I'm a bash shell user. I would like to temporarily clear bash shell environment variables. I do not want to delete or unset an exported environment variable. How do I run a program in a temporary environment in bash or ksh shell? +我是个 bash shell 用户。我想临时清空 bash shell 环境变量。但我不想删除或者 unset 一个 export 环境变量。我怎样才能在 bash 或 ksh shell 的临时环境中运行程序呢? -You can use the env command to set and print environment on a Linux or Unix-like systems. The env command executes utility after modifying the environment as specified on the command line. +你可以在 Linux 或类 Unix 系统中使用 env 命令设置并打印环境。env 命令将环境修改为命令行指定的那样之后再执行程序。 -### How do I display my current environment? ### +### 如何显示当前环境? ### -Open the terminal application and type any one of the following command: +打开终端应用程序并输入下面的其中一个命令: printenv -OR +或 env -Sample outputs: +输出样例: -![Fig.01: Unix/Linux: List All Environment Variables Command](http://s0.cyberciti.org/uploads/faq/2015/08/env-unix-linux-command-output.jpg) -Fig.01: Unix/Linux: List All Environment Variables Command +![Fig.01: Unix/Linux: 列出所有环境变量](http://s0.cyberciti.org/uploads/faq/2015/08/env-unix-linux-command-output.jpg) +Fig.01: Unix/Linux: 列出所有环境变量 -### Counting your environment variables ### +### 统计环境变量数目 ### -Type the following command: +输入下面的命令: env | wc -l printenv | wc -l -Sample outputs: +输出样例: 20 -### Run a program in a clean environment in bash/ksh/zsh ### +### 在 bash/ksh/zsh 干净环境中运行程序 ### -The syntax is as follows: +语法如下所示: env -i your-program-name-here arg1 arg2 ... -For example, run the wget program without using http_proxy and/or all other variables i.e. temporarily clear all bash/ksh/zsh environment variables and run the wget program: +例如,不使用 http_proxy 和/或任何其它变量运行 wget 程序。临时清除所有 bash/ksh/zsh 环境变量并运行 wget 程序: env -i /usr/local/bin/wget www.cyberciti.biz env -i wget www.cyberciti.biz -This is very useful when you want to run a command ignoring any environment variables you have set. I use this command many times everyday to ignore the http_proxy and other environment variable I have set. +这当你想忽视任何已经设置的环境变量来运行命令时非常有用。我每天都会多次使用这个命令,以便忽视 http_proxy 和其它我设置的环境变量。 -#### Example: With the http_proxy #### +#### 例子:使用 http_proxy #### $ wget www.cyberciti.biz --2015-08-03 23:20:23-- http://www.cyberciti.biz/ @@ -55,7 +54,7 @@ This is very useful when you want to run a command ignoring any environment vari index.html [ <=> ] 36.17K 87.0KB/s in 0.4s 2015-08-03 23:20:24 (87.0 KB/s) - 'index.html' saved [37041] -#### Example: Ignore the http_proxy #### +#### 例子:忽视 http_proxy #### $ env -i /usr/local/bin/wget www.cyberciti.biz --2015-08-03 23:25:17-- http://www.cyberciti.biz/ @@ -67,7 +66,7 @@ This is very useful when you want to run a command ignoring any environment vari index.html.1 [ <=> ] 36.17K 115KB/s in 0.3s 2015-08-03 23:25:18 (115 KB/s) - 'index.html.1' saved [37041] -The option -i causes env command to completely ignore the environment it inherits. However, it does not prevent your command (such as wget or curl) setting new variables. Also, note down the side effect of running bash/ksh shell: +-i 选项使 env 命令完全忽视它继承的环境。但是,它并不阻止你的命令(例如 wget 或 curl)设置新的变量。同时,也要注意运行 bash/ksh shell 的副作用: env -i env | wc -l ## empty ## # Now run bash ## @@ -75,15 +74,15 @@ The option -i causes env command to completely ignore the environment it inherit ## New enviroment set by bash program ## env | wc -l -#### Example: Set an environmental variable #### +#### 例子:设置一个环境变量 #### -The syntax is: +语法如下: env var=value /path/to/command arg1 arg2 ... ## OR ## var=value /path/to/command arg1 arg2 ... -For example set http_proxy: +例如设置 http_proxy: env http_proxy="http://USER:PASSWORD@server1.cyberciti.biz:3128/" \ /usr/local/bin/wget www.cyberciti.biz @@ -93,7 +92,7 @@ For example set http_proxy: via: http://www.cyberciti.biz/faq/linux-unix-temporarily-clearing-environment-variables-command/ 作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](https://github.com/ictlyh) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From a2890da52e074dbd6b53ca274db3ce87202569fa Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 8 Aug 2015 22:53:24 +0800 Subject: [PATCH 1661/2517] PUB:20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux @dingdongnigetou --- ...y Using 'Explain Shell' Script in Linux.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename {translated/tech => published}/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md (68%) diff --git a/translated/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md b/published/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md similarity index 68% rename from translated/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md rename to published/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md index b8f993676c..d31df55711 100644 --- a/translated/tech/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md +++ b/published/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md @@ -1,16 +1,16 @@ -在Linux中利用"Explain Shell"脚本更容易地理解Shell命令 +轻松使用“Explain Shell”脚本来理解 Shell 命令 ================================================================================ -在某些时刻, 当我们在Linux平台上工作时我们所有人都需要shell命令的帮助信息。 尽管内置的帮助像man pages、whatis命令是有帮助的, 但man pages的输出非常冗长, 除非是个有linux经验的人,不然从大量的man pages中获取帮助信息是非常困难的,而whatis命令的输出很少超过一行, 这对初学者来说是不够的。 +我们在Linux上工作时,每个人都会遇到需要查找shell命令的帮助信息的时候。 尽管内置的帮助像man pages、whatis命令有所助益, 但man pages的输出非常冗长, 除非是个有linux经验的人,不然从大量的man pages中获取帮助信息是非常困难的,而whatis命令的输出很少超过一行, 这对初学者来说是不够的。 ![Explain Shell Commands in Linux Shell](http://www.tecmint.com/wp-content/uploads/2015/07/Explain-Shell-Commands-in-Linux-Shell.jpeg) -在Linux Shell中解释Shell命令 +*在Linux Shell中解释Shell命令* -有一些第三方应用程序, 像我们在[Commandline Cheat Sheet for Linux Users][1]提及过的'cheat'命令。Cheat是个杰出的应用程序,即使计算机没有联网也能提供shell命令的帮助, 但是它仅限于预先定义好的命令。 +有一些第三方应用程序, 像我们在[Linux 用户的命令行速查表][1]提及过的'cheat'命令。cheat是个优秀的应用程序,即使计算机没有联网也能提供shell命令的帮助, 但是它仅限于预先定义好的命令。 -Jackson写了一小段代码,它能非常有效地在bash shell里面解释shell命令,可能最美之处就是你不需要安装第三方包了。他把包含这段代码的的文件命名为”explain.sh“。 +Jackson写了一小段代码,它能非常有效地在bash shell里面解释shell命令,可能最美之处就是你不需要安装第三方包了。他把包含这段代码的的文件命名为“explain.sh”。 -#### Explain工具的特性 #### +#### explain.sh工具的特性 #### - 易嵌入代码。 - 不需要安装第三方工具。 @@ -18,22 +18,22 @@ Jackson写了一小段代码,它能非常有效地在bash shell里面解释she - 需要网络连接才能工作。 - 纯命令行工具。 - 可以解释bash shell里面的大部分shell命令。 -- 无需root账户参与。 +- 无需使用root账户。 **先决条件** -唯一的条件就是'curl'包了。 在如今大多数Linux发行版里面已经预安装了culr包, 如果没有你可以按照下面的命令来安装。 +唯一的条件就是'curl'包了。 在如今大多数Linux发行版里面已经预安装了curl包, 如果没有你可以按照下面的命令来安装。 # apt-get install curl [On Debian systems] # yum install curl [On CentOS systems] ### 在Linux上安装explain.sh工具 ### -我们要将下面这段代码插入'~/.bashrc'文件(LCTT注: 若没有该文件可以自己新建一个)中。我们必须为每个用户以及对应的'.bashrc'文件插入这段代码,笔者建议你不要加在root用户下。 +我们要将下面这段代码插入'~/.bashrc'文件(LCTT译注: 若没有该文件可以自己新建一个)中。我们要为每个用户以及对应的'.bashrc'文件插入这段代码,但是建议你不要加在root用户下。 我们注意到.bashrc文件的第一行代码以(#)开始, 这个是可选的并且只是为了区分余下的代码。 -# explain.sh 标记代码的开始, 我们将代码插入.bashrc文件的底部。 +\# explain.sh 标记代码的开始, 我们将代码插入.bashrc文件的底部。 # explain.sh begins explain () { @@ -53,7 +53,7 @@ Jackson写了一小段代码,它能非常有效地在bash shell里面解释she ### explain.sh工具的使用 ### -在插入代码并保存之后,你必须退出当前的会话然后重新登录来使改变生效(LCTT注:你也可以直接使用命令“source~/.bashrc”来让改变生效)。每件事情都是交由‘curl’命令处理, 它负责将需要解释的命令以及命令选项传送给mankier服务,然后将必要的信息打印到Linux命令行。不必说的就是使用这个工具你总是需要连接网络。 +在插入代码并保存之后,你必须退出当前的会话然后重新登录来使改变生效(LCTT译注:你也可以直接使用命令`source~/.bashrc` 来让改变生效)。每件事情都是交由‘curl’命令处理, 它负责将需要解释的命令以及命令选项传送给mankier服务,然后将必要的信息打印到Linux命令行。不必说的就是使用这个工具你总是需要连接网络。 让我们用explain.sh脚本测试几个笔者不懂的命令例子。 @@ -63,7 +63,7 @@ Jackson写了一小段代码,它能非常有效地在bash shell里面解释she ![Get Help on du Command](http://www.tecmint.com/wp-content/uploads/2015/07/Get-Help-on-du-Command.png) -获得du命令的帮助 +*获得du命令的帮助* **2.如果你忘了'tar -zxvf'的作用,你可以简单地如此做:** @@ -71,7 +71,7 @@ Jackson写了一小段代码,它能非常有效地在bash shell里面解释she ![Tar Command Help](http://www.tecmint.com/wp-content/uploads/2015/07/Tar-Command-Help.png) -Tar命令帮助 +*Tar命令帮助* **3.我的一个朋友经常对'whatis'以及'whereis'命令的使用感到困惑,所以我建议他:** @@ -86,7 +86,7 @@ Tar命令帮助 ![Whatis Whereis Commands Help](http://www.tecmint.com/wp-content/uploads/2015/07/Whatis-Whereis-Commands-Help.png) -Whatis/Whereis命令的帮助 +*Whatis/Whereis命令的帮助* 你只需要使用“Ctrl+c”就能退出交互模式。 @@ -96,11 +96,11 @@ Whatis/Whereis命令的帮助 ![Get Help on Multiple Commands](http://www.tecmint.com/wp-content/uploads/2015/07/Get-Help-on-Multiple-Commands.png) -获取多条命令的帮助 +*获取多条命令的帮助* -同样地,你可以请求你的shell来解释任何shell命令。 前提是你需要一个可用的网络。输出的信息是基于解释的需要从服务器中生成的,因此输出的结果是不可定制的。 +同样地,你可以请求你的shell来解释任何shell命令。 前提是你需要一个可用的网络。输出的信息是基于需要解释的命令,从服务器中生成的,因此输出的结果是不可定制的。 -对于我来说这个工具真的很有用并且它已经荣幸地添加在我的.bashrc文件中。你对这个项目有什么想法?它对你有用么?它的解释令你满意吗?请让我知道吧! +对于我来说这个工具真的很有用,并且它已经荣幸地添加在我的.bashrc文件中。你对这个项目有什么想法?它对你有用么?它的解释令你满意吗?请让我知道吧! 请在下面评论为我们提供宝贵意见,喜欢并分享我们以及帮助我们得到传播。 @@ -110,7 +110,7 @@ via: http://www.tecmint.com/explain-shell-commands-in-the-linux-shell/ 作者:[Avishek Kumar][a] 译者:[dingdongnigetou](https://github.com/dingdongnigetou) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 8a5094fa7787dc36c9761d7128a0bd15b1cb8a64 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 8 Aug 2015 22:54:02 +0800 Subject: [PATCH 1662/2517] Update 20150728 Process of the Linux kernel building.md --- sources/tech/20150728 Process of the Linux kernel building.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index cb7ec19b45..1c03ebbe72 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -1,3 +1,5 @@ +Translating by Ezio + Process of the Linux kernel building ================================================================================ Introduction @@ -671,4 +673,4 @@ via: https://github.com/0xAX/linux-insides/blob/master/Misc/how_kernel_compiled. 译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From be302cdf123a3ab2492aee561432876902949655 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 8 Aug 2015 23:50:31 +0800 Subject: [PATCH 1663/2517] PUB:20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System @ictlyh --- ...riables on a Linux and Unix-like System.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) rename {translated/tech => published}/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md (71%) diff --git a/translated/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md b/published/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md similarity index 71% rename from translated/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md rename to published/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md index 202c4e304a..2157cdc4e6 100644 --- a/translated/tech/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md +++ b/published/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md @@ -1,8 +1,8 @@ -如何在 Linux 和类 Unix 系统上临时清空 Bash 环境变量 +如何在 Linux 上运行命令前临时清空 Bash 环境变量 ================================================================================ -我是个 bash shell 用户。我想临时清空 bash shell 环境变量。但我不想删除或者 unset 一个 export 环境变量。我怎样才能在 bash 或 ksh shell 的临时环境中运行程序呢? +我是个 bash shell 用户。我想临时清空 bash shell 环境变量。但我不想删除或者 unset 一个输出的环境变量。我怎样才能在 bash 或 ksh shell 的临时环境中运行程序呢? -你可以在 Linux 或类 Unix 系统中使用 env 命令设置并打印环境。env 命令将环境修改为命令行指定的那样之后再执行程序。 +你可以在 Linux 或类 Unix 系统中使用 env 命令设置并打印环境。env 命令可以按命令行指定的变量来修改环境,之后再执行程序。 ### 如何显示当前环境? ### @@ -17,29 +17,30 @@ 输出样例: ![Fig.01: Unix/Linux: 列出所有环境变量](http://s0.cyberciti.org/uploads/faq/2015/08/env-unix-linux-command-output.jpg) -Fig.01: Unix/Linux: 列出所有环境变量 + +*Fig.01: Unix/Linux: 列出所有环境变量* ### 统计环境变量数目 ### 输入下面的命令: env | wc -l - printenv | wc -l + printenv | wc -l # 或者 输出样例: 20 -### 在 bash/ksh/zsh 干净环境中运行程序 ### +### 在干净的 bash/ksh/zsh 环境中运行程序 ### 语法如下所示: env -i your-program-name-here arg1 arg2 ... -例如,不使用 http_proxy 和/或任何其它变量运行 wget 程序。临时清除所有 bash/ksh/zsh 环境变量并运行 wget 程序: +例如,要在不使用 http_proxy 和/或任何其它环境变量的情况下运行 wget 程序。临时清除所有 bash/ksh/zsh 环境变量并运行 wget 程序: env -i /usr/local/bin/wget www.cyberciti.biz - env -i wget www.cyberciti.biz + env -i wget www.cyberciti.biz # 或者 这当你想忽视任何已经设置的环境变量来运行命令时非常有用。我每天都会多次使用这个命令,以便忽视 http_proxy 和其它我设置的环境变量。 @@ -66,12 +67,12 @@ Fig.01: Unix/Linux: 列出所有环境变量 index.html.1 [ <=> ] 36.17K 115KB/s in 0.3s 2015-08-03 23:25:18 (115 KB/s) - 'index.html.1' saved [37041] --i 选项使 env 命令完全忽视它继承的环境。但是,它并不阻止你的命令(例如 wget 或 curl)设置新的变量。同时,也要注意运行 bash/ksh shell 的副作用: +-i 选项使 env 命令完全忽视它继承的环境。但是,它并不会阻止你的命令(例如 wget 或 curl)设置新的变量。同时,也要注意运行 bash/ksh shell 的副作用: - env -i env | wc -l ## empty ## - # Now run bash ## + env -i env | wc -l ## 空的 ## + # 现在运行 bash ## env -i bash - ## New enviroment set by bash program ## + ## bash 设置了新的环境变量 ## env | wc -l #### 例子:设置一个环境变量 #### @@ -79,13 +80,12 @@ Fig.01: Unix/Linux: 列出所有环境变量 语法如下: env var=value /path/to/command arg1 arg2 ... - ## OR ## + ## 或 ## var=value /path/to/command arg1 arg2 ... 例如设置 http_proxy: - env http_proxy="http://USER:PASSWORD@server1.cyberciti.biz:3128/" \ - /usr/local/bin/wget www.cyberciti.biz + env http_proxy="http://USER:PASSWORD@server1.cyberciti.biz:3128/" /usr/local/bin/wget www.cyberciti.biz -------------------------------------------------------------------------------- @@ -93,6 +93,6 @@ via: http://www.cyberciti.biz/faq/linux-unix-temporarily-clearing-environment-va 作者:Vivek Gite 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From 1f7c172f463723aa85ea3605c88de9e89835f78b Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 9 Aug 2015 10:51:47 +0800 Subject: [PATCH 1664/2517] translating --- ...0 How to Setup iTOP (IT Operational Portal) on CentOS 7.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md b/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md index 38477bb662..8b598999e1 100644 --- a/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md +++ b/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md @@ -1,3 +1,5 @@ +tranlsating---geekpi + How to Setup iTOP (IT Operational Portal) on CentOS 7 ================================================================================ iTOP is a simple, Open source web based IT Service Management tool. It has all of ITIL functionality that includes with Service desk, Configuration Management, Incident Management, Problem Management, Change Management and Service Management. iTop relays on Apache/IIS, MySQL and PHP, so it can run on any operating system supporting these applications. Since iTop is a web based application you don’t need to deploy any client software on each user’s PC. A simple web browser is enough to perform day to day operations of an IT environment with iTOP. @@ -171,4 +173,4 @@ via: http://linoxide.com/tools/setup-itop-centos-7/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/kashifs/ -[1]:http://www.combodo.com/spip.php?page=rubrique&id_rubrique=8 \ No newline at end of file +[1]:http://www.combodo.com/spip.php?page=rubrique&id_rubrique=8 From 3e3f2fab11865dd4cdbb700a62507cd8d14d2f4d Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 9 Aug 2015 16:34:00 +0800 Subject: [PATCH 1665/2517] translated --- ...TOP (IT Operational Portal) on CentOS 7.md | 104 +++++++++--------- 1 file changed, 51 insertions(+), 53 deletions(-) diff --git a/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md b/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md index 8b598999e1..dd20493d77 100644 --- a/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md +++ b/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md @@ -1,30 +1,28 @@ -tranlsating---geekpi - -How to Setup iTOP (IT Operational Portal) on CentOS 7 +如何在CentOS上安装iTOP(IT操作门户) ================================================================================ -iTOP is a simple, Open source web based IT Service Management tool. It has all of ITIL functionality that includes with Service desk, Configuration Management, Incident Management, Problem Management, Change Management and Service Management. iTop relays on Apache/IIS, MySQL and PHP, so it can run on any operating system supporting these applications. Since iTop is a web based application you don’t need to deploy any client software on each user’s PC. A simple web browser is enough to perform day to day operations of an IT environment with iTOP. +iTOP简单来说是一个简单的基于网络的开源IT服务管理工具。它有所有的ITIL功能包括服务台、配置管理、事件管理、问题管理、更改管理和服务管理。iTOP依赖于Apache/IIS、MySQL和PHP,因此它可以运行在任何支持这些软件的操作系统中。因为iTOP是一个网络程序,因此你不必在用户的PC端任何客户端程序。一个简单的浏览器就足够每天的IT环境操作了。 -To install and configure iTOP we will be using CentOS 7 as base operating with basic LAMP Stack environment installed on it that will cover its almost all prerequisites. +我们要在一台有满足基本需求的LAMP环境的CentOS 7上安装和配置iTOP。 -### Downloading iTOP ### +### 下载 iTOP ### -iTop download package is present on SourceForge, we can get its link from their official website [link][1]. +iTOP的下载包现在在SOurceForge上,我们可以从这获取它的官方[链接][1]。 ![itop download](http://blog.linoxide.com/wp-content/uploads/2015/07/1-itop-download.png) -We will the download link from here and get this zipped file on server with wget command as below. +我们从这里的连接用wget命令获取压缩文件 [root@centos-007 ~]# wget http://downloads.sourceforge.net/project/itop/itop/2.1.0/iTop-2.1.0-2127.zip -### iTop Extensions and Web Setup ### +### iTop扩展和网络安装 ### -By using unzip command we will extract the downloaded packages in the document root directory of our apache web server in a new directory with name itop. +使用unzip命令解压到apache根目录下的itop文件夹下。 [root@centos-7 ~]# ls iTop-2.1.0-2127.zip [root@centos-7 ~]# unzip iTop-2.1.0-2127.zip -d /var/www/html/itop/ -List the folder to view installation packages in it. +列出安装包中的内容。 [root@centos-7 ~]# ls -lh /var/www/html/itop/ total 68K @@ -33,7 +31,7 @@ List the folder to view installation packages in it. -rw-r--r--. 1 root root 23K Dec 17 2014 README drwxr-xr-x. 19 root root 4.0K Jul 14 13:10 web -Here is all the extensions that we can install. +这些是我们可以安装的扩展。 [root@centos-7 2.x]# ls authent-external itop-backup itop-config-mgmt itop-problem-mgmt itop-service-mgmt-provider itop-welcome-itil @@ -42,132 +40,132 @@ Here is all the extensions that we can install. installation.xml itop-change-mgmt-itil itop-incident-mgmt-itil itop-request-mgmt-itil itop-tickets itop-attachments itop-config itop-knownerror-mgmt itop-service-mgmt itop-virtualization-mgmt -Now from the extracted web directory, moving through different data models we will migrate the required extensions from the datamodels into the web extensions directory of web document root directory with copy command. +在解压的目录下,通过不同的数据模型用复制命令迁移需要的扩展从datamodels复制到web扩展目录下。 [root@centos-7 2.x]# pwd /var/www/html/itop/web/datamodels/2.x [root@centos-7 2.x]# cp -r itop-request-mgmt itop-service-mgmt itop-service-mgmt itop-config itop-change-mgmt /var/www/html/itop/web/extensions/ -### Installing iTop Web Interface ### +### 安装 iTop web界面 ### -Most of our server side settings and configurations are done.Finally we need to complete its web interface installation process to finalize the setup. +大多数服务端设置和配置已经完成了。最后我们安装web界面来完成安装。 -Open your favorite web browser and access the WordPress web directory in your web browser using your server IP or FQDN like. +打开浏览器使用ip地址或者FQDN来访问WordPress web目录。 http://servers_ip_address/itop/web/ -You will be redirected towards the web installation process for iTop. Let’s configure it as per your requirements like we did here in this tutorial. +你会被重定向到iTOP的web安装页面。让我们按照要求配置,就像在这篇教程中做的那样。 -#### Prerequisites Validation #### +#### 先决要求验证 #### -At the stage you will be prompted for welcome screen with prerequisites validation ok. If you get some warning then you have to make resolve it by installing its prerequisites. +这一步你就会看到验证完成的欢迎界面。如果你看到了一些警告信息,你需要先安装这些软件来解决这些问题。 ![mcrypt missing](http://blog.linoxide.com/wp-content/uploads/2015/07/2-itop-web-install.png) -At this stage one optional package named php mcrypt will be missing. Download the following rpm package then try to install php mcrypt package. +这一步一个叫php mcrypt的可选包丢失了。下载下面的rpm包接着尝试安装php mcrypt包。 [root@centos-7 ~]#yum localinstall php-mcrypt-5.3.3-1.el6.x86_64.rpm libmcrypt-2.5.8-9.el6.x86_64.rpm. -After successful installation of php-mcrypt library we need to restart apache web service, then reload the web page and this time its prerequisites validation should be OK. +成功安装完php-mcrypt后,我们需要重启apache服务,接着刷新页面,这时验证应该已经OK。 -#### Install or Upgrade iTop #### +#### 安装或者升级 iTop #### -Here we will choose the fresh installation as we have not installed iTop previously on our server. +现在我们要在没有安装iTOP的服务器上选择全新安装。 ![Install New iTop](http://blog.linoxide.com/wp-content/uploads/2015/07/3.png) -#### iTop License Agreement #### +#### iTop 许可协议 #### -Chose the option to accept the terms of the licenses of all the components of iTop and click "NEXT". +勾选同意iTOP所有组件的许可协议并点击“NEXT”。 ![License Agreement](http://blog.linoxide.com/wp-content/uploads/2015/07/4.png) -#### Database Configuration #### +#### 数据库配置 #### -Here we the do Configuration of the database connection by giving our database servers credentials and then choose from the option to create new database as shown. +现在我们输入数据库凭据来配置数据库连接,接着选择如下选择创建新数据库。 ![DB Connection](http://blog.linoxide.com/wp-content/uploads/2015/07/5.png) -#### Administrator Account #### +#### 管理员账户 #### -In this step we will configure an Admin account by filling out its login details as. +这一步中我们会输入它的登录信息来配置管理员账户。 ![Admin Account](http://blog.linoxide.com/wp-content/uploads/2015/07/6.png) -#### Miscellaneous Parameters #### +#### 杂项参数 #### -Let's choose the additional parameters whether you want to install with demo contents or with fresh database and proceed forward. +让我们选择额外的参数来选择你是否需要安装一个演示内容或者使用全新的数据库,接着下一步。 ![Misc Parameters](http://blog.linoxide.com/wp-content/uploads/2015/07/7.png) -### iTop Configurations Management ### +### iTop 配置管理 ### -The options below allow you to configure the type of elements that are to be managed inside iTop like all the base objects that are mandatory in the iTop CMDB, Manage Data Center devices, storage device and virtualization. +下面的选项允许你配置在iTOP要管理的元素类型,像CMDB、数据中心设备、存储设备和虚拟化这些东西在iTOP中是必须的。 ![Conf Management](http://blog.linoxide.com/wp-content/uploads/2015/07/8.png) -#### Service Management #### +#### 服务管理 #### -Select from the choices that best describes the relationships between the services and the IT infrastructure in your IT environment. So we are choosing Service Management for Service Providers here. +选择一个最能描述你的IT设备和环境之间的关系的选项。因此我们这里选择为服务提供商的服务管理。 ![Service Management](http://blog.linoxide.com/wp-content/uploads/2015/07/9.png) -#### iTop Tickets Management #### +#### iTop Tickets 管理 #### -From the different available options we will Select the ITIL Compliant Tickets Management option to have different types of ticket for managing user requests and incidents. +从不同的可用选项我们选择符合ITIL Tickets管理选项来管理不同类型的用户请求和事件。 ![Ticket Management](http://blog.linoxide.com/wp-content/uploads/2015/07/10.png) -#### Change Management Options #### +#### 改变管理选项 #### -Select the type of tickets you want to use in order to manage changes to the IT infrastructure from the available options. We are going to choose ITIL change management option here. +选择不同的ticket类型以便管理可用选项中的IT设备更改。我们选择ITTL更改管理选项。 ![ITIL Change](http://blog.linoxide.com/wp-content/uploads/2015/07/11.png) -#### iTop Extensions #### +#### iTop 扩展 #### -In this section we can select the additional extensions to install or we can unchecked the ones that you want to skip. +这一节我们选择额外的扩展来安装或者不选直接跳过。 ![iTop Extensions](http://blog.linoxide.com/wp-content/uploads/2015/07/13.png) -### Ready to Start Web Installation ### +### 准备开始web安装 ### -Now we are ready to start installing the components that we choose in previous steps. We can also drop down these installation parameters to view our configuration from the drop down. +现在我们开始准备安装先前先前选择的组件。我们也可以下拉这些安装参数来浏览我们的配置。 -Once you are confirmed with the installation parameters click on the install button. +确认安装参数后点击安装按钮。 ![Installation Parameters](http://blog.linoxide.com/wp-content/uploads/2015/07/16.png) -Let's wait for the progress bar to complete the installation process. It might takes few minutes to complete its installation process. +让我们等待进度条来完成安装步骤。它也许会花费几分钟来完成安装步骤。 ![iTop Installation Process](http://blog.linoxide.com/wp-content/uploads/2015/07/17.png) -### iTop Installation Done ### +### iTop安装完成 ### -Our iTop installation setup is complete, just need to do a simple manual operation as shown and then click to enter iTop. +我们的iTOP安装已经完成了,只要如下一个简单的手动操作就可以进入到iTOP。 ![iTop Done](http://blog.linoxide.com/wp-content/uploads/2015/07/18.png) -### Welcome to iTop (IT Operational Portal) ### +### 欢迎来到iTop (IT操作门户) ### ![itop welcome note](http://blog.linoxide.com/wp-content/uploads/2015/07/20.png) -### iTop Dashboard ### +### iTop 面板 ### -You can manage configuration of everything from here Servers, computers, Contacts, Locations, Contracts, Network devices…. You can create your own. Just the fact, that the installed CMDB module is great which is an essential part of every bigger IT. +你这里可以配置任何东西,服务、计算机、通讯录、位置、合同、网络设备等等。你可以创建你自己的。事实是刚安装的CMDB模块是每一个IT人员的必备模块。 ![iTop Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/07/19.png) -### Conclusion ### +### 总结 ### -ITOP is one of the best Open Source Service Desk solutions. We have successfully installed and configured it on our CentOS 7 cloud host. So, the most powerful aspect of iTop is the ease with which it can be customized via its “extensions”. Feel free to comment if you face any trouble during its setup. +ITOP是一个最棒的开源桌面服务解决方案。我们已经在CentOS 7上成功地安装和配置了。因此,iTOP最强大的一方面是它可以很简单地通过扩展来自定义。如果你在安装中遇到任何问题欢迎评论。 -------------------------------------------------------------------------------- via: http://linoxide.com/tools/setup-itop-centos-7/ 作者:[Kashif Siddique][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From b88de33b50ce231372d1ce08194d09a7d28989d7 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 9 Aug 2015 19:30:54 +0800 Subject: [PATCH 1666/2517] [Translated]20150803 Linux Logging Basics.md --- sources/tech/20150803 Linux Logging Basics.md | 92 ------------------- .../tech/20150803 Linux Logging Basics.md | 90 ++++++++++++++++++ 2 files changed, 90 insertions(+), 92 deletions(-) delete mode 100644 sources/tech/20150803 Linux Logging Basics.md create mode 100644 translated/tech/20150803 Linux Logging Basics.md diff --git a/sources/tech/20150803 Linux Logging Basics.md b/sources/tech/20150803 Linux Logging Basics.md deleted file mode 100644 index 6c3c3693a4..0000000000 --- a/sources/tech/20150803 Linux Logging Basics.md +++ /dev/null @@ -1,92 +0,0 @@ -FSSlc translating - -Linux Logging Basics -================================================================================ -First we’ll describe the basics of what Linux logs are, where to find them, and how they get created. If you already know this stuff, feel free to skip to the next section. - -### Linux System Logs ### - -Many valuable log files are automatically created for you by Linux. You can find them in your /var/log directory. Here is what this directory looks like on a typical Ubuntu system: - -![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Linux-system-log-terminal.png) - -Some of the most important Linux system logs include: - -- /var/log/syslog or /var/log/messages stores all global system activity data, including startup messages. Debian-based systems like Ubuntu store this in /var/log/syslog. RedHat-based systems like RHEL or CentOS store this in /var/log/messages. -- /var/log/auth.log or /var/log/secure stores logs from the Pluggable Authentication Module (pam) including successful logins, failed login attempts, and authentication methods. Ubuntu and Debian store authentication messages in /var/log/auth.log. RedHat and CentOS store this data in /var/log/secure. -- /var/log/kern stores kernel error and warning data, which is particularly helpful for troubleshooting custom kernels. -- /var/log/cron stores information about cron jobs. Use this data to verify that your cron jobs are running successfully. - -Digital Ocean has a thorough [tutorial][1] on these files and how rsyslog creates them on common distributions like RedHat and CentOS. - -Applications also write log files in this directory. For example, popular servers like Apache, Nginx, MySQL, and more can write log files here. Some of these log files are written by the application itself. Others are created through syslog (see below). - -### What’s Syslog? ### - -How do Linux system log files get created? The answer is through the syslog daemon, which listens for log messages on the syslog socket /dev/log and then writes them to the appropriate log file. - -The word “syslog” is an overloaded term and is often used in short to refer to one of these: - -1. **Syslog daemon** — a program to receive, process, and send syslog messages. It can [send syslog remotely][2] to a centralized server or write it to a local file. Common examples include rsyslogd and syslog-ng. In this usage, people will often say “sending to syslog.” -1. **Syslog protocol** — a transport protocol specifying how logs can be sent over a network and a data format definition for syslog messages (below). It’s officially defined in [RFC-5424][3]. The standard ports are 514 for plaintext logs and 6514 for encrypted logs. In this usage, people will often say “sending over syslog.” -1. **Syslog messages** — log messages or events in the syslog format, which includes a header with several standard fields. In this usage, people will often say “sending syslog.” - -Syslog messages or events include a header with several standard fields, making analysis and routing easier. They include the timestamp, the name of the application, the classification or location in the system where the message originates, and the priority of the issue. - -Here is an example log message with the syslog header included. It’s from the sshd daemon, which controls remote logins to the system. This message describes a failed login attempt: - - <34>1 2003-10-11T22:14:15.003Z server1.com sshd - - pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.0.2.2 - -### Syslog Format and Fields ### - -Each syslog message includes a header with fields. Fields are structured data that makes it easier to analyze and route the events. Here is the format we used to generate the above syslog example. You can match each value to a specific field name. - - <%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% %msg%n - -Below, you’ll find descriptions of some of the most commonly used syslog fields when searching or troubleshooting issues. - -#### Timestamp #### - -The [timestamp][4] field (2003-10-11T22:14:15.003Z in the example) indicates the time and date that the message was generated on the system sending the message. That time can be different from when another system receives the message. The example timestamp breaks down like this: - -- **2003-10-11** is the year, month, and day. -- **T** is a required element of the TIMESTAMP field, separating the date and the time. -- **22:14:15.003** is the 24-hour format of the time, including the number of milliseconds (**003**) into the next second. -- **Z** is an optional element, indicating UTC time. Instead of Z, the example could have included an offset, such as -08:00, which indicates that the time is offset from UTC by 8 hours, PST. - -#### Hostname #### - -The [hostname][5] field (server1.com in the example above) indicates the name of the host or system that sent the message. - -#### App-Name #### - -The [app-name][6] field (sshd:auth in the example) indicates the name of the application that sent the message. - -#### Priority #### - -The priority field or [pri][7] for short (<34> in the example above) tells you how urgent or severe the event is. It’s a combination of two numerical fields: the facility and the severity. The severity ranges from the number 7 for debug events all the way to 0 which is an emergency. The facility describes which process created the event. It ranges from 0 for kernel messages to 23 for local application use. - -Pri can be output in two ways. The first is as a single number prival which is calculated as the facility field value multiplied by 8, then the result is added to the severity field value: (facility)(8) + (severity). The second is pri-text which will output in the string format “facility.severity.” The latter format can often be easier to read and search but takes up more storage space. - --------------------------------------------------------------------------------- - -via: http://www.loggly.com/ultimate-guide/logging/linux-logging-basics/ - -作者:[Jason Skowronski][a1] -作者:[Amy Echeverri][a2] -作者:[Sadequl Hussain][a3] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a1]:https://www.linkedin.com/in/jasonskowronski -[a2]:https://www.linkedin.com/in/amyecheverri -[a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 -[1]:https://www.digitalocean.com/community/tutorials/how-to-view-and-configure-linux-logs-on-ubuntu-and-centos -[2]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.y2e9tdfk1cdb -[3]:https://tools.ietf.org/html/rfc5424 -[4]:https://tools.ietf.org/html/rfc5424#section-6.2.3 -[5]:https://tools.ietf.org/html/rfc5424#section-6.2.4 -[6]:https://tools.ietf.org/html/rfc5424#section-6.2.5 -[7]:https://tools.ietf.org/html/rfc5424#section-6.2.1 diff --git a/translated/tech/20150803 Linux Logging Basics.md b/translated/tech/20150803 Linux Logging Basics.md new file mode 100644 index 0000000000..00acdf183e --- /dev/null +++ b/translated/tech/20150803 Linux Logging Basics.md @@ -0,0 +1,90 @@ +Linux 日志基础 +================================================================================ +首先,我们将描述有关 Linux 日志是什么,到哪儿去找它们以及它们是如何创建的基础知识。如果你已经知道这些,请随意跳至下一节。 + +### Linux 系统日志 ### + +许多有价值的日志文件都是由 Linux 自动地为你创建的。你可以在 `/var/log` 目录中找到它们。下面是在一个典型的 Ubuntu 系统中这个目录的样子: + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Linux-system-log-terminal.png) + +一些最为重要的 Linux 系统日志包括: + +- `/var/log/syslog` 或 `/var/log/messages` 存储所有的全局系统活动数据,包括开机信息。基于 Debian 的系统如 Ubuntu 在 `/var/log/syslog` 目录中存储它们,而基于 RedHat 的系统如 RHEL 或 CentOS 则在 `/var/log/messages` 中存储它们。 +- `/var/log/auth.log` 或 `/var/log/secure` 存储来自可插拔认证模块(PAM)的日志,包括成功的登录,失败的登录尝试和认证方式。Ubuntu 和 Debian 在 `/var/log/auth.log` 中存储认证信息,而 RedHat 和 CentOS 则在 `/var/log/secure` 中存储该信息。 +- `/var/log/kern` 存储内核错误和警告数据,这对于排除与自定义内核相关的故障尤为实用。 +- `/var/log/cron` 存储有关 cron 作业的信息。使用这个数据来确保你的 cron 作业正成功地运行着。 + +Digital Ocean 有一个完整的关于这些文件及 rsyslog 如何在常见的发行版本如 RedHat 和 CentOS 中创建它们的 [教程][1] 。 + +应用程序也会在这个目录中写入日志文件。例如像 Apache,Nginx,MySQL 等常见的服务器程序可以在这个目录中写入日志文件。其中一些日志文件由应用程序自己创建,其他的则通过 syslog (具体见下文)来创建。 + +### 什么是 Syslog? ### + +Linux 系统日志文件是如何创建的呢?答案是通过 syslog 守护程序,它在 syslog +套接字 `/dev/log` 上监听日志信息,然后将它们写入适当的日志文件中。 + +单词“syslog” 是一个重载的条目,并经常被用来简称如下的几个名称之一: + +1. **Syslog 守护进程** — 一个用来接收,处理和发送 syslog 信息的程序。它可以[远程发送 syslog][2] 到一个集中式的服务器或写入一个本地文件。常见的例子包括 rsyslogd 和 syslog-ng。在这种使用方式中,人们常说 "发送到 syslog." +1. **Syslog 协议** — 一个指定日志如何通过网络来传送的传输协议和一个针对 syslog 信息(具体见下文) 的数据格式的定义。它在 [RFC-5424][3] 中被正式定义。对于文本日志,标准的端口是 514,对于加密日志,端口是 6514。在这种使用方式中,人们常说"通过 syslog 传送." +1. **Syslog 信息** — syslog 格式的日志信息或事件,它包括一个带有几个标准域的文件头。在这种使用方式中,人们常说"发送 syslog." + +Syslog 信息或事件包括一个带有几个标准域的 header ,使得分析和路由更方便。它们包括时间戳,应用程序的名称,在系统中信息来源的分类或位置,以及事件的优先级。 + +下面展示的是一个包含 syslog header 的日志信息,它来自于 sshd 守护进程,它控制着到该系统的远程登录,这个信息描述的是一次失败的登录尝试: + + <34>1 2003-10-11T22:14:15.003Z server1.com sshd - - pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.0.2.2 + +### Syslog 格式和域 ### + +每条 syslog 信息包含一个带有域的 header,这些域是结构化的数据,使得分析和路由事件更加容易。下面是我们使用的用来产生上面的 syslog 例子的格式,你可以将每个值匹配到一个特定的域的名称上。 + + <%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% %msg%n + +下面,你将看到一些在查找或排错时最常使用的 syslog 域: + +#### 时间戳 #### + +[时间戳][4] (上面的例子为 2003-10-11T22:14:15.003Z) 暗示了在系统中发送该信息的时间和日期。这个时间在另一系统上接收该信息时可能会有所不同。上面例子中的时间戳可以分解为: + +- **2003-10-11** 年,月,日. +- **T** 为时间戳的必需元素,它将日期和时间分离开. +- **22:14:15.003** 是 24 小时制的时间,包括进入下一秒的毫秒数(**003**). +- **Z** 是一个可选元素,指的是 UTC 时间,除了 Z,这个例子还可以包括一个偏移量,例如 -08:00,这意味着时间从 UTC 偏移 8 小时,即 PST 时间. + +#### 主机名 #### + +[主机名][5] 域(在上面的例子中对应 server1.com) 指的是主机的名称或发送信息的系统. + +#### 应用名 #### + +[应用名][6] 域(在上面的例子中对应 sshd:auth) 指的是发送信息的程序的名称. + +#### 优先级 #### + +优先级域或缩写为 [pri][7] (在上面的例子中对应 <34>) 告诉我们这个事件有多紧急或多严峻。它由两个数字域组成:设备域和紧急性域。紧急性域从代表 debug 类事件的数字 7 一直到代表紧急事件的数字 0 。设备域描述了哪个进程创建了该事件。它从代表内核信息的数字 0 到代表本地应用使用的 23 。 + +Pri 有两种输出方式。第一种是以一个单独的数字表示,可以这样计算:先用设备域的值乘以 8,再加上紧急性域的值:(设备域)(8) + (紧急性域)。第二种是 pri 文本,将以“设备域.紧急性域” 的字符串格式输出。后一种格式更方便阅读和搜索,但占据更多的存储空间。 +-------------------------------------------------------------------------------- + +via: http://www.loggly.com/ultimate-guide/logging/linux-logging-basics/ + +作者:[Jason Skowronski][a1] +作者:[Amy Echeverri][a2] +作者:[Sadequl Hussain][a3] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a1]:https://www.linkedin.com/in/jasonskowronski +[a2]:https://www.linkedin.com/in/amyecheverri +[a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 +[1]:https://www.digitalocean.com/community/tutorials/how-to-view-and-configure-linux-logs-on-ubuntu-and-centos +[2]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.y2e9tdfk1cdb +[3]:https://tools.ietf.org/html/rfc5424 +[4]:https://tools.ietf.org/html/rfc5424#section-6.2.3 +[5]:https://tools.ietf.org/html/rfc5424#section-6.2.4 +[6]:https://tools.ietf.org/html/rfc5424#section-6.2.5 +[7]:https://tools.ietf.org/html/rfc5424#section-6.2.1 \ No newline at end of file From 093951ac6cd1e1d65a99bf76c5224a8d146c52a2 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 9 Aug 2015 23:53:54 +0800 Subject: [PATCH 1667/2517] PUB:20150730 Must-Know Linux Commands For New Users @GOLinux --- ... Must-Know Linux Commands For New Users.md | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) rename {translated/tech => published}/20150730 Must-Know Linux Commands For New Users.md (72%) diff --git a/translated/tech/20150730 Must-Know Linux Commands For New Users.md b/published/20150730 Must-Know Linux Commands For New Users.md similarity index 72% rename from translated/tech/20150730 Must-Know Linux Commands For New Users.md rename to published/20150730 Must-Know Linux Commands For New Users.md index 230cecf736..657d7372bb 100644 --- a/translated/tech/20150730 Must-Know Linux Commands For New Users.md +++ b/published/20150730 Must-Know Linux Commands For New Users.md @@ -1,11 +1,12 @@ 新手应知应会的Linux命令 ================================================================================ ![Manage system updates via the command line with dnf on Fedora.](http://www.linux.com/images/stories/41373/fedora-cli.png) -在Fedora上通过命令行使用dnf来管理系统更新 -基于Linux的系统的优点之一,就是你可以通过终端中使用命令该ing来管理整个系统。使用命令行的优势在于,你可以使用相同的知识和技能来管理随便哪个Linux发行版。 +*在Fedora上通过命令行使用dnf来管理系统更新* -对于各个发行版以及桌面环境(DE)而言,要一致地使用图形化用户界面(GUI)却几乎是不可能的,因为它们都提供了各自的用户界面。要明确的是,有那么些情况,你需要在不同的发行版上使用不同的命令来部署某些特定的任务,但是,或多或少它们的概念和意图却仍然是一致的。 +基于Linux的系统最美妙的一点,就是你可以在终端中使用命令行来管理整个系统。使用命令行的优势在于,你可以使用相同的知识和技能来管理随便哪个Linux发行版。 + +对于各个发行版以及桌面环境(DE)而言,要一致地使用图形化用户界面(GUI)却几乎是不可能的,因为它们都提供了各自的用户界面。要明确的是,有些情况下在不同的发行版上需要使用不同的命令来执行某些特定的任务,但是,基本来说它们的思路和目的是一致的。 在本文中,我们打算讨论Linux用户应当掌握的一些基本命令。我将给大家演示怎样使用命令行来更新系统、管理软件、操作文件以及切换到root,这些操作将在三个主要发行版上进行:Ubuntu(也包括其定制版和衍生版,还有Debian),openSUSE,以及Fedora。 @@ -15,7 +16,7 @@ Linux是基于安全设计的,但事实上是,任何软件都有缺陷,会导致安全漏洞。所以,保持你的系统更新到最新是十分重要的。这么想吧:运行过时的操作系统,就像是你坐在全副武装的坦克里头,而门却没有锁。武器会保护你吗?任何人都可以进入开放的大门,对你造成伤害。同样,在你的系统中也有没有打补丁的漏洞,这些漏洞会危害到你的系统。开源社区,不像专利世界,在漏洞补丁方面反应是相当快的,所以,如果你保持系统最新,你也获得了安全保证。 -留意新闻站点,了解安全漏洞。如果发现了一个漏洞,请阅读之,然后在补丁出来的第一时间更新。不管怎样,在生产机器上,你每星期必须至少运行一次更新命令。如果你运行这一台复杂的服务器,那么就要额外当心了。仔细阅读变更日志,以确保更新不会搞坏你的自定义服务。 +留意新闻站点,了解安全漏洞。如果发现了一个漏洞,了解它,然后在补丁出来的第一时间更新。不管怎样,在生产环境上,你每星期必须至少运行一次更新命令。如果你运行着一台复杂的服务器,那么就要额外当心了。仔细阅读变更日志,以确保更新不会搞坏你的自定义服务。 **Ubuntu**:牢记一点:你在升级系统或安装不管什么软件之前,都必须要刷新仓库(也就是repos)。在Ubuntu上,你可以使用下面的命令来更新系统,第一个命令用于刷新仓库: @@ -29,7 +30,7 @@ Linux是基于安全设计的,但事实上是,任何软件都有缺陷,会 sudo apt-get dist-upgrade -**openSUSE**:如果你是在openSUSE上,你可以使用以下命令来更新系统(照例,第一个命令的意思是更新仓库) +**openSUSE**:如果你是在openSUSE上,你可以使用以下命令来更新系统(照例,第一个命令的意思是更新仓库): sudo zypper refresh sudo zypper up @@ -42,7 +43,7 @@ Linux是基于安全设计的,但事实上是,任何软件都有缺陷,会 ### 软件安装与移除 ### 你只可以安装那些你系统上启用的仓库中可用的包,各个发行版默认都附带有并启用了一些官方或者第三方仓库。 -**Ubuntu**: To install any package on Ubuntu, first update the repo and then use this syntax: + **Ubuntu**:要在Ubuntu上安装包,首先更新仓库,然后使用下面的语句: sudo apt-get install [package_name] @@ -75,9 +76,9 @@ Linux是基于安全设计的,但事实上是,任何软件都有缺陷,会 ### 如何管理第三方软件? ### -在一个庞大的开发者社区中,这些开发者们为用户提供了许多的软件。不同的发行版有不同的机制来使用这些第三方软件,将它们提供给用户。同时也取决于开发者怎样将这些软件提供给用户,有些开发者会提供二进制包,而另外一些开发者则将软件发布到仓库中。 +在一个庞大的开发者社区中,这些开发者们为用户提供了许多的软件。不同的发行版有不同的机制来将这些第三方软件提供给用户。当然,同时也取决于开发者怎样将这些软件提供给用户,有些开发者会提供二进制包,而另外一些开发者则将软件发布到仓库中。 -Ubuntu严重依赖于PPA(个人包归档),但是,不幸的是,它却没有提供一个内建工具来帮助用于搜索这些PPA仓库。在安装软件前,你将需要通过Google搜索PPA,然后手工添加该仓库。下面就是添加PPA到系统的方法: +Ubuntu很多地方都用到PPA(个人包归档),但是,不幸的是,它却没有提供一个内建工具来帮助用于搜索这些PPA仓库。在安装软件前,你将需要通过Google搜索PPA,然后手工添加该仓库。下面就是添加PPA到系统的方法: sudo add-apt-repository ppa: @@ -85,7 +86,7 @@ Ubuntu严重依赖于PPA(个人包归档),但是,不幸的是,它却 sudo add-apt-repository ppa:libreoffice/ppa -它会要你按下回车键来导入秘钥。完成后,使用'update'命令来刷新仓库,然后安装该包。 +它会要你按下回车键来导入密钥。完成后,使用'update'命令来刷新仓库,然后安装该包。 openSUSE拥有一个针对第三方应用的优雅的解决方案。你可以访问software.opensuse.org,一键点击搜索并安装相应包,它会自动将对应的仓库添加到你的系统中。如果你想要手工添加仓库,可以使用该命令: @@ -97,13 +98,13 @@ openSUSE拥有一个针对第三方应用的优雅的解决方案。你可以访 sudo zypper refresh sudo zypper install libreoffice -Fedora用户只需要添加RPMFusion(free和non-free仓库一起),该仓库包含了大量的应用。如果你需要添加仓库,命令如下: +Fedora用户只需要添加RPMFusion(包括自由软件和非自由软件仓库),该仓库包含了大量的应用。如果你需要添加该仓库,命令如下: -dnf config-manager --add-repo http://www.example.com/example.repo + dnf config-manager --add-repo http://www.example.com/example.repo ### 一些基本命令 ### -我已经写了一些关于使用CLI来管理你系统上的文件的[文章][1],下面介绍一些基本米ing令,这些命令在所有发行版上都经常会用到。 +我已经写了一些关于使用CLI来管理你系统上的文件的[文章][1],下面介绍一些基本命令,这些命令在所有发行版上都经常会用到。 拷贝文件或目录到一个新的位置: @@ -113,13 +114,13 @@ dnf config-manager --add-repo http://www.example.com/example.repo cp path_of_files/* path_of_the_directory_where_you_want_to_copy/ -将一个文件从某个位置移动到另一个位置(尾斜杠是说在该目录中): +将一个文件从某个位置移动到另一个位置(尾斜杠是说放在该目录中): - mv path_of_file_1 path_of_the_directory_where_you_want_to_move/ + mv path_of_file_1 path_of_the_directory_where_you_want_to_move/ 将所有文件从一个位置移动到另一个位置: - mv path_of_directory_where_files_are/* path_of_the_directory_where_you_want_to_move/ + mv path_of_directory_where_files_are/* path_of_the_directory_where_you_want_to_move/ 删除一个文件: @@ -135,11 +136,11 @@ dnf config-manager --add-repo http://www.example.com/example.repo ### 创建新目录 ### -要创建一个新目录,首先输入你要创建的目录的位置。比如说,你想要在你的Documents目录中创建一个名为'foundation'的文件夹。让我们使用 cd (即change directory,改变目录)命令来改变目录: +要创建一个新目录,首先进入到你要创建该目录的位置。比如说,你想要在你的Documents目录中创建一个名为'foundation'的文件夹。让我们使用 cd (即change directory,改变目录)命令来改变目录: cd /home/swapnil/Documents -(替换'swapnil'为你系统中的用户) +(替换'swapnil'为你系统中的用户名) 然后,使用 mkdir 命令来创建该目录: @@ -149,13 +150,13 @@ dnf config-manager --add-repo http://www.example.com/example.repo mdkir /home/swapnil/Documents/foundation -如果你想要创建父-子目录,那是指目录中的目录,那么可以使用 -p 选项。它会在指定路径中创建所有目录: +如果你想要连父目录一起创建,那么可以使用 -p 选项。它会在指定路径中创建所有目录: mdkir -p /home/swapnil/Documents/linux/foundation ### 成为root ### -你或许需要成为root,或者具有sudo权力的用户,来实施一些管理任务,如管理软件包或者对根目录或其下的文件进行一些修改。其中一个例子就是编辑'fstab'文件,该文件记录了挂载的硬件驱动器。它在'etc'目录中,而该目录又在根目录中,你只能作为超级用户来修改该文件。在大多数的发行版中,你可以通过'切换用户'来成为root。比如说,在openSUSE上,我想要成为root,因为我要在根目录中工作,你可以使用下面的命令之一: +你或许需要成为root,或者具有sudo权力的用户,来实施一些管理任务,如管理软件包或者对根目录或其下的文件进行一些修改。其中一个例子就是编辑'fstab'文件,该文件记录了挂载的硬盘驱动器。它在'etc'目录中,而该目录又在根目录中,你只能作为超级用户来修改该文件。在大多数的发行版中,你可以通过'su'来成为root。比如说,在openSUSE上,我想要成为root,因为我要在根目录中工作,你可以使用下面的命令之一: sudo su - @@ -165,7 +166,7 @@ dnf config-manager --add-repo http://www.example.com/example.repo 该命令会要求输入密码,然后你就具有root特权了。记住一点:千万不要以root用户来运行系统,除非你知道你正在做什么。另外重要的一点需要注意的是,你以root什么对目录或文件进行修改后,会将它们的拥有关系从该用户或特定的服务改变为root。你必须恢复这些文件的拥有关系,否则该服务或用户就不能访问或写入到那些文件。要改变用户,命令如下: - sudo chown -R user:user /path_of_file_or_directory + sudo chown -R 用户:组 文件或目录名 当你将其它发行版上的分区挂载到系统中时,你可能经常需要该操作。当你试着访问这些分区上的文件时,你可能会碰到权限拒绝错误,你只需要改变这些分区的拥有关系就可以访问它们了。需要额外当心的是,不要改变根目录的权限或者拥有关系。 @@ -177,7 +178,7 @@ via: http://www.linux.com/learn/tutorials/842251-must-know-linux-commands-for-ne 作者:[Swapnil Bhartiya][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From de0f6fe24b3e4197727221dfedc0fa8fc4e1a42f Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 10 Aug 2015 00:50:06 +0800 Subject: [PATCH 1668/2517] PUB:20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem @FSSlc --- ...nd to Quickly Navigate Linux Filesystem.md | 98 ++++++++++--------- 1 file changed, 50 insertions(+), 48 deletions(-) rename {translated/tech => published}/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md (62%) diff --git a/translated/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md b/published/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md similarity index 62% rename from translated/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md rename to published/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md index 546a4b0baf..f749039d5d 100644 --- a/translated/tech/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md +++ b/published/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md @@ -1,53 +1,54 @@ -Autojump – 一个高级的‘cd’命令用以快速浏览 Linux 文件系统 +Autojump:一个可以在 Linux 文件系统快速导航的高级 cd 命令 ================================================================================ -对于那些主要通过控制台或终端使用 Linux 命令行来工作的 Linux 用户来说,他们真切地感受到了 Linux 的强大。 然而在 Linux 的分层文件系统中进行浏览有时或许是一件头疼的事,尤其是对于那些新手来说。 + +对于那些主要通过控制台或终端使用 Linux 命令行来工作的 Linux 用户来说,他们真切地感受到了 Linux 的强大。 然而在 Linux 的分层文件系统中进行导航有时或许是一件头疼的事,尤其是对于那些新手来说。 现在,有一个用 Python 写的名为 `autojump` 的 Linux 命令行实用程序,它是 Linux ‘[cd][1]’命令的高级版本。 ![Autojump 命令](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-Command.jpg) -Autojump – 浏览 Linux 文件系统的最快方式 +*Autojump – Linux 文件系统导航的最快方式* 这个应用原本由 Joël Schaerer 编写,现在由 +William Ting 维护。 -Autojump 应用从用户那里学习并帮助用户在 Linux 命令行中进行更轻松的目录浏览。与传统的 `cd` 命令相比,autojump 能够更加快速地浏览至目的目录。 +Autojump 应用可以从用户那里学习并帮助用户在 Linux 命令行中进行更轻松的目录导航。与传统的 `cd` 命令相比,autojump 能够更加快速地导航至目的目录。 #### autojump 的特色 #### -- 免费且开源的应用,在 GPL V3 协议下发布。 -- 自主学习的应用,从用户的浏览习惯中学习。 -- 更快速地浏览。不必包含子目录的名称。 -- 对于大多数的标准 Linux 发行版本,能够在软件仓库中下载得到,它们包括 Debian (testing/unstable), Ubuntu, Mint, Arch, Gentoo, Slackware, CentOS, RedHat and Fedora。 +- 自由开源的应用,在 GPL V3 协议下发布。 +- 自主学习的应用,从用户的导航习惯中学习。 +- 更快速地导航。不必包含子目录的名称。 +- 对于大多数的标准 Linux 发行版本,能够在软件仓库中下载得到,它们包括 Debian (testing/unstable), Ubuntu, Mint, Arch, Gentoo, Slackware, CentOS, RedHat 和 Fedora。 - 也能在其他平台中使用,例如 OS X(使用 Homebrew) 和 Windows (通过 Clink 来实现) -- 使用 autojump 你可以跳至任何特定的目录或一个子目录。你还可以打开文件管理器来到达某个目录,并查看你在某个目录中所待时间的统计数据。 +- 使用 autojump 你可以跳至任何特定的目录或一个子目录。你还可以用文件管理器打开某个目录,并查看你在某个目录中所待时间的统计数据。 #### 前提 #### - 版本号不低于 2.6 的 Python -### 第 1 步: 做一次全局系统升级 ### +### 第 1 步: 做一次完整的系统升级 ### -1. 以 **root** 用户的身份,做一次系统更新或升级,以此保证你安装有最新版本的 Python。 +1、 以 **root** 用户的身份,做一次系统更新或升级,以此保证你安装有最新版本的 Python。 - # apt-get update && apt-get upgrade && apt-get dist-upgrade [APT based systems] - # yum update && yum upgrade [YUM based systems] - # dnf update && dnf upgrade [DNF based systems] + # apt-get update && apt-get upgrade && apt-get dist-upgrade [基于 APT 的系统] + # yum update && yum upgrade [基于 YUM 的系统] + # dnf update && dnf upgrade [基于 DNF 的系统] **注** : 这里特别提醒,在基于 YUM 或 DNF 的系统中,更新和升级执行相同的行动,大多数时间里它们是通用的,这点与基于 APT 的系统不同。 ### 第 2 步: 下载和安装 Autojump ### -2. 正如前面所言,在大多数的 Linux 发行版本的软件仓库中, autojump 都可获取到。通过包管理器你就可以安装它。但若你想从源代码开始来安装它,你需要克隆源代码并执行 python 脚本,如下面所示: +2、 正如前面所言,在大多数的 Linux 发行版本的软件仓库中, autojump 都可获取到。通过包管理器你就可以安装它。但若你想从源代码开始来安装它,你需要克隆源代码并执行 python 脚本,如下面所示: #### 从源代码安装 #### 若没有安装 git,请安装它。我们需要使用它来克隆 git 仓库。 - # apt-get install git [APT based systems] - # yum install git [YUM based systems] - # dnf install git [DNF based systems] + # apt-get install git [基于 APT 的系统] + # yum install git [基于 YUM 的系统] + # dnf install git [基于 DNF 的系统] -一旦安装完 git,以常规用户身份登录,然后像下面那样来克隆 autojump: +一旦安装完 git,以普通用户身份登录,然后像下面那样来克隆 autojump: $ git clone git://github.com/joelthelion/autojump.git @@ -55,29 +56,29 @@ Autojump 应用从用户那里学习并帮助用户在 Linux 命令行中进行 $ cd autojump -下载,赋予脚本文件可执行权限,并以 root 用户身份来运行安装脚本。 +下载,赋予安装脚本文件可执行权限,并以 root 用户身份来运行安装脚本。 # chmod 755 install.py # ./install.py #### 从软件仓库中安装 #### -3. 假如你不想麻烦,你可以以 **root** 用户身份从软件仓库中直接安装它: +3、 假如你不想麻烦,你可以以 **root** 用户身份从软件仓库中直接安装它: 在 Debian, Ubuntu, Mint 及类似系统中安装 autojump : - # apt-get install autojump (注: 这里原文为 autojumo, 应该为 autojump) + # apt-get install autojump 为了在 Fedora, CentOS, RedHat 及类似系统中安装 autojump, 你需要启用 [EPEL 软件仓库][2]。 # yum install epel-release # yum install autojump - OR + 或 # dnf install autojump ### 第 3 步: 安装后的配置 ### -4. 在 Debian 及其衍生系统 (Ubuntu, Mint,…) 中, 激活 autojump 应用是非常重要的。 +4、 在 Debian 及其衍生系统 (Ubuntu, Mint,…) 中, 激活 autojump 应用是非常重要的。 为了暂时激活 autojump 应用,即直到你关闭当前会话或打开一个新的会话之前让 autojump 均有效,你需要以常规用户身份运行下面的命令: @@ -89,7 +90,7 @@ Autojump 应用从用户那里学习并帮助用户在 Linux 命令行中进行 ### 第 4 步: Autojump 的预测试和使用 ### -5. 如先前所言, autojump 将只跳到先前 `cd` 命令到过的目录。所以在我们开始测试之前,我们要使用 `cd` 切换到一些目录中去,并创建一些目录。下面是我所执行的命令。 +5、 如先前所言, autojump 将只跳到先前 `cd` 命令到过的目录。所以在我们开始测试之前,我们要使用 `cd` 切换到一些目录中去,并创建一些目录。下面是我所执行的命令。 $ cd $ cd @@ -120,45 +121,45 @@ Autojump 应用从用户那里学习并帮助用户在 Linux 命令行中进行 现在,我们已经切换到过上面所列的目录,并为了测试创建了一些目录,一切准备就绪,让我们开始吧。 -**需要记住的一点** : `j` 是 autojump 的一个包装,你可以使用 j 来代替 autojump, 相反亦可。 +**需要记住的一点** : `j` 是 autojump 的一个封装,你可以使用 j 来代替 autojump, 相反亦可。 -6. 使用 -v 选项查看安装的 autojump 的版本。 +6、 使用 -v 选项查看安装的 autojump 的版本。 $ j -v - or + 或 $ autojump -v ![查看 Autojump 的版本](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Autojump-Version.png) -查看 Autojump 的版本 +*查看 Autojump 的版本* -7. 跳到先前到过的目录 ‘/var/www‘。 +7、 跳到先前到过的目录 ‘/var/www‘。 $ j www ![跳到目录](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-To-Directory.png) -跳到目录 +*跳到目录* -8. 跳到先前到过的子目录‘/home/avi/autojump-test/b‘ 而不键入子目录的全名。 +8、 跳到先前到过的子目录‘/home/avi/autojump-test/b‘ 而不键入子目录的全名。 $ jc b ![跳到子目录](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-to-Child-Directory.png) -跳到子目录 +*跳到子目录* -9. 使用下面的命令,你就可以从命令行打开一个文件管理器,例如 GNOME Nautilus ,而不是跳到一个目录。 +9、 使用下面的命令,你就可以从命令行打开一个文件管理器,例如 GNOME Nautilus ,而不是跳到一个目录。 $ jo www -![跳到目录](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-to-Direcotory.png) +![打开目录](http://www.tecmint.com/wp-content/uploads/2015/06/Jump-to-Direcotory.png) -跳到目录 +*打开目录* ![在文件管理器中打开目录](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Directory-in-File-Browser.png) -在文件管理器中打开目录 +*在文件管理器中打开目录* 你也可以在一个文件管理器中打开一个子目录。 @@ -166,19 +167,19 @@ Autojump 应用从用户那里学习并帮助用户在 Linux 命令行中进行 ![打开子目录](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Child-Directory1.png) -打开子目录 +*打开子目录* ![在文件管理器中打开子目录](http://www.tecmint.com/wp-content/uploads/2015/06/Open-Child-Directory-in-File-Browser1.png) -在文件管理器中打开子目录 +*在文件管理器中打开子目录* -10. 查看每个文件夹的关键权重和在所有目录权重中的总关键权重的相关统计数据。文件夹的关键权重代表在这个文件夹中所花的总时间。 目录权重是列表中目录的数目。(注: 在这一句中,我觉得原文中的 if 应该为 is) +10、 查看每个文件夹的权重和全部文件夹计算得出的总权重的统计数据。文件夹的权重代表在这个文件夹中所花的总时间。 文件夹权重是该列表中目录的数字。(LCTT 译注: 在这一句中,我觉得原文中的 if 应该为 is) $ j --stat -![查看目录统计数据](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Statistics.png) +![查看文件夹统计数据](http://www.tecmint.com/wp-content/uploads/2015/06/Check-Statistics.png) -查看目录统计数据 +*查看文件夹统计数据* **提醒** : autojump 存储其运行日志和错误日志的地方是文件夹 `~/.local/share/autojump/`。千万不要重写这些文件,否则你将失去你所有的统计状态结果。 @@ -186,15 +187,15 @@ Autojump 应用从用户那里学习并帮助用户在 Linux 命令行中进行 ![Autojump 的日志](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-Logs.png) -Autojump 的日志 +*Autojump 的日志* -11. 假如需要,你只需运行下面的命令就可以查看帮助 : +11、 假如需要,你只需运行下面的命令就可以查看帮助 : $ j --help ![Autojump 的帮助和选项](http://www.tecmint.com/wp-content/uploads/2015/06/Autojump-help-options.png) -Autojump 的帮助和选项 +*Autojump 的帮助和选项* ### 功能需求和已知的冲突 ### @@ -204,18 +205,19 @@ Autojump 的帮助和选项 ### 结论: ### -假如你是一个命令行用户, autojump 是你必备的实用程序。它可以简化许多事情。它是一个在命令行中浏览 Linux 目录的绝佳的程序。请自行尝试它,并在下面的评论框中让我知晓你宝贵的反馈。保持联系,保持分享。喜爱并分享,帮助我们更好地传播。 +假如你是一个命令行用户, autojump 是你必备的实用程序。它可以简化许多事情。它是一个在命令行中导航 Linux 目录的绝佳的程序。请自行尝试它,并在下面的评论框中让我知晓你宝贵的反馈。保持联系,保持分享。喜爱并分享,帮助我们更好地传播。 + -------------------------------------------------------------------------------- via: http://www.tecmint.com/autojump-a-quickest-way-to-navigate-linux-filesystem/ 作者:[Avishek Kumar][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者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/avishek/ [1]:http://www.tecmint.com/cd-command-in-linux/ -[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[2]:https://linux.cn/article-2324-1.html [3]:http://www.tecmint.com/manage-linux-filenames-with-special-characters/ \ No newline at end of file From 99ef2dab243d3e400189462378026b7cad784472 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Mon, 10 Aug 2015 09:23:08 +0800 Subject: [PATCH 1669/2517] Update 20150209 Install OpenQRM Cloud Computing Platform In Debian.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...0209 Install OpenQRM Cloud Computing Platform In Debian.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md b/sources/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md index 127f10affc..2c6a990b83 100644 --- a/sources/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md +++ b/sources/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md @@ -1,3 +1,5 @@ +FSSlc translating + Install OpenQRM Cloud Computing Platform In Debian ================================================================================ ### Introduction ### @@ -146,4 +148,4 @@ via: http://www.unixmen.com/install-openqrm-cloud-computing-platform-debian/ [a]:http://www.unixmen.com/author/sk/ [1]:http://www.openqrm-enterprise.com/products/edition-comparison.html [2]:http://sourceforge.net/projects/openqrm/files/?source=navbar -[3]:http://www.openqrm-enterprise.com/fileadmin/Documents/Whitepaper/openQRM-Enterprise-Administrator-Guide-5.2.pdf \ No newline at end of file +[3]:http://www.openqrm-enterprise.com/fileadmin/Documents/Whitepaper/openQRM-Enterprise-Administrator-Guide-5.2.pdf From abc7c38b3accd6953e9a40d2b43d3b362a22307b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 10 Aug 2015 10:56:03 +0800 Subject: [PATCH 1670/2517] PUB:20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04 @geekpi --- ...ver or client) on Ubuntu 14.04 or 15.04.md | 120 +++++++----------- 1 file changed, 48 insertions(+), 72 deletions(-) rename {translated/tech => published}/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md (68%) diff --git a/translated/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md b/published/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md similarity index 68% rename from translated/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md rename to published/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md index 38574e6fa7..2fdaa71872 100644 --- a/translated/tech/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md +++ b/published/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md @@ -1,6 +1,6 @@ -如何在Ubuntu 14.04/15.04上配置Chef(服务端/客户端) +如何在 Ubuntu 上安装配置管理系统 Chef (大厨) ================================================================================ -Chef是对于信息技术专业人员的一款配置管理和自动化工具,它可以配置和管理你的设备无论它在本地还是在云上。它可以用于加速应用部署并协调多个系统管理员和开发人员的工作,涉及到成百甚至上千的服务器和程序来支持大量的客户群。chef最有用的是让设备变成代码。一旦你掌握了Chef,你可以获得一流的网络IT支持来自动化管理你的云端设备或者终端用户。 +Chef是面对IT专业人员的一款配置管理和自动化工具,它可以配置和管理你的基础设施,无论它在本地还是在云上。它可以用于加速应用部署并协调多个系统管理员和开发人员的工作,这涉及到可支持大量的客户群的成百上千的服务器和程序。chef最有用的是让基础设施变成代码。一旦你掌握了Chef,你可以获得一流的网络IT支持来自动化管理你的云端基础设施或者终端用户。 下面是我们将要在本篇中要设置和配置Chef的主要组件。 @@ -10,34 +10,13 @@ Chef是对于信息技术专业人员的一款配置管理和自动化工具, 我们将在下面的基础环境下设置Chef配置管理系统。 -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - -
管理和配置工具:Chef
基础操作系统Ubuntu 14.04.1 LTS (x86_64)
Chef ServerVersion 12.1.0
Chef ManageVersion 1.17.0
Chef Development KitVersion 0.6.2
内存和CPU4 GB  , 2.0+2.0 GHZ
+|管理和配置工具:Chef|| +|-------------------------------|---| +|基础操作系统|Ubuntu 14.04.1 LTS (x86_64)| +|Chef Server|Version 12.1.0| +|Chef Manage|Version 1.17.0| +|Chef Development Kit|Version 0.6.2| +|内存和CPU|4 GB  , 2.0+2.0 GHz| ### Chef服务端的安装和配置 ### @@ -45,15 +24,15 @@ Chef服务端是核心组件,它存储配置以及其他和工作站交互的 我使用下面的命令来下载和安装它。 -**1) 下载Chef服务端** +####1) 下载Chef服务端 root@ubuntu-14-chef:/tmp# wget https://web-dl.packagecloud.io/chef/stable/packages/ubuntu/trusty/chef-server-core_12.1.0-1_amd64.deb -**2) 安装Chef服务端** +####2) 安装Chef服务端 root@ubuntu-14-chef:/tmp# dpkg -i chef-server-core_12.1.0-1_amd64.deb -**3) 重新配置Chef服务端** +####3) 重新配置Chef服务端 现在运行下面的命令来启动所有的chef服务端服务,这步也许会花费一些时间,因为它有许多不同一起工作的服务组成来创建一个正常运作的系统。 @@ -64,35 +43,35 @@ chef服务端启动命令'chef-server-ctl reconfigure'需要运行两次,这 Chef Client finished, 342/350 resources updated in 113.71139964 seconds opscode Reconfigured! -**4) 重启系统 ** +####4) 重启系统 安装完成后重启系统使系统能最好的工作,不然我们或许会在创建用户的时候看到下面的SSL连接错误。 ERROR: Errno::ECONNRESET: Connection reset by peer - SSL_connect -**5) 创建心的管理员** +####5) 创建新的管理员 -运行下面的命令来创建一个新的用它自己的配置的管理员账户。创建过程中,用户的RSA私钥会自动生成并需要被保存到一个安全的地方。--file选项会保存RSA私钥到指定的路径下。 +运行下面的命令来创建一个新的管理员账户及其配置。创建过程中,用户的RSA私钥会自动生成,它需要保存到一个安全的地方。--file选项会保存RSA私钥到指定的路径下。 root@ubuntu-14-chef:/tmp# chef-server-ctl user-create kashi kashi kashi kashif.fareedi@gmail.com kashi123 --filename /root/kashi.pem ### Chef服务端的管理设置 ### -Chef Manage是一个针对企业Chef用户的管理控制台,它启用了可视化的web用户界面并可以管理节点、数据包、规则、环境、配置和基于角色的访问控制(RBAC) +Chef Manage是一个针对企业Chef用户的管理控制台,它提供了可视化的web用户界面,可以管理节点、数据包、规则、环境、Cookbook 和基于角色的访问控制(RBAC) -**1) 下载Chef Manage** +####1) 下载Chef Manage -从官网复制链接病下载chef manage的安装包。 +从官网复制链接并下载chef manage的安装包。 root@ubuntu-14-chef:~# wget https://web-dl.packagecloud.io/chef/stable/packages/ubuntu/trusty/opscode-manage_1.17.0-1_amd64.deb -**2) 安装Chef Manage** +####2) 安装Chef Manage 使用下面的命令在root的家目录下安装它。 root@ubuntu-14-chef:~# chef-server-ctl install opscode-manage --path /root -**3) 重启Chef Manage和服务端** +####3) 重启Chef Manage和服务端 安装完成后我们需要运行下面的命令来重启chef manage和服务端。 @@ -101,28 +80,27 @@ Chef Manage是一个针对企业Chef用户的管理控制台,它启用了可 ### Chef Manage网页控制台 ### -我们可以使用localhost访问网页控制台以及fqdn,并用已经创建的管理员登录 +我们可以使用localhost或它的全称域名来访问网页控制台,并用已经创建的管理员登录 ![chef amanage](http://blog.linoxide.com/wp-content/uploads/2015/07/5-chef-web.png) -**1) Chef Manage创建新的组织 ** +####1) Chef Manage创建新的组织 -你或许被要求创建新的组织或者接受其他阻止的邀请。如下所示,使用缩写和全名来创建一个新的组织。 +你或许被要求创建新的组织,或者也可以接受其他组织的邀请。如下所示,使用缩写和全名来创建一个新的组织。 ![Create Org](http://blog.linoxide.com/wp-content/uploads/2015/07/7-create-org.png) -**2) 用命令行创建心的组织 ** +####2) 用命令行创建新的组织 -We can also create new Organization from the command line by executing the following command. 我们同样也可以运行下面的命令来创建新的组织。 root@ubuntu-14-chef:~# chef-server-ctl org-create linux Linoxide Linux Org. --association_user kashi --filename linux.pem ### 设置工作站 ### -我们已经完成安装chef服务端,现在我们可以开始创建任何recipes、cookbooks、属性和其他任何的我们想要对Chef的修改。 +我们已经完成安装chef服务端,现在我们可以开始创建任何recipes([基础配置元素](https://docs.chef.io/recipes.html))、cookbooks([基础配置集](https://docs.chef.io/cookbooks.html))、attributes([节点属性](https://docs.chef.io/attributes.html))和其他任何的我们想要对Chef做的修改。 -**1) 在Chef服务端上创建新的用户和组织 ** +####1) 在Chef服务端上创建新的用户和组织 为了设置工作站,我们用命令行创建一个新的用户和组织。 @@ -130,25 +108,23 @@ We can also create new Organization from the command line by executing the follo root@ubuntu-14-chef:~# chef-server-ctl org-create blogs Linoxide Blogs Inc. --association_user bloger --filename blogs.pem -**2) 下载工作站入门套件 ** +####2) 下载工作站入门套件 -Now Download and Save starter-kit from the chef manage web console on a workstation and use it to work with Chef server. -在工作站的网页控制台中下面并保存入门套件用于与服务端协同工作 +在工作站的网页控制台中下载保存入门套件,它用于与服务端协同工作 ![Starter Kit](http://blog.linoxide.com/wp-content/uploads/2015/07/8-download-kit.png) -**3) 点击"Proceed"下载套件 ** +####3) 下载套件后,点击"Proceed" ![starter kit](http://blog.linoxide.com/wp-content/uploads/2015/07/9-download-kit.png) -### 对于工作站的Chef开发套件设置 ### +### 用于工作站的Chef开发套件设置 ### -Chef开发套件是一款包含所有开发chef所需工具的软件包。它捆绑了由Chef开发的带Chef客户端的工具。 +Chef开发套件是一款包含开发chef所需的所有工具的软件包。它捆绑了由Chef开发的带Chef客户端的工具。 -**1) 下载 Chef DK** +####1) 下载 Chef DK -We can Download chef development kit from its official web link and choose the required operating system to get its chef development tool kit. -我们可以从它的官网链接中下载开发包,并选择操作系统来得到chef开发包。 +我们可以从它的官网链接中下载开发包,并选择操作系统来下载chef开发包。 ![Chef DK](http://blog.linoxide.com/wp-content/uploads/2015/07/10-CDK.png) @@ -156,13 +132,13 @@ We can Download chef development kit from its official web link and choose the r root@ubuntu-15-WKS:~# wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.6.2-1_amd64.deb -**1) Chef开发套件安装** +####2) Chef开发套件安装 使用dpkg命令安装开发套件 root@ubuntu-15-WKS:~# dpkg -i chefdk_0.6.2-1_amd64.deb -**3) Chef DK 验证** +####3) Chef DK 验证 使用下面的命令验证客户端是否已经正确安装。 @@ -195,7 +171,7 @@ We can Download chef development kit from its official web link and choose the r Verification of component 'chefspec' succeeded. Verification of component 'package installation' succeeded. -**连接Chef服务端** +####4) 连接Chef服务端 我们将创建 ~/.chef并从chef服务端复制两个用户和组织的pem文件到chef的文件到这个目录下。 @@ -209,7 +185,7 @@ We can Download chef development kit from its official web link and choose the r kashi.pem 100% 1678 1.6KB/s 00:00 linux.pem 100% 1678 1.6KB/s 00:00 -** 编辑配置来管理chef环境 ** +####5) 编辑配置来管理chef环境 现在使用下面的内容创建"~/.chef/knife.rb"。 @@ -231,13 +207,13 @@ We can Download chef development kit from its official web link and choose the r root@ubuntu-15-WKS:/# mkdir cookbooks -**测试Knife配置** +####6) 测试Knife配置 运行“knife user list”和“knife client list”来验证knife是否在工作。 root@ubuntu-15-WKS:/.chef# knife user list -第一次运行的时候可能会得到下面的错误,这是因为工作站上还没有chef服务端的SSL证书。 +第一次运行的时候可能会看到下面的错误,这是因为工作站上还没有chef服务端的SSL证书。 ERROR: SSL Validation failure connecting to host: 172.25.10.173 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ERROR: Could not establish a secure connection to the server. @@ -245,24 +221,24 @@ We can Download chef development kit from its official web link and choose the r If your Chef Server uses a self-signed certificate, you can use `knife ssl fetch` to make knife trust the server's certificates. -要从上面的命令中恢复,运行下面的命令来获取ssl整数并重新运行knife user和client list,这时候应该就可以了。 +要从上面的命令中恢复,运行下面的命令来获取ssl证书,并重新运行knife user和client list,这时候应该就可以了。 root@ubuntu-15-WKS:/.chef# knife ssl fetch WARNING: Certificates from 172.25.10.173 will be fetched and placed in your trusted_cert directory (/.chef/trusted_certs). - knife没有办法验证这些是有效的证书。你应该在下载时候验证这些证书的真实性。 +knife没有办法验证这些是有效的证书。你应该在下载时候验证这些证书的真实性。 - 在/.chef/trusted_certs/ubuntu-14-chef_test_com.crt下面添加ubuntu-14-chef.test.com的证书。 +在/.chef/trusted_certs/ubuntu-14-chef_test_com.crt下面添加ubuntu-14-chef.test.com的证书。 在上面的命令取得ssl证书后,接着运行下面的命令。 root@ubuntu-15-WKS:/.chef#knife client list kashi-linux -### 与chef服务端交互的新的节点 ### +### 配置与chef服务端交互的新节点 ### -节点是执行所有设备自动化的chef客户端。因此是时侯添加新的服务端到我们的chef环境下,在配置完chef-server和knife工作站后配置新的节点与chef-server交互。 +节点是执行所有基础设施自动化的chef客户端。因此,在配置完chef-server和knife工作站后,通过配置新的与chef-server交互的节点,来添加新的服务端到我们的chef环境下。 我们使用下面的命令来添加新的节点与chef服务端工作。 @@ -291,16 +267,16 @@ We can Download chef development kit from its official web link and choose the r 172.25.10.170 to file /tmp/install.sh.26024/metadata.txt 172.25.10.170 trying wget... -之后我们可以在knife节点列表下看到新创建的节点,也会新节点列表下创建新的客户端。 +之后我们可以在knife节点列表下看到新创建的节点,它也会在新节点创建新的客户端。 root@ubuntu-15-WKS:~# knife node list mydns -相似地我们只要提供ssh证书通过上面的knife命令来创建多个节点到chef设备上。 +相似地我们只要提供ssh证书通过上面的knife命令,就可以在chef设施上创建多个节点。 ### 总结 ### -本篇我们学习了chef管理工具并通过安装和配置设置浏览了它的组件。我希望你在学习安装和配置Chef服务端以及它的工作站和客户端节点中获得乐趣。 +本篇我们学习了chef管理工具并通过安装和配置设置基本了解了它的组件。我希望你在学习安装和配置Chef服务端以及它的工作站和客户端节点中获得乐趣。 -------------------------------------------------------------------------------- @@ -308,7 +284,7 @@ via: http://linoxide.com/ubuntu-how-to/install-configure-chef-ubuntu-14-04-15-04 作者:[Kashif Siddique][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From eb0ff99810690c7d3078c6a85ddc7731ef544e3e Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 10 Aug 2015 10:57:27 +0800 Subject: [PATCH 1671/2517] =?UTF-8?q?=E6=B8=85=E9=99=A4=E9=94=99=E6=94=BE?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @xiqingongzi --- ...ntial Commands and System Documentation.md | 320 ------------------ 1 file changed, 320 deletions(-) delete mode 100644 translated/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md diff --git a/translated/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/translated/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md deleted file mode 100644 index 93c2787c7e..0000000000 --- a/translated/tech/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md +++ /dev/null @@ -1,320 +0,0 @@ -[translating by xiqingongzi] - -RHCSA系列: 复习基础命令及系统文档 – 第一部分 -================================================================================ -RHCSA (红帽认证系统工程师) 是由给商业公司提供开源操作系统和软件的RedHat公司举行的认证考试, 除此之外,红帽公司还为这些企业和机构提供支持、训练以及咨询服务 - -![RHCSA Exam Guide](http://www.tecmint.com/wp-content/uploads/2015/02/RHCSA-Series-by-Tecmint.png) - -RHCSA 考试准备指南 - -RHCSA 考试(考试编号 EX200)通过后可以获取由Red Hat 公司颁发的证书. RHCSA 考试是RHCT(红帽认证技师)的升级版,而且RHCSA必须在新的Red Hat Enterprise Linux(红帽企业版)下完成.RHCT和RHCSA的主要变化就是RHCT基于 RHEL5 , 而RHCSA基于RHEL6或者7, 这两个认证的等级也有所不同. - -红帽认证管理员所会的最基础的是在红帽企业版的环境下执行如下系统管理任务: - -- 理解并会使用命令管理文件、目录、命令行以及系统/软件包的文档 -- 使用不同的启动等级启动系统,认证和控制进程,启动或停止虚拟机 -- 使用分区和逻辑卷管理本地存储 -- 创建并且配置本地文件系统和网络文件系统,设置他们的属性(许可、加密、访问控制表) -- 部署、配置、并且控制系统,包括安装、升级和卸载软件 -- 管理系统用户和组,独立使用集中制的LDAP目录权限控制 -- 确保系统安全,包括基础的防火墙规则和SELinux配置 - - -关于你所在国家的考试注册费用参考 [RHCSA Certification page][1]. - -关于你所在国家的考试注册费用参考RHCSA 认证页面 - - -在这个有15章的RHCSA(红帽认证管理员)备考系列,我们将覆盖以下的关于红帽企业Linux第七版的最新的信息 - -- Part 1: 回顾必会的命令和系统文档 -- Part 2: 在RHEL7如何展示文件和管理目录 -- Part 3: 在RHEL7中如何管理用户和组 -- Part 4: 使用nano和vim管理命令/ 使用grep和正则表达式分析文本 -- Part 5: RHEL7的进程管理:启动,关机,以及其他介于二者之间的. -- Part 6: 使用 'Parted'和'SSM'来管理和加密系统存储 -- Part 7: 使用ACLs(访问控制表)并挂载 Samba /NFS 文件分享 -- Part 8: 加固SSH,设置主机名并开启网络服务 -- Part 9: 安装、配置和加固一个Web,FTP服务器 -- Part 10: Yum 包管理方式,使用Cron进行自动任务管理以及监控系统日志 -- Part 11: 使用FirewallD和Iptables设置防火墙,控制网络流量 -- Part 12: 使用Kickstart 自动安装RHEL 7 -- Part 13: RHEL7:什么是SeLinux?他的原理是什么? -- Part 14: 在RHEL7 中使用基于LDAP的权限控制 -- Part 15: RHEL7的虚拟化:KVM 和虚拟机管理 - -在第一章,我们讲解如何输入和运行正确的命令在终端或者Shell窗口,并且讲解如何找到、插入,以及使用系统文档 - -![RHCSA: Reviewing Essential Linux Commands – Part 1](http://www.tecmint.com/wp-content/uploads/2015/02/Reviewing-Essential-Linux-Commands.png) - -RHCSA:回顾必会的Linux命令 - 第一部分 - -#### 前提: #### - -至少你要熟悉如下命令 - -- [cd command][2] (改变目录) -- [ls command][3] (列举文件) -- [cp command][4] (复制文件) -- [mv command][5] (移动或重命名文件) -- [touch command][6] (创建一个新的文件或更新已存在文件的时间表) -- rm command (删除文件) -- mkdir command (创建目录) - -在这篇文章中你将会找到更多的关于如何更好的使用他们的正确用法和特殊用法. - -虽然没有严格的要求,但是作为讨论常用的Linux命令和方法,你应该安装RHEL7 来尝试使用文章中提到的命令.这将会使你学习起来更省力. - -- [红帽企业版Linux(RHEL)7 安装指南][7] - -### 使用Shell进行交互 ### -如果我们使用文本模式登陆Linux,我们就无法使用鼠标在默认的shell。另一方面,如果我们使用图形化界面登陆,我们将会通过启动一个终端来开启shell,无论那种方式,我们都会看到用户提示,并且我们可以开始输入并且执行命令(当按下Enter时,命令就会被执行) - - -当我们使用文本模式登陆Linux时, -命令是由两个部分组成的: - -- 命令本身 -- 参数 - -某些参数,称为选项(通常使用一个连字符区分),改变了由其他参数定义的命令操作. - -命令的类型可以帮助我们识别某一个特定的命令是由shell内建的还是由一个单独的包提供。这样的区别在于我们能够找到更多关于该信息的命令,对shell内置的命令,我们需要看shell的ManPage,如果是其他提供的,我们需要看它自己的ManPage. - -![Check Shell built in Commands](http://www.tecmint.com/wp-content/uploads/2015/02/Check-shell-built-in-Commands.png) - -检查Shell的内建命令 - -在上面的例子中, cd 和 type 是shell内建的命令,top和 less 是由其他的二进制文件提供的(在这种情况下,type将返回命令的位置) -其他的内建命令 - -- [echo command][8]: 展示字符串 -- [pwd command][9]: 输出当前的工作目录 - -![More Built in Shell Commands](http://www.tecmint.com/wp-content/uploads/2015/02/More-Built-in-Shell-Commands.png) - -更多内建函数 - -**exec 命令** - -运行我们指定的外部程序。请注意,最好是只输入我们想要运行的程序的名字,不过exec命令有一个特殊的特性:使用旧的shell运行,而不是创建新的进程,可以作为子请求的验证. - - # ps -ef | grep [shell 进程的PID] - -当新的进程注销,Shell也随之注销,运行 exec top 然后按下 q键来退出top,你会注意到shell 会话会结束,如下面的屏幕录像展示的那样: - -注:youtube视频 - - -**export 命令** - -输出之后执行的命令的环境的变量 - -**history 命令** - -展示数行之前的历史命令.在感叹号前输入命令编号可以再次执行这个命令.如果我们需要编辑历史列表中的命令,我们可以按下 Ctrl + r 并输入与命令相关的第一个字符. -当我们看到的命令自动补全,我们可以根据我们目前的需要来编辑它: - -注:youtube视频 - - -命令列表会保存在一个叫 .bash_history的文件里.history命令是一个非常有用的用于减少输入次数的工具,特别是进行命令行编辑的时候.默认情况下,bash保留最后输入的500个命令,不过可以通过修改 HISTSIZE 环境变量来增加: - - -![Linux history Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-history-Command.png) - -Linux history 命令 - -但上述变化,在我们的下一次启动不会保留。为了保持HISTSIZE变量的变化,我们需要通过手工修改文件编辑: - - # 设置history请看 HISTSIZE 和 HISTFILESIZE 在 bash(1)的文档 - HISTSIZE=1000 - -**重要**: 我们的更改不会生效,除非我们重启了系统 - -**alias 命令** -没有参数或使用-p参数将会以 名称=值的标准形式输出alias 列表.当提供了参数时,一个alias 将被定义给给定的命令和值 - -使用alias ,我们可以创建我们自己的命令,或修改现有的命令,包括需要的参数.举个例子,假设我们想别名 ls 到 ls –color=auto ,这样就可以使用不同颜色输出文件、目录、链接 - - - # alias ls='ls --color=auto' - -![Linux alias Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-alias-Command.png) - -Linux 别名命令 - -**Note**: 你可以给你的新命令起任何的名字,并且附上足够多的使用单引号分割的参数,但是这样的情况下你要用分号区分开他们. - - # alias myNewCommand='cd /usr/bin; ls; cd; clear' - -**exit 命令** - -Exit和logout命令都是退出shell.exit命令退出所有的shell,logout命令只注销登陆的shell,其他的自动以文本模式启动的shell不算. - -如果我们对某个程序由疑问,我们可以看他的man Page,可以使用man命令调出它,额外的,还有一些重要的文件的手册页(inittab,fstab,hosts等等),库函数,shells,设备及其他功能 - -#### 举例: #### - -- man uname (输出系统信息,如内核名称、处理器、操作系统类型、架构等). -- man inittab (初始化守护设置). - -另外一个重要的信息的来源就是info命令提供的,info命令常常被用来读取信息文件.这些文件往往比manpage 提供更多信息.通过info 关键词调用某个命令的信息 - - # info ls - # info cut - - -另外,在/usr/share/doc 文件夹包含了大量的子目录,里面可以找到大量的文档.他们包含文本文件或其他友好的格式. -确保你使用这三种方法去查找命令的信息。重点关注每个命令文档中介绍的详细的语法 - -**使用expand命令把tabs转换为空格** - -有时候文本文档包含了tabs但是程序无法很好的处理的tabs.或者我们只是简单的希望将tabs转换成空格.这就是为什么expand (GNU核心组件提供)工具出现, - -举个例子,给我们一个文件 NumberList.txt,让我们使用expand处理它,将tabs转换为一个空格.并且以标准形式输出. - - # expand --tabs=1 NumbersList.txt - -![Linux expand Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-expand-Command.png) - -Linux expand 命令 - -unexpand命令可以实现相反的功能(将空格转为tab) - -**使用head输出文件首行及使用tail输出文件尾行** - -通常情况下,head命令后跟着文件名时,将会输出该文件的前十行,我们可以通过 -n 参数来自定义具体的行数。 - - # head -n3 /etc/passwd - # tail -n3 /etc/passwd - -![Linux head and tail Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-head-and-tail-Command.png) - -Linux 的 head 和 tail 命令 - -tail 最有意思的一个特性就是能够展现信息(最后一行)就像我们输入文件(tail -f my.log,一行一行的,就像我们在观察它一样。)这在我们监控一个持续增加的日志文件时非常有用 - -更多: [Manage Files Effectively using head and tail Commands][10] - -**使用paste合并文本文件** -paste命令一行一行的合并文件,默认会以tab来区分每一行,或者其他你自定义的分行方式.(下面的例子就是输出使用等号划分行的文件). - # paste -d= file1 file2 - -![Merge Files in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Merge-Files-in-Linux-with-paste-command.png) - -Merge Files in Linux - -**使用split命令将文件分块** - -split 命令常常用于把一个文件切割成两个或多个文由我们自定义的前缀命名的件文件.这些文件可以通过大小、区块、行数,生成的文件会有一个数字或字母的后缀.在下面的例子中,我们将切割bash.pdf ,每个文件50KB (-b 50KB) ,使用命名后缀 (-d): - - # split -b 50KB -d bash.pdf bash_ - -![Split Files in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Split-Files-in-Linux-with-split-command.png) - -在Linux下划分文件 - -你可以使用如下命令来合并这些文件,生成源文件: - - # cat bash_00 bash_01 bash_02 bash_03 bash_04 bash_05 > bash.pdf - -**使用tr命令改变字符** - -tr 命令多用于变化(改变)一个一个的字符活使用字符范围.和之前一样,下面的实例我们江使用同样的文件file2,我们将实习: - -- 小写字母 o 变成大写 -- 所有的小写字母都变成大写字母 - - # cat file2 | tr o O - # cat file2 | tr [a-z] [A-Z] - -![Translate Characters in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Translate-characters-in-Linux-with-tr-command.png) - -在Linux中替换文字 - -**使用uniq和sort检查或删除重复的文字** - -uniq命令可以帮我们查出或删除文件中的重复的行,默认会写出到stdout.我们应当注意, uniq 只能查出相邻的两个相同的单纯,所以, uniq 往往和sort 一起使用(sort一般用于对文本文件的内容进行排序) - - -默认的,sort 以第一个参数(使用空格区分)为关键字.想要定义特殊的关键字,我们需要使用 -k参数,请注意如何使用sort 和uniq输出我们想要的字段,具体可以看下面的例子 - - # cat file3 - # sort file3 | uniq - # sort -k2 file3 | uniq - # sort -k3 file3 | uniq - -![删除文件中重复的行](http://www.tecmint.com/wp-content/uploads/2015/02/Remove-Duplicate-Lines-in-file.png) - -删除文件中重复的行 - -**从文件中提取文本的命令** - -Cut命令基于字节(-b),字符(-c),或者区块(-f)从stdin活文件中提取到的部分将会以标准的形式展现在屏幕上 - -当我们使用区块切割时,默认的分隔符是一个tab,不过你可以通过 -d 参数来自定义分隔符. - - # cut -d: -f1,3 /etc/passwd # 这个例子提取了第一块和第三块的文本 - # cut -d: -f2-4 /etc/passwd # 这个例子提取了第一块到第三块的文本 - -![从文件中提取文本](http://www.tecmint.com/wp-content/uploads/2015/02/Extract-Text-from-a-file.png) - -从文件中提取文本 - - -注意,上方的两个输出的结果是十分简洁的。 - -**使用fmt命令重新格式化文件** - -fmt 被用于去“清理”有大量内容或行的文件,或者有很多缩进的文件.新的锻炼格式每行不会超过75个字符款,你能改变这个设定通过 -w(width 宽度)参数,它可以设置行宽为一个特定的数值 - -举个例子,让我们看看当我们用fmt显示定宽为100个字符的时候的文件/etc/passwd 时会发生什么.再来一次,输出值变得更加简洁. - - # fmt -w100 /etc/passwd - -![File Reformatting in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/File-Reformatting-in-Linux-with-fmt-command.png) - -Linux文件重新格式化 - -**使用pr命令格式化打印内容** - -pr 分页并且在列中展示一个或多个用于打印的文件. 换句话说,使用pr格式化一个文件使他打印出来时看起来更好.举个例子,下面这个命令 - - # ls -a /etc | pr -n --columns=3 -h "Files in /etc" - -以一个友好的排版方式(3列)输出/etc下的文件,自定义了页眉(通过 -h 选项实现),行号(-n) - -![File Formatting in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/File-Formatting-in-Linux-with-pr-command.png) - -Linux的文件格式 - -### 总结 ### - -在这篇文章中,我们已经讨论了如何在Shell或终端以正确的语法输入和执行命令,并解释如何找到,检查和使用系统文档。正如你看到的一样简单,这就是你成为RHCSA的第一大步 - -如果你想添加一些其他的你经常使用的能够有效帮你完成你的日常工作的基础命令,并为分享他们而感到自豪,请在下方留言.也欢迎提出问题.我们期待您的回复. - - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ - -作者:[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]:https://www.redhat.com/en/services/certification/rhcsa -[2]:http://www.tecmint.com/cd-command-in-linux/ -[3]:http://www.tecmint.com/ls-command-interview-questions/ -[4]:http://www.tecmint.com/advanced-copy-command-shows-progress-bar-while-copying-files/ -[5]:http://www.tecmint.com/rename-multiple-files-in-linux/ -[6]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ -[7]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ -[8]:http://www.tecmint.com/echo-command-in-linux/ -[9]:http://www.tecmint.com/pwd-command-examples/ -[10]:http://www.tecmint.com/view-contents-of-file-in-linux/ From 0e4b77320242cc007f4cc6ee17a72b6f6dc824de Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 10 Aug 2015 12:38:55 +0800 Subject: [PATCH 1672/2517] =?UTF-8?q?20150810-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20150810 For Linux, Supercomputers R Us.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sources/talk/20150810 For Linux, Supercomputers R Us.md diff --git a/sources/talk/20150810 For Linux, Supercomputers R Us.md b/sources/talk/20150810 For Linux, Supercomputers R Us.md new file mode 100644 index 0000000000..7bc48125f0 --- /dev/null +++ b/sources/talk/20150810 For Linux, Supercomputers R Us.md @@ -0,0 +1,59 @@ +For Linux, Supercomputers R Us +================================================================================ +![Credit: Michel Ngilen, CC BY 2.0, via Wikimedia Commons](http://images.techhive.com/images/article/2015/08/playstation_3-100602985-primary.idge.jpg) +Credit: Michel Ngilen, CC BY 2.0, via Wikimedia Commons + +> Almost all supercomputers run Linux, including the ones built from Raspberry Pi boards and PlayStation 3 game consoles + +Supercomputers are serious things, called on to do serious computing. They tend to be engaged in serious pursuits like atomic bomb simulations, climate modeling and high-level physics. Naturally, they cost serious money. At the very top of the latest [Top500][1] supercomputer ranking is the Tianhe-2 supercomputer at China’s National University of Defense Technology. It cost about $390 million to build. + +But then there’s the supercomputer that Joshua Kiepert, a doctoral student at Boise State’s Electrical and Computer Engineering department, [created with Raspberry Pi computers][2].It cost less than $2,000. + +No, I’m not making that up. It’s an honest-to-goodness supercomputer made from overclocked 1-GHz [Model B Raspberry Pi][3] ARM11 processors with Videocore IV GPUs. Each one comes with 512MB of RAM, a pair of USB ports and a 10/100 BaseT Ethernet port. + +And what do the Tianhe-2 and the Boise State supercomputer have in common? They both run Linux. As do [486 out of the world’s fastest 500 supercomputers][4]. It’s part of a domination of the category that began over 20 years ago. And now it’s trickling down to built-on-the-cheap supercomputers. Because Kiepert’s machine isn’t the only budget number cruncher out there. + +Gaurav Khanna, an associate professor of physics at the University of Massachusetts Dartmouth, created a [supercomputer with something shy of 200 PlayStation 3 video game consoles][5]. + +The PlayStations are powered by a 3.2-GHz PowerPC-based Power Processing Element. Each comes with 512MB of RAM. You can still buy one, although Sony will be phasing them out by year’s end, for just over $200. Khanna started with only 16 PlayStation 3s for his first supercomputer, so you too could put a supercomputer on your credit card for less than four grand. + +These machines may be built from toys, but they’re not playthings. Khanna has done serious astrophysics on his rig. A white-hat hacking group used a similar [PlayStation 3 supercomputer in 2008 to crack the SSL MD5 hashing algorithm][6] in 2008. + +Two years later, the Air Force Research Laboratory [Condor Cluster was using 1,760 Sony PlayStation 3 processors][7] and 168 general-purpose graphical processing units. This bargain-basement supercomputer runs at about 500TFLOPs, or 500 trillion floating point operations per second. + +Other cheap options for home supercomputers include specialist parallel-processing boards such as the [$99 credit-card-sized Parallella board][8], and high-end graphics boards such as [Nvidia’s Titan Z][9] and [AMD’s FirePro W9100][10]. Those high-end boards, coveted by gamers with visions of a dream machine or even a chance at winning the first-place prize of over $100,000 in the [Intel Extreme Masters World Championship League of][11] [Legends][12], cost considerably more, retailing for about $3,000. On the other hand, a single one can deliver over 2.5TFLOPS all by itself, and for scientists and researchers, they offer an affordable way to get a supercomputer they can call their own. + +As for the Linux connection, that all started in 1994 at the Goddard Space Flight Center with the first [Beowulf supercomputer][13]. + +By our standards, there wasn’t much that was super about the first Beowulf. But in its day, the first homemade supercomputer, with its 16 Intel 486DX processors and 10Mbps Ethernet for the bus, was great. [Beowulf, designed by NASA contractors Don Becker and Thomas Sterling][14], was the first “maker” supercomputer. Its “compute components,” 486DX PCs, cost only a few thousand dollars. While its speed was only in single-digit gigaflops, [Beowulf][15] showed you could build supercomputers from commercial off-the-shelf (COTS) hardware and Linux. + +I wish I’d had a part in its creation, but I’d already left Goddard by 1994 for a career as a full-time technology journalist. Darn it! + +But even from this side of my reporter’s notebook, I can still appreciate how COTS and open-source software changed supercomputing forever. I hope you can too. Because, whether it’s a cluster of Raspberry Pis or a monster with over 3 million Intel Ivy Bridge and Xeon Phi chips, almost all of today’s supercomputers trace their ancestry to Beowulf. + +-------------------------------------------------------------------------------- + +via: + +作者:[Steven J. Vaughan-Nichols][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.computerworld.com/author/Steven-J.-Vaughan_Nichols/ +[1]:http://www.top500.org/ +[2]:http://www.zdnet.com/article/build-your-own-supercomputer-out-of-raspberry-pi-boards/ +[3]:https://www.raspberrypi.org/products/model-b/ +[4]:http://www.zdnet.com/article/linux-still-rules-supercomputing/ +[5]:http://www.nytimes.com/2014/12/23/science/an-economical-way-to-save-progress.html?smid=fb-nytimes&smtyp=cur&bicmp=AD&bicmlukp=WT.mc_id&bicmst=1409232722000&bicmet=1419773522000&_r=4 +[6]:http://www.computerworld.com/article/2529932/cybercrime-hacking/researchers-hack-verisign-s-ssl-scheme-for-securing-web-sites.html +[7]:http://phys.org/news/2010-12-air-playstation-3s-supercomputer.html +[8]:http://www.zdnet.com/article/parallella-the-99-linux-supercomputer/ +[9]:http://blogs.nvidia.com/blog/2014/03/25/titan-z/ +[10]:http://www.amd.com/en-us/press-releases/Pages/amd-flagship-professional-2014apr7.aspx +[11]:http://en.intelextrememasters.com/news/check-out-the-intel-extreme-masters-katowice-prize-money-distribution/ +[12]:http://www.google.com/url?q=http%3A%2F%2Fen.intelextrememasters.com%2Fnews%2Fcheck-out-the-intel-extreme-masters-katowice-prize-money-distribution%2F&sa=D&sntz=1&usg=AFQjCNE6yoAGGz-Hpi2tPF4gdhuPBEckhQ +[13]:http://www.beowulf.org/overview/history.html +[14]:http://yclept.ucdavis.edu/Beowulf/aboutbeowulf.html +[15]:http://www.beowulf.org/ \ No newline at end of file From e58cee17af9223454ed0cead2fa9c52f8027eaaf Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 10 Aug 2015 14:31:12 +0800 Subject: [PATCH 1673/2517] PUB:20150717 How to collect NGINX metrics - Part 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @strugglingyouth 第二篇也发了~~等第三篇哦 --- ...7 How to collect NGINX metrics - Part 2.md | 178 +++++++++++++ ...7 How to collect NGINX metrics - Part 2.md | 237 ------------------ 2 files changed, 178 insertions(+), 237 deletions(-) create mode 100644 published/20150717 How to collect NGINX metrics - Part 2.md delete mode 100644 translated/tech/20150717 How to collect NGINX metrics - Part 2.md diff --git a/published/20150717 How to collect NGINX metrics - Part 2.md b/published/20150717 How to collect NGINX metrics - Part 2.md new file mode 100644 index 0000000000..f1acf82a35 --- /dev/null +++ b/published/20150717 How to collect NGINX metrics - Part 2.md @@ -0,0 +1,178 @@ + +如何收集 NGINX 指标(第二篇) +================================================================================ +![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_2.png) + +### 如何获取你所需要的 NGINX 指标 ### + +如何获取需要的指标取决于你正在使用的 NGINX 版本以及你希望看到哪些指标。(参见 [如何监控 NGINX(第一篇)][1] 来深入了解NGINX指标。)自由开源的 NGINX 和商业版的 NGINX Plus 都有可以报告指标度量的状态模块,NGINX 也可以在其日志中配置输出特定指标: + +**指标可用性** + +| 指标 | [NGINX (开源)](https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source) | [NGINX Plus](https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#plus) | [NGINX 日志](https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#logs)| +|-----|------|-------|-----| +|accepts(接受) / accepted(已接受)|x|x| | +|handled(已处理)|x|x| | +|dropped(已丢弃)|x|x| | +|active(活跃)|x|x| | +|requests (请求数)/ total(全部请求数)|x|x| | +|4xx 代码||x|x| +|5xx 代码||x|x| +|request time(请求处理时间)|||x| + +#### 指标收集:NGINX(开源版) #### + +开源版的 NGINX 会在一个简单的状态页面上显示几个与服务器状态有关的基本指标,它们由你启用的 HTTP [stub status module][2] 所提供。要检查该模块是否已启用,运行以下命令: + + nginx -V 2>&1 | grep -o with-http_stub_status_module + +如果你看到终端输出了 **http_stub_status_module**,说明该状态模块已启用。 + +如果该命令没有输出,你需要启用该状态模块。你可以在[从源代码构建 NGINX ][3]时使用 `--with-http_stub_status_module` 配置参数: + + ./configure \ + … \ + --with-http_stub_status_module + make + sudo make install + +在验证该模块已经启用或你自己启用它后,你还需要修改 NGINX 配置文件,来给状态页面设置一个本地可访问的 URL(例如: /nginx_status): + + server { + location /nginx_status { + stub_status on; + + access_log off; + allow 127.0.0.1; + deny all; + } + } + +注:nginx 配置中的 server 块通常并不放在主配置文件中(例如:/etc/nginx/nginx.conf),而是放在主配置会加载的辅助配置文件中。要找到主配置文件,首先运行以下命令: + + nginx -t + +打开列出的主配置文件,在以 http 块结尾的附近查找以 include 开头的行,如: + + include /etc/nginx/conf.d/*.conf; + +在其中一个包含的配置文件中,你应该会找到主 **server** 块,你可以如上所示配置 NGINX 的指标输出。更改任何配置后,通过执行以下命令重新加载配置文件: + + nginx -s reload + +现在,你可以浏览状态页看到你的指标: + + Active connections: 24 + server accepts handled requests + 1156958 1156958 4491319 + Reading: 0 Writing: 18 Waiting : 6 + +请注意,如果你希望从远程计算机访问该状态页面,则需要将远程计算机的 IP 地址添加到你的状态配置文件的白名单中,在上面的配置文件中的白名单仅有 127.0.0.1。 + +NGINX 的状态页面是一种快速查看指标状况的简单方法,但当连续监测时,你需要按照标准间隔自动记录该数据。监控工具箱 [Nagios][4] 或者 [Datadog][5],以及收集统计信息的服务 [collectD][6] 已经可以解析 NGINX 的状态信息了。 + +#### 指标收集: NGINX Plus #### + +商业版的 NGINX Plus 通过它的 ngx_http_status_module 提供了比开源版 NGINX [更多的指标][7]。NGINX Plus 以字节流的方式提供这些额外的指标,提供了关于上游系统和高速缓存的信息。NGINX Plus 也会报告所有的 HTTP 状态码类型(1XX,2XX,3XX,4XX,5XX)的计数。一个 NGINX Plus 状态报告例子[可在此查看][8]: + +![NGINX Plus status board](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/status_plus-2.png) + +注:NGINX Plus 在状态仪表盘中的“Active”连接的定义和开源 NGINX 通过 stub_status_module 收集的“Active”连接指标略有不同。在 NGINX Plus 指标中,“Active”连接不包括Waiting状态的连接(即“Idle”连接)。 + +NGINX Plus 也可以输出 [JSON 格式的指标][9],可以用于集成到其他监控系统。在 NGINX Plus 中,你可以看到 [给定的上游服务器组][10]的指标和健康状况,或者简单地从上游服务器的[单个服务器][11]得到响应代码的计数: + + {"1xx":0,"2xx":3483032,"3xx":0,"4xx":23,"5xx":0,"total":3483055} + +要启动 NGINX Plus 指标仪表盘,你可以在 NGINX 配置文件的 http 块内添加状态 server 块。 (参见上一节,为收集开源版 NGINX 指标而如何查找相关的配置文件的说明。)例如,要设置一个状态仪表盘 (http://your.ip.address:8080/status.html)和一个 JSON 接口(http://your.ip.address:8080/status),可以添加以下 server 块来设定: + + server { + listen 8080; + root /usr/share/nginx/html; + + location /status { + status; + } + + location = /status.html { + } + } + +当你重新加载 NGINX 配置后,状态页就可以用了: + + nginx -s reload + +关于如何配置扩展状态模块,官方 NGINX Plus 文档有 [详细介绍][13] 。 + +#### 指标收集:NGINX 日志 #### + +NGINX 的 [日志模块][14] 会把可自定义的访问日志写到你配置的指定位置。你可以通过[添加或移除变量][15]来自定义日志的格式和包含的数据。要存储详细的日志,最简单的方法是添加下面一行在你配置文件的 server 块中(参见上上节,为收集开源版 NGINX 指标而如何查找相关的配置文件的说明。): + + access_log logs/host.access.log combined; + +更改 NGINX 配置文件后,执行如下命令重新加载配置文件: + + nginx -s reload + +默认包含的 “combined” 的日志格式,会包括[一系列关键的数据][17],如实际的 HTTP 请求和相应的响应代码。在下面的示例日志中,NGINX 记录了请求 /index.html 时的 200(成功)状态码和访问不存在的请求文件 /fail 的 404(未找到)错误。 + + 127.0.0.1 - - [19/Feb/2015:12:10:46 -0500] "GET /index.html HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari 537.36" + + 127.0.0.1 - - [19/Feb/2015:12:11:05 -0500] "GET /fail HTTP/1.1" 404 570 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36" + +你可以通过在 NGINX 配置文件中的 http 块添加一个新的日志格式来记录请求处理时间: + + log_format nginx '$remote_addr - $remote_user [$time_local] ' + '"$request" $status $body_bytes_sent $request_time ' + '"$http_referer" "$http_user_agent"'; + +并修改配置文件中 **server** 块的 access_log 行: + + access_log logs/host.access.log nginx; + +重新加载配置文件后(运行 `nginx -s reload`),你的访问日志将包括响应时间,如下所示。单位为秒,精度到毫秒。在这个例子中,服务器接收到一个对 /big.pdf 的请求时,发送 33973115 字节后返回 206(成功)状态码。处理请求用时 0.202 秒(202毫秒): + + 127.0.0.1 - - [19/Feb/2015:15:50:36 -0500] "GET /big.pdf HTTP/1.1" 206 33973115 0.202 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36" + +你可以使用各种工具和服务来解析和分析 NGINX 日志。例如,[rsyslog][18] 可以监视你的日志,并将其传递给多个日志分析服务;你也可以使用自由开源工具,比如 [logstash][19] 来收集和分析日志;或者你可以使用一个统一日志记录层,如 [Fluentd][20] 来收集和解析你的 NGINX 日志。 + +### 结论 ### + +监视 NGINX 的哪一项指标将取决于你可用的工具,以及监控指标所提供的信息是否满足你们的需要。举例来说,错误率的收集是否足够重要到需要你们购买 NGINX Plus ,还是架设一个可以捕获和分析日志的系统就够了? + +在 Datadog 中,我们已经集成了 NGINX 和 NGINX Plus,这样你就可以以最小的设置来收集和监控所有 Web 服务器的指标。[在本文中][21]了解如何用 NGINX Datadog 来监控 ,并开始 [Datadog 的免费试用][22]吧。 + + +-------------------------------------------------------------------------------- + +via: https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ + +作者:K Young +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ +[2]:http://nginx.org/en/docs/http/ngx_http_stub_status_module.html +[3]:http://wiki.nginx.org/InstallOptions +[4]:https://exchange.nagios.org/directory/Plugins/Web-Servers/nginx +[5]:http://docs.datadoghq.com/integrations/nginx/ +[6]:https://collectd.org/wiki/index.php/Plugin:nginx +[7]:http://nginx.org/en/docs/http/ngx_http_status_module.html#data +[8]:http://demo.nginx.com/status.html +[9]:http://demo.nginx.com/status +[10]:http://demo.nginx.com/status/upstreams/demoupstreams +[11]:http://demo.nginx.com/status/upstreams/demoupstreams/0/responses +[12]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source +[13]:http://nginx.org/en/docs/http/ngx_http_status_module.html#example +[14]:http://nginx.org/en/docs/http/ngx_http_log_module.html +[15]:http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format +[16]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source +[17]:http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format +[18]:http://www.rsyslog.com/ +[19]:https://www.elastic.co/products/logstash +[20]:http://www.fluentd.org/ +[21]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ +[22]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#sign-up +[23]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_collect_nginx_metrics.md +[24]:https://github.com/DataDog/the-monitor/issues diff --git a/translated/tech/20150717 How to collect NGINX metrics - Part 2.md b/translated/tech/20150717 How to collect NGINX metrics - Part 2.md deleted file mode 100644 index 848042bf2c..0000000000 --- a/translated/tech/20150717 How to collect NGINX metrics - Part 2.md +++ /dev/null @@ -1,237 +0,0 @@ - -如何收集NGINX指标 - 第2部分 -================================================================================ -![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_2.png) - -### 如何获取你所需要的NGINX指标 ### - -如何获取需要的指标取决于你正在使用的 NGINX 版本。(参见 [the companion article][1] 将深入探索NGINX指标。)免费,开源版的 NGINX 和商业版的 NGINX 都有指标度量的状态模块,NGINX 也可以在其日志中配置指标模块: - -注:表格 - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MetricAvailability
NGINX (open-source)NGINX PlusNGINX logs
accepts / acceptedxx
handledxx
droppedxx
activexx
requests / totalxx
4xx codesxx
5xx codesxx
request timex
- -#### 指标收集:NGINX(开源版) #### - -开源版的 NGINX 会显示几个与服务器状态有关的指标在状态页面上,只要你启用了 HTTP [stub status module][2] 。要检查模块是否被加载,运行以下命令: - - nginx -V 2>&1 | grep -o with-http_stub_status_module - -如果你看到 http_stub_status_module 被输出在终端,说明状态模块已启用。 - -如果该命令没有输出,你需要启用状态模块。你可以使用 --with-http_stub_status_module 参数去配置 [building NGINX from source][3]: - - ./configure \ - … \ - --with-http_stub_status_module - make - sudo make install - -验证模块已经启用或你自己启用它后,你还需要修改 NGINX 配置文件为状态页面设置本地访问的 URL(例如,/ nginx_status): - - server { - location /nginx_status { - stub_status on; - - access_log off; - allow 127.0.0.1; - deny all; - } - } - -注:nginx 配置中的 server 块通常并不在主配置文件中(例如,/etc/nginx/nginx.conf),但主配置中会加载补充的配置文件。要找到主配置文件,首先运行以下命令: - - nginx -t - -打开主配置文件,在以 http 模块结尾的附近查找以 include 开头的行包,如: - - include /etc/nginx/conf.d/*.conf; - -在所包含的配置文件中,你应该会找到主服务器模块,你可以如上所示修改 NGINX 的指标报告。更改任何配置后,通过执行以下命令重新加载配置文件: - - nginx -s reload - -现在,你可以查看指标的状态页: - - Active connections: 24 - server accepts handled requests - 1156958 1156958 4491319 - Reading: 0 Writing: 18 Waiting : 6 - -请注意,如果你正试图从远程计算机访问状态页面,则需要将远程计算机的 IP 地址添加到你的状态配置文件的白名单中,在上面的配置文件中 127.0.0.1 仅在白名单中。 - -nginx 的状态页面是一中查看指标快速又简单的方法,但当连续监测时,你需要每隔一段时间自动记录该数据。然后通过监控工具箱 [Nagios][4] 或者 [Datadog][5],以及收集统计信息的服务 [collectD][6] 来分析已保存的 NGINX 状态信息。 - -#### 指标收集: NGINX Plus #### - -商业版的 NGINX Plus 通过 ngx_http_status_module 提供的可用指标比开源版 NGINX 更多 [many more metrics][7] 。NGINX Plus 附加了更多的字节流指标,以及负载均衡系统和高速缓存的信息。NGINX Plus 还报告所有的 HTTP 状态码类型(1XX,2XX,3XX,4XX,5XX)的计数。一个简单的 NGINX Plus 状态报告 [here][8]。 - -![NGINX Plus status board](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/status_plus-2.png) - -*注: NGINX Plus 在状态仪表盘"Active”连接定义的收集指标的状态模块和开源 NGINX 的略有不同。在 NGINX Plus 指标中,活动连接不包括等待状态(又叫空闲连接)连接。* - -NGINX Plus 也集成了其他监控系统的报告 [JSON格式指标][9] 。用 NGINX Plus 时,你可以看到 [负载均衡服务器组的][10]指标和健康状况,或着再向下能取得的仅是响应代码计数[从单个服务器][11]在负载均衡服务器中: - {"1xx":0,"2xx":3483032,"3xx":0,"4xx":23,"5xx":0,"total":3483055} - -启动 NGINX Plus 指标仪表盘,你可以在 NGINX 配置文件的 http 块内添加状态 server 块。 ([参见上一页][12]查找相关的配置文件,收集开源 NGINX 版指标的说明。)例如,设立以下一个状态仪表盘在http://your.ip.address:8080/status.html 和一个 JSON 接口 http://your.ip.address:8080/status,可以添加以下 server block 来设定: - - server { - listen 8080; - root /usr/share/nginx/html; - - location /status { - status; - } - - location = /status.html { - } - } - -一旦你重新加载 NGINX 配置,状态页就会被加载: - - nginx -s reload - -关于如何配置扩展状态模块,官方 NGINX Plus 文档有 [详细介绍][13] 。 - -#### 指标收集:NGINX日志 #### - -NGINX 的 [日志模块][14] 写到配置可以自定义访问日志到指定文件。你可以自定义日志的格式和时间通过 [添加或移除变量][15]。捕获日志的详细信息,最简单的方法是添加下面一行在你配置文件的server 块中(参见[此节][16] 通过加载配置文件的信息来收集开源 NGINX 的指标): - - access_log logs/host.access.log combined; - -更改 NGINX 配置文件后,必须要重新加载配置文件: - - nginx -s reload - -“combined” 的日志格式,只包含默认参数,包括[一些关键数据][17],如实际的 HTTP 请求和相应的响应代码。在下面的示例日志中,NGINX 记录了200(成功)状态码当请求 /index.html 时和404(未找到)错误不存在的请求文件 /fail。 - - 127.0.0.1 - - [19/Feb/2015:12:10:46 -0500] "GET /index.html HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari 537.36" - - 127.0.0.1 - - [19/Feb/2015:12:11:05 -0500] "GET /fail HTTP/1.1" 404 570 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36" - -你可以记录请求处理的时间通过添加一个新的日志格式在 NGINX 配置文件中的 http 块: - - log_format nginx '$remote_addr - $remote_user [$time_local] ' - '"$request" $status $body_bytes_sent $request_time ' - '"$http_referer" "$http_user_agent"'; - -通过修改配置文件中 server 块的 access_log 行: - - access_log logs/host.access.log nginx; - -重新加载配置文件(运行 nginx -s reload)后,你的访问日志将包括响应时间,如下图所示。单位为秒,毫秒。在这种情况下,服务器接收 /big.pdf 的请求时,发送33973115字节后返回206(成功)状态码。处理请求用时0.202秒(202毫秒): - - 127.0.0.1 - - [19/Feb/2015:15:50:36 -0500] "GET /big.pdf HTTP/1.1" 206 33973115 0.202 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36" - -你可以使用各种工具和服务来收集和分析 NGINX 日志。例如,[rsyslog][18] 可以监视你的日志,并将其传递给多个日志分析服务;你也可以使用免费的开源工具,如[logstash][19]来收集和分析日志;或者你可以使用一个统一日志记录层,如[Fluentd][20]来收集和分析你的 NGINX 日志。 - -### 结论 ### - -监视 NGINX 的哪一项指标将取决于你提供的工具,以及是否由给定指标证明监控指标的开销。例如,通过收集和分析日志来定位问题是非常重要的在 NGINX Plus 或者 运行的系统中。 - -在 Datadog 中,我们已经集成了 NGINX 和 NGINX Plus,这样你就可以以最小的设置来收集和监控所有 Web 服务器的指标。了解如何用 NGINX Datadog来监控 [在本文中][21],并开始使用 [免费的Datadog][22]。 - ----------- - -原文在这 [on GitHub][23]。问题,更正,补充等?请[让我们知道][24]。 - --------------------------------------------------------------------------------- - -via: https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/ - -作者:K Young -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ -[2]:http://nginx.org/en/docs/http/ngx_http_stub_status_module.html -[3]:http://wiki.nginx.org/InstallOptions -[4]:https://exchange.nagios.org/directory/Plugins/Web-Servers/nginx -[5]:http://docs.datadoghq.com/integrations/nginx/ -[6]:https://collectd.org/wiki/index.php/Plugin:nginx -[7]:http://nginx.org/en/docs/http/ngx_http_status_module.html#data -[8]:http://demo.nginx.com/status.html -[9]:http://demo.nginx.com/status -[10]:http://demo.nginx.com/status/upstreams/demoupstreams -[11]:http://demo.nginx.com/status/upstreams/demoupstreams/0/responses -[12]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source -[13]:http://nginx.org/en/docs/http/ngx_http_status_module.html#example -[14]:http://nginx.org/en/docs/http/ngx_http_log_module.html -[15]:http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format -[16]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source -[17]:http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format -[18]:http://www.rsyslog.com/ -[19]:https://www.elastic.co/products/logstash -[20]:http://www.fluentd.org/ -[21]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ -[22]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#sign-up -[23]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_collect_nginx_metrics.md -[24]:https://github.com/DataDog/the-monitor/issues From 843f0e99478af5d7c47fd3e774c79aacfff4732f Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Mon, 10 Aug 2015 15:01:28 +0800 Subject: [PATCH 1674/2517] [Translated]20150209 Install OpenQRM Cloud Computing Platform In Debian.md --- ...nQRM Cloud Computing Platform In Debian.md | 151 ------------------ ...nQRM Cloud Computing Platform In Debian.md | 148 +++++++++++++++++ 2 files changed, 148 insertions(+), 151 deletions(-) delete mode 100644 sources/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md create mode 100644 translated/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md diff --git a/sources/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md b/sources/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md deleted file mode 100644 index 2c6a990b83..0000000000 --- a/sources/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md +++ /dev/null @@ -1,151 +0,0 @@ -FSSlc translating - -Install OpenQRM Cloud Computing Platform In Debian -================================================================================ -### Introduction ### - -**openQRM** is a web-based open source Cloud computing and datacenter management platform that integrates flexibly with existing components in enterprise data centers. - -It supports the following virtualization technologies: - -- KVM, -- XEN, -- Citrix XenServer, -- VMWare ESX, -- LXC, -- OpenVZ. - -The Hybrid Cloud Connector in openQRM supports a range of private or public cloud providers to extend your infrastructure on demand via **Amazon AWS**, **Eucalyptus** or **OpenStack**. It, also, automates provisioning, virtualization, storage and configuration management, and it takes care of high-availability. A self-service cloud portal with integrated billing system enables end-users to request new servers and application stacks on-demand. - -openQRM is available in two different flavours such as: - -- Enterprise Edition -- Community Edition - -You can view the difference between both editions [here][1]. - -### Features ### - -- Private/Hybrid Cloud Computing Platform; -- Manages physical and virtualized server systems; -- Integrates with all major open and commercial storage technologies; -- Cross-platform: Linux, Windows, OpenSolaris, and *BSD; -- Supports KVM, XEN, Citrix XenServer, VMWare ESX(i), lxc, OpenVZ and VirtualBox; -- Support for Hybrid Cloud setups using additional Amazon AWS, Eucalyptus, Ubuntu UEC cloud resources; -- Supports P2V, P2P, V2P, V2V Migrations and High-Availability; -- Integrates with the best Open Source management tools – like puppet, nagios/Icinga or collectd; -- Over 50 plugins for extended features and integration with your infrastructure; -- Self-Service Portal for end-users; -- Integrated billing system. - -### Installation ### - -Here, we will install openQRM in Ubuntu 14.04 LTS. Your server must atleast meet the following requirements. - -- 1 GB RAM; -- 100 GB Hdd; -- Optional: Virtualization enabled (VT for Intel CPUs or AMD-V for AMD CPUs) in Bios. - -First, install make package to compile openQRM source package. - - sudo apt-get update - sudo apt-get upgrade - sudo apt-get install make - -Then, run the following commands one by one to install openQRM. - -Download the latest available version [from here][2]. - - wget http://sourceforge.net/projects/openqrm/files/openQRM-Community-5.1/openqrm-community-5.1.tgz - - tar -xvzf openqrm-community-5.1.tgz - - cd openqrm-community-5.1/src/ - - sudo make - - sudo make install - - sudo make start - -During installation, you’ll be asked to update the php.ini file. - -![~-openqrm-community-5.1-src_001](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_001.png) - -Enter mysql root user password. - -![~-openqrm-community-5.1-src_002](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_002.png) - -Re-enter password: - -![~-openqrm-community-5.1-src_003](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_003.png) - -Select the mail server configuration type. - -![~-openqrm-community-5.1-src_004](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_004.png) - -If you’re not sure, select Local only. In our case, I go with **Local only** option. - -![~-openqrm-community-5.1-src_005](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_005.png) - -Enter your system mail name, and finally enter the Nagios administration password. - -![~-openqrm-community-5.1-src_007](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_007.png) - -The above commands will take long time depending upon your Internet connection to download all packages required to run openQRM. Be patient. - -Finally, you’ll get the openQRM configuration URL along with username and password. - -![~_002](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@debian-_002.png) - -### Configuration ### - -After installing openQRM, open up your web browser and navigate to the URL: **http://ip-address/openqrm**. - -For example, in my case http://192.168.1.100/openqrm. - -The default username and password is: **openqrm/openqrm**. - -![Mozilla Firefox_003](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/Mozilla-Firefox_003.png) - -Select a network card to use for the openQRM management network. - -![openQRM Server - Mozilla Firefox_004](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_004.png) - -Select a database type. In our case, I selected mysql. - -![openQRM Server - Mozilla Firefox_006](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_006.png) - -Now, configure the database connection and initialize openQRM. Here, I use **openQRM** as database name, and user as **root** and debian as password for the database. Be mindful that you should enter the mysql root user password that you have created while installing openQRM. - -![openQRM Server - Mozilla Firefox_012](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_012.png) - -Congratulations!! openQRM has been installed and configured. - -![openQRM Server - Mozilla Firefox_013](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_013.png) - -### Update openQRM ### - -To update openQRM at any time run the following command: - - cd openqrm/src/ - make update - -What we have done so far is just installed and configured openQRM in our Ubuntu server. For creating, running Virtual Machines, managing Storage, integrating additional systems and running your own private Cloud, I suggest you to read the [openQRM Administrator Guide][3]. - -That’s all now. Cheers! Happy weekend!! - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/install-openqrm-cloud-computing-platform-debian/ - -作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/sk/ -[1]:http://www.openqrm-enterprise.com/products/edition-comparison.html -[2]:http://sourceforge.net/projects/openqrm/files/?source=navbar -[3]:http://www.openqrm-enterprise.com/fileadmin/Documents/Whitepaper/openQRM-Enterprise-Administrator-Guide-5.2.pdf diff --git a/translated/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md b/translated/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md new file mode 100644 index 0000000000..2eacc933b9 --- /dev/null +++ b/translated/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md @@ -0,0 +1,148 @@ +在 Debian 中安装 OpenQRM 云计算平台 +================================================================================ +### 简介 ### + +**openQRM**是一个基于 Web 的开源云计算和数据中心管理平台,可灵活地与企业数据中心的现存组件集成。 + +它支持下列虚拟技术: + +- KVM, +- XEN, +- Citrix XenServer, +- VMWare ESX, +- LXC, +- OpenVZ. + +openQRM 中的杂交云连接器通过 **Amazon AWS**, **Eucalyptus** 或 **OpenStack** 来支持一系列的私有或公有云提供商,以此来按需扩展你的基础设施。它也自动地进行资源调配、 虚拟化、 存储和配置管理,且关注高可用性。集成计费系统的自助服务云门户可使终端用户按需请求新的服务器和应用堆栈。 + +openQRM 有两种不同风格的版本可获取: + +- 企业版 +- 社区版 + +你可以在[这里][1] 查看这两个版本间的区别。 + +### 特点 ### + +- 私有/杂交的云计算平台; +- 可管理物理或虚拟的服务器系统; +- 可与所有主流的开源或商业的存储技术集成; +- 跨平台: Linux, Windows, OpenSolaris, and BSD; +- 支持 KVM, XEN, Citrix XenServer, VMWare ESX(i), lxc, OpenVZ 和 VirtualBox; +- 支持使用额外的 Amazon AWS, Eucalyptus, Ubuntu UEC 等云资源来进行杂交云设置; +- 支持 P2V, P2P, V2P, V2V 迁移和高可用性; +- 集成最好的开源管理工具 – 如 puppet, nagios/Icinga 或 collectd; +- 有超过 50 个插件来支持扩展功能并与你的基础设施集成; +- 针对终端用户的自助门户; +- 集成计费系统. + +### 安装 ### + +在这里我们将在 in Debian 7.5 上安装 openQRM。你的服务器必须至少满足以下要求: + +- 1 GB RAM; +- 100 GB Hdd(硬盘驱动器); +- 可选: Bios 支持虚拟化(Intel CPUs 的 VT 或 AMD CPUs AMD-V). + +首先,安装 `make` 软件包来编译 openQRM 源码包: + + sudo apt-get update + sudo apt-get upgrade + sudo apt-get install make + +然后,逐次运行下面的命令来安装 openQRM。 + +从[这里][2] 下载最新的可用版本: + + wget http://sourceforge.net/projects/openqrm/files/openQRM-Community-5.1/openqrm-community-5.1.tgz + + tar -xvzf openqrm-community-5.1.tgz + + cd openqrm-community-5.1/src/ + + sudo make + + sudo make install + + sudo make start + +安装期间,你将被询问去更新文件 `php.ini` + +![~-openqrm-community-5.1-src_001](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_001.png) + +输入 mysql root 用户密码。 + +![~-openqrm-community-5.1-src_002](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_002.png) + +再次输入密码: + +![~-openqrm-community-5.1-src_003](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_003.png) + +选择邮件服务器配置类型。 + +![~-openqrm-community-5.1-src_004](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_004.png) + +假如你不确定该如何选择,可选择 `Local only`。在我们的这个示例中,我选择了 **Local only** 选项。 + +![~-openqrm-community-5.1-src_005](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_005.png) + +输入你的系统邮件名称,并最后输入 Nagios 管理员密码。 + +![~-openqrm-community-5.1-src_007](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_007.png) + +根据你的网络连接状态,上面的命令可能将花费很长的时间来下载所有运行 openQRM 所需的软件包,请耐心等待。 + +最后你将得到 openQRM 配置 URL 地址以及相关的用户名和密码。 + +![~_002](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@debian-_002.png) + +### 配置 ### + +在安装完 openQRM 后,打开你的 Web 浏览器并转到 URL: **http://ip-address/openqrm** + +例如,在我的示例中为 http://192.168.1.100/openqrm 。 + +默认的用户名和密码是: **openqrm/openqrm** 。 + +![Mozilla Firefox_003](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/Mozilla-Firefox_003.png) + +选择一个网卡来给 openQRM 管理网络使用。 + +![openQRM Server - Mozilla Firefox_004](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_004.png) + +选择一个数据库类型,在我们的示例中,我选择了 mysql。 + +![openQRM Server - Mozilla Firefox_006](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_006.png) + +现在,配置数据库连接并初始化 openQRM, 在这里,我使用 **openQRM** 作为数据库名称, **root** 作为用户的身份,并将 debian 作为数据库的密码。 请小心,你应该输入先前在安装 openQRM 时创建的 mysql root 用户密码。 + +![openQRM Server - Mozilla Firefox_012](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_012.png) + +祝贺你!! openQRM 已经安装并配置好了。 + +![openQRM Server - Mozilla Firefox_013](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_013.png) + +### 更新 openQRM ### + +在任何时候可以使用下面的命令来更新 openQRM: + + cd openqrm/src/ + make update + +到现在为止,我们做的只是在我们的 Ubuntu 服务器中安装和配置 openQRM, 至于 创建、运行虚拟,管理存储,额外的系统集成和运行你自己的私有云等内容,我建议你阅读 [openQRM 管理员指南][3]。 + +就是这些了,欢呼吧!周末快乐! +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-openqrm-cloud-computing-platform-debian/ + +作者:[SK][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://www.openqrm-enterprise.com/products/edition-comparison.html +[2]:http://sourceforge.net/projects/openqrm/files/?source=navbar +[3]:http://www.openqrm-enterprise.com/fileadmin/Documents/Whitepaper/openQRM-Enterprise-Administrator-Guide-5.2.pdf \ No newline at end of file From 1664191a8aa7b3137e1f39eb0756e4e60b2e35b1 Mon Sep 17 00:00:00 2001 From: xiaoyu33 <1136299502@qq.com> Date: Mon, 10 Aug 2015 16:50:55 +0800 Subject: [PATCH 1675/2517] Update 20150810 For Linux, Supercomputers R Us.md add "Translating by xiaoyu33" --- sources/talk/20150810 For Linux, Supercomputers R Us.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150810 For Linux, Supercomputers R Us.md b/sources/talk/20150810 For Linux, Supercomputers R Us.md index 7bc48125f0..8f7302cca1 100644 --- a/sources/talk/20150810 For Linux, Supercomputers R Us.md +++ b/sources/talk/20150810 For Linux, Supercomputers R Us.md @@ -1,3 +1,4 @@ +Translating by xiaoyu33 For Linux, Supercomputers R Us ================================================================================ ![Credit: Michel Ngilen, CC BY 2.0, via Wikimedia Commons](http://images.techhive.com/images/article/2015/08/playstation_3-100602985-primary.idge.jpg) @@ -56,4 +57,4 @@ via: [12]:http://www.google.com/url?q=http%3A%2F%2Fen.intelextrememasters.com%2Fnews%2Fcheck-out-the-intel-extreme-masters-katowice-prize-money-distribution%2F&sa=D&sntz=1&usg=AFQjCNE6yoAGGz-Hpi2tPF4gdhuPBEckhQ [13]:http://www.beowulf.org/overview/history.html [14]:http://yclept.ucdavis.edu/Beowulf/aboutbeowulf.html -[15]:http://www.beowulf.org/ \ No newline at end of file +[15]:http://www.beowulf.org/ From 219731a082612b418fd451207170d39264c3f67e Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 11 Aug 2015 07:34:03 +0800 Subject: [PATCH 1676/2517] Update RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...th Nano and Vim or Analyzing text with grep and regexps.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md b/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md index 1529fecf2e..f3de8528fc 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md @@ -1,3 +1,5 @@ +FSSlc translating + RHCSA Series: Editing Text Files with Nano and Vim / Analyzing text with grep and regexps – Part 4 ================================================================================ Every system administrator has to deal with text files as part of his daily responsibilities. That includes editing existing files (most likely configuration files), or creating new ones. It has been said that if you want to start a holy war in the Linux world, you can ask sysadmins what their favorite text editor is and why. We are not going to do that in this article, but will present a few tips that will be helpful to use two of the most widely used text editors in RHEL 7: nano (due to its simplicity and easiness of use, specially to new users), and vi/m (due to its several features that convert it into more than a simple editor). I am sure that you can find many more reasons to use one or the other, or perhaps some other editor such as emacs or pico. It’s entirely up to you. @@ -251,4 +253,4 @@ via: http://www.tecmint.com/rhcsa-exam-how-to-use-nano-vi-editors/ [2]:http://www.tecmint.com/file-and-directory-management-in-linux/ [3]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ [4]:http://www.nano-editor.org/ -[5]:http://www.vim.org/ \ No newline at end of file +[5]:http://www.vim.org/ From d0f66e61773cc0d995e0f3b64495f965d742e416 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 11 Aug 2015 09:31:21 +0800 Subject: [PATCH 1677/2517] Rename sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md to translated/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md --- ...50730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md (100%) diff --git a/sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md b/translated/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md similarity index 100% rename from sources/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md rename to translated/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md From 83c752ac30a52faf8a0d2b772c2d00180e648f2a Mon Sep 17 00:00:00 2001 From: Ping Date: Mon, 10 Aug 2015 17:27:59 +0800 Subject: [PATCH 1678/2517] Complete 20150518 How to set up a Replica Set on MongoDB.md --- ... How to set up a Replica Set on MongoDB.md | 183 ------------------ ... How to set up a Replica Set on MongoDB.md | 183 ++++++++++++++++++ 2 files changed, 183 insertions(+), 183 deletions(-) delete mode 100644 sources/tech/20150518 How to set up a Replica Set on MongoDB.md create mode 100644 translated/tech/20150518 How to set up a Replica Set on MongoDB.md diff --git a/sources/tech/20150518 How to set up a Replica Set on MongoDB.md b/sources/tech/20150518 How to set up a Replica Set on MongoDB.md deleted file mode 100644 index 83a7da8769..0000000000 --- a/sources/tech/20150518 How to set up a Replica Set on MongoDB.md +++ /dev/null @@ -1,183 +0,0 @@ -Translating by Ping -How to set up a Replica Set on MongoDB -================================================================================ -MongoDB has become the most famous NoSQL database on the market. MongoDB is document-oriented, and its scheme-free design makes it a really attractive solution for all kinds of web applications. One of the features that I like the most is Replica Set, where multiple copies of the same data set are maintained by a group of mongod nodes for redundancy and high availability. - -This tutorial describes how to configure a Replica Set on MonoDB. - -The most common configuration for a Replica Set involves one primary and multiple secondary nodes. The replication will then be initiated from the primary toward the secondaries. Replica Sets can not only provide database protection against unexpected hardware failure and service downtime, but also improve read throughput of database clients as they can be configured to read from different nodes. - -### Set up the Environment ### - -In this tutorial, we are going to set up a Replica Set with one primary and two secondary nodes. - -![](https://farm8.staticflickr.com/7667/17801038505_529a5224a1.jpg) - -In order to implement this lab, we will use three virtual machines (VMs) running on VirtualBox. I am going to install Ubuntu 14.04 on the VMs, and install official packages for Mongodb. - -I am going to set up a necessary environment on one VM instance, and then clone it to the other two VM instances. Thus pick one VM named master, and perform the following installations. - -First, we need to add the MongoDB key for apt: - - $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 - -Then we need to add the official MongoDB repository to our source.list: - - $ sudo su - # echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list - -Let's update repositories and install MongoDB. - - $ sudo apt-get update - $ sudo apt-get install -y mongodb-org - -Now let's make some changes in /etc/mongodb.conf. - - auth = true - dbpath=/var/lib/mongodb - logpath=/var/log/mongodb/mongod.log - logappend=true - keyFile=/var/lib/mongodb/keyFile - replSet=myReplica - -The first line is to make sure that we are going to have authentication on our database. keyFile is to set up a keyfile that is going to be used by MongoDB to replicate between nodes. replSet sets up the name of our replica set. - -Now we are going to create our keyfile, so that it can be in all our instances. - - $ echo -n "MyRandomStringForReplicaSet" | md5sum > keyFile - -This will create keyfile that contains a MD5 string, but it has some noise that we need to clean up before using it in MongoDB. Use the following command to clean it up: - - $ echo -n "MyReplicaSetKey" | md5sum|grep -o "[0-9a-z]\+" > keyFile - -What grep command does is to print MD5 string with no spaces or other characters that we don't want. - -Now we are going to make the keyfile ready for use: - - $ sudo cp keyFile /var/lib/mongodb - $ sudo chown mongodb:nogroup keyFile - $ sudo chmod 400 keyFile - -Now we have our Ubuntu VM ready to be cloned. Power it off, and clone it to the other VMs. - -![](https://farm9.staticflickr.com/8729/17800903865_9876a9cc9c.jpg) - -I name the cloned VMs secondary1 and secondary2. Make sure to reinitialize the MAC address of cloned VMs and clone full disks. - -![](https://farm6.staticflickr.com/5333/17613392900_6de45c9450.jpg) - -All three VM instances should be on the same network to communicate with each other. For this, we are going to attach all three VMs to "Internet Network". - -It is recommended that each VM instances be assigned a static IP address, as opposed to DHCP IP address, so that the VMs will not lose connectivity among themselves when a DHCP server assigns different IP addresses to them. - -Let's edit /etc/networks/interfaces of each VM as follows. - -On primary: - - auto eth1 - iface eth1 inet static - address 192.168.50.2 - netmask 255.255.255.0 - -On secondary1: - - auto eth1 - iface eth1 inet static - address 192.168.50.3 - netmask 255.255.255.0 - -On secondary2: - - auto eth1 - iface eth1 inet static - address 192.168.50.4 - netmask 255.255.255.0 - -Another file that needs to be set up is /etc/hosts, because we don't have DNS. We need to set the hostnames in /etc/hosts. - -On primary: - - 127.0.0.1 localhost primary - 192.168.50.2 primary - 192.168.50.3 secondary1 - 192.168.50.4 secondary2 - -On secondary1: - - 127.0.0.1 localhost secondary1 - 192.168.50.2 primary - 192.168.50.3 secondary1 - 192.168.50.4 secondary2 - -On secondary2: - - 127.0.0.1 localhost secondary2 - 192.168.50.2 primary - 192.168.50.3 secondary1 - 192.168.50.4 secondary2 - -Check connectivity among themselves by using ping command: - - $ ping primary - $ ping secondary1 - $ ping secondary2 - -### Set up a Replica Set ### - -After verifying connectivity among VMs, we can go ahead and create the admin user so that we can start working on the Replica Set. - -On primary node, open /etc/mongodb.conf, and comment out two lines that start with auth and replSet: - - dbpath=/var/lib/mongodb - logpath=/var/log/mongodb/mongod.log - logappend=true - #auth = true - keyFile=/var/lib/mongodb/keyFile - #replSet=myReplica - -Restart mongod daemon. - - $ sudo service mongod restart - -Create an admin user after conencting to MongoDB: - - > use admin - > db.createUser({ - user:"admin", - pwd:" - }) - $ sudo service mongod restart - -Connect to MongoDB and use these commands to add secondary1 and secondary2 to our Replicat Set. - - > use admin - > db.auth("admin","myreallyhardpassword") - > rs.initiate() - > rs.add ("secondary1:27017") - > rs.add("secondary2:27017") - -Now that we have our Replica Set, we can start working on our project. Consult the [official driver documentation][1] to see how to connect to a Replica Set. In case you want to query from shell, you have to connect to primary instance to insert or query the database. Secondary nodes will not let you do that. If you attempt to access the database on a secondary node, you will get this error message: - - myReplica:SECONDARY> - myReplica:SECONDARY> show databases - 2015-05-10T03:09:24.131+0000 E QUERY Error: listDatabases failed:{ "note" : "from execCommand", "ok" : 0, "errmsg" : "not master" } - at Error () - at Mongo.getDBs (src/mongo/shell/mongo.js:47:15) - at shellHelper.show (src/mongo/shell/utils.js:630:33) - at shellHelper (src/mongo/shell/utils.js:524:36) - at (shellhelp2):1:1 at src/mongo/shell/mongo.js:47 - -I hope you find this tutorial useful. You can use Vagrant to automate your local environments and help you code faster. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/setup-replica-set-mongodb.html - -作者:[Christopher Valerio][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/valerio -[1]:http://docs.mongodb.org/ecosystem/drivers/ diff --git a/translated/tech/20150518 How to set up a Replica Set on MongoDB.md b/translated/tech/20150518 How to set up a Replica Set on MongoDB.md new file mode 100644 index 0000000000..44b8535b82 --- /dev/null +++ b/translated/tech/20150518 How to set up a Replica Set on MongoDB.md @@ -0,0 +1,183 @@ +如何配置MongoDB副本集(Replica Set) +================================================================================ +MongoDB已经成为市面上最知名的NoSQL数据库。MongoDB是面向文档的,它的无模式设计使得它在各种各样的WEB应用当中广受欢迎。最让我喜欢的特性之一是它的副本集,副本集将同一数据的多份拷贝放在一组mongod节点上,从而实现数据的冗余以及高可用性。 + +这篇教程将向你介绍如何配置一个MongoDB副本集。 + +副本集的最常见配置涉及到一个主节点以及多个副节点。这之后启动的复制行为会从这个主节点到其他副节点。副本集不止可以针对意外的硬件故障和停机事件对数据库提供保护,同时也因为提供了更多的结点从而提高了数据库客户端数据读取的吞吐量。 + +### 配置环境 ### + +这个教程里,我们会配置一个包括一个主节点以及两个副节点的副本集。 + +![](https://farm8.staticflickr.com/7667/17801038505_529a5224a1.jpg) + +为了达到这个目的,我们使用了3个运行在VirtualBox上的虚拟机。我会在这些虚拟机上安装Ubuntu 14.04,并且安装MongoDB官方包。 + +我会在一个虚拟机实例上配置好需要的环境,然后将它克隆到其他的虚拟机实例上。因此,选择一个名为master的虚拟机,执行以下安装过程。 + +首先,我们需要在apt中增加一个MongoDB密钥: + + $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 + +然后,将官方的MongoDB仓库添加到source.list中: + + $ sudo su + # echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list + +接下来更新apt仓库并且安装MongoDB。 + + $ sudo apt-get update + $ sudo apt-get install -y mongodb-org + +现在对/etc/mongodb.conf做一些更改 + + auth = true + dbpath=/var/lib/mongodb + logpath=/var/log/mongodb/mongod.log + logappend=true + keyFile=/var/lib/mongodb/keyFile + replSet=myReplica + +第一行的作用是确认我们的数据库需要验证才可以使用的。keyfile用来配置用于MongoDB结点间复制行为的密钥文件。replSet用来为副本集设置一个名称。 + +接下来我们创建一个用于所有实例的密钥文件。 + + $ echo -n "MyRandomStringForReplicaSet" | md5sum > keyFile + +这将会创建一个含有MD5字符串的密钥文件,但是由于其中包含了一些噪音,我们需要对他们清理后才能正式在MongoDB中使用。 + + $ echo -n "MyReplicaSetKey" | md5sum|grep -o "[0-9a-z]\+" > keyFile + +grep命令的作用的是把将空格等我们不想要的内容过滤掉之后的MD5字符串打印出来。 + +现在我们对密钥文件进行一些操作,让它真正可用。 + + $ sudo cp keyFile /var/lib/mongodb + $ sudo chown mongodb:nogroup keyFile + $ sudo chmod 400 keyFile + +接下来,关闭此虚拟机。将其Ubuntu系统克隆到其他虚拟机上。 + +![](https://farm9.staticflickr.com/8729/17800903865_9876a9cc9c.jpg) + +这是克隆后的副节点1和副节点2。确认你已经将它们的MAC地址重新初始化,并且克隆整个硬盘。 + +![](https://farm6.staticflickr.com/5333/17613392900_6de45c9450.jpg) + +请注意,三个虚拟机示例需要在同一个网络中以便相互通讯。因此,我们需要它们弄到“互联网"上去。 + +这里推荐给每个虚拟机设置一个静态IP地址,而不是使用DHCP。这样它们就不至于在DHCP分配IP地址给他们的时候失去连接。 + +像下面这样编辑每个虚拟机的/etc/networks/interfaces文件。 + +在主结点上: + + auto eth1 + iface eth1 inet static + address 192.168.50.2 + netmask 255.255.255.0 + +在副结点1上: + + auto eth1 + iface eth1 inet static + address 192.168.50.3 + netmask 255.255.255.0 + +在副结点2上: + + auto eth1 + iface eth1 inet static + address 192.168.50.4 + netmask 255.255.255.0 + +由于我们没有DNS服务,所以需要设置设置一下/etc/hosts这个文件,手工将主机名称放到次文件中。 + +在主结点上: + + 127.0.0.1 localhost primary + 192.168.50.2 primary + 192.168.50.3 secondary1 + 192.168.50.4 secondary2 + +在副结点1上: + + 127.0.0.1 localhost secondary1 + 192.168.50.2 primary + 192.168.50.3 secondary1 + 192.168.50.4 secondary2 + +在副结点2上: + + 127.0.0.1 localhost secondary2 + 192.168.50.2 primary + 192.168.50.3 secondary1 + 192.168.50.4 secondary2 + +使用ping命令检查各个结点之间的连接。 + + $ ping primary + $ ping secondary1 + $ ping secondary2 + +### 配置副本集 ### + +验证各个结点可以正常连通后,我们就可以新建一个管理员用户,用于之后的副本集操作。 + +在主节点上,打开/etc/mongodb.conf文件,将auth和replSet两项注释掉。 + + dbpath=/var/lib/mongodb + logpath=/var/log/mongodb/mongod.log + logappend=true + #auth = true + keyFile=/var/lib/mongodb/keyFile + #replSet=myReplica + +重启mongod进程。 + + $ sudo service mongod restart + +连接MongoDB后,新建管理员用户。 + + > use admin + > db.createUser({ + user:"admin", + pwd:" + }) + $ sudo service mongod restart + +连接到MongoDB,用以下命令将secondary1和secondary2节点添加到我们的副本集中。 + + > use admin + > db.auth("admin","myreallyhardpassword") + > rs.initiate() + > rs.add ("secondary1:27017") + > rs.add("secondary2:27017") + + +现在副本集到手了,可以开始我们的项目了。参照 [official driver documentation][1] 来了解如何连接到副本集。如果你想要用Shell来请求数据,那么你需要连接到主节点上来插入或者请求数据,副节点不行。如果你执意要尝试用附件点操作,那么以下错误信息就蹦出来招呼你了。 + + myReplica:SECONDARY> + myReplica:SECONDARY> show databases + 2015-05-10T03:09:24.131+0000 E QUERY Error: listDatabases failed:{ "note" : "from execCommand", "ok" : 0, "errmsg" : "not master" } + at Error () + at Mongo.getDBs (src/mongo/shell/mongo.js:47:15) + at shellHelper.show (src/mongo/shell/utils.js:630:33) + at shellHelper (src/mongo/shell/utils.js:524:36) + at (shellhelp2):1:1 at src/mongo/shell/mongo.js:47 + +希望这篇教程能对你有所帮助。你可以使用Vagrant来自动完成你的本地环境配置,并且加速你的代码。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/setup-replica-set-mongodb.html + +作者:[Christopher Valerio][a] +译者:[mr-ping](https://github.com/mr-ping) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/valerio +[1]:http://docs.mongodb.org/ecosystem/drivers/ From 5adf534ccbbdb8fc2db27e242835ed78f8ba9220 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 11 Aug 2015 10:13:13 +0800 Subject: [PATCH 1679/2517] Delete translated article --- .../20150806 5 heroes of the Linux world.md | 99 ------------------- 1 file changed, 99 deletions(-) delete mode 100644 sources/talk/20150806 5 heroes of the Linux world.md diff --git a/sources/talk/20150806 5 heroes of the Linux world.md b/sources/talk/20150806 5 heroes of the Linux world.md deleted file mode 100644 index abc42df7f9..0000000000 --- a/sources/talk/20150806 5 heroes of the Linux world.md +++ /dev/null @@ -1,99 +0,0 @@ -Linux世界的五个大神 -================================================================================ -这些人是谁?见或者没见过?谁在每天影响着我们? - -![Image courtesy Christopher Michel/Flickr](http://core0.staticworld.net/images/article/2015/07/penguin-100599348-orig.jpg) -Image courtesy [Christopher Michel/Flickr][1] - -### 野心勃勃的企鹅 ### - -Linux和开源世界一直在被那些热情洋溢的人们推动着,他们开发出最好的软件并将代码向公众开放,所以每个人都能无条件地看到。(对了,有那么一个条件,那就是许可证。) - -那么,这些人是谁?这些Linux世界里的大神们,谁在每天影响着我们?让我来给你一一揭晓。 - -![Image courtesy Swapnil Bhartiya](http://images.techhive.com/images/article/2015/07/swap-klaus-100599357-orig.jpg) -Image courtesy Swapnil Bhartiya - -### Klaus Knopper ### - -Klaus Knopper,一个生活在德国的奥地利开发者,他是Knoppix和Adriana Linux的创始人,为了他失明的妻子开发程序。 - -Knoppix在那些Linux用户心里有着特殊的地位,他们在使用Ubuntu之前都会尝试Knoppix,而Knoppix让人称道的就是它让Live CD的概念普及开来。不像Windows或Mac OS X,你可以通过CD运行整个操作系统而不用再系统上安装任何东西,它允许新用户在他们的机子上快速试用Linux而不用去格式化硬盘。Linux这种实时的特性为它的普及做出了巨大贡献。 - -![Image courtesy Fórum Internacional Software Live/Flickr](http://images.techhive.com/images/article/2015/07/lennart-100599356-orig.jpg) -Image courtesy [Fórum Internacional Software Live/Flickr][2] - -### Lennart Pottering ### - -Lennart Pottering is yet another genius from Germany. He has written so many core components of a Linux (as well as BSD) system that it’s hard to keep track. Most of his work is towards the successors of aging or broken components of the Linux systems. - -Pottering wrote the modern init system systemd, which shook the Linux world and created a [rift in the Debian community][3]. - -While Linus Torvalds has no problems with systemd, and praises it, he is not a huge fan of the way systemd developers (including the co-author Kay Sievers,) respond to bug reports and criticism. At one point Linus said on the LKML (Linux Kernel Mailing List) that he would [never work with Sievers][4]. - -Lennart is also the author of Pulseaudio, sound server on Linux and Avahi, zero-configuration networking (zeroconf) implementation. - -![Image courtesy Meego Com/Flickr](http://images.techhive.com/images/article/2015/07/jim-zemlin-100599362-orig.jpg) -Image courtesy [Meego Com/Flickr][5] - -### Jim Zemlin ### - -Jim Zemlin isn't a developer, but as founder of The Linux Foundation he is certainly one of the most important figures of the Linux world. - -In 2007, The Linux Foundation was formed as a result of merger between two open source bodies: the Free Standards Group and the Open Source Development Labs. Zemlin was the executive director of the Free Standards Group. Post-merger Zemlin became the executive director of The Linux Foundation and has held that position since. - -Under his leadership, The Linux Foundation has become the central figure in the modern IT world and plays a very critical role for the Linux ecosystem. In order to ensure that key developers like Torvalds and Kroah-Hartman can focus on Linux, the foundation sponsors them as fellows. - -Zemlin also made the foundation a bridge between companies so they can collaborate on Linux while at the same time competing in the market. The foundation also organizes many conferences around the world and [offers many courses for Linux developers][6]. - -People may think of Zemlin as Linus Torvalds' boss, but he refers to himself as "Linus Torvalds' janitor." - -![Image courtesy Coscup/Flickr](http://images.techhive.com/images/article/2015/07/greg-kh-100599350-orig.jpg) -Image courtesy [Coscup/Flickr][7] - -### Greg Kroah-Hartman ### - -Greg Kroah-Hartman is known as second-in-command of the Linux kernel. The ‘gentle giant’ is the maintainer of the stable branch of the kernel and of staging subsystem, USB, driver core, debugfs, kref, kobject, and the [sysfs][8] kernel subsystems along with many other components of a Linux system. - -He is also credited for device drivers for Linux. One of his jobs is to travel around the globe, meet hardware makers and persuade them to make their drivers available for Linux. The next time you plug some random USB device to your system and it works out of the box, thank Kroah-Hartman. (Don't thank the distro. Some distros try to take credit for the work Kroah-Hartman or the Linux kernel did.) - -Kroah-Hartman previously worked for Novell and then joined the Linux Foundation as a fellow, alongside Linus Torvalds. - -Kroah-Hartman is the total opposite of Linus and never rants (at least publicly). One time there was some ripple was when he stated that [Canonical doesn’t contribute much to the Linux kernel][9]. - -On a personal level, Kroah-Hartman is extremely helpful to new developers and users and is easily accessible. - -![Image courtesy Swapnil Bhartiya](http://images.techhive.com/images/article/2015/07/linus-swapnil-100599349-orig.jpg) -Image courtesy Swapnil Bhartiya - -### Linus Torvalds ### - -No collection of Linux heroes would be complete without Linus Torvalds. He is the author of the Linux kernel, the most used open source technology on the planet and beyond. His software powers everything from space stations to supercomputers, military drones to mobile devices and tiny smartwatches. Linus remains the authority on the Linux kernel and makes the final decision on which patches to merge to the kernel. - -Linux isn't Torvalds' only contribution open source. When he got fed-up with the existing software revision control systems, which his kernel heavily relied on, he wrote his own, called Git. Git enjoys the same reputation as Linux; it is the most used version control system in the world. - -Torvalds is also a passionate scuba diver and when he found no decent dive logs for Linux, he wrote his own and called it SubSurface. - -Torvalds is [well known for his rants][10] and once admitted that his ego is as big as a small planet. But he is also known for admitting his mistakes if he realizes he was wrong. - --------------------------------------------------------------------------------- - -via: http://www.itworld.com/article/2955001/linux/5-heros-of-the-linux-world.html - -作者:[Swapnil Bhartiya][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.itworld.com/author/Swapnil-Bhartiya/ -[1]:https://flic.kr/p/siJ25M -[2]:https://flic.kr/p/uTzj54 -[3]:http://www.itwire.com/business-it-news/open-source/66153-systemd-fallout-two-debian-technical-panel-members-resign -[4]:http://www.linuxveda.com/2014/04/04/linus-torvalds-systemd-kay-sievers/ -[5]:https://flic.kr/p/9Lnhpu -[6]:http://www.itworld.com/article/2951968/linux/linux-foundation-offers-cheaper-courses-and-certifications-for-india.html -[7]:https://flic.kr/p/hBv8Pp -[8]:https://en.wikipedia.org/wiki/Sysfs -[9]:https://www.youtube.com/watch?v=CyHAeGBFS8k -[10]:http://www.itworld.com/article/2873200/operating-systems/11-technologies-that-tick-off-linus-torvalds.html From 6aa59c9a58eb024b7cda8c6a1d0d8cc9afd66b07 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 11 Aug 2015 10:17:19 +0800 Subject: [PATCH 1680/2517] Delete 20150803 Troubleshooting with Linux Logs.md --- ...0150803 Troubleshooting with Linux Logs.md | 117 ------------------ 1 file changed, 117 deletions(-) delete mode 100644 sources/tech/20150803 Troubleshooting with Linux Logs.md diff --git a/sources/tech/20150803 Troubleshooting with Linux Logs.md b/sources/tech/20150803 Troubleshooting with Linux Logs.md deleted file mode 100644 index 9ee0820a9c..0000000000 --- a/sources/tech/20150803 Troubleshooting with Linux Logs.md +++ /dev/null @@ -1,117 +0,0 @@ -translation by strugglingyouth -Troubleshooting with Linux Logs -================================================================================ -Troubleshooting is the main reason people create logs. Often you’ll want to diagnose why a problem happened with your Linux system or application. An error message or a sequence of events can give you clues to the root cause, indicate how to reproduce the issue, and point out ways to fix it. Here are a few use cases for things you might want to troubleshoot in your logs. - -### Cause of Login Failures ### - -If you want to check if your system is secure, you can check your authentication logs for failed login attempts and unfamiliar successes. Authentication failures occur when someone passes incorrect or otherwise invalid login credentials, often to ssh for remote access or su for local access to another user’s permissions. These are logged by the [pluggable authentication module][1], or pam for short. Look in your logs for strings like Failed password and user unknown. Successful authentication records include strings like Accepted password and session opened. - -Failure Examples: - - pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.0.2.2 - Failed password for invalid user hoover from 10.0.2.2 port 4791 ssh2 - pam_unix(sshd:auth): check pass; user unknown - PAM service(sshd) ignoring max retries; 6 > 3 - -Success Examples: - - Accepted password for hoover from 10.0.2.2 port 4792 ssh2 - pam_unix(sshd:session): session opened for user hoover by (uid=0) - pam_unix(sshd:session): session closed for user hoover - -You can use grep to find which users accounts have the most failed logins. These are the accounts that potential attackers are trying and failing to access. This example is for an Ubuntu system. - - $ grep "invalid user" /var/log/auth.log | cut -d ' ' -f 10 | sort | uniq -c | sort -nr - 23 oracle - 18 postgres - 17 nagios - 10 zabbix - 6 test - -You’ll need to write a different command for each application and message because there is no standard format. Log management systems that automatically parse logs will effectively normalize them and help you extract key fields like username. - -Log management systems can extract the usernames from your Linux logs using automated parsing. This lets you see an overview of the users and filter on them with a single click. In this example, we can see that the root user logged in over 2,700 times because we are filtering the logs to show login attempts only for the root user. - -![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.05.36-AM.png) - -Log management systems also let you view graphs over time to spot unusual trends. If someone had one or two failed logins within a few minutes, it might be that a real user forgot his or her password. However, if there are hundreds of failed logins or they are all different usernames, it’s more likely that someone is trying to attack the system. Here you can see that on March 12, someone tried to login as test and nagios several hundred times. This is clearly not a legitimate use of the system. - -![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.12.18-AM.png) - -### Cause of Reboots ### - -Sometimes a server can stop due to a system crash or reboot. How do you know when it happened and who did it? - -#### Shutdown Command #### - -If someone ran the shutdown command manually, you can see it in the auth log file. Here you can see that someone remotely logged in from the IP 50.0.134.125 as the user ubuntu and then shut the system down. - - Mar 19 18:36:41 ip-172-31-11-231 sshd[23437]: Accepted publickey for ubuntu from 50.0.134.125 port 52538 ssh - Mar 19 18:36:41 ip-172-31-11-231 23437]:sshd[ pam_unix(sshd:session): session opened for user ubuntu by (uid=0) - Mar 19 18:37:09 ip-172-31-11-231 sudo: ubuntu : TTY=pts/1 ; PWD=/home/ubuntu ; USER=root ; COMMAND=/sbin/shutdown -r now - -#### Kernel Initializing #### - -If you want to see when the server restarted regardless of reason (including crashes) you can search logs from the kernel initializing. You’d search for the facility kernel messages and Initializing cpu. - - Mar 19 18:39:30 ip-172-31-11-231 kernel: [ 0.000000] Initializing cgroup subsys cpuset - Mar 19 18:39:30 ip-172-31-11-231 kernel: [ 0.000000] Initializing cgroup subsys cpu - Mar 19 18:39:30 ip-172-31-11-231 kernel: [ 0.000000] Linux version 3.8.0-44-generic (buildd@tipua) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 (Ubuntu 3.8.0-44.66~precise1-generic 3.8.13.25) - -### Detect Memory Problems ### - -There are lots of reasons a server might crash, but one common cause is running out of memory. - -When your system is low on memory, processes are killed, typically in the order of which ones will release the most resources. The error occurs when your system is using all of its memory and a new or existing process attempts to access additional memory. Look in your log files for strings like Out of Memory or for kernel warnings like to kill. These strings indicate that your system intentionally killed the process or application rather than allowing the process to crash. - -Examples: - - [33238.178288] Out of memory: Kill process 6230 (firefox) score 53 or sacrifice child - [29923450.995084] select 5230 (docker), adj 0, size 708, to kill - -You can find these logs using a tool like grep. This example is for Ubuntu: - - $ grep “Out of memory” /var/log/syslog - [33238.178288] Out of memory: Kill process 6230 (firefox) score 53 or sacrifice child - -Keep in mind that grep itself uses memory, so you might cause an out of memory error just by running grep. This is another reason it’s a fabulous idea to centralize your logs! - -### Log Cron Job Errors ### - -The cron daemon is a scheduler that runs processes at specified dates and times. If the process fails to run or fails to finish, then a cron error appears in your log files. You can find these files in /var/log/cron, /var/log/messages, and /var/log/syslog depending on your distribution. There are many reasons a cron job can fail. Usually the problems lie with the process rather than the cron daemon itself. - -By default, cron jobs output through email using Postfix. Here is a log showing that an email was sent. Unfortunately, you cannot see the contents of the message here. - - Mar 13 16:35:01 PSQ110 postfix/pickup[15158]: C3EDC5800B4: uid=1001 from= - Mar 13 16:35:01 PSQ110 postfix/cleanup[15727]: C3EDC5800B4: message-id=<20150310110501.C3EDC5800B4@PSQ110> - Mar 13 16:35:01 PSQ110 postfix/qmgr[15159]: C3EDC5800B4: from=, size=607, nrcpt=1 (queue active) - Mar 13 16:35:05 PSQ110 postfix/smtp[15729]: C3EDC5800B4: to=, relay=gmail-smtp-in.l.google.com[74.125.130.26]:25, delay=4.1, delays=0.26/0/2.2/1.7, dsn=2.0.0, status=sent (250 2.0.0 OK 1425985505 f16si501651pdj.5 - gsmtp) - -You should consider logging the cron standard output to help debug problems. Here is how you can redirect your cron standard output to syslog using the logger command. Replace the echo command with your own script and helloCron with whatever you want to set the appName to. - - */5 * * * * echo ‘Hello World’ 2>&1 | /usr/bin/logger -t helloCron - -Which creates the log entries: - - Apr 28 22:20:01 ip-172-31-11-231 CRON[15296]: (ubuntu) CMD (echo 'Hello World!' 2>&1 | /usr/bin/logger -t helloCron) - Apr 28 22:20:01 ip-172-31-11-231 helloCron: Hello World! - -Each cron job will log differently based on the specific type of job and how it outputs data. Hopefully there are clues to the root cause of problems within the logs, or you can add additional logging as needed. - --------------------------------------------------------------------------------- - -via: http://www.loggly.com/ultimate-guide/logging/troubleshooting-with-linux-logs/ - -作者:[Jason Skowronski][a1] -作者:[Amy Echeverri][a2] -作者:[Sadequl Hussain][a3] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a1]:https://www.linkedin.com/in/jasonskowronski -[a2]:https://www.linkedin.com/in/amyecheverri -[a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 -[1]:http://linux.die.net/man/8/pam.d From 55f5e577c8684ad955e5e189172343a6e316af6d Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 11 Aug 2015 10:18:16 +0800 Subject: [PATCH 1681/2517] Create 20150803 Troubleshooting with Linux Logs.md --- ...0150803 Troubleshooting with Linux Logs.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 translated/tech/20150803 Troubleshooting with Linux Logs.md diff --git a/translated/tech/20150803 Troubleshooting with Linux Logs.md b/translated/tech/20150803 Troubleshooting with Linux Logs.md new file mode 100644 index 0000000000..5950a69d98 --- /dev/null +++ b/translated/tech/20150803 Troubleshooting with Linux Logs.md @@ -0,0 +1,117 @@ +在 Linux 中使用日志来排错 +================================================================================ +人们创建日志的主要原因是排错。通常你会诊断为什么问题发生在你的 Linux 系统或应用程序中。错误信息或一些列事件可以给你提供造成根本原因的线索,说明问题是如何发生的,并指出如何解决它。这里有几个使用日志来解决的样例。 + +### 登录失败原因 ### + +如果你想检查你的系统是否安全,你可以在验证日志中检查登录失败的和登录成功但可疑的用户。当有人通过不正当或无效的凭据来登录时会出现认证失败,经常使用 SSH 进行远程登录或 su 到本地其他用户来进行访问权。这些是由[插入式验证模块][1]来记录,或 PAM 进行短期记录。在你的日志中会看到像 Failed 这样的字符串密码和未知的用户。成功认证记录包括像 Accepted 这样的字符串密码并打开会话。 + +失败的例子: + + pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.0.2.2 + Failed password for invalid user hoover from 10.0.2.2 port 4791 ssh2 + pam_unix(sshd:auth): check pass; user unknown + PAM service(sshd) ignoring max retries; 6 > 3 + +成功的例子: + + Accepted password for hoover from 10.0.2.2 port 4792 ssh2 + pam_unix(sshd:session): session opened for user hoover by (uid=0) + pam_unix(sshd:session): session closed for user hoover + +你可以使用 grep 来查找哪些用户失败登录的次数最多。这些都是潜在的攻击者正在尝试和访问失败的账户。这是一个在 ubuntu 系统上的例子。 + + $ grep "invalid user" /var/log/auth.log | cut -d ' ' -f 10 | sort | uniq -c | sort -nr + 23 oracle + 18 postgres + 17 nagios + 10 zabbix + 6 test + +由于没有标准格式,所以你需要为每个应用程序的日志使用不同的命令。日志管理系统,可以自动分析日志,将它们有效的归类,帮助你提取关键字,如用户名。 + +日志管理系统可以使用自动解析功能从 Linux 日志中提取用户名。这使你可以看到用户的信息,并能单个的筛选。在这个例子中,我们可以看到,root 用户登录了 2700 次,因为我们筛选的日志显示尝试登录的只有 root 用户。 + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.05.36-AM.png) + +日志管理系统也让你以时间为做坐标轴的图标来查看使你更容易发现异常。如果有人在几分钟内登录失败一次或两次,它可能是一个真正的用户而忘记了密码。但是,如果有几百个失败的登录并且使用的都是不同的用户名,它更可能是在试图攻击系统。在这里,你可以看到在3月12日,有人试图登录 Nagios 几百次。这显然​​不是一个合法的系统用户。 + +![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.12.18-AM.png) + +### 重启的原因 ### + + +有时候,一台服务器由于系统崩溃或重启而宕机。你怎么知道它何时发生,是谁做的? + +#### 关机命令 #### + +如果有人手动运行 shutdown 命令,你可以看到它的身份在验证日志文件中。在这里,你可以看到,有人从 IP 50.0.134.125 上作为 ubuntu 的用户远程登录了,然后关闭了系统。 + + Mar 19 18:36:41 ip-172-31-11-231 sshd[23437]: Accepted publickey for ubuntu from 50.0.134.125 port 52538 ssh + Mar 19 18:36:41 ip-172-31-11-231 23437]:sshd[ pam_unix(sshd:session): session opened for user ubuntu by (uid=0) + Mar 19 18:37:09 ip-172-31-11-231 sudo: ubuntu : TTY=pts/1 ; PWD=/home/ubuntu ; USER=root ; COMMAND=/sbin/shutdown -r now + +#### 内核初始化 #### + +如果你想看看服务器重新启动的所有原因(包括崩溃),你可以从内核初始化日志中寻找。你需要搜索内核设施和初始化 cpu 的信息。 + + Mar 19 18:39:30 ip-172-31-11-231 kernel: [ 0.000000] Initializing cgroup subsys cpuset + Mar 19 18:39:30 ip-172-31-11-231 kernel: [ 0.000000] Initializing cgroup subsys cpu + Mar 19 18:39:30 ip-172-31-11-231 kernel: [ 0.000000] Linux version 3.8.0-44-generic (buildd@tipua) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 (Ubuntu 3.8.0-44.66~precise1-generic 3.8.13.25) + +### 检测内存问题 ### + +有很多原因可能导致服务器崩溃,但一个普遍的原因是内存用尽。 + +当你系统的内存不足时,进程会被杀死,通常会杀死使用最多资源的进程。当系统正在使用的内存发生错误并且有新的或现有的进程试图使用更多的内存。在你的日志文件查找像 Out of Memory 这样的字符串,内核也会发出杀死进程的警告。这些信息表明系统故意杀死进程或应用程序,而不是允许进程崩溃。 + +例如: + + [33238.178288] Out of memory: Kill process 6230 (firefox) score 53 or sacrifice child + [29923450.995084] select 5230 (docker), adj 0, size 708, to kill + +你可以使用像 grep 这样的工具找到这些日志。这个例子是在 ubuntu 中: + + $ grep “Out of memory” /var/log/syslog + [33238.178288] Out of memory: Kill process 6230 (firefox) score 53 or sacrifice child + +请记住,grep 也要使用内存,所以导致内存不足的错误可能只是运行的 grep。这是另一个分析日志的独特方法! + +### 定时任务错误日志 ### + +cron 守护程序是一个调度器只在指定的日期和时间运行进程。如果进程运行失败或无法完成,那么 cron 的错误出现在你的日志文件中。你可以找到这些文件在 /var/log/cron,/var/log/messages,和 /var/log/syslog 中,具体取决于你的发行版。cron 任务失败原因有很多。通常情况下,问题出在进程中而不是 cron 守护进程本身。 + +默认情况下,cron 作业会通过电子邮件发送信息。这里是一个日志中记录的发送电子邮件的内容。不幸的是,你不能看到邮件的内容在这里。 + + Mar 13 16:35:01 PSQ110 postfix/pickup[15158]: C3EDC5800B4: uid=1001 from= + Mar 13 16:35:01 PSQ110 postfix/cleanup[15727]: C3EDC5800B4: message-id=<20150310110501.C3EDC5800B4@PSQ110> + Mar 13 16:35:01 PSQ110 postfix/qmgr[15159]: C3EDC5800B4: from=, size=607, nrcpt=1 (queue active) + Mar 13 16:35:05 PSQ110 postfix/smtp[15729]: C3EDC5800B4: to=, relay=gmail-smtp-in.l.google.com[74.125.130.26]:25, delay=4.1, delays=0.26/0/2.2/1.7, dsn=2.0.0, status=sent (250 2.0.0 OK 1425985505 f16si501651pdj.5 - gsmtp) + +你应该想想 cron 在日志中的标准输出以帮助你定位问题。这里展示你可以使用 logger 命令重定向 cron 标准输出到 syslog。用你的脚本来代替 echo 命令,helloCron 可以设置为任何你想要的应用程序的名字。 + + */5 * * * * echo ‘Hello World’ 2>&1 | /usr/bin/logger -t helloCron + +它创建的日志条目: + + Apr 28 22:20:01 ip-172-31-11-231 CRON[15296]: (ubuntu) CMD (echo 'Hello World!' 2>&1 | /usr/bin/logger -t helloCron) + Apr 28 22:20:01 ip-172-31-11-231 helloCron: Hello World! + +每个 cron 作业将根据作业的具体类型以及如何输出数据来记录不同的日志。希望在日志中有问题根源的线索,也可以根据需要添加额外的日志记录。 + +-------------------------------------------------------------------------------- + +via: http://www.loggly.com/ultimate-guide/logging/troubleshooting-with-linux-logs/ + +作者:[Jason Skowronski][a1] +作者:[Amy Echeverri][a2] +作者:[Sadequl Hussain][a3] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a1]:https://www.linkedin.com/in/jasonskowronski +[a2]:https://www.linkedin.com/in/amyecheverri +[a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 +[1]:http://linux.die.net/man/8/pam.d From 1252e6195493dd66bcd0f314379c21c6547c5d7e Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 11 Aug 2015 10:28:42 +0800 Subject: [PATCH 1682/2517] Translating by ZTinoZ --- .../20150806 Installation Guide for Puppet on Ubuntu 15.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md b/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md index ea8fcd6e2e..501cb4a8dc 100644 --- a/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md +++ b/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md @@ -1,3 +1,4 @@ +Translating by ZTinoZ Installation Guide for Puppet on Ubuntu 15.04 ================================================================================ Hi everyone, today in this article we'll learn how to install puppet to manage your server infrastructure running ubuntu 15.04. Puppet is an open source software configuration management tool which is developed and maintained by Puppet Labs that allows us to automate the provisioning, configuration and management of a server infrastructure. Whether we're managing just a few servers or thousands of physical and virtual machines to orchestration and reporting, puppet automates tasks that system administrators often do manually which frees up time and mental space so sysadmins can work on improving other aspects of your overall setup. It ensures consistency, reliability and stability of the automated jobs processed. It facilitates closer collaboration between sysadmins and developers, enabling more efficient delivery of cleaner, better-designed code. Puppet is available in two solutions configuration management and data center automation. They are **puppet open source and puppet enterprise**. Puppet open source is a flexible, customizable solution available under the Apache 2.0 license, designed to help system administrators automate the many repetitive tasks they regularly perform. Whereas puppet enterprise edition is a proven commercial solution for diverse enterprise IT environments which lets us get all the benefits of open source puppet, plus puppet apps, commercial-only enhancements, supported modules and integrations, and the assurance of a fully supported platform. Puppet uses SSL certificates to authenticate communication between master and agent nodes. @@ -426,4 +427,4 @@ via: http://linoxide.com/linux-how-to/install-puppet-ubuntu-15-04/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ -[1]:https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html \ No newline at end of file +[1]:https://docs.puppetlabs.com/puppet/latest/reference/config_file_main.html From e0a4f5017065fd958548f89125c41bad72a7d550 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 11 Aug 2015 10:37:03 +0800 Subject: [PATCH 1683/2517] =?UTF-8?q?20150811-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Install Snort and Usage in Ubuntu 15.04.md | 203 ++++++++++++++++++ ...k files from Google Play Store on Linux.md | 99 +++++++++ 2 files changed, 302 insertions(+) create mode 100644 sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md create mode 100644 sources/tech/20150811 How to download apk files from Google Play Store on Linux.md diff --git a/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md b/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md new file mode 100644 index 0000000000..7bf2438c95 --- /dev/null +++ b/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md @@ -0,0 +1,203 @@ +How to Install Snort and Usage in Ubuntu 15.04 +================================================================================ +Intrusion detection in a network is important for IT security. Intrusion Detection System used for the detection of illegal and malicious attempts in the network. Snort is well-known open source intrusion detection system. Web interface (Snorby) can be used for better analysis of alerts. Snort can be used as an intrusion prevention system with iptables/pf firewall. In this article, we will install and configure an open source IDS system snort. + +### Snort Installation ### + +#### Prerequisite #### + +Data Acquisition library (DAQ) is used by the snort for abstract calls to packet capture libraries. It is available on snort website. Downloading process is shown in the following screenshot. + +![downloading_daq](http://blog.linoxide.com/wp-content/uploads/2015/07/downloading_daq.png) + +Extract it and run ./configure, make and make install commands for DAQ installation. However, DAQ required other tools therefore ./configure script will generate following errors . + +flex and bison error + +![flexandbison_error](http://blog.linoxide.com/wp-content/uploads/2015/07/flexandbison_error.png) + +libpcap error. + +![libpcap error](http://blog.linoxide.com/wp-content/uploads/2015/07/libpcap-error.png) + +Therefore first install flex/bison and libcap before DAQ installation which is shown in the figure. + +![install_flex](http://blog.linoxide.com/wp-content/uploads/2015/07/install_flex.png) + +Installation of libpcap development library is shown below + +![libpcap-dev installation](http://blog.linoxide.com/wp-content/uploads/2015/07/libpcap-dev-installation.png) + +After installation of necessary tools, again run ./configure script which will show following output. + +![without_error_configure](http://blog.linoxide.com/wp-content/uploads/2015/07/without_error_configure.png) + +make and make install commands result is shown in the following screens. + +![make install](http://blog.linoxide.com/wp-content/uploads/2015/07/make-install.png) + +![make](http://blog.linoxide.com/wp-content/uploads/2015/07/make.png) + +After successful installation of DAQ, now we will install snort. Downloading using wget is shown in the below figure. + +![downloading_snort](http://blog.linoxide.com/wp-content/uploads/2015/07/downloading_snort.png) + +Extract compressed package using below given command. + + #tar -xvzf snort-2.9.7.3.tar.gz + +![snort_extraction](http://blog.linoxide.com/wp-content/uploads/2015/07/snort_extraction.png) + +Create installation directory and set prefix parameter in the configure script. It is also recommended to enable sourcefire flag for Packet Performance Monitoring (PPM). + + #mkdir /usr/local/snort + + #./configure --prefix=/usr/local/snort/ --enable-sourcefire + +![snort_installation](http://blog.linoxide.com/wp-content/uploads/2015/07/snort_installation.png) + +Configure script generates error due to missing libpcre-dev , libdumbnet-dev and zlib development libraries. + +error due to missing libpcre library. + +![pcre-error](http://blog.linoxide.com/wp-content/uploads/2015/07/pcre-error.png) + +error due to missing dnet (libdumbnet) library. + +![libdnt error](http://blog.linoxide.com/wp-content/uploads/2015/07/libdnt-error.png) + +configure script generate error due to missing zlib library. + +![zlib error](http://blog.linoxide.com/wp-content/uploads/2015/07/zlib-error.png) + +Installation of all required development libraries is shown in the next screenshots. + + # aptitude install libpcre3-dev + +![libpcre3-dev install](http://blog.linoxide.com/wp-content/uploads/2015/07/libpcre3-dev-install.png) + + # aptitude install libdumbnet-dev + +![libdumnet-dev installation](http://blog.linoxide.com/wp-content/uploads/2015/07/libdumnet-dev-installation.png) + + # aptitude install zlib1g-dev + +![zlibg-dev installation](http://blog.linoxide.com/wp-content/uploads/2015/07/zlibg-dev-installation.png) + +After installation of above required libraries for snort, again run the configure scripts without any error. + +Run make & make install commands for the compilation and installations of snort in /usr/local/snort directory. + + #make + +![make snort](http://blog.linoxide.com/wp-content/uploads/2015/07/make-snort.png) + + #make install + +![make install snort](http://blog.linoxide.com/wp-content/uploads/2015/07/make-install-snort.png) + +Finally snort running from /usr/local/snort/bin directory. Currently it is in promisc mode (packet dump mode) of all traffic on eth0 interface. + +![snort running](http://blog.linoxide.com/wp-content/uploads/2015/07/snort-running.png) + +Traffic dump by the snort interface is shown in following figure. + +![traffic](http://blog.linoxide.com/wp-content/uploads/2015/07/traffic1.png) + +#### Rules and Configuration of Snort #### + +Snort installation from source code required rules and configuration setting therefore now we will copy rules and configuration under /etc/snort directory. We have created single bash scripts for rules and configuration setting. It is used for following snort setting. + +- Creation of snort user for snort IDS service on linux. +- Creation of directories and files under /etc directory for snort configuration. +- Permission setting and copying data from etc directory of snort source code. +- Remove # (comment sign) from rules path in snort.conf file. + + #!/bin/bash##PATH of source code of snort + snort_src="/home/test/Downloads/snort-2.9.7.3" + echo "adding group and user for snort..." + groupadd snort &> /dev/null + useradd snort -r -s /sbin/nologin -d /var/log/snort -c snort_idps -g snort &> /dev/null#snort configuration + echo "Configuring snort..."mkdir -p /etc/snort + mkdir -p /etc/snort/rules + touch /etc/snort/rules/black_list.rules + touch /etc/snort/rules/white_list.rules + touch /etc/snort/rules/local.rules + mkdir /etc/snort/preproc_rules + mkdir /var/log/snort + mkdir -p /usr/local/lib/snort_dynamicrules + chmod -R 775 /etc/snort + chmod -R 775 /var/log/snort + chmod -R 775 /usr/local/lib/snort_dynamicrules + chown -R snort:snort /etc/snort + chown -R snort:snort /var/log/snort + chown -R snort:snort /usr/local/lib/snort_dynamicrules + ###copy configuration and rules from etc directory under source code of snort + echo "copying from snort source to /etc/snort ....." + echo $snort_src + echo "-------------" + cp $snort_src/etc/*.conf* /etc/snort + cp $snort_src/etc/*.map /etc/snort##enable rules + sed -i 's/include \$RULE\_PATH/#include \$RULE\_PATH/' /etc/snort/snort.conf + echo "---DONE---" + +Change the snort source directory in the script and run it. Following output appear in case of success. + +![running script](http://blog.linoxide.com/wp-content/uploads/2015/08/running_script.png) + +Above script copied following files/directories from snort source into /etc/snort configuration file. + +![files copied](http://blog.linoxide.com/wp-content/uploads/2015/08/created.png) + +Snort configuration file is very complex however following necessary changes are required in snort.conf for IDS proper working. + + ipvar HOME_NET 192.168.1.0/24 # LAN side + +---------- + + ipvar EXTERNAL_NET !$HOME_NET # WAN side + +![veriable set](http://blog.linoxide.com/wp-content/uploads/2015/08/12.png) + + var RULE_PATH /etc/snort/rules # snort signature path + var SO_RULE_PATH /etc/snort/so_rules #rules in shared libraries + var PREPROC_RULE_PATH /etc/snort/preproc_rules # Preproces path + var WHITE_LIST_PATH /etc/snort/rules # dont scan + var BLACK_LIST_PATH /etc/snort/rules # Must scan + +![main path](http://blog.linoxide.com/wp-content/uploads/2015/08/rule-path.png) + + include $RULE_PATH/local.rules # file for custom rules + +remove comment sign (#) from other rules such as ftp.rules,exploit.rules etc. + +![path rules](http://blog.linoxide.com/wp-content/uploads/2015/08/path-rules.png) + +Now [Download community][1] rules and extract under /etc/snort/rules directory. Enable community and emerging threats rules in snort.conf file. + +![wget_rules](http://blog.linoxide.com/wp-content/uploads/2015/08/wget_rules.png) + +![community rules](http://blog.linoxide.com/wp-content/uploads/2015/08/community-rules1.png) + +Run following command to test the configuration file after above mentioned changes. + + #snort -T -c /etc/snort/snort.conf + +![snort running](http://blog.linoxide.com/wp-content/uploads/2015/08/snort-final.png) + +### Conclusion ### + +In this article our focus was on the installation and configuration of an open source IDPS system snort on Ubuntu distribution. By default it is used for the monitoring of events however it can con configured inline mode for the protection of network. Snort rules can be tested and analysed in offline mode using pcap capture file. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/security/install-snort-usage-ubuntu-15-04/ + +作者:[nido][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/naveeda/ +[1]:https://www.snort.org/downloads/community/community-rules.tar.gz \ No newline at end of file diff --git a/sources/tech/20150811 How to download apk files from Google Play Store on Linux.md b/sources/tech/20150811 How to download apk files from Google Play Store on Linux.md new file mode 100644 index 0000000000..529e877d7b --- /dev/null +++ b/sources/tech/20150811 How to download apk files from Google Play Store on Linux.md @@ -0,0 +1,99 @@ +How to download apk files from Google Play Store on Linux +================================================================================ +Suppose you want to install an Android app on your Android device. However, for whatever reason, you cannot access Google Play Store on the Android device. What can you do then? One way to install the app without Google Play Store access is to download its APK file using some other means, and then [install the APK][1] file on the Android device manually. + +There are several ways to download official APK files from Google Play Store on non-Android devices such as regular computers and laptops. For example, there are browser plugins (e.g., for [Chrome][2] or [Firefox][3]) or online APK archives that allow you to download APK files using a web browser. If you do not trust these closed-source plugins or third-party APK repositories, there is yet another way to download official APK files manually, and that is via an open-source Linux app called [GooglePlayDownloader][4]. + +GooglePlayDownloader is a Python-based GUI application that enables you to search and download APK files from Google Play Store. Since this is completely open-source, you can be assured while using it. In this tutorial, I am going to show how to download an APK file from Google Play Store using GooglePlayDownloader in Linux environment. + +### Python requirement ### + +GooglePlayDownloader requires Python with SNI (Server Name Indication) support for SSL/TLS communication. This feature comes with Python 2.7.9 or higher. This leaves out older distributions such as Debian 7 Wheezy or earlier, Ubuntu 14.04 or earlier, or CentOS/RHEL 7 or earlier. Assuming that you have a Linux distribution with Python 2.7.9 or higher, proceed to install GooglePlayDownloader as follows. + +### Install GooglePlayDownloader on Ubuntu ### + +On Ubuntu, you can use the official deb build. One catch is that you may need to install one required dependency manually. + +#### On Ubuntu 14.10 #### + +Download [python-ndg-httpsclient][5] deb package, which is a missing dependency on older Ubuntu distributions. Also download GooglePlayDownloader's official deb package. + + $ wget http://mirrors.kernel.org/ubuntu/pool/main/n/ndg-httpsclient/python-ndg-httpsclient_0.3.2-1ubuntu4_all.deb + $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7-1_all.deb + +We are going to use [gdebi command][6] to install those two deb files as follows. The gdebi command will automatically handle any other dependencies. + + $ sudo apt-get install gdebi-core + $ sudo gdebi python-ndg-httpsclient_0.3.2-1ubuntu4_all.deb + $ sudo gdebi googleplaydownloader_1.7-1_all.deb + +#### On Ubuntu 15.04 or later #### + +Recent Ubuntu distributions ship all required dependencies, and thus the installation is straightforward as follows. + + $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7-1_all.deb + $ sudo apt-get install gdebi-core + $ sudo gdebi googleplaydownloader_1.7-1_all.deb + +### Install GooglePlayDownloader on Debian ### + +Due to its Python requirement, GooglePlayDownloader cannot be installed on Debian 7 Wheezy or earlier unless you upgrade its stock Python. + +#### On Debian 8 Jessie and higher: #### + + $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7-1_all.deb + $ sudo apt-get install gdebi-core + $ sudo gdebi googleplaydownloader_1.7-1_all.deb + +### Install GooglePlayDownloader on Fedora ### + +Since GooglePlayDownloader was originally developed for Debian based distributions, you need to install it from the source if you want to use it on Fedora. + +First, install necessary dependencies. + + $ sudo yum install python-pyasn1 wxPython python-ndg_httpsclient protobuf-python python-requests + +Then install it as follows. + + $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7.orig.tar.gz + $ tar -xvf googleplaydownloader_1.7.orig.tar.gz + $ cd googleplaydownloader-1.7 + $ chmod o+r -R . + $ sudo python setup.py install + $ sudo sh -c "echo 'python /usr/lib/python2.7/site-packages/googleplaydownloader-1.7-py2.7.egg/googleplaydownloader/googleplaydownloader.py' > /usr/bin/googleplaydownloader" + +### Download APK Files from Google Play Store with GooglePlayDownloader ### + +Once you installed GooglePlayDownloader, you can download APK files from Google Play Store as follows. + +First launch the app by typing: + + $ googleplaydownloader + +![](https://farm1.staticflickr.com/425/20229024898_105396fa68_b.jpg) + +At the search bar, type the name of the app you want to download from Google Play Store. + +![](https://farm1.staticflickr.com/503/20230360479_925f5da613_b.jpg) + +Once you find the app in the search list, choose the app, and click on "Download selected APK(s)" button. You will find the downloaded APK file in your home directory. Now you can move the APK file to the Android device of your choice, and install it manually. + +Hope this helps. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/download-apk-files-google-play-store.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://xmodulo.com/how-to-install-apk-file-on-android-phone-or-tablet.html +[2]:https://chrome.google.com/webstore/detail/apk-downloader/cgihflhdpokeobcfimliamffejfnmfii +[3]:https://addons.mozilla.org/en-us/firefox/addon/apk-downloader/ +[4]:http://codingteam.net/project/googleplaydownloader +[5]:http://packages.ubuntu.com/vivid/python-ndg-httpsclient +[6]:http://xmodulo.com/how-to-install-deb-file-with-dependencies.html \ No newline at end of file From 4f320ebb4d4b5982e931f6960e3c7fbd41219c2c Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 11 Aug 2015 10:41:56 +0800 Subject: [PATCH 1684/2517] PUB:20150806 Linux FAQs with Answers--How to install git on Linux @mr-ping --- ...Qs with Answers--How to install git on Linux.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) rename {translated/tech => published}/20150806 Linux FAQs with Answers--How to install git on Linux.md (66%) diff --git a/translated/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md b/published/20150806 Linux FAQs with Answers--How to install git on Linux.md similarity index 66% rename from translated/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md rename to published/20150806 Linux FAQs with Answers--How to install git on Linux.md index e6d3f59c71..1d30a02083 100644 --- a/translated/tech/20150806 Linux FAQs with Answers--How to install git on Linux.md +++ b/published/20150806 Linux FAQs with Answers--How to install git on Linux.md @@ -1,15 +1,15 @@ -Linux问答 -- 如何在Linux上安装Git +Linux有问必答:如何在Linux上安装Git ================================================================================ -> **问题:** 我尝试从一个Git公共仓库克隆项目,但出现了这样的错误提示:“git: command not found”。 请问我该如何安装Git? [注明一下是哪个Linux发行版]? +> **问题:** 我尝试从一个Git公共仓库克隆项目,但出现了这样的错误提示:“git: command not found”。 请问我该如何在某某发行版上安装Git? -Git是一个流行的并且开源的版本控制系统(VCS),最初是为Linux环境开发的。跟CVS或者SVN这些版本控制系统不同的是,Git的版本控制被认为是“分布式的”,某种意义上,git的本地工作目录可以作为一个功能完善的仓库来使用,它具备完整的历史记录和版本追踪能力。在这种工作模型之下,各个协作者将内容提交到他们的本地仓库中(与之相对的会直接提交到核心仓库),如果有必要,再有选择性地推送到核心仓库。这就为Git这个版本管理系统带来了大型协作系统所必须的可扩展能力和冗余能力。 +Git是一个流行的开源版本控制系统(VCS),最初是为Linux环境开发的。跟CVS或者SVN这些版本控制系统不同的是,Git的版本控制被认为是“分布式的”,某种意义上,git的本地工作目录可以作为一个功能完善的仓库来使用,它具备完整的历史记录和版本追踪能力。在这种工作模型之下,各个协作者将内容提交到他们的本地仓库中(与之相对的会总是提交到核心仓库),如果有必要,再有选择性地推送到核心仓库。这就为Git这个版本管理系统带来了大型协作系统所必须的可扩展能力和冗余能力。 ![](https://farm1.staticflickr.com/341/19433194168_c79d4570aa_b.jpg) ### 使用包管理器安装Git ### -Git已经被所有的主力Linux发行版所支持。所以安装它最简单的方法就是使用各个Linux发行版的包管理器。 +Git已经被所有的主流Linux发行版所支持。所以安装它最简单的方法就是使用各个Linux发行版的包管理器。 **Debian, Ubuntu, 或 Linux Mint** @@ -18,6 +18,8 @@ Git已经被所有的主力Linux发行版所支持。所以安装它最简单的 **Fedora, CentOS 或 RHEL** $ sudo yum install git + 或 + $ sudo dnf install git **Arch Linux** @@ -33,7 +35,7 @@ Git已经被所有的主力Linux发行版所支持。所以安装它最简单的 ### 从源码安装Git ### -如果由于某些原因,你希望从源码安装Git,安装如下介绍操作。 +如果由于某些原因,你希望从源码安装Git,按照如下介绍操作。 **安装依赖包** @@ -65,7 +67,7 @@ via: http://ask.xmodulo.com/install-git-linux.html 作者:[Dan Nanni][a] 译者:[mr-ping](https://github.com/mr-ping) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 3726bb850331c17fc57933c997ef739b8cfbb9a7 Mon Sep 17 00:00:00 2001 From: XIAOYU <1136299502@qq.com> Date: Tue, 11 Aug 2015 16:45:36 +0800 Subject: [PATCH 1685/2517] translated translated this article --- ...20150810 For Linux, Supercomputers R Us.md | 59 ++++++++++++++++++ ...20150810 For Linux, Supercomputers R Us.md | 60 ------------------- 2 files changed, 59 insertions(+), 60 deletions(-) create mode 100644 published/20150810 For Linux, Supercomputers R Us.md delete mode 100644 sources/talk/20150810 For Linux, Supercomputers R Us.md diff --git a/published/20150810 For Linux, Supercomputers R Us.md b/published/20150810 For Linux, Supercomputers R Us.md new file mode 100644 index 0000000000..ef9b32684c --- /dev/null +++ b/published/20150810 For Linux, Supercomputers R Us.md @@ -0,0 +1,59 @@ +Linux:我们最好用的超级计算机系统 +================================================================================ +![Credit: Michel Ngilen, CC BY 2.0, via Wikimedia Commons](http://images.techhive.com/images/article/2015/08/playstation_3-100602985-primary.idge.jpg) +首图来源:By Michel Ngilen,[ CC BY 2.0 ], via Wikimedia Commons + +> 几乎所有超级计算机上运行的系统都是Linux,其中包括那些由树莓派(Raspberry Pi)板和PlayStation 3游戏机板组成的计算机。 + +超级计算机是很正经的工具,目的是做严肃的计算。它们往往从事于严肃的追求,比如原子弹的模拟,气候模拟和高级物理学。当然,它们也需要大笔资金的投资。在最新的超级计算机[500强][1]排名中,中国国防科大研制的天河2号位居第一。天河2号耗资约3.9亿美元。 + +但是,也有一个超级计算机,是由博伊西州立大学电气和计算机工程系的一名在读博士Joshua Kiepert[用树莓派构建完成][2]的。其创建成本低于2000美元。 + +不,这不是我编造的。这是一个真实的超级计算机,由超频1GHz的[B型树莓派][3]ARM11处理器与VideoCore IV GPU组成。每个都配备了512MB的RAM,一对USB端口和1个10/100 BaseT以太网端口。 + +那么天河2号和博伊西州立大学的超级计算机有什么共同点?它们都运行Linux系统。世界最快的超级计算机[前500强中有486][4]个也同样运行的是Linux系统。这是20多年前就开始的一种覆盖。现在Linux开始建立于廉价的超级计算机。因为Kiepert的机器并不是唯一的预算数字计算机。 + +Gaurav Khanna,麻省大学达特茅斯分校的物理学副教授,创建了一台超级计算机仅用了[不足200的PlayStation3视频游戏机][5]。 + +PlayStation游戏机是由一个3.2 GHz的基于PowerPC的电源处理单元供电。每个都配有512M的RAM。你现在仍然可以花200美元买到一个,尽管索尼将在年底逐步淘汰它们。Khanna仅用16个PlayStation 3s构建了他第一台超级计算机,所以你也可以花费不到4000美元就拥有你自己的超级计算机。 + +这些机器可能是从玩具建成的,但他们不是玩具。Khanna已经用它做了严肃的天体物理学研究。一个白帽子黑客组织使用了类似的[PlayStation 3超级计算机在2008年破解了SSL的MD5哈希算法][6]。 + +两年后,美国空军研究实验室研制的[Condor Cluster,使用了1,760个索尼的PlayStation3的处理器][7]和168个通用的图形处理单元。这个低廉的超级计算机,每秒运行约500TFLOPs,或500万亿次浮点运算。 + +其他的一些便宜且适用于构建家庭超级计算机的构件包括,专业并行处理板比如信用卡大小[99美元的Parallella板][8],以及高端显卡比如[Nvidia的 Titan Z][9] 以及[ AMD的 FirePro W9100][10].这些高端主板市场零售价约3000美元,被一些[英特尔极限大师赛世界锦标赛英雄联盟参赛][11]玩家觊觎能够赢得的梦想的机器,c[传说][12]这项比赛第一名能获得超过10万美元奖金。另一方面,一个人能够独自提供超过2.5TFLOPS,并且他们为科学家和研究人员提供了一个经济的方法,使得他们拥有自己专属的超级计算机。 + +作为Linux的连接,这一切都开始于1994年戈达德航天中心的第一个名为[Beowulf超级计算机][13]。 + +按照我们的标准,Beowulf不能算是最优越的。但在那个时期,作为第一台自制的超级计算机,其16英特尔486DX处理器和10Mbps的以太网总线,是伟大的创举。由[美国航空航天局承包人Don Becker和Thomas Sterling设计的Beowulf][14],是第一个“制造者”超级计算机。它的“计算部件”486DX PCs,成本仅有几千美元。尽管它的速度只有一位数的浮点运算,[Beowulf][15]表明了你可以用商用现货(COTS)硬件和Linux创建超级计算机。 + +我真希望我参与创作了一部分,但是我1994年就离开了戈达德,开始了作为一名全职的科技记者的职业生涯。该死。 + +但是尽管我只是使用笔记本的记者,我依然能够体会到COTS和开源软件是如何永远的改变了超级计算机。我希望现在读这篇文章的你也能。因为,无论是Raspberry Pis集群,还是超过300万英特尔的Ivy Bridge和Xeon Phi芯片的庞然大物,几乎所有当代的超级计算机都可以追溯到Beowulf。 + +-------------------------------------------------------------------------------- + +via: + +作者:[Steven J. Vaughan-Nichols][a] +译者:[xiaoyu33](https://github.com/xiaoyu33) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.computerworld.com/author/Steven-J.-Vaughan_Nichols/ +[1]:http://www.top500.org/ +[2]:http://www.zdnet.com/article/build-your-own-supercomputer-out-of-raspberry-pi-boards/ +[3]:https://www.raspberrypi.org/products/model-b/ +[4]:http://www.zdnet.com/article/linux-still-rules-supercomputing/ +[5]:http://www.nytimes.com/2014/12/23/science/an-economical-way-to-save-progress.html?smid=fb-nytimes&smtyp=cur&bicmp=AD&bicmlukp=WT.mc_id&bicmst=1409232722000&bicmet=1419773522000&_r=4 +[6]:http://www.computerworld.com/article/2529932/cybercrime-hacking/researchers-hack-verisign-s-ssl-scheme-for-securing-web-sites.html +[7]:http://phys.org/news/2010-12-air-playstation-3s-supercomputer.html +[8]:http://www.zdnet.com/article/parallella-the-99-linux-supercomputer/ +[9]:http://blogs.nvidia.com/blog/2014/03/25/titan-z/ +[10]:http://www.amd.com/en-us/press-releases/Pages/amd-flagship-professional-2014apr7.aspx +[11]:http://en.intelextrememasters.com/news/check-out-the-intel-extreme-masters-katowice-prize-money-distribution/ +[12]:http://www.google.com/url?q=http%3A%2F%2Fen.intelextrememasters.com%2Fnews%2Fcheck-out-the-intel-extreme-masters-katowice-prize-money-distribution%2F&sa=D&sntz=1&usg=AFQjCNE6yoAGGz-Hpi2tPF4gdhuPBEckhQ +[13]:http://www.beowulf.org/overview/history.html +[14]:http://yclept.ucdavis.edu/Beowulf/aboutbeowulf.html +[15]:http://www.beowulf.org/ diff --git a/sources/talk/20150810 For Linux, Supercomputers R Us.md b/sources/talk/20150810 For Linux, Supercomputers R Us.md deleted file mode 100644 index 8f7302cca1..0000000000 --- a/sources/talk/20150810 For Linux, Supercomputers R Us.md +++ /dev/null @@ -1,60 +0,0 @@ -Translating by xiaoyu33 -For Linux, Supercomputers R Us -================================================================================ -![Credit: Michel Ngilen, CC BY 2.0, via Wikimedia Commons](http://images.techhive.com/images/article/2015/08/playstation_3-100602985-primary.idge.jpg) -Credit: Michel Ngilen, CC BY 2.0, via Wikimedia Commons - -> Almost all supercomputers run Linux, including the ones built from Raspberry Pi boards and PlayStation 3 game consoles - -Supercomputers are serious things, called on to do serious computing. They tend to be engaged in serious pursuits like atomic bomb simulations, climate modeling and high-level physics. Naturally, they cost serious money. At the very top of the latest [Top500][1] supercomputer ranking is the Tianhe-2 supercomputer at China’s National University of Defense Technology. It cost about $390 million to build. - -But then there’s the supercomputer that Joshua Kiepert, a doctoral student at Boise State’s Electrical and Computer Engineering department, [created with Raspberry Pi computers][2].It cost less than $2,000. - -No, I’m not making that up. It’s an honest-to-goodness supercomputer made from overclocked 1-GHz [Model B Raspberry Pi][3] ARM11 processors with Videocore IV GPUs. Each one comes with 512MB of RAM, a pair of USB ports and a 10/100 BaseT Ethernet port. - -And what do the Tianhe-2 and the Boise State supercomputer have in common? They both run Linux. As do [486 out of the world’s fastest 500 supercomputers][4]. It’s part of a domination of the category that began over 20 years ago. And now it’s trickling down to built-on-the-cheap supercomputers. Because Kiepert’s machine isn’t the only budget number cruncher out there. - -Gaurav Khanna, an associate professor of physics at the University of Massachusetts Dartmouth, created a [supercomputer with something shy of 200 PlayStation 3 video game consoles][5]. - -The PlayStations are powered by a 3.2-GHz PowerPC-based Power Processing Element. Each comes with 512MB of RAM. You can still buy one, although Sony will be phasing them out by year’s end, for just over $200. Khanna started with only 16 PlayStation 3s for his first supercomputer, so you too could put a supercomputer on your credit card for less than four grand. - -These machines may be built from toys, but they’re not playthings. Khanna has done serious astrophysics on his rig. A white-hat hacking group used a similar [PlayStation 3 supercomputer in 2008 to crack the SSL MD5 hashing algorithm][6] in 2008. - -Two years later, the Air Force Research Laboratory [Condor Cluster was using 1,760 Sony PlayStation 3 processors][7] and 168 general-purpose graphical processing units. This bargain-basement supercomputer runs at about 500TFLOPs, or 500 trillion floating point operations per second. - -Other cheap options for home supercomputers include specialist parallel-processing boards such as the [$99 credit-card-sized Parallella board][8], and high-end graphics boards such as [Nvidia’s Titan Z][9] and [AMD’s FirePro W9100][10]. Those high-end boards, coveted by gamers with visions of a dream machine or even a chance at winning the first-place prize of over $100,000 in the [Intel Extreme Masters World Championship League of][11] [Legends][12], cost considerably more, retailing for about $3,000. On the other hand, a single one can deliver over 2.5TFLOPS all by itself, and for scientists and researchers, they offer an affordable way to get a supercomputer they can call their own. - -As for the Linux connection, that all started in 1994 at the Goddard Space Flight Center with the first [Beowulf supercomputer][13]. - -By our standards, there wasn’t much that was super about the first Beowulf. But in its day, the first homemade supercomputer, with its 16 Intel 486DX processors and 10Mbps Ethernet for the bus, was great. [Beowulf, designed by NASA contractors Don Becker and Thomas Sterling][14], was the first “maker” supercomputer. Its “compute components,” 486DX PCs, cost only a few thousand dollars. While its speed was only in single-digit gigaflops, [Beowulf][15] showed you could build supercomputers from commercial off-the-shelf (COTS) hardware and Linux. - -I wish I’d had a part in its creation, but I’d already left Goddard by 1994 for a career as a full-time technology journalist. Darn it! - -But even from this side of my reporter’s notebook, I can still appreciate how COTS and open-source software changed supercomputing forever. I hope you can too. Because, whether it’s a cluster of Raspberry Pis or a monster with over 3 million Intel Ivy Bridge and Xeon Phi chips, almost all of today’s supercomputers trace their ancestry to Beowulf. - --------------------------------------------------------------------------------- - -via: - -作者:[Steven J. Vaughan-Nichols][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.computerworld.com/author/Steven-J.-Vaughan_Nichols/ -[1]:http://www.top500.org/ -[2]:http://www.zdnet.com/article/build-your-own-supercomputer-out-of-raspberry-pi-boards/ -[3]:https://www.raspberrypi.org/products/model-b/ -[4]:http://www.zdnet.com/article/linux-still-rules-supercomputing/ -[5]:http://www.nytimes.com/2014/12/23/science/an-economical-way-to-save-progress.html?smid=fb-nytimes&smtyp=cur&bicmp=AD&bicmlukp=WT.mc_id&bicmst=1409232722000&bicmet=1419773522000&_r=4 -[6]:http://www.computerworld.com/article/2529932/cybercrime-hacking/researchers-hack-verisign-s-ssl-scheme-for-securing-web-sites.html -[7]:http://phys.org/news/2010-12-air-playstation-3s-supercomputer.html -[8]:http://www.zdnet.com/article/parallella-the-99-linux-supercomputer/ -[9]:http://blogs.nvidia.com/blog/2014/03/25/titan-z/ -[10]:http://www.amd.com/en-us/press-releases/Pages/amd-flagship-professional-2014apr7.aspx -[11]:http://en.intelextrememasters.com/news/check-out-the-intel-extreme-masters-katowice-prize-money-distribution/ -[12]:http://www.google.com/url?q=http%3A%2F%2Fen.intelextrememasters.com%2Fnews%2Fcheck-out-the-intel-extreme-masters-katowice-prize-money-distribution%2F&sa=D&sntz=1&usg=AFQjCNE6yoAGGz-Hpi2tPF4gdhuPBEckhQ -[13]:http://www.beowulf.org/overview/history.html -[14]:http://yclept.ucdavis.edu/Beowulf/aboutbeowulf.html -[15]:http://www.beowulf.org/ From 0584a85ed9e385ce4967c0563afe1e586c995144 Mon Sep 17 00:00:00 2001 From: XIAOYU <1136299502@qq.com> Date: Tue, 11 Aug 2015 16:47:43 +0800 Subject: [PATCH 1686/2517] translated translated --- published/20150810 For Linux, Supercomputers R Us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20150810 For Linux, Supercomputers R Us.md b/published/20150810 For Linux, Supercomputers R Us.md index ef9b32684c..e5022a658f 100644 --- a/published/20150810 For Linux, Supercomputers R Us.md +++ b/published/20150810 For Linux, Supercomputers R Us.md @@ -1,4 +1,4 @@ -Linux:我们最好用的超级计算机系统 +Linux:称霸超级计算机系统 ================================================================================ ![Credit: Michel Ngilen, CC BY 2.0, via Wikimedia Commons](http://images.techhive.com/images/article/2015/08/playstation_3-100602985-primary.idge.jpg) 首图来源:By Michel Ngilen,[ CC BY 2.0 ], via Wikimedia Commons From b0b4e31da96977b4d3a15eb0d978e2d06db2df13 Mon Sep 17 00:00:00 2001 From: XIAOYU <1136299502@qq.com> Date: Tue, 11 Aug 2015 16:56:12 +0800 Subject: [PATCH 1687/2517] Rename published/20150810 For Linux, Supercomputers R Us.md to translated/talk/20150810 For Linux, Supercomputers R Us.md --- .../talk}/20150810 For Linux, Supercomputers R Us.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {published => translated/talk}/20150810 For Linux, Supercomputers R Us.md (100%) diff --git a/published/20150810 For Linux, Supercomputers R Us.md b/translated/talk/20150810 For Linux, Supercomputers R Us.md similarity index 100% rename from published/20150810 For Linux, Supercomputers R Us.md rename to translated/talk/20150810 For Linux, Supercomputers R Us.md From b8f075d64a773a10553643568f5dde7b83a4d290 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 11 Aug 2015 20:15:34 +0800 Subject: [PATCH 1688/2517] [Translated]RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md --- ...or Analyzing text with grep and regexps.md | 256 ----------------- ...or Analyzing text with grep and regexps.md | 258 ++++++++++++++++++ 2 files changed, 258 insertions(+), 256 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md b/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md deleted file mode 100644 index f3de8528fc..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md +++ /dev/null @@ -1,256 +0,0 @@ -FSSlc translating - -RHCSA Series: Editing Text Files with Nano and Vim / Analyzing text with grep and regexps – Part 4 -================================================================================ -Every system administrator has to deal with text files as part of his daily responsibilities. That includes editing existing files (most likely configuration files), or creating new ones. It has been said that if you want to start a holy war in the Linux world, you can ask sysadmins what their favorite text editor is and why. We are not going to do that in this article, but will present a few tips that will be helpful to use two of the most widely used text editors in RHEL 7: nano (due to its simplicity and easiness of use, specially to new users), and vi/m (due to its several features that convert it into more than a simple editor). I am sure that you can find many more reasons to use one or the other, or perhaps some other editor such as emacs or pico. It’s entirely up to you. - -![Learn Nano and vi Editors](http://www.tecmint.com/wp-content/uploads/2015/03/Learn-Nano-and-vi-Editors.png) - -RHCSA: Editing Text Files with Nano and Vim – Part 4 - -### Editing Files with Nano Editor ### - -To launch nano, you can either just type nano at the command prompt, optionally followed by a filename (in this case, if the file exists, it will be opened in edition mode). If the file does not exist, or if we omit the filename, nano will also be opened in edition mode but will present a blank screen for us to start typing: - -![Nano Editor](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Editor.png) - -Nano Editor - -As you can see in the previous image, nano displays at the bottom of the screen several functions that are available via the indicated shortcuts (^, aka caret, indicates the Ctrl key). To name a few of them: - -- Ctrl + G: brings up the help menu with a complete list of functions and descriptions:Ctrl + X: exits the current file. If changes have not been saved, they are discarded. -- Ctrl + R: lets you choose a file to insert its contents into the present file by specifying a full path. - -![Nano Editor Help Menu](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Help.png) - -Nano Editor Help Menu - -- Ctrl + O: saves changes made to a file. It will let you save the file with the same name or a different one. Then press Enter to confirm. - -![Nano Editor Save Changes Mode](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Save-Changes.png) - -Nano Editor Save Changes Mode - -- Ctrl + X: exits the current file. If changes have not been saved, they are discarded. -- Ctrl + R: lets you choose a file to insert its contents into the present file by specifying a full path. - -![Nano: Insert File Content to Parent File](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-File-Content.png) - -Nano: Insert File Content to Parent File - -will insert the contents of /etc/passwd into the current file. - -- Ctrl + K: cuts the current line. -- Ctrl + U: paste. -- Ctrl + C: cancels the current operation and places you at the previous screen. - -To easily navigate the opened file, nano provides the following features: - -- Ctrl + F and Ctrl + B move the cursor forward or backward, whereas Ctrl + P and Ctrl + N move it up or down one line at a time, respectively, just like the arrow keys. -- Ctrl + space and Alt + space move the cursor forward and backward one word at a time. - -Finally, - -- Ctrl + _ (underscore) and then entering X,Y will take you precisely to Line X, column Y, if you want to place the cursor at a specific place in the document. - -![Navigate to Line Numbers in Nano](http://www.tecmint.com/wp-content/uploads/2015/03/Column-Numbers.png) - -Navigate to Line Numbers in Nano - -The example above will take you to line 15, column 14 in the current document. - -If you can recall your early Linux days, specially if you came from Windows, you will probably agree that starting off with nano is the best way to go for a new user. - -### Editing Files with Vim Editor ### - -Vim is an improved version of vi, a famous text editor in Linux that is available on all POSIX-compliant *nix systems, such as RHEL 7. If you have the chance and can install vim, go ahead; if not, most (if not all) the tips given in this article should also work. - -One of vim’s distinguishing features is the different modes in which it operates: - - -- Command mode will allow you to browse through the file and enter commands, which are brief and case-sensitive combinations of one or more letters. If you need to repeat one of them a certain number of times, you can prefix it with a number (there are only a few exceptions to this rule). For example, yy (or Y, short for yank) copies the entire current line, whereas 4yy (or 4Y) copies the entire current line along with the next three lines (4 lines in total). -- In ex mode, you can manipulate files (including saving a current file and running outside programs or commands). To enter ex mode, we must type a colon (:) starting from command mode (or in other words, Esc + :), directly followed by the name of the ex-mode command that you want to use. -- In insert mode, which is accessed by typing the letter i, we simply enter text. Most keystrokes result in text appearing on the screen. -- We can always enter command mode (regardless of the mode we’re working on) by pressing the Esc key. - -Let’s see how we can perform the same operations that we outlined for nano in the previous section, but now with vim. Don’t forget to hit the Enter key to confirm the vim command! - -To access vim’s full manual from the command line, type :help while in command mode and then press Enter: - -![vim Edito Help Menu](http://www.tecmint.com/wp-content/uploads/2015/03/vim-Help-Menu.png) - -vim Edito Help Menu - -The upper section presents an index list of contents, with defined sections dedicated to specific topics about vim. To navigate to a section, place the cursor over it and press Ctrl + ] (closing square bracket). Note that the bottom section displays the current file. - -1. To save changes made to a file, run any of the following commands from command mode and it will do the trick: - - :wq! - :x! - ZZ (yes, double Z without the colon at the beginning) - -2. To exit discarding changes, use :q!. This command will also allow you to exit the help menu described above, and return to the current file in command mode. - -3. Cut N number of lines: type Ndd while in command mode. - -4. Copy M number of lines: type Myy while in command mode. - -5. Paste lines that were previously cutted or copied: press the P key while in command mode. - -6. To insert the contents of another file into the current one: - - :r filename - -For example, to insert the contents of `/etc/fstab`, do: - -![Insert Content of File in vi Editor](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-Content-vi-Editor.png) - -Insert Content of File in vi Editor - -7. To insert the output of a command into the current document: - - :r! command - -For example, to insert the date and time in the line below the current position of the cursor: - -![Insert Time an Date in vi Editor](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-Time-and-Date-in-vi-Editor.png) - -Insert Time an Date in vi Editor - -In another article that I wrote for, ([Part 2 of the LFCS series][1]), I explained in greater detail the keyboard shortcuts and functions available in vim. You may want to refer to that tutorial for further examples on how to use this powerful text editor. - -### Analyzing Text with Grep and Regular Expressions ### - -By now you have learned how to create and edit files using nano or vim. Say you become a text editor ninja, so to speak – now what? Among other things, you will also need how to search for regular expressions inside text. - -A regular expression (also known as “regex” or “regexp“) is a way of identifying a text string or pattern so that a program can compare the pattern against arbitrary text strings. Although the use of regular expressions along with grep would deserve an entire article on its own, let us review the basics here: - -**1. The simplest regular expression is an alphanumeric string (i.e., the word “svm”) or two (when two are present, you can use the | (OR) operator):** - - # grep -Ei 'svm|vmx' /proc/cpuinfo - -The presence of either of those two strings indicate that your processor supports virtualization: - -![Regular Expression Example](http://www.tecmint.com/wp-content/uploads/2015/03/Regular-Expression-Example.png) - -Regular Expression Example - -**2. A second kind of a regular expression is a range list, enclosed between square brackets.** - -For example, `c[aeiou]t` matches the strings cat, cet, cit, cot, and cut, whereas `[a-z]` and `[0-9]` match any lowercase letter or decimal digit, respectively. If you want to repeat the regular expression X certain number of times, type `{X}` immediately following the regexp. - -For example, let’s extract the UUIDs of storage devices from `/etc/fstab`: - - # grep -Ei '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o /etc/fstab - -![Extract String from a File in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Extract-String-from-a-File.png) - -Extract String from a File - -The first expression in brackets `[0-9a-f]` is used to denote lowercase hexadecimal characters, and `{8}` is a quantifier that indicates the number of times that the preceding match should be repeated (the first sequence of characters in an UUID is a 8-character long hexadecimal string). - -The parentheses, the `{4}` quantifier, and the hyphen indicate that the next sequence is a 4-character long hexadecimal string, and the quantifier that follows `({3})` denote that the expression should be repeated 3 times. - -Finally, the last sequence of 12-character long hexadecimal string in the UUID is retrieved with `[0-9a-f]{12}`, and the -o option prints only the matched (non-empty) parts of the matching line in /etc/fstab. - -**3. POSIX character classes.** - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Character ClassMatches…
 [[:alnum:]] Any alphanumeric [a-zA-Z0-9] character
 [[:alpha:]] Any alphabetic [a-zA-Z] character
 [[:blank:]] Spaces or tabs
 [[:cntrl:]] Any control characters (ASCII 0 to 32)
 [[:digit:]] Any numeric digits [0-9]
 [[:graph:]] Any visible characters
 [[:lower:]] Any lowercase [a-z] character
 [[:print:]] Any non-control characters
 [[:space:]] Any whitespace
 [[:punct:]] Any punctuation marks
 [[:upper:]] Any uppercase [A-Z] character
 [[:xdigit:]] Any hex digits [0-9a-fA-F]
 [:word:] Any letters, numbers, and underscores [a-zA-Z0-9_]
- -For example, we may be interested in finding out what the used UIDs and GIDs (refer to [Part 2][2] of this series to refresh your memory) are for real users that have been added to our system. Thus, we will search for sequences of 4 digits in /etc/passwd: - - # grep -Ei [[:digit:]]{4} /etc/passwd - -![Search For a String in File](http://www.tecmint.com/wp-content/uploads/2015/03/Search-For-String-in-File.png) - -Search For a String in File - -The above example may not be the best case of use of regular expressions in the real world, but it clearly illustrates how to use POSIX character classes to analyze text along with grep. - -### Conclusion ### - -In this article we have provided some tips to make the most of nano and vim, two text editors for the command-line users. Both tools are supported by extensive documentation, which you can consult in their respective official web sites (links given below) and using the suggestions given in [Part 1][3] of this series. - -#### Reference Links #### - -- [http://www.nano-editor.org/][4] -- [http://www.vim.org/][5] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-exam-how-to-use-nano-vi-editors/ - -作者:[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/vi-editor-usage/ -[2]:http://www.tecmint.com/file-and-directory-management-in-linux/ -[3]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ -[4]:http://www.nano-editor.org/ -[5]:http://www.vim.org/ diff --git a/translated/tech/RHCSA/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md b/translated/tech/RHCSA/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md new file mode 100644 index 0000000000..8438ec0351 --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md @@ -0,0 +1,258 @@ +RHCSA 系列:使用 Nano 和 Vim 编辑文本文件/使用 grep 和 regexps 分析文本 – Part 4 +================================================================================ +作为系统管理员的日常职责的一部分,每个系统管理员都必须处理文本文件,这包括编辑现存文件(大多可能是配置文件),或创建新的文件。有这样一个说法,假如你想在 Linux 世界中挑起一场圣战,你可以询问系统管理员们,什么是他们最喜爱的编辑器以及为什么。在这篇文章中,我们并不打算那样做,但我们将向你呈现一些技巧,这些技巧对使用两款在 RHEL 7 中最为常用的文本编辑器: nano(由于其简单和易用,特别是对于新手来说) 和 vi/m(由于其自身的几个特色使得它不仅仅是一个简单的编辑器)来说都大有裨益。我确信你可以找到更多的理由来使用其中的一个或另一个,或许其他的一些编辑器如 emacs 或 pico。这完全取决于你。 + +![学习 Nano 和 vi 编辑器](http://www.tecmint.com/wp-content/uploads/2015/03/Learn-Nano-and-vi-Editors.png) + +RHCSA: 使用 Nano 和 Vim 编辑文本文件 – Part 4 + +### 使用 Nano 编辑器来编辑文件 ### + +要启动 nano,你可以在命令提示符下输入 `nano`,或选择性地跟上一个文件名(在这种情况下,若文件存在,它将在编辑模式中被打开)。若文件不存在,或我们省略了文件名, nano 也将在 编辑模式下开启,但将为我们开启一个空白屏以便开始输入: + +![Nano 编辑器](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Editor.png) + +Nano 编辑器 + +正如你在上一张图片中所见的那样, nano 在屏幕的底部呈现出一些功能,它们可以通过暗指的快捷键来触发(^,即插入记号,代指 Ctrl 键)。它们中的一些是: + +- Ctrl + G: 触发一个帮助菜单,带有一个关于功能和相应的描述的完整列表; +- Ctrl + X: 离开当前文件,假如更改没有被保存,则它们将被丢弃; +- Ctrl + R: 通过指定一个完整的文件路径,让你选择一个文件来将该文件的内容插入到当前文件中; + +![Nano 编辑器帮助菜单](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Help.png) + +Nano 编辑器帮助菜单 + +- Ctrl + O: 保存更改到一个文件。它将让你用一个与源文件相同或不同的名称来保存该文件,然后按 Enter 键来确认。 + +![Nano 编辑器保存更改模式](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Save-Changes.png) + +Nano 编辑器的保存更改模式 + +- Ctrl + X: 离开当前文件,假如更改没有被保存,则它们将被丢弃; +- Ctrl + R: 通过指定一个完整的文件路径,让你选择一个文件来将该文件的内容插入到当前文件中; + +![Nano: 插入文件内容到主文件中](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-File-Content.png) + +Nano: 插入文件内容到主文件中 + +上图的操作将把 `/etc/passwd` 的内容插入到当前文件中。 + +- Ctrl + K: 剪切当前行; +- Ctrl + U: 粘贴; +- Ctrl + C: 取消当前的操作并返回先前的屏幕; + +为了轻松地在打开的文件中浏览, nano 提供了下面的功能: + +- Ctrl + F 和 Ctrl + B 分别先前或向后移动光标;而 Ctrl + P 和 Ctrl + N 则分别向上或向下移动一行,功能与箭头键相同; +- Ctrl + space 和 Alt + space 分别向前或向后移动一个单词; + +最后, + +- 假如你想将光标移动到文档中的特定位置,使用 Ctrl + _ (下划线) 并接着输入 X,Y 将准确地带你到 第 X 行,第 Y 列。 + +![在 nano 中定位到具体的行,列](http://www.tecmint.com/wp-content/uploads/2015/03/Column-Numbers.png) + +在 nano 中定位到具体的行和列 + +上面的例子将带你到当前文档的第 15 行,第 14 列。 + +假如你可以回忆起你早期的 Linux 岁月,特别是当你刚从 Windows 迁移到 Linux 中,你就可能会同意:对于一个新手来说,使用 nano 来开始学习是最好的方式。 + +### 使用 Vim 编辑器来编辑文件 ### + + +Vim 是 vi 的加强版本,它是 Linux 中一个著名的文本编辑器,可在所有兼容 POSIX 的 *nix 系统中获取到,例如在 RHEL 7 中。假如你有机会并可以安装 Vim,请继续;假如不能,这篇文章中的大多数(若不是全部)的提示也应该可以正常工作。 + +Vim 的一个出众的特点是可以在多个不同的模式中进行操作: + +- 命令模式将允许你在文件中跳转和输入命令,这些命令是由一个或多个字母组成的简洁且对大小写敏感的组合。假如你想重复执行某个命令特定次,你可以在这个命令前加上需要重复的次数(这个规则只有极少数例外)。例如, yy(或 Y,yank 的缩写)可以复制整个当前行,而 4yy(或 4Y)则复制整个当前行到接着的 3 行(总共 4 行)。 +- 在 ex 模式中,你可以操作文件(包括保存当前文件和运行外部的程序或命令)。要进入 ex 模式,你必须在命令模式前(或其他词前,Esc + :)输入一个冒号(:),再直接跟上你想使用的 ex 模式命令的名称。 +- 对于插入模式,可以输入字母 i 进入,我们只需要输入文字即可。大多数的键击结果都将出现在屏幕中的文本中。 +- 我们总是可以通过敲击 Esc 键来进入命令模式(无论我们正工作在哪个模式下)。 + +现在,让我们看看如何在 vim 中执行在上一节列举的针对 nano 的相同的操作。不要忘记敲击 Enter 键来确认 vim 命令。 + +为了从命令行中获取 vim 的完整手册,在命令模式下键入 `:help` 并敲击 Enter 键: + +![vim 编辑器帮助菜单](http://www.tecmint.com/wp-content/uploads/2015/03/vim-Help-Menu.png) + +vim 编辑器帮助菜单 + +上面的小节呈现出一个目录列表,而定义过的小节则主要关注 Vim 的特定话题。要浏览某一个小节,可以将光标放到它的上面,然后按 Ctrl + ] (闭方括号)。注意,底部的小节展示的是当前文件的内容。 + +1. 要保存更改到文件,在命令模式中运行下面命令中的任意一个,就可以达到这个目的: + +``` +:wq! +:x! +ZZ (是的,两个 ZZ,前面无需添加冒号) +``` + +2. 要离开并丢弃更改,使用 `:q!`。这个命令也将允许你离开上面描述过的帮助菜单,并返回到命令模式中的当前文件。 + +3. 剪切 N 行:在命令模式中键入 `Ndd`。 + +4. 复制 M 行:在命令模式中键入 `Myy`。 + +5. 粘贴先前剪贴或复制过的行:在命令模式中按 `P`键。 + +6. 要插入另一个文件的内容到当前文件: + + :r filename + +例如,插入 `/etc/fstab` 的内容,可以这样做: + +[在 vi 编辑器中插入文件的内容](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-Content-vi-Editor.png) + +在 vi 编辑器中插入文件的内容 + +7. 插入一个命名的输出到当前文档: + + :r! command + +例如,要在光标所在的当前位置后面插入日期和时间: + +![在 vi 编辑器中插入时间和日期](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-Time-and-Date-in-vi-Editor.png) + +在 vi 编辑器中插入时间和日期 + +在另一篇我写的文章中,([LFCS 系列的 Part 2][1]),我更加详细地解释了在 vim 中可用的键盘快捷键和功能。或许你可以参考那个教程来查看如何使用这个强大的文本编辑器的更深入的例子。 + +### 使用 Grep 和正则表达式来分析文本 ### + +到现在为止,你已经学习了如何使用 nano 或 vim 创建和编辑文件。打个比方说,假如你成为了一个文本编辑器忍者 – 那又怎样呢? 在其他事情上,你也需要知道如何在文本中搜索正则表达式。 + +正则表达式(也称为 "regex" 或 "regexp") 是一种识别一个特定文本字符串或模式的方式,使得一个程序可以将这个模式和任意的文本字符串相比较。尽管利用 grep 来使用正则表达式值得用一整篇文章来描述,这里就让我们复习一些基本的知识: + +**1. 最简单的正则表达式是一个由数字和字母构成的字符串(即,单词 "svm") 或两个(在使用两个字符串时,你可以使用 `|`(或) 操作符):** + + # grep -Ei 'svm|vmx' /proc/cpuinfo + +上面命令的输出结果中若有这两个字符串之一的出现,则标志着你的处理器支持虚拟化: + +![正则表达式示例](http://www.tecmint.com/wp-content/uploads/2015/03/Regular-Expression-Example.png) + +正则表达式示例 + +**2. 第二种正则表达式是一个范围列表,由方括号包裹。** + +例如, `c[aeiou]t` 匹配字符串 cat,cet,cit,cot 和 cut,而 `[a-z]` 和 `[0-9]` 则相应地匹配小写字母或十进制数字。假如你想重复正则表达式 X 次,在正则表达式的后面立即输入 `{X}`即可。 + +例如,让我们从 `/etc/fstab` 中析出存储设备的 UUID: + + # grep -Ei '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o /etc/fstab + +![在 Linux 中从一个文件中析出字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Extract-String-from-a-File.png) + +从一个文件中析出字符串 + +方括号中的第一个表达式 `[0-9a-f]` 被用来表示小写的十六进制字符,`{8}`是一个量词,暗示前面匹配的字符串应该重复的次数(在一个 UUID 中的开头序列是一个 8 个字符长的十六进制字符串)。 + +在圆括号中,量词 `{4}`和连字符暗示下一个序列是一个 4 个字符长的十六进制字符串,接着的量词 `({3})`表示前面的表达式要重复 3 次。 + +最后,在 UUID 中的最后一个 12 个字符长的十六进制字符串可以由 `[0-9a-f]{12}` 取得, `-o` 选项表示只打印出在 `/etc/fstab`中匹配行中的匹配的(非空)部分。 + +**3. POSIX 字符类 ** + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
字符类匹配 …
 [[:alnum:]] 任意字母或数字 [a-zA-Z0-9]
 [[:alpha:]] 任意字母 [a-zA-Z]
 [[:blank:]] 空格或制表符
 [[:cntrl:]] 任意控制字符 (ASCII 码的 0 至 32)
 [[:digit:]] 任意数字 [0-9]
 [[:graph:]] 任意可见字符
 [[:lower:]] 任意小写字母 [a-z]
 [[:print:]] 任意非控制字符 +
 [[:space:]] 任意空格
 [[:punct:]] 任意标点字符
 [[:upper:]] 任意大写字母 [A-Z]
 [[:xdigit:]] 任意十六进制数字 [0-9a-fA-F]
 [:word:] 任意字母,数字和下划线 [a-zA-Z0-9_]
+ +例如,我们可能会对查找已添加到我们系统中给真实用户的 UID 和 GID(参考这个系列的 [Part 2][2]来回忆起这些知识)感兴趣。那么,我们将在 `/etc/passwd` 文件中查找 4 个字符长的序列: + + # grep -Ei [[:digit:]]{4} /etc/passwd + +![在文件中查找一个字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Search-For-String-in-File.png) + +在文件中查找一个字符串 + +上面的示例可能不是真实世界中使用正则表达式的最好案例,但它清晰地启发了我们如何使用 POSIX 字符类来使用 grep 分析文本。 + +### 总结 ### + + +在这篇文章中,我们已经提供了一些技巧来最大地利用针对命令行用户的两个文本编辑器 nano 和 vim,这两个工具都有相关的扩展文档可供阅读,你可以分别查询它们的官方网站(链接在下面给出)以及使用这个系列中的 [Part 1][3] 给出的建议。 + +#### 参考文件链接 #### + +- [http://www.nano-editor.org/][4] +- [http://www.vim.org/][5] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-how-to-use-nano-vi-editors/ + +作者:[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/vi-editor-usage/ +[2]:http://www.tecmint.com/file-and-directory-management-in-linux/ +[3]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ +[4]:http://www.nano-editor.org/ +[5]:http://www.vim.org/ From 8e789f8324e065ffd379940e6aaf70234213dbcc Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 11 Aug 2015 20:20:36 +0800 Subject: [PATCH 1689/2517] Update 20150811 How to download apk files from Google Play Store on Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...w to download apk files from Google Play Store on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150811 How to download apk files from Google Play Store on Linux.md b/sources/tech/20150811 How to download apk files from Google Play Store on Linux.md index 529e877d7b..50bf618e86 100644 --- a/sources/tech/20150811 How to download apk files from Google Play Store on Linux.md +++ b/sources/tech/20150811 How to download apk files from Google Play Store on Linux.md @@ -1,3 +1,5 @@ +FSSlc translating + How to download apk files from Google Play Store on Linux ================================================================================ Suppose you want to install an Android app on your Android device. However, for whatever reason, you cannot access Google Play Store on the Android device. What can you do then? One way to install the app without Google Play Store access is to download its APK file using some other means, and then [install the APK][1] file on the Android device manually. @@ -96,4 +98,4 @@ via: http://xmodulo.com/download-apk-files-google-play-store.html [3]:https://addons.mozilla.org/en-us/firefox/addon/apk-downloader/ [4]:http://codingteam.net/project/googleplaydownloader [5]:http://packages.ubuntu.com/vivid/python-ndg-httpsclient -[6]:http://xmodulo.com/how-to-install-deb-file-with-dependencies.html \ No newline at end of file +[6]:http://xmodulo.com/how-to-install-deb-file-with-dependencies.html From e0f43461b533db0e4444eb78cc24e749d8209713 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 11 Aug 2015 22:28:25 +0800 Subject: [PATCH 1690/2517] PUB:20150810 For Linux, Supercomputers R Us @xiaoyu33 --- ...20150810 For Linux, Supercomputers R Us.md | 61 +++++++++++++++++++ ...20150810 For Linux, Supercomputers R Us.md | 59 ------------------ 2 files changed, 61 insertions(+), 59 deletions(-) create mode 100644 published/20150810 For Linux, Supercomputers R Us.md delete mode 100644 translated/talk/20150810 For Linux, Supercomputers R Us.md diff --git a/published/20150810 For Linux, Supercomputers R Us.md b/published/20150810 For Linux, Supercomputers R Us.md new file mode 100644 index 0000000000..e173d7513c --- /dev/null +++ b/published/20150810 For Linux, Supercomputers R Us.md @@ -0,0 +1,61 @@ +Linux:称霸超级计算机系统 +================================================================================ + +> 几乎所有超级计算机上运行的系统都是 Linux,其中包括那些由树莓派(Raspberry Pi)板卡和 PlayStation 3游戏机组成的计算机。 + +![Credit: Michel Ngilen, CC BY 2.0, via Wikimedia Commons](http://images.techhive.com/images/article/2015/08/playstation_3-100602985-primary.idge.jpg) + +*题图来源:By Michel Ngilen,[ CC BY 2.0 ], via Wikimedia Commons* + +超级计算机是一种严肃的工具,做的都是高大上的计算。它们往往从事于严肃的用途,比如原子弹模拟、气候模拟和高等物理学。当然,它们的花费也很高大上。在最新的超级计算机 [Top500][1] 排名中,中国国防科技大学研制的天河 2 号位居第一,而天河 2 号的建造耗资约 3.9 亿美元! + +但是,也有一个超级计算机,是由博伊西州立大学电气和计算机工程系的一名在读博士 Joshua Kiepert [用树莓派构建完成][2]的,其建造成本低于2000美元。 + +不,这不是我编造的。它一个真实的超级计算机,由超频到 1GHz 的 [B 型树莓派][3]的 ARM11 处理器与 VideoCore IV GPU 组成。每个都配备了 512MB 的内存、一对 USB 端口和 1 个 10/100 BaseT 以太网端口。 + +那么天河 2 号和博伊西州立大学的超级计算机有什么共同点吗?它们都运行 Linux 系统。世界最快的超级计算机[前 500 强中有 486][4] 个也同样运行的是 Linux 系统。这是从 20 多年前就开始的格局。而现在的趋势是超级计算机开始由廉价单元组成,因为 Kiepert 的机器并不是唯一一个无所谓预算的超级计算机。 + +麻省大学达特茅斯分校的物理学副教授 Gaurav Khanna 创建了一台超级计算机仅用了[不足 200 台的 PlayStation3 视频游戏机][5]。 + +PlayStation 游戏机由一个 3.2 GHz 的基于 PowerPC 的 Power 处理器所驱动。每个都配有 512M 的内存。你现在仍然可以花 200 美元买到一个,尽管索尼将在年底逐步淘汰它们。Khanna 仅用了 16 个 PlayStation 3 构建了他第一台超级计算机,所以你也可以花费不到 4000 美元就拥有你自己的超级计算机。 + +这些机器可能是用玩具建成的,但他们不是玩具。Khanna 已经用它做了严肃的天体物理学研究。一个白帽子黑客组织使用了类似的 [PlayStation 3 超级计算机在 2008 年破解了 SSL 的 MD5 哈希算法][6]。 + +两年后,美国空军研究实验室研制的 [Condor Cluster,使用了 1760 个索尼的 PlayStation 3 的处理器][7]和168 个通用的图形处理单元。这个低廉的超级计算机,每秒运行约 500 TFLOP ,即每秒可进行 500 万亿次浮点运算。 + +其他的一些便宜且适用于构建家庭超级计算机的构件包括,专业并行处理板卡,比如信用卡大小的 [99 美元的 Parallella 板卡][8],以及高端显卡,比如 [Nvidia 的 Titan Z][9] 和 [ AMD 的 FirePro W9100][10]。这些高端板卡的市场零售价约 3000 美元,一些想要一台梦幻般的机器的玩家为此参加了[英特尔极限大师赛:英雄联盟世界锦标赛][11],要是甚至有机会得到了第一名的话,能获得超过 10 万美元奖金。另一方面,一个能够自己提供超过 2.5TFLOPS 计算能力的计算机,对于科学家和研究人员来说,这为他们提供了一个可以拥有自己专属的超级计算机的经济的方法。 + +而超级计算机与 Linux 的连接,这一切都始于 1994 年戈达德航天中心的第一个名为 [Beowulf 超级计算机][13]。 + +按照我们的标准,Beowulf 不能算是最优越的。但在那个时期,作为第一台自制的超级计算机,它的 16 个英特尔486DX 处理器和 10Mbps 的以太网总线,是个伟大的创举。[Beowulf 是由美国航空航天局的承建商 Don Becker 和 Thomas Sterling 所设计的][14],是第一台“创客”超级计算机。它的“计算部件” 486DX PC,成本仅有几千美元。尽管它的速度只有个位数的 GFLOPS (吉拍,每秒10亿次)浮点运算,[Beowulf][15] 表明了你可以用商用现货(COTS)硬件和 Linux 创建超级计算机。 + +我真希望我参与创建了一部分,但是我 1994 年就离开了戈达德,开始了作为一名全职的科技记者的职业生涯。该死。 + +但是尽管我只是使用笔记本的记者,我依然能够体会到 COTS 和开源软件是如何永远的改变了超级计算机。我希望现在读这篇文章的你也能。因为,无论是 Raspberry Pi 集群,还是超过 300 万个英特尔的 Ivy Bridge 和 Xeon Phi 芯片的庞然大物,几乎所有当代的超级计算机都可以追溯到 Beowulf。 + +-------------------------------------------------------------------------------- + +via: http://www.computerworld.com/article/2960701/linux/for-linux-supercomputers-r-us.html + +作者:[Steven J. Vaughan-Nichols][a] +译者:[xiaoyu33](https://github.com/xiaoyu33) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.computerworld.com/author/Steven-J.-Vaughan_Nichols/ +[1]:http://www.top500.org/ +[2]:http://www.zdnet.com/article/build-your-own-supercomputer-out-of-raspberry-pi-boards/ +[3]:https://www.raspberrypi.org/products/model-b/ +[4]:http://www.zdnet.com/article/linux-still-rules-supercomputing/ +[5]:http://www.nytimes.com/2014/12/23/science/an-economical-way-to-save-progress.html?smid=fb-nytimes&smtyp=cur&bicmp=AD&bicmlukp=WT.mc_id&bicmst=1409232722000&bicmet=1419773522000&_r=4 +[6]:http://www.computerworld.com/article/2529932/cybercrime-hacking/researchers-hack-verisign-s-ssl-scheme-for-securing-web-sites.html +[7]:http://phys.org/news/2010-12-air-playstation-3s-supercomputer.html +[8]:http://www.zdnet.com/article/parallella-the-99-linux-supercomputer/ +[9]:http://blogs.nvidia.com/blog/2014/03/25/titan-z/ +[10]:http://www.amd.com/en-us/press-releases/Pages/amd-flagship-professional-2014apr7.aspx +[11]:http://en.intelextrememasters.com/news/check-out-the-intel-extreme-masters-katowice-prize-money-distribution/ + +[13]:http://www.beowulf.org/overview/history.html +[14]:http://yclept.ucdavis.edu/Beowulf/aboutbeowulf.html +[15]:http://www.beowulf.org/ diff --git a/translated/talk/20150810 For Linux, Supercomputers R Us.md b/translated/talk/20150810 For Linux, Supercomputers R Us.md deleted file mode 100644 index e5022a658f..0000000000 --- a/translated/talk/20150810 For Linux, Supercomputers R Us.md +++ /dev/null @@ -1,59 +0,0 @@ -Linux:称霸超级计算机系统 -================================================================================ -![Credit: Michel Ngilen, CC BY 2.0, via Wikimedia Commons](http://images.techhive.com/images/article/2015/08/playstation_3-100602985-primary.idge.jpg) -首图来源:By Michel Ngilen,[ CC BY 2.0 ], via Wikimedia Commons - -> 几乎所有超级计算机上运行的系统都是Linux,其中包括那些由树莓派(Raspberry Pi)板和PlayStation 3游戏机板组成的计算机。 - -超级计算机是很正经的工具,目的是做严肃的计算。它们往往从事于严肃的追求,比如原子弹的模拟,气候模拟和高级物理学。当然,它们也需要大笔资金的投资。在最新的超级计算机[500强][1]排名中,中国国防科大研制的天河2号位居第一。天河2号耗资约3.9亿美元。 - -但是,也有一个超级计算机,是由博伊西州立大学电气和计算机工程系的一名在读博士Joshua Kiepert[用树莓派构建完成][2]的。其创建成本低于2000美元。 - -不,这不是我编造的。这是一个真实的超级计算机,由超频1GHz的[B型树莓派][3]ARM11处理器与VideoCore IV GPU组成。每个都配备了512MB的RAM,一对USB端口和1个10/100 BaseT以太网端口。 - -那么天河2号和博伊西州立大学的超级计算机有什么共同点?它们都运行Linux系统。世界最快的超级计算机[前500强中有486][4]个也同样运行的是Linux系统。这是20多年前就开始的一种覆盖。现在Linux开始建立于廉价的超级计算机。因为Kiepert的机器并不是唯一的预算数字计算机。 - -Gaurav Khanna,麻省大学达特茅斯分校的物理学副教授,创建了一台超级计算机仅用了[不足200的PlayStation3视频游戏机][5]。 - -PlayStation游戏机是由一个3.2 GHz的基于PowerPC的电源处理单元供电。每个都配有512M的RAM。你现在仍然可以花200美元买到一个,尽管索尼将在年底逐步淘汰它们。Khanna仅用16个PlayStation 3s构建了他第一台超级计算机,所以你也可以花费不到4000美元就拥有你自己的超级计算机。 - -这些机器可能是从玩具建成的,但他们不是玩具。Khanna已经用它做了严肃的天体物理学研究。一个白帽子黑客组织使用了类似的[PlayStation 3超级计算机在2008年破解了SSL的MD5哈希算法][6]。 - -两年后,美国空军研究实验室研制的[Condor Cluster,使用了1,760个索尼的PlayStation3的处理器][7]和168个通用的图形处理单元。这个低廉的超级计算机,每秒运行约500TFLOPs,或500万亿次浮点运算。 - -其他的一些便宜且适用于构建家庭超级计算机的构件包括,专业并行处理板比如信用卡大小[99美元的Parallella板][8],以及高端显卡比如[Nvidia的 Titan Z][9] 以及[ AMD的 FirePro W9100][10].这些高端主板市场零售价约3000美元,被一些[英特尔极限大师赛世界锦标赛英雄联盟参赛][11]玩家觊觎能够赢得的梦想的机器,c[传说][12]这项比赛第一名能获得超过10万美元奖金。另一方面,一个人能够独自提供超过2.5TFLOPS,并且他们为科学家和研究人员提供了一个经济的方法,使得他们拥有自己专属的超级计算机。 - -作为Linux的连接,这一切都开始于1994年戈达德航天中心的第一个名为[Beowulf超级计算机][13]。 - -按照我们的标准,Beowulf不能算是最优越的。但在那个时期,作为第一台自制的超级计算机,其16英特尔486DX处理器和10Mbps的以太网总线,是伟大的创举。由[美国航空航天局承包人Don Becker和Thomas Sterling设计的Beowulf][14],是第一个“制造者”超级计算机。它的“计算部件”486DX PCs,成本仅有几千美元。尽管它的速度只有一位数的浮点运算,[Beowulf][15]表明了你可以用商用现货(COTS)硬件和Linux创建超级计算机。 - -我真希望我参与创作了一部分,但是我1994年就离开了戈达德,开始了作为一名全职的科技记者的职业生涯。该死。 - -但是尽管我只是使用笔记本的记者,我依然能够体会到COTS和开源软件是如何永远的改变了超级计算机。我希望现在读这篇文章的你也能。因为,无论是Raspberry Pis集群,还是超过300万英特尔的Ivy Bridge和Xeon Phi芯片的庞然大物,几乎所有当代的超级计算机都可以追溯到Beowulf。 - --------------------------------------------------------------------------------- - -via: - -作者:[Steven J. Vaughan-Nichols][a] -译者:[xiaoyu33](https://github.com/xiaoyu33) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.computerworld.com/author/Steven-J.-Vaughan_Nichols/ -[1]:http://www.top500.org/ -[2]:http://www.zdnet.com/article/build-your-own-supercomputer-out-of-raspberry-pi-boards/ -[3]:https://www.raspberrypi.org/products/model-b/ -[4]:http://www.zdnet.com/article/linux-still-rules-supercomputing/ -[5]:http://www.nytimes.com/2014/12/23/science/an-economical-way-to-save-progress.html?smid=fb-nytimes&smtyp=cur&bicmp=AD&bicmlukp=WT.mc_id&bicmst=1409232722000&bicmet=1419773522000&_r=4 -[6]:http://www.computerworld.com/article/2529932/cybercrime-hacking/researchers-hack-verisign-s-ssl-scheme-for-securing-web-sites.html -[7]:http://phys.org/news/2010-12-air-playstation-3s-supercomputer.html -[8]:http://www.zdnet.com/article/parallella-the-99-linux-supercomputer/ -[9]:http://blogs.nvidia.com/blog/2014/03/25/titan-z/ -[10]:http://www.amd.com/en-us/press-releases/Pages/amd-flagship-professional-2014apr7.aspx -[11]:http://en.intelextrememasters.com/news/check-out-the-intel-extreme-masters-katowice-prize-money-distribution/ -[12]:http://www.google.com/url?q=http%3A%2F%2Fen.intelextrememasters.com%2Fnews%2Fcheck-out-the-intel-extreme-masters-katowice-prize-money-distribution%2F&sa=D&sntz=1&usg=AFQjCNE6yoAGGz-Hpi2tPF4gdhuPBEckhQ -[13]:http://www.beowulf.org/overview/history.html -[14]:http://yclept.ucdavis.edu/Beowulf/aboutbeowulf.html -[15]:http://www.beowulf.org/ From cc16c9074da3fd5406449f3e7cadbfd39998790c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 11 Aug 2015 23:13:10 +0800 Subject: [PATCH 1691/2517] =?UTF-8?q?20150811-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...k Traffic Analyzer--Install it on Linux.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md diff --git a/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md b/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md new file mode 100644 index 0000000000..9f78722cb6 --- /dev/null +++ b/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md @@ -0,0 +1,62 @@ +Darkstat is a Web Based Network Traffic Analyzer – Install it on Linux +================================================================================ +Darkstat is a simple, web based network traffic analyzer application. It works on many popular operating systems like Linux, Solaris, Mac and AIX. It keeps running in the background as a daemon and continues collecting and sniffing network data and presents it in easily understandable format within its web interface. It can generate traffic reports for hosts, identify which ports are open on some particular host and is IPV 6 complaint application. Let’s see how we can install and configure it on Linux operating system. + +### Installing Darkstat on Linux ### + +**Install Darkstat on Fedora/CentOS/RHEL:** + +In order to install it on Fedora/RHEL and CentOS Linux distributions, run following command on the terminal. + + sudo yum install darkstat + +**Install Darkstat on Ubuntu/Debian:** + +Run following on the terminal to install it on Ubuntu and Debian. + + sudo apt-get install darkstat + +Congratulations, Darkstat has been installed on your Linux system now. + +### Configuring Darkstat ### + +In order to run this application properly, we need to perform some basic configurations. Edit /etc/darkstat/init.cfg file in Gedit text editor by running the following command on the terminal. + + sudo gedit /etc/darkstat/init.cfg + +![](http://linuxpitstop.com/wp-content/uploads/2015/08/13.png) +Edit Darkstat + +Change START_DARKSTAT parameter to “yes” and provide your network interface in “INTERFACE”. Make sure to uncomment DIR, PORT, BINDIP, and LOCAL parameters here. If you wish to bind the web interface for Darkstat to some specific IP, provide it in BINDIP section. + +### Starting Darkstat Daemon ### + +Once the installation and configuration for Darkstat is complete, run following command to start its daemon. + + sudo /etc/init.d/darkstat start + +![Restarting Darkstat](http://linuxpitstop.com/wp-content/uploads/2015/08/23.png) + +You can configure Darkstat to start on system boot by running the following command: + + chkconfig darkstat on + +Launch your browser and load **http://localhost:666** and it will display the web based graphical interface for Darkstat. Start using this tool to analyze your network traffic. + +![Darkstat](http://linuxpitstop.com/wp-content/uploads/2015/08/32.png) + +### Conclusion ### + +It is a lightweight tool with very low memory footprints. The key reason for the popularity of this tool is simplicity, ease of configuration and usage. It is a must-have application for System and Network Administrators. + +-------------------------------------------------------------------------------- + +via: http://linuxpitstop.com/install-darkstat-on-ubuntu-linux/ + +作者:[Aun][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linuxpitstop.com/author/aun/ \ No newline at end of file From accf7e54ceb2f72f33d9db5b6ce3e35fe1a3e9f3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 11 Aug 2015 23:24:39 +0800 Subject: [PATCH 1692/2517] =?UTF-8?q?20150811-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ind and Delete Duplicate Files in Linux.md | 265 ++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 sources/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md diff --git a/sources/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md b/sources/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md new file mode 100644 index 0000000000..f89f060c92 --- /dev/null +++ b/sources/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md @@ -0,0 +1,265 @@ +fdupes – A Comamndline Tool to Find and Delete Duplicate Files in Linux +================================================================================ +It is a common requirement to find and replace duplicate files for most of the computer users. Finding and removing duplicate files is a tiresome job that demands time and patience. Finding duplicate files can be very easy if your machine is powered by GNU/Linux, thanks to ‘**fdupes**‘ utility. + +![Find and Delete Duplicate Files in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/find-and-delete-duplicate-files-in-linux.png) + +Fdupes – Find and Delete Duplicate Files in Linux + +### What is fdupes? ### + +**Fdupes** is a Linux utility written by **Adrian Lopez** in C programming Language released under MIT License. The application is able to find duplicate files in the given set of directories and sub-directories. Fdupes recognize duplicates by comparing MD5 signature of files followed by a byte-to-byte comparison. A lots of options can be passed with Fdupes to list, delete and replace the files with hardlinks to duplicates. + +The comparison starts in the order: + +**size comparison > Partial MD5 Signature Comparison > Full MD5 Signature Comparison > Byte-to-Byte Comparison.** + +### Install fdupes on a Linux ### + +Installation of latest version of fdupes (fdupes version 1.51) as easy as running following command on **Debian** based systems such as **Ubuntu** and **Linux Mint**. + + $ sudo apt-get install fdupes + +On CentOS/RHEL and Fedora based systems, you need to turn on [epel repository][1] to install fdupes package. + + # yum install fdupes + # dnf install fdupes [On Fedora 22 onwards] + +**Note**: The default package manager yum is replaced by dnf from Fedora 22 onwards… + +### How to use fdupes command? ### + +1. For demonstration purpose, let’s a create few duplicate files under a directory (say tecmint) simply as: + + $ mkdir /home/"$USER"/Desktop/tecmint && cd /home/"$USER"/Desktop/tecmint && for i in {1..15}; do echo "I Love Tecmint. Tecmint is a very nice community of Linux Users." > tecmint${i}.txt ; done + +After running above command, let’s verify the duplicates files are created or not using ls [command][2]. + + $ ls -l + + total 60 + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint10.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint11.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint12.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint13.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint14.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint15.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint1.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint2.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint3.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint4.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint5.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint6.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint7.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint8.txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint9.txt + +The above script create **15** files namely tecmint1.txt, tecmint2.txt…tecmint15.txt and every files contains the same data i.e., + + "I Love Tecmint. Tecmint is a very nice community of Linux Users." + +2. Now search for duplicate files within the folder **tecmint**. + + $ fdupes /home/$USER/Desktop/tecmint + + /home/tecmint/Desktop/tecmint/tecmint13.txt + /home/tecmint/Desktop/tecmint/tecmint8.txt + /home/tecmint/Desktop/tecmint/tecmint11.txt + /home/tecmint/Desktop/tecmint/tecmint3.txt + /home/tecmint/Desktop/tecmint/tecmint4.txt + /home/tecmint/Desktop/tecmint/tecmint6.txt + /home/tecmint/Desktop/tecmint/tecmint7.txt + /home/tecmint/Desktop/tecmint/tecmint9.txt + /home/tecmint/Desktop/tecmint/tecmint10.txt + /home/tecmint/Desktop/tecmint/tecmint2.txt + /home/tecmint/Desktop/tecmint/tecmint5.txt + /home/tecmint/Desktop/tecmint/tecmint14.txt + /home/tecmint/Desktop/tecmint/tecmint1.txt + /home/tecmint/Desktop/tecmint/tecmint15.txt + /home/tecmint/Desktop/tecmint/tecmint12.txt + +3. Search for duplicates recursively under every directory including it’s sub-directories using the **-r** option. + +It search across all the files and folder recursively, depending upon the number of files and folders it will take some time to scan duplicates. In that mean time, you will be presented with the total progress in terminal, something like this. + + $ fdupes -r /home + + Progress [37780/54747] 69% + +4. See the size of duplicates found within a folder using the **-S** option. + + $ fdupes -S /home/$USER/Desktop/tecmint + + 65 bytes each: + /home/tecmint/Desktop/tecmint/tecmint13.txt + /home/tecmint/Desktop/tecmint/tecmint8.txt + /home/tecmint/Desktop/tecmint/tecmint11.txt + /home/tecmint/Desktop/tecmint/tecmint3.txt + /home/tecmint/Desktop/tecmint/tecmint4.txt + /home/tecmint/Desktop/tecmint/tecmint6.txt + /home/tecmint/Desktop/tecmint/tecmint7.txt + /home/tecmint/Desktop/tecmint/tecmint9.txt + /home/tecmint/Desktop/tecmint/tecmint10.txt + /home/tecmint/Desktop/tecmint/tecmint2.txt + /home/tecmint/Desktop/tecmint/tecmint5.txt + /home/tecmint/Desktop/tecmint/tecmint14.txt + /home/tecmint/Desktop/tecmint/tecmint1.txt + /home/tecmint/Desktop/tecmint/tecmint15.txt + /home/tecmint/Desktop/tecmint/tecmint12.txt + +5. You can see the size of duplicate files for every directory and subdirectories encountered within using the **-S** and **-r** options at the same time, as: + + $ fdupes -Sr /home/avi/Desktop/ + + 65 bytes each: + /home/tecmint/Desktop/tecmint/tecmint13.txt + /home/tecmint/Desktop/tecmint/tecmint8.txt + /home/tecmint/Desktop/tecmint/tecmint11.txt + /home/tecmint/Desktop/tecmint/tecmint3.txt + /home/tecmint/Desktop/tecmint/tecmint4.txt + /home/tecmint/Desktop/tecmint/tecmint6.txt + /home/tecmint/Desktop/tecmint/tecmint7.txt + /home/tecmint/Desktop/tecmint/tecmint9.txt + /home/tecmint/Desktop/tecmint/tecmint10.txt + /home/tecmint/Desktop/tecmint/tecmint2.txt + /home/tecmint/Desktop/tecmint/tecmint5.txt + /home/tecmint/Desktop/tecmint/tecmint14.txt + /home/tecmint/Desktop/tecmint/tecmint1.txt + /home/tecmint/Desktop/tecmint/tecmint15.txt + /home/tecmint/Desktop/tecmint/tecmint12.txt + + 107 bytes each: + /home/tecmint/Desktop/resume_files/r-csc.html + /home/tecmint/Desktop/resume_files/fc.html + +6. Other than searching in one folder or all the folders recursively, you may choose to choose in two folders or three folders as required. Not to mention you can use option **-S** and/or **-r** if required. + + $ fdupes /home/avi/Desktop/ /home/avi/Templates/ + +7. To delete the duplicate files while preserving a copy you can use the option ‘**-d**’. Extra care should be taken while using this option else you might end up loosing necessary files/data and mind it the process is unrecoverable. + + $ fdupes -d /home/$USER/Desktop/tecmint + + [1] /home/tecmint/Desktop/tecmint/tecmint13.txt + [2] /home/tecmint/Desktop/tecmint/tecmint8.txt + [3] /home/tecmint/Desktop/tecmint/tecmint11.txt + [4] /home/tecmint/Desktop/tecmint/tecmint3.txt + [5] /home/tecmint/Desktop/tecmint/tecmint4.txt + [6] /home/tecmint/Desktop/tecmint/tecmint6.txt + [7] /home/tecmint/Desktop/tecmint/tecmint7.txt + [8] /home/tecmint/Desktop/tecmint/tecmint9.txt + [9] /home/tecmint/Desktop/tecmint/tecmint10.txt + [10] /home/tecmint/Desktop/tecmint/tecmint2.txt + [11] /home/tecmint/Desktop/tecmint/tecmint5.txt + [12] /home/tecmint/Desktop/tecmint/tecmint14.txt + [13] /home/tecmint/Desktop/tecmint/tecmint1.txt + [14] /home/tecmint/Desktop/tecmint/tecmint15.txt + [15] /home/tecmint/Desktop/tecmint/tecmint12.txt + + Set 1 of 1, preserve files [1 - 15, all]: + +You may notice that all the duplicates are listed and you are prompted to delete, either one by one or certain range or all in one go. You may select a range something like below to delete files files of specific range. + + Set 1 of 1, preserve files [1 - 15, all]: 2-15 + + [-] /home/tecmint/Desktop/tecmint/tecmint13.txt + [+] /home/tecmint/Desktop/tecmint/tecmint8.txt + [-] /home/tecmint/Desktop/tecmint/tecmint11.txt + [-] /home/tecmint/Desktop/tecmint/tecmint3.txt + [-] /home/tecmint/Desktop/tecmint/tecmint4.txt + [-] /home/tecmint/Desktop/tecmint/tecmint6.txt + [-] /home/tecmint/Desktop/tecmint/tecmint7.txt + [-] /home/tecmint/Desktop/tecmint/tecmint9.txt + [-] /home/tecmint/Desktop/tecmint/tecmint10.txt + [-] /home/tecmint/Desktop/tecmint/tecmint2.txt + [-] /home/tecmint/Desktop/tecmint/tecmint5.txt + [-] /home/tecmint/Desktop/tecmint/tecmint14.txt + [-] /home/tecmint/Desktop/tecmint/tecmint1.txt + [-] /home/tecmint/Desktop/tecmint/tecmint15.txt + [-] /home/tecmint/Desktop/tecmint/tecmint12.txt + +8. From safety point of view, you may like to print the output of ‘**fdupes**’ to file and then check text file to decide what file to delete. This decrease chances of getting your file deleted accidentally. You may do: + + $ fdupes -Sr /home > /home/fdupes.txt + +**Note**: You may replace ‘**/home**’ with the your desired folder. Also use option ‘**-r**’ and ‘**-S**’ if you want to search recursively and Print Size, respectively. + +9. You may omit the first file from each set of matches by using option ‘**-f**’. + +First List files of the directory. + + $ ls -l /home/$USER/Desktop/tecmint + + total 20 + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint9 (3rd copy).txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint9 (4th copy).txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint9 (another copy).txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint9 (copy).txt + -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint9.txt + +and then omit the first file from each set of matches. + + $ fdupes -f /home/$USER/Desktop/tecmint + + /home/tecmint/Desktop/tecmint9 (copy).txt + /home/tecmint/Desktop/tecmint9 (3rd copy).txt + /home/tecmint/Desktop/tecmint9 (another copy).txt + /home/tecmint/Desktop/tecmint9 (4th copy).txt + +10. Check installed version of fdupes. + + $ fdupes --version + + fdupes 1.51 + +11. If you need any help on fdupes you may use switch ‘**-h**’. + + $ fdupes -h + + Usage: fdupes [options] DIRECTORY... + + -r --recurse for every directory given follow subdirectories + encountered within + -R --recurse: for each directory given after this option follow + subdirectories encountered within (note the ':' at + the end of the option, manpage for more details) + -s --symlinks follow symlinks + -H --hardlinks normally, when two or more files point to the same + disk area they are treated as non-duplicates; this + option will change this behavior + -n --noempty exclude zero-length files from consideration + -A --nohidden exclude hidden files from consideration + -f --omitfirst omit the first file in each set of matches + -1 --sameline list each set of matches on a single line + -S --size show size of duplicate files + -m --summarize summarize dupe information + -q --quiet hide progress indicator + -d --delete prompt user for files to preserve and delete all + others; important: under particular circumstances, + data may be lost when using this option together + with -s or --symlinks, or when specifying a + particular directory more than once; refer to the + fdupes documentation for additional information + -N --noprompt together with --delete, preserve the first file in + each set of duplicates and delete the rest without + prompting the user + -v --version display fdupes version + -h --help display this help message + +That’s for all now. Let me know how you were finding and deleting duplicates files till now in Linux? and also tell me your opinion about this utility. Put your valuable feedback in the comment section below and don’t forget to like/share us and help us get spread. + +I am working on another utility called **fslint** to remove duplicate files, will soon post and you people will love to read. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/fdupes-find-and-delete-duplicate-files-in-linux/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[2]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ \ No newline at end of file From 54f9b2ca351aa6a65fa5896a6896aaf93255c5cc Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 12 Aug 2015 00:35:39 +0800 Subject: [PATCH 1693/2517] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- published/20150810 For Linux, Supercomputers R Us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20150810 For Linux, Supercomputers R Us.md b/published/20150810 For Linux, Supercomputers R Us.md index e173d7513c..f86b3694d0 100644 --- a/published/20150810 For Linux, Supercomputers R Us.md +++ b/published/20150810 For Linux, Supercomputers R Us.md @@ -1,4 +1,4 @@ -Linux:称霸超级计算机系统 +有了 Linux,你就可以搭建自己的超级计算机 ================================================================================ > 几乎所有超级计算机上运行的系统都是 Linux,其中包括那些由树莓派(Raspberry Pi)板卡和 PlayStation 3游戏机组成的计算机。 From d3454dc30effe283eeca9dac490e57e860333fe0 Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 12 Aug 2015 09:29:13 +0800 Subject: [PATCH 1694/2517] Update 20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md --- ...mndline Tool to Find and Delete Duplicate Files in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md b/sources/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md index f89f060c92..1e55090d67 100644 --- a/sources/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md +++ b/sources/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! fdupes – A Comamndline Tool to Find and Delete Duplicate Files in Linux ================================================================================ It is a common requirement to find and replace duplicate files for most of the computer users. Finding and removing duplicate files is a tiresome job that demands time and patience. Finding duplicate files can be very easy if your machine is powered by GNU/Linux, thanks to ‘**fdupes**‘ utility. @@ -262,4 +263,4 @@ via: http://www.tecmint.com/fdupes-find-and-delete-duplicate-files-in-linux/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ -[2]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ \ No newline at end of file +[2]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ From b161d18382714006ea52e2cf6cb46b3febe0ba92 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Wed, 12 Aug 2015 10:51:29 +0800 Subject: [PATCH 1695/2517] [Translated]20150811 fdupes--A Commandline Tool to Find and Delete Duplicate Files in Linux.md --- ...ind and Delete Duplicate Files in Linux.md | 69 +++++++++---------- 1 file changed, 33 insertions(+), 36 deletions(-) rename {sources => translated}/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md (67%) diff --git a/sources/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md b/translated/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md similarity index 67% rename from sources/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md rename to translated/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md index 1e55090d67..09f10fb546 100644 --- a/sources/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md +++ b/translated/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md @@ -1,40 +1,38 @@ -Translating by GOLinux! -fdupes – A Comamndline Tool to Find and Delete Duplicate Files in Linux +fdupes——Linux中查找并删除重复文件的命令行工具 ================================================================================ -It is a common requirement to find and replace duplicate files for most of the computer users. Finding and removing duplicate files is a tiresome job that demands time and patience. Finding duplicate files can be very easy if your machine is powered by GNU/Linux, thanks to ‘**fdupes**‘ utility. +对于大多数计算机用户而言,查找并替换重复的文件是一个常见的需求。查找并移除重复文件真是一项领人不胜其烦的工作,它耗时又耗力。如果你的机器上跑着GNU/Linux,那么查找重复文件会变得十分简单,这多亏了`**fdupes**`工具。 ![Find and Delete Duplicate Files in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/find-and-delete-duplicate-files-in-linux.png) -Fdupes – Find and Delete Duplicate Files in Linux +Fdupes——在Linux中查找并删除重复文件 -### What is fdupes? ### +### fdupes是啥东东? ### -**Fdupes** is a Linux utility written by **Adrian Lopez** in C programming Language released under MIT License. The application is able to find duplicate files in the given set of directories and sub-directories. Fdupes recognize duplicates by comparing MD5 signature of files followed by a byte-to-byte comparison. A lots of options can be passed with Fdupes to list, delete and replace the files with hardlinks to duplicates. +**Fdupes**是Linux下的一个工具,它由**Adrian Lopez**用C编程语言编写并基于MIT许可证发行,该应用程序可以在指定的目录及子目录中查找重复的文件。Fdupes通过对比文件的MD5签名,以及逐字节比较文件来识别重复内容,可以为Fdupes指定大量的选项以实现对文件的列出、删除、替换到文件副本的硬链接等操作。 -The comparison starts in the order: +对比以下列顺序开始: -**size comparison > Partial MD5 Signature Comparison > Full MD5 Signature Comparison > Byte-to-Byte Comparison.** +**大小对比 > 部分 MD5 签名对比 > 完整 MD5 签名对比 > 逐字节对比** -### Install fdupes on a Linux ### +### 安装 fdupes 到 Linux ### -Installation of latest version of fdupes (fdupes version 1.51) as easy as running following command on **Debian** based systems such as **Ubuntu** and **Linux Mint**. +在基于**Debian**的系统上,如**Ubuntu**和**Linux Mint**,安装最新版fdupes,用下面的命令手到擒来。 $ sudo apt-get install fdupes -On CentOS/RHEL and Fedora based systems, you need to turn on [epel repository][1] to install fdupes package. +在基于CentOS/RHEL和Fedora的系统上,你需要开启[epel仓库][1]来安装fdupes包。 # yum install fdupes # dnf install fdupes [On Fedora 22 onwards] -**Note**: The default package manager yum is replaced by dnf from Fedora 22 onwards… +**注意**:自Fedora 22之后,默认的包管理器yum被dnf取代了。 -### How to use fdupes command? ### - -1. For demonstration purpose, let’s a create few duplicate files under a directory (say tecmint) simply as: +### fdupes命令咋个搞? ### +1.作为演示的目的,让我们来在某个目录(比如 tecmint)下创建一些重复文件,命令如下: $ mkdir /home/"$USER"/Desktop/tecmint && cd /home/"$USER"/Desktop/tecmint && for i in {1..15}; do echo "I Love Tecmint. Tecmint is a very nice community of Linux Users." > tecmint${i}.txt ; done -After running above command, let’s verify the duplicates files are created or not using ls [command][2]. +在执行以上命令后,让我们使用ls[命令][2]验证重复文件是否创建。 $ ls -l @@ -55,11 +53,11 @@ After running above command, let’s verify the duplicates files are created or -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint8.txt -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint9.txt -The above script create **15** files namely tecmint1.txt, tecmint2.txt…tecmint15.txt and every files contains the same data i.e., +上面的脚本创建了**15**个文件,名称分别为tecmint1.txt,tecmint2.txt……tecmint15.txt,并且每个文件的数据相同,如 "I Love Tecmint. Tecmint is a very nice community of Linux Users." -2. Now search for duplicate files within the folder **tecmint**. +2.现在在**tecmint**文件夹内搜索重复的文件。 $ fdupes /home/$USER/Desktop/tecmint @@ -79,15 +77,15 @@ The above script create **15** files namely tecmint1.txt, tecmint2.txt…tecmint /home/tecmint/Desktop/tecmint/tecmint15.txt /home/tecmint/Desktop/tecmint/tecmint12.txt -3. Search for duplicates recursively under every directory including it’s sub-directories using the **-r** option. +3.使用**-r**选项在每个目录包括其子目录中递归搜索重复文件。 -It search across all the files and folder recursively, depending upon the number of files and folders it will take some time to scan duplicates. In that mean time, you will be presented with the total progress in terminal, something like this. +它会递归搜索所有文件和文件夹,花一点时间来扫描重复文件,时间的长短取决于文件和文件夹的数量。在此其间,终端中会显示全部过程,像下面这样。 $ fdupes -r /home Progress [37780/54747] 69% -4. See the size of duplicates found within a folder using the **-S** option. +4.使用**-S**选项来查看某个文件夹内找到的重复文件的大小。 $ fdupes -S /home/$USER/Desktop/tecmint @@ -108,7 +106,7 @@ It search across all the files and folder recursively, depending upon the number /home/tecmint/Desktop/tecmint/tecmint15.txt /home/tecmint/Desktop/tecmint/tecmint12.txt -5. You can see the size of duplicate files for every directory and subdirectories encountered within using the **-S** and **-r** options at the same time, as: +5.你可以同时使用**-S**和**-r**选项来查看所有涉及到的目录和子目录中的重复文件的大小,如下: $ fdupes -Sr /home/avi/Desktop/ @@ -133,11 +131,11 @@ It search across all the files and folder recursively, depending upon the number /home/tecmint/Desktop/resume_files/r-csc.html /home/tecmint/Desktop/resume_files/fc.html -6. Other than searching in one folder or all the folders recursively, you may choose to choose in two folders or three folders as required. Not to mention you can use option **-S** and/or **-r** if required. +6.不同于在一个或所有文件夹内递归搜索,你可以选择按要求有选择性地在两个或三个文件夹内进行搜索。不必再提醒你了吧,如有需要,你可以使用**-S**和/或**-r**选项。 $ fdupes /home/avi/Desktop/ /home/avi/Templates/ -7. To delete the duplicate files while preserving a copy you can use the option ‘**-d**’. Extra care should be taken while using this option else you might end up loosing necessary files/data and mind it the process is unrecoverable. +7.要删除重复文件,同时保留一个副本,你可以使用`**-d**`选项。使用该选项,你必须额外小心,否则最终结果可能会是文件/数据的丢失。郑重提醒,此操作不可恢复。 $ fdupes -d /home/$USER/Desktop/tecmint @@ -159,7 +157,7 @@ It search across all the files and folder recursively, depending upon the number Set 1 of 1, preserve files [1 - 15, all]: -You may notice that all the duplicates are listed and you are prompted to delete, either one by one or certain range or all in one go. You may select a range something like below to delete files files of specific range. +你可能注意到了,所有重复的文件被列了出来,并给出删除提示,一个一个来,或者指定范围,或者一次性全部删除。你可以选择一个范围,就像下面这样,来删除指定范围内的文件。 Set 1 of 1, preserve files [1 - 15, all]: 2-15 @@ -179,15 +177,15 @@ You may notice that all the duplicates are listed and you are prompted to delete [-] /home/tecmint/Desktop/tecmint/tecmint15.txt [-] /home/tecmint/Desktop/tecmint/tecmint12.txt -8. From safety point of view, you may like to print the output of ‘**fdupes**’ to file and then check text file to decide what file to delete. This decrease chances of getting your file deleted accidentally. You may do: +8.从安全角度出发,你可能想要打印`**fdupes**`的输出结果到文件中,然后检查文本文件来决定要删除什么文件。这可以降低意外删除文件的风险。你可以这么做: $ fdupes -Sr /home > /home/fdupes.txt -**Note**: You may replace ‘**/home**’ with the your desired folder. Also use option ‘**-r**’ and ‘**-S**’ if you want to search recursively and Print Size, respectively. +**注意**:你可以替换`**/home**`为你想要的文件夹。同时,如果你想要递归搜索并打印大小,可以使用`**-r**`和`**-S**`选项。 -9. You may omit the first file from each set of matches by using option ‘**-f**’. +9.你可以使用`**-f**`选项来忽略每个匹配集中的首个文件。 -First List files of the directory. +首先列出该目录中的文件。 $ ls -l /home/$USER/Desktop/tecmint @@ -198,7 +196,7 @@ First List files of the directory. -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint9 (copy).txt -rw-r--r-- 1 tecmint tecmint 65 Aug 8 11:22 tecmint9.txt -and then omit the first file from each set of matches. +然后,忽略掉每个匹配集中的首个文件。 $ fdupes -f /home/$USER/Desktop/tecmint @@ -207,13 +205,13 @@ and then omit the first file from each set of matches. /home/tecmint/Desktop/tecmint9 (another copy).txt /home/tecmint/Desktop/tecmint9 (4th copy).txt -10. Check installed version of fdupes. +10.检查已安装的fdupes版本。 $ fdupes --version fdupes 1.51 -11. If you need any help on fdupes you may use switch ‘**-h**’. +11.如果你需要关于fdupes的帮助,可以使用`**-h**`开关。 $ fdupes -h @@ -247,16 +245,15 @@ and then omit the first file from each set of matches. -v --version display fdupes version -h --help display this help message -That’s for all now. Let me know how you were finding and deleting duplicates files till now in Linux? and also tell me your opinion about this utility. Put your valuable feedback in the comment section below and don’t forget to like/share us and help us get spread. +到此为止了。让我知道你到现在为止你是怎么在Linux中查找并删除重复文件的?同时,也让我知道你关于这个工具的看法。在下面的评论部分中提供你有价值的反馈吧,别忘了为我们点赞并分享,帮助我们扩散哦。 -I am working on another utility called **fslint** to remove duplicate files, will soon post and you people will love to read. +我正在使用另外一个移除重复文件的工具,它叫**fslint**。很快就会把使用心得分享给大家哦,你们一定会喜欢看的。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/fdupes-find-and-delete-duplicate-files-in-linux/ -作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) +作者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 31c2f1416e45300f44b57be5518b824e926053ef Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Wed, 12 Aug 2015 12:56:35 +0800 Subject: [PATCH 1696/2517] translated wi-cuckoo --- ...ence on RedHat Linux Package Management.md | 349 ------------------ ...ence on RedHat Linux Package Management.md | 348 +++++++++++++++++ 2 files changed, 348 insertions(+), 349 deletions(-) delete mode 100644 sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md create mode 100644 translated/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md diff --git a/sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md b/sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md deleted file mode 100644 index 6243a8c0de..0000000000 --- a/sources/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md +++ /dev/null @@ -1,349 +0,0 @@ -translating wi-cuckoo -Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management -================================================================================ -**Shilpa Nair has just graduated in the year 2015. She went to apply for Trainee position in a National News Television located in Noida, Delhi. When she was in the last year of graduation and searching for help on her assignments she came across Tecmint. Since then she has been visiting Tecmint regularly.** - -![Linux Interview Questions on RPM](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Interview-Questions-on-RPM.jpeg) - -Linux Interview Questions on RPM - -All the questions and answers are rewritten based upon the memory of Shilpa Nair. - -> “Hi friends! I am Shilpa Nair from Delhi. I have completed my graduation very recently and was hunting for a Trainee role soon after my degree. I have developed a passion for UNIX since my early days in the collage and I was looking for a role that suits me and satisfies my soul. I was asked a lots of questions and most of them were basic questions related to RedHat Package Management.” - -Here are the questions, that I was asked and their corresponding answers. I am posting only those questions that are related to RedHat GNU/Linux Package Management, as they were mainly asked. - -### 1. How will you find if a package is installed or not? Say you have to find if ‘nano’ is installed or not, what will you do? ### - -> **Answer** : To find the package nano, weather installed or not, we can use rpm command with the option -q is for query and -a stands for all the installed packages. -> -> # rpm -qa nano -> OR -> # rpm -qa | grep -i nano -> -> nano-2.3.1-10.el7.x86_64 -> -> Also the package name must be complete, an incomplete package name will return the prompt without printing anything which means that package (incomplete package name) is not installed. It can be understood easily by the example below: -> -> We generally substitute vim command with vi. But if we find package vi/vim we will get no result on the standard output. -> -> # vi -> # vim -> -> However we can clearly see that the package is installed by firing vi/vim command. Here is culprit is incomplete file name. If we are not sure of the exact file-name we can use wildcard as: -> -> # rpm -qa vim* -> -> vim-minimal-7.4.160-1.el7.x86_64 -> -> This way we can find information about any package, if installed or not. - -### 2. How will you install a package XYZ using rpm? ### - -> **Answer** : We can install any package (*.rpm) using rpm command a shown below, here options -i (install), -v (verbose or display additional information) and -h (print hash mark during package installation). -> -> # rpm -ivh peazip-1.11-1.el6.rf.x86_64.rpm -> -> Preparing... ################################# [100%] -> Updating / installing... -> 1:peazip-1.11-1.el6.rf ################################# [100%] -> -> If upgrading a package from earlier version -U switch should be used, option -v and -h follows to make sure we get a verbose output along with hash Mark, that makes it readable. - -### 3. You have installed a package (say httpd) and now you want to see all the files and directories installed and created by the above package. What will you do? ### - -> **Answer** : We can list all the files (Linux treat everything as file including directories) installed by the package httpd using options -l (List all the files) and -q (is for query). -> -> # rpm -ql httpd -> -> /etc/httpd -> /etc/httpd/conf -> /etc/httpd/conf.d -> ... - -### 4. You are supposed to remove a package say postfix. What will you do? ### - -> **Answer** : First we need to know postfix was installed by what package. Find the package name that installed postfix using options -e erase/uninstall a package) and –v (verbose output). -> -> # rpm -qa postfix* -> -> postfix-2.10.1-6.el7.x86_64 -> -> and then remove postfix as: -> -> # rpm -ev postfix-2.10.1-6.el7.x86_64 -> -> Preparing packages... -> postfix-2:3.0.1-2.fc22.x86_64 - -### 5. Get detailed information about an installed package, means information like Version, Release, Install Date, Size, Summary and a brief description. ### - -> **Answer** : We can get detailed information about an installed package by using option -qa with rpm followed by package name. -> -> For example to find details of package openssh, all I need to do is: -> -> # rpm -qi openssh -> -> [root@tecmint tecmint]# rpm -qi openssh -> Name : openssh -> Version : 6.8p1 -> Release : 5.fc22 -> Architecture: x86_64 -> Install Date: Thursday 28 May 2015 12:34:50 PM IST -> Group : Applications/Internet -> Size : 1542057 -> License : BSD -> .... - -### 6. You are not sure about what are the configuration files provided by a specific package say httpd. How will you find list of all the configuration files provided by httpd and their location. ### - -> **Answer** : We need to run option -c followed by package name with rpm command and it will list the name of all the configuration file and their location. -> -> # rpm -qc httpd -> -> /etc/httpd/conf.d/autoindex.conf -> /etc/httpd/conf.d/userdir.conf -> /etc/httpd/conf.d/welcome.conf -> /etc/httpd/conf.modules.d/00-base.conf -> /etc/httpd/conf/httpd.conf -> /etc/sysconfig/httpd -> -> Similarly we can list all the associated document files as: -> -> # rpm -qd httpd -> -> /usr/share/doc/httpd/ABOUT_APACHE -> /usr/share/doc/httpd/CHANGES -> /usr/share/doc/httpd/LICENSE -> ... -> -> also, we can list the associated License file as: -> -> # rpm -qL openssh -> -> /usr/share/licenses/openssh/LICENCE -> -> Not to mention that the option -d and option -L in the above command stands for ‘documents‘ and ‘License‘, respectively. - -### 7. You came across a configuration file located at ‘/usr/share/alsa/cards/AACI.conf’ and you are not sure this configuration file is associated with what package. How will you find out the parent package name? ### - -> **Answer** : When a package is installed, the relevant information gets stored in the database. So it is easy to trace what provides the above package using option -qf (-f query packages owning files). -> -> # rpm -qf /usr/share/alsa/cards/AACI.conf -> alsa-lib-1.0.28-2.el7.x86_64 -> -> Similarly we can find (what provides) information about any sub-packge, document files and License files. - -### 8. How will you find list of recently installed software’s using rpm? ### - -> **Answer** : As said earlier, everything being installed is logged in database. So it is not difficult to query the rpm database and find the list of recently installed software’s. -> -> We can do this by running the below commands using option –last (prints the most recent installed software’s). -> -> # rpm -qa --last -> -> The above command will print all the packages installed in a order such that, the last installed software appears at the top. -> -> If our concern is to find out specific package, we can grep that package (say sqlite) from the list, simply as: -> -> # rpm -qa --last | grep -i sqlite -> -> sqlite-3.8.10.2-1.fc22.x86_64 Thursday 18 June 2015 05:05:43 PM IST -> -> We can also get a list of 10 most recently installed software simply as: -> -> # rpm -qa --last | head -> -> We can refine the result to output a more custom result simply as: -> -> # rpm -qa --last | head -n 2 -> -> In the above command -n represents number followed by a numeric value. The above command prints a list of 2 most recent installed software. - -### 9. Before installing a package, you are supposed to check its dependencies. What will you do? ### - -> **Answer** : To check the dependencies of a rpm package (XYZ.rpm), we can use switches -q (query package), -p (query a package file) and -R (Requires / List packages on which this package depends i.e., dependencies). -> -> # rpm -qpR gedit-3.16.1-1.fc22.i686.rpm -> -> /bin/sh -> /usr/bin/env -> glib2(x86-32) >= 2.40.0 -> gsettings-desktop-schemas -> gtk3(x86-32) >= 3.16 -> gtksourceview3(x86-32) >= 3.16 -> gvfs -> libX11.so.6 -> ... - -### 10. Is rpm a front-end Package Management Tool? ### - -> **Answer** : No! rpm is a back-end package management for RPM based Linux Distribution. -> -> [YUM][1] which stands for Yellowdog Updater Modified is the front-end for rpm. YUM automates the overall process of resolving dependencies and everything else. -> -> Very recently [DNF][2] (Dandified YUM) replaced YUM in Fedora 22. Though YUM is still available to be used in RHEL and CentOS, we can install dnf and use it alongside of YUM. DNF is said to have a lots of improvement over YUM. -> -> Good to know, you keep yourself updated. Lets move to the front-end part. - -### 11. How will you list all the enabled repolist on a system. ### - -> **Answer** : We can list all the enabled repos on a system simply using following commands. -> -> # yum repolist -> or -> # dnf repolist -> -> Last metadata expiration check performed 0:30:03 ago on Mon Jun 22 16:50:00 2015. -> repo id repo name status -> *fedora Fedora 22 - x86_64 44,762 -> ozonos Repository for Ozon OS 61 -> *updates Fedora 22 - x86_64 - Updates -> -> The above command will only list those repos that are enabled. If we need to list all the repos, enabled or not, we can do. -> -> # yum repolist all -> or -> # dnf repolist all -> -> Last metadata expiration check performed 0:29:45 ago on Mon Jun 22 16:50:00 2015. -> repo id repo name status -> *fedora Fedora 22 - x86_64 enabled: 44,762 -> fedora-debuginfo Fedora 22 - x86_64 - Debug disabled -> fedora-source Fedora 22 - Source disabled -> ozonos Repository for Ozon OS enabled: 61 -> *updates Fedora 22 - x86_64 - Updates enabled: 5,018 -> updates-debuginfo Fedora 22 - x86_64 - Updates - Debug - -### 12. How will you list all the available and installed packages on a system? ### - -> **Answer** : To list all the available packages on a system, we can do: -> -> # yum list available -> or -> # dnf list available -> -> ast metadata expiration check performed 0:34:09 ago on Mon Jun 22 16:50:00 2015. -> Available Packages -> 0ad.x86_64 0.0.18-1.fc22 fedora -> 0ad-data.noarch 0.0.18-1.fc22 fedora -> 0install.x86_64 2.6.1-2.fc21 fedora -> 0xFFFF.x86_64 0.3.9-11.fc22 fedora -> 2048-cli.x86_64 0.9-4.git20141214.723738c.fc22 fedora -> 2048-cli-nocurses.x86_64 0.9-4.git20141214.723738c.fc22 fedora -> .... -> -> To list all the installed Packages on a system, we can do. -> -> # yum list installed -> or -> # dnf list installed -> -> Last metadata expiration check performed 0:34:30 ago on Mon Jun 22 16:50:00 2015. -> Installed Packages -> GeoIP.x86_64 1.6.5-1.fc22 @System -> GeoIP-GeoLite-data.noarch 2015.05-1.fc22 @System -> NetworkManager.x86_64 1:1.0.2-1.fc22 @System -> NetworkManager-libnm.x86_64 1:1.0.2-1.fc22 @System -> aajohan-comfortaa-fonts.noarch 2.004-4.fc22 @System -> .... -> -> To list all the available and installed packages on a system, we can do. -> -> # yum list -> or -> # dnf list -> -> Last metadata expiration check performed 0:32:56 ago on Mon Jun 22 16:50:00 2015. -> Installed Packages -> GeoIP.x86_64 1.6.5-1.fc22 @System -> GeoIP-GeoLite-data.noarch 2015.05-1.fc22 @System -> NetworkManager.x86_64 1:1.0.2-1.fc22 @System -> NetworkManager-libnm.x86_64 1:1.0.2-1.fc22 @System -> aajohan-comfortaa-fonts.noarch 2.004-4.fc22 @System -> acl.x86_64 2.2.52-7.fc22 @System -> .... - -### 13. How will you install and update a package and a group of packages separately on a system using YUM/DNF? ### - -> Answer : To Install a package (say nano), we can do, -> -> # yum install nano -> -> To Install a Group of Package (say Haskell), we can do. -> -> # yum groupinstall 'haskell' -> -> To update a package (say nano), we can do. -> -> # yum update nano -> -> To update a Group of Package (say Haskell), we can do. -> -> # yum groupupdate 'haskell' - -### 14. How will you SYNC all the installed packages on a system to stable release? ### - -> **Answer** : We can sync all the packages on a system (say CentOS or Fedora) to stable release as, -> -> # yum distro-sync [On CentOS/RHEL] -> or -> # dnf distro-sync [On Fedora 20 Onwards] - -Seems you have done a good homework before coming for the interview,Good!. Before proceeding further I just want to ask one more question. - -### 15. Are you familiar with YUM local repository? Have you tried making a Local YUM repository? Let me know in brief what you will do to create a local YUM repo. ### - -> **Answer** : First I would like to Thank you Sir for appreciation. Coming to question, I must admit that I am quiet familiar with Local YUM repositories and I have already implemented it for testing purpose in my local machine. -> -> 1. To set up Local YUM repository, we need to install the below three packages as: -> -> # yum install deltarpm python-deltarpm createrepo -> -> 2. Create a directory (say /home/$USER/rpm) and copy all the RPMs from RedHat/CentOS DVD to that folder. -> -> # mkdir /home/$USER/rpm -> # cp /path/to/rpm/on/DVD/*.rpm /home/$USER/rpm -> -> 3. Create base repository headers as. -> -> # createrepo -v /home/$USER/rpm -> -> 4. Create the .repo file (say abc.repo) at the location /etc/yum.repos.d simply as: -> -> cd /etc/yum.repos.d && cat << EOF > abc.repo -> [local-installation]name=yum-local -> baseurl=file:///home/$USER/rpm -> enabled=1 -> gpgcheck=0 -> EOF - -**Important**: Make sure to remove $USER with user_name. - -That’s all we need to do to create a Local YUM repository. We can now install applications from here, that is relatively fast, secure and most important don’t need an Internet connection. - -Okay! It was nice interviewing you. I am done. I am going to suggest your name to HR. You are a young and brilliant candidate we would like to have in our organization. If you have any question you may ask me. - -**Me**: Sir, it was really a very nice interview and I feel very lucky today, to have cracked the interview.. - -Obviously it didn’t end here. I asked a lots of questions like the project they are handling. What would be my role and responsibility and blah..blah..blah - -Friends, by the time all these were documented I have been called for HR round which is 3 days from now. Hope I do my best there as well. All your blessings will count. - -Thankyou friends and Tecmint for taking time and documenting my experience. Mates I believe Tecmint is doing some really extra-ordinary which must be praised. When we share ours experience with other, other get to know many things from us and we get to know our mistakes. - -It enhances our confidence level. If you have given any such interview recently, don’t keep it to yourself. Spread it! Let all of us know that. You may use the below form to share your experience with us. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-rpm-package-management-interview-questions/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ -[2]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ diff --git a/translated/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md b/translated/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md new file mode 100644 index 0000000000..f095a31c65 --- /dev/null +++ b/translated/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md @@ -0,0 +1,348 @@ +Shilpa Nair 分享了她面试 RedHat Linux 包管理方面的经验 +======================================================================== +**Shilpa Nair 刚于2015年毕业。她之后去了一家位于 Noida,Delhi 的国家新闻电视台,应聘实习生的岗位。在她去年毕业季的时候,常逛 Tecmint 寻求作业上的帮助。从那时开始,她就常去 Tecmint。** + +![Linux Interview Questions on RPM](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Interview-Questions-on-RPM.jpeg) + +有关 RPM 方面的 Linux 面试题 + +所有的问题和回答都是 Shilpa Nair 根据回忆重写的。 + +> “大家好!我是来自 Delhi 的Shilpa Nair。我不久前才顺利毕业,正寻找一个实习的机会。在大学早期的时候,我就对 UNIX 十分喜爱,所以我也希望这个机会能适合我,满足我的兴趣。我被提问了很多问题,大部分都是关于 RedHat 包管理的基础问题。” + +下面就是我被问到的问题,和对应的回答。我仅贴出了与 RedHat GNU/Linux 包管理相关的,也是主要被提问的。 + +### 1,里如何查找一个包安装与否?假设你需要确认 ‘nano’ 有没有安装,你怎么做? ### + +> **回答**:为了确认 nano 软件包有没有安装,我们可以使用 rpm 命令,配合 -q 和 -a 选项来查询所有已安装的包 +> +> # rpm -qa nano +> OR +> # rpm -qa | grep -i nano +> +> nano-2.3.1-10.el7.x86_64 +> +> 同时包的名字必须是完成的,不完整的包名返回提示,不打印任何东西,就是说这包(包名字不全)未安装。下面的例子会更好理解些: +> +> 我们通常使用 vim 替代 vi 命令。当时如果我们查找安装包 vi/vim 的时候,我们就会看到标准输出上没有任何结果。 +> +> # vi +> # vim +> +> 尽管如此,我们仍然可以通过使用 vi/vim 命令来清楚地知道包有没有安装。Here is ... name(这句不知道)。如果我们不确切知道完整的文件名,我们可以使用通配符: +> +> # rpm -qa vim* +> +> vim-minimal-7.4.160-1.el7.x86_64 +> +> 通过这种方式,我们可以获得任何软件包的信息,安装与否。 + +### 2. 你如何使用 rpm 命令安装 XYZ 软件包? ### + +> **回答**:我们可以使用 rpm 命令安装任何的软件包(*.rpm),像下面这样,选项 -i(install),-v(冗余或者显示额外的信息)和 -h(打印#号显示进度,在安装过程中)。 +> +> # rpm -ivh peazip-1.11-1.el6.rf.x86_64.rpm +> +> Preparing... ################################# [100%] +> Updating / installing... +> 1:peazip-1.11-1.el6.rf ################################# [100%] +> +> 如果要升级一个早期版本的包,应加上 -U 选项,选项 -v 和 -h 可以确保我们得到用 # 号表示的冗余输出,这增加了可读性。 + +### 3. 你已经安装了一个软件包(假设是 httpd),现在你想看看软件包创建并安装的所有文件和目录,你会怎么做? ### + +> **回答**:使用选项 -l(列出所有文件)和 -q(查询)列出 httpd 软件包安装的所有文件(Linux哲学:所有的都是文件,包括目录)。 +> +> # rpm -ql httpd +> +> /etc/httpd +> /etc/httpd/conf +> /etc/httpd/conf.d +> ... + +### 4. 假如你要移除一个软件包,叫 postfix。你会怎么做? ### + +> **回答**:首先我们需要知道什么包安装了 postfix。查找安装 postfix 的包名后,使用 -e(擦除/卸载软件包)和 -v(冗余输出)两个选项来实现。 +> +> # rpm -qa postfix* +> +> postfix-2.10.1-6.el7.x86_64 +> +> 然后移除 postfix,如下: +> +> # rpm -ev postfix-2.10.1-6.el7.x86_64 +> +> Preparing packages... +> postfix-2:3.0.1-2.fc22.x86_64 + +### 5. 获得一个已安装包的具体信息,如版本,发行号,安装日期,大小,总结和一个间短的描述。 ### + +> **回答**:我们通过使用 rpm 的选项 -qi,后面接包名,可以获得关于一个已安装包的具体信息。 +> +> 举个例子,为了获得 openssh 包的具体信息,我需要做的就是: +> +> # rpm -qi openssh +> +> [root@tecmint tecmint]# rpm -qi openssh +> Name : openssh +> Version : 6.8p1 +> Release : 5.fc22 +> Architecture: x86_64 +> Install Date: Thursday 28 May 2015 12:34:50 PM IST +> Group : Applications/Internet +> Size : 1542057 +> License : BSD +> .... + +### 6. 假如你不确定一个指定包的配置文件在哪,比如 httpd。你如何找到所有 httpd 提供的配置文件列表和位置。 ### + +> **回答**: 我们需要用选项 -c 接包名,这会列出所有配置文件的名字和他们的位置。 +> +> # rpm -qc httpd +> +> /etc/httpd/conf.d/autoindex.conf +> /etc/httpd/conf.d/userdir.conf +> /etc/httpd/conf.d/welcome.conf +> /etc/httpd/conf.modules.d/00-base.conf +> /etc/httpd/conf/httpd.conf +> /etc/sysconfig/httpd +> +> 相似地,我们可以列出所有相关的文档文件,如下: +> +> # rpm -qd httpd +> +> /usr/share/doc/httpd/ABOUT_APACHE +> /usr/share/doc/httpd/CHANGES +> /usr/share/doc/httpd/LICENSE +> ... +> +> 我们也可以列出所有相关的证书文件,如下: +> +> # rpm -qL openssh +> +> /usr/share/licenses/openssh/LICENCE +> +> 忘了说明上面的选项 -d 和 -L 分别表示 “文档” 和 “证书”,抱歉。 + +### 7. 你进入了一个配置文件,位于‘/usr/share/alsa/cards/AACI.conf’,现在你不确定该文件属于哪个包。你如何查找出包的名字? ### + +> **回答**:当一个包被安装后,相关的信息就存储在了数据库里。所以使用选项 -qf(-f 查询包拥有的文件)很容易追踪谁提供了上述的包。 +> +> # rpm -qf /usr/share/alsa/cards/AACI.conf +> alsa-lib-1.0.28-2.el7.x86_64 +> +> 类似地,我们可以查找(谁提供的)关于任何子包,文档和证书文件的信息。 + +### 8. 你如何使用 rpm 查找最近安装的软件列表? ### + +> **回答**:如刚刚说的,每一样被安装的文件都记录在了数据库里。所以这并不难,通过查询 rpm 的数据库,找到最近安装软件的列表。 +> +> 我们通过运行下面的命令,使用选项 -last(打印出最近安装的软件)达到目的。 +> +> # rpm -qa --last +> +> 上面的命令会打印出所有安装的软件,最近一次安装的软件在列表的顶部。 +> +> 如果我们关心的是找出特定的包,我们可以使用 grep 命令从列表中匹配包(假设是 sqlite ),简单如下: +> +> # rpm -qa --last | grep -i sqlite +> +> sqlite-3.8.10.2-1.fc22.x86_64 Thursday 18 June 2015 05:05:43 PM IST +> +> 我们也可以获得10个最近安装的软件列表,简单如下: +> +> # rpm -qa --last | head +> +> 我们可以重定义一下,输出想要的结果,简单如下: +> +> # rpm -qa --last | head -n 2 +> +> 上面的命令中,-n 代表数目,后面接一个常数值。该命令是打印2个最近安装的软件的列表。 + +### 9. 安装一个包之前,你如果要检查其依赖。你会怎么做? ### + +> **回答**:检查一个 rpm 包(XYZ.rpm)的依赖,我们可以使用选项 -q(查询包),-p(指定包名)和 -R(查询/列出该包依赖的包,嗯,就是依赖)。 +> +> # rpm -qpR gedit-3.16.1-1.fc22.i686.rpm +> +> /bin/sh +> /usr/bin/env +> glib2(x86-32) >= 2.40.0 +> gsettings-desktop-schemas +> gtk3(x86-32) >= 3.16 +> gtksourceview3(x86-32) >= 3.16 +> gvfs +> libX11.so.6 +> ... + +### 10. rpm 是不是一个前端的包管理工具呢? ### + +> **回答**:不是!rpm 是一个后端管理工具,适用于基于 Linux 发行版的 RPM (此处指 Redhat Package Management)。 +> +> [YUM][1],全称 Yellowdog Updater Modified,是一个 RPM 的前端工具。YUM 命令自动完成所有工作,包括解决依赖和其他一切事务。 +> +> 最近,[DNF][2](YUM命令升级版)在Fedora 22发行版中取代了 YUM。尽管 YUM 仍然可以在 RHEL 和 CentOS 平台使用,我们也可以安装 dnf,与 YUM 命令共存使用。据说 DNF 较于 YUM 有很多提高。 +> +> 知道更多总是好的,保持自我更新。现在我们移步到前端部分来谈谈。 + +### 11. 你如何列出一个系统上面所有可用的仓库列表。 ### + +> **回答**:简单地使用下面的命令,我们就可以列出一个系统上所有可用的仓库列表。 +> +> # yum repolist +> 或 +> # dnf repolist +> +> Last metadata expiration check performed 0:30:03 ago on Mon Jun 22 16:50:00 2015. +> repo id repo name status +> *fedora Fedora 22 - x86_64 44,762 +> ozonos Repository for Ozon OS 61 +> *updates Fedora 22 - x86_64 - Updates +> +> 上面的命令仅会列出可用的仓库。如果你需要列出所有的仓库,不管可用与否,可以这样做。 +> +> # yum repolist all +> or +> # dnf repolist all +> +> Last metadata expiration check performed 0:29:45 ago on Mon Jun 22 16:50:00 2015. +> repo id repo name status +> *fedora Fedora 22 - x86_64 enabled: 44,762 +> fedora-debuginfo Fedora 22 - x86_64 - Debug disabled +> fedora-source Fedora 22 - Source disabled +> ozonos Repository for Ozon OS enabled: 61 +> *updates Fedora 22 - x86_64 - Updates enabled: 5,018 +> updates-debuginfo Fedora 22 - x86_64 - Updates - Debug + +### 12. 你如何列出一个系统上所有可用并且安装了的包? ### + +> **回答**:列出一个系统上所有可用的包,我们可以这样做: +> +> # yum list available +> 或 +> # dnf list available +> +> ast metadata expiration check performed 0:34:09 ago on Mon Jun 22 16:50:00 2015. +> Available Packages +> 0ad.x86_64 0.0.18-1.fc22 fedora +> 0ad-data.noarch 0.0.18-1.fc22 fedora +> 0install.x86_64 2.6.1-2.fc21 fedora +> 0xFFFF.x86_64 0.3.9-11.fc22 fedora +> 2048-cli.x86_64 0.9-4.git20141214.723738c.fc22 fedora +> 2048-cli-nocurses.x86_64 0.9-4.git20141214.723738c.fc22 fedora +> .... +> +> 而列出一个系统上所有已安装的包,我们可以这样做。 +> +> # yum list installed +> or +> # dnf list installed +> +> Last metadata expiration check performed 0:34:30 ago on Mon Jun 22 16:50:00 2015. +> Installed Packages +> GeoIP.x86_64 1.6.5-1.fc22 @System +> GeoIP-GeoLite-data.noarch 2015.05-1.fc22 @System +> NetworkManager.x86_64 1:1.0.2-1.fc22 @System +> NetworkManager-libnm.x86_64 1:1.0.2-1.fc22 @System +> aajohan-comfortaa-fonts.noarch 2.004-4.fc22 @System +> .... +> +> 而要同时满足两个要求的时候,我们可以这样做。 +> +> # yum list +> 或 +> # dnf list +> +> Last metadata expiration check performed 0:32:56 ago on Mon Jun 22 16:50:00 2015. +> Installed Packages +> GeoIP.x86_64 1.6.5-1.fc22 @System +> GeoIP-GeoLite-data.noarch 2015.05-1.fc22 @System +> NetworkManager.x86_64 1:1.0.2-1.fc22 @System +> NetworkManager-libnm.x86_64 1:1.0.2-1.fc22 @System +> aajohan-comfortaa-fonts.noarch 2.004-4.fc22 @System +> acl.x86_64 2.2.52-7.fc22 @System +> .... + +### 13. 你会怎么分别安装和升级一个包与一组包,在一个系统上面使用 YUM/DNF? ### + +> **回答**:安装一个包(假设是 nano),我们可以这样做, +> +> # yum install nano +> +> 而安装一组包(假设是 Haskell),我们可以这样做, +> +> # yum groupinstall 'haskell' +> +> 升级一个包(还是 nano),我们可以这样做, +> +> # yum update nano +> +> 而为了升级一组包(还是 haskell),我们可以这样做, +> +> # yum groupupdate 'haskell' + +### 14. 你会如何同步一个系统上面的所有安装软件到稳定发行版? ### + +> **回答**:我们可以一个系统上(假设是 CentOS 或者 Fedora)的所有包到稳定发行版,如下, +> +> # yum distro-sync [On CentOS/ RHEL] +> 或 +> # dnf distro-sync [On Fedora 20之后版本] + +似乎来面试之前你做了相当不多的功课,很好!在进一步交谈前,我还想问一两个问题。 + +### 15. 你对 YUM 本地仓库熟悉吗?你尝试过建立一个本地 YUM 仓库吗?让我们简单看看你会怎么建立一个本地 YUM 仓库。 ### + +> **回答**:首先,感谢你的夸奖。回到问题,我必须承认我对本地 YUM 仓库十分熟悉,并且在我的本地主机上也部署过,作为测试用。 +> +> 1. 为了建立本地 YUM 仓库,我们需要安装下面三个包: +> +> # yum install deltarpm python-deltarpm createrepo +> +> 2. 新建一个目录(假设 /home/$USER/rpm),然后复制 RedHat/CentOS DVD 上的 RPM 包到这个文件夹下 +> +> # mkdir /home/$USER/rpm +> # cp /path/to/rpm/on/DVD/*.rpm /home/$USER/rpm +> +> 3. 新建基本的库头文件如下。 +> +> # createrepo -v /home/$USER/rpm +> +> 4. 在路径 /etc/yum.repo.d 下创建一个 .repo 文件(如 abc.repo): +> +> cd /etc/yum.repos.d && cat << EOF > abc.repo +> [local-installation]name=yum-local +> baseurl=file:///home/$USER/rpm +> enabled=1 +> gpgcheck=0 +> EOF + +**重要**:用你的用户名替换掉 $USER。 + +以上就是创建一个本地 YUM 仓库所要做的全部工作。我们现在可以从这里安装软件了,相对快一些,安全一些,并且最重要的是不需要 Internet 连接。 + +好了!面试过程很愉快。我已经问完了。我会将你推荐给 HR。你是一个年轻且十分聪明的候选者,我们很愿意你加入进来。如果你有任何问题,你可以问我。 + +**我**:谢谢,这确实是一次愉快的面试,我感到非常幸运今天,然后这次面试就毁了。。。 + +显然,不会在这里结束。我问了很多问题,比如他们正在做的项目。我会担任什么角色,负责什么,,,balabalabala + +小伙伴们,3天以前 HR 轮的所有问题到时候也会被写成文档。希望我当时表现不错。感谢你们所有的祝福。 + +谢谢伙伴们和 Tecmint,花时间来编辑我的面试经历。我相信 Tecmint 好伙伴们做了很大的努力,必要要赞一个。当我们与他人分享我们的经历的时候,其他人从我们这里知道了更多,而我们自己则发现了自己的不足。 + +这增加了我们的信心。如果你最近也有任何类似的面试经历,别自己蔵着。分享出来!让我们所有人都知道。你可以使用如下的格式来与我们分享你的经历。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-rpm-package-management-interview-questions/ + +作者:[Avishek Kumar][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[2]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ From d00a59eee12db7b2ae81fea8ca39046d75e00f77 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 12 Aug 2015 16:24:17 +0800 Subject: [PATCH 1697/2517] =?UTF-8?q?20150812-1=20=E9=80=89=E9=A2=98=20=20?= =?UTF-8?q?RHCE=20=E4=B8=93=E9=A2=98=20=E6=96=87=E7=AB=A0=E6=9C=AA?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E5=AE=8C=E7=BB=93=EF=BC=8C=E7=9B=AE=E5=89=8D?= =?UTF-8?q?=E5=8F=AA=E6=9C=89=E4=B8=89=E7=AF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...o Setup and Test Static Network Routing.md | 227 ++++++++++++++++++ ...ation and Set Kernel Runtime Parameters.md | 177 ++++++++++++++ ...m Activity Reports Using Linux Toolsets.md | 182 ++++++++++++++ 3 files changed, 586 insertions(+) create mode 100644 sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md create mode 100644 sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md create mode 100644 sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md diff --git a/sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md b/sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md new file mode 100644 index 0000000000..03356f9dd1 --- /dev/null +++ b/sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md @@ -0,0 +1,227 @@ +Part 1 - RHCE Series: How to Setup and Test Static Network Routing +================================================================================ +RHCE (Red Hat Certified Engineer) is a certification from Red Hat company, which gives an open source operating system and software to the enterprise community, It also gives training, support and consulting services for the companies. + +![RHCE Exam Preparation Guide](http://www.tecmint.com/wp-content/uploads/2015/07/RHCE-Exam-Series-by-TecMint.jpg) + +RHCE Exam Preparation Guide + +This RHCE (Red Hat Certified Engineer) is a performance-based exam (codename EX300), who possesses the additional skills, knowledge, and abilities required of a senior system administrator responsible for Red Hat Enterprise Linux (RHEL) systems. + +**Important**: [Red Hat Certified System Administrator][1] (RHCSA) certification is required to earn RHCE certification. + +Following are the exam objectives based on the Red Hat Enterprise Linux 7 version of the exam, which will going to cover in this RHCE series: + +- Part 1: How to Setup and Test Static Routing in RHEL 7 +- Part 2: How to Perform Packet Filtering, Network Address Translation and Set Kernel Runtime Parameters +- Part 3: How to Produce and Deliver System Activity Reports Using Linux Toolsets +- Part 4: Automate System Maintenance Tasks Using Shell Scripts +- Part 5: How to Configure Local and Remote System Logging +- Part 6: How to Configure a Samba Server and a NFS Server +- Part 7: Setting Up Complete SMTP Server for Mailing +- Part 8: Setting Up HTTPS and TLS on RHEL 7 +- Part 9: Setting Up Network Time Protocol +- Part 10: How to Configure a Cache-Only DNS Server + +To view fees and register for an exam in your country, check the [RHCE Certification][2] page. + +In this Part 1 of the RHCE series and the next, we will present basic, yet typical, cases where the principles of static routing, packet filtering, and network address translation come into play. + +![Setup Static Network Routing in RHEL](http://www.tecmint.com/wp-content/uploads/2015/07/Setup-Static-Network-Routing-in-RHEL-7.jpg) + +RHCE: Setup and Test Network Static Routing – Part 1 + +Please note that we will not cover them in depth, but rather organize these contents in such a way that will be helpful to take the first steps and build from there. + +### Static Routing in Red Hat Enterprise Linux 7 ### + +One of the wonders of modern networking is the vast availability of devices that can connect groups of computers, whether in relatively small numbers and confined to a single room or several machines in the same building, city, country, or across continents. + +However, in order to effectively accomplish this in any situation, network packets need to be routed, or in other words, the path they follow from source to destination must be ruled somehow. + +Static routing is the process of specifying a route for network packets other than the default, which is provided by a network device known as the default gateway. Unless specified otherwise through static routing, network packets are directed to the default gateway; with static routing, other paths are defined based on predefined criteria, such as the packet destination. + +Let us define the following scenario for this tutorial. We have a Red Hat Enterprise Linux 7 box connecting to router #1 [192.168.0.1] to access the Internet and machines in 192.168.0.0/24. + +A second router (router #2) has two network interface cards: enp0s3 is also connected to router #1 to access the Internet and to communicate with the RHEL 7 box and other machines in the same network, whereas the other (enp0s8) is used to grant access to the 10.0.0.0/24 network where internal services reside, such as a web and / or database server. + +This scenario is illustrated in the diagram below: + +![Static Routing Network Diagram](http://www.tecmint.com/wp-content/uploads/2015/07/Static-Routing-Network-Diagram.png) + +Static Routing Network Diagram + +In this article we will focus exclusively on setting up the routing table on our RHEL 7 box to make sure that it can both access the Internet through router #1 and the internal network via router #2. + +In RHEL 7, you will use the [ip command][3] to configure and show devices and routing using the command line. These changes can take effect immediately on a running system but since they are not persistent across reboots, we will use ifcfg-enp0sX and route-enp0sX files inside /etc/sysconfig/network-scripts to save our configuration permanently. + +To begin, let’s print our current routing table: + + # ip route show + +![Check Routing Table in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Current-Routing-Table.png) + +Check Current Routing Table + +From the output above, we can see the following facts: + +- The default gateway’s IP address is 192.168.0.1 and can be accessed via the enp0s3 NIC. +- When the system booted up, it enabled the zeroconf route to 169.254.0.0/16 (just in case). In few words, if a machine is set to obtain an IP address through DHCP but fails to do so for some reason, it is automatically assigned an address in this network. Bottom line is, this route will allow us to communicate, also via enp0s3, with other machines who have failed to obtain an IP address from a DHCP server. +- Last, but not least, we can communicate with other boxes inside the 192.168.0.0/24 network through enp0s3, whose IP address is 192.168.0.18. + +These are the typical tasks that you would have to perform in such a setting. Unless specified otherwise, the following tasks should be performed in router #2: + +Make sure all NICs have been properly installed: + + # ip link show + +If one of them is down, bring it up: + + # ip link set dev enp0s8 up + +and assign an IP address in the 10.0.0.0/24 network to it: + + # ip addr add 10.0.0.17 dev enp0s8 + +Oops! We made a mistake in the IP address. We will have to remove the one we assigned earlier and then add the right one (10.0.0.18): + + # ip addr del 10.0.0.17 dev enp0s8 + # ip addr add 10.0.0.18 dev enp0s8 + +Now, please note that you can only add a route to a destination network through a gateway that is itself already reachable. For that reason, we need to assign an IP address within the 192.168.0.0/24 range to enp0s3 so that our RHEL 7 box can communicate with it: + + # ip addr add 192.168.0.19 dev enp0s3 + +Finally, we will need to enable packet forwarding: + + # echo "1" > /proc/sys/net/ipv4/ip_forward + +and stop / disable (just for the time being – until we cover packet filtering in the next article) the firewall: + + # systemctl stop firewalld + # systemctl disable firewalld + +Back in our RHEL 7 box (192.168.0.18), let’s configure a route to 10.0.0.0/24 through 192.168.0.19 (enp0s3 in router #2): + + # ip route add 10.0.0.0/24 via 192.168.0.19 + +After that, the routing table looks as follows: + + # ip route show + +![Show Network Routing Table](http://www.tecmint.com/wp-content/uploads/2015/07/Show-Network-Routing.png) + +Confirm Network Routing Table + +Likewise, add the corresponding route in the machine(s) you’re trying to reach in 10.0.0.0/24: + + # ip route add 192.168.0.0/24 via 10.0.0.18 + +You can test for basic connectivity using ping: + +In the RHEL 7 box, run + + # ping -c 4 10.0.0.20 + +where 10.0.0.20 is the IP address of a web server in the 10.0.0.0/24 network. + +In the web server (10.0.0.20), run + + # ping -c 192.168.0.18 + +where 192.168.0.18 is, as you will recall, the IP address of our RHEL 7 machine. + +Alternatively, we can use [tcpdump][4] (you may need to install it with yum install tcpdump) to check the 2-way communication over TCP between our RHEL 7 box and the web server at 10.0.0.20. + +To do so, let’s start the logging in the first machine with: + + # tcpdump -qnnvvv -i enp0s3 host 10.0.0.20 + +and from another terminal in the same system let’s telnet to port 80 in the web server (assuming Apache is listening on that port; otherwise, indicate the right port in the following command): + + # telnet 10.0.0.20 80 + +The tcpdump log should look as follows: + +![Check Network Communication between Servers](http://www.tecmint.com/wp-content/uploads/2015/07/Tcpdump-logs.png) + +Check Network Communication between Servers + +Where the connection has been properly initialized, as we can tell by looking at the 2-way communication between our RHEL 7 box (192.168.0.18) and the web server (10.0.0.20). + +Please remember that these changes will go away when you restart the system. If you want to make them persistent, you will need to edit (or create, if they don’t already exist) the following files, in the same systems where we performed the above commands. + +Though not strictly necessary for our test case, you should know that /etc/sysconfig/network contains system-wide network parameters. A typical /etc/sysconfig/network looks as follows: + + # Enable networking on this system? + NETWORKING=yes + # Hostname. Should match the value in /etc/hostname + HOSTNAME=yourhostnamehere + # Default gateway + GATEWAY=XXX.XXX.XXX.XXX + # Device used to connect to default gateway. Replace X with the appropriate number. + GATEWAYDEV=enp0sX + +When it comes to setting specific variables and values for each NIC (as we did for router #2), you will have to edit /etc/sysconfig/network-scripts/ifcfg-enp0s3 and /etc/sysconfig/network-scripts/ifcfg-enp0s8. + +Following our case, + + TYPE=Ethernet + BOOTPROTO=static + IPADDR=192.168.0.19 + NETMASK=255.255.255.0 + GATEWAY=192.168.0.1 + NAME=enp0s3 + ONBOOT=yes + +and + + TYPE=Ethernet + BOOTPROTO=static + IPADDR=10.0.0.18 + NETMASK=255.255.255.0 + GATEWAY=10.0.0.1 + NAME=enp0s8 + ONBOOT=yes + +for enp0s3 and enp0s8, respectively. + +As for routing in our client machine (192.168.0.18), we will need to edit /etc/sysconfig/network-scripts/route-enp0s3: + + 10.0.0.0/24 via 192.168.0.19 dev enp0s3 + +Now reboot your system and you should see that route in your table. + +### Summary ### + +In this article we have covered the essentials of static routing in Red Hat Enterprise Linux 7. Although scenarios may vary, the case presented here illustrates the required principles and the procedures to perform this task. Before wrapping up, I would like to suggest you to take a look at [Chapter 4][5] of the Securing and Optimizing Linux section in The Linux Documentation Project site for further details on the topics covered here. + +Free ebook on Securing & Optimizing Linux: The Hacking Solution (v.3.0) – This 800+ eBook contains comprehensive collection of Linux security tips and how to use them safely and easily to configure Linux-based applications and services. + +![Linux Security and Optimization Book](http://www.tecmint.com/wp-content/uploads/2015/07/Linux-Security-Optimization-Book.gif) + +Linux Security and Optimization Book + +[Download Now][6] + +In the next article we will talk about packet filtering and network address translation to sum up the networking basic skills needed for the RHCE certification. + +As always, we look forward to hearing from you, so feel free to leave your questions, comments, and suggestions using the form below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/how-to-setup-and-configure-static-network-routing-in-rhel/ + +作者:[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/rhcsa-exam-reviewing-essential-commands-system-documentation/ +[2]:https://www.redhat.com/en/services/certification/rhce +[3]:http://www.tecmint.com/ip-command-examples/ +[4]:http://www.tecmint.com/12-tcpdump-commands-a-network-sniffer-tool/ +[5]:http://www.tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/net-manage.html +[6]:http://tecmint.tradepub.com/free/w_opeb01/prgm.cgi \ No newline at end of file diff --git a/sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md b/sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md new file mode 100644 index 0000000000..8a5f4e6cf4 --- /dev/null +++ b/sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md @@ -0,0 +1,177 @@ +Part 2 - How to Perform Packet Filtering, Network Address Translation and Set Kernel Runtime Parameters +================================================================================ +As promised in Part 1 (“[Setup Static Network Routing][1]”), in this article (Part 2 of RHCE series) we will begin by introducing the principles of packet filtering and network address translation (NAT) in Red Hat Enterprise Linux 7, before diving into setting runtime kernel parameters to modify the behavior of a running kernel if certain conditions change or needs arise. + +![Network Packet Filtering in RHEL](http://www.tecmint.com/wp-content/uploads/2015/07/Network-Packet-Filtering-in-RHEL.jpg) + +RHCE: Network Packet Filtering – Part 2 + +### Network Packet Filtering in RHEL 7 ### + +When we talk about packet filtering, we refer to a process performed by a firewall in which it reads the header of each data packet that attempts to pass through it. Then, it filters the packet by taking the required action based on rules that have been previously defined by the system administrator. + +As you probably know, beginning with RHEL 7, the default service that manages firewall rules is [firewalld][2]. Like iptables, it talks to the netfilter module in the Linux kernel in order to examine and manipulate network packets. Unlike iptables, updates can take effect immediately without interrupting active connections – you don’t even have to restart the service. + +Another advantage of firewalld is that it allows us to define rules based on pre-configured service names (more on that in a minute). + +In Part 1, we used the following scenario: + +![Static Routing Network Diagram](http://www.tecmint.com/wp-content/uploads/2015/07/Static-Routing-Network-Diagram.png) + +Static Routing Network Diagram + +However, you will recall that we disabled the firewall on router #2 to simplify the example since we had not covered packet filtering yet. Let’s see now how we can enable incoming packets destined for a specific service or port in the destination. + +First, let’s add a permanent rule to allow inbound traffic in enp0s3 (192.168.0.19) to enp0s8 (10.0.0.18): + + # firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i enp0s3 -o enp0s8 -j ACCEPT + +The above command will save the rule to /etc/firewalld/direct.xml: + + # cat /etc/firewalld/direct.xml + +![Check Firewalld Saved Rules in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Firewalld-Save-Rules.png) + +Check Firewalld Saved Rules + +Then enable the rule for it to take effect immediately: + + # firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i enp0s3 -o enp0s8 -j ACCEPT + +Now you can telnet to the web server from the RHEL 7 box and run [tcpdump][3] again to monitor the TCP traffic between the two machines, this time with the firewall in router #2 enabled. + + # telnet 10.0.0.20 80 + # tcpdump -qnnvvv -i enp0s3 host 10.0.0.20 + +What if you want to only allow incoming connections to the web server (port 80) from 192.168.0.18 and block connections from other sources in the 192.168.0.0/24 network? + +In the web server’s firewall, add the following rules: + + # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.18/24" service name="http" accept' + # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.18/24" service name="http" accept' --permanent + # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.0/24" service name="http" drop' + # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.0/24" service name="http" drop' --permanent + +Now you can make HTTP requests to the web server, from 192.168.0.18 and from some other machine in 192.168.0.0/24. In the first case the connection should complete successfully, whereas in the second it will eventually timeout. + +To do so, any of the following commands will do the trick: + + # telnet 10.0.0.20 80 + # wget 10.0.0.20 + +I strongly advise you to check out the [Firewalld Rich Language][4] documentation in the Fedora Project Wiki for further details on rich rules. + +### Network Address Translation in RHEL 7 ### + +Network Address Translation (NAT) is the process where a group of computers (it can also be just one of them) in a private network are assigned an unique public IP address. As result, they are still uniquely identified by their own private IP address inside the network but to the outside they all “seem” the same. + +In addition, NAT makes it possible that computers inside a network sends requests to outside resources (like the Internet) and have the corresponding responses be sent back to the source system only. + +Let’s now consider the following scenario: + +![Network Address Translation in RHEL](http://www.tecmint.com/wp-content/uploads/2015/07/Network-Address-Translation-Diagram.png) + +Network Address Translation + +In router #2, we will move the enp0s3 interface to the external zone, and enp0s8 to the internal zone, where masquerading, or NAT, is enabled by default: + + # firewall-cmd --list-all --zone=external + # firewall-cmd --change-interface=enp0s3 --zone=external + # firewall-cmd --change-interface=enp0s3 --zone=external --permanent + # firewall-cmd --change-interface=enp0s8 --zone=internal + # firewall-cmd --change-interface=enp0s8 --zone=internal --permanent + +For our current setup, the internal zone – along with everything that is enabled in it will be the default zone: + + # firewall-cmd --set-default-zone=internal + +Next, let’s reload firewall rules and keep state information: + + # firewall-cmd --reload + +Finally, let’s add router #2 as default gateway in the web server: + + # ip route add default via 10.0.0.18 + +You can now verify that you can ping router #1 and an external site (tecmint.com, for example) from the web server: + + # ping -c 2 192.168.0.1 + # ping -c 2 tecmint.com + +![Verify Network Routing](http://www.tecmint.com/wp-content/uploads/2015/07/Verify-Network-Routing.png) + +Verify Network Routing + +### Setting Kernel Runtime Parameters in RHEL 7 ### + +In Linux, you are allowed to change, enable, and disable the kernel runtime parameters, and RHEL is no exception. The /proc/sys interface (sysctl) lets you set runtime parameters on-the-fly to modify the system’s behavior without much hassle when operating conditions change. + +To do so, the echo shell built-in is used to write to files inside /proc/sys/, where is most likely one of the following directories: + +- dev: parameters for specific devices connected to the machine. +- fs: filesystem configuration (quotas and inodes, for example). +- kernel: kernel-specific configuration. +- net: network configuration. +- vm: use of the kernel’s virtual memory. + +To display the list of all the currently available values, run + + # sysctl -a | less + +In Part 1, we changed the value of the net.ipv4.ip_forward parameter by doing + + # echo 1 > /proc/sys/net/ipv4/ip_forward + +in order to allow a Linux machine to act as router. + +Another runtime parameter that you may want to set is kernel.sysrq, which enables the Sysrq key in your keyboard to instruct the system to perform gracefully some low-level functions, such as rebooting the system if it has frozen for some reason: + + # echo 1 > /proc/sys/kernel/sysrq + +To display the value of a specific parameter, use sysctl as follows: + + # sysctl + +For example, + + # sysctl net.ipv4.ip_forward + # sysctl kernel.sysrq + +Some parameters, such as the ones mentioned above, require only one value, whereas others (for example, fs.inode-state) require multiple values: + +![Check Kernel Parameters in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Kernel-Parameters.png) + +Check Kernel Parameters + +In either case, you need to read the kernel’s documentation before making any changes. + +Please note that these settings will go away when the system is rebooted. To make these changes permanent, we will need to add .conf files inside the /etc/sysctl.d as follows: + + # echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/10-forward.conf + +(where the number 10 indicates the order of processing relative to other files in the same directory). + +and enable the changes with + + # sysctl -p /etc/sysctl.d/10-forward.conf + +### Summary ### + +In this tutorial we have explained the basics of packet filtering, network address translation, and setting kernel runtime parameters on a running system and persistently across reboots. I hope you have found this information useful, and as always, we look forward to hearing from you! +Don’t hesitate to share with us your questions, comments, or suggestions using the form below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/perform-packet-filtering-network-address-translation-and-set-kernel-runtime-parameters-in-rhel/ + +作者:[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/how-to-setup-and-configure-static-network-routing-in-rhel/ +[2]:http://www.tecmint.com/firewalld-rules-for-centos-7/ +[3]:http://www.tecmint.com/12-tcpdump-commands-a-network-sniffer-tool/ +[4]:https://fedoraproject.org/wiki/Features/FirewalldRichLanguage \ No newline at end of file diff --git a/sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md b/sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md new file mode 100644 index 0000000000..34693ea6bf --- /dev/null +++ b/sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md @@ -0,0 +1,182 @@ +Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets +================================================================================ +As a system engineer, you will often need to produce reports that show the utilization of your system’s resources in order to make sure that: 1) they are being utilized optimally, 2) prevent bottlenecks, and 3) ensure scalability, among other reasons. + +![Monitor Linux Performance Activity Reports](http://www.tecmint.com/wp-content/uploads/2015/08/Monitor-Linux-Performance-Activity-Reports.jpg) + +RHCE: Monitor Linux Performance Activity Reports – Part 3 + +Besides the well-known native Linux tools that are used to check disk, memory, and CPU usage – to name a few examples, Red Hat Enterprise Linux 7 provides two additional toolsets to enhance the data you can collect for your reports: sysstat and dstat. + +In this article we will describe both, but let’s first start by reviewing the usage of the classic tools. + +### Native Linux Tools ### + +With df, you will be able to report disk space and inode usage of by filesystem. You need to monitor both because a lack of space will prevent you from being able to save further files (and may even cause the system to crash), just like running out of inodes will mean you can’t link further files with their corresponding data structures, thus producing the same effect: you won’t be able to save those files to disk. + + # df -h [Display output in human-readable form] + # df -h --total [Produce a grand total] + +![Check Linux Total Disk Usage](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Total-Disk-Usage.png) + +Check Linux Total Disk Usage + + # df -i [Show inode count by filesystem] + # df -i --total [Produce a grand total] + +![Check Linux Total inode Numbers](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Total-inode-Numbers.png) + +Check Linux Total inode Numbers + +With du, you can estimate file space usage by either file, directory, or filesystem. + +For example, let’s see how much space is used by the /home directory, which includes all of the user’s personal files. The first command will return the overall space currently used by the entire /home directory, whereas the second will also display a disaggregated list by sub-directory as well: + + # du -sch /home + # du -sch /home/* + +![Check Linux Directory Disk Size](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Directory-Disk-Size.png) + +Check Linux Directory Disk Size + +Don’t Miss: + +- [12 ‘df’ Command Examples to Check Linux Disk Space Usage][1] +- [10 ‘du’ Command Examples to Find Disk Usage of Files/Directories][2] + +Another utility that can’t be missing from your toolset is vmstat. It will allow you to see at a quick glance information about processes, CPU and memory usage, disk activity, and more. + +If run without arguments, vmstat will return averages since the last reboot. While you may use this form of the command once in a while, it will be more helpful to take a certain amount of system utilization samples, one after another, with a defined time separation between samples. + +For example, + + # vmstat 5 10 + +will return 10 samples taken every 5 seconds: + +![Check Linux System Performance](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Systerm-Performance.png) + +Check Linux System Performance + +As you can see in the above picture, the output of vmstat is divided by columns: procs (processes), memory, swap, io, system, and cpu. The meaning of each field can be found in the FIELD DESCRIPTION sections in the man page of vmstat. + +Where can vmstat come in handy? Let’s examine the behavior of the system before and during a yum update: + + # vmstat -a 1 5 + +![Vmstat Linux Performance Monitoring](http://www.tecmint.com/wp-content/uploads/2015/08/Vmstat-Linux-Peformance-Monitoring.png) + +Vmstat Linux Performance Monitoring + +Please note that as files are being modified on disk, the amount of active memory increases and so does the number of blocks written to disk (bo) and the CPU time that is dedicated to user processes (us). + +Or during the saving process of a large file directly to disk (caused by dsync): + + # vmstat -a 1 5 + # dd if=/dev/zero of=dummy.out bs=1M count=1000 oflag=dsync + +![VmStat Linux Disk Performance Monitoring](http://www.tecmint.com/wp-content/uploads/2015/08/VmStat-Linux-Disk-Performance-Monitoring.png) + +VmStat Linux Disk Performance Monitoring + +In this case, we can see a yet larger number of blocks being written to disk (bo), which was to be expected, but also an increase of the amount of CPU time that it has to wait for I/O operations to complete before processing tasks (wa). + +**Don’t Miss**: [Vmstat – Linux Performance Monitoring][3] + +### Other Linux Tools ### + +As mentioned in the introduction of this chapter, there are other tools that you can use to check the system status and utilization (they are not only provided by Red Hat but also by other major distributions from their officially supported repositories). + +The sysstat package contains the following utilities: + +- sar (collect, report, or save system activity information). +- sadf (display data collected by sar in multiple formats). +- mpstat (report processors related statistics). +- iostat (report CPU statistics and I/O statistics for devices and partitions). +- pidstat (report statistics for Linux tasks). +- nfsiostat (report input/output statistics for NFS). +- cifsiostat (report CIFS statistics) and +- sa1 (collect and store binary data in the system activity daily data file. +- sa2 (write a daily report in the /var/log/sa directory) tools. + +whereas dstat adds some extra features to the functionality provided by those tools, along with more counters and flexibility. You can find an overall description of each tool by running yum info sysstat or yum info dstat, respectively, or checking the individual man pages after installation. + +To install both packages: + + # yum update && yum install sysstat dstat + +The main configuration file for sysstat is /etc/sysconfig/sysstat. You will find the following parameters in that file: + + # How long to keep log files (in days). + # If value is greater than 28, then log files are kept in + # multiple directories, one for each month. + HISTORY=28 + # Compress (using gzip or bzip2) sa and sar files older than (in days): + COMPRESSAFTER=31 + # Parameters for the system activity data collector (see sadc manual page) + # which are used for the generation of log files. + SADC_OPTIONS="-S DISK" + # Compression program to use. + ZIP="bzip2" + +When sysstat is installed, two cron jobs are added and enabled in /etc/cron.d/sysstat. The first job runs the system activity accounting tool every 10 minutes and stores the reports in /var/log/sa/saXX where XX is the day of the month. + +Thus, /var/log/sa/sa05 will contain all the system activity reports from the 5th of the month. This assumes that we are using the default value in the HISTORY variable in the configuration file above: + + */10 * * * * root /usr/lib64/sa/sa1 1 1 + +The second job generates a daily summary of process accounting at 11:53 pm every day and stores it in /var/log/sa/sarXX files, where XX has the same meaning as in the previous example: + + 53 23 * * * root /usr/lib64/sa/sa2 -A + +For example, you may want to output system statistics from 9:30 am through 5:30 pm of the sixth of the month to a .csv file that can easily be viewed using LibreOffice Calc or Microsoft Excel (this approach will also allow you to create charts or graphs): + + # sadf -s 09:30:00 -e 17:30:00 -dh /var/log/sa/sa06 -- | sed 's/;/,/g' > system_stats20150806.csv + +You could alternatively use the -j flag instead of -d in the sadf command above to output the system stats in JSON format, which could be useful if you need to consume the data in a web application, for example. + +![Linux System Statistics](http://www.tecmint.com/wp-content/uploads/2015/08/Linux-System-Statistics.png) + +Linux System Statistics + +Finally, let’s see what dstat has to offer. Please note that if run without arguments, dstat assumes -cdngy by default (short for CPU, disk, network, memory pages, and system stats, respectively), and adds one line every second (execution can be interrupted anytime with Ctrl + C): + + # dstat + +![Linux Disk Statistics Monitoring](http://www.tecmint.com/wp-content/uploads/2015/08/dstat-command.png) + +Linux Disk Statistics Monitoring + +To output the stats to a .csv file, use the –output flag followed by a file name. Let’s see how this looks on LibreOffice Calc: + +![Monitor Linux Statistics Output](http://www.tecmint.com/wp-content/uploads/2015/08/Monitor-Linux-Statistics-Output.png) + +Monitor Linux Statistics Output + +I strongly advise you to check out the man page of dstat, included with this article along with the man page of sysstat in PDF format for your reading convenience. You will find several other options that will help you create custom and detailed system activity reports. + +**Don’t Miss**: [Sysstat – Linux Usage Activity Monitoring Tool][4] + +### Summary ### + +In this guide we have explained how to use both native Linux tools and specific utilities provided with RHEL 7 in order to produce reports on system utilization. At one point or another, you will come to rely on these reports as best friends. + +You will probably have used other tools that we have not covered in this tutorial. If so, feel free to share them with the rest of the community along with any other suggestions / questions / comments that you may have- using the form below. + +We look forward to hearing from you. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-performance-monitoring-and-file-system-statistics-reports/ + +作者:[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/how-to-check-disk-space-in-linux/ +[2]:http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ +[3]:http://www.tecmint.com/linux-performance-monitoring-with-vmstat-and-iostat-commands/ +[4]:http://www.tecmint.com/install-sysstat-in-linux/ \ No newline at end of file From eaecf395ae651fbf78bef16e9acc27cea0e636c0 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 12 Aug 2015 16:39:28 +0800 Subject: [PATCH 1698/2517] =?UTF-8?q?20150812-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...edule a Job and Watch Commands in Linux.md | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md diff --git a/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md b/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md new file mode 100644 index 0000000000..1ad92c594b --- /dev/null +++ b/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md @@ -0,0 +1,143 @@ +Linux Tricks: Play Game in Chrome, Text-to-Speech, Schedule a Job and Watch Commands in Linux +================================================================================ +Here again, I have compiled a list of four things under [Linux Tips and Tricks][1] series you may do to remain more productive and entertained with Linux Environment. + +![Linux Tips and Tricks Series](http://www.tecmint.com/wp-content/uploads/2015/08/Linux-Tips-and-Tricks.png) + +Linux Tips and Tricks Series + +The topics I have covered includes Google-chrome inbuilt small game, Text-to-speech in Linux Terminal, Quick job scheduling using ‘at‘ command and watch a command at regular interval. + +### 1. Play A Game in Google Chrome Browser ### + +Very often when there is a power shedding or no network due to some other reason, I don’t put my Linux box into maintenance mode. I keep myself engage in a little fun game by Google Chrome. I am not a gamer and hence I have not installed third-party creepy games. Security is another concern. + +So when there is Internet related issue and my web page seems something like this: + +![Unable to Connect Internet](http://www.tecmint.com/wp-content/uploads/2015/08/Unable-to-Connect-Internet.png) + +Unable to Connect Internet + +You may play the Google-chrome inbuilt game simply by hitting the space-bar. There is no limitation for the number of times you can play. The best thing is you need not break a sweat installing and using it. + +No third-party application/plugin required. It should work well on other platforms like Windows and Mac but our niche is Linux and I’ll talk about Linux only and mind it, it works well on Linux. It is a very simple game (a kind of time pass). + +Use Space-Bar/Navigation-up-key to jump. A glimpse of the game in action. + +![Play Game in Google Chrome](http://www.tecmint.com/wp-content/uploads/2015/08/Play-Game-in-Google-Chrome.gif) + +Play Game in Google Chrome + +### 2. Text to Speech in Linux Terminal ### + +For those who may not be aware of espeak utility, It is a Linux command-line text to speech converter. Write anything in a variety of languages and espeak utility will read it loud for you. + +Espeak should be installed in your system by default, however it is not installed for your system, you may do: + + # apt-get install espeak (Debian) + # yum install espeak (CentOS) + # dnf install espeak (Fedora 22 onwards) + +You may ask espeak to accept Input Interactively from standard Input device and convert it to speech for you. You may do: + + $ espeak [Hit Return Key] + +For detailed output you may do: + + $ espeak --stdout | aplay [Hit Return Key][Double - Here] + +espeak is flexible and you can ask espeak to accept input from a text file and speak it loud for you. All you need to do is: + + $ espeak --stdout /path/to/text/file/file_name.txt | aplay [Hit Enter] + +You may ask espeak to speak fast/slow for you. The default speed is 160 words per minute. Define your preference using switch ‘-s’. + +To ask espeak to speak 30 words per minute, you may do: + + $ espeak -s 30 -f /path/to/text/file/file_name.txt | aplay + +To ask espeak to speak 200 words per minute, you may do: + + $ espeak -s 200 -f /path/to/text/file/file_name.txt | aplay + +To use another language say Hindi (my mother tongue), you may do: + + $ espeak -v hindi --stdout 'टेकमिंट विश्व की एक बेहतरीन लाइंक्स आधारित वेबसाइट है|' | aplay + +You may choose any language of your preference and ask to speak in your preferred language as suggested above. To get the list of all the languages supported by espeak, you need to run: + + $ espeak --voices + +### 3. Quick Schedule a Job ### + +Most of us are already familiar with [cron][2] which is a daemon to execute scheduled commands. + +Cron is an advanced command often used by Linux SYSAdmins to schedule a job such as Backup or practically anything at certain time/interval. + +Are you aware of ‘at’ command in Linux which lets you schedule a job/command to run at specific time? You can tell ‘at’ what to do and when to do and everything else will be taken care by command ‘at’. + +For an example, say you want to print the output of uptime command at 11:02 AM, All you need to do is: + + $ at 11:02 + uptime >> /home/$USER/uptime.txt + Ctrl+D + +![Schedule Job in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Schedule-Job-in-Linux.png) + +Schedule Job in Linux + +To check if the command/script/job has been set or not by ‘at’ command, you may do: + + $ at -l + +![View Scheduled Jobs](http://www.tecmint.com/wp-content/uploads/2015/08/View-Scheduled-Jobs.png) + +View Scheduled Jobs + +You may schedule more than one command in one go using at, simply as: + + $ at 12:30 + Command – 1 + Command – 2 + … + command – 50 + … + Ctrl + D + +### 4. Watch a Command at Specific Interval ### + +We need to run some command for specified amount of time at regular interval. Just for example say we need to print the current time and watch the output every 3 seconds. + +To see current time we need to run the below command in terminal. + + $ date +"%H:%M:%S + +![Check Date and Time in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Date-in-Linux.png) + +Check Date and Time in Linux + +and to check the output of this command every three seconds, we need to run the below command in Terminal. + + $ watch -n 3 'date +"%H:%M:%S"' + +![Watch Command in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Watch-Command-in-Linux.gif) + +Watch Command in Linux + +The switch ‘-n’ in watch command is for Interval. In the above example we defined Interval to be 3 sec. You may define yours as required. Also you may pass any command/script with watch command to watch that command/script at the defined interval. + +That’s all for now. Hope you are like this series that aims at making you more productive with Linux and that too with fun inside. All the suggestions are welcome in the comments below. Stay tuned for more such posts. Keep connected and Enjoy… + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/text-to-speech-in-terminal-schedule-a-job-and-watch-commands-in-linux/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/tag/linux-tricks/ +[2]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ \ No newline at end of file From 4ea6ca5ad27848c8bed914a6ffa5ea4ee08016d5 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Wed, 12 Aug 2015 19:57:08 +0800 Subject: [PATCH 1699/2517] [Translated]20150811 How to download apk files from Google Play Store on Linux.md --- ...k files from Google Play Store on Linux.md | 101 ------------------ ...k files from Google Play Store on Linux.md | 99 +++++++++++++++++ 2 files changed, 99 insertions(+), 101 deletions(-) delete mode 100644 sources/tech/20150811 How to download apk files from Google Play Store on Linux.md create mode 100644 translated/tech/20150811 How to download apk files from Google Play Store on Linux.md diff --git a/sources/tech/20150811 How to download apk files from Google Play Store on Linux.md b/sources/tech/20150811 How to download apk files from Google Play Store on Linux.md deleted file mode 100644 index 50bf618e86..0000000000 --- a/sources/tech/20150811 How to download apk files from Google Play Store on Linux.md +++ /dev/null @@ -1,101 +0,0 @@ -FSSlc translating - -How to download apk files from Google Play Store on Linux -================================================================================ -Suppose you want to install an Android app on your Android device. However, for whatever reason, you cannot access Google Play Store on the Android device. What can you do then? One way to install the app without Google Play Store access is to download its APK file using some other means, and then [install the APK][1] file on the Android device manually. - -There are several ways to download official APK files from Google Play Store on non-Android devices such as regular computers and laptops. For example, there are browser plugins (e.g., for [Chrome][2] or [Firefox][3]) or online APK archives that allow you to download APK files using a web browser. If you do not trust these closed-source plugins or third-party APK repositories, there is yet another way to download official APK files manually, and that is via an open-source Linux app called [GooglePlayDownloader][4]. - -GooglePlayDownloader is a Python-based GUI application that enables you to search and download APK files from Google Play Store. Since this is completely open-source, you can be assured while using it. In this tutorial, I am going to show how to download an APK file from Google Play Store using GooglePlayDownloader in Linux environment. - -### Python requirement ### - -GooglePlayDownloader requires Python with SNI (Server Name Indication) support for SSL/TLS communication. This feature comes with Python 2.7.9 or higher. This leaves out older distributions such as Debian 7 Wheezy or earlier, Ubuntu 14.04 or earlier, or CentOS/RHEL 7 or earlier. Assuming that you have a Linux distribution with Python 2.7.9 or higher, proceed to install GooglePlayDownloader as follows. - -### Install GooglePlayDownloader on Ubuntu ### - -On Ubuntu, you can use the official deb build. One catch is that you may need to install one required dependency manually. - -#### On Ubuntu 14.10 #### - -Download [python-ndg-httpsclient][5] deb package, which is a missing dependency on older Ubuntu distributions. Also download GooglePlayDownloader's official deb package. - - $ wget http://mirrors.kernel.org/ubuntu/pool/main/n/ndg-httpsclient/python-ndg-httpsclient_0.3.2-1ubuntu4_all.deb - $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7-1_all.deb - -We are going to use [gdebi command][6] to install those two deb files as follows. The gdebi command will automatically handle any other dependencies. - - $ sudo apt-get install gdebi-core - $ sudo gdebi python-ndg-httpsclient_0.3.2-1ubuntu4_all.deb - $ sudo gdebi googleplaydownloader_1.7-1_all.deb - -#### On Ubuntu 15.04 or later #### - -Recent Ubuntu distributions ship all required dependencies, and thus the installation is straightforward as follows. - - $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7-1_all.deb - $ sudo apt-get install gdebi-core - $ sudo gdebi googleplaydownloader_1.7-1_all.deb - -### Install GooglePlayDownloader on Debian ### - -Due to its Python requirement, GooglePlayDownloader cannot be installed on Debian 7 Wheezy or earlier unless you upgrade its stock Python. - -#### On Debian 8 Jessie and higher: #### - - $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7-1_all.deb - $ sudo apt-get install gdebi-core - $ sudo gdebi googleplaydownloader_1.7-1_all.deb - -### Install GooglePlayDownloader on Fedora ### - -Since GooglePlayDownloader was originally developed for Debian based distributions, you need to install it from the source if you want to use it on Fedora. - -First, install necessary dependencies. - - $ sudo yum install python-pyasn1 wxPython python-ndg_httpsclient protobuf-python python-requests - -Then install it as follows. - - $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7.orig.tar.gz - $ tar -xvf googleplaydownloader_1.7.orig.tar.gz - $ cd googleplaydownloader-1.7 - $ chmod o+r -R . - $ sudo python setup.py install - $ sudo sh -c "echo 'python /usr/lib/python2.7/site-packages/googleplaydownloader-1.7-py2.7.egg/googleplaydownloader/googleplaydownloader.py' > /usr/bin/googleplaydownloader" - -### Download APK Files from Google Play Store with GooglePlayDownloader ### - -Once you installed GooglePlayDownloader, you can download APK files from Google Play Store as follows. - -First launch the app by typing: - - $ googleplaydownloader - -![](https://farm1.staticflickr.com/425/20229024898_105396fa68_b.jpg) - -At the search bar, type the name of the app you want to download from Google Play Store. - -![](https://farm1.staticflickr.com/503/20230360479_925f5da613_b.jpg) - -Once you find the app in the search list, choose the app, and click on "Download selected APK(s)" button. You will find the downloaded APK file in your home directory. Now you can move the APK file to the Android device of your choice, and install it manually. - -Hope this helps. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/download-apk-files-google-play-store.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://xmodulo.com/how-to-install-apk-file-on-android-phone-or-tablet.html -[2]:https://chrome.google.com/webstore/detail/apk-downloader/cgihflhdpokeobcfimliamffejfnmfii -[3]:https://addons.mozilla.org/en-us/firefox/addon/apk-downloader/ -[4]:http://codingteam.net/project/googleplaydownloader -[5]:http://packages.ubuntu.com/vivid/python-ndg-httpsclient -[6]:http://xmodulo.com/how-to-install-deb-file-with-dependencies.html diff --git a/translated/tech/20150811 How to download apk files from Google Play Store on Linux.md b/translated/tech/20150811 How to download apk files from Google Play Store on Linux.md new file mode 100644 index 0000000000..670c0f331b --- /dev/null +++ b/translated/tech/20150811 How to download apk files from Google Play Store on Linux.md @@ -0,0 +1,99 @@ +如何在 Linux 中从 Google Play 商店里下载 apk 文件 +================================================================================ +假设你想在你的 Android 设备中安装一个 Android 应用,然而由于某些原因,你不能在 Andor 设备上访问 Google Play 商店。接着你该怎么做呢?在不访问 Google Play 商店的前提下安装应用的一种可能的方法是使用其他的手段下载该应用的 APK 文件,然后手动地在 Android 设备上 [安装 APK 文件][1]。 + +在非 Android 设备如常规的电脑和笔记本电脑上,有着几种方式来从 Google Play 商店下载到官方的 APK 文件。例如,使用浏览器插件(例如, 针对 [Chrome][2] 或针对 [Firefox][3] 的插件) 或利用允许你使用浏览器下载 APK 文件的在线的 APK 存档等。假如你不信任这些闭源的插件或第三方的 APK 仓库,这里有另一种手动下载官方 APK 文件的方法,它使用一个名为 [GooglePlayDownloader][4] 的开源 Linux 应用。 + +GooglePlayDownloader 是一个基于 Python 的 GUI 应用,使得你可以从 Google Play 商店上搜索和下载 APK 文件。由于它是完全开源的,你可以放心地使用它。在本篇教程中,我将展示如何在 Linux 环境下,使用 GooglePlayDownloader 来从 Google Play 商店下载 APK 文件。 + +### Python 需求 ### + +GooglePlayDownloader 需要使用 Python 中 SSL 模块的扩展 SNI(服务器名称指示) 来支持 SSL/TLS 通信,该功能由 Python 2.7.9 或更高版本带来。这使得一些旧的发行版本如 Debian 7 Wheezy 及早期版本,Ubuntu 14.04 及早期版本或 CentOS/RHEL 7 及早期版本均不能满足该要求。假设你已经有了一个带有 Python 2.7.9 或更高版本的发行版本,可以像下面这样接着安装 GooglePlayDownloader。 + +### 在 Ubuntu 上安装 GooglePlayDownloader ### + +在 Ubuntu 上,你可以使用官方构建的 deb 包。有一个条件是你可能需要手动地安装一个必需的依赖。 + +#### 在 Ubuntu 14.10 上 #### + +下载 [python-ndg-httpsclient][5] deb 软件包,这在旧一点的 Ubuntu 发行版本中是一个缺失的依赖。同时还要下载 GooglePlayDownloader 的官方 deb 软件包。 + + $ wget http://mirrors.kernel.org/ubuntu/pool/main/n/ndg-httpsclient/python-ndg-httpsclient_0.3.2-1ubuntu4_all.deb + $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7-1_all.deb + +如下所示,我们将使用 [gdebi 命令][6] 来安装这两个 deb 文件。 gedbi 命令将自动地处理任何其他的依赖。 + + $ sudo apt-get install gdebi-core + $ sudo gdebi python-ndg-httpsclient_0.3.2-1ubuntu4_all.deb + $ sudo gdebi googleplaydownloader_1.7-1_all.deb + +#### 在 Ubuntu 15.04 或更新的版本上 #### + +最近的 Ubuntu 发行版本上已经配备了所有需要的依赖,所以安装过程可以如下面那样直接进行。 + + $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7-1_all.deb + $ sudo apt-get install gdebi-core + $ sudo gdebi googleplaydownloader_1.7-1_all.deb + +### 在 Debian 上安装 GooglePlayDownloader ### + +由于其 Python 需求, Googleplaydownloader 不能被安装到 Debian 7 Wheezy 或早期版本上,除非你升级了它自备的 Python 版本。 + +#### 在 Debian 8 Jessie 及更高版本上: #### + + $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7-1_all.deb + $ sudo apt-get install gdebi-core + $ sudo gdebi googleplaydownloader_1.7-1_all.deb + +### 在 Fedora 上安装 GooglePlayDownloader ### + +由于 GooglePlayDownloader 原本是针对基于 Debian 的发行版本所开发的,假如你想在 Fedora 上使用它,你需要从它的源码开始安装。 + +首先安装必需的依赖。 + + $ sudo yum install python-pyasn1 wxPython python-ndg_httpsclient protobuf-python python-requests + +然后像下面这样安装它。 + + $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7.orig.tar.gz + $ tar -xvf googleplaydownloader_1.7.orig.tar.gz + $ cd googleplaydownloader-1.7 + $ chmod o+r -R . + $ sudo python setup.py install + $ sudo sh -c "echo 'python /usr/lib/python2.7/site-packages/googleplaydownloader-1.7-py2.7.egg/googleplaydownloader/googleplaydownloader.py' > /usr/bin/googleplaydownloader" + +### 使用 GooglePlayDownloader 从 Google Play 商店下载 APK 文件 ### + +一旦你安装好 GooglePlayDownloader 后,你就可以像下面那样从 Google Play 商店下载 APK 文件。 + +首先通过输入下面的命令来启动该应用: + + $ googleplaydownloader + +![](https://farm1.staticflickr.com/425/20229024898_105396fa68_b.jpg) + +在搜索栏中,输入你想从 Google Play 商店下载的应用的名称。 + +![](https://farm1.staticflickr.com/503/20230360479_925f5da613_b.jpg) + +一旦你从搜索列表中找到了该应用,就选择该应用,接着点击 "下载选定的 APK 文件" 按钮。最后你将在你的家目录中找到下载的 APK 文件。现在,你就可以将下载到的 APK 文件转移到你所选择的 Android 设备上,然后手动安装它。 + +希望这篇教程对你有所帮助。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/download-apk-files-google-play-store.html + +作者:[Dan Nanni][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-install-apk-file-on-android-phone-or-tablet.html +[2]:https://chrome.google.com/webstore/detail/apk-downloader/cgihflhdpokeobcfimliamffejfnmfii +[3]:https://addons.mozilla.org/en-us/firefox/addon/apk-downloader/ +[4]:http://codingteam.net/project/googleplaydownloader +[5]:http://packages.ubuntu.com/vivid/python-ndg-httpsclient +[6]:http://xmodulo.com/how-to-install-deb-file-with-dependencies.html From c80b246c12f9be9c9dea4267d399b779f230a186 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Wed, 12 Aug 2015 20:01:28 +0800 Subject: [PATCH 1700/2517] Update RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...ment in RHEL 7--Boot Shutdown and Everything in Between.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md b/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md index 2befb7bc55..23bf9f0ac1 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md @@ -1,3 +1,5 @@ +FSSlc translating + RHCSA Series: Process Management in RHEL 7: Boot, Shutdown, and Everything in Between – Part 5 ================================================================================ We will start this article with an overall and brief revision of what happens since the moment you press the Power button to turn on your RHEL 7 server until you are presented with the login screen in a command line interface. @@ -213,4 +215,4 @@ via: http://www.tecmint.com/rhcsa-exam-boot-process-and-process-management/ [a]:http://www.tecmint.com/author/gacanepa/ [1]:http://www.tecmint.com/dmesg-commands/ [2]:http://www.tecmint.com/systemd-replaces-init-in-linux/ -[3]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ \ No newline at end of file +[3]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ From 69122f983c12c6911363b696af572a6d06a06d68 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 12 Aug 2015 23:10:47 +0800 Subject: [PATCH 1701/2517] =?UTF-8?q?[Translating]=20RHCE=20=E7=B3=BB?= =?UTF-8?q?=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... RHCE Series--How to Setup and Test Static Network Routing.md | 1 + ...work Address Translation and Set Kernel Runtime Parameters.md | 1 + ...e and Deliver System Activity Reports Using Linux Toolsets.md | 1 + 3 files changed, 3 insertions(+) diff --git a/sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md b/sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md index 03356f9dd1..731e78e5cf 100644 --- a/sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md +++ b/sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md @@ -1,3 +1,4 @@ +Translating by ictlyh Part 1 - RHCE Series: How to Setup and Test Static Network Routing ================================================================================ RHCE (Red Hat Certified Engineer) is a certification from Red Hat company, which gives an open source operating system and software to the enterprise community, It also gives training, support and consulting services for the companies. diff --git a/sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md b/sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md index 8a5f4e6cf4..cd798b906d 100644 --- a/sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md +++ b/sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md @@ -1,3 +1,4 @@ +Translating by ictlyh Part 2 - How to Perform Packet Filtering, Network Address Translation and Set Kernel Runtime Parameters ================================================================================ As promised in Part 1 (“[Setup Static Network Routing][1]”), in this article (Part 2 of RHCE series) we will begin by introducing the principles of packet filtering and network address translation (NAT) in Red Hat Enterprise Linux 7, before diving into setting runtime kernel parameters to modify the behavior of a running kernel if certain conditions change or needs arise. diff --git a/sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md b/sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md index 34693ea6bf..ea0157be4f 100644 --- a/sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md +++ b/sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md @@ -1,3 +1,4 @@ +Translating by ictlyh Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets ================================================================================ As a system engineer, you will often need to produce reports that show the utilization of your system’s resources in order to make sure that: 1) they are being utilized optimally, 2) prevent bottlenecks, and 3) ensure scalability, among other reasons. From 604582f47ad84aebdf1df2a0fef838c702f59086 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 12 Aug 2015 23:55:02 +0800 Subject: [PATCH 1702/2517] PUB:20141211 Open source all over the world MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @fyh 这篇不好翻译啊,翻译的不错! --- ...20141211 Open source all over the world.md | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) rename {translated/talk => published}/20141211 Open source all over the world.md (67%) diff --git a/translated/talk/20141211 Open source all over the world.md b/published/20141211 Open source all over the world.md similarity index 67% rename from translated/talk/20141211 Open source all over the world.md rename to published/20141211 Open source all over the world.md index 0abb08121f..e07db43680 100644 --- a/translated/talk/20141211 Open source all over the world.md +++ b/published/20141211 Open source all over the world.md @@ -2,8 +2,6 @@ ================================================================================ ![](https://opensource.com/sites/default/files/styles/image-full-size/public/images/business/BUS_OpenSourceExperience_520x292_cm.png) -图片来源 : opensource.com - 经过了一整天的Opensource.com[社区版主][1]年会,最后一项日程提了上来,内容只有“特邀嘉宾:待定”几个字。作为[Opensource.com][3]的项目负责人和社区管理员,[Jason Hibbets][2]起身解释道,“因为这个嘉宾有可能无法到场,因此我不想提前说是谁。在几个月前我问他何时有空过来,他给了我两个时间点,我选了其中一个。今天是这三周中Jim唯一能来的一天”。(译者注:Jim是指下文中提到的Jim Whitehurst,即红帽公司总裁兼首席执行官) 这句话在版主们(Moderators)中引起一阵轰动,他们从世界各地赶来参加此次的[拥抱开源大会(All Things Open Conference)][4]。版主们纷纷往前挪动椅子,仔细聆听。 @@ -14,7 +12,7 @@ “大家好!”,这个家伙开口了。他没穿正装,只是衬衫和休闲裤。 -这时会场中第二高个子的人,红帽全球意识部门(Global Awareness)的高级主管[Jeff Mackanic][5],告诉他大部分社区版本今天都在场,然后让每个人开始作简单的自我介绍。 +这时会场中第二高个子的人,红帽全球意识部门(Global Awareness)的高级主管[Jeff Mackanic][5],告诉他大部分社区版主今天都在场,然后让每个人开始作简单的自我介绍。 “我叫[Jen Wike Huger][6],负责Opensource.com的内容管理,很高兴见到大家。” @@ -22,13 +20,13 @@ “我叫[Robin][9],从2013年开始参与版主项目。我在OSDC做了一些事情,工作是在[City of the Hague][10]维护[网站][11]。” -“我叫[Marcus Hanwell][12],来自英格兰,在[Kitware][13]工作。同时,我是FOSS科学软件的技术总监,和国家实验室在[Titan][14] Z和[Gpu programming][15]方面合作。我主要使用[Gentoo][16]和[KDE][17]。最后,我很激动能加入FOSS和开源科学。” +“我叫[Marcus Hanwell][12],来自英格兰,在[Kitware][13]工作。同时,我是FOSS science software的技术总监,和国家实验室在[Titan][14] Z和[Gpu programming][15]方面合作。我主要使用[Gentoo][16]和[KDE][17]。最后,我很激动能参与到FOSS和开源科学。” -“我叫[Phil Shapiro][18],是华盛顿的一个小图书馆28个Linux工作站的管理员。我视各位为我的同事。非常高兴能一起交流分享,贡献力量。我主要关注FOSS和自豪感的关系,以及FOSS如何提升自豪感。” +“我叫[Phil Shapiro][18],是华盛顿的一个小图书馆的28个Linux工作站的管理员。我视各位为我的同事。非常高兴能一起交流分享,贡献力量。我主要关注FOSS和自豪感的关系,以及FOSS如何提升自豪感。” “我叫[Joshua Holm][19]。我大多数时间都在关注系统更新,以及帮助人们在网上找工作。” -“我叫[Mel Chernoff][20],在红帽工作,和[Jason Hibbets]和[Mark Bohannon]一起主要关注政府渠道方面。” +“我叫[Mel Chernoff][20],在红帽工作,和[Jason Hibbets][22]和[Mark Bohannon][23]一起主要关注[政府][21]渠道方面。” “我叫[Scott Nesbitt][24],写过很多东西,使用FOSS很久了。我是个普通人,不是系统管理员,也不是程序员,只希望能更加高效工作。我帮助人们在商业和生活中使用FOSS。” @@ -38,41 +36,41 @@ “你在[新FOSS Minor][30]教书?!”,Jim说道,“很酷!” -“我叫[Jason Baker][31]。我是红慢的一个云专家,主要做[OpenStack][32]方面的工作。” +“我叫[Jason Baker][31]。我是红帽的一个云专家,主要做[OpenStack][32]方面的工作。” “我叫[Mark Bohannan][33],是红帽全球开放协议的一员,在华盛顿外工作。和Mel一样,我花了相当多时间写作,也从法律和政府部门中找合作者。我做了一个很好的小册子来讨论正在发生在政府中的积极变化。” -“我叫[Jason Hibbets][34],我组织了这次会议。” +“我叫[Jason Hibbets][34],我组织了这次讨论。” 会场中一片笑声。 -“我也组织了这片讨论,可以这么说,”这个棕红色头发笑容灿烂的家伙说道。笑声持续一会逐渐平息。 +“我也组织了这个讨论,可以这么说,”这个棕红色头发笑容灿烂的家伙说道。笑声持续一会逐渐平息。 -我当时在他左边,时不时从转录空隙中抬头看一眼,然后从眼神中注意到微笑背后暗示的那个自2008年1月起开始领导公司的人,红帽的CEO[Jim Whitehurst][35]。 +我当时在他左边,时不时从记录的间隙中抬头看一眼,我注意到淡淡微笑背后的那个令人瞩目的人,是自2008年1月起开始领导红帽公司的CEO [Jim Whitehurst][35]。 -“我有世界上最好的工作,”稍稍向后靠、叉腿抱头,Whitehurst开始了演讲。“我开始领导红帽,在世界各地旅行到处看看情况。在这里的七年中,FOSS和广泛的开源创新所发生的美好的事情是开源已经脱离了条条框框。我现在认为,IT正处在FOSS之前所在的位置。我们可以预见FOSS从一个替代走向创新驱动力。”用户也看到了这一点。他们用FOSS并不是因为它便宜,而是因为它能提供和创新的解决方案。这也十一个全球现象。比如,我刚才还在印度,然后发现那里的用户拥抱开源的两个理由:一个是创新,另一个是那里的市场有些特殊,需要完全的控制。 +“我有世界上最好的工作,”稍稍向后靠、叉腿抱头,Whitehurst开始了演讲。“我开始领导红帽,在世界各地旅行到处看看情况。在这里的七年中,FOSS和广泛的开源创新所发生的最美好的事情是开源已经脱离了条条框框。我现在认为,信息技术正处在FOSS之前所在的位置。我们可以预见FOSS从一个替代品走向创新驱动力。我们的用户也看到了这一点。他们用FOSS并不是因为它便宜,而是因为它能带来可控和创新的解决方案。这也是个全球现象。比如,我刚才还在印度,然后发现那里的用户拥抱开源的两个理由:一个是创新,另一个是那里的市场有些特殊,需要完全的可控。” -“[孟买证券交易所][36]想得到源代码并加以控制,五年前这在证券交易领域闻所未闻。那时FOSS正在重复发明轮子。今天看来,FOSS正在做几乎所有的结合了大数据的事物。几乎所有的新框架,语言和方法论,包括流动(尽管不包括设备),都首先发生在开源世界。” +“[孟买证券交易所][36]想得到源代码并加以控制,五年前这种事情在证券交易领域就没有听说过。那时FOSS正在重复发明轮子。今天看来,实际上大数据的每件事情都出现在FOSS领域。几乎所有的新框架,语言和方法论,包括移动通讯(尽管不包括设备),都首先发生在开源世界。” -“这是因为用户数量已经达到了相当的规模。这不只是红帽遇到的情况,[Google][37],[Amazon][38],[Facebook][39]等也出现这样的情况。他们想解决自己的问题,用开源的方式。忘掉协议吧,开源绝不仅如此。我们建立了一个交通工具,一套规则,例如[Hadoop][40],[Cassandra][41]和其他工具。事实上,开源驱动创新。例如,Hadoop在厂商们意识的规模带来的问题。他们实际上有足够的资和资源金来解决自己的问题。”开源是许多领域的默认技术方案。这在一个更加注重内容的世界中更是如此,例如[3D打印][42]和其他使用信息内容的物理产品。” +“这是因为用户数量已经达到了相当的规模。这不只是红帽遇到的情况,[Google][37],[Amazon][38],[Facebook][39]等也出现这样的情况。他们想解决自己的问题,用开源的方式。忘掉许可协议吧,开源绝不仅如此。我们建立了一个交通工具,一套规则,例如[Hadoop][40],[Cassandra][41]和其他工具。事实上,开源驱动创新。例如,Hadoop是在厂商们意识到规模带来的问题时的一个解决方案。他们实际上有足够的资金和资源来解决自己的问题。开源是许多领域的默认技术方案。这在一个更加注重内容的世界中更是如此,例如[3D打印][42]和其他使用信息内容的实体产品。” “源代码的开源确实很酷,但开源不应当仅限于此。在各行各业不同领域开源仍有可以用武之地。我们要问下自己:‘开源能够为教育,政府,法律带来什么?其它的呢?其它的领域如何能学习我们?’” -“还有内容的问题。内容在现在是免费的,当然我们可以投资更多的免费内容,不过我们也需要商业模式围绕的内容。这是我们更应该关注的。如果你相信开放的创新能带来更好,那么我们需要更多的商业模式。” +“还有内容的问题。内容在现在是免费的,当然我们可以投资更多的免费内容,不过我们也需要商业模式围绕的内容。这是我们更应该关注的。如果你相信开放的创新更好,那么我们需要更多的商业模式。” -“教育让我担心其相比与‘社区’它更关注‘内容’。例如,无论我走到哪里,大学校长们都会说,‘等等,难道教育将会免费?!’对于下游来说FOSS免费很棒,但别忘了上游很强大。免费课程很棒,但我们同样需要社区来不断迭代和完善。这是很多人都在做的事情,Opensource.com是一个提供交流的社区。问题不是‘我们如何控制内容’,也不是‘如何建立和分发内容’,而是要确保它处在不断的完善当中,而且能给其他领域提供有价值的参考。” +“教育让我担心,其相比与‘社区’它更关注‘内容’。例如,无论我走到哪里,大学的校长们都会说,‘等等,难道教育将会免费?!’对于下游来说FOSS免费很棒,但别忘了上游很强大。免费课程很棒,但我们同样需要社区来不断迭代和完善。这是很多人都在做的事情,Opensource.com是一个提供交流的社区。问题不是‘我们如何控制内容’,也不是‘如何建立和分发内容’,而是要确保它处在不断的完善当中,而且能给其他领域提供有价值的参考。” “改变世界的潜力是无穷无尽的,我们已经取得了很棒的进步。”六年前我们痴迷于制定宣言,我们说‘我们是领导者’。我们用错词了,因为那潜在意味着控制。积极的参与者们同样也不能很好理解……[Máirín Duffy][43]提出了[催化剂][44]这个词。然后我们组成了红帽,不断地促进行动,指引方向。” -“Opensource.com也是其他领域的催化剂,而这正是它的本义所在,我希望你们也这样认为。当时的内容质量和现在比起来都令人难以置信。你可以看到每季度它都在进步。谢谢你们的时间!谢谢成为了催化剂!这是一个让世界变得更好的机会。我想听听你们的看法。” +“Opensource.com也是其他领域的催化剂,而这正是它的本义所在,我希望你们也这样认为。当时的内容质量和现在比起来都令人难以置信。你可以看到每季度它都在进步。谢谢你们付出的时间!谢谢成为了催化剂!这是一个让世界变得更好的机会。我想听听你们的看法。” 我瞥了一下桌子,发现几个人眼中带泪。 然后Whitehurst又回顾了大会的开放教育议题。“极端一点看,如果你有一门[Ulysses][45]的公开课。在这里你能和一群人一起合作体验课堂。这样就和代码块一样的:大家一起努力,代码随着时间不断改进。” -在这一点上,我有发言权。当谈论其FOSS和学术团体之间的差异,向基础和可能的不调和这些词语都跳了出来。 +在这一点上,我有发言权。当谈论其FOSS和学术团体之间的差异,像“基础”和“可能不调和”这些词语都跳了出来。 -**Remy**: “倒退带来死亡。如果你在论文或者发布的代码中烦了一个错误,有可能带来十分严重的后果。学校一直都是避免失败寻求正确答案的地方。复制意味着抄袭。轮子在一遍遍地教条地被发明。FOSS你能快速失败,但在学术界,你只能带来无效的结果。” +**Remy**: “倒退带来死亡。如果你在论文或者发布的代码中犯了一个错误,有可能带来十分严重的后果。学校一直都是避免失败寻求正确答案的地方。复制意味着抄袭。轮子在一遍遍地教条地被发明。FOSS让你能快速失败,但在学术界,你只能带来无效的结果。” **Nicole**: “学术界有太多自我的家伙,你们需要一个发布经理。” @@ -80,20 +78,21 @@ **Luis**: “团队和分享应该优先考虑,红帽可以多向它们强调这一点。” -**Jim**: “还有公司在其中扮演积极角色吗?” +**Jim**: “还有公司在其中扮演积极角色了吗?” -[Phil Shapiro][46]: “我对FOSS的临界点感兴趣。联邦没有改用[LibreOffice][47]把我逼疯了。我们没有在软件上花税款,也不应当在字处理软件或者微软的Office上浪费税钱。” +[Phil Shapiro][46]: “我对FOSS的临界点感兴趣。Fed没有改用[LibreOffice][47]把我逼疯了。我们没有在软件上花税款,也不应当在字处理软件或者微软的Office上浪费税钱。” -**Jim**: “我们经常提倡这一点。我们能做更多吗?这是个问题。首先,我们在我们的产品涉足的地方取得了进步。我们在政府中有坚实的专营权。我们比私有公司平均话费更多。银行和电信业都和政府挨着。我们在欧洲做的更好,我认为在那工作又更低的税。下一代计算就像‘终结者’,我们到处取得了进步,但仍然需要忧患意识。” +**Jim**: “我们经常提倡这一点。我们能做更多吗?这是个问题。首先,我们在我们的产品涉足的地方取得了进步。我们在政府中有坚实的专营权。我们比私有公司平均花费更多。银行和电信业都和政府挨着。我们在欧洲做的更好,我认为在那工作有更低的税。下一代计算就像‘终结者’,我们到处取得了进步,但仍然需要忧患意识。” + +突然,门开了。Jim转身向门口站着的执行助理点头。他要去参加下一场会了。他并拢双腿,站着向前微倾。然后,他再次向每个人的工作和奉献表示感谢,微笑着出了门……留给我们更多的激励。 -突然,门开了。Jim转身向门口站着的执行助理点头。他要去参加下一场会了。他并拢双腿,站着向前微倾。然后,他再次向每个人的工作和奉献表示感谢,微笑着除了门……留给我们更多的激励。 -------------------------------------------------------------------------------- via: https://opensource.com/business/14/12/jim-whitehurst-inspiration-open-source 作者:[Remy][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[fyh](https://github.com/fyh) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 83b197b3ce99246cb5c1965fc1de693d9f090f55 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 13 Aug 2015 09:31:59 +0800 Subject: [PATCH 1703/2517] translating --- ...Web Based Network Traffic Analyzer--Install it on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md b/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md index 9f78722cb6..3b3fe49a7f 100644 --- a/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md +++ b/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md @@ -1,3 +1,5 @@ +translating-----geekpi + Darkstat is a Web Based Network Traffic Analyzer – Install it on Linux ================================================================================ Darkstat is a simple, web based network traffic analyzer application. It works on many popular operating systems like Linux, Solaris, Mac and AIX. It keeps running in the background as a daemon and continues collecting and sniffing network data and presents it in easily understandable format within its web interface. It can generate traffic reports for hosts, identify which ports are open on some particular host and is IPV 6 complaint application. Let’s see how we can install and configure it on Linux operating system. @@ -59,4 +61,4 @@ via: http://linuxpitstop.com/install-darkstat-on-ubuntu-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://linuxpitstop.com/author/aun/ \ No newline at end of file +[a]:http://linuxpitstop.com/author/aun/ From f5f2a55acba0a563381de7dc8718d856de00ff22 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 13 Aug 2015 10:12:57 +0800 Subject: [PATCH 1704/2517] translating --- ...k Traffic Analyzer--Install it on Linux.md | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md b/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md index 3b3fe49a7f..e8e6bace07 100644 --- a/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md +++ b/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md @@ -1,62 +1,60 @@ -translating-----geekpi - -Darkstat is a Web Based Network Traffic Analyzer – Install it on Linux +Darkstat一个基于网络的流量分析器 - 在Linux中安装 ================================================================================ -Darkstat is a simple, web based network traffic analyzer application. It works on many popular operating systems like Linux, Solaris, Mac and AIX. It keeps running in the background as a daemon and continues collecting and sniffing network data and presents it in easily understandable format within its web interface. It can generate traffic reports for hosts, identify which ports are open on some particular host and is IPV 6 complaint application. Let’s see how we can install and configure it on Linux operating system. +Darkstat是一个简易的,基于网络的流量分析程序。它可以在主流的操作系统如Linux、Solaris、MAC、AIX上工作。它以守护进程的形式持续工作在后台并不断地嗅探网络数据并以简单易懂的形式展现在网页上。它可以为主机生成流量报告,鉴别特定主机上哪些端口打开并且兼容IPv6。让我们看下如何在Linux中安装和配置它。 -### Installing Darkstat on Linux ### +### 在Linux中安装配置Darkstat ### -**Install Darkstat on Fedora/CentOS/RHEL:** +** 在Fedora/CentOS/RHEL中安装Darkstat:** -In order to install it on Fedora/RHEL and CentOS Linux distributions, run following command on the terminal. +要在Fedora/RHEL和CentOS中安装,运行下面的命令。 sudo yum install darkstat -**Install Darkstat on Ubuntu/Debian:** +**在Ubuntu/Debian中安装Darkstat:** -Run following on the terminal to install it on Ubuntu and Debian. +运行下面的命令在Ubuntu和Debian中安装。 sudo apt-get install darkstat -Congratulations, Darkstat has been installed on your Linux system now. +恭喜你,Darkstat已经在你的Linux中安装了。 -### Configuring Darkstat ### +### 配置 Darkstat ### -In order to run this application properly, we need to perform some basic configurations. Edit /etc/darkstat/init.cfg file in Gedit text editor by running the following command on the terminal. +为了正确运行这个程序,我恩需要执行一些基本的配置。运行下面的命令用gedit编辑器打开/etc/darkstat/init.cfg文件。 sudo gedit /etc/darkstat/init.cfg ![](http://linuxpitstop.com/wp-content/uploads/2015/08/13.png) -Edit Darkstat +编辑 Darkstat -Change START_DARKSTAT parameter to “yes” and provide your network interface in “INTERFACE”. Make sure to uncomment DIR, PORT, BINDIP, and LOCAL parameters here. If you wish to bind the web interface for Darkstat to some specific IP, provide it in BINDIP section. +修改START_DARKSTAT这个参数为yes,并在“INTERFACE”中提供你的网络接口。确保取消了DIR、PORT、BINDIP和LOCAL这些参数的注释。如果你希望绑定Darkstat到特定的IP,在BINDIP中提供它 -### Starting Darkstat Daemon ### +### 启动Darkstat守护进程 ### -Once the installation and configuration for Darkstat is complete, run following command to start its daemon. +安装并配置完Darkstat后,运行下面的命令启动它的守护进程。 sudo /etc/init.d/darkstat start ![Restarting Darkstat](http://linuxpitstop.com/wp-content/uploads/2015/08/23.png) -You can configure Darkstat to start on system boot by running the following command: +你可以用下面的命令来在开机时启动Darkstat: chkconfig darkstat on -Launch your browser and load **http://localhost:666** and it will display the web based graphical interface for Darkstat. Start using this tool to analyze your network traffic. +打开浏览器并打开**http://localhost:666**,它会显示Darkstat的网页界面。使用这个工具来分析你的网络流量。 ![Darkstat](http://linuxpitstop.com/wp-content/uploads/2015/08/32.png) -### Conclusion ### +### 总结 ### -It is a lightweight tool with very low memory footprints. The key reason for the popularity of this tool is simplicity, ease of configuration and usage. It is a must-have application for System and Network Administrators. +它是一个占用很少内存的轻量级工具。这个工具流行的原因是简易、易于配置和使用。这是一个对系统管理员而言必须拥有的程序 -------------------------------------------------------------------------------- via: http://linuxpitstop.com/install-darkstat-on-ubuntu-linux/ 作者:[Aun][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ed05a3b8483d65879b9bfc48daaa909e29afd347 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 13 Aug 2015 10:22:14 +0800 Subject: [PATCH 1705/2517] =?UTF-8?q?20150813-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ow to get Public IP from Linux Terminal.md | 68 +++ ...150813 Linux file system hierarchy v2.0.md | 438 ++++++++++++++++++ ... Install The Latest Nvidia Linux Driver.md | 63 +++ 3 files changed, 569 insertions(+) create mode 100644 sources/tech/20150813 How to get Public IP from Linux Terminal.md create mode 100644 sources/tech/20150813 Linux file system hierarchy v2.0.md create mode 100644 sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md diff --git a/sources/tech/20150813 How to get Public IP from Linux Terminal.md b/sources/tech/20150813 How to get Public IP from Linux Terminal.md new file mode 100644 index 0000000000..f0bba2cea9 --- /dev/null +++ b/sources/tech/20150813 How to get Public IP from Linux Terminal.md @@ -0,0 +1,68 @@ +How to get Public IP from Linux Terminal? +================================================================================ +![](http://www.blackmoreops.com/wp-content/uploads/2015/06/256x256xHow-to-get-Public-IP-from-Linux-Terminal-blackMORE-Ops.png.pagespeed.ic.GKEAEd4UNr.png) + +Public addresses are assigned by InterNIC and consist of class-based network IDs or blocks of CIDR-based addresses (called CIDR blocks) that are guaranteed to be globally unique to the Internet. How to get Public IP from Linux Terminal - blackMORE OpsWhen the public addresses are assigned, routes are programmed into the routers of the Internet so that traffic to the assigned public addresses can reach their locations. Traffic to destination public addresses are reachable on the Internet. For example, when an organization is assigned a CIDR block in the form of a network ID and subnet mask, that [network ID, subnet mask] pair also exists as a route in the routers of the Internet. IP packets destined to an address within the CIDR block are routed to the proper destination. In this post I will show several ways to find your public IP address from Linux terminal. This though seems like a waste for normal users, but when you are in a terminal of a headless Linux server(i.e. no GUI or you’re connected as a user with minimal tools). Either way, being able to getHow to get Public IP from Linux Terminal public IP from Linux terminal can be useful in many cases or it could be one of those things that might just come in handy someday. + +There’s two main commands we use, curl and wget. You can use them interchangeably. + +### Curl output in plain text format: ### + + curl icanhazip.com + curl ifconfig.me + curl curlmyip.com + curl ip.appspot.com + curl ipinfo.io/ip + curl ipecho.net/plain + curl www.trackip.net/i + +### curl output in JSON format: ### + + curl ipinfo.io/json + curl ifconfig.me/all.json + curl www.trackip.net/ip?json (bit ugly) + +### curl output in XML format: ### + + curl ifconfig.me/all.xml + +### curl all IP details – The motherload ### + + curl ifconfig.me/all + +### Using DYNDNS (Useful when you’re using DYNDNS service) ### + + curl -s 'http://checkip.dyndns.org' | sed 's/.*Current IP Address: \([0-9\.]*\).*/\1/g' + curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+" + +### Using wget instead of curl ### + + wget http://ipecho.net/plain -O - -q ; echo + wget http://observebox.com/ip -O - -q ; echo + +### Using host and dig command (cause we can) ### + +You can also use host and dig command assuming they are available or installed + + host -t a dartsclink.com | sed 's/.*has address //' + dig +short myip.opendns.com @resolver1.opendns.com + +### Sample bash script: ### + + #!/bin/bash + + PUBLIC_IP=`wget http://ipecho.net/plain -O - -q ; echo` + echo $PUBLIC_IP + +Quite a few to pick from. + +I was actually writing a small script to track all the IP changes of my router each day and save those into a file. I found these nifty commands and sites to use while doing some online research. Hope they help someone else someday too. Thanks for reading, please Share and RT. + +-------------------------------------------------------------------------------- + +via: http://www.blackmoreops.com/2015/06/14/how-to-get-public-ip-from-linux-terminal/ + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20150813 Linux file system hierarchy v2.0.md b/sources/tech/20150813 Linux file system hierarchy v2.0.md new file mode 100644 index 0000000000..9df6d23dcf --- /dev/null +++ b/sources/tech/20150813 Linux file system hierarchy v2.0.md @@ -0,0 +1,438 @@ +Linux file system hierarchy v2.0 +================================================================================ +What is a file in Linux? What is file system in Linux? Where are all the configuration files? Where do I keep my downloaded applications? Is there really a filesystem standard structure in Linux? Well, the above image explains Linux file system hierarchy in a very simple and non-complex way. It’s very useful when you’re looking for a configuration file or a binary file. I’ve added some explanation and examples below, but that’s TL;DR. + +Another issue is when you got configuration and binary files all over the system that creates inconsistency and if you’re a large organization or even an end user, it can compromise your system (binary talking with old lib files etc.) and when you do [security audit of your Linux system][1], you find it is vulnerable to different exploits. So keeping a clean operating system (no matter Windows or Linux) is important. + +### What is a file in Linux? ### + +A simple description of the UNIX system, also applicable to Linux, is this: + +> On a UNIX system, everything is a file; if something is not a file, it is a process. + +This statement is true because there are special files that are more than just files (named pipes and sockets, for instance), but to keep things simple, saying that everything is a file is an acceptable generalization. A Linux system, just like UNIX, makes no difference between a file and a directory, since a directory is just a file containing names of other files. Programs, services, texts, images, and so forth, are all files. Input and output devices, and generally all devices, are considered to be files, according to the system. + +![](http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-file-system-hierarchy-v2.0-2480px-blackMORE-Ops.png) + +- Version 2.0 – 17-06-2015 + - – Improved: Added title and version history. + - – Improved: Added /srv, /media and /proc. + - – Improved: Updated descriptions to reflect modern Linux File Systems. + - – Fixed: Multiple typo’s. + - – Fixed: Appearance and colour. +- Version 1.0 – 14-02-2015 + - – Created: Initial diagram. + - – Note: Discarded lowercase version. + +### Download Links ### + +Following are two links for download. If you need this in any other format, let me know and I will try to create that and upload it somewhere. + +- [Large (PNG) Format – 2480×1755 px – 184KB][2] +- [Largest (PDF) Format – 9919x7019 px – 1686KB][3] + +**Note**: PDF Format is best for printing and very high in quality + +### Linux file system description ### + +In order to manage all those files in an orderly fashion, man likes to think of them in an ordered tree-like structure on the hard disk, as we know from `MS-DOS` (Disk Operating System) for instance. The large branches contain more branches, and the branches at the end contain the tree’s leaves or normal files. For now we will use this image of the tree, but we will find out later why this is not a fully accurate image. + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DirectoryDescription
+
/
+
Primary hierarchy root and root directory of the entire file system hierarchy.
+
/bin
+
Essential command binaries that need to be available in single user mode; for all users, e.g., cat, ls, cp.
+
/boot
+
Boot loader files, e.g., kernels, initrd.
+
/dev
+
Essential devices, e.g., /dev/null.
+
/etc
+
Host-specific system-wide configuration filesThere has been controversy over the meaning of the name itself. In early versions of the UNIX Implementation Document from Bell labs, /etc is referred to as the etcetera directory, as this directory historically held everything that did not belong elsewhere (however, the FHS restricts /etc to static configuration files and may not contain binaries). Since the publication of early documentation, the directory name has been re-designated in various ways. Recent interpretations include backronyms such as “Editable Text Configuration” or “Extended Tool Chest”.
+
+
+
/opt
+
+
+
Configuration files for add-on packages that are stored in /opt/.
+
+
+
/sgml
+
+
+
Configuration files, such as catalogs, for software that processes SGML.
+
+
+
/X11
+
+
+
Configuration files for the X Window System, version 11.
+
+
+
/xml
+
+
+
Configuration files, such as catalogs, for software that processes XML.
+
/home
+
Users’ home directories, containing saved files, personal settings, etc.
+
/lib
+
Libraries essential for the binaries in /bin/ and /sbin/.
+
/lib<qual>
+
Alternate format essential libraries. Such directories are optional, but if they exist, they have some requirements.
+
/media
+
Mount points for removable media such as CD-ROMs (appeared in FHS-2.3).
+
/mnt
+
Temporarily mounted filesystems.
+
/opt
+
Optional application software packages.
+
/proc
+
Virtual filesystem providing process and kernel information as files. In Linux, corresponds to a procfs mount.
+
/root
+
Home directory for the root user.
+
/sbin
+
Essential system binaries, e.g., init, ip, mount.
+
/srv
+
Site-specific data which are served by the system.
+
/tmp
+
Temporary files (see also /var/tmp). Often not preserved between system reboots.
+
/usr
+
Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications.
+
+
+
/bin
+
+
+
Non-essential command binaries (not needed in single user mode); for all users.
+
+
+
/include
+
+
+
Standard include files.
+
+
+
/lib
+
+
+
Libraries for the binaries in /usr/bin/ and /usr/sbin/.
+
+
+
/lib<qual>
+
+
+
Alternate format libraries (optional).
+
+
+
/local
+
+
+
Tertiary hierarchy for local data, specific to this host. Typically has further subdirectories, e.g., bin/, lib/, share/.
+
+
+
/sbin
+
+
+
Non-essential system binaries, e.g., daemons for various network-services.
+
+
+
/share
+
+
+
Architecture-independent (shared) data.
+
+
+
/src
+
+
+
Source code, e.g., the kernel source code with its header files.
+
+
+
/X11R6
+
+
+
X Window System, Version 11, Release 6.
+
/var
+
Variable files—files whose content is expected to continually change during normal operation of the system—such as logs, spool files, and temporary e-mail files.
+
+
+
/cache
+
+
+
Application cache data. Such data are locally generated as a result of time-consuming I/O or calculation. The application must be able to regenerate or restore the data. The cached files can be deleted without loss of data.
+
+
+
/lib
+
+
+
State information. Persistent data modified by programs as they run, e.g., databases, packaging system metadata, etc.
+
+
+
/lock
+
+
+
Lock files. Files keeping track of resources currently in use.
+
+
+
/log
+
+
+
Log files. Various logs.
+
+
+
/mail
+
+
+
Users’ mailboxes.
+
+
+
/opt
+
+
+
Variable data from add-on packages that are stored in /opt/.
+
+
+
/run
+
+
+
Information about the running system since last boot, e.g., currently logged-in users and running daemons.
+
+
+
/spool
+
+
+
Spool for tasks waiting to be processed, e.g., print queues and outgoing mail queue.
+
+
+
+
+
/mail
+
+
+
+
+
Deprecated location for users’ mailboxes.
+
+
+
/tmp
+
+
+
Temporary files to be preserved between reboots.
+ +### Types of files in Linux ### + +Most files are just files, called `regular` files; they contain normal data, for example text files, executable files or programs, input for or output from a program and so on. + +While it is reasonably safe to suppose that everything you encounter on a Linux system is a file, there are some exceptions. + +- `Directories`: files that are lists of other files. +- `Special files`: the mechanism used for input and output. Most special files are in `/dev`, we will discuss them later. +- `Links`: a system to make a file or directory visible in multiple parts of the system’s file tree. We will talk about links in detail. +- `(Domain) sockets`: a special file type, similar to TCP/IP sockets, providing inter-process networking protected by the file system’s access control. +- `Named pipes`: act more or less like sockets and form a way for processes to communicate with each other, without using network socket semantics. + +### File system in reality ### + +For most users and for most common system administration tasks, it is enough to accept that files and directories are ordered in a tree-like structure. The computer, however, doesn’t understand a thing about trees or tree-structures. + +Every partition has its own file system. By imagining all those file systems together, we can form an idea of the tree-structure of the entire system, but it is not as simple as that. In a file system, a file is represented by an `inode`, a kind of serial number containing information about the actual data that makes up the file: to whom this file belongs, and where is it located on the hard disk. + +Every partition has its own set of inodes; throughout a system with multiple partitions, files with the same inode number can exist. + +Each inode describes a data structure on the hard disk, storing the properties of a file, including the physical location of the file data. When a hard disk is initialized to accept data storage, usually during the initial system installation process or when adding extra disks to an existing system, a fixed number of inodes per partition is created. This number will be the maximum amount of files, of all types (including directories, special files, links etc.) that can exist at the same time on the partition. We typically count on having 1 inode per 2 to 8 kilobytes of storage.At the time a new file is created, it gets a free inode. In that inode is the following information: + +- Owner and group owner of the file. +- File type (regular, directory, …) +- Permissions on the file +- Date and time of creation, last read and change. +- Date and time this information has been changed in the inode. +- Number of links to this file (see later in this chapter). +- File size +- An address defining the actual location of the file data. + +The only information not included in an inode, is the file name and directory. These are stored in the special directory files. By comparing file names and inode numbers, the system can make up a tree-structure that the user understands. Users can display inode numbers using the -i option to ls. The inodes have their own separate space on the disk. + +-------------------------------------------------------------------------------- + +via: http://www.blackmoreops.com/2015/06/18/linux-file-system-hierarchy-v2-0/ + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.blackmoreops.com/2015/02/15/in-light-of-recent-linux-exploits-linux-security-audit-is-a-must/ +[2]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-file-system-hierarchy-v2.0-2480px-blackMORE-Ops.png +[3]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-File-System-Hierarchy-blackMORE-Ops.pdf \ No newline at end of file diff --git a/sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md b/sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md new file mode 100644 index 0000000000..2bae0061c4 --- /dev/null +++ b/sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md @@ -0,0 +1,63 @@ +Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver +================================================================================ +![Ubuntu Gamers are on the rise -and so is demand for the latest drivers](http://www.omgubuntu.co.uk/wp-content/uploads/2014/03/ubuntugamer_logo_dark-500x250.jpg) +Ubuntu Gamers are on the rise -and so is demand for the latest drivers + +**Installing the latest upstream NVIDIA graphics driver on Ubuntu could be about to get much easier. ** + +Ubuntu developers are considering the creation of a brand new ‘official’ PPA to distribute the latest closed-source NVIDIA binary drivers to desktop users. + +The move would benefit Ubuntu gamers **without** risking the stability of the OS for everyone else. + +New upstream drivers would be installed and updated from this new PPA **only** when a user explicitly opts-in to it. Everyone else would continue to receive and use the more recent stable NVIDIA Linux driver snapshot included in the Ubuntu archive. + +### Why Is This Needed? ### + +![Ubuntu provides drivers – but they’re not the latest](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/drivers.jpg) +Ubuntu provides drivers – but they’re not the latest + +The closed-source NVIDIA graphics drivers that are available to install on Ubuntu from the archive (using the command line, synaptic or through the additional drivers tool) work fine for most and can handle the composited Unity desktop shell with ease. + +For gaming needs it’s a different story. + +If you want to squeeze every last frame and HD texture out of the latest big-name Steam game you’ll need the latest binary drivers blob. + +> ‘Installing the very latest Nvidia Linux driver on Ubuntu is not easy and not always safe.’ + +The more recent the driver the more likely it is to support the latest features and technologies, or come pre-packed with game-specific tweaks and bug fixes too. + +The problem is that installing the very latest Nvidia Linux driver on Ubuntu is not easy and not always safe. + +To fill the void many third-party PPAs maintained by enthusiasts have emerged. Since many of these PPAs also distribute other experimental or bleeding-edge software their use is **not without risk**. Adding a bleeding edge PPA is often the fastest way to entirely hose a system! + +A solution that lets Ubuntu users install the latest propriety graphics drivers as offered in third-party PPAs is needed **but** with the safety catch of being able to roll-back to the stable archive version if needed. + +### ‘Demand for fresh drivers is hard to ignore’ ### + +> ‘A solution that lets Ubuntu users get the latest hardware drivers safely is coming.’ + +‘The demand for fresh drivers in a fast developing market is becoming hard to ignore, users are going to want the latest upstream has to offer,’ Castro explains in an e-mail to the Ubuntu Desktop mailing list. + +‘[NVIDIA] can deliver a kickass experience with almost no effort from the user [in Windows 10]. Until we can convince NVIDIA to do the same with Ubuntu we’re going to have to pick up the slack.’ + +Castro’s proposition of a “blessed” NVIDIA PPA is the easiest way to do this. + +Gamers would be able to opt-in to receive new drivers from the PPA straight from Ubuntu’s default proprietary hardware drivers tool — no need for them to copy and paste terminal commands from websites or wiki pages. + +The drivers within this PPA would be packaged and maintained by a select band of community members and receive benefits from being a semi-official option, namely **automated testing**. + +As Castro himself puts it: ‘People want the latest bling, and no matter what they’re going to do it. We might as well put a framework around it so people can get what they want without breaking their computer.’ + +**Would you make use of this PPA? How would you rate the performance of the default Nvidia drivers on Ubuntu? Share your thoughts in the comments, folks! ** + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux-drivers + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author \ No newline at end of file From cc0d58299115994ccd4982cdb806460dc18e718b Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 13 Aug 2015 10:35:12 +0800 Subject: [PATCH 1706/2517] translated --- ...s a Web Based Network Traffic Analyzer--Install it on Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md (100%) diff --git a/sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md b/translated/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md similarity index 100% rename from sources/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md rename to translated/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md From 2857115c5c775ef504947bd7cfc8fdffcafcb256 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 13 Aug 2015 10:45:09 +0800 Subject: [PATCH 1707/2517] =?UTF-8?q?20150813-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...How to Install Logwatch on Ubuntu 15.04.md | 137 +++++++++++++++ ...st Disk I O Performance With dd Command.md | 162 ++++++++++++++++++ 2 files changed, 299 insertions(+) create mode 100644 sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md create mode 100644 sources/tech/20150813 Linux and Unix Test Disk I O Performance With dd Command.md diff --git a/sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md b/sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md new file mode 100644 index 0000000000..fa9458dcb4 --- /dev/null +++ b/sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md @@ -0,0 +1,137 @@ +How to Install Logwatch on Ubuntu 15.04 +================================================================================ +Hi, Today we are going to illustrate the setup of Logwatch on Ubuntu 15.04 Operating system where as it can be used for any Linux and UNIX like operating systems. Logwatch is a customizable system log analyzer and reporting log-monitoring system that go through your logs for a given period of time and make a report in the areas that you wish with the details you want. Its an easy tool to install, configure, review and to take actions that will improve security from data it provides. Logwatch scans the log files of major operating system components, like SSH, Web Server and forwards a summary that contains the valuable items in it that needs to be looked at. + +### Pre-installation Setup ### + +We will be using Ubuntu 15.04 operating system to deploy Logwatch on it so as a perquisite for the installation of Logwatch, make sure that your emails setup is working as it will be used to send email to the administrators for daily reports on the gathered reports.Your system repositories should be enabled as we will be installing it from its available universal repositories. + +Then open the terminal of your ubuntu operating system and login with root user to update your system packages before moving to Logwatch installation. + + root@ubuntu-15:~# apt-get update + +### Installing Logwatch ### + +Once your system is updated and your have fulfilled all its prerequisites then run the following command to start the installation of Logwatch in your server. + + root@ubuntu-15:~# apt-get install logwatch + +The logwatch installation process will starts with addition of some extra required packages as shown once you press “Y” to accept the required changes to the system. + +During the installation process you will be prompted to configure the Postfix Configurations according to your mail server’s setup. Here we used “Local only” in the tutorial for ease, we can choose from the other available options as per your infrastructure requirements and then press “OK” to proceed. + +![Potfix Configurations](http://blog.linoxide.com/wp-content/uploads/2015/08/21.png) + +Then you have to choose your mail server’s name that will also be used by other programs, so it should be single fully qualified domain name (FQDN). + +![Postfix Setup](http://blog.linoxide.com/wp-content/uploads/2015/08/31.png) + +Once you press “OK” after postfix configurations, then it will completes the Logwatch installation process with default configurations of Postfix. + +![Logwatch Completion](http://blog.linoxide.com/wp-content/uploads/2015/08/41.png) + +You can check the status of Logwatch by issuing the following command in the terminal that should be in active state. + + root@ubuntu-15:~# service postfix status + +![Postfix Status](http://blog.linoxide.com/wp-content/uploads/2015/08/51.png) + +To confirm the installation of Logwatch with its default configurations, issue the simple “logwatch” command as shown. + + root@ubuntu-15:~# logwatch + +The output from the above executed command will results in following compiled report form in the terminal. + +![Logwatch Report](http://blog.linoxide.com/wp-content/uploads/2015/08/61.png) + +### Logwatch Configurations ### + +Now after successful installation of Logwatch, we need to make few configuration changes in its configuration file located under following shown path. So, let’s open it with the file editor to update its configurations as required. + + root@ubuntu-15:~# vim /usr/share/logwatch/default.conf/logwatch.conf + +**Output/Format Options** + +By default Logwatch will print to stdout in text with no encoding.To make email Default set “Output = mail” and to save to file set “Output = file”. So you can comment out the its default configurations as per your required settings. + + Output = stdout + +To make Html the default formatting update the following line if you are using Internet email configurations. + + Format = text + +Now add the default person to mail reports should be sent to, it could be a local account or a complete email address that you are free to mention in this line + + MailTo = root + #MailTo = user@test.com + +Default person to mail reports sent from can be a local account or any other you wish to use. + + # complete email address. + MailFrom = Logwatch + +Save the changes made in the configuration file of Logwatch while leaving the other parameter as default. + +**Cronjob Configuration** + +Now edit the "00logwatch" file in daily crons directory to configure your desired email address to forward reports from logwatch. + + root@ubuntu-15:~# vim /etc/cron.daily/00logwatch + +Here you need to use "--mailto" user@test.com instead of --output mail and save the file. + +![Logwatch Cronjob](http://blog.linoxide.com/wp-content/uploads/2015/08/71.png) + +### Using Logwatch Report ### + +Now we generate the test report by executing the "logwatch" command in the terminal to get its result shown in the Text format within the terminal. + + root@ubuntu-15:~#logwatch + +The generated report starts with showing its execution time and date, it will be comprising of different sections that starts with its begin status and closed with end status after showing the complete information about its logs of the mentioned sections. + +Here is its starting point looks like, where it starts by showing all the installed packages in the system as shown below. + +![dpkg status](http://blog.linoxide.com/wp-content/uploads/2015/08/81.png) + +The following sections shows the logs informmation about the login sessions, rsyslogs and SSH connections about the current and last sessions enabled on the system. + +![logwatch report](http://blog.linoxide.com/wp-content/uploads/2015/08/9.png) + +The logwatch report will ends up by showing the secure sudo logs and the disk space usage of the root diretory as shown below. + +![Logwatch end report](http://blog.linoxide.com/wp-content/uploads/2015/08/10.png) + +You can also check for the generated emails about the logwatch reports by opening the following file. + + root@ubuntu-15:~# vim /var/mail/root + +Here you will be able to see all the generated emails to your configured users with their message delivery status. + +### More about Logwatch ### + +Logwatch is a great tool to lern more about it, so if your more interested to learn more about its logwatch then you can also get much help from the below few commands. + + root@ubuntu-15:~# man logwatch + +The above command contains all the users manual about the logwatch, so read it carefully and to exit from the manuals section simply press "q". + +To get help about the logwatch commands usage you can run the following help command for further information in details. + + root@ubuntu-15:~# logwatch --help + +### Conclusion ### + +At the end of this tutorial you learn about the complete setup of Logwatch on Ubuntu 15.04 that includes with its installation and configurations guide. Now you can start monitoring your logs in a customize able form, whether you monitor the logs of all the services rnning on your system or you customize it to send you the reports about the specific services on the scheduled days. So, let's use this tool and feel free to leave us a comment if you face any issue or need to know more about logwatch usage. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-use-logwatch-ubuntu-15-04/ + +作者:[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/20150813 Linux and Unix Test Disk I O Performance With dd Command.md b/sources/tech/20150813 Linux and Unix Test Disk I O Performance With dd Command.md new file mode 100644 index 0000000000..c30619d13e --- /dev/null +++ b/sources/tech/20150813 Linux and Unix Test Disk I O Performance With dd Command.md @@ -0,0 +1,162 @@ +Linux and Unix Test Disk I/O Performance With dd Command +================================================================================ +How can I use dd command on a Linux to test I/O performance of my hard disk drive? How do I check the performance of a hard drive including the read and write speed on a Linux operating systems? + +You can use the following commands on a Linux or Unix-like systems for simple I/O performance test: + +- **dd command** : It is used to monitor the writing performance of a disk device on a Linux and Unix-like system +- **hdparm command** : It is used to get/set hard disk parameters including test the reading and caching performance of a disk device on a Linux based system. + +In this tutorial you will learn how to use the dd command to test disk I/O performance. + +### Use dd command to monitor the reading and writing performance of a disk device: ### + +- Open a shell prompt. +- Or login to a remote server via ssh. +- Use the dd command to measure server throughput (write speed) `dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync` +- Use the dd command to measure server latency `dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync` + +#### Understanding dd command options #### + +In this example, I'm using RAID-10 (Adaptec 5405Z with SAS SSD) array running on a Ubuntu Linux 14.04 LTS server. The basic syntax is + + dd if=/dev/input.file of=/path/to/output.file bs=block-size count=number-of-blocks oflag=dsync + ## GNU dd syntax ## + dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync + ## OR alternate syntax for GNU/dd ## + dd if=/dev/zero of=/tmp/testALT.img bs=1G count=1 conv=fdatasync + +Sample outputs: + +![Fig.01: Ubuntu Linux Server with RAID10 and testing server throughput with dd](http://s0.cyberciti.org/uploads/faq/2015/08/dd-server-test-io-speed-output.jpg) +Fig.01: Ubuntu Linux Server with RAID10 and testing server throughput with dd + +Please note that one gigabyte was written for the test and 135 MB/s was server throughput for this test. Where, + +- `if=/dev/zero (if=/dev/input.file)` : The name of the input file you want dd the read from. +- `of=/tmp/test1.img (of=/path/to/output.file)` : The name of the output file you want dd write the input.file to. +- `bs=1G (bs=block-size)` : Set the size of the block you want dd to use. 1 gigabyte was written for the test. +- `count=1 (count=number-of-blocks)`: The number of blocks you want dd to read. +- `oflag=dsync (oflag=dsync)` : Use synchronized I/O for data. Do not skip this option. This option get rid of caching and gives you good and accurate results +- `conv=fdatasyn`: Again, this tells dd to require a complete "sync" once, right before it exits. This option is equivalent to oflag=dsync. + +In this example, 512 bytes were written one thousand times to get RAID10 server latency time: + + dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync + +Sample outputs: + + 1000+0 records in + 1000+0 records out + 512000 bytes (512 kB) copied, 0.60362 s, 848 kB/s + +Please note that server throughput and latency time depends upon server/application load too. So I recommend that you run these tests on a newly rebooted server as well as peak time to get better idea about your workload. You can now compare these numbers with all your devices. + +#### But why the server throughput and latency time are so low? #### + +Low values does not mean you are using slow hardware. The value can be low because of the HARDWARE RAID10 controller's cache. + +Use hdparm command to see buffered and cached disk read speed + +I suggest you run the following commands 2 or 3 times Perform timings of device reads for benchmark and comparison purposes: + + ### Buffered disk read test for /dev/sda ## + hdparm -t /dev/sda1 + ## OR ## + hdparm -t /dev/sda + +To perform timings of cache reads for benchmark and comparison purposes again run the following command 2-3 times (note the -T option): + + ## Cache read benchmark for /dev/sda ### + hdparm -T /dev/sda1 + ## OR ## + hdparm -T /dev/sda + +OR combine both tests: + + hdparm -Tt /dev/sda + +Sample outputs: + +![Fig.02: Linux hdparm command to test reading and caching disk performance](http://s0.cyberciti.org/uploads/faq/2015/08/hdparam-output.jpg) +Fig.02: Linux hdparm command to test reading and caching disk performance + +Again note that due to filesystems caching on file operations, you will always see high read rates. + +**Use dd command on Linux to test read speed** + +To get accurate read test data, first discard caches before testing by running the following commands: + + flush + echo 3 | sudo tee /proc/sys/vm/drop_caches + time time dd if=/path/to/bigfile of=/dev/null bs=8k + +**Linux Laptop example** + +Run the following command: + + ### Debian Laptop Throughput With Cache ## + dd if=/dev/zero of=/tmp/laptop.bin bs=1G count=1 oflag=direct + + ### Deactivate the cache ### + hdparm -W0 /dev/sda + + ### Debian Laptop Throughput Without Cache ## + dd if=/dev/zero of=/tmp/laptop.bin bs=1G count=1 oflag=direct + +**Apple OS X Unix (Macbook pro) example** + +GNU dd has many more options but OS X/BSD and Unix-like dd command need to run as follows to test real disk I/O and not memory add sync option as follows: + + ## Run command 2-3 times to get good results ### + time sh -c "dd if=/dev/zero of=/tmp/testfile bs=100k count=1k && sync" + +Sample outputs: + + 1024+0 records in + 1024+0 records out + 104857600 bytes transferred in 0.165040 secs (635346520 bytes/sec) + + real 0m0.241s + user 0m0.004s + sys 0m0.113s + +So I'm getting 635346520 bytes (635.347 MB/s) write speed on my MBP. + +**Not a fan of command line...?** + +You can use disk utility (gnome-disk-utility) on a Linux or Unix based system to get the same information. The following screenshot is taken from my Fedora Linux v22 VM. + +**Graphical method** + +Click on the "Activities" or press the "Super" key to switch between the Activities overview and desktop. Type "Disks" + +![Fig.03: Start the Gnome disk utility](http://s0.cyberciti.org/uploads/faq/2015/08/disk-1.jpg) +Fig.03: Start the Gnome disk utility + +Select your hard disk at left pane and click on configure button and click on "Benchmark partition": + +![Fig.04: Benchmark disk/partition](http://s0.cyberciti.org/uploads/faq/2015/08/disks-2.jpg) +Fig.04: Benchmark disk/partition + +Finally, click on the "Start Benchmark..." button (you may be promoted for the admin username and password): + +![Fig.05: Final benchmark result](http://s0.cyberciti.org/uploads/faq/2015/08/disks-3.jpg) +Fig.05: Final benchmark result + +Which method and command do you recommend to use? + +- I recommend dd command on all Unix-like systems (`time sh -c "dd if=/dev/zero of=/tmp/testfile bs=100k count=1k && sync`" +- If you are using GNU/Linux use the dd command (`dd if=/dev/zero of=/tmp/testALT.img bs=1G count=1 conv=fdatasync`) +- Make sure you adjust count and bs arguments as per your setup to get a good set of result. +- The GUI method is recommended only for Linux/Unix laptop users running Gnome2 or 3 desktop. + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/howto-linux-unix-test-disk-performance-with-dd-command/ + +作者:Vivek Gite +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From fc087db114a358509e8efdd90b708b5c6e72548a Mon Sep 17 00:00:00 2001 From: runningwater Date: Thu, 13 Aug 2015 10:49:04 +0800 Subject: [PATCH 1708/2517] by runningwater --- .../tech/20150813 How to Install Logwatch on Ubuntu 15.04.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md b/sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md index fa9458dcb4..24c71b0cbe 100644 --- a/sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md +++ b/sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md @@ -1,3 +1,4 @@ +(translating by runningwater) How to Install Logwatch on Ubuntu 15.04 ================================================================================ Hi, Today we are going to illustrate the setup of Logwatch on Ubuntu 15.04 Operating system where as it can be used for any Linux and UNIX like operating systems. Logwatch is a customizable system log analyzer and reporting log-monitoring system that go through your logs for a given period of time and make a report in the areas that you wish with the details you want. Its an easy tool to install, configure, review and to take actions that will improve security from data it provides. Logwatch scans the log files of major operating system components, like SSH, Web Server and forwards a summary that contains the valuable items in it that needs to be looked at. @@ -129,9 +130,9 @@ At the end of this tutorial you learn about the complete setup of Logwatch on Ub via: http://linoxide.com/ubuntu-how-to/install-use-logwatch-ubuntu-15-04/ 作者:[Kashif Siddique][a] -译者:[译者ID](https://github.com/译者ID) +译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/kashifs/ \ No newline at end of file +[a]:http://linoxide.com/author/kashifs/ From 14f172121f66f179cb7525924c2c46a0cdb064b2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 13 Aug 2015 11:01:53 +0800 Subject: [PATCH 1709/2517] =?UTF-8?q?20150813-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ation GA with OData in Docker Container.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md diff --git a/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md b/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md new file mode 100644 index 0000000000..0893b9a361 --- /dev/null +++ b/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md @@ -0,0 +1,102 @@ +Howto Run JBoss Data Virtualization GA with OData in Docker Container +================================================================================ +Hi everyone, today we'll learn how to run JBoss Data Virtualization 6.0.0.GA with OData in a Docker Container. JBoss Data Virtualization is a data supply and integration solution platform that transforms various scatered multiple sources data, treats them as single source and delivers the required data into actionable information at business speed to any applications or users. JBoss Data Virtualization can help us easily combine and transform data into reusable business friendly data models and make unified data easily consumable through open standard interfaces. It offers comprehensive data abstraction, federation, integration, transformation, and delivery capabilities to combine data from one or multiple sources into reusable for agile data utilization and sharing.For more information about JBoss Data Virtualization, we can check out [its official page][1]. Docker is an open source platform that provides an open platform to pack, ship and run any application as a lightweight container. Running JBoss Data Virtualization with OData in Docker Container makes us easy to handle and launch. + +Here are some easy to follow tutorial on how we can run JBoss Data Virtualization with OData in Docker Container. + +### 1. Cloning the Repository ### + +First of all, we'll wanna clone the repository of OData with Data Virtualization ie [https://github.com/jbossdemocentral/dv-odata-docker-integration-demo][2] using git command. As we have an Ubuntu 15.04 distribution of linux running in our machine. We'll need to install git initially using apt-get command. + + # apt-get install git + +Then after installing git, we'll wanna clone the repository by running the command below. + + # git clone https://github.com/jbossdemocentral/dv-odata-docker-integration-demo + + Cloning into 'dv-odata-docker-integration-demo'... + remote: Counting objects: 96, done. + remote: Total 96 (delta 0), reused 0 (delta 0), pack-reused 96 + Unpacking objects: 100% (96/96), done. + Checking connectivity... done. + +### 2. Downloading JBoss Data Virtualization Installer ### + +Now, we'll need to download JBoss Data Virtualization Installer from the Download Page ie [http://www.jboss.org/products/datavirt/download/][3] . After we download **jboss-dv-installer-6.0.0.GA-redhat-4.jar**, we'll need to keep it under the directory named **software**. + +### 3. Building the Docker Image ### + +Next, after we have downloaded the JBoss Data Virtualization installer, we'll then go for building the docker image using the Dockerfile and its resources we had just cloned from the repository. + + # cd dv-odata-docker-integration-demo/ + # docker build -t jbossdv600 . + + ... + Step 22 : USER jboss + ---> Running in 129f701febd0 + ---> 342941381e37 + Removing intermediate container 129f701febd0 + Step 23 : EXPOSE 8080 9990 31000 + ---> Running in 61e6d2c26081 + ---> 351159bb6280 + Removing intermediate container 61e6d2c26081 + Step 24 : CMD $JBOSS_HOME/bin/standalone.sh -c standalone.xml -b 0.0.0.0 -bmanagement 0.0.0.0 + ---> Running in a9fed69b3000 + ---> 407053dc470e + Removing intermediate container a9fed69b3000 + Successfully built 407053dc470e + +Note: Here, we assume that you have already installed docker and is running in your machine. + +### 4. Starting the Docker Container ### + +As we have built the Docker Image of JBoss Data Virtualization with oData, we'll now gonna run the docker container and expose its port with -P flag. To do so, we'll run the following command. + + # docker run -p 8080:8080 -d -t jbossdv600 + + 7765dee9cd59c49ca26850e88f97c21f46859d2dc1d74166353d898773214c9c + +### 5. Getting the Container IP ### + +After we have started the Docker Container, we'll wanna get the IP address of the running docker container. To do so, we'll run the docker inspect command followed by the running container id. + + # docker inspect <$containerID> + + ... + "NetworkSettings": { + "Bridge": "", + "EndpointID": "3e94c5900ac5954354a89591a8740ce2c653efde9232876bc94878e891564b39", + "Gateway": "172.17.42.1", + "GlobalIPv6Address": "", + "GlobalIPv6PrefixLen": 0, + "HairpinMode": false, + "IPAddress": "172.17.0.8", + "IPPrefixLen": 16, + "IPv6Gateway": "", + "LinkLocalIPv6Address": "", + "LinkLocalIPv6PrefixLen": 0, + +### 6. Web Interface ### + +Now, if everything went as expected as done above, we'll gonna see the login screen of JBoss Data Virtualization with oData when pointing our web browser to http://container-ip:8080/ and the JBoss Management from http://container-ip:9990. The Management credentials for username is admin and password is redhat1! whereas the Data virtualization credentials for username is user and password is user . After that, we can navigate the contents via the web interface. + +**Note**: It is strongly recommended to change the password as soon as possible after the first login. Thanks :) + +### Conclusion ### + +Finally we've successfully run Docker Container running JBoss Data Virtualization with OData Multisource Virtual Database. JBoss Data Virtualization is really an awesome platform for the virtualization of data from different multiple source and transform them into reusable business friendly data models and produces data easily consumable through open standard interfaces. The deployment of JBoss Data Virtualization with OData Multisource Virtual Database has been very easy, secure and fast to setup with the Docker Technology. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/run-jboss-data-virtualization-ga-odata-docker-container/ + +作者:[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/ +[1]:http://www.redhat.com/en/technologies/jboss-middleware/data-virtualization +[2]:https://github.com/jbossdemocentral/dv-odata-docker-integration-demo +[3]:http://www.jboss.org/products/datavirt/download/ \ No newline at end of file From e5c72db0c2ee4f1b0b0a57d65de1c17ecbdfe2bd Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Thu, 13 Aug 2015 11:29:35 +0800 Subject: [PATCH 1710/2517] Update 20150813 Linux and Unix Test Disk I O Performance With dd Command.md --- ...inux and Unix Test Disk I O Performance With dd Command.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150813 Linux and Unix Test Disk I O Performance With dd Command.md b/sources/tech/20150813 Linux and Unix Test Disk I O Performance With dd Command.md index c30619d13e..bcd9f8455f 100644 --- a/sources/tech/20150813 Linux and Unix Test Disk I O Performance With dd Command.md +++ b/sources/tech/20150813 Linux and Unix Test Disk I O Performance With dd Command.md @@ -1,3 +1,5 @@ +DongShuaike is translating. + Linux and Unix Test Disk I/O Performance With dd Command ================================================================================ How can I use dd command on a Linux to test I/O performance of my hard disk drive? How do I check the performance of a hard drive including the read and write speed on a Linux operating systems? @@ -159,4 +161,4 @@ via: http://www.cyberciti.biz/faq/howto-linux-unix-test-disk-performance-with-dd 译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 363e76972134acc20f1b92efe0b5c4bf2f145615 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 13 Aug 2015 13:34:50 +0800 Subject: [PATCH 1711/2517] PUB:20150803 Linux Logging Basics @FSSlc --- .../20150803 Linux Logging Basics.md | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) rename {translated/tech => published}/20150803 Linux Logging Basics.md (53%) diff --git a/translated/tech/20150803 Linux Logging Basics.md b/published/20150803 Linux Logging Basics.md similarity index 53% rename from translated/tech/20150803 Linux Logging Basics.md rename to published/20150803 Linux Logging Basics.md index 00acdf183e..de8a5d661c 100644 --- a/translated/tech/20150803 Linux Logging Basics.md +++ b/published/20150803 Linux Logging Basics.md @@ -1,6 +1,6 @@ Linux 日志基础 ================================================================================ -首先,我们将描述有关 Linux 日志是什么,到哪儿去找它们以及它们是如何创建的基础知识。如果你已经知道这些,请随意跳至下一节。 +首先,我们将描述有关 Linux 日志是什么,到哪儿去找它们,以及它们是如何创建的基础知识。如果你已经知道这些,请随意跳至下一节。 ### Linux 系统日志 ### @@ -10,71 +10,69 @@ Linux 日志基础 一些最为重要的 Linux 系统日志包括: -- `/var/log/syslog` 或 `/var/log/messages` 存储所有的全局系统活动数据,包括开机信息。基于 Debian 的系统如 Ubuntu 在 `/var/log/syslog` 目录中存储它们,而基于 RedHat 的系统如 RHEL 或 CentOS 则在 `/var/log/messages` 中存储它们。 +- `/var/log/syslog` 或 `/var/log/messages` 存储所有的全局系统活动数据,包括开机信息。基于 Debian 的系统如 Ubuntu 在 `/var/log/syslog` 中存储它们,而基于 RedHat 的系统如 RHEL 或 CentOS 则在 `/var/log/messages` 中存储它们。 - `/var/log/auth.log` 或 `/var/log/secure` 存储来自可插拔认证模块(PAM)的日志,包括成功的登录,失败的登录尝试和认证方式。Ubuntu 和 Debian 在 `/var/log/auth.log` 中存储认证信息,而 RedHat 和 CentOS 则在 `/var/log/secure` 中存储该信息。 -- `/var/log/kern` 存储内核错误和警告数据,这对于排除与自定义内核相关的故障尤为实用。 +- `/var/log/kern` 存储内核的错误和警告数据,这对于排除与定制内核相关的故障尤为实用。 - `/var/log/cron` 存储有关 cron 作业的信息。使用这个数据来确保你的 cron 作业正成功地运行着。 -Digital Ocean 有一个完整的关于这些文件及 rsyslog 如何在常见的发行版本如 RedHat 和 CentOS 中创建它们的 [教程][1] 。 +Digital Ocean 有一个关于这些文件的完整[教程][1],介绍了 rsyslog 如何在常见的发行版本如 RedHat 和 CentOS 中创建它们。 应用程序也会在这个目录中写入日志文件。例如像 Apache,Nginx,MySQL 等常见的服务器程序可以在这个目录中写入日志文件。其中一些日志文件由应用程序自己创建,其他的则通过 syslog (具体见下文)来创建。 ### 什么是 Syslog? ### -Linux 系统日志文件是如何创建的呢?答案是通过 syslog 守护程序,它在 syslog -套接字 `/dev/log` 上监听日志信息,然后将它们写入适当的日志文件中。 +Linux 系统日志文件是如何创建的呢?答案是通过 syslog 守护程序,它在 syslog 套接字 `/dev/log` 上监听日志信息,然后将它们写入适当的日志文件中。 -单词“syslog” 是一个重载的条目,并经常被用来简称如下的几个名称之一: +单词“syslog” 代表几个意思,并经常被用来简称如下的几个名称之一: -1. **Syslog 守护进程** — 一个用来接收,处理和发送 syslog 信息的程序。它可以[远程发送 syslog][2] 到一个集中式的服务器或写入一个本地文件。常见的例子包括 rsyslogd 和 syslog-ng。在这种使用方式中,人们常说 "发送到 syslog." -1. **Syslog 协议** — 一个指定日志如何通过网络来传送的传输协议和一个针对 syslog 信息(具体见下文) 的数据格式的定义。它在 [RFC-5424][3] 中被正式定义。对于文本日志,标准的端口是 514,对于加密日志,端口是 6514。在这种使用方式中,人们常说"通过 syslog 传送." -1. **Syslog 信息** — syslog 格式的日志信息或事件,它包括一个带有几个标准域的文件头。在这种使用方式中,人们常说"发送 syslog." +1. **Syslog 守护进程** — 一个用来接收、处理和发送 syslog 信息的程序。它可以[远程发送 syslog][2] 到一个集中式的服务器或写入到一个本地文件。常见的例子包括 rsyslogd 和 syslog-ng。在这种使用方式中,人们常说“发送到 syslog”。 +1. **Syslog 协议** — 一个指定日志如何通过网络来传送的传输协议和一个针对 syslog 信息(具体见下文) 的数据格式的定义。它在 [RFC-5424][3] 中被正式定义。对于文本日志,标准的端口是 514,对于加密日志,端口是 6514。在这种使用方式中,人们常说“通过 syslog 传送”。 +1. **Syslog 信息** — syslog 格式的日志信息或事件,它包括一个带有几个标准字段的消息头。在这种使用方式中,人们常说“发送 syslog”。 -Syslog 信息或事件包括一个带有几个标准域的 header ,使得分析和路由更方便。它们包括时间戳,应用程序的名称,在系统中信息来源的分类或位置,以及事件的优先级。 +Syslog 信息或事件包括一个带有几个标准字段的消息头,可以使分析和路由更方便。它们包括时间戳、应用程序的名称、在系统中信息来源的分类或位置、以及事件的优先级。 -下面展示的是一个包含 syslog header 的日志信息,它来自于 sshd 守护进程,它控制着到该系统的远程登录,这个信息描述的是一次失败的登录尝试: +下面展示的是一个包含 syslog 消息头的日志信息,它来自于控制着到该系统的远程登录的 sshd 守护进程,这个信息描述的是一次失败的登录尝试: <34>1 2003-10-11T22:14:15.003Z server1.com sshd - - pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.0.2.2 -### Syslog 格式和域 ### +### Syslog 格式和字段 ### -每条 syslog 信息包含一个带有域的 header,这些域是结构化的数据,使得分析和路由事件更加容易。下面是我们使用的用来产生上面的 syslog 例子的格式,你可以将每个值匹配到一个特定的域的名称上。 +每条 syslog 信息包含一个带有字段的信息头,这些字段是结构化的数据,使得分析和路由事件更加容易。下面是我们使用的用来产生上面的 syslog 例子的格式,你可以将每个值匹配到一个特定的字段的名称上。 <%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% %msg%n -下面,你将看到一些在查找或排错时最常使用的 syslog 域: +下面,你将看到一些在查找或排错时最常使用的 syslog 字段: #### 时间戳 #### [时间戳][4] (上面的例子为 2003-10-11T22:14:15.003Z) 暗示了在系统中发送该信息的时间和日期。这个时间在另一系统上接收该信息时可能会有所不同。上面例子中的时间戳可以分解为: -- **2003-10-11** 年,月,日. -- **T** 为时间戳的必需元素,它将日期和时间分离开. -- **22:14:15.003** 是 24 小时制的时间,包括进入下一秒的毫秒数(**003**). -- **Z** 是一个可选元素,指的是 UTC 时间,除了 Z,这个例子还可以包括一个偏移量,例如 -08:00,这意味着时间从 UTC 偏移 8 小时,即 PST 时间. +- **2003-10-11** 年,月,日。 +- **T** 为时间戳的必需元素,它将日期和时间分隔开。 +- **22:14:15.003** 是 24 小时制的时间,包括进入下一秒的毫秒数(**003**)。 +- **Z** 是一个可选元素,指的是 UTC 时间,除了 Z,这个例子还可以包括一个偏移量,例如 -08:00,这意味着时间从 UTC 偏移 8 小时,即 PST 时间。 #### 主机名 #### -[主机名][5] 域(在上面的例子中对应 server1.com) 指的是主机的名称或发送信息的系统. +[主机名][5] 字段(在上面的例子中对应 server1.com) 指的是主机的名称或发送信息的系统. #### 应用名 #### -[应用名][6] 域(在上面的例子中对应 sshd:auth) 指的是发送信息的程序的名称. +[应用名][6] 字段(在上面的例子中对应 sshd:auth) 指的是发送信息的程序的名称. #### 优先级 #### -优先级域或缩写为 [pri][7] (在上面的例子中对应 <34>) 告诉我们这个事件有多紧急或多严峻。它由两个数字域组成:设备域和紧急性域。紧急性域从代表 debug 类事件的数字 7 一直到代表紧急事件的数字 0 。设备域描述了哪个进程创建了该事件。它从代表内核信息的数字 0 到代表本地应用使用的 23 。 +优先级字段或缩写为 [pri][7] (在上面的例子中对应 <34>) 告诉我们这个事件有多紧急或多严峻。它由两个数字字段组成:设备字段和紧急性字段。紧急性字段从代表 debug 类事件的数字 7 一直到代表紧急事件的数字 0 。设备字段描述了哪个进程创建了该事件。它从代表内核信息的数字 0 到代表本地应用使用的 23 。 + +Pri 有两种输出方式。第一种是以一个单独的数字表示,可以这样计算:先用设备字段的值乘以 8,再加上紧急性字段的值:(设备字段)(8) + (紧急性字段)。第二种是 pri 文本,将以“设备字段.紧急性字段” 的字符串格式输出。后一种格式更方便阅读和搜索,但占据更多的存储空间。 -Pri 有两种输出方式。第一种是以一个单独的数字表示,可以这样计算:先用设备域的值乘以 8,再加上紧急性域的值:(设备域)(8) + (紧急性域)。第二种是 pri 文本,将以“设备域.紧急性域” 的字符串格式输出。后一种格式更方便阅读和搜索,但占据更多的存储空间。 -------------------------------------------------------------------------------- via: http://www.loggly.com/ultimate-guide/logging/linux-logging-basics/ -作者:[Jason Skowronski][a1] -作者:[Amy Echeverri][a2] -作者:[Sadequl Hussain][a3] +作者:[Jason Skowronski][a1],[Amy Echeverri][a2],[Sadequl Hussain][a3] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 1e2265405f51c68843b693a2b28d1895b6f8d286 Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Thu, 13 Aug 2015 14:31:47 +0800 Subject: [PATCH 1712/2517] =?UTF-8?q?=E3=80=90Translating=20by=20dingdongn?= =?UTF-8?q?igetou=E3=80=9120150813=20Linux=20file=20system=20hierarchy=20v?= =?UTF-8?q?2.0.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20150813 Linux file system hierarchy v2.0.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150813 Linux file system hierarchy v2.0.md b/sources/tech/20150813 Linux file system hierarchy v2.0.md index 9df6d23dcf..0021bb57c9 100644 --- a/sources/tech/20150813 Linux file system hierarchy v2.0.md +++ b/sources/tech/20150813 Linux file system hierarchy v2.0.md @@ -1,3 +1,6 @@ + +Translating by dingdongnigetou + Linux file system hierarchy v2.0 ================================================================================ What is a file in Linux? What is file system in Linux? Where are all the configuration files? Where do I keep my downloaded applications? Is there really a filesystem standard structure in Linux? Well, the above image explains Linux file system hierarchy in a very simple and non-complex way. It’s very useful when you’re looking for a configuration file or a binary file. I’ve added some explanation and examples below, but that’s TL;DR. @@ -435,4 +438,4 @@ via: http://www.blackmoreops.com/2015/06/18/linux-file-system-hierarchy-v2-0/ [1]:http://www.blackmoreops.com/2015/02/15/in-light-of-recent-linux-exploits-linux-security-audit-is-a-must/ [2]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-file-system-hierarchy-v2.0-2480px-blackMORE-Ops.png -[3]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-File-System-Hierarchy-blackMORE-Ops.pdf \ No newline at end of file +[3]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-File-System-Hierarchy-blackMORE-Ops.pdf From 4aec4761431227cc01ac683281d99eef6c87460e Mon Sep 17 00:00:00 2001 From: XIAOYU <1136299502@qq.com> Date: Thu, 13 Aug 2015 19:41:10 +0800 Subject: [PATCH 1713/2517] translating by xiaoyu33 translating by xiaoyu33 --- ...kr Is An Open-Source RSS News Ticker for Linux Desktops.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md b/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md index 638482a144..ccbbd3abd8 100644 --- a/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md +++ b/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md @@ -1,3 +1,5 @@ +translating by xiaoyu33 + Tickr Is An Open-Source RSS News Ticker for Linux Desktops ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/rss-tickr.jpg) @@ -92,4 +94,4 @@ via: http://www.omgubuntu.co.uk/2015/06/tickr-open-source-desktop-rss-news-ticke 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:apt://tickr \ No newline at end of file +[1]:apt://tickr From efdfdebe94f2ae4e42040c614e7ad05491451d17 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Thu, 13 Aug 2015 11:45:11 -0500 Subject: [PATCH 1714/2517] Update 20150813 How to get Public IP from Linux Terminal.md --- .../tech/20150813 How to get Public IP from Linux Terminal.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150813 How to get Public IP from Linux Terminal.md b/sources/tech/20150813 How to get Public IP from Linux Terminal.md index f0bba2cea9..c22fec283d 100644 --- a/sources/tech/20150813 How to get Public IP from Linux Terminal.md +++ b/sources/tech/20150813 How to get Public IP from Linux Terminal.md @@ -1,3 +1,4 @@ +KevinSJ Translating How to get Public IP from Linux Terminal? ================================================================================ ![](http://www.blackmoreops.com/wp-content/uploads/2015/06/256x256xHow-to-get-Public-IP-from-Linux-Terminal-blackMORE-Ops.png.pagespeed.ic.GKEAEd4UNr.png) @@ -65,4 +66,4 @@ via: http://www.blackmoreops.com/2015/06/14/how-to-get-public-ip-from-linux-term 译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From f166b13f668e522a49246db26e8a746a6fae67d4 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 14 Aug 2015 01:27:35 +0800 Subject: [PATCH 1715/2517] Delete 20150717 How to monitor NGINX with Datadog - Part 3.md --- ... to monitor NGINX with Datadog - Part 3.md | 151 ------------------ 1 file changed, 151 deletions(-) delete mode 100644 sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md diff --git a/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md b/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md deleted file mode 100644 index 727c552ed0..0000000000 --- a/sources/tech/20150717 How to monitor NGINX with Datadog - Part 3.md +++ /dev/null @@ -1,151 +0,0 @@ -translation by strugglingyouth -How to monitor NGINX with Datadog - Part 3 -================================================================================ -![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_3.png) - -If you’ve already read [our post on monitoring NGINX][1], you know how much information you can gain about your web environment from just a handful of metrics. And you’ve also seen just how easy it is to start collecting metrics from NGINX on ad hoc basis. But to implement comprehensive, ongoing NGINX monitoring, you will need a robust monitoring system to store and visualize your metrics, and to alert you when anomalies happen. In this post, we’ll show you how to set up NGINX monitoring in Datadog so that you can view your metrics on customizable dashboards like this: - -![NGINX dashboard](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_board_5.png) - -Datadog allows you to build graphs and alerts around individual hosts, services, processes, metrics—or virtually any combination thereof. For instance, you can monitor all of your NGINX hosts, or all hosts in a certain availability zone, or you can monitor a single key metric being reported by all hosts with a certain tag. This post will show you how to: - -- Monitor NGINX metrics on Datadog dashboards, alongside all your other systems -- Set up automated alerts to notify you when a key metric changes dramatically - -### Configuring NGINX ### - -To collect metrics from NGINX, you first need to ensure that NGINX has an enabled status module and a URL for reporting its status metrics. Step-by-step instructions [for configuring open-source NGINX][2] and [NGINX Plus][3] are available in our companion post on metric collection. - -### Integrating Datadog and NGINX ### - -#### Install the Datadog Agent #### - -The Datadog Agent is [the open-source software][4] that collects and reports metrics from your hosts so that you can view and monitor them in Datadog. Installing the agent usually takes [just a single command][5]. - -As soon as your Agent is up and running, you should see your host reporting metrics [in your Datadog account][6]. - -![Datadog infrastructure list](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/infra_2.png) - -#### Configure the Agent #### - -Next you’ll need to create a simple NGINX configuration file for the Agent. The location of the Agent’s configuration directory for your OS can be found [here][7]. - -Inside that directory, at conf.d/nginx.yaml.example, you will find [a sample NGINX config file][8] that you can edit to provide the status URL and optional tags for each of your NGINX instances: - - init_config: - - instances: - - - nginx_status_url: http://localhost/nginx_status/ - tags: - - instance:foo - -Once you have supplied the status URLs and any tags, save the config file as conf.d/nginx.yaml. - -#### Restart the Agent #### - -You must restart the Agent to load your new configuration file. The restart command varies somewhat by platform—see the specific commands for your platform [here][9]. - -#### Verify the configuration settings #### - -To check that Datadog and NGINX are properly integrated, run the Datadog info command. The command for each platform is available [here][10]. - -If the configuration is correct, you will see a section like this in the output: - - Checks - ====== - - [...] - - nginx - ----- - - instance #0 [OK] - - Collected 8 metrics & 0 events - -#### Install the integration #### - -Finally, switch on the NGINX integration inside your Datadog account. It’s as simple as clicking the “Install Integration” button under the Configuration tab in the [NGINX integration settings][11]. - -![Install integration](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/install.png) - -### Metrics! ### - -Once the Agent begins reporting NGINX metrics, you will see [an NGINX dashboard][12] among your list of available dashboards in Datadog. - -The basic NGINX dashboard displays a handful of graphs encapsulating most of the key metrics highlighted [in our introduction to NGINX monitoring][13]. (Some metrics, notably request processing time, require log analysis and are not available in Datadog.) - -You can easily create a comprehensive dashboard for monitoring your entire web stack by adding additional graphs with important metrics from outside NGINX. For example, you might want to monitor host-level metrics on your NGINX hosts, such as system load. To start building a custom dashboard, simply clone the default NGINX dashboard by clicking on the gear near the upper right of the dashboard and selecting “Clone Dash”. - -![Clone dash](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/clone_2.png) - -You can also monitor your NGINX instances at a higher level using Datadog’s [Host Maps][14]—for instance, color-coding all your NGINX hosts by CPU usage to identify potential hotspots. - -![](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx-host-map-3.png) - -### Alerting on NGINX metrics ### - -Once Datadog is capturing and visualizing your metrics, you will likely want to set up some monitors to automatically keep tabs on your metrics—and to alert you when there are problems. Below we’ll walk through a representative example: a metric monitor that alerts on sudden drops in NGINX throughput. - -#### Monitor your NGINX throughput #### - -Datadog metric alerts can be threshold-based (alert when the metric exceeds a set value) or change-based (alert when the metric changes by a certain amount). In this case we’ll take the latter approach, alerting when our incoming requests per second drop precipitously. Such drops are often indicative of problems. - -1.**Create a new metric monitor**. Select “New Monitor” from the “Monitors” dropdown in Datadog. Select “Metric” as the monitor type. - -![NGINX metric monitor](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_1.png) - -2.**Define your metric monitor**. We want to know when our total NGINX requests per second drop by a certain amount. So we define the metric of interest to be the sum of nginx.net.request_per_s across our infrastructure. - -![NGINX metric](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_2.png) - -3.**Set metric alert conditions**. Since we want to alert on a change, rather than on a fixed threshold, we select “Change Alert.” We’ll set the monitor to alert us whenever the request volume drops by 30 percent or more. Here we use a one-minute window of data to represent the metric’s value “now” and alert on the average change across that interval, as compared to the metric’s value 10 minutes prior. - -![NGINX metric change alert](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_3.png) - -4.**Customize the notification**. If our NGINX request volume drops, we want to notify our team. In this case we will post a notification in the ops team’s chat room and page the engineer on call. In “Say what’s happening”, we name the monitor and add a short message that will accompany the notification to suggest a first step for investigation. We @mention the Slack channel that we use for ops and use @pagerduty to [route the alert to PagerDuty][15] - -![NGINX metric notification](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_4v3.png) - -5.**Save the integration monitor**. Click the “Save” button at the bottom of the page. You’re now monitoring a key NGINX [work metric][16], and your on-call engineer will be paged anytime it drops rapidly. - -### Conclusion ### - -In this post we’ve walked you through integrating NGINX with Datadog to visualize your key metrics and notify your team when your web infrastructure shows signs of trouble. - -If you’ve followed along using your own Datadog account, you should now have greatly improved visibility into what’s happening in your web environment, as well as the ability to create automated monitors tailored to your environment, your usage patterns, and the metrics that are most valuable to your organization. - -If you don’t yet have a Datadog account, you can sign up for [a free trial][17] and start monitoring your infrastructure, your applications, and your services today. - ----------- - -Source Markdown for this post is available [on GitHub][18]. Questions, corrections, additions, etc.? Please [let us know][19]. - ------------------------------------------------------------- - -via: https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ - -作者:K Young -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ -[2]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source -[3]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#plus -[4]:https://github.com/DataDog/dd-agent -[5]:https://app.datadoghq.com/account/settings#agent -[6]:https://app.datadoghq.com/infrastructure -[7]:http://docs.datadoghq.com/guides/basic_agent_usage/ -[8]:https://github.com/DataDog/dd-agent/blob/master/conf.d/nginx.yaml.example -[9]:http://docs.datadoghq.com/guides/basic_agent_usage/ -[10]:http://docs.datadoghq.com/guides/basic_agent_usage/ -[11]:https://app.datadoghq.com/account/settings#integrations/nginx -[12]:https://app.datadoghq.com/dash/integration/nginx -[13]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ -[14]:https://www.datadoghq.com/blog/introducing-host-maps-know-thy-infrastructure/ -[15]:https://www.datadoghq.com/blog/pagerduty/ -[16]:https://www.datadoghq.com/blog/monitoring-101-collecting-data/#metrics -[17]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/#sign-up -[18]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_monitor_nginx_with_datadog.md -[19]:https://github.com/DataDog/the-monitor/issues From dda288ff51ce354aed0d3015ec76b2525e678124 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 14 Aug 2015 01:28:35 +0800 Subject: [PATCH 1716/2517] Create 20150717 How to monitor NGINX with Datadog - Part 3.md --- ... to monitor NGINX with Datadog - Part 3.md | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 translated/tech/20150717 How to monitor NGINX with Datadog - Part 3.md diff --git a/translated/tech/20150717 How to monitor NGINX with Datadog - Part 3.md b/translated/tech/20150717 How to monitor NGINX with Datadog - Part 3.md new file mode 100644 index 0000000000..003290a915 --- /dev/null +++ b/translated/tech/20150717 How to monitor NGINX with Datadog - Part 3.md @@ -0,0 +1,154 @@ + +如何使用 Datadog 监控 NGINX - 第3部分 +================================================================================ +![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_3.png) + +如果你已经阅读了[前面的如何监控 NGINX][1],你应该知道从你网络环境的几个指标中可以获取多少信息。而且你也看到了从 NGINX 特定的基础中收集指标是多么容易的。但要实现全面,持续的监控 NGINX,你需要一个强大的监控系统来存储并将指标可视化,当异常发生时能提醒你。在这篇文章中,我们将向你展示如何使用 Datadog 安装 NGINX 监控,以便你可以在定制的仪表盘中查看这些指标: + +![NGINX dashboard](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_board_5.png) + +Datadog 允许你建立单个主机,服务,流程,度量,或者几乎任何它们的组合图形周围和警报。例如,你可以在一定的可用性区域监控所有NGINX主机,或所有主机,或者您可以监视被报道具有一定标签的所有主机的一个关键指标。本文将告诉您如何: + +Datadog 允许你来建立图表并报告周围的主机,进程,指标或其他的。例如,你可以在特定的可用性区域监控所有 NGINX 主机,或所有主机,或者你可以监视一个关键指标并将它报告给周围所有标记的主机。本文将告诉你如何做: + +- 在 Datadog 仪表盘上监控 NGINX 指标,对其他所有系统 +- 当一个关键指标急剧变化时设置自动警报来通知你 + +### 配置 NGINX ### + +为了收集 NGINX 指标,首先需要确保 NGINX 已启用 status 模块和一个URL 来报告 status 指标。下面将一步一步展示[配置开源 NGINX ][2]和[NGINX Plus][3]。 + +### 整合 Datadog 和 NGINX ### + +#### 安装 Datadog 代理 #### + +Datadog 代理是 [一个开源软件][4] 能收集和报告你主机的指标,这样就可以使用 Datadog 查看和监控他们。安装代理通常 [仅需要一个命令][5] + +只要你的代理启动并运行着,你会看到你主机的指标报告[在你 Datadog 账号下][6]。 + +![Datadog infrastructure list](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/infra_2.png) + +#### 配置 Agent #### + + +接下来,你需要为代理创建一个简单的 NGINX 配置文件。在你系统中代理的配置目录应该 [在这儿][7]。 + +在目录里面的 conf.d/nginx.yaml.example 中,你会发现[一个简单的配置文件][8],你可以编辑并提供 status URL 和可选的标签为每个NGINX 实例: + + init_config: + + instances: + + - nginx_status_url: http://localhost/nginx_status/ + tags: + - instance:foo + +一旦你修改了 status URLs 和其他标签,将配置文件保存为 conf.d/nginx.yaml。 + +#### 重启代理 #### + + +你必须重新启动代理程序来加载新的配置文件。重新启动命令 [在这里][9] 根据平台的不同而不同。 + +#### 检查配置文件 #### + +要检查 Datadog 和 NGINX 是否正确整合,运行 Datadog 的信息命令。每个平台使用的命令[看这儿][10]。 + +如果配置是正确的,你会看到这样的输出: + + Checks + ====== + + [...] + + nginx + ----- + - instance #0 [OK] + - Collected 8 metrics & 0 events + +#### 安装整合 #### + +最后,在你的 Datadog 帐户里面整合 Nginx。这非常简单,你只要点击“Install Integration”按钮在 [NGINX 集成设置][11] 配置表中。 + +![Install integration](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/install.png) + +### 指标! ### + +一旦代理开始报告 NGINX 指标,你会看到 [一个 NGINX 仪表盘][12] 在你 Datadog 可用仪表盘的列表中。 + +基本的 NGINX 仪表盘显示了几个关键指标 [在我们介绍的 NGINX 监控中][13] 的最大值。 (一些指标,特别是请求处理时间,日志分析,Datadog 不提供。) + +你可以轻松创建一个全面的仪表盘来监控你的整个网站区域通过增加额外的图形与 NGINX 外部的重要指标。例如,你可能想监视你 NGINX 主机的host-level 指标,如系统负载。你需要构建一个自定义的仪表盘,只需点击靠近仪表盘的右上角的选项并选择“Clone Dash”来克隆一个默认的 NGINX 仪表盘。 + +![Clone dash](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/clone_2.png) + +你也可以更高级别的监控你的 NGINX 实例通过使用 Datadog 的 [Host Maps][14] -对于实例,color-coding 你所有的 NGINX 主机通过 CPU 使用率来辨别潜在热点。 + +![](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx-host-map-3.png) + +### NGINX 指标 ### + +一旦 Datadog 捕获并可视化你的指标,你可能会希望建立一些监控自动密切的关注你的指标,并当有问题提醒你。下面将介绍一个典型的例子:一个提醒你 NGINX 吞吐量突然下降时的指标监控器。 + +#### 监控 NGINX 吞吐量 #### + +Datadog 指标警报可以是 threshold-based(当指标超过设定值会警报)或 change-based(当指标的变化超过一定范围会警报)。在这种情况下,我们会采取后一种方式,当每秒传入的请求急剧下降时会提醒我们。下降往往意味着有问题。 + +1.**创建一个新的指标监控**. 从 Datadog 的“Monitors”下拉列表中选择“New Monitor”。选择“Metric”作为监视器类型。 + +![NGINX metric monitor](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_1.png) + +2.**定义你的指标监视器**. 我们想知道 NGINX 每秒总的请求量下降的数量。所以我们在基础设施中定义我们感兴趣的 nginx.net.request_per_s度量和。 + +![NGINX metric](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_2.png) + +3.**设置指标警报条件**.我们想要在变化时警报,而不是一个固定的值,所以我们选择“Change Alert”。我们设置监控为无论何时请求量下降了30%以上时警报。在这里,我们使用一个 one-minute 数据窗口来表示“now” 指标的值,警报横跨该间隔内的平均变化,和之前 10 分钟的指标值作比较。 + +![NGINX metric change alert](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_3.png) + +4.**自定义通知**.如果 NGINX 的请求量下降,我们想要通知我们的团队。在这种情况下,我们将给 ops 队的聊天室发送通知,网页呼叫工程师。在“Say what’s happening”中,我们将其命名为监控器并添加一个短消息将伴随该通知并建议首先开始调查。我们使用 @mention 作为一般警告,使用 ops 并用 @pagerduty [专门给 PagerDuty 发警告][15]。 + +![NGINX metric notification](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_4v3.png) + +5.**保存集成监控**.点击页面底部的“Save”按钮。你现在监控的关键指标NGINX [work 指标][16],它边打电话给工程师并在它迅速下时随时分页。 + +### 结论 ### + +在这篇文章中,我们已经通过整合 NGINX 与 Datadog 来可视化你的关键指标,并当你的网络基础架构有问题时会通知你的团队。 + +如果你一直使用你自己的 Datadog 账号,你现在应该在 web 环境中有了很大的可视化提高,也有能力根据你的环境创建自动监控,你所使用的模式,指标应该是最有价值的对你的组织。 + +如果你还没有 Datadog 帐户,你可以注册[免费试用][17],并开始监视你的基础架构,应用程序和现在的服务。 + +---------- +这篇文章的来源在 [on GitHub][18]. 问题,错误,补充等?请[联系我们][19]. + +------------------------------------------------------------ + +via: https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ + +作者:K Young +译者:[strugglingyouth](https://github.com/译者ID) +校对:[strugglingyouth](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ +[2]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source +[3]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#plus +[4]:https://github.com/DataDog/dd-agent +[5]:https://app.datadoghq.com/account/settings#agent +[6]:https://app.datadoghq.com/infrastructure +[7]:http://docs.datadoghq.com/guides/basic_agent_usage/ +[8]:https://github.com/DataDog/dd-agent/blob/master/conf.d/nginx.yaml.example +[9]:http://docs.datadoghq.com/guides/basic_agent_usage/ +[10]:http://docs.datadoghq.com/guides/basic_agent_usage/ +[11]:https://app.datadoghq.com/account/settings#integrations/nginx +[12]:https://app.datadoghq.com/dash/integration/nginx +[13]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ +[14]:https://www.datadoghq.com/blog/introducing-host-maps-know-thy-infrastructure/ +[15]:https://www.datadoghq.com/blog/pagerduty/ +[16]:https://www.datadoghq.com/blog/monitoring-101-collecting-data/#metrics +[17]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/#sign-up +[18]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_monitor_nginx_with_datadog.md +[19]:https://github.com/DataDog/the-monitor/issues From 0ab376d789381a52cc6928c859782fa63a99faa4 Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 14 Aug 2015 08:48:38 +0800 Subject: [PATCH 1717/2517] Update 20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md --- ...Easier For You To Install The Latest Nvidia Linux Driver.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md b/sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md index 2bae0061c4..2dfc45cc4f 100644 --- a/sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md +++ b/sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver ================================================================================ ![Ubuntu Gamers are on the rise -and so is demand for the latest drivers](http://www.omgubuntu.co.uk/wp-content/uploads/2014/03/ubuntugamer_logo_dark-500x250.jpg) @@ -60,4 +61,4 @@ via: http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux- 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:https://plus.google.com/117485690627814051450/?rel=author \ No newline at end of file +[a]:https://plus.google.com/117485690627814051450/?rel=author From 8595d6c8e51f7c3de6417721c1d05e0936617749 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Fri, 14 Aug 2015 11:01:01 +0800 Subject: [PATCH 1718/2517] [Translated]20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md --- ... Install The Latest Nvidia Linux Driver.md | 64 ------------------- ... Install The Latest Nvidia Linux Driver.md | 63 ++++++++++++++++++ 2 files changed, 63 insertions(+), 64 deletions(-) delete mode 100644 sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md create mode 100644 translated/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md diff --git a/sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md b/sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md deleted file mode 100644 index 2dfc45cc4f..0000000000 --- a/sources/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md +++ /dev/null @@ -1,64 +0,0 @@ -Translating by GOLinux! -Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver -================================================================================ -![Ubuntu Gamers are on the rise -and so is demand for the latest drivers](http://www.omgubuntu.co.uk/wp-content/uploads/2014/03/ubuntugamer_logo_dark-500x250.jpg) -Ubuntu Gamers are on the rise -and so is demand for the latest drivers - -**Installing the latest upstream NVIDIA graphics driver on Ubuntu could be about to get much easier. ** - -Ubuntu developers are considering the creation of a brand new ‘official’ PPA to distribute the latest closed-source NVIDIA binary drivers to desktop users. - -The move would benefit Ubuntu gamers **without** risking the stability of the OS for everyone else. - -New upstream drivers would be installed and updated from this new PPA **only** when a user explicitly opts-in to it. Everyone else would continue to receive and use the more recent stable NVIDIA Linux driver snapshot included in the Ubuntu archive. - -### Why Is This Needed? ### - -![Ubuntu provides drivers – but they’re not the latest](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/drivers.jpg) -Ubuntu provides drivers – but they’re not the latest - -The closed-source NVIDIA graphics drivers that are available to install on Ubuntu from the archive (using the command line, synaptic or through the additional drivers tool) work fine for most and can handle the composited Unity desktop shell with ease. - -For gaming needs it’s a different story. - -If you want to squeeze every last frame and HD texture out of the latest big-name Steam game you’ll need the latest binary drivers blob. - -> ‘Installing the very latest Nvidia Linux driver on Ubuntu is not easy and not always safe.’ - -The more recent the driver the more likely it is to support the latest features and technologies, or come pre-packed with game-specific tweaks and bug fixes too. - -The problem is that installing the very latest Nvidia Linux driver on Ubuntu is not easy and not always safe. - -To fill the void many third-party PPAs maintained by enthusiasts have emerged. Since many of these PPAs also distribute other experimental or bleeding-edge software their use is **not without risk**. Adding a bleeding edge PPA is often the fastest way to entirely hose a system! - -A solution that lets Ubuntu users install the latest propriety graphics drivers as offered in third-party PPAs is needed **but** with the safety catch of being able to roll-back to the stable archive version if needed. - -### ‘Demand for fresh drivers is hard to ignore’ ### - -> ‘A solution that lets Ubuntu users get the latest hardware drivers safely is coming.’ - -‘The demand for fresh drivers in a fast developing market is becoming hard to ignore, users are going to want the latest upstream has to offer,’ Castro explains in an e-mail to the Ubuntu Desktop mailing list. - -‘[NVIDIA] can deliver a kickass experience with almost no effort from the user [in Windows 10]. Until we can convince NVIDIA to do the same with Ubuntu we’re going to have to pick up the slack.’ - -Castro’s proposition of a “blessed” NVIDIA PPA is the easiest way to do this. - -Gamers would be able to opt-in to receive new drivers from the PPA straight from Ubuntu’s default proprietary hardware drivers tool — no need for them to copy and paste terminal commands from websites or wiki pages. - -The drivers within this PPA would be packaged and maintained by a select band of community members and receive benefits from being a semi-official option, namely **automated testing**. - -As Castro himself puts it: ‘People want the latest bling, and no matter what they’re going to do it. We might as well put a framework around it so people can get what they want without breaking their computer.’ - -**Would you make use of this PPA? How would you rate the performance of the default Nvidia drivers on Ubuntu? Share your thoughts in the comments, folks! ** - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux-drivers - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author diff --git a/translated/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md b/translated/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md new file mode 100644 index 0000000000..bf24d3e5c2 --- /dev/null +++ b/translated/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md @@ -0,0 +1,63 @@ +Ubuntu想要让你安装最新版Nvidia Linux驱动更简单 +================================================================================ +![Ubuntu Gamers are on the rise -and so is demand for the latest drivers](http://www.omgubuntu.co.uk/wp-content/uploads/2014/03/ubuntugamer_logo_dark-500x250.jpg) +Ubuntu游戏在增长——因而需要最新版驱动 + +**Ubuntu上安装上游NVIDIA图形驱动即将变得更加容易。** + +Ubuntu开发者正在考虑构建一个全新的'官方'PPA,以便为桌面用户分发最新的闭源NVIDIA二进制驱动。 + +该项运动将使得Ubuntu游戏玩家收益,并且**不会**给其它人造成OS稳定性方面的风险。 + +新的上游驱动将通过该新PPA安装并更新,**只有**在用户明确选择它。其他人将继续接收并使用更近的包含在Ubuntu归档中的稳定版NVIDIA Linux驱动快照。 + +### 为什么需要该项目? ### + +![Ubuntu provides drivers – but they’re not the latest](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/drivers.jpg) +Ubuntu提供了驱动——但是它们不是最新的 + +可以从归档中(使用命令行、synaptic,或者通过额外驱动工具)安装到Ubuntu上的闭源NVIDIA图形驱动在大多数情况下都能工作得很好,并且可以轻松地处理混合Unity桌面shell。 + +对于游戏需求而言,那完全是另外一码事儿。 + +如果你想要将所有最后帧和HD纹理从最新的大游戏Steam游戏中挤压出来,你需要最新的二进制驱动对象。 + +> '安装最新Nvidia Linux驱动到Ubuntu不是件容易的事儿,而且也不具安全保证。' + +驱动越新,越可能支持最新的特性和技术,或者预先打包好了游戏专门优化和漏洞修复。 + +问题在于安装最新的Nvidia Linux驱动到Ubuntu上不是件容易的事儿,也没有安全保证。 + +要填补空白,许多由热心人维护的第三方PPA就出现了。由于许多这些PPA也发布了其它实验性的或者前沿软件,它们的使用**没有风险**。添加一个前沿的PPA通常是最快的方式,以完全满足系统需要! + +一个让Ubuntu用户安装作为第三方PPA提供最新专有图形驱动解决方案就十分需要了,**但是**提供了一个安全机制,如果有需要,你可以回滚到稳定版本。 + +### ‘对全新驱动的需求难以忽视’ ### + +> '一个让Ubuntu用户安全地获得最新硬件驱动的解决方案出现了。' + +'在快速开发市场中,对全新驱动的需求正变得难以忽视,用户将想要最新的上游软件,'卡斯特罗在一封给Ubuntu桌面邮件列表的电子邮件中解释道。 + +'[NVIDIA]可以分发一个了不起的体验,几乎像[Windows 10]用户那样毫不费力。直到我们可以证实NVIDIA在Ubuntu中做了同样的工作,我们就可以收拾残局了。' + +卡斯特罗关于一个“神圣的”NVIDIA PPA命题就是最实现这一目的的最容易的方式。 + +游戏玩家将可以在Ubuntu的默认专有软件驱动工具中选择接收来自该PPA的新驱动——不需要它们从网站或维基页面拷贝并粘贴终端命令了。 + +该PPA内的驱动将由一个选定的社区成员组成的团队打包并维护,并从一个名为**自动化测试**的半官方选项受惠。 + +就像卡斯特罗自己说的那样:'人们想要最新的闪光的东西,不管他们想要做什么。我们也许也要在其周围放置一个框架,因此人们可以获得他们所想要的,而不必破坏他们的计算机。' + +**你想要使用这个PPA吗?你怎样来评估Ubuntu上默认Nvidia驱动的性能呢?在评论中分享你的想法吧,伙计们!** + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux-drivers + +作者:[Joey-Elijah Sneddon][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author From 3b7a14d182ecdfb4a1b30861b572d5c2d4566ae9 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Fri, 14 Aug 2015 15:19:33 +0800 Subject: [PATCH 1719/2517] translating wi-cuckoo --- ...ss Data Virtualization GA with OData in Docker Container.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md b/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md index 0893b9a361..f1505c5649 100644 --- a/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md +++ b/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md @@ -1,3 +1,4 @@ +translating wi-cuckoo Howto Run JBoss Data Virtualization GA with OData in Docker Container ================================================================================ Hi everyone, today we'll learn how to run JBoss Data Virtualization 6.0.0.GA with OData in a Docker Container. JBoss Data Virtualization is a data supply and integration solution platform that transforms various scatered multiple sources data, treats them as single source and delivers the required data into actionable information at business speed to any applications or users. JBoss Data Virtualization can help us easily combine and transform data into reusable business friendly data models and make unified data easily consumable through open standard interfaces. It offers comprehensive data abstraction, federation, integration, transformation, and delivery capabilities to combine data from one or multiple sources into reusable for agile data utilization and sharing.For more information about JBoss Data Virtualization, we can check out [its official page][1]. Docker is an open source platform that provides an open platform to pack, ship and run any application as a lightweight container. Running JBoss Data Virtualization with OData in Docker Container makes us easy to handle and launch. @@ -99,4 +100,4 @@ via: http://linoxide.com/linux-how-to/run-jboss-data-virtualization-ga-odata-doc [a]:http://linoxide.com/author/arunp/ [1]:http://www.redhat.com/en/technologies/jboss-middleware/data-virtualization [2]:https://github.com/jbossdemocentral/dv-odata-docker-integration-demo -[3]:http://www.jboss.org/products/datavirt/download/ \ No newline at end of file +[3]:http://www.jboss.org/products/datavirt/download/ From 74c949d60bc82fe61d3115007b3335bc6b4e6ed2 Mon Sep 17 00:00:00 2001 From: VicYu Date: Fri, 14 Aug 2015 18:03:52 +0800 Subject: [PATCH 1720/2517] Update 20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md --- ...xt-to-Speech Schedule a Job and Watch Commands in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md b/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md index 1ad92c594b..28981add17 100644 --- a/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md +++ b/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md @@ -1,3 +1,5 @@ + Vic020 + Linux Tricks: Play Game in Chrome, Text-to-Speech, Schedule a Job and Watch Commands in Linux ================================================================================ Here again, I have compiled a list of four things under [Linux Tips and Tricks][1] series you may do to remain more productive and entertained with Linux Environment. @@ -140,4 +142,4 @@ via: http://www.tecmint.com/text-to-speech-in-terminal-schedule-a-job-and-watch- [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/tag/linux-tricks/ -[2]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ \ No newline at end of file +[2]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ From dd71c92d85e2bb24c957e6d2179ed005b1ae28ec Mon Sep 17 00:00:00 2001 From: KS Date: Fri, 14 Aug 2015 22:54:04 +0800 Subject: [PATCH 1721/2517] Create 20150803 Managing Linux Logs.md --- .../tech/20150803 Managing Linux Logs.md | 418 ++++++++++++++++++ 1 file changed, 418 insertions(+) create mode 100644 translated/tech/20150803 Managing Linux Logs.md diff --git a/translated/tech/20150803 Managing Linux Logs.md b/translated/tech/20150803 Managing Linux Logs.md new file mode 100644 index 0000000000..59b41aa831 --- /dev/null +++ b/translated/tech/20150803 Managing Linux Logs.md @@ -0,0 +1,418 @@ +Linux日志管理 +================================================================================ +管理日志的一个关键典型做法是集中或整合你的日志到一个地方,特别是如果你有许多服务器或多层级架构。我们将告诉你为什么这是一个好主意然后给出如何更容易的做这件事的一些小技巧。 + +### 集中管理日志的好处 ### + +如果你有很多服务器,查看单独的一个日志文件可能会很麻烦。现代的网站和服务经常包括许多服务器层级,分布式的负载均衡器,还有更多。这将花费很长时间去获取正确的日志,甚至花更长时间在登录服务器的相关问题上。没什么比发现你找的信息没有被捕获更沮丧的了,或者本能保留答案时正好在重启后丢失了日志文件。 + +集中你的日志使他们查找更快速,可以帮助你更快速的解决产品问题。你不用猜测那个服务器存在问题,因为所有的日志在同一个地方。此外,你可以使用更强大的工具去分析他们,包括日志管理解决方案。一些解决方案能[转换纯文本日志][1]为一些字段,更容易查找和分析。 + +集中你的日志也可以是他们更易于管理: + +- 他们更安全,当他们备份归档一个单独区域时意外或者有意的丢失。如果你的服务器宕机或者无响应,你可以使用集中的日志去调试问题。 +- 你不用担心ssh或者低效的grep命令需要更多的资源在陷入困境的系统。 +- 你不用担心磁盘占满,这个能让你的服务器死机。 +- 你能保持你的产品服务安全性,只是为了查看日志无需给你所有团队登录权限。给你的团队从中心区域访问日志权限更安全。 + +随着集中日志管理,你仍需处理由于网络联通性不好或者用尽大量网络带宽导致不能传输日志到中心区域的风险。在下面的章节我们将要讨论如何聪明的解决这些问题。 + +### 流行的日志归集工具 ### + +在Linux上最常见的日志归集是通过使用系统日志守护进程或者代理。系统日志守护进程支持本地日志的采集,然后通过系统日志协议传输日志到中心服务器。你可以使用很多流行的守护进程来归集你的日志文件: + +- [rsyslog][2]是一个轻量后台程序在大多数Linux分支上已经安装。 +- [syslog-ng][3]是第二流行的Linux系统日志后台程序。 +- [logstash][4]是一个重量级的代理,他可以做更多高级加工和分析。 +- [fluentd][5]是另一个有高级处理能力的代理。 + +Rsyslog是集中日志数据最流行的后台程序因为他在大多数Linux分支上是被默认安装的。你不用下载或安装它,并且它是轻量的,所以不需要占用你太多的系统资源。 + +如果你需要更多先进的过滤或者自定义分析功能,如果你不在乎额外的系统封装Logstash是下一个最流行的选择。 + +### 配置Rsyslog.conf ### + +既然rsyslog成为最广泛使用的系统日志程序,我们将展示如何配置它为日志中心。全局配置文件位于/etc/rsyslog.conf。它加载模块,设置全局指令,和包含应用特有文件位于目录/etc/rsyslog.d中。这些目录包含/etc/rsyslog.d/50-default.conf命令rsyslog写系统日志到文件。在[rsyslog文档][6]你可以阅读更多相关配置。 + +rsyslog配置语言是是[RainerScript][7]。你建立特定的日志输入就像输出他们到另一个目标。Rsyslog已经配置为系统日志输入的默认标准,所以你通常只需增加一个输出到你的日志服务器。这里有一个rsyslog输出到一个外部服务器的配置例子。在举例中,**BEBOP**是一个服务器的主机名,所以你应该替换为你的自己的服务器名。 + + action(type="omfwd" protocol="tcp" target="BEBOP" port="514") + +你可以发送你的日志到一个有丰富存储的日志服务器来存储,提供查询,备份和分析。如果你正存储日志在文件系统,然后你应该建立[日志转储][8]来防止你的磁盘报满。 + +作为一种选择,你可以发送这些日志到一个日志管理方案。如果你的解决方案是安装在本地你可以发送到您的本地系统文档中指定主机和端口。如果你使用基于云提供商,你将发送他们到你的提供商特定的主机名和端口。 + +### 日志目录 ### + +你可以归集一个目录或者匹配一个通配符模式的所有文件。nxlog和syslog-ng程序支持目录和通配符(*)。 + +rsyslog的通用形式不支持直接的监控目录。一种解决方案,你可以设置一个定时任务去监控这个目录的新文件,然后配置rsyslog来发送这些文件到目的地,比如你的日志管理系统。作为一个例子,日志管理提供商Loggly有一个开源版本的[目录监控脚本][9]。 + +### 哪个协议: UDP, TCP, or RELP? ### + +当你使用网络传输数据时,你可以选择三个主流的协议。UDP在你自己的局域网是最常用的,TCP是用在互联网。如果你不能失去日志,就要使用更高级的RELP协议。 + +[UDP][10]发送一个数据包,那只是一个简单的包信息。它是一个只外传的协议,所以他不发送给你回执(ACK)。它只尝试发送包。当网络拥堵时,UDP通常会巧妙的降级或者丢弃日志。它通常使用在类似局域网的可靠网络。 + +[TCP][11]通过多个包和返回确认发送流信息。TCP会多次尝试发送数据包,但是受限于[TCP缓存][12]大小。这是在互联网上发送送日志最常用的协议。 + +[RELP][13]是这三个协议中最可靠的,但是它是为rsyslog创建而且很少有行业应用。它在应用层接收数据然后再发出是否有错误。确认你的目标也支持这个协议。 + +### 用磁盘辅助队列可靠的传送 ### + +如果rsyslog在存储日志时遭遇错误,例如一个不可用网络连接,他能将日志排队直到连接还原。队列日志默认被存储在内存里。无论如何,内存是有限的并且如果问题仍然存在,日志会超出内存容量。 + +**警告:如果你只存储日志到内存,你可能会失去数据。** + +Rsyslog能在内存被占满时将日志队列放到磁盘。[磁盘辅助队列][14]使日志的传输更可靠。这里有一个例子如何配置rsyslog的磁盘辅助队列: + + $WorkDirectory /var/spool/rsyslog # where to place spool files + $ActionQueueFileName fwdRule1 # unique name prefix for spool files + $ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) + $ActionQueueSaveOnShutdown on # save messages to disk on shutdown + $ActionQueueType LinkedList # run asynchronously + $ActionResumeRetryCount -1 # infinite retries if host is down + +### 使用TLS加密日志 ### + +当你的安全隐私数据是一个关心的事,你应该考虑加密你的日志。如果你使用纯文本在互联网传输日志,嗅探器和中间人可以读到你的日志。如果日志包含私人信息、敏感的身份数据或者政府管制数据,你应该加密你的日志。rsyslog程序能使用TLS协议加密你的日志保证你的数据更安全。 + +建立TLS加密,你应该做如下任务: + +1. 生成一个[证书授权][15](CA)。在/contrib/gnutls有一些简单的证书,只是有助于测试,但是你需要创建自己的产品证书。如果你正在使用一个日志管理服务,它将有一个证书给你。 +1. 为你的服务器生成一个[数字证书][16]使它能SSL运算,或者使用你自己的日志管理服务提供商的一个数字证书。 +1. 配置你的rsyslog程序来发送TLS加密数据到你的日志管理系统。 + +这有一个rsyslog配置TLS加密的例子。替换CERT和DOMAIN_NAME为你自己的服务器配置。 + + $DefaultNetstreamDriverCAFile /etc/rsyslog.d/keys/ca.d/CERT.crt + $ActionSendStreamDriver gtls + $ActionSendStreamDriverMode 1 + $ActionSendStreamDriverAuthMode x509/name + $ActionSendStreamDriverPermittedPeer *.DOMAIN_NAME.com + +### 应用日志的最佳管理方法 ### + +除Linux默认创建的日志之外,归集重要的应用日志也是一个好主意。几乎所有基于Linux的服务器的应用把他们的状态信息写入到独立专门的日志文件。这包括数据库产品,像PostgreSQL或者MySQL,网站服务器像Nginx或者Apache,防火墙,打印和文件共享服务还有DNS服务等等。 + +管理员要做的第一件事是安装一个应用后配置它。Linux应用程序典型的有一个.conf文件在/etc目录里。它也可能在其他地方,但是那是大家找配置文件首先会看的地方。 + +根据应用程序有多复杂多庞大,可配置参数的数量可能会很少或者上百行。如前所述,大多数应用程序可能会在某种日志文件写他们的状态:配置文件是日志设置的地方定义了其他的东西。 + +如果你不确定它在哪,你可以使用locate命令去找到它: + + [root@localhost ~]# locate postgresql.conf + /usr/pgsql-9.4/share/postgresql.conf.sample + /var/lib/pgsql/9.4/data/postgresql.conf + +#### 设置一个日志文件的标准位置 #### + +Linux系统一般保存他们的日志文件在/var/log目录下。如果是,很好,如果不是,你也许想在/var/log下创建一个专用目录?为什么?因为其他程序也在/var/log下保存他们的日志文件,如果你的应用报错多于一个日志文件 - 也许每天一个或者每次重启一个 - 通过这么大的目录也许有点难于搜索找到你想要的文件。 + +如果你有多于一个的应用实例在你网络运行,这个方法依然便利。想想这样的情景,你也许有一打web服务器在你的网络运行。当排查任何一个盒子的问题,你将知道确切的位置。 + +#### 使用一个标准的文件名 #### + +给你的应用最新的日志使用一个标准的文件名。这使一些事变得容易,因为你可以监控和追踪一个单独的文件。很多应用程序在他们的日志上追加一种时间戳。他让rsyslog更难于找到最新的文件和设置文件监控。一个更好的方法是使用日志转储增加时间戳到老的日志文件。这样更易去归档和历史查询。 + +#### 追加日志文件 #### + +日志文件会在每个应用程序重启后被覆盖?如果这样,我们建议关掉它。每次重启app后应该去追加日志文件。这样,你就可以追溯重启前最后的日志。 + +#### 日志文件追加 vs. 转储 #### + +虽然应用程序每次重启后写一个新日志文件,如何保存当前日志?追加到一个单独文件,巨大的文件?Linux系统不是因频繁重启或者崩溃出名的:应用程序可以运行很长时间甚至不间歇,但是也会使日志文件非常大。如果你查询分析上周发生连接错误的原因,你可能无疑的要在成千上万行里搜索。 + +我们建议你配置应用每天半晚转储它的日志文件。 + +为什么?首先它将变得可管理。找一个有特定日期部分的文件名比遍历一个文件指定日期的条目更容易。文件也小的多:你不用考虑当你打开一个日志文件时vi僵住。第二,如果你正发送日志到另一个位置 - 也许每晚备份任务拷贝到归集日志服务器 - 这样不会消耗你的网络带宽。最后第三点,这样帮助你做日志保持。如果你想剔除旧的日志记录,这样删除超过指定日期的文件比一个应用解析一个大文件更容易。 + +#### 日志文件的保持 #### + +你保留你的日志文件多长时间?这绝对可以归结为业务需求。你可能被要求保持一个星期的日志信息,或者管理要求保持一年的数据。无论如何,日志需要在一个时刻或其他从服务器删除。 + +在我们看来,除非必要,只在线保持最近一个月的日志文件,加上拷贝他们到第二个地方如日志服务器。任何比这更旧的日志可以被转到一个单独的介质上。例如,如果你在AWS上,你的旧日志可以被拷贝到Glacier。 + +#### 给日志单独的磁盘分区 #### + +Linux最典型的方式通常建议挂载到/var目录到一个单独度的文件系统。这是因为这个目录的高I/Os。我们推荐挂在/var/log目录到一个单独的磁盘系统下。这样可以节省与主应用的数据I/O竞争。另外,如果一些日志文件变的太多,或者一个文件变的太大,不会占满整个磁盘。 + +#### 日志条目 #### + +每个日志条目什么信息应该被捕获? + +这依赖于你想用日志来做什么。你只想用它来排除故障,或者你想捕获所有发生的事?这是一个规则条件去捕获每个用户在运行什么或查看什么? + +如果你正用日志做错误排查的目的,只保存错误,报警或者致命信息。没有理由去捕获调试信息,例如,应用也许默认记录了调试信息或者另一个管理员也许为了故障排查使用打开了调试信息,但是你应该关闭它,因为它肯定会很快的填满空间。在最低限度上,捕获日期,时间,客户端应用名,原ip或者客户端主机名,执行动作和它自身信息。 + +#### 一个PostgreSQL的实例 #### + +作为一个例子,让我们看看vanilla(这是一个开源论坛)PostgreSQL 9.4安装主配置文件。它叫做postgresql.conf与其他Linux系统中的配置文件不同,他不保存在/etc目录下。在代码段下,我们可以在我们的Centos 7服务器的/var/lib/pgsql目录下看见: + + root@localhost ~]# vi /var/lib/pgsql/9.4/data/postgresql.conf + ... + #------------------------------------------------------------------------------ + # ERROR REPORTING AND LOGGING + #------------------------------------------------------------------------------ + # - Where to Log - + log_destination = 'stderr' + # Valid values are combinations of + # stderr, csvlog, syslog, and eventlog, + # depending on platform. csvlog + # requires logging_collector to be on. + # This is used when logging to stderr: + logging_collector = on + # Enable capturing of stderr and csvlog + # into log files. Required to be on for + # csvlogs. + # (change requires restart) + # These are only used if logging_collector is on: + log_directory = 'pg_log' + # directory where log files are written, + # can be absolute or relative to PGDATA + log_filename = 'postgresql-%a.log' # log file name pattern, + # can include strftime() escapes + # log_file_mode = 0600 . + # creation mode for log files, + # begin with 0 to use octal notation + log_truncate_on_rotation = on # If on, an existing log file with the + # same name as the new log file will be + # truncated rather than appended to. + # But such truncation only occurs on + # time-driven rotation, not on restarts + # or size-driven rotation. Default is + # off, meaning append to existing files + # in all cases. + log_rotation_age = 1d + # Automatic rotation of logfiles will happen after that time. 0 disables. + log_rotation_size = 0 # Automatic rotation of logfiles will happen after that much log output. 0 disables. + # These are relevant when logging to syslog: + #syslog_facility = 'LOCAL0' + #syslog_ident = 'postgres' + # This is only relevant when logging to eventlog (win32): + #event_source = 'PostgreSQL' + # - When to Log - + #client_min_messages = notice # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # log + # notice + # warning + # error + #log_min_messages = warning # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic + #log_min_error_statement = error # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic (effectively off) + #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements + # and their durations, > 0 logs only + # statements running at least this number + # of milliseconds + # - What to Log + #debug_print_parse = off + #debug_print_rewritten = off + #debug_print_plan = off + #debug_pretty_print = on + #log_checkpoints = off + #log_connections = off + #log_disconnections = off + #log_duration = off + #log_error_verbosity = default + # terse, default, or verbose messages + #log_hostname = off + log_line_prefix = '< %m >' # special values: + # %a = application name + # %u = user name + # %d = database name + # %r = remote host and port + # %h = remote host + # %p = process ID + # %t = timestamp without milliseconds + # %m = timestamp with milliseconds + # %i = command tag + # %e = SQL state + # %c = session ID + # %l = session line number + # %s = session start timestamp + # %v = virtual transaction ID + # %x = transaction ID (0 if none) + # %q = stop here in non-session + # processes + # %% = '%' + # e.g. '<%u%%%d> ' + #log_lock_waits = off # log lock waits >= deadlock_timeout + #log_statement = 'none' # none, ddl, mod, all + #log_temp_files = -1 # log temporary files equal or larger + # than the specified size in kilobytes;5# -1 disables, 0 logs all temp files5 + log_timezone = 'Australia/ACT' + +虽然大多数参数被加上了注释,他们呈现了默认数值。我们可以看见日志文件目录是pg_log(log_directory参数),文件名应该以postgresql开头(log_filename参数),文件每天转储一次(log_rotation_age参数)然后日志记录以时间戳开头(log_line_prefix参数)。特别说明有趣的是log_line_prefix参数:你可以包含很多整体丰富的信息在这。 + +看/var/lib/pgsql/9.4/data/pg_log目录下展现给我们这些文件: + + [root@localhost ~]# ls -l /var/lib/pgsql/9.4/data/pg_log + total 20 + -rw-------. 1 postgres postgres 1212 May 1 20:11 postgresql-Fri.log + -rw-------. 1 postgres postgres 243 Feb 9 21:49 postgresql-Mon.log + -rw-------. 1 postgres postgres 1138 Feb 7 11:08 postgresql-Sat.log + -rw-------. 1 postgres postgres 1203 Feb 26 21:32 postgresql-Thu.log + -rw-------. 1 postgres postgres 326 Feb 10 01:20 postgresql-Tue.log + +所以日志文件命只有工作日命名的标签。我们可以改变他。如何做?在postgresql.conf配置log_filename参数。 + +查看一个日志内容,它的条目仅以日期时间开头: + + [root@localhost ~]# cat /var/lib/pgsql/9.4/data/pg_log/postgresql-Fri.log + ... + < 2015-02-27 01:21:27.020 EST >LOG: received fast shutdown request + < 2015-02-27 01:21:27.025 EST >LOG: aborting any active transactions + < 2015-02-27 01:21:27.026 EST >LOG: autovacuum launcher shutting down + < 2015-02-27 01:21:27.036 EST >LOG: shutting down + < 2015-02-27 01:21:27.211 EST >LOG: database system is shut down + +### 集中应用日志 ### + +#### 使用Imfile监控日志 #### + +习惯上,应用通常记录他们数据在文件里。文件容易在一个机器上寻找但是多台服务器上就不是很恰当了。你可以设置日志文件监控然后当新的日志被添加到底部就发送事件到一个集中服务器。在/etc/rsyslog.d/里创建一个新的配置文件然后增加一个文件输入,像这样: + + $ModLoad imfile + $InputFilePollInterval 10 + $PrivDropToGroup adm + +---------- + + # Input for FILE1 + $InputFileName /FILE1 + $InputFileTag APPNAME1 + $InputFileStateFile stat-APPNAME1 #this must be unique for each file being polled + $InputFileSeverity info + $InputFilePersistStateInterval 20000 + $InputRunFileMonitor + +替换FILE1和APPNAME1位你自己的文件和应用名称。Rsyslog将发送它到你配置的输出中。 + +#### 本地套接字日志与Imuxsock #### + +套接字类似UNIX文件句柄,所不同的是套接字内容是由系统日志程序读取到内存中,然后发送到目的地。没有文件需要被写入。例如,logger命令发送他的日志到这个UNIX套接字。 + +如果你的服务器I/O有限或者你不需要本地文件日志,这个方法使系统资源有效利用。这个方法缺点是套接字有队列大小的限制。如果你的系统日志程序宕掉或者不能保持运行,然后你可能会丢失日志数据。 + +rsyslog程序将默认从/dev/log套接字中种读取,但是你要用[imuxsock输入模块][17]如下命令使它生效: + + $ModLoad imuxsock + +#### UDP日志与Imupd #### + +一些应用程序使用UDP格式输出日志数据,这是在网络上或者本地传输日志文件的标准系统日志协议。你的系统日志程序收集这些日志然后处理他们或者用不同的格式传输他们。交替地,你可以发送日志到你的日志服务器或者到一个日志管理方案中。 + +使用如下命令配置rsyslog来接收标准端口514的UDP系统日志数据: + + $ModLoad imudp + +---------- + + $UDPServerRun 514 + +### 用Logrotate管理日志 ### + +日志转储是当日志到达指定的时期时自动归档日志文件的方法。如果不介入,日志文件一直增长,会用尽磁盘空间。最后他们将破坏你的机器。 + +logrotate实例能随着日志的日期截取你的日志,腾出空间。你的新日志文件保持文件名。你的旧日志文件被重命名为后缀加上数字。每次logrotate实例运行,一个新文件被建立然后现存的文件被逐一重命名。你来决定何时旧文件被删除或归档的阈值。 + +当logrotate拷贝一个文件,新的文件已经有一个新的索引节点,这会妨碍rsyslog监控新文件。你可以通过增加copytruncate参数到你的logrotate定时任务来缓解这个问题。这个参数拷贝现有的日志文件内容到新文件然后从现有文件截短这些内容。这个索引节点从不改变,因为日志文件自己保持不变;它的内容是一个新文件。 + +logrotate实例使用的主配置文件是/etc/logrotate.conf,应用特有设置在/etc/logrotate.d/目录下。DigitalOcean有一个详细的[logrotate教程][18] + +### 管理很多服务器的配置 ### + +当你只有很少的服务器,你可以登陆上去手动配置。一旦你有几打或者更多服务器,你可以用高级工具使这变得更容易和更可扩展。基本上,所有的事情就是拷贝你的rsyslog配置到每个服务器,然后重启rsyslog使更改生效。 + +#### Pssh #### + +这个工具可以让你在很多服务器上并行的运行一个ssh命令。使用pssh部署只有一小部分的服务器。如果你其中一个服务器失败,然后你必须ssh到失败的服务器,然后手动部署。如果你有很多服务器失败,那么手动部署他们会话费很长时间。 + +#### Puppet/Chef #### + +Puppet和Chef是两个不同的工具,他们能在你的网络按你规定的标准自动的配置所有服务器。他们的报表工具使你知道关于错误然后定期重新同步。Puppet和Chef有一些狂热的支持者。如果你不确定那个更适合你的部署配置管理,你可以领会一下[InfoWorld上这两个工具的对比][19] + +一些厂商也提供一些配置rsyslog的模块或者方法。这有一个Loggly上Puppet模块的例子。它提供给rsyslog一个类,你可以添加一个标识令牌: + + node 'my_server_node.example.net' { + # Send syslog events to Loggly + class { 'loggly::rsyslog': + customer_token => 'de7b5ccd-04de-4dc4-fbc9-501393600000', + } + } + +#### Docker #### + +Docker使用容器去运行应用不依赖底层服务。所有东西都从内部的容器运行,你可以想象为一个单元功能。ZDNet有一个深入文章关于在你的数据中心[使用Docker][20]。 + +这有很多方式从Docker容器记录日志,包括链接到一个日志容器,记录到一个共享卷,或者直接在容器里添加一个系统日志代理。其中最流行的日志容器叫做[logspout][21]。 + +#### 供应商的脚本或代理 #### + +大多数日志管理方案提供一些脚本或者代理,从一个或更多服务器比较简单的发送数据。重量级代理会耗尽额外的系统资源。一些供应商像Loggly提供配置脚本,来使用现存的系统日志程序更轻松。这有一个Loggly上的例子[脚本][22],它能运行在任意数量的服务器上。 + +-------------------------------------------------------------------------------- + +via: http://www.loggly.com/ultimate-guide/logging/managing-linux-logs/ + +作者:[Jason Skowronski][a1] +作者:[Amy Echeverri][a2] +作者:[Sadequl Hussain][a3] +译者:[wyangsun](https://github.com/wyangsun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a1]:https://www.linkedin.com/in/jasonskowronski +[a2]:https://www.linkedin.com/in/amyecheverri +[a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 +[1]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.esrreycnpnbl +[2]:http://www.rsyslog.com/ +[3]:http://www.balabit.com/network-security/syslog-ng/opensource-logging-system +[4]:http://logstash.net/ +[5]:http://www.fluentd.org/ +[6]:http://www.rsyslog.com/doc/rsyslog_conf.html +[7]:http://www.rsyslog.com/doc/master/rainerscript/index.html +[8]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.eck7acdxin87 +[9]:https://www.loggly.com/docs/file-monitoring/ +[10]:http://www.networksorcery.com/enp/protocol/udp.htm +[11]:http://www.networksorcery.com/enp/protocol/tcp.htm +[12]:http://blog.gerhards.net/2008/04/on-unreliability-of-plain-tcp-syslog.html +[13]:http://www.rsyslog.com/doc/relp.html +[14]:http://www.rsyslog.com/doc/queues.html +[15]:http://www.rsyslog.com/doc/tls_cert_ca.html +[16]:http://www.rsyslog.com/doc/tls_cert_machine.html +[17]:http://www.rsyslog.com/doc/v8-stable/configuration/modules/imuxsock.html +[18]:https://www.digitalocean.com/community/tutorials/how-to-manage-log-files-with-logrotate-on-ubuntu-12-10 +[19]:http://www.infoworld.com/article/2614204/data-center/puppet-or-chef--the-configuration-management-dilemma.html +[20]:http://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-popular/ +[21]:https://github.com/progrium/logspout +[22]:https://www.loggly.com/docs/sending-logs-unixlinux-system-setup/ From 3ade8029a018fbac08e0f65bf37dfe8f5dbc6986 Mon Sep 17 00:00:00 2001 From: KS Date: Fri, 14 Aug 2015 22:54:54 +0800 Subject: [PATCH 1722/2517] Delete 20150803 Managing Linux Logs.md --- sources/tech/20150803 Managing Linux Logs.md | 419 ------------------- 1 file changed, 419 deletions(-) delete mode 100644 sources/tech/20150803 Managing Linux Logs.md diff --git a/sources/tech/20150803 Managing Linux Logs.md b/sources/tech/20150803 Managing Linux Logs.md deleted file mode 100644 index e317a63253..0000000000 --- a/sources/tech/20150803 Managing Linux Logs.md +++ /dev/null @@ -1,419 +0,0 @@ -wyangsun translating -Managing Linux Logs -================================================================================ -A key best practice for logging is to centralize or aggregate your logs in one place, especially if you have multiple servers or tiers in your architecture. We’ll tell you why this is a good idea and give tips on how to do it easily. - -### Benefits of Centralizing Logs ### - -It can be cumbersome to look at individual log files if you have many servers. Modern web sites and services often include multiple tiers of servers, distributed with load balancers, and more. It’d take a long time to hunt down the right file, and even longer to correlate problems across servers. There’s nothing more frustrating than finding the information you are looking for hasn’t been captured, or the log file that could have held the answer has just been lost after a restart. - -Centralizing your logs makes them faster to search, which can help you solve production issues faster. You don’t have to guess which server had the issue because all the logs are in one place. Additionally, you can use more powerful tools to analyze them, including log management solutions. These solutions can [transform plain text logs][1] into fields that can be easily searched and analyzed. - -Centralizing your logs also makes them easier to manage: - -- They are safer from accidental or intentional loss when they are backed up and archived in a separate location. If your servers go down or are unresponsive, you can use the centralized logs to debug the problem. -- You don’t have to worry about ssh or inefficient grep commands requiring more resources on troubled systems. -- You don’t have to worry about full disks, which can crash your servers. -- You can keep your production servers secure without giving your entire team access just to look at logs. It’s much safer to give your team access to logs from the central location. - -With centralized log management, you still must deal with the risk of being unable to transfer logs to the centralized location due to poor network connectivity or of using up a lot of network bandwidth. We’ll discuss how to intelligently address these issues in the sections below. - -### Popular Tools for Centralizing Logs ### - -The most common way of centralizing logs on Linux is by using syslog daemons or agents. The syslog daemon supports local log collection, then transports logs through the syslog protocol to a central server. There are several popular daemons that you can use to centralize your log files: - -- [rsyslog][2] is a light-weight daemon installed on most common Linux distributions. -- [syslog-ng][3] is the second most popular syslog daemon for Linux. -- [logstash][4] is a heavier-weight agent that can do more advanced processing and parsing. -- [fluentd][5] is another agent with advanced processing capabilities. - -Rsyslog is the most popular daemon for centralizing your log data because it’s installed by default in most common distributions of Linux. You don’t need to download it or install it, and it’s lightweight so it won’t take up much of your system resources. - -If you need more advanced filtering or custom parsing capabilities, Logstash is the next most popular choice if you don’t mind the extra system footprint. - -### Configure Rsyslog.conf ### - -Since rsyslog is the most widely used syslog daemon, we’ll show how to configure it to centralize logs. The global configuration file is located at /etc/rsyslog.conf. It loads modules, sets global directives, and has an include for application-specific files located in the directory /etc/rsyslog.d/. This directory contains /etc/rsyslog.d/50-default.conf which instructs rsyslog to write the system logs to file. You can read more about the configuration files in the [rsyslog documentation][6]. - -The configuration language for rsyslog is [RainerScript][7]. You set up specific inputs for logs as well as actions to output them to another destination. Rsyslog already configures standard defaults for syslog input, so you usually just need to add an output to your log server. Here is an example configuration for rsyslog to output logs to an external server. In this example, **BEBOP** is the hostname of the server, so you should replace it with your own server name. - - action(type="omfwd" protocol="tcp" target="BEBOP" port="514") - -You could send your logs to a log server with ample storage to keep a copy for search, backup, and analysis. If you’re storing logs in the file system, then you should set up [log rotation][8] to keep your disk from getting full. - -Alternatively, you can send these logs to a log management solution. If your solution is installed locally you can send it to your local host and port as specified in your system documentation. If you use a cloud-based provider, you will send them to the hostname and port specified by your provider. - -### Log Directories ### - -You can centralize all the files in a directory or matching a wildcard pattern. The nxlog and syslog-ng daemons support both directories and wildcards (*). - -Common versions of rsyslog can’t monitor directories directly. As a workaround, you can setup a cron job to monitor the directory for new files, then configure rsyslog to send those files to a destination, such as your log management system. As an example, the log management vendor Loggly has an open source version of a [script to monitor directories][9]. - -### Which Protocol: UDP, TCP, or RELP? ### - -There are three main protocols that you can choose from when you transmit data over the Internet. The most common is UDP for your local network and TCP for the Internet. If you cannot lose logs, then use the more advanced RELP protocol. - -[UDP][10] sends a datagram packet, which is a single packet of information. It’s an outbound-only protocol, so it doesn’t send you an acknowledgement of receipt (ACK). It makes only one attempt to send the packet. UDP can be used to smartly degrade or drop logs when the network gets congested. It’s most commonly used on reliable networks like localhost. - -[TCP][11] sends streaming information in multiple packets and returns an ACK. TCP makes multiple attempts to send the packet, but is limited by the size of the [TCP buffer][12]. This is the most common protocol for sending logs over the Internet. - -[RELP][13] is the most reliable of these three protocols but was created for rsyslog and has less industry adoption. It acknowledges receipt of data in the application layer and will resend if there is an error. Make sure your destination also supports this protocol. - -### Reliably Send with Disk Assisted Queues ### - -If rsyslog encounters a problem when storing logs, such as an unavailable network connection, it can queue the logs until the connection is restored. The queued logs are stored in memory by default. However, memory is limited and if the problem persists, the logs can exceed memory capacity. - -**Warning: You can lose data if you store logs only in memory.** - -Rsyslog can queue your logs to disk when memory is full. [Disk-assisted queues][14] make transport of logs more reliable. Here is an example of how to configure rsyslog with a disk-assisted queue: - - $WorkDirectory /var/spool/rsyslog # where to place spool files - $ActionQueueFileName fwdRule1 # unique name prefix for spool files - $ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) - $ActionQueueSaveOnShutdown on # save messages to disk on shutdown - $ActionQueueType LinkedList # run asynchronously - $ActionResumeRetryCount -1 # infinite retries if host is down - -### Encrypt Logs Using TLS ### - -When the security and privacy of your data is a concern, you should consider encrypting your logs. Sniffers and middlemen could read your log data if you transmit it over the Internet in clear text. You should encrypt your logs if they contain private information, sensitive identification data, or government-regulated data. The rsyslog daemon can encrypt your logs using the TLS protocol and keep your data safer. - -To set up TLS encryption, you need to do the following tasks: - -1. Generate a [certificate authority][15] (CA). There are sample certificates in /contrib/gnutls, which are good only for testing, but you need to create your own for production. If you’re using a log management service, it will have one ready for you. -1. Generate a [digital certificate][16] for your server to enable SSL operation, or use one from your log management service provider. -1. Configure your rsyslog daemon to send TLS-encrypted data to your log management system. - -Here’s an example rsyslog configuration with TLS encryption. Replace CERT and DOMAIN_NAME with your own server setting. - - $DefaultNetstreamDriverCAFile /etc/rsyslog.d/keys/ca.d/CERT.crt - $ActionSendStreamDriver gtls - $ActionSendStreamDriverMode 1 - $ActionSendStreamDriverAuthMode x509/name - $ActionSendStreamDriverPermittedPeer *.DOMAIN_NAME.com - -### Best Practices for Application Logging ### - -In addition to the logs that Linux creates by default, it’s also a good idea to centralize logs from important applications. Almost all Linux-based server class applications write their status information in separate, dedicated log files. This includes database products like PostgreSQL or MySQL, web servers like Nginx or Apache, firewalls, print and file sharing services, directory and DNS servers and so on. - -The first thing administrators do after installing an application is to configure it. Linux applications typically have a .conf file somewhere within the /etc directory. It can be somewhere else too, but that’s the first place where people look for configuration files. - -Depending on how complex or large the application is, the number of settable parameters can be few or in hundreds. As mentioned before, most applications would write their status in some sort of log file: configuration file is where log settings are defined among other things. - -If you’re not sure where it is, you can use the locate command to find it: - - [root@localhost ~]# locate postgresql.conf - /usr/pgsql-9.4/share/postgresql.conf.sample - /var/lib/pgsql/9.4/data/postgresql.conf - -#### Set a Standard Location for Log Files #### - -Linux systems typically save their log files under /var/log directory. This works fine, but check if the application saves under a specific directory under /var/log. If it does, great, if not, you may want to create a dedicated directory for the app under /var/log. Why? That’s because other applications save their log files under /var/log too and if your app saves more than one log file – perhaps once every day or after each service restart – it may be a bit difficult to trawl through a large directory to find the file you want. - -If you have the more than one instance of the application running in your network, this approach also comes handy. Think about a situation where you may have a dozen web servers running in your network. When troubleshooting any one of the boxes, you would know exactly where to go. - -#### Use A Standard Filename #### - -Use a standard filename for the latest logs from your application. This makes it easy because you can monitor and tail a single file. Many applications add some sort of date time stamp in them. This makes it much more difficult to find the latest file and to setup file monitoring by rsyslog. A better approach is to add timestamps to older log files using logrotate. This makes them easier to archive and search historically. - -#### Append the Log File #### - -Is the log file going to be overwritten after each application restart? If so, we recommend turning that off. After each restart the app should append to the log file. That way, you can always go back to the last log line before the restart. - -#### Appending vs. Rotation of Log File #### - -Even if the application writes a new log file after each restart, how is it saving in the current log? Is it appending to one single, massive file? Linux systems are not known for frequent reboots or crashes: applications can run for very long periods without even blinking, but that can also make the log file very large. If you are trying to analyze the root cause of a connection failure that happened last week, you could easily be searching through tens of thousands of lines. - -We recommend you configure the application to rotate its log file once every day, say at mid-night. - -Why? Well it becomes manageable for a starter. It’s much easier to find a file name with a specific date time pattern than to search through one file for that date’s entries. Files are also much smaller: you don’t think vi has frozen when you open a log file. Secondly, if you are sending the log file over the wire to a different location – perhaps a nightly backup job copying to a centralized log server – it doesn’t chew up your network’s bandwidth. Third and final, it helps with your log retention. If you want to cull old log entries, it’s easier to delete files older than a particular date than to have an application parsing one single large file. - -#### Retention of Log File #### - -How long do you keep a log file? That definitely comes down to business requirement. You could be asked to keep one week’s worth of logging information, or it may be a regulatory requirement to keep ten years’ worth of data. Whatever it is, logs need to go from the server at one time or other. - -In our opinion, unless otherwise required, keep at least a month’s worth of log files online, plus copy them to a secondary location like a logging server. Anything older than that can be offloaded to a separate media. For example, if you are on AWS, your older logs can be copied to Glacier. - -#### Separate Disk Location for Log Files #### - -Linux best practice usually suggests mounting the /var directory to a separate file system. This is because of the high number of I/Os associated with this directory. We would recommend mounting /var/log directory under a separate disk system. This can save I/O contention with the main application’s data. Also, if the number of log files becomes too large or the single log file becomes too big, it doesn’t fill up the entire disk. - -#### Log Entries #### - -What information should be captured in each log entry? - -That depends on what you want to use the log for. Do you want to use it only for troubleshooting purposes, or do you want to capture everything that’s happening? Is it a legal requirement to capture what each user is running or viewing? - -If you are using logs for troubleshooting purposes, save only errors, warnings or fatal messages. There’s no reason to capture debug messages, for example. The app may log debug messages by default or another administrator might have turned this on for another troubleshooting exercise, but you need to turn this off because it can definitely fill up the space quickly. At a minimum, capture the date, time, client application name, source IP or client host name, action performed and the message itself. - -#### A Practical Example for PostgreSQL #### - -As an example, let’s look at the main configuration file for a vanilla PostgreSQL 9.4 installation. It’s called postgresql.conf and contrary to other config files in Linux systems, it’s not saved under /etc directory. In the code snippet below, we can see it’s in /var/lib/pgsql directory of our CentOS 7 server: - - root@localhost ~]# vi /var/lib/pgsql/9.4/data/postgresql.conf - ... - #------------------------------------------------------------------------------ - # ERROR REPORTING AND LOGGING - #------------------------------------------------------------------------------ - # - Where to Log - - log_destination = 'stderr' - # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - # This is used when logging to stderr: - logging_collector = on - # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - # These are only used if logging_collector is on: - log_directory = 'pg_log' - # directory where log files are written, - # can be absolute or relative to PGDATA - log_filename = 'postgresql-%a.log' # log file name pattern, - # can include strftime() escapes - # log_file_mode = 0600 . - # creation mode for log files, - # begin with 0 to use octal notation - log_truncate_on_rotation = on # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. - log_rotation_age = 1d - # Automatic rotation of logfiles will happen after that time. 0 disables. - log_rotation_size = 0 # Automatic rotation of logfiles will happen after that much log output. 0 disables. - # These are relevant when logging to syslog: - #syslog_facility = 'LOCAL0' - #syslog_ident = 'postgres' - # This is only relevant when logging to eventlog (win32): - #event_source = 'PostgreSQL' - # - When to Log - - #client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - #log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - #log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - # - What to Log - #debug_print_parse = off - #debug_print_rewritten = off - #debug_print_plan = off - #debug_pretty_print = on - #log_checkpoints = off - #log_connections = off - #log_disconnections = off - #log_duration = off - #log_error_verbosity = default - # terse, default, or verbose messages - #log_hostname = off - log_line_prefix = '< %m >' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' - #log_lock_waits = off # log lock waits >= deadlock_timeout - #log_statement = 'none' # none, ddl, mod, all - #log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes;5# -1 disables, 0 logs all temp files5 - log_timezone = 'Australia/ACT' - -Although most parameters are commented out, they assume default values. We can see the log file directory is pg_log (log_directory parameter), the file names should start with postgresql (log_filename parameter), the files are rotated once every day (log_rotation_age parameter) and the log entries start with a timestamp (log_line_prefix parameter). Of particular interest is the log_line_prefix parameter: there is a whole gamut of information you can include there. - -Looking under /var/lib/pgsql/9.4/data/pg_log directory shows us these files: - - [root@localhost ~]# ls -l /var/lib/pgsql/9.4/data/pg_log - total 20 - -rw-------. 1 postgres postgres 1212 May 1 20:11 postgresql-Fri.log - -rw-------. 1 postgres postgres 243 Feb 9 21:49 postgresql-Mon.log - -rw-------. 1 postgres postgres 1138 Feb 7 11:08 postgresql-Sat.log - -rw-------. 1 postgres postgres 1203 Feb 26 21:32 postgresql-Thu.log - -rw-------. 1 postgres postgres 326 Feb 10 01:20 postgresql-Tue.log - -So the log files only have the name of the weekday stamped in the file name. We can change it. How? Configure the log_filename parameter in postgresql.conf. - -Looking inside one log file shows its entries start with date time only: - - [root@localhost ~]# cat /var/lib/pgsql/9.4/data/pg_log/postgresql-Fri.log - ... - < 2015-02-27 01:21:27.020 EST >LOG: received fast shutdown request - < 2015-02-27 01:21:27.025 EST >LOG: aborting any active transactions - < 2015-02-27 01:21:27.026 EST >LOG: autovacuum launcher shutting down - < 2015-02-27 01:21:27.036 EST >LOG: shutting down - < 2015-02-27 01:21:27.211 EST >LOG: database system is shut down - -### Centralizing Application Logs ### - -#### Log File Monitoring with Imfile #### - -Traditionally, the most common way for applications to log their data is with files. Files are easy to search on a single machine but don’t scale well with more servers. You can set up log file monitoring and send the events to a centralized server when new logs are appended to the bottom. Create a new configuration file in /etc/rsyslog.d/ then add a file input like this: - - $ModLoad imfile - $InputFilePollInterval 10 - $PrivDropToGroup adm - ----------- - - # Input for FILE1 - $InputFileName /FILE1 - $InputFileTag APPNAME1 - $InputFileStateFile stat-APPNAME1 #this must be unique for each file being polled - $InputFileSeverity info - $InputFilePersistStateInterval 20000 - $InputRunFileMonitor - -Replace FILE1 and APPNAME1 with your own file and application names. Rsyslog will send it to the outputs you have configured. - -#### Local Socket Logs with Imuxsock #### - -A socket is similar to a UNIX file handle except that the socket is read into memory by your syslog daemon and then sent to the destination. No file needs to be written. As an example, the logger command sends its logs to this UNIX socket. - -This approach makes efficient use of system resources if your server is constrained by disk I/O or you have no need for local file logs. The disadvantage of this approach is that the socket has a limited queue size. If your syslog daemon goes down or can’t keep up, then you could lose log data. - -The rsyslog daemon will read from the /dev/log socket by default, but you can specifically enable it with the [imuxsock input module][17] using the following command: - - $ModLoad imuxsock - -#### UDP Logs with Imupd #### - -Some applications output log data in UDP format, which is the standard syslog protocol when transferring log files over a network or your localhost. Your syslog daemon receives these logs and can process them or transmit them in a different format. Alternately, you can send the logs to your log server or to a log management solution. - -Use the following command to configure rsyslog to accept syslog data over UDP on the standard port 514: - - $ModLoad imudp - ----------- - - $UDPServerRun 514 - -### Manage Logs with Logrotate ### - -Log rotation is a process that archives log files automatically when they reach a specified age. Without intervention, log files keep growing, using up disk space. Eventually they will crash your machine. - -The logrotate utility can truncate your logs as they age, freeing up space. Your new log file retains the filename. Your old log file is renamed with a number appended to the end of it. Each time the logrotate utility runs, a new file is created and the existing file is renamed in sequence. You determine the threshold when old files are deleted or archived. - -When logrotate copies a file, the new file has a new inode, which can interfere with rsyslog’s ability to monitor the new file. You can alleviate this issue by adding the copytruncate parameter to your logrotate cron job. This parameter copies existing log file contents to a new file and truncates these contents from the existing file. The inode never changes because the log file itself remains the same; its contents are in a new file. - -The logrotate utility uses the main configuration file at /etc/logrotate.conf and application-specific settings in the directory /etc/logrotate.d/. DigitalOcean has a detailed [tutorial on logrotate][18]. - -### Manage Configuration on Many Servers ### - -When you have just a few servers, you can manually configure logging on them. Once you have a few dozen or more servers, you can take advantage of tools that make this easier and more scalable. At a basic level, all of these copy your rsyslog configuration to each server, and then restart rsyslog so the changes take effect. - -#### Pssh #### - -This tool lets you run an ssh command on several servers in parallel. Use a pssh deployment for only a small number of servers. If one of your servers fails, then you have to ssh into the failed server and do the deployment manually. If you have several failed servers, then the manual deployment on them can take a long time. - -#### Puppet/Chef #### - -Puppet and Chef are two different tools that can automatically configure all of the servers in your network to a specified standard. Their reporting tools let you know about failures and can resync periodically. Both Puppet and Chef have enthusiastic supporters. If you aren’t sure which one is more suitable for your deployment configuration management, you might appreciate [InfoWorld’s comparison of the two tools][19]. - -Some vendors also offer modules or recipes for configuring rsyslog. Here is an example from Loggly’s Puppet module. It offers a class for rsyslog to which you can add an identifying token: - - node 'my_server_node.example.net' { - # Send syslog events to Loggly - class { 'loggly::rsyslog': - customer_token => 'de7b5ccd-04de-4dc4-fbc9-501393600000', - } - } - -#### Docker #### - -Docker uses containers to run applications independent of the underlying server. Everything runs from inside a container, which you can think of as a unit of functionality. ZDNet has an in-depth article about [using Docker][20] in your data center. - -There are several ways to log from Docker containers including linking to a logging container, logging to a shared volume, or adding a syslog agent directly inside the container. One of the most popular logging containers is called [logspout][21]. - -#### Vendor Scripts or Agents #### - -Most log management solutions offer scripts or agents to make sending data from one or more servers relatively easy. Heavyweight agents can use up extra system resources. Some vendors like Loggly offer configuration scripts to make using existing syslog daemons easier. Here is an example [script][22] from Loggly which can run on any number of servers. - --------------------------------------------------------------------------------- - -via: http://www.loggly.com/ultimate-guide/logging/managing-linux-logs/ - -作者:[Jason Skowronski][a1] -作者:[Amy Echeverri][a2] -作者:[Sadequl Hussain][a3] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a1]:https://www.linkedin.com/in/jasonskowronski -[a2]:https://www.linkedin.com/in/amyecheverri -[a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 -[1]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.esrreycnpnbl -[2]:http://www.rsyslog.com/ -[3]:http://www.balabit.com/network-security/syslog-ng/opensource-logging-system -[4]:http://logstash.net/ -[5]:http://www.fluentd.org/ -[6]:http://www.rsyslog.com/doc/rsyslog_conf.html -[7]:http://www.rsyslog.com/doc/master/rainerscript/index.html -[8]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.eck7acdxin87 -[9]:https://www.loggly.com/docs/file-monitoring/ -[10]:http://www.networksorcery.com/enp/protocol/udp.htm -[11]:http://www.networksorcery.com/enp/protocol/tcp.htm -[12]:http://blog.gerhards.net/2008/04/on-unreliability-of-plain-tcp-syslog.html -[13]:http://www.rsyslog.com/doc/relp.html -[14]:http://www.rsyslog.com/doc/queues.html -[15]:http://www.rsyslog.com/doc/tls_cert_ca.html -[16]:http://www.rsyslog.com/doc/tls_cert_machine.html -[17]:http://www.rsyslog.com/doc/v8-stable/configuration/modules/imuxsock.html -[18]:https://www.digitalocean.com/community/tutorials/how-to-manage-log-files-with-logrotate-on-ubuntu-12-10 -[19]:http://www.infoworld.com/article/2614204/data-center/puppet-or-chef--the-configuration-management-dilemma.html -[20]:http://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-popular/ -[21]:https://github.com/progrium/logspout -[22]:https://www.loggly.com/docs/sending-logs-unixlinux-system-setup/ From a14dc152fd6de7cb5357d7a23eed25a89c147afe Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 15 Aug 2015 00:46:41 +0800 Subject: [PATCH 1723/2517] PUB:20150728 How to Update Linux Kernel for Improved System Performance @geekpi --- ... Kernel for Improved System Performance.md | 120 ++++++++++++++++ ... Kernel for Improved System Performance.md | 129 ------------------ 2 files changed, 120 insertions(+), 129 deletions(-) create mode 100644 published/20150728 How to Update Linux Kernel for Improved System Performance.md delete mode 100644 translated/tech/20150728 How to Update Linux Kernel for Improved System Performance.md diff --git a/published/20150728 How to Update Linux Kernel for Improved System Performance.md b/published/20150728 How to Update Linux Kernel for Improved System Performance.md new file mode 100644 index 0000000000..89823aaad7 --- /dev/null +++ b/published/20150728 How to Update Linux Kernel for Improved System Performance.md @@ -0,0 +1,120 @@ +如何更新 Linux 内核来提升系统性能 +================================================================================ +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/update-linux-kernel-644x373.jpg?2c3c1f) + +目前的 [Linux 内核][1]的开发速度是前所未有的,大概每2到3个月就会有一个主要的版本发布。每个发布都带来几个的新的功能和改进,可以让很多人的处理体验更快、更有效率、或者其它的方面更好。 + +问题是,你不能在这些内核发布的时候就用它们,你要等到你的发行版带来新内核的发布。我们先前讲到[定期更新内核的好处][2],所以你不必等到那时。让我们来告诉你该怎么做。 + +> 免责声明: 我们先前的一些文章已经提到过,升级内核有(很小)的风险可能会破坏你系统。如果发生这种情况,通常可以通过使用旧内核来使系统保持工作,但是有时还是不行。因此我们对系统的任何损坏都不负责,你得自己承担风险! + +### 预备工作 ### + +要更新你的内核,你首先要确定你使用的是32位还是64位的系统。打开终端并运行: + + uname -a + +检查一下输出的是 x86\_64 还是 i686。如果是 x86\_64,你就运行64位的版本,否则就运行32位的版本。千万记住这个,这很重要。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/linux_kernel_arch.jpg?2c3c1f) + +接下来,访问[官方的 Linux 内核网站][3],它会告诉你目前稳定内核的版本。愿意的话,你可以尝试下发布预选版(RC),但是这比稳定版少了很多测试。除非你确定想要需要发布预选版,否则就用稳定内核。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/kernel_latest_version.jpg?2c3c1f) + +### Ubuntu 指导 ### + +对 Ubuntu 及其衍生版的用户而言升级内核非常简单,这要感谢 Ubuntu 主线内核 PPA。虽然,官方把它叫做 PPA,但是你不能像其他 PPA 一样将它添加到你软件源列表中,并指望它自动升级你的内核。实际上,它只是一个简单的网页,你应该浏览并下载到你想要的内核。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/ubuntu_new_kernels.jpg?2c3c1f) + +现在,访问这个[内核 PPA 网页][4],并滚到底部。列表的最下面会含有最新发布的预选版本(你可以在名字中看到“rc”字样),但是这上面就可以看到最新的稳定版(说的更清楚些,本文写作时最新的稳定版是4.1.2。LCTT 译注:这里虽然 4.1.2 是当时的稳定版,但是由于尚未进入 Ubuntu 发行版中,所以文件夹名称为“-unstable”)。点击文件夹名称,你会看到几个选择。你需要下载 3 个文件并保存到它们自己的文件夹中(如果你喜欢的话可以放在下载文件夹中),以便它们与其它文件相隔离: + +1. 针对架构的含“generic”(通用)的头文件(我这里是64位,即“amd64”) +2. 放在列表中间,在文件名末尾有“all”的头文件 +3. 针对架构的含“generic”内核文件(再说一次,我会用“amd64”,但是你如果用32位的,你需要使用“i686”) + +你还可以在下面看到含有“lowlatency”(低延时)的文件。但最好忽略它们。这些文件相对不稳定,并且只为那些通用文件不能满足像音频录制这类任务想要低延迟的人准备的。再说一次,首选通用版,除非你有特定的任务需求不能很好地满足。一般的游戏和网络浏览不是使用低延时版的借口。 + +你把它们放在各自的文件夹下,对么?现在打开终端,使用`cd`命令切换到新创建的文件夹下,如 + + cd /home/user/Downloads/Kernel + +接着运行: + + sudo dpkg -i *.deb + +这个命令会标记文件夹中所有的“.deb”文件为“待安装”,接着执行安装。这是推荐的安装方法,因为不可以很简单地选择一个文件安装,它总会报出依赖问题。这这样一起安装就可以避免这个问题。如果你不清楚`cd`和`sudo`是什么。快速地看一下 [Linux 基本命令][5]这篇文章。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/ubuntu_install_kernel.jpg?2c3c1f) + +安装完成后,**重启**你的系统,这时应该就会运行刚安装的内核了!你可以在命令行中使用`uname -a`来检查输出。 + +### Fedora 指导 ### + +如果你使用的是 Fedora 或者它的衍生版,过程跟 Ubuntu 很类似。不同的是文件获取的位置不同,安装的命令也不同。 + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/fedora_new_kernels.jpg?2c3c1f) + +查看 [最新 Fedora 内核构建][6]列表。选取列表中最新的稳定版并翻页到下面选择 i686 或者 x86_64 版。这取决于你的系统架构。这时你需要下载下面这些文件并保存到它们对应的目录下(比如“Kernel”到下载目录下): + +- kernel +- kernel-core +- kernel-headers +- kernel-modules +- kernel-modules-extra +- kernel-tools +- perf 和 python-perf (可选) + +如果你的系统是 i686(32位)同时你有 4GB 或者更大的内存,你需要下载所有这些文件的 PAE 版本。PAE 是用于32位系统上的地址扩展技术,它允许你使用超过 3GB 的内存。 + +现在使用`cd`命令进入文件夹,像这样 + + cd /home/user/Downloads/Kernel + +接着运行下面的命令来安装所有的文件 + + yum --nogpgcheck localinstall *.rpm + +最后**重启**你的系统,这样你就可以运行新的内核了! + +#### 使用 Rawhide #### + +另外一个方案是,Fedora 用户也可以[切换到 Rawhide][7],它会自动更新所有的包到最新版本,包括内核。然而,Rawhide 经常会破坏系统(尤其是在早期的开发阶段中),它**不应该**在你日常使用的系统中用。 + +### Arch 指导 ### + +[Arch 用户][8]应该总是使用的是最新和最棒的稳定版(或者相当接近的版本)。如果你想要更接近最新发布的稳定版,你可以启用测试库提前2到3周获取到主要的更新。 + +要这么做,用[你喜欢的编辑器][9]以`sudo`权限打开下面的文件 + + /etc/pacman.conf + +接着取消注释带有 testing 的三行(删除行前面的#号)。如果你启用了 multilib 仓库,就把 multilib-testing 也做相同的事情。如果想要了解更多参考[这个 Arch 的 wiki 界面][10]。 + +升级内核并不简单(有意这么做的),但是这会给你带来很多好处。只要你的新内核不会破坏任何东西,你可以享受它带来的性能提升,更好的效率,更多的硬件支持和潜在的新特性。尤其是你正在使用相对较新的硬件时,升级内核可以帮助到你。 + + +**怎么升级内核这篇文章帮助到你了么?你认为你所喜欢的发行版对内核的发布策略应该是怎样的?**。在评论栏让我们知道! + +-------------------------------------------------------------------------------- + +via: http://www.makeuseof.com/tag/update-linux-kernel-improved-system-performance/ + +作者:[Danny Stieben][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.makeuseof.com/tag/author/danny/ +[1]:http://www.makeuseof.com/tag/linux-kernel-explanation-laymans-terms/ +[2]:http://www.makeuseof.com/tag/5-reasons-update-kernel-linux/ +[3]:http://www.kernel.org/ +[4]:http://kernel.ubuntu.com/~kernel-ppa/mainline/ +[5]:http://www.makeuseof.com/tag/an-a-z-of-linux-40-essential-commands-you-should-know/ +[6]:http://koji.fedoraproject.org/koji/packageinfo?packageID=8 +[7]:http://www.makeuseof.com/tag/bleeding-edge-linux-fedora-rawhide/ +[8]:http://www.makeuseof.com/tag/arch-linux-letting-you-build-your-linux-system-from-scratch/ +[9]:http://www.makeuseof.com/tag/nano-vs-vim-terminal-text-editors-compared/ +[10]:https://wiki.archlinux.org/index.php/Pacman#Repositories diff --git a/translated/tech/20150728 How to Update Linux Kernel for Improved System Performance.md b/translated/tech/20150728 How to Update Linux Kernel for Improved System Performance.md deleted file mode 100644 index 2114549452..0000000000 --- a/translated/tech/20150728 How to Update Linux Kernel for Improved System Performance.md +++ /dev/null @@ -1,129 +0,0 @@ -如何更新Linux内核提升系统性能 -================================================================================ -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/update-linux-kernel-644x373.jpg?2c3c1f) - -[Linux内核][1]内核的开发速度目前是空前,大概每2到3个月就会有一个主要的版本发布。每个发布都带来让很多人的计算更加快、更加有效率、或者更好的功能和提升。 - -问题是你不能在这些内核发布的时候就用它们-你要等到你的发行版带来新内核的发布。我们先前发布了[定期更新内核的好处][2],你不必等到那时。我们会向你展示该怎么做。 - -> 免责声明: 我们先前的一些文章已经提到过,升级内核会带来(很小的)破坏你系统的风险。在这种情况下,通常可以通过旧内核来使系统工作,但是有时还是不行。因此我们对系统的任何损坏都不负责-你自己承担风险! - -### 预备工作 ### - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/linux_kernel_arch.jpg?2c3c1f) - -要更新你的内核,你首先要确定你使用的是32位还是64位的系统。打开终端并运行: - - uname -a - -检查一下输出的是x86_64还是i686。如果是x86_64,你就运行64位的版本,否则就运行32位的版本。记住这个因为这个很重要。 - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/kernel_latest_version.jpg?2c3c1f) - -接下来,访问[官方Linux内核网站][3],它会告诉你目前稳定内核的版本。如果你喜欢你可以尝试发布预选版,但是这比稳定版少了很多测试。除非你确定想要用发布预选版否则就用稳定内核。 - -### Ubuntu指导 ### - -对Ubuntu及其衍生版的用户而言升级内核非常简单,这要感谢Ubuntu主线内核PPA。虽然,官方称为一个PPA。但是你不能像其他PPA一样用来添加它到你软件源列表中,并指望它自动升级你的内核。而它只是一个简单的网页,你可以下载到你想要的内核。 - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/ubuntu_new_kernels.jpg?2c3c1f) - -现在,访问[内核PPA网页][4],并滚到底部。列表的最下面会含有最新发布的预选版本(你可以在名字中看到“rc”字样),但是这上面就可以看到最新的稳定版(为了更容易地解释这个,这时最新的稳定版是4.1.2)。点击它,你会看到几个选项。你需要下载3个文件并保存到各自的文件夹中(如果你喜欢的话可以在下载文件夹中),这样就可以将它们相互隔离了: - -- 针对架构的含“generic”的头文件(我这里是64位或者“amd64”) -- 中间的头文件在文件名末尾有“all” -- 针对架构的含“generic”内核文件(再说一次,我会用“amd64”,但是你如果用32位的,你需要使用“i686”) - -你会看到还有含有“lowlatency”的文件可以下面。但最好忽略它们。这些文件相对不稳定,并且只为那些通用文件不能满足像录音这类任务想要低延迟的人准备的。再说一次,首选通用版除非你特定的任务需求不能很好地满足。一般的游戏和网络浏览不是使用低延时版的借口。 - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/ubuntu_install_kernel.jpg?2c3c1f) - -你把它们放在各自的文件夹下,对么?现在打开终端,使用 - - cd - -命令到新创建的文件夹下,像 - - cd /home/user/Downloads/Kernel - -接着运行: - - sudo dpkg -i *.deb - -这个命令会标记所有文件夹的“.deb”文件为“待安装”,接着执行安装。这是推荐的安装放大,因为除非可以很简单地选择一个文件安装,它总会报出依赖问题。这个方法可以避免这个问题。如果你不清楚cd和sudo是什么。快速地看一下[Linux基本命令][5]这篇文章。 - -安装完成后,**重启**你的系统,这时应该就会运行刚安装的内核了!你可以在命令行中使用uname -a来检查输出。 - -### Fedora指导 ### - -如果你使用的是Fedora或者它的衍生版,过程跟Ubuntu很类似。不同的是文件获取的位置不同,安装的命令也不同。 - -![](http://cdn.makeuseof.com/wp-content/uploads/2015/07/fedora_new_kernels.jpg?2c3c1f) - -查看[Fedora最新内核编译][6]列表。选取列表中最新的稳定版并滚到下面选择i686或者x86_64版。这依赖于你的系统架构。这时你需要下载下面这些文件并保存到它们对应的目录下(比如“Kernel”到下载目录下): - -- kernel -- kernel-core -- kernel-headers -- kernel-modules -- kernel-modules-extra -- kernel-tools -- perf and python-perf (optional) - -如果你的系统是i686(32位)同时你有4GB或者更大的内存,你需要下载所有这些文件的PAE版本。PAE是用于32位的地址扩展技术上,它允许你使用3GB的内存。 - -现在使用 - - cd - -命令进入文件夹,像这样 - - cd /home/user/Downloads/Kernel - -and then run the following command to install all the files: -接着运行下面的命令来安装所有的文件 - - yum --nogpgcheck localinstall *.rpm - -最后**重启**你的系统,这样你就可以运行新的内核了! - -### 使用 Rawhide ### - -另外一个方案是,Fedora用户也可以[切换到Rawhide][7],它会自动更新所有的包到最新版本,包括内核。然而,Rawhide经常会破坏系统(尤其是在早期的开发版中),它**不应该**在你日常使用的系统中用。 - -### Arch指导 ### - -[Arch][8]应该总是使用的是最新和最棒的稳定版(或者相当接近的版本)。如果你想要更接近最新发布的稳定版,你可以启用测试库提前2到3周获取到主要的更新。 - -要这么做,用[你喜欢的编辑器][9]以sudo权限打开下面的文件 - - /etc/pacman.conf - -接着取消注释带有testing的三行(删除行前面的井号)。如果你想要启用multilib仓库,就把multilib-testing也做相同的事情。如果想要了解更多参考[这个Arch的wiki界面][10]。 - -升级内核并不简单(有意这么做),但是这会给你带来很多好处。只要你的新内核不会破坏任何东西,你可以享受它带来的性能提升,更好的效率,支持更多的硬件和潜在的新特性。尤其是你正在使用相对更新的硬件,升级内核可以帮助到它。 - - -**怎么升级内核这篇文章帮助到你了么?你认为你所喜欢的发行版对内核的发布策略应该是怎样的?**。在评论栏让我们知道! - --------------------------------------------------------------------------------- - -via: http://www.makeuseof.com/tag/update-linux-kernel-improved-system-performance/ - -作者:[Danny Stieben][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.makeuseof.com/tag/author/danny/ -[1]:http://www.makeuseof.com/tag/linux-kernel-explanation-laymans-terms/ -[2]:http://www.makeuseof.com/tag/5-reasons-update-kernel-linux/ -[3]:http://www.kernel.org/ -[4]:http://kernel.ubuntu.com/~kernel-ppa/mainline/ -[5]:http://www.makeuseof.com/tag/an-a-z-of-linux-40-essential-commands-you-should-know/ -[6]:http://koji.fedoraproject.org/koji/packageinfo?packageID=8 -[7]:http://www.makeuseof.com/tag/bleeding-edge-linux-fedora-rawhide/ -[8]:http://www.makeuseof.com/tag/arch-linux-letting-you-build-your-linux-system-from-scratch/ -[9]:http://www.makeuseof.com/tag/nano-vs-vim-terminal-text-editors-compared/ -[10]:https://wiki.archlinux.org/index.php/Pacman#Repositories From 29c2cfb01350f3960ca314df890fc8a3308f8e30 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 15 Aug 2015 01:24:33 +0800 Subject: [PATCH 1724/2517] PUB:20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver @GOLinux --- ... Install The Latest Nvidia Linux Driver.md | 63 +++++++++++++++++++ ... Install The Latest Nvidia Linux Driver.md | 63 ------------------- 2 files changed, 63 insertions(+), 63 deletions(-) create mode 100644 published/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md delete mode 100644 translated/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md diff --git a/published/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md b/published/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md new file mode 100644 index 0000000000..37d106b69f --- /dev/null +++ b/published/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md @@ -0,0 +1,63 @@ +Ubuntu 有望让你安装最新 Nvidia Linux 驱动更简单 +================================================================================ +![Ubuntu Gamers are on the rise -and so is demand for the latest drivers](http://www.omgubuntu.co.uk/wp-content/uploads/2014/03/ubuntugamer_logo_dark-500x250.jpg) + +*Ubuntu 上的游戏玩家在增长——因而需要最新版驱动* + +**在 Ubuntu 上安装上游的 NVIDIA 图形驱动即将变得更加容易。** + +Ubuntu 开发者正在考虑构建一个全新的'官方' PPA,以便为桌面用户分发最新的闭源 NVIDIA 二进制驱动。 + +该项改变会让 Ubuntu 游戏玩家收益,并且*不会*给其它人造成 OS 稳定性方面的风险。 + +**仅**当用户明确选择它时,新的上游驱动将通过这个新 PPA 安装并更新。其他人将继续得到并使用更近的包含在 Ubuntu 归档中的稳定版 NVIDIA Linux 驱动快照。 + +### 为什么需要该项目? ### + +![Ubuntu provides drivers – but they’re not the latest](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/drivers.jpg) + +*Ubuntu 提供了驱动——但是它们不是最新的* + +可以从归档中(使用命令行、synaptic,或者通过额外驱动工具)安装到 Ubuntu 上的闭源 NVIDIA 图形驱动在大多数情况下都能工作得很好,并且可以轻松地处理 Unity 桌面外壳的混染。 + +但对于游戏需求而言,那完全是另外一码事儿。 + +如果你想要将最高帧率和 HD 纹理从最新流行的 Steam 游戏中压榨出来,你需要最新的二进制驱动文件。 + +驱动越新,越可能支持最新的特性和技术,或者带有预先打包的游戏专门的优化和漏洞修复。 + +问题在于,在 Ubuntu 上安装最新 Nvidia Linux 驱动不是件容易的事儿,而且也不具安全保证。 + +要填补这个空白,许多由热心人维护的第三方 PPA 就出现了。由于许多这些 PPA 也发布了其它实验性的或者前沿软件,它们的使用**并不是毫无风险的**。添加一个前沿的 PPA 通常是搞崩整个系统的最快的方式! + +一个解决方法是,让 Ubuntu 用户安装最新的专有图形驱动以满足对第三方 PPA 的需要,**但是**提供一个安全机制,如果有需要,你可以回滚到稳定版本。 + +### ‘对全新驱动的需求难以忽视’ ### + +> '一个让Ubuntu用户安全地获得最新硬件驱动的解决方案出现了。' + +‘在快速发展的市场中,对全新驱动的需求正变得难以忽视,用户将想要最新的上游软件,’卡斯特罗在一封给 Ubuntu 桌面邮件列表的电子邮件中解释道。 + +‘[NVIDIA] 可以毫不费力为 [Windows 10] 用户带来了不起的体验。直到我们可以说服 NVIDIA 在 Ubuntu 中做了同样的工作,这样我们就可以搞定这一切了。’ + +卡斯特罗的“官方的” NVIDIA PPA 方案就是最实现这一目的的最容易的方式。 + +游戏玩家将可以在 Ubuntu 的默认专有软件驱动工具中选择接收来自该 PPA 的新驱动,再也不需要它们从网站或维基页面拷贝并粘贴终端命令了。 + +该 PPA 内的驱动将由一个选定的社区成员组成的团队打包并维护,并受惠于一个名为**自动化测试**的半官方方式。 + +就像卡斯特罗自己说的那样:'人们想要最新的闪光的东西,而不管他们想要做什么。我们也许也要在其周围放置一个框架,因此人们可以获得他们所想要的,而不必破坏他们的计算机。' + +**你想要使用这个 PPA 吗?你怎样来评估 Ubuntu 上默认 Nvidia 驱动的性能呢?在评论中分享你的想法吧,伙计们!** + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux-drivers + +作者:[Joey-Elijah Sneddon][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author diff --git a/translated/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md b/translated/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md deleted file mode 100644 index bf24d3e5c2..0000000000 --- a/translated/tech/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md +++ /dev/null @@ -1,63 +0,0 @@ -Ubuntu想要让你安装最新版Nvidia Linux驱动更简单 -================================================================================ -![Ubuntu Gamers are on the rise -and so is demand for the latest drivers](http://www.omgubuntu.co.uk/wp-content/uploads/2014/03/ubuntugamer_logo_dark-500x250.jpg) -Ubuntu游戏在增长——因而需要最新版驱动 - -**Ubuntu上安装上游NVIDIA图形驱动即将变得更加容易。** - -Ubuntu开发者正在考虑构建一个全新的'官方'PPA,以便为桌面用户分发最新的闭源NVIDIA二进制驱动。 - -该项运动将使得Ubuntu游戏玩家收益,并且**不会**给其它人造成OS稳定性方面的风险。 - -新的上游驱动将通过该新PPA安装并更新,**只有**在用户明确选择它。其他人将继续接收并使用更近的包含在Ubuntu归档中的稳定版NVIDIA Linux驱动快照。 - -### 为什么需要该项目? ### - -![Ubuntu provides drivers – but they’re not the latest](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/drivers.jpg) -Ubuntu提供了驱动——但是它们不是最新的 - -可以从归档中(使用命令行、synaptic,或者通过额外驱动工具)安装到Ubuntu上的闭源NVIDIA图形驱动在大多数情况下都能工作得很好,并且可以轻松地处理混合Unity桌面shell。 - -对于游戏需求而言,那完全是另外一码事儿。 - -如果你想要将所有最后帧和HD纹理从最新的大游戏Steam游戏中挤压出来,你需要最新的二进制驱动对象。 - -> '安装最新Nvidia Linux驱动到Ubuntu不是件容易的事儿,而且也不具安全保证。' - -驱动越新,越可能支持最新的特性和技术,或者预先打包好了游戏专门优化和漏洞修复。 - -问题在于安装最新的Nvidia Linux驱动到Ubuntu上不是件容易的事儿,也没有安全保证。 - -要填补空白,许多由热心人维护的第三方PPA就出现了。由于许多这些PPA也发布了其它实验性的或者前沿软件,它们的使用**没有风险**。添加一个前沿的PPA通常是最快的方式,以完全满足系统需要! - -一个让Ubuntu用户安装作为第三方PPA提供最新专有图形驱动解决方案就十分需要了,**但是**提供了一个安全机制,如果有需要,你可以回滚到稳定版本。 - -### ‘对全新驱动的需求难以忽视’ ### - -> '一个让Ubuntu用户安全地获得最新硬件驱动的解决方案出现了。' - -'在快速开发市场中,对全新驱动的需求正变得难以忽视,用户将想要最新的上游软件,'卡斯特罗在一封给Ubuntu桌面邮件列表的电子邮件中解释道。 - -'[NVIDIA]可以分发一个了不起的体验,几乎像[Windows 10]用户那样毫不费力。直到我们可以证实NVIDIA在Ubuntu中做了同样的工作,我们就可以收拾残局了。' - -卡斯特罗关于一个“神圣的”NVIDIA PPA命题就是最实现这一目的的最容易的方式。 - -游戏玩家将可以在Ubuntu的默认专有软件驱动工具中选择接收来自该PPA的新驱动——不需要它们从网站或维基页面拷贝并粘贴终端命令了。 - -该PPA内的驱动将由一个选定的社区成员组成的团队打包并维护,并从一个名为**自动化测试**的半官方选项受惠。 - -就像卡斯特罗自己说的那样:'人们想要最新的闪光的东西,不管他们想要做什么。我们也许也要在其周围放置一个框架,因此人们可以获得他们所想要的,而不必破坏他们的计算机。' - -**你想要使用这个PPA吗?你怎样来评估Ubuntu上默认Nvidia驱动的性能呢?在评论中分享你的想法吧,伙计们!** - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux-drivers - -作者:[Joey-Elijah Sneddon][a] -译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author From aa0754b2b1578f65ba69065fb6b3b2ffb3db9a51 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 15 Aug 2015 01:40:34 +0800 Subject: [PATCH 1725/2517] PUB:20150811 How to download apk files from Google Play Store on Linux @FSSlc --- ...k files from Google Play Store on Linux.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) rename {translated/tech => published}/20150811 How to download apk files from Google Play Store on Linux.md (67%) diff --git a/translated/tech/20150811 How to download apk files from Google Play Store on Linux.md b/published/20150811 How to download apk files from Google Play Store on Linux.md similarity index 67% rename from translated/tech/20150811 How to download apk files from Google Play Store on Linux.md rename to published/20150811 How to download apk files from Google Play Store on Linux.md index 670c0f331b..615dcca7c2 100644 --- a/translated/tech/20150811 How to download apk files from Google Play Store on Linux.md +++ b/published/20150811 How to download apk files from Google Play Store on Linux.md @@ -1,14 +1,15 @@ -如何在 Linux 中从 Google Play 商店里下载 apk 文件 +如何在 Linux 上从 Google Play 商店里下载 apk 文件 ================================================================================ -假设你想在你的 Android 设备中安装一个 Android 应用,然而由于某些原因,你不能在 Andor 设备上访问 Google Play 商店。接着你该怎么做呢?在不访问 Google Play 商店的前提下安装应用的一种可能的方法是使用其他的手段下载该应用的 APK 文件,然后手动地在 Android 设备上 [安装 APK 文件][1]。 -在非 Android 设备如常规的电脑和笔记本电脑上,有着几种方式来从 Google Play 商店下载到官方的 APK 文件。例如,使用浏览器插件(例如, 针对 [Chrome][2] 或针对 [Firefox][3] 的插件) 或利用允许你使用浏览器下载 APK 文件的在线的 APK 存档等。假如你不信任这些闭源的插件或第三方的 APK 仓库,这里有另一种手动下载官方 APK 文件的方法,它使用一个名为 [GooglePlayDownloader][4] 的开源 Linux 应用。 +假设你想在你的 Android 设备中安装一个 Android 应用,然而由于某些原因,你不能在 Andord 设备上访问 Google Play 商店(LCTT 译注:显然这对于我们来说是常态)。接着你该怎么做呢?在不访问 Google Play 商店的前提下安装应用的一种可能的方法是,使用其他的手段下载该应用的 APK 文件,然后手动地在 Android 设备上 [安装 APK 文件][1]。 -GooglePlayDownloader 是一个基于 Python 的 GUI 应用,使得你可以从 Google Play 商店上搜索和下载 APK 文件。由于它是完全开源的,你可以放心地使用它。在本篇教程中,我将展示如何在 Linux 环境下,使用 GooglePlayDownloader 来从 Google Play 商店下载 APK 文件。 +在非 Android 设备如常规的电脑和笔记本电脑上,有着几种方式来从 Google Play 商店下载到官方的 APK 文件。例如,使用浏览器插件(例如,针对 [Chrome][2] 或针对 [Firefox][3] 的插件) 或利用允许你使用浏览器下载 APK 文件的在线的 APK 存档等。假如你不信任这些闭源的插件或第三方的 APK 仓库,这里有另一种手动下载官方 APK 文件的方法,它使用一个名为 [GooglePlayDownloader][4] 的开源 Linux 应用。 + +GooglePlayDownloader 是一个基于 Python 的 GUI 应用,它可以让你从 Google Play 商店上搜索和下载 APK 文件。由于它是完全开源的,你可以放心地使用它。在本篇教程中,我将展示如何在 Linux 环境下,使用 GooglePlayDownloader 来从 Google Play 商店下载 APK 文件。 ### Python 需求 ### -GooglePlayDownloader 需要使用 Python 中 SSL 模块的扩展 SNI(服务器名称指示) 来支持 SSL/TLS 通信,该功能由 Python 2.7.9 或更高版本带来。这使得一些旧的发行版本如 Debian 7 Wheezy 及早期版本,Ubuntu 14.04 及早期版本或 CentOS/RHEL 7 及早期版本均不能满足该要求。假设你已经有了一个带有 Python 2.7.9 或更高版本的发行版本,可以像下面这样接着安装 GooglePlayDownloader。 +GooglePlayDownloader 需要使用带有 SNI(Server Name Indication 服务器名称指示)的 Python 来支持 SSL/TLS 通信,该功能由 Python 2.7.9 或更高版本引入。这使得一些旧的发行版本如 Debian 7 Wheezy 及早期版本,Ubuntu 14.04 及早期版本或 CentOS/RHEL 7 及早期版本均不能满足该要求。这里假设你已经有了一个带有 Python 2.7.9 或更高版本的发行版本,可以像下面这样接着安装 GooglePlayDownloader。 ### 在 Ubuntu 上安装 GooglePlayDownloader ### @@ -16,7 +17,7 @@ GooglePlayDownloader 需要使用 Python 中 SSL 模块的扩展 SNI(服务器 #### 在 Ubuntu 14.10 上 #### -下载 [python-ndg-httpsclient][5] deb 软件包,这在旧一点的 Ubuntu 发行版本中是一个缺失的依赖。同时还要下载 GooglePlayDownloader 的官方 deb 软件包。 +下载 [python-ndg-httpsclient][5] deb 软件包,这是一个较旧的 Ubuntu 发行版本中缺失的依赖。同时还要下载 GooglePlayDownloader 的官方 deb 软件包。 $ wget http://mirrors.kernel.org/ubuntu/pool/main/n/ndg-httpsclient/python-ndg-httpsclient_0.3.2-1ubuntu4_all.deb $ wget http://codingteam.net/project/googleplaydownloader/download/file/googleplaydownloader_1.7-1_all.deb @@ -64,7 +65,7 @@ GooglePlayDownloader 需要使用 Python 中 SSL 模块的扩展 SNI(服务器 ### 使用 GooglePlayDownloader 从 Google Play 商店下载 APK 文件 ### -一旦你安装好 GooglePlayDownloader 后,你就可以像下面那样从 Google Play 商店下载 APK 文件。 +一旦你安装好 GooglePlayDownloader 后,你就可以像下面那样从 Google Play 商店下载 APK 文件。(LCTT 译注:显然你需要让你的 Linux 能爬梯子) 首先通过输入下面的命令来启动该应用: @@ -76,7 +77,7 @@ GooglePlayDownloader 需要使用 Python 中 SSL 模块的扩展 SNI(服务器 ![](https://farm1.staticflickr.com/503/20230360479_925f5da613_b.jpg) -一旦你从搜索列表中找到了该应用,就选择该应用,接着点击 "下载选定的 APK 文件" 按钮。最后你将在你的家目录中找到下载的 APK 文件。现在,你就可以将下载到的 APK 文件转移到你所选择的 Android 设备上,然后手动安装它。 +一旦你从搜索列表中找到了该应用,就选择该应用,接着点击 “下载选定的 APK 文件” 按钮。最后你将在你的家目录中找到下载的 APK 文件。现在,你就可以将下载到的 APK 文件转移到你所选择的 Android 设备上,然后手动安装它。 希望这篇教程对你有所帮助。 @@ -86,7 +87,7 @@ via: http://xmodulo.com/download-apk-files-google-play-store.html 作者:[Dan Nanni][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From eaf4b2444bbff4896171b0e4dbdef671d9435a52 Mon Sep 17 00:00:00 2001 From: XIAOYU <1136299502@qq.com> Date: Sat, 15 Aug 2015 09:58:49 +0800 Subject: [PATCH 1726/2517] translated translated --- ...urce RSS News Ticker for Linux Desktops.md | 93 +++++++++---------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md b/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md index ccbbd3abd8..d7bb0e425b 100644 --- a/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md +++ b/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md @@ -1,94 +1,93 @@ -translating by xiaoyu33 - -Tickr Is An Open-Source RSS News Ticker for Linux Desktops +Trickr:一个开源的Linux桌面RSS新闻速递 ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/rss-tickr.jpg) -**Latest! Latest! Read all about it!** +**最新的!最新的!阅读关于它的一切!** -Alright, so the app we’re highlighting today isn’t quite the binary version of an old newspaper seller — but it is a great way to have the latest news brought to you, on your desktop. +好了,所以我们今天要强调的应用程序不是相当于旧报纸的二进制版本—而是它会以一个伟大的方式,将最新的新闻推送到你的桌面上。 -Tick is a GTK-based news ticker for the Linux desktop that scrolls the latest headlines and article titles from your favourite RSS feeds in horizontal strip that you can place anywhere on your desktop. +Tick是一个基于GTK的Linux桌面新闻速递,能够在水平带滚动显示最新头条新闻,以及你最爱的RSS资讯文章标题,当然你可以放置在你桌面的任何地方。 -Call me Joey Calamezzo; I put mine on the bottom TV news station style. +请叫我Joey Calamezzo;我把我的放在底部,有电视新闻台的风格。 -“Over to you, sub-heading.” +“到你了,子标题” -### RSS — Remember That? ### +### RSS -还记得吗? ### -“Thanks paragraph ending.” +“谢谢段落结尾。” -In an era of push notifications, social media, and clickbait, cajoling us into reading the latest mind-blowing, humanity saving listicle ASAP, RSS can seem a bit old hat. +在一个推送通知,社交媒体,以及点击诱饵的时代,哄骗我们阅读最新的令人惊奇的,人人都爱读的清单,RSS看起来有一点过时了。 -For me? Well, RSS lives up to its name of Really Simple Syndication. It’s the easiest, most manageable way to have news come to me. I can manage and read stuff when I want; there’s no urgency to view lest the tweet vanish into the stream or the push notification vanish. +对我来说?恩,RSS是名副其实的真正简单的聚合。这是将消息通知给我的最简单,最易于管理的方式。我可以在我愿意的时候,管理和阅读一些东西;没必要匆忙的去看,以防这条微博消失在信息流中,或者推送通知消失。 -The beauty of Tickr is in its utility. You can have a constant stream of news trundling along the bottom of your screen, which you can passively glance at from time to time. +tickr的美在于它的实用性。你可以不断地有新闻滚动在屏幕的底部,然后不时地瞥一眼。 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/tickr-close-up-750x58.jpg) -There’s no pressure to ‘read’ or ‘mark all read’ or any of that. When you see something you want to read you just click it to open it in a web browser. +你不会有“阅读”或“标记所有为已读”的压力。当你看到一些你想读的东西,你只需点击它,将它在Web浏览器中打开。 -### Setting it Up ### +### 开始设置 ### ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/tickr-rss-settings.jpg) -Although Tickr is available to install from the Ubuntu Software Centre it hasn’t been updated for a long time. Nowhere is this sense of abandonment more keenly felt than when opening the unwieldy and unintuitive configuration panel. +尽管虽然tickr可以从Ubuntu软件中心安装,然而它已经很久没有更新了。当你打开笨拙的不直观的控制面板的时候,没有什么能够比这更让人感觉被遗弃的了。 -To open it: +打开它: -1. Right click on the Tickr bar -1. Go to Edit > Preferences -1. Adjust the various settings +1. 右键单击tickr条 +1. 转至编辑>首选项 +1. 调整各种设置 -Row after row of options and settings, few of which seem to make sense at first. But poke and prod around and you’ll controls for pretty much everything, including: +选项和设置行的后面,有些似乎是容易理解的。但是知己知彼你能够几乎掌控一切,包括: -- Set scrolling speed -- Choose behaviour when mousing over -- Feed update frequency -- Font, including font sizes and color -- Separator character (‘delineator’) -- Position of Tickr on screen -- Color and opacity of Tickr bar -- Choose how many articles each feed displays +- 设置滚动速度 +- 选择鼠标经过时的行为 +- 资讯更新频率 +- 字体,包括字体大小和颜色 +- 分隔符(“delineator”) +- tickr在屏幕上的位置 +- tickr条的颜色和不透明度 +- 选择每种资讯显示多少文章 -One ‘quirk’ worth mentioning is that pressing the ‘Apply’ only updates the on-screen Tickr to preview changes. For changes to take effect when you exit the Preferences window you need to click ‘OK’. +有个值得一提的“怪癖”是,当你点击“应用”按钮,只会更新tickr的屏幕预览。当您退出“首选项”窗口时,请单击“确定”。 -Getting the bar to sit flush on your display can also take a fair bit of tweaking, especially on Unity. +想要滚动条在你的显示屏上水平显示,也需要公平一点的调整,特别是统一显示。 -Press the “full width button” to have the app auto-detect your screen width. By default when placed at the top or bottom it leaves a 25px gap (the app was created back in the days of GNOME 2.x desktops). After hitting the top or bottom buttons just add an extra 25 pixels to the input box compensate for this. +按下“全宽按钮”,能够让应用程序自动检测你的屏幕宽度。默认情况下,当放置在顶部或底部时,会留下25像素的间距(应用程序被创建在过去的GNOME2.x桌面)。只需添加额外的25像素到输入框,来弥补这个问题。 -Other options available include: choose which browser articles open in; whether Tickr appears within a regular window frame; whether a clock is shown; and how often the app checks feed for articles. +其他可供选择的选项包括:选择文章在哪个浏览器打开;tickr是否以一个常规的窗口出现; +是否显示一个时钟;以及应用程序多久检查一次文章资讯。 -#### Adding Feeds #### +#### 添加资讯 #### -Tickr comes with a built-in list of over 30 different feeds, ranging from technology blogs to mainstream news services. +tickr自带的有超过30种不同的资讯列表,从技术博客到主流新闻服务。 ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/feed-picker-750x398.jpg) -You can select as many of these as you like to show headlines in the on screen ticker. If you want to add your own feeds you can: – +你可以选择很多你想在屏幕上显示的新闻提要。如果你想添加自己的资讯,你可以:— -1. Right click on the Tickr bar -1. Go to File > Open Feed -1. Enter Feed URL -1. Click ‘Add/Upd’ button -1. Click ‘OK (select)’ +1. 右键单击tickr条 +1. 转至文件>打开资讯 +1. 输入资讯网址 +1. 点击“添加/更新”按钮 +1. 单击“确定”(选择) -To set how many items from each feed shows in the ticker change the “Read N items max per feed” in the other preferences window. +如果想设置每个资讯在ticker中显示多少条文章,可以去另一个首选项窗口修改“每个资讯最大读取N条文章” -### Install Tickr in Ubuntu 14.04 LTS and Up ### +### 在Ubuntu 14.04 LTS或更高版本上安装Tickr ### -So that’s Tickr. It’s not going to change the world but it will keep you abreast of what’s happening in it. +在Ubuntu 14.04 LTS或更高版本上安装Tickr -To install it in Ubuntu 14.04 LTS or later head to the Ubuntu Software Centre but clicking the button below. +在Ubuntu 14.04 LTS或更高版本中安装,转到Ubuntu软件中心,但要点击下面的按钮。 -- [Click to install Tickr form the Ubuntu Software Center][1] +- [点击此处进入Ubuntu软件中心安装tickr][1] -------------------------------------------------------------------------------- via: http://www.omgubuntu.co.uk/2015/06/tickr-open-source-desktop-rss-news-ticker 作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) +译者:[xiaoyu33](https://github.com/xiaoyu33) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 6c69a46dc31c5ac42d88dee04c787b82d804d77b Mon Sep 17 00:00:00 2001 From: XIAOYU <1136299502@qq.com> Date: Sat, 15 Aug 2015 10:00:20 +0800 Subject: [PATCH 1727/2517] translated change the url --- ... Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md (100%) diff --git a/sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md b/translated/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md similarity index 100% rename from sources/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md rename to translated/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md From 8de21554f0dd6220e53f6d3cee738a5a4c40a372 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 15 Aug 2015 10:39:03 +0800 Subject: [PATCH 1728/2517] translating --- ...20150811 How to Install Snort and Usage in Ubuntu 15.04.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md b/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md index 7bf2438c95..96759a29e6 100644 --- a/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md +++ b/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md @@ -1,3 +1,5 @@ +translating----geekpi + How to Install Snort and Usage in Ubuntu 15.04 ================================================================================ Intrusion detection in a network is important for IT security. Intrusion Detection System used for the detection of illegal and malicious attempts in the network. Snort is well-known open source intrusion detection system. Web interface (Snorby) can be used for better analysis of alerts. Snort can be used as an intrusion prevention system with iptables/pf firewall. In this article, we will install and configure an open source IDS system snort. @@ -200,4 +202,4 @@ via: http://linoxide.com/security/install-snort-usage-ubuntu-15-04/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/naveeda/ -[1]:https://www.snort.org/downloads/community/community-rules.tar.gz \ No newline at end of file +[1]:https://www.snort.org/downloads/community/community-rules.tar.gz From 1c9c7bcec0630789c0a7b3a8aeff64abfafddda2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 15 Aug 2015 11:34:52 +0800 Subject: [PATCH 1729/2517] translating --- ...Install Snort and Usage in Ubuntu 15.04.md | 80 +++++++++---------- 1 file changed, 39 insertions(+), 41 deletions(-) diff --git a/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md b/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md index 96759a29e6..06fbfd62b8 100644 --- a/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md +++ b/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md @@ -1,56 +1,54 @@ -translating----geekpi - -How to Install Snort and Usage in Ubuntu 15.04 +在Ubuntu 15.04中如何安装和使用Snort ================================================================================ -Intrusion detection in a network is important for IT security. Intrusion Detection System used for the detection of illegal and malicious attempts in the network. Snort is well-known open source intrusion detection system. Web interface (Snorby) can be used for better analysis of alerts. Snort can be used as an intrusion prevention system with iptables/pf firewall. In this article, we will install and configure an open source IDS system snort. +对于IT安全而言入侵检测是一件非常重要的事。入侵检测系统用于检测网络中非法与恶意的请求。Snort是一款知名的开源入侵检测系统。Web界面(Snorby)可以用于更好地分析警告。Snort使用iptables/pf防火墙来作为入侵检测系统。本篇中,我们会安装并配置一个开源的IDS系统snort。 -### Snort Installation ### +### Snort 安装 ### -#### Prerequisite #### +#### 要求 #### -Data Acquisition library (DAQ) is used by the snort for abstract calls to packet capture libraries. It is available on snort website. Downloading process is shown in the following screenshot. +snort所使用的数据采集库(DAQ)用于抽象地调用采集库。这个在snort上就有。下载过程如下截图所示。 ![downloading_daq](http://blog.linoxide.com/wp-content/uploads/2015/07/downloading_daq.png) -Extract it and run ./configure, make and make install commands for DAQ installation. However, DAQ required other tools therefore ./configure script will generate following errors . +解压并运行./configure、make、make install来安装DAQ。然而,DAQ要求其他的工具,因此,./configure脚本会生成下面的错误。 -flex and bison error +flex和bison错误 ![flexandbison_error](http://blog.linoxide.com/wp-content/uploads/2015/07/flexandbison_error.png) -libpcap error. +libpcap错误 ![libpcap error](http://blog.linoxide.com/wp-content/uploads/2015/07/libpcap-error.png) -Therefore first install flex/bison and libcap before DAQ installation which is shown in the figure. +因此在安装DAQ之前先安装flex/bison和libcap。 ![install_flex](http://blog.linoxide.com/wp-content/uploads/2015/07/install_flex.png) -Installation of libpcap development library is shown below +如下所示安装libpcap开发库 ![libpcap-dev installation](http://blog.linoxide.com/wp-content/uploads/2015/07/libpcap-dev-installation.png) -After installation of necessary tools, again run ./configure script which will show following output. +安装完必要的工具后,再次运行./configure脚本,将会显示下面的输出。 ![without_error_configure](http://blog.linoxide.com/wp-content/uploads/2015/07/without_error_configure.png) -make and make install commands result is shown in the following screens. +make和make install 命令的结果如下所示。 ![make install](http://blog.linoxide.com/wp-content/uploads/2015/07/make-install.png) ![make](http://blog.linoxide.com/wp-content/uploads/2015/07/make.png) -After successful installation of DAQ, now we will install snort. Downloading using wget is shown in the below figure. +成功安装DAQ之后,我们现在安装snort。如下图使用wget下载它。 ![downloading_snort](http://blog.linoxide.com/wp-content/uploads/2015/07/downloading_snort.png) -Extract compressed package using below given command. +使用下面的命令解压安装包。 #tar -xvzf snort-2.9.7.3.tar.gz ![snort_extraction](http://blog.linoxide.com/wp-content/uploads/2015/07/snort_extraction.png) -Create installation directory and set prefix parameter in the configure script. It is also recommended to enable sourcefire flag for Packet Performance Monitoring (PPM). +创建安装目录并在脚本中设置prefix参数。同样也建议启用包性能监控(PPM)标志。 #mkdir /usr/local/snort @@ -58,21 +56,21 @@ Create installation directory and set prefix parameter in the configure script. ![snort_installation](http://blog.linoxide.com/wp-content/uploads/2015/07/snort_installation.png) -Configure script generates error due to missing libpcre-dev , libdumbnet-dev and zlib development libraries. +配置脚本由于缺少libpcre-dev、libdumbnet-dev 和zlib开发库而报错。 -error due to missing libpcre library. +配置脚本由于缺少libpcre库报错。 ![pcre-error](http://blog.linoxide.com/wp-content/uploads/2015/07/pcre-error.png) -error due to missing dnet (libdumbnet) library. +配置脚本由于缺少dnet(libdumbnet)库而报错。 ![libdnt error](http://blog.linoxide.com/wp-content/uploads/2015/07/libdnt-error.png) -configure script generate error due to missing zlib library. +配置脚本由于缺少zlib库而报错 ![zlib error](http://blog.linoxide.com/wp-content/uploads/2015/07/zlib-error.png) -Installation of all required development libraries is shown in the next screenshots. +如下所示,安装所有需要的开发库。 # aptitude install libpcre3-dev @@ -86,9 +84,9 @@ Installation of all required development libraries is shown in the next screensh ![zlibg-dev installation](http://blog.linoxide.com/wp-content/uploads/2015/07/zlibg-dev-installation.png) -After installation of above required libraries for snort, again run the configure scripts without any error. +安装完snort需要的库之后,再次运行配置脚本就不会报错了。 -Run make & make install commands for the compilation and installations of snort in /usr/local/snort directory. +运行make和make install命令在/usr/local/snort目录下完成安装。 #make @@ -98,22 +96,22 @@ Run make & make install commands for the compilation and installations of snort ![make install snort](http://blog.linoxide.com/wp-content/uploads/2015/07/make-install-snort.png) -Finally snort running from /usr/local/snort/bin directory. Currently it is in promisc mode (packet dump mode) of all traffic on eth0 interface. +最终snort在/usr/local/snort/bin中运行。现在它对eth0的所有流量都处在promisc模式(包转储模式)。 ![snort running](http://blog.linoxide.com/wp-content/uploads/2015/07/snort-running.png) -Traffic dump by the snort interface is shown in following figure. +如下图所示snort转储流量。 ![traffic](http://blog.linoxide.com/wp-content/uploads/2015/07/traffic1.png) -#### Rules and Configuration of Snort #### +#### Snort的规则和配置 #### -Snort installation from source code required rules and configuration setting therefore now we will copy rules and configuration under /etc/snort directory. We have created single bash scripts for rules and configuration setting. It is used for following snort setting. +从源码安装的snort需要规则和安装配置,因此我们会从/etc/snort下面复制规则和配置。我们已经创建了单独的bash脚本来用于规则和配置。它会设置下面这些snort设置。 -- Creation of snort user for snort IDS service on linux. -- Creation of directories and files under /etc directory for snort configuration. -- Permission setting and copying data from etc directory of snort source code. -- Remove # (comment sign) from rules path in snort.conf file. +- 在linux中创建snort用户用于snort IDS服务。 +- 在/etc下面创建snort的配置文件和文件夹。 +- 权限设置并从etc中复制snortsnort源代码 +- 从snort文件中移除规则中的#(注释符号)。 #!/bin/bash##PATH of source code of snort snort_src="/home/test/Downloads/snort-2.9.7.3" @@ -143,15 +141,15 @@ Snort installation from source code required rules and configuration setting the sed -i 's/include \$RULE\_PATH/#include \$RULE\_PATH/' /etc/snort/snort.conf echo "---DONE---" -Change the snort source directory in the script and run it. Following output appear in case of success. +改变脚本中的snort源目录并运行。下面是成功的输出。 ![running script](http://blog.linoxide.com/wp-content/uploads/2015/08/running_script.png) -Above script copied following files/directories from snort source into /etc/snort configuration file. +上面的脚本从snort源中复制下面的文件/文件夹到/etc/snort配置文件中 ![files copied](http://blog.linoxide.com/wp-content/uploads/2015/08/created.png) -Snort configuration file is very complex however following necessary changes are required in snort.conf for IDS proper working. +、snort的配置非常复杂,然而为了IDS能正常工作需要进行下面必要的修改。 ipvar HOME_NET 192.168.1.0/24 # LAN side @@ -171,32 +169,32 @@ Snort configuration file is very complex however following necessary changes are include $RULE_PATH/local.rules # file for custom rules -remove comment sign (#) from other rules such as ftp.rules,exploit.rules etc. +移除ftp.rules、exploit.rules前面的注释符号(#)。 ![path rules](http://blog.linoxide.com/wp-content/uploads/2015/08/path-rules.png) -Now [Download community][1] rules and extract under /etc/snort/rules directory. Enable community and emerging threats rules in snort.conf file. +下载[下载社区][1]规则并解压到/etc/snort/rules。启用snort.conf中的社区及紧急威胁规则。 ![wget_rules](http://blog.linoxide.com/wp-content/uploads/2015/08/wget_rules.png) ![community rules](http://blog.linoxide.com/wp-content/uploads/2015/08/community-rules1.png) -Run following command to test the configuration file after above mentioned changes. +进行了上面的更改后,运行下面的命令来检验配置文件。 #snort -T -c /etc/snort/snort.conf ![snort running](http://blog.linoxide.com/wp-content/uploads/2015/08/snort-final.png) -### Conclusion ### +### 总结 ### -In this article our focus was on the installation and configuration of an open source IDPS system snort on Ubuntu distribution. By default it is used for the monitoring of events however it can con configured inline mode for the protection of network. Snort rules can be tested and analysed in offline mode using pcap capture file. +本篇中,我们致力于开源IDPS系统snort在Ubuntu上的安装和配置。默认它用于监控时间,然而它可以被配置成用于网络保护的内联模式。snort规则可以在离线模式中可以使用pcap文件测试和分析 -------------------------------------------------------------------------------- via: http://linoxide.com/security/install-snort-usage-ubuntu-15-04/ 作者:[nido][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 19ccf708732b86651de67cef8804946927b127aa Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 15 Aug 2015 11:41:25 +0800 Subject: [PATCH 1730/2517] [Translate] tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md --- ...o Setup and Test Static Network Routing.md | 228 ------------------ ...o Setup and Test Static Network Routing.md | 227 +++++++++++++++++ 2 files changed, 227 insertions(+), 228 deletions(-) delete mode 100644 sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md create mode 100644 translated/tech/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md diff --git a/sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md b/sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md deleted file mode 100644 index 731e78e5cf..0000000000 --- a/sources/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md +++ /dev/null @@ -1,228 +0,0 @@ -Translating by ictlyh -Part 1 - RHCE Series: How to Setup and Test Static Network Routing -================================================================================ -RHCE (Red Hat Certified Engineer) is a certification from Red Hat company, which gives an open source operating system and software to the enterprise community, It also gives training, support and consulting services for the companies. - -![RHCE Exam Preparation Guide](http://www.tecmint.com/wp-content/uploads/2015/07/RHCE-Exam-Series-by-TecMint.jpg) - -RHCE Exam Preparation Guide - -This RHCE (Red Hat Certified Engineer) is a performance-based exam (codename EX300), who possesses the additional skills, knowledge, and abilities required of a senior system administrator responsible for Red Hat Enterprise Linux (RHEL) systems. - -**Important**: [Red Hat Certified System Administrator][1] (RHCSA) certification is required to earn RHCE certification. - -Following are the exam objectives based on the Red Hat Enterprise Linux 7 version of the exam, which will going to cover in this RHCE series: - -- Part 1: How to Setup and Test Static Routing in RHEL 7 -- Part 2: How to Perform Packet Filtering, Network Address Translation and Set Kernel Runtime Parameters -- Part 3: How to Produce and Deliver System Activity Reports Using Linux Toolsets -- Part 4: Automate System Maintenance Tasks Using Shell Scripts -- Part 5: How to Configure Local and Remote System Logging -- Part 6: How to Configure a Samba Server and a NFS Server -- Part 7: Setting Up Complete SMTP Server for Mailing -- Part 8: Setting Up HTTPS and TLS on RHEL 7 -- Part 9: Setting Up Network Time Protocol -- Part 10: How to Configure a Cache-Only DNS Server - -To view fees and register for an exam in your country, check the [RHCE Certification][2] page. - -In this Part 1 of the RHCE series and the next, we will present basic, yet typical, cases where the principles of static routing, packet filtering, and network address translation come into play. - -![Setup Static Network Routing in RHEL](http://www.tecmint.com/wp-content/uploads/2015/07/Setup-Static-Network-Routing-in-RHEL-7.jpg) - -RHCE: Setup and Test Network Static Routing – Part 1 - -Please note that we will not cover them in depth, but rather organize these contents in such a way that will be helpful to take the first steps and build from there. - -### Static Routing in Red Hat Enterprise Linux 7 ### - -One of the wonders of modern networking is the vast availability of devices that can connect groups of computers, whether in relatively small numbers and confined to a single room or several machines in the same building, city, country, or across continents. - -However, in order to effectively accomplish this in any situation, network packets need to be routed, or in other words, the path they follow from source to destination must be ruled somehow. - -Static routing is the process of specifying a route for network packets other than the default, which is provided by a network device known as the default gateway. Unless specified otherwise through static routing, network packets are directed to the default gateway; with static routing, other paths are defined based on predefined criteria, such as the packet destination. - -Let us define the following scenario for this tutorial. We have a Red Hat Enterprise Linux 7 box connecting to router #1 [192.168.0.1] to access the Internet and machines in 192.168.0.0/24. - -A second router (router #2) has two network interface cards: enp0s3 is also connected to router #1 to access the Internet and to communicate with the RHEL 7 box and other machines in the same network, whereas the other (enp0s8) is used to grant access to the 10.0.0.0/24 network where internal services reside, such as a web and / or database server. - -This scenario is illustrated in the diagram below: - -![Static Routing Network Diagram](http://www.tecmint.com/wp-content/uploads/2015/07/Static-Routing-Network-Diagram.png) - -Static Routing Network Diagram - -In this article we will focus exclusively on setting up the routing table on our RHEL 7 box to make sure that it can both access the Internet through router #1 and the internal network via router #2. - -In RHEL 7, you will use the [ip command][3] to configure and show devices and routing using the command line. These changes can take effect immediately on a running system but since they are not persistent across reboots, we will use ifcfg-enp0sX and route-enp0sX files inside /etc/sysconfig/network-scripts to save our configuration permanently. - -To begin, let’s print our current routing table: - - # ip route show - -![Check Routing Table in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Current-Routing-Table.png) - -Check Current Routing Table - -From the output above, we can see the following facts: - -- The default gateway’s IP address is 192.168.0.1 and can be accessed via the enp0s3 NIC. -- When the system booted up, it enabled the zeroconf route to 169.254.0.0/16 (just in case). In few words, if a machine is set to obtain an IP address through DHCP but fails to do so for some reason, it is automatically assigned an address in this network. Bottom line is, this route will allow us to communicate, also via enp0s3, with other machines who have failed to obtain an IP address from a DHCP server. -- Last, but not least, we can communicate with other boxes inside the 192.168.0.0/24 network through enp0s3, whose IP address is 192.168.0.18. - -These are the typical tasks that you would have to perform in such a setting. Unless specified otherwise, the following tasks should be performed in router #2: - -Make sure all NICs have been properly installed: - - # ip link show - -If one of them is down, bring it up: - - # ip link set dev enp0s8 up - -and assign an IP address in the 10.0.0.0/24 network to it: - - # ip addr add 10.0.0.17 dev enp0s8 - -Oops! We made a mistake in the IP address. We will have to remove the one we assigned earlier and then add the right one (10.0.0.18): - - # ip addr del 10.0.0.17 dev enp0s8 - # ip addr add 10.0.0.18 dev enp0s8 - -Now, please note that you can only add a route to a destination network through a gateway that is itself already reachable. For that reason, we need to assign an IP address within the 192.168.0.0/24 range to enp0s3 so that our RHEL 7 box can communicate with it: - - # ip addr add 192.168.0.19 dev enp0s3 - -Finally, we will need to enable packet forwarding: - - # echo "1" > /proc/sys/net/ipv4/ip_forward - -and stop / disable (just for the time being – until we cover packet filtering in the next article) the firewall: - - # systemctl stop firewalld - # systemctl disable firewalld - -Back in our RHEL 7 box (192.168.0.18), let’s configure a route to 10.0.0.0/24 through 192.168.0.19 (enp0s3 in router #2): - - # ip route add 10.0.0.0/24 via 192.168.0.19 - -After that, the routing table looks as follows: - - # ip route show - -![Show Network Routing Table](http://www.tecmint.com/wp-content/uploads/2015/07/Show-Network-Routing.png) - -Confirm Network Routing Table - -Likewise, add the corresponding route in the machine(s) you’re trying to reach in 10.0.0.0/24: - - # ip route add 192.168.0.0/24 via 10.0.0.18 - -You can test for basic connectivity using ping: - -In the RHEL 7 box, run - - # ping -c 4 10.0.0.20 - -where 10.0.0.20 is the IP address of a web server in the 10.0.0.0/24 network. - -In the web server (10.0.0.20), run - - # ping -c 192.168.0.18 - -where 192.168.0.18 is, as you will recall, the IP address of our RHEL 7 machine. - -Alternatively, we can use [tcpdump][4] (you may need to install it with yum install tcpdump) to check the 2-way communication over TCP between our RHEL 7 box and the web server at 10.0.0.20. - -To do so, let’s start the logging in the first machine with: - - # tcpdump -qnnvvv -i enp0s3 host 10.0.0.20 - -and from another terminal in the same system let’s telnet to port 80 in the web server (assuming Apache is listening on that port; otherwise, indicate the right port in the following command): - - # telnet 10.0.0.20 80 - -The tcpdump log should look as follows: - -![Check Network Communication between Servers](http://www.tecmint.com/wp-content/uploads/2015/07/Tcpdump-logs.png) - -Check Network Communication between Servers - -Where the connection has been properly initialized, as we can tell by looking at the 2-way communication between our RHEL 7 box (192.168.0.18) and the web server (10.0.0.20). - -Please remember that these changes will go away when you restart the system. If you want to make them persistent, you will need to edit (or create, if they don’t already exist) the following files, in the same systems where we performed the above commands. - -Though not strictly necessary for our test case, you should know that /etc/sysconfig/network contains system-wide network parameters. A typical /etc/sysconfig/network looks as follows: - - # Enable networking on this system? - NETWORKING=yes - # Hostname. Should match the value in /etc/hostname - HOSTNAME=yourhostnamehere - # Default gateway - GATEWAY=XXX.XXX.XXX.XXX - # Device used to connect to default gateway. Replace X with the appropriate number. - GATEWAYDEV=enp0sX - -When it comes to setting specific variables and values for each NIC (as we did for router #2), you will have to edit /etc/sysconfig/network-scripts/ifcfg-enp0s3 and /etc/sysconfig/network-scripts/ifcfg-enp0s8. - -Following our case, - - TYPE=Ethernet - BOOTPROTO=static - IPADDR=192.168.0.19 - NETMASK=255.255.255.0 - GATEWAY=192.168.0.1 - NAME=enp0s3 - ONBOOT=yes - -and - - TYPE=Ethernet - BOOTPROTO=static - IPADDR=10.0.0.18 - NETMASK=255.255.255.0 - GATEWAY=10.0.0.1 - NAME=enp0s8 - ONBOOT=yes - -for enp0s3 and enp0s8, respectively. - -As for routing in our client machine (192.168.0.18), we will need to edit /etc/sysconfig/network-scripts/route-enp0s3: - - 10.0.0.0/24 via 192.168.0.19 dev enp0s3 - -Now reboot your system and you should see that route in your table. - -### Summary ### - -In this article we have covered the essentials of static routing in Red Hat Enterprise Linux 7. Although scenarios may vary, the case presented here illustrates the required principles and the procedures to perform this task. Before wrapping up, I would like to suggest you to take a look at [Chapter 4][5] of the Securing and Optimizing Linux section in The Linux Documentation Project site for further details on the topics covered here. - -Free ebook on Securing & Optimizing Linux: The Hacking Solution (v.3.0) – This 800+ eBook contains comprehensive collection of Linux security tips and how to use them safely and easily to configure Linux-based applications and services. - -![Linux Security and Optimization Book](http://www.tecmint.com/wp-content/uploads/2015/07/Linux-Security-Optimization-Book.gif) - -Linux Security and Optimization Book - -[Download Now][6] - -In the next article we will talk about packet filtering and network address translation to sum up the networking basic skills needed for the RHCE certification. - -As always, we look forward to hearing from you, so feel free to leave your questions, comments, and suggestions using the form below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/how-to-setup-and-configure-static-network-routing-in-rhel/ - -作者:[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/rhcsa-exam-reviewing-essential-commands-system-documentation/ -[2]:https://www.redhat.com/en/services/certification/rhce -[3]:http://www.tecmint.com/ip-command-examples/ -[4]:http://www.tecmint.com/12-tcpdump-commands-a-network-sniffer-tool/ -[5]:http://www.tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/net-manage.html -[6]:http://tecmint.tradepub.com/free/w_opeb01/prgm.cgi \ No newline at end of file diff --git a/translated/tech/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md b/translated/tech/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md new file mode 100644 index 0000000000..03038b92d5 --- /dev/null +++ b/translated/tech/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md @@ -0,0 +1,227 @@ +RHCE 系列第一部分:如何设置和测试静态网络路由 +================================================================================ +RHCE(Red Hat Certified Engineer,红帽认证工程师)是红帽公司的一个认证,红帽向企业社区贡献开源操作系统和软件,同时它还给公司提供训练、支持和咨询服务。 + +![RHCE 考试准备指南](http://www.tecmint.com/wp-content/uploads/2015/07/RHCE-Exam-Series-by-TecMint.jpg) + +RHCE 考试准备指南 + +这个 RHCE 是基于性能的考试(代号 EX300),面向那些拥有更多的技能、知识和能力的红帽企业版 Linux(RHEL)系统高级系统管理员。 + +**重要**: [红帽认证系统管理员][1] (Red Hat Certified System Administrator,RHCSA)认证要求先有 RHCE 认证。 + +以下是基于红帽企业版 Linux 7 考试的考试目标,我们会在该 RHCE 系列中分别介绍: + +- 第一部分:如何在 RHEL 7 中设置和测试静态路由 +- 第二部分:如果进行包过滤、网络地址转换和设置内核运行时参数 +- 第三部分:如果使用 Linux 工具集产生和发送系统活动报告 +- 第四部分:使用 Shell 脚本进行自动化系统维护 +- 第五部分:如果配置本地和远程系统日志 +- 第六部分:如果配置一个 Samba 服务器或 NFS 服务器(译者注:Samba 是在 Linux 和 UNI X系统上实现 SMB 协议的一个免费软件,由服务器及客户端程序构成。SMB,Server Messages Block,信息服务块,是一种在局域网上共享文件和打印机的一种通信协议,它为局域网内的不同计算机之间提供文件及打印机等资源的共享服务。) +- 第七部分:为收发邮件配置完整的 SMTP 服务器 +- 第八部分:在 RHEL 7 上设置 HTTPS 和 TLS +- 第九部分:设置网络时间协议 +- 第十部分:如何配置一个 Cache-Only DNS 服务器 + +在你的国家查看考试费用和注册考试,可以到 [RHCE 认证][2] 网页。 + +在 RHCE 的第一和第二部分,我们会介绍一些基本的但典型的情形,也就是静态路由原理、包过滤和网络地址转换。 + +![在 RHEL 中设置静态网络路由](http://www.tecmint.com/wp-content/uploads/2015/07/Setup-Static-Network-Routing-in-RHEL-7.jpg) + +RHCE 系列第一部分:设置和测试网络静态路由 + +请注意我们不会作深入的介绍,但以这种方式组织内容能帮助你开始第一步并继续后面的内容。 + +### 红帽企业版 Linux 7 中的静态路由 ### + +现代网络的一个奇迹就是有很多可用的设备能将一组计算机连接起来,不管是在一个房间里少量的机器还是在一栋建筑物、城市、国家或者大洲之间的多台机器。 + +然而,为了能在任意情形下有效的实现这些,需要对网络包进行路由,或者换句话说,它们从源到目的地的路径需要按照某种规则。 + +静态路由是为网络包指定一个路由的过程,而不是使用网络设备提供的默认网关。除非另有指定,否则通过路由,网络包会被导向默认网关;基于预定义的标准,例如数据包目的地,使用静态路由可以定义其它路径。 + +我们在该篇指南中会考虑以下场景。我们有一台红帽企业版 Linux 7,连接到路由器 1号 [192.168.0.1] 以访问因特网以及 192.168.0.0/24 中的其它机器。 + +第二个路由器(路由器 2号)有两个网卡:enp0s3 同样通过网络连接到路由器 1号,以便连接RHEL 7 以及相同网络中的其它机器,另外一个网卡(enp0s8)用于授权访问内部服务所在的 10.0.0.0/24 网络,例如 web 或数据库服务器。 + +该场景可以用下面的示意图表示: + +![静态路由网络示意图](http://www.tecmint.com/wp-content/uploads/2015/07/Static-Routing-Network-Diagram.png) + +静态路由网络示意图 + +在这篇文章中我们会集中介绍在 RHEL 7 中设置路由表,确保它能通过路由器 1号访问因特网以及通过路由器 2号访问内部网络。 + +在 RHEL 7 中,你会通过命令行用 [命令 ip][3] 配置和显示设备和路由。这些更改能在运行的系统中及时生效,但由于重启后不会保存,我们会使用 /etc/sysconfig/network-scripts 目录下的 ifcfg-enp0sX 和 route-enp0sX 文件永久保存我们的配置。 + +首先,让我们打印出当前的路由表: + + # ip route show + +![在 Linux 中检查路由表](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Current-Routing-Table.png) + +检查当前路由表 + +从上面的输出中,我们可以得出以下结论: + +- 默认网关的 IP 是 192.168.0.1,可以通过网卡 enp0s3 访问。 +- 系统启动的时候,它启用了到 169.254.0.0/16 的 zeroconf 路由(只是在本例中)。也就是说,如果机器设置为通过 DHCP 获取一个 IP 地址,但是由于某些原因失败了,它就会在该网络中自动分配到一个地址。这一行的意思是,该路由会允许我们通过 enp0s3 和其它没有从 DHCP 服务器中成功获得 IP 地址的机器机器连接。 +- 最后,但同样重要的是,我们也可以通过 IP 地址是 192.168.0.18 的 enp0s3 和 192.168.0.0/24 网络中的其它机器连接。 + +下面是这样的配置中你需要做的一些典型任务。除非另有说明,下面的任务都在路由器 2号上进行。 + +确保正确安装了所有网卡: + + # ip link show + +如果有某块网卡停用了,启动它: + + # ip link set dev enp0s8 up + +分配 10.0.0.0/24 网络中的一个 IP 地址给它: + + # ip addr add 10.0.0.17 dev enp0s8 + +噢!我们分配了一个错误的 IP 地址。我们需要删除之前分配的那个并添加正确的地址(10.0.0.18): + + # ip addr del 10.0.0.17 dev enp0s8 + # ip addr add 10.0.0.18 dev enp0s8 + +现在,请注意你只能添加一个通过已经能访问的网关到目标网络的路由。因为这个原因,我们需要在 192.168.0.0/24 范围中给 enp0s3 分配一个 IP 地址,这样我们的 RHEL 7 才能连接到它: + + # ip addr add 192.168.0.19 dev enp0s3 + +最后,我们需要启用包转发: + + # echo "1" > /proc/sys/net/ipv4/ip_forward + +并停用/取消防火墙(从现在开始,直到下一篇文章中我们介绍了包过滤): + + # systemctl stop firewalld + # systemctl disable firewalld + +回到我们的 RHEL 7(192.168.0.18),让我们配置一个通过 192.168.0.19(路由器 2号的 enp0s3)到 10.0.0.0/24 的路由: + + # ip route add 10.0.0.0/24 via 192.168.0.19 + +之后,路由表看起来像下面这样: + + # ip route show + +![显示网络路由表](http://www.tecmint.com/wp-content/uploads/2015/07/Show-Network-Routing.png) + +确认网络路由表 + +同样,在你尝试连接的 10.0.0.0/24 网络的机器中添加对应的路由: + + # ip route add 192.168.0.0/24 via 10.0.0.18 + +你可以使用 ping 测试基本连接: + +在 RHEL 7 中运行: + + # ping -c 4 10.0.0.20 + +10.0.0.20 是 10.0.0.0/24 网络中一个 web 服务器的 IP 地址。 + +在 web 服务器(10.0.0.20)中运行 + + # ping -c 192.168.0.18 + +192.168.0.18 也就是我们的 RHEL 7 机器的 IP 地址。 + +另外,我们还可以使用 [tcpdump][4](需要通过 yum install tcpdump 安装)来检查我们 RHEL 7 和 10.0.0.20 中 web 服务器之间的 TCP 双向通信。 + +首先在第一台机器中启用日志: + + # tcpdump -qnnvvv -i enp0s3 host 10.0.0.20 + +在同一个系统上的另一个终端,让我们通过 telnet 连接到 web 服务器的 80 号端口(假设 Apache 正在监听该端口;否则在下面命令中使用正确的端口): + + # telnet 10.0.0.20 80 + +tcpdump 日志看起来像下面这样: + +![检查服务器之间的网络连接](http://www.tecmint.com/wp-content/uploads/2015/07/Tcpdump-logs.png) + +检查服务器之间的网络连接 + +通过查看我们 RHEL 7(192.168.0.18)和 web 服务器(10.0.0.20)之间的双向通信,可以看出已经正确地初始化了连接。 + +请注意你重启系统后会丢失这些更改。如果你想把它们永久保存下来,你需要在我们运行上面的命令的相同系统中编辑(如果不存在的话就创建)以下的文件。 + +尽管对于我们的测试例子不是严格要求,你需要知道 /etc/sysconfig/network 包含了一些系统范围的网络参数。一个典型的 /etc/sysconfig/network 看起来类似下面这样: + + # Enable networking on this system? + NETWORKING=yes + # Hostname. Should match the value in /etc/hostname + HOSTNAME=yourhostnamehere + # Default gateway + GATEWAY=XXX.XXX.XXX.XXX + # Device used to connect to default gateway. Replace X with the appropriate number. + GATEWAYDEV=enp0sX + +当需要为每个网卡设置特定的变量和值时(正如我们在路由器 2号上面做的),你需要编辑 /etc/sysconfig/network-scripts/ifcfg-enp0s3 和 /etc/sysconfig/network-scripts/ifcfg-enp0s8 文件。 + +下面是我们的例子, + + TYPE=Ethernet + BOOTPROTO=static + IPADDR=192.168.0.19 + NETMASK=255.255.255.0 + GATEWAY=192.168.0.1 + NAME=enp0s3 + ONBOOT=yes + +以及 + + TYPE=Ethernet + BOOTPROTO=static + IPADDR=10.0.0.18 + NETMASK=255.255.255.0 + GATEWAY=10.0.0.1 + NAME=enp0s8 + ONBOOT=yes + +分别对应 enp0s3 和 enp0s8。 + +由于要为我们的客户端机器(192.168.0.18)进行路由,我们需要编辑 /etc/sysconfig/network-scripts/route-enp0s3: + + 10.0.0.0/24 via 192.168.0.19 dev enp0s3 + +现在重启系统你可以在路由表中看到该路由规则。 + +### 总结 ### + +在这篇文章中我们介绍了红帽企业版 Linux 7 的静态路由。尽管场景可能不同,这里介绍的例子说明了所需的原理以及进行该任务的步骤。结束之前,我还建议你看一下 Linux 文档项目中 [第四章 4][5] 保护和优化 Linux 部分,以了解这里介绍主题的更详细内容。 + +免费电子书 Securing & Optimizing Linux: The Hacking Solution (v.3.0) - 这本 800 多页的电子书全面收集了 Linux 安全的小技巧以及如果安全和简便的使用它们去配置基于 Linux 的应用和服务。 + +![Linux 安全和优化](http://www.tecmint.com/wp-content/uploads/2015/07/Linux-Security-Optimization-Book.gif) + +Linux 安全和优化 + +[马上下载][6] + +在下篇文章中我们会介绍数据包过滤和网络地址转换,结束 RHCE 验证需要的网络基本技巧。 + +如往常一样,我们期望听到你的回复,用下面的表格留下你的疑问、评论和建议吧。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/how-to-setup-and-configure-static-network-routing-in-rhel/ + +作者:[Gabriel Cánepa][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者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/rhcsa-exam-reviewing-essential-commands-system-documentation/ +[2]:https://www.redhat.com/en/services/certification/rhce +[3]:http://www.tecmint.com/ip-command-examples/ +[4]:http://www.tecmint.com/12-tcpdump-commands-a-network-sniffer-tool/ +[5]:http://www.tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/net-manage.html +[6]:http://tecmint.tradepub.com/free/w_opeb01/prgm.cgi \ No newline at end of file From 2177afef00a1e6fcb1108dad75fb280cc9d040af Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 15 Aug 2015 12:32:52 +0800 Subject: [PATCH 1731/2517] Rename sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md to translated/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md --- .../20150811 How to Install Snort and Usage in Ubuntu 15.04.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md (100%) diff --git a/sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md b/translated/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md similarity index 100% rename from sources/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md rename to translated/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md From 9a5f4c41627956b74c3daaa6b1e2ee3e31bc0014 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 15 Aug 2015 15:31:15 +0800 Subject: [PATCH 1732/2517] Update 20150728 Process of the Linux kernel building.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译了一部分,太长了 --- ...28 Process of the Linux kernel building.md | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index 1c03ebbe72..f11c1cc7a2 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -1,26 +1,41 @@ Translating by Ezio Process of the Linux kernel building +如何构建Linux 内核的 ================================================================================ -Introduction +介绍 -------------------------------------------------------------------------------- I will not tell you how to build and install custom Linux kernel on your machine, you can find many many [resources](https://encrypted.google.com/search?q=building+linux+kernel#q=building+linux+kernel+from+source+code) that will help you to do it. Instead, we will know what does occur when you are typed `make` in the directory with Linux kernel source code in this part. When I just started to learn source code of the Linux kernel, the [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) file was a first file that I've opened. And it was scary :) This [makefile](https://en.wikipedia.org/wiki/Make_%28software%29) contains `1591` lines of code at the time when I wrote this part and it was [third](https://github.com/torvalds/linux/commit/52721d9d3334c1cb1f76219a161084094ec634dc) release candidate. +我不会告诉你怎么在自己的电脑上去构建、安装一个定制化的Linux 内核,这样的[资料](https://encrypted.google.com/search?q=building+linux+kernel#q=building+linux+kernel+from+source+code) 太多了,它们会对你有帮助。本文会告诉你当你在内核源码路径里敲下`make` 时会发生什么。当我刚刚开始学习内核代码时,[Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 是我打开的第一个文件,这个文件真令人害怕 :)。那时候这个[Makefile](https://en.wikipedia.org/wiki/Make_%28software%29) 包含了`1591` 行代码,当我开始写本文是,这个[Makefile](https://github.com/torvalds/linux/commit/52721d9d3334c1cb1f76219a161084094ec634dc) 已经是第三个候选版本了。 + This makefile is the the top makefile in the Linux kernel source code and kernel build starts here. Yes, it is big, but moreover, if you've read the source code of the Linux kernel you can noted that all directories with a source code has an own makefile. Of course it is not real to describe how each source files compiled and linked. So, we will see compilation only for the standard case. You will not find here building of the kernel's documentation, cleaning of the kernel source code, [tags](https://en.wikipedia.org/wiki/Ctags) generation, [cross-compilation](https://en.wikipedia.org/wiki/Cross_compiler) related stuff and etc. We will start from the `make` execution with the standard kernel configuration file and will finish with the building of the [bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage). It would be good if you're already familiar with the [make](https://en.wikipedia.org/wiki/Make_%28software%29) util, but I will anyway try to describe all code that will be in this part. So let's start. +这个makefile 是Linux 内核代码的顶端makefile ,内核构件就始于此处。是的,它的内容很多,但是如果你已经读过内核源代码,你就会发现每个包含代码的目录都有一个自己的makefile。当然了,我们不会去描述每个代码文件是怎么编译链接的。所以我们将只会挑选一些通用的例子来说明问题,而你不会在这里找到构建内核的文档,如何整洁内核代码, [tags](https://en.wikipedia.org/wiki/Ctags) 的生成,和[交叉编译](https://en.wikipedia.org/wiki/Cross_compiler) 相关的说明,等等。我们将从`make` 开始,使用标准的内核配置文件,到生成了内核镜像[bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage) 结束。 + +如果你已经很了解[make](https://en.wikipedia.org/wiki/Make_%28software%29) 工具那是最好,但是我也会描述本文出现的相关代码。 + +让我们开始吧 + + Preparation before the kernel compilation +编译内核前的准备 --------------------------------------------------------------------------------- There are many things to preparate before the kernel compilation will be started. The main point here is to find and configure the type of compilation, to parse command line arguments that are passed to the `make` util and etc. So let's dive into the top `Makefile` of the Linux kernel. +在开始便以前要进行很多准备工作。最主要的就是找到并配置好配置文件,`make` 命令要使用到的参数都需要从这些配置文件获取。 + The Linux kernel top `Makefile` is responsible for building two major products: [vmlinux](https://en.wikipedia.org/wiki/Vmlinux) (the resident kernel image) and the modules (any module files). The [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) of the Linux kernel starts from the definition of the following variables: +内核顶端的`Makefile` 负责构建两个主要的产品:[vmlinux](https://en.wikipedia.org/wiki/Vmlinux) (内核镜像可执行文件)和模块文件。内核的 [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 以次开始: + ```Makefile VERSION = 4 PATCHLEVEL = 2 @@ -31,12 +46,16 @@ NAME = Hurr durr I'ma sheep These variables determine the current version of the Linux kernel and are used in the different places, for example in the forming of the `KERNELVERSION` variable: +这些变量决定了当前内核的版本,并且被使用在很多不同的地方,比如`KERNELVERSION` : + ```Makefile KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) ``` After this we can see a couple of the `ifeq` condition that check some of the parameters passed to `make`. The Linux kernel `makefiles` provides a special `make help` target that prints all available targets and some of the command line arguments that can be passed to `make`. For example: `make V=1` - provides verbose builds. The first `ifeq` condition checks if the `V=n` option is passed to make: +接下来我们会看到很多`ifeq` 条件判断语句,它们负责检查传给`make` 的参数。内核的`Makefile` 提供了一个特殊的编译选项`make help` ,这个选项可以生成所有的可用目标和一些能传给`make` 的有效的命令行参数。举个例子,`make V=1` 会在构建过程中输出详细的编译信息,第一个`ifeq` 就是检查传递给make的`V=n` 选项。 + ```Makefile ifeq ("$(origin V)", "command line") KBUILD_VERBOSE = $(V) @@ -58,6 +77,8 @@ export quiet Q KBUILD_VERBOSE If this option is passed to `make` we set the `KBUILD_VERBOSE` variable to the value of the `V` option. Otherwise we set the `KBUILD_VERBOSE` variable to zero. After this we check value of the `KBUILD_VERBOSE` variable and set values of the `quiet` and `Q` variables depends on the `KBUILD_VERBOSE` value. The `@` symbols suppress the output of the command and if it will be set before a command we will see something like this: `CC scripts/mod/empty.o` instead of the `Compiling .... scripts/mod/empty.o`. In the end we just export all of these variables. The next `ifeq` statement checks that `O=/dir` option was passed to the `make`. This option allows to locate all output files in the given `dir`: +如果`V=n` 这个选项传给了`make` ,系统就会给变量`KBUILD_VERBOSE` 选项附上`V` 的值,否则的话`KBUILD_VERBOSE` 就会为0。然后系统会检查`KBUILD_VERBOSE` 的值,以此来决定`quiet` 和`Q` 的值。符号`@` 控制命令的输出,如果它被放在一个命令之前,这条命令的执行将会是`CC scripts/mod/empty.o`,而不是`Compiling .... scripts/mod/empty.o`(注:CC 在makefile 中一般都是编译命令)。最后系统仅仅导出所有的变量。下一个`ifeq` 语句检查的是传递给`make` 的选项`O=/dir`,这个选项允许在指定的目录`dir` 输出所有的结果文件: + ```Makefile ifeq ($(KBUILD_SRC),) From 4452a5c19d27820e077a99971d68c633e4ae8818 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 15 Aug 2015 16:25:13 +0800 Subject: [PATCH 1733/2517] [Translated] tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md --- ...ation and Set Kernel Runtime Parameters.md | 178 ------------------ ...o Setup and Test Static Network Routing.md | 0 ...ation and Set Kernel Runtime Parameters.md | 175 +++++++++++++++++ 3 files changed, 175 insertions(+), 178 deletions(-) delete mode 100644 sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md rename translated/tech/{ => RHCE}/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md (100%) create mode 100644 translated/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md diff --git a/sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md b/sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md deleted file mode 100644 index cd798b906d..0000000000 --- a/sources/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md +++ /dev/null @@ -1,178 +0,0 @@ -Translating by ictlyh -Part 2 - How to Perform Packet Filtering, Network Address Translation and Set Kernel Runtime Parameters -================================================================================ -As promised in Part 1 (“[Setup Static Network Routing][1]”), in this article (Part 2 of RHCE series) we will begin by introducing the principles of packet filtering and network address translation (NAT) in Red Hat Enterprise Linux 7, before diving into setting runtime kernel parameters to modify the behavior of a running kernel if certain conditions change or needs arise. - -![Network Packet Filtering in RHEL](http://www.tecmint.com/wp-content/uploads/2015/07/Network-Packet-Filtering-in-RHEL.jpg) - -RHCE: Network Packet Filtering – Part 2 - -### Network Packet Filtering in RHEL 7 ### - -When we talk about packet filtering, we refer to a process performed by a firewall in which it reads the header of each data packet that attempts to pass through it. Then, it filters the packet by taking the required action based on rules that have been previously defined by the system administrator. - -As you probably know, beginning with RHEL 7, the default service that manages firewall rules is [firewalld][2]. Like iptables, it talks to the netfilter module in the Linux kernel in order to examine and manipulate network packets. Unlike iptables, updates can take effect immediately without interrupting active connections – you don’t even have to restart the service. - -Another advantage of firewalld is that it allows us to define rules based on pre-configured service names (more on that in a minute). - -In Part 1, we used the following scenario: - -![Static Routing Network Diagram](http://www.tecmint.com/wp-content/uploads/2015/07/Static-Routing-Network-Diagram.png) - -Static Routing Network Diagram - -However, you will recall that we disabled the firewall on router #2 to simplify the example since we had not covered packet filtering yet. Let’s see now how we can enable incoming packets destined for a specific service or port in the destination. - -First, let’s add a permanent rule to allow inbound traffic in enp0s3 (192.168.0.19) to enp0s8 (10.0.0.18): - - # firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i enp0s3 -o enp0s8 -j ACCEPT - -The above command will save the rule to /etc/firewalld/direct.xml: - - # cat /etc/firewalld/direct.xml - -![Check Firewalld Saved Rules in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Firewalld-Save-Rules.png) - -Check Firewalld Saved Rules - -Then enable the rule for it to take effect immediately: - - # firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i enp0s3 -o enp0s8 -j ACCEPT - -Now you can telnet to the web server from the RHEL 7 box and run [tcpdump][3] again to monitor the TCP traffic between the two machines, this time with the firewall in router #2 enabled. - - # telnet 10.0.0.20 80 - # tcpdump -qnnvvv -i enp0s3 host 10.0.0.20 - -What if you want to only allow incoming connections to the web server (port 80) from 192.168.0.18 and block connections from other sources in the 192.168.0.0/24 network? - -In the web server’s firewall, add the following rules: - - # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.18/24" service name="http" accept' - # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.18/24" service name="http" accept' --permanent - # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.0/24" service name="http" drop' - # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.0/24" service name="http" drop' --permanent - -Now you can make HTTP requests to the web server, from 192.168.0.18 and from some other machine in 192.168.0.0/24. In the first case the connection should complete successfully, whereas in the second it will eventually timeout. - -To do so, any of the following commands will do the trick: - - # telnet 10.0.0.20 80 - # wget 10.0.0.20 - -I strongly advise you to check out the [Firewalld Rich Language][4] documentation in the Fedora Project Wiki for further details on rich rules. - -### Network Address Translation in RHEL 7 ### - -Network Address Translation (NAT) is the process where a group of computers (it can also be just one of them) in a private network are assigned an unique public IP address. As result, they are still uniquely identified by their own private IP address inside the network but to the outside they all “seem” the same. - -In addition, NAT makes it possible that computers inside a network sends requests to outside resources (like the Internet) and have the corresponding responses be sent back to the source system only. - -Let’s now consider the following scenario: - -![Network Address Translation in RHEL](http://www.tecmint.com/wp-content/uploads/2015/07/Network-Address-Translation-Diagram.png) - -Network Address Translation - -In router #2, we will move the enp0s3 interface to the external zone, and enp0s8 to the internal zone, where masquerading, or NAT, is enabled by default: - - # firewall-cmd --list-all --zone=external - # firewall-cmd --change-interface=enp0s3 --zone=external - # firewall-cmd --change-interface=enp0s3 --zone=external --permanent - # firewall-cmd --change-interface=enp0s8 --zone=internal - # firewall-cmd --change-interface=enp0s8 --zone=internal --permanent - -For our current setup, the internal zone – along with everything that is enabled in it will be the default zone: - - # firewall-cmd --set-default-zone=internal - -Next, let’s reload firewall rules and keep state information: - - # firewall-cmd --reload - -Finally, let’s add router #2 as default gateway in the web server: - - # ip route add default via 10.0.0.18 - -You can now verify that you can ping router #1 and an external site (tecmint.com, for example) from the web server: - - # ping -c 2 192.168.0.1 - # ping -c 2 tecmint.com - -![Verify Network Routing](http://www.tecmint.com/wp-content/uploads/2015/07/Verify-Network-Routing.png) - -Verify Network Routing - -### Setting Kernel Runtime Parameters in RHEL 7 ### - -In Linux, you are allowed to change, enable, and disable the kernel runtime parameters, and RHEL is no exception. The /proc/sys interface (sysctl) lets you set runtime parameters on-the-fly to modify the system’s behavior without much hassle when operating conditions change. - -To do so, the echo shell built-in is used to write to files inside /proc/sys/, where is most likely one of the following directories: - -- dev: parameters for specific devices connected to the machine. -- fs: filesystem configuration (quotas and inodes, for example). -- kernel: kernel-specific configuration. -- net: network configuration. -- vm: use of the kernel’s virtual memory. - -To display the list of all the currently available values, run - - # sysctl -a | less - -In Part 1, we changed the value of the net.ipv4.ip_forward parameter by doing - - # echo 1 > /proc/sys/net/ipv4/ip_forward - -in order to allow a Linux machine to act as router. - -Another runtime parameter that you may want to set is kernel.sysrq, which enables the Sysrq key in your keyboard to instruct the system to perform gracefully some low-level functions, such as rebooting the system if it has frozen for some reason: - - # echo 1 > /proc/sys/kernel/sysrq - -To display the value of a specific parameter, use sysctl as follows: - - # sysctl - -For example, - - # sysctl net.ipv4.ip_forward - # sysctl kernel.sysrq - -Some parameters, such as the ones mentioned above, require only one value, whereas others (for example, fs.inode-state) require multiple values: - -![Check Kernel Parameters in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Kernel-Parameters.png) - -Check Kernel Parameters - -In either case, you need to read the kernel’s documentation before making any changes. - -Please note that these settings will go away when the system is rebooted. To make these changes permanent, we will need to add .conf files inside the /etc/sysctl.d as follows: - - # echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/10-forward.conf - -(where the number 10 indicates the order of processing relative to other files in the same directory). - -and enable the changes with - - # sysctl -p /etc/sysctl.d/10-forward.conf - -### Summary ### - -In this tutorial we have explained the basics of packet filtering, network address translation, and setting kernel runtime parameters on a running system and persistently across reboots. I hope you have found this information useful, and as always, we look forward to hearing from you! -Don’t hesitate to share with us your questions, comments, or suggestions using the form below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/perform-packet-filtering-network-address-translation-and-set-kernel-runtime-parameters-in-rhel/ - -作者:[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/how-to-setup-and-configure-static-network-routing-in-rhel/ -[2]:http://www.tecmint.com/firewalld-rules-for-centos-7/ -[3]:http://www.tecmint.com/12-tcpdump-commands-a-network-sniffer-tool/ -[4]:https://fedoraproject.org/wiki/Features/FirewalldRichLanguage \ No newline at end of file diff --git a/translated/tech/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md b/translated/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md similarity index 100% rename from translated/tech/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md rename to translated/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md diff --git a/translated/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md b/translated/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md new file mode 100644 index 0000000000..74b162be1c --- /dev/null +++ b/translated/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md @@ -0,0 +1,175 @@ +RHCE 第二部分 - 如何进行包过滤、网络地址转换和设置内核运行时参数 +================================================================================ +正如第一部分(“[设置静态网络路由][1]”)承诺的,在这篇文章(RHCE 系列第二部分),我们首先介绍红帽企业版 Linux 7中包过滤和网络地址转换原理,然后再介绍某些条件发送变化或者需要激活时设置运行时内核参数以改变运行时内核行为。 + +![RHEL 中的网络包过滤](http://www.tecmint.com/wp-content/uploads/2015/07/Network-Packet-Filtering-in-RHEL.jpg) + +RHCE 第二部分:网络包过滤 + +### RHEL 7 中的网络包过滤 ### + +当我们讨论数据包过滤的时候,我们指防火墙读取每个尝试通过它的数据包的包头所进行的处理。然后,根据系统管理员之前定义的规则,通过采取所要求的动作过滤数据包。 + +正如你可能知道的,从 RHEL 7 开始,管理防火墙的默认服务是 [firewalld][2]。类似 iptables,它和 Linux 内核的 netfilter 模块交互以便检查和操作网络数据包。不像 iptables,Firewalld 的更新可以立即生效,而不用中断活跃的连接 - 你甚至不需要重启服务。 + +Firewalld 的另一个优势是它允许我们定义基于预配置服务名称的规则(之后会详细介绍)。 + +在第一部分,我们用了下面的场景: + +![静态路由网络示意图](http://www.tecmint.com/wp-content/uploads/2015/07/Static-Routing-Network-Diagram.png) + +静态路由网络示意图 + +然而,你应该记得,由于还没有介绍包过滤,为了简化例子,我们停用了路由器 2号 的防火墙。现在让我们来看看如何可以使接收的数据包发送到目的地的特定服务或端口。 + +首先,让我们添加一条永久规则允许从 enp0s3 (192.168.0.19) 到 enp0s8 (10.0.0.18) 的绑定流量: + + # firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i enp0s3 -o enp0s8 -j ACCEPT + +上面的命令会把规则保存到 /etc/firewalld/direct.xml: + + # cat /etc/firewalld/direct.xml + +![在 CentOS 7 中检查 Firewalld 保存的规则](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Firewalld-Save-Rules.png) + +检查 Firewalld 保存的规则 + +然后启用规则使其立即生效: + + # firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i enp0s3 -o enp0s8 -j ACCEPT + +现在你可以从 RHEL 7 中通过 telnet 登录到 web 服务器并再次运行 [tcpdump][3] 监视两台机器之间的 TCP 流量,这次路由器 2号已经启用了防火墙。 + + # telnet 10.0.0.20 80 + # tcpdump -qnnvvv -i enp0s3 host 10.0.0.20 + +如果你想只允许从 192.168.0.18 到 web 服务器(80 号端口)的连接而阻塞 192.168.0.0/24 网络中的其它来源呢? + +在 web 服务器的防火墙中添加以下规则: + + # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.18/24" service name="http" accept' + # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.18/24" service name="http" accept' --permanent + # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.0/24" service name="http" drop' + # firewall-cmd --add-rich-rule 'rule family="ipv4" source address="192.168.0.0/24" service name="http" drop' --permanent + +现在你可以从 192.168.0.18 和 192.168.0.0/24 中的其它机器发送到 web 服务器的 HTTP 请求。第一种情况连接会成功完成,但第二种情况最终会超时。 + +任何下面的命令可以验证这个结果: + + # telnet 10.0.0.20 80 + # wget 10.0.0.20 + +我强烈建议你看看 Fedora Project Wiki 中的 [Firewalld Rich Language][4] 文档更详细地了解关于富规则的内容。 + +### RHEL 7 中的网络地址转换 ### + +网络地址转换(NAT)是为专用网络中的一组计算机(也可能是其中的一台)分配一个独立的公共 IP 地址的过程。结果,在内部网络中仍然可以用它们自己的私有 IP 地址区别,但外部“看来”它们是一样的。 + +另外,网络地址转换使得内部网络中的计算机发送请求到外部资源(例如因特网)然后只有源系统能接收到对应的响应成为可能。 + +现在让我们考虑下面的场景: + +![RHEL 中的网络地址转换](http://www.tecmint.com/wp-content/uploads/2015/07/Network-Address-Translation-Diagram.png) + +网络地址转换 + +在路由器 2 中,我们会把 enp0s3 接口移动到外部区域,enp0s8 到内部区域,伪装或者说 NAT 默认是启用的: + + # firewall-cmd --list-all --zone=external + # firewall-cmd --change-interface=enp0s3 --zone=external + # firewall-cmd --change-interface=enp0s3 --zone=external --permanent + # firewall-cmd --change-interface=enp0s8 --zone=internal + # firewall-cmd --change-interface=enp0s8 --zone=internal --permanent + +对于我们当前的设置,内部区域 - 以及和它一起启用的任何东西都是默认区域: + + # firewall-cmd --set-default-zone=internal + +下一步,让我们重载防火墙规则并保持状态信息: + + # firewall-cmd --reload + +最后,在 web 服务器中添加路由器 2 为默认网关: + + # ip route add default via 10.0.0.18 + +现在你会发现在 web 服务器中你可以 ping 路由器 1 和外部网站(例如 tecmint.com): + + # ping -c 2 192.168.0.1 + # ping -c 2 tecmint.com + +![验证网络路由](http://www.tecmint.com/wp-content/uploads/2015/07/Verify-Network-Routing.png) + +验证网络路由 + +### 在 RHEL 7 中设置内核运行时参数 ### + +在 Linux 中,允许你更改、启用以及停用内核运行时参数,RHEL 也不例外。/proc/sys 接口允许你当操作条件发生变化时实时设置运行时参数以改变系统行为而不需太多麻烦。 + +为了实现这个目的,会用内建的 echo shell 写 /proc/sys/ 中的文件,其中 很可能是以下目录中的一个: + +- dev: 连接到机器中的特定设备的参数。 +- fs: 文件系统配置(例如 quotas 和 inodes)。 +- kernel: 内核配置。 +- net: 网络配置。 +- vm: 内核虚拟内存的使用。 + +要显示所有当前可用值的列表,运行 + + # sysctl -a | less + +在第一部分中,我们通过以下命令改变了 net.ipv4.ip_forward 参数的值以允许 Linux 机器作为一个路由器。 + + # echo 1 > /proc/sys/net/ipv4/ip_forward + +另一个你可能想要设置的运行时参数是 kernel.sysrq,它会启用你键盘上的 Sysrq 键,以使系统更好的运行一些底层函数,例如如果由于某些原因冻结了后重启系统: + + # echo 1 > /proc/sys/kernel/sysrq + +要显示特定参数的值,可以按照下面方式使用 sysctl: + + # sysctl + +例如, + + # sysctl net.ipv4.ip_forward + # sysctl kernel.sysrq + +一些参数,例如上面提到的一个,只需要一个值,而其它一些(例如 fs.inode-state)要求多个值: + +![在 Linux 中查看内核参数](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Kernel-Parameters.png) + +查看内核参数 + +不管什么情况下,做任何更改之前你都需要阅读内核文档。 + +请注意系统重启后这些设置会丢失。要使这些更改永久生效,我们需要添加内容到 /etc/sysctl.d 目录的 .conf 文件,像下面这样: + + # echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/10-forward.conf + +(其中数字 10 表示相对同一个目录中其它文件的处理顺序)。 + +并用下面命令启用更改 + + # sysctl -p /etc/sysctl.d/10-forward.conf + +### 总结 ### + +在这篇指南中我们解释了基本的包过滤、网络地址变换和在运行的系统中设置内核运行时参数并使重启后能持久化。我希望这些信息能对你有用,如往常一样,我们期望收到你的回复! +别犹豫,在下面的表格中和我们分享你的疑问、评论和建议吧。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/perform-packet-filtering-network-address-translation-and-set-kernel-runtime-parameters-in-rhel/ + +作者:[Gabriel Cánepa][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者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/how-to-setup-and-configure-static-network-routing-in-rhel/ +[2]:http://www.tecmint.com/firewalld-rules-for-centos-7/ +[3]:http://www.tecmint.com/12-tcpdump-commands-a-network-sniffer-tool/ +[4]:https://fedoraproject.org/wiki/Features/FirewalldRichLanguage \ No newline at end of file From cf65318b5f157da02ce80fade5ce656818407155 Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Sat, 15 Aug 2015 16:33:29 +0800 Subject: [PATCH 1734/2517] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=AF=95=E3=80=9120150730=20Howto=20Configure=20Nginx=20as=20R?= =?UTF-8?q?reverse=20Proxy=20or=20Load=20Balancer=20with=20Weave=20and=20D?= =?UTF-8?q?ocker.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... or Load Balancer with Weave and Docker.md | 49 +++++++++---------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md b/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md index f217db9c70..f38acdd874 100644 --- a/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md +++ b/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md @@ -1,24 +1,21 @@ - -Translating by dingdongnigetou - -Howto Configure Nginx as Rreverse Proxy / Load Balancer with Weave and Docker +如何使用Weave以及Docker搭建Nginx反向代理/负载均衡服务器 ================================================================================ -Hi everyone today we'll learnHowto configure Nginx as Rreverse Proxy / Load balancer with Weave and Docker Weave creates a virtual network that connects Docker containers with each other, deploys across multiple hosts and enables their automatic discovery. It allows us to focus on developing our application, rather than our infrastructure. It provides such an awesome environment that the applications uses the network as if its containers were all plugged into the same network without need to configure ports, mappings, link, etc. The services of the application containers on the network can be easily accessible to the external world with no matter where its running. Here, in this tutorial we'll be using weave to quickly and easily deploy nginx web server as a load balancer for a simple php application running in docker containers on multiple nodes in Amazon Web Services. Here, we will be introduced to WeaveDNS, which provides a simple way for containers to find each other using hostname with no changes in codes and tells other containers to connect to those names. +Hi, 今天我们将会学习如何使用如何使用Weave和Docker搭建Nginx反向代理/负载均衡服务器。Weave创建一个虚拟网络将跨主机部署的Docker容器连接在一起并使它们自动暴露给外部世界。它让我们更加专注于应用的开发,而不是基础架构。Weave提供了一个如此棒的环境,仿佛它的所有容器都属于同个网络,不需要端口/映射/连接等的配置。容器中的应用提供的服务在weave网络中可以轻易地被外部世界访问,不论你的容器运行在哪里。在这个教程里我们将会使用weave快速并且轻易地将nginx web服务器部署为一个负载均衡器,反向代理一个运行在Amazon Web Services里面多个节点上的docker容器中的简单php应用。这里我们将会介绍WeaveDNS,它提供一个简单的方式让容器利用主机名找到彼此,不需要改变代码,并且能够告诉其他容器连接到这些主机名。 -Here, in this tutorial, we will use Nginx to load balance requests to a set of containers running Apache. Here are the simple and easy to do steps on using Weave to configure nginx as a load balancer running in ubuntu docker container. +在这篇教程里,我们需要一个运行的容器集合来配置nginx负载均衡服务器。最简单轻松的方法就是使用Weave在ubuntu的docker容器中搭建nginx负载均衡服务器。 -### 1. Settting up AWS Instances ### +### 1. 搭建AWS实例 ### -First of all, we'll need to setup Amazon Web Service Instances so that we can run docker containers with Weave and Ubuntu as Operating System. We will use the [AWS CLI][1] to setup and configure two AWS EC2 instances. Here, in this tutorial, we'll use the smallest available instances, t1.micro. We will need to have a valid **Amazon Web Services account** with AWS CLI setup and configured. We'll first gonna clone the repository of weave from the github by running the following command in AWS CLI. +首先,我们需要搭建Amzaon Web Service实例,这样才能在ubuntu下用weave跑docker容器。我们将会使用[AWS CLI][1]来搭建和配置两个AWS EC2实例。在这里,我们使用最小的有效实例,t1.micro。我们需要一个有效的**Amazon Web Services账户**用以AWS命令行界面的搭建和配置。我们先在AWS命令行界面下使用下面的命令将github上的weave仓库克隆下来。 $ git clone http://github.com/fintanr/weave-gs $ cd weave-gs/aws-nginx-ubuntu-simple -After cloning the repository, we wanna run the script that will deploy two instances of t1.micro instance running Weave and Docker in Ubuntu Operating System. +在克隆完仓库之后,我们执行下面的脚本,这个脚本将会部署两个t1.micro实例,每个实例中都是ubuntu作为操作系统并用weave跑着docker容器。 $ sudo ./demo-aws-setup.sh -Here, for this tutorial we'll need the IP addresses of these instances further in future. These are stored in an environment file weavedemo.env which is created during the execution of the demo-aws-setup.sh. To get those ip addresses, we need to run the following command which will give the output similar to the output below. +在这里,我们将会在以后用到这些实例的IP地址。这些地址储存在一个weavedemo.env文件中,这个文件在执行demo-aws-setup.sh脚本的期间被创建。为了获取这些IP地址,我们需要执行下面的命令,命令输出类似下面的信息。 $ cat weavedemo.env @@ -27,56 +24,56 @@ Here, for this tutorial we'll need the IP addresses of these instances further i export WEAVE_AWS_DEMO_HOSTCOUNT=2 export WEAVE_AWS_DEMO_HOSTS=(52.26.175.175 52.26.83.141) -Please note these are not the IP addresses for our tutorial, AWS dynamically allocate IP addresses to our instances. +请注意这些不是固定的IP地址,AWS会为我们的实例动态地分配IP地址。 -As were are using a bash, we will just source this file and execute it using the command below. +我们在bash下执行下面的命令使环境变量生效。 . ./weavedemo.env -### 2. Launching Weave and WeaveDNS ### +### 2. 启动Weave and WeaveDNS ### -After deploying the instances, we'll want to launch weave and weavedns on each hosts. Weave and weavedns allows us to easily deploy our containers to a new infrastructure and configuration without the need of changing the codes and without the need to understand concepts such as ambassador containers and links. Here are the commands to launch them in the first host. +在安装完实例之后,我们将会在每台主机上启动weave以及weavedns。Weave以及weavedns使得我们能够轻易地将容器部署到一个全新的基础架构以及配置中, 不需要改变代码,也不需要去理解像Ambassador容器以及Link机制之类的概念。下面是在第一台主机上启动weave以及weavedns的命令。 ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 $ sudo weave launch $ sudo weave launch-dns 10.2.1.1/24 -Next, we'll also wanna launch them in our second host. +下一步,我也准备在第二台主机上启动weave以及weavedns。 ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 $ sudo weave launch $WEAVE_AWS_DEMO_HOST1 $ sudo weave launch-dns 10.2.1.2/24 -### 3. Launching Application Containers ### +### 3. 启动应用容器 ### -Now, we wanna launch six containers across our two hosts running an Apache2 Web Server instance with our simple php site. So, we'll be running the following commands which will run 3 containers running Apache2 Web Server on our 1st instance. +现在,我们准备跨两台主机启动六个容器,这两台主机都用Apache2 Web服务实例跑着简单的php网站。为了在第一个Apache2 Web服务器实例跑三个容器, 我们将会使用下面的命令。 ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 $ sudo weave run --with-dns 10.3.1.1/24 -h ws1.weave.local fintanr/weave-gs-nginx-apache $ sudo weave run --with-dns 10.3.1.2/24 -h ws2.weave.local fintanr/weave-gs-nginx-apache $ sudo weave run --with-dns 10.3.1.3/24 -h ws3.weave.local fintanr/weave-gs-nginx-apache -After that, we'll again launch 3 containers running apache2 web server in our 2nd instance as shown below. +在那之后,我们将会在第二个实例上启动另外三个容器,请使用下面的命令。 ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 $ sudo weave run --with-dns 10.3.1.4/24 -h ws4.weave.local fintanr/weave-gs-nginx-apache $ sudo weave run --with-dns 10.3.1.5/24 -h ws5.weave.local fintanr/weave-gs-nginx-apache $ sudo weave run --with-dns 10.3.1.6/24 -h ws6.weave.local fintanr/weave-gs-nginx-apache -Note: Here, --with-dns option tells the container to use weavedns to resolve names and -h x.weave.local allows the host to be resolvable with WeaveDNS. +注意: 在这里,--with-dns选项告诉容器使用weavedns来解析主机名,-h x.weave.local则使得weavedns能够解析指定主机。 -### 4. Launching Nginx Container ### +### 4. 启动Nginx容器 ### -After our application containers are running well as expected, we'll wanna launch an nginx container which contains the nginx configuration which will round-robin across the severs for the reverse proxy or load balancing. To run the nginx container, we'll need to run the following command. +在应用容器运行得有如意料中的稳定之后,我们将会启动nginx容器,它将会在六个应用容器服务之间轮询并提供反向代理或者负载均衡。 为了启动nginx容器,请使用下面的命令。 ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 $ sudo weave run --with-dns 10.3.1.7/24 -ti -h nginx.weave.local -d -p 80:80 fintanr/weave-gs-nginx-simple -Hence, our Nginx container is publicly exposed as a http server on $WEAVE_AWS_DEMO_HOST1. +因此,我们的nginx容器在$WEAVE_AWS_DEMO_HOST1上公开地暴露成为一个http服务器。 -### 5. Testing the Load Balancer ### +### 5. 测试负载均衡服务器 ### -To test our load balancer is working or not, we'll run a script that will make http requests to our nginx container. We'll make six requests so that we can see nginx moving through each of the webservers in round-robin turn. +为了测试我们的负载均衡服务器是否可以工作,我们执行一段可以发送http请求给nginx容器的脚本。我们将会发送6个请求,这样我们就能看到nginx在一次的轮询中服务于每台web服务器之间。 $ ./access-aws-hosts.sh @@ -113,14 +110,14 @@ To test our load balancer is working or not, we'll run a script that will make h ### Conclusion ### -Finally, we've successfully configured nginx as a reverse proxy or load balancer with weave and docker running ubuntu server in AWS (Amazon Web Service) EC2 . From the above output in above step, it is clear that we have configured it correctly. We can see that the request is being sent to 6 application containers in round-robin turn which is running a PHP app hosted in apache web server. Here, weave and weavedns did great work to deploy a containerised PHP application using nginx across multiple hosts on AWS EC2 without need to change in codes and connected the containers to eachother with the hostname using weavedns. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) +我们最终成功地将nginx配置成一个反向代理/负载均衡服务器,通过使用weave以及运行在AWS(Amazon Web Service)EC2之中的ubuntu服务器里面的docker。从上面的步骤输出可以清楚的看到我们已经成功地配置了nginx。我们可以看到请求在一次循环中被发送到6个应用容器,这些容器在Apache2 Web服务器中跑着PHP应用。在这里,我们部署了一个容器化的PHP应用,使用nginx横跨多台在AWS EC2上的主机而不需要改变代码,利用weavedns使得每个容器连接在一起,只需要主机名就够了,眼前的这些便捷, 都要归功于weave以及weavedns。 如果你有任何的问题、建议、反馈,请在评论中注明,这样我们才能够做得更好,谢谢:-) -------------------------------------------------------------------------------- via: http://linoxide.com/linux-how-to/nginx-load-balancer-weave-docker/ 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[dingdongnigetou](https://github.com/dingdongnigetou) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From a7ac6a469b2bd157ce10739bc1cf2a4162a48b36 Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Sat, 15 Aug 2015 16:34:48 +0800 Subject: [PATCH 1735/2517] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=AF=95=E3=80=9120150730=20Howto=20Configure=20Nginx=20as=20R?= =?UTF-8?q?reverse=20Proxy=20or=20Load=20Balancer=20with=20Weave=20and=20D?= =?UTF-8?q?ocker.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... as Rreverse Proxy or Load Balancer with Weave and Docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md b/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md index f38acdd874..f90a1ce76d 100644 --- a/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md +++ b/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md @@ -108,7 +108,7 @@ Hi, 今天我们将会学习如何使用如何使用Weave和Docker搭建Nginx反 "date" : "2015-06-26 12:24:23" } -### Conclusion ### +### 结束语 ### 我们最终成功地将nginx配置成一个反向代理/负载均衡服务器,通过使用weave以及运行在AWS(Amazon Web Service)EC2之中的ubuntu服务器里面的docker。从上面的步骤输出可以清楚的看到我们已经成功地配置了nginx。我们可以看到请求在一次循环中被发送到6个应用容器,这些容器在Apache2 Web服务器中跑着PHP应用。在这里,我们部署了一个容器化的PHP应用,使用nginx横跨多台在AWS EC2上的主机而不需要改变代码,利用weavedns使得每个容器连接在一起,只需要主机名就够了,眼前的这些便捷, 都要归功于weave以及weavedns。 如果你有任何的问题、建议、反馈,请在评论中注明,这样我们才能够做得更好,谢谢:-) From 9a3838add4034cdec57f4a73c89d1506795a5b8e Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Sat, 15 Aug 2015 16:39:06 +0800 Subject: [PATCH 1736/2517] Create 20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md --- ... or Load Balancer with Weave and Docker.md | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 translated/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md diff --git a/translated/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md b/translated/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md new file mode 100644 index 0000000000..f90a1ce76d --- /dev/null +++ b/translated/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md @@ -0,0 +1,126 @@ +如何使用Weave以及Docker搭建Nginx反向代理/负载均衡服务器 +================================================================================ +Hi, 今天我们将会学习如何使用如何使用Weave和Docker搭建Nginx反向代理/负载均衡服务器。Weave创建一个虚拟网络将跨主机部署的Docker容器连接在一起并使它们自动暴露给外部世界。它让我们更加专注于应用的开发,而不是基础架构。Weave提供了一个如此棒的环境,仿佛它的所有容器都属于同个网络,不需要端口/映射/连接等的配置。容器中的应用提供的服务在weave网络中可以轻易地被外部世界访问,不论你的容器运行在哪里。在这个教程里我们将会使用weave快速并且轻易地将nginx web服务器部署为一个负载均衡器,反向代理一个运行在Amazon Web Services里面多个节点上的docker容器中的简单php应用。这里我们将会介绍WeaveDNS,它提供一个简单的方式让容器利用主机名找到彼此,不需要改变代码,并且能够告诉其他容器连接到这些主机名。 + +在这篇教程里,我们需要一个运行的容器集合来配置nginx负载均衡服务器。最简单轻松的方法就是使用Weave在ubuntu的docker容器中搭建nginx负载均衡服务器。 + +### 1. 搭建AWS实例 ### + +首先,我们需要搭建Amzaon Web Service实例,这样才能在ubuntu下用weave跑docker容器。我们将会使用[AWS CLI][1]来搭建和配置两个AWS EC2实例。在这里,我们使用最小的有效实例,t1.micro。我们需要一个有效的**Amazon Web Services账户**用以AWS命令行界面的搭建和配置。我们先在AWS命令行界面下使用下面的命令将github上的weave仓库克隆下来。 + + $ git clone http://github.com/fintanr/weave-gs + $ cd weave-gs/aws-nginx-ubuntu-simple + +在克隆完仓库之后,我们执行下面的脚本,这个脚本将会部署两个t1.micro实例,每个实例中都是ubuntu作为操作系统并用weave跑着docker容器。 + + $ sudo ./demo-aws-setup.sh + +在这里,我们将会在以后用到这些实例的IP地址。这些地址储存在一个weavedemo.env文件中,这个文件在执行demo-aws-setup.sh脚本的期间被创建。为了获取这些IP地址,我们需要执行下面的命令,命令输出类似下面的信息。 + + $ cat weavedemo.env + + export WEAVE_AWS_DEMO_HOST1=52.26.175.175 + export WEAVE_AWS_DEMO_HOST2=52.26.83.141 + export WEAVE_AWS_DEMO_HOSTCOUNT=2 + export WEAVE_AWS_DEMO_HOSTS=(52.26.175.175 52.26.83.141) + +请注意这些不是固定的IP地址,AWS会为我们的实例动态地分配IP地址。 + +我们在bash下执行下面的命令使环境变量生效。 + + . ./weavedemo.env + +### 2. 启动Weave and WeaveDNS ### + +在安装完实例之后,我们将会在每台主机上启动weave以及weavedns。Weave以及weavedns使得我们能够轻易地将容器部署到一个全新的基础架构以及配置中, 不需要改变代码,也不需要去理解像Ambassador容器以及Link机制之类的概念。下面是在第一台主机上启动weave以及weavedns的命令。 + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 + $ sudo weave launch + $ sudo weave launch-dns 10.2.1.1/24 + +下一步,我也准备在第二台主机上启动weave以及weavedns。 + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 + $ sudo weave launch $WEAVE_AWS_DEMO_HOST1 + $ sudo weave launch-dns 10.2.1.2/24 + +### 3. 启动应用容器 ### + +现在,我们准备跨两台主机启动六个容器,这两台主机都用Apache2 Web服务实例跑着简单的php网站。为了在第一个Apache2 Web服务器实例跑三个容器, 我们将会使用下面的命令。 + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 + $ sudo weave run --with-dns 10.3.1.1/24 -h ws1.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.2/24 -h ws2.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.3/24 -h ws3.weave.local fintanr/weave-gs-nginx-apache + +在那之后,我们将会在第二个实例上启动另外三个容器,请使用下面的命令。 + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 + $ sudo weave run --with-dns 10.3.1.4/24 -h ws4.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.5/24 -h ws5.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.6/24 -h ws6.weave.local fintanr/weave-gs-nginx-apache + +注意: 在这里,--with-dns选项告诉容器使用weavedns来解析主机名,-h x.weave.local则使得weavedns能够解析指定主机。 + +### 4. 启动Nginx容器 ### + +在应用容器运行得有如意料中的稳定之后,我们将会启动nginx容器,它将会在六个应用容器服务之间轮询并提供反向代理或者负载均衡。 为了启动nginx容器,请使用下面的命令。 + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 + $ sudo weave run --with-dns 10.3.1.7/24 -ti -h nginx.weave.local -d -p 80:80 fintanr/weave-gs-nginx-simple + +因此,我们的nginx容器在$WEAVE_AWS_DEMO_HOST1上公开地暴露成为一个http服务器。 + +### 5. 测试负载均衡服务器 ### + +为了测试我们的负载均衡服务器是否可以工作,我们执行一段可以发送http请求给nginx容器的脚本。我们将会发送6个请求,这样我们就能看到nginx在一次的轮询中服务于每台web服务器之间。 + + $ ./access-aws-hosts.sh + + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws1.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws2.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws3.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws4.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws5.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws6.weave.local", + "date" : "2015-06-26 12:24:23" + } + +### 结束语 ### + +我们最终成功地将nginx配置成一个反向代理/负载均衡服务器,通过使用weave以及运行在AWS(Amazon Web Service)EC2之中的ubuntu服务器里面的docker。从上面的步骤输出可以清楚的看到我们已经成功地配置了nginx。我们可以看到请求在一次循环中被发送到6个应用容器,这些容器在Apache2 Web服务器中跑着PHP应用。在这里,我们部署了一个容器化的PHP应用,使用nginx横跨多台在AWS EC2上的主机而不需要改变代码,利用weavedns使得每个容器连接在一起,只需要主机名就够了,眼前的这些便捷, 都要归功于weave以及weavedns。 如果你有任何的问题、建议、反馈,请在评论中注明,这样我们才能够做得更好,谢谢:-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/nginx-load-balancer-weave-docker/ + +作者:[Arun Pyasi][a] +译者:[dingdongnigetou](https://github.com/dingdongnigetou) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://console.aws.amazon.com/ From b95ff897f01ac5378675bbbe5a390d395c7db16e Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Sat, 15 Aug 2015 16:39:26 +0800 Subject: [PATCH 1737/2517] Delete 20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md --- ... or Load Balancer with Weave and Docker.md | 126 ------------------ 1 file changed, 126 deletions(-) delete mode 100644 sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md diff --git a/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md b/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md deleted file mode 100644 index f90a1ce76d..0000000000 --- a/sources/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md +++ /dev/null @@ -1,126 +0,0 @@ -如何使用Weave以及Docker搭建Nginx反向代理/负载均衡服务器 -================================================================================ -Hi, 今天我们将会学习如何使用如何使用Weave和Docker搭建Nginx反向代理/负载均衡服务器。Weave创建一个虚拟网络将跨主机部署的Docker容器连接在一起并使它们自动暴露给外部世界。它让我们更加专注于应用的开发,而不是基础架构。Weave提供了一个如此棒的环境,仿佛它的所有容器都属于同个网络,不需要端口/映射/连接等的配置。容器中的应用提供的服务在weave网络中可以轻易地被外部世界访问,不论你的容器运行在哪里。在这个教程里我们将会使用weave快速并且轻易地将nginx web服务器部署为一个负载均衡器,反向代理一个运行在Amazon Web Services里面多个节点上的docker容器中的简单php应用。这里我们将会介绍WeaveDNS,它提供一个简单的方式让容器利用主机名找到彼此,不需要改变代码,并且能够告诉其他容器连接到这些主机名。 - -在这篇教程里,我们需要一个运行的容器集合来配置nginx负载均衡服务器。最简单轻松的方法就是使用Weave在ubuntu的docker容器中搭建nginx负载均衡服务器。 - -### 1. 搭建AWS实例 ### - -首先,我们需要搭建Amzaon Web Service实例,这样才能在ubuntu下用weave跑docker容器。我们将会使用[AWS CLI][1]来搭建和配置两个AWS EC2实例。在这里,我们使用最小的有效实例,t1.micro。我们需要一个有效的**Amazon Web Services账户**用以AWS命令行界面的搭建和配置。我们先在AWS命令行界面下使用下面的命令将github上的weave仓库克隆下来。 - - $ git clone http://github.com/fintanr/weave-gs - $ cd weave-gs/aws-nginx-ubuntu-simple - -在克隆完仓库之后,我们执行下面的脚本,这个脚本将会部署两个t1.micro实例,每个实例中都是ubuntu作为操作系统并用weave跑着docker容器。 - - $ sudo ./demo-aws-setup.sh - -在这里,我们将会在以后用到这些实例的IP地址。这些地址储存在一个weavedemo.env文件中,这个文件在执行demo-aws-setup.sh脚本的期间被创建。为了获取这些IP地址,我们需要执行下面的命令,命令输出类似下面的信息。 - - $ cat weavedemo.env - - export WEAVE_AWS_DEMO_HOST1=52.26.175.175 - export WEAVE_AWS_DEMO_HOST2=52.26.83.141 - export WEAVE_AWS_DEMO_HOSTCOUNT=2 - export WEAVE_AWS_DEMO_HOSTS=(52.26.175.175 52.26.83.141) - -请注意这些不是固定的IP地址,AWS会为我们的实例动态地分配IP地址。 - -我们在bash下执行下面的命令使环境变量生效。 - - . ./weavedemo.env - -### 2. 启动Weave and WeaveDNS ### - -在安装完实例之后,我们将会在每台主机上启动weave以及weavedns。Weave以及weavedns使得我们能够轻易地将容器部署到一个全新的基础架构以及配置中, 不需要改变代码,也不需要去理解像Ambassador容器以及Link机制之类的概念。下面是在第一台主机上启动weave以及weavedns的命令。 - - ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 - $ sudo weave launch - $ sudo weave launch-dns 10.2.1.1/24 - -下一步,我也准备在第二台主机上启动weave以及weavedns。 - - ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 - $ sudo weave launch $WEAVE_AWS_DEMO_HOST1 - $ sudo weave launch-dns 10.2.1.2/24 - -### 3. 启动应用容器 ### - -现在,我们准备跨两台主机启动六个容器,这两台主机都用Apache2 Web服务实例跑着简单的php网站。为了在第一个Apache2 Web服务器实例跑三个容器, 我们将会使用下面的命令。 - - ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 - $ sudo weave run --with-dns 10.3.1.1/24 -h ws1.weave.local fintanr/weave-gs-nginx-apache - $ sudo weave run --with-dns 10.3.1.2/24 -h ws2.weave.local fintanr/weave-gs-nginx-apache - $ sudo weave run --with-dns 10.3.1.3/24 -h ws3.weave.local fintanr/weave-gs-nginx-apache - -在那之后,我们将会在第二个实例上启动另外三个容器,请使用下面的命令。 - - ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 - $ sudo weave run --with-dns 10.3.1.4/24 -h ws4.weave.local fintanr/weave-gs-nginx-apache - $ sudo weave run --with-dns 10.3.1.5/24 -h ws5.weave.local fintanr/weave-gs-nginx-apache - $ sudo weave run --with-dns 10.3.1.6/24 -h ws6.weave.local fintanr/weave-gs-nginx-apache - -注意: 在这里,--with-dns选项告诉容器使用weavedns来解析主机名,-h x.weave.local则使得weavedns能够解析指定主机。 - -### 4. 启动Nginx容器 ### - -在应用容器运行得有如意料中的稳定之后,我们将会启动nginx容器,它将会在六个应用容器服务之间轮询并提供反向代理或者负载均衡。 为了启动nginx容器,请使用下面的命令。 - - ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 - $ sudo weave run --with-dns 10.3.1.7/24 -ti -h nginx.weave.local -d -p 80:80 fintanr/weave-gs-nginx-simple - -因此,我们的nginx容器在$WEAVE_AWS_DEMO_HOST1上公开地暴露成为一个http服务器。 - -### 5. 测试负载均衡服务器 ### - -为了测试我们的负载均衡服务器是否可以工作,我们执行一段可以发送http请求给nginx容器的脚本。我们将会发送6个请求,这样我们就能看到nginx在一次的轮询中服务于每台web服务器之间。 - - $ ./access-aws-hosts.sh - - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws1.weave.local", - "date" : "2015-06-26 12:24:23" - } - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws2.weave.local", - "date" : "2015-06-26 12:24:23" - } - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws3.weave.local", - "date" : "2015-06-26 12:24:23" - } - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws4.weave.local", - "date" : "2015-06-26 12:24:23" - } - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws5.weave.local", - "date" : "2015-06-26 12:24:23" - } - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws6.weave.local", - "date" : "2015-06-26 12:24:23" - } - -### 结束语 ### - -我们最终成功地将nginx配置成一个反向代理/负载均衡服务器,通过使用weave以及运行在AWS(Amazon Web Service)EC2之中的ubuntu服务器里面的docker。从上面的步骤输出可以清楚的看到我们已经成功地配置了nginx。我们可以看到请求在一次循环中被发送到6个应用容器,这些容器在Apache2 Web服务器中跑着PHP应用。在这里,我们部署了一个容器化的PHP应用,使用nginx横跨多台在AWS EC2上的主机而不需要改变代码,利用weavedns使得每个容器连接在一起,只需要主机名就够了,眼前的这些便捷, 都要归功于weave以及weavedns。 如果你有任何的问题、建议、反馈,请在评论中注明,这样我们才能够做得更好,谢谢:-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/nginx-load-balancer-weave-docker/ - -作者:[Arun Pyasi][a] -译者:[dingdongnigetou](https://github.com/dingdongnigetou) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://console.aws.amazon.com/ From db0e5a7401554ce7ab4b6e0baa04d17242cee1a2 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 15 Aug 2015 17:12:33 +0800 Subject: [PATCH 1738/2517] [Translated]RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md --- ...Boot Shutdown and Everything in Between.md | 218 ------------------ ...Boot Shutdown and Everything in Between.md | 214 +++++++++++++++++ 2 files changed, 214 insertions(+), 218 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md b/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md deleted file mode 100644 index 23bf9f0ac1..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md +++ /dev/null @@ -1,218 +0,0 @@ -FSSlc translating - -RHCSA Series: Process Management in RHEL 7: Boot, Shutdown, and Everything in Between – Part 5 -================================================================================ -We will start this article with an overall and brief revision of what happens since the moment you press the Power button to turn on your RHEL 7 server until you are presented with the login screen in a command line interface. - -![RHEL 7 Boot Process](http://www.tecmint.com/wp-content/uploads/2015/03/RHEL-7-Boot-Process.png) - -Linux Boot Process - -**Please note that:** - -1. the same basic principles apply, with perhaps minor modifications, to other Linux distributions as well, and -2. the following description is not intended to represent an exhaustive explanation of the boot process, but only the fundamentals. - -### Linux Boot Process ### - -1. The POST (Power On Self Test) initializes and performs hardware checks. - -2. When the POST finishes, the system control is passed to the first stage boot loader, which is stored on either the boot sector of one of the hard disks (for older systems using BIOS and MBR), or a dedicated (U)EFI partition. - -3. The first stage boot loader then loads the second stage boot loader, most usually GRUB (GRand Unified Boot Loader), which resides inside /boot, which in turn loads the kernel and the initial RAM–based file system (also known as initramfs, which contains programs and binary files that perform the necessary actions needed to ultimately mount the actual root filesystem). - -4. We are presented with a splash screen that allows us to choose an operating system and kernel to boot: - -![RHEL 7 Boot Screen](http://www.tecmint.com/wp-content/uploads/2015/03/RHEL-7-Boot-Screen.png) - -Boot Menu Screen - -5. The kernel sets up the hardware attached to the system and once the root filesystem has been mounted, launches process with PID 1, which in turn will initialize other processes and present us with a login prompt. - -Note: That if we wish to do so at a later time, we can examine the specifics of this process using the [dmesg command][1] and filtering its output using the tools that we have explained in previous articles of this series. - -![Login Screen and Process PID](http://www.tecmint.com/wp-content/uploads/2015/03/Login-Screen-Process-PID.png) - -Login Screen and Process PID - -In the example above, we used the well-known ps command to display a list of current processes whose parent process (or in other words, the process that started them) is systemd (the system and service manager that most modern Linux distributions have switched to) during system startup: - - # ps -o ppid,pid,uname,comm --ppid=1 - -Remember that the -o flag (short for –format) allows you to present the output of ps in a customized format to suit your needs using the keywords specified in the STANDARD FORMAT SPECIFIERS section in man ps. - -Another case in which you will want to define the output of ps instead of going with the default is when you need to find processes that are causing a significant CPU and / or memory load, and sort them accordingly: - - # ps aux --sort=+pcpu # Sort by %CPU (ascending) - # ps aux --sort=-pcpu # Sort by %CPU (descending) - # ps aux --sort=+pmem # Sort by %MEM (ascending) - # ps aux --sort=-pmem # Sort by %MEM (descending) - # ps aux --sort=+pcpu,-pmem # Combine sort by %CPU (ascending) and %MEM (descending) - -![http://www.tecmint.com/wp-content/uploads/2015/03/ps-command-output.png](http://www.tecmint.com/wp-content/uploads/2015/03/ps-command-output.png) - -Customize ps Command Output - -### An Introduction to SystemD ### - -Few decisions in the Linux world have caused more controversies than the adoption of systemd by major Linux distributions. Systemd’s advocates name as its main advantages the following facts: - -Read Also: [The Story Behind ‘init’ and ‘systemd’][2] - -1. Systemd allows more processing to be done in parallel during system startup (as opposed to older SysVinit, which always tends to be slower because it starts processes one by one, checks if one depends on another, and then waits for daemons to launch so more services can start), and - -2. It works as a dynamic resource management in a running system. Thus, services are started when needed (to avoid consuming system resources if they are not being used) instead of being launched without a valid reason during boot. - -3. Backwards compatibility with SysVinit scripts. - -Systemd is controlled by the systemctl utility. If you come from a SysVinit background, chances are you will be familiar with: - -- the service tool, which -in those older systems- was used to manage SysVinit scripts, and -- the chkconfig utility, which served the purpose of updating and querying runlevel information for system services. -- shutdown, which you must have used several times to either restart or halt a running system. - -The following table shows the similarities between the use of these legacy tools and systemctl: - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Legacy toolSystemctl equivalentDescription
service name startsystemctl start nameStart name (where name is a service)
service name stopsystemctl stop nameStop name
service name condrestartsystemctl try-restart nameRestarts name (if it’s already running)
service name restartsystemctl restart nameRestarts name
service name reloadsystemctl reload nameReloads the configuration for name
service name statussystemctl status nameDisplays the current status of name
service –status-allsystemctlDisplays the status of all current services
chkconfig name onsystemctl enable nameEnable name to run on startup as specified in the unit file (the file to which the symlink points). The process of enabling or disabling a service to start automatically on boot consists in adding or removing symbolic links inside the /etc/systemd/system directory.
chkconfig name offsystemctl disable nameDisables name to run on startup as specified in the unit file (the file to which the symlink points)
chkconfig –list namesystemctl is-enabled nameVerify whether name (a specific service) is currently enabled
chkconfig –listsystemctl –type=serviceDisplays all services and tells whether they are enabled or disabled
shutdown -h nowsystemctl poweroffPower-off the machine (halt)
shutdown -r nowsystemctl rebootReboot the system
- -Systemd also introduced the concepts of units (which can be either a service, a mount point, a device, or a network socket) and targets (which is how systemd manages to start several related process at the same time, and can be considered -though not equal- as the equivalent of runlevels in SysVinit-based systems. - -### Summing Up ### - -Other tasks related with process management include, but may not be limited to, the ability to: - -**1. Adjust the execution priority as far as the use of system resources is concerned of a process:** - -This is accomplished through the renice utility, which alters the scheduling priority of one or more running processes. In simple terms, the scheduling priority is a feature that allows the kernel (present in versions => 2.6) to allocate system resources as per the assigned execution priority (aka niceness, in a range from -20 through 19) of a given process. - -The basic syntax of renice is as follows: - - # renice [-n] priority [-gpu] identifier - -In the generic command above, the first argument is the priority value to be used, whereas the other argument can be interpreted as process IDs (which is the default setting), process group IDs, user IDs, or user names. A normal user (other than root) can only modify the scheduling priority of a process he or she owns, and only increase the niceness level (which means taking up less system resources). - -![Renice Process in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Process-Scheduling-Priority.png) - -Process Scheduling Priority - -**2. Kill (or interrupt the normal execution) of a process as needed:** - -In more precise terms, killing a process entitles sending it a signal to either finish its execution gracefully (SIGTERM=15) or immediately (SIGKILL=9) through the [kill or pkill commands][3]. - -The difference between these two tools is that the former is used to terminate a specific process or a process group altogether, while the latter allows you to do the same based on name and other attributes. - -In addition, pkill comes bundled with pgrep, which shows you the PIDs that will be affected should pkill be used. For example, before running: - - # pkill -u gacanepa - -It may be useful to view at a glance which are the PIDs owned by gacanepa: - - # pgrep -l -u gacanepa - -![Find PIDs of User](http://www.tecmint.com/wp-content/uploads/2015/03/Find-PIDs-of-User.png) - -Find PIDs of User - -By default, both kill and pkill send the SIGTERM signal to the process. As we mentioned above, this signal can be ignored (while the process finishes its execution or for good), so when you seriously need to stop a running process with a valid reason, you will need to specify the SIGKILL signal on the command line: - - # kill -9 identifier # Kill a process or a process group - # kill -s SIGNAL identifier # Idem - # pkill -s SIGNAL identifier # Kill a process by name or other attributes - -### Conclusion ### - -In this article we have explained the basics of the boot process in a RHEL 7 system, and analyzed some of the tools that are available to help you with managing processes using common utilities and systemd-specific commands. - -Note that this list is not intended to cover all the bells and whistles of this topic, so feel free to add your own preferred tools and commands to this article using the comment form below. Questions and other comments are also welcome. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-exam-boot-process-and-process-management/ - -作者:[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/dmesg-commands/ -[2]:http://www.tecmint.com/systemd-replaces-init-in-linux/ -[3]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ diff --git a/translated/tech/RHCSA/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md b/translated/tech/RHCSA/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md new file mode 100644 index 0000000000..91e2482e49 --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md @@ -0,0 +1,214 @@ +RHECSA 系列:RHEL7 中的进程管理:开机,关机,以及两者之间的所有其他事项 – Part 5 +================================================================================ +我们将概括和简要地复习从你按开机按钮来打开你的 RHEL 7 服务器到呈现出命令行界面的登录屏幕之间所发生的所有事情,以此来作为这篇文章的开始。 + +![RHEL 7 开机过程](http://www.tecmint.com/wp-content/uploads/2015/03/RHEL-7-Boot-Process.png) + +Linux 开机过程 + +**请注意:** + +1. 相同的基本原则也可以应用到其他的 Linux 发行版本中,但可能需要较小的更改,并且 +2. 下面的描述并不是旨在给出开机过程的一个详尽的解释,而只是介绍一些基础的东西 + +### Linux 开机过程 ### + +1.初始化 POST(加电自检)并执行硬件检查; + +2.当 POST 完成后,系统的控制权将移交给启动管理器的第一阶段,它存储在一个硬盘的引导扇区(对于使用 BIOS 和 MBR 的旧式的系统)或存储在一个专门的 (U)EFI 分区上。 + +3.启动管理器的第一阶段完成后,接着进入启动管理器的第二阶段,通常大多数使用的是 GRUB(GRand Unified Boot Loader 的简称),它驻留在 `/boot` 中,反过来加载内核和驻留在 RAM 中的初始化文件系统(被称为 initramfs,它包含执行必要操作所需要的程序和二进制文件,以此来最终挂载真实的根文件系统)。 + +4.接着经历了闪屏过后,呈现在我们眼前的是类似下图的画面,它允许我们选择一个操作系统和内核来启动: + +![RHEL 7 开机屏幕](http://www.tecmint.com/wp-content/uploads/2015/03/RHEL-7-Boot-Screen.png) + +启动菜单屏幕 + +5.然后内核对挂载到系统的硬件进行设置,一旦根文件系统被挂载,接着便启动 PID 为 1 的进程,反过来这个进程将初始化其他的进程并最终呈现给我们一个登录提示符界面。 + +注意:假如我们想在后面这样做(注:这句话我总感觉不通顺,不明白它的意思,希望改一下),我们可以使用 [dmesg 命令][1](注:这篇文章已经翻译并发表了,链接是 https://linux.cn/article-3587-1.html )并使用这个系列里的上一篇文章中解释过的工具(注:即 grep)来过滤它的输出。 + +![登录屏幕和进程的 PID](http://www.tecmint.com/wp-content/uploads/2015/03/Login-Screen-Process-PID.png) + +登录屏幕和进程的 PID + +在上面的例子中,我们使用了众所周知的 `ps` 命令来显示在系统启动过程中的一系列当前进程的信息,它们的父进程(或者换句话说,就是那个开启这些进程的进程) 为 systemd(大多数现代的 Linux 发行版本已经切换到的系统和服务管理器): + + # ps -o ppid,pid,uname,comm --ppid=1 + +记住 `-o`(为 -format 的简写)选项允许你以一个自定义的格式来显示 ps 的输出,以此来满足你的需求;这个自定义格式使用 man ps 里 STANDARD FORMAT SPECIFIERS 一节中的特定关键词。 + +另一个你想自定义 ps 的输出而不是使用其默认输出的情形是:当你需要找到引起 CPU 或内存消耗过多的那些进程,并按照下列方式来对它们进行排序时: + + # ps aux --sort=+pcpu # 以 %CPU 来排序(增序) + # ps aux --sort=-pcpu # 以 %CPU 来排序(降序) + # ps aux --sort=+pmem # 以 %MEM 来排序(增序) + # ps aux --sort=-pmem # 以 %MEM 来排序(降序) + # ps aux --sort=+pcpu,-pmem # 结合 %CPU (增序) 和 %MEM (降序)来排列 + +![http://www.tecmint.com/wp-content/uploads/2015/03/ps-command-output.png](http://www.tecmint.com/wp-content/uploads/2015/03/ps-command-output.png) + +自定义 ps 命令的输出 + +### systemd 的一个介绍 ### + +在 Linux 世界中,很少有决定能够比在主流的 Linux 发行版本中采用 systemd 引起更多的争论。systemd 的倡导者根据以下事实命名其主要的优势: + +另外请阅读: ['init' 和 'systemd' 背后的故事][2] + +1. 在系统启动期间,systemd 允许并发地启动更多的进程(相比于先前的 SysVinit,SysVinit 似乎总是表现得更慢,因为它一个接一个地启动进程,检查一个进程是否依赖于另一个进程,然后等待守护进程去开启可以开始的更多的服务),并且 +2. 在一个运行着的系统中,它作为一个动态的资源管理器来工作。这样在开机期间,当一个服务被需要时,才启动它(以此来避免消耗系统资源)而不是在没有一个合理的原因的情况下启动额外的服务。 +3. 向后兼容 sysvinit 的脚本。 + +systemd 由 systemctl 工具控制,假如你带有 SysVinit 背景,你将会对以下的内容感到熟悉: + +- service 工具, 在旧一点的系统中,它被用来管理 SysVinit 脚本,以及 +- chkconfig 工具, 为系统服务升级和查询运行级别信息 +- shutdown, 你一定使用过几次来重启或关闭一个运行的系统。 + +下面的表格展示了使用传统的工具和 systemctl 之间的相似之处: + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Legacy toolSystemctl equivalentDescription
service name startsystemctl start nameStart name (where name is a service)
service name stopsystemctl stop nameStop name
service name condrestartsystemctl try-restart nameRestarts name (if it’s already running)
service name restartsystemctl restart nameRestarts name
service name reloadsystemctl reload nameReloads the configuration for name
service name statussystemctl status nameDisplays the current status of name
service –status-allsystemctlDisplays the status of all current services
chkconfig name onsystemctl enable nameEnable name to run on startup as specified in the unit file (the file to which the symlink points). The process of enabling or disabling a service to start automatically on boot consists in adding or removing symbolic links inside the /etc/systemd/system directory.
chkconfig name offsystemctl disable nameDisables name to run on startup as specified in the unit file (the file to which the symlink points)
chkconfig –list namesystemctl is-enabled nameVerify whether name (a specific service) is currently enabled
chkconfig –listsystemctl –type=serviceDisplays all services and tells whether they are enabled or disabled
shutdown -h nowsystemctl poweroffPower-off the machine (halt)
shutdown -r nowsystemctl rebootReboot the system
+ +systemd 也引进了单元(它可能是一个服务,一个挂载点,一个设备或者一个网络套接字)和目标(它们定义了 systemd 如何去管理和同时开启几个相关的进程,并可认为它们与在基于 SysVinit 的系统中的运行级别等价,尽管事实上它们并不等价)。 + +### 总结归纳 ### + +其他与进程管理相关,但并不仅限于下面所列的功能的任务有: + +**1. 在考虑到系统资源的使用上,调整一个进程的执行优先级:** + +这是通过 `renice` 工具来完成的,它可以改变一个或多个正在运行着的进程的调度优先级。简单来说,调度优先级是一个允许内核(当前只支持 >= 2.6 的版本)根据某个给定进程被分配的执行优先级(即优先级,从 -20 到 19)来为其分配系统资源的功能。 + +`renice` 的基本语法如下: + + # renice [-n] priority [-gpu] identifier + +在上面的通用命令中,第一个参数是将要使用的优先级数值,而另一个参数可以解释为进程 ID(这是默认的设定),进程组 ID,用户 ID 或者用户名。一个常规的用户(即除 root 以外的用户)只可以更改他或她所拥有的进程的调度优先级,并且只能增加优先级的层次(这意味着占用更少的系统资源)。 + +![在 Linux 中调整进程的优先级](http://www.tecmint.com/wp-content/uploads/2015/03/Process-Scheduling-Priority.png) + +进程调度优先级 + +**2. 按照需要杀死一个进程(或终止其正常执行):** + +更精确地说,杀死一个进程指的是通过 [kill 或 pkill][3]命令给该进程发送一个信号,让它优雅地(SIGTERM=15)或立即(SIGKILL=9)结束它的执行。 + +这两个工具的不同之处在于前一个被用来终止一个特定的进程或一个进程组,而后一个则允许你在进程的名称和其他属性的基础上,执行相同的动作。 + +另外, pkill 与 pgrep 相捆绑,pgrep 提供将受影响的进程的 PID 给 pkill 来使用。例如,在运行下面的命令之前: + + # pkill -u gacanepa + +查看一眼由 gacanepa 所拥有的 PID 或许会带来点帮助: + + # pgrep -l -u gacanepa + +![找到用户拥有的 PID](http://www.tecmint.com/wp-content/uploads/2015/03/Find-PIDs-of-User.png) + +找到用户拥有的 PID + +默认情况下,kill 和 pkiill 都发送 SIGTERM 信号给进程,如我们上面提到的那样,这个信号可以被忽略(即该进程可能会终止其自身的执行或者不终止),所以当你因一个合理的理由要真正地停止一个运行着的进程,则你将需要在命令行中带上特定的 SIGKILL 信号: + + # kill -9 identifier # 杀死一个进程或一个进程组 + # kill -s SIGNAL identifier # 同上 + # pkill -s SIGNAL identifier # 通过名称或其他属性来杀死一个进程 + +### 结论 ### + +在这篇文章中,我们解释了在 RHEL 7 系统中,有关开机启动过程的基本知识,并分析了一些可用的工具来帮助你通过使用一般的程序和 systemd 特有的命令来管理进程。 + +请注意,这个列表并不旨在涵盖有关这个话题的所有花哨的工具,请随意使用下面的评论栏来添加你自已钟爱的工具和命令。同时欢迎你的提问和其他的评论。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-boot-process-and-process-management/ + +作者:[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/dmesg-commands/ +[2]:http://www.tecmint.com/systemd-replaces-init-in-linux/ +[3]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ From 1d98d80fc80ef59545d36b7b4fe98f11ab6b7947 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 15 Aug 2015 17:20:30 +0800 Subject: [PATCH 1739/2517] Update RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...rted' and 'SSM' to Configure and Encrypt System Storage.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md b/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md index 474b707d23..0e631ce37d 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md @@ -1,3 +1,5 @@ +FSSlc translating + RHCSA Series: Using ‘Parted’ and ‘SSM’ to Configure and Encrypt System Storage – Part 6 ================================================================================ In this article we will discuss how to set up and configure local system storage in Red Hat Enterprise Linux 7 using classic tools and introducing the System Storage Manager (also known as SSM), which greatly simplifies this task. @@ -266,4 +268,4 @@ via: http://www.tecmint.com/rhcsa-exam-create-format-resize-delete-and-encrypt-p 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/gacanepa/ -[1]:http://www.tecmint.com/create-lvm-storage-in-linux/ \ No newline at end of file +[1]:http://www.tecmint.com/create-lvm-storage-in-linux/ From 26c93e98c624b0e916b8f6b78fab8ed4c29f062a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 15 Aug 2015 17:53:07 +0800 Subject: [PATCH 1740/2517] [Translated] tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md --- ...m Activity Reports Using Linux Toolsets.md | 183 ------------------ ...m Activity Reports Using Linux Toolsets.md | 182 +++++++++++++++++ 2 files changed, 182 insertions(+), 183 deletions(-) delete mode 100644 sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md create mode 100644 translated/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md diff --git a/sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md b/sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md deleted file mode 100644 index ea0157be4f..0000000000 --- a/sources/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md +++ /dev/null @@ -1,183 +0,0 @@ -Translating by ictlyh -Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets -================================================================================ -As a system engineer, you will often need to produce reports that show the utilization of your system’s resources in order to make sure that: 1) they are being utilized optimally, 2) prevent bottlenecks, and 3) ensure scalability, among other reasons. - -![Monitor Linux Performance Activity Reports](http://www.tecmint.com/wp-content/uploads/2015/08/Monitor-Linux-Performance-Activity-Reports.jpg) - -RHCE: Monitor Linux Performance Activity Reports – Part 3 - -Besides the well-known native Linux tools that are used to check disk, memory, and CPU usage – to name a few examples, Red Hat Enterprise Linux 7 provides two additional toolsets to enhance the data you can collect for your reports: sysstat and dstat. - -In this article we will describe both, but let’s first start by reviewing the usage of the classic tools. - -### Native Linux Tools ### - -With df, you will be able to report disk space and inode usage of by filesystem. You need to monitor both because a lack of space will prevent you from being able to save further files (and may even cause the system to crash), just like running out of inodes will mean you can’t link further files with their corresponding data structures, thus producing the same effect: you won’t be able to save those files to disk. - - # df -h [Display output in human-readable form] - # df -h --total [Produce a grand total] - -![Check Linux Total Disk Usage](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Total-Disk-Usage.png) - -Check Linux Total Disk Usage - - # df -i [Show inode count by filesystem] - # df -i --total [Produce a grand total] - -![Check Linux Total inode Numbers](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Total-inode-Numbers.png) - -Check Linux Total inode Numbers - -With du, you can estimate file space usage by either file, directory, or filesystem. - -For example, let’s see how much space is used by the /home directory, which includes all of the user’s personal files. The first command will return the overall space currently used by the entire /home directory, whereas the second will also display a disaggregated list by sub-directory as well: - - # du -sch /home - # du -sch /home/* - -![Check Linux Directory Disk Size](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Directory-Disk-Size.png) - -Check Linux Directory Disk Size - -Don’t Miss: - -- [12 ‘df’ Command Examples to Check Linux Disk Space Usage][1] -- [10 ‘du’ Command Examples to Find Disk Usage of Files/Directories][2] - -Another utility that can’t be missing from your toolset is vmstat. It will allow you to see at a quick glance information about processes, CPU and memory usage, disk activity, and more. - -If run without arguments, vmstat will return averages since the last reboot. While you may use this form of the command once in a while, it will be more helpful to take a certain amount of system utilization samples, one after another, with a defined time separation between samples. - -For example, - - # vmstat 5 10 - -will return 10 samples taken every 5 seconds: - -![Check Linux System Performance](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Systerm-Performance.png) - -Check Linux System Performance - -As you can see in the above picture, the output of vmstat is divided by columns: procs (processes), memory, swap, io, system, and cpu. The meaning of each field can be found in the FIELD DESCRIPTION sections in the man page of vmstat. - -Where can vmstat come in handy? Let’s examine the behavior of the system before and during a yum update: - - # vmstat -a 1 5 - -![Vmstat Linux Performance Monitoring](http://www.tecmint.com/wp-content/uploads/2015/08/Vmstat-Linux-Peformance-Monitoring.png) - -Vmstat Linux Performance Monitoring - -Please note that as files are being modified on disk, the amount of active memory increases and so does the number of blocks written to disk (bo) and the CPU time that is dedicated to user processes (us). - -Or during the saving process of a large file directly to disk (caused by dsync): - - # vmstat -a 1 5 - # dd if=/dev/zero of=dummy.out bs=1M count=1000 oflag=dsync - -![VmStat Linux Disk Performance Monitoring](http://www.tecmint.com/wp-content/uploads/2015/08/VmStat-Linux-Disk-Performance-Monitoring.png) - -VmStat Linux Disk Performance Monitoring - -In this case, we can see a yet larger number of blocks being written to disk (bo), which was to be expected, but also an increase of the amount of CPU time that it has to wait for I/O operations to complete before processing tasks (wa). - -**Don’t Miss**: [Vmstat – Linux Performance Monitoring][3] - -### Other Linux Tools ### - -As mentioned in the introduction of this chapter, there are other tools that you can use to check the system status and utilization (they are not only provided by Red Hat but also by other major distributions from their officially supported repositories). - -The sysstat package contains the following utilities: - -- sar (collect, report, or save system activity information). -- sadf (display data collected by sar in multiple formats). -- mpstat (report processors related statistics). -- iostat (report CPU statistics and I/O statistics for devices and partitions). -- pidstat (report statistics for Linux tasks). -- nfsiostat (report input/output statistics for NFS). -- cifsiostat (report CIFS statistics) and -- sa1 (collect and store binary data in the system activity daily data file. -- sa2 (write a daily report in the /var/log/sa directory) tools. - -whereas dstat adds some extra features to the functionality provided by those tools, along with more counters and flexibility. You can find an overall description of each tool by running yum info sysstat or yum info dstat, respectively, or checking the individual man pages after installation. - -To install both packages: - - # yum update && yum install sysstat dstat - -The main configuration file for sysstat is /etc/sysconfig/sysstat. You will find the following parameters in that file: - - # How long to keep log files (in days). - # If value is greater than 28, then log files are kept in - # multiple directories, one for each month. - HISTORY=28 - # Compress (using gzip or bzip2) sa and sar files older than (in days): - COMPRESSAFTER=31 - # Parameters for the system activity data collector (see sadc manual page) - # which are used for the generation of log files. - SADC_OPTIONS="-S DISK" - # Compression program to use. - ZIP="bzip2" - -When sysstat is installed, two cron jobs are added and enabled in /etc/cron.d/sysstat. The first job runs the system activity accounting tool every 10 minutes and stores the reports in /var/log/sa/saXX where XX is the day of the month. - -Thus, /var/log/sa/sa05 will contain all the system activity reports from the 5th of the month. This assumes that we are using the default value in the HISTORY variable in the configuration file above: - - */10 * * * * root /usr/lib64/sa/sa1 1 1 - -The second job generates a daily summary of process accounting at 11:53 pm every day and stores it in /var/log/sa/sarXX files, where XX has the same meaning as in the previous example: - - 53 23 * * * root /usr/lib64/sa/sa2 -A - -For example, you may want to output system statistics from 9:30 am through 5:30 pm of the sixth of the month to a .csv file that can easily be viewed using LibreOffice Calc or Microsoft Excel (this approach will also allow you to create charts or graphs): - - # sadf -s 09:30:00 -e 17:30:00 -dh /var/log/sa/sa06 -- | sed 's/;/,/g' > system_stats20150806.csv - -You could alternatively use the -j flag instead of -d in the sadf command above to output the system stats in JSON format, which could be useful if you need to consume the data in a web application, for example. - -![Linux System Statistics](http://www.tecmint.com/wp-content/uploads/2015/08/Linux-System-Statistics.png) - -Linux System Statistics - -Finally, let’s see what dstat has to offer. Please note that if run without arguments, dstat assumes -cdngy by default (short for CPU, disk, network, memory pages, and system stats, respectively), and adds one line every second (execution can be interrupted anytime with Ctrl + C): - - # dstat - -![Linux Disk Statistics Monitoring](http://www.tecmint.com/wp-content/uploads/2015/08/dstat-command.png) - -Linux Disk Statistics Monitoring - -To output the stats to a .csv file, use the –output flag followed by a file name. Let’s see how this looks on LibreOffice Calc: - -![Monitor Linux Statistics Output](http://www.tecmint.com/wp-content/uploads/2015/08/Monitor-Linux-Statistics-Output.png) - -Monitor Linux Statistics Output - -I strongly advise you to check out the man page of dstat, included with this article along with the man page of sysstat in PDF format for your reading convenience. You will find several other options that will help you create custom and detailed system activity reports. - -**Don’t Miss**: [Sysstat – Linux Usage Activity Monitoring Tool][4] - -### Summary ### - -In this guide we have explained how to use both native Linux tools and specific utilities provided with RHEL 7 in order to produce reports on system utilization. At one point or another, you will come to rely on these reports as best friends. - -You will probably have used other tools that we have not covered in this tutorial. If so, feel free to share them with the rest of the community along with any other suggestions / questions / comments that you may have- using the form below. - -We look forward to hearing from you. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-performance-monitoring-and-file-system-statistics-reports/ - -作者:[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/how-to-check-disk-space-in-linux/ -[2]:http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ -[3]:http://www.tecmint.com/linux-performance-monitoring-with-vmstat-and-iostat-commands/ -[4]:http://www.tecmint.com/install-sysstat-in-linux/ \ No newline at end of file diff --git a/translated/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md b/translated/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md new file mode 100644 index 0000000000..7a373cd76b --- /dev/null +++ b/translated/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md @@ -0,0 +1,182 @@ +RHCE 第三部分 - 如何使用 Linux 工具集产生和发送系统活动报告 +================================================================================ +作为一个系统工程师,你经常需要生成一些显示系统资源利用率的报告,以便确保:1)正最佳利用它们,2)防止出现瓶颈,3)确保可扩展性,以及其它原因。 + +![监视 Linux 性能活动报告](http://www.tecmint.com/wp-content/uploads/2015/08/Monitor-Linux-Performance-Activity-Reports.jpg) + +RHCE 第三部分:监视 Linux 性能活动报告 + +除了著名的用于检测磁盘、内存和 CPU 使用率的原生 Linux 工具 - 可以给出很多例子,红帽企业版 Linux 7 还提供了两个额外的工具集用于为你的报告增加可以收集的数据:sysstat 和 dstat。 + +在这篇文章中,我们会介绍两者,但首先让我们来回顾一下传统工具的使用。 + +### 原生 Linux 工具 ### + +使用 df,你可以报告磁盘空间以及文件系统的 inode 使用情况。你需要监视两者,因为缺少磁盘空间会阻止你保存更多文件(甚至会导致系统崩溃),就像耗尽 inode 意味着你不能将文件链接到对应的数据结构,从而导致同样的结果:你不能将那些文件保存到磁盘中。 + + # df -h [以人类可读形式显示输出] + # df -h --total [生成总计] + +![检查 Linux 总的磁盘使用](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Total-Disk-Usage.png) + +检查 Linux 总的磁盘使用 + + # df -i [显示文件系统的 inode 数目] + # df -i --total [生成总计] + +![检查 Linux 总的 inode 数目](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Total-inode-Numbers.png) + +检查 Linux 总的 inode 数目 + +用 du,你可以估计文件、目录或文件系统的文件空间使用。 + +举个例子,让我们来看看 /home 目录使用了多少空间,它包括了所有用户的个人文件。第一条命令会返回整个 /home 目录当前使用的所有空间,第二条命令会显示子目录的分类列表: + + # du -sch /home + # du -sch /home/* + +![检查 Linux 目录磁盘大小](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Directory-Disk-Size.png) + +检查 Linux 目录磁盘大小 + +别错过了: + +- [检查 Linux 磁盘空间使用的 12 个 ‘df’ 命令例子][1] +- [查看文件/目录磁盘使用的 10 个 ‘du’ 命令例子][2] + +另一个你工具集中不容忽视的工具就是 vmstat。它允许你查看进程、CPU 和 内存使用、磁盘活动以及其它的大概信息。 + +如果不带参数运行,vmstat 会返回自从上一次启动后的平均信息。尽管你可能以这种方式使用该命令有一段时间了,再看一些系统使用率的例子会有更多帮助,例如在例子中定义了时间间隔。 + +例如 + + # vmstat 5 10 + +会每个 5 秒返回 10 个事例: + +![检查 Linux 系统性能](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Systerm-Performance.png) + +检查 Linux 系统性能 + +正如你从上面图片看到的,vmstat 的输出分为很多列:proc(process)、memory、swap、io、system、和 CPU。每个字段的意义可以在 vmstat man 手册的 FIELD DESCRIPTION 部分找到。 + +在哪里 vmstat 可以派上用场呢?让我们在 yum 升级之前和升级时检查系统行为: + + # vmstat -a 1 5 + +![Vmstat Linux 性能监视](http://www.tecmint.com/wp-content/uploads/2015/08/Vmstat-Linux-Peformance-Monitoring.png) + +Vmstat Linux 性能监视 + +请注意当磁盘上的文件被更改时,活跃内存的数量增加,写到磁盘的块数目(bo)和属于用户进程的 CPU 时间(us)也是这样。 + +或者一个保存大文件到磁盘时(dsync 引发): + + # vmstat -a 1 5 + # dd if=/dev/zero of=dummy.out bs=1M count=1000 oflag=dsync + +![Vmstat Linux 磁盘性能监视](http://www.tecmint.com/wp-content/uploads/2015/08/VmStat-Linux-Disk-Performance-Monitoring.png) + +Vmstat Linux 磁盘性能监视 + +在这个例子中,我们可以看到很大数目的块被写入到磁盘(bo),这正如预期的那样,同时 CPU 处理任务之前等待 IO 操作完成的时间(wa)也增加了。 + +**别错过**: [Vmstat – Linux 性能监视][3] + +### 其它 Linux 工具 ### + +正如本文介绍部分提到的,这里有其它的工具你可以用来检测系统状态和利用率(不仅红帽,其它主流发行版的官方支持库中也提供了这些工具)。 + +sysstat 软件包包含以下工具: + +- sar (收集、报告、或者保存系统活动信息)。 +- sadf (以多种方式显式 sar 收集的数据)。 +- mpstat (报告处理器相关的统计信息)。 +- iostat (报告 CPU 统计信息和设备以及分区的 IO统计信息)。 +- pidstat (报告 Linux 任务统计信息)。 +- nfsiostat (报告 NFS 的输出/输出统计信息)。 +- cifsiostat (报告 CIFS 统计信息) +- sa1 (收集并保存系统活动日常文件的二进制数据)。 +- sa2 (在 /var/log/sa 目录写每日报告)。 + +dstat 为这些工具提供的功能添加了一些额外的特性,以及更多的计数器和更大的灵活性。你可以通过运行 yum info sysstat 或者 yum info dstat 找到每个工具完整的介绍,或者安装完成后分别查看每个工具的 man 手册。 + +安装两个软件包: + + # yum update && yum install sysstat dstat + +sysstat 主要的配置文件是 /etc/sysconfig/sysstat。你可以在该文件中找到下面的参数: + + # How long to keep log files (in days). + # If value is greater than 28, then log files are kept in + # multiple directories, one for each month. + HISTORY=28 + # Compress (using gzip or bzip2) sa and sar files older than (in days): + COMPRESSAFTER=31 + # Parameters for the system activity data collector (see sadc manual page) + # which are used for the generation of log files. + SADC_OPTIONS="-S DISK" + # Compression program to use. + ZIP="bzip2" + +sysstat 安装完成后,/etc/cron.d/sysstat 中会添加和启用两个 cron 作业。第一个作业每 10 分钟运行系统活动计数工具并在 /var/log/sa/saXX 中保存报告,其中 XX 是该月的一天。 + +因此,/var/log/sa/sa05 会包括该月份第 5 天所有的系统活动报告。这里假设我们在上面的配置文件中对 HISTORY 变量使用默认的值: + + */10 * * * * root /usr/lib64/sa/sa1 1 1 + +第二个作业在每天夜间 11:53 生成每日进程计数总结并把它保存到 /var/log/sa/sarXX 文件,其中 XX 和之前例子中的含义相同: + + 53 23 * * * root /usr/lib64/sa/sa2 -A + +例如,你可能想要输出该月份第 6 天从上午 9:30 到晚上 5:30 的系统统计信息到一个 LibreOffice Calc 或 Microsoft Excel 可以查看的 .csv 文件(它也允许你创建表格和图片): + + # sadf -s 09:30:00 -e 17:30:00 -dh /var/log/sa/sa06 -- | sed 's/;/,/g' > system_stats20150806.csv + +你可以在上面的 sadf 命令中用 -j 标记代替 -d 以 JSON 格式输出系统统计信息,这当你在 web 应用中使用这些数据的时候非常有用。 + +![Linux 系统统计信息](http://www.tecmint.com/wp-content/uploads/2015/08/Linux-System-Statistics.png) + +Linux 系统统计信息 + +最后,让我们看看 dstat 提供什么功能。请注意如果不带参数运行,dstat 默认使用 -cdngy(表示 CPU、磁盘、网络、内存页、和系统统计信息),并每秒添加一行(可以在任何时候用 Ctrl + C 中断执行): + + # dstat + +![Linux 磁盘统计检测](http://www.tecmint.com/wp-content/uploads/2015/08/dstat-command.png) + +Linux 磁盘统计检测 + +要输出统计信息到 .csv 文件,可以用 -output 标记后面跟一个文件名称。让我们来看看在 LibreOffice Calc 中该文件看起来是怎样的: + +![检测 Linux 统计信息输出](http://www.tecmint.com/wp-content/uploads/2015/08/Monitor-Linux-Statistics-Output.png) + +检测 Linux 统计信息输出 + +我强烈建议你查看 dstat 的 man 手册,为了方便你的阅读用 PDF 格式包括本文以及 sysstat 的 man 手册。你会找到其它能帮助你创建自定义的详细系统活动报告的选项。 + +**别错过**: [Sysstat – Linux 的使用活动检测工具][4] + +### 总结 ### + +在该指南中我们解释了如何使用 Linux 原生工具以及 RHEL 7 提供的特定工具来生成系统使用报告。在某种情况下,你可能像依赖最好的朋友那样依赖这些报告。 + +你很可能使用过这篇指南中我们没有介绍到的其它工具。如果真是这样的话,用下面的表格和社区中的其他成员一起分享吧,也可以是任何其它的建议/疑问/或者评论。 + +我们期待你的回复。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-performance-monitoring-and-file-system-statistics-reports/ + +作者:[Gabriel Cánepa][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者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/how-to-check-disk-space-in-linux/ +[2]:http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ +[3]:http://www.tecmint.com/linux-performance-monitoring-with-vmstat-and-iostat-commands/ +[4]:http://www.tecmint.com/install-sysstat-in-linux/ \ No newline at end of file From 973441749b1e0fcc303d5cc53653850a2baf7247 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 15 Aug 2015 18:07:53 +0800 Subject: [PATCH 1741/2517] PUB:20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux @geekpi --- ...work Traffic Analyzer--Install it on Linux.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md (73%) diff --git a/translated/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md b/published/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md similarity index 73% rename from translated/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md rename to published/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md index e8e6bace07..53f7b8a9d4 100644 --- a/translated/tech/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md +++ b/published/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md @@ -1,6 +1,7 @@ -Darkstat一个基于网络的流量分析器 - 在Linux中安装 +在 Linux 中安装 Darkstat:基于网页的流量分析器 ================================================================================ -Darkstat是一个简易的,基于网络的流量分析程序。它可以在主流的操作系统如Linux、Solaris、MAC、AIX上工作。它以守护进程的形式持续工作在后台并不断地嗅探网络数据并以简单易懂的形式展现在网页上。它可以为主机生成流量报告,鉴别特定主机上哪些端口打开并且兼容IPv6。让我们看下如何在Linux中安装和配置它。 + +Darkstat是一个简易的,基于网页的流量分析程序。它可以在主流的操作系统如Linux、Solaris、MAC、AIX上工作。它以守护进程的形式持续工作在后台,不断地嗅探网络数据,以简单易懂的形式展现在它的网页上。它可以为主机生成流量报告,识别特定的主机上哪些端口是打开的,它兼容IPv6。让我们看下如何在Linux中安装和配置它。 ### 在Linux中安装配置Darkstat ### @@ -20,14 +21,15 @@ Darkstat是一个简易的,基于网络的流量分析程序。它可以在主 ### 配置 Darkstat ### -为了正确运行这个程序,我恩需要执行一些基本的配置。运行下面的命令用gedit编辑器打开/etc/darkstat/init.cfg文件。 +为了正确运行这个程序,我们需要执行一些基本的配置。运行下面的命令用gedit编辑器打开/etc/darkstat/init.cfg文件。 sudo gedit /etc/darkstat/init.cfg ![](http://linuxpitstop.com/wp-content/uploads/2015/08/13.png) -编辑 Darkstat -修改START_DARKSTAT这个参数为yes,并在“INTERFACE”中提供你的网络接口。确保取消了DIR、PORT、BINDIP和LOCAL这些参数的注释。如果你希望绑定Darkstat到特定的IP,在BINDIP中提供它 +*编辑 Darkstat* + +修改START_DARKSTAT这个参数为yes,并在“INTERFACE”中提供你的网络接口。确保取消了DIR、PORT、BINDIP和LOCAL这些参数的注释。如果你希望绑定Darkstat到特定的IP,在BINDIP参数中提供它。 ### 启动Darkstat守护进程 ### @@ -47,7 +49,7 @@ Darkstat是一个简易的,基于网络的流量分析程序。它可以在主 ### 总结 ### -它是一个占用很少内存的轻量级工具。这个工具流行的原因是简易、易于配置和使用。这是一个对系统管理员而言必须拥有的程序 +它是一个占用很少内存的轻量级工具。这个工具流行的原因是简易、易于配置使用。这是一个对系统管理员而言必须拥有的程序。 -------------------------------------------------------------------------------- @@ -55,7 +57,7 @@ via: http://linuxpitstop.com/install-darkstat-on-ubuntu-linux/ 作者:[Aun][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 1e48d11ef118229b2618fec29cdd44276a58a4da Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sat, 15 Aug 2015 18:18:42 +0800 Subject: [PATCH 1742/2517] Delete 20150813 Linux and Unix Test Disk I O Performance With dd Command.md --- ...st Disk I O Performance With dd Command.md | 164 ------------------ 1 file changed, 164 deletions(-) delete mode 100644 sources/tech/20150813 Linux and Unix Test Disk I O Performance With dd Command.md diff --git a/sources/tech/20150813 Linux and Unix Test Disk I O Performance With dd Command.md b/sources/tech/20150813 Linux and Unix Test Disk I O Performance With dd Command.md deleted file mode 100644 index bcd9f8455f..0000000000 --- a/sources/tech/20150813 Linux and Unix Test Disk I O Performance With dd Command.md +++ /dev/null @@ -1,164 +0,0 @@ -DongShuaike is translating. - -Linux and Unix Test Disk I/O Performance With dd Command -================================================================================ -How can I use dd command on a Linux to test I/O performance of my hard disk drive? How do I check the performance of a hard drive including the read and write speed on a Linux operating systems? - -You can use the following commands on a Linux or Unix-like systems for simple I/O performance test: - -- **dd command** : It is used to monitor the writing performance of a disk device on a Linux and Unix-like system -- **hdparm command** : It is used to get/set hard disk parameters including test the reading and caching performance of a disk device on a Linux based system. - -In this tutorial you will learn how to use the dd command to test disk I/O performance. - -### Use dd command to monitor the reading and writing performance of a disk device: ### - -- Open a shell prompt. -- Or login to a remote server via ssh. -- Use the dd command to measure server throughput (write speed) `dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync` -- Use the dd command to measure server latency `dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync` - -#### Understanding dd command options #### - -In this example, I'm using RAID-10 (Adaptec 5405Z with SAS SSD) array running on a Ubuntu Linux 14.04 LTS server. The basic syntax is - - dd if=/dev/input.file of=/path/to/output.file bs=block-size count=number-of-blocks oflag=dsync - ## GNU dd syntax ## - dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync - ## OR alternate syntax for GNU/dd ## - dd if=/dev/zero of=/tmp/testALT.img bs=1G count=1 conv=fdatasync - -Sample outputs: - -![Fig.01: Ubuntu Linux Server with RAID10 and testing server throughput with dd](http://s0.cyberciti.org/uploads/faq/2015/08/dd-server-test-io-speed-output.jpg) -Fig.01: Ubuntu Linux Server with RAID10 and testing server throughput with dd - -Please note that one gigabyte was written for the test and 135 MB/s was server throughput for this test. Where, - -- `if=/dev/zero (if=/dev/input.file)` : The name of the input file you want dd the read from. -- `of=/tmp/test1.img (of=/path/to/output.file)` : The name of the output file you want dd write the input.file to. -- `bs=1G (bs=block-size)` : Set the size of the block you want dd to use. 1 gigabyte was written for the test. -- `count=1 (count=number-of-blocks)`: The number of blocks you want dd to read. -- `oflag=dsync (oflag=dsync)` : Use synchronized I/O for data. Do not skip this option. This option get rid of caching and gives you good and accurate results -- `conv=fdatasyn`: Again, this tells dd to require a complete "sync" once, right before it exits. This option is equivalent to oflag=dsync. - -In this example, 512 bytes were written one thousand times to get RAID10 server latency time: - - dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync - -Sample outputs: - - 1000+0 records in - 1000+0 records out - 512000 bytes (512 kB) copied, 0.60362 s, 848 kB/s - -Please note that server throughput and latency time depends upon server/application load too. So I recommend that you run these tests on a newly rebooted server as well as peak time to get better idea about your workload. You can now compare these numbers with all your devices. - -#### But why the server throughput and latency time are so low? #### - -Low values does not mean you are using slow hardware. The value can be low because of the HARDWARE RAID10 controller's cache. - -Use hdparm command to see buffered and cached disk read speed - -I suggest you run the following commands 2 or 3 times Perform timings of device reads for benchmark and comparison purposes: - - ### Buffered disk read test for /dev/sda ## - hdparm -t /dev/sda1 - ## OR ## - hdparm -t /dev/sda - -To perform timings of cache reads for benchmark and comparison purposes again run the following command 2-3 times (note the -T option): - - ## Cache read benchmark for /dev/sda ### - hdparm -T /dev/sda1 - ## OR ## - hdparm -T /dev/sda - -OR combine both tests: - - hdparm -Tt /dev/sda - -Sample outputs: - -![Fig.02: Linux hdparm command to test reading and caching disk performance](http://s0.cyberciti.org/uploads/faq/2015/08/hdparam-output.jpg) -Fig.02: Linux hdparm command to test reading and caching disk performance - -Again note that due to filesystems caching on file operations, you will always see high read rates. - -**Use dd command on Linux to test read speed** - -To get accurate read test data, first discard caches before testing by running the following commands: - - flush - echo 3 | sudo tee /proc/sys/vm/drop_caches - time time dd if=/path/to/bigfile of=/dev/null bs=8k - -**Linux Laptop example** - -Run the following command: - - ### Debian Laptop Throughput With Cache ## - dd if=/dev/zero of=/tmp/laptop.bin bs=1G count=1 oflag=direct - - ### Deactivate the cache ### - hdparm -W0 /dev/sda - - ### Debian Laptop Throughput Without Cache ## - dd if=/dev/zero of=/tmp/laptop.bin bs=1G count=1 oflag=direct - -**Apple OS X Unix (Macbook pro) example** - -GNU dd has many more options but OS X/BSD and Unix-like dd command need to run as follows to test real disk I/O and not memory add sync option as follows: - - ## Run command 2-3 times to get good results ### - time sh -c "dd if=/dev/zero of=/tmp/testfile bs=100k count=1k && sync" - -Sample outputs: - - 1024+0 records in - 1024+0 records out - 104857600 bytes transferred in 0.165040 secs (635346520 bytes/sec) - - real 0m0.241s - user 0m0.004s - sys 0m0.113s - -So I'm getting 635346520 bytes (635.347 MB/s) write speed on my MBP. - -**Not a fan of command line...?** - -You can use disk utility (gnome-disk-utility) on a Linux or Unix based system to get the same information. The following screenshot is taken from my Fedora Linux v22 VM. - -**Graphical method** - -Click on the "Activities" or press the "Super" key to switch between the Activities overview and desktop. Type "Disks" - -![Fig.03: Start the Gnome disk utility](http://s0.cyberciti.org/uploads/faq/2015/08/disk-1.jpg) -Fig.03: Start the Gnome disk utility - -Select your hard disk at left pane and click on configure button and click on "Benchmark partition": - -![Fig.04: Benchmark disk/partition](http://s0.cyberciti.org/uploads/faq/2015/08/disks-2.jpg) -Fig.04: Benchmark disk/partition - -Finally, click on the "Start Benchmark..." button (you may be promoted for the admin username and password): - -![Fig.05: Final benchmark result](http://s0.cyberciti.org/uploads/faq/2015/08/disks-3.jpg) -Fig.05: Final benchmark result - -Which method and command do you recommend to use? - -- I recommend dd command on all Unix-like systems (`time sh -c "dd if=/dev/zero of=/tmp/testfile bs=100k count=1k && sync`" -- If you are using GNU/Linux use the dd command (`dd if=/dev/zero of=/tmp/testALT.img bs=1G count=1 conv=fdatasync`) -- Make sure you adjust count and bs arguments as per your setup to get a good set of result. -- The GUI method is recommended only for Linux/Unix laptop users running Gnome2 or 3 desktop. - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/howto-linux-unix-test-disk-performance-with-dd-command/ - -作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 7fc831fe8fd5ada1167f8f4bc7f57bff9b5e1034 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sat, 15 Aug 2015 18:22:26 +0800 Subject: [PATCH 1743/2517] Create Linux and Unix Test Disk IO Performance With dd Command.MD --- ...est Disk IO Performance With dd Command.MD | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD diff --git a/translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD b/translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD new file mode 100644 index 0000000000..ab3615876c --- /dev/null +++ b/translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD @@ -0,0 +1,167 @@ +使用dd命令在Linux和Unix环境下进行硬盘I/O性能检测 +================================================================================ +如何使用dd命令测试硬盘的性能?如何在linux操作系统下检测硬盘的读写能力? + +你可以使用以下命令在一个Linux或类Unix操作系统上进行简单的I/O性能测试。 + +- **dd命令** :它被用来在Linux和类Unix系统下对硬盘设备进行写性能的检测。 +- **hparm命令**:它被用来获取或设置硬盘参数,包括测试读性能以及缓存性能等。 + +在这篇指南中,你将会学到如何使用dd命令来测试硬盘性能。 + +### 使用dd命令来监控硬盘的读写性能:### + +- 打开shell终端(这里貌似不能翻译为终端提示符)。 +- 通过ssh登录到远程服务器。 +- 使用dd命令来测量服务器的吞吐率(写速度) `dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync` +- 使用dd命令测量服务器延迟 `dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync` + +####理解dd命令的选项### + +在这个例子当中,我将使用搭载Ubuntu Linux 14.04 LTS系统的RAID-10(配有SAS SSD的Adaptec 5405Z)服务器阵列来运行。基本语法为: + + dd if=/dev/input.file of=/path/to/output.file bs=block-size count=number-of-blocks oflag=dsync + ## GNU dd syntax ## + dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync + ## OR alternate syntax for GNU/dd ## + dd if=/dev/zero of=/tmp/testALT.img bs=1G count=1 conv=fdatasync + +输出样例: + +![Fig.01: Ubuntu Linux Server with RAID10 and testing server throughput with dd](http://s0.cyberciti.org/uploads/faq/2015/08/dd-server-test-io-speed-output.jpg) +Fig.01: 使用dd命令获取的服务器吞吐率 + +请各位注意在这个实验中,我们写入一个G的数据,可以发现,服务器的吞吐率是135 MB/s,这其中 + +- `if=/dev/zero (if=/dev/input.file)` :用来设置dd命令读取的输入文件名。 +- `of=/tmp/test1.img (of=/path/to/output.file)` :dd命令将input.file写入的输出文件的名字。 +- `bs=1G (bs=block-size)` :设置dd命令读取的块的大小。例子中为1个G。 +- `count=1 (count=number-of-blocks)`: dd命令读取的块的个数。 +- `oflag=dsync (oflag=dsync)` :使用同步I/O。不要省略这个选项。这个选项能够帮助你去除caching的影响,以便呈现给你精准的结果。 +- `conv=fdatasyn`: 这个选项和`oflag=dsync`含义一样。 + +在这个例子中,一共写了1000次,每次写入512字节来获得RAID10服务器的延迟时间: + + dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync + +输出样例: + + 1000+0 records in + 1000+0 records out + 512000 bytes (512 kB) copied, 0.60362 s, 848 kB/s + +请注意服务器的吞吐率以及延迟时间也取决于服务器/应用的加载。所以我推荐你在一个刚刚重启过并且处于峰值时间的服务器上来运行测试,以便得到更加准确的度量。现在你可以在你的所有设备上互相比较这些测试结果了。 + +####为什么服务器的吞吐率和延迟时间都这么差?### + +低的数值并不意味着你在使用差劲的硬件。可能是HARDWARE RAID10的控制器缓存导致的。 + +使用hdparm命令来查看硬盘缓存的读速度。 + +我建议你运行下面的命令2-3次来对设备读性能进行检测,以作为参照和相互比较: + + ### 有缓存的硬盘读性能测试——/dev/sda ### + hdparm -t /dev/sda1 + ## 或者 ## + hdparm -t /dev/sda + +然后运行下面这个命令2-3次来对缓存的读性能进行对照性检测: + + ## Cache读基准——/dev/sda ### + hdparm -T /dev/sda1 + ## 或者 ## + hdparm -T /dev/sda + +或者干脆把两个测试结合起来: + + hdparm -Tt /dev/sda + +输出样例: + +![Fig.02: Linux hdparm command to test reading and caching disk performance](http://s0.cyberciti.org/uploads/faq/2015/08/hdparam-output.jpg) +Fig.02: 检测硬盘读入以及缓存性能的Linux hdparm命令 + +请再一次注意由于文件文件操作的缓存属性,你将总是会看到很高的读速度。 + +**使用dd命令来测试读入速度** + +为了获得精确的读测试数据,首先在测试前运行下列命令,来将缓存设置为无效: + + flush + echo 3 | sudo tee /proc/sys/vm/drop_caches + time time dd if=/path/to/bigfile of=/dev/null bs=8k + +**笔记本上的示例** + +运行下列命令: + + ### Cache存在的Debian系统笔记本吞吐率### + dd if=/dev/zero of=/tmp/laptop.bin bs=1G count=1 oflag=direct + + ###使cache失效### + hdparm -W0 /dev/sda + + ###没有Cache的Debian系统笔记本吞吐率### + dd if=/dev/zero of=/tmp/laptop.bin bs=1G count=1 oflag=direct + +**苹果OS X Unix(Macbook pro)的例子** + +GNU dd has many more options but OS X/BSD and Unix-like dd command need to run as follows to test real disk I/O and not memory add sync option as follows: +GNU dd命令有其他许多选项但是在 OS X/BSD 以及类Unix中, dd命令需要像下面那样执行来检测去除掉内存地址同步的硬盘真实I/O性能: + + ## 运行这个命令2-3次来获得更好地结果 ### + time sh -c "dd if=/dev/zero of=/tmp/testfile bs=100k count=1k && sync" + +输出样例: + + 1024+0 records in + 1024+0 records out + 104857600 bytes transferred in 0.165040 secs (635346520 bytes/sec) + + real 0m0.241s + user 0m0.004s + sys 0m0.113s + +本人Macbook Pro的写速度是635346520字节(635.347MB/s)。 + +**不喜欢用命令行?^_^** + +你可以在Linux或基于Unix的系统上使用disk utility(gnome-disk-utility)这款工具来得到同样的信息。下面的那个图就是在我的Fedora Linux v22 VM上截取的。 + +**图形化方法** + +点击“Activites”或者“Super”按键来在桌面和Activites视图间切换。输入“Disks” + +![Fig.03: Start the Gnome disk utility](http://s0.cyberciti.org/uploads/faq/2015/08/disk-1.jpg) +Fig.03: 打开Gnome硬盘工具 + +在左边的面板上选择你的硬盘,点击configure按钮,然后点击“Benchmark partition”: + +![Fig.04: Benchmark disk/partition](http://s0.cyberciti.org/uploads/faq/2015/08/disks-2.jpg) +Fig.04: 评测硬盘/分区 + +最后,点击“Start Benchmark...”按钮(你可能被要求输入管理员用户名和密码): + +![Fig.05: Final benchmark result](http://s0.cyberciti.org/uploads/faq/2015/08/disks-3.jpg) +Fig.05: 最终的评测结果 + +如果你要问,我推荐使用哪种命令和方法? + +- 我推荐在所有的类Unix系统上使用dd命令(`time sh -c "dd if=/dev/zero of=/tmp/testfile bs=100k count=1k && sync`) +- 如果你在使用GNU/Linux,使用dd命令 (`dd if=/dev/zero of=/tmp/testALT.img bs=1G count=1 conv=fdatasync`) +- 确保你每次使用时,都调整了count以及bs参数以获得更好的结果。 +- GUI方法只适合桌面系统为Gnome2或Gnome3的Linux/Unix笔记本用户。 + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/howto-linux-unix-test-disk-performance-with-dd-command/ + +作者:Vivek Gite +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + + + + From af421be7153844a90ebc512b164be5b92da1bca1 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sat, 15 Aug 2015 18:24:35 +0800 Subject: [PATCH 1744/2517] Update Linux and Unix Test Disk IO Performance With dd Command.MD --- ...Linux and Unix Test Disk IO Performance With dd Command.MD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD b/translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD index ab3615876c..be5986b78e 100644 --- a/translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD +++ b/translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD @@ -21,9 +21,9 @@ 在这个例子当中,我将使用搭载Ubuntu Linux 14.04 LTS系统的RAID-10(配有SAS SSD的Adaptec 5405Z)服务器阵列来运行。基本语法为: dd if=/dev/input.file of=/path/to/output.file bs=block-size count=number-of-blocks oflag=dsync - ## GNU dd syntax ## + ## GNU dd语法 ## dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync - ## OR alternate syntax for GNU/dd ## + ##另外一种GNU dd的语法 ## dd if=/dev/zero of=/tmp/testALT.img bs=1G count=1 conv=fdatasync 输出样例: From 2bf20aff9200598742e6b7646426fe03c843f6bf Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 15 Aug 2015 23:41:11 +0800 Subject: [PATCH 1745/2517] PUB:20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @XLCYun 翻译的很好!下周每天连载一篇 --- ...t Right & Wrong - Page 1 - Introduction.md | 56 +++++++++++++++++++ ...t Right & Wrong - Page 1 - Introduction.md | 55 ------------------ 2 files changed, 56 insertions(+), 55 deletions(-) create mode 100644 published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md delete mode 100644 translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md diff --git a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md new file mode 100644 index 0000000000..61e181c80c --- /dev/null +++ b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md @@ -0,0 +1,56 @@ + 一周 GNOME 之旅:品味它和 KDE 的是是非非(第一节 介绍) +================================================================================ + +*作者声明: 如果你是因为某种神迹而在没看标题的情况下点开了这篇文章,那么我想再重申一些东西……这是一篇评论文章,文中的观点都是我自己的,不代表 Phoronix 网站和 Michael 的观点。它们完全是我自己的想法。* + +另外,没错……这可能是一篇引战的文章。我希望 KDE 和 Gnome 社团变得更好一些,因为我想发起一个讨论并反馈给他们。为此,当我想指出(我所看到的)一个瑕疵时,我会尽量地做到具体而直接。这样,相关的讨论也能做到同样的具体和直接。再次声明:本文另一可选标题为“死于成千上万的[纸割][1]”(LCTT 译注:paper cuts——纸割,被纸片割伤——指易修复但烦人的缺陷。Ubuntu 从 9.10 开始,发起了 [One Hundred Papercuts][1] 项目,用于修复那些小而烦人的易用性问题)。 + +现在,重申完毕……文章开始。 + +![](http://www.phoronix.net/image.php?id=fedora-22-fan&image=fedora_22_good1_show&w=1920) + +当我把[《评价 Fedora 22 KDE 》][2]一文发给 Michael 时,感觉很不是滋味。不是因为我不喜欢 KDE,或者不待见 Fedora,远非如此。事实上,我刚开始想把我的 T450s 的系统换为 Arch Linux 时,马上又决定放弃了,因为我很享受 fedora 在很多方面所带来的便捷性。 + +我感觉很不是滋味的原因是 Fedora 的开发者花费了大量的时间和精力在他们的“工作站”产品上,但是我却一点也没看到。在使用 Fedora 时,我并没用采用那些主要开发者希望用户采用的那种使用方式,因此我也就体验不到所谓的“ Fedora 体验”。它感觉就像一个人评价 Ubuntu 时用的却是 Kubuntu,评价 OS X 时用的却是 Hackintosh,或者评价 Gentoo 时用的却是 Sabayon。根据论坛里大量读者对 Michael 的说法,他们在评价各种发行版时都是使用的默认设置——我也不例外。但是我还是认为这些评价应该在“真实”配置下完成,当然我也知道在给定的情况下评论某些东西也的确是有价值的——无论是好是坏。 + +正是在怀着这种态度的情况下,我决定跳到 Gnome 这个水坑里来泡泡澡。 + +但是,我还要在此多加一个声明……我在这里所看到的 KDE 和 Gnome 都是打包在 Fedora 中的。OpenSUSE、 Kubuntu、 Arch等发行版的各个桌面可能有不同的实现方法,使得我这里所说的具体的“痛点”跟你所用的发行版有所不同。还有,虽然用了这个标题,但这篇文章将会是一篇“很 KDE”的重量级文章。之所以这样称呼,是因为我在“使用” Gnome 之后,才知道 KDE 的“纸割”到底有多么的多。 + +### 登录界面 ### + +![Gnome 登录界面](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login1_show&w=1920) + +我一般情况下都不会介意发行版带着它们自己的特别主题,因为一般情况下桌面看起来会更好看。可我今天可算是找到了一个例外。 + +第一印象很重要,对吧?那么,GDM(LCTT 译注: Gnome Display Manage:Gnome 显示管理器。)绝对干得漂亮。它的登录界面看起来极度简洁,每一部分都应用了一致的设计风格。使用通用图标而不是文本框为它的简洁加了分。 + +![ KDE 登录界面](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login2_show&w=1920) + +这并不是说 Fedora 22 KDE ——现在已经是 SDDM 而不是 KDM 了——的登录界面不好看,但是看起来绝对没有它这样和谐。 + +问题到底出来在哪?顶部栏。看看 Gnome 的截图——你选择一个用户,然后用一个很小的齿轮简单地选择想登入哪个会话。设计很简洁,一点都不碍事,实话讲,如果你没注意的话可能完全会看不到它。现在看看那蓝色( LCTT 译注:blue,有忧郁之意,一语双关)的 KDE 截图,顶部栏看起来甚至不像是用同一个工具渲染出来的,它的整个位置的安排好像是某人想着:“哎哟妈呀,我们需要把这个选项扔在哪个地方……”之后决定下来的。 + +对于右上角的重启和关机选项也一样。为什么不单单用一个电源按钮,点击后会下拉出一个菜单,里面包括重启,关机,挂起的功能?按钮的颜色跟背景色不同肯定会让它更加突兀和显眼……但我可不觉得这样子有多好。同样,这看起来可真像“苦思”后的决定。 + +从实用观点来看,GDM 还要远远实用的多,再看看顶部一栏。时间被列了出来,还有一个音量控制按钮,如果你想保持周围安静,你甚至可以在登录前设置静音,还有一个可用性按钮来实现高对比度、缩放、语音转文字等功能,所有可用的功能通过简单的一个开关按钮就能得到。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login3_show&w=1920) + +切换到上游(KDE 自带)的 Breeve 主题……突然间,我抱怨的大部分问题都被解决了。通用图标,所有东西都放在了屏幕中央,但不是那么重要的被放到了一边。因为屏幕顶部和底部都是同样的空白,在中间也就酝酿出了一种美好的和谐。还是有一个文本框来切换会话,但既然电源按钮被做成了通用图标,那么这点还算可以原谅。当前时间以一种漂亮的感觉呈现,旁边还有电量指示器。当然 gnome 还是有一些很好的附加物,例如音量小程序和可用性按钮,但 Breeze 总归要比 Fedora 的 KDE 主题进步。 + +到 Windows(Windows 8和10之前)或者 OS X 中去,你会看到类似的东西——非常简洁的,“不碍事”的锁屏与登录界面,它们都没有文本框或者其它分散视觉的小工具。这是一种有效的不分散人注意力的设计。Fedora……默认带有 Breeze 主题。VDG 在 Breeze 主题设计上干得不错。可别糟蹋了它。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=1 + +作者:Eric Griffith +译者:[XLCYun](https://github.com/XLCYun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://wiki.ubuntu.com/One%20Hundred%20Papercuts +[2]:http://www.phoronix.com/scan.php?page=article&item=fedora-22-kde&num=1 +[3]:https://launchpad.net/hundredpapercuts diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md deleted file mode 100644 index 582708f5a4..0000000000 --- a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md +++ /dev/null @@ -1,55 +0,0 @@ -将GNOME作为我的Linux桌面的一周: 他们做对的与做错的 - 第一节 - 简介 -================================================================================ -*作者声明: 如果你是因为某种神迹而在没看标题的情况下点开了这篇文章,那么我想再重申一些东西...这是一篇评论文章。文中的观点都是我自己的,不代表Phoronix和Michael的观点。它们完全是我自己的想法。 - -另外,没错……这可能是一篇引战的文章。我希望社团成员们更沉稳一些,因为我确实想在KDE和Gnome的社团上发起讨论,反馈。因此当我想指出——我所看到的——一个瑕疵时,我会尽量地做到具体而直接。这样,相关的讨论也能做到同样的具体和直接。再次声明:本文另一可选标题为“被[细纸片][1]千刀万剐”(原文含paper cuts一词,指易修复但烦人的缺陷,译者注)。 - -现在,重申完毕……文章开始。 - -![](http://www.phoronix.net/image.php?id=fedora-22-fan&image=fedora_22_good1_show&w=1920) - -当我把[《评价Fedora 22 KDE》][2]一文发给Michael时,感觉很不是滋味。不是因为我不喜欢KDE,或者不享受Fedora,远非如此。事实上,我刚开始想把我的T450s的系统换为Arch Linux时,马上又决定放弃了,因为我很享受fedora在很多方面所带来的便捷性。 - -我感觉很不是滋味的原因是Fedora的开发者花费了大量的时间和精力在他们的“工作站”产品上,但是我却一点也没看到。在使用Fedora时,我采用的并非那些主要开发者希望用户采用的那种使用方式,因此我也就体验不到所谓的“Fedora体验”。它感觉就像一个人评价Ubuntu时用的却是Kubuntu,评价OS X时用的却是Hackintosh,或者评价Gentoo时用的却是Sabayon。根据大量Michael论坛的读者的说法,它们在评价各种发行版时使用的都是默认设置的发行版——我也不例外。但是我还是认为这些评价应该在“真实”配置下完成,当然我也知道在给定的情况下评论某些东西也的确是有价值的——无论是好是坏。 - -正是在怀着这种态度的情况下,我决定到Gnome这个水坑里来泡泡澡。 - -但是,我还要在此多加一个声明……我在这里所看到的KDE和Gnome都是打包在Fedora中的。OpenSUSE, Kubuntu, Arch等发行版的各个桌面可能有不同的实现方法,使得我这里所说的具体的“痛处”跟你所用的发行版有所不同。还有,虽然用了这个标题,但这篇文章将会是一篇很沉重的非常“KDE”的文章。之所以这样称呼这篇文章,是因为我在使用了Gnome之后,才知道KDE的“剪纸”到底有多多。 - -### 登录界面 ### - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login1_show&w=1920) - -我一般情况下都不会介意发行版装载它们自己的特别主题,因为一般情况下桌面看起来会更好看。可我今天可算是找到了一个例外。 - -第一印象很重要,对吧?那么,GDM(Gnome Display Manage:Gnome显示管理器,译者注,下同。)决对干得漂亮。它的登录界面看起来极度简洁,每一部分都应用了一致的设计风格。使用通用图标而不是输入框为它的简洁加了分。 - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login2_show&w=1920) - -这并不是说Fedora 22 KDE——现在已经是SDDM而不是KDM了——的登录界面不好看,但是看起来决对没有它这样和谐。 - -问题到底出来在哪?顶部栏。看看Gnome的截图——你选择一个用户,然后用一个很小的齿轮简单地选择想登入哪个会话。设计很简洁,它不挡着你的道儿,实话讲,如果你没注意的话可能完全会看不到它。现在看看那蓝色( blue,有忧郁之意,一语双关,译者注)的KDE截图,顶部栏看起来甚至不像是用同一个工具渲染出来的,它的整个位置的安排好像是某人想着:“哎哟妈呀,我们需要把这个选项扔在哪个地方……”之后决定下来的。 - -对于右上角的重启和关机选项也一样。为什么不单单用一个电源按钮,点击后会下拉出一个菜单,里面包括重启,关机,挂起的功能?按钮的颜色跟背景色不同肯定会让它更加突兀和显眼……但我可不觉得这样子有多好。同样,这看起来可真像“苦思”后的决定。 - -从实用观点来看,GDM还要远远实用的多,再看看顶部一栏。时间被列了出来,还有一个音量控制按钮,如果你想保持周围安静,你甚至可以在登录前设置静音,还有一个可用的按钮来实现高对比度,缩放,语音转文字等功能,所有可用的功能通过简单的一个开关按钮就能得到。 - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_login3_show&w=1920) - -切换到upstream的Breeve主题……突然间,我抱怨的大部分问题都被完善了。通用图标,所有东西都放在了屏幕中央,但不是那么重要的被放到了一边。因为屏幕顶部和底部都是同样的空白,在中间也就酝酿出了一种美好的和谐。还是有一个输入框来切换会话,但既然电源按钮被做成了通用图标,那么这点还算可以原谅。当然gnome还是有一些很好的附加物,例如音量小程序和可访问按钮,但Breeze总归是Fedora的KDE主题的一个进步。 - -到Windows(Windows 8和10之前)或者OS X中去,你会看到类似的东西——非常简洁的,“不挡你道”的锁屏与登录界面,它们都没有输入框或者其它分散视觉的小工具。这是一种有效的不分散人注意力的设计。Fedora……默认装有Breeze。VDG在Breeze主题设计上干得不错。可别糟蹋了它。 - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=1 - -作者:Eric Griffith -译者:[XLCYun](https://github.com/XLCYun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://wiki.ubuntu.com/One%20Hundred%20Papercuts -[2]:http://www.phoronix.com/scan.php?page=article&item=fedora-22-kde&num=1 -[3]:https://launchpad.net/hundredpapercuts From 716529e17d8b7ab2a7bf975282f1f34ea00ecf07 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 16 Aug 2015 00:38:02 +0800 Subject: [PATCH 1746/2517] PUB:20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop @XLCYun --- ...ht & Wrong - Page 2 - The GNOME Desktop.md | 32 +++++++++++++++++++ ...ht & Wrong - Page 2 - The GNOME Desktop.md | 31 ------------------ 2 files changed, 32 insertions(+), 31 deletions(-) create mode 100644 published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md delete mode 100644 translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md diff --git a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md new file mode 100644 index 0000000000..e47e59eaed --- /dev/null +++ b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md @@ -0,0 +1,32 @@ +一周 GNOME 之旅:品味它和 KDE 的是是非非(第二节 GNOME桌面) +================================================================================ + +### 桌面 ### + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_gdm_show&w=1920) + +在我这一周的前五天中,我都是直接手动登录进 Gnome 的——没有打开自动登录功能。在第五天的晚上,每一次都要手动登录让我觉得很厌烦,所以我就到用户管理器中打开了自动登录功能。下一次我登录的时候收到了一个提示:“你的密钥链(keychain)未解锁,请输入你的密码解锁”。在这时我才意识到了什么……Gnome 以前一直都在自动解锁我的密钥链(KDE 中叫做我的钱包),每当我通过 GDM 登录时 !当我绕开 GDM 的登录程序时,Gnome 才不得不介入让我手动解锁。 + +现在,鄙人的陋见是如果你打开了自动登录功能,那么你的密钥链也应当自动解锁——否则,这功能还有何用?无论如何,你还是需要输入你的密码,况且在 GDM 登录界面你还有机会选择要登录的会话,如果你想换的话。 + +但是,这点且不提,也就是在那一刻,我意识到要让这桌面感觉就像它在**和我**一起工作一样是多么简单的一件事。当我通过 SDDM 登录 KDE 时?甚至连启动界面都还没加载完成,就有一个窗口弹出来遮挡了启动动画(因此启动动画也就被破坏了),它提示我解锁我的 KDE 钱包或 GPG 钥匙环。 + +如果当前还没有钱包,你就会收到一个创建钱包的提醒——就不能在创建用户的时候同时为我创建一个吗?接着它又让你在两种加密模式中选择一种,甚至还暗示我们其中一种(Blowfish)是不安全的,既然是为了安全,为什么还要我选择一个不安全的东西?作者声明:如果你安装了真正的 KDE spin 版本而不是仅仅安装了被 KDE 搞过的版本,那么在创建用户时,它就会为你创建一个钱包。但很不幸的是,它不会帮你自动解锁,并且它似乎还使用了更老的 Blowfish 加密模式,而不是更新而且更安全的 GPG 模式。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_kgpg_show&w=1920) + +如果你选择了那个安全的加密模式(GPG),那么它会尝试加载 GPG 密钥……我希望你已经创建过一个了,因为如果你没有,那么你可又要被指责一番了。怎么样才能创建一个?额……它不帮你创建一个……也不告诉你怎么创建……假如你真的搞明白了你应该使用 KGpg 来创建一个密钥,接着在你就会遇到一层层的菜单和一个个的提示,而这些菜单和提示只能让新手感到困惑。为什么你要问我 GPG 的二进制文件在哪?天知道在哪!如果不止一个,你就不能为我选择一个最新的吗?如果只有一个,我再问一次,为什么你还要问我? + +为什么你要问我要使用多大的密钥大小和加密算法?你既然默认选择了 2048 和 RSA/RSA,为什么不直接使用?如果你想让这些选项能够被修改,那就把它们扔在下面的“Expert mode(专家模式)” 按钮里去。这里不仅仅是说让配置可被用户修改的问题,而是说根本不需要默认把多余的东西扔在了用户面前。这种问题将会成为这篇文章剩下的主要内容之一……KDE 需要更理智的默认配置。配置是好的,我很喜欢在使用 KDE 时的配置,但它还需要知道什么时候应该,什么时候不应该去提示用户。而且它还需要知道“嗯,它是可配置的”不能做为默认配置做得不好的借口。用户最先接触到的就是默认配置,不好的默认配置注定要失去用户。 + +让我们抛开密钥链的问题,因为我想我已经表达出了我的想法。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=2 + +作者:Eric Griffith +译者:[XLCYun](https://github.com/XLCYun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md deleted file mode 100644 index 5ce4dcd8d5..0000000000 --- a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md +++ /dev/null @@ -1,31 +0,0 @@ -将GNOME作为我的Linux桌面的一周:他们做对的与做错的 - 第二节 - GNOME桌面 -================================================================================ -### 桌面 ### - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_gdm_show&w=1920) - -在我这一周的前五天中,我都是直接手动登录进Gnome的——没有打开自动登录功能。在第五天的晚上,每一次都要手动登录让我觉得很厌烦,所以我就到用户管理器中打开了自动登录功能。下一次我登录的时候收到了一个提示:“你的密钥链(keychain)未解锁,请输入你的密码解锁”。在这时我才意识到了什么……每一次我通过GDM登录时——我的KDB钱包提示——Gnome以前一直都在自动解锁我的密钥链!当我绕开GDM的登录程序时,Gnome才不得不介入让我手动解锁。 - -现在,鄙人的陋见是如果你打开了自动登录功能,那么你的密钥链也应当自动解锁——否则,这功能还有何用?无论如何,你还是要输入你的密码,况且在GDM登录界面你还能有机会选择要登录的会话。 - -但是,这点且不提,也就是在那一刻,我意识到要让这桌面感觉是它在**和我**一起工作是多么简单的一件事。当我通过SDDM登录KDE时?甚至连启动界面都还没加载完成,就有一个窗口弹出来遮挡了启动动画——因此启动动画也就被破坏了——提示我解锁我的KDE钱包或GPG钥匙环。 - -如果当前不存在钱包,你就会收到一个创建钱包的提醒——就不能在创建用户的时候同时为我创建一个吗?——接着它又让你在两种加密模式中选择一种,甚至还暗示我们其中一种是不安全的(Blowfish),既然是为了安全,为什么还要我选择一个不安全的东西?作者声明:如果你安装了真正的KDE spin版本而不是仅仅安装了KDE的事后版本,那么在创建用户时,它就会为你创建一个钱包。但很不幸的是,它不会帮你解锁,并且它似乎还使用了更老的Blowfish加密模式,而不是更新而且更安全的GPG模式。 - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_kgpg_show&w=1920) - -如果你选择了那个安全的加密模式(GPG),那么它会尝试加载GPG密钥……我希望你已经创建过一个了,因为如果你没有,那么你可又要被批一顿了。怎么样才能创建一个?额……它不帮你创建一个……也不告诉你怎么创建……假如你真的搞明白了你应该使用KGpg来创建一个密钥,接着在你就会遇到一层层的菜单和一个个的提示,而这些菜单和提示只能让新手感到困惑。为什么你要问我GPG的二进制文件在哪?天知道在哪!如果不止一个,你就不能为我选择一个最新的吗?如果只有一个,我再问一次,为什么你还要问我? - -为什么你要问我要使用多大的密钥大小和加密算法?你既然默认选择了2048和RSA/RSA,为什么不直接使用?如果你想让这些选项能够被改变,那就把它们扔在下面的"Expert mode(专家模式)"按钮里去。这不仅仅关于使配置可被用户改变,而是关于默认地把多余的东西扔在了用户面前。这种问题将会成为剩下文章的主题之一……KDE需要更好更理智的默认配置。配置是好的,我很喜欢在使用KDE时的配置,但它还需要知道什么时候应该,什么时候不应该去提示用户。而且它还需要知道“嗯,它是可配置的”不能做为默认配置做得不好的借口。用户最先接触到的就是默认配置,不好的默认配置注定要失去用户。 - -让我们抛开密钥链的问题,因为我想我已经表达出了我的想法。 - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=2 - -作者:Eric Griffith -译者:[XLCYun](https://github.com/XLCYun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 88435ed2b8be50e2c4e7534259af9336397bb1c6 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 16 Aug 2015 02:34:08 +0800 Subject: [PATCH 1747/2517] =?UTF-8?q?20150816-1=20RHCE=20=E7=AC=AC?= =?UTF-8?q?=E5=9B=9B=E7=AF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Automate Linux System Maintenance Tasks.md | 207 ++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md diff --git a/sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md b/sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md new file mode 100644 index 0000000000..bcd058611a --- /dev/null +++ b/sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md @@ -0,0 +1,207 @@ +Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks +================================================================================ +Some time ago I read that one of the distinguishing characteristics of an effective system administrator / engineer is laziness. It seemed a little contradictory at first but the author then proceeded to explain why: + +![Automate Linux System Maintenance Tasks](http://www.tecmint.com/wp-content/uploads/2015/08/Automate-Linux-System-Maintenance-Tasks.png) + +RHCE Series: Automate Linux System Maintenance Tasks – Part 4 + +if a sysadmin spends most of his time solving issues and doing repetitive tasks, you can suspect he or she is not doing things quite right. In other words, an effective system administrator / engineer should develop a plan to perform repetitive tasks with as less action on his / her part as possible, and should foresee problems by using, + +for example, the tools reviewed in Part 3 – [Monitor System Activity Reports Using Linux Toolsets][1] of this series. Thus, although he or she may not seem to be doing much, it’s because most of his / her responsibilities have been taken care of with the help of shell scripting, which is what we’re going to talk about in this tutorial. + +### What is a shell script? ### + +In few words, a shell script is nothing more and nothing less than a program that is executed step by step by a shell, which is another program that provides an interface layer between the Linux kernel and the end user. + +By default, the shell used for user accounts in RHEL 7 is bash (/bin/bash). If you want a detailed description and some historical background, you can refer to [this Wikipedia article][2]. + +To find out more about the enormous set of features provided by this shell, you may want to check out its **man page**, which is downloaded in in PDF format at ([Bash Commands][3]). Other than that, it is assumed that you are familiar with Linux commands (if not, I strongly advise you to go through [A Guide from Newbies to SysAdmin][4] article in **Tecmint.com** before proceeding). Now let’s get started. + +### Writing a script to display system information ### + +For our convenience, let’s create a directory to store our shell scripts: + + # mkdir scripts + # cd scripts + +And open a new text file named `system_info.sh` with your preferred text editor. We will begin by inserting a few comments at the top and some commands afterwards: + + #!/bin/bash + + # Sample script written for Part 4 of the RHCE series + # This script will return the following set of system information: + # -Hostname information: + echo -e "\e[31;43m***** HOSTNAME INFORMATION *****\e[0m" + hostnamectl + echo "" + # -File system disk space usage: + echo -e "\e[31;43m***** FILE SYSTEM DISK SPACE USAGE *****\e[0m" + df -h + echo "" + # -Free and used memory in the system: + echo -e "\e[31;43m ***** FREE AND USED MEMORY *****\e[0m" + free + echo "" + # -System uptime and load: + echo -e "\e[31;43m***** SYSTEM UPTIME AND LOAD *****\e[0m" + uptime + echo "" + # -Logged-in users: + echo -e "\e[31;43m***** CURRENTLY LOGGED-IN USERS *****\e[0m" + who + echo "" + # -Top 5 processes as far as memory usage is concerned + echo -e "\e[31;43m***** TOP 5 MEMORY-CONSUMING PROCESSES *****\e[0m" + ps -eo %mem,%cpu,comm --sort=-%mem | head -n 6 + echo "" + echo -e "\e[1;32mDone.\e[0m" + +Next, give the script execute permissions: + + # chmod +x system_info.sh + +and run it: + + ./system_info.sh + +Note that the headers of each section are shown in color for better visualization: + +![Server Monitoring Shell Script](http://www.tecmint.com/wp-content/uploads/2015/08/Server-Monitoring-Shell-Script.png) + +Server Monitoring Shell Script + +That functionality is provided by this command: + + echo -e "\e[COLOR1;COLOR2m\e[0m" + +Where COLOR1 and COLOR2 are the foreground and background colors, respectively (more info and options are explained in this entry from the [Arch Linux Wiki][5]) and is the string that you want to show in color. + +### Automating Tasks ### + +The tasks that you may need to automate may vary from case to case. Thus, we cannot possibly cover all of the possible scenarios in a single article, but we will present three classic tasks that can be automated using shell scripting: + +**1)** update the local file database, 2) find (and alternatively delete) files with 777 permissions, and 3) alert when filesystem usage surpasses a defined limit. + +Let’s create a file named `auto_tasks.sh` in our scripts directory with the following content: + + #!/bin/bash + + # Sample script to automate tasks: + # -Update local file database: + echo -e "\e[4;32mUPDATING LOCAL FILE DATABASE\e[0m" + updatedb + if [ $? == 0 ]; then + echo "The local file database was updated correctly." + else + echo "The local file database was not updated correctly." + fi + echo "" + + # -Find and / or delete files with 777 permissions. + echo -e "\e[4;32mLOOKING FOR FILES WITH 777 PERMISSIONS\e[0m" + # Enable either option (comment out the other line), but not both. + # Option 1: Delete files without prompting for confirmation. Assumes GNU version of find. + #find -type f -perm 0777 -delete + # Option 2: Ask for confirmation before deleting files. More portable across systems. + find -type f -perm 0777 -exec rm -i {} +; + echo "" + # -Alert when file system usage surpasses a defined limit + echo -e "\e[4;32mCHECKING FILE SYSTEM USAGE\e[0m" + THRESHOLD=30 + while read line; do + # This variable stores the file system path as a string + FILESYSTEM=$(echo $line | awk '{print $1}') + # This variable stores the use percentage (XX%) + PERCENTAGE=$(echo $line | awk '{print $5}') + # Use percentage without the % sign. + USAGE=${PERCENTAGE%?} + if [ $USAGE -gt $THRESHOLD ]; then + echo "The remaining available space in $FILESYSTEM is critically low. Used: $PERCENTAGE" + fi + done < <(df -h --total | grep -vi filesystem) + +Please note that there is a space between the two `<` signs in the last line of the script. + +![Shell Script to Find 777 Permissions](http://www.tecmint.com/wp-content/uploads/2015/08/Shell-Script-to-Find-777-Permissions.png) + +Shell Script to Find 777 Permissions + +### Using Cron ### + +To take efficiency one step further, you will not want to sit in front of your computer and run those scripts manually. Rather, you will use cron to schedule those tasks to run on a periodic basis and sends the results to a predefined list of recipients via email or save them to a file that can be viewed using a web browser. + +The following script (filesystem_usage.sh) will run the well-known **df -h** command, format the output into a HTML table and save it in the **report.html** file: + + #!/bin/bash + # Sample script to demonstrate the creation of an HTML report using shell scripting + # Web directory + WEB_DIR=/var/www/html + # A little CSS and table layout to make the report look a little nicer + echo " + + + + + " > $WEB_DIR/report.html + # View hostname and insert it at the top of the html body + HOST=$(hostname) + echo "Filesystem usage for host $HOST
+ Last updated: $(date)

+ + " >> $WEB_DIR/report.html + # Read the output of df -h line by line + while read line; do + echo "" >> $WEB_DIR/report.html + done < <(df -h | grep -vi filesystem) + echo "
Filesystem + Size + Use % +
" >> $WEB_DIR/report.html + echo $line | awk '{print $1}' >> $WEB_DIR/report.html + echo "" >> $WEB_DIR/report.html + echo $line | awk '{print $2}' >> $WEB_DIR/report.html + echo "" >> $WEB_DIR/report.html + echo $line | awk '{print $5}' >> $WEB_DIR/report.html + echo "
" >> $WEB_DIR/report.html + +In our **RHEL 7** server (**192.168.0.18**), this looks as follows: + +![Server Monitoring Report](http://www.tecmint.com/wp-content/uploads/2015/08/Server-Monitoring-Report.png) + +Server Monitoring Report + +You can add to that report as much information as you want. To run the script every day at 1:30 pm, add the following crontab entry: + + 30 13 * * * /root/scripts/filesystem_usage.sh + +### Summary ### + +You will most likely think of several other tasks that you want or need to automate; as you can see, using shell scripting will greatly simplify this effort. Feel free to let us know if you find this article helpful and don't hesitate to add your own ideas or comments via the form below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/using-shell-script-to-automate-linux-system-maintenance-tasks/ + +作者:[Gabriel Cánepa][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/linux-performance-monitoring-and-file-system-statistics-reports/ +[2]:https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29 +[3]:http://www.tecmint.com/wp-content/pdf/bash.pdf +[4]:http://www.tecmint.com/60-commands-of-linux-a-guide-from-newbies-to-system-administrator/ +[5]:https://wiki.archlinux.org/index.php/Color_Bash_Prompt \ No newline at end of file From 71b69ec5747ae3160a79e0fd15dd181d35871fa6 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Sun, 16 Aug 2015 02:59:16 +0800 Subject: [PATCH 1748/2517] =?UTF-8?q?20150816-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...raphics Drivers PPA Is Ready For Action.md | 62 ++++++ ...box--A Web based AJAX Terminal Emulator.md | 157 +++++++++++++++ ...ow to migrate MySQL to MariaDB on Linux.md | 186 ++++++++++++++++++ 3 files changed, 405 insertions(+) create mode 100644 sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md create mode 100644 sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md create mode 100644 sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md diff --git a/sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md b/sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md new file mode 100644 index 0000000000..e2a78e88dc --- /dev/null +++ b/sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md @@ -0,0 +1,62 @@ +Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/Screen-Shot-2015-08-12-at-14.19.42.png) + +Get your frame-rate on + +**Well, that didn’t take long. ** + +Just days after [proposing][1] the creation of a new PPA to provide Ubuntu users with the latest NVIDIA graphics drivers the Ubuntu community has clubbed together to do, well, just that. + +The plainly named ‘**Graphics Drivers PPA**‘ contains the latest release of NVIDIA’s proprietary Linux grapics drivers, packaged up for Ubuntu users to upgrade to – no binary runtime headaches needed! + +The PPA is designed to offer gamers a way to run the latest games on the latest on Ubuntu as easily as possible. + +#### Ready, But Not Ready #### + +Jorge Castro’s idea to create a ‘blessed’ PPA containing newer NVIDIA graphics drivers for those wot want ’em has been greeted with enthusiasm by Ubuntu users and games developers alike. + +Even those involved in porting some of Steam’s biggest titles to Linux have chimed in to offer advice and suggestions. + +Edwin Smith, head of production at Feral Interactive (‘Shadow of Mordor’) welcomed the initiative to prove users with “easier way of updating drivers”. + +### How To Use The New Nvidia Drivers PPA ### + +Although the new ‘Graphic Drivers PPA’ is live it is not strictly ready for the prime time. Its maintainers caution: + +> “This PPA is currently in testing, you should be experienced with packaging before you dive in here. Give a few days to sort out the kinks.” + +Jorge, who soft launched the PPA in a post to the Ubuntu desktop mailing list, also notes that gamers using existing PPAs, like xorg-edgers, for timely graphics driver updates won’t notice any driver difference for now (as the drivers have simply been copied over from some of those PPAs to this new one). + +“The real fun begins when new drivers are released,” he adds. + +Right now, as of writing, the PPA contains a batch of recent Nvidia drivers for Ubuntu 12.04.1 through 15.10. Note all drivers are available for all releases. + +> **It should go without saying: unless you know what you’re doing, and how to undo it, do not follow the instructions that follow. ** + +To add the PPA run the following in a new Terminal window: + + sudo add-apt-repository ppa:graphics-drivers/ppa + +To upgrade to or install the latest Nvidia drivers: + + sudo apt-get update && sudo apt-get install nvidia-355 + +Remember: if the PPA breaks your system you are allowed to keep both halves. + +To roll back/undo changes made the PPA you should use the ppa-purge command. + +Feel free to leave any advice/help/corrections/thoughts on the PPA (and as I don’t have NVIDIA hardware to test the above out for myself, it’s all appreciated) in the comments below. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/08/ubuntu-nvidia-graphics-drivers-ppa-is-ready-for-action + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux-drivers \ No newline at end of file diff --git a/sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md b/sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md new file mode 100644 index 0000000000..002a2ed10f --- /dev/null +++ b/sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md @@ -0,0 +1,157 @@ +shellinabox – A Web based AJAX Terminal Emulator +================================================================================ +### About shellinabox ### + +Greetings Unixmen readers! + +We, usually, access any remote servers using well known communication tools like OpenSSH, and Putty etc. But, one important thing is we can’t access the remote systems using those tools behind a Firewall or the firewalls that allow only HTTPS traffic. No worries! We, still, have some options to access your remote systems even if you’re behind a firewall. And also, you don’t need to install any communications tools like OpenSSH or Putty. All you need is only a modern JavaScript and CSS enabled browser. And you don’t need to install any plugins or third party softwares either. + +Meet **Shell In A Box**, pronounced as **shellinabox**, a free, open source, web based AJAX Terminal emulator developed by **Markus Gutschke**. It uses AJAX technology to provide the look and feel of a native shell via a web browser. The **shellinaboxd** daemon implements a webserver that listens on the specified port. The web server publishes one or more services that will be displayed in a VT100 emulator implemented as an AJAX web application. By default, the port is 4200. You can change the default port to any random port number of your choice. After installing shellinabox on all your remote servers that you want to access them from your local system, open up the web browser and navigate to: **http://IP-Address:4200/**. Enter your user name and password and start using your remote system’s shell. Seems interesting, isn’t it? Indeed! + +**Disclaimer**: + +Shellinabox is not a ssh client or any sort of security software. It is just a application that emulates a remote system’s shell via a web browser. Also, It has nothing to do with SSH in anyway. It’s not a bullet proof security way to remote your systems. It is just one of the easiest methods so far. You should not run it on any public network for any reason. + +### Install shellinabox ### + +#### In Debian/Ubuntu based systems: #### + +shellinabox is available in the default repositories. So, you can install it using command: + + $ sudo apt-get install shellinabox + +#### In RHEL/CentOS systems: #### + +First, install EPEL repository using command: + + # yum install epel-release + +Then, install shellinabox using command: + + # yum install shellinabox + +Done! + +### Configure shellinabox ### + +As I mentioned before, shellinabox listens on port **4200** by default. You can change this port to any random number of your choice to make it difficult to guess by anyone. + +The shellinabox config file is located in **/etc/default/shellinabox** file by default in Debian/Ubuntu systems. In RHEL/CentOS/Fedora, the default location of config file is **/etc/sysconfig/shellinaboxd**. + +If you want to change the default port, + +In Debian/Ubuntu: + + $ sudo vi /etc/default/shellinabox + +In RHEL/CentOS/Fedora: + + # vi /etc/sysconfig/shellinaboxd + +Change your port to any random number. Since I am testing it on my local network, I use the default values. + + # Shell in a box daemon configuration + # For details see shellinaboxd man page + + # Basic options + USER=shellinabox + GROUP=shellinabox + CERTDIR=/var/lib/shellinabox + PORT=4200 + OPTS="--disable-ssl-menu -s /:LOGIN" + + # Additional examples with custom options: + + # Fancy configuration with right-click menu choice for black-on-white: + # OPTS="--user-css Normal:+black-on-white.css,Reverse:-white-on-black.css --disable-ssl-menu -s /:LOGIN" + + # Simple configuration for running it as an SSH console with SSL disabled: + # OPTS="-t -s /:SSH:host.example.com" + +Restart shelinabox service. + +**In Debian/Ubuntu:** + + $ sudo systemctl restart shellinabox + +Or + + $ sudo service shellinabox restart + +In RHEL/CentOS systems run the following command to start shellinaboxd service automatically on every reboot. + + # systemctl enable shellinaboxd + +Or + + # chkconfig shellinaboxd on + +Remember to open up port **4200** or any port that you assign if you are running a firewall. + +For example, in RHEL/CentOS systems, you can allow the port as shown below. + + # firewall-cmd --permanent --add-port=4200/tcp + +---------- + + # firewall-cmd --reload + +### Usage ### + +Now, go to your client systems, open up the web browser and navigate to: **https://ip-address-of-remote-servers:4200**. + +**Note**: Mention the correct port if you have changed it. + +You’ll get a warning message of certificate issue. Accept the certificate and go on. + +![Privacy error - Google Chrome_001](http://www.unixmen.com/wp-content/uploads/2015/08/Privacy-error-Google-Chrome_001.jpg) + +Enter your remote system’s username and password. Now, you’ll be able to access the remote system’s shell right from the browser itself. + +![Shell In A Box - Google Chrome_003](http://www.unixmen.com/wp-content/uploads/2015/08/sk@server1-Shell-In-A-Box-Google-Chrome_003.jpg) + +You can get some additional menu options which might be useful by right clicking on the empty space of your browser. + +![Shell In A Box - Google Chrome_004](http://www.unixmen.com/wp-content/uploads/2015/08/sk@server1-Shell-In-A-Box-Google-Chrome_004.jpg) + +From now on, you can do whatever you want to do in your remote server from the local system’s web browser. + +Once you done, type **exit** in the shell. + +To connect again to the remote system, click the **Connect** button and then type the user name and password of your remote server. + +![Shell In A Box - Google Chrome_005](http://www.unixmen.com/wp-content/uploads/2015/08/sk@server1-Shell-In-A-Box-Google-Chrome_005.jpg) + +For more details about shellinabox, type the following command in your Terminal: + + # man shellinabox + +Or + + # shellinaboxd -help + +Also, refer the [shellinabox wiki page][1] for comprehensive usage details. + +### Conclusion ### + +Like I mentioned before, web-based SSH tools are very useful if you’re running servers behind a Firewall. There are many web-based ssh tools, but Shellinabox is pretty simple and useful tool to emulate a remote system’s shell from anywhere in your network. Since, it is browser based, you can access your remote server from any device as long as you have a JavaScript and CSS enabled browser. + +That’s all for now. Have a good day! + +#### Reference link: #### + +- [shellinabox website][2] + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/shellinabox-a-web-based-ajax-terminal-emulator/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:https://code.google.com/p/shellinabox/wiki/shellinaboxd_man +[2]:https://code.google.com/p/shellinabox/ \ No newline at end of file diff --git a/sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md b/sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md new file mode 100644 index 0000000000..8c1b68b1ed --- /dev/null +++ b/sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md @@ -0,0 +1,186 @@ +How to migrate MySQL to MariaDB on Linux +================================================================================ +Since the Oracle's acquisition of MySQL, a lot of MySQL developers and users moved away from MySQL due to Oracle's more closed-door stance on MySQL development and maintenance. The community-driven outcome of such movement is a fork of MySQL, called MariaDB. Led by original MySQL developers, the development of MariaDB follows the open-source philosophy and makes sure of [its binary compatibility with MySQL][1]. The Linux distributions such as Red Hat families (Fedora, CentOS, RHEL), Ubuntu and Mint, openSUSE and Debian already started to use and support MariaDB as a drop-in replacement of MySQL. + +If you want to migrate your database from MySQL to MariaDB, this article is what you are looking for. Fortunately, due to their binary compatibility, MySQL-to-MariaDB migration process is pretty much straightforward. If you follow the steps below, the migration from MySQL to MariaDB will most likely be painless. + +### Prepare a MySQL Database and a Table ### + +For demonstration purpose, let's create a test MySQL database and one table in the database before doing the migration. Skip this step if you already have existing MySQL database(s) to migrate to MariaDB. Otherwise proceed as follows. + +Log in into MySQL from a terminal by typing your MySQL root user password. + + $ mysql -u root -p + +Create a database and a table. + + mysql> create database test01; + mysql> use test01; + mysql> create table pet(name varchar(30), owner varchar(30), species varchar(20), sex char(1)); + +Add some records to the table. + + mysql> insert into pet values('brandon','Jack','puddle','m'),('dixie','Danny','chihuahua','f'); + +Then quit the MySQL database. + +### Backup the MySQL Database ### + +The next step is to back up existing MySQL database(s). Use the following mysqldump command to export all existing databases to a file. Before running this command, make sure that binary logging is enabled in your MySQL server. If you don't know how to enable binary logging, see the instructions toward the end of the tutorial. + + $ mysqldump --all-databases --user=root --password --master-data > backupdb.sql + +![](https://farm6.staticflickr.com/5775/20555772385_21b89335e3_b.jpg) + +Now create a backup of my.cnf file somewhere in your system before uninstalling MySQL. This step is optional. + + $ sudo cp /etc/mysql/my.cnf /opt/my.cnf.bak + +### Uninstall MySQL Package ### + +First, you need to stop the MySQL service. + + $ sudo service mysql stop + +or: + + $ sudo systemctl stop mysql + +or: + + $ sudo /etc/init.d/mysql stop + +Then go ahead and remove MySQL packages and configurations as follows. + +On RPM based system (e.g., CentOS, Fedora or RHEL): + + $ sudo yum remove mysql* mysql-server mysql-devel mysql-libs + $ sudo rm -rf /var/lib/mysql + +On Debian based system (e.g., Debian, Ubuntu or Mint): + + $ sudo apt-get remove mysql-server mysql-client mysql-common + $ sudo apt-get autoremove + $ sudo apt-get autoclean + $ sudo deluser mysql + $ sudo rm -rf /var/lib/mysql + +### Install MariaDB Package ### + +The latest CentOS/RHEL 7 and Ubuntu (14.04 or later) contain MariaDB packages in their official repositories. In Fedora, MariaDB has become a replacement of MySQL since version 19. If you are using an old version or LTS type like Ubuntu 13.10 or earlier, you still can install MariaDB by adding its official repository. + +[MariaDB website][2] provide an online tool to help you add MariaDB's official repository according to your Linux distribution. This tool provides steps to add the MariaDB repository for openSUSE, Arch Linux, Mageia, Fedora, CentOS, RedHat, Mint, Ubuntu, and Debian. + +![](https://farm6.staticflickr.com/5809/20367745260_073020b910_c.jpg) + +As an example, let's use the Ubuntu 14.04 distribution and CentOS 7 to configure the MariaDB repository. + +**Ubuntu 14.04** + + $ sudo apt-get install software-properties-common + $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db + $ sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' + $ sudo apt-get update + $ sudo apt-get install mariadb-server + +**CentOS 7** + +Create a custom yum repository file for MariaDB as follows. + + $ sudo vi /etc/yum.repos.d/MariaDB.repo + +---------- + + [mariadb] + name = MariaDB + baseurl = http://yum.mariadb.org/5.5/centos7-amd64 + gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB + gpgcheck=1 + +---------- + + $ sudo yum install MariaDB-server MariaDB-client + +After all necessary packages are installed, you may be asked to type a new password for root user account. After setting the root password, don't forget to recover my.cnf backup file. + + $ sudo cp /opt/my.cnf /etc/mysql/ + +Now start MariaDB service as follows. + + $ sudo service mariadb start + +or: + + $ sudo systemctl start mariadb + +or: + + $ sudo /etc/init.d/mariadb start + +### Importing MySQL Database(s) ### + +Finally, we have to import the previously exported database(s) back to MariaDB server as follows. + + $ mysql -u root -p < backupdb.sql + +Enter your MariaDB's root password, and the database import process will start. When the import process is finished, it will return to a command prompt. + +To check whether or not the import process is completed successfully, log in into MariaDB server and perform some sample queries. + + $ mysql -u root -p + +---------- + + MariaDB [(none)]> show databases; + MariaDB [(none)]> use test01; + MariaDB [test01]> select * from pet; + +![](https://farm6.staticflickr.com/5820/20562243721_428a9a12a7_b.jpg) + +### Conclusion ### + +As you can see in this tutorial, MySQL-to-MariaDB migration is not difficult. MariaDB has a lot of new features than MySQL, that you should know about. As far as configuration is concerned, in my test case, I simply used my old MySQL configuration file (my.cnf) as a MariaDB configuration file, and the import process was completed fine without any issue. My suggestion for the configuration is that you read the documentation on MariaDB configuration options carefully before the migration, especially if you are using specific MySQL configurations. + +If you are running more complex setup with tons of tables and databases including clustering or master-slave replication, take a look at the [more detailed guide][3] by the Mozilla IT and Operations team, or the [official MariaDB documentation][4]. + +### Troubleshooting ### + +1. While running mysqldump command to back up databases, you are getting the following error. + + $ mysqldump --all-databases --user=root --password --master-data > backupdb.sql + +---------- + + mysqldump: Error: Binlogging on server not active + +By using "--master-data", you are trying to include binary log information in the exported output, which is useful for database replication and recovery. However, binary logging is not enabled in MySQL server. To fix this error, modify your my.cnf file, and add the following option under [mysqld] section. + + log-bin=mysql-bin + +Save my.cnf file, and restart the MySQL service: + + $ sudo service mysql restart + +or: + + $ sudo systemctl restart mysql + +or: + + $ sudo /etc/init.d/mysql restart + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/migrate-mysql-to-mariadb-linux.html + +作者:[Kristophorus Hadiono][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/kristophorus +[1]:https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/ +[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=aasaam +[3]:https://blog.mozilla.org/it/2013/12/16/upgrading-from-mysql-5-1-to-mariadb-5-5/ +[4]:https://mariadb.com/kb/en/mariadb/documentation/ \ No newline at end of file From bf1893ed319087970b2a8b1cf72ba1cbc4f11871 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sun, 16 Aug 2015 08:45:34 +0800 Subject: [PATCH 1749/2517] Update 20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md --- ... Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md b/sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md index e2a78e88dc..9309069bb8 100644 --- a/sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md +++ b/sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md @@ -1,3 +1,5 @@ +DongShuaike is translating. + Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/Screen-Shot-2015-08-12-at-14.19.42.png) @@ -59,4 +61,4 @@ via: http://www.omgubuntu.co.uk/2015/08/ubuntu-nvidia-graphics-drivers-ppa-is-re 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux-drivers \ No newline at end of file +[1]:http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux-drivers From 04b06a015b47139520f7940ee17e5a2d5e861c8b Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 16 Aug 2015 09:51:17 +0800 Subject: [PATCH 1750/2517] Update 20150816 How to migrate MySQL to MariaDB on Linux.md --- .../tech/20150816 How to migrate MySQL to MariaDB on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md b/sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md index 8c1b68b1ed..83dfe7b923 100644 --- a/sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md +++ b/sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md @@ -1,3 +1,4 @@ +translation by strugglingyouth How to migrate MySQL to MariaDB on Linux ================================================================================ Since the Oracle's acquisition of MySQL, a lot of MySQL developers and users moved away from MySQL due to Oracle's more closed-door stance on MySQL development and maintenance. The community-driven outcome of such movement is a fork of MySQL, called MariaDB. Led by original MySQL developers, the development of MariaDB follows the open-source philosophy and makes sure of [its binary compatibility with MySQL][1]. The Linux distributions such as Red Hat families (Fedora, CentOS, RHEL), Ubuntu and Mint, openSUSE and Debian already started to use and support MariaDB as a drop-in replacement of MySQL. @@ -183,4 +184,4 @@ via: http://xmodulo.com/migrate-mysql-to-mariadb-linux.html [1]:https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/ [2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=aasaam [3]:https://blog.mozilla.org/it/2013/12/16/upgrading-from-mysql-5-1-to-mariadb-5-5/ -[4]:https://mariadb.com/kb/en/mariadb/documentation/ \ No newline at end of file +[4]:https://mariadb.com/kb/en/mariadb/documentation/ From 83ff975b611de4e0b84c8d799c2a0c1cd13056b0 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sun, 16 Aug 2015 10:14:53 +0800 Subject: [PATCH 1751/2517] Delete 20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md --- ...raphics Drivers PPA Is Ready For Action.md | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md diff --git a/sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md b/sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md deleted file mode 100644 index 9309069bb8..0000000000 --- a/sources/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md +++ /dev/null @@ -1,64 +0,0 @@ -DongShuaike is translating. - -Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/Screen-Shot-2015-08-12-at-14.19.42.png) - -Get your frame-rate on - -**Well, that didn’t take long. ** - -Just days after [proposing][1] the creation of a new PPA to provide Ubuntu users with the latest NVIDIA graphics drivers the Ubuntu community has clubbed together to do, well, just that. - -The plainly named ‘**Graphics Drivers PPA**‘ contains the latest release of NVIDIA’s proprietary Linux grapics drivers, packaged up for Ubuntu users to upgrade to – no binary runtime headaches needed! - -The PPA is designed to offer gamers a way to run the latest games on the latest on Ubuntu as easily as possible. - -#### Ready, But Not Ready #### - -Jorge Castro’s idea to create a ‘blessed’ PPA containing newer NVIDIA graphics drivers for those wot want ’em has been greeted with enthusiasm by Ubuntu users and games developers alike. - -Even those involved in porting some of Steam’s biggest titles to Linux have chimed in to offer advice and suggestions. - -Edwin Smith, head of production at Feral Interactive (‘Shadow of Mordor’) welcomed the initiative to prove users with “easier way of updating drivers”. - -### How To Use The New Nvidia Drivers PPA ### - -Although the new ‘Graphic Drivers PPA’ is live it is not strictly ready for the prime time. Its maintainers caution: - -> “This PPA is currently in testing, you should be experienced with packaging before you dive in here. Give a few days to sort out the kinks.” - -Jorge, who soft launched the PPA in a post to the Ubuntu desktop mailing list, also notes that gamers using existing PPAs, like xorg-edgers, for timely graphics driver updates won’t notice any driver difference for now (as the drivers have simply been copied over from some of those PPAs to this new one). - -“The real fun begins when new drivers are released,” he adds. - -Right now, as of writing, the PPA contains a batch of recent Nvidia drivers for Ubuntu 12.04.1 through 15.10. Note all drivers are available for all releases. - -> **It should go without saying: unless you know what you’re doing, and how to undo it, do not follow the instructions that follow. ** - -To add the PPA run the following in a new Terminal window: - - sudo add-apt-repository ppa:graphics-drivers/ppa - -To upgrade to or install the latest Nvidia drivers: - - sudo apt-get update && sudo apt-get install nvidia-355 - -Remember: if the PPA breaks your system you are allowed to keep both halves. - -To roll back/undo changes made the PPA you should use the ppa-purge command. - -Feel free to leave any advice/help/corrections/thoughts on the PPA (and as I don’t have NVIDIA hardware to test the above out for myself, it’s all appreciated) in the comments below. - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/08/ubuntu-nvidia-graphics-drivers-ppa-is-ready-for-action - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux-drivers From 3dc4222fa12ead237c9b256a171beaf6d9071e5d Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sun, 16 Aug 2015 10:15:33 +0800 Subject: [PATCH 1752/2517] Create 20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md --- ...raphics Drivers PPA Is Ready For Action.md | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 translated/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md diff --git a/translated/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md b/translated/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md new file mode 100644 index 0000000000..3726a6465a --- /dev/null +++ b/translated/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md @@ -0,0 +1,66 @@ +Ubuntu NVIDIA显卡驱动PPA已经做好准备 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/Screen-Shot-2015-08-12-at-14.19.42.png) + +加速你的帧频! + +**嘿,各位,稍安勿躁,很快就好。** + +就在提议开发一个新的PPA来提供给Ubuntu用户们最新的NVIDIA显卡驱动后不久,ubuntu社区的人们又集结起来了,就是为了这件事。 + +顾名思义,‘**Graphics Drivers PPA**’包含了最新的NVIDIA Linux显卡驱动发行版,打包起来给用户升级用——没有让人头疼的二进制运行时文件! + +PPA被设计用来让家们尽可能方便地在Ubuntu上上运行最新款的游戏。 + +#### 万事俱备,只欠东风 #### + +Jorge Castro开发一个包含NVIDIA最新显卡驱动的PPA神器的想法得到了Ubuntu用户和广大游戏开发者的热烈响应。 + +就连那些致力于将游戏从“Steam平台”移植到Linux的游戏人员,也给了不少建议。 + +Edwin Smith,Feral Interactive公司的生产总监,对于“开发PPA源,让用户更方便地更新驱动”这种原创行为表示非常欣慰。 + +### 如何使用最新的Nvidia Drivers PPA### + +虽然新的“显卡PPA”已经开发出来,但是现在还远远达不到成熟。开发者们提醒到: + +>“这款PPA还处于测试阶段,在你使用它之前最好对打包经验丰富。请大家稍安勿躁,再等几天。” + +将PPA试发布给Ubuntu desktop邮件列表的Jorge,也强调说,使用现行的一些PPA(比如xorg-edgers)的玩家可能发现不了什么区别(因为现在的驱动只不过是把内容从其他那些现存驱动拷贝过来了) + +“新驱动发布的时候,好戏才会上演呢,”他说。 + +截至写作本文时为止,这个PPA囊括了从Ubuntu 12.04.1到 15.10各个版本的Nvidia驱动。注意这些驱动对所有的发行版都适用。 + +> **毫无疑问,除非你清楚自己在干些什么,并且知道如果出了问题应该怎么撤销,否则就不要进行下面的操作。** + +新打开一个终端窗口,运行下面的命令加入PPA: + + sudo add-apt-repository ppa:graphics-drivers/ppa + +安装或更新到最新的Nvidia显卡驱动: + + sudo apt-get update && sudo apt-get install nvidia-355 + +记住:如果PPA把你的系统弄崩了,你可得自己去想办法,我们提醒过了哦。(译者注:切记!) + +如果想要撤销对PPA的改变,使用ppa-purge命令。 + +有什么意见,想法,或者指正,就在下面的评论栏里写下来吧。(我没有NVIDIA的硬件来为我自己验证上面的这些东西,如果你可以验证的话,那就太感谢了。) + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/08/ubuntu-nvidia-graphics-drivers-ppa-is-ready-for-action + +作者:[Joey-Elijah Sneddon][a] +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux-drivers + + + + From 4df5e8680dd705fad61bbe298684e8a24bb46391 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 16 Aug 2015 10:56:35 +0800 Subject: [PATCH 1753/2517] PUB:20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @DongShuaike 翻译的挺好~加油。 --- ...raphics Drivers PPA Is Ready For Action.md | 66 +++++++++++++++++++ ...raphics Drivers PPA Is Ready For Action.md | 66 ------------------- 2 files changed, 66 insertions(+), 66 deletions(-) create mode 100644 published/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md delete mode 100644 translated/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md diff --git a/published/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md b/published/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md new file mode 100644 index 0000000000..a310c6be3a --- /dev/null +++ b/published/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md @@ -0,0 +1,66 @@ +Ubuntu NVIDIA 显卡驱动 PPA 已经做好准备 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/Screen-Shot-2015-08-12-at-14.19.42.png) + +加速你的帧率! + +**嘿,各位,稍安勿躁,很快就好。** + +就在提议开发一个[新的 PPA][1] 来给 Ubuntu 用户们提供最新的 NVIDIA 显卡驱动后不久,ubuntu 社区的人们又集结起来了,就是为了这件事。 + +顾名思义,‘**Graphics Drivers PPA**’ 包含了最新的 NVIDIA Linux 显卡驱动发布,已经打包好可供用户升级使用,没有让人头疼的二进制运行时文件! + +这个 PPA 被设计用来让玩家们尽可能方便地在 Ubuntu 上运行最新款的游戏。 + +#### 万事俱备,只欠东风 #### + +Jorge Castro 开发一个包含 NVIDIA 最新显卡驱动的 PPA 神器的想法得到了 Ubuntu 用户和广大游戏开发者的热烈响应。 + +就连那些致力于将“Steam平台”上的知名大作移植到 Linux 上的人们,也给了不少建议。 + +Edwin Smith,Feral Interactive 公司(‘Shadow of Mordor’) 的产品总监,对于“让用户更方便地更新驱动”的倡议表示非常欣慰。 + +### 如何使用最新的 Nvidia Drivers PPA### + +虽然新的“显卡PPA”已经开发出来,但是现在还远远达不到成熟。开发者们提醒到: + +> “这个 PPA 还处于测试阶段,在你使用它之前最好有一些打包的经验。请大家稍安勿躁,再等几天。” + +将 PPA 试发布给 Ubuntu desktop 邮件列表的 Jorge,也强调说,使用现行的一些 PPA(比如 xorg-edgers)的玩家可能发现不了什么区别(因为现在的驱动只不过是把内容从其他那些现存驱动拷贝过来了) + +“新驱动发布的时候,好戏才会上演呢,”他说。 + +截至写作本文时为止,这个 PPA 囊括了从 Ubuntu 12.04.1 到 15.10 各个版本的 Nvidia 驱动。注意这些驱动对所有的发行版都适用。 + +> **毫无疑问,除非你清楚自己在干些什么,并且知道如果出了问题应该怎么撤销,否则就不要进行下面的操作。** + +新打开一个终端窗口,运行下面的命令加入 PPA: + + sudo add-apt-repository ppa:graphics-drivers/ppa + +安装或更新到最新的 Nvidia 显卡驱动: + + sudo apt-get update && sudo apt-get install nvidia-355 + +记住:如果PPA把你的系统弄崩了,你可得自己去想办法,我们提醒过了哦。(译者注:切记!) + +如果想要撤销对PPA的改变,使用 `ppa-purge` 命令。 + +有什么意见,想法,或者指正,就在下面的评论栏里写下来吧。(我没有 NVIDIA 的硬件来为我自己验证上面的这些东西,如果你可以验证的话,那就太感谢了。) + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/08/ubuntu-nvidia-graphics-drivers-ppa-is-ready-for-action + +作者:[Joey-Elijah Sneddon][a] +译者:[DongShuaike](https://github.com/DongShuaike) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://linux.cn/article-6030-1.html + + + + diff --git a/translated/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md b/translated/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md deleted file mode 100644 index 3726a6465a..0000000000 --- a/translated/news/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md +++ /dev/null @@ -1,66 +0,0 @@ -Ubuntu NVIDIA显卡驱动PPA已经做好准备 -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/Screen-Shot-2015-08-12-at-14.19.42.png) - -加速你的帧频! - -**嘿,各位,稍安勿躁,很快就好。** - -就在提议开发一个新的PPA来提供给Ubuntu用户们最新的NVIDIA显卡驱动后不久,ubuntu社区的人们又集结起来了,就是为了这件事。 - -顾名思义,‘**Graphics Drivers PPA**’包含了最新的NVIDIA Linux显卡驱动发行版,打包起来给用户升级用——没有让人头疼的二进制运行时文件! - -PPA被设计用来让家们尽可能方便地在Ubuntu上上运行最新款的游戏。 - -#### 万事俱备,只欠东风 #### - -Jorge Castro开发一个包含NVIDIA最新显卡驱动的PPA神器的想法得到了Ubuntu用户和广大游戏开发者的热烈响应。 - -就连那些致力于将游戏从“Steam平台”移植到Linux的游戏人员,也给了不少建议。 - -Edwin Smith,Feral Interactive公司的生产总监,对于“开发PPA源,让用户更方便地更新驱动”这种原创行为表示非常欣慰。 - -### 如何使用最新的Nvidia Drivers PPA### - -虽然新的“显卡PPA”已经开发出来,但是现在还远远达不到成熟。开发者们提醒到: - ->“这款PPA还处于测试阶段,在你使用它之前最好对打包经验丰富。请大家稍安勿躁,再等几天。” - -将PPA试发布给Ubuntu desktop邮件列表的Jorge,也强调说,使用现行的一些PPA(比如xorg-edgers)的玩家可能发现不了什么区别(因为现在的驱动只不过是把内容从其他那些现存驱动拷贝过来了) - -“新驱动发布的时候,好戏才会上演呢,”他说。 - -截至写作本文时为止,这个PPA囊括了从Ubuntu 12.04.1到 15.10各个版本的Nvidia驱动。注意这些驱动对所有的发行版都适用。 - -> **毫无疑问,除非你清楚自己在干些什么,并且知道如果出了问题应该怎么撤销,否则就不要进行下面的操作。** - -新打开一个终端窗口,运行下面的命令加入PPA: - - sudo add-apt-repository ppa:graphics-drivers/ppa - -安装或更新到最新的Nvidia显卡驱动: - - sudo apt-get update && sudo apt-get install nvidia-355 - -记住:如果PPA把你的系统弄崩了,你可得自己去想办法,我们提醒过了哦。(译者注:切记!) - -如果想要撤销对PPA的改变,使用ppa-purge命令。 - -有什么意见,想法,或者指正,就在下面的评论栏里写下来吧。(我没有NVIDIA的硬件来为我自己验证上面的这些东西,如果你可以验证的话,那就太感谢了。) - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/08/ubuntu-nvidia-graphics-drivers-ppa-is-ready-for-action - -作者:[Joey-Elijah Sneddon][a] -译者:[DongShuaike](https://github.com/DongShuaike) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.omgubuntu.co.uk/2015/08/ubuntu-easy-install-latest-nvidia-linux-drivers - - - - From faaf65211719dfa5152015f20cf6780b4a17beec Mon Sep 17 00:00:00 2001 From: XIAOYU <1136299502@qq.com> Date: Sun, 16 Aug 2015 11:43:06 +0800 Subject: [PATCH 1754/2517] translating by xiaoyu33 translating by xiaoyu33 --- ...0150816 shellinabox--A Web based AJAX Terminal Emulator.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md b/sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md index 002a2ed10f..c6f44a30f5 100644 --- a/sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md +++ b/sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md @@ -1,3 +1,5 @@ +translating by xiaoyu33 + shellinabox – A Web based AJAX Terminal Emulator ================================================================================ ### About shellinabox ### @@ -154,4 +156,4 @@ via: http://www.unixmen.com/shellinabox-a-web-based-ajax-terminal-emulator/ [a]:http://www.unixmen.com/author/sk/ [1]:https://code.google.com/p/shellinabox/wiki/shellinaboxd_man -[2]:https://code.google.com/p/shellinabox/ \ No newline at end of file +[2]:https://code.google.com/p/shellinabox/ From fd32cc53be0833b4a5609b44c75ade3a6b884f73 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 16 Aug 2015 12:58:38 +0800 Subject: [PATCH 1755/2517] Delete 20150816 How to migrate MySQL to MariaDB on Linux.md --- ...ow to migrate MySQL to MariaDB on Linux.md | 187 ------------------ 1 file changed, 187 deletions(-) delete mode 100644 sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md diff --git a/sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md b/sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md deleted file mode 100644 index 83dfe7b923..0000000000 --- a/sources/tech/20150816 How to migrate MySQL to MariaDB on Linux.md +++ /dev/null @@ -1,187 +0,0 @@ -translation by strugglingyouth -How to migrate MySQL to MariaDB on Linux -================================================================================ -Since the Oracle's acquisition of MySQL, a lot of MySQL developers and users moved away from MySQL due to Oracle's more closed-door stance on MySQL development and maintenance. The community-driven outcome of such movement is a fork of MySQL, called MariaDB. Led by original MySQL developers, the development of MariaDB follows the open-source philosophy and makes sure of [its binary compatibility with MySQL][1]. The Linux distributions such as Red Hat families (Fedora, CentOS, RHEL), Ubuntu and Mint, openSUSE and Debian already started to use and support MariaDB as a drop-in replacement of MySQL. - -If you want to migrate your database from MySQL to MariaDB, this article is what you are looking for. Fortunately, due to their binary compatibility, MySQL-to-MariaDB migration process is pretty much straightforward. If you follow the steps below, the migration from MySQL to MariaDB will most likely be painless. - -### Prepare a MySQL Database and a Table ### - -For demonstration purpose, let's create a test MySQL database and one table in the database before doing the migration. Skip this step if you already have existing MySQL database(s) to migrate to MariaDB. Otherwise proceed as follows. - -Log in into MySQL from a terminal by typing your MySQL root user password. - - $ mysql -u root -p - -Create a database and a table. - - mysql> create database test01; - mysql> use test01; - mysql> create table pet(name varchar(30), owner varchar(30), species varchar(20), sex char(1)); - -Add some records to the table. - - mysql> insert into pet values('brandon','Jack','puddle','m'),('dixie','Danny','chihuahua','f'); - -Then quit the MySQL database. - -### Backup the MySQL Database ### - -The next step is to back up existing MySQL database(s). Use the following mysqldump command to export all existing databases to a file. Before running this command, make sure that binary logging is enabled in your MySQL server. If you don't know how to enable binary logging, see the instructions toward the end of the tutorial. - - $ mysqldump --all-databases --user=root --password --master-data > backupdb.sql - -![](https://farm6.staticflickr.com/5775/20555772385_21b89335e3_b.jpg) - -Now create a backup of my.cnf file somewhere in your system before uninstalling MySQL. This step is optional. - - $ sudo cp /etc/mysql/my.cnf /opt/my.cnf.bak - -### Uninstall MySQL Package ### - -First, you need to stop the MySQL service. - - $ sudo service mysql stop - -or: - - $ sudo systemctl stop mysql - -or: - - $ sudo /etc/init.d/mysql stop - -Then go ahead and remove MySQL packages and configurations as follows. - -On RPM based system (e.g., CentOS, Fedora or RHEL): - - $ sudo yum remove mysql* mysql-server mysql-devel mysql-libs - $ sudo rm -rf /var/lib/mysql - -On Debian based system (e.g., Debian, Ubuntu or Mint): - - $ sudo apt-get remove mysql-server mysql-client mysql-common - $ sudo apt-get autoremove - $ sudo apt-get autoclean - $ sudo deluser mysql - $ sudo rm -rf /var/lib/mysql - -### Install MariaDB Package ### - -The latest CentOS/RHEL 7 and Ubuntu (14.04 or later) contain MariaDB packages in their official repositories. In Fedora, MariaDB has become a replacement of MySQL since version 19. If you are using an old version or LTS type like Ubuntu 13.10 or earlier, you still can install MariaDB by adding its official repository. - -[MariaDB website][2] provide an online tool to help you add MariaDB's official repository according to your Linux distribution. This tool provides steps to add the MariaDB repository for openSUSE, Arch Linux, Mageia, Fedora, CentOS, RedHat, Mint, Ubuntu, and Debian. - -![](https://farm6.staticflickr.com/5809/20367745260_073020b910_c.jpg) - -As an example, let's use the Ubuntu 14.04 distribution and CentOS 7 to configure the MariaDB repository. - -**Ubuntu 14.04** - - $ sudo apt-get install software-properties-common - $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db - $ sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' - $ sudo apt-get update - $ sudo apt-get install mariadb-server - -**CentOS 7** - -Create a custom yum repository file for MariaDB as follows. - - $ sudo vi /etc/yum.repos.d/MariaDB.repo - ----------- - - [mariadb] - name = MariaDB - baseurl = http://yum.mariadb.org/5.5/centos7-amd64 - gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB - gpgcheck=1 - ----------- - - $ sudo yum install MariaDB-server MariaDB-client - -After all necessary packages are installed, you may be asked to type a new password for root user account. After setting the root password, don't forget to recover my.cnf backup file. - - $ sudo cp /opt/my.cnf /etc/mysql/ - -Now start MariaDB service as follows. - - $ sudo service mariadb start - -or: - - $ sudo systemctl start mariadb - -or: - - $ sudo /etc/init.d/mariadb start - -### Importing MySQL Database(s) ### - -Finally, we have to import the previously exported database(s) back to MariaDB server as follows. - - $ mysql -u root -p < backupdb.sql - -Enter your MariaDB's root password, and the database import process will start. When the import process is finished, it will return to a command prompt. - -To check whether or not the import process is completed successfully, log in into MariaDB server and perform some sample queries. - - $ mysql -u root -p - ----------- - - MariaDB [(none)]> show databases; - MariaDB [(none)]> use test01; - MariaDB [test01]> select * from pet; - -![](https://farm6.staticflickr.com/5820/20562243721_428a9a12a7_b.jpg) - -### Conclusion ### - -As you can see in this tutorial, MySQL-to-MariaDB migration is not difficult. MariaDB has a lot of new features than MySQL, that you should know about. As far as configuration is concerned, in my test case, I simply used my old MySQL configuration file (my.cnf) as a MariaDB configuration file, and the import process was completed fine without any issue. My suggestion for the configuration is that you read the documentation on MariaDB configuration options carefully before the migration, especially if you are using specific MySQL configurations. - -If you are running more complex setup with tons of tables and databases including clustering or master-slave replication, take a look at the [more detailed guide][3] by the Mozilla IT and Operations team, or the [official MariaDB documentation][4]. - -### Troubleshooting ### - -1. While running mysqldump command to back up databases, you are getting the following error. - - $ mysqldump --all-databases --user=root --password --master-data > backupdb.sql - ----------- - - mysqldump: Error: Binlogging on server not active - -By using "--master-data", you are trying to include binary log information in the exported output, which is useful for database replication and recovery. However, binary logging is not enabled in MySQL server. To fix this error, modify your my.cnf file, and add the following option under [mysqld] section. - - log-bin=mysql-bin - -Save my.cnf file, and restart the MySQL service: - - $ sudo service mysql restart - -or: - - $ sudo systemctl restart mysql - -or: - - $ sudo /etc/init.d/mysql restart - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/migrate-mysql-to-mariadb-linux.html - -作者:[Kristophorus Hadiono][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/kristophorus -[1]:https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/ -[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=aasaam -[3]:https://blog.mozilla.org/it/2013/12/16/upgrading-from-mysql-5-1-to-mariadb-5-5/ -[4]:https://mariadb.com/kb/en/mariadb/documentation/ From bd1a96a2eb86a075400dec864a6501f8e943bcab Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 16 Aug 2015 12:59:52 +0800 Subject: [PATCH 1756/2517] Create 20150816 How to migrate MySQL to MariaDB on Linux.md --- ...ow to migrate MySQL to MariaDB on Linux.md | 188 ++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 translated/tech/20150816 How to migrate MySQL to MariaDB on Linux.md diff --git a/translated/tech/20150816 How to migrate MySQL to MariaDB on Linux.md b/translated/tech/20150816 How to migrate MySQL to MariaDB on Linux.md new file mode 100644 index 0000000000..70856ec874 --- /dev/null +++ b/translated/tech/20150816 How to migrate MySQL to MariaDB on Linux.md @@ -0,0 +1,188 @@ + +在 Linux 中怎样将 MySQL 迁移到 MariaDB 上 +================================================================================ + +自从甲骨文收购 MySQL 后,很多 MySQL 的开发者和用户放弃了 MySQL 由于甲骨文对 MySQL 的开发和维护更多倾向于闭门的立场。在社区驱动下,促使更多人移到 MySQL 的另一个分支中,叫 MariaDB。在原有 MySQL 开发人员的带领下,MariaDB 的开发遵循开源的理念,并确保 [它的二进制格式与 MySQL 兼容][1]。Linux 发行版如 Red Hat 家族(Fedora,CentOS,RHEL),Ubuntu 和Mint,openSUSE 和 Debian 已经开始使用,并支持 MariaDB 作为 MySQL 的简易替换品。 + +如果想要将 MySQL 中的数据库迁移到 MariaDB 中,这篇文章就是你所期待的。幸运的是,由于他们的二进制兼容性,MySQL-to-MariaDB 迁移过程是非常简单的。如果你按照下面的步骤,将 MySQL 迁移到 MariaDB 会是无痛的。 + +### 准备 MySQL 数据库和表 ### + +出于演示的目的,我们在做迁移之前在数据库中创建一个测试的 MySQL 数据库和表。如果你在 MySQL 中已经有了要迁移到 MariaDB 的数据库,跳过此步骤。否则,按以下步骤操作。 + +在终端输入 root 密码登录到 MySQL 。 + + $ mysql -u root -p + +创建一个数据库和表。 + + mysql> create database test01; + mysql> use test01; + mysql> create table pet(name varchar(30), owner varchar(30), species varchar(20), sex char(1)); + +在表中添加一些数据。 + + mysql> insert into pet values('brandon','Jack','puddle','m'),('dixie','Danny','chihuahua','f'); + +退出 MySQL 数据库. + +### 备份 MySQL 数据库 ### + +下一步是备份现有的 MySQL 数据库。使用下面的 mysqldump 命令导出现有的数据库到文件中。运行此命令之前,请确保你的 MySQL 服务器上启用了二进制日志。如果你不知道如何启用二进制日志,请参阅结尾的教程说明。 + + $ mysqldump --all-databases --user=root --password --master-data > backupdb.sql + +![](https://farm6.staticflickr.com/5775/20555772385_21b89335e3_b.jpg) + +现在,在卸载 MySQL 之前先在系统上备份 my.cnf 文件。此步是可选的。 + + $ sudo cp /etc/mysql/my.cnf /opt/my.cnf.bak + +### 卸载 MySQL ### + +首先,停止 MySQL 服务。 + + $ sudo service mysql stop + +或者: + + $ sudo systemctl stop mysql + +或: + + $ sudo /etc/init.d/mysql stop + +然后继续下一步,使用以下命令移除 MySQL 和配置文件。 + +在基于 RPM 的系统上 (例如, CentOS, Fedora 或 RHEL): + + $ sudo yum remove mysql* mysql-server mysql-devel mysql-libs + $ sudo rm -rf /var/lib/mysql + +在基于 Debian 的系统上(例如, Debian, Ubuntu 或 Mint): + + $ sudo apt-get remove mysql-server mysql-client mysql-common + $ sudo apt-get autoremove + $ sudo apt-get autoclean + $ sudo deluser mysql + $ sudo rm -rf /var/lib/mysql + +### 安装 MariaDB ### + +在 CentOS/RHEL 7和Ubuntu(14.04或更高版本)上,最新的 MariaDB 包含在其官方源。在 Fedora 上,自19版本后 MariaDB 已经替代了 MySQL。如果你使用的是旧版本或 LTS 类型如 Ubuntu 13.10 或更早的,你仍然可以通过添加其官方仓库来安装 MariaDB。 + +[MariaDB 网站][2] 提供了一个在线工具帮助你依据你的 Linux 发行版中来添加 MariaDB 的官方仓库。此工具为 openSUSE, Arch Linux, Mageia, Fedora, CentOS, RedHat, Mint, Ubuntu, 和 Debian 提供了 MariaDB 的官方仓库. + +![](https://farm6.staticflickr.com/5809/20367745260_073020b910_c.jpg) + +下面例子中,我们使用 Ubuntu 14.04 发行版和 CentOS 7 配置 MariaDB 库。 + +**Ubuntu 14.04** + + $ sudo apt-get install software-properties-common + $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db + $ sudo add-apt-repository 'deb http://mirror.mephi.ru/mariadb/repo/5.5/ubuntu trusty main' + $ sudo apt-get update + $ sudo apt-get install mariadb-server + +**CentOS 7** + +以下为 MariaDB 创建一个自定义的 yum 仓库文件。 + + $ sudo vi /etc/yum.repos.d/MariaDB.repo + +---------- + + [mariadb] + name = MariaDB + baseurl = http://yum.mariadb.org/5.5/centos7-amd64 + gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB + gpgcheck=1 + +---------- + + $ sudo yum install MariaDB-server MariaDB-client + +安装了所有必要的软件包后,你可能会被要求为 root 用户创建一个新密码。设置 root 的密码后,别忘了恢复备份的 my.cnf 文件。 + + $ sudo cp /opt/my.cnf /etc/mysql/ + +现在启动 MariaDB 服务。 + + $ sudo service mariadb start + +或者: + + $ sudo systemctl start mariadb + +或: + + $ sudo /etc/init.d/mariadb start + +### 导入 MySQL 的数据库 ### + +最后,我们将以前导出的数据库导入到 MariaDB 服务器中。 + + $ mysql -u root -p < backupdb.sql + +输入你 MariaDB 的 root 密码,数据库导入过程将开始。导入过程完成后,将返回到命令提示符下。 + +要检查导入过程是否完全成功,请登录到 MariaDB 服务器,并查看一些样本来检查。 + + $ mysql -u root -p + +---------- + + MariaDB [(none)]> show databases; + MariaDB [(none)]> use test01; + MariaDB [test01]> select * from pet; + +![](https://farm6.staticflickr.com/5820/20562243721_428a9a12a7_b.jpg) + +### 结论 ### + +如你在本教程中看到的,MySQL-to-MariaDB 的迁移并不难。MariaDB 相比 MySQL 有很多新的功能,你应该知道的。至于配置方面,在我的测试情况下,我只是将我旧的 MySQL 配置文件(my.cnf)作为 MariaDB 的配置文件,导入过程完全没有出现任何问题。对于配置文件,我建议你在迁移之前请仔细阅读MariaDB 配置选项的文件,特别是如果你正在使用 MySQL 的特殊配置。 + +如果你正在运行更复杂的配置有海量的数据库和表,包括群集或主从复制,看一看 Mozilla IT 和 Operations 团队的 [更详细的指南][3] ,或者 [官方的 MariaDB 文档][4]。 + +### 故障排除 ### + +1.在运行 mysqldump 命令备份数据库时出现以下错误。 + + $ mysqldump --all-databases --user=root --password --master-data > backupdb.sql + +---------- + + mysqldump: Error: Binlogging on server not active + +通过使用 "--master-data",你要在导出的输出中包含二进制日志信息,这对于数据库的复制和恢复是有用的。但是,二进制日志未在 MySQL 服务器启用。要解决这个错误,修改 my.cnf 文件,并在 [mysqld] 部分添加下面的选项。 + + log-bin=mysql-bin + +保存 my.cnf 文件,并重新启动 MySQL 服务: + + $ sudo service mysql restart + +或者: + + $ sudo systemctl restart mysql + +或: + + $ sudo /etc/init.d/mysql restart + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/migrate-mysql-to-mariadb-linux.html + +作者:[Kristophorus Hadiono][a] +译者:[strugglingyouth](https://github.com/译者ID) +校对:[strugglingyouth](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/kristophorus +[1]:https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/ +[2]:https://downloads.mariadb.org/mariadb/repositories/#mirror=aasaam +[3]:https://blog.mozilla.org/it/2013/12/16/upgrading-from-mysql-5-1-to-mariadb-5-5/ +[4]:https://mariadb.com/kb/en/mariadb/documentation/ From b01218101e32a365db7a9f75ec47269e647aa4cd Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 16 Aug 2015 13:13:39 +0800 Subject: [PATCH 1757/2517] Update 20150728 Process of the Linux kernel building.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译到212line --- ...28 Process of the Linux kernel building.md | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index f11c1cc7a2..4191968e04 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -110,6 +110,14 @@ We check the `KBUILD_SRC` that represent top directory of the source code of the * If custom output directory created sucessfully, execute `make` again with the new directory (see `-C` option). The next `ifeq` statements checks that `C` or `M` options was passed to the make: +系统会检查变量`KBUILD_SRC`,如果他是空的(第一次执行makefile 时总是空的),并且变量`KBUILD_OUTPUT` 被设成了选项`O` 的值(如果这个选项被传进来了),那么这个值就会用来代表内核源码的顶层目录。下一步会检查变量`KBUILD_OUTPUT` ,如果之前设置过这个变量,那么接下来会做一下几件事: + +* 将变量`KBUILD_OUTPUT` 的值保存到临时变量`saved-output`; +* 尝试创建输出目录; +* 检查创建的输出目录,如果失败了就打印错误; +* 如果成功创建了输出目录,那么就在新目录重新执行`make` 命令(参见选项`-C`)。 + +下一个`ifeq` 语句会检查传递给make 的选项`C` 和`M`: ```Makefile ifeq ("$(origin C)", "command line") @@ -126,6 +134,8 @@ endif The first `C` option tells to the `makefile` that need to check all `c` source code with a tool provided by the `$CHECK` environment variable, by default it is [sparse](https://en.wikipedia.org/wiki/Sparse). The second `M` option provides build for the external modules (will not see this case in this part). As we set this variables we make a check of the `KBUILD_SRC` variable and if it is not set we set `srctree` variable to `.`: +第一个选项`C` 会告诉`makefile` 需要使用环境变量`$CHECK` 提供的工具来检查全部`c` 代码,默认情况下会使用[sparse](https://en.wikipedia.org/wiki/Sparse)。第二个选项`M` 会用来编译外部模块(本文不做讨论)。因为设置了这两个变量,系统还会检查变量`KBUILD_SRC`,如果`KBUILD_SRC` 没有被设置,系统会设置变量`srctree` 为`.`: + ```Makefile ifeq ($(KBUILD_SRC),) srctree := . @@ -138,7 +148,9 @@ obj := $(objtree) export srctree objtree VPATH ``` -That tells to `Makefile` that source tree of the Linux kernel will be in the current directory where `make` command was executed. After this we set `objtree` and other variables to this directory and export these variables. The next step is the getting value for the `SUBARCH` variable that will represent tewhat the underlying archicecture is: +That tells to `Makefile` that source tree of the Linux kernel will be in the current directory where `make` command was executed. After this we set `objtree` and other variables to this directory and export these variables. The next step is the setting value for the `SUBARCH` variable that will represent what the underlying archicecture is: + +这将会告诉`Makefile` 内核的源码树就在执行make 命令的目录。然后要设置`objtree` 和其他变量为执行make 命令的目录,并且将这些变量导出。接着就是要获取`SUBARCH` 的值,这个变量代表了当前的系统架构(注:一般值CPU 架构): ```Makefile SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ @@ -151,6 +163,8 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ As you can see it executes [uname](https://en.wikipedia.org/wiki/Uname) utils that prints information about machine, operating system and architecture. As it will get output of the `uname` util, it will parse it and assign to the `SUBARCH` variable. As we got `SUBARCH`, we set the `SRCARCH` variable that provides directory of the certain architecture and `hfr-arch` that provides directory for the header files: +如你所见,系统执行[uname](https://en.wikipedia.org/wiki/Uname) 得到机器、操作系统和架构的信息。因为我们得到的是`uname` 的输出,所以我们需要做一些处理在赋给变量`SUBARCH` 。获得`SUBARCH` 之后就要设置`SRCARCH` 和`hfr-arch`,`SRCARCH`提供了硬件架构相关代码的目录,`hfr-arch` 提供了相关头文件的目录: + ```Makefile ifeq ($(ARCH),i386) SRCARCH := x86 @@ -164,6 +178,8 @@ hdr-arch := $(SRCARCH) Note that `ARCH` is the alias for the `SUBARCH`. In the next step we set the `KCONFIG_CONFIG` variable that represents path to the kernel configuration file and if it was not set before, it will be `.config` by default: +注意:`ARCH` 是`SUBARCH` 的别名。如果没有设置过代表内核配置文件路径的变量`KCONFIG_CONFIG`,下一步系统会设置他,默认情况下就是`.config` : + ```Makefile KCONFIG_CONFIG ?= .config export KCONFIG_CONFIG @@ -171,6 +187,8 @@ export KCONFIG_CONFIG and the [shell](https://en.wikipedia.org/wiki/Shell_%28computing%29) that will be used during kernel compilation: +和编译内核过程中要用到的[shell](https://en.wikipedia.org/wiki/Shell_%28computing%29) + ```Makefile CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ @@ -179,6 +197,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ The next set of variables related to the compiler that will be used during Linux kernel compilation. We set the host compilers for the `c` and `c++` and flags for it: +接下来就要设置一组和编译内核的编译器相关的变量。我们会设置host 的C 和C++ 的编译器及相关配置项: + + ```Makefile HOSTCC = gcc HOSTCXX = g++ @@ -188,6 +209,7 @@ HOSTCXXFLAGS = -O2 Next we will meet the `CC` variable that represent compiler too, so why do we need in the `HOST*` variables? The `CC` is the target compiler that will be used during kernel compilation, but `HOSTCC` will be used during compilation of the set of the `host` programs (we will see it soon). After this we can see definition of the `KBUILD_MODULES` and `KBUILD_BUILTIN` variables that are used for the determination of the what to compile (kernel, modules or both): +然后会去适配代表编译器的变量`CC`,为什么还要`HOST*` 这些选项呢?`CC` 是编译内核过程中要使用的目标架构的编译器,但是`HOSTCC` 是要被用来编译一组`host` 程序的(下面我们就会看到)。然后我们就看看变量`KBUILD_MODULES` 和`KBUILD_BUILTIN` 的定义,这两个变量据欸的那个了我们要编译什么(内核、模块还是其他?): ```Makefile KBUILD_MODULES := KBUILD_BUILTIN := 1 From 686b2855ac1c72f760ac469f12728e08e1f216a2 Mon Sep 17 00:00:00 2001 From: XIAOYU <1136299502@qq.com> Date: Sun, 16 Aug 2015 13:55:13 +0800 Subject: [PATCH 1758/2517] translated shellinabox--A Web based AJAX translated shellinabox--A Web based AJAX Terminal Emulator --- ...box--A Web based AJAX Terminal Emulator.md | 159 ------------------ ...box--A Web based AJAX Terminal Emulator.md | 157 +++++++++++++++++ 2 files changed, 157 insertions(+), 159 deletions(-) delete mode 100644 sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md create mode 100644 translated/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md diff --git a/sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md b/sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md deleted file mode 100644 index c6f44a30f5..0000000000 --- a/sources/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md +++ /dev/null @@ -1,159 +0,0 @@ -translating by xiaoyu33 - -shellinabox – A Web based AJAX Terminal Emulator -================================================================================ -### About shellinabox ### - -Greetings Unixmen readers! - -We, usually, access any remote servers using well known communication tools like OpenSSH, and Putty etc. But, one important thing is we can’t access the remote systems using those tools behind a Firewall or the firewalls that allow only HTTPS traffic. No worries! We, still, have some options to access your remote systems even if you’re behind a firewall. And also, you don’t need to install any communications tools like OpenSSH or Putty. All you need is only a modern JavaScript and CSS enabled browser. And you don’t need to install any plugins or third party softwares either. - -Meet **Shell In A Box**, pronounced as **shellinabox**, a free, open source, web based AJAX Terminal emulator developed by **Markus Gutschke**. It uses AJAX technology to provide the look and feel of a native shell via a web browser. The **shellinaboxd** daemon implements a webserver that listens on the specified port. The web server publishes one or more services that will be displayed in a VT100 emulator implemented as an AJAX web application. By default, the port is 4200. You can change the default port to any random port number of your choice. After installing shellinabox on all your remote servers that you want to access them from your local system, open up the web browser and navigate to: **http://IP-Address:4200/**. Enter your user name and password and start using your remote system’s shell. Seems interesting, isn’t it? Indeed! - -**Disclaimer**: - -Shellinabox is not a ssh client or any sort of security software. It is just a application that emulates a remote system’s shell via a web browser. Also, It has nothing to do with SSH in anyway. It’s not a bullet proof security way to remote your systems. It is just one of the easiest methods so far. You should not run it on any public network for any reason. - -### Install shellinabox ### - -#### In Debian/Ubuntu based systems: #### - -shellinabox is available in the default repositories. So, you can install it using command: - - $ sudo apt-get install shellinabox - -#### In RHEL/CentOS systems: #### - -First, install EPEL repository using command: - - # yum install epel-release - -Then, install shellinabox using command: - - # yum install shellinabox - -Done! - -### Configure shellinabox ### - -As I mentioned before, shellinabox listens on port **4200** by default. You can change this port to any random number of your choice to make it difficult to guess by anyone. - -The shellinabox config file is located in **/etc/default/shellinabox** file by default in Debian/Ubuntu systems. In RHEL/CentOS/Fedora, the default location of config file is **/etc/sysconfig/shellinaboxd**. - -If you want to change the default port, - -In Debian/Ubuntu: - - $ sudo vi /etc/default/shellinabox - -In RHEL/CentOS/Fedora: - - # vi /etc/sysconfig/shellinaboxd - -Change your port to any random number. Since I am testing it on my local network, I use the default values. - - # Shell in a box daemon configuration - # For details see shellinaboxd man page - - # Basic options - USER=shellinabox - GROUP=shellinabox - CERTDIR=/var/lib/shellinabox - PORT=4200 - OPTS="--disable-ssl-menu -s /:LOGIN" - - # Additional examples with custom options: - - # Fancy configuration with right-click menu choice for black-on-white: - # OPTS="--user-css Normal:+black-on-white.css,Reverse:-white-on-black.css --disable-ssl-menu -s /:LOGIN" - - # Simple configuration for running it as an SSH console with SSL disabled: - # OPTS="-t -s /:SSH:host.example.com" - -Restart shelinabox service. - -**In Debian/Ubuntu:** - - $ sudo systemctl restart shellinabox - -Or - - $ sudo service shellinabox restart - -In RHEL/CentOS systems run the following command to start shellinaboxd service automatically on every reboot. - - # systemctl enable shellinaboxd - -Or - - # chkconfig shellinaboxd on - -Remember to open up port **4200** or any port that you assign if you are running a firewall. - -For example, in RHEL/CentOS systems, you can allow the port as shown below. - - # firewall-cmd --permanent --add-port=4200/tcp - ----------- - - # firewall-cmd --reload - -### Usage ### - -Now, go to your client systems, open up the web browser and navigate to: **https://ip-address-of-remote-servers:4200**. - -**Note**: Mention the correct port if you have changed it. - -You’ll get a warning message of certificate issue. Accept the certificate and go on. - -![Privacy error - Google Chrome_001](http://www.unixmen.com/wp-content/uploads/2015/08/Privacy-error-Google-Chrome_001.jpg) - -Enter your remote system’s username and password. Now, you’ll be able to access the remote system’s shell right from the browser itself. - -![Shell In A Box - Google Chrome_003](http://www.unixmen.com/wp-content/uploads/2015/08/sk@server1-Shell-In-A-Box-Google-Chrome_003.jpg) - -You can get some additional menu options which might be useful by right clicking on the empty space of your browser. - -![Shell In A Box - Google Chrome_004](http://www.unixmen.com/wp-content/uploads/2015/08/sk@server1-Shell-In-A-Box-Google-Chrome_004.jpg) - -From now on, you can do whatever you want to do in your remote server from the local system’s web browser. - -Once you done, type **exit** in the shell. - -To connect again to the remote system, click the **Connect** button and then type the user name and password of your remote server. - -![Shell In A Box - Google Chrome_005](http://www.unixmen.com/wp-content/uploads/2015/08/sk@server1-Shell-In-A-Box-Google-Chrome_005.jpg) - -For more details about shellinabox, type the following command in your Terminal: - - # man shellinabox - -Or - - # shellinaboxd -help - -Also, refer the [shellinabox wiki page][1] for comprehensive usage details. - -### Conclusion ### - -Like I mentioned before, web-based SSH tools are very useful if you’re running servers behind a Firewall. There are many web-based ssh tools, but Shellinabox is pretty simple and useful tool to emulate a remote system’s shell from anywhere in your network. Since, it is browser based, you can access your remote server from any device as long as you have a JavaScript and CSS enabled browser. - -That’s all for now. Have a good day! - -#### Reference link: #### - -- [shellinabox website][2] - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/shellinabox-a-web-based-ajax-terminal-emulator/ - -作者:[SK][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.unixmen.com/author/sk/ -[1]:https://code.google.com/p/shellinabox/wiki/shellinaboxd_man -[2]:https://code.google.com/p/shellinabox/ diff --git a/translated/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md b/translated/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md new file mode 100644 index 0000000000..71acf990c1 --- /dev/null +++ b/translated/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md @@ -0,0 +1,157 @@ +shellinabox–基于Web的Ajax的终端模拟器安装及使用详解 +================================================================================ +### shellinabox简介 ### + +unixmen的读者朋友们,你们好! + +通常情况下,我们访问任何远程服务器时,使用常见的通信工具如OpenSSH和Putty等。但是如果我们在防火墙外,或者防火墙只允许HTTPS流量才能通过,那么我们就不能再使用这些工具来访问远程系统了。不用担心!即使你在防火墙后面,我们依然有办法来访问你的远程系统。而且,你不需要安装任何类似于OpenSSH或Putty的通讯工具。你只需要有一个支持JavaScript和CSS的现代浏览器。并且你不用安装任何插件或第三方应用软件。 + +Meet **Shell In A Box**,发音是**shellinabox**,是由**Markus Gutschke**开发的一款免费的,开源的,基于Web的Ajax的终端模拟器。它使用AJAX技术,通过Web浏览器提供的外观和感觉像一个原生壳。该**shellinaboxd**的守护进程实现了一个Web服务器,能够侦听指定的端口。Web服务器发布一个或多个服务,这些服务将在VT100模拟器实现为一个AJAX的Web应用程序显示。默认情况下,端口为4200。你可以更改默认端口到任意选择的任意端口号。在你的远程服务器安装shellinabox以后,如果你想从本地系统接入,打开Web浏览器并导航到:**http://IP-Address:4200/**。输入你的用户名和密码,然后就可以开始使用你远程系统的外壳。看起来很有趣,不是吗?确实! + +**免责声明**: + +shellinabox不是SSH客户端或任何安全软件。它仅仅是一个应用程序,能够通过Web浏览器模拟一个远程系统的壳。同时,它和SSH没有任何关系。这不是防弹的安全的方式来远程控制您的系统。这只是迄今为止最简单的方法之一。无论什么原因,你都不应该在任何公共网络上运行它。 + +### 安装shellinabox ### + +#### 在Debian / Ubuntu系统上: #### + +shellinabox在默认库是可用的。所以,你可以使用命令来安装它: + + $ sudo apt-get install shellinabox + +#### 在RHEL / CentOS系统上: #### + +首先,使用命令安装EPEL仓库: + + # yum install epel-release + +然后,使用命令安装shellinabox: + + # yum install shellinabox + +完成! + +### 配置shellinabox ### + +正如我之前提到的,shellinabox侦听端口默认为**4200**。你可以将此端口更改为任意数字,以防别人猜到。 + +在Debian/Ubuntu系统上shellinabox配置文件的默认位置是**/etc/default/shellinabox**。在RHEL/CentOS/Fedora上,默认位置在**/etc/sysconfig/shellinaboxd**。 + +如果要更改默认端口, + +在Debian / Ubuntu: + + $ sudo vi /etc/default/shellinabox + +在RHEL / CentOS / Fedora: + + # vi /etc/sysconfig/shellinaboxd + +更改你的端口到任意数量。因为我在本地网络上测试它,所以我使用默认值。 + + # Shell in a box daemon configuration + # For details see shellinaboxd man page + + # Basic options + USER=shellinabox + GROUP=shellinabox + CERTDIR=/var/lib/shellinabox + PORT=4200 + OPTS="--disable-ssl-menu -s /:LOGIN" + + # Additional examples with custom options: + + # Fancy configuration with right-click menu choice for black-on-white: + # OPTS="--user-css Normal:+black-on-white.css,Reverse:-white-on-black.css --disable-ssl-menu -s /:LOGIN" + + # Simple configuration for running it as an SSH console with SSL disabled: + # OPTS="-t -s /:SSH:host.example.com" + +重启shelinabox服务。 + +**在Debian/Ubuntu:** + + $ sudo systemctl restart shellinabox + +或者 + + $ sudo service shellinabox restart + +在RHEL/CentOS系统,运行下面的命令能在每次重启时自动启动shellinaboxd服务 + + # systemctl enable shellinaboxd + +或者 + + # chkconfig shellinaboxd on + +如果你正在运行一个防火墙,记得要打开端口**4200**或任何你指定的端口。 + +例如,在RHEL/CentOS系统,你可以如下图所示允许端口。 + + # firewall-cmd --permanent --add-port=4200/tcp + +---------- + + # firewall-cmd --reload + +### 使用 ### + +现在,去你的客户端系统,打开Web浏览器并导航到:**https://ip-address-of-remote-servers:4200**。 + +**注意**:如果你改变了端口,请填写修改后的端口。 + +你会得到一个证书问题的警告信息。接受该证书并继续。 + +![Privacy error - Google Chrome_001](http://www.unixmen.com/wp-content/uploads/2015/08/Privacy-error-Google-Chrome_001.jpg) + +输入远程系统的用户名和密码。现在,您就能够从浏览器本身访问远程系统的外壳。 + +![Shell In A Box - Google Chrome_003](http://www.unixmen.com/wp-content/uploads/2015/08/sk@server1-Shell-In-A-Box-Google-Chrome_003.jpg) + +右键点击你浏览器的空白位置。你可以得到一些有很有用的额外的菜单选项。 + +![Shell In A Box - Google Chrome_004](http://www.unixmen.com/wp-content/uploads/2015/08/sk@server1-Shell-In-A-Box-Google-Chrome_004.jpg) + +从现在开始,你可以通过本地系统的Web浏览器在你的远程服务器随意操作。 + +当你完成时,记得点击**退出**。 + +当再次连接到远程系统时,单击**连接**按钮,然后输入远程服务器的用户名和密码。 + +![Shell In A Box - Google Chrome_005](http://www.unixmen.com/wp-content/uploads/2015/08/sk@server1-Shell-In-A-Box-Google-Chrome_005.jpg) + +如果想了解shellinabox更多细节,在你的终端键入下面的命令: + + # man shellinabox + +或者 + + # shellinaboxd -help + +同时,参考[shellinabox 在wiki页面的介绍][1],来了解shellinabox的综合使用细节。 + +### 结论 ### + +正如我之前提到的,如果你在服务器运行在防火墙后面,那么基于web的SSH工具是非常有用的。有许多基于web的SSH工具,但shellinabox是非常简单并且有用的工具,能从的网络上的任何地方,模拟一个远程系统的壳。因为它是基于浏览器的,所以你可以从任何设备访问您的远程服务器,只要你有一个支持JavaScript和CSS的浏览器。 + +就这些啦。祝你今天有个好心情! + +#### 参考链接: #### + +- [shellinabox website][2] + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/shellinabox-a-web-based-ajax-terminal-emulator/ + +作者:[SK][a] +译者:[xiaoyu33](https://github.com/xiaoyu33) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:https://code.google.com/p/shellinabox/wiki/shellinaboxd_man +[2]:https://code.google.com/p/shellinabox/ From a545ebe14d5e8611fdcc905db5296ed53a2a4c97 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 16 Aug 2015 16:37:23 +0800 Subject: [PATCH 1759/2517] [Translating] tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md --- ...Shell Scripting to Automate Linux System Maintenance Tasks.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md b/sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md index bcd058611a..6b534423e7 100644 --- a/sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md +++ b/sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md @@ -1,3 +1,4 @@ +ictlyh Translating Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks ================================================================================ Some time ago I read that one of the distinguishing characteristics of an effective system administrator / engineer is laziness. It seemed a little contradictory at first but the author then proceeded to explain why: From ef473497499f650a03962097e990cb74babe2f27 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 16 Aug 2015 18:49:19 +0800 Subject: [PATCH 1760/2517] PUB:20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux @GOLinux --- ...mportError--No module named wxversion' on Linux.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md (75%) diff --git a/translated/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md b/published/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md similarity index 75% rename from translated/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md rename to published/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md index 2a937daeff..4b3eaf0aa0 100644 --- a/translated/tech/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md +++ b/published/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md @@ -1,7 +1,7 @@ -Linux有问必答——如何修复Linux上的“ImportError: No module named wxversion”错误 +Linux有问必答:如何修复“ImportError: No module named wxversion”错误 ================================================================================ -> **问题** 我试着在[你的Linux发行版]上运行一个Python应用,但是我得到了这个错误"ImportError: No module named wxversion."。我怎样才能解决Python程序中的这个错误呢? +> **问题** 我试着在[某某 Linux 发行版]上运行一个 Python 应用,但是我得到了这个错误“ImportError: No module named wxversion.”。我怎样才能解决 Python 程序中的这个错误呢? Looking for python... 2.7.9 - Traceback (most recent call last): File "/home/dev/playonlinux/python/check_python.py", line 1, in @@ -10,7 +10,8 @@ Linux有问必答——如何修复Linux上的“ImportError: No module named wx failed tests 该错误表明,你的Python应用是基于GUI的,依赖于一个名为wxPython的缺失模块。[wxPython][1]是一个用于wxWidgets GUI库的Python扩展模块,普遍被C++程序员用来设计GUI应用。该wxPython扩展允许Python开发者在任何Python应用中方便地设计和整合GUI。 -To solve this import error, you need to install wxPython on your Linux, as described below. + +摇解决这个 import 错误,你需要在你的 Linux 上安装 wxPython,如下: ### 安装wxPython到Debian,Ubuntu或Linux Mint ### @@ -40,10 +41,10 @@ via: http://ask.xmodulo.com/importerror-no-module-named-wxversion.html 作者:[Dan Nanni][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni [1]:http://wxpython.org/ -[2]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[2]:https://linux.cn/article-2324-1.html From 3b29580b83bb95018b748cea58036b45882bc9cc Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 16 Aug 2015 19:07:46 +0800 Subject: [PATCH 1761/2517] PUB:20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser @strugglingyouth --- ...vity and Check Memory Usages of Browser.md | 57 +++++++++++-------- 1 file changed, 32 insertions(+), 25 deletions(-) rename {translated/tech => published}/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md (72%) diff --git a/translated/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md b/published/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md similarity index 72% rename from translated/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md rename to published/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md index 02805f62ff..97dd874c43 100644 --- a/translated/tech/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md +++ b/published/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md @@ -1,47 +1,52 @@ - -用 CD 创建 ISO,观察用户活动和检查浏览器内存的技巧 +一些 Linux 小技巧 ================================================================================ 我已经写过 [Linux 提示和技巧][1] 系列的一篇文章。写这篇文章的目的是让你知道这些小技巧可以有效地管理你的系统/服务器。 ![Create Cdrom ISO Image and Monitor Users in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/creating-cdrom-iso-watch-users-in-linux.jpg) -在Linux中创建 Cdrom ISO 镜像和监控用户 +*在Linux中创建 Cdrom ISO 镜像和监控用户* -在这篇文章中,我们将看到如何使用 CD/DVD 驱动器中加载到的内容来创建 ISO 镜像,打开随机手册页学习,看到登录用户的详细情况和查看浏览器内存使用量,而所有这些完全使用本地工具/命令无任何第三方应用程序/组件。让我们开始吧... +在这篇文章中,我们将看到如何使用 CD/DVD 驱动器中载入的碟片来创建 ISO 镜像;打开随机手册页学习;看到登录用户的详细情况和查看浏览器内存使用量,而所有这些完全使用本地工具/命令,无需任何第三方应用程序/组件。让我们开始吧…… -### 用 CD 中创建 ISO 映像 ### +### 用 CD 碟片创建 ISO 映像 ### 我们经常需要备份/复制 CD/DVD 的内容。如果你是在 Linux 平台上,不需要任何额外的软件。所有需要的是进入 Linux 终端。 要从 CD/DVD 上创建 ISO 镜像,你需要做两件事。第一件事就是需要找到CD/DVD 驱动器的名称。要找到 CD/DVD 驱动器的名称,可以使用以下三种方法。 -**1. 从终端/控制台上运行 lsblk 命令(单个驱动器).** +**1. 从终端/控制台上运行 lsblk 命令(列出块设备)** $ lsblk ![Find Block Devices in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Find-Block-Devices.png) -找驱动器 +*找块设备* -**2.要查看有关 CD-ROM 的信息,可以使用以下命令。** +从上图可以看到,sr0 就是你的 cdrom (即 /dev/sr0 )。 + +**2. 要查看有关 CD-ROM 的信息,可以使用以下命令** $ less /proc/sys/dev/cdrom/info ![Check Cdrom Information](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Cdrom-Inforamtion.png) -检查 Cdrom 信息 +*检查 Cdrom 信息* + +从上图可以看到, 设备名称是 sr0 (即 /dev/sr0)。 **3. 使用 [dmesg 命令][2] 也会得到相同的信息,并使用 egrep 来自定义输出。** -命令 ‘dmesg‘ 命令的输出/控制内核缓冲区信息。‘egrep‘ 命令输出匹配到的行。选项 -i 和 -color 与 egrep 连用时会忽略大小写,并高亮显示匹配的字符串。 +命令 ‘dmesg‘ 命令的输出/控制内核缓冲区信息。‘egrep‘ 命令输出匹配到的行。egrep 使用选项 -i 和 -color 时会忽略大小写,并高亮显示匹配的字符串。 $ dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer' ![Find Device Information](http://www.tecmint.com/wp-content/uploads/2015/07/Find-Device-Information.png) -查找设备信息 +*查找设备信息* -一旦知道 CD/DVD 的名称后,在 Linux 上你可以用下面的命令来创建 ISO 镜像。 +从上图可以看到,设备名称是 sr0 (即 /dev/sr0)。 + +一旦知道 CD/DVD 的名称后,在 Linux 上你可以用下面的命令来创建 ISO 镜像(你看,只需要 cat 即可!)。 $ cat /dev/sr0 > /path/to/output/folder/iso_name.iso @@ -49,11 +54,11 @@ ![Create ISO Image of CDROM in Linux](http://www.tecmint.com/wp-content/uploads/2015/07/Create-ISO-Image-of-CDROM.png) -创建 CDROM 的 ISO 映像 +*创建 CDROM 的 ISO 映像* ### 随机打开一个手册页 ### -如果你是 Linux 新人并想学习使用命令行开关,这个修改是为你做的。把下面的代码行添加在`〜/ .bashrc`文件的末尾。 +如果你是 Linux 新人并想学习使用命令行开关,这个技巧就是给你的。把下面的代码行添加在`〜/ .bashrc`文件的末尾。 /use/bin/man $(ls /bin | shuf | head -1) @@ -63,17 +68,19 @@ ![LoadKeys Man Pages](http://www.tecmint.com/wp-content/uploads/2015/07/LoadKeys-Man-Pages.png) -LoadKeys 手册页 +*LoadKeys 手册页* ![Zgrep Man Pages](http://www.tecmint.com/wp-content/uploads/2015/07/Zgrep-Man-Pages.png) -Zgrep 手册页 +*Zgrep 手册页* + +希望你知道如何退出手册页浏览——如果你已经厌烦了每次都看到手册页,你可以删除你添加到 `.bashrc`文件中的那几行。 ### 查看登录用户的状态 ### 了解其他用户正在共享服务器上做什么。 -一般情况下,你是共享的 Linux 服务器的用户或管理员的。如果你担心自己服务器的安全并想要查看哪些用户在做什么,你可以使用命令 'w'。 +一般情况下,你是共享的 Linux 服务器的用户或管理员的。如果你担心自己服务器的安全并想要查看哪些用户在做什么,你可以使用命令 `w`。 这个命令可以让你知道是否有人在执行恶意代码或篡改服务器,让他停下或使用其他方法。'w' 是查看登录用户状态的首选方式。 @@ -83,33 +90,33 @@ Zgrep 手册页 ![Check Linux User Activity](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Linux-User-Activity.png) -检查 Linux 用户状态 +*检查 Linux 用户状态* ### 查看浏览器的内存使用状况 ### -最近有不少谈论关于 Google-chrome 内存使用量。如果你想知道一个浏览器的内存用量,你可以列出进程名,PID 和它的使用情况。要检查浏览器的内存使用情况,只需在地址栏输入 “about:memory” 不要带引号。 +最近有不少谈论关于 Google-chrome 的内存使用量。如要检查浏览器的内存使用情况,只需在地址栏输入 “about:memory”,不要带引号。 我已经在 Google-Chrome 和 Mozilla 的 Firefox 网页浏览器进行了测试。你可以查看任何浏览器,如果它工作得很好,你可能会承认我们在下面的评论。你也可以杀死浏览器进程在 Linux 终端的进程/服务中。 -在 Google Chrome 中,在地址栏输入 `about:memory`,你应该得到类似下图的东西。 +在 Google Chrome 中,在地址栏输入 `about:memory`,你应该得到类似下图的东西。 ![Check Chrome Memory Usage](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Chrome-Memory-Usage.png) -查看 Chrome 内存使用状况 +*查看 Chrome 内存使用状况* 在Mozilla Firefox浏览器,在地址栏输入 `about:memory`,你应该得到类似下图的东西。 ![Check Firefox Memory Usage](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Firefox-Memory-Usage.png) -查看 Firefox 内存使用状况 +*查看 Firefox 内存使用状况* 如果你已经了解它是什么,除了这些选项。要检查内存用量,你也可以点击最左边的 ‘Measure‘ 选项。 ![Firefox Main Process](http://www.tecmint.com/wp-content/uploads/2015/07/Firefox-Main-Processes.png) -Firefox 主进程 +*Firefox 主进程* -它将通过浏览器树形展示进程内存使用量 +它将通过浏览器树形展示进程内存使用量。 目前为止就这样了。希望上述所有的提示将会帮助你。如果你有一个(或多个)技巧,分享给我们,将帮助 Linux 用户更有效地管理他们的 Linux 系统/服务器。 @@ -122,7 +129,7 @@ via: http://www.tecmint.com/creating-cdrom-iso-image-watch-user-activity-in-linu 作者:[Avishek Kumar][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 85aa60c1a7364d152d0471ce09b0125b59e90d3e Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 17 Aug 2015 00:41:29 +0800 Subject: [PATCH 1762/2517] PUB:20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications @XLCYun --- ...t & Wrong - Page 3 - GNOME Applications.md | 66 +++++++++++++++++++ ...t & Wrong - Page 3 - GNOME Applications.md | 61 ----------------- 2 files changed, 66 insertions(+), 61 deletions(-) create mode 100644 published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md delete mode 100644 translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md diff --git a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md new file mode 100644 index 0000000000..61600366c9 --- /dev/null +++ b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md @@ -0,0 +1,66 @@ +一周 GNOME 之旅:品味它和 KDE 的是是非非(第三节 GNOME应用) +================================================================================ + +### 应用 ### + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_videos_show&w=1920) + +这是一个基本扯平的方面。每一个桌面环境都有一些非常好的应用,也有一些不怎么样的。再次强调,Gnome 把那些 KDE 完全错失的小细节给做对了。我不是想说 KDE 中有哪些应用不好。他们都能工作,但仅此而已。也就是说:它们合格了,但确实还没有达到甚至接近100分。 + +Gnome 是一个样子,KDE 是另外一种。Dragon 播放器运行得很好,清晰的标出了播放文件、URL或和光盘的按钮,正如你在 Gnome Videos 中能做到的一样……但是在便利的文件名和用户的友好度方面,Gnome 多走了一小步。它默认显示了在你的电脑上检测到的所有影像文件,不需要你做任何事情。KDE 有 [Baloo][](正如之前的 [Nepomuk][2],LCTT 译注:这是 KDE 中一种文件索引服务框架)为什么不使用它们?它们能列出可读取的影像文件……但却没被使用。 + +下一步……音乐播放器 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_rhythmbox_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_amarok_show&w=1920) + +这两个应用,左边的是 Rhythmbox ,右边的是 Amarok,都是打开后没有做任何修改直接截屏的。看到差别了吗?Rhythmbox 看起来像个音乐播放器,直接了当,排序文件的方法也很清晰,它知道它应该是什么样的,它的工作是什么:就是播放音乐。 + +Amarok 感觉就像是某个人为了展示而把所有的扩展和选项都尽可能地塞进一个应用程序中去,而做出来的一个技术演示产品(tech demos),或者一个库演示产品(library demos)——而这些是不应该做为产品装进去的,它只应该展示其中一点东西。而 Amarok 给人的感觉却是这样的:好像是某个人想把每一个感觉可能很酷的东西都塞进一个媒体播放器里,甚至都不停下来想“我想写啥来着?一个播放音乐的应用?” + +看看默认布局就行了。前面和中心都呈现了什么?一个可视化工具和集成了维基百科——占了整个页面最大和最显眼的区域。第二大的呢?播放列表。第三大,同时也是最小的呢?真正的音乐列表。这种默认设置对于一个核心应用来说,怎么可能称得上理智? + +软件管理器!它在最近几年当中有很大的进步,而且接下来的几个月中,很可能只能看到它更大的进步。不幸的是,这是另一个 KDE 做得差一点点就能……但还是在终点线前以脸戗地了。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_software_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_apper_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_muon_show&w=1920) + +Gnome 软件中心可能是我的新的最爱的软件中心,先放下牢骚等下再发。Muon, 我想爱上你,真的。但你就是个设计上的梦魇。当 VDG 给你画设计草稿时(草图如下),你看起来真漂亮。白色空间用得很好,设计简洁,类别列表也很好,你的整个“不要分开做成两个应用程序”的设计都很不错。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_muon1_show&w=1920) + +接着就有人为你写代码,实现真正的UI,但是,我猜这些家伙当时一定是喝醉了。 + +我们来看看 Gnome 软件中心。正中间是什么?软件,软件截图和软件描述等等。Muon 的正中心是什么?白白浪费的大块白色空间。Gnome 软件中心还有一个贴心便利特点,那就是放了一个“运行”的按钮在那儿,以防你已经安装了这个软件。便利性和易用性很重要啊,大哥。说实话,仅仅让 Muon 把东西都居中对齐了可能看起来的效果都要好得多。 + +Gnome 软件中心沿着顶部的东西是什么,像个标签列表?所有软件,已安装软件,软件升级。语言简洁,直接,直指要点。Muon,好吧,我们有个“发现”,这个语言表达上还算差强人意,然后我们又有一个“已安装软件”,然后,就没有然后了。软件升级哪去了? + +好吧……开发者决定把升级独立分开成一个应用程序,这样你就得打开两个应用程序才能管理你的软件——一个用来安装,一个用来升级——自从有了新立得图形软件包管理器以来,首次有这种破天荒的设计,与任何已存的软件中心的设计范例相违背。 + +我不想贴上截图给你们看,因为我不想等下还得清理我的电脑,如果你进入 Muon 安装了什么,那么它就会在屏幕下方根据安装的应用名创建一个标签,所以如果你一次性安装很多软件的话,那么下面的标签数量就会慢慢的增长,然后你就不得不手动检查清除它们,因为如果你不这样做,当标签增长到超过屏幕显示时,你就不得不一个个找过去来才能找到最近正在安装的软件。想想:在火狐浏览器中打开50个标签是什么感受。太烦人,太不方便! + +我说过我会给 Gnome 一点打击,我是认真的。Muon 有一点做得比 Gnome 软件中心做得好。在 Muon 的设置栏下面有个“显示技术包”,即:编辑器,软件库,非图形应用程序,无 AppData 的应用等等(LCTT 译注:AppData 是软件包中的一个特殊文件,用于专门存储软件的信息)。Gnome 则没有。如果你想安装其中任何一项你必须跑到终端操作。我想这是他们做得不对的一点。我完全理解他们推行 AppData 的心情,但我想他们太急了(LCTT 译注:推行所有软件包带有 AppData 是 Gnome 软件中心的目标之一)。我是在想安装 PowerTop,而 Gnome 不显示这个软件时我才发现这点的——因为它没有 AppData,也没有“显示技术包”设置。 + +更不幸的事实是,如果你在 KDE 下你不能说“用 [Apper][3] 就行了”,因为…… + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_apperlocal_show&w=1920) + +Apper 对安装本地软件包的支持大约在 Fedora 19 时就中止了,几乎两年了。我喜欢关注细节与质量。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=3 + +作者:Eric Griffith +译者:[XLCYun](https://github.com/XLCYun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://community.kde.org/Baloo +[2]:http://www.ikde.org/tech/kde-tech-nepomuk/ +[3]:https://en.wikipedia.org/wiki/Apper diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md deleted file mode 100644 index 42539badcc..0000000000 --- a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md +++ /dev/null @@ -1,61 +0,0 @@ -将GNOME作为我的Linux桌面的一周: 他们做对的与做错的 - 第三节 - GNOME应用 -================================================================================ -### 应用 ### - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_videos_show&w=1920) - -这是一个基本上一潭死水的地方。每一个桌面环境都有一些非常好的和不怎么样的应用。再次强调,Gnome把那些KDE完全错失的小细节给做对了。我不是想说KDE中有哪些应用不好。他们都能工作。但仅此而已。也就是说:它们合格了,但确实还没有达到甚至接近100分。 - -Gnome的在左边,KDE的在右边。Dragon运行得很好,清晰的标出了播放文件、URL或和光盘的按钮,正如你在Gnome Videos中能做到的一样……但是在便利的文件名和用户的友好度方面,Gnome多走了一小步。它默认显示了在你的电脑上检测到的所有影像文件,不需要你做任何事情。KDE有Baloo——正如之前有Nepomuk——为什么不使用它们?它们能列出可读取的影像文件……但却没被使用。 - -下一步……音乐播放器 - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_rhythmbox_show&w=1920) - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_amarok_show&w=1920) - -这两个应用,左边的Rhythmbox和右边的Amarok,都是打开后没有做任何修改直接截屏的。看到差别了吗?Rhythmbox看起来像个音乐播放器,直接了当,排序文件的方法也很清晰,它知道它应该是什么样的,它的工作是什么:就是播放音乐。 - -Amarok感觉就像是某个人为了展示而把所有的扩展和选项都尽可能地塞进一个应用程序中去而做出来的一个技术演示产品(tech demos),或者一个库演示产品(library demos)——而这些是不应该做为产品装进去的,它只应该展示一些零碎的东西。而Amarok给人的感觉却是这样的:好像是某个人想把每一个感觉可能很酷的东西都塞进一个媒体播放器里,甚至都不停下来想“我想写啥来着?一个播放音乐的应用?” - -看看默认布局就行了。前面和中心都呈现了什么?一个可视化工具和维基集成(wikipedia integration)——占了整个页面最大和最显眼的区域。第二大的呢?播放列表。第三大,同时也是最小的呢?真正的音乐列表。这种默认设置对于一个核心应用来说,怎么可能称得上理智? - -软件管理器!它在最近几年当中有很大的进步,而且接下来的几个月中,很可能只能看到它更大的进步。不幸的是,这是另一个地方KDE做得差一点点就能……但还是在终点线前摔了脸。 - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_software_show&w=1920) - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_apper_show&w=1920) - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_muon_show&w=1920) - -Gnome软件中心可能是我最新的最爱,先放下牢骚等下再发。Muon, 我想爱上你,真的。但你就是个设计上的梦魇。当VDG给你画设计草稿时(模型在下面),你看起来真漂亮。白色空间用得很好,设计简洁,类别列表也很好,你的整个“不要分开做成两个应用程序”的设计都很不错。 - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_muon1_show&w=1920) - -接着就有人为你写代码,实现真正的UI,但是,我猜这些家伙当时一定是喝醉了。 - -我们来看看Gnome软件中心。正中间是什么?软件,软件截图和软件描述等等。Muon的正中心是什么?白白浪费的大块白色空间。Gnome软件中心还有一个贴心便利特点,那就是放了一个“运行“的按钮在那儿,以防你已经安装了这个软件。便利性和易用性很重要啊,大哥。说实话,仅仅让Muon把东西都居中对齐了可能看起来的效果都要好得多。 - -Gnome软件中心沿着顶部的东西是什么,像个标签列表?所有软件,已安装软件,软件升级。语言简洁,直接,直指要点。Muon,好吧,我们有个”发现“,这个语言表达上还算差强人意,然后我们又有一个”已安装软件“,然后,就没有然后了。软件升级哪去了? - -好吧……开发者决定把升级独立分开成一个应用程序,这样你就得打开两个应用程序才能管理你的软件——一个用来安装,一个用来升级——自从有了新得立图形软件包管理器以来,首次有这种破天荒的设计,与任何已存的软件中心的设计范例相违背。 - -我不想贴上截图给你们看,因为我不想等下还得清理我的电脑,如果你进入Muon安装了什么,那么它就会在屏幕下方根据安装的应用名创建一个标签,所以如果你一次性安装很多软件的话,那么下面的标签数量就会慢慢的增长,然后你就不得不手动检查清除它们,因为如果你不这样做,当标签增长到超过屏幕显示时,你就不得不一个个找过去来才能找到最近正在安装的软件。想想:在火狐浏览器打开50个标签。太烦人,太不方便! - -我说过我会给Gnome一点打击,我是认真的。Muon有一点做得比Gnome软件中心做得好。在Muon的设置栏下面有个“显示技术包”,即:编辑器,软件库,非图形应用程序,无AppData的应用等等(AppData,软件包中的一个特殊文件,用于专门存储软件的信息,译注)。Gnome则没有。如果你想安装其中任何一项你必须跑到终端操作。我想这是他们做得不对的一点。我完全理解他们推行AppData的心情,但我想他们太急了(推行所有软件包带有AppData,是Gnome软件中心的目标之一,译注)。我是在想安装PowerTop,而Gnome不显示这个软件时我才发现这点的——没有AppData,没有“显示技术包“设置。 - -更不幸的事实是你不能“用Apper就行了”,自从…… - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_apperlocal_show&w=1920) - -Apper对安装本地软件包的支持大约在Fedora 19时就中止了,几乎两年了。我喜欢那种对细节与质量的关注。 - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=3 - -作者:Eric Griffith -译者:[XLCYun](https://github.com/XLCYun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From a083bab979c96d4b979a0c5cdbb34dbe2fbed3be Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 17 Aug 2015 10:19:17 +0800 Subject: [PATCH 1763/2517] Update 20150728 Process of the Linux kernel building.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译到300行 --- ...150728 Process of the Linux kernel building.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index 4191968e04..d3c71f0a43 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -210,6 +210,7 @@ HOSTCXXFLAGS = -O2 Next we will meet the `CC` variable that represent compiler too, so why do we need in the `HOST*` variables? The `CC` is the target compiler that will be used during kernel compilation, but `HOSTCC` will be used during compilation of the set of the `host` programs (we will see it soon). After this we can see definition of the `KBUILD_MODULES` and `KBUILD_BUILTIN` variables that are used for the determination of the what to compile (kernel, modules or both): 然后会去适配代表编译器的变量`CC`,为什么还要`HOST*` 这些选项呢?`CC` 是编译内核过程中要使用的目标架构的编译器,但是`HOSTCC` 是要被用来编译一组`host` 程序的(下面我们就会看到)。然后我们就看看变量`KBUILD_MODULES` 和`KBUILD_BUILTIN` 的定义,这两个变量据欸的那个了我们要编译什么(内核、模块还是其他?): + ```Makefile KBUILD_MODULES := KBUILD_BUILTIN := 1 @@ -221,12 +222,16 @@ endif Here we can see definition of these variables and the value of the `KBUILD_BUILTIN` will depens on the `CONFIG_MODVERSIONS` kernel configuration parameter if we pass only `modules` to the `make`. The next step is including of the: +在这我们可以看到这些变量的定义,并且,如果们仅仅传递了`modules` 给`make`,变量`KBUILD_BUILTIN` 会依赖于内核配置选项`CONFIG_MODVERSIONS`。下一步操作是引入: + ```Makefile include scripts/Kbuild.include ``` `kbuild` file. The [Kbuild](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kbuild.txt) or `Kernel Build System` is the special infrastructure to manage building of the kernel and its modules. The `kbuild` files has the same syntax that makefiles. The [scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include) file provides some generic definitions for the `kbuild` system. As we included this `kbuild` files we can see definition of the variables that are related to the different tools that will be used during kernel and modules compilation (like linker, compilers, utils from the [binutils](http://www.gnu.org/software/binutils/) and etc...): +文件`kbuild` ,[Kbuild](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kbuild.txt) 或者又叫做 `Kernel Build System`是一个用来管理构建内核和模块的特殊框架。`kbuild` 文件的语法与makefile 一样。文件[scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include) 为`kbuild` 系统同提供了一些原生的定义。因为我们包含了这个`kbuild` 文件,我们可以看到和不同工具关联的这些变量的定义,这些工具会在内核和模块编译过程中被使用(比如链接器、编译器、二进制工具包[binutils](http://www.gnu.org/software/binutils/),等等): + ```Makefile AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld @@ -245,6 +250,8 @@ AWK = awk After definition of these variables we define two variables: `USERINCLUDE` and `LINUXINCLUDE`. They will contain paths of the directories with headers (public for users in the first case and for kernel in the second case): +在这些定义好的变量之后,我们又定义了两个变量:`USERINCLUDE` 和`LINUXINCLUDE`。他们为包含头文件的路径(第一个是给用户用的,第二个是给内核用的): + ```Makefile USERINCLUDE := \ -I$(srctree)/arch/$(hdr-arch)/include/uapi \ @@ -259,7 +266,7 @@ LINUXINCLUDE := \ ``` And the standard flags for the C compiler: - +以及标准的C 编译器标志: ```Makefile KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ @@ -269,6 +276,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ ``` It is the not last compiler flags, they can be updated by the other makefiles (for example kbuilds from `arch/`). After all of these, all variables will be exported to be available in the other makefiles. The following two the `RCS_FIND_IGNORE` and the `RCS_TAR_IGNORE` variables will contain files that will be ignored in the version control system: +这并不是最终确定的编译器标志,他们还可以在其他makefile 里面更新(比如`arch/` 里面的kbuild)。经过所有这些,全部变量会被导出,这样其他makefile 就可以直接使用了。下面的两个变量`RCS_FIND_IGNORE` 和 `RCS_TAR_IGNORE` 包含了被版本控制系统忽略的文件: ```Makefile export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \ @@ -280,11 +288,16 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ That's all. We have finished with the all preparations, next point is the building of `vmlinux`. +这就是全部了,我们已经完成了所有的准备工作,下一个点就是如果构建`vmlinux`. + Directly to the kernel build +直面构建内核 -------------------------------------------------------------------------------- As we have finished all preparations, next step in the root makefile is related to the kernel build. Before this moment we will not see in the our terminal after the execution of the `make` command. But now first steps of the compilation are started. In this moment we need to go on the [598](https://github.com/torvalds/linux/blob/master/Makefile#L598) line of the Linux kernel top makefile and we will see `vmlinux` target there: +现在我们已经完成了所有的准备工作,根makefile(注:内核根目录下的makefile)的下一步工作就是和编译内核相关的了。在我们执行`make` 命令之前,我们不会在终端看到任何东西。但是现在编译的第一步开始了,这里我们需要从内核根makefile的的[598](https://github.com/torvalds/linux/blob/master/Makefile#L598) 行开始,这里可以看到目标`vmlinux`: + ```Makefile all: vmlinux include arch/$(SRCARCH)/Makefile From 4dbc0c3601189cae703cd9e97bb1507fa0d39c2e Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 17 Aug 2015 10:56:51 +0800 Subject: [PATCH 1764/2517] =?UTF-8?q?20150817-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Top 5 Torrent Clients For Ubuntu Linux.md | 117 ++++++++++++++++++ ...number of threads in a process on Linux.md | 50 ++++++++ 2 files changed, 167 insertions(+) create mode 100644 sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md create mode 100644 sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md diff --git a/sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md b/sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md new file mode 100644 index 0000000000..5ae03e4df1 --- /dev/null +++ b/sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md @@ -0,0 +1,117 @@ +Top 5 Torrent Clients For Ubuntu Linux +================================================================================ +![Best Torrent clients for Ubuntu Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/5_Best_Torrent_Ubuntu.png) + +Looking for the **best torrent client in Ubuntu**? Indeed there are a number of torrent clients available for desktop Linux. But which ones are the **best Ubuntu torrent clients** among them? + +I am going to list top 5 torrent clients for Linux, which are lightweight, feature rich and have impressive GUI. Ease of installation and using is also a factor. + +### Best torrent programs for Ubuntu ### + +Since Ubuntu comes by default with Transmission, I am going to exclude it from the list. This doesn’t mean that Transmission doesn’t deserve to be on the list. Transmission is a good to have torrent client for Ubuntu and this is the reason why it is the default Torrent application in several Linux distributions, including Ubuntu. + +---------- + +### Deluge ### + +![Logo of Deluge torrent client for Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Deluge.png) + +[Deluge][1] has been chosen as the best torrent client for Linux by Lifehacker and that speaks itself of the usefulness of Deluge. And it’s not just Lifehacker who is fan of Deluge, check out any forum and you’ll find a number of people admitting that Deluge is their favorite. + +Fast, sleek and intuitive interface makes Deluge a hot favorite among Linux users. + +Deluge is available in Ubuntu repositories and you can install it in Ubuntu Software Center or by using the command below: + + sudo apt-get install deluge + +---------- + +### qBittorrent ### + +![qBittorrent client for Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/qbittorrent_icon.png) + +As the name suggests, [qBittorrent][2] is the Qt version of famous [Bittorrent][3] application. You’ll see an interface similar to Bittorrent client in Windows, if you ever used it. Sort of lightweight and have all the standard features of a torrent program, qBittorrent is also available in default Ubuntu repository. + +It could be installed from Ubuntu Software Center or using the command below: + + sudo apt-get install qbittorrent + +---------- + +### Tixati ### + +![Tixati torrent client logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/tixati_icon.png) + +[Tixati][4] is another nice to have torrent client for Ubuntu. It has a default dark theme which might be preferred by many but not me. It has all the standard features that you can seek in a torrent client. + +In addition to that, there are additional feature of data analysis. You can measure and analyze bandwidth and other statistics in nice charts. + +- [Download Tixati][5] + +---------- + +### Vuze ### + +![Vuze Torrent Logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/vuze_icon_for_mac_os_x_by_hamzasaleem-d6yx1fp.png) + +[Vuze][6] is favorite torrent application of a number of Linux as well as Windows users. Apart from the standard features, you can search for torrents directly in the application. You can also subscribe to episodic content so that you won’t have to search for new contents as you can see it in your subscription in sidebar. + +It also comes with a video player that can play HD videos with subtitles and all. But I don’t think you would like to use it over the better video players such as VLC. + +Vuze can be installed from Ubuntu Software Center or using the command below: + + sudo apt-get install vuze + +---------- + +### Frostwire ### + +![Logo of Frostwire torrent client](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/frostwire.png) + +[Frostwire][7] is the torrent application you might want to try. It is more than just a simple torrent client. Also available for Android, you can use it to share files over WiFi. + +You can search for torrents from within the application and play them inside the application. In addition to the downloaded files, it can browse your local media and have them organized inside the player. The same is applicable for the Android version. + +An additional feature is that Frostwire also provides access to legal music by indi artists. You can download them and listen to it, for free, for legal. + +- [Download Frostwire][8] + +---------- + +### Honorable mention ### + +On Windows, uTorrent (pronounced mu torrent) is my favorite torrent application. While uTorrent may be available for Linux, I deliberately skipped it from the list because installing and using uTorrent in Linux is neither easy nor does it provide a complete application experience (runs with in web browser). + +You can read about uTorrent installation in Ubuntu [here][9]. + +#### Quick tip: #### + +Most of the time, torrent applications do not start by default. You might want to change this behavior. Read this post to learn [how to manage startup applications in Ubuntu][10]. + +### What’s your favorite? ### + +That was my opinion on the best Torrent clients in Ubuntu. What is your favorite one? Do leave a comment. You can also check the [best download managers for Ubuntu][11] in related posts. And if you use Popcorn Time, check these [Popcorn Time Tips][12]. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/best-torrent-ubuntu/ + +作者:[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://deluge-torrent.org/ +[2]:http://www.qbittorrent.org/ +[3]:http://www.bittorrent.com/ +[4]:http://www.tixati.com/ +[5]:http://www.tixati.com/download/ +[6]:http://www.vuze.com/ +[7]:http://www.frostwire.com/ +[8]:http://www.frostwire.com/downloads +[9]:http://sysads.co.uk/2014/05/install-utorrent-3-3-ubuntu-14-04-13-10/ +[10]:http://itsfoss.com/manage-startup-applications-ubuntu/ +[11]:http://itsfoss.com/4-best-download-managers-for-linux/ +[12]:http://itsfoss.com/popcorn-time-tips/ \ No newline at end of file diff --git a/sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md b/sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md new file mode 100644 index 0000000000..7993b32628 --- /dev/null +++ b/sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md @@ -0,0 +1,50 @@ +Linux FAQs with Answers--How to count the number of threads in a process on Linux +================================================================================ +> **Question**: I have an application running, which forks a number of threads at run-time. I want to know how many threads are actively running in the program. What is the easiest way to check the thread count of a process on Linux? + +If you want to see the number of threads per process in Linux environments, there are several ways to do it. + +### Method One: /proc ### + +The proc pseudo filesystem, which resides in /proc directory, is the easiest way to see the thread count of any active process. The /proc directory exports in the form of readable text files a wealth of information related to existing processes and system hardware such as CPU, interrupts, memory, disk, etc. + + $ cat /proc//status + +The above command will show detailed information about the process with , which includes process state (e.g., sleeping, running), parent PID, UID, GID, the number of file descriptors used, and the number of context switches. The output also indicates **the total number of threads created in a process** as follows. + + Threads: + +For example, to check the thread count of a process with PID 20571: + + $ cat /proc/20571/status + +![](https://farm6.staticflickr.com/5649/20341236279_f4a4d809d2_b.jpg) + +The output indicates that the process has 28 threads in it. + +Alternatively, you could simply count the number of directories found in /proc//task, as shown below. + + $ ls /proc//task | wc + +This is because, for every thread created within a process, there is a corresponding directory created in /proc//task, named with its thread ID. Thus the total number of directories in /proc//task represents the number of threads in the process. + +### Method Two: ps ### + +If you are an avid user of the versatile ps command, this command can also show you individual threads of a process (with "H" option). The following command will print the thread count of a process. The "h" option is needed to hide the header in the top output. + + $ ps hH p | wc -l + +If you want to monitor the hardware resources (CPU & memory) consumed by different threads of a process, refer to [this tutorial][1].(注:此文我们翻译过) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/number-of-threads-process-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://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/view-threads-process-linux.html \ No newline at end of file From 66bcdcee0665664be02af42b513d49a4680560b2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 17 Aug 2015 11:11:24 +0800 Subject: [PATCH 1765/2517] =?UTF-8?q?20150817-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...cketing System in Fedora 22 or Centos 7.md | 179 ++++++++++++++++++ ...x Wireshark GUI freeze on Linux desktop.md | 61 ++++++ 2 files changed, 240 insertions(+) create mode 100644 sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md create mode 100644 sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md diff --git a/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md b/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md new file mode 100644 index 0000000000..515b15844a --- /dev/null +++ b/sources/tech/20150817 How to Install OsTicket Ticketing System in Fedora 22 or Centos 7.md @@ -0,0 +1,179 @@ +How to Install OsTicket Ticketing System in Fedora 22 / Centos 7 +================================================================================ +In this article, we'll learn how to setup help desk ticketing system with osTicket in our machine or server running Fedora 22 or CentOS 7 as operating system. osTicket is a free and open source popular customer support ticketing system developed and maintained by [Enhancesoft][1] and its contributors. osTicket is the best solution for help and support ticketing system and management for better communication and support assistance with clients and customers. It has the ability to easily integrate with inquiries created via email, phone and web based forms into a beautiful multi-user web interface. osTicket makes us easy to manage, organize and log all our support requests and responses in one single place. It is a simple, lightweight, reliable, open source, web-based and easy to setup and use help desk ticketing system. + +Here are some easy steps on how we can setup Help Desk ticketing system with osTicket in Fedora 22 or CentOS 7 operating system. + +### 1. Installing LAMP stack ### + +First of all, we'll need to install LAMP Stack to make osTicket working. LAMP stack is the combination of Apache web server, MySQL or MariaDB database system and PHP. To install a complete suit of LAMP stack that we need for the installation of osTicket, we'll need to run the following commands in a shell or a terminal. + +**On Fedora 22** + +LAMP stack is available on the official repository of Fedora 22. As the default package manager of Fedora 22 is the latest DNF package manager, we'll need to run the following command. + + $ sudo dnf install httpd mariadb mariadb-server php php-mysql php-fpm php-cli php-xml php-common php-gd php-imap php-mbstring wget + +**On CentOS 7** + +As there is LAMP stack available on the official repository of CentOS 7, we'll gonna install it using yum package manager. + + $ sudo yum install httpd mariadb mariadb-server php php-mysql php-fpm php-cli php-xml php-common php-gd php-imap php-mbstring wget + +### 2. Starting Apache Web Server and MariaDB ### + +Next, we'll gonna start MariaDB server and Apache Web Server to get started. + + $ sudo systemctl start mariadb httpd + +Then, we'll gonna enable them to start on every boot of the system. + + $ sudo systemctl enable mariadb httpd + + Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service. + Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service. + +### 3. Downloading osTicket package ### + +Next, we'll gonna download the latest release of osTicket ie version 1.9.9 . We can download it from the official download page [http://osticket.com/download][2] or from the official github repository. [https://github.com/osTicket/osTicket-1.8/releases][3] . Here, in this tutorial we'll download the tarball of the latest release of osTicket from the github release page using wget command. + + $ cd /tmp/ + $ wget https://github.com/osTicket/osTicket-1.8/releases/download/v1.9.9/osTicket-v1.9.9-1-gbe2f138.zip + + --2015-07-16 09:14:23-- https://github.com/osTicket/osTicket-1.8/releases/download/v1.9.9/osTicket-v1.9.9-1-gbe2f138.zip + Resolving github.com (github.com)... 192.30.252.131 + ... + Connecting to s3.amazonaws.com (s3.amazonaws.com)|54.231.244.4|:443... connected. + HTTP request sent, awaiting response... 200 OK + Length: 7150871 (6.8M) [application/octet-stream] + Saving to: ‘osTicket-v1.9.9-1-gbe2f138.zip’ + osTicket-v1.9.9-1-gb 100%[========================>] 6.82M 1.25MB/s in 12s + 2015-07-16 09:14:37 (604 KB/s) - ‘osTicket-v1.9.9-1-gbe2f138.zip’ saved [7150871/7150871] + +### 4. Extracting the osTicket ### + +After we have successfully downloaded the osTicket zipped package, we'll now gonna extract the zip. As the default root directory of Apache web server is /var/www/html/ , we'll gonna create a directory called "**support**" where we'll extract the whole directory and files of the compressed zip file. To do so, we'll need to run the following commands in a terminal or a shell. + + $ unzip osTicket-v1.9.9-1-gbe2f138.zip + +Then, we'll move the whole extracted files to it. + + $ sudo mv /tmp/upload /var/www/html/support + +### 5. Fixing Ownership and Permission ### + +Now, we'll gonna assign the ownership of the directories and files under /var/ww/html/support to apache to enable writable access to the apache process owner. To do so, we'll need to run the following command. + + $ sudo chown apache: -R /var/www/html/support + +Then, we'll also need to copy a sample configuration file to its default configuration file. To do so, we'll need to run the below command. + + $ cd /var/www/html/support/ + $ sudo cp include/ost-sampleconfig.php include/ost-config.php + $ sudo chmod 0666 include/ost-config.php + +If you have SELinux enabled on the system, run the following command. + + $ sudo chcon -R -t httpd_sys_content_t /var/www/html/vtigercrm + $ sudo chcon -R -t httpd_sys_rw_content_t /var/www/html/vtigercrm + +### 6. Configuring MariaDB ### + +As this is the first time we're going to configure MariaDB, we'll need to create a password for the root user of mariadb so that we can use it to login and create the database for our osTicket installation. To do so, we'll need to run the following command in a terminal or a shell. + + $ sudo mysql_secure_installation + + ... + Enter current password for root (enter for none): + OK, successfully used password, moving on... + + Setting the root password ensures that nobody can log into the MariaDB + root user without the proper authorisation. + + Set root password? [Y/n] y + New password: + Re-enter new password: + Password updated successfully! + Reloading privilege tables.. + Success! + ... + All done! If you've completed all of the above steps, your MariaDB + installation should now be secure. + + Thanks for using MariaDB! + +Note: Above, we are asked to enter the root password of the mariadb server but as we are setting for the first time and no password has been set yet, we'll simply hit enter while asking the current mariadb root password. Then, we'll need to enter twice the new password we wanna set. Then, we can simply hit enter in every argument in order to set default configurations. + +### 7. Creating osTicket Database ### + +As osTicket needs a database system to store its data and information, we'll be configuring MariaDB for osTicket. So, we'll need to first login into the mariadb command environment. To do so, we'll need to run the following command. + + $ sudo mysql -u root -p + +Now, we'll gonna create a new database "**osticket_db**" with user "**osticket_user**" and password "osticket_password" which will be granted access to the database. To do so, we'll need to run the following commands inside the MariaDB command environment. + + > CREATE DATABASE osticket_db; + > CREATE USER 'osticket_user'@'localhost' IDENTIFIED BY 'osticket_password'; + > GRANT ALL PRIVILEGES on osticket_db.* TO 'osticket_user'@'localhost' ; + > FLUSH PRIVILEGES; + > EXIT; + +**Note**: It is strictly recommended to replace the database name, user and password as your desire for security issue. + +### 8. Allowing Firewall ### + +If we are running a firewall program, we'll need to configure our firewall to allow port 80 so that the Apache web server's default port will be accessible externally. This will allow us to navigate our web browser to osTicket's web interface with the default http port 80. To do so, we'll need to run the following command. + + $ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent + +After done, we'll need to reload our firewall service. + + $ sudo firewall-cmd --reload + +### 9. Web based Installation ### + +Finally, is everything is done as described above, we'll now should be able to navigate osTicket's Installer by pointing our web browser to http://domain.com/support or http://ip-address/support . Now, we'll be shown if the dependencies required by osTicket are installed or not. As we've already installed all the necessary packages, we'll be welcomed with **green colored tick** to proceed forward. + +![osTicket Requirements Check](http://blog.linoxide.com/wp-content/uploads/2015/07/osticket-requirements-check1.png) + +After that, we'll be required to enter the details for our osTicket instance as shown below. We'll need to enter the database name, username, password and hostname and other important account information that we'll require while logging into the admin panel. + +![osticket configuration](http://blog.linoxide.com/wp-content/uploads/2015/07/osticket-configuration.png) + +After the installation has been completed successfully, we'll be welcomed by a Congratulations screen. There we can see two links, one for our Admin Panel and the other for the support center as the homepage of the osTicket Support Help Desk. + +![osticket installation completed](http://blog.linoxide.com/wp-content/uploads/2015/07/osticket-installation-completed.png) + +If we click on http://ip-address/support or http://domain.com/support, we'll be redirected to the osTicket support page which is as shown below. + +![osticket support homepage](http://blog.linoxide.com/wp-content/uploads/2015/07/osticket-support-homepage.png) + +Next, to login into the admin panel, we'll need to navigate our web browser to http://ip-address/support/scp or http://domain.com/support/scp . Then, we'll need to enter the login details we had just created above while configuring the database and other information in the web installer. After successful login, we'll be able to access our dashboard and other admin sections. + +![osticket admin panel](http://blog.linoxide.com/wp-content/uploads/2015/07/osticket-admin-panel.png) + +### 10. Post Installation ### + +After we have finished the web installation of osTicket, we'll now need to secure some of our configuration files. To do so, we'll need to run the following command. + + $ sudo rm -rf /var/www/html/support/setup/ + $ sudo chmod 644 /var/www/html/support/include/ost-config.php + +### Conclusion ### + +osTicket is an awesome help desk ticketing system providing several new features. It supports rich text or HTML emails, ticket filters, agent collision avoidance, auto-responder and many more features. The user interface of osTicket is very beautiful with easy to use control panel. It is a complete set of tools required for a help and support ticketing system. It is the best solution for providing customers a better way to communicate with the support team. It helps a company to make their customers happy with them regarding the support and help desk. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +------------------------------------------------------------------------------ + +via: http://linoxide.com/linux-how-to/install-osticket-fedora-22-centos-7/ + +作者:[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/ +[1]:http://www.enhancesoft.com/ +[2]:http://osticket.com/download +[3]:https://github.com/osTicket/osTicket-1.8/releases \ No newline at end of file diff --git a/sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md b/sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md new file mode 100644 index 0000000000..f6fb3be325 --- /dev/null +++ b/sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md @@ -0,0 +1,61 @@ +Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop +================================================================================ +> **Question**: When I try to open a pre-recorded packet dump on Wireshark on Ubuntu, its UI suddenly freezes, and the following errors and warnings appear in the terminal where I launched Wireshark. How can I fix this problem? + +Wireshark is a GUI-based packet capture and sniffer tool. This tool is popularly used by network administrators, network security engineers or developers for various tasks where packet-level network analysis is required, for example during network troubleshooting, vulnerability testing, application debugging, or protocol reverse engineering. Wireshark allows one to capture live packets and browse their protocol headers and payloads via a convenient GUI. + +![](https://farm1.staticflickr.com/722/20584224675_f4d7a59474_c.jpg) + +It is known that Wireshark's UI, especially run under Ubuntu desktop, sometimes hangs or freezes with the following errors, while you are scrolling up or down the packet list view, or starting to load a pre-recorded packet dump file. + + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GObject' + (wireshark:3480): GLib-GObject-CRITICAL **: g_object_set_qdata_full: assertion 'G_IS_OBJECT (object)' failed + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkRange' + (wireshark:3480): Gtk-CRITICAL **: gtk_range_get_adjustment: assertion 'GTK_IS_RANGE (range)' failed + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkOrientable' + (wireshark:3480): Gtk-CRITICAL **: gtk_orientable_get_orientation: assertion 'GTK_IS_ORIENTABLE (orientable)' failed + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkScrollbar' + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkWidget' + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GObject' + (wireshark:3480): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed + (wireshark:3480): Gtk-CRITICAL **: gtk_widget_set_name: assertion 'GTK_IS_WIDGET (widget)' failed + +Apparently this error is caused by some incompatibility between Wireshark and overlay-scrollbar, and has not been fixed in the latest Ubuntu desktop (e.g., as of Ubuntu 15.04 Vivid Vervet). + +A workaround to avoid this Wireshark UI freeze problem is to **temporarily disabling overlay-scrollbar**. There are two ways to disable overlay-scrollbar in Wireshark, depending on how you launch Wireshark on your desktop. + +### Command-Line Solution ### + +Overlay-scrollbar can be disabled by setting "**LIBOVERLAY_SCROLLBAR**" environment variable to "0". + +So if you are launching Wireshark from the command in a terminal, you can disable overlay-scrollbar in Wireshark as follows. + +Open your .bashrc, and define the following alias. + + alias wireshark="LIBOVERLAY_SCROLLBAR=0 /usr/bin/wireshark" + +### Desktop Launcher Solution ### + +If you are launching Wireshark using a desktop launcher, you can edit its desktop launcher file. + + $ sudo vi /usr/share/applications/wireshark.desktop + +Look for a line that starts with "Exec", and change it as follows. + + Exec=env LIBOVERLAY_SCROLLBAR=0 wireshark %f + +While this solution will be beneficial for all desktop users system-wide, it will not survive Wireshark upgrade. If you want to preserve the modified .desktop file, copy it to your home directory as follows. + + $ cp /usr/share/applications/wireshark.desktop ~/.local/share/applications/ + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/fix-wireshark-gui-freeze-linux-desktop.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://ask.xmodulo.com/author/nanni \ No newline at end of file From 64ff0afb64ffd64f11f553e6517d0d64c8d1e834 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 17 Aug 2015 11:40:27 +0800 Subject: [PATCH 1766/2517] Update 20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md --- ...How to count the number of threads in a process on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md b/sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md index 7993b32628..35ee2f00de 100644 --- a/sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md +++ b/sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Linux FAQs with Answers--How to count the number of threads in a process on Linux ================================================================================ > **Question**: I have an application running, which forks a number of threads at run-time. I want to know how many threads are actively running in the program. What is the easiest way to check the thread count of a process on Linux? @@ -47,4 +48,4 @@ via: http://ask.xmodulo.com/number-of-threads-process-linux.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/view-threads-process-linux.html \ No newline at end of file +[1]:http://ask.xmodulo.com/view-threads-process-linux.html From 63bfa49922873b3c26beac5a4217e7f5bb1df899 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 17 Aug 2015 11:45:19 +0800 Subject: [PATCH 1767/2517] Update 20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md --- ...nswers--How to fix Wireshark GUI freeze on Linux desktop.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md b/sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md index f6fb3be325..d906349ff9 100644 --- a/sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md +++ b/sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop ================================================================================ > **Question**: When I try to open a pre-recorded packet dump on Wireshark on Ubuntu, its UI suddenly freezes, and the following errors and warnings appear in the terminal where I launched Wireshark. How can I fix this problem? @@ -58,4 +59,4 @@ via: http://ask.xmodulo.com/fix-wireshark-gui-freeze-linux-desktop.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 93096c2c2bb8675b0b9da23a0438b69b37094d0e Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 17 Aug 2015 14:59:32 +0800 Subject: [PATCH 1768/2517] =?UTF-8?q?20150817-3=20=E9=80=89=E9=A2=98=20LFC?= =?UTF-8?q?S=20=E4=B8=93=E9=A2=98=201-5=EF=BC=8C=E5=85=B1=E5=8D=81?= =?UTF-8?q?=E7=AF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...eate Edit and Manipulate files in Linux.md | 220 ++++++++++ ...and Use vi or vim as a Full Text Editor.md | 387 ++++++++++++++++++ ...e Attributes and Finding Files in Linux.md | 382 +++++++++++++++++ ...esystems and Configuring Swap Partition.md | 191 +++++++++ ...work Samba and NFS Filesystems in Linux.md | 232 +++++++++++ 5 files changed, 1412 insertions(+) create mode 100644 sources/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md create mode 100644 sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md create mode 100644 sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md create mode 100644 sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md create mode 100644 sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md diff --git a/sources/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md b/sources/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md new file mode 100644 index 0000000000..ca96b7dac6 --- /dev/null +++ b/sources/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md @@ -0,0 +1,220 @@ +Part 1 - LFCS: How to use GNU ‘sed’ Command to Create, Edit, and Manipulate files in Linux +================================================================================ +The Linux Foundation announced the LFCS (Linux Foundation Certified Sysadmin) certification, a new program that aims at helping individuals all over the world to get certified in basic to intermediate system administration tasks for Linux systems. This includes supporting running systems and services, along with first-hand troubleshooting and analysis, and smart decision-making to escalate issues to engineering teams. + +![Linux Foundation Certified Sysadmin](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-1.png) + +Linux Foundation Certified Sysadmin – Part 1 + +Please watch the following video that demonstrates about The Linux Foundation Certification Program. + +注:youtube 视频 + + +The series will be titled Preparation for the LFCS (Linux Foundation Certified Sysadmin) Parts 1 through 10 and cover the following topics for Ubuntu, CentOS, and openSUSE: + +- Part 1: How to use GNU ‘sed’ Command to Create, Edit, and Manipulate files in Linux +- Part 2: How to Install and Use vi/m as a full Text Editor +- Part 3: Archiving Files/Directories and Finding Files on the Filesystem +- Part 4: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition +- Part 5: Mount/Unmount Local and Network (Samba & NFS) Filesystems in Linux +- Part 6: Assembling Partitions as RAID Devices – Creating & Managing System Backups +- Part 7: Managing System Startup Process and Services (SysVinit, Systemd and Upstart +- Part 8: Managing Users & Groups, File Permissions & Attributes and Enabling sudo Access on Accounts +- Part 9: Linux Package Management with Yum, RPM, Apt, Dpkg, Aptitude and Zypper +- Part 10: Learning Basic Shell Scripting and Filesystem Troubleshooting + + +This post is Part 1 of a 10-tutorial series, which will cover the necessary domains and competencies that are required for the LFCS certification exam. That being said, fire up your terminal, and let’s start. + +### Processing Text Streams in Linux ### + +Linux treats the input to and the output from programs as streams (or sequences) of characters. To begin understanding redirection and pipes, we must first understand the three most important types of I/O (Input and Output) streams, which are in fact special files (by convention in UNIX and Linux, data streams and peripherals, or device files, are also treated as ordinary files). + +The difference between > (redirection operator) and | (pipeline operator) is that while the first connects a command with a file, the latter connects the output of a command with another command. + + # command > file + # command1 | command2 + +Since the redirection operator creates or overwrites files silently, we must use it with extreme caution, and never mistake it with a pipeline. One advantage of pipes on Linux and UNIX systems is that there is no intermediate file involved with a pipe – the stdout of the first command is not written to a file and then read by the second command. + +For the following practice exercises we will use the poem “A happy child” (anonymous author). + +![cat command](http://www.tecmint.com/wp-content/uploads/2014/10/cat-command.png) + +cat command example + +#### Using sed #### + +The name sed is short for stream editor. For those unfamiliar with the term, a stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline). + +The most basic (and popular) usage of sed is the substitution of characters. We will begin by changing every occurrence of the lowercase y to UPPERCASE Y and redirecting the output to ahappychild2.txt. The g flag indicates that sed should perform the substitution for all instances of term on every line of file. If this flag is omitted, sed will replace only the first occurrence of term on each line. + +**Basic syntax:** + + # sed ‘s/term/replacement/flag’ file + +**Our example:** + + # sed ‘s/y/Y/g’ ahappychild.txt > ahappychild2.txt + +![sed command](http://www.tecmint.com/wp-content/uploads/2014/10/sed-command.png) + +sed command example + +Should you want to search for or replace a special character (such as /, \, &) you need to escape it, in the term or replacement strings, with a backward slash. + +For example, we will substitute the word and for an ampersand. At the same time, we will replace the word I with You when the first one is found at the beginning of a line. + + # sed 's/and/\&/g;s/^I/You/g' ahappychild.txt + +![sed replace string](http://www.tecmint.com/wp-content/uploads/2014/10/sed-replace-string.png) + +sed replace string + +In the above command, a ^ (caret sign) is a well-known regular expression that is used to represent the beginning of a line. + +As you can see, we can combine two or more substitution commands (and use regular expressions inside them) by separating them with a semicolon and enclosing the set inside single quotes. + +Another use of sed is showing (or deleting) a chosen portion of a file. In the following example, we will display the first 5 lines of /var/log/messages from Jun 8. + + # sed -n '/^Jun 8/ p' /var/log/messages | sed -n 1,5p + +Note that by default, sed prints every line. We can override this behaviour with the -n option and then tell sed to print (indicated by p) only the part of the file (or the pipe) that matches the pattern (Jun 8 at the beginning of line in the first case and lines 1 through 5 inclusive in the second case). + +Finally, it can be useful while inspecting scripts or configuration files to inspect the code itself and leave out comments. The following sed one-liner deletes (d) blank lines or those starting with # (the | character indicates a boolean OR between the two regular expressions). + + # sed '/^#\|^$/d' apache2.conf + +![sed match string](http://www.tecmint.com/wp-content/uploads/2014/10/sed-match-string.png) + +sed match string + +#### uniq Command #### + +The uniq command allows us to report or remove duplicate lines in a file, writing to stdout by default. We must note that uniq does not detect repeated lines unless they are adjacent. Thus, uniq is commonly used along with a preceding sort (which is used to sort lines of text files). By default, sort takes the first field (separated by spaces) as key field. To specify a different key field, we need to use the -k option. + +**Examples** + +The du –sch /path/to/directory/* command returns the disk space usage per subdirectories and files within the specified directory in human-readable format (also shows a total per directory), and does not order the output by size, but by subdirectory and file name. We can use the following command to sort by size. + + # du -sch /var/* | sort –h + +![sort command](http://www.tecmint.com/wp-content/uploads/2014/10/sort-command.jpg) + +sort command example + +You can count the number of events in a log by date by telling uniq to perform the comparison using the first 6 characters (-w 6) of each line (where the date is specified), and prefixing each output line by the number of occurrences (-c) with the following command. + + # cat /var/log/mail.log | uniq -c -w 6 + +![Count Numbers in File](http://www.tecmint.com/wp-content/uploads/2014/10/count-numbers-in-file.jpg) + +Count Numbers in File + +Finally, you can combine sort and uniq (as they usually are). Consider the following file with a list of donors, donation date, and amount. Suppose we want to know how many unique donors there are. We will use the following command to cut the first field (fields are delimited by a colon), sort by name, and remove duplicate lines. + + # cat sortuniq.txt | cut -d: -f1 | sort | uniq + +![Find Unique Records in File](http://www.tecmint.com/wp-content/uploads/2014/10/find-uniqu-records-in-file.jpg) + +Find Unique Records in File + +- Read Also: [13 “cat” Command Examples][1] + +#### grep Command #### + +grep searches text files or (command output) for the occurrence of a specified regular expression and outputs any line containing a match to standard output. + +**Examples** + +Display the information from /etc/passwd for user gacanepa, ignoring case. + + # grep -i gacanepa /etc/passwd + +![grep Command](http://www.tecmint.com/wp-content/uploads/2014/10/grep-command.jpg) + +grep command example + +Show all the contents of /etc whose name begins with rc followed by any single number. + + # ls -l /etc | grep rc[0-9] + +![List Content Using grep](http://www.tecmint.com/wp-content/uploads/2014/10/list-content-using-grep.jpg) + +List Content Using grep + +- Read Also: [12 “grep” Command Examples][2] + +#### tr Command Usage #### + +The tr command can be used to translate (change) or delete characters from stdin, and write the result to stdout. + +**Examples** + +Change all lowercase to uppercase in sortuniq.txt file. + + # cat sortuniq.txt | tr [:lower:] [:upper:] + +![Sort Strings in File](http://www.tecmint.com/wp-content/uploads/2014/10/sort-strings.jpg) + +Sort Strings in File + +Squeeze the delimiter in the output of ls –l to only one space. + + # ls -l | tr -s ' ' + +![Squeeze Delimiter](http://www.tecmint.com/wp-content/uploads/2014/10/squeeze-delimeter.jpg) + +Squeeze Delimiter + +#### cut Command Usage #### + +The cut command extracts portions of input lines (from stdin or files) and displays the result on standard output, based on number of bytes (-b option), characters (-c), or fields (-f). In this last case (based on fields), the default field separator is a tab, but a different delimiter can be specified by using the -d option. + +**Examples** + +Extract the user accounts and the default shells assigned to them from /etc/passwd (the –d option allows us to specify the field delimiter, and the –f switch indicates which field(s) will be extracted. + + # cat /etc/passwd | cut -d: -f1,7 + +![Extract User Accounts](http://www.tecmint.com/wp-content/uploads/2014/10/extract-user-accounts.jpg) + +Extract User Accounts + +Summing up, we will create a text stream consisting of the first and third non-blank files of the output of the last command. We will use grep as a first filter to check for sessions of user gacanepa, then squeeze delimiters to only one space (tr -s ‘ ‘). Next, we’ll extract the first and third fields with cut, and finally sort by the second field (IP addresses in this case) showing unique. + + # last | grep gacanepa | tr -s ‘ ‘ | cut -d’ ‘ -f1,3 | sort -k2 | uniq + +![last command](http://www.tecmint.com/wp-content/uploads/2014/10/last-command.png) + +last command example + +The above command shows how multiple commands and pipes can be combined so as to obtain filtered data according to our desires. Feel free to also run it by parts, to help you see the output that is pipelined from one command to the next (this can be a great learning experience, by the way!). + +### Summary ### + +Although this example (along with the rest of the examples in the current tutorial) may not seem very useful at first sight, they are a nice starting point to begin experimenting with commands that are used to create, edit, and manipulate files from the Linux command line. Feel free to leave your questions and comments below – they will be much appreciated! + +#### Reference Links #### + +- [About the LFCS][3] +- [Why get a Linux Foundation Certification?][4] +- [Register for the LFCS exam][5] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ + +作者:[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/13-basic-cat-command-examples-in-linux/ +[2]:http://www.tecmint.com/12-practical-examples-of-linux-grep-command/ +[3]:https://training.linuxfoundation.org/certification/LFCS +[4]:https://training.linuxfoundation.org/certification/why-certify-with-us +[5]:https://identity.linuxfoundation.org/user?destination=pid/1 \ No newline at end of file diff --git a/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md b/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md new file mode 100644 index 0000000000..7537f784bd --- /dev/null +++ b/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md @@ -0,0 +1,387 @@ +Part 2 - LFCS: How to Install and Use vi/vim as a Full Text Editor +================================================================================ +A couple of months ago, the Linux Foundation launched the LFCS (Linux Foundation Certified Sysadmin) certification in order to help individuals from all over the world to verify they are capable of doing basic to intermediate system administration tasks on Linux systems: system support, first-hand troubleshooting and maintenance, plus intelligent decision-making to know when it’s time to raise issues to upper support teams. + +![Learning VI Editor in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/LFCS-Part-2.png) + +Learning VI Editor in Linux + +Please take a look at the below video that explains The Linux Foundation Certification Program. + +注:youtube 视频 + + +This post is Part 2 of a 10-tutorial series, here in this part, we will cover the basic file editing operations and understanding modes in vi/m editor, that are required for the LFCS certification exam. + +### Perform Basic File Editing Operations Using vi/m ### + +Vi was the first full-screen text editor written for Unix. Although it was intended to be small and simple, it can be a bit challenging for people used exclusively to GUI text editors, such as NotePad++, or gedit, to name a few examples. + +To use Vi, we must first understand the 3 modes in which this powerful program operates, in order to begin learning later about the its powerful text-editing procedures. + +Please note that most modern Linux distributions ship with a variant of vi known as vim (“Vi improved”), which supports more features than the original vi does. For that reason, throughout this tutorial we will use vi and vim interchangeably. + +If your distribution does not have vim installed, you can install it as follows. + +- Ubuntu and derivatives: aptitude update && aptitude install vim +- Red Hat-based distributions: yum update && yum install vim +- openSUSE: zypper update && zypper install vim + +### Why should I want to learn vi? ### + +There are at least 2 good reasons to learn vi. + +1. vi is always available (no matter what distribution you’re using) since it is required by POSIX. + +2. vi does not consume a considerable amount of system resources and allows us to perform any imaginable tasks without lifting our fingers from the keyboard. + +In addition, vi has a very extensive built-in manual, which can be launched using the :help command right after the program is started. This built-in manual contains more information than vi/m’s man page. + +![vi Man Pages](http://www.tecmint.com/wp-content/uploads/2014/10/vi-man-pages.png) + +vi Man Pages + +#### Launching vi #### + +To launch vi, type vi in your command prompt. + +![Start vi Editor](http://www.tecmint.com/wp-content/uploads/2014/10/start-vi-editor.png) + +Start vi Editor + +Then press i to enter Insert mode, and you can start typing. Another way to launch vi/m is. + + # vi filename + +Which will open a new buffer (more on buffers later) named filename, which you can later save to disk. + +#### Understanding Vi modes #### + +1. In command mode, vi allows the user to navigate around the file and enter vi commands, which are brief, case-sensitive combinations of one or more letters. Almost all of them can be prefixed with a number to repeat the command that number of times. + +For example, yy (or Y) copies the entire current line, whereas 3yy (or 3Y) copies the entire current line along with the two next lines (3 lines in total). We can always enter command mode (regardless of the mode we’re working on) by pressing the Esc key. The fact that in command mode the keyboard keys are interpreted as commands instead of text tends to be confusing to beginners. + +2. In ex mode, we can manipulate files (including saving a current file and running outside programs). To enter this mode, we must type a colon (:) from command mode, directly followed by the name of the ex-mode command that needs to be used. After that, vi returns automatically to command mode. + +3. In insert mode (the letter i is commonly used to enter this mode), we simply enter text. Most keystrokes result in text appearing on the screen (one important exception is the Esc key, which exits insert mode and returns to command mode). + +![vi Insert Mode](http://www.tecmint.com/wp-content/uploads/2014/10/vi-insert-mode.png) + +vi Insert Mode + +#### Vi Commands #### + +The following table shows a list of commonly used vi commands. File edition commands can be enforced by appending the exclamation sign to the command (for example, + + + + + + +  Key command +  Description + + +  h or left arrow +  Go one character to the left + + +  j or down arrow +  Go down one line + + +  k or up arrow +  Go up one line + + +  l (lowercase L) or right arrow +  Go one character to the right + + +  H +  Go to the top of the screen + + +  L +  Go to the bottom of the screen + + +  G +  Go to the end of the file + + +  w +  Move one word to the right + + +  b +  Move one word to the left + + +  0 (zero) +  Go to the beginning of the current line + + +  ^ +  Go to the first nonblank character on the current line + + +  $ +  Go to the end of the current line + + +  Ctrl-B +  Go back one screen + + +  Ctrl-F +  Go forward one screen + + +  i +  Insert at the current cursor position + + +  I (uppercase i) +  Insert at the beginning of the current line + + +  J (uppercase j) +  Join current line with the next one (move next line up) + + +  a +  Append after the current cursor position + + +  o (lowercase O) +  Creates a blank line after the current line + + +  O (uppercase o) +  Creates a blank line before the current line + + +  r +  Replace the character at the current cursor position + + +  R +  Overwrite at the current cursor position + + +  x +  Delete the character at the current cursor position + + +  X +  Delete the character immediately before (to the left) of the current cursor position + + +  dd +  Cut (for later pasting) the entire current line + + +  D +  Cut from the current cursor position to the end of the line (this command is equivalent to d$) + + +  yX +  Give a movement command X, copy (yank) the appropriate number of characters, words, or lines from the current cursor position + + +  yy or Y +  Yank (copy) the entire current line + + +  p +  Paste after (next line) the current cursor position + + +  P +  Paste before (previous line) the current cursor position + + +  . (period) +  Repeat the last command + + +  u +  Undo the last command + + +  U +  Undo the last command in the last line. This will work as long as the cursor is still on the line. + + +  n +  Find the next match in a search + + +  N +  Find the previous match in a search + + +  :n +  Next file; when multiple files are specified for editing, this commands loads the next file. + + +  :e file +  Load file in place of the current file. + + +  :r file +  Insert the contents of file after (next line) the current cursor position + + +  :q +  Quit without saving changes. + + +  :w file +  Write the current buffer to file. To append to an existing file, use :w >> file. + + +  :wq +  Write the contents of the current file and quit. Equivalent to x! and ZZ + + +  :r! command +  Execute command and insert output after (next line) the current cursor position. + + + + +#### Vi Options #### + +The following options can come in handy while running vim (we need to add them in our ~/.vimrc file). + + # echo set number >> ~/.vimrc + # echo syntax on >> ~/.vimrc + # echo set tabstop=4 >> ~/.vimrc + # echo set autoindent >> ~/.vimrc + +![vi Editor Options](http://www.tecmint.com/wp-content/uploads/2014/10/vi-options.png) + +vi Editor Options + +- set number shows line numbers when vi opens an existing or a new file. +- syntax on turns on syntax highlighting (for multiple file extensions) in order to make code and config files more readable. +- set tabstop=4 sets the tab size to 4 spaces (default value is 8). +- set autoindent carries over previous indent to the next line. + +#### Search and replace #### + +vi has the ability to move the cursor to a certain location (on a single line or over an entire file) based on searches. It can also perform text replacements with or without confirmation from the user. + +a). Searching within a line: the f command searches a line and moves the cursor to the next occurrence of a specified character in the current line. + +For example, the command fh would move the cursor to the next instance of the letter h within the current line. Note that neither the letter f nor the character you’re searching for will appear anywhere on your screen, but the character will be highlighted after you press Enter. + +For example, this is what I get after pressing f4 in command mode. + +![Search String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-string.png) + +Search String in Vi + +b). Searching an entire file: use the / command, followed by the word or phrase to be searched for. A search may be repeated using the previous search string with the n command, or the next one (using the N command). This is the result of typing /Jane in command mode. + +![Vi Search String in File](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-line.png) + +Vi Search String in File + +c). vi uses a command (similar to sed’s) to perform substitution operations over a range of lines or an entire file. To change the word “old” to “young” for the entire file, we must enter the following command. + + :%s/old/young/g + +**Notice**: The colon at the beginning of the command. + +![Vi Search and Replace](http://www.tecmint.com/wp-content/uploads/2014/10/vi-search-and-replace.png) + +Vi Search and Replace + +The colon (:) starts the ex command, s in this case (for substitution), % is a shortcut meaning from the first line to the last line (the range can also be specified as n,m which means “from line n to line m”), old is the search pattern, while young is the replacement text, and g indicates that the substitution should be performed on every occurrence of the search string in the file. + +Alternatively, a c can be added to the end of the command to ask for confirmation before performing any substitution. + + :%s/old/young/gc + +Before replacing the original text with the new one, vi/m will present us with the following message. + +![Replace String in Vi](http://www.tecmint.com/wp-content/uploads/2014/10/vi-replace-old-with-young.png) + +Replace String in Vi + +- y: perform the substitution (yes) +- n: skip this occurrence and go to the next one (no) +- a: perform the substitution in this and all subsequent instances of the pattern. +- q or Esc: quit substituting. +- l (lowercase L): perform this substitution and quit (last). +- Ctrl-e, Ctrl-y: Scroll down and up, respectively, to view the context of the proposed substitution. + +#### Editing Multiple Files at a Time #### + +Let’s type vim file1 file2 file3 in our command prompt. + + # vim file1 file2 file3 + +First, vim will open file1. To switch to the next file (file2), we need to use the :n command. When we want to return to the previous file, :N will do the job. + +In order to switch from file1 to file3. + +a). The :buffers command will show a list of the file currently being edited. + + :buffers + +![Edit Multiple Files](http://www.tecmint.com/wp-content/uploads/2014/10/vi-edit-multiple-files.png) + +Edit Multiple Files + +b). The command :buffer 3 (without the s at the end) will open file3 for editing. + +In the image above, a pound sign (#) indicates that the file is currently open but in the background, while %a marks the file that is currently being edited. On the other hand, a blank space after the file number (3 in the above example) indicates that the file has not yet been opened. + +#### Temporary vi buffers #### + +To copy a couple of consecutive lines (let’s say 4, for example) into a temporary buffer named a (not associated with a file) and place those lines in another part of the file later in the current vi section, we need to… + +1. Press the ESC key to be sure we are in vi Command mode. + +2. Place the cursor on the first line of the text we wish to copy. + +3. Type “a4yy to copy the current line, along with the 3 subsequent lines, into a buffer named a. We can continue editing our file – we do not need to insert the copied lines immediately. + +4. When we reach the location for the copied lines, use “a before the p or P commands to insert the lines copied into the buffer named a: + +- Type “ap to insert the lines copied into buffer a after the current line on which the cursor is resting. +- Type “aP to insert the lines copied into buffer a before the current line. + +If we wish, we can repeat the above steps to insert the contents of buffer a in multiple places in our file. A temporary buffer, as the one in this section, is disposed when the current window is closed. + +### Summary ### + +As we have seen, vi/m is a powerful and versatile text editor for the CLI. Feel free to share your own tricks and comments below. + +#### Reference Links #### + +- [About the LFCS][1] +- [Why get a Linux Foundation Certification?][2] +- [Register for the LFCS exam][3] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/vi-editor-usage/ + +作者:[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]:https://training.linuxfoundation.org/certification/LFCS +[2]:https://training.linuxfoundation.org/certification/why-certify-with-us +[3]:https://identity.linuxfoundation.org/user?destination=pid/1 \ No newline at end of file diff --git a/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md b/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md new file mode 100644 index 0000000000..6ac3d104a0 --- /dev/null +++ b/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md @@ -0,0 +1,382 @@ +Part 3 - LFCS: How to Archive/Compress Files & Directories, Setting File Attributes and Finding Files in Linux +================================================================================ +Recently, the Linux Foundation started the LFCS (Linux Foundation Certified Sysadmin) certification, a brand new program whose purpose is allowing individuals from all corners of the globe to have access to an exam, which if approved, certifies that the person is knowledgeable in performing basic to intermediate system administration tasks on Linux systems. This includes supporting already running systems and services, along with first-level troubleshooting and analysis, plus the ability to decide when to escalate issues to engineering teams. + +![Linux Foundation Certified Sysadmin – Part 3](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-3.png) + +Linux Foundation Certified Sysadmin – Part 3 + +Please watch the below video that gives the idea about The Linux Foundation Certification Program. + +注:youtube 视频 + + +This post is Part 3 of a 10-tutorial series, here in this part, we will cover how to archive/compress files and directories, set file attributes, and find files on the filesystem, that are required for the LFCS certification exam. + +### Archiving and Compression Tools ### + +A file archiving tool groups a set of files into a single standalone file that we can backup to several types of media, transfer across a network, or send via email. The most frequently used archiving utility in Linux is tar. When an archiving utility is used along with a compression tool, it allows to reduce the disk size that is needed to store the same files and information. + +#### The tar utility #### + +tar bundles a group of files together into a single archive (commonly called a tar file or tarball). The name originally stood for tape archiver, but we must note that we can use this tool to archive data to any kind of writeable media (not only to tapes). Tar is normally used with a compression tool such as gzip, bzip2, or xz to produce a compressed tarball. + +**Basic syntax:** + + # tar [options] [pathname ...] + +Where … represents the expression used to specify which files should be acted upon. + +#### Most commonly used tar commands #### + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Long optionAbbreviationDescription
 –create c Creates a tar archive
 –concatenate A Appends tar files to an archive
 –append r Appends files to the end of an archive
 –update u Appends files newer than copy in archive
 –diff or –compare d Find differences between archive and file system
 –file archive f Use archive file or device ARCHIVE
 –list t Lists the contents of a tarball
 –extract or –get x Extracts files from an archive
+ +#### Normally used operation modifiers #### + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Long optionAbbreviationDescription
 –directory dir C Changes to directory dir before performing operations
 –same-permissions p Preserves original permissions
 –verbose v Lists all files read or extracted. When this flag is used along with –list, the file sizes, ownership, and time stamps are displayed.
 –verify W Verifies the archive after writing it
 –exclude file — Excludes file from the archive
 –exclude=pattern X Exclude files, given as a PATTERN
 –gzip or –gunzip z Processes an archive through gzip
 –bzip2 j Processes an archive through bzip2
 –xz J Processes an archive through xz
+ +Gzip is the oldest compression tool and provides the least compression, while bzip2 provides improved compression. In addition, xz is the newest but (usually) provides the best compression. This advantages of best compression come at a price: the time it takes to complete the operation, and system resources used during the process. + +Normally, tar files compressed with these utilities have .gz, .bz2, or .xz extensions, respectively. In the following examples we will be using these files: file1, file2, file3, file4, and file5. + +**Grouping and compressing with gzip, bzip2 and xz** + +Group all the files in the current working directory and compress the resulting bundle with gzip, bzip2, and xz (please note the use of a regular expression to specify which files should be included in the bundle – this is to prevent the archiving tool to group the tarballs created in previous steps). + + # tar czf myfiles.tar.gz file[0-9] + # tar cjf myfiles.tar.bz2 file[0-9] + # tar cJf myfile.tar.xz file[0-9] + +![Compress Multiple Files Using tar](http://www.tecmint.com/wp-content/uploads/2014/10/Compress-Multiple-Files.png) + +Compress Multiple Files + +**Listing the contents of a tarball and updating / appending files to the bundle** + +List the contents of a tarball and display the same information as a long directory listing. Note that update or append operations cannot be applied to compressed files directly (if you need to update or append a file to a compressed tarball, you need to uncompress the tar file and update / append to it, then compress again). + + # tar tvf [tarball] + +![Check Files in tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/List-Archive-Content.png) + +List Archive Content + +Run any of the following commands: + + # gzip -d myfiles.tar.gz [#1] + # bzip2 -d myfiles.tar.bz2 [#2] + # xz -d myfiles.tar.xz [#3] + +Then + + # tar --delete --file myfiles.tar file4 (deletes the file inside the tarball) + # tar --update --file myfiles.tar file4 (adds the updated file) + +and + + # gzip myfiles.tar [ if you choose #1 above ] + # bzip2 myfiles.tar [ if you choose #2 above ] + # xz myfiles.tar [ if you choose #3 above ] + +Finally, + + # tar tvf [tarball] #again + +and compare the modification date and time of file4 with the same information as shown earlier. + +**Excluding file types** + +Suppose you want to perform a backup of user’s home directories. A good sysadmin practice would be (may also be specified by company policies) to exclude all video and audio files from backups. + +Maybe your first approach would be to exclude from the backup all files with an .mp3 or .mp4 extension (or other extensions). What if you have a clever user who can change the extension to .txt or .bkp, your approach won’t do you much good. In order to detect an audio or video file, you need to check its file type with file. The following shell script will do the job. + + #!/bin/bash + # Pass the directory to backup as first argument. + DIR=$1 + # Create the tarball and compress it. Exclude files with the MPEG string in its file type. + # -If the file type contains the string mpeg, $? (the exit status of the most recently executed command) expands to 0, and the filename is redirected to the exclude option. Otherwise, it expands to 1. + # -If $? equals 0, add the file to the list of files to be backed up. + tar X <(for i in $DIR/*; do file $i | grep -i mpeg; if [ $? -eq 0 ]; then echo $i; fi;done) -cjf backupfile.tar.bz2 $DIR/* + +![Exclude Files in tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/Exclude-Files-in-Tar.png) + +Exclude Files in tar + +**Restoring backups with tar preserving permissions** + +You can then restore the backup to the original user’s home directory (user_restore in this example), preserving permissions, with the following command. + + # tar xjf backupfile.tar.bz2 --directory user_restore --same-permissions + +![Restore Files from tar Archive](http://www.tecmint.com/wp-content/uploads/2014/10/Restore-tar-Backup-Files.png) + +Restore Files from Archive + +**Read Also:** + +- [18 tar Command Examples in Linux][1] +- [Dtrx – An Intelligent Archive Tool for Linux][2] + +### Using find Command to Search for Files ### + +The find command is used to search recursively through directory trees for files or directories that match certain characteristics, and can then either print the matching files or directories or perform other operations on the matches. + +Normally, we will search by name, owner, group, type, permissions, date, and size. + +#### Basic syntax: #### + +# find [directory_to_search] [expression] + +**Finding files recursively according to Size** + +Find all files (-f) in the current directory (.) and 2 subdirectories below (-maxdepth 3 includes the current working directory and 2 levels down) whose size (-size) is greater than 2 MB. + + # find . -maxdepth 3 -type f -size +2M + +![Find Files by Size in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Find-Files-Based-on-Size.png) + +Find Files Based on Size + +**Finding and deleting files that match a certain criteria** + +Files with 777 permissions are sometimes considered an open door to external attackers. Either way, it is not safe to let anyone do anything with files. We will take a rather aggressive approach and delete them! (‘{}‘ + is used to “collect” the results of the search). + + # find /home/user -perm 777 -exec rm '{}' + + +![Find all 777 Permission Files](http://www.tecmint.com/wp-content/uploads/2014/10/Find-Files-with-777-Permission.png) + +Find Files with 777Permission + +**Finding files per atime or mtime** + +Search for configuration files in /etc that have been accessed (-atime) or modified (-mtime) more (+180) or less (-180) than 6 months ago or exactly 6 months ago (180). + +Modify the following command as per the example below: + + # find /etc -iname "*.conf" -mtime -180 -print + +![Find Files by Modification Time](http://www.tecmint.com/wp-content/uploads/2014/10/Find-Modified-Files.png) + +Find Modified Files + +- Read Also: [35 Practical Examples of Linux ‘find’ Command][3] + +### File Permissions and Basic Attributes ### + +The first 10 characters in the output of ls -l are the file attributes. The first of these characters is used to indicate the file type: + +- – : a regular file +- -d : a directory +- -l : a symbolic link +- -c : a character device (which treats data as a stream of bytes, i.e. a terminal) +- -b : a block device (which handles data in blocks, i.e. storage devices) + +The next nine characters of the file attributes are called the file mode and represent the read (r), write (w), and execute (x) permissions of the file’s owner, the file’s group owner, and the rest of the users (commonly referred to as “the world”). + +Whereas the read permission on a file allows the same to be opened and read, the same permission on a directory allows its contents to be listed if the execute permission is also set. In addition, the execute permission in a file allows it to be handled as a program and run, while in a directory it allows the same to be cd’ed into it. + +File permissions are changed with the chmod command, whose basic syntax is as follows: + + # chmod [new_mode] file + +Where new_mode is either an octal number or an expression that specifies the new permissions. + +The octal number can be converted from its binary equivalent, which is calculated from the desired file permissions for the owner, the group, and the world, as follows: + +The presence of a certain permission equals a power of 2 (r=22, w=21, x=20), while its absence equates to 0. For example: + +![Linux File Permissions](http://www.tecmint.com/wp-content/uploads/2014/10/File-Permissions.png) + +File Permissions + +To set the file’s permissions as above in octal form, type: + + # chmod 744 myfile + +You can also set a file’s mode using an expression that indicates the owner’s rights with the letter u, the group owner’s rights with the letter g, and the rest with o. All of these “individuals” can be represented at the same time with the letter a. Permissions are granted (or revoked) with the + or – signs, respectively. + +**Revoking execute permission for a shell script to all users** + +As we explained earlier, we can revoke a certain permission prepending it with the minus sign and indicating whether it needs to be revoked for the owner, the group owner, or all users. The one-liner below can be interpreted as follows: Change mode for all (a) users, revoke (–) execute permission (x). + + # chmod a-x backup.sh + +Granting read, write, and execute permissions for a file to the owner and group owner, and read permissions for the world. + +When we use a 3-digit octal number to set permissions for a file, the first digit indicates the permissions for the owner, the second digit for the group owner and the third digit for everyone else: + +- Owner: (r=22 + w=21 + x=20 = 7) +- Group owner: (r=22 + w=21 + x=20 = 7) +- World: (r=22 + w=0 + x=0 = 4), + + # chmod 774 myfile + +In time, and with practice, you will be able to decide which method to change a file mode works best for you in each case. A long directory listing also shows the file’s owner and its group owner (which serve as a rudimentary yet effective access control to files in a system): + +![Linux File Listing](http://www.tecmint.com/wp-content/uploads/2014/10/Linux-File-Listing.png) + +Linux File Listing + +File ownership is changed with the chown command. The owner and the group owner can be changed at the same time or separately. Its basic syntax is as follows: + + # chown user:group file + +Where at least user or group need to be present. + +**Few Examples** + +Changing the owner of a file to a certain user. + + # chown gacanepa sent + +Changing the owner and group of a file to an specific user:group pair. + + # chown gacanepa:gacanepa TestFile + +Changing only the group owner of a file to a certain group. Note the colon before the group’s name. + + # chown :gacanepa email_body.txt + +### Conclusion ### + +As a sysadmin, you need to know how to create and restore backups, how to find files in your system and change their attributes, along with a few tricks that can make your life easier and will prevent you from running into future issues. + +I hope that the tips provided in the present article will help you to achieve that goal. Feel free to add your own tips and ideas in the comments section for the benefit of the community. Thanks in advance! +Reference Links + +- [About the LFCS][4] +- [Why get a Linux Foundation Certification?][5] +- [Register for the LFCS exam][6] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/compress-files-and-finding-files-in-linux/ + +作者:[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/18-tar-command-examples-in-linux/ +[2]:http://www.tecmint.com/dtrx-an-intelligent-archive-extraction-tar-zip-cpio-rpm-deb-rar-tool-for-linux/ +[3]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/ +[4]:https://training.linuxfoundation.org/certification/LFCS +[5]:https://training.linuxfoundation.org/certification/why-certify-with-us +[6]:https://identity.linuxfoundation.org/user?destination=pid/1 \ No newline at end of file diff --git a/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md b/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md new file mode 100644 index 0000000000..ada637fabb --- /dev/null +++ b/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md @@ -0,0 +1,191 @@ +Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition +================================================================================ +Last August, the Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a shiny chance for system administrators to show, through a performance-based exam, that they can perform overall operational support of Linux systems: system support, first-level diagnosing and monitoring, plus issue escalation – if needed – to other support teams. + +![Linux Foundation Certified Sysadmin – Part 4](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-4.png) + +Linux Foundation Certified Sysadmin – Part 4 + +Please aware that Linux Foundation certifications are precise, totally based on performance and available through an online portal anytime, anywhere. Thus, you no longer have to travel to a examination center to get the certifications you need to establish your skills and expertise. + +Please watch the below video that explains The Linux Foundation Certification Program. + +注:youtube 视频 + + +This post is Part 4 of a 10-tutorial series, here in this part, we will cover the Partitioning storage devices, Formatting filesystems and Configuring swap partition, that are required for the LFCS certification exam. + +### Partitioning Storage Devices ### + +Partitioning is a means to divide a single hard drive into one or more parts or “slices” called partitions. A partition is a section on a drive that is treated as an independent disk and which contains a single type of file system, whereas a partition table is an index that relates those physical sections of the hard drive to partition identifications. + +In Linux, the traditional tool for managing MBR partitions (up to ~2009) in IBM PC compatible systems is fdisk. For GPT partitions (~2010 and later) we will use gdisk. Each of these tools can be invoked by typing its name followed by a device name (such as /dev/sdb). + +#### Managing MBR Partitions with fdisk #### + +We will cover fdisk first. + + # fdisk /dev/sdb + +A prompt appears asking for the next operation. If you are unsure, you can press the ‘m‘ key to display the help contents. + +![fdisk Help Menu](http://www.tecmint.com/wp-content/uploads/2014/10/fdisk-help.png) + +fdisk Help Menu + +In the above image, the most frequently used options are highlighted. At any moment, you can press ‘p‘ to display the current partition table. + +![Check Partition Table in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Show-Partition-Table.png) + +Show Partition Table + +The Id column shows the partition type (or partition id) that has been assigned by fdisk to the partition. A partition type serves as an indicator of the file system, the partition contains or, in simple words, the way data will be accessed in that partition. + +Please note that a comprehensive study of each partition type is out of the scope of this tutorial – as this series is focused on the LFCS exam, which is performance-based. + +**Some of the options used by fdisk as follows:** + +You can list all the partition types that can be managed by fdisk by pressing the ‘l‘ option (lowercase l). + +Press ‘d‘ to delete an existing partition. If more than one partition is found in the drive, you will be asked which one should be deleted. + +Enter the corresponding number, and then press ‘w‘ (write modifications to partition table) to apply changes. + +In the following example, we will delete /dev/sdb2, and then print (p) the partition table to verify the modifications. + +![fdisk Command Options](http://www.tecmint.com/wp-content/uploads/2014/10/fdisk-options.png) + +fdisk Command Options + +Press ‘n‘ to create a new partition, then ‘p‘ to indicate it will be a primary partition. Finally, you can accept all the default values (in which case the partition will occupy all the available space), or specify a size as follows. + +![Create New Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-New-Partition.png) + +Create New Partition + +If the partition Id that fdisk chose is not the right one for our setup, we can press ‘t‘ to change it. + +![Change Partition Name in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Change-Partition-Name.png) + +Change Partition Name + +When you’re done setting up the partitions, press ‘w‘ to commit the changes to disk. + +![Save Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Partition-Changes.png) + +Save Partition Changes + +#### Managing GPT Partitions with gdisk #### + +In the following example, we will use /dev/sdb. + + # gdisk /dev/sdb + +We must note that gdisk can be used either to create MBR or GPT partitions. + +![Create GPT Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-GPT-Partitions.png) + +Create GPT Partitions + +The advantage of using GPT partitioning is that we can create up to 128 partitions in the same disk whose size can be up to the order of petabytes, whereas the maximum size for MBR partitions is 2 TB. + +Note that most of the options in fdisk are the same in gdisk. For that reason, we will not go into detail about them, but here’s a screenshot of the process. + +![gdisk Command Options](http://www.tecmint.com/wp-content/uploads/2014/10/gdisk-options.png) + +gdisk Command Options + +### Formatting Filesystems ### + +Once we have created all the necessary partitions, we must create filesystems. To find out the list of filesystems supported in your system, run. + + # ls /sbin/mk* + +![Check Filesystems Type in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Filesystems.png) + +Check Filesystems Type + +The type of filesystem that you should choose depends on your requirements. You should consider the pros and cons of each filesystem and its own set of features. Two important attributes to look for in a filesystem are. + +- Journaling support, which allows for faster data recovery in the event of a system crash. +- Security Enhanced Linux (SELinux) support, as per the project wiki, “a security enhancement to Linux which allows users and administrators more control over access control”. + +In our next example, we will create an ext4 filesystem (supports both journaling and SELinux) labeled Tecmint on /dev/sdb1, using mkfs, whose basic syntax is. + + # mkfs -t [filesystem] -L [label] device + or + # mkfs.[filesystem] -L [label] device + +![Create ext4 Filesystems in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystems.png) + +Create ext4 Filesystems + +### Creating and Using Swap Partitions ### + +Swap partitions are necessary if we need our Linux system to have access to virtual memory, which is a section of the hard disk designated for use as memory, when the main system memory (RAM) is all in use. For that reason, a swap partition may not be needed on systems with enough RAM to meet all its requirements; however, even in that case it’s up to the system administrator to decide whether to use a swap partition or not. + +A simple rule of thumb to decide the size of a swap partition is as follows. + +Swap should usually equal 2x physical RAM for up to 2 GB of physical RAM, and then an additional 1x physical RAM for any amount above 2 GB, but never less than 32 MB. + +So, if: + +M = Amount of RAM in GB, and S = Amount of swap in GB, then + + If M < 2 + S = M *2 + Else + S = M + 2 + +Remember this is just a formula and that only you, as a sysadmin, have the final word as to the use and size of a swap partition. + +To configure a swap partition, create a regular partition as demonstrated earlier with the desired size. Next, we need to add the following entry to the /etc/fstab file (X can be either b or c). + + /dev/sdX1 swap swap sw 0 0 + +Finally, let’s format and enable the swap partition. + + # mkswap /dev/sdX1 + # swapon -v /dev/sdX1 + +To display a snapshot of the swap partition(s). + + # cat /proc/swaps + +To disable the swap partition. + + # swapoff /dev/sdX1 + +For the next example, we’ll use /dev/sdc1 (=512 MB, for a system with 256 MB of RAM) to set up a partition with fdisk that we will use as swap, following the steps detailed above. Note that we will specify a fixed size in this case. + +![Create-Swap-Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Swap-Partition.png) + +Create Swap Partition + +![Add Swap Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Swap-Partition.png) + +Enable Swap Partition + +### Conclusion ### + +Creating partitions (including swap) and formatting filesystems are crucial in your road to Sysadminship. I hope that the tips given in this article will guide you to achieve your goals. Feel free to add your own tips & ideas in the comments section below, for the benefit of the community. +Reference Links + +- [About the LFCS][1] +- [Why get a Linux Foundation Certification?][2] +- [Register for the LFCS exam][3] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-partitions-and-filesystems-in-linux/ + +作者:[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]:https://training.linuxfoundation.org/certification/LFCS +[2]:https://training.linuxfoundation.org/certification/why-certify-with-us +[3]:https://identity.linuxfoundation.org/user?destination=pid/1 \ No newline at end of file diff --git a/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md b/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md new file mode 100644 index 0000000000..1544a378bc --- /dev/null +++ b/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md @@ -0,0 +1,232 @@ +Part 5 - LFCS: How to Mount/Unmount Local and Network (Samba & NFS) Filesystems in Linux +================================================================================ +The Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a brand new program whose purpose is allowing individuals from all corners of the globe to get certified in basic to intermediate system administration tasks for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus smart decision-making when it comes to raising issues to upper support teams. + +![Linux Foundation Certified Sysadmin – Part 5](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-5.png) + +Linux Foundation Certified Sysadmin – Part 5 + +The following video shows an introduction to The Linux Foundation Certification Program. + +注:youtube 视频 + + +This post is Part 5 of a 10-tutorial series, here in this part, we will explain How to mount/unmount local and network filesystems in linux, that are required for the LFCS certification exam. + +### Mounting Filesystems ### + +Once a disk has been partitioned, Linux needs some way to access the data on the partitions. Unlike DOS or Windows (where this is done by assigning a drive letter to each partition), Linux uses a unified directory tree where each partition is mounted at a mount point in that tree. + +A mount point is a directory that is used as a way to access the filesystem on the partition, and mounting the filesystem is the process of associating a certain filesystem (a partition, for example) with a specific directory in the directory tree. + +In other words, the first step in managing a storage device is attaching the device to the file system tree. This task can be accomplished on a one-time basis by using tools such as mount (and then unmounted with umount) or persistently across reboots by editing the /etc/fstab file. + +The mount command (without any options or arguments) shows the currently mounted filesystems. + + # mount + +![Check Mounted Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/check-mounted-filesystems.png) + +Check Mounted Filesystem + +In addition, mount is used to mount filesystems into the filesystem tree. Its standard syntax is as follows. + + # mount -t type device dir -o options + +This command instructs the kernel to mount the filesystem found on device (a partition, for example, that has been formatted with a filesystem type) at the directory dir, using all options. In this form, mount does not look in /etc/fstab for instructions. + +If only a directory or device is specified, for example. + + # mount /dir -o options + or + # mount device -o options + +mount tries to find a mount point and if it can’t find any, then searches for a device (both cases in the /etc/fstab file), and finally attempts to complete the mount operation (which usually succeeds, except for the case when either the directory or the device is already being used, or when the user invoking mount is not root). + +You will notice that every line in the output of mount has the following format. + + device on directory type (options) + +For example, + + /dev/mapper/debian-home on /home type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered) + +Reads: + +dev/mapper/debian-home is mounted on /home, which has been formatted as ext4, with the following options: rw,relatime,user_xattr,barrier=1,data=ordered + +**Mount Options** + +Most frequently used mount options include. + +- async: allows asynchronous I/O operations on the file system being mounted. +- auto: marks the file system as enabled to be mounted automatically using mount -a. It is the opposite of noauto. +- defaults: this option is an alias for async,auto,dev,exec,nouser,rw,suid. Note that multiple options must be separated by a comma without any spaces. If by accident you type a space between options, mount will interpret the subsequent text string as another argument. +- loop: Mounts an image (an .iso file, for example) as a loop device. This option can be used to simulate the presence of the disk’s contents in an optical media reader. +- noexec: prevents the execution of executable files on the particular filesystem. It is the opposite of exec. +- nouser: prevents any users (other than root) to mount and unmount the filesystem. It is the opposite of user. +- remount: mounts the filesystem again in case it is already mounted. +- ro: mounts the filesystem as read only. +- rw: mounts the file system with read and write capabilities. +- relatime: makes access time to files be updated only if atime is earlier than mtime. +- user_xattr: allow users to set and remote extended filesystem attributes. + +**Mounting a device with ro and noexec options** + + # mount -t ext4 /dev/sdg1 /mnt -o ro,noexec + +In this case we can see that attempts to write a file to or to run a binary file located inside our mounting point fail with corresponding error messages. + + # touch /mnt/myfile + # /mnt/bin/echo “Hi there” + +![Mount Device in Read Write Mode](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Device-Read-Write.png) + +Mount Device Read Write + +**Mounting a device with default options** + +In the following scenario, we will try to write a file to our newly mounted device and run an executable file located within its filesystem tree using the same commands as in the previous example. + + # mount -t ext4 /dev/sdg1 /mnt -o defaults + +![Mount Device in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Device.png) + +Mount Device + +In this last case, it works perfectly. + +### Unmounting Devices ### + +Unmounting a device (with the umount command) means finish writing all the remaining “on transit” data so that it can be safely removed. Note that if you try to remove a mounted device without properly unmounting it first, you run the risk of damaging the device itself or cause data loss. + +That being said, in order to unmount a device, you must be “standing outside” its block device descriptor or mount point. In other words, your current working directory must be something else other than the mounting point. Otherwise, you will get a message saying that the device is busy. + +![Unmount Device in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Unmount-Device.png) + +Unmount Device + +An easy way to “leave” the mounting point is typing the cd command which, in lack of arguments, will take us to our current user’s home directory, as shown above. + +### Mounting Common Networked Filesystems ### + +The two most frequently used network file systems are SMB (which stands for “Server Message Block”) and NFS (“Network File System”). Chances are you will use NFS if you need to set up a share for Unix-like clients only, and will opt for Samba if you need to share files with Windows-based clients and perhaps other Unix-like clients as well. + +Read Also + +- [Setup Samba Server in RHEL/CentOS and Fedora][1] +- [Setting up NFS (Network File System) on RHEL/CentOS/Fedora and Debian/Ubuntu][2] + +The following steps assume that Samba and NFS shares have already been set up in the server with IP 192.168.0.10 (please note that setting up a NFS share is one of the competencies required for the LFCE exam, which we will cover after the present series). + +#### Mounting a Samba share on Linux #### + +Step 1: Install the samba-client samba-common and cifs-utils packages on Red Hat and Debian based distributions. + + # yum update && yum install samba-client samba-common cifs-utils + # aptitude update && aptitude install samba-client samba-common cifs-utils + +Then run the following command to look for available samba shares in the server. + + # smbclient -L 192.168.0.10 + +And enter the password for the root account in the remote machine. + +![Mount Samba Share in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Samba-Share.png) + +Mount Samba Share + +In the above image we have highlighted the share that is ready for mounting on our local system. You will need a valid samba username and password on the remote server in order to access it. + +Step 2: When mounting a password-protected network share, it is not a good idea to write your credentials in the /etc/fstab file. Instead, you can store them in a hidden file somewhere with permissions set to 600, like so. + + # mkdir /media/samba + # echo “username=samba_username” > /media/samba/.smbcredentials + # echo “password=samba_password” >> /media/samba/.smbcredentials + # chmod 600 /media/samba/.smbcredentials + +Step 3: Then add the following line to /etc/fstab file. + + # //192.168.0.10/gacanepa /media/samba cifs credentials=/media/samba/.smbcredentials,defaults 0 0 + +Step 4: You can now mount your samba share, either manually (mount //192.168.0.10/gacanepa) or by rebooting your machine so as to apply the changes made in /etc/fstab permanently. + +![Mount Password Protect Samba Share](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-Password-Protect-Samba-Share.png) + +Mount Password Protect Samba Share + +#### Mounting a NFS share on Linux #### + +Step 1: Install the nfs-common and portmap packages on Red Hat and Debian based distributions. + + # yum update && yum install nfs-utils nfs-utils-lib + # aptitude update && aptitude install nfs-common + +Step 2: Create a mounting point for the NFS share. + + # mkdir /media/nfs + +Step 3: Add the following line to /etc/fstab file. + +192.168.0.10:/NFS-SHARE /media/nfs nfs defaults 0 0 + +Step 4: You can now mount your nfs share, either manually (mount 192.168.0.10:/NFS-SHARE) or by rebooting your machine so as to apply the changes made in /etc/fstab permanently. + +![Mount NFS Share in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-NFS-Share.png) + +Mount NFS Share + +### Mounting Filesystems Permanently ### + +As shown in the previous two examples, the /etc/fstab file controls how Linux provides access to disk partitions and removable media devices and consists of a series of lines that contain six fields each; the fields are separated by one or more spaces or tabs. A line that begins with a hash mark (#) is a comment and is ignored. + +Each line has the following format. + + + +Where: + +- : The first column specifies the mount device. Most distributions now specify partitions by their labels or UUIDs. This practice can help reduce problems if partition numbers change. +- : The second column specifies the mount point. +- : The file system type code is the same as the type code used to mount a filesystem with the mount command. A file system type code of auto lets the kernel auto-detect the filesystem type, which can be a convenient option for removable media devices. Note that this option may not be available for all filesystems out there. +- : One (or more) mount option(s). +- : You will most likely leave this to 0 (otherwise set it to 1) to disable the dump utility to backup the filesystem upon boot (The dump program was once a common backup tool, but it is much less popular today.) +- : This column specifies whether the integrity of the filesystem should be checked at boot time with fsck. A 0 means that fsck should not check a filesystem. The higher the number, the lowest the priority. Thus, the root partition will most likely have a value of 1, while all others that should be checked should have a value of 2. + +**Mount Examples** + +1. To mount a partition with label TECMINT at boot time with rw and noexec attributes, you should add the following line in /etc/fstab file. + + LABEL=TECMINT /mnt ext4 rw,noexec 0 0 + +2. If you want the contents of a disk in your DVD drive be available at boot time. + + /dev/sr0 /media/cdrom0 iso9660 ro,user,noauto 0 0 + +Where /dev/sr0 is your DVD drive. + +### Summary ### + +You can rest assured that mounting and unmounting local and network filesystems from the command line will be part of your day-to-day responsibilities as sysadmin. You will also need to master /etc/fstab. I hope that you have found this article useful to help you with those tasks. Feel free to add your comments (or ask questions) below and to share this article through your network social profiles. +Reference Links + +- [About the LFCS][3] +- [Why get a Linux Foundation Certification?][4] +- [Register for the LFCS exam][5] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/mount-filesystem-in-linux/ + +作者:[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/setup-samba-server-using-tdbsam-backend-on-rhel-centos-6-3-5-8-and-fedora-17-12/ +[2]:http://www.tecmint.com/how-to-setup-nfs-server-in-linux/ +[3]:https://training.linuxfoundation.org/certification/LFCS +[4]:https://training.linuxfoundation.org/certification/why-certify-with-us +[5]:https://identity.linuxfoundation.org/user?destination=pid/1 \ No newline at end of file From 2bd491e4887a8ccf9e80670d9ef772cf3dc54ea8 Mon Sep 17 00:00:00 2001 From: KS Date: Mon, 17 Aug 2015 16:25:20 +0800 Subject: [PATCH 1769/2517] Update 20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md --- ...ll Strongswan - A Tool to Setup IPsec Based VPN in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md b/sources/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md index ca909934fa..cd9ee43213 100644 --- a/sources/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md +++ b/sources/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md @@ -1,3 +1,4 @@ +wyangsun translating Install Strongswan - A Tool to Setup IPsec Based VPN in Linux ================================================================================ IPsec is a standard which provides the security at network layer. It consist of authentication header (AH) and encapsulating security payload (ESP) components. AH provides the packet Integrity and confidentiality is provided by ESP component . IPsec ensures the following security features at network layer. @@ -110,4 +111,4 @@ via: http://linoxide.com/security/install-strongswan/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/naveeda/ -[1]:https://www.strongswan.org/ \ No newline at end of file +[1]:https://www.strongswan.org/ From ca3975194fd28a2a417cd36a198be1034033bea2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 17 Aug 2015 21:22:39 +0800 Subject: [PATCH 1770/2517] Update 20150728 Process of the Linux kernel building.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译一点点 --- sources/tech/20150728 Process of the Linux kernel building.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index d3c71f0a43..e139143ccc 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -305,8 +305,12 @@ all: vmlinux Don't worry that we have missed many lines in Makefile that are placed after `export RCS_FIND_IGNORE.....` and before `all: vmlinux.....`. This part of the makefile is responsible for the `make *.config` targets and as I wrote in the beginning of this part we will see only building of the kernel in a general way. +不要操心我们略过的从`export RCS_FIND_IGNORE.....` 到`all: vmlinux.....` 这一部分makefile 代码,他们只是负责根据各种配置文件生成不同目标内核的,因为之前我就说了这一部分我们只讨论构建内核的通用途径。 + The `all:` target is the default when no target is given on the command line. You can see here that we include architecture specific makefile there (in our case it will be [arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)). From this moment we will continue from this makefile. As we can see `all` target depends on the `vmlinux` target that defined a little lower in the top makefile: +目标`all:` 是在命令行里不指定目标时默认生成的目标。你可以看到这里我们包含了架构相关的makefile(默认情况下会是[arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile))。从这一时刻起,我们会从这个makefile 继续进行下去。如我们所见,目标`all` 依赖于根makefile 后面一点的生命`vmlinux`: + ```Makefile vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE ``` From 8cceff8c289b4e4c694af9de6bb755634cb10297 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 17 Aug 2015 22:44:42 +0800 Subject: [PATCH 1771/2517] PUB:20150816 shellinabox--A Web based AJAX Terminal Emulator @xiaoyu33 --- ...box--A Web based AJAX Terminal Emulator.md | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) rename {translated/share => published}/20150816 shellinabox--A Web based AJAX Terminal Emulator.md (66%) diff --git a/translated/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md b/published/20150816 shellinabox--A Web based AJAX Terminal Emulator.md similarity index 66% rename from translated/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md rename to published/20150816 shellinabox--A Web based AJAX Terminal Emulator.md index 71acf990c1..c4d9523d50 100644 --- a/translated/share/20150816 shellinabox--A Web based AJAX Terminal Emulator.md +++ b/published/20150816 shellinabox--A Web based AJAX Terminal Emulator.md @@ -1,16 +1,17 @@ -shellinabox–基于Web的Ajax的终端模拟器安装及使用详解 +shellinabox:一款使用 AJAX 的基于 Web 的终端模拟器 ================================================================================ + ### shellinabox简介 ### -unixmen的读者朋友们,你们好! +通常情况下,我们在访问任何远程服务器时,会使用常见的通信工具如OpenSSH和Putty等。但是,有可能我们在防火墙后面不能使用这些工具访问远程系统,或者防火墙只允许HTTPS流量才能通过。不用担心!即使你在这样的防火墙后面,我们依然有办法来访问你的远程系统。而且,你不需要安装任何类似于OpenSSH或Putty的通讯工具。你只需要有一个支持JavaScript和CSS的现代浏览器,并且你不用安装任何插件或第三方应用软件。 -通常情况下,我们访问任何远程服务器时,使用常见的通信工具如OpenSSH和Putty等。但是如果我们在防火墙外,或者防火墙只允许HTTPS流量才能通过,那么我们就不能再使用这些工具来访问远程系统了。不用担心!即使你在防火墙后面,我们依然有办法来访问你的远程系统。而且,你不需要安装任何类似于OpenSSH或Putty的通讯工具。你只需要有一个支持JavaScript和CSS的现代浏览器。并且你不用安装任何插件或第三方应用软件。 +这个 **Shell In A Box**,发音是**shellinabox**,是由**Markus Gutschke**开发的一款自由开源的基于Web的Ajax的终端模拟器。它使用AJAX技术,通过Web浏览器提供了类似原生的 Shell 的外观和感受。 -Meet **Shell In A Box**,发音是**shellinabox**,是由**Markus Gutschke**开发的一款免费的,开源的,基于Web的Ajax的终端模拟器。它使用AJAX技术,通过Web浏览器提供的外观和感觉像一个原生壳。该**shellinaboxd**的守护进程实现了一个Web服务器,能够侦听指定的端口。Web服务器发布一个或多个服务,这些服务将在VT100模拟器实现为一个AJAX的Web应用程序显示。默认情况下,端口为4200。你可以更改默认端口到任意选择的任意端口号。在你的远程服务器安装shellinabox以后,如果你想从本地系统接入,打开Web浏览器并导航到:**http://IP-Address:4200/**。输入你的用户名和密码,然后就可以开始使用你远程系统的外壳。看起来很有趣,不是吗?确实! +这个**shellinaboxd**守护进程实现了一个Web服务器,能够侦听指定的端口。其Web服务器可以发布一个或多个服务,这些服务显示在用 AJAX Web 应用实现的VT100模拟器中。默认情况下,端口为4200。你可以更改默认端口到任意选择的任意端口号。在你的远程服务器安装shellinabox以后,如果你想从本地系统接入,打开Web浏览器并导航到:**http://IP-Address:4200/**。输入你的用户名和密码,然后就可以开始使用你远程系统的Shell。看起来很有趣,不是吗?确实 有趣! **免责声明**: -shellinabox不是SSH客户端或任何安全软件。它仅仅是一个应用程序,能够通过Web浏览器模拟一个远程系统的壳。同时,它和SSH没有任何关系。这不是防弹的安全的方式来远程控制您的系统。这只是迄今为止最简单的方法之一。无论什么原因,你都不应该在任何公共网络上运行它。 +shellinabox不是SSH客户端或任何安全软件。它仅仅是一个应用程序,能够通过Web浏览器模拟一个远程系统的Shell。同时,它和SSH没有任何关系。这不是可靠的安全地远程控制您的系统的方式。这只是迄今为止最简单的方法之一。无论如何,你都不应该在任何公共网络上运行它。 ### 安装shellinabox ### @@ -48,7 +49,7 @@ shellinabox在默认库是可用的。所以,你可以使用命令来安装它 # vi /etc/sysconfig/shellinaboxd -更改你的端口到任意数量。因为我在本地网络上测试它,所以我使用默认值。 +更改你的端口到任意数字。因为我在本地网络上测试它,所以我使用默认值。 # Shell in a box daemon configuration # For details see shellinaboxd man page @@ -98,7 +99,7 @@ shellinabox在默认库是可用的。所以,你可以使用命令来安装它 ### 使用 ### -现在,去你的客户端系统,打开Web浏览器并导航到:**https://ip-address-of-remote-servers:4200**。 +现在,在你的客户端系统,打开Web浏览器并导航到:**https://ip-address-of-remote-servers:4200**。 **注意**:如果你改变了端口,请填写修改后的端口。 @@ -110,13 +111,13 @@ shellinabox在默认库是可用的。所以,你可以使用命令来安装它 ![Shell In A Box - Google Chrome_003](http://www.unixmen.com/wp-content/uploads/2015/08/sk@server1-Shell-In-A-Box-Google-Chrome_003.jpg) -右键点击你浏览器的空白位置。你可以得到一些有很有用的额外的菜单选项。 +右键点击你浏览器的空白位置。你可以得到一些有很有用的额外菜单选项。 ![Shell In A Box - Google Chrome_004](http://www.unixmen.com/wp-content/uploads/2015/08/sk@server1-Shell-In-A-Box-Google-Chrome_004.jpg) 从现在开始,你可以通过本地系统的Web浏览器在你的远程服务器随意操作。 -当你完成时,记得点击**退出**。 +当你完成工作时,记得输入`exit`退出。 当再次连接到远程系统时,单击**连接**按钮,然后输入远程服务器的用户名和密码。 @@ -134,7 +135,7 @@ shellinabox在默认库是可用的。所以,你可以使用命令来安装它 ### 结论 ### -正如我之前提到的,如果你在服务器运行在防火墙后面,那么基于web的SSH工具是非常有用的。有许多基于web的SSH工具,但shellinabox是非常简单并且有用的工具,能从的网络上的任何地方,模拟一个远程系统的壳。因为它是基于浏览器的,所以你可以从任何设备访问您的远程服务器,只要你有一个支持JavaScript和CSS的浏览器。 +正如我之前提到的,如果你在服务器运行在防火墙后面,那么基于web的SSH工具是非常有用的。有许多基于web的SSH工具,但shellinabox是非常简单而有用的工具,可以从的网络上的任何地方,模拟一个远程系统的Shell。因为它是基于浏览器的,所以你可以从任何设备访问您的远程服务器,只要你有一个支持JavaScript和CSS的浏览器。 就这些啦。祝你今天有个好心情! @@ -148,7 +149,7 @@ via: http://www.unixmen.com/shellinabox-a-web-based-ajax-terminal-emulator/ 作者:[SK][a] 译者:[xiaoyu33](https://github.com/xiaoyu33) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 40cbb17f9ee6f21418829d1c6ebf83976f2ad59a Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 17 Aug 2015 23:53:26 +0800 Subject: [PATCH 1772/2517] PUB:20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @XLCYun 翻译的渐入佳境了! --- ...t & Wrong - Page 3 - GNOME Applications.md | 2 +- ...Right & Wrong - Page 4 - GNOME Settings.md | 52 ++++++++++++++++++ ...Right & Wrong - Page 4 - GNOME Settings.md | 54 ------------------- 3 files changed, 53 insertions(+), 55 deletions(-) create mode 100644 published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md delete mode 100644 translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md diff --git a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md index 61600366c9..4dd942dd29 100644 --- a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md +++ b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md @@ -7,7 +7,7 @@ 这是一个基本扯平的方面。每一个桌面环境都有一些非常好的应用,也有一些不怎么样的。再次强调,Gnome 把那些 KDE 完全错失的小细节给做对了。我不是想说 KDE 中有哪些应用不好。他们都能工作,但仅此而已。也就是说:它们合格了,但确实还没有达到甚至接近100分。 -Gnome 是一个样子,KDE 是另外一种。Dragon 播放器运行得很好,清晰的标出了播放文件、URL或和光盘的按钮,正如你在 Gnome Videos 中能做到的一样……但是在便利的文件名和用户的友好度方面,Gnome 多走了一小步。它默认显示了在你的电脑上检测到的所有影像文件,不需要你做任何事情。KDE 有 [Baloo][](正如之前的 [Nepomuk][2],LCTT 译注:这是 KDE 中一种文件索引服务框架)为什么不使用它们?它们能列出可读取的影像文件……但却没被使用。 +Gnome 在左,KDE 在右。Dragon 播放器运行得很好,清晰的标出了播放文件、URL或和光盘的按钮,正如你在 Gnome Videos 中能做到的一样……但是在便利的文件名和用户的友好度方面,Gnome 多走了一小步。它默认显示了在你的电脑上检测到的所有影像文件,不需要你做任何事情。KDE 有 [Baloo][](正如之前的 [Nepomuk][2],LCTT 译注:这是 KDE 中一种文件索引服务框架)为什么不使用它们?它们能列出可读取的影像文件……但却没被使用。 下一步……音乐播放器 diff --git a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md new file mode 100644 index 0000000000..289c1cb14e --- /dev/null +++ b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md @@ -0,0 +1,52 @@ +一周 GNOME 之旅:品味它和 KDE 的是是非非(第四节 GNOME设置) +================================================================================ + +### 设置 ### + +在这我要挑一挑几个特定 KDE 控制模块的毛病,大部分原因是因为相比它们的对手GNOME来说,糟糕得太可笑,实话说,真是悲哀。 + +第一个接招的?打印机。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers1_show&w=1920) + +GNOME 在左,KDE 在右。你知道左边跟右边的打印程序有什么区别吗?当我在 GNOME 控制中心打开“打印机”时,程序窗口弹出来了,然后这样就可以使用了。而当我在 KDE 系统设置打开“打印机”时,我得到了一条密码提示。甚至我都没能看一眼打印机呢,我就必须先交出 ROOT 密码。 + +让我再重复一遍。在今天这个有了 PolicyKit 和 Logind 的日子里,对一个应该是 sudo 的操作,我依然被询问要求 ROOT 的密码。我安装系统的时候甚至都没设置 root 密码。所以我必须跑到 Konsole 去,接着运行 'sudo passwd root' 命令,这样我才能给 root 设一个密码,然后我才能回到系统设置中的打印程序,再交出 root 密码,然后仅仅是看一看哪些打印机可用。完成了这些工作后,当我点击“添加打印机”时,我再次得到请求 ROOT 密码的提示,当我解决了它后再选择一个打印机和驱动时,我再次得到请求 ROOT 密码的提示。仅仅是为了添加一个打印机到系统我就收到三次密码请求! + +而在 GNOME 下添加打印机,在点击打印机程序中的“解锁”之前,我没有得到任何请求 SUDO 密码的提示。整个过程我只被请求过一次,仅此而已。KDE,求你了……采用 GNOME 的“解锁”模式吧。不到一定需要的时候不要发出提示。还有,不管是哪个库,只要它允许 KDE 应用程序绕过 PolicyKit/Logind(如果有的话)并直接请求 ROOT 权限……那就把它封进箱里吧。如果这是个多用户系统,那我要么必须交出 ROOT 密码,要么我必须时时刻刻待命,以免有一个用户需要升级、更改或添加一个新的打印机。而这两种情况都是完全无法接受的。 + +有还一件事…… + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers2_show&w=1920) + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers3_show&w=1920) + +这个问题问大家:怎么样看起来更简洁?我在写这篇文章时意识到:当有任何附加的打印机准备好时,Gnome 打印机程序会把过程做得非常简洁,它们在左边上放了一个竖直栏来列出这些打印机。而我在 KDE 中添加第二台打印机时,它突然增加出一个左边栏来。而在添加之前,我脑海中已经有了一个恐怖的画面,它会像图片文件夹显示预览图一样直接在界面里插入另外一个图标。我很高兴也很惊讶的看到我是错的。但是事实是它直接“长出”另外一个从未存在的竖直栏,彻底改变了它的界面布局,而这样也称不上“好”。终究还是一种令人困惑,奇怪而又不直观的设计。 + +打印机说得够多了……下一个接受我公开石刑的 KDE 系统设置是?多媒体,即 Phonon。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_sound_show&w=1920) + +一如既往,GNOME 在左边,KDE 在右边。让我们先看看 GNOME 的系统设置先……眼睛移动是从左到右,从上到下,对吧?来吧,就这样做。首先:音量控制滑条。滑条中的蓝色条与空条百分百清晰地消除了哪边是“音量增加”的困惑。在音量控制条后马上就是一个 On/Off 开关,用来开关静音功能。Gnome 的再次得分在于静音后能记住当前设置的音量,而在点击音量增加按钮取消静音后能回到原来设置的音量中来。Kmixer,你个健忘的垃圾,我真的希望我能多讨论你一下。 + +继续!输入输出和应用程序的标签选项?每一个应用程序的音量随时可控?Gnome,每过一秒,我爱你越深。音量均衡选项、声音配置、和清晰地标上标志的“测试麦克风”选项。 + +我不清楚它能否以一种更干净更简洁的设计实现。是的,它只是一个 Gnome 化的 Pavucontrol,但我想这就是重要的地方。Pavucontrol 在这方面几乎完全做对了,Gnome 控制中心中的“声音”应用程序的改善使它向完美更进了一步。 + +Phonon,该你上了。但开始前我想说:我 TM 看到的是什么?!我知道我看到的是音频设备的优先级列表,但是它呈现的方式有点太坑。还有,那些用户可能关心的那些东西哪去了?拥有一个优先级列表当然很好,它也应该存在,但问题是优先级列表属于那种用户乱搞一两次之后就不会再碰的东西。它还不够重要,或者说不够常用到可以直接放在正中间位置的程度。音量控制滑块呢?对每个应用程序的音量控制功能呢?那些用户使用最频繁的东西呢?好吧,它们在 Kmix 中,一个分离的程序,拥有它自己的配置选项……而不是在系统设置下……这样真的让“系统设置”这个词变得有点用词不当。 + +![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_network_show&w=1920) + +上面展示的 Gnome 的网络设置。KDE 的没有展示,原因就是我接下来要吐槽的内容了。如果你进入 KDE 的系统设置里,然后点击“网络”区域中三个选项中的任何一个,你会得到一大堆的选项:蓝牙设置、Samba 分享的默认用户名和密码(说真的,“连通性(Connectivity)”下面只有两个选项:SMB 的用户名和密码。TMD 怎么就配得上“连通性”这么大的词?),浏览器身份验证控制(只有 Konqueror 能用……一个已经倒闭的项目),代理设置,等等……我的 wifi 设置哪去了?它们没在这。哪去了?好吧,它们在网络应用程序的设置里面……而不是在网络设置里…… + +KDE,你这是要杀了我啊,你有“系统设置”当凶器,拿着它动手吧! + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=4 + +作者:Eric Griffith +译者:[XLCYun](https://github.com/XLCYun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md deleted file mode 100644 index 1c0cc4bd86..0000000000 --- a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md +++ /dev/null @@ -1,54 +0,0 @@ -将GNOME作为我的Linux桌面的一周: 他们做对的与做错的 - 第四节 - GNOME设置 -================================================================================ -### Settings设置 ### - -在这我要挑一挑几个特定KDE控制模块的毛病,大部分原因是因为相比它们的对手GNOME来说,糟糕得太可笑,实话说,真是悲哀。 - -第一个接招的?打印机。 - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers1_show&w=1920) - -GNOME在左,KDE在右。你知道左边跟右边的打印程序有什么区别吗?当我在GNOME控制中心打开“打印机”时,程序窗口弹出来了,之后没有也没发生。而当我在KDE系统设置打开“打印机”时,我收到了一条密码提示。甚至我都没能看一眼打印机呢,我就必须先交出ROOT密码。 - -让我再重复一遍。在今天,PolicyKit和Logind的日子里,对一个应该是sudo的操作,我依然被询问要求ROOT的密码。我安装系统的时候甚至都没设置root密码。所以我必须跑到Konsole去,然后运行'sudo passwd root'命令,这样我才能给root设一个密码,这样我才能回到系统设置中的打印程序,然后交出root密码,然后仅仅是看一看哪些打印机可用。完成了这些工作后,当我点击“添加打印机”时,我再次收到请求ROOT密码的提示,当我解决了它后再选择一个打印机和驱动时,我再次收到请求ROOT密码的提示。仅仅是为了添加一个打印机到系统我就收到三次密码请求。 - -而在GNOME下添加打印机,在点击打印机程序中的”解锁“之前,我没有收到任何请求SUDO密码的提示。整个过程我只被请求过一次,仅此而已。KDE,求你了……采用GNOME的”解锁“模式吧。不到一定需要的时候不要发出提示。还有,不管是哪个库,只要它允许KDE应用程序绕过PolicyKit/Logind(如果有的话)并直接请求ROOT权限……那就把它封进箱里吧。如果这是个多用户系统,那我要么必须交出ROOT密码,要么我必须时时刻刻呆着以免有一个用户需要升级、更改或添加一个新的打印机。而这两种情况都是完全无法接受的。 - -有还一件事…… - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers2_show&w=1920) - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_printers3_show&w=1920) - -给论坛的问题:怎么样看起来更简洁?我在写这篇文章时意识到:当有任何的附加打印机准备好时,Gnome打印机程序会把过程做得非常简洁,它们在左边上放了一个竖直栏来列出这些打印机。而我在KDE添加第二台打印机时,它突然增加出一个左边栏来。而在添加之前,我脑海中已经有了一个恐怖的画面它会像图片文件夹显示预览图一样,直接插入另外一个图标到界面里去。我很高兴也很惊讶的看到我是错的。但是事实是它直接”长出”另外一个从末存在的竖直栏,彻底改变了它的界面布局,而这样也称不上“好”。终究还是一种令人困惑,奇怪而又不直观的设计。 - -打印机说得够多了……下一个接受我公开石刑的KDE系统设置是?多媒体,即Phonon。 - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_sound_show&w=1920) - -一如既往,GNOME在左边,KDE在右边。让我们先看看GNOME的系统设置先……眼睛从左到右,从上到下,对吧?来吧,就这样做。首先:音量控制滑条。滑条中的蓝色条与空白条百分百清晰地消除了哪边是“音量增加”的困惑。在音量控制条后马上就是一个On/Off开关,用来开关静音功能。Gnome的再次得分在于静音后能记住当前设置的音量,而在点击音量增加按钮取消静音后能回到原来设置的音量中来。Kmixer,你个健忘的垃圾,我真的希望我能多讨论你。 - - -继续!输入输出和应用程序的标签选项?每一个应用程序的音量随时可控?Gnome,每过一秒,我爱你越深。均衡的选项设置,声音配置,和清晰地标上标志的“测试麦克风”选项。 - - - -我不清楚它能否以一种更干净更简洁的设计实现。是的,它只是一个Gnome化的Pavucontrol,但我想这就是重要的地方。Pavucontrol在这方面几乎完全做对了,Gnome控制中心中的“声音”应用程序的改善使它向完美更进了一步。 - -Phonon,该你上了。但开始前我想说:我TM看到的是什么?我知道我看到的是音频设备的权限列表,但是它呈现的方式有点太坑。还有,那些用户可能关心的那些东西哪去了?拥有一个权限列表当然很好,它也应该存在,但问题是权限列表属于那种用户乱搞一两次之后就不会再碰的东西。它还不够重要,或者说常用到可以直接放在正中间位置的程度。音量控制滑块呢?对每个应用程序的音量控制功能呢?那些用户使用最频繁的东西呢?好吧,它们在Kmix中,一个分离的程序,拥有它自己的配置选项……而不是在系统设置下……这样真的让“系统设置”这个词变得有点用词不当。 - -![](http://www.phoronix.net/image.php?id=gnome-week-editorial&image=gnome_week_network_show&w=1920) - -上面展示的Gnome的网络设置。KDE的没有展示,原因就是我接下来要吐槽的内容了。如果你进入KDE的系统设置里,然后点击“网络”区域中三个选项中的任何一个,你会得到一大堆的选项:蓝牙设置,Samba分享的默认用户名和密码(说真的,“连通性(Connectivity)”下面只有两个选项:SMB的用户名和密码。TMD怎么就配得上“连通性”这么大的词?),浏览器身份验证控制(只有Konqueror能用……一个已经倒闭的项目),代理设置,等等……我的wifi设置哪去了?它们没在这。哪去了?好吧,它们在网络应用程序的设置里面……而不是在网络设置里…… - -KDE,你这是要杀了我啊,你有“系统设置”当凶器,拿着它动手吧! - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=4 - -作者:Eric Griffith -译者:[XLCYun](https://github.com/XLCYun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From d675e982b31faa8e48135ab58931502ba44c0ce4 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 18 Aug 2015 00:55:00 +0800 Subject: [PATCH 1773/2517] Delete 20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md --- ...number of threads in a process on Linux.md | 51 ------------------- 1 file changed, 51 deletions(-) delete mode 100644 sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md diff --git a/sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md b/sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md deleted file mode 100644 index 35ee2f00de..0000000000 --- a/sources/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md +++ /dev/null @@ -1,51 +0,0 @@ -translation by strugglingyouth -Linux FAQs with Answers--How to count the number of threads in a process on Linux -================================================================================ -> **Question**: I have an application running, which forks a number of threads at run-time. I want to know how many threads are actively running in the program. What is the easiest way to check the thread count of a process on Linux? - -If you want to see the number of threads per process in Linux environments, there are several ways to do it. - -### Method One: /proc ### - -The proc pseudo filesystem, which resides in /proc directory, is the easiest way to see the thread count of any active process. The /proc directory exports in the form of readable text files a wealth of information related to existing processes and system hardware such as CPU, interrupts, memory, disk, etc. - - $ cat /proc//status - -The above command will show detailed information about the process with , which includes process state (e.g., sleeping, running), parent PID, UID, GID, the number of file descriptors used, and the number of context switches. The output also indicates **the total number of threads created in a process** as follows. - - Threads: - -For example, to check the thread count of a process with PID 20571: - - $ cat /proc/20571/status - -![](https://farm6.staticflickr.com/5649/20341236279_f4a4d809d2_b.jpg) - -The output indicates that the process has 28 threads in it. - -Alternatively, you could simply count the number of directories found in /proc//task, as shown below. - - $ ls /proc//task | wc - -This is because, for every thread created within a process, there is a corresponding directory created in /proc//task, named with its thread ID. Thus the total number of directories in /proc//task represents the number of threads in the process. - -### Method Two: ps ### - -If you are an avid user of the versatile ps command, this command can also show you individual threads of a process (with "H" option). The following command will print the thread count of a process. The "h" option is needed to hide the header in the top output. - - $ ps hH p | wc -l - -If you want to monitor the hardware resources (CPU & memory) consumed by different threads of a process, refer to [this tutorial][1].(注:此文我们翻译过) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/number-of-threads-process-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://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/view-threads-process-linux.html From 56225b0911420c15454682f279958d0ccde22755 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 18 Aug 2015 00:55:36 +0800 Subject: [PATCH 1774/2517] Create 20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md --- ...number of threads in a process on Linux.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 translated/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md diff --git a/translated/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md b/translated/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md new file mode 100644 index 0000000000..96bf143533 --- /dev/null +++ b/translated/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md @@ -0,0 +1,51 @@ + +Linux 有问必答 - 如何在 Linux 中统计一个进程的线程数 +================================================================================ +> **问题**: 我正在运行一个程序,它在运行时会派生出多个线程。我想知道程序在运行时会有多少线程。在 Linux 中检查进程的线程数最简单的方法是什么? + +如果你想看到 Linux 中每个进程的线程数,有以下几种方法可以做到这一点。 + +### 方法一: /proc ### + + proc 伪文件系统,它驻留在 /proc 目录,这是最简单的方法来查看任何活动进程的线程数。 /proc 目录以可读文本文件形式输出,提供现有进程和系统硬件相关的信息如 CPU, interrupts, memory, disk, 等等. + + $ cat /proc//status + +上面的命令将显示进程 的详细信息,包括过程状态(例如, sleeping, running),父进程 PID,UID,GID,使用的文件描述符的数量,以及上下文切换的数量。输出也包括**进程创建的总线程数**如下所示。 + + Threads: + +例如,检查 PID 20571进程的线程数: + + $ cat /proc/20571/status + +![](https://farm6.staticflickr.com/5649/20341236279_f4a4d809d2_b.jpg) + +输出表明该进程有28个线程。 + +或者,你可以在 /proc//task 中简单的统计目录的数量,如下所示。 + + $ ls /proc//task | wc + +这是因为,对于一个进程中创建的每个线程,在 /proc//task 中会创建一个相应的目录,命名为其线程 ID。由此在 /proc//task 中目录的总数表示在进程中线程的数目。 + +### 方法二: ps ### + +如果你是功能强大的 ps 命令的忠实用户,这个命令也可以告诉你一个进程(用“H”选项)的线程数。下面的命令将输出进程的线程数。“h”选项需要放在前面。 + + $ ps hH p | wc -l + +如果你想监视一个进程的不同线程消耗的硬件资源(CPU & memory),请参阅[此教程][1]。(注:此文我们翻译过) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/number-of-threads-process-linux.html + +作者:[Dan Nanni][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/view-threads-process-linux.html From 579b625083dad361059c070506a5218a8badd6c0 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Tue, 18 Aug 2015 01:19:45 +0800 Subject: [PATCH 1775/2517] translated --- ...edule a Job and Watch Commands in Linux.md | 104 +++++++++--------- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md b/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md index 28981add17..54d3996e0e 100644 --- a/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md +++ b/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md @@ -1,102 +1,103 @@ - Vic020 - -Linux Tricks: Play Game in Chrome, Text-to-Speech, Schedule a Job and Watch Commands in Linux +Linux小技巧:Chrome小游戏,文字说话,计划作业,重复执行命令 ================================================================================ -Here again, I have compiled a list of four things under [Linux Tips and Tricks][1] series you may do to remain more productive and entertained with Linux Environment. -![Linux Tips and Tricks Series](http://www.tecmint.com/wp-content/uploads/2015/08/Linux-Tips-and-Tricks.png) +重要的事情说两遍,我完成了一个[Linux提示与彩蛋][1]系列,让你的Linux获得更多创造和娱乐。 -Linux Tips and Tricks Series +![Linux提示与彩蛋系列](http://www.tecmint.com/wp-content/uploads/2015/08/Linux-Tips-and-Tricks.png) -The topics I have covered includes Google-chrome inbuilt small game, Text-to-speech in Linux Terminal, Quick job scheduling using ‘at‘ command and watch a command at regular interval. +Linux提示与彩蛋系列 -### 1. Play A Game in Google Chrome Browser ### +本文,我将会讲解Google-chrome内建小游戏,在终端中如何让文字说话,使用‘at’命令设置作业和使用watch命令重复执行命令。 -Very often when there is a power shedding or no network due to some other reason, I don’t put my Linux box into maintenance mode. I keep myself engage in a little fun game by Google Chrome. I am not a gamer and hence I have not installed third-party creepy games. Security is another concern. +### 1. Google Chrome 浏览器小游戏彩蛋 ### -So when there is Internet related issue and my web page seems something like this: +网线脱掉或者其他什么原因连不上网时,Google Chrome就会出现一个小游戏。声明,我并不是游戏玩家,因此我的电脑上并没有安装任何第三方的恶意游戏。安全是第一位。 -![Unable to Connect Internet](http://www.tecmint.com/wp-content/uploads/2015/08/Unable-to-Connect-Internet.png) +所以当Internet发生出错,会出现一个这样的界面: -Unable to Connect Internet +![不能连接到互联网](http://www.tecmint.com/wp-content/uploads/2015/08/Unable-to-Connect-Internet.png) -You may play the Google-chrome inbuilt game simply by hitting the space-bar. There is no limitation for the number of times you can play. The best thing is you need not break a sweat installing and using it. +不能连接到互联网 -No third-party application/plugin required. It should work well on other platforms like Windows and Mac but our niche is Linux and I’ll talk about Linux only and mind it, it works well on Linux. It is a very simple game (a kind of time pass). +按下空格键来激活Google-chrome彩蛋游戏。游戏没有时间限制。并且还不需要浪费时间安装使用。 -Use Space-Bar/Navigation-up-key to jump. A glimpse of the game in action. +不需要第三方软件的支持。同样支持Windows和Mac平台,但是我的平台是Linux,我也只谈论Linux。当然在Linux,这个游戏运行很好。游戏简单,但也很花费时间。 -![Play Game in Google Chrome](http://www.tecmint.com/wp-content/uploads/2015/08/Play-Game-in-Google-Chrome.gif) +使用空格/向上方向键来跳跃。请看下列截图: -Play Game in Google Chrome +![Google Chrome中玩游戏](http://www.tecmint.com/wp-content/uploads/2015/08/Play-Game-in-Google-Chrome.gif) -### 2. Text to Speech in Linux Terminal ### +Google Chrome中玩游戏 -For those who may not be aware of espeak utility, It is a Linux command-line text to speech converter. Write anything in a variety of languages and espeak utility will read it loud for you. +### 2. Linux 终端中朗读文字 ### -Espeak should be installed in your system by default, however it is not installed for your system, you may do: +对于那些不能文字朗读的设备,有个小工具可以实现文字说话的转换器。 +espeak支持多种语言,可以及时朗读输入文字。 + +系统应该默认安装了Espeak,如果你的系统没有安装,你可以使用下列命令来安装: # apt-get install espeak (Debian) # yum install espeak (CentOS) # dnf install espeak (Fedora 22 onwards) You may ask espeak to accept Input Interactively from standard Input device and convert it to speech for you. You may do: +你可以设置接受从标准输入的交互地输入并及时转换成语音朗读出来。这样设置: - $ espeak [Hit Return Key] + $ espeak [按回车键] -For detailed output you may do: +更详细的输出你可以这样做: - $ espeak --stdout | aplay [Hit Return Key][Double - Here] + $ espeak --stdout | aplay [按回车键][这里需要双击] -espeak is flexible and you can ask espeak to accept input from a text file and speak it loud for you. All you need to do is: +espeak设置灵活,也可以朗读文本文件。你可以这样设置: $ espeak --stdout /path/to/text/file/file_name.txt | aplay [Hit Enter] -You may ask espeak to speak fast/slow for you. The default speed is 160 words per minute. Define your preference using switch ‘-s’. +espeak可以设置朗读速度。默认速度是160词每分钟。使用-s参数来设置。 -To ask espeak to speak 30 words per minute, you may do: +设置30词每分钟: $ espeak -s 30 -f /path/to/text/file/file_name.txt | aplay -To ask espeak to speak 200 words per minute, you may do: +设置200词每分钟: $ espeak -s 200 -f /path/to/text/file/file_name.txt | aplay -To use another language say Hindi (my mother tongue), you may do: +让其他语言说北印度语(作者母语),这样设置: $ espeak -v hindi --stdout 'टेकमिंट विश्व की एक बेहतरीन लाइंक्स आधारित वेबसाइट है|' | aplay -You may choose any language of your preference and ask to speak in your preferred language as suggested above. To get the list of all the languages supported by espeak, you need to run: +espeak支持多种语言,支持自定义设置。使用下列命令来获得语言表: $ espeak --voices -### 3. Quick Schedule a Job ### +### 3. 快速计划作业 ### -Most of us are already familiar with [cron][2] which is a daemon to execute scheduled commands. +我们已经非常熟悉使用[cron][2]后台执行一个计划命令。 -Cron is an advanced command often used by Linux SYSAdmins to schedule a job such as Backup or practically anything at certain time/interval. +Cron是一个Linux系统管理的高级命令,用于计划定时任务如备份或者指定时间或间隔的任何事情。 -Are you aware of ‘at’ command in Linux which lets you schedule a job/command to run at specific time? You can tell ‘at’ what to do and when to do and everything else will be taken care by command ‘at’. +但是,你是否知道at命令可以让你计划一个作业或者命令在指定时间?at命令可以指定时间和指定内容执行作业。 -For an example, say you want to print the output of uptime command at 11:02 AM, All you need to do is: +例如,你打算在早上11点2分执行uptime命令,你只需要这样做: $ at 11:02 uptime >> /home/$USER/uptime.txt Ctrl+D -![Schedule Job in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Schedule-Job-in-Linux.png) +![Linux中计划作业](http://www.tecmint.com/wp-content/uploads/2015/08/Schedule-Job-in-Linux.png) -Schedule Job in Linux +Linux中计划作业 -To check if the command/script/job has been set or not by ‘at’ command, you may do: +检查at命令是否成功设置,使用: $ at -l -![View Scheduled Jobs](http://www.tecmint.com/wp-content/uploads/2015/08/View-Scheduled-Jobs.png) +![浏览计划作业](http://www.tecmint.com/wp-content/uploads/2015/08/View-Scheduled-Jobs.png) -View Scheduled Jobs +浏览计划作业 -You may schedule more than one command in one go using at, simply as: +at支持计划多个命令,例如: $ at 12:30 Command – 1 @@ -106,36 +107,37 @@ You may schedule more than one command in one go using at, simply as: … Ctrl + D -### 4. Watch a Command at Specific Interval ### +### 4. 特定时间重复执行命令 ### -We need to run some command for specified amount of time at regular interval. Just for example say we need to print the current time and watch the output every 3 seconds. +有时,我们可以需要在指定时间间隔执行特定命令。例如,每3秒,想打印一次时间。 -To see current time we need to run the below command in terminal. +查看现在时间,使用下列命令。 $ date +"%H:%M:%S -![Check Date and Time in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Date-in-Linux.png) +![Linux中查看日期和时间](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Date-in-Linux.png) -Check Date and Time in Linux +Linux中查看日期和时间 -and to check the output of this command every three seconds, we need to run the below command in Terminal. +为了查看这个命令每三秒的输出,我需要运行下列命令: $ watch -n 3 'date +"%H:%M:%S"' -![Watch Command in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Watch-Command-in-Linux.gif) +![Linux中watch命令](http://www.tecmint.com/wp-content/uploads/2015/08/Watch-Command-in-Linux.gif) -Watch Command in Linux +Linux中watch命令 -The switch ‘-n’ in watch command is for Interval. In the above example we defined Interval to be 3 sec. You may define yours as required. Also you may pass any command/script with watch command to watch that command/script at the defined interval. +watch命令的‘-n’开关设定时间间隔。在上诉命令中,我们定义了时间间隔为3秒。你可以按你的需求定义。同样watch +也支持其他命令或者脚本。 -That’s all for now. Hope you are like this series that aims at making you more productive with Linux and that too with fun inside. All the suggestions are welcome in the comments below. Stay tuned for more such posts. Keep connected and Enjoy… +至此。希望你喜欢这个系列的文章,让你的linux更有创造性,获得更多快乐。所有的建议欢迎评论。欢迎你也看看其他文章,谢谢。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/text-to-speech-in-terminal-schedule-a-job-and-watch-commands-in-linux/ 作者:[Avishek Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[VicYu/Vic020](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 5a1be0ab80258ceb49b2240bd72a83f89d8438b4 Mon Sep 17 00:00:00 2001 From: Vic___ Date: Tue, 18 Aug 2015 01:20:29 +0800 Subject: [PATCH 1776/2517] moved --- ...e Text-to-Speech Schedule a Job and Watch Commands in Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md (100%) diff --git a/sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md b/translated/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md similarity index 100% rename from sources/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md rename to translated/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md From 46cf1d082cb263bb04cf0919c2d3bd1800e54199 Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 18 Aug 2015 10:14:10 +0800 Subject: [PATCH 1777/2517] Update 20150728 Process of the Linux kernel building.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 编译到400行 --- ...28 Process of the Linux kernel building.md | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index e139143ccc..f4510d81b2 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -309,7 +309,7 @@ Don't worry that we have missed many lines in Makefile that are placed after `ex The `all:` target is the default when no target is given on the command line. You can see here that we include architecture specific makefile there (in our case it will be [arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)). From this moment we will continue from this makefile. As we can see `all` target depends on the `vmlinux` target that defined a little lower in the top makefile: -目标`all:` 是在命令行里不指定目标时默认生成的目标。你可以看到这里我们包含了架构相关的makefile(默认情况下会是[arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile))。从这一时刻起,我们会从这个makefile 继续进行下去。如我们所见,目标`all` 依赖于根makefile 后面一点的生命`vmlinux`: +目标`all:` 是在命令行里不指定目标时默认生成的目标。你可以看到这里我们包含了架构相关的makefile(默认情况下会是[arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile))。从这一时刻起,我们会从这个makefile 继续进行下去。如我们所见,目标`all` 依赖于根makefile 后面声明的`vmlinux`: ```Makefile vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE @@ -317,12 +317,17 @@ vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE The `vmlinux` is is the Linux kernel in an statically linked executable file format. The [scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) script links combines different compiled subsystems into vmlinux. The second target is the `vmlinux-deps` that defined as: +`vmlinux` 是linux 内核的静态链接可执行文件格式。脚本[scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) 把不同的编译好的子模块链接到一起形成了vmlinux。第二个目标是`vmlinux-deps`,它的定义如下: + + ```Makefile vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) ``` and consists from the set of the `built-in.o` from the each top directory of the Linux kernel. Later, when we will go through all directories in the Linux kernel, the `Kbuild` will compile all the `$(obj-y)` files. It then calls `$(LD) -r` to merge these files into one `built-in.o` file. For this moment we have no `vmlinux-deps`, so the `vmlinux` target will not be executed now. For me `vmlinux-deps` contains following files: +它是由内核代码下的每个顶级目录的`built-in.o` 组成的。之后我们还会检查内核所有的目录,`kbuild` 会编译各个目录下所有的对应`$obj-y` 的源文件。接着调用`$(LD) -r` 把这些文件合并到一个`build-in.o` 文件里。此时我们还没有`vmloinux-deps`, 所以目标`vmlinux` 现在还不会被构建。对我而言`vmlinux-deps` 包含下面的文件 + ``` arch/x86/kernel/vmlinux.lds arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/head.o @@ -341,6 +346,8 @@ net/built-in.o The next target that can be executed is following: +下一个可以被执行的目标如下: + ```Makefile $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; $(vmlinux-dirs): prepare scripts @@ -349,6 +356,8 @@ $(vmlinux-dirs): prepare scripts As we can see the `vmlinux-dirs` depends on the two targets: `prepare` and `scripts`. The first `prepare` defined in the top `Makefile` of the Linux kernel and executes three stages of preparations: +就像我们看到的,`vmlinux-dir` 依赖于两部分:`prepare` 和`scripts`。第一个`prepare` 定义在内核的根`makefile` ,准备工作分成三个阶段: + ```Makefile prepare: prepare0 prepare0: archprepare FORCE @@ -361,7 +370,9 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \ prepare2: prepare3 outputmakefile asm-generic ``` -The first `prepare0` expands to the `archprepare` that exapnds to the `archheaders` and `archscripts` that defined in the `x86_64` specific [Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile). Let's look on it. The `x86_64` specific makefile starts from the definition of the variables that are related to the archicteture-specific configs ([defconfig](https://github.com/torvalds/linux/tree/master/arch/x86/configs) and etc.). After this it defines flags for the compiling of the [16-bit](https://en.wikipedia.org/wiki/Real_mode) code, calculating of the `BITS` variable that can be `32` for `i386` or `64` for the `x86_64` flags for the assembly source code, flags for the linker and many many more (all definitions you can find in the [arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)). The first target is `archheaders` in the makefile generates syscall table: +The first `prepare0` expands to the `archprepare` that exapnds to the `archheaders` and `archscripts` that defined in the `x86_64` specific [Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile). Let's look on it. The `x86_64` specific makefile starts from the definition of the variables that are related to the archicteture-specific configs ([defconfig](https://github.com/torvalds/linux/tree/master/arch/x86/configs) and etc.). After this it defines flags for the compiling of the [16-bit](https://en.wikipedia.org/wiki/Real_mode) code,calculating of the `BITS` variable that can be `32` for `i386` or `64` for the `x86_64` flags for the assembly source code, flags for the linker and many many more (all definitions you can find in the [arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)). The first target is `archheaders` in the makefile generates syscall table: + +第一个`prepare0` 展开到`archprepare` ,后者又展开到`archheader` 和`archscripts`,这两个变量定义在`x86_64` 相关的[Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)。让我们看看这个文件。`x86_64` 特定的makefile从变量定义开始,这些变量都是和特定架构的配置文件 ([defconfig](https://github.com/torvalds/linux/tree/master/arch/x86/configs),等等)有关联。变量定义之后,这个makefile 定义了编译[16-bit](https://en.wikipedia.org/wiki/Real_mode)代码的编译选项,根据变量`BITS` 的值,如果是`32` 汇编代码、链接器、以及其它很多东西(全部的定义都可以在[arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)找到)对应的参数就是`i386`,而`64`就对应的是`x86_84`。生成的系统调用列表(syscall table)的makefile 里第一个目标就是`archheaders` : ```Makefile archheaders: @@ -370,6 +381,8 @@ archheaders: And the second target is `archscripts` in this makefile is: +这个makefile 里第二个目标就是`archscripts`: + ```Makefile archscripts: scripts_basic $(Q)$(MAKE) $(build)=arch/x86/tools relocs @@ -377,6 +390,8 @@ archscripts: scripts_basic We can see that it depends on the `scripts_basic` target from the top [Makefile](https://github.com/torvalds/linux/blob/master/Makefile). At the first we can see the `scripts_basic` target that executes make for the [scripts/basic](https://github.com/torvalds/linux/blob/master/scripts/basic/Makefile) makefile: + 我们可以看到`archscripts` 是依赖于根[Makefile](https://github.com/torvalds/linux/blob/master/Makefile)里的`scripts_basic` 。首先我们可以看出`scripts_basic` 是根据[scripts/basic](https://github.com/torvalds/linux/blob/master/scripts/basic/Makefile) 的mekefile 执行的: + ```Maklefile scripts_basic: $(Q)$(MAKE) $(build)=scripts/basic @@ -384,6 +399,8 @@ scripts_basic: The `scripts/basic/Makefile` contains targets for compilation of the two host programs: `fixdep` and `bin2`: +`scripts/basic/Makefile`包含了编译两个主机程序`fixdep` 和`bin2` 的目标: + ```Makefile hostprogs-y := fixdep hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c From dc7c041b3ce8958672f07089b74b1c8b34918f42 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 18 Aug 2015 10:55:26 +0800 Subject: [PATCH 1778/2517] =?UTF-8?q?20150818-1=20=E9=80=89=E9=A2=98=20LFC?= =?UTF-8?q?S=20=E4=B8=93=E9=A2=98=206-10=20=E5=85=B1=E5=8D=81=E7=AF=87=20?= =?UTF-8?q?=E5=AE=8C=E7=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng and Linux Filesystem Troubleshooting.md | 315 +++++++++++++++ ...es – Creating & Managing System Backups.md | 276 +++++++++++++ ...d Services SysVinit Systemd and Upstart.md | 367 ++++++++++++++++++ ...es and Enabling sudo Access on Accounts.md | 330 ++++++++++++++++ ...th Yum RPM Apt Dpkg Aptitude and Zypper.md | 229 +++++++++++ 5 files changed, 1517 insertions(+) create mode 100644 sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md create mode 100644 sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md create mode 100644 sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md create mode 100644 sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md create mode 100644 sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md diff --git a/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md b/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md new file mode 100644 index 0000000000..45029ac20e --- /dev/null +++ b/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md @@ -0,0 +1,315 @@ +Part 10 - LFCS: Understanding & Learning Basic Shell Scripting and Linux Filesystem Troubleshooting +================================================================================ +The Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a brand new initiative whose purpose is to allow individuals everywhere (and anywhere) to get certified in basic to intermediate operational support for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus smart decision-making when it comes to raising issues to upper support teams. + +![Basic Shell Scripting and Filesystem Troubleshooting](http://www.tecmint.com/wp-content/uploads/2014/11/lfcs-Part-10.png) + +Linux Foundation Certified Sysadmin – Part 10 + +Check out the following video that guides you an introduction to the Linux Foundation Certification Program. + +注:youtube 视频 + + + +This is the last article (Part 10) of the present 10-tutorial long series. In this article we will focus on basic shell scripting and troubleshooting Linux file systems. Both topics are required for the LFCS certification exam. + +### Understanding Terminals and Shells ### + +Let’s clarify a few concepts first. + +- A shell is a program that takes commands and gives them to the operating system to be executed. +- A terminal is a program that allows us as end users to interact with the shell. One example of a terminal is GNOME terminal, as shown in the below image. + +![Gnome Terminal](http://www.tecmint.com/wp-content/uploads/2014/11/Gnome-Terminal.png) + +Gnome Terminal + +When we first start a shell, it presents a command prompt (also known as the command line), which tells us that the shell is ready to start accepting commands from its standard input device, which is usually the keyboard. + +You may want to refer to another article in this series ([Use Command to Create, Edit, and Manipulate files – Part 1][1]) to review some useful commands. + +Linux provides a range of options for shells, the following being the most common: + +**bash Shell** + +Bash stands for Bourne Again SHell and is the GNU Project’s default shell. It incorporates useful features from the Korn shell (ksh) and C shell (csh), offering several improvements at the same time. This is the default shell used by the distributions covered in the LFCS certification, and it is the shell that we will use in this tutorial. + +**sh Shell** + +The Bourne SHell is the oldest shell and therefore has been the default shell of many UNIX-like operating systems for many years. +ksh Shell + +The Korn SHell is a Unix shell which was developed by David Korn at Bell Labs in the early 1980s. It is backward-compatible with the Bourne shell and includes many features of the C shell. + +A shell script is nothing more and nothing less than a text file turned into an executable program that combines commands that are executed by the shell one after another. + +### Basic Shell Scripting ### + +As mentioned earlier, a shell script is born as a plain text file. Thus, can be created and edited using our preferred text editor. You may want to consider using vi/m (refer to [Usage of vi Editor – Part 2][2] of this series), which features syntax highlighting for your convenience. + +Type the following command to create a file named myscript.sh and press Enter. + + # vim myscript.sh + +The very first line of a shell script must be as follows (also known as a shebang). + + #!/bin/bash + +It “tells” the operating system the name of the interpreter that should be used to run the text that follows. + +Now it’s time to add our commands. We can clarify the purpose of each command, or the entire script, by adding comments as well. Note that the shell ignores those lines beginning with a pound sign # (explanatory comments). + + #!/bin/bash + echo This is Part 10 of the 10-article series about the LFCS certification + echo Today is $(date +%Y-%m-%d) + +Once the script has been written and saved, we need to make it executable. + + # chmod 755 myscript.sh + +Before running our script, we need to say a few words about the $PATH environment variable. If we run, + + echo $PATH + +from the command line, we will see the contents of $PATH: a colon-separated list of directories that are searched when we enter the name of a executable program. It is called an environment variable because it is part of the shell environment – a set of information that becomes available for the shell and its child processes when the shell is first started. + +When we type a command and press Enter, the shell searches in all the directories listed in the $PATH variable and executes the first instance that is found. Let’s see an example, + +![Linux Environment Variables](http://www.tecmint.com/wp-content/uploads/2014/11/Environment-Variable.png) + +Environment Variables + +If there are two executable files with the same name, one in /usr/local/bin and another in /usr/bin, the one in the first directory will be executed first, whereas the other will be disregarded. + +If we haven’t saved our script inside one of the directories listed in the $PATH variable, we need to append ./ to the file name in order to execute it. Otherwise, we can run it just as we would do with a regular command. + + # pwd + # ./myscript.sh + # cp myscript.sh ../bin + # cd ../bin + # pwd + # myscript.sh + +![Execute Script in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Execute-Script.png) + +Execute Script + +#### Conditionals #### + +Whenever you need to specify different courses of action to be taken in a shell script, as result of the success or failure of a command, you will use the if construct to define such conditions. Its basic syntax is: + + if CONDITION; then + COMMANDS; + else + OTHER-COMMANDS + fi + +Where CONDITION can be one of the following (only the most frequent conditions are cited here) and evaluates to true when: + +- [ -a file ] → file exists. +- [ -d file ] → file exists and is a directory. +- [ -f file ] →file exists and is a regular file. +- [ -u file ] →file exists and its SUID (set user ID) bit is set. +- [ -g file ] →file exists and its SGID bit is set. +- [ -k file ] →file exists and its sticky bit is set. +- [ -r file ] →file exists and is readable. +- [ -s file ]→ file exists and is not empty. +- [ -w file ]→file exists and is writable. +- [ -x file ] is true if file exists and is executable. +- [ string1 = string2 ] → the strings are equal. +- [ string1 != string2 ] →the strings are not equal. + +[ int1 op int2 ] should be part of the preceding list, while the items that follow (for example, -eq –> is true if int1 is equal to int2.) should be a “children” list of [ int1 op int2 ] where op is one of the following comparison operators. + +- -eq –> is true if int1 is equal to int2. +- -ne –> true if int1 is not equal to int2. +- -lt –> true if int1 is less than int2. +- -le –> true if int1 is less than or equal to int2. +- -gt –> true if int1 is greater than int2. +- -ge –> true if int1 is greater than or equal to int2. + +#### For Loops #### + +This loop allows to execute one or more commands for each value in a list of values. Its basic syntax is: + + for item in SEQUENCE; do + COMMANDS; + done + +Where item is a generic variable that represents each value in SEQUENCE during each iteration. + +#### While Loops #### + +This loop allows to execute a series of repetitive commands as long as the control command executes with an exit status equal to zero (successfully). Its basic syntax is: + + while EVALUATION_COMMAND; do + EXECUTE_COMMANDS; + done + +Where EVALUATION_COMMAND can be any command(s) that can exit with a success (0) or failure (other than 0) status, and EXECUTE_COMMANDS can be any program, script or shell construct, including other nested loops. + +#### Putting It All Together #### + +We will demonstrate the use of the if construct and the for loop with the following example. + +**Determining if a service is running in a systemd-based distro** + +Let’s create a file with a list of services that we want to monitor at a glance. + + # cat myservices.txt + + sshd + mariadb + httpd + crond + firewalld + +![Script to Monitor Linux Services](http://www.tecmint.com/wp-content/uploads/2014/11/Monitor-Services.png) + +Script to Monitor Linux Services + +Our shell script should look like. + + #!/bin/bash + + # This script iterates over a list of services and + # is used to determine whether they are running or not. + + for service in $(cat myservices.txt); do + systemctl status $service | grep --quiet "running" + if [ $? -eq 0 ]; then + echo $service "is [ACTIVE]" + else + echo $service "is [INACTIVE or NOT INSTALLED]" + fi + done + +![Linux Service Monitoring Script](http://www.tecmint.com/wp-content/uploads/2014/11/Monitor-Script.png) + +Linux Service Monitoring Script + +**Let’s explain how the script works.** + +1). The for loop reads the myservices.txt file one element of LIST at a time. That single element is denoted by the generic variable named service. The LIST is populated with the output of, + + # cat myservices.txt + +2). The above command is enclosed in parentheses and preceded by a dollar sign to indicate that it should be evaluated to populate the LIST that we will iterate over. + +3). For each element of LIST (meaning every instance of the service variable), the following command will be executed. + + # systemctl status $service | grep --quiet "running" + +This time we need to precede our generic variable (which represents each element in LIST) with a dollar sign to indicate it’s a variable and thus its value in each iteration should be used. The output is then piped to grep. + +The –quiet flag is used to prevent grep from displaying to the screen the lines where the word running appears. When that happens, the above command returns an exit status of 0 (represented by $? in the if construct), thus verifying that the service is running. + +An exit status different than 0 (meaning the word running was not found in the output of systemctl status $service) indicates that the service is not running. + +![Services Monitoring Script](http://www.tecmint.com/wp-content/uploads/2014/11/Services-Monitoring-Script.png) + +Services Monitoring Script + +We could go one step further and check for the existence of myservices.txt before even attempting to enter the for loop. + + #!/bin/bash + + # This script iterates over a list of services and + # is used to determine whether they are running or not. + + if [ -f myservices.txt ]; then + for service in $(cat myservices.txt); do + systemctl status $service | grep --quiet "running" + if [ $? -eq 0 ]; then + echo $service "is [ACTIVE]" + else + echo $service "is [INACTIVE or NOT INSTALLED]" + fi + done + else + echo "myservices.txt is missing" + fi + +**Pinging a series of network or internet hosts for reply statistics** + +You may want to maintain a list of hosts in a text file and use a script to determine every now and then whether they’re pingable or not (feel free to replace the contents of myhosts and try for yourself). + +The read shell built-in command tells the while loop to read myhosts line by line and assigns the content of each line to variable host, which is then passed to the ping command. + + #!/bin/bash + + # This script is used to demonstrate the use of a while loop + + while read host; do + ping -c 2 $host + done < myhosts + +![Script to Ping Servers](http://www.tecmint.com/wp-content/uploads/2014/11/Script-to-Ping-Servers.png) + +Script to Ping Servers + +Read Also: + +- [Learn Shell Scripting: A Guide from Newbies to System Administrator][3] +- [5 Shell Scripts to Learn Shell Programming][4] + +### Filesystem Troubleshooting ### + +Although Linux is a very stable operating system, if it crashes for some reason (for example, due to a power outage), one (or more) of your file systems will not be unmounted properly and thus will be automatically checked for errors when Linux is restarted. + +In addition, each time the system boots during a normal boot, it always checks the integrity of the filesystems before mounting them. In both cases this is performed using a tool named fsck (“file system check”). + +fsck will not only check the integrity of file systems, but also attempt to repair corrupt file systems if instructed to do so. Depending on the severity of damage, fsck may succeed or not; when it does, recovered portions of files are placed in the lost+found directory, located in the root of each file system. + +Last but not least, we must note that inconsistencies may also happen if we try to remove an USB drive when the operating system is still writing to it, and may even result in hardware damage. + +The basic syntax of fsck is as follows: + + # fsck [options] filesystem + +**Checking a filesystem for errors and attempting to repair automatically** + +In order to check a filesystem with fsck, we must first unmount it. + + # mount | grep sdg1 + # umount /mnt + # fsck -y /dev/sdg1 + +![Scan Linux Filesystem for Errors](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Filesystem-Errors.png) + +Check Filesystem Errors + +Besides the -y flag, we can use the -a option to automatically repair the file systems without asking any questions, and force the check even when the filesystem looks clean. + + # fsck -af /dev/sdg1 + +If we’re only interested in finding out what’s wrong (without trying to fix anything for the time being) we can run fsck with the -n option, which will output the filesystem issues to standard output. + + # fsck -n /dev/sdg1 + +Depending on the error messages in the output of fsck, we will know whether we can try to solve the issue ourselves or escalate it to engineering teams to perform further checks on the hardware. + +### Summary ### + +We have arrived at the end of this 10-article series where have tried to cover the basic domain competencies required to pass the LFCS exam. + +For obvious reasons, it is not possible to cover every single aspect of these topics in any single tutorial, and that’s why we hope that these articles have put you on the right track to try new stuff yourself and continue learning. + +If you have any questions or comments, they are always welcome – so don’t hesitate to drop us a line via the form below! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-basic-shell-scripting-and-linux-filesystem-troubleshooting/ + +作者:[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/sed-command-to-create-edit-and-manipulate-files-in-linux/ +[2]:http://www.tecmint.com/vi-editor-usage/ +[3]:http://www.tecmint.com/learning-shell-scripting-language-a-guide-from-newbies-to-system-administrator/ +[4]:http://www.tecmint.com/basic-shell-programming-part-ii/ \ No newline at end of file diff --git a/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md b/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md new file mode 100644 index 0000000000..bdabfb1f9d --- /dev/null +++ b/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md @@ -0,0 +1,276 @@ +Part 6 - LFCS: Assembling Partitions as RAID Devices – Creating & Managing System Backups +================================================================================ +Recently, the Linux Foundation launched the LFCS (Linux Foundation Certified Sysadmin) certification, a shiny chance for system administrators everywhere to demonstrate, through a performance-based exam, that they are capable of performing overall operational support on Linux systems: system support, first-level diagnosing and monitoring, plus issue escalation, when required, to other support teams. + +![Linux Foundation Certified Sysadmin – Part 6](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-6.png) + +Linux Foundation Certified Sysadmin – Part 6 + +The following video provides an introduction to The Linux Foundation Certification Program. + +注:youtube 视频 + + +This post is Part 6 of a 10-tutorial series, here in this part, we will explain How to Assemble Partitions as RAID Devices – Creating & Managing System Backups, that are required for the LFCS certification exam. + +### Understanding RAID ### + +The technology known as Redundant Array of Independent Disks (RAID) is a storage solution that combines multiple hard disks into a single logical unit to provide redundancy of data and/or improve performance in read / write operations to disk. + +However, the actual fault-tolerance and disk I/O performance lean on how the hard disks are set up to form the disk array. Depending on the available devices and the fault tolerance / performance needs, different RAID levels are defined. You can refer to the RAID series here in Tecmint.com for a more detailed explanation on each RAID level. + +- RAID Guide: [What is RAID, Concepts of RAID and RAID Levels Explained][1] + +Our tool of choice for creating, assembling, managing, and monitoring our software RAIDs is called mdadm (short for multiple disks admin). + + ---------------- Debian and Derivatives ---------------- + # aptitude update && aptitude install mdadm + +---------- + + ---------------- Red Hat and CentOS based Systems ---------------- + # yum update && yum install mdadm + +---------- + + ---------------- On openSUSE ---------------- + # zypper refresh && zypper install mdadm # + +#### Assembling Partitions as RAID Devices #### + +The process of assembling existing partitions as RAID devices consists of the following steps. + +**1. Create the array using mdadm** + +If one of the partitions has been formatted previously, or has been a part of another RAID array previously, you will be prompted to confirm the creation of the new array. Assuming you have taken the necessary precautions to avoid losing important data that may have resided in them, you can safely type y and press Enter. + + # mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1 + +![Creating RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Creating-RAID-Array.png) + +Creating RAID Array + +**2. Check the array creation status** + +After creating RAID array, you an check the status of the array using the following commands. + + # cat /proc/mdstat + or + # mdadm --detail /dev/md0 [More detailed summary] + +![Check RAID Array Status](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Array-Status.png) + +Check RAID Array Status + +**3. Format the RAID Device** + +Format the device with a filesystem as per your needs / requirements, as explained in [Part 4][2] of this series. + +**4. Monitor RAID Array Service** + +Instruct the monitoring service to “keep an eye” on the array. Add the output of mdadm –detail –scan to /etc/mdadm/mdadm.conf (Debian and derivatives) or /etc/mdadm.conf (CentOS / openSUSE), like so. + + # mdadm --detail --scan + +![Monitor RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Monitor-RAID-Array.png) + +Monitor RAID Array + + # mdadm --assemble --scan [Assemble the array] + +To ensure the service starts on system boot, run the following commands as root. + +**Debian and Derivatives** + +Debian and derivatives, though it should start running on boot by default. + + # update-rc.d mdadm defaults + +Edit the /etc/default/mdadm file and add the following line. + + AUTOSTART=true + +**On CentOS and openSUSE (systemd-based)** + + # systemctl start mdmonitor + # systemctl enable mdmonitor + +**On CentOS and openSUSE (SysVinit-based)** + + # service mdmonitor start + # chkconfig mdmonitor on + +**5. Check RAID Disk Failure** + +In RAID levels that support redundancy, replace failed drives when needed. When a device in the disk array becomes faulty, a rebuild automatically starts only if there was a spare device added when we first created the array. + +![Check RAID Faulty Disk](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Faulty-Disk.png) + +Check RAID Faulty Disk + +Otherwise, we need to manually attach an extra physical drive to our system and run. + + # mdadm /dev/md0 --add /dev/sdX1 + +Where /dev/md0 is the array that experienced the issue and /dev/sdX1 is the new device. + +**6. Disassemble a working array** + +You may have to do this if you need to create a new array using the devices – (Optional Step). + + # mdadm --stop /dev/md0 # Stop the array + # mdadm --remove /dev/md0 # Remove the RAID device + # mdadm --zero-superblock /dev/sdX1 # Overwrite the existing md superblock with zeroes + +**7. Set up mail alerts** + +You can configure a valid email address or system account to send alerts to (make sure you have this line in mdadm.conf). – (Optional Step) + + MAILADDR root + +In this case, all alerts that the RAID monitoring daemon collects will be sent to the local root account’s mail box. One of such alerts looks like the following. + +**Note**: This event is related to the example in STEP 5, where a device was marked as faulty and the spare device was automatically built into the array by mdadm. Thus, we “ran out” of healthy spare devices and we got the alert. + +![RAID Monitoring Alerts](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Monitoring-Alerts.png) + +RAID Monitoring Alerts + +#### Understanding RAID Levels #### + +**RAID 0** + +The total array size is n times the size of the smallest partition, where n is the number of independent disks in the array (you will need at least two drives). Run the following command to assemble a RAID 0 array using partitions /dev/sdb1 and /dev/sdc1. + + # mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb1 /dev/sdc1 + +Common uses: Setups that support real-time applications where performance is more important than fault-tolerance. + +**RAID 1 (aka Mirroring)** + +The total array size equals the size of the smallest partition (you will need at least two drives). Run the following command to assemble a RAID 1 array using partitions /dev/sdb1 and /dev/sdc1. + + # mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1 + +Common uses: Installation of the operating system or important subdirectories, such as /home. + +**RAID 5 (aka drives with Parity)** + +The total array size will be (n – 1) times the size of the smallest partition. The “lost” space in (n-1) is used for parity (redundancy) calculation (you will need at least three drives). + +Note that you can specify a spare device (/dev/sde1 in this case) to replace a faulty part when an issue occurs. Run the following command to assemble a RAID 5 array using partitions /dev/sdb1, /dev/sdc1, /dev/sdd1, and /dev/sde1 as spare. + + # mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --spare-devices=1 /dev/sde1 + +Common uses: Web and file servers. + +**RAID 6 (aka drives with double Parity** + +The total array size will be (n*s)-2*s, where n is the number of independent disks in the array and s is the size of the smallest disk. Note that you can specify a spare device (/dev/sdf1 in this case) to replace a faulty part when an issue occurs. + +Run the following command to assemble a RAID 6 array using partitions /dev/sdb1, /dev/sdc1, /dev/sdd1, /dev/sde1, and /dev/sdf1 as spare. + + # mdadm --create --verbose /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde --spare-devices=1 /dev/sdf1 + +Common uses: File and backup servers with large capacity and high availability requirements. + +**RAID 1+0 (aka stripe of mirrors)** + +The total array size is computed based on the formulas for RAID 0 and RAID 1, since RAID 1+0 is a combination of both. First, calculate the size of each mirror and then the size of the stripe. + +Note that you can specify a spare device (/dev/sdf1 in this case) to replace a faulty part when an issue occurs. Run the following command to assemble a RAID 1+0 array using partitions /dev/sdb1, /dev/sdc1, /dev/sdd1, /dev/sde1, and /dev/sdf1 as spare. + + # mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 --spare-devices=1 /dev/sdf1 + +Common uses: Database and application servers that require fast I/O operations. + +#### Creating and Managing System Backups #### + +It never hurts to remember that RAID with all its bounties IS NOT A REPLACEMENT FOR BACKUPS! Write it 1000 times on the chalkboard if you need to, but make sure you keep that idea in mind at all times. Before we begin, we must note that there is no one-size-fits-all solution for system backups, but here are some things that you do need to take into account while planning a backup strategy. + +- What do you use your system for? (Desktop or server? If the latter case applies, what are the most critical services – whose configuration would be a real pain to lose?) +- How often do you need to take backups of your system? +- What is the data (e.g. files / directories / database dumps) that you want to backup? You may also want to consider if you really need to backup huge files (such as audio or video files). +- Where (meaning physical place and media) will those backups be stored? + +**Backing Up Your Data** + +Method 1: Backup entire drives with dd command. You can either back up an entire hard disk or a partition by creating an exact image at any point in time. Note that this works best when the device is offline, meaning it’s not mounted and there are no processes accessing it for I/O operations. + +The downside of this backup approach is that the image will have the same size as the disk or partition, even when the actual data occupies a small percentage of it. For example, if you want to image a partition of 20 GB that is only 10% full, the image file will still be 20 GB in size. In other words, it’s not only the actual data that gets backed up, but the entire partition itself. You may consider using this method if you need exact backups of your devices. + +**Creating an image file out of an existing device** + + # dd if=/dev/sda of=/system_images/sda.img + OR + --------------------- Alternatively, you can compress the image file --------------------- + # dd if=/dev/sda | gzip -c > /system_images/sda.img.gz + +**Restoring the backup from the image file** + + # dd if=/system_images/sda.img of=/dev/sda + OR + + --------------------- Depending on your choice while creating the image --------------------- + gzip -dc /system_images/sda.img.gz | dd of=/dev/sda + +Method 2: Backup certain files / directories with tar command – already covered in [Part 3][3] of this series. You may consider using this method if you need to keep copies of specific files and directories (configuration files, users’ home directories, and so on). + +Method 3: Synchronize files with rsync command. Rsync is a versatile remote (and local) file-copying tool. If you need to backup and synchronize your files to/from network drives, rsync is a go. + +Whether you’re synchronizing two local directories or local < — > remote directories mounted on the local filesystem, the basic syntax is the same. +Synchronizing two local directories or local < — > remote directories mounted on the local filesystem + + # rsync -av source_directory destination directory + +Where, -a recurse into subdirectories (if they exist), preserve symbolic links, timestamps, permissions, and original owner / group and -v verbose. + +![rsync Synchronizing Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronizing-Files.png) + +rsync Synchronizing Files + +In addition, if you want to increase the security of the data transfer over the wire, you can use ssh over rsync. + +**Synchronizing local → remote directories over ssh** + + # rsync -avzhe ssh backups root@remote_host:/remote_directory/ + +This example will synchronize the backups directory on the local host with the contents of /root/remote_directory on the remote host. + +Where the -h option shows file sizes in human-readable format, and the -e flag is used to indicate a ssh connection. + +![rsync Synchronize Remote Files](http://www.tecmint.com/wp-content/uploads/2014/10/rsync-synchronize-Remote-Files.png) + +rsync Synchronize Remote Files + +Synchronizing remote → local directories over ssh. + +In this case, switch the source and destination directories from the previous example. + + # rsync -avzhe ssh root@remote_host:/remote_directory/ backups + +Please note that these are only 3 examples (most frequent cases you’re likely to run into) of the use of rsync. For more examples and usages of rsync commands can be found at the following article. + +- Read Also: [10 rsync Commands to Sync Files in Linux][4] + +### Summary ### + +As a sysadmin, you need to ensure that your systems perform as good as possible. If you’re well prepared, and if the integrity of your data is well supported by a storage technology such as RAID and regular system backups, you’ll be safe. + +If you have questions, comments, or further ideas on how this article can be improved, feel free to speak out below. In addition, please consider sharing this series through your social network profiles. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/creating-and-managing-raid-backups-in-linux/ + +作者:[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/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/create-partitions-and-filesystems-in-linux/ +[3]:http://www.tecmint.com/compress-files-and-finding-files-in-linux/ +[4]:http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/ \ No newline at end of file diff --git a/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md b/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md new file mode 100644 index 0000000000..b024c89540 --- /dev/null +++ b/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md @@ -0,0 +1,367 @@ +Part 7 - LFCS: Managing System Startup Process and Services (SysVinit, Systemd and Upstart) +================================================================================ +A couple of months ago, the Linux Foundation announced the LFCS (Linux Foundation Certified Sysadmin) certification, an exciting new program whose aim is allowing individuals from all ends of the world to get certified in performing basic to intermediate system administration tasks on Linux systems. This includes supporting already running systems and services, along with first-hand problem-finding and analysis, plus the ability to decide when to raise issues to engineering teams. + +![Linux Foundation Certified Sysadmin – Part 7](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-7.png) + +Linux Foundation Certified Sysadmin – Part 7 + +The following video describes an brief introduction to The Linux Foundation Certification Program. + +注:youtube 视频 + + +This post is Part 7 of a 10-tutorial series, here in this part, we will explain how to Manage Linux System Startup Process and Services, that are required for the LFCS certification exam. + +### Managing the Linux Startup Process ### + +The boot process of a Linux system consists of several phases, each represented by a different component. The following diagram briefly summarizes the boot process and shows all the main components involved. + +![Linux Boot Process](http://www.tecmint.com/wp-content/uploads/2014/10/Linux-Boot-Process.png) + +Linux Boot Process + +When you press the Power button on your machine, the firmware that is stored in a EEPROM chip in the motherboard initializes the POST (Power-On Self Test) to check on the state of the system’s hardware resources. When the POST is finished, the firmware then searches and loads the 1st stage boot loader, located in the MBR or in the EFI partition of the first available disk, and gives control to it. + +#### MBR Method #### + +The MBR is located in the first sector of the disk marked as bootable in the BIOS settings and is 512 bytes in size. + +- First 446 bytes: The bootloader contains both executable code and error message text. +- Next 64 bytes: The Partition table contains a record for each of four partitions (primary or extended). Among other things, each record indicates the status (active / not active), size, and start / end sectors of each partition. +- Last 2 bytes: The magic number serves as a validation check of the MBR. + +The following command performs a backup of the MBR (in this example, /dev/sda is the first hard disk). The resulting file, mbr.bkp can come in handy should the partition table become corrupt, for example, rendering the system unbootable. + +Of course, in order to use it later if the need arises, we will need to save it and store it somewhere else (like a USB drive, for example). That file will help us restore the MBR and will get us going once again if and only if we do not change the hard drive layout in the meanwhile. + +**Backup MBR** + + # dd if=/dev/sda of=mbr.bkp bs=512 count=1 + +![Backup MBR in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Backup-MBR-in-Linux.png) + +Backup MBR in Linux + +**Restoring MBR** + + # dd if=mbr.bkp of=/dev/sda bs=512 count=1 + +![Restore MBR in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Restore-MBR-in-Linux.png) + +Restore MBR in Linux + +#### EFI/UEFI Method #### + +For systems using the EFI/UEFI method, the UEFI firmware reads its settings to determine which UEFI application is to be launched and from where (i.e., in which disk and partition the EFI partition is located). + +Next, the 2nd stage boot loader (aka boot manager) is loaded and run. GRUB [GRand Unified Boot] is the most frequently used boot manager in Linux. One of two distinct versions can be found on most systems used today. + +- GRUB legacy configuration file: /boot/grub/menu.lst (older distributions, not supported by EFI/UEFI firmwares). +- GRUB2 configuration file: most likely, /etc/default/grub. + +Although the objectives of the LFCS exam do not explicitly request knowledge about GRUB internals, if you’re brave and can afford to mess up your system (you may want to try it first on a virtual machine, just in case), you need to run. + + # update-grub + +As root after modifying GRUB’s configuration in order to apply the changes. + +Basically, GRUB loads the default kernel and the initrd or initramfs image. In few words, initrd or initramfs help to perform the hardware detection, the kernel module loading and the device discovery necessary to get the real root filesystem mounted. + +Once the real root filesystem is up, the kernel executes the system and service manager (init or systemd, whose process identification or PID is always 1) to begin the normal user-space boot process in order to present a user interface. + +Both init and systemd are daemons (background processes) that manage other daemons, as the first service to start (during boot) and the last service to terminate (during shutdown). + +![Systemd and Init](http://www.tecmint.com/wp-content/uploads/2014/10/systemd-and-init.png) + +Systemd and Init + +### Starting Services (SysVinit) ### + +The concept of runlevels in Linux specifies different ways to use a system by controlling which services are running. In other words, a runlevel controls what tasks can be accomplished in the current execution state = runlevel (and which ones cannot). + +Traditionally, this startup process was performed based on conventions that originated with System V UNIX, with the system passing executing collections of scripts that start and stop services as the machine entered a specific runlevel (which, in other words, is a different mode of running the system). + +Within each runlevel, individual services can be set to run, or to be shut down if running. Latest versions of some major distributions are moving away from the System V standard in favour of a rather new service and system manager called systemd (which stands for system daemon), but usually support sysv commands for compatibility purposes. This means that you can run most of the well-known sysv init tools in a systemd-based distribution. + +- Read Also: [Why ‘systemd’ replaces ‘init’ in Linux][1] + +Besides starting the system process, init looks to the /etc/inittab file to decide what runlevel must be entered. + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Runlevel Description
0 Halt the system. Runlevel 0 is a special transitional state used to shutdown the system quickly.
1 Also aliased to s, or S, this runlevel is sometimes called maintenance mode. What services, if any, are started at this runlevel varies by distribution. It’s typically used for low-level system maintenance that may be impaired by normal system operation.
2 Multiuser. On Debian systems and derivatives, this is the default runlevel, and includes -if available- a graphical login. On Red-Hat based systems, this is multiuser mode without networking.
3 On Red-Hat based systems, this is the default multiuser mode, which runs everything except the graphical environment. This runlevel and levels 4 and 5 usually are not used on Debian-based systems.
4 Typically unused by default and therefore available for customization.
5 On Red-Hat based systems, full multiuser mode with GUI login. This runlevel is like level 3, but with a GUI login available.
6 Reboot the system.
+ +To switch between runlevels, we can simply issue a runlevel change using the init command: init N (where N is one of the runlevels listed above). Please note that this is not the recommended way of taking a running system to a different runlevel because it gives no warning to existing logged-in users (thus causing them to lose work and processes to terminate abnormally). + +Instead, the shutdown command should be used to restart the system (which first sends a warning message to all logged-in users and blocks any further logins; it then signals init to switch runlevels); however, the default runlevel (the one the system will boot to) must be edited in the /etc/inittab file first. + +For that reason, follow these steps to properly switch between runlevels, As root, look for the following line in /etc/inittab. + + id:2:initdefault: + +and change the number 2 for the desired runlevel with your preferred text editor, such as vim (described in [How to use vi/vim editor in Linux – Part 2][2] of this series). + +Next, run as root. + + # shutdown -r now + +That last command will restart the system, causing it to start in the specified runlevel during next boot, and will run the scripts located in the /etc/rc[runlevel].d directory in order to decide which services should be started and which ones should not. For example, for runlevel 2 in the following system. + +![Change Runlevels in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Change-Runlevels-in-Linux.jpeg) + +Change Runlevels in Linux + +#### Manage Services using chkconfig #### + +To enable or disable system services on boot, we will use [chkconfig command][3] in CentOS / openSUSE and sysv-rc-conf in Debian and derivatives. This tool can also show us what is the preconfigured state of a service for a particular runlevel. + +- Read Also: [How to Stop and Disable Unwanted Services in Linux][4] + +Listing the runlevel configuration for a service. + + # chkconfig --list [service name] + # chkconfig --list postfix + # chkconfig --list mysqld + +![Listing Runlevel Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/Listing-Runlevel-Configuration.png) + +Listing Runlevel Configuration + +In the above image we can see that postfix is set to start when the system enters runlevels 2 through 5, whereas mysqld will be running by default for runlevels 2 through 4. Now suppose that this is not the expected behaviour. + +For example, we need to turn on mysqld for runlevel 5 as well, and turn off postfix for runlevels 4 and 5. Here’s what we would do in each case (run the following commands as root). + +**Enabling a service for a particular runlevel** + + # chkconfig --level [level(s)] service on + # chkconfig --level 5 mysqld on + +**Disabling a service for particular runlevels** + + # chkconfig --level [level(s)] service off + # chkconfig --level 45 postfix off + +![Enable Disable Services in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Disable-Services.png) + +Enable Disable Services + +We will now perform similar tasks in a Debian-based system using sysv-rc-conf. + +#### Manage Services using sysv-rc-conf #### + +Configuring a service to start automatically on a specific runlevel and prevent it from starting on all others. + +1. Let’s use the following command to see what are the runlevels where mdadm is configured to start. + + # ls -l /etc/rc[0-6].d | grep -E 'rc[0-6]|mdadm' + +![Check Runlevel of Service Running](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Service-Runlevel.png) + +Check Runlevel of Service Running + +2. We will use sysv-rc-conf to prevent mdadm from starting on all runlevels except 2. Just check or uncheck (with the space bar) as desired (you can move up, down, left, and right with the arrow keys). + + # sysv-rc-conf + +![SysV Runlevel Config](http://www.tecmint.com/wp-content/uploads/2014/10/SysV-Runlevel-Config.png) + +SysV Runlevel Config + +Then press q to quit. + +3. We will restart the system and run again the command from STEP 1. + + # ls -l /etc/rc[0-6].d | grep -E 'rc[0-6]|mdadm' + +![Verify Service Runlevel](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Service-Runlevel.png) + +Verify Service Runlevel + +In the above image we can see that mdadm is configured to start only on runlevel 2. + +### What About systemd? ### + +systemd is another service and system manager that is being adopted by several major Linux distributions. It aims to allow more processing to be done in parallel during system startup (unlike sysvinit, which always tends to be slower because it starts processes one at a time, checks whether one depends on another, and waits for daemons to launch so more services can start), and to serve as a dynamic resource management to a running system. + +Thus, services are started when needed (to avoid consuming system resources) instead of being launched without a solid reason during boot. + +Viewing the status of all the processes running on your system, both systemd native and SysV services, run the following command. + + # systemctl + +![Check All Running Processes in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-All-Running-Processes.png) + +Check All Running Processes + +The LOAD column shows whether the unit definition (refer to the UNIT column, which shows the service or anything maintained by systemd) was properly loaded, while the ACTIVE and SUB columns show the current status of such unit. +Displaying information about the current status of a service + +When the ACTIVE column indicates that an unit’s status is other than active, we can check what happened using. + + # systemctl status [unit] + +For example, in the image above, media-samba.mount is in failed state. Let’s run. + + # systemctl status media-samba.mount + +![Check Linux Service Status](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Service-Status.png) + +Check Service Status + +We can see that media-samba.mount failed because the mount process on host dev1 was unable to find the network share at //192.168.0.10/gacanepa. + +### Starting or Stopping Services ### + +Once the network share //192.168.0.10/gacanepa becomes available, let’s try to start, then stop, and finally restart the unit media-samba.mount. After performing each action, let’s run systemctl status media-samba.mount to check on its status. + + # systemctl start media-samba.mount + # systemctl status media-samba.mount + # systemctl stop media-samba.mount + # systemctl restart media-samba.mount + # systemctl status media-samba.mount + +![Starting Stoping Services](http://www.tecmint.com/wp-content/uploads/2014/10/Starting-Stoping-Service.jpeg) + +Starting Stoping Services + +**Enabling or disabling a service to start during boot** + +Under systemd you can enable or disable a service when it boots. + + # systemctl enable [service] # enable a service + # systemctl disable [service] # prevent a service from starting at boot + +The process of enabling or disabling a service to start automatically on boot consists in adding or removing symbolic links in the /etc/systemd/system/multi-user.target.wants directory. + +![Enabling Disabling Services](http://www.tecmint.com/wp-content/uploads/2014/10/Enabling-Disabling-Services.jpeg) + +Enabling Disabling Services + +Alternatively, you can find out a service’s current status (enabled or disabled) with the command. + + # systemctl is-enabled [service] + +For example, + + # systemctl is-enabled postfix.service + +In addition, you can reboot or shutdown the system with. + + # systemctl reboot + # systemctl shutdown + +### Upstart ### + +Upstart is an event-based replacement for the /sbin/init daemon and was born out of the need for starting services only, when they are needed (also supervising them while they are running), and handling events as they occur, thus surpassing the classic, dependency-based sysvinit system. + +It was originally developed for the Ubuntu distribution, but is used in Red Hat Enterprise Linux 6.0. Though it was intended to be suitable for deployment in all Linux distributions as a replacement for sysvinit, in time it was overshadowed by systemd. On February 14, 2014, Mark Shuttleworth (founder of Canonical Ltd.) announced that future releases of Ubuntu would use systemd as the default init daemon. + +Because the SysV startup script for system has been so common for so long, a large number of software packages include SysV startup scripts. To accommodate such packages, Upstart provides a compatibility mode: It runs SysV startup scripts in the usual locations (/etc/rc.d/rc?.d, /etc/init.d/rc?.d, /etc/rc?.d, or a similar location). Thus, if we install a package that doesn’t yet include an Upstart configuration script, it should still launch in the usual way. + +Furthermore, if we have installed utilities such as [chkconfig][5], you should be able to use them to manage your SysV-based services just as we would on sysvinit based systems. + +Upstart scripts also support starting or stopping services based on a wider variety of actions than do SysV startup scripts; for example, Upstart can launch a service whenever a particular hardware device is attached. + +A system that uses Upstart and its native scripts exclusively replaces the /etc/inittab file and the runlevel-specific SysV startup script directories with .conf scripts in the /etc/init directory. + +These *.conf scripts (also known as job definitions) generally consists of the following: + +- Description of the process. +- Runlevels where the process should run or events that should trigger it. +- Runlevels where process should be stopped or events that should stop it. +- Options. +- Command to launch the process. + +For example, + + # My test service - Upstart script demo description "Here goes the description of 'My test service'" author "Dave Null " + # Stanzas + + # + # Stanzas define when and how a process is started and stopped + # See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn + # When to start the service + start on runlevel [2345] + # When to stop the service + stop on runlevel [016] + # Automatically restart process in case of crash + respawn + # Specify working directory + chdir /home/dave/myfiles + # Specify the process/command (add arguments if needed) to run + exec bash backup.sh arg1 arg2 + +To apply changes, you will need to tell upstart to reload its configuration. + + # initctl reload-configuration + +Then start your job by typing the following command. + + $ sudo start yourjobname + +Where yourjobname is the name of the job that was added earlier with the yourjobname.conf script. + +A more complete and detailed reference guide for Upstart is available in the project’s web site under the menu “[Cookbook][6]”. + +### Summary ### + +A knowledge of the Linux boot process is necessary to help you with troubleshooting tasks as well as with adapting the computer’s performance and running services to your needs. + +In this article we have analyzed what happens from the moment when you press the Power switch to turn on the machine until you get a fully operational user interface. I hope you have learned reading it as much as I did while putting it together. Feel free to leave your comments or questions below. We always look forward to hearing from our readers! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-boot-process-and-manage-services/ + +作者:[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/systemd-replaces-init-in-linux/ +[2]:http://www.tecmint.com/vi-editor-usage/ +[3]:http://www.tecmint.com/chkconfig-command-examples/ +[4]:http://www.tecmint.com/remove-unwanted-services-from-linux/ +[5]:http://www.tecmint.com/chkconfig-command-examples/ +[6]:http://upstart.ubuntu.com/cookbook/ \ No newline at end of file diff --git a/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md b/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md new file mode 100644 index 0000000000..4ccf3f20f6 --- /dev/null +++ b/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md @@ -0,0 +1,330 @@ +Part 8 - LFCS: Managing Users & Groups, File Permissions & Attributes and Enabling sudo Access on Accounts +================================================================================ +Last August, the Linux Foundation started the LFCS certification (Linux Foundation Certified Sysadmin), a brand new program whose purpose is to allow individuals everywhere and anywhere take an exam in order to get certified in basic to intermediate operational support for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus intelligent decision-making to be able to decide when it’s necessary to escalate issues to higher level support teams. + +![Linux Users and Groups Management](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-8.png) + +Linux Foundation Certified Sysadmin – Part 8 + +Please have a quick look at the following video that describes an introduction to the Linux Foundation Certification Program. + +注:youtube视频 + + +This article is Part 8 of a 10-tutorial long series, here in this section, we will guide you on how to manage users and groups permissions in Linux system, that are required for the LFCS certification exam. + +Since Linux is a multi-user operating system (in that it allows multiple users on different computers or terminals to access a single system), you will need to know how to perform effective user management: how to add, edit, suspend, or delete user accounts, along with granting them the necessary permissions to do their assigned tasks. + +### Adding User Accounts ### + +To add a new user account, you can run either of the following two commands as root. + + # adduser [new_account] + # useradd [new_account] + +When a new user account is added to the system, the following operations are performed. + +1. His/her home directory is created (/home/username by default). + +2. The following hidden files are copied into the user’s home directory, and will be used to provide environment variables for his/her user session. + + .bash_logout + .bash_profile + .bashrc + +3. A mail spool is created for the user at /var/spool/mail/username. + +4. A group is created and given the same name as the new user account. + +**Understanding /etc/passwd** + +The full account information is stored in the /etc/passwd file. This file contains a record per system user account and has the following format (fields are delimited by a colon). + + [username]:[x]:[UID]:[GID]:[Comment]:[Home directory]:[Default shell] + +- Fields [username] and [Comment] are self explanatory. +- The x in the second field indicates that the account is protected by a shadowed password (in /etc/shadow), which is needed to logon as [username]. +- The [UID] and [GID] fields are integers that represent the User IDentification and the primary Group IDentification to which [username] belongs, respectively. +- The [Home directory] indicates the absolute path to [username]’s home directory, and +- The [Default shell] is the shell that will be made available to this user when he or she logins the system. + +**Understanding /etc/group** + +Group information is stored in the /etc/group file. Each record has the following format. + + [Group name]:[Group password]:[GID]:[Group members] + +- [Group name] is the name of group. +- An x in [Group password] indicates group passwords are not being used. +- [GID]: same as in /etc/passwd. +- [Group members]: a comma separated list of users who are members of [Group name]. + +![Add User Accounts in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-user-accounts.png) + +Add User Accounts + +After adding an account, you can edit the following information (to name a few fields) using the usermod command, whose basic syntax of usermod is as follows. + + # usermod [options] [username] + +**Setting the expiry date for an account** + +Use the –expiredate flag followed by a date in YYYY-MM-DD format. + + # usermod --expiredate 2014-10-30 tecmint + +**Adding the user to supplementary groups** + +Use the combined -aG, or –append –groups options, followed by a comma separated list of groups. + + # usermod --append --groups root,users tecmint + +**Changing the default location of the user’s home directory** + +Use the -d, or –home options, followed by the absolute path to the new home directory. + + # usermod --home /tmp tecmint + +**Changing the shell the user will use by default** + +Use –shell, followed by the path to the new shell. + + # usermod --shell /bin/sh tecmint + +**Displaying the groups an user is a member of** + + # groups tecmint + # id tecmint + +Now let’s execute all the above commands in one go. + + # usermod --expiredate 2014-10-30 --append --groups root,users --home /tmp --shell /bin/sh tecmint + +![usermod Command Examples](http://www.tecmint.com/wp-content/uploads/2014/10/usermod-command-examples.png) + +usermod Command Examples + +Read Also: + +- [15 useradd Command Examples in Linux][1] +- [15 usermod Command Examples in Linux][2] + +For existing accounts, we can also do the following. + +**Disabling account by locking password** + +Use the -L (uppercase L) or the –lock option to lock a user’s password. + + # usermod --lock tecmint + +**Unlocking user password** + +Use the –u or the –unlock option to unlock a user’s password that was previously blocked. + + # usermod --unlock tecmint + +![Lock User in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/lock-user-in-linux.png) + +Lock User Accounts + +**Creating a new group for read and write access to files that need to be accessed by several users** + +Run the following series of commands to achieve the goal. + + # groupadd common_group # Add a new group + # chown :common_group common.txt # Change the group owner of common.txt to common_group + # usermod -aG common_group user1 # Add user1 to common_group + # usermod -aG common_group user2 # Add user2 to common_group + # usermod -aG common_group user3 # Add user3 to common_group + +**Deleting a group** + +You can delete a group with the following command. + + # groupdel [group_name] + +If there are files owned by group_name, they will not be deleted, but the group owner will be set to the GID of the group that was deleted. + +### Linux File Permissions ### + +Besides the basic read, write, and execute permissions that we discussed in [Setting File Attributes – Part 3][3] of this series, there are other less used (but not less important) permission settings, sometimes referred to as “special permissions”. + +Like the basic permissions discussed earlier, they are set using an octal file or through a letter (symbolic notation) that indicates the type of permission. +Deleting user accounts + +You can delete an account (along with its home directory, if it’s owned by the user, and all the files residing therein, and also the mail spool) using the userdel command with the –remove option. + + # userdel --remove [username] + +#### Group Management #### + +Every time a new user account is added to the system, a group with the same name is created with the username as its only member. Other users can be added to the group later. One of the purposes of groups is to implement a simple access control to files and other system resources by setting the right permissions on those resources. + +For example, suppose you have the following users. + +- user1 (primary group: user1) +- user2 (primary group: user2) +- user3 (primary group: user3) + +All of them need read and write access to a file called common.txt located somewhere on your local system, or maybe on a network share that user1 has created. You may be tempted to do something like, + + # chmod 660 common.txt + OR + # chmod u=rw,g=rw,o= common.txt [notice the space between the last equal sign and the file name] + +However, this will only provide read and write access to the owner of the file and to those users who are members of the group owner of the file (user1 in this case). Again, you may be tempted to add user2 and user3 to group user1, but that will also give them access to the rest of the files owned by user user1 and group user1. + +This is where groups come in handy, and here’s what you should do in a case like this. + +**Understanding Setuid** + +When the setuid permission is applied to an executable file, an user running the program inherits the effective privileges of the program’s owner. Since this approach can reasonably raise security concerns, the number of files with setuid permission must be kept to a minimum. You will likely find programs with this permission set when a system user needs to access a file owned by root. + +Summing up, it isn’t just that the user can execute the binary file, but also that he can do so with root’s privileges. For example, let’s check the permissions of /bin/passwd. This binary is used to change the password of an account, and modifies the /etc/shadow file. The superuser can change anyone’s password, but all other users should only be able to change their own. + +![passwd Command Examples](http://www.tecmint.com/wp-content/uploads/2014/10/passwd-command.png) + +passwd Command Examples + +Thus, any user should have permission to run /bin/passwd, but only root will be able to specify an account. Other users can only change their corresponding passwords. + +![Change User Password in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/change-user-password.png) + +Change User Password + +**Understanding Setgid** + +When the setgid bit is set, the effective GID of the real user becomes that of the group owner. Thus, any user can access a file under the privileges granted to the group owner of such file. In addition, when the setgid bit is set on a directory, newly created files inherit the same group as the directory, and newly created subdirectories will also inherit the setgid bit of the parent directory. You will most likely use this approach whenever members of a certain group need access to all the files in a directory, regardless of the file owner’s primary group. + + # chmod g+s [filename] + +To set the setgid in octal form, prepend the number 2 to the current (or desired) basic permissions. + + # chmod 2755 [directory] + +**Setting the SETGID in a directory** + +![Add Setgid in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-setgid-to-directory.png) + +Add Setgid to Directory + +**Understanding Sticky Bit** + +When the “sticky bit” is set on files, Linux just ignores it, whereas for directories it has the effect of preventing users from deleting or even renaming the files it contains unless the user owns the directory, the file, or is root. + +# chmod o+t [directory] + +To set the sticky bit in octal form, prepend the number 1 to the current (or desired) basic permissions. + +# chmod 1755 [directory] + +Without the sticky bit, anyone able to write to the directory can delete or rename files. For that reason, the sticky bit is commonly found on directories, such as /tmp, that are world-writable. + +![Add Stickybit in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/add-sticky-bit-to-directory.png) + +Add Stickybit to Directory + +### Special Linux File Attributes ### + +There are other attributes that enable further limits on the operations that are allowed on files. For example, prevent the file from being renamed, moved, deleted, or even modified. They are set with the [chattr command][4] and can be viewed using the lsattr tool, as follows. + + # chattr +i file1 + # chattr +a file2 + +After executing those two commands, file1 will be immutable (which means it cannot be moved, renamed, modified or deleted) whereas file2 will enter append-only mode (can only be open in append mode for writing). + +![Protect File from Deletion](http://www.tecmint.com/wp-content/uploads/2014/10/chattr-command.png) + +Chattr Command to Protect Files + +### Accessing the root Account and Using sudo ### + +One of the ways users can gain access to the root account is by typing. + + $ su + +and then entering root’s password. + +If authentication succeeds, you will be logged on as root with the current working directory as the same as you were before. If you want to be placed in root’s home directory instead, run. + + $ su - + +and then enter root’s password. + +![Enable sudo Access on Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Enable-Sudo-Access.png) + +Enable Sudo Access on Users + +The above procedure requires that a normal user knows root’s password, which poses a serious security risk. For that reason, the sysadmin can configure the sudo command to allow an ordinary user to execute commands as a different user (usually the superuser) in a very controlled and limited way. Thus, restrictions can be set on a user so as to enable him to run one or more specific privileged commands and no others. + +- Read Also: [Difference Between su and sudo User][5] + +To authenticate using sudo, the user uses his/her own password. After entering the command, we will be prompted for our password (not the superuser’s) and if the authentication succeeds (and if the user has been granted privileges to run the command), the specified command is carried out. + +To grant access to sudo, the system administrator must edit the /etc/sudoers file. It is recommended that this file is edited using the visudo command instead of opening it directly with a text editor. + + # visudo + +This opens the /etc/sudoers file using vim (you can follow the instructions given in [Install and Use vim as Editor – Part 2][6] of this series to edit the file). + +These are the most relevant lines. + + Defaults secure_path="/usr/sbin:/usr/bin:/sbin" + root ALL=(ALL) ALL + tecmint ALL=/bin/yum update + gacanepa ALL=NOPASSWD:/bin/updatedb + %admin ALL=(ALL) ALL + +Let’s take a closer look at them. + + Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/usr/local/bin" + +This line lets you specify the directories that will be used for sudo, and is used to prevent using user-specific directories, which can harm the system. + +The next lines are used to specify permissions. + + root ALL=(ALL) ALL + +- The first ALL keyword indicates that this rule applies to all hosts. +- The second ALL indicates that the user in the first column can run commands with the privileges of any user. +- The third ALL means any command can be run. + + tecmint ALL=/bin/yum update + +If no user is specified after the = sign, sudo assumes the root user. In this case, user tecmint will be able to run yum update as root. + + gacanepa ALL=NOPASSWD:/bin/updatedb + +The NOPASSWD directive allows user gacanepa to run /bin/updatedb without needing to enter his password. + + %admin ALL=(ALL) ALL + +The % sign indicates that this line applies to a group called “admin”. The meaning of the rest of the line is identical to that of an regular user. This means that members of the group “admin” can run all commands as any user on all hosts. + +To see what privileges are granted to you by sudo, use the “-l” option to list them. + +![Sudo Access Rules](http://www.tecmint.com/wp-content/uploads/2014/10/sudo-access-rules.png) + +Sudo Access Rules + +### Summary ### + +Effective user and file management skills are essential tools for any system administrator. In this article we have covered the basics and hope you can use it as a good starting to point to build upon. Feel free to leave your comments or questions below, and we’ll respond quickly. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-users-and-groups-in-linux/ + +作者:[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/add-users-in-linux/ +[2]:http://www.tecmint.com/usermod-command-examples/ +[3]:http://www.tecmint.com/compress-files-and-finding-files-in-linux/ +[4]:http://www.tecmint.com/chattr-command-examples/ +[5]:http://www.tecmint.com/su-vs-sudo-and-how-to-configure-sudo-in-linux/ +[6]:http://www.tecmint.com/vi-editor-usage/ \ No newline at end of file diff --git a/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md b/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md new file mode 100644 index 0000000000..7b58a467d7 --- /dev/null +++ b/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md @@ -0,0 +1,229 @@ +Part 9 - LFCS: Linux Package Management with Yum, RPM, Apt, Dpkg, Aptitude and Zypper +================================================================================ +Last August, the Linux Foundation announced the LFCS certification (Linux Foundation Certified Sysadmin), a shiny chance for system administrators everywhere to demonstrate, through a performance-based exam, that they are capable of succeeding at overall operational support for Linux systems. A Linux Foundation Certified Sysadmin has the expertise to ensure effective system support, first-level troubleshooting and monitoring, including finally issue escalation, when needed, to engineering support teams. + +![Linux Package Management](http://www.tecmint.com/wp-content/uploads/2014/11/lfcs-Part-9.png) + +Linux Foundation Certified Sysadmin – Part 9 + +Watch the following video that explains about the Linux Foundation Certification Program. + +注:youtube 视频 + + +This article is a Part 9 of 10-tutorial long series, today in this article we will guide you about Linux Package Management, that are required for the LFCS certification exam. + +### Package Management ### + +In few words, package management is a method of installing and maintaining (which includes updating and probably removing as well) software on the system. + +In the early days of Linux, programs were only distributed as source code, along with the required man pages, the necessary configuration files, and more. Nowadays, most Linux distributors use by default pre-built programs or sets of programs called packages, which are presented to users ready for installation on that distribution. However, one of the wonders of Linux is still the possibility to obtain source code of a program to be studied, improved, and compiled. + +**How package management systems work** + +If a certain package requires a certain resource such as a shared library, or another package, it is said to have a dependency. All modern package management systems provide some method of dependency resolution to ensure that when a package is installed, all of its dependencies are installed as well. + +**Packaging Systems** + +Almost all the software that is installed on a modern Linux system will be found on the Internet. It can either be provided by the distribution vendor through central repositories (which can contain several thousands of packages, each of which has been specifically built, tested, and maintained for the distribution) or be available in source code that can be downloaded and installed manually. + +Because different distribution families use different packaging systems (Debian: *.deb / CentOS: *.rpm / openSUSE: *.rpm built specially for openSUSE), a package intended for one distribution will not be compatible with another distribution. However, most distributions are likely to fall into one of the three distribution families covered by the LFCS certification. + +**High and low-level package tools** + +In order to perform the task of package management effectively, you need to be aware that you will have two types of available utilities: low-level tools (which handle in the backend the actual installation, upgrade, and removal of package files), and high-level tools (which are in charge of ensuring that the tasks of dependency resolution and metadata searching -”data about the data”- are performed). + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DISTRIBUTIONLOW-LEVEL TOOLHIGH-LEVEL TOOL
 Debian and derivatives dpkg apt-get / aptitude
 CentOS rpm yum
 openSUSE rpm zypper
+ +Let us see the descrption of the low-level and high-level tools. + +dpkg is a low-level package manager for Debian-based systems. It can install, remove, provide information about and build *.deb packages but it can’t automatically download and install their corresponding dependencies. + +- Read More: [15 dpkg Command Examples][1] + +apt-get is a high-level package manager for Debian and derivatives, and provides a simple way to retrieve and install packages, including dependency resolution, from multiple sources using the command line. Unlike dpkg, apt-get does not work directly with *.deb files, but with the package proper name. + +- Read More: [25 apt-get Command Examples][2] + +aptitude is another high-level package manager for Debian-based systems, and can be used to perform management tasks (installing, upgrading, and removing packages, also handling dependency resolution automatically) in a fast and easy way. It provides the same functionality as apt-get and additional ones, such as offering access to several versions of a package. + +rpm is the package management system used by Linux Standard Base (LSB)-compliant distributions for low-level handling of packages. Just like dpkg, it can query, install, verify, upgrade, and remove packages, and is more frequently used by Fedora-based distributions, such as RHEL and CentOS. + +- Read More: [20 rpm Command Examples][3] + +yum adds the functionality of automatic updates and package management with dependency management to RPM-based systems. As a high-level tool, like apt-get or aptitude, yum works with repositories. + +- Read More: [20 yum Command Examples][4] +- +### Common Usage of Low-Level Tools ### + +The most frequent tasks that you will do with low level tools are as follows: + +**1. Installing a package from a compiled (*.deb or *.rpm) file** + +The downside of this installation method is that no dependency resolution is provided. You will most likely choose to install a package from a compiled file when such package is not available in the distribution’s repositories and therefore cannot be downloaded and installed through a high-level tool. Since low-level tools do not perform dependency resolution, they will exit with an error if we try to install a package with unmet dependencies. + + # dpkg -i file.deb [Debian and derivative] + # rpm -i file.rpm [CentOS / openSUSE] + +**Note**: Do not attempt to install on CentOS a *.rpm file that was built for openSUSE, or vice-versa! + +**2. Upgrading a package from a compiled file** + +Again, you will only upgrade an installed package manually when it is not available in the central repositories. + + # dpkg -i file.deb [Debian and derivative] + # rpm -U file.rpm [CentOS / openSUSE] + +**3. Listing installed packages** + +When you first get your hands on an already working system, chances are you’ll want to know what packages are installed. + + # dpkg -l [Debian and derivative] + # rpm -qa [CentOS / openSUSE] + +If you want to know whether a specific package is installed, you can pipe the output of the above commands to grep, as explained in [manipulate files in Linux – Part 1][6] of this series. Suppose we need to verify if package mysql-common is installed on an Ubuntu system. + + # dpkg -l | grep mysql-common + +![Check Installed Packages in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Installed-Package.png) + +Check Installed Packages + +Another way to determine if a package is installed. + + # dpkg --status package_name [Debian and derivative] + # rpm -q package_name [CentOS / openSUSE] + +For example, let’s find out whether package sysdig is installed on our system. + + # rpm -qa | grep sysdig + +![Check sysdig Package](http://www.tecmint.com/wp-content/uploads/2014/11/Check-sysdig-Package.png) + +Check sysdig Package + +**4. Finding out which package installed a file** + + # dpkg --search file_name + # rpm -qf file_name + +For example, which package installed pw_dict.hwm? + + # rpm -qf /usr/share/cracklib/pw_dict.hwm + +![Query File in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Query-File-in-Linux.png) + +Query File in Linux + +### Common Usage of High-Level Tools ### + +The most frequent tasks that you will do with high level tools are as follows. + +**1. Searching for a package** + +aptitude update will update the list of available packages, and aptitude search will perform the actual search for package_name. + + # aptitude update && aptitude search package_name + +In the search all option, yum will search for package_name not only in package names, but also in package descriptions. + + # yum search package_name + # yum search all package_name + # yum whatprovides “*/package_name” + +Let’s supposed we need a file whose name is sysdig. To know that package we will have to install, let’s run. + + # yum whatprovides “*/sysdig” + +![Check Package Description in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Package-Description.png) + +Check Package Description + +whatprovides tells yum to search the package the will provide a file that matches the above regular expression. + + # zypper refresh && zypper search package_name [On openSUSE] + +**2. Installing a package from a repository** + +While installing a package, you may be prompted to confirm the installation after the package manager has resolved all dependencies. Note that running update or refresh (according to the package manager being used) is not strictly necessary, but keeping installed packages up to date is a good sysadmin practice for security and dependency reasons. + + # aptitude update && aptitude install package_name [Debian and derivatives] + # yum update && yum install package_name [CentOS] + # zypper refresh && zypper install package_name [openSUSE] + +**3. Removing a package** + +The option remove will uninstall the package but leaving configuration files intact, whereas purge will erase every trace of the program from your system. +# aptitude remove / purge package_name +# yum erase package_name + + ---Notice the minus sign in front of the package that will be uninstalled, openSUSE --- + + # zypper remove -package_name + +Most (if not all) package managers will prompt you, by default, if you’re sure about proceeding with the uninstallation before actually performing it. So read the onscreen messages carefully to avoid running into unnecessary trouble! + +**4. Displaying information about a package** + +The following command will display information about the birthday package. + + # aptitude show birthday + # yum info birthday + # zypper info birthday + +![Check Package Information in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Package-Information.png) + +Check Package Information + +### Summary ### + +Package management is something you just can’t sweep under the rug as a system administrator. You should be prepared to use the tools described in this article at a moment’s notice. Hope you find it useful in your preparation for the LFCS exam and for your daily tasks. Feel free to leave your comments or questions below. We will be more than glad to get back to you as soon as possible. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-package-management/ + +作者:[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/dpkg-command-examples/ +[2]:http://www.tecmint.com/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management/ +[3]:http://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/ +[4]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[5]:http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ \ No newline at end of file From e07871e6e337a534fa779edab8cbf90a275f9fa3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 18 Aug 2015 17:04:51 +0800 Subject: [PATCH 1779/2517] =?UTF-8?q?20150818-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Limits--IBM Launch LinuxONE Mainframes.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md diff --git a/sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md b/sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md new file mode 100644 index 0000000000..f97c690e3a --- /dev/null +++ b/sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md @@ -0,0 +1,52 @@ +Linux Without Limits: IBM Launch LinuxONE Mainframes +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/Screenshot-2015-08-17-at-12.58.10.png) + +LinuxONE Emperor MainframeGood news for Ubuntu’s server team today as [IBM launch the LinuxONE][1] a Linux-only mainframe that is also able to run Ubuntu. + +The largest of the LinuxONE systems launched by IBM is called ‘Emperor’ and can scale up to 8000 virtual machines or tens of thousands of containers – a possible record for any one single Linux system. + +The LinuxONE is described by IBM as a ‘game changer’ that ‘unleashes the potential of Linux for business’. + +IBM and Canonical are working together on the creation of an Ubuntu distribution for LinuxONE and other IBM z Systems. Ubuntu will join RedHat and SUSE as ‘premier Linux distributions’ on IBM z. + +Alongside the ‘Emperor’ IBM is also offering the LinuxONE Rockhopper, a smaller mainframe for medium-sized businesses and organisations. + +IBM is the market leader in mainframes and commands over 90% of the mainframe market. + +注:youtube 视频 + + +### What Is a Mainframe Computer Used For? ### + +The computer you’re reading this article on would be dwarfed by a ‘big iron’ mainframe. They are large, hulking great cabinets packed full of high-end components, custom designed technology and dizzying amounts of storage (that is data storage, not ample room for pens and rulers). + +Mainframes computers are used by large organizations and businesses to process and store large amounts of data, crunch through statistics, and handle large-scale transaction processing. + +### ‘World’s Fastest Processor’ ### + +IBM has teamed up with Canonical Ltd to use Ubuntu on the LinuxONE and other IBM z Systems. + +The LinuxONE Emperor uses the IBM z13 processor. The chip, announced back in January, is said to be the world’s fastest microprocessor. It is able to deliver transaction response times in the milliseconds. + +But as well as being well equipped to handle for high-volume mobile transactions, the z13 inside the LinuxONE is also an ideal cloud system. + +It can handle more than 50 virtual servers per core for a total of 8000 virtual servers, making it a cheaper, greener and more performant way to scale-out to the cloud. + +**You don’t have to be a CIO or mainframe spotter to appreciate this announcement. The possibilities LinuxONE provides are clear enough. ** + +Source: [Reuters (h/t @popey)][2] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/08/ibm-linuxone-mainframe-ubuntu-partnership + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www-03.ibm.com/systems/z/announcement.html +[2]:http://www.reuters.com/article/2015/08/17/us-ibm-linuxone-idUSKCN0QM09P20150817 \ No newline at end of file From bb62496b06ad16f7baf2c1a992b84d7f73b156c7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 18 Aug 2015 17:29:00 +0800 Subject: [PATCH 1780/2517] =?UTF-8?q?20150818-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...After More than 8 Years--See Comparison.md | 344 ++++++++++++++++++ ... 22 Years of Journey and Still Counting.md | 109 ++++++ ...k quotes from the command line on Linux.md | 99 +++++ 3 files changed, 552 insertions(+) create mode 100644 sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md create mode 100644 sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md create mode 100644 sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md diff --git a/sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md b/sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md new file mode 100644 index 0000000000..cf472613c4 --- /dev/null +++ b/sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md @@ -0,0 +1,344 @@ +A Linux User Using ‘Windows 10′ After More than 8 Years – See Comparison +================================================================================ +Windows 10 is the newest member of windows NT family of which general availability was made on July 29, 2015. It is the successor of Windows 8.1. Windows 10 is supported on Intel Architecture 32 bit, AMD64 and ARMv7 processors. + +![Windows 10 and Linux Comparison](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-vs-Linux.jpg) + +Windows 10 and Linux Comparison + +As a Linux-user for more than 8 continuous years, I thought to test Windows 10, as it is making a lots of news these days. This article is a breakthrough of my observation. I will be seeing everything from the perspective of a Linux user so you may find it a bit biased towards Linux but with absolutely no false information. + +1. I searched Google with the text “download windows 10” and clicked the first link. + +![Search Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Windows-10.jpg) + +Search Windows 10 + +You may directly go to link : [https://www.microsoft.com/en-us/software-download/windows10ISO][1] + +2. I was supposed to select a edition from ‘windows 10‘, ‘windows 10 KN‘, ‘windows 10 N‘ and ‘windows 10 single language‘. + +![Select Windows 10 Edition](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Windows-10-Edition.jpg) + +Select Windows 10 Edition + +For those who want to know details of different editions of Windows 10, here is the brief details of editions. + +- Windows 10 – Contains everything offered by Microsoft for this OS. +- Windows 10N – This edition comes without Media-player. +- Windows 10KN – This edition comes without media playing capabilities. +- Windows 10 Single Language – Only one Language Pre-installed. + +3. I selected the first option ‘Windows 10‘ and clicked ‘Confirm‘. Then I was supposed to select a product language. I choose ‘English‘. + +I was provided with Two Download Links. One for 32-bit and other for 64-bit. I clicked 64-bit, as per my architecture. + +![Download Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Download-Windows-10.jpg) + +Download Windows 10 + +With my download speed (15Mbps), it took me 3 long hours to download it. Unfortunately there were no torrent file to download the OS, which could otherwise have made the overall process smooth. The OS iso image size is 3.8 GB. + +I could not find an image of smaller size but again the truth is there don’t exist net-installer image like things for Windows. Also there is no way to calculate hash value after the iso image has been downloaded. + +Wonder why so ignorance from windows on such issues. To verify if the iso is downloaded correctly I need to write the image to a disk or to a USB flash drive and then boot my system and keep my finger crossed till the setup is finished. + +Lets start. I made my USB flash drive bootable with the windows 10 iso using dd command, as: + + # dd if=/home/avi/Downloads/Win10_English_x64.iso of=/dev/sdb1 bs=512M; sync + +It took a few minutes to complete the process. I then rebooted the system and choose to boot from USB flash Drive in my UEFI (BIOS) settings. + +#### System Requirements #### + +If you are upgrading + +- Upgrade supported only from Windows 7 SP1 or Windows 8.1 + +If you are fresh Installing + +- Processor: 1GHz or faster +- RAM : 1GB and Above(32-bit), 2GB and Above(64-bit) +- HDD: 16GB and Above(32-bit), 20GB and Above(64-bit) +- Graphic card: DirectX 9 or later + WDDM 1.0 Driver + +### Installation of Windows 10 ### + +1. Windows 10 boots. Yet again they changed the logo. Also no information on whats going on. + +![Windows 10 Logo](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Logo.jpg) + +Windows 10 Logo + +2. Selected Language to install, Time & currency format and keyboard & Input methods before clicking Next. + +![Select Language and Time](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Language-and-Time.jpg) + +Select Language and Time + +3. And then ‘Install Now‘ Menu. + +![Install Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Windows-10.jpg) + +Install Windows 10 + +4. The next screen is asking for Product key. I clicked ‘skip’. + +![Windows 10 Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Product-Key.jpg) + +Windows 10 Product Key + +5. Choose from a listed OS. I chose ‘windows 10 pro‘. + +![Select Install Operating System](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Operating-System.jpg) + +Select Install Operating System + +6. oh yes the license agreement. Put a check mark against ‘I accept the license terms‘ and click next. + +![Accept License](http://www.tecmint.com/wp-content/uploads/2015/08/Accept-License.jpg) + +Accept License + +7. Next was to upgrade (to windows 10 from previous versions of windows) and Install Windows. Don’t know why custom: Windows Install only is suggested as advanced by windows. Anyway I chose to Install windows only. + +![Select Installation Type](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Installation-Type.jpg) + +Select Installation Type + +8. Selected the file-system and clicked ‘next’. + +![Select Install Drive](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Install-Drive.jpg) + +Select Install Drive + +9. The installer started to copy files, getting files ready for installation, installing features, installing updates and finishing up. It would be better if the installer would have shown verbose output on the action is it taking. + +![Installing Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Installing-Windows.jpg) + +Installing Windows + +10. And then windows restarted. They said reboot was needed to continue. + +![Windows Installation Process](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Installation-Process.jpg) + +Windows Installation Process + +11. And then all I got was the below screen which reads “Getting Ready”. It took 5+ minutes at this point. No idea what was going on. No output. + +![Windows Getting Ready](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Getting-Ready.jpg) + +Windows Getting Ready + +12. yet again, it was time to “Enter Product Key”. I clicked “Do this later” and then used expressed settings. + +![Enter Product Key](http://www.tecmint.com/wp-content/uploads/2015/08/Enter-Product-Key.jpg) + +Enter Product Key + +![Select Express Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Express-Settings.jpg) + +Select Express Settings + +14. And then three more output screens, where I as a Linuxer expected that the Installer will tell me what it is doing but all in vain. + +![Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Loading-Windows.jpg) + +Loading Windows + +![Getting Updates](http://www.tecmint.com/wp-content/uploads/2015/08/Getting-Updates.jpg) + +Getting Updates + +![Still Loading Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Still-Loading-Windows.jpg) + +Still Loading Windows + +15. And then the installer wanted to know who owns this machine “My organization” or I myself. Chose “I own it” and then next. + +![Select Organization](http://www.tecmint.com/wp-content/uploads/2015/08/Select-Organization.jpg) + +Select Organization + +16. Installer prompted me to join “Azure Ad” or “Join a domain”, before I can click ‘continue’. I chooses the later option. + +![Connect Windows](http://www.tecmint.com/wp-content/uploads/2015/08/Connect-Windows.jpg) + +Connect Windows + +17. The Installer wants me to create an account. So I entered user_name and clicked ‘Next‘, I was expecting an error message that I must enter a password. + +![Create Account](http://www.tecmint.com/wp-content/uploads/2015/08/Create-Account.jpg) + +Create Account + +18. To my surprise Windows didn’t even showed warning/notification that I must create password. Such a negligence. Anyway I got my desktop. + +![Windows 10 Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Desktop.jpg) + +Windows 10 Desktop + +#### Experience of a Linux-user (Myself) till now #### + +- No Net-installer Image +- Image size too heavy +- No way to check the integrity of iso downloaded (no hash check) +- The booting and installation remains same as it was in XP, Windows 7 and 8 perhaps. +- As usual no output on what windows Installer is doing – What file copying or what package installing. +- Installation was straight forward and easy as compared to the installation of a Linux distribution. + +### Windows 10 Testing ### + +19. The default Desktop is clean. It has a recycle bin Icon on the default desktop. Search web directly from the desktop itself. Additionally icons for Task viewing, Internet browsing, folder browsing and Microsoft store is there. As usual notification bar is present on the bottom right to sum up desktop. + +![Deskop Shortcut Icons](http://www.tecmint.com/wp-content/uploads/2015/08/Deskop-Shortcut-icons.jpg) + +Deskop Shortcut Icons + +20. Internet Explorer replaced with Microsoft Edge. Windows 10 has replace the legacy web browser Internet Explorer also known as IE with Edge aka project spartan. + +![Microsoft Edge Browser](http://www.tecmint.com/wp-content/uploads/2015/08/Edge-browser.jpg) + +Microsoft Edge Browser + +It is fast at least as compared to IE (as it seems it testing). Familiar user Interface. The home screen contains news feed updates. There is also a search bar title that reads ‘Where to next?‘. The browser loads time is considerably low which result in improving overall speed and performance. The memory usages of Edge seems normal. + +![Windows Performance](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Performance.jpg) + +Windows Performance + +Edge has got cortana – Intelligent Personal Assistant, Support for chrome-extension, web Note – Take notes while Browsing, Share – Right from the tab without opening any other TAB. + +#### Experience of a Linux-user (Myself) on this point #### + +21. Microsoft has really improved web browsing. Lets see how stable and fine it remains. It don’t lag as of now. + +22. Though RAM usages by Edge was fine for me, a lots of users are complaining that Edge is notorious for Excessive RAM Usages. + +23. Difficult to say at this point if Edge is ready to compete with Chrome and/or Firefox at this point of time. Lets see what future unfolds. + +#### A few more Virtual Tour #### + +24. Start Menu redesigned – Seems clear and effective. Metro icons make it live. Populated with most commonly applications viz., Calendar, Mail, Edge, Photos, Contact, Temperature, Companion suite, OneNote, Store, Xbox, Music, Movies & TV, Money, News, Store, etc. + +![Windows Look and Feel](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Look.jpg) + +Windows Look and Feel + +In Linux on Gnome Desktop Environment, I use to search required applications simply by pressing windows key and then type the name of the application. + +![Search Within Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Search-Within-Desktop.jpg) + +Search Within Desktop + +25. File Explorer – seems clear Designing. Edges are sharp. In the left pane there is link to quick access folders. + +![Windows File Explorer](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-File-Explorer.jpg) + +Windows File Explorer + +Equally clear and effective file explorer on Gnome Desktop Environment on Linux. Removed UN-necessary graphics and images from icons is a plus point. + +![File Browser on Gnome](http://www.tecmint.com/wp-content/uploads/2015/08/File-Browser.jpg) + +File Browser on Gnome + +26. Settings – Though the settings are a bit refined on Windows 10, you may compare it with the settings on a Linux Box. + +**Settings on Windows** + +![Windows 10 Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Settings.jpg) + +Windows 10 Settings + +**Setting on Linux Gnome** + +![Gnome Settings](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Settings.jpg) + +Gnome Settings + +27. List of Applications – List of Application on Linux is better than what they use to provide (based upon my memory, when I was a regular windows user) but still it stands low as compared to how Gnome3 list application. + +**Application Listed by Windows** + +![Application List on Windows 10](http://www.tecmint.com/wp-content/uploads/2015/08/Application-List-on-Windows-10.jpg) + +Application List on Windows 10 + +**Application Listed by Gnome3 on Linux** + +![Gnome Application List on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Gnome-Application-List-on-Linux.jpg) + +Gnome Application List on Linux + +28. Virtual Desktop – Virtual Desktop feature of Windows 10 is one of those topic which are very much talked about these days. + +Here is the virtual Desktop in Windows 10. + +![Windows Virtual Desktop](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-Virtual-Desktop.jpg) + +Windows Virtual Desktop + +and the virtual Desktop on Linux we are using for more than 2 decades. + +![Virtual Desktop on Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Virtual-Desktop-on-Linux.jpg) + +Virtual Desktop on Linux + +#### A few other features of Windows 10 #### + +29. Windows 10 comes with wi-fi sense. It shares your password with others. Anyone who is in the range of your wi-fi and connected to you over Skype, Outlook, Hotmail or Facebook can be granted access to your wifi network. And mind it this feature has been added as a feature by microsoft to save time and hassle-free connection. + +In a reply to question raised by Tecmint, Microsoft said – The user has to agree to enable wifi sense, everytime on a new network. oh! What a pathetic taste as far as security is concerned. I am not convinced. + +30. Up-gradation from Windows 7 and Windows 8.1 is free though the retail cost of Home and pro editions are approximately $119 and $199 respectively. + +31. Microsoft released first cumulative update for windows 10, which is said to put system into endless crash loop for a few people. Windows perhaps don’t understand such problem or don’t want to work on that part don’t know why. + +32. Microsoft’s inbuilt utility to block/hide unwanted updates don’t work in my case. This means If a update is there, there is no way to block/hide it. Sorry windows users! + +#### A few features native to Linux that windows 10 have #### + +Windows 10 has a lots of features that were taken directly from Linux. If Linux were not released under GNU License perhaps Microsoft would never had the below features. + +33. Command-line package management – Yup! You heard it right. Windows 10 has a built-in package management. It works only in Windows Power Shell. OneGet is the official package manager for windows. Windows package manager in action. + +![Windows 10 Package Manager](http://www.tecmint.com/wp-content/uploads/2015/08/Windows-10-Package-Manager.jpg) + +Windows 10 Package Manager + +- Border-less windows +- Flat Icons +- Virtual Desktop +- One search for Online+offline search +- Convergence of mobile and desktop OS + +### Overall Conclusion ### + +- Improved responsiveness +- Well implemented Animation +- low on resource +- Improved battery life +- Microsoft Edge web-browser is rock solid +- Supported on Raspberry pi 2. +- It is good because windows 8/8.1 was not upto mark and really bad. +- It is a the same old wine in new bottle. Almost the same things with brushed up icons. + +What my testing suggest is Windows 10 has improved on a few things like look and feel (as windows always did), +1 for Project spartan, Virtual Desktop, Command-line package management, one search for online and offline search. It is overall an improved product but those who thinks that Windows 10 will prove to be the last nail in the coffin of Linux are mistaken. + +Linux is years ahead of Windows. Their approach is different. In near future windows won’t stand anywhere around Linux and there is nothing for which a Linux user need to go to Windows 10. + +That’s all for now. Hope you liked the post. I will be here again with another interesting post you people will love to read. Provide us with your valuable feedback in the comments below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/a-linux-user-using-windows-10-after-more-than-8-years-see-comparison/ + +作者:[vishek Kumar][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/avishek/ +[1]:https://www.microsoft.com/en-us/software-download/windows10ISO \ No newline at end of file diff --git a/sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md b/sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md new file mode 100644 index 0000000000..f74384b616 --- /dev/null +++ b/sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md @@ -0,0 +1,109 @@ +Debian GNU/Linux Birthday : A 22 Years of Journey and Still Counting… +================================================================================ +On 16th August 2015, the Debian project has celebrated its 22nd anniversary, making it one of the oldest popular distribution in open source world. Debian project was conceived and founded in the year 1993 by Ian Murdock. By that time Slackware had already made a remarkable presence as one of the earliest Linux Distribution. + +![Happy 22nd Birthday to Debian](http://www.tecmint.com/wp-content/uploads/2014/08/Debian-22nd-Birthday.png) + +Happy 22nd Birthday to Debian Linux + +Ian Ashley Murdock, an American Software Engineer by profession, conceived the idea of Debian project, when he was a student of Purdue University. He named the project Debian after the name of his then-girlfriend Debra Lynn (Deb) and his name. He later married her and then got divorced in January 2008. + +![Ian Murdock](http://www.tecmint.com/wp-content/uploads/2014/08/Ian-Murdock.jpeg) + +Debian Creator: Ian Murdock + +Ian is currently serving as Vice President of Platform and Development Community at ExactTarget. + +Debian (as Slackware) was the result of unavailability of up-to mark Linux Distribution, that time. Ian in an interview said – “Providing the first class Product without profit would be the sole aim of Debian Project. Even Linux was not reliable and up-to mark that time. I Remember…. Moving files between file-system and dealing with voluminous file would often result in Kernel Panic. However the project Linux was promising. The availability of Source Code freely and the potential it seemed was qualitative.” + +I remember … like everyone else I wanted to solve problem, run something like UNIX at home, but it was not possible…neither financially nor legally, in the other sense . Then I come to know about GNU kernel Development and its non-association with any kind of legal issues, he added. He was sponsored by Free Software Foundation (FSF) in the early days when he was working on Debian, it also helped Debian to take a giant step though Ian needed to finish his degree and hence quited FSF roughly after one year of sponsorship. + +### Debian Development History ### + +- **Debian 0.01 – 0.09** : Released between August 1993 – December 1993. +- **Debian 0.91 ** – Released in January 1994 with primitive package system, No dependencies. +- **Debian 0.93 rc5** : March 1995. It is the first modern release of Debian, dpkg was used to install and maintain packages after base system installation. +- **Debian 0.93 rc6**: Released in November 1995. It was last a.out release, deselect made an appearance for the first time – 60 developers were maintaining packages, then at that time. +- **Debian 1.1**: Released in June 1996. Code name – Buzz, Packages count – 474, Package Manager dpkg, Kernel 2.0, ELF. +- **Debian 1.2**: Released in December 1996. Code name – Rex, Packages count – 848, Developers Count – 120. +- **Debian 1.3**: Released in July 1997. Code name – Bo, package count 974, Developers count – 200. +- **Debian 2.0**: Released in July 1998. Code name: Hamm, Support for architecture – Intel i386 and Motorola 68000 series, Number of Packages: 1500+, Number of Developers: 400+, glibc included. +- **Debian 2.1**: Released on March 09, 1999. Code name – slink, support architecture Alpha and Sparc, apt came in picture, Number of package – 2250. +- **Debian 2.2**: Released on August 15, 2000. Code name – Potato, Supported architecture – Intel i386, Motorola 68000 series, Alpha, SUN Sparc, PowerPC and ARM architecture. Number of packages: 3900+ (binary) and 2600+ (Source), Number of Developers – 450. There were a group of people studied and came with an article called Counting potatoes, which shows – How a free software effort could lead to a modern operating system despite all the issues around it. +- **Debian 3.0** : Released on July 19th, 2002. Code name – woody, Architecture supported increased– HP, PA_RISC, IA-64, MIPS and IBM, First release in DVD, Package Count – 8500+, Developers Count – 900+, Cryptography. +- **Debian 3.1**: Release on June 6th, 2005. Code name – sarge, Architecture support – same as woody + AMD64 – Unofficial Port released, Kernel – 2.4 qnd 2.6 series, Number of Packages: 15000+, Number of Developers : 1500+, packages like – OpenOffice Suite, Firefox Browser, Thunderbird, Gnome 2.8, kernel 3.3 Advanced Installation Support: RAID, XFS, LVM, Modular Installer. +- **Debian 4.0**: Released on April 8th, 2007. Code name – etch, architecture support – same as sarge, included AMD64. Number of packages: 18,200+ Developers count : 1030+, Graphical Installer. +- **Debian 5.0**: Released on February 14th, 2009. Code name – lenny, Architecture Support – Same as before + ARM. Number of packages: 23000+, Developers Count: 1010+. +- **Debian 6.0** : Released on July 29th, 2009. Code name – squeeze, Package included : kernel 2.6.32, Gnome 2.3. Xorg 7.5, DKMS included, Dependency-based. Architecture : Same as pervious + kfreebsd-i386 and kfreebsd-amd64, Dependency based booting. +- **Debian 7.0**: Released on may 4, 2013. Code name: wheezy, Support for Multiarch, Tools for private cloud, Improved Installer, Third party repo need removed, full featured multimedia-codec, Kernel 3.2, Xen Hypervisor 4.1.4 Package Count: 37400+. +- **Debian 8.0**: Released on May 25, 2015 and Code name: Jessie, Systemd as the default init system, powered by Kernel 3.16, fast booting, cgroups for services, possibility of isolating part of the services, 43000+ packages. Sysvinit init system available in Jessie. + +**Note**: Linux Kernel initial release was on October 05, 1991 and Debian initial release was on September 15, 1993. So, Debian is there for 22 Years running Linux Kernel which is there for 24 years. + +### Debian Facts ### + +Year 1994 was spent on organizing and managing Debian project so that it would be easy for others to contribute. Hence no release for users were made this year however there were certain internal release. + +Debian 1.0 was never released. A CDROM manufacturer company by mistakenly labelled an unreleased version as Debian 1.0. Hence to avoid confusion Debian 1.0 was released as Debian 1.1 and since then only the concept of official CDROM images came into existence. + +Each release of Debian is a character of Toy Story. + +Debian remains available in old stable, stable, testing and experimental, all the time. + +The Debian Project continues to work on the unstable distribution (codenamed sid, after the evil kid from the Toy Story). Sid is the permanent name for the unstable distribution and is remains ‘Still In Development’. The testing release is intended to become the next stable release and is currently codenamed jessie. + +Debian official distribution includes only Free and OpenSource Software and nothing else. However the availability of contrib and Non-free Packages makes it possible to install those packages which are free but their dependencies are not licensed free (contrib) and Packages licensed under non-free softwares. + +Debian is the mother of a lot of Linux distribution. Some of these Includes: + +- Damn Small Linux +- KNOPPIX +- Linux Advanced +- MEPIS +- Ubuntu +- 64studio (No more active) +- LMDE + +Debian is the world’s largest non commercial Linux Distribution. It is written in C (32.1%) programming language and rest in 70 other languages. + +![Debian Contribution](http://www.tecmint.com/wp-content/uploads/2014/08/Debian-Programming.png) + +Debian Contribution + +Image Source: [Xmodulo][1] + +Debian project contains 68.5 million actual loc (lines of code) + 4.5 million lines of comments and white spaces. + +International Space station dropped Windows & Red Hat for adopting Debian – These astronauts are using one release back – now “squeeze” for stability and strength from community. + +Thank God! Who would have heard the scream from space on Windows Metro Screen :P + +#### The Black Wednesday #### + +On November 20th, 2002 the University of Twente Network Operation Center (NOC) caught fire. The fire department gave up protecting the server area. NOC hosted satie.debian.org which included Security, non-US archive, New Maintainer, quality assurance, databases – Everything was turned to ashes. Later these services were re-built by debian. + +#### The Future Distro #### + +Next in the list is Debian 9, code name – Stretch, what it will have is yet to be revealed. The best is yet to come, Just Wait for it! + +A lot of distribution made an appearance in Linux Distro genre and then disappeared. In most cases managing as it gets bigger was a concern. But certainly this is not the case with Debian. It has hundreds of thousands of developer and maintainer all across the globe. It is a one Distro which was there from the initial days of Linux. + +The contribution of Debian in Linux ecosystem can’t be measured in words. If there had been no Debian, Linux would not have been so rich and user-friendly. Debian is among one of the disto which is considered highly reliable, secure and stable and a perfect choice for Web Servers. + +That’s the beginning of Debian. It came a long way and still going. The Future is Here! The world is here! If you have not used Debian till now, What are you Waiting for. Just Download Your Image and get started, we will be here if you get into trouble. + +- [Debian Homepage][2] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/happy-birthday-to-debian-gnu-linux/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://xmodulo.com/2013/08/interesting-facts-about-debian-linux.html +[2]:https://www.debian.org/ \ No newline at end of file diff --git a/sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md b/sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md new file mode 100644 index 0000000000..662ac1eb84 --- /dev/null +++ b/sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md @@ -0,0 +1,99 @@ +How to monitor stock quotes from the command line on Linux +================================================================================ +If you are one of those stock investors or traders, monitoring the stock market will be one of your daily routines. Most likely you will be using an online trading platform which comes with some fancy real-time charts and all sort of advanced stock analysis and tracking tools. While such sophisticated market research tools are a must for any serious stock investors to read the market, monitoring the latest stock quotes still goes a long way to build a profitable portfolio. + +If you are a full-time system admin constantly sitting in front of terminals while trading stocks as a hobby during the day, a simple command-line tool that shows real-time stock quotes will be a blessing for you. + +In this tutorial, let me introduce a neat command-line tool that allows you to monitor stock quotes from the command line on Linux. + +This tool is called [Mop][1]. Written in Go, this lightweight command-line tool is extremely handy for tracking the latest stock quotes from the U.S. markets. You can easily customize the list of stocks to monitor, and it shows the latest stock quotes in ncurses-based, easy-to-read interface. + +**Note**: Mop obtains the latest stock quotes via Yahoo! Finance API. Be aware that their stock quotes are known to be delayed by 15 minutes. So if you are looking for "real-time" stock quotes with zero delay, Mop is not a tool for you. Such "live" stock quote feeds are usually available for a fee via some proprietary closed-door interface. With that being said, let's see how you can use Mop under Linux environment. + +### Install Mop on Linux ### + +Since Mop is implemented in Go, you will need to install Go language first. If you don't have Go installed, follow [this guide][2] to install Go on your Linux platform. Make sure to set GOPATH environment variable as described in the guide. + +Once Go is installed, proceed to install Mop as follows. + +**Debian, Ubuntu or Linux Mint** + + $ sudo apt-get install git + $ go get github.com/michaeldv/mop + $ cd $GOPATH/src/github.com/michaeldv/mop + $ make install + +Fedora, CentOS, RHEL + + $ sudo yum install git + $ go get github.com/michaeldv/mop + $ cd $GOPATH/src/github.com/michaeldv/mop + $ make install + +The above commands will install Mop under $GOPATH/bin. + +Now edit your .bashrc to include $GOPATH/bin in your PATH variable. + + export PATH="$PATH:$GOPATH/bin" + +---------- + + $ source ~/.bashrc + +### Monitor Stock Quotes from the Command Line with Mop ### + +To launch Mod, simply run the command called cmd. + + $ cmd + +At the first launch, you will see a few stock tickers which Mop comes pre-configured with. + +![](https://farm6.staticflickr.com/5749/20018949104_c8c64e0e06_c.jpg) + +The quotes show information like the latest price, %change, daily low/high, 52-week low/high, dividend, and annual yield. Mop obtains market overview information from [CNN][3], and individual stock quotes from [Yahoo Finance][4]. The stock quote information updates itself within the terminal periodically. + +### Customize Stock Quotes in Mop ### + +Let's try customizing the stock list. Mop provides easy-to-remember shortcuts for this: '+' to add a new stock, and '-' to remove a stock. + +To add a new stock, press '+', and type a stock ticker symbol to add (e.g., MSFT). You can add more than one stock at once by typing a comma-separated list of tickers (e.g., "MSFT, AMZN, TSLA"). + +![](https://farm1.staticflickr.com/636/20648164441_642ae33a22_c.jpg) + +Removing stocks from the list can be done similarly by pressing '-'. + +### Sort Stock Quotes in Mop ### + +You can sort the stock quote list based on any column. To sort, press 'o', and use left/right key to choose the column to sort by. When a particular column is chosen, you can sort the list either in increasing order or in decreasing order by pressing ENTER. + +![](https://farm1.staticflickr.com/724/20648164481_15631eefcf_c.jpg) + +By pressing 'g', you can group your stocks based on whether they are advancing or declining for the day. Advancing issues are represented in green color, while declining issues are colored in white. + +![](https://c2.staticflickr.com/6/5633/20615252696_a5bd44d3aa_b.jpg) + +If you want to access help page, simply press '?'. + +![](https://farm1.staticflickr.com/573/20632365342_da196b657f_c.jpg) + +### Conclusion ### + +As you can see, Mop is a lightweight, yet extremely handy stock monitoring tool. Of course you can easily access stock quotes information elsewhere, from online websites, your smartphone, etc. However, if you spend a great deal of your time in a terminal environment, Mop can easily fit in to your workspace, hopefully without distracting must of your workflow. Just let it run and continuously update market date in one of your terminals, and be done with it. + +Happy trading! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/monitor-stock-quotes-command-line-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]:https://github.com/michaeldv/mop +[2]:http://ask.xmodulo.com/install-go-language-linux.html +[3]:http://money.cnn.com/data/markets/ +[4]:http://finance.yahoo.com/ \ No newline at end of file From 95631da14d2cff6bfb59aee4227d291999a3b4f6 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 18 Aug 2015 17:34:47 +0800 Subject: [PATCH 1781/2517] =?UTF-8?q?20150818-4=20=E9=80=89=E9=A2=98=20?= =?UTF-8?q?=E5=8F=A6=E4=B8=80=E7=AF=87=20IBM=20=E7=9A=84=E5=A4=87=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Ubuntu Linux is coming to IBM mainframes.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md diff --git a/sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md b/sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md new file mode 100644 index 0000000000..8da7227eee --- /dev/null +++ b/sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md @@ -0,0 +1,46 @@ +​Ubuntu Linux is coming to IBM mainframes +================================================================================ +SEATTLE -- It's finally happened. At [LinuxCon][1], IBM and [Canonical][2] announced that [Ubuntu Linux][3] will soon be running on IBM mainframes. + +![](http://zdnet2.cbsistatic.com/hub/i/2015/08/17/f389e12f-03f5-48cc-8019-af4ccf6c6ecd/f15b099e439c0e3a5fd823637d4bcf87/ubuntu-mainframe.jpg) + +You'll soon to be able to get your IBM mainframe in Ubuntu Linux orange + +According to Ross Mauri, IBM's General Manager of System z, and Mark Shuttleworth, Canonical and Ubuntu's founder, this move came about because of customer demand. For over a decade, [Red Hat Enterprise Linux (RHEL)][4] and [SUSE Linux Enterprise Server (SLES)][5] were the only supported IBM mainframe Linux distributions. + +As Ubuntu matured, more and more businesses turned to it for the enterprise Linux, and more and more of them wanted it on IBM big iron hardware. In particular, banks wanted Ubuntu there. Soon, financial CIOs will have their wish granted. + +In an interview Shuttleworth said that Ubuntu Linux will be available on the mainframe by April 2016 in the next long-term support version of Ubuntu: Ubuntu 16.04. Canonical and IBM already took the first move in this direction in late 2014 by bringing [Ubuntu to IBM's POWER][6] architecture. + +Before that, Canonical and IBM almost signed the dotted line to bring [Ubuntu to IBM mainframes in 2011][7] but that deal was never finalized. This time, it's happening. + +Jane Silber, Canonical's CEO, explained in a statement, "Our [expansion of Ubuntu platform][8] support to [IBM z Systems][9] is a recognition of the number of customers that count on z Systems to run their businesses, and the maturity the hybrid cloud is reaching in the marketplace. + +**Silber continued:** + +> With support of z Systems, including [LinuxONE][10], Canonical is also expanding our relationship with IBM, building on our support for the POWER architecture and OpenPOWER ecosystem. Just as Power Systems clients are now benefiting from the scaleout capabilities of Ubuntu, and our agile development process which results in first to market support of new technologies such as CAPI (Coherent Accelerator Processor Interface) on POWER8, z Systems clients can expect the same rapid rollout of technology advancements, and benefit from [Juju][11] and our other cloud tools to enable faster delivery of new services to end users. In addition, our collaboration with IBM includes the enablement of scale-out deployment of many IBM software solutions with Juju Charms. Mainframe clients will delight in having a wealth of 'charmed' IBM solutions, other software provider products, and open source solutions, deployable on mainframes via Juju. + +Shuttleworth expects Ubuntu on z to be very successful. "It's blazingly fast, and with its support for OpenStack, people who want exceptional cloud region performance will be very happy. + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/ubuntu-linux-is-coming-to-the-mainframe/#ftag=RSSbaffb68 + +作者:[Steven J. Vaughan-Nichols][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.zdnet.com/meet-the-team/us/steven-j-vaughan-nichols/ +[1]:http://events.linuxfoundation.org/events/linuxcon-north-america +[2]:http://www.canonical.com/ +[3]:http://www.ubuntu.comj/ +[4]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[5]:https://www.suse.com/products/server/ +[6]:http://www.zdnet.com/article/ibm-doubles-down-on-linux/ +[7]:http://www.zdnet.com/article/mainframe-ubuntu-linux/ +[8]:https://insights.ubuntu.com/2015/08/17/ibm-and-canonical-plan-ubuntu-support-on-ibm-z-systems-mainframe/ +[9]:http://www-03.ibm.com/systems/uk/z/ +[10]:http://www.zdnet.com/article/linuxone-ibms-new-linux-mainframes/ +[11]:https://jujucharms.com/ \ No newline at end of file From 6d3282d2b50edc9a671187069efdcb768c4d761e Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 18 Aug 2015 17:41:53 +0800 Subject: [PATCH 1782/2517] =?UTF-8?q?20150818-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ity Components Live Container Migration.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 sources/talk/20150818 Docker Working on Security Components Live Container Migration.md diff --git a/sources/talk/20150818 Docker Working on Security Components Live Container Migration.md b/sources/talk/20150818 Docker Working on Security Components Live Container Migration.md new file mode 100644 index 0000000000..ad974b4859 --- /dev/null +++ b/sources/talk/20150818 Docker Working on Security Components Live Container Migration.md @@ -0,0 +1,53 @@ +Docker Working on Security Components, Live Container Migration +================================================================================ +![Docker Container Talk](http://www.eweek.com/imagesvr_ce/1905/290x195DockerMarianna.jpg) + +**Docker developers take the stage at Containercon and discuss their work on future container innovations for security and live migration.** + +SEATTLE—Containers are one of the hottest topics in IT today and at the Linuxcon USA event here there is a co-located event called Containercon, dedicated to this virtualization technology. + +Docker, the lead commercial sponsor of the open-source Docker effort brought three of its top people to the keynote stage today, but not Docker founder Solomon Hykes. + +Hykes who delivered a Linuxcon keynote in 2014 was in the audience though, as Senior Vice President of Engineering Marianna Tessel, Docker security chief Diogo Monica and Docker chief maintainer Michael Crosby presented what's new and what's coming in Docker. + +Tessel emphasized that Docker is very real today and used in production environments at some of the largest organizations on the planet, including the U.S. Government. Docker also is working in small environments too, including the Raspberry Pi small form factor ARM computer, which now can support up to 2,300 containers on a single device. + +"We're getting more powerful and at the same time Docker will also get simpler to use," Tessel said. + +As a metaphor, Tessel said that the whole Docker experience is much like a cruise ship, where there is powerful and complex machinery that powers the ship, yet the experience for passengers is all smooth sailing. + +One area that Docker is trying to make easier is security. Tessel said that security is mind-numbingly complex for most people as organizations constantly try to avoid network breaches. + +That's where Docker Content Trust comes into play, which is a configurable feature in the recent Docker 1.8 release. Diogo Mónica, security lead for Docker joined Tessel on stage and said that security is a hard topic, which is why Docker content trust is being developed. + +With Docker Content Trust there is a verifiable way to make sure that a given Docker application image is authentic. There also are controls to limit fraud and potential malicious code injection by verifying application freshness. + +To prove his point, Monica did a live demonstration of what could happen if Content Trust is not enabled. In one instance, a Website update is manipulated to allow the demo Web app to be defaced. When Content Trust is enabled, the hack didn't work and was blocked. + +"Don't let the simple demo fool you," Tessel said. "You have seen the best security possible." + +One area where containers haven't been put to use before is for live migration, which on VMware virtual machines is a technology called vMotion. It's an area that Docker is currently working on. + +Docker chief maintainer Michael Crosby did an onstage demonstration of a live migration of Docker containers. Crosby referred to the approach as checkpoint and restore, where a running container gets a checkpoint snapshot and is then restored to another location. + +A container also can be cloned and then run in another location. Crosby humorously referred to his cloned container as "Dolly," a reference to the world's first cloned animal, Dolly the sheep. + +Tessel also took time to talk about the RunC component of containers, which is now a technology component that is being developed by the Open Containers Initiative as a multi-stakeholder process. With RunC, containers expand beyond Linux to multiple operating systems including Windows and Solaris. + +Overall, Tessel said that she can't predict the future of Docker, though she is very optimistic. + +"I'm not sure what the future is, but I'm sure it'll be out of this world," Tessel said. + +Sean Michael Kerner is a senior editor at eWEEK and InternetNews.com. Follow him on Twitter @TechJournalist. + +-------------------------------------------------------------------------------- + +via: http://www.eweek.com/virtualization/docker-working-on-security-components-live-container-migration.html + +作者:[Sean Michael Kerner][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.eweek.com/cp/bio/Sean-Michael-Kerner/ \ No newline at end of file From 4d084a2f3144ab58cf65b7f540a5058e97c85d65 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 18 Aug 2015 22:36:23 +0800 Subject: [PATCH 1783/2517] [Translated]RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md --- ...to Configure and Encrypt System Storage.md | 271 ------------------ ...to Configure and Encrypt System Storage.md | 269 +++++++++++++++++ 2 files changed, 269 insertions(+), 271 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md b/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md deleted file mode 100644 index 0e631ce37d..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md +++ /dev/null @@ -1,271 +0,0 @@ -FSSlc translating - -RHCSA Series: Using ‘Parted’ and ‘SSM’ to Configure and Encrypt System Storage – Part 6 -================================================================================ -In this article we will discuss how to set up and configure local system storage in Red Hat Enterprise Linux 7 using classic tools and introducing the System Storage Manager (also known as SSM), which greatly simplifies this task. - -![Configure and Encrypt System Storage](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-and-Encrypt-System-Storage.png) - -RHCSA: Configure and Encrypt System Storage – Part 6 - -Please note that we will present this topic in this article but will continue its description and usage on the next one (Part 7) due to vastness of the subject. - -### Creating and Modifying Partitions in RHEL 7 ### - -In RHEL 7, parted is the default utility to work with partitions, and will allow you to: - -- Display the current partition table -- Manipulate (increase or decrease the size of) existing partitions -- Create partitions using free space or additional physical storage devices - -It is recommended that before attempting the creation of a new partition or the modification of an existing one, you should ensure that none of the partitions on the device are in use (`umount /dev/partition`), and if you’re using part of the device as swap you need to disable it (`swapoff -v /dev/partition`) during the process. - -The easiest way to do this is to boot RHEL in rescue mode using an installation media such as a RHEL 7 installation DVD or USB (Troubleshooting → Rescue a Red Hat Enterprise Linux system) and Select Skip when you’re prompted to choose an option to mount the existing Linux installation, and you will be presented with a command prompt where you can start typing the same commands as shown as follows during the creation of an ordinary partition in a physical device that is not being used. - -![RHEL 7 Rescue Mode](http://www.tecmint.com/wp-content/uploads/2015/04/RHEL-7-Rescue-Mode.png) - -RHEL 7 Rescue Mode - -To start parted, simply type. - - # parted /dev/sdb - -Where `/dev/sdb` is the device where you will create the new partition; next, type print to display the current drive’s partition table: - -![Creat New Partition](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Partition.png) - -Creat New Partition - -As you can see, in this example we are using a virtual drive of 5 GB. We will now proceed to create a 4 GB primary partition and then format it with the xfs filesystem, which is the default in RHEL 7. - -You can choose from a variety of file systems. You will need to manually create the partition with mkpart and then format it with mkfs.fstype as usual because mkpart does not support many modern filesystems out-of-the-box. - -In the following example we will set a label for the device and then create a primary partition `(p)` on `/dev/sdb`, which starts at the 0% percentage of the device and ends at 4000 MB (4 GB): - -![Set Partition Name in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Label-Partition.png) - -Label Partition Name - -Next, we will format the partition as xfs and print the partition table again to verify that changes were applied: - - # mkfs.xfs /dev/sdb1 - # parted /dev/sdb print - -![Format Partition in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Format-Partition-in-Linux.png) - -Format Partition as XFS Filesystem - -For older filesystems, you could use the resize command in parted to resize a partition. Unfortunately, this only applies to ext2, fat16, fat32, hfs, linux-swap, and reiserfs (if libreiserfs is installed). - -Thus, the only way to resize a partition is by deleting it and creating it again (so make sure you have a good backup of your data!). No wonder the default partitioning scheme in RHEL 7 is based on LVM. - -To remove a partition with parted: - - # parted /dev/sdb print - # parted /dev/sdb rm 1 - -![Remove Partition in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Partition-in-Linux.png) - -Remove or Delete Partition - -### The Logical Volume Manager (LVM) ### - -Once a disk has been partitioned, it can be difficult or risky to change the partition sizes. For that reason, if we plan on resizing the partitions on our system, we should consider the possibility of using LVM instead of the classic partitioning system, where several physical devices can form a volume group that will host a defined number of logical volumes, which can be expanded or reduced without any hassle. - -In simple terms, you may find the following diagram useful to remember the basic architecture of LVM. - -![Basic Architecture of LVM](http://www.tecmint.com/wp-content/uploads/2015/04/LVM-Diagram.png) - -Basic Architecture of LVM - -#### Creating Physical Volumes, Volume Group and Logical Volumes #### - -Follow these steps in order to set up LVM using classic volume management tools. Since you can expand this topic reading the [LVM series on this site][1], I will only outline the basic steps to set up LVM, and then compare them to implementing the same functionality with SSM. - -**Note**: That we will use the whole disks `/dev/sdb` and `/dev/sdc` as PVs (Physical Volumes) but it’s entirely up to you if you want to do the same. - -**1. Create partitions `/dev/sdb1` and `/dev/sdc1` using 100% of the available disk space in /dev/sdb and /dev/sdc:** - - # parted /dev/sdb print - # parted /dev/sdc print - -![Create New Partitions](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Partitions.png) - -Create New Partitions - -**2. Create 2 physical volumes on top of /dev/sdb1 and /dev/sdc1, respectively.** - - # pvcreate /dev/sdb1 - # pvcreate /dev/sdc1 - -![Create Two Physical Volumes](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Physical-Volumes.png) - -Create Two Physical Volumes - -Remember that you can use pvdisplay /dev/sd{b,c}1 to show information about the newly created PVs. - -**3. Create a VG on top of the PV that you created in the previous step:** - - # vgcreate tecmint_vg /dev/sd{b,c}1 - -![Create Volume Group in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Volume-Group.png) - -Create Volume Group - -Remember that you can use vgdisplay tecmint_vg to show information about the newly created VG. - -**4. Create three logical volumes on top of VG tecmint_vg, as follows:** - - # lvcreate -L 3G -n vol01_docs tecmint_vg [vol01_docs → 3 GB] - # lvcreate -L 1G -n vol02_logs tecmint_vg [vol02_logs → 1 GB] - # lvcreate -l 100%FREE -n vol03_homes tecmint_vg [vol03_homes → 6 GB] - -![Create Logical Volumes in LVM](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Logical-Volumes.png) - -Create Logical Volumes - -Remember that you can use lvdisplay tecmint_vg to show information about the newly created LVs on top of VG tecmint_vg. - -**5. Format each of the logical volumes with xfs (do NOT use xfs if you’re planning on shrinking volumes later!):** - - # mkfs.xfs /dev/tecmint_vg/vol01_docs - # mkfs.xfs /dev/tecmint_vg/vol02_logs - # mkfs.xfs /dev/tecmint_vg/vol03_homes - -**6. Finally, mount them:** - - # mount /dev/tecmint_vg/vol01_docs /mnt/docs - # mount /dev/tecmint_vg/vol02_logs /mnt/logs - # mount /dev/tecmint_vg/vol03_homes /mnt/homes - -#### Removing Logical Volumes, Volume Group and Physical Volumes #### - -**7. Now we will reverse the LVM implementation and remove the LVs, the VG, and the PVs:** - - # lvremove /dev/tecmint_vg/vol01_docs - # lvremove /dev/tecmint_vg/vol02_logs - # lvremove /dev/tecmint_vg/vol03_homes - # vgremove /dev/tecmint_vg - # pvremove /dev/sd{b,c}1 - -**8. Now let’s install SSM and we will see how to perform the above in ONLY 1 STEP!** - - # yum update && yum install system-storage-manager - -We will use the same names and sizes as before: - - # ssm create -s 3G -n vol01_docs -p tecmint_vg --fstype ext4 /mnt/docs /dev/sd{b,c}1 - # ssm create -s 1G -n vol02_logs -p tecmint_vg --fstype ext4 /mnt/logs /dev/sd{b,c}1 - # ssm create -n vol03_homes -p tecmint_vg --fstype ext4 /mnt/homes /dev/sd{b,c}1 - -Yes! SSM will let you: - -- initialize block devices as physical volumes -- create a volume group -- create logical volumes -- format LVs, and -- mount them using only one command - -**9. We can now display the information about PVs, VGs, or LVs, respectively, as follows:** - - # ssm list dev - # ssm list pool - # ssm list vol - -![Check Information of PVs, VGs, or LVs](http://www.tecmint.com/wp-content/uploads/2015/04/Display-LVM-Information.png) - -Check Information of PVs, VGs, or LVs - -**10. As we already know, one of the distinguishing features of LVM is the possibility to resize (expand or decrease) logical volumes without downtime.** - -Say we are running out of space in vol02_logs but have plenty of space in vol03_homes. We will resize vol03_homes to 4 GB and expand vol02_logs to use the remaining space: - - # ssm resize -s 4G /dev/tecmint_vg/vol03_homes - -Run ssm list pool again and take note of the free space in tecmint_vg: - -![Check Volume Size](http://www.tecmint.com/wp-content/uploads/2015/04/Check-LVM-Free-Space.png) - -Check Volume Size - -Then do: - - # ssm resize -s+1.99 /dev/tecmint_vg/vol02_logs - -**Note**: that the plus sign after the -s flag indicates that the specified value should be added to the present value. - -**11. Removing logical volumes and volume groups is much easier with ssm as well. A simple,** - - # ssm remove tecmint_vg - -will return a prompt asking you to confirm the deletion of the VG and the LVs it contains: - -![Remove Logical Volume and Volume Group](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-LV-VG.png) - -Remove Logical Volume and Volume Group - -### Managing Encrypted Volumes ### - -SSM also provides system administrators with the capability of managing encryption for new or existing volumes. You will need the cryptsetup package installed first: - - # yum update && yum install cryptsetup - -Then issue the following command to create an encrypted volume. You will be prompted to enter a passphrase to maximize security: - - # ssm create -s 3G -n vol01_docs -p tecmint_vg --fstype ext4 --encrypt luks /mnt/docs /dev/sd{b,c}1 - # ssm create -s 1G -n vol02_logs -p tecmint_vg --fstype ext4 --encrypt luks /mnt/logs /dev/sd{b,c}1 - # ssm create -n vol03_homes -p tecmint_vg --fstype ext4 --encrypt luks /mnt/homes /dev/sd{b,c}1 - -Our next task consists in adding the corresponding entries in /etc/fstab in order for those logical volumes to be available on boot. Rather than using the device identifier (/dev/something). - -We will use each LV’s UUID (so that our devices will still be uniquely identified should we add other logical volumes or devices), which we can find out with the blkid utility: - - # blkid -o value UUID /dev/tecmint_vg/vol01_docs - # blkid -o value UUID /dev/tecmint_vg/vol02_logs - # blkid -o value UUID /dev/tecmint_vg/vol03_homes - -In our case: - -![Find Logical Volume UUID](http://www.tecmint.com/wp-content/uploads/2015/04/Logical-Volume-UUID.png) - -Find Logical Volume UUID - -Next, create the /etc/crypttab file with the following contents (change the UUIDs for the ones that apply to your setup): - - docs UUID=ba77d113-f849-4ddf-8048-13860399fca8 none - logs UUID=58f89c5a-f694-4443-83d6-2e83878e30e4 none - homes UUID=92245af6-3f38-4e07-8dd8-787f4690d7ac none - -And insert the following entries in /etc/fstab. Note that device_name (/dev/mapper/device_name) is the mapper identifier that appears in the first column of /etc/crypttab. - - # Logical volume vol01_docs: - /dev/mapper/docs /mnt/docs ext4 defaults 0 2 - # Logical volume vol02_logs - /dev/mapper/logs /mnt/logs ext4 defaults 0 2 - # Logical volume vol03_homes - /dev/mapper/homes /mnt/homes ext4 defaults 0 2 - -Now reboot (systemctl reboot) and you will be prompted to enter the passphrase for each LV. Afterwards you can confirm that the mount operation was successful by checking the corresponding mount points: - -![Verify Logical Volume Mount Points](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-LV-Mount-Points.png) - -Verify Logical Volume Mount Points - -### Conclusion ### - -In this tutorial we have started to explore how to set up and configure system storage using classic volume management tools and SSM, which also integrates filesystem and encryption capabilities in one package. This makes SSM an invaluable tool for any sysadmin. - -Let us know if you have any questions or comments – feel free to use the form below to get in touch with us! - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ - -作者:[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/create-lvm-storage-in-linux/ diff --git a/translated/tech/RHCSA/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md b/translated/tech/RHCSA/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md new file mode 100644 index 0000000000..41890b2280 --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md @@ -0,0 +1,269 @@ +RHCSA 系列:使用 'Parted' 和 'SSM' 来配置和加密系统存储 – Part 6 +================================================================================ +在本篇文章中,我们将讨论在 RHEL 7 中如何使用传统的工具来设置和配置本地系统存储,并介绍系统存储管理器(也称为 SSM),它将极大地简化上面的任务。 + +![配置和加密系统存储](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-and-Encrypt-System-Storage.png) + +RHCSA: 配置和加密系统存储 – Part 6 + +请注意,我们将在这篇文章中展开这个话题,但由于该话题的宽泛性,我们将在下一期(Part 7)中继续介绍有关它的描述和使用。 + +### 在 RHEL 7 中创建和修改分区 ### + +在 RHEL 7 中, parted 是默认的用来处理分区的程序,且它允许你: + +- 展示当前的分区表 +- 操纵(增加或减少分区的大小)现有的分区 +- 利用空余的磁盘空间或额外的物理存储设备来创建分区 + +强烈建议你在试图增加一个新的分区或对一个现有分区进行更改前,你应当确保设备上没有任何一个分区正在使用(`umount /dev/partition`),且假如你正使用设备的一部分来作为 swap 分区,在进行上面的操作期间,你需要将它禁用(`swapoff -v /dev/partition`) 。 + +实施上面的操作的最简单的方法是使用一个安装介质例如一个 RHEL 7 安装 DVD 或 USB 以急救模式启动 RHEL(Troubleshooting → Rescue a Red Hat Enterprise Linux system),然后当让你选择一个选项来挂载现有的 Linux 安装时,选择'跳过'这个选项,接着你将看到一个命令行提示符,在其中你可以像下图显示的那样开始键入与在一个未被使用的物理设备上创建一个正常的分区时所用的相同的命令。 + +![RHEL 7 急救模式](http://www.tecmint.com/wp-content/uploads/2015/04/RHEL-7-Rescue-Mode.png) + +RHEL 7 急救模式 + +要启动 parted,只需键入: + + # parted /dev/sdb + +其中 `/dev/sdb` 是你将要创建新分区所在的设备;然后键入 `print` 来显示当前设备的分区表: + +![创建新的分区](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Partition.png) + +创建新的分区 + +正如你所看到的那样,在这个例子中,我们正在使用一个 5 GB 的虚拟光驱。现在我们将要创建一个 4 GB 的主分区,然后将它格式化为 xfs 文件系统,它是 RHEL 7 中默认的文件系统。 + +你可以从一系列的文件系统中进行选择。你将需要使用 mkpart 来手动地创建分区,接着和平常一样,用 mkfs.fstype 来对分区进行格式化,因为 mkpart 并不支持许多现代的文件系统以达到即开即用。 + +在下面的例子中,我们将为设备设定一个标记,然后在 `/dev/sdb` 上创建一个主分区 `(p)`,它从设备的 0% 开始,并在 4000MB(4 GB) 处结束。 + +![在 Linux 中设定分区名称](http://www.tecmint.com/wp-content/uploads/2015/04/Label-Partition.png) + +标记分区的名称 + +接下来,我们将把分区格式化为 xfs 文件系统,然后再次打印出分区表,以此来确保更改已被应用。 + + # mkfs.xfs /dev/sdb1 + # parted /dev/sdb print + +![在 Linux 中格式化分区](http://www.tecmint.com/wp-content/uploads/2015/04/Format-Partition-in-Linux.png) + +格式化分区为 XFS 文件系统 + +对于旧一点的文件系统,在 parted 中你应该使用 `resize` 命令来改变分区的大小。不幸的是,这只适用于 ext2, fat16, fat32, hfs, linux-swap, 和 reiserfs (若 libreiserfs 已被安装)。 + +因此,改变分区大小的唯一方式是删除它然后再创建它(所以确保你对你的数据做了完整的备份!)。毫无疑问,在 RHEL 7 中默认的分区方案是基于 LVM 的。 + +使用 parted 来移除一个分区,可以用: + + # parted /dev/sdb print + # parted /dev/sdb rm 1 + +![在 Linux 中移除分区](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Partition-in-Linux.png) + +移除或删除分区 + +### 逻辑卷管理(LVM) ### + +一旦一个磁盘被分好了分区,再去更改分区的大小就是一件困难或冒险的事了。基于这个原因,假如我们计划在我们的系统上对分区的大小进行更改,我们应当考虑使用 LVM 的可能性,而不是使用传统的分区系统。这样多个物理设备可以组成一个逻辑组,以此来寄宿可自定义数目的逻辑卷,而逻辑卷的增大或减少不会带来任何麻烦。 + +简单来说,你会发现下面的示意图对记住 LVM 的基础架构或许有用。 + +![LVM 的基本架构](http://www.tecmint.com/wp-content/uploads/2015/04/LVM-Diagram.png) + +LVM 的基本架构 + +#### 创建物理卷,卷组和逻辑卷 #### + +遵循下面的步骤是为了使用传统的卷管理工具来设置 LVM。由于你可以通过阅读这个网站上的 LVM 系列来扩展这个话题,我将只是概要的介绍设置 LVM 的基本步骤,然后与使用 SSM 来实现相同功能做个比较。 + +**注**: 我们将使用整个磁盘 `/dev/sdb` 和 `/dev/sdc` 来作为 PVs (物理卷),但是否执行相同的操作完全取决于你。 + +**1. 使用 /dev/sdb 和 /dev/sdc 中 100% 的可用磁盘空间来创建分区 `/dev/sdb1` 和 `/dev/sdc1`:** + + # parted /dev/sdb print + # parted /dev/sdc print + +![创建新分区](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Partitions.png) + +创建新分区 + +**2. 分别在 /dev/sdb1 和 /dev/sdc1 上共创建 2 个物理卷。** + + # pvcreate /dev/sdb1 + # pvcreate /dev/sdc1 + +![创建两个物理卷](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Physical-Volumes.png) + +创建两个物理卷 + +记住,你可以使用 pvdisplay /dev/sd{b,c}1 来显示有关新建的 PV 的信息。 + +**3. 在上一步中创建的 PV 之上创建一个 VG:** + + # vgcreate tecmint_vg /dev/sd{b,c}1 + +![在 Linux 中创建卷组](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Volume-Group.png) + +创建卷组 + +记住,你可使用 vgdisplay tecmint_vg 来显示有关新建的 VG 的信息。 + +**4. 像下面那样,在 VG tecmint_vg 之上创建 3 个逻辑卷:** + + # lvcreate -L 3G -n vol01_docs tecmint_vg [vol01_docs → 3 GB] + # lvcreate -L 1G -n vol02_logs tecmint_vg [vol02_logs → 1 GB] + # lvcreate -l 100%FREE -n vol03_homes tecmint_vg [vol03_homes → 6 GB] + +![在 LVM 中创建逻辑卷](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Logical-Volumes.png) + +创建逻辑卷 + +记住,你可以使用 lvdisplay tecmint_vg 来显示有关在 VG tecmint_vg 之上新建的 LV 的信息。 + +**5. 格式化每个逻辑卷为 xfs 文件系统格式(假如你计划在以后将要缩小卷的大小,请别使用 xfs 文件系统格式!):** + + # mkfs.xfs /dev/tecmint_vg/vol01_docs + # mkfs.xfs /dev/tecmint_vg/vol02_logs + # mkfs.xfs /dev/tecmint_vg/vol03_homes + +**6. 最后,挂载它们:** + + # mount /dev/tecmint_vg/vol01_docs /mnt/docs + # mount /dev/tecmint_vg/vol02_logs /mnt/logs + # mount /dev/tecmint_vg/vol03_homes /mnt/homes + +#### 移除逻辑卷,卷组和物理卷 #### + +**7.现在我们将进行与刚才相反的操作并移除 LV,VG 和 PV:** + + # lvremove /dev/tecmint_vg/vol01_docs + # lvremove /dev/tecmint_vg/vol02_logs + # lvremove /dev/tecmint_vg/vol03_homes + # vgremove /dev/tecmint_vg + # pvremove /dev/sd{b,c}1 + +**8. 现在,让我们来安装 SSM,我们将看到如何只用一步就完成上面所有的操作!** + + # yum update && yum install system-storage-manager + +我们将和上面一样,使用相同的名称和大小: + + # ssm create -s 3G -n vol01_docs -p tecmint_vg --fstype ext4 /mnt/docs /dev/sd{b,c}1 + # ssm create -s 1G -n vol02_logs -p tecmint_vg --fstype ext4 /mnt/logs /dev/sd{b,c}1 + # ssm create -n vol03_homes -p tecmint_vg --fstype ext4 /mnt/homes /dev/sd{b,c}1 + +是的! SSM 可以让你: + +- 初始化块设备来作为物理卷 +- 创建一个卷组 +- 创建逻辑卷 +- 格式化 LV 和 +- 只使用一个命令来挂载它们 + +**9. 现在,我们可以使用下面的命令来展示有关 PV,VG 或 LV 的信息:** + + # ssm list dev + # ssm list pool + # ssm list vol + +![检查有关 PV, VG,或 LV 的信息](http://www.tecmint.com/wp-content/uploads/2015/04/Display-LVM-Information.png) + +检查有关 PV, VG,或 LV 的信息 + +**10. 正如我们知道的那样, LVM 的一个显著的特点是可以在不停机的情况下更改(增大或缩小) 逻辑卷的大小:** + +假定在 vol02_logs 上我们用尽了空间,而 vol03_homes 还留有足够的空间。我们将把 vol03_homes 的大小调整为 4 GB,并使用剩余的空间来扩展 vol02_logs: + + # ssm resize -s 4G /dev/tecmint_vg/vol03_homes + +再次运行 `ssm list pool`,并记录 tecmint_vg 中的剩余空间的大小: + +![查看卷的大小](http://www.tecmint.com/wp-content/uploads/2015/04/Check-LVM-Free-Space.png) + +查看卷的大小 + +然后执行: + + # ssm resize -s+1.99 /dev/tecmint_vg/vol02_logs + +**注**: 在 `-s` 后的加号暗示特定值应该被加到当前值上。 + +**11. 使用 ssm 来移除逻辑卷和卷组也更加简单,只需使用:** + + # ssm remove tecmint_vg + +这个命令将返回一个提示,询问你是否确认删除 VG 和它所包含的 LV: + +![移除逻辑卷和卷组](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-LV-VG.png) + +移除逻辑卷和卷组 + +### 管理加密的卷 ### + +SSM 也给系统管理员提供了为新的或现存的卷加密的能力。首先,你将需要安装 cryptsetup 软件包: + + # yum update && yum install cryptsetup + +然后写出下面的命令来创建一个加密卷,你将被要求输入一个密码来增强安全性: + + # ssm create -s 3G -n vol01_docs -p tecmint_vg --fstype ext4 --encrypt luks /mnt/docs /dev/sd{b,c}1 + # ssm create -s 1G -n vol02_logs -p tecmint_vg --fstype ext4 --encrypt luks /mnt/logs /dev/sd{b,c}1 + # ssm create -n vol03_homes -p tecmint_vg --fstype ext4 --encrypt luks /mnt/homes /dev/sd{b,c}1 + +我们的下一个任务是往 /etc/fstab 中添加条目来让这些逻辑卷在启动时可用,而不是使用设备识别编号(/dev/something)。 + +我们将使用每个 LV 的 UUID (使得当我们添加其他的逻辑卷或设备后,我们的设备仍然可以被唯一的标记),而我们可以使用 blkid 应用来找到它们的 UUID: + + # blkid -o value UUID /dev/tecmint_vg/vol01_docs + # blkid -o value UUID /dev/tecmint_vg/vol02_logs + # blkid -o value UUID /dev/tecmint_vg/vol03_homes + +在我们的例子中: + +![找到逻辑卷的 UUID](http://www.tecmint.com/wp-content/uploads/2015/04/Logical-Volume-UUID.png) + +找到逻辑卷的 UUID + +接着,使用下面的内容来创建 /etc/crypttab 文件(请更改 UUID 来适用于你的设置): + + docs UUID=ba77d113-f849-4ddf-8048-13860399fca8 none + logs UUID=58f89c5a-f694-4443-83d6-2e83878e30e4 none + homes UUID=92245af6-3f38-4e07-8dd8-787f4690d7ac none + +然后在 /etc/fstab 中添加如下的条目。请注意到 device_name (/dev/mapper/device_name) 是出现在 /etc/crypttab 中第一列的映射标识: + + # Logical volume vol01_docs: + /dev/mapper/docs /mnt/docs ext4 defaults 0 2 + # Logical volume vol02_logs + /dev/mapper/logs /mnt/logs ext4 defaults 0 2 + # Logical volume vol03_homes + /dev/mapper/homes /mnt/homes ext4 defaults 0 2 + +现在重启(systemctl reboot),则你将被要求为每个 LV 输入密码。随后,你可以通过检查相应的挂载点来确保挂载操作是否成功: + +![确保逻辑卷挂载点](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-LV-Mount-Points.png) + +确保逻辑卷挂载点 + +### 总结 ### + +在这篇教程中,我们开始探索如何使用传统的卷管理工具和 SSM 来设置和配置系统存储,SSM 也在一个软件包中集成了文件系统和加密功能。这使得对于任何系统管理员来说,SSM 是一个非常有价值的工具。 + +假如你有任何的问题或评论,请让我们知晓 – 请随意使用下面的评论框来与我们保存联系! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ + +作者:[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/create-lvm-storage-in-linux/ From 9be2a6d3692adc8a49338a52ce31b4ca2b21068d Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 18 Aug 2015 22:42:37 +0800 Subject: [PATCH 1784/2517] Update RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...(Access Control Lists) and Mounting Samba or NFS Shares.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md index d4801d9923..9237e8bd1c 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md @@ -1,3 +1,5 @@ +FSSlc translating + RHCSA Series: Using ACLs (Access Control Lists) and Mounting Samba / NFS Shares – Part 7 ================================================================================ In the last article ([RHCSA series Part 6][1]) we started explaining how to set up and configure local system storage using parted and ssm. @@ -209,4 +211,4 @@ via: http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares [a]:http://www.tecmint.com/author/gacanepa/ [1]:http://www.tecmint.com/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ [2]:http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ -[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html \ No newline at end of file +[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html From daa0150cb50a7ad9e3a28a301cd969c30dd20215 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 19 Aug 2015 09:33:47 +0800 Subject: [PATCH 1785/2517] Delete Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md --- ... (Mirroring) using 'Two Disks' in Linux.md | 213 ------------------ 1 file changed, 213 deletions(-) delete mode 100644 sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md diff --git a/sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md b/sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md deleted file mode 100644 index 4acfe4366b..0000000000 --- a/sources/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md +++ /dev/null @@ -1,213 +0,0 @@ -struggling 翻译中 -Setting up RAID 1 (Mirroring) using ‘Two Disks’ in Linux – Part 3 -================================================================================ -RAID Mirroring means an exact clone (or mirror) of the same data writing to two drives. A minimum two number of disks are more required in an array to create RAID1 and it’s useful only, when read performance or reliability is more precise than the data storage capacity. - -![Create Raid1 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID1-in-Linux.jpeg) - -Setup Raid1 in Linux - -Mirrors are created to protect against data loss due to disk failure. Each disk in a mirror involves an exact copy of the data. When one disk fails, the same data can be retrieved from other functioning disk. However, the failed drive can be replaced from the running computer without any user interruption. - -### Features of RAID 1 ### - -- Mirror has Good Performance. -- 50% of space will be lost. Means if we have two disk with 500GB size total, it will be 1TB but in Mirroring it will only show us 500GB. -- No data loss in Mirroring if one disk fails, because we have the same content in both disks. -- Reading will be good than writing data to drive. - -#### Requirements #### - -Minimum Two number of disks are allowed to create RAID 1, but you can add more disks by using twice as 2, 4, 6, 8. To add more disks, your system must have a RAID physical adapter (hardware card). - -Here we’re using software raid not a Hardware raid, if your system has an inbuilt physical hardware raid card you can access it from it’s utility UI or using Ctrl+I key. - -Read Also: [Basic Concepts of RAID in Linux][1] - -#### My Server Setup #### - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.226 - Hostname : rd1.tecmintlocal.com - Disk 1 [20GB] : /dev/sdb - Disk 2 [20GB] : /dev/sdc - -This article will guide you through a step-by-step instructions on how to setup a software RAID 1 or Mirror using mdadm (creates and manages raid) on Linux Platform. Although the same instructions also works on other Linux distributions such as RedHat, CentOS, Fedora, etc. - -### Step 1: Installing Prerequisites and Examine Drives ### - -1. As I said above, we’re using mdadm utility for creating and managing RAID in Linux. So, let’s install the mdadm software package on Linux using yum or apt-get package manager tool. - - # yum install mdadm [on RedHat systems] - # apt-get install mdadm [on Debain systems] - -2. Once ‘mdadm‘ package has been installed, we need to examine our disk drives whether there is already any raid configured using the following command. - - # mdadm -E /dev/sd[b-c] - -![Check RAID on Disks](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-on-Disks.png) - -Check RAID on Disks - -As you see from the above screen, that there is no any super-block detected yet, means no RAID defined. - -### Step 2: Drive Partitioning for RAID ### - -3. As I mentioned above, that we’re using minimum two partitions /dev/sdb and /dev/sdc for creating RAID1. Let’s create partitions on these two drives using ‘fdisk‘ command and change the type to raid during partition creation. - - # fdisk /dev/sdb - -Follow the below instructions - -- Press ‘n‘ for creating new partition. -- Then choose ‘P‘ for Primary partition. -- Next select the partition number as 1. -- Give the default full size by just pressing two times Enter key. -- Next press ‘p‘ to print the defined partition. -- Press ‘L‘ to list all available types. -- Type ‘t‘to choose the partitions. -- Choose ‘fd‘ for Linux raid auto and press Enter to apply. -- Then again use ‘p‘ to print the changes what we have made. -- Use ‘w‘ to write the changes. - -![Create Disk Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Disk-Partitions.png) - -Create Disk Partitions - -After ‘/dev/sdb‘ partition has been created, next follow the same instructions to create new partition on /dev/sdc drive. - - # fdisk /dev/sdc - -![Create Second Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Second-Partitions.png) - -Create Second Partitions - -4. Once both the partitions are created successfully, verify the changes on both sdb & sdc drive using the same ‘mdadm‘ command and also confirm the RAID type as shown in the following screen grabs. - - # mdadm -E /dev/sd[b-c] - -![Verify Partitions Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Partitions-Changes.png) - -Verify Partitions Changes - -![Check RAID Type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Type.png) - -Check RAID Type - -**Note**: As you see in the above picture, there is no any defined RAID on the sdb1 and sdc1 drives so far, that’s the reason we are getting as no super-blocks detected. - -### Step 3: Creating RAID1 Devices ### - -5. Next create RAID1 Device called ‘/dev/md0‘ using the following command and verity it. - - # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[b-c]1 - # cat /proc/mdstat - -![Create RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device.png) - -Create RAID Device - -6. Next check the raid devices type and raid array using following commands. - - # mdadm -E /dev/sd[b-c]1 - # mdadm --detail /dev/md0 - -![Check RAID Device type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-type.png) - -Check RAID Device type - -![Check RAID Device Array](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-Array.png) - -Check RAID Device Array - -From the above pictures, one can easily understand that raid1 have been created and using /dev/sdb1 and /dev/sdc1 partitions and also you can see the status as resyncing. - -### Step 4: Creating File System on RAID Device ### - -7. Create file system using ext4 for md0 and mount under /mnt/raid1. - - # mkfs.ext4 /dev/md0 - -![Create RAID Device Filesystem](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device-Filesystem.png) - -Create RAID Device Filesystem - -8. Next, mount the newly created filesystem under ‘/mnt/raid1‘ and create some files and verify the contents under mount point. - - # mkdir /mnt/raid1 - # mount /dev/md0 /mnt/raid1/ - # touch /mnt/raid1/tecmint.txt - # echo "tecmint raid setups" > /mnt/raid1/tecmint.txt - -![Mount Raid Device](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-RAID-Device.png) - -Mount Raid Device - -9. To auto-mount RAID1 on system reboot, you need to make an entry in fstab file. Open ‘/etc/fstab‘ file and add the following line at the bottom of the file. - - /dev/md0 /mnt/raid1 ext4 defaults 0 0 - -![Raid Automount Device](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Automount-Filesystem.png) - -Raid Automount Device - -10. Run ‘mount -a‘ to check whether there are any errors in fstab entry. - - # mount -av - -![Check Errors in fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-fstab.png) - -Check Errors in fstab - -11. Next, save the raid configuration manually to ‘mdadm.conf‘ file using the below command. - - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - -![Save Raid Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Raid-Configuration.png) - -Save Raid Configuration - -The above configuration file is read by the system at the reboots and load the RAID devices. - -### Step 5: Verify Data After Disk Failure ### - -12. Our main purpose is, even after any of hard disk fail or crash our data needs to be available. Let’s see what will happen when any of disk disk is unavailable in array. - - # mdadm --detail /dev/md0 - -![Raid Device Verify](http://www.tecmint.com/wp-content/uploads/2014/10/Raid-Device-Verify.png) - -Raid Device Verify - -In the above image, we can see there are 2 devices available in our RAID and Active Devices are 2. Now let us see what will happen when a disk plugged out (removed sdc disk) or fails. - - # ls -l /dev | grep sd - # mdadm --detail /dev/md0 - -![Test RAID Devices](http://www.tecmint.com/wp-content/uploads/2014/10/Test-RAID-Devices.png) - -Test RAID Devices - -Now in the above image, you can see that one of our drive is lost. I unplugged one of the drive from my Virtual machine. Now let us check our precious data. - - # cd /mnt/raid1/ - # cat tecmint.txt - -![Verify RAID Data](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Data.png) - -Verify RAID Data - -Did you see our data is still available. From this we come to know the advantage of RAID 1 (mirror). In next article, we will see how to setup a RAID 5 striping with distributed Parity. Hope this helps you to understand how the RAID 1 (Mirror) Works. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-raid1-in-linux/ - -作者:[Babin Lonston][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/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ \ No newline at end of file From e229a59ce691a09656ed58958d06edbabf81dbc7 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 19 Aug 2015 09:34:00 +0800 Subject: [PATCH 1786/2517] Delete Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md --- ...iping with Distributed Parity) in Linux.md | 286 ------------------ 1 file changed, 286 deletions(-) delete mode 100644 sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md diff --git a/sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md b/sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md deleted file mode 100644 index dafdf514aa..0000000000 --- a/sources/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md +++ /dev/null @@ -1,286 +0,0 @@ -struggling 翻译中 -Creating RAID 5 (Striping with Distributed Parity) in Linux – Part 4 -================================================================================ -In RAID 5, data strips across multiple drives with distributed parity. The striping with distributed parity means it will split the parity information and stripe data over the multiple disks, which will have good data redundancy. - -![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/setup-raid-5-in-linux.jpg) - -Setup Raid 5 in Linux - -For RAID Level it should have at least three hard drives or more. RAID 5 are being used in the large scale production environment where it’s cost effective and provide performance as well as redundancy. - -#### What is Parity? #### - -Parity is a simplest common method of detecting errors in data storage. Parity stores information in each disks, Let’s say we have 4 disks, in 4 disks one disk space will be split to all disks to store the parity information’s. If any one of the disks fails still we can get the data by rebuilding from parity information after replacing the failed disk. - -#### Pros and Cons of RAID 5 #### - -- Gives better performance -- Support Redundancy and Fault tolerance. -- Support hot spare options. -- Will loose a single disk capacity for using parity information. -- No data loss if a single disk fails. We can rebuilt from parity after replacing the failed disk. -- Suits for transaction oriented environment as the reading will be faster. -- Due to parity overhead, writing will be slow. -- Rebuild takes long time. - -#### Requirements #### - -Minimum 3 hard drives are required to create Raid 5, but you can add more disks, only if you’ve a dedicated hardware raid controller with multi ports. Here, we are using software RAID and ‘mdadm‘ package to create raid. - -mdadm is a package which allow us to configure and manage RAID devices in Linux. By default there is no configuration file is available for RAID, we must save the configuration file after creating and configuring RAID setup in separate file called mdadm.conf. - -Before moving further, I suggest you to go through the following articles for understanding the basics of RAID in Linux. - -- [Basic Concepts of RAID in Linux – Part 1][1] -- [Creating RAID 0 (Stripe) in Linux – Part 2][2] -- [Setting up RAID 1 (Mirroring) in Linux – Part 3][3] - -#### My Server Setup #### - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.227 - Hostname : rd5.tecmintlocal.com - Disk 1 [20GB] : /dev/sdb - Disk 2 [20GB] : /dev/sdc - Disk 3 [20GB] : /dev/sdd - -This article is a Part 4 of a 9-tutorial RAID series, here we are going to setup a software RAID 5 with distributed parity in Linux systems or servers using three 20GB disks named /dev/sdb, /dev/sdc and /dev/sdd. - -### Step 1: Installing mdadm and Verify Drives ### - -1. As we said earlier, that we’re using CentOS 6.5 Final release for this raid setup, but same steps can be followed for RAID setup in any Linux based distributions. - - # lsb_release -a - # ifconfig | grep inet - -![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/CentOS-6.5-Summary.png) - -CentOS 6.5 Summary - -2. If you’re following our raid series, we assume that you’ve already installed ‘mdadm‘ package, if not, use the following command according to your Linux distribution to install the package. - - # yum install mdadm [on RedHat systems] - # apt-get install mdadm [on Debain systems] - -3. After the ‘mdadm‘ package installation, let’s list the three 20GB disks which we have added in our system using ‘fdisk‘ command. - - # fdisk -l | grep sd - -![Install mdadm Tool in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/Install-mdadm-Tool.png) - -Install mdadm Tool - -4. Now it’s time to examine the attached three drives for any existing RAID blocks on these drives using following command. - - # mdadm -E /dev/sd[b-d] - # mdadm --examine /dev/sdb /dev/sdc /dev/sdd - -![Examine Drives For Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Examine-Drives-For-Raid.png) - -Examine Drives For Raid - -**Note**: From the above image illustrated that there is no any super-block detected yet. So, there is no RAID defined in all three drives. Let us start to create one now. - -### Step 2: Partitioning the Disks for RAID ### - -5. First and foremost, we have to partition the disks (/dev/sdb, /dev/sdc and /dev/sdd) before adding to a RAID, So let us define the partition using ‘fdisk’ command, before forwarding to the next steps. - - # fdisk /dev/sdb - # fdisk /dev/sdc - # fdisk /dev/sdd - -#### Create /dev/sdb Partition #### - -Please follow the below instructions to create partition on /dev/sdb drive. - -- Press ‘n‘ for creating new partition. -- Then choose ‘P‘ for Primary partition. Here we are choosing Primary because there is no partitions defined yet. -- Then choose ‘1‘ to be the first partition. By default it will be 1. -- Here for cylinder size we don’t have to choose the specified size because we need the whole partition for RAID so just Press Enter two times to choose the default full size. -- Next press ‘p‘ to print the created partition. -- Change the Type, If we need to know the every available types Press ‘L‘. -- Here, we are selecting ‘fd‘ as my type is RAID. -- Next press ‘p‘ to print the defined partition. -- Then again use ‘p‘ to print the changes what we have made. -- Use ‘w‘ to write the changes. - -![Create sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdb-Partition1.png) - -Create sdb Partition - -**Note**: We have to follow the steps mentioned above to create partitions for sdc & sdd drives too. - -#### Create /dev/sdc Partition #### - -Now partition the sdc and sdd drives by following the steps given in the screenshot or you can follow above steps. - - # fdisk /dev/sdc - -![Create sdc Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdc-Partition1.png) - -Create sdc Partition - -#### Create /dev/sdd Partition #### - - # fdisk /dev/sdd - -![Create sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdd-Partition1.png) - -Create sdd Partition - -6. After creating partitions, check for changes in all three drives sdb, sdc, & sdd. - - # mdadm --examine /dev/sdb /dev/sdc /dev/sdd - - or - - # mdadm -E /dev/sd[b-c] - -![Check Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Changes-on-Partitions.png) - -Check Partition Changes - -**Note**: In the above pic. depict the type is fd i.e. for RAID. - -7. Now Check for the RAID blocks in newly created partitions. If no super-blocks detected, than we can move forward to create a new RAID 5 setup on these drives. - -![Check Raid on Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-Partitions.png) - -Check Raid on Partition - -### Step 3: Creating md device md0 ### - -8. Now create a Raid device ‘md0‘ (i.e. /dev/md0) and include raid level on all newly created partitions (sdb1, sdc1 and sdd1) using below command. - - # mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 - - or - - # mdadm -C /dev/md0 -l=5 -n=3 /dev/sd[b-d]1 - -9. After creating raid device, check and verify the RAID, devices included and RAID Level from the mdstat output. - - # cat /proc/mdstat - -![Verify Raid Device](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Device.png) - -Verify Raid Device - -If you want to monitor the current building process, you can use ‘watch‘ command, just pass through the ‘cat /proc/mdstat‘ with watch command which will refresh screen every 1 second. - - # watch -n1 cat /proc/mdstat - -![Monitor Raid Process](http://www.tecmint.com/wp-content/uploads/2014/11/Monitor-Raid-Process.png) - -Monitor Raid 5 Process - -![Raid 5 Process Summary](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Process-Summary.png) - -Raid 5 Process Summary - -10. After creation of raid, Verify the raid devices using the following command. - - # mdadm -E /dev/sd[b-d]1 - -![Verify Raid Level](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Level.png) - -Verify Raid Level - -**Note**: The Output of the above command will be little long as it prints the information of all three drives. - -11. Next, verify the RAID array to assume that the devices which we’ve included in the RAID level are running and started to re-sync. - - # mdadm --detail /dev/md0 - -![Verify Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Array.png) - -Verify Raid Array - -### Step 4: Creating file system for md0 ### - -12. Create a file system for ‘md0‘ device using ext4 before mounting. - - # mkfs.ext4 /dev/md0 - -![Create md0 Filesystem](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md0-Filesystem.png) - -Create md0 Filesystem - -13. Now create a directory under ‘/mnt‘ then mount the created filesystem under /mnt/raid5 and check the files under mount point, you will see lost+found directory. - - # mkdir /mnt/raid5 - # mount /dev/md0 /mnt/raid5/ - # ls -l /mnt/raid5/ - -14. Create few files under mount point /mnt/raid5 and append some text in any one of the file to verify the content. - - # touch /mnt/raid5/raid5_tecmint_{1..5} - # ls -l /mnt/raid5/ - # echo "tecmint raid setups" > /mnt/raid5/raid5_tecmint_1 - # cat /mnt/raid5/raid5_tecmint_1 - # cat /proc/mdstat - -![Mount Raid 5 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Mount-Raid-Device.png) - -Mount Raid Device - -15. We need to add entry in fstab, else will not display our mount point after system reboot. To add an entry, we should edit the fstab file and append the following line as shown below. The mount point will differ according to your environment. - - # vim /etc/fstab - - /dev/md0 /mnt/raid5 ext4 defaults 0 0 - -![Raid 5 Automount](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Device-Automount.png) - -Raid 5 Automount - -16. Next, run ‘mount -av‘ command to check whether any errors in fstab entry. - - # mount -av - -![Check Fstab Errors](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Fstab-Errors.png) - -Check Fstab Errors - -### Step 5: Save Raid 5 Configuration ### - -17. As mentioned earlier in requirement section, by default RAID don’t have a config file. We have to save it manually. If this step is not followed RAID device will not be in md0, it will be in some other random number. - -So, we must have to save the configuration before system reboot. If the configuration is saved it will be loaded to the kernel during the system reboot and RAID will also gets loaded. - - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - -![Save Raid 5 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Save-Raid-5-Configuration.png) - -Save Raid 5 Configuration - -Note: Saving the configuration will keep the RAID level stable in md0 device. - -### Step 6: Adding Spare Drives ### - -18. What the use of adding a spare drive? its very useful if we have a spare drive, if any one of the disk fails in our array, this spare drive will get active and rebuild the process and sync the data from other disk, so we can see a redundancy here. - -For more instructions on how to add spare drive and check Raid 5 fault tolerance, read #Step 6 and #Step 7 in the following article. - -- [Add Spare Drive to Raid 5 Setup][4] - -### Conclusion ### - -Here, in this article, we have seen how to setup a RAID 5 using three number of disks. Later in my upcoming articles, we will see how to troubleshoot when a disk fails in RAID 5 and how to replace for recovery. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-raid-5-in-linux/ - -作者:[Babin Lonston][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/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/create-raid0-in-linux/ -[3]:http://www.tecmint.com/create-raid1-in-linux/ -[4]:http://www.tecmint.com/create-raid-6-in-linux/ \ No newline at end of file From 6ae6e7cd43e62c6d22e2621c689dd892e88ba7b1 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 19 Aug 2015 10:05:45 +0800 Subject: [PATCH 1787/2517] Update 20150728 Process of the Linux kernel building.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译到Line 483 --- ...50728 Process of the Linux kernel building.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index f4510d81b2..e55605f863 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -411,6 +411,8 @@ $(addprefix $(obj)/,$(filter-out fixdep,$(always))): $(obj)/fixdep First program is `fixdep` - optimizes list of dependencies generated by the [gcc](https://gcc.gnu.org/) that tells make when to remake a source code file. The second program is `bin2c` depends on the value of the `CONFIG_BUILD_BIN2C` kernel configuration option and very little C program that allows to convert a binary on stdin to a C include on stdout. You can note here strange notation: `hostprogs-y` and etc. This notation is used in the all `kbuild` files and more about it you can read in the [documentation](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/makefiles.txt). In our case the `hostprogs-y` tells to the `kbuild` that there is one host program named `fixdep` that will be built from the will be built from `fixdep.c` that located in the same directory that `Makefile`. The first output after we will execute `make` command in our terminal will be result of this `kbuild` file: +第一个工具是`fixdep`:用来优化[gcc](https://gcc.gnu.org/) 生成的依赖列表,然后在重新编译源文件的时候告诉make。第二个工具是`bin2c`,他依赖于内核配置选项`CONFIG_BUILD_BIN2C`,并且它是一个用来将标准输入接口(注:即stdin)收到的二进制流通过标准输出接口(即:stdout)转换成C 头文件的非常小的C 程序。你可以注意到这里有些奇怪的标志,如`hostprogs-y`等。这些标志使用在所有的`kbuild` 文件,更多的信息你可以从[documentation](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/makefiles.txt) 获得。在我们的用例`hostprogs-y` 中,他告诉`kbuild` 这里有个名为`fixed` 的程序,这个程序会通过和`Makefile` 相同目录的`fixdep.c` 编译而来。执行make 之后,终端的第一个输出就是`kbuild` 的结果: + ``` $ make HOSTCC scripts/basic/fixdep @@ -418,12 +420,16 @@ $ make As `script_basic` target was executed, the `archscripts` target will execute `make` for the [arch/x86/tools](https://github.com/torvalds/linux/blob/master/arch/x86/tools/Makefile) makefile with the `relocs` target: +当目标`script_basic` 被执行,目标`archscripts` 就会make [arch/x86/tools](https://github.com/torvalds/linux/blob/master/arch/x86/tools/Makefile) 下的makefile 和目标`relocs`: + ```Makefile $(Q)$(MAKE) $(build)=arch/x86/tools relocs ``` The `relocs_32.c` and the `relocs_64.c` will be compiled that will contain [relocation](https://en.wikipedia.org/wiki/Relocation_%28computing%29) information and we will see it in the `make` output: +代码`relocs_32.c` 和`relocs_64.c` 包含了[重定位](https://en.wikipedia.org/wiki/Relocation_%28computing%29) 的信息,将会被编译,者可以在`make` 的输出中看到: + ```Makefile HOSTCC arch/x86/tools/relocs_32.o HOSTCC arch/x86/tools/relocs_64.o @@ -433,6 +439,8 @@ The `relocs_32.c` and the `relocs_64.c` will be compiled that will contain [relo There is checking of the `version.h` after compiling of the `relocs.c`: +在编译完`relocs.c` 之后会检查`version.h`: + ```Makefile $(version_h): $(srctree)/Makefile FORCE $(call filechk,version.h) @@ -441,12 +449,17 @@ $(version_h): $(srctree)/Makefile FORCE We can see it in the output: +我们可以在输出看到它: + + ``` CHK include/config/kernel.release ``` and the building of the `generic` assembly headers with the `asm-generic` target from the `arch/x86/include/generated/asm` that generated in the top Makefile of the Linux kernel. After the `asm-generic` target the `archprepare` will be done, so the `prepare0` target will be executed. As I wrote above: +以及在内核根Makefiel 使用`arch/x86/include/generated/asm`的目标`asm-generic` 来构建`generic` 汇编头文件。在目标`asm-generic` 之后,`archprepare` 就会被完成,所以目标`prepare0` 会接着被执行,如我上面所写: + ```Makefile prepare0: archprepare FORCE $(Q)$(MAKE) $(build)=. @@ -454,12 +467,15 @@ prepare0: archprepare FORCE Note on the `build`. It defined in the [scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include) and looks like this: +注意`build`,它是定义在文件[scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include),内容是这样的: + ```Makefile build := -f $(srctree)/scripts/Makefile.build obj ``` or in our case it is current source directory - `.`: +或者在我们的例子中,他就是当前源码目录路径——`.`: ```Makefile $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.build obj=. ``` From 01457fa101936d30230d3b2c0a5cb5175c3a3da6 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Wed, 19 Aug 2015 21:11:44 +0800 Subject: [PATCH 1788/2517] cancel pr --- ...Boss Data Virtualization GA with OData in Docker Container.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md b/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md index f1505c5649..007f16493b 100644 --- a/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md +++ b/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md @@ -1,4 +1,3 @@ -translating wi-cuckoo Howto Run JBoss Data Virtualization GA with OData in Docker Container ================================================================================ Hi everyone, today we'll learn how to run JBoss Data Virtualization 6.0.0.GA with OData in a Docker Container. JBoss Data Virtualization is a data supply and integration solution platform that transforms various scatered multiple sources data, treats them as single source and delivers the required data into actionable information at business speed to any applications or users. JBoss Data Virtualization can help us easily combine and transform data into reusable business friendly data models and make unified data easily consumable through open standard interfaces. It offers comprehensive data abstraction, federation, integration, transformation, and delivery capabilities to combine data from one or multiple sources into reusable for agile data utilization and sharing.For more information about JBoss Data Virtualization, we can check out [its official page][1]. Docker is an open source platform that provides an open platform to pack, ship and run any application as a lightweight container. Running JBoss Data Virtualization with OData in Docker Container makes us easy to handle and launch. From 554825a1f4a7069a42bc7b2a7b4560e4152be42b Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 19 Aug 2015 21:29:41 +0800 Subject: [PATCH 1789/2517] PUB:20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @XLCYun 翻译这个系列辛苦啦! --- ...Get Right & Wrong - Page 5 - Conclusion.md | 40 +++++++++++++++++++ ...Get Right & Wrong - Page 5 - Conclusion.md | 39 ------------------ 2 files changed, 40 insertions(+), 39 deletions(-) create mode 100644 published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md delete mode 100644 translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md diff --git a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md new file mode 100644 index 0000000000..ee9ded7f77 --- /dev/null +++ b/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md @@ -0,0 +1,40 @@ +一周 GNOME 之旅:品味它和 KDE 的是是非非(第三节 总结) +================================================================================ + +### 用户体验和最后想法 ### + +当 Gnome 2.x 和 KDE 4.x 要正面交锋时……我在它们之间左右逢源。我对它们爱恨交织,但总的来说它们使用起来还算是一种乐趣。然后 Gnome 3.x 来了,带着一场 Gnome Shell 的戏剧。那时我就放弃了 Gnome,我尽我所能的避开它。当时它对用户是不友好的,而且不直观,它打破了原有的设计典范,只为平板的统治世界做准备……而根据平板下跌的销量来看,这样的未来不可能实现。 + +在 Gnome 3 后续发布了八个版本后,奇迹发生了。Gnome 变得对对用户友好了,变得直观了。它完美吗?当然不。我还是很讨厌它想推动的那种设计范例,我讨厌它总想给我强加一种工作流(work flow),但是在付出时间和耐心后,这两都能被接受。只要你能够回头去看看 Gnome Shell 那外星人一样的界面,然后开始跟 Gnome 的其它部分(特别是控制中心)互动,你就能发现 Gnome 绝对做对了:细节,对细节的关注! + +人们能适应新的界面设计范例,能适应新的工作流—— iPhone 和 iPad 都证明了这一点——但真正让他们操心的一直是“纸割”——那些不完美的细节。 + +它带出了 KDE 和 Gnome 之间最重要的一个区别。Gnome 感觉像一个产品,像一种非凡的体验。你用它的时候,觉得它是完整的,你要的东西都触手可及。它让人感觉就像是一个拥有 Windows 或者 OS X 那样桌面体验的 Linux 桌面版:你要的都在里面,而且它是被同一个目标一致的团队中的同一个人写出来的。天,即使是一个应用程序发出的 sudo 请求都感觉是 Gnome 下的一个特意设计的部分,就像在 Windows 下的一样。而在 KDE 下感觉就是随便一个应用程序都能创建的那种各种外观的弹窗。它不像是以系统本身这样的正式身份停下来说“嘿,有个东西要请求管理员权限!你要给它吗?”。 + +KDE 让人体验不到有凝聚力的体验。KDE 像是在没有方向地打转,感觉没有完整的体验。它就像是一堆东西往不同的的方向移动,只不过恰好它们都有一个共同享有的工具包而已。如果开发者对此很开心,那么好吧,他们开心就好,但是如果他们想提供最好体验的话,那么就需要多关注那些小地方了。用户体验跟直观应当做为每一个应用程序的设计中心,应当有一个视野,知道 KDE 要提供什么——并且——知道它看起来应该是什么样的。 + +是不是有什么原因阻止我在 KDE 下使用 Gnome 磁盘管理? Rhythmbox 呢? Evolution 呢? 没有,没有,没有。但是这样说又错过了关键。Gnome 和 KDE 都称它们自己为“桌面环境”。那么它们就应该是完整的环境,这意味着他们的各个部件应该汇集并紧密结合在一起,意味着你应该使用它们环境下的工具,因为它们说“您在一个完整的桌面中需要的任何东西,我们都支持。”说真的?只有 Gnome 看起来能符合完整的要求。KDE 在“汇集在一起”这一方面感觉就像个半成品,更不用说提供“完整体验”中你所需要的东西。Gnome 磁盘管理没有相应的对手—— kpartionmanage 要求 ROOT 权限。KDE 不运行“首次用户注册”的过程(原文:No 'First Time User' run through。可能是指系统安装过程中KDE没有创建新用户的过程,译注) ,现在也不过是在 Kubuntu 下引入了一个用户管理器。老天,Gnome 甚至提供了地图、笔记、日历和时钟应用。这些应用都是百分百要紧的吗?不,当然不了。但是正是这些应用帮助 Gnome 推动“Gnome 是一种完整丰富的体验”的想法。 + +我吐槽的 KDE 问题并非不可能解决,决对不是这样的!但是它需要人去关心它。它需要开发者为他们的作品感到自豪,而不仅仅是为它们实现的功能而感到自豪——组织的价值可大了去了。别夺走用户设置选项的能力—— GNOME 3.x 就是因为缺乏配置选项的能力而为我所诟病,但别把“好吧,你想怎么设置就怎么设置”作为借口而不提供任何理智的默认设置。默认设置是用户将看到的东西,它们是用户从打开软件的第一刻开始进行评判的关键。给用户留个好印象吧。 + +我知道 KDE 开发者们知道设计很重要,这也是为什么VDG(Visual Design Group 视觉设计组)存在的原因,但是感觉好像他们没有让 VDG 充分发挥,所以 KDE 里存在组织上的缺陷。不是 KDE 没办法完整,不是它没办法汇集整合在一起然后解决衰败问题,只是开发者们没做到。他们瞄准了靶心……但是偏了。 + +还有,在任何人说这句话之前……千万别说“欢迎给我们提交补丁啊"。因为当我开心的为某个人提交补丁时,只要开发者坚持以他们喜欢的却不直观的方式干事,更多这样的烦人事就会不断发生。这不关 Muon 有没有中心对齐。也不关 Amarok 的界面太丑。也不关每次我敲下快捷键后,弹出的音量和亮度调节窗口占用了我一大块的屏幕“地皮”(说真的,有人会把这些东西缩小)。 + +这跟心态的冷漠有关,跟开发者们在为他们的应用设计 UI 时根本就不多加思考有关。KDE 团队做的东西都工作得很好。Amarok 能播放音乐。Dragon 能播放视频。Kwin 或 Qt 和 kdelibs 似乎比 Mutter/gtk 更有力更效率(仅根据我的电池电量消耗计算。非科学性测试)。这些都很好,很重要……但是它们呈现的方式也很重要。甚至可以说,呈现方式是最重要的,因为它是用户看到的并与之交互的东西。 + +KDE 应用开发者们……让 VDG 参与进来吧。让 VDG 审查并核准每一个“核心”应用,让一个 VDG 的 UI/UX 专家来设计应用的使用模式和使用流程,以此保证其直观性。真见鬼,不管你们在开发的是啥应用,仅仅把它的模型发到 VDG 论坛寻求反馈甚至都可能都能得到一些非常好的指点跟反馈。你有这么好的资源在这,现在赶紧用吧。 + +我不想说得好像我一点都不懂感恩。我爱 KDE,我爱那些志愿者们为了给 Linux 用户一个可视化的桌面而付出的工作与努力,也爱可供选择的 Gnome。正是因为我关心我才写这篇文章。因为我想看到更好的 KDE,我想看到它走得比以前更加遥远。而这样做需要每个人继续努力,并且需要人们不再躲避批评。它需要人们对系统互动及系统崩溃的地方都保持诚实。如果我们不能直言批评,如果我们不说“这真垃圾!”,那么情况永远不会变好。 + +这周后我会继续使用 Gnome 吗?可能不。应该不。Gnome 还在试着强迫我接受其工作流,而我不想追随,也不想遵循,因为我在使用它的时候感觉变得不够高效,因为它并不遵循我的思维模式。可是对于我的朋友们,当他们问我“我该用哪种桌面环境?”我可能会推荐 Gnome,特别是那些不大懂技术,只要求“能工作”就行的朋友。根据目前 KDE 的形势来看,这可能是我能说出的最狠毒的评估了。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=5 + +作者:Eric Griffith +译者:[XLCYun](https://github.com/XLCYun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md b/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md deleted file mode 100644 index 02ee7425fc..0000000000 --- a/translated/tech/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md +++ /dev/null @@ -1,39 +0,0 @@ -将GNOME作为我的Linux桌面的一周:他们做对的与做错的 - 第五节 - 总结 -================================================================================ -### 用户体验和最后想法 ### - -当Gnome 2.x和KDE 4.x要正面交锋时……我相当开心的跳到其中。我爱的东西它们有,恨的东西也有,但总的来说它们使用起来还算是一种乐趣。然后Gnome 3.x来了,带着一场Gnome Shell的戏剧。那时我就放弃了Gnome,我尽我所能的避开它。当时它对用户是不友好的,而且不直观,它打破了原有的设计典范,只为平板的统治世界做准备……而根据平板下跌的销量来看,这样的未来不可能实现。 - -Gnome 3后续发面了八个版本后,奇迹发生了。Gnome变得对对用户友好了。变得直观了。它完美吗?当然不了。我还是很讨厌它想推动的那种设计范例,我讨厌它总想把工作流(work flow)强加给我,但是在时间和耐心的作用下,这两都能被接受。只要你能够回头去看看Gnome Shell那外星人一样的界面,然后开始跟Gnome的其它部分(特别是控制中心)互动,你就能发现Gnome绝对做对了:细节。对细节的关注! - -人们能适应新的界面设计范例,能适应新的工作流——iPhone和iPad都证明了这一点——但真正一直让他们操心的是“纸片的割伤”(paper cuts,此处指易于修复但烦人的缺陷,译注)。 - -它带出了KDE和Gnome之间最重要的一个区别。Gnome感觉像一个产品。像一种非凡的体验。你用它的时候,觉得它是完整的,你要的东西都在你的指尖。它让人感觉就像是一个拥有windows或者OS X那样桌面体验的Linux桌面版:你要的都在里面,而且它是被同一个目标一致的团队中的同一个人写出来的。天,即使是一个应用程序发出的sudo请求都感觉是Gnome下的一个特意设计的部分,就像在Windows下的一样。而在KDE它就像是任何应用程序都能创建的那种随机外观的弹窗。它不像是以系统的一部分这样的正式身份停下来说“嘿,有个东西要请求管理员权限!你要给它吗?”。 - -KDE让人体验不到有凝聚力的体验。KDE像是在没有方向地打转,感觉没有完整的体验。它就像是一堆东西往不同的的方向移动,只不过恰好它们都有一个共同享有的工具包。如果开发者对此很开心,那么好吧,他们开心就好,但是如果他们想提供最好体验的话,那么就需要多关注那些小地方了。用户体验跟直观应当做为每一个应用程序的设计中心,应当有一个视野,知道KDE要提供什么——并且——知道它看起来应该是什么样的。 - -是不是有什么原因阻止我在KDE下使用Gnome磁盘管理? Rhythmbox? Evolution? 没有。没有。没有。但是这样说又错过了关键。Gnome和KDE都称它们为“桌面环境”。那么它们就应该是完整的环境,这意味着他们的各个部件应该汇集并紧密结合在一起,意味着你使用它们环境下的工具,因为它们说“您在一个完整的桌面中需要的任何东西,我们都支持。”说真的?只有Gnome看起来能符合完整的要求。KDE在“汇集在一起”这一方面感觉就像个半成品,更不用说提供“完整体验”中你所需要的东西。Gnome磁盘管理没有相应的对手——kpartionmanage要求ROOT权限。KDE不运行“首次用户注册”的过程(原文:No 'First Time User' run through.可能是指系统安装过程中KDE没有创建新用户的过程,译注) ,现在也不过是在Kubuntu下引入了一个用户管理器。老天,Gnome甚至提供了地图,笔记,日历和时钟应用。这些应用都是百分百要紧的吗?不,当然不了。但是正是这些应用帮助Gnome推动“Gnome是一种完整丰富的体验”的想法。 - -我吐槽的KDE问题并非不可能解决,决对不是这样的!但是它需要人去关心它。它需要开发者为他们的作品感到自豪,而不仅仅是为它们实现的功能而感到自豪——组织的价值可大了去了。别夺走用户设置选项的能力——GNOME 3.x就是因为缺乏配置选项的能力而为我所诟病,但别把“好吧,你想怎么设置就怎么设置,”作为借口而不提供任何理智的默认设置。默认设置是用户将看到的东西,它们是用户从打开软件的第一刻开始进行评判的关键。给用户留个好印象吧。 - -我知道KDE开发者们知道设计很重要,这也是为什么Visual Design Group(视觉设计团体)存在的原因,但是感觉好像他们没有让VDG充分发挥。所以KDE里存在组织上的缺陷。不是KDE没办法完整,不是它没办法汇集整合在一起然后解决衰败问题,只是开发者们没做到。他们瞄准了靶心……但是偏了。 - -还有,在任何人说这句话之前……千万别说“补丁很受欢迎啊"。因为当我开心的为个人提交补丁时,只要开发者坚持以他们喜欢的却不直观的方式干事,更多这样的烦事就会不断发生。这不关Muon有没有中心对齐。也不关Amarok的界面太丑。也不关每次我敲下快捷键后,弹出的音量和亮度调节窗口占用了我一大块的屏幕“房地产”(说真的,有人会去缩小这些东西)。 - -这跟心态的冷漠有关,跟开发者们在为他们的应用设计UI时根本就不多加思考有关。KDE团队做的东西都工作得很好。Amarok能播放音乐。Dragon能播放视频。Kwin或Qt和kdelibs似乎比Mutter/gtk更有力更效率(仅根本我的电池电量消耗计算。非科学性测试)。这些都很好,很重要……但是它们呈现的方式也很重要。甚至可以说,呈现方式是最重要的,因为它是用户看到的和与之交互的东西。 - -KDE应用开发者们……让VDG参与进来吧。让VDG审查并核准每一个”核心“应用,让一个VDG的UI/UX专家来设计应用的使用模式和使用流程,以此保证其直观性。真见鬼,不管你们在开发的是啥应用,仅仅把它的模型发到VDG论坛寻求反馈甚至都可能都能得到一些非常好的指点跟反馈。你有这么好的资源在这,现在赶紧用吧。 - -我不想说得好像我一点都不懂感恩。我爱KDE,我爱那些志愿者们为了给Linux用户一个可视化的桌面而付出的工作与努力,也爱可供选择的Gnome。正是因为我关心我才写这篇文章。因为我想看到更好的KDE,我想看到它走得比以前更加遥远。而这样做需要每个人继续努力,并且需要人们不再躲避批评。它需要人们对系统互动及系统崩溃的地方都保持诚实。如果我们不能直言批评,如果我们不说”这真垃圾!”,那么情况永远不会变好。 - -这周后我会继续使用Gnome吗?可能不,不。Gnome还在试着强迫我接受其工作流,而我不想追随,也不想遵循,因为我在使用它的时候感觉变得不够高效,因为它并不遵循我的思维模式。可是对于我的朋友们,当他们问我“我该用哪种桌面环境?”我可能会推荐Gnome,特别是那些不大懂技术,只要求“能工作”就行的朋友。根据目前KDE的形势来看,这可能是我能说出的最狠毒的评估了。 - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=article&item=gnome-week-editorial&num=5 - -作者:Eric Griffith -译者:[XLCYun](https://github.com/XLCYun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 5cbc818b77dd1743ebac25a7b6f1bac3610a6ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Thu, 20 Aug 2015 01:21:17 +0800 Subject: [PATCH 1790/2517] RHCSA Series--Part 03-Done MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新完成 --- ...ow to Manage Users and Groups in RHEL 7.md | 224 ++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md diff --git a/translated/tech/RHCSA/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md b/translated/tech/RHCSA/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md new file mode 100644 index 0000000000..1436621c4e --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md @@ -0,0 +1,224 @@ +RHCSA 系列: 如何管理RHEL7的用户和组 – Part 3 +================================================================================ +和管理其他Linux服务器一样,管理一个 RHEL 7 服务器 要求你能够添加,修改,暂停或删除用户帐户,并且授予他们文件,目录,其他系统资源所必要的权限。 +![User and Group Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/User-and-Group-Management-in-Linux.png) + +RHCSA: 用户和组管理 – Part 3 + +### 管理用户帐户## + +如果想要给RHEL 7 服务器添加账户,你需要以root用户执行如下两条命令 + + # adduser [new_account] + # useradd [new_account] + +当添加新的用户帐户时,默认会执行下列操作。 + +- 他/她 的主目录就会被创建(一般是"/home/用户名",除非你特别设置) +- 一些隐藏文件 如`.bash_logout`, `.bash_profile` 以及 `.bashrc` 会被复制到用户的主目录,并且会为用户的回话提供环境变量.你可以进一步查看他们的相关细节。 +- 会为您的账号添加一个邮件池目录 +- 会创建一个和用户名同样的组 + +用户帐户的全部信息被保存在`/etc/passwd `文件。这个文件以如下格式保存了每一个系统帐户的所有信息(以:分割) + [username]:[x]:[UID]:[GID]:[Comment]:[Home directory]:[Default shell] + +- `[username]` 和`[Comment]` 是用于自我解释的 +- ‘x’表示帐户的密码保护(详细在`/etc/shadow`文件),就是我们用于登录的`[username]`. +- `[UID]` 和`[GID]`是用于显示`[username]` 的 用户认证和主用户组。 + +最后, + +- `[Home directory]`显示`[username]`的主目录的绝对路径 +- `[Default shell]` 是当用户登录系统后使用的默认shell + +另外一个你必须要熟悉的重要的文件是存储组信息的`/etc/group`.因为和`/etc/passwd`类似,所以也是由:分割 + [Group name]:[Group password]:[GID]:[Group members] + + + +- `[Group name]` 是组名 +- 这个组是否使用了密码 (如果是"X"意味着没有). +- `[GID]`: 和`/etc/passwd`中一样 +- `[Group members]`:用户列表,使用,隔开。里面包含组内的所有用户 + +添加过帐户后,任何时候你都可以通过 usermod 命令来修改用户战壕沟,基础的语法如下: + # usermod [options] [username] + +相关阅读 + +- [15 ‘useradd’ Command Examples][1] +- [15 ‘usermod’ Command Examples][2] + +#### 示例1 : 设置帐户的过期时间 #### + +如果你的公司有一些短期使用的帐户或者你相应帐户在有限时间内使用,你可以使用 `--expiredate` 参数 ,后加YYYY-MM-DD格式的日期。为了查看是否生效,你可以使用如下命令查看 + # chage -l [username] + +帐户更新前后的变动如下图所示 +![Change User Account Information](http://www.tecmint.com/wp-content/uploads/2015/03/Change-User-Account-Information.png) + +修改用户信息 + +#### 示例 2: 向组内追加用户 #### + +除了创建用户时的主用户组,一个用户还能被添加到别的组。你需要使用 -aG或 -append -group 选项,后跟逗号分隔的组名 +#### 示例 3: 修改用户主目录或默认Shell #### + +如果因为一些原因,你需要修改默认的用户主目录(一般为 /home/用户名),你需要使用 -d 或 -home 参数,后跟绝对路径来修改主目录 +如果有用户想要使用其他的shell来取代bash(比如sh ),一般默认是bash .使用 usermod ,并使用 -shell 的参数,后加新的shell的路径 +#### 示例 4: 展示组内的用户 #### + +当把用户添加到组中后,你可以使用如下命令验证属于哪一个组 + + # groups [username] + # id [username] + +下面图片的演示了示例2到示例四 + +![Adding User to Supplementary Group](http://www.tecmint.com/wp-content/uploads/2015/03/Adding-User-to-Supplementary-Group.png) + +添加用户到额外的组 + +在上面的示例中: + + # usermod --append --groups gacanepa,users --home /tmp --shell /bin/sh tecmint + +如果想要从组内删除用户,省略 `--append` 切换,并且可以使用 `--groups` 来列举组内的用户 + +#### 示例 5: 通过锁定密码来停用帐户 #### + +如果想要关闭帐户,你可以使用 -l(小写的L)或 -lock 选项来锁定用户的密码。这将会阻止用户登录。 + +#### 示例 6: 解锁密码 #### + +当你想要重新启用帐户让他可以继续登录时,属于 -u 或 –unlock 选项来解锁用户的密码,就像示例5 介绍的那样 + + # usermod --unlock tecmint + +下面的图片展示了示例5和示例6 + +![Lock Unlock User Account](http://www.tecmint.com/wp-content/uploads/2015/03/Lock-Unlock-User-Account.png) + +锁定上锁用户 + +#### 示例 7:删除组和用户 #### + +如果要删除一个组,你需要使用 groupdel ,如果需要删除用户 你需要使用 userdel (添加 -r 可以删除主目录和邮件池的内容) + # groupdel [group_name] # 删除组 + # userdel -r [user_name] # 删除用户,并删除主目录和邮件池 + +如果一些文件属于组,他们将不会被删除。但是组拥有者将会被设置为删除掉的组的GID +### 列举,设置,并且修改 ugo/rwx 权限 ### + +著名的 [ls 命令][3] 是管理员最好的助手. 当我们使用 -l 参数, 这个工具允许您查看一个目录中的内容(或详细格式). + +而且,该命令还可以应用于单个文件中。无论哪种方式,在“ls”输出中的前10个字符表示每个文件的属性。 +这10个字符序列的第一个字符用于表示文件类型: + +- – (连字符): 一个标准文件 +- d: 一个目录 +- l: 一个符号链接 +- c: 字符设备(将数据作为字节流,即一个终端) +- b: 块设备(处理数据块,即存储设备) + +文件属性的下一个九个字符,分为三个组,被称为文件模式,并注明读(r),写(w),并执行(x)授予文件的所有者,文件的所有组,和其他的用户(通常被称为“世界”)。 +在文件的读取权限允许打开和读取相同的权限时,允许其内容被列出,如果还设置了执行权限,还允许它作为一个程序和运行。 +文件权限是通过chmod命令改变的,它的基本语法如下: + + # chmod [new_mode] file + +new_mode是一个八进制数或表达式,用于指定新的权限。适合每一个随意的案例。或者您已经有了一个更好的方式来设置文件的权限,所以你觉得可以自由地使用最适合你自己的方法。 +八进制数可以基于二进制等效计算,可以从所需的文件权限的文件的所有者,所有组,和世界。一定权限的存在等于2的幂(R = 22,W = 21,x = 20),没有时意为0。例如: +![File Permissions](http://www.tecmint.com/wp-content/uploads/2015/03/File-Permissions.png) + +文件权限 + +在八进制形式下设置文件的权限,如上图所示 + + # chmod 744 myfile + +请用一分钟来对比一下我们以前的计算,在更改文件的权限后,我们的实际输出为: + +![Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/Long-List-Format.png) + +长列表格式 + +#### 示例 8: 寻找777权限的文件 #### + +出于安全考虑,你应该确保在正常情况下,尽可能避免777权限(读、写、执行的文件)。虽然我们会在以后的教程中教你如何更有效地找到所有的文件在您的系统的权限集的说明,你现在仍可以使用LS grep获取这种信息。 +在下面的例子,我们会寻找 /etc 目录下的777权限文件. 注意,我们要使用第二章讲到的管道的知识[第二章:文件和目录管理][4]: + + # ls -l /etc | grep rwxrwxrwx + +![Find All Files with 777 Permission](http://www.tecmint.com/wp-content/uploads/2015/03/Find-All-777-Files.png) + +查找所有777权限的文件 + +#### 示例 9: 为所有用户指定特定权限 #### + +shell脚本,以及一些二进制文件,所有用户都应该有权访问(不只是其相应的所有者和组),应该有相应的执行权限(我们会讨论特殊情况下的问题): + # chmod a+x script.sh + +**注意**: 我们可以设置文件模式使用表示用户权限的字母如“u”,组所有者权限的字母“g”,其余的为o 。所有权限为a.权限可以通过`+` 或 `-` 来管理。 + +![Set Execute Permission on File](http://www.tecmint.com/wp-content/uploads/2015/03/Set-Execute-Permission-on-File.png) + +为文件设置执行权限 + +长目录列表还显示了该文件的所有者和其在第一和第二列中的组主。此功能可作为系统中文件的第一级访问控制方法: + +![Check File Owner and Group](http://www.tecmint.com/wp-content/uploads/2015/03/Check-File-Owner-and-Group.png) + +检查文件的属主和属组 + +改变文件的所有者,您将使用chown命令。请注意,您可以在同一时间或单独的更改文件的所有权: + # chown user:group file + +虽然可以在同一时间更改用户或组,或在同一时间的两个属性,但是不要忘记冒号区分,如果你想要更新其他属性,让另外的选项保持空白: + # chown :group file # Change group ownership only + # chown user: file # Change user ownership only + +#### 示例 10:从一个文件复制权限到另一个文件#### + +If you would like to “clone” ownership from one file to another, you can do so using the –reference flag, as follows: +如果你想“克隆”一个文件的所有权到另一个,你可以这样做,使用–reference参数,如下: + # chown --reference=ref_file file + +ref_file的所有信息会复制给 file + +![Clone File Ownership](http://www.tecmint.com/wp-content/uploads/2015/03/Clone-File-Ownership.png) + +复制文件属主信息 + +### 设置 SETGID 协作目录 ### + +你应该授予在一个特定的目录中拥有访问所有的文件的权限给一个特点的用户组,你将有可能使用目录设置setgid的方法。当setgid后设置,真实用户的有效GID成为团队的主人。 +因此,任何用户都可以访问该文件的组所有者授予的权限的文件。此外,当setgid设置在一个目录中,新创建的文件继承同一组目录,和新创建的子目录也将继承父目录的setgid。 + # chmod g+s [filename] + +为了设置 setgid 在八进制形式,预先准备好数字2 来给基本的权限 + # chmod 2755 [directory] + +### 总结 ### + +扎实的用户和组管理知识,符合规则的,Linux权限管理,以及部分实践,可以帮你快速解决RHEL 7 服务器的文件权限。 +我向你保证,当你按照本文所概述的步骤和使用系统文档(和第一章解释的那样 [Part 1: Reviewing Essential Commands & System Documentation][5] of this series) 你将掌握基本的系统管理的能力。 + +请随时让我们知道你是否有任何问题或意见使用下面的表格。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ + +作者:[Gabriel Cánepa][a] +译者:[xiqingongzi](https://github.com/xiqingongzi) +校对:[校对者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/add-users-in-linux/ +[2]:http://www.tecmint.com/usermod-command-examples/ +[3]:http://www.tecmint.com/ls-interview-questions/ +[4]:http://www.tecmint.com/file-and-directory-management-in-linux/ +[5]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ From a450026ce4ddab845ce40bffc5f6e6c86e79da78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Thu, 20 Aug 2015 01:21:53 +0800 Subject: [PATCH 1791/2517] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ow to Manage Users and Groups in RHEL 7.md | 249 ------------------ 1 file changed, 249 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md deleted file mode 100644 index 0b85744c6c..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md +++ /dev/null @@ -1,249 +0,0 @@ -[translated by xiqingongzi] -RHCSA Series: How to Manage Users and Groups in RHEL 7 – Part 3 -================================================================================ -Managing a RHEL 7 server, as it is the case with any other Linux server, will require that you know how to add, edit, suspend, or delete user accounts, and grant users the necessary permissions to files, directories, and other system resources to perform their assigned tasks. - -![User and Group Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/User-and-Group-Management-in-Linux.png) - -RHCSA: User and Group Management – Part 3 - -### Managing User Accounts ### - -To add a new user account to a RHEL 7 server, you can run either of the following two commands as root: - - # adduser [new_account] - # useradd [new_account] - -When a new user account is added, by default the following operations are performed. - -- His/her home directory is created (`/home/username` unless specified otherwise). -- These `.bash_logout`, `.bash_profile` and `.bashrc` hidden files are copied inside the user’s home directory, and will be used to provide environment variables for his/her user session. You can explore each of them for further details. -- A mail spool directory is created for the added user account. -- A group is created with the same name as the new user account. - -The full account summary is stored in the `/etc/passwd `file. This file holds a record per system user account and has the following format (fields are separated by a colon): - - [username]:[x]:[UID]:[GID]:[Comment]:[Home directory]:[Default shell] - -- These two fields `[username]` and `[Comment]` are self explanatory. -- The second filed ‘x’ indicates that the account is secured by a shadowed password (in `/etc/shadow`), which is used to logon as `[username]`. -- The fields `[UID]` and `[GID]` are integers that shows the User IDentification and the primary Group IDentification to which `[username]` belongs, equally. - -Finally, - -- The `[Home directory]` shows the absolute location of `[username]’s` home directory, and -- `[Default shell]` is the shell that is commit to this user when he/she logins into the system. - -Another important file that you must become familiar with is `/etc/group`, where group information is stored. As it is the case with `/etc/passwd`, there is one record per line and its fields are also delimited by a colon: - - [Group name]:[Group password]:[GID]:[Group members] - -where, - -- `[Group name]` is the name of group. -- Does this group use a group password? (An “x” means no). -- `[GID]`: same as in `/etc/passwd`. -- `[Group members]`: a list of users, separated by commas, that are members of each group. - -After adding an account, at anytime, you can edit the user’s account information using usermod, whose basic syntax is: - - # usermod [options] [username] - -Read Also: - -- [15 ‘useradd’ Command Examples][1] -- [15 ‘usermod’ Command Examples][2] - -#### EXAMPLE 1: Setting the expiry date for an account #### - -If you work for a company that has some kind of policy to enable account for a certain interval of time, or if you want to grant access to a limited period of time, you can use the `--expiredate` flag followed by a date in YYYY-MM-DD format. To verify that the change has been applied, you can compare the output of - - # chage -l [username] - -before and after updating the account expiry date, as shown in the following image. - -![Change User Account Information](http://www.tecmint.com/wp-content/uploads/2015/03/Change-User-Account-Information.png) - -Change User Account Information - -#### EXAMPLE 2: Adding the user to supplementary groups #### - -Besides the primary group that is created when a new user account is added to the system, a user can be added to supplementary groups using the combined -aG, or –append –groups options, followed by a comma separated list of groups. - -#### EXAMPLE 3: Changing the default location of the user’s home directory and / or changing its shell #### - -If for some reason you need to change the default location of the user’s home directory (other than /home/username), you will need to use the -d, or –home options, followed by the absolute path to the new home directory. - -If a user wants to use another shell other than bash (for example, sh), which gets assigned by default, use usermod with the –shell flag, followed by the path to the new shell. - -#### EXAMPLE 4: Displaying the groups an user is a member of #### - -After adding the user to a supplementary group, you can verify that it now actually belongs to such group(s): - - # groups [username] - # id [username] - -The following image depicts Examples 2 through 4: - -![Adding User to Supplementary Group](http://www.tecmint.com/wp-content/uploads/2015/03/Adding-User-to-Supplementary-Group.png) - -Adding User to Supplementary Group - -In the example above: - - # usermod --append --groups gacanepa,users --home /tmp --shell /bin/sh tecmint - -To remove a user from a group, omit the `--append` switch in the command above and list the groups you want the user to belong to following the `--groups` flag. - -#### EXAMPLE 5: Disabling account by locking password #### - -To disable an account, you will need to use either the -l (lowercase L) or the –lock option to lock a user’s password. This will prevent the user from being able to log on. - -#### EXAMPLE 6: Unlocking password #### - -When you need to re-enable the user so that he can log on to the server again, use the -u or the –unlock option to unlock a user’s password that was previously blocked, as explained in Example 5 above. - - # usermod --unlock tecmint - -The following image illustrates Examples 5 and 6: - -![Lock Unlock User Account](http://www.tecmint.com/wp-content/uploads/2015/03/Lock-Unlock-User-Account.png) - -Lock Unlock User Account - -#### EXAMPLE 7: Deleting a group or an user account #### - -To delete a group, you’ll want to use groupdel, whereas to delete a user account you will use userdel (add the –r switch if you also want to delete the contents of its home directory and mail spool): - - # groupdel [group_name] # Delete a group - # userdel -r [user_name] # Remove user_name from the system, along with his/her home directory and mail spool - -If there are files owned by group_name, they will not be deleted, but the group owner will be set to the GID of the group that was deleted. - -### Listing, Setting and Changing Standard ugo/rwx Permissions ### - -The well-known [ls command][3] is one of the best friends of any system administrator. When used with the -l flag, this tool allows you to view a list a directory’s contents in long (or detailed) format. - -However, this command can also be applied to a single file. Either way, the first 10 characters in the output of `ls -l` represent each file’s attributes. - -The first char of this 10-character sequence is used to indicate the file type: - -- – (hyphen): a regular file -- d: a directory -- l: a symbolic link -- c: a character device (which treats data as a stream of bytes, i.e. a terminal) -- b: a block device (which handles data in blocks, i.e. storage devices) - -The next nine characters of the file attributes, divided in groups of three from left to right, are called the file mode and indicate the read (r), write(w), and execute (x) permissions granted to the file’s owner, the file’s group owner, and the rest of the users (commonly referred to as “the world”), respectively. - -While the read permission on a file allows the same to be opened and read, the same permission on a directory allows its contents to be listed if the execute permission is also set. In addition, the execute permission in a file allows it to be handled as a program and run. - -File permissions are changed with the chmod command, whose basic syntax is as follows: - - # chmod [new_mode] file - -where new_mode is either an octal number or an expression that specifies the new permissions. Feel free to use the mode that works best for you in each case. Or perhaps you already have a preferred way to set a file’s permissions – so feel free to use the method that works best for you. - -The octal number can be calculated based on the binary equivalent, which can in turn be obtained from the desired file permissions for the owner of the file, the owner group, and the world.The presence of a certain permission equals a power of 2 (r=22, w=21, x=20), while its absence means 0. For example: - -![File Permissions](http://www.tecmint.com/wp-content/uploads/2015/03/File-Permissions.png) - -File Permissions - -To set the file’s permissions as indicated above in octal form, type: - - # chmod 744 myfile - -Please take a minute to compare our previous calculation to the actual output of `ls -l` after changing the file’s permissions: - -![Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/Long-List-Format.png) - -Long List Format - -#### EXAMPLE 8: Searching for files with 777 permissions #### - -As a security measure, you should make sure that files with 777 permissions (read, write, and execute for everyone) are avoided like the plague under normal circumstances. Although we will explain in a later tutorial how to more effectively locate all the files in your system with a certain permission set, you can -by now- combine ls with grep to obtain such information. - -In the following example, we will look for file with 777 permissions in the /etc directory only. Note that we will use pipelining as explained in [Part 2: File and Directory Management][4] of this RHCSA series: - - # ls -l /etc | grep rwxrwxrwx - -![Find All Files with 777 Permission](http://www.tecmint.com/wp-content/uploads/2015/03/Find-All-777-Files.png) - -Find All Files with 777 Permission - -#### EXAMPLE 9: Assigning a specific permission to all users #### - -Shell scripts, along with some binaries that all users should have access to (not just their corresponding owner and group), should have the execute bit set accordingly (please note that we will discuss a special case later): - - # chmod a+x script.sh - -**Note**: That we can also set a file’s mode using an expression that indicates the owner’s rights with the letter `u`, the group owner’s rights with the letter `g`, and the rest with `o`. All of these rights can be represented at the same time with the letter `a`. Permissions are granted (or revoked) with the `+` or `-` signs, respectively. - -![Set Execute Permission on File](http://www.tecmint.com/wp-content/uploads/2015/03/Set-Execute-Permission-on-File.png) - -Set Execute Permission on File - -A long directory listing also shows the file’s owner and its group owner in the first and second columns, respectively. This feature serves as a first-level access control method to files in a system: - -![Check File Owner and Group](http://www.tecmint.com/wp-content/uploads/2015/03/Check-File-Owner-and-Group.png) - -Check File Owner and Group - -To change file ownership, you will use the chown command. Note that you can change the file and group ownership at the same time or separately: - - # chown user:group file - -**Note**: That you can change the user or group, or the two attributes at the same time, as long as you don’t forget the colon, leaving user or group blank if you want to update the other attribute, for example: - - # chown :group file # Change group ownership only - # chown user: file # Change user ownership only - -#### EXAMPLE 10: Cloning permissions from one file to another #### - -If you would like to “clone” ownership from one file to another, you can do so using the –reference flag, as follows: - - # chown --reference=ref_file file - -where the owner and group of ref_file will be assigned to file as well: - -![Clone File Ownership](http://www.tecmint.com/wp-content/uploads/2015/03/Clone-File-Ownership.png) - -Clone File Ownership - -### Setting Up SETGID Directories for Collaboration ### - -Should you need to grant access to all the files owned by a certain group inside a specific directory, you will most likely use the approach of setting the setgid bit for such directory. When the setgid bit is set, the effective GID of the real user becomes that of the group owner. - -Thus, any user can access a file under the privileges granted to the group owner of such file. In addition, when the setgid bit is set on a directory, newly created files inherit the same group as the directory, and newly created subdirectories will also inherit the setgid bit of the parent directory. - - # chmod g+s [filename] - -To set the setgid in octal form, prepend the number 2 to the current (or desired) basic permissions. - - # chmod 2755 [directory] - -### Conclusion ### - -A solid knowledge of user and group management, along with standard and special Linux permissions, when coupled with practice, will allow you to quickly identify and troubleshoot issues with file permissions in your RHEL 7 server. - -I assure you that as you follow the steps outlined in this article and use the system documentation (as explained in [Part 1: Reviewing Essential Commands & System Documentation][5] of this series) you will master this essential competence of system administration. - -Feel free to let us know if you have any questions or comments using the form below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ - -作者:[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/add-users-in-linux/ -[2]:http://www.tecmint.com/usermod-command-examples/ -[3]:http://www.tecmint.com/ls-interview-questions/ -[4]:http://www.tecmint.com/file-and-directory-management-in-linux/ -[5]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ From c4c3eca5f243fd41b4cfa2da2cca0aa2bdf9517c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Thu, 20 Aug 2015 01:24:52 +0800 Subject: [PATCH 1792/2517] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?=E3=80=91RHCSA=20Series--Part=2007?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... (Access Control Lists) and Mounting Samba or NFS Shares.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md index d4801d9923..f8d9d45d27 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md @@ -1,3 +1,4 @@ +[xiqingongzi Translating] RHCSA Series: Using ACLs (Access Control Lists) and Mounting Samba / NFS Shares – Part 7 ================================================================================ In the last article ([RHCSA series Part 6][1]) we started explaining how to set up and configure local system storage using parted and ssm. @@ -209,4 +210,4 @@ via: http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares [a]:http://www.tecmint.com/author/gacanepa/ [1]:http://www.tecmint.com/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ [2]:http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ -[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html \ No newline at end of file +[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html From 9c78c7296ec672e8e0825d08106bcba40362f8f4 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 20 Aug 2015 10:03:16 +0800 Subject: [PATCH 1793/2517] Update 20150728 Process of the Linux kernel building.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译到line 600 --- ...28 Process of the Linux kernel building.md | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index e55605f863..c622e43ba0 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -482,12 +482,16 @@ $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.build obj=. The [scripts/Makefile.build](https://github.com/torvalds/linux/blob/master/scripts/Makefile.build) tries to find the `Kbuild` file by the given directory via the `obj` parameter, include this `Kbuild` files: +参数`obj` 会告诉脚本[scripts/Makefile.build](https://github.com/torvalds/linux/blob/master/scripts/Makefile.build) 那些目录包含`kbuild` 文件,脚本以此来寻找各个`kbuild` 文件: + ```Makefile include $(kbuild-file) ``` and build targets from it. In our case `.` contains the [Kbuild](https://github.com/torvalds/linux/blob/master/Kbuild) file that generates the `kernel/bounds.s` and the `arch/x86/kernel/asm-offsets.s`. After this the `prepare` target finished to work. The `vmlinux-dirs` also depends on the second target - `scripts` that compiles following programs: `file2alias`, `mk_elfconfig`, `modpost` and etc... After scripts/host-programs compilation our `vmlinux-dirs` target can be executed. First of all let's try to understand what does `vmlinux-dirs` contain. For my case it contains paths of the following kernel directories: +然后根据这个构建目标。我们这里`.` 包含了[Kbuild](https://github.com/torvalds/linux/blob/master/Kbuild),就用这个文件来生成`kernel/bounds.s` 和`arch/x86/kernel/asm-offsets.s`。这样目标`prepare` 就完成了它的工作。`vmlinux-dirs` 也依赖于第二个目标——`scripts` ,`scripts`会编译接下来的几个程序:`filealias`,`mk_elfconfig`,`modpost`等等。`scripts/host-programs` 编译完之后,我们的目标`vmlinux-dirs` 就可以开始编译了。第一步,我们先来理解一下`vmlinux-dirs` 都包含了那些东西。在我们的例子中它包含了接下来的内核目录的路径: + ``` init usr arch/x86 kernel mm fs ipc security crypto block drivers sound firmware arch/x86/pci arch/x86/power @@ -496,6 +500,8 @@ arch/x86/video net lib arch/x86/lib We can find definition of the `vmlinux-dirs` in the top [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) of the Linux kernel: +我们可以在内核的根[Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 里找到`vmlinux-dirs` 的定义: + ```Makefile vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ @@ -512,6 +518,8 @@ libs-y := lib/ Here we remove the `/` symbol from the each directory with the help of the `patsubst` and `filter` functions and put it to the `vmlinux-dirs`. So we have list of directories in the `vmlinux-dirs` and the following code: +这里我们借助函数`patsubst` 和`filter`去掉了每个目录路径里的符号`/`,并且把结果放到`vmlinux-dirs` 里。所以我们就有了`vmlinux-dirs` 里的目录的列表,以及下面的代码: + ```Makefile $(vmlinux-dirs): prepare scripts $(Q)$(MAKE) $(build)=$@ @@ -519,6 +527,8 @@ $(vmlinux-dirs): prepare scripts The `$@` represents `vmlinux-dirs` here that means that it will go recursively over all directories from the `vmlinux-dirs` and its internal directories (depens on configuration) and will execute `make` in there. We can see it in the output: +符号`$@` 在这里代表了`vmlinux-dirs`,这就表明程序会递归遍历从`vmlinux-dirs` 以及它内部的全部目录(依赖于配置),并且在对应的目录下执行`make` 命令。我们可以在输出看到结果: + ``` CC init/main.o CHK include/generated/compile.h @@ -535,7 +545,7 @@ The `$@` represents `vmlinux-dirs` here that means that it will go recursively o ``` Source code in each directory will be compiled and linked to the `built-in.o`: - +每个目录下的源代码将会被编译并且链接到`built-io.o` 里: ``` $ find . -name built-in.o ./arch/x86/crypto/built-in.o @@ -549,6 +559,8 @@ $ find . -name built-in.o Ok, all buint-in.o(s) built, now we can back to the `vmlinux` target. As you remember, the `vmlinux` target is in the top Makefile of the Linux kernel. Before the linking of the `vmlinux` it builds [samples](https://github.com/torvalds/linux/tree/master/samples), [Documentation](https://github.com/torvalds/linux/tree/master/Documentation) and etc., but I will not describe it in this part as I wrote in the beginning of this part. +好了,所有的`built-in.o` 都构建完了,现在我们回到目标`vmlinux` 上。你应该还记得,目标`vmlinux` 是在内核的根makefile 里。在链接`vmlinux` 之前,系统会构建[samples](https://github.com/torvalds/linux/tree/master/samples), [Documentation](https://github.com/torvalds/linux/tree/master/Documentation)等等,但是如上文所述,我不会在本文描述这些。 + ```Makefile vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE ... @@ -558,6 +570,8 @@ vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE As you can see main purpose of it is a call of the [scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) script is linking of the all `built-in.o`(s) to the one statically linked executable and creation of the [System.map](https://en.wikipedia.org/wiki/System.map). In the end we will see following output: +你可以看到,`vmlinux` 的调用脚本[scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) 的主要目的是把所有的`built-in.o` 链接成一个静态可执行文件、生成[System.map](https://en.wikipedia.org/wiki/System.map)。 最后我们来看看下面的输出: + ``` LINK vmlinux LD vmlinux.o @@ -575,7 +589,7 @@ As you can see main purpose of it is a call of the [scripts/link-vmlinux.sh](htt ``` and `vmlinux` and `System.map` in the root of the Linux kernel source tree: - +还有内核源码树根目录下的`vmlinux` 和`System.map` ``` $ ls vmlinux System.map System.map vmlinux @@ -583,7 +597,10 @@ System.map vmlinux That's all, `vmlinux` is ready. The next step is creation of the [bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage). +这就是全部了,`vmlinux` 构建好了,下一步就是创建[bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage). + Building bzImage +制作bzImage -------------------------------------------------------------------------------- The `bzImage` is the compressed Linux kernel image. We can get it with the execution of the `make bzImage` after the `vmlinux` built. In other way we can just execute `make` without arguments and will get `bzImage` anyway because it is default image: From 60092d5f44b9660dca43a1fe5e8df24cf19073c1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 20 Aug 2015 16:16:43 +0800 Subject: [PATCH 1794/2517] =?UTF-8?q?20150820-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...con--The Changing Role of the Server OS.md | 49 +++++++++++++++++++ ... Torvalds muses about open-source software.md | 46 +++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md create mode 100644 sources/talk/20150820 LinuxCon's surprise keynote speaker ​Linus Torvalds muses about open-source software.md diff --git a/sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md b/sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md new file mode 100644 index 0000000000..8f6d80c7e9 --- /dev/null +++ b/sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md @@ -0,0 +1,49 @@ +Linuxcon: The Changing Role of the Server OS +================================================================================ +SEATTLE - Containers might one day change the world, but it will take time and it will also change the role of the operating system. That's the message delivered during a Linuxcon keynote here today by Wim Coekaerts, SVP Linux and virtualization engineering at Oracle. + +![](http://www.serverwatch.com/imagesvr_ce/6421/wim-200x150.jpg) + +Coekaerts started his presentation by putting up a slide stating it's the year of the desktop, which generated a few laughs from the audience. Oracle Wim Coekarts Truly, though, Coekaerts said it is now apparent that 2015 is the year of the container, and more importantly the year of the application, which is what containers really are all about. + +"What do you need an operating system for?" Coekaerts asked. "It's really just there to run an application; an operating system is there to manage hardware and resources so your app can run." + +Coekaerts added that with Docker containers, the focus is once again on the application. At Oracle, Coekaerts said much of the focus is on how to make the app run better on the OS. + +"Many people are used to installing apps, but many of the younger generation just click a button on their mobile device and it runs," Coekaerts said. + +Coekaerts said that people now wonder why it's more complex in the enterprise to install software, and Docker helps to change that. + +"The role of the operating system is changing," Coekaerts said. + +The rise of Docker does not mean the demise of virtual machines (VMs), though. Coekaerts said it will take a very long time for things to mature in the containerization space and get used in real world. + +During that period VMs and containers will co-exist and there will be a need for transition and migration tools between containers and VMs. For example, Coekaerts noted that Oracle's VirtualBox open-source technology is widely used on desktop systems today as a way to help users run Docker. The Docker Kitematic project makes use of VirtualBox to boot Docker on Macs today. + +### The Open Compute Initiative and Write Once, Deploy Anywhere for Containers ### + +A key promise that needs to be enabled for containers to truly be successful is the concept of write once, deploy anywhere. That's an area where the Linux Foundations' Open Compute Initiative (OCI) will play a key role in enabling interoperability across container runtimes. + +"With OCI, it will make it easier to build once and run anywhere, so what you package locally you can run wherever you want," Coekaerts said. + +Overall, though, Coekaerts said that while there is a lot of interest in moving to the container model, it's not quite ready yet. He noted Oracle is working on certifying its products to run in containers, but it's a hard process. + +"Running the database is easy; it's everything else around it that is complex," Coekaerts said. "Containers don't behave the same as VMs, and some applications depend on low-level system configuration items that are not exposed from the host to the container." + +Additionally, Coekaerts commented that debugging problems inside a container is different than in a VM, and there is currently a lack of mature tools for proper container app debugging. + +Coekaerts emphasized that as containers matures it's important to not forget about the existing technology that organizations use to run and deploy applications on servers today. He said enterprises don't typically throw out everything they have just to start with new technology. + +"Deploying new technology is hard, and you need to be able to transition from what you have," Coekaerts said. "The technology that allows you to transition easily is the technology that wins." + +-------------------------------------------------------------------------------- + +via: http://www.serverwatch.com/server-news/linuxcon-the-changing-role-of-the-server-os.html + +作者:[Sean Michael Kerner][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.serverwatch.com/author/Sean-Michael-Kerner-101580.htm \ No newline at end of file diff --git a/sources/talk/20150820 LinuxCon's surprise keynote speaker ​Linus Torvalds muses about open-source software.md b/sources/talk/20150820 LinuxCon's surprise keynote speaker ​Linus Torvalds muses about open-source software.md new file mode 100644 index 0000000000..c045233630 --- /dev/null +++ b/sources/talk/20150820 LinuxCon's surprise keynote speaker ​Linus Torvalds muses about open-source software.md @@ -0,0 +1,46 @@ +LinuxCon's surprise keynote speaker ​Linus Torvalds muses about open-source software +================================================================================ +> In a broad-ranging question and answer session, Linus Torvalds, Linux's founder, shared his thoughts on the current state of open source and Linux. + +**SEATTLE** -- [LinuxCon][1] attendees got an early Christmas present when the Wednesday morning "surprise" keynote speaker turned out to be Linux's founder, Linus Torvalds. + +![zemlin-and-torvalds-08192015-1.jpg](http://zdnet2.cbsistatic.com/hub/i/2015/08/19/9951f05a-fedf-4bf4-a4a1-3b4a15458de6/c19c89ded58025eccd090787ba40e803/zemlin-and-torvalds-08192015-1.jpg) + +Jim Zemlin and Linus Torvalds shooting the breeze at LinuxCon in Seattle. -- sjvn + +Jim Zemlin, the Linux Foundation's executive director, opened the question and answer session by quoting from a recent article about Linus, "[Torvalds may be the most influential individual economic force][2] of the past 20 years. ... Torvalds has, in effect, been as instrumental in retooling the production lines of the modern economy as Henry Ford was 100 years earlier." + +Torvalds replied, "I don't think I'm all that powerful, but I'm glad to get all the credit for open source." For someone who's arguably been more influential on technology than Bill Gates, Steve Jobs, or Larry Ellison, Torvalds remains amusingly modest. That's probably one reason [Torvalds, who doesn't suffer fools gladly][3], remains the unchallenged leader of Linux. + +It also helps that he doesn't take himself seriously, except when it comes to code quality. Zemlin reminded him that he was also described in the same article as being "5-feet, ho-hum tall with a paunch, ... his body type and gait resemble that of Tux, the penguin mascot of Linux." Torvald's reply was to grin and say "What is this? A roast?" He added that 5'8" was a perfectly good height. + +More seriously, Zemlin asked Torvalds what he thought about the current excitement over containers. Indeed, at times LinuxCon has felt like DockerCon. Torvalds replied, "I'm glad that the kernel is far removed from containers and other buzzwords. We only care about just the kernel. I'm so focused on the kernel I really don't care. I don't get involved in the politics above the kernel and I'm really happy that I don't know." + +Moving on, Zemlin asked Torvalds what he thought about the demand from the Internet of Things (IoT) for an even smaller Linux kernel. "Everyone has always wished for a smaller kernel," Torvalds said. "But, with all the modules it's still tens of MegaBytes in size. It's shocking that it used to fit into a MB. We'd like it to be mean lean, mean IT machine again." + +But, "Torvalds continued, "It's hard to get rid of unnecessary fat. Things tend to grow. Realistically I don't think we can get down to the sizes we were 20 years ago." + +As for security, the next topic, Torvalds said, "I'm at odds with the security community. They tend to see technology as black and white. If it's not security they don't care at all about it." The truth is "security is bugs. Most of the security issues we've had in the kernel hasn't been that big. Most of them have been really stupid and then some clever person takes advantage of it." + +The bottom line is, "We'll never get rid of bugs so security will never be perfect. We do try to be really careful about code. With user space we have to be very strict." But, "Bugs happen and all you can do is mitigate them. Open source is doing fairly well, but anyone who thinks we'll ever be completely secure is foolish." + +Zemlin concluded by asking Torvalds where he saw Linux ten years from now. Torvalds replied that he doesn't look at it this way. "I'm plodding, pedestrian, I look ahead six months, I don't plan 10 years ahead. I think that's insane." + +Sure, "companies plan ten years, and their plans use open source. Their whole process is very forward thinking. But I'm not worried about 10 years ahead. I look to the next release and the release beyond that." + +For Torvalds, who works at home where "the FedEx guy is no longer surprised to find me in my bathrobe at 2 in the afternoon," looking ahead a few months works just fine. And so do all the businesses -- both technology-based Amazon, Google, Facebook and more mainstream, WalMart, the New York Stock Exchange, and McDonalds -- that live on Linux every day. + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/linus-torvalds-muses-about-open-source-software/ + +作者:[Steven J. Vaughan-Nichols][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.zdnet.com/meet-the-team/us/steven-j-vaughan-nichols/ +[1]:http://events.linuxfoundation.org/events/linuxcon-north-america +[2]:http://www.bloomberg.com/news/articles/2015-06-16/the-creator-of-linux-on-the-future-without-him +[3]:http://www.zdnet.com/article/linus-torvalds-finds-gnome-3-4-to-be-a-total-user-experience-design-failure/ \ No newline at end of file From 42ff87dfae1d59fe49974424b2849c3fbfc88a66 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 20 Aug 2015 16:31:42 +0800 Subject: [PATCH 1795/2517] =?UTF-8?q?20150820-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ook at What's Next for the Linux Kernel.md | 49 ++++++ ...butions Would Presidential Hopefuls Run.md | 53 +++++++ .../20150820 Why did you start using Linux.md | 147 ++++++++++++++++++ 3 files changed, 249 insertions(+) create mode 100644 sources/talk/20150820 A Look at What's Next for the Linux Kernel.md create mode 100644 sources/talk/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md create mode 100644 sources/talk/20150820 Why did you start using Linux.md diff --git a/sources/talk/20150820 A Look at What's Next for the Linux Kernel.md b/sources/talk/20150820 A Look at What's Next for the Linux Kernel.md new file mode 100644 index 0000000000..9705fd3a90 --- /dev/null +++ b/sources/talk/20150820 A Look at What's Next for the Linux Kernel.md @@ -0,0 +1,49 @@ +A Look at What's Next for the Linux Kernel +================================================================================ +![](http://www.eweek.com/imagesvr_ce/485/290x195cilinux1.jpg) + +**The upcoming Linux 4.2 kernel will have more contributors than any other Linux kernel in history, according to Linux kernel developer Jonathan Corbet.** + +SEATTLE—The Linux kernel continues to grow—both in lines of code and the number of developers that contribute to it—yet some challenges need to be addressed. That was one of the key messages from Linux kernel developer Jonathan Corbet during his annual Kernel Report session at the LinuxCon conference here. + +The Linux 4.2 kernel is still under development, with general availability expected on Aug. 23. Corbet noted that 1,569 developers have contributed code for the Linux 4.2 kernel. Of those, 277 developers made their first contribution ever, during the Linux 4.2 development cycle. + +Even as more developers are coming to Linux, the pace of development and releases is very fast, Corbet said. He estimates that it now takes approximately 63 days for the community to build a new Linux kernel milestone. + +Linux 4.2 will benefit from a number of improvements that have been evolving in Linux over the last several releases. One such improvement is the introduction of OverlayFS, a new type of read-only file system that is useful because it can enable many containers to be layered on top of each other, Corbet said. + +Linux networking also is set to improve small packet performance, which is important for areas such as high-frequency financial trading. The improvements are aimed at reducing the amount of time and power needed to process each data packet, Corbet said. + +New drivers are always being added to Linux. On average, there are 60 to 80 new or updated drivers added in every Linux kernel development cycle, Corbet said. + +Another key area that continues to improve is that of Live Kernel patching, first introduced in the Linux 4.0 kernel. With live kernel patching, the promise is that a system administrator can patch a live running kernel without the need to reboot a running production system. While the basic elements of live kernel patching are in the kernel already, work is under way to make the technology all work with the right level of consistency and stability, Corbet explained. + +**Linux Security, IoT and Other Concerns** + +Security has been a hot topic in the open-source community in the past year due to high-profile issues, including Heartbleed and Shellshock. + +"I don't doubt there are some unpleasant surprises in the neglected Linux code at this point," Corbet said. + +He noted that there are more than 3 millions lines of code in the Linux kernel today that have been untouched in the last decade by developers and that the Shellshock vulnerability was a flaw in 20-year-old code that hadn't been looked at in some time. + +Another issue that concerns Corbet is the Unix 2038 issue—the Linux equivalent of the Y2K bug, which could have caused global havoc in the year 2000 if it hadn't been fixed. With the 2038 issue, there is a bug that could shut down Linux and Unix machines in the year 2038. Corbet said that while 2038 is still 23 years away, there are systems being deployed now that will be in use in the 2038. + +Some initial work took place to fix the 2038 flaw in Linux, but much more remains to be done, Corbet said. "The time to fix this is now, not 20 years from now in a panic when we're all trying to enjoy our retirement," Corbet said. + +The Internet of things (IoT) is another area of Linux concern for Corbet. Today, Linux is a leading embedded operating system for IoT, but that might not always be the case. Corbet is concerned that the Linux kernel's growth is making it too big in terms of memory footprint to work in future IoT devices. + +A Linux project is now under way to minimize the size of the Linux kernel, and it's important that it gets the support it needs, Corbet said. + +"Either Linux is suitable for IoT, or something else will come along and that something else might not be as free and open as Linux," Corbet said. "We can't assume the continued dominance of Linux in IoT. We have to earn it. We have to pay attention to stuff that makes the kernel bigger." + +-------------------------------------------------------------------------------- + +via: http://www.eweek.com/enterprise-apps/a-look-at-whats-next-for-the-linux-kernel.html + +作者:[Sean Michael Kerner][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.eweek.com/cp/bio/Sean-Michael-Kerner/ \ No newline at end of file diff --git a/sources/talk/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md b/sources/talk/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md new file mode 100644 index 0000000000..2a850a7468 --- /dev/null +++ b/sources/talk/20150820 Which Open Source Linux Distributions Would Presidential Hopefuls Run.md @@ -0,0 +1,53 @@ +Which Open Source Linux Distributions Would Presidential Hopefuls Run? +================================================================================ +![Republican presidential candidate Donald Trump +](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/08/donaldtrump.jpg) + +Republican presidential candidate Donald Trump + +If people running for president used Linux or another open source operating system, which distribution would it be? That's a key question that the rest of the press—distracted by issues of questionable relevance such as "policy platforms" and whether it's appropriate to add an exclamation point to one's Christian name—has been ignoring. But the ignorance ends here: Read on for this sometime-journalist's take on presidential elections and Linux distributions. + +If this sounds like a familiar topic to those of you who have been reading my drivel for years (is anyone, other than my dear editor, unfortunate enough to have actually done that?), it's because I wrote a [similar post][1] during the last presidential election cycle. Some kind readers took that article more seriously than I intended, so I'll take a moment to point out that I don't actually believe that open source software and political campaigns have anything meaningful to do with one another. I am just trying to amuse myself at the start of a new week. + +But you can make of this what you will. You're the reader, after all. + +### Linux Distributions of Choice: Republicans ### + +Today, I'll cover just the Republicans. And I won't even discuss all of them, since the candidates hoping for the Republican party's nomination are too numerous to cover fully here in one post. But for starters: + +If **Jeb (Jeb!?) Bush** ran Linux, it would be [Debian][2]. It's a relatively boring distribution designed for serious, grown-up hackers—the kind who see it as their mission to be the adults in the pack and clean up the messes that less-experienced open source fans create. Of course, this also makes Debian relatively unexciting, and its user base remains perennially small as a result. + +**Scott Walker**, for his part, would be a [Damn Small Linux][3] (DSL) user. Requiring merely 50MB of disk space and 16MB of RAM to run, DSL can breathe new life into 20-year-old 486 computers—which is exactly what a cost-cutting guru like Walker would want. Of course, the user experience you get from DSL is damn primitive; the platform barely runs a browser. But at least you won't be wasting money on new computer hardware when the stuff you bought in 1993 can still serve you perfectly well. + +How about **Chris Christie**? He'd obviously be clinging to [Relax-and-Recover Linux][4], which bills itself as a "setup-and-forget Linux bare metal disaster recovery solution." "Setup-and-forget" has basically been Christie's political strategy ever since that unfortunate incident on the George Washington Bridge stymied his political momentum. Disaster recovery may or may not bring back everything for Christie in the end, but at least he might succeed in recovering a confidential email or two that accidentally disappeared when his computer crashed. + +As for **Carly Fiorina**, she'd no doubt be using software developed for "[The Machine][5]" operating system from [Hewlett-Packard][6] (HPQ), the company she led from 1999 to 2005. The Machine actually may run several different operating systems, which may or may not be based on Linux—details remain unclear—and its development began well after Fiorina's tenure at HP came to a conclusion. Still, her roots as a successful executive in the IT world form an important part of her profile today, meaning that her ties to HP have hardly been severed fully. + +Last but not least—and you knew this was coming—there's **Donald Trump**. He'd most likely pay a team of elite hackers millions of dollars to custom-build an operating system just for him—even though he could obtain a perfectly good, ready-made operating system for free—to show off how much money he has to waste. He'd then brag about it being the best operating system ever made, though it would of course not be compliant with POSIX or anything else, because that would mean catering to the establishment. The platform would also be totally undocumented, since, if Trump explained how his operating system actually worked, he'd risk giving away all his secrets to the Islamic State—obviously. + +Alternatively, if Trump had to go with a Linux platform already out there, [Ubuntu][7] seems like the most obvious choice. Like Trump, the Ubuntu developers have taken a we-do-what-we-want approach to building open source software by implementing their own, sometimes proprietary applications and interfaces. Free-software purists hate Ubuntu for that, but plenty of ordinary people like it a lot. Of course, whether playing purely by your own rules—in the realms of either software or politics—is sustainable in the long run remains to be seen. + +### Stay Tuned ### + +If you're wondering why I haven't yet mentioned the Democratic candidates, worry not. I am not leaving them out of today's writing because I like them any more or less than the Republicans. (Personally, I think the peculiar American practice of having only two viable political parties—which virtually no other functioning democracy does—is ridiculous, and I am suspicious of all of these candidates as a result.) + +On the contrary, there's plenty to say about the Linux distributions the Democrats might use, too. And I will, in a future post. Stay tuned. + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/081715/which-open-source-linux-distributions-would-presidential- + +作者:[Christopher Tozzi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:http://thevarguy.com/open-source-application-software-companies/aligning-linux-distributions-presidential-hopefuls +[2]:http://debian.org/ +[3]:http://www.damnsmalllinux.org/ +[4]:http://relax-and-recover.org/ +[5]:http://thevarguy.com/open-source-application-software-companies/061614/hps-machine-open-source-os-truly-revolutionary +[6]:http://hp.com/ +[7]:http://ubuntu.com/ \ No newline at end of file diff --git a/sources/talk/20150820 Why did you start using Linux.md b/sources/talk/20150820 Why did you start using Linux.md new file mode 100644 index 0000000000..f83742a7a1 --- /dev/null +++ b/sources/talk/20150820 Why did you start using Linux.md @@ -0,0 +1,147 @@ +Why did you start using Linux? +================================================================================ +> In today's open source roundup: What got you started with Linux? Plus: IBM's Linux only Mainframe. And why you should skip Windows 10 and go with Linux + +### Why did you start using Linux? ### + +Linux has become quite popular over the years, with many users defecting to it from OS X or Windows. But have you ever wondered what got people started with Linux? A redditor asked that question and got some very interesting answers. + +SilverKnight asked his question on the Linux subreddit: + +> I know this has been asked before, but I wanted to hear more from the younger generation why it is that they started using linux and what keeps them here. +> +> I dont want to discourage others from giving their linux origin stories, because those are usually pretty good, but I was mostly curious about our younger population since there isn't much out there from them yet. +> +> I myself am 27 and am a linux dabbler. I have installed quite a few different distros over the years but I haven't made the plunge to full time linux. I guess I am looking for some more reasons/inspiration to jump on the bandwagon. +> +> [More at Reddit][1] + +Fellow redditors in the Linux subreddit responded with their thoughts: + +> **DoublePlusGood**: "I started using Backtrack Linux (now Kali) at 12 because I wanted to be a "1337 haxor". I've stayed with Linux (Archlinux currently) because it lets me have the endless freedom to make my computer do what I want." +> +> **Zack**: "I'm a Linux user since, I think, the age of 12 or 13, I'm 15 now. +> +> It started when I got tired with Windows XP at 11 and the waiting, dammit am I impatient sometimes, but waiting for a basic task such as shutting down just made me tired of Windows all together. +> +> A few months previously I had started participating in discussions in a channel on the freenode IRC network which was about a game, and as freenode usually goes, it was open source and most of the users used Linux. +> +> I kept on hearing about this Linux but wasn't that interested in it at the time. However, because the channel (and most of freenode) involved quite a bit of programming I started learning Python. +> +> A year passed and I was attempting to install GNU/Linux (specifically Ubuntu) on my new (technically old, but I had just got it for my birthday) PC, unfortunately it continually froze, for reasons unknown (probably a bad hard drive, or a lot of dust or something else...). +> +> Back then I was the type to give up on things, so I just continually nagged my dad to try and install Ubuntu, he couldn't do it for the same reasons. +> +> After wanting Linux for a while I became determined to get Linux and ditch windows for good. So instead of Ubuntu I tried Linux Mint, being a derivative of Ubuntu(?) I didn't have high hopes, but it worked! +> +> I continued using it for another 6 months. +> +> During that time a friend on IRC gave me a virtual machine (which ran Ubuntu) on their server, I kept it for a year a bit until my dad got me my own server. +> +> After the 6 months I got a new PC (which I still use!) I wanted to try something different. +> +> I decided to install openSUSE. +> +> I liked it a lot, and on the same Christmas I obtained a Raspberry Pi, and stuck with Debian on it for a while due to the lack of support other distros had for it." +> +> **Cqz**: "Was about 9 when the Windows 98 machine handed down to me stopped working for reasons unknown. We had no Windows install disk, but Dad had one of those magazines that comes with demo programs and stuff on CDs. This one happened to have install media for Mandrake Linux, and so suddenly I was a Linux user. Had no idea what I was doing but had a lot of fun doing it, and although in following years I often dual booted with various Windows versions, the FLOSS world always felt like home. Currently only have one Windows installation, which is a virtual machine for games." +> +> **Tosmarcel**: "I was 15 and was really curious about this new concept called 'programming' and then I stumbled upon this Harvard course, CS50. They told users to install a Linux vm to use the command line. But then I asked myself: "Why doesn't windows have this command line?!". I googled 'linux' and Ubuntu was the top result -Ended up installing Ubuntu and deleted the windows partition accidentally... It was really hard to adapt because I knew nothing about linux. Now I'm 16 and running arch linux, never looked back and I love it!" +> +> **Micioonthet**: "First heard about Linux in the 5th grade when I went over to a friend's house and his laptop was running MEPIS (an old fork of Debian) instead of Windows XP. +> +> Turns out his dad was a socialist (in America) and their family didn't trust Microsoft. This was completely foreign to me, and I was confused as to why he would bother using an operating system that didn't support the majority of software that I knew. +> +> Fast forward to when I was 13 and without a laptop. Another friend of mine was complaining about how slow his laptop was, so I offered to buy it off of him so I could fix it up and use it for myself. I paid $20 and got a virus filled, unusable HP Pavilion with Windows Vista. Instead of trying to clean up the disgusting Windows install, I remembered that Linux was a thing and that it was free. I burned an Ubuntu 12.04 disc and installed it right away, and was absolutely astonished by the performance. +> +> Minecraft (one of the few early Linux games because it ran on Java), which could barely run at 5 FPS on Vista, ran at an entirely playable 25 FPS on a clean install of Ubuntu. +> +> I actually still have that old laptop and use it occasionally, because why not? Linux doesn't care how old your hardware is. +> +> I since converted my dad to Linux and we buy old computers at lawn sales and thrift stores for pennies and throw Linux Mint or some other lightweight distros on them." +> +> **Webtm**: "My dad had every computer in the house with some distribution on it, I think a couple with OpenSUSE and Debian, and his personal computer had Slackware on it. So I remember being little and playing around with Debian and not really getting into it much. So I had a Windows laptop for a few years and my dad asked me if I wanted to try out Debian. It was a fun experience and ever since then I've been using Debian and trying out distributions. I currently moved away from Linux and have been using FreeBSD for around 5 months now, and I am absolutely happy with it. +> +> The control over your system is fantastic. There are a lot of cool open source projects. I guess a lot of the fun was figuring out how to do the things I want by myself and tweaking those things in ways to make them do something else. Stability and performance is also a HUGE plus. Not to mention the level of privacy when switching." +> +> **Wyronaut**: "I'm currently 18, but I first started using Linux when I was 13. Back then my first distro was Ubuntu. The reason why I wanted to check out Linux, was because I was hosting little Minecraft game servers for myself and a couple of friends, back then Minecraft was pretty new-ish. I read that the defacto operating system for hosting servers was Linux. +> +> I was a big newbie when it came to command line work, so Linux scared me a little, because I had to take care of a lot of things myself. But thanks to google and a few wiki pages I managed to get up a couple of simple servers running on a few older PC's I had lying around. Great use for all that older hardware no one in the house ever uses. +> +> After running a few game servers I started running a few web servers as well. Experimenting with HTML, CSS and PHP. I worked with those for a year or two. Afterwards, took a look at Java. I made the terrible mistake of watching TheNewBoston video's. +> +> So after like a week I gave up on Java and went to pick up a book on Python instead. That book was Learn Python The Hard Way by Zed A. Shaw. After I finished that at the fast pace of two weeks, I picked up the book C++ Primer, because at the time I wanted to become a game developer. Went trough about half of the book (~500 pages) and burned out on learning. At that point I was spending a sickening amount of time behind my computer. +> +> After taking a bit of a break, I decided to pick up JavaScript. Read like 2 books, made like 4 different platformers and called it a day. +> +> Now we're arriving at the present. I had to go through the horrendous process of finding a school and deciding what job I wanted to strive for when I graduated. I ruled out anything in the gaming sector as I didn't want anything to do with graphics programming anymore, I also got completely sick of drawing and modelling. And I found this bachelor that had something to do with netsec and I instantly fell in love. I picked up a couple books on C to shred this vacation period and brushed up on some maths and I'm now waiting for the new school year to commence. +> +> Right now, I am having loads of fun with Arch Linux, made couple of different arrangements on different PC's and it's going great! +> +> In a sense Linux is what also got me into programming and ultimately into what I'm going to study in college starting this september. I probably have my future life to thank for it." +> +> **Linuxllc**: "You also can learn from old farts like me. +> +> The crutch, The crutch, The crutch. Getting rid of the crutch will inspired you and have good reason to stick with Linux. +> +> I got rid of my crutch(Windows XP) back in 2003. Took me only 5 days to get all my computer task back and running at a 100% workflow. Including all my peripheral devices. Minus any Windows games. I just play native Linux games." +> +> **Highclass**: "Hey I'm 28 not sure if this is the age group you are looking for. +> +> To be honest, I was always interested in computers and the thought of a free operating system was intriguing even though at the time I didn't fully grasp the free software philosophy, to me it was free as in no cost. I also did not find the CLI too intimidating as from an early age I had exposure to DOS. +> +> I believe my first distro was Mandrake, I was 11 or 12, I messed up the family computer on several occasions.... I ended up sticking with it always trying to push myself to the next level. Now I work in the industry with Linux everyday. +> +> /shrug" +> +> Matto: "My computer couldn't run fast enough for XP (got it at a garage sale), so I started looking for alternatives. Ubuntu came up in Google. I was maybe 15 or 16 at the time. Now I'm 23 and have a job working on a product that uses Linux internally." +> +> [More at Reddit][2] + +### IBM's Linux only Mainframe ### + +IBM has a long history with Linux, and now the company has created a Mainframe that features Ubuntu Linux. The new machine is named LinuxOne. + +Ron Miller reports for TechCrunch: + +> The new mainframes come in two flavors, named for penguins (Linux — penguins — get it?). The first is called Emperor and runs on the IBM z13, which we wrote about in January. The other is a smaller mainframe called the Rockhopper designed for a more “entry level” mainframe buyer. +> +> You may have thought that mainframes went the way of the dinosaur, but they are still alive and well and running in large institutions throughout the world. IBM as part of its broader strategy to promote the cloud, analytics and security is hoping to expand the potential market for mainframes by running Ubuntu Linux and supporting a range of popular open source enterprise software such as Apache Spark, Node.js, MongoDB, MariaDB, PostgreSQL and Chef. +> +> The metered mainframe will still sit inside the customer’s on-premises data center, but billing will be based on how much the customer uses the system, much like a cloud model, Mauri explained. +> +> ...IBM is looking for ways to increase those sales. Partnering with Canonical and encouraging use of open source tools on a mainframe gives the company a new way to attract customers to a small, but lucrative market. +> +> [More at TechCrunch][3] + +### Why you should skip Windows 10 and opt for Linux ### + +Since Windows 10 has been released there has been quite a bit of media coverage about its potential to spy on users. ZDNet has listed some reasons why you should skip Windows 10 and opt for Linux instead on your computer. + +SJVN reports for ZDNet: + +> You can try to turn Windows 10's data-sharing ways off, but, bad news: Windows 10 will keep sharing some of your data with Microsoft anyway. There is an alternative: Desktop Linux. +> +> You can do a lot to keep Windows 10 from blabbing, but you can't always stop it from talking. Cortana, Windows 10's voice activated assistant, for example, will share some data with Microsoft, even when it's disabled. That data includes a persistent computer ID to identify your PC to Microsoft. +> +> So, if that gives you a privacy panic attack, you can either stick with your old operating system, which is likely Windows 7, or move to Linux. Eventually, when Windows 7 is no longer supported, if you want privacy you'll have no other viable choice but Linux. +> +> There are other, more obscure desktop operating systems that are also desktop-based and private. These include the BSD Unix family such as FreeBSD, PCBSD, and NetBSD and eComStation, OS/2 for the 21st century. Your best choice, though, is a desktop-based Linux with a low learning curve. +> +> [More at ZDNet][4] + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/2972587/linux/why-did-you-start-using-linux.html + +作者:[Jim Lynch][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.itworld.com/author/Jim-Lynch/ +[1]:https://www.reddit.com/r/linux/comments/3hb2sr/question_for_younger_users_why_did_you_start/ +[2]:https://www.reddit.com/r/linux/comments/3hb2sr/question_for_younger_users_why_did_you_start/ +[3]:http://techcrunch.com/2015/08/16/ibm-teams-with-canonical-on-linux-mainframe/ +[4]:http://www.zdnet.com/article/sick-of-windows-spying-on-you-go-linux/ \ No newline at end of file From cabdaf5b35fda0ad86949befaa9075e2ebe4a483 Mon Sep 17 00:00:00 2001 From: Jindong Huang Date: Fri, 21 Aug 2015 09:00:19 +0800 Subject: [PATCH 1796/2517] =?UTF-8?q?=E6=92=A4=E9=94=80=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=2020150813=20Linux=20file=20system=20hierarchy=20v2.0.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20150813 Linux file system hierarchy v2.0.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/sources/tech/20150813 Linux file system hierarchy v2.0.md b/sources/tech/20150813 Linux file system hierarchy v2.0.md index 0021bb57c9..ec4f47234c 100644 --- a/sources/tech/20150813 Linux file system hierarchy v2.0.md +++ b/sources/tech/20150813 Linux file system hierarchy v2.0.md @@ -1,6 +1,3 @@ - -Translating by dingdongnigetou - Linux file system hierarchy v2.0 ================================================================================ What is a file in Linux? What is file system in Linux? Where are all the configuration files? Where do I keep my downloaded applications? Is there really a filesystem standard structure in Linux? Well, the above image explains Linux file system hierarchy in a very simple and non-complex way. It’s very useful when you’re looking for a configuration file or a binary file. I’ve added some explanation and examples below, but that’s TL;DR. From 81e6ae11687c0af2cb40e455bb805aac0b7470a2 Mon Sep 17 00:00:00 2001 From: "Y.C.S.M" Date: Fri, 21 Aug 2015 09:13:10 +0800 Subject: [PATCH 1797/2517] Update 20150813 Linux file system hierarchy v2.0.md --- sources/tech/20150813 Linux file system hierarchy v2.0.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20150813 Linux file system hierarchy v2.0.md b/sources/tech/20150813 Linux file system hierarchy v2.0.md index ec4f47234c..23f70258b1 100644 --- a/sources/tech/20150813 Linux file system hierarchy v2.0.md +++ b/sources/tech/20150813 Linux file system hierarchy v2.0.md @@ -1,3 +1,5 @@ +translating by tnuoccalanosrep + Linux file system hierarchy v2.0 ================================================================================ What is a file in Linux? What is file system in Linux? Where are all the configuration files? Where do I keep my downloaded applications? Is there really a filesystem standard structure in Linux? Well, the above image explains Linux file system hierarchy in a very simple and non-complex way. It’s very useful when you’re looking for a configuration file or a binary file. I’ve added some explanation and examples below, but that’s TL;DR. From e48fefb9952ead67f4bc5592cce6d79f8e33659a Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 21 Aug 2015 09:35:40 +0800 Subject: [PATCH 1798/2517] Update 20150728 Process of the Linux kernel building.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译到line 699 --- ...0728 Process of the Linux kernel building.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index c622e43ba0..00504e60fd 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -605,12 +605,16 @@ Building bzImage The `bzImage` is the compressed Linux kernel image. We can get it with the execution of the `make bzImage` after the `vmlinux` built. In other way we can just execute `make` without arguments and will get `bzImage` anyway because it is default image: +`bzImage` 就是压缩了的linux 内核镜像。我们可以在构建了`vmlinux` 之后通过执行`make bzImage` 获得`bzImage`。同时我们可以仅仅执行`make` 而不带任何参数也可以生成`bzImage` ,因为它是在[arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile) 里定义的、默认会生成的镜像: + ```Makefile all: bzImage ``` in the [arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile). Let's look on this target, it will help us to understand how this image builds. As I already said the `bzImage` target defined in the [arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile) and looks like this: +让我们看看这个目标,他能帮助我们理解这个镜像是怎么构建的。我已经说过了`bzImage` 师被定义在[arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile),定义如下: + ```Makefile bzImage: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) @@ -620,12 +624,16 @@ bzImage: vmlinux We can see here, that first of all called `make` for the boot directory, in our case it is: +在这里我们可以看到第一次为boot 目录执行`make`,在我们的例子里是这样的: + ```Makefile boot := arch/x86/boot ``` The main goal now to build source code in the `arch/x86/boot` and `arch/x86/boot/compressed` directories, build `setup.bin` and `vmlinux.bin`, and build the `bzImage` from they in the end. First target in the [arch/x86/boot/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/Makefile) is the `$(obj)/setup.elf`: +现在的主要目标是编译目录`arch/x86/boot` 和`arch/x86/boot/compressed` 的代码,构建`setup.bin` 和`vmlinux.bin`,然后用这两个文件生成`bzImage`。第一个目标是定义在[arch/x86/boot/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/Makefile) 的`$(obj)/setup.elf`: + ```Makefile $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE $(call if_changed,ld) @@ -633,6 +641,8 @@ $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE We already have the `setup.ld` linker script in the `arch/x86/boot` directory and the `SETUP_OBJS` expands to the all source files from the `boot` directory. We can see first output: +我们已经在目录`arch/x86/boot`有了链接脚本`setup.ld`,并且将变量`SETUP_OBJS` 扩展到`boot` 目录下的全部源代码。我们可以看看第一个输出: + ```Makefile AS arch/x86/boot/bioscall.o CC arch/x86/boot/cmdline.o @@ -648,11 +658,14 @@ We already have the `setup.ld` linker script in the `arch/x86/boot` directory an The next source code file is the [arch/x86/boot/header.S](https://github.com/torvalds/linux/blob/master/arch/x86/boot/header.S), but we can't build it now because this target depends on the following two header files: +下一个源码文件是[arch/x86/boot/header.S](https://github.com/torvalds/linux/blob/master/arch/x86/boot/header.S),但是我们不能现在就编译他,因为这个目标依赖于下面两个头文件: + ```Makefile $(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h ``` The first is `voffset.h` generated by the `sed` script that gets two addresses from the `vmlinux` with the `nm` util: +第一个头文件`voffset.h` 是使用`sed` 脚本生成的,包含用`nm` 工具从`vmlinux` 获取的两个地址: ```C #define VO__end 0xffffffff82ab0000 @@ -661,6 +674,8 @@ The first is `voffset.h` generated by the `sed` script that gets two addresses f They are start and end of the kernel. The second is `zoffset.h` depens on the `vmlinux` target from the [arch/x86/boot/compressed/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/compressed/Makefile): +这两个地址是内核的起始和结束地址。第二个头文件`zoffset.h` 在[arch/x86/boot/compressed/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/compressed/Makefile) 可以看出是依赖于目标`vmlinux`的: + ```Makefile $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE $(call if_changed,zoffset) @@ -668,6 +683,8 @@ $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE The `$(obj)/compressed/vmlinux` target depends on the `vmlinux-objs-y` that compiles source code files from the [arch/x86/boot/compressed](https://github.com/torvalds/linux/tree/master/arch/x86/boot/compressed) directory and generates `vmlinux.bin`, `vmlinux.bin.bz2`, and compiles programm - `mkpiggy`. We can see this in the output: +目标`$(obj)/compressed/vmlinux` 依赖于变量`vmlinux-objs-y` —— 表明要编译目录[arch/x86/boot/compressed](https://github.com/torvalds/linux/tree/master/arch/x86/boot/compressed) 下的源代码,然后生成`vmlinux.bin`, `vmlinux.bin.bz2`, 和编译工具 - `mkpiggy`。我们可以在下面的输出看出来: + ```Makefile LDS arch/x86/boot/compressed/vmlinux.lds AS arch/x86/boot/compressed/head_64.o From a6b8923adb1e6c085115162b17b824a93532c8f1 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Fri, 21 Aug 2015 12:54:09 +0800 Subject: [PATCH 1799/2517] [translated]Howto Manage Host Using Docker Machine in a VirtualBox --- ...st Using Docker Machine in a VirtualBox.md | 63 +++++++++---------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/translated/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md b/translated/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md index 64c044b100..153035c9f4 100644 --- a/translated/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md +++ b/translated/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md @@ -1,63 +1,60 @@ -[bazz2] 在 VirtualBox 中使用 Docker Machine 管理主机 ================================================================================ 大家好,今天我们学习在 VirtualBox 中使用 Docker Machine 来创建和管理 Docker 主机。Docker Machine 是一个应用,用于在我们的电脑上、在云端、在数据中心创建 Docker 主机,然后用户可以使用 Docker 客户端来配置一些东西。这个 API 为本地主机、或数据中心的虚拟机、或云端的实例提供 Docker 服务。Docker Machine 支持 Windows、OSX 和 Linux,并且是以一个独立的二进制文件包形式安装的。使用(与现有 Docker 工具)相同的接口,我们就可以充分利用已经提供 Docker 基础框架的生态系统。只要一个命令,用户就能快速部署 Docker 容器。 -Here are some easy and simple steps that helps us to deploy docker containers using Docker Machine. +本文列出一些简单的步骤用 Docker Machine 来部署 docker 容器。 -### 1. Installing Docker Machine ### +### 1. 安装 Docker Machine ### -Docker Machine supports awesome on every Linux Operating System. First of all, we'll need to download the latest version of Docker Machine from the [Github site][1] . Here, we'll use curl to download the latest version of Docker Machine ie 0.2.0 . +Docker Machine 完美支持所有 Linux 操作系统。首先我们需要从 [github][1] 下载最新版本的 Docker Machine,本文使用 curl 作为下载工具,Docker Machine 版本为 0.2.0。 -**For 64 Bit Operating System** +** 64 位操作系统 ** # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine -**For 32 Bit Operating System** +** 32 位操作系统 ** # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386 > /usr/local/bin/docker-machine -After downloading the latest release of Docker Machine, we'll make the file named **docker-machine** under **/usr/local/bin/** executable using the command below. +下载完成后,找到 **/usr/local/bin** 目录下的 **docker-machine** 文件,执行一下: # chmod +x /usr/local/bin/docker-machine -After doing the above, we'll wanna ensure that we have successfully installed docker-machine. To check it, we can run the docker-machine -v which will give output of the version of docker-machine installed in our system. +确认是否成功安装了 docker-machine,可以运行下面的命令,它会打印 Docker Machine 的版本信息: # docker-machine -v -![Installing Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) +![安装 Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) -To enable Docker commands on our machines, make sure to install the Docker client as well by running the command below. +运行下面的命令,安装 Docker 客户端,以便于在我们自己的电脑止运行 Docker 命令: # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker # chmod +x /usr/local/bin/docker -### 2. Creating VirualBox VM ### +### 2. 创建 VirtualBox 虚拟机 ### -After we have successfully installed Docker Machine in our Linux running machine, we'll definitely wanna go for creating a Virtual Machine using VirtualBox. To get started, we need to run docker-machine create command followed by --driver flag with string as virtualbox as we are trying to deploy docker inside of Virtual Box running VM and the final argument is the name of the machine, here we have machine name as "linux". This command will download [boot2docker][2] iso which is a light-weighted linux distribution based on Tiny Core Linux with the Docker daemon installed and will create and start a VirtualBox VM with Docker running as mentioned above. - -To do so, we'll run the following command in a terminal or shell in our box. +在 Linux 系统上安装完 Docker Machine 后,接下来我们可以安装 VirtualBox 虚拟机,运行下面的就可以了。--driver virtualbox 选项表示我们要在 VirtualBox 的虚拟机里面部署 docker,最后的参数“linux” 是虚拟机的名称。这个命令会下载 [boot2docker][2] iso,它是个基于 Tiny Core Linux 的轻量级发行版,自带 Docker 程序,然后 docker-machine 命令会创建一个 VirtualBox 虚拟机(LCTT:当然,我们也可以选择其他的虚拟机软件)来运行这个 boot2docker 系统。 # docker-machine create --driver virtualbox linux -![Creating Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-docker-machine.png) +![创建 Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-docker-machine.png) -Now, to check whether we have successfully create a Virtualbox running Docker or not, we'll run the command **docker-machine** ls as shown below. +测试下有没有成功运行 VirtualBox 和 Docker,运行命令: # docker-machine ls ![Docker Machine List](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-list.png) -If the host is active, we can see * under the ACTIVE column in the output as shown above. +如果执行成功,我们可以看到在 ACTIVE 那列下面会出现一个星号“*”。 -### 3. Setting Environment Variables ### +### 3. 设置环境变量 ### -Now, we'll need to make docker talk with the machine. We can do that by running docker-machine env and then the machine name, here we have named **linux** as above. +现在我们需要让 docker 与虚拟机通信,运行 docker-machine env <虚拟机名称> 来实现这个目的。 # eval "$(docker-machine env linux)" # docker ps -This will set environment variables that the Docker client will read which specify the TLS settings. Note that we'll need to do this every time we reboot our machine or start a new tab. We can see what variables will be set by running the following command. +这个命令会设置 TLS 认证的环境变量,每次重启机器或者重新打开一个会话都需要执行一下这个命令,我们可以看到它的输出内容: # docker-machine env linux @@ -65,46 +62,46 @@ This will set environment variables that the Docker client will read which speci export DOCKER_CERT_PATH=/Users//.docker/machine/machines/dev export DOCKER_HOST=tcp://192.168.99.100:2376 -### 4. Running Docker Containers ### +### 4. 运行 Docker 容器 ### -Finally, after configuring the environment variables and Virtual Machine, we are able to run docker containers in the host running inside the Virtual Machine. To give it a test, we'll run a busybox container out of it run running **docker run busybox** command with **echo hello world** so that we can get the output of the container. +完成配置后我们就可以在 VirtualBox 上运行 docker 容器了。测试一下,在虚拟机里执行 **docker run busybox echo hello world** 命令,我们可以看到容器的输出信息。 # docker run busybox echo hello world -![Running Docker Container](http://blog.linoxide.com/wp-content/uploads/2015/05/running-docker-container.png) +![运行 Docker 容器](http://blog.linoxide.com/wp-content/uploads/2015/05/running-docker-container.png) -### 5. Getting Docker Host's IP ### +### 5. 拿到 Docker 主机的 IP ### -We can get the IP Address of the running Docker Host's using the **docker-machine ip** command. We can see any exposed ports that are available on the Docker host’s IP address. +我们可以执行下面的命令获取 Docker 主机的 IP 地址。 # docker-machine ip -![Docker IP Address](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-ip-address.png) +![Docker IP 地址](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-ip-address.png) -### 6. Managing the Hosts ### +### 6. 管理主机 ### -Now we can manage as many local VMs running Docker as we desire by running docker-machine create command again and again as mentioned in above steps +现在我们可以随心所欲地使用上述的 docker-machine 命令来不断创建主机了。 -If you are finished working with the running docker, we can simply run **docker-machine stop** command to stop the whole hosts which are Active and if wanna start again, we can run **docker-machine start**. +当你使用完 docker 时,可以运行 **docker-machine stop** 来停止所有主机,如果想开启所有主机,运行 **docker-machine start**。 # docker-machine stop # docker-machine start -You can also specify a host to stop or start using the host name as an argument. +你也可以只停止或开启一台主机: $ docker-machine stop linux $ docker-machine start linux -### Conclusion ### +### 总结 ### -Finally, we have successfully created and managed a Docker host inside a VirtualBox using Docker Machine. Really, Docker Machine enables people fast and easy to create, deploy and manage Docker hosts in different platforms as here we are running Docker hosts using Virtualbox platform. This virtualbox driver API works for provisioning Docker on a local machine, on a virtual machine in the data center. Docker Machine ships with drivers for provisioning Docker locally with Virtualbox as well as remotely on Digital Ocean instances whereas more drivers are in the work for AWS, Azure, VMware, and other infrastructure. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) +最后,我们使用 Docker Machine 成功在 VirtualBox 上创建并管理一台 Docker 主机。Docker Machine 确实能让用户快速地在不同的平台上部署 Docker 主机,就像我们这里部署在 VirtualBox 上一样。这个 --driver virtulbox 驱动可以在本地机器上使用,也可以在数据中心的虚拟机上使用。Docker Machine 驱动除了支持本地的 VirtualBox 之外,还支持远端的 Digital Ocean、AWS、Azure、VMware 以及其他基础设施。如果你有任何疑问,或者建议,请在评论栏中写出来,我们会不断改进我们的内容。谢谢,祝愉快。 -------------------------------------------------------------------------------- via: http://linoxide.com/linux-how-to/host-virtualbox-docker-machine/ 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[bazz2](https://github.com/bazz2) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 35731ea8f2793176705cd62264b3447fc1acb3f7 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 21 Aug 2015 14:53:23 +0800 Subject: [PATCH 1800/2517] =?UTF-8?q?PR=20=E8=A1=A5=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @bazz2 --- ...st Using Docker Machine in a VirtualBox.md | 114 ------------------ 1 file changed, 114 deletions(-) delete mode 100644 sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md diff --git a/sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md b/sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md deleted file mode 100644 index 77292a03ee..0000000000 --- a/sources/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md +++ /dev/null @@ -1,114 +0,0 @@ -[bazz2] -Howto Manage Host Using Docker Machine in a VirtualBox -================================================================================ -Hi all, today we'll learn how to create and manage a Docker host using Docker Machine in a VirtualBox. Docker Machine is an application that helps to create Docker hosts on our computer, on cloud providers and inside our own data center. It provides easy solution for creating servers, installing Docker on them and then configuring the Docker client according the users configuration and requirements. This API works for provisioning Docker on a local machine, on a virtual machine in the data center, or on a public cloud instance. Docker Machine is supported on Windows, OSX, and Linux and is available for installation as one standalone binary. It enables us to take full advantage of ecosystem partners providing Docker-ready infrastructure, while still accessing everything through the same interface. It makes people able to deploy the docker containers in the respective platform pretty fast and in pretty easy way with just a single command. - -Here are some easy and simple steps that helps us to deploy docker containers using Docker Machine. - -### 1. Installing Docker Machine ### - -Docker Machine supports awesome on every Linux Operating System. First of all, we'll need to download the latest version of Docker Machine from the [Github site][1] . Here, we'll use curl to download the latest version of Docker Machine ie 0.2.0 . - -**For 64 Bit Operating System** - - # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine - -**For 32 Bit Operating System** - - # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386 > /usr/local/bin/docker-machine - -After downloading the latest release of Docker Machine, we'll make the file named **docker-machine** under **/usr/local/bin/** executable using the command below. - - # chmod +x /usr/local/bin/docker-machine - -After doing the above, we'll wanna ensure that we have successfully installed docker-machine. To check it, we can run the docker-machine -v which will give output of the version of docker-machine installed in our system. - - # docker-machine -v - -![Installing Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/installing-docker-machine.png) - -To enable Docker commands on our machines, make sure to install the Docker client as well by running the command below. - - # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker - # chmod +x /usr/local/bin/docker - -### 2. Creating VirualBox VM ### - -After we have successfully installed Docker Machine in our Linux running machine, we'll definitely wanna go for creating a Virtual Machine using VirtualBox. To get started, we need to run docker-machine create command followed by --driver flag with string as virtualbox as we are trying to deploy docker inside of Virtual Box running VM and the final argument is the name of the machine, here we have machine name as "linux". This command will download [boot2docker][2] iso which is a light-weighted linux distribution based on Tiny Core Linux with the Docker daemon installed and will create and start a VirtualBox VM with Docker running as mentioned above. - -To do so, we'll run the following command in a terminal or shell in our box. - - # docker-machine create --driver virtualbox linux - -![Creating Docker Machine](http://blog.linoxide.com/wp-content/uploads/2015/05/creating-docker-machine.png) - -Now, to check whether we have successfully create a Virtualbox running Docker or not, we'll run the command **docker-machine** ls as shown below. - - # docker-machine ls - -![Docker Machine List](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-machine-list.png) - -If the host is active, we can see * under the ACTIVE column in the output as shown above. - -### 3. Setting Environment Variables ### - -Now, we'll need to make docker talk with the machine. We can do that by running docker-machine env and then the machine name, here we have named **linux** as above. - - # eval "$(docker-machine env linux)" - # docker ps - -This will set environment variables that the Docker client will read which specify the TLS settings. Note that we'll need to do this every time we reboot our machine or start a new tab. We can see what variables will be set by running the following command. - - # docker-machine env linux - - export DOCKER_TLS_VERIFY=1 - export DOCKER_CERT_PATH=/Users//.docker/machine/machines/dev - export DOCKER_HOST=tcp://192.168.99.100:2376 - -### 4. Running Docker Containers ### - -Finally, after configuring the environment variables and Virtual Machine, we are able to run docker containers in the host running inside the Virtual Machine. To give it a test, we'll run a busybox container out of it run running **docker run busybox** command with **echo hello world** so that we can get the output of the container. - - # docker run busybox echo hello world - -![Running Docker Container](http://blog.linoxide.com/wp-content/uploads/2015/05/running-docker-container.png) - -### 5. Getting Docker Host's IP ### - -We can get the IP Address of the running Docker Host's using the **docker-machine ip** command. We can see any exposed ports that are available on the Docker host’s IP address. - - # docker-machine ip - -![Docker IP Address](http://blog.linoxide.com/wp-content/uploads/2015/05/docker-ip-address.png) - -### 6. Managing the Hosts ### - -Now we can manage as many local VMs running Docker as we desire by running docker-machine create command again and again as mentioned in above steps - -If you are finished working with the running docker, we can simply run **docker-machine stop** command to stop the whole hosts which are Active and if wanna start again, we can run **docker-machine start**. - - # docker-machine stop - # docker-machine start - -You can also specify a host to stop or start using the host name as an argument. - - $ docker-machine stop linux - $ docker-machine start linux - -### Conclusion ### - -Finally, we have successfully created and managed a Docker host inside a VirtualBox using Docker Machine. Really, Docker Machine enables people fast and easy to create, deploy and manage Docker hosts in different platforms as here we are running Docker hosts using Virtualbox platform. This virtualbox driver API works for provisioning Docker on a local machine, on a virtual machine in the data center. Docker Machine ships with drivers for provisioning Docker locally with Virtualbox as well as remotely on Digital Ocean instances whereas more drivers are in the work for AWS, Azure, VMware, and other infrastructure. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/host-virtualbox-docker-machine/ - -作者:[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/ -[1]:https://github.com/docker/machine/releases -[2]:https://github.com/boot2docker/boot2docker From 530b8c6af21937d0930548f4124963c025a08d5d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 21 Aug 2015 15:47:47 +0800 Subject: [PATCH 1801/2517] =?UTF-8?q?20150821-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... to Install Visual Studio Code in Linux.md | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 sources/tech/20150821 How to Install Visual Studio Code in Linux.md diff --git a/sources/tech/20150821 How to Install Visual Studio Code in Linux.md b/sources/tech/20150821 How to Install Visual Studio Code in Linux.md new file mode 100644 index 0000000000..2fac79701e --- /dev/null +++ b/sources/tech/20150821 How to Install Visual Studio Code in Linux.md @@ -0,0 +1,127 @@ +How to Install Visual Studio Code in Linux +================================================================================ +Hi everyone, today we'll learn how to install Visual Studio Code in Linux Distributions. Visual Studio Code is a code-optimized editor based on Electron, a piece of software that is based on Chromium, which is used to deploy io.js applications for the desktop. It is a source code editor and text editor developed by Microsoft for all the operating system platforms including Linux. Visual Studio Code is free but not an open source software ie. its under proprietary software license terms. It is an awesome powerful and fast code editor for our day to day use. Some of the cool features of visual studio code are navigation, intellisense support, syntax highlighting, bracket matching, auto indentation, and snippets, keyboard support with customizable bindings and support for dozens of languages like Python, C++, jade, PHP, XML, Batch, F#, DockerFile, Coffee Script, Java, HandleBars, R, Objective-C, PowerShell, Luna, Visual Basic, .Net, Asp.Net, C#, JSON, Node.js, Javascript, HTML, CSS, Less, Sass and Markdown. Visual Studio Code integrates with package managers and repositories, and builds and other common tasks to make everyday workflows faster. The most popular feature in Visual Studio Code is its debugging feature which includes a streamlined support for Node.js debugging in the preview. + +Note: Please note that, Visual Studio Code is only available for 64-bit versions of Linux Distributions. + +Here, are some easy to follow steps on how to install Visual Sudio Code in all Linux Distribution. + +### 1. Downloading Visual Studio Code Package ### + +First of all, we'll gonna download the Visual Studio Code Package for 64-bit Linux Operating System from the Microsoft server using the given url [http://go.microsoft.com/fwlink/?LinkID=534108][1] . Here, we'll use wget to download it and keep it under /tmp/VSCODE directory as shown below. + + # mkdir /tmp/vscode; cd /tmp/vscode/ + # wget https://az764295.vo.msecnd.net/public/0.3.0/VSCode-linux-x64.zip + + --2015-06-24 06:02:54-- https://az764295.vo.msecnd.net/public/0.3.0/VSCode-linux-x64.zip + Resolving az764295.vo.msecnd.net (az764295.vo.msecnd.net)... 93.184.215.200, 2606:2800:11f:179a:1972:2405:35b:459 + Connecting to az764295.vo.msecnd.net (az764295.vo.msecnd.net)|93.184.215.200|:443... connected. + HTTP request sent, awaiting response... 200 OK + Length: 64992671 (62M) [application/octet-stream] + Saving to: ‘VSCode-linux-x64.zip’ + 100%[================================================>] 64,992,671 14.9MB/s in 4.1s + 2015-06-24 06:02:58 (15.0 MB/s) - ‘VSCode-linux-x64.zip’ saved [64992671/64992671] + +### 2. Extracting the Package ### + +Now, after we have successfully downloaded the zipped package of Visual Studio Code, we'll gonna extract it using the unzip command to /opt/directory. To do so, we'll need to run the following command in a terminal or a console. + + # unzip /tmp/vscode/VSCode-linux-x64.zip -d /opt/ + +Note: If we don't have unzip already installed, we'll need to install it via our Package Manager. If you're running Ubuntu, apt-get whereas if you're running Fedora, CentOS, dnf or yum can be used to install it. + +### 3. Running Visual Studio Code ### + +After we have extracted the package, we can directly launch the Visual Studio Code by executing a file named Code. + + # sudo chmod +x /opt/VSCode-linux-x64/Code + # sudo /opt/VSCode-linux-x64/Code + +If we want to launch Code and want to be available globally via terminal in any place, we'll need to create the link of /opt/vscode/Code as/usr/local/bin/code . + + # ln -s /opt/VSCode-linux-x64/Code /usr/local/bin/code + +Now, we can launch Visual Studio Code by running the following command in a terminal. + + # code . + +### 4. Creating a Desktop Launcher ### + +Next, after we have successfully extracted the Visual Studio Code package, we'll gonna create a desktop launcher so that it will be easily available in the launchers, menus, desktop, according to the desktop environment so that anyone can launch it from them. So, first we'll gonna copy the icon file to /usr/share/icons/ directory. + + # cp /opt/VSCode-linux-x64/resources/app/vso.png /usr/share/icons/ + +Then, we'll gonna create the desktop launcher having the extension as .desktop. Here, we'll create a file named visualstudiocode.desktop under /tmp/VSCODE/ folder using our favorite text editor. + + # vi /tmp/vscode/visualstudiocode.desktop + +Then, we'll gonna paste the following lines into that file. + + [Desktop Entry] + Name=Visual Studio Code + Comment=Multi-platform code editor for Linux + Exec=/opt/VSCode-linux-x64/Code + Icon=/usr/share/icons/vso.png + Type=Application + StartupNotify=true + Categories=TextEditor;Development;Utility; + MimeType=text/plain; + +After we're done creating the desktop file, we'll wanna copy that desktop file to /usr/share/applications/ directory so that it will be available in launchers and menus for use with single click. + + # cp /tmp/vscode/visualstudiocode.desktop /usr/share/applications/ + +Once its done, we can launch it by opening it from the Launcher or Menu. + +![Visual Studio Code](http://blog.linoxide.com/wp-content/uploads/2015/06/visual-studio-code.png) + +### Installing Visual Studio Code in Ubuntu ### + +We can use Ubuntu Make 0.7 in order to install Visual Studio Code in Ubuntu 14.04/14.10/15.04 distribution of linux. This method is the most easiest way to setup Code in ubuntu as we just need to execute few commands for it. First of all, we'll need to install Ubuntu Make 0.7 in our ubuntu distribution of linux. To install it, we'll need to add PPA for it. This can be done by running the command below. + + # add-apt-repository ppa:ubuntu-desktop/ubuntu-make + + This ppa proposes package backport of Ubuntu make for supported releases. + More info: https://launchpad.net/~ubuntu-desktop/+archive/ubuntu/ubuntu-make + Press [ENTER] to continue or ctrl-c to cancel adding it + gpg: keyring `/tmp/tmpv0vf24us/secring.gpg' created + gpg: keyring `/tmp/tmpv0vf24us/pubring.gpg' created + gpg: requesting key A1231595 from hkp server keyserver.ubuntu.com + gpg: /tmp/tmpv0vf24us/trustdb.gpg: trustdb created + gpg: key A1231595: public key "Launchpad PPA for Ubuntu Desktop" imported + gpg: no ultimately trusted keys found + gpg: Total number processed: 1 + gpg: imported: 1 (RSA: 1) + OK + +Then, we'll gonna update the local repository index and install ubuntu-make. + + # apt-get update + # apt-get install ubuntu-make + +After Ubuntu Make is installed in our ubuntu operating system, we'll gonna install Code by running the following command in a terminal. + + # umake web visual-studio-code + +![Umake Web Code](http://blog.linoxide.com/wp-content/uploads/2015/06/umake-web-code.png) + +After running the above command, we'll be asked to enter the path where we want to install it. Then, it will ask for permission to install Visual Studio Code in our ubuntu system. Then, we'll press "a". Once we do that, it will download and install it in our ubuntu machine. Finally, we can launch it by opening it from the Launcher or Menu. + +### Conclusion ### + +We have successfully installed Visual Studio Code in Linux Distribution. Installing Visual Studio Code in every linux distribution is the same as shown in the above steps where we can also use umake to install it in ubuntu distributions. Umake is a popular tool for the development tools, IDEs, Languages. We can easily install Android Studios, Eclipse and many other popular IDEs with umake. Visual Studio Code is based on a project in Github called [Electron][2] which is a part of [Atom.io][3] Editor. It has a bunch of new cool and improved features that Atom.io Editor doesn't have. Visual Studio Code is currently only available in 64-bit platform of linux operating system. So, If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-visual-studio-code-linux/ + +作者:[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/ +[1]:http://go.microsoft.com/fwlink/?LinkID=534108 +[2]:https://github.com/atom/electron +[3]:https://github.com/atom/atom \ No newline at end of file From 8710f13ab6ee96fb7b425d6a53cfe58ce8309b86 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 21 Aug 2015 16:30:54 +0800 Subject: [PATCH 1802/2517] =?UTF-8?q?20150821-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... open source command-line email clients.md | 79 +++++++++++++++++++ ...Kernel To Add The MOST Driver Subsystem.md | 28 +++++++ 2 files changed, 107 insertions(+) create mode 100644 sources/share/20150821 Top 4 open source command-line email clients.md create mode 100644 sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md diff --git a/sources/share/20150821 Top 4 open source command-line email clients.md b/sources/share/20150821 Top 4 open source command-line email clients.md new file mode 100644 index 0000000000..df96173c18 --- /dev/null +++ b/sources/share/20150821 Top 4 open source command-line email clients.md @@ -0,0 +1,79 @@ +Top 4 open source command-line email clients +================================================================================ +![](http://opensource.com/sites/default/files/styles/image-full-size/public/images/life/life_mail.png) + +Like it or not, email isn't dead yet. And for Linux power users who live and die by the command line, leaving the shell to use a traditional desktop or web based email client just doesn't cut it. After all, if there's one thing that the command line excels at, it's letting you process files, and especially text, with uninterrupted efficiency. + +Fortunately, there are a number of great command-line email clients, many with a devoted following of users who can help you get started and answer any questions you might have along the way. But fair warning: once you've mastered one of these clients, you may find it hard to go back to your old GUI-based solution! + +To install any of these four clients is pretty easy; most are available in standard repositories for major Linux distributions, and can be installed with a normal package manager. You may also have luck finding and running them on other operating systems as well, although I haven't tried it and can't speak to the experience. + +### Mutt ### + +- [Project page][1] +- [Source code][2] +- License: [GPLv2][3] + +Many terminal enthusiasts may already have heard of or even be familiar with Mutt and Alpine, which have both been on the scene for many years. Let's first take a look at Mutt. + +Mutt supports many of the features you've come to expect from any email system: message threading, color coding, availability in a number of languages, and lots of configuration options. It supports POP3 and IMAP, the two most common email transfer protocols, and multiple mailbox formats. Having first been released in 1995, Mutt still has an active development community, but in recent years, new releases have focused on bug fixes and security updates rather than new features. That's okay for many Mutt users, though, who are comfortable with the interface and adhere to the project's slogan: "All mail clients suck. This one just sucks less." + +### Alpine ### + +- [Project page][4] +- [Source code][5] +- License: [Apache 2.0][6] + +Alpine is the other well-known client for terminal email, developed at the University of Washington and designed to be an open source, Unicode-friendly alternative to Pine, also originally from UW. + +Designed to be friendly to beginners, but also chocked full of features for advanced users, Alpine also supports a multitude of protocols—IMAP, LDAP, NNTP, POP, SMTP, etc.—as well as different mailbox formats. Alpine is packaged with Pico, a simple text editing utility that many use as a standalone tool, but it also should work with your text editor of choice: vi, Emacs, etc. + +While Alpine is still infrequently updated, there is also a fork, re-alpine, which was created to allow a different set of maintainers to continue the project's development. + +Alpine features contextual help on the screen, which some users may prefer to breaking out the manual with Mutt, but both are well documented. Between Mutt and Alpine, users may want to try both and let personal preference guide their decision, or they may wish to check out a couple of the newer options below. + +### Sup ### + +- [Project page][7] +- [Source code][8] +- License: [GPLv2][9] + +Sup is the first of two of what can be called "high volume email clients" on our list. Described as a "console-based email client for people with a lot of email," Sup's goal is to provide an interface to email with a hierarchical design and to allow tagging of threads for easier organization. + +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 ### + +- [Project page][10] +- [Source code][11] +- License: [GPLv3][12] + +"Sup? Notmuch." Notmuch was written as a response to Sup, originally starting out as a speed-focused rewrite of some portions of Sup to enhance performance. Eventually, the project grew in scope and is now a stand-alone email client. + +Notmuch is also a fairly trim program. It doesn't actually send or receive email messages on its own, and the code which enables Notmuch's super-fast searching is actually designed as a separate library which the program can call. But its modular nature enables you to pick your favorite tools for composing, sending, and receiving, and instead focuses on doing one task and doing it well—efficient browsing and management of your email. + +This list isn’t by any means comprehensive; there are a lot more email clients out there which might be an even better fit for you. What’s your favorite? Did we leave one out that you want to share about? Let us know in the comments below! + +-------------------------------------------------------------------------------- + +via: http://opensource.com/life/15/8/top-4-open-source-command-line-email-clients + +作者:[Jason Baker][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://opensource.com/users/jason-baker +[1]:http://www.mutt.org/ +[2]:http://dev.mutt.org/trac/ +[3]:https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html +[4]:http://www.washington.edu/alpine/ +[5]:http://www.washington.edu/alpine/acquire/ +[6]:http://www.apache.org/licenses/LICENSE-2.0 +[7]:http://supmua.org/ +[8]:https://github.com/sup-heliotrope/sup +[9]:https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html +[10]:http://notmuchmail.org/ +[11]:http://notmuchmail.org/releases/ +[12]:http://www.gnu.org/licenses/gpl.html \ No newline at end of file diff --git a/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md b/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md new file mode 100644 index 0000000000..5b4ad2251f --- /dev/null +++ b/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md @@ -0,0 +1,28 @@ +Linux 4.3 Kernel To Add The MOST Driver Subsystem +================================================================================ + While the [Linux 4.2][1] kernel hasn't been officially released yet, Greg Kroah-Hartman sent in early his pull requests for the various subsystems he maintains for the Linux 4.3 merge window. + +The pull requests sent in by Greg KH on Thursday include the Linux 4.3 merge window updates for the driver core, TTY/serial, USB driver, char/misc, and the staging area. These pull requests don't offer any really shocking changes but mostly routine work on improvements / additions / bug-fixes. The staging area once again is heavy with various fixes and clean-ups but there's also a new driver subsystem. + +Greg mentioned of the [4.3 staging changes][2], "Lots of things all over the place, almost all of them trivial fixups and changes. The usual IIO updates and new drivers and we have added the MOST driver subsystem which is getting cleaned up in the tree. The ozwpan driver is finally being deleted as it is obviously abandoned and no one cares about it." + +The MOST driver subsystem is short for the Media Oriented Systems Transport. The documentation to be added in the Linux 4.3 kernel explains, "The Media Oriented Systems Transport (MOST) driver gives Linux applications access a MOST network: The Automotive Information Backbone and the de-facto standard for high-bandwidth automotive multimedia networking. MOST defines the protocol, hardware and software layers necessary to allow for the efficient and low-cost transport of control, real-time and packet data using a single medium (physical layer). Media currently in use are fiber optics, unshielded twisted pair cables (UTP) and coax cables. MOST also supports various speed grades up to 150 Mbps." As explained, MOST is mostly about Linux in automotive applications. + +While Greg KH sent in his various subsystem updates for Linux 4.3, he didn't yet propose the [KDBUS][5] kernel code be pulled. He's previously expressed plans for [KDBUS in Linux 4.3][3] so we'll wait until the 4.3 merge window officially gets going to see what happens. Stay tuned to Phoronix for more Linux 4.3 kernel coverage next week when the merge window will begin, [assuming Linus releases 4.2][4] this weekend. + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.3-Staging-Pull + +作者:[Michael Larabel][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.michaellarabel.com/ +[1]:http://www.phoronix.com/scan.php?page=search&q=Linux+4.2 +[2]:http://lkml.iu.edu/hypermail/linux/kernel/1508.2/02604.html +[3]:http://www.phoronix.com/scan.php?page=news_item&px=KDBUS-Not-In-Linux-4.2 +[4]:http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.2-rc7-Released +[5]:http://www.phoronix.com/scan.php?page=search&q=KDBUS \ No newline at end of file From 778c920c34eda71845723237a4bf4bfa714aa636 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 21 Aug 2015 16:37:50 +0800 Subject: [PATCH 1803/2517] =?UTF-8?q?20150821-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rs--How to check MariaDB server version.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md diff --git a/sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md b/sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md new file mode 100644 index 0000000000..11bf478f09 --- /dev/null +++ b/sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md @@ -0,0 +1,49 @@ +Linux FAQs with Answers--How to check MariaDB server version +================================================================================ +> **Question**: I am on a VPS server where MariaDB server is running. How can I find out which version of MariaDB server it is running? + +There are circumstances where you need to know the version of your database server, e.g., when upgrading the database or patching any known server vulnerabilities. There are a few ways to find out what the version of your MariaDB server is. + +### Method One ### + +The first method to identify MariaDB server version is by logging in to the MariaDB server. Right after you log in, your will see a welcome message where MariaDB server version is indicated. + +![](https://farm6.staticflickr.com/5807/20669891016_91249d3239_c.jpg) + +Alternatively, simply type 'status' command at the MariaDB prompt any time while you are logged in. The output will show server version as well as protocol version as follows. + +![](https://farm6.staticflickr.com/5801/20669891046_73f60e5c81_c.jpg) + +### Method Two ### + +If you don't have access to the MariaDB server, you cannot use the first method. In this case, you can infer MariaDB server version by checking which MariaDB package was installed. This works only when the MariaDB server was installed using a distribution's package manager. + +You can search for the installed MariaDB server package as follows. + +#### Debian, Ubuntu or Linux Mint: #### + + $ dpkg -l | grep mariadb + +The output below indicates that installed MariaDB server is version 10.0.17. + +![](https://farm1.staticflickr.com/607/20669890966_b611fcd915_c.jpg) + +#### Fedora, CentOS or RHEL: #### + + $ rpm -qa | grep mariadb + +The output below indicates that the installed version is 5.5.41. + +![](https://farm1.staticflickr.com/764/20508160748_23d9808256_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/check-mariadb-server-version.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://ask.xmodulo.com/author/nanni \ No newline at end of file From f038435d712622128d7d3cc811e2c4380a00cbb3 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Sat, 22 Aug 2015 08:36:54 +0800 Subject: [PATCH 1804/2517] [translating by bazz2]Docker Working on Security Components Live Container Migration --- ... Working on Security Components Live Container Migration.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename {sources => translated}/talk/20150818 Docker Working on Security Components Live Container Migration.md (98%) diff --git a/sources/talk/20150818 Docker Working on Security Components Live Container Migration.md b/translated/talk/20150818 Docker Working on Security Components Live Container Migration.md similarity index 98% rename from sources/talk/20150818 Docker Working on Security Components Live Container Migration.md rename to translated/talk/20150818 Docker Working on Security Components Live Container Migration.md index ad974b4859..356c6f943c 100644 --- a/sources/talk/20150818 Docker Working on Security Components Live Container Migration.md +++ b/translated/talk/20150818 Docker Working on Security Components Live Container Migration.md @@ -1,3 +1,4 @@ +[bazz2 translating] Docker Working on Security Components, Live Container Migration ================================================================================ ![Docker Container Talk](http://www.eweek.com/imagesvr_ce/1905/290x195DockerMarianna.jpg) @@ -50,4 +51,4 @@ via: http://www.eweek.com/virtualization/docker-working-on-security-components-l 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.eweek.com/cp/bio/Sean-Michael-Kerner/ \ No newline at end of file +[a]:http://www.eweek.com/cp/bio/Sean-Michael-Kerner/ From 3417a617f81e13d2b5930cf6efc1ccaef0dc8a06 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Sat, 22 Aug 2015 08:50:21 +0800 Subject: [PATCH 1805/2517] [place it into error place] --- ...ker Working on Security Components Live Container Migration.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated => sources}/talk/20150818 Docker Working on Security Components Live Container Migration.md (100%) diff --git a/translated/talk/20150818 Docker Working on Security Components Live Container Migration.md b/sources/talk/20150818 Docker Working on Security Components Live Container Migration.md similarity index 100% rename from translated/talk/20150818 Docker Working on Security Components Live Container Migration.md rename to sources/talk/20150818 Docker Working on Security Components Live Container Migration.md From de5e769323a47f73f7cdba495524ffe9425c27f7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 22 Aug 2015 09:09:52 +0800 Subject: [PATCH 1806/2517] translating --- ...18 Linux Without Limits--IBM Launch LinuxONE Mainframes.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md b/sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md index f97c690e3a..dc1f0e8986 100644 --- a/sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md +++ b/sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md @@ -1,3 +1,5 @@ +Translating----geekpi + Linux Without Limits: IBM Launch LinuxONE Mainframes ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/Screenshot-2015-08-17-at-12.58.10.png) @@ -49,4 +51,4 @@ via: http://www.omgubuntu.co.uk/2015/08/ibm-linuxone-mainframe-ubuntu-partnershi [a]:https://plus.google.com/117485690627814051450/?rel=author [1]:http://www-03.ibm.com/systems/z/announcement.html -[2]:http://www.reuters.com/article/2015/08/17/us-ibm-linuxone-idUSKCN0QM09P20150817 \ No newline at end of file +[2]:http://www.reuters.com/article/2015/08/17/us-ibm-linuxone-idUSKCN0QM09P20150817 From 5842e697b11a834c1b9b57757800a95ca9aafc0c Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Fri, 21 Aug 2015 20:13:54 -0500 Subject: [PATCH 1807/2517] Update 20150813 How to get Public IP from Linux Terminal.md --- ...ow to get Public IP from Linux Terminal.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sources/tech/20150813 How to get Public IP from Linux Terminal.md b/sources/tech/20150813 How to get Public IP from Linux Terminal.md index c22fec283d..98c0ec7b31 100644 --- a/sources/tech/20150813 How to get Public IP from Linux Terminal.md +++ b/sources/tech/20150813 How to get Public IP from Linux Terminal.md @@ -1,13 +1,13 @@ -KevinSJ Translating -How to get Public IP from Linux Terminal? +如何在 Linux 终端中获取公有 IP ================================================================================ ![](http://www.blackmoreops.com/wp-content/uploads/2015/06/256x256xHow-to-get-Public-IP-from-Linux-Terminal-blackMORE-Ops.png.pagespeed.ic.GKEAEd4UNr.png) -Public addresses are assigned by InterNIC and consist of class-based network IDs or blocks of CIDR-based addresses (called CIDR blocks) that are guaranteed to be globally unique to the Internet. How to get Public IP from Linux Terminal - blackMORE OpsWhen the public addresses are assigned, routes are programmed into the routers of the Internet so that traffic to the assigned public addresses can reach their locations. Traffic to destination public addresses are reachable on the Internet. For example, when an organization is assigned a CIDR block in the form of a network ID and subnet mask, that [network ID, subnet mask] pair also exists as a route in the routers of the Internet. IP packets destined to an address within the CIDR block are routed to the proper destination. In this post I will show several ways to find your public IP address from Linux terminal. This though seems like a waste for normal users, but when you are in a terminal of a headless Linux server(i.e. no GUI or you’re connected as a user with minimal tools). Either way, being able to getHow to get Public IP from Linux Terminal public IP from Linux terminal can be useful in many cases or it could be one of those things that might just come in handy someday. +公有地址由InterNIC分配并由基于类的网络 ID 或基于 CIDR 地址块构成(被称为 CIDR 块)并保证了在全球英特网中的唯一性。当公有地址被分配时,路径将会被记录到互联网中的路由器中,这样访问公有地址的流量就能顺利到达。访问目标公有地址的流量可通过互联网获取。比如,当一个一个 CIDR 块被以网络 ID 和子网掩码的形式分配给一个组织时,对应的 [网络 ID,子网掩码] 也会同时作为路径储存在英特网中的路由器中。访问 CIDR 块中的地址的 IP 封包会被导向对应的位置。在本文中我将会介绍在几种在 Linux 终端中查看你的公有 IP 地址的方法。这对普通用户来说并无意义,但 Linux 服务器(无GUI或者作为只能使用基本工具的用户登录时)会很有用。无论如何,从 Linux 终端中获取公有 IP 在各种方面都很意义,说不定某一天就能用得着。 -There’s two main commands we use, curl and wget. You can use them interchangeably. -### Curl output in plain text format: ### +以下是我们主要使用的两个命令,curl 和 wget。你可以换着用。 + +### Curl 纯文本格式输出: ### curl icanhazip.com curl ifconfig.me @@ -17,53 +17,53 @@ There’s two main commands we use, curl and wget. You can use them interchangea curl ipecho.net/plain curl www.trackip.net/i -### curl output in JSON format: ### +### curl JSON格式输出: ### curl ipinfo.io/json curl ifconfig.me/all.json curl www.trackip.net/ip?json (bit ugly) -### curl output in XML format: ### +### curl XML格式输出: ### curl ifconfig.me/all.xml -### curl all IP details – The motherload ### +### curl 所有IP细节 ### curl ifconfig.me/all -### Using DYNDNS (Useful when you’re using DYNDNS service) ### +### 使用 DYDNS (当你使用 DYDNS 服务时有用)Using DYNDNS (Useful when you’re using DYNDNS service) ### curl -s 'http://checkip.dyndns.org' | sed 's/.*Current IP Address: \([0-9\.]*\).*/\1/g' curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+" -### Using wget instead of curl ### +### 使用 Wget 代替 Curl ### wget http://ipecho.net/plain -O - -q ; echo wget http://observebox.com/ip -O - -q ; echo -### Using host and dig command (cause we can) ### +### 使用 host 和 dig 命令 ### -You can also use host and dig command assuming they are available or installed +在可用时,你可以直接使用 host 和 dig 命令。 host -t a dartsclink.com | sed 's/.*has address //' dig +short myip.opendns.com @resolver1.opendns.com -### Sample bash script: ### +### bash 脚本示例: ### #!/bin/bash PUBLIC_IP=`wget http://ipecho.net/plain -O - -q ; echo` echo $PUBLIC_IP -Quite a few to pick from. +已经由不少选项了。 -I was actually writing a small script to track all the IP changes of my router each day and save those into a file. I found these nifty commands and sites to use while doing some online research. Hope they help someone else someday too. Thanks for reading, please Share and RT. +我实际上写了一个用于记录每日我的路由器中所有 IP 变化并保存到一个文件的脚本。我在搜索过程中找到了这些很好用的命令。希望某天它能帮到其他人。 -------------------------------------------------------------------------------- via: http://www.blackmoreops.com/2015/06/14/how-to-get-public-ip-from-linux-terminal/ -译者:[译者ID](https://github.com/译者ID) +译者:[KevinSJ](https://github.com/KevinSJ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From e965dbb00062f017cf5c64e93103adc22e6d597c Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Fri, 21 Aug 2015 20:15:39 -0500 Subject: [PATCH 1808/2517] Rename sources/tech/20150813 How to get Public IP from Linux Terminal.md to translated/tech/20150813 How to get Public IP from Linux Terminal.md --- .../tech/20150813 How to get Public IP from Linux Terminal.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150813 How to get Public IP from Linux Terminal.md (100%) diff --git a/sources/tech/20150813 How to get Public IP from Linux Terminal.md b/translated/tech/20150813 How to get Public IP from Linux Terminal.md similarity index 100% rename from sources/tech/20150813 How to get Public IP from Linux Terminal.md rename to translated/tech/20150813 How to get Public IP from Linux Terminal.md From a4d55d4f6da743e381beec1e26fd37e7871e24f2 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 22 Aug 2015 14:53:23 +0800 Subject: [PATCH 1809/2517] [Translated] tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md --- ...Automate Linux System Maintenance Tasks.md | 208 ------------------ ...Automate Linux System Maintenance Tasks.md | 205 +++++++++++++++++ 2 files changed, 205 insertions(+), 208 deletions(-) delete mode 100644 sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md create mode 100644 translated/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md diff --git a/sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md b/sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md deleted file mode 100644 index 6b534423e7..0000000000 --- a/sources/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md +++ /dev/null @@ -1,208 +0,0 @@ -ictlyh Translating -Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks -================================================================================ -Some time ago I read that one of the distinguishing characteristics of an effective system administrator / engineer is laziness. It seemed a little contradictory at first but the author then proceeded to explain why: - -![Automate Linux System Maintenance Tasks](http://www.tecmint.com/wp-content/uploads/2015/08/Automate-Linux-System-Maintenance-Tasks.png) - -RHCE Series: Automate Linux System Maintenance Tasks – Part 4 - -if a sysadmin spends most of his time solving issues and doing repetitive tasks, you can suspect he or she is not doing things quite right. In other words, an effective system administrator / engineer should develop a plan to perform repetitive tasks with as less action on his / her part as possible, and should foresee problems by using, - -for example, the tools reviewed in Part 3 – [Monitor System Activity Reports Using Linux Toolsets][1] of this series. Thus, although he or she may not seem to be doing much, it’s because most of his / her responsibilities have been taken care of with the help of shell scripting, which is what we’re going to talk about in this tutorial. - -### What is a shell script? ### - -In few words, a shell script is nothing more and nothing less than a program that is executed step by step by a shell, which is another program that provides an interface layer between the Linux kernel and the end user. - -By default, the shell used for user accounts in RHEL 7 is bash (/bin/bash). If you want a detailed description and some historical background, you can refer to [this Wikipedia article][2]. - -To find out more about the enormous set of features provided by this shell, you may want to check out its **man page**, which is downloaded in in PDF format at ([Bash Commands][3]). Other than that, it is assumed that you are familiar with Linux commands (if not, I strongly advise you to go through [A Guide from Newbies to SysAdmin][4] article in **Tecmint.com** before proceeding). Now let’s get started. - -### Writing a script to display system information ### - -For our convenience, let’s create a directory to store our shell scripts: - - # mkdir scripts - # cd scripts - -And open a new text file named `system_info.sh` with your preferred text editor. We will begin by inserting a few comments at the top and some commands afterwards: - - #!/bin/bash - - # Sample script written for Part 4 of the RHCE series - # This script will return the following set of system information: - # -Hostname information: - echo -e "\e[31;43m***** HOSTNAME INFORMATION *****\e[0m" - hostnamectl - echo "" - # -File system disk space usage: - echo -e "\e[31;43m***** FILE SYSTEM DISK SPACE USAGE *****\e[0m" - df -h - echo "" - # -Free and used memory in the system: - echo -e "\e[31;43m ***** FREE AND USED MEMORY *****\e[0m" - free - echo "" - # -System uptime and load: - echo -e "\e[31;43m***** SYSTEM UPTIME AND LOAD *****\e[0m" - uptime - echo "" - # -Logged-in users: - echo -e "\e[31;43m***** CURRENTLY LOGGED-IN USERS *****\e[0m" - who - echo "" - # -Top 5 processes as far as memory usage is concerned - echo -e "\e[31;43m***** TOP 5 MEMORY-CONSUMING PROCESSES *****\e[0m" - ps -eo %mem,%cpu,comm --sort=-%mem | head -n 6 - echo "" - echo -e "\e[1;32mDone.\e[0m" - -Next, give the script execute permissions: - - # chmod +x system_info.sh - -and run it: - - ./system_info.sh - -Note that the headers of each section are shown in color for better visualization: - -![Server Monitoring Shell Script](http://www.tecmint.com/wp-content/uploads/2015/08/Server-Monitoring-Shell-Script.png) - -Server Monitoring Shell Script - -That functionality is provided by this command: - - echo -e "\e[COLOR1;COLOR2m\e[0m" - -Where COLOR1 and COLOR2 are the foreground and background colors, respectively (more info and options are explained in this entry from the [Arch Linux Wiki][5]) and is the string that you want to show in color. - -### Automating Tasks ### - -The tasks that you may need to automate may vary from case to case. Thus, we cannot possibly cover all of the possible scenarios in a single article, but we will present three classic tasks that can be automated using shell scripting: - -**1)** update the local file database, 2) find (and alternatively delete) files with 777 permissions, and 3) alert when filesystem usage surpasses a defined limit. - -Let’s create a file named `auto_tasks.sh` in our scripts directory with the following content: - - #!/bin/bash - - # Sample script to automate tasks: - # -Update local file database: - echo -e "\e[4;32mUPDATING LOCAL FILE DATABASE\e[0m" - updatedb - if [ $? == 0 ]; then - echo "The local file database was updated correctly." - else - echo "The local file database was not updated correctly." - fi - echo "" - - # -Find and / or delete files with 777 permissions. - echo -e "\e[4;32mLOOKING FOR FILES WITH 777 PERMISSIONS\e[0m" - # Enable either option (comment out the other line), but not both. - # Option 1: Delete files without prompting for confirmation. Assumes GNU version of find. - #find -type f -perm 0777 -delete - # Option 2: Ask for confirmation before deleting files. More portable across systems. - find -type f -perm 0777 -exec rm -i {} +; - echo "" - # -Alert when file system usage surpasses a defined limit - echo -e "\e[4;32mCHECKING FILE SYSTEM USAGE\e[0m" - THRESHOLD=30 - while read line; do - # This variable stores the file system path as a string - FILESYSTEM=$(echo $line | awk '{print $1}') - # This variable stores the use percentage (XX%) - PERCENTAGE=$(echo $line | awk '{print $5}') - # Use percentage without the % sign. - USAGE=${PERCENTAGE%?} - if [ $USAGE -gt $THRESHOLD ]; then - echo "The remaining available space in $FILESYSTEM is critically low. Used: $PERCENTAGE" - fi - done < <(df -h --total | grep -vi filesystem) - -Please note that there is a space between the two `<` signs in the last line of the script. - -![Shell Script to Find 777 Permissions](http://www.tecmint.com/wp-content/uploads/2015/08/Shell-Script-to-Find-777-Permissions.png) - -Shell Script to Find 777 Permissions - -### Using Cron ### - -To take efficiency one step further, you will not want to sit in front of your computer and run those scripts manually. Rather, you will use cron to schedule those tasks to run on a periodic basis and sends the results to a predefined list of recipients via email or save them to a file that can be viewed using a web browser. - -The following script (filesystem_usage.sh) will run the well-known **df -h** command, format the output into a HTML table and save it in the **report.html** file: - - #!/bin/bash - # Sample script to demonstrate the creation of an HTML report using shell scripting - # Web directory - WEB_DIR=/var/www/html - # A little CSS and table layout to make the report look a little nicer - echo " - - - - - " > $WEB_DIR/report.html - # View hostname and insert it at the top of the html body - HOST=$(hostname) - echo "Filesystem usage for host $HOST
- Last updated: $(date)

- - " >> $WEB_DIR/report.html - # Read the output of df -h line by line - while read line; do - echo "" >> $WEB_DIR/report.html - done < <(df -h | grep -vi filesystem) - echo "
Filesystem - Size - Use % -
" >> $WEB_DIR/report.html - echo $line | awk '{print $1}' >> $WEB_DIR/report.html - echo "" >> $WEB_DIR/report.html - echo $line | awk '{print $2}' >> $WEB_DIR/report.html - echo "" >> $WEB_DIR/report.html - echo $line | awk '{print $5}' >> $WEB_DIR/report.html - echo "
" >> $WEB_DIR/report.html - -In our **RHEL 7** server (**192.168.0.18**), this looks as follows: - -![Server Monitoring Report](http://www.tecmint.com/wp-content/uploads/2015/08/Server-Monitoring-Report.png) - -Server Monitoring Report - -You can add to that report as much information as you want. To run the script every day at 1:30 pm, add the following crontab entry: - - 30 13 * * * /root/scripts/filesystem_usage.sh - -### Summary ### - -You will most likely think of several other tasks that you want or need to automate; as you can see, using shell scripting will greatly simplify this effort. Feel free to let us know if you find this article helpful and don't hesitate to add your own ideas or comments via the form below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/using-shell-script-to-automate-linux-system-maintenance-tasks/ - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/gacanepa/ -[1]:http://www.tecmint.com/linux-performance-monitoring-and-file-system-statistics-reports/ -[2]:https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29 -[3]:http://www.tecmint.com/wp-content/pdf/bash.pdf -[4]:http://www.tecmint.com/60-commands-of-linux-a-guide-from-newbies-to-system-administrator/ -[5]:https://wiki.archlinux.org/index.php/Color_Bash_Prompt \ No newline at end of file diff --git a/translated/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md b/translated/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md new file mode 100644 index 0000000000..37a3dbe11c --- /dev/null +++ b/translated/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md @@ -0,0 +1,205 @@ +第四部分 - 使用 Shell 脚本自动化 Linux 系统维护任务 +================================================================================ +之前我听说高效系统管理员/工程师的其中一个特点是懒惰。一开始看起来很矛盾,但作者接下来解释了其中的原因: + +![自动化 Linux 系统维护任务](http://www.tecmint.com/wp-content/uploads/2015/08/Automate-Linux-System-Maintenance-Tasks.png) + +RHCE 系列:第四部分 - 自动化 Linux 系统维护任务 + +如果一个系统管理员花费大量的时间解决问题以及做重复的工作,你就应该怀疑他这么做是否正确。换句话说,一个高效的系统管理员/工程师应该制定一个计划使得尽量花费少的时间去做重复的工作,以及通过使用该系列中第三部分 [使用 Linux 工具集监视系统活动报告][1] 介绍的工具预见问题。因此,尽管看起来他/她没有做很多的工作,但那是因为 shell 脚本帮助完成了他的/她的大部分任务,这也就是本章我们将要探讨的东西。 + +### 什么是 shell 脚本? ### + +简单的说,shell 脚本就是一个由 shell 一步一步执行的程序,而 shell 是在 Linux 内核和端用户之间提供接口的另一个程序。 + +默认情况下,RHEL 7 中用户使用的 shell 是 bash(/bin/bash)。如果你想知道详细的信息和历史背景,你可以查看 [维基页面][2]。 + +关于这个 shell 提供的众多功能的介绍,可以查看 **man 手册**,也可以从 ([Bash 命令][3])下载 PDF 格式。除此之外,假设你已经熟悉 Linux 命令(否则我强烈建议你首先看一下 **Tecmint.com** 中的文章 [从新手到系统管理员指南][4] )。现在让我们开始吧。 + +### 写一个脚本显示系统信息 ### + +为了方便,首先让我们新建一个目录用于保存我们的 shell 脚本: + + # mkdir scripts + # cd scripts + +然后用喜欢的文本编辑器打开新的文本文件 `system_info.sh`。我们首先在头部插入一些注释以及一些命令: + + #!/bin/bash + + # RHCE 系列第四部分事例脚本 + # 该脚本会返回以下这些系统信息: + # -主机名称: + echo -e "\e[31;43m***** HOSTNAME INFORMATION *****\e[0m" + hostnamectl + echo "" + # -文件系统磁盘空间使用: + echo -e "\e[31;43m***** FILE SYSTEM DISK SPACE USAGE *****\e[0m" + df -h + echo "" + # -系统空闲和使用中的内存: + echo -e "\e[31;43m ***** FREE AND USED MEMORY *****\e[0m" + free + echo "" + # -系统启动时间: + echo -e "\e[31;43m***** SYSTEM UPTIME AND LOAD *****\e[0m" + uptime + echo "" + # -登录的用户: + echo -e "\e[31;43m***** CURRENTLY LOGGED-IN USERS *****\e[0m" + who + echo "" + # -使用内存最多的 5 个进程 + echo -e "\e[31;43m***** TOP 5 MEMORY-CONSUMING PROCESSES *****\e[0m" + ps -eo %mem,%cpu,comm --sort=-%mem | head -n 6 + echo "" + echo -e "\e[1;32mDone.\e[0m" + +然后,给脚本可执行权限: + + # chmod +x system_info.sh + +运行脚本: + + ./system_info.sh + +注意为了更好的可视化效果各部分标题都用颜色显示: + +![服务器监视 Shell 脚本](http://www.tecmint.com/wp-content/uploads/2015/08/Server-Monitoring-Shell-Script.png) + +服务器监视 Shell 脚本 + +该功能用以下命令提供: + + echo -e "\e[COLOR1;COLOR2m\e[0m" + +其中 COLOR1 和 COLOR2 是前景色和背景色([Arch Linux Wiki][5] 有更多的信息和选项解释), 是你想用颜色显示的字符串。 + +### 使任务自动化 ### + +你想使其自动化的任务可能因情况而不同。因此,我们不可能在一篇文章中覆盖所有可能的场景,但是我们会介绍使用 shell 脚本可以使其自动化的三种典型任务: + +**1)** 更新本地文件数据库, 2) 查找(或者删除)有 777 权限的文件, 以及 3) 文件系统使用超过定义的阀值时发出警告。 + +让我们在脚本目录中新建一个名为 `auto_tasks.sh` 的文件并添加以下内容: + + #!/bin/bash + + # 自动化任务事例脚本: + # -更新本地文件数据库: + echo -e "\e[4;32mUPDATING LOCAL FILE DATABASE\e[0m" + updatedb + if [ $? == 0 ]; then + echo "The local file database was updated correctly." + else + echo "The local file database was not updated correctly." + fi + echo "" + + # -查找 和/或 删除有 777 权限的文件。 + echo -e "\e[4;32mLOOKING FOR FILES WITH 777 PERMISSIONS\e[0m" + # Enable either option (comment out the other line), but not both. + # Option 1: Delete files without prompting for confirmation. Assumes GNU version of find. + #find -type f -perm 0777 -delete + # Option 2: Ask for confirmation before deleting files. More portable across systems. + find -type f -perm 0777 -exec rm -i {} +; + echo "" + # -文件系统使用率超过定义的阀值时发出警告 + echo -e "\e[4;32mCHECKING FILE SYSTEM USAGE\e[0m" + THRESHOLD=30 + while read line; do + # This variable stores the file system path as a string + FILESYSTEM=$(echo $line | awk '{print $1}') + # This variable stores the use percentage (XX%) + PERCENTAGE=$(echo $line | awk '{print $5}') + # Use percentage without the % sign. + USAGE=${PERCENTAGE%?} + if [ $USAGE -gt $THRESHOLD ]; then + echo "The remaining available space in $FILESYSTEM is critically low. Used: $PERCENTAGE" + fi + done < <(df -h --total | grep -vi filesystem) + +请注意该脚本最后一行两个 `<` 符号之间有个空格。 + +![查找 777 权限文件的 Shell 脚本](http://www.tecmint.com/wp-content/uploads/2015/08/Shell-Script-to-Find-777-Permissions.png) + +查找 777 权限文件的 Shell 脚本 + +### 使用 Cron ### + +想更进一步提高效率,你不会想只是坐在你的电脑前手动执行这些脚本。相反,你会使用 cron 来调度这些任务周期性地执行,并把结果通过邮件发动给预定义的接收者或者将它们保存到使用 web 浏览器可以查看的文件中。 + +下面的脚本(filesystem_usage.sh)会运行有名的 **df -h** 命令,格式化输出到 HTML 表格并保存到 **report.html** 文件中: + + #!/bin/bash + # Sample script to demonstrate the creation of an HTML report using shell scripting + # Web directory + WEB_DIR=/var/www/html + # A little CSS and table layout to make the report look a little nicer + echo " + + + + + " > $WEB_DIR/report.html + # View hostname and insert it at the top of the html body + HOST=$(hostname) + echo "Filesystem usage for host $HOST
+ Last updated: $(date)

+ + " >> $WEB_DIR/report.html + # Read the output of df -h line by line + while read line; do + echo "" >> $WEB_DIR/report.html + done < <(df -h | grep -vi filesystem) + echo "
Filesystem + Size + Use % +
" >> $WEB_DIR/report.html + echo $line | awk '{print $1}' >> $WEB_DIR/report.html + echo "" >> $WEB_DIR/report.html + echo $line | awk '{print $2}' >> $WEB_DIR/report.html + echo "" >> $WEB_DIR/report.html + echo $line | awk '{print $5}' >> $WEB_DIR/report.html + echo "
" >> $WEB_DIR/report.html + +在我们的 **RHEL 7** 服务器(**192.168.0.18**)中,看起来像下面这样: + +![服务器监视报告](http://www.tecmint.com/wp-content/uploads/2015/08/Server-Monitoring-Report.png) + +服务器监视报告 + +你可以添加任何你想要的信息到那个报告中。添加下面的 crontab 条目在每天下午的 1:30 运行该脚本: + + 30 13 * * * /root/scripts/filesystem_usage.sh + +### 总结 ### + +你很可能想起各种其他想要自动化的任务;正如你看到的,使用 shell 脚本能极大的简化任务。如果你觉得这篇文章对你有所帮助就告诉我们吧,别犹豫在下面的表格中添加你自己的想法或评论。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/using-shell-script-to-automate-linux-system-maintenance-tasks/ + +作者:[Gabriel Cánepa][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:http://www.tecmint.com/linux-performance-monitoring-and-file-system-statistics-reports/ +[2]:https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29 +[3]:http://www.tecmint.com/wp-content/pdf/bash.pdf +[4]:http://www.tecmint.com/60-commands-of-linux-a-guide-from-newbies-to-system-administrator/ +[5]:https://wiki.archlinux.org/index.php/Color_Bash_Prompt \ No newline at end of file From 94448c4d63edaa885d1e3506d39883fc3781196e Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 22 Aug 2015 16:13:59 +0800 Subject: [PATCH 1810/2517] translated --- ... Limits--IBM Launch LinuxONE Mainframes.md | 54 ------------------- ... Limits--IBM Launch LinuxONE Mainframes.md | 52 ++++++++++++++++++ 2 files changed, 52 insertions(+), 54 deletions(-) delete mode 100644 sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md create mode 100644 translated/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md diff --git a/sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md b/sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md deleted file mode 100644 index dc1f0e8986..0000000000 --- a/sources/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md +++ /dev/null @@ -1,54 +0,0 @@ -Translating----geekpi - -Linux Without Limits: IBM Launch LinuxONE Mainframes -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/Screenshot-2015-08-17-at-12.58.10.png) - -LinuxONE Emperor MainframeGood news for Ubuntu’s server team today as [IBM launch the LinuxONE][1] a Linux-only mainframe that is also able to run Ubuntu. - -The largest of the LinuxONE systems launched by IBM is called ‘Emperor’ and can scale up to 8000 virtual machines or tens of thousands of containers – a possible record for any one single Linux system. - -The LinuxONE is described by IBM as a ‘game changer’ that ‘unleashes the potential of Linux for business’. - -IBM and Canonical are working together on the creation of an Ubuntu distribution for LinuxONE and other IBM z Systems. Ubuntu will join RedHat and SUSE as ‘premier Linux distributions’ on IBM z. - -Alongside the ‘Emperor’ IBM is also offering the LinuxONE Rockhopper, a smaller mainframe for medium-sized businesses and organisations. - -IBM is the market leader in mainframes and commands over 90% of the mainframe market. - -注:youtube 视频 - - -### What Is a Mainframe Computer Used For? ### - -The computer you’re reading this article on would be dwarfed by a ‘big iron’ mainframe. They are large, hulking great cabinets packed full of high-end components, custom designed technology and dizzying amounts of storage (that is data storage, not ample room for pens and rulers). - -Mainframes computers are used by large organizations and businesses to process and store large amounts of data, crunch through statistics, and handle large-scale transaction processing. - -### ‘World’s Fastest Processor’ ### - -IBM has teamed up with Canonical Ltd to use Ubuntu on the LinuxONE and other IBM z Systems. - -The LinuxONE Emperor uses the IBM z13 processor. The chip, announced back in January, is said to be the world’s fastest microprocessor. It is able to deliver transaction response times in the milliseconds. - -But as well as being well equipped to handle for high-volume mobile transactions, the z13 inside the LinuxONE is also an ideal cloud system. - -It can handle more than 50 virtual servers per core for a total of 8000 virtual servers, making it a cheaper, greener and more performant way to scale-out to the cloud. - -**You don’t have to be a CIO or mainframe spotter to appreciate this announcement. The possibilities LinuxONE provides are clear enough. ** - -Source: [Reuters (h/t @popey)][2] - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/08/ibm-linuxone-mainframe-ubuntu-partnership - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www-03.ibm.com/systems/z/announcement.html -[2]:http://www.reuters.com/article/2015/08/17/us-ibm-linuxone-idUSKCN0QM09P20150817 diff --git a/translated/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md b/translated/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md new file mode 100644 index 0000000000..8d9b3dbccb --- /dev/null +++ b/translated/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md @@ -0,0 +1,52 @@ +Linux无极限:IBM发布LinuxONE大型机 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/Screenshot-2015-08-17-at-12.58.10.png) + +LinuxONE Emperor MainframeGood的Ubuntu服务器团队今天发布了一条消息关于[IBM发布了LinuxONE][1],一种只支持Linux的大型机,也可以运行Ubuntu。 + +IBM发布的最大的LinuxONE系统称作‘Emperor’,它可以扩展到8000台虚拟机或者上万台容器- 对任何一台Linux系统都可能的记录。 + +LinuxONE被IBM称作‘游戏改变者’,它‘释放了Linux的商业潜力’。 + +IBM和Canonical正在一起协作为LinuxONE和其他IBM z系统创建Ubuntu发行版。Ubuntu将会在IBM z加入RedHat和SUSE作为首屈一指的Linux发行版。 + +随着IBM ‘Emperor’发布的还有LinuxONE Rockhopper,一个为中等规模商业或者组织小一点的大型机。 + +IBM是大型机中的领导者,并且占有大型机市场中90%的份额。 + +注:youtube 视频 + + +### 大型机用于什么? ### + +你阅读这篇文章所使用的电脑在一个‘大铁块’一样的大型机前会显得很矮小。它们是巨大的,笨重的机柜里面充满了高端的组件、自己设计的技术和眼花缭乱的大量存储(就是数据存储,没有空间放钢笔和尺子)。 + +大型机被大型机构和商业用来处理和存储大量数据,通过统计来处理数据和处理大规模的事务处理。 + +### ‘世界最快的处理器’ ### + +IBM已经与Canonical Ltd组成了团队来在LinuxONE和其他IBM z系统中使用Ubuntu。 + +LinuxONE Emperor使用IBM z13处理器。发布于一月的芯片声称是时间上最快的微处理器。它可以在几毫秒内响应事务。 + +但是也可以很好地处理高容量的移动事务,z13中的LinuxONE系统也是一个理想的云系统。 + +每个核心可以处理超过50个虚拟服务器,总共可以超过8000台虚拟服务器么,这使它以更便宜,更环保、更高效的方式扩展到云。 + +**在阅读这篇文章时你不必是一个CIO或者大型机巡查员。LinuxONE提供的可能性足够清晰。** + +来源: [Reuters (h/t @popey)][2] + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/08/ibm-linuxone-mainframe-ubuntu-partnership + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www-03.ibm.com/systems/z/announcement.html +[2]:http://www.reuters.com/article/2015/08/17/us-ibm-linuxone-idUSKCN0QM09P20150817 From 5877780a5dfb3e99fd82039e47b0d20b7053e934 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 22 Aug 2015 16:15:50 +0800 Subject: [PATCH 1811/2517] translating --- ... FAQs with Answers--How to check MariaDB server version.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md b/sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md index 11bf478f09..f358d20756 100644 --- a/sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md +++ b/sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md @@ -1,3 +1,5 @@ +translating---geekpi + Linux FAQs with Answers--How to check MariaDB server version ================================================================================ > **Question**: I am on a VPS server where MariaDB server is running. How can I find out which version of MariaDB server it is running? @@ -46,4 +48,4 @@ via: http://ask.xmodulo.com/check-mariadb-server-version.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From c18956ce3476f54064bf39b0ea58d5b4c2ad476e Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 22 Aug 2015 16:30:41 +0800 Subject: [PATCH 1812/2517] translated --- ...rs--How to check MariaDB server version.md | 51 ------------------- ...rs--How to check MariaDB server version.md | 49 ++++++++++++++++++ 2 files changed, 49 insertions(+), 51 deletions(-) delete mode 100644 sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md create mode 100644 translated/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md diff --git a/sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md b/sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md deleted file mode 100644 index f358d20756..0000000000 --- a/sources/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md +++ /dev/null @@ -1,51 +0,0 @@ -translating---geekpi - -Linux FAQs with Answers--How to check MariaDB server version -================================================================================ -> **Question**: I am on a VPS server where MariaDB server is running. How can I find out which version of MariaDB server it is running? - -There are circumstances where you need to know the version of your database server, e.g., when upgrading the database or patching any known server vulnerabilities. There are a few ways to find out what the version of your MariaDB server is. - -### Method One ### - -The first method to identify MariaDB server version is by logging in to the MariaDB server. Right after you log in, your will see a welcome message where MariaDB server version is indicated. - -![](https://farm6.staticflickr.com/5807/20669891016_91249d3239_c.jpg) - -Alternatively, simply type 'status' command at the MariaDB prompt any time while you are logged in. The output will show server version as well as protocol version as follows. - -![](https://farm6.staticflickr.com/5801/20669891046_73f60e5c81_c.jpg) - -### Method Two ### - -If you don't have access to the MariaDB server, you cannot use the first method. In this case, you can infer MariaDB server version by checking which MariaDB package was installed. This works only when the MariaDB server was installed using a distribution's package manager. - -You can search for the installed MariaDB server package as follows. - -#### Debian, Ubuntu or Linux Mint: #### - - $ dpkg -l | grep mariadb - -The output below indicates that installed MariaDB server is version 10.0.17. - -![](https://farm1.staticflickr.com/607/20669890966_b611fcd915_c.jpg) - -#### Fedora, CentOS or RHEL: #### - - $ rpm -qa | grep mariadb - -The output below indicates that the installed version is 5.5.41. - -![](https://farm1.staticflickr.com/764/20508160748_23d9808256_b.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/check-mariadb-server-version.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://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md b/translated/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md new file mode 100644 index 0000000000..36ea2d15d6 --- /dev/null +++ b/translated/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md @@ -0,0 +1,49 @@ +Linux有问必答--如何检查MatiaDB服务端版本 +================================================================================ +> **提问**: 我使用的是一台运行MariaDB的VPS。我该如何检查MariaDB服务端的版本? + +你需要知道数据库版本的情况有:当你生你数据库或者为服务器打补丁。这里有几种方法找出MariaDB版本的方法。 + +### 方法一 ### + +第一种找出版本的方法是登录MariaDB服务器,登录之后,你会看到一些MariaDB的版本信息。 + +![](https://farm6.staticflickr.com/5807/20669891016_91249d3239_c.jpg) + +另一种方法是在登录MariaDB后出现的命令行中输入‘status’命令。输出会显示服务器的版本还有协议版本。 + +![](https://farm6.staticflickr.com/5801/20669891046_73f60e5c81_c.jpg) + +### 方法二 ### + +如果你不能访问MariaDB,那么你就不能用第一种方法。这种情况下你可以根据MariaDB的安装包的版本来推测。这种方法只有在MariaDB通过包管理器安装的才有用。 + +你可以用下面的方法检查MariaDB的安装包。 + +#### Debian、Ubuntu或者Linux Mint: #### + + $ dpkg -l | grep mariadb + +下面的输出说明MariaDB的版本是10.0.17。 + +![](https://farm1.staticflickr.com/607/20669890966_b611fcd915_c.jpg) + +#### Fedora、CentOS或者 RHEL: #### + + $ rpm -qa | grep mariadb + +下面的输出说明安装的版本是5.5.41。 + +![](https://farm1.staticflickr.com/764/20508160748_23d9808256_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/check-mariadb-server-version.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From 595f01ffe4122410e9cc05f2592d14ed4ac1af80 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 22 Aug 2015 16:32:02 +0800 Subject: [PATCH 1813/2517] Update 20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md --- ...0818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md b/translated/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md index 8d9b3dbccb..7899bfaf31 100644 --- a/translated/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md +++ b/translated/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md @@ -42,7 +42,7 @@ LinuxONE Emperor使用IBM z13处理器。发布于一月的芯片声称是时间 via: http://www.omgubuntu.co.uk/2015/08/ibm-linuxone-mainframe-ubuntu-partnership 作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From dddad3bdeb95ac64c57565bd62a0f4f221f3c408 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 22 Aug 2015 19:57:00 +0800 Subject: [PATCH 1814/2517] =?UTF-8?q?[Translating]=20news/20150818=20?= =?UTF-8?q?=E2=80=8BUbuntu=20Linux=20is=20coming=20to=20IBM=20mainframes.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md b/sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md index 8da7227eee..3eec354255 100644 --- a/sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md +++ b/sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md @@ -1,4 +1,5 @@ -​Ubuntu Linux is coming to IBM mainframes +ictlyh Translating​ +Ubuntu Linux is coming to IBM mainframes ================================================================================ SEATTLE -- It's finally happened. At [LinuxCon][1], IBM and [Canonical][2] announced that [Ubuntu Linux][3] will soon be running on IBM mainframes. From e34f824c8a877802d09f41b8cba8d1ddc693f8a1 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 22 Aug 2015 20:35:29 +0800 Subject: [PATCH 1815/2517] =?UTF-8?q?[Translated]=20news/20150818=20?= =?UTF-8?q?=E2=80=8BUbuntu=20Linux=20is=20coming=20to=20IBM=20mainframes.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Ubuntu Linux is coming to IBM mainframes.md | 47 ------------------- ...Ubuntu Linux is coming to IBM mainframes.md | 46 ++++++++++++++++++ 2 files changed, 46 insertions(+), 47 deletions(-) delete mode 100644 sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md create mode 100644 translated/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md diff --git a/sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md b/sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md deleted file mode 100644 index 3eec354255..0000000000 --- a/sources/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md +++ /dev/null @@ -1,47 +0,0 @@ -ictlyh Translating​ -Ubuntu Linux is coming to IBM mainframes -================================================================================ -SEATTLE -- It's finally happened. At [LinuxCon][1], IBM and [Canonical][2] announced that [Ubuntu Linux][3] will soon be running on IBM mainframes. - -![](http://zdnet2.cbsistatic.com/hub/i/2015/08/17/f389e12f-03f5-48cc-8019-af4ccf6c6ecd/f15b099e439c0e3a5fd823637d4bcf87/ubuntu-mainframe.jpg) - -You'll soon to be able to get your IBM mainframe in Ubuntu Linux orange - -According to Ross Mauri, IBM's General Manager of System z, and Mark Shuttleworth, Canonical and Ubuntu's founder, this move came about because of customer demand. For over a decade, [Red Hat Enterprise Linux (RHEL)][4] and [SUSE Linux Enterprise Server (SLES)][5] were the only supported IBM mainframe Linux distributions. - -As Ubuntu matured, more and more businesses turned to it for the enterprise Linux, and more and more of them wanted it on IBM big iron hardware. In particular, banks wanted Ubuntu there. Soon, financial CIOs will have their wish granted. - -In an interview Shuttleworth said that Ubuntu Linux will be available on the mainframe by April 2016 in the next long-term support version of Ubuntu: Ubuntu 16.04. Canonical and IBM already took the first move in this direction in late 2014 by bringing [Ubuntu to IBM's POWER][6] architecture. - -Before that, Canonical and IBM almost signed the dotted line to bring [Ubuntu to IBM mainframes in 2011][7] but that deal was never finalized. This time, it's happening. - -Jane Silber, Canonical's CEO, explained in a statement, "Our [expansion of Ubuntu platform][8] support to [IBM z Systems][9] is a recognition of the number of customers that count on z Systems to run their businesses, and the maturity the hybrid cloud is reaching in the marketplace. - -**Silber continued:** - -> With support of z Systems, including [LinuxONE][10], Canonical is also expanding our relationship with IBM, building on our support for the POWER architecture and OpenPOWER ecosystem. Just as Power Systems clients are now benefiting from the scaleout capabilities of Ubuntu, and our agile development process which results in first to market support of new technologies such as CAPI (Coherent Accelerator Processor Interface) on POWER8, z Systems clients can expect the same rapid rollout of technology advancements, and benefit from [Juju][11] and our other cloud tools to enable faster delivery of new services to end users. In addition, our collaboration with IBM includes the enablement of scale-out deployment of many IBM software solutions with Juju Charms. Mainframe clients will delight in having a wealth of 'charmed' IBM solutions, other software provider products, and open source solutions, deployable on mainframes via Juju. - -Shuttleworth expects Ubuntu on z to be very successful. "It's blazingly fast, and with its support for OpenStack, people who want exceptional cloud region performance will be very happy. - --------------------------------------------------------------------------------- - -via: http://www.zdnet.com/article/ubuntu-linux-is-coming-to-the-mainframe/#ftag=RSSbaffb68 - -作者:[Steven J. Vaughan-Nichols][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.zdnet.com/meet-the-team/us/steven-j-vaughan-nichols/ -[1]:http://events.linuxfoundation.org/events/linuxcon-north-america -[2]:http://www.canonical.com/ -[3]:http://www.ubuntu.comj/ -[4]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux -[5]:https://www.suse.com/products/server/ -[6]:http://www.zdnet.com/article/ibm-doubles-down-on-linux/ -[7]:http://www.zdnet.com/article/mainframe-ubuntu-linux/ -[8]:https://insights.ubuntu.com/2015/08/17/ibm-and-canonical-plan-ubuntu-support-on-ibm-z-systems-mainframe/ -[9]:http://www-03.ibm.com/systems/uk/z/ -[10]:http://www.zdnet.com/article/linuxone-ibms-new-linux-mainframes/ -[11]:https://jujucharms.com/ \ No newline at end of file diff --git a/translated/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md b/translated/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md new file mode 100644 index 0000000000..d31f9c34a7 --- /dev/null +++ b/translated/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md @@ -0,0 +1,46 @@ +IBM 大型机将搭载 Ubuntu Linux +================================================================================ +西雅图 -- 最终还是发生了。在 [LinuxCon][1] 上,IBM 和 [Canonical][2] 宣布 [Ubuntu Linux][3] 不久就会运行在 IBM 大型机上。 + +![](http://zdnet2.cbsistatic.com/hub/i/2015/08/17/f389e12f-03f5-48cc-8019-af4ccf6c6ecd/f15b099e439c0e3a5fd823637d4bcf87/ubuntu-mainframe.jpg) + +很快你就可以在你的 IBM 大型机上安装 Ubuntu Linux orange 啦 + +根据 IBM z 系统的总经理 Ross Mauri 以及 Canonical 和 Ubuntu 的创立者 Mark Shuttleworth 所言,这是因为客户需要。十多年来,IBM 大型机只支持 [红帽企业版 Linux (RHEL)][4] 和 [SUSE Linux 企业版 (SLES)][5] Linux 发行版。 + +随着 Ubuntu 越来越成熟,更多的企业把它作为企业级 Linux,也有更多的人希望它能运行在 IBM 大型机上。尤其是银行希望如此。不久,金融 CIO 们就可以满足他们的需求啦。 + +在一次采访中 Shuttleworth 说 Ubuntu Linux 在 2016 年 4 月下一次长期支持版 Ubuntu 16.04 中就可以用到大型机上。2014 年底 Canonical 和 IBM 将 [Ubuntu 带到 IBM 的 POWER][6] 架构中就迈出了第一步。 + +在那之前,Canonical 和 IBM 几乎签署协议 [在 2011 年实现 Ubuntu 支持 IBM 大型机][7],但最终也没有实现。这次,真的发生了。 + +Canonical 的 CEO Jane Silber 解释说 “[扩大 Ubuntu 平台支持][8] 到 [IBM z 系统][9] 是因为认识到需要 z 系统运行其业务的客户数量以及混合云市场的成熟。” + +**Silber 还说:** + +> 由于 z 系统的支持,包括 [LinuxONE][10],Canonical 和 IBM 的关系进一步加深,构建了对 POWER 架构的支持和 OpenPOWER 生态系统。正如 Power 系统的客户受益于 Ubuntu 的可扩展能力,我们的敏捷开发过程也使得类似 POWER8 CAPI(Coherent Accelerator Processor Interface,一致性加速器接口)达到市场支持,z 系统的客户也可以期望技术进步能快速部署,并从 [Juju][11] 和我们的其它云工具中获益,使得能快速向端用户提供新服务。另外,我们和 IBM 的合作包括实现扩展部署很多 IBM 和 Juju 的软件解决方案。大型机客户对于能通过 Juju 将丰富‘迷人的’ IBM 解决方案、其它软件供应商的产品、开源解决方案部署到大型机上感到高兴。 + +Shuttleworth 期望 z 系统上的 Ubuntu 能取得巨大成功。它发展很快,由于对 OpenStack 的支持,希望有卓越云性能的人会感到非常高兴。 + +-------------------------------------------------------------------------------- + +via: http://www.zdnet.com/article/ubuntu-linux-is-coming-to-the-mainframe/#ftag=RSSbaffb68 + +作者:[Steven J. Vaughan-Nichols][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.zdnet.com/meet-the-team/us/steven-j-vaughan-nichols/ +[1]:http://events.linuxfoundation.org/events/linuxcon-north-america +[2]:http://www.canonical.com/ +[3]:http://www.ubuntu.comj/ +[4]:http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[5]:https://www.suse.com/products/server/ +[6]:http://www.zdnet.com/article/ibm-doubles-down-on-linux/ +[7]:http://www.zdnet.com/article/mainframe-ubuntu-linux/ +[8]:https://insights.ubuntu.com/2015/08/17/ibm-and-canonical-plan-ubuntu-support-on-ibm-z-systems-mainframe/ +[9]:http://www-03.ibm.com/systems/uk/z/ +[10]:http://www.zdnet.com/article/linuxone-ibms-new-linux-mainframes/ +[11]:https://jujucharms.com/ \ No newline at end of file From a252e2a53ed53a47e2420e45f7b908ce5ca53e03 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 22 Aug 2015 20:41:11 +0800 Subject: [PATCH 1816/2517] [Translated]RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS shares.md --- ...Lists) and Mounting Samba or NFS Shares.md | 214 ----------------- ...Lists) and Mounting Samba or NFS Shares.md | 215 ++++++++++++++++++ 2 files changed, 215 insertions(+), 214 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md deleted file mode 100644 index 9237e8bd1c..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md +++ /dev/null @@ -1,214 +0,0 @@ -FSSlc translating - -RHCSA Series: Using ACLs (Access Control Lists) and Mounting Samba / NFS Shares – Part 7 -================================================================================ -In the last article ([RHCSA series Part 6][1]) we started explaining how to set up and configure local system storage using parted and ssm. - -![Configure ACL's and Mounting NFS / Samba Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ACLs-and-Mounting-NFS-Samba-Shares.png) - -RHCSA Series:: Configure ACL’s and Mounting NFS / Samba Shares – Part 7 - -We also discussed how to create and mount encrypted volumes with a password during system boot. In addition, we warned you to avoid performing critical storage management operations on mounted filesystems. With that in mind we will now review the most used file system formats in Red Hat Enterprise Linux 7 and then proceed to cover the topics of mounting, using, and unmounting both manually and automatically network filesystems (CIFS and NFS), along with the implementation of access control lists for your system. - -#### Prerequisites #### - -Before proceeding further, please make sure you have a Samba server and a NFS server available (note that NFSv2 is no longer supported in RHEL 7). - -During this guide we will use a machine with IP 192.168.0.10 with both services running in it as server, and a RHEL 7 box as client with IP address 192.168.0.18. Later in the article we will tell you which packages you need to install on the client. - -### File System Formats in RHEL 7 ### - -Beginning with RHEL 7, XFS has been introduced as the default file system for all architectures due to its high performance and scalability. It currently supports a maximum filesystem size of 500 TB as per the latest tests performed by Red Hat and its partners for mainstream hardware. - -Also, XFS enables user_xattr (extended user attributes) and acl (POSIX access control lists) as default mount options, unlike ext3 or ext4 (ext2 is considered deprecated as of RHEL 7), which means that you don’t need to specify those options explicitly either on the command line or in /etc/fstab when mounting a XFS filesystem (if you want to disable such options in this last case, you have to explicitly use no_acl and no_user_xattr). - -Keep in mind that the extended user attributes can be assigned to files and directories for storing arbitrary additional information such as the mime type, character set or encoding of a file, whereas the access permissions for user attributes are defined by the regular file permission bits. - -#### Access Control Lists #### - -As every system administrator, either beginner or expert, is well acquainted with regular access permissions on files and directories, which specify certain privileges (read, write, and execute) for the owner, the group, and “the world” (all others). However, feel free to refer to [Part 3 of the RHCSA series][2] if you need to refresh your memory a little bit. - -However, since the standard ugo/rwx set does not allow to configure different permissions for different users, ACLs were introduced in order to define more detailed access rights for files and directories than those specified by regular permissions. - -In fact, ACL-defined permissions are a superset of the permissions specified by the file permission bits. Let’s see how all of this translates is applied in the real world. - -1. There are two types of ACLs: access ACLs, which can be applied to either a specific file or a directory), and default ACLs, which can only be applied to a directory. If files contained therein do not have a ACL set, they inherit the default ACL of their parent directory. - -2. To begin, ACLs can be configured per user, per group, or per an user not in the owning group of a file. - -3. ACLs are set (and removed) using setfacl, with either the -m or -x options, respectively. - -For example, let us create a group named tecmint and add users johndoe and davenull to it: - - # groupadd tecmint - # useradd johndoe - # useradd davenull - # usermod -a -G tecmint johndoe - # usermod -a -G tecmint davenull - -And let’s verify that both users belong to supplementary group tecmint: - - # id johndoe - # id davenull - -![Verify Users](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Users.png) - -Verify Users - -Let’s now create a directory called playground within /mnt, and a file named testfile.txt inside. We will set the group owner to tecmint and change its default ugo/rwx permissions to 770 (read, write, and execute permissions granted to both the owner and the group owner of the file): - - # mkdir /mnt/playground - # touch /mnt/playground/testfile.txt - # chmod 770 /mnt/playground/testfile.txt - -Then switch user to johndoe and davenull, in that order, and write to the file: - - echo "My name is John Doe" > /mnt/playground/testfile.txt - echo "My name is Dave Null" >> /mnt/playground/testfile.txt - -So far so good. Now let’s have user gacanepa write to the file – and the write operation will, which was to be expected. - -But what if we actually need user gacanepa (who is not a member of group tecmint) to have write permissions on /mnt/playground/testfile.txt? The first thing that may come to your mind is adding that user account to group tecmint. But that will give him write permissions on ALL files were the write bit is set for the group, and we don’t want that. We only want him to be able to write to /mnt/playground/testfile.txt. - - # touch /mnt/playground/testfile.txt - # chown :tecmint /mnt/playground/testfile.txt - # chmod 777 /mnt/playground/testfile.txt - # su johndoe - $ echo "My name is John Doe" > /mnt/playground/testfile.txt - $ su davenull - $ echo "My name is Dave Null" >> /mnt/playground/testfile.txt - $ su gacanepa - $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt - -![Manage User Permissions](http://www.tecmint.com/wp-content/uploads/2015/04/User-Permissions.png) - -Manage User Permissions - -Let’s give user gacanepa read and write access to /mnt/playground/testfile.txt. - -Run as root, - - # setfacl -R -m u:gacanepa:rwx /mnt/playground - -and you’ll have successfully added an ACL that allows gacanepa to write to the test file. Then switch to user gacanepa and try to write to the file again: - - $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt - -To view the ACLs for a specific file or directory, use getfacl: - - # getfacl /mnt/playground/testfile.txt - -![Check ACLs of Files](http://www.tecmint.com/wp-content/uploads/2015/04/Check-ACL-of-File.png) - -Check ACLs of Files - -To set a default ACL to a directory (which its contents will inherit unless overwritten otherwise), add d: before the rule and specify a directory instead of a file name: - - # setfacl -m d:o:r /mnt/playground - -The ACL above will allow users not in the owner group to have read access to the future contents of the /mnt/playground directory. Note the difference in the output of getfacl /mnt/playground before and after the change: - -![Set Default ACL in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Set-Default-ACL-in-Linux.png) - -Set Default ACL in Linux - -[Chapter 20 in the official RHEL 7 Storage Administration Guide][3] provides more ACL examples, and I highly recommend you take a look at it and have it handy as reference. - -#### Mounting NFS Network Shares #### - -To show the list of NFS shares available in your server, you can use the showmount command with the -e option, followed by the machine name or its IP address. This tool is included in the nfs-utils package: - - # yum update && yum install nfs-utils - -Then do: - - # showmount -e 192.168.0.10 - -and you will get a list of the available NFS shares on 192.168.0.10: - -![Check Available NFS Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Mount-NFS-Shares.png) - -Check Available NFS Shares - -To mount NFS network shares on the local client using the command line on demand, use the following syntax: - - # mount -t nfs -o [options] remote_host:/remote/directory /local/directory - -which, in our case, translates to: - - # mount -t nfs 192.168.0.10:/NFS-SHARE /mnt/nfs - -If you get the following error message: “Job for rpc-statd.service failed. See “systemctl status rpc-statd.service” and “journalctl -xn” for details.”, make sure the rpcbind service is enabled and started in your system first: - - # systemctl enable rpcbind.socket - # systemctl restart rpcbind.service - -and then reboot. That should do the trick and you will be able to mount your NFS share as explained earlier. If you need to mount the NFS share automatically on system boot, add a valid entry to the /etc/fstab file: - - remote_host:/remote/directory /local/directory nfs options 0 0 - -The variables remote_host, /remote/directory, /local/directory, and options (which is optional) are the same ones used when manually mounting an NFS share from the command line. As per our previous example: - - 192.168.0.10:/NFS-SHARE /mnt/nfs nfs defaults 0 0 - -#### Mounting CIFS (Samba) Network Shares #### - -Samba represents the tool of choice to make a network share available in a network with *nix and Windows machines. To show the Samba shares that are available, use the smbclient command with the -L flag, followed by the machine name or its IP address. This tool is included in the samba-client package: - -You will be prompted for root’s password in the remote host: - - # smbclient -L 192.168.0.10 - -![Check Samba Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Samba-Shares.png) - -Check Samba Shares - -To mount Samba network shares on the local client you will need to install first the cifs-utils package: - - # yum update && yum install cifs-utils - -Then use the following syntax on the command line: - - # mount -t cifs -o credentials=/path/to/credentials/file //remote_host/samba_share /local/directory - -which, in our case, translates to: - - # mount -t cifs -o credentials=~/.smbcredentials //192.168.0.10/gacanepa /mnt/samba - -where smbcredentials: - - username=gacanepa - password=XXXXXX - -is a hidden file inside root’s home (/root/) with permissions set to 600, so that no one else but the owner of the file can read or write to it. - -Please note that the samba_share is the name of the Samba share as returned by smbclient -L remote_host as shown above. - -Now, if you need the Samba share to be available automatically on system boot, add a valid entry to the /etc/fstab file as follows: - - //remote_host:/samba_share /local/directory cifs options 0 0 - -The variables remote_host, /samba_share, /local/directory, and options (which is optional) are the same ones used when manually mounting a Samba share from the command line. Following the definitions given in our previous example: - - //192.168.0.10/gacanepa /mnt/samba cifs credentials=/root/smbcredentials,defaults 0 0 - -### Conclusion ### - -In this article we have explained how to set up ACLs in Linux, and discussed how to mount CIFS and NFS network shares in a RHEL 7 client. - -I recommend you to practice these concepts and even mix them (go ahead and try to set ACLs in mounted network shares) until you feel comfortable. If you have questions or comments feel free to use the form below to contact us anytime. Also, feel free to share this article through your social networks. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/ - -作者:[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/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ -[2]:http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ -[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html diff --git a/translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md new file mode 100644 index 0000000000..a68d36de2b --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md @@ -0,0 +1,215 @@ +RHCSA 系列:使用 ACL(访问控制列表) 和挂载 Samba/NFS 共享 – Part 7 +================================================================================ +在上一篇文章([RHCSA 系列 Part 6][1])中,我们解释了如何使用 parted 和 ssm 来设置和配置本地系统存储。 + +![配置 ACL 及挂载 NFS/Samba 共享](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ACLs-and-Mounting-NFS-Samba-Shares.png) + +RHCSA Series: 配置 ACL 及挂载 NFS/Samba 共享 – Part 7 + +我们也讨论了如何创建和在系统启动时使用一个密码来挂载加密的卷。另外,我们告诫过你要避免在挂载的文件系统上执行苛刻的存储管理操作。记住了这点后,现在,我们将回顾在 RHEL 7 中最常使用的文件系统格式,然后将涵盖有关手动或自动挂载、使用和卸载网络文件系统(CIFS 和 NFS)的话题以及在你的操作系统上实现访问控制列表的使用。 + +#### 前提条件 #### + +在进一步深入之前,请确保你可使用 Samba 服务和 NFS 服务(注意在 RHEL 7 中 NFSv2 已不再被支持)。 + +在本次指导中,我们将使用一个IP 地址为 192.168.0.10 且同时运行着 Samba 服务和 NFS 服务的机子来作为服务器,使用一个 IP 地址为 192.168.0.18 的 RHEL 7 机子来作为客户端。在这篇文章的后面部分,我们将告诉你在客户端上你需要安装哪些软件包。 + +### RHEL 7 中的文件系统格式 ### + +从 RHEL 7 开始,由于 XFS 的高性能和可扩展性,它已经被引入所有的架构中来作为默认的文件系统。 +根据 Red Hat 及其合作伙伴在主流硬件上执行的最新测试,当前 XFS 已支持最大为 500 TB 大小的文件系统。 + +另外, XFS 启用了 user_xattr(扩展用户属性) 和 acl( +POSIX 访问控制列表)来作为默认的挂载选项,而不像 ext3 或 ext4(对于 RHEL 7 来说, ext2 已过时),这意味着当挂载一个 XFS 文件系统时,你不必显式地在命令行或 /etc/fstab 中指定这些选项(假如你想在后一种情况下禁用这些选项,你必须显式地使用 no_acl 和 no_user_xattr)。 + +请记住扩展用户属性可以被指定到文件和目录中来存储任意的额外信息如 mime 类型,字符集或文件的编码,而用户属性中的访问权限由一般的文件权限位来定义。 + +#### 访问控制列表 #### + +作为一名系统管理员,无论你是新手还是专家,你一定非常熟悉与文件和目录有关的常规访问权限,这些权限为所有者,所有组和"世界"(所有的其他人)指定了特定的权限(可读,可写及可执行)。但如若你需要稍微更新你的记忆,请随意参考 [RHCSA 系列的 Part 3][3]. + +但是,由于标准的 `ugo/rwx` 集合并不允许为不同的用户配置不同的权限,所以 ACL 便被引入了进来,为的是为文件和目录定义更加详细的访问权限,而不仅仅是这些特别指定的特定权限。 + +事实上, ACL 定义的权限是由文件权限位所特别指定的权限的一个超集。下面就让我们看看这个转换是如何在真实世界中被应用的吧。 + +1. 存在两种类型的 ACL:访问 ACL,可被应用到一个特定的文件或目录上,以及默认 ACL,只可被应用到一个目录上。假如目录中的文件没有 ACL,则它们将继承它们的父目录的默认 ACL 。 + +2. 从一开始, ACL 就可以为每个用户,每个组或不在文件所属组中的用户配置相应的权限。 + +3. ACL 可使用 `setfacl` 来设置(和移除),可相应地使用 -m 或 -x 选项。 + +例如,让我们创建一个名为 tecmint 的组,并将用户 johndoe 和 davenull 加入该组: + + # groupadd tecmint + # useradd johndoe + # useradd davenull + # usermod -a -G tecmint johndoe + # usermod -a -G tecmint davenull + +并且让我们检验这两个用户都已属于追加的组 tecmint: + + # id johndoe + # id davenull + +![检验用户](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Users.png) + +检验用户 + +现在,我们在 /mnt 下创建一个名为 playground 的目录,并在该目录下创建一个名为 testfile.txt 的文件。我们将设定该文件的属组为 tecmint,并更改它的默认 ugo/rwx 权限为 770(即赋予该文件的属主和属组可读,可写和可执行权限): + + # mkdir /mnt/playground + # touch /mnt/playground/testfile.txt + # chmod 770 /mnt/playground/testfile.txt + +接着,依次切换为 johndoe 和 davenull 用户,并在文件中写入一些信息: + + echo "My name is John Doe" > /mnt/playground/testfile.txt + echo "My name is Dave Null" >> /mnt/playground/testfile.txt + +到目前为止,一切正常。现在我们让用户 gacanepa 来向该文件执行写操作 – 则写操作将会失败,这是可以预料的。 + +但实际上我们需要用户 gacanepa(TA 不是组 tecmint 的成员)在文件 /mnt/playground/testfile.txt 上有写权限,那又该怎么办呢?首先映入你脑海里的可能是将该用户添加到组 tecmint 中。但那将使得他在所有该组具有写权限位的文件上均拥有写权限,但我们并不想这样,我们只想他能够在文件 /mnt/playground/testfile.txt 上有写权限。 + + # touch /mnt/playground/testfile.txt + # chown :tecmint /mnt/playground/testfile.txt + # chmod 777 /mnt/playground/testfile.txt + # su johndoe + $ echo "My name is John Doe" > /mnt/playground/testfile.txt + $ su davenull + $ echo "My name is Dave Null" >> /mnt/playground/testfile.txt + $ su gacanepa + $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt + +![管理用户的权限](http://www.tecmint.com/wp-content/uploads/2015/04/User-Permissions.png) + +管理用户的权限 + +现在,让我们给用户 gacanepa 在 /mnt/playground/testfile.txt 文件上有读和写权限。 + +以 root 的身份运行如下命令: + + # setfacl -R -m u:gacanepa:rwx /mnt/playground + +则你将成功地添加一条 ACL,运行 gacanepa 对那个测试文件可写。然后切换为 gacanepa 用户,并再次尝试向该文件写入一些信息: + + $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt + +要观察一个特定的文件或目录的 ACL,可以使用 `getfacl` 命令: + + # getfacl /mnt/playground/testfile.txt + +![检查文件的 ACL](http://www.tecmint.com/wp-content/uploads/2015/04/Check-ACL-of-File.png) + +检查文件的 ACL + +要为目录设定默认 ACL(它的内容将被该目录下的文件继承,除非另外被覆写),在规则前添加 `d:`并特别指定一个目录名,而不是文件名: + + # setfacl -m d:o:r /mnt/playground + +上面的 ACL 将允许不在属组中的用户对目录 /mnt/playground 中的内容有读权限。请注意观察这次更改前后 +`getfacl /mnt/playground` 的输出结果的不同: + +![在 Linux 中设定默认 ACL](http://www.tecmint.com/wp-content/uploads/2015/04/Set-Default-ACL-in-Linux.png) + +在 Linux 中设定默认 ACL + +[在官方的 RHEL 7 存储管理指导手册的第 20 章][3] 中提供了更多有关 ACL 的例子,我极力推荐你看一看它并将它放在身边作为参考。 + +#### 挂载 NFS 网络共享 #### + +要显示你服务器上可用的 NFS 共享的列表,你可以使用带有 -e 选项的 `showmount` 命令,再跟上机器的名称或它的 IP 地址。这个工具包含在 `nfs-utils` 软件包中: + + # yum update && yum install nfs-utils + +接着运行: + + # showmount -e 192.168.0.10 + +则你将得到一个在 192.168.0.10 上可用的 NFS 共享的列表: + +![检查可用的 NFS 共享](http://www.tecmint.com/wp-content/uploads/2015/04/Mount-NFS-Shares.png) + +检查可用的 NFS 共享 + +要按照需求在本地客户端上使用命令行来挂载 NFS 网络共享,可使用下面的语法: + + # mount -t nfs -o [options] remote_host:/remote/directory /local/directory + +其中,在我们的例子中,对应为: + + # mount -t nfs 192.168.0.10:/NFS-SHARE /mnt/nfs + +若你得到如下的错误信息:“Job for rpc-statd.service failed. See “systemctl status rpc-statd.service”及“journalctl -xn” for details.”,请确保 `rpcbind` 服务被启用且已在你的系统中启动了。 + + # systemctl enable rpcbind.socket + # systemctl restart rpcbind.service + +接着重启。这就应该达到了上面的目的,且你将能够像先前解释的那样挂载你的 NFS 共享了。若你需要在系统启动时自动挂载 NFS 共享,可以向 /etc/fstab 文件添加一个有效的条目: + + remote_host:/remote/directory /local/directory nfs options 0 0 + +上面的变量 remote_host, /remote/directory, /local/directory 和 options(可选) 和在命令行中手动挂载一个 NFS 共享时使用的一样。按照我们前面的例子,对应为: + + 192.168.0.10:/NFS-SHARE /mnt/nfs nfs defaults 0 0 + +#### 挂载 CIFS (Samba) 网络共享 #### + +Samba 代表一个特别的工具,使得在由 *nix 和 Windows 机器组成的网络中进行网络共享成为可能。要显示可用的 Samba 共享,可使用带有 -L 选项的 smbclient 命令,再跟上机器的名称或它的 IP 地址。这个工具包含在 samba_client 软件包中: + +你将被提示在远程主机上输入 root 用户的密码: + + # smbclient -L 192.168.0.10 + +![检查 Samba 共享](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Samba-Shares.png) + +检查 Samba 共享 + +要在本地客户端上挂载 Samba 网络共享,你需要已安装好 cifs-utils 软件包: + + # yum update && yum install cifs-utils + +然后在命令行中使用下面的语法: + + # mount -t cifs -o credentials=/path/to/credentials/file //remote_host/samba_share /local/directory + +其中,在我们的例子中,对应为: + + # mount -t cifs -o credentials=~/.smbcredentials //192.168.0.10/gacanepa /mnt/samba + +其中 `smbcredentials` + + username=gacanepa + password=XXXXXX + +是一个位于 root 用户的家目录(/root/) 中的隐藏文件,其权限被设置为 600,所以除了该文件的属主外,其他人对该文件既不可读也不可写。 + +请注意 samba_share 是 Samba 分享的名称,由上面展示的 `smbclient -L remote_host` 所返回。 + +现在,若你需要在系统启动时自动地使得 Samba 分享可用,可以向 /etc/fstab 文件添加一个像下面这样的有效条目: + + //remote_host:/samba_share /local/directory cifs options 0 0 + +上面的变量 remote_host, /remote/directory, /local/directory 和 options(可选) 和在命令行中手动挂载一个 Samba 共享时使用的一样。按照我们前面的例子中所给的定义,对应为: + + //192.168.0.10/gacanepa /mnt/samba cifs credentials=/root/smbcredentials,defaults 0 0 + +### 结论 ### + +在这篇文章中,我们已经解释了如何在 Linux 中设置 ACL,并讨论了如何在一个 RHEL 7 客户端上挂载 CIFS 和 NFS 网络共享。 + +我建议你去练习这些概念,甚至混合使用它们(试着在一个挂载的网络共享上设置 ACL),直至你感觉舒适。假如你有问题或评论,请随时随意地使用下面的评论框来联系我们。另外,请随意通过你的社交网络分享这篇文章。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/ + +作者:[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/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ +[2]:http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ +[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html \ No newline at end of file From 0ff0aa172f23fc7372361f35a179e925f50769ca Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 22 Aug 2015 20:42:00 +0800 Subject: [PATCH 1817/2517] [Translating] sources/tech/20150821 How to Install Visual Studio Code in Linux.md --- .../tech/20150821 How to Install Visual Studio Code in Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150821 How to Install Visual Studio Code in Linux.md b/sources/tech/20150821 How to Install Visual Studio Code in Linux.md index 2fac79701e..9c00401f76 100644 --- a/sources/tech/20150821 How to Install Visual Studio Code in Linux.md +++ b/sources/tech/20150821 How to Install Visual Studio Code in Linux.md @@ -1,3 +1,4 @@ +ictlyh Translating How to Install Visual Studio Code in Linux ================================================================================ Hi everyone, today we'll learn how to install Visual Studio Code in Linux Distributions. Visual Studio Code is a code-optimized editor based on Electron, a piece of software that is based on Chromium, which is used to deploy io.js applications for the desktop. It is a source code editor and text editor developed by Microsoft for all the operating system platforms including Linux. Visual Studio Code is free but not an open source software ie. its under proprietary software license terms. It is an awesome powerful and fast code editor for our day to day use. Some of the cool features of visual studio code are navigation, intellisense support, syntax highlighting, bracket matching, auto indentation, and snippets, keyboard support with customizable bindings and support for dozens of languages like Python, C++, jade, PHP, XML, Batch, F#, DockerFile, Coffee Script, Java, HandleBars, R, Objective-C, PowerShell, Luna, Visual Basic, .Net, Asp.Net, C#, JSON, Node.js, Javascript, HTML, CSS, Less, Sass and Markdown. Visual Studio Code integrates with package managers and repositories, and builds and other common tasks to make everyday workflows faster. The most popular feature in Visual Studio Code is its debugging feature which includes a streamlined support for Node.js debugging in the preview. From 90ccfc60e7d072ac6c3ab2ea07381e3ce43ca2fa Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 22 Aug 2015 20:47:45 +0800 Subject: [PATCH 1818/2517] Update RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...ing SSH, Setting Hostname and Enabling Network Services.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md b/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md index a381b1c94a..40fa771580 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md @@ -1,3 +1,5 @@ +FSSlc translating + RHCSA Series: Securing SSH, Setting Hostname and Enabling Network Services – Part 8 ================================================================================ As a system administrator you will often have to log on to remote systems to perform a variety of administration tasks using a terminal emulator. You will rarely sit in front of a real (physical) terminal, so you need to set up a way to log on remotely to the machines that you will be asked to manage. @@ -212,4 +214,4 @@ via: http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network- [a]:http://www.tecmint.com/author/gacanepa/ [1]:http://www.tecmint.com/20-netstat-commands-for-linux-network-management/ -[2]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ \ No newline at end of file +[2]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ From 0f984b2a584921758f4d6afba60ebf0bb65d2af5 Mon Sep 17 00:00:00 2001 From: runningwater Date: Sun, 23 Aug 2015 00:21:15 +0800 Subject: [PATCH 1819/2517] =?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 --- ...How to Install Logwatch on Ubuntu 15.04.md | 138 ------------------ ...How to Install Logwatch on Ubuntu 15.04.md | 137 +++++++++++++++++ 2 files changed, 137 insertions(+), 138 deletions(-) delete mode 100644 sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md create mode 100644 translated/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md diff --git a/sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md b/sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md deleted file mode 100644 index 24c71b0cbe..0000000000 --- a/sources/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md +++ /dev/null @@ -1,138 +0,0 @@ -(translating by runningwater) -How to Install Logwatch on Ubuntu 15.04 -================================================================================ -Hi, Today we are going to illustrate the setup of Logwatch on Ubuntu 15.04 Operating system where as it can be used for any Linux and UNIX like operating systems. Logwatch is a customizable system log analyzer and reporting log-monitoring system that go through your logs for a given period of time and make a report in the areas that you wish with the details you want. Its an easy tool to install, configure, review and to take actions that will improve security from data it provides. Logwatch scans the log files of major operating system components, like SSH, Web Server and forwards a summary that contains the valuable items in it that needs to be looked at. - -### Pre-installation Setup ### - -We will be using Ubuntu 15.04 operating system to deploy Logwatch on it so as a perquisite for the installation of Logwatch, make sure that your emails setup is working as it will be used to send email to the administrators for daily reports on the gathered reports.Your system repositories should be enabled as we will be installing it from its available universal repositories. - -Then open the terminal of your ubuntu operating system and login with root user to update your system packages before moving to Logwatch installation. - - root@ubuntu-15:~# apt-get update - -### Installing Logwatch ### - -Once your system is updated and your have fulfilled all its prerequisites then run the following command to start the installation of Logwatch in your server. - - root@ubuntu-15:~# apt-get install logwatch - -The logwatch installation process will starts with addition of some extra required packages as shown once you press “Y” to accept the required changes to the system. - -During the installation process you will be prompted to configure the Postfix Configurations according to your mail server’s setup. Here we used “Local only” in the tutorial for ease, we can choose from the other available options as per your infrastructure requirements and then press “OK” to proceed. - -![Potfix Configurations](http://blog.linoxide.com/wp-content/uploads/2015/08/21.png) - -Then you have to choose your mail server’s name that will also be used by other programs, so it should be single fully qualified domain name (FQDN). - -![Postfix Setup](http://blog.linoxide.com/wp-content/uploads/2015/08/31.png) - -Once you press “OK” after postfix configurations, then it will completes the Logwatch installation process with default configurations of Postfix. - -![Logwatch Completion](http://blog.linoxide.com/wp-content/uploads/2015/08/41.png) - -You can check the status of Logwatch by issuing the following command in the terminal that should be in active state. - - root@ubuntu-15:~# service postfix status - -![Postfix Status](http://blog.linoxide.com/wp-content/uploads/2015/08/51.png) - -To confirm the installation of Logwatch with its default configurations, issue the simple “logwatch” command as shown. - - root@ubuntu-15:~# logwatch - -The output from the above executed command will results in following compiled report form in the terminal. - -![Logwatch Report](http://blog.linoxide.com/wp-content/uploads/2015/08/61.png) - -### Logwatch Configurations ### - -Now after successful installation of Logwatch, we need to make few configuration changes in its configuration file located under following shown path. So, let’s open it with the file editor to update its configurations as required. - - root@ubuntu-15:~# vim /usr/share/logwatch/default.conf/logwatch.conf - -**Output/Format Options** - -By default Logwatch will print to stdout in text with no encoding.To make email Default set “Output = mail” and to save to file set “Output = file”. So you can comment out the its default configurations as per your required settings. - - Output = stdout - -To make Html the default formatting update the following line if you are using Internet email configurations. - - Format = text - -Now add the default person to mail reports should be sent to, it could be a local account or a complete email address that you are free to mention in this line - - MailTo = root - #MailTo = user@test.com - -Default person to mail reports sent from can be a local account or any other you wish to use. - - # complete email address. - MailFrom = Logwatch - -Save the changes made in the configuration file of Logwatch while leaving the other parameter as default. - -**Cronjob Configuration** - -Now edit the "00logwatch" file in daily crons directory to configure your desired email address to forward reports from logwatch. - - root@ubuntu-15:~# vim /etc/cron.daily/00logwatch - -Here you need to use "--mailto" user@test.com instead of --output mail and save the file. - -![Logwatch Cronjob](http://blog.linoxide.com/wp-content/uploads/2015/08/71.png) - -### Using Logwatch Report ### - -Now we generate the test report by executing the "logwatch" command in the terminal to get its result shown in the Text format within the terminal. - - root@ubuntu-15:~#logwatch - -The generated report starts with showing its execution time and date, it will be comprising of different sections that starts with its begin status and closed with end status after showing the complete information about its logs of the mentioned sections. - -Here is its starting point looks like, where it starts by showing all the installed packages in the system as shown below. - -![dpkg status](http://blog.linoxide.com/wp-content/uploads/2015/08/81.png) - -The following sections shows the logs informmation about the login sessions, rsyslogs and SSH connections about the current and last sessions enabled on the system. - -![logwatch report](http://blog.linoxide.com/wp-content/uploads/2015/08/9.png) - -The logwatch report will ends up by showing the secure sudo logs and the disk space usage of the root diretory as shown below. - -![Logwatch end report](http://blog.linoxide.com/wp-content/uploads/2015/08/10.png) - -You can also check for the generated emails about the logwatch reports by opening the following file. - - root@ubuntu-15:~# vim /var/mail/root - -Here you will be able to see all the generated emails to your configured users with their message delivery status. - -### More about Logwatch ### - -Logwatch is a great tool to lern more about it, so if your more interested to learn more about its logwatch then you can also get much help from the below few commands. - - root@ubuntu-15:~# man logwatch - -The above command contains all the users manual about the logwatch, so read it carefully and to exit from the manuals section simply press "q". - -To get help about the logwatch commands usage you can run the following help command for further information in details. - - root@ubuntu-15:~# logwatch --help - -### Conclusion ### - -At the end of this tutorial you learn about the complete setup of Logwatch on Ubuntu 15.04 that includes with its installation and configurations guide. Now you can start monitoring your logs in a customize able form, whether you monitor the logs of all the services rnning on your system or you customize it to send you the reports about the specific services on the scheduled days. So, let's use this tool and feel free to leave us a comment if you face any issue or need to know more about logwatch usage. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/install-use-logwatch-ubuntu-15-04/ - -作者:[Kashif Siddique][a] -译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/kashifs/ diff --git a/translated/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md b/translated/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md new file mode 100644 index 0000000000..8bb0836755 --- /dev/null +++ b/translated/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md @@ -0,0 +1,137 @@ +Ubuntu 15.04 and系统中安装 Logwatch +================================================================================ +大家好,今天我们会讲述在 Ubuntu 15.04 操作系统上如何安装 Logwatch 软件,它也可以在任意的 Linux 系统和类 Unix 系统上安装。Logwatch 是一款可定制的日志分析和日志监控报告生成系统,它可以根据一段时间的日志文件生成您所希望关注的详细报告。它具有易安装、易配置、可审查等特性,同时对其提供的数据的安全性上也有一些保障措施。Logwatch 会扫描重要的操作系统组件像 SSH、网站服务等的日志文件,然后生成用户所关心的有价值的条目汇总报告。 + +### 预安装设置 ### + +我们会使用 Ubuntu 15.04 版本的操作系统来部署 Logwatch,所以安装 Logwatch 之前,要确保系统上邮件服务设置是正常可用的。因为它会每天把生成的报告通过日报的形式发送邮件给管理员。您的系统的源库也应该设置可用,以便可以从通用源库来安装 Logwatch。 + +然后打开您 ubuntu 系统的终端,用 root 账号登陆,在进入 Logwatch 的安装操作前,先更新您的系统软件包。 + + root@ubuntu-15:~# apt-get update + +### 安装 Logwatch ### + +只要你的系统已经更新和已经满足前面说的先决条件,那么就可以在您的机器上输入如下命令来安装 Logwatch。 + + root@ubuntu-15:~# apt-get install logwatch + +在安装过程中,一旦您按提示按下“Y”健同意对系统修改的话,Logwatch 将会开始安装一些额外的必须软件包。 + +在安装过程中会根据您机器上的邮件服务器设置情况弹出提示对 Postfix 设置的配置界面。在这篇教程中我们使用最容易的 “仅本地” 选项。根据您的基础设施情况也可以选择其它的可选项,然后点击“确定”继续。 + +![Potfix Configurations](http://blog.linoxide.com/wp-content/uploads/2015/08/21.png) + +随后您得选择邮件服务器名,这邮件服务器名也会被其它程序使用,所以它应该是一个完全合格域名/全称域名(FQDN),且只一个。 + +![Postfix Setup](http://blog.linoxide.com/wp-content/uploads/2015/08/31.png) + +一旦按下在 postfix 配置提示底端的 “OK”,安装进程就会用 Postfix 的默认配置来安装,并且完成 Logwatch 的整个安装。 + +![Logwatch Completion](http://blog.linoxide.com/wp-content/uploads/2015/08/41.png) + +您可以在终端下发出如下命令来检查 Logwatch 状态,正常情况下它应该是激活状态。 + + root@ubuntu-15:~# service postfix status + +![Postfix Status](http://blog.linoxide.com/wp-content/uploads/2015/08/51.png) + +要确认 Logwatch 在默认配置下的安装信息,可以如下示简单的发出“logwatch” 命令。 + + root@ubuntu-15:~# logwatch + +上面执行命令的输出就是终端下编制出的报表展现格式。 + +![Logwatch Report](http://blog.linoxide.com/wp-content/uploads/2015/08/61.png) + +### 配置 Logwatch ### + +在成功安装好 Logwatch 后,我们需要在它的配置文件中做一些修改,配置文件位于如下所示的路径。那么,就让我们用文本编辑器打开它,然后按需要做些变动。 + + root@ubuntu-15:~# vim /usr/share/logwatch/default.conf/logwatch.conf + +**输出/格式化选项** + +默认情况下 Logwatch 会以无编码的文本打印到标准输出方式。要改为以邮件为默认方式,需设置“Output = mail”,要改为保存成文件方式,需设置“Output = file”。所以您可以根据您的要求设置其默认配置。 + + Output = stdout + +如果使用的是因特网电子邮件配置,要用 Html 格式为默认出格式,需要修改成如下行所示的样子。 + + Format = text + +现在增加默认的邮件报告接收人地址,可以是本地账号也可以是完整的邮件地址,需要的都可以在这行上写上 + + MailTo = root + #MailTo = user@test.com + +默认的邮件发送人可以是本地账号,也可以是您需要使用的其它名字。 + + # complete email address. + MailFrom = Logwatch + +对这个配置文件保存修改,至于其它的参数就让它是默认的,无需改动。 + +**调度任务配置** + +现在编辑在日常 crons 目录下的 “00logwatch” 文件来配置从 logwatch 生成的报告需要发送的邮件地址。 + + root@ubuntu-15:~# vim /etc/cron.daily/00logwatch + +在这儿您需要作用“--mailto user@test.com”来替换掉“--output mail”,然后保存文件。 + +![Logwatch Cronjob](http://blog.linoxide.com/wp-content/uploads/2015/08/71.png) + +### 生成报告 ### + +现在我们在终端中执行“logwatch”命令来生成测试报告,生成的结果在终端中会以文本格式显示出来。 + + root@ubuntu-15:~#logwatch + +生成的报告开始部分显示的是执行的时间和日期。它包含不同的部分,每个部分以开始标识开始而以结束标识结束,中间显示的标识部分提到的完整日志信息。 + +这儿演示的是开始标识头的样子,要显示系统上所有安装包的信息,如下所示: + +![dpkg status](http://blog.linoxide.com/wp-content/uploads/2015/08/81.png) + +接下来的部分显示的日志信息是关于当前系统登陆会话、rsyslogs 和当前及最后可用的会话 SSH 连接信息。 + +![logwatch report](http://blog.linoxide.com/wp-content/uploads/2015/08/9.png) + +Logwatch 报告最后显示的是安全 sudo 日志及root目录磁盘使用情况,如下示: + +![Logwatch end report](http://blog.linoxide.com/wp-content/uploads/2015/08/10.png) + +您也可以打开如下的文件来检查生成的 logwatch 报告电子邮件。 + + root@ubuntu-15:~# vim /var/mail/root + +您会看到所有已生成的邮件到其配置用户的信息传送状态。 + +### 更多详情 ### + +Logwatch 是一款很不错的工具,可以学习的很多很多,所以如果您对它的日志监控功能很感兴趣的话,也以通过如下所示的简短命令来获得更多帮助。 + + root@ubuntu-15:~# man logwatch + +上面的命令包含所有关于 logwatch 的用户手册,所以仔细阅读,要退出手册的话可以简单的输入“q”。 + +关于 logwatch 命令的使用,您可以使用如下所示的帮助命令来获得更多的详细信息。 + + root@ubuntu-15:~# logwatch --help + +### 结论 ### + +教程结束,您也学会了如何在 Ubuntu 15.04 上对 Logwatch 的安装、配置等全部设置指导。现在您就可以自定义监控您的系统日志,不管是监控所有服务的运行情况还是对特定的服务在指定的时间发送报告都可以。所以,开始使用这工具吧,无论何时有问题或想知道更多关于 logwatch 的使用的都可以给我们留言。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-use-logwatch-ubuntu-15-04/ + +作者:[Kashif Siddique][a] +译者:[runningwater](https://github.com/runningwater) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/kashifs/ From 4eb314a47b3d8decfb737dccd8ac92e45603c7e3 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Sun, 23 Aug 2015 09:43:03 +0800 Subject: [PATCH 1820/2517] Create 20150823 How learning data structures and algorithms make you a better developer.md --- ... algorithms make you a better developer.md | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 sources/talk/20150823 How learning data structures and algorithms make you a better developer.md diff --git a/sources/talk/20150823 How learning data structures and algorithms make you a better developer.md b/sources/talk/20150823 How learning data structures and algorithms make you a better developer.md new file mode 100644 index 0000000000..7152efa1ed --- /dev/null +++ b/sources/talk/20150823 How learning data structures and algorithms make you a better developer.md @@ -0,0 +1,126 @@ +How learning data structures and algorithms make you a better developer +================================================================================ + +> "I'm a huge proponent of designing your code around the data, rather than the other way around, and I think it's one of the reasons git has been fairly successful […] I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important." +-- Linus Torvalds + +--- + +> "Smart data structures and dumb code works a lot better than the other way around." +-- Eric S. Raymond, The Cathedral and The Bazaar + +Learning about data structures and algorithms makes you a stonking good programmer. + +**Data structures and algorithms are patterns for solving problems.** The more of them you have in your utility belt, the greater variety of problems you'll be able to solve. You'll also be able to come up with more elegant solutions to new problems than you would otherwise be able to. + +You'll understand, ***in depth***, how your computer gets things done. This informs any technical decisions you make, regardless of whether or not you're using a given algorithm directly. Everything from memory allocation in the depths of your operating system, to the inner workings of your RDBMS to how your networking stack manages to send data from one corner of Earth to another. All computers rely on fundamental data structures and algorithms, so understanding them better makes you understand the computer better. + +Cultivate a broad and deep knowledge of algorithms and you'll have stock solutions to large classes of problems. Problem spaces that you had difficulty modelling before often slot neatly into well-worn data structures that elegantly handle the known use-cases. Dive deep into the implementation of even the most basic data structures and you'll start seeing applications for them in your day-to-day programming tasks. + +You'll also be able to come up with novel solutions to the somewhat fruitier problems you're faced with. Data structures and algorithms have the habit of proving themselves useful in situations that they weren't originally intended for, and the only way you'll discover these on your own is by having a deep and intuitive knowledge of at least the basics. + +But enough with the theory, have a look at some examples + +###Figuring out the fastest way to get somewhere### +Let's say we're creating software to figure out the shortest distance from one international airport to another. Assume we're constrained to following routes: + +![](http://www.happybearsoftware.com/assets/posts/how-learning-data-structures-and-algorithms-makes-you-a-better-developer/airport-graph-d2e32b3344b708383e405d67a80c29ea.svg) + +graph of destinations and the distances between them, how can we find the shortest distance say, from Helsinki to London? **Dijkstra's algorithm** is the algorithm that will definitely get us the right answer in the shortest time. + +In all likelihood, if you ever came across this problem and knew that Dijkstra's algorithm was the solution, you'd probably never have to implement it from scratch. Just ***knowing*** about it would point you to a library implementation that solves the problem for you. + +If you did dive deep into the implementation, you'd be working through one of the most important graph algorithms we know of. You'd know that in practice it's a little resource intensive so an extension called A* is often used in it's place. It gets used everywhere from robot guidance to routing TCP packets to GPS pathfinding. + +###Figuring out the order to do things in### +Let's say you're trying to model courses on a new Massive Open Online Courses platform (like Udemy or Khan Academy). Some of the courses depend on each other. For example, a user has to have taken Calculus before she's eligible for the course on Newtonian Mechanics. Courses can have multiple dependencies. Here's are some examples of what that might look like written out in YAML: + + # Mapping from course name to requirements + # + # If you're a physcist or a mathematicisn and you're reading this, sincere + # apologies for the completely made-up dependency tree :) + courses: + arithmetic: [] + algebra: [arithmetic] + trigonometry: [algebra] + calculus: [algebra, trigonometry] + geometry: [algebra] + mechanics: [calculus, trigonometry] + atomic_physics: [mechanics, calculus] + electromagnetism: [calculus, atomic_physics] + radioactivity: [algebra, atomic_physics] + astrophysics: [radioactivity, calculus] + quantumn_mechanics: [atomic_physics, radioactivity, calculus] + +Given those dependencies, as a user, I want to be able to pick any course and have the system give me an ordered list of courses that I would have to take to be eligible. So if I picked `calculus`, I'd want the system to return the list: + + arithmetic -> algebra -> trigonometry -> calculus + +Two important constraints on this that may not be self-evident: + + - At every stage in the course list, the dependencies of the next course must be met. + - We don't want any duplicate courses in the list. + +This is an example of resolving dependencies and the algorithm we're looking for to solve this problem is called topological sort (tsort). Tsort works on a dependency graph like we've outlined in the YAML above. Here's what that would look like in a graph (where each arrow means `requires`): + +![](http://www.happybearsoftware.com/assets/posts/how-learning-data-structures-and-algorithms-makes-you-a-better-developer/course-graph-2f60f42bb0dc95319954ce34c02705a2.svg) + +topological sort does is take a graph like the one above and find an ordering in which all the dependencies are met at each stage. So if we took a sub-graph that only contained `radioactivity` and it's dependencies, then ran tsort on it, we might get the following ordering: + + arithmetic + algebra + trigonometry + calculus + mechanics + atomic_physics + radioactivity + +This meets the requirements set out by the use case we described above. A user just has to pick `radioactivity` and they'll get an ordered list of all the courses they have to work through before they're allowed to. + +We don't even need to go into the details of how topological sort works before we put it to good use. In all likelihood, your programming language of choice probably has an implementation of it in the standard library. In the worst case scenario, your Unix probably has the `tsort` utility installed by default, run man `tsort` and have a play with it. + +###Other places tsort get's used### + + - **Tools like** `make` allow you to declare task dependencies. Topological sort is used under the hood to figure out what order the tasks should be executed in. + - **Any programming language that has a `require` directive**, indicating that the current file requires the code in a different file to be run first. Here topological sort can be used to figure out what order the files should be loaded in so that each is only loaded once and all dependencies are met. + - **Project management tools with Gantt charts**. A Gantt chart is a graph that outlines all the dependencies of a given task and gives you an estimate of when it will be complete based on those dependencies. I'm not a fan of Gantt charts, but it's highly likely that tsort will be used to draw them. + +###Squeezing data with Huffman coding### +[Huffman coding](http://en.wikipedia.org/wiki/Huffman_coding) is an algorithm used for lossless data compression. It works by analyzing the data you want to compress and creating a binary code for each character. More frequently occurring characters get smaller codes, so `e` might be encoded as `111` while `x` might be `10010`. The codes are created so that they can be concatenated without a delimeter and still be decoded accurately. + +Huffman coding is used along with LZ77 in the DEFLATE algorithm which is used by gzip to compress things. gzip is used all over the place, in particular for compressing files (typically anything with a `.gz` extension) and for http requests/responses in transit. + +Knowing how to implement and use Huffman coding has a number of benefits: + + - You'll know why a larger compression context results in better compression overall (e.g. the more you compress, the better the compression ratio). This is one of the proposed benefits of SPDY: that you get better compression on multiple HTTP requests/responses. + - You'll know that if you're compressing your javascript/css in transit anyway, it's completely pointless to run a minifier on them. Sames goes for PNG files, which use DEFLATE internally for compression already. + - If you ever find yourself trying to forcibly decipher encrypted information , you may realize that since repeating data compresses better, the compression ratio of a given bit of ciphertext will help you determine it's [block cipher mode of operation](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation). + +###Picking what to learn next is hard### +Being a programmer involves learning constantly. To operate as a web developer you need to know markup languages, high level languages like ruby/python, regular expressions, SQL and JavaScript. You need to know the fine details of HTTP, how to drive a unix terminal and the subtle art of object oriented programming. It's difficult to navigate that landscape effectively and choose what to learn next. + +I'm not a fast learner so I have to choose what to spend time on very carefully. As much as possible, I want to learn skills and techniques that are evergreen, that is, won't be rendered obsolete in a few years time. That means I'm hesitant to learn the javascript framework of the week or untested programming languages and environments. + +As long as our dominant model of computation stays the same, data structures and algorithms that we use today will be used in some form or another in the future. You can safely spend time on gaining a deep and thorough knowledge of them and know that they will pay dividends for your entire career as a programmer. + +###Sign up to the Happy Bear Software List### +Find this article useful? For a regular dose of freshly squeezed technical content delivered straight to your inbox, **click on the big green button below to sign up to the Happy Bear Software mailing list.** + +We'll only be in touch a few times per month and you can unsubscribe at any time. + +-------------------------------------------------------------------------------- + +via: http://www.happybearsoftware.com/how-learning-data-structures-and-algorithms-makes-you-a-better-developer + +作者:[Happy Bear][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.happybearsoftware.com/ +[1]:http://en.wikipedia.org/wiki/Huffman_coding +[2]:http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation + + + From 308d8a627262cc3cc9b7a25701b1813fe02cea01 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 23 Aug 2015 15:30:33 +0800 Subject: [PATCH 1821/2517] [Translated] tech/20150821 How to Install Visual Studio Code in Linux.md --- ... to Install Visual Studio Code in Linux.md | 128 ------------------ ... to Install Visual Studio Code in Linux.md | 127 +++++++++++++++++ 2 files changed, 127 insertions(+), 128 deletions(-) delete mode 100644 sources/tech/20150821 How to Install Visual Studio Code in Linux.md create mode 100644 translated/tech/20150821 How to Install Visual Studio Code in Linux.md diff --git a/sources/tech/20150821 How to Install Visual Studio Code in Linux.md b/sources/tech/20150821 How to Install Visual Studio Code in Linux.md deleted file mode 100644 index 9c00401f76..0000000000 --- a/sources/tech/20150821 How to Install Visual Studio Code in Linux.md +++ /dev/null @@ -1,128 +0,0 @@ -ictlyh Translating -How to Install Visual Studio Code in Linux -================================================================================ -Hi everyone, today we'll learn how to install Visual Studio Code in Linux Distributions. Visual Studio Code is a code-optimized editor based on Electron, a piece of software that is based on Chromium, which is used to deploy io.js applications for the desktop. It is a source code editor and text editor developed by Microsoft for all the operating system platforms including Linux. Visual Studio Code is free but not an open source software ie. its under proprietary software license terms. It is an awesome powerful and fast code editor for our day to day use. Some of the cool features of visual studio code are navigation, intellisense support, syntax highlighting, bracket matching, auto indentation, and snippets, keyboard support with customizable bindings and support for dozens of languages like Python, C++, jade, PHP, XML, Batch, F#, DockerFile, Coffee Script, Java, HandleBars, R, Objective-C, PowerShell, Luna, Visual Basic, .Net, Asp.Net, C#, JSON, Node.js, Javascript, HTML, CSS, Less, Sass and Markdown. Visual Studio Code integrates with package managers and repositories, and builds and other common tasks to make everyday workflows faster. The most popular feature in Visual Studio Code is its debugging feature which includes a streamlined support for Node.js debugging in the preview. - -Note: Please note that, Visual Studio Code is only available for 64-bit versions of Linux Distributions. - -Here, are some easy to follow steps on how to install Visual Sudio Code in all Linux Distribution. - -### 1. Downloading Visual Studio Code Package ### - -First of all, we'll gonna download the Visual Studio Code Package for 64-bit Linux Operating System from the Microsoft server using the given url [http://go.microsoft.com/fwlink/?LinkID=534108][1] . Here, we'll use wget to download it and keep it under /tmp/VSCODE directory as shown below. - - # mkdir /tmp/vscode; cd /tmp/vscode/ - # wget https://az764295.vo.msecnd.net/public/0.3.0/VSCode-linux-x64.zip - - --2015-06-24 06:02:54-- https://az764295.vo.msecnd.net/public/0.3.0/VSCode-linux-x64.zip - Resolving az764295.vo.msecnd.net (az764295.vo.msecnd.net)... 93.184.215.200, 2606:2800:11f:179a:1972:2405:35b:459 - Connecting to az764295.vo.msecnd.net (az764295.vo.msecnd.net)|93.184.215.200|:443... connected. - HTTP request sent, awaiting response... 200 OK - Length: 64992671 (62M) [application/octet-stream] - Saving to: ‘VSCode-linux-x64.zip’ - 100%[================================================>] 64,992,671 14.9MB/s in 4.1s - 2015-06-24 06:02:58 (15.0 MB/s) - ‘VSCode-linux-x64.zip’ saved [64992671/64992671] - -### 2. Extracting the Package ### - -Now, after we have successfully downloaded the zipped package of Visual Studio Code, we'll gonna extract it using the unzip command to /opt/directory. To do so, we'll need to run the following command in a terminal or a console. - - # unzip /tmp/vscode/VSCode-linux-x64.zip -d /opt/ - -Note: If we don't have unzip already installed, we'll need to install it via our Package Manager. If you're running Ubuntu, apt-get whereas if you're running Fedora, CentOS, dnf or yum can be used to install it. - -### 3. Running Visual Studio Code ### - -After we have extracted the package, we can directly launch the Visual Studio Code by executing a file named Code. - - # sudo chmod +x /opt/VSCode-linux-x64/Code - # sudo /opt/VSCode-linux-x64/Code - -If we want to launch Code and want to be available globally via terminal in any place, we'll need to create the link of /opt/vscode/Code as/usr/local/bin/code . - - # ln -s /opt/VSCode-linux-x64/Code /usr/local/bin/code - -Now, we can launch Visual Studio Code by running the following command in a terminal. - - # code . - -### 4. Creating a Desktop Launcher ### - -Next, after we have successfully extracted the Visual Studio Code package, we'll gonna create a desktop launcher so that it will be easily available in the launchers, menus, desktop, according to the desktop environment so that anyone can launch it from them. So, first we'll gonna copy the icon file to /usr/share/icons/ directory. - - # cp /opt/VSCode-linux-x64/resources/app/vso.png /usr/share/icons/ - -Then, we'll gonna create the desktop launcher having the extension as .desktop. Here, we'll create a file named visualstudiocode.desktop under /tmp/VSCODE/ folder using our favorite text editor. - - # vi /tmp/vscode/visualstudiocode.desktop - -Then, we'll gonna paste the following lines into that file. - - [Desktop Entry] - Name=Visual Studio Code - Comment=Multi-platform code editor for Linux - Exec=/opt/VSCode-linux-x64/Code - Icon=/usr/share/icons/vso.png - Type=Application - StartupNotify=true - Categories=TextEditor;Development;Utility; - MimeType=text/plain; - -After we're done creating the desktop file, we'll wanna copy that desktop file to /usr/share/applications/ directory so that it will be available in launchers and menus for use with single click. - - # cp /tmp/vscode/visualstudiocode.desktop /usr/share/applications/ - -Once its done, we can launch it by opening it from the Launcher or Menu. - -![Visual Studio Code](http://blog.linoxide.com/wp-content/uploads/2015/06/visual-studio-code.png) - -### Installing Visual Studio Code in Ubuntu ### - -We can use Ubuntu Make 0.7 in order to install Visual Studio Code in Ubuntu 14.04/14.10/15.04 distribution of linux. This method is the most easiest way to setup Code in ubuntu as we just need to execute few commands for it. First of all, we'll need to install Ubuntu Make 0.7 in our ubuntu distribution of linux. To install it, we'll need to add PPA for it. This can be done by running the command below. - - # add-apt-repository ppa:ubuntu-desktop/ubuntu-make - - This ppa proposes package backport of Ubuntu make for supported releases. - More info: https://launchpad.net/~ubuntu-desktop/+archive/ubuntu/ubuntu-make - Press [ENTER] to continue or ctrl-c to cancel adding it - gpg: keyring `/tmp/tmpv0vf24us/secring.gpg' created - gpg: keyring `/tmp/tmpv0vf24us/pubring.gpg' created - gpg: requesting key A1231595 from hkp server keyserver.ubuntu.com - gpg: /tmp/tmpv0vf24us/trustdb.gpg: trustdb created - gpg: key A1231595: public key "Launchpad PPA for Ubuntu Desktop" imported - gpg: no ultimately trusted keys found - gpg: Total number processed: 1 - gpg: imported: 1 (RSA: 1) - OK - -Then, we'll gonna update the local repository index and install ubuntu-make. - - # apt-get update - # apt-get install ubuntu-make - -After Ubuntu Make is installed in our ubuntu operating system, we'll gonna install Code by running the following command in a terminal. - - # umake web visual-studio-code - -![Umake Web Code](http://blog.linoxide.com/wp-content/uploads/2015/06/umake-web-code.png) - -After running the above command, we'll be asked to enter the path where we want to install it. Then, it will ask for permission to install Visual Studio Code in our ubuntu system. Then, we'll press "a". Once we do that, it will download and install it in our ubuntu machine. Finally, we can launch it by opening it from the Launcher or Menu. - -### Conclusion ### - -We have successfully installed Visual Studio Code in Linux Distribution. Installing Visual Studio Code in every linux distribution is the same as shown in the above steps where we can also use umake to install it in ubuntu distributions. Umake is a popular tool for the development tools, IDEs, Languages. We can easily install Android Studios, Eclipse and many other popular IDEs with umake. Visual Studio Code is based on a project in Github called [Electron][2] which is a part of [Atom.io][3] Editor. It has a bunch of new cool and improved features that Atom.io Editor doesn't have. Visual Studio Code is currently only available in 64-bit platform of linux operating system. So, If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-visual-studio-code-linux/ - -作者:[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/ -[1]:http://go.microsoft.com/fwlink/?LinkID=534108 -[2]:https://github.com/atom/electron -[3]:https://github.com/atom/atom \ No newline at end of file diff --git a/translated/tech/20150821 How to Install Visual Studio Code in Linux.md b/translated/tech/20150821 How to Install Visual Studio Code in Linux.md new file mode 100644 index 0000000000..48f68ade0b --- /dev/null +++ b/translated/tech/20150821 How to Install Visual Studio Code in Linux.md @@ -0,0 +1,127 @@ +如何在 Linux 中安装 Visual Studio Code +================================================================================ +大家好,今天我们一起来学习如何在 Linux 发行版中安装 Visual Studio Code。Visual Studio Code 是基于 Electron 优化代码后的编辑器,后者是基于 Chromium 的一款软件,用于为桌面系统发布 io.js 应用。Visual Studio Code 是微软开发的包括 Linux 在内的全平台代码编辑器和文本编辑器。它是免费软件但不开源,在专有软件许可条款下发布。它是我们日常使用的超级强大和快速的代码编辑器。Visual Studio Code 有很多很酷的功能,例如导航、智能感知支持、语法高亮、括号匹配、自动补全、片段、支持自定义键盘绑定、并且支持多种语言,例如 Python、C++、Jade、PHP、XML、Batch、F#、DockerFile、Coffee Script、Java、HandleBars、 R、 Objective-C、 PowerShell、 Luna、 Visual Basic、 .Net、 Asp.Net、 C#、 JSON、 Node.js、 Javascript、 HTML、 CSS、 Less、 Sass 和 Markdown。Visual Studio Code 集成了包管理器和库,并构建通用任务使得加速每日的工作流。Visual Studio Code 中最受欢迎的是它的调试功能,它包括流式支持 Node.js 的预览调试。 + +注意:请注意 Visual Studio Code 只支持 64 位 Linux 发行版。 + +下面是在所有 Linux 发行版中安装 Visual Studio Code 的几个简单步骤。 + +### 1. 下载 Visual Studio Code 软件包 ### + +首先,我们要从微软服务器中下载 64 位 Linux 操作系统的 Visual Studio Code 安装包,链接是 [http://go.microsoft.com/fwlink/?LinkID=534108][1]。这里我们使用 wget 下载并保存到 tmp/VSCODE 目录。 + + # mkdir /tmp/vscode; cd /tmp/vscode/ + # wget https://az764295.vo.msecnd.net/public/0.3.0/VSCode-linux-x64.zip + + --2015-06-24 06:02:54-- https://az764295.vo.msecnd.net/public/0.3.0/VSCode-linux-x64.zip + Resolving az764295.vo.msecnd.net (az764295.vo.msecnd.net)... 93.184.215.200, 2606:2800:11f:179a:1972:2405:35b:459 + Connecting to az764295.vo.msecnd.net (az764295.vo.msecnd.net)|93.184.215.200|:443... connected. + HTTP request sent, awaiting response... 200 OK + Length: 64992671 (62M) [application/octet-stream] + Saving to: ‘VSCode-linux-x64.zip’ + 100%[================================================>] 64,992,671 14.9MB/s in 4.1s + 2015-06-24 06:02:58 (15.0 MB/s) - ‘VSCode-linux-x64.zip’ saved [64992671/64992671] + +### 2. 提取软件包 ### + +现在,下载好 Visual Studio Code 的 zip 压缩包之后,我们打算使用 unzip 命令解压它。我们要在终端或者控制台中运行以下命令。 + + # unzip /tmp/vscode/VSCode-linux-x64.zip -d /opt/ + +注意:如果我们还没有安装 unzip,我们首先需要通过软件包管理器安装它。如果你运行的是 Ubuntu,使用 apt-get,如果运行的是 Fedora、CentOS、可以用 dnf 或 yum 安装它。 + +### 3. 运行 Visual Studio Code ### + +提取软件包之后,我们可以直接运行一个名为 Code 的文件启动 Visual Studio Code。 + + # sudo chmod +x /opt/VSCode-linux-x64/Code + # sudo /opt/VSCode-linux-x64/Code + +如果我们想启动 Code 并通过终端能在任何地方打开,我们就需要创建 /opt/vscode/Code 的一个链接 /usr/local/bin/code。 + + # ln -s /opt/VSCode-linux-x64/Code /usr/local/bin/code + +现在,我们就可以在终端中运行以下命令启动 Visual Studio Code 了。 + + # code . + +### 4. 创建桌面启动 ### + +下一步,成功抽取 Visual Studio Code 软件包之后,我们打算创建桌面启动程序,使得根据不同桌面环境能够从启动器、菜单、桌面启动它。首先我们要复制一个图标文件到 /usr/share/icons/ 目录。 + + # cp /opt/VSCode-linux-x64/resources/app/vso.png /usr/share/icons/ + +然后,我们创建一个桌面启动程序,文件扩展名为 .desktop。这里我们在 /tmp/VSCODE/ 目录中使用喜欢的文本编辑器创建名为 visualstudiocode.desktop 的文件。 + + # vi /tmp/vscode/visualstudiocode.desktop + +然后,粘贴下面的行到那个文件中。 + + [Desktop Entry] + Name=Visual Studio Code + Comment=Multi-platform code editor for Linux + Exec=/opt/VSCode-linux-x64/Code + Icon=/usr/share/icons/vso.png + Type=Application + StartupNotify=true + Categories=TextEditor;Development;Utility; + MimeType=text/plain; + +创建完桌面文件之后,我们会复制这个桌面文件到 /usr/share/applications/ 目录,这样启动器和菜单中就可以单击启动 Visual Studio Code 了。 + + # cp /tmp/vscode/visualstudiocode.desktop /usr/share/applications/ + +完成之后,我们可以在启动器或者菜单中启动它。 + +![Visual Studio Code](http://blog.linoxide.com/wp-content/uploads/2015/06/visual-studio-code.png) + +### 在 Ubuntu 中 Visual Studio Code ### + +要在 Ubuntu 14.04/14.10/15.04 Linux 发行版中安装 Visual Studio Code,我们可以使用 Ubuntu Make 0.7。这是在 ubuntu 中安装 code 最简单的方法,因为我们只需要执行几个命令。首先,我们要在我们的 ubuntu linux 发行版中安装 Ubuntu Make 0.7。要安装它,首先要为它添加 PPA。可以通过运行下面命令完成。 + + # add-apt-repository ppa:ubuntu-desktop/ubuntu-make + + This ppa proposes package backport of Ubuntu make for supported releases. + More info: https://launchpad.net/~ubuntu-desktop/+archive/ubuntu/ubuntu-make + Press [ENTER] to continue or ctrl-c to cancel adding it + gpg: keyring `/tmp/tmpv0vf24us/secring.gpg' created + gpg: keyring `/tmp/tmpv0vf24us/pubring.gpg' created + gpg: requesting key A1231595 from hkp server keyserver.ubuntu.com + gpg: /tmp/tmpv0vf24us/trustdb.gpg: trustdb created + gpg: key A1231595: public key "Launchpad PPA for Ubuntu Desktop" imported + gpg: no ultimately trusted keys found + gpg: Total number processed: 1 + gpg: imported: 1 (RSA: 1) + OK + +然后,更新本地库索引并安装 ubuntu-make。 + + # apt-get update + # apt-get install ubuntu-make + +在我们的 ubuntu 操作系统上安装完 Ubuntu Make 之后,我们打算在一个终端中运行以下命令安装 Code。 + + # umake web visual-studio-code + +![Umake Web Code](http://blog.linoxide.com/wp-content/uploads/2015/06/umake-web-code.png) + +运行完上面的命令之后,会要求我们输入想要的安装路径。然后,会请求我们允许在 ubuntu 系统中安装 Visual Studio Code。我们敲击 “a”。点击完后,它会在 ubuntu 机器上下载和安装 Code。最后,我们可以在启动器或者菜单中启动它。 + +### 总结 ### + +我们已经成功地在 Linux 发行版上安装了 Visual Studio Code。在所有 linux 发行版上安装 Visual Studio Code 都和上面介绍的相似,我们同样可以使用 umake 在 linux 发行版中安装。Umake 是一个安装开发工具,IDEs 和语言流行的工具。我们可以用 Umake 轻松地安装 Android Studios、Eclipse 和很多其它流行 IDE。Visual Studio Code 是基于 Github 上一个叫 [Electron][2] 的项目,它是 [Atom.io][3] 编辑器的一部分。它有很多 Atom.io 编辑器没有的改进功能。当前 Visual Studio Code 只支持 64 位 linux 操作系统平台。如果你有任何疑问、建议或者反馈,请在下面的评论框中留言以便我们改进和更新我们的内容。非常感谢!Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-visual-studio-code-linux/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://go.microsoft.com/fwlink/?LinkID=534108 +[2]:https://github.com/atom/electron +[3]:https://github.com/atom/atom \ No newline at end of file From eeac34ccc2ad8e98ff8f31caa9679ebf513e326e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 23 Aug 2015 22:09:26 +0800 Subject: [PATCH 1822/2517] =?UTF-8?q?PUB:20150818=20=E2=80=8BUbuntu=20Linu?= =?UTF-8?q?x=20is=20coming=20to=20IBM=20mainframes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ictlyh --- ...Ubuntu Linux is coming to IBM mainframes.md | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) rename {translated/news => published}/20150818 ​Ubuntu Linux is coming to IBM mainframes.md (53%) diff --git a/translated/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md b/published/20150818 ​Ubuntu Linux is coming to IBM mainframes.md similarity index 53% rename from translated/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md rename to published/20150818 ​Ubuntu Linux is coming to IBM mainframes.md index d31f9c34a7..d3bacb3da6 100644 --- a/translated/news/20150818 ​Ubuntu Linux is coming to IBM mainframes.md +++ b/published/20150818 ​Ubuntu Linux is coming to IBM mainframes.md @@ -1,34 +1,41 @@ -IBM 大型机将搭载 Ubuntu Linux +Ubuntu Linux 来到 IBM 大型机 ================================================================================ -西雅图 -- 最终还是发生了。在 [LinuxCon][1] 上,IBM 和 [Canonical][2] 宣布 [Ubuntu Linux][3] 不久就会运行在 IBM 大型机上。 +最终来到了。在 [LinuxCon][1] 上,IBM 和 [Canonical][2] 宣布 [Ubuntu Linux][3] 不久就会运行在 IBM 大型机 [LinuxONE][1] 上,这是一种只支持 Linux 的大型机,现在也可以运行 Ubuntu 了。 + +这个 IBM 发布的最大的 LinuxONE 系统称作‘Emperor’,它可以扩展到 8000 台虚拟机或者上万台容器,这可能是单独一台 Linux 系统的记录。 + +LinuxONE 被 IBM 称作‘游戏改变者’,它‘释放了 Linux 的商业潜力’。 ![](http://zdnet2.cbsistatic.com/hub/i/2015/08/17/f389e12f-03f5-48cc-8019-af4ccf6c6ecd/f15b099e439c0e3a5fd823637d4bcf87/ubuntu-mainframe.jpg) -很快你就可以在你的 IBM 大型机上安装 Ubuntu Linux orange 啦 +*很快你就可以在你的 IBM 大型机上安装 Ubuntu Linux orange 啦* 根据 IBM z 系统的总经理 Ross Mauri 以及 Canonical 和 Ubuntu 的创立者 Mark Shuttleworth 所言,这是因为客户需要。十多年来,IBM 大型机只支持 [红帽企业版 Linux (RHEL)][4] 和 [SUSE Linux 企业版 (SLES)][5] Linux 发行版。 随着 Ubuntu 越来越成熟,更多的企业把它作为企业级 Linux,也有更多的人希望它能运行在 IBM 大型机上。尤其是银行希望如此。不久,金融 CIO 们就可以满足他们的需求啦。 -在一次采访中 Shuttleworth 说 Ubuntu Linux 在 2016 年 4 月下一次长期支持版 Ubuntu 16.04 中就可以用到大型机上。2014 年底 Canonical 和 IBM 将 [Ubuntu 带到 IBM 的 POWER][6] 架构中就迈出了第一步。 +在一次采访中 Shuttleworth 说 Ubuntu Linux 在 2016 年 4 月下一次长期支持版 Ubuntu 16.04 中就可以用到大型机上。而在 2014 年底 Canonical 和 IBM 将 [Ubuntu 带到 IBM 的 POWER][6] 架构中就迈出了第一步。 -在那之前,Canonical 和 IBM 几乎签署协议 [在 2011 年实现 Ubuntu 支持 IBM 大型机][7],但最终也没有实现。这次,真的发生了。 +在那之前,Canonical 和 IBM 差点签署了协议 [在 2011 年实现 Ubuntu 支持 IBM 大型机][7],但最终也没有实现。这次,真的发生了。 -Canonical 的 CEO Jane Silber 解释说 “[扩大 Ubuntu 平台支持][8] 到 [IBM z 系统][9] 是因为认识到需要 z 系统运行其业务的客户数量以及混合云市场的成熟。” +Canonical 的 CEO Jane Silber 解释说 “[把 Ubuntu 平台支持扩大][8]到 [IBM z 系统][9] 是因为认识到需要 z 系统运行其业务的客户数量以及混合云市场的成熟。” **Silber 还说:** -> 由于 z 系统的支持,包括 [LinuxONE][10],Canonical 和 IBM 的关系进一步加深,构建了对 POWER 架构的支持和 OpenPOWER 生态系统。正如 Power 系统的客户受益于 Ubuntu 的可扩展能力,我们的敏捷开发过程也使得类似 POWER8 CAPI(Coherent Accelerator Processor Interface,一致性加速器接口)达到市场支持,z 系统的客户也可以期望技术进步能快速部署,并从 [Juju][11] 和我们的其它云工具中获益,使得能快速向端用户提供新服务。另外,我们和 IBM 的合作包括实现扩展部署很多 IBM 和 Juju 的软件解决方案。大型机客户对于能通过 Juju 将丰富‘迷人的’ IBM 解决方案、其它软件供应商的产品、开源解决方案部署到大型机上感到高兴。 +> 由于 z 系统的支持,包括 [LinuxONE][10],Canonical 和 IBM 的关系进一步加深,构建了对 POWER 架构的支持和 OpenPOWER 生态系统。正如 Power 系统的客户受益于 Ubuntu 的可扩展能力,我们的敏捷开发过程也使得类似 POWER8 CAPI (Coherent Accelerator Processor Interface,一致性加速器接口)得到了市场支持,z 系统的客户也可以期望技术进步能快速部署,并从 [Juju][11] 和我们的其它云工具中获益,使得能快速向端用户提供新服务。另外,我们和 IBM 的合作包括实现扩展部署很多 IBM 和 Juju 的软件解决方案。大型机客户对于能通过 Juju 将丰富‘迷人的’ IBM 解决方案、其它软件供应商的产品、开源解决方案部署到大型机上感到高兴。 Shuttleworth 期望 z 系统上的 Ubuntu 能取得巨大成功。它发展很快,由于对 OpenStack 的支持,希望有卓越云性能的人会感到非常高兴。 + -------------------------------------------------------------------------------- -via: http://www.zdnet.com/article/ubuntu-linux-is-coming-to-the-mainframe/#ftag=RSSbaffb68 +via: http://www.zdnet.com/article/ubuntu-linux-is-coming-to-the-mainframe/ -作者:[Steven J. Vaughan-Nichols][a] -译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +via: http://www.omgubuntu.co.uk/2015/08/ibm-linuxone-mainframe-ubuntu-partnership + +作者:[Steven J. Vaughan-Nichols][a],[Joey-Elijah Sneddon][a] +译者:[ictlyh](https://github.com/ictlyh),[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 8ac7cb03119286775fcf23de3bc511c03fb1078a Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 23 Aug 2015 22:11:48 +0800 Subject: [PATCH 1823/2517] =?UTF-8?q?=E6=9C=AA=E6=A0=A1=E5=AF=B9=EF=BC=8C?= =?UTF-8?q?=E6=91=98=E5=8F=96=E9=83=A8=E5=88=86=E5=86=85=E5=AE=B9=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E5=88=B0=E7=9B=B8=E4=BC=BC=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @geekpi 这篇翻译质量不行啊,请翻译后通读一遍。此外,这篇和另外一篇内容相近,合并发布了。 --- ...150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/news => published}/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md (100%) diff --git a/translated/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md b/published/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md similarity index 100% rename from translated/news/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md rename to published/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md From 60a0d30df8bea3b4d6b16cdf2a5259f105090756 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 23 Aug 2015 22:52:41 +0800 Subject: [PATCH 1824/2517] PUB:20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @xiaoyu33 这篇有一些口语化的动向,如果你再细心些,可以翻译的更好。 --- ...urce RSS News Ticker for Linux Desktops.md | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) rename {translated/share => published}/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md (59%) diff --git a/translated/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md b/published/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md similarity index 59% rename from translated/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md rename to published/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md index d7bb0e425b..fec42d22fa 100644 --- a/translated/share/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md +++ b/published/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md @@ -1,24 +1,24 @@ -Trickr:一个开源的Linux桌面RSS新闻速递 +Tickr:一个开源的 Linux 桌面 RSS 新闻速递应用 ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/05/rss-tickr.jpg) **最新的!最新的!阅读关于它的一切!** -好了,所以我们今天要强调的应用程序不是相当于旧报纸的二进制版本—而是它会以一个伟大的方式,将最新的新闻推送到你的桌面上。 +好了,我们今天要推荐的应用程序可不是旧式报纸的二进制版本——它会以一种漂亮的方式将最新的新闻推送到你的桌面上。 -Tick是一个基于GTK的Linux桌面新闻速递,能够在水平带滚动显示最新头条新闻,以及你最爱的RSS资讯文章标题,当然你可以放置在你桌面的任何地方。 +Tickr 是一个基于 GTK 的 Linux 桌面新闻速递应用,能够以横条方式滚动显示最新头条新闻以及你最爱的RSS资讯文章标题,当然你可以放置在你桌面的任何地方。 -请叫我Joey Calamezzo;我把我的放在底部,有电视新闻台的风格。 +请叫我 Joey Calamezzo;我把它放在底部,就像电视新闻台的滚动字幕一样。 (LCTT 译注: Joan Callamezzo 是 Pawnee Today 的主持人,一位 Pawnee 的本地新闻/脱口秀主持人。而本文作者是 Joey。) -“到你了,子标题” +“到你了,副标题”。 ### RSS -还记得吗? ### -“谢谢段落结尾。” +“谢谢,这段结束了。” -在一个推送通知,社交媒体,以及点击诱饵的时代,哄骗我们阅读最新的令人惊奇的,人人都爱读的清单,RSS看起来有一点过时了。 +在一个充斥着推送通知、社交媒体、标题党,以及哄骗人们点击的清单体的时代,RSS看起来有一点过时了。 -对我来说?恩,RSS是名副其实的真正简单的聚合。这是将消息通知给我的最简单,最易于管理的方式。我可以在我愿意的时候,管理和阅读一些东西;没必要匆忙的去看,以防这条微博消失在信息流中,或者推送通知消失。 +对我来说呢?恩,RSS是名副其实的真正简单的聚合(RSS : Really Simple Syndication)。这是将消息通知给我的最简单、最易于管理的方式。我可以在我愿意的时候,管理和阅读一些东西;没必要匆忙的去看,以防这条微博消失在信息流中,或者推送通知消失。 tickr的美在于它的实用性。你可以不断地有新闻滚动在屏幕的底部,然后不时地瞥一眼。 @@ -32,31 +32,30 @@ tickr的美在于它的实用性。你可以不断地有新闻滚动在屏幕的 尽管虽然tickr可以从Ubuntu软件中心安装,然而它已经很久没有更新了。当你打开笨拙的不直观的控制面板的时候,没有什么能够比这更让人感觉被遗弃的了。 -打开它: +要打开它: 1. 右键单击tickr条 1. 转至编辑>首选项 1. 调整各种设置 -选项和设置行的后面,有些似乎是容易理解的。但是知己知彼你能够几乎掌控一切,包括: +选项和设置行的后面,有些似乎是容易理解的。但是详细了解这些你才能够掌握一切,包括: - 设置滚动速度 - 选择鼠标经过时的行为 - 资讯更新频率 - 字体,包括字体大小和颜色 -- 分隔符(“delineator”) +- 消息分隔符(“delineator”) - tickr在屏幕上的位置 - tickr条的颜色和不透明度 - 选择每种资讯显示多少文章 有个值得一提的“怪癖”是,当你点击“应用”按钮,只会更新tickr的屏幕预览。当您退出“首选项”窗口时,请单击“确定”。 -想要滚动条在你的显示屏上水平显示,也需要公平一点的调整,特别是统一显示。 +想要得到完美的显示效果, 你需要一点点调整,特别是在 Unity 上。 -按下“全宽按钮”,能够让应用程序自动检测你的屏幕宽度。默认情况下,当放置在顶部或底部时,会留下25像素的间距(应用程序被创建在过去的GNOME2.x桌面)。只需添加额外的25像素到输入框,来弥补这个问题。 +按下“全宽按钮”,能够让应用程序自动检测你的屏幕宽度。默认情况下,当放置在顶部或底部时,会留下25像素的间距(应用程序以前是在GNOME2.x桌面上创建的)。只需添加额外的25像素到输入框,来弥补这个问题。 -其他可供选择的选项包括:选择文章在哪个浏览器打开;tickr是否以一个常规的窗口出现; -是否显示一个时钟;以及应用程序多久检查一次文章资讯。 +其他可供选择的选项包括:选择文章在哪个浏览器打开;tickr是否以一个常规的窗口出现;是否显示一个时钟;以及应用程序多久检查一次文章资讯。 #### 添加资讯 #### @@ -76,9 +75,9 @@ tickr自带的有超过30种不同的资讯列表,从技术博客到主流新 ### 在Ubuntu 14.04 LTS或更高版本上安装Tickr ### -在Ubuntu 14.04 LTS或更高版本上安装Tickr +这就是 Tickr,它不会改变世界,但是它能让你知道世界上发生了什么。 -在Ubuntu 14.04 LTS或更高版本中安装,转到Ubuntu软件中心,但要点击下面的按钮。 +在Ubuntu 14.04 LTS或更高版本中安装,点击下面的按钮转到Ubuntu软件中心。 - [点击此处进入Ubuntu软件中心安装tickr][1] @@ -88,7 +87,7 @@ via: http://www.omgubuntu.co.uk/2015/06/tickr-open-source-desktop-rss-news-ticke 作者:[Joey-Elijah Sneddon][a] 译者:[xiaoyu33](https://github.com/xiaoyu33) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 2080842fadc7b00bfa207fc528aa808368c397b8 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 23 Aug 2015 23:13:01 +0800 Subject: [PATCH 1825/2517] PUB:20150813 How to get Public IP from Linux Terminal @KevinSJ --- ...ow to get Public IP from Linux Terminal.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) rename {translated/tech => published}/20150813 How to get Public IP from Linux Terminal.md (50%) diff --git a/translated/tech/20150813 How to get Public IP from Linux Terminal.md b/published/20150813 How to get Public IP from Linux Terminal.md similarity index 50% rename from translated/tech/20150813 How to get Public IP from Linux Terminal.md rename to published/20150813 How to get Public IP from Linux Terminal.md index 98c0ec7b31..c454db655c 100644 --- a/translated/tech/20150813 How to get Public IP from Linux Terminal.md +++ b/published/20150813 How to get Public IP from Linux Terminal.md @@ -1,9 +1,10 @@ -如何在 Linux 终端中获取公有 IP +如何在 Linux 终端中知道你的公有 IP ================================================================================ ![](http://www.blackmoreops.com/wp-content/uploads/2015/06/256x256xHow-to-get-Public-IP-from-Linux-Terminal-blackMORE-Ops.png.pagespeed.ic.GKEAEd4UNr.png) -公有地址由InterNIC分配并由基于类的网络 ID 或基于 CIDR 地址块构成(被称为 CIDR 块)并保证了在全球英特网中的唯一性。当公有地址被分配时,路径将会被记录到互联网中的路由器中,这样访问公有地址的流量就能顺利到达。访问目标公有地址的流量可通过互联网获取。比如,当一个一个 CIDR 块被以网络 ID 和子网掩码的形式分配给一个组织时,对应的 [网络 ID,子网掩码] 也会同时作为路径储存在英特网中的路由器中。访问 CIDR 块中的地址的 IP 封包会被导向对应的位置。在本文中我将会介绍在几种在 Linux 终端中查看你的公有 IP 地址的方法。这对普通用户来说并无意义,但 Linux 服务器(无GUI或者作为只能使用基本工具的用户登录时)会很有用。无论如何,从 Linux 终端中获取公有 IP 在各种方面都很意义,说不定某一天就能用得着。 +公有地址由 InterNIC 分配并由基于类的网络 ID 或基于 CIDR 的地址块构成(被称为 CIDR 块),并保证了在全球互联网中的唯一性。当公有地址被分配时,其路由将会被记录到互联网中的路由器中,这样访问公有地址的流量就能顺利到达。访问目标公有地址的流量可经由互联网抵达。比如,当一个 CIDR 块被以网络 ID 和子网掩码的形式分配给一个组织时,对应的 [网络 ID,子网掩码] 也会同时作为路由储存在互联网中的路由器中。目标是 CIDR 块中的地址的 IP 封包会被导向对应的位置。 +在本文中我将会介绍在几种在 Linux 终端中查看你的公有 IP 地址的方法。这对普通用户来说并无意义,但 Linux 服务器(无GUI或者作为只能使用基本工具的用户登录时)会很有用。无论如何,从 Linux 终端中获取公有 IP 在各种方面都很意义,说不定某一天就能用得着。 以下是我们主要使用的两个命令,curl 和 wget。你可以换着用。 @@ -21,17 +22,17 @@ curl ipinfo.io/json curl ifconfig.me/all.json - curl www.trackip.net/ip?json (bit ugly) + curl www.trackip.net/ip?json (有点丑陋) ### curl XML格式输出: ### curl ifconfig.me/all.xml -### curl 所有IP细节 ### +### curl 得到所有IP细节 (挖掘机)### curl ifconfig.me/all -### 使用 DYDNS (当你使用 DYDNS 服务时有用)Using DYNDNS (Useful when you’re using DYNDNS service) ### +### 使用 DYDNS (当你使用 DYDNS 服务时有用)### curl -s 'http://checkip.dyndns.org' | sed 's/.*Current IP Address: \([0-9\.]*\).*/\1/g' curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+" @@ -43,7 +44,7 @@ ### 使用 host 和 dig 命令 ### -在可用时,你可以直接使用 host 和 dig 命令。 +如果有的话,你也可以直接使用 host 和 dig 命令。 host -t a dartsclink.com | sed 's/.*has address //' dig +short myip.opendns.com @resolver1.opendns.com @@ -55,15 +56,15 @@ PUBLIC_IP=`wget http://ipecho.net/plain -O - -q ; echo` echo $PUBLIC_IP -已经由不少选项了。 +简单易用。 -我实际上写了一个用于记录每日我的路由器中所有 IP 变化并保存到一个文件的脚本。我在搜索过程中找到了这些很好用的命令。希望某天它能帮到其他人。 +我实际上是在写一个用于记录每日我的路由器中所有 IP 变化并保存到一个文件的脚本。我在搜索过程中找到了这些很好用的命令。希望某天它能帮到其他人。 -------------------------------------------------------------------------------- via: http://www.blackmoreops.com/2015/06/14/how-to-get-public-ip-from-linux-terminal/ 译者:[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 5f42179fb3c8b136b74f29bb174e376fae1d5d1f Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Sun, 23 Aug 2015 10:20:33 -0500 Subject: [PATCH 1826/2517] KevinSJ Translating --- .../20150821 Top 4 open source command-line email clients.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150821 Top 4 open source command-line email clients.md b/sources/share/20150821 Top 4 open source command-line email clients.md index df96173c18..afdcd8cf4a 100644 --- a/sources/share/20150821 Top 4 open source command-line email clients.md +++ b/sources/share/20150821 Top 4 open source command-line email clients.md @@ -1,3 +1,4 @@ +KevinSJ Translating Top 4 open source command-line email clients ================================================================================ ![](http://opensource.com/sites/default/files/styles/image-full-size/public/images/life/life_mail.png) @@ -76,4 +77,4 @@ via: http://opensource.com/life/15/8/top-4-open-source-command-line-email-client [9]:https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html [10]:http://notmuchmail.org/ [11]:http://notmuchmail.org/releases/ -[12]:http://www.gnu.org/licenses/gpl.html \ No newline at end of file +[12]:http://www.gnu.org/licenses/gpl.html From e076870e0de5683c653bcbc0d79ea359e97275e4 Mon Sep 17 00:00:00 2001 From: joeren Date: Mon, 24 Aug 2015 09:34:38 +0800 Subject: [PATCH 1827/2517] Update 20150818 How to monitor stock quotes from the command line on Linux.md --- ...w to monitor stock quotes from the command line on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md b/sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md index 662ac1eb84..48c4979f3e 100644 --- a/sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md +++ b/sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to monitor stock quotes from the command line on Linux ================================================================================ If you are one of those stock investors or traders, monitoring the stock market will be one of your daily routines. Most likely you will be using an online trading platform which comes with some fancy real-time charts and all sort of advanced stock analysis and tracking tools. While such sophisticated market research tools are a must for any serious stock investors to read the market, monitoring the latest stock quotes still goes a long way to build a profitable portfolio. @@ -96,4 +97,4 @@ via: http://xmodulo.com/monitor-stock-quotes-command-line-linux.html [1]:https://github.com/michaeldv/mop [2]:http://ask.xmodulo.com/install-go-language-linux.html [3]:http://money.cnn.com/data/markets/ -[4]:http://finance.yahoo.com/ \ No newline at end of file +[4]:http://finance.yahoo.com/ From 7680623bb62923e10160f70655fba96023da0ab8 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 24 Aug 2015 10:08:48 +0800 Subject: [PATCH 1828/2517] Update 20150728 Process of the Linux kernel building.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 全部翻译完 --- ...28 Process of the Linux kernel building.md | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index 00504e60fd..6f9368384c 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -698,6 +698,8 @@ The `$(obj)/compressed/vmlinux` target depends on the `vmlinux-objs-y` that comp Where the `vmlinux.bin` is the `vmlinux` with striped debuging information and comments and the `vmlinux.bin.bz2` compressed `vmlinux.bin.all` + `u32` size of `vmlinux.bin.all`. The `vmlinux.bin.all` is `vmlinux.bin + vmlinux.relocs`, where `vmlinux.relocs` is the `vmlinux` that was handled by the `relocs` program (see above). As we got these files, the `piggy.S` assembly files will be generated with the `mkpiggy` program and compiled: +`vmlinux.bin` 是去掉了调试信息和注释的`vmlinux` 二进制文件,加上了占用了`u32` (注:即4-Byte)的长度信息的`vmlinux.bin.all` 压缩后就是`vmlinux.bin.bz2`。其中`vmlinux.bin.all` 包含了`vmlinux.bin` 和`vmlinux.relocs`(注:vmlinux 的重定位信息),其中`vmlinux.relocs` 是`vmlinux` 经过程序`relocs` 处理之后的`vmlinux` 镜像(见上文所述)。我们现在已经获取到了这些文件,汇编文件`piggy.S` 将会被`mkpiggy` 生成、然后编译: + ```Makefile MKPIGGY arch/x86/boot/compressed/piggy.S AS arch/x86/boot/compressed/piggy.o @@ -705,12 +707,16 @@ Where the `vmlinux.bin` is the `vmlinux` with striped debuging information and c This assembly files will contain computed offset from a compressed kernel. After this we can see that `zoffset` generated: +这个汇编文件会包含经过计算得来的、压缩内核的偏移信息。处理完这个汇编文件,我们就可以看到`zoffset` 生成了: + ```Makefile ZOFFSET arch/x86/boot/zoffset.h ``` As the `zoffset.h` and the `voffset.h` are generated, compilation of the source code files from the [arch/x86/boot](https://github.com/torvalds/linux/tree/master/arch/x86/boot/) can be continued: +现在`zoffset.h` 和`voffset.h` 已经生成了,[arch/x86/boot](https://github.com/torvalds/linux/tree/master/arch/x86/boot/) 里的源文件可以继续编译: + ```Makefile AS arch/x86/boot/header.o CC arch/x86/boot/main.o @@ -731,36 +737,48 @@ As the `zoffset.h` and the `voffset.h` are generated, compilation of the source As all source code files will be compiled, they will be linked to the `setup.elf`: +所有的源代码会被编译,他们最终会被链接到`setup.elf` : + ```Makefile LD arch/x86/boot/setup.elf ``` or: +或者: + ``` ld -m elf_x86_64 -T arch/x86/boot/setup.ld arch/x86/boot/a20.o arch/x86/boot/bioscall.o arch/x86/boot/cmdline.o arch/x86/boot/copy.o arch/x86/boot/cpu.o arch/x86/boot/cpuflags.o arch/x86/boot/cpucheck.o arch/x86/boot/early_serial_console.o arch/x86/boot/edd.o arch/x86/boot/header.o arch/x86/boot/main.o arch/x86/boot/mca.o arch/x86/boot/memory.o arch/x86/boot/pm.o arch/x86/boot/pmjump.o arch/x86/boot/printf.o arch/x86/boot/regs.o arch/x86/boot/string.o arch/x86/boot/tty.o arch/x86/boot/video.o arch/x86/boot/video-mode.o arch/x86/boot/version.o arch/x86/boot/video-vga.o arch/x86/boot/video-vesa.o arch/x86/boot/video-bios.o -o arch/x86/boot/setup.elf ``` The last two things is the creation of the `setup.bin` that will contain compiled code from the `arch/x86/boot/*` directory: +最后两件事是创建包含目录`arch/x86/boot/*` 下的编译过的代码的`setup.bin`: + ``` objcopy -O binary arch/x86/boot/setup.elf arch/x86/boot/setup.bin ``` and the creation of the `vmlinux.bin` from the `vmlinux`: +以及从`vmlinux` 生成`vmlinux.bin` : + ``` objcopy -O binary -R .note -R .comment -S arch/x86/boot/compressed/vmlinux arch/x86/boot/vmlinux.bin ``` In the end we compile host program: [arch/x86/boot/tools/build.c](https://github.com/torvalds/linux/blob/master/arch/x86/boot/tools/build.c) that will create our `bzImage` from the `setup.bin` and the `vmlinux.bin`: +最后,我们编译主机程序[arch/x86/boot/tools/build.c](https://github.com/torvalds/linux/blob/master/arch/x86/boot/tools/build.c),它将会用来把`setup.bin` 和`vmlinux.bin` 打包成`bzImage`: + ``` arch/x86/boot/tools/build arch/x86/boot/setup.bin arch/x86/boot/vmlinux.bin arch/x86/boot/zoffset.h arch/x86/boot/bzImage ``` Actually the `bzImage` is the concatenated `setup.bin` and the `vmlinux.bin`. In the end we will see the output which familiar to all who once build the Linux kernel from source: +实际上`bzImage` 就是把`setup.bin` 和`vmlinux.bin` 连接到一起。最终我们会看到输出结果,就和那些用源码编译过内核的同行的结果一样: + ``` Setup is 16268 bytes (padded to 16384 bytes). System is 4704 kB @@ -770,12 +788,19 @@ Kernel: arch/x86/boot/bzImage is ready (#5) That's all. +全部结束。 + Conclusion +结论 ================================================================================ It is the end of this part and here we saw all steps from the execution of the `make` command to the generation of the `bzImage`. I know, the Linux kernel makefiles and process of the Linux kernel building may seem confusing at first glance, but it is not so hard. Hope this part will help you to understand process of the Linux kernel building. +这就是本文的最后一节。本文我们了解了编译内核的全部步骤:从执行`make` 命令开始,到最后生成`bzImage`。我知道,linux 内核的makefiles 和构建linux 的过程第一眼看起来可能比较迷惑,但是这并不是很难。希望本文可以帮助你理解构建linux 内核的整个流程。 + + Links +链接 ================================================================================ * [GNU make util](https://en.wikipedia.org/wiki/Make_%28software%29) @@ -797,7 +822,7 @@ Links via: https://github.com/0xAX/linux-insides/blob/master/Misc/how_kernel_compiled.md -译者:[译者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 31094aa2e37bf5449c639b400433517c39b47508 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Mon, 24 Aug 2015 10:41:43 +0800 Subject: [PATCH 1829/2517] [Translated]20150818 How to monitor stock quotes from the command line on Linux.md --- ...k quotes from the command line on Linux.md | 100 ------------------ ...k quotes from the command line on Linux.md | 99 +++++++++++++++++ 2 files changed, 99 insertions(+), 100 deletions(-) delete mode 100644 sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md create mode 100644 translated/tech/20150818 How to monitor stock quotes from the command line on Linux.md diff --git a/sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md b/sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md deleted file mode 100644 index 48c4979f3e..0000000000 --- a/sources/tech/20150818 How to monitor stock quotes from the command line on Linux.md +++ /dev/null @@ -1,100 +0,0 @@ -Translating by GOLinux! -How to monitor stock quotes from the command line on Linux -================================================================================ -If you are one of those stock investors or traders, monitoring the stock market will be one of your daily routines. Most likely you will be using an online trading platform which comes with some fancy real-time charts and all sort of advanced stock analysis and tracking tools. While such sophisticated market research tools are a must for any serious stock investors to read the market, monitoring the latest stock quotes still goes a long way to build a profitable portfolio. - -If you are a full-time system admin constantly sitting in front of terminals while trading stocks as a hobby during the day, a simple command-line tool that shows real-time stock quotes will be a blessing for you. - -In this tutorial, let me introduce a neat command-line tool that allows you to monitor stock quotes from the command line on Linux. - -This tool is called [Mop][1]. Written in Go, this lightweight command-line tool is extremely handy for tracking the latest stock quotes from the U.S. markets. You can easily customize the list of stocks to monitor, and it shows the latest stock quotes in ncurses-based, easy-to-read interface. - -**Note**: Mop obtains the latest stock quotes via Yahoo! Finance API. Be aware that their stock quotes are known to be delayed by 15 minutes. So if you are looking for "real-time" stock quotes with zero delay, Mop is not a tool for you. Such "live" stock quote feeds are usually available for a fee via some proprietary closed-door interface. With that being said, let's see how you can use Mop under Linux environment. - -### Install Mop on Linux ### - -Since Mop is implemented in Go, you will need to install Go language first. If you don't have Go installed, follow [this guide][2] to install Go on your Linux platform. Make sure to set GOPATH environment variable as described in the guide. - -Once Go is installed, proceed to install Mop as follows. - -**Debian, Ubuntu or Linux Mint** - - $ sudo apt-get install git - $ go get github.com/michaeldv/mop - $ cd $GOPATH/src/github.com/michaeldv/mop - $ make install - -Fedora, CentOS, RHEL - - $ sudo yum install git - $ go get github.com/michaeldv/mop - $ cd $GOPATH/src/github.com/michaeldv/mop - $ make install - -The above commands will install Mop under $GOPATH/bin. - -Now edit your .bashrc to include $GOPATH/bin in your PATH variable. - - export PATH="$PATH:$GOPATH/bin" - ----------- - - $ source ~/.bashrc - -### Monitor Stock Quotes from the Command Line with Mop ### - -To launch Mod, simply run the command called cmd. - - $ cmd - -At the first launch, you will see a few stock tickers which Mop comes pre-configured with. - -![](https://farm6.staticflickr.com/5749/20018949104_c8c64e0e06_c.jpg) - -The quotes show information like the latest price, %change, daily low/high, 52-week low/high, dividend, and annual yield. Mop obtains market overview information from [CNN][3], and individual stock quotes from [Yahoo Finance][4]. The stock quote information updates itself within the terminal periodically. - -### Customize Stock Quotes in Mop ### - -Let's try customizing the stock list. Mop provides easy-to-remember shortcuts for this: '+' to add a new stock, and '-' to remove a stock. - -To add a new stock, press '+', and type a stock ticker symbol to add (e.g., MSFT). You can add more than one stock at once by typing a comma-separated list of tickers (e.g., "MSFT, AMZN, TSLA"). - -![](https://farm1.staticflickr.com/636/20648164441_642ae33a22_c.jpg) - -Removing stocks from the list can be done similarly by pressing '-'. - -### Sort Stock Quotes in Mop ### - -You can sort the stock quote list based on any column. To sort, press 'o', and use left/right key to choose the column to sort by. When a particular column is chosen, you can sort the list either in increasing order or in decreasing order by pressing ENTER. - -![](https://farm1.staticflickr.com/724/20648164481_15631eefcf_c.jpg) - -By pressing 'g', you can group your stocks based on whether they are advancing or declining for the day. Advancing issues are represented in green color, while declining issues are colored in white. - -![](https://c2.staticflickr.com/6/5633/20615252696_a5bd44d3aa_b.jpg) - -If you want to access help page, simply press '?'. - -![](https://farm1.staticflickr.com/573/20632365342_da196b657f_c.jpg) - -### Conclusion ### - -As you can see, Mop is a lightweight, yet extremely handy stock monitoring tool. Of course you can easily access stock quotes information elsewhere, from online websites, your smartphone, etc. However, if you spend a great deal of your time in a terminal environment, Mop can easily fit in to your workspace, hopefully without distracting must of your workflow. Just let it run and continuously update market date in one of your terminals, and be done with it. - -Happy trading! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/monitor-stock-quotes-command-line-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]:https://github.com/michaeldv/mop -[2]:http://ask.xmodulo.com/install-go-language-linux.html -[3]:http://money.cnn.com/data/markets/ -[4]:http://finance.yahoo.com/ diff --git a/translated/tech/20150818 How to monitor stock quotes from the command line on Linux.md b/translated/tech/20150818 How to monitor stock quotes from the command line on Linux.md new file mode 100644 index 0000000000..c2a9e5d576 --- /dev/null +++ b/translated/tech/20150818 How to monitor stock quotes from the command line on Linux.md @@ -0,0 +1,99 @@ +Linux中通过命令行监控股票报价 +================================================================================ +如果你是那些股票投资者或者交易者中的一员,那么监控证券市场将成为你日常工作中的其中一项任务。最有可能是你会使用一个在线交易平台,这个平台有着一些漂亮的实时图表和全部种类的高级股票分析和交易工具。虽然这种复杂的市场研究工具是任何严肃的证券投资者阅读市场的必备,但是监控最新的股票报价来构建有利可图的投资组合仍然有很长一段路要走。 + +如果你是一位长久坐在终端前的全职系统管理员,而证券交易又成了你日常生活中的业余兴趣,那么一个简单地显示实时股票报价的命令行工具会是你的恩赐。 + +在本教程中,让我来介绍一个灵巧而简洁的命令行工具,它可以让你在Linux上从命令行监控股票报价。 + +这个工具叫做[Mop][1]。它是用GO编写的一个轻量级命令行工具,可以极其方便地跟踪来自美国市场的最新股票报价。你可以很轻松地自定义要监控的证券列表,它会在一个基于ncurses的便于阅读的界面显示最新的股票报价。 + +**注意**:Mop是通过雅虎金融API获取最新的股票报价的。你必须意识到,他们的的股票报价已知会有15分钟的延时。所以,如果你正在寻找0延时的“实时”股票报价,那么Mop就不是你的菜了。这种“现场”股票报价订阅通常可以通过向一些不开放的私有接口付费获取。对于上面讲得,让我们来看看怎样在Linux环境下使用Mop吧。 + +### 安装 Mop 到 Linux ### + +由于Mop部署在Go中,你首先需要安装Go语言。如果你还没有安装Go,请参照[此指南][2]将Go安装到你的Linux平台中。请确保按指南中所讲的设置GOPATH环境变量。 + +安装完Go后,继续像下面这样安装Mop。 + +**Debian,Ubuntu 或 Linux Mint** + + $ sudo apt-get install git + $ go get github.com/michaeldv/mop + $ cd $GOPATH/src/github.com/michaeldv/mop + $ make install + +**Fedora,CentOS,RHEL** + + $ sudo yum install git + $ go get github.com/michaeldv/mop + $ cd $GOPATH/src/github.com/michaeldv/mop + $ make install + +上述命令将安装Mop到$GOPATH/bin。 + +现在,编辑你的.bashrc,将$GOPATH/bin写到你的PATH变量中。 + + export PATH="$PATH:$GOPATH/bin" + +---------- + + $ source ~/.bashrc + +### 使用Mop来通过命令行监控股票报价 ### + +要启动Mop,只需运行名为cmd的命令。 + + $ cmd + +首次启动,你将看到一些Mop预配置的证券行情自动收录器。 + +![](https://farm6.staticflickr.com/5749/20018949104_c8c64e0e06_c.jpg) + +报价显示了像最新价格、交易百分比、每日低/高、52周低/高、股利以及年产量等信息。Mop从[CNN][3]获取市场总览信息,从[雅虎金融][4]获得个股报价,股票报价信息它自己会在终端内周期性更新。 + +### 自定义Mop中的股票报价 ### + +让我们来试试自定义证券列表吧。对此,Mop提供了易于记忆的快捷键:‘+’用于添加一只新股,而‘-’则用于移除一只股票。 + +要添加新股,请按‘+’,然后输入股票代码来添加(如MSFT)。你可以通过输入一个由逗号分隔的交易代码列表来一次添加多个股票(如”MSFT, AMZN, TSLA”)。 + +![](https://farm1.staticflickr.com/636/20648164441_642ae33a22_c.jpg) + +从列表中移除股票可以类似地按‘-’来完成。 + +### 对Mop中的股票报价排序 ### + +你可以基于任何栏目对股票报价列表进行排序。要排序,请按‘o’,然后使用左/右键来选择排序的基准栏目。当选定了一个特定栏目后,你可以按回车来对列表进行升序排序,或者降序排序。 + +![](https://farm1.staticflickr.com/724/20648164481_15631eefcf_c.jpg) + +通过按‘g’,你可以根据股票当日的涨或跌来分组。涨的情况以绿色表示,跌的情况以白色表示。 + +![](https://c2.staticflickr.com/6/5633/20615252696_a5bd44d3aa_b.jpg) + +如果你想要访问帮助页,只需要按‘?’。 + +![](https://farm1.staticflickr.com/573/20632365342_da196b657f_c.jpg) + +### 尾声 ### + +正如你所见,Mop是一个轻量级的,然而极其方便的证券监控工具。当然,你可以很轻松地从其它别的什么地方,从在线站点,你的智能手机等等访问到股票报价信息。然而,如果你在终端环境中花费大量时间,Mop可以很容易地适应你的工作空间,希望没有让你过多地从你的公罗流程中分心。只要让它在你其中一个终端中运行并保持市场日期持续更新,就让它在那干着吧。 + +交易快乐! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/monitor-stock-quotes-command-line-linux.html + +作者:[Dan Nanni][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://github.com/michaeldv/mop +[2]:http://ask.xmodulo.com/install-go-language-linux.html +[3]:http://money.cnn.com/data/markets/ +[4]:http://finance.yahoo.com/ From ec95766dae136d277438da8d53d59186df375fa4 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Mon, 24 Aug 2015 12:36:06 +0800 Subject: [PATCH 1830/2517] [translated by bazz2]Docker Working on Security Components Live Container Migration --- ...ity Components Live Container Migration.md | 54 ------------------- ...ity Components Live Container Migration.md | 53 ++++++++++++++++++ 2 files changed, 53 insertions(+), 54 deletions(-) delete mode 100644 sources/talk/20150818 Docker Working on Security Components Live Container Migration.md create mode 100644 translated/talk/20150818 Docker Working on Security Components Live Container Migration.md diff --git a/sources/talk/20150818 Docker Working on Security Components Live Container Migration.md b/sources/talk/20150818 Docker Working on Security Components Live Container Migration.md deleted file mode 100644 index 356c6f943c..0000000000 --- a/sources/talk/20150818 Docker Working on Security Components Live Container Migration.md +++ /dev/null @@ -1,54 +0,0 @@ -[bazz2 translating] -Docker Working on Security Components, Live Container Migration -================================================================================ -![Docker Container Talk](http://www.eweek.com/imagesvr_ce/1905/290x195DockerMarianna.jpg) - -**Docker developers take the stage at Containercon and discuss their work on future container innovations for security and live migration.** - -SEATTLE—Containers are one of the hottest topics in IT today and at the Linuxcon USA event here there is a co-located event called Containercon, dedicated to this virtualization technology. - -Docker, the lead commercial sponsor of the open-source Docker effort brought three of its top people to the keynote stage today, but not Docker founder Solomon Hykes. - -Hykes who delivered a Linuxcon keynote in 2014 was in the audience though, as Senior Vice President of Engineering Marianna Tessel, Docker security chief Diogo Monica and Docker chief maintainer Michael Crosby presented what's new and what's coming in Docker. - -Tessel emphasized that Docker is very real today and used in production environments at some of the largest organizations on the planet, including the U.S. Government. Docker also is working in small environments too, including the Raspberry Pi small form factor ARM computer, which now can support up to 2,300 containers on a single device. - -"We're getting more powerful and at the same time Docker will also get simpler to use," Tessel said. - -As a metaphor, Tessel said that the whole Docker experience is much like a cruise ship, where there is powerful and complex machinery that powers the ship, yet the experience for passengers is all smooth sailing. - -One area that Docker is trying to make easier is security. Tessel said that security is mind-numbingly complex for most people as organizations constantly try to avoid network breaches. - -That's where Docker Content Trust comes into play, which is a configurable feature in the recent Docker 1.8 release. Diogo Mónica, security lead for Docker joined Tessel on stage and said that security is a hard topic, which is why Docker content trust is being developed. - -With Docker Content Trust there is a verifiable way to make sure that a given Docker application image is authentic. There also are controls to limit fraud and potential malicious code injection by verifying application freshness. - -To prove his point, Monica did a live demonstration of what could happen if Content Trust is not enabled. In one instance, a Website update is manipulated to allow the demo Web app to be defaced. When Content Trust is enabled, the hack didn't work and was blocked. - -"Don't let the simple demo fool you," Tessel said. "You have seen the best security possible." - -One area where containers haven't been put to use before is for live migration, which on VMware virtual machines is a technology called vMotion. It's an area that Docker is currently working on. - -Docker chief maintainer Michael Crosby did an onstage demonstration of a live migration of Docker containers. Crosby referred to the approach as checkpoint and restore, where a running container gets a checkpoint snapshot and is then restored to another location. - -A container also can be cloned and then run in another location. Crosby humorously referred to his cloned container as "Dolly," a reference to the world's first cloned animal, Dolly the sheep. - -Tessel also took time to talk about the RunC component of containers, which is now a technology component that is being developed by the Open Containers Initiative as a multi-stakeholder process. With RunC, containers expand beyond Linux to multiple operating systems including Windows and Solaris. - -Overall, Tessel said that she can't predict the future of Docker, though she is very optimistic. - -"I'm not sure what the future is, but I'm sure it'll be out of this world," Tessel said. - -Sean Michael Kerner is a senior editor at eWEEK and InternetNews.com. Follow him on Twitter @TechJournalist. - --------------------------------------------------------------------------------- - -via: http://www.eweek.com/virtualization/docker-working-on-security-components-live-container-migration.html - -作者:[Sean Michael Kerner][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.eweek.com/cp/bio/Sean-Michael-Kerner/ diff --git a/translated/talk/20150818 Docker Working on Security Components Live Container Migration.md b/translated/talk/20150818 Docker Working on Security Components Live Container Migration.md new file mode 100644 index 0000000000..bd3f0451c7 --- /dev/null +++ b/translated/talk/20150818 Docker Working on Security Components Live Container Migration.md @@ -0,0 +1,53 @@ +Docker Working on Security Components, Live Container Migration +================================================================================ +![Docker Container Talk](http://www.eweek.com/imagesvr_ce/1905/290x195DockerMarianna.jpg) + +**Docker 开发者在 Containercon 上的演讲,谈论将来的容器在安全和实时迁移方面的创新** + +来自西雅图的消息。当前 IT 界最热的词汇是“容器”,美国有两大研讨会:Linuxcon USA 和 Containercon,后者就是为容器而生的。 + +Docker 公司是开源 Docker 项目的商业赞助商,本次研讨会这家公司有 3 位高管带来主题演讲,但公司创始人 Solomon Hykes 没上场演讲。 + +Hykes 曾在 2014 年的 Linuxcon 上进行过一次主题演讲,但今年的 Containeron 他只坐在观众席上。而工程部高级副总裁 Marianna Tessel、Docker 首席安全员 Diogo Monica 和核心维护员 Michael Crosby 为我们演讲 Docker 新增的功能和将来会有的功能。 + +Tessel 强调 Docker 现在已经被很多世界上最大的组织用在生产环境中,包括美国政府。Docker 也被用在小环境中,比如树莓派,一块树莓派上可以跑 2300 个容器。 + +“Docker 的功能正在变得越来越强大,而部署方法变得越来越简单。”Tessel 在会上说道。 + +Tessel 把 Docker 形容成一艘游轮,内部由强大而复杂的机器驱动,外部为乘客提供平稳航行的体验。 + +Docker 试图解决的领域是简化安全配置。Tessel 认为对于大多数用户和组织来说,避免网络漏洞所涉及的安全问题是一个乏味而且复杂的过程。 + +于是 Docker Content Trust 就出现在 Docker 1.8 release 版本中了。安全项目领导 Diogo Mónica 中加入 Tessel 上台讨论,说安全是一个难题,而 Docker Content Trust 就是为解决这个难道而存在的。 + +Docker Content Trusst 提供一种方法来验证一个 Docker 应用是否可信,以及多种方法来限制欺骗和病毒注入。 + +为了证明他的观点,Monica 做了个现场示范,演示 Content Trust 的效果。在一个实验中,一个网站在更新过程中其 Web App 被人为攻破,而当 Content Trust 启动后,这个黑客行为再也无法得逞。 + +“不要被这个表面上简单的演示欺骗了,”Tessel 说道,“你们看的是最安全的可行方案。” + +Docker 以前没有实现的领域是实时迁移,这个技术在 VMware 虚拟机中叫做 vMotion,而现在,Docker 也实现了这个功能。 + +Docker 首席维护员 Micheal Crosby 在台上做了个实时迁移的演示,Crosby 把这个过程称为快照和恢复:首先从运行中的容器拿到一个快照,之后将这个快照移到另一个地方恢复。 + +一个容器也可以克隆到另一个地方,Crosby 将他的克隆容器称为“多利”,就是世界上第一只被克隆出来的羊的名字。 + +Tessel 也花了点时间聊了下 RunC 组件,这是个正在被 Open Container Initiative 作为多方开发的项目,目的是让窗口兼容 Linux、Windows 和 Solaris。 + +Tessel 总结说她不知道 Docker 的未来是什么样,但对此抱非常乐观的态度。 + +“我不确定未来是什么样的,但我很确定 Docker 会在这个世界中脱颖而出”,Tessel 说的。 + +Sean Michael Kerner 是 eWEEK 和 InternetNews.com 网站的高级编辑,可通过推特 @TechJournalist 关注他。 + +-------------------------------------------------------------------------------- + +via: http://www.eweek.com/virtualization/docker-working-on-security-components-live-container-migration.html + +作者:[Sean Michael Kerner][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.eweek.com/cp/bio/Sean-Michael-Kerner/ From ac233258c71eb2db6d53f037eed36ef9ef67789c Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 24 Aug 2015 14:18:37 +0800 Subject: [PATCH 1831/2517] =?UTF-8?q?20150824-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Open Source Collaborative Editing Tools.md | 228 ++++++++++++++++++ ...out to gain a new file system--bcachefs.md | 25 ++ ... NetworkManager Command Line Tool Nmcli.md | 153 ++++++++++++ ...u 15.04 to connect to Android or iPhone.md | 74 ++++++ 4 files changed, 480 insertions(+) create mode 100644 sources/share/20150824 Great Open Source Collaborative Editing Tools.md create mode 100644 sources/talk/20150824 Linux about to gain a new file system--bcachefs.md create mode 100644 sources/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md create mode 100644 sources/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md diff --git a/sources/share/20150824 Great Open Source Collaborative Editing Tools.md b/sources/share/20150824 Great Open Source Collaborative Editing Tools.md new file mode 100644 index 0000000000..8f3ab16110 --- /dev/null +++ b/sources/share/20150824 Great Open Source Collaborative Editing Tools.md @@ -0,0 +1,228 @@ +Great Open Source Collaborative Editing Tools +================================================================================ +In a nutshell, collaborative writing is writing done by more than one person. There are benefits and risks of collaborative working. Some of the benefits include a more integrated / co-ordinated approach, better use of existing resources, and a stronger, united voice. For me, the greatest advantage is one of the most transparent. That's when I need to take colleagues' views. Sending files back and forth between colleagues is inefficient, causes unnecessary delays and leaves people (i.e. me) unhappy with the whole notion of collaboration. With good collaborative software, I can share notes, data and files, and use comments to share thoughts in real-time or asynchronously. Working together on documents, images, video, presentations, and tasks is made less of a chore. + +There are many ways to collaborate online, and it has never been easier. This article highlights my favourite open source tools to collaborate on documents in real time. + +Google Docs is an excellent productivity application with most of the features I need. It serves as a collaborative tool for editing documents in real time. Documents can be shared, opened, and edited by multiple users simultaneously and users can see character-by-character changes as other collaborators make edits. While Google Docs is free for individuals, it is not open source. + +Here is my take on the finest open source collaborative editors which help you focus on writing without interruption, yet work mutually with others. + +---------- + +### Hackpad ### + +![Hackpad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Hackpad.png) + +Hackpad is an open source web-based realtime wiki, based on the open source EtherPad collaborative document editor. + +Hackpad allows users to share your docs realtime and it uses color coding to show which authors have contributed to which content. It also allows in line photos, checklists and can also be used for coding as it offers syntax highlighting. + +While Dropbox acquired Hackpad in April 2014, it is only this month that the software has been released under an open source license. It has been worth the wait. + +Features include: + +- Very rich set of functions, similar to those offered by wikis +- Take collaborative notes, share data and files, and use comments to share your thoughts in real-time or asynchronously +- Granular privacy permissions enable you to invite a single friend, a dozen teammates, or thousands of Twitter followers +- Intelligent execution +- Directly embed videos from popular video sharing sites +- Tables +- Syntax highlighting for most common programming languages including C, C#, CSS, CoffeeScript, Java, and HTML + +- Website: [hackpad.com][1] +- Source code: [github.com/dropbox/hackpad][2] +- Developer: [Contributors][3] +- License: Apache License, Version 2.0 +- Version Number: - + +---------- + +### Etherpad ### + +![Etherpad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Etherpad.png) + +Etherpad is an open source web-based collaborative real-time editor, allowing authors to simultaneously edit a text document leave comments, and interact with others using an integrated chat. + +Etherpad is implemented in JavaScript, on top of the AppJet platform, with the real-time functionality achieved using Comet streaming. + +Features include: + +- Well designed spartan interface +- Simple text formatting features +- "Time slider" - explore the history of a pad +- Download documents in plain text, PDF, Microsoft Word, Open Document, and HTML +- Auto-saves the document at regular, short intervals +- Highly customizable +- Client side plugins extend the editor functionality +- Hundreds of plugins extend Etherpad including support for email notifications, pad management, authentication +- Accessibility enabled +- Interact with Pad contents in real time from within Node and from your CLI + +- Website: [etherpad.org][4] +- Source code: [github.com/ether/etherpad-lite][5] +- Developer: David Greenspan, Aaron Iba, J.D. Zamfiresc, Daniel Clemens, David Cole +- License: Apache License Version 2.0 +- Version Number: 1.5.7 + +---------- + +### Firepad ### + +![Firepad in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Firepad.png) + +Firepad is an open source, collaborative text editor. It is designed to be embedded inside larger web applications with collaborative code editing added in only a few days. + +Firepad is a full-featured text editor, with capabilities like conflict resolution, cursor synchronization, user attribution, and user presence detection. It uses Firebase as a backend, and doesn't need any server-side code. It can be added to any web app. Firepad can use either the CodeMirror editor or the Ace editor to render documents, and its operational transform code borrows from ot.js. + +If you want to extend your web application capabilities by adding the simple document and code editor, Firepad is perfect. + +Firepad is used by several editors, including the Atlassian Stash Realtime Editor, Nitrous.IO, LiveMinutes, and Koding. + +Features include: + +- True collaborative editing +- Intelligent OT-based merging and conflict resolution +- Support for both rich text and code editing +- Cursor position synchronization +- Undo / redo +- Text highlighting +- User attribution +- Presence detection +- Version checkpointing +- Images +- Extend Firepad through its API +- Supports all modern browsers: Chrome, Safari, Opera 11+, IE8+, Firefox 3.6+ + +- Website: [www.firepad.io][6] +- Source code: [github.com/firebase/firepad][7] +- Developer: Michael Lehenbauer and the team at Firebase +- License: MIT +- Version Number: 1.1.1 + +---------- + +### OwnCloud Documents ### + +![ownCloud Documents in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-ownCloud.png) + +ownCloud Documents is an ownCloud app to work with office documents alone and/or collaboratively. It allows up to 5 individuals to collaborate editing .odt and .doc files in a web browser. + +ownCloud is a self-hosted file sync and share server. It provides access to your data through a web interface, sync clients or WebDAV while providing a platform to view, sync and share across devices easily. + +Features include: + +- Cooperative edit, with multiple users editing files simultaneously +- Document creation within ownCloud +- Document upload +- Share and edit files in the browser, and then share them inside ownCloud or through a public link +- ownCloud features like versioning, local syncing, encryption, undelete +- Seamless support for Microsoft Word documents by way of transparent conversion of file formats + +- Website: [owncloud.org][8] +- Source code: [github.com/owncloud/documents][9] +- Developer: OwnCloud Inc. +- License: AGPLv3 +- Version Number: 8.1.1 + +---------- + +### Gobby ### + +![Gobby in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-Gobby.png) + +Gobby is a collaborative editor supporting multiple documents in one session and a multi-user chat. All users could work on the file simultaneously without the need to lock it. The parts the various users write are highlighted in different colours and it supports syntax highlighting of various programming and markup languages. + +Gobby allows multiple users to edit the same document together over the internet in real-time. It integrates well with the GNOME environment. It features a client-server architecture which supports multiple documents in one session, document synchronisation on request, password protection and an IRC-like chat for communication out of band. Users can choose a colour to highlight the text they have written in a document. + +A dedicated server called infinoted is also provided. + +Features include: + +- Full-fledged text editing capabilities including syntax highlighting using GtkSourceView +- Real-time, lock-free collaborative text editing through encrypted connections (including PFS) +- Integrated group chat +- Local group undo: Undo does not affect changes of remote users +- Shows cursors and selections of remote users +- Highlights text written by different users with different colors +- Syntax highlighting for most programming languages, auto indentation, configurable tab width +- Zeroconf support +- Encrypted data transfer including perfect forward secrecy (PFS) +- Sessions can be password-protected +- Sophisticated access control with Access Control Lists (ACLs) +- Highly configurable dedicated server +- Automatic saving of documents +- Advanced search and replace options +- Internationalisation +- Full Unicode support + +- Website: [gobby.github.io][10] +- Source code: [github.com/gobby][11] +- Developer: Armin Burgmeier, Philipp Kern and contributors +- License: GNU GPLv2+ and ISC +- Version Number: 0.5.0 + +---------- + +### OnlyOffice ### + +![OnlyOffice in action](http://www.linuxlinks.com/portal/content/reviews/Editors/Screenshot-OnlyOffice.png) + +ONLYOFFICE (formerly known as Teamlab Office) is a multifunctional cloud online office suite integrated with CRM system, document and project management toolset, Gantt chart and email aggregator. + +It allows you to organize business tasks and milestones, store and share your corporate or personal documents, use social networking tools such as blogs and forums, as well as communicate with your team members via corporate IM. + +Manage documents, projects, team and customer relations in one place. OnlyOffice combines text, spreadsheet and presentation editors that include features similar to Microsoft desktop editors (Word, Excel and PowerPoint), but then allow to co-edit, comment and chat in real time. + +OnlyOffice is written in ASP.NET, based on HTML5 Canvas element, and translated to 21 languages. + +Features include: + +- As powerful as a desktop editor when working with large documents, paging and zooming +- Document sharing in view / edit modes +- Document embedding +- Spreadsheet and presentation editors +- Co-editing +- Commenting +- Integrated chat +- Mobile applications +- Gantt charts +- Time management +- Access right management +- Invoicing system +- Calendar +- Integration with file storage systems: Google Drive, Box, OneDrive, Dropbox, OwnCloud +- Integration with CRM, email aggregator and project management module +- Mail server +- Mail aggregator +- Edit documents, spreadsheets and presentations of the most popular formats: DOC, DOCX, ODT, RTF, TXT, XLS, XLSX, ODS, CSV, PPTX, PPT, ODP + +- Website: [www.onlyoffice.com][12] +- Source code: [github.com/ONLYOFFICE/DocumentServer][13] +- Developer: Ascensio System SIA +- License: GNU GPL v3 +- Version Number: 7.7 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150823085112605/CollaborativeEditing.html + +作者:Frazer Kline +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://hackpad.com/ +[2]:https://github.com/dropbox/hackpad +[3]:https://github.com/dropbox/hackpad/blob/master/CONTRIBUTORS +[4]:http://etherpad.org/ +[5]:https://github.com/ether/etherpad-lite +[6]:http://www.firepad.io/ +[7]:https://github.com/firebase/firepad +[8]:https://owncloud.org/ +[9]:http://github.com/owncloud/documents/ +[10]:https://gobby.github.io/ +[11]:https://github.com/gobby +[12]:https://www.onlyoffice.com/free-edition.aspx +[13]:https://github.com/ONLYOFFICE/DocumentServer \ No newline at end of file diff --git a/sources/talk/20150824 Linux about to gain a new file system--bcachefs.md b/sources/talk/20150824 Linux about to gain a new file system--bcachefs.md new file mode 100644 index 0000000000..df3cd14682 --- /dev/null +++ b/sources/talk/20150824 Linux about to gain a new file system--bcachefs.md @@ -0,0 +1,25 @@ +Linux about to gain a new file system – bcachefs +================================================================================ +A five year old file system built by Kent Overstreet, formerly of Google, is near feature complete with all critical components in place. Bcachefs boasts the performance and reliability of the widespread ext4 and xfs as well as the feature list similar to that of btrfs and zfs. Notable features include checksumming, compression, multiple devices, caching and eventually snapshots and other “nifty” features. + +Bcachefs started out as **bcache** which was a block caching layer, the evolution from bcache to a fully featured [copy-on-write][1] file system has been described as a metamorphosis. + +Responding to the self-imposed question “Yet another new filesystem? Why?” Kent Overstreet replies with the following “Well, years ago (going back to when I was still at Google), I and the other people working on bcache realized that what we were working on was, almost by accident, a good chunk of the functionality of a full blown filesystem – and there was a really clean and elegant design to be had there if we took it and ran with it. And a fast one – the main goal of bcachefs to match ext4 and xfs on performance and reliability, but with the features of btrfs/xfs.” + +Overstreet has invited people to use and test bcachefs out on their own systems. To find instructions to use bcachefs on your system check out the mailing list [announcement][2]. + +The file system situation on Linux is a fairly drawn out one, Fedora 16 for instance aimed to use btrfs instead of ext4 as the default file system, this switch still has not happened. Currently all of the Debian based distros, including Ubuntu, Mint and elementary OS, still use ext4 as their default file systems and none have even whispered about switching to a new default file system yet. + +-------------------------------------------------------------------------------- + +via: http://www.linuxveda.com/2015/08/22/linux-gain-new-file-system-bcachefs/ + +作者:[Paul Hill][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxveda.com/author/paul_hill/ +[1]:https://en.wikipedia.org/wiki/Copy-on-write +[2]:https://lkml.org/lkml/2015/8/21/22 \ No newline at end of file diff --git a/sources/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md b/sources/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md new file mode 100644 index 0000000000..577411f58a --- /dev/null +++ b/sources/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md @@ -0,0 +1,153 @@ + Basics Of NetworkManager Command Line Tool, Nmcli +================================================================================ +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/08/networking1.jpg) + +### Introduction ### + +In this tutorial, we will discuss NetworkManager command line tool, aka **nmcli**, in CentOS / RHEL 7. Users who are using **ifconfig** should avoid this command in Centos 7. + +Lets configure some networking settings with nmcli utility. + +#### To get all address information of all interfaces connected with System #### + + [root@localhost ~]# ip addr show + +**Sample Output:** + + 1: lo: mtu 65536 qdisc noqueue state UNKNOWN + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 + inet 127.0.0.1/8 scope host lo + valid_lft forever preferred_lft forever + inet6 ::1/128 scope host + valid_lft forever preferred_lft forever + 2: eno16777736: mtu 1500 qdisc pfifo_fast state UP qlen 1000 + link/ether 00:0c:29:67:2f:4c brd ff:ff:ff:ff:ff:ff + inet 192.168.1.51/24 brd 192.168.1.255 scope global eno16777736 + valid_lft forever preferred_lft forever + inet6 fe80::20c:29ff:fe67:2f4c/64 scope link + valid_lft forever preferred_lft forever + +#### To retrieve packets statistics related with connected interfaces #### + + [root@localhost ~]# ip -s link show eno16777736 + +**Sample Output:** + +![unxmen_(011)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0111.png) + +#### Get routing configuration #### + + [root@localhost ~]# ip route + +Sample Output: + + default via 192.168.1.1 dev eno16777736 proto static metric 100 + 192.168.1.0/24 dev eno16777736 proto kernel scope link src 192.168.1.51 metric 100 + +#### Analyze path for some host/website #### + + [root@localhost ~]# tracepath unixmen.com + +Output will be just like traceroute but in more managed form. + +![unxmen_0121](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_01211.png) + +### nmcli utility ### + +**Nmcli** is a very rich and flexible command line utility. some of the terms used in nmcli are: + +- **Device** – A network interface being used. +- **Connection** – A set of configuration settings, for a single device you can have multiple connections, you can switch between connections. + +#### Find out how many connections are available for how many devices #### + + [root@localhost ~]# nmcli connection show + +![unxmen_(013)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_013.png) + +#### Get details of a specific connection #### + + [root@localhost ~]# nmcli connection show eno1 + +**Sample output:** + +![unxmen_(014)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0141.png) + +#### Get the Network device status #### + + [root@localhost ~]# nmcli device status + +---------- + + DEVICE TYPE STATE CONNECTION + eno16777736 ethernet connected eno1 + lo loopback unmanaged -- + +#### Create a new connection with “dhcp” #### + + [root@localhost ~]# nmcli connection add con-name "dhcp" type ethernet ifname eno16777736 + +Where, + +- **Connection add** – To add new connection +- **con-name** – connection name +- **type** – type of device +- **ifname** – interface name + +This command will add connection with dhcp protocol. + +**Sample output:** + + Connection 'dhcp' (163a6822-cd50-4d23-bb42-8b774aeab9cb) successfully added. + +#### Instead of assigning an IP via dhcp, you can add ip address as “static” #### + + [root@localhost ~]# nmcli connection add con-name "static" ifname eno16777736 autoconnect no type ethernet ip4 192.168.1.240 gw4 192.168.1.1 + +**Sample Output:** + + Connection 'static' (8e69d847-03d7-47c7-8623-bb112f5cc842) successfully added. + +**Update connection:** + + [root@localhost ~]# nmcli connection up eno1 + +Again Check, whether ip address is changed or not. + + [root@localhost ~]# ip addr show + +![unxmen_(015)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0151.png) + +#### Add DNS settings to Static connections. #### + + [root@localhost ~]# nmcli connection modify "static" ipv4.dns 202.131.124.4 + +#### Add additional DNS value. #### + +[root@localhost ~]# nmcli connection modify "static" +ipv4.dns 8.8.8.8 + +**Note**: For additional entries **+** symbol will be used and **+ipv4.dns** will be used instead on **ip4.dns** + +Put an additional ip address: + + [root@localhost ~]# nmcli connection modify "static" +ipv4.addresses 192.168.200.1/24 + +Refresh settings using command: + + [root@localhost ~]# nmcli connection up eno1 + +![unxmen_(016)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_016.png) + +You will see, setting are effective now. + +That’s it. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/basics-networkmanager-command-line-tool-nmcli/ + +作者:Rajneesh Upadhyay +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file diff --git a/sources/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md b/sources/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md new file mode 100644 index 0000000000..a8e21419fb --- /dev/null +++ b/sources/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md @@ -0,0 +1,74 @@ +How to create an AP in Ubuntu 15.04 to connect to Android/iPhone +================================================================================ +I tried creating a wireless access point via Gnome Network Manager in 15.04 and was successful. I’m sharing the steps with our readers. Please note: you must have a wifi card which allows you to create an Access Point. If you want to know how to find that, type iw list in a terminal. + +If you don’t have iw installed, you can install iw in Ubuntu using the command sudo apt-get install iw. + +After you type iw list, look for supported interface section, where it should be a entry called AP like the one shown below: + +Supported interface modes: + +* IBSS +* managed +* AP +* AP/VLAN +* monitor +* mesh point + +Let’s see the steps in detail + +1. Disconnect WIFI. Get a an internet cable and plug into your laptop so that you are connected to a wired internet connection +1. Go to Network Icon on the top panel -> Edit Connections then click the Add button in the pop-up window +1. Choose Wi-Fi from the drop-down menu +1. Next, + +a. Type in a connection name e.g. Hotspot + +b. Type in a SSID e.g. Hotspot + +c. Select mode: Infrastructure + +d. Device MAC address: select your wireless card from drop-down menu + +![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome1.jpg) + +1. Go to Wi-Fi Security tab, select security type WPA & WPA2 Personal and set a password +1. Go to IPv4 Settings tab, from Method drop-down box, select Shared to other computers + +![](http://i1.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome4.jpg) + +1. Go to IPv6 tab and set Method to ignore (do this only if you do not use IPv6) +1. Hit the “Save” button to save the configuration +1. Open a terminal from the menu/dash +1. Now, edit the connection with you just created via network settings + +VIM editor: + + sudo vim /etc/NetworkManager/system-connections/Hotspot + +Gedit: + + gksu gedit /etc/NetworkManager/system-connections/Hotspot + +Replace name Hotspot with the connection name you have given in step 4 + +![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome2.jpg?resize=640%2C402) + +1. Change the line mode=infrastructure to mode=ap and save the file +1. Once you save the file, you should be able to see the wifi named Hotspot showing up in the list of available wifi networks. (If the network does not show, disable and enable wifi ) + +![](http://i1.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome3.jpg?resize=290%2C375) + +1. You can now connect your Android phone. Connection tested using Xioami Mi4i running Android 5.0 (Downloaded 1GB to test speed and reliability) + +-------------------------------------------------------------------------------- + +via: http://www.linuxveda.com/2015/08/23/how-to-create-an-ap-in-ubuntu-15-04-to-connect-to-androidiphone/ + +作者:[Sayantan Das][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxveda.com/author/sayantan_das/ \ No newline at end of file From 90c65877863ed475a05d0e87023217510503e4ee Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 24 Aug 2015 14:47:25 +0800 Subject: [PATCH 1832/2517] =?UTF-8?q?20150824-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...aving Fun With Linux Terminal In Ubuntu.md | 37 +++ ...ice Found Error After Installing Ubuntu.md | 97 ++++++++ ...gari Support In Antergos And Arch Linux.md | 47 ++++ ...phyr Test Management Tool on CentOS 7.x.md | 233 ++++++++++++++++++ 4 files changed, 414 insertions(+) create mode 100644 sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md create mode 100644 sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md create mode 100644 sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md create mode 100644 sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md diff --git a/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md b/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md new file mode 100644 index 0000000000..6adcbbc3bc --- /dev/null +++ b/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md @@ -0,0 +1,37 @@ +Watch These Kids Having Fun With Linux Terminal In Ubuntu +================================================================================ +I found this short video of children having fun with Linux terminals in their computer lab at school. I do not know where do they belong to, but I guess it is either in Indonesia or Malaysia. + +注:youtube 视频 + + +### Run train in Linux terminal ### + +There is no magic here. It’s just a small command line fun tool called ‘sl’. I presume that it was developed entirely to have some fun when command ls is wrongly typed. If you ever worked on Linux terminal, you know that ls is one of the most commonly used commands and perhaps one of the most frequently mis-typed command as well. + +If you want to have little fun with this terminal train, you can install it using the following command: + + sudo apt-get install sl + +To run the terminal train, just type **sl** in the terminal. It also has the following options: + +- -a : Accident mode. You can see people crying help +- -l : shows a smaller train but with more coaches +- -F : A flying train +- -e : Allows interrupt by Ctrl+C. In other mode you cannot use Ctrl+C to stop the train. But then, it doesn’t run for long. + +Normally, you should hear the whistle as well but it doesn’t work in most of the Linux OS, Ubuntu 14.04 being one of them. Here is the accidental terminal train :) + +![Linux Terminal Train](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Linux_Terminal_Train.jpeg) + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/ubuntu-terminal-train/ + +作者:[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/ \ No newline at end of file diff --git a/sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md b/sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md new file mode 100644 index 0000000000..3281a51137 --- /dev/null +++ b/sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md @@ -0,0 +1,97 @@ +Fix No Bootable Device Found Error After Installing Ubuntu +================================================================================ +Usually, I dual boot Ubuntu and Windows but this time I decided to go for a clean Ubuntu installation i.e. eliminating Windows completely. After the clean install of Ubuntu, I ended up with a screen saying **no bootable device found** instead of the Grub screen. Clearly, the installation messed up with the UEFI boot settings. + +![No Bootable Device Found After Installing Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_1.jpg) + +I am going to show you how I fixed **no bootable device found error after installing Ubuntu in Acer laptops**. It is important that I mention that I am using Acer Aspire R13 because we have to change things in firmware settings and those settings might look different from manufacturer to manufacturer and from device to device. + +So before you go on trying the steps mentioned here, let’s first see what state my computer was in during this error: + +- My Acer Aspire R13 came preinstalled with Windows 8.1 and with UEFI boot manager +- Secure boot was not turned off (my laptop has just come from repair and the service guy had put the secure boot on again, I did not know until I ran up in the problem). You can read this post to know [how disable secure boot in Acer laptops][1] +- I chose to install Ubuntu by erasing everything i.e. existing Windows 8.1, various partitions etc. +- After installing Ubuntu, I saw no bootable device found error while booting from the hard disk. Booting from live USB worked just fine + +In my opinion, not disabling the secure boot was the reason of this error. However, I have no data to backup my claim. It is just a hunch. Interestingly, dual booting Windows and Linux often ends up in common Grub issues like these two: + +- [error: no such partition grub rescue][2] +- [Minimal BASH like line editing is supported][3] + +If you are in similar situation, you can try the fix which worked for me. + +### Fix no bootable device found error after installing Ubuntu ### + +Pardon me for poor quality images. My OnePlus camera seems to be not very happy with my laptop screen. + +#### Step 1 #### + +Turn the power off and boot into boot settings. I had to press Fn+F2 (to press F2 key) on Acer Aspire R13 quickly. You have to be very quick with it if you are using SSD hard disk because SSDs are very fast in booting. Depending upon your manufacturer/model, you might need to use Del or F10 or F12 keys. + +#### Step 2 #### + +In the boot settings, make sure that Secure Boot is turned on. It should be under the Boot tab. + +#### Step 3 #### + +Go to Security tab and look for “Select an UEFI file as trusted for executing” and click enter. + +![Fix no bootable device found ](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_2.jpg) + +Just for your information, what we are going to do here is to add the UEFI settings file (it was generated while Ubuntu installation) among the trusted UEFI boots in your device. If you remember, UEFI boot’s main aim is to provide security and since Secure Boot was not disabled (perhaps) the device did not intend to boot from the newly installed OS. Adding it as trusted, kind of whitelisting, will let the device boot from the Ubuntu UEFI file. + +#### Step 4 #### + +You should see your hard disk like HDD0 etc here. If you have more than one hard disk, I hope you remember where did you install Ubuntu. Press Enter here as well. + +![Fix no bootable device found in boot settings](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_3.jpg) + +#### Step 5 #### + +You should see here. Press enter. + +![Fix settings in UEFI](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_4.jpg) + +#### Step 6 #### + +You’ll see in next screen. Don’t get impatient, you are almost there + +![Fixing boot error after installing Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_5.jpg) + +#### Step 7 #### + +You’ll see shimx64.efi, grubx64.efi and MokManager.efi file here. The important one is shimx64.efi here. Select it and click enter. + + +![Fix no bootable device found](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_6.jpg) + +In next screen, type Yes and click enter. + +![No_Bootable_Device_Found_7](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_7.jpg) + +#### Step 8 #### + +Once we have added it as trused EFI file to be executed, press F10 to save and exit. + +![Save and exist firmware settings](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_8.jpg) + +Reboot your system and this time you should be seeing the familiar Grub screen. Even if you do not see Grub screen, you should at least not be seeing “no bootable device found” screen anymore. You should be able to boot into Ubuntu. + +If your Grub screen was messed up after the fix but you got to login into it, you can reinstall Grub to boot into the familiar purple Grub screen of Ubuntu. + +I hope this tutorial helped you to fix no bootable device found error. Any questions or suggestions or a word of thanks is always welcomed. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/no-bootable-device-found-ubuntu/ + +作者:[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://itsfoss.com/disable-secure-boot-in-acer/ +[2]:http://itsfoss.com/solve-error-partition-grub-rescue-ubuntu-linux/ +[3]:http://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux/ \ No newline at end of file diff --git a/sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md b/sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md new file mode 100644 index 0000000000..db36df66e6 --- /dev/null +++ b/sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md @@ -0,0 +1,47 @@ +How To Add Hindi And Devanagari Support In Antergos And Arch Linux +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Indian-languages.jpg) + +You might be knowing by now that I have been trying my hands on [Antergos Linux][1] lately. One of the first few things I noticed after installing [Antergos][2] was that **Hindi scripts were not displayed properly** in the default chromium browser. + +This is a strange thing that I never encountered before in my desktop Linux experience ever. First, I thought maybe it could be a browser problem so I went on to install Firefox only to see the same story repeated. Firefox also could not display Hindi properly. Unlike Chromium that displayed nothing, Firefox did display something but it was not readable. + +![No hindi support in Arch Linux based Antergos](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Hindi_Support_Antergos_Arch_linux_1.jpeg) + +Hindi display in Chromium + +![No hindi support in Arch Linux based Antergos](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Hindi_Support_Antergos_Arch_linux_2.jpeg) + +Hindi display in Firefox + +Strange? So no Hindi support in Arch based Antergos Linux by default? I did not verify, but I presume that it would be the same for other Indian languages etc that are also based on Devanagari script. + +I this quick tutorial, I am going to show you how to add Devanagari support so that Hindi and other Indian languages are displayed properly. + +### Add Indian language support in Antergos and Arch Linux ### + +Open a terminal and use the following command: + + sudo yaourt -S ttf-indic-otf + +Enter the password. And it will provide rendering support for Indian languages. + +Restarting Firefox displayed Hindi correctly immediately, but it took a restart to display Hindi. For that reason, I advise that you **restart your system** after installing the Indian fonts. + +![Adding Hindi display support in Arch based Antergos Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Hindi_Support_Antergos_Arch_linux_4.jpeg) + +I hope tis quick helped you to read Hindi, Sanskrit, Tamil, Telugu, Malayalam, Bangla and other Indian languages in Antergos and other Arch based Linux distros such as Manjaro Linux. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/display-hindi-arch-antergos/ + +作者:[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://antergos.com/ +[2]:http://itsfoss.com/tag/antergos/ \ No newline at end of file diff --git a/sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md b/sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md new file mode 100644 index 0000000000..b4014bb009 --- /dev/null +++ b/sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md @@ -0,0 +1,233 @@ +How to Setup Zephyr Test Management Tool on CentOS 7.x +================================================================================ +Test Management encompasses anything and everything that you need to do as testers. Test management tools are used to store information on how testing is to be done, plan testing activities and report the status of quality assurance activities. So in this article we will illustrate you about the setup of Zephyr test management tool that includes everything needed to manage the test process can save testers hassle of installing separate applications that are necessary for the testing process. Once you have done with its setup you will be able to track bugs, defects and allows the project tasks for collaboration with your team as you can easily share and access the data across multiple project teams for communication and collaboration throughout the testing process. + +### Requirements for Zephyr ### + +We are going to install and run Zephyr under the following set of its minimum resources. Resources can be enhanced as per your infrastructure requirements. We will be installing Zephyr on the CentOS-7 64-bit while its binary distributions are available for almost all Linux operating systems. + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Zephyr test management tool
Linux OSCentOS Linux 7 (Core), 64-bit
PackagesJDK 7 or above ,  Oracle JDK 6 updateNo Prior Tomcat, MySQL installed
RAM4 GBPreferred 8 GB
CPU2.0 GHZ or Higher
Hard Disk30 GB , Atleast 5GB must be free
+ +You must have super user (root) access to perform the installation process for Zephyr and make sure that you have properly configured yout network with static IP address and its default set of ports must be available and allowed in the firewall where as the Port 80/443, 8005, 8009, 8010 will used by tomcat and Port 443 or 2099 will used within Zephyr by flex for the RTMP protocol. + +### Install Java JDK 7 ### + +Java JDK 7 is the basic requirement for the installation of Zephyr, if its not already installed in your operating system then do the following to install Java and setup its JAVA_HOME environment variables to be properly configured. + +Let’s issue the below commands to install Java JDK 7. + + [root@centos-007 ~]# yum install java-1.7.0-openjdk-1.7.0.79-2.5.5.2.el7_1 + +---------- + + [root@centos-007 ~]# yum install java-1.7.0-openjdk-devel-1.7.0.85-2.6.1.2.el7_1.x86_64 + +Once your java is installed including its required dependencies, run the following commands to set its JAVA_HOME environment variables. + + [root@centos-007 ~]# export JAVA_HOME=/usr/java/default + [root@centos-007 ~]# export PATH=/usr/java/default/bin:$PATH + +Now check the version of java to verify its installation with following command. + + [root@centos-007 ~]# java –version + +---------- + + java version "1.7.0_79" + OpenJDK Runtime Environment (rhel-2.5.5.2.el7_1-x86_64 u79-b14) + OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode) + +The output shows that we we have successfully installed OpenJDK Java verion 1.7.0_79. + +### Install MySQL 5.6.X ### + +If you have other MySQLs on the machine then it is recommended to remove them and +install this version on top of them or upgrade their schemas to what is specified. As this specific major/minor (5.6.X) version of MySQL is required with the root username as a prerequisite of Zephyr. + +To install MySQL 5.6 on CentOS-7.1 lets do the following steps: + +Download the rpm package, which will create a yum repo file for MySQL Server installation. + + [root@centos-007 ~]# yum install wget + [root@centos-007 ~]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm + +Now Install this downloaded rpm package by using rpm command. + + [root@centos-007 ~]# rpm -ivh mysql-community-release-el7-5.noarch.rpm + +After the installation of this package you will get two new yum repo related to MySQL. Then by using yum command, now we will install MySQL Server 5.6 and all dependencies will be installed itself. + + [root@centos-007 ~]# yum install mysql-server + +Once the installation process completes, run the following commands to start mysqld services and check its status whether its active or not. + + [root@centos-007 ~]# service mysqld start + [root@centos-007 ~]# service mysqld status + +On fresh installation of MySQL Server. The MySQL root user password is blank. +For good security practice, we should reset the password MySQL root user. + +Connect to MySQL using the auto-generated empty password and change the +root password. + + [root@centos-007 ~]# mysql + mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_password'); + mysql> flush privileges; + mysql> quit; + +Now we need to configure the required database parameters in the default configuration file of MySQL. Let's open its file located in "/etc/" folder and update it as follow. + + [root@centos-007 ~]# vi /etc/my.cnf + +---------- + + [mysqld] + datadir=/var/lib/mysql + socket=/var/lib/mysql/mysql.sock + symbolic-links=0 + + sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES + max_allowed_packet=150M + max_connections=600 + default-storage-engine=INNODB + character-set-server=utf8 + collation-server=utf8_unicode_ci + + [mysqld_safe] + log-error=/var/log/mysqld.log + pid-file=/var/run/mysqld/mysqld.pid + default-storage-engine=INNODB + character-set-server=utf8 + collation-server=utf8_unicode_ci + + [mysql] + max_allowed_packet = 150M + [mysqldump] + quick + +Save the changes made in the configuration file and restart mysql services. + + [root@centos-007 ~]# service mysqld restart + +### Download Zephyr Installation Package ### + +We done with installation of required packages necessary to install Zephyr. Now we need to get the binary distributed package of Zephyr and its license key. Go to official download link of Zephyr that is http://download.yourzephyr.com/linux/download.php give your email ID and click to download. + +![Zephyr Download](http://blog.linoxide.com/wp-content/uploads/2015/08/13.png) + +Then and confirm your mentioned Email Address and you will get the Zephyr Download link and its License Key link. So click on the provided links and choose the appropriate version of your Operating system to download the binary installation package and its license file to the server. + +We have placed it in the home directory and modify its permissions to make it executable. + +![Zephyr Binary](http://blog.linoxide.com/wp-content/uploads/2015/08/22.png) + +### Start Zephyr Installation and Configuration ### + +Now we are ready to start the installation of Zephyr by executing its binary installation script as below. + + [root@centos-007 ~]# ./zephyr_4_7_9213_linux_setup.sh –c + +Once you run the above command, it will check for the Java environment variables to be properly setup and configured. If there's some mis-configuration you might the error like. + + testing JVM in /usr ... + Starting Installer ... + Error : Either JDK is not found at expected locations or JDK version is mismatched. + Zephyr requires Oracle Java Development Kit (JDK) version 1.7 or higher. + +Once you have properly configured your Java, then it will start installation of Zephyr and asks to press "o" to proceed and "c" to cancel the setup. Let's type "o" and press "Enter" key to start installation. + +![install zephyr](http://blog.linoxide.com/wp-content/uploads/2015/08/32.png) + +The next option is to review all the requirements for the Zephyr setup and Press "Enter" to move forward to next option. + +![zephyr requirements](http://blog.linoxide.com/wp-content/uploads/2015/08/42.png) + +To accept the license agreement type "1" and Press Enter. + + I accept the terms of this license agreement [1], I do not accept the terms of this license agreement [2, Enter] + +Here we need to choose the appropriate destination location where we want to install the zephyr and choose the default ports, if you want to choose other than default ports, you are free to mention here. + +![installation folder](http://blog.linoxide.com/wp-content/uploads/2015/08/52.png) + +Then customize the mysql database parameters and give the right paths to the configurations file. You might the an error at this point as shown below. + + Please update MySQL configuration. Configuration parameter max_connection should be at least 500 (max_connection = 500) and max_allowed_packet should be at least 50MB (max_allowed_packet = 50M). + +To overcome this error make sure that you have configure the "max_connection" and "max_allowed_packet" limits properly in the mysql configuration file. So confirm these settings, connect to mysql server and run the commands as shown. + +![mysql connections](http://blog.linoxide.com/wp-content/uploads/2015/08/62.png) + +Once you have configured your mysql database properly, it will extract the configuration files to complete the setup. + +![mysql customization](http://blog.linoxide.com/wp-content/uploads/2015/08/72.png) + +The installation process completes with successful installation of Zephyr 4.7 on your computer. To Launch Zephyr Desktop type "y" to finish Zephyr installation. + +![launch zephyr](http://blog.linoxide.com/wp-content/uploads/2015/08/82.png) + +### Launch Zephyr Desktop ### + +Open your web browser to launch Zephyr Desktop with your localhost IP adress and you will be direted to the Zephyr Desktop. + + http://your_server_IP/zephyr/desktop/ + +![Zephyr Desktop](http://blog.linoxide.com/wp-content/uploads/2015/08/91.png) + +From your Zephyr Dashboard click on the "Test Manager" and login with the dault user name and password that is "test.manager". + +![Test Manage Login](http://blog.linoxide.com/wp-content/uploads/2015/08/test_manager_login.png) + +Once you are loged in you will be able to configure your administrative settings as shown. So choose the settings you wish to put according to your environment. + +![Test Manage Administration](http://blog.linoxide.com/wp-content/uploads/2015/08/test_manage_admin.png) + +Save the settings after you have done with your administrative settings, similarly do the settings of resources management and project setup and start using Zephyr as a complete set of your testing management tool. You check and edit the status of your administrative settings from the Department Dashboard Management as shown. + +![zephyr dashboard](http://blog.linoxide.com/wp-content/uploads/2015/08/dashboard.png) + +### Conclusion ### + +Cheers! we have done with the complete setup of Zephyr installation setup on Centos 7.1. We hope you are now much aware of Zephyr Test management tool which offer the prospect of streamlining the testing process and allow quick access to data analysis, collaborative tools and easy communication across multiple project teams. Feel free to comment us if you find any difficulty while you are doing it in your environment. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-zephyr-tool-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 From d29562dafcdb2241616dd46beff562c2107f80ca Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 24 Aug 2015 15:24:44 +0800 Subject: [PATCH 1833/2517] =?UTF-8?q?20150824-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ng before CoreOS and the Atomic Project.md | 92 +++++++++ ...artition into One Large Virtual Storage.md | 186 ++++++++++++++++++ 2 files changed, 278 insertions(+) create mode 100644 sources/talk/20150824 LinuxCon exclusive--Mark Shuttleworth says Snappy was born long before CoreOS and the Atomic Project.md create mode 100644 sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md diff --git a/sources/talk/20150824 LinuxCon exclusive--Mark Shuttleworth says Snappy was born long before CoreOS and the Atomic Project.md b/sources/talk/20150824 LinuxCon exclusive--Mark Shuttleworth says Snappy was born long before CoreOS and the Atomic Project.md new file mode 100644 index 0000000000..2c45b6064b --- /dev/null +++ b/sources/talk/20150824 LinuxCon exclusive--Mark Shuttleworth says Snappy was born long before CoreOS and the Atomic Project.md @@ -0,0 +1,92 @@ +LinuxCon exclusive: Mark Shuttleworth says Snappy was born long before CoreOS and the Atomic Project +================================================================================ +![](http://images.techhive.com/images/article/2015/08/mark-100608730-primary.idge.jpg) + +Mark Shuttleworth at LinuxCon Credit: Swapnil Bhartiya + +> Mark Shuttleworth, founder of Canonical and Ubuntu, made a surprise visit at LinuxCon. I sat down with him for a video interview and talked about Ubuntu on IBM’s new LinuxONE systems, Canonical’s plans for containers, open source in the enterprise space and much more. + +### You made a surprise entry during the keynote. What brought you to LinuxCon? ### + +**Mark Shuttleworth**: I am here at LinuxCon to support IBM and Canonical in their announcement of Ubuntu on their new Linux-only super-high-end mainframe LinuxONE. These are the biggest machines in the world, purpose-built to run only Linux. And we will be bringing Ubuntu to them, which is a real privilege for us and is going to be incredible for developers. + +![mark selfie](http://images.techhive.com/images/article/2015/08/mark-selfie-100608731-large.idge.jpg) + +Swapnil Bhartiya + +Mark Shuttleworth and Swapnil Bhartiya, mandatory selfie at LinuxCon + +### Only Red Hat and SUSE were supported on it. Why was Ubuntu missing from the mainframe scene? ### + +**Mark**: Ubuntu has always been about developers. It has been about enabling the free software platform from where it is collaboratively built to be available at no cost to developers in the world, so they are limited only by their imagination—not by money, not by geography. + +There was an incredible story told today about a 12-year-old kid who started out with Ubuntu; there are incredible stories about people building giant businesses with Ubuntu. And for me, being able to empower people, whether they come from one part of the world or another to express their ideas on free software, is what Ubuntu is all about. It's been a journey for us essentially, going to the platforms those developers care about, and just in the last year, we suddenly saw a flood of requests from companies who run mainframes, who are using Ubuntu for their infrastructure—70% of OpenStack deployments are on Ubuntu. Those same people said, “Look, there is the mainframe, and we like to unleash it and think of it as a region in the cloud.” So when IBM started talking to us, saying that they have this project in the works, it felt like a very natural fit: You are going to be able to take your Ubuntu laptop, build code there and ship it straight to every cloud, every virtualization environment, every bare metal in every architecture including the mainframe, and that's going to be beautiful. + +### Will Canonical be offering support for these systems? ### + +**Mark**: Yes. Ubuntu on z Systems is going to be completely supported. We will make long-term commitments to that. The idea is to bring together scale-out-fast cloud-like workloads, which is really born on Ubuntu; 70% of workloads on Amazon and other public clouds run on Ubuntu. Now you can think of running that on a mainframe if that makes sense to you. + +We are going to provide exactly the same platform that we do on the cloud, and we are going to provide that on the mainframe as well. We are also going to expose it to the OpenStack API so you can consume it on a mainframe with exactly the same tools and exactly the same processes that you would consume on a laptop, or OpenStack or public cloud resources. So all of the things that Ubuntu builds to make your life easy as a developer are going to be available across that full range of platforms and systems, and all of that is commercially supported. + +### Canonical is doing a lot of things: It is into enterprise, and it’s in the consumer space with mobile and desktop. So what is the core focus of Canonical now? ### + +**Mark**: The trick for us is to enable the reuse of specifically the same parts [of our technology] in as many useful ways as possible. So if you look at the work that we do at z Systems, it's absolutely defined by the work that we do on the cloud. We want to deliver exactly the same libraries on exactly the same date for the mainframe as we do for public clouds and for x86, ARM and Power servers today. + +We don't allow Ubuntu or our focus to fragment very dramatically because we don't allow different products managers to find Ubuntu in different ways in different environments. We just want to bring that standard experience that developers love to this new environment. + +Similarly if you look at the work we are doing on IoT [Internet of Things], Snappy Ubuntu is the heart of the phone. It’s the phone without the GUI. So the definitions, the tools, the kernels, the mechanisms are shared across those projects. So we are able to multiply the impact of the work. We have an incredible community, and we try to enable the community to do things that they want to do that we can’t do. So that's why we have so many buntus, and it's kind of incredible for me to see what they do with that. + +We also see the community climbing in. We see hundreds of developers working with Snappy for IoT, and we see developers working with Snappy on mobile, for personal computing as convergence becomes real. And, of course, there is the cloud server story: 70% of the world is Ubuntu, so there is a huge audience. We don't have to do all the work that we do; we just have to be open and willing to, kind of, do the core infrastructure and then reuse it as efficiently as possible. + +### Is Snappy a response to Atomic or CoreOS? ### + +**Mark**: Snappy as a project was born four years ago when we started working on the phone, which was long before the CoreOS, long before Atomic. I think the principles of atomicity, transactionality are beautiful, but remember: We needed to build the same things for the phone. And with Snappy, we have the ability to deliver transactional updates to any of these systems—phones, servers and cloud devices. + +Of course, it feels a little different because in order to provide those guarantees, we have to shape the system in such a way that we can guarantee the guarantees. And that's why Snappy is snappy; it's a new thing. It's not based on an old packaging system. Though we will keep both of them: All Snaps for us that Canonical makes, the core snaps that define the OS, are all built from Debian packages. They are two different faces of the same coin for us, and developers will use them as tools. We use the right tools for the job. + +There are couple of key advantages for Snappy over CoreOS and Atomic, and the main one is this: We took the view that we wanted the base idea to be extensible. So with Snappy, the core operating system is tiny. You make all the choices, and you take all the decisions about things you want to bolt on that: you want to bolt on Docker; you want to bolt on Kubernete; you want to bolt on Mesos; you want to bolt on Lattice from Pivotal; you want to bolt on OpenStack. Those are the things you choose to add with Snappy. Whereas with Atomic and CoreOS, it's one blob and you have to do it exactly the way they want you to do it. You have to live with the versions of software and the choices they make. + +Whereas with Snappy, we really preserve this idea of the choices you have got in Ubuntu are now transactionally available on Snappy systems. That makes the core much smaller, and it gives you the choice of different container systems, different container management systems, different cloud infrastructure systems or different apps of every description. I think that's the winning idea. In fullness of time, people will realize that they wanted to make those choices themselves; they just want Canonical to do the work of providing the updates in a really efficient manner. + +### There is so much competition in the container space with Docker, Rocket and many other players. Where will Canonical stand amid this competition? ### + +**Mark**: Canonical is focused on platform tools, and we see things like the Rocket and Docker as things super-useful for developers; we just make sure that those work best on Ubuntu. Docker, for years, ran only Ubuntu because we work very closely with them, and we are glad now that it's available everywhere else. But if you look at the numbers, the vast majority of Docker containers are on Ubuntu. Because we work really hard, as developers, you get the best experience with all of these tools on Ubuntu. We don't want to try and control everything, and it’s great for us to have those guys competing. + +I think in the end people will see that there is really two kinds of containers. 1) There are cases where a container is just like a VM machine. It feels like a whole machine, it runs all processes, all the logs and cron jobs are there. It's like a VM, just that it's much cheaper, much lighter, much faster, and that's LXD. 2) And then there would be process containers, which are like Docker or Rocket; they are there to run a specific application very fast. I think we lead the world in general machine container story, which is our hypervisor LXD, and I think Docker leads the story when it comes to applications containers, process containers. And those two work together really beautifully. + +### Microsoft and Canonical are working together on LXD? Can you tell us about this engagement? ### + +Mark: LXD is two things. First, it's an implementation on top of Canonical's work on the kernel so that you can start to create full machine containers on any host. But it's also a REST API. That’s the transitions from LXC to LXD. We got a daemon there so you can talk to the daemon over the network, if it's listening on the network, and says tell me about the containers on that machine, tell me about the file systems on that machine, the networks on that machine, start or stop the container. + +So LXD becomes a distributed hypervisor effectively. Very interestingly, last week Microsoft announced that they like REST API. It is very clean, very simple, very well engineered, and they are going to implement the same API for Windows machines. It's completely cross-platform, which means you will be able to talk to any machine—Linux or Windows. So it gives you very clean and simple APIs to talk about containers on any host on the network. + +Of course, we have led the work in [OpenStack to bind LXD to Nova][1], which is the control system to compute in OpenStack, so that's how we create a whole cloud with OpenStack API with the individual VMs being actually containers, so much denser, much faster, much lighter, much cheaper. + +### Open Source is becoming a norm in the enterprise segment. What do you think is driving the adoption of open source in the enterprise? ### + +**Mark**: The reason why open source has become so popular in the enterprise is because it enables them to go faster. We are all competing at some level, and if you can't make progress because you have to call up some vendor, you can't dig in and help yourself go faster, then you feel frustrated. And given the choice between frustration and at least the ability to dig into a problem, enterprises over time will always choose to give themselves the ability to dig in and help themselves. So that is why open source is phenomenal. + +I think it goes a bit deeper than that. I think people have started to realize as much as we compete, 99% of what we need to do is shared, and there is something meaningful about contributing to something that is shared. As I have seen Ubuntu go from something that developers love, to something that CIOs love that developers love Ubuntu. As that happens, it's not a one-way ticket. They often want to say how can we help contribute to make this whole thing go faster. + +We have always seen a curve of complexity, and open source has traditionally been higher up on the curve of complexity and therefore considered threatening or difficult or too uncertain for people who are not comfortable with the complexity. What's wonderful to me is that many open source projects have identified that as a blocker for their own future. So in Ubuntu we have made user experience, design and “making it easy” a first-class goal. We have done the same for OpenStack. With Ubuntu tools for OpenStack anybody can build an OpenStack cloud in an hour, and if you want, that cloud can run itself, scale itself, manage itself, can deal with failures. It becomes something you can just fire up and forget, which also makes it really cheap. It also makes it something that's not a distraction, and so by making open source easier and easier, we are broadening its appeal to consumers and into the enterprise and potentially into the government. + +### How open are governments to open source? Can you tell us about the utilization of open source by governments, especially in the U.S.? ### + +**Mark**: I don't track the usage in government, but part of government utilization in the modern era is the realization that how untrustworthy other governments might be. There is a desire for people to be able to say, “Look, I want to review or check and potentially self-build all the things that I depend on.” That's a really important mission. At the end of the day, some people see this as a game where maybe they can get something out of the other guy. I see it as a game where we can make a level playing field, where everybody gets to compete. I have a very strong interest in making sure that Ubuntu is trustworthy, which means the way we build it, the way we run it, the governance around it is such that people can have confidence in it as an independent thing. + +### You are quite vocal about freedom, privacy and other social issues on Google+. How do you see yourself, your company and Ubuntu playing a role in making the world a better place? ### + +**Mark**: The most important thing for us to do is to build confidence in trusted platforms, platforms that are freely available but also trustworthy. At any given time, there will always be people who can make arguments about why they should have access to something. But we know from history that at the end of the day, due process of law, justice, doesn't depend on the abuse of privacy, abuse of infrastructure, the abuse of data. So I am very strongly of the view that in the fullness of time, all of the different major actors will come to the view that their primary interest is in having something that is conceptually trustworthy. This isn't about what America can steal from Germany or what China can learn in Russia. This is about saying we’re all going to be able to trust our infrastructure; that's a generational journey. But I believe Ubuntu can be right at the center of people's thinking about that. + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/2973116/linux/linuxcon-exclusive-mark-shuttleworth-says-snappy-was-born-long-before-coreos-and-the-atomic-project.html + +作者:[Swapnil Bhartiya][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.itworld.com/author/Swapnil-Bhartiya/ +[1]:https://wiki.openstack.org/wiki/HypervisorSupportMatrix \ No newline at end of file diff --git a/sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md b/sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md new file mode 100644 index 0000000000..6815fa64d8 --- /dev/null +++ b/sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md @@ -0,0 +1,186 @@ +Mhddfs – Combine Several Smaller Partition into One Large Virtual Storage +================================================================================ +Let’s assume that you have 30GB of movies and you have 3 drives each 20 GB in size. So how will you store? + +Obviously you can split your videos in two or three different volumes and store them on the drive manually. This certainly is not a good idea, it is an exhaustive work which requires manual intervention and a lots of your time. + +Another solution is to create a [RAID array of disk][1]. The RAID has always remained notorious for loss of storage reliability and usable disk space. Another solution is mhddfs. + +![Combine Multiple Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Combine-Multiple-Partitions-in-Linux.png) + +Mhddfs – Combine Multiple Partitions in Linux + +mhddfs is a driver for Linux that combines several mount points into one virtual disk. It is a fuse based driver, which provides a easy solution for large data storage. It combines all small file systems to create a single big virtual filesystem which contains every particle of its member filesystem including files and free spaces. + +#### Why you need Mhddfs? #### + +All your storage devices creates a single virtual pool and it can be mounted right at the boot. This small utility takes care of, which drive is full and which is empty and to write data to what drive, intelligently. Once you create virtual drives successfully, you can share your virtual filesystem using [SAMBA][2]. Your client will always see a huge drive and lots of free space. + +#### Features of Mhddfs #### + +- Get attributes of the file system and system information. +- Set attributes of the file system. +- Create, Read, Remove and write Directories and files. +- Support for file locks and Hardlinks on single device. + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Pros of mhddfsCons of mhddfs
 Perfect for home users.mhddfs driver is not built in the Linux Kernel
 Simple to run. Required lots of processing power during runtime
 No evidence of Data loss No redundancy solution.
 Do not split the file. Hardlinks moving not supported
 Add new files to the combined virtual filesystem. 
 Manage the location where these files are saved. 
  Extended file attributes 
+ +### Installation of Mhddfs in Linux ### + +On Debian and portable to alike systems, you can install mhddfs package using following command. + + # apt-get update && apt-get install mhddfs + +![Install Mhddfs on Debian based Systems](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Mhddfs-on-Ubuntu.png) + +Install Mhddfs on Debian based Systems + +On RHEL/CentOS Linux systems, you need to turn on [epel-repository][3] and then execute the below command to install mhddfs package. + + # yum install mhddfs + +On Fedora 22+ systems, you may get it by dnf package manger as shown below. + + # dnf install mhddfs + +![Install Mhddfs on Fedora](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Mhddfs-on-Fedora.png) + +Install Mhddfs on Fedora + +If incase, mhddfs package isn’t available from epel repository, then you need to resolve following dependencies to install and compile it from source as shown below. + +- FUSE header files +- GCC +- libc6 header files +- uthash header files +- libattr1 header files (optional) + +Next, download the latest source package simply as suggested below and compile it. + + # wget http://mhddfs.uvw.ru/downloads/mhddfs_0.1.39.tar.gz + # tar -zxvf mhddfs*.tar.gz + # cd mhddfs-0.1.39/ + # make + +You should be able to see binary mhddfs in the current directory. Move it to /usr/bin/ and /usr/local/bin/ as root. + + # cp mhddfs /usr/bin/ + # cp mhddfs /usr/local/bin/ + +All set, mhddfs is ready to be used. + +### How do I use Mhddfs? ### + +1. Lets see all the HDD mounted to my system currently. + + $ df -h + +![Check Mounted Devices](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Mounted-Devices.gif) + +**Sample Output** + + Filesystem Size Used Avail Use% Mounted on + + /dev/sda1 511M 132K 511M 1% /boot/efi + /dev/sda2 451G 92G 336G 22% / + /dev/sdb1 1.9T 161G 1.7T 9% /media/avi/BD9B-5FCE + /dev/sdc1 555M 555M 0 100% /media/avi/Debian 8.1.0 M-A 1 + +Notice the ‘Mount Point‘ name here, which we will be using later. + +2. Create a directory `/mnt/virtual_hdd` where all these all file system will be grouped together as, + + # mkdir /mnt/virtual_hdd + +3. And then mount all the file-systems. Either as root or as a user who is a member of FUSE group. + + # mhddfs /boot/efi, /, /media/avi/BD9B-5FCE/, /media/avi/Debian\ 8.1.0\ M-A\ 1/ /mnt/virtual_hdd -o allow_other + +![Mount All File System in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Mount-All-File-System-in-Linux.png) + +Mount All File System in Linux + +**Note**: We are used mount Point names here of all the HDDs. Obviously the mount point in your case will be different. Also notice “-o allow_other” option makes this Virtual file system visible to all others and not only the person who created it. + +4. Now run “df -h” see all the filesystems. It should contain the one you created just now. + + $ df -h + +![Verify Virtual File System Mount](http://www.tecmint.com/wp-content/uploads/2015/08/Verify-Virtual-File-System.png) + +Verify Virtual File System Mount + +You can perform all the option to the Virtual File System you created as you would have done to a Mounted Drive. + +5. To create this Virtual File system on every system boot, you should add the below line of code (in your case it should be different, depending upon your mount point), at the end of /etc/fstab file as root. + + mhddfs# /boot/efi, /, /media/avi/BD9B-5FCE/, /media/avi/Debian\ 8.1.0\ M-A\ 1/ /mnt/virtual_hdd fuse defaults,allow_other 0 0 + +6. If at any point of time you want to add/remove a new drive to Virtual_hdd, you may mount a new drive, copy the contents of mount point /mnt/virtual_hdd, un-mount the volume, Eject the Drive you want to remove and/or mount the new drive you want to include, Mount the overall filesystem under Virtual_hdd using mhddfs command and you should be done. + +#### How do I Un-Mount Virtual_hdd? #### + +Unmounting virtual_hdd is as easy as, + + # umount /mnt/virtual_hdd + +![Unmount Virtual Filesystem](http://www.tecmint.com/wp-content/uploads/2015/08/Unmount-Virtual-Filesystem.png) + +Unmount Virtual Filesystem + +Notice it is umount and not unmount. A lot of user type it wrong. + +That’s all for now. I am working on another post you people will love to read. Till then stay tuned and connected to Tecmint. Provide us with your valuable feedback in the comments below. Like and share us and help us get spread. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/combine-partitions-into-one-in-linux-using-mhddfs/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/mount-filesystem-in-linux/ +[3]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ \ No newline at end of file From 401102481e8c4ae48d054704c1e1e8d32e3bd3d9 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 24 Aug 2015 17:35:32 +0800 Subject: [PATCH 1834/2517] PUB:Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @strugglingyouth 有些地方原文有误,应根据理解修正。 --- ... RAID, Concepts of RAID and RAID Levels.md | 156 ++++++++++++++++++ ... RAID, Concepts of RAID and RAID Levels.md | 146 ---------------- 2 files changed, 156 insertions(+), 146 deletions(-) create mode 100644 published/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md delete mode 100644 translated/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md diff --git a/published/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md b/published/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md new file mode 100644 index 0000000000..d54e794459 --- /dev/null +++ b/published/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md @@ -0,0 +1,156 @@ +在 Linux 下使用 RAID(一):介绍 RAID 的级别和概念 +================================================================================ + +RAID 的意思是廉价磁盘冗余阵列(Redundant Array of Inexpensive Disks),但现在它被称为独立磁盘冗余阵列(Redundant Array of Independent Drives)。早先一个容量很小的磁盘都是非常昂贵的,但是现在我们可以很便宜的买到一个更大的磁盘。Raid 是一系列放在一起,成为一个逻辑卷的磁盘集合。 + +![RAID in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/RAID.jpg) + +*在 Linux 中理解 RAID 设置* + +RAID 包含一组或者一个集合甚至一个阵列。使用一组磁盘结合驱动器组成 RAID 阵列或 RAID 集。将至少两个磁盘连接到一个 RAID 控制器,而成为一个逻辑卷,也可以将多个驱动器放在一个组中。一组磁盘只能使用一个 RAID 级别。使用 RAID 可以提高服务器的性能。不同 RAID 的级别,性能会有所不同。它通过容错和高可用性来保存我们的数据。 + +这个系列被命名为“在 Linux 下使用 RAID”,分为9个部分,包括以下主题: + +- 第1部分:介绍 RAID 的级别和概念 +- 第2部分:在Linux中如何设置 RAID0(条带化) +- 第3部分:在Linux中如何设置 RAID1(镜像化) +- 第4部分:在Linux中如何设置 RAID5(条带化与分布式奇偶校验) +- 第5部分:在Linux中如何设置 RAID6(条带双分布式奇偶校验) +- 第6部分:在Linux中设置 RAID 10 或1 + 0(嵌套) +- 第7部分:增加现有的 RAID 阵列并删除损坏的磁盘 +- 第8部分:在 RAID 中恢复(重建)损坏的驱动器 +- 第9部分:在 Linux 中管理 RAID + +这是9篇系列教程的第1部分,在这里我们将介绍 RAID 的概念和 RAID 级别,这是在 Linux 中构建 RAID 需要理解的。 + +### 软件 RAID 和硬件 RAID ### + +软件 RAID 的性能较低,因为其使用主机的资源。 需要加载 RAID 软件以从软件 RAID 卷中读取数据。在加载 RAID 软件前,操作系统需要引导起来才能加载 RAID 软件。在软件 RAID 中无需物理硬件。零成本投资。 + +硬件 RAID 的性能较高。他们采用 PCI Express 卡物理地提供有专用的 RAID 控制器。它不会使用主机资源。他们有 NVRAM 用于缓存的读取和写入。缓存用于 RAID 重建时,即使出现电源故障,它会使用后备的电池电源保持缓存。对于大规模使用是非常昂贵的投资。 + +硬件 RAID 卡如下所示: + +![Hardware RAID](http://www.tecmint.com/wp-content/uploads/2014/10/Hardware-RAID.jpg) + +*硬件 RAID* + +#### 重要的 RAID 概念 #### + +- **校验**方式用在 RAID 重建中从校验所保存的信息中重新生成丢失的内容。 RAID 5,RAID 6 基于校验。 +- **条带化**是将切片数据随机存储到多个磁盘。它不会在单个磁盘中保存完整的数据。如果我们使用2个磁盘,则每个磁盘存储我们的一半数据。 +- **镜像**被用于 RAID 1 和 RAID 10。镜像会自动备份数据。在 RAID 1 中,它会保存相同的内容到其他盘上。 +- **热备份**只是我们的服务器上的一个备用驱动器,它可以自动更换发生故障的驱动器。在我们的阵列中,如果任何一个驱动器损坏,热备份驱动器会自动用于重建 RAID。 +- **块**是 RAID 控制器每次读写数据时的最小单位,最小 4KB。通过定义块大小,我们可以增加 I/O 性能。 + +RAID有不同的级别。在这里,我们仅列出在真实环境下的使用最多的 RAID 级别。 + +- RAID0 = 条带化 +- RAID1 = 镜像 +- RAID5 = 单磁盘分布式奇偶校验 +- RAID6 = 双磁盘分布式奇偶校验 +- RAID10 = 镜像 + 条带。(嵌套RAID) + +RAID 在大多数 Linux 发行版上使用名为 mdadm 的软件包进行管理。让我们先对每个 RAID 级别认识一下。 + +#### RAID 0 / 条带化 #### + +![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/9b/RAID_0.svg/150px-RAID_0.svg.png) + +条带化有很好的性能。在 RAID 0(条带化)中数据将使用切片的方式被写入到磁盘。一半的内容放在一个磁盘上,另一半内容将被写入到另一个磁盘。 + +假设我们有2个磁盘驱动器,例如,如果我们将数据“TECMINT”写到逻辑卷中,“T”将被保存在第一盘中,“E”将保存在第二盘,'C'将被保存在第一盘,“M”将保存在第二盘,它会一直继续此循环过程。(LCTT 译注:实际上不可能按字节切片,是按数据块切片的。) + +在这种情况下,如果驱动器中的任何一个发生故障,我们就会丢失数据,因为一个盘中只有一半的数据,不能用于重建 RAID。不过,当比较写入速度和性能时,RAID 0 是非常好的。创建 RAID 0(条带化)至少需要2个磁盘。如果你的数据是非常宝贵的,那么不要使用此 RAID 级别。 + +- 高性能。 +- RAID 0 中容量零损失。 +- 零容错。 +- 写和读有很高的性能。 + +#### RAID 1 / 镜像化 #### + +![](https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/RAID_1.svg/150px-RAID_1.svg.png) + +镜像也有不错的性能。镜像可以对我们的数据做一份相同的副本。假设我们有两个2TB的硬盘驱动器,我们总共有4TB,但在镜像中,但是放在 RAID 控制器后面的驱动器形成了一个逻辑驱动器,我们只能看到这个逻辑驱动器有2TB。 + +当我们保存数据时,它将同时写入这两个2TB驱动器中。创建 RAID 1(镜像化)最少需要两个驱动器。如果发生磁盘故障,我们可以通过更换一个新的磁盘恢复 RAID 。如果在 RAID 1 中任何一个磁盘发生故障,我们可以从另一个磁盘中获取相同的数据,因为另外的磁盘中也有相同的数据。所以是零数据丢失。 + +- 良好的性能。 +- 总容量丢失一半可用空间。 +- 完全容错。 +- 重建会更快。 +- 写性能变慢。 +- 读性能变好。 +- 能用于操作系统和小规模的数据库。 + +#### RAID 5 / 分布式奇偶校验 #### + +![](https://upload.wikimedia.org/wikipedia/commons/thumb/6/64/RAID_5.svg/300px-RAID_5.svg.png) + +RAID 5 多用于企业级。 RAID 5 的以分布式奇偶校验的方式工作。奇偶校验信息将被用于重建数据。它从剩下的正常驱动器上的信息来重建。在驱动器发生故障时,这可以保护我们的数据。 + +假设我们有4个驱动器,如果一个驱动器发生故障而后我们更换发生故障的驱动器后,我们可以从奇偶校验中重建数据到更换的驱动器上。奇偶校验信息存储在所有的4个驱动器上,如果我们有4个 1TB 的驱动器。奇偶校验信息将被存储在每个驱动器的256G中,而其它768GB是用户自己使用的。单个驱动器故障后,RAID 5 依旧正常工作,如果驱动器损坏个数超过1个会导致数据的丢失。 + +- 性能卓越 +- 读速度将非常好。 +- 写速度处于平均水准,如果我们不使用硬件 RAID 控制器,写速度缓慢。 +- 从所有驱动器的奇偶校验信息中重建。 +- 完全容错。 +- 1个磁盘空间将用于奇偶校验。 +- 可以被用在文件服务器,Web服务器,非常重要的备份中。 + +#### RAID 6 双分布式奇偶校验磁盘 #### + +![](https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/RAID_6.svg/300px-RAID_6.svg.png) + +RAID 6 和 RAID 5 相似但它有两个分布式奇偶校验。大多用在大数量的阵列中。我们最少需要4个驱动器,即使有2个驱动器发生故障,我们依然可以更换新的驱动器后重建数据。 + +它比 RAID 5 慢,因为它将数据同时写到4个驱动器上。当我们使用硬件 RAID 控制器时速度就处于平均水准。如果我们有6个的1TB驱动器,4个驱动器将用于数据保存,2个驱动器将用于校验。 + +- 性能不佳。 +- 读的性能很好。 +- 如果我们不使用硬件 RAID 控制器写的性能会很差。 +- 从两个奇偶校验驱动器上重建。 +- 完全容错。 +- 2个磁盘空间将用于奇偶校验。 +- 可用于大型阵列。 +- 用于备份和视频流中,用于大规模。 + +#### RAID 10 / 镜像+条带 #### + +![](https://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/RAID_10_01.svg/300px-RAID_10_01.svg.png) + +![](https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/RAID_01.svg/300px-RAID_01.svg.png) + +RAID 10 可以被称为1 + 0或0 +1。它将做镜像+条带两个工作。在 RAID 10 中首先做镜像然后做条带。在 RAID 01 上首先做条带,然后做镜像。RAID 10 比 01 好。 + +假设,我们有4个驱动器。当我逻辑卷上写数据时,它会使用镜像和条带的方式将数据保存到4个驱动器上。 + +如果我在 RAID 10 上写入数据“TECMINT”,数据将使用如下方式保存。首先将“T”同时写入两个磁盘,“E”也将同时写入另外两个磁盘,所有数据都写入两块磁盘。这样可以将每个数据复制到另外的磁盘。 + +同时它将使用 RAID 0 方式写入数据,遵循将“T”写入第一组盘,“E”写入第二组盘。再次将“C”写入第一组盘,“M”到第二组盘。 + +- 良好的读写性能。 +- 总容量丢失一半的可用空间。 +- 容错。 +- 从副本数据中快速重建。 +- 由于其高性能和高可用性,常被用于数据库的存储中。 + +### 结论 ### + +在这篇文章中,我们已经了解了什么是 RAID 和在实际环境大多采用哪个级别的 RAID。希望你已经学会了上面所写的。对于 RAID 的构建必须了解有关 RAID 的基本知识。以上内容可以基本满足你对 RAID 的了解。 + +在接下来的文章中,我将介绍如何设置和使用各种级别创建 RAID,增加 RAID 组(阵列)和驱动器故障排除等。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/understanding-raid-setup-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ diff --git a/translated/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md b/translated/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md deleted file mode 100644 index 8ca0ecbd7e..0000000000 --- a/translated/tech/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md +++ /dev/null @@ -1,146 +0,0 @@ - -RAID的级别和概念的介绍 - 第1部分 -================================================================================ -RAID是廉价磁盘冗余阵列,但现在它被称为独立磁盘冗余阵列。早先一个容量很小的磁盘都是非常昂贵的,但是现在我们可以很便宜的买到一个更大的磁盘。Raid 是磁盘的一个集合,被称为逻辑卷。 - - -![RAID in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/RAID.jpg) - -在 Linux 中理解 RAID 的设置 - -RAID包含一组或者一个集合甚至一个阵列。使用一组磁盘结合驱动器组成 RAID 阵列或 RAID 集。一个 RAID 控制器至少使用两个磁盘并且使用一个逻辑卷或者多个驱动器在一个组中。在一个磁盘组的应用中只能使用一个 RAID 级别。使用 RAID 可以提高服务器的性能。不同 RAID 的级别,性能会有所不同。它通过容错和高可用性来保存我们的数据。 - -这个系列被命名为RAID的构建共包含9个部分包括以下主题。 - -- 第1部分:RAID的级别和概念的介绍 -- 第2部分:在Linux中如何设置 RAID0(条带化) -- 第3部分:在Linux中如何设置 RAID1(镜像化) -- 第4部分:在Linux中如何设置 RAID5(条带化与分布式奇偶校验) -- 第5部分:在Linux中如何设置 RAID6(条带双分布式奇偶校验) -- 第6部分:在Linux中设置 RAID 10 或1 + 0(嵌套) -- 第7部分:增加现有的 RAID 阵列并删除损坏的磁盘 -- 第8部分:在 RAID 中恢复(重建)损坏的驱动器 -- 第9部分:在 Linux 中管理 RAID - -这是9系列教程的第1部分,在这里我们将介绍 RAID 的概念和 RAID 级别,这是在 Linux 中构建 RAID 需要理解的。 - - -### 软件RAID和硬件RAID ### - -软件 RAID 的性能很低,因为其从主机资源消耗。 RAID 软件需要加载可读取数据从软件 RAID 卷中。在加载 RAID 软件前,操作系统需要得到加载 RAID 软件的引导。在软件 RAID 中无需物理硬件。零成本投资。 - -硬件 RAID 具有很高的性能。他们有专用的 RAID 控制器,采用 PCI Express卡物理内置的。它不会使用主机资源。他们有 NVRAM 缓存读取和写入。当重建时即使出现电源故障,它会使用电池电源备份存储缓存。对于大规模使用需要非常昂贵的投资。 - -硬件 RAID 卡如下所示: - -![Hardware RAID](http://www.tecmint.com/wp-content/uploads/2014/10/Hardware-RAID.jpg) - -硬件RAID - -#### 精选的 RAID 概念 #### - -- 在 RAID 重建中校验方法中丢失的内容来自从校验中保存的信息。 RAID 5,RAID 6 基于校验。 -- 条带化是随机共享数据到多个磁盘。它不会在单个磁盘中保存完整的数据。如果我们使用3个磁盘,则数据将会存在于每个磁盘上。 -- 镜像被用于 RAID 1 和 RAID 10。镜像会自动备份数据。在 RAID 1,它将保存相同的内容到其他盘上。 -- 在我们的服务器上,热备份只是一个备用驱动器,它可以自动更换发生故障的驱动器。在我们的阵列中,如果任何一个驱动器损坏,热备份驱动器会自动重建。 -- 块是 RAID 控制器每次读写数据时的最小单位,最小4KB。通过定义块大小,我们可以增加 I/O 性能。 - -RAID有不同的级别。在这里,我们仅看到在真实环境下的使用最多的 RAID 级别。 - -- RAID0 = 条带化 -- RAID1 = 镜像 -- RAID5 = 单个磁盘分布式奇偶校验 -- RAID6 = 双盘分布式奇偶校验 -- RAID10 = 镜像 + 条带。(嵌套RAID) - -RAID 在大多数 Linux 发行版上使用 mdadm 的包管理。让我们先对每个 RAID 级别认识一下。 - -#### RAID 0(或)条带化 #### - -条带化有很好的性能。在 RAID 0(条带化)中数据将使用共享的方式被写入到磁盘。一半的内容将是在一个磁盘上,另一半内容将被写入到其它磁盘。 - -假设我们有2个磁盘驱动器,例如,如果我们将数据“TECMINT”写到逻辑卷中,“T”将被保存在第一盘中,“E”将保存在第二盘,'C'将被保存在第一盘,“M”将保存在第二盘,它会一直继续此循环过程。 - -在这种情况下,如果驱动器中的任何一个发生故障,我们将丢失所有的数据,因为一个盘中只有一半的数据,不能用于重建。不过,当比较写入速度和性能时,RAID0 是非常好的。创建 RAID 0(条带化)至少需要2个磁盘。如果你的数据是非常宝贵的,那么不要使用此 RAID 级别。 - -- 高性能。 -- 在 RAID0 上零容量损失。 -- 零容错。 -- 写和读有很高的性能。 - -#### RAID1(或)镜像化 #### - -镜像也有不错的性能。镜像可以备份我们的数据。假设我们有两组2TB的硬盘驱动器,我们总共有4TB,但在镜像中,驱动器在 RAID 控制器的后面形成一个逻辑驱动器,我们只能看到逻辑驱动器有2TB。 - -当我们保存数据时,它将同时写入2TB驱动器中。创建 RAID 1 (镜像化)最少需要两个驱动器。如果发生磁盘故障,我们可以恢复 RAID 通过更换一个新的磁盘。如果在 RAID 1 中任何一个磁盘发生故障,我们可以从另一个磁盘中获取相同的数据,因为其他的磁盘中也有相同的数据。所以是零数据丢失。 - -- 良好的性能。 -- 空间的一半将在总容量丢失。 -- 完全容错。 -- 重建会更快。 -- 写性能将是缓慢的。 -- 读将会很好。 -- 被操作系统和数据库使用的规模很小。 - -#### RAID 5(或)分布式奇偶校验 #### - -RAID 5 多用于企业的水平。 RAID 5 的工作通过分布式奇偶校验的方法。奇偶校验信息将被用于重建数据。它需要留下的正常驱动器上的信息去重建。驱动器故障时,这会保护我们的数据。 - -假设我们有4个驱动器,如果一个驱动器发生故障而后我们更换发生故障的驱动器后,我们可以从奇偶校验中重建数据到更换的驱动器上。奇偶校验信息存储在所有的4个驱动器上,如果我们有4个 1TB 的驱动器。奇偶校验信息将被存储在每个驱动器的256G中而其它768GB是用户自己使用的。单个驱动器故障后,RAID 5 依旧正常工作,如果驱动器损坏个数超过1个会导致数据的丢失。 - -- 性能卓越 -- 读速度将非常好。 -- 如果我们不使用硬件 RAID 控制器,写速度是缓慢的。 -- 从所有驱动器的奇偶校验信息中重建。 -- 完全容错。 -- 1个磁盘空间将用于奇偶校验。 -- 可以被用在文件服务器,Web服务器,非常重要的备份中。 - -#### RAID 6 两个分布式奇偶校验磁盘 #### - -RAID 6 和 RAID 5 相似但它有两个分布式奇偶校验。大多用在大量的阵列中。我们最少需要4个驱动器,即使有2个驱动器发生故障,我们依然可以重建数据,同时更换新的驱动器。 - -它比 RAID 5 非常慢,因为它将数据同时写到4个驱动器上。当我们使用硬件 RAID 控制器时速度将被平均。如果我们有6个的1TB驱动器,4个驱动器将用于数据保存,2个驱动器将用于校验。 - -- 性能不佳。 -- 读的性能很好。 -- 如果我们不使用硬件 RAID 控制器写的性能会很差。 -- 从2奇偶校验驱动器上重建。 -- 完全容错。 -- 2个磁盘空间将用于奇偶校验。 -- 可用于大型阵列。 -- 在备份和视频流中大规模使用。 - -#### RAID 10(或)镜像+条带 #### - -RAID 10 可以被称为1 + 0或0 +1。它将做镜像+条带两个工作。在 RAID 10 中首先做镜像然后做条带。在 RAID 01 上首先做条带,然后做镜像。RAID 10 比 01 好。 - -假设,我们有4个驱动器。当我写了一些数据到逻辑卷上,它会使用镜像和条带将数据保存到4个驱动器上。 - -如果我在 RAID 10 上写入数据“TECMINT”,数据将使用如下形式保存。首先将“T”同时写入两个磁盘,“E”也将同时写入两个磁盘,这一步将所有数据都写入。这使数据得到备份。 - -同时它将使用 RAID 0 方式写入数据,遵循将“T”写入第一个盘,“E”写入第二个盘。再次将“C”写入第一个盘,“M”到第二个盘。 - -- 良好的读写性能。 -- 空间的一半将在总容量丢失。 -- 容错。 -- 从备份数据中快速重建。 -- 它的高性能和高可用性常被用于数据库的存储中。 - -### 结论 ### - -在这篇文章中,我们已经看到了什么是 RAID 和在实际环境大多采用 RAID 的哪个级别。希望你已经学会了上面所写的。对于 RAID 的构建必须了解有关 RAID 的基本知识。以上内容对于你了解 RAID 基本满足。 - -在接下来的文章中,我将介绍如何设置和使用各种级别创建 RAID,增加 RAID 组(阵列)和驱动器故障排除等。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/understanding-raid-setup-in-linux/ - -作者:[Babin Lonston][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/babinlonston/ From 43ec03e9126a76f442cb07c3a995670b8649d184 Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Mon, 24 Aug 2015 18:00:30 +0800 Subject: [PATCH 1835/2517] =?UTF-8?q?[20150824=20How=20to=20create=20an=20?= =?UTF-8?q?AP=20in=20Ubuntu=2015.04=20to=20connect=20to=20Android=20or=20i?= =?UTF-8?q?Phone]=20=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone --- ...u 15.04 to connect to Android or iPhone.md | 74 ------------------- 1 file changed, 74 deletions(-) delete mode 100644 sources/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md diff --git a/sources/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md b/sources/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md deleted file mode 100644 index a8e21419fb..0000000000 --- a/sources/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md +++ /dev/null @@ -1,74 +0,0 @@ -How to create an AP in Ubuntu 15.04 to connect to Android/iPhone -================================================================================ -I tried creating a wireless access point via Gnome Network Manager in 15.04 and was successful. I’m sharing the steps with our readers. Please note: you must have a wifi card which allows you to create an Access Point. If you want to know how to find that, type iw list in a terminal. - -If you don’t have iw installed, you can install iw in Ubuntu using the command sudo apt-get install iw. - -After you type iw list, look for supported interface section, where it should be a entry called AP like the one shown below: - -Supported interface modes: - -* IBSS -* managed -* AP -* AP/VLAN -* monitor -* mesh point - -Let’s see the steps in detail - -1. Disconnect WIFI. Get a an internet cable and plug into your laptop so that you are connected to a wired internet connection -1. Go to Network Icon on the top panel -> Edit Connections then click the Add button in the pop-up window -1. Choose Wi-Fi from the drop-down menu -1. Next, - -a. Type in a connection name e.g. Hotspot - -b. Type in a SSID e.g. Hotspot - -c. Select mode: Infrastructure - -d. Device MAC address: select your wireless card from drop-down menu - -![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome1.jpg) - -1. Go to Wi-Fi Security tab, select security type WPA & WPA2 Personal and set a password -1. Go to IPv4 Settings tab, from Method drop-down box, select Shared to other computers - -![](http://i1.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome4.jpg) - -1. Go to IPv6 tab and set Method to ignore (do this only if you do not use IPv6) -1. Hit the “Save” button to save the configuration -1. Open a terminal from the menu/dash -1. Now, edit the connection with you just created via network settings - -VIM editor: - - sudo vim /etc/NetworkManager/system-connections/Hotspot - -Gedit: - - gksu gedit /etc/NetworkManager/system-connections/Hotspot - -Replace name Hotspot with the connection name you have given in step 4 - -![](http://i2.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome2.jpg?resize=640%2C402) - -1. Change the line mode=infrastructure to mode=ap and save the file -1. Once you save the file, you should be able to see the wifi named Hotspot showing up in the list of available wifi networks. (If the network does not show, disable and enable wifi ) - -![](http://i1.wp.com/www.linuxveda.com/wp-content/uploads/2015/08/ubuntu-ap-gnome3.jpg?resize=290%2C375) - -1. You can now connect your Android phone. Connection tested using Xioami Mi4i running Android 5.0 (Downloaded 1GB to test speed and reliability) - --------------------------------------------------------------------------------- - -via: http://www.linuxveda.com/2015/08/23/how-to-create-an-ap-in-ubuntu-15-04-to-connect-to-androidiphone/ - -作者:[Sayantan Das][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxveda.com/author/sayantan_das/ \ No newline at end of file From 34c8df979a55aa0507c226d1bfcfc7efe1f5a8d5 Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Mon, 24 Aug 2015 19:22:45 +0800 Subject: [PATCH 1836/2517] =?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 --- ...u 15.04 to connect to Android or iPhone.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 translated/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md 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 new file mode 100644 index 0000000000..02aef62d82 --- /dev/null +++ b/translated/tech/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md @@ -0,0 +1,74 @@ +如何在 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 8168cc7b2e85e9b26839ab33c45ac7a3bca579be Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 24 Aug 2015 22:13:59 +0800 Subject: [PATCH 1837/2517] Delete Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md --- ...ith Double Distributed Parity) in Linux.md | 321 ------------------ 1 file changed, 321 deletions(-) delete mode 100644 sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md diff --git a/sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md b/sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md deleted file mode 100644 index ea1d5993c0..0000000000 --- a/sources/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md +++ /dev/null @@ -1,321 +0,0 @@ -struggling 翻译中 -Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux – Part 5 -================================================================================ -RAID 6 is upgraded version of RAID 5, where it has two distributed parity which provides fault tolerance even after two drives fails. Mission critical system still operational incase of two concurrent disks failures. It’s alike RAID 5, but provides more robust, because it uses one more disk for parity. - -In our earlier article, we’ve seen distributed parity in RAID 5, but in this article we will going to see RAID 6 with double distributed parity. Don’t expect extra performance than any other RAID, if so we have to install a dedicated RAID Controller too. Here in RAID 6 even if we loose our 2 disks we can get the data back by replacing a spare drive and build it from parity. - -![Setup RAID 6 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/Setup-RAID-6-in-Linux.jpg) - -Setup RAID 6 in Linux - -To setup a RAID 6, minimum 4 numbers of disks or more in a set are required. RAID 6 have multiple disks even in some set it may be have some bunch of disks, while reading, it will read from all the drives, so reading would be faster whereas writing would be poor because it has to stripe over multiple disks. - -Now, many of us comes to conclusion, why we need to use RAID 6, when it doesn’t perform like any other RAID. Hmm… those who raise this question need to know that, if they need high fault tolerance choose RAID 6. In every higher environments with high availability for database, they use RAID 6 because database is the most important and need to be safe in any cost, also it can be useful for video streaming environments. - -#### Pros and Cons of RAID 6 #### - -- Performance are good. -- RAID 6 is expensive, as it requires two independent drives are used for parity functions. -- Will loose a two disks capacity for using parity information (double parity). -- No data loss, even after two disk fails. We can rebuilt from parity after replacing the failed disk. -- Reading will be better than RAID 5, because it reads from multiple disk, But writing performance will be very poor without dedicated RAID Controller. - -#### Requirements #### - -Minimum 4 numbers of disks are required to create a RAID 6. If you want to add more disks, you can, but you must have dedicated raid controller. In software RAID, we will won’t get better performance in RAID 6. So we need a physical RAID controller. - -Those who are new to RAID setup, we recommend to go through RAID articles below. - -- [Basic Concepts of RAID in Linux – Part 1][1] -- [Creating Software RAID 0 (Stripe) in Linux – Part 2][2] -- [Setting up RAID 1 (Mirroring) in Linux – Part 3][3] - -#### My Server Setup #### - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.228 - Hostname : rd6.tecmintlocal.com - Disk 1 [20GB] : /dev/sdb - Disk 2 [20GB] : /dev/sdc - Disk 3 [20GB] : /dev/sdd - Disk 4 [20GB] : /dev/sde - -This article is a Part 5 of a 9-tutorial RAID series, here we are going to see how we can create and setup Software RAID 6 or Striping with Double Distributed Parity in Linux systems or servers using four 20GB disks named /dev/sdb, /dev/sdc, /dev/sdd and /dev/sde. - -### Step 1: Installing mdadm Tool and Examine Drives ### - -1. If you’re following our last two Raid articles (Part 2 and Part 3), where we’ve already shown how to install ‘mdadm‘ tool. If you’re new to this article, let me explain that ‘mdadm‘ is a tool to create and manage Raid in Linux systems, let’s install the tool using following command according to your Linux distribution. - - # yum install mdadm [on RedHat systems] - # apt-get install mdadm [on Debain systems] - -2. After installing the tool, now it’s time to verify the attached four drives that we are going to use for raid creation using the following ‘fdisk‘ command. - - # fdisk -l | grep sd - -![Check Hard Disk in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Linux-Disks.png) - -Check Disks in Linux - -3. Before creating a RAID drives, always examine our disk drives whether there is any RAID is already created on the disks. - - # mdadm -E /dev/sd[b-e] - # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde - -![Check Raid on Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Disk-Raid.png) - -Check Raid on Disk - -**Note**: In the above image depicts that there is no any super-block detected or no RAID is defined in four disk drives. We may move further to start creating RAID 6. - -### Step 2: Drive Partitioning for RAID 6 ### - -4. Now create partitions for raid on ‘/dev/sdb‘, ‘/dev/sdc‘, ‘/dev/sdd‘ and ‘/dev/sde‘ with the help of following fdisk command. Here, we will show how to create partition on sdb drive and later same steps to be followed for rest of the drives. - -**Create /dev/sdb Partition** - - # fdisk /dev/sdb - -Please follow the instructions as shown below for creating partition. - -- Press ‘n‘ for creating new partition. -- Then choose ‘P‘ for Primary partition. -- Next choose the partition number as 1. -- Define the default value by just pressing two times Enter key. -- Next press ‘P‘ to print the defined partition. -- Press ‘L‘ to list all available types. -- Type ‘t‘ to choose the partitions. -- Choose ‘fd‘ for Linux raid auto and press Enter to apply. -- Then again use ‘P‘ to print the changes what we have made. -- Use ‘w‘ to write the changes. - -![Create sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdb-Partition.png) - -Create /dev/sdb Partition - -**Create /dev/sdb Partition** - - # fdisk /dev/sdc - -![Create sdc Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdc-Partition.png) - -Create /dev/sdc Partition - -**Create /dev/sdd Partition** - - # fdisk /dev/sdd - -![Create sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdd-Partition.png) - -Create /dev/sdd Partition - -**Create /dev/sde Partition** - - # fdisk /dev/sde - -![Create sde Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sde-Partition.png) - -Create /dev/sde Partition - -5. After creating partitions, it’s always good habit to examine the drives for super-blocks. If super-blocks does not exist than we can go head to create a new RAID setup. - - # mdadm -E /dev/sd[b-e]1 - - - or - - # mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 - -![Check Raid on New Partitions](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-New-Partitions.png) - -Check Raid on New Partitions - -### Step 3: Creating md device (RAID) ### - -6. Now it’s time to create Raid device ‘md0‘ (i.e. /dev/md0) and apply raid level on all newly created partitions and confirm the raid using following commands. - - # mdadm --create /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 - # cat /proc/mdstat - -![Create Raid 6 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Create-Raid-6-Device.png) - -Create Raid 6 Device - -7. You can also check the current process of raid using watch command as shown in the screen grab below. - - # watch -n1 cat /proc/mdstat - -![Check Raid 6 Process](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Process.png) - -Check Raid 6 Process - -8. Verify the raid devices using the following command. - -# mdadm -E /dev/sd[b-e]1 - -**Note**:: The above command will be display the information of the four disks, which is quite long so not possible to post the output or screen grab here. - -9. Next, verify the RAID array to confirm that the re-syncing is started. - - # mdadm --detail /dev/md0 - -![Check Raid 6 Array](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Array.png) - -Check Raid 6 Array - -### Step 4: Creating FileSystem on Raid Device ### - -10. Create a filesystem using ext4 for ‘/dev/md0‘ and mount it under /mnt/raid5. Here we’ve used ext4, but you can use any type of filesystem as per your choice. - - # mkfs.ext4 /dev/md0 - -![Create File System on Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Create-File-System-on-Raid.png) - -Create File System on Raid 6 - -11. Mount the created filesystem under /mnt/raid6 and verify the files under mount point, we can see lost+found directory. - - # mkdir /mnt/raid6 - # mount /dev/md0 /mnt/raid6/ - # ls -l /mnt/raid6/ - -12. Create some files under mount point and append some text in any one of the file to verify the content. - - # touch /mnt/raid6/raid6_test.txt - # ls -l /mnt/raid6/ - # echo "tecmint raid setups" > /mnt/raid6/raid6_test.txt - # cat /mnt/raid6/raid6_test.txt - -![Verify Raid Content](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Content.png) - -Verify Raid Content - -13. Add an entry in /etc/fstab to auto mount the device at the system startup and append the below entry, mount point may differ according to your environment. - - # vim /etc/fstab - - /dev/md0 /mnt/raid6 ext4 defaults 0 0 - -![Automount Raid 6 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Automount-Raid-Device.png) - -Automount Raid 6 Device - -14. Next, execute ‘mount -a‘ command to verify whether there is any error in fstab entry. - - # mount -av - -![Verify Raid Automount](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Automount-Raid-Devices.png) - -Verify Raid Automount - -### Step 5: Save RAID 6 Configuration ### - -15. Please note by default RAID don’t have a config file. We have to save it by manually using below command and then verify the status of device ‘/dev/md0‘. - - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - # mdadm --detail /dev/md0 - -![Save Raid 6 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Status.png) - -Save Raid 6 Configuration - -![Check Raid 6 Status](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Status.png) - -Check Raid 6 Status - -### Step 6: Adding a Spare Drives ### - -16. Now it has 4 disks and there are two parity information’s available. In some cases, if any one of the disk fails we can get the data, because there is double parity in RAID 6. - -May be if the second disk fails, we can add a new one before loosing third disk. It is possible to add a spare drive while creating our RAID set, But I have not defined the spare drive while creating our raid set. But, we can add a spare drive after any drive failure or while creating the RAID set. Now we have already created the RAID set now let me add a spare drive for demonstration. - -For the demonstration purpose, I’ve hot-plugged a new HDD disk (i.e. /dev/sdf), let’s verify the attached disk. - - # ls -l /dev/ | grep sd - -![Check New Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-New-Disk.png) - -Check New Disk - -17. Now again confirm the new attached disk for any raid is already configured or not using the same mdadm command. - - # mdadm --examine /dev/sdf - -![Check Raid on New Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-New-Disk.png) - -Check Raid on New Disk - -**Note**: As usual, like we’ve created partitions for four disks earlier, similarly we’ve to create new partition on the new plugged disk using fdisk command. - - # fdisk /dev/sdf - -![Create sdf Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-Partition-on-sdf.png) - -Create /dev/sdf Partition - -18. Again after creating new partition on /dev/sdf, confirm the raid on the partition, include the spare drive to the /dev/md0 raid device and verify the added device. - - # mdadm --examine /dev/sdf - # mdadm --examine /dev/sdf1 - # mdadm --add /dev/md0 /dev/sdf1 - # mdadm --detail /dev/md0 - -![Verify Raid on sdf Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-on-sdf.png) - -Verify Raid on sdf Partition - -![Add sdf Partition to Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Add-sdf-Partition-to-Raid.png) - -Add sdf Partition to Raid - -![Verify sdf Partition Details](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-sdf-Details.png) - -Verify sdf Partition Details - -### Step 7: Check Raid 6 Fault Tolerance ### - -19. Now, let us check whether spare drive works automatically, if anyone of the disk fails in our Array. For testing, I’ve personally marked one of the drive is failed. - -Here, we’re going to mark /dev/sdd1 as failed drive. - - # mdadm --manage --fail /dev/md0 /dev/sdd1 - -![Check Raid 6 Fault Tolerance](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Failover.png) - -Check Raid 6 Fault Tolerance - -20. Let me get the details of RAID set now and check whether our spare started to sync. - - # mdadm --detail /dev/md0 - -![Check Auto Raid Syncing](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Auto-Raid-Syncing.png) - -Check Auto Raid Syncing - -**Hurray!** Here, we can see the spare got activated and started rebuilding process. At the bottom we can see the faulty drive /dev/sdd1 listed as faulty. We can monitor build process using following command. - - # cat /proc/mdstat - -![Raid 6 Auto Syncing](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-6-Auto-Syncing.png) - -Raid 6 Auto Syncing - -### Conclusion: ### - -Here, we have seen how to setup RAID 6 using four disks. This RAID level is one of the expensive setup with high redundancy. We will see how to setup a Nested RAID 10 and much more in the next articles. Till then, stay connected with TECMINT. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-raid-6-in-linux/ - -作者:[Babin Lonston][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/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/create-raid0-in-linux/ -[3]:http://www.tecmint.com/create-raid1-in-linux/ \ No newline at end of file From cb66c17ac5617ef4f84b17efef743bed9fe83369 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 24 Aug 2015 22:15:25 +0800 Subject: [PATCH 1838/2517] Create Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md --- ...ith Double Distributed Parity) in Linux.md | 321 ++++++++++++++++++ 1 file changed, 321 insertions(+) create mode 100644 translated/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md diff --git a/translated/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md b/translated/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md new file mode 100644 index 0000000000..1890a242e2 --- /dev/null +++ b/translated/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md @@ -0,0 +1,321 @@ + +在 Linux 中安装 RAID 6(条带化双分布式奇偶校验) - 第5部分 +================================================================================ +RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两个磁盘发生故障后依然有容错能力。两并列的磁盘发生故障时,系统的关键任务仍然能运行。它与 RAID 5 相似,但性能更健壮,因为它多用了一个磁盘来进行奇偶校验。 + +在之前的文章中,我们已经在 RAID 5 看了分布式奇偶校验,但在本文中,我们将看到的是 RAID 6 双分布式奇偶校验。不要期望比其他 RAID 有额外的性能,我们仍然需要安装一个专用的 RAID 控制器。在 RAID 6 中,即使我们失去了2个磁盘,我们仍可以取回数据通过更换磁盘,然后从校验中构建数据。 + +![Setup RAID 6 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/Setup-RAID-6-in-Linux.jpg) + +在 Linux 中安装 RAID 6 + +要建立一个 RAID 6,一组最少需要4个磁盘。RAID 6 甚至在有些设定中会有多组磁盘,当读取数据时,它会同时从所有磁盘读取,所以读取速度会更快,当写数据时,因为它要将数据写在条带化的多个磁盘上,所以性能会较差。 + +现在,很多人都在讨论为什么我们需要使用 RAID 6,它的性能和其他 RAID 相比并不太好。提出这个问题首先需要知道的是,如果需要高容错的必须选择 RAID 6。在每一个对数据库的高可用性要求较高的环境中,他们需要 RAID 6 因为数据库是最重要,无论花费多少都需要保护其安全,它在视频流环境中也是非常有用的。 + +#### RAID 6 的的优点和缺点 #### + +- 性能很不错。 +- RAID 6 非常昂贵,因为它要求两个独立的磁盘用于奇偶校验功能。 +- 将失去两个磁盘的容量来保存奇偶校验信息(双奇偶校验)。 +- 不存在数据丢失,即时两个磁盘损坏。我们可以在更换损坏的磁盘后从校验中重建数据。 +- 读性能比 RAID 5 更好,因为它从多个磁盘读取,但对于没有专用的 RAID 控制器的设备写性能将非常差。 + +#### 要求 #### + +要创建一个 RAID 6 最少需要4个磁盘.你也可以添加更多的磁盘,但你必须有专用的 RAID 控制器。在软件 RAID 中,我们在 RAID 6 中不会得到更好的性能,所以我们需要一个物理 RAID 控制器。 + +这些是新建一个 RAID 需要的设置,我们建议先看完以下 RAID 文章。 + +- [Linux 中 RAID 的基本概念 – 第一部分][1] +- [在 Linux 上创建软件 RAID 0 (条带化) – 第二部分][2] +- [在 Linux 上创建软件 RAID 1 (镜像) – 第三部分][3] + +#### My Server Setup #### + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.228 + Hostname : rd6.tecmintlocal.com + Disk 1 [20GB] : /dev/sdb + Disk 2 [20GB] : /dev/sdc + Disk 3 [20GB] : /dev/sdd + Disk 4 [20GB] : /dev/sde + +这篇文章是9系列 RAID 教程的第5部分,在这里我们将看到我们如何在 Linux 系统或者服务器上创建和设置软件 RAID 6 或条带化双分布式奇偶校验,使用四个 20GB 的磁盘 /dev/sdb, /dev/sdc, /dev/sdd 和 /dev/sde. + +### 第1步:安装 mdadm 工具,并检查磁盘 ### + +1.如果你按照我们最进的两篇 RAID 文章(第2篇和第3篇),我们已经展示了如何安装‘mdadm‘工具。如果你直接看的这篇文章,我们先来解释下在Linux系统中如何使用‘mdadm‘工具来创建和管理 RAID,首先根据你的 Linux 发行版使用以下命令来安装。 + + # yum install mdadm [on RedHat systems] + # apt-get install mdadm [on Debain systems] + +2.安装该工具后,然后来验证需要的四个磁盘,我们将会使用下面的‘fdisk‘命令来检验用于创建 RAID 的磁盘。 + + # fdisk -l | grep sd + +![Check Hard Disk in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Linux-Disks.png) + +在 Linux 中检查磁盘 + +3.在创建 RAID 磁盘前,先检查下我们的磁盘是否创建过 RAID 分区。 + + # mdadm -E /dev/sd[b-e] + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde + +![Check Raid on Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Disk-Raid.png) + +在磁盘上检查 Raid 分区 + +**注意**: 在上面的图片中,没有检测到任何 super-block 或者说在四个磁盘上没有 RAID 存在。现在我们开始创建 RAID 6。 + +### 第2步:为 RAID 6 创建磁盘分区 ### + +4.现在为 raid 创建分区‘/dev/sdb‘, ‘/dev/sdc‘, ‘/dev/sdd‘ 和 ‘/dev/sde‘使用下面 fdisk 命令。在这里,我们将展示如何创建分区在 sdb 磁盘,同样的步骤也适用于其他分区。 + +**创建 /dev/sdb 分区** + + # fdisk /dev/sdb + +请按照说明进行操作,如下图所示创建分区。 + +- 按 ‘n’ 创建新的分区。 +- 然后按 ‘P’ 选择主分区。 +- 接下来选择分区号为1。 +- 只需按两次回车键选择默认值即可。 +- 然后,按 ‘P’ 来打印创建好的分区。 +- 按 ‘L’,列出所有可用的类型。 +- 按 ‘t’ 去修改分区。 +- 键入 ‘fd’ 设置为 Linux 的 RAID 类型,然后按 Enter 确认。 +- 然后再次使用‘p’查看我们所做的更改。 +- 使用‘w’保存更改。 + +![Create sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdb-Partition.png) + +创建 /dev/sdb 分区 + +**创建 /dev/sdc 分区** + + # fdisk /dev/sdc + +![Create sdc Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdc-Partition.png) + +创建 /dev/sdc 分区 + +**创建 /dev/sdd 分区** + + # fdisk /dev/sdd + +![Create sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdd-Partition.png) + +创建 /dev/sdd 分区 + +**创建 /dev/sde 分区** + + # fdisk /dev/sde + +![Create sde Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sde-Partition.png) + +创建 /dev/sde 分区 + +5.创建好分区后,检查磁盘的 super-blocks 是个好的习惯。如果 super-blocks 不存在我们可以按前面的创建一个新的 RAID。 + + # mdadm -E /dev/sd[b-e]1 + + + 或者 + + # mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 + +![Check Raid on New Partitions](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-New-Partitions.png) + +在新分区中检查 Raid + +### 步骤3:创建 md 设备(RAID) ### + +6,现在是时候来创建 RAID 设备‘md0‘ (即 /dev/md0)并应用 RAID 级别在所有新创建的分区中,确认 raid 使用以下命令。 + + # mdadm --create /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 + # cat /proc/mdstat + +![Create Raid 6 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Create-Raid-6-Device.png) + +创建 Raid 6 设备 + +7.你还可以使用 watch 命令来查看当前 raid 的进程,如下图所示。 + + # watch -n1 cat /proc/mdstat + +![Check Raid 6 Process](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Process.png) + +检查 Raid 6 进程 + +8.使用以下命令验证 RAID 设备。 + +# mdadm -E /dev/sd[b-e]1 + +**注意**::上述命令将显示四个磁盘的信息,这是相当长的,所以没有截取其完整的输出。 + +9.接下来,验证 RAID 阵列,以确认 re-syncing 被启动。 + + # mdadm --detail /dev/md0 + +![Check Raid 6 Array](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Array.png) + +检查 Raid 6 阵列 + +### 第4步:在 RAID 设备上创建文件系统 ### + +10.使用 ext4 为‘/dev/md0‘创建一个文件系统并将它挂载在 /mnt/raid5 。这里我们使用的是 ext4,但你可以根据你的选择使用任意类型的文件系统。 + + # mkfs.ext4 /dev/md0 + +![Create File System on Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Create-File-System-on-Raid.png) + +在 Raid 6 上创建文件系统 + +11.挂载创建的文件系统到 /mnt/raid6,并验证挂载点下的文件,我们可以看到 lost+found 目录。 + + # mkdir /mnt/raid6 + # mount /dev/md0 /mnt/raid6/ + # ls -l /mnt/raid6/ + +12.在挂载点下创建一些文件,在任意文件中添加一些文字并验证其内容。 + + # touch /mnt/raid6/raid6_test.txt + # ls -l /mnt/raid6/ + # echo "tecmint raid setups" > /mnt/raid6/raid6_test.txt + # cat /mnt/raid6/raid6_test.txt + +![Verify Raid Content](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Content.png) + +验证 Raid 内容 + +13.在 /etc/fstab 中添加以下条目使系统启动时自动挂载设备,环境不同挂载点可能会有所不同。 + + # vim /etc/fstab + + /dev/md0 /mnt/raid6 ext4 defaults 0 0 + +![Automount Raid 6 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Automount-Raid-Device.png) + +自动挂载 Raid 6 设备 + +14.接下来,执行‘mount -a‘命令来验证 fstab 中的条目是否有错误。 + + # mount -av + +![Verify Raid Automount](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Automount-Raid-Devices.png) + +验证 Raid 是否自动挂载 + +### 第5步:保存 RAID 6 的配置 ### + +15.请注意默认 RAID 没有配置文件。我们需要使用以下命令手动保存它,然后检查设备‘/dev/md0‘的状态。 + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + # mdadm --detail /dev/md0 + +![Save Raid 6 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Status.png) + +保存 Raid 6 配置 + +![Check Raid 6 Status](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Status.png) + +检查 Raid 6 状态 + +### 第6步:添加备用磁盘 ### + +16.现在,它使用了4个磁盘,并且有两个作为奇偶校验信息来使用。在某些情况下,如果任意一个磁盘出现故障,我们仍可以得到数据,因为在 RAID 6 使用双奇偶校验。 + +如果第二个磁盘也出现故障,在第三块磁盘损坏前我们可以添加一个​​新的。它可以作为一个备用磁盘并入 RAID 集合,但我在创建 raid 集合前没有定义备用的磁盘。但是,在磁盘损坏后或者创建 RAId 集合时我们可以添加一块磁盘。现在,我们已经创建好了 RAID,下面让我演示如何添加备用磁盘。 + +为了达到演示的目的,我已经热插入了一个新的 HDD 磁盘(即 /dev/sdf),让我们来验证接入的磁盘。 + + # ls -l /dev/ | grep sd + +![Check New Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-New-Disk.png) + +检查新 Disk + +17.现在再次确认新连接的磁盘没有配置过 RAID ,使用 mdadm 来检查。 + + # mdadm --examine /dev/sdf + +![Check Raid on New Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-New-Disk.png) + +在新磁盘中检查 Raid + +**注意**: 像往常一样,我们早前已经为四个磁盘创建了分区,同样,我们使用 fdisk 命令为新插入的磁盘创建新分区。 + + # fdisk /dev/sdf + +![Create sdf Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-Partition-on-sdf.png) + +为 /dev/sdf 创建分区 + +18.在 /dev/sdf 创建新的分区后,在新分区上确认 raid,包括/dev/md0 raid 设备的备用磁盘,并验证添加的设备。 + + # mdadm --examine /dev/sdf + # mdadm --examine /dev/sdf1 + # mdadm --add /dev/md0 /dev/sdf1 + # mdadm --detail /dev/md0 + +![Verify Raid on sdf Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-on-sdf.png) + +在 sdf 分区上验证 Raid + +![Add sdf Partition to Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Add-sdf-Partition-to-Raid.png) + +为 RAID 添加 sdf 分区 + +![Verify sdf Partition Details](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-sdf-Details.png) + +验证 sdf 分区信息 + +### 第7步:检查 RAID 6 容错 ### + +19.现在,让我们检查备用驱动器是否能自动工作,当我们阵列中的任何一个磁盘出现故障时。为了测试,我亲自将一个磁盘模拟为故障设备。 + +在这里,我们标记 /dev/sdd1 为故障磁盘。 + + # mdadm --manage --fail /dev/md0 /dev/sdd1 + +![Check Raid 6 Fault Tolerance](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Failover.png) + +检查 Raid 6 容错 + +20.让我们查看 RAID 的详细信息,并检查备用磁盘是否开始同步。 + + # mdadm --detail /dev/md0 + +![Check Auto Raid Syncing](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Auto-Raid-Syncing.png) + +检查 Raid 自动同步 + +**哇塞!** 这里,我们看到备用磁盘激活了,并开始重建进程。在底部,我们可以看到有故障的磁盘 /dev/sdd1 标记为 faulty。可以使用下面的命令查看进程重建。 + + # cat /proc/mdstat + +![Raid 6 Auto Syncing](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-6-Auto-Syncing.png) + +Raid 6 自动同步 + +### 结论: ### + +在这里,我们看到了如何使用四个磁盘设置 RAID 6。这种 RAID 级别是具有高冗余的昂贵设置之一。在接下来的文章中,我们将看到如何建立一个嵌套的 RAID 10 甚至更多。至此,请继续关注 TECMINT。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid-6-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/create-raid0-in-linux/ +[3]:http://www.tecmint.com/create-raid1-in-linux/ From 079be8dc226607baac11d0663901e3b3f6a15c2c Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 24 Aug 2015 22:29:00 +0800 Subject: [PATCH 1839/2517] =?UTF-8?q?PUB:Part=202=20-=20Creating=20Softwar?= =?UTF-8?q?e=20RAID0=20(Stripe)=20on=20=E2=80=98Two=20Devices=E2=80=99=20U?= =?UTF-8?q?sing=20=E2=80=98mdadm=E2=80=99=20Tool=20in=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @strugglingyouth --- ...Two Devices’ Using ‘mdadm’ Tool in Linux.md | 219 ++++++++++++++++++ ...Two Devices’ Using ‘mdadm’ Tool in Linux.md | 218 ----------------- 2 files changed, 219 insertions(+), 218 deletions(-) create mode 100644 published/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md delete mode 100644 translated/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md diff --git a/published/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md b/published/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md new file mode 100644 index 0000000000..650897d1d5 --- /dev/null +++ b/published/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md @@ -0,0 +1,219 @@ +在 Linux 下使用 RAID(一):使用 mdadm 工具创建软件 RAID 0 (条带化) +================================================================================ + +RAID 即廉价磁盘冗余阵列,其高可用性和可靠性适用于大规模环境中,相比正常使用,数据更需要被保护。RAID 是一些磁盘的集合,是包含一个阵列的逻辑卷。驱动器可以组合起来成为一个阵列或称为(组的)集合。 + +创建 RAID 最少应使用2个连接到 RAID 控制器的磁盘组成,来构成逻辑卷,可以根据定义的 RAID 级别将更多的驱动器添加到一个阵列中。不使用物理硬件创建的 RAID 被称为软件 RAID。软件 RAID 也叫做穷人 RAID。 + +![Setup RAID0 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Raid0-in-Linux.jpg) + +*在 Linux 中创建 RAID0* + +使用 RAID 的主要目的是为了在发生单点故障时保存数据,如果我们使用单个磁盘来存储数据,如果它损坏了,那么就没有机会取回我们的数据了,为了防止数据丢失我们需要一个容错的方法。所以,我们可以使用多个磁盘组成 RAID 阵列。 + +#### 在 RAID 0 中条带是什么 #### + +条带是通过将数据在同时分割到多个磁盘上。假设我们有两个磁盘,如果我们将数据保存到该逻辑卷上,它会将数据保存在两个磁盘上。使用 RAID 0 是为了获得更好的性能,但是如果驱动器中一个出现故障,我们将不能得到完整的数据。因此,使用 RAID 0 不是一种好的做法。唯一的解决办法就是安装有 RAID 0 逻辑卷的操作系统来提高重要文件的安全性。 + +- RAID 0 性能较高。 +- 在 RAID 0 上,空间零浪费。 +- 零容错(如果硬盘中的任何一个发生故障,无法取回数据)。 +- 写和读性能都很好。 + +#### 要求 #### + +创建 RAID 0 允许的最小磁盘数目是2个,但你可以添加更多的磁盘,不过数目应该是2,4,6,8等的偶数。如果你有一个物理 RAID 卡并且有足够的端口,你可以添加更多磁盘。 + +在这里,我们没有使用硬件 RAID,此设置只需要软件 RAID。如果我们有一个物理硬件 RAID 卡,我们可以从它的功能界面访问它。有些主板默认内建 RAID 功能,还可以使用 Ctrl + I 键访问它的界面。 + +如果你是刚开始设置 RAID,请阅读我们前面的文章,我们已经介绍了一些关于 RAID 基本的概念。 + +- [介绍 RAID 的级别和概念][1] + +**我的服务器设置** + + 操作系统 : CentOS 6.5 Final + IP 地址 : 192.168.0.225 + 两块盘 : 20 GB each + +这是9篇系列教程的第2部分,在这部分,我们将看看如何能够在 Linux 上创建和使用 RAID 0(条带化),以名为 sdb 和 sdc 两个 20GB 的硬盘为例。 + +### 第1步:更新系统和安装管理 RAID 的 mdadm 软件 ### + +1、 在 Linux 上设置 RAID 0 前,我们先更新一下系统,然后安装`mdadm` 包。mdadm 是一个小程序,这将使我们能够在Linux下配置和管理 RAID 设备。 + + # yum clean all && yum update + # yum install mdadm -y + +![install mdadm in linux](http://www.tecmint.com/wp-content/uploads/2014/10/install-mdadm-in-linux.png) + +*安装 mdadm 工具* + +### 第2步:确认连接了两个 20GB 的硬盘 ### + +2、 在创建 RAID 0 前,请务必确认两个硬盘能被检测到,使用下面的命令确认。 + + # ls -l /dev | grep sd + +![Check Hard Drives in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Hard-Drives.png) + +*检查硬盘* + +3、 一旦检测到新的硬盘驱动器,同时检查是否连接的驱动器已经被现有的 RAID 使用,使用下面的`mdadm` 命令来查看。 + + # mdadm --examine /dev/sd[b-c] + +![Check RAID Devices in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Drives-using-RAID.png) + +*检查 RAID 设备* + +从上面的输出我们可以看到,没有任何 RAID 使用 sdb 和 sdc 这两个驱动器。 + +### 第3步:创建 RAID 分区 ### + +4、 现在用 sdb 和 sdc 创建 RAID 的分区,使用 fdisk 命令来创建。在这里,我将展示如何创建 sdb 驱动器上的分区。 + + # fdisk /dev/sdb + +请按照以下说明创建分区。 + +- 按`n` 创建新的分区。 +- 然后按`P` 选择主分区。 +- 接下来选择分区号为1。 +- 只需按两次回车键选择默认值即可。 +- 然后,按`P` 来显示创建好的分区。 + +![Create Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Partitions-in-Linux.png) + +*创建分区* + +请按照以下说明将分区创建为 Linux 的 RAID 类型。 + +- 按`L`,列出所有可用的类型。 +- 按`t` 去修改分区。 +- 键入`fd` 设置为 Linux 的 RAID 类型,然后按回车确认。 +- 然后再次使用`p`查看我们所做的更改。 +- 使用`w`保存更改。 + +![Create RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Partitions.png) + +*在 Linux 上创建 RAID 分区* + +**注**: 请使用上述步骤同样在 sdc 驱动器上创建分区。 + +5、 创建分区后,验证这两个驱动器是否正确定义 RAID,使用下面的命令。 + + # mdadm --examine /dev/sd[b-c] + # mdadm --examine /dev/sd[b-c]1 + +![Verify RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Partitions.png) + +*验证 RAID 分区* + +### 第4步:创建 RAID md 设备 ### + +6、 现在使用以下命令创建 md 设备(即 /dev/md0),并选择 RAID 合适的级别。 + + # mdadm -C /dev/md0 -l raid0 -n 2 /dev/sd[b-c]1 + # mdadm --create /dev/md0 --level=stripe --raid-devices=2 /dev/sd[b-c]1 + +- -C – 创建 +- -l – 级别 +- -n – RAID 设备数 + +7、 一旦 md 设备已经建立,使用如下命令可以查看 RAID 级别,设备和阵列的使用状态。 + + # cat /proc/mdstat + +![Verify RAID Level](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Level.png) + +*查看 RAID 级别* + + # mdadm -E /dev/sd[b-c]1 + +![Verify RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Device.png) + +*查看 RAID 设备* + + # mdadm --detail /dev/md0 + +![Verify RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Array.png) + +*查看 RAID 阵列* + +### 第5步:给 RAID 设备创建文件系统 ### + +8、 将 RAID 设备 /dev/md0 创建为 ext4 文件系统,并挂载到 /mnt/raid0 下。 + + # mkfs.ext4 /dev/md0 + +![Create ext4 Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystem.png) + +*创建 ext4 文件系统* + +9、 在 RAID 设备上创建好 ext4 文件系统后,现在创建一个挂载点(即 /mnt/raid0),并将设备 /dev/md0 挂载在它下。 + + # mkdir /mnt/raid0 + # mount /dev/md0 /mnt/raid0/ + +10、下一步,使用 df 命令验证设备 /dev/md0 是否被挂载在 /mnt/raid0 下。 + + # df -h + +11、 接下来,在挂载点 /mnt/raid0 下创建一个名为`tecmint.txt` 的文件,为创建的文件添加一些内容,并查看文件和目录的内容。 + + # touch /mnt/raid0/tecmint.txt + # echo "Hi everyone how you doing ?" > /mnt/raid0/tecmint.txt + # cat /mnt/raid0/tecmint.txt + # ls -l /mnt/raid0/ + +![Verify Mount Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Mount-Device.png) + +*验证挂载的设备* + +12、 当你验证挂载点后,就可以将它添加到 /etc/fstab 文件中。 + + # vim /etc/fstab + +添加以下条目,根据你的安装位置和使用文件系统的不同,自行做修改。 + + /dev/md0 /mnt/raid0 ext4 deaults 0 0 + +![Add Device to Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Add-Device-to-Fstab.png) + +*添加设备到 fstab 文件中* + +13、 使用 mount 命令的 `-a` 来检查 fstab 的条目是否有误。 + + # mount -av + +![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-Fstab.png) + +*检查 fstab 文件是否有误* + +### 第6步:保存 RAID 配置 ### + +14、 最后,保存 RAID 配置到一个文件中,以供将来使用。我们再次使用带有`-s` (scan) 和`-v` (verbose) 选项的 `mdadm` 命令,如图所示。 + + # mdadm -E -s -v >> /etc/mdadm.conf + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + # cat /etc/mdadm.conf + +![Save RAID Configurations](http://www.tecmint.com/wp-content/uploads/2014/10/Save-RAID-Configurations.png) + +*保存 RAID 配置* + +就这样,我们在这里看到,如何通过使用两个硬盘配置具有条带化的 RAID 0 。在接下来的文章中,我们将看到如何设置 RAID 1。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid0-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:https://linux.cn/article-6085-1.html diff --git a/translated/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md b/translated/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md deleted file mode 100644 index 9feba99609..0000000000 --- a/translated/tech/RAID/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md +++ /dev/null @@ -1,218 +0,0 @@ -在 Linux 上使用 ‘mdadm’ 工具创建软件 RAID0 (条带化)在 ‘两个设备’ 上 - 第2部分 -================================================================================ -RAID 是廉价磁盘的冗余阵列,其高可用性和可靠性适用于大规模环境中,为了使数据被保护而不是被正常使用。RAID 只是磁盘的一个集合被称为逻辑卷。结合驱动器,使其成为一个阵列或称为集合(组)。 - -创建 RAID 最少应使用2个磁盘被连接组成 RAID 控制器,逻辑卷或多个驱动器可以根据定义的 RAID 级别添加在一个阵列中。不使用物理硬件创建的 RAID 被称为软件 RAID。软件 RAID 一般都是不太有钱的人才使用的。 - -![Setup RAID0 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Raid0-in-Linux.jpg) - -在 Linux 中创建 RAID0 - -使用 RAID 的主要目的是为了在单点故障时保存数据,如果我们使用单个磁盘来存储数据,如果它损坏了,那么就没有机会取回我们的数据了,为了防止数据丢失我们需要一个容错的方法。所以,我们可以使用多个磁盘组成 RAID 阵列。 - -#### 在 RAID 0 中条带是什么 #### - -条带是通过将数据在同一时间分割到多个磁盘上。假设我们有两个磁盘,如果我们将数据保存到逻辑卷上,它会将数据保存在两个磁盘上。使用 RAID 0 是为了获得更好的性能,但是如果驱动器中一个出现故障,我们将不能得到完整的数据。因此,使用 RAID 0 不是一种好的做法。唯一的解决办法就是安装有 RAID0 逻辑卷的操作系统来提高文件的安全性。 - -- RAID 0 性能较高。 -- 在 RAID 0 上,空间零浪费。 -- 零容错(如果硬盘中的任何一个发生故障,无法取回数据)。 -- 写和读性能得以提高。 - -#### 要求 #### - -创建 RAID 0 允许的最小磁盘数目是2个,但你可以添加更多的磁盘,但数目应该是2,4,6,8等的两倍。如果你有一个物理 RAID 卡并且有足够的端口,你可以添加更多磁盘。 - -在这里,我们没有使用硬件 RAID,此设置只依赖于软件 RAID。如果我们有一个物理硬件 RAID 卡,我们可以从它的 UI 组件访问它。有些主板默认内建 RAID 功能,还可以使用 Ctrl + I 键访问 UI。 - -如果你是刚开始设置 RAID,请阅读我们前面的文章,我们已经介绍了一些关于 RAID 基本的概念。 - -- [Introduction to RAID and RAID Concepts][1] - -**我的服务器设置** - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.225 - Two Disks : 20 GB each - -这篇文章是9个 RAID 系列教程的第2部分,在这部分,我们将看看如何能够在 Linux 上创建和使用 RAID0(条带化),以名为 sdb 和 sdc 两个20GB的硬盘为例。 - -### 第1步:更新系统和安装管理 RAID 的 mdadm 软件 ### - -1.在 Linux 上设置 RAID0 前,我们先更新一下系统,然后安装 ‘mdadm’ 包。mdadm 是一个小程序,这将使我们能够在Linux下配置和管理 RAID 设备。 - - # yum clean all && yum update - # yum install mdadm -y - -![install mdadm in linux](http://www.tecmint.com/wp-content/uploads/2014/10/install-mdadm-in-linux.png) - -安装 mdadm 工具 - -### 第2步:检测并连接两个 20GB 的硬盘 ### - -2.在创建 RAID 0 前,请务必确认两个硬盘能被检测到,使用下面的命令确认。 - - # ls -l /dev | grep sd - -![Check Hard Drives in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Hard-Drives.png) - -检查硬盘 - -3.一旦检测到新的硬盘驱动器,同时检查是否连接的驱动器已经被现有的 RAID 使用,使用下面的 ‘mdadm’ 命令来查看。 - - # mdadm --examine /dev/sd[b-c] - -![Check RAID Devices in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Drives-using-RAID.png) - -检查 RAID 设备 - -从上面的输出我们可以看到,没有任何 RAID 使用 sdb 和 sdc 这两个驱动器。 - -### 第3步:创建 RAID 分区 ### - -4.现在用 sdb 和 sdc 创建 RAID 的分区,使用 fdisk 命令来创建。在这里,我将展示如何创建 sdb 驱动器上的分区。 - - # fdisk /dev/sdb - -请按照以下说明创建分区。 - -- 按 ‘n’ 创建新的分区。 -- 然后按 ‘P’ 选择主分区。 -- 接下来选择分区号为1。 -- 只需按两次回车键选择默认值即可。 -- 然后,按 ‘P’ 来打印创建好的分区。 - -![Create Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Partitions-in-Linux.png) - -创建分区 - -请按照以下说明将分区创建为 Linux 的 RAID 类型。 - -- 按 ‘L’,列出所有可用的类型。 -- 按 ‘t’ 去修改分区。 -- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 -- 然后再次使用‘p’查看我们所做的更改。 -- 使用‘w’保存更改。 - -![Create RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Partitions.png) - -在 Linux 上创建 RAID 分区 - -**注**: 请使用上述步骤同样在 sdc 驱动器上创建分区。 - -5.创建分区后,验证这两个驱动器能使用下面的命令来正确定义 RAID。 - - # mdadm --examine /dev/sd[b-c] - # mdadm --examine /dev/sd[b-c]1 - -![Verify RAID Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Partitions.png) - -验证 RAID 分区 - -### 第4步:创建 RAID md 设备 ### - -6.现在使用以下命令创建 md 设备(即 /dev/md0),并选择 RAID 合适的级别。 - - # mdadm -C /dev/md0 -l raid0 -n 2 /dev/sd[b-c]1 - # mdadm --create /dev/md0 --level=stripe --raid-devices=2 /dev/sd[b-c]1 - -- -C – create -- -l – level -- -n – No of raid-devices - -7.一旦 md 设备已经建立,使用如下命令可以查看 RAID 级别,设备和阵列的使用状态。 - - # cat /proc/mdstat - -![Verify RAID Level](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Level.png) - -查看 RAID 级别 - - # mdadm -E /dev/sd[b-c]1 - -![Verify RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Device.png) - -查看 RAID 设备 - - # mdadm --detail /dev/md0 - -![Verify RAID Array](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Array.png) - -查看 RAID 阵列 - -### 第5步:挂载 RAID 设备到文件系统 ### - -8.将 RAID 设备 /dev/md0 创建为 ext4 文件系统并挂载到 /mnt/raid0 下。 - - # mkfs.ext4 /dev/md0 - -![Create ext4 Filesystem in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-ext4-Filesystem.png) - -创建 ext4 文件系统 - -9. ext4 文件系统为 RAID 设备创建好后,现在创建一个挂载点(即 /mnt/raid0),并将设备 /dev/md0 挂载在它下。 - - # mkdir /mnt/raid0 - # mount /dev/md0 /mnt/raid0/ - -10.下一步,使用 df 命令验证设备 /dev/md0 是否被挂载在 /mnt/raid0 下。 - - # df -h - -11.接下来,创建一个名为 ‘tecmint.txt’ 的文件挂载到 /mnt/raid0 下,为创建的文件添加一些内容,并查看文件和目录的内容。 - - # touch /mnt/raid0/tecmint.txt - # echo "Hi everyone how you doing ?" > /mnt/raid0/tecmint.txt - # cat /mnt/raid0/tecmint.txt - # ls -l /mnt/raid0/ - -![Verify Mount Device](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Mount-Device.png) - -验证挂载的设备 - -12.一旦你验证挂载点后,同时将它添加到 /etc/fstab 文件中。 - - # vim /etc/fstab - -添加以下条目,根据你的安装位置和使用文件系统的不同,自行做修改。 - - /dev/md0 /mnt/raid0 ext4 deaults 0 0 - -![Add Device to Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Add-Device-to-Fstab.png) - -添加设备到 fstab 文件中 - -13.使用 mount ‘-a‘ 来检查 fstab 的条目是否有误。 - - # mount -av - -![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-Fstab.png) - -检查 fstab 文件是否有误 - -### 第6步:保存 RAID 配置 ### - -14.最后,保存 RAID 配置到一个文件中,以供将来使用。同样,我们使用 ‘mdadm’ 命令带有 ‘-s‘ (scan) 和 ‘-v‘ (verbose) 选项,如图所示。 - - # mdadm -E -s -v >> /etc/mdadm.conf - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - # cat /etc/mdadm.conf - -![Save RAID Configurations](http://www.tecmint.com/wp-content/uploads/2014/10/Save-RAID-Configurations.png) - -保存 RAID 配置 - -就这样,我们在这里看到,如何通过使用两个硬盘配置具有条带化的 RAID0 级别。在接下来的文章中,我们将看到如何设置 RAID5。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-raid0-in-linux/ - -作者:[Babin Lonston][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ From 234e307b477bcad5a12a40c540be4f08b125d8c4 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 24 Aug 2015 23:58:14 +0800 Subject: [PATCH 1840/2517] Delete 20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md --- ...x Wireshark GUI freeze on Linux desktop.md | 62 ------------------- 1 file changed, 62 deletions(-) delete mode 100644 sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md diff --git a/sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md b/sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md deleted file mode 100644 index d906349ff9..0000000000 --- a/sources/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md +++ /dev/null @@ -1,62 +0,0 @@ -translation by strugglingyouth -Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop -================================================================================ -> **Question**: When I try to open a pre-recorded packet dump on Wireshark on Ubuntu, its UI suddenly freezes, and the following errors and warnings appear in the terminal where I launched Wireshark. How can I fix this problem? - -Wireshark is a GUI-based packet capture and sniffer tool. This tool is popularly used by network administrators, network security engineers or developers for various tasks where packet-level network analysis is required, for example during network troubleshooting, vulnerability testing, application debugging, or protocol reverse engineering. Wireshark allows one to capture live packets and browse their protocol headers and payloads via a convenient GUI. - -![](https://farm1.staticflickr.com/722/20584224675_f4d7a59474_c.jpg) - -It is known that Wireshark's UI, especially run under Ubuntu desktop, sometimes hangs or freezes with the following errors, while you are scrolling up or down the packet list view, or starting to load a pre-recorded packet dump file. - - (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GObject' - (wireshark:3480): GLib-GObject-CRITICAL **: g_object_set_qdata_full: assertion 'G_IS_OBJECT (object)' failed - (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkRange' - (wireshark:3480): Gtk-CRITICAL **: gtk_range_get_adjustment: assertion 'GTK_IS_RANGE (range)' failed - (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkOrientable' - (wireshark:3480): Gtk-CRITICAL **: gtk_orientable_get_orientation: assertion 'GTK_IS_ORIENTABLE (orientable)' failed - (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkScrollbar' - (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkWidget' - (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GObject' - (wireshark:3480): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed - (wireshark:3480): Gtk-CRITICAL **: gtk_widget_set_name: assertion 'GTK_IS_WIDGET (widget)' failed - -Apparently this error is caused by some incompatibility between Wireshark and overlay-scrollbar, and has not been fixed in the latest Ubuntu desktop (e.g., as of Ubuntu 15.04 Vivid Vervet). - -A workaround to avoid this Wireshark UI freeze problem is to **temporarily disabling overlay-scrollbar**. There are two ways to disable overlay-scrollbar in Wireshark, depending on how you launch Wireshark on your desktop. - -### Command-Line Solution ### - -Overlay-scrollbar can be disabled by setting "**LIBOVERLAY_SCROLLBAR**" environment variable to "0". - -So if you are launching Wireshark from the command in a terminal, you can disable overlay-scrollbar in Wireshark as follows. - -Open your .bashrc, and define the following alias. - - alias wireshark="LIBOVERLAY_SCROLLBAR=0 /usr/bin/wireshark" - -### Desktop Launcher Solution ### - -If you are launching Wireshark using a desktop launcher, you can edit its desktop launcher file. - - $ sudo vi /usr/share/applications/wireshark.desktop - -Look for a line that starts with "Exec", and change it as follows. - - Exec=env LIBOVERLAY_SCROLLBAR=0 wireshark %f - -While this solution will be beneficial for all desktop users system-wide, it will not survive Wireshark upgrade. If you want to preserve the modified .desktop file, copy it to your home directory as follows. - - $ cp /usr/share/applications/wireshark.desktop ~/.local/share/applications/ - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/fix-wireshark-gui-freeze-linux-desktop.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://ask.xmodulo.com/author/nanni From 68ca6216a812bae6178844c68fadf162a57d7db1 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 24 Aug 2015 23:58:40 +0800 Subject: [PATCH 1841/2517] Create 20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md --- ...x Wireshark GUI freeze on Linux desktop.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 translated/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md diff --git a/translated/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md b/translated/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md new file mode 100644 index 0000000000..9db7231a68 --- /dev/null +++ b/translated/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md @@ -0,0 +1,64 @@ + +Linux 有问必答--如何解决 Linux 桌面上的 Wireshark GUI 死机 +================================================================================ +> **问题**: 当我试图在 Ubuntu 上的 Wireshark 中打开一个 pre-recorded 数据包转储时,它的 UI 突然死机,在我发起 Wireshark 的终端出现了下面的错误和警告。我该如何解决这个问题? + +Wireshark 是一个基于 GUI 的数据包捕获和嗅探工具。该工具被网络管理员普遍使用,网络安全工程师或开发人员对于各种任务的 packet-level 网络分析是必需的,例如在网络故障,漏洞测试,应用程序调试,或逆向协议工程是必需的。 Wireshark 允许记录存活数据包,并通过便捷的图形用户界面浏览他们的协议首部和有效负荷。 + +![](https://farm1.staticflickr.com/722/20584224675_f4d7a59474_c.jpg) + +这是 Wireshark 的 UI,尤其是在 Ubuntu 桌面下运行,有时会挂起或冻结出现以下错误,而你是向上或向下滚动分组列表视图时,就开始加载一个 pre-recorded 包转储文件。 + + + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GObject' + (wireshark:3480): GLib-GObject-CRITICAL **: g_object_set_qdata_full: assertion 'G_IS_OBJECT (object)' failed + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkRange' + (wireshark:3480): Gtk-CRITICAL **: gtk_range_get_adjustment: assertion 'GTK_IS_RANGE (range)' failed + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkOrientable' + (wireshark:3480): Gtk-CRITICAL **: gtk_orientable_get_orientation: assertion 'GTK_IS_ORIENTABLE (orientable)' failed + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkScrollbar' + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkWidget' + (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GObject' + (wireshark:3480): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed + (wireshark:3480): Gtk-CRITICAL **: gtk_widget_set_name: assertion 'GTK_IS_WIDGET (widget)' failed + +显然,这个错误是由 Wireshark 和叠加滚动条之间的一些不兼容造成的,在最新的 Ubuntu 桌面还没有被解决(例如,Ubuntu 15.04 的桌面)。 + +一种避免 Wireshark 的 UI 卡死的办法就是 **暂时禁用叠加滚动条**。在 Wireshark 上有两种方法来禁用叠加滚动条,这取决于你在桌面上如何启动 Wireshark 的。 + +### 命令行解决方法 ### + +叠加滚动条可以通过设置"**LIBOVERLAY_SCROLLBAR**"环境变量为“0”来被禁止。 + +所以,如果你是在终端使用命令行启动 Wireshark 的,你可以在 Wireshark 中禁用叠加滚动条,如下所示。 + +打开你的 .bashrc 文件,并定义以下 alias。 + + alias wireshark="LIBOVERLAY_SCROLLBAR=0 /usr/bin/wireshark" + +### 桌面启动解决方法 ### + +如果你是使用桌面启动器启动的 Wireshark,你可以编辑它的桌面启动器文件。 + + $ sudo vi /usr/share/applications/wireshark.desktop + +查找以"Exec"开头的行,并如下更改。 + + Exec=env LIBOVERLAY_SCROLLBAR=0 wireshark %f + +虽然这种解决方法将有利于所有桌面用户的 system-wide,但它将无法升级 Wireshark。如果你想保留修改的 .desktop 文件,如下所示将它复制到你的主目录。 + + $ cp /usr/share/applications/wireshark.desktop ~/.local/share/applications/ + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/fix-wireshark-gui-freeze-linux-desktop.html + +作者:[Dan Nanni][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni + From 98d249980e03d618467d60c8145d859d84ff91da Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 25 Aug 2015 00:28:35 +0800 Subject: [PATCH 1842/2517] PUB:20150717 How to monitor NGINX with Datadog - Part 3 @strugglingyouth --- ... to monitor NGINX with Datadog - Part 3.md | 146 +++++++++++++++++ ... to monitor NGINX with Datadog - Part 3.md | 154 ------------------ 2 files changed, 146 insertions(+), 154 deletions(-) create mode 100644 published/20150717 How to monitor NGINX with Datadog - Part 3.md delete mode 100644 translated/tech/20150717 How to monitor NGINX with Datadog - Part 3.md diff --git a/published/20150717 How to monitor NGINX with Datadog - Part 3.md b/published/20150717 How to monitor NGINX with Datadog - Part 3.md new file mode 100644 index 0000000000..fecab87e66 --- /dev/null +++ b/published/20150717 How to monitor NGINX with Datadog - Part 3.md @@ -0,0 +1,146 @@ +如何使用 Datadog 监控 NGINX(第三篇) +================================================================================ +![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_3.png) + +如果你已经阅读了前面的[如何监控 NGINX][1],你应该知道从你网络环境的几个指标中可以获取多少信息。而且你也看到了从 NGINX 特定的基础中收集指标是多么容易的。但要实现全面,持续的监控 NGINX,你需要一个强大的监控系统来存储并将指标可视化,当异常发生时能提醒你。在这篇文章中,我们将向你展示如何使用 Datadog 安装 NGINX 监控,以便你可以在定制的仪表盘中查看这些指标: + +![NGINX dashboard](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_board_5.png) + +Datadog 允许你以单个主机、服务、流程和度量来构建图形和警告,或者使用它们的几乎任何组合构建。例如,你可以监控你的所有主机,或者某个特定可用区域的所有NGINX主机,或者您可以监视具有特定标签的所有主机的一个关键指标。本文将告诉您如何: + +- 在 Datadog 仪表盘上监控 NGINX 指标,就像监控其他系统一样 +- 当一个关键指标急剧变化时设置自动警报来通知你 + +### 配置 NGINX ### + +为了收集 NGINX 指标,首先需要确保 NGINX 已启用 status 模块和一个 报告 status 指标的 URL。一步步的[配置开源 NGINX][2] 和 [NGINX Plus][3] 请参见之前的相关文章。 + +### 整合 Datadog 和 NGINX ### + +#### 安装 Datadog 代理 #### + +Datadog 代理是[一个开源软件][4],它能收集和报告你主机的指标,这样就可以使用 Datadog 查看和监控他们。安装这个代理通常[仅需要一个命令][5] + +只要你的代理启动并运行着,你会看到你主机的指标报告[在你 Datadog 账号下][6]。 + +![Datadog infrastructure list](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/infra_2.png) + +#### 配置 Agent #### + +接下来,你需要为代理创建一个简单的 NGINX 配置文件。在你系统中代理的配置目录应该[在这儿][7]找到。 + +在目录里面的 conf.d/nginx.yaml.example 中,你会发现[一个简单的配置文件][8],你可以编辑并提供 status URL 和可选的标签为每个NGINX 实例: + + init_config: + + instances: + + - nginx_status_url: http://localhost/nginx_status/ + tags: + - instance:foo + +当你提供了 status URL 和任意 tag,将配置文件保存为 conf.d/nginx.yaml。 + +#### 重启代理 #### + +你必须重新启动代理程序来加载新的配置文件。重新启动命令[在这里][9],根据平台的不同而不同。 + +#### 检查配置文件 #### + +要检查 Datadog 和 NGINX 是否正确整合,运行 Datadog 的 info 命令。每个平台使用的命令[看这儿][10]。 + +如果配置是正确的,你会看到这样的输出: + + Checks + ====== + + [...] + + nginx + ----- + - instance #0 [OK] + - Collected 8 metrics & 0 events + +#### 安装整合 #### + +最后,在你的 Datadog 帐户打开“Nginx 整合”。这非常简单,你只要在 [NGINX 整合设置][11]中点击“Install Integration”按钮。 + +![Install integration](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/install.png) + +### 指标! ### + +一旦代理开始报告 NGINX 指标,你会看到[一个 NGINX 仪表盘][12]出现在在你 Datadog 可用仪表盘的列表中。 + +基本的 NGINX 仪表盘显示有用的图表,囊括了几个[我们的 NGINX 监控介绍][13]中的关键指标。 (一些指标,特别是请求处理时间要求进行日志分析,Datadog 不支持。) + +你可以通过增加 NGINX 之外的重要指标的图表来轻松创建一个全面的仪表盘,以监控你的整个网站设施。例如,你可能想监视你 NGINX 的主机级的指标,如系统负载。要构建一个自定义的仪表盘,只需点击靠近仪表盘的右上角的选项并选择“Clone Dash”来克隆一个默认的 NGINX 仪表盘。 + +![Clone dash](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/clone_2.png) + +你也可以使用 Datadog 的[主机地图][14]在更高层面监控你的 NGINX 实例,举个例子,用颜色标示你所有的 NGINX 主机的 CPU 使用率来辨别潜在热点。 + +![](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx-host-map-3.png) + +### NGINX 指标警告 ### + +一旦 Datadog 捕获并可视化你的指标,你可能会希望建立一些监控自动地密切关注你的指标,并当有问题提醒你。下面将介绍一个典型的例子:一个提醒你 NGINX 吞吐量突然下降时的指标监控器。 + +#### 监控 NGINX 吞吐量 #### + +Datadog 指标警报可以是“基于吞吐量的”(当指标超过设定值会警报)或“基于变化幅度的”(当指标的变化超过一定范围会警报)。在这个例子里,我们会采取后一种方式,当每秒传入的请求急剧下降时会提醒我们。下降往往意味着有问题。 + +1. **创建一个新的指标监控**。从 Datadog 的“Monitors”下拉列表中选择“New Monitor”。选择“Metric”作为监视器类型。 + + ![NGINX metric monitor](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_1.png) + +2. **定义你的指标监视器**。我们想知道 NGINX 每秒总的请求量下降的数量,所以我们在基础设施中定义我们感兴趣的 nginx.net.request_per_s 之和。 + + ![NGINX metric](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_2.png) + +3. **设置指标警报条件**。我们想要在变化时警报,而不是一个固定的值,所以我们选择“Change Alert”。我们设置监控为无论何时请求量下降了30%以上时警报。在这里,我们使用一个一分钟的数据窗口来表示 “now” 指标的值,对横跨该间隔内的平均变化和之前 10 分钟的指标值作比较。 + + ![NGINX metric change alert](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_3.png) + +4. **自定义通知**。如果 NGINX 的请求量下降,我们想要通知我们的团队。在这个例子中,我们将给 ops 团队的聊天室发送通知,并给值班工程师发送短信。在“Say what’s happening”中,我们会为监控器命名,并添加一个伴随该通知的短消息,建议首先开始调查的内容。我们会 @ ops 团队使用的 Slack,并 @pagerduty [将警告发给短信][15]。 + + ![NGINX metric notification](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_4v3.png) + +5. **保存集成监控**。点击页面底部的“Save”按钮。你现在在监控一个关键的 NGINX [工作指标][16],而当它快速下跌时会给值班工程师发短信。 + +### 结论 ### + +在这篇文章中,我们谈到了通过整合 NGINX 与 Datadog 来可视化你的关键指标,并当你的网络基础架构有问题时会通知你的团队。 + +如果你一直使用你自己的 Datadog 账号,你现在应该可以极大的提升你的 web 环境的可视化,也有能力对你的环境、你所使用的模式、和对你的组织最有价值的指标创建自动监控。 + +如果你还没有 Datadog 帐户,你可以注册[免费试用][17],并开始监视你的基础架构,应用程序和现在的服务。 + +------------------------------------------------------------ + +via: https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ + +作者:K Young +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://linux.cn/article-5970-1.html +[2]:https://linux.cn/article-5985-1.html#open-source +[3]:https://linux.cn/article-5985-1.html#plus +[4]:https://github.com/DataDog/dd-agent +[5]:https://app.datadoghq.com/account/settings#agent +[6]:https://app.datadoghq.com/infrastructure +[7]:http://docs.datadoghq.com/guides/basic_agent_usage/ +[8]:https://github.com/DataDog/dd-agent/blob/master/conf.d/nginx.yaml.example +[9]:http://docs.datadoghq.com/guides/basic_agent_usage/ +[10]:http://docs.datadoghq.com/guides/basic_agent_usage/ +[11]:https://app.datadoghq.com/account/settings#integrations/nginx +[12]:https://app.datadoghq.com/dash/integration/nginx +[13]:https://linux.cn/article-5970-1.html +[14]:https://www.datadoghq.com/blog/introducing-host-maps-know-thy-infrastructure/ +[15]:https://www.datadoghq.com/blog/pagerduty/ +[16]:https://www.datadoghq.com/blog/monitoring-101-collecting-data/#metrics +[17]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/#sign-up +[18]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_monitor_nginx_with_datadog.md +[19]:https://github.com/DataDog/the-monitor/issues diff --git a/translated/tech/20150717 How to monitor NGINX with Datadog - Part 3.md b/translated/tech/20150717 How to monitor NGINX with Datadog - Part 3.md deleted file mode 100644 index 003290a915..0000000000 --- a/translated/tech/20150717 How to monitor NGINX with Datadog - Part 3.md +++ /dev/null @@ -1,154 +0,0 @@ - -如何使用 Datadog 监控 NGINX - 第3部分 -================================================================================ -![](http://www.datadoghq.com/wp-content/uploads/2015/07/NGINX_hero_3.png) - -如果你已经阅读了[前面的如何监控 NGINX][1],你应该知道从你网络环境的几个指标中可以获取多少信息。而且你也看到了从 NGINX 特定的基础中收集指标是多么容易的。但要实现全面,持续的监控 NGINX,你需要一个强大的监控系统来存储并将指标可视化,当异常发生时能提醒你。在这篇文章中,我们将向你展示如何使用 Datadog 安装 NGINX 监控,以便你可以在定制的仪表盘中查看这些指标: - -![NGINX dashboard](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx_board_5.png) - -Datadog 允许你建立单个主机,服务,流程,度量,或者几乎任何它们的组合图形周围和警报。例如,你可以在一定的可用性区域监控所有NGINX主机,或所有主机,或者您可以监视被报道具有一定标签的所有主机的一个关键指标。本文将告诉您如何: - -Datadog 允许你来建立图表并报告周围的主机,进程,指标或其他的。例如,你可以在特定的可用性区域监控所有 NGINX 主机,或所有主机,或者你可以监视一个关键指标并将它报告给周围所有标记的主机。本文将告诉你如何做: - -- 在 Datadog 仪表盘上监控 NGINX 指标,对其他所有系统 -- 当一个关键指标急剧变化时设置自动警报来通知你 - -### 配置 NGINX ### - -为了收集 NGINX 指标,首先需要确保 NGINX 已启用 status 模块和一个URL 来报告 status 指标。下面将一步一步展示[配置开源 NGINX ][2]和[NGINX Plus][3]。 - -### 整合 Datadog 和 NGINX ### - -#### 安装 Datadog 代理 #### - -Datadog 代理是 [一个开源软件][4] 能收集和报告你主机的指标,这样就可以使用 Datadog 查看和监控他们。安装代理通常 [仅需要一个命令][5] - -只要你的代理启动并运行着,你会看到你主机的指标报告[在你 Datadog 账号下][6]。 - -![Datadog infrastructure list](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/infra_2.png) - -#### 配置 Agent #### - - -接下来,你需要为代理创建一个简单的 NGINX 配置文件。在你系统中代理的配置目录应该 [在这儿][7]。 - -在目录里面的 conf.d/nginx.yaml.example 中,你会发现[一个简单的配置文件][8],你可以编辑并提供 status URL 和可选的标签为每个NGINX 实例: - - init_config: - - instances: - - - nginx_status_url: http://localhost/nginx_status/ - tags: - - instance:foo - -一旦你修改了 status URLs 和其他标签,将配置文件保存为 conf.d/nginx.yaml。 - -#### 重启代理 #### - - -你必须重新启动代理程序来加载新的配置文件。重新启动命令 [在这里][9] 根据平台的不同而不同。 - -#### 检查配置文件 #### - -要检查 Datadog 和 NGINX 是否正确整合,运行 Datadog 的信息命令。每个平台使用的命令[看这儿][10]。 - -如果配置是正确的,你会看到这样的输出: - - Checks - ====== - - [...] - - nginx - ----- - - instance #0 [OK] - - Collected 8 metrics & 0 events - -#### 安装整合 #### - -最后,在你的 Datadog 帐户里面整合 Nginx。这非常简单,你只要点击“Install Integration”按钮在 [NGINX 集成设置][11] 配置表中。 - -![Install integration](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/install.png) - -### 指标! ### - -一旦代理开始报告 NGINX 指标,你会看到 [一个 NGINX 仪表盘][12] 在你 Datadog 可用仪表盘的列表中。 - -基本的 NGINX 仪表盘显示了几个关键指标 [在我们介绍的 NGINX 监控中][13] 的最大值。 (一些指标,特别是请求处理时间,日志分析,Datadog 不提供。) - -你可以轻松创建一个全面的仪表盘来监控你的整个网站区域通过增加额外的图形与 NGINX 外部的重要指标。例如,你可能想监视你 NGINX 主机的host-level 指标,如系统负载。你需要构建一个自定义的仪表盘,只需点击靠近仪表盘的右上角的选项并选择“Clone Dash”来克隆一个默认的 NGINX 仪表盘。 - -![Clone dash](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/clone_2.png) - -你也可以更高级别的监控你的 NGINX 实例通过使用 Datadog 的 [Host Maps][14] -对于实例,color-coding 你所有的 NGINX 主机通过 CPU 使用率来辨别潜在热点。 - -![](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/nginx-host-map-3.png) - -### NGINX 指标 ### - -一旦 Datadog 捕获并可视化你的指标,你可能会希望建立一些监控自动密切的关注你的指标,并当有问题提醒你。下面将介绍一个典型的例子:一个提醒你 NGINX 吞吐量突然下降时的指标监控器。 - -#### 监控 NGINX 吞吐量 #### - -Datadog 指标警报可以是 threshold-based(当指标超过设定值会警报)或 change-based(当指标的变化超过一定范围会警报)。在这种情况下,我们会采取后一种方式,当每秒传入的请求急剧下降时会提醒我们。下降往往意味着有问题。 - -1.**创建一个新的指标监控**. 从 Datadog 的“Monitors”下拉列表中选择“New Monitor”。选择“Metric”作为监视器类型。 - -![NGINX metric monitor](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_1.png) - -2.**定义你的指标监视器**. 我们想知道 NGINX 每秒总的请求量下降的数量。所以我们在基础设施中定义我们感兴趣的 nginx.net.request_per_s度量和。 - -![NGINX metric](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_2.png) - -3.**设置指标警报条件**.我们想要在变化时警报,而不是一个固定的值,所以我们选择“Change Alert”。我们设置监控为无论何时请求量下降了30%以上时警报。在这里,我们使用一个 one-minute 数据窗口来表示“now” 指标的值,警报横跨该间隔内的平均变化,和之前 10 分钟的指标值作比较。 - -![NGINX metric change alert](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_3.png) - -4.**自定义通知**.如果 NGINX 的请求量下降,我们想要通知我们的团队。在这种情况下,我们将给 ops 队的聊天室发送通知,网页呼叫工程师。在“Say what’s happening”中,我们将其命名为监控器并添加一个短消息将伴随该通知并建议首先开始调查。我们使用 @mention 作为一般警告,使用 ops 并用 @pagerduty [专门给 PagerDuty 发警告][15]。 - -![NGINX metric notification](https://d33tyra1llx9zy.cloudfront.net/blog/images/2015-06-nginx/monitor2_step_4v3.png) - -5.**保存集成监控**.点击页面底部的“Save”按钮。你现在监控的关键指标NGINX [work 指标][16],它边打电话给工程师并在它迅速下时随时分页。 - -### 结论 ### - -在这篇文章中,我们已经通过整合 NGINX 与 Datadog 来可视化你的关键指标,并当你的网络基础架构有问题时会通知你的团队。 - -如果你一直使用你自己的 Datadog 账号,你现在应该在 web 环境中有了很大的可视化提高,也有能力根据你的环境创建自动监控,你所使用的模式,指标应该是最有价值的对你的组织。 - -如果你还没有 Datadog 帐户,你可以注册[免费试用][17],并开始监视你的基础架构,应用程序和现在的服务。 - ----------- -这篇文章的来源在 [on GitHub][18]. 问题,错误,补充等?请[联系我们][19]. - ------------------------------------------------------------- - -via: https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/ - -作者:K Young -译者:[strugglingyouth](https://github.com/译者ID) -校对:[strugglingyouth](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ -[2]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#open-source -[3]:https://www.datadoghq.com/blog/how-to-collect-nginx-metrics/#plus -[4]:https://github.com/DataDog/dd-agent -[5]:https://app.datadoghq.com/account/settings#agent -[6]:https://app.datadoghq.com/infrastructure -[7]:http://docs.datadoghq.com/guides/basic_agent_usage/ -[8]:https://github.com/DataDog/dd-agent/blob/master/conf.d/nginx.yaml.example -[9]:http://docs.datadoghq.com/guides/basic_agent_usage/ -[10]:http://docs.datadoghq.com/guides/basic_agent_usage/ -[11]:https://app.datadoghq.com/account/settings#integrations/nginx -[12]:https://app.datadoghq.com/dash/integration/nginx -[13]:https://www.datadoghq.com/blog/how-to-monitor-nginx/ -[14]:https://www.datadoghq.com/blog/introducing-host-maps-know-thy-infrastructure/ -[15]:https://www.datadoghq.com/blog/pagerduty/ -[16]:https://www.datadoghq.com/blog/monitoring-101-collecting-data/#metrics -[17]:https://www.datadoghq.com/blog/how-to-monitor-nginx-with-datadog/#sign-up -[18]:https://github.com/DataDog/the-monitor/blob/master/nginx/how_to_monitor_nginx_with_datadog.md -[19]:https://github.com/DataDog/the-monitor/issues From 999fbdbcc2b902c5c8e023bd7351d05b6f945c6d Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Mon, 24 Aug 2015 19:40:44 -0500 Subject: [PATCH 1843/2517] KevinSJ translated --- ... open source command-line email clients.md | 80 ------------------- ... open source command-line email clients.md | 80 +++++++++++++++++++ 2 files changed, 80 insertions(+), 80 deletions(-) delete mode 100644 sources/share/20150821 Top 4 open source command-line email clients.md create mode 100644 translated/share/20150821 Top 4 open source command-line email clients.md diff --git a/sources/share/20150821 Top 4 open source command-line email clients.md b/sources/share/20150821 Top 4 open source command-line email clients.md deleted file mode 100644 index afdcd8cf4a..0000000000 --- a/sources/share/20150821 Top 4 open source command-line email clients.md +++ /dev/null @@ -1,80 +0,0 @@ -KevinSJ Translating -Top 4 open source command-line email clients -================================================================================ -![](http://opensource.com/sites/default/files/styles/image-full-size/public/images/life/life_mail.png) - -Like it or not, email isn't dead yet. And for Linux power users who live and die by the command line, leaving the shell to use a traditional desktop or web based email client just doesn't cut it. After all, if there's one thing that the command line excels at, it's letting you process files, and especially text, with uninterrupted efficiency. - -Fortunately, there are a number of great command-line email clients, many with a devoted following of users who can help you get started and answer any questions you might have along the way. But fair warning: once you've mastered one of these clients, you may find it hard to go back to your old GUI-based solution! - -To install any of these four clients is pretty easy; most are available in standard repositories for major Linux distributions, and can be installed with a normal package manager. You may also have luck finding and running them on other operating systems as well, although I haven't tried it and can't speak to the experience. - -### Mutt ### - -- [Project page][1] -- [Source code][2] -- License: [GPLv2][3] - -Many terminal enthusiasts may already have heard of or even be familiar with Mutt and Alpine, which have both been on the scene for many years. Let's first take a look at Mutt. - -Mutt supports many of the features you've come to expect from any email system: message threading, color coding, availability in a number of languages, and lots of configuration options. It supports POP3 and IMAP, the two most common email transfer protocols, and multiple mailbox formats. Having first been released in 1995, Mutt still has an active development community, but in recent years, new releases have focused on bug fixes and security updates rather than new features. That's okay for many Mutt users, though, who are comfortable with the interface and adhere to the project's slogan: "All mail clients suck. This one just sucks less." - -### Alpine ### - -- [Project page][4] -- [Source code][5] -- License: [Apache 2.0][6] - -Alpine is the other well-known client for terminal email, developed at the University of Washington and designed to be an open source, Unicode-friendly alternative to Pine, also originally from UW. - -Designed to be friendly to beginners, but also chocked full of features for advanced users, Alpine also supports a multitude of protocols—IMAP, LDAP, NNTP, POP, SMTP, etc.—as well as different mailbox formats. Alpine is packaged with Pico, a simple text editing utility that many use as a standalone tool, but it also should work with your text editor of choice: vi, Emacs, etc. - -While Alpine is still infrequently updated, there is also a fork, re-alpine, which was created to allow a different set of maintainers to continue the project's development. - -Alpine features contextual help on the screen, which some users may prefer to breaking out the manual with Mutt, but both are well documented. Between Mutt and Alpine, users may want to try both and let personal preference guide their decision, or they may wish to check out a couple of the newer options below. - -### Sup ### - -- [Project page][7] -- [Source code][8] -- License: [GPLv2][9] - -Sup is the first of two of what can be called "high volume email clients" on our list. Described as a "console-based email client for people with a lot of email," Sup's goal is to provide an interface to email with a hierarchical design and to allow tagging of threads for easier organization. - -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 ### - -- [Project page][10] -- [Source code][11] -- License: [GPLv3][12] - -"Sup? Notmuch." Notmuch was written as a response to Sup, originally starting out as a speed-focused rewrite of some portions of Sup to enhance performance. Eventually, the project grew in scope and is now a stand-alone email client. - -Notmuch is also a fairly trim program. It doesn't actually send or receive email messages on its own, and the code which enables Notmuch's super-fast searching is actually designed as a separate library which the program can call. But its modular nature enables you to pick your favorite tools for composing, sending, and receiving, and instead focuses on doing one task and doing it well—efficient browsing and management of your email. - -This list isn’t by any means comprehensive; there are a lot more email clients out there which might be an even better fit for you. What’s your favorite? Did we leave one out that you want to share about? Let us know in the comments below! - --------------------------------------------------------------------------------- - -via: http://opensource.com/life/15/8/top-4-open-source-command-line-email-clients - -作者:[Jason Baker][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://opensource.com/users/jason-baker -[1]:http://www.mutt.org/ -[2]:http://dev.mutt.org/trac/ -[3]:https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html -[4]:http://www.washington.edu/alpine/ -[5]:http://www.washington.edu/alpine/acquire/ -[6]:http://www.apache.org/licenses/LICENSE-2.0 -[7]:http://supmua.org/ -[8]:https://github.com/sup-heliotrope/sup -[9]:https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html -[10]:http://notmuchmail.org/ -[11]:http://notmuchmail.org/releases/ -[12]:http://www.gnu.org/licenses/gpl.html diff --git a/translated/share/20150821 Top 4 open source command-line email clients.md b/translated/share/20150821 Top 4 open source command-line email clients.md new file mode 100644 index 0000000000..db28f4c543 --- /dev/null +++ b/translated/share/20150821 Top 4 open source command-line email clients.md @@ -0,0 +1,80 @@ +KevinSJ Translating +四大开源版命令行邮件客户端 +================================================================================ +![](http://opensource.com/sites/default/files/styles/image-full-size/public/images/life/life_mail.png) + +无论你承认与否,email并没有消亡。对依赖命令行的 Linux 高级用户而言,离开 shell 转而使用传统的桌面或网页版邮件客户端并不合适。归根结底,命令行最善于处理文件,特别是文本文件,能使效率倍增。 + +幸运的是,也有不少的命令行邮件客户端,他们的用户大都乐于帮助你入门并回答你使用中遇到的问题。但别说我没警告过你:一旦你完全掌握了其中一个客户端,要再使用图基于图形界面的客户端将回变得很困难! + +要安装下述四个客户端中的任何一个是非常容易的;主要 Linux 发行版的软件仓库中都提供此类软件,并可通过包管理器进行安装。你也可以再其他的操作系统中寻找并安装这类客户端,但我并未尝试过也没有相关的经验。 + +### Mutt ### + +- [项目主页][1] +- [源代码][2] +- 授权协议: [GPLv2][3] + +许多终端爱好者都听说过甚至熟悉 Mutt 和 Alpine, 他们已经存在多年。让我们先看看 Mutt。 + +Mutt 支持许多你所期望 email 系统支持的功能:会话,颜色区分,支持多语言,同时还有很多设置选项。它支持 POP3 和 IMAP, 两个主要的邮件传输协议,以及许多邮箱格式。自从1995年诞生以来, Mutt 即拥有一个活跃的开发社区,但最近几年,新版本更多的关注于修复问题和安全更新而非提供新功能。这对大多数 Mutt 用户而言并无大碍,他们钟爱这样的界面,并支持此项目的口号:“所有邮件客户端都很烂,只是这个烂的没那么彻底。” + +### Alpine ### + +- [项目主页][4] +- [源代码][5] +- 授权协议: [Apache 2.0][6] + +Alpine 是另一款知名的终端邮件客户端,它由华盛顿大学开发,初衷是作为 UW 开发的 Pine 的开源,支持unicode的替代版本。 + +Alpine 不仅容易上手,还为高级用户提供了很多特性,它支持很多协议 —— IMAP, LDAP, NNTP, POP, SMTP 等,同时也支持不同的邮箱格式。Alpine 内置了一款名为 Pico 的可独立使用的简易文本编辑工具,但你也可以使用你常用的文本编辑器: vi, Emacs等。 + +尽管Alpine的升级并不频繁,名为re-alpine的分支为不同的开发者提供了开发此项目的机会。 + +Alpine 支持再屏幕上显示上下文帮助,但一些用户回喜欢 Mutt 式的独立说明手册,但这两种提供了较好的说明。用户可以同时尝试 Mutt 和 Alpine,并由个人喜好作出决定,也可以尝试以下几个比较新颖的选项。 + +### Sup ### + +- [项目主页][7] +- [源代码][8] +- 授权协议: [GPLv2][9] + +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 ### + +- [项目主页][10] +- [源代码][11] +- 授权协议: [GPLv3][12] + +"Sup? Notmuch." Notmuch 作为 Sup 的回应,最初只是重写了 Sup 的一小部分来提高性能。最终,这个项目逐渐变大并成为了一个独立的邮件客户端。 + +Notmuch是一款相当精简的软件。它并不能独立的收发邮件,启用 Notmuch 的快速搜索功能的代码实际上是一个需要调用的独立库。但这样的模块化设计也使得你能使用你最爱的工具进行写信,发信和收信,集中精力做好一件事情并有效浏览和管理你的邮件。 + +这个列表并不完整,还有很多 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) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://opensource.com/users/jason-baker +[1]:http://www.mutt.org/ +[2]:http://dev.mutt.org/trac/ +[3]:https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html +[4]:http://www.washington.edu/alpine/ +[5]:http://www.washington.edu/alpine/acquire/ +[6]:http://www.apache.org/licenses/LICENSE-2.0 +[7]:http://supmua.org/ +[8]:https://github.com/sup-heliotrope/sup +[9]:https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html +[10]:http://notmuchmail.org/ +[11]:http://notmuchmail.org/releases/ +[12]:http://www.gnu.org/licenses/gpl.html From 27d3c91bd4976c5e27e4a82658f2cb56e59aa5f3 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Mon, 24 Aug 2015 19:47:16 -0500 Subject: [PATCH 1844/2517] KevinSJ Translating --- sources/talk/20150820 Why did you start using Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150820 Why did you start using Linux.md b/sources/talk/20150820 Why did you start using Linux.md index f83742a7a1..3ddf90c560 100644 --- a/sources/talk/20150820 Why did you start using Linux.md +++ b/sources/talk/20150820 Why did you start using Linux.md @@ -1,3 +1,4 @@ +KevinSJ translating Why did you start using Linux? ================================================================================ > In today's open source roundup: What got you started with Linux? Plus: IBM's Linux only Mainframe. And why you should skip Windows 10 and go with Linux @@ -144,4 +145,4 @@ via: http://www.itworld.com/article/2972587/linux/why-did-you-start-using-linux. [1]:https://www.reddit.com/r/linux/comments/3hb2sr/question_for_younger_users_why_did_you_start/ [2]:https://www.reddit.com/r/linux/comments/3hb2sr/question_for_younger_users_why_did_you_start/ [3]:http://techcrunch.com/2015/08/16/ibm-teams-with-canonical-on-linux-mainframe/ -[4]:http://www.zdnet.com/article/sick-of-windows-spying-on-you-go-linux/ \ No newline at end of file +[4]:http://www.zdnet.com/article/sick-of-windows-spying-on-you-go-linux/ From 2f88b1dba1741c25a5c56c3770c81be33b06f009 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 25 Aug 2015 09:14:48 +0800 Subject: [PATCH 1845/2517] translating --- ...tch These Kids Having Fun With Linux Terminal In Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md b/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md index 6adcbbc3bc..3ce51b9379 100644 --- a/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md +++ b/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md @@ -1,3 +1,5 @@ +translating---geekpi + Watch These Kids Having Fun With Linux Terminal In Ubuntu ================================================================================ I found this short video of children having fun with Linux terminals in their computer lab at school. I do not know where do they belong to, but I guess it is either in Indonesia or Malaysia. @@ -34,4 +36,4 @@ via: http://itsfoss.com/ubuntu-terminal-train/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://itsfoss.com/author/abhishek/ \ No newline at end of file +[a]:http://itsfoss.com/author/abhishek/ From 4b56b819865e4dce4e392add7b9860a61437aa52 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Tue, 25 Aug 2015 09:20:24 +0800 Subject: [PATCH 1846/2517] [bazz2 translating]A Look at What's Next for the Linux Kernel --- .../20150820 A Look at What's Next for the Linux Kernel.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150820 A Look at What's Next for the Linux Kernel.md b/sources/talk/20150820 A Look at What's Next for the Linux Kernel.md index 9705fd3a90..e46a4b538d 100644 --- a/sources/talk/20150820 A Look at What's Next for the Linux Kernel.md +++ b/sources/talk/20150820 A Look at What's Next for the Linux Kernel.md @@ -1,3 +1,4 @@ +[bazz22222222222] A Look at What's Next for the Linux Kernel ================================================================================ ![](http://www.eweek.com/imagesvr_ce/485/290x195cilinux1.jpg) @@ -46,4 +47,4 @@ via: http://www.eweek.com/enterprise-apps/a-look-at-whats-next-for-the-linux-ker 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.eweek.com/cp/bio/Sean-Michael-Kerner/ \ No newline at end of file +[a]:http://www.eweek.com/cp/bio/Sean-Michael-Kerner/ From 8c98033bc94605d350e1ff4b7acb89adad181e7d Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 25 Aug 2015 09:32:07 +0800 Subject: [PATCH 1847/2517] translated --- ...aving Fun With Linux Terminal In Ubuntu.md | 39 ------------------- ...aving Fun With Linux Terminal In Ubuntu.md | 37 ++++++++++++++++++ 2 files changed, 37 insertions(+), 39 deletions(-) delete mode 100644 sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md create mode 100644 translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md diff --git a/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md b/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md deleted file mode 100644 index 3ce51b9379..0000000000 --- a/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md +++ /dev/null @@ -1,39 +0,0 @@ -translating---geekpi - -Watch These Kids Having Fun With Linux Terminal In Ubuntu -================================================================================ -I found this short video of children having fun with Linux terminals in their computer lab at school. I do not know where do they belong to, but I guess it is either in Indonesia or Malaysia. - -注:youtube 视频 - - -### Run train in Linux terminal ### - -There is no magic here. It’s just a small command line fun tool called ‘sl’. I presume that it was developed entirely to have some fun when command ls is wrongly typed. If you ever worked on Linux terminal, you know that ls is one of the most commonly used commands and perhaps one of the most frequently mis-typed command as well. - -If you want to have little fun with this terminal train, you can install it using the following command: - - sudo apt-get install sl - -To run the terminal train, just type **sl** in the terminal. It also has the following options: - -- -a : Accident mode. You can see people crying help -- -l : shows a smaller train but with more coaches -- -F : A flying train -- -e : Allows interrupt by Ctrl+C. In other mode you cannot use Ctrl+C to stop the train. But then, it doesn’t run for long. - -Normally, you should hear the whistle as well but it doesn’t work in most of the Linux OS, Ubuntu 14.04 being one of them. Here is the accidental terminal train :) - -![Linux Terminal Train](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Linux_Terminal_Train.jpeg) - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/ubuntu-terminal-train/ - -作者:[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/ diff --git a/translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md b/translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md new file mode 100644 index 0000000000..3d0efff7b5 --- /dev/null +++ b/translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md @@ -0,0 +1,37 @@ +看这些孩子在Ubuntu的Linux终端下玩耍 +================================================================================ +我发现了一个孩子们在他们的计算机教室里玩得很开心的视频。我不知道他们在哪里,但我猜测是在印度尼西亚或者马来西亚。 + +注:youtube 视频 + + +### 在Linux终端下面跑火车 ### + +这里没有魔术。只是一个叫做“sl”的命令行工具。我假定它是在把ls打错的情况下为了好玩而开发的。如果你曾经在Linux的命令行下工作,你会知道ls是一个最常使用的一个命令,也许也是一个最经常打错的命令。 + +如果你想从这个终端下的火车获得一些乐趣,你可以使用下面的命令安装它。 + + sudo apt-get install sl + +要运行终端火车,只需要在终端中输入**sl**。它有以下几个选项: + +- -a : 意外模式。你会看见哭救的群众 +- -l : 显示一个更小的火车但有更多的车厢 +- -F : 一个飞行的火车 +- -e : 允许通过Ctrl+C。使用其他模式你不能使用Ctrl+C中断火车。但是,它不能长时间运行。 + +正常情况下,你应该会听到汽笛声但是在大多数Linux系统下都不管用,Ubuntu是其中一个。这就是一个意外的终端火车。 + +![Linux Terminal Train](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Linux_Terminal_Train.jpeg) + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/ubuntu-terminal-train/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ From 24b14a84926db605be221bff4de094cbc60a5129 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 25 Aug 2015 09:34:06 +0800 Subject: [PATCH 1848/2517] Revert "translated" This reverts commit 8c98033bc94605d350e1ff4b7acb89adad181e7d. --- ...aving Fun With Linux Terminal In Ubuntu.md | 39 +++++++++++++++++++ ...aving Fun With Linux Terminal In Ubuntu.md | 37 ------------------ 2 files changed, 39 insertions(+), 37 deletions(-) create mode 100644 sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md delete mode 100644 translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md diff --git a/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md b/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md new file mode 100644 index 0000000000..3ce51b9379 --- /dev/null +++ b/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md @@ -0,0 +1,39 @@ +translating---geekpi + +Watch These Kids Having Fun With Linux Terminal In Ubuntu +================================================================================ +I found this short video of children having fun with Linux terminals in their computer lab at school. I do not know where do they belong to, but I guess it is either in Indonesia or Malaysia. + +注:youtube 视频 + + +### Run train in Linux terminal ### + +There is no magic here. It’s just a small command line fun tool called ‘sl’. I presume that it was developed entirely to have some fun when command ls is wrongly typed. If you ever worked on Linux terminal, you know that ls is one of the most commonly used commands and perhaps one of the most frequently mis-typed command as well. + +If you want to have little fun with this terminal train, you can install it using the following command: + + sudo apt-get install sl + +To run the terminal train, just type **sl** in the terminal. It also has the following options: + +- -a : Accident mode. You can see people crying help +- -l : shows a smaller train but with more coaches +- -F : A flying train +- -e : Allows interrupt by Ctrl+C. In other mode you cannot use Ctrl+C to stop the train. But then, it doesn’t run for long. + +Normally, you should hear the whistle as well but it doesn’t work in most of the Linux OS, Ubuntu 14.04 being one of them. Here is the accidental terminal train :) + +![Linux Terminal Train](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Linux_Terminal_Train.jpeg) + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/ubuntu-terminal-train/ + +作者:[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/ diff --git a/translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md b/translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md deleted file mode 100644 index 3d0efff7b5..0000000000 --- a/translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md +++ /dev/null @@ -1,37 +0,0 @@ -看这些孩子在Ubuntu的Linux终端下玩耍 -================================================================================ -我发现了一个孩子们在他们的计算机教室里玩得很开心的视频。我不知道他们在哪里,但我猜测是在印度尼西亚或者马来西亚。 - -注:youtube 视频 - - -### 在Linux终端下面跑火车 ### - -这里没有魔术。只是一个叫做“sl”的命令行工具。我假定它是在把ls打错的情况下为了好玩而开发的。如果你曾经在Linux的命令行下工作,你会知道ls是一个最常使用的一个命令,也许也是一个最经常打错的命令。 - -如果你想从这个终端下的火车获得一些乐趣,你可以使用下面的命令安装它。 - - sudo apt-get install sl - -要运行终端火车,只需要在终端中输入**sl**。它有以下几个选项: - -- -a : 意外模式。你会看见哭救的群众 -- -l : 显示一个更小的火车但有更多的车厢 -- -F : 一个飞行的火车 -- -e : 允许通过Ctrl+C。使用其他模式你不能使用Ctrl+C中断火车。但是,它不能长时间运行。 - -正常情况下,你应该会听到汽笛声但是在大多数Linux系统下都不管用,Ubuntu是其中一个。这就是一个意外的终端火车。 - -![Linux Terminal Train](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Linux_Terminal_Train.jpeg) - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/ubuntu-terminal-train/ - -作者:[Abhishek][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ From 373fbde7526c0f45ddd783871703b3dea575a3ee Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 25 Aug 2015 09:34:30 +0800 Subject: [PATCH 1849/2517] Update 20150728 Process of the Linux kernel building.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 校对到200line --- ...28 Process of the Linux kernel building.md | 75 ++++--------------- 1 file changed, 13 insertions(+), 62 deletions(-) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index 6f9368384c..b1c4388e66 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -1,40 +1,25 @@ Translating by Ezio -Process of the Linux kernel building -如何构建Linux 内核的 +如何构建Linux 内核 ================================================================================ 介绍 -------------------------------------------------------------------------------- -I will not tell you how to build and install custom Linux kernel on your machine, you can find many many [resources](https://encrypted.google.com/search?q=building+linux+kernel#q=building+linux+kernel+from+source+code) that will help you to do it. Instead, we will know what does occur when you are typed `make` in the directory with Linux kernel source code in this part. When I just started to learn source code of the Linux kernel, the [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) file was a first file that I've opened. And it was scary :) This [makefile](https://en.wikipedia.org/wiki/Make_%28software%29) contains `1591` lines of code at the time when I wrote this part and it was [third](https://github.com/torvalds/linux/commit/52721d9d3334c1cb1f76219a161084094ec634dc) release candidate. +我不会告诉你怎么在自己的电脑上去构建、安装一个定制化的Linux 内核,这样的[资料](https://encrypted.google.com/search?q=building+linux+kernel#q=building+linux+kernel+from+source+code) 太多了,它们会对你有帮助。本文会告诉你当你在内核源码路径里敲下`make` 时会发生什么。当我刚刚开始学习内核代码时,[Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 是我打开的第一个文件,这个文件看起来真令人害怕 :)。那时候这个[Makefile](https://en.wikipedia.org/wiki/Make_%28software%29) 还只包含了`1591` 行代码,当我开始写本文是,这个[Makefile](https://github.com/torvalds/linux/commit/52721d9d3334c1cb1f76219a161084094ec634dc) 已经是第三个候选版本了。 -我不会告诉你怎么在自己的电脑上去构建、安装一个定制化的Linux 内核,这样的[资料](https://encrypted.google.com/search?q=building+linux+kernel#q=building+linux+kernel+from+source+code) 太多了,它们会对你有帮助。本文会告诉你当你在内核源码路径里敲下`make` 时会发生什么。当我刚刚开始学习内核代码时,[Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 是我打开的第一个文件,这个文件真令人害怕 :)。那时候这个[Makefile](https://en.wikipedia.org/wiki/Make_%28software%29) 包含了`1591` 行代码,当我开始写本文是,这个[Makefile](https://github.com/torvalds/linux/commit/52721d9d3334c1cb1f76219a161084094ec634dc) 已经是第三个候选版本了。 - -This makefile is the the top makefile in the Linux kernel source code and kernel build starts here. Yes, it is big, but moreover, if you've read the source code of the Linux kernel you can noted that all directories with a source code has an own makefile. Of course it is not real to describe how each source files compiled and linked. So, we will see compilation only for the standard case. You will not find here building of the kernel's documentation, cleaning of the kernel source code, [tags](https://en.wikipedia.org/wiki/Ctags) generation, [cross-compilation](https://en.wikipedia.org/wiki/Cross_compiler) related stuff and etc. We will start from the `make` execution with the standard kernel configuration file and will finish with the building of the [bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage). - -It would be good if you're already familiar with the [make](https://en.wikipedia.org/wiki/Make_%28software%29) util, but I will anyway try to describe all code that will be in this part. - -So let's start. - -这个makefile 是Linux 内核代码的顶端makefile ,内核构件就始于此处。是的,它的内容很多,但是如果你已经读过内核源代码,你就会发现每个包含代码的目录都有一个自己的makefile。当然了,我们不会去描述每个代码文件是怎么编译链接的。所以我们将只会挑选一些通用的例子来说明问题,而你不会在这里找到构建内核的文档,如何整洁内核代码, [tags](https://en.wikipedia.org/wiki/Ctags) 的生成,和[交叉编译](https://en.wikipedia.org/wiki/Cross_compiler) 相关的说明,等等。我们将从`make` 开始,使用标准的内核配置文件,到生成了内核镜像[bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage) 结束。 +这个makefile 是Linux 内核代码的根makefile ,内核构建就始于此处。是的,它的内容很多,但是如果你已经读过内核源代码,你就会发现每个包含代码的目录都有一个自己的makefile。当然了,我们不会去描述每个代码文件是怎么编译链接的。所以我们将只会挑选一些通用的例子来说明问题,而你不会在这里找到构建内核的文档、如何整洁内核代码、[tags](https://en.wikipedia.org/wiki/Ctags) 的生成和[交叉编译](https://en.wikipedia.org/wiki/Cross_compiler) 相关的说明,等等。我们将从`make` 开始,使用标准的内核配置文件,到生成了内核镜像[bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage) 结束。 如果你已经很了解[make](https://en.wikipedia.org/wiki/Make_%28software%29) 工具那是最好,但是我也会描述本文出现的相关代码。 让我们开始吧 -Preparation before the kernel compilation 编译内核前的准备 --------------------------------------------------------------------------------- -There are many things to preparate before the kernel compilation will be started. The main point here is to find and configure -the type of compilation, to parse command line arguments that are passed to the `make` util and etc. So let's dive into the top `Makefile` of the Linux kernel. +在开始编译前要进行很多准备工作。最主要的就是找到并配置好配置文件,`make` 命令要使用到的参数都需要从这些配置文件获取。现在就让我们深入内核的根`makefile` 吧 -在开始便以前要进行很多准备工作。最主要的就是找到并配置好配置文件,`make` 命令要使用到的参数都需要从这些配置文件获取。 - -The Linux kernel top `Makefile` is responsible for building two major products: [vmlinux](https://en.wikipedia.org/wiki/Vmlinux) (the resident kernel image) and the modules (any module files). The [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) of the Linux kernel starts from the definition of the following variables: - -内核顶端的`Makefile` 负责构建两个主要的产品:[vmlinux](https://en.wikipedia.org/wiki/Vmlinux) (内核镜像可执行文件)和模块文件。内核的 [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 以次开始: +内核的根`Makefile` 负责构建两个主要的文件:[vmlinux](https://en.wikipedia.org/wiki/Vmlinux) (内核镜像可执行文件)和模块文件。内核的 [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 从此处开始: ```Makefile VERSION = 4 @@ -44,16 +29,12 @@ EXTRAVERSION = -rc3 NAME = Hurr durr I'ma sheep ``` -These variables determine the current version of the Linux kernel and are used in the different places, for example in the forming of the `KERNELVERSION` variable: - 这些变量决定了当前内核的版本,并且被使用在很多不同的地方,比如`KERNELVERSION` : ```Makefile KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) ``` -After this we can see a couple of the `ifeq` condition that check some of the parameters passed to `make`. The Linux kernel `makefiles` provides a special `make help` target that prints all available targets and some of the command line arguments that can be passed to `make`. For example: `make V=1` - provides verbose builds. The first `ifeq` condition checks if the `V=n` option is passed to make: - 接下来我们会看到很多`ifeq` 条件判断语句,它们负责检查传给`make` 的参数。内核的`Makefile` 提供了一个特殊的编译选项`make help` ,这个选项可以生成所有的可用目标和一些能传给`make` 的有效的命令行参数。举个例子,`make V=1` 会在构建过程中输出详细的编译信息,第一个`ifeq` 就是检查传递给make的`V=n` 选项。 ```Makefile @@ -75,9 +56,7 @@ endif export quiet Q KBUILD_VERBOSE ``` -If this option is passed to `make` we set the `KBUILD_VERBOSE` variable to the value of the `V` option. Otherwise we set the `KBUILD_VERBOSE` variable to zero. After this we check value of the `KBUILD_VERBOSE` variable and set values of the `quiet` and `Q` variables depends on the `KBUILD_VERBOSE` value. The `@` symbols suppress the output of the command and if it will be set before a command we will see something like this: `CC scripts/mod/empty.o` instead of the `Compiling .... scripts/mod/empty.o`. In the end we just export all of these variables. The next `ifeq` statement checks that `O=/dir` option was passed to the `make`. This option allows to locate all output files in the given `dir`: - -如果`V=n` 这个选项传给了`make` ,系统就会给变量`KBUILD_VERBOSE` 选项附上`V` 的值,否则的话`KBUILD_VERBOSE` 就会为0。然后系统会检查`KBUILD_VERBOSE` 的值,以此来决定`quiet` 和`Q` 的值。符号`@` 控制命令的输出,如果它被放在一个命令之前,这条命令的执行将会是`CC scripts/mod/empty.o`,而不是`Compiling .... scripts/mod/empty.o`(注:CC 在makefile 中一般都是编译命令)。最后系统仅仅导出所有的变量。下一个`ifeq` 语句检查的是传递给`make` 的选项`O=/dir`,这个选项允许在指定的目录`dir` 输出所有的结果文件: +如果`V=n` 这个选项传给了`make` ,系统就会给变量`KBUILD_VERBOSE` 选项附上`V` 的值,否则的话`KBUILD_VERBOSE` 就会为`0`。然后系统会检查`KBUILD_VERBOSE` 的值,以此来决定`quiet` 和`Q` 的值。符号`@` 控制命令的输出,如果它被放在一个命令之前,这条命令的执行将会是`CC scripts/mod/empty.o`,而不是`Compiling .... scripts/mod/empty.o`(注:CC 在makefile 中一般都是编译命令)。最后系统仅仅导出所有的变量。下一个`ifeq` 语句检查的是传递给`make` 的选项`O=/dir`,这个选项允许在指定的目录`dir` 输出所有的结果文件: ```Makefile ifeq ($(KBUILD_SRC),) @@ -102,15 +81,7 @@ endif # ifneq ($(KBUILD_OUTPUT),) endif # ifeq ($(KBUILD_SRC),) ``` -We check the `KBUILD_SRC` that represent top directory of the source code of the linux kernel and if it is empty (it is empty every time while makefile executes first time) and the set the `KBUILD_OUTPUT` variable to the value that passed with the `O` option (if this option was passed). In the next step we check this `KBUILD_OUTPUT` variable and if we set it, we do following things: - -* Store value of the `KBUILD_OUTPUT` in the temp `saved-output` variable; -* Try to create given output directory; -* Check that directory created, in other way print error; -* If custom output directory created sucessfully, execute `make` again with the new directory (see `-C` option). - -The next `ifeq` statements checks that `C` or `M` options was passed to the make: -系统会检查变量`KBUILD_SRC`,如果他是空的(第一次执行makefile 时总是空的),并且变量`KBUILD_OUTPUT` 被设成了选项`O` 的值(如果这个选项被传进来了),那么这个值就会用来代表内核源码的顶层目录。下一步会检查变量`KBUILD_OUTPUT` ,如果之前设置过这个变量,那么接下来会做一下几件事: +系统会检查变量`KBUILD_SRC`,如果他是空的(第一次执行makefile 时总是空的),并且变量`KBUILD_OUTPUT` 被设成了选项`O` 的值(如果这个选项被传进来了),那么这个值就会用来代表内核源码的顶层目录。下一步会检查变量`KBUILD_OUTPUT` ,如果之前设置过这个变量,那么接下来会做以下几件事: * 将变量`KBUILD_OUTPUT` 的值保存到临时变量`saved-output`; * 尝试创建输出目录; @@ -132,8 +103,6 @@ ifeq ("$(origin M)", "command line") endif ``` -The first `C` option tells to the `makefile` that need to check all `c` source code with a tool provided by the `$CHECK` environment variable, by default it is [sparse](https://en.wikipedia.org/wiki/Sparse). The second `M` option provides build for the external modules (will not see this case in this part). As we set this variables we make a check of the `KBUILD_SRC` variable and if it is not set we set `srctree` variable to `.`: - 第一个选项`C` 会告诉`makefile` 需要使用环境变量`$CHECK` 提供的工具来检查全部`c` 代码,默认情况下会使用[sparse](https://en.wikipedia.org/wiki/Sparse)。第二个选项`M` 会用来编译外部模块(本文不做讨论)。因为设置了这两个变量,系统还会检查变量`KBUILD_SRC`,如果`KBUILD_SRC` 没有被设置,系统会设置变量`srctree` 为`.`: ```Makefile @@ -148,9 +117,7 @@ obj := $(objtree) export srctree objtree VPATH ``` -That tells to `Makefile` that source tree of the Linux kernel will be in the current directory where `make` command was executed. After this we set `objtree` and other variables to this directory and export these variables. The next step is the setting value for the `SUBARCH` variable that will represent what the underlying archicecture is: - -这将会告诉`Makefile` 内核的源码树就在执行make 命令的目录。然后要设置`objtree` 和其他变量为执行make 命令的目录,并且将这些变量导出。接着就是要获取`SUBARCH` 的值,这个变量代表了当前的系统架构(注:一般值CPU 架构): +这将会告诉`Makefile` 内核的源码树就在执行make 命令的目录。然后要设置`objtree` 和其他变量为执行make 命令的目录,并且将这些变量导出。接着就是要获取`SUBARCH` 的值,这个变量代表了当前的系统架构(注:一般都指CPU 架构): ```Makefile SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ @@ -161,8 +128,6 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ ) ``` -As you can see it executes [uname](https://en.wikipedia.org/wiki/Uname) utils that prints information about machine, operating system and architecture. As it will get output of the `uname` util, it will parse it and assign to the `SUBARCH` variable. As we got `SUBARCH`, we set the `SRCARCH` variable that provides directory of the certain architecture and `hfr-arch` that provides directory for the header files: - 如你所见,系统执行[uname](https://en.wikipedia.org/wiki/Uname) 得到机器、操作系统和架构的信息。因为我们得到的是`uname` 的输出,所以我们需要做一些处理在赋给变量`SUBARCH` 。获得`SUBARCH` 之后就要设置`SRCARCH` 和`hfr-arch`,`SRCARCH`提供了硬件架构相关代码的目录,`hfr-arch` 提供了相关头文件的目录: ```Makefile @@ -176,18 +141,13 @@ endif hdr-arch := $(SRCARCH) ``` -Note that `ARCH` is the alias for the `SUBARCH`. In the next step we set the `KCONFIG_CONFIG` variable that represents path to the kernel configuration file and if it was not set before, it will be `.config` by default: - -注意:`ARCH` 是`SUBARCH` 的别名。如果没有设置过代表内核配置文件路径的变量`KCONFIG_CONFIG`,下一步系统会设置他,默认情况下就是`.config` : +注意:`ARCH` 是`SUBARCH` 的别名。如果没有设置过代表内核配置文件路径的变量`KCONFIG_CONFIG`,下一步系统会设置它,默认情况下就是`.config` : ```Makefile KCONFIG_CONFIG ?= .config export KCONFIG_CONFIG ``` - -and the [shell](https://en.wikipedia.org/wiki/Shell_%28computing%29) that will be used during kernel compilation: - -和编译内核过程中要用到的[shell](https://en.wikipedia.org/wiki/Shell_%28computing%29) +以及编译内核过程中要用到的[shell](https://en.wikipedia.org/wiki/Shell_%28computing%29) ```Makefile CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ @@ -195,10 +155,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else echo sh; fi ; fi) ``` -The next set of variables related to the compiler that will be used during Linux kernel compilation. We set the host compilers for the `c` and `c++` and flags for it: - -接下来就要设置一组和编译内核的编译器相关的变量。我们会设置host 的C 和C++ 的编译器及相关配置项: - +接下来就要设置一组和编译内核的编译器相关的变量。我们会设置主机的`C` 和`C++` 的编译器及相关配置项: ```Makefile HOSTCC = gcc @@ -207,9 +164,7 @@ HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-p HOSTCXXFLAGS = -O2 ``` -Next we will meet the `CC` variable that represent compiler too, so why do we need in the `HOST*` variables? The `CC` is the target compiler that will be used during kernel compilation, but `HOSTCC` will be used during compilation of the set of the `host` programs (we will see it soon). After this we can see definition of the `KBUILD_MODULES` and `KBUILD_BUILTIN` variables that are used for the determination of the what to compile (kernel, modules or both): - -然后会去适配代表编译器的变量`CC`,为什么还要`HOST*` 这些选项呢?`CC` 是编译内核过程中要使用的目标架构的编译器,但是`HOSTCC` 是要被用来编译一组`host` 程序的(下面我们就会看到)。然后我们就看看变量`KBUILD_MODULES` 和`KBUILD_BUILTIN` 的定义,这两个变量据欸的那个了我们要编译什么(内核、模块还是其他?): +下一步会去适配代表编译器的变量`CC`,那为什么还要`HOST*` 这些选项呢?这是因为`CC` 是编译内核过程中要使用的目标架构的编译器,但是`HOSTCC` 是要被用来编译一组`host` 程序的(下面我们就会看到)。然后我们就看看变量`KBUILD_MODULES` 和`KBUILD_BUILTIN` 的定义,这两个变量决定了我们要编译什么东西(内核、模块还是其他): ```Makefile KBUILD_MODULES := @@ -220,16 +175,12 @@ ifeq ($(MAKECMDGOALS),modules) endif ``` -Here we can see definition of these variables and the value of the `KBUILD_BUILTIN` will depens on the `CONFIG_MODVERSIONS` kernel configuration parameter if we pass only `modules` to the `make`. The next step is including of the: - -在这我们可以看到这些变量的定义,并且,如果们仅仅传递了`modules` 给`make`,变量`KBUILD_BUILTIN` 会依赖于内核配置选项`CONFIG_MODVERSIONS`。下一步操作是引入: +在这我们可以看到这些变量的定义,并且,如果们仅仅传递了`modules` 给`make`,变量`KBUILD_BUILTIN` 会依赖于内核配置选项`CONFIG_MODVERSIONS`。下一步操作是引入下面的文件: ```Makefile include scripts/Kbuild.include ``` -`kbuild` file. The [Kbuild](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kbuild.txt) or `Kernel Build System` is the special infrastructure to manage building of the kernel and its modules. The `kbuild` files has the same syntax that makefiles. The [scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include) file provides some generic definitions for the `kbuild` system. As we included this `kbuild` files we can see definition of the variables that are related to the different tools that will be used during kernel and modules compilation (like linker, compilers, utils from the [binutils](http://www.gnu.org/software/binutils/) and etc...): - 文件`kbuild` ,[Kbuild](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kbuild.txt) 或者又叫做 `Kernel Build System`是一个用来管理构建内核和模块的特殊框架。`kbuild` 文件的语法与makefile 一样。文件[scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include) 为`kbuild` 系统同提供了一些原生的定义。因为我们包含了这个`kbuild` 文件,我们可以看到和不同工具关联的这些变量的定义,这些工具会在内核和模块编译过程中被使用(比如链接器、编译器、二进制工具包[binutils](http://www.gnu.org/software/binutils/),等等): ```Makefile From 640b23a26acd2f824897e27b7d033398edc16989 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 25 Aug 2015 09:35:53 +0800 Subject: [PATCH 1850/2517] translated --- ...aving Fun With Linux Terminal In Ubuntu.md | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md b/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md index 3ce51b9379..3d0efff7b5 100644 --- a/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md +++ b/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md @@ -1,28 +1,26 @@ -translating---geekpi - -Watch These Kids Having Fun With Linux Terminal In Ubuntu +看这些孩子在Ubuntu的Linux终端下玩耍 ================================================================================ -I found this short video of children having fun with Linux terminals in their computer lab at school. I do not know where do they belong to, but I guess it is either in Indonesia or Malaysia. +我发现了一个孩子们在他们的计算机教室里玩得很开心的视频。我不知道他们在哪里,但我猜测是在印度尼西亚或者马来西亚。 注:youtube 视频 -### Run train in Linux terminal ### +### 在Linux终端下面跑火车 ### -There is no magic here. It’s just a small command line fun tool called ‘sl’. I presume that it was developed entirely to have some fun when command ls is wrongly typed. If you ever worked on Linux terminal, you know that ls is one of the most commonly used commands and perhaps one of the most frequently mis-typed command as well. +这里没有魔术。只是一个叫做“sl”的命令行工具。我假定它是在把ls打错的情况下为了好玩而开发的。如果你曾经在Linux的命令行下工作,你会知道ls是一个最常使用的一个命令,也许也是一个最经常打错的命令。 -If you want to have little fun with this terminal train, you can install it using the following command: +如果你想从这个终端下的火车获得一些乐趣,你可以使用下面的命令安装它。 sudo apt-get install sl -To run the terminal train, just type **sl** in the terminal. It also has the following options: +要运行终端火车,只需要在终端中输入**sl**。它有以下几个选项: -- -a : Accident mode. You can see people crying help -- -l : shows a smaller train but with more coaches -- -F : A flying train -- -e : Allows interrupt by Ctrl+C. In other mode you cannot use Ctrl+C to stop the train. But then, it doesn’t run for long. +- -a : 意外模式。你会看见哭救的群众 +- -l : 显示一个更小的火车但有更多的车厢 +- -F : 一个飞行的火车 +- -e : 允许通过Ctrl+C。使用其他模式你不能使用Ctrl+C中断火车。但是,它不能长时间运行。 -Normally, you should hear the whistle as well but it doesn’t work in most of the Linux OS, Ubuntu 14.04 being one of them. Here is the accidental terminal train :) +正常情况下,你应该会听到汽笛声但是在大多数Linux系统下都不管用,Ubuntu是其中一个。这就是一个意外的终端火车。 ![Linux Terminal Train](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/04/Linux_Terminal_Train.jpeg) @@ -31,7 +29,7 @@ Normally, you should hear the whistle as well but it doesn’t work in most of t via: http://itsfoss.com/ubuntu-terminal-train/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 2fccde8110f326870b455cc0613c4ac8a6f96b69 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 25 Aug 2015 09:38:06 +0800 Subject: [PATCH 1851/2517] Rename sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md to translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md --- ...4 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md (100%) diff --git a/sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md b/translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md similarity index 100% rename from sources/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md rename to translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md From 734846d1c71a5a96351b16d5d8b0e2913bf78df6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 25 Aug 2015 09:41:56 +0800 Subject: [PATCH 1852/2517] translating --- ...0824 Basics Of NetworkManager Command Line Tool Nmcli.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md b/sources/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md index 577411f58a..d911cfcc0e 100644 --- a/sources/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md +++ b/sources/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md @@ -1,4 +1,6 @@ - Basics Of NetworkManager Command Line Tool, Nmcli +translating----geekpi + +Basics Of NetworkManager Command Line Tool, Nmcli ================================================================================ ![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/08/networking1.jpg) @@ -150,4 +152,4 @@ via: http://www.unixmen.com/basics-networkmanager-command-line-tool-nmcli/ 译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From e156ecf77804e1661f6625c3d9dac3a81cbf37f2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 25 Aug 2015 10:16:45 +0800 Subject: [PATCH 1853/2517] translated --- ... NetworkManager Command Line Tool Nmcli.md | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) rename {sources => translated}/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md (62%) diff --git a/sources/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md b/translated/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md similarity index 62% rename from sources/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md rename to translated/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md index d911cfcc0e..5ddb31d1ea 100644 --- a/sources/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md +++ b/translated/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md @@ -1,20 +1,18 @@ -translating----geekpi - -Basics Of NetworkManager Command Line Tool, Nmcli +网络管理命令行工具基础,Nmcli ================================================================================ ![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/08/networking1.jpg) -### Introduction ### +### 介绍 ### -In this tutorial, we will discuss NetworkManager command line tool, aka **nmcli**, in CentOS / RHEL 7. Users who are using **ifconfig** should avoid this command in Centos 7. +在本教程中,我们会在CentOS / RHEL 7中讨论网络管理工具,也叫**nmcli**。那些使用**ifconfig**的用户应该在CentOS 7中避免使用这个命令。 -Lets configure some networking settings with nmcli utility. +让我们用nmcli工具配置一些网络设置。 -#### To get all address information of all interfaces connected with System #### +### 要得到系统中所有接口的地址信息 ### [root@localhost ~]# ip addr show -**Sample Output:** +**示例输出:** 1: lo: mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 @@ -29,53 +27,53 @@ Lets configure some networking settings with nmcli utility. inet6 fe80::20c:29ff:fe67:2f4c/64 scope link valid_lft forever preferred_lft forever -#### To retrieve packets statistics related with connected interfaces #### +#### 检索与连接的接口相关的数据包统计 #### [root@localhost ~]# ip -s link show eno16777736 -**Sample Output:** +**示例输出:** ![unxmen_(011)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0111.png) -#### Get routing configuration #### +#### 得到路由配置 #### [root@localhost ~]# ip route -Sample Output: +示例输出: default via 192.168.1.1 dev eno16777736 proto static metric 100 192.168.1.0/24 dev eno16777736 proto kernel scope link src 192.168.1.51 metric 100 -#### Analyze path for some host/website #### +#### 分析主机/网站路径 #### [root@localhost ~]# tracepath unixmen.com -Output will be just like traceroute but in more managed form. +输出像traceroute,但是更加完整。 ![unxmen_0121](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_01211.png) -### nmcli utility ### +### nmcli 工具 ### -**Nmcli** is a very rich and flexible command line utility. some of the terms used in nmcli are: +**Nmcli** 是一个非常丰富和灵活的命令行工具。nmcli使用的情况有: -- **Device** – A network interface being used. -- **Connection** – A set of configuration settings, for a single device you can have multiple connections, you can switch between connections. +- **设备** – 正在使用的网络接口 +- **连接** – 一组配置设置,对于一个单一的设备可以有多个连接,可以在连接之间切换。 -#### Find out how many connections are available for how many devices #### +#### 找出有多少连接服务于多少设备 #### [root@localhost ~]# nmcli connection show ![unxmen_(013)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_013.png) -#### Get details of a specific connection #### +#### 得到特定连接的详情 #### [root@localhost ~]# nmcli connection show eno1 -**Sample output:** +**示例输出:** ![unxmen_(014)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0141.png) -#### Get the Network device status #### +#### 得到网络设备状态 #### [root@localhost ~]# nmcli device status @@ -85,71 +83,73 @@ Output will be just like traceroute but in more managed form. eno16777736 ethernet connected eno1 lo loopback unmanaged -- -#### Create a new connection with “dhcp” #### +#### 使用“dhcp”创建新的连接 #### [root@localhost ~]# nmcli connection add con-name "dhcp" type ethernet ifname eno16777736 -Where, +这里, -- **Connection add** – To add new connection -- **con-name** – connection name -- **type** – type of device -- **ifname** – interface name +- **Connection add** – 添加新的连接 +- **con-name** – 连接名 +- **type** – 设备类型 +- **ifname** – 接口名 -This command will add connection with dhcp protocol. +这个命令会使用dhcp协议添加连接 -**Sample output:** +**示例输出:** Connection 'dhcp' (163a6822-cd50-4d23-bb42-8b774aeab9cb) successfully added. -#### Instead of assigning an IP via dhcp, you can add ip address as “static” #### +#### 不同过dhcp分配IP,使用“static”添加地址 #### [root@localhost ~]# nmcli connection add con-name "static" ifname eno16777736 autoconnect no type ethernet ip4 192.168.1.240 gw4 192.168.1.1 -**Sample Output:** +**示例输出:** Connection 'static' (8e69d847-03d7-47c7-8623-bb112f5cc842) successfully added. -**Update connection:** +**更新连接:** [root@localhost ~]# nmcli connection up eno1 Again Check, whether ip address is changed or not. +再检查一遍,ip地址是否已经改变 [root@localhost ~]# ip addr show ![unxmen_(015)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0151.png) -#### Add DNS settings to Static connections. #### +#### 添加DNS设置到静态连接中 #### [root@localhost ~]# nmcli connection modify "static" ipv4.dns 202.131.124.4 -#### Add additional DNS value. #### +#### 添加额外的DNS值 #### [root@localhost ~]# nmcli connection modify "static" +ipv4.dns 8.8.8.8 -**Note**: For additional entries **+** symbol will be used and **+ipv4.dns** will be used instead on **ip4.dns** +**注意**:要使用额外的**+**符号,并且要是**+ipv4.dns**,而不是**ip4.dns**。 -Put an additional ip address: + +添加一个额外的ip地址: [root@localhost ~]# nmcli connection modify "static" +ipv4.addresses 192.168.200.1/24 -Refresh settings using command: +使用命令刷新设置: [root@localhost ~]# nmcli connection up eno1 ![unxmen_(016)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_016.png) -You will see, setting are effective now. +你会看见,设置生效了。 -That’s it. +完结 -------------------------------------------------------------------------------- via: http://www.unixmen.com/basics-networkmanager-command-line-tool-nmcli/ 作者:Rajneesh Upadhyay -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From dec3d0e0bde984923c90b288293efabd641d9a4a Mon Sep 17 00:00:00 2001 From: bazz2 Date: Tue, 25 Aug 2015 11:59:20 +0800 Subject: [PATCH 1854/2517] [translated by bazz2]A Look at What's Next for the Linux Kernel --- ...ook at What's Next for the Linux Kernel.md | 50 ------------------- ...ook at What's Next for the Linux Kernel.md | 49 ++++++++++++++++++ 2 files changed, 49 insertions(+), 50 deletions(-) delete mode 100644 sources/talk/20150820 A Look at What's Next for the Linux Kernel.md create mode 100644 translated/talk/20150820 A Look at What's Next for the Linux Kernel.md diff --git a/sources/talk/20150820 A Look at What's Next for the Linux Kernel.md b/sources/talk/20150820 A Look at What's Next for the Linux Kernel.md deleted file mode 100644 index e46a4b538d..0000000000 --- a/sources/talk/20150820 A Look at What's Next for the Linux Kernel.md +++ /dev/null @@ -1,50 +0,0 @@ -[bazz22222222222] -A Look at What's Next for the Linux Kernel -================================================================================ -![](http://www.eweek.com/imagesvr_ce/485/290x195cilinux1.jpg) - -**The upcoming Linux 4.2 kernel will have more contributors than any other Linux kernel in history, according to Linux kernel developer Jonathan Corbet.** - -SEATTLE—The Linux kernel continues to grow—both in lines of code and the number of developers that contribute to it—yet some challenges need to be addressed. That was one of the key messages from Linux kernel developer Jonathan Corbet during his annual Kernel Report session at the LinuxCon conference here. - -The Linux 4.2 kernel is still under development, with general availability expected on Aug. 23. Corbet noted that 1,569 developers have contributed code for the Linux 4.2 kernel. Of those, 277 developers made their first contribution ever, during the Linux 4.2 development cycle. - -Even as more developers are coming to Linux, the pace of development and releases is very fast, Corbet said. He estimates that it now takes approximately 63 days for the community to build a new Linux kernel milestone. - -Linux 4.2 will benefit from a number of improvements that have been evolving in Linux over the last several releases. One such improvement is the introduction of OverlayFS, a new type of read-only file system that is useful because it can enable many containers to be layered on top of each other, Corbet said. - -Linux networking also is set to improve small packet performance, which is important for areas such as high-frequency financial trading. The improvements are aimed at reducing the amount of time and power needed to process each data packet, Corbet said. - -New drivers are always being added to Linux. On average, there are 60 to 80 new or updated drivers added in every Linux kernel development cycle, Corbet said. - -Another key area that continues to improve is that of Live Kernel patching, first introduced in the Linux 4.0 kernel. With live kernel patching, the promise is that a system administrator can patch a live running kernel without the need to reboot a running production system. While the basic elements of live kernel patching are in the kernel already, work is under way to make the technology all work with the right level of consistency and stability, Corbet explained. - -**Linux Security, IoT and Other Concerns** - -Security has been a hot topic in the open-source community in the past year due to high-profile issues, including Heartbleed and Shellshock. - -"I don't doubt there are some unpleasant surprises in the neglected Linux code at this point," Corbet said. - -He noted that there are more than 3 millions lines of code in the Linux kernel today that have been untouched in the last decade by developers and that the Shellshock vulnerability was a flaw in 20-year-old code that hadn't been looked at in some time. - -Another issue that concerns Corbet is the Unix 2038 issue—the Linux equivalent of the Y2K bug, which could have caused global havoc in the year 2000 if it hadn't been fixed. With the 2038 issue, there is a bug that could shut down Linux and Unix machines in the year 2038. Corbet said that while 2038 is still 23 years away, there are systems being deployed now that will be in use in the 2038. - -Some initial work took place to fix the 2038 flaw in Linux, but much more remains to be done, Corbet said. "The time to fix this is now, not 20 years from now in a panic when we're all trying to enjoy our retirement," Corbet said. - -The Internet of things (IoT) is another area of Linux concern for Corbet. Today, Linux is a leading embedded operating system for IoT, but that might not always be the case. Corbet is concerned that the Linux kernel's growth is making it too big in terms of memory footprint to work in future IoT devices. - -A Linux project is now under way to minimize the size of the Linux kernel, and it's important that it gets the support it needs, Corbet said. - -"Either Linux is suitable for IoT, or something else will come along and that something else might not be as free and open as Linux," Corbet said. "We can't assume the continued dominance of Linux in IoT. We have to earn it. We have to pay attention to stuff that makes the kernel bigger." - --------------------------------------------------------------------------------- - -via: http://www.eweek.com/enterprise-apps/a-look-at-whats-next-for-the-linux-kernel.html - -作者:[Sean Michael Kerner][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.eweek.com/cp/bio/Sean-Michael-Kerner/ diff --git a/translated/talk/20150820 A Look at What's Next for the Linux Kernel.md b/translated/talk/20150820 A Look at What's Next for the Linux Kernel.md new file mode 100644 index 0000000000..daf3e4d0e3 --- /dev/null +++ b/translated/talk/20150820 A Look at What's Next for the Linux Kernel.md @@ -0,0 +1,49 @@ +Linux 内核的发展方向 +================================================================================ +![](http://www.eweek.com/imagesvr_ce/485/290x195cilinux1.jpg) + +**即将到来的 Linux 4.2 内核涉及到史上最多的贡献者数量,内核开发者 Jonathan Corbet 如是说。** + +来自西雅图。Linux 内核持续增长:代码量在增加,代码贡献者数量也在增加。而随之而来的一些挑战需要处理一下。以上是 Jonathan Corbet 在今年的 LinuxCon 的内核年度报告上提出的主要观点。以下是他的主要演讲内容: + +Linux 4.2 内核依然处于开发阶段,预计在8月23号释出。Corbet 强调有 1569 名开发者为这个版本贡献了代码,其中 277 名是第一次提交代码。 + +越来越多的开发者的加入,内核更新非常快,Corbet 估计现在大概 63 天就能产生一个新的内核里程碑。 + +Linux 4.2 涉及多方面的更新。其中一个就是引进了 OverLayFS,这是一种只读型文件系统,它可以实现在一个容器之上再放一个容器。 + +网络系统对小包传输性能也有了提升,这对于高频传输领域如金融交易而言非常重要。提升的方面主要集中在减小处理数据包的时间的能耗。 + +依然有新的驱动中加入内核。在每个内核发布周期,平均会有 60 到 80 个新增或升级驱动中加入。 + +另一个主要更新是实时内核补丁,这个特性在 4.0 版首次引进,好处是系统管理员可以在生产环境中打上内核补丁而不需要重启系统。当补丁所需要的元素都已准备就绪,打补丁的过程会在后台持续而稳定地进行。 + +**Linux 安全, IoT 和其他关注点 ** + +过去一年中,安全问题在开源社区是一个很热的话题,这都归因于那些引发高度关注的事件,比如 Heartbleed 和 Shellshock。 + +“我毫不怀疑 Linux 代码对这些方面的忽视会产生一些令人不悦的问题”,Corbet 原话。 + +他强调说过去 10 年间有超过 3 百万行代码不再被开发者修改,而产生 Shellshock 漏洞的代码的年龄已经是 20 岁了,近年来更是无人问津。 + +另一个关注点是 2038 问题,Linux 界的“千年虫”,如果不解决,2000 年出现过的问题还会重现。2038 问题说的是在 2038 年一些 Linux 和 Unix 机器会死机(LCTT:32 位系统记录的时间,在2038年1月19日星期二晚上03:14:07之后的下一秒,会变成负数)。Corbet 说现在离 2038 年还有 23 年时间,现在部署的系统都会考虑 2038 问题。 + +Linux 已经开始一些初步的方案来修复 2038 问题了,但做的还远远不够。“现在就要修复这个问题,而不是等 20 年后把这个头疼的问题留给下一代解决,我们却享受着退休的美好时光”。 + +物联网(IoT)也是 Linux 关注的领域,Linux 是物联网嵌入式操作系统的主要占有者,然而这并没有什么卵用。Corget 认为日渐臃肿的内核对于未来的物联网设备来说肯定过于庞大。 + +现在有一个项目就是做内核最小化的,获取足够的支持对于这个项目来说非常重要。 + +“除了 Linux 之外,也有其他项目可以做物联网,但那些项目不会像 Linux 一样开放”,Corbet 说,“我们不能指望 Linux 在物联网领域一直保持优势,我们需要靠自己的努力去做到这点,我们需要注意不能让内核变得越来越臃肿。” + +-------------------------------------------------------------------------------- + +via: http://www.eweek.com/enterprise-apps/a-look-at-whats-next-for-the-linux-kernel.html + +作者:[Sean Michael Kerner][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.eweek.com/cp/bio/Sean-Michael-Kerner/ From bb90b935cb19af90b0dd9a5b118f0e5e3cd185f3 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Tue, 25 Aug 2015 12:04:59 +0800 Subject: [PATCH 1855/2517] [translating by bazz2]Linuxcon--The Changing Role of the Server OS --- .../20150819 Linuxcon--The Changing Role of the Server OS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md b/sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md index 8f6d80c7e9..832cb6a30a 100644 --- a/sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md +++ b/sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md @@ -1,3 +1,4 @@ +[bazz2222222] Linuxcon: The Changing Role of the Server OS ================================================================================ SEATTLE - Containers might one day change the world, but it will take time and it will also change the role of the operating system. That's the message delivered during a Linuxcon keynote here today by Wim Coekaerts, SVP Linux and virtualization engineering at Oracle. @@ -46,4 +47,4 @@ via: http://www.serverwatch.com/server-news/linuxcon-the-changing-role-of-the-se 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.serverwatch.com/author/Sean-Michael-Kerner-101580.htm \ No newline at end of file +[a]:http://www.serverwatch.com/author/Sean-Michael-Kerner-101580.htm From 451807e602f9dc33916e0a76e9056e582440b778 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Tue, 25 Aug 2015 14:18:53 +0800 Subject: [PATCH 1856/2517] [translated by bazz2]Linuxcon--The Changing Role of the Server OS --- ...con--The Changing Role of the Server OS.md | 50 ------------------- ...con--The Changing Role of the Server OS.md | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 50 deletions(-) delete mode 100644 sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md create mode 100644 translated/talk/20150819 Linuxcon--The Changing Role of the Server OS.md diff --git a/sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md b/sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md deleted file mode 100644 index 832cb6a30a..0000000000 --- a/sources/talk/20150819 Linuxcon--The Changing Role of the Server OS.md +++ /dev/null @@ -1,50 +0,0 @@ -[bazz2222222] -Linuxcon: The Changing Role of the Server OS -================================================================================ -SEATTLE - Containers might one day change the world, but it will take time and it will also change the role of the operating system. That's the message delivered during a Linuxcon keynote here today by Wim Coekaerts, SVP Linux and virtualization engineering at Oracle. - -![](http://www.serverwatch.com/imagesvr_ce/6421/wim-200x150.jpg) - -Coekaerts started his presentation by putting up a slide stating it's the year of the desktop, which generated a few laughs from the audience. Oracle Wim Coekarts Truly, though, Coekaerts said it is now apparent that 2015 is the year of the container, and more importantly the year of the application, which is what containers really are all about. - -"What do you need an operating system for?" Coekaerts asked. "It's really just there to run an application; an operating system is there to manage hardware and resources so your app can run." - -Coekaerts added that with Docker containers, the focus is once again on the application. At Oracle, Coekaerts said much of the focus is on how to make the app run better on the OS. - -"Many people are used to installing apps, but many of the younger generation just click a button on their mobile device and it runs," Coekaerts said. - -Coekaerts said that people now wonder why it's more complex in the enterprise to install software, and Docker helps to change that. - -"The role of the operating system is changing," Coekaerts said. - -The rise of Docker does not mean the demise of virtual machines (VMs), though. Coekaerts said it will take a very long time for things to mature in the containerization space and get used in real world. - -During that period VMs and containers will co-exist and there will be a need for transition and migration tools between containers and VMs. For example, Coekaerts noted that Oracle's VirtualBox open-source technology is widely used on desktop systems today as a way to help users run Docker. The Docker Kitematic project makes use of VirtualBox to boot Docker on Macs today. - -### The Open Compute Initiative and Write Once, Deploy Anywhere for Containers ### - -A key promise that needs to be enabled for containers to truly be successful is the concept of write once, deploy anywhere. That's an area where the Linux Foundations' Open Compute Initiative (OCI) will play a key role in enabling interoperability across container runtimes. - -"With OCI, it will make it easier to build once and run anywhere, so what you package locally you can run wherever you want," Coekaerts said. - -Overall, though, Coekaerts said that while there is a lot of interest in moving to the container model, it's not quite ready yet. He noted Oracle is working on certifying its products to run in containers, but it's a hard process. - -"Running the database is easy; it's everything else around it that is complex," Coekaerts said. "Containers don't behave the same as VMs, and some applications depend on low-level system configuration items that are not exposed from the host to the container." - -Additionally, Coekaerts commented that debugging problems inside a container is different than in a VM, and there is currently a lack of mature tools for proper container app debugging. - -Coekaerts emphasized that as containers matures it's important to not forget about the existing technology that organizations use to run and deploy applications on servers today. He said enterprises don't typically throw out everything they have just to start with new technology. - -"Deploying new technology is hard, and you need to be able to transition from what you have," Coekaerts said. "The technology that allows you to transition easily is the technology that wins." - --------------------------------------------------------------------------------- - -via: http://www.serverwatch.com/server-news/linuxcon-the-changing-role-of-the-server-os.html - -作者:[Sean Michael Kerner][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.serverwatch.com/author/Sean-Michael-Kerner-101580.htm diff --git a/translated/talk/20150819 Linuxcon--The Changing Role of the Server OS.md b/translated/talk/20150819 Linuxcon--The Changing Role of the Server OS.md new file mode 100644 index 0000000000..98a0f94b03 --- /dev/null +++ b/translated/talk/20150819 Linuxcon--The Changing Role of the Server OS.md @@ -0,0 +1,50 @@ +LinuxCon: 服务器操作系统的转型 +================================================================================ +来自西雅图。容器迟早要改变世界,以及改变操作系统的角色。这是 Wim Coekaerts 带来的 LinuxCon 演讲主题,Coekaerts 是 Oracle 公司 Linux 与虚拟化工程的高级副总裁。 + +![](http://www.serverwatch.com/imagesvr_ce/6421/wim-200x150.jpg) + +Coekaerts 在开始演讲的时候拿出一张关于“桌面之年”的幻灯片,引发了现场观众的一片笑声。之后他说 2015 年很明显是容器之年,更是应用之年,应用才是容器的关键。 + +“你需要操作系统做什么事情?”,Coekaerts 回答现场观众:“只需一件事:运行一个应用。操作系统负责管理硬件和资源,来让你的应用运行起来。” + +Coakaerts 说在 Docker 容器的帮助下,我们的注意力再次集中在应用上,而在 Oracle,我们将注意力放在如何让应用更好地运行在操作系统上。 + +“许多人过去常常需要繁琐地安装应用,而现在的年轻人只需要按一个按钮就能让应用在他们的移动设备上运行起来”。 + +人们对安装企业版的软件需要这么复杂的步骤而感到惊讶,而 Docker 帮助他们脱离了这片苦海。 + +“操作系统的角色已经变了。” Coekaerts 说。 + +Docker 的出现不代表虚拟机的淘汰,容器化过程需要经过很长时间才能变得成熟,然后才能在世界范围内得到应用。 + +在这段时间内,容器会与虚拟机共存,并且我们需要一些工具,将应用在容器和虚拟机之间进行转换迁移。Coekaerts 举例说 Oracle 的 VirtualBox 就可以用来帮助用户运行 Docker,而它原来是被广泛用在桌面系统上的一项开源技术。现在 Docker 的 Kitematic 项目将在 Mac 上使用 VirtualBox 运行 Docker。 + +### The Open Compute Initiative and Write Once, Deploy Anywhere for Containers ### +### 容器的开放计算计划和一次写随处部署 ### + +一个能让容器成功的关键是“一次写,随处部署”的概念。而在容器之间的互操作领域,Linux 基金会的开放计算计划(OCI)扮演一个非常关键的角色。 + +“使用 OCI,应用编译一次后就可以很方便地在多地运行,所以你可以将你的应用部署在任何地方”。 + +Coekaerts 总结说虽然在迁移到容器模型过程中会发生很多好玩的事情,但容器还没真正做好准备,他强调 Oracle 现在正在验证将产品运行在容器内的可行性,但这是一个非常艰难的过程。 + +“运行数据库很简单,难的是要搞定数据库所需的环境”,Coekaerts 说:“容器与虚拟机不一样,一些需要依赖底层系统配置的应用无法从主机迁移到容器中。” + +另外,Coekaerts 指出在容器内调试问题与在虚拟机内调试问题也是不一样的,现在还没有成熟的工具来进行容器应用的调试。 + +Coekaerts 强调当容器足够成熟时,有一点很重要:不要抛弃现有的技术。组织和企业不能抛弃现有的部署好的应用,而完全投入新技术的怀抱。 + +“部署新技术是很困难的事情,你需要缓慢地迁移过去,能让你顺利迁移的技术才是成功的技术。”Coekaerts 说。 + +-------------------------------------------------------------------------------- + +via: http://www.serverwatch.com/server-news/linuxcon-the-changing-role-of-the-server-os.html + +作者:[Sean Michael Kerner][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.serverwatch.com/author/Sean-Michael-Kerner-101580.htm From 82d34ad4dac28b9c63901c546981e892d2da581b Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 25 Aug 2015 14:54:10 +0800 Subject: [PATCH 1857/2517] PUB:20150209 Install OpenQRM Cloud Computing Platform In Debian @FSSlc --- ...nQRM Cloud Computing Platform In Debian.md | 84 ++++++++++--------- 1 file changed, 43 insertions(+), 41 deletions(-) rename {translated/tech => published}/20150209 Install OpenQRM Cloud Computing Platform In Debian.md (54%) diff --git a/translated/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md b/published/20150209 Install OpenQRM Cloud Computing Platform In Debian.md similarity index 54% rename from translated/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md rename to published/20150209 Install OpenQRM Cloud Computing Platform In Debian.md index 2eacc933b9..fdaa039b2f 100644 --- a/translated/tech/20150209 Install OpenQRM Cloud Computing Platform In Debian.md +++ b/published/20150209 Install OpenQRM Cloud Computing Platform In Debian.md @@ -1,48 +1,49 @@ 在 Debian 中安装 OpenQRM 云计算平台 ================================================================================ + ### 简介 ### **openQRM**是一个基于 Web 的开源云计算和数据中心管理平台,可灵活地与企业数据中心的现存组件集成。 它支持下列虚拟技术: -- KVM, -- XEN, -- Citrix XenServer, -- VMWare ESX, -- LXC, -- OpenVZ. +- KVM +- XEN +- Citrix XenServer +- VMWare ESX +- LXC +- OpenVZ -openQRM 中的杂交云连接器通过 **Amazon AWS**, **Eucalyptus** 或 **OpenStack** 来支持一系列的私有或公有云提供商,以此来按需扩展你的基础设施。它也自动地进行资源调配、 虚拟化、 存储和配置管理,且关注高可用性。集成计费系统的自助服务云门户可使终端用户按需请求新的服务器和应用堆栈。 +openQRM 中的混合云连接器支持 **Amazon AWS**, **Eucalyptus** 或 **OpenStack** 等一系列的私有或公有云提供商,以此来按需扩展你的基础设施。它也可以自动地进行资源调配、 虚拟化、 存储和配置管理,且保证高可用性。集成的计费系统的自服务云门户可使终端用户按需请求新的服务器和应用堆栈。 openQRM 有两种不同风格的版本可获取: - 企业版 - 社区版 -你可以在[这里][1] 查看这两个版本间的区别。 +你可以在[这里][1]查看这两个版本间的区别。 ### 特点 ### -- 私有/杂交的云计算平台; -- 可管理物理或虚拟的服务器系统; -- 可与所有主流的开源或商业的存储技术集成; -- 跨平台: Linux, Windows, OpenSolaris, and BSD; -- 支持 KVM, XEN, Citrix XenServer, VMWare ESX(i), lxc, OpenVZ 和 VirtualBox; -- 支持使用额外的 Amazon AWS, Eucalyptus, Ubuntu UEC 等云资源来进行杂交云设置; -- 支持 P2V, P2P, V2P, V2V 迁移和高可用性; -- 集成最好的开源管理工具 – 如 puppet, nagios/Icinga 或 collectd; -- 有超过 50 个插件来支持扩展功能并与你的基础设施集成; -- 针对终端用户的自助门户; -- 集成计费系统. +- 私有/混合的云计算平台 +- 可管理物理或虚拟的服务器系统 +- 集成了所有主流的开源或商业的存储技术 +- 跨平台: Linux, Windows, OpenSolaris 和 BSD +- 支持 KVM, XEN, Citrix XenServer, VMWare ESX(i), lxc, OpenVZ 和 VirtualBox +- 支持使用额外的 Amazon AWS, Eucalyptus, Ubuntu UEC 等云资源来进行混合云设置 +- 支持 P2V, P2P, V2P, V2V 迁移和高可用性 +- 集成最好的开源管理工具 – 如 puppet, nagios/Icinga 或 collectd +- 有超过 50 个插件来支持扩展功能并与你的基础设施集成 +- 针对终端用户的自服务门户 +- 集成了计费系统 ### 安装 ### -在这里我们将在 in Debian 7.5 上安装 openQRM。你的服务器必须至少满足以下要求: +在这里我们将在 Debian 7.5 上安装 openQRM。你的服务器必须至少满足以下要求: -- 1 GB RAM; -- 100 GB Hdd(硬盘驱动器); -- 可选: Bios 支持虚拟化(Intel CPUs 的 VT 或 AMD CPUs AMD-V). +- 1 GB RAM +- 100 GB Hdd(硬盘驱动器) +- 可选: Bios 支持虚拟化(Intel CPUs 的 VT 或 AMD CPUs AMD-V) 首先,安装 `make` 软件包来编译 openQRM 源码包: @@ -52,7 +53,7 @@ openQRM 有两种不同风格的版本可获取: 然后,逐次运行下面的命令来安装 openQRM。 -从[这里][2] 下载最新的可用版本: +从[这里][2]下载最新的可用版本: wget http://sourceforge.net/projects/openqrm/files/openQRM-Community-5.1/openqrm-community-5.1.tgz @@ -66,35 +67,35 @@ openQRM 有两种不同风格的版本可获取: sudo make start -安装期间,你将被询问去更新文件 `php.ini` +安装期间,会要求你更新文件 `php.ini` -![~-openqrm-community-5.1-src_001](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_001.png) +![~-openqrm-community-5.1-src_001](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_001.png) 输入 mysql root 用户密码。 -![~-openqrm-community-5.1-src_002](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_002.png) +![~-openqrm-community-5.1-src_002](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_002.png) 再次输入密码: -![~-openqrm-community-5.1-src_003](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_003.png) +![~-openqrm-community-5.1-src_003](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_003.png) -选择邮件服务器配置类型。 +选择邮件服务器配置类型: -![~-openqrm-community-5.1-src_004](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_004.png) +![~-openqrm-community-5.1-src_004](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_004.png) 假如你不确定该如何选择,可选择 `Local only`。在我们的这个示例中,我选择了 **Local only** 选项。 -![~-openqrm-community-5.1-src_005](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_005.png) +![~-openqrm-community-5.1-src_005](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_005.png) 输入你的系统邮件名称,并最后输入 Nagios 管理员密码。 -![~-openqrm-community-5.1-src_007](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_007.png) +![~-openqrm-community-5.1-src_007](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/sk@server-openqrm-community-5.1-src_007.png) 根据你的网络连接状态,上面的命令可能将花费很长的时间来下载所有运行 openQRM 所需的软件包,请耐心等待。 最后你将得到 openQRM 配置 URL 地址以及相关的用户名和密码。 -![~_002](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/sk@debian-_002.png) +![~_002](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/sk@debian-_002.png) ### 配置 ### @@ -104,23 +105,23 @@ openQRM 有两种不同风格的版本可获取: 默认的用户名和密码是: **openqrm/openqrm** 。 -![Mozilla Firefox_003](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/Mozilla-Firefox_003.png) +![Mozilla Firefox_003](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/Mozilla-Firefox_003.png) 选择一个网卡来给 openQRM 管理网络使用。 -![openQRM Server - Mozilla Firefox_004](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_004.png) +![openQRM Server - Mozilla Firefox_004](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_004.png) 选择一个数据库类型,在我们的示例中,我选择了 mysql。 -![openQRM Server - Mozilla Firefox_006](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_006.png) +![openQRM Server - Mozilla Firefox_006](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_006.png) 现在,配置数据库连接并初始化 openQRM, 在这里,我使用 **openQRM** 作为数据库名称, **root** 作为用户的身份,并将 debian 作为数据库的密码。 请小心,你应该输入先前在安装 openQRM 时创建的 mysql root 用户密码。 -![openQRM Server - Mozilla Firefox_012](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_012.png) +![openQRM Server - Mozilla Firefox_012](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_012.png) -祝贺你!! openQRM 已经安装并配置好了。 +祝贺你! openQRM 已经安装并配置好了。 -![openQRM Server - Mozilla Firefox_013](http://180016988.r.cdn77.net/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_013.png) +![openQRM Server - Mozilla Firefox_013](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/02/openQRM-Server-Mozilla-Firefox_013.png) ### 更新 openQRM ### @@ -129,16 +130,17 @@ openQRM 有两种不同风格的版本可获取: cd openqrm/src/ make update -到现在为止,我们做的只是在我们的 Ubuntu 服务器中安装和配置 openQRM, 至于 创建、运行虚拟,管理存储,额外的系统集成和运行你自己的私有云等内容,我建议你阅读 [openQRM 管理员指南][3]。 +到现在为止,我们做的只是在我们的 Debian 服务器中安装和配置 openQRM, 至于 创建、运行虚拟,管理存储,额外的系统集成和运行你自己的私有云等内容,我建议你阅读 [openQRM 管理员指南][3]。 就是这些了,欢呼吧!周末快乐! + -------------------------------------------------------------------------------- via: http://www.unixmen.com/install-openqrm-cloud-computing-platform-debian/ 作者:[SK][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From dd8a39c8fd46ad9f708a39f0c87ddf817c4879c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BC=A9=E6=B6=A1?= Date: Tue, 25 Aug 2015 19:46:26 +0800 Subject: [PATCH 1858/2517] Update 20150817 Top 5 Torrent Clients For Ubuntu Linux.md --- .../share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md b/sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md index 5ae03e4df1..95ad8d2b5d 100644 --- a/sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md +++ b/sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md @@ -1,3 +1,5 @@ +Translating by Xuanwo + Top 5 Torrent Clients For Ubuntu Linux ================================================================================ ![Best Torrent clients for Ubuntu Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/5_Best_Torrent_Ubuntu.png) @@ -114,4 +116,4 @@ via: http://itsfoss.com/best-torrent-ubuntu/ [9]:http://sysads.co.uk/2014/05/install-utorrent-3-3-ubuntu-14-04-13-10/ [10]:http://itsfoss.com/manage-startup-applications-ubuntu/ [11]:http://itsfoss.com/4-best-download-managers-for-linux/ -[12]:http://itsfoss.com/popcorn-time-tips/ \ No newline at end of file +[12]:http://itsfoss.com/popcorn-time-tips/ From 26056a3f72760922c6a54a97cb7ad9ba537d5c42 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 25 Aug 2015 23:37:34 +0800 Subject: [PATCH 1859/2517] PUB:Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux @strugglingyouth --- ... (Mirroring) using 'Two Disks' in Linux.md | 126 +++++++++--------- 1 file changed, 63 insertions(+), 63 deletions(-) rename {translated/tech/RAID => published}/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md (50%) diff --git a/translated/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md b/published/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md similarity index 50% rename from translated/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md rename to published/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md index 948e530ed8..dba520121f 100644 --- a/translated/tech/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md +++ b/published/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md @@ -1,83 +1,82 @@ -在 Linux 中使用"两个磁盘"创建 RAID 1(镜像) - 第3部分 +在 Linux 下使用 RAID(三):用两块磁盘创建 RAID 1(镜像) ================================================================================ -RAID 镜像意味着相同数据的完整克隆(或镜像)写入到两个磁盘中。创建 RAID1 至少需要两个磁盘,它的读取性能或者可靠性比数据存储容量更好。 + +**RAID 镜像**意味着相同数据的完整克隆(或镜像),分别写入到两个磁盘中。创建 RAID 1 至少需要两个磁盘,而且仅用于读取性能或者可靠性要比数据存储容量更重要的场合。 ![Create Raid1 in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID1-in-Linux.jpeg) -在 Linux 中设置 RAID1 +*在 Linux 中设置 RAID 1* 创建镜像是为了防止因硬盘故障导致数据丢失。镜像中的每个磁盘包含数据的完整副本。当一个磁盘发生故障时,相同的数据可以从其它正常磁盘中读取。而后,可以从正在运行的计算机中直接更换发生故障的磁盘,无需任何中断。 ### RAID 1 的特点 ### --镜像具有良好的性能。 +- 镜像具有良好的性能。 --磁盘利用率为50%。也就是说,如果我们有两个磁盘每个500GB,总共是1TB,但在镜像中它只会显示500GB。 +- 磁盘利用率为50%。也就是说,如果我们有两个磁盘每个500GB,总共是1TB,但在镜像中它只会显示500GB。 --在镜像如果一个磁盘发生故障不会有数据丢失,因为两个磁盘中的内容相同。 +- 在镜像如果一个磁盘发生故障不会有数据丢失,因为两个磁盘中的内容相同。 --读取数据会比写入性能更好。 +- 读取性能会比写入性能更好。 #### 要求 #### +创建 RAID 1 至少要有两个磁盘,你也可以添加更多的磁盘,磁盘数需为2,4,6,8等偶数。要添加更多的磁盘,你的系统必须有 RAID 物理适配器(硬件卡)。 -创建 RAID 1 至少要有两个磁盘,你也可以添加更多的磁盘,磁盘数需为2,4,6,8的两倍。为了能够添加更多的磁盘,你的系统必须有 RAID 物理适配器(硬件卡)。 +这里,我们使用软件 RAID 不是硬件 RAID,如果你的系统有一个内置的物理硬件 RAID 卡,你可以从它的功能界面或使用 Ctrl + I 键来访问它。 -这里,我们使用软件 RAID 不是硬件 RAID,如果你的系统有一个内置的物理硬件 RAID 卡,你可以从它的 UI 组件或使用 Ctrl + I 键来访问它。 - -需要阅读: [Basic Concepts of RAID in Linux][1] +需要阅读: [介绍 RAID 的级别和概念][1] #### 在我的服务器安装 #### - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.226 - Hostname : rd1.tecmintlocal.com - Disk 1 [20GB] : /dev/sdb - Disk 2 [20GB] : /dev/sdc + 操作系统 : CentOS 6.5 Final + IP 地址 : 192.168.0.226 + 主机名 : rd1.tecmintlocal.com + 磁盘 1 [20GB] : /dev/sdb + 磁盘 2 [20GB] : /dev/sdc -本文将指导你使用 mdadm (创建和管理 RAID 的)一步一步的建立一个软件 RAID 1 或镜像在 Linux 平台上。但同样的做法也适用于其它 Linux 发行版如 RedHat,CentOS,Fedora 等等。 +本文将指导你在 Linux 平台上使用 mdadm (用于创建和管理 RAID )一步步的建立一个软件 RAID 1 (镜像)。同样的做法也适用于如 RedHat,CentOS,Fedora 等 Linux 发行版。 -### 第1步:安装所需要的并且检查磁盘 ### +### 第1步:安装所需软件并且检查磁盘 ### -1.正如我前面所说,在 Linux 中我们需要使用 mdadm 软件来创建和管理 RAID。所以,让我们用 yum 或 apt-get 的软件包管理工具在 Linux 上安装 mdadm 软件包。 +1、 正如我前面所说,在 Linux 中我们需要使用 mdadm 软件来创建和管理 RAID。所以,让我们用 yum 或 apt-get 的软件包管理工具在 Linux 上安装 mdadm 软件包。 - # yum install mdadm [on RedHat systems] - # apt-get install mdadm [on Debain systems] + # yum install mdadm [在 RedHat 系统] + # apt-get install mdadm [在 Debain 系统] -2. 一旦安装好‘mdadm‘包,我们需要使用下面的命令来检查磁盘是否已经配置好。 +2、 一旦安装好`mdadm`包,我们需要使用下面的命令来检查磁盘是否已经配置好。 # mdadm -E /dev/sd[b-c] ![Check RAID on Disks](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-on-Disks.png) -检查 RAID 的磁盘 - +*检查 RAID 的磁盘* 正如你从上面图片看到的,没有检测到任何超级块,这意味着还没有创建RAID。 ### 第2步:为 RAID 创建分区 ### -3. 正如我提到的,我们最少使用两个分区 /dev/sdb 和 /dev/sdc 来创建 RAID1。我们首先使用‘fdisk‘命令来创建这两个分区并更改其类型为 raid。 +3、 正如我提到的,我们使用最少的两个分区 /dev/sdb 和 /dev/sdc 来创建 RAID 1。我们首先使用`fdisk`命令来创建这两个分区并更改其类型为 raid。 # fdisk /dev/sdb 按照下面的说明 -- 按 ‘n’ 创建新的分区。 -- 然后按 ‘P’ 选择主分区。 +- 按 `n` 创建新的分区。 +- 然后按 `P` 选择主分区。 - 接下来选择分区号为1。 - 按两次回车键默认将整个容量分配给它。 -- 然后,按 ‘P’ 来打印创建好的分区。 -- 按 ‘L’,列出所有可用的类型。 -- 按 ‘t’ 修改分区类型。 -- 键入 ‘fd’ 设置为Linux 的 RAID 类型,然后按 Enter 确认。 -- 然后再次使用‘p’查看我们所做的更改。 -- 使用‘w’保存更改。 +- 然后,按 `P` 来打印创建好的分区。 +- 按 `L`,列出所有可用的类型。 +- 按 `t` 修改分区类型。 +- 键入 `fd` 设置为 Linux 的 RAID 类型,然后按 Enter 确认。 +- 然后再次使用`p`查看我们所做的更改。 +- 使用`w`保存更改。 ![Create Disk Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Disk-Partitions.png) -创建磁盘分区 +*创建磁盘分区* 在创建“/dev/sdb”分区后,接下来按照同样的方法创建分区 /dev/sdc 。 @@ -85,59 +84,59 @@ RAID 镜像意味着相同数据的完整克隆(或镜像)写入到两个磁 ![Create Second Partitions](http://www.tecmint.com/wp-content/uploads/2014/10/Create-Second-Partitions.png) -创建第二个分区 +*创建第二个分区* -4. 一旦这两个分区创建成功后,使用相同的命令来检查 sdb & sdc 分区并确认 RAID 分区的类型如上图所示。 +4、 一旦这两个分区创建成功后,使用相同的命令来检查 sdb 和 sdc 分区并确认 RAID 分区的类型如上图所示。 # mdadm -E /dev/sd[b-c] ![Verify Partitions Changes](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-Partitions-Changes.png) -验证分区变化 +*验证分区变化* ![Check RAID Type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Type.png) -检查 RAID 类型 +*检查 RAID 类型* **注意**: 正如你在上图所看到的,在 sdb1 和 sdc1 中没有任何对 RAID 的定义,这就是我们没有检测到超级块的原因。 -### 步骤3:创建 RAID1 设备 ### +### 第3步:创建 RAID 1 设备 ### -5.接下来使用以下命令来创建一个名为 /dev/md0 的“RAID1”设备并验证它 +5、 接下来使用以下命令来创建一个名为 /dev/md0 的“RAID 1”设备并验证它 # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[b-c]1 # cat /proc/mdstat ![Create RAID Device](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device.png) -创建RAID设备 +*创建RAID设备* -6. 接下来使用如下命令来检查 RAID 设备类型和 RAID 阵列 +6、 接下来使用如下命令来检查 RAID 设备类型和 RAID 阵列 # mdadm -E /dev/sd[b-c]1 # mdadm --detail /dev/md0 ![Check RAID Device type](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-type.png) -检查 RAID 设备类型 +*检查 RAID 设备类型* ![Check RAID Device Array](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Device-Array.png) -检查 RAID 设备阵列 +*检查 RAID 设备阵列* -从上图中,人们很容易理解,RAID1 已经使用的 /dev/sdb1 和 /dev/sdc1 分区被创建,你也可以看到状态为 resyncing。 +从上图中,人们很容易理解,RAID 1 已经创建好了,使用了 /dev/sdb1 和 /dev/sdc1 分区,你也可以看到状态为 resyncing(重新同步中)。 ### 第4步:在 RAID 设备上创建文件系统 ### -7. 使用 ext4 为 md0 创建文件系统并挂载到 /mnt/raid1 . +7、 给 md0 上创建 ext4 文件系统 # mkfs.ext4 /dev/md0 ![Create RAID Device Filesystem](http://www.tecmint.com/wp-content/uploads/2014/10/Create-RAID-Device-Filesystem.png) -创建 RAID 设备文件系统 +*创建 RAID 设备文件系统* -8. 接下来,挂载新创建的文件系统到“/mnt/raid1”,并创建一些文件,验证在挂载点的数据 +8、 接下来,挂载新创建的文件系统到“/mnt/raid1”,并创建一些文件,验证在挂载点的数据 # mkdir /mnt/raid1 # mount /dev/md0 /mnt/raid1/ @@ -146,51 +145,52 @@ RAID 镜像意味着相同数据的完整克隆(或镜像)写入到两个磁 ![Mount Raid Device](http://www.tecmint.com/wp-content/uploads/2014/10/Mount-RAID-Device.png) -挂载 RAID 设备 +*挂载 RAID 设备* -9.为了在系统重新启动自动挂载 RAID1,需要在 fstab 文件中添加条目。打开“/etc/fstab”文件并添加以下行。 +9、为了在系统重新启动自动挂载 RAID 1,需要在 fstab 文件中添加条目。打开`/etc/fstab`文件并添加以下行: /dev/md0 /mnt/raid1 ext4 defaults 0 0 ![Raid Automount Device](http://www.tecmint.com/wp-content/uploads/2014/10/RAID-Automount-Filesystem.png) -自动挂载 Raid 设备 +*自动挂载 Raid 设备* + +10、 运行`mount -av`,检查 fstab 中的条目是否有错误 -10. 运行“mount -a”,检查 fstab 中的条目是否有错误 # mount -av ![Check Errors in fstab](http://www.tecmint.com/wp-content/uploads/2014/10/Check-Errors-in-fstab.png) -检查 fstab 中的错误 +*检查 fstab 中的错误* -11. 接下来,使用下面的命令保存 raid 的配置到文件“mdadm.conf”中。 +11、 接下来,使用下面的命令保存 RAID 的配置到文件“mdadm.conf”中。 # mdadm --detail --scan --verbose >> /etc/mdadm.conf ![Save Raid Configuration](http://www.tecmint.com/wp-content/uploads/2014/10/Save-Raid-Configuration.png) -保存 Raid 的配置 +*保存 Raid 的配置* 上述配置文件在系统重启时会读取并加载 RAID 设备。 ### 第5步:在磁盘故障后检查数据 ### -12.我们的主要目的是,即使在任何磁盘故障或死机时必须保证数据是可用的。让我们来看看,当任何一个磁盘不可用时会发生什么。 +12、我们的主要目的是,即使在任何磁盘故障或死机时必须保证数据是可用的。让我们来看看,当任何一个磁盘不可用时会发生什么。 # mdadm --detail /dev/md0 ![Raid Device Verify](http://www.tecmint.com/wp-content/uploads/2014/10/Raid-Device-Verify.png) -验证 Raid 设备 +*验证 RAID 设备* -在上面的图片中,我们可以看到在 RAID 中有2个设备是可用的并且 Active Devices 是2.现在让我们看看,当一个磁盘拔出(移除 sdc 磁盘)或损坏后会发生什么。 +在上面的图片中,我们可以看到在 RAID 中有2个设备是可用的,并且 Active Devices 是2。现在让我们看看,当一个磁盘拔出(移除 sdc 磁盘)或损坏后会发生什么。 # ls -l /dev | grep sd # mdadm --detail /dev/md0 ![Test RAID Devices](http://www.tecmint.com/wp-content/uploads/2014/10/Test-RAID-Devices.png) -测试 RAID 设备 +*测试 RAID 设备* 现在,在上面的图片中你可以看到,一个磁盘不见了。我从虚拟机上删除了一个磁盘。此时让我们来检查我们宝贵的数据。 @@ -199,9 +199,9 @@ RAID 镜像意味着相同数据的完整克隆(或镜像)写入到两个磁 ![Verify RAID Data](http://www.tecmint.com/wp-content/uploads/2014/10/Verify-RAID-Data.png) -验证 RAID 数据 +*验证 RAID 数据* -你有没有看到我们的数据仍然可用。由此,我们可以知道 RAID 1(镜像)的优势。在接下来的文章中,我们将看到如何设置一个 RAID 5 条带化分布式奇偶校验。希望这可以帮助你了解 RAID 1(镜像)是如何工作的。 +你可以看到我们的数据仍然可用。由此,我们可以了解 RAID 1(镜像)的优势。在接下来的文章中,我们将看到如何设置一个 RAID 5 条带化分布式奇偶校验。希望这可以帮助你了解 RAID 1(镜像)是如何工作的。 -------------------------------------------------------------------------------- @@ -209,9 +209,9 @@ via: http://www.tecmint.com/create-raid1-in-linux/ 作者:[Babin Lonston][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者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/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[1]:https://linux.cn/article-6085-1.html From 39a941d9846d6f0fd2494f44979e26d211918cef Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 26 Aug 2015 00:01:44 +0800 Subject: [PATCH 1860/2517] Delete Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md --- ...ing Up RAID 10 or 1+0 (Nested) in Linux.md | 276 ------------------ 1 file changed, 276 deletions(-) delete mode 100644 sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md diff --git a/sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md b/sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md deleted file mode 100644 index a08903e00e..0000000000 --- a/sources/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md +++ /dev/null @@ -1,276 +0,0 @@ -struggling 翻译中 -Setting Up RAID 10 or 1+0 (Nested) in Linux – Part 6 -================================================================================ -RAID 10 is a combine of RAID 0 and RAID 1 to form a RAID 10. To setup Raid 10, we need at least 4 number of disks. In our earlier articles, we’ve seen how to setup a RAID 0 and RAID 1 with minimum 2 number of disks. - -Here we will use both RAID 0 and RAID 1 to perform a Raid 10 setup with minimum of 4 drives. Assume, that we’ve some data saved to logical volume, which is created with RAID 10. Just for an example, if we are saving a data “apple” this will be saved under all 4 disk by this following method. - -![Create Raid 10 in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/raid10.jpg) - -Create Raid 10 in Linux - -Using RAID 0 it will save as “A” in first disk and “p” in the second disk, then again “p” in first disk and “l” in second disk. Then “e” in first disk, like this it will continue the Round robin process to save the data. From this we come to know that RAID 0 will write the half of the data to first disk and other half of the data to second disk. - -In RAID 1 method, same data will be written to other 2 disks as follows. “A” will write to both first and second disks, “P” will write to both disk, Again other “P” will write to both the disks. Thus using RAID 1 it will write to both the disks. This will continue in round robin process. - -Now you all came to know that how RAID 10 works by combining of both RAID 0 and RAID 1. If we have 4 number of 20 GB size disks, it will be 80 GB in total, but we will get only 40 GB of Storage capacity, the half of total capacity will be lost for building RAID 10. - -#### Pros and Cons of RAID 5 #### - -- Gives better performance. -- We will loose two of the disk capacity in RAID 10. -- Reading and writing will be very good, because it will write and read to all those 4 disk at the same time. -- It can be used for Database solutions, which needs a high I/O disk writes. - -#### Requirements #### - -In RAID 10, we need minimum of 4 disks, the first 2 disks for RAID 0 and other 2 Disks for RAID 1. Like I said before, RAID 10 is just a Combine of RAID 0 & 1. If we need to extended the RAID group, we must increase the disk by minimum 4 disks. - -**My Server Setup** - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.229 - Hostname : rd10.tecmintlocal.com - Disk 1 [20GB] : /dev/sdd - Disk 2 [20GB] : /dev/sdc - Disk 3 [20GB] : /dev/sdd - Disk 4 [20GB] : /dev/sde - -There are two ways to setup RAID 10, but here I’m going to show you both methods, but I prefer you to follow the first method, which makes the work lot easier for setting up a RAID 10. - -### Method 1: Setting Up Raid 10 ### - -1. First, verify that all the 4 added disks are detected or not using the following command. - - # ls -l /dev | grep sd - -2. Once the four disks are detected, it’s time to check for the drives whether there is already any raid existed before creating a new one. - - # mdadm -E /dev/sd[b-e] - # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde - -![Verify 4 Added Disks](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-4-Added-Disks.png) - -Verify 4 Added Disks - -**Note**: In the above output, you see there isn’t any super-block detected yet, that means there is no RAID defined in all 4 drives. - -#### Step 1: Drive Partitioning for RAID #### - -3. Now create a new partition on all 4 disks (/dev/sdb, /dev/sdc, /dev/sdd and /dev/sde) using the ‘fdisk’ tool. - - # fdisk /dev/sdb - # fdisk /dev/sdc - # fdisk /dev/sdd - # fdisk /dev/sde - -**Create /dev/sdb Partition** - -Let me show you how to partition one of the disk (/dev/sdb) using fdisk, this steps will be the same for all the other disks too. - - # fdisk /dev/sdb - -Please use the below steps for creating a new partition on /dev/sdb drive. - -- Press ‘n‘ for creating new partition. -- Then choose ‘P‘ for Primary partition. -- Then choose ‘1‘ to be the first partition. -- Next press ‘p‘ to print the created partition. -- Change the Type, If we need to know the every available types Press ‘L‘. -- Here, we are selecting ‘fd‘ as my type is RAID. -- Next press ‘p‘ to print the defined partition. -- Then again use ‘p‘ to print the changes what we have made. -- Use ‘w‘ to write the changes. - -![Disk sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Disk-sdb-Partition.png) - -Disk sdb Partition - -**Note**: Please use the above same instructions for creating partitions on other disks (sdc, sdd sdd sde). - -4. After creating all 4 partitions, again you need to examine the drives for any already existing raid using the following command. - - # mdadm -E /dev/sd[b-e] - # mdadm -E /dev/sd[b-e]1 - - OR - - # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde - # mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 - -![Check All Disks for Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Check-All-Disks-for-Raid.png) - -Check All Disks for Raid - -**Note**: The above outputs shows that there isn’t any super-block detected on all four newly created partitions, that means we can move forward to create RAID 10 on these drives. - -#### Step 2: Creating ‘md’ RAID Device #### - -5. Now it’s time to create a ‘md’ (i.e. /dev/md0) device, using ‘mdadm’ raid management tool. Before, creating device, your system must have ‘mdadm’ tool installed, if not install it first. - - # yum install mdadm [on RedHat systems] - # apt-get install mdadm [on Debain systems] - -Once ‘mdadm’ tool installed, you can now create a ‘md’ raid device using the following command. - - # mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 - -6. Next verify the newly created raid device using the ‘cat’ command. - - # cat /proc/mdstat - -![Create md raid Device](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md-raid-Device.png) - -Create md raid Device - -7. Next, examine all the 4 drives using the below command. The output of the below command will be long as it displays the information of all 4 disks. - - # mdadm --examine /dev/sd[b-e]1 - -8. Next, check the details of Raid Array with the help of following command. - - # mdadm --detail /dev/md0 - -![Check Raid Array Details](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Array-Details.png) - -Check Raid Array Details - -**Note**: You see in the above results, that the status of Raid was active and re-syncing. - -#### Step 3: Creating Filesystem #### - -9. Create a file system using ext4 for ‘md0′ and mount it under ‘/mnt/raid10‘. Here, I’ve used ext4, but you can use any filesystem type if you want. - - # mkfs.ext4 /dev/md0 - -![Create md Filesystem](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md-Filesystem.png) - -Create md Filesystem - -10. After creating filesystem, mount the created file-system under ‘/mnt/raid10‘ and list the contents of the mount point using ‘ls -l’ command. - - # mkdir /mnt/raid10 - # mount /dev/md0 /mnt/raid10/ - # ls -l /mnt/raid10/ - -Next, add some files under mount point and append some text in any one of the file and check the content. - - # touch /mnt/raid10/raid10_files.txt - # ls -l /mnt/raid10/ - # echo "raid 10 setup with 4 disks" > /mnt/raid10/raid10_files.txt - # cat /mnt/raid10/raid10_files.txt - -![Mount md Device](http://www.tecmint.com/wp-content/uploads/2014/11/Mount-md-Device.png) - -Mount md Device - -11. For automounting, open the ‘/etc/fstab‘ file and append the below entry in fstab, may be mount point will differ according to your environment. Save and quit using wq!. - - # vim /etc/fstab - - /dev/md0 /mnt/raid10 ext4 defaults 0 0 - -![AutoMount md Device](http://www.tecmint.com/wp-content/uploads/2014/11/AutoMount-md-Device.png) - -AutoMount md Device - -12. Next, verify the ‘/etc/fstab‘ file for any errors before restarting the system using ‘mount -a‘ command. - - # mount -av - -![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Errors-in-Fstab.png) - -Check Errors in Fstab - -#### Step 4: Save RAID Configuration #### - -13. By default RAID don’t have a config file, so we need to save it manually after making all the above steps, to preserve these settings during system boot. - - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - -![Save Raid10 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Save-Raid10-Configuration.png) - -Save Raid10 Configuration - -That’s it, we have created RAID 10 using method 1, this method is the easier one. Now let’s move forward to setup RAID 10 using method 2. - -### Method 2: Creating RAID 10 ### - -1. In method 2, we have to define 2 sets of RAID 1 and then we need to define a RAID 0 using those created RAID 1 sets. Here, what we will do is to first create 2 mirrors (RAID1) and then striping over RAID0. - -First, list the disks which are all available for creating RAID 10. - - # ls -l /dev | grep sd - -![List 4 Devices](http://www.tecmint.com/wp-content/uploads/2014/11/List-4-Devices.png) - -List 4 Devices - -2. Partition the all 4 disks using ‘fdisk’ command. For partitioning, you can follow #step 3 above. - - # fdisk /dev/sdb - # fdisk /dev/sdc - # fdisk /dev/sdd - # fdisk /dev/sde - -3. After partitioning all 4 disks, now examine the disks for any existing raid blocks. - - # mdadm --examine /dev/sd[b-e] - # mdadm --examine /dev/sd[b-e]1 - -![Examine 4 Disks](http://www.tecmint.com/wp-content/uploads/2014/11/Examine-4-Disks.png) - -Examine 4 Disks - -#### Step 1: Creating RAID 1 #### - -4. First let me create 2 sets of RAID 1 using 4 disks ‘sdb1′ and ‘sdc1′ and other set using ‘sdd1′ & ‘sde1′. - - # mdadm --create /dev/md1 --metadata=1.2 --level=1 --raid-devices=2 /dev/sd[b-c]1 - # mdadm --create /dev/md2 --metadata=1.2 --level=1 --raid-devices=2 /dev/sd[d-e]1 - # cat /proc/mdstat - -![Creating Raid 1](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-1.png) - -Creating Raid 1 - -![Check Details of Raid 1](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-1.png) - -Check Details of Raid 1 - -#### Step 2: Creating RAID 0 #### - -5. Next, create the RAID 0 using md1 and md2 devices. - - # mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/md1 /dev/md2 - # cat /proc/mdstat - -![Creating Raid 0](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-0.png) - -Creating Raid 0 - -#### Step 3: Save RAID Configuration #### - -6. We need to save the Configuration under ‘/etc/mdadm.conf‘ to load all raid devices in every reboot times. - - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - -After this, we need to follow #step 3 Creating file system of method 1. - -That’s it! we have created RAID 1+0 using method 2. We will loose two disks space here, but the performance will be excellent compared to any other raid setups. - -### Conclusion ### - -Here we have created RAID 10 using two methods. RAID 10 has good performance and redundancy too. Hope this helps you to understand about RAID 10 Nested Raid level. Let us see how to grow an existing raid array and much more in my upcoming articles. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-raid-10-in-linux/ - -作者:[Babin Lonston][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/babinlonston/ \ No newline at end of file From fe8f7603a69585d6bbaa8f75149dd0a5558b636f Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 26 Aug 2015 00:02:53 +0800 Subject: [PATCH 1861/2517] Create Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md --- ...ing Up RAID 10 or 1+0 (Nested) in Linux.md | 277 ++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 translated/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md diff --git a/translated/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md b/translated/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md new file mode 100644 index 0000000000..850f6c3e49 --- /dev/null +++ b/translated/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md @@ -0,0 +1,277 @@ + +在 Linux 中设置 RAID 10 或 1 + 0(嵌套) - 第6部分 +================================================================================ +RAID 10 是结合 RAID 0 和 RAID 1 形成的。要设置 RAID 10,我们至少需要4个磁盘。在之前的文章中,我们已经看到了如何使用两个磁盘设置 RAID 0 和 RAID 1。 + +在这里,我们将使用最少4个磁盘结合 RAID 0 和 RAID 1 来设置 RAID 10。假设,我们已经在逻辑卷保存了一些数据,这是 RAID 10 创建的,如果我们要保存数据“apple”,它将使用以下方法将其保存在4个磁盘中。 + +![Create Raid 10 in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/raid10.jpg) + +在 Linux 中创建 Raid 10 + +使用 RAID 0 时,它将“A”保存在第一个磁盘,“p”保存在第二个磁盘,下一个“P”又在第一个磁盘,“L”在第二个磁盘。然后,“e”又在第一个磁盘,像这样它会继续循环此过程将数据保存完整。由此我们知道,RAID 0 是将数据的一半保存到第一个磁盘,另一半保存到第二个磁盘。 + +在 RAID 1 方法中,相同的数据将被写入到两个磁盘中。 “A”将同时被写入到第一和第二个磁盘中,“P”也将被同时写入到两个磁盘中,下一个“P”也将同时被写入到两个磁盘。因此,使用 RAID 1 将同时写入到两个磁盘。它将继续循环此过程。 + +现在大家来了解 RAID 10 怎样结合 RAID 0 和 RAID 1 来工作。如果我们有4个20 GB 的磁盘,总共为 80 GB,但我们将只能得到40 GB 的容量,另一半的容量将用于构建 RAID 10。 + +#### RAID 10 的优点和缺点 #### + +- 提供更好的性能。 +- 在 RAID 10 中我们将失去两个磁盘的容量。 +- 读与写的性能将会很好,因为它会同时进行写入和读取。 +- 它能解决数据库的高 I/O 磁盘写操作。 + +#### 要求 #### + +在 RAID 10 中,我们至少需要4个磁盘,2个磁盘为 RAID 0,其他2个磁盘为 RAID 1,就像我之前说的,RAID 10 仅仅是结合了 RAID 0和1。如果我们需要扩展 RAID 组,最少需要添加4个磁盘。 + +**我的服务器设置** + + Operating System : CentOS 6.5 Final + IP Address : 192.168.0.229 + Hostname : rd10.tecmintlocal.com + Disk 1 [20GB] : /dev/sdd + Disk 2 [20GB] : /dev/sdc + Disk 3 [20GB] : /dev/sdd + Disk 4 [20GB] : /dev/sde + +有两种方法来设置 RAID 10,在这里两种方法我都会演示,但我更喜欢第一种方法,使用它来设置 RAID 10 更简单。 + +### 方法1:设置 RAID 10 ### + +1.首先,使用以下命令确认所添加的4块磁盘没有被使用。 + + # ls -l /dev | grep sd + +2.四个磁盘被检测后,然后来检查磁盘是否存在 RAID 分区。 + + # mdadm -E /dev/sd[b-e] + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde + +![Verify 4 Added Disks](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-4-Added-Disks.png) + +验证添加的4块磁盘 + +**注意**: 在上面的输出中,如果没有检测到 super-block 意味着在4块磁盘中没有定义过 RAID。 + +#### 第1步:为 RAID 分区 #### + +3.现在,使用‘fdisk’,命令为4个磁盘(/dev/sdb, /dev/sdc, /dev/sdd 和 /dev/sde)创建新分区。 + + # fdisk /dev/sdb + # fdisk /dev/sdc + # fdisk /dev/sdd + # fdisk /dev/sde + +**为 /dev/sdb 创建分区** + +我来告诉你如何使用 fdisk 为磁盘(/dev/sdb)进行分区,此步也适用于其他磁盘。 + + # fdisk /dev/sdb + +请使用以下步骤为 /dev/sdb 创建一个新的分区。 + +- 按 ‘n’ 创建新的分区。 +- 然后按 ‘P’ 选择主分区。 +- 接下来选择分区号为1。 +- 只需按两次回车键选择默认值即可。 +- 然后,按 ‘P’ 来打印创建好的分区。 +- 按 ‘L’,列出所有可用的类型。 +- 按 ‘t’ 去修改分区。 +- 键入 ‘fd’ 设置为 Linux 的 RAID 类型,然后按 Enter 确认。 +- 然后再次使用‘p’查看我们所做的更改。 +- 使用‘w’保存更改。 + +![Disk sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Disk-sdb-Partition.png) + +为磁盘 sdb 分区 + +**注意**: 请使用上面相同的指令对其他磁盘(sdc, sdd sdd sde)进行分区。 + +4.创建好4个分区后,需要使用下面的命令来检查磁盘是否存在 raid。 + + # mdadm -E /dev/sd[b-e] + # mdadm -E /dev/sd[b-e]1 + + 或者 + + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde + # mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 + +![Check All Disks for Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Check-All-Disks-for-Raid.png) + +检查磁盘 + +**注意**: 以上输出显示,新创建的四个分区中没有检测到 super-block,这意味着我们可以继续在这些磁盘上创建 RAID 10。 + +#### 第2步: 创建 RAID 设备 ‘md’ #### + +5.现在改创建一个‘md’(即 /dev/md0)设备,使用“mdadm” raid 管理工具。在创建设备之前,必须确保系统已经安装了‘mdadm’工具,如果没有请使用下面的命令来安装。 + + # yum install mdadm [on RedHat systems] + # apt-get install mdadm [on Debain systems] + +‘mdadm’工具安装完成后,可以使用下面的命令创建一个‘md’ raid 设备。 + + # mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 + +6.接下来使用‘cat’命令验证新创建的 raid 设备。 + + # cat /proc/mdstat + +![Create md raid Device](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md-raid-Device.png) + +创建 md raid 设备 + +7.接下来,使用下面的命令来检查4个磁盘。下面命令的输出会很长,因为它会显示4个磁盘的所有信息。 + + # mdadm --examine /dev/sd[b-e]1 + +8.接下来,使用以下命令来查看 RAID 阵列的详细信息。 + + # mdadm --detail /dev/md0 + +![Check Raid Array Details](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Array-Details.png) + +查看 Raid 阵列详细信息 + +**注意**: 你在上面看到的结果,该 RAID 的状态是 active 和re-syncing。 + +#### 第3步:创建文件系统 #### + +9.使用 ext4 作为‘md0′的文件系统并将它挂载到‘/mnt/raid10‘下。在这里,我用的是 ext4,你可以使用你想要的文件系统类型。 + + # mkfs.ext4 /dev/md0 + +![Create md Filesystem](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md-Filesystem.png) + +创建 md 文件系统 + +10.在创建文件系统后,挂载文件系统到‘/mnt/raid10‘下,并使用‘ls -l’命令列出挂载点下的内容。 + + # mkdir /mnt/raid10 + # mount /dev/md0 /mnt/raid10/ + # ls -l /mnt/raid10/ + +接下来,在挂载点下创建一些文件,并在文件中添加些内容,然后检查内容。 + + # touch /mnt/raid10/raid10_files.txt + # ls -l /mnt/raid10/ + # echo "raid 10 setup with 4 disks" > /mnt/raid10/raid10_files.txt + # cat /mnt/raid10/raid10_files.txt + +![Mount md Device](http://www.tecmint.com/wp-content/uploads/2014/11/Mount-md-Device.png) + +挂载 md 设备 + +11.要想自动挂载,打开‘/etc/fstab‘文件并添加下面的条目,挂载点根据你环境的不同来添加。使用 wq! 保存并退出。 + + # vim /etc/fstab + + /dev/md0 /mnt/raid10 ext4 defaults 0 0 + +![AutoMount md Device](http://www.tecmint.com/wp-content/uploads/2014/11/AutoMount-md-Device.png) + +挂载 md 设备 + +12.接下来,在重新启动系统前使用‘mount -a‘来确认‘/etc/fstab‘文件是否有错误。 + + # mount -av + +![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Errors-in-Fstab.png) + +检查 Fstab 中的错误 + +#### 第四步:保存 RAID 配置 #### + +13.默认情况下 RAID 没有配置文件,所以我们需要在上述步骤完成后手动保存它。 + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +![Save Raid10 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Save-Raid10-Configuration.png) + +保存 Raid10 的配置 + +就这样,我们使用方法1创建完了 RAID 10,这种方法是比较容易的。现在,让我们使用方法2来设置 RAID 10。 + +### 方法2:创建 RAID 10 ### + +1.在方法2中,我们必须定义2组 RAID 1,然后我们需要使用这些创建好的 RAID 1 的集来定义一个 RAID 0。在这里,我们将要做的是先创建2个镜像(RAID1),然后创建 RAID0 (条带化)。 + +首先,列出所有的可用于创建 RAID 10 的磁盘。 + + # ls -l /dev | grep sd + +![List 4 Devices](http://www.tecmint.com/wp-content/uploads/2014/11/List-4-Devices.png) + +列出了 4 设备 + +2.将4个磁盘使用‘fdisk’命令进行分区。对于如何分区,您可以按照 #步骤 3。 + + # fdisk /dev/sdb + # fdisk /dev/sdc + # fdisk /dev/sdd + # fdisk /dev/sde + +3.在完成4个磁盘的分区后,现在检查磁盘是否存在 RAID块。 + + # mdadm --examine /dev/sd[b-e] + # mdadm --examine /dev/sd[b-e]1 + +![Examine 4 Disks](http://www.tecmint.com/wp-content/uploads/2014/11/Examine-4-Disks.png) + +检查 4 个磁盘 + +#### 第1步:创建 RAID 1 #### + +4.首先,使用4块磁盘创建2组 RAID 1,一组为‘sdb1′和 ‘sdc1′,另一组是‘sdd1′ 和 ‘sde1′。 + + # mdadm --create /dev/md1 --metadata=1.2 --level=1 --raid-devices=2 /dev/sd[b-c]1 + # mdadm --create /dev/md2 --metadata=1.2 --level=1 --raid-devices=2 /dev/sd[d-e]1 + # cat /proc/mdstat + +![Creating Raid 1](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-1.png) + +创建 Raid 1 + +![Check Details of Raid 1](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-1.png) + +查看 Raid 1 的详细信息 + +#### 第2步:创建 RAID 0 #### + +5.接下来,使用 md1 和 md2 来创建 RAID 0。 + + # mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/md1 /dev/md2 + # cat /proc/mdstat + +![Creating Raid 0](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-0.png) + +创建 Raid 0 + +#### 第3步:保存 RAID 配置 #### + +6.我们需要将配置文件保存在‘/etc/mdadm.conf‘文件中,使其每次重新启动后都能加载所有的 raid 设备。 + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +在此之后,我们需要按照方法1中的#第3步来创建文件系统。 + +就是这样!我们采用的方法2创建完了 RAID 1+0.我们将会失去两个磁盘的空间,但相比其他 RAID ,它的性能将是非常好的。 + +### 结论 ### + +在这里,我们采用两种方法创建 RAID 10。RAID 10 具有良好的性能和冗余性。希望这篇文章可以帮助你了解 RAID 10(嵌套 RAID 的级别)。在后面的文章中我们会看到如何扩展现有的 RAID 阵列以及更多精彩的。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid-10-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ From 7b242fb2a91191ed601102eff134a0edbace3389 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Wed, 26 Aug 2015 06:10:36 +0800 Subject: [PATCH 1862/2517] finish the translating of 20150817 Top 5 Torrent Clients For Ubuntu Linux --- ... Top 5 Torrent Clients For Ubuntu Linux.md | 119 ----------------- ... Top 5 Torrent Clients For Ubuntu Linux.md | 120 ++++++++++++++++++ 2 files changed, 120 insertions(+), 119 deletions(-) delete mode 100644 sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md create mode 100644 translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md diff --git a/sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md b/sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md deleted file mode 100644 index 95ad8d2b5d..0000000000 --- a/sources/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md +++ /dev/null @@ -1,119 +0,0 @@ -Translating by Xuanwo - -Top 5 Torrent Clients For Ubuntu Linux -================================================================================ -![Best Torrent clients for Ubuntu Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/5_Best_Torrent_Ubuntu.png) - -Looking for the **best torrent client in Ubuntu**? Indeed there are a number of torrent clients available for desktop Linux. But which ones are the **best Ubuntu torrent clients** among them? - -I am going to list top 5 torrent clients for Linux, which are lightweight, feature rich and have impressive GUI. Ease of installation and using is also a factor. - -### Best torrent programs for Ubuntu ### - -Since Ubuntu comes by default with Transmission, I am going to exclude it from the list. This doesn’t mean that Transmission doesn’t deserve to be on the list. Transmission is a good to have torrent client for Ubuntu and this is the reason why it is the default Torrent application in several Linux distributions, including Ubuntu. - ----------- - -### Deluge ### - -![Logo of Deluge torrent client for Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Deluge.png) - -[Deluge][1] has been chosen as the best torrent client for Linux by Lifehacker and that speaks itself of the usefulness of Deluge. And it’s not just Lifehacker who is fan of Deluge, check out any forum and you’ll find a number of people admitting that Deluge is their favorite. - -Fast, sleek and intuitive interface makes Deluge a hot favorite among Linux users. - -Deluge is available in Ubuntu repositories and you can install it in Ubuntu Software Center or by using the command below: - - sudo apt-get install deluge - ----------- - -### qBittorrent ### - -![qBittorrent client for Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/qbittorrent_icon.png) - -As the name suggests, [qBittorrent][2] is the Qt version of famous [Bittorrent][3] application. You’ll see an interface similar to Bittorrent client in Windows, if you ever used it. Sort of lightweight and have all the standard features of a torrent program, qBittorrent is also available in default Ubuntu repository. - -It could be installed from Ubuntu Software Center or using the command below: - - sudo apt-get install qbittorrent - ----------- - -### Tixati ### - -![Tixati torrent client logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/tixati_icon.png) - -[Tixati][4] is another nice to have torrent client for Ubuntu. It has a default dark theme which might be preferred by many but not me. It has all the standard features that you can seek in a torrent client. - -In addition to that, there are additional feature of data analysis. You can measure and analyze bandwidth and other statistics in nice charts. - -- [Download Tixati][5] - ----------- - -### Vuze ### - -![Vuze Torrent Logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/vuze_icon_for_mac_os_x_by_hamzasaleem-d6yx1fp.png) - -[Vuze][6] is favorite torrent application of a number of Linux as well as Windows users. Apart from the standard features, you can search for torrents directly in the application. You can also subscribe to episodic content so that you won’t have to search for new contents as you can see it in your subscription in sidebar. - -It also comes with a video player that can play HD videos with subtitles and all. But I don’t think you would like to use it over the better video players such as VLC. - -Vuze can be installed from Ubuntu Software Center or using the command below: - - sudo apt-get install vuze - ----------- - -### Frostwire ### - -![Logo of Frostwire torrent client](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/frostwire.png) - -[Frostwire][7] is the torrent application you might want to try. It is more than just a simple torrent client. Also available for Android, you can use it to share files over WiFi. - -You can search for torrents from within the application and play them inside the application. In addition to the downloaded files, it can browse your local media and have them organized inside the player. The same is applicable for the Android version. - -An additional feature is that Frostwire also provides access to legal music by indi artists. You can download them and listen to it, for free, for legal. - -- [Download Frostwire][8] - ----------- - -### Honorable mention ### - -On Windows, uTorrent (pronounced mu torrent) is my favorite torrent application. While uTorrent may be available for Linux, I deliberately skipped it from the list because installing and using uTorrent in Linux is neither easy nor does it provide a complete application experience (runs with in web browser). - -You can read about uTorrent installation in Ubuntu [here][9]. - -#### Quick tip: #### - -Most of the time, torrent applications do not start by default. You might want to change this behavior. Read this post to learn [how to manage startup applications in Ubuntu][10]. - -### What’s your favorite? ### - -That was my opinion on the best Torrent clients in Ubuntu. What is your favorite one? Do leave a comment. You can also check the [best download managers for Ubuntu][11] in related posts. And if you use Popcorn Time, check these [Popcorn Time Tips][12]. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/best-torrent-ubuntu/ - -作者:[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://deluge-torrent.org/ -[2]:http://www.qbittorrent.org/ -[3]:http://www.bittorrent.com/ -[4]:http://www.tixati.com/ -[5]:http://www.tixati.com/download/ -[6]:http://www.vuze.com/ -[7]:http://www.frostwire.com/ -[8]:http://www.frostwire.com/downloads -[9]:http://sysads.co.uk/2014/05/install-utorrent-3-3-ubuntu-14-04-13-10/ -[10]:http://itsfoss.com/manage-startup-applications-ubuntu/ -[11]:http://itsfoss.com/4-best-download-managers-for-linux/ -[12]:http://itsfoss.com/popcorn-time-tips/ diff --git a/translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md b/translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md new file mode 100644 index 0000000000..0ba1ac3e03 --- /dev/null +++ b/translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md @@ -0,0 +1,120 @@ +Translating by Xuanwo + +介绍Ubuntu下五大BT客户端 +================================================================================ +![Best Torrent clients for Ubuntu Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/5_Best_Torrent_Ubuntu.png) + +你在寻找**Ubuntu中最好的BT客户端**吗?事实上,桌面平台中有许多可用的BT客户端,但是它们中的哪些才是**最好的**呢? + +我将会列出最好的五个BT客户端,它们都拥有着体积轻盈,功能强大的特点,而且还有令人印象深刻的用户界面。自然,易于安装和使用也是特性之一。 + +### Ubuntu下最好的BT客户端 ### + +考虑到Ubuntu默认安装了Transmission,所以我将会从这个列表中删去Transmission。但是这并不意味着Transmission没有资格出现在这个列表中,事实上,Transmission是一个非常好的BT客户端,这也正是它被多个发行版默认安装的原因,Ubuntu也不例外。 + +---------- + +### Deluge ### + +![Logo of Deluge torrent client for Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Deluge.png) + +[Deluge][1] 被Lifehacker选为Linux下最好的BT客户端,这说明了Deluge是多么的有用。而且,并不仅仅只有Lifehacker是Deluge的粉丝,纵观多个论坛,你都会发现不少Deluge的忠实拥趸。 + +快速,时尚而且直观的界面使得Deluge成为Linux用户的挚爱。 + +Deluge可在Ubuntu的仓库中获取,你能够在Ubuntu软件中心中安装它,或者使用下面的命令: + + sudo apt-get install delugeFast, sleek and intuitive interface makes Deluge a hot favorite among Linux users. + +---------- + +### qBittorrent ### + +![qBittorrent client for Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/qbittorrent_icon.png) + +正如它的名字所暗示的,[qBittorrent][2] 是著名的 [Bittorrent][3] 应用的Qt版本。如果你曾经使用过它,你将会看到和Windows下的Bittorrent相似的界面。同样轻巧并且有着BT客户端的所有标准功能,qBittorrent也可以在Ubuntu的默认仓库中找到。 + +它可以通过Ubuntu软件仓库安装,或者使用下面的命令: + + sudo apt-get install qbittorrent + +---------- + +### Tixati ### + +![Tixati torrent client logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/tixati_icon.png) + +[Tixati][4] 是另一个不错的Ubuntu下的BT客户端。它有着一个默认的黑暗主题,尽管很多人喜欢,但是我例外。它拥有着一切你能在BT客户端中找到的功能。 + +除此之外,它还有着数据分析的额外功能。你可以在美观的图表中分析流量以及其它数据。 + +- [下载 Tixati][5] + +---------- + +### Vuze ### + +![Vuze Torrent Logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/vuze_icon_for_mac_os_x_by_hamzasaleem-d6yx1fp.png) + +[Vuze][6]是许多Linux以及Windows用户最喜欢的BT客户端。除了标准的功能,你可以直接在应用程序中搜索种子。你也可以订阅系列片源,这样你就无需再去寻找新的片源了,因为你可以在侧边栏中的订阅看到它们。 + +它还配备了一个视频播放器,可以播放带有字幕的高清视频以及一切。但是我不认为你会用它来代替那些更好的视频播放器,比如VLC。 + +Vuze可以通过Ubuntu软件中心安装或者使用下列命令: + + sudo apt-get install vuze + +---------- + +### Frostwire ### + +![Logo of Frostwire torrent client](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/frostwire.png) + +[Frostwire][7]可能会是一个你想要去尝试的应用。它不仅仅是一个简单的BT客户端,它还可以应用于安卓,你可以用它通过Wifi来共享文件。 + +你可以在应用中搜索种子并且播放他们。除了下载文件,它还可以浏览你本地的影音文件,并且将它们有条理的呈现在播放器中。这同样适用于安卓版本。 + +还有一个特点是:Frostwire提供了印度艺术家的合法音乐下载。你可以下载并且欣赏它们,免费而且合法。 + +- [下载 Frostwire][8] + +---------- + +### 荣誉奖 ### + +在Windows中,uTorrent(发音:mu torrent)是我最喜欢的BT应用。尽管uTorrent可以在Linux下运行,但是我还是特意忽略了它。因为在Linux下使用uTorrent不仅困难,而且无法获得完整的应用体验(运行在浏览器中)。 + +你可以[在这里][9]阅读Ubuntu下uTorrent的安装教程。 + +#### 快速提示: #### + +大多数情况下,BT应用不会默认自动自动启动。如果你想改变这一行为,阅读[如何管理Ubuntu下的自启程序][10]来学习。 + +### 你最喜欢的是什么? ### + +这些是我对于Ubuntu下最好的BT客户端的一键。你最喜欢的是什么呢?请发表评论。你也可以查看与本主题相关的[Ubuntu最好的下载管理器][11]。如果你使用Popcorn Time,试试[Popcorn Time技巧][12] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/best-torrent-ubuntu/ + +作者:[Abhishek][a] +译者:[Xuanwo](https://github.com/Xuanwo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://deluge-torrent.org/ +[2]:http://www.qbittorrent.org/ +[3]:http://www.bittorrent.com/ +[4]:http://www.tixati.com/ +[5]:http://www.tixati.com/download/ +[6]:http://www.vuze.com/ +[7]:http://www.frostwire.com/ +[8]:http://www.frostwire.com/downloads +[9]:http://sysads.co.uk/2014/05/install-utorrent-3-3-ubuntu-14-04-13-10/ +[10]:http://itsfoss.com/manage-startup-applications-ubuntu/ +[11]:http://itsfoss.com/4-best-download-managers-for-linux/ +[12]:http://itsfoss.com/popcorn-time-tips/ + From 8040c6c76cfaa973d7700e59e51f724a88a5e961 Mon Sep 17 00:00:00 2001 From: bazz2 Date: Wed, 26 Aug 2015 07:54:27 +0800 Subject: [PATCH 1863/2517] [bazz2 translating]Linux about to gain a new file system--bcachefs --- ...20150824 Linux about to gain a new file system--bcachefs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150824 Linux about to gain a new file system--bcachefs.md b/sources/talk/20150824 Linux about to gain a new file system--bcachefs.md index df3cd14682..9568d05836 100644 --- a/sources/talk/20150824 Linux about to gain a new file system--bcachefs.md +++ b/sources/talk/20150824 Linux about to gain a new file system--bcachefs.md @@ -1,3 +1,4 @@ +[bazz2222222] Linux about to gain a new file system – bcachefs ================================================================================ A five year old file system built by Kent Overstreet, formerly of Google, is near feature complete with all critical components in place. Bcachefs boasts the performance and reliability of the widespread ext4 and xfs as well as the feature list similar to that of btrfs and zfs. Notable features include checksumming, compression, multiple devices, caching and eventually snapshots and other “nifty” features. @@ -22,4 +23,4 @@ via: http://www.linuxveda.com/2015/08/22/linux-gain-new-file-system-bcachefs/ [a]:http://www.linuxveda.com/author/paul_hill/ [1]:https://en.wikipedia.org/wiki/Copy-on-write -[2]:https://lkml.org/lkml/2015/8/21/22 \ No newline at end of file +[2]:https://lkml.org/lkml/2015/8/21/22 From 2c0561dc2f517c08dca59d4fa1948c18cb2c0704 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Wed, 26 Aug 2015 08:41:08 +0800 Subject: [PATCH 1864/2517] apply for the LFCS translate --- ...eate Edit and Manipulate files in Linux.md | 2 ++ ...ng and Linux Filesystem Troubleshooting.md | 28 ++++++++++--------- ...and Use vi or vim as a Full Text Editor.md | 4 ++- ...e Attributes and Finding Files in Linux.md | 8 ++++-- ...esystems and Configuring Swap Partition.md | 2 ++ ...work Samba and NFS Filesystems in Linux.md | 2 ++ ...es – Creating & Managing System Backups.md | 22 ++++++++------- ...d Services SysVinit Systemd and Upstart.md | 6 ++-- ...es and Enabling sudo Access on Accounts.md | 4 ++- ...th Yum RPM Apt Dpkg Aptitude and Zypper.md | 12 ++++---- 10 files changed, 55 insertions(+), 35 deletions(-) diff --git a/sources/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md b/sources/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md index ca96b7dac6..083078fa62 100644 --- a/sources/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md +++ b/sources/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md @@ -1,3 +1,5 @@ +Translating by Xuanwo + Part 1 - LFCS: How to use GNU ‘sed’ Command to Create, Edit, and Manipulate files in Linux ================================================================================ The Linux Foundation announced the LFCS (Linux Foundation Certified Sysadmin) certification, a new program that aims at helping individuals all over the world to get certified in basic to intermediate system administration tasks for Linux systems. This includes supporting running systems and services, along with first-hand troubleshooting and analysis, and smart decision-making to escalate issues to engineering teams. diff --git a/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md b/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md index 45029ac20e..5dd1782a98 100644 --- a/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md +++ b/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md @@ -1,3 +1,5 @@ +Translating by Xuanwo + Part 10 - LFCS: Understanding & Learning Basic Shell Scripting and Linux Filesystem Troubleshooting ================================================================================ The Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a brand new initiative whose purpose is to allow individuals everywhere (and anywhere) to get certified in basic to intermediate operational support for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus smart decision-making when it comes to raising issues to upper support teams. @@ -99,10 +101,10 @@ Execute Script Whenever you need to specify different courses of action to be taken in a shell script, as result of the success or failure of a command, you will use the if construct to define such conditions. Its basic syntax is: - if CONDITION; then + if CONDITION; then COMMANDS; else - OTHER-COMMANDS + OTHER-COMMANDS fi Where CONDITION can be one of the following (only the most frequent conditions are cited here) and evaluates to true when: @@ -133,8 +135,8 @@ Where CONDITION can be one of the following (only the most frequent conditions a This loop allows to execute one or more commands for each value in a list of values. Its basic syntax is: - for item in SEQUENCE; do - COMMANDS; + for item in SEQUENCE; do + COMMANDS; done Where item is a generic variable that represents each value in SEQUENCE during each iteration. @@ -143,8 +145,8 @@ Where item is a generic variable that represents each value in SEQUENCE during e This loop allows to execute a series of repetitive commands as long as the control command executes with an exit status equal to zero (successfully). Its basic syntax is: - while EVALUATION_COMMAND; do - EXECUTE_COMMANDS; + while EVALUATION_COMMAND; do + EXECUTE_COMMANDS; done Where EVALUATION_COMMAND can be any command(s) that can exit with a success (0) or failure (other than 0) status, and EXECUTE_COMMANDS can be any program, script or shell construct, including other nested loops. @@ -158,7 +160,7 @@ We will demonstrate the use of the if construct and the for loop with the follow Let’s create a file with a list of services that we want to monitor at a glance. # cat myservices.txt - + sshd mariadb httpd @@ -172,10 +174,10 @@ Script to Monitor Linux Services Our shell script should look like. #!/bin/bash - + # This script iterates over a list of services and # is used to determine whether they are running or not. - + for service in $(cat myservices.txt); do systemctl status $service | grep --quiet "running" if [ $? -eq 0 ]; then @@ -214,10 +216,10 @@ Services Monitoring Script We could go one step further and check for the existence of myservices.txt before even attempting to enter the for loop. #!/bin/bash - + # This script iterates over a list of services and # is used to determine whether they are running or not. - + if [ -f myservices.txt ]; then for service in $(cat myservices.txt); do systemctl status $service | grep --quiet "running" @@ -238,9 +240,9 @@ You may want to maintain a list of hosts in a text file and use a script to dete The read shell built-in command tells the while loop to read myhosts line by line and assigns the content of each line to variable host, which is then passed to the ping command. #!/bin/bash - + # This script is used to demonstrate the use of a while loop - + while read host; do ping -c 2 $host done < myhosts diff --git a/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md b/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md index 7537f784bd..1d069e08ea 100644 --- a/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md +++ b/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md @@ -1,3 +1,5 @@ +Translating by Xuanwo + Part 2 - LFCS: How to Install and Use vi/vim as a Full Text Editor ================================================================================ A couple of months ago, the Linux Foundation launched the LFCS (Linux Foundation Certified Sysadmin) certification in order to help individuals from all over the world to verify they are capable of doing basic to intermediate system administration tasks on Linux systems: system support, first-hand troubleshooting and maintenance, plus intelligent decision-making to know when it’s time to raise issues to upper support teams. @@ -295,7 +297,7 @@ Vi Search String in File c). vi uses a command (similar to sed’s) to perform substitution operations over a range of lines or an entire file. To change the word “old” to “young” for the entire file, we must enter the following command. - :%s/old/young/g + :%s/old/young/g **Notice**: The colon at the beginning of the command. diff --git a/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md b/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md index 6ac3d104a0..77fe5cf040 100644 --- a/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md +++ b/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md @@ -1,3 +1,5 @@ +Translating by Xuanwo + Part 3 - LFCS: How to Archive/Compress Files & Directories, Setting File Attributes and Finding Files in Linux ================================================================================ Recently, the Linux Foundation started the LFCS (Linux Foundation Certified Sysadmin) certification, a brand new program whose purpose is allowing individuals from all corners of the globe to have access to an exam, which if approved, certifies that the person is knowledgeable in performing basic to intermediate system administration tasks on Linux systems. This includes supporting already running systems and services, along with first-level troubleshooting and analysis, plus the ability to decide when to escalate issues to engineering teams. @@ -178,9 +180,9 @@ List Archive Content Run any of the following commands: - # gzip -d myfiles.tar.gz [#1] - # bzip2 -d myfiles.tar.bz2 [#2] - # xz -d myfiles.tar.xz [#3] + # gzip -d myfiles.tar.gz [#1] + # bzip2 -d myfiles.tar.bz2 [#2] + # xz -d myfiles.tar.xz [#3] Then diff --git a/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md b/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md index ada637fabb..93e4b2966b 100644 --- a/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md +++ b/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md @@ -1,3 +1,5 @@ +Translating by Xuanwo + Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition ================================================================================ Last August, the Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a shiny chance for system administrators to show, through a performance-based exam, that they can perform overall operational support of Linux systems: system support, first-level diagnosing and monitoring, plus issue escalation – if needed – to other support teams. diff --git a/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md b/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md index 1544a378bc..4316e32c16 100644 --- a/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md +++ b/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md @@ -1,3 +1,5 @@ +Translating by Xuanwo + Part 5 - LFCS: How to Mount/Unmount Local and Network (Samba & NFS) Filesystems in Linux ================================================================================ The Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a brand new program whose purpose is allowing individuals from all corners of the globe to get certified in basic to intermediate system administration tasks for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus smart decision-making when it comes to raising issues to upper support teams. diff --git a/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md b/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md index bdabfb1f9d..901fb7b4f1 100644 --- a/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md +++ b/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md @@ -1,3 +1,5 @@ +Translating by Xuanwo + Part 6 - LFCS: Assembling Partitions as RAID Devices – Creating & Managing System Backups ================================================================================ Recently, the Linux Foundation launched the LFCS (Linux Foundation Certified Sysadmin) certification, a shiny chance for system administrators everywhere to demonstrate, through a performance-based exam, that they are capable of performing overall operational support on Linux systems: system support, first-level diagnosing and monitoring, plus issue escalation, when required, to other support teams. @@ -24,7 +26,7 @@ However, the actual fault-tolerance and disk I/O performance lean on how the har Our tool of choice for creating, assembling, managing, and monitoring our software RAIDs is called mdadm (short for multiple disks admin). ---------------- Debian and Derivatives ---------------- - # aptitude update && aptitude install mdadm + # aptitude update && aptitude install mdadm ---------- @@ -34,7 +36,7 @@ Our tool of choice for creating, assembling, managing, and monitoring our softwa ---------- ---------------- On openSUSE ---------------- - # zypper refresh && zypper install mdadm # + # zypper refresh && zypper install mdadm # #### Assembling Partitions as RAID Devices #### @@ -55,7 +57,7 @@ Creating RAID Array After creating RAID array, you an check the status of the array using the following commands. # cat /proc/mdstat - or + or # mdadm --detail /dev/md0 [More detailed summary] ![Check RAID Array Status](http://www.tecmint.com/wp-content/uploads/2014/10/Check-RAID-Array-Status.png) @@ -203,16 +205,16 @@ The downside of this backup approach is that the image will have the same size a # dd if=/dev/sda of=/system_images/sda.img OR - --------------------- Alternatively, you can compress the image file --------------------- - # dd if=/dev/sda | gzip -c > /system_images/sda.img.gz + --------------------- Alternatively, you can compress the image file --------------------- + # dd if=/dev/sda | gzip -c > /system_images/sda.img.gz **Restoring the backup from the image file** # dd if=/system_images/sda.img of=/dev/sda - OR - - --------------------- Depending on your choice while creating the image --------------------- - gzip -dc /system_images/sda.img.gz | dd of=/dev/sda + OR + + --------------------- Depending on your choice while creating the image --------------------- + gzip -dc /system_images/sda.img.gz | dd of=/dev/sda Method 2: Backup certain files / directories with tar command – already covered in [Part 3][3] of this series. You may consider using this method if you need to keep copies of specific files and directories (configuration files, users’ home directories, and so on). @@ -247,7 +249,7 @@ Synchronizing remote → local directories over ssh. In this case, switch the source and destination directories from the previous example. - # rsync -avzhe ssh root@remote_host:/remote_directory/ backups + # rsync -avzhe ssh root@remote_host:/remote_directory/ backups Please note that these are only 3 examples (most frequent cases you’re likely to run into) of the use of rsync. For more examples and usages of rsync commands can be found at the following article. diff --git a/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md b/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md index b024c89540..4b7cdf9fe2 100644 --- a/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md +++ b/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md @@ -1,3 +1,5 @@ +Translating by Xuanwo + Part 7 - LFCS: Managing System Startup Process and Services (SysVinit, Systemd and Upstart) ================================================================================ A couple of months ago, the Linux Foundation announced the LFCS (Linux Foundation Certified Sysadmin) certification, an exciting new program whose aim is allowing individuals from all ends of the world to get certified in performing basic to intermediate system administration tasks on Linux systems. This includes supporting already running systems and services, along with first-hand problem-finding and analysis, plus the ability to decide when to raise issues to engineering teams. @@ -267,7 +269,7 @@ Starting Stoping Services Under systemd you can enable or disable a service when it boots. - # systemctl enable [service] # enable a service + # systemctl enable [service] # enable a service # systemctl disable [service] # prevent a service from starting at boot The process of enabling or disabling a service to start automatically on boot consists in adding or removing symbolic links in the /etc/systemd/system/multi-user.target.wants directory. @@ -315,7 +317,7 @@ For example, # My test service - Upstart script demo description "Here goes the description of 'My test service'" author "Dave Null " # Stanzas - + # # Stanzas define when and how a process is started and stopped # See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn diff --git a/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md b/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md index 4ccf3f20f6..50f39ee2d9 100644 --- a/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md +++ b/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md @@ -1,3 +1,5 @@ +Translating by Xuanwo + Part 8 - LFCS: Managing Users & Groups, File Permissions & Attributes and Enabling sudo Access on Accounts ================================================================================ Last August, the Linux Foundation started the LFCS certification (Linux Foundation Certified Sysadmin), a brand new program whose purpose is to allow individuals everywhere and anywhere take an exam in order to get certified in basic to intermediate operational support for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus intelligent decision-making to be able to decide when it’s necessary to escalate issues to higher level support teams. @@ -191,7 +193,7 @@ Thus, any user should have permission to run /bin/passwd, but only root will be ![Change User Password in Linux](http://www.tecmint.com/wp-content/uploads/2014/10/change-user-password.png) Change User Password - + **Understanding Setgid** When the setgid bit is set, the effective GID of the real user becomes that of the group owner. Thus, any user can access a file under the privileges granted to the group owner of such file. In addition, when the setgid bit is set on a directory, newly created files inherit the same group as the directory, and newly created subdirectories will also inherit the setgid bit of the parent directory. You will most likely use this approach whenever members of a certain group need access to all the files in a directory, regardless of the file owner’s primary group. diff --git a/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md b/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md index 7b58a467d7..a363a50c09 100644 --- a/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md +++ b/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md @@ -1,3 +1,5 @@ +Translating by Xuanwo + Part 9 - LFCS: Linux Package Management with Yum, RPM, Apt, Dpkg, Aptitude and Zypper ================================================================================ Last August, the Linux Foundation announced the LFCS certification (Linux Foundation Certified Sysadmin), a shiny chance for system administrators everywhere to demonstrate, through a performance-based exam, that they are capable of succeeding at overall operational support for Linux systems. A Linux Foundation Certified Sysadmin has the expertise to ensure effective system support, first-level troubleshooting and monitoring, including finally issue escalation, when needed, to engineering support teams. @@ -85,7 +87,7 @@ rpm is the package management system used by Linux Standard Base (LSB)-compliant yum adds the functionality of automatic updates and package management with dependency management to RPM-based systems. As a high-level tool, like apt-get or aptitude, yum works with repositories. - Read More: [20 yum Command Examples][4] -- +- ### Common Usage of Low-Level Tools ### The most frequent tasks that you will do with low level tools are as follows: @@ -155,7 +157,7 @@ The most frequent tasks that you will do with high level tools are as follows. aptitude update will update the list of available packages, and aptitude search will perform the actual search for package_name. - # aptitude update && aptitude search package_name + # aptitude update && aptitude search package_name In the search all option, yum will search for package_name not only in package names, but also in package descriptions. @@ -190,8 +192,8 @@ The option remove will uninstall the package but leaving configuration files int # yum erase package_name ---Notice the minus sign in front of the package that will be uninstalled, openSUSE --- - - # zypper remove -package_name + + # zypper remove -package_name Most (if not all) package managers will prompt you, by default, if you’re sure about proceeding with the uninstallation before actually performing it. So read the onscreen messages carefully to avoid running into unnecessary trouble! @@ -199,7 +201,7 @@ Most (if not all) package managers will prompt you, by default, if you’re sure The following command will display information about the birthday package. - # aptitude show birthday + # aptitude show birthday # yum info birthday # zypper info birthday From f87d0c6fdfc6cc275997d7b679719349609d14e8 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Wed, 26 Aug 2015 08:46:50 +0800 Subject: [PATCH 1865/2517] small bug fixed --- ...50817 Top 5 Torrent Clients For Ubuntu Linux.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md b/translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md index 0ba1ac3e03..80c9899637 100644 --- a/translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md +++ b/translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md @@ -4,7 +4,7 @@ Translating by Xuanwo ================================================================================ ![Best Torrent clients for Ubuntu Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/5_Best_Torrent_Ubuntu.png) -你在寻找**Ubuntu中最好的BT客户端**吗?事实上,桌面平台中有许多可用的BT客户端,但是它们中的哪些才是**最好的**呢? +在寻找**Ubuntu中最好的BT客户端**吗?事实上,桌面平台中有许多可用的BT客户端,但是它们中的哪些才是**最好的**呢? 我将会列出最好的五个BT客户端,它们都拥有着体积轻盈,功能强大的特点,而且还有令人印象深刻的用户界面。自然,易于安装和使用也是特性之一。 @@ -32,7 +32,7 @@ Deluge可在Ubuntu的仓库中获取,你能够在Ubuntu软件中心中安装 ![qBittorrent client for Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/qbittorrent_icon.png) -正如它的名字所暗示的,[qBittorrent][2] 是著名的 [Bittorrent][3] 应用的Qt版本。如果你曾经使用过它,你将会看到和Windows下的Bittorrent相似的界面。同样轻巧并且有着BT客户端的所有标准功能,qBittorrent也可以在Ubuntu的默认仓库中找到。 +正如它的名字所暗示的,[qBittorrent][2] 是著名的 [Bittorrent][3] 应用的Qt版本。如果曾经使用过它,你将会看到和Windows下的Bittorrent相似的界面。同样轻巧并且有着BT客户端的所有标准功能,qBittorrent也可以在Ubuntu的默认仓库中找到。 它可以通过Ubuntu软件仓库安装,或者使用下面的命令: @@ -56,7 +56,7 @@ Deluge可在Ubuntu的仓库中获取,你能够在Ubuntu软件中心中安装 ![Vuze Torrent Logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/vuze_icon_for_mac_os_x_by_hamzasaleem-d6yx1fp.png) -[Vuze][6]是许多Linux以及Windows用户最喜欢的BT客户端。除了标准的功能,你可以直接在应用程序中搜索种子。你也可以订阅系列片源,这样你就无需再去寻找新的片源了,因为你可以在侧边栏中的订阅看到它们。 +[Vuze][6]是许多Linux以及Windows用户最喜欢的BT客户端。除了标准的功能,你可以直接在应用程序中搜索种子,也可以订阅系列片源,这样就无需再去寻找新的片源了,因为你可以在侧边栏中的订阅看到它们。 它还配备了一个视频播放器,可以播放带有字幕的高清视频以及一切。但是我不认为你会用它来代替那些更好的视频播放器,比如VLC。 @@ -72,7 +72,7 @@ Vuze可以通过Ubuntu软件中心安装或者使用下列命令: [Frostwire][7]可能会是一个你想要去尝试的应用。它不仅仅是一个简单的BT客户端,它还可以应用于安卓,你可以用它通过Wifi来共享文件。 -你可以在应用中搜索种子并且播放他们。除了下载文件,它还可以浏览你本地的影音文件,并且将它们有条理的呈现在播放器中。这同样适用于安卓版本。 +你可以在应用中搜索种子并且播放他们。除了下载文件,它还可以浏览本地的影音文件,并且将它们有条理的呈现在播放器中。这同样适用于安卓版本。 还有一个特点是:Frostwire提供了印度艺术家的合法音乐下载。你可以下载并且欣赏它们,免费而且合法。 @@ -84,15 +84,15 @@ Vuze可以通过Ubuntu软件中心安装或者使用下列命令: 在Windows中,uTorrent(发音:mu torrent)是我最喜欢的BT应用。尽管uTorrent可以在Linux下运行,但是我还是特意忽略了它。因为在Linux下使用uTorrent不仅困难,而且无法获得完整的应用体验(运行在浏览器中)。 -你可以[在这里][9]阅读Ubuntu下uTorrent的安装教程。 +可以[在这里][9]阅读Ubuntu下uTorrent的安装教程。 #### 快速提示: #### -大多数情况下,BT应用不会默认自动自动启动。如果你想改变这一行为,阅读[如何管理Ubuntu下的自启程序][10]来学习。 +大多数情况下,BT应用不会默认自动自动启动。如果想改变这一行为,请阅读[如何管理Ubuntu下的自启程序][10]来学习。 ### 你最喜欢的是什么? ### -这些是我对于Ubuntu下最好的BT客户端的一键。你最喜欢的是什么呢?请发表评论。你也可以查看与本主题相关的[Ubuntu最好的下载管理器][11]。如果你使用Popcorn Time,试试[Popcorn Time技巧][12] +这些是我对于Ubuntu下最好的BT客户端的意见。你最喜欢的是什么呢?请发表评论。也可以查看与本主题相关的[Ubuntu最好的下载管理器][11]。如果使用Popcorn Time,试试[Popcorn Time技巧][12] -------------------------------------------------------------------------------- From 3646e757e6ecde5c85cfcdcbddae02e91d71aa7c Mon Sep 17 00:00:00 2001 From: bazz2 Date: Wed, 26 Aug 2015 08:50:34 +0800 Subject: [PATCH 1866/2517] [translated by bazz2]Linux about to gain a new file system--bcachefs --- ...out to gain a new file system--bcachefs.md | 26 ------------------- ...out to gain a new file system--bcachefs.md | 25 ++++++++++++++++++ 2 files changed, 25 insertions(+), 26 deletions(-) delete mode 100644 sources/talk/20150824 Linux about to gain a new file system--bcachefs.md create mode 100644 translated/talk/20150824 Linux about to gain a new file system--bcachefs.md diff --git a/sources/talk/20150824 Linux about to gain a new file system--bcachefs.md b/sources/talk/20150824 Linux about to gain a new file system--bcachefs.md deleted file mode 100644 index 9568d05836..0000000000 --- a/sources/talk/20150824 Linux about to gain a new file system--bcachefs.md +++ /dev/null @@ -1,26 +0,0 @@ -[bazz2222222] -Linux about to gain a new file system – bcachefs -================================================================================ -A five year old file system built by Kent Overstreet, formerly of Google, is near feature complete with all critical components in place. Bcachefs boasts the performance and reliability of the widespread ext4 and xfs as well as the feature list similar to that of btrfs and zfs. Notable features include checksumming, compression, multiple devices, caching and eventually snapshots and other “nifty” features. - -Bcachefs started out as **bcache** which was a block caching layer, the evolution from bcache to a fully featured [copy-on-write][1] file system has been described as a metamorphosis. - -Responding to the self-imposed question “Yet another new filesystem? Why?” Kent Overstreet replies with the following “Well, years ago (going back to when I was still at Google), I and the other people working on bcache realized that what we were working on was, almost by accident, a good chunk of the functionality of a full blown filesystem – and there was a really clean and elegant design to be had there if we took it and ran with it. And a fast one – the main goal of bcachefs to match ext4 and xfs on performance and reliability, but with the features of btrfs/xfs.” - -Overstreet has invited people to use and test bcachefs out on their own systems. To find instructions to use bcachefs on your system check out the mailing list [announcement][2]. - -The file system situation on Linux is a fairly drawn out one, Fedora 16 for instance aimed to use btrfs instead of ext4 as the default file system, this switch still has not happened. Currently all of the Debian based distros, including Ubuntu, Mint and elementary OS, still use ext4 as their default file systems and none have even whispered about switching to a new default file system yet. - --------------------------------------------------------------------------------- - -via: http://www.linuxveda.com/2015/08/22/linux-gain-new-file-system-bcachefs/ - -作者:[Paul Hill][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxveda.com/author/paul_hill/ -[1]:https://en.wikipedia.org/wiki/Copy-on-write -[2]:https://lkml.org/lkml/2015/8/21/22 diff --git a/translated/talk/20150824 Linux about to gain a new file system--bcachefs.md b/translated/talk/20150824 Linux about to gain a new file system--bcachefs.md new file mode 100644 index 0000000000..4fe4bf8ff9 --- /dev/null +++ b/translated/talk/20150824 Linux about to gain a new file system--bcachefs.md @@ -0,0 +1,25 @@ +Linux 界将出现一个新的文件系统:bcachefs +================================================================================ +这个有 5 年历史,由 Kent Oberstreet 创建,过去属于谷歌的文件系统,最近完成了关键的组件。Bcachefs 文件系统自称其性能和稳定性与 ext4 和 xfs 相同,而其他方面的功能又可以与 btrfs 和 zfs 相媲美。主要特性包括校验、压缩、多设备支持、缓存、快照与其他好用的特性。 + +Bcachefs 来自 **bcache**,这是一个块级缓存层,从 bcaceh 到一个功能完整的[写时复制][1]文件系统,堪称是一项质的转变。 + +在自己提出问题“为什么要出一个新的文件系统”中,Kent Oberstreet 作了以下回答:当我还在谷歌的时候,我与其他在 bcache 上工作的同事在偶然的情况下意识到我们正在使用的东西可以成为一个成熟文件系统的功能块,我们可以用 bcache 创建一个拥有干净而优雅设计的文件系统,而最重要的一点是,bcachefs 的主要目的就是在性能和稳定性上能与 ext4 和 xfs 匹敌,同时拥有 btrfs 和 zfs 的特性。 + +Overstreet 邀请人们在自己的系统上测试 bcachefs,可以通过邮件列表[通告]获取 bcachefs 的操作指南。 + +Linux 生态系统中文件系统几乎处于一家独大状态,Fedora 在第 16 版的时候就想用 btrfs 换掉 ext4 作为其默认文件系统,但是到现在(LCTT:都出到 Fedora 22 了)还在使用 ext4。而几乎所有 Debian 系的发行版(Ubuntu、Mint、elementary OS 等)也使用 ext4 作为默认文件系统,并且这些主流的发生版都没有替换默认文件系统的意思。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxveda.com/2015/08/22/linux-gain-new-file-system-bcachefs/ + +作者:[Paul Hill][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxveda.com/author/paul_hill/ +[1]:https://en.wikipedia.org/wiki/Copy-on-write +[2]:https://lkml.org/lkml/2015/8/21/22 From 43513f894f561fb8013d27ed9f90a3cb54d28aa2 Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 26 Aug 2015 08:58:41 +0800 Subject: [PATCH 1867/2517] Update 20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md --- ... Hindi And Devanagari Support In Antergos And Arch Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md b/sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md index db36df66e6..826fa248a0 100644 --- a/sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md +++ b/sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How To Add Hindi And Devanagari Support In Antergos And Arch Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Indian-languages.jpg) @@ -44,4 +45,4 @@ via: http://itsfoss.com/display-hindi-arch-antergos/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://antergos.com/ -[2]:http://itsfoss.com/tag/antergos/ \ No newline at end of file +[2]:http://itsfoss.com/tag/antergos/ From 678a245caf421c84d52e5cabbed3d4b167e6c1f0 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Wed, 26 Aug 2015 09:24:56 +0800 Subject: [PATCH 1868/2517] [Translated]20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md --- ...gari Support In Antergos And Arch Linux.md | 48 ------------------- ...gari Support In Antergos And Arch Linux.md | 46 ++++++++++++++++++ 2 files changed, 46 insertions(+), 48 deletions(-) delete mode 100644 sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md create mode 100644 translated/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md diff --git a/sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md b/sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md deleted file mode 100644 index 826fa248a0..0000000000 --- a/sources/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md +++ /dev/null @@ -1,48 +0,0 @@ -Translating by GOLinux! -How To Add Hindi And Devanagari Support In Antergos And Arch Linux -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Indian-languages.jpg) - -You might be knowing by now that I have been trying my hands on [Antergos Linux][1] lately. One of the first few things I noticed after installing [Antergos][2] was that **Hindi scripts were not displayed properly** in the default chromium browser. - -This is a strange thing that I never encountered before in my desktop Linux experience ever. First, I thought maybe it could be a browser problem so I went on to install Firefox only to see the same story repeated. Firefox also could not display Hindi properly. Unlike Chromium that displayed nothing, Firefox did display something but it was not readable. - -![No hindi support in Arch Linux based Antergos](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Hindi_Support_Antergos_Arch_linux_1.jpeg) - -Hindi display in Chromium - -![No hindi support in Arch Linux based Antergos](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Hindi_Support_Antergos_Arch_linux_2.jpeg) - -Hindi display in Firefox - -Strange? So no Hindi support in Arch based Antergos Linux by default? I did not verify, but I presume that it would be the same for other Indian languages etc that are also based on Devanagari script. - -I this quick tutorial, I am going to show you how to add Devanagari support so that Hindi and other Indian languages are displayed properly. - -### Add Indian language support in Antergos and Arch Linux ### - -Open a terminal and use the following command: - - sudo yaourt -S ttf-indic-otf - -Enter the password. And it will provide rendering support for Indian languages. - -Restarting Firefox displayed Hindi correctly immediately, but it took a restart to display Hindi. For that reason, I advise that you **restart your system** after installing the Indian fonts. - -![Adding Hindi display support in Arch based Antergos Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Hindi_Support_Antergos_Arch_linux_4.jpeg) - -I hope tis quick helped you to read Hindi, Sanskrit, Tamil, Telugu, Malayalam, Bangla and other Indian languages in Antergos and other Arch based Linux distros such as Manjaro Linux. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/display-hindi-arch-antergos/ - -作者:[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://antergos.com/ -[2]:http://itsfoss.com/tag/antergos/ diff --git a/translated/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md b/translated/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md new file mode 100644 index 0000000000..1bcc05a080 --- /dev/null +++ b/translated/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md @@ -0,0 +1,46 @@ +为Antergos与Arch Linux添加印度语和梵文支持 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Indian-languages.jpg) + +你们到目前或许知道,我最近一直在尝试体验[Antergos Linux][1]。在安装完[Antergos][2]后我所首先注意到的一些事情是在默认的Chromium浏览器中**没法正确显示印度语脚本**。 + +这是一件奇怪的事情,在我之前桌面Linux的体验中是从未遇到过的。起初,我认为是浏览器的问题,所以我安装了Firefox,然而问题依旧,Firefox也不能正确显示印度语。和Chromium不显示任何东西不同的是,Firefox确实显示了一些东西,但是毫无可读性。 + +![No hindi support in Arch Linux based Antergos](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Hindi_Support_Antergos_Arch_linux_1.jpeg) +Chromium中的印度语显示 + + +![No hindi support in Arch Linux based Antergos](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Hindi_Support_Antergos_Arch_linux_2.jpeg) +Firefox中的印度语显示 + +奇怪吧?那么,默认情况下基于Arch的Antergos Linux中没有印度语的支持吗?我没有去验证,但是我假设其它基于梵语脚本的印地语之类会产生同样的问题。 + +在这个快速指南中,我打算为大家演示如何来添加梵语支持,以便让印度语和其它印地语都能正确显示。 + +### 在Antergos和Arch Linux中添加印地语支持 ### + +打开终端,使用以下命令: + + sudo yaourt -S ttf-indic-otf + +键入密码,它会提供给你对于印地语的译文支持。 + +重启Firefox,会马上正确显示印度语了,但是它需要一次重启来显示印度语。因此,我建议你在安装了印地语字体后**重启你的系统**。 + +![Adding Hindi display support in Arch based Antergos Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Hindi_Support_Antergos_Arch_linux_4.jpeg) + +我希望这篇快速指南能够帮助你,让你可以在Antergos和其它基于Arch的Linux发行版中,如Manjaro Linux,阅读印度语、梵文、泰米尔语、泰卢固语、马拉雅拉姆语、孟加拉语,以及其它印地语。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/display-hindi-arch-antergos/ + +作者:[Abhishek][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://antergos.com/ +[2]:http://itsfoss.com/tag/antergos/ From d0b3823ee81ddae2ddc374aee4bacb2d34956387 Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 26 Aug 2015 09:27:15 +0800 Subject: [PATCH 1869/2517] Update 20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md --- ...Several Smaller Partition into One Large Virtual Storage.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md b/sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md index 6815fa64d8..ebf3a9c4fd 100644 --- a/sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md +++ b/sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Mhddfs – Combine Several Smaller Partition into One Large Virtual Storage ================================================================================ Let’s assume that you have 30GB of movies and you have 3 drives each 20 GB in size. So how will you store? @@ -183,4 +184,4 @@ via: http://www.tecmint.com/combine-partitions-into-one-in-linux-using-mhddfs/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ [2]:http://www.tecmint.com/mount-filesystem-in-linux/ -[3]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ \ No newline at end of file +[3]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ From 08862d689ef1eb4776633573c33b7b8f9257c2c7 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 26 Aug 2015 09:43:49 +0800 Subject: [PATCH 1870/2517] Update 20150728 Process of the Linux kernel building.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 20150728 Process of the Linux kernel building.md --- ...28 Process of the Linux kernel building.md | 127 ++---------------- 1 file changed, 12 insertions(+), 115 deletions(-) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/sources/tech/20150728 Process of the Linux kernel building.md index b1c4388e66..9ee5f795ef 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/sources/tech/20150728 Process of the Linux kernel building.md @@ -199,9 +199,7 @@ AWK = awk ... ``` -After definition of these variables we define two variables: `USERINCLUDE` and `LINUXINCLUDE`. They will contain paths of the directories with headers (public for users in the first case and for kernel in the second case): - -在这些定义好的变量之后,我们又定义了两个变量:`USERINCLUDE` 和`LINUXINCLUDE`。他们为包含头文件的路径(第一个是给用户用的,第二个是给内核用的): +在这些定义好的变量后面,我们又定义了两个变量:`USERINCLUDE` 和`LINUXINCLUDE`。他们包含了头文件的路径(第一个是给用户用的,第二个是给内核用的): ```Makefile USERINCLUDE := \ @@ -216,7 +214,6 @@ LINUXINCLUDE := \ ... ``` -And the standard flags for the C compiler: 以及标准的C 编译器标志: ```Makefile KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ @@ -226,8 +223,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -std=gnu89 ``` -It is the not last compiler flags, they can be updated by the other makefiles (for example kbuilds from `arch/`). After all of these, all variables will be exported to be available in the other makefiles. The following two the `RCS_FIND_IGNORE` and the `RCS_TAR_IGNORE` variables will contain files that will be ignored in the version control system: -这并不是最终确定的编译器标志,他们还可以在其他makefile 里面更新(比如`arch/` 里面的kbuild)。经过所有这些,全部变量会被导出,这样其他makefile 就可以直接使用了。下面的两个变量`RCS_FIND_IGNORE` 和 `RCS_TAR_IGNORE` 包含了被版本控制系统忽略的文件: +这并不是最终确定的编译器标志,他们还可以在其他makefile 里面更新(比如`arch/` 里面的kbuild)。变量定义完之后,全部会被导出供其他makefile 使用。下面的两个变量`RCS_FIND_IGNORE` 和 `RCS_TAR_IGNORE` 包含了被版本控制系统忽略的文件: ```Makefile export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \ @@ -237,16 +233,11 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ --exclude CVS --exclude .pc --exclude .hg --exclude .git ``` -That's all. We have finished with the all preparations, next point is the building of `vmlinux`. - 这就是全部了,我们已经完成了所有的准备工作,下一个点就是如果构建`vmlinux`. -Directly to the kernel build 直面构建内核 -------------------------------------------------------------------------------- -As we have finished all preparations, next step in the root makefile is related to the kernel build. Before this moment we will not see in the our terminal after the execution of the `make` command. But now first steps of the compilation are started. In this moment we need to go on the [598](https://github.com/torvalds/linux/blob/master/Makefile#L598) line of the Linux kernel top makefile and we will see `vmlinux` target there: - 现在我们已经完成了所有的准备工作,根makefile(注:内核根目录下的makefile)的下一步工作就是和编译内核相关的了。在我们执行`make` 命令之前,我们不会在终端看到任何东西。但是现在编译的第一步开始了,这里我们需要从内核根makefile的的[598](https://github.com/torvalds/linux/blob/master/Makefile#L598) 行开始,这里可以看到目标`vmlinux`: ```Makefile @@ -254,29 +245,20 @@ all: vmlinux include arch/$(SRCARCH)/Makefile ``` -Don't worry that we have missed many lines in Makefile that are placed after `export RCS_FIND_IGNORE.....` and before `all: vmlinux.....`. This part of the makefile is responsible for the `make *.config` targets and as I wrote in the beginning of this part we will see only building of the kernel in a general way. - 不要操心我们略过的从`export RCS_FIND_IGNORE.....` 到`all: vmlinux.....` 这一部分makefile 代码,他们只是负责根据各种配置文件生成不同目标内核的,因为之前我就说了这一部分我们只讨论构建内核的通用途径。 -The `all:` target is the default when no target is given on the command line. You can see here that we include architecture specific makefile there (in our case it will be [arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)). From this moment we will continue from this makefile. As we can see `all` target depends on the `vmlinux` target that defined a little lower in the top makefile: - -目标`all:` 是在命令行里不指定目标时默认生成的目标。你可以看到这里我们包含了架构相关的makefile(默认情况下会是[arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile))。从这一时刻起,我们会从这个makefile 继续进行下去。如我们所见,目标`all` 依赖于根makefile 后面声明的`vmlinux`: +目标`all:` 是在命令行如果不指定具体目标时默认使用的目标。你可以看到这里包含了架构相关的makefile(在这里就指的是[arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile))。从这一时刻起,我们会从这个makefile 继续进行下去。如我们所见,目标`all` 依赖于根makefile 后面声明的`vmlinux`: ```Makefile vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE ``` -The `vmlinux` is is the Linux kernel in an statically linked executable file format. The [scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) script links combines different compiled subsystems into vmlinux. The second target is the `vmlinux-deps` that defined as: - `vmlinux` 是linux 内核的静态链接可执行文件格式。脚本[scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) 把不同的编译好的子模块链接到一起形成了vmlinux。第二个目标是`vmlinux-deps`,它的定义如下: - ```Makefile vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) ``` -and consists from the set of the `built-in.o` from the each top directory of the Linux kernel. Later, when we will go through all directories in the Linux kernel, the `Kbuild` will compile all the `$(obj-y)` files. It then calls `$(LD) -r` to merge these files into one `built-in.o` file. For this moment we have no `vmlinux-deps`, so the `vmlinux` target will not be executed now. For me `vmlinux-deps` contains following files: - 它是由内核代码下的每个顶级目录的`built-in.o` 组成的。之后我们还会检查内核所有的目录,`kbuild` 会编译各个目录下所有的对应`$obj-y` 的源文件。接着调用`$(LD) -r` 把这些文件合并到一个`build-in.o` 文件里。此时我们还没有`vmloinux-deps`, 所以目标`vmlinux` 现在还不会被构建。对我而言`vmlinux-deps` 包含下面的文件 ``` @@ -295,8 +277,6 @@ arch/x86/power/built-in.o arch/x86/video/built-in.o net/built-in.o ``` -The next target that can be executed is following: - 下一个可以被执行的目标如下: ```Makefile @@ -305,8 +285,6 @@ $(vmlinux-dirs): prepare scripts $(Q)$(MAKE) $(build)=$@ ``` -As we can see the `vmlinux-dirs` depends on the two targets: `prepare` and `scripts`. The first `prepare` defined in the top `Makefile` of the Linux kernel and executes three stages of preparations: - 就像我们看到的,`vmlinux-dir` 依赖于两部分:`prepare` 和`scripts`。第一个`prepare` 定义在内核的根`makefile` ,准备工作分成三个阶段: ```Makefile @@ -321,17 +299,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \ prepare2: prepare3 outputmakefile asm-generic ``` -The first `prepare0` expands to the `archprepare` that exapnds to the `archheaders` and `archscripts` that defined in the `x86_64` specific [Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile). Let's look on it. The `x86_64` specific makefile starts from the definition of the variables that are related to the archicteture-specific configs ([defconfig](https://github.com/torvalds/linux/tree/master/arch/x86/configs) and etc.). After this it defines flags for the compiling of the [16-bit](https://en.wikipedia.org/wiki/Real_mode) code,calculating of the `BITS` variable that can be `32` for `i386` or `64` for the `x86_64` flags for the assembly source code, flags for the linker and many many more (all definitions you can find in the [arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)). The first target is `archheaders` in the makefile generates syscall table: - -第一个`prepare0` 展开到`archprepare` ,后者又展开到`archheader` 和`archscripts`,这两个变量定义在`x86_64` 相关的[Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)。让我们看看这个文件。`x86_64` 特定的makefile从变量定义开始,这些变量都是和特定架构的配置文件 ([defconfig](https://github.com/torvalds/linux/tree/master/arch/x86/configs),等等)有关联。变量定义之后,这个makefile 定义了编译[16-bit](https://en.wikipedia.org/wiki/Real_mode)代码的编译选项,根据变量`BITS` 的值,如果是`32` 汇编代码、链接器、以及其它很多东西(全部的定义都可以在[arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)找到)对应的参数就是`i386`,而`64`就对应的是`x86_84`。生成的系统调用列表(syscall table)的makefile 里第一个目标就是`archheaders` : +第一个`prepare0` 展开到`archprepare` ,后者又展开到`archheader` 和`archscripts`,这两个变量定义在`x86_64` 相关的[Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)。让我们看看这个文件。`x86_64` 特定的makefile从变量定义开始,这些变量都是和特定架构的配置文件 ([defconfig](https://github.com/torvalds/linux/tree/master/arch/x86/configs),等等)有关联。变量定义之后,这个makefile 定义了编译[16-bit](https://en.wikipedia.org/wiki/Real_mode)代码的编译选项,根据变量`BITS` 的值,如果是`32`, 汇编代码、链接器、以及其它很多东西(全部的定义都可以在[arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)找到)对应的参数就是`i386`,而`64`就对应的是`x86_84`。生成的系统调用列表(syscall table)的makefile 里第一个目标就是`archheaders` : ```Makefile archheaders: $(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all ``` -And the second target is `archscripts` in this makefile is: - 这个makefile 里第二个目标就是`archscripts`: ```Makefile @@ -339,17 +313,13 @@ archscripts: scripts_basic $(Q)$(MAKE) $(build)=arch/x86/tools relocs ``` -We can see that it depends on the `scripts_basic` target from the top [Makefile](https://github.com/torvalds/linux/blob/master/Makefile). At the first we can see the `scripts_basic` target that executes make for the [scripts/basic](https://github.com/torvalds/linux/blob/master/scripts/basic/Makefile) makefile: - - 我们可以看到`archscripts` 是依赖于根[Makefile](https://github.com/torvalds/linux/blob/master/Makefile)里的`scripts_basic` 。首先我们可以看出`scripts_basic` 是根据[scripts/basic](https://github.com/torvalds/linux/blob/master/scripts/basic/Makefile) 的mekefile 执行的: + 我们可以看到`archscripts` 是依赖于根[Makefile](https://github.com/torvalds/linux/blob/master/Makefile)里的`scripts_basic` 。首先我们可以看出`scripts_basic` 是按照[scripts/basic](https://github.com/torvalds/linux/blob/master/scripts/basic/Makefile) 的mekefile 执行make 的: ```Maklefile scripts_basic: $(Q)$(MAKE) $(build)=scripts/basic ``` -The `scripts/basic/Makefile` contains targets for compilation of the two host programs: `fixdep` and `bin2`: - `scripts/basic/Makefile`包含了编译两个主机程序`fixdep` 和`bin2` 的目标: ```Makefile @@ -360,8 +330,6 @@ always := $(hostprogs-y) $(addprefix $(obj)/,$(filter-out fixdep,$(always))): $(obj)/fixdep ``` -First program is `fixdep` - optimizes list of dependencies generated by the [gcc](https://gcc.gnu.org/) that tells make when to remake a source code file. The second program is `bin2c` depends on the value of the `CONFIG_BUILD_BIN2C` kernel configuration option and very little C program that allows to convert a binary on stdin to a C include on stdout. You can note here strange notation: `hostprogs-y` and etc. This notation is used in the all `kbuild` files and more about it you can read in the [documentation](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/makefiles.txt). In our case the `hostprogs-y` tells to the `kbuild` that there is one host program named `fixdep` that will be built from the will be built from `fixdep.c` that located in the same directory that `Makefile`. The first output after we will execute `make` command in our terminal will be result of this `kbuild` file: - 第一个工具是`fixdep`:用来优化[gcc](https://gcc.gnu.org/) 生成的依赖列表,然后在重新编译源文件的时候告诉make。第二个工具是`bin2c`,他依赖于内核配置选项`CONFIG_BUILD_BIN2C`,并且它是一个用来将标准输入接口(注:即stdin)收到的二进制流通过标准输出接口(即:stdout)转换成C 头文件的非常小的C 程序。你可以注意到这里有些奇怪的标志,如`hostprogs-y`等。这些标志使用在所有的`kbuild` 文件,更多的信息你可以从[documentation](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/makefiles.txt) 获得。在我们的用例`hostprogs-y` 中,他告诉`kbuild` 这里有个名为`fixed` 的程序,这个程序会通过和`Makefile` 相同目录的`fixdep.c` 编译而来。执行make 之后,终端的第一个输出就是`kbuild` 的结果: ``` @@ -369,16 +337,12 @@ $ make HOSTCC scripts/basic/fixdep ``` -As `script_basic` target was executed, the `archscripts` target will execute `make` for the [arch/x86/tools](https://github.com/torvalds/linux/blob/master/arch/x86/tools/Makefile) makefile with the `relocs` target: - 当目标`script_basic` 被执行,目标`archscripts` 就会make [arch/x86/tools](https://github.com/torvalds/linux/blob/master/arch/x86/tools/Makefile) 下的makefile 和目标`relocs`: ```Makefile $(Q)$(MAKE) $(build)=arch/x86/tools relocs ``` -The `relocs_32.c` and the `relocs_64.c` will be compiled that will contain [relocation](https://en.wikipedia.org/wiki/Relocation_%28computing%29) information and we will see it in the `make` output: - 代码`relocs_32.c` 和`relocs_64.c` 包含了[重定位](https://en.wikipedia.org/wiki/Relocation_%28computing%29) 的信息,将会被编译,者可以在`make` 的输出中看到: ```Makefile @@ -388,8 +352,6 @@ The `relocs_32.c` and the `relocs_64.c` will be compiled that will contain [relo HOSTLD arch/x86/tools/relocs ``` -There is checking of the `version.h` after compiling of the `relocs.c`: - 在编译完`relocs.c` 之后会检查`version.h`: ```Makefile @@ -398,17 +360,12 @@ $(version_h): $(srctree)/Makefile FORCE $(Q)rm -f $(old_version_h) ``` -We can see it in the output: - 我们可以在输出看到它: - ``` CHK include/config/kernel.release ``` -and the building of the `generic` assembly headers with the `asm-generic` target from the `arch/x86/include/generated/asm` that generated in the top Makefile of the Linux kernel. After the `asm-generic` target the `archprepare` will be done, so the `prepare0` target will be executed. As I wrote above: - 以及在内核根Makefiel 使用`arch/x86/include/generated/asm`的目标`asm-generic` 来构建`generic` 汇编头文件。在目标`asm-generic` 之后,`archprepare` 就会被完成,所以目标`prepare0` 会接着被执行,如我上面所写: ```Makefile @@ -416,32 +373,24 @@ prepare0: archprepare FORCE $(Q)$(MAKE) $(build)=. ``` -Note on the `build`. It defined in the [scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include) and looks like this: - 注意`build`,它是定义在文件[scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include),内容是这样的: ```Makefile build := -f $(srctree)/scripts/Makefile.build obj ``` -or in our case it is current source directory - `.`: - 或者在我们的例子中,他就是当前源码目录路径——`.`: ```Makefile $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.build obj=. ``` -The [scripts/Makefile.build](https://github.com/torvalds/linux/blob/master/scripts/Makefile.build) tries to find the `Kbuild` file by the given directory via the `obj` parameter, include this `Kbuild` files: - 参数`obj` 会告诉脚本[scripts/Makefile.build](https://github.com/torvalds/linux/blob/master/scripts/Makefile.build) 那些目录包含`kbuild` 文件,脚本以此来寻找各个`kbuild` 文件: ```Makefile include $(kbuild-file) ``` -and build targets from it. In our case `.` contains the [Kbuild](https://github.com/torvalds/linux/blob/master/Kbuild) file that generates the `kernel/bounds.s` and the `arch/x86/kernel/asm-offsets.s`. After this the `prepare` target finished to work. The `vmlinux-dirs` also depends on the second target - `scripts` that compiles following programs: `file2alias`, `mk_elfconfig`, `modpost` and etc... After scripts/host-programs compilation our `vmlinux-dirs` target can be executed. First of all let's try to understand what does `vmlinux-dirs` contain. For my case it contains paths of the following kernel directories: - -然后根据这个构建目标。我们这里`.` 包含了[Kbuild](https://github.com/torvalds/linux/blob/master/Kbuild),就用这个文件来生成`kernel/bounds.s` 和`arch/x86/kernel/asm-offsets.s`。这样目标`prepare` 就完成了它的工作。`vmlinux-dirs` 也依赖于第二个目标——`scripts` ,`scripts`会编译接下来的几个程序:`filealias`,`mk_elfconfig`,`modpost`等等。`scripts/host-programs` 编译完之后,我们的目标`vmlinux-dirs` 就可以开始编译了。第一步,我们先来理解一下`vmlinux-dirs` 都包含了那些东西。在我们的例子中它包含了接下来的内核目录的路径: +然后根据这个构建目标。我们这里`.` 包含了[Kbuild](https://github.com/torvalds/linux/blob/master/Kbuild),就用这个文件来生成`kernel/bounds.s` 和`arch/x86/kernel/asm-offsets.s`。这样目标`prepare` 就完成了它的工作。`vmlinux-dirs` 也依赖于第二个目标——`scripts` ,`scripts`会编译接下来的几个程序:`filealias`,`mk_elfconfig`,`modpost`等等。`scripts/host-programs` 编译完之后,我们的目标`vmlinux-dirs` 就可以开始编译了。第一步,我们先来理解一下`vmlinux-dirs` 都包含了那些东西。在我们的例子中它包含了接下来要使用的内核目录的路径: ``` init usr arch/x86 kernel mm fs ipc security crypto block @@ -449,8 +398,6 @@ drivers sound firmware arch/x86/pci arch/x86/power arch/x86/video net lib arch/x86/lib ``` -We can find definition of the `vmlinux-dirs` in the top [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) of the Linux kernel: - 我们可以在内核的根[Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 里找到`vmlinux-dirs` 的定义: ```Makefile @@ -467,8 +414,6 @@ libs-y := lib/ ... ``` -Here we remove the `/` symbol from the each directory with the help of the `patsubst` and `filter` functions and put it to the `vmlinux-dirs`. So we have list of directories in the `vmlinux-dirs` and the following code: - 这里我们借助函数`patsubst` 和`filter`去掉了每个目录路径里的符号`/`,并且把结果放到`vmlinux-dirs` 里。所以我们就有了`vmlinux-dirs` 里的目录的列表,以及下面的代码: ```Makefile @@ -476,8 +421,6 @@ $(vmlinux-dirs): prepare scripts $(Q)$(MAKE) $(build)=$@ ``` -The `$@` represents `vmlinux-dirs` here that means that it will go recursively over all directories from the `vmlinux-dirs` and its internal directories (depens on configuration) and will execute `make` in there. We can see it in the output: - 符号`$@` 在这里代表了`vmlinux-dirs`,这就表明程序会递归遍历从`vmlinux-dirs` 以及它内部的全部目录(依赖于配置),并且在对应的目录下执行`make` 命令。我们可以在输出看到结果: ``` @@ -495,8 +438,8 @@ The `$@` represents `vmlinux-dirs` here that means that it will go recursively o CC arch/x86/entry/syscall_64.o ``` -Source code in each directory will be compiled and linked to the `built-in.o`: 每个目录下的源代码将会被编译并且链接到`built-io.o` 里: + ``` $ find . -name built-in.o ./arch/x86/crypto/built-in.o @@ -508,8 +451,6 @@ $ find . -name built-in.o ... ``` -Ok, all buint-in.o(s) built, now we can back to the `vmlinux` target. As you remember, the `vmlinux` target is in the top Makefile of the Linux kernel. Before the linking of the `vmlinux` it builds [samples](https://github.com/torvalds/linux/tree/master/samples), [Documentation](https://github.com/torvalds/linux/tree/master/Documentation) and etc., but I will not describe it in this part as I wrote in the beginning of this part. - 好了,所有的`built-in.o` 都构建完了,现在我们回到目标`vmlinux` 上。你应该还记得,目标`vmlinux` 是在内核的根makefile 里。在链接`vmlinux` 之前,系统会构建[samples](https://github.com/torvalds/linux/tree/master/samples), [Documentation](https://github.com/torvalds/linux/tree/master/Documentation)等等,但是如上文所述,我不会在本文描述这些。 ```Makefile @@ -519,8 +460,6 @@ vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE +$(call if_changed,link-vmlinux) ``` -As you can see main purpose of it is a call of the [scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) script is linking of the all `built-in.o`(s) to the one statically linked executable and creation of the [System.map](https://en.wikipedia.org/wiki/System.map). In the end we will see following output: - 你可以看到,`vmlinux` 的调用脚本[scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) 的主要目的是把所有的`built-in.o` 链接成一个静态可执行文件、生成[System.map](https://en.wikipedia.org/wiki/System.map)。 最后我们来看看下面的输出: ``` @@ -539,31 +478,24 @@ As you can see main purpose of it is a call of the [scripts/link-vmlinux.sh](htt SYSMAP System.map ``` -and `vmlinux` and `System.map` in the root of the Linux kernel source tree: -还有内核源码树根目录下的`vmlinux` 和`System.map` +以及内核源码树根目录下的`vmlinux` 和`System.map` + ``` $ ls vmlinux System.map System.map vmlinux ``` -That's all, `vmlinux` is ready. The next step is creation of the [bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage). - 这就是全部了,`vmlinux` 构建好了,下一步就是创建[bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage). -Building bzImage 制作bzImage -------------------------------------------------------------------------------- -The `bzImage` is the compressed Linux kernel image. We can get it with the execution of the `make bzImage` after the `vmlinux` built. In other way we can just execute `make` without arguments and will get `bzImage` anyway because it is default image: - -`bzImage` 就是压缩了的linux 内核镜像。我们可以在构建了`vmlinux` 之后通过执行`make bzImage` 获得`bzImage`。同时我们可以仅仅执行`make` 而不带任何参数也可以生成`bzImage` ,因为它是在[arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile) 里定义的、默认会生成的镜像: +`bzImage` 就是压缩了的linux 内核镜像。我们可以在构建了`vmlinux` 之后通过执行`make bzImage` 获得`bzImage`。同时我们可以仅仅执行`make` 而不带任何参数也可以生成`bzImage` ,因为它是在[arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile) 里预定义的、默认生成的镜像: ```Makefile all: bzImage ``` -in the [arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile). Let's look on this target, it will help us to understand how this image builds. As I already said the `bzImage` target defined in the [arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile) and looks like this: - 让我们看看这个目标,他能帮助我们理解这个镜像是怎么构建的。我已经说过了`bzImage` 师被定义在[arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile),定义如下: ```Makefile @@ -573,16 +505,12 @@ bzImage: vmlinux $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@ ``` -We can see here, that first of all called `make` for the boot directory, in our case it is: - 在这里我们可以看到第一次为boot 目录执行`make`,在我们的例子里是这样的: ```Makefile boot := arch/x86/boot ``` -The main goal now to build source code in the `arch/x86/boot` and `arch/x86/boot/compressed` directories, build `setup.bin` and `vmlinux.bin`, and build the `bzImage` from they in the end. First target in the [arch/x86/boot/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/Makefile) is the `$(obj)/setup.elf`: - 现在的主要目标是编译目录`arch/x86/boot` 和`arch/x86/boot/compressed` 的代码,构建`setup.bin` 和`vmlinux.bin`,然后用这两个文件生成`bzImage`。第一个目标是定义在[arch/x86/boot/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/Makefile) 的`$(obj)/setup.elf`: ```Makefile @@ -590,8 +518,6 @@ $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE $(call if_changed,ld) ``` -We already have the `setup.ld` linker script in the `arch/x86/boot` directory and the `SETUP_OBJS` expands to the all source files from the `boot` directory. We can see first output: - 我们已经在目录`arch/x86/boot`有了链接脚本`setup.ld`,并且将变量`SETUP_OBJS` 扩展到`boot` 目录下的全部源代码。我们可以看看第一个输出: ```Makefile @@ -607,15 +533,12 @@ We already have the `setup.ld` linker script in the `arch/x86/boot` directory an CC arch/x86/boot/edd.o ``` -The next source code file is the [arch/x86/boot/header.S](https://github.com/torvalds/linux/blob/master/arch/x86/boot/header.S), but we can't build it now because this target depends on the following two header files: - -下一个源码文件是[arch/x86/boot/header.S](https://github.com/torvalds/linux/blob/master/arch/x86/boot/header.S),但是我们不能现在就编译他,因为这个目标依赖于下面两个头文件: +下一个源码文件是[arch/x86/boot/header.S](https://github.com/torvalds/linux/blob/master/arch/x86/boot/header.S),但是我们不能现在就编译它,因为这个目标依赖于下面两个头文件: ```Makefile $(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h ``` -The first is `voffset.h` generated by the `sed` script that gets two addresses from the `vmlinux` with the `nm` util: 第一个头文件`voffset.h` 是使用`sed` 脚本生成的,包含用`nm` 工具从`vmlinux` 获取的两个地址: ```C @@ -623,8 +546,6 @@ The first is `voffset.h` generated by the `sed` script that gets two addresses f #define VO__text 0xffffffff81000000 ``` -They are start and end of the kernel. The second is `zoffset.h` depens on the `vmlinux` target from the [arch/x86/boot/compressed/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/compressed/Makefile): - 这两个地址是内核的起始和结束地址。第二个头文件`zoffset.h` 在[arch/x86/boot/compressed/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/compressed/Makefile) 可以看出是依赖于目标`vmlinux`的: ```Makefile @@ -632,9 +553,7 @@ $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE $(call if_changed,zoffset) ``` -The `$(obj)/compressed/vmlinux` target depends on the `vmlinux-objs-y` that compiles source code files from the [arch/x86/boot/compressed](https://github.com/torvalds/linux/tree/master/arch/x86/boot/compressed) directory and generates `vmlinux.bin`, `vmlinux.bin.bz2`, and compiles programm - `mkpiggy`. We can see this in the output: - -目标`$(obj)/compressed/vmlinux` 依赖于变量`vmlinux-objs-y` —— 表明要编译目录[arch/x86/boot/compressed](https://github.com/torvalds/linux/tree/master/arch/x86/boot/compressed) 下的源代码,然后生成`vmlinux.bin`, `vmlinux.bin.bz2`, 和编译工具 - `mkpiggy`。我们可以在下面的输出看出来: +目标`$(obj)/compressed/vmlinux` 依赖于变量`vmlinux-objs-y` —— 说明需要编译目录[arch/x86/boot/compressed](https://github.com/torvalds/linux/tree/master/arch/x86/boot/compressed) 下的源代码,然后生成`vmlinux.bin`, `vmlinux.bin.bz2`, 和编译工具 - `mkpiggy`。我们可以在下面的输出看出来: ```Makefile LDS arch/x86/boot/compressed/vmlinux.lds @@ -647,8 +566,6 @@ The `$(obj)/compressed/vmlinux` target depends on the `vmlinux-objs-y` that comp HOSTCC arch/x86/boot/compressed/mkpiggy ``` -Where the `vmlinux.bin` is the `vmlinux` with striped debuging information and comments and the `vmlinux.bin.bz2` compressed `vmlinux.bin.all` + `u32` size of `vmlinux.bin.all`. The `vmlinux.bin.all` is `vmlinux.bin + vmlinux.relocs`, where `vmlinux.relocs` is the `vmlinux` that was handled by the `relocs` program (see above). As we got these files, the `piggy.S` assembly files will be generated with the `mkpiggy` program and compiled: - `vmlinux.bin` 是去掉了调试信息和注释的`vmlinux` 二进制文件,加上了占用了`u32` (注:即4-Byte)的长度信息的`vmlinux.bin.all` 压缩后就是`vmlinux.bin.bz2`。其中`vmlinux.bin.all` 包含了`vmlinux.bin` 和`vmlinux.relocs`(注:vmlinux 的重定位信息),其中`vmlinux.relocs` 是`vmlinux` 经过程序`relocs` 处理之后的`vmlinux` 镜像(见上文所述)。我们现在已经获取到了这些文件,汇编文件`piggy.S` 将会被`mkpiggy` 生成、然后编译: ```Makefile @@ -656,16 +573,12 @@ Where the `vmlinux.bin` is the `vmlinux` with striped debuging information and c AS arch/x86/boot/compressed/piggy.o ``` -This assembly files will contain computed offset from a compressed kernel. After this we can see that `zoffset` generated: - 这个汇编文件会包含经过计算得来的、压缩内核的偏移信息。处理完这个汇编文件,我们就可以看到`zoffset` 生成了: ```Makefile ZOFFSET arch/x86/boot/zoffset.h ``` -As the `zoffset.h` and the `voffset.h` are generated, compilation of the source code files from the [arch/x86/boot](https://github.com/torvalds/linux/tree/master/arch/x86/boot/) can be continued: - 现在`zoffset.h` 和`voffset.h` 已经生成了,[arch/x86/boot](https://github.com/torvalds/linux/tree/master/arch/x86/boot/) 里的源文件可以继续编译: ```Makefile @@ -686,15 +599,12 @@ As the `zoffset.h` and the `voffset.h` are generated, compilation of the source CC arch/x86/boot/video-bios.o ``` -As all source code files will be compiled, they will be linked to the `setup.elf`: - 所有的源代码会被编译,他们最终会被链接到`setup.elf` : ```Makefile LD arch/x86/boot/setup.elf ``` -or: 或者: @@ -702,32 +612,24 @@ or: ld -m elf_x86_64 -T arch/x86/boot/setup.ld arch/x86/boot/a20.o arch/x86/boot/bioscall.o arch/x86/boot/cmdline.o arch/x86/boot/copy.o arch/x86/boot/cpu.o arch/x86/boot/cpuflags.o arch/x86/boot/cpucheck.o arch/x86/boot/early_serial_console.o arch/x86/boot/edd.o arch/x86/boot/header.o arch/x86/boot/main.o arch/x86/boot/mca.o arch/x86/boot/memory.o arch/x86/boot/pm.o arch/x86/boot/pmjump.o arch/x86/boot/printf.o arch/x86/boot/regs.o arch/x86/boot/string.o arch/x86/boot/tty.o arch/x86/boot/video.o arch/x86/boot/video-mode.o arch/x86/boot/version.o arch/x86/boot/video-vga.o arch/x86/boot/video-vesa.o arch/x86/boot/video-bios.o -o arch/x86/boot/setup.elf ``` -The last two things is the creation of the `setup.bin` that will contain compiled code from the `arch/x86/boot/*` directory: - 最后两件事是创建包含目录`arch/x86/boot/*` 下的编译过的代码的`setup.bin`: ``` objcopy -O binary arch/x86/boot/setup.elf arch/x86/boot/setup.bin ``` -and the creation of the `vmlinux.bin` from the `vmlinux`: - 以及从`vmlinux` 生成`vmlinux.bin` : ``` objcopy -O binary -R .note -R .comment -S arch/x86/boot/compressed/vmlinux arch/x86/boot/vmlinux.bin ``` -In the end we compile host program: [arch/x86/boot/tools/build.c](https://github.com/torvalds/linux/blob/master/arch/x86/boot/tools/build.c) that will create our `bzImage` from the `setup.bin` and the `vmlinux.bin`: - 最后,我们编译主机程序[arch/x86/boot/tools/build.c](https://github.com/torvalds/linux/blob/master/arch/x86/boot/tools/build.c),它将会用来把`setup.bin` 和`vmlinux.bin` 打包成`bzImage`: ``` arch/x86/boot/tools/build arch/x86/boot/setup.bin arch/x86/boot/vmlinux.bin arch/x86/boot/zoffset.h arch/x86/boot/bzImage ``` -Actually the `bzImage` is the concatenated `setup.bin` and the `vmlinux.bin`. In the end we will see the output which familiar to all who once build the Linux kernel from source: - 实际上`bzImage` 就是把`setup.bin` 和`vmlinux.bin` 连接到一起。最终我们会看到输出结果,就和那些用源码编译过内核的同行的结果一样: ``` @@ -737,20 +639,15 @@ CRC 94a88f9a Kernel: arch/x86/boot/bzImage is ready (#5) ``` -That's all. 全部结束。 -Conclusion 结论 ================================================================================ -It is the end of this part and here we saw all steps from the execution of the `make` command to the generation of the `bzImage`. I know, the Linux kernel makefiles and process of the Linux kernel building may seem confusing at first glance, but it is not so hard. Hope this part will help you to understand process of the Linux kernel building. - 这就是本文的最后一节。本文我们了解了编译内核的全部步骤:从执行`make` 命令开始,到最后生成`bzImage`。我知道,linux 内核的makefiles 和构建linux 的过程第一眼看起来可能比较迷惑,但是这并不是很难。希望本文可以帮助你理解构建linux 内核的整个流程。 -Links 链接 ================================================================================ From a4e422dd35b5560e84bc1955ab2a2797a03abf59 Mon Sep 17 00:00:00 2001 From: zl Date: Wed, 26 Aug 2015 10:01:29 +0800 Subject: [PATCH 1871/2517] move file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 Process of the Linux kernel building.md 并移动到translated --- .../tech/20150728 Process of the Linux kernel building.md | 2 -- 1 file changed, 2 deletions(-) rename {sources => translated}/tech/20150728 Process of the Linux kernel building.md (99%) diff --git a/sources/tech/20150728 Process of the Linux kernel building.md b/translated/tech/20150728 Process of the Linux kernel building.md similarity index 99% rename from sources/tech/20150728 Process of the Linux kernel building.md rename to translated/tech/20150728 Process of the Linux kernel building.md index 9ee5f795ef..b8ded80179 100644 --- a/sources/tech/20150728 Process of the Linux kernel building.md +++ b/translated/tech/20150728 Process of the Linux kernel building.md @@ -1,5 +1,3 @@ -Translating by Ezio - 如何构建Linux 内核 ================================================================================ 介绍 From 461ef3145bae861e099915bfa1e9c50a836a2850 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 26 Aug 2015 11:55:19 +0800 Subject: [PATCH 1872/2517] PUB:20150817 Top 5 Torrent Clients For Ubuntu Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Xuanwo 其中有一处 indi artists, 根据我的判断,应该是指“independent artists” ,独立音乐人。根据其网站描述,应该是指以 CC 协议提供音乐的人。所以我径直调整了,如有不当,请讨论。:> --- ... Top 5 Torrent Clients For Ubuntu Linux.md | 115 +++++++++++++++++ ... Top 5 Torrent Clients For Ubuntu Linux.md | 120 ------------------ 2 files changed, 115 insertions(+), 120 deletions(-) create mode 100644 published/20150817 Top 5 Torrent Clients For Ubuntu Linux.md delete mode 100644 translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md diff --git a/published/20150817 Top 5 Torrent Clients For Ubuntu Linux.md b/published/20150817 Top 5 Torrent Clients For Ubuntu Linux.md new file mode 100644 index 0000000000..0ad6d04671 --- /dev/null +++ b/published/20150817 Top 5 Torrent Clients For Ubuntu Linux.md @@ -0,0 +1,115 @@ +Ubuntu 下五个最好的 BT 客户端 +================================================================================ + +![Best Torrent clients for Ubuntu Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/5_Best_Torrent_Ubuntu.png) + +在寻找 **Ubuntu 中最好的 BT 客户端**吗?事实上,Linux 桌面平台中有许多 BT 客户端,但是它们中的哪些才是**最好的 Ubuntu 客户端**呢? + +我将会列出 Linux 上最好的五个 BT 客户端,它们都拥有着体积轻盈,功能强大的特点,而且还有令人印象深刻的用户界面。自然,易于安装和使用也是特性之一。 + +### Ubuntu 下最好的 BT 客户端 ### + +考虑到 Ubuntu 默认安装了 Transmission,所以我将会从这个列表中排除了 Transmission。但是这并不意味着 Transmission 没有资格出现在这个列表中,事实上,Transmission 是一个非常好的BT客户端,这也正是它被包括 Ubuntu 在内的多个发行版默认安装的原因。 + +### Deluge ### + +![Logo of Deluge torrent client for Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Deluge.png) + +[Deluge][1] 被 Lifehacker 评选为 Linux 下最好的 BT 客户端,这说明了 Deluge 是多么的有用。而且,并不仅仅只有 Lifehacker 是 Deluge 的粉丝,纵观多个论坛,你都会发现不少 Deluge 的忠实拥趸。 + +快速,时尚而直观的界面使得 Deluge 成为 Linux 用户的挚爱。 + +Deluge 可在 Ubuntu 的仓库中获取,你能够在 Ubuntu 软件中心中安装它,或者使用下面的命令: + + sudo apt-get install deluge + +### qBittorrent ### + +![qBittorrent client for Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/qbittorrent_icon.png) + +正如它的名字所暗示的,[qBittorrent][2] 是著名的 [Bittorrent][3] 应用的 Qt 版本。如果曾经使用过它,你将会看到和 Windows 下的 Bittorrent 相似的界面。同样轻巧并且有着 BT 客户端的所有标准功能, qBittorrent 也可以在 Ubuntu 的默认仓库中找到。 + +它可以通过 Ubuntu 软件仓库安装,或者使用下面的命令: + + sudo apt-get install qbittorrent + + +### Tixati ### + +![Tixati torrent client logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/tixati_icon.png) + +[Tixati][4] 是另一个不错的 Ubuntu 下的 BT 客户端。它有着一个默认的黑暗主题,尽管很多人喜欢,但是我例外。它拥有着一切你能在 BT 客户端中找到的功能。 + +除此之外,它还有着数据分析的额外功能。你可以在美观的图表中分析流量以及其它数据。 + +- [下载 Tixati][5] + + + +### Vuze ### + +![Vuze Torrent Logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/vuze_icon_for_mac_os_x_by_hamzasaleem-d6yx1fp.png) + +[Vuze][6] 是许多 Linux 以及 Windows 用户最喜欢的 BT 客户端。除了标准的功能,你可以直接在应用程序中搜索种子,也可以订阅系列片源,这样就无需再去寻找新的片源了,因为你可以在侧边栏中的订阅看到它们。 + +它还配备了一个视频播放器,可以播放带有字幕的高清视频等等。但是我不认为你会用它来代替那些更好的视频播放器,比如 VLC。 + +Vuze 可以通过 Ubuntu 软件中心安装或者使用下列命令: + + sudo apt-get install vuze + + + +### Frostwire ### + +![Logo of Frostwire torrent client](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/frostwire.png) + +[Frostwire][7] 是一个你应该试一下的应用。它不仅仅是一个简单的 BT 客户端,它还可以应用于安卓,你可以用它通过 Wifi 来共享文件。 + +你可以在应用中搜索种子并且播放他们。除了下载文件,它还可以浏览本地的影音文件,并且将它们有条理的呈现在播放器中。这同样适用于安卓版本。 + +还有一个特点是:Frostwire 提供了独立音乐人的[合法音乐下载][13]。你可以下载并且欣赏它们,免费而且合法。 + +- [下载 Frostwire][8] + + + +### 荣誉奖 ### + +在 Windows 中,uTorrent(发音:mu torrent)是我最喜欢的 BT 应用。尽管 uTorrent 可以在 Linux 下运行,但是我还是特意忽略了它。因为在 Linux 下使用 uTorrent 不仅困难,而且无法获得完整的应用体验(运行在浏览器中)。 + +可以[在这里][9]阅读 Ubuntu下uTorrent 的安装教程。 + +#### 快速提示: #### + +大多数情况下,BT 应用不会默认自动启动。如果想改变这一行为,请阅读[如何管理 Ubuntu 下的自启动程序][10]来学习。 + +### 你最喜欢的是什么? ### + +这些是我对于 Ubuntu 下最好的 BT 客户端的意见。你最喜欢的是什么呢?请发表评论。也可以查看与本主题相关的[Ubuntu 最好的下载管理器][11]。如果使用 Popcorn Time,试试 [Popcorn Time 技巧][12] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/best-torrent-ubuntu/ + +作者:[Abhishek][a] +译者:[Xuanwo](https://github.com/Xuanwo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://deluge-torrent.org/ +[2]:http://www.qbittorrent.org/ +[3]:http://www.bittorrent.com/ +[4]:http://www.tixati.com/ +[5]:http://www.tixati.com/download/ +[6]:http://www.vuze.com/ +[7]:http://www.frostwire.com/ +[8]:http://www.frostwire.com/downloads +[9]:http://sysads.co.uk/2014/05/install-utorrent-3-3-ubuntu-14-04-13-10/ +[10]:http://itsfoss.com/manage-startup-applications-ubuntu/ +[11]:http://itsfoss.com/4-best-download-managers-for-linux/ +[12]:http://itsfoss.com/popcorn-time-tips/ +[13]:http://www.frostclick.com/wp/ + diff --git a/translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md b/translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md deleted file mode 100644 index 80c9899637..0000000000 --- a/translated/share/20150817 Top 5 Torrent Clients For Ubuntu Linux.md +++ /dev/null @@ -1,120 +0,0 @@ -Translating by Xuanwo - -介绍Ubuntu下五大BT客户端 -================================================================================ -![Best Torrent clients for Ubuntu Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/5_Best_Torrent_Ubuntu.png) - -在寻找**Ubuntu中最好的BT客户端**吗?事实上,桌面平台中有许多可用的BT客户端,但是它们中的哪些才是**最好的**呢? - -我将会列出最好的五个BT客户端,它们都拥有着体积轻盈,功能强大的特点,而且还有令人印象深刻的用户界面。自然,易于安装和使用也是特性之一。 - -### Ubuntu下最好的BT客户端 ### - -考虑到Ubuntu默认安装了Transmission,所以我将会从这个列表中删去Transmission。但是这并不意味着Transmission没有资格出现在这个列表中,事实上,Transmission是一个非常好的BT客户端,这也正是它被多个发行版默认安装的原因,Ubuntu也不例外。 - ----------- - -### Deluge ### - -![Logo of Deluge torrent client for Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Deluge.png) - -[Deluge][1] 被Lifehacker选为Linux下最好的BT客户端,这说明了Deluge是多么的有用。而且,并不仅仅只有Lifehacker是Deluge的粉丝,纵观多个论坛,你都会发现不少Deluge的忠实拥趸。 - -快速,时尚而且直观的界面使得Deluge成为Linux用户的挚爱。 - -Deluge可在Ubuntu的仓库中获取,你能够在Ubuntu软件中心中安装它,或者使用下面的命令: - - sudo apt-get install delugeFast, sleek and intuitive interface makes Deluge a hot favorite among Linux users. - ----------- - -### qBittorrent ### - -![qBittorrent client for Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/qbittorrent_icon.png) - -正如它的名字所暗示的,[qBittorrent][2] 是著名的 [Bittorrent][3] 应用的Qt版本。如果曾经使用过它,你将会看到和Windows下的Bittorrent相似的界面。同样轻巧并且有着BT客户端的所有标准功能,qBittorrent也可以在Ubuntu的默认仓库中找到。 - -它可以通过Ubuntu软件仓库安装,或者使用下面的命令: - - sudo apt-get install qbittorrent - ----------- - -### Tixati ### - -![Tixati torrent client logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/tixati_icon.png) - -[Tixati][4] 是另一个不错的Ubuntu下的BT客户端。它有着一个默认的黑暗主题,尽管很多人喜欢,但是我例外。它拥有着一切你能在BT客户端中找到的功能。 - -除此之外,它还有着数据分析的额外功能。你可以在美观的图表中分析流量以及其它数据。 - -- [下载 Tixati][5] - ----------- - -### Vuze ### - -![Vuze Torrent Logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/vuze_icon_for_mac_os_x_by_hamzasaleem-d6yx1fp.png) - -[Vuze][6]是许多Linux以及Windows用户最喜欢的BT客户端。除了标准的功能,你可以直接在应用程序中搜索种子,也可以订阅系列片源,这样就无需再去寻找新的片源了,因为你可以在侧边栏中的订阅看到它们。 - -它还配备了一个视频播放器,可以播放带有字幕的高清视频以及一切。但是我不认为你会用它来代替那些更好的视频播放器,比如VLC。 - -Vuze可以通过Ubuntu软件中心安装或者使用下列命令: - - sudo apt-get install vuze - ----------- - -### Frostwire ### - -![Logo of Frostwire torrent client](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/frostwire.png) - -[Frostwire][7]可能会是一个你想要去尝试的应用。它不仅仅是一个简单的BT客户端,它还可以应用于安卓,你可以用它通过Wifi来共享文件。 - -你可以在应用中搜索种子并且播放他们。除了下载文件,它还可以浏览本地的影音文件,并且将它们有条理的呈现在播放器中。这同样适用于安卓版本。 - -还有一个特点是:Frostwire提供了印度艺术家的合法音乐下载。你可以下载并且欣赏它们,免费而且合法。 - -- [下载 Frostwire][8] - ----------- - -### 荣誉奖 ### - -在Windows中,uTorrent(发音:mu torrent)是我最喜欢的BT应用。尽管uTorrent可以在Linux下运行,但是我还是特意忽略了它。因为在Linux下使用uTorrent不仅困难,而且无法获得完整的应用体验(运行在浏览器中)。 - -可以[在这里][9]阅读Ubuntu下uTorrent的安装教程。 - -#### 快速提示: #### - -大多数情况下,BT应用不会默认自动自动启动。如果想改变这一行为,请阅读[如何管理Ubuntu下的自启程序][10]来学习。 - -### 你最喜欢的是什么? ### - -这些是我对于Ubuntu下最好的BT客户端的意见。你最喜欢的是什么呢?请发表评论。也可以查看与本主题相关的[Ubuntu最好的下载管理器][11]。如果使用Popcorn Time,试试[Popcorn Time技巧][12] - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/best-torrent-ubuntu/ - -作者:[Abhishek][a] -译者:[Xuanwo](https://github.com/Xuanwo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://deluge-torrent.org/ -[2]:http://www.qbittorrent.org/ -[3]:http://www.bittorrent.com/ -[4]:http://www.tixati.com/ -[5]:http://www.tixati.com/download/ -[6]:http://www.vuze.com/ -[7]:http://www.frostwire.com/ -[8]:http://www.frostwire.com/downloads -[9]:http://sysads.co.uk/2014/05/install-utorrent-3-3-ubuntu-14-04-13-10/ -[10]:http://itsfoss.com/manage-startup-applications-ubuntu/ -[11]:http://itsfoss.com/4-best-download-managers-for-linux/ -[12]:http://itsfoss.com/popcorn-time-tips/ - From 09c53626e630571fc79671978a3f52e7039d0cb7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 26 Aug 2015 15:41:08 +0800 Subject: [PATCH 1873/2517] =?UTF-8?q?20150826-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Is Out And It's Packed Full Of Features.md | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 sources/news/20150826 Plasma 5.4 Is Out And It's Packed Full Of Features.md diff --git a/sources/news/20150826 Plasma 5.4 Is Out And It's Packed Full Of Features.md b/sources/news/20150826 Plasma 5.4 Is Out And It's Packed Full Of Features.md new file mode 100644 index 0000000000..a103c6b505 --- /dev/null +++ b/sources/news/20150826 Plasma 5.4 Is Out And It's Packed Full Of Features.md @@ -0,0 +1,87 @@ +Plasma 5.4 Is Out And It’s Packed Full Of Features +================================================================================ +KDE has [announced][1] a brand new feature release of Plasma 5 — and it’s a corker. + +![kde network applet graphs](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/kde-network-applet-graphs.jpg) + +Better network details are among the changes + +Plasma 5.4.0 builds on [April’s 5.3.0 milestone][2] in a number of ways, ranging from the inherently technical, Wayland preview session, ahoy, to lavish aesthetic touches, like **1,400 brand new icons**. + +A handful of new components also feature in the release, including a new Plasma Widget for volume control, a monitor calibration tool and an improved user management tool. + +The ‘Kicker’ application menu has been powered up to let you favourite all types of content, not just applications. + +**KRunner now remembers searches** so that it can automatically offer suggestions based on your earlier queries as you type. + +The **network applet displays a graph** to give you a better understanding of your network traffic. It also gains two new VPN plugins for SSH and SSTP connections. + +Minor tweaks to the digital clock see it adapt better in slim panel mode, it gains ISO date support and makes it easier for you to toggle between 12 hour and 24 hour clock. Week numbers have been added to the calendar. + +### Application Dashboard ### + +![plasma 5.4 fullscreen dashboard](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/plasma-fullscreen-dashboard.jpg) + +The new ‘Application Dashboard’ in KDE Plasma 5.4.0 + +**A new full screen launcher, called ‘Application Dashboard’**, is also available. + +This full-screen dash offers the same features as the traditional Application Menu but with “sophisticated scaling to screen size and full spatial keyboard navigation”. + +Like the Unity launch, the new Plasma Application Dashboard helps you quickly find applications, sift through files and contacts based on your previous activity. + +### Changes in KDE Plasma 5.4.0 at a glance ### + +- Improved high DPI support +- KRunner autocompletion +- KRunner search history +- Application Dashboard add on +- 1,400 New icons +- Wayland tech preview + +For a full list of changes in Plasma 5.4 refer to [this changelog][3]. + +### Install Plasma 5.4 in Kubuntu 15.04 ### + +![new plasma desktop](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/new-plasma-desktop-.jpg) + +![Kubuntu logo](http://www.omgubuntu.co.uk/wp-content/uploads/2012/02/logo-kubuntu.png) + +To **install Plasma 5.4 in Kubuntu 15.04** you will need to add the KDE Backports PPA to your Software Sources. + +Adding the Kubuntu backports PPA **is not strictly advised** as it may upgrade other parts of the KDE desktop, application suite, developer frameworks or Kubuntu specific config files. + +If you like your desktop being stable, don’t proceed. + +The quickest way to upgrade to Plasma 5.4 once it lands in the Kubuntu Backports PPA is to use the Terminal: + + sudo add-apt-repository ppa:kubuntu-ppa/backports + + sudo apt-get update && sudo apt-get dist-upgrade + +Let the upgrade process complete. Assuming no errors emerge, reboot your computer for changes to take effect. + +If you’re not already using Kubuntu, i.e. you’re using the Unity version of Ubuntu, you should first install the Kubuntu desktop package (you’ll find it in the Ubuntu Software Centre). + +To undo the changes above and downgrade to the most recent version of Plasma available in the Ubuntu archives use the PPA-Purge tool: + + sudo apt-get install ppa-purge + + sudo ppa-purge ppa:kubuntu-ppa/backports + +Let us know how your upgrade/testing goes in the comments below and don’t forget to mention the features you hope to see added to the Plasma 5 desktop next. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/08/plasma-5-4-new-features + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://dot.kde.org/2015/08/25/kde-ships-plasma-540-feature-release-august +[2]:http://www.omgubuntu.co.uk/2015/04/kde-plasma-5-3-released-heres-how-to-upgrade-in-kubuntu-15-04 +[3]:https://www.kde.org/announcements/plasma-5.3.2-5.4.0-changelog.php \ No newline at end of file From 14fba98900ff292c4029455f6e7d5fe14f6023de Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 26 Aug 2015 15:59:39 +0800 Subject: [PATCH 1874/2517] =?UTF-8?q?20150826-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...stem status page of your infrastructure.md | 294 ++++++++++++++++++ 1 file changed, 294 insertions(+) create mode 100644 sources/tech/20150826 How to set up a system status page of your infrastructure.md diff --git a/sources/tech/20150826 How to set up a system status page of your infrastructure.md b/sources/tech/20150826 How to set up a system status page of your infrastructure.md new file mode 100644 index 0000000000..44fb4ed8d5 --- /dev/null +++ b/sources/tech/20150826 How to set up a system status page of your infrastructure.md @@ -0,0 +1,294 @@ +How to set up a system status page of your infrastructure +================================================================================ +If you are a system administrator who is responsible for critical IT infrastructure or services of your organization, you will understand the importance of effective communication in your day-to-day tasks. Suppose your production storage server is on fire. You want your entire team on the same page in order to resolve the issue as fast as you can. While you are at it, you don't want half of all users contacting you asking why they cannot access their documents. When a scheduled maintenance is coming up, you want to notify interested parties of the event ahead of the schedule, so that unnecessary support tickets can be avoided. + +All these require some sort of streamlined communication channel between you, your team and people you serve. One way to achieve that is to maintain a centralized system status page, where the detail of downtime incidents, progress updates and maintenance schedules are reported and chronicled. That way, you can minimize unnecessary distractions during downtime, and also have any interested party informed and opt-in for any status update. + +One good **open-source, self-hosted system status page solution** is [Cachet][1]. In this tutorial, I am going to describe how to set up a self-hosted system status page using Cachet. + +### Cachet Features ### + +Before going into the detail of setting up Cachet, let me briefly introduce its main features. + +- **Full JSON API**: The Cachet API allows you to connect any external program or script (e.g., uptime script) to Cachet to report incidents or update status automatically. +- **Authentication**: Cachet supports Basic Auth and API token in JSON API, so that only authorized personnel can update the status page. +- **Metrics system**: This is useful to visualize custom data over time (e.g., server load or response time). +- **Notification**: Optionally you can send notification emails about reported incidents to anyone who signed up to the status page. +- **Multiple languages**: The status page can be translated into 11 different languages. +- **Two factor authentication**: This allows you to lock your Cachet admin account with Google's two-factor authentication. +- **Cross database support**: You can choose between MySQL, SQLite, Redis, APC, and PostgreSQL for a backend storage. + +In the rest of the tutorial, I explain how to install and configure Cachet on Linux. + +### Step One: Download and Install Cachet ### + +Cachet requires a web server and a backend database to operate. In this tutorial, I am going to use the LAMP stack. Here are distro-specific instructions to install Cachet and LAMP stack. + +#### Debian, Ubuntu or Linux Mint #### + + $ sudo apt-get install curl git apache2 mysql-server mysql-client php5 php5-mysql + $ sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet + $ cd /var/www/cachet + $ sudo git checkout v1.1.1 + $ sudo chown -R www-data:www-data . + +For more detail on setting up LAMP stack on Debian-based systems, refer to [this tutorial][2]. + +#### Fedora, CentOS or RHEL #### + +On Red Hat based systems, you first need to [enable REMI repository][3] (to meet PHP version requirement). Then proceed as follows. + + $ sudo yum install curl git httpd mariadb-server + $ sudo yum --enablerepo=remi-php56 install php php-mysql php-mbstring + $ sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet + $ cd /var/www/cachet + $ sudo git checkout v1.1.1 + $ sudo chown -R apache:apache . + $ sudo firewall-cmd --permanent --zone=public --add-service=http + $ sudo firewall-cmd --reload + $ sudo systemctl enable httpd.service; sudo systemctl start httpd.service + $ sudo systemctl enable mariadb.service; sudo systemctl start mariadb.service + +For more details on setting up LAMP on Red Hat-based systems, refer to [this tutorial][4]. + +### Configure a Backend Database for Cachet ### + +The next step is to configure database backend. + +Log in to MySQL/MariaDB server, and create an empty database called 'cachet'. + + $ sudo mysql -uroot -p + +---------- + + mysql> create database cachet; + mysql> quit + +Now create a Cachet configuration file by using a sample configuration file. + + $ cd /var/www/cachet + $ sudo mv .env.example .env + +In .env file, fill in database information (i.e., DB_*) according to your setup. Leave other fields unchanged for now. + + APP_ENV=production + APP_DEBUG=false + APP_URL=http://localhost + APP_KEY=SomeRandomString + + DB_DRIVER=mysql + DB_HOST=localhost + DB_DATABASE=cachet + DB_USERNAME=root + DB_PASSWORD= + + CACHE_DRIVER=apc + SESSION_DRIVER=apc + QUEUE_DRIVER=database + + MAIL_DRIVER=smtp + MAIL_HOST=mailtrap.io + MAIL_PORT=2525 + MAIL_USERNAME=null + MAIL_PASSWORD=null + MAIL_ADDRESS=null + MAIL_NAME=null + + REDIS_HOST=null + REDIS_DATABASE=null + REDIS_PORT=null + +### Step Three: Install PHP Dependencies and Perform DB Migration ### + +Next, we are going to install necessary PHP dependencies. For that we will use composer. If you do not have composer installed on your system, install it first: + + $ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer + +Now go ahead and install PHP dependencies using composer. + + $ cd /var/www/cachet + $ sudo composer install --no-dev -o + +Next, perform one-time database migration. This step will populate the empty database we created earlier with necessary tables. + + $ sudo php artisan migrate + +Assuming the database config in /var/www/cachet/.env is correct, database migration should be completed successfully as shown below. + +![](https://farm6.staticflickr.com/5814/20235620184_54048676b0_c.jpg) + +Next, create a security key, which will be used to encrypt the data entered in Cachet. + + $ sudo php artisan key:generate + $ sudo php artisan config:cache + +![](https://farm6.staticflickr.com/5717/20831952096_7105c9fdc7_c.jpg) + +The generated app key will be automatically added to the APP_KEY variable of your .env file. No need to edit .env on your own here. + +### Step Four: Configure Apache HTTP Server ### + +Now it's time to configure the web server that Cachet will be running on. As we are using Apache HTTP server, create a new [virtual host][5] for Cachet as follows. + +#### Debian, Ubuntu or Linux Mint #### + + $ sudo vi /etc/apache2/sites-available/cachet.conf + +---------- + + + ServerName cachethost + ServerAlias cachethost + DocumentRoot "/var/www/cachet/public" + + Require all granted + Options Indexes FollowSymLinks + AllowOverride All + Order allow,deny + Allow from all + + + +Enable the new Virtual Host and mod_rewrite with: + + $ sudo a2ensite cachet.conf + $ sudo a2enmod rewrite + $ sudo service apache2 restart + +#### Fedora, CentOS or RHEL #### + +On Red Hat based systems, create a virtual host file as follows. + + $ sudo vi /etc/httpd/conf.d/cachet.conf + +---------- + + + ServerName cachethost + ServerAlias cachethost + DocumentRoot "/var/www/cachet/public" + + Require all granted + Options Indexes FollowSymLinks + AllowOverride All + Order allow,deny + Allow from all + + + +Now reload Apache configuration: + + $ sudo systemctl reload httpd.service + +### Step Five: Configure /etc/hosts for Testing Cachet ### + +At this point, the initial Cachet status page should be up and running, and now it's time to test. + +Since Cachet is configured as a virtual host of Apache HTTP server, we need to tweak /etc/hosts of your client computer to be able to access it. Here the client computer is the one from which you will be accessing the Cachet page. + +Open /etc/hosts, and add the following entry. + + $ sudo vi /etc/hosts + +---------- + + cachethost + +In the above, the name "cachethost" must match with ServerName specified in the Apache virtual host file for Cachet. + +### Test Cachet Status Page ### + +Now you are ready to access Cachet status page. Type http://cachethost in your browser address bar. You will be redirected to the initial Cachet setup page as follows. + +![](https://farm6.staticflickr.com/5745/20858228815_405fce1301_c.jpg) + +Choose cache/session driver. Here let's choose "File" for both cache and session drivers. + +Next, type basic information about the status page (e.g., site name, domain, timezone and language), as well as administrator account. + +![](https://farm1.staticflickr.com/611/20237229693_c22014e4fd_c.jpg) + +![](https://farm6.staticflickr.com/5707/20858228875_b056c9e1b4_c.jpg) + +![](https://farm6.staticflickr.com/5653/20671482009_8629572886_c.jpg) + +Your initial status page will finally be ready. + +![](https://farm6.staticflickr.com/5692/20237229793_f6a48f379a_c.jpg) + +Go ahead and create components (units of your system), incidents or any scheduled maintenance as you want. + +For example, to add a new component: + +![](https://farm6.staticflickr.com/5672/20848624752_9d2e0a07be_c.jpg) + +To add a scheduled maintenance: + +This is what the public Cachet status page looks like: + +![](https://farm1.staticflickr.com/577/20848624842_df68c0026d_c.jpg) + +With SMTP integration, you can send out emails on status updates to any subscribers. Also, you can fully customize the layout and style of the status page using CSS and markdown formatting. + +### Conclusion ### + +Cachet is pretty easy-to-use, self-hosted status page software. One of the nicest features of Cachet is its support for full JSON API. Using its RESTful API, one can easily hook up Cachet with separate monitoring backends (e.g., [Nagios][6]), and feed Cachet with incident reports and status updates automatically. This is far quicker and efficient than manually manage a status page. + +As final words, I'd like to mention one thing. While setting up a fancy status page with Cachet is straightforward, making the best use of the software is not as easy as installing it. You need total commitment from the IT team on updating the status page in an accurate and timely manner, thereby building credibility of the published information. At the same time, you need to educate users to turn to the status page. At the end of the day, it would be pointless to set up a status page if it's not populated well, and/or no one is checking it. Remember this when you consider deploying Cachet in your work environment. + +### Troubleshooting ### + +As a bonus, here are some useful troubleshooting tips in case you encounter problems while setting up Cachet. + +1. The Cachet page does not load anything, and you are getting the following error. + + production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in /var/www/cachet/bootstrap/cache/compiled.php:6695 + +**Solution**: Make sure that you create an app key, as well as clear configuration cache as follows. + + $ cd /path/to/cachet + $ sudo php artisan key:generate + $ sudo php artisan config:cache + +2. You are getting the following error while invoking composer command. + + - danielstjules/stringy 1.10.0 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. + - laravel/framework v5.1.8 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. + - league/commonmark 0.10.0 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. + +**Solution**: Make sure to install the required PHP extension mbstring on your system which is compatible with your PHP. On Red Hat based system, since we installed PHP from REMI-56 repository, we install the extension from the same repository. + + $ sudo yum --enablerepo=remi-php56 install php-mbstring + +3. You are getting a blank page while trying to access Cachet status page. The HTTP log shows the following error. + + PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/cachet/storage/logs/laravel-2015-08-21.log" could not be opened: failed to open stream: Permission denied' in /var/www/cachet/bootstrap/cache/compiled.php:12851 + +**Solution**: Try the following commands. + + $ cd /var/www/cachet + $ sudo php artisan cache:clear + $ sudo chmod -R 777 storage + $ sudo composer dump-autoload + +If the above solution does not work, try disabling SELinux: + + $ sudo setenforce 0 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/setup-system-status-page.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]:https://cachethq.io/ +[2]:http://xmodulo.com/install-lamp-stack-ubuntu-server.html +[3]:http://ask.xmodulo.com/install-remi-repository-centos-rhel.html +[4]:http://xmodulo.com/install-lamp-stack-centos.html +[5]:http://xmodulo.com/configure-virtual-hosts-apache-http-server.html +[6]:http://xmodulo.com/monitor-common-services-nagios.html \ No newline at end of file From 52b47060e88e3bc423bdc82b15c0af5531076e79 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 26 Aug 2015 16:12:45 +0800 Subject: [PATCH 1875/2517] =?UTF-8?q?20150826-3=20RHCE=20=E7=AC=AC?= =?UTF-8?q?=E4=BA=94=E7=AF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ate and Import Into Database) in RHEL 7.md | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md diff --git a/sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md b/sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md new file mode 100644 index 0000000000..217116cfee --- /dev/null +++ b/sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md @@ -0,0 +1,165 @@ +Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7 +================================================================================ +In order to keep your RHEL 7 systems secure, you need to know how to monitor all of the activities that take place on such systems by examining log files. Thus, you will be able to detect any unusual or potentially malicious activity and perform system troubleshooting or take another appropriate action. + +![Linux Rotate Log Files Using Rsyslog and Logrotate](http://www.tecmint.com/wp-content/uploads/2015/08/Manage-and-Rotate-Linux-Logs-Using-Rsyslog-Logrotate.jpg) + +RHCE Exam: Manage System LogsUsing Rsyslogd and Logrotate – Part 5 + +In RHEL 7, the [rsyslogd][1] daemon is responsible for system logging and reads its configuration from /etc/rsyslog.conf (this file specifies the default location for all system logs) and from files inside /etc/rsyslog.d, if any. + +### Rsyslogd Configuration ### + +A quick inspection of the [rsyslog.conf][2] will be helpful to start. This file is divided into 3 main sections: Modules (since rsyslog follows a modular design), Global directives (used to set global properties of the rsyslogd daemon), and Rules. As you will probably guess, this last section indicates what gets logged or shown (also known as the selector) and where, and will be our focus throughout this article. + +A typical line in rsyslog.conf is as follows: + +![Rsyslogd Configuration](http://www.tecmint.com/wp-content/uploads/2015/08/Rsyslogd-Configuration.png) + +Rsyslogd Configuration + +In the image above, we can see that a selector consists of one or more pairs Facility:Priority separated by semicolons, where Facility describes the type of message (refer to [section 4.1.1 in RFC 3164][3] to see the complete list of facilities available for rsyslog) and Priority indicates its severity, which can be one of the following self-explanatory words: + +- debug +- info +- notice +- warning +- err +- crit +- alert +- emerg + +Though not a priority itself, the keyword none means no priority at all of the given facility. + +**Note**: That a given priority indicates that all messages of such priority and above should be logged. Thus, the line in the example above instructs the rsyslogd daemon to log all messages of priority info or higher (regardless of the facility) except those belonging to mail, authpriv, and cron services (no messages coming from this facilities will be taken into account) to /var/log/messages. + +You can also group multiple facilities using the colon sign to apply the same priority to all of them. Thus, the line: + + *.info;mail.none;authpriv.none;cron.none /var/log/messages + +Could be rewritten as + + *.info;mail,authpriv,cron.none /var/log/messages + +In other words, the facilities mail, authpriv, and cron are grouped and the keyword none is applied to the three of them. + +#### Creating a custom log file #### + +To log all daemon messages to /var/log/tecmint.log, we need to add the following line either in rsyslog.conf or in a separate file (easier to manage) inside /etc/rsyslog.d: + + daemon.* /var/log/tecmint.log + +Let’s restart the daemon (note that the service name does not end with a d): + + # systemctl restart rsyslog + +And check the contents of our custom log before and after restarting two random daemons: + +![Linux Create Custom Log File](http://www.tecmint.com/wp-content/uploads/2015/08/Create-Custom-Log-File.png) + +Create Custom Log File + +As a self-study exercise, I would recommend you play around with the facilities and priorities and either log additional messages to existing log files or create new ones as in the previous example. + +### Rotating Logs using Logrotate ### + +To prevent log files from growing endlessly, the logrotate utility is used to rotate, compress, remove, and alternatively mail logs, thus easing the administration of systems that generate large numbers of log files. + +Logrotate runs daily as a cron job (/etc/cron.daily/logrotate) and reads its configuration from /etc/logrotate.conf and from files located in /etc/logrotate.d, if any. + +As with the case of rsyslog, even when you can include settings for specific services in the main file, creating separate configuration files for each one will help organize your settings better. + +Let’s take a look at a typical logrotate.conf: + +![Logrotate Configuration](http://www.tecmint.com/wp-content/uploads/2015/08/Logrotate-Configuration.png) + +Logrotate Configuration + +In the example above, logrotate will perform the following actions for /var/loh/wtmp: attempt to rotate only once a month, but only if the file is at least 1 MB in size, then create a brand new log file with permissions set to 0664 and ownership given to user root and group utmp. Next, only keep one archived log, as specified by the rotate directive: + +![Logrotate Logs Monthly](http://www.tecmint.com/wp-content/uploads/2015/08/Logrotate-Logs-Monthly.png) + +Logrotate Logs Monthly + +Let’s now consider another example as found in /etc/logrotate.d/httpd: + +![Rotate Apache Log Files](http://www.tecmint.com/wp-content/uploads/2015/08/Rotate-Apache-Log-Files.png) + +Rotate Apache Log Files + +You can read more about the settings for logrotate in its man pages ([man logrotate][4] and [man logrotate.conf][5]). Both files are provided along with this article in PDF format for your reading convenience. + +As a system engineer, it will be pretty much up to you to decide for how long logs will be stored and in what format, depending on whether you have /var in a separate partition / logical volume. Otherwise, you really want to consider removing old logs to save storage space. On the other hand, you may be forced to keep several logs for future security auditing according to your company’s or client’s internal policies. + +#### Saving Logs to a Database #### + +Of course examining logs (even with the help of tools such as grep and regular expressions) can become a rather tedious task. For that reason, rsyslog allows us to export them into a database (OTB supported RDBMS include MySQL, MariaDB, PostgreSQL, and Oracle. + +This section of the tutorial assumes that you have already installed the MariaDB server and client in the same RHEL 7 box where the logs are being managed: + + # yum update && yum install mariadb mariadb-server mariadb-client rsyslog-mysql + # systemctl enable mariadb && systemctl start mariadb + +Then use the `mysql_secure_installation` utility to set the password for the root user and other security considerations: + +![Secure MySQL Database](http://www.tecmint.com/wp-content/uploads/2015/08/Secure-MySQL-Database.png) + +Secure MySQL Database + +Note: If you don’t want to use the MariaDB root user to insert log messages to the database, you can configure another user account to do so. Explaining how to do that is out of the scope of this tutorial but is explained in detail in [MariaDB knowledge][6] base. In this tutorial we will use the root account for simplicity. + +Next, download the createDB.sql script from [GitHub][7] and import it into your database server: + + # mysql -u root -p < createDB.sql + +![Save Server Logs to Database](http://www.tecmint.com/wp-content/uploads/2015/08/Save-Server-Logs-to-Database.png) + +Save Server Logs to Database + +Finally, add the following lines to /etc/rsyslog.conf: + + $ModLoad ommysql + $ActionOmmysqlServerPort 3306 + *.* :ommysql:localhost,Syslog,root,YourPasswordHere + +Restart rsyslog and the database server: + + # systemctl restart rsyslog + # systemctl restart mariadb + +#### Querying the Logs using SQL syntax #### + +Now perform some tasks that will modify the logs (like stopping and starting services, for example), then log to your DB server and use standard SQL commands to display and search in the logs: + + USE Syslog; + SELECT ReceivedAt, Message FROM SystemEvents; + +![Query Logs in Database](http://www.tecmint.com/wp-content/uploads/2015/08/Query-Logs-in-Database.png) + +Query Logs in Database + +### Summary ### + +In this article we have explained how to set up system logging, how to rotate logs, and how to redirect the messages to a database for easier search. We hope that these skills will be helpful as you prepare for the [RHCE exam][8] and in your daily responsibilities as well. + +As always, your feedback is more than welcome. Feel free to use the form below to reach us. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-linux-system-logs-using-rsyslogd-and-logrotate/ + +作者:[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/wp-content/pdf/rsyslogd.pdf +[2]:http://www.tecmint.com/wp-content/pdf/rsyslog.conf.pdf +[3]:https://tools.ietf.org/html/rfc3164#section-4.1.1 +[4]:http://www.tecmint.com/wp-content/pdf/logrotate.pdf +[5]:http://www.tecmint.com/wp-content/pdf/logrotate.conf.pdf +[6]:https://mariadb.com/kb/en/mariadb/create-user/ +[7]:https://github.com/sematext/rsyslog/blob/master/plugins/ommysql/createDB.sql +[8]:http://www.tecmint.com/how-to-setup-and-configure-static-network-routing-in-rhel/ \ No newline at end of file From 8c775ab3d9ad4a223a37da1785f7b1ff00412dc4 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 26 Aug 2015 16:24:27 +0800 Subject: [PATCH 1876/2517] =?UTF-8?q?20150826-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Connecting Remote Unix or Linux Systems.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md diff --git a/sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md b/sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md new file mode 100644 index 0000000000..f36e1b21df --- /dev/null +++ b/sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md @@ -0,0 +1,110 @@ +Mosh Shell – A SSH Based Client for Connecting Remote Unix/Linux Systems +================================================================================ +Mosh, which stands for Mobile Shell is a command-line application which is used for connecting to the server from a client computer, over the Internet. It can be used as SSH and contains more feature than Secure Shell. It is an application similar to SSH, but with additional features. The application is written originally by Keith Winstein for Unix like operating system and released under GNU GPL v3. + +![Mosh Shell SSH Client](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-SSH-Client.png) + +Mosh Shell SSH Client + +#### Features of Mosh #### + +- It is a remote terminal application that supports roaming. +- Available for all major UNIX-like OS viz., Linux, FreeBSD, Solaris, Mac OS X and Android. +- Intermittent Connectivity supported. +- Provides intelligent local echo. +- Line editing of user keystrokes supported. +- Responsive design and Robust Nature over wifi, cellular and long-distance links. +- Remain Connected even when IP changes. It usages UDP in place of TCP (used by SSH). TCP time out when connect is reset or new IP assigned but UDP keeps the connection open. +- The Connection remains intact when you resume the session after a long time. +- No network lag. Shows users typed key and deletions immediately without network lag. +- Same old method to login as it was in SSH. +- Mechanism to handle packet loss. + +### Installation of Mosh Shell in Linux ### + +On Debian, Ubuntu and Mint alike systems, you can easily install the Mosh package with the help of [apt-get package manager][1] as shown. + + # apt-get update + # apt-get install mosh + +On RHEL/CentOS/Fedora based distributions, you need to turn on third party repository called [EPEL][2], in order to install mosh from this repository using [yum package manager][3] as shown. + + # yum update + # yum install mosh + +On Fedora 22+ version, you need to use [dnf package manager][4] to install mosh as shown. + + # dnf install mosh + +### How do I use Mosh Shell? ### + +1. Let’s try to login into remote Linux server using mosh shell. + + $ mosh root@192.168.0.150 + +![Mosh Shell Remote Connection](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-Remote-Connection.png) + +Mosh Shell Remote Connection + +**Note**: Did you see I got an error in connecting since the port was not open in my remote CentOS 7 box. A quick but not recommended solution I performed was: + + # systemctl stop firewalld [on Remote Server] + +The preferred way is to open a port and update firewall rules. And then connect to mosh on a predefined port. For in-depth details on firewalld you may like to visit this post. + +- [How to Configure Firewalld][5] + +2. Let’s assume that the default SSH port 22 was changed to port 70, in this case you can define custom port with the help of ‘-p‘ switch with mosh. + + $ mosh -p 70 root@192.168.0.150 + +3. Check the version of installed Mosh. + + $ mosh --version + +![Check Mosh Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Mosh-Version.png) + +Check Mosh Version + +4. You can close mosh session type ‘exit‘ on the prompt. + + $ exit + +5. Mosh supports a lot of options, which you may see as: + + $ mosh --help + +![Mosh Shell Options](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-Options.png) + +Mosh Shell Options + +#### Cons of Mosh Shell #### + +- Mosh requires additional prerequisite for example, allow direct connection via UDP, which was not required by SSH. +- Dynamic port allocation in the range of 60000-61000. The first open fort is allocated. It requires one port per connection. +- Default port allocation is a serious security concern, especially in production. +- IPv6 connections supported, but roaming on IPv6 not supported. +- Scrollback not supported. +- No X11 forwarding supported. +- No support for ssh-agent forwarding. + +### Conclusion ### + +Mosh is a nice small utility which is available for download in the repository of most of the Linux Distributions. Though it has a few discrepancies specially security concern and additional requirement it’s features like remaining connected even while roaming is its plus point. My recommendation is Every Linux-er who deals with SSH should try this application and mind it, Mosh is worth a try. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-mosh-shell-ssh-client-in-linux/ + +作者:[Avishek Kumar][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/avishek/ +[1]:http://www.tecmint.com/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management/ +[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[3]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[4]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ +[5]:http://www.tecmint.com/configure-firewalld-in-centos-7/ \ No newline at end of file From 455f69011e3d39c5668f35173c529842fa77872a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 26 Aug 2015 17:01:18 +0800 Subject: [PATCH 1877/2517] =?UTF-8?q?20150826-5=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...50826 Five Super Cool Open Source Games.md | 65 ++++++++++++++++ ... Run Kali Linux 2.0 In Docker Container.md | 74 +++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 sources/share/20150826 Five Super Cool Open Source Games.md create mode 100644 sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md diff --git a/sources/share/20150826 Five Super Cool Open Source Games.md b/sources/share/20150826 Five Super Cool Open Source Games.md new file mode 100644 index 0000000000..0b92dcedff --- /dev/null +++ b/sources/share/20150826 Five Super Cool Open Source Games.md @@ -0,0 +1,65 @@ +Five Super Cool Open Source Games +================================================================================ +In 2014 and 2015, Linux became home to a list of popular commercial titles such as the popular Borderlands, Witcher, Dead Island, and Counter Strike series of games. While this is exciting news, what of the gamer on a budget? Commercial titles are good, but even better are free-to-play alternatives made by developers who know what players like. + +Some time ago, I came across a three year old YouTube video with the ever optimistic title [5 Open Source Games that Don’t Suck][1]. Although the video praises some open source games, I’d prefer to approach the subject with a bit more enthusiasm, at least as far as the title goes. So, here’s my list of five super cool open source games. + +### Tux Racer ### + +![Tux Racer](http://fossforce.com/wp-content/uploads/2015/08/tuxracer-550x413.jpg) + +Tux Racer + +[Tux Racer][2] is the first game on this list because I’ve had plenty of experience with it. On a [recent trip to Mexico][3] that my brother and I took with [Kids on Computers][4], Tux Racer was one of the games that kids and teachers alike enjoyed. In this game, players use the Linux mascot, the penguin Tux, to race on downhill ski slopes in time trials in which players challenge their own personal bests. Currently there’s no multiplayer version available, but that could be subject to change. Available for Linux, OS X, Windows, and Android. + +### Warsow ### + +![Warsow](http://fossforce.com/wp-content/uploads/2015/08/warsow-550x413.jpg) + +Warsow + +The [Warsow][5] website explains: “Set in a futuristic cartoonish world, Warsow is a completely free fast-paced first-person shooter (FPS) for Windows, Linux and Mac OS X. Warsow is the Art of Respect and Sportsmanship Over the Web.” I was reluctant to include games from the FPS genre on this list, because many have played games in this genre, but I was amused by Warsow. It prioritizes lots of movement and the game is fast paced with a set of eight weapons to start with. The cartoonish style makes playing feel less serious and more casual, something for friends and family to play together. However, it boasts competitive play, and when I experienced the game I found there were, indeed, some expert players around. Available for Linux, Windows and OS X. + +### M.A.R.S – A ridiculous shooter ### + +![M.A.R.S. - A ridiculous shooter](http://fossforce.com/wp-content/uploads/2015/08/MARS-screenshot-550x344.jpg) + +M.A.R.S. – A ridiculous shooter + +[M.A.R.S – A ridiculous shooter][6] is appealing because of it’s vibrant coloring and style. There is support for two players on the same keyboard, but an online multiplayer version is currently in the works — meaning plans to play with friends have to wait for now. Regardless, it’s an entertaining space shooter with a few different ships and weapons to play as. There are different shaped ships, ranging from shotguns, lasers, scattered shots and more (one of the random ships shot bubbles at my opponents, which was funny amid the chaotic gameplay). There are a few modes of play, such as the standard death match against opponents to score a certain limit or score high, along with other modes called Spaceball, Grave-itation Pit and Cannon Keep. Available for Linux, Windows and OS X. + +### Valyria Tear ### + +![Valyria Tear](http://fossforce.com/wp-content/uploads/2015/08/bronnan-jump-to-enemy-550x413.jpg) + +Valyria Tear + +[Valyria Tear][7] resembles many fan favorite role-playing games (RPGs) spanning the years. The story is set in the usual era of fantasy games, full of knights, kingdoms and wizardry, and follows the main character Bronann. The design team did great work in designing the world and gives players everything expected from the genre: hidden chests, random monster encounters, non-player character (NPC) interaction, and something no RPG would be complete without: grinding for experience on lower level slime monsters until you’re ready for the big bosses. When I gave it a try, time didn’t permit me to play too far into the campaign, but for those interested there is a ‘[Let’s Play][8]‘ series by YouTube user Yohann Ferriera. Available for Linux, Windows and OS X. + +### SuperTuxKart ### + +![SuperTuxKart](http://fossforce.com/wp-content/uploads/2015/08/hacienda_tux_antarctica-550x293.jpg) + +SuperTuxKart + +Last but not least is [SuperTuxKart][9], a clone of Mario Kart that is every bit as fun as the original. It started development around 2000-2004 as Tux Kart, but there were errors in its production which led to a cease in development for a few years. Since development picked up again in 2006, it’s been improving, with version 0.9 debuting four months ago. In the game, our old friend Tux starts in the role of Mario and a few other open source mascots. One recognizable face among them is Suzanne, the monkey mascot for Blender. The graphics are solid and gameplay is fluent. While online play is in the planning stages, split screen multiplayer action is available, with up to four players supported on a single computer. Available for Linux, Windows, OS X, AmigaOS 4, AROS and MorphOS. + +-------------------------------------------------------------------------------- + +via: http://fossforce.com/2015/08/five-super-cool-open-source-games/ + +作者:Hunter Banks +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://www.youtube.com/watch?v=BEKVl-XtOP8 +[2]:http://tuxracer.sourceforge.net/download.html +[3]:http://fossforce.com/2015/07/banks-family-values-texas-linux-fest/ +[4]:http://www.kidsoncomputers.org/an-amazing-week-in-oaxaca +[5]:https://www.warsow.net/download +[6]:http://mars-game.sourceforge.net/ +[7]:http://valyriatear.blogspot.com/ +[8]:https://www.youtube.com/channel/UCQ5KrSk9EqcT_JixWY2RyMA +[9]:http://supertuxkart.sourceforge.net/ \ No newline at end of file diff --git a/sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md b/sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md new file mode 100644 index 0000000000..8018ca17e9 --- /dev/null +++ b/sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md @@ -0,0 +1,74 @@ +How to Run Kali Linux 2.0 In Docker Container +================================================================================ +### Introduction ### + +Kali Linux is a well known operating system for security testers and ethical hackers. It comes bundled with a large list of security related applications and make it easy to perform penetration testing. Recently, [Kali Linux 2.0][1] is out and it is being considered as one of the most important release for this operating system. On the other hand, Docker technology is getting massive popularity due to its scalability and ease of use. Dockers make it super easy to ship your software applications to your users. Breaking news is that you can now run Kali Linux via Dockers; let’s see how :) + +### Running Kali Linux 2.0 In Docker ### + +**Related Notes** + +If you don’t have docker installed on your system, you can do it by using the following commands: + +**For Ubuntu/Linux Mint/Debian:** + + sudo apt-get install docker + +**For Fedora/RHEL/CentOS:** + + sudo yum install docker + +**For Fedora 22:** + + dnf install docker + +You can start docker service by running: + + sudo docker start + +First of all make sure that docker service is running fine by using the following command: + + sudo docker status + +Kali Linux docker image has been uploaded online by Kali Linux development team, simply run following command to download this image to your system. + + docker pull kalilinux/kali-linux-docker + +![Pull Kali Linux docker](http://linuxpitstop.com/wp-content/uploads/2015/08/129.png) + +Once download is complete, run following command to find out the Image ID for your downloaded Kali Linux docker image file. + + docker images + +![Kali Linux Image ID](http://linuxpitstop.com/wp-content/uploads/2015/08/230.png) + +Now run following command to start your kali Linux docker container from image file (Here replace Image ID with correct one). + + docker run -i -t 198cd6df71ab3 /bin/bash + +It will immediately start the container and will log you into the operating system, you can start working on Kali Linux here. + +![Kali Linux Login](http://linuxpitstop.com/wp-content/uploads/2015/08/328.png) + +You can verify that container is started/running fine, by using the following command: + + docker ps + +![Docker Kali](http://linuxpitstop.com/wp-content/uploads/2015/08/421.png) + +### Conclusion ### + +Dockers are the smartest way to deploy and distribute your packages. Kali Linux docker image is pretty handy, does not consume any high amount of space on the disk and it is pretty easy to test this wonderful distro on any docker installed operating system now. + +-------------------------------------------------------------------------------- + +via: http://linuxpitstop.com/run-kali-linux-2-0-in-docker-container/ + +作者:[Aun][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linuxpitstop.com/author/aun/ +[1]:http://linuxpitstop.com/install-kali-linux-2-0/ \ No newline at end of file From 83975466763ab52f4e455bdc788b110496c0a1d0 Mon Sep 17 00:00:00 2001 From: Luoyuanhao Date: Wed, 26 Aug 2015 19:19:47 +0800 Subject: [PATCH 1878/2517] [Translating] tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md --- ...ogs (Configure, Rotate and Import Into Database) in RHEL 7.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md b/sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md index 217116cfee..8f3370f741 100644 --- a/sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md +++ b/sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md @@ -1,3 +1,4 @@ +ictlyh Translating Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7 ================================================================================ In order to keep your RHEL 7 systems secure, you need to know how to monitor all of the activities that take place on such systems by examining log files. Thus, you will be able to detect any unusual or potentially malicious activity and perform system troubleshooting or take another appropriate action. From 5c0aeccce15bf2f8d6efbc16defeba75e422913b Mon Sep 17 00:00:00 2001 From: locez Date: Thu, 27 Aug 2015 02:31:11 +0800 Subject: [PATCH 1879/2517] kde-plasma-5.4 --- translated/kde-plasma-5.4.md | 77 ++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 translated/kde-plasma-5.4.md diff --git a/translated/kde-plasma-5.4.md b/translated/kde-plasma-5.4.md new file mode 100644 index 0000000000..4c6e66bd69 --- /dev/null +++ b/translated/kde-plasma-5.4.md @@ -0,0 +1,77 @@ +#KDE 发行 Plasma 5.4.0 , 8 月版本特性 + +![Plasma 5.4](https://www.kde.org/announcements/plasma-5.4/plasma-screen-desktop-2-shadow.png) +2015 年 8 月 25 ,星期二,KDE发布了 Plasma 5 的一个新版本。 +此版本为我们带来了许多非常棒的触感,如优化了对高 DPI 的支持,KRunner 自动补全和一些新的美观的 Breeze 图标。这还为不久以后的 Wayland 桌面奠定了基础。我们还发行了几个新组件,如声音部件,显示器校准工具和测试版的用户管理工具。 + +###新的音频音量程序 +![The new Audio Volume Applet](https://www.kde.org/announcements/plasma-5.4/plasma-screen-audiovolume-shadows-wee.png) +新的音频音量程序直接与 PulseAudio (Linux 上一个非常流行的音频服务) 共同提供服务,并且在一个漂亮的简约的界面提供一个完全的音量控制和输出设定。 + +###应用控制面板起动器 +![he new Dashboard alternative launcher](https://www.kde.org/announcements/plasma-5.4/plasma-screen-dashboard-2-shadow-wee.png) +Plasma 5.4 在 kdeplasma-addons 带来了一个全新的全屏应用控制面板,它具有应用菜单的所有功能还支持缩放和全空间键盘导航。新的起动器可以像你目前所用的最近使用的或收藏的文档和联系人一样简单和快速地查找应用。 + +###丰富的艺术图标 +![Just some of the new icons in this release](https://kver.files.wordpress.com/2015/07/image10430.png) +Plasma 5.4 加入了 1400 多个新图标,其中不仅包含 KDE 程序的,而且还为 Inkscape, Firefox 和 Libreoffice 提供 Breeze 主题的艺术图标,可以体验到更加集成和本地化的感觉。 + +###KRunner 历史记录 +![KRunner](https://www.kde.org/announcements/plasma-5.4/plasma-screen-krunner-shadow-wee.png) +KRunner 现在可以记住之前的搜索历史并根据历史记录进行自动补全。 + +###Network 程序中实用的图形展示 +![Network Graphs](https://www.kde.org/announcements/plasma-5.4/plasma-screen-nm-graph-shadow-wee.png) +Network 程序现在可以以图形显示网络流量了,这也支持两个新的 VPN 插件,甚至是 SSH 或 SSTP。 + +###Wayland 技术预览 +Plasma 5.4 ,这个第一个 Wayland 桌面技术预览版已经发布了。在使用开源驱动的系统上可以使用 KWin,Plasma 的 Wayland 复合器, X11 窗口管理器和通过内核设定来运行 Plasma。现在已经支持的功能需求来自于[手机 Plasma 项目](https://dot.kde.org/2015/07/25/plasma-mobile-free-mobile-platform),更多的桌面原生功能还未被完全实现。现在还不能作为替换 Xorg 的基础桌面来使用,但可以轻松地测试它,贡献和观看感人的免费视频。有关如何在 Wayland 中使用 Plasma 的介绍请到:[KWin wiki pages](https://community.kde.org/KWin/Wayland#Start_a_Plasma_session_on_Wayland)。Wlayland 将会在我们构建一个稳定的版本的目标中得到改进。 + +###其他的改变和添加 + - 优化对高 DPI 支持 + - 更少的内存占用 + - 桌面搜索更新和更快的后端处理 + - 便笺添加拖拉和支持键盘导航 + - 回收站重新支持拖拉 + - 系统托盘获得更快的可配置性 + - 文档重新修订和更新 + - 优化数字时钟的布局 + - 数字时钟支持 ISO 日期 + - 更简单的方式切换数字时钟 12/24 格式 + - 日历显示第几周 + - 任何项目都可以收藏进应用菜单,支持收藏文档和 Telepathy 联系人 + - Telepathy 联系人收藏可以展示联系人的照片和实时状态 + - 优化程序与容器间的焦点和激活处理 + - 文件夹视图中各种小修复:更好的默认大喜哦,鼠标交互问题以及文本标签换行 + - 任务管理器更好的呈现起动器默认的应用图标 + - 可再次通过在任务管理器删除程序来添加起动器 + - 可配置中间点击在任务管理器中的行为:无动作,关闭窗口,起动一个相同的程序 + - 任务管理器现在以列排序优先无论用户是否更倾向于行优先;许多用户更喜欢这样排序是因为它会使更少的任务按钮像窗口一样移来移去 + - 优化任务管理器的图标和页边标度 + - 任务管理器中各种小修复:垂直下拉,触摸事件处理,组扩展箭头视觉问题 + - 提供可用的目的框架技术预览版,可以使用 QuickShare Plasmoid 在许多 web 服务分享文件 + - 添加 显示器配置工具 + - 添加 kwallet-pam 来在登陆时打开 wallet + - 用户管理器现在已经接入到设置中,并且用户账户模块被舍弃 + - 应用程序菜单(Kicker)的性能得到改善 + - 应用程序菜单(Kicker)各种小修复:可用 隐藏/显示 程序更加可靠,顶部面板对齐修复,文件夹视图中 “添加到桌面”更加可靠,在 KActivities-based 最新的模块中有更好的表现 + - 支持自定义菜单布局 (kmenuedit)和应用程序菜单(Kicker)支持菜单项目分隔 + - 文件夹视图已经优化在面板中的模式 [blog](https://blogs.kde.org/2015/06/04/folder-view-panel-popups-are-list-views-again) + - 在桌面容器中删除一个文件夹现在可在文件夹视图中恢复 + + [Full Plasma 5.4 changelog](https://www.kde.org/announcements/plasma-5.3.2-5.4.0-changelog.php) + + ###Live 镜像 + 偿鲜的最简单的方式就是从 U 盘中启动,可以在 KDE 社区 Wiki 中找到 各种 [ Live Images with Plasma 5](https://community.kde.org/Plasma/LiveImages) + + ###下载软件包 + 各发行版已经构建了软件包,或者正在构建,wiki 中的列出了各发行版的软件包名:[Package download wiki page](https://community.kde.org/Plasma/Packages) + + ###源码下载 + 可以直接从源码中安装 Plasma 5。KDE 社区 Wiki 已经介绍了怎样编译[instructions to compile](http://community.kde.org/Frameworks/Building)。 +注意,Plasma 5 与 Plasma 4 不兼容,必须先卸载旧版本,或者安装到不同的前缀处。 + - [Source Info Page](https://www.kde.org/info/plasma-5.4.0.php) + + --- + via:https://www.kde.org/announcements/plasma-5.4.0.php + 译者:[Locez](http://locez.com) \ No newline at end of file From 777337a9ff87a9322c11ca57dd89ec7b636784bf Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 26 Aug 2015 22:32:52 +0800 Subject: [PATCH 1880/2517] PUB:kde-plasma-5.4 @Locez --- published/kde-plasma-5.4.md | 109 +++++++++++++++++++++++++++++++++++ translated/kde-plasma-5.4.md | 77 ------------------------- 2 files changed, 109 insertions(+), 77 deletions(-) create mode 100644 published/kde-plasma-5.4.md delete mode 100644 translated/kde-plasma-5.4.md diff --git a/published/kde-plasma-5.4.md b/published/kde-plasma-5.4.md new file mode 100644 index 0000000000..6d5b77bfd0 --- /dev/null +++ b/published/kde-plasma-5.4.md @@ -0,0 +1,109 @@ +KDE Plasma 5.4.0 发布,八月特色版 +============================= + +![Plasma 5.4](https://www.kde.org/announcements/plasma-5.4/plasma-screen-desktop-2-shadow.png) + +2015 年 8 月 25 ,星期二,KDE 发布了 Plasma 5 的一个特色新版本。 + +此版本为我们带来了许多非常棒的感受,如优化了对高分辨率的支持,KRunner 自动补全和一些新的 Breeze 漂亮图标。这还为不久以后的技术预览版的 Wayland 桌面奠定了基础。我们还带来了几个新组件,如声音音量部件,显示器校准工具和测试版的用户管理工具。 + +###新的音频音量程序 + +![The new Audio Volume Applet](https://www.kde.org/announcements/plasma-5.4/plasma-screen-audiovolume-shadows.png) + +新的音频音量程序直接工作于 PulseAudio (Linux 上一个非常流行的音频服务) 之上 ,并且在一个漂亮的简约的界面提供一个完整的音量控制和输出设定。 + +###替代的应用控制面板起动器 + +![he new Dashboard alternative launcher](https://www.kde.org/announcements/plasma-5.4/plasma-screen-dashboard-2-shadow.png) + +Plasma 5.4 在 kdeplasma-addons 软件包中提供了一个全新的全屏的应用控制面板,它具有应用菜单的所有功能,还支持缩放和全空间键盘导航。新的起动器可以像你目前所用的“最近使用的”或“收藏的文档和联系人”一样简单和快速地查找应用。 + +###丰富的艺术图标 + +![Just some of the new icons in this release](https://kver.files.wordpress.com/2015/07/image10430.png) + +Plasma 5.4 提供了超过 1400 个的新图标,其中不仅包含 KDE 程序的,而且还为 Inkscape, Firefox 和 Libreoffice 提供 Breeze 主题的艺术图标,可以体验到更加一致和本地化的感觉。 + +###KRunner 历史记录 + +![KRunner](https://www.kde.org/announcements/plasma-5.4/plasma-screen-krunner-shadow.png) + +KRunner 现在可以记住之前的搜索历史并根据历史记录进行自动补全。 + +###Network 程序中实用的图形展示 + +![Network Graphs](https://www.kde.org/announcements/plasma-5.4/plasma-screen-nm-graph-shadow.png) + +Network 程序现在可以以图形形式显示网络流量了,同时也支持两个新的 VPN 插件:通过 SSH 连接或通过 SSTP 连接。 + +###Wayland 技术预览 + +随着 Plasma 5.4 ,Wayland 桌面发布了第一个技术预览版。在使用自由图形驱动(free graphics drivers)的系统上可以使用 KWin(Plasma 的 Wayland 合成器和 X11 窗口管理器)通过[内核模式设定][1]来运行 Plasma。现在已经支持的功能需求来自于[手机 Plasma 项目][2],更多的面向桌面的功能还未被完全实现。现在还不能作为替换那些基于 Xorg 的桌面,但可以轻松地对它测试和贡献,以及观看令人激动视频。有关如何在 Wayland 中使用 Plasma 的介绍请到:[KWin 维基页][3]。Wlayland 将随着我们构建的稳定版本而逐步得到改进。 + +###其他的改变和添加 + + - 优化对高 DPI 支持 + - 更少的内存占用 + - 桌面搜索使用了更快的新后端 + - 便笺增加拖拉支持和键盘导航 + - 回收站重新支持拖拉 + - 系统托盘获得更快的可配置性 + - 文档重新修订和更新 + - 优化了窄小面板上的数字时钟的布局 + - 数字时钟支持 ISO 日期 + - 切换数字时钟 12/24 格式更简单 + - 日历显示第几周 + - 任何项目都可以收藏进应用菜单(Kicker),支持收藏文档和 Telepathy 联系人 + - Telepathy 联系人收藏可以展示联系人的照片和实时状态 + - 优化程序与容器间的焦点和激活处理 + - 文件夹视图中各种小修复:更好的默认尺寸,鼠标交互问题以及文本标签换行 + - 任务管理器更好的呈现起动器默认的应用图标 + - 可再次通过将程序拖入任务管理器来添加启动器 + - 可配置中间键点击在任务管理器中的行为:无动作,关闭窗口,启动一个相同的程序的新实例 + - 任务管理器现在以列排序优先,无论用户是否更倾向于行优先;许多用户更喜欢这样排序是因为它会使更少的任务按钮像窗口一样移来移去 + - 优化任务管理器的图标和缩放边 + - 任务管理器中各种小修复:垂直下拉,触摸事件处理现在支持所有系统,组扩展箭头的视觉问题 + - 提供可用的目的框架技术预览版,可以使用 QuickShare Plasmoid,它可以让许多 web 服务分享文件更容易 + - 增加了显示器配置工具 + - 增加的 kwallet-pam 可以在登录时打开 wallet + - 用户管理器现在会同步联系人到 KConfig 的设置中,用户账户模块被丢弃了 + - 应用程序菜单(Kicker)的性能得到改善 + - 应用程序菜单(Kicker)各种小修复:隐藏/显示程序更加可靠,顶部面板的对齐修复,文件夹视图中 “添加到桌面”更加可靠,在基于 KActivities 的最新模块中有更好的表现 + - 支持自定义菜单布局 (kmenuedit)和应用程序菜单(Kicker)支持菜单项目分隔 + - 当在面板中时,改进了文件夹视图,参见 [blog][4] + - 将文件夹拖放到桌面容器现在会再次创建一个文件夹视图 + +[完整的 Plasma 5.4 变更日志在此](https://www.kde.org/announcements/plasma-5.3.2-5.4.0-changelog.php) + +###Live 镜像 + +尝鲜的最简单的方式就是从 U 盘中启动,可以在 KDE 社区 Wiki 中找到 各种 [带有 Plasma 5 的 Live 镜像][5]。 + +###下载软件包 + +各发行版已经构建了软件包,或者正在构建,wiki 中的列出了各发行版的软件包名:[软件包下载维基页][6]。 + +###源码下载 + +可以直接从源码中安装 Plasma 5。KDE 社区 Wiki 已经介绍了[怎样编译][7]。 + +注意,Plasma 5 与 Plasma 4 不兼容,必须先卸载旧版本,或者安装到不同的前缀处。 + + +- [源代码信息页][8] + +--- + +via: https://www.kde.org/announcements/plasma-5.4.0.php + +译者:[Locez](http://locez.com) 校对:[wxy](http://github.com/wxy) + +[1]:https://en.wikipedia.org/wiki/Direct_Rendering_Manager +[2]:https://dot.kde.org/2015/07/25/plasma-mobile-free-mobile-platform +[3]:https://community.kde.org/KWin/Wayland#Start_a_Plasma_session_on_Wayland +[4]:https://blogs.kde.org/2015/06/04/folder-view-panel-popups-are-list-views-again +[5]:https://community.kde.org/Plasma/LiveImages +[6]:https://community.kde.org/Plasma/Packages +[7]:http://community.kde.org/Frameworks/Building +[8]:https://www.kde.org/info/plasma-5.4.0.php \ No newline at end of file diff --git a/translated/kde-plasma-5.4.md b/translated/kde-plasma-5.4.md deleted file mode 100644 index 4c6e66bd69..0000000000 --- a/translated/kde-plasma-5.4.md +++ /dev/null @@ -1,77 +0,0 @@ -#KDE 发行 Plasma 5.4.0 , 8 月版本特性 - -![Plasma 5.4](https://www.kde.org/announcements/plasma-5.4/plasma-screen-desktop-2-shadow.png) -2015 年 8 月 25 ,星期二,KDE发布了 Plasma 5 的一个新版本。 -此版本为我们带来了许多非常棒的触感,如优化了对高 DPI 的支持,KRunner 自动补全和一些新的美观的 Breeze 图标。这还为不久以后的 Wayland 桌面奠定了基础。我们还发行了几个新组件,如声音部件,显示器校准工具和测试版的用户管理工具。 - -###新的音频音量程序 -![The new Audio Volume Applet](https://www.kde.org/announcements/plasma-5.4/plasma-screen-audiovolume-shadows-wee.png) -新的音频音量程序直接与 PulseAudio (Linux 上一个非常流行的音频服务) 共同提供服务,并且在一个漂亮的简约的界面提供一个完全的音量控制和输出设定。 - -###应用控制面板起动器 -![he new Dashboard alternative launcher](https://www.kde.org/announcements/plasma-5.4/plasma-screen-dashboard-2-shadow-wee.png) -Plasma 5.4 在 kdeplasma-addons 带来了一个全新的全屏应用控制面板,它具有应用菜单的所有功能还支持缩放和全空间键盘导航。新的起动器可以像你目前所用的最近使用的或收藏的文档和联系人一样简单和快速地查找应用。 - -###丰富的艺术图标 -![Just some of the new icons in this release](https://kver.files.wordpress.com/2015/07/image10430.png) -Plasma 5.4 加入了 1400 多个新图标,其中不仅包含 KDE 程序的,而且还为 Inkscape, Firefox 和 Libreoffice 提供 Breeze 主题的艺术图标,可以体验到更加集成和本地化的感觉。 - -###KRunner 历史记录 -![KRunner](https://www.kde.org/announcements/plasma-5.4/plasma-screen-krunner-shadow-wee.png) -KRunner 现在可以记住之前的搜索历史并根据历史记录进行自动补全。 - -###Network 程序中实用的图形展示 -![Network Graphs](https://www.kde.org/announcements/plasma-5.4/plasma-screen-nm-graph-shadow-wee.png) -Network 程序现在可以以图形显示网络流量了,这也支持两个新的 VPN 插件,甚至是 SSH 或 SSTP。 - -###Wayland 技术预览 -Plasma 5.4 ,这个第一个 Wayland 桌面技术预览版已经发布了。在使用开源驱动的系统上可以使用 KWin,Plasma 的 Wayland 复合器, X11 窗口管理器和通过内核设定来运行 Plasma。现在已经支持的功能需求来自于[手机 Plasma 项目](https://dot.kde.org/2015/07/25/plasma-mobile-free-mobile-platform),更多的桌面原生功能还未被完全实现。现在还不能作为替换 Xorg 的基础桌面来使用,但可以轻松地测试它,贡献和观看感人的免费视频。有关如何在 Wayland 中使用 Plasma 的介绍请到:[KWin wiki pages](https://community.kde.org/KWin/Wayland#Start_a_Plasma_session_on_Wayland)。Wlayland 将会在我们构建一个稳定的版本的目标中得到改进。 - -###其他的改变和添加 - - 优化对高 DPI 支持 - - 更少的内存占用 - - 桌面搜索更新和更快的后端处理 - - 便笺添加拖拉和支持键盘导航 - - 回收站重新支持拖拉 - - 系统托盘获得更快的可配置性 - - 文档重新修订和更新 - - 优化数字时钟的布局 - - 数字时钟支持 ISO 日期 - - 更简单的方式切换数字时钟 12/24 格式 - - 日历显示第几周 - - 任何项目都可以收藏进应用菜单,支持收藏文档和 Telepathy 联系人 - - Telepathy 联系人收藏可以展示联系人的照片和实时状态 - - 优化程序与容器间的焦点和激活处理 - - 文件夹视图中各种小修复:更好的默认大喜哦,鼠标交互问题以及文本标签换行 - - 任务管理器更好的呈现起动器默认的应用图标 - - 可再次通过在任务管理器删除程序来添加起动器 - - 可配置中间点击在任务管理器中的行为:无动作,关闭窗口,起动一个相同的程序 - - 任务管理器现在以列排序优先无论用户是否更倾向于行优先;许多用户更喜欢这样排序是因为它会使更少的任务按钮像窗口一样移来移去 - - 优化任务管理器的图标和页边标度 - - 任务管理器中各种小修复:垂直下拉,触摸事件处理,组扩展箭头视觉问题 - - 提供可用的目的框架技术预览版,可以使用 QuickShare Plasmoid 在许多 web 服务分享文件 - - 添加 显示器配置工具 - - 添加 kwallet-pam 来在登陆时打开 wallet - - 用户管理器现在已经接入到设置中,并且用户账户模块被舍弃 - - 应用程序菜单(Kicker)的性能得到改善 - - 应用程序菜单(Kicker)各种小修复:可用 隐藏/显示 程序更加可靠,顶部面板对齐修复,文件夹视图中 “添加到桌面”更加可靠,在 KActivities-based 最新的模块中有更好的表现 - - 支持自定义菜单布局 (kmenuedit)和应用程序菜单(Kicker)支持菜单项目分隔 - - 文件夹视图已经优化在面板中的模式 [blog](https://blogs.kde.org/2015/06/04/folder-view-panel-popups-are-list-views-again) - - 在桌面容器中删除一个文件夹现在可在文件夹视图中恢复 - - [Full Plasma 5.4 changelog](https://www.kde.org/announcements/plasma-5.3.2-5.4.0-changelog.php) - - ###Live 镜像 - 偿鲜的最简单的方式就是从 U 盘中启动,可以在 KDE 社区 Wiki 中找到 各种 [ Live Images with Plasma 5](https://community.kde.org/Plasma/LiveImages) - - ###下载软件包 - 各发行版已经构建了软件包,或者正在构建,wiki 中的列出了各发行版的软件包名:[Package download wiki page](https://community.kde.org/Plasma/Packages) - - ###源码下载 - 可以直接从源码中安装 Plasma 5。KDE 社区 Wiki 已经介绍了怎样编译[instructions to compile](http://community.kde.org/Frameworks/Building)。 -注意,Plasma 5 与 Plasma 4 不兼容,必须先卸载旧版本,或者安装到不同的前缀处。 - - [Source Info Page](https://www.kde.org/info/plasma-5.4.0.php) - - --- - via:https://www.kde.org/announcements/plasma-5.4.0.php - 译者:[Locez](http://locez.com) \ No newline at end of file From e97706ebbf6275e19c35e8ea6e75333b95187f43 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 27 Aug 2015 01:21:06 +0800 Subject: [PATCH 1881/2517] update --- ... 'sed' Command to Create Edit and Manipulate files in Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md (100%) diff --git a/sources/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md similarity index 100% rename from sources/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md rename to translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md From bea736fc794a2f7986cf6aa969e00adb7745dd65 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 27 Aug 2015 02:08:59 +0800 Subject: [PATCH 1882/2517] woking hard >.< --- ...eate Edit and Manipulate files in Linux.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md index 083078fa62..80f7aa6339 100644 --- a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md +++ b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md @@ -1,33 +1,33 @@ Translating by Xuanwo Part 1 - LFCS: How to use GNU ‘sed’ Command to Create, Edit, and Manipulate files in Linux +LFCS系列第一讲:如何在Linux上使用GNU'sed'命令来创建、编辑和操作文件 ================================================================================ -The Linux Foundation announced the LFCS (Linux Foundation Certified Sysadmin) certification, a new program that aims at helping individuals all over the world to get certified in basic to intermediate system administration tasks for Linux systems. This includes supporting running systems and services, along with first-hand troubleshooting and analysis, and smart decision-making to escalate issues to engineering teams. +Linux基金会宣布了一个全新的LFCS(Linux Foundation Certified Sysadmin,Linux基金会认证系统管理员)认证计划。这一计划旨在帮助遍布全世界的人们获得其在处理Linux系统管理任务上能力的认证。这些能力包括支持运行的系统服务,以及第一手的故障诊断和分析和为工程师团队在升级时提供智能决策。 ![Linux Foundation Certified Sysadmin](http://www.tecmint.com/wp-content/uploads/2014/10/lfcs-Part-1.png) -Linux Foundation Certified Sysadmin – Part 1 +Linux基金会认证系统管理员——第一讲 -Please watch the following video that demonstrates about The Linux Foundation Certification Program. +请观看下面关于Linux基金会认证计划的演示: 注:youtube 视频 -The series will be titled Preparation for the LFCS (Linux Foundation Certified Sysadmin) Parts 1 through 10 and cover the following topics for Ubuntu, CentOS, and openSUSE: +该系列将命名为《LFCS预备第一讲》至《LFCS预备第十讲》并覆盖关于Ubuntu,CentOS以及openSUSE的下列话题。 -- Part 1: How to use GNU ‘sed’ Command to Create, Edit, and Manipulate files in Linux -- Part 2: How to Install and Use vi/m as a full Text Editor -- Part 3: Archiving Files/Directories and Finding Files on the Filesystem -- Part 4: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition -- Part 5: Mount/Unmount Local and Network (Samba & NFS) Filesystems in Linux -- Part 6: Assembling Partitions as RAID Devices – Creating & Managing System Backups -- Part 7: Managing System Startup Process and Services (SysVinit, Systemd and Upstart -- Part 8: Managing Users & Groups, File Permissions & Attributes and Enabling sudo Access on Accounts -- Part 9: Linux Package Management with Yum, RPM, Apt, Dpkg, Aptitude and Zypper -- Part 10: Learning Basic Shell Scripting and Filesystem Troubleshooting +- 第一讲:如何在Linux上使用GNU'sed'命令来创建、编辑和操作文件 +- 第二讲:如何安装和使用vi/m全功能文字编辑器 +- 第三讲:归档文件/目录和在文件系统中寻找文件 +- 第四讲:为存储设备分区,格式化文件系统和配置交换分区 +- 第五讲:在Linux中挂载/卸载本地和网络(Samba & NFS)文件系统 +- 第六讲:组合分区作为RAID设备——创建&管理系统备份 +- 第七讲:管理系统启动进程和服务(使用SysVinit, Systemd 和 Upstart) +- 第八讲:管理用户和组,文件权限和属性以及启用账户的sudo权限 +- 第九讲:Linux包管理与Yum,RPM,Apt,Dpkg,Aptitude,Zypper +- 第十讲:学习简单的Shell脚本和文件系统故障排除 - -This post is Part 1 of a 10-tutorial series, which will cover the necessary domains and competencies that are required for the LFCS certification exam. That being said, fire up your terminal, and let’s start. +本文是覆盖这个参加LFCS认证考试的所必需的范围和能力的十个教程的第一讲。话虽如此,快打开你的终端,让我们开始吧! ### Processing Text Streams in Linux ### From ffdee792a740a45fbbcb9e5172a4b97ca87dc8e4 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 27 Aug 2015 02:42:24 +0800 Subject: [PATCH 1883/2517] have a break: --- ...eate Edit and Manipulate files in Linux.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md index 80f7aa6339..21579f0ed9 100644 --- a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md +++ b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md @@ -29,34 +29,34 @@ Linux基金会认证系统管理员——第一讲 本文是覆盖这个参加LFCS认证考试的所必需的范围和能力的十个教程的第一讲。话虽如此,快打开你的终端,让我们开始吧! -### Processing Text Streams in Linux ### +### 处理Linux中的文本流 ### -Linux treats the input to and the output from programs as streams (or sequences) of characters. To begin understanding redirection and pipes, we must first understand the three most important types of I/O (Input and Output) streams, which are in fact special files (by convention in UNIX and Linux, data streams and peripherals, or device files, are also treated as ordinary files). +Linux将程序中的输入和输出当成字符流或者字符序列。在开始理解重定向和管道之前,我们必须先了解三种最重要的I/O(Input and Output,输入和输出)流,事实上,它们都是特殊的文件(根据UNIX和Linux中的约定,数据流和外围设备或者设备文件也被视为普通文件)。 -The difference between > (redirection operator) and | (pipeline operator) is that while the first connects a command with a file, the latter connects the output of a command with another command. +> (重定向操作符) 和 | (管道操作符)之间的区别是:前者将命令与文件相连接,而后者将命令的输出和另一个命令相连接。 # command > file # command1 | command2 -Since the redirection operator creates or overwrites files silently, we must use it with extreme caution, and never mistake it with a pipeline. One advantage of pipes on Linux and UNIX systems is that there is no intermediate file involved with a pipe – the stdout of the first command is not written to a file and then read by the second command. +由于重定向操作符静默创建或覆盖文件,我们必须特别小心谨慎地使用它,并且永远不要把它和管道混淆起来。在Linux和UNIX系统上管道的优势是:第一个命令的输出不会写入一个文件而是直接被第二个命令读取。 -For the following practice exercises we will use the poem “A happy child” (anonymous author). +在下面的操作练习中,我们将会使用这首诗——《A happy child》(匿名作者) ![cat command](http://www.tecmint.com/wp-content/uploads/2014/10/cat-command.png) cat command example -#### Using sed #### +#### 使用 sed #### -The name sed is short for stream editor. For those unfamiliar with the term, a stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline). +sed是流编辑器(stream editor)的缩写。为那些不懂术语的人额外解释一下,流编辑器是用来在一个输入流(文件或者管道中的输入)执行基本的文本转换的工具。 -The most basic (and popular) usage of sed is the substitution of characters. We will begin by changing every occurrence of the lowercase y to UPPERCASE Y and redirecting the output to ahappychild2.txt. The g flag indicates that sed should perform the substitution for all instances of term on every line of file. If this flag is omitted, sed will replace only the first occurrence of term on each line. +sed最基本的用法是字符替换。我们将通过把每个出现的小写y改写为大写Y并且将输出重定向到ahappychild2.txt开始。g标志表示sed应该替换文件每一行中所有应当替换的实例。如果这个标志省略了,sed将会只替换每一行中第一次出现的实例。 -**Basic syntax:** +**基本语法:** # sed ‘s/term/replacement/flag’ file -**Our example:** +**我们的样例:** # sed ‘s/y/Y/g’ ahappychild.txt > ahappychild2.txt @@ -64,9 +64,9 @@ The most basic (and popular) usage of sed is the substitution of characters. We sed command example -Should you want to search for or replace a special character (such as /, \, &) you need to escape it, in the term or replacement strings, with a backward slash. +如果你要在替换文本中搜索或者替换特殊字符(如/,\,&),你需要使用反斜杠对它进行转义。 -For example, we will substitute the word and for an ampersand. At the same time, we will replace the word I with You when the first one is found at the beginning of a line. +例如,我们将会用一个符号来替换一个文字。与此同时,我们将把一行最开始出现的第一个I替换为You。 # sed 's/and/\&/g;s/^I/You/g' ahappychild.txt @@ -74,9 +74,9 @@ For example, we will substitute the word and for an ampersand. At the same time, sed replace string -In the above command, a ^ (caret sign) is a well-known regular expression that is used to represent the beginning of a line. +在上面的命令中,^(插入符号)是众所周知用来表示一行开头的正则表达式。 -As you can see, we can combine two or more substitution commands (and use regular expressions inside them) by separating them with a semicolon and enclosing the set inside single quotes. +正如你所看到的,我们可以通过使用分号分隔以及用括号包裹来把两个或者更多的替换命令(并在他们中使用正则表达式)链接起来。 Another use of sed is showing (or deleting) a chosen portion of a file. In the following example, we will display the first 5 lines of /var/log/messages from Jun 8. From c8652ceacacb5784660136aece5fc8e0c137a394 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 27 Aug 2015 08:52:38 +0800 Subject: [PATCH 1884/2517] [Translated]20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md --- ...artition into One Large Virtual Storage.md | 187 ------------------ ...artition into One Large Virtual Storage.md | 183 +++++++++++++++++ 2 files changed, 183 insertions(+), 187 deletions(-) delete mode 100644 sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md create mode 100644 translated/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md diff --git a/sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md b/sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md deleted file mode 100644 index ebf3a9c4fd..0000000000 --- a/sources/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md +++ /dev/null @@ -1,187 +0,0 @@ -Translating by GOLinux! -Mhddfs – Combine Several Smaller Partition into One Large Virtual Storage -================================================================================ -Let’s assume that you have 30GB of movies and you have 3 drives each 20 GB in size. So how will you store? - -Obviously you can split your videos in two or three different volumes and store them on the drive manually. This certainly is not a good idea, it is an exhaustive work which requires manual intervention and a lots of your time. - -Another solution is to create a [RAID array of disk][1]. The RAID has always remained notorious for loss of storage reliability and usable disk space. Another solution is mhddfs. - -![Combine Multiple Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Combine-Multiple-Partitions-in-Linux.png) - -Mhddfs – Combine Multiple Partitions in Linux - -mhddfs is a driver for Linux that combines several mount points into one virtual disk. It is a fuse based driver, which provides a easy solution for large data storage. It combines all small file systems to create a single big virtual filesystem which contains every particle of its member filesystem including files and free spaces. - -#### Why you need Mhddfs? #### - -All your storage devices creates a single virtual pool and it can be mounted right at the boot. This small utility takes care of, which drive is full and which is empty and to write data to what drive, intelligently. Once you create virtual drives successfully, you can share your virtual filesystem using [SAMBA][2]. Your client will always see a huge drive and lots of free space. - -#### Features of Mhddfs #### - -- Get attributes of the file system and system information. -- Set attributes of the file system. -- Create, Read, Remove and write Directories and files. -- Support for file locks and Hardlinks on single device. - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Pros of mhddfsCons of mhddfs
 Perfect for home users.mhddfs driver is not built in the Linux Kernel
 Simple to run. Required lots of processing power during runtime
 No evidence of Data loss No redundancy solution.
 Do not split the file. Hardlinks moving not supported
 Add new files to the combined virtual filesystem. 
 Manage the location where these files are saved. 
  Extended file attributes 
- -### Installation of Mhddfs in Linux ### - -On Debian and portable to alike systems, you can install mhddfs package using following command. - - # apt-get update && apt-get install mhddfs - -![Install Mhddfs on Debian based Systems](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Mhddfs-on-Ubuntu.png) - -Install Mhddfs on Debian based Systems - -On RHEL/CentOS Linux systems, you need to turn on [epel-repository][3] and then execute the below command to install mhddfs package. - - # yum install mhddfs - -On Fedora 22+ systems, you may get it by dnf package manger as shown below. - - # dnf install mhddfs - -![Install Mhddfs on Fedora](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Mhddfs-on-Fedora.png) - -Install Mhddfs on Fedora - -If incase, mhddfs package isn’t available from epel repository, then you need to resolve following dependencies to install and compile it from source as shown below. - -- FUSE header files -- GCC -- libc6 header files -- uthash header files -- libattr1 header files (optional) - -Next, download the latest source package simply as suggested below and compile it. - - # wget http://mhddfs.uvw.ru/downloads/mhddfs_0.1.39.tar.gz - # tar -zxvf mhddfs*.tar.gz - # cd mhddfs-0.1.39/ - # make - -You should be able to see binary mhddfs in the current directory. Move it to /usr/bin/ and /usr/local/bin/ as root. - - # cp mhddfs /usr/bin/ - # cp mhddfs /usr/local/bin/ - -All set, mhddfs is ready to be used. - -### How do I use Mhddfs? ### - -1. Lets see all the HDD mounted to my system currently. - - $ df -h - -![Check Mounted Devices](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Mounted-Devices.gif) - -**Sample Output** - - Filesystem Size Used Avail Use% Mounted on - - /dev/sda1 511M 132K 511M 1% /boot/efi - /dev/sda2 451G 92G 336G 22% / - /dev/sdb1 1.9T 161G 1.7T 9% /media/avi/BD9B-5FCE - /dev/sdc1 555M 555M 0 100% /media/avi/Debian 8.1.0 M-A 1 - -Notice the ‘Mount Point‘ name here, which we will be using later. - -2. Create a directory `/mnt/virtual_hdd` where all these all file system will be grouped together as, - - # mkdir /mnt/virtual_hdd - -3. And then mount all the file-systems. Either as root or as a user who is a member of FUSE group. - - # mhddfs /boot/efi, /, /media/avi/BD9B-5FCE/, /media/avi/Debian\ 8.1.0\ M-A\ 1/ /mnt/virtual_hdd -o allow_other - -![Mount All File System in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Mount-All-File-System-in-Linux.png) - -Mount All File System in Linux - -**Note**: We are used mount Point names here of all the HDDs. Obviously the mount point in your case will be different. Also notice “-o allow_other” option makes this Virtual file system visible to all others and not only the person who created it. - -4. Now run “df -h” see all the filesystems. It should contain the one you created just now. - - $ df -h - -![Verify Virtual File System Mount](http://www.tecmint.com/wp-content/uploads/2015/08/Verify-Virtual-File-System.png) - -Verify Virtual File System Mount - -You can perform all the option to the Virtual File System you created as you would have done to a Mounted Drive. - -5. To create this Virtual File system on every system boot, you should add the below line of code (in your case it should be different, depending upon your mount point), at the end of /etc/fstab file as root. - - mhddfs# /boot/efi, /, /media/avi/BD9B-5FCE/, /media/avi/Debian\ 8.1.0\ M-A\ 1/ /mnt/virtual_hdd fuse defaults,allow_other 0 0 - -6. If at any point of time you want to add/remove a new drive to Virtual_hdd, you may mount a new drive, copy the contents of mount point /mnt/virtual_hdd, un-mount the volume, Eject the Drive you want to remove and/or mount the new drive you want to include, Mount the overall filesystem under Virtual_hdd using mhddfs command and you should be done. - -#### How do I Un-Mount Virtual_hdd? #### - -Unmounting virtual_hdd is as easy as, - - # umount /mnt/virtual_hdd - -![Unmount Virtual Filesystem](http://www.tecmint.com/wp-content/uploads/2015/08/Unmount-Virtual-Filesystem.png) - -Unmount Virtual Filesystem - -Notice it is umount and not unmount. A lot of user type it wrong. - -That’s all for now. I am working on another post you people will love to read. Till then stay tuned and connected to Tecmint. Provide us with your valuable feedback in the comments below. Like and share us and help us get spread. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/combine-partitions-into-one-in-linux-using-mhddfs/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/mount-filesystem-in-linux/ -[3]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ diff --git a/translated/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md b/translated/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md new file mode 100644 index 0000000000..04d9f18eb9 --- /dev/null +++ b/translated/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md @@ -0,0 +1,183 @@ +Mhddfs——将多个小分区合并成一个大的虚拟存储 +================================================================================ + +让我们假定你有30GB的电影,并且你有3个驱动器,每个的大小为20GB。那么,你会怎么来存放东西呢? + +很明显,你可以将你的视频分割成2个或者3个不同的卷,并将它们手工存储到驱动器上。这当然不是一个好主意,它成了一项费力的工作,它需要你手工干预,而且花费你大量时间。 + +另外一个解决方案是创建一个[RAID磁盘阵列][1]。然而,RAID在缺乏存储可靠性,磁盘空间可用性差等方面声名狼藉。另外一个解决方案,就是mhddfs。 + +![Combine Multiple Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Combine-Multiple-Partitions-in-Linux.png) +Mhddfs——在Linux中合并多个分区 + +mhddfs是一个用于Linux的驱动,它可以将多个挂载点合并到一个虚拟磁盘中。它是一个基于FUSE的驱动,提供了一个用于大数据存储的简单解决方案。它将所有小文件系统合并,以创建一个单一的大虚拟文件系统,该文件系统包含其成员文件系统的所有颗粒,包括文件和空闲空间。 + +#### 你为什么需要Mhddfs? #### + +你所有存储设备创建了一个单一的虚拟池,它可以在启动时被挂载。这个小工具可以智能地照看并处理哪个驱动器满了,哪个驱动器空着,将数据写到哪个驱动器中。当你成功创建虚拟驱动器后,你可以使用[SAMBA][2]来共享你的虚拟文件系统。你的客户端将在任何时候都看到一个巨大的驱动器和大量的空闲空间。 + +#### Mhddfs特性 #### + +- 获取文件系统属性和系统信息。 +- 设置文件系统属性。 +- 创建、读取、移除和写入目录和文件。 +- 支持文件锁和单一设备上的硬链接。 + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
mhddfs的优点mhddfs的缺点
 适合家庭用户mhddfs驱动没有内建在Linux内核中
 运行简单 运行时需要大量处理能力
 没有明显的数据丢失 没有冗余解决方案
 不分割文件 不支持移动硬链接
 添加新文件到合并的虚拟文件系统 
 管理文件保存的位置 
  扩展文件属性 
+ +### Linux中安装Mhddfs ### + +在Debian及其类似的移植系统中,你可以使用下面的命令来安装mhddfs包。 + + # apt-get update && apt-get install mhddfs + +![Install Mhddfs on Debian based Systems](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Mhddfs-on-Ubuntu.png) +安装Mhddfs到基于Debian的系统中 + +在RHEL/CentOS Linux系统中,你需要开启[epel仓库][3],然后执行下面的命令来安装mhddfs包。 + + # yum install mhddfs + +在Fedora 22及以上系统中,你可以通过dnf包管理来获得它,就像下面这样。 + + # dnf install mhddfs + +![Install Mhddfs on Fedora](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Mhddfs-on-Fedora.png) +安装Mhddfs到Fedora + +如果万一mhddfs包不能从epel仓库获取到,那么你需要解决下面的依赖,然后像下面这样来编译源码并安装。 + +- FUSE头文件 +- GCC +- libc6头文件 +- uthash头文件 +- libattr1头文件(可选) + +接下来,只需从下面建议的地址下载最新的源码包,然后编译。 + + # wget http://mhddfs.uvw.ru/downloads/mhddfs_0.1.39.tar.gz + # tar -zxvf mhddfs*.tar.gz + # cd mhddfs-0.1.39/ + # make + +你应该可以在当前目录中看到mhddfs的二进制文件,以root身份将它移动到/usr/bin/和/usr/local/bin/中。 + + # cp mhddfs /usr/bin/ + # cp mhddfs /usr/local/bin/ + +一切搞定,mhddfs已经可以用了。 + +### 我怎么使用Mhddfs? ### + +1.让我们看看当前所有挂载到我们系统中的硬盘。 + + + $ df -h + +![Check Mounted Devices](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Mounted-Devices.gif) +**样例输出** + + Filesystem Size Used Avail Use% Mounted on + + /dev/sda1 511M 132K 511M 1% /boot/efi + /dev/sda2 451G 92G 336G 22% / + /dev/sdb1 1.9T 161G 1.7T 9% /media/avi/BD9B-5FCE + /dev/sdc1 555M 555M 0 100% /media/avi/Debian 8.1.0 M-A 1 + +注意这里的‘挂载点’名称,我们后面会使用到它们。 + +2.创建目录‘/mnt/virtual_hdd’,在这里,所有这些文件系统将被组成组。 + + + # mkdir /mnt/virtual_hdd + +3.然后,挂载所有文件系统。你可以通过root或者FUSE组中的某个成员来完成。 + + + # mhddfs /boot/efi, /, /media/avi/BD9B-5FCE/, /media/avi/Debian\ 8.1.0\ M-A\ 1/ /mnt/virtual_hdd -o allow_other + +![Mount All File System in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Mount-All-File-System-in-Linux.png) +在Linux中挂载所有文件系统 + +**注意**:这里我们使用了所有硬盘的挂载点名称,很明显,你的挂载点名称会有所不同。也请注意“-o allow_other”选项可以让这个虚拟文件系统让其它所有人可见,而不仅仅是创建它的人。 + +4.现在,运行“df -h”来看看所有文件系统。它应该包含了你刚才创建的那个。 + + + $ df -h + +![Verify Virtual File System Mount](http://www.tecmint.com/wp-content/uploads/2015/08/Verify-Virtual-File-System.png) +验证虚拟文件系统挂载 + +你可以像对已挂在的驱动器那样给虚拟文件系统部署所有的选项。 + +5.要在每次系统启动创建这个虚拟文件系统,你应该以root身份添加下面的这行代码(在你那里会有点不同,取决于你的挂载点)到/etc/fstab文件的末尾。 + + mhddfs# /boot/efi, /, /media/avi/BD9B-5FCE/, /media/avi/Debian\ 8.1.0\ M-A\ 1/ /mnt/virtual_hdd fuse defaults,allow_other 0 0 + +6.如果在任何时候你想要添加/移除一个新的驱动器到/从虚拟硬盘,你可以挂载一个新的驱动器,拷贝/mnt/vritual_hdd的内容,卸载卷,弹出你要移除的的驱动器并/或挂载你要包含的新驱动器。使用mhddfs命令挂载全部文件系统到Virtual_hdd下,这样就全部搞定了。 +#### 我怎么卸载Virtual_hdd? #### + +卸载virtual_hdd相当简单,就像下面这样 + + # umount /mnt/virtual_hdd + +![Unmount Virtual Filesystem](http://www.tecmint.com/wp-content/uploads/2015/08/Unmount-Virtual-Filesystem.png) +卸载虚拟文件系统 + +注意,是umount,而不是unmount,很多用户都输错了。 + +到现在为止全部结束了。我正在写另外一篇文章,你们一定喜欢读的。到那时,请保持连线到Tecmint。请在下面的评论中给我们提供有用的反馈吧。请为我们点赞并分享,帮助我们扩散。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/combine-partitions-into-one-in-linux-using-mhddfs/ + +作者:[Avishek Kumar][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/mount-filesystem-in-linux/ +[3]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ From 3bf11430e3f94531e8aa8d686244163ffb2cb9f4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 27 Aug 2015 10:40:18 +0800 Subject: [PATCH 1885/2517] translating --- .../20150826 How to Run Kali Linux 2.0 In Docker Container.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md b/sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md index 8018ca17e9..15c8d1011e 100644 --- a/sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md +++ b/sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md @@ -1,3 +1,5 @@ +translating---geekpi + How to Run Kali Linux 2.0 In Docker Container ================================================================================ ### Introduction ### @@ -71,4 +73,4 @@ via: http://linuxpitstop.com/run-kali-linux-2-0-in-docker-container/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linuxpitstop.com/author/aun/ -[1]:http://linuxpitstop.com/install-kali-linux-2-0/ \ No newline at end of file +[1]:http://linuxpitstop.com/install-kali-linux-2-0/ From f7dcc0a1b9da2726bd4d6d9e02cbea7b027c5d0c Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 27 Aug 2015 10:59:21 +0800 Subject: [PATCH 1886/2517] translated --- ... Run Kali Linux 2.0 In Docker Container.md | 76 ------------------- ... Run Kali Linux 2.0 In Docker Container.md | 74 ++++++++++++++++++ 2 files changed, 74 insertions(+), 76 deletions(-) delete mode 100644 sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md create mode 100644 translated/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md diff --git a/sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md b/sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md deleted file mode 100644 index 15c8d1011e..0000000000 --- a/sources/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md +++ /dev/null @@ -1,76 +0,0 @@ -translating---geekpi - -How to Run Kali Linux 2.0 In Docker Container -================================================================================ -### Introduction ### - -Kali Linux is a well known operating system for security testers and ethical hackers. It comes bundled with a large list of security related applications and make it easy to perform penetration testing. Recently, [Kali Linux 2.0][1] is out and it is being considered as one of the most important release for this operating system. On the other hand, Docker technology is getting massive popularity due to its scalability and ease of use. Dockers make it super easy to ship your software applications to your users. Breaking news is that you can now run Kali Linux via Dockers; let’s see how :) - -### Running Kali Linux 2.0 In Docker ### - -**Related Notes** - -If you don’t have docker installed on your system, you can do it by using the following commands: - -**For Ubuntu/Linux Mint/Debian:** - - sudo apt-get install docker - -**For Fedora/RHEL/CentOS:** - - sudo yum install docker - -**For Fedora 22:** - - dnf install docker - -You can start docker service by running: - - sudo docker start - -First of all make sure that docker service is running fine by using the following command: - - sudo docker status - -Kali Linux docker image has been uploaded online by Kali Linux development team, simply run following command to download this image to your system. - - docker pull kalilinux/kali-linux-docker - -![Pull Kali Linux docker](http://linuxpitstop.com/wp-content/uploads/2015/08/129.png) - -Once download is complete, run following command to find out the Image ID for your downloaded Kali Linux docker image file. - - docker images - -![Kali Linux Image ID](http://linuxpitstop.com/wp-content/uploads/2015/08/230.png) - -Now run following command to start your kali Linux docker container from image file (Here replace Image ID with correct one). - - docker run -i -t 198cd6df71ab3 /bin/bash - -It will immediately start the container and will log you into the operating system, you can start working on Kali Linux here. - -![Kali Linux Login](http://linuxpitstop.com/wp-content/uploads/2015/08/328.png) - -You can verify that container is started/running fine, by using the following command: - - docker ps - -![Docker Kali](http://linuxpitstop.com/wp-content/uploads/2015/08/421.png) - -### Conclusion ### - -Dockers are the smartest way to deploy and distribute your packages. Kali Linux docker image is pretty handy, does not consume any high amount of space on the disk and it is pretty easy to test this wonderful distro on any docker installed operating system now. - --------------------------------------------------------------------------------- - -via: http://linuxpitstop.com/run-kali-linux-2-0-in-docker-container/ - -作者:[Aun][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linuxpitstop.com/author/aun/ -[1]:http://linuxpitstop.com/install-kali-linux-2-0/ diff --git a/translated/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md b/translated/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md new file mode 100644 index 0000000000..5c65ec0286 --- /dev/null +++ b/translated/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md @@ -0,0 +1,74 @@ +如何在Docker容器中运行Kali Linux 2.0 +================================================================================ +### 介绍 ### + +Kali Linux是一个对于安全测试人员和白帽的一个知名的操作系统。它带有大量安全相关的程序,这让它很容易用于渗透测试。最近,[Kali Linux 2.0][1]发布了,并且它被认为是这个操作系统最重要的一次发布。另一方面,Docker技术由于它的可扩展性和易用性让它变得很流行。Dokcer让你非常容易地将你的程序带给你的用户。好消息是你可以通过Docker运行Kali Linux了,让我们看看该怎么做:) + +### 在Docker中运行Kali Linux 2.0 ### + +**相关提示** + +如果你还没有在系统中安装docker,你可以运行下面的命令: + +**对于 Ubuntu/Linux Mint/Debian:** + + sudo apt-get install docker + +**对于 Fedora/RHEL/CentOS:** + + sudo yum install docker + +**对于 Fedora 22:** + + dnf install docker + +你可以运行下面的命令来启动docker: + + sudo docker start + +首先运行下面的命令确保服务正在运行: + + sudo docker status + +Kali Linux的开发团队已将Kali Linux的docker镜像上传了,只需要输入下面的命令来下载镜像。 + + docker pull kalilinux/kali-linux-docker + +![Pull Kali Linux docker](http://linuxpitstop.com/wp-content/uploads/2015/08/129.png) + +下载完成后,运行下面的命令来找出你下载的docker镜像的ID。 + + docker images + +![Kali Linux Image ID](http://linuxpitstop.com/wp-content/uploads/2015/08/230.png) + +现在运行下面的命令来从镜像文件启动kali linux docker容器(这里用正确的镜像ID替换)。 + + docker run -i -t 198cd6df71ab3 /bin/bash + +它会立刻启动容器并且会登录操作系统,你现在可以在Kaili Linux中工作了。 + +![Kali Linux Login](http://linuxpitstop.com/wp-content/uploads/2015/08/328.png) + +你可以通过下面的命令来验证通气已经启动/运行中了: + + docker ps + +![Docker Kali](http://linuxpitstop.com/wp-content/uploads/2015/08/421.png) + +### 总结 ### + +Docker是一种最聪明的用来部署和分发包的方式。Kali Linux docker镜像非常容易上手,也不会消耗很大的硬盘空间,这样也容易地在任何安装了docker的操作系统上测试这个很棒的发行版了。 + +-------------------------------------------------------------------------------- + +via: http://linuxpitstop.com/run-kali-linux-2-0-in-docker-container/ + +作者:[Aun][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linuxpitstop.com/author/aun/ +[1]:http://linuxpitstop.com/install-kali-linux-2-0/ From 223b0022828c66ca36215a5d35aa5c474fcc31fe Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 27 Aug 2015 11:53:55 +0800 Subject: [PATCH 1887/2517] [Translated]RHCSA Series--Part 08--Securing SSH,Setting Hostname and Enabling Network Services.md --- ... Hostname and Enabling Network Services.md | 217 ------------------ ... Hostname and Enabling Network Services.md | 215 +++++++++++++++++ 2 files changed, 215 insertions(+), 217 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md b/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md deleted file mode 100644 index 40fa771580..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md +++ /dev/null @@ -1,217 +0,0 @@ -FSSlc translating - -RHCSA Series: Securing SSH, Setting Hostname and Enabling Network Services – Part 8 -================================================================================ -As a system administrator you will often have to log on to remote systems to perform a variety of administration tasks using a terminal emulator. You will rarely sit in front of a real (physical) terminal, so you need to set up a way to log on remotely to the machines that you will be asked to manage. - -In fact, that may be the last thing that you will have to do in front of a physical terminal. For security reasons, using Telnet for this purpose is not a good idea, as all traffic goes through the wire in unencrypted, plain text. - -In addition, in this article we will also review how to configure network services to start automatically at boot and learn how to set up network and hostname resolution statically or dynamically. - -![RHCSA: Secure SSH and Enable Network Services](http://www.tecmint.com/wp-content/uploads/2015/05/Secure-SSH-Server-and-Enable-Network-Services.png) - -RHCSA: Secure SSH and Enable Network Services – Part 8 - -### Installing and Securing SSH Communication ### - -For you to be able to log on remotely to a RHEL 7 box using SSH, you will have to install the openssh, openssh-clients and openssh-servers packages. The following command not only will install the remote login program, but also the secure file transfer tool, as well as the remote file copy utility: - - # yum update && yum install openssh openssh-clients openssh-servers - -Note that it’s a good idea to install the server counterparts as you may want to use the same machine as both client and server at some point or another. - -After installation, there is a couple of basic things that you need to take into account if you want to secure remote access to your SSH server. The following settings should be present in the `/etc/ssh/sshd_config` file. - -1. Change the port where the sshd daemon will listen on from 22 (the default value) to a high port (2000 or greater), but first make sure the chosen port is not being used. - -For example, let’s suppose you choose port 2500. Use [netstat][1] in order to check whether the chosen port is being used or not: - - # netstat -npltu | grep 2500 - -If netstat does not return anything, you can safely use port 2500 for sshd, and you should change the Port setting in the configuration file as follows: - - Port 2500 - -2. Only allow protocol 2: - -Protocol 2 - -3. Configure the authentication timeout to 2 minutes, do not allow root logins, and restrict to a minimum the list of users which are allowed to login via ssh: - - LoginGraceTime 2m - PermitRootLogin no - AllowUsers gacanepa - -4. If possible, use key-based instead of password authentication: - - PasswordAuthentication no - RSAAuthentication yes - PubkeyAuthentication yes - -This assumes that you have already created a key pair with your user name on your client machine and copied it to your server as explained here. - -- [Enable SSH Passwordless Login][2] - -### Configuring Networking and Name Resolution ### - -1. Every system administrator should be well acquainted with the following system-wide configuration files: - -- /etc/hosts is used to resolve names <---> IPs in small networks. - -Every line in the `/etc/hosts` file has the following structure: - - IP address - Hostname - FQDN - -For example, - - 192.168.0.10 laptop laptop.gabrielcanepa.com.ar - -2. `/etc/resolv.conf` specifies the IP addresses of DNS servers and the search domain, which is used for completing a given query name to a fully qualified domain name when no domain suffix is supplied. - -Under normal circumstances, you don’t need to edit this file as it is managed by the system. However, should you want to change DNS servers, be advised that you need to stick to the following structure in each line: - - nameserver - IP address - -For example, - - nameserver 8.8.8.8 - -3. 3. `/etc/host.conf` specifies the methods and the order by which hostnames are resolved within a network. In other words, tells the name resolver which services to use, and in what order. - -Although this file has several options, the most common and basic setup includes a line as follows: - - order bind,hosts - -Which indicates that the resolver should first look in the nameservers specified in `resolv.conf` and then to the `/etc/hosts` file for name resolution. - -4. `/etc/sysconfig/network` contains routing and global host information for all network interfaces. The following values may be used: - - NETWORKING=yes|no - HOSTNAME=value - -Where value should be the Fully Qualified Domain Name (FQDN). - - GATEWAY=XXX.XXX.XXX.XXX - -Where XXX.XXX.XXX.XXX is the IP address of the network’s gateway. - - GATEWAYDEV=value - -In a machine with multiple NICs, value is the gateway device, such as enp0s3. - -5. Files inside `/etc/sysconfig/network-scripts` (network adapters configuration files). - -Inside the directory mentioned previously, you will find several plain text files named. - - ifcfg-name - -Where name is the name of the NIC as returned by ip link show: - -![Check Network Link Status](http://www.tecmint.com/wp-content/uploads/2015/05/Check-IP-Address.png) - -Check Network Link Status - -For example: - -![Network Files](http://www.tecmint.com/wp-content/uploads/2015/05/Network-Files.png) - -Network Files - -Other than for the loopback interface, you can expect a similar configuration for your NICs. Note that some variables, if set, will override those present in `/etc/sysconfig/network` for this particular interface. Each line is commented for clarification in this article but in the actual file you should avoid comments: - - HWADDR=08:00:27:4E:59:37 # The MAC address of the NIC - TYPE=Ethernet # Type of connection - BOOTPROTO=static # This indicates that this NIC has been assigned a static IP. If this variable was set to dhcp, the NIC will be assigned an IP address by a DHCP server and thus the next two lines should not be present in that case. - IPADDR=192.168.0.18 - NETMASK=255.255.255.0 - GATEWAY=192.168.0.1 - NM_CONTROLLED=no # Should be added to the Ethernet interface to prevent NetworkManager from changing the file. - NAME=enp0s3 - UUID=14033805-98ef-4049-bc7b-d4bea76ed2eb - ONBOOT=yes # The operating system should bring up this NIC during boot - -### Setting Hostnames ### - -In Red Hat Enterprise Linux 7, the hostnamectl command is used to both query and set the system’s hostname. - -To display the current hostname, type: - - # hostnamectl status - -![Check System hostname in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/05/Check-System-hostname.png) - -Check System Hostname - -To change the hostname, use - - # hostnamectl set-hostname [new hostname] - -For example, - - # hostnamectl set-hostname cinderella - -For the changes to take effect you will need to restart the hostnamed daemon (that way you will not have to log off and on again in order to apply the change): - - # systemctl restart systemd-hostnamed - -![Set System Hostname in CentOS 7](http://www.tecmint.com/wp-content/uploads/2015/05/Set-System-Hostname.png) - -Set System Hostname - -In addition, RHEL 7 also includes the nmcli utility that can be used for the same purpose. To display the hostname, run: - - # nmcli general hostname - -and to change it: - - # nmcli general hostname [new hostname] - -For example, - - # nmcli general hostname rhel7 - -![Set Hostname Using nmcli Command](http://www.tecmint.com/wp-content/uploads/2015/05/nmcli-command.png) - -Set Hostname Using nmcli Command - -### Starting Network Services on Boot ### - -To wrap up, let us see how we can ensure that network services are started automatically on boot. In simple terms, this is done by creating symlinks to certain files specified in the [Install] section of the service configuration files. - -In the case of firewalld (/usr/lib/systemd/system/firewalld.service): - - [Install] - WantedBy=basic.target - Alias=dbus-org.fedoraproject.FirewallD1.service - -To enable the service: - - # systemctl enable firewalld - -On the other hand, disabling firewalld entitles removing the symlinks: - - # systemctl disable firewalld - -![Enable Service at System Boot](http://www.tecmint.com/wp-content/uploads/2015/05/Enable-Service-at-System-Boot.png) - -Enable Service at System Boot - -### Conclusion ### - -In this article we have summarized how to install and secure connections via SSH to a RHEL server, how to change its name, and finally how to ensure that network services are started on boot. If you notice that a certain service has failed to start properly, you can use systemctl status -l [service] and journalctl -xn to troubleshoot it. - -Feel free to let us know what you think about this article using the comment form below. Questions are also welcome. We look forward to hearing from you! - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network-services-in-rhel-7/ - -作者:[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/20-netstat-commands-for-linux-network-management/ -[2]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ diff --git a/translated/tech/RHCSA/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md b/translated/tech/RHCSA/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md new file mode 100644 index 0000000000..82245f33b1 --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md @@ -0,0 +1,215 @@ +RHCSA 系列:安全 SSH,设定主机名及开启网络服务 – Part 8 +================================================================================ +作为一名系统管理员,你将经常使用一个终端模拟器来登陆到一个远程的系统中,执行一系列的管理任务。你将很少有机会坐在一个真实的(物理)终端前,所以你需要设定好一种方法来使得你可以登陆到你被要求去管理的那台远程主机上。 + +事实上,当你必须坐在一台物理终端前的时候,就可能是你登陆到该主机的最后一种方法。基于安全原因,使用 Telnet 来达到以上目的并不是一个好主意,因为穿行在线缆上的流量并没有被加密,它们以文本方式在传送。 + +另外,在这篇文章中,我们也将复习如何配置网络服务来使得它在开机时被自动开启,并学习如何设置网络和静态或动态地解析主机名。 + +![RHCSA: 安全 SSH 和开启网络服务](http://www.tecmint.com/wp-content/uploads/2015/05/Secure-SSH-Server-and-Enable-Network-Services.png) + +RHCSA: 安全 SSH 和开启网络服务 – Part 8 + +### 安装并确保 SSH 通信安全 ### + +对于你来说,要能够使用 SSH 远程登陆到一个 RHEL 7 机子,你必须安装 `openssh`,`openssh-clients` 和 `openssh-servers` 软件包。下面的命令不仅将安装远程登陆程序,也会安装安全的文件传输工具以及远程文件复制程序: + + # yum update && yum install openssh openssh-clients openssh-servers + +注意,安装上服务器所需的相应软件包是一个不错的主意,因为或许在某个时刻,你想使用同一个机子来作为客户端和服务器。 + +在安装完成后,如若你想安全地访问你的 SSH 服务器,你还需要考虑一些基本的事情。下面的设定应该在文件 `/etc/ssh/sshd_config` 中得以呈现。 + +1. 更改 sshd 守护进程的监听端口,从 22(默认的端口值)改为一个更高的端口值(2000 或更大),但首先要确保所选的端口没有被占用。 + +例如,让我们假设你选择了端口 2500 。使用 [netstat][1] 来检查所选的端口是否被占用: + + # netstat -npltu | grep 2500 + +假如 netstat 没有返回任何信息,则你可以安全地为 sshd 使用端口 2500,并且你应该在上面的配置文件中更改端口的设定,具体如下: + + Port 2500 + +2. 只允许协议 2: + + Protocol 2 + +3. 配置验证超时的时间为 2 分钟,不允许以 root 身份登陆,并将允许通过 ssh 登陆的人数限制到最小: + + LoginGraceTime 2m + PermitRootLogin no + AllowUsers gacanepa + +4. 假如可能,使用基于公钥的验证方式而不是使用密码: + + PasswordAuthentication no + RSAAuthentication yes + PubkeyAuthentication yes + +这假设了你已经在你的客户端机子上创建了带有你的用户名的一个密钥对,并将公钥复制到了你的服务器上。 + +- [开启 SSH 无密码登陆][2] + +### 配置网络和名称的解析 ### + +1. 每个系统管理员应该对下面这个系统配置文件非常熟悉: + +- /etc/hosts 被用来在小型网络中解析名称 <---> IP 地址。 + +文件 `/etc/hosts` 中的每一行拥有如下的结构: + + IP address - Hostname - FQDN + +例如, + + 192.168.0.10 laptop laptop.gabrielcanepa.com.ar + +2. `/etc/resolv.conf` 特别指定 DNS 服务器的 IP 地址和搜索域,它被用来在没有提供域名后缀时,将一个给定的查询名称对应为一个全称域名。 + +在正常情况下,你不必编辑这个文件,因为它是由系统管理的。然而,若你非要改变 DNS 服务器的 IP 地址,建议你在该文件的每一行中,都应该遵循下面的结构: + + nameserver - IP address + +例如, + + nameserver 8.8.8.8 + +3. `/etc/host.conf` 特别指定在一个网络中主机名被解析的方法和顺序。换句话说,告诉名称解析器使用哪个服务,并以什么顺序来使用。 + +尽管这个文件由几个选项,但最为常见和基本的设置包含如下的一行: + + order bind,hosts + +它意味着解析器应该首先查看 `resolv.conf` 中特别指定的域名服务器,然后到 `/etc/hosts` 文件中查找解析的名称。 + +4. `/etc/sysconfig/network` 包含了所有网络接口的路由和全局主机信息。下面的值可能会被使用: + + NETWORKING=yes|no + HOSTNAME=value + +其中的 value 应该是全称域名(FQDN)。 + + GATEWAY=XXX.XXX.XXX.XXX + +其中的 XXX.XXX.XXX.XXX 是网关的 IP 地址。 + + GATEWAYDEV=value + +在一个带有多个网卡的机器中, value 为网关设备名,例如 enp0s3。 + +5. 位于 `/etc/sysconfig/network-scripts` 中的文件(网络适配器配置文件)。 + +在上面提到的目录中,你将找到几个被命名为如下格式的文本文件。 + + ifcfg-name + +其中 name 为网卡的名称,由 `ip link show` 返回: + +![检查网络连接状态](http://www.tecmint.com/wp-content/uploads/2015/05/Check-IP-Address.png) + +检查网络连接状态 + +例如: + +![网络文件](http://www.tecmint.com/wp-content/uploads/2015/05/Network-Files.png) + +网络文件 + +除了环回接口,你还可以为你的网卡进行一个相似的配置。注意,假如设定了某些变量,它们将为这个特别的接口,覆盖掉 `/etc/sysconfig/network` 中定义的值。在这篇文章中,为了能够解释清楚,每行都被加上了注释,但在实际的文件中,你应该避免加上注释: + + HWADDR=08:00:27:4E:59:37 # The MAC address of the NIC + TYPE=Ethernet # Type of connection + BOOTPROTO=static # This indicates that this NIC has been assigned a static IP. If this variable was set to dhcp, the NIC will be assigned an IP address by a DHCP server and thus the next two lines should not be present in that case. + IPADDR=192.168.0.18 + NETMASK=255.255.255.0 + GATEWAY=192.168.0.1 + NM_CONTROLLED=no # Should be added to the Ethernet interface to prevent NetworkManager from changing the file. + NAME=enp0s3 + UUID=14033805-98ef-4049-bc7b-d4bea76ed2eb + ONBOOT=yes # The operating system should bring up this NIC during boot + +### 设定主机名 ### + +在 RHEL 7 中, `hostnamectl` 命令被同时用来查询和设定系统的主机名。 + +要展示当前的主机名,输入: + + # hostnamectl status + +![在RHEL 7 中检查系统的主机名](http://www.tecmint.com/wp-content/uploads/2015/05/Check-System-hostname.png) + +检查系统的主机名 + +要更改主机名,使用 + + # hostnamectl set-hostname [new hostname] + +例如, + + # hostnamectl set-hostname cinderella + +要想使得更改生效,你需要重启 hostnamed 守护进程(这样你就不必因为要应用更改而登出系统并再登陆系统): + + # systemctl restart systemd-hostnamed + +![在 RHEL7 中设定系统主机名](http://www.tecmint.com/wp-content/uploads/2015/05/Set-System-Hostname.png) + +设定系统主机名 + +另外, RHEL 7 还包含 `nmcli` 工具,它可被用来达到相同的目的。要展示主机名,运行: + + # nmcli general hostname + +且要改变主机名,则运行: + + # nmcli general hostname [new hostname] + +例如, + + # nmcli general hostname rhel7 + +![使用 nmcli 命令来设定主机名](http://www.tecmint.com/wp-content/uploads/2015/05/nmcli-command.png) + +使用 nmcli 命令来设定主机名 + +### 在开机时开启网络服务 ### + +作为本文的最后部分,就让我们看看如何确保网络服务在开机时被自动开启。简单来说,这个可通过创建符号链接到某些由服务的配置文件中的 [Install] 小节中指定的文件来实现。 + +以 firewalld(/usr/lib/systemd/system/firewalld.service) 为例: + + [Install] + WantedBy=basic.target + Alias=dbus-org.fedoraproject.FirewallD1.service + +要开启该服务,运行: + + # systemctl enable firewalld + +另一方面,要禁用 firewalld,则需要移除符号链接: + + # systemctl disable firewalld + +![在开机时开启服务](http://www.tecmint.com/wp-content/uploads/2015/05/Enable-Service-at-System-Boot.png) + +在开机时开启服务 + +### 总结 ### + +在这篇文章中,我们总结了如何安装 SSH 及使用它安全地连接到一个 RHEL 服务器,如何改变主机名,并在最后如何确保在系统启动时开启服务。假如你注意到某个服务启动失败,你可以使用 `systemctl status -l [service]` 和 `journalctl -xn` 来进行排错。 + +请随意使用下面的评论框来让我们知晓你对本文的看法。提问也同样欢迎。我们期待着你的反馈! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network-services-in-rhel-7/ + +作者:[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/20-netstat-commands-for-linux-network-management/ +[2]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ \ No newline at end of file From 8bb04b7614a497065fa820b2576dc4aeb84e00cb Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 27 Aug 2015 11:59:36 +0800 Subject: [PATCH 1888/2517] Update RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 继续翻译该系列。 --- ...stalling, Configuring and Securing a Web and FTP Server.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md b/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md index 6a1e544de3..437612f124 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md @@ -1,3 +1,5 @@ +FSSlc Translating + RHCSA Series: Installing, Configuring and Securing a Web and FTP Server – Part 9 ================================================================================ A web server (also known as a HTTP server) is a service that handles content (most commonly web pages, but other types of documents as well) over to a client in a network. @@ -173,4 +175,4 @@ via: http://www.tecmint.com/rhcsa-series-install-and-secure-apache-web-server-an [a]:http://www.tecmint.com/author/gacanepa/ [1]:http://httpd.apache.org/docs/2.4/ [2]:http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ -[3]:http://www.google.com/cse?cx=partner-pub-2601749019656699:2173448976&ie=UTF-8&q=virtual+hosts&sa=Search&gws_rd=cr&ei=Dy9EVbb0IdHisASnroG4Bw#gsc.tab=0&gsc.q=apache \ No newline at end of file +[3]:http://www.google.com/cse?cx=partner-pub-2601749019656699:2173448976&ie=UTF-8&q=virtual+hosts&sa=Search&gws_rd=cr&ei=Dy9EVbb0IdHisASnroG4Bw#gsc.tab=0&gsc.q=apache From 95cf2c6be1ca32d22b42c4a34deda014f0f01ea3 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 27 Aug 2015 13:09:10 +0800 Subject: [PATCH 1889/2517] PUB:Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux @strugglingyouth --- ...iping with Distributed Parity) in Linux.md | 163 +++++++++--------- 1 file changed, 79 insertions(+), 84 deletions(-) rename {translated/tech/RAID => published}/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md (50%) diff --git a/translated/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md b/published/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md similarity index 50% rename from translated/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md rename to published/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md index 7de5199a08..34ac7f18b2 100644 --- a/translated/tech/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md +++ b/published/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md @@ -1,89 +1,90 @@ - -在 Linux 中创建 RAID 5(条带化与分布式奇偶校验) - 第4部分 +在 Linux 下使用 RAID(四):创建 RAID 5(条带化与分布式奇偶校验) ================================================================================ -在 RAID 5 中,条带化数据跨多个驱磁盘使用分布式奇偶校验。分布式奇偶校验的条带化意味着它将奇偶校验信息和条带中的数据分布在多个磁盘上,它将有很好的数据冗余。 + +在 RAID 5 中,数据条带化后存储在分布式奇偶校验的多个磁盘上。分布式奇偶校验的条带化意味着它将奇偶校验信息和条带化数据分布在多个磁盘上,这样会有很好的数据冗余。 ![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/setup-raid-5-in-linux.jpg) -在 Linux 中配置 RAID 5 +*在 Linux 中配置 RAID 5* -对于此 RAID 级别它至少应该有三个或更多个磁盘。RAID 5 通常被用于大规模生产环境中花费更多的成本来提供更好的数据冗余性能。 +对于此 RAID 级别它至少应该有三个或更多个磁盘。RAID 5 通常被用于大规模生产环境中,以花费更多的成本来提供更好的数据冗余性能。 #### 什么是奇偶校验? #### -奇偶校验是在数据存储中检测错误最简单的一个方法。奇偶校验信息存储在每个磁盘中,比如说,我们有4个磁盘,其中一个磁盘空间被分割去存储所有磁盘的奇偶校验信息。如果任何一个磁盘出现故障,我们可以通过更换故障磁盘后,从奇偶校验信息重建得到原来的数据。 +奇偶校验是在数据存储中检测错误最简单的常见方式。奇偶校验信息存储在每个磁盘中,比如说,我们有4个磁盘,其中相当于一个磁盘大小的空间被分割去存储所有磁盘的奇偶校验信息。如果任何一个磁盘出现故障,我们可以通过更换故障磁盘后,从奇偶校验信息重建得到原来的数据。 #### RAID 5 的优点和缺点 #### -- 提供更好的性能 +- 提供更好的性能。 - 支持冗余和容错。 - 支持热备份。 -- 将失去一个磁盘的容量存储奇偶校验信息。 +- 将用掉一个磁盘的容量存储奇偶校验信息。 - 单个磁盘发生故障后不会丢失数据。我们可以更换故障硬盘后从奇偶校验信息中重建数据。 -- 事务处理读操作会更快。 -- 由于奇偶校验占用资源,写操作将是缓慢的。 +- 适合于面向事务处理的环境,读操作会更快。 +- 由于奇偶校验占用资源,写操作会慢一些。 - 重建需要很长的时间。 #### 要求 #### + 创建 RAID 5 最少需要3个磁盘,你也可以添加更多的磁盘,前提是你要有多端口的专用硬件 RAID 控制器。在这里,我们使用“mdadm”包来创建软件 RAID。 -mdadm 是一个允许我们在 Linux 下配置和管理 RAID 设备的包。默认情况下 RAID 没有可用的配置文件,我们在创建和配置 RAID 后必须将配置文件保存在一个单独的文件中,例如:mdadm.conf。 +mdadm 是一个允许我们在 Linux 下配置和管理 RAID 设备的包。默认情况下没有 RAID 的配置文件,我们在创建和配置 RAID 后必须将配置文件保存在一个单独的文件 mdadm.conf 中。 在进一步学习之前,我建议你通过下面的文章去了解 Linux 中 RAID 的基础知识。 -- [Basic Concepts of RAID in Linux – Part 1][1] -- [Creating RAID 0 (Stripe) in Linux – Part 2][2] -- [Setting up RAID 1 (Mirroring) in Linux – Part 3][3] +- [介绍 RAID 的级别和概念][1] +- [使用 mdadm 工具创建软件 RAID 0 (条带化)][2] +- [用两块磁盘创建 RAID 1(镜像)][3] #### 我的服务器设置 #### - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.227 - Hostname : rd5.tecmintlocal.com - Disk 1 [20GB] : /dev/sdb - Disk 2 [20GB] : /dev/sdc - Disk 3 [20GB] : /dev/sdd + 操作系统 : CentOS 6.5 Final + IP 地址 : 192.168.0.227 + 主机名 : rd5.tecmintlocal.com + 磁盘 1 [20GB] : /dev/sdb + 磁盘 2 [20GB] : /dev/sdc + 磁盘 3 [20GB] : /dev/sdd -这篇文章是 RAID 系列9教程的第4部分,在这里我们要建立一个软件 RAID 5(分布式奇偶校验)使用三个20GB(名为/dev/sdb, /dev/sdc 和 /dev/sdd)的磁盘在 Linux 系统或服务器中上。 +这是9篇系列教程的第4部分,在这里我们要在 Linux 系统或服务器上使用三个20GB(名为/dev/sdb, /dev/sdc 和 /dev/sdd)的磁盘建立带有分布式奇偶校验的软件 RAID 5。 ### 第1步:安装 mdadm 并检验磁盘 ### -1.正如我们前面所说,我们使用 CentOS 6.5 Final 版本来创建 RAID 设置,但同样的做法也适用于其他 Linux 发行版。 +1、 正如我们前面所说,我们使用 CentOS 6.5 Final 版本来创建 RAID 设置,但同样的做法也适用于其他 Linux 发行版。 # lsb_release -a # ifconfig | grep inet ![Setup Raid 5 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/CentOS-6.5-Summary.png) -CentOS 6.5 摘要 +*CentOS 6.5 摘要* -2. 如果你按照我们的 RAID 系列去配置的,我们假设你已经安装了“mdadm”包,如果没有,根据你的 Linux 发行版使用下面的命令安装。 +2、 如果你按照我们的 RAID 系列去配置的,我们假设你已经安装了“mdadm”包,如果没有,根据你的 Linux 发行版使用下面的命令安装。 - # yum install mdadm [on RedHat systems] - # apt-get install mdadm [on Debain systems] + # yum install mdadm [在 RedHat 系统] + # apt-get install mdadm [在 Debain 系统] -3. “mdadm”包安装后,先使用‘fdisk‘命令列出我们在系统上增加的三个20GB的硬盘。 +3、 “mdadm”包安装后,先使用`fdisk`命令列出我们在系统上增加的三个20GB的硬盘。 # fdisk -l | grep sd ![Install mdadm Tool in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/Install-mdadm-Tool.png) -安装 mdadm 工具 +*安装 mdadm 工具* -4. 现在该检查这三个磁盘是否存在 RAID 块,使用下面的命令来检查。 +4、 现在该检查这三个磁盘是否存在 RAID 块,使用下面的命令来检查。 # mdadm -E /dev/sd[b-d] - # mdadm --examine /dev/sdb /dev/sdc /dev/sdd + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd # 或 ![Examine Drives For Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Examine-Drives-For-Raid.png) -检查 Raid 磁盘 +*检查 Raid 磁盘* **注意**: 上面的图片说明,没有检测到任何超级块。所以,这三个磁盘中没有定义 RAID。让我们现在开始创建一个吧! ### 第2步:为磁盘创建 RAID 分区 ### -5. 首先,在创建 RAID 前我们要为磁盘分区(/dev/sdb, /dev/sdc 和 /dev/sdd),在进行下一步之前,先使用‘fdisk’命令进行分区。 +5、 首先,在创建 RAID 前磁盘(/dev/sdb, /dev/sdc 和 /dev/sdd)必须有分区,因此,在进行下一步之前,先使用`fdisk`命令进行分区。 # fdisk /dev/sdb # fdisk /dev/sdc @@ -93,20 +94,20 @@ CentOS 6.5 摘要 请按照下面的说明在 /dev/sdb 硬盘上创建分区。 -- 按 ‘n’ 创建新的分区。 -- 然后按 ‘P’ 选择主分区。选择主分区是因为还没有定义过分区。 -- 接下来选择分区号为1。默认就是1. +- 按 `n` 创建新的分区。 +- 然后按 `P` 选择主分区。选择主分区是因为还没有定义过分区。 +- 接下来选择分区号为1。默认就是1。 - 这里是选择柱面大小,我们没必要选择指定的大小,因为我们需要为 RAID 使用整个分区,所以只需按两次 Enter 键默认将整个容量分配给它。 -- 然后,按 ‘P’ 来打印创建好的分区。 -- 改变分区类型,按 ‘L’可以列出所有可用的类型。 -- 按 ‘t’ 修改分区类型。 -- 这里使用‘fd’设置为 RAID 的类型。 -- 然后再次使用‘p’查看我们所做的更改。 -- 使用‘w’保存更改。 +- 然后,按 `P` 来打印创建好的分区。 +- 改变分区类型,按 `L`可以列出所有可用的类型。 +- 按 `t` 修改分区类型。 +- 这里使用`fd`设置为 RAID 的类型。 +- 然后再次使用`p`查看我们所做的更改。 +- 使用`w`保存更改。 ![Create sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdb-Partition1.png) -创建 sdb 分区 +*创建 sdb 分区* **注意**: 我们仍要按照上面的步骤来创建 sdc 和 sdd 的分区。 @@ -118,7 +119,7 @@ CentOS 6.5 摘要 ![Create sdc Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdc-Partition1.png) -创建 sdc 分区 +*创建 sdc 分区* #### 创建 /dev/sdd 分区 #### @@ -126,93 +127,87 @@ CentOS 6.5 摘要 ![Create sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdd-Partition1.png) -创建 sdd 分区 +*创建 sdd 分区* -6. 创建分区后,检查三个磁盘 sdb, sdc, sdd 的变化。 +6、 创建分区后,检查三个磁盘 sdb, sdc, sdd 的变化。 # mdadm --examine /dev/sdb /dev/sdc /dev/sdd - - or - - # mdadm -E /dev/sd[b-c] + # mdadm -E /dev/sd[b-c] # 或 ![Check Partition Changes](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Changes-on-Partitions.png) -检查磁盘变化 +*检查磁盘变化* **注意**: 在上面的图片中,磁盘的类型是 fd。 -7.现在在新创建的分区检查 RAID 块。如果没有检测到超级块,我们就能够继续下一步,创建一个新的 RAID 5 的设置在这些磁盘中。 +7、 现在在新创建的分区检查 RAID 块。如果没有检测到超级块,我们就能够继续下一步,在这些磁盘中创建一个新的 RAID 5 配置。 ![Check Raid on Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-Partitions.png) -在分区中检查 Raid +*在分区中检查 RAID * ### 第3步:创建 md 设备 md0 ### -8. 现在创建一个 RAID 设备“md0”(即 /dev/md0)使用所有新创建的分区(sdb1, sdc1 and sdd1) ,使用以下命令。 +8、 现在使用所有新创建的分区(sdb1, sdc1 和 sdd1)创建一个 RAID 设备“md0”(即 /dev/md0),使用以下命令。 # mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1 - - or - - # mdadm -C /dev/md0 -l=5 -n=3 /dev/sd[b-d]1 + # mdadm -C /dev/md0 -l=5 -n=3 /dev/sd[b-d]1 # 或 -9. 创建 RAID 设备后,检查并确认 RAID,包括设备和从 mdstat 中输出的 RAID 级别。 +9、 创建 RAID 设备后,检查并确认 RAID,从 mdstat 中输出中可以看到包括的设备的 RAID 级别。 # cat /proc/mdstat ![Verify Raid Device](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Device.png) -验证 Raid 设备 +*验证 Raid 设备* -如果你想监视当前的创建过程,你可以使用‘watch‘命令,使用 watch ‘cat /proc/mdstat‘,它会在屏幕上显示且每隔1秒刷新一次。 +如果你想监视当前的创建过程,你可以使用`watch`命令,将 `cat /proc/mdstat` 传递给它,它会在屏幕上显示且每隔1秒刷新一次。 # watch -n1 cat /proc/mdstat ![Monitor Raid Process](http://www.tecmint.com/wp-content/uploads/2014/11/Monitor-Raid-Process.png) -监控 Raid 5 过程 +*监控 RAID 5 构建过程* ![Raid 5 Process Summary](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Process-Summary.png) -Raid 5 过程概要 +*Raid 5 过程概要* -10. 创建 RAID 后,使用以下命令验证 RAID 设备 +10、 创建 RAID 后,使用以下命令验证 RAID 设备 # mdadm -E /dev/sd[b-d]1 ![Verify Raid Level](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Level.png) -验证 Raid 级别 +*验证 Raid 级别* **注意**: 因为它显示三个磁盘的信息,上述命令的输出会有点长。 -11. 接下来,验证 RAID 阵列的假设,这包含正在运行 RAID 的设备,并开始重新同步。 +11、 接下来,验证 RAID 阵列,假定包含 RAID 的设备正在运行并已经开始了重新同步。 # mdadm --detail /dev/md0 ![Verify Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Array.png) -验证 Raid 阵列 +*验证 RAID 阵列* ### 第4步:为 md0 创建文件系统### -12. 在挂载前为“md0”设备创建 ext4 文件系统。 +12、 在挂载前为“md0”设备创建 ext4 文件系统。 # mkfs.ext4 /dev/md0 ![Create md0 Filesystem](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md0-Filesystem.png) -创建 md0 文件系统 +*创建 md0 文件系统* -13.现在,在‘/mnt‘下创建目录 raid5,然后挂载文件系统到 /mnt/raid5/ 下并检查下挂载点的文件,你会看到 lost+found 目录。 +13、 现在,在`/mnt`下创建目录 raid5,然后挂载文件系统到 /mnt/raid5/ 下,并检查挂载点下的文件,你会看到 lost+found 目录。 # mkdir /mnt/raid5 # mount /dev/md0 /mnt/raid5/ # ls -l /mnt/raid5/ -14. 在挂载点 /mnt/raid5 下创建几个文件,并在其中一个文件中添加一些内容然后去验证。 +14、 在挂载点 /mnt/raid5 下创建几个文件,并在其中一个文件中添加一些内容然后去验证。 # touch /mnt/raid5/raid5_tecmint_{1..5} # ls -l /mnt/raid5/ @@ -222,9 +217,9 @@ Raid 5 过程概要 ![Mount Raid 5 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Mount-Raid-Device.png) -挂载 Raid 设备 +*挂载 RAID 设备* -15. 我们需要在 fstab 中添加条目,否则系统重启后将不会显示我们的挂载点。然后编辑 fstab 文件添加条目,在文件尾追加以下行,如下图所示。挂载点会根据你环境的不同而不同。 +15、 我们需要在 fstab 中添加条目,否则系统重启后将不会显示我们的挂载点。编辑 fstab 文件添加条目,在文件尾追加以下行。挂载点会根据你环境的不同而不同。 # vim /etc/fstab @@ -232,19 +227,19 @@ Raid 5 过程概要 ![Raid 5 Automount](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-Device-Automount.png) -自动挂载 Raid 5 +*自动挂载 RAID 5* -16. 接下来,运行‘mount -av‘命令检查 fstab 条目中是否有错误。 +16、 接下来,运行`mount -av`命令检查 fstab 条目中是否有错误。 # mount -av ![Check Fstab Errors](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Fstab-Errors.png) -检查 Fstab 错误 +*检查 Fstab 错误* ### 第5步:保存 Raid 5 的配置 ### -17. 在前面章节已经说过,默认情况下 RAID 没有配置文件。我们必须手动保存。如果此步不跟 RAID 设备将不会存在 md0,它将会跟一些其他数子。 +17、 在前面章节已经说过,默认情况下 RAID 没有配置文件。我们必须手动保存。如果此步中没有跟随不属于 md0 的 RAID 设备,它会是一些其他随机数字。 所以,我们必须要在系统重新启动之前保存配置。如果配置保存它在系统重新启动时会被加载到内核中然后 RAID 也将被加载。 @@ -252,17 +247,17 @@ Raid 5 过程概要 ![Save Raid 5 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Save-Raid-5-Configuration.png) -保存 Raid 5 配置 +*保存 RAID 5 配置* -注意:保存配置将保持 RAID 级别的稳定性在 md0 设备中。 +注意:保存配置将保持 md0 设备的 RAID 级别稳定不变。 ### 第6步:添加备用磁盘 ### -18.备用磁盘有什么用?它是非常有用的,如果我们有一个备用磁盘,当我们阵列中的任何一个磁盘发生故障后,这个备用磁盘会主动添加并重建进程,并从其他磁盘上同步数据,所以我们可以在这里看到冗余。 +18、 备用磁盘有什么用?它是非常有用的,如果我们有一个备用磁盘,当我们阵列中的任何一个磁盘发生故障后,这个备用磁盘会进入激活重建过程,并从其他磁盘上同步数据,这样就有了冗余。 更多关于添加备用磁盘和检查 RAID 5 容错的指令,请阅读下面文章中的第6步和第7步。 -- [Add Spare Drive to Raid 5 Setup][4] +- [在 RAID 5 中添加备用磁盘][4] ### 结论 ### @@ -274,12 +269,12 @@ via: http://www.tecmint.com/create-raid-5-in-linux/ 作者:[Babin Lonston][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者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/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/create-raid0-in-linux/ -[3]:http://www.tecmint.com/create-raid1-in-linux/ +[1]:https://linux.cn/article-6085-1.html +[2]:https://linux.cn/article-6087-1.html +[3]:https://linux.cn/article-6093-1.html [4]:http://www.tecmint.com/create-raid-6-in-linux/ From 3ea905d9e58574f61849d3f93091293016435083 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 27 Aug 2015 15:34:16 +0800 Subject: [PATCH 1890/2517] =?UTF-8?q?20150827-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Download Manager Updated With Fresh GUI.md | 67 ++++++++ ... DEB and DEB to RPM Package Using Alien.md | 159 ++++++++++++++++++ 2 files changed, 226 insertions(+) create mode 100644 sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md create mode 100644 sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md diff --git a/sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md b/sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md new file mode 100644 index 0000000000..767c2fdcd4 --- /dev/null +++ b/sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md @@ -0,0 +1,67 @@ +Xtreme Download Manager Updated With Fresh GUI +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme-Download-Manager-Linux.jpg) + +[Xtreme Download Manager][1], unarguably one of the [best download managers for Linux][2], has a new version named XDM 2015 which brings a fresh new look to it. + +Xtreme Download Manager, also known as XDM or XDMAN, is a popular cross-platform download manager available for Linux, Windows and Mac OS X. It is also compatible with all major web browsers such as Chrome, Firefox, Safari enabling you to download directly from XDM when you try to download something in your web browser. + +Applications such as XDM are particularly useful when you have slow/limited network connectivity and you need to manage your downloads. Imagine downloading a huge file from internet on a slow network. What if you could pause and resume the download at will? XDM helps you in such situations. + +Some of the main features of XDM are: + +- Pause and resume download +- [Download videos from YouTube][3] and other video sites +- Force assemble +- Download speed acceleration +- Schedule downloads +- Limit download speed +- Web browser integration +- Support for proxy servers + +Here you can see the difference between the old and new XDM. + +![Old XDM](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme-Download-Manager-700x400_c.jpg) + +Old XDM + +![New XDM](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme_Download_Manager.png) + +New XDM + +### Install Xtreme Download Manager in Ubuntu based Linux distros ### + +Thanks to the PPA by Noobslab, you can easily install Xtreme Download Manager using the commands below. XDM requires Java but thanks to the PPA, you don’t need to bother with installing dependencies separately. + + sudo add-apt-repository ppa:noobslab/apps + sudo apt-get update + sudo apt-get install xdman + +The above PPA should be available for Ubuntu and other Ubuntu based Linux distributions such as Linux Mint, elementary OS, Linux Lite etc. + +#### Remove XDM #### + +To remove XDM (installed using the PPA), use the commands below: + + sudo apt-get remove xdman + sudo add-apt-repository --remove ppa:noobslab/apps + +For other Linux distributions, you can download it from the link below: + +- [Download Xtreme Download Manager][4] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/xtreme-download-manager-install/ + +作者:[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://xdman.sourceforge.net/ +[2]:http://itsfoss.com/4-best-download-managers-for-linux/ +[3]:http://itsfoss.com/download-youtube-videos-ubuntu/ +[4]:http://xdman.sourceforge.net/download.html \ No newline at end of file diff --git a/sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md b/sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md new file mode 100644 index 0000000000..2d3f203676 --- /dev/null +++ b/sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md @@ -0,0 +1,159 @@ +How to Convert From RPM to DEB and DEB to RPM Package Using Alien +================================================================================ +As I’m sure you already know, there are plenty of ways to install software in Linux: using the package management system provided by your distribution ([aptitude, yum, or zypper][1], to name a few examples), compiling from source (though somewhat rare these days, it was the only method available during the early days of Linux), or utilizing a low level tool such as dpkg or rpm with .deb and .rpm standalone, precompiled packages, respectively. + +![Convert RPM to DEB and DEB to RPM](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-RPM-to-DEB-and-DEB-to-RPM.png) + +Convert RPM to DEB and DEB to RPM Package Using Alien + +In this article we will introduce you to alien, a tool that converts between different Linux package formats, with .rpm to .deb (and vice versa) being the most common usage. + +This tool, even when its author is no longer maintaining it and states in his website that alien will always probably remain in experimental status, can come in handy if you need a certain type of package but can only find that program in another package format. + +For example, alien saved my day once when I was looking for a .deb driver for a inkjet printer and couldn’t find any – the manufacturer only provided a .rpm package. I installed alien, converted the package, and before long I was able to use my printer without issues. + +That said, we must clarify that this utility should not be used to replace important system files and libraries since they are set up differently across distributions. Only use alien as a last resort if the suggested installation methods at the beginning of this article are out of the question for the required program. + +Last but not least, we must note that even though we will use CentOS and Debian in this article, alien is also known to work in Slackware and even in Solaris, besides the first two distributions and their respective families. + +### Step 1: Installing Alien and Dependencies ### + +To install alien in CentOS/RHEL 7, you will need to enable the EPEL and the Nux Dextop (yes, it’s Dextop – not Desktop) repositories, in that order: + + # yum install epel-release + # rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro + +The latest version of the package that enables this repository is currently 0.5 (published on Aug. 10, 2015). You should check [http://li.nux.ro/download/nux/dextop/el7/x86_64/][2] to see whether there’s a newer version before proceeding further: + + # rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm + +then do, + + # yum update && yum install alien + +In Fedora, you will only need to run the last command. + +In Debian and derivatives, simply do: + + # aptitude install alien + +### Step 2: Converting from .deb to .rpm Package ### + +For this test we have chosen dateutils, which provides a set of date and time utilities to deal with large amounts of financial data. We will download the .deb package to our CentOS 7 box, convert it to .rpm and install it: + +![Check CentOS Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-OS-Version.png) + +Check CentOS Version + + # cat /etc/centos-release + # wget http://ftp.us.debian.org/debian/pool/main/d/dateutils/dateutils_0.3.1-1.1_amd64.deb + # alien --to-rpm --scripts dateutils_0.3.1-1.1_amd64.deb + +![Convert .deb to .rpm package in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-deb-to-rpm-package.png) + +Convert .deb to .rpm package in Linux + +**Important**: (Please note how, by default, alien increases the version minor number of the target package. If you want to override this behavior, add the –keep-version flag). + +If we try to install the package right away, we will run into a slight issue: + + # rpm -Uvh dateutils-0.3.1-2.1.x86_64.rpm + +![Install RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-RPM-Package.png) + +Install RPM Package + +To solve this issue, we will enable the epel-testing repository and install the rpmrebuild utility to edit the settings of the package to be rebuilt: + + # yum --enablerepo=epel-testing install rpmrebuild + +Then run, + + # rpmrebuild -pe dateutils-0.3.1-2.1.x86_64.rpm + +Which will open up your default text editor. Go to the `%files` section and delete the lines that refer to the directories mentioned in the error message, then save the file and exit: + +![Convert .deb to Alien Version](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-Deb-Package-to-Alien-Version.png) + +Convert .deb to Alien Version + +When you exit the file you will be prompted to continue with the rebuild. If you choose Y, the file will be rebuilt into the specified directory (different than the current working directory): + + # rpmrebuild –pe dateutils-0.3.1-2.1.x86_64.rpm + +![Build RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Build-RPM-Package.png) + +Build RPM Package + +Now you can proceed to install the package and verify as usual: + + # rpm -Uvh /root/rpmbuild/RPMS/x86_64/dateutils-0.3.1-2.1.x86_64.rpm + # rpm -qa | grep dateutils + +![Install Build RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Build-RPM-Package.png) + +Install Build RPM Package + +Finally, you can list the individual tools that were included with dateutils and alternatively check their respective man pages: + + # ls -l /usr/bin | grep dateutils + +![Verify Installed RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Verify-Installed-Package.png) + +Verify Installed RPM Package + +### Step 3: Converting from .rpm to .deb Package ### + +In this section we will illustrate how to convert from .rpm to .deb. In a 32-bit Debian Wheezy box, let’s download the .rpm package for the zsh shell from the CentOS 6 OS repository. Note that this shell is not available by default in Debian and derivatives. + + # cat /etc/shells + # lsb_release -a | tail -n 4 + +![Check Shell and Debian OS Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Shell-Debian-OS-Version.png) + +Check Shell and Debian OS Version + + # wget http://mirror.centos.org/centos/6/os/i386/Packages/zsh-4.3.11-4.el6.centos.i686.rpm + # alien --to-deb --scripts zsh-4.3.11-4.el6.centos.i686.rpm + +You can safely disregard the messages about a missing signature: + +![Convert .rpm to .deb Package](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-rpm-to-deb-Package.png) + +Convert .rpm to .deb Package + +After a few moments, the .deb file should have been generated and be ready to install: + + # dpkg -i zsh_4.3.11-5_i386.deb + +![Install RPM Converted Deb Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Deb-Package.png) + +Install RPM Converted Deb Package + +After the installation, you can verify that zsh is added to the list of valid shells: + + # cat /etc/shells + +![Confirm Installed Zsh Package](http://www.tecmint.com/wp-content/uploads/2015/08/Confirm-Installed-Package.png) + +Confirm Installed Zsh Package + +### Summary ### + +In this article we have explained how to convert from .rpm to .deb and vice versa to install packages as a last resort when such programs are not available in the repositories or as distributable source code. You will want to bookmark this article because all of us will need alien at one time or another. + +Feel free to share your thoughts about this article using the form below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/convert-from-rpm-to-deb-and-deb-to-rpm-package-using-alien/ + +作者:[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/linux-package-management/ +[2]:http://li.nux.ro/download/nux/dextop/el7/x86_64/ \ No newline at end of file From ef6c926d18b3617c8a0d65cd04cf28c58ee19ea1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 27 Aug 2015 16:02:02 +0800 Subject: [PATCH 1891/2517] =?UTF-8?q?20150827-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...The Strangest Most Unique Linux Distros.md | 67 ++++++++ ... or UNIX--Bash Read a File Line By Line.md | 162 ++++++++++++++++++ 2 files changed, 229 insertions(+) create mode 100644 sources/talk/20150827 The Strangest Most Unique Linux Distros.md create mode 100644 sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md diff --git a/sources/talk/20150827 The Strangest Most Unique Linux Distros.md b/sources/talk/20150827 The Strangest Most Unique Linux Distros.md new file mode 100644 index 0000000000..04ff47952a --- /dev/null +++ b/sources/talk/20150827 The Strangest Most Unique Linux Distros.md @@ -0,0 +1,67 @@ +The Strangest, Most Unique Linux Distros +================================================================================ +From the most consumer focused distros like Ubuntu, Fedora, Mint or elementary OS to the more obscure, minimal and enterprise focused ones such as Slackware, Arch Linux or RHEL, I thought I've seen them all. Couldn't have been any further from the truth. Linux eco-system is very diverse. There's one for everyone. Let's discuss the weird and wacky world of niche Linux distros that represents the true diversity of open platforms. + +![strangest linux distros](http://2.bp.blogspot.com/--cSL2-6rIgA/VcwNc5hFebI/AAAAAAAAJzk/AgB55mVtJVQ/s1600/Puppy-Linux.png) + +**Puppy Linux**: An operating system which is about 1/10th the size of an average DVD quality movie rip, that's Puppy Linux for you. The OS is just 100 MB in size! And it can run from RAM making it unusually fast even in older PCs. You can even remove the boot medium after the operating system has started! Can it get any better than that? System requirements are bare minimum, most hardware are automatically detected, and it comes loaded with software catering to your basic needs. [Experience Puppy Linux][1]. + +![suicide linux](http://3.bp.blogspot.com/-dfeehRIQKpo/VdMgRVQqIJI/AAAAAAAAJz0/TmBs-n2K9J8/s1600/suicide-linux.jpg) + +**Suicide Linux**: Did the name scare you? Well it should. 'Any time - any time - you type any remotely incorrect command, the interpreter creatively resolves it into rm -rf / and wipes your hard drive'. Simple as that. I really want to know the ones who are confident enough to risk their production machines with [Suicide Linux][2]. **Warning: DO NOT try this on production machines!** The whole thing is available in a neat [DEB package][3] if you're interested. + +![top 10 strangest linux distros](http://3.bp.blogspot.com/-Q0hlEMCD9-o/VdMieAiXY1I/AAAAAAAAJ0M/iS_ZjVaZAk8/s1600/papyros.png) + +**PapyrOS**: "Strange" in a good way. PapyrOS is trying to adapt the material design language of Android into their brand new Linux distribution. Though the project is in early stages, it already looks very promising. The project page says the OS is 80% complete and one can expect the first Alpha release anytime soon. We did a small write up on [PapyrOS][4] when it was announced and by the looks of it, PapyrOS might even become a trend-setter of sorts. Follow the project on [Google+][5] and contribute via [BountySource][6] if you're interested. + +![10 most unique linux distros](http://3.bp.blogspot.com/-8aOtnTp3Yxk/VdMo_KWs4sI/AAAAAAAAJ0o/3NTqhaw60jM/s1600/qubes-linux.png) + +**Qubes OS**: Qubes is an open-source operating system designed to provide strong security using a Security by Compartmentalization approach. The assumption is that there can be no perfect, bug-free desktop environment. And by implementing a 'Security by Isolation' approach, [Qubes Linux][7] intends to remedy that. Qubes is based on Xen, the X Window System, and Linux, and can run most Linux applications and supports most Linux drivers. Qubes was selected as a finalist of Access Innovation Prize 2014 for Endpoint Security Solution. + +![top10 linux distros](http://3.bp.blogspot.com/-2Sqvb_lilC0/VdMq_ceoXnI/AAAAAAAAJ00/kot20ugVJFk/s1600/ubuntu-satanic.jpg) + +**Ubuntu Satanic Edition**: Ubuntu SE is a Linux distribution based on Ubuntu. "It brings together the best of free software and free metal music" in one comprehensive package consisting of themes, wallpapers, and even some heavy-metal music sourced from talented new artists. Though the project doesn't look actively developed anymore, Ubuntu Satanic Edition is strange in every sense of that word. [Ubuntu SE (Slightly NSFW)][8]. + +![10 strange linux distros](http://2.bp.blogspot.com/-ZtIVjGMqdx0/VdMv136Pz1I/AAAAAAAAJ1E/-q34j-TXyUY/s1600/tiny-core-linux.png) + +**Tiny Core Linux**: Puppy Linux not small enough? Try this. Tiny Core Linux is a 12 MB graphical Linux desktop! Yep, you read it right. One major caveat: It is not a complete desktop nor is all hardware completely supported. It represents only the core needed to boot into a very minimal X desktop typically with wired internet access. There is even a version without the GUI called Micro Core Linux which is just 9MB in size. [Tiny Core Linux][9] folks. + +![top 10 unique and special linux distros](http://4.bp.blogspot.com/-idmCvIxtxeo/VdcqcggBk1I/AAAAAAAAJ1U/DTQCkiLqlLk/s1600/nixos.png) + +**NixOS**: A very experienced-user focused Linux distribution with a unique approach to package and configuration management. In other distributions, actions such as upgrades can be dangerous. Upgrading a package can cause other packages to break, upgrading an entire system is much less reliable than reinstalling from scratch. And top of all that you can't safely test what the results of a configuration change will be, there's no "Undo" so to speak. In NixOS, the entire operating system is built by the Nix package manager from a description in a purely functional build language. This means that building a new configuration cannot overwrite previous configurations. Most of the other features follow this pattern. Nix stores all packages in isolation from each other. [More about NixOS][10]. + +![strangest linux distros](http://4.bp.blogspot.com/-rOYfBXg-UiU/VddCF7w_xuI/AAAAAAAAJ1w/Nf11bOheOwM/s1600/gobolinux.jpg) + +**GoboLinux**: This is another very unique Linux distro. What makes GoboLinux so different from the rest is its unique re-arrangement of the filesystem. It has its own subdirectory tree, where all of its files and programs are stored. GoboLinux does not have a package database because the filesystem is its database. In some ways, this sort of arrangement is similar to that seen in OS X. [Get GoboLinux][11]. + +![strangest linux distros](http://1.bp.blogspot.com/-3P22pYfih6Y/VdcucPOv4LI/AAAAAAAAJ1g/PszZDbe83sQ/s1600/hannah-montana-linux.jpg) + +**Hannah Montana Linux**: Here is a Linux distro based on Kubuntu with a Hannah Montana themed boot screen, KDM, icon set, ksplash, plasma, color scheme, and wallpapers (I'm so sorry). [Link][12]. Project not active anymore. + +**RLSD Linux**: An extremely minimalistic, small, lightweight and security-hardened, text-based operating system built on Linux. "It's a unique distribution that provides a selection of console applications and home-grown security features which might appeal to hackers," developers claim. [RLSD Linux][13]. + +Did we miss anything even stranger? Let us know. + +-------------------------------------------------------------------------------- + +via: http://www.techdrivein.com/2015/08/the-strangest-most-unique-linux-distros.html + +作者:Manuel Jose +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm +[2]:http://qntm.org/suicide +[3]:http://sourceforge.net/projects/suicide-linux/files/ +[4]:http://www.techdrivein.com/2015/02/papyros-material-design-linux-coming-soon.html +[5]:https://plus.google.com/communities/109966288908859324845/stream/3262a3d3-0797-4344-bbe0-56c3adaacb69 +[6]:https://www.bountysource.com/teams/papyros +[7]:https://www.qubes-os.org/ +[8]:http://ubuntusatanic.org/ +[9]:http://tinycorelinux.net/ +[10]:https://nixos.org/ +[11]:http://www.gobolinux.org/ +[12]:http://hannahmontana.sourceforge.net/ +[13]:http://rlsd2.dimakrasner.com/ \ No newline at end of file diff --git a/sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md b/sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md new file mode 100644 index 0000000000..971adc0a0c --- /dev/null +++ b/sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md @@ -0,0 +1,162 @@ +Linux/UNIX: Bash Read a File Line By Line +================================================================================ +How do I read a file line by line under a Linux or UNIX-like system using KSH or BASH shell? + +You can use while..do..done bash loop to read file line by line on a Linux, OSX, *BSD, or Unix-like system. + +**Syntax to read file line by line on a Bash Unix & Linux shell:** + +1. The syntax is as follows for bash, ksh, zsh, and all other shells - +1. while read -r line; do COMMAND; done < input.file +1. The -r option passed to red command prevents backslash escapes from being interpreted. +1. Add IFS= option before read command to prevent leading/trailing whitespace from being trimmed - +1. while IFS= read -r line; do COMMAND_on $line; done < input.file + +Here is more human readable syntax for you: + + #!/bin/bash + input="/path/to/txt/file" + while IFS= read -r var + do + echo "$var" + done < "$input" + +**Examples** + +Here are some examples: + + #!/bin/ksh + file="/home/vivek/data.txt" + while IFS= read line + do + # display $line or do somthing with $line + echo "$line" + done <"$file" + +The same example using bash shell: + + #!/bin/bash + file="/home/vivek/data.txt" + while IFS= read -r line + do + # display $line or do somthing with $line + printf '%s\n' "$line" + done <"$file" + +You can also read field wise: + + #!/bin/bash + file="/etc/passwd" + while IFS=: read -r f1 f2 f3 f4 f5 f6 f7 + do + # display fields using f1, f2,..,f7 + printf 'Username: %s, Shell: %s, Home Dir: %s\n' "$f1" "$f7" "$f6" + done <"$file" + +Sample outputs: + +![Fig.01: Bash shell scripting- read file line by line demo outputs](http://s0.cyberciti.org/uploads/faq/2011/01/Bash-Scripting-Read-File-line-by-line-demo.jpg) + +Fig.01: Bash shell scripting- read file line by line demo outputs + +**Bash Scripting: Read text file line-by-line to create pdf files** + +My input file is as follows (faq.txt): + + 4|http://www.cyberciti.biz/faq/mysql-user-creation/|Mysql User Creation: Setting Up a New MySQL User Account + 4096|http://www.cyberciti.biz/faq/ksh-korn-shell/|What is UNIX / Linux Korn Shell? + 4101|http://www.cyberciti.biz/faq/what-is-posix-shell/|What Is POSIX Shell? + 17267|http://www.cyberciti.biz/faq/linux-check-battery-status/|Linux: Check Battery Status Command + 17245|http://www.cyberciti.biz/faq/restarting-ntp-service-on-linux/|Linux Restart NTPD Service Command + 17183|http://www.cyberciti.biz/faq/ubuntu-linux-determine-your-ip-address/|Ubuntu Linux: Determine Your IP Address + 17172|http://www.cyberciti.biz/faq/determine-ip-address-of-linux-server/|HowTo: Determine an IP Address My Linux Server + 16510|http://www.cyberciti.biz/faq/unix-linux-restart-php-service-command/|Linux / Unix: Restart PHP Service Command + 8292|http://www.cyberciti.biz/faq/mounting-harddisks-in-freebsd-with-mount-command/|FreeBSD: Mount Hard Drive / Disk Command + 8190|http://www.cyberciti.biz/faq/rebooting-solaris-unix-server/|Reboot a Solaris UNIX System + +My bash script: + + #!/bin/bash + # Usage: Create pdf files from input (wrapper script) + # Author: Vivek Gite under GPL v2.x+ + #--------------------------------------------------------- + + #Input file + _db="/tmp/wordpress/faq.txt" + + #Output location + o="/var/www/prviate/pdf/faq" + + _writer="~/bin/py/pdfwriter.py" + + # If file exists + if [[ -f "$_db" ]] + then + # read it + while IFS='|' read -r pdfid pdfurl pdftitle + do + local pdf="$o/$pdfid.pdf" + echo "Creating $pdf file ..." + #Genrate pdf file + $_writer --quiet --footer-spacing 2 \ + --footer-left "nixCraft is GIT UL++++ W+++ C++++ M+ e+++ d-" \ + --footer-right "Page [page] of [toPage]" --footer-line \ + --footer-font-size 7 --print-media-type "$pdfurl" "$pdf" + done <"$_db" + fi + +**Tip: Read from bash variable** + +Let us say you want a list of all installed php packages on a Debian or Ubuntu Linux, enter: + + # My input source is the contents of a variable called $list # + list=$(dpkg --list php\* | awk '/ii/{print $2}') + printf '%s\n' "$list" + +Sample outputs: + + php-pear + php5-cli + php5-common + php5-fpm + php5-gd + php5-json + php5-memcache + php5-mysql + php5-readline + php5-suhosin-extension + +You can now read from $list and install the package: + + #!/bin/bash + # BASH can iterate over $list variable using a "here string" # + while IFS= read -r pkg + do + printf 'Installing php package %s...\n' "$pkg" + /usr/bin/apt-get -qq install $pkg + done <<< "$list" + printf '*** Do not forget to run php5enmod and restart the server (httpd or php5-fpm) ***\n' + +Sample outputs: + + Installing php package php-pear... + Installing php package php5-cli... + Installing php package php5-common... + Installing php package php5-fpm... + Installing php package php5-gd... + Installing php package php5-json... + Installing php package php5-memcache... + Installing php package php5-mysql... + Installing php package php5-readline... + Installing php package php5-suhosin-extension... + *** Do not forget to run php5enmod and restart the server (httpd or php5-fpm) *** + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/unix-howto-read-line-by-line-from-file/ + +作者:[作者名][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file From 11cf23fc623947c5939ec69b51c0809268121d8c Mon Sep 17 00:00:00 2001 From: KS Date: Thu, 27 Aug 2015 17:35:37 +0800 Subject: [PATCH 1892/2517] Create 20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md --- ... Tool to Setup IPsec Based VPN in Linux.md | 113 ++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 translated/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md diff --git a/translated/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md b/translated/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md new file mode 100644 index 0000000000..3c16463951 --- /dev/null +++ b/translated/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md @@ -0,0 +1,113 @@ +安装Strongswan - Linux上一个基于IPsec的vpn工具 +================================================================================ +IPsec是一个提供网络层安全的标准。它包含认证头(AH)和安全负载封装(ESP)组件。AH提供包的完整性,ESP组件提供包的保密性。IPsec确保了在网络层的安全特性。 + +- 保密性 +- 数据包完整性 +- 来源不可抵赖性 +- 重放攻击防护 + +[Strongswan][1]是一个IPsec协议实现的开源代码,Strongswan代表强壮开源广域网(StrongS/WAN)。它支持IPsec的VPN两个版本的密钥自动交换(网络密钥交换(IKE)V1和V2)。 + +Strongswan基本上提供了自动交换密钥共享VPN两个节点或网络,然后它使用Linux内核的IPsec(AH和ESP)实现。密钥共享使用了IKE机制的特性使用ESP编码数据。在IKE阶段,strongswan使用OpenSSL加密算法(AES,SHA等等)和其他加密类库。无论如何,ESP组成IPsec使用的安全算法,它是Linux内核实现的。Strongswan的主要特性是下面这些。 + +- x.509证书或基于预共享密钥认证 +- 支持IKEv1和IKEv2密钥交换协议 +- 可选内置插件和库的完整性和加密测试 +- 支持椭圆曲线DH群体和ECDSA证书 +- 在智能卡上存储RSA私钥和证书 + +它能被使用在客户端或服务器(road warrior模式)和网关到网关的情景。 + +### 如何安装 ### + +几乎所有的Linux发行版都支持Strongswan的二进制包。在这个教程,我们将从二进制包安装strongswan也编译strongswan合适的特性的源代码。 + +### 使用二进制包 ### + +可以使用以下命令安装Strongswan到Ubuntu 14.04 LTS + + $sudo aptitude install strongswan + +![安装strongswan](http://blog.linoxide.com/wp-content/uploads/2014/12/strongswan-binary.png) + +strongswan的全局配置(strongswan.conf)文件和ipsec配置(ipsec.conf/ipsec.secrets)文件都在/etc/目录下。 + +### strongswan源码编译安装的依赖包 ### + +- GMP(strongswan使用的Mathematical/Precision 库) +- OpenSSL(加密算法在这个库里) +- PKCS(1,7,8,11,12)(证书编码和智能卡与Strongswan集成) + +#### 步骤 #### + +**1)** 在终端使用下面命令到/usr/src/目录 + + $cd /usr/src + +**2)** 用下面命令从strongswan网站下载源代码 + + $sudo wget http://download.strongswan.org/strongswan-5.2.1.tar.gz + +(strongswan-5.2.1.tar.gz 是最新版。) + +![下载软件](http://blog.linoxide.com/wp-content/uploads/2014/12/download_strongswan.png) + +**3)** 用下面命令提取下载软件,然后进入目录。 + + $sudo tar –xvzf strongswan-5.2.1.tar.gz; cd strongswan-5.2.1 + +**4)** 使用configure命令配置strongswan每个想要的选项。 + + ./configure --prefix=/usr/local -–enable-pkcs11 -–enable-openssl + +![检查strongswan包](http://blog.linoxide.com/wp-content/uploads/2014/12/strongswan-configure.png) + +如果GMP库没有安装,然后配置脚本将会发生下面的错误。 + +![GMP library error](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-error.png) + +因此,首先,使用下面命令安装GMP库然后执行配置脚本。 + +![gmp installation](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-installation1.png) + +无论如何,如果GMP已经安装而且还一致报错,然后在Ubuntu上使用下面命令创建libgmp.so库的软连到/usr/lib,/lib/,/usr/lib/x86_64-linux-gnu/路径下。 + + $ sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10.1.3 /usr/lib/x86_64-linux-gnu/libgmp.so + +![softlink of libgmp.so library](http://blog.linoxide.com/wp-content/uploads/2014/12/softlink.png) + +创建libgmp.so软连后,再执行./configure脚本也许就找到gmp库了。无论如何,gmp头文件也许发生其他错误,像下面这样。 + +![GMP header file issu](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-header.png) + +为解决上面的错误,使用下面命令安装libgmp-dev包 + + $sudo aptitude install libgmp-dev + +![Installation of Development library of GMP](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-dev.png) + +安装gmp的开发库后,在运行一遍配置脚本,如果没有发生错误,则将看见下面的这些输出。 + +![Output of Configure scirpt](http://blog.linoxide.com/wp-content/uploads/2014/12/successful-run.png) + +使用下面的命令编译安装strongswan。 + + $ sudo make ; sudo make install + +安装strongswan后,全局配置(strongswan.conf)和ipsec策略/密码配置文件(ipsec.conf/ipsec.secretes)被放在**/usr/local/etc**目录。 + +根据我们的安全需要Strongswan可以用作隧道或者传输模式。它提供众所周知的site-2-site模式和road warrior模式的VPN。它很容易使用在Cisco,Juniper设备上。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/security/install-strongswan/ + +作者:[nido][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/naveeda/ +[1]:https://www.strongswan.org/ From 9be5244464896eeceaa76ca8151c7f032d188b28 Mon Sep 17 00:00:00 2001 From: KS Date: Thu, 27 Aug 2015 17:35:55 +0800 Subject: [PATCH 1893/2517] Delete 20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md --- ... Tool to Setup IPsec Based VPN in Linux.md | 114 ------------------ 1 file changed, 114 deletions(-) delete mode 100644 sources/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md diff --git a/sources/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md b/sources/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md deleted file mode 100644 index cd9ee43213..0000000000 --- a/sources/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md +++ /dev/null @@ -1,114 +0,0 @@ -wyangsun translating -Install Strongswan - A Tool to Setup IPsec Based VPN in Linux -================================================================================ -IPsec is a standard which provides the security at network layer. It consist of authentication header (AH) and encapsulating security payload (ESP) components. AH provides the packet Integrity and confidentiality is provided by ESP component . IPsec ensures the following security features at network layer. - -- Confidentiality -- Integrity of packet -- Source Non. Repudiation -- Replay attack protection - -[Strongswan][1] is an open source implementation of IPsec protocol and Strongswan stands for Strong Secure WAN (StrongS/WAN). It supports the both version of automatic keying exchange in IPsec VPN (Internet keying Exchange (IKE) V1 & V2). - -Strongswan basically provides the automatic keying sharing between two nodes/gateway of the VPN and after that it uses the Linux Kernel implementation of IPsec (AH & ESP). Key shared using IKE mechanism is further used in the ESP for the encryption of data. In IKE phase, strongswan uses the encryption algorithms (AES,SHA etc) of OpenSSL and other crypto libraries. However, ESP component of IPsec uses the security algorithm which are implemented in the Linux Kernel. The main features of Strongswan are given below. - -- 509 certificates or pre-shared keys based Authentication -- Support of IKEv1 and IKEv2 key exchange protocols -- Optional built-in integrity and crypto tests for plugins and libraries -- Support of elliptic curve DH groups and ECDSA certificates -- Storage of RSA private keys and certificates on a smartcard. - -It can be used in the client / server (road warrior) and gateway to gateway scenarios. - -### How to Install ### - -Almost all Linux distro’s, supports the binary package of Strongswan. In this tutorial, we will install the strongswan from binary package and also the compilation of strongswan source code with desirable features. - -### Using binary package ### - -Strongswan can be installed using following command on Ubuntu 14.04 LTS . - - $sudo aptitude install strongswan - -![Installation of strongswan](http://blog.linoxide.com/wp-content/uploads/2014/12/strongswan-binary.png) - -The global configuration (strongswan.conf) file and ipsec configuration (ipsec.conf/ipsec.secrets) files of strongswan are under /etc/ directory. - -### Pre-requisite for strongswan source compilation & installation ### - -- GMP (Mathematical/Precision Library used by strongswan) -- OpenSSL (Crypto Algorithms from this library) -- PKCS (1,7,8,11,12)(Certificate encoding and smart card integration with Strongswan ) - -#### Procedure #### - -**1)** Go to /usr/src/ directory using following command in the terminal. - - $cd /usr/src - -**2)** Download the source code from strongswan site suing following command - - $sudo wget http://download.strongswan.org/strongswan-5.2.1.tar.gz - -(strongswan-5.2.1.tar.gz is the latest version.) - -![Downloading software](http://blog.linoxide.com/wp-content/uploads/2014/12/download_strongswan.png) - -**3)** Extract the downloaded software and go inside it using following command. - - $sudo tar –xvzf strongswan-5.2.1.tar.gz; cd strongswan-5.2.1 - -**4)** Configure the strongswan as per desired options using configure command. - - ./configure --prefix=/usr/local -–enable-pkcs11 -–enable-openssl - -![checking packages for strongswan](http://blog.linoxide.com/wp-content/uploads/2014/12/strongswan-configure.png) - -If GMP library is not installed, then configure script will generate following error. - -![GMP library error](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-error.png) - -Therefore, first of all, install the GMP library using following command and then run the configure script. - -![gmp installation](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-installation1.png) - -However, if GMP is already installed and still above error exists then create soft link of libgmp.so library at /usr/lib , /lib/, /usr/lib/x86_64-linux-gnu/ paths in Ubuntu using following command. - - $ sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10.1.3 /usr/lib/x86_64-linux-gnu/libgmp.so - -![softlink of libgmp.so library](http://blog.linoxide.com/wp-content/uploads/2014/12/softlink.png) - -After the creation of libgmp.so softlink, again run the ./configure script and it may find the gmp library. However, it may generate another error of gmp header file which is shown the following figure. - -![GMP header file issu](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-header.png) - -Install the libgmp-dev package using following command for the solution of above error. - - $sudo aptitude install libgmp-dev - -![Installation of Development library of GMP](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-dev.png) - -After installation of development package of gmp library, again run the configure script and if it does not produce any error, then the following output will be displayed. - -![Output of Configure scirpt](http://blog.linoxide.com/wp-content/uploads/2014/12/successful-run.png) - -Type the following commands for the compilation and installation of strongswan. - - $ sudo make ; sudo make install - -After the installation of strongswan , the Global configuration (strongswan.conf) and ipsec policy/secret configuration files (ipsec.conf/ipsec.secretes) are placed in **/usr/local/etc** directory. - -Strongswan can be used as tunnel or transport mode depends on our security need. It provides well known site-2-site and road warrior VPNs. It can be use easily with Cisco,Juniper devices. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/security/install-strongswan/ - -作者:[nido][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/naveeda/ -[1]:https://www.strongswan.org/ From 217911c8876de1313460771cfa1f1be3e0c7b33b Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 27 Aug 2015 17:55:34 +0800 Subject: [PATCH 1894/2517] Update 20150827 Linux or UNIX--Bash Read a File Line By Line.md --- .../20150827 Linux or UNIX--Bash Read a File Line By Line.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md b/sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md index 971adc0a0c..c0a4b6c27c 100644 --- a/sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md +++ b/sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Linux/UNIX: Bash Read a File Line By Line ================================================================================ How do I read a file line by line under a Linux or UNIX-like system using KSH or BASH shell? @@ -159,4 +160,4 @@ via: http://www.cyberciti.biz/faq/unix-howto-read-line-by-line-from-file/ 译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 \ No newline at end of file +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From f0c171116875e4ea6cb783bda1dcdfa615d0644f Mon Sep 17 00:00:00 2001 From: KS Date: Thu, 27 Aug 2015 19:32:42 +0800 Subject: [PATCH 1895/2517] Update 20150826 How to set up a system status page of your infrastructure.md --- ...ow to set up a system status page of your infrastructure.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150826 How to set up a system status page of your infrastructure.md b/sources/tech/20150826 How to set up a system status page of your infrastructure.md index 44fb4ed8d5..f696e91638 100644 --- a/sources/tech/20150826 How to set up a system status page of your infrastructure.md +++ b/sources/tech/20150826 How to set up a system status page of your infrastructure.md @@ -1,3 +1,4 @@ +wyangsun translating How to set up a system status page of your infrastructure ================================================================================ If you are a system administrator who is responsible for critical IT infrastructure or services of your organization, you will understand the importance of effective communication in your day-to-day tasks. Suppose your production storage server is on fire. You want your entire team on the same page in order to resolve the issue as fast as you can. While you are at it, you don't want half of all users contacting you asking why they cannot access their documents. When a scheduled maintenance is coming up, you want to notify interested parties of the event ahead of the schedule, so that unnecessary support tickets can be avoided. @@ -291,4 +292,4 @@ via: http://xmodulo.com/setup-system-status-page.html [3]:http://ask.xmodulo.com/install-remi-repository-centos-rhel.html [4]:http://xmodulo.com/install-lamp-stack-centos.html [5]:http://xmodulo.com/configure-virtual-hosts-apache-http-server.html -[6]:http://xmodulo.com/monitor-common-services-nagios.html \ No newline at end of file +[6]:http://xmodulo.com/monitor-common-services-nagios.html From 720999b380ca95fe4007b5e817639f56f7b23f5d Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 27 Aug 2015 22:42:14 +0800 Subject: [PATCH 1896/2517] PUB:20150826 How to Run Kali Linux 2.0 In Docker Container @geekpi --- ... Run Kali Linux 2.0 In Docker Container.md | 74 +++++++++++++++++++ ... Run Kali Linux 2.0 In Docker Container.md | 74 ------------------- 2 files changed, 74 insertions(+), 74 deletions(-) create mode 100644 published/20150826 How to Run Kali Linux 2.0 In Docker Container.md delete mode 100644 translated/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md diff --git a/published/20150826 How to Run Kali Linux 2.0 In Docker Container.md b/published/20150826 How to Run Kali Linux 2.0 In Docker Container.md new file mode 100644 index 0000000000..83248bb51e --- /dev/null +++ b/published/20150826 How to Run Kali Linux 2.0 In Docker Container.md @@ -0,0 +1,74 @@ +如何在 Docker 容器中运行 Kali Linux 2.0 +================================================================================ +### 介绍 ### + +Kali Linux 是一个对于安全测试人员和白帽的一个知名操作系统。它带有大量安全相关的程序,这让它很容易用于渗透测试。最近,[Kali Linux 2.0][1] 发布了,它被认为是这个操作系统最重要的一次发布。另一方面,Docker 技术由于它的可扩展性和易用性让它变得很流行。Dokcer 让你非常容易地将你的程序带给你的用户。好消息是你可以通过 Docker 运行Kali Linux 了,让我们看看该怎么做 :) + +### 在 Docker 中运行 Kali Linux 2.0 ### + +**相关提示** + +> 如果你还没有在系统中安装docker,你可以运行下面的命令: + +> **对于 Ubuntu/Linux Mint/Debian:** + +> sudo apt-get install docker + +> **对于 Fedora/RHEL/CentOS:** + +> sudo yum install docker + +> **对于 Fedora 22:** + +> dnf install docker + +> 你可以运行下面的命令来启动docker: + +> sudo docker start + +首先运行下面的命令确保 Docker 服务运行正常: + + sudo docker status + +Kali Linux 的开发团队已将 Kali Linux 的 docker 镜像上传了,只需要输入下面的命令来下载镜像。 + + docker pull kalilinux/kali-linux-docker + +![Pull Kali Linux docker](http://linuxpitstop.com/wp-content/uploads/2015/08/129.png) + +下载完成后,运行下面的命令来找出你下载的 docker 镜像的 ID。 + + docker images + +![Kali Linux Image ID](http://linuxpitstop.com/wp-content/uploads/2015/08/230.png) + +现在运行下面的命令来从镜像文件启动 kali linux docker 容器(这里需用正确的镜像ID替换)。 + + docker run -i -t 198cd6df71ab3 /bin/bash + +它会立刻启动容器并且让你登录到该操作系统,你现在可以在 Kaili Linux 中工作了。 + +![Kali Linux Login](http://linuxpitstop.com/wp-content/uploads/2015/08/328.png) + +你可以在容器外面通过下面的命令来验证容器已经启动/运行中了: + + docker ps + +![Docker Kali](http://linuxpitstop.com/wp-content/uploads/2015/08/421.png) + +### 总结 ### + +Docker 是一种最聪明的用来部署和分发包的方式。Kali Linux docker 镜像非常容易上手,也不会消耗很大的硬盘空间,这样也可以很容易地在任何安装了 docker 的操作系统上测试这个很棒的发行版了。 + +-------------------------------------------------------------------------------- + +via: http://linuxpitstop.com/run-kali-linux-2-0-in-docker-container/ + +作者:[Aun][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linuxpitstop.com/author/aun/ +[1]:https://linux.cn/article-6005-1.html diff --git a/translated/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md b/translated/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md deleted file mode 100644 index 5c65ec0286..0000000000 --- a/translated/tech/20150826 How to Run Kali Linux 2.0 In Docker Container.md +++ /dev/null @@ -1,74 +0,0 @@ -如何在Docker容器中运行Kali Linux 2.0 -================================================================================ -### 介绍 ### - -Kali Linux是一个对于安全测试人员和白帽的一个知名的操作系统。它带有大量安全相关的程序,这让它很容易用于渗透测试。最近,[Kali Linux 2.0][1]发布了,并且它被认为是这个操作系统最重要的一次发布。另一方面,Docker技术由于它的可扩展性和易用性让它变得很流行。Dokcer让你非常容易地将你的程序带给你的用户。好消息是你可以通过Docker运行Kali Linux了,让我们看看该怎么做:) - -### 在Docker中运行Kali Linux 2.0 ### - -**相关提示** - -如果你还没有在系统中安装docker,你可以运行下面的命令: - -**对于 Ubuntu/Linux Mint/Debian:** - - sudo apt-get install docker - -**对于 Fedora/RHEL/CentOS:** - - sudo yum install docker - -**对于 Fedora 22:** - - dnf install docker - -你可以运行下面的命令来启动docker: - - sudo docker start - -首先运行下面的命令确保服务正在运行: - - sudo docker status - -Kali Linux的开发团队已将Kali Linux的docker镜像上传了,只需要输入下面的命令来下载镜像。 - - docker pull kalilinux/kali-linux-docker - -![Pull Kali Linux docker](http://linuxpitstop.com/wp-content/uploads/2015/08/129.png) - -下载完成后,运行下面的命令来找出你下载的docker镜像的ID。 - - docker images - -![Kali Linux Image ID](http://linuxpitstop.com/wp-content/uploads/2015/08/230.png) - -现在运行下面的命令来从镜像文件启动kali linux docker容器(这里用正确的镜像ID替换)。 - - docker run -i -t 198cd6df71ab3 /bin/bash - -它会立刻启动容器并且会登录操作系统,你现在可以在Kaili Linux中工作了。 - -![Kali Linux Login](http://linuxpitstop.com/wp-content/uploads/2015/08/328.png) - -你可以通过下面的命令来验证通气已经启动/运行中了: - - docker ps - -![Docker Kali](http://linuxpitstop.com/wp-content/uploads/2015/08/421.png) - -### 总结 ### - -Docker是一种最聪明的用来部署和分发包的方式。Kali Linux docker镜像非常容易上手,也不会消耗很大的硬盘空间,这样也容易地在任何安装了docker的操作系统上测试这个很棒的发行版了。 - --------------------------------------------------------------------------------- - -via: http://linuxpitstop.com/run-kali-linux-2-0-in-docker-container/ - -作者:[Aun][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linuxpitstop.com/author/aun/ -[1]:http://linuxpitstop.com/install-kali-linux-2-0/ From b790e5703a27c4b45474431fc96e4922aec600de Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 27 Aug 2015 23:09:15 +0800 Subject: [PATCH 1897/2517] PUB:Linux and Unix Test Disk IO Performance With dd Command @DongShuaike --- ...est Disk IO Performance With dd Command.md | 69 ++++++++++--------- 1 file changed, 38 insertions(+), 31 deletions(-) rename translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD => published/Linux and Unix Test Disk IO Performance With dd Command.md (70%) diff --git a/translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD b/published/Linux and Unix Test Disk IO Performance With dd Command.md similarity index 70% rename from translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD rename to published/Linux and Unix Test Disk IO Performance With dd Command.md index be5986b78e..be96c3941b 100644 --- a/translated/tech/Linux and Unix Test Disk IO Performance With dd Command.MD +++ b/published/Linux and Unix Test Disk IO Performance With dd Command.md @@ -1,24 +1,25 @@ -使用dd命令在Linux和Unix环境下进行硬盘I/O性能检测 +使用 dd 命令进行硬盘 I/O 性能检测 ================================================================================ -如何使用dd命令测试硬盘的性能?如何在linux操作系统下检测硬盘的读写能力? + +如何使用dd命令测试我的硬盘性能?如何在linux操作系统下检测硬盘的读写速度? 你可以使用以下命令在一个Linux或类Unix操作系统上进行简单的I/O性能测试。 -- **dd命令** :它被用来在Linux和类Unix系统下对硬盘设备进行写性能的检测。 -- **hparm命令**:它被用来获取或设置硬盘参数,包括测试读性能以及缓存性能等。 +- **dd命令** :它被用来在Linux和类Unix系统下对硬盘设备进行写性能的检测。 +- **hparm命令**:它用来在基于 Linux 的系统上获取或设置硬盘参数,包括测试读性能以及缓存性能等。 在这篇指南中,你将会学到如何使用dd命令来测试硬盘性能。 ### 使用dd命令来监控硬盘的读写性能:### -- 打开shell终端(这里貌似不能翻译为终端提示符)。 -- 通过ssh登录到远程服务器。 +- 打开shell终端。 +- 或者通过ssh登录到远程服务器。 - 使用dd命令来测量服务器的吞吐率(写速度) `dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync` - 使用dd命令测量服务器延迟 `dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync` ####理解dd命令的选项### -在这个例子当中,我将使用搭载Ubuntu Linux 14.04 LTS系统的RAID-10(配有SAS SSD的Adaptec 5405Z)服务器阵列来运行。基本语法为: +在这个例子当中,我将使用搭载Ubuntu Linux 14.04 LTS系统的RAID-10(配有SAS SSD的Adaptec 5405Z)服务器阵列来运行。基本语法为: dd if=/dev/input.file of=/path/to/output.file bs=block-size count=number-of-blocks oflag=dsync ## GNU dd语法 ## @@ -29,18 +30,19 @@ 输出样例: ![Fig.01: Ubuntu Linux Server with RAID10 and testing server throughput with dd](http://s0.cyberciti.org/uploads/faq/2015/08/dd-server-test-io-speed-output.jpg) -Fig.01: 使用dd命令获取的服务器吞吐率 + +*图01: 使用dd命令获取的服务器吞吐率* 请各位注意在这个实验中,我们写入一个G的数据,可以发现,服务器的吞吐率是135 MB/s,这其中 -- `if=/dev/zero (if=/dev/input.file)` :用来设置dd命令读取的输入文件名。 -- `of=/tmp/test1.img (of=/path/to/output.file)` :dd命令将input.file写入的输出文件的名字。 -- `bs=1G (bs=block-size)` :设置dd命令读取的块的大小。例子中为1个G。 -- `count=1 (count=number-of-blocks)`: dd命令读取的块的个数。 -- `oflag=dsync (oflag=dsync)` :使用同步I/O。不要省略这个选项。这个选项能够帮助你去除caching的影响,以便呈现给你精准的结果。 +- `if=/dev/zero` (if=/dev/input.file) :用来设置dd命令读取的输入文件名。 +- `of=/tmp/test1.img` (of=/path/to/output.file):dd命令将input.file写入的输出文件的名字。 +- `bs=1G` (bs=block-size) :设置dd命令读取的块的大小。例子中为1个G。 +- `count=1` (count=number-of-blocks):dd命令读取的块的个数。 +- `oflag=dsync` (oflag=dsync) :使用同步I/O。不要省略这个选项。这个选项能够帮助你去除caching的影响,以便呈现给你精准的结果。 - `conv=fdatasyn`: 这个选项和`oflag=dsync`含义一样。 -在这个例子中,一共写了1000次,每次写入512字节来获得RAID10服务器的延迟时间: +在下面这个例子中,一共写了1000次,每次写入512字节来获得RAID10服务器的延迟时间: dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync @@ -50,11 +52,11 @@ Fig.01: 使用dd命令获取的服务器吞吐率 1000+0 records out 512000 bytes (512 kB) copied, 0.60362 s, 848 kB/s -请注意服务器的吞吐率以及延迟时间也取决于服务器/应用的加载。所以我推荐你在一个刚刚重启过并且处于峰值时间的服务器上来运行测试,以便得到更加准确的度量。现在你可以在你的所有设备上互相比较这些测试结果了。 +请注意服务器的吞吐率以及延迟时间也取决于服务器/应用的负载。所以我推荐你在一个刚刚重启过并且处于峰值时间的服务器上来运行测试,以便得到更加准确的度量。现在你可以在你的所有设备上互相比较这些测试结果了。 -####为什么服务器的吞吐率和延迟时间都这么差?### +###为什么服务器的吞吐率和延迟时间都这么差?### -低的数值并不意味着你在使用差劲的硬件。可能是HARDWARE RAID10的控制器缓存导致的。 +低的数值并不意味着你在使用差劲的硬件。可能是硬件 RAID10的控制器缓存导致的。 使用hdparm命令来查看硬盘缓存的读速度。 @@ -79,11 +81,12 @@ Fig.01: 使用dd命令获取的服务器吞吐率 输出样例: ![Fig.02: Linux hdparm command to test reading and caching disk performance](http://s0.cyberciti.org/uploads/faq/2015/08/hdparam-output.jpg) -Fig.02: 检测硬盘读入以及缓存性能的Linux hdparm命令 -请再一次注意由于文件文件操作的缓存属性,你将总是会看到很高的读速度。 +*图02: 检测硬盘读入以及缓存性能的Linux hdparm命令* -**使用dd命令来测试读入速度** +请再次注意,由于文件文件操作的缓存属性,你将总是会看到很高的读速度。 + +###使用dd命令来测试读取速度### 为了获得精确的读测试数据,首先在测试前运行下列命令,来将缓存设置为无效: @@ -91,11 +94,11 @@ Fig.02: 检测硬盘读入以及缓存性能的Linux hdparm命令 echo 3 | sudo tee /proc/sys/vm/drop_caches time time dd if=/path/to/bigfile of=/dev/null bs=8k -**笔记本上的示例** +####笔记本上的示例#### 运行下列命令: - ### Cache存在的Debian系统笔记本吞吐率### + ### 带有Cache的Debian系统笔记本吞吐率### dd if=/dev/zero of=/tmp/laptop.bin bs=1G count=1 oflag=direct ###使cache失效### @@ -104,10 +107,11 @@ Fig.02: 检测硬盘读入以及缓存性能的Linux hdparm命令 ###没有Cache的Debian系统笔记本吞吐率### dd if=/dev/zero of=/tmp/laptop.bin bs=1G count=1 oflag=direct -**苹果OS X Unix(Macbook pro)的例子** +####苹果OS X Unix(Macbook pro)的例子#### GNU dd has many more options but OS X/BSD and Unix-like dd command need to run as follows to test real disk I/O and not memory add sync option as follows: -GNU dd命令有其他许多选项但是在 OS X/BSD 以及类Unix中, dd命令需要像下面那样执行来检测去除掉内存地址同步的硬盘真实I/O性能: + +GNU dd命令有其他许多选项,但是在 OS X/BSD 以及类Unix中, dd命令需要像下面那样执行来检测去除掉内存地址同步的硬盘真实I/O性能: ## 运行这个命令2-3次来获得更好地结果 ### time sh -c "dd if=/dev/zero of=/tmp/testfile bs=100k count=1k && sync" @@ -124,26 +128,29 @@ GNU dd命令有其他许多选项但是在 OS X/BSD 以及类Unix中, dd命令 本人Macbook Pro的写速度是635346520字节(635.347MB/s)。 -**不喜欢用命令行?^_^** +###不喜欢用命令行?\^_^### 你可以在Linux或基于Unix的系统上使用disk utility(gnome-disk-utility)这款工具来得到同样的信息。下面的那个图就是在我的Fedora Linux v22 VM上截取的。 -**图形化方法** +####图形化方法#### 点击“Activites”或者“Super”按键来在桌面和Activites视图间切换。输入“Disks” ![Fig.03: Start the Gnome disk utility](http://s0.cyberciti.org/uploads/faq/2015/08/disk-1.jpg) -Fig.03: 打开Gnome硬盘工具 + +*图03: 打开Gnome硬盘工具* 在左边的面板上选择你的硬盘,点击configure按钮,然后点击“Benchmark partition”: ![Fig.04: Benchmark disk/partition](http://s0.cyberciti.org/uploads/faq/2015/08/disks-2.jpg) -Fig.04: 评测硬盘/分区 -最后,点击“Start Benchmark...”按钮(你可能被要求输入管理员用户名和密码): +*图04: 评测硬盘/分区* + +最后,点击“Start Benchmark...”按钮(你可能需要输入管理员用户名和密码): ![Fig.05: Final benchmark result](http://s0.cyberciti.org/uploads/faq/2015/08/disks-3.jpg) -Fig.05: 最终的评测结果 + +*图05: 最终的评测结果* 如果你要问,我推荐使用哪种命令和方法? @@ -158,7 +165,7 @@ via: http://www.cyberciti.biz/faq/howto-linux-unix-test-disk-performance-with-dd 作者:Vivek Gite 译者:[DongShuaike](https://github.com/DongShuaike) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 8e1b11caca9e5c6cf499f4f42bfabee5e8a3eca0 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 27 Aug 2015 23:14:15 +0800 Subject: [PATCH 1898/2517] PUB:20150821 Linux FAQs with Answers--How to check MariaDB server version @geekpi --- ...s with Answers--How to check MariaDB server version.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150821 Linux FAQs with Answers--How to check MariaDB server version.md (75%) diff --git a/translated/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md b/published/20150821 Linux FAQs with Answers--How to check MariaDB server version.md similarity index 75% rename from translated/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md rename to published/20150821 Linux FAQs with Answers--How to check MariaDB server version.md index 36ea2d15d6..899c2775de 100644 --- a/translated/tech/20150821 Linux FAQs with Answers--How to check MariaDB server version.md +++ b/published/20150821 Linux FAQs with Answers--How to check MariaDB server version.md @@ -1,8 +1,8 @@ -Linux有问必答--如何检查MatiaDB服务端版本 +Linux有问必答:如何检查MariaDB服务端版本 ================================================================================ > **提问**: 我使用的是一台运行MariaDB的VPS。我该如何检查MariaDB服务端的版本? -你需要知道数据库版本的情况有:当你生你数据库或者为服务器打补丁。这里有几种方法找出MariaDB版本的方法。 +有时候你需要知道你的数据库版本,比如当你升级你数据库或对已知缺陷打补丁时。这里有几种方法找出MariaDB版本的方法。 ### 方法一 ### @@ -16,7 +16,7 @@ Linux有问必答--如何检查MatiaDB服务端版本 ### 方法二 ### -如果你不能访问MariaDB,那么你就不能用第一种方法。这种情况下你可以根据MariaDB的安装包的版本来推测。这种方法只有在MariaDB通过包管理器安装的才有用。 +如果你不能访问MariaDB服务器,那么你就不能用第一种方法。这种情况下你可以根据MariaDB的安装包的版本来推测。这种方法只有在MariaDB通过包管理器安装的才有用。 你可以用下面的方法检查MariaDB的安装包。 @@ -42,7 +42,7 @@ via: http://ask.xmodulo.com/check-mariadb-server-version.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 966aeb1be5ec49ec838c8a90c934208a588b58c4 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 27 Aug 2015 23:34:29 +0800 Subject: [PATCH 1899/2517] Delete Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md --- ...Array and Removing Failed Disks in Raid.md | 180 ------------------ 1 file changed, 180 deletions(-) delete mode 100644 sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md diff --git a/sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md b/sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md deleted file mode 100644 index 76039f4371..0000000000 --- a/sources/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md +++ /dev/null @@ -1,180 +0,0 @@ -struggling 翻译中 -Growing an Existing RAID Array and Removing Failed Disks in Raid – Part 7 -================================================================================ -Every newbies will get confuse of the word array. Array is just a collection of disks. In other words, we can call array as a set or group. Just like a set of eggs containing 6 numbers. Likewise RAID Array contains number of disks, it may be 2, 4, 6, 8, 12, 16 etc. Hope now you know what Array is. - -Here we will see how to grow (extend) an existing array or raid group. For example, if we are using 2 disks in an array to form a raid 1 set, and in some situation if we need more space in that group, we can extend the size of an array using mdadm –grow command, just by adding one of the disk to the existing array. After growing (adding disk to an existing array), we will see how to remove one of the failed disk from array. - -![Grow Raid Array in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Growing-Raid-Array.jpg) - -Growing Raid Array and Removing Failed Disks - -Assume that one of the disk is little weak and need to remove that disk, till it fails let it under use, but we need to add one of the spare drive and grow the mirror before it fails, because we need to save our data. While the weak disk fails we can remove it from array this is the concept we are going to see in this topic. - -#### Features of RAID Growth #### - -- We can grow (extend) the size of any raid set. -- We can remove the faulty disk after growing raid array with new disk. -- We can grow raid array without any downtime. - -Requirements - -- To grow an RAID array, we need an existing RAID set (Array). -- We need extra disks to grow the Array. -- Here I’m using 1 disk to grow the existing array. - -Before we learn about growing and recovering of Array, we have to know about the basics of RAID levels and setups. Follow the below links to know about those setups. - -- [Understanding Basic RAID Concepts – Part 1][1] -- [Creating a Software Raid 0 in Linux – Part 2][2] - -#### My Server Setup #### - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.230 - Hostname : grow.tecmintlocal.com - 2 Existing Disks : 1 GB - 1 Additional Disk : 1 GB - -Here, my already existing RAID has 2 number of disks with each size is 1GB and we are now adding one more disk whose size is 1GB to our existing raid array. - -### Growing an Existing RAID Array ### - -1. Before growing an array, first list the existing Raid array using the following command. - - # mdadm --detail /dev/md0 - -![Check Existing Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Existing-Raid-Array.png) - -Check Existing Raid Array - -**Note**: The above output shows that I’ve already has two disks in Raid array with raid1 level. Now here we are adding one more disk to an existing array, - -2. Now let’s add the new disk “sdd” and create a partition using ‘fdisk‘ command. - - # fdisk /dev/sdd - -Please use the below instructions to create a partition on /dev/sdd drive. - -- Press ‘n‘ for creating new partition. -- Then choose ‘P‘ for Primary partition. -- Then choose ‘1‘ to be the first partition. -- Next press ‘p‘ to print the created partition. -- Here, we are selecting ‘fd‘ as my type is RAID. -- Next press ‘p‘ to print the defined partition. -- Then again use ‘p‘ to print the changes what we have made. -- Use ‘w‘ to write the changes. - -![Create New Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Create-New-sdd-Partition.png) - -Create New sdd Partition - -3. Once new sdd partition created, you can verify it using below command. - - # ls -l /dev/ | grep sd - -![Confirm sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-sdd-Partition.png) - -Confirm sdd Partition - -4. Next, examine the newly created disk for any existing raid, before adding to the array. - - # mdadm --examine /dev/sdd1 - -![Check Raid on sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-sdd-Partition.png) - -Check Raid on sdd Partition - -**Note**: The above output shows that the disk has no super-blocks detected, means we can move forward to add a new disk to an existing array. - -4. To add the new partition /dev/sdd1 in existing array md0, use the following command. - - # mdadm --manage /dev/md0 --add /dev/sdd1 - -![Add Disk To Raid-Array](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Disk-To-Raid-Array.png) - -Add Disk To Raid-Array - -5. Once the new disk has been added, check for the added disk in our array using. - - # mdadm --detail /dev/md0 - -![Confirm Disk Added to Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-Disk-Added-To-Raid.png) - -Confirm Disk Added to Raid - -**Note**: In the above output, you can see the drive has been added as a spare. Here, we already having 2 disks in the array, but what we are expecting is 3 devices in array for that we need to grow the array. - -6. To grow the array we have to use the below command. - - # mdadm --grow --raid-devices=3 /dev/md0 - -![Grow Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Grow-Raid-Array.png) - -Grow Raid Array - -Now we can see the third disk (sdd1) has been added to array, after adding third disk it will sync the data from other two disks. - - # mdadm --detail /dev/md0 - -![Confirm Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-Raid-Array.png) - -Confirm Raid Array - -**Note**: For large size disk it will take hours to sync the contents. Here I have used 1GB virtual disk, so its done very quickly within seconds. - -### Removing Disks from Array ### - -7. After the data has been synced to new disk ‘sdd1‘ from other two disks, that means all three disks now have same contents. - -As I told earlier let’s assume that one of the disk is weak and needs to be removed, before it fails. So, now assume disk ‘sdc1‘ is weak and needs to be removed from an existing array. - -Before removing a disk we have to mark the disk as failed one, then only we can able to remove it. - - # mdadm --fail /dev/md0 /dev/sdc1 - # mdadm --detail /dev/md0 - -![Disk Fail in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Disk-Fail-in-Raid-Array.png) - -Disk Fail in Raid Array - -From the above output, we clearly see that the disk was marked as faulty at the bottom. Even its faulty, we can see the raid devices are 3, failed 1 and state was degraded. - -Now we have to remove the faulty drive from the array and grow the array with 2 devices, so that the raid devices will be set to 2 devices as before. - - # mdadm --remove /dev/md0 /dev/sdc1 - -![Remove Disk in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Remove-Disk-in-Raid-Array.png) - -Remove Disk in Raid Array - -8. Once the faulty drive is removed, now we’ve to grow the raid array using 2 disks. - - # mdadm --grow --raid-devices=2 /dev/md0 - # mdadm --detail /dev/md0 - -![Grow Disks in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Grow-Disks-in-Raid-Array.png) - -Grow Disks in Raid Array - -From the about output, you can see that our array having only 2 devices. If you need to grow the array again, follow the same steps as described above. If you need to add a drive as spare, mark it as spare so that if the disk fails, it will automatically active and rebuild. - -### Conclusion ### - -In the article, we’ve seen how to grow an existing raid set and how to remove a faulty disk from an array after re-syncing the existing contents. All these steps can be done without any downtime. During data syncing, system users, files and applications will not get affected in any case. - -In next, article I will show you how to manage the RAID, till then stay tuned to updates and don’t forget to add your comments. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/grow-raid-array-in-linux/ - -作者:[Babin Lonston][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/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/create-raid0-in-linux/ \ No newline at end of file From 436e11b38c5e15bf85beee1c5a89187fa6d2261f Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 27 Aug 2015 23:35:02 +0800 Subject: [PATCH 1900/2517] Create Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md --- ...Array and Removing Failed Disks in Raid.md | 182 ++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 translated/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md diff --git a/translated/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md b/translated/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md new file mode 100644 index 0000000000..94d18edde2 --- /dev/null +++ b/translated/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md @@ -0,0 +1,182 @@ + +在 Raid 中扩展现有的 RAID 阵列和删除故障的磁盘 - 第7部分 +================================================================================ +每个新手都会对阵列的意思产生疑惑。阵列只是磁盘的一个集合。换句话说,我们可以称阵列为一个集合或一组。就像一组鸡蛋中包含6个。同样 RAID 阵列中包含着多个磁盘,可能是2,4,6,8,12,16等,希望你现在知道了什么是阵列。 + +在这里,我们将看到如何扩展现有的阵列或 raid 组。例如,如果我们在一组 raid 中使用2个磁盘形成一个 raid 1,在某些情况,如果该组中需要更多的空间,就可以使用mdadm -grow 命令来扩展阵列大小,只是将一个磁盘加入到现有的阵列中。在扩展(添加磁盘到现有的阵列中)后,我们将看看如何从阵列中删除故障的磁盘。 + +![Grow Raid Array in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Growing-Raid-Array.jpg) + +扩展 RAID 阵列和删除故障的磁盘 + +假设磁盘中的一个有问题了需要删除该磁盘,但我们需要添加一个备用磁盘来扩展该镜像再删除磁盘前,因为我们需要保存数据。当磁盘发生故障时我们需要从阵列中删除它,这是这个主题中我们将要学习到的。 + +#### 扩展 RAID 的特性 #### + +- 我们可以增加(扩大)所有 RAID 集和的大小。 +- 我们在使用新磁盘扩展 RAID 阵列后删除故障的磁盘。 +- 我们可以扩展 RAID 阵列不存在宕机时间。 + +要求 + +- 为了扩展一个RAID阵列,我们需要已有的 RAID 组(阵列)。 +- 我们需要额外的磁盘来扩展阵列。 +- 在这里,我们使用一块磁盘来扩展现有的阵列。 + +在我们了解扩展和恢复阵列前,我们必须了解有关 RAID 级别和设置的基本知识。点击下面的链接了解这些。 + +- [理解 RAID 的基础概念 – 第一部分][1] +- [在 Linux 中创建软件 Raid 0 – 第二部分][2] + +#### 我的服务器设置 #### + + 操作系统 : CentOS 6.5 Final +  IP地址 : 192.168.0.230 +  主机名 : grow.tecmintlocal.com + 2 块现有磁盘 : 1 GB + 1 块额外磁盘 : 1 GB + +在这里,现有的 RAID 有2块磁盘,每个大小为1GB,我们现在再增加一个磁盘到我们现有的 RAID 阵列中,其大小为1GB。 + +### 扩展现有的 RAID 阵列 ### + +1. 在扩展阵列前,首先使用下面的命令列出现有的 RAID 阵列。 + + # mdadm --detail /dev/md0 + +![Check Existing Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Existing-Raid-Array.png) + +检查现有的 RAID 阵列 + +**注意**: 以上输出显示,已经有了两个磁盘在 RAID 阵列中,级别为 RAID 1。现在我们在这里再增加一个磁盘到现有的阵列。 + +2.现在让我们添加新的磁盘“sdd”,并使用‘fdisk‘命令来创建分区。 + + # fdisk /dev/sdd + +请使用以下步骤为 /dev/sdd 创建一个新的分区。 + +- 按 ‘n’ 创建新的分区。 +- 然后按 ‘P’ 选择主分区。 +- 接下来选择分区号为1。 +- 只需按两次回车键选择默认值即可。 +- 然后,按 ‘P’ 来打印创建好的分区。 +- 按 ‘L’,列出所有可用的类型。 +- 按 ‘t’ 去修改分区。 +- 键入 ‘fd’ 设置为 Linux 的 RAID 类型,然后按 Enter 确认。 +- 然后再次使用‘p’查看我们所做的更改。 +- 使用‘w’保存更改。 + +![Create New Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Create-New-sdd-Partition.png) + +为 sdd 创建新的分区 + +3. 一旦新的 sdd 分区创建完成后,你可以使用下面的命令验证它。 + + # ls -l /dev/ | grep sd + +![Confirm sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-sdd-Partition.png) + +确认 sdd 分区 + +4.接下来,在添加到阵列前先检查磁盘是否有 RAID 分区。 + + # mdadm --examine /dev/sdd1 + +![Check Raid on sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-sdd-Partition.png) + +在 sdd 分区中检查 raid + +**注意**:以上输出显示,该盘有没有发现 super-blocks,意味着我们可以将新的磁盘添加到现有阵列。 + +4. 要添加新的分区 /dev/sdd1 到现有的阵列 md0,请使用以下命令。 + + # mdadm --manage /dev/md0 --add /dev/sdd1 + +![Add Disk To Raid-Array](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Disk-To-Raid-Array.png) + +添加磁盘到 Raid 阵列 + +5. 一旦新的磁盘被添加后,在我们的阵列中检查新添加的磁盘。 + + # mdadm --detail /dev/md0 + +![Confirm Disk Added to Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-Disk-Added-To-Raid.png) + +确认将新磁盘添加到 Raid 中 + +**注意**: 在上面的输出,你可以看到磁盘已经被添加作为备用的。在这里,我们的阵列中已经有了2个磁盘,但我们期待阵列中有3个磁盘,因此我们需要扩展阵列。 + +6. 要扩展阵列,我们需要使用下面的命令。 + + # mdadm --grow --raid-devices=3 /dev/md0 + +![Grow Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Grow-Raid-Array.png) + +扩展 Raid 阵列 + +现在我们可以看到第三块磁盘(sdd1)已被添加到阵列中,在第三块磁盘被添加后,它将从另外两块磁盘上同步数据。 + + # mdadm --detail /dev/md0 + +![Confirm Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-Raid-Array.png) + +确认 Raid 阵列 + +**注意**: 对于容量磁盘会需要几个小时来同步数据。在这里,我们使用的是1GB的虚拟磁盘,所以它非常快在几秒钟内便会完成。 + +### 从阵列中删除磁盘 ### + +7. 在数据被从其他两个磁盘同步到新磁盘‘sdd1‘后,现在三个磁盘中的数据已经相同了。 + +正如我前面所说的,假定一个磁盘出问题了需要被删除。所以,现在假设磁盘‘sdc1‘出问题了,需要从现有阵列中删除。 + +在删除磁盘前我们要将其标记为 failed,然后我们才可以将其删除。 + + # mdadm --fail /dev/md0 /dev/sdc1 + # mdadm --detail /dev/md0 + +![Disk Fail in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Disk-Fail-in-Raid-Array.png) + +在 Raid 阵列中模拟磁盘故障 + +从上面的输出中,我们清楚地看到,磁盘在底部被标记为 faulty。即使它是 faulty 的,我们仍然可以看到 raid 设备有3个,1个损坏了 state 是 degraded。 + +现在我们要从阵列中删除 faulty 的磁盘,raid 设备将像之前一样继续有2个设备。 + + # mdadm --remove /dev/md0 /dev/sdc1 + +![Remove Disk in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Remove-Disk-in-Raid-Array.png) + +在 Raid 阵列中删除磁盘 + +8. 一旦故障的磁盘被删除,然后我们只能使用2个磁盘来扩展 raid 阵列了。 + + # mdadm --grow --raid-devices=2 /dev/md0 + # mdadm --detail /dev/md0 + +![Grow Disks in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Grow-Disks-in-Raid-Array.png) + +在 RAID 阵列扩展磁盘 + +从上面的输出中可以看到,我们的阵列中仅有2台设备。如果你需要再次扩展阵列,按照同样的步骤,如上所述。如果你需要添加一个磁盘作为备用,将其标记为 spare,因此,如果磁盘出现故障时,它会自动顶上去并重建数据。 + +### 结论 ### + +在这篇文章中,我们已经看到了如何扩展现有的 RAID 集合,以及如何从一个阵列中删除故障磁盘在重新同步已有磁盘的数据后。所有这些步骤都可以不用停机来完成。在数据同步期间,系统用户,文件和应用程序不会受到任何影响。 + +在接下来的文章我将告诉你如何管理 RAID,敬请关注更新,不要忘了写评论。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/grow-raid-array-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/create-raid0-in-linux/ From 7ae7928abc2cdd47f7e3dabe8cc03a735da4cdad Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 27 Aug 2015 23:35:46 +0800 Subject: [PATCH 1901/2517] PUB:20150818 How to monitor stock quotes from the command line on Linux @GOLinux --- ...ock quotes from the command line on Linux.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150818 How to monitor stock quotes from the command line on Linux.md (75%) diff --git a/translated/tech/20150818 How to monitor stock quotes from the command line on Linux.md b/published/20150818 How to monitor stock quotes from the command line on Linux.md similarity index 75% rename from translated/tech/20150818 How to monitor stock quotes from the command line on Linux.md rename to published/20150818 How to monitor stock quotes from the command line on Linux.md index c2a9e5d576..53be8376a4 100644 --- a/translated/tech/20150818 How to monitor stock quotes from the command line on Linux.md +++ b/published/20150818 How to monitor stock quotes from the command line on Linux.md @@ -1,18 +1,19 @@ Linux中通过命令行监控股票报价 ================================================================================ -如果你是那些股票投资者或者交易者中的一员,那么监控证券市场将成为你日常工作中的其中一项任务。最有可能是你会使用一个在线交易平台,这个平台有着一些漂亮的实时图表和全部种类的高级股票分析和交易工具。虽然这种复杂的市场研究工具是任何严肃的证券投资者阅读市场的必备,但是监控最新的股票报价来构建有利可图的投资组合仍然有很长一段路要走。 -如果你是一位长久坐在终端前的全职系统管理员,而证券交易又成了你日常生活中的业余兴趣,那么一个简单地显示实时股票报价的命令行工具会是你的恩赐。 +如果你是那些股票投资者或者交易者中的一员,那么监控证券市场将是你的日常工作之一。最有可能的是你会使用一个在线交易平台,这个平台有着一些漂亮的实时图表和全部种类的高级股票分析和交易工具。虽然这种复杂的市场研究工具是任何严肃的证券投资者了解市场的必备工具,但是监控最新的股票报价来构建有利可图的投资组合仍然有很长一段路要走。 + +如果你是一位长久坐在终端前的全职系统管理员,而证券交易又成了你日常生活中的业余兴趣,那么一个简单地显示实时股票报价的命令行工具会是给你的恩赐。 在本教程中,让我来介绍一个灵巧而简洁的命令行工具,它可以让你在Linux上从命令行监控股票报价。 这个工具叫做[Mop][1]。它是用GO编写的一个轻量级命令行工具,可以极其方便地跟踪来自美国市场的最新股票报价。你可以很轻松地自定义要监控的证券列表,它会在一个基于ncurses的便于阅读的界面显示最新的股票报价。 -**注意**:Mop是通过雅虎金融API获取最新的股票报价的。你必须意识到,他们的的股票报价已知会有15分钟的延时。所以,如果你正在寻找0延时的“实时”股票报价,那么Mop就不是你的菜了。这种“现场”股票报价订阅通常可以通过向一些不开放的私有接口付费获取。对于上面讲得,让我们来看看怎样在Linux环境下使用Mop吧。 +**注意**:Mop是通过雅虎金融API获取最新的股票报价的。你必须意识到,他们的的股票报价已知会有15分钟的延时。所以,如果你正在寻找0延时的“实时”股票报价,那么Mop就不是你的菜了。这种“现场”股票报价订阅通常可以通过向一些不开放的私有接口付费获取。了解这些之后,让我们来看看怎样在Linux环境下使用Mop吧。 ### 安装 Mop 到 Linux ### -由于Mop部署在Go中,你首先需要安装Go语言。如果你还没有安装Go,请参照[此指南][2]将Go安装到你的Linux平台中。请确保按指南中所讲的设置GOPATH环境变量。 +由于Mop是用Go实现的,你首先需要安装Go语言。如果你还没有安装Go,请参照[此指南][2]将Go安装到你的Linux平台中。请确保按指南中所讲的设置GOPATH环境变量。 安装完Go后,继续像下面这样安装Mop。 @@ -42,7 +43,7 @@ Linux中通过命令行监控股票报价 ### 使用Mop来通过命令行监控股票报价 ### -要启动Mop,只需运行名为cmd的命令。 +要启动Mop,只需运行名为cmd的命令(LCTT 译注:这名字实在是……)。 $ cmd @@ -50,7 +51,7 @@ Linux中通过命令行监控股票报价 ![](https://farm6.staticflickr.com/5749/20018949104_c8c64e0e06_c.jpg) -报价显示了像最新价格、交易百分比、每日低/高、52周低/高、股利以及年产量等信息。Mop从[CNN][3]获取市场总览信息,从[雅虎金融][4]获得个股报价,股票报价信息它自己会在终端内周期性更新。 +报价显示了像最新价格、交易百分比、每日低/高、52周低/高、股息以及年收益率等信息。Mop从[CNN][3]获取市场总览信息,从[雅虎金融][4]获得个股报价,股票报价信息它自己会在终端内周期性更新。 ### 自定义Mop中的股票报价 ### @@ -78,7 +79,7 @@ Linux中通过命令行监控股票报价 ### 尾声 ### -正如你所见,Mop是一个轻量级的,然而极其方便的证券监控工具。当然,你可以很轻松地从其它别的什么地方,从在线站点,你的智能手机等等访问到股票报价信息。然而,如果你在终端环境中花费大量时间,Mop可以很容易地适应你的工作空间,希望没有让你过多地从你的公罗流程中分心。只要让它在你其中一个终端中运行并保持市场日期持续更新,就让它在那干着吧。 +正如你所见,Mop是一个轻量级的,然而极其方便的证券监控工具。当然,你可以很轻松地从其它别的什么地方,从在线站点,你的智能手机等等访问到股票报价信息。然而,如果你在整天使用终端环境,Mop可以很容易地适应你的工作环境,希望没有让你过多地从你的工作流程中分心。只要让它在你其中一个终端中运行并保持市场日期持续更新,那就够了。 交易快乐! @@ -88,7 +89,7 @@ via: http://xmodulo.com/monitor-stock-quotes-command-line-linux.html 作者:[Dan Nanni][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From b36ab92cb463c9c947bb4070a29c89a11247f4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Fri, 28 Aug 2015 02:46:10 +0800 Subject: [PATCH 1902/2517] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E3=80=91RHCSA=20Series--Part=2007?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成第七篇 --- ...Lists) and Mounting Samba or NFS Shares.md | 192 ++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md diff --git a/translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md new file mode 100644 index 0000000000..a9c56b1cbe --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md @@ -0,0 +1,192 @@ +[xiqingongzi Translating] +RHCSA Series: Using ACLs (Access Control Lists) and Mounting Samba / NFS Shares – Part 7 +================================================================================ +在第六篇文章的最后,我们开始解释如何使用parted和SSM 设置和配置本地文件存储([RHCSA series Part 6][1]) + +![Configure ACL's and Mounting NFS / Samba Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ACLs-and-Mounting-NFS-Samba-Shares.png) + +RHCSA系列::第七章 ACL的配置和安装NFS/Samba文件分享系统 + +我们还讨论了如何创建和在启动启动时用密码挂载加密逻辑卷。另外,我们要提醒您要避免在安装 在管理操作系统的存储文件系统事执行关键的操作。接下来我们要回顾在红帽Linux 7 中常用的文件系统格式然后卸载和挂载网络文件系统(CIFS和NFS), +#### 前提 #### + +在开始之前,请确保你有一个线上Samba服务器和一个线上NFS服务器(RHEL7 将很快不支持 NFS V2) + +在这个指南中,我们将使用一个IP为192.168.0.10的机器作为服务端,RHEL7 盒子作为客户端,IP为192.168.0.18,稍后我们会告诉你该安装哪些软件包。 + +### RHEL7中的文件格式 ### + +从RHEL7 开始,XFS 因为其高可用性和可拓展性被设置为所有架构的默认文件系统。目前,红帽和合作伙伴测试的主流硬件线上他支持最大500TB 每个文件系统。 +同时,XFS使user_xattr(扩展用户属性)和ACL(POSIX访问控制列表)作为默认的挂载选项,不像ext3或ext4(ext2在RHEL 7中是过时的),这意味着你不需要明确的指定命令行选项或在/etc/fstab挂载时XFS文件系统(如果你想禁用在后一种情况下,这样的选择你要明确使用no_acl和no_user_xattr)。 +记住,扩展用户属性可以指定文件和目录用于存储任意等附加信息的MIME类型,字符集或文件的编码,而对用户属性的访问权限由普通文件权限位的定义。 +#### 权限控制列表 #### + +每一个系统管理员,无论新手还是专家,都熟悉文件和目录的权限和许可。它能制定特定的权限(读,写和执行)的所有者,属组,和其他的正常访问权限。如果需要,可以回去看看 [Part 3 of the RHCSA series][2] +然而,由于标准的 ugo/rwx 设置不允许配置不同用户不同权限,所以ACL可以比一般规定更多的文件和目录权限。 +事实上,ACL定义的权限是文件权限的一个超集,我们来看一下在真正的场景下是如何转换的。 +1. 有两种类型:访问ACL (可以适用于任何一个特定的文件或目录),也是默认的ACL,它只能应用于目录。如果文件包含在其中没有ACL设置,他们继承父目录的默认ACL。 +2. 首先,ACL可以配置每个用户,每个组,或不在组内的用户拥有文件。 +3。设置ACL(和删除)使用setfacl,分别使用M或X选项。 +例如,让我们创建一个组名为tecmint和添加用户johndoe和davenull: + # groupadd tecmint + # useradd johndoe + # useradd davenull + # usermod -a -G tecmint johndoe + # usermod -a -G tecmint davenull + +让我们确认用户属于组tecmint: + + # id johndoe + # id davenull + +![Verify Users](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Users.png) + +验证用户 + +Let’s now create a directory called playground within /mnt, and a file named testfile.txt inside. We will set the group owner to tecmint and change its default ugo/rwx permissions to 770 (read, write, and execute permissions granted to both the owner and the group owner of the file): +现在让我们创建一个在/mnt下的目录名为playground,和一个名叫testfile.txt文件。我们将tecmint和更改其默认 ugo/rwx 权限为 770组所有者(读,写,和执行给予属主和属组所有者权限): + # mkdir /mnt/playground + # touch /mnt/playground/testfile.txt + # chmod 770 /mnt/playground/testfile.txt + +然后切换用户johndoe和davenull,按照这个顺序,并写入文件: + + echo "My name is John Doe" > /mnt/playground/testfile.txt + echo "My name is Dave Null" >> /mnt/playground/testfile.txt + +到目前为止很好。现在,让我们的用户gacanepa写入文件–和写操作,可以预料到出现的结果。 + +但如果我们真的需要用户gacanepa(不是tecmint组的成员)有/mnt/playground/testfile.txt的写入权限。首先,可能是你的想法是添加用户帐户组tecmint。但这会给他写上所有文件的权限,写入的是该组的权限,我们不希望这样。我们只希望他能写/mnt/playground/ testfile.txt。 + + # touch /mnt/playground/testfile.txt + # chown :tecmint /mnt/playground/testfile.txt + # chmod 777 /mnt/playground/testfile.txt + # su johndoe + $ echo "My name is John Doe" > /mnt/playground/testfile.txt + $ su davenull + $ echo "My name is Dave Null" >> /mnt/playground/testfile.txt + $ su gacanepa + $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt + +![Manage User Permissions](http://www.tecmint.com/wp-content/uploads/2015/04/User-Permissions.png) + +管理用户权限 + +让我们给用户gacanepa添加/mnt/playground/testfile.txt的读写权限 +在root下执行 + + # setfacl -R -m u:gacanepa:rwx /mnt/playground + +您已经成功添加了一个ACL允许gacanepa写入测试文件。然后切换到用户gacanepa试图写入文件: + + $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt + +要查看特定的文件或目录的ACL,使用getfacl: + + # getfacl /mnt/playground/testfile.txt + +![Check ACLs of Files](http://www.tecmint.com/wp-content/uploads/2015/04/Check-ACL-of-File.png) + +检查文件的ACLs + +设置默认ACL目录(它的内容将会继承除非被覆盖),添加d:以前的规则并且指定一个文件名来替代 + # setfacl -m d:o:r /mnt/playground + +以上的ACL将允许用户不在属组属主有/mnt/playground的读权限。注意在getfacl /mnt/playground 之前和之后的改变输出的差异: +![Set Default ACL in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Set-Default-ACL-in-Linux.png) + +Set Default ACL in Linux + +[Chapter 20 in the official RHEL 7 Storage Administration Guide][3] 提供了更多ACL的例子,我强烈推荐你去读读它,参考起来非常方便。 + +#### 安装NFS网络共享 #### + +显示在你的服务器的NFS共享可用的列表,您可以使用showmount命令与E选项,其次是机器名或IP地址。这个工具包含在NFS utils包: + + # yum update && yum install nfs-utils + +然后: + + # showmount -e 192.168.0.10 + +你会得到一个列表的可用的NFS分享192.168.0.10: +![Check Available NFS Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Mount-NFS-Shares.png) + +Check Available NFS Shares + +在使用命令行对必要的本地客户端挂载NFS网络共享,使用以下语法: + + # mount -t nfs -o [options] remote_host:/remote/directory /local/directory + +在我们的例子中,翻译成: + + # mount -t nfs 192.168.0.10:/NFS-SHARE /mnt/nfs + +如果您收到一下错误消息:"rpc-statd.service工作失败,看 “systemctl status rpc-statd.service” 和“journalctl -xn” 获取详细信息.确保你的rpcbind服务在开机时开启。 + # systemctl enable rpcbind.socket + # systemctl restart rpcbind.service + +然后重新启动。这应该做的技巧,你将能够挂载NFS共享就和前面所解释的那样。如果你需要安装NFS共享的自动引导系统,添加一个有效的条目到/etc/fstab文件: + + 远程主机:远程目录 本地目录 nfs 选项 0 0 + +变量远程主机, 远程目录, 本地目录, and 选项 (可选的)在我们手动挂载是谁同样的,就和我们之前的例子一样。 + + 192.168.0.10:/NFS-SHARE /mnt/nfs nfs defaults 0 0 + +#### 挂载 Samba 网络文件共享 #### + +Samba 代表选择可以在×nix和Windows之间进行网络共享的工具.使用Samba客户端包内的 smbclient 命令 加 -L 参数来展示 Samba 文件分享,其次是机器名或IP地址 +将会提示你输入远程主机上的密码: + # smbclient -L 192.168.0.10 + +![Check Samba Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Samba-Shares.png) + +Check Samba Shares + +在本地客户端,你需要首先安装CIFS utils来挂载Samba: + + # yum update && yum install cifs-utils + +然后在命令行上使用下面的语法: + + # mount -t cifs -o credentials=/path/to/credentials/file //remote_host/samba_share /local/directory + +在我们的例子中,翻译成: + + # mount -t cifs -o credentials=~/.smbcredentials //192.168.0.10/gacanepa /mnt/samba + +smbcredentials内容为: + + username=gacanepa + password=XXXXXX + +是一个隐藏文件在root的主目录(/root/),权限设置为600,因此,除了该文件的所有者可以读或写,没有人能够读写。 +请注意,samba_share是Samba共享的名字就像 smbclient -L remote_host 返回的那样 + +现在,如果你需要samba共享可自动在系统启动时,添加一个有效的条目/etc/fstab文件如下: + + //远程主机:/samba_share 本地目录 cifs 选项 0 0 + +变量 远程主机, /samba_share, 本地目录, 选项 (可选的) 和我们手动安装的意义一样 + + //192.168.0.10/gacanepa /mnt/samba cifs credentials=/root/smbcredentials,defaults 0 0 + +### 结论 ### + +在这篇文章中我们已经讲解了如何在Linux设置ACL,并探讨RHEL7中该如何挂载CIFS和NFS网络共享。 +我建议你去实践这些概念,甚至把它们一起安装(先尝试安装网络共享设置ACL)如果你有疑问或意见,请随时使用下面的表格,随时与我们联系。还可以通过你的社交网络来分享这篇文章。 +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/ + +作者:[Gabriel Cánepa][a] +译者:[xiqingongzi](https://github.com/xiqingongzi) +校对:[校对者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/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ +[2]:http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ +[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html From 4180b6aa1f70ff8fe1852ce8c2eb19fd8195123c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Fri, 28 Aug 2015 02:46:32 +0800 Subject: [PATCH 1903/2517] Delete RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md --- ...Lists) and Mounting Samba or NFS Shares.md | 213 ------------------ 1 file changed, 213 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md deleted file mode 100644 index f8d9d45d27..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md +++ /dev/null @@ -1,213 +0,0 @@ -[xiqingongzi Translating] -RHCSA Series: Using ACLs (Access Control Lists) and Mounting Samba / NFS Shares – Part 7 -================================================================================ -In the last article ([RHCSA series Part 6][1]) we started explaining how to set up and configure local system storage using parted and ssm. - -![Configure ACL's and Mounting NFS / Samba Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ACLs-and-Mounting-NFS-Samba-Shares.png) - -RHCSA Series:: Configure ACL’s and Mounting NFS / Samba Shares – Part 7 - -We also discussed how to create and mount encrypted volumes with a password during system boot. In addition, we warned you to avoid performing critical storage management operations on mounted filesystems. With that in mind we will now review the most used file system formats in Red Hat Enterprise Linux 7 and then proceed to cover the topics of mounting, using, and unmounting both manually and automatically network filesystems (CIFS and NFS), along with the implementation of access control lists for your system. - -#### Prerequisites #### - -Before proceeding further, please make sure you have a Samba server and a NFS server available (note that NFSv2 is no longer supported in RHEL 7). - -During this guide we will use a machine with IP 192.168.0.10 with both services running in it as server, and a RHEL 7 box as client with IP address 192.168.0.18. Later in the article we will tell you which packages you need to install on the client. - -### File System Formats in RHEL 7 ### - -Beginning with RHEL 7, XFS has been introduced as the default file system for all architectures due to its high performance and scalability. It currently supports a maximum filesystem size of 500 TB as per the latest tests performed by Red Hat and its partners for mainstream hardware. - -Also, XFS enables user_xattr (extended user attributes) and acl (POSIX access control lists) as default mount options, unlike ext3 or ext4 (ext2 is considered deprecated as of RHEL 7), which means that you don’t need to specify those options explicitly either on the command line or in /etc/fstab when mounting a XFS filesystem (if you want to disable such options in this last case, you have to explicitly use no_acl and no_user_xattr). - -Keep in mind that the extended user attributes can be assigned to files and directories for storing arbitrary additional information such as the mime type, character set or encoding of a file, whereas the access permissions for user attributes are defined by the regular file permission bits. - -#### Access Control Lists #### - -As every system administrator, either beginner or expert, is well acquainted with regular access permissions on files and directories, which specify certain privileges (read, write, and execute) for the owner, the group, and “the world” (all others). However, feel free to refer to [Part 3 of the RHCSA series][2] if you need to refresh your memory a little bit. - -However, since the standard ugo/rwx set does not allow to configure different permissions for different users, ACLs were introduced in order to define more detailed access rights for files and directories than those specified by regular permissions. - -In fact, ACL-defined permissions are a superset of the permissions specified by the file permission bits. Let’s see how all of this translates is applied in the real world. - -1. There are two types of ACLs: access ACLs, which can be applied to either a specific file or a directory), and default ACLs, which can only be applied to a directory. If files contained therein do not have a ACL set, they inherit the default ACL of their parent directory. - -2. To begin, ACLs can be configured per user, per group, or per an user not in the owning group of a file. - -3. ACLs are set (and removed) using setfacl, with either the -m or -x options, respectively. - -For example, let us create a group named tecmint and add users johndoe and davenull to it: - - # groupadd tecmint - # useradd johndoe - # useradd davenull - # usermod -a -G tecmint johndoe - # usermod -a -G tecmint davenull - -And let’s verify that both users belong to supplementary group tecmint: - - # id johndoe - # id davenull - -![Verify Users](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Users.png) - -Verify Users - -Let’s now create a directory called playground within /mnt, and a file named testfile.txt inside. We will set the group owner to tecmint and change its default ugo/rwx permissions to 770 (read, write, and execute permissions granted to both the owner and the group owner of the file): - - # mkdir /mnt/playground - # touch /mnt/playground/testfile.txt - # chmod 770 /mnt/playground/testfile.txt - -Then switch user to johndoe and davenull, in that order, and write to the file: - - echo "My name is John Doe" > /mnt/playground/testfile.txt - echo "My name is Dave Null" >> /mnt/playground/testfile.txt - -So far so good. Now let’s have user gacanepa write to the file – and the write operation will, which was to be expected. - -But what if we actually need user gacanepa (who is not a member of group tecmint) to have write permissions on /mnt/playground/testfile.txt? The first thing that may come to your mind is adding that user account to group tecmint. But that will give him write permissions on ALL files were the write bit is set for the group, and we don’t want that. We only want him to be able to write to /mnt/playground/testfile.txt. - - # touch /mnt/playground/testfile.txt - # chown :tecmint /mnt/playground/testfile.txt - # chmod 777 /mnt/playground/testfile.txt - # su johndoe - $ echo "My name is John Doe" > /mnt/playground/testfile.txt - $ su davenull - $ echo "My name is Dave Null" >> /mnt/playground/testfile.txt - $ su gacanepa - $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt - -![Manage User Permissions](http://www.tecmint.com/wp-content/uploads/2015/04/User-Permissions.png) - -Manage User Permissions - -Let’s give user gacanepa read and write access to /mnt/playground/testfile.txt. - -Run as root, - - # setfacl -R -m u:gacanepa:rwx /mnt/playground - -and you’ll have successfully added an ACL that allows gacanepa to write to the test file. Then switch to user gacanepa and try to write to the file again: - - $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt - -To view the ACLs for a specific file or directory, use getfacl: - - # getfacl /mnt/playground/testfile.txt - -![Check ACLs of Files](http://www.tecmint.com/wp-content/uploads/2015/04/Check-ACL-of-File.png) - -Check ACLs of Files - -To set a default ACL to a directory (which its contents will inherit unless overwritten otherwise), add d: before the rule and specify a directory instead of a file name: - - # setfacl -m d:o:r /mnt/playground - -The ACL above will allow users not in the owner group to have read access to the future contents of the /mnt/playground directory. Note the difference in the output of getfacl /mnt/playground before and after the change: - -![Set Default ACL in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Set-Default-ACL-in-Linux.png) - -Set Default ACL in Linux - -[Chapter 20 in the official RHEL 7 Storage Administration Guide][3] provides more ACL examples, and I highly recommend you take a look at it and have it handy as reference. - -#### Mounting NFS Network Shares #### - -To show the list of NFS shares available in your server, you can use the showmount command with the -e option, followed by the machine name or its IP address. This tool is included in the nfs-utils package: - - # yum update && yum install nfs-utils - -Then do: - - # showmount -e 192.168.0.10 - -and you will get a list of the available NFS shares on 192.168.0.10: - -![Check Available NFS Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Mount-NFS-Shares.png) - -Check Available NFS Shares - -To mount NFS network shares on the local client using the command line on demand, use the following syntax: - - # mount -t nfs -o [options] remote_host:/remote/directory /local/directory - -which, in our case, translates to: - - # mount -t nfs 192.168.0.10:/NFS-SHARE /mnt/nfs - -If you get the following error message: “Job for rpc-statd.service failed. See “systemctl status rpc-statd.service” and “journalctl -xn” for details.”, make sure the rpcbind service is enabled and started in your system first: - - # systemctl enable rpcbind.socket - # systemctl restart rpcbind.service - -and then reboot. That should do the trick and you will be able to mount your NFS share as explained earlier. If you need to mount the NFS share automatically on system boot, add a valid entry to the /etc/fstab file: - - remote_host:/remote/directory /local/directory nfs options 0 0 - -The variables remote_host, /remote/directory, /local/directory, and options (which is optional) are the same ones used when manually mounting an NFS share from the command line. As per our previous example: - - 192.168.0.10:/NFS-SHARE /mnt/nfs nfs defaults 0 0 - -#### Mounting CIFS (Samba) Network Shares #### - -Samba represents the tool of choice to make a network share available in a network with *nix and Windows machines. To show the Samba shares that are available, use the smbclient command with the -L flag, followed by the machine name or its IP address. This tool is included in the samba-client package: - -You will be prompted for root’s password in the remote host: - - # smbclient -L 192.168.0.10 - -![Check Samba Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Samba-Shares.png) - -Check Samba Shares - -To mount Samba network shares on the local client you will need to install first the cifs-utils package: - - # yum update && yum install cifs-utils - -Then use the following syntax on the command line: - - # mount -t cifs -o credentials=/path/to/credentials/file //remote_host/samba_share /local/directory - -which, in our case, translates to: - - # mount -t cifs -o credentials=~/.smbcredentials //192.168.0.10/gacanepa /mnt/samba - -where smbcredentials: - - username=gacanepa - password=XXXXXX - -is a hidden file inside root’s home (/root/) with permissions set to 600, so that no one else but the owner of the file can read or write to it. - -Please note that the samba_share is the name of the Samba share as returned by smbclient -L remote_host as shown above. - -Now, if you need the Samba share to be available automatically on system boot, add a valid entry to the /etc/fstab file as follows: - - //remote_host:/samba_share /local/directory cifs options 0 0 - -The variables remote_host, /samba_share, /local/directory, and options (which is optional) are the same ones used when manually mounting a Samba share from the command line. Following the definitions given in our previous example: - - //192.168.0.10/gacanepa /mnt/samba cifs credentials=/root/smbcredentials,defaults 0 0 - -### Conclusion ### - -In this article we have explained how to set up ACLs in Linux, and discussed how to mount CIFS and NFS network shares in a RHEL 7 client. - -I recommend you to practice these concepts and even mix them (go ahead and try to set ACLs in mounted network shares) until you feel comfortable. If you have questions or comments feel free to use the form below to contact us anytime. Also, feel free to share this article through your social networks. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/ - -作者:[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/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ -[2]:http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ -[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html From 8f3984987fc2e2cc778109e39b343d9cdf38dd29 Mon Sep 17 00:00:00 2001 From: "Y.C.S.M" Date: Fri, 28 Aug 2015 08:56:28 +0800 Subject: [PATCH 1904/2517] Delete 20150813 Linux file system hierarchy v2.0.md --- ...150813 Linux file system hierarchy v2.0.md | 440 ------------------ 1 file changed, 440 deletions(-) delete mode 100644 sources/tech/20150813 Linux file system hierarchy v2.0.md diff --git a/sources/tech/20150813 Linux file system hierarchy v2.0.md b/sources/tech/20150813 Linux file system hierarchy v2.0.md deleted file mode 100644 index 23f70258b1..0000000000 --- a/sources/tech/20150813 Linux file system hierarchy v2.0.md +++ /dev/null @@ -1,440 +0,0 @@ -translating by tnuoccalanosrep - -Linux file system hierarchy v2.0 -================================================================================ -What is a file in Linux? What is file system in Linux? Where are all the configuration files? Where do I keep my downloaded applications? Is there really a filesystem standard structure in Linux? Well, the above image explains Linux file system hierarchy in a very simple and non-complex way. It’s very useful when you’re looking for a configuration file or a binary file. I’ve added some explanation and examples below, but that’s TL;DR. - -Another issue is when you got configuration and binary files all over the system that creates inconsistency and if you’re a large organization or even an end user, it can compromise your system (binary talking with old lib files etc.) and when you do [security audit of your Linux system][1], you find it is vulnerable to different exploits. So keeping a clean operating system (no matter Windows or Linux) is important. - -### What is a file in Linux? ### - -A simple description of the UNIX system, also applicable to Linux, is this: - -> On a UNIX system, everything is a file; if something is not a file, it is a process. - -This statement is true because there are special files that are more than just files (named pipes and sockets, for instance), but to keep things simple, saying that everything is a file is an acceptable generalization. A Linux system, just like UNIX, makes no difference between a file and a directory, since a directory is just a file containing names of other files. Programs, services, texts, images, and so forth, are all files. Input and output devices, and generally all devices, are considered to be files, according to the system. - -![](http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-file-system-hierarchy-v2.0-2480px-blackMORE-Ops.png) - -- Version 2.0 – 17-06-2015 - - – Improved: Added title and version history. - - – Improved: Added /srv, /media and /proc. - - – Improved: Updated descriptions to reflect modern Linux File Systems. - - – Fixed: Multiple typo’s. - - – Fixed: Appearance and colour. -- Version 1.0 – 14-02-2015 - - – Created: Initial diagram. - - – Note: Discarded lowercase version. - -### Download Links ### - -Following are two links for download. If you need this in any other format, let me know and I will try to create that and upload it somewhere. - -- [Large (PNG) Format – 2480×1755 px – 184KB][2] -- [Largest (PDF) Format – 9919x7019 px – 1686KB][3] - -**Note**: PDF Format is best for printing and very high in quality - -### Linux file system description ### - -In order to manage all those files in an orderly fashion, man likes to think of them in an ordered tree-like structure on the hard disk, as we know from `MS-DOS` (Disk Operating System) for instance. The large branches contain more branches, and the branches at the end contain the tree’s leaves or normal files. For now we will use this image of the tree, but we will find out later why this is not a fully accurate image. - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DirectoryDescription
-
/
-
Primary hierarchy root and root directory of the entire file system hierarchy.
-
/bin
-
Essential command binaries that need to be available in single user mode; for all users, e.g., cat, ls, cp.
-
/boot
-
Boot loader files, e.g., kernels, initrd.
-
/dev
-
Essential devices, e.g., /dev/null.
-
/etc
-
Host-specific system-wide configuration filesThere has been controversy over the meaning of the name itself. In early versions of the UNIX Implementation Document from Bell labs, /etc is referred to as the etcetera directory, as this directory historically held everything that did not belong elsewhere (however, the FHS restricts /etc to static configuration files and may not contain binaries). Since the publication of early documentation, the directory name has been re-designated in various ways. Recent interpretations include backronyms such as “Editable Text Configuration” or “Extended Tool Chest”.
-
-
-
/opt
-
-
-
Configuration files for add-on packages that are stored in /opt/.
-
-
-
/sgml
-
-
-
Configuration files, such as catalogs, for software that processes SGML.
-
-
-
/X11
-
-
-
Configuration files for the X Window System, version 11.
-
-
-
/xml
-
-
-
Configuration files, such as catalogs, for software that processes XML.
-
/home
-
Users’ home directories, containing saved files, personal settings, etc.
-
/lib
-
Libraries essential for the binaries in /bin/ and /sbin/.
-
/lib<qual>
-
Alternate format essential libraries. Such directories are optional, but if they exist, they have some requirements.
-
/media
-
Mount points for removable media such as CD-ROMs (appeared in FHS-2.3).
-
/mnt
-
Temporarily mounted filesystems.
-
/opt
-
Optional application software packages.
-
/proc
-
Virtual filesystem providing process and kernel information as files. In Linux, corresponds to a procfs mount.
-
/root
-
Home directory for the root user.
-
/sbin
-
Essential system binaries, e.g., init, ip, mount.
-
/srv
-
Site-specific data which are served by the system.
-
/tmp
-
Temporary files (see also /var/tmp). Often not preserved between system reboots.
-
/usr
-
Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications.
-
-
-
/bin
-
-
-
Non-essential command binaries (not needed in single user mode); for all users.
-
-
-
/include
-
-
-
Standard include files.
-
-
-
/lib
-
-
-
Libraries for the binaries in /usr/bin/ and /usr/sbin/.
-
-
-
/lib<qual>
-
-
-
Alternate format libraries (optional).
-
-
-
/local
-
-
-
Tertiary hierarchy for local data, specific to this host. Typically has further subdirectories, e.g., bin/, lib/, share/.
-
-
-
/sbin
-
-
-
Non-essential system binaries, e.g., daemons for various network-services.
-
-
-
/share
-
-
-
Architecture-independent (shared) data.
-
-
-
/src
-
-
-
Source code, e.g., the kernel source code with its header files.
-
-
-
/X11R6
-
-
-
X Window System, Version 11, Release 6.
-
/var
-
Variable files—files whose content is expected to continually change during normal operation of the system—such as logs, spool files, and temporary e-mail files.
-
-
-
/cache
-
-
-
Application cache data. Such data are locally generated as a result of time-consuming I/O or calculation. The application must be able to regenerate or restore the data. The cached files can be deleted without loss of data.
-
-
-
/lib
-
-
-
State information. Persistent data modified by programs as they run, e.g., databases, packaging system metadata, etc.
-
-
-
/lock
-
-
-
Lock files. Files keeping track of resources currently in use.
-
-
-
/log
-
-
-
Log files. Various logs.
-
-
-
/mail
-
-
-
Users’ mailboxes.
-
-
-
/opt
-
-
-
Variable data from add-on packages that are stored in /opt/.
-
-
-
/run
-
-
-
Information about the running system since last boot, e.g., currently logged-in users and running daemons.
-
-
-
/spool
-
-
-
Spool for tasks waiting to be processed, e.g., print queues and outgoing mail queue.
-
-
-
-
-
/mail
-
-
-
-
-
Deprecated location for users’ mailboxes.
-
-
-
/tmp
-
-
-
Temporary files to be preserved between reboots.
- -### Types of files in Linux ### - -Most files are just files, called `regular` files; they contain normal data, for example text files, executable files or programs, input for or output from a program and so on. - -While it is reasonably safe to suppose that everything you encounter on a Linux system is a file, there are some exceptions. - -- `Directories`: files that are lists of other files. -- `Special files`: the mechanism used for input and output. Most special files are in `/dev`, we will discuss them later. -- `Links`: a system to make a file or directory visible in multiple parts of the system’s file tree. We will talk about links in detail. -- `(Domain) sockets`: a special file type, similar to TCP/IP sockets, providing inter-process networking protected by the file system’s access control. -- `Named pipes`: act more or less like sockets and form a way for processes to communicate with each other, without using network socket semantics. - -### File system in reality ### - -For most users and for most common system administration tasks, it is enough to accept that files and directories are ordered in a tree-like structure. The computer, however, doesn’t understand a thing about trees or tree-structures. - -Every partition has its own file system. By imagining all those file systems together, we can form an idea of the tree-structure of the entire system, but it is not as simple as that. In a file system, a file is represented by an `inode`, a kind of serial number containing information about the actual data that makes up the file: to whom this file belongs, and where is it located on the hard disk. - -Every partition has its own set of inodes; throughout a system with multiple partitions, files with the same inode number can exist. - -Each inode describes a data structure on the hard disk, storing the properties of a file, including the physical location of the file data. When a hard disk is initialized to accept data storage, usually during the initial system installation process or when adding extra disks to an existing system, a fixed number of inodes per partition is created. This number will be the maximum amount of files, of all types (including directories, special files, links etc.) that can exist at the same time on the partition. We typically count on having 1 inode per 2 to 8 kilobytes of storage.At the time a new file is created, it gets a free inode. In that inode is the following information: - -- Owner and group owner of the file. -- File type (regular, directory, …) -- Permissions on the file -- Date and time of creation, last read and change. -- Date and time this information has been changed in the inode. -- Number of links to this file (see later in this chapter). -- File size -- An address defining the actual location of the file data. - -The only information not included in an inode, is the file name and directory. These are stored in the special directory files. By comparing file names and inode numbers, the system can make up a tree-structure that the user understands. Users can display inode numbers using the -i option to ls. The inodes have their own separate space on the disk. - --------------------------------------------------------------------------------- - -via: http://www.blackmoreops.com/2015/06/18/linux-file-system-hierarchy-v2-0/ - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://www.blackmoreops.com/2015/02/15/in-light-of-recent-linux-exploits-linux-security-audit-is-a-must/ -[2]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-file-system-hierarchy-v2.0-2480px-blackMORE-Ops.png -[3]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-File-System-Hierarchy-blackMORE-Ops.pdf From d4b3fcf6a82cc5eaf9c46d2bb21127e2bf2a9189 Mon Sep 17 00:00:00 2001 From: "Y.C.S.M" Date: Fri, 28 Aug 2015 09:00:36 +0800 Subject: [PATCH 1905/2517] Create 20150813 Linux file system hierarchy v2.0.md --- ...150813 Linux file system hierarchy v2.0.md | 432 ++++++++++++++++++ 1 file changed, 432 insertions(+) create mode 100644 translated/tech/20150813 Linux file system hierarchy v2.0.md diff --git a/translated/tech/20150813 Linux file system hierarchy v2.0.md b/translated/tech/20150813 Linux file system hierarchy v2.0.md new file mode 100644 index 0000000000..6f92d3bb53 --- /dev/null +++ b/translated/tech/20150813 Linux file system hierarchy v2.0.md @@ -0,0 +1,432 @@ +translating by tnuoccalanosrep +Linux文件系统结构 v2.0 +================================================================================ +Linux中的文件是什么?它的文件系统又是什么?那些配置文件又在哪里?我下载好的程序保存在哪里了?好了,上图简明地阐释了Linux的文件系统的层次关系。当你苦于寻找配置文件或者二进制文件的时候,这便显得十分有用了。我在下方添加了一些解释以及例子,但“篇幅过长,没有阅读”。 + +有一种情况便是当你在系统中获取配置以及二进制文件时,出现了不一致性问题,如果你是一个大型组织,或者只是一个终端用户,这也有可能会破坏你的系统(比如,二进制文件运行在就旧的库文件上了)。若然你在你的Linux系统上做安全审计([security audit of your Linux system][1])的话,你将会发现它很容易遭到不同的攻击。所以,清洁操作(无论是Windows还是Linux)都显得十分重要。 +### What is a file in Linux? ### +Linux的文件是什么? +对于UNIX系统来说(同样适用于Linux),以下便是对文件简单的描述: +> 在UNIX系统中,一切皆为文件;若非文件,则为进程 + +> 这种定义是比较正确的,因为有些特殊的文件不仅仅是普通文件(比如命名管道和套接字),不过为了让事情变的简单,“一切皆为文件”也是一个可以让人接受的说法。Linux系统也像UNXI系统一样,将文件和目录视如同物,因为目录只是一个包含了其他文件名的文件而已。程序,服务,文本,图片等等,都是文件。对于系统来说,输入和输出设备,基本上所有的设备,都被当做是文件。 +![](http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-file-system-hierarchy-v2.0-2480px-blackMORE-Ops.png) + +- Version 2.0 – 17-06-2015 + - – Improved: 添加标题以及版本历史 + - – Improved: 添加/srv,/meida和/proc + - – Improved: 更新了反映当前的Linux文件系统的描述 + - – Fixed: 多处的打印错误 + - – Fixed: 外观和颜色 +- Version 1.0 – 14-02-2015 + - – Created: 基本的图表 + - – Note: 摒弃更低的版本 + +### Download Links ### +以下是结构图的下载地址。如果你需要其他结构,请跟原作者联系,他会尝试制作并且上传到某个地方以供下载 +- [Large (PNG) Format – 2480×1755 px – 184KB][2] +- [Largest (PDF) Format – 9919x7019 px – 1686KB][3] + +**注意**: PDF格式文件是打印的最好选择,因为它画质很高。 +### Linux 文件系统描述 ### +为了有序地管理那些文件,人们习惯把这些文件当做是硬盘上的有序的类树结构体,正如我们熟悉的'MS-DOS'(硬盘操作系统)。大的分枝包括更多的分枝,分枝的末梢是树的叶子或者普通的文件。现在我们将会以这树形图为例,但晚点我们会发现为什么这不是一个完全准确的一幅图。 +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Directory(目录)Description(描述)
+
/
+
主层次 的根,也是整个文件系统层次结构的根目录
+
/bin
+
存放在单用户模式可用的必要命令二进制文件,对于所有用户而言,则是像cat,ls,cp等等的文件
+
/boot
+
存放引导加载程序文件,例如kernels,initrd等
+
/dev
+
存放必要的设备文件
+
/etc
+
存放主机特定的系统范围内的配置文件。其实这里有个关于它名字本身意义上的的争议。在贝尔实验室的早期UNIX实施文档版本中,/etc表示是“其他目录”,因为从历史上看,这个目录是存放各种不属于其他目录的文件(然而,FSH(文件系统目录标准)限定 /ect是用于存放静态配置文件,这里不该存有二进制文件)。早期文档出版后,这个目录名又重新定义成不同的形式。近期的解释中包含着诸如“可编辑文本配置”或者“额外的工具箱”这样的重定义
+
+
+
/opt
+
+
+
存储着新增包的配置文件 /opt/.
+
+
+
/sgml
+
+
+
存放配置文件,比如目录,还有那些处理SGML(译者注:标准通用标记语言)的软件的配置文件
+
+
+
/X11
+
+
+
X Window系统的配置文件,版本号为11
+
+
+
/xml
+
+
+
配置文件,比如目录,处理XML(译者注:可扩展标记语言)的软件的配置文件
+
/home
+
用户的主目录,包括保存的文件, 个人配置, 等等.
+
/lib
+
/bin/ and /sbin/中的二进制文件必不可少的库文件
+
/lib<qual>
+
备用格式的必要的库文件. 这样的目录视可选的,但如果他们存在的话, 他们还有一些要求.
+
/media
+
可移动的多媒体(如CD-ROMs)的挂载点.(出现于 FHS-2.3)
+
/mnt
+
临时挂载的文件系统
+
/opt
+
自定义应用程序软件包
+
/proc
+
以文件形式提供进程以及内核信息的虚拟文件系统,在Linux中,对应进程文件系统的挂载点
+
/root
+
根用户的主目录
+
/sbin
+
必要系统二进制文件, 比如, init, ip, mount.
+
/srv
+
系统提供的站点特定数据
+
/tmp
+
临时文件 (另见 /var/tmp). 通常在系统重启后删除
+
/usr
+
二级层级 存储用户的只读数据; 包含(多)用户主要的公共文件以及应用程序
+
+
+
/bin
+
+
+
非必要的命令二进制文件 (在单用户模式中不需要用到的); 用于所有用户.
+
+
+
/include
+
+
+
标准的包含文件
+
+
+
/lib
+
+
+
库文件,用于/usr/bin//usr/sbin/.中的二进制文件
+
+
+
/lib<qual>
+
+
+
备用格式库(可选的).
+
+
+
/local
+
+
+
三级层次 用于本地数据, 具体到该主机上的.通常会有下一个子目录, 比如, bin/, lib/, share/.
+
+
+
/sbin
+
+
+
非必要系统的二进制文件, 比如,用于不同网络服务的守护进程
+
+
+
/share
+
+
+
独立架构的 (共享) 数据.
+
+
+
/src
+
+
+
源代码, 比如, 内核源文件以及与它相关的头文件
+
+
+
/X11R6
+
+
+
X Window系统,版本号:11,发行版本:6
+
/var
+
各式各样的文件,一些随着系统常规操作而持续改变的文件就放在这里,比如日志文件,脱机文件,还有临时的电子邮件文件
+
+
+
/cache
+
+
+
应用程序缓存数据. 这些数据是根据I/O(输入/输出)的耗时结果或者是运算生成的.这些应用程序是可以重新生成或者恢复数据的.当没有数据丢失的时候,可以删除缓存文件.
+
+
+
/lib
+
+
+
状态信息.这些信息随着程序的运行而不停地改变,比如,数据库,系统元数据的打包等等
+
+
+
/lock
+
+
+
锁文件。这些文件会持续监控正在使用的资源
+
+
+
/log
+
+
+
日志文件. 包含各种日志.
+
+
+
/mail
+
+
+
内含用户邮箱的相关文件
+
+
+
/opt
+
+
+
来自附加包的各种数据都会存储在 /opt/.
+
+
+
/run
+
+
+
Information about the running system since last boot, e.g., currently logged-in users and running daemons.存放当前系统上次启动的相关信息, 例如, 当前登入的用户以及当前运行的daemons(守护进程).
+
+
+
/spool
+
+
+
该spool主要用于存放将要被处理的任务, 比如, 打印队列以及邮件传出队列
+
+
+
+
+
/mail
+
+
+
+
+
过时的位置,用于放置用户邮箱文件
+
+
+
/tmp
+
+
+
存放重启之前的临时接口
+ +### Types of files in Linux ### +### Linux的文件类型 ### +大多数文件也仅仅是文件,他们被称为`regular`文件;他们包含普通数据,比如,文本,可执行文件,或者程序,程序输入或输出文件等等 +While it is reasonably safe to suppose that everything you encounter on a Linux system is a file, there are some exceptions. +虽然你可以认为“在Linux中,一切你看到的皆为文件”这个观点相当保险,但这里仍有着一些例外。 + +- `目录`:由其他文件组成的文件 +- `特殊文件`:用于输入和输出的途径。大多数特殊文件都储存在`/dev`中,我们将会在后面讨论这个问题。 +- `链接文件`:让文件或者目录在系统文件树结构上可见的机制。我们将详细地讨论这个链接文件。 +- `(域)套接字`:特殊的文件类型,和TCP/IP协议中的套接字有点像,提供进程网络,并受文件系统的访问控制机制保护。 +-`命名管道` : 或多或少有点像sockets(套接字),提供一个进程间的通信机制,而不用网络套接字协议。 +### File system in reality ### +### 现实中的文件系统 ### +对于大多数用户和常规系统管理任务而言,"文件和目录是一个有序的类树结构"是可以接受的。然而,对于电脑而言,它是不会理解什么是树,或者什么是树结构。 + +每个分区都有它自己的文件系统。想象一下,如果把那些文件系统想成一个整体,我们可以构思一个关于整个系统的树结构,不过这并没有这么简单。在文件系统中,一个文件代表着一个`inode`(索引节点),一种包含着构建文件的实际数据信息的序列号:这些数据表示文件是属于谁的,还有它在硬盘中的位置。 + +每个分区都有一套属于他们自己的inodes,在一个系统的不同分区中,可以存在有相同inodes的文件。 + +每个inode都表示着一种在硬盘上的数据结构,保存着文件的属性,包括文件数据的物理地址。当硬盘被格式化并用来存储数据时(通常发生在初始系统安装过程,或者是在一个已经存在的系统中添加额外的硬盘),每个分区都会创建关于inodes的固定值。这个值表示这个分区能够同时存储各类文件的最大数量。我们通常用一个inode去映射2-8k的数据块。当一个新的文件生成后,它就会获得一个空闲的indoe。在这个inode里面存储着以下信息: + +- 文件属主和组属主 +- 文件类型(常规文件,目录文件......) +- 文件权限 +- 创建、最近一次读文件和修改文件的时间 +- inode里该信息被修改的时间 +- 文件的链接数(详见下一章) +- 文件大小 +- 文件数据的实际地址 + +唯一不在inode的信息是文件名和目录。它们存储在特殊的目录文件。通过比较文件名和inodes的数目,系统能够构造出一个便于用户理解的树结构。用户可以通过ls -i查看inode的数目。在硬盘上,inodes有他们独立的空间。 + + + +via: http://www.blackmoreops.com/2015/06/18/linux-file-system-hierarchy-v2-0/ + +译者:[译者ID](https://github.com/tnuoccalanosrep) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.blackmoreops.com/2015/02/15/in-light-of-recent-linux-exploits-linux-security-audit-is-a-must/ +[2]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-file-system-hierarchy-v2.0-2480px-blackMORE-Ops.png +[3]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-File-System-Hierarchy-blackMORE-Ops.pdf From 640802a25af32cec263d382f8620fc14897265ec Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Fri, 28 Aug 2015 09:28:13 +0800 Subject: [PATCH 1906/2517] finished the translate --- ...eate Edit and Manipulate files in Linux.md | 74 +++++++++---------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md index 21579f0ed9..c8c56c0077 100644 --- a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md +++ b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md @@ -1,7 +1,6 @@ Translating by Xuanwo -Part 1 - LFCS: How to use GNU ‘sed’ Command to Create, Edit, and Manipulate files in Linux -LFCS系列第一讲:如何在Linux上使用GNU'sed'命令来创建、编辑和操作文件 +Part 1 - LFCS系列第一讲:如何在Linux上使用GNU'sed'命令来创建、编辑和操作文件 ================================================================================ Linux基金会宣布了一个全新的LFCS(Linux Foundation Certified Sysadmin,Linux基金会认证系统管理员)认证计划。这一计划旨在帮助遍布全世界的人们获得其在处理Linux系统管理任务上能力的认证。这些能力包括支持运行的系统服务,以及第一手的故障诊断和分析和为工程师团队在升级时提供智能决策。 @@ -11,8 +10,7 @@ Linux基金会认证系统管理员——第一讲 请观看下面关于Linux基金会认证计划的演示: -注:youtube 视频 - + 该系列将命名为《LFCS预备第一讲》至《LFCS预备第十讲》并覆盖关于Ubuntu,CentOS以及openSUSE的下列话题。 @@ -78,13 +76,13 @@ sed replace string 正如你所看到的,我们可以通过使用分号分隔以及用括号包裹来把两个或者更多的替换命令(并在他们中使用正则表达式)链接起来。 -Another use of sed is showing (or deleting) a chosen portion of a file. In the following example, we will display the first 5 lines of /var/log/messages from Jun 8. +另一种sed的用法是显示或者删除文件中选中的一部分。在下面的样例中,将会显示/var/log/messages中从6月8日开始的头五行。 # sed -n '/^Jun 8/ p' /var/log/messages | sed -n 1,5p -Note that by default, sed prints every line. We can override this behaviour with the -n option and then tell sed to print (indicated by p) only the part of the file (or the pipe) that matches the pattern (Jun 8 at the beginning of line in the first case and lines 1 through 5 inclusive in the second case). +请注意,在默认的情况下,sed会打印每一行。我们可以使用-n选项来覆盖这一行为并且告诉sed只需要打印(用p来表示)文件(或管道)中匹配的部分(第一种情况下行开头的第一个6月8日以及第二种情况下的一到五行*此处翻译欠妥,需要修正*)。 -Finally, it can be useful while inspecting scripts or configuration files to inspect the code itself and leave out comments. The following sed one-liner deletes (d) blank lines or those starting with # (the | character indicates a boolean OR between the two regular expressions). +最后,可能有用的技巧是当检查脚本或者配置文件的时候可以保留文件本身并且删除注释。下面的单行sed命令删除(d)空行或者是开头为`#`的行(|字符返回两个正则表达式之间的布尔值)。 # sed '/^#\|^$/d' apache2.conf @@ -92,13 +90,13 @@ Finally, it can be useful while inspecting scripts or configuration files to ins sed match string -#### uniq Command #### +#### uniq C命令 #### -The uniq command allows us to report or remove duplicate lines in a file, writing to stdout by default. We must note that uniq does not detect repeated lines unless they are adjacent. Thus, uniq is commonly used along with a preceding sort (which is used to sort lines of text files). By default, sort takes the first field (separated by spaces) as key field. To specify a different key field, we need to use the -k option. +uniq命令允许我们返回或者删除文件中重复的行,默认写入标准输出。我们必须注意到,除非两个重复的行相邻,否则uniq命令不会删除他们。因此,uniq经常和前序排序(此处翻译欠妥)(一种用来对文本行进行排序的算法)搭配使用。默认情况下,排序使用第一个字段(用空格分隔)作为关键字段。要指定一个不同的关键字段,我们需要使用-k选项。 -**Examples** +**样例** -The du –sch /path/to/directory/* command returns the disk space usage per subdirectories and files within the specified directory in human-readable format (also shows a total per directory), and does not order the output by size, but by subdirectory and file name. We can use the following command to sort by size. +du –sch /path/to/directory/* 命令将会以人类可读的格式返回在指定目录下每一个子文件夹和文件的磁盘空间使用情况(也会显示每个目录总体的情况),而且不是按照大小输出,而是按照子文件夹和文件的名称。我们可以使用下面的命令来让它通过大小排序。 # du -sch /var/* | sort –h @@ -106,7 +104,8 @@ The du –sch /path/to/directory/* command returns the disk space usage per subd sort command example -You can count the number of events in a log by date by telling uniq to perform the comparison using the first 6 characters (-w 6) of each line (where the date is specified), and prefixing each output line by the number of occurrences (-c) with the following command. +你可以通过使用下面的命令告诉uniq比较每一行的前6个字符(-w 6)(指定了不同的日期)来统计日志事件的个数,而且在每一行的开头输出出现的次数(-c)。 + # cat /var/log/mail.log | uniq -c -w 6 @@ -114,7 +113,7 @@ You can count the number of events in a log by date by telling uniq to perform t Count Numbers in File -Finally, you can combine sort and uniq (as they usually are). Consider the following file with a list of donors, donation date, and amount. Suppose we want to know how many unique donors there are. We will use the following command to cut the first field (fields are delimited by a colon), sort by name, and remove duplicate lines. +最后,你可以组合使用sort和uniq命令(通常如此)。考虑下面文件中捐助者,捐助日期和金额的列表。假设我们想知道有多少个捐助者。我们可以使用下面的命令来分隔第一字段(字段由冒号分隔),按名称排序并且删除重复的行。 # cat sortuniq.txt | cut -d: -f1 | sort | uniq @@ -122,15 +121,15 @@ Finally, you can combine sort and uniq (as they usually are). Consider the follo Find Unique Records in File -- Read Also: [13 “cat” Command Examples][1] +- 也可阅读: [13个“cat”命令样例][1] -#### grep Command #### +#### grep 命令 #### -grep searches text files or (command output) for the occurrence of a specified regular expression and outputs any line containing a match to standard output. +grep在文件(或命令输出)中搜索指定正则表达式并且在标准输出中输出匹配的行。 -**Examples** +**样例** -Display the information from /etc/passwd for user gacanepa, ignoring case. +显示文件/etc/passwd中用户gacanepa的信息,忽略大小写。 # grep -i gacanepa /etc/passwd @@ -138,7 +137,7 @@ Display the information from /etc/passwd for user gacanepa, ignoring case. grep command example -Show all the contents of /etc whose name begins with rc followed by any single number. +显示/etc文件夹下所有rc开头并跟随任意数字的内容。 # ls -l /etc | grep rc[0-9] @@ -146,15 +145,15 @@ Show all the contents of /etc whose name begins with rc followed by any single n List Content Using grep -- Read Also: [12 “grep” Command Examples][2] +- 也可阅读: [12个“grep”命令样例][2] #### tr Command Usage #### -The tr command can be used to translate (change) or delete characters from stdin, and write the result to stdout. +tr命令可以用来从标准输入中翻译(改变)或者删除字符并将结果写入到标准输出中。 -**Examples** +**样例** -Change all lowercase to uppercase in sortuniq.txt file. +把sortuniq.txt文件中所有的小写改为大写。 # cat sortuniq.txt | tr [:lower:] [:upper:] @@ -162,21 +161,20 @@ Change all lowercase to uppercase in sortuniq.txt file. Sort Strings in File -Squeeze the delimiter in the output of ls –l to only one space. - +压缩`ls –l`输出中的定界符至一个空格。 # ls -l | tr -s ' ' ![Squeeze Delimiter](http://www.tecmint.com/wp-content/uploads/2014/10/squeeze-delimeter.jpg) Squeeze Delimiter -#### cut Command Usage #### +#### cut 命令使用方法 #### -The cut command extracts portions of input lines (from stdin or files) and displays the result on standard output, based on number of bytes (-b option), characters (-c), or fields (-f). In this last case (based on fields), the default field separator is a tab, but a different delimiter can be specified by using the -d option. +cut命令可以基于字节数(-b选项),字符(-c)或者字段(-f)提取部分输入(从标准输入或者文件中)并且将结果输出到标准输出。在最后一种情况下(基于字段),默认的字段分隔符是一个tab,但不同的分隔符可以由-d选项来指定。 -**Examples** +**样例** -Extract the user accounts and the default shells assigned to them from /etc/passwd (the –d option allows us to specify the field delimiter, and the –f switch indicates which field(s) will be extracted. +从/etc/passwd中提取用户账户和他们被分配的默认shell(-d选项允许我们指定分界符,-f选项指定那些字段将被提取)。 # cat /etc/passwd | cut -d: -f1,7 @@ -184,7 +182,7 @@ Extract the user accounts and the default shells assigned to them from /etc/pass Extract User Accounts -Summing up, we will create a text stream consisting of the first and third non-blank files of the output of the last command. We will use grep as a first filter to check for sessions of user gacanepa, then squeeze delimiters to only one space (tr -s ‘ ‘). Next, we’ll extract the first and third fields with cut, and finally sort by the second field (IP addresses in this case) showing unique. +总结一下,我们将使用最后一个命令的输出中第一和第三个非空文件创建一个文本流。我们将使用grep作为第一过滤器来检查用户gacanepa的会话,然后将分隔符压缩至一个空格(tr -s ' ')。下一步,我们将使用cut来提取第一和第三个字段,最后使用第二个字段(本样例中,指的是IP地址)来排序之后再用uniq去重。 # last | grep gacanepa | tr -s ‘ ‘ | cut -d’ ‘ -f1,3 | sort -k2 | uniq @@ -192,24 +190,24 @@ Summing up, we will create a text stream consisting of the first and third non-b last command example -The above command shows how multiple commands and pipes can be combined so as to obtain filtered data according to our desires. Feel free to also run it by parts, to help you see the output that is pipelined from one command to the next (this can be a great learning experience, by the way!). +上面的命令显示了如何将多个命令和管道结合起来以便根据我们的愿望得到过滤后的数据。你也可以逐步地使用它以帮助你理解输出是如何从一个命令传输到下一个命令的(顺便说一句,这是一个非常好的学习经验!) -### Summary ### +### 总结 ### -Although this example (along with the rest of the examples in the current tutorial) may not seem very useful at first sight, they are a nice starting point to begin experimenting with commands that are used to create, edit, and manipulate files from the Linux command line. Feel free to leave your questions and comments below – they will be much appreciated! +尽管这个例子(以及在当前教程中的其他实例)第一眼看上去可能不是非常有用,但是他们是体验在Linux命令行中创建,编辑和操作文件的一个非常好的开始。请随时留下你的问题和意见——不胜感激! -#### Reference Links #### +#### 参考链接 #### -- [About the LFCS][3] -- [Why get a Linux Foundation Certification?][4] -- [Register for the LFCS exam][5] +- [关于LFCS][3] +- [为什么需要Linux基金会认证?][4] +- [注册LFCS考试][5] -------------------------------------------------------------------------------- via: http://www.tecmint.com/sed-command-to-create-edit-and-manipulate-files-in-linux/ 作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Xuanwo](https://github.com/Xuanwo) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From b663886aa6da8c94947f11a0a901b56a3bba60a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Fri, 28 Aug 2015 10:41:26 +0800 Subject: [PATCH 1907/2517] Delete RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md --- ...Lists) and Mounting Samba or NFS Shares.md | 192 ------------------ 1 file changed, 192 deletions(-) delete mode 100644 translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md diff --git a/translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md deleted file mode 100644 index a9c56b1cbe..0000000000 --- a/translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md +++ /dev/null @@ -1,192 +0,0 @@ -[xiqingongzi Translating] -RHCSA Series: Using ACLs (Access Control Lists) and Mounting Samba / NFS Shares – Part 7 -================================================================================ -在第六篇文章的最后,我们开始解释如何使用parted和SSM 设置和配置本地文件存储([RHCSA series Part 6][1]) - -![Configure ACL's and Mounting NFS / Samba Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ACLs-and-Mounting-NFS-Samba-Shares.png) - -RHCSA系列::第七章 ACL的配置和安装NFS/Samba文件分享系统 - -我们还讨论了如何创建和在启动启动时用密码挂载加密逻辑卷。另外,我们要提醒您要避免在安装 在管理操作系统的存储文件系统事执行关键的操作。接下来我们要回顾在红帽Linux 7 中常用的文件系统格式然后卸载和挂载网络文件系统(CIFS和NFS), -#### 前提 #### - -在开始之前,请确保你有一个线上Samba服务器和一个线上NFS服务器(RHEL7 将很快不支持 NFS V2) - -在这个指南中,我们将使用一个IP为192.168.0.10的机器作为服务端,RHEL7 盒子作为客户端,IP为192.168.0.18,稍后我们会告诉你该安装哪些软件包。 - -### RHEL7中的文件格式 ### - -从RHEL7 开始,XFS 因为其高可用性和可拓展性被设置为所有架构的默认文件系统。目前,红帽和合作伙伴测试的主流硬件线上他支持最大500TB 每个文件系统。 -同时,XFS使user_xattr(扩展用户属性)和ACL(POSIX访问控制列表)作为默认的挂载选项,不像ext3或ext4(ext2在RHEL 7中是过时的),这意味着你不需要明确的指定命令行选项或在/etc/fstab挂载时XFS文件系统(如果你想禁用在后一种情况下,这样的选择你要明确使用no_acl和no_user_xattr)。 -记住,扩展用户属性可以指定文件和目录用于存储任意等附加信息的MIME类型,字符集或文件的编码,而对用户属性的访问权限由普通文件权限位的定义。 -#### 权限控制列表 #### - -每一个系统管理员,无论新手还是专家,都熟悉文件和目录的权限和许可。它能制定特定的权限(读,写和执行)的所有者,属组,和其他的正常访问权限。如果需要,可以回去看看 [Part 3 of the RHCSA series][2] -然而,由于标准的 ugo/rwx 设置不允许配置不同用户不同权限,所以ACL可以比一般规定更多的文件和目录权限。 -事实上,ACL定义的权限是文件权限的一个超集,我们来看一下在真正的场景下是如何转换的。 -1. 有两种类型:访问ACL (可以适用于任何一个特定的文件或目录),也是默认的ACL,它只能应用于目录。如果文件包含在其中没有ACL设置,他们继承父目录的默认ACL。 -2. 首先,ACL可以配置每个用户,每个组,或不在组内的用户拥有文件。 -3。设置ACL(和删除)使用setfacl,分别使用M或X选项。 -例如,让我们创建一个组名为tecmint和添加用户johndoe和davenull: - # groupadd tecmint - # useradd johndoe - # useradd davenull - # usermod -a -G tecmint johndoe - # usermod -a -G tecmint davenull - -让我们确认用户属于组tecmint: - - # id johndoe - # id davenull - -![Verify Users](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Users.png) - -验证用户 - -Let’s now create a directory called playground within /mnt, and a file named testfile.txt inside. We will set the group owner to tecmint and change its default ugo/rwx permissions to 770 (read, write, and execute permissions granted to both the owner and the group owner of the file): -现在让我们创建一个在/mnt下的目录名为playground,和一个名叫testfile.txt文件。我们将tecmint和更改其默认 ugo/rwx 权限为 770组所有者(读,写,和执行给予属主和属组所有者权限): - # mkdir /mnt/playground - # touch /mnt/playground/testfile.txt - # chmod 770 /mnt/playground/testfile.txt - -然后切换用户johndoe和davenull,按照这个顺序,并写入文件: - - echo "My name is John Doe" > /mnt/playground/testfile.txt - echo "My name is Dave Null" >> /mnt/playground/testfile.txt - -到目前为止很好。现在,让我们的用户gacanepa写入文件–和写操作,可以预料到出现的结果。 - -但如果我们真的需要用户gacanepa(不是tecmint组的成员)有/mnt/playground/testfile.txt的写入权限。首先,可能是你的想法是添加用户帐户组tecmint。但这会给他写上所有文件的权限,写入的是该组的权限,我们不希望这样。我们只希望他能写/mnt/playground/ testfile.txt。 - - # touch /mnt/playground/testfile.txt - # chown :tecmint /mnt/playground/testfile.txt - # chmod 777 /mnt/playground/testfile.txt - # su johndoe - $ echo "My name is John Doe" > /mnt/playground/testfile.txt - $ su davenull - $ echo "My name is Dave Null" >> /mnt/playground/testfile.txt - $ su gacanepa - $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt - -![Manage User Permissions](http://www.tecmint.com/wp-content/uploads/2015/04/User-Permissions.png) - -管理用户权限 - -让我们给用户gacanepa添加/mnt/playground/testfile.txt的读写权限 -在root下执行 - - # setfacl -R -m u:gacanepa:rwx /mnt/playground - -您已经成功添加了一个ACL允许gacanepa写入测试文件。然后切换到用户gacanepa试图写入文件: - - $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt - -要查看特定的文件或目录的ACL,使用getfacl: - - # getfacl /mnt/playground/testfile.txt - -![Check ACLs of Files](http://www.tecmint.com/wp-content/uploads/2015/04/Check-ACL-of-File.png) - -检查文件的ACLs - -设置默认ACL目录(它的内容将会继承除非被覆盖),添加d:以前的规则并且指定一个文件名来替代 - # setfacl -m d:o:r /mnt/playground - -以上的ACL将允许用户不在属组属主有/mnt/playground的读权限。注意在getfacl /mnt/playground 之前和之后的改变输出的差异: -![Set Default ACL in Linux](http://www.tecmint.com/wp-content/uploads/2015/04/Set-Default-ACL-in-Linux.png) - -Set Default ACL in Linux - -[Chapter 20 in the official RHEL 7 Storage Administration Guide][3] 提供了更多ACL的例子,我强烈推荐你去读读它,参考起来非常方便。 - -#### 安装NFS网络共享 #### - -显示在你的服务器的NFS共享可用的列表,您可以使用showmount命令与E选项,其次是机器名或IP地址。这个工具包含在NFS utils包: - - # yum update && yum install nfs-utils - -然后: - - # showmount -e 192.168.0.10 - -你会得到一个列表的可用的NFS分享192.168.0.10: -![Check Available NFS Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Mount-NFS-Shares.png) - -Check Available NFS Shares - -在使用命令行对必要的本地客户端挂载NFS网络共享,使用以下语法: - - # mount -t nfs -o [options] remote_host:/remote/directory /local/directory - -在我们的例子中,翻译成: - - # mount -t nfs 192.168.0.10:/NFS-SHARE /mnt/nfs - -如果您收到一下错误消息:"rpc-statd.service工作失败,看 “systemctl status rpc-statd.service” 和“journalctl -xn” 获取详细信息.确保你的rpcbind服务在开机时开启。 - # systemctl enable rpcbind.socket - # systemctl restart rpcbind.service - -然后重新启动。这应该做的技巧,你将能够挂载NFS共享就和前面所解释的那样。如果你需要安装NFS共享的自动引导系统,添加一个有效的条目到/etc/fstab文件: - - 远程主机:远程目录 本地目录 nfs 选项 0 0 - -变量远程主机, 远程目录, 本地目录, and 选项 (可选的)在我们手动挂载是谁同样的,就和我们之前的例子一样。 - - 192.168.0.10:/NFS-SHARE /mnt/nfs nfs defaults 0 0 - -#### 挂载 Samba 网络文件共享 #### - -Samba 代表选择可以在×nix和Windows之间进行网络共享的工具.使用Samba客户端包内的 smbclient 命令 加 -L 参数来展示 Samba 文件分享,其次是机器名或IP地址 -将会提示你输入远程主机上的密码: - # smbclient -L 192.168.0.10 - -![Check Samba Shares](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Samba-Shares.png) - -Check Samba Shares - -在本地客户端,你需要首先安装CIFS utils来挂载Samba: - - # yum update && yum install cifs-utils - -然后在命令行上使用下面的语法: - - # mount -t cifs -o credentials=/path/to/credentials/file //remote_host/samba_share /local/directory - -在我们的例子中,翻译成: - - # mount -t cifs -o credentials=~/.smbcredentials //192.168.0.10/gacanepa /mnt/samba - -smbcredentials内容为: - - username=gacanepa - password=XXXXXX - -是一个隐藏文件在root的主目录(/root/),权限设置为600,因此,除了该文件的所有者可以读或写,没有人能够读写。 -请注意,samba_share是Samba共享的名字就像 smbclient -L remote_host 返回的那样 - -现在,如果你需要samba共享可自动在系统启动时,添加一个有效的条目/etc/fstab文件如下: - - //远程主机:/samba_share 本地目录 cifs 选项 0 0 - -变量 远程主机, /samba_share, 本地目录, 选项 (可选的) 和我们手动安装的意义一样 - - //192.168.0.10/gacanepa /mnt/samba cifs credentials=/root/smbcredentials,defaults 0 0 - -### 结论 ### - -在这篇文章中我们已经讲解了如何在Linux设置ACL,并探讨RHEL7中该如何挂载CIFS和NFS网络共享。 -我建议你去实践这些概念,甚至把它们一起安装(先尝试安装网络共享设置ACL)如果你有疑问或意见,请随时使用下面的表格,随时与我们联系。还可以通过你的社交网络来分享这篇文章。 --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/ - -作者:[Gabriel Cánepa][a] -译者:[xiqingongzi](https://github.com/xiqingongzi) -校对:[校对者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/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ -[2]:http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ -[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html From 20227444b13f1cea4976677c9c559cbbb191e3c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Fri, 28 Aug 2015 11:11:16 +0800 Subject: [PATCH 1908/2517] Update RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md --- ...t, Automating Tasks with Cron and Monitoring System Logs.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md b/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md index 04c7d7a29e..307ec72515 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md @@ -1,3 +1,4 @@ +[xiqingongzi translating] RHCSA Series: Yum Package Management, Automating Tasks with Cron and Monitoring System Logs – Part 10 ================================================================================ In this article we will review how to install, update, and remove packages in Red Hat Enterprise Linux 7. We will also cover how to automate tasks using cron, and will finish this guide explaining how to locate and interpret system logs files with the focus of teaching you why all of these are essential skills for every system administrator. @@ -194,4 +195,4 @@ via: http://www.tecmint.com/yum-package-management-cron-job-scheduling-monitorin [1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ [2]:http://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/ [3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ -[4]:http://www.tecmint.com/dmesg-commands/ \ No newline at end of file +[4]:http://www.tecmint.com/dmesg-commands/ From c242f434c900997a28380b2e50620bba14b2f00b Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Fri, 28 Aug 2015 12:21:27 +0800 Subject: [PATCH 1909/2517] [Translating] Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting --- ...inux Birthday-- A 22 Years of Journey and Still Counting.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md b/sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md index f74384b616..da750a495a 100644 --- a/sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md +++ b/sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md @@ -1,3 +1,4 @@ +[jerryling315](https://github.com/jerryling315/) is translating. Debian GNU/Linux Birthday : A 22 Years of Journey and Still Counting… ================================================================================ On 16th August 2015, the Debian project has celebrated its 22nd anniversary, making it one of the oldest popular distribution in open source world. Debian project was conceived and founded in the year 1993 by Ian Murdock. By that time Slackware had already made a remarkable presence as one of the earliest Linux Distribution. @@ -106,4 +107,4 @@ via: http://www.tecmint.com/happy-birthday-to-debian-gnu-linux/ [a]:http://www.tecmint.com/author/avishek/ [1]:http://xmodulo.com/2013/08/interesting-facts-about-debian-linux.html -[2]:https://www.debian.org/ \ No newline at end of file +[2]:https://www.debian.org/ From 829b9cbb09aabfac61a8a578a31d4b8a2edfafb7 Mon Sep 17 00:00:00 2001 From: Ping Date: Fri, 28 Aug 2015 13:54:05 +0800 Subject: [PATCH 1910/2517] Translating sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI --- .../20150827 Xtreme Download Manager Updated With Fresh GUI.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md b/sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md index 767c2fdcd4..8879d6bf64 100644 --- a/sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md +++ b/sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md @@ -1,3 +1,4 @@ +Translating by Ping Xtreme Download Manager Updated With Fresh GUI ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme-Download-Manager-Linux.jpg) @@ -64,4 +65,4 @@ via: http://itsfoss.com/xtreme-download-manager-install/ [1]:http://xdman.sourceforge.net/ [2]:http://itsfoss.com/4-best-download-managers-for-linux/ [3]:http://itsfoss.com/download-youtube-videos-ubuntu/ -[4]:http://xdman.sourceforge.net/download.html \ No newline at end of file +[4]:http://xdman.sourceforge.net/download.html From 8697100000ccaba0be7f29aa03595410ff96dbe5 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 28 Aug 2015 14:42:22 +0800 Subject: [PATCH 1911/2517] PUB:20150518 How to set up a Replica Set on MongoDB @mr-ping --- ... How to set up a Replica Set on MongoDB.md | 78 +++++++++++-------- 1 file changed, 47 insertions(+), 31 deletions(-) rename {translated/tech => published}/20150518 How to set up a Replica Set on MongoDB.md (51%) diff --git a/translated/tech/20150518 How to set up a Replica Set on MongoDB.md b/published/20150518 How to set up a Replica Set on MongoDB.md similarity index 51% rename from translated/tech/20150518 How to set up a Replica Set on MongoDB.md rename to published/20150518 How to set up a Replica Set on MongoDB.md index 44b8535b82..7d05a48d95 100644 --- a/translated/tech/20150518 How to set up a Replica Set on MongoDB.md +++ b/published/20150518 How to set up a Replica Set on MongoDB.md @@ -1,10 +1,11 @@ -如何配置MongoDB副本集(Replica Set) +如何配置 MongoDB 副本集 ================================================================================ -MongoDB已经成为市面上最知名的NoSQL数据库。MongoDB是面向文档的,它的无模式设计使得它在各种各样的WEB应用当中广受欢迎。最让我喜欢的特性之一是它的副本集,副本集将同一数据的多份拷贝放在一组mongod节点上,从而实现数据的冗余以及高可用性。 -这篇教程将向你介绍如何配置一个MongoDB副本集。 +MongoDB 已经成为市面上最知名的 NoSQL 数据库。MongoDB 是面向文档的,它的无模式设计使得它在各种各样的WEB 应用当中广受欢迎。最让我喜欢的特性之一是它的副本集(Replica Set),副本集将同一数据的多份拷贝放在一组 mongod 节点上,从而实现数据的冗余以及高可用性。 -副本集的最常见配置涉及到一个主节点以及多个副节点。这之后启动的复制行为会从这个主节点到其他副节点。副本集不止可以针对意外的硬件故障和停机事件对数据库提供保护,同时也因为提供了更多的结点从而提高了数据库客户端数据读取的吞吐量。 +这篇教程将向你介绍如何配置一个 MongoDB 副本集。 + +副本集的最常见配置需要一个主节点以及多个副节点。这之后启动的复制行为会从这个主节点到其他副节点。副本集不止可以针对意外的硬件故障和停机事件对数据库提供保护,同时也因为提供了更多的节点从而提高了数据库客户端数据读取的吞吐量。 ### 配置环境 ### @@ -12,25 +13,25 @@ MongoDB已经成为市面上最知名的NoSQL数据库。MongoDB是面向文档 ![](https://farm8.staticflickr.com/7667/17801038505_529a5224a1.jpg) -为了达到这个目的,我们使用了3个运行在VirtualBox上的虚拟机。我会在这些虚拟机上安装Ubuntu 14.04,并且安装MongoDB官方包。 +为了达到这个目的,我们使用了3个运行在 VirtualBox 上的虚拟机。我会在这些虚拟机上安装 Ubuntu 14.04,并且安装 MongoDB 官方包。 -我会在一个虚拟机实例上配置好需要的环境,然后将它克隆到其他的虚拟机实例上。因此,选择一个名为master的虚拟机,执行以下安装过程。 +我会在一个虚拟机实例上配置好所需的环境,然后将它克隆到其他的虚拟机实例上。因此,选择一个名为 master 的虚拟机,执行以下安装过程。 -首先,我们需要在apt中增加一个MongoDB密钥: +首先,我们需要给 apt 增加一个 MongoDB 密钥: $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 -然后,将官方的MongoDB仓库添加到source.list中: +然后,将官方的 MongoDB 仓库添加到 source.list 中: $ sudo su # echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list -接下来更新apt仓库并且安装MongoDB。 +接下来更新 apt 仓库并且安装 MongoDB。 $ sudo apt-get update $ sudo apt-get install -y mongodb-org -现在对/etc/mongodb.conf做一些更改 +现在对 /etc/mongodb.conf 做一些更改 auth = true dbpath=/var/lib/mongodb @@ -39,17 +40,17 @@ MongoDB已经成为市面上最知名的NoSQL数据库。MongoDB是面向文档 keyFile=/var/lib/mongodb/keyFile replSet=myReplica -第一行的作用是确认我们的数据库需要验证才可以使用的。keyfile用来配置用于MongoDB结点间复制行为的密钥文件。replSet用来为副本集设置一个名称。 +第一行的作用是表明我们的数据库需要验证才可以使用。keyfile 配置用于 MongoDB 节点间复制行为的密钥文件。replSet 为副本集设置一个名称。 接下来我们创建一个用于所有实例的密钥文件。 $ echo -n "MyRandomStringForReplicaSet" | md5sum > keyFile -这将会创建一个含有MD5字符串的密钥文件,但是由于其中包含了一些噪音,我们需要对他们清理后才能正式在MongoDB中使用。 +这将会创建一个含有 MD5 字符串的密钥文件,但是由于其中包含了一些噪音,我们需要对他们清理后才能正式在 MongoDB 中使用。 $ echo -n "MyReplicaSetKey" | md5sum|grep -o "[0-9a-z]\+" > keyFile -grep命令的作用的是把将空格等我们不想要的内容过滤掉之后的MD5字符串打印出来。 +grep 命令的作用的是把将空格等我们不想要的内容过滤掉之后的 MD5 字符串打印出来。 现在我们对密钥文件进行一些操作,让它真正可用。 @@ -57,7 +58,7 @@ grep命令的作用的是把将空格等我们不想要的内容过滤掉之后 $ sudo chown mongodb:nogroup keyFile $ sudo chmod 400 keyFile -接下来,关闭此虚拟机。将其Ubuntu系统克隆到其他虚拟机上。 +接下来,关闭此虚拟机。将其 Ubuntu 系统克隆到其他虚拟机上。 ![](https://farm9.staticflickr.com/8729/17800903865_9876a9cc9c.jpg) @@ -67,55 +68,55 @@ grep命令的作用的是把将空格等我们不想要的内容过滤掉之后 请注意,三个虚拟机示例需要在同一个网络中以便相互通讯。因此,我们需要它们弄到“互联网"上去。 -这里推荐给每个虚拟机设置一个静态IP地址,而不是使用DHCP。这样它们就不至于在DHCP分配IP地址给他们的时候失去连接。 +这里推荐给每个虚拟机设置一个静态 IP 地址,而不是使用 DHCP。这样它们就不至于在 DHCP 分配IP地址给他们的时候失去连接。 -像下面这样编辑每个虚拟机的/etc/networks/interfaces文件。 +像下面这样编辑每个虚拟机的 /etc/networks/interfaces 文件。 -在主结点上: +在主节点上: auto eth1 iface eth1 inet static address 192.168.50.2 netmask 255.255.255.0 -在副结点1上: +在副节点1上: auto eth1 iface eth1 inet static address 192.168.50.3 netmask 255.255.255.0 -在副结点2上: +在副节点2上: auto eth1 iface eth1 inet static address 192.168.50.4 netmask 255.255.255.0 -由于我们没有DNS服务,所以需要设置设置一下/etc/hosts这个文件,手工将主机名称放到次文件中。 +由于我们没有 DNS 服务,所以需要设置设置一下 /etc/hosts 这个文件,手工将主机名称放到此文件中。 -在主结点上: +在主节点上: 127.0.0.1 localhost primary 192.168.50.2 primary 192.168.50.3 secondary1 192.168.50.4 secondary2 -在副结点1上: +在副节点1上: 127.0.0.1 localhost secondary1 192.168.50.2 primary 192.168.50.3 secondary1 192.168.50.4 secondary2 -在副结点2上: +在副节点2上: 127.0.0.1 localhost secondary2 192.168.50.2 primary 192.168.50.3 secondary1 192.168.50.4 secondary2 -使用ping命令检查各个结点之间的连接。 +使用 ping 命令检查各个节点之间的连接。 $ ping primary $ ping secondary1 @@ -123,9 +124,9 @@ grep命令的作用的是把将空格等我们不想要的内容过滤掉之后 ### 配置副本集 ### -验证各个结点可以正常连通后,我们就可以新建一个管理员用户,用于之后的副本集操作。 +验证各个节点可以正常连通后,我们就可以新建一个管理员用户,用于之后的副本集操作。 -在主节点上,打开/etc/mongodb.conf文件,将auth和replSet两项注释掉。 +在主节点上,打开 /etc/mongodb.conf 文件,将 auth 和 replSet 两项注释掉。 dbpath=/var/lib/mongodb logpath=/var/log/mongodb/mongod.log @@ -133,21 +134,30 @@ grep命令的作用的是把将空格等我们不想要的内容过滤掉之后 #auth = true keyFile=/var/lib/mongodb/keyFile #replSet=myReplica + +在一个新安装的 MongoDB 上配置任何用户或副本集之前,你需要注释掉 auth 行。默认情况下,MongoDB 并没有创建任何用户。而如果在你创建用户前启用了 auth,你就不能够做任何事情。你可以在创建一个用户后再次启用 auth。 -重启mongod进程。 +修改 /etc/mongodb.conf 之后,重启 mongod 进程。 $ sudo service mongod restart -连接MongoDB后,新建管理员用户。 +现在连接到 MongoDB master: + + $ mongo :27017 + +连接 MongoDB 后,新建管理员用户。 > use admin > db.createUser({ user:"admin", pwd:" }) + +重启 MongoDB: + $ sudo service mongod restart -连接到MongoDB,用以下命令将secondary1和secondary2节点添加到我们的副本集中。 +再次连接到 MongoDB,用以下命令将 副节点1 和副节点2节点添加到我们的副本集中。 > use admin > db.auth("admin","myreallyhardpassword") @@ -156,7 +166,7 @@ grep命令的作用的是把将空格等我们不想要的内容过滤掉之后 > rs.add("secondary2:27017") -现在副本集到手了,可以开始我们的项目了。参照 [official driver documentation][1] 来了解如何连接到副本集。如果你想要用Shell来请求数据,那么你需要连接到主节点上来插入或者请求数据,副节点不行。如果你执意要尝试用附件点操作,那么以下错误信息就蹦出来招呼你了。 +现在副本集到手了,可以开始我们的项目了。参照 [官方驱动文档][1] 来了解如何连接到副本集。如果你想要用 Shell 来请求数据,那么你需要连接到主节点上来插入或者请求数据,副节点不行。如果你执意要尝试用副本集操作,那么以下错误信息就蹦出来招呼你了。 myReplica:SECONDARY> myReplica:SECONDARY> show databases @@ -166,6 +176,12 @@ grep命令的作用的是把将空格等我们不想要的内容过滤掉之后 at shellHelper.show (src/mongo/shell/utils.js:630:33) at shellHelper (src/mongo/shell/utils.js:524:36) at (shellhelp2):1:1 at src/mongo/shell/mongo.js:47 + +如果你要从 shell 连接到整个副本集,你可以安装如下命令。在副本集中的失败切换是自动的。 + + $ mongo primary,secondary1,secondary2:27017/?replicaSet=myReplica + +如果你使用其它驱动语言(例如,JavaScript、Ruby 等等),格式也许不同。 希望这篇教程能对你有所帮助。你可以使用Vagrant来自动完成你的本地环境配置,并且加速你的代码。 @@ -175,7 +191,7 @@ via: http://xmodulo.com/setup-replica-set-mongodb.html 作者:[Christopher Valerio][a] 译者:[mr-ping](https://github.com/mr-ping) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 117acaf5d0b79a7b1054f488e29410d8fbf354c6 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 28 Aug 2015 14:46:58 +0800 Subject: [PATCH 1912/2517] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E8=B6=85=E6=9C=9F?= =?UTF-8?q?=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @H-mudcup @zpl1025 @martin2011qi --- ...Is Out And It's Packed Full Of Features.md | 87 ------------------- ...20141223 Defending the Free Linux World.md | 2 - ...s--Linus Torvalds Answers Your Question.md | 1 - .../talk/20150716 Interview--Larry Wall.md | 2 - 4 files changed, 92 deletions(-) delete mode 100644 sources/news/20150826 Plasma 5.4 Is Out And It's Packed Full Of Features.md diff --git a/sources/news/20150826 Plasma 5.4 Is Out And It's Packed Full Of Features.md b/sources/news/20150826 Plasma 5.4 Is Out And It's Packed Full Of Features.md deleted file mode 100644 index a103c6b505..0000000000 --- a/sources/news/20150826 Plasma 5.4 Is Out And It's Packed Full Of Features.md +++ /dev/null @@ -1,87 +0,0 @@ -Plasma 5.4 Is Out And It’s Packed Full Of Features -================================================================================ -KDE has [announced][1] a brand new feature release of Plasma 5 — and it’s a corker. - -![kde network applet graphs](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/kde-network-applet-graphs.jpg) - -Better network details are among the changes - -Plasma 5.4.0 builds on [April’s 5.3.0 milestone][2] in a number of ways, ranging from the inherently technical, Wayland preview session, ahoy, to lavish aesthetic touches, like **1,400 brand new icons**. - -A handful of new components also feature in the release, including a new Plasma Widget for volume control, a monitor calibration tool and an improved user management tool. - -The ‘Kicker’ application menu has been powered up to let you favourite all types of content, not just applications. - -**KRunner now remembers searches** so that it can automatically offer suggestions based on your earlier queries as you type. - -The **network applet displays a graph** to give you a better understanding of your network traffic. It also gains two new VPN plugins for SSH and SSTP connections. - -Minor tweaks to the digital clock see it adapt better in slim panel mode, it gains ISO date support and makes it easier for you to toggle between 12 hour and 24 hour clock. Week numbers have been added to the calendar. - -### Application Dashboard ### - -![plasma 5.4 fullscreen dashboard](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/plasma-fullscreen-dashboard.jpg) - -The new ‘Application Dashboard’ in KDE Plasma 5.4.0 - -**A new full screen launcher, called ‘Application Dashboard’**, is also available. - -This full-screen dash offers the same features as the traditional Application Menu but with “sophisticated scaling to screen size and full spatial keyboard navigation”. - -Like the Unity launch, the new Plasma Application Dashboard helps you quickly find applications, sift through files and contacts based on your previous activity. - -### Changes in KDE Plasma 5.4.0 at a glance ### - -- Improved high DPI support -- KRunner autocompletion -- KRunner search history -- Application Dashboard add on -- 1,400 New icons -- Wayland tech preview - -For a full list of changes in Plasma 5.4 refer to [this changelog][3]. - -### Install Plasma 5.4 in Kubuntu 15.04 ### - -![new plasma desktop](http://www.omgubuntu.co.uk/wp-content/uploads/2015/08/new-plasma-desktop-.jpg) - -![Kubuntu logo](http://www.omgubuntu.co.uk/wp-content/uploads/2012/02/logo-kubuntu.png) - -To **install Plasma 5.4 in Kubuntu 15.04** you will need to add the KDE Backports PPA to your Software Sources. - -Adding the Kubuntu backports PPA **is not strictly advised** as it may upgrade other parts of the KDE desktop, application suite, developer frameworks or Kubuntu specific config files. - -If you like your desktop being stable, don’t proceed. - -The quickest way to upgrade to Plasma 5.4 once it lands in the Kubuntu Backports PPA is to use the Terminal: - - sudo add-apt-repository ppa:kubuntu-ppa/backports - - sudo apt-get update && sudo apt-get dist-upgrade - -Let the upgrade process complete. Assuming no errors emerge, reboot your computer for changes to take effect. - -If you’re not already using Kubuntu, i.e. you’re using the Unity version of Ubuntu, you should first install the Kubuntu desktop package (you’ll find it in the Ubuntu Software Centre). - -To undo the changes above and downgrade to the most recent version of Plasma available in the Ubuntu archives use the PPA-Purge tool: - - sudo apt-get install ppa-purge - - sudo ppa-purge ppa:kubuntu-ppa/backports - -Let us know how your upgrade/testing goes in the comments below and don’t forget to mention the features you hope to see added to the Plasma 5 desktop next. - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/08/plasma-5-4-new-features - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://dot.kde.org/2015/08/25/kde-ships-plasma-540-feature-release-august -[2]:http://www.omgubuntu.co.uk/2015/04/kde-plasma-5-3-released-heres-how-to-upgrade-in-kubuntu-15-04 -[3]:https://www.kde.org/announcements/plasma-5.3.2-5.4.0-changelog.php \ No newline at end of file diff --git a/sources/talk/20141223 Defending the Free Linux World.md b/sources/talk/20141223 Defending the Free Linux World.md index 0a552e640d..0df2a47383 100644 --- a/sources/talk/20141223 Defending the Free Linux World.md +++ b/sources/talk/20141223 Defending the Free Linux World.md @@ -1,5 +1,3 @@ -Translating by H-mudcup - Defending the Free Linux World ================================================================================ ![](http://www.linuxinsider.com/ai/908455/open-invention-network.jpg) diff --git a/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md b/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md index f1420fd0e4..bb04ddf0c8 100644 --- a/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md +++ b/sources/talk/20150709 Interviews--Linus Torvalds Answers Your Question.md @@ -1,4 +1,3 @@ -zpl1025 Interviews: Linus Torvalds Answers Your Question ================================================================================ Last Thursday you had a chance to [ask Linus Torvalds][1] about programming, hardware, and all things Linux. You can read his answers to those questions below. If you'd like to see what he had to say the last time we sat down with him, [you can do so here][2]. diff --git a/sources/talk/20150716 Interview--Larry Wall.md b/sources/talk/20150716 Interview--Larry Wall.md index 1362281517..3010691cff 100644 --- a/sources/talk/20150716 Interview--Larry Wall.md +++ b/sources/talk/20150716 Interview--Larry Wall.md @@ -1,5 +1,3 @@ -martin - Interview: Larry Wall ================================================================================ > Perl 6 has been 15 years in the making, and is now due to be released at the end of this year. We speak to its creator to find out what’s going on. From 8ba608059ea9e9247ec89e6c7ddd8fd5ee52ecd4 Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 28 Aug 2015 19:01:24 +0800 Subject: [PATCH 1913/2517] Update 20150716 Interview--Larry Wall.md --- sources/talk/20150716 Interview--Larry Wall.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20150716 Interview--Larry Wall.md b/sources/talk/20150716 Interview--Larry Wall.md index 3010691cff..f3fea9c596 100644 --- a/sources/talk/20150716 Interview--Larry Wall.md +++ b/sources/talk/20150716 Interview--Larry Wall.md @@ -1,3 +1,5 @@ +translating... + Interview: Larry Wall ================================================================================ > Perl 6 has been 15 years in the making, and is now due to be released at the end of this year. We speak to its creator to find out what’s going on. From 3df7b23d8f3d5916d78684ea621a2d5cf4d57ab2 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 28 Aug 2015 23:33:13 +0800 Subject: [PATCH 1914/2517] Delete 20150827 Linux or UNIX--Bash Read a File Line By Line.md --- ... or UNIX--Bash Read a File Line By Line.md | 163 ------------------ 1 file changed, 163 deletions(-) delete mode 100644 sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md diff --git a/sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md b/sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md deleted file mode 100644 index c0a4b6c27c..0000000000 --- a/sources/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md +++ /dev/null @@ -1,163 +0,0 @@ -translation by strugglingyouth -Linux/UNIX: Bash Read a File Line By Line -================================================================================ -How do I read a file line by line under a Linux or UNIX-like system using KSH or BASH shell? - -You can use while..do..done bash loop to read file line by line on a Linux, OSX, *BSD, or Unix-like system. - -**Syntax to read file line by line on a Bash Unix & Linux shell:** - -1. The syntax is as follows for bash, ksh, zsh, and all other shells - -1. while read -r line; do COMMAND; done < input.file -1. The -r option passed to red command prevents backslash escapes from being interpreted. -1. Add IFS= option before read command to prevent leading/trailing whitespace from being trimmed - -1. while IFS= read -r line; do COMMAND_on $line; done < input.file - -Here is more human readable syntax for you: - - #!/bin/bash - input="/path/to/txt/file" - while IFS= read -r var - do - echo "$var" - done < "$input" - -**Examples** - -Here are some examples: - - #!/bin/ksh - file="/home/vivek/data.txt" - while IFS= read line - do - # display $line or do somthing with $line - echo "$line" - done <"$file" - -The same example using bash shell: - - #!/bin/bash - file="/home/vivek/data.txt" - while IFS= read -r line - do - # display $line or do somthing with $line - printf '%s\n' "$line" - done <"$file" - -You can also read field wise: - - #!/bin/bash - file="/etc/passwd" - while IFS=: read -r f1 f2 f3 f4 f5 f6 f7 - do - # display fields using f1, f2,..,f7 - printf 'Username: %s, Shell: %s, Home Dir: %s\n' "$f1" "$f7" "$f6" - done <"$file" - -Sample outputs: - -![Fig.01: Bash shell scripting- read file line by line demo outputs](http://s0.cyberciti.org/uploads/faq/2011/01/Bash-Scripting-Read-File-line-by-line-demo.jpg) - -Fig.01: Bash shell scripting- read file line by line demo outputs - -**Bash Scripting: Read text file line-by-line to create pdf files** - -My input file is as follows (faq.txt): - - 4|http://www.cyberciti.biz/faq/mysql-user-creation/|Mysql User Creation: Setting Up a New MySQL User Account - 4096|http://www.cyberciti.biz/faq/ksh-korn-shell/|What is UNIX / Linux Korn Shell? - 4101|http://www.cyberciti.biz/faq/what-is-posix-shell/|What Is POSIX Shell? - 17267|http://www.cyberciti.biz/faq/linux-check-battery-status/|Linux: Check Battery Status Command - 17245|http://www.cyberciti.biz/faq/restarting-ntp-service-on-linux/|Linux Restart NTPD Service Command - 17183|http://www.cyberciti.biz/faq/ubuntu-linux-determine-your-ip-address/|Ubuntu Linux: Determine Your IP Address - 17172|http://www.cyberciti.biz/faq/determine-ip-address-of-linux-server/|HowTo: Determine an IP Address My Linux Server - 16510|http://www.cyberciti.biz/faq/unix-linux-restart-php-service-command/|Linux / Unix: Restart PHP Service Command - 8292|http://www.cyberciti.biz/faq/mounting-harddisks-in-freebsd-with-mount-command/|FreeBSD: Mount Hard Drive / Disk Command - 8190|http://www.cyberciti.biz/faq/rebooting-solaris-unix-server/|Reboot a Solaris UNIX System - -My bash script: - - #!/bin/bash - # Usage: Create pdf files from input (wrapper script) - # Author: Vivek Gite under GPL v2.x+ - #--------------------------------------------------------- - - #Input file - _db="/tmp/wordpress/faq.txt" - - #Output location - o="/var/www/prviate/pdf/faq" - - _writer="~/bin/py/pdfwriter.py" - - # If file exists - if [[ -f "$_db" ]] - then - # read it - while IFS='|' read -r pdfid pdfurl pdftitle - do - local pdf="$o/$pdfid.pdf" - echo "Creating $pdf file ..." - #Genrate pdf file - $_writer --quiet --footer-spacing 2 \ - --footer-left "nixCraft is GIT UL++++ W+++ C++++ M+ e+++ d-" \ - --footer-right "Page [page] of [toPage]" --footer-line \ - --footer-font-size 7 --print-media-type "$pdfurl" "$pdf" - done <"$_db" - fi - -**Tip: Read from bash variable** - -Let us say you want a list of all installed php packages on a Debian or Ubuntu Linux, enter: - - # My input source is the contents of a variable called $list # - list=$(dpkg --list php\* | awk '/ii/{print $2}') - printf '%s\n' "$list" - -Sample outputs: - - php-pear - php5-cli - php5-common - php5-fpm - php5-gd - php5-json - php5-memcache - php5-mysql - php5-readline - php5-suhosin-extension - -You can now read from $list and install the package: - - #!/bin/bash - # BASH can iterate over $list variable using a "here string" # - while IFS= read -r pkg - do - printf 'Installing php package %s...\n' "$pkg" - /usr/bin/apt-get -qq install $pkg - done <<< "$list" - printf '*** Do not forget to run php5enmod and restart the server (httpd or php5-fpm) ***\n' - -Sample outputs: - - Installing php package php-pear... - Installing php package php5-cli... - Installing php package php5-common... - Installing php package php5-fpm... - Installing php package php5-gd... - Installing php package php5-json... - Installing php package php5-memcache... - Installing php package php5-mysql... - Installing php package php5-readline... - Installing php package php5-suhosin-extension... - *** Do not forget to run php5enmod and restart the server (httpd or php5-fpm) *** - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/unix-howto-read-line-by-line-from-file/ - -作者:[作者名][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From b1a1328295ee4624811029e6f03b82485bbc0175 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 28 Aug 2015 23:34:09 +0800 Subject: [PATCH 1915/2517] Create 20150827 Linux or UNIX--Bash Read a File Line By Line.md --- ... or UNIX--Bash Read a File Line By Line.md | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 translated/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md diff --git a/translated/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md b/translated/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md new file mode 100644 index 0000000000..37473334d1 --- /dev/null +++ b/translated/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md @@ -0,0 +1,166 @@ + +Linux/UNIX: Bash 下如何逐行读取一个文件 +================================================================================ + 在 Linux 或类 UNIX 系统下如何使用 KSH 或 BASH shell 逐行读取一个文件? + +在 Linux, OSX, * BSD ,或者类 Unix 系统下你可以使用​​while..do..done bash 的循环来逐行读取一个文件。 + +**在 Bash Unix 或者 Linux shell 中逐行读取一个文件的语法:** + +1.对于 bash, ksh, zsh,和其他的 shells 语法如下 - +1. while read -r line; do COMMAND; done < input.file +1.通过 -r 选项传递给红色的命令阻止反斜杠被解释。 +1.在 read 命令之前添加 IFS= option,来防止 leading/trailing 尾随的空白字符被分割 - +1. while IFS= read -r line; do COMMAND_on $line; done < input.file + +这是更适合人类阅读的语法: + + #!/bin/bash + input="/path/to/txt/file" + while IFS= read -r var + do + echo "$var" + done < "$input" + +**示例** + +下面是一些例子: + + #!/bin/ksh + file="/home/vivek/data.txt" + while IFS= read line + do + # display $line or do somthing with $line + echo "$line" + done <"$file" + +在 bash shell 中相同的例子: + + #!/bin/bash + file="/home/vivek/data.txt" + while IFS= read -r line + do + # display $line or do somthing with $line + printf '%s\n' "$line" + done <"$file" + +你还可以看看这个更好的: + + #!/bin/bash + file="/etc/passwd" + while IFS=: read -r f1 f2 f3 f4 f5 f6 f7 + do + # display fields using f1, f2,..,f7 + printf 'Username: %s, Shell: %s, Home Dir: %s\n' "$f1" "$f7" "$f6" + done <"$file" + +示例输出: + +![Fig.01: Bash shell scripting- read file line by line demo outputs](http://s0.cyberciti.org/uploads/faq/2011/01/Bash-Scripting-Read-File-line-by-line-demo.jpg) + +图01:Bash shell scripting- 读取文件并逐行输出文件 + +**Bash Scripting: 逐行读取文本文件并创建为 pdf 文件** + +我的输入文件如下(faq.txt): + + 4|http://www.cyberciti.biz/faq/mysql-user-creation/|Mysql User Creation: Setting Up a New MySQL User Account + 4096|http://www.cyberciti.biz/faq/ksh-korn-shell/|What is UNIX / Linux Korn Shell? + 4101|http://www.cyberciti.biz/faq/what-is-posix-shell/|What Is POSIX Shell? + 17267|http://www.cyberciti.biz/faq/linux-check-battery-status/|Linux: Check Battery Status Command + 17245|http://www.cyberciti.biz/faq/restarting-ntp-service-on-linux/|Linux Restart NTPD Service Command + 17183|http://www.cyberciti.biz/faq/ubuntu-linux-determine-your-ip-address/|Ubuntu Linux: Determine Your IP Address + 17172|http://www.cyberciti.biz/faq/determine-ip-address-of-linux-server/|HowTo: Determine an IP Address My Linux Server + 16510|http://www.cyberciti.biz/faq/unix-linux-restart-php-service-command/|Linux / Unix: Restart PHP Service Command + 8292|http://www.cyberciti.biz/faq/mounting-harddisks-in-freebsd-with-mount-command/|FreeBSD: Mount Hard Drive / Disk Command + 8190|http://www.cyberciti.biz/faq/rebooting-solaris-unix-server/|Reboot a Solaris UNIX System + +我的 bash script: + + #!/bin/bash + # Usage: Create pdf files from input (wrapper script) + # Author: Vivek Gite under GPL v2.x+ + #--------------------------------------------------------- + + #Input file + _db="/tmp/wordpress/faq.txt" + + #Output location + o="/var/www/prviate/pdf/faq" + + _writer="~/bin/py/pdfwriter.py" + + # If file exists + if [[ -f "$_db" ]] + then + # read it + while IFS='|' read -r pdfid pdfurl pdftitle + do + local pdf="$o/$pdfid.pdf" + echo "Creating $pdf file ..." + #Genrate pdf file + $_writer --quiet --footer-spacing 2 \ + --footer-left "nixCraft is GIT UL++++ W+++ C++++ M+ e+++ d-" \ + --footer-right "Page [page] of [toPage]" --footer-line \ + --footer-font-size 7 --print-media-type "$pdfurl" "$pdf" + done <"$_db" + fi + +**提示:从 bash 的变量开始读取** + +让我们看看如何在 Debian 或者 Ubuntu Linux 下列出所有安装过的 php 包,请输入: + + # 我将输出内容赋值到一个变量名为$list中 # + + list=$(dpkg --list php\* | awk '/ii/{print $2}') + printf '%s\n' "$list" + +示例输出: + + php-pear + php5-cli + php5-common + php5-fpm + php5-gd + php5-json + php5-memcache + php5-mysql + php5-readline + php5-suhosin-extension + +你现在可以从 $list 中看到安装的包: + + #!/bin/bash + # BASH can iterate over $list variable using a "here string" # + while IFS= read -r pkg + do + printf 'Installing php package %s...\n' "$pkg" + /usr/bin/apt-get -qq install $pkg + done <<< "$list" + printf '*** Do not forget to run php5enmod and restart the server (httpd or php5-fpm) ***\n' + +示例输出: + + Installing php package php-pear... + Installing php package php5-cli... + Installing php package php5-common... + Installing php package php5-fpm... + Installing php package php5-gd... + Installing php package php5-json... + Installing php package php5-memcache... + Installing php package php5-mysql... + Installing php package php5-readline... + Installing php package php5-suhosin-extension... + + + *** 不要忘了运行php5enmod并重新启动服务(httpd 或 php5-fpm) *** + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/unix-howto-read-line-by-line-from-file/ + +作者:[作者名][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 772a5d000de163d51f039ed4ac0e38f373552541 Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Fri, 28 Aug 2015 23:38:22 +0800 Subject: [PATCH 1916/2517] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=20Debian=20GNU=20or=20Linux=20Birthday--=20A=2022=20Years=20of?= =?UTF-8?q?=20Journey=20and=20Still=20Counting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成翻译 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting Update 20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md fix error --- ... 22 Years of Journey and Still Counting.md | 110 ------------------ ... 22 Years of Journey and Still Counting.md | 109 +++++++++++++++++ 2 files changed, 109 insertions(+), 110 deletions(-) delete mode 100644 sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md create mode 100644 translated/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md diff --git a/sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md b/sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md deleted file mode 100644 index da750a495a..0000000000 --- a/sources/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md +++ /dev/null @@ -1,110 +0,0 @@ -[jerryling315](https://github.com/jerryling315/) is translating. -Debian GNU/Linux Birthday : A 22 Years of Journey and Still Counting… -================================================================================ -On 16th August 2015, the Debian project has celebrated its 22nd anniversary, making it one of the oldest popular distribution in open source world. Debian project was conceived and founded in the year 1993 by Ian Murdock. By that time Slackware had already made a remarkable presence as one of the earliest Linux Distribution. - -![Happy 22nd Birthday to Debian](http://www.tecmint.com/wp-content/uploads/2014/08/Debian-22nd-Birthday.png) - -Happy 22nd Birthday to Debian Linux - -Ian Ashley Murdock, an American Software Engineer by profession, conceived the idea of Debian project, when he was a student of Purdue University. He named the project Debian after the name of his then-girlfriend Debra Lynn (Deb) and his name. He later married her and then got divorced in January 2008. - -![Ian Murdock](http://www.tecmint.com/wp-content/uploads/2014/08/Ian-Murdock.jpeg) - -Debian Creator: Ian Murdock - -Ian is currently serving as Vice President of Platform and Development Community at ExactTarget. - -Debian (as Slackware) was the result of unavailability of up-to mark Linux Distribution, that time. Ian in an interview said – “Providing the first class Product without profit would be the sole aim of Debian Project. Even Linux was not reliable and up-to mark that time. I Remember…. Moving files between file-system and dealing with voluminous file would often result in Kernel Panic. However the project Linux was promising. The availability of Source Code freely and the potential it seemed was qualitative.” - -I remember … like everyone else I wanted to solve problem, run something like UNIX at home, but it was not possible…neither financially nor legally, in the other sense . Then I come to know about GNU kernel Development and its non-association with any kind of legal issues, he added. He was sponsored by Free Software Foundation (FSF) in the early days when he was working on Debian, it also helped Debian to take a giant step though Ian needed to finish his degree and hence quited FSF roughly after one year of sponsorship. - -### Debian Development History ### - -- **Debian 0.01 – 0.09** : Released between August 1993 – December 1993. -- **Debian 0.91 ** – Released in January 1994 with primitive package system, No dependencies. -- **Debian 0.93 rc5** : March 1995. It is the first modern release of Debian, dpkg was used to install and maintain packages after base system installation. -- **Debian 0.93 rc6**: Released in November 1995. It was last a.out release, deselect made an appearance for the first time – 60 developers were maintaining packages, then at that time. -- **Debian 1.1**: Released in June 1996. Code name – Buzz, Packages count – 474, Package Manager dpkg, Kernel 2.0, ELF. -- **Debian 1.2**: Released in December 1996. Code name – Rex, Packages count – 848, Developers Count – 120. -- **Debian 1.3**: Released in July 1997. Code name – Bo, package count 974, Developers count – 200. -- **Debian 2.0**: Released in July 1998. Code name: Hamm, Support for architecture – Intel i386 and Motorola 68000 series, Number of Packages: 1500+, Number of Developers: 400+, glibc included. -- **Debian 2.1**: Released on March 09, 1999. Code name – slink, support architecture Alpha and Sparc, apt came in picture, Number of package – 2250. -- **Debian 2.2**: Released on August 15, 2000. Code name – Potato, Supported architecture – Intel i386, Motorola 68000 series, Alpha, SUN Sparc, PowerPC and ARM architecture. Number of packages: 3900+ (binary) and 2600+ (Source), Number of Developers – 450. There were a group of people studied and came with an article called Counting potatoes, which shows – How a free software effort could lead to a modern operating system despite all the issues around it. -- **Debian 3.0** : Released on July 19th, 2002. Code name – woody, Architecture supported increased– HP, PA_RISC, IA-64, MIPS and IBM, First release in DVD, Package Count – 8500+, Developers Count – 900+, Cryptography. -- **Debian 3.1**: Release on June 6th, 2005. Code name – sarge, Architecture support – same as woody + AMD64 – Unofficial Port released, Kernel – 2.4 qnd 2.6 series, Number of Packages: 15000+, Number of Developers : 1500+, packages like – OpenOffice Suite, Firefox Browser, Thunderbird, Gnome 2.8, kernel 3.3 Advanced Installation Support: RAID, XFS, LVM, Modular Installer. -- **Debian 4.0**: Released on April 8th, 2007. Code name – etch, architecture support – same as sarge, included AMD64. Number of packages: 18,200+ Developers count : 1030+, Graphical Installer. -- **Debian 5.0**: Released on February 14th, 2009. Code name – lenny, Architecture Support – Same as before + ARM. Number of packages: 23000+, Developers Count: 1010+. -- **Debian 6.0** : Released on July 29th, 2009. Code name – squeeze, Package included : kernel 2.6.32, Gnome 2.3. Xorg 7.5, DKMS included, Dependency-based. Architecture : Same as pervious + kfreebsd-i386 and kfreebsd-amd64, Dependency based booting. -- **Debian 7.0**: Released on may 4, 2013. Code name: wheezy, Support for Multiarch, Tools for private cloud, Improved Installer, Third party repo need removed, full featured multimedia-codec, Kernel 3.2, Xen Hypervisor 4.1.4 Package Count: 37400+. -- **Debian 8.0**: Released on May 25, 2015 and Code name: Jessie, Systemd as the default init system, powered by Kernel 3.16, fast booting, cgroups for services, possibility of isolating part of the services, 43000+ packages. Sysvinit init system available in Jessie. - -**Note**: Linux Kernel initial release was on October 05, 1991 and Debian initial release was on September 15, 1993. So, Debian is there for 22 Years running Linux Kernel which is there for 24 years. - -### Debian Facts ### - -Year 1994 was spent on organizing and managing Debian project so that it would be easy for others to contribute. Hence no release for users were made this year however there were certain internal release. - -Debian 1.0 was never released. A CDROM manufacturer company by mistakenly labelled an unreleased version as Debian 1.0. Hence to avoid confusion Debian 1.0 was released as Debian 1.1 and since then only the concept of official CDROM images came into existence. - -Each release of Debian is a character of Toy Story. - -Debian remains available in old stable, stable, testing and experimental, all the time. - -The Debian Project continues to work on the unstable distribution (codenamed sid, after the evil kid from the Toy Story). Sid is the permanent name for the unstable distribution and is remains ‘Still In Development’. The testing release is intended to become the next stable release and is currently codenamed jessie. - -Debian official distribution includes only Free and OpenSource Software and nothing else. However the availability of contrib and Non-free Packages makes it possible to install those packages which are free but their dependencies are not licensed free (contrib) and Packages licensed under non-free softwares. - -Debian is the mother of a lot of Linux distribution. Some of these Includes: - -- Damn Small Linux -- KNOPPIX -- Linux Advanced -- MEPIS -- Ubuntu -- 64studio (No more active) -- LMDE - -Debian is the world’s largest non commercial Linux Distribution. It is written in C (32.1%) programming language and rest in 70 other languages. - -![Debian Contribution](http://www.tecmint.com/wp-content/uploads/2014/08/Debian-Programming.png) - -Debian Contribution - -Image Source: [Xmodulo][1] - -Debian project contains 68.5 million actual loc (lines of code) + 4.5 million lines of comments and white spaces. - -International Space station dropped Windows & Red Hat for adopting Debian – These astronauts are using one release back – now “squeeze” for stability and strength from community. - -Thank God! Who would have heard the scream from space on Windows Metro Screen :P - -#### The Black Wednesday #### - -On November 20th, 2002 the University of Twente Network Operation Center (NOC) caught fire. The fire department gave up protecting the server area. NOC hosted satie.debian.org which included Security, non-US archive, New Maintainer, quality assurance, databases – Everything was turned to ashes. Later these services were re-built by debian. - -#### The Future Distro #### - -Next in the list is Debian 9, code name – Stretch, what it will have is yet to be revealed. The best is yet to come, Just Wait for it! - -A lot of distribution made an appearance in Linux Distro genre and then disappeared. In most cases managing as it gets bigger was a concern. But certainly this is not the case with Debian. It has hundreds of thousands of developer and maintainer all across the globe. It is a one Distro which was there from the initial days of Linux. - -The contribution of Debian in Linux ecosystem can’t be measured in words. If there had been no Debian, Linux would not have been so rich and user-friendly. Debian is among one of the disto which is considered highly reliable, secure and stable and a perfect choice for Web Servers. - -That’s the beginning of Debian. It came a long way and still going. The Future is Here! The world is here! If you have not used Debian till now, What are you Waiting for. Just Download Your Image and get started, we will be here if you get into trouble. - -- [Debian Homepage][2] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/happy-birthday-to-debian-gnu-linux/ - -作者:[Avishek Kumar][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/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 new file mode 100644 index 0000000000..1c92079b57 --- /dev/null +++ b/translated/talk/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md @@ -0,0 +1,109 @@ +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 f61c12b96c475ae4701c362e645b8504b26b689b Mon Sep 17 00:00:00 2001 From: Luoyuanhao Date: Sat, 29 Aug 2015 09:34:10 +0800 Subject: [PATCH 1917/2517] [Translated] tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md --- ...ate and Import Into Database) in RHEL 7.md | 166 ----------------- ...ate and Import Into Database) in RHEL 7.md | 169 ++++++++++++++++++ 2 files changed, 169 insertions(+), 166 deletions(-) delete mode 100644 sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md create mode 100644 translated/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md diff --git a/sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md b/sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md deleted file mode 100644 index 8f3370f741..0000000000 --- a/sources/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md +++ /dev/null @@ -1,166 +0,0 @@ -ictlyh Translating -Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7 -================================================================================ -In order to keep your RHEL 7 systems secure, you need to know how to monitor all of the activities that take place on such systems by examining log files. Thus, you will be able to detect any unusual or potentially malicious activity and perform system troubleshooting or take another appropriate action. - -![Linux Rotate Log Files Using Rsyslog and Logrotate](http://www.tecmint.com/wp-content/uploads/2015/08/Manage-and-Rotate-Linux-Logs-Using-Rsyslog-Logrotate.jpg) - -RHCE Exam: Manage System LogsUsing Rsyslogd and Logrotate – Part 5 - -In RHEL 7, the [rsyslogd][1] daemon is responsible for system logging and reads its configuration from /etc/rsyslog.conf (this file specifies the default location for all system logs) and from files inside /etc/rsyslog.d, if any. - -### Rsyslogd Configuration ### - -A quick inspection of the [rsyslog.conf][2] will be helpful to start. This file is divided into 3 main sections: Modules (since rsyslog follows a modular design), Global directives (used to set global properties of the rsyslogd daemon), and Rules. As you will probably guess, this last section indicates what gets logged or shown (also known as the selector) and where, and will be our focus throughout this article. - -A typical line in rsyslog.conf is as follows: - -![Rsyslogd Configuration](http://www.tecmint.com/wp-content/uploads/2015/08/Rsyslogd-Configuration.png) - -Rsyslogd Configuration - -In the image above, we can see that a selector consists of one or more pairs Facility:Priority separated by semicolons, where Facility describes the type of message (refer to [section 4.1.1 in RFC 3164][3] to see the complete list of facilities available for rsyslog) and Priority indicates its severity, which can be one of the following self-explanatory words: - -- debug -- info -- notice -- warning -- err -- crit -- alert -- emerg - -Though not a priority itself, the keyword none means no priority at all of the given facility. - -**Note**: That a given priority indicates that all messages of such priority and above should be logged. Thus, the line in the example above instructs the rsyslogd daemon to log all messages of priority info or higher (regardless of the facility) except those belonging to mail, authpriv, and cron services (no messages coming from this facilities will be taken into account) to /var/log/messages. - -You can also group multiple facilities using the colon sign to apply the same priority to all of them. Thus, the line: - - *.info;mail.none;authpriv.none;cron.none /var/log/messages - -Could be rewritten as - - *.info;mail,authpriv,cron.none /var/log/messages - -In other words, the facilities mail, authpriv, and cron are grouped and the keyword none is applied to the three of them. - -#### Creating a custom log file #### - -To log all daemon messages to /var/log/tecmint.log, we need to add the following line either in rsyslog.conf or in a separate file (easier to manage) inside /etc/rsyslog.d: - - daemon.* /var/log/tecmint.log - -Let’s restart the daemon (note that the service name does not end with a d): - - # systemctl restart rsyslog - -And check the contents of our custom log before and after restarting two random daemons: - -![Linux Create Custom Log File](http://www.tecmint.com/wp-content/uploads/2015/08/Create-Custom-Log-File.png) - -Create Custom Log File - -As a self-study exercise, I would recommend you play around with the facilities and priorities and either log additional messages to existing log files or create new ones as in the previous example. - -### Rotating Logs using Logrotate ### - -To prevent log files from growing endlessly, the logrotate utility is used to rotate, compress, remove, and alternatively mail logs, thus easing the administration of systems that generate large numbers of log files. - -Logrotate runs daily as a cron job (/etc/cron.daily/logrotate) and reads its configuration from /etc/logrotate.conf and from files located in /etc/logrotate.d, if any. - -As with the case of rsyslog, even when you can include settings for specific services in the main file, creating separate configuration files for each one will help organize your settings better. - -Let’s take a look at a typical logrotate.conf: - -![Logrotate Configuration](http://www.tecmint.com/wp-content/uploads/2015/08/Logrotate-Configuration.png) - -Logrotate Configuration - -In the example above, logrotate will perform the following actions for /var/loh/wtmp: attempt to rotate only once a month, but only if the file is at least 1 MB in size, then create a brand new log file with permissions set to 0664 and ownership given to user root and group utmp. Next, only keep one archived log, as specified by the rotate directive: - -![Logrotate Logs Monthly](http://www.tecmint.com/wp-content/uploads/2015/08/Logrotate-Logs-Monthly.png) - -Logrotate Logs Monthly - -Let’s now consider another example as found in /etc/logrotate.d/httpd: - -![Rotate Apache Log Files](http://www.tecmint.com/wp-content/uploads/2015/08/Rotate-Apache-Log-Files.png) - -Rotate Apache Log Files - -You can read more about the settings for logrotate in its man pages ([man logrotate][4] and [man logrotate.conf][5]). Both files are provided along with this article in PDF format for your reading convenience. - -As a system engineer, it will be pretty much up to you to decide for how long logs will be stored and in what format, depending on whether you have /var in a separate partition / logical volume. Otherwise, you really want to consider removing old logs to save storage space. On the other hand, you may be forced to keep several logs for future security auditing according to your company’s or client’s internal policies. - -#### Saving Logs to a Database #### - -Of course examining logs (even with the help of tools such as grep and regular expressions) can become a rather tedious task. For that reason, rsyslog allows us to export them into a database (OTB supported RDBMS include MySQL, MariaDB, PostgreSQL, and Oracle. - -This section of the tutorial assumes that you have already installed the MariaDB server and client in the same RHEL 7 box where the logs are being managed: - - # yum update && yum install mariadb mariadb-server mariadb-client rsyslog-mysql - # systemctl enable mariadb && systemctl start mariadb - -Then use the `mysql_secure_installation` utility to set the password for the root user and other security considerations: - -![Secure MySQL Database](http://www.tecmint.com/wp-content/uploads/2015/08/Secure-MySQL-Database.png) - -Secure MySQL Database - -Note: If you don’t want to use the MariaDB root user to insert log messages to the database, you can configure another user account to do so. Explaining how to do that is out of the scope of this tutorial but is explained in detail in [MariaDB knowledge][6] base. In this tutorial we will use the root account for simplicity. - -Next, download the createDB.sql script from [GitHub][7] and import it into your database server: - - # mysql -u root -p < createDB.sql - -![Save Server Logs to Database](http://www.tecmint.com/wp-content/uploads/2015/08/Save-Server-Logs-to-Database.png) - -Save Server Logs to Database - -Finally, add the following lines to /etc/rsyslog.conf: - - $ModLoad ommysql - $ActionOmmysqlServerPort 3306 - *.* :ommysql:localhost,Syslog,root,YourPasswordHere - -Restart rsyslog and the database server: - - # systemctl restart rsyslog - # systemctl restart mariadb - -#### Querying the Logs using SQL syntax #### - -Now perform some tasks that will modify the logs (like stopping and starting services, for example), then log to your DB server and use standard SQL commands to display and search in the logs: - - USE Syslog; - SELECT ReceivedAt, Message FROM SystemEvents; - -![Query Logs in Database](http://www.tecmint.com/wp-content/uploads/2015/08/Query-Logs-in-Database.png) - -Query Logs in Database - -### Summary ### - -In this article we have explained how to set up system logging, how to rotate logs, and how to redirect the messages to a database for easier search. We hope that these skills will be helpful as you prepare for the [RHCE exam][8] and in your daily responsibilities as well. - -As always, your feedback is more than welcome. Feel free to use the form below to reach us. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/manage-linux-system-logs-using-rsyslogd-and-logrotate/ - -作者:[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/wp-content/pdf/rsyslogd.pdf -[2]:http://www.tecmint.com/wp-content/pdf/rsyslog.conf.pdf -[3]:https://tools.ietf.org/html/rfc3164#section-4.1.1 -[4]:http://www.tecmint.com/wp-content/pdf/logrotate.pdf -[5]:http://www.tecmint.com/wp-content/pdf/logrotate.conf.pdf -[6]:https://mariadb.com/kb/en/mariadb/create-user/ -[7]:https://github.com/sematext/rsyslog/blob/master/plugins/ommysql/createDB.sql -[8]:http://www.tecmint.com/how-to-setup-and-configure-static-network-routing-in-rhel/ \ No newline at end of file diff --git a/translated/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md b/translated/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md new file mode 100644 index 0000000000..a37c9610fd --- /dev/null +++ b/translated/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md @@ -0,0 +1,169 @@ +第五部分 - 如何在 RHEL 7 中管理系统日志(配置、旋转以及导入到数据库) +================================================================================ +为了确保你的 RHEL 7 系统安全,你需要通过查看日志文件监控系统中发生的所有活动。这样,你就可以检测任何不正常或有潜在破坏的活动并进行系统故障排除或者其它恰当的操作。 + +![Linux 中使用 Rsyslog 和 Logrotate 旋转日志文件](http://www.tecmint.com/wp-content/uploads/2015/08/Manage-and-Rotate-Linux-Logs-Using-Rsyslog-Logrotate.jpg) + +(译者注:[日志旋转][9]是系统管理中归档每天产生的日志文件的自动化过程) + +RHCE 考试 - 第五部分:使用 Rsyslog 和 Logrotate 管理系统日志 + +在 RHEL 7 中,[rsyslogd][1] 守护进程负责系统日志,它从 /etc/rsyslog.conf(该文件指定所有系统日志的默认路径)和 /etc/rsyslog.d 中的所有文件(如果有的话)读取配置信息。 + +### Rsyslogd 配置 ### + +快速浏览一下 [rsyslog.conf][2] 会是一个好的开端。该文件分为 3 个主要部分:模块(rsyslong 按照模块化设计),全局指令(用于设置 rsyslogd 守护进程的全局属性),以及规则。正如你可能猜想的,最后一个部分指示获取,显示以及在哪里保存什么的日志(也称为选择子),这也是这篇博文关注的重点。 + +rsyslog.conf 中典型的一行如下所示: + +![Rsyslogd 配置](http://www.tecmint.com/wp-content/uploads/2015/08/Rsyslogd-Configuration.png) + +Rsyslogd 配置 + +在上面的图片中,我们可以看到一个选择子包括了一个或多个用分号分隔的设备:优先级(Facility:Priority)对,其中设备描述了消息类型(参考 [RFC 3164 4.1.1 章节][3] 查看 rsyslog 可用的完整设备列表),优先级指示它的严重性,这可能是以下几种之一: + +- debug +- info +- notice +- warning +- err +- crit +- alert +- emerg + +尽管自身并不是一个优先级,关键字 none 意味着指定设备没有任何优先级。 + +**注意**:给定一个优先级表示该优先级以及之上的消息都应该记录到日志中。因此,上面例子中的行指示 rsyslogd 守护进程记录所有优先级为 info 以及以上(不管是什么设备)的除了属于 mail、authpriv、以及 cron 服务(不考虑来自这些设备的消息)的消息到 /var/log/messages。 + +你也可以使用逗号将多个设备分为一组,对同组中的设备使用相同的优先级。例如下面这行: + + *.info;mail.none;authpriv.none;cron.none /var/log/messages + +也可以这样写: + + *.info;mail,authpriv,cron.none /var/log/messages + +换句话说,mail、authpriv 以及 cron 被分为一组,并使用关键字 none。 + +#### 创建自定义日志文件 #### + +要把所有的守护进程消息记录到 /var/log/tecmint.log,我们需要在 rsyslog.conf 或者 /etc/rsyslog.d 目录中的单独文件(易于管理)添加下面一行: + + daemon.* /var/log/tecmint.log + +然后重启守护进程(注意服务名称不以 d 结尾): + + # systemctl restart rsyslog + +在随机重启两个守护进程之前和之后查看自定义日志的内容: + +![Linux 创建自定义日志文件](http://www.tecmint.com/wp-content/uploads/2015/08/Create-Custom-Log-File.png) + +创建自定义日志文件 + +作为一个自学练习,我建议你重点关注设备和优先级,添加额外的消息到已有的日志文件或者像上面那样创建一个新的日志文件。 + +### 使用 Logrotate 旋转日志 ### + +为了防止日志文件无限制增长,logrotate 工具用于旋转、压缩、移除或者通过电子邮件发送日志,从而减轻管理会产生大量日志文件系统的困难。 + +Logrotate 作为一个 cron 作业(/etc/cron.daily/logrotate)每天运行,并从 /etc/logrotate.conf 和 /etc/logrotate.d 中的文件(如果有的话)读取配置信息。 + +对于 rsyslog,即使你可以在主文件中为指定服务包含设置,为每个服务创建单独的配置文件能帮助你更好地组织设置。 + +让我们来看一个典型的 logrotate.conf: + +![Logrotate 配置](http://www.tecmint.com/wp-content/uploads/2015/08/Logrotate-Configuration.png) + +Logrotate 配置 + +在上面的例子中,logrotate 会为 /var/log/wtmp 进行以下操作:尝试每个月旋转一次,但至少文件要大于 1MB,然后用 0664 权限、用户 root、组 utmp 创建一个新的日志文件。下一步只保存一个归档日志,正如旋转指令指定的: + +![每月 Logrotate 日志](http://www.tecmint.com/wp-content/uploads/2015/08/Logrotate-Logs-Monthly.png) + +每月 Logrotate 日志 + +让我们再来看看 /etc/logrotate.d/httpd 中的另一个例子: + +![旋转 Apache 日志文件](http://www.tecmint.com/wp-content/uploads/2015/08/Rotate-Apache-Log-Files.png) + +旋转 Apache 日志文件 + +你可以在 logrotate 的 man 手册([man logrotate][4] 和 [man logrotate.conf][5])中阅读更多有关它的设置。为了方便你的阅读,本文还提供了两篇文章的 PDF 格式。 + +作为一个系统工程师,很可能由你决定多久按照什么格式保存一次日志,取决于你是否有一个单独的分区/逻辑卷给 /var。否则,你真的要考虑删除旧日志以节省存储空间。另一方面,根据你公司和客户内部的政策,为了以后的安全审核,你可能被迫要保留多个日志。 + +#### 保存日志到数据库 #### + +当然检查日志可能是一个很繁琐的工作(即使有类似 grep 工具和正则表达式的帮助)。因为这个原因,rsyslog 允许我们把它们导出到数据库(OTB 支持的关系数据库管理系统包括 MySQL、MariaDB、PostgreSQL 和 Oracle)。 + +指南的这部分假设你已经在要管理日志的 RHEL 7 上安装了 MariaDB 服务器和客户端: + + # yum update && yum install mariadb mariadb-server mariadb-client rsyslog-mysql + # systemctl enable mariadb && systemctl start mariadb + +然后使用 `mysql_secure_installation` 工具为 root 用户设置密码以及其它安全考量: + + +![保证 MySQL 数据库安全](http://www.tecmint.com/wp-content/uploads/2015/08/Secure-MySQL-Database.png) + +保证 MySQL 数据库安全 + +注意:如果你不想用 MariaDB root 用户插入日志消息到数据库,你也可以配置用另一个用户账户。如何实现的介绍已经超出了本文的范围,但在 [MariaDB 知识][6] 中有详细解析。为了简单在这篇指南中我们会使用 root 账户。 + +下一步,从 [GitHub][7] 下载 createDB.sql 脚本并导入到你的数据库服务器: + + # mysql -u root -p < createDB.sql + +![保存服务器日志到数据库](http://www.tecmint.com/wp-content/uploads/2015/08/Save-Server-Logs-to-Database.png) + +保存服务器日志到数据库 + +最后,添加下面的行到 /etc/rsyslog.conf: + + $ModLoad ommysql + $ActionOmmysqlServerPort 3306 + *.* :ommysql:localhost,Syslog,root,YourPasswordHere + +重启 rsyslog 和数据库服务器: + + # systemctl restart rsyslog + # systemctl restart mariadb + +#### 使用 SQL 语法查询日志 #### + +现在执行一些会改变日志的操作(例如停止和启动服务),然后登陆到你的 DB 服务器并使用标准的 SQL 命令显示和查询日志: + + USE Syslog; + SELECT ReceivedAt, Message FROM SystemEvents; + +![在数据库中查询日志](http://www.tecmint.com/wp-content/uploads/2015/08/Query-Logs-in-Database.png) + +在数据库中查询日志 + +### 总结 ### + +在这篇文章中我们介绍了如何设置系统日志,如果旋转日志以及为了简化查询如何重定向消息到数据库。我们希望这些技巧能对你准备 [RHCE 考试][8] 和日常工作有所帮助。 + +正如往常,非常欢迎你的反馈。用下面的表单和我们联系吧。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-linux-system-logs-using-rsyslogd-and-logrotate/ + +作者:[Gabriel Cánepa][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) +校对:[校对者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/wp-content/pdf/rsyslogd.pdf +[2]:http://www.tecmint.com/wp-content/pdf/rsyslog.conf.pdf +[3]:https://tools.ietf.org/html/rfc3164#section-4.1.1 +[4]:http://www.tecmint.com/wp-content/pdf/logrotate.pdf +[5]:http://www.tecmint.com/wp-content/pdf/logrotate.conf.pdf +[6]:https://mariadb.com/kb/en/mariadb/create-user/ +[7]:https://github.com/sematext/rsyslog/blob/master/plugins/ommysql/createDB.sql +[8]:http://www.tecmint.com/how-to-setup-and-configure-static-network-routing-in-rhel/ +[9]:https://en.wikipedia.org/wiki/Log_rotation \ No newline at end of file From f424915eed5fa48b0f9a609067c787113fde8e74 Mon Sep 17 00:00:00 2001 From: Yu Ye Date: Sat, 29 Aug 2015 09:43:45 +0800 Subject: [PATCH 1918/2517] Update 20141223 Defending the Free Linux World.md --- sources/talk/20141223 Defending the Free Linux World.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20141223 Defending the Free Linux World.md b/sources/talk/20141223 Defending the Free Linux World.md index 0df2a47383..df53b9c93f 100644 --- a/sources/talk/20141223 Defending the Free Linux World.md +++ b/sources/talk/20141223 Defending the Free Linux World.md @@ -1,3 +1,5 @@ +Translating by H-mudcup Again...... + Defending the Free Linux World ================================================================================ ![](http://www.linuxinsider.com/ai/908455/open-invention-network.jpg) From 31a919a84c882ca402dc7324dd3b57045890eb26 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 29 Aug 2015 12:32:45 +0800 Subject: [PATCH 1919/2517] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E7=AD=BE?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sign.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/sign.md b/sign.md index ea83b53f1f..1c413aba40 100644 --- a/sign.md +++ b/sign.md @@ -1,8 +1,22 @@ + --- -via: +via:来源链接 -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 +作者:[作者名][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译, +[Linux中国](https://linux.cn/) 荣誉推出 +[a]:作者链接 +[1]:文内链接 +[2]: +[3]: +[4]: +[5]: +[6]: +[7]: +[8]: +[9]: \ No newline at end of file From 53cecac710138a5a60d74921296edef427bd3a7b Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 29 Aug 2015 17:31:20 +0800 Subject: [PATCH 1920/2517] PUB:20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux @wyangsun --- ... Tool to Setup IPsec Based VPN in Linux.md | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) rename {translated/tech => published}/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md (60%) diff --git a/translated/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md b/published/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md similarity index 60% rename from translated/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md rename to published/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md index 3c16463951..22e50e355d 100644 --- a/translated/tech/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md +++ b/published/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md @@ -1,5 +1,6 @@ -安装Strongswan - Linux上一个基于IPsec的vpn工具 +安装 Strongswan :Linux 上一个基于 IPsec 的 VPN 工具 ================================================================================ + IPsec是一个提供网络层安全的标准。它包含认证头(AH)和安全负载封装(ESP)组件。AH提供包的完整性,ESP组件提供包的保密性。IPsec确保了在网络层的安全特性。 - 保密性 @@ -7,27 +8,27 @@ IPsec是一个提供网络层安全的标准。它包含认证头(AH)和安全 - 来源不可抵赖性 - 重放攻击防护 -[Strongswan][1]是一个IPsec协议实现的开源代码,Strongswan代表强壮开源广域网(StrongS/WAN)。它支持IPsec的VPN两个版本的密钥自动交换(网络密钥交换(IKE)V1和V2)。 +[Strongswan][1]是一个IPsec协议的开源代码实现,Strongswan的意思是强安全广域网(StrongS/WAN)。它支持IPsec的VPN中的两个版本的密钥自动交换(网络密钥交换(IKE)V1和V2)。 -Strongswan基本上提供了自动交换密钥共享VPN两个节点或网络,然后它使用Linux内核的IPsec(AH和ESP)实现。密钥共享使用了IKE机制的特性使用ESP编码数据。在IKE阶段,strongswan使用OpenSSL加密算法(AES,SHA等等)和其他加密类库。无论如何,ESP组成IPsec使用的安全算法,它是Linux内核实现的。Strongswan的主要特性是下面这些。 +Strongswan基本上提供了在VPN的两个节点/网关之间自动交换密钥的共享,然后它使用了Linux内核的IPsec(AH和ESP)实现。密钥共享使用了之后用于ESP数据加密的IKE 机制。在IKE阶段,strongswan使用OpenSSL的加密算法(AES,SHA等等)和其他加密类库。无论如何,IPsec中的ESP组件使用的安全算法是由Linux内核实现的。Strongswan的主要特性如下: - x.509证书或基于预共享密钥认证 - 支持IKEv1和IKEv2密钥交换协议 -- 可选内置插件和库的完整性和加密测试 -- 支持椭圆曲线DH群体和ECDSA证书 +- 可选的,对于插件和库的内置完整性和加密测试 +- 支持椭圆曲线DH群和ECDSA证书 - 在智能卡上存储RSA私钥和证书 -它能被使用在客户端或服务器(road warrior模式)和网关到网关的情景。 +它能被使用在客户端/服务器(road warrior模式)和网关到网关的情景。 ### 如何安装 ### -几乎所有的Linux发行版都支持Strongswan的二进制包。在这个教程,我们将从二进制包安装strongswan也编译strongswan合适的特性的源代码。 +几乎所有的Linux发行版都支持Strongswan的二进制包。在这个教程,我们会从二进制包安装strongswan,也会从源代码编译带有合适的特性的strongswan。 ### 使用二进制包 ### 可以使用以下命令安装Strongswan到Ubuntu 14.04 LTS - $sudo aptitude install strongswan + $ sudo aptitude install strongswan ![安装strongswan](http://blog.linoxide.com/wp-content/uploads/2014/12/strongswan-binary.png) @@ -35,35 +36,35 @@ strongswan的全局配置(strongswan.conf)文件和ipsec配置(ipsec.conf/ ### strongswan源码编译安装的依赖包 ### -- GMP(strongswan使用的Mathematical/Precision 库) -- OpenSSL(加密算法在这个库里) -- PKCS(1,7,8,11,12)(证书编码和智能卡与Strongswan集成) +- GMP(strongswan使用的高精度数学库) +- OpenSSL(加密算法来自这个库) +- PKCS(1,7,8,11,12)(证书编码和智能卡集成) #### 步骤 #### **1)** 在终端使用下面命令到/usr/src/目录 - $cd /usr/src + $ cd /usr/src **2)** 用下面命令从strongswan网站下载源代码 - $sudo wget http://download.strongswan.org/strongswan-5.2.1.tar.gz + $ sudo wget http://download.strongswan.org/strongswan-5.2.1.tar.gz -(strongswan-5.2.1.tar.gz 是最新版。) +(strongswan-5.2.1.tar.gz 是当前最新版。) ![下载软件](http://blog.linoxide.com/wp-content/uploads/2014/12/download_strongswan.png) -**3)** 用下面命令提取下载软件,然后进入目录。 +**3)** 用下面命令提取下载的软件,然后进入目录。 - $sudo tar –xvzf strongswan-5.2.1.tar.gz; cd strongswan-5.2.1 + $ sudo tar –xvzf strongswan-5.2.1.tar.gz; cd strongswan-5.2.1 **4)** 使用configure命令配置strongswan每个想要的选项。 - ./configure --prefix=/usr/local -–enable-pkcs11 -–enable-openssl + $ ./configure --prefix=/usr/local -–enable-pkcs11 -–enable-openssl ![检查strongswan包](http://blog.linoxide.com/wp-content/uploads/2014/12/strongswan-configure.png) -如果GMP库没有安装,然后配置脚本将会发生下面的错误。 +如果GMP库没有安装,配置脚本将会发生下面的错误。 ![GMP library error](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-error.png) @@ -71,19 +72,19 @@ strongswan的全局配置(strongswan.conf)文件和ipsec配置(ipsec.conf/ ![gmp installation](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-installation1.png) -无论如何,如果GMP已经安装而且还一致报错,然后在Ubuntu上使用下面命令创建libgmp.so库的软连到/usr/lib,/lib/,/usr/lib/x86_64-linux-gnu/路径下。 +不过,如果GMP已经安装还报上述错误的话,在Ubuntu上使用如下命令,给在路径 /usr/lib,/lib/,/usr/lib/x86_64-linux-gnu/ 下的libgmp.so库创建软连接。 $ sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10.1.3 /usr/lib/x86_64-linux-gnu/libgmp.so ![softlink of libgmp.so library](http://blog.linoxide.com/wp-content/uploads/2014/12/softlink.png) -创建libgmp.so软连后,再执行./configure脚本也许就找到gmp库了。无论如何,gmp头文件也许发生其他错误,像下面这样。 +创建libgmp.so软连接后,再执行./configure脚本也许就找到gmp库了。然而,如果gmp头文件发生其他错误,像下面这样。 ![GMP header file issu](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-header.png) 为解决上面的错误,使用下面命令安装libgmp-dev包 - $sudo aptitude install libgmp-dev + $ sudo aptitude install libgmp-dev ![Installation of Development library of GMP](http://blog.linoxide.com/wp-content/uploads/2014/12/gmp-dev.png) @@ -105,7 +106,7 @@ via: http://linoxide.com/security/install-strongswan/ 作者:[nido][a] 译者:[wyangsun](https://github.com/wyangsun) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2a6de5a73155cb54c5d25c6b939705e11b5ad35e Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 29 Aug 2015 17:56:20 +0800 Subject: [PATCH 1921/2517] PUB:20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @oska874 这似乎是你的第一篇翻译?翻译的不错! --- ...un Ubuntu Snappy Core on Raspberry Pi 2.md | 89 +++++++++++++++++++ ...un Ubuntu Snappy Core on Raspberry Pi 2.md | 89 ------------------- 2 files changed, 89 insertions(+), 89 deletions(-) create mode 100644 published/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md delete mode 100644 translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md diff --git a/published/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md b/published/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md new file mode 100644 index 0000000000..c36ae7adb7 --- /dev/null +++ b/published/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md @@ -0,0 +1,89 @@ +如何在树莓派 2 运行 ubuntu Snappy Core +================================================================================ +物联网(Internet of Things, IoT) 时代即将来临。很快,过不了几年,我们就会问自己当初是怎么在没有物联网的情况下生存的,就像我们现在怀疑过去没有手机的年代。Canonical 就是一个物联网快速发展却还是开放市场下的竞争者。这家公司宣称自己把赌注压到了IoT 上,就像他们已经在“云”上做过的一样。在今年一月底,Canonical 启动了一个基于Ubuntu Core 的小型操作系统,名字叫做 [Ubuntu Snappy Core][1] 。 + +Snappy 代表了两种意思,它是一种用来替代 deb 的新的打包格式;也是一个用来更新系统的前端,从CoreOS、红帽子和其他系统借鉴了**原子更新**这个想法。自从树莓派 2 投入市场,Canonical 很快就发布了用于树莓派的Snappy Core 版本。而第一代树莓派因为是基于ARMv6 ,Ubuntu 的ARM 镜像是基于ARMv7 ,所以不能运行ubuntu 。不过这种状况现在改变了,Canonical 通过发布 Snappy Core 的RPI2 镜像,抓住机会证明了Snappy 就是一个用于云计算,特别是用于物联网的系统。 + +Snappy 同样可以运行在其它像Amazon EC2, Microsofts Azure, Google的 Compute Engine 这样的云端上,也可以虚拟化在 KVM、Virtuabox 和vagrant 上。Canonical Ubuntu 已经拥抱了微软、谷歌、Docker、OpenStack 这些重量级选手,同时也与一些小项目达成合作关系。除了一些创业公司,比如 Ninja Sphere、Erle Robotics,还有一些开发板生产商,比如 Odroid、Banana Pro, Udoo, PCDuino 和 Parallella 、全志,Snappy 也提供了支持。Snappy Core 同时也希望尽快运行到路由器上来帮助改进路由器生产商目前很少更新固件的策略。 + +接下来,让我们看看怎么样在树莓派 2 上运行 Ubuntu Snappy Core。 + +用于树莓派2 的Snappy 镜像可以从 [Raspberry Pi 网站][2] 上下载。解压缩出来的镜像必须[写到一个至少8GB 大小的SD 卡][3]。尽管原始系统很小,但是原子升级和回滚功能会占用不小的空间。使用 Snappy 启动树莓派 2 后你就可以使用默认用户名和密码(都是ubuntu)登录系统。 + +![](https://farm8.staticflickr.com/7639/16428527263_f7bdd56a0d_c.jpg) + +sudo 已经配置好了可以直接用,安全起见,你应该使用以下命令来修改你的用户名 + + $ sudo usermod -l + +或者也可以使用`adduser` 为你添加一个新用户。 + +因为RPI缺少硬件时钟,而 Snappy Core 镜像并不知道这一点,所以系统会有一个小 bug:处理某些命令时会报很多错。不过这个很容易解决: + +使用这个命令来确认这个bug 是否影响: + + $ date + +如果输出类似 "Thu Jan 1 01:56:44 UTC 1970", 你可以这样做来改正: + + $ sudo date --set="Sun Apr 04 17:43:26 UTC 2015" + +改成你的实际时间。 + +![](https://farm9.staticflickr.com/8735/16426231744_c54d9b8877_b.jpg) + +现在你可能打算检查一下,看看有没有可用的更新。注意通常使用的命令是不行的: + + $ sudo apt-get update && sudo apt-get distupgrade + +这时系统不会让你通过,因为 Snappy 使用它自己精简过的、基于dpkg 的包管理系统。这么做的原因是 Snappy 会运行很多嵌入式程序,而同时你也会试图所有事情尽可能的简化。 + +让我们来看看最关键的部分,理解一下程序是如何与 Snappy 工作的。运行 Snappy 的SD 卡上除了 boot 分区外还有3个分区。其中的两个构成了一个重复的文件系统。这两个平行文件系统被固定挂载为只读模式,并且任何时刻只有一个是激活的。第三个分区是一个部分可写的文件系统,用来让用户存储数据。通过更新系统,标记为'system-a' 的分区会保持一个完整的文件系统,被称作核心,而另一个平行的文件系统仍然会是空的。 + +![](https://farm9.staticflickr.com/8758/16841251947_21f42609ce_b.jpg) + +如果我们运行以下命令: + + $ sudo snappy update + +系统将会在'system-b' 上作为一个整体进行更新,这有点像是更新一个镜像文件。接下来你将会被告知要重启系统来激活新核心。 + +重启之后,运行下面的命令可以检查你的系统是否已经更新到最新版本,以及当前被激活的是哪个核心 + + $ sudo snappy versions -a + +经过更新-重启两步操作,你应该可以看到被激活的核心已经被改变了。 + +因为到目前为止我们还没有安装任何软件,所以可以用下面的命令更新: + + $ sudo snappy update ubuntu-core + +如果你打算仅仅更新特定的OS 版本这就够了。如果出了问题,你可以使用下面的命令回滚: + + $ sudo snappy rollback ubuntu-core + +这将会把系统状态回滚到更新之前。 + +![](https://farm8.staticflickr.com/7666/17022676786_5fe6804ed8_c.jpg) + +再来说说那些让 Snappy 变得有用的软件。这里不会讲的太多关于如何构建软件、向 Snappy 应用商店添加软件的基础知识,但是你可以通过 Freenode 上的IRC 频道 #snappy 了解更多信息,那个上面有很多人参与。你可以通过浏览器访问http://\:4200 来浏览应用商店,然后从商店安装软件,再在浏览器里访问 http://webdm.local 来启动程序。如何构建用于 Snappy 的软件并不难,而且也有了现成的[参考文档][4] 。你也可以很容易的把 DEB 安装包使用Snappy 格式移植到Snappy 上。 + +![](https://farm8.staticflickr.com/7656/17022676836_968a2a7254_c.jpg) + +尽管 Ubuntu Snappy Core 吸引了我们去研究新型的 Snappy 安装包格式和 Canonical 式的原子更新操作,但是因为有限的可用应用,它现在在生产环境里还不是很有用。但是既然搭建一个 Snappy 环境如此简单,这看起来是一个学点新东西的好机会。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/ubuntu-snappy-core-raspberry-pi-2.html + +作者:[Ferdinand Thommes][a] +译者:[Ezio](https://github.com/oska874) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/ferdinand +[1]:http://www.ubuntu.com/things +[2]:http://www.raspberrypi.org/downloads/ +[3]:http://xmodulo.com/write-raspberry-pi-image-sd-card.html +[4]:https://developer.ubuntu.com/en/snappy/ diff --git a/translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md b/translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md deleted file mode 100644 index f5e6fe60b2..0000000000 --- a/translated/tech/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md +++ /dev/null @@ -1,89 +0,0 @@ -如何在树莓派2 代运行ubuntu Snappy Core -================================================================================ -物联网(Internet of Things, IoT) 时代即将来临。很快,过不了几年,我们就会问自己当初是怎么在没有物联网的情况下生存的,就像我们现在怀疑过去没有手机的年代。Canonical 就是一个物联网快速发展却还是开放市场下的竞争者。这家公司宣称自己把赌注压到了IoT 上,就像他们已经在“云”上做过的一样。。在今年一月底,Canonical 启动了一个基于Ubuntu Core 的小型操作系统,名字叫做 [Ubuntu Snappy Core][1] 。 - -Snappy 是一种用来替代deb 的新的打包格式,是一个用来更新系统的前端,从CoreOS、红帽子和其他系统借鉴了**原子更新**这个想法。树莓派2 代投入市场,Canonical 很快就发布了用于树莓派的Snappy Core 版本。而第一代树莓派因为是基于ARMv6 ,Ubuntu 的ARM 镜像是基于ARMv7 ,所以不能运行ubuntu 。不过这种状况现在改变了,Canonical 通过发布用于RPI2 的镜像,抓住机会证明了Snappy 就是一个用于云计算,特别是用于物联网的系统。 - -Snappy 同样可以运行在其它像Amazon EC2, Microsofts Azure, Google的 Compute Engine 这样的云端上,也可以虚拟化在KVM、Virtuabox 和vagrant 上。Canonical Ubuntu 已经拥抱了微软、谷歌、Docker、OpenStack 这些重量级选手,同时也与一些小项目达成合作关系。除了一些创业公司,比如Ninja Sphere、Erle Robotics,还有一些开发板生产商,比如Odroid、Banana Pro, Udoo, PCDuino 和Parallella 、全志,Snappy 也提供了支持。Snappy Core 同时也希望尽快运行到路由器上来帮助改进路由器生产商目前很少更新固件的策略。 - -接下来,让我们看看怎么样在树莓派2 上运行Snappy。 - -用于树莓派2 的Snappy 镜像可以从 [Raspberry Pi 网站][2] 上下载。解压缩出来的镜像必须[写到一个至少8GB 大小的SD 卡][3]。尽管原始系统很小,但是原子升级和回滚功能会占用不小的空间。使用Snappy 启动树莓派2 后你就可以使用默认用户名和密码(都是ubuntu)登录系统。 - -![](https://farm8.staticflickr.com/7639/16428527263_f7bdd56a0d_c.jpg) - -sudo 已经配置好了可以直接用,安全起见,你应该使用以下命令来修改你的用户名 - - $ sudo usermod -l - -或者也可以使用`adduser` 为你添加一个新用户。 - -因为RPI缺少硬件时钟,而Snappy 并不知道这一点,所以系统会有一个小bug:处理某些命令时会报很多错。不过这个很容易解决: - -使用这个命令来确认这个bug 是否影响: - - $ date - -如果输出是 "Thu Jan 1 01:56:44 UTC 1970", 你可以这样做来改正: - - $ sudo date --set="Sun Apr 04 17:43:26 UTC 2015" - -改成你的实际时间。 - -![](https://farm9.staticflickr.com/8735/16426231744_c54d9b8877_b.jpg) - -现在你可能打算检查一下,看看有没有可用的更新。注意通常使用的命令: - - $ sudo apt-get update && sudo apt-get distupgrade - -不过这时系统不会让你通过,因为Snappy 使用它自己精简过的、基于dpkg 的包管理系统。这么做的原因是Snappy 会运行很多嵌入式程序,而同时你也会想着所有事情尽可能的简化。 - -让我们来看看最关键的部分,理解一下程序是如何与Snappy 工作的。运行Snappy 的SD 卡上除了boot 分区外还有3个分区。其中的两个构成了一个重复的文件系统。这两个平行文件系统被固定挂载为只读模式,并且任何时刻只有一个是激活的。第三个分区是一个部分可写的文件系统,用来让用户存储数据。通过更新系统,标记为'system-a' 的分区会保持一个完整的文件系统,被称作核心,而另一个平行文件系统仍然会是空的。 - -![](https://farm9.staticflickr.com/8758/16841251947_21f42609ce_b.jpg) - -如果我们运行以下命令: - - $ sudo snappy update - -系统将会在'system-b' 上作为一个整体进行更新,这有点像是更新一个镜像文件。接下来你将会被告知要重启系统来激活新核心。 - -重启之后,运行下面的命令可以检查你的系统是否已经更新到最新版本,以及当前被激活的是那个核心 - - $ sudo snappy versions -a - -经过更新-重启两步操作,你应该可以看到被激活的核心已经被改变了。 - -因为到目前为止我们还没有安装任何软件,下面的命令: - - $ sudo snappy update ubuntu-core - -将会生效,而且如果你打算仅仅更新特定的OS 版本,这也是一个办法。如果出了问题,你可以使用下面的命令回滚: - - $ sudo snappy rollback ubuntu-core - -这将会把系统状态回滚到更新之前。 - -![](https://farm8.staticflickr.com/7666/17022676786_5fe6804ed8_c.jpg) - -再来说说那些让Snappy 有用的软件。这里不会讲的太多关于如何构建软件、向Snappy 应用商店添加软件的基础知识,但是你可以通过Freenode 上的IRC 频道#snappy 了解更多信息,那个上面有很多人参与。你可以通过浏览器访问http://:4200 来浏览应用商店,然后从商店安装软件,再在浏览器里访问http://webdm.local 来启动程序。如何构建用于Snappy 的软件并不难,而且也有了现成的[参考文档][4] 。你也可以很容易的把DEB 安装包使用Snappy 格式移植到Snappy 上。 - -![](https://farm8.staticflickr.com/7656/17022676836_968a2a7254_c.jpg) - -尽管Ubuntu Snappy Core 吸引我们去研究新型的Snappy 安装包格式和Canonical 式的原子更新操作,但是因为有限的可用应用,它现在在生产环境里还不是很有用。但是既然搭建一个Snappy 环境如此简单,这看起来是一个学点新东西的好机会。 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/ubuntu-snappy-core-raspberry-pi-2.html - -作者:[Ferdinand Thommes][a] -译者:[Ezio](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/ferdinand -[1]:http://www.ubuntu.com/things -[2]:http://www.raspberrypi.org/downloads/ -[3]:http://xmodulo.com/write-raspberry-pi-image-sd-card.html -[4]:https://developer.ubuntu.com/en/snappy/ From adbae49af57f326c1d1fe35127500786b65b8800 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 29 Aug 2015 18:32:52 +0800 Subject: [PATCH 1922/2517] PUB:20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04 @GOLinux --- ...The Update Information Is Outdated' In Ubuntu 14.04.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md (91%) diff --git a/translated/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md b/published/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md similarity index 91% rename from translated/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md rename to published/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md index cebfab93c4..c4a9e43e85 100644 --- a/translated/tech/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md +++ b/published/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md @@ -2,7 +2,7 @@ Ubuntu 14.04中修复“update information is outdated”错误 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/07/Fix_update_information_is_outdated.jpeg) -看到Ubuntu 14.04的顶部面板上那个显示下面这个错误的红色三角形了吗? +看到过Ubuntu 14.04的顶部面板上那个显示下面这个错误的红色三角形了吗? > 更新信息过时。该错误可能是由网络问题,或者某个仓库不再可用而造成的。请通过从指示器菜单中选择‘显示更新’来手动更新,然后查看是否存在有失败的仓库。 > @@ -25,7 +25,7 @@ Ubuntu 14.04中修复“update information is outdated”错误 ### 修复‘update information is outdated’错误 ### -这里讨论的‘解决方案’可能对Ubuntu的这些版本有用:Ubuntu 14.04,12.04或14.04。你所要做的仅仅是打开终端(Ctrl+Alt+T),然后使用下面的命令: +这里讨论的‘解决方案’可能对Ubuntu的这些版本有用:Ubuntu 14.04,12.04。你所要做的仅仅是打开终端(Ctrl+Alt+T),然后使用下面的命令: sudo apt-get update @@ -47,7 +47,7 @@ via: http://itsfoss.com/fix-update-information-outdated-ubuntu/ 作者:[Abhishek][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -56,4 +56,4 @@ via: http://itsfoss.com/fix-update-information-outdated-ubuntu/ [2]:http://itsfoss.com/notification-terminal-command-completion-ubuntu/ [3]:http://itsfoss.com/solve-gpg-error-signatures-verified-ubuntu/ [4]:http://itsfoss.com/install-spotify-ubuntu-1504/ -[5]:http://itsfoss.com/fix-update-errors-ubuntu-1404/ +[5]:https://linux.cn/article-5603-1.html From d446a10ccb58a74bafc829c2f0750e7acfaa6590 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 29 Aug 2015 18:33:20 +0800 Subject: [PATCH 1923/2517] [Translating] tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md --- ...Fix No Bootable Device Found Error After Installing Ubuntu.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md b/sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md index 3281a51137..3fac11eb35 100644 --- a/sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md +++ b/sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md @@ -1,3 +1,4 @@ +ictlyh Translating Fix No Bootable Device Found Error After Installing Ubuntu ================================================================================ Usually, I dual boot Ubuntu and Windows but this time I decided to go for a clean Ubuntu installation i.e. eliminating Windows completely. After the clean install of Ubuntu, I ended up with a screen saying **no bootable device found** instead of the Grub screen. Clearly, the installation messed up with the UEFI boot settings. From 2b0286e086dd8815070f8193c26800420de298fd Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 29 Aug 2015 19:19:02 +0800 Subject: [PATCH 1924/2517] [Translated] tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md --- ...ice Found Error After Installing Ubuntu.md | 98 ------------------- ...ice Found Error After Installing Ubuntu.md | 97 ++++++++++++++++++ 2 files changed, 97 insertions(+), 98 deletions(-) delete mode 100644 sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md create mode 100644 translated/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md diff --git a/sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md b/sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md deleted file mode 100644 index 3fac11eb35..0000000000 --- a/sources/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md +++ /dev/null @@ -1,98 +0,0 @@ -ictlyh Translating -Fix No Bootable Device Found Error After Installing Ubuntu -================================================================================ -Usually, I dual boot Ubuntu and Windows but this time I decided to go for a clean Ubuntu installation i.e. eliminating Windows completely. After the clean install of Ubuntu, I ended up with a screen saying **no bootable device found** instead of the Grub screen. Clearly, the installation messed up with the UEFI boot settings. - -![No Bootable Device Found After Installing Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_1.jpg) - -I am going to show you how I fixed **no bootable device found error after installing Ubuntu in Acer laptops**. It is important that I mention that I am using Acer Aspire R13 because we have to change things in firmware settings and those settings might look different from manufacturer to manufacturer and from device to device. - -So before you go on trying the steps mentioned here, let’s first see what state my computer was in during this error: - -- My Acer Aspire R13 came preinstalled with Windows 8.1 and with UEFI boot manager -- Secure boot was not turned off (my laptop has just come from repair and the service guy had put the secure boot on again, I did not know until I ran up in the problem). You can read this post to know [how disable secure boot in Acer laptops][1] -- I chose to install Ubuntu by erasing everything i.e. existing Windows 8.1, various partitions etc. -- After installing Ubuntu, I saw no bootable device found error while booting from the hard disk. Booting from live USB worked just fine - -In my opinion, not disabling the secure boot was the reason of this error. However, I have no data to backup my claim. It is just a hunch. Interestingly, dual booting Windows and Linux often ends up in common Grub issues like these two: - -- [error: no such partition grub rescue][2] -- [Minimal BASH like line editing is supported][3] - -If you are in similar situation, you can try the fix which worked for me. - -### Fix no bootable device found error after installing Ubuntu ### - -Pardon me for poor quality images. My OnePlus camera seems to be not very happy with my laptop screen. - -#### Step 1 #### - -Turn the power off and boot into boot settings. I had to press Fn+F2 (to press F2 key) on Acer Aspire R13 quickly. You have to be very quick with it if you are using SSD hard disk because SSDs are very fast in booting. Depending upon your manufacturer/model, you might need to use Del or F10 or F12 keys. - -#### Step 2 #### - -In the boot settings, make sure that Secure Boot is turned on. It should be under the Boot tab. - -#### Step 3 #### - -Go to Security tab and look for “Select an UEFI file as trusted for executing” and click enter. - -![Fix no bootable device found ](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_2.jpg) - -Just for your information, what we are going to do here is to add the UEFI settings file (it was generated while Ubuntu installation) among the trusted UEFI boots in your device. If you remember, UEFI boot’s main aim is to provide security and since Secure Boot was not disabled (perhaps) the device did not intend to boot from the newly installed OS. Adding it as trusted, kind of whitelisting, will let the device boot from the Ubuntu UEFI file. - -#### Step 4 #### - -You should see your hard disk like HDD0 etc here. If you have more than one hard disk, I hope you remember where did you install Ubuntu. Press Enter here as well. - -![Fix no bootable device found in boot settings](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_3.jpg) - -#### Step 5 #### - -You should see here. Press enter. - -![Fix settings in UEFI](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_4.jpg) - -#### Step 6 #### - -You’ll see in next screen. Don’t get impatient, you are almost there - -![Fixing boot error after installing Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_5.jpg) - -#### Step 7 #### - -You’ll see shimx64.efi, grubx64.efi and MokManager.efi file here. The important one is shimx64.efi here. Select it and click enter. - - -![Fix no bootable device found](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_6.jpg) - -In next screen, type Yes and click enter. - -![No_Bootable_Device_Found_7](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_7.jpg) - -#### Step 8 #### - -Once we have added it as trused EFI file to be executed, press F10 to save and exit. - -![Save and exist firmware settings](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_8.jpg) - -Reboot your system and this time you should be seeing the familiar Grub screen. Even if you do not see Grub screen, you should at least not be seeing “no bootable device found” screen anymore. You should be able to boot into Ubuntu. - -If your Grub screen was messed up after the fix but you got to login into it, you can reinstall Grub to boot into the familiar purple Grub screen of Ubuntu. - -I hope this tutorial helped you to fix no bootable device found error. Any questions or suggestions or a word of thanks is always welcomed. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/no-bootable-device-found-ubuntu/ - -作者:[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://itsfoss.com/disable-secure-boot-in-acer/ -[2]:http://itsfoss.com/solve-error-partition-grub-rescue-ubuntu-linux/ -[3]:http://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux/ \ No newline at end of file diff --git a/translated/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md b/translated/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md new file mode 100644 index 0000000000..91aa23d6aa --- /dev/null +++ b/translated/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md @@ -0,0 +1,97 @@ +修复安装完 Ubuntu 后无可引导设备错误 +================================================================================ +通常情况下,我启动 Ubuntu 和 Windows 双系统,但是这次我决定完全消除 Windows 纯净安装 Ubuntu。纯净安装 Ubuntu 完成后,结束时屏幕输出 **no bootable device found** 而不是进入 GRUB 界面。显然,安装搞砸了 UEFI 引导设置。 + +![安装完 Ubuntu 后无可引导设备](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_1.jpg) + +我会告诉你我是如何修复**在宏碁笔记本上安装 Ubuntu 后出现无可引导设备错误**。我声明了我使用的是宏碁灵越 R13,这很重要,因为我们需要更改固件设置,而这些设置可能因制造商和设备有所不同。 + +因此在你开始这里介绍的步骤之前,先看一下发生这个错误时我计算机的状态: + +- 我的宏碁灵越 R13 预装了 Windows8.1 和 UEFI 引导管理器 +- 关闭了 Secure boot(我的笔记本刚维修过,维修人员又启用了它,直到出现了问题我才发现)。你可以阅读这篇博文了解[如何在宏碁笔记本中关闭 secure boot][1] +- 我通过选择清除所有东西安装 Ubuntu,例如现有的 Windows 8.1,各种分区等。 +- 安装完 Ubuntu 之后,从硬盘启动时我看到无可引导设备错误。但能从 USB 设备正常启动 + +在我看来,没有禁用 secure boot 可能是这个错误的原因。但是,我没有数据支撑我的观点。这仅仅是预感。有趣的是,双系统启动 Windows 和 Linux 经常会出现这两个 Grub 问题: + +- [error: no such partition grub rescue][2] +- [Minimal BASH like line editing is supported][3] + +如果你遇到类似的情况,你可以试试我的修复方法。 + +### 修复安装完 Ubuntu 后无可引导设备错误 ### + +请原谅我没有丰富的图片。我的一加相机不能很好地拍摄笔记本屏幕。 + +#### 第一步 #### + +关闭电源并进入 boot 设置。我需要在宏碁灵越 R13 上快速地按 Fn+F2。如果你使用固态硬盘的话要按的非常快,因为固态硬盘启动速度很快。取决于你的制造商,你可能要用 Del 或 F10 或者 F12。 + +#### 第二步 #### + +在 boot 设置中,确保启用了 Secure Boot。它在 Boot 标签里。 + +#### 第三步 #### + +进入到 Security 标签,查找 “Select an UEFI file as trusted for executing” 并敲击回车。 + +![修复无可引导设备错误](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_2.jpg) + +特意说明,我们这一步是要在你的设备中添加 UEFI 设置文件(安装 Ubuntu 的时候生成)到可信 UEFI 启动。如果你记得的话,UEFI 启动的主要目的是提供安全性,由于(可能)没有禁用 Secure Boot,设备不会试图从新安装的操作系统中启动。添加它到类似白名单的可信列表,会使设备从 Ubuntu UEFI 文件启动。 + +#### 第四步 #### + +在这里你可以看到你的硬盘,例如 HDD0。如果你有多块硬盘,我希望你记住你安装 Ubuntu 的那块。同样敲击回车。 + +![在 Boot 设置中修复无可引导设备错误](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_3.jpg) + +#### 第五步 #### + +你应该可以看到 ,敲击回车。 + +![在 UEFI 中修复设置](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_4.jpg) + +#### 第六步 #### + +在下一个屏幕中你会看到 。耐心点,马上就好了。 + +![安装完 Ubuntu 后修复启动错误](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_5.jpg) + +#### 第七步 #### + +你可以看到 shimx64.efi,grubx64.efi 和 MokManager.efi 文件。重要的是 shimx64.efi。选中它并敲击回车。 + + +![修复无可引导设备](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_6.jpg) + +在下一个屏幕中,输入 Yes 并敲击回车。 + +![无可引导设备_7](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_7.jpg) + +#### 第八步 #### + +当我们添加它到可信 EFI 文件并执行时,按 F10 保存并退出。 + +![保存并退出固件设置](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_8.jpg) + +重启你的系统,这时你就可以看到熟悉的 GRUB 界面了。就算你没有看到 Grub 界面,起码也再也不会看到“无可引导设备”。你应该可以进入 Ubuntu 了。 + +如果修复后搞乱了你的 Grub 界面,但你确实能登录系统,你可以重装 Grub 并进入到 Ubuntu 熟悉的紫色 Grub 界面。 + +我希望这篇指南能帮助你修复无可引导设备错误。欢迎提出任何疑问、建议或者感谢。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/no-bootable-device-found-ubuntu/ + +作者:[Abhishek][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/disable-secure-boot-in-acer/ +[2]:http://itsfoss.com/solve-error-partition-grub-rescue-ubuntu-linux/ +[3]:http://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux/ \ No newline at end of file From 37f4d451aa96918883261e4212400c7a3fdb287d Mon Sep 17 00:00:00 2001 From: Yu Ye Date: Sat, 29 Aug 2015 20:20:20 +0800 Subject: [PATCH 1925/2517] Delete 20141223 Defending the Free Linux World.md --- ...20141223 Defending the Free Linux World.md | 127 ------------------ 1 file changed, 127 deletions(-) delete mode 100644 sources/talk/20141223 Defending the Free Linux World.md diff --git a/sources/talk/20141223 Defending the Free Linux World.md b/sources/talk/20141223 Defending the Free Linux World.md deleted file mode 100644 index df53b9c93f..0000000000 --- a/sources/talk/20141223 Defending the Free Linux World.md +++ /dev/null @@ -1,127 +0,0 @@ -Translating by H-mudcup Again...... - -Defending the Free Linux World -================================================================================ -![](http://www.linuxinsider.com/ai/908455/open-invention-network.jpg) - -**Co-opetition is a part of open source. The Open Invention Network model allows companies to decide where they will compete and where they will collaborate, explained OIN CEO Keith Bergelt. As open source evolved, "we had to create channels for collaboration. Otherwise, we would have hundreds of entities spending billions of dollars on the same technology."** - -The [Open Invention Network][1], or OIN, is waging a global campaign to keep Linux out of harm's way in patent litigation. Its efforts have resulted in more than 1,000 companies joining forces to become the largest defense patent management organization in history. - -The Open Invention Network was created in 2005 as a white hat organization to protect Linux from license assaults. It has considerable financial backing from original board members that include Google, IBM, NEC, Novell, Philips, [Red Hat][2] and Sony. Organizations worldwide have joined the OIN community by signing the free OIN license. - -Organizers founded the Open Invention Network as a bold endeavor to leverage intellectual property to protect Linux. Its business model was difficult to comprehend. It asked its members to take a royalty-free license and forever forgo the chance to sue other members over their Linux-oriented intellectual property. - -However, the surge in Linux adoptions since then -- think server and cloud platforms -- has made protecting Linux intellectual property a critically necessary strategy. - -Over the past year or so, there has been a shift in the Linux landscape. OIN is doing a lot less talking to people about what the organization is and a lot less explaining why Linux needs protection. There is now a global awareness of the centrality of Linux, according to Keith Bergelt, CEO of OIN. - -"We have seen a culture shift to recognizing how OIN benefits collaboration," he told LinuxInsider. - -### How It Works ### - -The Open Invention Network uses patents to create a collaborative environment. This approach helps ensure the continuation of innovation that has benefited software vendors, customers, emerging markets and investors. - -Patents owned by Open Invention Network are available royalty-free to any company, institution or individual. All that is required to qualify is the signer's agreement not to assert its patents against the Linux system. - -OIN ensures the openness of the Linux source code. This allows programmers, equipment vendors, independent software vendors and institutions to invest in and use Linux without excessive worry about intellectual property issues. This makes it more economical for companies to repackage, embed and use Linux. - -"With the diffusion of copyright licenses, the need for OIN licenses becomes more acute. People are now looking for a simpler or more utilitarian solution," said Bergelt. - -OIN legal defenses are free of charge to members. Members commit to not initiating patent litigation against the software in OIN's list. They also agree to offer their own patents in defense of that software. Ultimately, these commitments result in access to hundreds of thousands of patents cross-licensed by the network, Bergelt explained. - -### Closing the Legal Loopholes ### - -"What OIN is doing is very essential. It offers another layer of IP protection, said Greg R. Vetter, associate professor of law at the [University of Houston Law Center][3]. - -Version 2 of the GPL license is thought by some to provide an implied patent license, but lawyers always feel better with an explicit license, he told LinuxInsider. - -What OIN provides is something that bridges that gap. It also provides explicit coverage of the Linux kernel. An explicit patent license is not necessarily part of the GPLv2, but it was added in GPLv3, according to Vetter. - -Take the case of a code writer who produces 10,000 lines of code under GPLv3, for example. Over time, other code writers contribute many more lines of code, which adds to the IP. The software patent license provisions in GPLv3 would protect the use of the entire code base under all of the participating contributors' patents, Vetter said. - -### Not Quite the Same ### - -Patents and licenses are overlapping legal constructs. Figuring out how the two entities work with open source software can be like traversing a minefield. - -"Licenses are legal constructs granting additional rights based on, typically, patent and copyright laws. Licenses are thought to give a permission to do something that might otherwise be infringement of someone else's IP rights," Vetter said. - -Many free and open source licenses (such as the Mozilla Public License, the GNU GPLv3, and the Apache Software License) incorporate some form of reciprocal patent rights clearance. Older licenses like BSD and MIT do not mention patents, Vetter pointed out. - -A software license gives someone else certain rights to use the code the programmer created. Copyright to establish ownership is automatic, as soon as someone writes or draws something original. However, copyright covers only that particular expression and derivative works. It does not cover code functionality or ideas for use. - -Patents cover functionality. Patent rights also can be licensed. A copyright may not protect how someone independently developed implementation of another's code, but a patent fills this niche, Vetter explained. - -### Looking for Safe Passage ### - -The mixing of license and patent legalities can appear threatening to open source developers. For some, even the GPL qualifies as threatening, according to William Hurley, cofounder of [Chaotic Moon Studios][4] and [IEEE][5] Computer Society member. - -"Way back in the day, open source was a different world. Driven by mutual respect and a view of code as art, not property, things were far more open than they are today. I believe that many efforts set upon with the best of intentions almost always end up bearing unintended consequences," Hurley told LinuxInsider. - -Surpassing the 1,000-member mark might carry a mixed message about the significance of intellectual property right protection, he suggested. It might just continue to muddy the already murky waters of today's open source ecosystem. - -"At the end of the day, this shows some of the common misconceptions around intellectual property. Having thousands of developers does not decrease risk -- it increases it. The more developers licensing the patents, the more valuable they appear to be," Hurley said. "The more valuable they appear to be, the more likely someone with similar patents or other intellectual property will try to take advantage and extract value for their own financial gain." - -### Sharing While Competing ### - -Co-opetition is a part of open source. The OIN model allows companies to decide where they will compete and where they will collaborate, explained Bergelt. - -"Many of the changes in the evolution of open source in terms of process have moved us into a different direction. We had to create channels for collaboration. Otherwise, we would have hundreds of entities spending billions of dollars on the same technology," he said. - -A glaring example of this is the early evolution of the cellphone industry. Multiple standards were put forward by multiple companies. There was no sharing and no collaboration, noted Bergelt. - -"That damaged our ability to access technology by seven to 10 years in the U.S. Our experience with devices was far behind what everybody else in the world had. We were complacent with GSM (Global System for Mobile Communications) while we were waiting for CDMA (Code Division Multiple Access)," he said. - -### Changing Landscape ### - -OIN experienced a growth surge of 400 new licensees in the last year. That is indicative of a new trend involving open source. - -"The marketplace reached a critical mass where finally people within organizations recognized the need to explicitly collaborate and to compete. The result is doing both at the same time. This can be messy and taxing," Bergelt said. - -However, it is a sustainable transformation driven by a cultural shift in how people think about collaboration and competition. It is also a shift in how people are embracing open source -- and Linux in particular -- as the lead project in the open source community, he explained. - -One indication is that most significant new projects are not being developed under the GPLv3 license. - -### Two Better Than One ### - -"The GPL is incredibly important, but the reality is there are a number of licensing models being used. The relative addressability of patent issues is generally far lower in Eclipse and Apache and Berkeley licenses that it is in GPLv3," said Bergelt. - -GPLv3 is a natural complement for addressing patent issues -- but the GPL is not sufficient on its own to address the issues of potential conflicts around the use of patents. So OIN is designed as a complement to copyright licenses, he added. - -However, the overlap of patent and license may not do much good. In the end, patents are for offensive purposes -- not defensive -- in almost every case, Bergelt suggested. - -"If you are not prepared to take legal action against others, then a patent may not be the best form of legal protection for your intellectual properties," he said. "We now live in a world where the misconceptions around software, both open and proprietary, combined with an ill-conceived and outdated patent system, leave us floundering as an industry and stifling innovation on a daily basis," he said. - -### Court of Last Resort ### - -It would be nice to think the presence of OIN has dampened a flood of litigation, Bergelt said, or at the very least, that OIN's presence is neutralizing specific threats. - -"We are getting people to lay down their arms, so to say. At the same time, we are creating a new cultural norm. Once you buy into patent nonaggression in this model, the correlative effect is to encourage collaboration," he observed. - -If you are committed to collaboration, you tend not to rush to litigation as a first response. Instead, you think in terms of how can we enable you to use what we have and make some money out of it while we use what you have, Bergelt explained. - -"OIN is a multilateral solution. It encourages signers to create bilateral agreements," he said. "That makes litigation the last course of action. That is where it should be." - -### Bottom Line ### - -OIN is working to prevent Linux patent challenges, Bergelt is convinced. There has not been litigation in this space involving Linux. - -The only thing that comes close are the mobile wars with Microsoft, which focus on elements high in the stack. Those legal challenges may be designed to raise the cost of ownership involving the use of Linux products, Bergelt noted. - -Still, "these are not Linux-related law suits," he said. "They do not focus on what is core to Linux. They focus on what is in the Linux system." - --------------------------------------------------------------------------------- - -via: http://www.linuxinsider.com/story/Defending-the-Free-Linux-World-81512.html - -作者:Jack M. Germain -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.openinventionnetwork.com/ -[2]:http://www.redhat.com/ -[3]:http://www.law.uh.edu/ -[4]:http://www.chaoticmoon.com/ -[5]:http://www.ieee.org/ From 1a9f35cfa6c6caff0a8355783854023ed6637ab9 Mon Sep 17 00:00:00 2001 From: Yu Ye Date: Sat, 29 Aug 2015 20:21:08 +0800 Subject: [PATCH 1926/2517] Create 20141223 Defending the Free Linux World.md --- ...20141223 Defending the Free Linux World.md | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 translated/talk/20141223 Defending the Free Linux World.md diff --git a/translated/talk/20141223 Defending the Free Linux World.md b/translated/talk/20141223 Defending the Free Linux World.md new file mode 100644 index 0000000000..cabc8af041 --- /dev/null +++ b/translated/talk/20141223 Defending the Free Linux World.md @@ -0,0 +1,127 @@ +Translating by H-mudcup + +守卫自由的Linux世界 +================================================================================ +![](http://www.linuxinsider.com/ai/908455/open-invention-network.jpg) + +**"合作是开源的一部分。OIN的CEO Keith Bergelt解释说,开放创新网络(Open Invention Network)模式允许众多企业和公司决定它们该在哪较量,在哪合作。随着开源的演变,“我们需要为合作创造渠道。否则我们将会有几百个团体把数十亿美元花费到同样的技术上。”** + +[开放创新网络(Open Invention Network)][1],既OIN,正在全球范围内开展让 Linux 远离专利诉讼的伤害的活动。它的努力得到了一千多个公司的热烈回应,它们的加入让这股力量成为了历史上最大的反专利管理组织。 + +开放创新网络以白帽子组织的身份创建于2005年,目的是保护 Linux 免受来自许可证方面的困扰。包括Google、 IBM、 NEC、 Novell、 Philips、 [Red Hat][2] 和 Sony这些成员的董事会给予了它可观的经济支持。世界范围内的多个组织通过签署自由 OIN 协议加入了这个社区。 + +创立开放创新网络的组织成员把它当作利用知识产权保护 Linux 的大胆尝试。它的商业模式非常的难以理解。它要求它的成员持无专利证并永远放弃由于 Linux 相关知识产权起诉其他成员的机会。 + +然而,从 Linux 收购风波——想想服务器和云平台——那时起,保护 Linux 知识产权的策略就变得越加的迫切。 + +在过去的几年里,Linux 的版图曾经历了一场变革。OIN 不必再向人们解释这个组织的定义,也不必再解释为什么 Linux 需要保护。据 OIN 的 CEO Keith Bergelt 说,现在 Linux 的重要性得到了全世界的关注。 + +“我们已经见到了一场人们了解到OIN如何让合作受益的文化变革,”他对 LinuxInsider 说。 + +### 如何运作 ### + +开放创新网络使用专利权的方式创建了一个协作环境。这种方法有助于确保创新的延续。这已经使很多软件商贩、顾客、新型市场和投资者受益。 + +开放创新网络的专利证可以让任何公司、公共机构或个人免版权使用。这些权利的获得建立在签署者同意不会专为了维护专利而攻击 Linux 系统的基础上。 + +OIN 确保 Linux 的源代码保持开放的状态。这让编程人员、设备出售人员、独立软件开发者和公共机构在投资和使用 Linux 时不用过多的担心知识产权的问题。这让对 Linux 进行重新装配、嵌入和使用的公司省了不少钱。 + +“随着版权许可证越来越广泛的使用,对 OIN 许可证的需求也变得更加的迫切。现在,人们正在寻找更加简单或更功利的解决方法”,Bergelt 说。 + +OIN 法律防御援助对成员是免费的。成员必须承诺不对 OIN 名单带上的软件发起专利诉讼。为了保护该软件,他们也同意提供他们自己的专利。最终,这些保证将导致几十万的交叉许可通过网络连接,Bergelt 如此解释道。 + +### 填补法律漏洞 ### + +“OIN 正在做的事情是非常必要的。它提供额另一层 IP 保护,”[休斯顿法律中心大学][3]的副教授 Greg R. Vetter 这样说道。 + +他回答 LinuxInsider 说,某些人设想的第二版 GPL 许可证会隐含的提供专利许可,但是律师们更喜欢明确的许可。 + +OIN 所提供的许可填补了这个空白。它还明确的覆盖了 Linux 核心。据 Vetter 说,明确的专利许可并不是 GPLv2 中的必要部分,但是这个部分曾在 GPLv3 中。 + +拿一个在 GPLv3 中写了10000行代码的代码编写者来说。随着时间推移,其他的代码编写者会贡献更多行的代码到 IP 中。GPLv3 中的软件专利许可条款将保护所有基于参与其中的贡献者的专利的全部代码的使用,Vetter 如此说道。 + +### 并不完全一样 ### + +专利权和许可证在法律结构上层层叠叠互相覆盖。弄清两者对开源软件的作用就像是穿越雷区。 + +Vetter 说“许可证是授予通常是建立在专利和版权法律上的额外权利的法律结构。许可证被认为是给予了人们做一些的可能会侵犯到其他人的 IP 权利的事的许可。” + +Vetter 指出,很多自由开源许可证(例如 Mozilla 公共许可、GNU、GPLv3 以及 Apache 软件许可)融合了某些互惠专利权的形式。Vetter 指出,像 BSD 和 MIT 这样旧的许可证不会提到专利。 + +一个软件的许可证让其他人可以在某种程度上使用这个编程人员创造的代码。版权对所属权的建立是自动的,只要某个人写或者画了某个原创的东西。然而,版权只覆盖了个别的表达方式和衍生的作品。他并没有涵盖代码的功能性或可用的想法。 + +专利涵盖了功能性。专利权还可以成为许可证。版权可能无法保护某人如何独立的对另一个人的代码的实现的开发,但是专利填补了这个小瑕疵,Vetter 解释道。 + +### 寻找安全通道 ### + +许可证和专利混合的法律性质可能会对开源开发者产生威胁。据 [Chaotic Moon Studios][4] 的创办者之一、 [IEEE][5] 计算机协会成员 William Hurley 说,对于某些人来说即使是 GPL 也会成为威胁。 + +"在很久以前,开源是个完全不同的世界。被彼此间的尊重和把代码视为艺术而非资产的观点所驱动,那时的程序和代码比现在更加的开放。我相信很多为最好的意图所做的努力几乎最后总是背负着意外的结果,"Hurley 这样告诉 LinuxInsider。 + +他暗示说,成员人数超越了1000人可能带来了一个关于知识产权保护重要性的混乱信息。这可能会继续搅混开源生态系统这滩浑水。 + +“最终,这些显现出了围绕着知识产权的常见的一些错误概念。拥有几千个开发者并不会减少风险——而是增加。给专利许可的开发者越多,它们看起来就越值钱,”Hurley 说。“它们看起来越值钱,有着类似专利的或者其他知识产权的人就越可能试图利用并从中榨取他们自己的经济利益。” + +### 共享与竞争共存 ### + +竞合策略是开源的一部分。OIN 模型让各个公司能够决定他们将在哪竞争以及在哪合作,Bergelt 解释道。 + +“开源演化中的许多改变已经把我们移到了另一个方向上。我们必须为合作创造渠道。否则我们将会有几百个团体把数十亿美元花费到同样的技术上,”他说。 + +手机产业的革新就是个很好的例子。各个公司放出了不同的标准。没有共享,没有合作,Bergelt 解释道。 + +他说:“这让我们在美国接触技术的能力落后了七到五年。我们接触设备的经验远远落后于世界其他地方的人。在我们等待 CDMA (Code Division Multiple Access 码分多址访问通信技术)时自满于 GSM (Global System for Mobile Communications 全球移动通信系统)。” + +### 改变格局 ### + +OIN 在去年经历了增长了400个新许可的浪潮。这意味着着开源有了新趋势。 + +Bergelt 说:“市场到达了一个临界点,组织内的人们终于意识到直白地合作和竞争的需要。结果是两件事同时进行。这可能会变得复杂、费力。” + +然而,这个由人们开始考虑合作和竞争的文化革新所驱动的转换过程是可以忍受的。他解释说,这也是人们在以把开源作为开源社区的最重要的工程的方式拥抱开源——尤其是 Linux——的转变。 + +还有一个迹象是,最具意义的新工程都没有在 GPLv3 许可下开发。 + +### 二个总比一个好 ### + +“GPL 极为重要,但是事实是有一堆的许可模型正被使用着。在Eclipse、Apache 和 Berkeley 许可中,专利问题的相对可解决性通常远远低于在 GPLv3 中的。”Bergelt 说。 + +GPLv3 对于解决专利问题是个自然的补充——但是 GPL 自身不足以独自解决围绕专利使用的潜在冲突。所以 OIN 的设计是以能够补充版权许可为目的的,他补充道。 + +然而,层层叠叠的专利和许可也许并没有带来多少好处。到最后,专利在几乎所有的案例中都被用于攻击目的——而不是防御目的,Bergelt 暗示说。 + +“如果你不准备对其他人采取法律行动,那么对于你的知识财产来说专利可能并不是最佳的法律保护方式”,他说。“我们现在生活在一个对软件——开放和专有——误会重重的世界里。这些软件还被错误并过时的专利系统所捆绑。我们每天在工业化的被窒息的创新中挣扎”,他说。 + +### 法院是最后的手段### + +想到 OIN 的出现抑制了诉讼的泛滥就感到十分欣慰,Bergelt 说,或者至少可以说 OIN 的出现扼制了特定的某些威胁。 + +“可以说我们让人们放下它们了的武器。同时我们正在创建一种新的文化规范。一旦你入股这个模型中的非侵略专利,所产生的相关影响就是对合作的鼓励”,他说。 + +如果你愿意承诺合作,你的第一反应就会趋向于不急着起诉。相反的,你会想如何让我们允许你使用我们所拥有的东西并让它为你赚钱,而同时我们也能使用你所拥有的东西,Bergelt 解释道。 + +“OIN 是个多面的解决方式。他鼓励签署者创造双赢协议”,他说。“这让起诉成为最逼不得已的行为。那才是它的位置。” + +### 底线### + +Bergelt 坚信,OIN 的运作是为了阻止 Linux 受到专利伤害。在 Linux 的世界里没有诉讼的地方。 + +唯一临近的是和微软的移动大战,这主要关系到堆栈中高的元素。那些来自法律的挑战可能是为了提高包括使用 Linux 产品的所属权的成本,Bergelt 说。 + +尽管如此“这些并不是有关 Linux 诉讼”,他说。“他们的重点并不在于 Linux 的核心。他们关注的是 Linux 系统里都有些什么。” + +-------------------------------------------------------------------------------- + +via: http://www.linuxinsider.com/story/Defending-the-Free-Linux-World-81512.html + +作者:Jack M. Germain +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.openinventionnetwork.com/ +[2]:http://www.redhat.com/ +[3]:http://www.law.uh.edu/ +[4]:http://www.chaoticmoon.com/ +[5]:http://www.ieee.org/ From 2a0ce7cbfbf700299cc62c8a6fed50d829ddb3cc Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 29 Aug 2015 23:51:27 +0800 Subject: [PATCH 1927/2517] PUB:20150803 Troubleshooting with Linux Logs @strugglingyouth --- ...0150803 Troubleshooting with Linux Logs.md | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150803 Troubleshooting with Linux Logs.md (61%) diff --git a/translated/tech/20150803 Troubleshooting with Linux Logs.md b/published/20150803 Troubleshooting with Linux Logs.md similarity index 61% rename from translated/tech/20150803 Troubleshooting with Linux Logs.md rename to published/20150803 Troubleshooting with Linux Logs.md index 5950a69d98..ca117d8af3 100644 --- a/translated/tech/20150803 Troubleshooting with Linux Logs.md +++ b/published/20150803 Troubleshooting with Linux Logs.md @@ -1,10 +1,11 @@ 在 Linux 中使用日志来排错 ================================================================================ -人们创建日志的主要原因是排错。通常你会诊断为什么问题发生在你的 Linux 系统或应用程序中。错误信息或一些列事件可以给你提供造成根本原因的线索,说明问题是如何发生的,并指出如何解决它。这里有几个使用日志来解决的样例。 + +人们创建日志的主要原因是排错。通常你会诊断为什么问题发生在你的 Linux 系统或应用程序中。错误信息或一系列的事件可以给你提供找出根本原因的线索,说明问题是如何发生的,并指出如何解决它。这里有几个使用日志来解决的样例。 ### 登录失败原因 ### -如果你想检查你的系统是否安全,你可以在验证日志中检查登录失败的和登录成功但可疑的用户。当有人通过不正当或无效的凭据来登录时会出现认证失败,经常使用 SSH 进行远程登录或 su 到本地其他用户来进行访问权。这些是由[插入式验证模块][1]来记录,或 PAM 进行短期记录。在你的日志中会看到像 Failed 这样的字符串密码和未知的用户。成功认证记录包括像 Accepted 这样的字符串密码并打开会话。 +如果你想检查你的系统是否安全,你可以在验证日志中检查登录失败的和登录成功但可疑的用户。当有人通过不正当或无效的凭据来登录时会出现认证失败,这通常发生在使用 SSH 进行远程登录或 su 到本地其他用户来进行访问权时。这些是由[插入式验证模块(PAM)][1]来记录的。在你的日志中会看到像 Failed password 和 user unknown 这样的字符串。而成功认证记录则会包括像 Accepted password 和 session opened 这样的字符串。 失败的例子: @@ -30,22 +31,21 @@ 由于没有标准格式,所以你需要为每个应用程序的日志使用不同的命令。日志管理系统,可以自动分析日志,将它们有效的归类,帮助你提取关键字,如用户名。 -日志管理系统可以使用自动解析功能从 Linux 日志中提取用户名。这使你可以看到用户的信息,并能单个的筛选。在这个例子中,我们可以看到,root 用户登录了 2700 次,因为我们筛选的日志显示尝试登录的只有 root 用户。 +日志管理系统可以使用自动解析功能从 Linux 日志中提取用户名。这使你可以看到用户的信息,并能通过点击过滤。在下面这个例子中,我们可以看到,root 用户登录了 2700 次之多,因为我们筛选的日志仅显示 root 用户的尝试登录记录。 ![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.05.36-AM.png) -日志管理系统也让你以时间为做坐标轴的图标来查看使你更容易发现异常。如果有人在几分钟内登录失败一次或两次,它可能是一个真正的用户而忘记了密码。但是,如果有几百个失败的登录并且使用的都是不同的用户名,它更可能是在试图攻击系统。在这里,你可以看到在3月12日,有人试图登录 Nagios 几百次。这显然​​不是一个合法的系统用户。 +日志管理系统也可以让你以时间为做坐标轴的图表来查看,使你更容易发现异常。如果有人在几分钟内登录失败一次或两次,它可能是一个真正的用户而忘记了密码。但是,如果有几百个失败的登录并且使用的都是不同的用户名,它更可能是在试图攻击系统。在这里,你可以看到在3月12日,有人试图登录 Nagios 几百次。这显然​​不是一个合法的系统用户。 ![](http://www.loggly.com/ultimate-guide/wp-content/uploads/2015/05/Screen-Shot-2015-03-12-at-11.12.18-AM.png) ### 重启的原因 ### - 有时候,一台服务器由于系统崩溃或重启而宕机。你怎么知道它何时发生,是谁做的? #### 关机命令 #### -如果有人手动运行 shutdown 命令,你可以看到它的身份在验证日志文件中。在这里,你可以看到,有人从 IP 50.0.134.125 上作为 ubuntu 的用户远程登录了,然后关闭了系统。 +如果有人手动运行 shutdown 命令,你可以在验证日志文件中看到它。在这里,你可以看到,有人从 IP 50.0.134.125 上作为 ubuntu 的用户远程登录了,然后关闭了系统。 Mar 19 18:36:41 ip-172-31-11-231 sshd[23437]: Accepted publickey for ubuntu from 50.0.134.125 port 52538 ssh Mar 19 18:36:41 ip-172-31-11-231 23437]:sshd[ pam_unix(sshd:session): session opened for user ubuntu by (uid=0) @@ -53,7 +53,7 @@ #### 内核初始化 #### -如果你想看看服务器重新启动的所有原因(包括崩溃),你可以从内核初始化日志中寻找。你需要搜索内核设施和初始化 cpu 的信息。 +如果你想看看服务器重新启动的所有原因(包括崩溃),你可以从内核初始化日志中寻找。你需要搜索内核类(kernel)和 cpu 初始化(Initializing)的信息。 Mar 19 18:39:30 ip-172-31-11-231 kernel: [ 0.000000] Initializing cgroup subsys cpuset Mar 19 18:39:30 ip-172-31-11-231 kernel: [ 0.000000] Initializing cgroup subsys cpu @@ -61,9 +61,9 @@ ### 检测内存问题 ### -有很多原因可能导致服务器崩溃,但一个普遍的原因是内存用尽。 +有很多原因可能导致服务器崩溃,但一个常见的原因是内存用尽。 -当你系统的内存不足时,进程会被杀死,通常会杀死使用最多资源的进程。当系统正在使用的内存发生错误并且有新的或现有的进程试图使用更多的内存。在你的日志文件查找像 Out of Memory 这样的字符串,内核也会发出杀死进程的警告。这些信息表明系统故意杀死进程或应用程序,而不是允许进程崩溃。 +当你系统的内存不足时,进程会被杀死,通常会杀死使用最多资源的进程。当系统使用了所有内存,而新的或现有的进程试图使用更多的内存时就会出现错误。在你的日志文件查找像 Out of Memory 这样的字符串或类似 kill 这样的内核警告信息。这些信息表明系统故意杀死进程或应用程序,而不是允许进程崩溃。 例如: @@ -75,20 +75,20 @@ $ grep “Out of memory” /var/log/syslog [33238.178288] Out of memory: Kill process 6230 (firefox) score 53 or sacrifice child -请记住,grep 也要使用内存,所以导致内存不足的错误可能只是运行的 grep。这是另一个分析日志的独特方法! +请记住,grep 也要使用内存,所以只是运行 grep 也可能导致内存不足的错误。这是另一个你应该中央化存储日志的原因! ### 定时任务错误日志 ### -cron 守护程序是一个调度器只在指定的日期和时间运行进程。如果进程运行失败或无法完成,那么 cron 的错误出现在你的日志文件中。你可以找到这些文件在 /var/log/cron,/var/log/messages,和 /var/log/syslog 中,具体取决于你的发行版。cron 任务失败原因有很多。通常情况下,问题出在进程中而不是 cron 守护进程本身。 +cron 守护程序是一个调度器,可以在指定的日期和时间运行进程。如果进程运行失败或无法完成,那么 cron 的错误出现在你的日志文件中。具体取决于你的发行版,你可以在 /var/log/cron,/var/log/messages,和 /var/log/syslog 几个位置找到这个日志。cron 任务失败原因有很多。通常情况下,问题出在进程中而不是 cron 守护进程本身。 -默认情况下,cron 作业会通过电子邮件发送信息。这里是一个日志中记录的发送电子邮件的内容。不幸的是,你不能看到邮件的内容在这里。 +默认情况下,cron 任务的输出会通过 postfix 发送电子邮件。这是一个显示了该邮件已经发送的日志。不幸的是,你不能在这里看到邮件的内容。 Mar 13 16:35:01 PSQ110 postfix/pickup[15158]: C3EDC5800B4: uid=1001 from= Mar 13 16:35:01 PSQ110 postfix/cleanup[15727]: C3EDC5800B4: message-id=<20150310110501.C3EDC5800B4@PSQ110> Mar 13 16:35:01 PSQ110 postfix/qmgr[15159]: C3EDC5800B4: from=, size=607, nrcpt=1 (queue active) Mar 13 16:35:05 PSQ110 postfix/smtp[15729]: C3EDC5800B4: to=, relay=gmail-smtp-in.l.google.com[74.125.130.26]:25, delay=4.1, delays=0.26/0/2.2/1.7, dsn=2.0.0, status=sent (250 2.0.0 OK 1425985505 f16si501651pdj.5 - gsmtp) -你应该想想 cron 在日志中的标准输出以帮助你定位问题。这里展示你可以使用 logger 命令重定向 cron 标准输出到 syslog。用你的脚本来代替 echo 命令,helloCron 可以设置为任何你想要的应用程序的名字。 +你可以考虑将 cron 的标准输出记录到日志中,以帮助你定位问题。这是一个你怎样使用 logger 命令重定向 cron 标准输出到 syslog的例子。用你的脚本来代替 echo 命令,helloCron 可以设置为任何你想要的应用程序的名字。 */5 * * * * echo ‘Hello World’ 2>&1 | /usr/bin/logger -t helloCron @@ -97,7 +97,9 @@ cron 守护程序是一个调度器只在指定的日期和时间运行进程。 Apr 28 22:20:01 ip-172-31-11-231 CRON[15296]: (ubuntu) CMD (echo 'Hello World!' 2>&1 | /usr/bin/logger -t helloCron) Apr 28 22:20:01 ip-172-31-11-231 helloCron: Hello World! -每个 cron 作业将根据作业的具体类型以及如何输出数据来记录不同的日志。希望在日志中有问题根源的线索,也可以根据需要添加额外的日志记录。 +每个 cron 任务将根据任务的具体类型以及如何输出数据来记录不同的日志。 + +希望在日志中有问题根源的线索,也可以根据需要添加额外的日志记录。 -------------------------------------------------------------------------------- @@ -107,7 +109,7 @@ via: http://www.loggly.com/ultimate-guide/logging/troubleshooting-with-linux-log 作者:[Amy Echeverri][a2] 作者:[Sadequl Hussain][a3] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From e9b99485c8ccdb6033e073e3a8ed5a8b93e582eb Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 30 Aug 2015 00:22:07 +0800 Subject: [PATCH 1928/2517] PUB:20150527 Howto Manage Host Using Docker Machine in a VirtualBox @bazz2 --- ...st Using Docker Machine in a VirtualBox.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md (63%) diff --git a/translated/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md b/published/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md similarity index 63% rename from translated/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md rename to published/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md index 153035c9f4..f47f79b3b7 100644 --- a/translated/tech/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md +++ b/published/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md @@ -1,6 +1,6 @@ 在 VirtualBox 中使用 Docker Machine 管理主机 ================================================================================ -大家好,今天我们学习在 VirtualBox 中使用 Docker Machine 来创建和管理 Docker 主机。Docker Machine 是一个应用,用于在我们的电脑上、在云端、在数据中心创建 Docker 主机,然后用户可以使用 Docker 客户端来配置一些东西。这个 API 为本地主机、或数据中心的虚拟机、或云端的实例提供 Docker 服务。Docker Machine 支持 Windows、OSX 和 Linux,并且是以一个独立的二进制文件包形式安装的。使用(与现有 Docker 工具)相同的接口,我们就可以充分利用已经提供 Docker 基础框架的生态系统。只要一个命令,用户就能快速部署 Docker 容器。 +大家好,今天我们学习在 VirtualBox 中使用 Docker Machine 来创建和管理 Docker 主机。Docker Machine 是一个可以帮助我们在电脑上、在云端、在数据中心内创建 Docker 主机的应用。它为根据用户的配置和需求创建服务器并在其上安装 Docker和客户端提供了一个轻松的解决方案。这个 API 可以用于在本地主机、或数据中心的虚拟机、或云端的实例提供 Docker 服务。Docker Machine 支持 Windows、OSX 和 Linux,并且是以一个独立的二进制文件包形式安装的。仍然使用(与现有 Docker 工具)相同的接口,我们就可以充分利用已经提供 Docker 基础框架的生态系统。只要一个命令,用户就能快速部署 Docker 容器。 本文列出一些简单的步骤用 Docker Machine 来部署 docker 容器。 @@ -8,15 +8,15 @@ Docker Machine 完美支持所有 Linux 操作系统。首先我们需要从 [github][1] 下载最新版本的 Docker Machine,本文使用 curl 作为下载工具,Docker Machine 版本为 0.2.0。 -** 64 位操作系统 ** +**64 位操作系统** # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine -** 32 位操作系统 ** +**32 位操作系统** # curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386 > /usr/local/bin/docker-machine -下载完成后,找到 **/usr/local/bin** 目录下的 **docker-machine** 文件,执行一下: +下载完成后,找到 **/usr/local/bin** 目录下的 **docker-machine** 文件,让其可以执行: # chmod +x /usr/local/bin/docker-machine @@ -28,12 +28,12 @@ Docker Machine 完美支持所有 Linux 操作系统。首先我们需要从 [gi 运行下面的命令,安装 Docker 客户端,以便于在我们自己的电脑止运行 Docker 命令: - # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker - # chmod +x /usr/local/bin/docker + # curl -L https://get.docker.com/builds/linux/x86_64/docker-latest > /usr/local/bin/docker + # chmod +x /usr/local/bin/docker ### 2. 创建 VirtualBox 虚拟机 ### -在 Linux 系统上安装完 Docker Machine 后,接下来我们可以安装 VirtualBox 虚拟机,运行下面的就可以了。--driver virtualbox 选项表示我们要在 VirtualBox 的虚拟机里面部署 docker,最后的参数“linux” 是虚拟机的名称。这个命令会下载 [boot2docker][2] iso,它是个基于 Tiny Core Linux 的轻量级发行版,自带 Docker 程序,然后 docker-machine 命令会创建一个 VirtualBox 虚拟机(LCTT:当然,我们也可以选择其他的虚拟机软件)来运行这个 boot2docker 系统。 +在 Linux 系统上安装完 Docker Machine 后,接下来我们可以安装 VirtualBox 虚拟机,运行下面的就可以了。`--driver virtualbox` 选项表示我们要在 VirtualBox 的虚拟机里面部署 docker,最后的参数“linux” 是虚拟机的名称。这个命令会下载 [boot2docker][2] iso,它是个基于 Tiny Core Linux 的轻量级发行版,自带 Docker 程序,然后 `docker-machine` 命令会创建一个 VirtualBox 虚拟机(LCTT译注:当然,我们也可以选择其他的虚拟机软件)来运行这个 boot2docker 系统。 # docker-machine create --driver virtualbox linux @@ -49,7 +49,7 @@ Docker Machine 完美支持所有 Linux 操作系统。首先我们需要从 [gi ### 3. 设置环境变量 ### -现在我们需要让 docker 与虚拟机通信,运行 docker-machine env <虚拟机名称> 来实现这个目的。 +现在我们需要让 docker 与 docker-machine 通信,运行 `docker-machine env <虚拟机名称>` 来实现这个目的。 # eval "$(docker-machine env linux)" # docker ps @@ -64,7 +64,7 @@ Docker Machine 完美支持所有 Linux 操作系统。首先我们需要从 [gi ### 4. 运行 Docker 容器 ### -完成配置后我们就可以在 VirtualBox 上运行 docker 容器了。测试一下,在虚拟机里执行 **docker run busybox echo hello world** 命令,我们可以看到容器的输出信息。 +完成配置后我们就可以在 VirtualBox 上运行 docker 容器了。测试一下,我们可以运行虚拟机 `docker run busybox` ,并在里面里执行 `echo hello world` 命令,我们可以看到容器的输出信息。 # docker run busybox echo hello world @@ -72,7 +72,7 @@ Docker Machine 完美支持所有 Linux 操作系统。首先我们需要从 [gi ### 5. 拿到 Docker 主机的 IP ### -我们可以执行下面的命令获取 Docker 主机的 IP 地址。 +我们可以执行下面的命令获取运行 Docker 的主机的 IP 地址。我们可以看到在 Docker 主机的 IP 地址上的任何暴露出来的端口。 # docker-machine ip @@ -94,7 +94,9 @@ Docker Machine 完美支持所有 Linux 操作系统。首先我们需要从 [gi ### 总结 ### -最后,我们使用 Docker Machine 成功在 VirtualBox 上创建并管理一台 Docker 主机。Docker Machine 确实能让用户快速地在不同的平台上部署 Docker 主机,就像我们这里部署在 VirtualBox 上一样。这个 --driver virtulbox 驱动可以在本地机器上使用,也可以在数据中心的虚拟机上使用。Docker Machine 驱动除了支持本地的 VirtualBox 之外,还支持远端的 Digital Ocean、AWS、Azure、VMware 以及其他基础设施。如果你有任何疑问,或者建议,请在评论栏中写出来,我们会不断改进我们的内容。谢谢,祝愉快。 +最后,我们使用 Docker Machine 成功在 VirtualBox 上创建并管理一台 Docker 主机。Docker Machine 确实能让用户快速地在不同的平台上部署 Docker 主机,就像我们这里部署在 VirtualBox 上一样。这个 virtualbox 驱动可以在本地机器上使用,也可以在数据中心的虚拟机上使用。Docker Machine 驱动除了支持本地的 VirtualBox 之外,还支持远端的 Digital Ocean、AWS、Azure、VMware 以及其它基础设施。 + +如果你有任何疑问,或者建议,请在评论栏中写出来,我们会不断改进我们的内容。谢谢,祝愉快。 -------------------------------------------------------------------------------- @@ -102,7 +104,7 @@ via: http://linoxide.com/linux-how-to/host-virtualbox-docker-machine/ 作者:[Arun Pyasi][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 b4b7ad67cb8d9a73ff5d0b8b13186d986f8d0d25 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 30 Aug 2015 00:40:53 +0800 Subject: [PATCH 1929/2517] PUB:20150821 How to Install Visual Studio Code in Linux @ictlyh --- ... to Install Visual Studio Code in Linux.md | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150821 How to Install Visual Studio Code in Linux.md (70%) diff --git a/translated/tech/20150821 How to Install Visual Studio Code in Linux.md b/published/20150821 How to Install Visual Studio Code in Linux.md similarity index 70% rename from translated/tech/20150821 How to Install Visual Studio Code in Linux.md rename to published/20150821 How to Install Visual Studio Code in Linux.md index 48f68ade0b..9694b23d4f 100644 --- a/translated/tech/20150821 How to Install Visual Studio Code in Linux.md +++ b/published/20150821 How to Install Visual Studio Code in Linux.md @@ -1,8 +1,8 @@ 如何在 Linux 中安装 Visual Studio Code ================================================================================ -大家好,今天我们一起来学习如何在 Linux 发行版中安装 Visual Studio Code。Visual Studio Code 是基于 Electron 优化代码后的编辑器,后者是基于 Chromium 的一款软件,用于为桌面系统发布 io.js 应用。Visual Studio Code 是微软开发的包括 Linux 在内的全平台代码编辑器和文本编辑器。它是免费软件但不开源,在专有软件许可条款下发布。它是我们日常使用的超级强大和快速的代码编辑器。Visual Studio Code 有很多很酷的功能,例如导航、智能感知支持、语法高亮、括号匹配、自动补全、片段、支持自定义键盘绑定、并且支持多种语言,例如 Python、C++、Jade、PHP、XML、Batch、F#、DockerFile、Coffee Script、Java、HandleBars、 R、 Objective-C、 PowerShell、 Luna、 Visual Basic、 .Net、 Asp.Net、 C#、 JSON、 Node.js、 Javascript、 HTML、 CSS、 Less、 Sass 和 Markdown。Visual Studio Code 集成了包管理器和库,并构建通用任务使得加速每日的工作流。Visual Studio Code 中最受欢迎的是它的调试功能,它包括流式支持 Node.js 的预览调试。 +大家好,今天我们一起来学习如何在 Linux 发行版中安装 Visual Studio Code。Visual Studio Code 是基于 Electron 优化代码后的编辑器,后者是基于 Chromium 的一款软件,用于为桌面系统发布 io.js 应用。Visual Studio Code 是微软开发的支持包括 Linux 在内的全平台代码编辑器和文本编辑器。它是免费软件但不开源,在专有软件许可条款下发布。它是可以用于我们日常使用的超级强大和快速的代码编辑器。Visual Studio Code 有很多很酷的功能,例如导航、智能感知支持、语法高亮、括号匹配、自动补全、代码片段、支持自定义键盘绑定、并且支持多种语言,例如 Python、C++、Jade、PHP、XML、Batch、F#、DockerFile、Coffee Script、Java、HandleBars、 R、 Objective-C、 PowerShell、 Luna、 Visual Basic、 .Net、 Asp.Net、 C#、 JSON、 Node.js、 Javascript、 HTML、 CSS、 Less、 Sass 和 Markdown。Visual Studio Code 集成了包管理器、库、构建,以及其它通用任务,以加速日常的工作流。Visual Studio Code 中最受欢迎的是它的调试功能,它包括流式支持 Node.js 的预览调试。 -注意:请注意 Visual Studio Code 只支持 64 位 Linux 发行版。 +注意:请注意 Visual Studio Code 只支持 64 位的 Linux 发行版。 下面是在所有 Linux 发行版中安装 Visual Studio Code 的几个简单步骤。 @@ -32,12 +32,12 @@ ### 3. 运行 Visual Studio Code ### -提取软件包之后,我们可以直接运行一个名为 Code 的文件启动 Visual Studio Code。 +展开软件包之后,我们可以直接运行一个名为 Code 的文件启动 Visual Studio Code。 # sudo chmod +x /opt/VSCode-linux-x64/Code # sudo /opt/VSCode-linux-x64/Code -如果我们想启动 Code 并通过终端能在任何地方打开,我们就需要创建 /opt/vscode/Code 的一个链接 /usr/local/bin/code。 +如果我们想通过终端在任何地方启动 Code,我们就需要创建 /opt/vscode/Code 的一个链接 /usr/local/bin/code。 # ln -s /opt/VSCode-linux-x64/Code /usr/local/bin/code @@ -47,11 +47,11 @@ ### 4. 创建桌面启动 ### -下一步,成功抽取 Visual Studio Code 软件包之后,我们打算创建桌面启动程序,使得根据不同桌面环境能够从启动器、菜单、桌面启动它。首先我们要复制一个图标文件到 /usr/share/icons/ 目录。 +下一步,成功展开 Visual Studio Code 软件包之后,我们打算创建桌面启动程序,使得根据不同桌面环境能够从启动器、菜单、桌面启动它。首先我们要复制一个图标文件到 /usr/share/icons/ 目录。 # cp /opt/VSCode-linux-x64/resources/app/vso.png /usr/share/icons/ -然后,我们创建一个桌面启动程序,文件扩展名为 .desktop。这里我们在 /tmp/VSCODE/ 目录中使用喜欢的文本编辑器创建名为 visualstudiocode.desktop 的文件。 +然后,我们创建一个桌面启动程序,文件扩展名为 .desktop。这里我们使用喜欢的文本编辑器在 /tmp/VSCODE/ 目录中创建名为 visualstudiocode.desktop 的文件。 # vi /tmp/vscode/visualstudiocode.desktop @@ -99,17 +99,19 @@ # apt-get update # apt-get install ubuntu-make -在我们的 ubuntu 操作系统上安装完 Ubuntu Make 之后,我们打算在一个终端中运行以下命令安装 Code。 +在我们的 ubuntu 操作系统上安装完 Ubuntu Make 之后,我们可以在一个终端中运行以下命令来安装 Code。 # umake web visual-studio-code ![Umake Web Code](http://blog.linoxide.com/wp-content/uploads/2015/06/umake-web-code.png) -运行完上面的命令之后,会要求我们输入想要的安装路径。然后,会请求我们允许在 ubuntu 系统中安装 Visual Studio Code。我们敲击 “a”。点击完后,它会在 ubuntu 机器上下载和安装 Code。最后,我们可以在启动器或者菜单中启动它。 +运行完上面的命令之后,会要求我们输入想要的安装路径。然后,会请求我们允许在 ubuntu 系统中安装 Visual Studio Code。我们输入“a”(接受)。输入完后,它会在 ubuntu 机器上下载和安装 Code。最后,我们可以在启动器或者菜单中启动它。 ### 总结 ### -我们已经成功地在 Linux 发行版上安装了 Visual Studio Code。在所有 linux 发行版上安装 Visual Studio Code 都和上面介绍的相似,我们同样可以使用 umake 在 linux 发行版中安装。Umake 是一个安装开发工具,IDEs 和语言流行的工具。我们可以用 Umake 轻松地安装 Android Studios、Eclipse 和很多其它流行 IDE。Visual Studio Code 是基于 Github 上一个叫 [Electron][2] 的项目,它是 [Atom.io][3] 编辑器的一部分。它有很多 Atom.io 编辑器没有的改进功能。当前 Visual Studio Code 只支持 64 位 linux 操作系统平台。如果你有任何疑问、建议或者反馈,请在下面的评论框中留言以便我们改进和更新我们的内容。非常感谢!Enjoy :-) +我们已经成功地在 Linux 发行版上安装了 Visual Studio Code。在所有 linux 发行版上安装 Visual Studio Code 都和上面介绍的相似,我们也可以使用 umake 在 Ubuntu 发行版中安装。Umake 是一个安装开发工具,IDEs 和语言的流行工具。我们可以用 Umake 轻松地安装 Android Studios、Eclipse 和很多其它流行 IDE。Visual Studio Code 是基于 Github 上一个叫 [Electron][2] 的项目,它是 [Atom.io][3] 编辑器的一部分。它有很多 Atom.io 编辑器没有的改进功能。当前 Visual Studio Code 只支持 64 位 linux 操作系统平台。 + +如果你有任何疑问、建议或者反馈,请在下面的评论框中留言以便我们改进和更新我们的内容。非常感谢!Enjoy :-) -------------------------------------------------------------------------------- @@ -117,7 +119,7 @@ via: http://linoxide.com/linux-how-to/install-visual-studio-code-linux/ 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 1aef169420f51d19ac95db726849152d9144402f Mon Sep 17 00:00:00 2001 From: joeren Date: Sun, 30 Aug 2015 07:59:25 +0800 Subject: [PATCH 1930/2517] Update 20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md --- ...nvert From RPM to DEB and DEB to RPM Package Using Alien.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md b/sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md index 2d3f203676..96cb8d82cc 100644 --- a/sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md +++ b/sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to Convert From RPM to DEB and DEB to RPM Package Using Alien ================================================================================ As I’m sure you already know, there are plenty of ways to install software in Linux: using the package management system provided by your distribution ([aptitude, yum, or zypper][1], to name a few examples), compiling from source (though somewhat rare these days, it was the only method available during the early days of Linux), or utilizing a low level tool such as dpkg or rpm with .deb and .rpm standalone, precompiled packages, respectively. @@ -156,4 +157,4 @@ via: http://www.tecmint.com/convert-from-rpm-to-deb-and-deb-to-rpm-package-using [a]:http://www.tecmint.com/author/gacanepa/ [1]:http://www.tecmint.com/linux-package-management/ -[2]:http://li.nux.ro/download/nux/dextop/el7/x86_64/ \ No newline at end of file +[2]:http://li.nux.ro/download/nux/dextop/el7/x86_64/ From 84a86849d24fe6367cf9a1f3c9d193c4544d1cee Mon Sep 17 00:00:00 2001 From: Chr1sh3ng Date: Sun, 30 Aug 2015 10:20:53 +0800 Subject: [PATCH 1931/2517] cygmris is translating --- .../20150824 Great Open Source Collaborative Editing Tools.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150824 Great Open Source Collaborative Editing Tools.md b/sources/share/20150824 Great Open Source Collaborative Editing Tools.md index 8f3ab16110..4696862569 100644 --- a/sources/share/20150824 Great Open Source Collaborative Editing Tools.md +++ b/sources/share/20150824 Great Open Source Collaborative Editing Tools.md @@ -1,3 +1,4 @@ +cygmris is translating... Great Open Source Collaborative Editing Tools ================================================================================ In a nutshell, collaborative writing is writing done by more than one person. There are benefits and risks of collaborative working. Some of the benefits include a more integrated / co-ordinated approach, better use of existing resources, and a stronger, united voice. For me, the greatest advantage is one of the most transparent. That's when I need to take colleagues' views. Sending files back and forth between colleagues is inefficient, causes unnecessary delays and leaves people (i.e. me) unhappy with the whole notion of collaboration. With good collaborative software, I can share notes, data and files, and use comments to share thoughts in real-time or asynchronously. Working together on documents, images, video, presentations, and tasks is made less of a chore. @@ -225,4 +226,4 @@ via: http://www.linuxlinks.com/article/20150823085112605/CollaborativeEditing.ht [10]:https://gobby.github.io/ [11]:https://github.com/gobby [12]:https://www.onlyoffice.com/free-edition.aspx -[13]:https://github.com/ONLYOFFICE/DocumentServer \ No newline at end of file +[13]:https://github.com/ONLYOFFICE/DocumentServer From 93923560cc08d25c72f25d698ca5486130bd9f84 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Sun, 30 Aug 2015 13:00:42 +0800 Subject: [PATCH 1932/2517] [Translated]20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md --- ... DEB and DEB to RPM Package Using Alien.md | 160 ------------------ ... DEB and DEB to RPM Package Using Alien.md | 148 ++++++++++++++++ 2 files changed, 148 insertions(+), 160 deletions(-) delete mode 100644 sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md create mode 100644 translated/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md diff --git a/sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md b/sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md deleted file mode 100644 index 96cb8d82cc..0000000000 --- a/sources/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md +++ /dev/null @@ -1,160 +0,0 @@ -Translating by GOLinux! -How to Convert From RPM to DEB and DEB to RPM Package Using Alien -================================================================================ -As I’m sure you already know, there are plenty of ways to install software in Linux: using the package management system provided by your distribution ([aptitude, yum, or zypper][1], to name a few examples), compiling from source (though somewhat rare these days, it was the only method available during the early days of Linux), or utilizing a low level tool such as dpkg or rpm with .deb and .rpm standalone, precompiled packages, respectively. - -![Convert RPM to DEB and DEB to RPM](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-RPM-to-DEB-and-DEB-to-RPM.png) - -Convert RPM to DEB and DEB to RPM Package Using Alien - -In this article we will introduce you to alien, a tool that converts between different Linux package formats, with .rpm to .deb (and vice versa) being the most common usage. - -This tool, even when its author is no longer maintaining it and states in his website that alien will always probably remain in experimental status, can come in handy if you need a certain type of package but can only find that program in another package format. - -For example, alien saved my day once when I was looking for a .deb driver for a inkjet printer and couldn’t find any – the manufacturer only provided a .rpm package. I installed alien, converted the package, and before long I was able to use my printer without issues. - -That said, we must clarify that this utility should not be used to replace important system files and libraries since they are set up differently across distributions. Only use alien as a last resort if the suggested installation methods at the beginning of this article are out of the question for the required program. - -Last but not least, we must note that even though we will use CentOS and Debian in this article, alien is also known to work in Slackware and even in Solaris, besides the first two distributions and their respective families. - -### Step 1: Installing Alien and Dependencies ### - -To install alien in CentOS/RHEL 7, you will need to enable the EPEL and the Nux Dextop (yes, it’s Dextop – not Desktop) repositories, in that order: - - # yum install epel-release - # rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro - -The latest version of the package that enables this repository is currently 0.5 (published on Aug. 10, 2015). You should check [http://li.nux.ro/download/nux/dextop/el7/x86_64/][2] to see whether there’s a newer version before proceeding further: - - # rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm - -then do, - - # yum update && yum install alien - -In Fedora, you will only need to run the last command. - -In Debian and derivatives, simply do: - - # aptitude install alien - -### Step 2: Converting from .deb to .rpm Package ### - -For this test we have chosen dateutils, which provides a set of date and time utilities to deal with large amounts of financial data. We will download the .deb package to our CentOS 7 box, convert it to .rpm and install it: - -![Check CentOS Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-OS-Version.png) - -Check CentOS Version - - # cat /etc/centos-release - # wget http://ftp.us.debian.org/debian/pool/main/d/dateutils/dateutils_0.3.1-1.1_amd64.deb - # alien --to-rpm --scripts dateutils_0.3.1-1.1_amd64.deb - -![Convert .deb to .rpm package in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-deb-to-rpm-package.png) - -Convert .deb to .rpm package in Linux - -**Important**: (Please note how, by default, alien increases the version minor number of the target package. If you want to override this behavior, add the –keep-version flag). - -If we try to install the package right away, we will run into a slight issue: - - # rpm -Uvh dateutils-0.3.1-2.1.x86_64.rpm - -![Install RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-RPM-Package.png) - -Install RPM Package - -To solve this issue, we will enable the epel-testing repository and install the rpmrebuild utility to edit the settings of the package to be rebuilt: - - # yum --enablerepo=epel-testing install rpmrebuild - -Then run, - - # rpmrebuild -pe dateutils-0.3.1-2.1.x86_64.rpm - -Which will open up your default text editor. Go to the `%files` section and delete the lines that refer to the directories mentioned in the error message, then save the file and exit: - -![Convert .deb to Alien Version](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-Deb-Package-to-Alien-Version.png) - -Convert .deb to Alien Version - -When you exit the file you will be prompted to continue with the rebuild. If you choose Y, the file will be rebuilt into the specified directory (different than the current working directory): - - # rpmrebuild –pe dateutils-0.3.1-2.1.x86_64.rpm - -![Build RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Build-RPM-Package.png) - -Build RPM Package - -Now you can proceed to install the package and verify as usual: - - # rpm -Uvh /root/rpmbuild/RPMS/x86_64/dateutils-0.3.1-2.1.x86_64.rpm - # rpm -qa | grep dateutils - -![Install Build RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Build-RPM-Package.png) - -Install Build RPM Package - -Finally, you can list the individual tools that were included with dateutils and alternatively check their respective man pages: - - # ls -l /usr/bin | grep dateutils - -![Verify Installed RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Verify-Installed-Package.png) - -Verify Installed RPM Package - -### Step 3: Converting from .rpm to .deb Package ### - -In this section we will illustrate how to convert from .rpm to .deb. In a 32-bit Debian Wheezy box, let’s download the .rpm package for the zsh shell from the CentOS 6 OS repository. Note that this shell is not available by default in Debian and derivatives. - - # cat /etc/shells - # lsb_release -a | tail -n 4 - -![Check Shell and Debian OS Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Shell-Debian-OS-Version.png) - -Check Shell and Debian OS Version - - # wget http://mirror.centos.org/centos/6/os/i386/Packages/zsh-4.3.11-4.el6.centos.i686.rpm - # alien --to-deb --scripts zsh-4.3.11-4.el6.centos.i686.rpm - -You can safely disregard the messages about a missing signature: - -![Convert .rpm to .deb Package](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-rpm-to-deb-Package.png) - -Convert .rpm to .deb Package - -After a few moments, the .deb file should have been generated and be ready to install: - - # dpkg -i zsh_4.3.11-5_i386.deb - -![Install RPM Converted Deb Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Deb-Package.png) - -Install RPM Converted Deb Package - -After the installation, you can verify that zsh is added to the list of valid shells: - - # cat /etc/shells - -![Confirm Installed Zsh Package](http://www.tecmint.com/wp-content/uploads/2015/08/Confirm-Installed-Package.png) - -Confirm Installed Zsh Package - -### Summary ### - -In this article we have explained how to convert from .rpm to .deb and vice versa to install packages as a last resort when such programs are not available in the repositories or as distributable source code. You will want to bookmark this article because all of us will need alien at one time or another. - -Feel free to share your thoughts about this article using the form below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/convert-from-rpm-to-deb-and-deb-to-rpm-package-using-alien/ - -作者:[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/linux-package-management/ -[2]:http://li.nux.ro/download/nux/dextop/el7/x86_64/ diff --git a/translated/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md b/translated/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md new file mode 100644 index 0000000000..98abba27f3 --- /dev/null +++ b/translated/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md @@ -0,0 +1,148 @@ +Alien大法:RPM和DEB互转 +================================================================================ +正如我确信,你们一定知道Linux下的多种软件安装方式:使用发行版所提供的包管理系统([aptitude,yum,或者zypper][1],还可以举很多例子),从源码编译(尽管现在很少用了,但在Linux发展早期却是唯一可用的方法),或者使用各自的低级工具dpkg用于.deb,以及rpm用于.rpm,预编译包等等。 + +![Convert RPM to DEB and DEB to RPM](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-RPM-to-DEB-and-DEB-to-RPM.png) +使用Alien将RPM转换成DEB以及将DEB转换成RPM + +在本文中,我们将为你介绍alien,一个用于在各种不同的Linux包格式相互转换的工具,将.rpm转换成.deb(或者反过来)是最常见的用法。 + +如果你需要某个特定类型的包,而你只能找到其它格式的包的时候,该工具,即使当其作者不再维护,并且在其网站声明:alien将可能永远维持在实验状态,迟早派得上用场。 + +例如,有一次,我正查找一个用于喷墨打印机的.deb驱动,但是却没有找到——生产厂家只提供.rpm包,这时候alien拯救了我。我安装了alien,将包进行转换,不久之后我就可以使用我的打印机了,没有任何问题。 + +即便如此,我们也必须澄清一下,这个工具不应当用来替换重要的系统文件和库,因为它们在不同的发行版中有不同的配置。只有在本文开头提出的安装方法根本不适合所需的程序时,alien才能作为最后手段使用。 + +最后一项要点是,我们必须注意,虽然我们在本文中使用CentOS和Debian,除了前两个发行版及其各自的家族体系外,alien也据我们所知可以工作在Slackware中,甚至Solaris中。 + +### 步骤1:安装Alien及其依赖 ### + +要安装alien到CentOS/RHEL 7中,你需要启用EPEL和Nux Dextop(是的,是Dextop——不是Desktop)仓库,顺序如下: + + # yum install epel-release + # rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro + +启用该仓库的包的当前最新版本是0.5(2015年8月10日发布),在安装之前你可以查看[http://li.nux.ro/download/nux/dextop/el7/x86_64/][2]上是否有更新的版本。 + + # rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm + +然后再做, + + # yum update && yum install alien + +在Fedora中,你只需要运行上面的命令即可。 + +在Debian及其衍生版中,只需要: + + # aptitude install alien + +### 步骤2:将.deb转换成.rpm包 ### + +对于本次测试,我们选择了date工具,它提供了一系列日期和时间工具用于处理大量金融数据。我们将下载.deb包到我们的CentOS 7机器中,将它转换成.rpm并安装: + +![Check CentOS Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-OS-Version.png) + +检查CentOS版本 + + # cat /etc/centos-release + # wget http://ftp.us.debian.org/debian/pool/main/d/dateutils/dateutils_0.3.1-1.1_amd64.deb + # alien --to-rpm --scripts dateutils_0.3.1-1.1_amd64.deb + +![Convert .deb to .rpm package in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-deb-to-rpm-package.png) +在Linux中将.deb转换成.rpm + +**重要**:(请注意alien是怎样来增加目标包的次版本号的。如果你想要无视该行为,请添加-keep-version标识)。 + +如果我们尝试马上安装该包,我们将碰到些许问题: + + # rpm -Uvh dateutils-0.3.1-2.1.x86_64.rpm + +![Install RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-RPM-Package.png) +安装RPM包 + +要解决该问题,我们需要启用epel-testing仓库,然后安装rpmbuild工具来编辑该包的配置以重建包: + + # yum --enablerepo=epel-testing install rpmrebuild + +然后运行, + + # rpmrebuild -pe dateutils-0.3.1-2.1.x86_64.rpm + +它会打开你的默认文本编辑器。转到`%files`章节并删除涉及到错误信息中提到的目录的行,然后保存文件并退出: + +![Convert .deb to Alien Version](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-Deb-Package-to-Alien-Version.png) +转换.deb到Alien版 + +但你退出该文件后,将提示你继续去重构。如果你选择Y,该文件会重构到指定的目录(与当前工作目录不同): + + # rpmrebuild –pe dateutils-0.3.1-2.1.x86_64.rpm + +![Build RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Build-RPM-Package.png) +构建RPM包 + +现在你可以像以往一样继续来安装包并验证: + + # rpm -Uvh /root/rpmbuild/RPMS/x86_64/dateutils-0.3.1-2.1.x86_64.rpm + # rpm -qa | grep dateutils + +![Install Build RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Build-RPM-Package.png) +安装构建RPM包 + +最后,你可以列出date工具包含的各个工具,并可选择性地查看各自的手册页: + + # ls -l /usr/bin | grep dateutils + +![Verify Installed RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Verify-Installed-Package.png) +验证安装的RPM包 + +### 步骤3:将.rpm转换成.deb包 ### + +在本节中,我们将演示如何将.rpm转换成.deb。在一台32位的Debian Wheezy机器中,让我们从CentOS 6操作系统仓库中下载用于zsh shell的.rpm包。注意,该shell在Debian及其衍生版的默认安装中是不可用的。 + + # cat /etc/shells + # lsb_release -a | tail -n 4 + +![Check Shell and Debian OS Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Shell-Debian-OS-Version.png) +检查Shell和Debian操作系统版本 + + # wget http://mirror.centos.org/centos/6/os/i386/Packages/zsh-4.3.11-4.el6.centos.i686.rpm + # alien --to-deb --scripts zsh-4.3.11-4.el6.centos.i686.rpm + +你可以安全地无视关于签名丢失的信息: + +![Convert .rpm to .deb Package](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-rpm-to-deb-Package.png) +将.rpm转换成.deb包 + +过了一会儿后,.deb包应该已经生成,并可以安装了: + + # dpkg -i zsh_4.3.11-5_i386.deb + +![Install RPM Converted Deb Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Deb-Package.png) +安装RPM转换来的Deb包 + +安装完后,你可以zsh是否添加到了合法shell列表中: + + # cat /etc/shells + +![Confirm Installed Zsh Package](http://www.tecmint.com/wp-content/uploads/2015/08/Confirm-Installed-Package.png) +确认安装的Zsh包 + +### 小结 ### + +在本文中,我们已经解释了如何将.rpm转换成.deb及其反向转换并作为这类程序不能从仓库中或者作为可分发源代码获得的最后安装手段。你一定想要将本文添加到书签中,因为我们都需要alien。 + +请自由分享你关于本文的想法,写到下面的表格中吧。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/convert-from-rpm-to-deb-and-deb-to-rpm-package-using-alien/ + +作者:[Gabriel Cánepa][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者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/linux-package-management/ +[2]:http://li.nux.ro/download/nux/dextop/el7/x86_64/ From 70d1a832dbdfe534ced889cb9fa47fb00100de7a Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 30 Aug 2015 22:01:24 +0800 Subject: [PATCH 1933/2517] PUB:20150813 How to Install Logwatch on Ubuntu 15.04 @runningwater --- ...How to Install Logwatch on Ubuntu 15.04.md | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) rename {translated/tech => published}/20150813 How to Install Logwatch on Ubuntu 15.04.md (77%) diff --git a/translated/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md b/published/20150813 How to Install Logwatch on Ubuntu 15.04.md similarity index 77% rename from translated/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md rename to published/20150813 How to Install Logwatch on Ubuntu 15.04.md index 8bb0836755..4ea05688cd 100644 --- a/translated/tech/20150813 How to Install Logwatch on Ubuntu 15.04.md +++ b/published/20150813 How to Install Logwatch on Ubuntu 15.04.md @@ -1,6 +1,7 @@ -Ubuntu 15.04 and系统中安装 Logwatch +如何在 Ubuntu 15.04 系统中安装 Logwatch ================================================================================ -大家好,今天我们会讲述在 Ubuntu 15.04 操作系统上如何安装 Logwatch 软件,它也可以在任意的 Linux 系统和类 Unix 系统上安装。Logwatch 是一款可定制的日志分析和日志监控报告生成系统,它可以根据一段时间的日志文件生成您所希望关注的详细报告。它具有易安装、易配置、可审查等特性,同时对其提供的数据的安全性上也有一些保障措施。Logwatch 会扫描重要的操作系统组件像 SSH、网站服务等的日志文件,然后生成用户所关心的有价值的条目汇总报告。 + +大家好,今天我们会讲述在 Ubuntu 15.04 操作系统上如何安装 Logwatch 软件,它也可以在各种 Linux 系统和类 Unix 系统上安装。Logwatch 是一款可定制的日志分析和日志监控报告生成系统,它可以根据一段时间的日志文件生成您所希望关注的详细报告。它具有易安装、易配置、可审查等特性,同时对其提供的数据的安全性上也有一些保障措施。Logwatch 会扫描重要的操作系统组件像 SSH、网站服务等的日志文件,然后生成用户所关心的有价值的条目汇总报告。 ### 预安装设置 ### @@ -16,13 +17,13 @@ Ubuntu 15.04 and系统中安装 Logwatch root@ubuntu-15:~# apt-get install logwatch -在安装过程中,一旦您按提示按下“Y”健同意对系统修改的话,Logwatch 将会开始安装一些额外的必须软件包。 +在安装过程中,一旦您按提示按下“Y”键同意对系统修改的话,Logwatch 将会开始安装一些额外的必须软件包。 -在安装过程中会根据您机器上的邮件服务器设置情况弹出提示对 Postfix 设置的配置界面。在这篇教程中我们使用最容易的 “仅本地” 选项。根据您的基础设施情况也可以选择其它的可选项,然后点击“确定”继续。 +在安装过程中会根据您机器上的邮件服务器设置情况弹出提示对 Postfix 设置的配置界面。在这篇教程中我们使用最容易的 “仅本地(Local only)” 选项。根据您的基础设施情况也可以选择其它的可选项,然后点击“确定”继续。 ![Potfix Configurations](http://blog.linoxide.com/wp-content/uploads/2015/08/21.png) -随后您得选择邮件服务器名,这邮件服务器名也会被其它程序使用,所以它应该是一个完全合格域名/全称域名(FQDN),且只一个。 +随后您得选择邮件服务器名,这邮件服务器名也会被其它程序使用,所以它应该是一个完全合格域名/全称域名(FQDN)。 ![Postfix Setup](http://blog.linoxide.com/wp-content/uploads/2015/08/31.png) @@ -70,11 +71,11 @@ Ubuntu 15.04 and系统中安装 Logwatch # complete email address. MailFrom = Logwatch -对这个配置文件保存修改,至于其它的参数就让它是默认的,无需改动。 +对这个配置文件保存修改,至于其它的参数就让它保持默认,无需改动。 **调度任务配置** -现在编辑在日常 crons 目录下的 “00logwatch” 文件来配置从 logwatch 生成的报告需要发送的邮件地址。 +现在编辑在 “daily crons” 目录下的 “00logwatch” 文件来配置从 logwatch 生成的报告需要发送的邮件地址。 root@ubuntu-15:~# vim /etc/cron.daily/00logwatch @@ -88,25 +89,25 @@ Ubuntu 15.04 and系统中安装 Logwatch root@ubuntu-15:~#logwatch -生成的报告开始部分显示的是执行的时间和日期。它包含不同的部分,每个部分以开始标识开始而以结束标识结束,中间显示的标识部分提到的完整日志信息。 +生成的报告开始部分显示的是执行的时间和日期。它包含不同的部分,每个部分以开始标识开始而以结束标识结束,中间显示的是该部分的完整信息。 -这儿演示的是开始标识头的样子,要显示系统上所有安装包的信息,如下所示: +这儿显示的是开始的样子,它以显示系统上所有安装的软件包的部分开始,如下所示: ![dpkg status](http://blog.linoxide.com/wp-content/uploads/2015/08/81.png) -接下来的部分显示的日志信息是关于当前系统登陆会话、rsyslogs 和当前及最后可用的会话 SSH 连接信息。 +接下来的部分显示的日志信息是关于当前系统登录会话、rsyslogs 和当前及最近的 SSH 会话信息。 ![logwatch report](http://blog.linoxide.com/wp-content/uploads/2015/08/9.png) -Logwatch 报告最后显示的是安全 sudo 日志及root目录磁盘使用情况,如下示: +Logwatch 报告最后显示的是安全方面的 sudo 日志及根目录磁盘使用情况,如下示: ![Logwatch end report](http://blog.linoxide.com/wp-content/uploads/2015/08/10.png) -您也可以打开如下的文件来检查生成的 logwatch 报告电子邮件。 +您也可以打开如下的文件来查看生成的 logwatch 报告电子邮件。 root@ubuntu-15:~# vim /var/mail/root -您会看到所有已生成的邮件到其配置用户的信息传送状态。 +您会看到发送给你配置的用户的所有已生成的邮件及其邮件递交状态。 ### 更多详情 ### @@ -130,7 +131,7 @@ via: http://linoxide.com/ubuntu-how-to/install-use-logwatch-ubuntu-15-04/ 作者:[Kashif Siddique][a] 译者:[runningwater](https://github.com/runningwater) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From a4f24be373df0ce44866cd46efaed13a8d40e4ee Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Mon, 31 Aug 2015 07:38:55 +0800 Subject: [PATCH 1934/2517] little bug fix in line 3 --- ...sed' Command to Create Edit and Manipulate files in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md index c8c56c0077..34ef170213 100644 --- a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md +++ b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md @@ -1,6 +1,6 @@ Translating by Xuanwo -Part 1 - LFCS系列第一讲:如何在Linux上使用GNU'sed'命令来创建、编辑和操作文件 +LFCS系列第一讲:如何在Linux上使用GNU'sed'命令来创建、编辑和操作文件 ================================================================================ Linux基金会宣布了一个全新的LFCS(Linux Foundation Certified Sysadmin,Linux基金会认证系统管理员)认证计划。这一计划旨在帮助遍布全世界的人们获得其在处理Linux系统管理任务上能力的认证。这些能力包括支持运行的系统服务,以及第一手的故障诊断和分析和为工程师团队在升级时提供智能决策。 From aefa39e69eeda1cee8c1ae7a05541f924d2068d1 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Mon, 31 Aug 2015 07:43:46 +0800 Subject: [PATCH 1935/2517] change the series name --- ...sed' Command to Create Edit and Manipulate files in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md index 34ef170213..4f3094b6f5 100644 --- a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md +++ b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md @@ -12,7 +12,7 @@ Linux基金会认证系统管理员——第一讲 -该系列将命名为《LFCS预备第一讲》至《LFCS预备第十讲》并覆盖关于Ubuntu,CentOS以及openSUSE的下列话题。 +该系列将命名为《LFCS系列第一讲》至《LFCS系列第十讲》并覆盖关于Ubuntu,CentOS以及openSUSE的下列话题。 - 第一讲:如何在Linux上使用GNU'sed'命令来创建、编辑和操作文件 - 第二讲:如何安装和使用vi/m全功能文字编辑器 From fd6c58b0e4e8dd531648e08c339ca9ebe93d8bdf Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Mon, 31 Aug 2015 09:45:57 +0800 Subject: [PATCH 1936/2517] update some translate --- ...eate Edit and Manipulate files in Linux.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md index 4f3094b6f5..79e263d7e0 100644 --- a/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md +++ b/translated/tech/LFCS/Part 1 - LFCS--How to use GNU 'sed' Command to Create Edit and Manipulate files in Linux.md @@ -25,7 +25,7 @@ Linux基金会认证系统管理员——第一讲 - 第九讲:Linux包管理与Yum,RPM,Apt,Dpkg,Aptitude,Zypper - 第十讲:学习简单的Shell脚本和文件系统故障排除 -本文是覆盖这个参加LFCS认证考试的所必需的范围和能力的十个教程的第一讲。话虽如此,快打开你的终端,让我们开始吧! +本文是覆盖这个参加LFCS认证考试的所必需的范围和能力的十个教程的第一讲。话说了那么多,快打开你的终端,让我们开始吧! ### 处理Linux中的文本流 ### @@ -42,7 +42,7 @@ Linux将程序中的输入和输出当成字符流或者字符序列。在开始 ![cat command](http://www.tecmint.com/wp-content/uploads/2014/10/cat-command.png) -cat command example +cat 命令样例 #### 使用 sed #### @@ -60,7 +60,7 @@ sed最基本的用法是字符替换。我们将通过把每个出现的小写y ![sed command](http://www.tecmint.com/wp-content/uploads/2014/10/sed-command.png) -sed command example +sed 命令样例 如果你要在替换文本中搜索或者替换特殊字符(如/,\,&),你需要使用反斜杠对它进行转义。 @@ -70,7 +70,7 @@ sed command example ![sed replace string](http://www.tecmint.com/wp-content/uploads/2014/10/sed-replace-string.png) -sed replace string +sed 替换字符串 在上面的命令中,^(插入符号)是众所周知用来表示一行开头的正则表达式。 @@ -88,7 +88,7 @@ sed replace string ![sed match string](http://www.tecmint.com/wp-content/uploads/2014/10/sed-match-string.png) -sed match string +sed 匹配字符串 #### uniq C命令 #### @@ -102,7 +102,7 @@ du –sch /path/to/directory/* 命令将会以人类可读的格式返回在指 ![sort command](http://www.tecmint.com/wp-content/uploads/2014/10/sort-command.jpg) -sort command example +sort 命令样例 你可以通过使用下面的命令告诉uniq比较每一行的前6个字符(-w 6)(指定了不同的日期)来统计日志事件的个数,而且在每一行的开头输出出现的次数(-c)。 @@ -111,7 +111,7 @@ sort command example ![Count Numbers in File](http://www.tecmint.com/wp-content/uploads/2014/10/count-numbers-in-file.jpg) -Count Numbers in File +统计文件中数字 最后,你可以组合使用sort和uniq命令(通常如此)。考虑下面文件中捐助者,捐助日期和金额的列表。假设我们想知道有多少个捐助者。我们可以使用下面的命令来分隔第一字段(字段由冒号分隔),按名称排序并且删除重复的行。 @@ -119,7 +119,7 @@ Count Numbers in File ![Find Unique Records in File](http://www.tecmint.com/wp-content/uploads/2014/10/find-uniqu-records-in-file.jpg) -Find Unique Records in File +寻找文件中不重复的记录 - 也可阅读: [13个“cat”命令样例][1] @@ -135,7 +135,7 @@ grep在文件(或命令输出)中搜索指定正则表达式并且在标准 ![grep Command](http://www.tecmint.com/wp-content/uploads/2014/10/grep-command.jpg) -grep command example +grep 命令样例 显示/etc文件夹下所有rc开头并跟随任意数字的内容。 @@ -143,11 +143,11 @@ grep command example ![List Content Using grep](http://www.tecmint.com/wp-content/uploads/2014/10/list-content-using-grep.jpg) -List Content Using grep +使用grep列出内容 - 也可阅读: [12个“grep”命令样例][2] -#### tr Command Usage #### +#### tr 命令使用技巧 #### tr命令可以用来从标准输入中翻译(改变)或者删除字符并将结果写入到标准输出中。 @@ -159,14 +159,14 @@ tr命令可以用来从标准输入中翻译(改变)或者删除字符并将 ![Sort Strings in File](http://www.tecmint.com/wp-content/uploads/2014/10/sort-strings.jpg) -Sort Strings in File +排序文件中的字符串 压缩`ls –l`输出中的定界符至一个空格。 # ls -l | tr -s ' ' ![Squeeze Delimiter](http://www.tecmint.com/wp-content/uploads/2014/10/squeeze-delimeter.jpg) -Squeeze Delimiter +压缩分隔符 #### cut 命令使用方法 #### @@ -180,7 +180,7 @@ cut命令可以基于字节数(-b选项),字符(-c)或者字段(-f ![Extract User Accounts](http://www.tecmint.com/wp-content/uploads/2014/10/extract-user-accounts.jpg) -Extract User Accounts +提取用户账户 总结一下,我们将使用最后一个命令的输出中第一和第三个非空文件创建一个文本流。我们将使用grep作为第一过滤器来检查用户gacanepa的会话,然后将分隔符压缩至一个空格(tr -s ' ')。下一步,我们将使用cut来提取第一和第三个字段,最后使用第二个字段(本样例中,指的是IP地址)来排序之后再用uniq去重。 @@ -188,7 +188,7 @@ Extract User Accounts ![last command](http://www.tecmint.com/wp-content/uploads/2014/10/last-command.png) -last command example +last 命令样例 上面的命令显示了如何将多个命令和管道结合起来以便根据我们的愿望得到过滤后的数据。你也可以逐步地使用它以帮助你理解输出是如何从一个命令传输到下一个命令的(顺便说一句,这是一个非常好的学习经验!) From 9f3fda990911d1d7b0bc8c20667a06d894f15f27 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 31 Aug 2015 10:07:16 +0800 Subject: [PATCH 1937/2517] PUB:20150827 Linux or UNIX--Bash Read a File Line By Line @strugglingyouth --- ... or UNIX--Bash Read a File Line By Line.md | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) rename {translated/tech => published}/20150827 Linux or UNIX--Bash Read a File Line By Line.md (75%) diff --git a/translated/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md b/published/20150827 Linux or UNIX--Bash Read a File Line By Line.md similarity index 75% rename from translated/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md rename to published/20150827 Linux or UNIX--Bash Read a File Line By Line.md index 37473334d1..8702ddec41 100644 --- a/translated/tech/20150827 Linux or UNIX--Bash Read a File Line By Line.md +++ b/published/20150827 Linux or UNIX--Bash Read a File Line By Line.md @@ -1,17 +1,21 @@ - -Linux/UNIX: Bash 下如何逐行读取一个文件 +Bash 下如何逐行读取一个文件 ================================================================================ - 在 Linux 或类 UNIX 系统下如何使用 KSH 或 BASH shell 逐行读取一个文件? -在 Linux, OSX, * BSD ,或者类 Unix 系统下你可以使用​​while..do..done bash 的循环来逐行读取一个文件。 +在 Linux 或类 UNIX 系统下如何使用 KSH 或 BASH shell 逐行读取一个文件? -**在 Bash Unix 或者 Linux shell 中逐行读取一个文件的语法:** +在 Linux、OSX、 *BSD 或者类 Unix 系统下你可以使用 ​​while..do..done 的 bash 循环来逐行读取一个文件。 -1.对于 bash, ksh, zsh,和其他的 shells 语法如下 - -1. while read -r line; do COMMAND; done < input.file -1.通过 -r 选项传递给红色的命令阻止反斜杠被解释。 -1.在 read 命令之前添加 IFS= option,来防止 leading/trailing 尾随的空白字符被分割 - -1. while IFS= read -r line; do COMMAND_on $line; done < input.file +###在 Bash Unix 或者 Linux shell 中逐行读取一个文件的语法 + +对于 bash、ksh、 zsh 和其他的 shells 语法如下 + + while read -r line; do COMMAND; done < input.file + +通过 -r 选项传递给 read 命令以防止阻止解释其中的反斜杠转义符。 + +在 read 命令之前添加 `IFS=` 选项,来防止首尾的空白字符被去掉。 + + while IFS= read -r line; do COMMAND_on $line; done < input.file 这是更适合人类阅读的语法: @@ -30,7 +34,7 @@ Linux/UNIX: Bash 下如何逐行读取一个文件 file="/home/vivek/data.txt" while IFS= read line do - # display $line or do somthing with $line + # display $line or do somthing with $line echo "$line" done <"$file" @@ -40,7 +44,7 @@ Linux/UNIX: Bash 下如何逐行读取一个文件 file="/home/vivek/data.txt" while IFS= read -r line do - # display $line or do somthing with $line + # display $line or do somthing with $line printf '%s\n' "$line" done <"$file" @@ -50,17 +54,17 @@ Linux/UNIX: Bash 下如何逐行读取一个文件 file="/etc/passwd" while IFS=: read -r f1 f2 f3 f4 f5 f6 f7 do - # display fields using f1, f2,..,f7 - printf 'Username: %s, Shell: %s, Home Dir: %s\n' "$f1" "$f7" "$f6" + # display fields using f1, f2,..,f7 + printf 'Username: %s, Shell: %s, Home Dir: %s\n' "$f1" "$f7" "$f6" done <"$file" 示例输出: ![Fig.01: Bash shell scripting- read file line by line demo outputs](http://s0.cyberciti.org/uploads/faq/2011/01/Bash-Scripting-Read-File-line-by-line-demo.jpg) -图01:Bash shell scripting- 读取文件并逐行输出文件 +*图01:Bash 脚本:读取文件并逐行输出文件* -**Bash Scripting: 逐行读取文本文件并创建为 pdf 文件** +###Bash 脚本:逐行读取文本文件并创建为 pdf 文件 我的输入文件如下(faq.txt): @@ -75,7 +79,7 @@ Linux/UNIX: Bash 下如何逐行读取一个文件 8292|http://www.cyberciti.biz/faq/mounting-harddisks-in-freebsd-with-mount-command/|FreeBSD: Mount Hard Drive / Disk Command 8190|http://www.cyberciti.biz/faq/rebooting-solaris-unix-server/|Reboot a Solaris UNIX System -我的 bash script: +我的 bash 脚本: #!/bin/bash # Usage: Create pdf files from input (wrapper script) @@ -106,11 +110,11 @@ Linux/UNIX: Bash 下如何逐行读取一个文件 done <"$_db" fi -**提示:从 bash 的变量开始读取** +###技巧:从 bash 变量中读取 让我们看看如何在 Debian 或者 Ubuntu Linux 下列出所有安装过的 php 包,请输入: - # 我将输出内容赋值到一个变量名为$list中 # + # 我将输出内容赋值到一个变量名为 $list中 # list=$(dpkg --list php\* | awk '/ii/{print $2}') printf '%s\n' "$list" @@ -128,7 +132,7 @@ Linux/UNIX: Bash 下如何逐行读取一个文件 php5-readline php5-suhosin-extension -你现在可以从 $list 中看到安装的包: +你现在可以从 $list 中看到它们,并安装这些包: #!/bin/bash # BASH can iterate over $list variable using a "here string" # @@ -152,15 +156,14 @@ Linux/UNIX: Bash 下如何逐行读取一个文件 Installing php package php5-readline... Installing php package php5-suhosin-extension... - - *** 不要忘了运行php5enmod并重新启动服务(httpd 或 php5-fpm) *** + *** Do not forget to run php5enmod and restart the server (httpd or php5-fpm) *** -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/faq/unix-howto-read-line-by-line-from-file/ -作者:[作者名][a] +作者: VIVEK GIT 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 61e0b79ff34515e3428f66ba8ee2b23b7eca2311 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 31 Aug 2015 10:47:16 +0800 Subject: [PATCH 1938/2517] PUB:20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien @GOLinux --- ... DEB and DEB to RPM Package Using Alien.md | 68 +++++++++++-------- 1 file changed, 40 insertions(+), 28 deletions(-) rename {translated/tech => published}/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md (73%) diff --git a/translated/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md b/published/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md similarity index 73% rename from translated/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md rename to published/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md index 98abba27f3..366a3c1e98 100644 --- a/translated/tech/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md +++ b/published/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md @@ -1,29 +1,31 @@ -Alien大法:RPM和DEB互转 +Alien 魔法:RPM 和 DEB 互转 ================================================================================ -正如我确信,你们一定知道Linux下的多种软件安装方式:使用发行版所提供的包管理系统([aptitude,yum,或者zypper][1],还可以举很多例子),从源码编译(尽管现在很少用了,但在Linux发展早期却是唯一可用的方法),或者使用各自的低级工具dpkg用于.deb,以及rpm用于.rpm,预编译包等等。 + +正如我确信,你们一定知道Linux下的多种软件安装方式:使用发行版所提供的包管理系统([aptitude,yum,或者zypper][1],还可以举很多例子),从源码编译(尽管现在很少用了,但在Linux发展早期却是唯一可用的方法),或者使用各自的低级工具dpkg用于.deb,以及rpm用于.rpm,预编译包,如此这般。 ![Convert RPM to DEB and DEB to RPM](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-RPM-to-DEB-and-DEB-to-RPM.png) -使用Alien将RPM转换成DEB以及将DEB转换成RPM -在本文中,我们将为你介绍alien,一个用于在各种不同的Linux包格式相互转换的工具,将.rpm转换成.deb(或者反过来)是最常见的用法。 +*使用Alien将RPM转换成DEB以及将DEB转换成RPM* -如果你需要某个特定类型的包,而你只能找到其它格式的包的时候,该工具,即使当其作者不再维护,并且在其网站声明:alien将可能永远维持在实验状态,迟早派得上用场。 +在本文中,我们将为你介绍alien,一个用于在各种不同的Linux包格式相互转换的工具,其最常见的用法是将.rpm转换成.deb(或者反过来)。 + +如果你需要某个特定类型的包,而你只能找到其它格式的包的时候,该工具迟早能派得上用场——即使是其作者不再维护,并且在其网站声明:alien将可能永远维持在实验状态。 例如,有一次,我正查找一个用于喷墨打印机的.deb驱动,但是却没有找到——生产厂家只提供.rpm包,这时候alien拯救了我。我安装了alien,将包进行转换,不久之后我就可以使用我的打印机了,没有任何问题。 -即便如此,我们也必须澄清一下,这个工具不应当用来替换重要的系统文件和库,因为它们在不同的发行版中有不同的配置。只有在本文开头提出的安装方法根本不适合所需的程序时,alien才能作为最后手段使用。 +即便如此,我们也必须澄清一下,这个工具不应当用来转换重要的系统文件和库,因为它们在不同的发行版中有不同的配置。只有在前面说的那种情况下所建议的安装方法根本不适合时,alien才能作为最后手段使用。 -最后一项要点是,我们必须注意,虽然我们在本文中使用CentOS和Debian,除了前两个发行版及其各自的家族体系外,alien也据我们所知可以工作在Slackware中,甚至Solaris中。 +最后一项要点是,我们必须注意,虽然我们在本文中使用CentOS和Debian,除了前两个发行版及其各自的家族体系外,据我们所知,alien可以工作在Slackware中,甚至Solaris中。 -### 步骤1:安装Alien及其依赖 ### +### 步骤1:安装Alien及其依赖包 ### 要安装alien到CentOS/RHEL 7中,你需要启用EPEL和Nux Dextop(是的,是Dextop——不是Desktop)仓库,顺序如下: # yum install epel-release + +启用Nux Dextop仓库的包的当前最新版本是0.5(2015年8月10日发布),在安装之前你可以查看[http://li.nux.ro/download/nux/dextop/el7/x86_64/][2]上是否有更新的版本。 + # rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro - -启用该仓库的包的当前最新版本是0.5(2015年8月10日发布),在安装之前你可以查看[http://li.nux.ro/download/nux/dextop/el7/x86_64/][2]上是否有更新的版本。 - # rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm 然后再做, @@ -49,7 +51,8 @@ Alien大法:RPM和DEB互转 # alien --to-rpm --scripts dateutils_0.3.1-1.1_amd64.deb ![Convert .deb to .rpm package in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-deb-to-rpm-package.png) -在Linux中将.deb转换成.rpm + +*在Linux中将.deb转换成.rpm* **重要**:(请注意alien是怎样来增加目标包的次版本号的。如果你想要无视该行为,请添加-keep-version标识)。 @@ -58,7 +61,8 @@ Alien大法:RPM和DEB互转 # rpm -Uvh dateutils-0.3.1-2.1.x86_64.rpm ![Install RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-RPM-Package.png) -安装RPM包 + +*安装RPM包* 要解决该问题,我们需要启用epel-testing仓库,然后安装rpmbuild工具来编辑该包的配置以重建包: @@ -68,17 +72,19 @@ Alien大法:RPM和DEB互转 # rpmrebuild -pe dateutils-0.3.1-2.1.x86_64.rpm -它会打开你的默认文本编辑器。转到`%files`章节并删除涉及到错误信息中提到的目录的行,然后保存文件并退出: +它会打开你的默认文本编辑器。请转到`%files`章节并删除涉及到错误信息中提到的目录的行,然后保存文件并退出: ![Convert .deb to Alien Version](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-Deb-Package-to-Alien-Version.png) -转换.deb到Alien版 -但你退出该文件后,将提示你继续去重构。如果你选择Y,该文件会重构到指定的目录(与当前工作目录不同): +*转换.deb到Alien版* + +但你退出该文件后,将提示你继续去重构。如果你选择“Y”,该文件会重构到指定的目录(与当前工作目录不同): # rpmrebuild –pe dateutils-0.3.1-2.1.x86_64.rpm ![Build RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Build-RPM-Package.png) -构建RPM包 + +*构建RPM包* 现在你可以像以往一样继续来安装包并验证: @@ -86,14 +92,16 @@ Alien大法:RPM和DEB互转 # rpm -qa | grep dateutils ![Install Build RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Build-RPM-Package.png) -安装构建RPM包 -最后,你可以列出date工具包含的各个工具,并可选择性地查看各自的手册页: +*安装构建RPM包* + +最后,你可以列出date工具包含的各个工具,也可以查看各自的手册页: # ls -l /usr/bin | grep dateutils ![Verify Installed RPM Package](http://www.tecmint.com/wp-content/uploads/2015/08/Verify-Installed-Package.png) -验证安装的RPM包 + +*验证安装的RPM包* ### 步骤3:将.rpm转换成.deb包 ### @@ -103,7 +111,8 @@ Alien大法:RPM和DEB互转 # lsb_release -a | tail -n 4 ![Check Shell and Debian OS Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Shell-Debian-OS-Version.png) -检查Shell和Debian操作系统版本 + +*检查Shell和Debian操作系统版本* # wget http://mirror.centos.org/centos/6/os/i386/Packages/zsh-4.3.11-4.el6.centos.i686.rpm # alien --to-deb --scripts zsh-4.3.11-4.el6.centos.i686.rpm @@ -111,27 +120,30 @@ Alien大法:RPM和DEB互转 你可以安全地无视关于签名丢失的信息: ![Convert .rpm to .deb Package](http://www.tecmint.com/wp-content/uploads/2015/08/Convert-rpm-to-deb-Package.png) -将.rpm转换成.deb包 + +*将.rpm转换成.deb包* 过了一会儿后,.deb包应该已经生成,并可以安装了: # dpkg -i zsh_4.3.11-5_i386.deb ![Install RPM Converted Deb Package](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Deb-Package.png) -安装RPM转换来的Deb包 -安装完后,你可以zsh是否添加到了合法shell列表中: +*安装RPM转换来的Deb包* + +安装完后,你看看可以zsh是否添加到了合法shell列表中: # cat /etc/shells ![Confirm Installed Zsh Package](http://www.tecmint.com/wp-content/uploads/2015/08/Confirm-Installed-Package.png) -确认安装的Zsh包 + +*确认安装的Zsh包* ### 小结 ### -在本文中,我们已经解释了如何将.rpm转换成.deb及其反向转换并作为这类程序不能从仓库中或者作为可分发源代码获得的最后安装手段。你一定想要将本文添加到书签中,因为我们都需要alien。 +在本文中,我们已经解释了如何将.rpm转换成.deb及其反向转换,这可以作为这类程序不能从仓库中或者作为可分发源代码获得的最后安装手段。你一定想要将本文添加到书签中,因为我们都需要alien。 -请自由分享你关于本文的想法,写到下面的表格中吧。 +请自由分享你关于本文的想法,写到下面的表单中吧。 -------------------------------------------------------------------------------- @@ -139,7 +151,7 @@ via: http://www.tecmint.com/convert-from-rpm-to-deb-and-deb-to-rpm-package-using 作者:[Gabriel Cánepa][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 5d2647c6a89ed1b0805362f6c2111e627f58865b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 31 Aug 2015 15:51:24 +0800 Subject: [PATCH 1939/2517] PUB:Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux @strugglingyouth --- ...ith Double Distributed Parity) in Linux.md | 185 +++++++++--------- 1 file changed, 92 insertions(+), 93 deletions(-) rename {translated/tech/RAID => published}/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md (50%) diff --git a/translated/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md b/published/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md similarity index 50% rename from translated/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md rename to published/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md index 1890a242e2..d222a997e5 100644 --- a/translated/tech/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md +++ b/published/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md @@ -1,77 +1,78 @@ - -在 Linux 中安装 RAID 6(条带化双分布式奇偶校验) - 第5部分 +在 Linux 下使用 RAID(五):安装 RAID 6(条带化双分布式奇偶校验) ================================================================================ -RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两个磁盘发生故障后依然有容错能力。两并列的磁盘发生故障时,系统的关键任务仍然能运行。它与 RAID 5 相似,但性能更健壮,因为它多用了一个磁盘来进行奇偶校验。 -在之前的文章中,我们已经在 RAID 5 看了分布式奇偶校验,但在本文中,我们将看到的是 RAID 6 双分布式奇偶校验。不要期望比其他 RAID 有额外的性能,我们仍然需要安装一个专用的 RAID 控制器。在 RAID 6 中,即使我们失去了2个磁盘,我们仍可以取回数据通过更换磁盘,然后从校验中构建数据。 +RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即使两个磁盘发生故障后依然有容错能力。在两个磁盘同时发生故障时,系统的关键任务仍然能运行。它与 RAID 5 相似,但性能更健壮,因为它多用了一个磁盘来进行奇偶校验。 + +在之前的文章中,我们已经在 RAID 5 看了分布式奇偶校验,但在本文中,我们将看到的是 RAID 6 双分布式奇偶校验。不要期望比其他 RAID 有更好的性能,除非你也安装了一个专用的 RAID 控制器。在 RAID 6 中,即使我们失去了2个磁盘,我们仍可以通过更换磁盘,从校验中构建数据,然后取回数据。 ![Setup RAID 6 in CentOS](http://www.tecmint.com/wp-content/uploads/2014/11/Setup-RAID-6-in-Linux.jpg) -在 Linux 中安装 RAID 6 +*在 Linux 中安装 RAID 6* -要建立一个 RAID 6,一组最少需要4个磁盘。RAID 6 甚至在有些设定中会有多组磁盘,当读取数据时,它会同时从所有磁盘读取,所以读取速度会更快,当写数据时,因为它要将数据写在条带化的多个磁盘上,所以性能会较差。 +要建立一个 RAID 6,一组最少需要4个磁盘。RAID 6 甚至在有些组中会有更多磁盘,这样将多个硬盘捆在一起,当读取数据时,它会同时从所有磁盘读取,所以读取速度会更快,当写数据时,因为它要将数据写在条带化的多个磁盘上,所以性能会较差。 -现在,很多人都在讨论为什么我们需要使用 RAID 6,它的性能和其他 RAID 相比并不太好。提出这个问题首先需要知道的是,如果需要高容错的必须选择 RAID 6。在每一个对数据库的高可用性要求较高的环境中,他们需要 RAID 6 因为数据库是最重要,无论花费多少都需要保护其安全,它在视频流环境中也是非常有用的。 +现在,很多人都在讨论为什么我们需要使用 RAID 6,它的性能和其他 RAID 相比并不太好。提出这个问题首先需要知道的是,如果需要高容错性就选择 RAID 6。在每一个用于数据库的高可用性要求较高的环境中,他们需要 RAID 6 因为数据库是最重要,无论花费多少都需要保护其安全,它在视频流环境中也是非常有用的。 #### RAID 6 的的优点和缺点 #### -- 性能很不错。 -- RAID 6 非常昂贵,因为它要求两个独立的磁盘用于奇偶校验功能。 +- 性能不错。 +- RAID 6 比较昂贵,因为它要求两个独立的磁盘用于奇偶校验功能。 - 将失去两个磁盘的容量来保存奇偶校验信息(双奇偶校验)。 -- 不存在数据丢失,即时两个磁盘损坏。我们可以在更换损坏的磁盘后从校验中重建数据。 +- 即使两个磁盘损坏,数据也不会丢失。我们可以在更换损坏的磁盘后从校验中重建数据。 - 读性能比 RAID 5 更好,因为它从多个磁盘读取,但对于没有专用的 RAID 控制器的设备写性能将非常差。 #### 要求 #### -要创建一个 RAID 6 最少需要4个磁盘.你也可以添加更多的磁盘,但你必须有专用的 RAID 控制器。在软件 RAID 中,我们在 RAID 6 中不会得到更好的性能,所以我们需要一个物理 RAID 控制器。 +要创建一个 RAID 6 最少需要4个磁盘。你也可以添加更多的磁盘,但你必须有专用的 RAID 控制器。使用软件 RAID 我们在 RAID 6 中不会得到更好的性能,所以我们需要一个物理 RAID 控制器。 -这些是新建一个 RAID 需要的设置,我们建议先看完以下 RAID 文章。 +如果你新接触 RAID 设置,我们建议先看完以下 RAID 文章。 -- [Linux 中 RAID 的基本概念 – 第一部分][1] -- [在 Linux 上创建软件 RAID 0 (条带化) – 第二部分][2] -- [在 Linux 上创建软件 RAID 1 (镜像) – 第三部分][3] +- [介绍 RAID 的级别和概念][1] +- [使用 mdadm 工具创建软件 RAID 0 (条带化)][2] +- [用两块磁盘创建 RAID 1(镜像)][3] +- [创建 RAID 5(条带化与分布式奇偶校验)](4) -#### My Server Setup #### +#### 我的服务器设置 #### - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.228 - Hostname : rd6.tecmintlocal.com - Disk 1 [20GB] : /dev/sdb - Disk 2 [20GB] : /dev/sdc - Disk 3 [20GB] : /dev/sdd - Disk 4 [20GB] : /dev/sde + 操作系统 : CentOS 6.5 Final + IP 地址 : 192.168.0.228 + 主机名 : rd6.tecmintlocal.com + 磁盘 1 [20GB] : /dev/sdb + 磁盘 2 [20GB] : /dev/sdc + 磁盘 3 [20GB] : /dev/sdd + 磁盘 4 [20GB] : /dev/sde -这篇文章是9系列 RAID 教程的第5部分,在这里我们将看到我们如何在 Linux 系统或者服务器上创建和设置软件 RAID 6 或条带化双分布式奇偶校验,使用四个 20GB 的磁盘 /dev/sdb, /dev/sdc, /dev/sdd 和 /dev/sde. +这是9篇系列教程的第5部分,在这里我们将看到如何在 Linux 系统或者服务器上使用四个 20GB 的磁盘(名为 /dev/sdb、 /dev/sdc、 /dev/sdd 和 /dev/sde)创建和设置软件 RAID 6 (条带化双分布式奇偶校验)。 ### 第1步:安装 mdadm 工具,并检查磁盘 ### -1.如果你按照我们最进的两篇 RAID 文章(第2篇和第3篇),我们已经展示了如何安装‘mdadm‘工具。如果你直接看的这篇文章,我们先来解释下在Linux系统中如何使用‘mdadm‘工具来创建和管理 RAID,首先根据你的 Linux 发行版使用以下命令来安装。 +1、 如果你按照我们最进的两篇 RAID 文章(第2篇和第3篇),我们已经展示了如何安装`mdadm`工具。如果你直接看的这篇文章,我们先来解释下在 Linux 系统中如何使用`mdadm`工具来创建和管理 RAID,首先根据你的 Linux 发行版使用以下命令来安装。 - # yum install mdadm [on RedHat systems] - # apt-get install mdadm [on Debain systems] + # yum install mdadm [在 RedHat 系统] + # apt-get install mdadm [在 Debain 系统] -2.安装该工具后,然后来验证需要的四个磁盘,我们将会使用下面的‘fdisk‘命令来检验用于创建 RAID 的磁盘。 +2、 安装该工具后,然后来验证所需的四个磁盘,我们将会使用下面的`fdisk`命令来检查用于创建 RAID 的磁盘。 # fdisk -l | grep sd ![Check Hard Disk in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Linux-Disks.png) -在 Linux 中检查磁盘 +*在 Linux 中检查磁盘* -3.在创建 RAID 磁盘前,先检查下我们的磁盘是否创建过 RAID 分区。 +3、 在创建 RAID 磁盘前,先检查下我们的磁盘是否创建过 RAID 分区。 # mdadm -E /dev/sd[b-e] - # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde # 或 ![Check Raid on Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Disk-Raid.png) -在磁盘上检查 Raid 分区 +*在磁盘上检查 RAID 分区* **注意**: 在上面的图片中,没有检测到任何 super-block 或者说在四个磁盘上没有 RAID 存在。现在我们开始创建 RAID 6。 ### 第2步:为 RAID 6 创建磁盘分区 ### -4.现在为 raid 创建分区‘/dev/sdb‘, ‘/dev/sdc‘, ‘/dev/sdd‘ 和 ‘/dev/sde‘使用下面 fdisk 命令。在这里,我们将展示如何创建分区在 sdb 磁盘,同样的步骤也适用于其他分区。 +4、 现在在 `/dev/sdb`, `/dev/sdc`, `/dev/sdd` 和 `/dev/sde`上为 RAID 创建分区,使用下面的 fdisk 命令。在这里,我们将展示如何在 sdb 磁盘创建分区,同样的步骤也适用于其他分区。 **创建 /dev/sdb 分区** @@ -79,20 +80,20 @@ RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两 请按照说明进行操作,如下图所示创建分区。 -- 按 ‘n’ 创建新的分区。 -- 然后按 ‘P’ 选择主分区。 +- 按 `n`创建新的分区。 +- 然后按 `P` 选择主分区。 - 接下来选择分区号为1。 - 只需按两次回车键选择默认值即可。 -- 然后,按 ‘P’ 来打印创建好的分区。 -- 按 ‘L’,列出所有可用的类型。 -- 按 ‘t’ 去修改分区。 -- 键入 ‘fd’ 设置为 Linux 的 RAID 类型,然后按 Enter 确认。 -- 然后再次使用‘p’查看我们所做的更改。 -- 使用‘w’保存更改。 +- 然后,按 `P` 来打印创建好的分区。 +- 按 `L`,列出所有可用的类型。 +- 按 `t` 去修改分区。 +- 键入 `fd` 设置为 Linux 的 RAID 类型,然后按回车确认。 +- 然后再次使用`p`查看我们所做的更改。 +- 使用`w`保存更改。 ![Create sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdb-Partition.png) -创建 /dev/sdb 分区 +*创建 /dev/sdb 分区* **创建 /dev/sdc 分区** @@ -100,7 +101,7 @@ RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两 ![Create sdc Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdc-Partition.png) -创建 /dev/sdc 分区 +*创建 /dev/sdc 分区* **创建 /dev/sdd 分区** @@ -108,7 +109,7 @@ RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两 ![Create sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sdd-Partition.png) -创建 /dev/sdd 分区 +*创建 /dev/sdd 分区* **创建 /dev/sde 分区** @@ -116,71 +117,67 @@ RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两 ![Create sde Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-sde-Partition.png) -创建 /dev/sde 分区 +*创建 /dev/sde 分区* -5.创建好分区后,检查磁盘的 super-blocks 是个好的习惯。如果 super-blocks 不存在我们可以按前面的创建一个新的 RAID。 +5、 创建好分区后,检查磁盘的 super-blocks 是个好的习惯。如果 super-blocks 不存在我们可以按前面的创建一个新的 RAID。 - # mdadm -E /dev/sd[b-e]1 - - - 或者 - - # mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 + # mdadm -E /dev/sd[b-e]1 + # mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 # 或 ![Check Raid on New Partitions](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-New-Partitions.png) -在新分区中检查 Raid +*在新分区中检查 RAID * ### 步骤3:创建 md 设备(RAID) ### -6,现在是时候来创建 RAID 设备‘md0‘ (即 /dev/md0)并应用 RAID 级别在所有新创建的分区中,确认 raid 使用以下命令。 +6、 现在可以使用以下命令创建 RAID 设备`md0` (即 /dev/md0),并在所有新创建的分区中应用 RAID 级别,然后确认 RAID 设置。 # mdadm --create /dev/md0 --level=6 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 # cat /proc/mdstat ![Create Raid 6 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Create-Raid-6-Device.png) -创建 Raid 6 设备 +*创建 Raid 6 设备* -7.你还可以使用 watch 命令来查看当前 raid 的进程,如下图所示。 +7、 你还可以使用 watch 命令来查看当前创建 RAID 的进程,如下图所示。 # watch -n1 cat /proc/mdstat ![Check Raid 6 Process](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Process.png) -检查 Raid 6 进程 +*检查 RAID 6 创建过程* -8.使用以下命令验证 RAID 设备。 +8、 使用以下命令验证 RAID 设备。 -# mdadm -E /dev/sd[b-e]1 + # mdadm -E /dev/sd[b-e]1 **注意**::上述命令将显示四个磁盘的信息,这是相当长的,所以没有截取其完整的输出。 -9.接下来,验证 RAID 阵列,以确认 re-syncing 被启动。 +9、 接下来,验证 RAID 阵列,以确认重新同步过程已经开始。 # mdadm --detail /dev/md0 ![Check Raid 6 Array](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Array.png) -检查 Raid 6 阵列 +*检查 Raid 6 阵列* ### 第4步:在 RAID 设备上创建文件系统 ### -10.使用 ext4 为‘/dev/md0‘创建一个文件系统并将它挂载在 /mnt/raid5 。这里我们使用的是 ext4,但你可以根据你的选择使用任意类型的文件系统。 +10、 使用 ext4 为`/dev/md0`创建一个文件系统,并将它挂载在 /mnt/raid6 。这里我们使用的是 ext4,但你可以根据你的选择使用任意类型的文件系统。 # mkfs.ext4 /dev/md0 ![Create File System on Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Create-File-System-on-Raid.png) -在 Raid 6 上创建文件系统 +*在 RAID 6 上创建文件系统* -11.挂载创建的文件系统到 /mnt/raid6,并验证挂载点下的文件,我们可以看到 lost+found 目录。 +11、 将创建的文件系统挂载到 /mnt/raid6,并验证挂载点下的文件,我们可以看到 lost+found 目录。 # mkdir /mnt/raid6 # mount /dev/md0 /mnt/raid6/ # ls -l /mnt/raid6/ -12.在挂载点下创建一些文件,在任意文件中添加一些文字并验证其内容。 +12、 在挂载点下创建一些文件,在任意文件中添加一些文字并验证其内容。 # touch /mnt/raid6/raid6_test.txt # ls -l /mnt/raid6/ @@ -189,9 +186,9 @@ RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两 ![Verify Raid Content](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-Content.png) -验证 Raid 内容 +*验证 RAID 内容* -13.在 /etc/fstab 中添加以下条目使系统启动时自动挂载设备,环境不同挂载点可能会有所不同。 +13、 在 /etc/fstab 中添加以下条目使系统启动时自动挂载设备,操作系统环境不同挂载点可能会有所不同。 # vim /etc/fstab @@ -199,36 +196,37 @@ RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两 ![Automount Raid 6 Device](http://www.tecmint.com/wp-content/uploads/2014/11/Automount-Raid-Device.png) -自动挂载 Raid 6 设备 +*自动挂载 RAID 6 设备* -14.接下来,执行‘mount -a‘命令来验证 fstab 中的条目是否有错误。 +14、 接下来,执行`mount -a`命令来验证 fstab 中的条目是否有错误。 # mount -av ![Verify Raid Automount](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Automount-Raid-Devices.png) -验证 Raid 是否自动挂载 +*验证 RAID 是否自动挂载* ### 第5步:保存 RAID 6 的配置 ### -15.请注意默认 RAID 没有配置文件。我们需要使用以下命令手动保存它,然后检查设备‘/dev/md0‘的状态。 +15、 请注意,默认情况下 RAID 没有配置文件。我们需要使用以下命令手动保存它,然后检查设备`/dev/md0`的状态。 # mdadm --detail --scan --verbose >> /etc/mdadm.conf + # cat /etc/mdadm.conf # mdadm --detail /dev/md0 ![Save Raid 6 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Status.png) -保存 Raid 6 配置 +*保存 RAID 6 配置* ![Check Raid 6 Status](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Status.png) -检查 Raid 6 状态 +*检查 RAID 6 状态* ### 第6步:添加备用磁盘 ### -16.现在,它使用了4个磁盘,并且有两个作为奇偶校验信息来使用。在某些情况下,如果任意一个磁盘出现故障,我们仍可以得到数据,因为在 RAID 6 使用双奇偶校验。 +16、 现在,已经使用了4个磁盘,并且其中两个作为奇偶校验信息来使用。在某些情况下,如果任意一个磁盘出现故障,我们仍可以得到数据,因为在 RAID 6 使用双奇偶校验。 -如果第二个磁盘也出现故障,在第三块磁盘损坏前我们可以添加一个​​新的。它可以作为一个备用磁盘并入 RAID 集合,但我在创建 raid 集合前没有定义备用的磁盘。但是,在磁盘损坏后或者创建 RAId 集合时我们可以添加一块磁盘。现在,我们已经创建好了 RAID,下面让我演示如何添加备用磁盘。 +如果第二个磁盘也出现故障,在第三块磁盘损坏前我们可以添加一个​​新的。可以在创建 RAID 集时加入一个备用磁盘,但我在创建 RAID 集合前没有定义备用的磁盘。不过,我们可以在磁盘损坏后或者创建 RAID 集合时添加一块备用磁盘。现在,我们已经创建好了 RAID,下面让我演示如何添加备用磁盘。 为了达到演示的目的,我已经热插入了一个新的 HDD 磁盘(即 /dev/sdf),让我们来验证接入的磁盘。 @@ -236,15 +234,15 @@ RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两 ![Check New Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-New-Disk.png) -检查新 Disk +*检查新磁盘* -17.现在再次确认新连接的磁盘没有配置过 RAID ,使用 mdadm 来检查。 +17、 现在再次确认新连接的磁盘没有配置过 RAID ,使用 mdadm 来检查。 # mdadm --examine /dev/sdf ![Check Raid on New Disk](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-New-Disk.png) -在新磁盘中检查 Raid +*在新磁盘中检查 RAID* **注意**: 像往常一样,我们早前已经为四个磁盘创建了分区,同样,我们使用 fdisk 命令为新插入的磁盘创建新分区。 @@ -252,9 +250,9 @@ RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两 ![Create sdf Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Create-Partition-on-sdf.png) -为 /dev/sdf 创建分区 +*为 /dev/sdf 创建分区* -18.在 /dev/sdf 创建新的分区后,在新分区上确认 raid,包括/dev/md0 raid 设备的备用磁盘,并验证添加的设备。 +18、 在 /dev/sdf 创建新的分区后,在新分区上确认没有 RAID,然后将备用磁盘添加到 RAID 设备 /dev/md0 中,并验证添加的设备。 # mdadm --examine /dev/sdf # mdadm --examine /dev/sdf1 @@ -263,19 +261,19 @@ RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两 ![Verify Raid on sdf Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-Raid-on-sdf.png) -在 sdf 分区上验证 Raid +*在 sdf 分区上验证 Raid* ![Add sdf Partition to Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Add-sdf-Partition-to-Raid.png) -为 RAID 添加 sdf 分区 +*添加 sdf 分区到 RAID * ![Verify sdf Partition Details](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-sdf-Details.png) -验证 sdf 分区信息 +*验证 sdf 分区信息* ### 第7步:检查 RAID 6 容错 ### -19.现在,让我们检查备用驱动器是否能自动工作,当我们阵列中的任何一个磁盘出现故障时。为了测试,我亲自将一个磁盘模拟为故障设备。 +19、 现在,让我们检查备用驱动器是否能自动工作,当我们阵列中的任何一个磁盘出现故障时。为了测试,我将一个磁盘手工标记为故障设备。 在这里,我们标记 /dev/sdd1 为故障磁盘。 @@ -283,15 +281,15 @@ RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两 ![Check Raid 6 Fault Tolerance](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-6-Failover.png) -检查 Raid 6 容错 +*检查 RAID 6 容错* -20.让我们查看 RAID 的详细信息,并检查备用磁盘是否开始同步。 +20、 让我们查看 RAID 的详细信息,并检查备用磁盘是否开始同步。 # mdadm --detail /dev/md0 ![Check Auto Raid Syncing](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Auto-Raid-Syncing.png) -检查 Raid 自动同步 +*检查 RAID 自动同步* **哇塞!** 这里,我们看到备用磁盘激活了,并开始重建进程。在底部,我们可以看到有故障的磁盘 /dev/sdd1 标记为 faulty。可以使用下面的命令查看进程重建。 @@ -299,11 +297,11 @@ RAID 6 是 RAID 5 的升级版,它有两个分布式奇偶校验,即时两 ![Raid 6 Auto Syncing](http://www.tecmint.com/wp-content/uploads/2014/11/Raid-6-Auto-Syncing.png) -Raid 6 自动同步 +*RAID 6 自动同步* ### 结论: ### -在这里,我们看到了如何使用四个磁盘设置 RAID 6。这种 RAID 级别是具有高冗余的昂贵设置之一。在接下来的文章中,我们将看到如何建立一个嵌套的 RAID 10 甚至更多。至此,请继续关注 TECMINT。 +在这里,我们看到了如何使用四个磁盘设置 RAID 6。这种 RAID 级别是具有高冗余的昂贵设置之一。在接下来的文章中,我们将看到如何建立一个嵌套的 RAID 10 甚至更多。请继续关注。 -------------------------------------------------------------------------------- @@ -311,11 +309,12 @@ via: http://www.tecmint.com/create-raid-6-in-linux/ 作者:[Babin Lonston][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者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/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/create-raid0-in-linux/ -[3]:http://www.tecmint.com/create-raid1-in-linux/ +[1]:https://linux.cn/article-6085-1.html +[2]:https://linux.cn/article-6087-1.html +[3]:https://linux.cn/article-6093-1.html +[4]:https://linux.cn/article-6102-1.html From cbe0470402a2ef2303db565a5a3475d50643f9c1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 31 Aug 2015 16:12:20 +0800 Subject: [PATCH 1940/2517] =?UTF-8?q?20150831-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...31 Linux workstation security checklist.md | 800 ++++++++++++++++++ 1 file changed, 800 insertions(+) create mode 100644 sources/tech/20150831 Linux workstation security checklist.md diff --git a/sources/tech/20150831 Linux workstation security checklist.md b/sources/tech/20150831 Linux workstation security checklist.md new file mode 100644 index 0000000000..bc2b59f16a --- /dev/null +++ b/sources/tech/20150831 Linux workstation security checklist.md @@ -0,0 +1,800 @@ +Linux workstation security checklist +================================================================================ +This is a set of recommendations used by the Linux Foundation for their systems +administrators. All of LF employees are remote workers and we use this set of +guidelines to ensure that a sysadmin's system passes core security requirements +in order to reduce the risk of it becoming an attack vector against the rest +of our infrastructure. + +Even if your systems administrators are not remote workers, chances are that +they perform a lot of their work either from a portable laptop in a work +environment, or set up their home systems to access the work infrastructure +for after-hours/emergency support. In either case, you can adapt this set of +recommendations to suit your environment. + +This, by no means, is an exhaustive "workstation hardening" document, but +rather an attempt at a set of baseline recommendations to avoid most glaring +security errors without introducing too much inconvenience. You may read this +document and think it is way too paranoid, while someone else may think this +barely scratches the surface. Security is just like driving on the highway -- +anyone going slower than you is an idiot, while anyone driving faster than you +is a crazy person. These guidelines are merely a basic set of core safety +rules that is neither exhaustive, nor a replacement for experience, vigilance, +and common sense. + +Each section is split into two areas: + +- The checklist that can be adapted to your project's needs +- Free-form list of considerations that explain what dictated these decisions + +## Severity levels + +The items in each checklist include the severity level, which we hope will help +guide your decision: + +- _(CRITICAL)_ items should definitely be high on the consideration list. + If not implemented, they will introduce high risks to your workstation + security. +- _(MODERATE)_ items will improve your security posture, but are less + important, especially if they interfere too much with your workflow. +- _(LOW)_ items may improve the overall security, but may not be worth the + convenience trade-offs. +- _(PARANOID)_ is reserved for items we feel will dramatically improve your + workstation security, but will probably require a lot of adjustment to the + way you interact with your operating system. + +Remember, these are only guidelines. If you feel these severity levels do not +reflect your project's commitment to security, you should adjust them as you +see fit. + +## Choosing the right hardware + +We do not mandate that our admins use a specific vendor or a specific model, so +this section addresses core considerations when choosing a work system. + +### Checklist + +- [ ] System supports SecureBoot _(CRITICAL)_ +- [ ] System has no firewire, thunderbolt or ExpressCard ports _(MODERATE)_ +- [ ] System has a TPM chip _(LOW)_ + +### Considerations + +#### SecureBoot + +Despite its controversial nature, SecureBoot offers prevention against many +attacks targeting workstations (Rootkits, "Evil Maid," etc), without +introducing too much extra hassle. It will not stop a truly dedicated attacker, +plus there is a pretty high degree of certainty that state security agencies +have ways to defeat it (probably by design), but having SecureBoot is better +than having nothing at all. + +Alternatively, you may set up [Anti Evil Maid][1] which offers a more +wholesome protection against the type of attacks that SecureBoot is supposed +to prevent, but it will require more effort to set up and maintain. + +#### Firewire, thunderbolt, and ExpressCard ports + +Firewire is a standard that, by design, allows any connecting device full +direct memory access to your system ([see Wikipedia][2]). Thunderbolt and +ExpressCard are guilty of the same, though some later implementations of +Thunderbolt attempt to limit the scope of memory access. It is best if the +system you are getting has none of these ports, but it is not critical, as +they usually can be turned off via UEFI or disabled in the kernel itself. + +#### TPM Chip + +Trusted Platform Module (TPM) is a crypto chip bundled with the motherboard +separately from the core processor, which can be used for additional platform +security (such as to store full-disk encryption keys), but is not normally used +for day-to-day workstation operation. At best, this is a nice-to-have, unless +you have a specific need to use TPM for your workstation security. + +## Pre-boot environment + +This is a set of recommendations for your workstation before you even start +with OS installation. + +### Checklist + +- [ ] UEFI boot mode is used (not legacy BIOS) _(CRITICAL)_ +- [ ] Password is required to enter UEFI configuration _(CRITICAL)_ +- [ ] SecureBoot is enabled _(CRITICAL)_ +- [ ] UEFI-level password is required to boot the system _(LOW)_ + +### Considerations + +#### UEFI and SecureBoot + +UEFI, with all its warts, offers a lot of goodies that legacy BIOS doesn't, +such as SecureBoot. Most modern systems come with UEFI mode on by default. + +Make sure a strong password is required to enter UEFI configuration mode. Pay +attention, as many manufacturers quietly limit the length of the password you +are allowed to use, so you may need to choose high-entropy short passwords vs. +long passphrases (see below for more on passphrases). + +Depending on the Linux distribution you decide to use, you may or may not have +to jump through additional hoops in order to import your distribution's +SecureBoot key that would allow you to boot the distro. Many distributions have +partnered with Microsoft to sign their released kernels with a key that is +already recognized by most system manufacturers, therefore saving you the +trouble of having to deal with key importing. + +As an extra measure, before someone is allowed to even get to the boot +partition and try some badness there, let's make them enter a password. This +password should be different from your UEFI management password, in order to +prevent shoulder-surfing. If you shut down and start a lot, you may choose to +not bother with this, as you will already have to enter a LUKS passphrase and +this will save you a few extra keystrokes. + +## Distro choice considerations + +Chances are you'll stick with a fairly widely-used distribution such as Fedora, +Ubuntu, Arch, Debian, or one of their close spin-offs. In any case, this is +what you should consider when picking a distribution to use. + +### Checklist + +- [ ] Has a robust MAC/RBAC implementation (SELinux/AppArmor/Grsecurity) _(CRITICAL)_ +- [ ] Publishes security bulletins _(CRITICAL)_ +- [ ] Provides timely security patches _(CRITICAL)_ +- [ ] Provides cryptographic verification of packages _(CRITICAL)_ +- [ ] Fully supports UEFI and SecureBoot _(CRITICAL)_ +- [ ] Has robust native full disk encryption support _(CRITICAL)_ + +### Considerations + +#### SELinux, AppArmor, and GrSecurity/PaX + +Mandatory Access Controls (MAC) or Role-Based Access Controls (RBAC) are an +extension of the basic user/group security mechanism used in legacy POSIX +systems. Most distributions these days either already come bundled with a +MAC/RBAC implementation (Fedora, Ubuntu), or provide a mechanism to add it via +an optional post-installation step (Gentoo, Arch, Debian). Obviously, it is +highly advised that you pick a distribution that comes pre-configured with a +MAC/RBAC system, but if you have strong feelings about a distribution that +doesn't have one enabled by default, do plan to configure it +post-installation. + +Distributions that do not provide any MAC/RBAC mechanisms should be strongly +avoided, as traditional POSIX user- and group-based security should be +considered insufficient in this day and age. If you would like to start out +with a MAC/RBAC workstation, AppArmor and PaX are generally considered easier +to learn than SELinux. Furthermore, on a workstation, where there are few or +no externally listening daemons, and where user-run applications pose the +highest risk, GrSecurity/PaX will _probably_ offer more security benefits than +SELinux. + +#### Distro security bulletins + +Most of the widely used distributions have a mechanism to deliver security +bulletins to their users, but if you are fond of something esoteric, check +whether the developers have a documented mechanism of alerting the users about +security vulnerabilities and patches. Absence of such mechanism is a major +warning sign that the distribution is not mature enough to be considered for a +primary admin workstation. + +#### Timely and trusted security updates + +Most of the widely used distributions deliver regular security updates, but is +worth checking to ensure that critical package updates are provided in a +timely fashion. Avoid using spin-offs and "community rebuilds" for this +reason, as they routinely delay security updates due to having to wait for the +upstream distribution to release it first. + +You'll be hard-pressed to find a distribution that does not use cryptographic +signatures on packages, updates metadata, or both. That being said, fairly +widely used distributions have been known to go for years before introducing +this basic security measure (Arch, I'm looking at you), so this is a thing +worth checking. + +#### Distros supporting UEFI and SecureBoot + +Check that the distribution supports UEFI and SecureBoot. Find out whether it +requires importing an extra key or whether it signs its boot kernels with a key +already trusted by systems manufacturers (e.g. via an agreement with +Microsoft). Some distributions do not support UEFI/SecureBoot but offer +alternatives to ensure tamper-proof or tamper-evident boot environments +([Qubes-OS][3] uses Anti Evil Maid, mentioned earlier). If a distribution +doesn't support SecureBoot and has no mechanisms to prevent boot-level attacks, +look elsewhere. + +#### Full disk encryption + +Full disk encryption is a requirement for securing data at rest, and is +supported by most distributions. As an alternative, systems with +self-encrypting hard drives may be used (normally implemented via the on-board +TPM chip) and offer comparable levels of security plus faster operation, but at +a considerably higher cost. + +## Distro installation guidelines + +All distributions are different, but here are general guidelines: + +### Checklist + +- [ ] Use full disk encryption (LUKS) with a robust passphrase _(CRITICAL)_ +- [ ] Make sure swap is also encrypted _(CRITICAL)_ +- [ ] Require a password to edit bootloader (can be same as LUKS) _(CRITICAL)_ +- [ ] Set up a robust root password (can be same as LUKS) _(CRITICAL)_ +- [ ] Use an unprivileged account, part of administrators group _(CRITICAL)_ +- [ ] Set up a robust user-account password, different from root _(CRITICAL)_ + +### Considerations + +#### Full disk encryption + +Unless you are using self-encrypting hard drives, it is important to configure +your installer to fully encrypt all the disks that will be used for storing +your data and your system files. It is not sufficient to simply encrypt the +user directory via auto-mounting cryptfs loop files (I'm looking at you, older +versions of Ubuntu), as this offers no protection for system binaries or swap, +which is likely to contain a slew of sensitive data. The recommended +encryption strategy is to encrypt the LVM device, so only one passphrase is +required during the boot process. + +The `/boot` partition will always remain unencrypted, as the bootloader needs +to be able to actually boot the kernel before invoking LUKS/dm-crypt. The +kernel image itself should be protected against tampering with a cryptographic +signature checked by SecureBoot. + +In other words, `/boot` should always be the only unencrypted partition on your +system. + +#### Choosing good passphrases + +Modern Linux systems have no limitation of password/passphrase length, so the +only real limitation is your level of paranoia and your stubbornness. If you +boot your system a lot, you will probably have to type at least two different +passwords: one to unlock LUKS, and another one to log in, so having long +passphrases will probably get old really fast. Pick passphrases that are 2-3 +words long, easy to type, and preferably from rich/mixed vocabularies. + +Examples of good passphrases (yes, you can use spaces): +- nature abhors roombas +- 12 in-flight Jebediahs +- perdon, tengo flatulence + +You can also stick with non-vocabulary passwords that are at least 10-12 +characters long, if you prefer that to typing passphrases. + +Unless you have concerns about physical security, it is fine to write down your +passphrases and keep them in a safe place away from your work desk. + +#### Root, user passwords and the admin group + +We recommend that you use the same passphrase for your root password as you +use for your LUKS encryption (unless you share your laptop with other trusted +people who should be able to unlock the drives, but shouldn't be able to +become root). If you are the sole user of the laptop, then having your root +password be different from your LUKS password has no meaningful security +advantages. Generally, you can use the same passphrase for your UEFI +administration, disk encryption, and root account -- knowing any of these will +give an attacker full control of your system anyway, so there is little +security benefit to have them be different on a single-user workstation. + +You should have a different, but equally strong password for your regular user +account that you will be using for day-to-day tasks. This user should be member +of the admin group (e.g. `wheel` or similar, depending on the distribution), +allowing you to perform `sudo` to elevate privileges. + +In other words, if you are the sole user on your workstation, you should have 2 +distinct, robust, equally strong passphrases you will need to remember: + +**Admin-level**, used in the following locations: + +- UEFI administration +- Bootloader (GRUB) +- Disk encryption (LUKS) +- Workstation admin (root user) + +**User-level**, used for the following: + +- User account and sudo +- Master password for the password manager + +All of them, obviously, can be different if there is a compelling reason. + +## Post-installation hardening + +Post-installation security hardening will depend greatly on your distribution +of choice, so it is futile to provide detailed instructions in a general +document such as this one. However, here are some steps you should take: + +### Checklist + +- [ ] Globally disable firewire and thunderbolt modules _(CRITICAL)_ +- [ ] Check your firewalls to ensure all incoming ports are filtered _(CRITICAL)_ +- [ ] Make sure root mail is forwarded to an account you check _(CRITICAL)_ +- [ ] Check to ensure sshd service is disabled by default _(MODERATE)_ +- [ ] Set up an automatic OS update schedule, or update reminders _(MODERATE)_ +- [ ] Configure the screensaver to auto-lock after a period of inactivity _(MODERATE)_ +- [ ] Set up logwatch _(MODERATE)_ +- [ ] Install and use rkhunter _(LOW)_ +- [ ] Install an Intrusion Detection System _(PARANOID)_ + +### Considerations + +#### Blacklisting modules + +To blacklist a firewire and thunderbolt modules, add the following lines to a +file in `/etc/modprobe.d/blacklist-dma.conf`: + + blacklist firewire-core + blacklist thunderbolt + +The modules will be blacklisted upon reboot. It doesn't hurt doing this even if +you don't have these ports (but it doesn't do anything either). + +#### Root mail + +By default, root mail is just saved on the system and tends to never be read. +Make sure you set your `/etc/aliases` to forward root mail to a mailbox that +you actually read, otherwise you may miss important system notifications and +reports: + + # Person who should get root's mail + root: bob@example.com + +Run `newaliases` after this edit and test it out to make sure that it actually +gets delivered, as some email providers will reject email coming in from +nonexistent or non-routable domain names. If that is the case, you will need to +play with your mail forwarding configuration until this actually works. + +#### Firewalls, sshd, and listening daemons + +The default firewall settings will depend on your distribution, but many of +them will allow incoming `sshd` ports. Unless you have a compelling legitimate +reason to allow incoming ssh, you should filter that out and disable the `sshd` +daemon. + + systemctl disable sshd.service + systemctl stop sshd.service + +You can always start it temporarily if you need to use it. + +In general, your system shouldn't have any listening ports apart from +responding to ping. This will help safeguard you against network-level 0-day +exploits. + +#### Automatic updates or notifications + +It is recommended to turn on automatic updates, unless you have a very good +reason not to do so, such as fear that an automatic update would render your +system unusable (it's happened in the past, so this fear is not unfounded). At +the very least, you should enable automatic notifications of available updates. +Most distributions already have this service automatically running for you, so +chances are you don't have to do anything. Consult your distribution +documentation to find out more. + +You should apply all outstanding errata as soon as possible, even if something +isn't specifically labeled as "security update" or has an associated CVE code. +All bugs have the potential of being security bugs and erring on the side of +newer, unknown bugs is _generally_ a safer strategy than sticking with old, +known ones. + +#### Watching logs + +You should have a keen interest in what happens on your system. For this +reason, you should install `logwatch` and configure it to send nightly activity +reports of everything that happens on your system. This won't prevent a +dedicated attacker, but is a good safety-net feature to have in place. + +Note, that many systemd distros will no longer automatically install a syslog +server that `logwatch` needs (due to systemd relying on its own journal), so +you will need to install and enable `rsyslog` to make sure your `/var/log` is +not empty before logwatch will be of any use. + +#### Rkhunter and IDS + +Installing `rkhunter` and an intrusion detection system (IDS) like `aide` or +`tripwire` will not be that useful unless you actually understand how they work +and take the necessary steps to set them up properly (such as, keeping the +databases on external media, running checks from a trusted environment, +remembering to refresh the hash databases after performing system updates and +configuration changes, etc). If you are not willing to take these steps and +adjust how you do things on your own workstation, these tools will introduce +hassle without any tangible security benefit. + +We do recommend that you install `rkhunter` and run it nightly. It's fairly +easy to learn and use, and though it will not deter a sophisticated attacker, +it may help you catch your own mistakes. + +## Personal workstation backups + +Workstation backups tend to be overlooked or done in a haphazard, often unsafe +manner. + +### Checklist + +- [ ] Set up encrypted workstation backups to external storage _(CRITICAL)_ +- [ ] Use zero-knowledge backup tools for cloud backups _(MODERATE)_ + +### Considerations + +#### Full encrypted backups to external storage + +It is handy to have an external hard drive where one can dump full backups +without having to worry about such things like bandwidth and upstream speeds +(in this day and age most providers still offer dramatically asymmetric +upload/download speeds). Needless to say, this hard drive needs to be in itself +encrypted (again, via LUKS), or you should use a backup tool that creates +encrypted backups, such as `duplicity` or its GUI companion, `deja-dup`. I +recommend using the latter with a good randomly generated passphrase, stored in +your password manager. If you travel with your laptop, leave this drive at home +to have something to come back to in case your laptop is lost or stolen. + +In addition to your home directory, you should also back up `/etc` and +`/var/log` for various forensic purposes. + +Above all, avoid copying your home directory onto any unencrypted storage, even +as a quick way to move your files around between systems, as you will most +certainly forget to erase it once you're done, exposing potentially private or +otherwise security sensitive data to snooping hands -- especially if you keep +that storage media in the same bag with your laptop. + +#### Selective zero-knowledge backups off-site + +Off-site backups are also extremely important and can be done either to your +employer, if they offer space for it, or to a cloud provider. You can set up a +separate duplicity/deja-dup profile to only include most important files in +order to avoid transferring huge amounts of data that you don't really care to +back up off-site (internet cache, music, downloads, etc). + +Alternatively, you can use a zero-knowledge backup tool, such as +[SpiderOak][5], which offers an excellent Linux GUI tool and has additional +useful features such as synchronizing content between multiple systems and +platforms. + +## Best practices + +What follows is a curated list of best practices that we think you should +adopt. It is most certainly non-exhaustive, but rather attempts to offer +practical advice that strikes a workable balance between security and overall +usability. + +### Browsing + +There is no question that the web browser will be the piece of software with +the largest and the most exposed attack surface on your system. It is a tool +written specifically to download and execute untrusted, frequently hostile +code. It attempts to shield you from this danger by employing multiple +mechanisms such as sandboxes and code sanitization, but they have all been +previously defeated on multiple occasions. You should learn to approach +browsing websites as the most insecure activity you'll engage in on any given +day. + +There are several ways you can reduce the impact of a compromised browser, but +the truly effective ways will require significant changes in the way you +operate your workstation. + +#### 1: Use two different browsers + +This is the easiest to do, but only offers minor security benefits. Not all +browser compromises give an attacker full unfettered access to your system -- +sometimes they are limited to allowing one to read local browser storage, +steal active sessions from other tabs, capture input entered into the browser, +etc. Using two different browsers, one for work/high security sites, and +another for everything else will help prevent minor compromises from giving +attackers access to the whole cookie jar. The main inconvenience will be the +amount of memory consumed by two different browser processes. + +Here's what we recommend: + +##### Firefox for work and high security sites + +Use Firefox to access work-related sites, where extra care should be taken to +ensure that data like cookies, sessions, login information, keystrokes, etc, +should most definitely not fall into attackers' hands. You should NOT use +this browser for accessing any other sites except select few. + +You should install the following Firefox add-ons: + +- [ ] NoScript _(CRITICAL)_ + - NoScript prevents active content from loading, except from user + whitelisted domains. It is a great hassle to use with your default browser + (though offers really good security benefits), so we recommend only + enabling it on the browser you use to access work-related sites. + +- [ ] Privacy Badger _(CRITICAL)_ + - EFF's Privacy Badger will prevent most external trackers and ad platforms + from being loaded, which will help avoid compromises on these tracking + sites from affecting your browser (trackers and ad sites are very commonly + targeted by attackers, as they allow rapid infection of thousands of + systems worldwide). + +- [ ] HTTPS Everywhere _(CRITICAL)_ + - This EFF-developed Add-on will ensure that most of your sites are accessed + over a secure connection, even if a link you click is using http:// (great + to avoid a number of attacks, such as [SSL-strip][7]). + +- [ ] Certificate Patrol _(MODERATE)_ + - This tool will alert you if the site you're accessing has recently changed + their TLS certificates -- especially if it wasn't nearing expiration dates + or if it is now using a different certification authority. It helps + alert you if someone is trying to man-in-the-middle your connection, + but generates a lot of benign false-positives. + +You should leave Firefox as your default browser for opening links, as +NoScript will prevent most active content from loading or executing. + +##### Chrome/Chromium for everything else + +Chromium developers are ahead of Firefox in adding a lot of nice security +features (at least [on Linux][6]), such as seccomp sandboxes, kernel user +namespaces, etc, which act as an added layer of isolation between the sites +you visit and the rest of your system. Chromium is the upstream open-source +project, and Chrome is Google's proprietary binary build based on it (insert +the usual paranoid caution about not using it for anything you don't want +Google to know about). + +It is recommended that you install **Privacy Badger** and **HTTPS Everywhere** +extensions in Chrome as well and give it a distinct theme from Firefox to +indicate that this is your "untrusted sites" browser. + +#### 2: Use two different browsers, one inside a dedicated VM + +This is a similar recommendation to the above, except you will add an extra +step of running Chrome inside a dedicated VM that you access via a fast +protocol, allowing you to share clipboards and forward sound events (e.g. +Spice or RDP). This will add an excellent layer of isolation between the +untrusted browser and the rest of your work environment, ensuring that +attackers who manage to fully compromise your browser will then have to +additionally break out of the VM isolation layer in order to get to the rest +of your system. + +This is a surprisingly workable configuration, but requires a lot of RAM and +fast processors that can handle the increased load. It will also require an +important amount of dedication on the part of the admin who will need to +adjust their work practices accordingly. + +#### 3: Fully separate your work and play environments via virtualization + +See [Qubes-OS project][3], which strives to provide a high-security +workstation environment via compartmentalizing your applications into separate +fully isolated VMs. + +### Password managers + +#### Checklist + +- [ ] Use a password manager _(CRITICAL_) +- [ ] Use unique passwords on unrelated sites _(CRITICAL)_ +- [ ] Use a password manager that supports team sharing _(MODERATE)_ +- [ ] Use a separate password manager for non-website accounts _(PARANOID)_ + +#### Considerations + +Using good, unique passwords should be a critical requirement for every member +of your team. Credential theft is happening all the time -- either via +compromised computers, stolen database dumps, remote site exploits, or any +number of other means. No credentials should ever be reused across sites, +especially for critical applications. + +##### In-browser password manager + +Every browser has a mechanism for saving passwords that is fairly secure and +can sync with vendor-maintained cloud storage while keeping the data encrypted +with a user-provided passphrase. However, this mechanism has important +disadvantages: + +1. It does not work across browsers +2. It does not offer any way of sharing credentials with team members + +There are several well-supported, free-or-cheap password managers that are +well-integrated into multiple browsers, work across platforms, and offer +group sharing (usually as a paid service). Solutions can be easily found via +search engines. + +##### Standalone password manager + +One of the major drawbacks of any password manager that comes integrated with +the browser is the fact that it's part of the application that is most likely +to be attacked by intruders. If this makes you uncomfortable (and it should), +you may choose to have two different password managers -- one for websites +that is integrated into your browser, and one that runs as a standalone +application. The latter can be used to store high-risk credentials such as +root passwords, database passwords, other shell account credentials, etc. + +It may be particularly useful to have such tool for sharing superuser account +credentials with other members of your team (server root passwords, ILO +passwords, database admin passwords, bootloader passwords, etc). + +A few tools can help you: + +- [KeePassX][8], which improves team sharing in version 2 +- [Pass][9], which uses text files and PGP and integrates with git +- [Django-Pstore][10], which uses GPG to share credentials between admins +- [Hiera-Eyaml][11], which, if you are already using Puppet for your + infrastructure, may be a handy way to track your server/service credentials + as part of your encrypted Hiera data store + +### Securing SSH and PGP private keys + +Personal encryption keys, including SSH and PGP private keys, are going to be +the most prized items on your workstation -- something the attackers will be +most interested in obtaining, as that would allow them to further attack your +infrastructure or impersonate you to other admins. You should take extra steps +to ensure that your private keys are well protected against theft. + +#### Checklist + +- [ ] Strong passphrases are used to protect private keys _(CRITICAL)_ +- [ ] PGP Master key is stored on removable storage _(MODERATE)_ +- [ ] Auth, Sign and Encrypt Subkeys are stored on a smartcard device _(MODERATE)_ +- [ ] SSH is configured to use PGP Auth key as ssh private key _(MODERATE)_ + +#### Considerations + +The best way to prevent private key theft is to use a smartcard to store your +encryption private keys and never copy them onto the workstation. There are +several manufacturers that offer OpenPGP capable devices: + +- [Kernel Concepts][12], where you can purchase both the OpenPGP compatible + smartcards and the USB readers, should you need one. +- [Yubikey NEO][13], which offers OpenPGP smartcard functionality in addition + to many other cool features (U2F, PIV, HOTP, etc). + +It is also important to make sure that the master PGP key is not stored on the +main workstation, and only subkeys are used. The master key will only be +needed when signing someone else's keys or creating new subkeys -- operations +which do not happen very frequently. You may follow [the Debian's subkeys][14] +guide to learn how to move your master key to removable storage and how to +create subkeys. + +You should then configure your gnupg agent to act as ssh agent and use the +smartcard-based PGP Auth key to act as your ssh private key. We publish a +[detailed guide][15] on how to do that using either a smartcard reader or a +Yubikey NEO. + +If you are not willing to go that far, at least make sure you have a strong +passphrase on both your PGP private key and your SSH private key, which will +make it harder for attackers to steal and use them. + +### SELinux on the workstation + +If you are using a distribution that comes bundled with SELinux (such as +Fedora), here are some recommendation of how to make the best use of it to +maximize your workstation security. + +#### Checklist + +- [ ] Make sure SELinux is enforcing on your workstation _(CRITICAL)_ +- [ ] Never blindly run `audit2allow -M`, always check _(CRITICAL)_ +- [ ] Never `setenforce 0` _(MODERATE)_ +- [ ] Switch your account to SELinux user `staff_u` _(MODERATE)_ + +#### Considerations + +SELinux is a Mandatory Access Controls (MAC) extension to core POSIX +permissions functionality. It is mature, robust, and has come a long way since +its initial roll-out. Regardless, many sysadmins to this day repeat the +outdated mantra of "just turn it off." + +That being said, SELinux will have limited security benefits on the +workstation, as most applications you will be running as a user are going to +be running unconfined. It does provide enough net benefit to warrant leaving +it on, as it will likely help prevent an attacker from escalating privileges +to gain root-level access via a vulnerable daemon service. + +Our recommendation is to leave it on and enforcing. + +##### Never `setenforce 0` + +It's tempting to use `setenforce 0` to flip SELinux into permissive mode +on a temporary basis, but you should avoid doing that. This essentially turns +off SELinux for the entire system, while what you really want is to +troubleshoot a particular application or daemon. + +Instead of `setenforce 0` you should be using `semanage permissive -a +[somedomain_t]` to put only that domain into permissive mode. First, find out +which domain is causing troubles by running `ausearch`: + + ausearch -ts recent -m avc + +and then look for `scontext=` (source SELinux context) line, like so: + + scontext=staff_u:staff_r:gpg_pinentry_t:s0-s0:c0.c1023 + ^^^^^^^^^^^^^^ + +This tells you that the domain being denied is `gpg_pinentry_t`, so if you +want to troubleshoot the application, you should add it to permissive domains: + + semange permissive -a gpg_pinentry_t + +This will allow you to use the application and collect the rest of the AVCs, +which you can then use in conjunction with `audit2allow` to write a local +policy. Once that is done and you see no new AVC denials, you can remove that +domain from permissive by running: + + semanage permissive -d gpg_pinentry_t + +##### Use your workstation as SELinux role staff_r + +SELinux comes with a native implementation of roles that prohibit or grant +certain privileges based on the role associated with the user account. As an +administrator, you should be using the `staff_r` role, which will restrict +access to many configuration and other security-sensitive files, unless you +first perform `sudo`. + +By default, accounts are created as `unconfined_r` and most applications you +execute will run unconfined, without any (or with only very few) SELinux +constraints. To switch your account to the `staff_r` role, run the following +command: + + usermod -Z staff_u [username] + +You should log out and log back in to enable the new role, at which point if +you run `id -Z`, you'll see: + + staff_u:staff_r:staff_t:s0-s0:c0.c1023 + +When performing `sudo`, you should remember to add an extra flag to tell +SELinux to transition to the "sysadmin" role. The command you want is: + + sudo -i -r sysadm_r + +At which point `id -Z` will show: + + staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 + +**WARNING**: you should be comfortable using `ausearch` and `audit2allow` +before you make this switch, as it's possible some of your applications will +no longer work when you're running as role `staff_r`. At the time of writing, +the following popular applications are known to not work under `staff_r` +without policy tweaks: + +- Chrome/Chromium +- Skype +- VirtualBox + +To switch back to `unconfined_r`, run the following command: + + usermod -Z unconfined_u [username] + +and then log out and back in to get back into the comfort zone. + +## Further reading + +The world of IT security is a rabbit hole with no bottom. If you would like to +go deeper, or find out more about security features on your particular +distribution, please check out the following links: + +- [Fedora Security Guide](https://docs.fedoraproject.org/en-US/Fedora/19/html/Security_Guide/index.html) +- [CESG Ubuntu Security Guide](https://www.gov.uk/government/publications/end-user-devices-security-guidance-ubuntu-1404-lts) +- [Debian Security Manual](https://www.debian.org/doc/manuals/securing-debian-howto/index.en.html) +- [Arch Linux Security Wiki](https://wiki.archlinux.org/index.php/Security) +- [Mac OSX Security](https://www.apple.com/support/security/guides/) + +## License +This work is licensed under a +[Creative Commons Attribution-ShareAlike 4.0 International License][0]. + +-------------------------------------------------------------------------------- + +via: https://github.com/lfit/itpol/blob/master/linux-workstation-security.md#linux-workstation-security-checklist + +作者:[mricon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://github.com/mricon +[0]: http://creativecommons.org/licenses/by-sa/4.0/ +[1]: https://github.com/QubesOS/qubes-antievilmaid +[2]: https://en.wikipedia.org/wiki/IEEE_1394#Security_issues +[3]: https://qubes-os.org/ +[4]: https://xkcd.com/936/ +[5]: https://spideroak.com/ +[6]: https://code.google.com/p/chromium/wiki/LinuxSandboxing +[7]: http://www.thoughtcrime.org/software/sslstrip/ +[8]: https://keepassx.org/ +[9]: http://www.passwordstore.org/ +[10]: https://pypi.python.org/pypi/django-pstore +[11]: https://github.com/TomPoulton/hiera-eyaml +[12]: http://shop.kernelconcepts.de/ +[13]: https://www.yubico.com/products/yubikey-hardware/yubikey-neo/ +[14]: https://wiki.debian.org/Subkeys +[15]: https://github.com/lfit/ssh-gpg-smartcard-config \ No newline at end of file From 5f120e9c132a7436091b845a1bd002b13d742759 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 31 Aug 2015 17:39:53 +0800 Subject: [PATCH 1941/2517] =?UTF-8?q?20150831-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...orkManager to systemd-networkd on Linux.md | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md diff --git a/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md b/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md new file mode 100644 index 0000000000..2f2405043c --- /dev/null +++ b/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md @@ -0,0 +1,165 @@ +How to switch from NetworkManager to systemd-networkd on Linux +================================================================================ +In the world of Linux, adoption of [systemd][1] has been a subject of heated controversy, and the debate between its proponents and critics is still going on. As of today, most major Linux distributions have adopted systemd as a default init system. + +Billed as a "never finished, never complete, but tracking progress of technology" by its author, systemd is not just the init daemon, but is designed as a more broad system and service management platform which encompasses the growing ecosystem of core system daemons, libraries and utilities. + +One of many additions to **systemd** is **systemd-networkd**, which is responsible for network configuration within the systemd ecosystem. Using systemd-networkd, you can configure basic DHCP/static IP networking for network devices. It can also configure virtual networking features such as bridges, tunnels or VLANs. Wireless networking is not directly handled by systemd-networkd, but you can use wpa_supplicant service to configure wireless adapters, and then hook it up with **systemd-networkd**. + +On many Linux distributions, NetworkManager has been and is still used as a default network configuration manager. Compared to NetworkManager, **systemd-networkd** is still under active development, and missing features. For example, it does not have NetworkManager's intelligence to keep your computer connected across various interfaces at all times. It does not provide ifup/ifdown hooks for advanced scripting. Yet, systemd-networkd is integrated well with the rest of systemd components (e.g., **resolved** for DNS, **timesyncd** for NTP, udevd for naming), and the role of **systemd-networkd** may only grow over time in the systemd environment. + +If you are happy with the way **systemd** is evolving, one thing you can consider is to switch from NetworkManager to systemd-networkd. If you are feverishly against systemd, and perfectly happy with NetworkManager or [basic network service][2], that is totally cool. + +But for those of you who want to try out systemd-networkd, you can read on, and find out in this tutorial how to switch from NetworkManager to systemd-networkd on Linux. + +### Requirement ### + +systemd-networkd is available in systemd version 210 and higher. Thus distributions like Debian 8 "Jessie" (systemd 215), Fedora 21 (systemd 217), Ubuntu 15.04 (systemd 219) or later are compatible with systemd-networkd. + +For other distributions, check the version of your systemd before proceeding. + + $ systemctl --version + +### Switch from Network Manager to Systemd-Networkd ### + +It is relatively straightforward to switch from Network Manager to systemd-networkd (and vice versa). + +First, disable Network Manager service, and enable systemd-networkd as follows. + + $ sudo systemctl disable NetworkManager + $ sudo systemctl enable systemd-networkd + +You also need to enable **systemd-resolved** service, which is used by systemd-networkd for network name resolution. This service implements a caching DNS server. + + $ sudo systemctl enable systemd-resolved + $ sudo systemctl start systemd-resolved + +Once started, **systemd-resolved** will create its own resolv.conf somewhere under /run/systemd directory. However, it is a common practise to store DNS resolver information in /etc/resolv.conf, and many applications still rely on /etc/resolv.conf. Thus for compatibility reason, create a symlink to /etc/resolv.conf as follows. + + $ sudo rm /etc/resolv.conf + $ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf + +### Configure Network Connections with Systemd-networkd ### + +To configure network devices with systemd-networkd, you must specify configuration information in text files with .network extension. These network configuration files are then stored and loaded from /etc/systemd/network. When there are multiple files, systemd-networkd loads and processes them one by one in lexical order. + +Let's start by creating a folder /etc/systemd/network. + + $ sudo mkdir /etc/systemd/network + +#### DHCP Networking #### + +Let's configure DHCP networking first. For this, create the following configuration file. The name of a file can be arbitrary, but remember that files are processed in lexical order. + + $ sudo vi /etc/systemd/network/20-dhcp.network + +---------- + + [Match] + Name=enp3* + + [Network] + DHCP=yes + +As you can see above, each network configuration file contains one or more "sections" with each section preceded by [XXX] heading. Each section contains one or more key/value pairs. The [Match] section determine which network device(s) are configured by this configuration file. For example, this file matches any network interface whose name starts with ens3 (e.g., enp3s0, enp3s1, enp3s2, etc). For matched interface(s), it then applies DHCP network configuration specified under [Network] section. + +### Static IP Networking ### + +If you want to assign a static IP address to a network interface, create the following configuration file. + + $ sudo vi /etc/systemd/network/10-static-enp3s0.network + +---------- + + [Match] + Name=enp3s0 + + [Network] + Address=192.168.10.50/24 + Gateway=192.168.10.1 + DNS=8.8.8.8 + +As you can guess, the interface enp3s0 will be assigned an address 192.168.10.50/24, a default gateway 192.168.10.1, and a DNS server 8.8.8.8. One subtlety here is that the name of an interface enp3s0, in facts, matches the pattern rule defined in the earlier DHCP configuration as well. However, since the file "10-static-enp3s0.network" is processed before "20-dhcp.network" according to lexical order, the static configuration takes priority over DHCP configuration in case of enp3s0 interface. + +Once you are done with creating configuration files, restart systemd-networkd service or reboot. + + $ sudo systemctl restart systemd-networkd + +Check the status of the service by running: + + $ systemctl status systemd-networkd + $ systemctl status systemd-resolved + +![](https://farm1.staticflickr.com/719/21010813392_76abe123ed_c.jpg) + +### Configure Virtual Network Devices with Systemd-networkd ### + +**systemd-networkd** also allows you to configure virtual network devices such as bridges, VLANs, tunnel, VXLAN, bonding, etc. You must configure these virtual devices in files with .netdev extension. + +Here I'll show how to configure a bridge interface. + +#### Linux Bridge #### + +If you want to create a Linux bridge (br0) and add a physical interface (eth1) to the bridge, create the following configuration. + + $ sudo vi /etc/systemd/network/bridge-br0.netdev + +---------- + + [NetDev] + Name=br0 + Kind=bridge + +Then configure the bridge interface br0 and the slave interface eth1 using .network files as follows. + + $ sudo vi /etc/systemd/network/bridge-br0-slave.network + +---------- + + [Match] + Name=eth1 + + [Network] + Bridge=br0 + +---------- + + $ sudo vi /etc/systemd/network/bridge-br0.network + +---------- + + [Match] + Name=br0 + + [Network] + Address=192.168.10.100/24 + Gateway=192.168.10.1 + DNS=8.8.8.8 + +Finally, restart systemd-networkd: + + $ sudo systemctl restart systemd-networkd + +You can use [brctl tool][3] to verify that a bridge br0 has been created. + +### Summary ### + +When systemd promises to be a system manager for Linux, it is no wonder something like systemd-networkd came into being to manage network configurations. At this stage, however, systemd-networkd seems more suitable for a server environment where network configurations are relatively stable. For desktop/laptop environments which involve various transient wired/wireless interfaces, NetworkManager may still be a preferred choice. + +For those who want to check out more on systemd-networkd, refer to the official [man page][4] for a complete list of supported sections and keys. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/switch-from-networkmanager-to-systemd-networkd.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://xmodulo.com/use-systemd-system-administration-debian.html +[2]:http://xmodulo.com/disable-network-manager-linux.html +[3]:http://xmodulo.com/how-to-configure-linux-bridge-interface.html +[4]:http://www.freedesktop.org/software/systemd/man/systemd.network.html \ No newline at end of file From 7fb1753774781e1984c95228eb37bad1bfa664f1 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 31 Aug 2015 21:56:56 +0800 Subject: [PATCH 1942/2517] PUB:Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux @strugglingyouth --- ...ing Up RAID 10 or 1+0 (Nested) in Linux.md | 275 +++++++++++++++++ ...ing Up RAID 10 or 1+0 (Nested) in Linux.md | 277 ------------------ 2 files changed, 275 insertions(+), 277 deletions(-) create mode 100644 published/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md delete mode 100644 translated/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md diff --git a/published/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md b/published/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md new file mode 100644 index 0000000000..c0b03f3dba --- /dev/null +++ b/published/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md @@ -0,0 +1,275 @@ +在 Linux 下使用 RAID(六):设置 RAID 10 或 1 + 0(嵌套) +================================================================================ + +RAID 10 是组合 RAID 1 和 RAID 0 形成的。要设置 RAID 10,我们至少需要4个磁盘。在之前的文章中,我们已经看到了如何使用最少两个磁盘设置 RAID 1 和 RAID 0。 + +在这里,我们将使用最少4个磁盘组合 RAID 1 和 RAID 0 来设置 RAID 10。假设我们已经在用 RAID 10 创建的逻辑卷保存了一些数据。比如我们要保存数据 “TECMINT”,它将使用以下方法将其保存在4个磁盘中。 + +![Create Raid 10 in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/raid10.jpg) + +*在 Linux 中创建 Raid 10(LCTT 译注:此图有误,请参照文字说明和本系列第一篇文章)* + +RAID 10 是先做镜像,再做条带。因此,在 RAID 1 中,相同的数据将被写入到两个磁盘中,“T”将同时被写入到第一和第二个磁盘中。接着的数据被条带化到另外两个磁盘,“E”将被同时写入到第三和第四个磁盘中。它将继续循环此过程,“C”将同时被写入到第一和第二个磁盘,以此类推。 + +(LCTT 译注:原文中此处描述混淆有误,已经根据实际情况进行修改。) + +现在你已经了解 RAID 10 怎样组合 RAID 1 和 RAID 0 来工作的了。如果我们有4个20 GB 的磁盘,总共为 80 GB,但我们将只能得到40 GB 的容量,另一半的容量在构建 RAID 10 中丢失。 + +#### RAID 10 的优点和缺点 #### + +- 提供更好的性能。 +- 在 RAID 10 中我们将失去一半的磁盘容量。 +- 读与写的性能都很好,因为它会同时进行写入和读取。 +- 它能解决数据库的高 I/O 磁盘写操作。 + +#### 要求 #### + +在 RAID 10 中,我们至少需要4个磁盘,前2个磁盘为 RAID 1,其他2个磁盘为 RAID 0,就像我之前说的,RAID 10 仅仅是组合了 RAID 0和1。如果我们需要扩展 RAID 组,最少需要添加4个磁盘。 + +**我的服务器设置** + + 操作系统 : CentOS 6.5 Final + IP 地址 : 192.168.0.229 + 主机名 : rd10.tecmintlocal.com + 磁盘 1 [20GB] : /dev/sdd + 磁盘 2 [20GB] : /dev/sdc + 磁盘 3 [20GB] : /dev/sdd + 磁盘 4 [20GB] : /dev/sde + +有两种方法来设置 RAID 10,在这里两种方法我都会演示,但我更喜欢第一种方法,使用它来设置 RAID 10 更简单。 + +### 方法1:设置 RAID 10 ### + +1、 首先,使用以下命令确认所添加的4块磁盘没有被使用。 + + # ls -l /dev | grep sd + +2、 四个磁盘被检测后,然后来检查磁盘是否存在 RAID 分区。 + + # mdadm -E /dev/sd[b-e] + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde # 或 + +![Verify 4 Added Disks](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-4-Added-Disks.png) + +*验证添加的4块磁盘* + +**注意**: 在上面的输出中,如果没有检测到 super-block 意味着在4块磁盘中没有定义过 RAID。 + +#### 第1步:为 RAID 分区 #### + +3、 现在,使用`fdisk`,命令为4个磁盘(/dev/sdb, /dev/sdc, /dev/sdd 和 /dev/sde)创建新分区。 + + # fdisk /dev/sdb + # fdisk /dev/sdc + # fdisk /dev/sdd + # fdisk /dev/sde + +#####为 /dev/sdb 创建分区##### + +我来告诉你如何使用 fdisk 为磁盘(/dev/sdb)进行分区,此步也适用于其他磁盘。 + + # fdisk /dev/sdb + +请使用以下步骤为 /dev/sdb 创建一个新的分区。 + +- 按 `n` 创建新的分区。 +- 然后按 `P` 选择主分区。 +- 接下来选择分区号为1。 +- 只需按两次回车键选择默认值即可。 +- 然后,按 `P` 来打印创建好的分区。 +- 按 `L`,列出所有可用的类型。 +- 按 `t` 去修改分区。 +- 键入 `fd` 设置为 Linux 的 RAID 类型,然后按 Enter 确认。 +- 然后再次使用`p`查看我们所做的更改。 +- 使用`w`保存更改。 + +![Disk sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Disk-sdb-Partition.png) + +*为磁盘 sdb 分区* + +**注意**: 请使用上面相同的指令对其他磁盘(sdc, sdd sdd sde)进行分区。 + +4、 创建好4个分区后,需要使用下面的命令来检查磁盘是否存在 raid。 + + # mdadm -E /dev/sd[b-e] + # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde # 或 + + # mdadm -E /dev/sd[b-e]1 + # mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 # 或 + +![Check All Disks for Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Check-All-Disks-for-Raid.png) + +*检查磁盘* + +**注意**: 以上输出显示,新创建的四个分区中没有检测到 super-block,这意味着我们可以继续在这些磁盘上创建 RAID 10。 + +#### 第2步: 创建 RAID 设备 `md` #### + +5、 现在该创建一个`md`(即 /dev/md0)设备了,使用“mdadm” raid 管理工具。在创建设备之前,必须确保系统已经安装了`mdadm`工具,如果没有请使用下面的命令来安装。 + + # yum install mdadm [在 RedHat 系统] + # apt-get install mdadm [在 Debain 系统] + +`mdadm`工具安装完成后,可以使用下面的命令创建一个`md` raid 设备。 + + # mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 + +6、 接下来使用`cat`命令验证新创建的 raid 设备。 + + # cat /proc/mdstat + +![Create md raid Device](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md-raid-Device.png) + +*创建 md RAID 设备* + +7、 接下来,使用下面的命令来检查4个磁盘。下面命令的输出会很长,因为它会显示4个磁盘的所有信息。 + + # mdadm --examine /dev/sd[b-e]1 + +8、 接下来,使用以下命令来查看 RAID 阵列的详细信息。 + + # mdadm --detail /dev/md0 + +![Check Raid Array Details](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Array-Details.png) + +*查看 RAID 阵列详细信息* + +**注意**: 你在上面看到的结果,该 RAID 的状态是 active 和re-syncing。 + +#### 第3步:创建文件系统 #### + +9、 使用 ext4 作为`md0′的文件系统,并将它挂载到`/mnt/raid10`下。在这里,我用的是 ext4,你可以使用你想要的文件系统类型。 + + # mkfs.ext4 /dev/md0 + +![Create md Filesystem](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md-Filesystem.png) + +*创建 md 文件系统* + +10、 在创建文件系统后,挂载文件系统到`/mnt/raid10`下,并使用`ls -l`命令列出挂载点下的内容。 + + # mkdir /mnt/raid10 + # mount /dev/md0 /mnt/raid10/ + # ls -l /mnt/raid10/ + +接下来,在挂载点下创建一些文件,并在文件中添加些内容,然后检查内容。 + + # touch /mnt/raid10/raid10_files.txt + # ls -l /mnt/raid10/ + # echo "raid 10 setup with 4 disks" > /mnt/raid10/raid10_files.txt + # cat /mnt/raid10/raid10_files.txt + +![Mount md Device](http://www.tecmint.com/wp-content/uploads/2014/11/Mount-md-Device.png) + +*挂载 md 设备* + +11、 要想自动挂载,打开`/etc/fstab`文件并添加下面的条目,挂载点根据你环境的不同来添加。使用 wq! 保存并退出。 + + # vim /etc/fstab + + /dev/md0 /mnt/raid10 ext4 defaults 0 0 + +![AutoMount md Device](http://www.tecmint.com/wp-content/uploads/2014/11/AutoMount-md-Device.png) + +*挂载 md 设备* + +12、 接下来,在重新启动系统前使用`mount -a`来确认`/etc/fstab`文件是否有错误。 + + # mount -av + +![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Errors-in-Fstab.png) + +*检查 Fstab 中的错误* + +#### 第四步:保存 RAID 配置 #### + +13、 默认情况下 RAID 没有配置文件,所以我们需要在上述步骤完成后手动保存它。 + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +![Save Raid10 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Save-Raid10-Configuration.png) + +*保存 RAID10 的配置* + +就这样,我们使用方法1创建完了 RAID 10,这种方法是比较容易的。现在,让我们使用方法2来设置 RAID 10。 + +### 方法2:创建 RAID 10 ### + +1、 在方法2中,我们必须定义2组 RAID 1,然后我们需要使用这些创建好的 RAID 1 的集合来定义一个 RAID 0。在这里,我们将要做的是先创建2个镜像(RAID1),然后创建 RAID0 (条带化)。 + +首先,列出所有的可用于创建 RAID 10 的磁盘。 + + # ls -l /dev | grep sd + +![List 4 Devices](http://www.tecmint.com/wp-content/uploads/2014/11/List-4-Devices.png) + +*列出了 4 个设备* + +2、 将4个磁盘使用`fdisk`命令进行分区。对于如何分区,您可以按照上面的第1步。 + + # fdisk /dev/sdb + # fdisk /dev/sdc + # fdisk /dev/sdd + # fdisk /dev/sde + +3、 在完成4个磁盘的分区后,现在检查磁盘是否存在 RAID块。 + + # mdadm --examine /dev/sd[b-e] + # mdadm --examine /dev/sd[b-e]1 + +![Examine 4 Disks](http://www.tecmint.com/wp-content/uploads/2014/11/Examine-4-Disks.png) + +*检查 4 个磁盘* + +#### 第1步:创建 RAID 1 #### + +4、 首先,使用4块磁盘创建2组 RAID 1,一组为`sdb1′和 `sdc1′,另一组是`sdd1′ 和 `sde1′。 + + # mdadm --create /dev/md1 --metadata=1.2 --level=1 --raid-devices=2 /dev/sd[b-c]1 + # mdadm --create /dev/md2 --metadata=1.2 --level=1 --raid-devices=2 /dev/sd[d-e]1 + # cat /proc/mdstat + +![Creating Raid 1](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-1.png) + +*创建 RAID 1* + +![Check Details of Raid 1](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-1.png) + +*查看 RAID 1 的详细信息* + +#### 第2步:创建 RAID 0 #### + +5、 接下来,使用 md1 和 md2 来创建 RAID 0。 + + # mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/md1 /dev/md2 + # cat /proc/mdstat + +![Creating Raid 0](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-0.png) + +*创建 RAID 0* + +#### 第3步:保存 RAID 配置 #### + +6、 我们需要将配置文件保存在`/etc/mdadm.conf`文件中,使其每次重新启动后都能加载所有的 RAID 设备。 + + # mdadm --detail --scan --verbose >> /etc/mdadm.conf + +在此之后,我们需要按照方法1中的第3步来创建文件系统。 + +就是这样!我们采用的方法2创建完了 RAID 1+0。我们将会失去一半的磁盘空间,但相比其他 RAID ,它的性能将是非常好的。 + +### 结论 ### + +在这里,我们采用两种方法创建 RAID 10。RAID 10 具有良好的性能和冗余性。希望这篇文章可以帮助你了解 RAID 10 嵌套 RAID。在后面的文章中我们会看到如何扩展现有的 RAID 阵列以及更多精彩的内容。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-raid-10-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ diff --git a/translated/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md b/translated/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md deleted file mode 100644 index 850f6c3e49..0000000000 --- a/translated/tech/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md +++ /dev/null @@ -1,277 +0,0 @@ - -在 Linux 中设置 RAID 10 或 1 + 0(嵌套) - 第6部分 -================================================================================ -RAID 10 是结合 RAID 0 和 RAID 1 形成的。要设置 RAID 10,我们至少需要4个磁盘。在之前的文章中,我们已经看到了如何使用两个磁盘设置 RAID 0 和 RAID 1。 - -在这里,我们将使用最少4个磁盘结合 RAID 0 和 RAID 1 来设置 RAID 10。假设,我们已经在逻辑卷保存了一些数据,这是 RAID 10 创建的,如果我们要保存数据“apple”,它将使用以下方法将其保存在4个磁盘中。 - -![Create Raid 10 in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/raid10.jpg) - -在 Linux 中创建 Raid 10 - -使用 RAID 0 时,它将“A”保存在第一个磁盘,“p”保存在第二个磁盘,下一个“P”又在第一个磁盘,“L”在第二个磁盘。然后,“e”又在第一个磁盘,像这样它会继续循环此过程将数据保存完整。由此我们知道,RAID 0 是将数据的一半保存到第一个磁盘,另一半保存到第二个磁盘。 - -在 RAID 1 方法中,相同的数据将被写入到两个磁盘中。 “A”将同时被写入到第一和第二个磁盘中,“P”也将被同时写入到两个磁盘中,下一个“P”也将同时被写入到两个磁盘。因此,使用 RAID 1 将同时写入到两个磁盘。它将继续循环此过程。 - -现在大家来了解 RAID 10 怎样结合 RAID 0 和 RAID 1 来工作。如果我们有4个20 GB 的磁盘,总共为 80 GB,但我们将只能得到40 GB 的容量,另一半的容量将用于构建 RAID 10。 - -#### RAID 10 的优点和缺点 #### - -- 提供更好的性能。 -- 在 RAID 10 中我们将失去两个磁盘的容量。 -- 读与写的性能将会很好,因为它会同时进行写入和读取。 -- 它能解决数据库的高 I/O 磁盘写操作。 - -#### 要求 #### - -在 RAID 10 中,我们至少需要4个磁盘,2个磁盘为 RAID 0,其他2个磁盘为 RAID 1,就像我之前说的,RAID 10 仅仅是结合了 RAID 0和1。如果我们需要扩展 RAID 组,最少需要添加4个磁盘。 - -**我的服务器设置** - - Operating System : CentOS 6.5 Final - IP Address : 192.168.0.229 - Hostname : rd10.tecmintlocal.com - Disk 1 [20GB] : /dev/sdd - Disk 2 [20GB] : /dev/sdc - Disk 3 [20GB] : /dev/sdd - Disk 4 [20GB] : /dev/sde - -有两种方法来设置 RAID 10,在这里两种方法我都会演示,但我更喜欢第一种方法,使用它来设置 RAID 10 更简单。 - -### 方法1:设置 RAID 10 ### - -1.首先,使用以下命令确认所添加的4块磁盘没有被使用。 - - # ls -l /dev | grep sd - -2.四个磁盘被检测后,然后来检查磁盘是否存在 RAID 分区。 - - # mdadm -E /dev/sd[b-e] - # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde - -![Verify 4 Added Disks](http://www.tecmint.com/wp-content/uploads/2014/11/Verify-4-Added-Disks.png) - -验证添加的4块磁盘 - -**注意**: 在上面的输出中,如果没有检测到 super-block 意味着在4块磁盘中没有定义过 RAID。 - -#### 第1步:为 RAID 分区 #### - -3.现在,使用‘fdisk’,命令为4个磁盘(/dev/sdb, /dev/sdc, /dev/sdd 和 /dev/sde)创建新分区。 - - # fdisk /dev/sdb - # fdisk /dev/sdc - # fdisk /dev/sdd - # fdisk /dev/sde - -**为 /dev/sdb 创建分区** - -我来告诉你如何使用 fdisk 为磁盘(/dev/sdb)进行分区,此步也适用于其他磁盘。 - - # fdisk /dev/sdb - -请使用以下步骤为 /dev/sdb 创建一个新的分区。 - -- 按 ‘n’ 创建新的分区。 -- 然后按 ‘P’ 选择主分区。 -- 接下来选择分区号为1。 -- 只需按两次回车键选择默认值即可。 -- 然后,按 ‘P’ 来打印创建好的分区。 -- 按 ‘L’,列出所有可用的类型。 -- 按 ‘t’ 去修改分区。 -- 键入 ‘fd’ 设置为 Linux 的 RAID 类型,然后按 Enter 确认。 -- 然后再次使用‘p’查看我们所做的更改。 -- 使用‘w’保存更改。 - -![Disk sdb Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Disk-sdb-Partition.png) - -为磁盘 sdb 分区 - -**注意**: 请使用上面相同的指令对其他磁盘(sdc, sdd sdd sde)进行分区。 - -4.创建好4个分区后,需要使用下面的命令来检查磁盘是否存在 raid。 - - # mdadm -E /dev/sd[b-e] - # mdadm -E /dev/sd[b-e]1 - - 或者 - - # mdadm --examine /dev/sdb /dev/sdc /dev/sdd /dev/sde - # mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 - -![Check All Disks for Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Check-All-Disks-for-Raid.png) - -检查磁盘 - -**注意**: 以上输出显示,新创建的四个分区中没有检测到 super-block,这意味着我们可以继续在这些磁盘上创建 RAID 10。 - -#### 第2步: 创建 RAID 设备 ‘md’ #### - -5.现在改创建一个‘md’(即 /dev/md0)设备,使用“mdadm” raid 管理工具。在创建设备之前,必须确保系统已经安装了‘mdadm’工具,如果没有请使用下面的命令来安装。 - - # yum install mdadm [on RedHat systems] - # apt-get install mdadm [on Debain systems] - -‘mdadm’工具安装完成后,可以使用下面的命令创建一个‘md’ raid 设备。 - - # mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sd[b-e]1 - -6.接下来使用‘cat’命令验证新创建的 raid 设备。 - - # cat /proc/mdstat - -![Create md raid Device](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md-raid-Device.png) - -创建 md raid 设备 - -7.接下来,使用下面的命令来检查4个磁盘。下面命令的输出会很长,因为它会显示4个磁盘的所有信息。 - - # mdadm --examine /dev/sd[b-e]1 - -8.接下来,使用以下命令来查看 RAID 阵列的详细信息。 - - # mdadm --detail /dev/md0 - -![Check Raid Array Details](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-Array-Details.png) - -查看 Raid 阵列详细信息 - -**注意**: 你在上面看到的结果,该 RAID 的状态是 active 和re-syncing。 - -#### 第3步:创建文件系统 #### - -9.使用 ext4 作为‘md0′的文件系统并将它挂载到‘/mnt/raid10‘下。在这里,我用的是 ext4,你可以使用你想要的文件系统类型。 - - # mkfs.ext4 /dev/md0 - -![Create md Filesystem](http://www.tecmint.com/wp-content/uploads/2014/11/Create-md-Filesystem.png) - -创建 md 文件系统 - -10.在创建文件系统后,挂载文件系统到‘/mnt/raid10‘下,并使用‘ls -l’命令列出挂载点下的内容。 - - # mkdir /mnt/raid10 - # mount /dev/md0 /mnt/raid10/ - # ls -l /mnt/raid10/ - -接下来,在挂载点下创建一些文件,并在文件中添加些内容,然后检查内容。 - - # touch /mnt/raid10/raid10_files.txt - # ls -l /mnt/raid10/ - # echo "raid 10 setup with 4 disks" > /mnt/raid10/raid10_files.txt - # cat /mnt/raid10/raid10_files.txt - -![Mount md Device](http://www.tecmint.com/wp-content/uploads/2014/11/Mount-md-Device.png) - -挂载 md 设备 - -11.要想自动挂载,打开‘/etc/fstab‘文件并添加下面的条目,挂载点根据你环境的不同来添加。使用 wq! 保存并退出。 - - # vim /etc/fstab - - /dev/md0 /mnt/raid10 ext4 defaults 0 0 - -![AutoMount md Device](http://www.tecmint.com/wp-content/uploads/2014/11/AutoMount-md-Device.png) - -挂载 md 设备 - -12.接下来,在重新启动系统前使用‘mount -a‘来确认‘/etc/fstab‘文件是否有错误。 - - # mount -av - -![Check Errors in Fstab](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Errors-in-Fstab.png) - -检查 Fstab 中的错误 - -#### 第四步:保存 RAID 配置 #### - -13.默认情况下 RAID 没有配置文件,所以我们需要在上述步骤完成后手动保存它。 - - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - -![Save Raid10 Configuration](http://www.tecmint.com/wp-content/uploads/2014/11/Save-Raid10-Configuration.png) - -保存 Raid10 的配置 - -就这样,我们使用方法1创建完了 RAID 10,这种方法是比较容易的。现在,让我们使用方法2来设置 RAID 10。 - -### 方法2:创建 RAID 10 ### - -1.在方法2中,我们必须定义2组 RAID 1,然后我们需要使用这些创建好的 RAID 1 的集来定义一个 RAID 0。在这里,我们将要做的是先创建2个镜像(RAID1),然后创建 RAID0 (条带化)。 - -首先,列出所有的可用于创建 RAID 10 的磁盘。 - - # ls -l /dev | grep sd - -![List 4 Devices](http://www.tecmint.com/wp-content/uploads/2014/11/List-4-Devices.png) - -列出了 4 设备 - -2.将4个磁盘使用‘fdisk’命令进行分区。对于如何分区,您可以按照 #步骤 3。 - - # fdisk /dev/sdb - # fdisk /dev/sdc - # fdisk /dev/sdd - # fdisk /dev/sde - -3.在完成4个磁盘的分区后,现在检查磁盘是否存在 RAID块。 - - # mdadm --examine /dev/sd[b-e] - # mdadm --examine /dev/sd[b-e]1 - -![Examine 4 Disks](http://www.tecmint.com/wp-content/uploads/2014/11/Examine-4-Disks.png) - -检查 4 个磁盘 - -#### 第1步:创建 RAID 1 #### - -4.首先,使用4块磁盘创建2组 RAID 1,一组为‘sdb1′和 ‘sdc1′,另一组是‘sdd1′ 和 ‘sde1′。 - - # mdadm --create /dev/md1 --metadata=1.2 --level=1 --raid-devices=2 /dev/sd[b-c]1 - # mdadm --create /dev/md2 --metadata=1.2 --level=1 --raid-devices=2 /dev/sd[d-e]1 - # cat /proc/mdstat - -![Creating Raid 1](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-1.png) - -创建 Raid 1 - -![Check Details of Raid 1](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-1.png) - -查看 Raid 1 的详细信息 - -#### 第2步:创建 RAID 0 #### - -5.接下来,使用 md1 和 md2 来创建 RAID 0。 - - # mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/md1 /dev/md2 - # cat /proc/mdstat - -![Creating Raid 0](http://www.tecmint.com/wp-content/uploads/2014/11/Creating-Raid-0.png) - -创建 Raid 0 - -#### 第3步:保存 RAID 配置 #### - -6.我们需要将配置文件保存在‘/etc/mdadm.conf‘文件中,使其每次重新启动后都能加载所有的 raid 设备。 - - # mdadm --detail --scan --verbose >> /etc/mdadm.conf - -在此之后,我们需要按照方法1中的#第3步来创建文件系统。 - -就是这样!我们采用的方法2创建完了 RAID 1+0.我们将会失去两个磁盘的空间,但相比其他 RAID ,它的性能将是非常好的。 - -### 结论 ### - -在这里,我们采用两种方法创建 RAID 10。RAID 10 具有良好的性能和冗余性。希望这篇文章可以帮助你了解 RAID 10(嵌套 RAID 的级别)。在后面的文章中我们会看到如何扩展现有的 RAID 阵列以及更多精彩的。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-raid-10-in-linux/ - -作者:[Babin Lonston][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/babinlonston/ From 2fba10b6b89bf9a779b286d6054fbe6beadfc8f0 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 31 Aug 2015 22:18:14 +0800 Subject: [PATCH 1943/2517] [Translating] tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md --- ...Boss Data Virtualization GA with OData in Docker Container.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md b/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md index 007f16493b..8f5b4a68d3 100644 --- a/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md +++ b/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md @@ -1,3 +1,4 @@ +ictlyh Translating Howto Run JBoss Data Virtualization GA with OData in Docker Container ================================================================================ Hi everyone, today we'll learn how to run JBoss Data Virtualization 6.0.0.GA with OData in a Docker Container. JBoss Data Virtualization is a data supply and integration solution platform that transforms various scatered multiple sources data, treats them as single source and delivers the required data into actionable information at business speed to any applications or users. JBoss Data Virtualization can help us easily combine and transform data into reusable business friendly data models and make unified data easily consumable through open standard interfaces. It offers comprehensive data abstraction, federation, integration, transformation, and delivery capabilities to combine data from one or multiple sources into reusable for agile data utilization and sharing.For more information about JBoss Data Virtualization, we can check out [its official page][1]. Docker is an open source platform that provides an open platform to pack, ship and run any application as a lightweight container. Running JBoss Data Virtualization with OData in Docker Container makes us easy to handle and launch. From 08b165287dc0e5a2743dba17f50cff9b9760c7fd Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 31 Aug 2015 22:28:34 +0800 Subject: [PATCH 1944/2517] PUB:Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @strugglingyouth 终于完了,可是目前看起来源站像是太监了,剩下两篇没消息了。。 --- ...Array and Removing Failed Disks in Raid.md | 182 ++++++++++++++++++ ...Array and Removing Failed Disks in Raid.md | 182 ------------------ 2 files changed, 182 insertions(+), 182 deletions(-) create mode 100644 published/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md delete mode 100644 translated/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md diff --git a/published/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md b/published/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md new file mode 100644 index 0000000000..3376376a2a --- /dev/null +++ b/published/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md @@ -0,0 +1,182 @@ +在 Linux 下使用 RAID(七):在 Raid 中扩展现有的 RAID 阵列和删除故障的磁盘 +================================================================================ + +每个新手都会对阵列(array)这个词所代表的意思产生疑惑。阵列只是磁盘的一个集合。换句话说,我们可以称阵列为一个集合(set)或一组(group)。就像一组鸡蛋中包含6个一样。同样 RAID 阵列中包含着多个磁盘,可能是2,4,6,8,12,16等,希望你现在知道了什么是阵列。 + +在这里,我们将看到如何扩展现有的阵列或 RAID 组。例如,如果我们在阵列中使用2个磁盘形成一个 raid 1 集合,在某些情况,如果该组中需要更多的空间,就可以使用 mdadm -grow 命令来扩展阵列大小,只需要将一个磁盘加入到现有的阵列中即可。在说完扩展(添加磁盘到现有的阵列中)后,我们将看看如何从阵列中删除故障的磁盘。 + +![Grow Raid Array in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Growing-Raid-Array.jpg) + +*扩展 RAID 阵列和删除故障的磁盘* + +假设磁盘中的一个有问题了需要删除该磁盘,但我们需要在删除磁盘前添加一个备用磁盘来扩展该镜像,因为我们需要保存我们的数据。当磁盘发生故障时我们需要从阵列中删除它,这是这个主题中我们将要学习到的。 + +#### 扩展 RAID 的特性 #### + +- 我们可以增加(扩展)任意 RAID 集合的大小。 +- 我们可以在使用新磁盘扩展 RAID 阵列后删除故障的磁盘。 +- 我们可以扩展 RAID 阵列而无需停机。 + +####要求 #### + +- 为了扩展一个RAID阵列,我们需要一个已有的 RAID 组(阵列)。 +- 我们需要额外的磁盘来扩展阵列。 +- 在这里,我们使用一块磁盘来扩展现有的阵列。 + +在我们了解扩展和恢复阵列前,我们必须了解有关 RAID 级别和设置的基本知识。点击下面的链接了解这些。 + +- [介绍 RAID 的级别和概念][1] +- [使用 mdadm 工具创建软件 RAID 0 (条带化)][2] + +#### 我的服务器设置 #### + + 操作系统 : CentOS 6.5 Final +  IP地址 : 192.168.0.230 +  主机名 : grow.tecmintlocal.com + 2 块现有磁盘 : 1 GB + 1 块额外磁盘 : 1 GB + +在这里,我们已有一个 RAID ,有2块磁盘,每个大小为1GB,我们现在再增加一个磁盘到我们现有的 RAID 阵列中,其大小为1GB。 + +### 扩展现有的 RAID 阵列 ### + +1、 在扩展阵列前,首先使用下面的命令列出现有的 RAID 阵列。 + + # mdadm --detail /dev/md0 + +![Check Existing Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Existing-Raid-Array.png) + +*检查现有的 RAID 阵列* + +**注意**: 以上输出显示,已经有了两个磁盘在 RAID 阵列中,级别为 RAID 1。现在我们增加一个磁盘到现有的阵列里。 + +2、 现在让我们添加新的磁盘“sdd”,并使用`fdisk`命令来创建分区。 + + # fdisk /dev/sdd + +请使用以下步骤为 /dev/sdd 创建一个新的分区。 + +- 按 `n` 创建新的分区。 +- 然后按 `P` 选择主分区。 +- 接下来选择分区号为1。 +- 只需按两次回车键选择默认值即可。 +- 然后,按 `P` 来打印创建好的分区。 +- 按 `L`,列出所有可用的类型。 +- 按 `t` 去修改分区。 +- 键入 `fd` 设置为 Linux 的 RAID 类型,然后按回车确认。 +- 然后再次使用`p`查看我们所做的更改。 +- 使用`w`保存更改。 + +![Create New Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Create-New-sdd-Partition.png) + +*为 sdd 创建新的分区* + +3、 一旦新的 sdd 分区创建完成后,你可以使用下面的命令验证它。 + + # ls -l /dev/ | grep sd + +![Confirm sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-sdd-Partition.png) + +*确认 sdd 分区* + +4、 接下来,在添加到阵列前先检查磁盘是否有 RAID 分区。 + + # mdadm --examine /dev/sdd1 + +![Check Raid on sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-sdd-Partition.png) + +*在 sdd 分区中检查 RAID* + +**注意**:以上输出显示,该盘有没有发现 super-blocks,意味着我们可以将新的磁盘添加到现有阵列。 + +5、 要添加新的分区 /dev/sdd1 到现有的阵列 md0,请使用以下命令。 + + # mdadm --manage /dev/md0 --add /dev/sdd1 + +![Add Disk To Raid-Array](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Disk-To-Raid-Array.png) + +*添加磁盘到 RAID 阵列* + +6、 一旦新的磁盘被添加后,在我们的阵列中检查新添加的磁盘。 + + # mdadm --detail /dev/md0 + +![Confirm Disk Added to Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-Disk-Added-To-Raid.png) + +*确认将新磁盘添加到 RAID 中* + +**注意**: 在上面的输出,你可以看到磁盘已经被添加作为备用的。在这里,我们的阵列中已经有了2个磁盘,但我们期待阵列中有3个磁盘,因此我们需要扩展阵列。 + +7、 要扩展阵列,我们需要使用下面的命令。 + + # mdadm --grow --raid-devices=3 /dev/md0 + +![Grow Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Grow-Raid-Array.png) + +*扩展 Raid 阵列* + +现在我们可以看到第三块磁盘(sdd1)已被添加到阵列中,在第三块磁盘被添加后,它将从另外两块磁盘上同步数据。 + + # mdadm --detail /dev/md0 + +![Confirm Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-Raid-Array.png) + +*确认 Raid 阵列* + +**注意**: 对于大容量磁盘会需要几个小时来同步数据。在这里,我们使用的是1GB的虚拟磁盘,所以它非常快在几秒钟内便会完成。 + +### 从阵列中删除磁盘 ### + +8、 在数据被从其他两个磁盘同步到新磁盘`sdd1`后,现在三个磁盘中的数据已经相同了(镜像)。 + +正如我前面所说的,假定一个磁盘出问题了需要被删除。所以,现在假设磁盘`sdc1`出问题了,需要从现有阵列中删除。 + +在删除磁盘前我们要将其标记为失效,然后我们才可以将其删除。 + + # mdadm --fail /dev/md0 /dev/sdc1 + # mdadm --detail /dev/md0 + +![Disk Fail in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Disk-Fail-in-Raid-Array.png) + +*在 RAID 阵列中模拟磁盘故障* + +从上面的输出中,我们清楚地看到,磁盘在下面被标记为 faulty。即使它是 faulty 的,我们仍然可以看到 raid 设备有3个,1个损坏了,状态是 degraded。 + +现在我们要从阵列中删除 faulty 的磁盘,raid 设备将像之前一样继续有2个设备。 + + # mdadm --remove /dev/md0 /dev/sdc1 + +![Remove Disk in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Remove-Disk-in-Raid-Array.png) + +*在 Raid 阵列中删除磁盘* + +9、 一旦故障的磁盘被删除,然后我们只能使用2个磁盘来扩展 raid 阵列了。 + + # mdadm --grow --raid-devices=2 /dev/md0 + # mdadm --detail /dev/md0 + +![Grow Disks in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Grow-Disks-in-Raid-Array.png) + +*在 RAID 阵列扩展磁盘* + +从上面的输出中可以看到,我们的阵列中仅有2台设备。如果你需要再次扩展阵列,按照如上所述的同样步骤进行。如果你需要添加一个磁盘作为备用,将其标记为 spare,因此,如果磁盘出现故障时,它会自动顶上去并重建数据。 + +### 结论 ### + +在这篇文章中,我们已经看到了如何扩展现有的 RAID 集合,以及如何在重新同步已有磁盘的数据后从一个阵列中删除故障磁盘。所有这些步骤都可以不用停机来完成。在数据同步期间,系统用户,文件和应用程序不会受到任何影响。 + +在接下来的文章我将告诉你如何管理 RAID,敬请关注更新,不要忘了写评论。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/grow-raid-array-in-linux/ + +作者:[Babin Lonston][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/babinlonston/ +[1]:https://linux.cn/article-6085-1.html +[2]:https://linux.cn/article-6087-1.html diff --git a/translated/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md b/translated/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md deleted file mode 100644 index 94d18edde2..0000000000 --- a/translated/tech/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md +++ /dev/null @@ -1,182 +0,0 @@ - -在 Raid 中扩展现有的 RAID 阵列和删除故障的磁盘 - 第7部分 -================================================================================ -每个新手都会对阵列的意思产生疑惑。阵列只是磁盘的一个集合。换句话说,我们可以称阵列为一个集合或一组。就像一组鸡蛋中包含6个。同样 RAID 阵列中包含着多个磁盘,可能是2,4,6,8,12,16等,希望你现在知道了什么是阵列。 - -在这里,我们将看到如何扩展现有的阵列或 raid 组。例如,如果我们在一组 raid 中使用2个磁盘形成一个 raid 1,在某些情况,如果该组中需要更多的空间,就可以使用mdadm -grow 命令来扩展阵列大小,只是将一个磁盘加入到现有的阵列中。在扩展(添加磁盘到现有的阵列中)后,我们将看看如何从阵列中删除故障的磁盘。 - -![Grow Raid Array in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Growing-Raid-Array.jpg) - -扩展 RAID 阵列和删除故障的磁盘 - -假设磁盘中的一个有问题了需要删除该磁盘,但我们需要添加一个备用磁盘来扩展该镜像再删除磁盘前,因为我们需要保存数据。当磁盘发生故障时我们需要从阵列中删除它,这是这个主题中我们将要学习到的。 - -#### 扩展 RAID 的特性 #### - -- 我们可以增加(扩大)所有 RAID 集和的大小。 -- 我们在使用新磁盘扩展 RAID 阵列后删除故障的磁盘。 -- 我们可以扩展 RAID 阵列不存在宕机时间。 - -要求 - -- 为了扩展一个RAID阵列,我们需要已有的 RAID 组(阵列)。 -- 我们需要额外的磁盘来扩展阵列。 -- 在这里,我们使用一块磁盘来扩展现有的阵列。 - -在我们了解扩展和恢复阵列前,我们必须了解有关 RAID 级别和设置的基本知识。点击下面的链接了解这些。 - -- [理解 RAID 的基础概念 – 第一部分][1] -- [在 Linux 中创建软件 Raid 0 – 第二部分][2] - -#### 我的服务器设置 #### - - 操作系统 : CentOS 6.5 Final -  IP地址 : 192.168.0.230 -  主机名 : grow.tecmintlocal.com - 2 块现有磁盘 : 1 GB - 1 块额外磁盘 : 1 GB - -在这里,现有的 RAID 有2块磁盘,每个大小为1GB,我们现在再增加一个磁盘到我们现有的 RAID 阵列中,其大小为1GB。 - -### 扩展现有的 RAID 阵列 ### - -1. 在扩展阵列前,首先使用下面的命令列出现有的 RAID 阵列。 - - # mdadm --detail /dev/md0 - -![Check Existing Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Existing-Raid-Array.png) - -检查现有的 RAID 阵列 - -**注意**: 以上输出显示,已经有了两个磁盘在 RAID 阵列中,级别为 RAID 1。现在我们在这里再增加一个磁盘到现有的阵列。 - -2.现在让我们添加新的磁盘“sdd”,并使用‘fdisk‘命令来创建分区。 - - # fdisk /dev/sdd - -请使用以下步骤为 /dev/sdd 创建一个新的分区。 - -- 按 ‘n’ 创建新的分区。 -- 然后按 ‘P’ 选择主分区。 -- 接下来选择分区号为1。 -- 只需按两次回车键选择默认值即可。 -- 然后,按 ‘P’ 来打印创建好的分区。 -- 按 ‘L’,列出所有可用的类型。 -- 按 ‘t’ 去修改分区。 -- 键入 ‘fd’ 设置为 Linux 的 RAID 类型,然后按 Enter 确认。 -- 然后再次使用‘p’查看我们所做的更改。 -- 使用‘w’保存更改。 - -![Create New Partition in Linux](http://www.tecmint.com/wp-content/uploads/2014/11/Create-New-sdd-Partition.png) - -为 sdd 创建新的分区 - -3. 一旦新的 sdd 分区创建完成后,你可以使用下面的命令验证它。 - - # ls -l /dev/ | grep sd - -![Confirm sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-sdd-Partition.png) - -确认 sdd 分区 - -4.接下来,在添加到阵列前先检查磁盘是否有 RAID 分区。 - - # mdadm --examine /dev/sdd1 - -![Check Raid on sdd Partition](http://www.tecmint.com/wp-content/uploads/2014/11/Check-Raid-on-sdd-Partition.png) - -在 sdd 分区中检查 raid - -**注意**:以上输出显示,该盘有没有发现 super-blocks,意味着我们可以将新的磁盘添加到现有阵列。 - -4. 要添加新的分区 /dev/sdd1 到现有的阵列 md0,请使用以下命令。 - - # mdadm --manage /dev/md0 --add /dev/sdd1 - -![Add Disk To Raid-Array](http://www.tecmint.com/wp-content/uploads/2014/11/Add-Disk-To-Raid-Array.png) - -添加磁盘到 Raid 阵列 - -5. 一旦新的磁盘被添加后,在我们的阵列中检查新添加的磁盘。 - - # mdadm --detail /dev/md0 - -![Confirm Disk Added to Raid](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-Disk-Added-To-Raid.png) - -确认将新磁盘添加到 Raid 中 - -**注意**: 在上面的输出,你可以看到磁盘已经被添加作为备用的。在这里,我们的阵列中已经有了2个磁盘,但我们期待阵列中有3个磁盘,因此我们需要扩展阵列。 - -6. 要扩展阵列,我们需要使用下面的命令。 - - # mdadm --grow --raid-devices=3 /dev/md0 - -![Grow Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Grow-Raid-Array.png) - -扩展 Raid 阵列 - -现在我们可以看到第三块磁盘(sdd1)已被添加到阵列中,在第三块磁盘被添加后,它将从另外两块磁盘上同步数据。 - - # mdadm --detail /dev/md0 - -![Confirm Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Confirm-Raid-Array.png) - -确认 Raid 阵列 - -**注意**: 对于容量磁盘会需要几个小时来同步数据。在这里,我们使用的是1GB的虚拟磁盘,所以它非常快在几秒钟内便会完成。 - -### 从阵列中删除磁盘 ### - -7. 在数据被从其他两个磁盘同步到新磁盘‘sdd1‘后,现在三个磁盘中的数据已经相同了。 - -正如我前面所说的,假定一个磁盘出问题了需要被删除。所以,现在假设磁盘‘sdc1‘出问题了,需要从现有阵列中删除。 - -在删除磁盘前我们要将其标记为 failed,然后我们才可以将其删除。 - - # mdadm --fail /dev/md0 /dev/sdc1 - # mdadm --detail /dev/md0 - -![Disk Fail in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Disk-Fail-in-Raid-Array.png) - -在 Raid 阵列中模拟磁盘故障 - -从上面的输出中,我们清楚地看到,磁盘在底部被标记为 faulty。即使它是 faulty 的,我们仍然可以看到 raid 设备有3个,1个损坏了 state 是 degraded。 - -现在我们要从阵列中删除 faulty 的磁盘,raid 设备将像之前一样继续有2个设备。 - - # mdadm --remove /dev/md0 /dev/sdc1 - -![Remove Disk in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Remove-Disk-in-Raid-Array.png) - -在 Raid 阵列中删除磁盘 - -8. 一旦故障的磁盘被删除,然后我们只能使用2个磁盘来扩展 raid 阵列了。 - - # mdadm --grow --raid-devices=2 /dev/md0 - # mdadm --detail /dev/md0 - -![Grow Disks in Raid Array](http://www.tecmint.com/wp-content/uploads/2014/11/Grow-Disks-in-Raid-Array.png) - -在 RAID 阵列扩展磁盘 - -从上面的输出中可以看到,我们的阵列中仅有2台设备。如果你需要再次扩展阵列,按照同样的步骤,如上所述。如果你需要添加一个磁盘作为备用,将其标记为 spare,因此,如果磁盘出现故障时,它会自动顶上去并重建数据。 - -### 结论 ### - -在这篇文章中,我们已经看到了如何扩展现有的 RAID 集合,以及如何从一个阵列中删除故障磁盘在重新同步已有磁盘的数据后。所有这些步骤都可以不用停机来完成。在数据同步期间,系统用户,文件和应用程序不会受到任何影响。 - -在接下来的文章我将告诉你如何管理 RAID,敬请关注更新,不要忘了写评论。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/grow-raid-array-in-linux/ - -作者:[Babin Lonston][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/babinlonston/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/create-raid0-in-linux/ From fe9588990f741f9a9c40998d27fc12115c490d42 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 31 Aug 2015 23:45:37 +0800 Subject: [PATCH 1945/2517] PUB:20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @GOLinux 这篇翻译的不错~ --- ...r Easy Partition Resizing and Snapshots.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md (75%) diff --git a/translated/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md b/published/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md similarity index 75% rename from translated/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md rename to published/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md index 2e66e27f31..adf9abd11c 100644 --- a/translated/tech/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md +++ b/published/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md @@ -1,14 +1,14 @@ -Ubuntu上使用LVM轻松调整分区并制作快照 +Ubuntu 上使用 LVM 轻松调整分区并制作快照 ================================================================================ ![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55035707bbd74.png.pagespeed.ic.9_yebxUF1C.png) -Ubuntu的安装器提供了一个轻松“使用LVM”的复选框。说明中说,它启用了逻辑卷管理,因此你可以制作快照,并更容易地调整硬盘分区大小——这里将为大家讲述如何完成这些操作。 +Ubuntu的安装器提供了一个轻松“使用LVM”的复选框。它的描述中说,启用逻辑卷管理可以让你制作快照,并更容易地调整硬盘分区大小——这里将为大家讲述如何完成这些操作。 -LVM是一种技术,某种程度上和[RAID阵列][1]或[Windows上的存储空间][2]类似。虽然该技术在服务器上更为有用,但是它也可以在桌面端PC上使用。 +LVM是一种技术,某种程度上和[RAID阵列][1]或[Windows上的“存储空间”][2]类似。虽然该技术在服务器上更为有用,但是它也可以在桌面端PC上使用。 ### 你应该在新安装Ubuntu时使用LVM吗? ### -第一个问题是,你是否想要在安装Ubuntu时使用LVM?如果是,那么Ubuntu让这一切变得很简单,只需要轻点鼠标就可以完成,但是该选项默认是不启用的。正如安装器所说的,它允许你调整分区、创建快照、合并多个磁盘到一个逻辑卷等等——所有这一切都可以在系统运行时完成。不同于传统分区,你不需要关掉你的系统,从Live CD或USB驱动,然后[调整这些不使用的分区][3]。 +第一个问题是,你是否想要在安装Ubuntu时使用LVM?如果是,那么Ubuntu让这一切变得很简单,只需要轻点鼠标就可以完成,但是该选项默认是不启用的。正如安装器所说的,它允许你调整分区、创建快照、将多个磁盘合并到一个逻辑卷等等——所有这一切都可以在系统运行时完成。不同于传统分区,你不需要关掉你的系统,从Live CD或USB驱动,然后[当这些分区不使用时才能调整][3]。 完全坦率地说,普通Ubuntu桌面用户可能不会意识到他们是否正在使用LVM。但是,如果你想要在今后做一些更高深的事情,那么LVM就会有所帮助了。LVM可能更复杂,可能会在你今后恢复数据时会导致问题——尤其是在你经验不足时。这里不会有显著的性能损失——LVM是彻底地在Linux内核中实现的。 @@ -18,7 +18,7 @@ LVM是一种技术,某种程度上和[RAID阵列][1]或[Windows上的存储空 前面,我们已经[说明了何谓LVM][4]。概括来讲,它在你的物理磁盘和呈现在你系统中的分区之间提供了一个抽象层。例如,你的计算机可能装有两个硬盘驱动器,它们的大小都是 1 TB。你必须得在这些磁盘上至少分两个区,每个区大小 1 TB。 -LVM就在这些分区上提供了一个抽象层。用于取代磁盘上的传统分区,LVM将在你对这些磁盘初始化后,将它们当作独立的“物理卷”来对待。然后,你就可以基于这些物理卷创建“逻辑卷”。例如,你可以将这两个 1 TB 的磁盘组合成一个 2 TB 的分区,你的系统将只看到一个 2 TB 的卷,而LVM将会在后台处理这一切。一组物理卷以及一组逻辑卷被称之为“卷组”,一个标准的系统只会有一个卷组。 +LVM就在这些分区上提供了一个抽象层。用于取代磁盘上的传统分区,LVM将在你对这些磁盘初始化后,将它们当作独立的“物理卷”来对待。然后,你就可以基于这些物理卷创建“逻辑卷”。例如,你可以将这两个 1 TB 的磁盘组合成一个 2 TB 的分区,你的系统将只看到一个 2 TB 的卷,而LVM将会在后台处理这一切。一组物理卷以及一组逻辑卷被称之为“卷组”,一个典型的系统只会有一个卷组。 该抽象层使得调整分区、将多个磁盘组合成单个卷、甚至为一个运行着的分区的文件系统创建“快照”变得十分简单,而完成所有这一切都无需先卸载分区。 @@ -28,11 +28,11 @@ LVM就在这些分区上提供了一个抽象层。用于取代磁盘上的传 通常,[LVM通过Linux终端命令来管理][5]。这在Ubuntu上也行得通,但是有个更简单的图形化方法可供大家采用。如果你是一个Linux用户,对GParted或者与其类似的分区管理器熟悉,算了,别瞎掰了——GParted根本不支持LVM磁盘。 -然而,你可以使用Ubuntu附带的磁盘工具。该工具也被称之为GNOME磁盘工具,或者叫Palimpsest。点击停靠盘上的图标来开启它吧,搜索磁盘然后敲击回车。不像GParted,该磁盘工具将会在“其它设备”下显示LVM分区,因此你可以根据需要格式化这些分区,也可以调整其它选项。该工具在Live CD或USB 驱动下也可以使用。 +然而,你可以使用Ubuntu附带的磁盘工具。该工具也被称之为GNOME磁盘工具,或者叫Palimpsest。点击dash中的图标来开启它吧,搜索“磁盘”然后敲击回车。不像GParted,该磁盘工具将会在“其它设备”下显示LVM分区,因此你可以根据需要格式化这些分区,也可以调整其它选项。该工具在Live CD或USB 驱动下也可以使用。 ![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550361b3772f7.png.pagespeed.ic.nZWwLJUywR.png) -不幸的是,该磁盘工具不支持LVM的大多数强大的特性,没有管理卷组、扩展分区,或者创建快照等选项。对于这些操作,你可以通过终端来实现,但是你没有那个必要。相反,你可以打开Ubuntu软件中心,搜索关键字LVM,然后安装逻辑卷管理工具,你可以在终端窗口中运行**sudo apt-get install system-config-lvm**命令来安装它。安装完之后,你就可以从停靠盘上打开逻辑卷管理工具了。 +不幸的是,该磁盘工具不支持LVM的大多数强大的特性,没有管理卷组、扩展分区,或者创建快照等选项。对于这些操作,你可以通过终端来实现,但是没有那个必要。相反,你可以打开Ubuntu软件中心,搜索关键字LVM,然后安装逻辑卷管理工具,你可以在终端窗口中运行**sudo apt-get install system-config-lvm**命令来安装它。安装完之后,你就可以从dash上打开逻辑卷管理工具了。 这个图形化配置工具是由红帽公司开发的,虽然有点陈旧了,但却是唯一的图形化方式,你可以通过它来完成上述操作,将那些终端命令抛诸脑后了。 @@ -40,11 +40,11 @@ LVM就在这些分区上提供了一个抽象层。用于取代磁盘上的传 ![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363106789c.png.pagespeed.ic.drVInt3Weq.png) -卷组视图会列出你所有物理卷和逻辑卷的总览。这里,我们有两个横跨两个独立硬盘驱动器的物理分区,我们有一个交换分区和一个根分区,就像Ubuntu默认设置的分区图表。由于我们从另一个驱动器添加了第二个物理分区,现在那里有大量未使用空间。 +卷组视图会列出你所有的物理卷和逻辑卷的总览。这里,我们有两个横跨两个独立硬盘驱动器的物理分区,我们有一个交换分区和一个根分区,这是Ubuntu默认设置的分区图表。由于我们从另一个驱动器添加了第二个物理分区,现在那里有大量未使用空间。 ![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_550363f631c19.png.pagespeed.ic.54E_Owcq8y.png) -要扩展逻辑分区到物理空间,你可以在逻辑视图下选择它,点击编辑属性,然后修改大小来扩大分区。你也可以在这里缩减分区。 +要扩展逻辑分区到物理空间,你可以在逻辑视图下选择它,点击编辑属性,然后修改大小来扩大分区。你也可以在这里缩小分区。 ![](http://cdn5.howtogeek.com/wp-content/uploads/2015/03/ximg_55036893712d3.png.pagespeed.ic.ce7y_Mt0uF.png) @@ -55,7 +55,7 @@ system-config-lvm的其它选项允许你设置快照和镜像。对于传统桌 via: http://www.howtogeek.com/211937/how-to-use-lvm-on-ubuntu-for-easy-partition-resizing-and-snapshots/ 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 7cefdbd8c4c506524a1af2b9c5e357edf70201a2 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 31 Aug 2015 23:46:47 +0800 Subject: [PATCH 1946/2517] =?UTF-8?q?=E5=BD=92=E6=A1=A3201508?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- published/{ => 201508}/20141211 Open source all over the world.md | 0 .../20150128 7 communities driving open source development.md | 0 ...stall Strongswan - A Tool to Setup IPsec Based VPN in Linux.md | 0 ...20150209 Install OpenQRM Cloud Computing Platform In Debian.md | 0 ...to Manage and Use LVM (Logical Volume Management) in Ubuntu.md | 0 ...Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md | 0 .../20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md | 0 ... to access a Linux server behind NAT via reverse SSH tunnel.md | 0 .../20150518 How to set up a Replica Set on MongoDB.md | 0 published/{ => 201508}/20150522 Analyzing Linux Logs.md | 0 ...0527 Howto Manage Host Using Docker Machine in a VirtualBox.md | 0 ...50602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md | 0 ...hares Her Interview Experience on Linux 'iptables' Firewall.md | 0 ... Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md | 0 ...150625 How to Provision Swarm Clusters using Docker Machine.md | 0 ... Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md | 0 ...esktop--What They Get Right & Wrong - Page 1 - Introduction.md | 0 ...p--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md | 0 ...--What They Get Right & Wrong - Page 3 - GNOME Applications.md | 0 ...ktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md | 0 ... Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md | 0 ... Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md | 0 .../20150717 How to collect NGINX metrics - Part 2.md | 0 .../20150717 How to monitor NGINX with Datadog - Part 3.md | 0 published/{ => 201508}/20150717 How to monitor NGINX- Part 1.md | 0 ...150717 Howto Configure FTP Server with Proftpd on Fedora 22.md | 0 ...To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md | 0 .../20150722 How To Manage StartUp Applications In Ubuntu.md | 0 ...150727 Easy Backup Restore and Migrate Containers in Docker.md | 0 ... Fix--There is no command installed for 7-zip archive files.md | 0 ... How to Update Linux Kernel for Improved System Performance.md | 0 ... CD, Watch User Activity and Check Memory Usages of Browser.md | 0 ...Shell Commands Easily Using 'Explain Shell' Script in Linux.md | 0 ...ogical Volume Management and How Do You Enable It in Ubuntu.md | 0 published/{ => 201508}/20150730 Compare PDF Files on Ubuntu.md | 0 .../20150730 Must-Know Linux Commands For New Users.md | 0 ...0150803 Handy commands for profiling your Unix file systems.md | 0 published/{ => 201508}/20150803 Linux Logging Basics.md | 0 .../{ => 201508}/20150803 Troubleshooting with Linux Logs.md | 0 ...6 5 Reasons Why Software Developer is a Great Career Choice.md | 0 ...ow to fix 'ImportError--No module named wxversion' on Linux.md | 0 ...150806 Linux FAQs with Answers--How to install git on Linux.md | 0 ... Bash Environment Variables on a Linux and Unix-like System.md | 0 published/{ => 201508}/20150810 For Linux, Supercomputers R Us.md | 0 ...s a Web Based Network Traffic Analyzer--Install it on Linux.md | 0 ...1 How to download apk files from Google Play Store on Linux.md | 0 .../20150813 How to Install Logwatch on Ubuntu 15.04.md | 0 .../20150813 How to get Public IP from Linux Terminal.md | 0 ...It Easier For You To Install The Latest Nvidia Linux Driver.md | 0 ...0816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md | 0 .../20150816 shellinabox--A Web based AJAX Terminal Emulator.md | 0 .../20150817 Top 5 Torrent Clients For Ubuntu Linux.md | 0 ... How to monitor stock quotes from the command line on Linux.md | 0 ...150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md | 0 .../20150818 ​Ubuntu Linux is coming to IBM mainframes.md | 0 .../20150821 How to Install Visual Studio Code in Linux.md | 0 ...inux FAQs with Answers--How to check MariaDB server version.md | 0 .../20150826 How to Run Kali Linux 2.0 In Docker Container.md | 0 ... Convert From RPM to DEB and DEB to RPM Package Using Alien.md | 0 .../20150827 Linux or UNIX--Bash Read a File Line By Line.md | 0 .../Linux and Unix Test Disk IO Performance With dd Command.md | 0 ... 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md | 0 ...RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md | 0 ... - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md | 0 ...Creating RAID 5 (Striping with Distributed Parity) in Linux.md | 0 ... Level 6 (Striping with Double Distributed Parity) in Linux.md | 0 .../Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md | 0 ...ng an Existing RAID Array and Removing Failed Disks in Raid.md | 0 published/{ => 201508}/kde-plasma-5.4.md | 0 69 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201508}/20141211 Open source all over the world.md (100%) rename published/{ => 201508}/20150128 7 communities driving open source development.md (100%) rename published/{ => 201508}/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md (100%) rename published/{ => 201508}/20150209 Install OpenQRM Cloud Computing Platform In Debian.md (100%) rename published/{ => 201508}/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md (100%) rename published/{ => 201508}/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md (100%) rename published/{ => 201508}/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md (100%) rename published/{ => 201508}/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md (100%) rename published/{ => 201508}/20150518 How to set up a Replica Set on MongoDB.md (100%) rename published/{ => 201508}/20150522 Analyzing Linux Logs.md (100%) rename published/{ => 201508}/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md (100%) rename published/{ => 201508}/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md (100%) rename published/{ => 201508}/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md (100%) rename published/{ => 201508}/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md (100%) rename published/{ => 201508}/20150625 How to Provision Swarm Clusters using Docker Machine.md (100%) rename published/{ => 201508}/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md (100%) rename published/{ => 201508}/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md (100%) rename published/{ => 201508}/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md (100%) rename published/{ => 201508}/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md (100%) rename published/{ => 201508}/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md (100%) rename published/{ => 201508}/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md (100%) rename published/{ => 201508}/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md (100%) rename published/{ => 201508}/20150717 How to collect NGINX metrics - Part 2.md (100%) rename published/{ => 201508}/20150717 How to monitor NGINX with Datadog - Part 3.md (100%) rename published/{ => 201508}/20150717 How to monitor NGINX- Part 1.md (100%) rename published/{ => 201508}/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md (100%) rename published/{ => 201508}/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md (100%) rename published/{ => 201508}/20150722 How To Manage StartUp Applications In Ubuntu.md (100%) rename published/{ => 201508}/20150727 Easy Backup Restore and Migrate Containers in Docker.md (100%) rename published/{ => 201508}/20150728 How To Fix--There is no command installed for 7-zip archive files.md (100%) rename published/{ => 201508}/20150728 How to Update Linux Kernel for Improved System Performance.md (100%) rename published/{ => 201508}/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md (100%) rename published/{ => 201508}/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md (100%) rename published/{ => 201508}/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md (100%) rename published/{ => 201508}/20150730 Compare PDF Files on Ubuntu.md (100%) rename published/{ => 201508}/20150730 Must-Know Linux Commands For New Users.md (100%) rename published/{ => 201508}/20150803 Handy commands for profiling your Unix file systems.md (100%) rename published/{ => 201508}/20150803 Linux Logging Basics.md (100%) rename published/{ => 201508}/20150803 Troubleshooting with Linux Logs.md (100%) rename published/{ => 201508}/20150806 5 Reasons Why Software Developer is a Great Career Choice.md (100%) rename published/{ => 201508}/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md (100%) rename published/{ => 201508}/20150806 Linux FAQs with Answers--How to install git on Linux.md (100%) rename published/{ => 201508}/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md (100%) rename published/{ => 201508}/20150810 For Linux, Supercomputers R Us.md (100%) rename published/{ => 201508}/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md (100%) rename published/{ => 201508}/20150811 How to download apk files from Google Play Store on Linux.md (100%) rename published/{ => 201508}/20150813 How to Install Logwatch on Ubuntu 15.04.md (100%) rename published/{ => 201508}/20150813 How to get Public IP from Linux Terminal.md (100%) rename published/{ => 201508}/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md (100%) rename published/{ => 201508}/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md (100%) rename published/{ => 201508}/20150816 shellinabox--A Web based AJAX Terminal Emulator.md (100%) rename published/{ => 201508}/20150817 Top 5 Torrent Clients For Ubuntu Linux.md (100%) rename published/{ => 201508}/20150818 How to monitor stock quotes from the command line on Linux.md (100%) rename published/{ => 201508}/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md (100%) rename published/{ => 201508}/20150818 ​Ubuntu Linux is coming to IBM mainframes.md (100%) rename published/{ => 201508}/20150821 How to Install Visual Studio Code in Linux.md (100%) rename published/{ => 201508}/20150821 Linux FAQs with Answers--How to check MariaDB server version.md (100%) rename published/{ => 201508}/20150826 How to Run Kali Linux 2.0 In Docker Container.md (100%) rename published/{ => 201508}/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md (100%) rename published/{ => 201508}/20150827 Linux or UNIX--Bash Read a File Line By Line.md (100%) rename published/{ => 201508}/Linux and Unix Test Disk IO Performance With dd Command.md (100%) rename published/{ => 201508}/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md (100%) rename published/{ => 201508}/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md (100%) rename published/{ => 201508}/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md (100%) rename published/{ => 201508}/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md (100%) rename published/{ => 201508}/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md (100%) rename published/{ => 201508}/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md (100%) rename published/{ => 201508}/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md (100%) rename published/{ => 201508}/kde-plasma-5.4.md (100%) diff --git a/published/20141211 Open source all over the world.md b/published/201508/20141211 Open source all over the world.md similarity index 100% rename from published/20141211 Open source all over the world.md rename to published/201508/20141211 Open source all over the world.md diff --git a/published/20150128 7 communities driving open source development.md b/published/201508/20150128 7 communities driving open source development.md similarity index 100% rename from published/20150128 7 communities driving open source development.md rename to published/201508/20150128 7 communities driving open source development.md diff --git a/published/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md b/published/201508/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md similarity index 100% rename from published/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md rename to published/201508/20150205 Install Strongswan - A Tool to Setup IPsec Based VPN in Linux.md diff --git a/published/20150209 Install OpenQRM Cloud Computing Platform In Debian.md b/published/201508/20150209 Install OpenQRM Cloud Computing Platform In Debian.md similarity index 100% rename from published/20150209 Install OpenQRM Cloud Computing Platform In Debian.md rename to published/201508/20150209 Install OpenQRM Cloud Computing Platform In Debian.md diff --git a/published/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md b/published/201508/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md similarity index 100% rename from published/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md rename to published/201508/20150318 How to Manage and Use LVM (Logical Volume Management) in Ubuntu.md diff --git a/published/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md b/published/201508/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md similarity index 100% rename from published/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md rename to published/201508/20150318 How to Use LVM on Ubuntu for Easy Partition Resizing and Snapshots.md diff --git a/published/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md b/published/201508/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md similarity index 100% rename from published/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md rename to published/201508/20150410 How to run Ubuntu Snappy Core on Raspberry Pi 2.md diff --git a/published/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md b/published/201508/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md similarity index 100% rename from published/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md rename to published/201508/20150504 How to access a Linux server behind NAT via reverse SSH tunnel.md diff --git a/published/20150518 How to set up a Replica Set on MongoDB.md b/published/201508/20150518 How to set up a Replica Set on MongoDB.md similarity index 100% rename from published/20150518 How to set up a Replica Set on MongoDB.md rename to published/201508/20150518 How to set up a Replica Set on MongoDB.md diff --git a/published/20150522 Analyzing Linux Logs.md b/published/201508/20150522 Analyzing Linux Logs.md similarity index 100% rename from published/20150522 Analyzing Linux Logs.md rename to published/201508/20150522 Analyzing Linux Logs.md diff --git a/published/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md b/published/201508/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md similarity index 100% rename from published/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md rename to published/201508/20150527 Howto Manage Host Using Docker Machine in a VirtualBox.md diff --git a/published/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md b/published/201508/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md similarity index 100% rename from published/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md rename to published/201508/20150602 Howto Configure OpenVPN Server-Client on Ubuntu 15.04.md diff --git a/published/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md b/published/201508/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md similarity index 100% rename from published/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md rename to published/201508/20150604 Nishita Agarwal Shares Her Interview Experience on Linux 'iptables' Firewall.md diff --git a/published/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md b/published/201508/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md similarity index 100% rename from published/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md rename to published/201508/20150610 Tickr Is An Open-Source RSS News Ticker for Linux Desktops.md diff --git a/published/20150625 How to Provision Swarm Clusters using Docker Machine.md b/published/201508/20150625 How to Provision Swarm Clusters using Docker Machine.md similarity index 100% rename from published/20150625 How to Provision Swarm Clusters using Docker Machine.md rename to published/201508/20150625 How to Provision Swarm Clusters using Docker Machine.md diff --git a/published/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md b/published/201508/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md similarity index 100% rename from published/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md rename to published/201508/20150629 Autojump--An Advanced 'cd' Command to Quickly Navigate Linux Filesystem.md diff --git a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md b/published/201508/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md similarity index 100% rename from published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md rename to published/201508/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 1 - Introduction.md diff --git a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md b/published/201508/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md similarity index 100% rename from published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md rename to published/201508/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 2 - The GNOME Desktop.md diff --git a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md b/published/201508/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md similarity index 100% rename from published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md rename to published/201508/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 3 - GNOME Applications.md diff --git a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md b/published/201508/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md similarity index 100% rename from published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md rename to published/201508/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 4 - GNOME Settings.md diff --git a/published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md b/published/201508/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md similarity index 100% rename from published/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md rename to published/201508/20150716 A Week With GNOME As My Linux Desktop--What They Get Right & Wrong - Page 5 - Conclusion.md diff --git a/published/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md b/published/201508/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md similarity index 100% rename from published/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md rename to published/201508/20150717 How to Configure Chef (server or client) on Ubuntu 14.04 or 15.04.md diff --git a/published/20150717 How to collect NGINX metrics - Part 2.md b/published/201508/20150717 How to collect NGINX metrics - Part 2.md similarity index 100% rename from published/20150717 How to collect NGINX metrics - Part 2.md rename to published/201508/20150717 How to collect NGINX metrics - Part 2.md diff --git a/published/20150717 How to monitor NGINX with Datadog - Part 3.md b/published/201508/20150717 How to monitor NGINX with Datadog - Part 3.md similarity index 100% rename from published/20150717 How to monitor NGINX with Datadog - Part 3.md rename to published/201508/20150717 How to monitor NGINX with Datadog - Part 3.md diff --git a/published/20150717 How to monitor NGINX- Part 1.md b/published/201508/20150717 How to monitor NGINX- Part 1.md similarity index 100% rename from published/20150717 How to monitor NGINX- Part 1.md rename to published/201508/20150717 How to monitor NGINX- Part 1.md diff --git a/published/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md b/published/201508/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md similarity index 100% rename from published/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md rename to published/201508/20150717 Howto Configure FTP Server with Proftpd on Fedora 22.md diff --git a/published/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md b/published/201508/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md similarity index 100% rename from published/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md rename to published/201508/20150722 How To Fix 'The Update Information Is Outdated' In Ubuntu 14.04.md diff --git a/published/20150722 How To Manage StartUp Applications In Ubuntu.md b/published/201508/20150722 How To Manage StartUp Applications In Ubuntu.md similarity index 100% rename from published/20150722 How To Manage StartUp Applications In Ubuntu.md rename to published/201508/20150722 How To Manage StartUp Applications In Ubuntu.md diff --git a/published/20150727 Easy Backup Restore and Migrate Containers in Docker.md b/published/201508/20150727 Easy Backup Restore and Migrate Containers in Docker.md similarity index 100% rename from published/20150727 Easy Backup Restore and Migrate Containers in Docker.md rename to published/201508/20150727 Easy Backup Restore and Migrate Containers in Docker.md diff --git a/published/20150728 How To Fix--There is no command installed for 7-zip archive files.md b/published/201508/20150728 How To Fix--There is no command installed for 7-zip archive files.md similarity index 100% rename from published/20150728 How To Fix--There is no command installed for 7-zip archive files.md rename to published/201508/20150728 How To Fix--There is no command installed for 7-zip archive files.md diff --git a/published/20150728 How to Update Linux Kernel for Improved System Performance.md b/published/201508/20150728 How to Update Linux Kernel for Improved System Performance.md similarity index 100% rename from published/20150728 How to Update Linux Kernel for Improved System Performance.md rename to published/201508/20150728 How to Update Linux Kernel for Improved System Performance.md diff --git a/published/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md b/published/201508/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md similarity index 100% rename from published/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md rename to published/201508/20150728 Tips to Create ISO from CD, Watch User Activity and Check Memory Usages of Browser.md diff --git a/published/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md b/published/201508/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md similarity index 100% rename from published/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md rename to published/201508/20150728 Understanding Shell Commands Easily Using 'Explain Shell' Script in Linux.md diff --git a/published/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md b/published/201508/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md similarity index 100% rename from published/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md rename to published/201508/20150729 What is Logical Volume Management and How Do You Enable It in Ubuntu.md diff --git a/published/20150730 Compare PDF Files on Ubuntu.md b/published/201508/20150730 Compare PDF Files on Ubuntu.md similarity index 100% rename from published/20150730 Compare PDF Files on Ubuntu.md rename to published/201508/20150730 Compare PDF Files on Ubuntu.md diff --git a/published/20150730 Must-Know Linux Commands For New Users.md b/published/201508/20150730 Must-Know Linux Commands For New Users.md similarity index 100% rename from published/20150730 Must-Know Linux Commands For New Users.md rename to published/201508/20150730 Must-Know Linux Commands For New Users.md diff --git a/published/20150803 Handy commands for profiling your Unix file systems.md b/published/201508/20150803 Handy commands for profiling your Unix file systems.md similarity index 100% rename from published/20150803 Handy commands for profiling your Unix file systems.md rename to published/201508/20150803 Handy commands for profiling your Unix file systems.md diff --git a/published/20150803 Linux Logging Basics.md b/published/201508/20150803 Linux Logging Basics.md similarity index 100% rename from published/20150803 Linux Logging Basics.md rename to published/201508/20150803 Linux Logging Basics.md diff --git a/published/20150803 Troubleshooting with Linux Logs.md b/published/201508/20150803 Troubleshooting with Linux Logs.md similarity index 100% rename from published/20150803 Troubleshooting with Linux Logs.md rename to published/201508/20150803 Troubleshooting with Linux Logs.md diff --git a/published/20150806 5 Reasons Why Software Developer is a Great Career Choice.md b/published/201508/20150806 5 Reasons Why Software Developer is a Great Career Choice.md similarity index 100% rename from published/20150806 5 Reasons Why Software Developer is a Great Career Choice.md rename to published/201508/20150806 5 Reasons Why Software Developer is a Great Career Choice.md diff --git a/published/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md b/published/201508/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md similarity index 100% rename from published/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md rename to published/201508/20150806 Linux FAQs with Answers--How to fix 'ImportError--No module named wxversion' on Linux.md diff --git a/published/20150806 Linux FAQs with Answers--How to install git on Linux.md b/published/201508/20150806 Linux FAQs with Answers--How to install git on Linux.md similarity index 100% rename from published/20150806 Linux FAQs with Answers--How to install git on Linux.md rename to published/201508/20150806 Linux FAQs with Answers--How to install git on Linux.md diff --git a/published/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md b/published/201508/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md similarity index 100% rename from published/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md rename to published/201508/20150807 How To--Temporarily Clear Bash Environment Variables on a Linux and Unix-like System.md diff --git a/published/20150810 For Linux, Supercomputers R Us.md b/published/201508/20150810 For Linux, Supercomputers R Us.md similarity index 100% rename from published/20150810 For Linux, Supercomputers R Us.md rename to published/201508/20150810 For Linux, Supercomputers R Us.md diff --git a/published/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md b/published/201508/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md similarity index 100% rename from published/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md rename to published/201508/20150811 Darkstat is a Web Based Network Traffic Analyzer--Install it on Linux.md diff --git a/published/20150811 How to download apk files from Google Play Store on Linux.md b/published/201508/20150811 How to download apk files from Google Play Store on Linux.md similarity index 100% rename from published/20150811 How to download apk files from Google Play Store on Linux.md rename to published/201508/20150811 How to download apk files from Google Play Store on Linux.md diff --git a/published/20150813 How to Install Logwatch on Ubuntu 15.04.md b/published/201508/20150813 How to Install Logwatch on Ubuntu 15.04.md similarity index 100% rename from published/20150813 How to Install Logwatch on Ubuntu 15.04.md rename to published/201508/20150813 How to Install Logwatch on Ubuntu 15.04.md diff --git a/published/20150813 How to get Public IP from Linux Terminal.md b/published/201508/20150813 How to get Public IP from Linux Terminal.md similarity index 100% rename from published/20150813 How to get Public IP from Linux Terminal.md rename to published/201508/20150813 How to get Public IP from Linux Terminal.md diff --git a/published/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md b/published/201508/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md similarity index 100% rename from published/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md rename to published/201508/20150813 Ubuntu Want To Make It Easier For You To Install The Latest Nvidia Linux Driver.md diff --git a/published/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md b/published/201508/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md similarity index 100% rename from published/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md rename to published/201508/20150816 Ubuntu NVIDIA Graphics Drivers PPA Is Ready For Action.md diff --git a/published/20150816 shellinabox--A Web based AJAX Terminal Emulator.md b/published/201508/20150816 shellinabox--A Web based AJAX Terminal Emulator.md similarity index 100% rename from published/20150816 shellinabox--A Web based AJAX Terminal Emulator.md rename to published/201508/20150816 shellinabox--A Web based AJAX Terminal Emulator.md diff --git a/published/20150817 Top 5 Torrent Clients For Ubuntu Linux.md b/published/201508/20150817 Top 5 Torrent Clients For Ubuntu Linux.md similarity index 100% rename from published/20150817 Top 5 Torrent Clients For Ubuntu Linux.md rename to published/201508/20150817 Top 5 Torrent Clients For Ubuntu Linux.md diff --git a/published/20150818 How to monitor stock quotes from the command line on Linux.md b/published/201508/20150818 How to monitor stock quotes from the command line on Linux.md similarity index 100% rename from published/20150818 How to monitor stock quotes from the command line on Linux.md rename to published/201508/20150818 How to monitor stock quotes from the command line on Linux.md diff --git a/published/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md b/published/201508/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md similarity index 100% rename from published/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md rename to published/201508/20150818 Linux Without Limits--IBM Launch LinuxONE Mainframes.md diff --git a/published/20150818 ​Ubuntu Linux is coming to IBM mainframes.md b/published/201508/20150818 ​Ubuntu Linux is coming to IBM mainframes.md similarity index 100% rename from published/20150818 ​Ubuntu Linux is coming to IBM mainframes.md rename to published/201508/20150818 ​Ubuntu Linux is coming to IBM mainframes.md diff --git a/published/20150821 How to Install Visual Studio Code in Linux.md b/published/201508/20150821 How to Install Visual Studio Code in Linux.md similarity index 100% rename from published/20150821 How to Install Visual Studio Code in Linux.md rename to published/201508/20150821 How to Install Visual Studio Code in Linux.md diff --git a/published/20150821 Linux FAQs with Answers--How to check MariaDB server version.md b/published/201508/20150821 Linux FAQs with Answers--How to check MariaDB server version.md similarity index 100% rename from published/20150821 Linux FAQs with Answers--How to check MariaDB server version.md rename to published/201508/20150821 Linux FAQs with Answers--How to check MariaDB server version.md diff --git a/published/20150826 How to Run Kali Linux 2.0 In Docker Container.md b/published/201508/20150826 How to Run Kali Linux 2.0 In Docker Container.md similarity index 100% rename from published/20150826 How to Run Kali Linux 2.0 In Docker Container.md rename to published/201508/20150826 How to Run Kali Linux 2.0 In Docker Container.md diff --git a/published/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md b/published/201508/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md similarity index 100% rename from published/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md rename to published/201508/20150827 How to Convert From RPM to DEB and DEB to RPM Package Using Alien.md diff --git a/published/20150827 Linux or UNIX--Bash Read a File Line By Line.md b/published/201508/20150827 Linux or UNIX--Bash Read a File Line By Line.md similarity index 100% rename from published/20150827 Linux or UNIX--Bash Read a File Line By Line.md rename to published/201508/20150827 Linux or UNIX--Bash Read a File Line By Line.md diff --git a/published/Linux and Unix Test Disk IO Performance With dd Command.md b/published/201508/Linux and Unix Test Disk IO Performance With dd Command.md similarity index 100% rename from published/Linux and Unix Test Disk IO Performance With dd Command.md rename to published/201508/Linux and Unix Test Disk IO Performance With dd Command.md diff --git a/published/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md b/published/201508/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md similarity index 100% rename from published/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md rename to published/201508/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md diff --git a/published/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md b/published/201508/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md similarity index 100% rename from published/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md rename to published/201508/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md diff --git a/published/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md b/published/201508/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md similarity index 100% rename from published/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md rename to published/201508/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md diff --git a/published/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md b/published/201508/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md similarity index 100% rename from published/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md rename to published/201508/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md diff --git a/published/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md b/published/201508/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md similarity index 100% rename from published/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md rename to published/201508/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md diff --git a/published/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md b/published/201508/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md similarity index 100% rename from published/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md rename to published/201508/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md diff --git a/published/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md b/published/201508/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md similarity index 100% rename from published/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md rename to published/201508/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md diff --git a/published/kde-plasma-5.4.md b/published/201508/kde-plasma-5.4.md similarity index 100% rename from published/kde-plasma-5.4.md rename to published/201508/kde-plasma-5.4.md From c19a8f948cd35070c325abafe1d36bcc40c8f5c7 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 1 Sep 2015 11:17:39 +0800 Subject: [PATCH 1947/2517] PUB:20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux @GOLinux --- ...ind and Delete Duplicate Files in Linux.md | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) rename {translated/tech => published}/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md (80%) diff --git a/translated/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md b/published/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md similarity index 80% rename from translated/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md rename to published/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md index 09f10fb546..76a06ea37c 100644 --- a/translated/tech/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md +++ b/published/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md @@ -1,16 +1,16 @@ -fdupes——Linux中查找并删除重复文件的命令行工具 +fdupes:Linux中查找并删除重复文件的命令行工具 ================================================================================ -对于大多数计算机用户而言,查找并替换重复的文件是一个常见的需求。查找并移除重复文件真是一项领人不胜其烦的工作,它耗时又耗力。如果你的机器上跑着GNU/Linux,那么查找重复文件会变得十分简单,这多亏了`**fdupes**`工具。 +对于大多数计算机用户而言,查找并替换重复的文件是一个常见的需求。查找并移除重复文件真是一项令人不胜其烦的工作,它耗时又耗力。但如果你的机器上跑着GNU/Linux,那么查找重复文件会变得十分简单,这多亏了`fdupes`工具。 ![Find and Delete Duplicate Files in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/find-and-delete-duplicate-files-in-linux.png) -Fdupes——在Linux中查找并删除重复文件 +*fdupes——在Linux中查找并删除重复文件* ### fdupes是啥东东? ### -**Fdupes**是Linux下的一个工具,它由**Adrian Lopez**用C编程语言编写并基于MIT许可证发行,该应用程序可以在指定的目录及子目录中查找重复的文件。Fdupes通过对比文件的MD5签名,以及逐字节比较文件来识别重复内容,可以为Fdupes指定大量的选项以实现对文件的列出、删除、替换到文件副本的硬链接等操作。 +**fdupes**是Linux下的一个工具,它由**Adrian Lopez**用C编程语言编写并基于MIT许可证发行,该应用程序可以在指定的目录及子目录中查找重复的文件。fdupes通过对比文件的MD5签名,以及逐字节比较文件来识别重复内容,fdupes有各种选项,可以实现对文件的列出、删除、替换为文件副本的硬链接等操作。 -对比以下列顺序开始: +文件对比以下列顺序开始: **大小对比 > 部分 MD5 签名对比 > 完整 MD5 签名对比 > 逐字节对比** @@ -27,8 +27,9 @@ Fdupes——在Linux中查找并删除重复文件 **注意**:自Fedora 22之后,默认的包管理器yum被dnf取代了。 -### fdupes命令咋个搞? ### -1.作为演示的目的,让我们来在某个目录(比如 tecmint)下创建一些重复文件,命令如下: +### fdupes命令如何使用 ### + +1、 作为演示的目的,让我们来在某个目录(比如 tecmint)下创建一些重复文件,命令如下: $ mkdir /home/"$USER"/Desktop/tecmint && cd /home/"$USER"/Desktop/tecmint && for i in {1..15}; do echo "I Love Tecmint. Tecmint is a very nice community of Linux Users." > tecmint${i}.txt ; done @@ -57,7 +58,7 @@ Fdupes——在Linux中查找并删除重复文件 "I Love Tecmint. Tecmint is a very nice community of Linux Users." -2.现在在**tecmint**文件夹内搜索重复的文件。 +2、 现在在**tecmint**文件夹内搜索重复的文件。 $ fdupes /home/$USER/Desktop/tecmint @@ -77,7 +78,7 @@ Fdupes——在Linux中查找并删除重复文件 /home/tecmint/Desktop/tecmint/tecmint15.txt /home/tecmint/Desktop/tecmint/tecmint12.txt -3.使用**-r**选项在每个目录包括其子目录中递归搜索重复文件。 +3、 使用**-r**选项在每个目录包括其子目录中递归搜索重复文件。 它会递归搜索所有文件和文件夹,花一点时间来扫描重复文件,时间的长短取决于文件和文件夹的数量。在此其间,终端中会显示全部过程,像下面这样。 @@ -85,7 +86,7 @@ Fdupes——在Linux中查找并删除重复文件 Progress [37780/54747] 69% -4.使用**-S**选项来查看某个文件夹内找到的重复文件的大小。 +4、 使用**-S**选项来查看某个文件夹内找到的重复文件的大小。 $ fdupes -S /home/$USER/Desktop/tecmint @@ -106,7 +107,7 @@ Fdupes——在Linux中查找并删除重复文件 /home/tecmint/Desktop/tecmint/tecmint15.txt /home/tecmint/Desktop/tecmint/tecmint12.txt -5.你可以同时使用**-S**和**-r**选项来查看所有涉及到的目录和子目录中的重复文件的大小,如下: +5、 你可以同时使用**-S**和**-r**选项来查看所有涉及到的目录和子目录中的重复文件的大小,如下: $ fdupes -Sr /home/avi/Desktop/ @@ -131,11 +132,11 @@ Fdupes——在Linux中查找并删除重复文件 /home/tecmint/Desktop/resume_files/r-csc.html /home/tecmint/Desktop/resume_files/fc.html -6.不同于在一个或所有文件夹内递归搜索,你可以选择按要求有选择性地在两个或三个文件夹内进行搜索。不必再提醒你了吧,如有需要,你可以使用**-S**和/或**-r**选项。 +6、 不同于在一个或所有文件夹内递归搜索,你可以选择按要求有选择性地在两个或三个文件夹内进行搜索。不必再提醒你了吧,如有需要,你可以使用**-S**和/或**-r**选项。 $ fdupes /home/avi/Desktop/ /home/avi/Templates/ -7.要删除重复文件,同时保留一个副本,你可以使用`**-d**`选项。使用该选项,你必须额外小心,否则最终结果可能会是文件/数据的丢失。郑重提醒,此操作不可恢复。 +7、 要删除重复文件,同时保留一个副本,你可以使用`-d`选项。使用该选项,你必须额外小心,否则最终结果可能会是文件/数据的丢失。郑重提醒,此操作不可恢复。 $ fdupes -d /home/$USER/Desktop/tecmint @@ -177,13 +178,13 @@ Fdupes——在Linux中查找并删除重复文件 [-] /home/tecmint/Desktop/tecmint/tecmint15.txt [-] /home/tecmint/Desktop/tecmint/tecmint12.txt -8.从安全角度出发,你可能想要打印`**fdupes**`的输出结果到文件中,然后检查文本文件来决定要删除什么文件。这可以降低意外删除文件的风险。你可以这么做: +8、 从安全角度出发,你可能想要打印`fdupes`的输出结果到文件中,然后检查文本文件来决定要删除什么文件。这可以降低意外删除文件的风险。你可以这么做: $ fdupes -Sr /home > /home/fdupes.txt -**注意**:你可以替换`**/home**`为你想要的文件夹。同时,如果你想要递归搜索并打印大小,可以使用`**-r**`和`**-S**`选项。 +**注意**:你应该替换`/home`为你想要的文件夹。同时,如果你想要递归搜索并打印大小,可以使用`-r`和`-S`选项。 -9.你可以使用`**-f**`选项来忽略每个匹配集中的首个文件。 +9、 你可以使用`-f`选项来忽略每个匹配集中的首个文件。 首先列出该目录中的文件。 @@ -205,13 +206,13 @@ Fdupes——在Linux中查找并删除重复文件 /home/tecmint/Desktop/tecmint9 (another copy).txt /home/tecmint/Desktop/tecmint9 (4th copy).txt -10.检查已安装的fdupes版本。 +10、 检查已安装的fdupes版本。 $ fdupes --version fdupes 1.51 -11.如果你需要关于fdupes的帮助,可以使用`**-h**`开关。 +11、 如果你需要关于fdupes的帮助,可以使用`-h`开关。 $ fdupes -h @@ -245,7 +246,7 @@ Fdupes——在Linux中查找并删除重复文件 -v --version display fdupes version -h --help display this help message -到此为止了。让我知道你到现在为止你是怎么在Linux中查找并删除重复文件的?同时,也让我知道你关于这个工具的看法。在下面的评论部分中提供你有价值的反馈吧,别忘了为我们点赞并分享,帮助我们扩散哦。 +到此为止了。让我知道你以前怎么在Linux中查找并删除重复文件的吧?同时,也让我知道你关于这个工具的看法。在下面的评论部分中提供你有价值的反馈吧,别忘了为我们点赞并分享,帮助我们扩散哦。 我正在使用另外一个移除重复文件的工具,它叫**fslint**。很快就会把使用心得分享给大家哦,你们一定会喜欢看的。 @@ -254,10 +255,10 @@ Fdupes——在Linux中查找并删除重复文件 via: http://www.tecmint.com/fdupes-find-and-delete-duplicate-files-in-linux/ 作者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ -[2]:http://www.tecmint.com/15-basic-ls-command-examples-in-linux/ +[1]:https://linux.cn/article-2324-1.html +[2]:https://linux.cn/article-5109-1.html From 93520ea5154d8ec595cd582dc12c75abcea35a7d Mon Sep 17 00:00:00 2001 From: Yu Ye Date: Tue, 1 Sep 2015 11:21:40 +0800 Subject: [PATCH 1948/2517] Update 20150826 Five Super Cool Open Source Games.md --- sources/share/20150826 Five Super Cool Open Source Games.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150826 Five Super Cool Open Source Games.md b/sources/share/20150826 Five Super Cool Open Source Games.md index 0b92dcedff..0d3d3c8bfd 100644 --- a/sources/share/20150826 Five Super Cool Open Source Games.md +++ b/sources/share/20150826 Five Super Cool Open Source Games.md @@ -1,3 +1,4 @@ +Translating by H-mudcup Five Super Cool Open Source Games ================================================================================ In 2014 and 2015, Linux became home to a list of popular commercial titles such as the popular Borderlands, Witcher, Dead Island, and Counter Strike series of games. While this is exciting news, what of the gamer on a budget? Commercial titles are good, but even better are free-to-play alternatives made by developers who know what players like. @@ -62,4 +63,4 @@ via: http://fossforce.com/2015/08/five-super-cool-open-source-games/ [6]:http://mars-game.sourceforge.net/ [7]:http://valyriatear.blogspot.com/ [8]:https://www.youtube.com/channel/UCQ5KrSk9EqcT_JixWY2RyMA -[9]:http://supertuxkart.sourceforge.net/ \ No newline at end of file +[9]:http://supertuxkart.sourceforge.net/ From 1ba1a83818f600ef041c21b1c0506146bad8a67b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 1 Sep 2015 15:21:03 +0800 Subject: [PATCH 1949/2517] =?UTF-8?q?20150901-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... open source board games to play online.md | 194 ++++++++++++++++++ ... automatically dim your screen on Linux.md | 52 +++++ 2 files changed, 246 insertions(+) create mode 100644 sources/share/20150901 5 best open source board games to play online.md create mode 100644 sources/tech/20150901 How to automatically dim your screen on Linux.md diff --git a/sources/share/20150901 5 best open source board games to play online.md b/sources/share/20150901 5 best open source board games to play online.md new file mode 100644 index 0000000000..505ca76f10 --- /dev/null +++ b/sources/share/20150901 5 best open source board games to play online.md @@ -0,0 +1,194 @@ +5 best open source board games to play online +================================================================================ +I have always had a fascination with board games, in part because they are a device of social interaction, they challenge the mind and, most importantly, they are great fun to play. In my misspent youth, myself and a group of friends gathered together to escape the horrors of the classroom, and indulge in a little escapism. The time provided an outlet for tension and rivalry. Board games help teach diplomacy, how to make and break alliances, bring families and friends together, and learn valuable lessons. + +I had a panache for abstract strategy games such as chess and draughts, as well as word games. I can still never resist a game of Escape from Colditz, a strategy card and dice-based board game, or Risk; two timeless multi-player strategy board games. But Catan remains my favourite board game. + +Board games have seen a resurgence in recent years, and Linux has a good range of board games to choose from. There is a credible implementation of Catan called Pioneers. But for my favourite implementations of classic board games to play online, check out the recommendations below. + +---------- + +### TripleA ### + +![TripleA in action](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-TripleA.png) + +TripleA is an open source online turn based strategy game. It allows people to implement and play various strategy board games (ie. Axis & Allies). The TripleA engine has full networking support for online play, support for sounds, XML support for game files, and has its own imaging subsystem that allows for customized user editable maps to be used. TripleA is versatile, scalable and robust. + +TripleA started out as a World War II simulation, but now includes different conflicts, as well as variations and mods of popular games and maps. TripleA comes with multiple games and over 100 more games can be downloaded from the user community. + +Features include: + +- Good interface and attractive graphics +- Optional scenarios +- Multiplayer games +- TripleA comes with the following supported games that uses its game engine (just to name a few): + - Axis & Allies : Classic edition (2nd, 3rd with options enabled) + - Axis & Allies : Revised Edition + - Pact of Steel A&A Variant + - Big World 1942 A&A Variant + - Four if by Sea + - Battle Ship Row + - Capture The Flag + - Minimap +- Hot-seat +- Play By EMail mode allows persons to play a game via EMail without having to be connected to each other online + - More time to think out moves + - Only need to come online to send your turn to the next player + - Dice rolls are done by a dedicated dice server that is independent of TripleA + - All dice rolls are PGP Verified and email to every player + - Every move and every dice roll is logged and saved in TripleA's History Window + - An online game can be later continued under PBEM mode + - Hard for others to cheat +- Hosted online lobby +- Utilities for editing maps +- Website: [triplea.sourceforge.net][1] +- Developer: Sean Bridges (original developer), Mark Christopher Duncan +- License: GNU GPL v2 +- Version Number: 1.8.0.7 + +---------- + +### Domination ### + +![Domination in action](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Domination.png) + +Domination is an open source game that shares common themes with the hugely popular Risk board game. It has many game options and includes many maps. + +In the classic “World Domination” game of military strategy, you are battling to conquer the world. To win, you must launch daring attacks, defend yourself to all fronts, and sweep across vast continents with boldness and cunning. But remember, the dangers, as well as the rewards, are high. Just when the world is within your grasp, your opponent might strike and take it all away! + +Features include: + +- Simple to learn + - Domination - you must occupy all countries on the map, and thereby eliminate all opponents. These can be long, drawn out games + - Capital - each player has a country they have selected as a Capital. To win the game, you must occupy all Capitals + - Mission - each player draws a random mission. The first to complete their mission wins. Missions may include the elimination of a certain colour, occupation of a particular continent, or a mix of both +- Map editor +- Simple map format +- Multiplayer network play +- Single player +- Hotseat +- 5 user interfaces +- Game types: +- Play online +- Website: [domination.sourceforge.net][2] +- Developer: Yura Mamyrin, Christian Weiske, Mike Chaten, and many others +- License: GNU GPL v3 +- Version Number: 1.1.1.5 + +---------- + +### PyChess ### + +![Micro-Max in action](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-Pychess.jpg) + +PyChess is a Gnome inspired chess client written in Python. + +The goal of PyChess, is to provide a fully featured, nice looking, easy to use chess client for the gnome-desktop. + +The client should be usable both to those totally new to chess, those who want to play an occasional game, and those who wants to use the computer to further enhance their play. + +Features include: + +- Attractive interface +- Chess Engine Communication Protocol (CECP) and Univeral Chess Interface (UCI) Engine support +- Free online play on the Free Internet Chess Server (FICS) +- Read and writes PGN, EPD and FEN chess file formats +- Built-in Python based engine +- Undo and pause functions +- Board and piece animation +- Drag and drop +- Tabbed interface +- Hints and spyarrows +- Opening book sidepanel using sqlite +- Score plot sidepanel +- "Enter game" in pgn dialog +- Optional sounds +- Legal move highlighting +- Internationalised or figure pieces in notation +- Website: [www.pychess.org][3] +- Developer: Thomas Dybdahl Ahle +- License: GNU GPL v2 +- Version Number: 0.12 Anderssen rc4 + +---------- + +### Scrabble ### + +![Scrabble in action](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Scrabble3D.png) + +Scrabble3D is a highly customizable Scrabble game that not only supports Classic Scrabble and Superscrabble but also 3D games and own boards. You can play local against the computer or connect to a game server to find other players. + +Scrabble is a board game with the goal to place letters crossword like. Up to four players take part and get a limited amount of letters (usually 7 or 8). Consecutively, each player tries to compose his letters to one or more word combining with the placed words on the game array. The value of the move depends on the letters (rare letter get more points) and bonus fields which multiply the value of a letter or the whole word. The player with most points win. + +This idea is extended with Scrabble3D to the third dimension. Of course, a classic game with 15x15 fields or Superscrabble with 21x21 fields can be played and you may configure any field setting by yourself. The game can be played by the provided freeware program against Computer, other local players or via internet. Last but not least it's possible to connect to a game server to find other players and to obtain a rating. Most options are configurable, including the number and valuation of letters, the used dictionary, the language of dialogs and certainly colors, fonts etc. + +Features include: + +- Configurable board, letterset and design +- Board in OpenGL graphics with user-definable wavefront model +- Game against computer with support of multithreading +- Post-hoc game analysis with calculation of best move by computer +- Match with other players connected on a game server +- NSA rating and highscore at game server +- Time limit of games +- Localization; use of non-standard digraphs like CH, RR, LL and right to left reading +- Multilanguage help / wiki +- Network games are buffered and asynchronous games are possible +- Running games can be kibitzed +- International rules including italian "Cambio Secco" +- Challenge mode, What-if-variant, CLABBERS, etc +- Website: [sourceforge.net/projects/scrabble][4] +- Developer: Heiko Tietze +- License: GNU GPL v3 +- Version Number: 3.1.3 + +---------- + +### Backgammon ### + +![Backgammon in action](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-gnubg.png) + +GNU Backgammon (gnubg) is a strong backgammon program (world-class with a bearoff database installed) usable either as an engine by other programs or as a standalone backgammon game. It is able to play and analyze both money games and tournament matches, evaluate and roll out positions, and more. + +In addition to supporting simple play, it also has extensive analysis features, a tutor mode, adjustable difficulty, and support for exporting annotated games. + +It currently plays at about the level of a championship flight tournament player and is gradually improving. + +gnubg can be played on numerous on-line backgammon servers, such as the First Internet Backgammon Server (FIBS). + +Features include: + +- A command line interface (with full command editing features if GNU readline is available) that lets you play matches and sessions against GNU Backgammon with a rough ASCII representation of the board on text terminals +- Support for a GTK+ interface with a graphical board window. Both 2D and 3D graphics are available +- Tournament match and money session cube handling and cubeful play +- Support for both 1-sided and 2-sided bearoff databases: 1-sided bearoff database for 15 checkers on the first 6 points and optional 2-sided database kept in memory. Optional larger 1-sided and 2-sided databases stored on disk +- Automated rollouts of positions, with lookahead and race variance reduction where appropriate. Rollouts may be extended +- Functions to generate legal moves and evaluate positions at varying search depths +- Neural net functions for giving cubeless evaluations of all other contact and race positions +- Automatic and manual annotation (analysis and commentary) of games and matches +- Record keeping of statistics of players in games and matches (both native inside GNU Backgammon and externally using relational databases and Python) +- Loading and saving analyzed games and matches as .sgf files (Smart Game Format) +- Exporting positions, games and matches to: (.eps) Encapsulated Postscript, (.gam) Jellyfish Game, (.html) HTML, (.mat) Jellyfish Match, (.pdf) PDF, (.png) Portable Network Graphics, (.pos) Jellyfish Position, (.ps) PostScript, (.sgf) Gnu Backgammon File, (.tex) LaTeX, (.txt) Plain Text, (.txt) Snowie Text +- Import of matches and positions from a number of file formats: (.bkg) Hans Berliner's BKG Format, (.gam) GammonEmpire Game, (.gam) PartyGammon Game, (.mat) Jellyfish Match, (.pos) Jellyfish Position, (.sgf) Gnu Backgammon File, (.sgg) GamesGrid Save Game, (.tmg) TrueMoneyGames, (.txt) Snowie Text +- Python Scripting +- Native language support; 10 languages complete or in progress +- Website: [www.gnubg.org][5] +- Developer: Joseph Heled, Oystein Johansen, Jonathan Kinsey, David Montgomery, Jim Segrave, Joern Thyssen, Gary Wong and contributors +- License: GPL v2 +- Version Number: 1.05.000 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150830011533893/BoardGames.html + +作者:Frazer Kline +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://triplea.sourceforge.net/ +[2]:http://domination.sourceforge.net/ +[3]:http://www.pychess.org/ +[4]:http://sourceforge.net/projects/scrabble/ +[5]:http://www.gnubg.org/ \ No newline at end of file diff --git a/sources/tech/20150901 How to automatically dim your screen on Linux.md b/sources/tech/20150901 How to automatically dim your screen on Linux.md new file mode 100644 index 0000000000..b8a9ead16b --- /dev/null +++ b/sources/tech/20150901 How to automatically dim your screen on Linux.md @@ -0,0 +1,52 @@ +How to automatically dim your screen on Linux +================================================================================ +When you start spending the majority of your time in front of a computer, natural questions start arising. Is this healthy? How can I diminish the strain on my eyes? Why is the sunlight burning me? Although active research is still going on to answer these questions, a lot of programmers have already adopted a few applications to make their daily habits a little healthier for their eyes. Among those applications, there are two which I found particularly interesting: Calise and Redshift. + +### Calise ### + +In and out of development limbo, [Calise][1] stands for "Camera Light Sensor." In other terms, it is an open source program that computes the best backlight level for your screen based on the light intensity received by your webcam. And for more precision, Calise is capable of taking in account the weather in your area based on your geographical coordinates. What I like about it is the compatibility with every desktops, even non-X ones. + +![](https://farm1.staticflickr.com/569/21016715646_6e1e95f066_o.jpg) + +It comes with a command line interface and a GUI, supports multiple user profiles, and can even export its data to CSV. After installation, you will have to calibrate it quickly before the magic happens. + +![](https://farm6.staticflickr.com/5770/21050571901_1e7b2d63ec_c.jpg) + +What is less likeable is unfortunately that if you are as paranoid as I am, you have a little piece of tape in front of your webcam, which greatly affects Calise's precision. But that aside, Calise is a great application, which deserves our attention and support. As I mentioned earlier, it has gone through some rough patches in its development schedule over the last couple of years, so I really hope that this project will continue. + +![](https://farm1.staticflickr.com/633/21032989702_9ae563db1e_o.png) + +### Redshift ### + +If you already considered decreasing the strain on your eyes caused by your screen, it is possible that you have heard of f.lux, a free proprietary software that modifies the luminosity and color scheme of your display based on the time of the day. However, if you really prefer open source software, there is an alternative: [Redshift][2]. Inspired by f.lux, Redshift also alters the color scheme and luminosity to enhance the experience of sitting in front of your screen at night. On startup, you can configure it with you geographic position as longitude and latitude, and then let it run in tray. Redshift will smoothly adjust the color scheme or your screen based on the position of the sun. At night, you will see the screen's color temperature turn towards red, making it a lot less painful for your eyes. + +![](https://farm6.staticflickr.com/5823/20420303684_2b6e917fee_b.jpg) + +Just like Calise, it proposes a command line interface as well as a GUI client. To start Redshift quickly, just use the command: + + $ redshift -l [LAT]:[LON] + +Replacing [LAT]:[LON] by your latitude and longitude. + +However, it is also possible to input your coordinates by GPS via the gpsd module. For Arch Linux users, I recommend this [wiki page][3]. + +### Conclusion ### + +To conclude, Linux users have no excuse for not taking care of their eyes. Calise and Redshift are both amazing. I really hope that their development will continue and that they get the support they deserve. Of course, there are more than just two programs out there to fulfill the purpose of protecting your eyes and staying healthy, but I feel that Calise and Redshift are a good start. + +If there is a program that you really like and that you use regularly to reduce the strain on your eyes, please let us know in the comments. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/automatically-dim-your-screen-linux.html + +作者:[Adrien Brochard][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/adrien +[1]:http://calise.sourceforge.net/ +[2]:http://jonls.dk/redshift/ +[3]:https://wiki.archlinux.org/index.php/Redshift#Automatic_location_based_on_GPS \ No newline at end of file From 61b8a08d3eb574c2e7c800889b4b038f176b41c3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 1 Sep 2015 15:38:55 +0800 Subject: [PATCH 1950/2517] =?UTF-8?q?20150901-2=20=E9=80=89=E9=A2=98=20?= =?UTF-8?q?=E4=B8=A4=E7=AF=87=E5=85=B3=E8=81=94=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...r Upgrade to Linux Kernel 4.2 in Ubuntu.md | 88 +++++++++++++++++++ ...ux Kernel in Ubuntu Easily via A Script.md | 79 +++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md create mode 100644 sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md diff --git a/sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md b/sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md new file mode 100644 index 0000000000..0a18e76db1 --- /dev/null +++ b/sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md @@ -0,0 +1,88 @@ +How to Install / Upgrade to Linux Kernel 4.2 in Ubuntu +================================================================================ +![](http://ubuntuhandbook.org/wp-content/uploads/2014/12/linux-kernel-icon-tux.png) + +Linux Kernel 4.2 was released yesterday, at noon. Linus Torvalds wrote on [lkml.org][1]: + +> So judging by how little happened this week, it wouldn’t have been a mistake to release 4.2 last week after all, but hey, there’s certainly a few fixes here, and it’s not like delaying 4.2 for a week should have caused any problems either. +> +> So here it is, and the merge window for 4.3 is now open. I already have a few pending early pull requests, but as usual I’ll start processing them tomorrow and give the release some time to actually sit. +> +> The shortlog from rc8 is tiny, and appended. The patch is pretty tiny too… + +### What’s New in Kernel 4.2: ### + +- rewrites of Intel Assembly x86 code +- support for new ARM boards and SoCs +- F2FS per-file encryption +- The AMDGPU kernel DRM driver +- VCE1 video encode support for the Radeon DRM driver +- Initial support for Intel Broxton Atom SoCs +- Support for ARCv2 and HS38 CPU cores. +- added queue spinlocks support +- many other improvements and updated drivers. + +### How to Install Kernel 4.2 in Ubuntu: ### + +The binary packages of this kernel release are available for download at link below: + +- [Download Kernel 4.2 (.DEB)][1] + +First check out your OS type, 32-bit (i386) or 64-bit (amd64), then download and install the packages below in turn: + +1. linux-headers-4.2.0-xxx_all.deb +1. linux-headers-4.2.0-xxx-generic_xxx_i386/amd64.deb +1. linux-image-4.2.0-xxx-generic_xxx_i386/amd64.deb + +After installing the kernel, you may run `sudo update-grub` command in terminal (Ctrl+Alt+T) to refresh grub boot-loader. + +If you need a low latency system (e.g. for recording audio) then download & install below packages instead: + +1. linux-headers-4.2.0_xxx_all.deb +1. linux-headers-4.2.0-xxx-lowlatency_xxx_i386/amd64.deb +1. linux-image-4.2.0-xxx-lowlatency_xxx_i386/amd64.deb + +For Ubuntu Server without a graphical UI, you may run below commands one by one to grab packages via wget and install them via dpkg: + +For 64-bit system run: + + cd /tmp/ + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200_4.2.0-040200.201508301530_all.deb + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200-generic_4.2.0-040200.201508301530_amd64.deb + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-image-4.2.0-040200-generic_4.2.0-040200.201508301530_amd64.deb + + sudo dpkg -i linux-headers-4.2.0-*.deb linux-image-4.2.0-*.deb + +For 32-bit system, run: + + cd /tmp/ + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200_4.2.0-040200.201508301530_all.deb + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200-generic_4.2.0-040200.201508301530_i386.deb + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-image-4.2.0-040200-generic_4.2.0-040200.201508301530_i386.deb + + sudo dpkg -i linux-headers-4.2.0-*.deb linux-image-4.2.0-*.deb + +Finally restart your computer to take effect. + +To revert back, remove old kernels, see [install kernel simply via a script][3]. + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/08/upgrade-kernel-4-2-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://lkml.org/lkml/2015/8/30/96 +[2]:http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/ +[3]:http://ubuntuhandbook.org/index.php/2015/08/install-latest-kernel-script/ \ No newline at end of file diff --git a/sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md b/sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md new file mode 100644 index 0000000000..7022efd817 --- /dev/null +++ b/sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md @@ -0,0 +1,79 @@ +Install The Latest Linux Kernel in Ubuntu Easily via A Script +================================================================================ +![](http://ubuntuhandbook.org/wp-content/uploads/2014/12/linux-kernel-icon-tux.png) + +Want to install the latest Linux Kernel? A simple script can always do the job and make things easier in Ubuntu. + +Michael Murphy has created a script makes installing the latest RC, stable, or lowlatency Kernel easier in Ubuntu. The script asks some questions and automatically downloads and installs the latest Kernel packages from [Ubuntu kernel mainline page][1]. + +### Install / Upgrade Linux Kernel via the Script: ### + +1. Download the script from the right sidebar of the [github page][2] (click the “Download Zip” button). + +2. Decompress the Zip archive by right-clicking on it in your user Downloads folder and select “Extract Here”. + +3. Navigate to the result folder in terminal by right-clicking on that folder and select “Open in Terminal”: + +![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/open-terminal.jpg) + +It opens a terminal window and automatically navigates into the result folder. If you **DON’T** find the “Open in Terminal” option, search for and install `nautilus-open-terminal` in Ubuntu Software Center and then log out and back in (or run `nautilus -q` command in terminal instead to apply changes). + +4. When you’re in terminal, give the script executable permission for once. + + chmod +x * + +FINALLY run the script every time you want to install / upgrade Linux Kernel in Ubuntu: + + ./* + +![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/run-script.jpg) + +I use * instead of the SCRIPT NAME in both commands since it’s the only file in that folder. + +If the script runs successfully, restart your computer when done. + +### Revert back and Uninstall the new Kernel: ### + +To revert back and remove the new kernel for any reason, restart your computer and select boot with the old kernel entry under **Advanced Options** menu when you’re at Grub boot-loader. + +When it boots up, see below section. + +### How to Remove the old (or new) Kernels: ### + +1. Install Synaptic Package Manager from Ubuntu Software Center. + +2. Launch Synaptic Package Manager and do: + +- click the **Reload** button in case you want to remove the new kernel. +- select **Status -> Installed** on the left pane to make search list clear. +- search **linux-image**- using Quick filter box. +- select a kernel image “linux-image-x.xx.xx-generic” and mark for (complete) removal +- finally apply changes + +![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/remove-old-kernel1.jpg) + +Repeat until you removed all unwanted kernels. DON’T carelessly remove the current running kernel, check it out via `uname -r` (see below pic.) command. + +For Ubuntu Server, you may run below commands one by one: + + uname -r + + dpkg -l | grep linux-image- + + sudo apt-get autoremove KERNEL_IMAGE_NAME + +![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/remove-kernel-terminal.jpg) + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/08/install-latest-kernel-script/ + +作者:[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://kernel.ubuntu.com/~kernel-ppa/mainline/ +[2]:https://gist.github.com/mmstick/8493727 \ No newline at end of file From ec7dffbf93a8d29a2797802971d4bdee42dd37b5 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 1 Sep 2015 15:58:56 +0800 Subject: [PATCH 1951/2517] =?UTF-8?q?20150901-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talk/20150901 Is Linux Right For You.md | 63 +++++++++ ...0150901 How to Defragment Linux Systems.md | 125 ++++++++++++++++++ 2 files changed, 188 insertions(+) create mode 100644 sources/talk/20150901 Is Linux Right For You.md create mode 100644 sources/tech/20150901 How to Defragment Linux Systems.md diff --git a/sources/talk/20150901 Is Linux Right For You.md b/sources/talk/20150901 Is Linux Right For You.md new file mode 100644 index 0000000000..89044347ec --- /dev/null +++ b/sources/talk/20150901 Is Linux Right For You.md @@ -0,0 +1,63 @@ +Is Linux Right For You? +================================================================================ +> Not everyone should opt for Linux -- for many users, remaining with Windows or OSX is the better choice. + +I enjoy using Linux on the desktop. Not because of software politics or because I despise other operating systems. I simply like Linux because it just works. + +It's been my experience that not everyone is cut out for the Linux lifestyle. In this article, I'll help you run through the pros and cons of making the switch to Linux so you can determine if switching is right for you. + +### When to make the switch ### + +Switching to Linux makes sense when there is a decisive reason to do so. The same can be said about moving from Windows to OS X or vice versa. In order to have success with switching, you must be able to identify your reason for jumping ship in the first place. + +For some people, the reason for switching is frustration with their current platform. Maybe the latest upgrade left them with a lousy experience and they're ready to chart new horizons. In other instances, perhaps it's simply a matter of curiosity. Whatever the motivation, you must have a good reason for switching operating systems. If you're pushing yourself in this direction without a good reason, then no one wins. + +However, there are exceptions to every rule. And if you're really interested in trying Linux on the desktop, then maybe coming to terms with a workable compromise is the way to go. + +### Starting off slow ### + +After trying Linux for the first time, I've seen people blast their Windows installation to bits because they had a good experience with Ubuntu on a flash drive for 20 minutes. Folks, this isn't a test. Instead I'd suggest the following: + +- Run the [Linux distro in a virtual machine][1] for a week. This means you are committing to running that distro for all browser work, email and other tasks you might otherwise do on that machine. +- If running a VM for a week is too resource intensive, try doing the same with a USB drive running Linux that offers [some persistent storage][2]. This will allow you to leave your main OS alone and intact. At the same time, you'll still be able to "live inside" of your Linux distribution for a week. +- If you find that everything is successful after a week of running Linux, the next step is to examine how many times you booted into Windows that week. If only occasionally, then the next step is to look into [dual-booting Windows][3] and Linux. For those of you that only found themselves using their Linux distro, it might be worth considering making the switch full time. +- Before you hose your Windows partition completely, it might make more sense to purchase a second hard drive to install Linux onto instead. This allows you to dual-boot, but to do so with ample hard drive space. It also makes Windows available to you if something should come up. + +### What do you gain adopting Linux? ### + +So what does one gain by switching to Linux? Generally it comes down to personal freedom for most people. With Linux, if something isn't to your liking, you're free to change it. Using Linux also saves users oodles of money in avoiding hardware upgrades and unnecessary software expenses. Additionally, you're not burdened with tracking down lost license keys for software. And if you dislike the direction a particular distribution is headed, you can switch to another distribution with minimal hassle. + +The sheer volume of desktop choice on the Linux desktop is staggering. This level of choice might even seem overwhelming to the newcomer. But if you find a distro base (Debian, Fedora, Arch, etc) that you like, the hard work is already done. All you need to do now is find a variation of the distro and the desktop environment you prefer. + +Now one of the most common complaints I hear is that there isn't much in the way of software for Linux. However, this isn't accurate at all. While other operating systems may have more of it, today's Linux desktop has applications to do just about anything you can think of. Video editing (home and pro-level), photography, office management, remote access, music (listening and creation), plus much, much more. + +### What you lose adopting Linux? ### + +As much as I enjoy using Linux, my wife's home office relies on OS X. She's perfectly content using Linux for some tasks, however she relies on OS X for specific software not available for Linux. This is a common problem that many people face when first looking at making the switch. You must decide whether or not you're going to be losing out on critical software if you make the switch. + +Sometimes the issue is because the software has content locked down with it. In other cases, it's a workflow and functionality that was found with the legacy applications and not with the software available for Linux. I myself have never experienced this type of challenge, but I know those who have. Many of the software titles available for Linux are also available for other operating systems. So if there is a concern about such things, I encourage you to try out comparable apps on your native OS first. + +Another thing you might lose by switching to Linux is the luxury of local support when you need it. People scoff at this, but I know of countless instances where a newcomer to Linux was dismayed to find their only recourse for solving Linux challenges was from strangers on the Web. This is especially problematic if their only PC is the one having issues. Windows and OS X users are spoiled in that there are endless support techs in cities all over the world that support their platform(s). + +### How to proceed from here ### + +Perhaps the single biggest piece of advice to remember is always have a fallback plan. Remember, once you wipe that copy of Windows 10 from your hard drive, you may find yourself spending money to get it reinstalled. This is especially true for those of you who upgrade from other Windows releases. Accepting this, persistent flash drives with Linux or dual-booting Windows and Linux is always a preferable way forward for newcomers. Odds are that you may be just fine and take to Linux like a fish to water. But having that fallback plan in place just means you'll sleep better at night. + +If instead you've been relying on a dual-boot installation for weeks and feel ready to take the plunge, then by all means do it. Wipe your drive and start off with a clean installation of your favorite Linux distribution. I've been a full time Linux enthusiast for years and I can tell you for certain, it's a great feeling. How long? Let's just say my first Linux experience was with early Red Hat. I finally installed a dedicated installation on my laptop by 2003. + +Existing Linux enthusiasts, where did you first get started? Was your switch an exciting one or was it filled with angst? Hit the Comments and share your experiences. + +-------------------------------------------------------------------------------- + +via: http://www.datamation.com/open-source/is-linux-right-for-you.html + +作者:[Matt Hartley][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.datamation.com/author/Matt-Hartley-3080.html +[1]:http://www.psychocats.net/ubuntu/virtualbox +[2]:http://www.howtogeek.com/howto/14912/create-a-persistent-bootable-ubuntu-usb-flash-drive/ +[3]:http://www.linuxandubuntu.com/home/dual-boot-ubuntu-15-04-14-10-and-windows-10-8-1-8-step-by-step-tutorial-with-screenshots \ No newline at end of file diff --git a/sources/tech/20150901 How to Defragment Linux Systems.md b/sources/tech/20150901 How to Defragment Linux Systems.md new file mode 100644 index 0000000000..4b9095c1de --- /dev/null +++ b/sources/tech/20150901 How to Defragment Linux Systems.md @@ -0,0 +1,125 @@ +How to Defragment Linux Systems +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-featured.png) + +There is a common myth that Linux disks never need defragmentation at all. In most cases, this is true, due mostly to the excellent journaling filesystems Linux uses (ext2, 3, 4, btrfs, etc.) to handle the filesystem. However, in some specific cases, fragmentation might still occur. If that happens to you, the solution is fortunately very simple. + +### What is fragmentation? ### + +Fragmentation occurs when a file system updates files in little chunks, but these chunks do not form a contiguous whole and are scattered around the disk instead. This is particularly true for FAT and FAT32 filesystems. It was somewhat mitigated in NTFS and almost never happens in Linux (extX). Here is why. + +In filesystems such as FAT and FAT32, files are written right next to each other on the disk. There is no room left for file growth or updates: + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-fragmented.png) + +The NTFS leaves somewhat more room between the files, so there is room to grow. As the space between chunks is limited, fragmentation will still occur over time. + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-ntfs.png) + +Linux’s journaling filesystems take a different approach. Instead of placing files beside each other, each file is scattered all over the disk, leaving generous amounts of free space between each file. There is sufficient room for file updates/growth and fragmentation rarely occurs. + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-journal.png) + +Additionally, if fragmentation does happen, most Linux filesystems would attempt to shuffle files and chunks around to make them contiguous again. + +### Disk fragmentation on Linux ### + +Disk fragmentation seldom occurs in Linux unless you have a small hard drive, or it is running out of space. Some possible fragmentation cases include: + +- if you edit large video files or raw image files, and disk space is limited +- if you use older hardware like an old laptop, and you have a small hard drive +- if your hard drives start filling up (above 85% used) +- if you have many small partitions cluttering your home folder + +The best solution is to buy a larger hard drive. If it’s not possible, this is where defragmentation becomes useful. + +### How to check for fragmentation ### + +The `fsck` command will do this for you – that is, if you have an opportunity to run it from a live CD, with **all affected partitions unmounted**. + +This is very important: **RUNNING FSCK ON A MOUNTED PARTITION CAN AND WILL SEVERELY DAMAGE YOUR DATA AND YOUR DISK**. + +You have been warned. Before proceeding, make a full system backup. + +**Disclaimer**: The author of this article and Make Tech Easier take no responsibility for any damage to your files, data, system, or any other damage, caused by your actions after following this advice. You may proceed at your own risk. If you do proceed, you accept and acknowledge this. + +You should just boot into a live session (like an installer disk, system rescue CD, etc.) and run `fsck` on your UNMOUNTED partitions. To check for any problems, run the following command with root permission: + + fsck -fn [/path/to/your/partition] + +You can check what the `[/path/to/your/partition]` is by running + + sudo fdisk -l + +There is a way to run `fsck` (relatively) safely on a mounted partition – that is by using the `-n` switch. This will result in a read only file system check without touching anything. Of course, there is no guarantee of safety here, and you should only proceed after creating a backup. On an ext2 filesystem, running + + sudo fsck.ext2 -fn /path/to/your/partition + +would result in plenty of output – most of them error messages resulting from the fact that the partition is mounted. In the end it will give you fragmentation related information. + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-fsck.png) + +If your fragmentation is above 20%, you should proceed to defragment your system. + +### How to easily defragment Linux filesystems ### + +All you need to do is to back up **ALL** your files and data to another drive (by manually **copying** them over), format the partition, and copy your files back (don’t use a backup program for this). The journalling file system will handle them as new files and place them neatly to the disk without fragmentation. + +To back up your files, run + + cp -afv [/path/to/source/partition]/* [/path/to/destination/folder] + +Mind the asterix (*); it is important. + +Note: It is generally agreed that to copy large files or large amounts of data, the dd command might be best. This is a very low level operation and does copy everything “as is”, including the empty space, and even the junk left over. This is not what we want, so it is probably better to use `cp`. + +Now you only need to remove all the original files. + + sudo rm -rf [/path/to/source/partition]/* + +**Optional**: you can fill the empty space with zeros. You could achieve this with formatting as well, but if for example you did not copy the whole partition, only large files (which are most likely to cause fragmentation), this might not be an option. + + sudo dd if=/dev/zero of=[/path/to/source/partition]/temp-zero.txt + +Wait for it to finish. You could also monitor the progress with `pv`. + + sudo apt-get install pv + sudo pv -tpreb | of=[/path/to/source/partition]/temp-zero.txt + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-dd.png) + +When it is done, just delete the temporary file. + + sudo rm [/path/to/source/partition]/temp-zero.txt + +After you zeroed out the empty space (or just skipped that step entirely), copy your files back, reversing the first cp command: + + cp -afv [/path/to/original/destination/folder]/* [/path/to/original/source/partition] + +### Using e4defrag ### + +If you prefer a simpler approach, install `e2fsprogs`, + + sudo apt-get install e2fsprogs + +and run `e4defrag` as root on the affected partition. If you don’t want to or cannot unmount the partition, you can use its mount point instead of its path. To defragment your whole system, run + + sudo e4defrag / + +It is not guaranteed to succeed while mounted (you should also stop using your system while it is running), but it is much easier than copying all files away and back. + +### Conclusion ### + +Fragmentation should rarely be an issue on a Linux system due to the the journalling filesystem’s efficient data handling. If you do run into fragmentation due to any circumstances, there are simple ways to reallocate your disk space like copying all files away and back or using `e4defrag`. It is important, however, to keep your data safe, so before attempting any operation that would affect all or most of your files, make sure you make a backup just to be on the safe side. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/defragment-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/ \ No newline at end of file From 5aa1cea090f7c50b5d1b24eed03fee68a3ed0cfe Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 1 Sep 2015 16:14:32 +0800 Subject: [PATCH 1952/2517] =?UTF-8?q?20150901-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Apache with MariaDB on Debian or Ubuntu.md | 182 ++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md diff --git a/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md b/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md new file mode 100644 index 0000000000..d157b2b7aa --- /dev/null +++ b/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md @@ -0,0 +1,182 @@ +Setting Up High-Performance ‘HHVM’ and Nginx/Apache with MariaDB on Debian/Ubuntu +================================================================================ +HHVM stands for HipHop Virtual Machine, is an open source virtual machine created for running Hack (it’s a programming language for HHVM) and PHP written applications. HHVM uses a last minute compilation path to achieve remarkable performance while keeping the flexibility that PHP programmers are addicted to. Till date, HHVM has achieved over a 9x increase in http request throughput and more than 5x cut in memory utilization (when running on low system memory) for Facebook compared with the PHP engine + [APC (Alternative PHP Cache)][1]. + +HHVM can also be used along with a FastCGI-based web-server like Nginx or Apache. + +![Install HHVM, Nginx and Apache with MariaDB](http://www.tecmint.com/wp-content/uploads/2015/08/Install-HHVM-Nginx-Apache-MariaDB.png) + +Install HHVM, Nginx and Apache with MariaDB + +In this tutorial we shall look at steps for setting up Nginx/Apache web server, MariaDB database server and HHVM. For this setup, we will use Ubuntu 15.04 (64-bit) as HHVM runs on 64-bit system only, although Debian and Linux Mint distributions are also supported. + +### Step 1: Installing Nginx and Apache Web Server ### + +1. First do a system upgrade to update repository list with the help of following commands. + + # apt-get update && apt-get upgrade + +![System Upgrade](http://www.tecmint.com/wp-content/uploads/2015/08/System-Upgrade.png) + +System Upgrade + +2. As I said HHVM can be used with both Nginx and Apache web server. So, it’s your choice which web server you will going to use, but here we will show you both web servers installation and how to use them with HHVM. + +#### Installing Nginx #### + +In this step, we will install Nginx/Apache web server from the packages repository using following command. + + # apt-get install nginx + +![Install Nginx Web Server](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Nginx-Web-Server.png) + +Install Nginx Web Server + +#### Installing Apache #### + + # apt-get install apache2 + +![Install Apache Web Server](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Apache-Web-Server.png) + +Install Apache Web Server + +At this point, you should be able to navigate to following URL and you will able to see Nginx or Apache default page. + + http://localhost + OR + http://IP-Address + +#### Nginx Default Page #### + +![Nginx Welcome Page](http://www.tecmint.com/wp-content/uploads/2015/08/Nginx-Welcome-Page.png) + +Nginx Welcome Page + +#### Apache Default Page #### + +![Apache Default Page](http://www.tecmint.com/wp-content/uploads/2015/08/Apache-Default-Page.png) + +Apache Default Page + +### Step 2: Install and Configure MariaDB ### + +3. In this step, we will install MariaDB, as it providers better performance as compared to MySQL. + + # apt-get install mariadb-client mariadb-server + +![Install MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/08/Install-MariaDB-Database.png) + +Install MariaDB Database + +4. After MariaDB successful installation, you can start MariaDB and set root password to secure the database: + + # systemctl start mysql + # mysql_secure_installation + +Answer the following questions by typing `y` or `n` and press enter. Make sure you read the instructions carefully before answering the questions. + + Enter current password for root (enter for none) = press enter + Set root password? [Y/n] = y + Remove anonymous users[y/n] = y + Disallow root login remotely[y/n] = y + Remove test database and access to it [y/n] = y + Reload privileges tables now[y/n] = y + +5. After setting root password for MariaDB, you can connect to MariaDB prompt with the new root password. + + # mysql -u root -p + +### Step 3: Installation of HHVM ### + +6. At this stage we shall install and configure HHVM. You need to add the HHVM repository to your `sources.list` file and then you have to update your repository list using following series of commands. + + # wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | apt-key add - + # echo deb http://dl.hhvm.com/ubuntu DISTRIBUTION_VERSION main | sudo tee /etc/apt/sources.list.d/hhvm.list + # apt-get update + +**Important**: Don’t forget to replace DISTRIBUTION_VERSION with your Ubuntu distribution version (i.e. lucid, precise, or trusty.) and also on Debian replace with jessie or wheezy. On Linux Mint installation instructions are same, but petra is the only currently supported distribution. + +After adding HHVM repository, you can easily install it as shown. + + # apt-get install -y hhvm + +Installing HHVM will start it up now, but it not configured to auto start at next system boot. To set auto start at next boot use the following command. + + # update-rc.d hhvm defaults + +### Step 4: Configuring Nginx/Apache to Talk to HHVM ### + +7. Now, nginx/apache and HHVM are installed and running as independent, so we need to configure both web servers to talk to each other. The crucial part is that we have to tell nginx/apache to forward all PHP files to HHVM to execute. + +If you are using Nginx, follow this instructions as explained.. + +By default, the nginx configuration lives under /etc/nginx/sites-available/default and these config looks in /usr/share/nginx/html for files to execute, but it don’t know what to do with PHP. + +To make Nginx to talk with HHVM, we need to run the following include script that will configure nginx correctly by placing a hhvm.conf at the beginning of the nginx config as mentioned above. + +This script makes the nginx to talk to any file that ends with .hh or .php and send it to HHVM via fastcgi. + + # /usr/share/hhvm/install_fastcgi.sh + +![Configure Nginx for HHVM](http://www.tecmint.com/wp-content/uploads/2015/08/Configure-Nginx-for-HHVM.png) + +Configure Nginx for HHVM + +**Important**: If you are using Apache, there isn’t any configuration is needed now. + +8. Next, you need to use /usr/bin/hhvm to provide /usr/bin/php (php) by running this command below. + + # /usr/bin/update-alternatives --install /usr/bin/php php /usr/bin/hhvm 60 + +After all the above steps are done, you can now start HHVM and test it. + + # systemctl start hhvm + +### Step 5: Testing HHVM with Nginx/Apache ### + +9. To verify that hhvm working, you need to create a hello.php file under nginx/apache document root directory. + + # nano /usr/share/nginx/html/hello.php [For Nginx] + OR + # nano /var/www/html/hello.php [For Nginx and Apache] + +Add the following snippet to this file. + + + +and then navigate to the following URL and verify to see “hello world“. + + http://localhost/info.php + OR + http://IP-Address/info.php + +![HHVM Page](http://www.tecmint.com/wp-content/uploads/2015/08/HHVM-Page.png) + +HHVM Page + +If “HHVM” page appears, then it means you’re all set! + +### Conclusion ### + +These steps are very easy to follow and hope your find this tutorial useful and if you get any error during installation of any packages, post a comment and we shall find solutions together. And any additional ideas are welcome. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-hhvm-and-nginx-apache-with-mariadb-on-debian-ubuntu/ + +作者:[Ravi Saive][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/admin/ +[1]:http://www.tecmint.com/install-apc-alternative-php-cache-in-rhel-centos-fedora/ \ No newline at end of file From c1cf9482557f16a896789afb6d7e2bf2b29ceba4 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 1 Sep 2015 17:12:31 +0800 Subject: [PATCH 1953/2517] Update 20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md --- ... How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md b/sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md index 0a18e76db1..b26e225586 100644 --- a/sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md +++ b/sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md @@ -1,3 +1,4 @@ +translation by strugglingyouth How to Install / Upgrade to Linux Kernel 4.2 in Ubuntu ================================================================================ ![](http://ubuntuhandbook.org/wp-content/uploads/2014/12/linux-kernel-icon-tux.png) @@ -85,4 +86,4 @@ via: http://ubuntuhandbook.org/index.php/2015/08/upgrade-kernel-4-2-ubuntu/ [a]:http://ubuntuhandbook.org/index.php/about/ [1]:https://lkml.org/lkml/2015/8/30/96 [2]:http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/ -[3]:http://ubuntuhandbook.org/index.php/2015/08/install-latest-kernel-script/ \ No newline at end of file +[3]:http://ubuntuhandbook.org/index.php/2015/08/install-latest-kernel-script/ From bc49c88739870c74bbe6a725e44669584220d34b Mon Sep 17 00:00:00 2001 From: KS Date: Tue, 1 Sep 2015 17:42:29 +0800 Subject: [PATCH 1954/2517] Delete 20150826 How to set up a system status page of your infrastructure.md --- ...stem status page of your infrastructure.md | 295 ------------------ 1 file changed, 295 deletions(-) delete mode 100644 sources/tech/20150826 How to set up a system status page of your infrastructure.md diff --git a/sources/tech/20150826 How to set up a system status page of your infrastructure.md b/sources/tech/20150826 How to set up a system status page of your infrastructure.md deleted file mode 100644 index f696e91638..0000000000 --- a/sources/tech/20150826 How to set up a system status page of your infrastructure.md +++ /dev/null @@ -1,295 +0,0 @@ -wyangsun translating -How to set up a system status page of your infrastructure -================================================================================ -If you are a system administrator who is responsible for critical IT infrastructure or services of your organization, you will understand the importance of effective communication in your day-to-day tasks. Suppose your production storage server is on fire. You want your entire team on the same page in order to resolve the issue as fast as you can. While you are at it, you don't want half of all users contacting you asking why they cannot access their documents. When a scheduled maintenance is coming up, you want to notify interested parties of the event ahead of the schedule, so that unnecessary support tickets can be avoided. - -All these require some sort of streamlined communication channel between you, your team and people you serve. One way to achieve that is to maintain a centralized system status page, where the detail of downtime incidents, progress updates and maintenance schedules are reported and chronicled. That way, you can minimize unnecessary distractions during downtime, and also have any interested party informed and opt-in for any status update. - -One good **open-source, self-hosted system status page solution** is [Cachet][1]. In this tutorial, I am going to describe how to set up a self-hosted system status page using Cachet. - -### Cachet Features ### - -Before going into the detail of setting up Cachet, let me briefly introduce its main features. - -- **Full JSON API**: The Cachet API allows you to connect any external program or script (e.g., uptime script) to Cachet to report incidents or update status automatically. -- **Authentication**: Cachet supports Basic Auth and API token in JSON API, so that only authorized personnel can update the status page. -- **Metrics system**: This is useful to visualize custom data over time (e.g., server load or response time). -- **Notification**: Optionally you can send notification emails about reported incidents to anyone who signed up to the status page. -- **Multiple languages**: The status page can be translated into 11 different languages. -- **Two factor authentication**: This allows you to lock your Cachet admin account with Google's two-factor authentication. -- **Cross database support**: You can choose between MySQL, SQLite, Redis, APC, and PostgreSQL for a backend storage. - -In the rest of the tutorial, I explain how to install and configure Cachet on Linux. - -### Step One: Download and Install Cachet ### - -Cachet requires a web server and a backend database to operate. In this tutorial, I am going to use the LAMP stack. Here are distro-specific instructions to install Cachet and LAMP stack. - -#### Debian, Ubuntu or Linux Mint #### - - $ sudo apt-get install curl git apache2 mysql-server mysql-client php5 php5-mysql - $ sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet - $ cd /var/www/cachet - $ sudo git checkout v1.1.1 - $ sudo chown -R www-data:www-data . - -For more detail on setting up LAMP stack on Debian-based systems, refer to [this tutorial][2]. - -#### Fedora, CentOS or RHEL #### - -On Red Hat based systems, you first need to [enable REMI repository][3] (to meet PHP version requirement). Then proceed as follows. - - $ sudo yum install curl git httpd mariadb-server - $ sudo yum --enablerepo=remi-php56 install php php-mysql php-mbstring - $ sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet - $ cd /var/www/cachet - $ sudo git checkout v1.1.1 - $ sudo chown -R apache:apache . - $ sudo firewall-cmd --permanent --zone=public --add-service=http - $ sudo firewall-cmd --reload - $ sudo systemctl enable httpd.service; sudo systemctl start httpd.service - $ sudo systemctl enable mariadb.service; sudo systemctl start mariadb.service - -For more details on setting up LAMP on Red Hat-based systems, refer to [this tutorial][4]. - -### Configure a Backend Database for Cachet ### - -The next step is to configure database backend. - -Log in to MySQL/MariaDB server, and create an empty database called 'cachet'. - - $ sudo mysql -uroot -p - ----------- - - mysql> create database cachet; - mysql> quit - -Now create a Cachet configuration file by using a sample configuration file. - - $ cd /var/www/cachet - $ sudo mv .env.example .env - -In .env file, fill in database information (i.e., DB_*) according to your setup. Leave other fields unchanged for now. - - APP_ENV=production - APP_DEBUG=false - APP_URL=http://localhost - APP_KEY=SomeRandomString - - DB_DRIVER=mysql - DB_HOST=localhost - DB_DATABASE=cachet - DB_USERNAME=root - DB_PASSWORD= - - CACHE_DRIVER=apc - SESSION_DRIVER=apc - QUEUE_DRIVER=database - - MAIL_DRIVER=smtp - MAIL_HOST=mailtrap.io - MAIL_PORT=2525 - MAIL_USERNAME=null - MAIL_PASSWORD=null - MAIL_ADDRESS=null - MAIL_NAME=null - - REDIS_HOST=null - REDIS_DATABASE=null - REDIS_PORT=null - -### Step Three: Install PHP Dependencies and Perform DB Migration ### - -Next, we are going to install necessary PHP dependencies. For that we will use composer. If you do not have composer installed on your system, install it first: - - $ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer - -Now go ahead and install PHP dependencies using composer. - - $ cd /var/www/cachet - $ sudo composer install --no-dev -o - -Next, perform one-time database migration. This step will populate the empty database we created earlier with necessary tables. - - $ sudo php artisan migrate - -Assuming the database config in /var/www/cachet/.env is correct, database migration should be completed successfully as shown below. - -![](https://farm6.staticflickr.com/5814/20235620184_54048676b0_c.jpg) - -Next, create a security key, which will be used to encrypt the data entered in Cachet. - - $ sudo php artisan key:generate - $ sudo php artisan config:cache - -![](https://farm6.staticflickr.com/5717/20831952096_7105c9fdc7_c.jpg) - -The generated app key will be automatically added to the APP_KEY variable of your .env file. No need to edit .env on your own here. - -### Step Four: Configure Apache HTTP Server ### - -Now it's time to configure the web server that Cachet will be running on. As we are using Apache HTTP server, create a new [virtual host][5] for Cachet as follows. - -#### Debian, Ubuntu or Linux Mint #### - - $ sudo vi /etc/apache2/sites-available/cachet.conf - ----------- - - - ServerName cachethost - ServerAlias cachethost - DocumentRoot "/var/www/cachet/public" - - Require all granted - Options Indexes FollowSymLinks - AllowOverride All - Order allow,deny - Allow from all - - - -Enable the new Virtual Host and mod_rewrite with: - - $ sudo a2ensite cachet.conf - $ sudo a2enmod rewrite - $ sudo service apache2 restart - -#### Fedora, CentOS or RHEL #### - -On Red Hat based systems, create a virtual host file as follows. - - $ sudo vi /etc/httpd/conf.d/cachet.conf - ----------- - - - ServerName cachethost - ServerAlias cachethost - DocumentRoot "/var/www/cachet/public" - - Require all granted - Options Indexes FollowSymLinks - AllowOverride All - Order allow,deny - Allow from all - - - -Now reload Apache configuration: - - $ sudo systemctl reload httpd.service - -### Step Five: Configure /etc/hosts for Testing Cachet ### - -At this point, the initial Cachet status page should be up and running, and now it's time to test. - -Since Cachet is configured as a virtual host of Apache HTTP server, we need to tweak /etc/hosts of your client computer to be able to access it. Here the client computer is the one from which you will be accessing the Cachet page. - -Open /etc/hosts, and add the following entry. - - $ sudo vi /etc/hosts - ----------- - - cachethost - -In the above, the name "cachethost" must match with ServerName specified in the Apache virtual host file for Cachet. - -### Test Cachet Status Page ### - -Now you are ready to access Cachet status page. Type http://cachethost in your browser address bar. You will be redirected to the initial Cachet setup page as follows. - -![](https://farm6.staticflickr.com/5745/20858228815_405fce1301_c.jpg) - -Choose cache/session driver. Here let's choose "File" for both cache and session drivers. - -Next, type basic information about the status page (e.g., site name, domain, timezone and language), as well as administrator account. - -![](https://farm1.staticflickr.com/611/20237229693_c22014e4fd_c.jpg) - -![](https://farm6.staticflickr.com/5707/20858228875_b056c9e1b4_c.jpg) - -![](https://farm6.staticflickr.com/5653/20671482009_8629572886_c.jpg) - -Your initial status page will finally be ready. - -![](https://farm6.staticflickr.com/5692/20237229793_f6a48f379a_c.jpg) - -Go ahead and create components (units of your system), incidents or any scheduled maintenance as you want. - -For example, to add a new component: - -![](https://farm6.staticflickr.com/5672/20848624752_9d2e0a07be_c.jpg) - -To add a scheduled maintenance: - -This is what the public Cachet status page looks like: - -![](https://farm1.staticflickr.com/577/20848624842_df68c0026d_c.jpg) - -With SMTP integration, you can send out emails on status updates to any subscribers. Also, you can fully customize the layout and style of the status page using CSS and markdown formatting. - -### Conclusion ### - -Cachet is pretty easy-to-use, self-hosted status page software. One of the nicest features of Cachet is its support for full JSON API. Using its RESTful API, one can easily hook up Cachet with separate monitoring backends (e.g., [Nagios][6]), and feed Cachet with incident reports and status updates automatically. This is far quicker and efficient than manually manage a status page. - -As final words, I'd like to mention one thing. While setting up a fancy status page with Cachet is straightforward, making the best use of the software is not as easy as installing it. You need total commitment from the IT team on updating the status page in an accurate and timely manner, thereby building credibility of the published information. At the same time, you need to educate users to turn to the status page. At the end of the day, it would be pointless to set up a status page if it's not populated well, and/or no one is checking it. Remember this when you consider deploying Cachet in your work environment. - -### Troubleshooting ### - -As a bonus, here are some useful troubleshooting tips in case you encounter problems while setting up Cachet. - -1. The Cachet page does not load anything, and you are getting the following error. - - production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in /var/www/cachet/bootstrap/cache/compiled.php:6695 - -**Solution**: Make sure that you create an app key, as well as clear configuration cache as follows. - - $ cd /path/to/cachet - $ sudo php artisan key:generate - $ sudo php artisan config:cache - -2. You are getting the following error while invoking composer command. - - - danielstjules/stringy 1.10.0 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. - - laravel/framework v5.1.8 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. - - league/commonmark 0.10.0 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. - -**Solution**: Make sure to install the required PHP extension mbstring on your system which is compatible with your PHP. On Red Hat based system, since we installed PHP from REMI-56 repository, we install the extension from the same repository. - - $ sudo yum --enablerepo=remi-php56 install php-mbstring - -3. You are getting a blank page while trying to access Cachet status page. The HTTP log shows the following error. - - PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/cachet/storage/logs/laravel-2015-08-21.log" could not be opened: failed to open stream: Permission denied' in /var/www/cachet/bootstrap/cache/compiled.php:12851 - -**Solution**: Try the following commands. - - $ cd /var/www/cachet - $ sudo php artisan cache:clear - $ sudo chmod -R 777 storage - $ sudo composer dump-autoload - -If the above solution does not work, try disabling SELinux: - - $ sudo setenforce 0 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/setup-system-status-page.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]:https://cachethq.io/ -[2]:http://xmodulo.com/install-lamp-stack-ubuntu-server.html -[3]:http://ask.xmodulo.com/install-remi-repository-centos-rhel.html -[4]:http://xmodulo.com/install-lamp-stack-centos.html -[5]:http://xmodulo.com/configure-virtual-hosts-apache-http-server.html -[6]:http://xmodulo.com/monitor-common-services-nagios.html From 50c391918ff889dc8b38a409cf0f333a5eccbd8b Mon Sep 17 00:00:00 2001 From: KS Date: Tue, 1 Sep 2015 17:44:32 +0800 Subject: [PATCH 1955/2517] Create 20150826 How to set up a system status page of your infrastructure.md --- ...stem status page of your infrastructure.md | 294 ++++++++++++++++++ 1 file changed, 294 insertions(+) create mode 100644 translated/tech/20150826 How to set up a system status page of your infrastructure.md diff --git a/translated/tech/20150826 How to set up a system status page of your infrastructure.md b/translated/tech/20150826 How to set up a system status page of your infrastructure.md new file mode 100644 index 0000000000..53c97670d8 --- /dev/null +++ b/translated/tech/20150826 How to set up a system status page of your infrastructure.md @@ -0,0 +1,294 @@ +如何部署一个你的公共系统状态页面 +================================================================================ +如果你是一个系统管理员,负责关键的IT基础设置或你公司的服务,你将明白有效的沟通在日常任务中的重要性。假设你的线上存储服务器故障了。你希望团队所有人达成共识你好尽快的解决问题。当你忙来忙去时,你不想一半的人问你为什么他们不能访问他们的文档。当一个维护计划快到时间了你想在计划前提醒相关人员,这样避免了不必要的开销。 + +这一切的要求或多或少改进了你和你的团队,用户和你的服务的沟通渠道。一个实现它方法是维护一个集中的系统状态页面,故障停机详情,进度更新和维护计划会被报告和记录。这样,在故障期间你避免了不必要的打扰,也有一些相关方提供的资料和任何选状态更新择性加入。 + +一个不错的**开源, 自承载系统状态页面**是is [Cachet][1]。在这个教程,我将要描述如何用Cachet部署一个自承载系统状态页面。 + +### Cachet 特性 ### + +在详细的配置Cachet之前,让我简单的介绍一下它的主要特性。 + +- **全JSON API**:Cachet API允许你使用任意外部程序或脚本(例如,uptime脚本)链接到Cachet来报告突发事件或自动更新状态。 +- **认证**:Cachet支持基础认证和JSON API的API令牌,所以只有认证用户可以更新状态页面。 +- **衡量系统**:这通常用来展现随着时间推移的自定义数据(例如,服务器负载或者相应时间)。 +- **通知**:你可以随意的发送通知邮件,报告事件给任一注册了状态页面的人。 +- **多语言**:状态也可以被转换为11种不同的语言。 +- **双因子认证**:这允许你使用Google的双因子认证管理账户锁定你的Cachet(什么事Google?呵呵!)。 +- **支持交叉数据库**:你可以选择MySQL,SQLite,Redis,APC和PostgreSQL作为后端存储。 + +剩下的教程,我说明如何在Linux上安装配置Cachet。 + +### 第一步:下载和安装Cachet ### + +Cachet需要一个web服务器和一个后端数据库来运转。在这个教程中,我将使用LAMP架构。这里有特定发行版安装Cachet和LAMP架构的指令。 + +#### Debian, Ubuntu 或者 Linux Mint #### + + $ sudo apt-get install curl git apache2 mysql-server mysql-client php5 php5-mysql + $ sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet + $ cd /var/www/cachet + $ sudo git checkout v1.1.1 + $ sudo chown -R www-data:www-data . + +在基于Debian的系统上更多详细的设置LAMP架构,参考这个[教程][2]。 + +#### Fedora, CentOS 或 RHEL #### + +在基于Red Hat系统上,你首先需要[设置REMI资源库][3](以满足PHP版本需求)。然后执行下面命令。 + + $ sudo yum install curl git httpd mariadb-server + $ sudo yum --enablerepo=remi-php56 install php php-mysql php-mbstring + $ sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet + $ cd /var/www/cachet + $ sudo git checkout v1.1.1 + $ sudo chown -R apache:apache . + $ sudo firewall-cmd --permanent --zone=public --add-service=http + $ sudo firewall-cmd --reload + $ sudo systemctl enable httpd.service; sudo systemctl start httpd.service + $ sudo systemctl enable mariadb.service; sudo systemctl start mariadb.service + +在基于Red Hat系统上更多详细设置LAMP,参考这个[教程][4]。 + +### 配置Cachet的后端数据库### + +下一步是配置后端数据库。 + +登陆到MySQL/MariaDB服务,然后创建一个空的数据库称为‘cachet’。 + + $ sudo mysql -uroot -p + +---------- + + mysql> create database cachet; + mysql> quit + +现在用一个样本配置文件创建一个Cachet配置文件。 + + $ cd /var/www/cachet + $ sudo mv .env.example .env + +在.env文件里,填写你自己设置的数据库信息(例如,DB\_\*)。其他的字段先不改变。 + + APP_ENV=production + APP_DEBUG=false + APP_URL=http://localhost + APP_KEY=SomeRandomString + + DB_DRIVER=mysql + DB_HOST=localhost + DB_DATABASE=cachet + DB_USERNAME=root + DB_PASSWORD= + + CACHE_DRIVER=apc + SESSION_DRIVER=apc + QUEUE_DRIVER=database + + MAIL_DRIVER=smtp + MAIL_HOST=mailtrap.io + MAIL_PORT=2525 + MAIL_USERNAME=null + MAIL_PASSWORD=null + MAIL_ADDRESS=null + MAIL_NAME=null + + REDIS_HOST=null + REDIS_DATABASE=null + REDIS_PORT=null + +### 第三步:安装PHP依赖和执行数据库迁移 ### + +下面,我们将要安装必要的PHP依赖包。所以我们将使用composer。如果你的系统还没有安装composer,先安装它: + + $ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer + +现在开始用composer安装PHP依赖包。 + + $ cd /var/www/cachet + $ sudo composer install --no-dev -o + +下面执行一次数据库迁移。这一步将我们早期创建的必要表填充到数据库。 + + $ sudo php artisan migrate + +假设数据库配置在/var/www/cachet/.env是正确的,数据库迁移应该像下面显示一样完成成功。 + +![](https://farm6.staticflickr.com/5814/20235620184_54048676b0_c.jpg) + +下面,创建一个密钥,它将用来加密进入Cachet的数据。 + + $ sudo php artisan key:generate + $ sudo php artisan config:cache + +![](https://farm6.staticflickr.com/5717/20831952096_7105c9fdc7_c.jpg) + +生成的应用密钥将自动添加到你的.env文件APP\_KEY变量中。你不需要单独编辑.env。 + +### 第四步:配置Apache HTTP服务 ### + +现在到了配置web服务的时候,Cachet将运行在上面。我们使用Apache HTTP服务器,为Cachet创建一个新的[虚拟主机][5]如下所述。 + +#### Debian, Ubuntu 或 Linux Mint #### + + $ sudo vi /etc/apache2/sites-available/cachet.conf + +---------- + + + ServerName cachethost + ServerAlias cachethost + DocumentRoot "/var/www/cachet/public" + + Require all granted + Options Indexes FollowSymLinks + AllowOverride All + Order allow,deny + Allow from all + + + +启用新虚拟主机和mod_rewrite: + + $ sudo a2ensite cachet.conf + $ sudo a2enmod rewrite + $ sudo service apache2 restart + +#### Fedora, CentOS 或 RHEL #### + +在基于Red Hat系统上,创建一个虚拟主机文件如下所述。 + + $ sudo vi /etc/httpd/conf.d/cachet.conf + +---------- + + + ServerName cachethost + ServerAlias cachethost + DocumentRoot "/var/www/cachet/public" + + Require all granted + Options Indexes FollowSymLinks + AllowOverride All + Order allow,deny + Allow from all + + + +现在重载Apache配置: + + $ sudo systemctl reload httpd.service + +### 第五步:配置/etc/hosts来测试Cachet ### + +这时候,初始的Cachet状态页面应该启动运行了,现在测试一下。 + +由于Cachet被配置为Apache HTTP服务的虚拟主机,我们需要调整你的客户机的/etc/hosts来访问他。你将从这个客户端电脑访问Cachet页面。 + +Open /etc/hosts, and add the following entry. + + $ sudo vi /etc/hosts + +---------- + + cachethost + +上面名为“cachethost”必须匹配Cachet的Apache虚拟主机文件的ServerName。 + +### 测试Cachet状态页面 ### + +现在你准备好访问Cachet状态页面。在你浏览器地址栏输入http://cachethost。你将被转到初始Cachet状态页如下。 + +![](https://farm6.staticflickr.com/5745/20858228815_405fce1301_c.jpg) + +选择cache/session驱动。这里cache和session驱动两个都选“File”。 + +下一步,输入关于状态页面的基本信息(例如,站点名称,域名,时区和语言),以及管理员认证账户。 + +![](https://farm1.staticflickr.com/611/20237229693_c22014e4fd_c.jpg) + +![](https://farm6.staticflickr.com/5707/20858228875_b056c9e1b4_c.jpg) + +![](https://farm6.staticflickr.com/5653/20671482009_8629572886_c.jpg) + +你的初始状态页将要最终完成。 + +![](https://farm6.staticflickr.com/5692/20237229793_f6a48f379a_c.jpg) + +继续创建组件(你的系统单位),事件或者任意你想要的维护计划。 + +例如,增加一个组件: + +![](https://farm6.staticflickr.com/5672/20848624752_9d2e0a07be_c.jpg) + +增加一个维护计划: + +公共Cachet状态页就像这样: + +![](https://farm1.staticflickr.com/577/20848624842_df68c0026d_c.jpg) + +集成SMTP,你可以在状态更新时发送邮件给订阅者。并且你可以完全自定义布局和状态页面使用的CSS和markdown格式。 + +### 结论 ### + +Cachet是一个相当易于使用,自托管的状态页面软件。Cachet一个高级特性是支持全JSON API。使用它的RESTful API,Cachet可以轻松连接单独的监控后端(例如,[Nagios][6]),然后回馈给Cachet事件报告并自动更新状态。比起手段管理一个状态页它更快和有效率。 + +最后一句,我喜欢提及一个事。用Cachet简单的设置一个花哨的状态页面同时,使用最佳的软件不像安装它那么容易。你需要完全保障所有IT团队习惯准确及时的更新状态页,从而建立公共信息的准确性。同时,你需要教用户去查看状态页面。在今天最后,如果不很好的填充,部署状态页面将没有意义,并且/或者没有一个人查看它。记住这个,当你考虑部署Cachet在你的工作环境中时。 + +### 故障排查 ### + +作为奖励,万一你安装Cachet时遇到问题,这有一些有用的故障排查的技巧。 + +1. Cachet页面没有加载任何东西,并且你看到如下报错。 + + production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in /var/www/cachet/bootstrap/cache/compiled.php:6695 + +**解决方案**:确保你创建了一个应用密钥,以及明确配置缓存如下所述。 + + $ cd /path/to/cachet + $ sudo php artisan key:generate + $ sudo php artisan config:cache + +2. 调用composer命令时有如下报错。 + + - danielstjules/stringy 1.10.0 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. + - laravel/framework v5.1.8 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. + - league/commonmark 0.10.0 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. + +**解决方案**:确保安装了必要的PHP扩展mbstring到你的系统上,并且兼容你的PHP。在基于Red Hat的系统上,由于我们从REMI-56库安装PHP,要从同一个库安装扩展。 + + $ sudo yum --enablerepo=remi-php56 install php-mbstring + +3. 你访问Cachet状态页面时得到一个白屏。HTTP日志显示如下错误。 + + PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/cachet/storage/logs/laravel-2015-08-21.log" could not be opened: failed to open stream: Permission denied' in /var/www/cachet/bootstrap/cache/compiled.php:12851 + +**解决方案**:尝试如下命令。 + + $ cd /var/www/cachet + $ sudo php artisan cache:clear + $ sudo chmod -R 777 storage + $ sudo composer dump-autoload + +如果上面的方法不起作用,试试禁止SELinux: + + $ sudo setenforce 0 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/setup-system-status-page.html + +作者:[Dan Nanni][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://cachethq.io/ +[2]:http://xmodulo.com/install-lamp-stack-ubuntu-server.html +[3]:http://ask.xmodulo.com/install-remi-repository-centos-rhel.html +[4]:http://xmodulo.com/install-lamp-stack-centos.html +[5]:http://xmodulo.com/configure-virtual-hosts-apache-http-server.html +[6]:http://xmodulo.com/monitor-common-services-nagios.html From a8737174ca2e6205174d4967072bbd173514a75e Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 1 Sep 2015 21:52:02 +0800 Subject: [PATCH 1956/2517] [Translate] RHCSA Series--Part op--Installing,Configuring and Securing a Web and FTP Server.md --- ...uring and Securing a Web and FTP Server.md | 178 ------------------ ...uring and Securing a Web and FTP Server.md | 175 +++++++++++++++++ 2 files changed, 175 insertions(+), 178 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md b/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md deleted file mode 100644 index 437612f124..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md +++ /dev/null @@ -1,178 +0,0 @@ -FSSlc Translating - -RHCSA Series: Installing, Configuring and Securing a Web and FTP Server – Part 9 -================================================================================ -A web server (also known as a HTTP server) is a service that handles content (most commonly web pages, but other types of documents as well) over to a client in a network. - -A FTP server is one of the oldest and most commonly used resources (even to this day) to make files available to clients on a network in cases where no authentication is necessary since FTP uses username and password without encryption. - -The web server available in RHEL 7 is version 2.4 of the Apache HTTP Server. As for the FTP server, we will use the Very Secure Ftp Daemon (aka vsftpd) to establish connections secured by TLS. - -![Configuring and Securing Apache and FTP Server](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Configure-Secure-Apache-FTP-Server.png) - -RHCSA: Installing, Configuring and Securing Apache and FTP – Part 9 - -In this article we will explain how to install, configure, and secure a web server and a FTP server in RHEL 7. - -### Installing Apache and FTP Server ### - -In this guide we will use a RHEL 7 server with a static IP address of 192.168.0.18/24. To install Apache and VSFTPD, run the following command: - - # yum update && yum install httpd vsftpd - -When the installation completes, both services will be disabled initially, so we need to start them manually for the time being and enable them to start automatically beginning with the next boot: - - # systemctl start httpd - # systemctl enable httpd - # systemctl start vsftpd - # systemctl enable vsftpd - -In addition, we have to open ports 80 and 21, where the web and ftp daemons are listening, respectively, in order to allow access to those services from the outside: - - # firewall-cmd --zone=public --add-port=80/tcp --permanent - # firewall-cmd --zone=public --add-service=ftp --permanent - # firewall-cmd --reload - -To confirm that the web server is working properly, fire up your browser and enter the IP of the server. You should see the test page: - -![Confirm Apache Web Server](http://www.tecmint.com/wp-content/uploads/2015/05/Confirm-Apache-Web-Server.png) - -Confirm Apache Web Server - -As for the ftp server, we will have to configure it further, which we will do in a minute, before confirming that it’s working as expected. - -### Configuring and Securing Apache Web Server ### - -The main configuration file for Apache is located in `/etc/httpd/conf/httpd.conf`, but it may rely on other files present inside `/etc/httpd/conf.d`. - -Although the default configuration should be sufficient for most cases, it’s a good idea to become familiar with all the available options as described in the [official documentation][1]. - -As always, make a backup copy of the main configuration file before editing it: - - # cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.$(date +%Y%m%d) - -Then open it with your preferred text editor and look for the following variables: - -- ServerRoot: the directory where the server’s configuration, error, and log files are kept. -- Listen: instructs Apache to listen on specific IP address and / or ports. -- Include: allows the inclusion of other configuration files, which must exist. Otherwise, the server will fail, as opposed to the IncludeOptional directive, which is silently ignored if the specified configuration files do not exist. -- User and Group: the name of the user/group to run the httpd service as. -- DocumentRoot: The directory out of which Apache will serve your documents. By default, all requests are taken from this directory, but symbolic links and aliases may be used to point to other locations. -- ServerName: this directive sets the hostname (or IP address) and port that the server uses to identify itself. - -The first security measure will consist of creating a dedicated user and group (i.e. tecmint/tecmint) to run the web server as and changing the default port to a higher one (9000 in this case): - - ServerRoot "/etc/httpd" - Listen 192.168.0.18:9000 - User tecmint - Group tecmint - DocumentRoot "/var/www/html" - ServerName 192.168.0.18:9000 - -You can test the configuration file with. - - # apachectl configtest - -and if everything is OK, then restart the web server. - - # systemctl restart httpd - -and don’t forget to enable the new port (and disable the old one) in the firewall: - - # firewall-cmd --zone=public --remove-port=80/tcp --permanent - # firewall-cmd --zone=public --add-port=9000/tcp --permanent - # firewall-cmd --reload - -Note that, due to SELinux policies, you can only use the ports returned by - - # semanage port -l | grep -w '^http_port_t' - -for the web server. - -If you want to use another port (i.e. TCP port 8100), you will have to add it to SELinux port context for the httpd service: - -# semanage port -a -t http_port_t -p tcp 8100 - -![Add Apache Port to SELinux Policies](http://www.tecmint.com/wp-content/uploads/2015/05/Add-Apache-Port-to-SELinux-Policies.png) - -Add Apache Port to SELinux Policies - -To further secure your Apache installation, follow these steps: - -1. The user Apache is running as should not have access to a shell: - - # usermod -s /sbin/nologin tecmint - -2. Disable directory listing in order to prevent the browser from displaying the contents of a directory if there is no index.html present in that directory. - -Edit `/etc/httpd/conf/httpd.conf` (and the configuration files for virtual hosts, if any) and make sure that the Options directive, both at the top and at Directory block levels, is set to None: - - Options None - -3. Hide information about the web server and the operating system in HTTP responses. Edit /etc/httpd/conf/httpd.conf as follows: - - ServerTokens Prod - ServerSignature Off - -Now you are ready to start serving content from your /var/www/html directory. - -### Configuring and Securing FTP Server ### - -As in the case of Apache, the main configuration file for Vsftpd `(/etc/vsftpd/vsftpd.conf)` is well commented and while the default configuration should suffice for most applications, you should become acquainted with the documentation and the man page `(man vsftpd.conf)` in order to operate the ftp server more efficiently (I can’t emphasize that enough!). - -In our case, these are the directives used: - - anonymous_enable=NO - local_enable=YES - write_enable=YES - local_umask=022 - dirmessage_enable=YES - xferlog_enable=YES - connect_from_port_20=YES - xferlog_std_format=YES - chroot_local_user=YES - allow_writeable_chroot=YES - listen=NO - listen_ipv6=YES - pam_service_name=vsftpd - userlist_enable=YES - tcp_wrappers=YES - -By using `chroot_local_user=YES`, local users will be (by default) placed in a chroot’ed jail in their home directory right after login. This means that local users will not be able to access any files outside their corresponding home directories. - -Finally, to allow ftp to read files in the user’s home directory, set the following SELinux boolean: - - # setsebool -P ftp_home_dir on - -You can now connect to the ftp server using a client such as Filezilla: - -![Check FTP Connection](http://www.tecmint.com/wp-content/uploads/2015/05/Check-FTP-Connection.png) - -Check FTP Connection - -Note that the `/var/log/xferlo`g log records downloads and uploads, which concur with the above directory listing: - -![Monitor FTP Download and Upload](http://www.tecmint.com/wp-content/uploads/2015/05/Monitor-FTP-Download-Upload.png) - -Monitor FTP Download and Upload - -Read Also: [Limit FTP Network Bandwidth Used by Applications in a Linux System with Trickle][2] - -### Summary ### - -In this tutorial we have explained how to set up a web and a ftp server. Due to the vastness of the subject, it is not possible to cover all the aspects of these topics (i.e. virtual web hosts). Thus, I recommend you also check other excellent articles in this website about [Apache][3]. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-series-install-and-secure-apache-web-server-and-ftp-in-rhel/ - -作者:[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://httpd.apache.org/docs/2.4/ -[2]:http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ -[3]:http://www.google.com/cse?cx=partner-pub-2601749019656699:2173448976&ie=UTF-8&q=virtual+hosts&sa=Search&gws_rd=cr&ei=Dy9EVbb0IdHisASnroG4Bw#gsc.tab=0&gsc.q=apache diff --git a/translated/tech/RHCSA/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md b/translated/tech/RHCSA/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md new file mode 100644 index 0000000000..190c32ece5 --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md @@ -0,0 +1,175 @@ +RHCSA 系列: 安装,配置及加固一个 Web 和 FTP 服务器 – Part 9 +================================================================================ +Web 服务器(也被称为 HTTP 服务器)是在网络中将内容(最为常见的是网页,但也支持其他类型的文件)进行处理并传递给客户端的服务。 + +FTP 服务器是最为古老且最常使用的资源之一(即便到今天也是这样),在身份认证不是必须的情况下,它可使得在一个网络里文件对于客户端可用,因为 FTP 使用没有加密的用户名和密码。 + +在 RHEL 7 中可用的 web 服务器是版本号为 2.4 的 Apache HTTP 服务器。至于 FTP 服务器,我们将使用 Very Secure Ftp Daemon (又名 vsftpd) 来建立用 TLS 加固的连接。 + +![配置和加固 Apache 和 FTP 服务器](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Configure-Secure-Apache-FTP-Server.png) + +RHCSA: 安装,配置及加固 Apache 和 FTP 服务器 – Part 9 + +在这篇文章中,我们将解释如何在 RHEL 7 中安装,配置和加固 web 和 FTP 服务器。 + +### 安装 Apache 和 FTP 服务器 ### + +在本指导中,我们将使用一个静态 IP 地址为 192.168.0.18/24 的 RHEL 7 服务器。为了安装 Apache 和 VSFTPD,运行下面的命令: + + # yum update && yum install httpd vsftpd + +当安装完成后,这两个服务在开始时是默认被禁用的,所以我们需要暂时手动开启它们并让它们在下一次启动时自动地开启它们: + + # systemctl start httpd + # systemctl enable httpd + # systemctl start vsftpd + # systemctl enable vsftpd + +另外,我们必须打开 80 和 21 端口,它们分别是 web 和 ftp 守护进程监听的端口,为的是允许从外面访问这些服务: + + # firewall-cmd --zone=public --add-port=80/tcp --permanent + # firewall-cmd --zone=public --add-service=ftp --permanent + # firewall-cmd --reload + +为了确认 web 服务工作正常,打开你的浏览器并输入服务器的 IP,则你应该可以看到如下的测试页面: + +![确认 Apache Web 服务器](http://www.tecmint.com/wp-content/uploads/2015/05/Confirm-Apache-Web-Server.png) + +确认 Apache Web 服务器 + +对于 ftp 服务器,在确保它如期望中的那样工作之前,我们必须进一步地配置它,我们将在几分钟后来做这件事。 + +### 配置并加固 Apache Web 服务器 ### + +Apache 的主要配置文件位于 `/etc/httpd/conf/httpd.conf` 中,但它可能依赖 `/etc/httpd/conf.d` 中的其他文件。 + +尽管默认的配置对于大多数的情形是充分的,熟悉描述在 [官方文档][1] 中的所有可用选项是一个不错的主意。 + +同往常一样,在编辑主配置文件前先做一个备份: + + # cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.$(date +%Y%m%d) + +然后用你钟爱的文本编辑器打开它,并查找下面这些变量: + +- ServerRoot: 服务器的配置,错误和日志文件保存的目录。 +- Listen: 通知 Apache 去监听特定的 IP 地址或端口。 +- Include: 允许包含其他配置文件,这个必须存在,否则,服务器将会崩溃。它恰好与 IncludeOptional 相反,假如特定的配置文件不存在,它将静默地忽略掉它们。 +- User 和 Group: 运行 httpd 服务的用户/组的名称。 +- DocumentRoot: Apache 为你的文档服务的目录。默认情况下,所有的请求将在这个目录中被获取,但符号链接和别名可能会被用于指向其他位置。 +- ServerName: 这个指令将设定用于识别它自身的主机名(或 IP 地址)和端口。 + +安全措施的第一步将包含创建一个特定的用户和组(如 tecmint/tecmint)来运行 web 服务器以及更改默认的端口为一个更高的端口(在这个例子中为 9000): + + ServerRoot "/etc/httpd" + Listen 192.168.0.18:9000 + User tecmint + Group tecmint + DocumentRoot "/var/www/html" + ServerName 192.168.0.18:9000 + +你可以使用下面的命令来测试配置文件: + + # apachectl configtest + +假如一切 OK,接着重启 web 服务器。 + + # systemctl restart httpd + +并别忘了在防火墙中开启新的端口(和禁用旧的端口): + + + # firewall-cmd --zone=public --remove-port=80/tcp --permanent + # firewall-cmd --zone=public --add-port=9000/tcp --permanent + # firewall-cmd --reload + +请注意,由于 SELinux 的策略,你只可使用如下命令所返回的端口来分配给 web 服务器。 + + # semanage port -l | grep -w '^http_port_t' + +假如你想使用另一个端口(如 TCP 端口 8100)来给 httpd 服务,你必须将它加到 SELinux 的端口上下文: + + # semanage port -a -t http_port_t -p tcp 8100 + +![添加 Apache 端口到 SELinux 策略](http://www.tecmint.com/wp-content/uploads/2015/05/Add-Apache-Port-to-SELinux-Policies.png) + +添加 Apache 端口到 SELinux 策略 + +为了进一步加固你安装的 Apache,请遵循以下步骤: + +1. 运行 Apache 的用户不应该拥有访问 shell 的能力: + + # usermod -s /sbin/nologin tecmint + +2. 禁用目录列表功能,为的是阻止浏览器展示一个未包含 index.html 文件的目录里的内容。 + +编辑 `/etc/httpd/conf/httpd.conf` (和虚拟主机的配置文件,假如有的话),并确保 Options 指令在顶级和目录块级别中(注:感觉这里我的翻译不对)都被设置为 None: + + Options None + +3. 在 HTTP 回应中隐藏有关 web 服务器和操作系统的信息。像下面这样编辑文件 `/etc/httpd/conf/httpd.conf`: + + ServerTokens Prod + ServerSignature Off + +现在,你已经做好了从 `/var/www/html` 目录开始服务内容的准备了。 + +### 配置并加固 FTP 服务器 ### + +和 Apache 的情形类似, Vsftpd 的主配置文件 `(/etc/vsftpd/vsftpd.conf)` 带有详细的注释,且虽然对于大多数的应用实例,默认的配置应该足够了,但为了更有效率地操作 ftp 服务器,你应该开始熟悉相关的文档和 man 页 `(man vsftpd.conf)`(对于这点,再多的强调也不为过!)。 + +在我们的示例中,使用了这些指令: + + anonymous_enable=NO + local_enable=YES + write_enable=YES + local_umask=022 + dirmessage_enable=YES + xferlog_enable=YES + connect_from_port_20=YES + xferlog_std_format=YES + chroot_local_user=YES + allow_writeable_chroot=YES + listen=NO + listen_ipv6=YES + pam_service_name=vsftpd + userlist_enable=YES + tcp_wrappers=YES + +通过使用 `chroot_local_user=YES`,(默认情况下)本地用户在登陆之后,将马上被置于一个位于用户家目录的 chroot 环境中(注:这里的翻译也不准确)。这意味着本地用户将不能访问除其家目录之外的任何文件。 + +最后,为了让 ftp 能够在用户的家目录中读取文件,设置如下的 SELinux 布尔值: + + # setsebool -P ftp_home_dir on + +现在,你可以使用一个客户端例如 Filezilla 来连接一个 ftp 服务器: + +![查看 FTP 连接](http://www.tecmint.com/wp-content/uploads/2015/05/Check-FTP-Connection.png) + +查看 FTP 连接 + +注意, `/var/log/xferlog` 日志将会记录下载和上传的情况,这与上图的目录列表一致: + +![监视 FTP 的下载和上传情况](http://www.tecmint.com/wp-content/uploads/2015/05/Monitor-FTP-Download-Upload.png) + +监视 FTP 的下载和上传情况 + +另外请参考: [在 Linux 系统中使用 Trickle 来限制应用使用的 FTP 网络带宽][2] + +### 总结 ### + +在本教程中,我们解释了如何设置 web 和 ftp 服务器。由于这个主题的广泛性,涵盖这些话题的所有方面是不可能的(如虚拟网络主机)。因此,我推荐你也阅读这个网站中有关 [Apache][3] 的其他卓越的文章。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-series-install-and-secure-apache-web-server-and-ftp-in-rhel/ + +作者:[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://httpd.apache.org/docs/2.4/ +[2]:http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ +[3]:http://www.google.com/cse?cx=partner-pub-2601749019656699:2173448976&ie=UTF-8&q=virtual+hosts&sa=Search&gws_rd=cr&ei=Dy9EVbb0IdHisASnroG4Bw#gsc.tab=0&gsc.q=apache From ee751a1697e297f7f0c1e432008759e8149853f9 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 1 Sep 2015 21:55:40 +0800 Subject: [PATCH 1957/2517] Update RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译这篇文章。 --- ...nd Network Traffic Control Using FirewallD and Iptables.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 index fd27f4c6fc..022953429d 100644 --- 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 @@ -1,3 +1,5 @@ +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). @@ -188,4 +190,4 @@ via: http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in [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 +[6]:http://www.tecmint.com/firewalld-rules-for-centos-7/ From c0dc3defc1c065b2b3c8ef18bf1948992f2e6654 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 1 Sep 2015 23:12:59 +0800 Subject: [PATCH 1958/2517] PUB:20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu @geekpi --- ...e Kids Having Fun With Linux Terminal In Ubuntu.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) rename {translated/share => published}/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md (68%) diff --git a/translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md b/published/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md similarity index 68% rename from translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md rename to published/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md index 3d0efff7b5..e7e2d88e03 100644 --- a/translated/share/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md +++ b/published/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md @@ -1,13 +1,10 @@ -看这些孩子在Ubuntu的Linux终端下玩耍 +看这些孩子在 Ubuntu 的 Linux 终端下玩耍 ================================================================================ -我发现了一个孩子们在他们的计算机教室里玩得很开心的视频。我不知道他们在哪里,但我猜测是在印度尼西亚或者马来西亚。 - -注:youtube 视频 - +我发现了一个孩子们在他们的计算机教室里玩得很开心的视频。我不知道他们在哪里,但我猜测是在印度尼西亚或者马来西亚。视频请自行搭梯子: http://www.youtube.com/z8taQPomp0Y ### 在Linux终端下面跑火车 ### -这里没有魔术。只是一个叫做“sl”的命令行工具。我假定它是在把ls打错的情况下为了好玩而开发的。如果你曾经在Linux的命令行下工作,你会知道ls是一个最常使用的一个命令,也许也是一个最经常打错的命令。 +这里没有魔术。只是一个叫做“sl”的命令行工具。我想它是在把ls打错的情况下为了好玩而开发的。如果你曾经在Linux的命令行下工作,你会知道ls是一个最常使用的一个命令,也许也是一个最经常打错的命令。 如果你想从这个终端下的火车获得一些乐趣,你可以使用下面的命令安装它。 @@ -30,7 +27,7 @@ via: http://itsfoss.com/ubuntu-terminal-train/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From bb56ba76bec513c707365f6ef9b866cfbbca79f8 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 1 Sep 2015 23:39:27 +0800 Subject: [PATCH 1959/2517] PUB:20150722 Howto Interactively Perform Tasks with Docker using Kitematic @ictlyh --- ...rform Tasks with Docker using Kitematic.md | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md (60%) diff --git a/translated/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md b/published/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md similarity index 60% rename from translated/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md rename to published/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md index 8ad03dd06c..ac93dceb50 100644 --- a/translated/tech/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md +++ b/published/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md @@ -1,8 +1,9 @@ -如何在 Docker 中通过 Kitematic 交互式执行任务 +如何在 Windows 上通过 Kitematic 使用 Docker ================================================================================ -在本篇文章中,我们会学习如何在 Windows 操作系统上安装 Kitematic 以及部署一个 Hello World Nginx Web 服务器。Kitematic 是一个自由开源软件,它有现代化的界面设计使得允许我们在 Docker 中交互式执行任务。Kitematic 设计非常漂亮、界面也很不错。我们可以简单快速地开箱搭建我们的容器而不需要输入命令,我们可以在图形用户界面中通过简单的点击从而在容器上部署我们的应用。Kitematic 集成了 Docker Hub,允许我们搜索、拉取任何需要的镜像,并在上面部署应用。它同时也能很好地切换到命令行用户接口模式。目前,它包括了自动映射端口、可视化更改环境变量、配置卷、精简日志以及其它功能。 -下面是在 Windows 上安装 Kitematic 并部署 Hello World Nginx Web 服务器的 3 个简单步骤。 +在本篇文章中,我们会学习如何在 Windows 操作系统上安装 Kitematic 以及部署一个测试性的 Nginx Web 服务器。Kitematic 是一个具有现代化的界面设计的自由开源软件,它可以让我们在 Docker 中交互式执行任务。Kitematic 设计的非常漂亮、界面美观。使用它,我们可以简单快速地开箱搭建我们的容器而不需要输入命令,可以在图形用户界面中通过简单的点击从而在容器上部署我们的应用。Kitematic 集成了 Docker Hub,允许我们搜索、拉取任何需要的镜像,并在上面部署应用。它同时也能很好地切换到命令行用户接口模式。目前,它包括了自动映射端口、可视化更改环境变量、配置卷、流式日志以及其它功能。 + +下面是在 Windows 上安装 Kitematic 并部署测试性 Nginx Web 服务器的 3 个简单步骤。 ### 1. 下载 Kitematic ### @@ -16,15 +17,15 @@ ### 2. 安装 Kitematic ### -下载好可执行安装程序之后,我们现在打算在我们的 Windows 操作系统上安装 Kitematic。安装程序现在会开始下载并安装运行 Kitematic 需要的依赖,包括 Virtual Box 和 Docker。如果已经在系统上安装了 Virtual Box,它会把它升级到最新版本。安装程序会在几分钟内完成,但取决于你网络和系统的速度。如果你还没有安装 Virtual Box,它会问你是否安装 Virtual Box 网络驱动。建议安装它,因为它有助于 Virtual Box 的网络。 +下载好可执行安装程序之后,我们现在就可以在我们的 Windows 操作系统上安装 Kitematic了。安装程序现在会开始下载并安装运行 Kitematic 需要的依赖软件,包括 Virtual Box 和 Docker。如果已经在系统上安装了 Virtual Box,它会把它升级到最新版本。安装程序会在几分钟内完成,但取决于你网络和系统的速度。如果你还没有安装 Virtual Box,它会问你是否安装 Virtual Box 网络驱动。建议安装它,因为它用于 Virtual Box 的网络功能。 ![安装 Kitematic](http://blog.linoxide.com/wp-content/uploads/2015/06/installing-kitematic.png) -需要的依赖 Docker 和 Virtual Box 安装完成并运行后,会让我们登录到 Docker Hub。如果我们还没有账户或者还不想登录,可以点击 **SKIP FOR NOW** 继续后面的步骤。 +所需的依赖 Docker 和 Virtual Box 安装完成并运行后,会让我们登录到 Docker Hub。如果我们还没有账户或者还不想登录,可以点击 **SKIP FOR NOW** 继续后面的步骤。 ![登录 Docker Hub](http://blog.linoxide.com/wp-content/uploads/2015/06/login-docker-hub.jpg) -如果你还没有账户,你可以在应用程序上点击注册链接并在 Docker Hub 上创建账户。 +如果你还没有账户,你可以在应用程序上点击注册(Sign Up)链接并在 Docker Hub 上创建账户。 完成之后,就会出现 Kitematic 应用程序的第一个界面。正如下面看到的这样。我们可以搜索可用的 docker 镜像。 @@ -50,7 +51,11 @@ ### 总结 ### -我们终于成功在 Windows 操作系统上安装了 Kitematic 并部署了一个 Hello World Ngnix 服务器。总是推荐下载安装 Kitematic 最新的发行版,因为会增加很多新的高级功能。由于 Docker 运行在 64 位平台,当前 Kitematic 也是为 64 位操作系统构建。它只能在 Windows 7 以及更高版本上运行。在这篇教程中,我们部署了一个 Nginx Web 服务器,类似地我们可以在 Kitematic 中简单的点击就能通过镜像部署任何 docker 容器。Kitematic 已经有可用的 Mac OS X 和 Windows 版本,Linux 版本也在开发中很快就会发布。如果你有任何疑问、建议或者反馈,请在下面的评论框中写下来以便我们更改地改进或更新我们的内容。非常感谢!Enjoy :-) +我们终于成功在 Windows 操作系统上安装了 Kitematic 并部署了一个 Hello World Ngnix 服务器。推荐下载安装 Kitematic 最新的发行版,因为会增加很多新的高级功能。由于 Docker 运行在 64 位平台,当前 Kitematic 也是为 64 位操作系统构建。它只能在 Windows 7 以及更高版本上运行。 + +在这篇教程中,我们部署了一个 Nginx Web 服务器,类似地我们可以在 Kitematic 中简单的点击就能通过镜像部署任何 docker 容器。Kitematic 已经有可用的 Mac OS X 和 Windows 版本,Linux 版本也在开发中很快就会发布。 + +如果你有任何疑问、建议或者反馈,请在下面的评论框中写下来以便我们更改地改进或更新我们的内容。非常感谢!Enjoy :-) -------------------------------------------------------------------------------- @@ -58,7 +63,7 @@ via: http://linoxide.com/linux-how-to/interactively-docker-kitematic/ 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 33d8630650a99d389246091d55d1c540cdd0b757 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 1 Sep 2015 23:46:42 +0800 Subject: [PATCH 1960/2517] Delete 20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md --- ...r Upgrade to Linux Kernel 4.2 in Ubuntu.md | 89 ------------------- 1 file changed, 89 deletions(-) delete mode 100644 sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md diff --git a/sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md b/sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md deleted file mode 100644 index b26e225586..0000000000 --- a/sources/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md +++ /dev/null @@ -1,89 +0,0 @@ -translation by strugglingyouth -How to Install / Upgrade to Linux Kernel 4.2 in Ubuntu -================================================================================ -![](http://ubuntuhandbook.org/wp-content/uploads/2014/12/linux-kernel-icon-tux.png) - -Linux Kernel 4.2 was released yesterday, at noon. Linus Torvalds wrote on [lkml.org][1]: - -> So judging by how little happened this week, it wouldn’t have been a mistake to release 4.2 last week after all, but hey, there’s certainly a few fixes here, and it’s not like delaying 4.2 for a week should have caused any problems either. -> -> So here it is, and the merge window for 4.3 is now open. I already have a few pending early pull requests, but as usual I’ll start processing them tomorrow and give the release some time to actually sit. -> -> The shortlog from rc8 is tiny, and appended. The patch is pretty tiny too… - -### What’s New in Kernel 4.2: ### - -- rewrites of Intel Assembly x86 code -- support for new ARM boards and SoCs -- F2FS per-file encryption -- The AMDGPU kernel DRM driver -- VCE1 video encode support for the Radeon DRM driver -- Initial support for Intel Broxton Atom SoCs -- Support for ARCv2 and HS38 CPU cores. -- added queue spinlocks support -- many other improvements and updated drivers. - -### How to Install Kernel 4.2 in Ubuntu: ### - -The binary packages of this kernel release are available for download at link below: - -- [Download Kernel 4.2 (.DEB)][1] - -First check out your OS type, 32-bit (i386) or 64-bit (amd64), then download and install the packages below in turn: - -1. linux-headers-4.2.0-xxx_all.deb -1. linux-headers-4.2.0-xxx-generic_xxx_i386/amd64.deb -1. linux-image-4.2.0-xxx-generic_xxx_i386/amd64.deb - -After installing the kernel, you may run `sudo update-grub` command in terminal (Ctrl+Alt+T) to refresh grub boot-loader. - -If you need a low latency system (e.g. for recording audio) then download & install below packages instead: - -1. linux-headers-4.2.0_xxx_all.deb -1. linux-headers-4.2.0-xxx-lowlatency_xxx_i386/amd64.deb -1. linux-image-4.2.0-xxx-lowlatency_xxx_i386/amd64.deb - -For Ubuntu Server without a graphical UI, you may run below commands one by one to grab packages via wget and install them via dpkg: - -For 64-bit system run: - - cd /tmp/ - - wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200_4.2.0-040200.201508301530_all.deb - - wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200-generic_4.2.0-040200.201508301530_amd64.deb - - wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-image-4.2.0-040200-generic_4.2.0-040200.201508301530_amd64.deb - - sudo dpkg -i linux-headers-4.2.0-*.deb linux-image-4.2.0-*.deb - -For 32-bit system, run: - - cd /tmp/ - - wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200_4.2.0-040200.201508301530_all.deb - - wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200-generic_4.2.0-040200.201508301530_i386.deb - - wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-image-4.2.0-040200-generic_4.2.0-040200.201508301530_i386.deb - - sudo dpkg -i linux-headers-4.2.0-*.deb linux-image-4.2.0-*.deb - -Finally restart your computer to take effect. - -To revert back, remove old kernels, see [install kernel simply via a script][3]. - --------------------------------------------------------------------------------- - -via: http://ubuntuhandbook.org/index.php/2015/08/upgrade-kernel-4-2-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://lkml.org/lkml/2015/8/30/96 -[2]:http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/ -[3]:http://ubuntuhandbook.org/index.php/2015/08/install-latest-kernel-script/ From f7d25f28a1fe4099e8ffa1203683caa827215f8b Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 1 Sep 2015 23:47:13 +0800 Subject: [PATCH 1961/2517] Create 20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md --- ...r Upgrade to Linux Kernel 4.2 in Ubuntu.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 translated/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md diff --git a/translated/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md b/translated/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md new file mode 100644 index 0000000000..71d4985fe0 --- /dev/null +++ b/translated/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md @@ -0,0 +1,94 @@ + +在 Ubuntu 中如何安装/升级 Linux 内核到4.2 +================================================================================ +![](http://ubuntuhandbook.org/wp-content/uploads/2014/12/linux-kernel-icon-tux.png) + +Linux 内核4.2在昨天中午被公布。Linus Torvalds 写了 [lkml.org][1]: + +> 通过这周的小的变动,4.2版本应该不会有问题,毕竟这是最后一周,但在这里有几个补丁,4.2延迟一个星期也会引发问题。 + +> + +> 所以在这里它是,并且4.3的合并窗口现已开放。我已经早期引入了几个悬而未决的请求,但像往常一样,我会从明天开始处理它们,并会发布完成的时间。 + +> + +> 从 rc8 中的 shortlog 非常小,并且是追加的。这个补丁也很完美... + + +### 新内核 4.2 有哪些改进?: ### + +- 英特尔的x86汇编代码重写 +- 支持新的 ARM 板和 SoCs +- 对 F2FS 的 per-file 加密 +- 有 AMDGPU 内核 DRM 驱动程序 +- 使用Radeon DRM 来支持 VCE1 视频编码 +- 初步支持英特尔的 Broxton Atom SoCs +- 支持ARCv2和HS38 CPU内核。 +- 增加了排队自旋锁的支持 +- 许多其他的改进和驱动更新。 + +### 在 Ubuntu 中如何下载4.2内核 : ### + +此内核版本的二进制包可供下载链接如下: + +- [下载 4.2 内核(.DEB)][1] + +首先检查你的操作系统类型,32位(i386)的或64位(amd64)的,然后使用下面的方式依次下载并安装软件包: + +1. linux-headers-4.2.0-xxx_all.deb +1. linux-headers-4.2.0-xxx-generic_xxx_i386/amd64.deb +1. linux-image-4.2.0-xxx-generic_xxx_i386/amd64.deb + +安装内核后,在终端((Ctrl+Alt+T))运行`sudo update-grub`命令来更新 grub boot-loader。 + +如果你需要一个低延迟系统(例如用于录制音频),请下载并安装下面的包: + +1. linux-headers-4.2.0_xxx_all.deb +1. linux-headers-4.2.0-xxx-lowlatency_xxx_i386/amd64.deb +1. linux-image-4.2.0-xxx-lowlatency_xxx_i386/amd64.deb + +对于没有图形用户界面的 Ubuntu 服务器,你可以运行下面的命令通过 wget 来逐一抓下载,并通过 dpkg 来安装: + +对于64位的系统请运行: + + cd /tmp/ + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200_4.2.0-040200.201508301530_all.deb + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200-generic_4.2.0-040200.201508301530_amd64.deb + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-image-4.2.0-040200-generic_4.2.0-040200.201508301530_amd64.deb + + sudo dpkg -i linux-headers-4.2.0-*.deb linux-image-4.2.0-*.deb + +对于32位的系统,请运行: + + cd /tmp/ + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200_4.2.0-040200.201508301530_all.deb + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-headers-4.2.0-040200-generic_4.2.0-040200.201508301530_i386.deb + + wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/linux-image-4.2.0-040200-generic_4.2.0-040200.201508301530_i386.deb + + sudo dpkg -i linux-headers-4.2.0-*.deb linux-image-4.2.0-*.deb + +最后,重新启动计算机才能生效。 + +要恢复或删除旧的内核,请参阅[通过脚本安装内核][3]。 + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/08/upgrade-kernel-4-2-ubuntu/ + +作者:[Ji m][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ubuntuhandbook.org/index.php/about/ +[1]:https://lkml.org/lkml/2015/8/30/96 +[2]:http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.2-unstable/ +[3]:http://ubuntuhandbook.org/index.php/2015/08/install-latest-kernel-script/ From 411308a16dfdcafbb88c9895c858220f4cee43fd Mon Sep 17 00:00:00 2001 From: Mike Tang Date: Tue, 1 Sep 2015 23:51:53 +0800 Subject: [PATCH 1962/2517] sources/tech/20150901 Setting Up High-Performance HHVM and Nginx or Apache with MariaDB on Debian or Ubuntu.md --- ...and Nginx or Apache with MariaDB on Debian or Ubuntu.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md b/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md index d157b2b7aa..ef8897a39e 100644 --- a/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md +++ b/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md @@ -1,7 +1,8 @@ -Setting Up High-Performance ‘HHVM’ and Nginx/Apache with MariaDB on Debian/Ubuntu +translating by mike +在 Debian 或者 Ubuntu 上配置高性能的 HHVM、Nginx/Apache 和 MariaDB ================================================================================ HHVM stands for HipHop Virtual Machine, is an open source virtual machine created for running Hack (it’s a programming language for HHVM) and PHP written applications. HHVM uses a last minute compilation path to achieve remarkable performance while keeping the flexibility that PHP programmers are addicted to. Till date, HHVM has achieved over a 9x increase in http request throughput and more than 5x cut in memory utilization (when running on low system memory) for Facebook compared with the PHP engine + [APC (Alternative PHP Cache)][1]. - +HHVM全称为 HipHop Virtual Machine, 它是一个由 running Hack(一种编程语言)和 PHP的相关应用组成的开源虚拟机。HHVM HHVM can also be used along with a FastCGI-based web-server like Nginx or Apache. ![Install HHVM, Nginx and Apache with MariaDB](http://www.tecmint.com/wp-content/uploads/2015/08/Install-HHVM-Nginx-Apache-MariaDB.png) @@ -179,4 +180,4 @@ via: http://www.tecmint.com/install-hhvm-and-nginx-apache-with-mariadb-on-debian 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/admin/ -[1]:http://www.tecmint.com/install-apc-alternative-php-cache-in-rhel-centos-fedora/ \ No newline at end of file +[1]:http://www.tecmint.com/install-apc-alternative-php-cache-in-rhel-centos-fedora/ From 426c7e2414476858426cb605a62cb52a4a87a504 Mon Sep 17 00:00:00 2001 From: Mike Tang Date: Wed, 2 Sep 2015 00:48:54 +0800 Subject: [PATCH 1963/2517] sources/tech/20150901 Setting Up High-Performance HHVM and Nginx or Apache with MariaDB on Debian or Ubuntu.md --- ...Apache with MariaDB on Debian or Ubuntu.md | 107 +++++++++--------- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md b/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md index ef8897a39e..60b2137c55 100644 --- a/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md +++ b/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md @@ -1,19 +1,21 @@ -translating by mike 在 Debian 或者 Ubuntu 上配置高性能的 HHVM、Nginx/Apache 和 MariaDB ================================================================================ -HHVM stands for HipHop Virtual Machine, is an open source virtual machine created for running Hack (it’s a programming language for HHVM) and PHP written applications. HHVM uses a last minute compilation path to achieve remarkable performance while keeping the flexibility that PHP programmers are addicted to. Till date, HHVM has achieved over a 9x increase in http request throughput and more than 5x cut in memory utilization (when running on low system memory) for Facebook compared with the PHP engine + [APC (Alternative PHP Cache)][1]. -HHVM全称为 HipHop Virtual Machine, 它是一个由 running Hack(一种编程语言)和 PHP的相关应用组成的开源虚拟机。HHVM +HHVM全称为 HipHop Virtual Machine, 它是一个由 running Hack(一种编程语言)和 PHP的相关应用组成的开源虚拟机。HHVM 在保证了 PHP 程序员最关注的高灵活性的要求下,通过使用最新编译结果的方式来达到一个客观的性能。到目前为止,HHVM 为 FaceBook 在 HTTP 请求的吞吐量上提高了9倍的性能,在内存的占用上,减少了5倍左右的内存占用。 + ++ [APC (Alternative PHP Cache)][1]. + HHVM can also be used along with a FastCGI-based web-server like Nginx or Apache. +同时,HHVM 也可以通过 FastCGI 接口,与像 Nginx 或者 Apache 进行集成。 ![Install HHVM, Nginx and Apache with MariaDB](http://www.tecmint.com/wp-content/uploads/2015/08/Install-HHVM-Nginx-Apache-MariaDB.png) -Install HHVM, Nginx and Apache with MariaDB +安装 HHVM,Nginx和 Apache 还有 MariaDB -In this tutorial we shall look at steps for setting up Nginx/Apache web server, MariaDB database server and HHVM. For this setup, we will use Ubuntu 15.04 (64-bit) as HHVM runs on 64-bit system only, although Debian and Linux Mint distributions are also supported. +在本教程中,我们一起来进行 Nginx/Apache web 服务器、 数据库服务器 MariaDB 和 HHVM 的设置。设置中,我们将使用 Ubuntu 15.04 (64 位),同时,该教程也适用于 Debian 和 Linux Mint。 -### Step 1: Installing Nginx and Apache Web Server ### +### Step 1: 安装 Nginx 或者 Apache 服务器 ### -1. First do a system upgrade to update repository list with the help of following commands. +1. 首先,先进行一次系统的升级或者更新软件仓库列表. # apt-get update && apt-get upgrade @@ -21,139 +23,138 @@ In this tutorial we shall look at steps for setting up Nginx/Apache web server, System Upgrade -2. As I said HHVM can be used with both Nginx and Apache web server. So, it’s your choice which web server you will going to use, but here we will show you both web servers installation and how to use them with HHVM. +2. 正如我之前说的,HHVM 能和 Nginx 和 Apache 进行集成。所以,究竟使用哪个服务器,这是你的自由,不过,我们会教你如何安装这两个服务器。 -#### Installing Nginx #### +#### 安装 Nginx #### -In this step, we will install Nginx/Apache web server from the packages repository using following command. +我们通过下面的命令安装 Nginx/Apache 服务器 # apt-get install nginx ![Install Nginx Web Server](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Nginx-Web-Server.png) -Install Nginx Web Server +安装 Nginx 服务器 -#### Installing Apache #### +#### 安装 Apache #### # apt-get install apache2 ![Install Apache Web Server](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Apache-Web-Server.png) -Install Apache Web Server +安装 Apache 服务器 -At this point, you should be able to navigate to following URL and you will able to see Nginx or Apache default page. +完成这一步,你能通过以下的链接看到 Nginx 或者 Apache 的默认页面 http://localhost OR http://IP-Address -#### Nginx Default Page #### +#### Nginx 默认页面 #### ![Nginx Welcome Page](http://www.tecmint.com/wp-content/uploads/2015/08/Nginx-Welcome-Page.png) -Nginx Welcome Page +Nginx 默认页面 -#### Apache Default Page #### +#### Apache 默认页面 #### ![Apache Default Page](http://www.tecmint.com/wp-content/uploads/2015/08/Apache-Default-Page.png) -Apache Default Page +Apache 默认页面 -### Step 2: Install and Configure MariaDB ### +### Step 2: 安装和配置 MariaDB ### -3. In this step, we will install MariaDB, as it providers better performance as compared to MySQL. +3. 这一步,我们将通过如下命令安装 MariaDB,它是一个比 MySQL 更好的数据库 # apt-get install mariadb-client mariadb-server ![Install MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/08/Install-MariaDB-Database.png) -Install MariaDB Database +安装 MariaDB -4. After MariaDB successful installation, you can start MariaDB and set root password to secure the database: +4. 在 MariaDB 成功安装之后,你可以启动它,并且设置 root 密码来保护数据库: # systemctl start mysql # mysql_secure_installation -Answer the following questions by typing `y` or `n` and press enter. Make sure you read the instructions carefully before answering the questions. +回答以下问题,只需要按下`y`或者 `n`并且回车。请确保你仔细的阅读过说明。 Enter current password for root (enter for none) = press enter Set root password? [Y/n] = y Remove anonymous users[y/n] = y Disallow root login remotely[y/n] = y Remove test database and access to it [y/n] = y - Reload privileges tables now[y/n] = y + Reload privileges tables now[y/n] = y -5. After setting root password for MariaDB, you can connect to MariaDB prompt with the new root password. +5. 在设置了密码之后,你就可以登陆 MariaDB 了。 # mysql -u root -p -### Step 3: Installation of HHVM ### +### Step 3: 安装 HHVM ### -6. At this stage we shall install and configure HHVM. You need to add the HHVM repository to your `sources.list` file and then you have to update your repository list using following series of commands. +6. 我们需要添加 HHVM 的仓库到你的`sources.list`文件中,然后更新软件列表。 # wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | apt-key add - # echo deb http://dl.hhvm.com/ubuntu DISTRIBUTION_VERSION main | sudo tee /etc/apt/sources.list.d/hhvm.list # apt-get update -**Important**: Don’t forget to replace DISTRIBUTION_VERSION with your Ubuntu distribution version (i.e. lucid, precise, or trusty.) and also on Debian replace with jessie or wheezy. On Linux Mint installation instructions are same, but petra is the only currently supported distribution. +**重要**:不要忘记用你的 Ubuntu 发行版型号替换上述的DISTRIBUTION_VERSION (比如:lucid, precise, trusty) 或者是 Debian 的 jessie 或者 wheezy。在 Linux Mint 中也是一样的,不过只支持 petra。 -After adding HHVM repository, you can easily install it as shown. +添加了 HHVM 仓库之后,你就可以安装了。 # apt-get install -y hhvm -Installing HHVM will start it up now, but it not configured to auto start at next system boot. To set auto start at next boot use the following command. +安装之后,即可启动它,但是它并没有做到开机启动。可以用如下命令做到开机启动。 # update-rc.d hhvm defaults -### Step 4: Configuring Nginx/Apache to Talk to HHVM ### +### Step 4: 配置 Nginx/Apache 连接 HHVM ### -7. Now, nginx/apache and HHVM are installed and running as independent, so we need to configure both web servers to talk to each other. The crucial part is that we have to tell nginx/apache to forward all PHP files to HHVM to execute. +7. 现在,nginx/apache 和 HHVM 都已经安装完成了,并且都独立运行起来了,所以我们需要对他们进行设置,来让他们互相关联。这个关键的步骤,就是需要nginx/apache 将所有的 php 文件,都交给 HHVM 进行处理。 -If you are using Nginx, follow this instructions as explained.. +如果你用了 Nginx,请按照如下步骤: -By default, the nginx configuration lives under /etc/nginx/sites-available/default and these config looks in /usr/share/nginx/html for files to execute, but it don’t know what to do with PHP. +nginx 的配置文件在 /etc/nginx/sites-available/default, 并且这些配置文件会在 /usr/share/nginx/html 中寻找文件执行,不过,他不知道如何处理 PHP。 -To make Nginx to talk with HHVM, we need to run the following include script that will configure nginx correctly by placing a hhvm.conf at the beginning of the nginx config as mentioned above. +为了确保 Nginx 可以连接 HHVM,我们需要执行如下的脚本。他可以帮助我们正确的配置 Nginx。 -This script makes the nginx to talk to any file that ends with .hh or .php and send it to HHVM via fastcgi. +这个脚本可以确保 Nginx 可以对 .hh 和 .php 的做正确的处理,并且通过 fastcgi 与 HHVM 进行通信 # /usr/share/hhvm/install_fastcgi.sh ![Configure Nginx for HHVM](http://www.tecmint.com/wp-content/uploads/2015/08/Configure-Nginx-for-HHVM.png) -Configure Nginx for HHVM +配置 Nginx、HHVM -**Important**: If you are using Apache, there isn’t any configuration is needed now. +**重要**: 如果你使用的是 Apache,这边就不需要进行配置了 -8. Next, you need to use /usr/bin/hhvm to provide /usr/bin/php (php) by running this command below. +8. 接下来,你需要使用 hhvm 来提供 php 的运行环境。 # /usr/bin/update-alternatives --install /usr/bin/php php /usr/bin/hhvm 60 -After all the above steps are done, you can now start HHVM and test it. +以上步骤完成之后,你现在可以启动并且测试他了。 # systemctl start hhvm -### Step 5: Testing HHVM with Nginx/Apache ### +### Step 5: 测试 HHVM 和 Nginx/Apache ### -9. To verify that hhvm working, you need to create a hello.php file under nginx/apache document root directory. +9. 为了确认 hhvm 是否工作,你需要在 nginx/apache 的根目录下建立 hello.php。 # nano /usr/share/nginx/html/hello.php [For Nginx] OR # nano /var/www/html/hello.php [For Nginx and Apache] -Add the following snippet to this file. +在文件中添加如下代码: -and then navigate to the following URL and verify to see “hello world“. +然后访问如下链接,确认自己能否看到 "hello world" http://localhost/info.php OR @@ -163,18 +164,18 @@ and then navigate to the following URL and verify to see “hello world“. HHVM Page -If “HHVM” page appears, then it means you’re all set! +如果 “HHVM” 的页面出现了,那就说明你成功了 -### Conclusion ### +### 结论 ### -These steps are very easy to follow and hope your find this tutorial useful and if you get any error during installation of any packages, post a comment and we shall find solutions together. And any additional ideas are welcome. +以上的步骤都是非常简单的,希望你能觉得这是一篇有用的教程,如果你在以上的步骤中遇到了问题,给我们留一个评论,我们将全力解决。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/install-hhvm-and-nginx-apache-with-mariadb-on-debian-ubuntu/ 作者:[Ravi Saive][a] -译者:[译者ID](https://github.com/译者ID) +译者:[MikeCoder](https://github.com/MikeCoder) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8c011f677e747b487f06aac6fce2154c2bc50403 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 2 Sep 2015 00:49:59 +0800 Subject: [PATCH 1964/2517] PUB:20150813 Linux file system hierarchy v2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @tnuoccalanosrep 这是你的第一篇吧?翻译的还不错。加油! --- ...150813 Linux file system hierarchy v2.0.md | 440 ++++++++++++++++++ ...150813 Linux file system hierarchy v2.0.md | 432 ----------------- 2 files changed, 440 insertions(+), 432 deletions(-) create mode 100644 published/20150813 Linux file system hierarchy v2.0.md delete mode 100644 translated/tech/20150813 Linux file system hierarchy v2.0.md diff --git a/published/20150813 Linux file system hierarchy v2.0.md b/published/20150813 Linux file system hierarchy v2.0.md new file mode 100644 index 0000000000..6a68efbd67 --- /dev/null +++ b/published/20150813 Linux file system hierarchy v2.0.md @@ -0,0 +1,440 @@ +Linux 文件系统结构介绍 +================================================================================ + +![](http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-file-system-hierarchy-v2.0-2480px-blackMORE-Ops.png) + +Linux中的文件是什么?它的文件系统又是什么?那些配置文件又在哪里?我下载好的程序保存在哪里了?在 Linux 中文件系统是标准结构的吗?好了,上图简明地阐释了Linux的文件系统的层次关系。当你苦于寻找配置文件或者二进制文件的时候,这便显得十分有用了。我在下方添加了一些解释以及例子,不过“篇幅较长,可以有空再看”。 + +另外一种情况便是当你在系统中获取配置以及二进制文件时,出现了不一致性问题,如果你是在一个大型组织中,或者只是一个终端用户,这也有可能会破坏你的系统(比如,二进制文件运行在旧的库文件上了)。若然你在[你的Linux系统上做安全审计][1]的话,你将会发现它很容易遭到各种攻击。所以,保持一个清洁的操作系统(无论是Windows还是Linux)都显得十分重要。 + +### Linux的文件是什么? ### + +对于UNIX系统来说(同样适用于Linux),以下便是对文件简单的描述: + +> 在UNIX系统中,一切皆为文件;若非文件,则为进程 + +这种定义是比较正确的,因为有些特殊的文件不仅仅是普通文件(比如命名管道和套接字),不过为了让事情变的简单,“一切皆为文件”也是一个可以让人接受的说法。Linux系统也像UNIX系统一样,将文件和目录视如同物,因为目录只是一个包含了其他文件名的文件而已。程序、服务、文本、图片等等,都是文件。对于系统来说,输入和输出设备,基本上所有的设备,都被当做是文件。 + +题图版本历史: + +- Version 2.0 – 17-06-2015 + - – Improved: 添加标题以及版本历史 + - – Improved: 添加/srv,/meida和/proc + - – Improved: 更新了反映当前的Linux文件系统的描述 + - – Fixed: 多处的打印错误 + - – Fixed: 外观和颜色 +- Version 1.0 – 14-02-2015 + - – Created: 基本的图表 + - – Note: 摒弃更低的版本 + +### 下载链接 ### + +以下是大图的下载地址。如果你需要其他格式,请跟原作者联系,他会尝试制作并且上传到某个地方以供下载 + +- [大图 (PNG 格式) – 2480×1755 px – 184KB][2] +- [最大图 (PDF 格式) – 9919x7019 px – 1686KB][3] + +**注意**: PDF格式文件是打印的最好选择,因为它画质很高。 + +### Linux 文件系统描述 ### + +为了有序地管理那些文件,人们习惯把这些文件当做是硬盘上的有序的树状结构,正如我们熟悉的'MS-DOS'(磁盘操作系统)就是一个例子。大的分枝包括更多的分枝,分枝的末梢是树的叶子或者普通的文件。现在我们将会以这树形图为例,但晚点我们会发现为什么这不是一个完全准确的一幅图。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
目录描述
+ / + 主层次 的根,也是整个文件系统层次结构的根目录
+ /bin + 存放在单用户模式可用的必要命令二进制文件,所有用户都可用,如 cat、ls、cp等等
+ /boot + 存放引导加载程序文件,例如kernels、initrd等
+ /dev + 存放必要的设备文件,例如/dev/null
+ /etc + 存放主机特定的系统级配置文件。其实这里有个关于它名字本身意义上的的争议。在贝尔实验室的UNIX实施文档的早期版本中,/etc表示是“其他(etcetera)目录”,因为从历史上看,这个目录是存放各种不属于其他目录的文件(然而,文件系统目录标准 FSH 限定 /etc 用于存放静态配置文件,这里不该存有二进制文件)。早期文档出版后,这个目录名又重新定义成不同的形式。近期的解释中包含着诸如“可编辑文本配置”或者“额外的工具箱”这样的重定义
+ + + /etc/opt + + + 存储着新增包的配置文件 /opt/.
+ + + /etc/sgml + + + 存放配置文件,比如 catalogs,用于那些处理SGML(译者注:标准通用标记语言)的软件的配置文件
+ + + /etc/X11 + + + X Window 系统11版本的的配置文件
+ + + /etc/xml + + + 配置文件,比如catalogs,用于那些处理XML(译者注:可扩展标记语言)的软件的配置文件
+ /home + 用户的主目录,包括保存的文件,个人配置,等等
+ /lib + /bin//sbin/中的二进制文件的必需的库文件
+ /lib<架构位数> + 备用格式的必要的库文件。 这样的目录是可选的,但如果他们存在的话肯定是有需要用到它们的程序
+ /media + 可移动的多媒体(如CD-ROMs)的挂载点。(出现于 FHS-2.3)
+ /mnt + 临时挂载的文件系统
+ /opt + 可选的应用程序软件包
+ /proc + 以文件形式提供进程以及内核信息的虚拟文件系统,在Linux中,对应进程文件系统(procfs )的挂载点
+ /root + 根用户的主目录
+ /sbin + 必要的系统级二进制文件,比如, init, ip, mount
+ /srv + 系统提供的站点特定数据
+ /tmp + 临时文件 (另见 /var/tmp). 通常在系统重启后删除
+ /usr + 二级层级存储用户的只读数据; 包含(多)用户主要的公共文件以及应用程序
+ + + /usr/bin + + + 非必要的命令二进制文件 (在单用户模式中不需要用到的);用于所有用户
+ + + /usr/include + + + 标准的包含文件
+ + + /usr/lib + + + 库文件,用于/usr/bin//usr/sbin/中的二进制文件
+ + + /usr/lib<架构位数> + + + 备用格式库(可选的)
+ + + /usr/local + + + 三级层次 用于本地数据,具体到该主机上的。通常会有下一个子目录, 比如, bin/, lib/, share/.
+ + + /usr/local/sbin + + + 非必要系统的二进制文件,比如用于不同网络服务的守护进程
+ + + /usr/share + + + 架构无关的 (共享) 数据.
+ + + /usr/src + + + 源代码,比如内核源文件以及与它相关的头文件
+ + + /usr/X11R6 + + + X Window系统,版本号:11,发行版本:6
+ /var + 各式各样的(Variable)文件,一些随着系统常规操作而持续改变的文件就放在这里,比如日志文件,脱机文件,还有临时的电子邮件文件
+ + + /var/cache + + + 应用程序缓存数据. 这些数据是由耗时的I/O(输入/输出)的或者是运算本地生成的结果。这些应用程序是可以重新生成或者恢复数据的。当没有数据丢失的时候,可以删除缓存文件
+ + + /var/lib + + + 状态信息。这些信息随着程序的运行而不停地改变,比如,数据库,软件包系统的元数据等等
+ + + /var/lock + + + 锁文件。这些文件用于跟踪正在使用的资源
+ + + /var/log + + + 日志文件。包含各种日志。
+ + + /var/mail + + + 内含用户邮箱的相关文件
+ + + /var/opt + + + 来自附加包的各种数据都会存储在 /var/opt/.
+ + + /var/run + + + 存放当前系统上次启动以来的相关信息,例如当前登入的用户以及当前运行的daemons(守护进程).
+ + + /var/spool + + + 该spool主要用于存放将要被处理的任务,比如打印队列以及邮件外发队列
+ + + + + /var/mail + + + + + 过时的位置,用于放置用户邮箱文件
+ + + /var/tmp + + + 存放重启后保留的临时文件
+ +### Linux的文件类型 ### + +大多数文件仅仅是普通文件,他们被称为`regular`文件;他们包含普通数据,比如,文本、可执行文件、或者程序、程序的输入或输出等等 + +虽然你可以认为“在Linux中,一切你看到的皆为文件”这个观点相当保险,但这里仍有着一些例外。 + +- `目录`:由其他文件组成的文件 +- `特殊文件`:用于输入和输出的途径。大多数特殊文件都储存在`/dev`中,我们将会在后面讨论这个问题。 +- `链接文件`:让文件或者目录出现在系统文件树结构上多个地方的机制。我们将详细地讨论这个链接文件。 +- `(域)套接字`:特殊的文件类型,和TCP/IP协议中的套接字有点像,提供进程间网络通讯,并受文件系统的访问控制机制保护。 +- `命名管道` : 或多或少有点像sockets(套接字),提供一个进程间的通信机制,而不用网络套接字协议。 + +### 现实中的文件系统 ### + +对于大多数用户和常规系统管理任务而言,“文件和目录是一个有序的类树结构”是可以接受的。然而,对于电脑而言,它是不会理解什么是树,或者什么是树结构。 + +每个分区都有它自己的文件系统。想象一下,如果把那些文件系统想成一个整体,我们可以构思一个关于整个系统的树结构,不过这并没有这么简单。在文件系统中,一个文件代表着一个`inode`(索引节点),这是一种包含着构建文件的实际数据信息的序列号:这些数据表示文件是属于谁的,还有它在硬盘中的位置。 + +每个分区都有一套属于他们自己的inode,在一个系统的不同分区中,可以存在有相同inode的文件。 + +每个inode都表示着一种在硬盘上的数据结构,保存着文件的属性,包括文件数据的物理地址。当硬盘被格式化并用来存储数据时(通常发生在初始系统安装过程,或者是在一个已经存在的系统中添加额外的硬盘),每个分区都会创建固定数量的inode。这个值表示这个分区能够同时存储各类文件的最大数量。我们通常用一个inode去映射2-8k的数据块。当一个新的文件生成后,它就会获得一个空闲的inode。在这个inode里面存储着以下信息: + +- 文件属主和组属主 +- 文件类型(常规文件,目录文件......) +- 文件权限 +- 创建、最近一次读文件和修改文件的时间 +- inode里该信息被修改的时间 +- 文件的链接数(详见下一章) +- 文件大小 +- 文件数据的实际地址 + +唯一不在inode的信息是文件名和目录。它们存储在特殊的目录文件。通过比较文件名和inode的数目,系统能够构造出一个便于用户理解的树结构。用户可以通过ls -i查看inode的数目。在硬盘上,inodes有他们独立的空间。 + +------------------------ + +via: http://www.blackmoreops.com/2015/06/18/linux-file-system-hierarchy-v2-0/ + +译者:[tnuoccalanosrep](https://github.com/tnuoccalanosrep) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.blackmoreops.com/2015/02/15/in-light-of-recent-linux-exploits-linux-security-audit-is-a-must/ +[2]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-file-system-hierarchy-v2.0-2480px-blackMORE-Ops.png +[3]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-File-System-Hierarchy-blackMORE-Ops.pdf diff --git a/translated/tech/20150813 Linux file system hierarchy v2.0.md b/translated/tech/20150813 Linux file system hierarchy v2.0.md deleted file mode 100644 index 6f92d3bb53..0000000000 --- a/translated/tech/20150813 Linux file system hierarchy v2.0.md +++ /dev/null @@ -1,432 +0,0 @@ -translating by tnuoccalanosrep -Linux文件系统结构 v2.0 -================================================================================ -Linux中的文件是什么?它的文件系统又是什么?那些配置文件又在哪里?我下载好的程序保存在哪里了?好了,上图简明地阐释了Linux的文件系统的层次关系。当你苦于寻找配置文件或者二进制文件的时候,这便显得十分有用了。我在下方添加了一些解释以及例子,但“篇幅过长,没有阅读”。 - -有一种情况便是当你在系统中获取配置以及二进制文件时,出现了不一致性问题,如果你是一个大型组织,或者只是一个终端用户,这也有可能会破坏你的系统(比如,二进制文件运行在就旧的库文件上了)。若然你在你的Linux系统上做安全审计([security audit of your Linux system][1])的话,你将会发现它很容易遭到不同的攻击。所以,清洁操作(无论是Windows还是Linux)都显得十分重要。 -### What is a file in Linux? ### -Linux的文件是什么? -对于UNIX系统来说(同样适用于Linux),以下便是对文件简单的描述: -> 在UNIX系统中,一切皆为文件;若非文件,则为进程 - -> 这种定义是比较正确的,因为有些特殊的文件不仅仅是普通文件(比如命名管道和套接字),不过为了让事情变的简单,“一切皆为文件”也是一个可以让人接受的说法。Linux系统也像UNXI系统一样,将文件和目录视如同物,因为目录只是一个包含了其他文件名的文件而已。程序,服务,文本,图片等等,都是文件。对于系统来说,输入和输出设备,基本上所有的设备,都被当做是文件。 -![](http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-file-system-hierarchy-v2.0-2480px-blackMORE-Ops.png) - -- Version 2.0 – 17-06-2015 - - – Improved: 添加标题以及版本历史 - - – Improved: 添加/srv,/meida和/proc - - – Improved: 更新了反映当前的Linux文件系统的描述 - - – Fixed: 多处的打印错误 - - – Fixed: 外观和颜色 -- Version 1.0 – 14-02-2015 - - – Created: 基本的图表 - - – Note: 摒弃更低的版本 - -### Download Links ### -以下是结构图的下载地址。如果你需要其他结构,请跟原作者联系,他会尝试制作并且上传到某个地方以供下载 -- [Large (PNG) Format – 2480×1755 px – 184KB][2] -- [Largest (PDF) Format – 9919x7019 px – 1686KB][3] - -**注意**: PDF格式文件是打印的最好选择,因为它画质很高。 -### Linux 文件系统描述 ### -为了有序地管理那些文件,人们习惯把这些文件当做是硬盘上的有序的类树结构体,正如我们熟悉的'MS-DOS'(硬盘操作系统)。大的分枝包括更多的分枝,分枝的末梢是树的叶子或者普通的文件。现在我们将会以这树形图为例,但晚点我们会发现为什么这不是一个完全准确的一幅图。 -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Directory(目录)Description(描述)
-
/
-
主层次 的根,也是整个文件系统层次结构的根目录
-
/bin
-
存放在单用户模式可用的必要命令二进制文件,对于所有用户而言,则是像cat,ls,cp等等的文件
-
/boot
-
存放引导加载程序文件,例如kernels,initrd等
-
/dev
-
存放必要的设备文件
-
/etc
-
存放主机特定的系统范围内的配置文件。其实这里有个关于它名字本身意义上的的争议。在贝尔实验室的早期UNIX实施文档版本中,/etc表示是“其他目录”,因为从历史上看,这个目录是存放各种不属于其他目录的文件(然而,FSH(文件系统目录标准)限定 /ect是用于存放静态配置文件,这里不该存有二进制文件)。早期文档出版后,这个目录名又重新定义成不同的形式。近期的解释中包含着诸如“可编辑文本配置”或者“额外的工具箱”这样的重定义
-
-
-
/opt
-
-
-
存储着新增包的配置文件 /opt/.
-
-
-
/sgml
-
-
-
存放配置文件,比如目录,还有那些处理SGML(译者注:标准通用标记语言)的软件的配置文件
-
-
-
/X11
-
-
-
X Window系统的配置文件,版本号为11
-
-
-
/xml
-
-
-
配置文件,比如目录,处理XML(译者注:可扩展标记语言)的软件的配置文件
-
/home
-
用户的主目录,包括保存的文件, 个人配置, 等等.
-
/lib
-
/bin/ and /sbin/中的二进制文件必不可少的库文件
-
/lib<qual>
-
备用格式的必要的库文件. 这样的目录视可选的,但如果他们存在的话, 他们还有一些要求.
-
/media
-
可移动的多媒体(如CD-ROMs)的挂载点.(出现于 FHS-2.3)
-
/mnt
-
临时挂载的文件系统
-
/opt
-
自定义应用程序软件包
-
/proc
-
以文件形式提供进程以及内核信息的虚拟文件系统,在Linux中,对应进程文件系统的挂载点
-
/root
-
根用户的主目录
-
/sbin
-
必要系统二进制文件, 比如, init, ip, mount.
-
/srv
-
系统提供的站点特定数据
-
/tmp
-
临时文件 (另见 /var/tmp). 通常在系统重启后删除
-
/usr
-
二级层级 存储用户的只读数据; 包含(多)用户主要的公共文件以及应用程序
-
-
-
/bin
-
-
-
非必要的命令二进制文件 (在单用户模式中不需要用到的); 用于所有用户.
-
-
-
/include
-
-
-
标准的包含文件
-
-
-
/lib
-
-
-
库文件,用于/usr/bin//usr/sbin/.中的二进制文件
-
-
-
/lib<qual>
-
-
-
备用格式库(可选的).
-
-
-
/local
-
-
-
三级层次 用于本地数据, 具体到该主机上的.通常会有下一个子目录, 比如, bin/, lib/, share/.
-
-
-
/sbin
-
-
-
非必要系统的二进制文件, 比如,用于不同网络服务的守护进程
-
-
-
/share
-
-
-
独立架构的 (共享) 数据.
-
-
-
/src
-
-
-
源代码, 比如, 内核源文件以及与它相关的头文件
-
-
-
/X11R6
-
-
-
X Window系统,版本号:11,发行版本:6
-
/var
-
各式各样的文件,一些随着系统常规操作而持续改变的文件就放在这里,比如日志文件,脱机文件,还有临时的电子邮件文件
-
-
-
/cache
-
-
-
应用程序缓存数据. 这些数据是根据I/O(输入/输出)的耗时结果或者是运算生成的.这些应用程序是可以重新生成或者恢复数据的.当没有数据丢失的时候,可以删除缓存文件.
-
-
-
/lib
-
-
-
状态信息.这些信息随着程序的运行而不停地改变,比如,数据库,系统元数据的打包等等
-
-
-
/lock
-
-
-
锁文件。这些文件会持续监控正在使用的资源
-
-
-
/log
-
-
-
日志文件. 包含各种日志.
-
-
-
/mail
-
-
-
内含用户邮箱的相关文件
-
-
-
/opt
-
-
-
来自附加包的各种数据都会存储在 /opt/.
-
-
-
/run
-
-
-
Information about the running system since last boot, e.g., currently logged-in users and running daemons.存放当前系统上次启动的相关信息, 例如, 当前登入的用户以及当前运行的daemons(守护进程).
-
-
-
/spool
-
-
-
该spool主要用于存放将要被处理的任务, 比如, 打印队列以及邮件传出队列
-
-
-
-
-
/mail
-
-
-
-
-
过时的位置,用于放置用户邮箱文件
-
-
-
/tmp
-
-
-
存放重启之前的临时接口
- -### Types of files in Linux ### -### Linux的文件类型 ### -大多数文件也仅仅是文件,他们被称为`regular`文件;他们包含普通数据,比如,文本,可执行文件,或者程序,程序输入或输出文件等等 -While it is reasonably safe to suppose that everything you encounter on a Linux system is a file, there are some exceptions. -虽然你可以认为“在Linux中,一切你看到的皆为文件”这个观点相当保险,但这里仍有着一些例外。 - -- `目录`:由其他文件组成的文件 -- `特殊文件`:用于输入和输出的途径。大多数特殊文件都储存在`/dev`中,我们将会在后面讨论这个问题。 -- `链接文件`:让文件或者目录在系统文件树结构上可见的机制。我们将详细地讨论这个链接文件。 -- `(域)套接字`:特殊的文件类型,和TCP/IP协议中的套接字有点像,提供进程网络,并受文件系统的访问控制机制保护。 --`命名管道` : 或多或少有点像sockets(套接字),提供一个进程间的通信机制,而不用网络套接字协议。 -### File system in reality ### -### 现实中的文件系统 ### -对于大多数用户和常规系统管理任务而言,"文件和目录是一个有序的类树结构"是可以接受的。然而,对于电脑而言,它是不会理解什么是树,或者什么是树结构。 - -每个分区都有它自己的文件系统。想象一下,如果把那些文件系统想成一个整体,我们可以构思一个关于整个系统的树结构,不过这并没有这么简单。在文件系统中,一个文件代表着一个`inode`(索引节点),一种包含着构建文件的实际数据信息的序列号:这些数据表示文件是属于谁的,还有它在硬盘中的位置。 - -每个分区都有一套属于他们自己的inodes,在一个系统的不同分区中,可以存在有相同inodes的文件。 - -每个inode都表示着一种在硬盘上的数据结构,保存着文件的属性,包括文件数据的物理地址。当硬盘被格式化并用来存储数据时(通常发生在初始系统安装过程,或者是在一个已经存在的系统中添加额外的硬盘),每个分区都会创建关于inodes的固定值。这个值表示这个分区能够同时存储各类文件的最大数量。我们通常用一个inode去映射2-8k的数据块。当一个新的文件生成后,它就会获得一个空闲的indoe。在这个inode里面存储着以下信息: - -- 文件属主和组属主 -- 文件类型(常规文件,目录文件......) -- 文件权限 -- 创建、最近一次读文件和修改文件的时间 -- inode里该信息被修改的时间 -- 文件的链接数(详见下一章) -- 文件大小 -- 文件数据的实际地址 - -唯一不在inode的信息是文件名和目录。它们存储在特殊的目录文件。通过比较文件名和inodes的数目,系统能够构造出一个便于用户理解的树结构。用户可以通过ls -i查看inode的数目。在硬盘上,inodes有他们独立的空间。 - - - -via: http://www.blackmoreops.com/2015/06/18/linux-file-system-hierarchy-v2-0/ - -译者:[译者ID](https://github.com/tnuoccalanosrep) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://www.blackmoreops.com/2015/02/15/in-light-of-recent-linux-exploits-linux-security-audit-is-a-must/ -[2]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-file-system-hierarchy-v2.0-2480px-blackMORE-Ops.png -[3]:http://www.blackmoreops.com/wp-content/uploads/2015/06/Linux-File-System-Hierarchy-blackMORE-Ops.pdf From df238a689f7557654979a7aa2a8fdb1061c655d4 Mon Sep 17 00:00:00 2001 From: Mike Tang Date: Wed, 2 Sep 2015 00:50:38 +0800 Subject: [PATCH 1965/2517] finish translate --- ...'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md (100%) diff --git a/sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md b/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md similarity index 100% rename from sources/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md rename to translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md From c05677e6043ac0a422c67dec984e8f061f3885e8 Mon Sep 17 00:00:00 2001 From: Mike Tang Date: Wed, 2 Sep 2015 00:54:27 +0800 Subject: [PATCH 1966/2517] finish translate --- ...inx or Apache with MariaDB on Debian or Ubuntu.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md b/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md index 60b2137c55..61e7c80bdf 100644 --- a/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md +++ b/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md @@ -16,9 +16,9 @@ HHVM can also be used along with a FastCGI-based web-server like Nginx or Apache ### Step 1: 安装 Nginx 或者 Apache 服务器 ### 1. 首先,先进行一次系统的升级或者更新软件仓库列表. - +``` # apt-get update && apt-get upgrade - +``` ![System Upgrade](http://www.tecmint.com/wp-content/uploads/2015/08/System-Upgrade.png) System Upgrade @@ -64,17 +64,19 @@ Apache 默认页面 ### Step 2: 安装和配置 MariaDB ### 3. 这一步,我们将通过如下命令安装 MariaDB,它是一个比 MySQL 更好的数据库 - +``` # apt-get install mariadb-client mariadb-server - +``` ![Install MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/08/Install-MariaDB-Database.png) 安装 MariaDB 4. 在 MariaDB 成功安装之后,你可以启动它,并且设置 root 密码来保护数据库: +``` # systemctl start mysql # mysql_secure_installation +``` 回答以下问题,只需要按下`y`或者 `n`并且回车。请确保你仔细的阅读过说明。 @@ -87,7 +89,9 @@ Apache 默认页面 5. 在设置了密码之后,你就可以登陆 MariaDB 了。 +``` # mysql -u root -p +``` ### Step 3: 安装 HHVM ### From 3f3faa942ba4736d928cad2f595de5042b14ac5e Mon Sep 17 00:00:00 2001 From: Mike Tang Date: Wed, 2 Sep 2015 00:55:26 +0800 Subject: [PATCH 1967/2517] finish translate change style --- ...inx or Apache with MariaDB on Debian or Ubuntu.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md b/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md index 61e7c80bdf..1591def307 100644 --- a/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md +++ b/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md @@ -96,11 +96,11 @@ Apache 默认页面 ### Step 3: 安装 HHVM ### 6. 我们需要添加 HHVM 的仓库到你的`sources.list`文件中,然后更新软件列表。 - +``` # wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | apt-key add - # echo deb http://dl.hhvm.com/ubuntu DISTRIBUTION_VERSION main | sudo tee /etc/apt/sources.list.d/hhvm.list # apt-get update - +``` **重要**:不要忘记用你的 Ubuntu 发行版型号替换上述的DISTRIBUTION_VERSION (比如:lucid, precise, trusty) 或者是 Debian 的 jessie 或者 wheezy。在 Linux Mint 中也是一样的,不过只支持 petra。 添加了 HHVM 仓库之后,你就可以安装了。 @@ -132,9 +132,9 @@ nginx 的配置文件在 /etc/nginx/sites-available/default, 并且这些配 **重要**: 如果你使用的是 Apache,这边就不需要进行配置了 8. 接下来,你需要使用 hhvm 来提供 php 的运行环境。 - +``` # /usr/bin/update-alternatives --install /usr/bin/php php /usr/bin/hhvm 60 - +``` 以上步骤完成之后,你现在可以启动并且测试他了。 # systemctl start hhvm @@ -142,11 +142,11 @@ nginx 的配置文件在 /etc/nginx/sites-available/default, 并且这些配 ### Step 5: 测试 HHVM 和 Nginx/Apache ### 9. 为了确认 hhvm 是否工作,你需要在 nginx/apache 的根目录下建立 hello.php。 - +``` # nano /usr/share/nginx/html/hello.php [For Nginx] OR # nano /var/www/html/hello.php [For Nginx and Apache] - +``` 在文件中添加如下代码: Date: Wed, 2 Sep 2015 07:30:29 +0800 Subject: [PATCH 1968/2517] [translating by bazz2]How to filter BGP routes in Quagga BGP router --- .../20150202 How to filter BGP routes in Quagga BGP router.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md b/sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md index d92c47c774..f227e0c506 100644 --- a/sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md +++ b/sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md @@ -1,3 +1,4 @@ +[bazz222] How to filter BGP routes in Quagga BGP router ================================================================================ In the [previous tutorial][1], we demonstrated how to turn a CentOS box into a BGP router using Quagga. We also covered basic BGP peering and prefix exchange setup. In this tutorial, we will focus on how we can control incoming and outgoing BGP prefixes by using **prefix-list** and **route-map**. @@ -198,4 +199,4 @@ via: http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/centos-bgp-router-quagga.html \ No newline at end of file +[1]:http://xmodulo.com/centos-bgp-router-quagga.html From 219c5746cec877427b4ded700e69d91a7602cf17 Mon Sep 17 00:00:00 2001 From: joeren Date: Wed, 2 Sep 2015 08:21:36 +0800 Subject: [PATCH 1969/2517] Update 20150901 How to automatically dim your screen on Linux.md --- .../20150901 How to automatically dim your screen on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150901 How to automatically dim your screen on Linux.md b/sources/tech/20150901 How to automatically dim your screen on Linux.md index b8a9ead16b..3a494421a2 100644 --- a/sources/tech/20150901 How to automatically dim your screen on Linux.md +++ b/sources/tech/20150901 How to automatically dim your screen on Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! How to automatically dim your screen on Linux ================================================================================ When you start spending the majority of your time in front of a computer, natural questions start arising. Is this healthy? How can I diminish the strain on my eyes? Why is the sunlight burning me? Although active research is still going on to answer these questions, a lot of programmers have already adopted a few applications to make their daily habits a little healthier for their eyes. Among those applications, there are two which I found particularly interesting: Calise and Redshift. @@ -49,4 +50,4 @@ via: http://xmodulo.com/automatically-dim-your-screen-linux.html [a]:http://xmodulo.com/author/adrien [1]:http://calise.sourceforge.net/ [2]:http://jonls.dk/redshift/ -[3]:https://wiki.archlinux.org/index.php/Redshift#Automatic_location_based_on_GPS \ No newline at end of file +[3]:https://wiki.archlinux.org/index.php/Redshift#Automatic_location_based_on_GPS From b2a9aa92c2c3ac2bb5a684eadc3396c746270ce7 Mon Sep 17 00:00:00 2001 From: Ping Date: Wed, 2 Sep 2015 09:13:35 +0800 Subject: [PATCH 1970/2517] Complete Xtreme Download Manager Updated With Fresh GUI --- ...Download Manager Updated With Fresh GUI.md | 68 ------------------- ...Download Manager Updated With Fresh GUI.md | 68 +++++++++++++++++++ 2 files changed, 68 insertions(+), 68 deletions(-) delete mode 100644 sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md create mode 100644 translated/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md diff --git a/sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md b/sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md deleted file mode 100644 index 8879d6bf64..0000000000 --- a/sources/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md +++ /dev/null @@ -1,68 +0,0 @@ -Translating by Ping -Xtreme Download Manager Updated With Fresh GUI -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme-Download-Manager-Linux.jpg) - -[Xtreme Download Manager][1], unarguably one of the [best download managers for Linux][2], has a new version named XDM 2015 which brings a fresh new look to it. - -Xtreme Download Manager, also known as XDM or XDMAN, is a popular cross-platform download manager available for Linux, Windows and Mac OS X. It is also compatible with all major web browsers such as Chrome, Firefox, Safari enabling you to download directly from XDM when you try to download something in your web browser. - -Applications such as XDM are particularly useful when you have slow/limited network connectivity and you need to manage your downloads. Imagine downloading a huge file from internet on a slow network. What if you could pause and resume the download at will? XDM helps you in such situations. - -Some of the main features of XDM are: - -- Pause and resume download -- [Download videos from YouTube][3] and other video sites -- Force assemble -- Download speed acceleration -- Schedule downloads -- Limit download speed -- Web browser integration -- Support for proxy servers - -Here you can see the difference between the old and new XDM. - -![Old XDM](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme-Download-Manager-700x400_c.jpg) - -Old XDM - -![New XDM](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme_Download_Manager.png) - -New XDM - -### Install Xtreme Download Manager in Ubuntu based Linux distros ### - -Thanks to the PPA by Noobslab, you can easily install Xtreme Download Manager using the commands below. XDM requires Java but thanks to the PPA, you don’t need to bother with installing dependencies separately. - - sudo add-apt-repository ppa:noobslab/apps - sudo apt-get update - sudo apt-get install xdman - -The above PPA should be available for Ubuntu and other Ubuntu based Linux distributions such as Linux Mint, elementary OS, Linux Lite etc. - -#### Remove XDM #### - -To remove XDM (installed using the PPA), use the commands below: - - sudo apt-get remove xdman - sudo add-apt-repository --remove ppa:noobslab/apps - -For other Linux distributions, you can download it from the link below: - -- [Download Xtreme Download Manager][4] - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/xtreme-download-manager-install/ - -作者:[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://xdman.sourceforge.net/ -[2]:http://itsfoss.com/4-best-download-managers-for-linux/ -[3]:http://itsfoss.com/download-youtube-videos-ubuntu/ -[4]:http://xdman.sourceforge.net/download.html diff --git a/translated/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md b/translated/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md new file mode 100644 index 0000000000..d9ab3ab9f3 --- /dev/null +++ b/translated/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md @@ -0,0 +1,68 @@ +Xtreme下载管理器升级全新用户界面 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme-Download-Manager-Linux.jpg) + +[Xtreme 下载管理器][1], 毫无疑问是[Linux界最好的下载管理器][2]之一 , 它的新版本名叫 XDM 2015 ,这次的新版本给我们带来了全新的外观体验! + +Xtreme 下载管理器,也被称作 XDM 或 XDMAN,它是一个跨平台的下载管理器,可以用于 Linux、Windows 和 Mac OS X 系统之上。同时它兼容于主流的浏览器,如 Chrome, Firefox, Safari 等,因此当你从浏览器下载东西的时候可以直接使用 XDM 下载。 + +当你的网络连接超慢并且需要管理下载文件的时候,像 XDM 这种软件可以帮到你大忙。例如说你在一个慢的要死的网络速度下下载一个超大文件, XDM 可以帮助你暂停并且继续下载。 + +XDM 的主要功能: + +- 暂停和继续下载 +- [从 YouTube 下载视频][3],其他视频网站同样适用 +- 强制聚合 +- 下载加速 +- 计划下载 +- 下载限速 +- 与浏览器整合 +- 支持代理服务器 + +下面你可以看到 XDM 新旧版本之间的差别。 + +![Old XDM](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme-Download-Manager-700x400_c.jpg) + +老版本XDM + +![New XDM](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme_Download_Manager.png) + +新版本XDM + +### 在基于 Ubuntu 的 Linux 发行版上安装 Xtreme下载管理器 ### + +感谢 Noobslab 提供的 PPA,你可以使用以下命令来安装 Xtreme 下载管理器。虽然 XDM 依赖 Java,但是托 PPA 的福,你不需要对其进行单独的安装。 + + sudo add-apt-repository ppa:noobslab/apps + sudo apt-get update + sudo apt-get install xdman + +以上的 PPA 可以在 Ubuntu 或者其他基于 Ubuntu 的发行版上使用,如 Linux Mint, elementary OS, Linux Lite 等。 + +#### 删除 XDM #### + +如果你是使用 PPA 安装的 XDM ,可以通过以下命令将其删除: + + sudo apt-get remove xdman + sudo add-apt-repository --remove ppa:noobslab/apps + +对于其他Linux发行版,可以通过以下连接下载: + +- [Download Xtreme Download Manager][4] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/xtreme-download-manager-install/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/mr-ping) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://xdman.sourceforge.net/ +[2]:http://itsfoss.com/4-best-download-managers-for-linux/ +[3]:http://itsfoss.com/download-youtube-videos-ubuntu/ +[4]:http://xdman.sourceforge.net/download.html + From 628748de5c7ea948b5e22aac67112a463d8b85e7 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Wed, 2 Sep 2015 10:16:55 +0800 Subject: [PATCH 1971/2517] [Translated] --- ... automatically dim your screen on Linux.md | 53 ------------------- ... automatically dim your screen on Linux.md | 52 ++++++++++++++++++ 2 files changed, 52 insertions(+), 53 deletions(-) delete mode 100644 sources/tech/20150901 How to automatically dim your screen on Linux.md create mode 100644 translated/tech/20150901 How to automatically dim your screen on Linux.md diff --git a/sources/tech/20150901 How to automatically dim your screen on Linux.md b/sources/tech/20150901 How to automatically dim your screen on Linux.md deleted file mode 100644 index 3a494421a2..0000000000 --- a/sources/tech/20150901 How to automatically dim your screen on Linux.md +++ /dev/null @@ -1,53 +0,0 @@ -Translating by GOLinux! -How to automatically dim your screen on Linux -================================================================================ -When you start spending the majority of your time in front of a computer, natural questions start arising. Is this healthy? How can I diminish the strain on my eyes? Why is the sunlight burning me? Although active research is still going on to answer these questions, a lot of programmers have already adopted a few applications to make their daily habits a little healthier for their eyes. Among those applications, there are two which I found particularly interesting: Calise and Redshift. - -### Calise ### - -In and out of development limbo, [Calise][1] stands for "Camera Light Sensor." In other terms, it is an open source program that computes the best backlight level for your screen based on the light intensity received by your webcam. And for more precision, Calise is capable of taking in account the weather in your area based on your geographical coordinates. What I like about it is the compatibility with every desktops, even non-X ones. - -![](https://farm1.staticflickr.com/569/21016715646_6e1e95f066_o.jpg) - -It comes with a command line interface and a GUI, supports multiple user profiles, and can even export its data to CSV. After installation, you will have to calibrate it quickly before the magic happens. - -![](https://farm6.staticflickr.com/5770/21050571901_1e7b2d63ec_c.jpg) - -What is less likeable is unfortunately that if you are as paranoid as I am, you have a little piece of tape in front of your webcam, which greatly affects Calise's precision. But that aside, Calise is a great application, which deserves our attention and support. As I mentioned earlier, it has gone through some rough patches in its development schedule over the last couple of years, so I really hope that this project will continue. - -![](https://farm1.staticflickr.com/633/21032989702_9ae563db1e_o.png) - -### Redshift ### - -If you already considered decreasing the strain on your eyes caused by your screen, it is possible that you have heard of f.lux, a free proprietary software that modifies the luminosity and color scheme of your display based on the time of the day. However, if you really prefer open source software, there is an alternative: [Redshift][2]. Inspired by f.lux, Redshift also alters the color scheme and luminosity to enhance the experience of sitting in front of your screen at night. On startup, you can configure it with you geographic position as longitude and latitude, and then let it run in tray. Redshift will smoothly adjust the color scheme or your screen based on the position of the sun. At night, you will see the screen's color temperature turn towards red, making it a lot less painful for your eyes. - -![](https://farm6.staticflickr.com/5823/20420303684_2b6e917fee_b.jpg) - -Just like Calise, it proposes a command line interface as well as a GUI client. To start Redshift quickly, just use the command: - - $ redshift -l [LAT]:[LON] - -Replacing [LAT]:[LON] by your latitude and longitude. - -However, it is also possible to input your coordinates by GPS via the gpsd module. For Arch Linux users, I recommend this [wiki page][3]. - -### Conclusion ### - -To conclude, Linux users have no excuse for not taking care of their eyes. Calise and Redshift are both amazing. I really hope that their development will continue and that they get the support they deserve. Of course, there are more than just two programs out there to fulfill the purpose of protecting your eyes and staying healthy, but I feel that Calise and Redshift are a good start. - -If there is a program that you really like and that you use regularly to reduce the strain on your eyes, please let us know in the comments. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/automatically-dim-your-screen-linux.html - -作者:[Adrien Brochard][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/adrien -[1]:http://calise.sourceforge.net/ -[2]:http://jonls.dk/redshift/ -[3]:https://wiki.archlinux.org/index.php/Redshift#Automatic_location_based_on_GPS diff --git a/translated/tech/20150901 How to automatically dim your screen on Linux.md b/translated/tech/20150901 How to automatically dim your screen on Linux.md new file mode 100644 index 0000000000..cf82291db3 --- /dev/null +++ b/translated/tech/20150901 How to automatically dim your screen on Linux.md @@ -0,0 +1,52 @@ +Linux上如何让屏幕自动变暗 +================================================================================ +当你开始在计算机前花费大量时间的时候,自然的问题开始显现。这健康吗?怎样才能舒缓我眼睛的压力呢?为什么太阳光灼烧着我?尽管解答这些问题的研究仍然在活跃进行着,许多程序员已经采用了一些应用来让他们的日常习惯对他们的眼睛更健康点。在这些应用中,我发现了两个特别有趣的东西:Calise和Redshift。 + +### Calise ### + +在开发状态之中和之外,[Calise][1]都表示“相机光感应器”。换句话说,它是一个开源程序,用于基于摄像头接收到的光密度计算屏幕最佳的背景光级别。更精确地说,Calise可以基于你的地理坐标来考虑你所在地区的天气。我喜欢它是因为它兼容各个桌面,甚至非X系列。 + +![](https://farm1.staticflickr.com/569/21016715646_6e1e95f066_o.jpg) + +它同时附带了命令行界面和图形界面,支持多用户配置,而且甚至可以导出数据为CSV。安装完后,你必须在魔法展开前快速进行校正。 + +![](https://farm6.staticflickr.com/5770/21050571901_1e7b2d63ec_c.jpg) + +不怎么令人喜欢的是,如果你和我一样偏执,在你的摄像头前面贴了一条胶带,那就会比较不幸了,这会大大影响Calise的精确度。除此之外,Calise还是个很棒的应用,值得我们关注和支持。正如我先前提到的,它在过去几年中经历了一段修修补补的艰难阶段,所以我真的希望这个项目继续开展下去。 + +![](https://farm1.staticflickr.com/633/21032989702_9ae563db1e_o.png) + +### Redshift ### + +如果你已经考虑好要减少由屏幕导致的眼睛的压力,那么你很可能听过f.lux,它是一个免费的专有软件,用于根据一天中的时间来修改显示器的亮度和配色。然而,如果真的偏好于开源软件,那么一个可选方案就是:[Redshift][2]。灵感来自f.lux,Redshift也可以改变配色和亮度来加强你夜间坐在屏幕前的体验。启动时,你可以配置使用经度和纬度来配置地理坐标,然后就可以让它在托盘中运行了。Redshift将根据太阳的位置平滑地调整你的配色或者屏幕。在夜里,你可以看到屏幕的色温调向偏暖色,这会让你的眼睛少遭些罪。 + +![](https://farm6.staticflickr.com/5823/20420303684_2b6e917fee_b.jpg) + +和Calise一样,它提供了一个命令行界面,同时也提供了一个图形客户端。要快速启动Redshift,只需使用命令: + + $ redshift -l [LAT]:[LON] + +替换[LAT]:[LON]为你的维度和经度。 + +然而,它也可以通过gpsd模块来输入你的坐标。对于Arch Linux用户,我推荐你读一读这个[维基页面][3]。 + +### 尾声 ### + +总而言之,Linux用户没有理由不去保护自己的眼睛,Calise和Redshift两个都很棒。我真希望它们的开发能够继续下去,他们能获得应有的支持。当然,还有比这两个更多的程序可以满足保护眼睛和保持健康的目的,但是我感觉Calise和Redshift会是一个不错的开始。 + +如果你有一个真正喜欢的程序,而且也经常用它来舒缓眼睛的压力,请在下面的评论中留言吧。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/automatically-dim-your-screen-linux.html + +作者:[Adrien Brochard][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://calise.sourceforge.net/ +[2]:http://jonls.dk/redshift/ +[3]:https://wiki.archlinux.org/index.php/Redshift#Automatic_location_based_on_GPS From 61caa70d6f7935c209d03629c5b89ac50592de1e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 2 Sep 2015 12:43:09 +0800 Subject: [PATCH 1972/2517] PUB:RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @xiqingongzi 好长,辛苦了~有一些小错误。 --- ...ntial Commands and System Documentation.md | 313 +++++++++++++++++ ...ntial Commands and System Documentation.md | 320 ------------------ 2 files changed, 313 insertions(+), 320 deletions(-) create mode 100644 published/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md delete mode 100644 translated/tech/RHCSA/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md diff --git a/published/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/published/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md new file mode 100644 index 0000000000..a2b540a8ad --- /dev/null +++ b/published/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md @@ -0,0 +1,313 @@ +RHCSA 系列(一): 回顾基础命令及系统文档 +================================================================================ + +RHCSA (红帽认证系统工程师) 是由 RedHat 公司举行的认证考试,这家公司给商业公司提供开源操作系统和软件,除此之外,还为这些企业和机构提供支持、训练以及咨询服务等。 + +![RHCSA Exam Guide](http://www.tecmint.com/wp-content/uploads/2015/02/RHCSA-Series-by-Tecmint.png) + +*RHCSA 考试准备指南* + +RHCSA 考试(考试编号 EX200)通过后可以获取由 RedHat 公司颁发的证书. RHCSA 考试是 RHCT(红帽认证技师)的升级版,而且 RHCSA 必须在新的 Red Hat Enterprise Linux(红帽企业版)下完成。RHCT 和 RHCSA 的主要变化就是 RHCT 基于 RHEL5,而 RHCSA 基于 RHEL6 或者7,这两个认证的等级也有所不同。 + +红帽认证管理员最起码可以在红帽企业版的环境下执行如下系统管理任务: + +- 理解并会使用命令管理文件、目录、命令行以及系统/软件包的文档 +- 在不同的启动等级操作运行中的系统,识别和控制进程,启动或停止虚拟机 +- 使用分区和逻辑卷管理本地存储 +- 创建并且配置本地文件系统和网络文件系统,设置他们的属性(权限、加密、访问控制表) +- 部署、配置、并且控制系统,包括安装、升级和卸载软件 +- 管理系统用户和组,以及使用集中制的 LDAP 目录进行用户验证 +- 确保系统安全,包括基础的防火墙规则和 SELinux 配置 + +关于你所在国家的考试注册和费用请参考 [RHCSA 认证页面][1]。 + +在这个有15章的 RHCSA(红帽认证管理员)备考系列中,我们将覆盖以下的关于红帽企业 Linux 第七版的最新的信息: + +- Part 1: 回顾基础命令及系统文档 +- Part 2: 在 RHEL7 中如何进行文件和目录管理 +- Part 3: 在 RHEL7 中如何管理用户和组 +- Part 4: 使用 nano 和 vim 管理命令,使用 grep 和正则表达式分析文本 +- Part 5: RHEL7 的进程管理:启动,关机,以及这之间的各种事情 +- Part 6: 使用 'Parted' 和 'SSM' 来管理和加密系统存储 +- Part 7: 使用 ACL(访问控制表)并挂载 Samba/NFS 文件分享 +- Part 8: 加固 SSH,设置主机名并开启网络服务 +- Part 9: 安装、配置和加固一个 Web 和 FTP 服务器 +- Part 10: Yum 包管理方式,使用 Cron 进行自动任务管理以及监控系统日志 +- Part 11: 使用 FirewallD 和 Iptables 设置防火墙,控制网络流量 +- Part 12: 使用 Kickstart 自动安装 RHEL 7 +- Part 13: RHEL7:什么是 SeLinux?他的原理是什么? +- Part 14: 在 RHEL7 中使用基于 LDAP 的权限控制 +- Part 15: 虚拟化基础和用KVM管理虚拟机 + +在第一章,我们讲解如何在终端或者 Shell 窗口输入和运行正确的命令,并且讲解如何找到、查阅,以及使用系统文档。 + +![RHCSA: Reviewing Essential Linux Commands – Part 1](http://www.tecmint.com/wp-content/uploads/2015/02/Reviewing-Essential-Linux-Commands.png) + +*RHCSA:回顾必会的 Linux 命令 - 第一部分* + +#### 前提: #### + +至少你要熟悉如下命令 + +- [cd 命令][2] (改变目录) +- [ls 命令][3] (列举文件) +- [cp 命令][4] (复制文件) +- [mv 命令][5] (移动或重命名文件) +- [touch 命令][6] (创建一个新的文件或更新已存在文件的时间表) +- rm 命令 (删除文件) +- mkdir 命令 (创建目录) + +在这篇文章中你将会找到更多的关于如何更好的使用他们的正确用法和特殊用法. + +虽然没有严格的要求,但是作为讨论常用的 Linux 命令和在 Linux 中搜索信息方法,你应该安装 RHEL7 来尝试使用文章中提到的命令。这将会使你学习起来更省力。 + +- [红帽企业版 Linux(RHEL)7 安装指南][7] + +### 使用 Shell 进行交互 ### + +如果我们使用文本模式登录 Linux,我们就会直接进入到我们的默认 shell 中。另一方面,如果我们使用图形化界面登录,我们必须通过启动一个终端来开启 shell。无论那种方式,我们都会看到用户提示符,并且我们可以在这里输入并且执行命令(当按下回车时,命令就会被执行)。 + +命令是由两个部分组成的: + +- 命令本身 +- 参数 + +某些参数,称为选项(通常使用一个连字符开头),会改变命令的行为方式,而另外一些则指定了命令所操作的对象。 + +type 命令可以帮助我们识别某一个特定的命令是由 shell 内置的还是由一个单独的包提供的。这样的区别在于我们能够在哪里找到更多关于该命令的更多信息。对 shell 内置的命令,我们需要看 shell 的手册页;如果是其他的,我们需要看软件包自己的手册页。 + +![Check Shell built in Commands](http://www.tecmint.com/wp-content/uploads/2015/02/Check-shell-built-in-Commands.png) + +*检查Shell的内置命令* + +在上面的例子中, `cd` 和 `type` 是 shell 内置的命令,`top` 和 `less` 是由 shell 之外的其他的二进制文件提供的(在这种情况下,type将返回命令的位置)。 + +其他的内置命令: + +- [echo 命令][8]: 展示字符串 +- [pwd 命令][9]: 输出当前的工作目录 + +![More Built in Shell Commands](http://www.tecmint.com/wp-content/uploads/2015/02/More-Built-in-Shell-Commands.png) + +*其它内置命令* + +**exec 命令** + +它用来运行我们指定的外部程序。请注意在多数情况下,只需要输入我们想要运行的程序的名字就行,不过` exec` 命令有一个特殊的特性:不是在 shell 之外创建新的进程运行,而是这个新的进程会替代原来的 shell,可以通过下列命令来验证。 + + # ps -ef | grep [shell 进程的PID] + +当新的进程终止时,Shell 也随之终止。运行 `exec top` ,然后按下 `q` 键来退出 top,你会注意到 shell 会话也同时终止,如下面的屏幕录像展示的那样: + + + +**export 命令** + +给之后执行的命令的输出环境变量。 + +**history 命令** + +展示数行之前的历史命令。命令编号前面前缀上感叹号可以再次执行这个命令。如果我们需要编辑历史列表中的命令,我们可以按下 `Ctrl + r` 并输入与命令相关的第一个字符。我们可以看到的命令会自动补全,可以根据我们目前的需要来编辑它: + + + +命令列表会保存在一个叫 `.bash_history` 的文件里。`history` 命令是一个非常有用的用于减少输入次数的工具,特别是进行命令行编辑的时候。默认情况下,bash 保留最后输入的500个命令,不过可以通过修改 HISTSIZE 环境变量来增加: + +![Linux history Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-history-Command.png) + +*Linux history 命令* + +但上述变化,在我们的下一次启动不会保留。为了保持 HISTSIZE 变量的变化,我们需要通过手工修改文件编辑: + + # 要设置 history 长度,请看 bash(1)文档中的 HISTSIZE 和 HISTFILESIZE + HISTSIZE=1000 + +**重要**: 我们的更改不会立刻生效,除非我们重启了 shell 。 + +**alias 命令** + +没有参数或使用 `-p` 选项时将会以“名称=值”的标准形式输出别名列表。当提供了参数时,就会按照给定的名字和值定义一个别名。 + +使用 `alias` ,我们可以创建我们自己的命令,或使用所需的参数修改现有的命令。举个例子,假设我们将 `ls` 定义别名为 `ls –color=auto` ,这样就可以使用不同颜色输出文件、目录、链接等等。 + + + # alias ls='ls --color=auto' + +![Linux alias Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-alias-Command.png) + +*Linux 别名命令* + +**注意**: 你可以给你的“新命令”起任何的名字,并且使用单引号包括很多命令,但是你要用分号区分开它们。如下: + + # alias myNewCommand='cd /usr/bin; ls; cd; clear' + +**exit 命令** + +`exit` 和 `logout` 命令都可以退出 shell 。`exit` 命令可以退出所有的 shell,`logout` 命令只注销登录的 shell(即你用文本模式登录时自动启动的那个)。 + +**man 和 info 命令** +如果你对某个程序有疑问,可以参考它的手册页,可以使用 `man` 命令调出它。此外,还有一些关于重要文件(inittab、fstab、hosts 等等)、库函数、shell、设备及其他功能的手册页。 + +举例: + +- man uname (输出系统信息,如内核名称、处理器、操作系统类型、架构等) +- man inittab (初始化守护进程的设置) + +另外一个重要的信息的来源是由 `info` 命令提供的,`info` 命令常常被用来读取 info 文件。这些文件往往比手册页 提供了更多信息。可以通过 `info keyword` 调用某个命令的信息: + + # info ls + # info cut + +另外,在 `/usr/share/doc` 文件夹包含了大量的子目录,里面可以找到大量的文档。它们是文本文件或其他可读格式。 + +你要习惯于使用这三种方法去查找命令的信息。重点关注每个命令文档中介绍的详细的语法。 + +**使用 expand 命令把制表符转换为空格** + +有时候文本文档包含了制表符,但是程序无法很好的处理。或者我们只是简单的希望将制表符转换成空格。这就是用到 `expand` 地方(由GNU核心组件包提供) 。 + +举个例子,我们有个文件 NumberList.txt,让我们使用 `expand` 处理它,将制表符转换为一个空格,并且显示在标准输出上。 + + # expand --tabs=1 NumbersList.txt + +![Linux expand Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-expand-Command.png) + +*Linux expand 命令* + +unexpand命令可以实现相反的功能(将空格转为制表符) + +**使用 head 输出文件首行及使用 tail 输出文件尾行** + +通常情况下,`head` 命令后跟着文件名时,将会输出该文件的前十行,我们可以通过 `-n` 参数来自定义具体的行数。 + + # head -n3 /etc/passwd + # tail -n3 /etc/passwd + +![Linux head and tail Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-head-and-tail-Command.png) + +*Linux 的 head 和 tail 命令* + +`tail` 最有意思的一个特性就是能够显示增长的输入文件(`tail -f my.log`,my.log 是我们需要监视的文件。)这在我们监控一个持续增加的日志文件时非常有用。 + +- [使用 head 和 tail 命令有效地管理文件][10] + +**使用 paste 按行合并文本文件** + +`paste` 命令一行一行的合并文件,默认会以制表符来区分每个文件的行,或者你可以自定义的其它分隔符。(下面的例子就是输出中的字段使用等号分隔)。 + + # paste -d= file1 file2 + +![Merge Files in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Merge-Files-in-Linux-with-paste-command.png) + +*Linux 中的 merge 命令* + +**使用 split 命令将文件分块** + +`split` 命令常常用于把一个文件切割成两个或多个由我们自定义的前缀命名的文件。可以根据大小、区块、行数等进行切割,生成的文件会有一个数字或字母的后缀。在下面的例子中,我们将切割 bash.pdf ,每个文件 50KB (-b 50KB),使用数字后缀 (-d): + + # split -b 50KB -d bash.pdf bash_ + +![Split Files in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Split-Files-in-Linux-with-split-command.png) + +*在 Linux 下切割文件* + +你可以使用如下命令来合并这些文件,生成原来的文件: + + # cat bash_00 bash_01 bash_02 bash_03 bash_04 bash_05 > bash.pdf + +**使用 tr 命令替换字符** + +`tr` 命令多用于一对一的替换(改变)字符,或者使用字符范围。和之前一样,下面的实例我们将使用之前的同样文件file2,我们将做: + +- 小写字母 o 变成大写 +- 所有的小写字母都变成大写字母 + +- + # cat file2 | tr o O + # cat file2 | tr [a-z] [A-Z] + +![Translate Characters in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Translate-characters-in-Linux-with-tr-command.png) + +*在 Linux 中替换字符* + +**使用 uniq 和 sort 检查或删除重复的文字** + +`uniq` 命令可以帮我们查出或删除文件中的重复的行,默认会输出到标准输出,我们应当注意,`uniq`只能查出相邻的相同行,所以,`uniq` 往往和 `sort` 一起使用(`sort` 一般用于对文本文件的内容进行排序) + +默认情况下,`sort` 以第一个字段(使用空格分隔)为关键字段。想要指定不同关键字段,我们需要使用 -k 参数,请注意如何使用 `sort` 和 `uniq` 输出我们想要的字段,具体可以看下面的例子: + + # cat file3 + # sort file3 | uniq + # sort -k2 file3 | uniq + # sort -k3 file3 | uniq + +![删除文件中重复的行](http://www.tecmint.com/wp-content/uploads/2015/02/Remove-Duplicate-Lines-in-file.png) + +*删除文件中重复的行* + +**从文件中提取文本的命令** + +`cut` 命令基于字节(-b)、字符(-c)、或者字段(-f)的数量,从输入文件(标准输入或文件)中提取到的部分将会以标准输出上。 + +当我们使用字段 `cut` 时,默认的分隔符是一个制表符,不过你可以通过 -d 参数来自定义分隔符。 + + # cut -d: -f1,3 /etc/passwd # 这个例子提取了第一和第三字段的文本 + # cut -d: -f2-4 /etc/passwd # 这个例子提取了第二到第四字段的文本 + +![从文件中提取文本](http://www.tecmint.com/wp-content/uploads/2015/02/Extract-Text-from-a-file.png) + +*从文件中提取文本* + +注意,简洁起见,上方的两个输出的结果是截断的。 + +**使用 fmt 命令重新格式化文件** + +`fmt` 被用于去“清理”有大量内容或行的文件,或者有多级缩进的文件。新的段落格式每行不会超过75个字符宽,你能通过 -w (width 宽度)参数改变这个设定,它可以设置行宽为一个特定的数值。 + +举个例子,让我们看看当我们用 `fmt` 显示定宽为100个字符的时候的文件 /etc/passwd 时会发生什么。再次,输出截断了。 + + # fmt -w100 /etc/passwd + +![File Reformatting in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/File-Reformatting-in-Linux-with-fmt-command.png) + +*Linux 文件重新格式化* + +**使用 pr 命令格式化打印内容** + +`pr` 分页并且在按列或多列的方式显示一个或多个文件。 换句话说,使用 `pr` 格式化一个文件使它打印出来时看起来更好。举个例子,下面这个命令: + + # ls -a /etc | pr -n --columns=3 -h "Files in /etc" + +以一个友好的排版方式(3列)输出/etc下的文件,自定义了页眉(通过 -h 选项实现)、行号(-n)。 + +![File Formatting in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/File-Formatting-in-Linux-with-pr-command.png) + +*Linux的文件格式化* + +### 总结 ### + +在这篇文章中,我们已经讨论了如何在 Shell 或终端以正确的语法输入和执行命令,并解释如何找到,查阅和使用系统文档。正如你看到的一样简单,这就是你成为 RHCSA 的第一大步。 + +如果你希望添加一些其他的你经常使用的能够有效帮你完成你的日常工作的基础命令,并愿意分享它们,请在下方留言。也欢迎提出问题。我们期待您的回复。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ + +作者:[Gabriel Cánepa][a] +译者:[xiqingongzi](https://github.com/xiqingongzi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:https://www.redhat.com/en/services/certification/rhcsa +[2]:http://linux.cn/article-2479-1.html +[3]:https://linux.cn/article-5109-1.html +[4]:http://linux.cn/article-2687-1.html +[5]:http://www.tecmint.com/rename-multiple-files-in-linux/ +[6]:http://linux.cn/article-2740-1.html +[7]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ +[8]:https://linux.cn/article-3948-1.html +[9]:https://linux.cn/article-3422-1.html +[10]:http://www.tecmint.com/view-contents-of-file-in-linux/ diff --git a/translated/tech/RHCSA/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/translated/tech/RHCSA/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md deleted file mode 100644 index 93c2787c7e..0000000000 --- a/translated/tech/RHCSA/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md +++ /dev/null @@ -1,320 +0,0 @@ -[translating by xiqingongzi] - -RHCSA系列: 复习基础命令及系统文档 – 第一部分 -================================================================================ -RHCSA (红帽认证系统工程师) 是由给商业公司提供开源操作系统和软件的RedHat公司举行的认证考试, 除此之外,红帽公司还为这些企业和机构提供支持、训练以及咨询服务 - -![RHCSA Exam Guide](http://www.tecmint.com/wp-content/uploads/2015/02/RHCSA-Series-by-Tecmint.png) - -RHCSA 考试准备指南 - -RHCSA 考试(考试编号 EX200)通过后可以获取由Red Hat 公司颁发的证书. RHCSA 考试是RHCT(红帽认证技师)的升级版,而且RHCSA必须在新的Red Hat Enterprise Linux(红帽企业版)下完成.RHCT和RHCSA的主要变化就是RHCT基于 RHEL5 , 而RHCSA基于RHEL6或者7, 这两个认证的等级也有所不同. - -红帽认证管理员所会的最基础的是在红帽企业版的环境下执行如下系统管理任务: - -- 理解并会使用命令管理文件、目录、命令行以及系统/软件包的文档 -- 使用不同的启动等级启动系统,认证和控制进程,启动或停止虚拟机 -- 使用分区和逻辑卷管理本地存储 -- 创建并且配置本地文件系统和网络文件系统,设置他们的属性(许可、加密、访问控制表) -- 部署、配置、并且控制系统,包括安装、升级和卸载软件 -- 管理系统用户和组,独立使用集中制的LDAP目录权限控制 -- 确保系统安全,包括基础的防火墙规则和SELinux配置 - - -关于你所在国家的考试注册费用参考 [RHCSA Certification page][1]. - -关于你所在国家的考试注册费用参考RHCSA 认证页面 - - -在这个有15章的RHCSA(红帽认证管理员)备考系列,我们将覆盖以下的关于红帽企业Linux第七版的最新的信息 - -- Part 1: 回顾必会的命令和系统文档 -- Part 2: 在RHEL7如何展示文件和管理目录 -- Part 3: 在RHEL7中如何管理用户和组 -- Part 4: 使用nano和vim管理命令/ 使用grep和正则表达式分析文本 -- Part 5: RHEL7的进程管理:启动,关机,以及其他介于二者之间的. -- Part 6: 使用 'Parted'和'SSM'来管理和加密系统存储 -- Part 7: 使用ACLs(访问控制表)并挂载 Samba /NFS 文件分享 -- Part 8: 加固SSH,设置主机名并开启网络服务 -- Part 9: 安装、配置和加固一个Web,FTP服务器 -- Part 10: Yum 包管理方式,使用Cron进行自动任务管理以及监控系统日志 -- Part 11: 使用FirewallD和Iptables设置防火墙,控制网络流量 -- Part 12: 使用Kickstart 自动安装RHEL 7 -- Part 13: RHEL7:什么是SeLinux?他的原理是什么? -- Part 14: 在RHEL7 中使用基于LDAP的权限控制 -- Part 15: RHEL7的虚拟化:KVM 和虚拟机管理 - -在第一章,我们讲解如何输入和运行正确的命令在终端或者Shell窗口,并且讲解如何找到、插入,以及使用系统文档 - -![RHCSA: Reviewing Essential Linux Commands – Part 1](http://www.tecmint.com/wp-content/uploads/2015/02/Reviewing-Essential-Linux-Commands.png) - -RHCSA:回顾必会的Linux命令 - 第一部分 - -#### 前提: #### - -至少你要熟悉如下命令 - -- [cd command][2] (改变目录) -- [ls command][3] (列举文件) -- [cp command][4] (复制文件) -- [mv command][5] (移动或重命名文件) -- [touch command][6] (创建一个新的文件或更新已存在文件的时间表) -- rm command (删除文件) -- mkdir command (创建目录) - -在这篇文章中你将会找到更多的关于如何更好的使用他们的正确用法和特殊用法. - -虽然没有严格的要求,但是作为讨论常用的Linux命令和方法,你应该安装RHEL7 来尝试使用文章中提到的命令.这将会使你学习起来更省力. - -- [红帽企业版Linux(RHEL)7 安装指南][7] - -### 使用Shell进行交互 ### -如果我们使用文本模式登陆Linux,我们就无法使用鼠标在默认的shell。另一方面,如果我们使用图形化界面登陆,我们将会通过启动一个终端来开启shell,无论那种方式,我们都会看到用户提示,并且我们可以开始输入并且执行命令(当按下Enter时,命令就会被执行) - - -当我们使用文本模式登陆Linux时, -命令是由两个部分组成的: - -- 命令本身 -- 参数 - -某些参数,称为选项(通常使用一个连字符区分),改变了由其他参数定义的命令操作. - -命令的类型可以帮助我们识别某一个特定的命令是由shell内建的还是由一个单独的包提供。这样的区别在于我们能够找到更多关于该信息的命令,对shell内置的命令,我们需要看shell的ManPage,如果是其他提供的,我们需要看它自己的ManPage. - -![Check Shell built in Commands](http://www.tecmint.com/wp-content/uploads/2015/02/Check-shell-built-in-Commands.png) - -检查Shell的内建命令 - -在上面的例子中, cd 和 type 是shell内建的命令,top和 less 是由其他的二进制文件提供的(在这种情况下,type将返回命令的位置) -其他的内建命令 - -- [echo command][8]: 展示字符串 -- [pwd command][9]: 输出当前的工作目录 - -![More Built in Shell Commands](http://www.tecmint.com/wp-content/uploads/2015/02/More-Built-in-Shell-Commands.png) - -更多内建函数 - -**exec 命令** - -运行我们指定的外部程序。请注意,最好是只输入我们想要运行的程序的名字,不过exec命令有一个特殊的特性:使用旧的shell运行,而不是创建新的进程,可以作为子请求的验证. - - # ps -ef | grep [shell 进程的PID] - -当新的进程注销,Shell也随之注销,运行 exec top 然后按下 q键来退出top,你会注意到shell 会话会结束,如下面的屏幕录像展示的那样: - -注:youtube视频 - - -**export 命令** - -输出之后执行的命令的环境的变量 - -**history 命令** - -展示数行之前的历史命令.在感叹号前输入命令编号可以再次执行这个命令.如果我们需要编辑历史列表中的命令,我们可以按下 Ctrl + r 并输入与命令相关的第一个字符. -当我们看到的命令自动补全,我们可以根据我们目前的需要来编辑它: - -注:youtube视频 - - -命令列表会保存在一个叫 .bash_history的文件里.history命令是一个非常有用的用于减少输入次数的工具,特别是进行命令行编辑的时候.默认情况下,bash保留最后输入的500个命令,不过可以通过修改 HISTSIZE 环境变量来增加: - - -![Linux history Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-history-Command.png) - -Linux history 命令 - -但上述变化,在我们的下一次启动不会保留。为了保持HISTSIZE变量的变化,我们需要通过手工修改文件编辑: - - # 设置history请看 HISTSIZE 和 HISTFILESIZE 在 bash(1)的文档 - HISTSIZE=1000 - -**重要**: 我们的更改不会生效,除非我们重启了系统 - -**alias 命令** -没有参数或使用-p参数将会以 名称=值的标准形式输出alias 列表.当提供了参数时,一个alias 将被定义给给定的命令和值 - -使用alias ,我们可以创建我们自己的命令,或修改现有的命令,包括需要的参数.举个例子,假设我们想别名 ls 到 ls –color=auto ,这样就可以使用不同颜色输出文件、目录、链接 - - - # alias ls='ls --color=auto' - -![Linux alias Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-alias-Command.png) - -Linux 别名命令 - -**Note**: 你可以给你的新命令起任何的名字,并且附上足够多的使用单引号分割的参数,但是这样的情况下你要用分号区分开他们. - - # alias myNewCommand='cd /usr/bin; ls; cd; clear' - -**exit 命令** - -Exit和logout命令都是退出shell.exit命令退出所有的shell,logout命令只注销登陆的shell,其他的自动以文本模式启动的shell不算. - -如果我们对某个程序由疑问,我们可以看他的man Page,可以使用man命令调出它,额外的,还有一些重要的文件的手册页(inittab,fstab,hosts等等),库函数,shells,设备及其他功能 - -#### 举例: #### - -- man uname (输出系统信息,如内核名称、处理器、操作系统类型、架构等). -- man inittab (初始化守护设置). - -另外一个重要的信息的来源就是info命令提供的,info命令常常被用来读取信息文件.这些文件往往比manpage 提供更多信息.通过info 关键词调用某个命令的信息 - - # info ls - # info cut - - -另外,在/usr/share/doc 文件夹包含了大量的子目录,里面可以找到大量的文档.他们包含文本文件或其他友好的格式. -确保你使用这三种方法去查找命令的信息。重点关注每个命令文档中介绍的详细的语法 - -**使用expand命令把tabs转换为空格** - -有时候文本文档包含了tabs但是程序无法很好的处理的tabs.或者我们只是简单的希望将tabs转换成空格.这就是为什么expand (GNU核心组件提供)工具出现, - -举个例子,给我们一个文件 NumberList.txt,让我们使用expand处理它,将tabs转换为一个空格.并且以标准形式输出. - - # expand --tabs=1 NumbersList.txt - -![Linux expand Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-expand-Command.png) - -Linux expand 命令 - -unexpand命令可以实现相反的功能(将空格转为tab) - -**使用head输出文件首行及使用tail输出文件尾行** - -通常情况下,head命令后跟着文件名时,将会输出该文件的前十行,我们可以通过 -n 参数来自定义具体的行数。 - - # head -n3 /etc/passwd - # tail -n3 /etc/passwd - -![Linux head and tail Command](http://www.tecmint.com/wp-content/uploads/2015/02/Linux-head-and-tail-Command.png) - -Linux 的 head 和 tail 命令 - -tail 最有意思的一个特性就是能够展现信息(最后一行)就像我们输入文件(tail -f my.log,一行一行的,就像我们在观察它一样。)这在我们监控一个持续增加的日志文件时非常有用 - -更多: [Manage Files Effectively using head and tail Commands][10] - -**使用paste合并文本文件** -paste命令一行一行的合并文件,默认会以tab来区分每一行,或者其他你自定义的分行方式.(下面的例子就是输出使用等号划分行的文件). - # paste -d= file1 file2 - -![Merge Files in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Merge-Files-in-Linux-with-paste-command.png) - -Merge Files in Linux - -**使用split命令将文件分块** - -split 命令常常用于把一个文件切割成两个或多个文由我们自定义的前缀命名的件文件.这些文件可以通过大小、区块、行数,生成的文件会有一个数字或字母的后缀.在下面的例子中,我们将切割bash.pdf ,每个文件50KB (-b 50KB) ,使用命名后缀 (-d): - - # split -b 50KB -d bash.pdf bash_ - -![Split Files in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Split-Files-in-Linux-with-split-command.png) - -在Linux下划分文件 - -你可以使用如下命令来合并这些文件,生成源文件: - - # cat bash_00 bash_01 bash_02 bash_03 bash_04 bash_05 > bash.pdf - -**使用tr命令改变字符** - -tr 命令多用于变化(改变)一个一个的字符活使用字符范围.和之前一样,下面的实例我们江使用同样的文件file2,我们将实习: - -- 小写字母 o 变成大写 -- 所有的小写字母都变成大写字母 - - # cat file2 | tr o O - # cat file2 | tr [a-z] [A-Z] - -![Translate Characters in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/Translate-characters-in-Linux-with-tr-command.png) - -在Linux中替换文字 - -**使用uniq和sort检查或删除重复的文字** - -uniq命令可以帮我们查出或删除文件中的重复的行,默认会写出到stdout.我们应当注意, uniq 只能查出相邻的两个相同的单纯,所以, uniq 往往和sort 一起使用(sort一般用于对文本文件的内容进行排序) - - -默认的,sort 以第一个参数(使用空格区分)为关键字.想要定义特殊的关键字,我们需要使用 -k参数,请注意如何使用sort 和uniq输出我们想要的字段,具体可以看下面的例子 - - # cat file3 - # sort file3 | uniq - # sort -k2 file3 | uniq - # sort -k3 file3 | uniq - -![删除文件中重复的行](http://www.tecmint.com/wp-content/uploads/2015/02/Remove-Duplicate-Lines-in-file.png) - -删除文件中重复的行 - -**从文件中提取文本的命令** - -Cut命令基于字节(-b),字符(-c),或者区块(-f)从stdin活文件中提取到的部分将会以标准的形式展现在屏幕上 - -当我们使用区块切割时,默认的分隔符是一个tab,不过你可以通过 -d 参数来自定义分隔符. - - # cut -d: -f1,3 /etc/passwd # 这个例子提取了第一块和第三块的文本 - # cut -d: -f2-4 /etc/passwd # 这个例子提取了第一块到第三块的文本 - -![从文件中提取文本](http://www.tecmint.com/wp-content/uploads/2015/02/Extract-Text-from-a-file.png) - -从文件中提取文本 - - -注意,上方的两个输出的结果是十分简洁的。 - -**使用fmt命令重新格式化文件** - -fmt 被用于去“清理”有大量内容或行的文件,或者有很多缩进的文件.新的锻炼格式每行不会超过75个字符款,你能改变这个设定通过 -w(width 宽度)参数,它可以设置行宽为一个特定的数值 - -举个例子,让我们看看当我们用fmt显示定宽为100个字符的时候的文件/etc/passwd 时会发生什么.再来一次,输出值变得更加简洁. - - # fmt -w100 /etc/passwd - -![File Reformatting in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/File-Reformatting-in-Linux-with-fmt-command.png) - -Linux文件重新格式化 - -**使用pr命令格式化打印内容** - -pr 分页并且在列中展示一个或多个用于打印的文件. 换句话说,使用pr格式化一个文件使他打印出来时看起来更好.举个例子,下面这个命令 - - # ls -a /etc | pr -n --columns=3 -h "Files in /etc" - -以一个友好的排版方式(3列)输出/etc下的文件,自定义了页眉(通过 -h 选项实现),行号(-n) - -![File Formatting in Linux](http://www.tecmint.com/wp-content/uploads/2015/02/File-Formatting-in-Linux-with-pr-command.png) - -Linux的文件格式 - -### 总结 ### - -在这篇文章中,我们已经讨论了如何在Shell或终端以正确的语法输入和执行命令,并解释如何找到,检查和使用系统文档。正如你看到的一样简单,这就是你成为RHCSA的第一大步 - -如果你想添加一些其他的你经常使用的能够有效帮你完成你的日常工作的基础命令,并为分享他们而感到自豪,请在下方留言.也欢迎提出问题.我们期待您的回复. - - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ - -作者:[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]:https://www.redhat.com/en/services/certification/rhcsa -[2]:http://www.tecmint.com/cd-command-in-linux/ -[3]:http://www.tecmint.com/ls-command-interview-questions/ -[4]:http://www.tecmint.com/advanced-copy-command-shows-progress-bar-while-copying-files/ -[5]:http://www.tecmint.com/rename-multiple-files-in-linux/ -[6]:http://www.tecmint.com/8-pratical-examples-of-linux-touch-command/ -[7]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ -[8]:http://www.tecmint.com/echo-command-in-linux/ -[9]:http://www.tecmint.com/pwd-command-examples/ -[10]:http://www.tecmint.com/view-contents-of-file-in-linux/ From e82658e0f8f22e40ad56e17aab0fa0690aa1152c Mon Sep 17 00:00:00 2001 From: Ping Date: Wed, 2 Sep 2015 10:04:56 +0800 Subject: [PATCH 1973/2517] Translating by Ping --- ...l The Latest Linux Kernel in Ubuntu Easily via A Script.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md b/sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md index 7022efd817..cdb1d244d0 100644 --- a/sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md +++ b/sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md @@ -1,3 +1,5 @@ +Translating by Ping + Install The Latest Linux Kernel in Ubuntu Easily via A Script ================================================================================ ![](http://ubuntuhandbook.org/wp-content/uploads/2014/12/linux-kernel-icon-tux.png) @@ -76,4 +78,4 @@ via: http://ubuntuhandbook.org/index.php/2015/08/install-latest-kernel-script/ [a]:http://ubuntuhandbook.org/index.php/about/ [1]:http://kernel.ubuntu.com/~kernel-ppa/mainline/ -[2]:https://gist.github.com/mmstick/8493727 \ No newline at end of file +[2]:https://gist.github.com/mmstick/8493727 From 2abff784ad9f38725baf3606b3e12edf761ddb09 Mon Sep 17 00:00:00 2001 From: Ping Date: Wed, 2 Sep 2015 10:29:09 +0800 Subject: [PATCH 1974/2517] Translating by Ping --- ...switch from NetworkManager to systemd-networkd on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md b/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md index 2f2405043c..bc7ebee015 100644 --- a/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md +++ b/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md @@ -1,3 +1,5 @@ +Translating by Ping + How to switch from NetworkManager to systemd-networkd on Linux ================================================================================ In the world of Linux, adoption of [systemd][1] has been a subject of heated controversy, and the debate between its proponents and critics is still going on. As of today, most major Linux distributions have adopted systemd as a default init system. @@ -162,4 +164,4 @@ via: http://xmodulo.com/switch-from-networkmanager-to-systemd-networkd.html [1]:http://xmodulo.com/use-systemd-system-administration-debian.html [2]:http://xmodulo.com/disable-network-manager-linux.html [3]:http://xmodulo.com/how-to-configure-linux-bridge-interface.html -[4]:http://www.freedesktop.org/software/systemd/man/systemd.network.html \ No newline at end of file +[4]:http://www.freedesktop.org/software/systemd/man/systemd.network.html From 53b01d741f1da3218224d7a6bab1a95af8654c5b Mon Sep 17 00:00:00 2001 From: Ping Date: Wed, 2 Sep 2015 14:00:22 +0800 Subject: [PATCH 1975/2517] Complete Install The Latest Linux Kernel in Ubuntu Easily via A Script --- ...ux Kernel in Ubuntu Easily via A Script.md | 81 ------------------- ...ux Kernel in Ubuntu Easily via A Script.md | 79 ++++++++++++++++++ 2 files changed, 79 insertions(+), 81 deletions(-) delete mode 100644 sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md create mode 100644 translated/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md diff --git a/sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md b/sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md deleted file mode 100644 index cdb1d244d0..0000000000 --- a/sources/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md +++ /dev/null @@ -1,81 +0,0 @@ -Translating by Ping - -Install The Latest Linux Kernel in Ubuntu Easily via A Script -================================================================================ -![](http://ubuntuhandbook.org/wp-content/uploads/2014/12/linux-kernel-icon-tux.png) - -Want to install the latest Linux Kernel? A simple script can always do the job and make things easier in Ubuntu. - -Michael Murphy has created a script makes installing the latest RC, stable, or lowlatency Kernel easier in Ubuntu. The script asks some questions and automatically downloads and installs the latest Kernel packages from [Ubuntu kernel mainline page][1]. - -### Install / Upgrade Linux Kernel via the Script: ### - -1. Download the script from the right sidebar of the [github page][2] (click the “Download Zip” button). - -2. Decompress the Zip archive by right-clicking on it in your user Downloads folder and select “Extract Here”. - -3. Navigate to the result folder in terminal by right-clicking on that folder and select “Open in Terminal”: - -![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/open-terminal.jpg) - -It opens a terminal window and automatically navigates into the result folder. If you **DON’T** find the “Open in Terminal” option, search for and install `nautilus-open-terminal` in Ubuntu Software Center and then log out and back in (or run `nautilus -q` command in terminal instead to apply changes). - -4. When you’re in terminal, give the script executable permission for once. - - chmod +x * - -FINALLY run the script every time you want to install / upgrade Linux Kernel in Ubuntu: - - ./* - -![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/run-script.jpg) - -I use * instead of the SCRIPT NAME in both commands since it’s the only file in that folder. - -If the script runs successfully, restart your computer when done. - -### Revert back and Uninstall the new Kernel: ### - -To revert back and remove the new kernel for any reason, restart your computer and select boot with the old kernel entry under **Advanced Options** menu when you’re at Grub boot-loader. - -When it boots up, see below section. - -### How to Remove the old (or new) Kernels: ### - -1. Install Synaptic Package Manager from Ubuntu Software Center. - -2. Launch Synaptic Package Manager and do: - -- click the **Reload** button in case you want to remove the new kernel. -- select **Status -> Installed** on the left pane to make search list clear. -- search **linux-image**- using Quick filter box. -- select a kernel image “linux-image-x.xx.xx-generic” and mark for (complete) removal -- finally apply changes - -![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/remove-old-kernel1.jpg) - -Repeat until you removed all unwanted kernels. DON’T carelessly remove the current running kernel, check it out via `uname -r` (see below pic.) command. - -For Ubuntu Server, you may run below commands one by one: - - uname -r - - dpkg -l | grep linux-image- - - sudo apt-get autoremove KERNEL_IMAGE_NAME - -![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/remove-kernel-terminal.jpg) - --------------------------------------------------------------------------------- - -via: http://ubuntuhandbook.org/index.php/2015/08/install-latest-kernel-script/ - -作者:[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://kernel.ubuntu.com/~kernel-ppa/mainline/ -[2]:https://gist.github.com/mmstick/8493727 diff --git a/translated/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md b/translated/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md new file mode 100644 index 0000000000..dbe5dec7cd --- /dev/null +++ b/translated/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md @@ -0,0 +1,79 @@ +使用脚本便捷地在Ubuntu系统中安装最新的Linux内核 +================================================================================ +![](http://ubuntuhandbook.org/wp-content/uploads/2014/12/linux-kernel-icon-tux.png) + +想要安装最新的Linux内核吗?一个简单的脚本就可以在Ubuntu系统中方便的完成这项工作。 + +Michael Murphy 写了一个脚本用来将最新的候选版、标准版、或者低延时版内核安装到 Ubuntu 系统中。这个脚本会在询问一些问题后从 [Ubuntu kernel mainline page][1] 下载安装最新的 Linux 内核包。 + +### 通过脚本来安装、升级Linux内核: ### + +1. 点击 [github page][2] 右上角的 “Download Zip” 来下载脚本。 + +2. 鼠标右键单击用户下载目录下的 Zip 文件,选择 “Extract Here” 将其解压到此处。 + +3. 右键点击解压后的文件夹,选择 “Open in Terminal” 在终端中导航到此文件夹下。 + +![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/open-terminal.jpg) + +此时将会打开一个终端,并且自动导航到结果文件夹下。如果你找不到 “Open in Terminal” 选项的话,在 Ubuntu 软件中心搜索安装 `nautilus-open-terminal` ,然后重新登录系统即可(也可以再终端中运行 `nautilus -q` 来取代重新登录系统的操作)。 +4. 当进入终端后,运行以下命令来赋予脚本执行本次操作的权限。 + + chmod +x * + +最后,每当你想要安装或升级 Ubuntu 的 linux 内核时都可以运行此脚本。 + + ./* + +![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/run-script.jpg) + +这里之所以使用 * 替代脚本名称是因为文件夹中只有它一个文件。 + +如果脚本运行成功,重启电脑即可。 + +### 恢复并且卸载新版内核 ### + +如果因为某些原因要恢复并且移除新版内核的话,请重启电脑,在 Grub 启动器的 **高级选项** 菜单下选择旧版内核来启动系统。 + +当系统启动后,参照下边章节继续执行。 + +### 如何移除旧的(或新的)内核: ### + +1. 从Ubuntu软件中心安装 Synaptic Package Manager。 + +2. 打开 Synaptic Package Manager 然后如下操作: + +- 点击 **Reload** 按钮,让想要被删除的新内核显示出来. +- 在左侧面板中选择 **Status -> Installed** ,让查找列表更清晰一些。 +- 在 Quick filter 输入框中输入 **linux-image-** 用于查询。 +- 选择一个内核镜像 “linux-image-x.xx.xx-generic” 然后将其标记为removal(或者Complete Removal) +- 最后,应用变更 + +![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/remove-old-kernel1.jpg) + +重复以上操作直到移除所有你不需要的内核。注意,不要随意移除此刻正在运行的内核,你可以通过 `uname -r` 命令来查看运行的内核。 + +对于 Ubuntu 服务器来说,你可以一步步运行下面的命令: + + uname -r + + dpkg -l | grep linux-image- + + sudo apt-get autoremove KERNEL_IMAGE_NAME + +![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/remove-kernel-terminal.jpg) + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/08/install-latest-kernel-script/ + +作者:[Ji m][a] +译者:[译者ID](https://github.com/mr-ping) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ubuntuhandbook.org/index.php/about/ +[1]:http://kernel.ubuntu.com/~kernel-ppa/mainline/ +[2]:https://gist.github.com/mmstick/8493727 + From c87292138d342c6c32a2ee865e4c4aba990d13f1 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 2 Sep 2015 14:40:18 +0800 Subject: [PATCH 1976/2517] PUB:20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting @GOLinux --- ...Switch for debugging and troubleshooting.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename {translated/tech => published}/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md (71%) diff --git a/translated/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md b/published/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md similarity index 71% rename from translated/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md rename to published/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md index 542cf31cb3..f5afec9a88 100644 --- a/translated/tech/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md +++ b/published/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md @@ -1,10 +1,10 @@ -Linux有问必答——如何启用Open vSwitch的日志功能以便调试和排障 +Linux有问必答:如何启用Open vSwitch的日志功能以便调试和排障 ================================================================================ > **问题** 我试着为我的Open vSwitch部署排障,鉴于此,我想要检查它的由内建日志机制生成的调试信息。我怎样才能启用Open vSwitch的日志功能,并且修改它的日志等级(如,修改成INFO/DEBUG级别)以便于检查更多详细的调试信息呢? -Open vSwitch(OVS)是Linux平台上用于虚拟切换的最流行的开源部署。由于当今的数据中心日益依赖于软件定义的网络(SDN)架构,OVS被作为数据中心的SDN部署中实际上的标准网络元素而快速采用。 +Open vSwitch(OVS)是Linux平台上最流行的开源的虚拟交换机。由于当今的数据中心日益依赖于软件定义网络(SDN)架构,OVS被作为数据中心的SDN部署中的事实标准上的网络元素而得到飞速应用。 -Open vSwitch具有一个内建的日志机制,它称之为VLOG。VLOG工具允许你在各种切换组件中启用并自定义日志,由VLOG生成的日志信息可以被发送到一个控制台,syslog以及一个独立日志文件组合,以供检查。你可以通过一个名为`ovs-appctl`的命令行工具在运行时动态配置OVS日志。 +Open vSwitch具有一个内建的日志机制,它称之为VLOG。VLOG工具允许你在各种网络交换组件中启用并自定义日志,由VLOG生成的日志信息可以被发送到一个控制台、syslog以及一个便于查看的单独日志文件。你可以通过一个名为`ovs-appctl`的命令行工具在运行时动态配置OVS日志。 ![](https://farm1.staticflickr.com/499/19300367114_cd8aac2fb2_c.jpg) @@ -14,7 +14,7 @@ Open vSwitch具有一个内建的日志机制,它称之为VLOG。VLOG工具允 $ sudo ovs-appctl vlog/set module[:facility[:level]] -- **Module**:OVS中的任何合法组件的名称(如netdev,ofproto,dpif,vswitchd,以及其它大量组件) +- **Module**:OVS中的任何合法组件的名称(如netdev,ofproto,dpif,vswitchd等等) - **Facility**:日志信息的目的地(必须是:console,syslog,或者file) - **Level**:日志的详细程度(必须是:emer,err,warn,info,或者dbg) @@ -36,13 +36,13 @@ Open vSwitch具有一个内建的日志机制,它称之为VLOG。VLOG工具允 ![](https://farm1.staticflickr.com/465/19734939478_7eb5d44635_c.jpg) -输出结果显示了用于三个工具(console,syslog,file)的各个模块的调试级别。默认情况下,所有模块的日志等级都被设置为INFO。 +输出结果显示了用于三个场合(facility:console,syslog,file)的各个模块的调试级别。默认情况下,所有模块的日志等级都被设置为INFO。 -指定任何一个OVS模块,你可以选择性地修改任何特定工具的调试级别。例如,如果你想要在控制台屏幕中查看dpif更为详细的调试信息,可以运行以下命令。 +指定任何一个OVS模块,你可以选择性地修改任何特定场合的调试级别。例如,如果你想要在控制台屏幕中查看dpif更为详细的调试信息,可以运行以下命令。 $ sudo ovs-appctl vlog/set dpif:console:dbg -你将看到dpif模块的console工具已经将其日志等级修改为DBG,而其它两个工具syslog和file的日志级别仍然没有改变。 +你将看到dpif模块的console工具已经将其日志等级修改为DBG,而其它两个场合syslog和file的日志级别仍然没有改变。 ![](https://farm1.staticflickr.com/333/19896760146_5d851311ae_c.jpg) @@ -52,7 +52,7 @@ Open vSwitch具有一个内建的日志机制,它称之为VLOG。VLOG工具允 ![](https://farm1.staticflickr.com/351/19734939828_8c7f59e404_c.jpg) -同时,如果你想要一次性修改所有三个工具的日志级别,你可以指定“ANY”作为工具名。例如,下面的命令将修改每个模块的所有工具的日志级别为DBG。 +同时,如果你想要一次性修改所有三个场合的日志级别,你可以指定“ANY”作为场合名。例如,下面的命令将修改每个模块的所有场合的日志级别为DBG。 $ sudo ovs-appctl vlog/set ANY:ANY:dbg @@ -62,7 +62,7 @@ via: http://ask.xmodulo.com/enable-logging-open-vswitch.html 作者:[Dan Nanni][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 31c87ccf4c9bae259d785b66ef06792ee225bfaf Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 2 Sep 2015 15:13:00 +0800 Subject: [PATCH 1977/2517] PUB:20150811 How to Install Snort and Usage in Ubuntu 15.04 @geekpi --- ...Install Snort and Usage in Ubuntu 15.04.md | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) rename {translated/tech => published}/20150811 How to Install Snort and Usage in Ubuntu 15.04.md (77%) diff --git a/translated/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md b/published/20150811 How to Install Snort and Usage in Ubuntu 15.04.md similarity index 77% rename from translated/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md rename to published/20150811 How to Install Snort and Usage in Ubuntu 15.04.md index 06fbfd62b8..01d7f7ec13 100644 --- a/translated/tech/20150811 How to Install Snort and Usage in Ubuntu 15.04.md +++ b/published/20150811 How to Install Snort and Usage in Ubuntu 15.04.md @@ -1,12 +1,13 @@ -在Ubuntu 15.04中如何安装和使用Snort +在 Ubuntu 15.04 中如何安装和使用 Snort ================================================================================ -对于IT安全而言入侵检测是一件非常重要的事。入侵检测系统用于检测网络中非法与恶意的请求。Snort是一款知名的开源入侵检测系统。Web界面(Snorby)可以用于更好地分析警告。Snort使用iptables/pf防火墙来作为入侵检测系统。本篇中,我们会安装并配置一个开源的IDS系统snort。 + +对于网络安全而言入侵检测是一件非常重要的事。入侵检测系统(IDS)用于检测网络中非法与恶意的请求。Snort是一款知名的开源的入侵检测系统。其 Web界面(Snorby)可以用于更好地分析警告。Snort使用iptables/pf防火墙来作为入侵检测系统。本篇中,我们会安装并配置一个开源的入侵检测系统snort。 ### Snort 安装 ### #### 要求 #### -snort所使用的数据采集库(DAQ)用于抽象地调用采集库。这个在snort上就有。下载过程如下截图所示。 +snort所使用的数据采集库(DAQ)用于一个调用包捕获库的抽象层。这个在snort上就有。下载过程如下截图所示。 ![downloading_daq](http://blog.linoxide.com/wp-content/uploads/2015/07/downloading_daq.png) @@ -48,7 +49,7 @@ make和make install 命令的结果如下所示。 ![snort_extraction](http://blog.linoxide.com/wp-content/uploads/2015/07/snort_extraction.png) -创建安装目录并在脚本中设置prefix参数。同样也建议启用包性能监控(PPM)标志。 +创建安装目录并在脚本中设置prefix参数。同样也建议启用包性能监控(PPM)的sourcefire标志。 #mkdir /usr/local/snort @@ -56,7 +57,7 @@ make和make install 命令的结果如下所示。 ![snort_installation](http://blog.linoxide.com/wp-content/uploads/2015/07/snort_installation.png) -配置脚本由于缺少libpcre-dev、libdumbnet-dev 和zlib开发库而报错。 +配置脚本会由于缺少libpcre-dev、libdumbnet-dev 和zlib开发库而报错。 配置脚本由于缺少libpcre库报错。 @@ -96,7 +97,7 @@ make和make install 命令的结果如下所示。 ![make install snort](http://blog.linoxide.com/wp-content/uploads/2015/07/make-install-snort.png) -最终snort在/usr/local/snort/bin中运行。现在它对eth0的所有流量都处在promisc模式(包转储模式)。 +最后,从/usr/local/snort/bin中运行snort。现在它对eth0的所有流量都处在promisc模式(包转储模式)。 ![snort running](http://blog.linoxide.com/wp-content/uploads/2015/07/snort-running.png) @@ -106,14 +107,17 @@ make和make install 命令的结果如下所示。 #### Snort的规则和配置 #### -从源码安装的snort需要规则和安装配置,因此我们会从/etc/snort下面复制规则和配置。我们已经创建了单独的bash脚本来用于规则和配置。它会设置下面这些snort设置。 +从源码安装的snort还需要设置规则和配置,因此我们需要复制规则和配置到/etc/snort下面。我们已经创建了单独的bash脚本来用于设置规则和配置。它会设置下面这些snort设置。 -- 在linux中创建snort用户用于snort IDS服务。 +- 在linux中创建用于snort IDS服务的snort用户。 - 在/etc下面创建snort的配置文件和文件夹。 -- 权限设置并从etc中复制snortsnort源代码 +- 权限设置并从源代码的etc目录中复制数据。 - 从snort文件中移除规则中的#(注释符号)。 - #!/bin/bash##PATH of source code of snort +- + + #!/bin/bash# + # snort源代码的路径 snort_src="/home/test/Downloads/snort-2.9.7.3" echo "adding group and user for snort..." groupadd snort &> /dev/null @@ -141,15 +145,15 @@ make和make install 命令的结果如下所示。 sed -i 's/include \$RULE\_PATH/#include \$RULE\_PATH/' /etc/snort/snort.conf echo "---DONE---" -改变脚本中的snort源目录并运行。下面是成功的输出。 +改变脚本中的snort源目录路径并运行。下面是成功的输出。 ![running script](http://blog.linoxide.com/wp-content/uploads/2015/08/running_script.png) -上面的脚本从snort源中复制下面的文件/文件夹到/etc/snort配置文件中 +上面的脚本从snort源中复制下面的文件和文件夹到/etc/snort配置文件中 ![files copied](http://blog.linoxide.com/wp-content/uploads/2015/08/created.png) -、snort的配置非常复杂,然而为了IDS能正常工作需要进行下面必要的修改。 +snort的配置非常复杂,要让IDS能正常工作需要进行下面必要的修改。 ipvar HOME_NET 192.168.1.0/24 # LAN side @@ -173,7 +177,7 @@ make和make install 命令的结果如下所示。 ![path rules](http://blog.linoxide.com/wp-content/uploads/2015/08/path-rules.png) -下载[下载社区][1]规则并解压到/etc/snort/rules。启用snort.conf中的社区及紧急威胁规则。 +现在[下载社区规则][1]并解压到/etc/snort/rules。启用snort.conf中的社区及紧急威胁规则。 ![wget_rules](http://blog.linoxide.com/wp-content/uploads/2015/08/wget_rules.png) @@ -187,7 +191,7 @@ make和make install 命令的结果如下所示。 ### 总结 ### -本篇中,我们致力于开源IDPS系统snort在Ubuntu上的安装和配置。默认它用于监控时间,然而它可以被配置成用于网络保护的内联模式。snort规则可以在离线模式中可以使用pcap文件测试和分析 +本篇中,我们关注了开源IDPS系统snort在Ubuntu上的安装和配置。通常它用于监控事件,然而它可以被配置成用于网络保护的在线模式。snort规则可以在离线模式中可以使用pcap捕获文件进行测试和分析 -------------------------------------------------------------------------------- @@ -195,7 +199,7 @@ via: http://linoxide.com/security/install-snort-usage-ubuntu-15-04/ 作者:[nido][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From e4fcc9361a6538789ae1b6d1c9902828a50cb43e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 2 Sep 2015 23:47:16 +0800 Subject: [PATCH 1978/2517] PUB:20150803 Managing Linux Logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wyangsun 辛苦啦,我校对都用了一个下午加一个晚上呢,更别说翻译了! --- published/20150803 Managing Linux Logs.md | 418 ++++++++++++++++++ .../tech/20150803 Managing Linux Logs.md | 418 ------------------ 2 files changed, 418 insertions(+), 418 deletions(-) create mode 100644 published/20150803 Managing Linux Logs.md delete mode 100644 translated/tech/20150803 Managing Linux Logs.md diff --git a/published/20150803 Managing Linux Logs.md b/published/20150803 Managing Linux Logs.md new file mode 100644 index 0000000000..dca518e531 --- /dev/null +++ b/published/20150803 Managing Linux Logs.md @@ -0,0 +1,418 @@ +Linux 日志管理指南 +================================================================================ + +管理日志的一个最好做法是将你的日志集中或整合到一个地方,特别是在你有许多服务器或多层级架构时。我们将告诉你为什么这是一个好主意,然后给出如何更容易的做这件事的一些小技巧。 + +### 集中管理日志的好处 ### + +如果你有很多服务器,查看某个日志文件可能会很麻烦。现代的网站和服务经常包括许多服务器层级、分布式的负载均衡器,等等。找到正确的日志将花费很长时间,甚至要花更长时间在登录服务器的相关问题上。没什么比发现你找的信息没有被保存下来更沮丧的了,或者本该保留的日志文件正好在重启后丢失了。 + +集中你的日志使它们查找更快速,可以帮助你更快速的解决产品问题。你不用猜测那个服务器存在问题,因为所有的日志在同一个地方。此外,你可以使用更强大的工具去分析它们,包括日志管理解决方案。一些解决方案能[转换纯文本日志][1]为一些字段,更容易查找和分析。 + +集中你的日志也可以使它们更易于管理: + +- 它们更安全,当它们备份归档到一个单独区域时会有意无意地丢失。如果你的服务器宕机或者无响应,你可以使用集中的日志去调试问题。 +- 你不用担心ssh或者低效的grep命令在陷入困境的系统上需要更多的资源。 +- 你不用担心磁盘占满,这个能让你的服务器死机。 +- 你能保持你的产品服务器的安全性,只是为了查看日志无需给你所有团队登录权限。给你的团队从日志集中区域访问日志权限更安全。 + +随着集中日志管理,你仍需处理由于网络联通性不好或者耗尽大量网络带宽从而导致不能传输日志到中心区域的风险。在下面的章节我们将要讨论如何聪明的解决这些问题。 + +### 流行的日志归集工具 ### + +在 Linux 上最常见的日志归集是通过使用 syslog 守护进程或者日志代理。syslog 守护进程支持本地日志的采集,然后通过syslog 协议传输日志到中心服务器。你可以使用很多流行的守护进程来归集你的日志文件: + +- [rsyslog][2] 是一个轻量后台程序,在大多数 Linux 分支上已经安装。 +- [syslog-ng][3] 是第二流行的 Linux 系统日志后台程序。 +- [logstash][4] 是一个重量级的代理,它可以做更多高级加工和分析。 +- [fluentd][5] 是另一个具有高级处理能力的代理。 + +Rsyslog 是集中日志数据最流行的后台程序,因为它在大多数 Linux 分支上是被默认安装的。你不用下载或安装它,并且它是轻量的,所以不需要占用你太多的系统资源。 + +如果你需要更多先进的过滤或者自定义分析功能,如果你不在乎额外的系统负载,Logstash 是另一个最流行的选择。 + +### 配置 rsyslog.conf ### + +既然 rsyslog 是最广泛使用的系统日志程序,我们将展示如何配置它为日志中心。它的全局配置文件位于 /etc/rsyslog.conf。它加载模块,设置全局指令,和包含位于目录 /etc/rsyslog.d 中的应用的特有的配置。目录中包含的 /etc/rsyslog.d/50-default.conf 指示 rsyslog 将系统日志写到文件。在 [rsyslog 文档][6]中你可以阅读更多相关配置。 + +rsyslog 配置语言是是[RainerScript][7]。你可以给日志指定输入,就像将它们输出到另外一个位置一样。rsyslog 已经配置标准输入默认是 syslog ,所以你通常只需增加一个输出到你的日志服务器。这里有一个 rsyslog 输出到一个外部服务器的配置例子。在本例中,**BEBOP** 是一个服务器的主机名,所以你应该替换为你的自己的服务器名。 + + action(type="omfwd" protocol="tcp" target="BEBOP" port="514") + +你可以发送你的日志到一个有足够的存储容量的日志服务器来存储,提供查询,备份和分析。如果你存储日志到文件系统,那么你应该建立[日志轮转][8]来防止你的磁盘爆满。 + +作为一种选择,你可以发送这些日志到一个日志管理方案。如果你的解决方案是安装在本地你可以发送到系统文档中指定的本地主机和端口。如果你使用基于云提供商,你将发送它们到你的提供商特定的主机名和端口。 + +### 日志目录 ### + +你可以归集一个目录或者匹配一个通配符模式的所有文件。nxlog 和 syslog-ng 程序支持目录和通配符(*)。 + +常见的 rsyslog 不能直接监控目录。作为一种解决办法,你可以设置一个定时任务去监控这个目录的新文件,然后配置 rsyslog 来发送这些文件到目的地,比如你的日志管理系统。举个例子,日志管理提供商 Loggly 有一个开源版本的[目录监控脚本][9]。 + +### 哪个协议: UDP、TCP 或 RELP? ### + +当你使用网络传输数据时,有三个主流协议可以选择。UDP 在你自己的局域网是最常用的,TCP 用在互联网。如果你不能失去(任何)日志,就要使用更高级的 RELP 协议。 + +[UDP][10] 发送一个数据包,那只是一个单一的信息包。它是一个只外传的协议,所以它不会发送给你回执(ACK)。它只尝试发送包。当网络拥堵时,UDP 通常会巧妙的降级或者丢弃日志。它通常使用在类似局域网的可靠网络。 + +[TCP][11] 通过多个包和返回确认发送流式信息。TCP 会多次尝试发送数据包,但是受限于 [TCP 缓存][12]的大小。这是在互联网上发送送日志最常用的协议。 + +[RELP][13] 是这三个协议中最可靠的,但是它是为 rsyslog 创建的,而且很少有行业采用。它在应用层接收数据,如果有错误就会重发。请确认你的日志接受位置也支持这个协议。 + +### 用磁盘辅助队列可靠的传送 ### + +如果 rsyslog 在存储日志时遭遇错误,例如一个不可用网络连接,它能将日志排队直到连接还原。队列日志默认被存储在内存里。无论如何,内存是有限的并且如果问题仍然存在,日志会超出内存容量。 + +**警告:如果你只存储日志到内存,你可能会失去数据。** + +rsyslog 能在内存被占满时将日志队列放到磁盘。[磁盘辅助队列][14]使日志的传输更可靠。这里有一个例子如何配置rsyslog 的磁盘辅助队列: + + $WorkDirectory /var/spool/rsyslog # 暂存文件(spool)放置位置 + $ActionQueueFileName fwdRule1 # 暂存文件的唯一名字前缀 + $ActionQueueMaxDiskSpace 1g # 1gb 空间限制(尽可能大) + $ActionQueueSaveOnShutdown on # 关机时保存日志到磁盘 + $ActionQueueType LinkedList # 异步运行 + $ActionResumeRetryCount -1 # 如果主机宕机,不断重试 + +### 使用 TLS 加密日志 ### + +如果你担心你的数据的安全性和隐私性,你应该考虑加密你的日志。如果你使用纯文本在互联网传输日志,嗅探器和中间人可以读到你的日志。如果日志包含私人信息、敏感的身份数据或者政府管制数据,你应该加密你的日志。rsyslog 程序能使用 TLS 协议加密你的日志保证你的数据更安全。 + +建立 TLS 加密,你应该做如下任务: + +1. 生成一个[证书授权(CA)][15]。在 /contrib/gnutls 有一些证书例子,可以用来测试,但是你需要为产品环境创建自己的证书。如果你正在使用一个日志管理服务,它会给你一个证书。 +1. 为你的服务器生成一个[数字证书][16]使它能启用 SSL 操作,或者使用你自己的日志管理服务提供商的一个数字证书。 +1. 配置你的 rsyslog 程序来发送 TLS 加密数据到你的日志管理系统。 + +这有一个 rsyslog 配置 TLS 加密的例子。替换 CERT 和 DOMAIN_NAME 为你自己的服务器配置。 + + $DefaultNetstreamDriverCAFile /etc/rsyslog.d/keys/ca.d/CERT.crt + $ActionSendStreamDriver gtls + $ActionSendStreamDriverMode 1 + $ActionSendStreamDriverAuthMode x509/name + $ActionSendStreamDriverPermittedPeer *.DOMAIN_NAME.com + +### 应用日志的最佳管理方法 ### + +除 Linux 默认创建的日志之外,归集重要的应用日志也是一个好主意。几乎所有基于 Linux 的服务器应用都把它们的状态信息写入到独立、专门的日志文件中。这包括数据库产品,像 PostgreSQL 或者 MySQL,网站服务器,像 Nginx 或者 Apache,防火墙,打印和文件共享服务,目录和 DNS 服务等等。 + +管理员安装一个应用后要做的第一件事是配置它。Linux 应用程序典型的有一个放在 /etc 目录里 .conf 文件。它也可能在其它地方,但是那是大家找配置文件首先会看的地方。 + +根据应用程序有多复杂多庞大,可配置参数的数量可能会很少或者上百行。如前所述,大多数应用程序可能会在某种日志文件写它们的状态:配置文件是定义日志设置和其它东西的地方。 + +如果你不确定它在哪,你可以使用locate命令去找到它: + + [root@localhost ~]# locate postgresql.conf + /usr/pgsql-9.4/share/postgresql.conf.sample + /var/lib/pgsql/9.4/data/postgresql.conf + +#### 设置一个日志文件的标准位置 #### + +Linux 系统一般保存它们的日志文件在 /var/log 目录下。一般是这样,但是需要检查一下应用是否保存它们在 /var/log 下的特定目录。如果是,很好,如果不是,你也许想在 /var/log 下创建一个专用目录?为什么?因为其它程序也在 /var/log 下保存它们的日志文件,如果你的应用保存超过一个日志文件 - 也许每天一个或者每次重启一个 - 在这么大的目录也许有点难于搜索找到你想要的文件。 + +如果在你网络里你有运行多于一个的应用实例,这个方法依然便利。想想这样的情景,你也许有一打 web 服务器在你的网络运行。当排查任何一个机器的问题时,你就很容易知道确切的位置。 + +#### 使用一个标准的文件名 #### + +给你的应用最新的日志使用一个标准的文件名。这使一些事变得容易,因为你可以监控和追踪一个单独的文件。很多应用程序在它们的日志文件上追加一种时间戳。它让 rsyslog 更难于找到最新的文件和设置文件监控。一个更好的方法是使用日志轮转给老的日志文件增加时间。这样更易去归档和历史查询。 + +#### 追加日志文件 #### + +日志文件会在每个应用程序重启后被覆盖吗?如果这样,我们建议关掉它。每次重启 app 后应该去追加日志文件。这样,你就可以追溯重启前最后的日志。 + +#### 日志文件追加 vs. 轮转 #### + +要是应用程序每次重启后写一个新日志文件,如何保存当前日志?追加到一个单独的、巨大的文件?Linux 系统并不以频繁重启或者崩溃而出名:应用程序可以运行很长时间甚至不间歇,但是也会使日志文件非常大。如果你查询分析上周发生连接错误的原因,你可能无疑的要在成千上万行里搜索。 + +我们建议你配置应用每天半晚轮转(rotate)它的日志文件。 + +为什么?首先它将变得可管理。找一个带有特定日期的文件名比遍历一个文件中指定日期的条目更容易。文件也小的多:你不用考虑当你打开一个日志文件时 vi 僵住。第二,如果你正发送日志到另一个位置 - 也许每晚备份任务拷贝到归集日志服务器 - 这样不会消耗你的网络带宽。最后第三点,这样帮助你做日志保留。如果你想剔除旧的日志记录,这样删除超过指定日期的文件比用一个应用解析一个大文件更容易。 + +#### 日志文件的保留 #### + +你保留你的日志文件多长时间?这绝对可以归结为业务需求。你可能被要求保持一个星期的日志信息,或者管理要求保持一年的数据。无论如何,日志需要在一个时刻或其它情况下从服务器删除。 + +在我们看来,除非必要,只在线保持最近一个月的日志文件,并拷贝它们到第二个地方如日志服务器。任何比这更旧的日志可以被转到一个单独的介质上。例如,如果你在 AWS 上,你的旧日志可以被拷贝到 Glacier。 + +#### 给日志单独的磁盘分区 #### + +更好的,Linux 通常建议挂载到 /var 目录到一个单独的文件系统。这是因为这个目录的高 I/O。我们推荐挂载 /var/log 目录到一个单独的磁盘系统下。这样可以节省与主要的应用数据的 I/O 竞争。另外,如果一些日志文件变的太多,或者一个文件变的太大,不会占满整个磁盘。 + +#### 日志条目 #### + +每个日志条目中应该捕获什么信息? + +这依赖于你想用日志来做什么。你只想用它来排除故障,或者你想捕获所有发生的事?这是一个捕获每个用户在运行什么或查看什么的规则条件吗? + +如果你正用日志做错误排查的目的,那么只保存错误,报警或者致命信息。没有理由去捕获调试信息,例如,应用也许默认记录了调试信息或者另一个管理员也许为了故障排查而打开了调试信息,但是你应该关闭它,因为它肯定会很快的填满空间。在最低限度上,捕获日期、时间、客户端应用名、来源 ip 或者客户端主机名、执行的动作和信息本身。 + +#### 一个 PostgreSQL 的实例 #### + +作为一个例子,让我们看看 vanilla PostgreSQL 9.4 安装的主配置文件。它叫做 postgresql.conf,与其它Linux 系统中的配置文件不同,它不保存在 /etc 目录下。下列的代码段,我们可以在我们的 Centos 7 服务器的 /var/lib/pgsql 目录下找到它: + + root@localhost ~]# vi /var/lib/pgsql/9.4/data/postgresql.conf + ... + #------------------------------------------------------------------------------ + # ERROR REPORTING AND LOGGING + #------------------------------------------------------------------------------ + # - Where to Log - + log_destination = 'stderr' + # Valid values are combinations of + # stderr, csvlog, syslog, and eventlog, + # depending on platform. csvlog + # requires logging_collector to be on. + # This is used when logging to stderr: + logging_collector = on + # Enable capturing of stderr and csvlog + # into log files. Required to be on for + # csvlogs. + # (change requires restart) + # These are only used if logging_collector is on: + log_directory = 'pg_log' + # directory where log files are written, + # can be absolute or relative to PGDATA + log_filename = 'postgresql-%a.log' # log file name pattern, + # can include strftime() escapes + # log_file_mode = 0600 . + # creation mode for log files, + # begin with 0 to use octal notation + log_truncate_on_rotation = on # If on, an existing log file with the + # same name as the new log file will be + # truncated rather than appended to. + # But such truncation only occurs on + # time-driven rotation, not on restarts + # or size-driven rotation. Default is + # off, meaning append to existing files + # in all cases. + log_rotation_age = 1d + # Automatic rotation of logfiles will happen after that time. 0 disables. + log_rotation_size = 0 # Automatic rotation of logfiles will happen after that much log output. 0 disables. + # These are relevant when logging to syslog: + #syslog_facility = 'LOCAL0' + #syslog_ident = 'postgres' + # This is only relevant when logging to eventlog (win32): + #event_source = 'PostgreSQL' + # - When to Log - + #client_min_messages = notice # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # log + # notice + # warning + # error + #log_min_messages = warning # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic + #log_min_error_statement = error # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic (effectively off) + #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements + # and their durations, > 0 logs only + # statements running at least this number + # of milliseconds + # - What to Log + #debug_print_parse = off + #debug_print_rewritten = off + #debug_print_plan = off + #debug_pretty_print = on + #log_checkpoints = off + #log_connections = off + #log_disconnections = off + #log_duration = off + #log_error_verbosity = default + # terse, default, or verbose messages + #log_hostname = off + log_line_prefix = '< %m >' # special values: + # %a = application name + # %u = user name + # %d = database name + # %r = remote host and port + # %h = remote host + # %p = process ID + # %t = timestamp without milliseconds + # %m = timestamp with milliseconds + # %i = command tag + # %e = SQL state + # %c = session ID + # %l = session line number + # %s = session start timestamp + # %v = virtual transaction ID + # %x = transaction ID (0 if none) + # %q = stop here in non-session + # processes + # %% = '%' + # e.g. '<%u%%%d> ' + #log_lock_waits = off # log lock waits >= deadlock_timeout + #log_statement = 'none' # none, ddl, mod, all + #log_temp_files = -1 # log temporary files equal or larger + # than the specified size in kilobytes;5# -1 disables, 0 logs all temp files5 + log_timezone = 'Australia/ACT' + +虽然大多数参数被加上了注释,它们使用了默认值。我们可以看见日志文件目录是 pg_log(log_directory 参数,在 /var/lib/pgsql/9.4/data/ 下的子目录),文件名应该以 postgresql 开头(log_filename参数),文件每天轮转一次(log_rotation_age 参数)然后每行日志记录以时间戳开头(log_line_prefix参数)。特别值得说明的是 log_line_prefix 参数:全部的信息你都可以包含在这。 + +看 /var/lib/pgsql/9.4/data/pg_log 目录下展现给我们这些文件: + + [root@localhost ~]# ls -l /var/lib/pgsql/9.4/data/pg_log + total 20 + -rw-------. 1 postgres postgres 1212 May 1 20:11 postgresql-Fri.log + -rw-------. 1 postgres postgres 243 Feb 9 21:49 postgresql-Mon.log + -rw-------. 1 postgres postgres 1138 Feb 7 11:08 postgresql-Sat.log + -rw-------. 1 postgres postgres 1203 Feb 26 21:32 postgresql-Thu.log + -rw-------. 1 postgres postgres 326 Feb 10 01:20 postgresql-Tue.log + +所以日志文件名只有星期命名的标签。我们可以改变它。如何做?在 postgresql.conf 配置 log_filename 参数。 + +查看一个日志内容,它的条目仅以日期时间开头: + + [root@localhost ~]# cat /var/lib/pgsql/9.4/data/pg_log/postgresql-Fri.log + ... + < 2015-02-27 01:21:27.020 EST >LOG: received fast shutdown request + < 2015-02-27 01:21:27.025 EST >LOG: aborting any active transactions + < 2015-02-27 01:21:27.026 EST >LOG: autovacuum launcher shutting down + < 2015-02-27 01:21:27.036 EST >LOG: shutting down + < 2015-02-27 01:21:27.211 EST >LOG: database system is shut down + +### 归集应用的日志 ### + +#### 使用 imfile 监控日志 #### + +习惯上,应用通常记录它们数据在文件里。文件容易在一个机器上寻找,但是多台服务器上就不是很恰当了。你可以设置日志文件监控,然后当新的日志被添加到文件尾部后就发送事件到一个集中服务器。在 /etc/rsyslog.d/ 里创建一个新的配置文件然后增加一个配置文件,然后输入如下: + + $ModLoad imfile + $InputFilePollInterval 10 + $PrivDropToGroup adm + +----- + # Input for FILE1 + $InputFileName /FILE1 + $InputFileTag APPNAME1 + $InputFileStateFile stat-APPNAME1 #this must be unique for each file being polled + $InputFileSeverity info + $InputFilePersistStateInterval 20000 + $InputRunFileMonitor + +替换 FILE1 和 APPNAME1 为你自己的文件名和应用名称。rsyslog 将发送它到你配置的输出目标中。 + +#### 本地套接字日志与 imuxsock #### + +套接字类似 UNIX 文件句柄,所不同的是套接字内容是由 syslog 守护进程读取到内存中,然后发送到目的地。不需要写入文件。作为一个例子,logger 命令发送它的日志到这个 UNIX 套接字。 + +如果你的服务器 I/O 有限或者你不需要本地文件日志,这个方法可以使系统资源有效利用。这个方法缺点是套接字有队列大小的限制。如果你的 syslog 守护进程宕掉或者不能保持运行,然后你可能会丢失日志数据。 + +rsyslog 程序将默认从 /dev/log 套接字中读取,但是你需要使用如下命令来让 [imuxsock 输入模块][17] 启用它: + + $ModLoad imuxsock + +#### UDP 日志与 imupd #### + +一些应用程序使用 UDP 格式输出日志数据,这是在网络上或者本地传输日志文件的标准 syslog 协议。你的 syslog 守护进程接受这些日志,然后处理它们或者用不同的格式传输它们。备选的,你可以发送日志到你的日志服务器或者到一个日志管理方案中。 + +使用如下命令配置 rsyslog 通过 UDP 来接收标准端口 514 的 syslog 数据: + + $ModLoad imudp + +---------- + + $UDPServerRun 514 + +### 用 logrotate 管理日志 ### + +日志轮转是当日志到达指定的时期时自动归档日志文件的方法。如果不介入,日志文件一直增长,会用尽磁盘空间。最后它们将破坏你的机器。 + +logrotate 工具能随着日志的日期截取你的日志,腾出空间。你的新日志文件保持该文件名。你的旧日志文件被重命名加上后缀数字。每次 logrotate 工具运行,就会创建一个新文件,然后现存的文件被逐一重命名。你来决定何时旧文件被删除或归档的阈值。 + +当 logrotate 拷贝一个文件,新的文件会有一个新的 inode,这会妨碍 rsyslog 监控新文件。你可以通过增加copytruncate 参数到你的 logrotate 定时任务来缓解这个问题。这个参数会拷贝现有的日志文件内容到新文件然后从现有文件截短这些内容。因为日志文件还是同一个,所以 inode 不会改变;但它的内容是一个新文件。 + +logrotate 工具使用的主配置文件是 /etc/logrotate.conf,应用特有设置在 /etc/logrotate.d/ 目录下。DigitalOcean 有一个详细的 [logrotate 教程][18] + +### 管理很多服务器的配置 ### + +当你只有很少的服务器,你可以登录上去手动配置。一旦你有几打或者更多服务器,你可以利用工具的优势使这变得更容易和更可扩展。基本上,所有的事情就是拷贝你的 rsyslog 配置到每个服务器,然后重启 rsyslog 使更改生效。 + +#### pssh #### + +这个工具可以让你在很多服务器上并行的运行一个 ssh 命令。使用 pssh 部署仅用于少量服务器。如果你其中一个服务器失败,然后你必须 ssh 到失败的服务器,然后手动部署。如果你有很多服务器失败,那么手动部署它们会话费很长时间。 + +#### Puppet/Chef #### + +Puppet 和 Chef 是两个不同的工具,它们能在你的网络按你规定的标准自动的配置所有服务器。它们的报表工具可以使你了解错误情况,然后定期重新同步。Puppet 和 Chef 都有一些狂热的支持者。如果你不确定那个更适合你的部署配置管理,你可以拜读一下 [InfoWorld 上这两个工具的对比][19] + +一些厂商也提供一些配置 rsyslog 的模块或者方法。这有一个 Loggly 上 Puppet 模块的例子。它提供给 rsyslog 一个类,你可以添加一个标识令牌: + + node 'my_server_node.example.net' { + # Send syslog events to Loggly + class { 'loggly::rsyslog': + customer_token => 'de7b5ccd-04de-4dc4-fbc9-501393600000', + } + } + +#### Docker #### + +Docker 使用容器去运行应用,不依赖于底层服务。所有东西都运行在内部的容器,你可以把它想象为一个功能单元。ZDNet 有一篇关于在你的数据中心[使用 Docker][20] 的深入文章。 + +这里有很多方式从 Docker 容器记录日志,包括链接到一个日志容器,记录到一个共享卷,或者直接在容器里添加一个 sysllog 代理。其中最流行的日志容器叫做 [logspout][21]。 + +#### 供应商的脚本或代理 #### + +大多数日志管理方案提供一些脚本或者代理,可以从一个或更多服务器相对容易地发送数据。重量级代理会耗尽额外的系统资源。一些供应商像 Loggly 提供配置脚本,来使用现存的 syslog 守护进程更轻松。这有一个 Loggly 上的例子[脚本][22],它能运行在任意数量的服务器上。 + +-------------------------------------------------------------------------------- + +via: http://www.loggly.com/ultimate-guide/logging/managing-linux-logs/ + +作者:[Jason Skowronski][a1] +作者:[Amy Echeverri][a2] +作者:[Sadequl Hussain][a3] +译者:[wyangsun](https://github.com/wyangsun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a1]:https://www.linkedin.com/in/jasonskowronski +[a2]:https://www.linkedin.com/in/amyecheverri +[a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 +[1]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.esrreycnpnbl +[2]:http://www.rsyslog.com/ +[3]:http://www.balabit.com/network-security/syslog-ng/opensource-logging-system +[4]:http://logstash.net/ +[5]:http://www.fluentd.org/ +[6]:http://www.rsyslog.com/doc/rsyslog_conf.html +[7]:http://www.rsyslog.com/doc/master/rainerscript/index.html +[8]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.eck7acdxin87 +[9]:https://www.loggly.com/docs/file-monitoring/ +[10]:http://www.networksorcery.com/enp/protocol/udp.htm +[11]:http://www.networksorcery.com/enp/protocol/tcp.htm +[12]:http://blog.gerhards.net/2008/04/on-unreliability-of-plain-tcp-syslog.html +[13]:http://www.rsyslog.com/doc/relp.html +[14]:http://www.rsyslog.com/doc/queues.html +[15]:http://www.rsyslog.com/doc/tls_cert_ca.html +[16]:http://www.rsyslog.com/doc/tls_cert_machine.html +[17]:http://www.rsyslog.com/doc/v8-stable/configuration/modules/imuxsock.html +[18]:https://www.digitalocean.com/community/tutorials/how-to-manage-log-files-with-logrotate-on-ubuntu-12-10 +[19]:http://www.infoworld.com/article/2614204/data-center/puppet-or-chef--the-configuration-management-dilemma.html +[20]:http://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-popular/ +[21]:https://github.com/progrium/logspout +[22]:https://www.loggly.com/docs/sending-logs-unixlinux-system-setup/ diff --git a/translated/tech/20150803 Managing Linux Logs.md b/translated/tech/20150803 Managing Linux Logs.md deleted file mode 100644 index 59b41aa831..0000000000 --- a/translated/tech/20150803 Managing Linux Logs.md +++ /dev/null @@ -1,418 +0,0 @@ -Linux日志管理 -================================================================================ -管理日志的一个关键典型做法是集中或整合你的日志到一个地方,特别是如果你有许多服务器或多层级架构。我们将告诉你为什么这是一个好主意然后给出如何更容易的做这件事的一些小技巧。 - -### 集中管理日志的好处 ### - -如果你有很多服务器,查看单独的一个日志文件可能会很麻烦。现代的网站和服务经常包括许多服务器层级,分布式的负载均衡器,还有更多。这将花费很长时间去获取正确的日志,甚至花更长时间在登录服务器的相关问题上。没什么比发现你找的信息没有被捕获更沮丧的了,或者本能保留答案时正好在重启后丢失了日志文件。 - -集中你的日志使他们查找更快速,可以帮助你更快速的解决产品问题。你不用猜测那个服务器存在问题,因为所有的日志在同一个地方。此外,你可以使用更强大的工具去分析他们,包括日志管理解决方案。一些解决方案能[转换纯文本日志][1]为一些字段,更容易查找和分析。 - -集中你的日志也可以是他们更易于管理: - -- 他们更安全,当他们备份归档一个单独区域时意外或者有意的丢失。如果你的服务器宕机或者无响应,你可以使用集中的日志去调试问题。 -- 你不用担心ssh或者低效的grep命令需要更多的资源在陷入困境的系统。 -- 你不用担心磁盘占满,这个能让你的服务器死机。 -- 你能保持你的产品服务安全性,只是为了查看日志无需给你所有团队登录权限。给你的团队从中心区域访问日志权限更安全。 - -随着集中日志管理,你仍需处理由于网络联通性不好或者用尽大量网络带宽导致不能传输日志到中心区域的风险。在下面的章节我们将要讨论如何聪明的解决这些问题。 - -### 流行的日志归集工具 ### - -在Linux上最常见的日志归集是通过使用系统日志守护进程或者代理。系统日志守护进程支持本地日志的采集,然后通过系统日志协议传输日志到中心服务器。你可以使用很多流行的守护进程来归集你的日志文件: - -- [rsyslog][2]是一个轻量后台程序在大多数Linux分支上已经安装。 -- [syslog-ng][3]是第二流行的Linux系统日志后台程序。 -- [logstash][4]是一个重量级的代理,他可以做更多高级加工和分析。 -- [fluentd][5]是另一个有高级处理能力的代理。 - -Rsyslog是集中日志数据最流行的后台程序因为他在大多数Linux分支上是被默认安装的。你不用下载或安装它,并且它是轻量的,所以不需要占用你太多的系统资源。 - -如果你需要更多先进的过滤或者自定义分析功能,如果你不在乎额外的系统封装Logstash是下一个最流行的选择。 - -### 配置Rsyslog.conf ### - -既然rsyslog成为最广泛使用的系统日志程序,我们将展示如何配置它为日志中心。全局配置文件位于/etc/rsyslog.conf。它加载模块,设置全局指令,和包含应用特有文件位于目录/etc/rsyslog.d中。这些目录包含/etc/rsyslog.d/50-default.conf命令rsyslog写系统日志到文件。在[rsyslog文档][6]你可以阅读更多相关配置。 - -rsyslog配置语言是是[RainerScript][7]。你建立特定的日志输入就像输出他们到另一个目标。Rsyslog已经配置为系统日志输入的默认标准,所以你通常只需增加一个输出到你的日志服务器。这里有一个rsyslog输出到一个外部服务器的配置例子。在举例中,**BEBOP**是一个服务器的主机名,所以你应该替换为你的自己的服务器名。 - - action(type="omfwd" protocol="tcp" target="BEBOP" port="514") - -你可以发送你的日志到一个有丰富存储的日志服务器来存储,提供查询,备份和分析。如果你正存储日志在文件系统,然后你应该建立[日志转储][8]来防止你的磁盘报满。 - -作为一种选择,你可以发送这些日志到一个日志管理方案。如果你的解决方案是安装在本地你可以发送到您的本地系统文档中指定主机和端口。如果你使用基于云提供商,你将发送他们到你的提供商特定的主机名和端口。 - -### 日志目录 ### - -你可以归集一个目录或者匹配一个通配符模式的所有文件。nxlog和syslog-ng程序支持目录和通配符(*)。 - -rsyslog的通用形式不支持直接的监控目录。一种解决方案,你可以设置一个定时任务去监控这个目录的新文件,然后配置rsyslog来发送这些文件到目的地,比如你的日志管理系统。作为一个例子,日志管理提供商Loggly有一个开源版本的[目录监控脚本][9]。 - -### 哪个协议: UDP, TCP, or RELP? ### - -当你使用网络传输数据时,你可以选择三个主流的协议。UDP在你自己的局域网是最常用的,TCP是用在互联网。如果你不能失去日志,就要使用更高级的RELP协议。 - -[UDP][10]发送一个数据包,那只是一个简单的包信息。它是一个只外传的协议,所以他不发送给你回执(ACK)。它只尝试发送包。当网络拥堵时,UDP通常会巧妙的降级或者丢弃日志。它通常使用在类似局域网的可靠网络。 - -[TCP][11]通过多个包和返回确认发送流信息。TCP会多次尝试发送数据包,但是受限于[TCP缓存][12]大小。这是在互联网上发送送日志最常用的协议。 - -[RELP][13]是这三个协议中最可靠的,但是它是为rsyslog创建而且很少有行业应用。它在应用层接收数据然后再发出是否有错误。确认你的目标也支持这个协议。 - -### 用磁盘辅助队列可靠的传送 ### - -如果rsyslog在存储日志时遭遇错误,例如一个不可用网络连接,他能将日志排队直到连接还原。队列日志默认被存储在内存里。无论如何,内存是有限的并且如果问题仍然存在,日志会超出内存容量。 - -**警告:如果你只存储日志到内存,你可能会失去数据。** - -Rsyslog能在内存被占满时将日志队列放到磁盘。[磁盘辅助队列][14]使日志的传输更可靠。这里有一个例子如何配置rsyslog的磁盘辅助队列: - - $WorkDirectory /var/spool/rsyslog # where to place spool files - $ActionQueueFileName fwdRule1 # unique name prefix for spool files - $ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) - $ActionQueueSaveOnShutdown on # save messages to disk on shutdown - $ActionQueueType LinkedList # run asynchronously - $ActionResumeRetryCount -1 # infinite retries if host is down - -### 使用TLS加密日志 ### - -当你的安全隐私数据是一个关心的事,你应该考虑加密你的日志。如果你使用纯文本在互联网传输日志,嗅探器和中间人可以读到你的日志。如果日志包含私人信息、敏感的身份数据或者政府管制数据,你应该加密你的日志。rsyslog程序能使用TLS协议加密你的日志保证你的数据更安全。 - -建立TLS加密,你应该做如下任务: - -1. 生成一个[证书授权][15](CA)。在/contrib/gnutls有一些简单的证书,只是有助于测试,但是你需要创建自己的产品证书。如果你正在使用一个日志管理服务,它将有一个证书给你。 -1. 为你的服务器生成一个[数字证书][16]使它能SSL运算,或者使用你自己的日志管理服务提供商的一个数字证书。 -1. 配置你的rsyslog程序来发送TLS加密数据到你的日志管理系统。 - -这有一个rsyslog配置TLS加密的例子。替换CERT和DOMAIN_NAME为你自己的服务器配置。 - - $DefaultNetstreamDriverCAFile /etc/rsyslog.d/keys/ca.d/CERT.crt - $ActionSendStreamDriver gtls - $ActionSendStreamDriverMode 1 - $ActionSendStreamDriverAuthMode x509/name - $ActionSendStreamDriverPermittedPeer *.DOMAIN_NAME.com - -### 应用日志的最佳管理方法 ### - -除Linux默认创建的日志之外,归集重要的应用日志也是一个好主意。几乎所有基于Linux的服务器的应用把他们的状态信息写入到独立专门的日志文件。这包括数据库产品,像PostgreSQL或者MySQL,网站服务器像Nginx或者Apache,防火墙,打印和文件共享服务还有DNS服务等等。 - -管理员要做的第一件事是安装一个应用后配置它。Linux应用程序典型的有一个.conf文件在/etc目录里。它也可能在其他地方,但是那是大家找配置文件首先会看的地方。 - -根据应用程序有多复杂多庞大,可配置参数的数量可能会很少或者上百行。如前所述,大多数应用程序可能会在某种日志文件写他们的状态:配置文件是日志设置的地方定义了其他的东西。 - -如果你不确定它在哪,你可以使用locate命令去找到它: - - [root@localhost ~]# locate postgresql.conf - /usr/pgsql-9.4/share/postgresql.conf.sample - /var/lib/pgsql/9.4/data/postgresql.conf - -#### 设置一个日志文件的标准位置 #### - -Linux系统一般保存他们的日志文件在/var/log目录下。如果是,很好,如果不是,你也许想在/var/log下创建一个专用目录?为什么?因为其他程序也在/var/log下保存他们的日志文件,如果你的应用报错多于一个日志文件 - 也许每天一个或者每次重启一个 - 通过这么大的目录也许有点难于搜索找到你想要的文件。 - -如果你有多于一个的应用实例在你网络运行,这个方法依然便利。想想这样的情景,你也许有一打web服务器在你的网络运行。当排查任何一个盒子的问题,你将知道确切的位置。 - -#### 使用一个标准的文件名 #### - -给你的应用最新的日志使用一个标准的文件名。这使一些事变得容易,因为你可以监控和追踪一个单独的文件。很多应用程序在他们的日志上追加一种时间戳。他让rsyslog更难于找到最新的文件和设置文件监控。一个更好的方法是使用日志转储增加时间戳到老的日志文件。这样更易去归档和历史查询。 - -#### 追加日志文件 #### - -日志文件会在每个应用程序重启后被覆盖?如果这样,我们建议关掉它。每次重启app后应该去追加日志文件。这样,你就可以追溯重启前最后的日志。 - -#### 日志文件追加 vs. 转储 #### - -虽然应用程序每次重启后写一个新日志文件,如何保存当前日志?追加到一个单独文件,巨大的文件?Linux系统不是因频繁重启或者崩溃出名的:应用程序可以运行很长时间甚至不间歇,但是也会使日志文件非常大。如果你查询分析上周发生连接错误的原因,你可能无疑的要在成千上万行里搜索。 - -我们建议你配置应用每天半晚转储它的日志文件。 - -为什么?首先它将变得可管理。找一个有特定日期部分的文件名比遍历一个文件指定日期的条目更容易。文件也小的多:你不用考虑当你打开一个日志文件时vi僵住。第二,如果你正发送日志到另一个位置 - 也许每晚备份任务拷贝到归集日志服务器 - 这样不会消耗你的网络带宽。最后第三点,这样帮助你做日志保持。如果你想剔除旧的日志记录,这样删除超过指定日期的文件比一个应用解析一个大文件更容易。 - -#### 日志文件的保持 #### - -你保留你的日志文件多长时间?这绝对可以归结为业务需求。你可能被要求保持一个星期的日志信息,或者管理要求保持一年的数据。无论如何,日志需要在一个时刻或其他从服务器删除。 - -在我们看来,除非必要,只在线保持最近一个月的日志文件,加上拷贝他们到第二个地方如日志服务器。任何比这更旧的日志可以被转到一个单独的介质上。例如,如果你在AWS上,你的旧日志可以被拷贝到Glacier。 - -#### 给日志单独的磁盘分区 #### - -Linux最典型的方式通常建议挂载到/var目录到一个单独度的文件系统。这是因为这个目录的高I/Os。我们推荐挂在/var/log目录到一个单独的磁盘系统下。这样可以节省与主应用的数据I/O竞争。另外,如果一些日志文件变的太多,或者一个文件变的太大,不会占满整个磁盘。 - -#### 日志条目 #### - -每个日志条目什么信息应该被捕获? - -这依赖于你想用日志来做什么。你只想用它来排除故障,或者你想捕获所有发生的事?这是一个规则条件去捕获每个用户在运行什么或查看什么? - -如果你正用日志做错误排查的目的,只保存错误,报警或者致命信息。没有理由去捕获调试信息,例如,应用也许默认记录了调试信息或者另一个管理员也许为了故障排查使用打开了调试信息,但是你应该关闭它,因为它肯定会很快的填满空间。在最低限度上,捕获日期,时间,客户端应用名,原ip或者客户端主机名,执行动作和它自身信息。 - -#### 一个PostgreSQL的实例 #### - -作为一个例子,让我们看看vanilla(这是一个开源论坛)PostgreSQL 9.4安装主配置文件。它叫做postgresql.conf与其他Linux系统中的配置文件不同,他不保存在/etc目录下。在代码段下,我们可以在我们的Centos 7服务器的/var/lib/pgsql目录下看见: - - root@localhost ~]# vi /var/lib/pgsql/9.4/data/postgresql.conf - ... - #------------------------------------------------------------------------------ - # ERROR REPORTING AND LOGGING - #------------------------------------------------------------------------------ - # - Where to Log - - log_destination = 'stderr' - # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - # This is used when logging to stderr: - logging_collector = on - # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - # These are only used if logging_collector is on: - log_directory = 'pg_log' - # directory where log files are written, - # can be absolute or relative to PGDATA - log_filename = 'postgresql-%a.log' # log file name pattern, - # can include strftime() escapes - # log_file_mode = 0600 . - # creation mode for log files, - # begin with 0 to use octal notation - log_truncate_on_rotation = on # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. - log_rotation_age = 1d - # Automatic rotation of logfiles will happen after that time. 0 disables. - log_rotation_size = 0 # Automatic rotation of logfiles will happen after that much log output. 0 disables. - # These are relevant when logging to syslog: - #syslog_facility = 'LOCAL0' - #syslog_ident = 'postgres' - # This is only relevant when logging to eventlog (win32): - #event_source = 'PostgreSQL' - # - When to Log - - #client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - #log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - #log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - # - What to Log - #debug_print_parse = off - #debug_print_rewritten = off - #debug_print_plan = off - #debug_pretty_print = on - #log_checkpoints = off - #log_connections = off - #log_disconnections = off - #log_duration = off - #log_error_verbosity = default - # terse, default, or verbose messages - #log_hostname = off - log_line_prefix = '< %m >' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' - #log_lock_waits = off # log lock waits >= deadlock_timeout - #log_statement = 'none' # none, ddl, mod, all - #log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes;5# -1 disables, 0 logs all temp files5 - log_timezone = 'Australia/ACT' - -虽然大多数参数被加上了注释,他们呈现了默认数值。我们可以看见日志文件目录是pg_log(log_directory参数),文件名应该以postgresql开头(log_filename参数),文件每天转储一次(log_rotation_age参数)然后日志记录以时间戳开头(log_line_prefix参数)。特别说明有趣的是log_line_prefix参数:你可以包含很多整体丰富的信息在这。 - -看/var/lib/pgsql/9.4/data/pg_log目录下展现给我们这些文件: - - [root@localhost ~]# ls -l /var/lib/pgsql/9.4/data/pg_log - total 20 - -rw-------. 1 postgres postgres 1212 May 1 20:11 postgresql-Fri.log - -rw-------. 1 postgres postgres 243 Feb 9 21:49 postgresql-Mon.log - -rw-------. 1 postgres postgres 1138 Feb 7 11:08 postgresql-Sat.log - -rw-------. 1 postgres postgres 1203 Feb 26 21:32 postgresql-Thu.log - -rw-------. 1 postgres postgres 326 Feb 10 01:20 postgresql-Tue.log - -所以日志文件命只有工作日命名的标签。我们可以改变他。如何做?在postgresql.conf配置log_filename参数。 - -查看一个日志内容,它的条目仅以日期时间开头: - - [root@localhost ~]# cat /var/lib/pgsql/9.4/data/pg_log/postgresql-Fri.log - ... - < 2015-02-27 01:21:27.020 EST >LOG: received fast shutdown request - < 2015-02-27 01:21:27.025 EST >LOG: aborting any active transactions - < 2015-02-27 01:21:27.026 EST >LOG: autovacuum launcher shutting down - < 2015-02-27 01:21:27.036 EST >LOG: shutting down - < 2015-02-27 01:21:27.211 EST >LOG: database system is shut down - -### 集中应用日志 ### - -#### 使用Imfile监控日志 #### - -习惯上,应用通常记录他们数据在文件里。文件容易在一个机器上寻找但是多台服务器上就不是很恰当了。你可以设置日志文件监控然后当新的日志被添加到底部就发送事件到一个集中服务器。在/etc/rsyslog.d/里创建一个新的配置文件然后增加一个文件输入,像这样: - - $ModLoad imfile - $InputFilePollInterval 10 - $PrivDropToGroup adm - ----------- - - # Input for FILE1 - $InputFileName /FILE1 - $InputFileTag APPNAME1 - $InputFileStateFile stat-APPNAME1 #this must be unique for each file being polled - $InputFileSeverity info - $InputFilePersistStateInterval 20000 - $InputRunFileMonitor - -替换FILE1和APPNAME1位你自己的文件和应用名称。Rsyslog将发送它到你配置的输出中。 - -#### 本地套接字日志与Imuxsock #### - -套接字类似UNIX文件句柄,所不同的是套接字内容是由系统日志程序读取到内存中,然后发送到目的地。没有文件需要被写入。例如,logger命令发送他的日志到这个UNIX套接字。 - -如果你的服务器I/O有限或者你不需要本地文件日志,这个方法使系统资源有效利用。这个方法缺点是套接字有队列大小的限制。如果你的系统日志程序宕掉或者不能保持运行,然后你可能会丢失日志数据。 - -rsyslog程序将默认从/dev/log套接字中种读取,但是你要用[imuxsock输入模块][17]如下命令使它生效: - - $ModLoad imuxsock - -#### UDP日志与Imupd #### - -一些应用程序使用UDP格式输出日志数据,这是在网络上或者本地传输日志文件的标准系统日志协议。你的系统日志程序收集这些日志然后处理他们或者用不同的格式传输他们。交替地,你可以发送日志到你的日志服务器或者到一个日志管理方案中。 - -使用如下命令配置rsyslog来接收标准端口514的UDP系统日志数据: - - $ModLoad imudp - ----------- - - $UDPServerRun 514 - -### 用Logrotate管理日志 ### - -日志转储是当日志到达指定的时期时自动归档日志文件的方法。如果不介入,日志文件一直增长,会用尽磁盘空间。最后他们将破坏你的机器。 - -logrotate实例能随着日志的日期截取你的日志,腾出空间。你的新日志文件保持文件名。你的旧日志文件被重命名为后缀加上数字。每次logrotate实例运行,一个新文件被建立然后现存的文件被逐一重命名。你来决定何时旧文件被删除或归档的阈值。 - -当logrotate拷贝一个文件,新的文件已经有一个新的索引节点,这会妨碍rsyslog监控新文件。你可以通过增加copytruncate参数到你的logrotate定时任务来缓解这个问题。这个参数拷贝现有的日志文件内容到新文件然后从现有文件截短这些内容。这个索引节点从不改变,因为日志文件自己保持不变;它的内容是一个新文件。 - -logrotate实例使用的主配置文件是/etc/logrotate.conf,应用特有设置在/etc/logrotate.d/目录下。DigitalOcean有一个详细的[logrotate教程][18] - -### 管理很多服务器的配置 ### - -当你只有很少的服务器,你可以登陆上去手动配置。一旦你有几打或者更多服务器,你可以用高级工具使这变得更容易和更可扩展。基本上,所有的事情就是拷贝你的rsyslog配置到每个服务器,然后重启rsyslog使更改生效。 - -#### Pssh #### - -这个工具可以让你在很多服务器上并行的运行一个ssh命令。使用pssh部署只有一小部分的服务器。如果你其中一个服务器失败,然后你必须ssh到失败的服务器,然后手动部署。如果你有很多服务器失败,那么手动部署他们会话费很长时间。 - -#### Puppet/Chef #### - -Puppet和Chef是两个不同的工具,他们能在你的网络按你规定的标准自动的配置所有服务器。他们的报表工具使你知道关于错误然后定期重新同步。Puppet和Chef有一些狂热的支持者。如果你不确定那个更适合你的部署配置管理,你可以领会一下[InfoWorld上这两个工具的对比][19] - -一些厂商也提供一些配置rsyslog的模块或者方法。这有一个Loggly上Puppet模块的例子。它提供给rsyslog一个类,你可以添加一个标识令牌: - - node 'my_server_node.example.net' { - # Send syslog events to Loggly - class { 'loggly::rsyslog': - customer_token => 'de7b5ccd-04de-4dc4-fbc9-501393600000', - } - } - -#### Docker #### - -Docker使用容器去运行应用不依赖底层服务。所有东西都从内部的容器运行,你可以想象为一个单元功能。ZDNet有一个深入文章关于在你的数据中心[使用Docker][20]。 - -这有很多方式从Docker容器记录日志,包括链接到一个日志容器,记录到一个共享卷,或者直接在容器里添加一个系统日志代理。其中最流行的日志容器叫做[logspout][21]。 - -#### 供应商的脚本或代理 #### - -大多数日志管理方案提供一些脚本或者代理,从一个或更多服务器比较简单的发送数据。重量级代理会耗尽额外的系统资源。一些供应商像Loggly提供配置脚本,来使用现存的系统日志程序更轻松。这有一个Loggly上的例子[脚本][22],它能运行在任意数量的服务器上。 - --------------------------------------------------------------------------------- - -via: http://www.loggly.com/ultimate-guide/logging/managing-linux-logs/ - -作者:[Jason Skowronski][a1] -作者:[Amy Echeverri][a2] -作者:[Sadequl Hussain][a3] -译者:[wyangsun](https://github.com/wyangsun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a1]:https://www.linkedin.com/in/jasonskowronski -[a2]:https://www.linkedin.com/in/amyecheverri -[a3]:https://www.linkedin.com/pub/sadequl-hussain/14/711/1a7 -[1]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.esrreycnpnbl -[2]:http://www.rsyslog.com/ -[3]:http://www.balabit.com/network-security/syslog-ng/opensource-logging-system -[4]:http://logstash.net/ -[5]:http://www.fluentd.org/ -[6]:http://www.rsyslog.com/doc/rsyslog_conf.html -[7]:http://www.rsyslog.com/doc/master/rainerscript/index.html -[8]:https://docs.google.com/document/d/11LXZxWlkNSHkcrCWTUdnLRf_CiZz9kK0cr3yGM_BU_0/edit#heading=h.eck7acdxin87 -[9]:https://www.loggly.com/docs/file-monitoring/ -[10]:http://www.networksorcery.com/enp/protocol/udp.htm -[11]:http://www.networksorcery.com/enp/protocol/tcp.htm -[12]:http://blog.gerhards.net/2008/04/on-unreliability-of-plain-tcp-syslog.html -[13]:http://www.rsyslog.com/doc/relp.html -[14]:http://www.rsyslog.com/doc/queues.html -[15]:http://www.rsyslog.com/doc/tls_cert_ca.html -[16]:http://www.rsyslog.com/doc/tls_cert_machine.html -[17]:http://www.rsyslog.com/doc/v8-stable/configuration/modules/imuxsock.html -[18]:https://www.digitalocean.com/community/tutorials/how-to-manage-log-files-with-logrotate-on-ubuntu-12-10 -[19]:http://www.infoworld.com/article/2614204/data-center/puppet-or-chef--the-configuration-management-dilemma.html -[20]:http://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-popular/ -[21]:https://github.com/progrium/logspout -[22]:https://www.loggly.com/docs/sending-logs-unixlinux-system-setup/ From 718a63f33fadbdcb373c9500274f129e3b945cec Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 3 Sep 2015 00:01:52 +0800 Subject: [PATCH 1979/2517] PUB:20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu @strugglingyouth --- ...r Upgrade to Linux Kernel 4.2 in Ubuntu.md | 34 +++++++------------ 1 file changed, 13 insertions(+), 21 deletions(-) rename {translated/tech => published}/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md (76%) diff --git a/translated/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md b/published/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md similarity index 76% rename from translated/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md rename to published/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md index 71d4985fe0..3737b88438 100644 --- a/translated/tech/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md +++ b/published/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md @@ -1,31 +1,23 @@ - -在 Ubuntu 中如何安装/升级 Linux 内核到4.2 +在 Ubuntu 中如何安装或升级 Linux 内核到4.2 ================================================================================ ![](http://ubuntuhandbook.org/wp-content/uploads/2014/12/linux-kernel-icon-tux.png) -Linux 内核4.2在昨天中午被公布。Linus Torvalds 写了 [lkml.org][1]: - -> 通过这周的小的变动,4.2版本应该不会有问题,毕竟这是最后一周,但在这里有几个补丁,4.2延迟一个星期也会引发问题。 - -> - -> 所以在这里它是,并且4.3的合并窗口现已开放。我已经早期引入了几个悬而未决的请求,但像往常一样,我会从明天开始处理它们,并会发布完成的时间。 - -> - -> 从 rc8 中的 shortlog 非常小,并且是追加的。这个补丁也很完美... +Linux 内核 4.2已经发布了。Linus Torvalds 在 [lkml.org][1] 上写到: +> 通过这周这么小的变动,看来在最后一周 发布 4.2 版本应该不会有问题,当然还有几个修正,但是看起来也并不需要延迟一周。 +> 所以这就到了,而且 4.3 的合并窗口现已打开。我已经有了几个等待处理的合并请求,明天我开始处理它们,然后在适当的时候放出来。 +> 从 rc8 以来的简短日志很小,已经附加。这个补丁也很小... ### 新内核 4.2 有哪些改进?: ### -- 英特尔的x86汇编代码重写 -- 支持新的 ARM 板和 SoCs +- 重写英特尔的x86汇编代码 +- 支持新的 ARM 板和 SoC - 对 F2FS 的 per-file 加密 -- 有 AMDGPU 内核 DRM 驱动程序 -- 使用Radeon DRM 来支持 VCE1 视频编码 -- 初步支持英特尔的 Broxton Atom SoCs -- 支持ARCv2和HS38 CPU内核。 -- 增加了排队自旋锁的支持 +- AMDGPU 的内核 DRM 驱动程序 +- 对 Radeon DRM 驱动的 VCE1 视频编码支持 +- 初步支持英特尔的 Broxton Atom SoC +- 支持 ARCv2 和 HS38 CPU 内核 +- 增加了队列自旋锁的支持 - 许多其他的改进和驱动更新。 ### 在 Ubuntu 中如何下载4.2内核 : ### @@ -84,7 +76,7 @@ via: http://ubuntuhandbook.org/index.php/2015/08/upgrade-kernel-4-2-ubuntu/ 作者:[Ji m][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From f2a4f490bd44575688ce6dd289b3cb3254cab1bb Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 3 Sep 2015 13:16:05 +0800 Subject: [PATCH 1980/2517] translating --- sources/tech/20150901 How to Defragment Linux Systems.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150901 How to Defragment Linux Systems.md b/sources/tech/20150901 How to Defragment Linux Systems.md index 4b9095c1de..ba1b6a4b5a 100644 --- a/sources/tech/20150901 How to Defragment Linux Systems.md +++ b/sources/tech/20150901 How to Defragment Linux Systems.md @@ -1,3 +1,5 @@ +translating----geekpi + How to Defragment Linux Systems ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-featured.png) @@ -122,4 +124,4 @@ via: https://www.maketecheasier.com/defragment-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:https://www.maketecheasier.com/author/attilaorosz/ \ No newline at end of file +[a]:https://www.maketecheasier.com/author/attilaorosz/ From e088fc312c7cc8202e9efd3758bfb7b32b8bfd10 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 3 Sep 2015 14:29:36 +0800 Subject: [PATCH 1981/2517] translated --- ...0150901 How to Defragment Linux Systems.md | 127 ------------------ ...0150901 How to Defragment Linux Systems.md | 125 +++++++++++++++++ 2 files changed, 125 insertions(+), 127 deletions(-) delete mode 100644 sources/tech/20150901 How to Defragment Linux Systems.md create mode 100644 translated/tech/20150901 How to Defragment Linux Systems.md diff --git a/sources/tech/20150901 How to Defragment Linux Systems.md b/sources/tech/20150901 How to Defragment Linux Systems.md deleted file mode 100644 index ba1b6a4b5a..0000000000 --- a/sources/tech/20150901 How to Defragment Linux Systems.md +++ /dev/null @@ -1,127 +0,0 @@ -translating----geekpi - -How to Defragment Linux Systems -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-featured.png) - -There is a common myth that Linux disks never need defragmentation at all. In most cases, this is true, due mostly to the excellent journaling filesystems Linux uses (ext2, 3, 4, btrfs, etc.) to handle the filesystem. However, in some specific cases, fragmentation might still occur. If that happens to you, the solution is fortunately very simple. - -### What is fragmentation? ### - -Fragmentation occurs when a file system updates files in little chunks, but these chunks do not form a contiguous whole and are scattered around the disk instead. This is particularly true for FAT and FAT32 filesystems. It was somewhat mitigated in NTFS and almost never happens in Linux (extX). Here is why. - -In filesystems such as FAT and FAT32, files are written right next to each other on the disk. There is no room left for file growth or updates: - -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-fragmented.png) - -The NTFS leaves somewhat more room between the files, so there is room to grow. As the space between chunks is limited, fragmentation will still occur over time. - -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-ntfs.png) - -Linux’s journaling filesystems take a different approach. Instead of placing files beside each other, each file is scattered all over the disk, leaving generous amounts of free space between each file. There is sufficient room for file updates/growth and fragmentation rarely occurs. - -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-journal.png) - -Additionally, if fragmentation does happen, most Linux filesystems would attempt to shuffle files and chunks around to make them contiguous again. - -### Disk fragmentation on Linux ### - -Disk fragmentation seldom occurs in Linux unless you have a small hard drive, or it is running out of space. Some possible fragmentation cases include: - -- if you edit large video files or raw image files, and disk space is limited -- if you use older hardware like an old laptop, and you have a small hard drive -- if your hard drives start filling up (above 85% used) -- if you have many small partitions cluttering your home folder - -The best solution is to buy a larger hard drive. If it’s not possible, this is where defragmentation becomes useful. - -### How to check for fragmentation ### - -The `fsck` command will do this for you – that is, if you have an opportunity to run it from a live CD, with **all affected partitions unmounted**. - -This is very important: **RUNNING FSCK ON A MOUNTED PARTITION CAN AND WILL SEVERELY DAMAGE YOUR DATA AND YOUR DISK**. - -You have been warned. Before proceeding, make a full system backup. - -**Disclaimer**: The author of this article and Make Tech Easier take no responsibility for any damage to your files, data, system, or any other damage, caused by your actions after following this advice. You may proceed at your own risk. If you do proceed, you accept and acknowledge this. - -You should just boot into a live session (like an installer disk, system rescue CD, etc.) and run `fsck` on your UNMOUNTED partitions. To check for any problems, run the following command with root permission: - - fsck -fn [/path/to/your/partition] - -You can check what the `[/path/to/your/partition]` is by running - - sudo fdisk -l - -There is a way to run `fsck` (relatively) safely on a mounted partition – that is by using the `-n` switch. This will result in a read only file system check without touching anything. Of course, there is no guarantee of safety here, and you should only proceed after creating a backup. On an ext2 filesystem, running - - sudo fsck.ext2 -fn /path/to/your/partition - -would result in plenty of output – most of them error messages resulting from the fact that the partition is mounted. In the end it will give you fragmentation related information. - -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-fsck.png) - -If your fragmentation is above 20%, you should proceed to defragment your system. - -### How to easily defragment Linux filesystems ### - -All you need to do is to back up **ALL** your files and data to another drive (by manually **copying** them over), format the partition, and copy your files back (don’t use a backup program for this). The journalling file system will handle them as new files and place them neatly to the disk without fragmentation. - -To back up your files, run - - cp -afv [/path/to/source/partition]/* [/path/to/destination/folder] - -Mind the asterix (*); it is important. - -Note: It is generally agreed that to copy large files or large amounts of data, the dd command might be best. This is a very low level operation and does copy everything “as is”, including the empty space, and even the junk left over. This is not what we want, so it is probably better to use `cp`. - -Now you only need to remove all the original files. - - sudo rm -rf [/path/to/source/partition]/* - -**Optional**: you can fill the empty space with zeros. You could achieve this with formatting as well, but if for example you did not copy the whole partition, only large files (which are most likely to cause fragmentation), this might not be an option. - - sudo dd if=/dev/zero of=[/path/to/source/partition]/temp-zero.txt - -Wait for it to finish. You could also monitor the progress with `pv`. - - sudo apt-get install pv - sudo pv -tpreb | of=[/path/to/source/partition]/temp-zero.txt - -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-dd.png) - -When it is done, just delete the temporary file. - - sudo rm [/path/to/source/partition]/temp-zero.txt - -After you zeroed out the empty space (or just skipped that step entirely), copy your files back, reversing the first cp command: - - cp -afv [/path/to/original/destination/folder]/* [/path/to/original/source/partition] - -### Using e4defrag ### - -If you prefer a simpler approach, install `e2fsprogs`, - - sudo apt-get install e2fsprogs - -and run `e4defrag` as root on the affected partition. If you don’t want to or cannot unmount the partition, you can use its mount point instead of its path. To defragment your whole system, run - - sudo e4defrag / - -It is not guaranteed to succeed while mounted (you should also stop using your system while it is running), but it is much easier than copying all files away and back. - -### Conclusion ### - -Fragmentation should rarely be an issue on a Linux system due to the the journalling filesystem’s efficient data handling. If you do run into fragmentation due to any circumstances, there are simple ways to reallocate your disk space like copying all files away and back or using `e4defrag`. It is important, however, to keep your data safe, so before attempting any operation that would affect all or most of your files, make sure you make a backup just to be on the safe side. - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/defragment-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/ diff --git a/translated/tech/20150901 How to Defragment Linux Systems.md b/translated/tech/20150901 How to Defragment Linux Systems.md new file mode 100644 index 0000000000..49d16a8f18 --- /dev/null +++ b/translated/tech/20150901 How to Defragment Linux Systems.md @@ -0,0 +1,125 @@ +如何在Linux中整理磁盘碎片 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-featured.png) + +有一神话是linux的磁盘从来不需要整理碎片。在大多数情况下这是真的,大多数因为是使用的是优秀的日志系统(ext2、3、4等等)来处理文件系统。然而,在一些特殊情况下,碎片仍旧会产生。如果正巧发生在你身上,解决方法很简单。 + +### 什么是磁盘碎片 ### + +碎片发生在不同的小块中更新文件时,但是这些快没有形成连续完整的文件而是分布在磁盘的各个角落中。这对于FAT和FAT32文件系统而言是这样的。这在NTFS中有所减轻,在Linux(extX)中几乎不会发生。下面是原因。 + +在像FAT和FAT32这类文件系统中,文件紧挨着写入到磁盘中。文件之间没有空间来用于增长或者更新: + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-fragmented.png) + +NTFS中在文件之间保留了一些空间,因此有空间进行增长。因为块之间的空间是有限的,碎片也会随着时间出现。 + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-ntfs.png) + +Linux的日志文件系统采用了一个不同的方案。与文件之间挨着不同,每个文件分布在磁盘的各处,每个文件之间留下了大量的剩余空间。这里有很大的空间用于更新和增长,并且碎片很少会发生。 + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-journal.png) + +此外,碎片一旦出现了,大多数Linux文件系统会尝试将文件和块重新连续起来。 + +### Linux中的磁盘整理 ### + +除非你用的是一个很小的硬盘或者空间不够了,不然Linux很少会需要磁盘整理。一些可能需要磁盘整理的情况包括: + +- 如果你编辑的是大型视频文件或者原生照片,但磁盘空间有限 +- if you use older hardware like an old laptop, and you have a small hard drive +- 如果你的磁盘开始满了(大约使用了85%) +- 如果你的家目录中有许多小分区 + +最好的解决方案是购买一个大硬盘。如果不可能,磁盘碎片整理就很有用了。 + +### 如何检查碎片 ### + +`fsck`命令会为你做这个 -也就是说如果你可以在liveCD中运行它,那么就可以**卸载所有的分区**。 + +这一点很重要:**在已经挂载的分区中运行fsck将会严重危害到你的数据和磁盘**。 + +你已经被警告过了。开始之前,先做一个完整的备份。 + +**免责声明**: 本文的作者与Make Tech Easier将不会对您的文件、数据、系统或者其他损害负责。你需要自己承担风险。如果你继续,你需要接收并了解这点。 + +你应该启动到一个live会话中(如安装磁盘,系统救援CD等)并运行`fsck`卸载分区。要检查是否有任何问题,请在运行root权限下面的命令: + + fsck -fn [/path/to/your/partition] + +您可以检查一下运行中的分区的路径 + + sudo fdisk -l + +有一个(相对)安全地在已挂载的分区中运行`fsck`的方法是使用‘-n’开关。这会让分区处在只读模式而不能创建任何文件。当然,这里并不能保证安全,你应该在创建备份之后进行。在ext2中,运行 + + sudo fsck.ext2 -fn /path/to/your/partition + +会产生大量的输出-- 大多数错误信息的原因是分区已经挂载了。最后会给出一个碎片相关的信息。 + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-fsck.png) + +如果碎片大于20%了,那么你应该开始整理你的磁盘碎片了。 + +### 如何简单地在Linux中整理碎片 ### + +你要做的是备份你**所有**的文件和数据到另外一块硬盘中(手动**复制**他们)。格式化分区然后重新复制回去(不要使用备份软件)。日志系统会把它们作为新的文件,并将它们整齐地放置到磁盘中而不产生碎片。 + +要备份你的文件,运行 + + cp -afv [/path/to/source/partition]/* [/path/to/destination/folder] + +记住星号(*)是很重要的。 + +注意:通常认为复制大文件或者大量文件,使用dd或许是最好的。这是一个非常底层的操作,它会复制一切,包含空闲的空间甚至是留下的垃圾。这不是我们想要的,因此这里最好使用`cp`。 + +现在你只需要删除源文件。 + + sudo rm -rf [/path/to/source/partition]/* + +**可选**:你可以将空闲空间置零。你也可以用格式化来达到这点,但是例子中你并没有复制整个分区而仅仅是大文件(这很可能会造成碎片)。这恐怕不能成为一个选项。 + + sudo dd if=/dev/zero of=[/path/to/source/partition]/temp-zero.txt + +等待它结束。你可以用`pv`来监测进程。 + + sudo apt-get install pv + sudo pv -tpreb | of=[/path/to/source/partition]/temp-zero.txt + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-dd.png) + +这就完成了,只要删除临时文件就行。 + + sudo rm [/path/to/source/partition]/temp-zero.txt + +待你清零了空闲空间(或者跳过了这步)。重新复制回文件,将第一个cp命令翻转一下: + + cp -afv [/path/to/original/destination/folder]/* [/path/to/original/source/partition] + +### 使用 e4defrag ### + +如果你想要简单的方法,安装`e2fsprogs`, + + sudo apt-get install e2fsprogs + +用root权限在分区中运行 `e4defrag`。如果你不想卸载分区,你可以使用它的挂载点而不是路径。要整理整个系统的碎片,运行: + + sudo e4defrag / + +在挂载的情况下不保证成功(你也应该保证在它运行时停止使用你的系统),但是它比服务全部文件再重新复制回来简单多了。 + +### 总结 ### + +linux系统中很少会出现碎片因为它的文件系统有效的数据处理。如果你因任何原因产生了碎片,简单的方法是重新分配你的磁盘如复制所有文件并复制回来,或者使用`e4defrag`。然而重要的是保证你数据的安全,因此在进行任何可能影响你全部或者大多数文件的操作之前,确保你的文件已经被备份到了另外一个安全的地方去了。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/defragment-linux/ + +作者:[Attila Orosz][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/attilaorosz/ From eaf2beefe32694ff03cf4b2c5de3ec02f73e9e45 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 3 Sep 2015 18:35:10 +0800 Subject: [PATCH 1982/2517] PUB:20150826 How to set up a system status page of your infrastructure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @wyangsun 不错! --- ...stem status page of your infrastructure.md | 295 ++++++++++++++++++ ...stem status page of your infrastructure.md | 294 ----------------- 2 files changed, 295 insertions(+), 294 deletions(-) create mode 100644 published/20150826 How to set up a system status page of your infrastructure.md delete mode 100644 translated/tech/20150826 How to set up a system status page of your infrastructure.md diff --git a/published/20150826 How to set up a system status page of your infrastructure.md b/published/20150826 How to set up a system status page of your infrastructure.md new file mode 100644 index 0000000000..7725538ddd --- /dev/null +++ b/published/20150826 How to set up a system status page of your infrastructure.md @@ -0,0 +1,295 @@ +如何为你的平台部署一个公开的系统状态页 +================================================================================ + +如果你是一个系统管理员,负责关键的 IT 基础设置或公司的服务,你将明白有效的沟通在日常任务中的重要性。假设你的线上存储服务器故障了。你希望团队所有人达成共识你好尽快的解决问题。当你忙来忙去时,你不会想一半的人问你为什么他们不能访问他们的文档。当一个维护计划快到时间了你想在计划前提醒相关人员,这样避免了不必要的开销。 + +这一切的要求或多或少改进了你、你的团队、和你服务的用户之间沟通渠道。一个实现它的方法是维护一个集中的系统状态页面,报告和记录故障停机详情、进度更新和维护计划等。这样,在故障期间你避免了不必要的打扰,也可以提醒一些相关方,以及加入一些可选的状态更新。 + +有一个不错的**开源, 自承载系统状态页解决方案**叫做 [Cachet][1]。在这个教程,我将要描述如何用 Cachet 部署一个自承载系统状态页面。 + +### Cachet 特性 ### + +在详细的配置 Cachet 之前,让我简单的介绍一下它的主要特性。 + +- **全 JSON API**:Cachet API 可以让你使用任意的外部程序或脚本(例如,uptime 脚本)连接到 Cachet 来自动报告突发事件或更新状态。 +- **认证**:Cachet 支持基础认证和 JSON API 的 API 令牌,所以只有认证用户可以更新状态页面。 +- **衡量系统**:这通常用来展现随着时间推移的自定义数据(例如,服务器负载或者响应时间)。 +- **通知**:可选地,你可以给任一注册了状态页面的人发送突发事件的提示邮件。 +- **多语言**:状态页被翻译为11种不同的语言。 +- **双因子认证**:这允许你使用 Google 的双因子认证来提升 Cachet 管理账户的安全性。 +- **跨数据库支持**:你可以选择 MySQL,SQLite,Redis,APC 和 PostgreSQL 作为后端存储。 + +剩下的教程,我会说明如何在 Linux 上安装配置 Cachet。 + +### 第一步:下载和安装 Cachet ### + +Cachet 需要一个 web 服务器和一个后端数据库来运转。在这个教程中,我将使用 LAMP 架构。以下是一些特定发行版上安装 Cachet 和 LAMP 架构的指令。 + +#### Debian,Ubuntu 或者 Linux Mint #### + + $ sudo apt-get install curl git apache2 mysql-server mysql-client php5 php5-mysql + $ sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet + $ cd /var/www/cachet + $ sudo git checkout v1.1.1 + $ sudo chown -R www-data:www-data . + +在基于 Debian 的系统上设置 LAMP 架构的更多细节,参考这个[教程][2]。 + +#### Fedora, CentOS 或 RHEL #### + +在基于 Red Hat 系统上,你首先需要[设置 REMI 软件库][3](以满足 PHP 的版本需求)。然后执行下面命令。 + + $ sudo yum install curl git httpd mariadb-server + $ sudo yum --enablerepo=remi-php56 install php php-mysql php-mbstring + $ sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet + $ cd /var/www/cachet + $ sudo git checkout v1.1.1 + $ sudo chown -R apache:apache . + $ sudo firewall-cmd --permanent --zone=public --add-service=http + $ sudo firewall-cmd --reload + $ sudo systemctl enable httpd.service; sudo systemctl start httpd.service + $ sudo systemctl enable mariadb.service; sudo systemctl start mariadb.service + +在基于 Red Hat 系统上设置 LAMP 的更多细节,参考这个[教程][4]。 + +### 配置 Cachet 的后端数据库### + +下一步是配置后端数据库。 + +登录到 MySQL/MariaDB 服务,然后创建一个空的数据库称为‘cachet’。 + + $ sudo mysql -uroot -p + +---------- + + mysql> create database cachet; + mysql> quit + +现在用一个示例配置文件创建一个 Cachet 配置文件。 + + $ cd /var/www/cachet + $ sudo mv .env.example .env + +在 .env 文件里,填写你自己设置的数据库信息(例如,DB\_\*)。其他的字段先不改变。 + + APP_ENV=production + APP_DEBUG=false + APP_URL=http://localhost + APP_KEY=SomeRandomString + + DB_DRIVER=mysql + DB_HOST=localhost + DB_DATABASE=cachet + DB_USERNAME=root + DB_PASSWORD= + + CACHE_DRIVER=apc + SESSION_DRIVER=apc + QUEUE_DRIVER=database + + MAIL_DRIVER=smtp + MAIL_HOST=mailtrap.io + MAIL_PORT=2525 + MAIL_USERNAME=null + MAIL_PASSWORD=null + MAIL_ADDRESS=null + MAIL_NAME=null + + REDIS_HOST=null + REDIS_DATABASE=null + REDIS_PORT=null + +### 第三步:安装 PHP 依赖和执行数据库迁移 ### + +下面,我们将要安装必要的PHP依赖包。我们会使用 composer 来安装。如果你的系统还没有安装 composer,先安装它: + + $ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer + +现在开始用 composer 安装 PHP 依赖包。 + + $ cd /var/www/cachet + $ sudo composer install --no-dev -o + +下面执行一次性的数据库迁移。这一步会在我们之前创建的数据库里面创建那些所需的表。 + + $ sudo php artisan migrate + +假设在 /var/www/cachet/.env 的数据库配置无误,数据库迁移应该像下面显示一样成功完成。 + +![](https://farm6.staticflickr.com/5814/20235620184_54048676b0_c.jpg) + +下面,创建一个密钥,它将用来加密进入 Cachet 的数据。 + + $ sudo php artisan key:generate + $ sudo php artisan config:cache + +![](https://farm6.staticflickr.com/5717/20831952096_7105c9fdc7_c.jpg) + +生成的应用密钥将自动添加到你的 .env 文件 APP\_KEY 变量中。你不需要自己编辑 .env。 + +### 第四步:配置 Apache HTTP 服务 ### + +现在到了配置运行 Cachet 的 web 服务的时候了。我们使用 Apache HTTP 服务器,为 Cachet 创建一个新的[虚拟主机][5],如下: + +#### Debian,Ubuntu 或 Linux Mint #### + + $ sudo vi /etc/apache2/sites-available/cachet.conf + +---------- + + + ServerName cachethost + ServerAlias cachethost + DocumentRoot "/var/www/cachet/public" + + Require all granted + Options Indexes FollowSymLinks + AllowOverride All + Order allow,deny + Allow from all + + + +启用新虚拟主机和 mod_rewrite: + + $ sudo a2ensite cachet.conf + $ sudo a2enmod rewrite + $ sudo service apache2 restart + +#### Fedora, CentOS 或 RHEL #### + +在基于 Red Hat 系统上,创建一个虚拟主机文件,如下: + + $ sudo vi /etc/httpd/conf.d/cachet.conf + +---------- + + + ServerName cachethost + ServerAlias cachethost + DocumentRoot "/var/www/cachet/public" + + Require all granted + Options Indexes FollowSymLinks + AllowOverride All + Order allow,deny + Allow from all + + + +现在重载 Apache 配置: + + $ sudo systemctl reload httpd.service + +### 第五步:配置 /etc/hosts 来测试 Cachet ### + +这时候,初始的 Cachet 状态页面应该启动运行了,现在测试一下。 + +由于 Cachet 被配置为Apache HTTP 服务的虚拟主机,我们需要调整你的客户机的 /etc/hosts 来访问他。你将从这个客户端电脑访问 Cachet 页面。(LCTT 译注:如果你给了这个页面一个正式的主机地址,则不需要这一步。) + +打开 /etc/hosts,加入如下行: + + $ sudo vi /etc/hosts + +---------- + + cachethost + +上面名为“cachethost”必须匹配 Cachet 的 Apache 虚拟主机文件的 ServerName。 + +### 测试 Cachet 状态页面 ### + +现在你准备好访问 Cachet 状态页面。在你浏览器地址栏输入 http://cachethost。你将被转到如下的 Cachet 状态页的初始化设置页面。 + +![](https://farm6.staticflickr.com/5745/20858228815_405fce1301_c.jpg) + +选择 cache/session 驱动。这里 cache 和 session 驱动两个都选“File”。 + +下一步,输入关于状态页面的基本信息(例如,站点名称、域名、时区和语言),以及管理员认证账户。 + +![](https://farm1.staticflickr.com/611/20237229693_c22014e4fd_c.jpg) + +![](https://farm6.staticflickr.com/5707/20858228875_b056c9e1b4_c.jpg) + +![](https://farm6.staticflickr.com/5653/20671482009_8629572886_c.jpg) + +你的状态页初始化就要完成了。 + +![](https://farm6.staticflickr.com/5692/20237229793_f6a48f379a_c.jpg) + +继续创建组件(你的系统单元)、事件或者任意你要做的维护计划。 + +例如,增加一个组件: + +![](https://farm6.staticflickr.com/5672/20848624752_9d2e0a07be_c.jpg) + +增加一个维护计划: + +公共 Cachet 状态页就像这样: + +![](https://farm1.staticflickr.com/577/20848624842_df68c0026d_c.jpg) + +集成了 SMTP,你可以在状态更新时发送邮件给订阅者。并且你可以使用 CSS 和 markdown 格式来完全自定义布局和状态页面。 + +### 结论 ### + +Cachet 是一个相当易于使用,自托管的状态页面软件。Cachet 一个高级特性是支持全 JSON API。使用它的 RESTful API,Cachet 可以轻松连接单独的监控后端(例如,[Nagios][6]),然后回馈给 Cachet 事件报告并自动更新状态。比起手工管理一个状态页它更快和有效率。 + +最后一句,我喜欢提及一个事。用 Cachet 设置一个漂亮的状态页面是很简单的,但要将这个软件用好并不像安装它那么容易。你需要完全保障所有 IT 团队习惯准确及时的更新状态页,从而建立公共信息的准确性。同时,你需要教用户去查看状态页面。最后,如果没有很好的填充数据,部署状态页面就没有意义,并且/或者没有一个人查看它。记住这个,尤其是当你考虑在你的工作环境中部署 Cachet 时。 + +### 故障排查 ### + +补充,万一你安装 Cachet 时遇到问题,这有一些有用的故障排查的技巧。 + +1. Cachet 页面没有加载任何东西,并且你看到如下报错。 + + production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in /var/www/cachet/bootstrap/cache/compiled.php:6695 + + **解决方案**:确保你创建了一个应用密钥,以及明确配置缓存如下所述。 + + $ cd /path/to/cachet + $ sudo php artisan key:generate + $ sudo php artisan config:cache + +2. 调用 composer 命令时有如下报错。 + + - danielstjules/stringy 1.10.0 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. + - laravel/framework v5.1.8 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. + - league/commonmark 0.10.0 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. + + **解决方案**:确保在你的系统上安装了必要的 PHP 扩展 mbstring ,并且兼容你的 PHP 版本。在基于 Red Hat 的系统上,由于我们从 REMI-56 库安装PHP,所以要从同一个库安装扩展。 + + $ sudo yum --enablerepo=remi-php56 install php-mbstring + +3. 你访问 Cachet 状态页面时得到一个白屏。HTTP 日志显示如下错误。 + + PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/cachet/storage/logs/laravel-2015-08-21.log" could not be opened: failed to open stream: Permission denied' in /var/www/cachet/bootstrap/cache/compiled.php:12851 + + **解决方案**:尝试如下命令。 + + $ cd /var/www/cachet + $ sudo php artisan cache:clear + $ sudo chmod -R 777 storage + $ sudo composer dump-autoload + + 如果上面的方法不起作用,试试禁止SELinux: + + $ sudo setenforce 0 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/setup-system-status-page.html + +作者:[Dan Nanni][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:https://cachethq.io/ +[2]:http://xmodulo.com/install-lamp-stack-ubuntu-server.html +[3]:https://linux.cn/article-4192-1.html +[4]:https://linux.cn/article-5789-1.html +[5]:http://xmodulo.com/configure-virtual-hosts-apache-http-server.html +[6]:http://xmodulo.com/monitor-common-services-nagios.html diff --git a/translated/tech/20150826 How to set up a system status page of your infrastructure.md b/translated/tech/20150826 How to set up a system status page of your infrastructure.md deleted file mode 100644 index 53c97670d8..0000000000 --- a/translated/tech/20150826 How to set up a system status page of your infrastructure.md +++ /dev/null @@ -1,294 +0,0 @@ -如何部署一个你的公共系统状态页面 -================================================================================ -如果你是一个系统管理员,负责关键的IT基础设置或你公司的服务,你将明白有效的沟通在日常任务中的重要性。假设你的线上存储服务器故障了。你希望团队所有人达成共识你好尽快的解决问题。当你忙来忙去时,你不想一半的人问你为什么他们不能访问他们的文档。当一个维护计划快到时间了你想在计划前提醒相关人员,这样避免了不必要的开销。 - -这一切的要求或多或少改进了你和你的团队,用户和你的服务的沟通渠道。一个实现它方法是维护一个集中的系统状态页面,故障停机详情,进度更新和维护计划会被报告和记录。这样,在故障期间你避免了不必要的打扰,也有一些相关方提供的资料和任何选状态更新择性加入。 - -一个不错的**开源, 自承载系统状态页面**是is [Cachet][1]。在这个教程,我将要描述如何用Cachet部署一个自承载系统状态页面。 - -### Cachet 特性 ### - -在详细的配置Cachet之前,让我简单的介绍一下它的主要特性。 - -- **全JSON API**:Cachet API允许你使用任意外部程序或脚本(例如,uptime脚本)链接到Cachet来报告突发事件或自动更新状态。 -- **认证**:Cachet支持基础认证和JSON API的API令牌,所以只有认证用户可以更新状态页面。 -- **衡量系统**:这通常用来展现随着时间推移的自定义数据(例如,服务器负载或者相应时间)。 -- **通知**:你可以随意的发送通知邮件,报告事件给任一注册了状态页面的人。 -- **多语言**:状态也可以被转换为11种不同的语言。 -- **双因子认证**:这允许你使用Google的双因子认证管理账户锁定你的Cachet(什么事Google?呵呵!)。 -- **支持交叉数据库**:你可以选择MySQL,SQLite,Redis,APC和PostgreSQL作为后端存储。 - -剩下的教程,我说明如何在Linux上安装配置Cachet。 - -### 第一步:下载和安装Cachet ### - -Cachet需要一个web服务器和一个后端数据库来运转。在这个教程中,我将使用LAMP架构。这里有特定发行版安装Cachet和LAMP架构的指令。 - -#### Debian, Ubuntu 或者 Linux Mint #### - - $ sudo apt-get install curl git apache2 mysql-server mysql-client php5 php5-mysql - $ sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet - $ cd /var/www/cachet - $ sudo git checkout v1.1.1 - $ sudo chown -R www-data:www-data . - -在基于Debian的系统上更多详细的设置LAMP架构,参考这个[教程][2]。 - -#### Fedora, CentOS 或 RHEL #### - -在基于Red Hat系统上,你首先需要[设置REMI资源库][3](以满足PHP版本需求)。然后执行下面命令。 - - $ sudo yum install curl git httpd mariadb-server - $ sudo yum --enablerepo=remi-php56 install php php-mysql php-mbstring - $ sudo git clone https://github.com/cachethq/Cachet.git /var/www/cachet - $ cd /var/www/cachet - $ sudo git checkout v1.1.1 - $ sudo chown -R apache:apache . - $ sudo firewall-cmd --permanent --zone=public --add-service=http - $ sudo firewall-cmd --reload - $ sudo systemctl enable httpd.service; sudo systemctl start httpd.service - $ sudo systemctl enable mariadb.service; sudo systemctl start mariadb.service - -在基于Red Hat系统上更多详细设置LAMP,参考这个[教程][4]。 - -### 配置Cachet的后端数据库### - -下一步是配置后端数据库。 - -登陆到MySQL/MariaDB服务,然后创建一个空的数据库称为‘cachet’。 - - $ sudo mysql -uroot -p - ----------- - - mysql> create database cachet; - mysql> quit - -现在用一个样本配置文件创建一个Cachet配置文件。 - - $ cd /var/www/cachet - $ sudo mv .env.example .env - -在.env文件里,填写你自己设置的数据库信息(例如,DB\_\*)。其他的字段先不改变。 - - APP_ENV=production - APP_DEBUG=false - APP_URL=http://localhost - APP_KEY=SomeRandomString - - DB_DRIVER=mysql - DB_HOST=localhost - DB_DATABASE=cachet - DB_USERNAME=root - DB_PASSWORD= - - CACHE_DRIVER=apc - SESSION_DRIVER=apc - QUEUE_DRIVER=database - - MAIL_DRIVER=smtp - MAIL_HOST=mailtrap.io - MAIL_PORT=2525 - MAIL_USERNAME=null - MAIL_PASSWORD=null - MAIL_ADDRESS=null - MAIL_NAME=null - - REDIS_HOST=null - REDIS_DATABASE=null - REDIS_PORT=null - -### 第三步:安装PHP依赖和执行数据库迁移 ### - -下面,我们将要安装必要的PHP依赖包。所以我们将使用composer。如果你的系统还没有安装composer,先安装它: - - $ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer - -现在开始用composer安装PHP依赖包。 - - $ cd /var/www/cachet - $ sudo composer install --no-dev -o - -下面执行一次数据库迁移。这一步将我们早期创建的必要表填充到数据库。 - - $ sudo php artisan migrate - -假设数据库配置在/var/www/cachet/.env是正确的,数据库迁移应该像下面显示一样完成成功。 - -![](https://farm6.staticflickr.com/5814/20235620184_54048676b0_c.jpg) - -下面,创建一个密钥,它将用来加密进入Cachet的数据。 - - $ sudo php artisan key:generate - $ sudo php artisan config:cache - -![](https://farm6.staticflickr.com/5717/20831952096_7105c9fdc7_c.jpg) - -生成的应用密钥将自动添加到你的.env文件APP\_KEY变量中。你不需要单独编辑.env。 - -### 第四步:配置Apache HTTP服务 ### - -现在到了配置web服务的时候,Cachet将运行在上面。我们使用Apache HTTP服务器,为Cachet创建一个新的[虚拟主机][5]如下所述。 - -#### Debian, Ubuntu 或 Linux Mint #### - - $ sudo vi /etc/apache2/sites-available/cachet.conf - ----------- - - - ServerName cachethost - ServerAlias cachethost - DocumentRoot "/var/www/cachet/public" - - Require all granted - Options Indexes FollowSymLinks - AllowOverride All - Order allow,deny - Allow from all - - - -启用新虚拟主机和mod_rewrite: - - $ sudo a2ensite cachet.conf - $ sudo a2enmod rewrite - $ sudo service apache2 restart - -#### Fedora, CentOS 或 RHEL #### - -在基于Red Hat系统上,创建一个虚拟主机文件如下所述。 - - $ sudo vi /etc/httpd/conf.d/cachet.conf - ----------- - - - ServerName cachethost - ServerAlias cachethost - DocumentRoot "/var/www/cachet/public" - - Require all granted - Options Indexes FollowSymLinks - AllowOverride All - Order allow,deny - Allow from all - - - -现在重载Apache配置: - - $ sudo systemctl reload httpd.service - -### 第五步:配置/etc/hosts来测试Cachet ### - -这时候,初始的Cachet状态页面应该启动运行了,现在测试一下。 - -由于Cachet被配置为Apache HTTP服务的虚拟主机,我们需要调整你的客户机的/etc/hosts来访问他。你将从这个客户端电脑访问Cachet页面。 - -Open /etc/hosts, and add the following entry. - - $ sudo vi /etc/hosts - ----------- - - cachethost - -上面名为“cachethost”必须匹配Cachet的Apache虚拟主机文件的ServerName。 - -### 测试Cachet状态页面 ### - -现在你准备好访问Cachet状态页面。在你浏览器地址栏输入http://cachethost。你将被转到初始Cachet状态页如下。 - -![](https://farm6.staticflickr.com/5745/20858228815_405fce1301_c.jpg) - -选择cache/session驱动。这里cache和session驱动两个都选“File”。 - -下一步,输入关于状态页面的基本信息(例如,站点名称,域名,时区和语言),以及管理员认证账户。 - -![](https://farm1.staticflickr.com/611/20237229693_c22014e4fd_c.jpg) - -![](https://farm6.staticflickr.com/5707/20858228875_b056c9e1b4_c.jpg) - -![](https://farm6.staticflickr.com/5653/20671482009_8629572886_c.jpg) - -你的初始状态页将要最终完成。 - -![](https://farm6.staticflickr.com/5692/20237229793_f6a48f379a_c.jpg) - -继续创建组件(你的系统单位),事件或者任意你想要的维护计划。 - -例如,增加一个组件: - -![](https://farm6.staticflickr.com/5672/20848624752_9d2e0a07be_c.jpg) - -增加一个维护计划: - -公共Cachet状态页就像这样: - -![](https://farm1.staticflickr.com/577/20848624842_df68c0026d_c.jpg) - -集成SMTP,你可以在状态更新时发送邮件给订阅者。并且你可以完全自定义布局和状态页面使用的CSS和markdown格式。 - -### 结论 ### - -Cachet是一个相当易于使用,自托管的状态页面软件。Cachet一个高级特性是支持全JSON API。使用它的RESTful API,Cachet可以轻松连接单独的监控后端(例如,[Nagios][6]),然后回馈给Cachet事件报告并自动更新状态。比起手段管理一个状态页它更快和有效率。 - -最后一句,我喜欢提及一个事。用Cachet简单的设置一个花哨的状态页面同时,使用最佳的软件不像安装它那么容易。你需要完全保障所有IT团队习惯准确及时的更新状态页,从而建立公共信息的准确性。同时,你需要教用户去查看状态页面。在今天最后,如果不很好的填充,部署状态页面将没有意义,并且/或者没有一个人查看它。记住这个,当你考虑部署Cachet在你的工作环境中时。 - -### 故障排查 ### - -作为奖励,万一你安装Cachet时遇到问题,这有一些有用的故障排查的技巧。 - -1. Cachet页面没有加载任何东西,并且你看到如下报错。 - - production.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in /var/www/cachet/bootstrap/cache/compiled.php:6695 - -**解决方案**:确保你创建了一个应用密钥,以及明确配置缓存如下所述。 - - $ cd /path/to/cachet - $ sudo php artisan key:generate - $ sudo php artisan config:cache - -2. 调用composer命令时有如下报错。 - - - danielstjules/stringy 1.10.0 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. - - laravel/framework v5.1.8 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. - - league/commonmark 0.10.0 requires ext-mbstring * -the requested PHP extension mbstring is missing from your system. - -**解决方案**:确保安装了必要的PHP扩展mbstring到你的系统上,并且兼容你的PHP。在基于Red Hat的系统上,由于我们从REMI-56库安装PHP,要从同一个库安装扩展。 - - $ sudo yum --enablerepo=remi-php56 install php-mbstring - -3. 你访问Cachet状态页面时得到一个白屏。HTTP日志显示如下错误。 - - PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/cachet/storage/logs/laravel-2015-08-21.log" could not be opened: failed to open stream: Permission denied' in /var/www/cachet/bootstrap/cache/compiled.php:12851 - -**解决方案**:尝试如下命令。 - - $ cd /var/www/cachet - $ sudo php artisan cache:clear - $ sudo chmod -R 777 storage - $ sudo composer dump-autoload - -如果上面的方法不起作用,试试禁止SELinux: - - $ sudo setenforce 0 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/setup-system-status-page.html - -作者:[Dan Nanni][a] -译者:[wyangsun](https://github.com/wyangsun) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:https://cachethq.io/ -[2]:http://xmodulo.com/install-lamp-stack-ubuntu-server.html -[3]:http://ask.xmodulo.com/install-remi-repository-centos-rhel.html -[4]:http://xmodulo.com/install-lamp-stack-centos.html -[5]:http://xmodulo.com/configure-virtual-hosts-apache-http-server.html -[6]:http://xmodulo.com/monitor-common-services-nagios.html From df99ff42a451c077b8a665d5a80240e6efd3741e Mon Sep 17 00:00:00 2001 From: Luoyuanhao Date: Fri, 4 Sep 2015 11:25:31 +0800 Subject: [PATCH 1983/2517] [Translated] tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md --- ...ation GA with OData in Docker Container.md | 103 ----------------- ...ation GA with OData in Docker Container.md | 105 ++++++++++++++++++ 2 files changed, 105 insertions(+), 103 deletions(-) delete mode 100644 sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md create mode 100644 translated/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md diff --git a/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md b/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md deleted file mode 100644 index 8f5b4a68d3..0000000000 --- a/sources/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md +++ /dev/null @@ -1,103 +0,0 @@ -ictlyh Translating -Howto Run JBoss Data Virtualization GA with OData in Docker Container -================================================================================ -Hi everyone, today we'll learn how to run JBoss Data Virtualization 6.0.0.GA with OData in a Docker Container. JBoss Data Virtualization is a data supply and integration solution platform that transforms various scatered multiple sources data, treats them as single source and delivers the required data into actionable information at business speed to any applications or users. JBoss Data Virtualization can help us easily combine and transform data into reusable business friendly data models and make unified data easily consumable through open standard interfaces. It offers comprehensive data abstraction, federation, integration, transformation, and delivery capabilities to combine data from one or multiple sources into reusable for agile data utilization and sharing.For more information about JBoss Data Virtualization, we can check out [its official page][1]. Docker is an open source platform that provides an open platform to pack, ship and run any application as a lightweight container. Running JBoss Data Virtualization with OData in Docker Container makes us easy to handle and launch. - -Here are some easy to follow tutorial on how we can run JBoss Data Virtualization with OData in Docker Container. - -### 1. Cloning the Repository ### - -First of all, we'll wanna clone the repository of OData with Data Virtualization ie [https://github.com/jbossdemocentral/dv-odata-docker-integration-demo][2] using git command. As we have an Ubuntu 15.04 distribution of linux running in our machine. We'll need to install git initially using apt-get command. - - # apt-get install git - -Then after installing git, we'll wanna clone the repository by running the command below. - - # git clone https://github.com/jbossdemocentral/dv-odata-docker-integration-demo - - Cloning into 'dv-odata-docker-integration-demo'... - remote: Counting objects: 96, done. - remote: Total 96 (delta 0), reused 0 (delta 0), pack-reused 96 - Unpacking objects: 100% (96/96), done. - Checking connectivity... done. - -### 2. Downloading JBoss Data Virtualization Installer ### - -Now, we'll need to download JBoss Data Virtualization Installer from the Download Page ie [http://www.jboss.org/products/datavirt/download/][3] . After we download **jboss-dv-installer-6.0.0.GA-redhat-4.jar**, we'll need to keep it under the directory named **software**. - -### 3. Building the Docker Image ### - -Next, after we have downloaded the JBoss Data Virtualization installer, we'll then go for building the docker image using the Dockerfile and its resources we had just cloned from the repository. - - # cd dv-odata-docker-integration-demo/ - # docker build -t jbossdv600 . - - ... - Step 22 : USER jboss - ---> Running in 129f701febd0 - ---> 342941381e37 - Removing intermediate container 129f701febd0 - Step 23 : EXPOSE 8080 9990 31000 - ---> Running in 61e6d2c26081 - ---> 351159bb6280 - Removing intermediate container 61e6d2c26081 - Step 24 : CMD $JBOSS_HOME/bin/standalone.sh -c standalone.xml -b 0.0.0.0 -bmanagement 0.0.0.0 - ---> Running in a9fed69b3000 - ---> 407053dc470e - Removing intermediate container a9fed69b3000 - Successfully built 407053dc470e - -Note: Here, we assume that you have already installed docker and is running in your machine. - -### 4. Starting the Docker Container ### - -As we have built the Docker Image of JBoss Data Virtualization with oData, we'll now gonna run the docker container and expose its port with -P flag. To do so, we'll run the following command. - - # docker run -p 8080:8080 -d -t jbossdv600 - - 7765dee9cd59c49ca26850e88f97c21f46859d2dc1d74166353d898773214c9c - -### 5. Getting the Container IP ### - -After we have started the Docker Container, we'll wanna get the IP address of the running docker container. To do so, we'll run the docker inspect command followed by the running container id. - - # docker inspect <$containerID> - - ... - "NetworkSettings": { - "Bridge": "", - "EndpointID": "3e94c5900ac5954354a89591a8740ce2c653efde9232876bc94878e891564b39", - "Gateway": "172.17.42.1", - "GlobalIPv6Address": "", - "GlobalIPv6PrefixLen": 0, - "HairpinMode": false, - "IPAddress": "172.17.0.8", - "IPPrefixLen": 16, - "IPv6Gateway": "", - "LinkLocalIPv6Address": "", - "LinkLocalIPv6PrefixLen": 0, - -### 6. Web Interface ### - -Now, if everything went as expected as done above, we'll gonna see the login screen of JBoss Data Virtualization with oData when pointing our web browser to http://container-ip:8080/ and the JBoss Management from http://container-ip:9990. The Management credentials for username is admin and password is redhat1! whereas the Data virtualization credentials for username is user and password is user . After that, we can navigate the contents via the web interface. - -**Note**: It is strongly recommended to change the password as soon as possible after the first login. Thanks :) - -### Conclusion ### - -Finally we've successfully run Docker Container running JBoss Data Virtualization with OData Multisource Virtual Database. JBoss Data Virtualization is really an awesome platform for the virtualization of data from different multiple source and transform them into reusable business friendly data models and produces data easily consumable through open standard interfaces. The deployment of JBoss Data Virtualization with OData Multisource Virtual Database has been very easy, secure and fast to setup with the Docker Technology. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/run-jboss-data-virtualization-ga-odata-docker-container/ - -作者:[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/ -[1]:http://www.redhat.com/en/technologies/jboss-middleware/data-virtualization -[2]:https://github.com/jbossdemocentral/dv-odata-docker-integration-demo -[3]:http://www.jboss.org/products/datavirt/download/ diff --git a/translated/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md b/translated/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md new file mode 100644 index 0000000000..4d14bbc904 --- /dev/null +++ b/translated/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md @@ -0,0 +1,105 @@ +如何在 Docker 容器中运行支持 OData 的 JBoss 数据虚拟化 GA +Howto Run JBoss Data Virtualization GA with OData in Docker Container +================================================================================ +大家好,我们今天来学习如何在一个 Docker 容器中运行支持 OData(译者注:Open Data Protocol,开放数据协议) 的 JBoss 数据虚拟化 6.0.0 GA(译者注:GA,General Availability,具体定义可以查看[WIKI][4])。JBoss 数据虚拟化是数据提供和集成解决方案平台,有多种分散的数据源时,转换为一种数据源统一对待,在正确的时间将所需数据传递给任意的应用或者用户。JBoss 数据虚拟化可以帮助我们将数据快速组合和转换为可重用的商业友好的数据模型,通过开放标准接口简单可用。它提供全面的数据抽取、联合、集成、转换,以及传输功能,将来自一个或多个源的数据组合为可重复使用和共享的灵活数据。要了解更多关于 JBoss 数据虚拟化的信息,可以查看它的[官方文档][1]。Docker 是一个提供开放平台用于打包,装载和以轻量级容器运行任何应用的开源平台。使用 Docker 容器我们可以轻松处理和启用支持 OData 的 JBoss 数据虚拟化。 + +下面是该指南中在 Docker 容器中运行支持 OData 的 JBoss 数据虚拟化的简单步骤。 + +### 1. 克隆仓库 ### + +首先,我们要用 git 命令从 [https://github.com/jbossdemocentral/dv-odata-docker-integration-demo][2] 克隆带数据虚拟化的 OData 仓库。假设我们的机器上运行着 Ubuntu 15.04 linux 发行版。我们要使用 apt-get 命令安装 git。 + + # apt-get install git + +安装完 git 之后,我们运行下面的命令克隆仓库。 + + # git clone https://github.com/jbossdemocentral/dv-odata-docker-integration-demo + + Cloning into 'dv-odata-docker-integration-demo'... + remote: Counting objects: 96, done. + remote: Total 96 (delta 0), reused 0 (delta 0), pack-reused 96 + Unpacking objects: 100% (96/96), done. + Checking connectivity... done. + +### 2. 下载 JBoss 数据虚拟化安装器 ### + +现在,我们需要从下载页 [http://www.jboss.org/products/datavirt/download/][3] 下载 JBoss 数据虚拟化安装器。下载了 **jboss-dv-installer-6.0.0.GA-redhat-4.jar** 后,我们把它保存在名为 **software** 的目录下。 + +### 3. 创建 Docker 镜像 ### + +下一步,下载了 JBoss 数据虚拟化安装器之后,我们打算使用 Dockerfile 和刚从仓库中克隆的资源创建 docker 镜像。 + + # cd dv-odata-docker-integration-demo/ + # docker build -t jbossdv600 . + + ... + Step 22 : USER jboss + ---> Running in 129f701febd0 + ---> 342941381e37 + Removing intermediate container 129f701febd0 + Step 23 : EXPOSE 8080 9990 31000 + ---> Running in 61e6d2c26081 + ---> 351159bb6280 + Removing intermediate container 61e6d2c26081 + Step 24 : CMD $JBOSS_HOME/bin/standalone.sh -c standalone.xml -b 0.0.0.0 -bmanagement 0.0.0.0 + ---> Running in a9fed69b3000 + ---> 407053dc470e + Removing intermediate container a9fed69b3000 + Successfully built 407053dc470e + +注意:在这里我们假设你已经安装了 docker 并正在运行。 + +### 4. 启动 Docker 容器 ### + +创建了支持 oData 的 JBoss 数据虚拟化 Docker 镜像之后,我们打算运行 docker 容器并用 -P 标签指定端口。我们运行下面的命令来实现。 + + # docker run -p 8080:8080 -d -t jbossdv600 + + 7765dee9cd59c49ca26850e88f97c21f46859d2dc1d74166353d898773214c9c + +### 5. 获取容器 IP ### + +启动了 Docker 容器之后,我们想要获取正在运行的 docker 容器的 IP 地址。要做到这点,我们运行后面添加了正在运行容器 id 号的 docker inspect 命令。 + + # docker inspect <$containerID> + + ... + "NetworkSettings": { + "Bridge": "", + "EndpointID": "3e94c5900ac5954354a89591a8740ce2c653efde9232876bc94878e891564b39", + "Gateway": "172.17.42.1", + "GlobalIPv6Address": "", + "GlobalIPv6PrefixLen": 0, + "HairpinMode": false, + "IPAddress": "172.17.0.8", + "IPPrefixLen": 16, + "IPv6Gateway": "", + "LinkLocalIPv6Address": "", + "LinkLocalIPv6PrefixLen": 0, + +### 6. Web 界面 ### +### 6. Web Interface ### + +现在,如果一切如期望的那样进行,当我们用浏览器打开 http://container-ip:8080/ 和 http://container-ip:9990 时会看到支持 oData 的 JBoss 数据虚拟化登录界面和 JBoss 管理界面。管理验证的用户名和密码分别是 admin 和 redhat1!数据虚拟化验证的用户名和密码都是 user。之后,我们可以通过 web 界面在内容间导航。 + +**注意**: 强烈建议在第一次登录后尽快修改密码。 + +### 总结 ### + +终于我们成功地运行了跑着支持 OData 多源虚拟数据库的 JBoss 数据虚拟化 的 Docker 容器。JBoss 数据虚拟化真的是一个很棒的平台,它为多种不同来源的数据进行虚拟化,并将它们转换为商业友好的数据模型,产生通过开放标准接口简单可用的数据。使用 Docker 技术可以简单、安全、快速地部署支持 OData 多源虚拟数据库的 JBoss 数据虚拟化。如果你有任何疑问、建议或者反馈,请在下面的评论框中写下来,以便我们可以改进和更新内容。非常感谢!Enjoy:-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/run-jboss-data-virtualization-ga-odata-docker-container/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://www.redhat.com/en/technologies/jboss-middleware/data-virtualization +[2]:https://github.com/jbossdemocentral/dv-odata-docker-integration-demo +[3]:http://www.jboss.org/products/datavirt/download/ +[4]:https://en.wikipedia.org/wiki/Software_release_life_cycle#General_availability_.28GA.29 \ No newline at end of file From fb4f6e7a37a12b59e15ad08c9bbdfe6a2e756708 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 4 Sep 2015 17:39:34 +0800 Subject: [PATCH 1984/2517] PUB:20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router @martin2011qi --- ...GP peering and filtering in Quagga BGP router.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) rename {translated/tech => published}/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md (97%) diff --git a/translated/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md b/published/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md similarity index 97% rename from translated/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md rename to published/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md index 23e2314576..1e17c7c6d3 100644 --- a/translated/tech/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md +++ b/published/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md @@ -1,5 +1,6 @@ -如何设置在Quagga BGP路由器中设置IPv6的BGP对等体和过滤 +如何设置在 Quagga BGP 路由器中设置 IPv6 的 BGP 对等体和过滤 ================================================================================ + 在之前的教程中,我们演示了如何使用Quagga建立一个[完备的BGP路由器][1]和配置[前缀过滤][2]。在本教程中,我们会向你演示如何创建IPv6 BGP对等体并通过BGP通告IPv6前缀。同时我们也将演示如何使用前缀列表和路由映射特性来过滤通告的或者获取到的IPv6前缀。 ### 拓扑 ### @@ -47,7 +48,7 @@ Quagga内部提供一个叫作vtysh的shell,其界面与那些主流路由厂 # vtysh -提示将改为: +提示符将改为: router-a# @@ -65,7 +66,7 @@ Quagga内部提供一个叫作vtysh的shell,其界面与那些主流路由厂 router-a# configure terminal -提示将变更成: +提示符将变更成: router-a(config)# @@ -246,13 +247,13 @@ Quagga内部提供一个叫作vtysh的shell,其界面与那些主流路由厂 via: http://xmodulo.com/ipv6-bgp-peering-filtering-quagga-bgp-router.html 作者:[Sarmed Rahman][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/centos-bgp-router-quagga.html +[1]:https://linux.cn/article-4232-1.html [2]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html [3]:http://ask.xmodulo.com/open-port-firewall-centos-rhel.html [4]:http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html From aaf155be81100df6bd233740ccbb5bbc927ae620 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 4 Sep 2015 22:54:36 +0800 Subject: [PATCH 1985/2517] PUB:20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker @dingdongnigetou --- ... or Load Balancer with Weave and Docker.md | 129 ++++++++++++++++++ ... or Load Balancer with Weave and Docker.md | 126 ----------------- 2 files changed, 129 insertions(+), 126 deletions(-) create mode 100644 published/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md delete mode 100644 translated/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md diff --git a/published/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md b/published/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md new file mode 100644 index 0000000000..0f08cf12fa --- /dev/null +++ b/published/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md @@ -0,0 +1,129 @@ +如何使用 Weave 以及 Docker 搭建 Nginx 反向代理/负载均衡服务器 +================================================================================ + +Hi, 今天我们将会学习如何使用 Weave 和 Docker 搭建 Nginx 的反向代理/负载均衡服务器。Weave 可以创建一个虚拟网络将 Docker 容器彼此连接在一起,支持跨主机部署及自动发现。它可以让我们更加专注于应用的开发,而不是基础架构。Weave 提供了一个如此棒的环境,仿佛它的所有容器都属于同个网络,不需要端口/映射/连接等的配置。容器中的应用提供的服务在 weave 网络中可以轻易地被外部世界访问,不论你的容器运行在哪里。在这个教程里我们将会使用 weave 快速并且简单地将 nginx web 服务器部署为一个负载均衡器,反向代理一个运行在 Amazon Web Services 里面多个节点上的 docker 容器中的简单 php 应用。这里我们将会介绍 WeaveDNS,它提供一个不需要改变代码就可以让容器利用主机名找到的简单方式,并且能够让其他容器通过主机名连接彼此。 + +在这篇教程里,我们将使用 nginx 来将负载均衡分配到一个运行 Apache 的容器集合。最简单轻松的方法就是使用 Weave 来把运行在 ubuntu 上的 docker 容器中的 nginx 配置成负载均衡服务器。 + +### 1. 搭建 AWS 实例 ### + +首先,我们需要搭建 Amzaon Web Service 实例,这样才能在 ubuntu 下用 weave 跑 docker 容器。我们将会使用[AWS 命令行][1] 来搭建和配置两个 AWS EC2 实例。在这里,我们使用最小的可用实例,t1.micro。我们需要一个有效的**Amazon Web Services 账户**使用 AWS 命令行界面来搭建和配置。我们先在 AWS 命令行界面下使用下面的命令将 github 上的 weave 仓库克隆下来。 + + $ git clone http://github.com/fintanr/weave-gs + $ cd weave-gs/aws-nginx-ubuntu-simple + +在克隆完仓库之后,我们执行下面的脚本,这个脚本将会部署两个 t1.micro 实例,每个实例中都是 ubuntu 作为操作系统并用 weave 跑着 docker 容器。 + + $ sudo ./demo-aws-setup.sh + +在这里,我们将会在以后用到这些实例的 IP 地址。这些地址储存在一个 weavedemo.env 文件中,这个文件创建于执行 demo-aws-setup.sh 脚本期间。为了获取这些 IP 地址,我们需要执行下面的命令,命令输出类似下面的信息。 + + $ cat weavedemo.env + + export WEAVE_AWS_DEMO_HOST1=52.26.175.175 + export WEAVE_AWS_DEMO_HOST2=52.26.83.141 + export WEAVE_AWS_DEMO_HOSTCOUNT=2 + export WEAVE_AWS_DEMO_HOSTS=(52.26.175.175 52.26.83.141) + +请注意这些不是固定的 IP 地址,AWS 会为我们的实例动态地分配 IP 地址。 + +我们在 bash 下执行下面的命令使环境变量生效。 + + . ./weavedemo.env + +### 2. 启动 Weave 和 WeaveDNS ### + +在安装完实例之后,我们将会在每台主机上启动 weave 以及 weavedns。Weave 以及 weavedns 使得我们能够轻易地将容器部署到一个全新的基础架构以及配置中, 不需要改变代码,也不需要去理解像 Ambassador 容器以及 Link 机制之类的概念。下面是在第一台主机上启动 weave 以及 weavedns 的命令。 + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 + $ sudo weave launch + $ sudo weave launch-dns 10.2.1.1/24 + +下一步,我也准备在第二台主机上启动 weave 以及 weavedns。 + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 + $ sudo weave launch $WEAVE_AWS_DEMO_HOST1 + $ sudo weave launch-dns 10.2.1.2/24 + +### 3. 启动应用容器 ### + +现在,我们准备跨两台主机启动六个容器,这两台主机都用 Apache2 Web 服务实例跑着简单的 php 网站。为了在第一个 Apache2 Web 服务器实例跑三个容器, 我们将会使用下面的命令。 + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 + $ sudo weave run --with-dns 10.3.1.1/24 -h ws1.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.2/24 -h ws2.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.3/24 -h ws3.weave.local fintanr/weave-gs-nginx-apache + +在那之后,我们将会在第二个实例上启动另外三个容器,请使用下面的命令。 + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 + $ sudo weave run --with-dns 10.3.1.4/24 -h ws4.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.5/24 -h ws5.weave.local fintanr/weave-gs-nginx-apache + $ sudo weave run --with-dns 10.3.1.6/24 -h ws6.weave.local fintanr/weave-gs-nginx-apache + +注意: 在这里,--with-dns 选项告诉容器使用 weavedns 来解析主机名,-h x.weave.local 则使得 weavedns 能够解析该主机。 + +### 4. 启动 Nginx 容器 ### + +在应用容器如预期的运行后,我们将会启动 nginx 容器,它将会在六个应用容器服务之间轮询并提供反向代理或者负载均衡。 为了启动 nginx 容器,请使用下面的命令。 + + ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 + $ sudo weave run --with-dns 10.3.1.7/24 -ti -h nginx.weave.local -d -p 80:80 fintanr/weave-gs-nginx-simple + +因此,我们的 nginx 容器在 $WEAVE_AWS_DEMO_HOST1 上公开地暴露成为一个 http 服务器。 + +### 5. 测试负载均衡服务器 ### + +为了测试我们的负载均衡服务器是否可以工作,我们执行一段可以发送 http 请求给 nginx 容器的脚本。我们将会发送6个请求,这样我们就能看到 nginx 在一次的轮询中服务于每台 web 服务器之间。 + + $ ./access-aws-hosts.sh + + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws1.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws2.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws3.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws4.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws5.weave.local", + "date" : "2015-06-26 12:24:23" + } + { + "message" : "Hello Weave - nginx example", + "hostname" : "ws6.weave.local", + "date" : "2015-06-26 12:24:23" + } + +### 结束语 ### + +我们最终成功地将 nginx 配置成一个反向代理/负载均衡服务器,通过使用 weave 以及运行在 AWS(Amazon Web Service)EC2 里面的 ubuntu 服务器中的 docker。从上面的步骤输出可以清楚的看到我们已经成功地配置了 nginx。我们可以看到请求在一次轮询中被发送到6个应用容器,这些容器在 Apache2 Web 服务器中跑着 PHP 应用。在这里,我们部署了一个容器化的 PHP 应用,使用 nginx 横跨多台在 AWS EC2 上的主机而不需要改变代码,利用 weavedns 使得每个容器连接在一起,只需要主机名就够了,眼前的这些便捷, 都要归功于 weave 以及 weavedns。 + +如果你有任何的问题、建议、反馈,请在评论中注明,这样我们才能够做得更好,谢谢:-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/nginx-load-balancer-weave-docker/ + +作者:[Arun Pyasi][a] +译者:[dingdongnigetou](https://github.com/dingdongnigetou) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://console.aws.amazon.com/ diff --git a/translated/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md b/translated/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md deleted file mode 100644 index f90a1ce76d..0000000000 --- a/translated/tech/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md +++ /dev/null @@ -1,126 +0,0 @@ -如何使用Weave以及Docker搭建Nginx反向代理/负载均衡服务器 -================================================================================ -Hi, 今天我们将会学习如何使用如何使用Weave和Docker搭建Nginx反向代理/负载均衡服务器。Weave创建一个虚拟网络将跨主机部署的Docker容器连接在一起并使它们自动暴露给外部世界。它让我们更加专注于应用的开发,而不是基础架构。Weave提供了一个如此棒的环境,仿佛它的所有容器都属于同个网络,不需要端口/映射/连接等的配置。容器中的应用提供的服务在weave网络中可以轻易地被外部世界访问,不论你的容器运行在哪里。在这个教程里我们将会使用weave快速并且轻易地将nginx web服务器部署为一个负载均衡器,反向代理一个运行在Amazon Web Services里面多个节点上的docker容器中的简单php应用。这里我们将会介绍WeaveDNS,它提供一个简单的方式让容器利用主机名找到彼此,不需要改变代码,并且能够告诉其他容器连接到这些主机名。 - -在这篇教程里,我们需要一个运行的容器集合来配置nginx负载均衡服务器。最简单轻松的方法就是使用Weave在ubuntu的docker容器中搭建nginx负载均衡服务器。 - -### 1. 搭建AWS实例 ### - -首先,我们需要搭建Amzaon Web Service实例,这样才能在ubuntu下用weave跑docker容器。我们将会使用[AWS CLI][1]来搭建和配置两个AWS EC2实例。在这里,我们使用最小的有效实例,t1.micro。我们需要一个有效的**Amazon Web Services账户**用以AWS命令行界面的搭建和配置。我们先在AWS命令行界面下使用下面的命令将github上的weave仓库克隆下来。 - - $ git clone http://github.com/fintanr/weave-gs - $ cd weave-gs/aws-nginx-ubuntu-simple - -在克隆完仓库之后,我们执行下面的脚本,这个脚本将会部署两个t1.micro实例,每个实例中都是ubuntu作为操作系统并用weave跑着docker容器。 - - $ sudo ./demo-aws-setup.sh - -在这里,我们将会在以后用到这些实例的IP地址。这些地址储存在一个weavedemo.env文件中,这个文件在执行demo-aws-setup.sh脚本的期间被创建。为了获取这些IP地址,我们需要执行下面的命令,命令输出类似下面的信息。 - - $ cat weavedemo.env - - export WEAVE_AWS_DEMO_HOST1=52.26.175.175 - export WEAVE_AWS_DEMO_HOST2=52.26.83.141 - export WEAVE_AWS_DEMO_HOSTCOUNT=2 - export WEAVE_AWS_DEMO_HOSTS=(52.26.175.175 52.26.83.141) - -请注意这些不是固定的IP地址,AWS会为我们的实例动态地分配IP地址。 - -我们在bash下执行下面的命令使环境变量生效。 - - . ./weavedemo.env - -### 2. 启动Weave and WeaveDNS ### - -在安装完实例之后,我们将会在每台主机上启动weave以及weavedns。Weave以及weavedns使得我们能够轻易地将容器部署到一个全新的基础架构以及配置中, 不需要改变代码,也不需要去理解像Ambassador容器以及Link机制之类的概念。下面是在第一台主机上启动weave以及weavedns的命令。 - - ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 - $ sudo weave launch - $ sudo weave launch-dns 10.2.1.1/24 - -下一步,我也准备在第二台主机上启动weave以及weavedns。 - - ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 - $ sudo weave launch $WEAVE_AWS_DEMO_HOST1 - $ sudo weave launch-dns 10.2.1.2/24 - -### 3. 启动应用容器 ### - -现在,我们准备跨两台主机启动六个容器,这两台主机都用Apache2 Web服务实例跑着简单的php网站。为了在第一个Apache2 Web服务器实例跑三个容器, 我们将会使用下面的命令。 - - ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 - $ sudo weave run --with-dns 10.3.1.1/24 -h ws1.weave.local fintanr/weave-gs-nginx-apache - $ sudo weave run --with-dns 10.3.1.2/24 -h ws2.weave.local fintanr/weave-gs-nginx-apache - $ sudo weave run --with-dns 10.3.1.3/24 -h ws3.weave.local fintanr/weave-gs-nginx-apache - -在那之后,我们将会在第二个实例上启动另外三个容器,请使用下面的命令。 - - ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST2 - $ sudo weave run --with-dns 10.3.1.4/24 -h ws4.weave.local fintanr/weave-gs-nginx-apache - $ sudo weave run --with-dns 10.3.1.5/24 -h ws5.weave.local fintanr/weave-gs-nginx-apache - $ sudo weave run --with-dns 10.3.1.6/24 -h ws6.weave.local fintanr/weave-gs-nginx-apache - -注意: 在这里,--with-dns选项告诉容器使用weavedns来解析主机名,-h x.weave.local则使得weavedns能够解析指定主机。 - -### 4. 启动Nginx容器 ### - -在应用容器运行得有如意料中的稳定之后,我们将会启动nginx容器,它将会在六个应用容器服务之间轮询并提供反向代理或者负载均衡。 为了启动nginx容器,请使用下面的命令。 - - ssh -i weavedemo-key.pem ubuntu@$WEAVE_AWS_DEMO_HOST1 - $ sudo weave run --with-dns 10.3.1.7/24 -ti -h nginx.weave.local -d -p 80:80 fintanr/weave-gs-nginx-simple - -因此,我们的nginx容器在$WEAVE_AWS_DEMO_HOST1上公开地暴露成为一个http服务器。 - -### 5. 测试负载均衡服务器 ### - -为了测试我们的负载均衡服务器是否可以工作,我们执行一段可以发送http请求给nginx容器的脚本。我们将会发送6个请求,这样我们就能看到nginx在一次的轮询中服务于每台web服务器之间。 - - $ ./access-aws-hosts.sh - - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws1.weave.local", - "date" : "2015-06-26 12:24:23" - } - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws2.weave.local", - "date" : "2015-06-26 12:24:23" - } - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws3.weave.local", - "date" : "2015-06-26 12:24:23" - } - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws4.weave.local", - "date" : "2015-06-26 12:24:23" - } - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws5.weave.local", - "date" : "2015-06-26 12:24:23" - } - { - "message" : "Hello Weave - nginx example", - "hostname" : "ws6.weave.local", - "date" : "2015-06-26 12:24:23" - } - -### 结束语 ### - -我们最终成功地将nginx配置成一个反向代理/负载均衡服务器,通过使用weave以及运行在AWS(Amazon Web Service)EC2之中的ubuntu服务器里面的docker。从上面的步骤输出可以清楚的看到我们已经成功地配置了nginx。我们可以看到请求在一次循环中被发送到6个应用容器,这些容器在Apache2 Web服务器中跑着PHP应用。在这里,我们部署了一个容器化的PHP应用,使用nginx横跨多台在AWS EC2上的主机而不需要改变代码,利用weavedns使得每个容器连接在一起,只需要主机名就够了,眼前的这些便捷, 都要归功于weave以及weavedns。 如果你有任何的问题、建议、反馈,请在评论中注明,这样我们才能够做得更好,谢谢:-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/nginx-load-balancer-weave-docker/ - -作者:[Arun Pyasi][a] -译者:[dingdongnigetou](https://github.com/dingdongnigetou) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://console.aws.amazon.com/ From 98001abdb7328004f64f4d5d83b6d879dcb37eeb Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 5 Sep 2015 17:36:52 +0800 Subject: [PATCH 1986/2517] PUB:20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux @Vic020 --- ...edule a Job and Watch Commands in Linux.md | 50 +++++++++---------- 1 file changed, 24 insertions(+), 26 deletions(-) rename {translated/tech => published}/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md (74%) diff --git a/translated/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md b/published/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md similarity index 74% rename from translated/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md rename to published/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md index 54d3996e0e..80e90df7fb 100644 --- a/translated/tech/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md +++ b/published/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md @@ -1,11 +1,11 @@ -Linux小技巧:Chrome小游戏,文字说话,计划作业,重复执行命令 +Linux 小技巧:Chrome 小游戏,让文字说话,计划作业,重复执行命令 ================================================================================ 重要的事情说两遍,我完成了一个[Linux提示与彩蛋][1]系列,让你的Linux获得更多创造和娱乐。 ![Linux提示与彩蛋系列](http://www.tecmint.com/wp-content/uploads/2015/08/Linux-Tips-and-Tricks.png) -Linux提示与彩蛋系列 +*Linux提示与彩蛋系列* 本文,我将会讲解Google-chrome内建小游戏,在终端中如何让文字说话,使用‘at’命令设置作业和使用watch命令重复执行命令。 @@ -17,7 +17,7 @@ Linux提示与彩蛋系列 ![不能连接到互联网](http://www.tecmint.com/wp-content/uploads/2015/08/Unable-to-Connect-Internet.png) -不能连接到互联网 +*不能连接到互联网* 按下空格键来激活Google-chrome彩蛋游戏。游戏没有时间限制。并且还不需要浪费时间安装使用。 @@ -27,27 +27,25 @@ Linux提示与彩蛋系列 ![Google Chrome中玩游戏](http://www.tecmint.com/wp-content/uploads/2015/08/Play-Game-in-Google-Chrome.gif) -Google Chrome中玩游戏 +*Google Chrome中玩游戏* ### 2. Linux 终端中朗读文字 ### -对于那些不能文字朗读的设备,有个小工具可以实现文字说话的转换器。 -espeak支持多种语言,可以及时朗读输入文字。 +对于那些不能文字朗读的设备,有个小工具可以实现文字说话的转换器。用各种语言写一些东西,espeak就可以朗读给你。 系统应该默认安装了Espeak,如果你的系统没有安装,你可以使用下列命令来安装: # apt-get install espeak (Debian) # yum install espeak (CentOS) - # dnf install espeak (Fedora 22 onwards) + # dnf install espeak (Fedora 22 及其以后) -You may ask espeak to accept Input Interactively from standard Input device and convert it to speech for you. You may do: -你可以设置接受从标准输入的交互地输入并及时转换成语音朗读出来。这样设置: +你可以让espeak接受标准输入的交互输入并及时转换成语音朗读出来。如下: $ espeak [按回车键] 更详细的输出你可以这样做: - $ espeak --stdout | aplay [按回车键][这里需要双击] + $ espeak --stdout | aplay [按回车键][再次回车] espeak设置灵活,也可以朗读文本文件。你可以这样设置: @@ -55,29 +53,29 @@ espeak设置灵活,也可以朗读文本文件。你可以这样设置: espeak可以设置朗读速度。默认速度是160词每分钟。使用-s参数来设置。 -设置30词每分钟: +设置每分钟30词的语速: $ espeak -s 30 -f /path/to/text/file/file_name.txt | aplay -设置200词每分钟: +设置每分钟200词的语速: $ espeak -s 200 -f /path/to/text/file/file_name.txt | aplay -让其他语言说北印度语(作者母语),这样设置: +说其他语言,比如北印度语(作者母语),这样设置: $ espeak -v hindi --stdout 'टेकमिंट विश्व की एक बेहतरीन लाइंक्स आधारित वेबसाइट है|' | aplay -espeak支持多种语言,支持自定义设置。使用下列命令来获得语言表: +你可以使用各种语言,让espeak如上面说的以你选择的语言朗读。使用下列命令来获得语言列表: $ espeak --voices -### 3. 快速计划作业 ### +### 3. 快速调度任务 ### -我们已经非常熟悉使用[cron][2]后台执行一个计划命令。 +我们已经非常熟悉使用[cron][2]守护进程执行一个计划命令。 Cron是一个Linux系统管理的高级命令,用于计划定时任务如备份或者指定时间或间隔的任何事情。 -但是,你是否知道at命令可以让你计划一个作业或者命令在指定时间?at命令可以指定时间和指定内容执行作业。 +但是,你是否知道at命令可以让你在指定时间调度一个任务或者命令?at命令可以指定时间执行指定内容。 例如,你打算在早上11点2分执行uptime命令,你只需要这样做: @@ -85,17 +83,17 @@ Cron是一个Linux系统管理的高级命令,用于计划定时任务如备 uptime >> /home/$USER/uptime.txt Ctrl+D -![Linux中计划作业](http://www.tecmint.com/wp-content/uploads/2015/08/Schedule-Job-in-Linux.png) +![Linux中计划任务](http://www.tecmint.com/wp-content/uploads/2015/08/Schedule-Job-in-Linux.png) -Linux中计划作业 +*Linux中计划任务* 检查at命令是否成功设置,使用: $ at -l -![浏览计划作业](http://www.tecmint.com/wp-content/uploads/2015/08/View-Scheduled-Jobs.png) +![浏览计划任务](http://www.tecmint.com/wp-content/uploads/2015/08/View-Scheduled-Jobs.png) -浏览计划作业 +*浏览计划任务* at支持计划多个命令,例如: @@ -117,17 +115,17 @@ at支持计划多个命令,例如: ![Linux中查看日期和时间](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Date-in-Linux.png) -Linux中查看日期和时间 +*Linux中查看日期和时间* -为了查看这个命令每三秒的输出,我需要运行下列命令: +为了每三秒查看一下这个命令的输出,我需要运行下列命令: $ watch -n 3 'date +"%H:%M:%S"' ![Linux中watch命令](http://www.tecmint.com/wp-content/uploads/2015/08/Watch-Command-in-Linux.gif) -Linux中watch命令 +*Linux中watch命令* -watch命令的‘-n’开关设定时间间隔。在上诉命令中,我们定义了时间间隔为3秒。你可以按你的需求定义。同样watch +watch命令的‘-n’开关设定时间间隔。在上述命令中,我们定义了时间间隔为3秒。你可以按你的需求定义。同样watch 也支持其他命令或者脚本。 至此。希望你喜欢这个系列的文章,让你的linux更有创造性,获得更多快乐。所有的建议欢迎评论。欢迎你也看看其他文章,谢谢。 @@ -138,7 +136,7 @@ via: http://www.tecmint.com/text-to-speech-in-terminal-schedule-a-job-and-watch- 作者:[Avishek Kumar][a] 译者:[VicYu/Vic020](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From fe9573d2e6ae85a282eda58c5c0e8a0e102cc4e9 Mon Sep 17 00:00:00 2001 From: KS Date: Sat, 5 Sep 2015 19:47:05 +0800 Subject: [PATCH 1987/2517] Update 20150831 Linux workstation security checklist.md --- sources/tech/20150831 Linux workstation security checklist.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150831 Linux workstation security checklist.md b/sources/tech/20150831 Linux workstation security checklist.md index bc2b59f16a..9ef46339d0 100644 --- a/sources/tech/20150831 Linux workstation security checklist.md +++ b/sources/tech/20150831 Linux workstation security checklist.md @@ -1,3 +1,4 @@ +wyangsun translating Linux workstation security checklist ================================================================================ This is a set of recommendations used by the Linux Foundation for their systems @@ -797,4 +798,4 @@ via: https://github.com/lfit/itpol/blob/master/linux-workstation-security.md#lin [12]: http://shop.kernelconcepts.de/ [13]: https://www.yubico.com/products/yubikey-hardware/yubikey-neo/ [14]: https://wiki.debian.org/Subkeys -[15]: https://github.com/lfit/ssh-gpg-smartcard-config \ No newline at end of file +[15]: https://github.com/lfit/ssh-gpg-smartcard-config From 192a41cb299b3af31930728e159e552f48bd129f Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 5 Sep 2015 21:32:57 +0800 Subject: [PATCH 1988/2517] PUB:20150901 How to automatically dim your screen on Linux @GOLinux --- ... automatically dim your screen on Linux.md | 53 +++++++++++++++++++ ... automatically dim your screen on Linux.md | 52 ------------------ 2 files changed, 53 insertions(+), 52 deletions(-) create mode 100644 published/20150901 How to automatically dim your screen on Linux.md delete mode 100644 translated/tech/20150901 How to automatically dim your screen on Linux.md diff --git a/published/20150901 How to automatically dim your screen on Linux.md b/published/20150901 How to automatically dim your screen on Linux.md new file mode 100644 index 0000000000..1fcdc19d47 --- /dev/null +++ b/published/20150901 How to automatically dim your screen on Linux.md @@ -0,0 +1,53 @@ +如何在 Linux 上自动调整屏幕亮度保护眼睛 +================================================================================ + +当你开始在计算机前花费大量时间的时候,问题自然开始显现。这健康吗?怎样才能舒缓我眼睛的压力呢?为什么光线灼烧着我?尽管解答这些问题的研究仍然在不断进行着,许多程序员已经采用了一些应用来改变他们的日常习惯,让他们的眼睛更健康点。在这些应用中,我发现了两个特别有趣的东西:Calise和Redshift。 + +### Calise ### + +处于时断时续的开发中,[Calise][1]的意思是“相机光感应器(Camera Light Sensor)”。换句话说,它是一个根据摄像头接收到的光强度计算屏幕最佳的背光级别的开源程序。更进一步地说,Calise可以基于你的地理坐标来考虑你所在地区的天气。我喜欢它是因为它兼容各个桌面,甚至非X系列。 + +![](https://farm1.staticflickr.com/569/21016715646_6e1e95f066_o.jpg) + +它同时附带了命令行界面和图形界面,支持多用户配置,而且甚至可以导出数据为CSV。安装完后,你必须在见证奇迹前对它进行快速校正。 + +![](https://farm6.staticflickr.com/5770/21050571901_1e7b2d63ec_c.jpg) + +不怎么令人喜欢的是,如果你和我一样有被偷窥妄想症,在你的摄像头前面贴了一条胶带,那就会比较不幸了,这会大大影响Calise的精确度。除此之外,Calise还是个很棒的应用,值得我们关注和支持。正如我先前提到的,它在过去几年中经历了一段修修补补的艰难阶段,所以我真的希望这个项目继续开展下去。 + +![](https://farm1.staticflickr.com/633/21032989702_9ae563db1e_o.png) + +### Redshift ### + +如果你想过要减少由屏幕导致的眼睛的压力,那么你很可能听过f.lux,它是一个免费的专有软件,用于根据一天中的时间来修改显示器的亮度和配色。然而,如果真的偏好于开源软件,那么一个可选方案就是:[Redshift][2]。灵感来自f.lux,Redshift也可以改变配色和亮度来加强你夜间坐在屏幕前的体验。启动时,你可以使用经度和纬度来配置地理坐标,然后就可以让它在托盘中运行了。Redshift将根据太阳的位置平滑地调整你的配色或者屏幕。在夜里,你可以看到屏幕的色温调向偏暖色,这会让你的眼睛少遭些罪。 + +![](https://farm6.staticflickr.com/5823/20420303684_2b6e917fee_b.jpg) + +和Calise一样,它提供了一个命令行界面,同时也提供了一个图形客户端。要快速启动Redshift,只需使用命令: + + $ redshift -l [LAT]:[LON] + +替换[LAT]:[LON]为你的维度和经度。 + +然而,它也可以通过gpsd模块来输入你的坐标。对于Arch Linux用户,我推荐你读一读这个[维基页面][3]。 + +### 尾声 ### + +总而言之,Linux用户没有理由不去保护自己的眼睛,Calise和Redshift两个都很棒。我真希望它们的开发能够继续下去,让它们获得应有的支持。当然,还有比这两个更多的程序可以满足保护眼睛和保持健康的目的,但是我感觉Calise和Redshift会是一个不错的开端。 + +如果你有一个经常用来舒缓眼睛的压力的喜欢的程序,请在下面的评论中留言吧。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/automatically-dim-your-screen-linux.html + +作者:[Adrien Brochard][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/adrien +[1]:http://calise.sourceforge.net/ +[2]:http://jonls.dk/redshift/ +[3]:https://wiki.archlinux.org/index.php/Redshift#Automatic_location_based_on_GPS diff --git a/translated/tech/20150901 How to automatically dim your screen on Linux.md b/translated/tech/20150901 How to automatically dim your screen on Linux.md deleted file mode 100644 index cf82291db3..0000000000 --- a/translated/tech/20150901 How to automatically dim your screen on Linux.md +++ /dev/null @@ -1,52 +0,0 @@ -Linux上如何让屏幕自动变暗 -================================================================================ -当你开始在计算机前花费大量时间的时候,自然的问题开始显现。这健康吗?怎样才能舒缓我眼睛的压力呢?为什么太阳光灼烧着我?尽管解答这些问题的研究仍然在活跃进行着,许多程序员已经采用了一些应用来让他们的日常习惯对他们的眼睛更健康点。在这些应用中,我发现了两个特别有趣的东西:Calise和Redshift。 - -### Calise ### - -在开发状态之中和之外,[Calise][1]都表示“相机光感应器”。换句话说,它是一个开源程序,用于基于摄像头接收到的光密度计算屏幕最佳的背景光级别。更精确地说,Calise可以基于你的地理坐标来考虑你所在地区的天气。我喜欢它是因为它兼容各个桌面,甚至非X系列。 - -![](https://farm1.staticflickr.com/569/21016715646_6e1e95f066_o.jpg) - -它同时附带了命令行界面和图形界面,支持多用户配置,而且甚至可以导出数据为CSV。安装完后,你必须在魔法展开前快速进行校正。 - -![](https://farm6.staticflickr.com/5770/21050571901_1e7b2d63ec_c.jpg) - -不怎么令人喜欢的是,如果你和我一样偏执,在你的摄像头前面贴了一条胶带,那就会比较不幸了,这会大大影响Calise的精确度。除此之外,Calise还是个很棒的应用,值得我们关注和支持。正如我先前提到的,它在过去几年中经历了一段修修补补的艰难阶段,所以我真的希望这个项目继续开展下去。 - -![](https://farm1.staticflickr.com/633/21032989702_9ae563db1e_o.png) - -### Redshift ### - -如果你已经考虑好要减少由屏幕导致的眼睛的压力,那么你很可能听过f.lux,它是一个免费的专有软件,用于根据一天中的时间来修改显示器的亮度和配色。然而,如果真的偏好于开源软件,那么一个可选方案就是:[Redshift][2]。灵感来自f.lux,Redshift也可以改变配色和亮度来加强你夜间坐在屏幕前的体验。启动时,你可以配置使用经度和纬度来配置地理坐标,然后就可以让它在托盘中运行了。Redshift将根据太阳的位置平滑地调整你的配色或者屏幕。在夜里,你可以看到屏幕的色温调向偏暖色,这会让你的眼睛少遭些罪。 - -![](https://farm6.staticflickr.com/5823/20420303684_2b6e917fee_b.jpg) - -和Calise一样,它提供了一个命令行界面,同时也提供了一个图形客户端。要快速启动Redshift,只需使用命令: - - $ redshift -l [LAT]:[LON] - -替换[LAT]:[LON]为你的维度和经度。 - -然而,它也可以通过gpsd模块来输入你的坐标。对于Arch Linux用户,我推荐你读一读这个[维基页面][3]。 - -### 尾声 ### - -总而言之,Linux用户没有理由不去保护自己的眼睛,Calise和Redshift两个都很棒。我真希望它们的开发能够继续下去,他们能获得应有的支持。当然,还有比这两个更多的程序可以满足保护眼睛和保持健康的目的,但是我感觉Calise和Redshift会是一个不错的开始。 - -如果你有一个真正喜欢的程序,而且也经常用它来舒缓眼睛的压力,请在下面的评论中留言吧。 - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/automatically-dim-your-screen-linux.html - -作者:[Adrien Brochard][a] -译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/adrien -[1]:http://calise.sourceforge.net/ -[2]:http://jonls.dk/redshift/ -[3]:https://wiki.archlinux.org/index.php/Redshift#Automatic_location_based_on_GPS From ab6da0826824152231de4e81a00e3c941c2b9a84 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 5 Sep 2015 23:40:13 +0800 Subject: [PATCH 1989/2517] PUB:20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @MikeCoder 好久没见你了? --- ...Apache with MariaDB on Debian or Ubuntu.md | 182 +++++++++++++++++ ...Apache with MariaDB on Debian or Ubuntu.md | 188 ------------------ 2 files changed, 182 insertions(+), 188 deletions(-) create mode 100644 published/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md delete mode 100644 translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md diff --git a/published/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md b/published/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md new file mode 100644 index 0000000000..5682e18a84 --- /dev/null +++ b/published/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md @@ -0,0 +1,182 @@ +在 Ubuntu 上配置高性能的 HHVM 环境 +================================================================================ + +HHVM全称为 HipHop Virtual Machine,它是一个开源虚拟机,用来运行由 Hack(一种编程语言)和 PHP 开发应用。HHVM 在保证了 PHP 程序员最关注的高灵活性的要求下,通过使用最新的编译方式来取得了非凡的性能。到目前为止,相对于 PHP + [APC (Alternative PHP Cache)][1] ,HHVM 为 FaceBook 在 HTTP 请求的吞吐量上提高了9倍的性能,在内存的占用上,减少了5倍左右的内存占用。 + +同时,HHVM 也可以与基于 FastCGI 的 Web 服务器(如 Nginx 或者 Apache )协同工作。 + +![Install HHVM, Nginx and Apache with MariaDB](http://www.tecmint.com/wp-content/uploads/2015/08/Install-HHVM-Nginx-Apache-MariaDB.png) + +*安装 HHVM,Nginx和 Apache 还有 MariaDB* + +在本教程中,我们一起来配置 Nginx/Apache web 服务器、 数据库服务器 MariaDB 和 HHVM 。我们将使用 Ubuntu 15.04 (64 位),因为 HHVM 只能运行在64位系统上。同时,该教程也适用于 Debian 和 Linux Mint。 + +### 第一步: 安装 Nginx 或者 Apache 服务器 ### + +1、首先,先进行一次系统的升级并更新软件仓库列表,命令如下 + + # apt-get update && apt-get upgrade + +![System Upgrade](http://www.tecmint.com/wp-content/uploads/2015/08/System-Upgrade.png) + +*系统升级* + +2、 正如我之前说的,HHVM 能和 Nginx 和 Apache 进行集成。所以,究竟使用哪个服务器,这是你的自由,不过,我们会教你如何安装这两个服务器。 + +#### 安装 Nginx #### + +我们通过下面的命令安装 Nginx/Apache 服务器 + + # apt-get install nginx + +![Install Nginx Web Server](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Nginx-Web-Server.png) + +*安装 Nginx 服务器* + +#### 安装 Apache #### + + # apt-get install apache2 + +![Install Apache Web Server](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Apache-Web-Server.png) + +*安装 Apache 服务器* + +完成这一步,你能通过以下的链接看到 Nginx 或者 Apache 的默认页面 + + http://localhost + 或 + http://IP-Address + + +![Nginx Welcome Page](http://www.tecmint.com/wp-content/uploads/2015/08/Nginx-Welcome-Page.png) + +*Nginx 默认页面* + +![Apache Default Page](http://www.tecmint.com/wp-content/uploads/2015/08/Apache-Default-Page.png) + +*Apache 默认页面* + +### 第二步: 安装和配置 MariaDB ### + +3、 这一步,我们将通过如下命令安装 MariaDB,它是一个比 MySQL 性能更好的数据库 + + # apt-get install mariadb-client mariadb-server + +![Install MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/08/Install-MariaDB-Database.png) + +*安装 MariaDB* + +4、 在 MariaDB 成功安装之后,你可以启动它,并且设置 root 密码来保护数据库: + + + # systemctl start mysql + # mysql_secure_installation + +回答以下问题,只需要按下`y`或者 `n`并且回车。请确保你仔细的阅读过说明。 + + Enter current password for root (enter for none) = press enter + Set root password? [Y/n] = y + Remove anonymous users[y/n] = y + Disallow root login remotely[y/n] = y + Remove test database and access to it [y/n] = y + Reload privileges tables now[y/n] = y + +5、 在设置了密码之后,你就可以登录 MariaDB 了。 + + + # mysql -u root -p + + +### 第三步: 安装 HHVM ### + +6、 在此阶段,我们将安装 HHVM。我们需要添加 HHVM 的仓库到你的`sources.list`文件中,然后更新软件列表。 + + # wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | apt-key add - + # echo deb http://dl.hhvm.com/ubuntu DISTRIBUTION_VERSION main | sudo tee /etc/apt/sources.list.d/hhvm.list + # apt-get update + +**重要**:不要忘记用你的 Ubuntu 发行版代号替换上述的 DISTRIBUTION_VERSION (比如:lucid, precise, trusty) 或者是 Debian 的 jessie 或者 wheezy。在 Linux Mint 中也是一样的,不过只支持 petra。 + +添加了 HHVM 仓库之后,你就可以轻松安装了。 + + # apt-get install -y hhvm + +安装之后,就可以启动它,但是它并没有做到开机启动。可以用如下命令做到开机启动。 + + # update-rc.d hhvm defaults + +### 第四步: 配置 Nginx/Apache 连接 HHVM ### + +7、 现在,nginx/apache 和 HHVM 都已经安装完成了,并且都独立运行起来了,所以我们需要对它们进行设置,来让它们互相关联。这个关键的步骤,就是需要告知 nginx/apache 将所有的 php 文件,都交给 HHVM 进行处理。 + +如果你用了 Nginx,请按照如下步骤: + +nginx 的配置文件在 /etc/nginx/sites-available/default, 并且这些配置文件会在 /usr/share/nginx/html 中寻找文件执行,不过,它不知道如何处理 PHP。 + +为了确保 Nginx 可以连接 HHVM,我们需要执行所带的如下脚本。它可以帮助我们正确的配置 Nginx,将 hhvm.conf 放到 上面提到的配置文件 nginx.conf 的头部。 + +这个脚本可以确保 Nginx 可以对 .hh 和 .php 的做正确的处理,并且将它们通过 fastcgi 发送给 HHVM。 + + # /usr/share/hhvm/install_fastcgi.sh + +![Configure Nginx for HHVM](http://www.tecmint.com/wp-content/uploads/2015/08/Configure-Nginx-for-HHVM.png) + +*配置 Nginx、HHVM* + +**重要**: 如果你使用的是 Apache,这里不需要进行配置。 + +8、 接下来,你需要使用 hhvm 来提供 php 的运行环境。 + + # /usr/bin/update-alternatives --install /usr/bin/php php /usr/bin/hhvm 60 + +以上步骤完成之后,你现在可以启动并且测试它了。 + + # systemctl start hhvm + +### 第五步: 测试 HHVM 和 Nginx/Apache ### + +9、 为了确认 hhvm 是否工作,你需要在 nginx/apache 的文档根目录下建立 hello.php。 + + # nano /usr/share/nginx/html/hello.php [对于 Nginx] + 或 + # nano /var/www/html/hello.php [对于 Nginx 和 Apache] + +在文件中添加如下代码: + + + +然后访问如下链接,确认自己能否看到 "hello world" + + http://localhost/info.php + 或 + http://IP-Address/info.php + +![HHVM Page](http://www.tecmint.com/wp-content/uploads/2015/08/HHVM-Page.png) + +*HHVM 页面* + +如果 “HHVM” 的页面出现了,那就说明你成功了。 + +### 结论 ### + +以上的步骤都是非常简单的,希望你能觉得这是一篇有用的教程,如果你在以上的步骤中遇到了问题,给我们留一个评论,我们将全力解决。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-hhvm-and-nginx-apache-with-mariadb-on-debian-ubuntu/ + +作者:[Ravi Saive][a] +译者:[MikeCoder](https://github.com/MikeCoder) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/admin/ +[1]:http://www.tecmint.com/install-apc-alternative-php-cache-in-rhel-centos-fedora/ diff --git a/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md b/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md deleted file mode 100644 index 1591def307..0000000000 --- a/translated/tech/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md +++ /dev/null @@ -1,188 +0,0 @@ -在 Debian 或者 Ubuntu 上配置高性能的 HHVM、Nginx/Apache 和 MariaDB -================================================================================ -HHVM全称为 HipHop Virtual Machine, 它是一个由 running Hack(一种编程语言)和 PHP的相关应用组成的开源虚拟机。HHVM 在保证了 PHP 程序员最关注的高灵活性的要求下,通过使用最新编译结果的方式来达到一个客观的性能。到目前为止,HHVM 为 FaceBook 在 HTTP 请求的吞吐量上提高了9倍的性能,在内存的占用上,减少了5倍左右的内存占用。 - -+ [APC (Alternative PHP Cache)][1]. - -HHVM can also be used along with a FastCGI-based web-server like Nginx or Apache. -同时,HHVM 也可以通过 FastCGI 接口,与像 Nginx 或者 Apache 进行集成。 - -![Install HHVM, Nginx and Apache with MariaDB](http://www.tecmint.com/wp-content/uploads/2015/08/Install-HHVM-Nginx-Apache-MariaDB.png) - -安装 HHVM,Nginx和 Apache 还有 MariaDB - -在本教程中,我们一起来进行 Nginx/Apache web 服务器、 数据库服务器 MariaDB 和 HHVM 的设置。设置中,我们将使用 Ubuntu 15.04 (64 位),同时,该教程也适用于 Debian 和 Linux Mint。 - -### Step 1: 安装 Nginx 或者 Apache 服务器 ### - -1. 首先,先进行一次系统的升级或者更新软件仓库列表. -``` - # apt-get update && apt-get upgrade -``` -![System Upgrade](http://www.tecmint.com/wp-content/uploads/2015/08/System-Upgrade.png) - -System Upgrade - -2. 正如我之前说的,HHVM 能和 Nginx 和 Apache 进行集成。所以,究竟使用哪个服务器,这是你的自由,不过,我们会教你如何安装这两个服务器。 - -#### 安装 Nginx #### - -我们通过下面的命令安装 Nginx/Apache 服务器 - - # apt-get install nginx - -![Install Nginx Web Server](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Nginx-Web-Server.png) - -安装 Nginx 服务器 - -#### 安装 Apache #### - - # apt-get install apache2 - -![Install Apache Web Server](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Apache-Web-Server.png) - -安装 Apache 服务器 - -完成这一步,你能通过以下的链接看到 Nginx 或者 Apache 的默认页面 - - http://localhost - OR - http://IP-Address - -#### Nginx 默认页面 #### - -![Nginx Welcome Page](http://www.tecmint.com/wp-content/uploads/2015/08/Nginx-Welcome-Page.png) - -Nginx 默认页面 - -#### Apache 默认页面 #### - -![Apache Default Page](http://www.tecmint.com/wp-content/uploads/2015/08/Apache-Default-Page.png) - -Apache 默认页面 - -### Step 2: 安装和配置 MariaDB ### - -3. 这一步,我们将通过如下命令安装 MariaDB,它是一个比 MySQL 更好的数据库 -``` - # apt-get install mariadb-client mariadb-server -``` -![Install MariaDB Database](http://www.tecmint.com/wp-content/uploads/2015/08/Install-MariaDB-Database.png) - -安装 MariaDB - -4. 在 MariaDB 成功安装之后,你可以启动它,并且设置 root 密码来保护数据库: - -``` - # systemctl start mysql - # mysql_secure_installation -``` - -回答以下问题,只需要按下`y`或者 `n`并且回车。请确保你仔细的阅读过说明。 - - Enter current password for root (enter for none) = press enter - Set root password? [Y/n] = y - Remove anonymous users[y/n] = y - Disallow root login remotely[y/n] = y - Remove test database and access to it [y/n] = y - Reload privileges tables now[y/n] = y - -5. 在设置了密码之后,你就可以登陆 MariaDB 了。 - -``` - # mysql -u root -p -``` - -### Step 3: 安装 HHVM ### - -6. 我们需要添加 HHVM 的仓库到你的`sources.list`文件中,然后更新软件列表。 -``` - # wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | apt-key add - - # echo deb http://dl.hhvm.com/ubuntu DISTRIBUTION_VERSION main | sudo tee /etc/apt/sources.list.d/hhvm.list - # apt-get update -``` -**重要**:不要忘记用你的 Ubuntu 发行版型号替换上述的DISTRIBUTION_VERSION (比如:lucid, precise, trusty) 或者是 Debian 的 jessie 或者 wheezy。在 Linux Mint 中也是一样的,不过只支持 petra。 - -添加了 HHVM 仓库之后,你就可以安装了。 - - # apt-get install -y hhvm - -安装之后,即可启动它,但是它并没有做到开机启动。可以用如下命令做到开机启动。 - - # update-rc.d hhvm defaults - -### Step 4: 配置 Nginx/Apache 连接 HHVM ### - -7. 现在,nginx/apache 和 HHVM 都已经安装完成了,并且都独立运行起来了,所以我们需要对他们进行设置,来让他们互相关联。这个关键的步骤,就是需要nginx/apache 将所有的 php 文件,都交给 HHVM 进行处理。 - -如果你用了 Nginx,请按照如下步骤: - -nginx 的配置文件在 /etc/nginx/sites-available/default, 并且这些配置文件会在 /usr/share/nginx/html 中寻找文件执行,不过,他不知道如何处理 PHP。 - -为了确保 Nginx 可以连接 HHVM,我们需要执行如下的脚本。他可以帮助我们正确的配置 Nginx。 - -这个脚本可以确保 Nginx 可以对 .hh 和 .php 的做正确的处理,并且通过 fastcgi 与 HHVM 进行通信 - - # /usr/share/hhvm/install_fastcgi.sh - -![Configure Nginx for HHVM](http://www.tecmint.com/wp-content/uploads/2015/08/Configure-Nginx-for-HHVM.png) - -配置 Nginx、HHVM - -**重要**: 如果你使用的是 Apache,这边就不需要进行配置了 - -8. 接下来,你需要使用 hhvm 来提供 php 的运行环境。 -``` - # /usr/bin/update-alternatives --install /usr/bin/php php /usr/bin/hhvm 60 -``` -以上步骤完成之后,你现在可以启动并且测试他了。 - - # systemctl start hhvm - -### Step 5: 测试 HHVM 和 Nginx/Apache ### - -9. 为了确认 hhvm 是否工作,你需要在 nginx/apache 的根目录下建立 hello.php。 -``` - # nano /usr/share/nginx/html/hello.php [For Nginx] - OR - # nano /var/www/html/hello.php [For Nginx and Apache] -``` -在文件中添加如下代码: - - - -然后访问如下链接,确认自己能否看到 "hello world" - - http://localhost/info.php - OR - http://IP-Address/info.php - -![HHVM Page](http://www.tecmint.com/wp-content/uploads/2015/08/HHVM-Page.png) - -HHVM Page - -如果 “HHVM” 的页面出现了,那就说明你成功了 - -### 结论 ### - -以上的步骤都是非常简单的,希望你能觉得这是一篇有用的教程,如果你在以上的步骤中遇到了问题,给我们留一个评论,我们将全力解决。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-hhvm-and-nginx-apache-with-mariadb-on-debian-ubuntu/ - -作者:[Ravi Saive][a] -译者:[MikeCoder](https://github.com/MikeCoder) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/admin/ -[1]:http://www.tecmint.com/install-apc-alternative-php-cache-in-rhel-centos-fedora/ From 6dcdae7a6ddb84a0c36c2c981ffeb8fb67e1878e Mon Sep 17 00:00:00 2001 From: Yu Ye Date: Sat, 5 Sep 2015 23:55:23 +0800 Subject: [PATCH 1990/2517] Create 20150826 Five Super Cool Open Source Games.md --- ...50826 Five Super Cool Open Source Games.md | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 translated/share/20150826 Five Super Cool Open Source Games.md diff --git a/translated/share/20150826 Five Super Cool Open Source Games.md b/translated/share/20150826 Five Super Cool Open Source Games.md new file mode 100644 index 0000000000..30ca09e171 --- /dev/null +++ b/translated/share/20150826 Five Super Cool Open Source Games.md @@ -0,0 +1,66 @@ +Translated by H-mudcup +五大超酷的开源游戏 +================================================================================ +在2014年和2015年,Linux 成了一堆流行商业品牌的家,例如备受欢迎的 Borderlands、Witcher、Dead Island 和 CS系列游戏。虽然这是令人激动的消息,但这跟玩家的预算有什么关系?商业品牌很好,但更好的是由了解玩家喜好的开发者开发的免费的替代品。 + +前段时间,我偶然看到了一个三年前发布的 YouTube 视频,标题非常的有正能量[5个不算糟糕的开源游戏][1]。虽然视频表扬了一些开源游戏,我还是更喜欢用一个更加热情的方式来切入这个话题,至少如标题所说。所以,下面是我的一份五大超酷开源游戏的清单。 + +### Tux Racer ### + +![Tux Racer](http://fossforce.com/wp-content/uploads/2015/08/tuxracer-550x413.jpg) + +Tux Racer + +[《Tux Racer》][2]是这份清单上的第一个游戏,因为我对这个游戏很熟悉。我和兄弟与[电脑上的孩子们][4]项目在[最近一次去墨西哥的路途中][3] Tux Racer 是孩子和教师都喜欢玩的游戏之一。在这个游戏中,玩家使用 Linux 吉祥物,企鹅 Tux,在下山雪道上以计时赛的方式进行比赛。玩家们不断挑战他们自己的最佳纪录。目前还没有多玩家版本,但这是有可能改变的。适用于 Linux、OS X、Windows 和 Android。 + +### Warsow ### + +![Warsow](http://fossforce.com/wp-content/uploads/2015/08/warsow-550x413.jpg) + +Warsow + +[《Warsow》][5]网站解释道:“设定是有未来感的卡通世界,Warsow 是个完全开放的适用于 Windows、Linux 和 Mac OS X平台的快节奏第一人称射击游戏(FPS)。Warsow 是尊重的艺术和网络中的体育精神。(Warsow is the Art of Respect and Sportsmanship Over the Web.大写字母组成Warsow。)” 我很不情愿的把 FPS 类放到了这个列表中,因为很多人玩过这类的游戏,但是我的确被 Warsow 打动了。它对很多动作进行了优先级排序,游戏节奏很快,一开始就有八个武器。卡通化的风格让玩的过程变得没有那么严肃,更加的休闲,非常适合可以和亲友一同玩。然而,他却以充满竞争的游戏自居,并且当我体验这个游戏时,我发现周围确实有一些专家级的玩家。适用于 Linux、Windows 和 OS X。 + +### M.A.R.S——一个荒诞的射击游戏 ### + +![M.A.R.S. - A ridiculous shooter](http://fossforce.com/wp-content/uploads/2015/08/MARS-screenshot-550x344.jpg) + +M.A.R.S.——一个荒诞的射击游戏 + +[《M.A.R.S——一个荒诞的射击游戏》][6]之所以吸引人是因为他充满活力的色彩和画风。支持两个玩家使用同一个键盘,而一个在线多玩家版本目前正在开发中——这意味着想要和朋友们一起玩暂时还要等等。不论如何,它是个可以使用几个不同飞船和武器的有趣的太空射击游戏。飞船的形状不同,从普通的枪、激光、散射枪到更有趣的武器(随机出来的飞船中有一个会对敌人发射泡泡,这为这款混乱的游戏增添了很多乐趣)。游戏几种模式,比如标准模式和对方进行殊死搏斗以获得高分或先达到某个分数线,还有其他的模式,空间球(Spaceball)、坟坑(Grave-itation Pit)和保加农炮(Cannon Keep)。适用于 Linux、Windows 和 OS X。 + +### Valyria Tear ### + +![Valyria Tear](http://fossforce.com/wp-content/uploads/2015/08/bronnan-jump-to-enemy-550x413.jpg) + +Valyria Tear + +[Valyria Tear][7] 类似几年来拥有众多粉丝的角色扮演游戏(RPG)。故事设定在梦幻游戏的通用年代,充满了骑士、王国和魔法,以及主要角色 Bronann。设计团队做的非常棒,在设计这个世界和实现玩家对这类游戏所有的期望:隐藏的宝藏、偶遇的怪物、非玩家操纵角色(NPC)的互动以及所有 RPG 不可或缺的:在低级别的怪物上刷经验直到可以面对大 BOSS。我在试玩的时候,时间不允许我太过深入到这个游戏故事中,但是感兴趣的人可以看 YouTube 上由 Yohann Ferriera 用户发的‘[Let’s Play][8]’系列视频。适用于 Linux、Windows 和 OS X。 + +### SuperTuxKart ### + +![SuperTuxKart](http://fossforce.com/wp-content/uploads/2015/08/hacienda_tux_antarctica-550x293.jpg) + +SuperTuxKart + +最后一个同样好玩的游戏是 [SuperTuxKart][9],一个效仿 Mario Kart(马里奥卡丁车)但丝毫不必原作差的好游戏。它在2000年-2004年间开始以 Tux Kart 开发,但是在成品中有错误,结果开发就停止了几年。从2006年开始重新开发时起,它就一直在改进,直到四个月前0.9版首次发布。在游戏里,我们的老朋友 Tux 与马里奥和其他一些开源吉祥物一同开始。其中一个熟悉的面孔是 Suzanne,Blender 的那只吉祥物猴子。画面很给力,游戏很流畅。虽然在线游戏还在计划阶段,但是分屏多玩家游戏是可以的。一个电脑最多可以四个玩家同时玩。适用于 Linux、Windows、OS X、AmigaOS 4、AROS 和 MorphOS。 + +-------------------------------------------------------------------------------- + +via: http://fossforce.com/2015/08/five-super-cool-open-source-games/ + +作者:Hunter Banks +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://www.youtube.com/watch?v=BEKVl-XtOP8 +[2]:http://tuxracer.sourceforge.net/download.html +[3]:http://fossforce.com/2015/07/banks-family-values-texas-linux-fest/ +[4]:http://www.kidsoncomputers.org/an-amazing-week-in-oaxaca +[5]:https://www.warsow.net/download +[6]:http://mars-game.sourceforge.net/ +[7]:http://valyriatear.blogspot.com/ +[8]:https://www.youtube.com/channel/UCQ5KrSk9EqcT_JixWY2RyMA +[9]:http://supertuxkart.sourceforge.net/ From 993fdc129e92bc67ae7ac5cc6f130a83f96255f0 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 6 Sep 2015 01:34:22 +0800 Subject: [PATCH 1991/2517] 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 1992/2517] =?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 1993/2517] =?UTF-8?q?20150906-2=20=E9=80=89=E9=A2=98=20str?= =?UTF-8?q?uggling=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 1994/2517] 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 1995/2517] =?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 1996/2517] 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 1997/2517] 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 1998/2517] =?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 1999/2517] [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 2000/2517] 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 2001/2517] =?UTF-8?q?Translating=EF=BC=9A=20sources/tech/2?= =?UTF-8?q?0150906=20Do=20Simple=20Math=20In=20Ubuntu=20And=20elementary?= =?UTF-8?q?=20OS=20With=20NaSC.md=20sources/tech/20150906=20How=20To=20Man?= =?UTF-8?q?age=20Log=20Files=20With=20Logrotate=20On=20Ubuntu=2012.10.md?= =?UTF-8?q?=20sources/tech/20150906=20Make=20Math=20Simple=20in=20Ubuntu?= =?UTF-8?q?=20or=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 2002/2517] 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 2003/2517] 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 2004/2517] =?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 2005/2517] 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 2006/2517] =?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 2007/2517] 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 2008/2517] 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 2009/2517] 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 2010/2517] 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 2011/2517] 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 2012/2517] [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 2013/2517] 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 2014/2517] 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 2015/2517] =?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 2016/2517] =?UTF-8?q?20150906-2=20=E9=80=89=E9=A2=98=20Lea?= =?UTF-8?q?rn=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 2017/2517] =?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 2018/2517] 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 2019/2517] 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 2020/2517] 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 2021/2517] =?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 From e043bae6c6643463b6f0420593052975d42d9935 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Wed, 9 Sep 2015 17:42:59 +0800 Subject: [PATCH 2022/2517] [Translated]RHCSA Series-Part 12--Automeat RHEL 7 Installations Using 'Kickstart'.md --- ... RHEL 7 Installations Using 'Kickstart'.md | 144 ------------------ ... RHEL 7 Installations Using 'Kickstart'.md | 142 +++++++++++++++++ 2 files changed, 142 insertions(+), 144 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md 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 deleted file mode 100644 index 3d8b578a32..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md +++ /dev/null @@ -1,144 +0,0 @@ -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. - -In this article we will show what you need to use kickstart utility so that you can forget about babysitting servers during the installation process. - -![Automatic Kickstart Installation of RHEL 7](http://www.tecmint.com/wp-content/uploads/2015/05/Automatic-Kickstart-Installation-of-RHEL-7.jpg) - -RHCSA: Automatic Kickstart Installation of RHEL 7 - -#### Introducing Kickstart and Automated Installations #### - -Kickstart is an automated installation method used primarily by Red Hat Enterprise Linux (and other Fedora spin-offs, such as CentOS, Oracle Linux, etc.) to execute unattended operating system installation and configuration. Thus, kickstart installations allow system administrators to have identical systems, as far as installed package groups and system configuration are concerned, while sparing them the hassle of having to manually install each of them. - -### Preparing for a Kickstart Installation ### - -To perform a kickstart installation, we need to follow these steps: - -1. Create a Kickstart file, a plain text file with several predefined configuration options. - -2. Make the Kickstart file available on removable media, a hard drive or a network location. The client will use the rhel-server-7.0-x86_64-boot.iso file, whereas you will need to make the full ISO image (rhel-server-7.0-x86_64-dvd.iso) available from a network resource, such as a HTTP of FTP server (in our present case, we will use another RHEL 7 box with IP 192.168.0.18). - -3. Start the Kickstart installation - -To create a kickstart file, login to your Red Hat Customer Portal account, and use the [Kickstart configuration tool][1] to choose the desired installation options. Read each one of them carefully before scrolling down, and choose what best fits your needs: - -![Kickstart Configuration Tool](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-Configuration-Tool.png) - -Kickstart Configuration Tool - -If you specify that the installation should be performed either through HTTP, FTP, or NFS, make sure the firewall on the server allows those services. - -Although you can use the Red Hat online tool to create a kickstart file, you can also create it manually using the following lines as reference. You will notice, for example, that the installation process will be in English, using the latin american keyboard layout and the America/Argentina/San_Luis time zone: - - lang en_US - keyboard la-latin1 - timezone America/Argentina/San_Luis --isUtc - rootpw $1$5sOtDvRo$In4KTmX7OmcOW9HUvWtfn0 --iscrypted - #platform x86, AMD64, or Intel EM64T - text - url --url=http://192.168.0.18//kickstart/media - bootloader --location=mbr --append="rhgb quiet crashkernel=auto" - zerombr - clearpart --all --initlabel - autopart - auth --passalgo=sha512 --useshadow - selinux --enforcing - firewall --enabled - firstboot --disable - %packages - @base - @backup-server - @print-server - %end - -In the online configuration tool, use 192.168.0.18 for HTTP Server and `/kickstart/tecmint.bin` for HTTP Directory in the Installation section after selecting HTTP as installation source. Finally, click the Download button at the right top corner to download the kickstart file. - -In the kickstart sample file above, you need to pay careful attention to. - - url --url=http://192.168.0.18//kickstart/media - -That directory is where you need to extract the contents of the DVD or ISO installation media. Before doing that, we will mount the ISO installation file in /media/rhel as a loop device: - - # mount -o loop /var/www/html/kickstart/rhel-server-7.0-x86_64-dvd.iso /media/rhel - -![Mount RHEL ISO Image](http://www.tecmint.com/wp-content/uploads/2015/05/Mount-RHEL-ISO-Image.png) - -Mount RHEL ISO Image - -Next, copy all the contents of /media/rhel to /var/www/html/kickstart/media: - - # cp -R /media/rhel /var/www/html/kickstart/media - -When you’re done, the directory listing and disk usage of /var/www/html/kickstart/media should look as follows: - -![Kickstart Media Files](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-media-Files.png) - -Kickstart Media Files - -Now we’re ready to kick off the kickstart installation. - -Regardless of how you choose to create the kickstart file, it’s always a good idea to check its syntax before proceeding with the installation. To do that, install the pykickstart package. - - # yum update && yum install pykickstart - -And then use the ksvalidator utility to check the file: - - # ksvalidator /var/www/html/kickstart/tecmint.bin - -If the syntax is correct, you will not get any output, whereas if there’s an error in the file, you will get a warning notice indicating the line where the syntax is not correct or unknown. - -### Performing a Kickstart Installation ### - -To start, boot your client using the rhel-server-7.0-x86_64-boot.iso file. When the initial screen appears, select Install Red Hat Enterprise Linux 7.0 and press the Tab key to append the following stanza and press Enter: - - # inst.ks=http://192.168.0.18/kickstart/tecmint.bin - -![RHEL Kickstart Installation](http://www.tecmint.com/wp-content/uploads/2015/05/RHEL-Kickstart-Installation.png) - -RHEL Kickstart Installation - -Where tecmint.bin is the kickstart file created earlier. - -When you press Enter, the automated installation will begin, and you will see the list of packages that are being installed (the number and the names will differ depending on your choice of programs and package groups): - -![Automatic Kickstart Installation of RHEL 7](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-Automatic-Installation.png) - -Automatic Kickstart Installation of RHEL 7 - -When the automated process ends, you will be prompted to remove the installation media and then you will be able to boot into your newly installed system: - -![RHEL 7 Boot Screen](http://www.tecmint.com/wp-content/uploads/2015/05/RHEL-7.png) - -RHEL 7 Boot Screen - -Although you can create your kickstart files manually as we mentioned earlier, you should consider using the recommended approach whenever possible. You can either use the online configuration tool, or the anaconda-ks.cfg file that is created by the installation process in root’s home directory. - -This file actually is a kickstart file, so you may want to install the first box manually with all the desired options (maybe modify the logical volumes layout or the file system on top of each one) and then use the resulting anaconda-ks.cfg file to automate the installation of the rest. - -In addition, using the online configuration tool or the anaconda-ks.cfg file to guide future installations will allow you to perform them using an encrypted root password out-of-the-box. - -### Conclusion ### - -Now that you know how to create kickstart files and how to use them to automate the installation of Red Hat Enterprise Linux 7 servers, you can forget about babysitting the installation process. This will give you time to do other things, or perhaps some leisure time if you’re lucky. - -Either way, let us know what you think about this article using the form below. Questions are also welcome! - -Read Also: [Automated Installations of Multiple RHEL/CentOS 7 Distributions using PXE and Kickstart][2] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/automatic-rhel-installations-using-kickstart/ - -作者:[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]:https://access.redhat.com/labs/kickstartconfig/ -[2]:http://www.tecmint.com/multiple-centos-installations-using-kickstart/ diff --git a/translated/tech/RHCSA/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md b/translated/tech/RHCSA/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md new file mode 100644 index 0000000000..25102ad8f9 --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md @@ -0,0 +1,142 @@ +RHCSA 系列: 使用 ‘Kickstart’完成 RHEL 7 的自动化安装 – Part 12 +================================================================================ +无论是在数据中心还是实验室环境,Linux 服务器很少是独立的机子,很可能有时你不得不安装多个以某种方式相互联系的机子。假如你将在单个服务器上手动安装 RHEL 7 所花的时间乘以你需要配置的机子个数,则这将导致你必须做出一场相当长的努力,而通过使用被称为 kicksta 的无人值守安装工具则可以避免这样的麻烦。 + +在这篇文章中,我们将向你展示使用 kickstart 工具时所需的一切,以便在安装过程中,不用你时不时地照看“处在襁褓中”的服务器。 + +![RHEL 7 的自动化 Kickstart 安装](http://www.tecmint.com/wp-content/uploads/2015/05/Automatic-Kickstart-Installation-of-RHEL-7.jpg) + +RHCSA: RHEL 7 的自动化 Kickstart 安装 + +#### Kickstart 和自动化安装简介 #### + +Kickstart 是一种被用来执行无人值守操作系统安装和配置的自动化安装方法,主要被 RHEL(和其他 Fedora 的副产品,如 CentOS,Oracle Linux 等)所使用。因此,kickstart 安装方法可使得系统管理员只需考虑需要安装的软件包组和系统的配置,便可以得到相同的系统,从而省去必须手动安装这些软件包的麻烦。 + +### 准备一次 Kickstart 安装 ### + +要执行一次 kickstart 安装,我们需要遵循下面的这些步骤: + +1. 创建一个 Kickstart 文件,它是一个带有多个预定义配置选项的纯文本文件。 + +2. 使得 Kickstart 文件在可移动介质上可得,如一个硬盘或一个网络位置。客户端将使用 `rhel-server-7.0-x86_64-boot.iso` 镜像文件,而你还需要使得完全的 ISO 镜像(`rhel-server-7.0-x86_64-dvd.iso`)可从一个网络资源上获取得到,例如通过一个 FTP 服务器的 HTTP(在我们当前的例子中,我们将使用另一个 IP 地址为 192.168.0.18 的 RHEL 7 机子)。 + +3. 开始 Kickstart 安装。 + +为创建一个 kickstart 文件,请登陆你的红帽客户门户网站帐户,并使用 [Kickstart 配置工具][1] 来选择所需的安装选项。在向下滑动之前请仔细阅读每个选项,然后选择最适合你需求的选项: + +![Kickstart 配置工具](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-Configuration-Tool.png) + +Kickstart 配置工具 + +假如你指定安装将通过 HTTP,FTP,NFS 来执行,请确保服务器上的防火墙允许这些服务通过。 + +尽管你可以使用红帽的在线工具来创建一个 kickstart 文件,但你还可以使用下面的代码来作为参考手动地创建它。例如,你可以注意到,下面的代码指定了安装过程将使用英语环境,使用拉丁美洲键盘布局,并设定时区为 America/Argentina/San_Luis 时区: + + lang en_US + keyboard la-latin1 + timezone America/Argentina/San_Luis --isUtc + rootpw $1$5sOtDvRo$In4KTmX7OmcOW9HUvWtfn0 --iscrypted + #platform x86, AMD64, or Intel EM64T + text + url --url=http://192.168.0.18//kickstart/media + bootloader --location=mbr --append="rhgb quiet crashkernel=auto" + zerombr + clearpart --all --initlabel + autopart + auth --passalgo=sha512 --useshadow + selinux --enforcing + firewall --enabled + firstboot --disable + %packages + @base + @backup-server + @print-server + %end + +在上面的在线配置工具中,在选择以 HTTP 来作为安装源后,设置好在安装过程中使用 192.168.0.18 来作为 HTTP 服务器的地址,`/kickstart/tecmint.bin` 作为 HTTP 目录。 + +在上面的 kickstart 示例文件中,你需要特别注意 + + url --url=http://192.168.0.18//kickstart/media + +这个目录是你解压 DVD 或 ISO 安装介质的地方。在执行解压之前,我们将把 ISO 安装文件作为一个回环设备挂载到 /media/rhel 目录下: + + # mount -o loop /var/www/html/kickstart/rhel-server-7.0-x86_64-dvd.iso /media/rhel + +![挂载 RHEL ISO 镜像](http://www.tecmint.com/wp-content/uploads/2015/05/Mount-RHEL-ISO-Image.png) + +挂载 RHEL ISO 镜像 + +接下来,复制 /media/rhel 中的全部文件到 /var/www/html/kickstart/media 目录: + + # cp -R /media/rhel /var/www/html/kickstart/media + +这一步做完后,/var/www/html/kickstart/media 目录中的文件列表和磁盘使用情况将如下所示: + +![Kickstart 媒体文件](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-media-Files.png) + +Kickstart 媒体文件 + +现在,我们已经准备好开始 kickstart 安装了。 + +不管你如何选择创建 kickstart 文件的方式,在执行安装之前检查这个文件的语法总是一个不错的主意。为此,我们需要安装 pykickstart 软件包。 + + # yum update && yum install pykickstart + +然后使用 ksvalidator 工具来检查这个文件: + + # ksvalidator /var/www/html/kickstart/tecmint.bin + +假如文件中的语法正确,你将不会得到任何输出,反之,假如文件中存在错误,你得到警告,向你提示在某一行中语法不正确或出错原因未知。 + +### 执行一次 Kickstart 安装 ### + +首先,使用 rhel-server-7.0-x86_64-boot.iso 来启动你的客户端。当初始屏幕出现时,选择安装 RHEL 7.0 ,然后按 Tab 键来追加下面这一句,接着按 Enter 键: + + # inst.ks=http://192.168.0.18/kickstart/tecmint.bin + +![RHEL Kickstart 安装](http://www.tecmint.com/wp-content/uploads/2015/05/RHEL-Kickstart-Installation.png) + +RHEL Kickstart 安装 + +其中 tecmint.bin 是先前创建的 kickstart 文件。 + +当你按了 Enter 键后,自动安装就开始了,且你将看到一个列有正在被安装的软件的列表(软件包的数目和名称根据你所选择的程序和软件包组而有所不同): + +![RHEL 7 的自动化 Kickstart 安装](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-Automatic-Installation.png) + +RHEL 7 的自动化 Kickstart 安装 + +当自动化过程结束后,将提示你移除安装介质,接着你就可以启动到你新安装的系统中了: + +![RHEL 7 启动屏幕](http://www.tecmint.com/wp-content/uploads/2015/05/RHEL-7.png) + +RHEL 7 启动屏幕 + +尽管你可以像我们前面提到的那样,手动地创建你的 kickstart 文件,但你应该尽可能地考虑使用受推荐的方式:你可以使用在线配置工具,或者使用在安装过程中创建的位于 root 家目录下的 anaconda-ks.cfg 文件。 + +这个文件实际上就是一个 kickstart 文件,所以你或许想在选择好所有所需的选项(可能需要更改逻辑卷布局或机子上所用的文件系统)后手动地安装第一个机子,接着使用产生的 anaconda-ks.cfg 文件来自动完成其余机子的安装过程。 + +另外,使用在线配置工具或 anaconda-ks.cfg 文件来引导将来的安装将允许你使用一个加密的 root 密码来执行系统的安装。 + +### 总结 ### + +既然你知道了如何创建 kickstart 文件并如何使用它们来自动完成 RHEL 7 服务器的安装,你就可以忘记时时照看安装进度的过程了。这将给你时间来做其他的事情,或者若你足够幸运,你还可以用来休闲一番。 + +无论以何种方式,请使用下面的评论栏来让我们知晓你对这篇文章的看法。提问也同样欢迎! + +另外,请阅读:[使用 PXE 和 kickstart 来自动化安装多个 RHEL/CentOS 7 发行版本][2] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/automatic-rhel-installations-using-kickstart/ + +作者:[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]:https://access.redhat.com/labs/kickstartconfig/ +[2]:http://www.tecmint.com/multiple-centos-installations-using-kickstart/ From 3c041e32c40f4c6f7faf663c448d49ae234ac9a6 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Wed, 9 Sep 2015 17:47:24 +0800 Subject: [PATCH 2023/2517] Update RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...datory Access Control Essentials with SELinux in RHEL 7.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md index 1a0d08df8f..8d014dcc2e 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md @@ -1,3 +1,5 @@ +FSSlc translating + RHCSA Series: Mandatory Access Control Essentials with SELinux in RHEL 7 – Part 13 ================================================================================ During this series we have explored in detail at least two access control methods: standard ugo/rwx permissions ([Manage Users and Groups – Part 3][1]) and access control lists ([Configure ACL’s on File Systems – Part 7][2]). @@ -173,4 +175,4 @@ via: http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ [2]:http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/ [3]:http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network-services-in-rhel-7/ [4]:https://www.nsa.gov/research/selinux/index.shtml -[5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/SELinux_Users_and_Administrators_Guide/part_I-SELinux.html \ No newline at end of file +[5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/SELinux_Users_and_Administrators_Guide/part_I-SELinux.html From 5c72d9096c46ebe86dfe59efcb8a9eb9a45d7cbd Mon Sep 17 00:00:00 2001 From: Yu Ye Date: Wed, 9 Sep 2015 18:22:24 +0800 Subject: [PATCH 2024/2517] Delete 20150826 Five Super Cool Open Source Games.md --- ...50826 Five Super Cool Open Source Games.md | 66 ------------------- 1 file changed, 66 deletions(-) delete mode 100644 sources/share/20150826 Five Super Cool Open Source Games.md diff --git a/sources/share/20150826 Five Super Cool Open Source Games.md b/sources/share/20150826 Five Super Cool Open Source Games.md deleted file mode 100644 index 0d3d3c8bfd..0000000000 --- a/sources/share/20150826 Five Super Cool Open Source Games.md +++ /dev/null @@ -1,66 +0,0 @@ -Translating by H-mudcup -Five Super Cool Open Source Games -================================================================================ -In 2014 and 2015, Linux became home to a list of popular commercial titles such as the popular Borderlands, Witcher, Dead Island, and Counter Strike series of games. While this is exciting news, what of the gamer on a budget? Commercial titles are good, but even better are free-to-play alternatives made by developers who know what players like. - -Some time ago, I came across a three year old YouTube video with the ever optimistic title [5 Open Source Games that Don’t Suck][1]. Although the video praises some open source games, I’d prefer to approach the subject with a bit more enthusiasm, at least as far as the title goes. So, here’s my list of five super cool open source games. - -### Tux Racer ### - -![Tux Racer](http://fossforce.com/wp-content/uploads/2015/08/tuxracer-550x413.jpg) - -Tux Racer - -[Tux Racer][2] is the first game on this list because I’ve had plenty of experience with it. On a [recent trip to Mexico][3] that my brother and I took with [Kids on Computers][4], Tux Racer was one of the games that kids and teachers alike enjoyed. In this game, players use the Linux mascot, the penguin Tux, to race on downhill ski slopes in time trials in which players challenge their own personal bests. Currently there’s no multiplayer version available, but that could be subject to change. Available for Linux, OS X, Windows, and Android. - -### Warsow ### - -![Warsow](http://fossforce.com/wp-content/uploads/2015/08/warsow-550x413.jpg) - -Warsow - -The [Warsow][5] website explains: “Set in a futuristic cartoonish world, Warsow is a completely free fast-paced first-person shooter (FPS) for Windows, Linux and Mac OS X. Warsow is the Art of Respect and Sportsmanship Over the Web.” I was reluctant to include games from the FPS genre on this list, because many have played games in this genre, but I was amused by Warsow. It prioritizes lots of movement and the game is fast paced with a set of eight weapons to start with. The cartoonish style makes playing feel less serious and more casual, something for friends and family to play together. However, it boasts competitive play, and when I experienced the game I found there were, indeed, some expert players around. Available for Linux, Windows and OS X. - -### M.A.R.S – A ridiculous shooter ### - -![M.A.R.S. - A ridiculous shooter](http://fossforce.com/wp-content/uploads/2015/08/MARS-screenshot-550x344.jpg) - -M.A.R.S. – A ridiculous shooter - -[M.A.R.S – A ridiculous shooter][6] is appealing because of it’s vibrant coloring and style. There is support for two players on the same keyboard, but an online multiplayer version is currently in the works — meaning plans to play with friends have to wait for now. Regardless, it’s an entertaining space shooter with a few different ships and weapons to play as. There are different shaped ships, ranging from shotguns, lasers, scattered shots and more (one of the random ships shot bubbles at my opponents, which was funny amid the chaotic gameplay). There are a few modes of play, such as the standard death match against opponents to score a certain limit or score high, along with other modes called Spaceball, Grave-itation Pit and Cannon Keep. Available for Linux, Windows and OS X. - -### Valyria Tear ### - -![Valyria Tear](http://fossforce.com/wp-content/uploads/2015/08/bronnan-jump-to-enemy-550x413.jpg) - -Valyria Tear - -[Valyria Tear][7] resembles many fan favorite role-playing games (RPGs) spanning the years. The story is set in the usual era of fantasy games, full of knights, kingdoms and wizardry, and follows the main character Bronann. The design team did great work in designing the world and gives players everything expected from the genre: hidden chests, random monster encounters, non-player character (NPC) interaction, and something no RPG would be complete without: grinding for experience on lower level slime monsters until you’re ready for the big bosses. When I gave it a try, time didn’t permit me to play too far into the campaign, but for those interested there is a ‘[Let’s Play][8]‘ series by YouTube user Yohann Ferriera. Available for Linux, Windows and OS X. - -### SuperTuxKart ### - -![SuperTuxKart](http://fossforce.com/wp-content/uploads/2015/08/hacienda_tux_antarctica-550x293.jpg) - -SuperTuxKart - -Last but not least is [SuperTuxKart][9], a clone of Mario Kart that is every bit as fun as the original. It started development around 2000-2004 as Tux Kart, but there were errors in its production which led to a cease in development for a few years. Since development picked up again in 2006, it’s been improving, with version 0.9 debuting four months ago. In the game, our old friend Tux starts in the role of Mario and a few other open source mascots. One recognizable face among them is Suzanne, the monkey mascot for Blender. The graphics are solid and gameplay is fluent. While online play is in the planning stages, split screen multiplayer action is available, with up to four players supported on a single computer. Available for Linux, Windows, OS X, AmigaOS 4, AROS and MorphOS. - --------------------------------------------------------------------------------- - -via: http://fossforce.com/2015/08/five-super-cool-open-source-games/ - -作者:Hunter Banks -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://www.youtube.com/watch?v=BEKVl-XtOP8 -[2]:http://tuxracer.sourceforge.net/download.html -[3]:http://fossforce.com/2015/07/banks-family-values-texas-linux-fest/ -[4]:http://www.kidsoncomputers.org/an-amazing-week-in-oaxaca -[5]:https://www.warsow.net/download -[6]:http://mars-game.sourceforge.net/ -[7]:http://valyriatear.blogspot.com/ -[8]:https://www.youtube.com/channel/UCQ5KrSk9EqcT_JixWY2RyMA -[9]:http://supertuxkart.sourceforge.net/ From a3d742ca44e570546154c23a383b69ad7bd6271c Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 9 Sep 2015 21:24:28 +0800 Subject: [PATCH 2025/2517] PUB:20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7 @geekpi --- ...TOP (IT Operational Portal) on CentOS 7.md | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md (83%) diff --git a/translated/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md b/published/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md similarity index 83% rename from translated/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md rename to published/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md index dd20493d77..a9adc3e68c 100644 --- a/translated/tech/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md +++ b/published/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md @@ -1,16 +1,17 @@ -如何在CentOS上安装iTOP(IT操作门户) +如何在 CentOS 7 上安装开源 ITIL 门户 iTOP ================================================================================ -iTOP简单来说是一个简单的基于网络的开源IT服务管理工具。它有所有的ITIL功能包括服务台、配置管理、事件管理、问题管理、更改管理和服务管理。iTOP依赖于Apache/IIS、MySQL和PHP,因此它可以运行在任何支持这些软件的操作系统中。因为iTOP是一个网络程序,因此你不必在用户的PC端任何客户端程序。一个简单的浏览器就足够每天的IT环境操作了。 + +iTOP是一个简单的基于Web的开源IT服务管理工具。它有所有的ITIL功能,包括服务台、配置管理、事件管理、问题管理、变更管理和服务管理。iTOP依赖于Apache/IIS、MySQL和PHP,因此它可以运行在任何支持这些软件的操作系统中。因为iTOP是一个Web程序,因此你不必在用户的PC端任何客户端程序。一个简单的浏览器就足够每天的IT环境操作了。 我们要在一台有满足基本需求的LAMP环境的CentOS 7上安装和配置iTOP。 ### 下载 iTOP ### -iTOP的下载包现在在SOurceForge上,我们可以从这获取它的官方[链接][1]。 +iTOP的下载包现在在SourceForge上,我们可以从这获取它的官方[链接][1]。 ![itop download](http://blog.linoxide.com/wp-content/uploads/2015/07/1-itop-download.png) -我们从这里的连接用wget命令获取压缩文件 +我们从这里的连接用wget命令获取压缩文件。 [root@centos-007 ~]# wget http://downloads.sourceforge.net/project/itop/itop/2.1.0/iTop-2.1.0-2127.zip @@ -40,7 +41,7 @@ iTOP的下载包现在在SOurceForge上,我们可以从这获取它的官方[ installation.xml itop-change-mgmt-itil itop-incident-mgmt-itil itop-request-mgmt-itil itop-tickets itop-attachments itop-config itop-knownerror-mgmt itop-service-mgmt itop-virtualization-mgmt -在解压的目录下,通过不同的数据模型用复制命令迁移需要的扩展从datamodels复制到web扩展目录下。 +在解压的目录下,使用如下的 cp 命令将不同的数据模型从web 下的 datamodels 目录下复制到 extensions 目录,来迁移需要的扩展。 [root@centos-7 2.x]# pwd /var/www/html/itop/web/datamodels/2.x @@ -50,19 +51,19 @@ iTOP的下载包现在在SOurceForge上,我们可以从这获取它的官方[ 大多数服务端设置和配置已经完成了。最后我们安装web界面来完成安装。 -打开浏览器使用ip地址或者FQDN来访问WordPress web目录。 +打开浏览器使用ip地址或者完整域名来访问iTop 的 web目录。 http://servers_ip_address/itop/web/ 你会被重定向到iTOP的web安装页面。让我们按照要求配置,就像在这篇教程中做的那样。 -#### 先决要求验证 #### +#### 验证先决要求 #### 这一步你就会看到验证完成的欢迎界面。如果你看到了一些警告信息,你需要先安装这些软件来解决这些问题。 ![mcrypt missing](http://blog.linoxide.com/wp-content/uploads/2015/07/2-itop-web-install.png) -这一步一个叫php mcrypt的可选包丢失了。下载下面的rpm包接着尝试安装php mcrypt包。 +这一步有一个叫php mcrypt的可选包丢失了。下载下面的rpm包接着尝试安装php mcrypt包。 [root@centos-7 ~]#yum localinstall php-mcrypt-5.3.3-1.el6.x86_64.rpm libmcrypt-2.5.8-9.el6.x86_64.rpm. @@ -76,7 +77,7 @@ iTOP的下载包现在在SOurceForge上,我们可以从这获取它的官方[ #### iTop 许可协议 #### -勾选同意iTOP所有组件的许可协议并点击“NEXT”。 +勾选接受 iTOP所有组件的许可协议,并点击“NEXT”。 ![License Agreement](http://blog.linoxide.com/wp-content/uploads/2015/07/4.png) @@ -94,7 +95,7 @@ iTOP的下载包现在在SOurceForge上,我们可以从这获取它的官方[ #### 杂项参数 #### -让我们选择额外的参数来选择你是否需要安装一个演示内容或者使用全新的数据库,接着下一步。 +让我们选择额外的参数来选择你是否需要安装一个带有演示内容的数据库或者使用全新的数据库,接着下一步。 ![Misc Parameters](http://blog.linoxide.com/wp-content/uploads/2015/07/7.png) @@ -118,7 +119,7 @@ iTOP的下载包现在在SOurceForge上,我们可以从这获取它的官方[ #### 改变管理选项 #### -选择不同的ticket类型以便管理可用选项中的IT设备更改。我们选择ITTL更改管理选项。 +选择不同的ticket类型以便管理可用选项中的IT设备变更。我们选择ITTL变更管理选项。 ![ITIL Change](http://blog.linoxide.com/wp-content/uploads/2015/07/11.png) @@ -166,7 +167,7 @@ via: http://linoxide.com/tools/setup-itop-centos-7/ 作者:[Kashif Siddique][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 4c81fb6b8fc58ca6d035d8f55c113cd31fe40074 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Wed, 9 Sep 2015 21:54:49 +0800 Subject: [PATCH 2026/2517] translating wi-cuckoo --- ...w to Download Install and Configure Plank Dock in Ubuntu.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index 4f0a5f9ea1..2ebefa9297 100644 --- 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 @@ -1,3 +1,4 @@ +translating wi-cuckoo 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. @@ -63,4 +64,4 @@ via: https://www.maketecheasier.com/download-install-configure-plank-dock-ubuntu 本文由 [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 +[1]:https://launchpad.net/plank From 11d65975963636f0da80bff5b86f316a27d57b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Thu, 10 Sep 2015 04:49:24 +0800 Subject: [PATCH 2027/2517] Update RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md --- ...ks with Cron and Monitoring System Logs.md | 112 +++++++++--------- 1 file changed, 55 insertions(+), 57 deletions(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md b/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md index 307ec72515..180b8f8f2b 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md @@ -1,67 +1,67 @@ [xiqingongzi translating] -RHCSA Series: Yum Package Management, Automating Tasks with Cron and Monitoring System Logs – Part 10 +RHCSA Series: Yum 包管理, 自动任务计划和系统监控日志 – Part 10 ================================================================================ -In this article we will review how to install, update, and remove packages in Red Hat Enterprise Linux 7. We will also cover how to automate tasks using cron, and will finish this guide explaining how to locate and interpret system logs files with the focus of teaching you why all of these are essential skills for every system administrator. +在这篇文章中,我们将回顾如何在REHL7中安装,更新和删除软件包。我们还将介绍如何使用cron任务的自动化,并完成如何查找和监控系统日志文件以及为什么这些技能是系统管理员必备技能 ![Yum Package Management Cron Jobs Log Monitoring Linux](http://www.tecmint.com/wp-content/uploads/2015/05/Yum-Package-Management-Cron-Job-Log-Monitoring-Linux.jpg) -RHCSA: Yum Package Management, Cron Job Scheduling and Log Monitoring – Part 10 +RHCSA: Yum包管理, 任务计划和系统监控 – 第十章 -### Managing Packages Via Yum ### +### 使用yum 管理包 ### -To install a package along with all its dependencies that are not already installed, you will use: +要安装一个包以及所有尚未安装的依赖包,您可以使用: # yum -y install package_name(s) -Where package_name(s) represent at least one real package name. + package_name(s) 需要是一个存在的包名 -For example, to install httpd and mlocate (in that order), type. +例如,安装httpd和mlocate(按顺序),类型。 # yum -y install httpd mlocate -**Note**: That the letter y in the example above bypasses the confirmation prompts that yum presents before performing the actual download and installation of the requested programs. You can leave it out if you want. +**注意**: 字符y表示绕过执行下载和安装前的确认提示,如果需要,你可以删除它 -By default, yum will install the package with the architecture that matches the OS architecture, unless overridden by appending the package architecture to its name. +默认情况下,yum将安装与操作系统体系结构相匹配的包,除非通过在包名加入架构名 -For example, on a 64 bit system, yum install package will install the x86_64 version of package, whereas yum install package.x86 (if available) will install the 32-bit one. +例如,在64位系统上,使用yum安装包将安装包的x86_64版本,而package.x86 yum安装(如果有的话)将安装32位。 -There will be times when you want to install a package but don’t know its exact name. The search all or search options can search the currently enabled repositories for a certain keyword in the package name and/or in its description as well, respectively. +有时,你想安装一个包,但不知道它的确切名称。搜索可以在当前启用的存储库中去搜索包名称或在它的描述中搜索,并分别进行。 For example, # yum search log -will search the installed repositories for packages with the word log in their names and summaries, whereas +将搜索安装的软件包中名字与该词类似的软件,而 # yum search all log -will look for the same keyword in the package description and url fields as well. +也将在包描述和网址中寻找寻找相同的关键字 -Once the search returns a package listing, you may want to display further information about some of them before installing. That is when the info option will come in handy: +一旦搜索返回包列表,您可能希望在安装前显示一些信息。这时info选项派上用场: # yum info logwatch ![Search Package Information](http://www.tecmint.com/wp-content/uploads/2015/05/Search-Package-Information.png) -Search Package Information +搜索包信息 -You can regularly check for updates with the following command: +您可以定期用以下命令检查更新: # yum check-update -The above command will return all the installed packages for which an update is available. In the example shown in the image below, only rhel-7-server-rpms has an update available: +上述命令将返回可以更新的所有安装包。在下图所示的例子中,只有rhel-7-server-rpms有可用更新: ![Check For Package Updates](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-Updates.png) Check For Package Updates -You can then update that package alone with, +然后,您可以更新该包, # yum update rhel-7-server-rpms -If there are several packages that can be updated, yum update will update all of them at once. +如果有几个包,可以一同更新,yum update 将一次性更新所有的包 -Now what happens when you know the name of an executable, such as ps2pdf, but don’t know which package provides it? You can find out with `yum whatprovides “*/[executable]”`: +现在,当你知道一个可执行文件的名称,如ps2pdf,但不知道那个包提供了它?你可以通过 `yum whatprovides “*/[executable]”`找到: # yum whatprovides “*/ps2pdf” @@ -69,7 +69,7 @@ Now what happens when you know the name of an executable, such as ps2pdf, but do Find Package Belongs to Which Package -Now, when it comes to removing a package, you can do so with yum remove package. Easy, huh? This goes to show that yum is a complete and powerful package manager. +现在,当删除包时,你可以使用 yum remove Package ,很简单吧?Yum 是一个完整的强大的包管理器。 # yum remove httpd @@ -77,13 +77,12 @@ Read Also: [20 Yum Commands to Manage RHEL 7 Package Management][1] ### Good Old Plain RPM ### -RPM (aka RPM Package Manager, or originally RedHat Package Manager) can also be used to install or update packages when they come in form of standalone `.rpm` packages. - -It is often utilized with the `-Uvh` flags to indicate that it should install the package if it’s not already present or attempt to update it if it’s installed `(-U)`, producing a verbose output `(-v)` and a progress bar with hash marks `(-h)` while the operation is being performed. For example, +RPM(又名RPM包管理器,或原本RedHat软件包管理器)也可用于安装或更新软件包来当他们在独立`rpm`包装形式。 +往往使用`-Uvh` 表面这个包应该被安装而不是已存在或尝试更新。安装是`-U` ,显示详细输出用`-v`,显示进度条用`-h` 例如 # rpm -Uvh package.rpm -Another typical use of rpm is to produce a list of currently installed packages with code>rpm -qa (short for query all): +另一个典型的使用rpm 是产生一个列表,目前安装的软件包的code > rpm -qa(缩写查询所有) # rpm -qa @@ -95,23 +94,23 @@ Read Also: [20 RPM Commands to Install Packages in RHEL 7][2] ### Scheduling Tasks using Cron ### -Linux and other Unix-like operating systems include a tool called cron that allows you to schedule tasks (i.e. commands or shell scripts) to run on a periodic basis. Cron checks every minute the /var/spool/cron directory for files which are named after accounts in /etc/passwd. +Linux和UNIX类操作系统包括其他的工具称为Cron允许你安排任务(即命令或shell脚本)运行在周期性的基础上。每分钟定时检查/var/spool/cron目录中有在/etc/passwd帐户文件中指定名称的文件。 -When executing commands, any output is mailed to the owner of the crontab (or to the user specified in the MAILTO environment variable in the /etc/crontab, if it exists). +执行命令时,输出是发送到crontab的所有者(或者在/etc/crontab,在MailTO环境变量中指定的用户,如果它存在的话)。 -Crontab files (which are created by typing crontab -e and pressing Enter) have the following format: +crontab文件(这是通过键入crontab e和按Enter键创建)的格式如下: ![Crontab Entries](http://www.tecmint.com/wp-content/uploads/2015/05/Crontab-Format.png) Crontab Entries -Thus, if we want to update the local file database (which is used by locate to find files by name or pattern) every second day of the month at 2:15 am, we need to add the following crontab entry: +因此,如果我们想更新本地文件数据库(这是用于定位文件或图案)每个初二日上午2:15,我们需要添加以下crontab条目: 15 02 2 * * /bin/updatedb -The above crontab entry reads, “Run /bin/updatedb on the second day of the month, every month of the year, regardless of the day of the week, at 2:15 am”. As I’m sure you already guessed, the star symbol is used as a wildcard character. +以上的条目写着:”每年每月第二天的凌晨2:15运行 /bin/updatedb“ 无论是周几”,我想你也猜到了。星号作为通配符 -After adding a cron job, you can see that a file named root was added inside /var/spool/cron, as we mentioned earlier. That file lists all the tasks that the crond daemon should run: +添加一个cron作业后,你可以看到一个文件名为root被添加在/var/spool/cron,正如我们前面所提到的。该文件列出了所有的crond守护进程运行的任务: # ls -l /var/spool/cron @@ -119,74 +118,72 @@ After adding a cron job, you can see that a file named root was added inside /va Check All Cron Jobs -In the above image, the current user’s crontab can be displayed either using cat /var/spool/cron/root or, +在上图中,显示当前用户的crontab可以使用 cat /var/spool/cron 或 # crontab -l -If you need to run a task on a more fine-grained basis (for example, twice a day or three times each month), cron can also help you to do that. +如果你需要在一个更精细的时间上运行的任务(例如,一天两次或每月三次),cron也可以帮助你。 -For example, to run /my/script on the 1st and 15th of each month and send any output to /dev/null, you can add two crontab entries as follows: +例如,每个月1号和15号运行 /my/script 并将输出导出到 /dev/null,您可以添加如下两个crontab条目: 01 00 1 * * /myscript > /dev/null 2>&1 01 00 15 * * /my/script > /dev/null 2>&1 -But in order for the task to be easier to maintain, you can combine both entries into one: +不过为了简单,你可以将他们合并 01 00 1,15 * * /my/script > /dev/null 2>&1 - -Following the previous example, we can run /my/other/script at 1:30 am on the first day of the month every three months: +在前面的例子中,我们可以在每三个月的第一天的凌晨1:30运行 /my/other/script . 30 01 1 1,4,7,10 * /my/other/script > /dev/null 2>&1 -But when you have to repeat a certain task every “x” minutes, hours, days, or months, you can divide the right position by the desired frequency. The following crontab entry has the exact same meaning as the previous one: +但是当你必须每一个“十”分钟,数小时,数天或数月的重复某个任务时,你可以通过所需的频率来划分正确的时间。以下为前一个crontab条目具有相同的意义: 30 01 1 */3 * /my/other/script > /dev/null 2>&1 -Or perhaps you need to run a certain job on a fixed frequency or after the system boots, for example. You can use one of the following string instead of the five fields to indicate the exact time when you want your job to run: +或者也许你需要在一个固定的时间段或系统启动后运行某个固定的工作,例如。你可以使用下列五个字符串中的一个字符串来指示你想让你的任务计划工作的确切时间: - @reboot Run when the system boots. - @yearly Run once a year, same as 00 00 1 1 *. - @monthly Run once a month, same as 00 00 1 * *. - @weekly Run once a week, same as 00 00 * * 0. - @daily Run once a day, same as 00 00 * * *. - @hourly Run once an hour, same as 00 * * * *. + @reboot 仅系统启动时运行. + @yearly 一年一次, 类似与 00 00 1 1 *. + @monthly 一月一次, 类似与 00 00 1 * *. + @weekly 一周一次, 类似与 00 00 * * 0. + @daily 一天一次, 类似与 00 00 * * *. + @hourly 一小时一次, 类似与 00 * * * *. Read Also: [11 Commands to Schedule Cron Jobs in RHEL 7][3] -### Locating and Checking Logs ### +### 定位和查看日志### -System logs are located (and rotated) inside the /var/log directory. According to the Linux Filesystem Hierarchy Standard, this directory contains miscellaneous log files, which are written to it or an appropriate subdirectory (such as audit, httpd, or samba in the image below) by the corresponding daemons during system operation: +系统日志存放在 /var/log 目录.根据Linux的文件系统层次标准,这个目录包括各种日志文件,并包含一些必要的子目录(如 audit, httpd, 或 samba ,如下图),并由相应的系统守护进程操作 # ls /var/log ![Linux Log Files Location](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-Log-Files.png) -Linux Log Files Location +Linux 日志定位 -Other interesting logs are [dmesg][4] (contains all messages from kernel ring buffer), secure (logs connection attempts that require user authentication), messages (system-wide messages) and wtmp (records of all user logins and logouts). +其他有趣的日志比如 [dmesg][4](包括了所有内核缓冲区的信息),安全(用户认证尝试链接),信息(系统信息),和wtmp(记录了所有用户的登录登出) -Logs are very important in that they allow you to have a glimpse of what is going on at all times in your system, and what has happened in the past. They represent a priceless tool to troubleshoot and monitor a Linux server, and thus are often used with the `tail -f command` to display events, in real time, as they happen and are recorded in a log. +日志是非常重要的,他们让你可以看到是任何时刻发生在你的系统的事情,甚至是已经过去的事情。他们是无价的工具,解决和监测一个Linux服务器,并因此经常使用的 “tail -f command ”来实时显示正在发生并实时写入的事件。 -For example, if you want to display kernel-related events, type the following command: +举个例子,如果你想看你的内核的日志,你需要输入如下命令 # tail -f /var/log/dmesg -Same if you want to view access to your web server: +同样的,如果你想查看你的网络服务器日志,你需要输入如下命令 # tail -f /var/log/httpd/access.log -### Summary ### +### 总结 ### -If you know how to efficiently manage packages, schedule tasks, and where to look for information about the current and past operation of your system you can rest assure that you will not run into surprises very often. I hope this article has helped you learn or refresh your knowledge about these basic skills. - -Don’t hesitate to drop us a line using the contact form below if you have any questions or comments. +如果你知道如何有效的管理包,安排任务,以及知道在哪寻找系统当前和过去操作的信息,你可以放心你将不会总是有太多的惊喜。我希望这篇文章能够帮你学习或回顾这些基础知识。 +如果你有任何问题或意见,请使用下面的表格反馈给我们。 -------------------------------------------------------------------------------- via: http://www.tecmint.com/yum-package-management-cron-job-scheduling-monitoring-linux-logs/ 作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) +译者:[xiqingongzi](https://github.com/xiqingongzi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -196,3 +193,4 @@ via: http://www.tecmint.com/yum-package-management-cron-job-scheduling-monitorin [2]:http://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/ [3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ [4]:http://www.tecmint.com/dmesg-commands/ + From ce276ff0c7ea8a43320fd759944dec53d3a3a160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Thu, 10 Sep 2015 04:53:01 +0800 Subject: [PATCH 2028/2517] Update RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md --- ...asks with Cron and Monitoring System Logs.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md b/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md index 180b8f8f2b..3456361c0c 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md @@ -27,7 +27,7 @@ RHCSA: Yum包管理, 任务计划和系统监控 – 第十章 有时,你想安装一个包,但不知道它的确切名称。搜索可以在当前启用的存储库中去搜索包名称或在它的描述中搜索,并分别进行。 -For example, +比如, # yum search log @@ -52,8 +52,7 @@ For example, 上述命令将返回可以更新的所有安装包。在下图所示的例子中,只有rhel-7-server-rpms有可用更新: ![Check For Package Updates](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-Updates.png) - -Check For Package Updates +检查包更新 然后,您可以更新该包, @@ -67,7 +66,7 @@ Check For Package Updates ![Find Package Belongs to Which Package](http://www.tecmint.com/wp-content/uploads/2015/05/Find-Package-Information.png) -Find Package Belongs to Which Package +查找文件属于哪个包 现在,当删除包时,你可以使用 yum remove Package ,很简单吧?Yum 是一个完整的强大的包管理器。 @@ -75,7 +74,7 @@ Find Package Belongs to Which Package Read Also: [20 Yum Commands to Manage RHEL 7 Package Management][1] -### Good Old Plain RPM ### +### 文本式RPM工具 ### RPM(又名RPM包管理器,或原本RedHat软件包管理器)也可用于安装或更新软件包来当他们在独立`rpm`包装形式。 @@ -88,11 +87,11 @@ RPM(又名RPM包管理器,或原本RedHat软件包管理器)也可用于 ![Query All RPM Packages](http://www.tecmint.com/wp-content/uploads/2015/05/Query-All-RPM-Packages.png) -Query All RPM Packages +查询所有包 Read Also: [20 RPM Commands to Install Packages in RHEL 7][2] -### Scheduling Tasks using Cron ### +### Cron任务计划 ### Linux和UNIX类操作系统包括其他的工具称为Cron允许你安排任务(即命令或shell脚本)运行在周期性的基础上。每分钟定时检查/var/spool/cron目录中有在/etc/passwd帐户文件中指定名称的文件。 @@ -102,7 +101,7 @@ crontab文件(这是通过键入crontab e和按Enter键创建)的格式如 ![Crontab Entries](http://www.tecmint.com/wp-content/uploads/2015/05/Crontab-Format.png) -Crontab Entries +crontab条目 因此,如果我们想更新本地文件数据库(这是用于定位文件或图案)每个初二日上午2:15,我们需要添加以下crontab条目: @@ -116,7 +115,7 @@ Crontab Entries ![Check All Cron Jobs](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Cron-Jobs.png) -Check All Cron Jobs +检查所有cron工作 在上图中,显示当前用户的crontab可以使用 cat /var/spool/cron 或 From 9de303c7a85642e20d19139fc984d69e945e4a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Thu, 10 Sep 2015 04:53:24 +0800 Subject: [PATCH 2029/2517] Create RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md --- ...ks with Cron and Monitoring System Logs.md | 195 ++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md diff --git a/translated/tech/RHCSA/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md b/translated/tech/RHCSA/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md new file mode 100644 index 0000000000..3456361c0c --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md @@ -0,0 +1,195 @@ +[xiqingongzi translating] +RHCSA Series: Yum 包管理, 自动任务计划和系统监控日志 – Part 10 +================================================================================ +在这篇文章中,我们将回顾如何在REHL7中安装,更新和删除软件包。我们还将介绍如何使用cron任务的自动化,并完成如何查找和监控系统日志文件以及为什么这些技能是系统管理员必备技能 + +![Yum Package Management Cron Jobs Log Monitoring Linux](http://www.tecmint.com/wp-content/uploads/2015/05/Yum-Package-Management-Cron-Job-Log-Monitoring-Linux.jpg) + +RHCSA: Yum包管理, 任务计划和系统监控 – 第十章 + +### 使用yum 管理包 ### + +要安装一个包以及所有尚未安装的依赖包,您可以使用: + + # yum -y install package_name(s) + + package_name(s) 需要是一个存在的包名 + +例如,安装httpd和mlocate(按顺序),类型。 + + # yum -y install httpd mlocate + +**注意**: 字符y表示绕过执行下载和安装前的确认提示,如果需要,你可以删除它 + +默认情况下,yum将安装与操作系统体系结构相匹配的包,除非通过在包名加入架构名 + +例如,在64位系统上,使用yum安装包将安装包的x86_64版本,而package.x86 yum安装(如果有的话)将安装32位。 + +有时,你想安装一个包,但不知道它的确切名称。搜索可以在当前启用的存储库中去搜索包名称或在它的描述中搜索,并分别进行。 + +比如, + + # yum search log + +将搜索安装的软件包中名字与该词类似的软件,而 + + # yum search all log + +也将在包描述和网址中寻找寻找相同的关键字 + +一旦搜索返回包列表,您可能希望在安装前显示一些信息。这时info选项派上用场: + + # yum info logwatch + +![Search Package Information](http://www.tecmint.com/wp-content/uploads/2015/05/Search-Package-Information.png) + +搜索包信息 + +您可以定期用以下命令检查更新: + + # yum check-update + +上述命令将返回可以更新的所有安装包。在下图所示的例子中,只有rhel-7-server-rpms有可用更新: + +![Check For Package Updates](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-Updates.png) +检查包更新 + +然后,您可以更新该包, + + # yum update rhel-7-server-rpms + +如果有几个包,可以一同更新,yum update 将一次性更新所有的包 + +现在,当你知道一个可执行文件的名称,如ps2pdf,但不知道那个包提供了它?你可以通过 `yum whatprovides “*/[executable]”`找到: + + # yum whatprovides “*/ps2pdf” + +![Find Package Belongs to Which Package](http://www.tecmint.com/wp-content/uploads/2015/05/Find-Package-Information.png) + +查找文件属于哪个包 + +现在,当删除包时,你可以使用 yum remove Package ,很简单吧?Yum 是一个完整的强大的包管理器。 + + # yum remove httpd + +Read Also: [20 Yum Commands to Manage RHEL 7 Package Management][1] + +### 文本式RPM工具 ### + +RPM(又名RPM包管理器,或原本RedHat软件包管理器)也可用于安装或更新软件包来当他们在独立`rpm`包装形式。 + +往往使用`-Uvh` 表面这个包应该被安装而不是已存在或尝试更新。安装是`-U` ,显示详细输出用`-v`,显示进度条用`-h` 例如 + # rpm -Uvh package.rpm + +另一个典型的使用rpm 是产生一个列表,目前安装的软件包的code > rpm -qa(缩写查询所有) + + # rpm -qa + +![Query All RPM Packages](http://www.tecmint.com/wp-content/uploads/2015/05/Query-All-RPM-Packages.png) + +查询所有包 + +Read Also: [20 RPM Commands to Install Packages in RHEL 7][2] + +### Cron任务计划 ### + +Linux和UNIX类操作系统包括其他的工具称为Cron允许你安排任务(即命令或shell脚本)运行在周期性的基础上。每分钟定时检查/var/spool/cron目录中有在/etc/passwd帐户文件中指定名称的文件。 + +执行命令时,输出是发送到crontab的所有者(或者在/etc/crontab,在MailTO环境变量中指定的用户,如果它存在的话)。 + +crontab文件(这是通过键入crontab e和按Enter键创建)的格式如下: + +![Crontab Entries](http://www.tecmint.com/wp-content/uploads/2015/05/Crontab-Format.png) + +crontab条目 + +因此,如果我们想更新本地文件数据库(这是用于定位文件或图案)每个初二日上午2:15,我们需要添加以下crontab条目: + + 15 02 2 * * /bin/updatedb + +以上的条目写着:”每年每月第二天的凌晨2:15运行 /bin/updatedb“ 无论是周几”,我想你也猜到了。星号作为通配符 + +添加一个cron作业后,你可以看到一个文件名为root被添加在/var/spool/cron,正如我们前面所提到的。该文件列出了所有的crond守护进程运行的任务: + + # ls -l /var/spool/cron + +![Check All Cron Jobs](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Cron-Jobs.png) + +检查所有cron工作 + +在上图中,显示当前用户的crontab可以使用 cat /var/spool/cron 或 + + # crontab -l + +如果你需要在一个更精细的时间上运行的任务(例如,一天两次或每月三次),cron也可以帮助你。 + +例如,每个月1号和15号运行 /my/script 并将输出导出到 /dev/null,您可以添加如下两个crontab条目: + + 01 00 1 * * /myscript > /dev/null 2>&1 + 01 00 15 * * /my/script > /dev/null 2>&1 + +不过为了简单,你可以将他们合并 + + 01 00 1,15 * * /my/script > /dev/null 2>&1 +在前面的例子中,我们可以在每三个月的第一天的凌晨1:30运行 /my/other/script . + + 30 01 1 1,4,7,10 * /my/other/script > /dev/null 2>&1 + +但是当你必须每一个“十”分钟,数小时,数天或数月的重复某个任务时,你可以通过所需的频率来划分正确的时间。以下为前一个crontab条目具有相同的意义: + + 30 01 1 */3 * /my/other/script > /dev/null 2>&1 + +或者也许你需要在一个固定的时间段或系统启动后运行某个固定的工作,例如。你可以使用下列五个字符串中的一个字符串来指示你想让你的任务计划工作的确切时间: + + @reboot 仅系统启动时运行. + @yearly 一年一次, 类似与 00 00 1 1 *. + @monthly 一月一次, 类似与 00 00 1 * *. + @weekly 一周一次, 类似与 00 00 * * 0. + @daily 一天一次, 类似与 00 00 * * *. + @hourly 一小时一次, 类似与 00 * * * *. + +Read Also: [11 Commands to Schedule Cron Jobs in RHEL 7][3] + +### 定位和查看日志### + +系统日志存放在 /var/log 目录.根据Linux的文件系统层次标准,这个目录包括各种日志文件,并包含一些必要的子目录(如 audit, httpd, 或 samba ,如下图),并由相应的系统守护进程操作 + + # ls /var/log + +![Linux Log Files Location](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-Log-Files.png) + +Linux 日志定位 + +其他有趣的日志比如 [dmesg][4](包括了所有内核缓冲区的信息),安全(用户认证尝试链接),信息(系统信息),和wtmp(记录了所有用户的登录登出) + +日志是非常重要的,他们让你可以看到是任何时刻发生在你的系统的事情,甚至是已经过去的事情。他们是无价的工具,解决和监测一个Linux服务器,并因此经常使用的 “tail -f command ”来实时显示正在发生并实时写入的事件。 + +举个例子,如果你想看你的内核的日志,你需要输入如下命令 + + # tail -f /var/log/dmesg + +同样的,如果你想查看你的网络服务器日志,你需要输入如下命令 + + # tail -f /var/log/httpd/access.log + +### 总结 ### + +如果你知道如何有效的管理包,安排任务,以及知道在哪寻找系统当前和过去操作的信息,你可以放心你将不会总是有太多的惊喜。我希望这篇文章能够帮你学习或回顾这些基础知识。 + +如果你有任何问题或意见,请使用下面的表格反馈给我们。 +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/yum-package-management-cron-job-scheduling-monitoring-linux-logs/ + +作者:[Gabriel Cánepa][a] +译者:[xiqingongzi](https://github.com/xiqingongzi) +校对:[校对者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/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[2]:http://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/ +[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ +[4]:http://www.tecmint.com/dmesg-commands/ + From f9c22b0115b4a5335ce83143939e722f1a92cdf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Thu, 10 Sep 2015 04:53:39 +0800 Subject: [PATCH 2030/2517] Delete RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md --- ...ks with Cron and Monitoring System Logs.md | 195 ------------------ 1 file changed, 195 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md b/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md deleted file mode 100644 index 3456361c0c..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md +++ /dev/null @@ -1,195 +0,0 @@ -[xiqingongzi translating] -RHCSA Series: Yum 包管理, 自动任务计划和系统监控日志 – Part 10 -================================================================================ -在这篇文章中,我们将回顾如何在REHL7中安装,更新和删除软件包。我们还将介绍如何使用cron任务的自动化,并完成如何查找和监控系统日志文件以及为什么这些技能是系统管理员必备技能 - -![Yum Package Management Cron Jobs Log Monitoring Linux](http://www.tecmint.com/wp-content/uploads/2015/05/Yum-Package-Management-Cron-Job-Log-Monitoring-Linux.jpg) - -RHCSA: Yum包管理, 任务计划和系统监控 – 第十章 - -### 使用yum 管理包 ### - -要安装一个包以及所有尚未安装的依赖包,您可以使用: - - # yum -y install package_name(s) - - package_name(s) 需要是一个存在的包名 - -例如,安装httpd和mlocate(按顺序),类型。 - - # yum -y install httpd mlocate - -**注意**: 字符y表示绕过执行下载和安装前的确认提示,如果需要,你可以删除它 - -默认情况下,yum将安装与操作系统体系结构相匹配的包,除非通过在包名加入架构名 - -例如,在64位系统上,使用yum安装包将安装包的x86_64版本,而package.x86 yum安装(如果有的话)将安装32位。 - -有时,你想安装一个包,但不知道它的确切名称。搜索可以在当前启用的存储库中去搜索包名称或在它的描述中搜索,并分别进行。 - -比如, - - # yum search log - -将搜索安装的软件包中名字与该词类似的软件,而 - - # yum search all log - -也将在包描述和网址中寻找寻找相同的关键字 - -一旦搜索返回包列表,您可能希望在安装前显示一些信息。这时info选项派上用场: - - # yum info logwatch - -![Search Package Information](http://www.tecmint.com/wp-content/uploads/2015/05/Search-Package-Information.png) - -搜索包信息 - -您可以定期用以下命令检查更新: - - # yum check-update - -上述命令将返回可以更新的所有安装包。在下图所示的例子中,只有rhel-7-server-rpms有可用更新: - -![Check For Package Updates](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-Updates.png) -检查包更新 - -然后,您可以更新该包, - - # yum update rhel-7-server-rpms - -如果有几个包,可以一同更新,yum update 将一次性更新所有的包 - -现在,当你知道一个可执行文件的名称,如ps2pdf,但不知道那个包提供了它?你可以通过 `yum whatprovides “*/[executable]”`找到: - - # yum whatprovides “*/ps2pdf” - -![Find Package Belongs to Which Package](http://www.tecmint.com/wp-content/uploads/2015/05/Find-Package-Information.png) - -查找文件属于哪个包 - -现在,当删除包时,你可以使用 yum remove Package ,很简单吧?Yum 是一个完整的强大的包管理器。 - - # yum remove httpd - -Read Also: [20 Yum Commands to Manage RHEL 7 Package Management][1] - -### 文本式RPM工具 ### - -RPM(又名RPM包管理器,或原本RedHat软件包管理器)也可用于安装或更新软件包来当他们在独立`rpm`包装形式。 - -往往使用`-Uvh` 表面这个包应该被安装而不是已存在或尝试更新。安装是`-U` ,显示详细输出用`-v`,显示进度条用`-h` 例如 - # rpm -Uvh package.rpm - -另一个典型的使用rpm 是产生一个列表,目前安装的软件包的code > rpm -qa(缩写查询所有) - - # rpm -qa - -![Query All RPM Packages](http://www.tecmint.com/wp-content/uploads/2015/05/Query-All-RPM-Packages.png) - -查询所有包 - -Read Also: [20 RPM Commands to Install Packages in RHEL 7][2] - -### Cron任务计划 ### - -Linux和UNIX类操作系统包括其他的工具称为Cron允许你安排任务(即命令或shell脚本)运行在周期性的基础上。每分钟定时检查/var/spool/cron目录中有在/etc/passwd帐户文件中指定名称的文件。 - -执行命令时,输出是发送到crontab的所有者(或者在/etc/crontab,在MailTO环境变量中指定的用户,如果它存在的话)。 - -crontab文件(这是通过键入crontab e和按Enter键创建)的格式如下: - -![Crontab Entries](http://www.tecmint.com/wp-content/uploads/2015/05/Crontab-Format.png) - -crontab条目 - -因此,如果我们想更新本地文件数据库(这是用于定位文件或图案)每个初二日上午2:15,我们需要添加以下crontab条目: - - 15 02 2 * * /bin/updatedb - -以上的条目写着:”每年每月第二天的凌晨2:15运行 /bin/updatedb“ 无论是周几”,我想你也猜到了。星号作为通配符 - -添加一个cron作业后,你可以看到一个文件名为root被添加在/var/spool/cron,正如我们前面所提到的。该文件列出了所有的crond守护进程运行的任务: - - # ls -l /var/spool/cron - -![Check All Cron Jobs](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Cron-Jobs.png) - -检查所有cron工作 - -在上图中,显示当前用户的crontab可以使用 cat /var/spool/cron 或 - - # crontab -l - -如果你需要在一个更精细的时间上运行的任务(例如,一天两次或每月三次),cron也可以帮助你。 - -例如,每个月1号和15号运行 /my/script 并将输出导出到 /dev/null,您可以添加如下两个crontab条目: - - 01 00 1 * * /myscript > /dev/null 2>&1 - 01 00 15 * * /my/script > /dev/null 2>&1 - -不过为了简单,你可以将他们合并 - - 01 00 1,15 * * /my/script > /dev/null 2>&1 -在前面的例子中,我们可以在每三个月的第一天的凌晨1:30运行 /my/other/script . - - 30 01 1 1,4,7,10 * /my/other/script > /dev/null 2>&1 - -但是当你必须每一个“十”分钟,数小时,数天或数月的重复某个任务时,你可以通过所需的频率来划分正确的时间。以下为前一个crontab条目具有相同的意义: - - 30 01 1 */3 * /my/other/script > /dev/null 2>&1 - -或者也许你需要在一个固定的时间段或系统启动后运行某个固定的工作,例如。你可以使用下列五个字符串中的一个字符串来指示你想让你的任务计划工作的确切时间: - - @reboot 仅系统启动时运行. - @yearly 一年一次, 类似与 00 00 1 1 *. - @monthly 一月一次, 类似与 00 00 1 * *. - @weekly 一周一次, 类似与 00 00 * * 0. - @daily 一天一次, 类似与 00 00 * * *. - @hourly 一小时一次, 类似与 00 * * * *. - -Read Also: [11 Commands to Schedule Cron Jobs in RHEL 7][3] - -### 定位和查看日志### - -系统日志存放在 /var/log 目录.根据Linux的文件系统层次标准,这个目录包括各种日志文件,并包含一些必要的子目录(如 audit, httpd, 或 samba ,如下图),并由相应的系统守护进程操作 - - # ls /var/log - -![Linux Log Files Location](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-Log-Files.png) - -Linux 日志定位 - -其他有趣的日志比如 [dmesg][4](包括了所有内核缓冲区的信息),安全(用户认证尝试链接),信息(系统信息),和wtmp(记录了所有用户的登录登出) - -日志是非常重要的,他们让你可以看到是任何时刻发生在你的系统的事情,甚至是已经过去的事情。他们是无价的工具,解决和监测一个Linux服务器,并因此经常使用的 “tail -f command ”来实时显示正在发生并实时写入的事件。 - -举个例子,如果你想看你的内核的日志,你需要输入如下命令 - - # tail -f /var/log/dmesg - -同样的,如果你想查看你的网络服务器日志,你需要输入如下命令 - - # tail -f /var/log/httpd/access.log - -### 总结 ### - -如果你知道如何有效的管理包,安排任务,以及知道在哪寻找系统当前和过去操作的信息,你可以放心你将不会总是有太多的惊喜。我希望这篇文章能够帮你学习或回顾这些基础知识。 - -如果你有任何问题或意见,请使用下面的表格反馈给我们。 --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/yum-package-management-cron-job-scheduling-monitoring-linux-logs/ - -作者:[Gabriel Cánepa][a] -译者:[xiqingongzi](https://github.com/xiqingongzi) -校对:[校对者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/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ -[2]:http://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/ -[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ -[4]:http://www.tecmint.com/dmesg-commands/ - From 08173b346e4c6b25a346c62ab9ea2e03bcb8b173 Mon Sep 17 00:00:00 2001 From: joeren Date: Thu, 10 Sep 2015 08:03:32 +0800 Subject: [PATCH 2031/2517] Update 20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md --- ...al and Statistical Uptime of System With tuptime Utility.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index d40f1b26af..4611471fa6 100644 --- 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 @@ -1,3 +1,4 @@ +Translating by GOLinux! 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: @@ -149,4 +150,4 @@ via: http://www.cyberciti.biz/hardware/howto-see-historical-statistical-uptime-o 本文由 [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 +[2]:http://www.cyberciti.biz/faq/debian-ubunut-linux-download-a-git-repository/ From f4532bfea9acccae2134a76d2c41612a861b9c8b Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 10 Sep 2015 08:36:09 +0800 Subject: [PATCH 2032/2517] [Translated]20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md --- ...l Uptime of System With tuptime Utility.md | 79 +++++++++---------- 1 file changed, 38 insertions(+), 41 deletions(-) rename {sources => translated}/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md (62%) diff --git a/sources/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md b/translated/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md similarity index 62% rename from sources/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md rename to translated/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md index 4611471fa6..0d242c0be2 100644 --- a/sources/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md +++ b/translated/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md @@ -1,15 +1,13 @@ -Translating by GOLinux! -Linux Server See the Historical and Statistical Uptime of System With tuptime Utility +使用tuptime工具查看Linux服务器系统历史开机时间统计 ================================================================================ -You can use the following tools to see how long system has been running on a Linux or Unix-like system: +你们可以使用下面的工具来查看Linux或者类Unix系统运行了多长时间: +- uptime : 告诉你服务器运行了多长的时间。 +- lastt : 显示重启和关机时间。 +- tuptime : 报告系统的历史运行时间和统计运行时间,这是指重启之间的运行时间。和uptime命令类似,不过输出结果更有意思。 -- 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): +你[可以使用下面的命令来获取Linux操作系统的上次重启和关机时间及日期][1](在OSX/类Unix系统上也可以用): ## Just show system reboot and shutdown date and time ### who -b @@ -21,28 +19,27 @@ You [can use the following commands to get the last reboot and shutdown time and 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 +图像01:用于找出服务器开机时间的多个Linux命令 -**Say hello to tuptime** +**跟tuptime问打个招呼吧** -The tuptime command line tool can report the following information on a Linux based system: +tuptime命令行工具可以报告基于Linux的系统上的下列信息: +1. 系统启动次数统计 +2. 注册首次启动时间(也就是安装时间) +1. 正常关机和意外关机统计 +1. 平均开机时间和故障停机时间 +1. 当前开机时间 +1. 首次启动以来的开机和故障停机率 +1. 累积系统开机时间、故障停机时间和合计 +1. 报告每次启动、开机时间、关机和故障停机时间 -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]: +输入[下面的命令来克隆git仓库到Linux系统中][2]: $ cd /tmp $ git clone https://github.com/rfrail3/tuptime.git @@ -50,45 +47,45 @@ Type the [following command to clone a git repo on a Linux operating system][2]: $ 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 +图像02:克隆git仓库 -Make sure you've Python v2.7 installed with sys, optparse, os, re, string, sqlite3, datetime, disutils, and locale modules. +确保你随sys,optparse,os,re,string,sqlite3,datetime,disutils安装了Python v2.7和本地模块。 -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): +或者,可以手工安装(根据基于systemd或非systemd的Linux的推荐方法): $ sudo cp /tmp/tuptime/latest/cron.d/tuptime /etc/cron.d/tuptime -If is a system with systemd, copy service file and enable it: +如果系统是systemd的,拷贝服务文件并启用: $ 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: +如果系统不是systemd的,拷贝初始化文件: $ 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 +图像03:tuptime工作中 -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 @@ -102,11 +99,11 @@ After kernel upgrade I rebooted the box and typed the same command again: 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 @@ -119,11 +116,11 @@ You can change date and time format as follows: 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 @@ -144,7 +141,7 @@ Enumerate each startup, uptime, shutdown and downtime: via: http://www.cyberciti.biz/hardware/howto-see-historical-statistical-uptime-on-linux-server/ 作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) +译者:[GOLinux](https://github.com/GOLinux) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 9495ad072c326d30571cdaacf25a4d1e19e1ca89 Mon Sep 17 00:00:00 2001 From: "Y.C.S.M" Date: Thu, 10 Sep 2015 09:26:38 +0800 Subject: [PATCH 2033/2517] Update 20150908 List Of 10 Funny Linux Commands.md translate as much as i can by using the working time --- sources/tech/20150908 List Of 10 Funny Linux Commands.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 f3acbe27d3..59464c6497 100644 --- a/sources/tech/20150908 List Of 10 Funny Linux Commands.md +++ b/sources/tech/20150908 List Of 10 Funny Linux Commands.md @@ -2,9 +2,9 @@ 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.** - +**在终端工作是一件很有趣的事情。今天,我们将会列举一些有趣得让你笑出来的Linux命令。 ### 1. rev ### - +创建一个文件,在文件里面输入几个单词,rev命令会将你写的东西反转输出到控制台。 Create a file, type some words in this file, rev command will dump all words written by you in reverse. # rev @@ -14,7 +14,7 @@ Create a file, type some words in this file, rev command will dump all words wri ![Selection_001](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0011.png) ### 2. fortune ### - +这个命令没有被默认安装,用apt-get命令安装它,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 @@ -22,7 +22,7 @@ This command is not install by default, install with apt-get and fortune will di ![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** 选项,他会限制一个句子的输出长度。 # fortune -s ![Selection_004](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0042.png) From 2dfca1426c8b5ce3aa24939ea65880a0c5f56cc2 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 10 Sep 2015 09:57:05 +0800 Subject: [PATCH 2034/2517] Delete 20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md --- ....9.0 Winamp-like Audio Player in Ubuntu.md | 73 ------------------- 1 file changed, 73 deletions(-) delete mode 100644 sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md 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 deleted file mode 100644 index 36e4c70d2c..0000000000 --- a/sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md +++ /dev/null @@ -1,73 +0,0 @@ -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) - -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 From dadfcc8755a02573b297e8459b6ecfe011373212 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 10 Sep 2015 09:58:22 +0800 Subject: [PATCH 2035/2517] Create 20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md --- ....9.0 Winamp-like Audio Player in Ubuntu.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md 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..ac07a04b85 --- /dev/null +++ b/sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md @@ -0,0 +1,72 @@ +在 Ubuntu 上安装 Qmmp 0.9.0 类似 Winamp 的音频播放器 +================================================================================ +![](http://ubuntuhandbook.org/wp-content/uploads/2015/01/qmmp-icon-simple.png) + +Qmmp,基于 Qt 的音频播放器,与 Winamp 或 xmms 的用户界面类似,现在最新版本是0.9.0。PPA 已经在 Ubuntu 15.10,Ubuntu 15.04,Ubuntu 14.04,Ubuntu 12.04 和其衍生物中已经更新了。 + +Qmmp 0.9.0 是一个较大的版本,有许多新的功能,有许多改进和新的转变。它添加了如下功能: + +- 音频-信道序列转换器; +- 9通道支持均衡器; +- 艺术家专辑标签支持; +- 异步排序; +- 通过文件的修改日期排​​序; +- 按艺术家专辑排序; +- 支持多专栏; +- 有隐藏踪迹长度功能; +- 不用修改 qmmp.pri 来禁用插件(仅在 qmake 中)功能 +- 记住播放列表滚动位置功能; +- 排除提示数据文件功能; +- 更改用户代理功能; +- 改变窗口标题功能; +- 复位字体功能; +- 恢复默认快捷键功能; +- 默认热键为“Rename List”功能; +- 功能禁用弹出的 GME 插件; +- 简单的用户界面(QSUI)有以下变化: + - 增加了多列表的支持; + - 增加了按艺术家专辑排序; + - 增加了按文件的修改日期进行排序; + - 增加了隐藏歌曲长度功能; + - 增加了默认热键为“Rename List”; + - 增加了“Save List”功能到标签菜单; + - 增加了复位字体功能; + - 增加了复位快捷键功能; + - 改进了状态栏; + +它还改进了播放列表的通知,播放列表容器,采样率转换器,cmake 构建脚本,标题格式,在 mpeg 插件中支持 ape 标签,fileops 插件,降低了 cpu 占用率,改变默认的皮肤(炫光)和分离播放列表。 + +![qmmp-090](http://ubuntuhandbook.org/wp-content/uploads/2015/09/qmmp-090.jpg) + +### 在 Ubuntu 中安装 Qmmp 0.9.0 : ### + +新版本已经制做了 PPA,适用于目前所有 Ubuntu 发行版和衍生版。 + +1. 添加 [Qmmp PPA][1]. + +从 Dash 中打开终端并启动应用,通过按 Ctrl+Alt+T 快捷键。当它打开时,运行命令: + + sudo add-apt-repository ppa:forkotov02/ppa + +![qmmp-ppa](http://ubuntuhandbook.org/wp-content/uploads/2015/09/qmmp-ppa.jpg) + +2. 在添加 PPA 后,通过更新软件来升级 Qmmp 播放器。刷新系统缓存,并通过以下命令安装软件: + + sudo apt-get update + + sudo apt-get install qmmp qmmp-plugin-pack + +就是这样。尽情享受吧! + +-------------------------------------------------------------------------------- + +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 From 9b132bfcf2a91464be11e399c880ba4a9412247b Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 10 Sep 2015 09:59:31 +0800 Subject: [PATCH 2036/2517] Update 20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md --- ...906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 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 ac07a04b85..76f479cb80 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 @@ -63,7 +63,7 @@ Qmmp 0.9.0 是一个较大的版本,有许多新的功能,有许多改进和 via: http://ubuntuhandbook.org/index.php/2015/09/qmmp-0-9-0-in-ubuntu/ 作者:[Ji m][a] -译者:[译者ID](https://github.com/译者ID) +译者:[strugglingyouth](https://github.com/strugglingyouth) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From cd6462772d5e052aa505209b8d16efecdb204315 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 10 Sep 2015 16:15:54 +0800 Subject: [PATCH 2037/2517] =?UTF-8?q?20150910-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e Free Software Foundation--30 years in.md | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 sources/talk/20150910 The Free Software Foundation--30 years in.md diff --git a/sources/talk/20150910 The Free Software Foundation--30 years in.md b/sources/talk/20150910 The Free Software Foundation--30 years in.md new file mode 100644 index 0000000000..f782b2e876 --- /dev/null +++ b/sources/talk/20150910 The Free Software Foundation--30 years in.md @@ -0,0 +1,149 @@ +The Free Software Foundation: 30 years in +================================================================================ +![](http://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc_general_openfield.png?itok=tcXpYeHi) + +Welcome back, folks, to a new Six Degrees column. As usual, please send your thoughts on this piece to the comment box and your suggestions for future columns to [my inbox][1]. + +Now, I have to be honest with you all, this column went a little differently than I expected. + +A few weeks ago when thinking what to write, I mused over the notion of a piece about the [Free Software Foundation][2] celebrating its 30 year anniversary and how relevant and important its work is in today's computing climate. + +To add some meat I figured I would interview [John Sullivan][3], executive director of the FSF. My plan was typical of many of my pieces: thread together an interesting narrative and quote pieces of the interview to give it color. + +Well, that all went out the window when John sent me a tremendously detailed, thoughtful, and descriptive interview. I decided therefore to present it in full as the main event, and to add some commentary throughout. Thus, this is quite a long column, but I think it paints a fascinating picture of a fascinating organization. I recommend you grab a cup of something delicious and settle in for a solid read. + +### The sands of change ### + +The Free Software Foundation was founded in 1985. To paint a picture of what computing was like back then, the [Amiga 1000][4] was released, C++ was becoming a dominant language, [Aldus PageMaker][5] was announced, and networking was just starting to grow. Oh, and that year [Careless Whisper][6] by Wham! was a major hit. + +Things have changed a lot in 30 years. Back in 1985 the FSF was primarily focused on building free pieces of software that were primarily useful to nerdy computer people. These days we have software, services, social networks, and more to consider. + +I first wanted to get a sense of what John feels are most prominent risks to software freedom today. + +"I think there's widespread agreement on the biggest risks for computer user freedom today, but maybe not on the names for them." + +"The first is what we might as well just call 'tiny computers everywhere.' The free software movement has succeeded to the point where laptops, desktops, and servers can run fully free operating systems doing anything users of proprietary systems can do. There are still a few holes, but they'll be closed. The challenge that remains in this area is to cut through the billion dollar marketing budgets and legal regimes working against us to actually get the systems into users hands." + +"However, we have a serious problem on the set of computers whose primary common trait is that they are very small. Even though a car is not especially small, the computers in it are, so I include that form factor in this category, along with phones, tablets, glasses, watches, and so on. While these computers often have a basis in free software—for example, using the kernel Linux along with other free software like Android or GNU—their primary uses are to run proprietary applications and be shims for services that replace local computing with computing done on a server over which the user has no control. Since these devices serve vital functions, with some being primary means of communication for huge populations, some sitting very close to our bodies and our actual vital functions, some bearing responsibility for our physical safety, it is imperative that they run fully free systems under their users' control. Right now, they don't." + +John feels the risk here is not just the platforms and form factors, but the services integrates into them. + +"The services many of these devices talk to are the second major threat we face. It does us little good booting into a free system if we do our actual work and entertainment on companies' servers running software we have no access to at all. The point of free software is that we can see, modify, and share code. The existence of those freedoms even for nontechnical users provides a shield that prevents companies from controlling us. None of these freedoms exist for users of Facebook or Salesforce or Google Docs. Even more worrisome, we see a trend where people are accepting proprietary restrictions imposed on their local machines in order to have access to certain services. Browsers—including Firefox—are now automatically installing a DRM plugin in order to appease Netflix and other video giants. We need to work harder at developing free software decentralized replacements for media distribution that can actually empower users, artists, and user-artists, and for other services as well. For Facebook we have GNU social, pump.io, Diaspora, Movim, and others. For Salesforce, we have CiviCRM. For Google Docs, we have Etherpad. For media, we have GNU MediaGoblin. But all of these projects need more help, and many services don't have any replacement contenders yet." + +It is interesting that John mentions finding free software equivalents for common applications and services today. The FSF maintains a list of "High Priority Projects" that are designed to fill this gap. Unfortunately the capabilities of these projects varies tremendously and in an age where social media is so prominent, the software is only part of the problem: the real challenge is getting people to use it. + +This all begs the question of where the FSF fit in today's modern computing world. I am a fan of the FSF. I think the work they do is valuable and I contribute financially to support it too. They are an important organization for building an open computing culture, but all organizations need to grow, adjust, and adapt, particularly ones in the technology space. + +I wanted to get a better sense of what the FSF is doing today that it wasn't doing at it's inception. + +"We're speaking to a much larger audience than we were 30 years ago, and to a much broader audience. It's no longer just hackers and developers and researchers that need to know about free software. Everyone using a computer does, and it's quickly becoming the case that everyone uses a computer." + +John went on to provide some examples of these efforts. + +"We're doing coordinated public advocacy campaigns on issues of concern to the free software movement. Earlier in our history, we expressed opinions on these things, and took action on a handful, but in the last ten years we've put more emphasis on formulating and carrying out coherent campaigns. We've made especially significant noise in the area of Digital Restrictions Management (DRM) with Defective by Design, which I believe played a role in getting iTunes music off DRM (now of course, Apple is bringing DRM back with Apple Music). We've made attractive and useful introductory materials for people new to free software, like our [User Liberation animated video][7] and our [Email Self-Defense Guide][8]. + +We're also endorsing hardware that [respects users' freedoms][9]. Hardware distributors whose devices have been certified by the FSF to contain and require only free software can display a logo saying so. Expanding the base of free software users and the free software movement has two parts: convincing people to care, and then making it possible for them to act on that. Through this initiative, we encourage manufacturers and distributors to do the right thing, and we make it easy for users who have started to care about free software to buy what they need without suffering through hours and hours of research. We've certified a home WiFi router, 3D printers, laptops, and USB WiFi adapters, with more on the way. + +We're collecting all of the free software we can find in our [Free Software Directory][10]. We still have a long way to go on this—we're at only about 15,500 packages right now, and we can imagine many improvements to the design and function of the site—but I think this resource has great potential for helping users find the free software they need, especially users who aren't yet using a full GNU/Linux system. With the dangers inherent in downloading random programs off the Internet, there is a definite need for a curated collection like this. It also happens to provide a wealth of machine-readable data of use to researchers. + +We're acting as the fiscal sponsor for several specific free software projects, enabling them to raise funds for development. Most of these projects are part of GNU (which we continue to provide many kinds of infrastructure for), but we also sponsor [Replicant][11], a fully free fork of Android designed to give users the free-est mobile devices currently possible. + +We're helping developers use free software licenses properly, and we're following up on complaints about companies that aren't following the terms of the GPL. We help them fix their mistakes and distribute properly. RMS was in fact doing similar work with the precursors of the GPL very early on, but it's now an ongoing part of our work. + +Most of the specific things the FSF does now it wasn't doing 30 years ago, but the vision is little changed from the original paperwork—we aim to create a world where everything users want to do on any computer can be done using free software; a world where users control their computers and not the other way around." + +### A cult of personality ### + +There is little doubt in anyone's minds about the value the FSF brings. As John just highlighted, its efforts span not just the creation and licensing of free software, but also recognizing, certifying, and advocating a culture of freedom in technology. + +The head of the FSF is the inimitable Richard M. Stallman, commonly referred to as RMS. + +RMS is a curious character. He has demonstrated an unbelievable level of commitment to his ideas, philosophy, and ethical devotion to freedom in software. + +While he is sometimes mocked online for his social awkwardness, be it things said in his speeches, his bizarre travel requirements, or other sometimes cringeworthy moments, RMS's perspectives on software and freedom are generally rock-solid. He takes a remarkably consistent approach to his perspectives and he is clearly a careful thinker about not just his own thoughts but the wider movement he is leading. My only criticism is that I think from time to time he somewhat over-eggs the pudding with the voracity of his words. But hey, given his importance in our world, I would rather take an extra egg than no pudding for anyone. O.K., I get that the whole pudding thing here was strained... + +So RMS is a key part of the FSF, but the organization is also much more than that. There are employees, a board, and many contributors. I was curious to see how much of a role RMS plays these days in the FSF. John shared this with me. + +"RMS is the FSF's President, and does that work without receiving a salary from the FSF. He continues his grueling global speaking schedule, advocating for free software and computer user freedom in dozens of countries each year. In the course of that, he meets with government officials as well as local activists connected with all varieties of social movements. He also raises funds for the FSF and inspires many people to volunteer." + +"In between engagements, he does deep thinking on issues facing the free software movement, and anticipates new challenges. Often this leads to new articles—he wrote a 3-part series for Wired earlier this year about free software and free hardware designs—or new ideas communicated to the FSF's staff as the basis for future projects." + +As we delved into the cult of personality, I wanted to tap John's perspectives on how wide the free software movement has grown. + +I remember being at the [Open Source Think Tank][12] (an event that brings together execs from various open source organizations) and there was a case study where attendees were asked to recommend license choice for a particular project. The vast majority of break-out groups recommended the Apache Software License (APL) over the GNU Public License (GPL). + +This stuck in my mind as since then I have noticed that many companies seem to have opted for open licenses other than the GPL. I was curious to see if John had noticed a trend towards the APL as opposed to the GPL. + +"Has there been? I'm not so sure. I gave a presentation at FOSDEM a few years ago called 'Is Copyleft Being Framed?' that showed some of the problems with the supposed data behind claims of shifts in license adoption. I'll be publishing an article soon on this, but here's some of the major problems: + + +- Free software license choices do not exist in a vacuum. The number of people choosing proprietary software licenses also needs to be considered in order to draw the kinds of conclusions that people want to draw. I find it much more likely that lax permissive license choices (such as the Apache License or 3-clause BSD) are trading off with proprietary license choices, rather than with the GPL. +- License counters often, ironically, don't publish the software they use to collect that data as free software. That means we can't inspect their methods or reproduce their results. Some people are now publishing the code they use, but certainly any that don't should be completely disregarded. Science has rules. +- What counts as a thing with a license? Are we really counting an app under the APL that makes funny noises as 1:1 with GNU Emacs under GPLv3? If not, how do we decide which things to treat as equals? Are we only looking at software that actually works? Are we making sure not to double- and triple- count programs that exist on multiple hosting sites, and what about ports for different OSes? + +The question is interesting to ponder, but every conclusion I've seen so far has been extremely premature in light of the actual data. I'd much rather see a survey of developers asking about why they chose particular licenses for their projects than any more of these attempts to programmatically ascertain the license of programs and then ascribe human intentions on to patterns in that data. + +Copyleft is as vital as it ever was. Permissively licensed software is still free software and on-face a good thing, but it is contingent and needs an accompanying strong social commitment to not incorporate it in proprietary software. If free software's major long-term impact is enabling businesses to more efficiently make products that restrict us, then we have achieved nothing for computer user freedom." + +### Rising to new challenges ### + +30 years is an impressive time for any organization to be around, and particularly one with such important goals that span so many different industries, professions, governments, and cultures. + +As I started to wrap up the interview I wanted to get a better sense of what the FSF's primary function is today, 30 years after the mission started. + +"I think the FSF is in a very interesting position of both being a steady rock and actively pushing the envelope." + +"We have core documents like the [Free Software Definition][13], the [GNU General Public License][14], and the [list we maintain of free and nonfree software licenses][15], which have been keystones in the construction of the world of free software we have today. People place a great deal of trust in us to stay true to the principles outlined in those documents, and to apply them correctly and wisely in our assessments of new products or practices in computing. In this role, we hold the ladder for others to climb. As a 501(c)(3) charity held legally accountable to the public interest, and about 85% funded by individuals, we have the right structure for this." + +"But we also push the envelope. We take on challenges that others say are too hard. I guess that means we also build ladders? Or maybe I should stop with the metaphors." + +While John may not be great with metaphors (like I am one to talk), the FSF is great at setting a mission and demonstrating a devout commitment to it. This mission starts with a belief that free software should be everywhere. + +"We are not satisfied with the idea that you can get a laptop that works with free software except for a few components. We're not satisfied that you can have a tablet that runs a lot of free software, and just uses proprietary software to communicate with networks and to accelerate video and to take pictures and to check in on your flight and to call an Über and to.. Well, we are happy about some such developments for sure, but we are also unhappy about the suggestion that we should be fully content with them. Any proprietary software on a system is both an injustice to the user and inherently a threat to users' security. These almost-free things can be stepping stones on the way to a free world, but only if we keep our feet moving." + +In the early years of the FSF, we actually had to get a free operating system written. This has now been done by GNU and Linux and many collaborators, although there is always more software to write and bugs to fix. So while the FSF does still sponsor free software development in specific areas, there are thankfully many other organizations also doing this." + +A key part of the challenge John is referring to is getting the right hardware into the hands of the right people. + +"What we have been focusing on now are the challenges I highlighted in the first question. We are in desperate need of hardware in several different areas that fully supports free software. We have been talking a lot at the FSF about what we can do to address this, and I expect us to be making some significant moves to both increase our support for some of the projects already out there—as we having been doing to some extent through our Respects Your Freedom certification program—and possibly to launch some projects of our own. The same goes for the network service problem. I think we need to tackle them together, because having full control over the mobile components has great potential for changing how we relate to services, and decentralizing more and more services will in turn shape the mobile components." + +I hope folks will support the FSF as we work to grow and tackle these challenges. Hardware is expensive and difficult, as is making usable, decentralized, federated replacements for network services. We're going to need the resources and creativity of a lot of people. But, 30 years ago, a community rallied around RMS and the concept of copyleft to write an entire operating system. I've spent my last 12 years at the FSF because I believe we can rise to the new challenges in the same way." + +### Final thoughts ### + +In reading John's thoughtful responses to my questions, and in knowing various FSF members, the one sense that resonates for me is the sheer level of passion that is alive and kicking in the FSF. This is not an organization that has got bored or disillusioned with its mission. Its passion and commitment is as voracious as it has ever been. + +While I don't always agree with the FSF and I sometimes think its approach is a little one-dimensional at times, I have been and will continue to be a huge fan and supporter of its work. The FSF represent the ethical heartbeat of much of the free software and open source work that happens across the world. It represents a world view that is pretty hard to the left, but I believe its passion and conviction helps to bring people further to the right a little closer to the left too. + +Sure, RMS can be odd, somewhat hardline, and a little sensational, but he is precisely the kind of leader that is valuable in a movement that encapsulates a mixture of technology, ethics, and culture. We need an RMS in much the same way we need a Torvalds, a Shuttleworth, a Whitehurst, and a Zemlin. These different people bring together mixture of perspectives that ultimately maps to technology that can be adaptable to almost any set of use cases, ethics, and ambitions. + +So, in closing, I want to thank the FSF for its tremendous efforts, and I wish the FSF and its fearless leaders, one Richard M. Stallman and one John Sullivan, another 30 years of fighting the good fight. Go get 'em! + +> This article is part of Jono Bacon's Six Degrees column, where he shares his thoughts and perspectives on culture, communities, and trends in open source. + +-------------------------------------------------------------------------------- + +via: http://opensource.com/business/15/9/free-software-foundation-30-years + +作者:[Jono Bacon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://opensource.com/users/jonobacon +[1]:Welcome back, folks, to a new Six Degrees column. As usual, please send your thoughts on this piece to the comment box and your suggestions for future columns to my inbox. +[2]:http://www.fsf.org/ +[3]:http://twitter.com/johns_fsf/ +[4]:https://en.wikipedia.org/wiki/Amiga_1000 +[5]:https://en.wikipedia.org/wiki/Adobe_PageMaker +[6]:https://www.youtube.com/watch?v=izGwDsrQ1eQ +[7]:http://fsf.org/ +[8]:http://emailselfdefense.fsf.org/ +[9]:http://fsf.org/ryf +[10]:http://directory.fsf.org/ +[11]:http://www.replicant.us/ +[12]:http://www.osthinktank.com/ +[13]:http://www.fsf.org/about/what-is-free-software +[14]:http://www.gnu.org/licenses/gpl-3.0.en.html +[15]:http://www.gnu.org/licenses/licenses.en.html \ No newline at end of file From 0382f3fb8e1e058f61bea6b1e5cf4f0134da21ef Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 10 Sep 2015 16:48:01 +0800 Subject: [PATCH 2038/2517] =?UTF-8?q?20150910-2=20=E9=80=89=E9=A2=98=20?= =?UTF-8?q?=E4=B8=8A=E7=99=BE=E4=B8=AA=E9=93=BE=E6=8E=A5=E7=9A=84=E5=B7=A8?= =?UTF-8?q?=E7=AF=87=E5=95=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... of the world's best living programmers.md | 389 ++++++++++++++++++ 1 file changed, 389 insertions(+) create mode 100644 sources/talk/20150909 Superclass--15 of the world's best living programmers.md diff --git a/sources/talk/20150909 Superclass--15 of the world's best living programmers.md b/sources/talk/20150909 Superclass--15 of the world's best living programmers.md new file mode 100644 index 0000000000..70a9803b10 --- /dev/null +++ b/sources/talk/20150909 Superclass--15 of the world's best living programmers.md @@ -0,0 +1,389 @@ +Superclass: 15 of the world’s best living programmers +================================================================================ +When developers discuss who the world’s top programmer is, these names tend to come up a lot. + +![](http://images.techhive.com/images/article/2015/09/superman-620x465-100611650-orig.jpg) + +Image courtesy [tom_bullock CC BY 2.0][1] + +It seems like there are lots of programmers out there these days, and lots of really good programmers. But which one is the very best? + +Even though there’s no way to really say who the best living programmer is, that hasn’t stopped developers from frequently kicking the topic around. ITworld has solicited input and scoured coder discussion forums to see if there was any consensus. As it turned out, a handful of names did frequently get mentioned in these discussions. + +Use the arrows above to read about 15 people commonly cited as the world’s best living programmer. + +![](http://images.techhive.com/images/article/2015/09/margaret_hamilton-620x465-100611764-orig.jpg) + +Image courtesy [NASA][2] + +### Margaret Hamilton ### + +**Main claim to fame: The brains behind Apollo’s flight control software** + +Credentials: As the Director of the Software Engineering Division at Charles Stark Draper Laboratory, she headed up the team which [designed and built][3] the on-board [flight control software for NASA’s Apollo][4] and Skylab missions. Based on her Apollo work, she later developed the [Universal Systems Language][5] and [Development Before the Fact][6] paradigm. Pioneered the concepts of [asynchronous software, priority scheduling, and ultra-reliable software design][7]. Coined the term “[software engineering][8].” Winner of the [Augusta Ada Lovelace Award][9] in 1986 and [NASA’s Exceptional Space Act Award in 2003][10]. + +Quotes: “Hamilton invented testing , she pretty much formalised Computer Engineering in the US.” [ford_beeblebrox][11] + +“I think before her (and without disrespect including Knuth) computer programming was (and to an extent remains) a branch of mathematics. However a flight control system for a spacecraft clearly moves programming into a different paradigm.” [Dan Allen][12] + +“... she originated the term ‘software engineering’ — and offered a great example of how to do it.” [David Hamilton][13] + +“What a badass” [Drukered][14] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_donald_knuth-620x465-100502872-orig.jpg) + +Image courtesy [vonguard CC BY-SA 2.0][15] + +### Donald Knuth ### + +**Main claim to fame: Author of The Art of Computer Programming** + +Credentials: Wrote the [definitive book on the theory of programming][16]. Created the TeX digital typesetting system. [First winner of the ACM’s Grace Murray Hopper Award][17] in 1971. Winner of the ACM’s [A. M. Turing][18] Award in 1974, the [National Medal of Science][19] in 1979 and the IEEE’s [John von Neumann Medal][20] in 1995. Named a [Fellow at the Computer History Museum][21] in 1998. + +Quotes: “... wrote The Art of Computer Programming which is probably the most comprehensive work on computer programming ever.” [Anonymous][22] + +“There is only one large computer program I have used in which there are to a decent approximation 0 bugs: Don Knuth's TeX. That's impressive.” [Jaap Weel][23] + +“Pretty awesome if you ask me.” [Mitch Rees-Jones][24] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_ken-thompson-620x465-100502874-orig.jpg) + +Image courtesy [Association for Computing Machinery][25] + +### Ken Thompson ### + +**Main claim to fame: Creator of Unix** + +Credentials: Co-creator, [along with Dennis Ritchie][26], of Unix. Creator of the [B programming language][27], the [UTF-8 character encoding scheme][28], the ed [text editor][29], and co-developer of the Go programming language. Co-winner (along with Ritchie) of the [A.M. Turing Award][30] in 1983, [IEEE Computer Pioneer Award][31] in 1994, and the [National Medal of Technology][32] in 1998. Inducted as a [fellow of the Computer History Museum][33] in 1997. + +Quotes: “... probably the most accomplished programmer ever. Unix kernel, Unix tools, world-champion chess program Belle, Plan 9, Go Language.” [Pete Prokopowicz][34] + +“Ken's contributions, more than anyone else I can think of, were fundamental and yet so practical and timeless they are still in daily use.“ [Jan Jannink][35] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_richard_stallman-620x465-100502868-orig.jpg) + +Image courtesy Jiel Beaumadier CC BY-SA 3.0 + +### Richard Stallman ### + +**Main claim to fame: Creator of Emacs, GCC** + +Credentials: Founded the [GNU Project][36] and created many of its core tools, such as [Emacs, GCC, GDB][37], and [GNU Make][38]. Also founded the [Free Software Foundation][39]. Winner of the ACM's [Grace Murray Hopper Award][40] in 1990 and the [EFF's Pioneer Award in 1998][41]. + +Quotes: “... there was the time when he single-handedly outcoded several of the best Lisp hackers around, in the Symbolics vs LMI fight.” [Srinivasan Krishnan][42] + +“Through his amazing mastery of programming and force of will, he created a whole sub-culture in programming and computers.” [Dan Dunay][43] + +“I might disagree on many things with the great man, but he is still one of the most important programmers, alive or dead” [Marko Poutiainen][44] + +“Try to imagine Linux without the prior work on the GNu project. Stallman's the bomb, yo.” [John Burnette][45] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_anders_hejlsberg-620x465-100502873-orig.jpg) + +Image courtesy [D.Begley CC BY 2.0][46] + +### Anders Hejlsberg ### + +**Main claim to fame: Creator of Turbo Pascal** + +Credentials: [The original author of what became Turbo Pascal][47], one of the most popular Pascal compilers and the first integrated development environment. Later, [led the building of Delphi][48], Turbo Pascal’s successor. [Chief designer and architect of C#][49]. Winner of [Dr. Dobb's Excellence in Programming Award][50] in 2001. + +Quotes: “He wrote the [Pascal] compiler in assembly language for both of the dominant PC operating systems of the day (DOS and CPM). It was designed to compile, link and run a program in seconds rather than minutes.” [Steve Wood][51] + +“I revere this guy - he created the development tools that were my favourite through three key periods along my path to becoming a professional software engineer.” [Stefan Kiryazov][52] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_doug_cutting-620x465-100502871-orig.jpg) + +Image courtesy [vonguard CC BY-SA 2.0][53] + +### Doug Cutting ### + +**Main claim to fame: Creator of Lucene** + +Credentials: [Developed the Lucene search engine, as well as Nutch][54], a web crawler, and [Hadoop][55], a set of tools for distributed processing of large data sets. A strong proponent of open-source (Lucene, Nutch and Hadoop are all open-source). Currently [a former director of the Apache Software Foundation][56]. + +Quotes: “... he is the same guy who has written an exceptional search framework(lucene/solr) and opened the big-data gateway to the world(hadoop).” [Rajesh Rao][57] + +“His creation/work on Lucene and Hadoop (among other projects) has created a tremendous amount of wealth and employment for folks in the world….” [Amit Nithianandan][58] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_sanjay_ghemawat-620x465-100502876-orig.jpg) + +Image courtesy [Association for Computing Machinery][59] + +### Sanjay Ghemawat ### + +**Main claim to fame: Key Google architect** + +Credentials: [Helped to design and implement some of Google’s large distributed systems][60], including MapReduce, BigTable, Spanner and Google File System. [Created Unix’s ical][61] calendaring system. Elected to the [National Academy of Engineering][62] in 2009. Winner of the [ACM-Infosys Foundation Award in the Computing Sciences][63] in 2012. + +Quote: “Jeff Dean's wingman.” [Ahmet Alp Balkan][64] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_jeff_dean-620x465-100502866-orig.jpg) + +Image courtesy [Google][65] + +### Jeff Dean ### + +**Main claim to fame: The brains behind Google search indexing** + +Credentials: Helped to design and implement [many of Google’s large-scale distributed systems][66], including website crawling, indexing and searching, AdSense, MapReduce, BigTable and Spanner. Elected to the [National Academy of Engineering][67] in 2009. 2012 winner of the ACM’s [SIGOPS Mark Weiser Award][68] and the [ACM-Infosys Foundation Award in the Computing Sciences][69]. + +Quotes: “... for bringing breakthroughs in data mining( GFS, Map and Reduce, Big Table ).” [Natu Lauchande][70] + +“... conceived, built, and deployed MapReduce and BigTable, among a bazillion other things” [Erik Goldman][71] + +![](http://images.techhive.com/images/article/2015/09/linus_torvalds-620x465-100611765-orig.jpg) + +Image courtesy [Krd CC BY-SA 4.0][72] + +### Linus Torvalds ### + +**Main claim to fame: Creator of Linux** + +Credentials: Created the [Linux kernel][73] and [Git][74], an open source version control system. Winner of numerous awards and honors, including the [EFF Pioneer Award][75] in 1998, the [British Computer Society’s Lovelace Medal][76] in 2000, the [Millenium Technology Prize][77] in 2012 and the [IEEE Computer Society’s Computer Pioneer Award][78] in 2014. Also inducted into the [Computer History Museum’s Hall of Fellows][79] in 2008 and the [Internet Hall of Fame][80] in 2012. + +Quotes: “To put into prospective what an achievement this is, he wrote the Linux kernel in a few years while the GNU Hurd (a GNU-developed kernel) has been under development for 25 years and has still yet to release a production-ready example.” [Erich Ficker][81] + +“Torvalds is probably the programmer's programmer.” [Dan Allen][82] + +“He's pretty darn good.” [Alok Tripathy][83] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_john_carmack-620x465-100502867-orig.jpg) + +Image courtesy [QuakeCon CC BY 2.0][84] + +### John Carmack ### + +**Main claim to fame: Creator of Doom** + +Credentials: Cofounded id Software and [created such influential FPS games][85] as Wolfenstein 3D, Doom and Quake. Pioneered such ground-breaking computer graphic techniques [adaptive tile refresh][86], [binary space partitioning][87], and surface caching. Inducted into the [Academy of Interactive Arts and Sciences Hall of Fame][88] in 2001, [won Emmy awards][89] in the Engineering & Technology category in 2007 and 2008, and given a lifetime achievement award by the [Game Developers Choice Awards][90] in 2010. + +Quotes: “He wrote his first rendering engine before he was 20 years old. The guy's a genius. I wish I were a quarter a programmer he is.” [Alex Dolinsky][91] + +“... Wolfenstein 3D, Doom and Quake were revolutionary at the time and have influenced a generation of game designers.” [dniblock][92] + +“He can write basically anything in a weekend....” [Greg Naughton][93] + +“He is the Mozart of computer coding….” [Chris Morris][94] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_fabrice_bellard-620x465-100502870-orig.jpg) + +Image courtesy [Duff][95] + +### Fabrice Bellard ### + +**Main claim to fame: Creator of QEMU** + +Credentials: Created a [variety of well-known open-source software programs][96], including QEMU, a platform for hardware emulation and virtualization, FFmpeg, for handling multimedia data, the Tiny C Compiler and LZEXE, an executable file compressor. [Winner of the Obfuscated C Code Contest][97] in 2000 and 2001 and the [Google-O'Reilly Open Source Award][98] in 2011. Former world record holder for [calculating the most number of digits in Pi][99]. + +Quotes: “I find Fabrice Bellard's work remarkable and impressive.” [raphinou][100] + +“Fabrice Bellard is the most productive programmer in the world....” [Pavan Yara][101] + +“Hes like the Nikola Tesla of sofware engineering.” [Michael Valladolid][102] + +“He's a prolific serial achiever since the 1980s.” M[ichael Biggins][103] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_jon_skeet-620x465-100502863-orig.jpg) + +Image courtesy [Craig Murphy CC BY 2.0][104] + +### Jon Skeet ### + +**Main claim to fame: Legendary Stack Overflow contributor** + +Credentials: Google engineer and author of [C# in Depth][105]. Holds [highest reputation score of all time on Stack Overflow][106], answering, on average, 390 questions per month. + +Quotes: “Jon Skeet doesn't need a debugger, he just stares down the bug until the code confesses” [Steven A. Lowe][107] + +“When Jon Skeet's code fails to compile the compiler apologises.” [Dan Dyer][108] + +“Jon Skeet's code doesn't follow a coding convention. It is the coding convention.” [Anonymous][109] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_image_adam_dangelo-620x465-100502875-orig.jpg) + +Image courtesy [Philip Neustrom CC BY 2.0][110] + +### Adam D'Angelo ### + +**Main claim to fame: Co-founder of Quora** + +Credentials: As an engineer at Facebook, [built initial infrastructure for its news feed][111]. Went on to become CTO and VP of engineering at Facebook, before leaving to co-found Quora. [Eighth place finisher at the USA Computing Olympiad][112] as a high school student in 2001. Member of [California Institute of Technology’s silver medal winning team][113] at the ACM International Collegiate Programming Contest in 2004. [Finalist in the Algorithm Coding Competition][114] of Topcoder Collegiate Challenge in 2005. + +Quotes: “An "All-Rounder" Programmer.” [Anonymous][115] + +"For every good thing I make he has like six." [Mark Zuckerberg][116] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_petr_mitrichev-620x465-100502869-orig.jpg) + +Image courtesy [Facebook][117] + +### Petr Mitrechev ### + +**Main claim to fame: One of the top competitive programmers of all time** + +Credentials: [Two-time gold medal winner][118] in the International Olympiad in Informatics (2000, 2002). In 2006, [won the Google Code Jam][119] and was also the [TopCoder Open Algorithm champion][120]. Also, two-time winner of the Facebook Hacker Cup ([2011][121], [2013][122]). At the time of this writing, [the second ranked algorithm competitor on TopCoder][123] (handle: Petr) and also [ranked second by Codeforces][124] + +Quote: “He is an idol in competitive programming even here in India…” [Kavish Dwivedi][125] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_gennady_korot-620x465-100502864-orig.jpg) + +Image courtesy [Ishandutta2007 CC BY-SA 3.0][126] + +### Gennady Korotkevich ### + +**Main claim to fame: Competitive programming prodigy** + +Credentials: Youngest participant ever (age 11) and [6 time gold medalist][127] (2007-2012) in the International Olympiad in Informatics. Part of [the winning team][128] at the ACM International Collegiate Programming Contest in 2013 and winner of the [2014 Facebook Hacker Cup][129]. At the time of this writing, [ranked first by Codeforces][130] (handle: Tourist) and [first among algorithm competitors by TopCoder][131]. + +Quotes: “A programming prodigy!” [Prateek Joshi][132] + +“Gennady is definitely amazing, and visible example of why I have a large development team in Belarus.” [Chris Howard][133] + +“Tourist is genius” [Nuka Shrinivas Rao][134] + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/2823547/enterprise-software/158256-superclass-14-of-the-world-s-best-living-programmers.html#slide1 + +作者:[Phil Johnson][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.itworld.com/author/Phil-Johnson/ +[1]:https://www.flickr.com/photos/tombullock/15713223772 +[2]:https://commons.wikimedia.org/wiki/File:Margaret_Hamilton_in_action.jpg +[3]:http://klabs.org/home_page/hamilton.htm +[4]:https://www.youtube.com/watch?v=DWcITjqZtpU&feature=youtu.be&t=3m12s +[5]:http://www.htius.com/Articles/r12ham.pdf +[6]:http://www.htius.com/Articles/Inside_DBTF.htm +[7]:http://www.nasa.gov/home/hqnews/2003/sep/HQ_03281_Hamilton_Honor.html +[8]:http://www.nasa.gov/50th/50th_magazine/scientists.html +[9]:https://books.google.com/books?id=JcmV0wfQEoYC&pg=PA321&lpg=PA321&dq=ada+lovelace+award+1986&source=bl&ots=qGdBKsUa3G&sig=bkTftPAhM1vZ_3VgPcv-38ggSNo&hl=en&sa=X&ved=0CDkQ6AEwBGoVChMI3paoxJHWxwIVA3I-Ch1whwPn#v=onepage&q=ada%20lovelace%20award%201986&f=false +[10]:http://history.nasa.gov/alsj/a11/a11Hamilton.html +[11]:https://www.reddit.com/r/pics/comments/2oyd1y/margaret_hamilton_with_her_code_lead_software/cmrswof +[12]:http://qr.ae/RFEZLk +[13]:http://qr.ae/RFEZUn +[14]:https://www.reddit.com/r/pics/comments/2oyd1y/margaret_hamilton_with_her_code_lead_software/cmrv9u9 +[15]:https://www.flickr.com/photos/44451574@N00/5347112697 +[16]:http://cs.stanford.edu/~uno/taocp.html +[17]:http://awards.acm.org/award_winners/knuth_1013846.cfm +[18]:http://amturing.acm.org/award_winners/knuth_1013846.cfm +[19]:http://www.nsf.gov/od/nms/recip_details.jsp?recip_id=198 +[20]:http://www.ieee.org/documents/von_neumann_rl.pdf +[21]:http://www.computerhistory.org/fellowawards/hall/bios/Donald,Knuth/ +[22]:http://www.quora.com/Who-are-the-best-programmers-in-Silicon-Valley-and-why/answers/3063 +[23]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Jaap-Weel +[24]:http://qr.ae/RFE94x +[25]:http://amturing.acm.org/photo/thompson_4588371.cfm +[26]:https://www.youtube.com/watch?v=JoVQTPbD6UY +[27]:https://www.bell-labs.com/usr/dmr/www/bintro.html +[28]:http://doc.cat-v.org/bell_labs/utf-8_history +[29]:http://c2.com/cgi/wiki?EdIsTheStandardTextEditor +[30]:http://amturing.acm.org/award_winners/thompson_4588371.cfm +[31]:http://www.computer.org/portal/web/awards/cp-thompson +[32]:http://www.uspto.gov/about/nmti/recipients/1998.jsp +[33]:http://www.computerhistory.org/fellowawards/hall/bios/Ken,Thompson/ +[34]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Pete-Prokopowicz-1 +[35]:http://qr.ae/RFEWBY +[36]:https://groups.google.com/forum/#!msg/net.unix-wizards/8twfRPM79u0/1xlglzrWrU0J +[37]:http://www.emacswiki.org/emacs/RichardStallman +[38]:https://www.gnu.org/gnu/thegnuproject.html +[39]:http://www.emacswiki.org/emacs/FreeSoftwareFoundation +[40]:http://awards.acm.org/award_winners/stallman_9380313.cfm +[41]:https://w2.eff.org/awards/pioneer/1998.php +[42]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Greg-Naughton/comment/4146397 +[43]:http://qr.ae/RFEaib +[44]:http://www.quora.com/Software-Engineering/Who-are-some-of-the-greatest-currently-active-software-architects-in-the-world/answer/Marko-Poutiainen +[45]:http://qr.ae/RFEUqp +[46]:https://www.flickr.com/photos/begley/2979906130 +[47]:http://www.taoyue.com/tutorials/pascal/history.html +[48]:http://c2.com/cgi/wiki?AndersHejlsberg +[49]:http://www.microsoft.com/about/technicalrecognition/anders-hejlsberg.aspx +[50]:http://www.drdobbs.com/windows/dr-dobbs-excellence-in-programming-award/184404602 +[51]:http://qr.ae/RFEZrv +[52]:http://www.quora.com/Software-Engineering/Who-are-some-of-the-greatest-currently-active-software-architects-in-the-world/answer/Stefan-Kiryazov +[53]:https://www.flickr.com/photos/vonguard/4076389963/ +[54]:http://www.wizards-of-os.org/archiv/sprecher/a_c/doug_cutting.html +[55]:http://hadoop.apache.org/ +[56]:https://www.linkedin.com/in/cutting +[57]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Shalin-Shekhar-Mangar/comment/2293071 +[58]:http://www.quora.com/Who-are-the-best-programmers-in-Silicon-Valley-and-why/answer/Amit-Nithianandan +[59]:http://awards.acm.org/award_winners/ghemawat_1482280.cfm +[60]:http://research.google.com/pubs/SanjayGhemawat.html +[61]:http://www.quora.com/Google/Who-is-Sanjay-Ghemawat +[62]:http://www8.nationalacademies.org/onpinews/newsitem.aspx?RecordID=02062009 +[63]:http://awards.acm.org/award_winners/ghemawat_1482280.cfm +[64]:http://www.quora.com/Google/Who-is-Sanjay-Ghemawat/answer/Ahmet-Alp-Balkan +[65]:http://research.google.com/people/jeff/index.html +[66]:http://research.google.com/people/jeff/index.html +[67]:http://www8.nationalacademies.org/onpinews/newsitem.aspx?RecordID=02062009 +[68]:http://news.cs.washington.edu/2012/10/10/uw-cse-ph-d-alum-jeff-dean-wins-2012-sigops-mark-weiser-award/ +[69]:http://awards.acm.org/award_winners/dean_2879385.cfm +[70]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Natu-Lauchande +[71]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Cosmin-Negruseri/comment/28399 +[72]:https://commons.wikimedia.org/wiki/File:LinuxCon_Europe_Linus_Torvalds_05.jpg +[73]:http://www.linuxfoundation.org/about/staff#torvalds +[74]:http://git-scm.com/book/en/Getting-Started-A-Short-History-of-Git +[75]:https://w2.eff.org/awards/pioneer/1998.php +[76]:http://www.bcs.org/content/ConWebDoc/14769 +[77]:http://www.zdnet.com/blog/open-source/linus-torvalds-wins-the-tech-equivalent-of-a-nobel-prize-the-millennium-technology-prize/10789 +[78]:http://www.computer.org/portal/web/pressroom/Linus-Torvalds-Named-Recipient-of-the-2014-IEEE-Computer-Society-Computer-Pioneer-Award +[79]:http://www.computerhistory.org/fellowawards/hall/bios/Linus,Torvalds/ +[80]:http://www.internethalloffame.org/inductees/linus-torvalds +[81]:http://qr.ae/RFEeeo +[82]:http://qr.ae/RFEZLk +[83]:http://www.quora.com/Software-Engineering/Who-are-some-of-the-greatest-currently-active-software-architects-in-the-world/answer/Alok-Tripathy-1 +[84]:https://www.flickr.com/photos/quakecon/9434713998 +[85]:http://doom.wikia.com/wiki/John_Carmack +[86]:http://thegamershub.net/2012/04/gaming-gods-john-carmack/ +[87]:http://www.shamusyoung.com/twentysidedtale/?p=4759 +[88]:http://www.interactive.org/special_awards/details.asp?idSpecialAwards=6 +[89]:http://www.itworld.com/article/2951105/it-management/a-fly-named-for-bill-gates-and-9-other-unusual-honors-for-tech-s-elite.html#slide8 +[90]:http://www.gamechoiceawards.com/archive/lifetime.html +[91]:http://qr.ae/RFEEgr +[92]:http://www.itworld.com/answers/topic/software/question/whos-best-living-programmer#comment-424562 +[93]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Greg-Naughton +[94]:http://money.cnn.com/2003/08/21/commentary/game_over/column_gaming/ +[95]:http://dufoli.wordpress.com/2007/06/23/ammmmaaaazing-night/ +[96]:http://bellard.org/ +[97]:http://www.ioccc.org/winners.html#B +[98]:http://www.oscon.com/oscon2011/public/schedule/detail/21161 +[99]:http://bellard.org/pi/pi2700e9/ +[100]:https://news.ycombinator.com/item?id=7850797 +[101]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Erik-Frey/comment/1718701 +[102]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Erik-Frey/comment/2454450 +[103]:http://qr.ae/RFEjhZ +[104]:https://www.flickr.com/photos/craigmurphy/4325516497 +[105]:http://www.amazon.co.uk/gp/product/1935182471?ie=UTF8&tag=developetutor-21&linkCode=as2&camp=1634&creative=19450&creativeASIN=1935182471 +[106]:http://stackexchange.com/leagues/1/alltime/stackoverflow +[107]:http://meta.stackexchange.com/a/9156 +[108]:http://meta.stackexchange.com/a/9138 +[109]:http://meta.stackexchange.com/a/9182 +[110]:https://www.flickr.com/photos/philipn/5326344032 +[111]:http://www.crunchbase.com/person/adam-d-angelo +[112]:http://www.exeter.edu/documents/Exeter_Bulletin/fall_01/oncampus.html +[113]:http://icpc.baylor.edu/community/results-2004 +[114]:https://www.topcoder.com/tc?module=Static&d1=pressroom&d2=pr_022205 +[115]:http://qr.ae/RFfOfe +[116]:http://www.businessinsider.com/in-new-alleged-ims-mark-zuckerberg-talks-about-adam-dangelo-2012-9#ixzz369FcQoLB +[117]:https://www.facebook.com/hackercup/photos/a.329665040399024.91563.133954286636768/553381194694073/?type=1 +[118]:http://stats.ioinformatics.org/people/1849 +[119]:http://googlepress.blogspot.com/2006/10/google-announces-winner-of-global-code_27.html +[120]:http://community.topcoder.com/tc?module=SimpleStats&c=coder_achievements&d1=statistics&d2=coderAchievements&cr=10574855 +[121]:https://www.facebook.com/notes/facebook-hacker-cup/facebook-hacker-cup-finals/208549245827651 +[122]:https://www.facebook.com/hackercup/photos/a.329665040399024.91563.133954286636768/553381194694073/?type=1 +[123]:http://community.topcoder.com/tc?module=AlgoRank +[124]:http://codeforces.com/ratings +[125]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Venkateswaran-Vicky/comment/1960855 +[126]:http://commons.wikimedia.org/wiki/File:Gennady_Korot.jpg +[127]:http://stats.ioinformatics.org/people/804 +[128]:http://icpc.baylor.edu/regionals/finder/world-finals-2013/standings +[129]:https://www.facebook.com/hackercup/posts/10152022955628845 +[130]:http://codeforces.com/ratings +[131]:http://community.topcoder.com/tc?module=AlgoRank +[132]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi +[133]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi/comment/4720779 +[134]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi/comment/4880549 \ No newline at end of file From 1d1e89a882157ae3e4de107bd999be943c55b7f5 Mon Sep 17 00:00:00 2001 From: Yu Ye Date: Thu, 10 Sep 2015 17:42:15 +0800 Subject: [PATCH 2039/2517] Update 20150901 5 best open source board games to play online.md --- .../20150901 5 best open source board games to play online.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150901 5 best open source board games to play online.md b/sources/share/20150901 5 best open source board games to play online.md index 505ca76f10..5df980d1db 100644 --- a/sources/share/20150901 5 best open source board games to play online.md +++ b/sources/share/20150901 5 best open source board games to play online.md @@ -1,3 +1,4 @@ +Translating by H-mudcup 5 best open source board games to play online ================================================================================ I have always had a fascination with board games, in part because they are a device of social interaction, they challenge the mind and, most importantly, they are great fun to play. In my misspent youth, myself and a group of friends gathered together to escape the horrors of the classroom, and indulge in a little escapism. The time provided an outlet for tension and rivalry. Board games help teach diplomacy, how to make and break alliances, bring families and friends together, and learn valuable lessons. @@ -191,4 +192,4 @@ via: http://www.linuxlinks.com/article/20150830011533893/BoardGames.html [2]:http://domination.sourceforge.net/ [3]:http://www.pychess.org/ [4]:http://sourceforge.net/projects/scrabble/ -[5]:http://www.gnubg.org/ \ No newline at end of file +[5]:http://www.gnubg.org/ From 43163c010b7ff07037e96e141098ad9eeb3a17c3 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 10 Sep 2015 20:21:02 +0800 Subject: [PATCH 2040/2517] PUB:20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop @strugglingyouth --- ...x Wireshark GUI freeze on Linux desktop.md | 25 +-- ...ow to Manage Users and Groups in RHEL 7.md | 162 ++++++++++-------- 2 files changed, 106 insertions(+), 81 deletions(-) rename {translated/tech => published}/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md (73%) diff --git a/translated/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md b/published/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md similarity index 73% rename from translated/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md rename to published/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md index 9db7231a68..a59a946857 100644 --- a/translated/tech/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md +++ b/published/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md @@ -1,14 +1,6 @@ - -Linux 有问必答--如何解决 Linux 桌面上的 Wireshark GUI 死机 +Linux 有问必答:如何解决 Linux 上的 Wireshark 界面僵死 ================================================================================ -> **问题**: 当我试图在 Ubuntu 上的 Wireshark 中打开一个 pre-recorded 数据包转储时,它的 UI 突然死机,在我发起 Wireshark 的终端出现了下面的错误和警告。我该如何解决这个问题? - -Wireshark 是一个基于 GUI 的数据包捕获和嗅探工具。该工具被网络管理员普遍使用,网络安全工程师或开发人员对于各种任务的 packet-level 网络分析是必需的,例如在网络故障,漏洞测试,应用程序调试,或逆向协议工程是必需的。 Wireshark 允许记录存活数据包,并通过便捷的图形用户界面浏览他们的协议首部和有效负荷。 - -![](https://farm1.staticflickr.com/722/20584224675_f4d7a59474_c.jpg) - -这是 Wireshark 的 UI,尤其是在 Ubuntu 桌面下运行,有时会挂起或冻结出现以下错误,而你是向上或向下滚动分组列表视图时,就开始加载一个 pre-recorded 包转储文件。 - +> **问题**: 当我试图在 Ubuntu 上的 Wireshark 中打开一个 pre-recorded 数据包转储时,它的界面突然死机,在我运行 Wireshark 的终端出现了下面的错误和警告。我该如何解决这个问题? (wireshark:3480): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GObject' (wireshark:3480): GLib-GObject-CRITICAL **: g_object_set_qdata_full: assertion 'G_IS_OBJECT (object)' failed @@ -22,6 +14,15 @@ Wireshark 是一个基于 GUI 的数据包捕获和嗅探工具。该工具被 (wireshark:3480): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed (wireshark:3480): Gtk-CRITICAL **: gtk_widget_set_name: assertion 'GTK_IS_WIDGET (widget)' failed + +Wireshark 是一个基于 GUI 的数据包捕获和嗅探工具。该工具被网络管理员普遍使用,网络安全工程师或开发人员对于各种任务的数据包级的网络分析是必需的,例如在网络故障,漏洞测试,应用程序调试,或逆向协议工程是必需的。 Wireshark 允许实时记录数据包,并通过便捷的图形用户界面浏览他们的协议首部和有效负荷。 + +![](https://farm1.staticflickr.com/722/20584224675_f4d7a59474_c.jpg) + +这是 Wireshark 的 UI,尤其是在 Ubuntu 桌面下运行时,当你向上或向下滚动分组列表视图时,或开始加载一个 pre-recorded 包转储文件时,有时会挂起或冻结,并出现以下错误。 + +![](https://farm1.staticflickr.com/589/20062177334_47c0f2aeae_c.jpg) + 显然,这个错误是由 Wireshark 和叠加滚动条之间的一些不兼容造成的,在最新的 Ubuntu 桌面还没有被解决(例如,Ubuntu 15.04 的桌面)。 一种避免 Wireshark 的 UI 卡死的办法就是 **暂时禁用叠加滚动条**。在 Wireshark 上有两种方法来禁用叠加滚动条,这取决于你在桌面上如何启动 Wireshark 的。 @@ -46,7 +47,7 @@ Wireshark 是一个基于 GUI 的数据包捕获和嗅探工具。该工具被 Exec=env LIBOVERLAY_SCROLLBAR=0 wireshark %f -虽然这种解决方法将有利于所有桌面用户的 system-wide,但它将无法升级 Wireshark。如果你想保留修改的 .desktop 文件,如下所示将它复制到你的主目录。 +虽然这种解决方法可以在系统级帮助到所有桌面用户,但升级 Wireshark 就没用了。如果你想保留修改的 .desktop 文件,如下所示将它复制到你的主目录。 $ cp /usr/share/applications/wireshark.desktop ~/.local/share/applications/ @@ -56,7 +57,7 @@ via: http://ask.xmodulo.com/fix-wireshark-gui-freeze-linux-desktop.html 作者:[Dan Nanni][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/RHCSA/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md b/translated/tech/RHCSA/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md index 1436621c4e..cbe4f0bdc6 100644 --- a/translated/tech/RHCSA/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md +++ b/translated/tech/RHCSA/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md @@ -1,71 +1,79 @@ -RHCSA 系列: 如何管理RHEL7的用户和组 – Part 3 +RHCSA 系列(三): 如何管理 RHEL7 的用户和组 ================================================================================ -和管理其他Linux服务器一样,管理一个 RHEL 7 服务器 要求你能够添加,修改,暂停或删除用户帐户,并且授予他们文件,目录,其他系统资源所必要的权限。 + +和管理其它Linux服务器一样,管理一个 RHEL 7 服务器要求你能够添加、修改、暂停或删除用户帐户,并且授予他们执行其分配的任务所需的文件、目录、其它系统资源所必要的权限。 + ![User and Group Management in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/User-and-Group-Management-in-Linux.png) -RHCSA: 用户和组管理 – Part 3 +*RHCSA: 用户和组管理 – Part 3* -### 管理用户帐户## +###管理用户帐户## -如果想要给RHEL 7 服务器添加账户,你需要以root用户执行如下两条命令 +如果想要给RHEL 7 服务器添加账户,你需要以root用户执行如下两条命令之一: # adduser [new_account] # useradd [new_account] 当添加新的用户帐户时,默认会执行下列操作。 -- 他/她 的主目录就会被创建(一般是"/home/用户名",除非你特别设置) -- 一些隐藏文件 如`.bash_logout`, `.bash_profile` 以及 `.bashrc` 会被复制到用户的主目录,并且会为用户的回话提供环境变量.你可以进一步查看他们的相关细节。 -- 会为您的账号添加一个邮件池目录 -- 会创建一个和用户名同样的组 +- 它/她的主目录就会被创建(一般是"/home/用户名",除非你特别设置) +- 一些隐藏文件 如`.bash_logout`, `.bash_profile` 以及 `.bashrc` 会被复制到用户的主目录,它们会为用户的回话提供环境变量。你可以进一步查看它们的相关细节。 +- 会为您的账号添加一个邮件池目录。 +- 会创建一个和用户名同样的组(LCTT 译注:除非你给新创建的用户指定了组)。 + +用户帐户的全部信息被保存在`/etc/passwd`文件。这个文件以如下格式保存了每一个系统帐户的所有信息(字段以“:”分割) -用户帐户的全部信息被保存在`/etc/passwd `文件。这个文件以如下格式保存了每一个系统帐户的所有信息(以:分割) [username]:[x]:[UID]:[GID]:[Comment]:[Home directory]:[Default shell] -- `[username]` 和`[Comment]` 是用于自我解释的 -- ‘x’表示帐户的密码保护(详细在`/etc/shadow`文件),就是我们用于登录的`[username]`. -- `[UID]` 和`[GID]`是用于显示`[username]` 的 用户认证和主用户组。 +- `[username]` 和`[Comment]` 其意自明,就是用户名和备注 +- 第二个‘x’表示帐户的启用了密码保护(记录在`/etc/shadow`文件),密码用于登录`[username]` +- `[UID]` 和`[GID]`是整数,它们表明了`[username]`的用户ID 和所属的主组ID -最后, +最后。 - `[Home directory]`显示`[username]`的主目录的绝对路径 - `[Default shell]` 是当用户登录系统后使用的默认shell -另外一个你必须要熟悉的重要的文件是存储组信息的`/etc/group`.因为和`/etc/passwd`类似,所以也是由:分割 +另外一个你必须要熟悉的重要的文件是存储组信息的`/etc/group`。和`/etc/passwd`类似,也是每行一个记录,字段由“:”分割 + [Group name]:[Group password]:[GID]:[Group members] - - - `[Group name]` 是组名 -- 这个组是否使用了密码 (如果是"X"意味着没有). +- 这个组是否使用了密码 (如果是"x"意味着没有) - `[GID]`: 和`/etc/passwd`中一样 -- `[Group members]`:用户列表,使用,隔开。里面包含组内的所有用户 +- `[Group members]`:用户列表,使用“,”隔开。里面包含组内的所有用户 + +添加过帐户后,任何时候你都可以通过 usermod 命令来修改用户账户信息,基本的语法如下: -添加过帐户后,任何时候你都可以通过 usermod 命令来修改用户战壕沟,基础的语法如下: # usermod [options] [username] 相关阅读 -- [15 ‘useradd’ Command Examples][1] -- [15 ‘usermod’ Command Examples][2] +- [15 ‘useradd’ 命令示例][1] +- [15 ‘usermod’ 命令示例][2] #### 示例1 : 设置帐户的过期时间 #### -如果你的公司有一些短期使用的帐户或者你相应帐户在有限时间内使用,你可以使用 `--expiredate` 参数 ,后加YYYY-MM-DD格式的日期。为了查看是否生效,你可以使用如下命令查看 +如果你的公司有一些短期使用的帐户或者你要在有限时间内授予访问,你可以使用 `--expiredate` 参数 ,后加YYYY-MM-DD 格式的日期。为了查看是否生效,你可以使用如下命令查看 + # chage -l [username] 帐户更新前后的变动如下图所示 + ![Change User Account Information](http://www.tecmint.com/wp-content/uploads/2015/03/Change-User-Account-Information.png) -修改用户信息 +*修改用户信息* #### 示例 2: 向组内追加用户 #### -除了创建用户时的主用户组,一个用户还能被添加到别的组。你需要使用 -aG或 -append -group 选项,后跟逗号分隔的组名 +除了创建用户时的主用户组,一个用户还能被添加到别的组。你需要使用 -aG或 -append -group 选项,后跟逗号分隔的组名。 + #### 示例 3: 修改用户主目录或默认Shell #### -如果因为一些原因,你需要修改默认的用户主目录(一般为 /home/用户名),你需要使用 -d 或 -home 参数,后跟绝对路径来修改主目录 -如果有用户想要使用其他的shell来取代bash(比如sh ),一般默认是bash .使用 usermod ,并使用 -shell 的参数,后加新的shell的路径 +如果因为一些原因,你需要修改默认的用户主目录(一般为 /home/用户名),你需要使用 -d 或 -home 参数,后跟绝对路径来修改主目录。 + +如果有用户想要使用其它的shell来取代默认的bash(比如zsh)。使用 usermod ,并使用 -shell 的参数,后加新的shell的路径。 + #### 示例 4: 展示组内的用户 #### 当把用户添加到组中后,你可以使用如下命令验证属于哪一个组 @@ -73,17 +81,17 @@ RHCSA: 用户和组管理 – Part 3 # groups [username] # id [username] -下面图片的演示了示例2到示例四 +下面图片的演示了示例2到示例4 ![Adding User to Supplementary Group](http://www.tecmint.com/wp-content/uploads/2015/03/Adding-User-to-Supplementary-Group.png) -添加用户到额外的组 +*添加用户到额外的组* 在上面的示例中: # usermod --append --groups gacanepa,users --home /tmp --shell /bin/sh tecmint -如果想要从组内删除用户,省略 `--append` 切换,并且可以使用 `--groups` 来列举组内的用户 +如果想要从组内删除用户,取消 `--append` 选项,并使用 `--groups` 和你要用户属于的组的列表。 #### 示例 5: 通过锁定密码来停用帐户 #### @@ -91,120 +99,136 @@ RHCSA: 用户和组管理 – Part 3 #### 示例 6: 解锁密码 #### -当你想要重新启用帐户让他可以继续登录时,属于 -u 或 –unlock 选项来解锁用户的密码,就像示例5 介绍的那样 +当你想要重新启用帐户让它可以继续登录时,使用 -u 或 –unlock 选项来解锁用户的密码,就像示例5 介绍的那样 # usermod --unlock tecmint -下面的图片展示了示例5和示例6 +下面的图片展示了示例5和示例6: ![Lock Unlock User Account](http://www.tecmint.com/wp-content/uploads/2015/03/Lock-Unlock-User-Account.png) -锁定上锁用户 +*锁定上锁用户* #### 示例 7:删除组和用户 #### -如果要删除一个组,你需要使用 groupdel ,如果需要删除用户 你需要使用 userdel (添加 -r 可以删除主目录和邮件池的内容) +如果要删除一个组,你需要使用 groupdel ,如果需要删除用户 你需要使用 userdel (添加 -r 可以删除主目录和邮件池的内容)。 + # groupdel [group_name] # 删除组 # userdel -r [user_name] # 删除用户,并删除主目录和邮件池 -如果一些文件属于组,他们将不会被删除。但是组拥有者将会被设置为删除掉的组的GID -### 列举,设置,并且修改 ugo/rwx 权限 ### +如果一些文件属于该组,删除组时它们不会也被删除。但是组拥有者的名字将会被设置为删除掉的组的GID。 -著名的 [ls 命令][3] 是管理员最好的助手. 当我们使用 -l 参数, 这个工具允许您查看一个目录中的内容(或详细格式). +### 列举,设置,并且修改标准 ugo/rwx 权限 ### + +著名的 [ls 命令][3] 是管理员最好的助手. 当我们使用 -l 参数, 这个工具允许您以长格式(或详细格式)查看一个目录中的内容。 + +而且,该命令还可以用于单个文件中。无论哪种方式,在“ls”输出中的前10个字符表示每个文件的属性。 -而且,该命令还可以应用于单个文件中。无论哪种方式,在“ls”输出中的前10个字符表示每个文件的属性。 这10个字符序列的第一个字符用于表示文件类型: - – (连字符): 一个标准文件 - d: 一个目录 - l: 一个符号链接 -- c: 字符设备(将数据作为字节流,即一个终端) -- b: 块设备(处理数据块,即存储设备) +- c: 字符设备(将数据作为字节流,例如终端) +- b: 块设备(以块的方式处理数据,例如存储设备) + +文件属性的接下来的九个字符,分为三个组,被称为文件模式,并注明读(r)、写(w)、和执行(x)权限授予文件的所有者、文件的所有组、和其它的用户(通常被称为“世界”)。 + +同文件上的读取权限允许文件被打开和读取一样,如果目录同时有执行权限时,就允许其目录内容被列出。此外,如果一个文件有执行权限,就允许它作为一个程序运行。 -文件属性的下一个九个字符,分为三个组,被称为文件模式,并注明读(r),写(w),并执行(x)授予文件的所有者,文件的所有组,和其他的用户(通常被称为“世界”)。 -在文件的读取权限允许打开和读取相同的权限时,允许其内容被列出,如果还设置了执行权限,还允许它作为一个程序和运行。 文件权限是通过chmod命令改变的,它的基本语法如下: # chmod [new_mode] file -new_mode是一个八进制数或表达式,用于指定新的权限。适合每一个随意的案例。或者您已经有了一个更好的方式来设置文件的权限,所以你觉得可以自由地使用最适合你自己的方法。 -八进制数可以基于二进制等效计算,可以从所需的文件权限的文件的所有者,所有组,和世界。一定权限的存在等于2的幂(R = 22,W = 21,x = 20),没有时意为0。例如: +new_mode 是一个八进制数或表达式,用于指定新的权限。随意试试各种权限看看是什么效果。或者您已经有了一个更好的方式来设置文件的权限,你也可以用你自己的方式自由地试试。 + +八进制数可以基于二进制等价计算,可以从所需的文件权限的文件的所有者、所有组、和世界组合成。每种权限都等于2的幂(R = 2\^2,W = 2\^1,x = 2\^0),没有时即为0。例如: + ![File Permissions](http://www.tecmint.com/wp-content/uploads/2015/03/File-Permissions.png) -文件权限 +*文件权限* 在八进制形式下设置文件的权限,如上图所示 # chmod 744 myfile -请用一分钟来对比一下我们以前的计算,在更改文件的权限后,我们的实际输出为: +请用马上来对比一下我们以前的计算,在更改文件的权限后,我们的实际输出为: ![Long List Format](http://www.tecmint.com/wp-content/uploads/2015/03/Long-List-Format.png) -长列表格式 +*长列表格式* #### 示例 8: 寻找777权限的文件 #### -出于安全考虑,你应该确保在正常情况下,尽可能避免777权限(读、写、执行的文件)。虽然我们会在以后的教程中教你如何更有效地找到所有的文件在您的系统的权限集的说明,你现在仍可以使用LS grep获取这种信息。 -在下面的例子,我们会寻找 /etc 目录下的777权限文件. 注意,我们要使用第二章讲到的管道的知识[第二章:文件和目录管理][4]: +出于安全考虑,你应该确保在正常情况下,尽可能避免777权限(任何人可读、可写、可执行的文件)。虽然我们会在以后的教程中教你如何更有效地找到您的系统的具有特定权限的全部文件,你现在仍可以组合使用ls 和 grep来获取这种信息。 + +在下面的例子,我们会寻找 /etc 目录下的777权限文件。注意,我们要使用[第二章:文件和目录管理][4]中讲到的管道的知识: # ls -l /etc | grep rwxrwxrwx ![Find All Files with 777 Permission](http://www.tecmint.com/wp-content/uploads/2015/03/Find-All-777-Files.png) -查找所有777权限的文件 +*查找所有777权限的文件* #### 示例 9: 为所有用户指定特定权限 #### shell脚本,以及一些二进制文件,所有用户都应该有权访问(不只是其相应的所有者和组),应该有相应的执行权限(我们会讨论特殊情况下的问题): + # chmod a+x script.sh -**注意**: 我们可以设置文件模式使用表示用户权限的字母如“u”,组所有者权限的字母“g”,其余的为o 。所有权限为a.权限可以通过`+` 或 `-` 来管理。 +**注意**: 我们可以使用表达式设置文件模式,表示用户权限的字母如“u”,组所有者权限的字母“g”,其余的为“o” ,同时具有所有权限为“a”。权限可以通过`+` 或 `-` 来授予和收回。 ![Set Execute Permission on File](http://www.tecmint.com/wp-content/uploads/2015/03/Set-Execute-Permission-on-File.png) -为文件设置执行权限 +*为文件设置执行权限* -长目录列表还显示了该文件的所有者和其在第一和第二列中的组主。此功能可作为系统中文件的第一级访问控制方法: +长目录列表还用两列显示了该文件的所有者和所有组。此功能可作为系统中文件的第一级访问控制方法: ![Check File Owner and Group](http://www.tecmint.com/wp-content/uploads/2015/03/Check-File-Owner-and-Group.png) -检查文件的属主和属组 +*检查文件的所有者和所有组* + +改变文件的所有者,您应该使用chown命令。请注意,您可以在同时或分别更改文件的所有组: -改变文件的所有者,您将使用chown命令。请注意,您可以在同一时间或单独的更改文件的所有权: # chown user:group file -虽然可以在同一时间更改用户或组,或在同一时间的两个属性,但是不要忘记冒号区分,如果你想要更新其他属性,让另外的选项保持空白: - # chown :group file # Change group ownership only - # chown user: file # Change user ownership only +你可以更改用户或组,或在同时更改两个属性,但是不要忘记冒号区分,如果你想要更新其它属性,让另外的部分为空: + + # chown :group file # 仅改变所有组 + # chown user: file # 仅改变所有者 #### 示例 10:从一个文件复制权限到另一个文件#### -If you would like to “clone” ownership from one file to another, you can do so using the –reference flag, as follows: + 如果你想“克隆”一个文件的所有权到另一个,你可以这样做,使用–reference参数,如下: + # chown --reference=ref_file file ref_file的所有信息会复制给 file ![Clone File Ownership](http://www.tecmint.com/wp-content/uploads/2015/03/Clone-File-Ownership.png) -复制文件属主信息 +*复制文件属主信息* ### 设置 SETGID 协作目录 ### -你应该授予在一个特定的目录中拥有访问所有的文件的权限给一个特点的用户组,你将有可能使用目录设置setgid的方法。当setgid后设置,真实用户的有效GID成为团队的主人。 -因此,任何用户都可以访问该文件的组所有者授予的权限的文件。此外,当setgid设置在一个目录中,新创建的文件继承同一组目录,和新创建的子目录也将继承父目录的setgid。 +假如你需要授予在一个特定的目录中拥有访问所有的文件的权限给一个特定的用户组,你有可能需要使用给目录设置setgid的方法。当setgid设置后,该真实用户的有效GID会变成属主的GID。 + +因此,任何访问该文件的用户会被授予该文件的属组的权限。此外,当setgid设置在一个目录中,新创建的文件继承组该目录的组,而且新创建的子目录也将继承父目录的setgid权限。 + # chmod g+s [filename] -为了设置 setgid 在八进制形式,预先准备好数字2 来给基本的权限 +要以八进制形式设置 setgid,需要在基本权限前缀以2。 + # chmod 2755 [directory] ### 总结 ### -扎实的用户和组管理知识,符合规则的,Linux权限管理,以及部分实践,可以帮你快速解决RHEL 7 服务器的文件权限。 -我向你保证,当你按照本文所概述的步骤和使用系统文档(和第一章解释的那样 [Part 1: Reviewing Essential Commands & System Documentation][5] of this series) 你将掌握基本的系统管理的能力。 +扎实的用户和组管理知识,以及标准和特殊的 Linux权限管理,通过实践,可以帮你快速解决 RHEL 7 服务器的文件权限问题。 -请随时让我们知道你是否有任何问题或意见使用下面的表格。 +我向你保证,当你按照本文所概述的步骤和使用系统文档(在本系列的[第一章 回顾基础命令及系统文档][5]中讲到), 你将掌握基本的系统管理的能力。 + +请随时使用下面的评论框让我们知道你是否有任何问题或意见。 -------------------------------------------------------------------------------- @@ -212,13 +236,13 @@ via: http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ 作者:[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/add-users-in-linux/ [2]:http://www.tecmint.com/usermod-command-examples/ -[3]:http://www.tecmint.com/ls-interview-questions/ -[4]:http://www.tecmint.com/file-and-directory-management-in-linux/ +[3]:http://linux.cn/article-5349-1.html +[4]:https://www.linux.cn/article-6155-1.html [5]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ From a5d6dc3c5efb7a1d9e1b3ee8211038e3fcccd240 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 10 Sep 2015 20:36:08 +0800 Subject: [PATCH 2041/2517] PUB:20150819 Linuxcon--The Changing Role of the Server OS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @bazz2 这篇翻译的不错! --- ...0150819 Linuxcon--The Changing Role of the Server OS.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename {translated/talk => published}/20150819 Linuxcon--The Changing Role of the Server OS.md (89%) diff --git a/translated/talk/20150819 Linuxcon--The Changing Role of the Server OS.md b/published/20150819 Linuxcon--The Changing Role of the Server OS.md similarity index 89% rename from translated/talk/20150819 Linuxcon--The Changing Role of the Server OS.md rename to published/20150819 Linuxcon--The Changing Role of the Server OS.md index 98a0f94b03..2c66635f89 100644 --- a/translated/talk/20150819 Linuxcon--The Changing Role of the Server OS.md +++ b/published/20150819 Linuxcon--The Changing Role of the Server OS.md @@ -1,6 +1,6 @@ LinuxCon: 服务器操作系统的转型 ================================================================================ -来自西雅图。容器迟早要改变世界,以及改变操作系统的角色。这是 Wim Coekaerts 带来的 LinuxCon 演讲主题,Coekaerts 是 Oracle 公司 Linux 与虚拟化工程的高级副总裁。 +西雅图报道。容器迟早要改变世界,以及改变操作系统的角色。这是 Wim Coekaerts 带来的 LinuxCon 演讲主题,Coekaerts 是 Oracle 公司 Linux 与虚拟化工程的高级副总裁。 ![](http://www.serverwatch.com/imagesvr_ce/6421/wim-200x150.jpg) @@ -8,7 +8,7 @@ Coekaerts 在开始演讲的时候拿出一张关于“桌面之年”的幻灯 “你需要操作系统做什么事情?”,Coekaerts 回答现场观众:“只需一件事:运行一个应用。操作系统负责管理硬件和资源,来让你的应用运行起来。” -Coakaerts 说在 Docker 容器的帮助下,我们的注意力再次集中在应用上,而在 Oracle,我们将注意力放在如何让应用更好地运行在操作系统上。 +Coakaerts 补充说,在 Docker 容器的帮助下,我们的注意力再次集中在应用上,而在 Oracle,我们将注意力放在如何让应用更好地运行在操作系统上。 “许多人过去常常需要繁琐地安装应用,而现在的年轻人只需要按一个按钮就能让应用在他们的移动设备上运行起来”。 @@ -20,7 +20,6 @@ Docker 的出现不代表虚拟机的淘汰,容器化过程需要经过很长 在这段时间内,容器会与虚拟机共存,并且我们需要一些工具,将应用在容器和虚拟机之间进行转换迁移。Coekaerts 举例说 Oracle 的 VirtualBox 就可以用来帮助用户运行 Docker,而它原来是被广泛用在桌面系统上的一项开源技术。现在 Docker 的 Kitematic 项目将在 Mac 上使用 VirtualBox 运行 Docker。 -### The Open Compute Initiative and Write Once, Deploy Anywhere for Containers ### ### 容器的开放计算计划和一次写随处部署 ### 一个能让容器成功的关键是“一次写,随处部署”的概念。而在容器之间的互操作领域,Linux 基金会的开放计算计划(OCI)扮演一个非常关键的角色。 @@ -43,7 +42,7 @@ via: http://www.serverwatch.com/server-news/linuxcon-the-changing-role-of-the-se 作者:[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 6312580f624e2742d77503f05204aa4879e34f2e Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 10 Sep 2015 20:43:33 +0800 Subject: [PATCH 2042/2517] PUB:20150824 Linux about to gain a new file system--bcachefs @bazz2 --- ...nux about to gain a new file system--bcachefs.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) rename {translated/talk => published}/20150824 Linux about to gain a new file system--bcachefs.md (53%) diff --git a/translated/talk/20150824 Linux about to gain a new file system--bcachefs.md b/published/20150824 Linux about to gain a new file system--bcachefs.md similarity index 53% rename from translated/talk/20150824 Linux about to gain a new file system--bcachefs.md rename to published/20150824 Linux about to gain a new file system--bcachefs.md index 4fe4bf8ff9..c7946e9fad 100644 --- a/translated/talk/20150824 Linux about to gain a new file system--bcachefs.md +++ b/published/20150824 Linux about to gain a new file system--bcachefs.md @@ -1,14 +1,15 @@ -Linux 界将出现一个新的文件系统:bcachefs +Linux 上将出现一个新的文件系统:bcachefs ================================================================================ -这个有 5 年历史,由 Kent Oberstreet 创建,过去属于谷歌的文件系统,最近完成了关键的组件。Bcachefs 文件系统自称其性能和稳定性与 ext4 和 xfs 相同,而其他方面的功能又可以与 btrfs 和 zfs 相媲美。主要特性包括校验、压缩、多设备支持、缓存、快照与其他好用的特性。 -Bcachefs 来自 **bcache**,这是一个块级缓存层,从 bcaceh 到一个功能完整的[写时复制][1]文件系统,堪称是一项质的转变。 +这个有 5 年历史,由 Kent Oberstreet 创建,过去属于谷歌的文件系统,最近完成了全部关键组件。Bcachefs 文件系统自称其性能和稳定性与 ext4 和 xfs 相同,而其他方面的功能又可以与 btrfs 和 zfs 相媲美。主要特性包括校验、压缩、多设备支持、缓存、快照与其他“漂亮”的特性。 -在自己提出问题“为什么要出一个新的文件系统”中,Kent Oberstreet 作了以下回答:当我还在谷歌的时候,我与其他在 bcache 上工作的同事在偶然的情况下意识到我们正在使用的东西可以成为一个成熟文件系统的功能块,我们可以用 bcache 创建一个拥有干净而优雅设计的文件系统,而最重要的一点是,bcachefs 的主要目的就是在性能和稳定性上能与 ext4 和 xfs 匹敌,同时拥有 btrfs 和 zfs 的特性。 +Bcachefs 来自 **bcache**,这是一个块级缓存层。从 bcaceh 到一个功能完整的[写时复制][1]文件系统,堪称是一项质的转变。 + +对自己的问题“为什么要出一个新的文件系统”中,Kent Oberstreet 自问自答道:当我还在谷歌的时候,我与其他在 bcache 上工作的同事在偶然的情况下意识到我们正在使用的东西可以成为一个成熟文件系统的功能块,我们可以用 bcache 创建一个拥有干净而优雅设计的文件系统,而最重要的一点是,bcachefs 的主要目的就是在性能和稳定性上能与 ext4 和 xfs 匹敌,同时拥有 btrfs 和 zfs 的特性。 Overstreet 邀请人们在自己的系统上测试 bcachefs,可以通过邮件列表[通告]获取 bcachefs 的操作指南。 -Linux 生态系统中文件系统几乎处于一家独大状态,Fedora 在第 16 版的时候就想用 btrfs 换掉 ext4 作为其默认文件系统,但是到现在(LCTT:都出到 Fedora 22 了)还在使用 ext4。而几乎所有 Debian 系的发行版(Ubuntu、Mint、elementary OS 等)也使用 ext4 作为默认文件系统,并且这些主流的发生版都没有替换默认文件系统的意思。 +Linux 生态系统中文件系统几乎处于一家独大状态,Fedora 在第 16 版的时候就想用 btrfs 换掉 ext4 作为其默认文件系统,但是到现在(LCTT:都出到 Fedora 22 了)还在使用 ext4。而几乎所有 Debian 系的发行版(Ubuntu、Mint、elementary OS 等)也使用 ext4 作为默认文件系统,并且这些主流的发行版都没有替换默认文件系统的意思。 -------------------------------------------------------------------------------- @@ -16,7 +17,7 @@ via: http://www.linuxveda.com/2015/08/22/linux-gain-new-file-system-bcachefs/ 作者:[Paul Hill][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 e2b356ccaff44bb682184e970bb5190f4d3da996 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 11 Sep 2015 09:28:22 +0800 Subject: [PATCH 2043/2517] PUB:20150728 Process of the Linux kernel building MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @oska874 翻译的很不错,我建议根据我校对后的稿件,你 PR 到原文的 github ,作为翻译版。 此外,我发现这片文章是用另外一个 ID: zlatcag 推送上来的?这是怎么回事呢? --- ...28 Process of the Linux kernel building.md | 690 ++++++++++++++++++ ...28 Process of the Linux kernel building.md | 674 ----------------- 2 files changed, 690 insertions(+), 674 deletions(-) create mode 100644 published/20150728 Process of the Linux kernel building.md delete mode 100644 translated/tech/20150728 Process of the Linux kernel building.md diff --git a/published/20150728 Process of the Linux kernel building.md b/published/20150728 Process of the Linux kernel building.md new file mode 100644 index 0000000000..13610c77f2 --- /dev/null +++ b/published/20150728 Process of the Linux kernel building.md @@ -0,0 +1,690 @@ +你知道 Linux 内核是如何构建的吗? +================================================================================ + +###介绍 + +我不会告诉你怎么在自己的电脑上去构建、安装一个定制化的 Linux 内核,这样的[资料](https://encrypted.google.com/search?q=building+linux+kernel#q=building+linux+kernel+from+source+code)太多了,它们会对你有帮助。本文会告诉你当你在内核源码路径里敲下`make` 时会发生什么。 + +当我刚刚开始学习内核代码时,[Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 是我打开的第一个文件,这个文件看起来真令人害怕 :)。那时候这个 [Makefile](https://en.wikipedia.org/wiki/Make_%28software%29) 还只包含了`1591` 行代码,当我开始写本文时,内核已经是[4.2.0的第三个候选版本](https://github.com/torvalds/linux/commit/52721d9d3334c1cb1f76219a161084094ec634dc) 了。 + +这个 makefile 是 Linux 内核代码的根 makefile ,内核构建就始于此处。是的,它的内容很多,但是如果你已经读过内核源代码,你就会发现每个包含代码的目录都有一个自己的 makefile。当然了,我们不会去描述每个代码文件是怎么编译链接的,所以我们将只会挑选一些通用的例子来说明问题。而你不会在这里找到构建内核的文档、如何整洁内核代码、[tags](https://en.wikipedia.org/wiki/Ctags) 的生成和[交叉编译](https://en.wikipedia.org/wiki/Cross_compiler) 相关的说明,等等。我们将从`make` 开始,使用标准的内核配置文件,到生成了内核镜像 [bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage) 结束。 + +如果你已经很了解 [make](https://en.wikipedia.org/wiki/Make_%28software%29) 工具那是最好,但是我也会描述本文出现的相关代码。 + +让我们开始吧! + + +###编译内核前的准备 + +在开始编译前要进行很多准备工作。最主要的就是找到并配置好配置文件,`make` 命令要使用到的参数都需要从这些配置文件获取。现在就让我们深入内核的根 `makefile` 吧 + +内核的根 `Makefile` 负责构建两个主要的文件:[vmlinux](https://en.wikipedia.org/wiki/Vmlinux) (内核镜像可执行文件)和模块文件。内核的 [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 从定义如下变量开始: + +```Makefile +VERSION = 4 +PATCHLEVEL = 2 +SUBLEVEL = 0 +EXTRAVERSION = -rc3 +NAME = Hurr durr I'ma sheep +``` + +这些变量决定了当前内核的版本,并且被使用在很多不同的地方,比如同一个 `Makefile` 中的 `KERNELVERSION` : + +```Makefile +KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) +``` + +接下来我们会看到很多`ifeq` 条件判断语句,它们负责检查传递给 `make` 的参数。内核的 `Makefile` 提供了一个特殊的编译选项 `make help` ,这个选项可以生成所有的可用目标和一些能传给 `make` 的有效的命令行参数。举个例子,`make V=1` 会在构建过程中输出详细的编译信息,第一个 `ifeq` 就是检查传递给 make 的 `V=n` 选项。 + +```Makefile +ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE = $(V) +endif +ifndef KBUILD_VERBOSE + KBUILD_VERBOSE = 0 +endif + +ifeq ($(KBUILD_VERBOSE),1) + quiet = + Q = +else + quiet=quiet_ + Q = @ +endif + +export quiet Q KBUILD_VERBOSE +``` +如果 `V=n` 这个选项传给了 `make` ,系统就会给变量 `KBUILD_VERBOSE` 选项附上 `V` 的值,否则的话`KBUILD_VERBOSE` 就会为 `0`。然后系统会检查 `KBUILD_VERBOSE` 的值,以此来决定 `quiet` 和`Q` 的值。符号 `@` 控制命令的输出,如果它被放在一个命令之前,这条命令的输出将会是 `CC scripts/mod/empty.o`,而不是`Compiling .... scripts/mod/empty.o`(LCTT 译注:CC 在 makefile 中一般都是编译命令)。在这段最后,系统导出了所有的变量。 + +下一个 `ifeq` 语句检查的是传递给 `make` 的选项 `O=/dir`,这个选项允许在指定的目录 `dir` 输出所有的结果文件: + +```Makefile +ifeq ($(KBUILD_SRC),) + +ifeq ("$(origin O)", "command line") + KBUILD_OUTPUT := $(O) +endif + +ifneq ($(KBUILD_OUTPUT),) +saved-output := $(KBUILD_OUTPUT) +KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ + && /bin/pwd) +$(if $(KBUILD_OUTPUT),, \ + $(error failed to create output directory "$(saved-output)")) + +sub-make: FORCE + $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \ + -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS)) + +skip-makefile := 1 +endif # ifneq ($(KBUILD_OUTPUT),) +endif # ifeq ($(KBUILD_SRC),) +``` + +系统会检查变量 `KBUILD_SRC`,它代表内核代码的顶层目录,如果它是空的(第一次执行 makefile 时总是空的),我们会设置变量 `KBUILD_OUTPUT` 为传递给选项 `O` 的值(如果这个选项被传进来了)。下一步会检查变量 `KBUILD_OUTPUT` ,如果已经设置好,那么接下来会做以下几件事: + +* 将变量 `KBUILD_OUTPUT` 的值保存到临时变量 `saved-output`; +* 尝试创建给定的输出目录; +* 检查创建的输出目录,如果失败了就打印错误; +* 如果成功创建了输出目录,那么就在新目录重新执行 `make` 命令(参见选项`-C`)。 + +下一个 `ifeq` 语句会检查传递给 make 的选项 `C` 和 `M`: + +```Makefile +ifeq ("$(origin C)", "command line") + KBUILD_CHECKSRC = $(C) +endif +ifndef KBUILD_CHECKSRC + KBUILD_CHECKSRC = 0 +endif + +ifeq ("$(origin M)", "command line") + KBUILD_EXTMOD := $(M) +endif +``` + +第一个选项 `C` 会告诉 `makefile` 需要使用环境变量 `$CHECK` 提供的工具来检查全部 `c` 代码,默认情况下会使用[sparse](https://en.wikipedia.org/wiki/Sparse)。第二个选项 `M` 会用来编译外部模块(本文不做讨论)。 + +系统还会检查变量 `KBUILD_SRC`,如果 `KBUILD_SRC` 没有被设置,系统会设置变量 `srctree` 为`.`: + +```Makefile +ifeq ($(KBUILD_SRC),) + srctree := . +endif + +objtree := . +src := $(srctree) +obj := $(objtree) + +export srctree objtree VPATH +``` + +这将会告诉 `Makefile` 内核的源码树就在执行 `make` 命令的目录,然后要设置 `objtree` 和其他变量为这个目录,并且将这些变量导出。接着就是要获取 `SUBARCH` 的值,这个变量代表了当前的系统架构(LCTT 译注:一般都指CPU 架构): + +```Makefile +SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ + -e s/sun4u/sparc64/ \ + -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/s390x/s390/ -e s/parisc64/parisc/ \ + -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ + -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ ) +``` + +如你所见,系统执行 [uname](https://en.wikipedia.org/wiki/Uname) 得到机器、操作系统和架构的信息。因为我们得到的是 `uname` 的输出,所以我们需要做一些处理再赋给变量 `SUBARCH` 。获得 `SUBARCH` 之后就要设置`SRCARCH` 和 `hfr-arch`,`SRCARCH` 提供了硬件架构相关代码的目录,`hfr-arch` 提供了相关头文件的目录: + +```Makefile +ifeq ($(ARCH),i386) + SRCARCH := x86 +endif +ifeq ($(ARCH),x86_64) + SRCARCH := x86 +endif + +hdr-arch := $(SRCARCH) +``` + +注意:`ARCH` 是 `SUBARCH` 的别名。如果没有设置过代表内核配置文件路径的变量 `KCONFIG_CONFIG`,下一步系统会设置它,默认情况下就是 `.config` : + +```Makefile +KCONFIG_CONFIG ?= .config +export KCONFIG_CONFIG +``` + +以及编译内核过程中要用到的 [shell](https://en.wikipedia.org/wiki/Shell_%28computing%29) + +```Makefile +CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ + else if [ -x /bin/bash ]; then echo /bin/bash; \ + else echo sh; fi ; fi) +``` + +接下来就要设置一组和编译内核的编译器相关的变量。我们会设置主机的 `C` 和 `C++` 的编译器及相关配置项: + +```Makefile +HOSTCC = gcc +HOSTCXX = g++ +HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 +HOSTCXXFLAGS = -O2 +``` + +接下来会去适配代表编译器的变量 `CC`,那为什么还要 `HOST*` 这些变量呢?这是因为 `CC` 是编译内核过程中要使用的目标架构的编译器,但是 `HOSTCC` 是要被用来编译一组 `host` 程序的(下面我们就会看到)。 + +然后我们就看到变量 `KBUILD_MODULES` 和 `KBUILD_BUILTIN` 的定义,这两个变量决定了我们要编译什么东西(内核、模块或者两者): + +```Makefile +KBUILD_MODULES := +KBUILD_BUILTIN := 1 + +ifeq ($(MAKECMDGOALS),modules) + KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) +endif +``` + +在这我们可以看到这些变量的定义,并且,如果们仅仅传递了 `modules` 给 `make`,变量 `KBUILD_BUILTIN` 会依赖于内核配置选项 `CONFIG_MODVERSIONS`。 + +下一步操作是引入下面的文件: + +```Makefile +include scripts/Kbuild.include +``` + +文件 [Kbuild](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kbuild.txt) 或者又叫做 `Kernel Build System` 是一个用来管理构建内核及其模块的特殊框架。`kbuild` 文件的语法与 makefile 一样。文件[scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include) 为 `kbuild` 系统提供了一些常规的定义。因为我们包含了这个 `kbuild` 文件,我们可以看到和不同工具关联的这些变量的定义,这些工具会在内核和模块编译过程中被使用(比如链接器、编译器、来自 [binutils](http://www.gnu.org/software/binutils/) 的二进制工具包 ,等等): + +```Makefile +AS = $(CROSS_COMPILE)as +LD = $(CROSS_COMPILE)ld +CC = $(CROSS_COMPILE)gcc +CPP = $(CC) -E +AR = $(CROSS_COMPILE)ar +NM = $(CROSS_COMPILE)nm +STRIP = $(CROSS_COMPILE)strip +OBJCOPY = $(CROSS_COMPILE)objcopy +OBJDUMP = $(CROSS_COMPILE)objdump +AWK = awk +... +... +... +``` + +在这些定义好的变量后面,我们又定义了两个变量:`USERINCLUDE` 和 `LINUXINCLUDE`。他们包含了头文件的路径(第一个是给用户用的,第二个是给内核用的): + +```Makefile +USERINCLUDE := \ + -I$(srctree)/arch/$(hdr-arch)/include/uapi \ + -Iarch/$(hdr-arch)/include/generated/uapi \ + -I$(srctree)/include/uapi \ + -Iinclude/generated/uapi \ + -include $(srctree)/include/linux/kconfig.h + +LINUXINCLUDE := \ + -I$(srctree)/arch/$(hdr-arch)/include \ + ... +``` + +以及给 C 编译器的标准标志: + +```Makefile +KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ + -fno-strict-aliasing -fno-common \ + -Werror-implicit-function-declaration \ + -Wno-format-security \ + -std=gnu89 +``` + +这并不是最终确定的编译器标志,它们还可以在其他 makefile 里面更新(比如 `arch/` 里面的 kbuild)。变量定义完之后,全部会被导出供其他 makefile 使用。 + +下面的两个变量 `RCS_FIND_IGNORE` 和 `RCS_TAR_IGNORE` 包含了被版本控制系统忽略的文件: + +```Makefile +export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \ + -name CVS -o -name .pc -o -name .hg -o -name .git \) \ + -prune -o +export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ + --exclude CVS --exclude .pc --exclude .hg --exclude .git +``` + +这就是全部了,我们已经完成了所有的准备工作,下一个点就是如果构建`vmlinux`。 + +###直面内核构建 + +现在我们已经完成了所有的准备工作,根 makefile(注:内核根目录下的 makefile)的下一步工作就是和编译内核相关的了。在这之前,我们不会在终端看到 `make` 命令输出的任何东西。但是现在编译的第一步开始了,这里我们需要从内核根 makefile 的 [598](https://github.com/torvalds/linux/blob/master/Makefile#L598) 行开始,这里可以看到目标`vmlinux`: + +```Makefile +all: vmlinux + include arch/$(SRCARCH)/Makefile +``` + +不要操心我们略过的从 `export RCS_FIND_IGNORE.....` 到 `all: vmlinux.....` 这一部分 makefile 代码,他们只是负责根据各种配置文件(`make *.config`)生成不同目标内核的,因为之前我就说了这一部分我们只讨论构建内核的通用途径。 + +目标 `all:` 是在命令行如果不指定具体目标时默认使用的目标。你可以看到这里包含了架构相关的 makefile(在这里就指的是 [arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile))。从这一时刻起,我们会从这个 makefile 继续进行下去。如我们所见,目标 `all` 依赖于根 makefile 后面声明的 `vmlinux`: + +```Makefile +vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE +``` + +`vmlinux` 是 linux 内核的静态链接可执行文件格式。脚本 [scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) 把不同的编译好的子模块链接到一起形成了 vmlinux。 + +第二个目标是 `vmlinux-deps`,它的定义如下: + +```Makefile +vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) +``` + +它是由内核代码下的每个顶级目录的 `built-in.o` 组成的。之后我们还会检查内核所有的目录,`kbuild` 会编译各个目录下所有的对应 `$(obj-y)` 的源文件。接着调用 `$(LD) -r` 把这些文件合并到一个 `build-in.o` 文件里。此时我们还没有`vmlinux-deps`,所以目标 `vmlinux` 现在还不会被构建。对我而言 `vmlinux-deps` 包含下面的文件: + +``` +arch/x86/kernel/vmlinux.lds arch/x86/kernel/head_64.o +arch/x86/kernel/head64.o arch/x86/kernel/head.o +init/built-in.o usr/built-in.o +arch/x86/built-in.o kernel/built-in.o +mm/built-in.o fs/built-in.o +ipc/built-in.o security/built-in.o +crypto/built-in.o block/built-in.o +lib/lib.a arch/x86/lib/lib.a +lib/built-in.o arch/x86/lib/built-in.o +drivers/built-in.o sound/built-in.o +firmware/built-in.o arch/x86/pci/built-in.o +arch/x86/power/built-in.o arch/x86/video/built-in.o +net/built-in.o +``` + +下一个可以被执行的目标如下: + +```Makefile +$(sort $(vmlinux-deps)): $(vmlinux-dirs) ; +$(vmlinux-dirs): prepare scripts + $(Q)$(MAKE) $(build)=$@ +``` + +就像我们看到的,`vmlinux-dir` 依赖于两部分:`prepare` 和 `scripts`。第一个 `prepare` 定义在内核的根 `makefile` 中,准备工作分成三个阶段: + +```Makefile +prepare: prepare0 +prepare0: archprepare FORCE + $(Q)$(MAKE) $(build)=. +archprepare: archheaders archscripts prepare1 scripts_basic + +prepare1: prepare2 $(version_h) include/generated/utsrelease.h \ + include/config/auto.conf + $(cmd_crmodverdir) +prepare2: prepare3 outputmakefile asm-generic +``` + +第一个 `prepare0` 展开到 `archprepare` ,后者又展开到 `archheader` 和 `archscripts`,这两个变量定义在 `x86_64` 相关的 [Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)。让我们看看这个文件。`x86_64` 特定的 makefile 从变量定义开始,这些变量都是和特定架构的配置文件 ([defconfig](https://github.com/torvalds/linux/tree/master/arch/x86/configs),等等)有关联。在定义了编译 [16-bit](https://en.wikipedia.org/wiki/Real_mode) 代码的编译选项之后,根据变量 `BITS` 的值,如果是 `32`, 汇编代码、链接器、以及其它很多东西(全部的定义都可以在[arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)找到)对应的参数就是 `i386`,而 `64` 就对应的是 `x86_84`。 + +第一个目标是 makefile 生成的系统调用列表(syscall table)中的 `archheaders` : + +```Makefile +archheaders: + $(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all +``` + +第二个目标是 makefile 里的 `archscripts`: + +```Makefile +archscripts: scripts_basic + $(Q)$(MAKE) $(build)=arch/x86/tools relocs +``` + + 我们可以看到 `archscripts` 是依赖于根 [Makefile](https://github.com/torvalds/linux/blob/master/Makefile)里的`scripts_basic` 。首先我们可以看出 `scripts_basic` 是按照 [scripts/basic](https://github.com/torvalds/linux/blob/master/scripts/basic/Makefile) 的 makefile 执行 make 的: + +```Maklefile +scripts_basic: + $(Q)$(MAKE) $(build)=scripts/basic +``` + +`scripts/basic/Makefile` 包含了编译两个主机程序 `fixdep` 和 `bin2` 的目标: + +```Makefile +hostprogs-y := fixdep +hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c +always := $(hostprogs-y) + +$(addprefix $(obj)/,$(filter-out fixdep,$(always))): $(obj)/fixdep +``` + +第一个工具是 `fixdep`:用来优化 [gcc](https://gcc.gnu.org/) 生成的依赖列表,然后在重新编译源文件的时候告诉make。第二个工具是 `bin2c`,它依赖于内核配置选项 `CONFIG_BUILD_BIN2C`,并且它是一个用来将标准输入接口(LCTT 译注:即 stdin)收到的二进制流通过标准输出接口(即:stdout)转换成 C 头文件的非常小的 C 程序。你可能注意到这里有些奇怪的标志,如 `hostprogs-y` 等。这个标志用于所有的 `kbuild` 文件,更多的信息你可以从[documentation](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/makefiles.txt) 获得。在我们这里, `hostprogs-y` 告诉 `kbuild` 这里有个名为 `fixed` 的程序,这个程序会通过和 `Makefile` 相同目录的 `fixdep.c` 编译而来。 + +执行 make 之后,终端的第一个输出就是 `kbuild` 的结果: + +``` +$ make + HOSTCC scripts/basic/fixdep +``` + +当目标 `script_basic` 被执行,目标 `archscripts` 就会 make [arch/x86/tools](https://github.com/torvalds/linux/blob/master/arch/x86/tools/Makefile) 下的 makefile 和目标 `relocs`: + +```Makefile +$(Q)$(MAKE) $(build)=arch/x86/tools relocs +``` + +包含了[重定位](https://en.wikipedia.org/wiki/Relocation_%28computing%29) 的信息的代码 `relocs_32.c` 和 `relocs_64.c` 将会被编译,这可以在`make` 的输出中看到: + +```Makefile + HOSTCC arch/x86/tools/relocs_32.o + HOSTCC arch/x86/tools/relocs_64.o + HOSTCC arch/x86/tools/relocs_common.o + HOSTLD arch/x86/tools/relocs +``` + +在编译完 `relocs.c` 之后会检查 `version.h`: + +```Makefile +$(version_h): $(srctree)/Makefile FORCE + $(call filechk,version.h) + $(Q)rm -f $(old_version_h) +``` + +我们可以在输出看到它: + +``` +CHK include/config/kernel.release +``` + +以及在内核的根 Makefiel 使用 `arch/x86/include/generated/asm` 的目标 `asm-generic` 来构建 `generic` 汇编头文件。在目标 `asm-generic` 之后,`archprepare` 就完成了,所以目标 `prepare0` 会接着被执行,如我上面所写: + +```Makefile +prepare0: archprepare FORCE + $(Q)$(MAKE) $(build)=. +``` + +注意 `build`,它是定义在文件 [scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include),内容是这样的: + +```Makefile +build := -f $(srctree)/scripts/Makefile.build obj +``` + +或者在我们的例子中,它就是当前源码目录路径:`.`: + +```Makefile +$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.build obj=. +``` + +脚本 [scripts/Makefile.build](https://github.com/torvalds/linux/blob/master/scripts/Makefile.build) 通过参数 `obj` 给定的目录找到 `Kbuild` 文件,然后引入 `kbuild` 文件: + +```Makefile +include $(kbuild-file) +``` + +并根据这个构建目标。我们这里 `.` 包含了生成 `kernel/bounds.s` 和 `arch/x86/kernel/asm-offsets.s` 的 [Kbuild](https://github.com/torvalds/linux/blob/master/Kbuild) 文件。在此之后,目标 `prepare` 就完成了它的工作。 `vmlinux-dirs` 也依赖于第二个目标 `scripts` ,它会编译接下来的几个程序:`filealias`,`mk_elfconfig`,`modpost` 等等。之后,`scripts/host-programs` 就可以开始编译我们的目标 `vmlinux-dirs` 了。 + +首先,我们先来理解一下 `vmlinux-dirs` 都包含了那些东西。在我们的例子中它包含了下列内核目录的路径: + +``` +init usr arch/x86 kernel mm fs ipc security crypto block +drivers sound firmware arch/x86/pci arch/x86/power +arch/x86/video net lib arch/x86/lib +``` + +我们可以在内核的根 [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 里找到 `vmlinux-dirs` 的定义: + +```Makefile +vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ + $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ + $(net-y) $(net-m) $(libs-y) $(libs-m))) + +init-y := init/ +drivers-y := drivers/ sound/ firmware/ +net-y := net/ +libs-y := lib/ +... +... +... +``` + +这里我们借助函数 `patsubst` 和 `filter`去掉了每个目录路径里的符号 `/`,并且把结果放到 `vmlinux-dirs` 里。所以我们就有了 `vmlinux-dirs` 里的目录列表,以及下面的代码: + +```Makefile +$(vmlinux-dirs): prepare scripts + $(Q)$(MAKE) $(build)=$@ +``` + +符号 `$@` 在这里代表了 `vmlinux-dirs`,这就表明程序会递归遍历从 `vmlinux-dirs` 以及它内部的全部目录(依赖于配置),并且在对应的目录下执行 `make` 命令。我们可以在输出看到结果: + +``` + CC init/main.o + CHK include/generated/compile.h + CC init/version.o + CC init/do_mounts.o + ... + CC arch/x86/crypto/glue_helper.o + AS arch/x86/crypto/aes-x86_64-asm_64.o + CC arch/x86/crypto/aes_glue.o + ... + AS arch/x86/entry/entry_64.o + AS arch/x86/entry/thunk_64.o + CC arch/x86/entry/syscall_64.o +``` + +每个目录下的源代码将会被编译并且链接到 `built-io.o` 里: + +``` +$ find . -name built-in.o +./arch/x86/crypto/built-in.o +./arch/x86/crypto/sha-mb/built-in.o +./arch/x86/net/built-in.o +./init/built-in.o +./usr/built-in.o +... +... +``` + +好了,所有的 `built-in.o` 都构建完了,现在我们回到目标 `vmlinux` 上。你应该还记得,目标 `vmlinux` 是在内核的根makefile 里。在链接 `vmlinux` 之前,系统会构建 [samples](https://github.com/torvalds/linux/tree/master/samples), [Documentation](https://github.com/torvalds/linux/tree/master/Documentation) 等等,但是如上文所述,我不会在本文描述这些。 + +```Makefile +vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE + ... + ... + +$(call if_changed,link-vmlinux) +``` + +你可以看到,调用脚本 [scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) 的主要目的是把所有的 `built-in.o` 链接成一个静态可执行文件,和生成 [System.map](https://en.wikipedia.org/wiki/System.map)。 最后我们来看看下面的输出: + +``` + LINK vmlinux + LD vmlinux.o + MODPOST vmlinux.o + GEN .version + CHK include/generated/compile.h + UPD include/generated/compile.h + CC init/version.o + LD init/built-in.o + KSYM .tmp_kallsyms1.o + KSYM .tmp_kallsyms2.o + LD vmlinux + SORTEX vmlinux + SYSMAP System.map +``` + +`vmlinux` 和`System.map` 生成在内核源码树根目录下。 + +``` +$ ls vmlinux System.map +System.map vmlinux +``` + +这就是全部了,`vmlinux` 构建好了,下一步就是创建 [bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage). + +###制作bzImage + +`bzImage` 就是压缩了的 linux 内核镜像。我们可以在构建了 `vmlinux` 之后通过执行 `make bzImage` 获得`bzImage`。同时我们可以仅仅执行 `make` 而不带任何参数也可以生成 `bzImage` ,因为它是在 [arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile) 里预定义的、默认生成的镜像: + +```Makefile +all: bzImage +``` + +让我们看看这个目标,它能帮助我们理解这个镜像是怎么构建的。我已经说过了 `bzImage` 是被定义在 [arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile),定义如下: + +```Makefile +bzImage: vmlinux + $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) + $(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot + $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@ +``` + +在这里我们可以看到第一次为 boot 目录执行 `make`,在我们的例子里是这样的: + +```Makefile +boot := arch/x86/boot +``` + +现在的主要目标是编译目录 `arch/x86/boot` 和 `arch/x86/boot/compressed` 的代码,构建 `setup.bin` 和 `vmlinux.bin`,最后用这两个文件生成 `bzImage`。第一个目标是定义在 [arch/x86/boot/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/Makefile) 的 `$(obj)/setup.elf`: + +```Makefile +$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE + $(call if_changed,ld) +``` + +我们已经在目录 `arch/x86/boot` 有了链接脚本 `setup.ld`,和扩展到 `boot` 目录下全部源代码的变量 `SETUP_OBJS` 。我们可以看看第一个输出: + +```Makefile + AS arch/x86/boot/bioscall.o + CC arch/x86/boot/cmdline.o + AS arch/x86/boot/copy.o + HOSTCC arch/x86/boot/mkcpustr + CPUSTR arch/x86/boot/cpustr.h + CC arch/x86/boot/cpu.o + CC arch/x86/boot/cpuflags.o + CC arch/x86/boot/cpucheck.o + CC arch/x86/boot/early_serial_console.o + CC arch/x86/boot/edd.o +``` + +下一个源码文件是 [arch/x86/boot/header.S](https://github.com/torvalds/linux/blob/master/arch/x86/boot/header.S),但是我们不能现在就编译它,因为这个目标依赖于下面两个头文件: + +```Makefile +$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h +``` + +第一个头文件 `voffset.h` 是使用 `sed` 脚本生成的,包含用 `nm` 工具从 `vmlinux` 获取的两个地址: + +```C +#define VO__end 0xffffffff82ab0000 +#define VO__text 0xffffffff81000000 +``` + +这两个地址是内核的起始和结束地址。第二个头文件 `zoffset.h` 在 [arch/x86/boot/compressed/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/compressed/Makefile) 可以看出是依赖于目标 `vmlinux`的: + +```Makefile +$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE + $(call if_changed,zoffset) +``` + +目标 `$(obj)/compressed/vmlinux` 依赖于 `vmlinux-objs-y` —— 说明需要编译目录 [arch/x86/boot/compressed](https://github.com/torvalds/linux/tree/master/arch/x86/boot/compressed) 下的源代码,然后生成 `vmlinux.bin`、`vmlinux.bin.bz2`,和编译工具 `mkpiggy`。我们可以在下面的输出看出来: + +```Makefile + LDS arch/x86/boot/compressed/vmlinux.lds + AS arch/x86/boot/compressed/head_64.o + CC arch/x86/boot/compressed/misc.o + CC arch/x86/boot/compressed/string.o + CC arch/x86/boot/compressed/cmdline.o + OBJCOPY arch/x86/boot/compressed/vmlinux.bin + BZIP2 arch/x86/boot/compressed/vmlinux.bin.bz2 + HOSTCC arch/x86/boot/compressed/mkpiggy +``` + +`vmlinux.bin` 是去掉了调试信息和注释的 `vmlinux` 二进制文件,加上了占用了 `u32` (LCTT 译注:即4-Byte)的长度信息的 `vmlinux.bin.all` 压缩后就是 `vmlinux.bin.bz2`。其中 `vmlinux.bin.all` 包含了 `vmlinux.bin` 和`vmlinux.relocs`(LCTT 译注:vmlinux 的重定位信息),其中 `vmlinux.relocs` 是 `vmlinux` 经过程序 `relocs` 处理之后的 `vmlinux` 镜像(见上文所述)。我们现在已经获取到了这些文件,汇编文件 `piggy.S` 将会被 `mkpiggy` 生成、然后编译: + +```Makefile + MKPIGGY arch/x86/boot/compressed/piggy.S + AS arch/x86/boot/compressed/piggy.o +``` + +这个汇编文件会包含经过计算得来的、压缩内核的偏移信息。处理完这个汇编文件,我们就可以看到 `zoffset` 生成了: + +```Makefile + ZOFFSET arch/x86/boot/zoffset.h +``` + +现在 `zoffset.h` 和 `voffset.h` 已经生成了,[arch/x86/boot](https://github.com/torvalds/linux/tree/master/arch/x86/boot/) 里的源文件可以继续编译: + +```Makefile + AS arch/x86/boot/header.o + CC arch/x86/boot/main.o + CC arch/x86/boot/mca.o + CC arch/x86/boot/memory.o + CC arch/x86/boot/pm.o + AS arch/x86/boot/pmjump.o + CC arch/x86/boot/printf.o + CC arch/x86/boot/regs.o + CC arch/x86/boot/string.o + CC arch/x86/boot/tty.o + CC arch/x86/boot/video.o + CC arch/x86/boot/video-mode.o + CC arch/x86/boot/video-vga.o + CC arch/x86/boot/video-vesa.o + CC arch/x86/boot/video-bios.o +``` + +所有的源代码会被编译,他们最终会被链接到 `setup.elf` : + +```Makefile + LD arch/x86/boot/setup.elf +``` + +或者: + +``` +ld -m elf_x86_64 -T arch/x86/boot/setup.ld arch/x86/boot/a20.o arch/x86/boot/bioscall.o arch/x86/boot/cmdline.o arch/x86/boot/copy.o arch/x86/boot/cpu.o arch/x86/boot/cpuflags.o arch/x86/boot/cpucheck.o arch/x86/boot/early_serial_console.o arch/x86/boot/edd.o arch/x86/boot/header.o arch/x86/boot/main.o arch/x86/boot/mca.o arch/x86/boot/memory.o arch/x86/boot/pm.o arch/x86/boot/pmjump.o arch/x86/boot/printf.o arch/x86/boot/regs.o arch/x86/boot/string.o arch/x86/boot/tty.o arch/x86/boot/video.o arch/x86/boot/video-mode.o arch/x86/boot/version.o arch/x86/boot/video-vga.o arch/x86/boot/video-vesa.o arch/x86/boot/video-bios.o -o arch/x86/boot/setup.elf +``` + +最后的两件事是创建包含目录 `arch/x86/boot/*` 下的编译过的代码的 `setup.bin`: + +``` +objcopy -O binary arch/x86/boot/setup.elf arch/x86/boot/setup.bin +``` + +以及从 `vmlinux` 生成 `vmlinux.bin` : + +``` +objcopy -O binary -R .note -R .comment -S arch/x86/boot/compressed/vmlinux arch/x86/boot/vmlinux.bin +``` + +最最后,我们编译主机程序 [arch/x86/boot/tools/build.c](https://github.com/torvalds/linux/blob/master/arch/x86/boot/tools/build.c),它将会用来把 `setup.bin` 和 `vmlinux.bin` 打包成 `bzImage`: + +``` +arch/x86/boot/tools/build arch/x86/boot/setup.bin arch/x86/boot/vmlinux.bin arch/x86/boot/zoffset.h arch/x86/boot/bzImage +``` + +实际上 `bzImage` 就是把 `setup.bin` 和 `vmlinux.bin` 连接到一起。最终我们会看到输出结果,就和那些用源码编译过内核的同行的结果一样: + +``` +Setup is 16268 bytes (padded to 16384 bytes). +System is 4704 kB +CRC 94a88f9a +Kernel: arch/x86/boot/bzImage is ready (#5) +``` + + +全部结束。 + +###结论 + +这就是本文的结尾部分。本文我们了解了编译内核的全部步骤:从执行 `make` 命令开始,到最后生成 `bzImage`。我知道,linux 内核的 makefile 和构建 linux 的过程第一眼看起来可能比较迷惑,但是这并不是很难。希望本文可以帮助你理解构建 linux 内核的整个流程。 + + +###链接 + +* [GNU make util](https://en.wikipedia.org/wiki/Make_%28software%29) +* [Linux kernel top Makefile](https://github.com/torvalds/linux/blob/master/Makefile) +* [cross-compilation](https://en.wikipedia.org/wiki/Cross_compiler) +* [Ctags](https://en.wikipedia.org/wiki/Ctags) +* [sparse](https://en.wikipedia.org/wiki/Sparse) +* [bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage) +* [uname](https://en.wikipedia.org/wiki/Uname) +* [shell](https://en.wikipedia.org/wiki/Shell_%28computing%29) +* [Kbuild](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kbuild.txt) +* [binutils](http://www.gnu.org/software/binutils/) +* [gcc](https://gcc.gnu.org/) +* [Documentation](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/makefiles.txt) +* [System.map](https://en.wikipedia.org/wiki/System.map) +* [Relocation](https://en.wikipedia.org/wiki/Relocation_%28computing%29) + +-------------------------------------------------------------------------------- + +via: https://github.com/0xAX/linux-insides/blob/master/Misc/how_kernel_compiled.md + +译者:[oska874](https://github.com/oska874) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 diff --git a/translated/tech/20150728 Process of the Linux kernel building.md b/translated/tech/20150728 Process of the Linux kernel building.md deleted file mode 100644 index b8ded80179..0000000000 --- a/translated/tech/20150728 Process of the Linux kernel building.md +++ /dev/null @@ -1,674 +0,0 @@ -如何构建Linux 内核 -================================================================================ -介绍 --------------------------------------------------------------------------------- - -我不会告诉你怎么在自己的电脑上去构建、安装一个定制化的Linux 内核,这样的[资料](https://encrypted.google.com/search?q=building+linux+kernel#q=building+linux+kernel+from+source+code) 太多了,它们会对你有帮助。本文会告诉你当你在内核源码路径里敲下`make` 时会发生什么。当我刚刚开始学习内核代码时,[Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 是我打开的第一个文件,这个文件看起来真令人害怕 :)。那时候这个[Makefile](https://en.wikipedia.org/wiki/Make_%28software%29) 还只包含了`1591` 行代码,当我开始写本文是,这个[Makefile](https://github.com/torvalds/linux/commit/52721d9d3334c1cb1f76219a161084094ec634dc) 已经是第三个候选版本了。 - -这个makefile 是Linux 内核代码的根makefile ,内核构建就始于此处。是的,它的内容很多,但是如果你已经读过内核源代码,你就会发现每个包含代码的目录都有一个自己的makefile。当然了,我们不会去描述每个代码文件是怎么编译链接的。所以我们将只会挑选一些通用的例子来说明问题,而你不会在这里找到构建内核的文档、如何整洁内核代码、[tags](https://en.wikipedia.org/wiki/Ctags) 的生成和[交叉编译](https://en.wikipedia.org/wiki/Cross_compiler) 相关的说明,等等。我们将从`make` 开始,使用标准的内核配置文件,到生成了内核镜像[bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage) 结束。 - -如果你已经很了解[make](https://en.wikipedia.org/wiki/Make_%28software%29) 工具那是最好,但是我也会描述本文出现的相关代码。 - -让我们开始吧 - - -编译内核前的准备 ---------------------------------------------------------------------------------- - -在开始编译前要进行很多准备工作。最主要的就是找到并配置好配置文件,`make` 命令要使用到的参数都需要从这些配置文件获取。现在就让我们深入内核的根`makefile` 吧 - -内核的根`Makefile` 负责构建两个主要的文件:[vmlinux](https://en.wikipedia.org/wiki/Vmlinux) (内核镜像可执行文件)和模块文件。内核的 [Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 从此处开始: - -```Makefile -VERSION = 4 -PATCHLEVEL = 2 -SUBLEVEL = 0 -EXTRAVERSION = -rc3 -NAME = Hurr durr I'ma sheep -``` - -这些变量决定了当前内核的版本,并且被使用在很多不同的地方,比如`KERNELVERSION` : - -```Makefile -KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) -``` - -接下来我们会看到很多`ifeq` 条件判断语句,它们负责检查传给`make` 的参数。内核的`Makefile` 提供了一个特殊的编译选项`make help` ,这个选项可以生成所有的可用目标和一些能传给`make` 的有效的命令行参数。举个例子,`make V=1` 会在构建过程中输出详细的编译信息,第一个`ifeq` 就是检查传递给make的`V=n` 选项。 - -```Makefile -ifeq ("$(origin V)", "command line") - KBUILD_VERBOSE = $(V) -endif -ifndef KBUILD_VERBOSE - KBUILD_VERBOSE = 0 -endif - -ifeq ($(KBUILD_VERBOSE),1) - quiet = - Q = -else - quiet=quiet_ - Q = @ -endif - -export quiet Q KBUILD_VERBOSE -``` - -如果`V=n` 这个选项传给了`make` ,系统就会给变量`KBUILD_VERBOSE` 选项附上`V` 的值,否则的话`KBUILD_VERBOSE` 就会为`0`。然后系统会检查`KBUILD_VERBOSE` 的值,以此来决定`quiet` 和`Q` 的值。符号`@` 控制命令的输出,如果它被放在一个命令之前,这条命令的执行将会是`CC scripts/mod/empty.o`,而不是`Compiling .... scripts/mod/empty.o`(注:CC 在makefile 中一般都是编译命令)。最后系统仅仅导出所有的变量。下一个`ifeq` 语句检查的是传递给`make` 的选项`O=/dir`,这个选项允许在指定的目录`dir` 输出所有的结果文件: - -```Makefile -ifeq ($(KBUILD_SRC),) - -ifeq ("$(origin O)", "command line") - KBUILD_OUTPUT := $(O) -endif - -ifneq ($(KBUILD_OUTPUT),) -saved-output := $(KBUILD_OUTPUT) -KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ - && /bin/pwd) -$(if $(KBUILD_OUTPUT),, \ - $(error failed to create output directory "$(saved-output)")) - -sub-make: FORCE - $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \ - -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS)) - -skip-makefile := 1 -endif # ifneq ($(KBUILD_OUTPUT),) -endif # ifeq ($(KBUILD_SRC),) -``` - -系统会检查变量`KBUILD_SRC`,如果他是空的(第一次执行makefile 时总是空的),并且变量`KBUILD_OUTPUT` 被设成了选项`O` 的值(如果这个选项被传进来了),那么这个值就会用来代表内核源码的顶层目录。下一步会检查变量`KBUILD_OUTPUT` ,如果之前设置过这个变量,那么接下来会做以下几件事: - -* 将变量`KBUILD_OUTPUT` 的值保存到临时变量`saved-output`; -* 尝试创建输出目录; -* 检查创建的输出目录,如果失败了就打印错误; -* 如果成功创建了输出目录,那么就在新目录重新执行`make` 命令(参见选项`-C`)。 - -下一个`ifeq` 语句会检查传递给make 的选项`C` 和`M`: - -```Makefile -ifeq ("$(origin C)", "command line") - KBUILD_CHECKSRC = $(C) -endif -ifndef KBUILD_CHECKSRC - KBUILD_CHECKSRC = 0 -endif - -ifeq ("$(origin M)", "command line") - KBUILD_EXTMOD := $(M) -endif -``` - -第一个选项`C` 会告诉`makefile` 需要使用环境变量`$CHECK` 提供的工具来检查全部`c` 代码,默认情况下会使用[sparse](https://en.wikipedia.org/wiki/Sparse)。第二个选项`M` 会用来编译外部模块(本文不做讨论)。因为设置了这两个变量,系统还会检查变量`KBUILD_SRC`,如果`KBUILD_SRC` 没有被设置,系统会设置变量`srctree` 为`.`: - -```Makefile -ifeq ($(KBUILD_SRC),) - srctree := . -endif - -objtree := . -src := $(srctree) -obj := $(objtree) - -export srctree objtree VPATH -``` - -这将会告诉`Makefile` 内核的源码树就在执行make 命令的目录。然后要设置`objtree` 和其他变量为执行make 命令的目录,并且将这些变量导出。接着就是要获取`SUBARCH` 的值,这个变量代表了当前的系统架构(注:一般都指CPU 架构): - -```Makefile -SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ - -e s/sun4u/sparc64/ \ - -e s/arm.*/arm/ -e s/sa110/arm/ \ - -e s/s390x/s390/ -e s/parisc64/parisc/ \ - -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ - -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ ) -``` - -如你所见,系统执行[uname](https://en.wikipedia.org/wiki/Uname) 得到机器、操作系统和架构的信息。因为我们得到的是`uname` 的输出,所以我们需要做一些处理在赋给变量`SUBARCH` 。获得`SUBARCH` 之后就要设置`SRCARCH` 和`hfr-arch`,`SRCARCH`提供了硬件架构相关代码的目录,`hfr-arch` 提供了相关头文件的目录: - -```Makefile -ifeq ($(ARCH),i386) - SRCARCH := x86 -endif -ifeq ($(ARCH),x86_64) - SRCARCH := x86 -endif - -hdr-arch := $(SRCARCH) -``` - -注意:`ARCH` 是`SUBARCH` 的别名。如果没有设置过代表内核配置文件路径的变量`KCONFIG_CONFIG`,下一步系统会设置它,默认情况下就是`.config` : - -```Makefile -KCONFIG_CONFIG ?= .config -export KCONFIG_CONFIG -``` -以及编译内核过程中要用到的[shell](https://en.wikipedia.org/wiki/Shell_%28computing%29) - -```Makefile -CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ - else if [ -x /bin/bash ]; then echo /bin/bash; \ - else echo sh; fi ; fi) -``` - -接下来就要设置一组和编译内核的编译器相关的变量。我们会设置主机的`C` 和`C++` 的编译器及相关配置项: - -```Makefile -HOSTCC = gcc -HOSTCXX = g++ -HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -HOSTCXXFLAGS = -O2 -``` - -下一步会去适配代表编译器的变量`CC`,那为什么还要`HOST*` 这些选项呢?这是因为`CC` 是编译内核过程中要使用的目标架构的编译器,但是`HOSTCC` 是要被用来编译一组`host` 程序的(下面我们就会看到)。然后我们就看看变量`KBUILD_MODULES` 和`KBUILD_BUILTIN` 的定义,这两个变量决定了我们要编译什么东西(内核、模块还是其他): - -```Makefile -KBUILD_MODULES := -KBUILD_BUILTIN := 1 - -ifeq ($(MAKECMDGOALS),modules) - KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) -endif -``` - -在这我们可以看到这些变量的定义,并且,如果们仅仅传递了`modules` 给`make`,变量`KBUILD_BUILTIN` 会依赖于内核配置选项`CONFIG_MODVERSIONS`。下一步操作是引入下面的文件: - -```Makefile -include scripts/Kbuild.include -``` - -文件`kbuild` ,[Kbuild](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kbuild.txt) 或者又叫做 `Kernel Build System`是一个用来管理构建内核和模块的特殊框架。`kbuild` 文件的语法与makefile 一样。文件[scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include) 为`kbuild` 系统同提供了一些原生的定义。因为我们包含了这个`kbuild` 文件,我们可以看到和不同工具关联的这些变量的定义,这些工具会在内核和模块编译过程中被使用(比如链接器、编译器、二进制工具包[binutils](http://www.gnu.org/software/binutils/),等等): - -```Makefile -AS = $(CROSS_COMPILE)as -LD = $(CROSS_COMPILE)ld -CC = $(CROSS_COMPILE)gcc -CPP = $(CC) -E -AR = $(CROSS_COMPILE)ar -NM = $(CROSS_COMPILE)nm -STRIP = $(CROSS_COMPILE)strip -OBJCOPY = $(CROSS_COMPILE)objcopy -OBJDUMP = $(CROSS_COMPILE)objdump -AWK = awk -... -... -... -``` - -在这些定义好的变量后面,我们又定义了两个变量:`USERINCLUDE` 和`LINUXINCLUDE`。他们包含了头文件的路径(第一个是给用户用的,第二个是给内核用的): - -```Makefile -USERINCLUDE := \ - -I$(srctree)/arch/$(hdr-arch)/include/uapi \ - -Iarch/$(hdr-arch)/include/generated/uapi \ - -I$(srctree)/include/uapi \ - -Iinclude/generated/uapi \ - -include $(srctree)/include/linux/kconfig.h - -LINUXINCLUDE := \ - -I$(srctree)/arch/$(hdr-arch)/include \ - ... -``` - -以及标准的C 编译器标志: -```Makefile -KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common \ - -Werror-implicit-function-declaration \ - -Wno-format-security \ - -std=gnu89 -``` - -这并不是最终确定的编译器标志,他们还可以在其他makefile 里面更新(比如`arch/` 里面的kbuild)。变量定义完之后,全部会被导出供其他makefile 使用。下面的两个变量`RCS_FIND_IGNORE` 和 `RCS_TAR_IGNORE` 包含了被版本控制系统忽略的文件: - -```Makefile -export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \ - -name CVS -o -name .pc -o -name .hg -o -name .git \) \ - -prune -o -export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ - --exclude CVS --exclude .pc --exclude .hg --exclude .git -``` - -这就是全部了,我们已经完成了所有的准备工作,下一个点就是如果构建`vmlinux`. - -直面构建内核 --------------------------------------------------------------------------------- - -现在我们已经完成了所有的准备工作,根makefile(注:内核根目录下的makefile)的下一步工作就是和编译内核相关的了。在我们执行`make` 命令之前,我们不会在终端看到任何东西。但是现在编译的第一步开始了,这里我们需要从内核根makefile的的[598](https://github.com/torvalds/linux/blob/master/Makefile#L598) 行开始,这里可以看到目标`vmlinux`: - -```Makefile -all: vmlinux - include arch/$(SRCARCH)/Makefile -``` - -不要操心我们略过的从`export RCS_FIND_IGNORE.....` 到`all: vmlinux.....` 这一部分makefile 代码,他们只是负责根据各种配置文件生成不同目标内核的,因为之前我就说了这一部分我们只讨论构建内核的通用途径。 - -目标`all:` 是在命令行如果不指定具体目标时默认使用的目标。你可以看到这里包含了架构相关的makefile(在这里就指的是[arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile))。从这一时刻起,我们会从这个makefile 继续进行下去。如我们所见,目标`all` 依赖于根makefile 后面声明的`vmlinux`: - -```Makefile -vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE -``` - -`vmlinux` 是linux 内核的静态链接可执行文件格式。脚本[scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) 把不同的编译好的子模块链接到一起形成了vmlinux。第二个目标是`vmlinux-deps`,它的定义如下: - -```Makefile -vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) -``` - -它是由内核代码下的每个顶级目录的`built-in.o` 组成的。之后我们还会检查内核所有的目录,`kbuild` 会编译各个目录下所有的对应`$obj-y` 的源文件。接着调用`$(LD) -r` 把这些文件合并到一个`build-in.o` 文件里。此时我们还没有`vmloinux-deps`, 所以目标`vmlinux` 现在还不会被构建。对我而言`vmlinux-deps` 包含下面的文件 - -``` -arch/x86/kernel/vmlinux.lds arch/x86/kernel/head_64.o -arch/x86/kernel/head64.o arch/x86/kernel/head.o -init/built-in.o usr/built-in.o -arch/x86/built-in.o kernel/built-in.o -mm/built-in.o fs/built-in.o -ipc/built-in.o security/built-in.o -crypto/built-in.o block/built-in.o -lib/lib.a arch/x86/lib/lib.a -lib/built-in.o arch/x86/lib/built-in.o -drivers/built-in.o sound/built-in.o -firmware/built-in.o arch/x86/pci/built-in.o -arch/x86/power/built-in.o arch/x86/video/built-in.o -net/built-in.o -``` - -下一个可以被执行的目标如下: - -```Makefile -$(sort $(vmlinux-deps)): $(vmlinux-dirs) ; -$(vmlinux-dirs): prepare scripts - $(Q)$(MAKE) $(build)=$@ -``` - -就像我们看到的,`vmlinux-dir` 依赖于两部分:`prepare` 和`scripts`。第一个`prepare` 定义在内核的根`makefile` ,准备工作分成三个阶段: - -```Makefile -prepare: prepare0 -prepare0: archprepare FORCE - $(Q)$(MAKE) $(build)=. -archprepare: archheaders archscripts prepare1 scripts_basic - -prepare1: prepare2 $(version_h) include/generated/utsrelease.h \ - include/config/auto.conf - $(cmd_crmodverdir) -prepare2: prepare3 outputmakefile asm-generic -``` - -第一个`prepare0` 展开到`archprepare` ,后者又展开到`archheader` 和`archscripts`,这两个变量定义在`x86_64` 相关的[Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)。让我们看看这个文件。`x86_64` 特定的makefile从变量定义开始,这些变量都是和特定架构的配置文件 ([defconfig](https://github.com/torvalds/linux/tree/master/arch/x86/configs),等等)有关联。变量定义之后,这个makefile 定义了编译[16-bit](https://en.wikipedia.org/wiki/Real_mode)代码的编译选项,根据变量`BITS` 的值,如果是`32`, 汇编代码、链接器、以及其它很多东西(全部的定义都可以在[arch/x86/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile)找到)对应的参数就是`i386`,而`64`就对应的是`x86_84`。生成的系统调用列表(syscall table)的makefile 里第一个目标就是`archheaders` : - -```Makefile -archheaders: - $(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all -``` - -这个makefile 里第二个目标就是`archscripts`: - -```Makefile -archscripts: scripts_basic - $(Q)$(MAKE) $(build)=arch/x86/tools relocs -``` - - 我们可以看到`archscripts` 是依赖于根[Makefile](https://github.com/torvalds/linux/blob/master/Makefile)里的`scripts_basic` 。首先我们可以看出`scripts_basic` 是按照[scripts/basic](https://github.com/torvalds/linux/blob/master/scripts/basic/Makefile) 的mekefile 执行make 的: - -```Maklefile -scripts_basic: - $(Q)$(MAKE) $(build)=scripts/basic -``` - -`scripts/basic/Makefile`包含了编译两个主机程序`fixdep` 和`bin2` 的目标: - -```Makefile -hostprogs-y := fixdep -hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c -always := $(hostprogs-y) - -$(addprefix $(obj)/,$(filter-out fixdep,$(always))): $(obj)/fixdep -``` - -第一个工具是`fixdep`:用来优化[gcc](https://gcc.gnu.org/) 生成的依赖列表,然后在重新编译源文件的时候告诉make。第二个工具是`bin2c`,他依赖于内核配置选项`CONFIG_BUILD_BIN2C`,并且它是一个用来将标准输入接口(注:即stdin)收到的二进制流通过标准输出接口(即:stdout)转换成C 头文件的非常小的C 程序。你可以注意到这里有些奇怪的标志,如`hostprogs-y`等。这些标志使用在所有的`kbuild` 文件,更多的信息你可以从[documentation](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/makefiles.txt) 获得。在我们的用例`hostprogs-y` 中,他告诉`kbuild` 这里有个名为`fixed` 的程序,这个程序会通过和`Makefile` 相同目录的`fixdep.c` 编译而来。执行make 之后,终端的第一个输出就是`kbuild` 的结果: - -``` -$ make - HOSTCC scripts/basic/fixdep -``` - -当目标`script_basic` 被执行,目标`archscripts` 就会make [arch/x86/tools](https://github.com/torvalds/linux/blob/master/arch/x86/tools/Makefile) 下的makefile 和目标`relocs`: - -```Makefile -$(Q)$(MAKE) $(build)=arch/x86/tools relocs -``` - -代码`relocs_32.c` 和`relocs_64.c` 包含了[重定位](https://en.wikipedia.org/wiki/Relocation_%28computing%29) 的信息,将会被编译,者可以在`make` 的输出中看到: - -```Makefile - HOSTCC arch/x86/tools/relocs_32.o - HOSTCC arch/x86/tools/relocs_64.o - HOSTCC arch/x86/tools/relocs_common.o - HOSTLD arch/x86/tools/relocs -``` - -在编译完`relocs.c` 之后会检查`version.h`: - -```Makefile -$(version_h): $(srctree)/Makefile FORCE - $(call filechk,version.h) - $(Q)rm -f $(old_version_h) -``` - -我们可以在输出看到它: - -``` -CHK include/config/kernel.release -``` - -以及在内核根Makefiel 使用`arch/x86/include/generated/asm`的目标`asm-generic` 来构建`generic` 汇编头文件。在目标`asm-generic` 之后,`archprepare` 就会被完成,所以目标`prepare0` 会接着被执行,如我上面所写: - -```Makefile -prepare0: archprepare FORCE - $(Q)$(MAKE) $(build)=. -``` - -注意`build`,它是定义在文件[scripts/Kbuild.include](https://github.com/torvalds/linux/blob/master/scripts/Kbuild.include),内容是这样的: - -```Makefile -build := -f $(srctree)/scripts/Makefile.build obj -``` - -或者在我们的例子中,他就是当前源码目录路径——`.`: -```Makefile -$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.build obj=. -``` - -参数`obj` 会告诉脚本[scripts/Makefile.build](https://github.com/torvalds/linux/blob/master/scripts/Makefile.build) 那些目录包含`kbuild` 文件,脚本以此来寻找各个`kbuild` 文件: - -```Makefile -include $(kbuild-file) -``` - -然后根据这个构建目标。我们这里`.` 包含了[Kbuild](https://github.com/torvalds/linux/blob/master/Kbuild),就用这个文件来生成`kernel/bounds.s` 和`arch/x86/kernel/asm-offsets.s`。这样目标`prepare` 就完成了它的工作。`vmlinux-dirs` 也依赖于第二个目标——`scripts` ,`scripts`会编译接下来的几个程序:`filealias`,`mk_elfconfig`,`modpost`等等。`scripts/host-programs` 编译完之后,我们的目标`vmlinux-dirs` 就可以开始编译了。第一步,我们先来理解一下`vmlinux-dirs` 都包含了那些东西。在我们的例子中它包含了接下来要使用的内核目录的路径: - -``` -init usr arch/x86 kernel mm fs ipc security crypto block -drivers sound firmware arch/x86/pci arch/x86/power -arch/x86/video net lib arch/x86/lib -``` - -我们可以在内核的根[Makefile](https://github.com/torvalds/linux/blob/master/Makefile) 里找到`vmlinux-dirs` 的定义: - -```Makefile -vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ - $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ - $(net-y) $(net-m) $(libs-y) $(libs-m))) - -init-y := init/ -drivers-y := drivers/ sound/ firmware/ -net-y := net/ -libs-y := lib/ -... -... -... -``` - -这里我们借助函数`patsubst` 和`filter`去掉了每个目录路径里的符号`/`,并且把结果放到`vmlinux-dirs` 里。所以我们就有了`vmlinux-dirs` 里的目录的列表,以及下面的代码: - -```Makefile -$(vmlinux-dirs): prepare scripts - $(Q)$(MAKE) $(build)=$@ -``` - -符号`$@` 在这里代表了`vmlinux-dirs`,这就表明程序会递归遍历从`vmlinux-dirs` 以及它内部的全部目录(依赖于配置),并且在对应的目录下执行`make` 命令。我们可以在输出看到结果: - -``` - CC init/main.o - CHK include/generated/compile.h - CC init/version.o - CC init/do_mounts.o - ... - CC arch/x86/crypto/glue_helper.o - AS arch/x86/crypto/aes-x86_64-asm_64.o - CC arch/x86/crypto/aes_glue.o - ... - AS arch/x86/entry/entry_64.o - AS arch/x86/entry/thunk_64.o - CC arch/x86/entry/syscall_64.o -``` - -每个目录下的源代码将会被编译并且链接到`built-io.o` 里: - -``` -$ find . -name built-in.o -./arch/x86/crypto/built-in.o -./arch/x86/crypto/sha-mb/built-in.o -./arch/x86/net/built-in.o -./init/built-in.o -./usr/built-in.o -... -... -``` - -好了,所有的`built-in.o` 都构建完了,现在我们回到目标`vmlinux` 上。你应该还记得,目标`vmlinux` 是在内核的根makefile 里。在链接`vmlinux` 之前,系统会构建[samples](https://github.com/torvalds/linux/tree/master/samples), [Documentation](https://github.com/torvalds/linux/tree/master/Documentation)等等,但是如上文所述,我不会在本文描述这些。 - -```Makefile -vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE - ... - ... - +$(call if_changed,link-vmlinux) -``` - -你可以看到,`vmlinux` 的调用脚本[scripts/link-vmlinux.sh](https://github.com/torvalds/linux/blob/master/scripts/link-vmlinux.sh) 的主要目的是把所有的`built-in.o` 链接成一个静态可执行文件、生成[System.map](https://en.wikipedia.org/wiki/System.map)。 最后我们来看看下面的输出: - -``` - LINK vmlinux - LD vmlinux.o - MODPOST vmlinux.o - GEN .version - CHK include/generated/compile.h - UPD include/generated/compile.h - CC init/version.o - LD init/built-in.o - KSYM .tmp_kallsyms1.o - KSYM .tmp_kallsyms2.o - LD vmlinux - SORTEX vmlinux - SYSMAP System.map -``` - -以及内核源码树根目录下的`vmlinux` 和`System.map` - -``` -$ ls vmlinux System.map -System.map vmlinux -``` - -这就是全部了,`vmlinux` 构建好了,下一步就是创建[bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage). - -制作bzImage --------------------------------------------------------------------------------- - -`bzImage` 就是压缩了的linux 内核镜像。我们可以在构建了`vmlinux` 之后通过执行`make bzImage` 获得`bzImage`。同时我们可以仅仅执行`make` 而不带任何参数也可以生成`bzImage` ,因为它是在[arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile) 里预定义的、默认生成的镜像: - -```Makefile -all: bzImage -``` - -让我们看看这个目标,他能帮助我们理解这个镜像是怎么构建的。我已经说过了`bzImage` 师被定义在[arch/x86/kernel/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/Makefile),定义如下: - -```Makefile -bzImage: vmlinux - $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) - $(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot - $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@ -``` - -在这里我们可以看到第一次为boot 目录执行`make`,在我们的例子里是这样的: - -```Makefile -boot := arch/x86/boot -``` - -现在的主要目标是编译目录`arch/x86/boot` 和`arch/x86/boot/compressed` 的代码,构建`setup.bin` 和`vmlinux.bin`,然后用这两个文件生成`bzImage`。第一个目标是定义在[arch/x86/boot/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/Makefile) 的`$(obj)/setup.elf`: - -```Makefile -$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE - $(call if_changed,ld) -``` - -我们已经在目录`arch/x86/boot`有了链接脚本`setup.ld`,并且将变量`SETUP_OBJS` 扩展到`boot` 目录下的全部源代码。我们可以看看第一个输出: - -```Makefile - AS arch/x86/boot/bioscall.o - CC arch/x86/boot/cmdline.o - AS arch/x86/boot/copy.o - HOSTCC arch/x86/boot/mkcpustr - CPUSTR arch/x86/boot/cpustr.h - CC arch/x86/boot/cpu.o - CC arch/x86/boot/cpuflags.o - CC arch/x86/boot/cpucheck.o - CC arch/x86/boot/early_serial_console.o - CC arch/x86/boot/edd.o -``` - -下一个源码文件是[arch/x86/boot/header.S](https://github.com/torvalds/linux/blob/master/arch/x86/boot/header.S),但是我们不能现在就编译它,因为这个目标依赖于下面两个头文件: - -```Makefile -$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h -``` - -第一个头文件`voffset.h` 是使用`sed` 脚本生成的,包含用`nm` 工具从`vmlinux` 获取的两个地址: - -```C -#define VO__end 0xffffffff82ab0000 -#define VO__text 0xffffffff81000000 -``` - -这两个地址是内核的起始和结束地址。第二个头文件`zoffset.h` 在[arch/x86/boot/compressed/Makefile](https://github.com/torvalds/linux/blob/master/arch/x86/boot/compressed/Makefile) 可以看出是依赖于目标`vmlinux`的: - -```Makefile -$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE - $(call if_changed,zoffset) -``` - -目标`$(obj)/compressed/vmlinux` 依赖于变量`vmlinux-objs-y` —— 说明需要编译目录[arch/x86/boot/compressed](https://github.com/torvalds/linux/tree/master/arch/x86/boot/compressed) 下的源代码,然后生成`vmlinux.bin`, `vmlinux.bin.bz2`, 和编译工具 - `mkpiggy`。我们可以在下面的输出看出来: - -```Makefile - LDS arch/x86/boot/compressed/vmlinux.lds - AS arch/x86/boot/compressed/head_64.o - CC arch/x86/boot/compressed/misc.o - CC arch/x86/boot/compressed/string.o - CC arch/x86/boot/compressed/cmdline.o - OBJCOPY arch/x86/boot/compressed/vmlinux.bin - BZIP2 arch/x86/boot/compressed/vmlinux.bin.bz2 - HOSTCC arch/x86/boot/compressed/mkpiggy -``` - -`vmlinux.bin` 是去掉了调试信息和注释的`vmlinux` 二进制文件,加上了占用了`u32` (注:即4-Byte)的长度信息的`vmlinux.bin.all` 压缩后就是`vmlinux.bin.bz2`。其中`vmlinux.bin.all` 包含了`vmlinux.bin` 和`vmlinux.relocs`(注:vmlinux 的重定位信息),其中`vmlinux.relocs` 是`vmlinux` 经过程序`relocs` 处理之后的`vmlinux` 镜像(见上文所述)。我们现在已经获取到了这些文件,汇编文件`piggy.S` 将会被`mkpiggy` 生成、然后编译: - -```Makefile - MKPIGGY arch/x86/boot/compressed/piggy.S - AS arch/x86/boot/compressed/piggy.o -``` - -这个汇编文件会包含经过计算得来的、压缩内核的偏移信息。处理完这个汇编文件,我们就可以看到`zoffset` 生成了: - -```Makefile - ZOFFSET arch/x86/boot/zoffset.h -``` - -现在`zoffset.h` 和`voffset.h` 已经生成了,[arch/x86/boot](https://github.com/torvalds/linux/tree/master/arch/x86/boot/) 里的源文件可以继续编译: - -```Makefile - AS arch/x86/boot/header.o - CC arch/x86/boot/main.o - CC arch/x86/boot/mca.o - CC arch/x86/boot/memory.o - CC arch/x86/boot/pm.o - AS arch/x86/boot/pmjump.o - CC arch/x86/boot/printf.o - CC arch/x86/boot/regs.o - CC arch/x86/boot/string.o - CC arch/x86/boot/tty.o - CC arch/x86/boot/video.o - CC arch/x86/boot/video-mode.o - CC arch/x86/boot/video-vga.o - CC arch/x86/boot/video-vesa.o - CC arch/x86/boot/video-bios.o -``` - -所有的源代码会被编译,他们最终会被链接到`setup.elf` : - -```Makefile - LD arch/x86/boot/setup.elf -``` - - -或者: - -``` -ld -m elf_x86_64 -T arch/x86/boot/setup.ld arch/x86/boot/a20.o arch/x86/boot/bioscall.o arch/x86/boot/cmdline.o arch/x86/boot/copy.o arch/x86/boot/cpu.o arch/x86/boot/cpuflags.o arch/x86/boot/cpucheck.o arch/x86/boot/early_serial_console.o arch/x86/boot/edd.o arch/x86/boot/header.o arch/x86/boot/main.o arch/x86/boot/mca.o arch/x86/boot/memory.o arch/x86/boot/pm.o arch/x86/boot/pmjump.o arch/x86/boot/printf.o arch/x86/boot/regs.o arch/x86/boot/string.o arch/x86/boot/tty.o arch/x86/boot/video.o arch/x86/boot/video-mode.o arch/x86/boot/version.o arch/x86/boot/video-vga.o arch/x86/boot/video-vesa.o arch/x86/boot/video-bios.o -o arch/x86/boot/setup.elf -``` - -最后两件事是创建包含目录`arch/x86/boot/*` 下的编译过的代码的`setup.bin`: - -``` -objcopy -O binary arch/x86/boot/setup.elf arch/x86/boot/setup.bin -``` - -以及从`vmlinux` 生成`vmlinux.bin` : - -``` -objcopy -O binary -R .note -R .comment -S arch/x86/boot/compressed/vmlinux arch/x86/boot/vmlinux.bin -``` - -最后,我们编译主机程序[arch/x86/boot/tools/build.c](https://github.com/torvalds/linux/blob/master/arch/x86/boot/tools/build.c),它将会用来把`setup.bin` 和`vmlinux.bin` 打包成`bzImage`: - -``` -arch/x86/boot/tools/build arch/x86/boot/setup.bin arch/x86/boot/vmlinux.bin arch/x86/boot/zoffset.h arch/x86/boot/bzImage -``` - -实际上`bzImage` 就是把`setup.bin` 和`vmlinux.bin` 连接到一起。最终我们会看到输出结果,就和那些用源码编译过内核的同行的结果一样: - -``` -Setup is 16268 bytes (padded to 16384 bytes). -System is 4704 kB -CRC 94a88f9a -Kernel: arch/x86/boot/bzImage is ready (#5) -``` - - -全部结束。 - -结论 -================================================================================ - -这就是本文的最后一节。本文我们了解了编译内核的全部步骤:从执行`make` 命令开始,到最后生成`bzImage`。我知道,linux 内核的makefiles 和构建linux 的过程第一眼看起来可能比较迷惑,但是这并不是很难。希望本文可以帮助你理解构建linux 内核的整个流程。 - - -链接 -================================================================================ - -* [GNU make util](https://en.wikipedia.org/wiki/Make_%28software%29) -* [Linux kernel top Makefile](https://github.com/torvalds/linux/blob/master/Makefile) -* [cross-compilation](https://en.wikipedia.org/wiki/Cross_compiler) -* [Ctags](https://en.wikipedia.org/wiki/Ctags) -* [sparse](https://en.wikipedia.org/wiki/Sparse) -* [bzImage](https://en.wikipedia.org/wiki/Vmlinux#bzImage) -* [uname](https://en.wikipedia.org/wiki/Uname) -* [shell](https://en.wikipedia.org/wiki/Shell_%28computing%29) -* [Kbuild](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kbuild.txt) -* [binutils](http://www.gnu.org/software/binutils/) -* [gcc](https://gcc.gnu.org/) -* [Documentation](https://github.com/torvalds/linux/blob/master/Documentation/kbuild/makefiles.txt) -* [System.map](https://en.wikipedia.org/wiki/System.map) -* [Relocation](https://en.wikipedia.org/wiki/Relocation_%28computing%29) - --------------------------------------------------------------------------------- - -via: https://github.com/0xAX/linux-insides/blob/master/Misc/how_kernel_compiled.md - -译者:[译者ID](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 3fdea4dc7dc9fb9ad5ccc3f7284ff8824bf29c76 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 11 Sep 2015 16:20:20 +0800 Subject: [PATCH 2044/2517] =?UTF-8?q?20150911-1=20=E9=80=89=E9=A2=98=20RHC?= =?UTF-8?q?E=20=E6=96=B0=E7=9A=84=E4=B8=A4=E7=AF=87=206=E3=80=817?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ile Sharing on Linux or Windows Clients.md | 208 ++++++++++++++++++ ...-based Authentication for Linux Clients.md | 188 ++++++++++++++++ 2 files changed, 396 insertions(+) create mode 100644 sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md create mode 100644 sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md diff --git a/sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md b/sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md new file mode 100644 index 0000000000..02a538cacc --- /dev/null +++ b/sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md @@ -0,0 +1,208 @@ +Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux/Windows Clients – Part 6 +================================================================================ +Since computers seldom work as isolated systems, it is to be expected that as a system administrator or engineer, you know how to set up and maintain a network with multiple types of servers. + +In this article and in the next of this series we will go through the essentials of setting up Samba and NFS servers with Windows/Linux and Linux clients, respectively. + +![Setup Samba File Sharing on Linux](http://www.tecmint.com/wp-content/uploads/2015/09/setup-samba-file-sharing-on-linux-windows-clients.png) + +RHCE: Setup Samba File Sharing – Part 6 + +This article will definitely come in handy if you’re called upon to set up file servers in corporate or enterprise environments where you are likely to find different operating systems and types of devices. + +Since you can read about the background and the technical aspects of both Samba and NFS all over the Internet, in this article and the next we will cut right to the chase with the topic at hand. + +### Step 1: Installing Samba Server ### + +Our current testing environment consists of two RHEL 7 boxes and one Windows 8 machine, in that order: + + 1. Samba / NFS server [box1 (RHEL 7): 192.168.0.18], + 2. Samba client #1 [box2 (RHEL 7): 192.168.0.20] + 3. Samba client #2 [Windows 8 machine: 192.168.0.106] + +![Testing Setup for Samba](http://www.tecmint.com/wp-content/uploads/2015/09/Testing-Setup-for-Samba.png) + +Testing Setup for Samba + +On box1, install the following packages: + + # yum update && yum install samba samba-client samba-common + +On box2: + + # yum update && yum install samba samba-client samba-common cifs-utils + +Once the installation is complete, we’re ready to configure our share. + +### Step 2: Setting Up File Sharing Through Samba ### + +One of the reason why Samba is so relevant is because it provides file and print services to SMB/CIFS clients, which causes those clients to see the server as if it was a Windows system (I must admit I tend to get a little emotional while writing about this topic as it was my first setup as a new Linux system administrator some years ago). + +**Adding system users and setting up permissions and ownership** + +To allow for group collaboration, we will create a group named finance with two users (user1 and user2) with [useradd command][1] and a directory /finance in box1. + +We will also change the group owner of this directory to finance and set its permissions to 0770 (read, write, and execution permissions for the owner and the group owner): + + # groupadd finance + # useradd user1 + # useradd user2 + # usermod -a -G finance user1 + # usermod -a -G finance user2 + # mkdir /finance + # chmod 0770 /finance + # chgrp finance /finance + +### Step 3:​ Configuring SELinux and Firewalld ### + +In preparation to configure /finance as a Samba share, we will need to either disable SELinux or set the proper boolean and security context values as follows (otherwise, SELinux will prevent clients from accessing the share): + + # setsebool -P samba_export_all_ro=1 samba_export_all_rw=1 + # getsebool –a | grep samba_export + # semanage fcontext –at samba_share_t "/finance(/.*)?" + # restorecon /finance + +In addition, we must ensure that Samba traffic is allowed by the [firewalld][2]. + + # firewall-cmd --permanent --add-service=samba + # firewall-cmd --reload + +### Step 4: Configure Samba Share ### + +Now it’s time to dive into the configuration file /etc/samba/smb.conf and add the section for our share: we want the members of the finance group to be able to browse the contents of /finance, and save / create files or subdirectories in it (which by default will have their permission bits set to 0770 and finance will be their group owner): + +**smb.conf** + +---------- + + [finance] + comment=Directory for collaboration of the company's finance team + browsable=yes + path=/finance + public=no + valid users=@finance + write list=@finance + writeable=yes + create mask=0770 + Force create mode=0770 + force group=finance + +Save the file and then test it with the testparm utility. If there are any errors, the output of the following command will indicate what you need to fix. Otherwise, it will display a review of your Samba server configuration: + +![Test Samba Configuration](http://www.tecmint.com/wp-content/uploads/2015/09/Test-Samba-Configuration.png) + +Test Samba Configuration + +Should you want to add another share that is open to the public (meaning without any authentication whatsoever), create another section in /etc/samba/smb.conf and under the new share’s name copy the section above, only changing public=no to public=yes and not including the valid users and write list directives. + +### Step 5: Adding Samba Users ### + +Next, you will need to add user1 and user2 as Samba users. To do so, you will use the smbpasswd command, which interacts with Samba’s internal database. You will be prompted to enter a password that you will later use to connect to the share: + + # smbpasswd -a user1 + # smbpasswd -a user2 + +Finally, restart Samba, enable the service to start on boot, and make sure the share is actually available to network clients: + + # systemctl start smb + # systemctl enable smb + # smbclient -L localhost –U user1 + # smbclient -L localhost –U user2 + +![Verify Samba Share](http://www.tecmint.com/wp-content/uploads/2015/09/Verify-Samba-Share.png) + +Verify Samba Share + +At this point, the Samba file server has been properly installed and configured. Now it’s time to test this setup on our RHEL 7 and Windows 8 clients. + +### Step 6:​ Mounting the Samba Share in Linux ### + +First, make sure the Samba share is accessible from this client: + +# smbclient –L 192.168.0.18 -U user2 + +![Mount Samba Share on Linux](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Share-on-Linux.png) + +Mount Samba Share on Linux + +(repeat the above command for user1) + +As any other storage media, you can mount (and later unmount) this network share when needed: + + # mount //192.168.0.18/finance /media/samba -o username=user1 + +![Mount Samba Network Share](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Network-Share.png) + +Mount Samba Network Share + +(where /media/samba is an existing directory) + +or permanently, by adding the following entry in /etc/fstab file: + +**fstab** + +---------- + + //192.168.0.18/finance /media/samba cifs credentials=/media/samba/.smbcredentials,defaults 0 0 + +Where the hidden file /media/samba/.smbcredentials (whose permissions and ownership have been set to 600 and root:root, respectively) contains two lines that indicate the username and password of an account that is allowed to use the share: + +**.smbcredentials** + +---------- + + username=user1 + password=PasswordForUser1 + +Finally, let’s create a file inside /finance and check the permissions and ownership: + + # touch /media/samba/FileCreatedInRHELClient.txt + +![Create File in Samba Share](http://www.tecmint.com/wp-content/uploads/2015/09/Create-File-in-Samba-Share.png) + +Create File in Samba Share + +As you can see, the file was created with 0770 permissions and ownership set to user1:finance. + +### Step 7: Mounting the Samba Share in Windows ### + +To mount the Samba share in Windows, go to My PC and choose Computer, then Map network drive. Next, assign a letter for the drive to be mapped and check Connect using different credentials (the screenshots below are in Spanish, my native language): + +![Mount Samba Share in Windows](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Share-in-Windows.png) + +Mount Samba Share in Windows + +Finally, let’s create a file and check the permissions and ownership: + +![Create Files on Windows Samba Share](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Files-on-Windows-Samba-Share.png) + +Create Files on Windows Samba Share + + # ls -l /finance + +This time the file belongs to user2 since that’s the account we used to connect from the Windows client. + +### Summary ### + +In this article we have explained not only how to set up a Samba server and two clients using different operating systems, but also [how to configure the firewalld][3] and [SELinux on the server][4] to allow the desired group collaboration capabilities. + +Last, but not least, let me recommend the reading of the online [man page of smb.conf][5] to explore other configuration directives that may be more suitable for your case than the scenario described in this article. + +As always, feel free to drop a comment using the form below if you have any comments or suggestions. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/setup-samba-file-sharing-for-linux-windows-clients/ + +作者:[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/add-users-in-linux/ +[2]:http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in-firewall/ +[3]:http://www.tecmint.com/configure-firewalld-in-centos-7/ +[4]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ +[5]:https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html \ No newline at end of file diff --git a/sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md b/sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md new file mode 100644 index 0000000000..2f0ca53dd5 --- /dev/null +++ b/sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md @@ -0,0 +1,188 @@ +Setting Up NFS Server with Kerberos-based Authentication for Linux Clients – Part 7 +================================================================================ +In the last article of this series, we reviewed [how to set up a Samba share over a network][1] that may consist of multiple types of operating systems. Now, if you need to set up file sharing for a group of Unix-like clients you will automatically think of the Network File System, or NFS for short. + +![Setting Up NFS Server with Kerberos Authentication](http://www.tecmint.com/wp-content/uploads/2015/09/Setting-Kerberos-Authentication-with-NFS.jpg) + +RHCE Series: Setting Up NFS Server with Kerberos Authentication – Part 7 + +In this article we will walk you through the process of using Kerberos-based authentication for NFS shares. It is assumed that you already have set up a NFS server and a client. If not, please refer to [install and configure NFS server][2] – which will list the necessary packages that need to be installed and explain how to perform initial configurations on the server before proceeding further. + +In addition, you will want to configure both [SELinux][3] and [firewalld][4] to allow for file sharing through NFS. + +The following example assumes that your NFS share is located in /nfs in box2: + + # semanage fcontext -a -t public_content_rw_t "/nfs(/.*)?" + # restorecon -R /nfs + # setsebool -P nfs_export_all_rw on + # setsebool -P nfs_export_all_ro on + +(where the -P flag indicates persistence across reboots). + +Finally, don’t forget to: + +#### Create NFS Group and Configure NFS Share Directory #### + +1. Create a group called nfs and add the nfsnobody user to it, then change the permissions of the /nfs directory to 0770 and its group owner to nfs. Thus, nfsnobody (which is mapped to the client requests) will have write permissions on the share) and you won’t need to use no_root_squash in the /etc/exports file. + + # groupadd nfs + # usermod -a -G nfs nfsnobody + # chmod 0770 /nfs + # chgrp nfs /nfs + +2. Modify the exports file (/etc/exports) as follows to only allow access from box1 using Kerberos security (sec=krb5). + +**Note**: that the value of anongid has been set to the GID of the nfs group that we created previously: + +**exports – Add NFS Share** + +---------- + + /nfs box1(rw,sec=krb5,anongid=1004) + +3. Re-export (-r) all (-a) the NFS shares. Adding verbosity to the output (-v) is a good idea since it will provide helpful information to troubleshoot the server if something goes wrong: + + # exportfs -arv + +4. Restart and enable the NFS server and related services. Note that you don’t have to enable nfs-lock and nfs-idmapd because they will be automatically started by the other services on boot: + + # systemctl restart rpcbind nfs-server nfs-lock nfs-idmap + # systemctl enable rpcbind nfs-server + +#### Testing Environment and Other Prerequisites #### + +In this guide we will use the following test environment: + +- Client machine [box1: 192.168.0.18] +- NFS / Kerberos server [box2: 192.168.0.20] (also known as Key Distribution Center, or KDC for short). + +**Note**: that Kerberos service is crucial to the authentication scheme. + +As you can see, the NFS server and the KDC are hosted in the same machine for simplicity, although you can set them up in separate machines if you have more available. Both machines are members of the `mydomain.com` domain. + +Last but not least, Kerberos requires at least a basic schema of name resolution and the [Network Time Protocol][5] service to be present in both client and server since the security of Kerberos authentication is in part based upon the timestamps of tickets. + +To set up name resolution, we will use the /etc/hosts file in both client and server: + +**host file – Add DNS for Domain** + +---------- + + 192.168.0.18 box1.mydomain.com box1 + 192.168.0.20 box2.mydomain.com box2 + +In RHEL 7, chrony is the default software that is used for NTP synchronization: + + # yum install chrony + # systemctl start chronyd + # systemctl enable chronyd + +To make sure chrony is actually synchronizing your system’s time with time servers you may want to issue the following command two or three times and make sure the offset is getting nearer to zero: + + # chronyc tracking + +![Synchronize Server Time with Chrony](http://www.tecmint.com/wp-content/uploads/2015/09/Synchronize-Time-with-Chrony.png) + +Synchronize Server Time with Chrony + +### Installing and Configuring Kerberos ### + +To set up the KDC, install the following packages on both server and client (omit the server package in the client): + + # yum update && yum install krb5-server krb5-workstation pam_krb5 + +Once it is installed, edit the configuration files (/etc/krb5.conf and /var/kerberos/krb5kdc/kadm5.acl) and replace all instances of example.com (lowercase and uppercase) with `mydomain.com` as follows. + +Next, enable Kerberos through the firewall and start / enable the related services. + +**Important**: nfs-secure must be started and enabled on the client as well: + + # firewall-cmd --permanent --add-service=kerberos + # systemctl start krb5kdc kadmin nfs-secure + # systemctl enable krb5kdc kadmin nfs-secure + +Now create the Kerberos database (please note that this may take a while as it requires a some level of entropy in your system. To speed things up, I opened another terminal and ran ping -f localhost for 30-45 seconds): + + # kdb5_util create -s + +![Create Kerberos Database](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Kerberos-Database.png) + +Create Kerberos Database + +Next, using the kadmin.local tool, create an admin principal for root: + + # kadmin.local + # addprinc root/admin + +And add the Kerberos server to the database: + + # addprinc -randkey host/box2.mydomain.com + +Same with the NFS service for both client (box1) and server (box2). Please note that in the screenshot below I forgot to do it for box1 before quitting: + + # addprinc -randkey nfs/box2.mydomain.com + # addprinc -randkey nfs/box1.mydomain.com + +And exit by typing quit and pressing Enter: + +![Add Kerberos to NFS Server](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Kerboros-for-NFS.png) + +Add Kerberos to NFS Server + +Then obtain and cache Kerberos ticket-granting ticket for root/admin: + + # kinit root/admin + # klist + +![Cache Kerberos](http://www.tecmint.com/wp-content/uploads/2015/09/Cache-kerberos-Ticket.png) + +Cache Kerberos + +The last step before actually using Kerberos is storing into a keytab file (in the server) the principals that are authorized to use Kerberos authentication: + + # kdadmin.local + # ktadd host/box2.mydomain.com + # ktadd nfs/box2.mydomain.com + # ktadd nfs/box1.mydomain.com + +Finally, mount the share and perform a write test: + + # mount -t nfs4 -o sec=krb5 box2:/nfs /mnt + # echo "Hello from Tecmint.com" > /mnt/greeting.txt + +![Mount NFS Share](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-NFS-Share.png) + +Mount NFS Share + +Let’s now unmount the share, rename the keytab file in the client (to simulate it’s not present) and try to mount the share again: + + # umount /mnt + # mv /etc/krb5.keytab /etc/krb5.keytab.orig + +![Mount Unmount Kerberos NFS Share](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Unmount-Kerberos-NFS-Share.png) + +Mount Unmount Kerberos NFS Share + +Now you can use the NFS share with Kerberos-based authentication. + +### Summary ### + +In this article we have explained how to set up NFS with Kerberos authentication. Since there is much more to the topic than we can cover in a single guide, feel free to check the online [Kerberos documentation][6] and since Kerberos is a bit tricky to say the least, don’t hesitate to drop us a note using the form below if you run into any issue or need help with your testing or implementation. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/setting-up-nfs-server-with-kerberos-based-authentication/ + +作者:[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/setup-samba-file-sharing-for-linux-windows-clients/ +[2]:http://www.tecmint.com/configure-nfs-server/ +[3]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ +[4]:http://www.tecmint.com/firewalld-rules-for-centos-7/ +[5]:http://www.tecmint.com/install-ntp-server-in-centos/ +[6]:http://web.mit.edu/kerberos/krb5-1.12/doc/admin/admin_commands/ \ No newline at end of file From 93c32f1b55a7d3b915448e7df6eca4d47d41aa5a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 11 Sep 2015 16:38:04 +0800 Subject: [PATCH 2045/2517] =?UTF-8?q?20150911-2=20=E9=80=89=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E8=BF=99=E4=B8=A4=E7=AF=87=E6=9C=89=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E7=AF=87=EF=BC=8C=E6=98=AF=E4=BB=8A=E5=B9=B4?= =?UTF-8?q?=E4=B8=89=E6=9C=88=E4=BB=BD=E7=9A=84=EF=BC=8C=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E5=86=99=E5=9C=A8=E8=AF=B4=E6=98=8E=E4=B8=AD=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第一篇的文件名:20150316 5 Interesting Command Line Tips and Tricks in Linux--Part 1.md --- ...Command Line Tricks for Newbies--Part 2.md | 250 ++++++++++++++++ ...e Types and System Time in Linu--Part 3.md | 279 ++++++++++++++++++ 2 files changed, 529 insertions(+) create mode 100644 sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md create mode 100644 sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md diff --git a/sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md b/sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md new file mode 100644 index 0000000000..09fd4c879d --- /dev/null +++ b/sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md @@ -0,0 +1,250 @@ +10 Useful Linux Command Line Tricks for Newbies – Part 2 +================================================================================ +I remember when I first started using Linux and I was used to the graphical interface of Windows, I truly hated the Linux terminal. Back then I was finding the commands hard to remember and proper use of each one of them. With time I realised the beauty, flexibility and usability of the Linux terminal and to be honest a day doesn’t pass without using. Today, I would like to share some useful tricks and tips for Linux new comers to ease their transition to Linux or simply help them learn something new (hopefully). + +![10 Linux Commandline Tricks for Newbies](http://www.tecmint.com/wp-content/uploads/2015/09/10-Linux-Commandline-Tricks.jpg) + +10 Linux Commandline Tricks – Part 2 + +- [5 Interesting Command Line Tips and Tricks in Linux – Part 1][1] +- [5 Useful Commands to Manage Linux File Types – Part 3][2] + +This article intends to show you some useful tricks how to use the Linux terminal like a pro with minimum amount of skills. All you need is a Linux terminal and some free time to test these commands. + +### 1. Find the right command ### + +Executing the right command can be vital for your system. However in Linux there are so many different command lines that they are often hard to remember. So how do you search for the right command you need? The answer is apropos. All you need to run is: + + # apropos + +Where you should change the “description” with the actual description of the command you are looking for. Here is a good example: + + # apropos "list directory" + + dir (1) - list directory contents + ls (1) - list directory contents + ntfsls (8) - list directory contents on an NTFS filesystem + vdir (1) - list directory contents + +On the left you can see the commands and on the right their description. + +### 2. Execute Previous Command ### + +Many times you will need to execute the same command over and over again. While you can repeatedly press the Up key on your keyboard, you can use the history command instead. This command will list all commands you entered since you launched the terminal: + + # history + + 1 fdisk -l + 2 apt-get install gnome-paint + 3 hostname tecmint.com + 4 hostnamectl tecmint.com + 5 man hostnamectl + 6 hostnamectl --set-hostname tecmint.com + 7 hostnamectl -set-hostname tecmint.com + 8 hostnamectl set-hostname tecmint.com + 9 mount -t "ntfs" -o + 10 fdisk -l + 11 mount -t ntfs-3g /dev/sda5 /mnt + 12 mount -t rw ntfs-3g /dev/sda5 /mnt + 13 mount -t -rw ntfs-3g /dev/sda5 /mnt + 14 mount -t ntfs-3g /dev/sda5 /mnt + 15 mount man + 16 man mount + 17 mount -t -o ntfs-3g /dev/sda5 /mnt + 18 mount -o ntfs-3g /dev/sda5 /mnt + 19 mount -ro ntfs-3g /dev/sda5 /mnt + 20 cd /mnt + ... + +As you will see from the output above, you will receive a list of all commands that you have ran. On each line you have number indicating the row in which you have entered the command. You can recall that command by using: + + !# + +Where # should be changed with the actual number of the command. For better understanding, see the below example: + + !501 + +Is equivalent to: + + # history + +### 3. Use midnight Commander ### + +If you are not used to using commands such cd, cp, mv, rm than you can use the midnight command. It is an easy to use visual shell in which you can also use mouse: + +![Midnight Commander in Action](http://www.tecmint.com/wp-content/uploads/2015/09/mc-command.jpg) + +Midnight Commander in Action + +Thanks to the F1 – F12 keys, you can easy perform different tasks. Simply check the legend at the bottom. To select a file or folder click the “Insert” button. + +In short the midnight command is called “mc“. To install mc on your system simply run: + + $ sudo apt-get install mc [On Debian based systems] + +---------- + + # yum install mc [On Fedora based systems] + +Here is a simple example of using midnight commander. Open mc by simply typing: + + # mc + +Now use the TAB button to switch between windows – left and right. I have a LibreOffice file that I will move to “Software” folder: + +![Midnight Commander Move Files](http://www.tecmint.com/wp-content/uploads/2015/09/Midnight-Commander-Move-Files.jpg) + +Midnight Commander Move Files + +To move the file in the new directory press F6 button on your keyboard. MC will now ask you for confirmation: + +![Move Files to New Directory](http://www.tecmint.com/wp-content/uploads/2015/09/Move-Files-to-new-Directory.png) + +Move Files to New Directory + +Once confirmed, the file will be moved in the new destination directory. + +Read More: [How to Use Midnight Commander File Manager in Linux][4] + +### 4. Shutdown Computer at Specific Time ### + +Sometimes you will need to shutdown your computer some hours after your work hours have ended. You can configure your computer to shut down at specific time by using: + + $ sudo shutdown 21:00 + +This will tell your computer to shut down at the specific time you have provided. You can also tell the system to shutdown after specific amount of minutes: + + $ sudo shutdown +15 + +That way the system will shut down in 15 minutes. + +### 5. Show Information about Known Users ### + +You can use a simple command to list your Linux system users and some basic information about them. Simply use: + + # lslogins + +This should bring you the following output: + + UID USER PWD-LOCK PWD-DENY LAST-LOGIN GECOS + 0 root 0 0 Apr29/11:35 root + 1 bin 0 1 bin + 2 daemon 0 1 daemon + 3 adm 0 1 adm + 4 lp 0 1 lp + 5 sync 0 1 sync + 6 shutdown 0 1 Jul19/10:04 shutdown + 7 halt 0 1 halt + 8 mail 0 1 mail + 10 uucp 0 1 uucp + 11 operator 0 1 operator + 12 games 0 1 games + 13 gopher 0 1 gopher + 14 ftp 0 1 FTP User + 23 squid 0 1 + 25 named 0 1 Named + 27 mysql 0 1 MySQL Server + 47 mailnull 0 1 + 48 apache 0 1 Apache + ... + +### 6. Search for Files ### + +Searching for files can sometimes be not as easy as you think. A good example for searching for files is: + + # find /home/user -type f + +This command will search for all files located in /home/user. The find command is extremely powerful one and you can pass more options to it to make your search even more detailed. If you want to search for files larger than given size, you can use: + + # find . -type f -size 10M + +The above command will search from current directory for all files that are larger than 10 MB. Make sure not to run the command from the root directory of your Linux system as this may cause high I/O on your machine. + +One of the most frequently used combinations that I use find with is “exec” option, which basically allows you to run some actions on the results of the find command. + +For example, lets say that we want to find all files in a directory and change their permissions. This can be easily done with: + + # find /home/user/files/ -type f -exec chmod 644 {} \; + +The above command will search for all files in the specified directory recursively and will executed chmod command on the found files. I am sure you will find many more uses on this command in future, for now read [35 Examples of Linux ‘find’ Command and Usage][5]. + +### 7. Build Directory Trees with one Command ### + +You probably know that you can create new directories by using the mkdir command. So if you want to create a new folder you will run something like this: + + # mkdir new_folder + +But what, if you want to create 5 subfolders within that folder? Running mkdir 5 times in a row is not a good solution. Instead you can use -p option like that: + + # mkdir -p new_folder/{folder_1,folder_2,folder_3,folder_4,folder_5} + +In the end you should have 5 folders located in new_folder: + + # ls new_folder/ + + folder_1 folder_2 folder_3 folder_4 folder_5 + +### 8. Copy File into Multiple Directories ### + +File copying is usually performed with the cp command. Copying a file usually looks like this: + + # cp /path-to-file/my_file.txt /path-to-new-directory/ + +Now imagine that you need to copy that file in multiple directories: + + # cp /home/user/my_file.txt /home/user/1 + # cp /home/user/my_file.txt /home/user/2 + # cp /home/user/my_file.txt /home/user/3 + +This is a bit absurd. Instead you can solve the problem with a simple one line command: + + # echo /home/user/1/ /home/user/2/ /home/user/3/ | xargs -n 1 cp /home/user/my_file.txt + +### 9. Deleting Larger Files ### + +Sometimes files can grow extremely large. I have seen cases where a single log file went over 250 GB large due to poor administrating skills. Removing the file with rm utility might not be sufficient in such cases due to the fact that there is extremely large amount of data that needs to be removed. The operation will be a “heavy” one and should be avoided. Instead, you can go with a really simple solution: + + # > /path-to-file/huge_file.log + +Where of course you will need to change the path and the file names with the exact ones to match your case. The above command will simply write an empty output to the file. In more simpler words it will empty the file without causing high I/O on your system. + +### 10. Run Same Command on Multiple Linux Servers ### + +Recently one of our readers asked in our [LinuxSay forum][6], how to execute single command to multiple Linux boxes at once using SSH. He had his machines IP addresses looking like this: + + 10.0.0.1 + 10.0.0.2 + 10.0.0.3 + 10.0.0.4 + 10.0.0.5 + +So here is a simple solution of this issue. Collect the IP addresses of the servers in a one file called list.txt one under other just as shown above. Then you can run: + + # for in $i(cat list.txt); do ssh user@$i 'bash command'; done + +In the above example you will need to change “user” with the actual user with which you will be logging and “bash command” with the actual bash command you wish to execute. The method is better working when you are [using passwordless authentication with SSH key][7] to your machines as that way you will not need to enter the password for your user over and over again. + +Note that you may need to pass some additional parameters to the SSH command depending on your Linux boxes setup. + +### Conclusion ### + +The above examples are really simple ones and I hope they have helped you to find some of the beauty of Linux and how you can easily perform different operations that can take much more time on other operating systems. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/10-useful-linux-command-line-tricks-for-newbies/ + +作者:[Marin Todorov][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/marintodorov89/ +[1]:http://www.tecmint.com/5-linux-command-line-tricks/ +[2]:http://www.tecmint.com/manage-file-types-and-set-system-time-in-linux/ +[3]:http://www.tecmint.com/history-command-examples/ +[4]:http://www.tecmint.com/midnight-commander-a-console-based-file-manager-for-linux/ +[5]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/ +[6]:http://www.linuxsay.com/ +[7]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ \ No newline at end of file diff --git a/sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md b/sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md new file mode 100644 index 0000000000..2226b72297 --- /dev/null +++ b/sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md @@ -0,0 +1,279 @@ +5 Useful Commands to Manage File Types and System Time in Linux – Part 3 +================================================================================ +Adapting to using the command line or terminal can be very hard for beginners who want to learn Linux. Because the terminal gives more control over a Linux system than GUIs programs, one has to get a used to running commands on the terminal. Therefore to memorize different commands in Linux, you should use the terminal on a daily basis to understand how commands are used with different options and arguments. + +![Manage File Types and Set Time in Linux](http://www.tecmint.com/wp-content/uploads/2015/09/Find-File-Types-in-Linux.jpg) + +Manage File Types and Set Time in Linux – Part 3 + +Please go through our previous parts of this [Linux Tricks][1] series. + +- [5 Interesting Command Line Tips and Tricks in Linux – Part 1][2] +- [ Useful Commandline Tricks for Newbies – Part 2][3] + +In this article, we are going to look at some tips and tricks of using 10 commands to work with files and time on the terminal. + +### File Types in Linux ### + +In Linux, everything is considered as a file, your devices, directories and regular files are all considered as files. + +There are different types of files in a Linux system: + +- Regular files which may include commands, documents, music files, movies, images, archives and so on. +- Device files: which are used by the system to access your hardware components. + +There are two types of device files block files that represent storage devices such as harddisks, they read data in blocks and character files read data in a character by character manner. + +- Hardlinks and softlinks: they are used to access files from any where on a Linux filesystem. +- Named pipes and sockets: allow different processes to communicate with each other. + +#### 1. Determining the type of a file using ‘file’ command #### + +You can determine the type of a file by using the file command as follows. The screenshot below shows different examples of using the file command to determine the types of different files. + + tecmint@tecmint ~/Linux-Tricks $ dir + BACKUP master.zip + crossroads-stable.tar.gz num.txt + EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 reggea.xspf + Linux-Security-Optimization-Book.gif tmp-link + + tecmint@tecmint ~/Linux-Tricks $ file BACKUP/ + BACKUP/: directory + + tecmint@tecmint ~/Linux-Tricks $ file master.zip + master.zip: Zip archive data, at least v1.0 to extract + + tecmint@tecmint ~/Linux-Tricks $ file crossroads-stable.tar.gz + crossroads-stable.tar.gz: gzip compressed data, from Unix, last modified: Tue Apr 5 15:15:20 2011 + + tecmint@tecmint ~/Linux-Tricks $ file Linux-Security-Optimization-Book.gif + Linux-Security-Optimization-Book.gif: GIF image data, version 89a, 200 x 259 + + tecmint@tecmint ~/Linux-Tricks $ file EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 + EDWARD-MAYA-2011-2012-NEW-REMIX.mp3: Audio file with ID3 version 2.3.0, contains: MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, JntStereo + + tecmint@tecmint ~/Linux-Tricks $ file /dev/sda1 + /dev/sda1: block special + + tecmint@tecmint ~/Linux-Tricks $ file /dev/tty1 + /dev/tty1: character special + +#### 2. Determining the file type using ‘ls’ and ‘dir’ commands #### + +Another way of determining the type of a file is by performing a long listing using the ls and [dir][4] commands. + +Using ls -l to determine the type of a file. + +When you view the file permissions, the first character shows the file type and the other charcters show the file permissions. + + tecmint@tecmint ~/Linux-Tricks $ ls -l + total 6908 + drwxr-xr-x 2 tecmint tecmint 4096 Sep 9 11:46 BACKUP + -rw-r--r-- 1 tecmint tecmint 1075620 Sep 9 11:47 crossroads-stable.tar.gz + -rwxr----- 1 tecmint tecmint 5916085 Sep 9 11:49 EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 + -rw-r--r-- 1 tecmint tecmint 42122 Sep 9 11:49 Linux-Security-Optimization-Book.gif + -rw-r--r-- 1 tecmint tecmint 17627 Sep 9 11:46 master.zip + -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:48 num.txt + -rw-r--r-- 1 tecmint tecmint 0 Sep 9 11:46 reggea.xspf + -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:47 tmp-link + +Using ls -l to determine block and character files. + + tecmint@tecmint ~/Linux-Tricks $ ls -l /dev/sda1 + brw-rw---- 1 root disk 8, 1 Sep 9 10:53 /dev/sda1 + + tecmint@tecmint ~/Linux-Tricks $ ls -l /dev/tty1 + crw-rw---- 1 root tty 4, 1 Sep 9 10:54 /dev/tty1 + +Using dir -l to determine the type of a file. + + tecmint@tecmint ~/Linux-Tricks $ dir -l + total 6908 + drwxr-xr-x 2 tecmint tecmint 4096 Sep 9 11:46 BACKUP + -rw-r--r-- 1 tecmint tecmint 1075620 Sep 9 11:47 crossroads-stable.tar.gz + -rwxr----- 1 tecmint tecmint 5916085 Sep 9 11:49 EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 + -rw-r--r-- 1 tecmint tecmint 42122 Sep 9 11:49 Linux-Security-Optimization-Book.gif + -rw-r--r-- 1 tecmint tecmint 17627 Sep 9 11:46 master.zip + -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:48 num.txt + -rw-r--r-- 1 tecmint tecmint 0 Sep 9 11:46 reggea.xspf + -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:47 tmp-link + +#### 3. Counting number of files of a specific type #### + +Next we shall look at tips on counting number of files of a specific type in a given directory using the ls, [grep][5] and [wc][6] commands. Communication between the commands is achieved through named piping. + +- grep – command to search according to a given pattern or regular expression. +- wc – command to count lines, words and characters. + +Counting number of regular files + +In Linux, regular files are represented by the `–` symbol. + + tecmint@tecmint ~/Linux-Tricks $ ls -l | grep ^- | wc -l + 7 + +**Counting number of directories** + +In Linux, directories are represented by the `d` symbol. + + tecmint@tecmint ~/Linux-Tricks $ ls -l | grep ^d | wc -l + 1 + +**Counting number of symbolic and hard links** + +In Linux, symblic and hard links are represented by the l symbol. + + tecmint@tecmint ~/Linux-Tricks $ ls -l | grep ^l | wc -l + 0 + +**Counting number of block and character files** + +In Linux, block and character files are represented by the `b` and `c` symbols respectively. + + tecmint@tecmint ~/Linux-Tricks $ ls -l /dev | grep ^b | wc -l + 37 + tecmint@tecmint ~/Linux-Tricks $ ls -l /dev | grep ^c | wc -l + 159 + +#### 4. Finding files on a Linux system #### + +Next we shall look at some commands one can use to find files on a Linux system, these include the locate, find, whatis and which commands. + +**Using the locate command to find files** + +In the output below, I am trying to locate the [Samba server configuration][7] for my system. + + tecmint@tecmint ~/Linux-Tricks $ locate samba.conf + /usr/lib/tmpfiles.d/samba.conf + /var/lib/dpkg/info/samba.conffiles + +**Using the find command to find files** + +To learn how to use the find command in Linux, you can read our following article that shows more than 30+ practical examples and usage of find command in Linux. + +- [35 Examples of ‘find’ Command in Linux][8] + +**Using the whatis command to locate commands** + +The whatis command is mostly used to locate commands and it is special because it gives information about a command, it also finds configurations files and manual entries for a command. + + tecmint@tecmint ~/Linux-Tricks $ whatis bash + bash (1) - GNU Bourne-Again SHell + + tecmint@tecmint ~/Linux-Tricks $ whatis find + find (1) - search for files in a directory hierarchy + + tecmint@tecmint ~/Linux-Tricks $ whatis ls + ls (1) - list directory contents + +**Using which command to locate commands** + +The which command is used to locate commands on the filesystem. + + tecmint@tecmint ~/Linux-Tricks $ which mkdir + /bin/mkdir + + tecmint@tecmint ~/Linux-Tricks $ which bash + /bin/bash + + tecmint@tecmint ~/Linux-Tricks $ which find + /usr/bin/find + + tecmint@tecmint ~/Linux-Tricks $ $ which ls + /bin/ls + +#### 5. Working with time on your Linux system #### + +When working in a networked environment, it is a good practice to keep the correct time on your Linux system. There are certain services on Linux systems that require correct time to work efficiently on a network. + +We shall look at commands you can use to manage time on your machine. In Linux, time is managed in two ways: system time and hardware time. + +The system time is managed by a system clock and the hardware time is managed by a hardware clock. + +To view your system time, date and timezone, use the date command as follows. + + tecmint@tecmint ~/Linux-Tricks $ date + Wed Sep 9 12:25:40 IST 2015 + +Set your system time using date -s or date –set=”STRING” as follows. + + tecmint@tecmint ~/Linux-Tricks $ sudo date -s "12:27:00" + Wed Sep 9 12:27:00 IST 2015 + + tecmint@tecmint ~/Linux-Tricks $ sudo date --set="12:27:00" + Wed Sep 9 12:27:00 IST 2015 + +You can also set time and date as follows. + + tecmint@tecmint ~/Linux-Tricks $ sudo date 090912302015 + Wed Sep 9 12:30:00 IST 2015 + +Viewing current date from a calendar using cal command. + + tecmint@tecmint ~/Linux-Tricks $ cal + September 2015 + Su Mo Tu We Th Fr Sa + 1 2 3 4 5 + 6 7 8 9 10 11 12 + 13 14 15 16 17 18 19 + 20 21 22 23 24 25 26 + 27 28 29 30 + +View hardware clock time using the hwclock command. + + tecmint@tecmint ~/Linux-Tricks $ sudo hwclock + Wednesday 09 September 2015 06:02:58 PM IST -0.200081 seconds + +To set the hardware clock time, use hwclock –set –date=”STRING” as follows. + + tecmint@tecmint ~/Linux-Tricks $ sudo hwclock --set --date="09/09/2015 12:33:00" + + tecmint@tecmint ~/Linux-Tricks $ sudo hwclock + Wednesday 09 September 2015 12:33:11 PM IST -0.891163 seconds + +The system time is set by the hardware clock during booting and when the system is shutting down, the hardware time is reset to the system time. + +Therefore when you view system time and hardware time, they are the same unless when you change the system time. Your hardware time may be incorrect when the CMOS battery is weak. + +You can also set your system time using time from the hardware clock as follows. + + $ sudo hwclock --hctosys + +It is also possible to set hardware clock time using the system clock time as follows. + + $ sudo hwclock --systohc + +To view how long your Linux system has been running, use the uptime command. + + tecmint@tecmint ~/Linux-Tricks $ uptime + 12:36:27 up 1:43, 2 users, load average: 1.39, 1.34, 1.45 + + tecmint@tecmint ~/Linux-Tricks $ uptime -p + up 1 hour, 43 minutes + + tecmint@tecmint ~/Linux-Tricks $ uptime -s + 2015-09-09 10:52:47 + +### Summary ### + +Understanding file types is Linux is a good practice for begginers, and also managing time is critical especially on servers to manage services reliably and efficiently. Hope you find this guide helpful. If you have any additional information, do not forget to post a comment. Stay connected to Tecmint. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-file-types-and-set-system-time-in-linux/ + +作者:[Aaron Kili][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/aaronkili/ +[1]:http://www.tecmint.com/tag/linux-tricks/ +[2]:http://www.tecmint.com/free-online-linux-learning-guide-for-beginners/ +[3]:http://www.tecmint.com/10-useful-linux-command-line-tricks-for-newbies/ +[4]:http://www.tecmint.com/linux-dir-command-usage-with-examples/ +[5]:http://www.tecmint.com/12-practical-examples-of-linux-grep-command/ +[6]:http://www.tecmint.com/wc-command-examples/ +[7]:http://www.tecmint.com/setup-samba-file-sharing-for-linux-windows-clients/ +[8]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/ \ No newline at end of file From 2b6f609557e5530b3b946f2b8a920273ebb7b247 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 11 Sep 2015 20:19:14 +0800 Subject: [PATCH 2046/2517] [Translated] tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md --- ...h In Ubuntu And elementary OS With NaSC.md | 54 ---------------- ...ple in Ubuntu or Elementary OS via NaSC.md | 63 ------------------- ...h In Ubuntu And elementary OS With NaSC.md | 53 ++++++++++++++++ ...ple in Ubuntu or Elementary OS via NaSC.md | 62 ++++++++++++++++++ 4 files changed, 115 insertions(+), 117 deletions(-) delete mode 100644 sources/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md delete mode 100644 sources/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md create mode 100644 translated/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md create mode 100644 translated/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.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 deleted file mode 100644 index 512c0669f9..0000000000 --- a/sources/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md +++ /dev/null @@ -1,54 +0,0 @@ -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) - -[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 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 deleted file mode 100644 index 2ddb2a072c..0000000000 --- a/sources/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md +++ /dev/null @@ -1,63 +0,0 @@ -ictlyh Translating -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 diff --git a/translated/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md b/translated/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md new file mode 100644 index 0000000000..d65beef2a5 --- /dev/null +++ b/translated/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md @@ -0,0 +1,53 @@ +在 Ubuntu 和 Elementary OS 上使用 NaSC 进行简单数学运算 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Make-Math-Simpler-with-NaSC.jpg) + +[NaSC][1],Not a Soulver Clone 的缩写,是为 elementary 操作系统开发的第三方应用程序。正如名字暗示的那样,NaSC 的灵感来源于 [Soulver][2],后者是像普通人一样进行数学计算的 OS X 应用。 + +Elementary OS 它自己本身借鉴了 OS X,也就不奇怪它的很多第三方应用灵感都来自于 OS X 应用。 + +回到 NaSC,“像普通人一样进行数学计算”到底是什么意思呢?事实上,它意味着正如你想的那样去书写。按照该应用程序的介绍: + +> “它能使你像平常那样进行计算。它允许你输入任何你想输入的,智能识别其中的数学部分并在右边面板打印出结果。然后你可以在后面的等式中使用这些结果,如果结果发生了改变,等式中使用的也会同样变化。” + +还不相信?让我们来看一个截图。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/NaSC.png) + +现在,你明白什么是 “像普通人一样做数学” 了吗?坦白地说,我并不是这类应用程序的粉丝,但对你们中的某些人可能会有用。让我们来看看怎么在 Elementary OS、Ubuntu 和 Linux Mint 上安装 NaSC。 + +### 在 Ubuntu、Elementary OS 和 Mint 上安装 NaSC ### + +安装 NaSC 有一个可用的 PPA。PPA 中说 ‘每日’,意味着所有构建(包括不稳定),但作为我的快速测试,并没什么影响。 + +打卡一个终端并运行下面的命令: + + sudo apt-add-repository ppa:nasc-team/daily + sudo apt-get update + sudo apt-get install nasc + +这是 Ubuntu 15.04 中使用 NaSC 的一个截图: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/NaSC-Ubuntu.png) + +如果你想卸载它,可以使用下面的命令: + + sudo apt-get remove nasc + sudo apt-add-repository --remove ppa:nasc-team/daily + +如果你试用了这个软件,要分享你的经验哦。除此之外,你也可以在第三方 Elementary OS 应用中体验[Vocal podcast app for Linux][3]。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/math-ubuntu-nasc/ + +作者:[Abhishek][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) +校对:[校对者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/translated/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md b/translated/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md new file mode 100644 index 0000000000..2d74b1efa5 --- /dev/null +++ b/translated/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md @@ -0,0 +1,62 @@ +在 Ubuntu 和 Elementary 上使用 NaSC 做简单数学运算 +================================================================================ +![](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-icon.png) + +NaSC(Not a Soulver Clone,并非 Soulver 的克隆品)是为 Elementary 操作系统进行数学计算而设计的一款开源软件。类似于 Mac 上的 [Soulver][1]。 + +> 它能使你像平常那样进行计算。它允许你输入任何你想输入的,智能识别其中的数学部分并在右边面板打印出结果。然后你可以在后面的等式中使用这些结果,如果结果发生了改变,等式中使用的也会同样变化。 + +用 NaSC,你可以: + +- 自己定义复杂的计算 +- 改变单位和值(英尺、米、厘米,美元、欧元等) +- 了解行星的表面积 +- 解二次多项式 +- 以及其它 + +![nasc-eos](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-eos.jpg) + +第一次启动时,NaSC 提供了一个关于现有功能的教程。以后你还可以通过点击标题栏上的帮助图标再次查看。 + +![nasc-help](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-help.jpg) + +另外,这个软件还允许你保存文件以便以后继续工作。还可以在一定时间内通过粘贴板共用。 + +### 在 Ubuntu 或 Elementary OS Freya 上安装 NaSC: ### + +对于 Ubuntu 15.04,Ubuntu 15.10,Elementary OS Freya,从 Dash 或应用启动器中打开终端,逐条运行下面的命令: + +1. 通过命令添加 [NaSC PPA][2]: + + sudo apt-add-repository ppa:nasc-team/daily + +![nasc-ppa](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-ppa.jpg) + +2. 如果安装了 Synaptic 软件包管理器,点击 ‘Reload’ 后搜索并安装 ‘nasc’。 + +或者运行下面的命令更新系统缓存并安装软件: + + sudo apt-get update + + sudo apt-get install nasc + +3. **(可选)** 要卸载软件以及 NaSC,运行: + + sudo apt-get remove nasc && sudo add-apt-repository -r ppa:nasc-team/daily + +对于不想添加 PPA 的人,可以直接从[该网页][3]获取 .deb 安装包。、 + +-------------------------------------------------------------------------------- + +via: http://ubuntuhandbook.org/index.php/2015/09/make-math-simple-in-ubuntu-elementary-os-via-nasc/ + +作者:[Ji m][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) +校对:[校对者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 b0951c83ed82e583f6302c5e95c73814df5bfb0e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 11 Sep 2015 20:28:20 +0800 Subject: [PATCH 2047/2517] [Translating] tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md --- ...og Files With Logrotate On Ubuntu 12.10.md | 117 ------------------ ...ile Sharing on Linux or Windows Clients.md | 1 + ...-based Authentication for Linux Clients.md | 1 + 3 files changed, 2 insertions(+), 117 deletions(-) delete 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 deleted file mode 100644 index 0c7ae1a7e3..0000000000 --- a/sources/tech/20150906 How To Manage Log Files With Logrotate On Ubuntu 12.10.md +++ /dev/null @@ -1,117 +0,0 @@ -ictlyh Translating -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 diff --git a/sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md b/sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md index 02a538cacc..b59955783a 100644 --- a/sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md +++ b/sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md @@ -1,3 +1,4 @@ +ictlyh Translating Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux/Windows Clients – Part 6 ================================================================================ Since computers seldom work as isolated systems, it is to be expected that as a system administrator or engineer, you know how to set up and maintain a network with multiple types of servers. diff --git a/sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md b/sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md index 2f0ca53dd5..e0341c5247 100644 --- a/sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md +++ b/sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md @@ -1,3 +1,4 @@ +ictlyh Translating Setting Up NFS Server with Kerberos-based Authentication for Linux Clients – Part 7 ================================================================================ In the last article of this series, we reviewed [how to set up a Samba share over a network][1] that may consist of multiple types of operating systems. Now, if you need to set up file sharing for a group of Unix-like clients you will automatically think of the Network File System, or NFS for short. From 1c4e41f3d7ade7e41bf026f0834d8260c730fb03 Mon Sep 17 00:00:00 2001 From: icybreaker Date: Fri, 11 Sep 2015 22:31:48 +0800 Subject: [PATCH 2048/2517] icybreaker translating --- ...data structures and algorithms make you a better developer.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150823 How learning data structures and algorithms make you a better developer.md b/sources/talk/20150823 How learning data structures and algorithms make you a better developer.md index 7152efa1ed..d90242e58a 100644 --- a/sources/talk/20150823 How learning data structures and algorithms make you a better developer.md +++ b/sources/talk/20150823 How learning data structures and algorithms make you a better developer.md @@ -1,3 +1,4 @@ +icybreaker translating How learning data structures and algorithms make you a better developer ================================================================================ From 7eb82b0882703f4f2c67a6608947a91bb0663002 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 12 Sep 2015 09:52:43 +0800 Subject: [PATCH 2049/2517] translating --- ...ased Client for Connecting Remote Unix or Linux Systems.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md b/sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md index f36e1b21df..ac02e48d2f 100644 --- a/sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md +++ b/sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md @@ -1,3 +1,5 @@ +translating---geekpi + Mosh Shell – A SSH Based Client for Connecting Remote Unix/Linux Systems ================================================================================ Mosh, which stands for Mobile Shell is a command-line application which is used for connecting to the server from a client computer, over the Internet. It can be used as SSH and contains more feature than Secure Shell. It is an application similar to SSH, but with additional features. The application is written originally by Keith Winstein for Unix like operating system and released under GNU GPL v3. @@ -107,4 +109,4 @@ via: http://www.tecmint.com/install-mosh-shell-ssh-client-in-linux/ [2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ [3]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ [4]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ -[5]:http://www.tecmint.com/configure-firewalld-in-centos-7/ \ No newline at end of file +[5]:http://www.tecmint.com/configure-firewalld-in-centos-7/ From da767f2fa7f8a47a9384674d2671cfdd32c60925 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 12 Sep 2015 11:16:13 +0800 Subject: [PATCH 2050/2517] translated --- ...Connecting Remote Unix or Linux Systems.md | 112 ------------------ ...Connecting Remote Unix or Linux Systems.md | 111 +++++++++++++++++ 2 files changed, 111 insertions(+), 112 deletions(-) delete mode 100644 sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md create mode 100644 translated/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md diff --git a/sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md b/sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md deleted file mode 100644 index ac02e48d2f..0000000000 --- a/sources/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md +++ /dev/null @@ -1,112 +0,0 @@ -translating---geekpi - -Mosh Shell – A SSH Based Client for Connecting Remote Unix/Linux Systems -================================================================================ -Mosh, which stands for Mobile Shell is a command-line application which is used for connecting to the server from a client computer, over the Internet. It can be used as SSH and contains more feature than Secure Shell. It is an application similar to SSH, but with additional features. The application is written originally by Keith Winstein for Unix like operating system and released under GNU GPL v3. - -![Mosh Shell SSH Client](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-SSH-Client.png) - -Mosh Shell SSH Client - -#### Features of Mosh #### - -- It is a remote terminal application that supports roaming. -- Available for all major UNIX-like OS viz., Linux, FreeBSD, Solaris, Mac OS X and Android. -- Intermittent Connectivity supported. -- Provides intelligent local echo. -- Line editing of user keystrokes supported. -- Responsive design and Robust Nature over wifi, cellular and long-distance links. -- Remain Connected even when IP changes. It usages UDP in place of TCP (used by SSH). TCP time out when connect is reset or new IP assigned but UDP keeps the connection open. -- The Connection remains intact when you resume the session after a long time. -- No network lag. Shows users typed key and deletions immediately without network lag. -- Same old method to login as it was in SSH. -- Mechanism to handle packet loss. - -### Installation of Mosh Shell in Linux ### - -On Debian, Ubuntu and Mint alike systems, you can easily install the Mosh package with the help of [apt-get package manager][1] as shown. - - # apt-get update - # apt-get install mosh - -On RHEL/CentOS/Fedora based distributions, you need to turn on third party repository called [EPEL][2], in order to install mosh from this repository using [yum package manager][3] as shown. - - # yum update - # yum install mosh - -On Fedora 22+ version, you need to use [dnf package manager][4] to install mosh as shown. - - # dnf install mosh - -### How do I use Mosh Shell? ### - -1. Let’s try to login into remote Linux server using mosh shell. - - $ mosh root@192.168.0.150 - -![Mosh Shell Remote Connection](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-Remote-Connection.png) - -Mosh Shell Remote Connection - -**Note**: Did you see I got an error in connecting since the port was not open in my remote CentOS 7 box. A quick but not recommended solution I performed was: - - # systemctl stop firewalld [on Remote Server] - -The preferred way is to open a port and update firewall rules. And then connect to mosh on a predefined port. For in-depth details on firewalld you may like to visit this post. - -- [How to Configure Firewalld][5] - -2. Let’s assume that the default SSH port 22 was changed to port 70, in this case you can define custom port with the help of ‘-p‘ switch with mosh. - - $ mosh -p 70 root@192.168.0.150 - -3. Check the version of installed Mosh. - - $ mosh --version - -![Check Mosh Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Mosh-Version.png) - -Check Mosh Version - -4. You can close mosh session type ‘exit‘ on the prompt. - - $ exit - -5. Mosh supports a lot of options, which you may see as: - - $ mosh --help - -![Mosh Shell Options](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-Options.png) - -Mosh Shell Options - -#### Cons of Mosh Shell #### - -- Mosh requires additional prerequisite for example, allow direct connection via UDP, which was not required by SSH. -- Dynamic port allocation in the range of 60000-61000. The first open fort is allocated. It requires one port per connection. -- Default port allocation is a serious security concern, especially in production. -- IPv6 connections supported, but roaming on IPv6 not supported. -- Scrollback not supported. -- No X11 forwarding supported. -- No support for ssh-agent forwarding. - -### Conclusion ### - -Mosh is a nice small utility which is available for download in the repository of most of the Linux Distributions. Though it has a few discrepancies specially security concern and additional requirement it’s features like remaining connected even while roaming is its plus point. My recommendation is Every Linux-er who deals with SSH should try this application and mind it, Mosh is worth a try. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-mosh-shell-ssh-client-in-linux/ - -作者:[Avishek Kumar][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/avishek/ -[1]:http://www.tecmint.com/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management/ -[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ -[3]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ -[4]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ -[5]:http://www.tecmint.com/configure-firewalld-in-centos-7/ diff --git a/translated/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md b/translated/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md new file mode 100644 index 0000000000..093b4cbc21 --- /dev/null +++ b/translated/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md @@ -0,0 +1,111 @@ +mosh - 一个基于SSH用于连接远程Unix/Linux系统的工具 +================================================================================ +Mosh表示移动Shell(Mobile Shell)是一个用于从客户端连接远程服务器的命令行工具。它可以像ssh那样使用并包含了更多的功能。它是一个类似ssh的程序,但是提供更多的功能。程序最初由Keith Winstein编写用于类Unix的操作系统中,发布于GNU GPL v3协议下。 + +![Mosh Shell SSH Client](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-SSH-Client.png) + +Mosh客户端 + +#### Mosh的功能 #### + +- 它是一个支持漫游的远程终端程序。 +- 在所有主流类Unix版本中可用如Linux、FreeBSD、Solaris、Mac OS X和Android。 +- 中断连接支持 +- 支持智能本地echo +- 用户按键行编辑支持 +- 响应式设计及在wifi、3G、长距离连接下的鲁棒性 +- 在IP改变后保持连接。它使用UDP代替TCP(在SSH中使用)当连接被重置或者获得新的IP后TCP会超时但是UDP仍然保持连接。 +- 在你很长之间之后恢复会话时仍然保持连接。 +- 没有网络延迟。立即显示用户输入和删除而没有延迟 +- 像SSH那样支持一些旧的方式登录。 +- 包丢失处理机制 + +### Linux中mosh的安装 ### + +在Debian、Ubuntu和Mint类似的系统中,你可以很容易地用[apt-get包管理器][1]安装。 + + # apt-get update + # apt-get install mosh + +在基于RHEL/CentOS/Fedora的系统中,要使用[yum 包管理器][3]安装mosh,你需要打开第三方的[EPEL][2]。 + + # yum update + # yum install mosh + +在Fedora 22+的版本中,你需要使用[dnf包管理器][4]来安装mosh。 + + # dnf install mosh + +### 我该如何使用mosh? ### + +1. 让我们尝试使用mosh登录远程Linux服务器。 + + $ mosh root@192.168.0.150 + +![Mosh Shell Remote Connection](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-Remote-Connection.png) + +mosh远程连接 + +**注意**:你有没有看到一个连接错误,因为我在CentOS 7中还有打开这个端口。一个快速但是我并不建议的解决方法是: + + # systemctl stop firewalld [on Remote Server] + +更好的方法是打开一个端口并更新防火墙规则。接着用mosh连接到预定义的端口中。至于更深入的细节,也许你会对下面的文章感兴趣。 + +- [如何配置Firewalld][5] + +2. 让我们假设把默认的22端口改到70,这时使用-p选项来使用自定义端口。 + + $ mosh -p 70 root@192.168.0.150 + +3. 检查mosh的版本 + + $ mosh --version + +![Check Mosh Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Mosh-Version.png) + +检查mosh版本 + +4. 你可以输入‘exit’来退出mosh会话。 + + $ exit + +5. mosh支持很多选项,你可以用下面的方法看到: + + $ mosh --help + +![Mosh Shell Options](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-Options.png) + +Mosh选项 + +#### mosh的利弊 #### + +- mosh有额外的需求,比如需要允许UDP直接连接,这在SSH不需要。 +- 动态分配的端口范围是60000-61000。第一个打开的端口是分配的。每个连接都需要一个端口。 +- 默认端口分配是一个严重的安全问题,尤其是在生产环境中。 +- 支持IPv6连接,但是不支持IPv6漫游。 +- 不支持回溯 +- 不支持X11转发 +- 不支持ssh-agent转发 + +### 总结 ### + +Mosh is a nice small utility which is available for download in the repository of most of the Linux Distributions. Though it has a few discrepancies specially security concern and additional requirement it’s features like remaining connected even while roaming is its plus point. My recommendation is Every Linux-er who deals with SSH should try this application and mind it, Mosh is worth a try. +mosh是一款在大多数linux发行版的仓库中可以下载的一款小工具。虽然它有一些差异尤其是安全问题和额外的需求,它的功能像漫游后保持连接是一个加分点。我的建议是任何一个使用ssh的linux用户都应该试试这个程序,mosh值得一试 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-mosh-shell-ssh-client-in-linux/ + +作者:[Avishek Kumar][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management/ +[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[3]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[4]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ +[5]:http://www.tecmint.com/configure-firewalld-in-centos-7/ From a7a033417cad1cbf2351b6e4c4a7bc7b76281b8e Mon Sep 17 00:00:00 2001 From: icybreaker Date: Sat, 12 Sep 2015 12:36:41 +0800 Subject: [PATCH 2051/2517] translated --- ... algorithms make you a better developer.md | 127 ------------------ ... algorithms make you a better developer.md | 123 +++++++++++++++++ 2 files changed, 123 insertions(+), 127 deletions(-) delete mode 100644 sources/talk/20150823 How learning data structures and algorithms make you a better developer.md create mode 100644 translated/talk/20150823 How learning data structures and algorithms make you a better developer.md diff --git a/sources/talk/20150823 How learning data structures and algorithms make you a better developer.md b/sources/talk/20150823 How learning data structures and algorithms make you a better developer.md deleted file mode 100644 index d90242e58a..0000000000 --- a/sources/talk/20150823 How learning data structures and algorithms make you a better developer.md +++ /dev/null @@ -1,127 +0,0 @@ -icybreaker translating -How learning data structures and algorithms make you a better developer -================================================================================ - -> "I'm a huge proponent of designing your code around the data, rather than the other way around, and I think it's one of the reasons git has been fairly successful […] I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important." --- Linus Torvalds - ---- - -> "Smart data structures and dumb code works a lot better than the other way around." --- Eric S. Raymond, The Cathedral and The Bazaar - -Learning about data structures and algorithms makes you a stonking good programmer. - -**Data structures and algorithms are patterns for solving problems.** The more of them you have in your utility belt, the greater variety of problems you'll be able to solve. You'll also be able to come up with more elegant solutions to new problems than you would otherwise be able to. - -You'll understand, ***in depth***, how your computer gets things done. This informs any technical decisions you make, regardless of whether or not you're using a given algorithm directly. Everything from memory allocation in the depths of your operating system, to the inner workings of your RDBMS to how your networking stack manages to send data from one corner of Earth to another. All computers rely on fundamental data structures and algorithms, so understanding them better makes you understand the computer better. - -Cultivate a broad and deep knowledge of algorithms and you'll have stock solutions to large classes of problems. Problem spaces that you had difficulty modelling before often slot neatly into well-worn data structures that elegantly handle the known use-cases. Dive deep into the implementation of even the most basic data structures and you'll start seeing applications for them in your day-to-day programming tasks. - -You'll also be able to come up with novel solutions to the somewhat fruitier problems you're faced with. Data structures and algorithms have the habit of proving themselves useful in situations that they weren't originally intended for, and the only way you'll discover these on your own is by having a deep and intuitive knowledge of at least the basics. - -But enough with the theory, have a look at some examples - -###Figuring out the fastest way to get somewhere### -Let's say we're creating software to figure out the shortest distance from one international airport to another. Assume we're constrained to following routes: - -![](http://www.happybearsoftware.com/assets/posts/how-learning-data-structures-and-algorithms-makes-you-a-better-developer/airport-graph-d2e32b3344b708383e405d67a80c29ea.svg) - -graph of destinations and the distances between them, how can we find the shortest distance say, from Helsinki to London? **Dijkstra's algorithm** is the algorithm that will definitely get us the right answer in the shortest time. - -In all likelihood, if you ever came across this problem and knew that Dijkstra's algorithm was the solution, you'd probably never have to implement it from scratch. Just ***knowing*** about it would point you to a library implementation that solves the problem for you. - -If you did dive deep into the implementation, you'd be working through one of the most important graph algorithms we know of. You'd know that in practice it's a little resource intensive so an extension called A* is often used in it's place. It gets used everywhere from robot guidance to routing TCP packets to GPS pathfinding. - -###Figuring out the order to do things in### -Let's say you're trying to model courses on a new Massive Open Online Courses platform (like Udemy or Khan Academy). Some of the courses depend on each other. For example, a user has to have taken Calculus before she's eligible for the course on Newtonian Mechanics. Courses can have multiple dependencies. Here's are some examples of what that might look like written out in YAML: - - # Mapping from course name to requirements - # - # If you're a physcist or a mathematicisn and you're reading this, sincere - # apologies for the completely made-up dependency tree :) - courses: - arithmetic: [] - algebra: [arithmetic] - trigonometry: [algebra] - calculus: [algebra, trigonometry] - geometry: [algebra] - mechanics: [calculus, trigonometry] - atomic_physics: [mechanics, calculus] - electromagnetism: [calculus, atomic_physics] - radioactivity: [algebra, atomic_physics] - astrophysics: [radioactivity, calculus] - quantumn_mechanics: [atomic_physics, radioactivity, calculus] - -Given those dependencies, as a user, I want to be able to pick any course and have the system give me an ordered list of courses that I would have to take to be eligible. So if I picked `calculus`, I'd want the system to return the list: - - arithmetic -> algebra -> trigonometry -> calculus - -Two important constraints on this that may not be self-evident: - - - At every stage in the course list, the dependencies of the next course must be met. - - We don't want any duplicate courses in the list. - -This is an example of resolving dependencies and the algorithm we're looking for to solve this problem is called topological sort (tsort). Tsort works on a dependency graph like we've outlined in the YAML above. Here's what that would look like in a graph (where each arrow means `requires`): - -![](http://www.happybearsoftware.com/assets/posts/how-learning-data-structures-and-algorithms-makes-you-a-better-developer/course-graph-2f60f42bb0dc95319954ce34c02705a2.svg) - -topological sort does is take a graph like the one above and find an ordering in which all the dependencies are met at each stage. So if we took a sub-graph that only contained `radioactivity` and it's dependencies, then ran tsort on it, we might get the following ordering: - - arithmetic - algebra - trigonometry - calculus - mechanics - atomic_physics - radioactivity - -This meets the requirements set out by the use case we described above. A user just has to pick `radioactivity` and they'll get an ordered list of all the courses they have to work through before they're allowed to. - -We don't even need to go into the details of how topological sort works before we put it to good use. In all likelihood, your programming language of choice probably has an implementation of it in the standard library. In the worst case scenario, your Unix probably has the `tsort` utility installed by default, run man `tsort` and have a play with it. - -###Other places tsort get's used### - - - **Tools like** `make` allow you to declare task dependencies. Topological sort is used under the hood to figure out what order the tasks should be executed in. - - **Any programming language that has a `require` directive**, indicating that the current file requires the code in a different file to be run first. Here topological sort can be used to figure out what order the files should be loaded in so that each is only loaded once and all dependencies are met. - - **Project management tools with Gantt charts**. A Gantt chart is a graph that outlines all the dependencies of a given task and gives you an estimate of when it will be complete based on those dependencies. I'm not a fan of Gantt charts, but it's highly likely that tsort will be used to draw them. - -###Squeezing data with Huffman coding### -[Huffman coding](http://en.wikipedia.org/wiki/Huffman_coding) is an algorithm used for lossless data compression. It works by analyzing the data you want to compress and creating a binary code for each character. More frequently occurring characters get smaller codes, so `e` might be encoded as `111` while `x` might be `10010`. The codes are created so that they can be concatenated without a delimeter and still be decoded accurately. - -Huffman coding is used along with LZ77 in the DEFLATE algorithm which is used by gzip to compress things. gzip is used all over the place, in particular for compressing files (typically anything with a `.gz` extension) and for http requests/responses in transit. - -Knowing how to implement and use Huffman coding has a number of benefits: - - - You'll know why a larger compression context results in better compression overall (e.g. the more you compress, the better the compression ratio). This is one of the proposed benefits of SPDY: that you get better compression on multiple HTTP requests/responses. - - You'll know that if you're compressing your javascript/css in transit anyway, it's completely pointless to run a minifier on them. Sames goes for PNG files, which use DEFLATE internally for compression already. - - If you ever find yourself trying to forcibly decipher encrypted information , you may realize that since repeating data compresses better, the compression ratio of a given bit of ciphertext will help you determine it's [block cipher mode of operation](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation). - -###Picking what to learn next is hard### -Being a programmer involves learning constantly. To operate as a web developer you need to know markup languages, high level languages like ruby/python, regular expressions, SQL and JavaScript. You need to know the fine details of HTTP, how to drive a unix terminal and the subtle art of object oriented programming. It's difficult to navigate that landscape effectively and choose what to learn next. - -I'm not a fast learner so I have to choose what to spend time on very carefully. As much as possible, I want to learn skills and techniques that are evergreen, that is, won't be rendered obsolete in a few years time. That means I'm hesitant to learn the javascript framework of the week or untested programming languages and environments. - -As long as our dominant model of computation stays the same, data structures and algorithms that we use today will be used in some form or another in the future. You can safely spend time on gaining a deep and thorough knowledge of them and know that they will pay dividends for your entire career as a programmer. - -###Sign up to the Happy Bear Software List### -Find this article useful? For a regular dose of freshly squeezed technical content delivered straight to your inbox, **click on the big green button below to sign up to the Happy Bear Software mailing list.** - -We'll only be in touch a few times per month and you can unsubscribe at any time. - --------------------------------------------------------------------------------- - -via: http://www.happybearsoftware.com/how-learning-data-structures-and-algorithms-makes-you-a-better-developer - -作者:[Happy Bear][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.happybearsoftware.com/ -[1]:http://en.wikipedia.org/wiki/Huffman_coding -[2]:http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation - - - diff --git a/translated/talk/20150823 How learning data structures and algorithms make you a better developer.md b/translated/talk/20150823 How learning data structures and algorithms make you a better developer.md new file mode 100644 index 0000000000..8125229719 --- /dev/null +++ b/translated/talk/20150823 How learning data structures and algorithms make you a better developer.md @@ -0,0 +1,123 @@ +学习数据结构与算法分析如何帮助您成为更优秀的开发人员? +================================================================================ + +> "相较于其它方式,我一直热衷于推崇围绕数据设计代码,我想这也是Git能够如此成功的一大原因[…]在我看来,区别程序员优劣的一大标准就在于他是否认为自己设计的代码或数据结构更为重要。" +-- Linus Torvalds + +--- + +> "优秀的数据结构与简陋的代码组合远比倒过来的组合方式更好。" +-- Eric S. Raymond, The Cathedral and The Bazaar + +学习数据结构与算法分析会让您成为一名出色的程序员。 + +**数据结构与算法分析是一种解决问题的思维模式** 在您的个人知识库中,数据结构与算法分析的相关知识储备越多,您将具备应对并解决越多各类繁杂问题的能力。掌握了这种思维模式,您还将有能力针对新问题提出更多以前想不到的漂亮的解决方案。 + +您将***更深入地***了解,计算机如何完成各项操作。无论您是否是直接使用给定的算法,它都影响着您作出的各种技术决定。从计算机操作系统的内存分配到RDBMS的内在工作机制,以及网络堆栈如何实现将数据从地球的一个角落发送至另一个角落这些大大小小的工作的完成,都离不开基础的数据结构与算法,理解并掌握它将会让您更了解计算机的运作机理。 + +对算法广泛深入的学习能让为您应对大体系的问题储备解决方案。之前建模困难时遇到的问题如今通常都能融合进经典的数据结构中得到很好地解决。即使是最基础的数据结构,只要对它进行足够深入的钻研,您将会发现在每天的编程任务中都能经常用到这些知识。 + +有了这种思维模式,在遇到磨棱两可的问题时,您会具备想出新的解决方案的能力。即使最初并没有打算用数据结构与算法解决相应问题的情况,当真正用它们解决这些问题时您会发现它们将非常有用。要意识到这一点,您至少要对数据结构与算法分析的基础知识有深入直观的认识。 + +理论认识就讲到这里,让我们一起看看下面几个例子。 + +###最短路径问题### + +我们想要开发一个计算从一个国际机场出发到另一个国际机场的最短距离的软件。假设我们受限于以下路线: + +![](http://www.happybearsoftware.com/assets/posts/how-learning-data-structures-and-algorithms-makes-you-a-better-developer/airport-graph-d2e32b3344b708383e405d67a80c29ea.svg) + +从这张画出机场各自之间的距离以及目的地的图中,我们如何才能找到最短距离,比方说从赫尔辛基到伦敦?**Dijkstra算法**是能让我们在最短的时间得到正确答案的适用算法。 + +在所有可能的解法中,如果您曾经遇到过这类问题,知道可以用Dijkstra算法求解,您大可不必从零开始实现它,只需***知道***该算法能指向固定的代码库帮助您解决相关的实现问题。 + +实现了该算法,您将深入理解一项著名的重要图论算法。您会发现实际上该算法太集成化,因此名为A*的扩展包经常会代替该算法使用。这个算法应用广泛,从机器人指引的功能实现到TCP数据包路由,以及GPS寻径问题都能应用到这个算法。 + +###先后排序问题### + +您想要在开放式在线课程平台上(如Udemy或Khan学院)学习某课程,有些课程之间彼此依赖。例如,用户学习牛顿力学机制课程前必须先修微积分课程,课程之间可以有多种依赖关系。用YAML表述举例如下: + + # Mapping from course name to requirements + # + # If you're a physcist or a mathematicisn and you're reading this, sincere + # apologies for the completely made-up dependency tree :) + courses: + arithmetic: [] + algebra: [arithmetic] + trigonometry: [algebra] + calculus: [algebra, trigonometry] + geometry: [algebra] + mechanics: [calculus, trigonometry] + atomic_physics: [mechanics, calculus] + electromagnetism: [calculus, atomic_physics] + radioactivity: [algebra, atomic_physics] + astrophysics: [radioactivity, calculus] + quantumn_mechanics: [atomic_physics, radioactivity, calculus] + +鉴于以上这些依赖关系,作为一名用户,我希望系统能帮我列出必修课列表,让我在之后可以选择任意一门课程学习。如果我选择了`微积分`课程,我希望系统能返回以下列表: + + arithmetic -> algebra -> trigonometry -> calculus + +这里有两个潜在的重要约束条件: + + - 返回的必修课列表中,每门课都与下一门课存在依赖关系 + - 必修课列表中不能有重复项 + +这是解决数据间依赖关系的例子,解决该问题的排序算法称作拓扑排序算法(tsort)。它适用于解决上述我们用YAML列出的依赖关系图的情况,以下是在图中显示的相关结果(其中箭头代表`需要先修的课程`): + +![](http://www.happybearsoftware.com/assets/posts/how-learning-data-structures-and-algorithms-makes-you-a-better-developer/course-graph-2f60f42bb0dc95319954ce34c02705a2.svg) + +拓扑排序算法的实现就是从如上所示的图中找到满足各层次要求的依赖关系。因此如果我们只列出包含`radioactivity`和与它有依赖关系的子图,运行tsort排序,会得到如下的顺序表: + + arithmetic + algebra + trigonometry + calculus + mechanics + atomic_physics + radioactivity + +这符合我们上面描述的需求,用户只需选出`radioactivity`,就能得到在此之前所有必修课程的有序列表。 + +在运用该排序算法之前,我们甚至不需要深入了解算法的实现细节。一般来说,选择不同的编程语言在其标准库中都会有相应的算法实现。即使最坏的情况,Unix也会默认安装`tsort`程序,运行`tsort`程序,您就可以实现该算法。 + +###其它拓扑排序适用场合### + + - **工具** 使用诸如`make`的工具您可以声明任务之间的依赖关系,这里拓扑排序算法将从底层实现具有依赖关系的任务顺序执行的功能。 + - **有`require`指令的编程语言**,适用于要运行当前文件需先运行另一个文件的情况。这里拓扑排序用于识别文件运行顺序以保证每个文件只加载一次,且满足所有文件间的依赖关系要求。 + - **包含甘特图的项目管理工具**.甘特图能直观列出给定任务的所有依赖关系,在这些依赖关系之上能提供给用户任务完成的预估时间。我不常用到甘特图,但这些绘制甘特图的工具很可能会用到拓扑排序算法。 + +###霍夫曼编码实现数据压缩### +[霍夫曼编码](http://en.wikipedia.org/wiki/Huffman_coding)是一种用于无损数据压缩的编码算法。它的工作原理是先分析要压缩的数据,再为每个字符创建一个二进制编码。字符出现的越频繁,编码赋值越小。因此在一个数据集中`e`可能会编码为`111`,而`x`会编码为`10010`。创建了这种编码模式,就可以串联无定界符,也能正确地进行解码。 + +在gzip中使用的DEFLATE算法就结合了霍夫曼编码与LZ77一同用于实现数据压缩功能。gzip应用领域很广,特别适用于文件压缩(以`.gz`为扩展名的文件)以及用于数据传输中的http请求与应答。 + +学会实现并使用霍夫曼编码有如下益处: + + - 您会理解为什么较大的压缩文件会获得较好的整体压缩效果(如压缩的越多,压缩率也越高)。这也是SPDY协议得以推崇的原因之一:在复杂的HTTP请求/响应过程数据有更好的压缩效果。 + - 您会了解数据传输过程中如果想要压缩JavaScript/CSS文件,运行压缩软件是完全没有意义的。PNG文件也是类似,因为它们已经使用DEFLATE算法完成了压缩。 + - 如果您试图强行破译加密的信息,您可能会发现重复数据压缩质量越好,给定的密文单位bit的数据压缩将帮助您确定相关的[分组密码模式](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation). + +###下一步选择学习什么是困难的### +作为一名程序员应当做好持续学习的准备。为成为一名web开发人员,您需要了解标记语言以及Ruby/Python,正则表达式,SQL,JavaScript等高级编程语言,还需要了解HTTP的工作原理,如何运行UNIX终端以及面向对象的编程艺术。您很难有效地预览到未来的职业全景,因此选择下一步要学习哪些知识是困难的。 + +我没有快速学习的能力,因此我不得不在时间花费上非常谨慎。我希望尽可能地学习到有持久生命力的技能,即不会在几年内就过时的技术。这意味着我也会犹豫这周是要学习JavaScript框架还是那些新的编程语言。 + +只要占主导地位的计算模型体系不变,我们如今使用的数据结构与算法在未来也必定会以另外的形式继续适用。您可以放心地将时间投入到深入掌握数据结构与算法知识中,它们将会成为您作为一名程序员的职业生涯中一笔长期巨大的财富。 + +-------------------------------------------------------------------------------- + +via: http://www.happybearsoftware.com/how-learning-data-structures-and-algorithms-makes-you-a-better-developer + +作者:[Happy Bear][a] +译者:[icybreaker](https://github.com/icybreaker) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.happybearsoftware.com/ +[1]:http://en.wikipedia.org/wiki/Huffman_coding +[2]:http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation + + + From a13b5f5b24f0a2ba5d49dfd616eb7f8e84d795bb Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sat, 12 Sep 2015 17:02:00 +0800 Subject: [PATCH 2052/2517] translated wi-cuckoo --- ...tall and Configure Plank Dock in Ubuntu.md | 67 ------------------- ...tall and Configure Plank Dock in Ubuntu.md | 66 ++++++++++++++++++ 2 files changed, 66 insertions(+), 67 deletions(-) delete mode 100644 sources/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md create mode 100644 translated/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.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 deleted file mode 100644 index 2ebefa9297..0000000000 --- a/sources/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md +++ /dev/null @@ -1,67 +0,0 @@ -translating wi-cuckoo -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 diff --git a/translated/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md b/translated/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md new file mode 100644 index 0000000000..1990e25a60 --- /dev/null +++ b/translated/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md @@ -0,0 +1,66 @@ +在 Ubuntu 里,如何下载,安装和配置 Plank Dock +============================================================================= +一个众所周知的事实就是,Linux 是一个用户可以高度自定义的系统,有很多选项可以选择 —— 作为操作系统,有各种各样的发行版,而对于单个发行版来说,又有很多桌面环境可以选择。与其他操作系统的用户一样,Linux 用户也有不同的口味和喜好,特别是对于桌面来说。 + +一些用户并非很在意他们的桌面,而其他一些则非常关心,要确保他们的桌面看起来很酷,很有吸引力,对于这种情况,有很多不错的应用可以派上用场。有一个应用可以给你的桌面带来活力 —— 特别是当你常用一个全局菜单的时候 —— 这就是 dock 。Linux 上有很多 dock 应用可选用;如果你希望是一个最简洁的,那么就选择 [Plank][1] 吧,文章接下来就要讨论这个应用。 + +**注意**:接下提到的例子和命令都已在 Ubuntu(版本 14.10)和 Plank(版本 0.9.1.1383)上测试通过。 + +### Plank ### + +官方的文档描述 Plank 是“这个星球上最简洁的 dock”。该项目的目的就是提供一个 dock 仅需要的功能,尽管这是很基础的一个库,却可以被扩展,创造其他的含更多高级功能的 dock 程序。 + +这里值得一提的就是,在 elementary OS 里,Plank 是预装的。并且 Plank 是 Docky 的基础,Docky 也是一个非常流行的 dock 应用,在功能上与 Mac OS X 的 Dock 非常相似。 + +### 下载和安装 ### + +通过在终端里执行下面的命令,可以下载并安装 Plank: + + sudo add-apt-repository ppa:docky-core/stable + sudo apt-get update + sudo apt-get install plank + +安装成功后,你就可以在 Unity Dash(见下面图片)里通过输入 Plank 来打开该应用,或者从应用菜单里面打开,如果你没有使用 Unity 环境的话。 + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-unity-dash.png) + +### 特性 ### + +当 Plank 启用后,你会看见它停靠在你桌面的底部中间位置。 + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-enabled-new.jpg) + +正如上面图片显示的那样,dock 包含许多带橙色的应用图标,这表明这些应用正处于运行状态。无需说,你可以点击一个图标来打开那个应用。同时,右击一个应用图标会给出更多的选项,你可能会感兴趣。举个例子,该下面的屏幕快照: + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-right-click-icons-new.jpg) + +为了获得配置的选项,你不得不右击一下 Plank 的图标(左数第一个),然后点击 Preferences 选项。这就会产生接下来的窗口。 + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-preferences.png) + +如你所见,Preferences 窗口包含两个标签:Apperance 和 Behavior,前者是默认选中的。Appearance 标签栏包含 Plank 主题相关的设置,dock 的位置,对齐,还有图标相关的,而 Behavior 标签栏包含 dock 本身相关的设定。 + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-behavior-settings.png) + +举个例子,我在 Appearance 里改变 dock 的位置为右侧,在 Behavior 里锁定图标(这表示右击选项中不再有 “Keep in Dock”)。 + +![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-right-lock-new.jpg) + +如你所见的上面屏幕快照一样,改变生效了。类似地,根据你个人需求,改变任何可用的设定。 + +### 结论 ### + +如我开始所说的那样,使用 dock 不是强制的。尽管如此,使用一个会让事情变得方便,特别是你习惯了 Mac,而最近由于一些原因切换到了 Linux 系统。就其本身而言,Plank 不仅提供简洁性,还有可信任和稳定性 —— 该项目一直被很好地维护着。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/download-install-configure-plank-dock-ubuntu/ + +作者:[Himanshu Arora][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者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 From 78cdfeb0b08859ef0d6f8591020732a77e9e4a04 Mon Sep 17 00:00:00 2001 From: "Y.C.S.M" Date: Sat, 12 Sep 2015 20:22:20 +0800 Subject: [PATCH 2053/2517] Update 20150908 List Of 10 Funny Linux Commands.md complete the translation --- ...0150908 List Of 10 Funny Linux Commands.md | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) 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 59464c6497..18d6628b04 100644 --- a/sources/tech/20150908 List Of 10 Funny Linux Commands.md +++ b/sources/tech/20150908 List Of 10 Funny Linux Commands.md @@ -1,11 +1,13 @@ translating by tnuoccalanosrep -List Of 10 Funny Linux Commands + +10条真心有趣的Linux命令 ================================================================================ -**Working from the Terminal is really fun. Today, we’ll list really funny Linux commands which will bring smile on your face.** -**在终端工作是一件很有趣的事情。今天,我们将会列举一些有趣得让你笑出来的Linux命令。 + +**在终端工作是一件很有趣的事情。今天,我们将会列举一些有趣得为你带来欢笑的Linux命令。** + ### 1. rev ### + 创建一个文件,在文件里面输入几个单词,rev命令会将你写的东西反转输出到控制台。 -Create a file, type some words in this file, rev command will dump all words written by you in reverse. # rev @@ -14,15 +16,15 @@ Create a file, type some words in this file, rev command will dump all words wri ![Selection_001](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0011.png) ### 2. fortune ### + 这个命令没有被默认安装,用apt-get命令安装它,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** 选项,他会限制一个句子的输出长度。 + # fortune -s ![Selection_004](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0042.png) @@ -31,15 +33,14 @@ Use **-s** option with fortune, it will limit the out to one sentence. #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**. +这个命令可以用apt-get安装,安装之后,在**/usr/share/figlet**可以看到一些ascii字体文件。 cd /usr/share/figlet @@ -57,34 +58,33 @@ e.g. ![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 +这个命令会将你的终端变成一个海洋馆。 +下载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 +下载并且安装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 @@ -95,13 +95,13 @@ Run, # 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. +有的时候你可能把 **ls** 误打成了 **sl**,其实 **sl** 也是一个命令,如果你打 sl的话,你会看到一个移动的火车头 # apt-get install sl @@ -113,7 +113,7 @@ Sometimes you type **sl** instead of **ls** by mistake,actually **sl** is a com ### 8. cowsay ### -Very common command, is will display in ascii form whatever you wants to say. +一个很普遍的命令,它会用ascii显示你想说的话。 apt-get install cowsay @@ -123,7 +123,7 @@ Very common command, is will display in ascii form whatever you wants to say. ![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** +或者,你可以用其他的角色来取代默认角色来说这句话,这些角色都存储在**/usr/share/cowsay/cows**目录下 # cd /usr/share/cowsay/cows @@ -134,6 +134,7 @@ Or, you can use another character instead of com, such characters are stored in ![Selection_014](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0141.png) or +或者 # cowsay -f bud-frogs.cow Rajneesh @@ -141,7 +142,7 @@ or ### 9. toilet ### -Yes, this is a command, it dumps ascii strings in colored form to the terminal. +你没看错,这是个命令来的,他会将字符串以彩色的ascii字符串形式输出到终端 # apt-get install toilet @@ -161,7 +162,7 @@ Yes, this is a command, it dumps ascii strings in colored form to the terminal. ### 10. aafire ### -Put you terminal on fire with aafire. +aafire能让你的终端燃起来。 # apt-get install libaa-bin @@ -171,8 +172,7 @@ Put you terminal on fire with aafire. ![Selection_019](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0191.png) -That it, Have fun with Linux Terminal!! - +就这么多,祝你们在Linux终端玩得开心哈!!! -------------------------------------------------------------------------------- via: http://www.unixmen.com/list-10-funny-linux-commands/ From 9ea105a0032da9dcdd394337b359dba0fb9ae427 Mon Sep 17 00:00:00 2001 From: "Y.C.S.M" Date: Sat, 12 Sep 2015 20:25:20 +0800 Subject: [PATCH 2054/2517] Update 20150908 List Of 10 Funny Linux Commands.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit adjust the output form,and change some translation --- sources/tech/20150908 List Of 10 Funny Linux Commands.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 18d6628b04..aeb45f8d28 100644 --- a/sources/tech/20150908 List Of 10 Funny Linux Commands.md +++ b/sources/tech/20150908 List Of 10 Funny Linux Commands.md @@ -113,7 +113,7 @@ e.g. ### 8. cowsay ### -一个很普遍的命令,它会用ascii显示你想说的话。 +一个很常见的命令,它会用ascii显示你想说的话。 apt-get install cowsay @@ -133,7 +133,6 @@ e.g. ![Selection_014](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0141.png) -or 或者 # cowsay -f bud-frogs.cow Rajneesh @@ -173,12 +172,13 @@ aafire能让你的终端燃起来。 ![Selection_019](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0191.png) 就这么多,祝你们在Linux终端玩得开心哈!!! + -------------------------------------------------------------------------------- via: http://www.unixmen.com/list-10-funny-linux-commands/ 作者:[Rajneesh Upadhyay][a] -译者:[译者ID](https://github.com/译者ID) +译者:[tnuoccalanosrep](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From bb1bdf524c3a1500d50ae592dd96a0a65f327edf Mon Sep 17 00:00:00 2001 From: "Y.C.S.M" Date: Sat, 12 Sep 2015 20:33:29 +0800 Subject: [PATCH 2055/2517] create translated file [20150908 List Of 10 Funny Linux Commands] --- ...0150908 List Of 10 Funny Linux Commands.md | 186 ++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 translated/tech/20150908 List Of 10 Funny Linux Commands.md diff --git a/translated/tech/20150908 List Of 10 Funny Linux Commands.md b/translated/tech/20150908 List Of 10 Funny Linux Commands.md new file mode 100644 index 0000000000..aeb45f8d28 --- /dev/null +++ b/translated/tech/20150908 List Of 10 Funny Linux Commands.md @@ -0,0 +1,186 @@ +translating by tnuoccalanosrep + +10条真心有趣的Linux命令 +================================================================================ + +**在终端工作是一件很有趣的事情。今天,我们将会列举一些有趣得为你带来欢笑的Linux命令。** + +### 1. rev ### + +创建一个文件,在文件里面输入几个单词,rev命令会将你写的东西反转输出到控制台。 + + # 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 ### + +这个命令没有被默认安装,用apt-get命令安装它,fortune命令会随机显示一些句子 + + crank@crank-System:~$ sudo apt-get install fortune + +![Selection_003](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0031.png) + +利用fortune命令的**_s** 选项,他会限制一个句子的输出长度。 + + # fortune -s + +![Selection_004](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0042.png) + +### 3. yes ### + + #yes + +这个命令会不停打印字符串,直到用户把这进程给结束掉。 + + # yes unixmen + +![Selection_005](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0054.png) + +### 4. figlet ### +这个命令可以用apt-get安装,安装之后,在**/usr/share/figlet**可以看到一些ascii字体文件。 + + 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) + +当然,你也可以尝试使用其他的选项。 + +### 5. asciiquarium ### +这个命令会将你的终端变成一个海洋馆。 +下载term animator + + # wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz + +安装并且配置这个包 + + # tar -zxvf Term-Animation-2.4.tar.gz + # cd Term-Animation-2.4/ + # perl Makefile.PL && make && make test + # sudo make install + +接着安装下面这个包: + + # apt-get install libcurses-perl + +下载并且安装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/ + +执行如下命令 + + # /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 + +看看会输出什么? + +![Selection_009](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0092.png) + +### 7. sl ### + +有的时候你可能把 **ls** 误打成了 **sl**,其实 **sl** 也是一个命令,如果你打 sl的话,你会看到一个移动的火车头 + + # apt-get install sl + +---------- + + # sl + +![Selection_012](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0122.png) + +### 8. cowsay ### + +一个很常见的命令,它会用ascii显示你想说的话。 + + apt-get install cowsay + +---------- + + # cowsay + +![Selection_013](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0132.png) + +或者,你可以用其他的角色来取代默认角色来说这句话,这些角色都存储在**/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) + +或者 + + # cowsay -f bud-frogs.cow Rajneesh + +![Selection_015](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0151.png) + +### 9. toilet ### + +你没看错,这是个命令来的,他会将字符串以彩色的ascii字符串形式输出到终端 + + # 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 ### + +aafire能让你的终端燃起来。 + + # apt-get install libaa-bin + +---------- + + # aafire + +![Selection_019](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0191.png) + +就这么多,祝你们在Linux终端玩得开心哈!!! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/list-10-funny-linux-commands/ + +作者:[Rajneesh Upadhyay][a] +译者:[tnuoccalanosrep](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/ From 7a26d47f807e57b80250ec615aa7182754cd5839 Mon Sep 17 00:00:00 2001 From: "Y.C.S.M" Date: Sat, 12 Sep 2015 20:35:08 +0800 Subject: [PATCH 2056/2517] Update 20150908 List Of 10 Funny Linux Commands.md remove the state of file in the head --- translated/tech/20150908 List Of 10 Funny Linux Commands.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/translated/tech/20150908 List Of 10 Funny Linux Commands.md b/translated/tech/20150908 List Of 10 Funny Linux Commands.md index aeb45f8d28..7219e16890 100644 --- a/translated/tech/20150908 List Of 10 Funny Linux Commands.md +++ b/translated/tech/20150908 List Of 10 Funny Linux Commands.md @@ -1,5 +1,3 @@ -translating by tnuoccalanosrep - 10条真心有趣的Linux命令 ================================================================================ From 7054c14d60581082e700f0fe14dd59fd523de653 Mon Sep 17 00:00:00 2001 From: "Y.C.S.M" Date: Sat, 12 Sep 2015 20:35:53 +0800 Subject: [PATCH 2057/2517] Delete 20150908 List Of 10 Funny Linux Commands.md --- ...0150908 List Of 10 Funny Linux Commands.md | 186 ------------------ 1 file changed, 186 deletions(-) delete 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 deleted file mode 100644 index aeb45f8d28..0000000000 --- a/sources/tech/20150908 List Of 10 Funny Linux Commands.md +++ /dev/null @@ -1,186 +0,0 @@ -translating by tnuoccalanosrep - -10条真心有趣的Linux命令 -================================================================================ - -**在终端工作是一件很有趣的事情。今天,我们将会列举一些有趣得为你带来欢笑的Linux命令。** - -### 1. rev ### - -创建一个文件,在文件里面输入几个单词,rev命令会将你写的东西反转输出到控制台。 - - # 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 ### - -这个命令没有被默认安装,用apt-get命令安装它,fortune命令会随机显示一些句子 - - crank@crank-System:~$ sudo apt-get install fortune - -![Selection_003](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0031.png) - -利用fortune命令的**_s** 选项,他会限制一个句子的输出长度。 - - # fortune -s - -![Selection_004](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0042.png) - -### 3. yes ### - - #yes - -这个命令会不停打印字符串,直到用户把这进程给结束掉。 - - # yes unixmen - -![Selection_005](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0054.png) - -### 4. figlet ### -这个命令可以用apt-get安装,安装之后,在**/usr/share/figlet**可以看到一些ascii字体文件。 - - 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) - -当然,你也可以尝试使用其他的选项。 - -### 5. asciiquarium ### -这个命令会将你的终端变成一个海洋馆。 -下载term animator - - # wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz - -安装并且配置这个包 - - # tar -zxvf Term-Animation-2.4.tar.gz - # cd Term-Animation-2.4/ - # perl Makefile.PL && make && make test - # sudo make install - -接着安装下面这个包: - - # apt-get install libcurses-perl - -下载并且安装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/ - -执行如下命令 - - # /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 - -看看会输出什么? - -![Selection_009](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0092.png) - -### 7. sl ### - -有的时候你可能把 **ls** 误打成了 **sl**,其实 **sl** 也是一个命令,如果你打 sl的话,你会看到一个移动的火车头 - - # apt-get install sl - ----------- - - # sl - -![Selection_012](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0122.png) - -### 8. cowsay ### - -一个很常见的命令,它会用ascii显示你想说的话。 - - apt-get install cowsay - ----------- - - # cowsay - -![Selection_013](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0132.png) - -或者,你可以用其他的角色来取代默认角色来说这句话,这些角色都存储在**/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) - -或者 - - # cowsay -f bud-frogs.cow Rajneesh - -![Selection_015](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0151.png) - -### 9. toilet ### - -你没看错,这是个命令来的,他会将字符串以彩色的ascii字符串形式输出到终端 - - # 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 ### - -aafire能让你的终端燃起来。 - - # apt-get install libaa-bin - ----------- - - # aafire - -![Selection_019](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0191.png) - -就这么多,祝你们在Linux终端玩得开心哈!!! - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/list-10-funny-linux-commands/ - -作者:[Rajneesh Upadhyay][a] -译者:[tnuoccalanosrep](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/ From 552e482c8a37c4f0f0177d23f69aec7b56070319 Mon Sep 17 00:00:00 2001 From: Luoyuanhao Date: Sun, 13 Sep 2015 11:07:13 +0800 Subject: [PATCH 2058/2517] [Translated] tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md --- ...ile Sharing on Linux or Windows Clients.md | 209 ----------------- ...ile Sharing on Linux or Windows Clients.md | 211 ++++++++++++++++++ 2 files changed, 211 insertions(+), 209 deletions(-) delete mode 100644 sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md create mode 100644 translated/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md diff --git a/sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md b/sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md deleted file mode 100644 index b59955783a..0000000000 --- a/sources/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md +++ /dev/null @@ -1,209 +0,0 @@ -ictlyh Translating -Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux/Windows Clients – Part 6 -================================================================================ -Since computers seldom work as isolated systems, it is to be expected that as a system administrator or engineer, you know how to set up and maintain a network with multiple types of servers. - -In this article and in the next of this series we will go through the essentials of setting up Samba and NFS servers with Windows/Linux and Linux clients, respectively. - -![Setup Samba File Sharing on Linux](http://www.tecmint.com/wp-content/uploads/2015/09/setup-samba-file-sharing-on-linux-windows-clients.png) - -RHCE: Setup Samba File Sharing – Part 6 - -This article will definitely come in handy if you’re called upon to set up file servers in corporate or enterprise environments where you are likely to find different operating systems and types of devices. - -Since you can read about the background and the technical aspects of both Samba and NFS all over the Internet, in this article and the next we will cut right to the chase with the topic at hand. - -### Step 1: Installing Samba Server ### - -Our current testing environment consists of two RHEL 7 boxes and one Windows 8 machine, in that order: - - 1. Samba / NFS server [box1 (RHEL 7): 192.168.0.18], - 2. Samba client #1 [box2 (RHEL 7): 192.168.0.20] - 3. Samba client #2 [Windows 8 machine: 192.168.0.106] - -![Testing Setup for Samba](http://www.tecmint.com/wp-content/uploads/2015/09/Testing-Setup-for-Samba.png) - -Testing Setup for Samba - -On box1, install the following packages: - - # yum update && yum install samba samba-client samba-common - -On box2: - - # yum update && yum install samba samba-client samba-common cifs-utils - -Once the installation is complete, we’re ready to configure our share. - -### Step 2: Setting Up File Sharing Through Samba ### - -One of the reason why Samba is so relevant is because it provides file and print services to SMB/CIFS clients, which causes those clients to see the server as if it was a Windows system (I must admit I tend to get a little emotional while writing about this topic as it was my first setup as a new Linux system administrator some years ago). - -**Adding system users and setting up permissions and ownership** - -To allow for group collaboration, we will create a group named finance with two users (user1 and user2) with [useradd command][1] and a directory /finance in box1. - -We will also change the group owner of this directory to finance and set its permissions to 0770 (read, write, and execution permissions for the owner and the group owner): - - # groupadd finance - # useradd user1 - # useradd user2 - # usermod -a -G finance user1 - # usermod -a -G finance user2 - # mkdir /finance - # chmod 0770 /finance - # chgrp finance /finance - -### Step 3:​ Configuring SELinux and Firewalld ### - -In preparation to configure /finance as a Samba share, we will need to either disable SELinux or set the proper boolean and security context values as follows (otherwise, SELinux will prevent clients from accessing the share): - - # setsebool -P samba_export_all_ro=1 samba_export_all_rw=1 - # getsebool –a | grep samba_export - # semanage fcontext –at samba_share_t "/finance(/.*)?" - # restorecon /finance - -In addition, we must ensure that Samba traffic is allowed by the [firewalld][2]. - - # firewall-cmd --permanent --add-service=samba - # firewall-cmd --reload - -### Step 4: Configure Samba Share ### - -Now it’s time to dive into the configuration file /etc/samba/smb.conf and add the section for our share: we want the members of the finance group to be able to browse the contents of /finance, and save / create files or subdirectories in it (which by default will have their permission bits set to 0770 and finance will be their group owner): - -**smb.conf** - ----------- - - [finance] - comment=Directory for collaboration of the company's finance team - browsable=yes - path=/finance - public=no - valid users=@finance - write list=@finance - writeable=yes - create mask=0770 - Force create mode=0770 - force group=finance - -Save the file and then test it with the testparm utility. If there are any errors, the output of the following command will indicate what you need to fix. Otherwise, it will display a review of your Samba server configuration: - -![Test Samba Configuration](http://www.tecmint.com/wp-content/uploads/2015/09/Test-Samba-Configuration.png) - -Test Samba Configuration - -Should you want to add another share that is open to the public (meaning without any authentication whatsoever), create another section in /etc/samba/smb.conf and under the new share’s name copy the section above, only changing public=no to public=yes and not including the valid users and write list directives. - -### Step 5: Adding Samba Users ### - -Next, you will need to add user1 and user2 as Samba users. To do so, you will use the smbpasswd command, which interacts with Samba’s internal database. You will be prompted to enter a password that you will later use to connect to the share: - - # smbpasswd -a user1 - # smbpasswd -a user2 - -Finally, restart Samba, enable the service to start on boot, and make sure the share is actually available to network clients: - - # systemctl start smb - # systemctl enable smb - # smbclient -L localhost –U user1 - # smbclient -L localhost –U user2 - -![Verify Samba Share](http://www.tecmint.com/wp-content/uploads/2015/09/Verify-Samba-Share.png) - -Verify Samba Share - -At this point, the Samba file server has been properly installed and configured. Now it’s time to test this setup on our RHEL 7 and Windows 8 clients. - -### Step 6:​ Mounting the Samba Share in Linux ### - -First, make sure the Samba share is accessible from this client: - -# smbclient –L 192.168.0.18 -U user2 - -![Mount Samba Share on Linux](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Share-on-Linux.png) - -Mount Samba Share on Linux - -(repeat the above command for user1) - -As any other storage media, you can mount (and later unmount) this network share when needed: - - # mount //192.168.0.18/finance /media/samba -o username=user1 - -![Mount Samba Network Share](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Network-Share.png) - -Mount Samba Network Share - -(where /media/samba is an existing directory) - -or permanently, by adding the following entry in /etc/fstab file: - -**fstab** - ----------- - - //192.168.0.18/finance /media/samba cifs credentials=/media/samba/.smbcredentials,defaults 0 0 - -Where the hidden file /media/samba/.smbcredentials (whose permissions and ownership have been set to 600 and root:root, respectively) contains two lines that indicate the username and password of an account that is allowed to use the share: - -**.smbcredentials** - ----------- - - username=user1 - password=PasswordForUser1 - -Finally, let’s create a file inside /finance and check the permissions and ownership: - - # touch /media/samba/FileCreatedInRHELClient.txt - -![Create File in Samba Share](http://www.tecmint.com/wp-content/uploads/2015/09/Create-File-in-Samba-Share.png) - -Create File in Samba Share - -As you can see, the file was created with 0770 permissions and ownership set to user1:finance. - -### Step 7: Mounting the Samba Share in Windows ### - -To mount the Samba share in Windows, go to My PC and choose Computer, then Map network drive. Next, assign a letter for the drive to be mapped and check Connect using different credentials (the screenshots below are in Spanish, my native language): - -![Mount Samba Share in Windows](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Share-in-Windows.png) - -Mount Samba Share in Windows - -Finally, let’s create a file and check the permissions and ownership: - -![Create Files on Windows Samba Share](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Files-on-Windows-Samba-Share.png) - -Create Files on Windows Samba Share - - # ls -l /finance - -This time the file belongs to user2 since that’s the account we used to connect from the Windows client. - -### Summary ### - -In this article we have explained not only how to set up a Samba server and two clients using different operating systems, but also [how to configure the firewalld][3] and [SELinux on the server][4] to allow the desired group collaboration capabilities. - -Last, but not least, let me recommend the reading of the online [man page of smb.conf][5] to explore other configuration directives that may be more suitable for your case than the scenario described in this article. - -As always, feel free to drop a comment using the form below if you have any comments or suggestions. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/setup-samba-file-sharing-for-linux-windows-clients/ - -作者:[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/add-users-in-linux/ -[2]:http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in-firewall/ -[3]:http://www.tecmint.com/configure-firewalld-in-centos-7/ -[4]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ -[5]:https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html \ No newline at end of file diff --git a/translated/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md b/translated/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md new file mode 100644 index 0000000000..cb8fa59954 --- /dev/null +++ b/translated/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md @@ -0,0 +1,211 @@ +安装 Samba 并配置 Firewalld 和 SELinux 使得能在 Linux 和 Windows 之间共享文件 - 第六部分 +================================================================================ +由于计算机很少作为一个独立的系统工作,作为一个系统管理员或工程师,就应该知道如何在有多种类型的服务器之间搭设和维护网络。 + +在本篇以及该系列后面的文章中,我们会介绍用 Windows/Linux 配置 Samba 和 NFS 服务器以及 Linux 客户端。 + +![在 Linux 中配置 Samba 进行文件共享](http://www.tecmint.com/wp-content/uploads/2015/09/setup-samba-file-sharing-on-linux-windows-clients.png) + +RHCE 系列第六部分 - 设置 Samba 文件共享 + +如果有人叫你设置文件服务器用于协作或者配置很可能有多种不同类型操作系统和设备的企业环境,这篇文章就能派上用场。 + +由于你可以在网上找到很多关于 Samba 和 NFS 背景和技术方面的介绍,在这篇文章以及后续文章中我们就省略了这些部分直接进入到我们的主题。 + +### 步骤一: 安装 Samba 服务器 ### + +我们当前的测试环境包括两台 RHEL 7 和一台 Windows 8: + + 1. Samba / NFS 服务器 [box1 (RHEL 7): 192.168.0.18], + 2. Samba 客户端 #1 [box2 (RHEL 7): 192.168.0.20] + 3. Samba 客户端 #2 [Windows 8 machine: 192.168.0.106] + +![测试安装 Samba](http://www.tecmint.com/wp-content/uploads/2015/09/Testing-Setup-for-Samba.png) + +测试安装 Samba + +在 box1 中安装以下软件包: + + # yum update && yum install samba samba-client samba-common + +在 box2: + + # yum update && yum install samba samba-client samba-common cifs-utils + +安装完成后,就可以配置我们的共享了。 + +### 步骤二: 设置通过 Samba 进行文件共享 ### + +Samba 这么重要的原因之一是它为 SMB/CIFS 客户端(译者注:SMB 是微软和英特尔制定的一种通信协议,CIFS 是其中一个版本,更详细的介绍可以参考[Wiki][6])提供了文件和打印设备,这使得客户端看起来服务器就是一个 Windows 系统(我必须承认写这篇文章的时候我有一点激动,因为这是我多年前作为一个新手 Linux 系统管理员的第一次设置)。 + +**添加系统用户并设置权限和属性** + +为了允许组协作,我们会在 box1 中用 [useradd 命令][1]创建一个有两个用户(user1 和 user2)的组 finance 和目录 /finance。 + +我们同时会把这个目录的组所有者更改为 finance 并把权限设置为 0777(所有者和组属主可读可写可执行): + + # groupadd finance + # useradd user1 + # useradd user2 + # usermod -a -G finance user1 + # usermod -a -G finance user2 + # mkdir /finance + # chmod 0770 /finance + # chgrp finance /finance + +### 步骤三: 配置 SELinux 和 Firewalld ### + +在配置 /finance 作为 Samba 共享目录之前,我们需要像下面那样停用 SELinux 或设置恰当的布尔值和安全选项(否则,SELinux 会阻止客户端访问共享目录): + + # setsebool -P samba_export_all_ro=1 samba_export_all_rw=1 + # getsebool –a | grep samba_export + # semanage fcontext –at samba_share_t "/finance(/.*)?" + # restorecon /finance + +另外我们必须确保 [firewalld][2] 允许 Samba 流量通过。 + + # firewall-cmd --permanent --add-service=samba + # firewall-cmd --reload + +### 步骤四: 配置 Samba 共享目录 ### + +现在我们来看看配置文件 /etc/samba/smb.conf 并添加用于共享的章节(section):我们希望组 finance 的成员可以浏览 /finance 的内容,在里面保存/创建文件或者子目录(默认权限为 0777,组所有者为 finance): + +**smb.conf** + +---------- + + [finance] + comment=Directory for collaboration of the company's finance team + browsable=yes + path=/finance + public=no + valid users=@finance + write list=@finance + writeable=yes + create mask=0770 + Force create mode=0770 + force group=finance + +保存文件然后用 testparm 工具进行测试。如果这里有任何错误,命令的输出或提示你需要如何修复。否则,会显示你 Samba 服务器配置的回顾: + +![测试 Samba 配置](http://www.tecmint.com/wp-content/uploads/2015/09/Test-Samba-Configuration.png) + +测试 Samba 配置 + +如果你要添加另一个公开的共享目录(意味着没有任何验证),在 /etc/samba/smb.conf 中创建另一章节,在共享目录名称下面复制上面的章节,只需要把 public=no 更改为 public=yes 并去掉有效用户和写列表命令。 + +### 步骤五: 添加 Samba 用户 ### + +下一步,你需要添加 user1 和 user2 作为 Samba 的用户。要做到这点,你需要用 smbpasswd 命令,它会和 Samba 的数据库进行交互。会提示你输入一个命令用于你之后和共享目录连接: + + # smbpasswd -a user1 + # smbpasswd -a user2 + +最后,重启 Samda,启用系统启动时自动启动服务,并确保共享目录对网络客户端可用: + + # systemctl start smb + # systemctl enable smb + # smbclient -L localhost –U user1 + # smbclient -L localhost –U user2 + + +![验证 Samba 共享](http://www.tecmint.com/wp-content/uploads/2015/09/Verify-Samba-Share.png) + +验证 Samba 共享 + +到这里,已经正确安装和配置了 Samba 文件服务器。现在让我们在 RHEL 7 和 Windows 8 客户端中测试该配置。 + +### 步骤六: 在 Linux 中挂载 Samba 共享 ### + +首先,确保客户端可以访问 Samba 共享: + +# smbclient –L 192.168.0.18 -U user2 + + +![在 Linux 上挂载 Samba 共享](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Share-on-Linux.png) + +在 Linux 上挂载 Samba 共享 + +(为 user1 重复上面的命令) + +正如任何其它存储介质,当你需要的时候你可以挂载(之后卸载)该网络共享: + + # mount //192.168.0.18/finance /media/samba -o username=user1 + +![挂载 Samba 网络共享](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Network-Share.png) + +挂载 Samba 网络共享 + +(其中 /media/samba 是一个已有的目录) + +或者在 /etc/fstab 文件中添加下面的条目自动挂载: + +**fstab** + +---------- + + //192.168.0.18/finance /media/samba cifs credentials=/media/samba/.smbcredentials,defaults 0 0 + +其中隐藏文件 /media/samba/.smbcredentials(它的权限被设置为 600 和 root:root)有两行,指示允许使用共享的账户的用户名和密码: + +**.smbcredentials** + +---------- + + username=user1 + password=PasswordForUser1 + +最后,让我们在 /finance 中创建一个文件并检查权限和属性: + + # touch /media/samba/FileCreatedInRHELClient.txt + +![在 Samba 共享中创建文件](http://www.tecmint.com/wp-content/uploads/2015/09/Create-File-in-Samba-Share.png) + +在 Samba 共享中创建文件 + +正如你看到的,用权限 0770 和属主 user1:finance 创建了文件。 + +### 步骤七: 在 Windows 上挂载 Samba 共享 ### + +要在 Windows 上挂载 Samba 共享,进入 ‘我的计算机’ 并选择 ‘计算机’,‘网络驱动映射’。下一步,为要映射的驱动分配一个字母并用不同的认证检查连接(下面的截图使用我的母语西班牙语): + +![在 Windows 中挂载 Samba 共享](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Share-in-Windows.png) + +在 Windows 中挂载 Samba 共享 + +最后,让我们新建一个文件并检查权限和属性: + +![在 Windows Samba 共享中新建文件](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Files-on-Windows-Samba-Share.png) + +在 Windows Samba 共享中新建文件 + + # ls -l /finance + +这次文件属于 user2,因为这是我们用于从 Windows 客户端中连接的账户。 + +### 总结 ### + +在这篇文章中我们不仅介绍了如何使用不同操作系统设置 Samba 服务器和两个客户端,也介绍了[如何配置 Firewalld][3] 和 [服务器中的 SELinux][4] 以获取所需的组协作功能。 + +最后,同样重要的是,我推荐阅读网上的 [smb.conf man 手册][5] 查看其它可能针对你的情况比本文中介绍的场景更加合适的配置命令。 + +正如往常,欢迎在下面的评论框中留下你的评论或建议。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/setup-samba-file-sharing-for-linux-windows-clients/ + +作者:[Gabriel Cánepa][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) +校对:[校对者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/add-users-in-linux/ +[2]:http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in-firewall/ +[3]:http://www.tecmint.com/configure-firewalld-in-centos-7/ +[4]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ +[5]:https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html +[6]:https://en.wikipedia.org/wiki/Server_Message_Block \ No newline at end of file From b6b80a6daad6d8948d592dddc9e81821ede09510 Mon Sep 17 00:00:00 2001 From: Luoyuanhao Date: Sun, 13 Sep 2015 19:59:37 +0800 Subject: [PATCH 2059/2517] [Translated] tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md --- ...-based Authentication for Linux Clients.md | 189 ----------------- ...-based Authentication for Linux Clients.md | 190 ++++++++++++++++++ 2 files changed, 190 insertions(+), 189 deletions(-) delete mode 100644 sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md create mode 100644 translated/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md diff --git a/sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md b/sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md deleted file mode 100644 index e0341c5247..0000000000 --- a/sources/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md +++ /dev/null @@ -1,189 +0,0 @@ -ictlyh Translating -Setting Up NFS Server with Kerberos-based Authentication for Linux Clients – Part 7 -================================================================================ -In the last article of this series, we reviewed [how to set up a Samba share over a network][1] that may consist of multiple types of operating systems. Now, if you need to set up file sharing for a group of Unix-like clients you will automatically think of the Network File System, or NFS for short. - -![Setting Up NFS Server with Kerberos Authentication](http://www.tecmint.com/wp-content/uploads/2015/09/Setting-Kerberos-Authentication-with-NFS.jpg) - -RHCE Series: Setting Up NFS Server with Kerberos Authentication – Part 7 - -In this article we will walk you through the process of using Kerberos-based authentication for NFS shares. It is assumed that you already have set up a NFS server and a client. If not, please refer to [install and configure NFS server][2] – which will list the necessary packages that need to be installed and explain how to perform initial configurations on the server before proceeding further. - -In addition, you will want to configure both [SELinux][3] and [firewalld][4] to allow for file sharing through NFS. - -The following example assumes that your NFS share is located in /nfs in box2: - - # semanage fcontext -a -t public_content_rw_t "/nfs(/.*)?" - # restorecon -R /nfs - # setsebool -P nfs_export_all_rw on - # setsebool -P nfs_export_all_ro on - -(where the -P flag indicates persistence across reboots). - -Finally, don’t forget to: - -#### Create NFS Group and Configure NFS Share Directory #### - -1. Create a group called nfs and add the nfsnobody user to it, then change the permissions of the /nfs directory to 0770 and its group owner to nfs. Thus, nfsnobody (which is mapped to the client requests) will have write permissions on the share) and you won’t need to use no_root_squash in the /etc/exports file. - - # groupadd nfs - # usermod -a -G nfs nfsnobody - # chmod 0770 /nfs - # chgrp nfs /nfs - -2. Modify the exports file (/etc/exports) as follows to only allow access from box1 using Kerberos security (sec=krb5). - -**Note**: that the value of anongid has been set to the GID of the nfs group that we created previously: - -**exports – Add NFS Share** - ----------- - - /nfs box1(rw,sec=krb5,anongid=1004) - -3. Re-export (-r) all (-a) the NFS shares. Adding verbosity to the output (-v) is a good idea since it will provide helpful information to troubleshoot the server if something goes wrong: - - # exportfs -arv - -4. Restart and enable the NFS server and related services. Note that you don’t have to enable nfs-lock and nfs-idmapd because they will be automatically started by the other services on boot: - - # systemctl restart rpcbind nfs-server nfs-lock nfs-idmap - # systemctl enable rpcbind nfs-server - -#### Testing Environment and Other Prerequisites #### - -In this guide we will use the following test environment: - -- Client machine [box1: 192.168.0.18] -- NFS / Kerberos server [box2: 192.168.0.20] (also known as Key Distribution Center, or KDC for short). - -**Note**: that Kerberos service is crucial to the authentication scheme. - -As you can see, the NFS server and the KDC are hosted in the same machine for simplicity, although you can set them up in separate machines if you have more available. Both machines are members of the `mydomain.com` domain. - -Last but not least, Kerberos requires at least a basic schema of name resolution and the [Network Time Protocol][5] service to be present in both client and server since the security of Kerberos authentication is in part based upon the timestamps of tickets. - -To set up name resolution, we will use the /etc/hosts file in both client and server: - -**host file – Add DNS for Domain** - ----------- - - 192.168.0.18 box1.mydomain.com box1 - 192.168.0.20 box2.mydomain.com box2 - -In RHEL 7, chrony is the default software that is used for NTP synchronization: - - # yum install chrony - # systemctl start chronyd - # systemctl enable chronyd - -To make sure chrony is actually synchronizing your system’s time with time servers you may want to issue the following command two or three times and make sure the offset is getting nearer to zero: - - # chronyc tracking - -![Synchronize Server Time with Chrony](http://www.tecmint.com/wp-content/uploads/2015/09/Synchronize-Time-with-Chrony.png) - -Synchronize Server Time with Chrony - -### Installing and Configuring Kerberos ### - -To set up the KDC, install the following packages on both server and client (omit the server package in the client): - - # yum update && yum install krb5-server krb5-workstation pam_krb5 - -Once it is installed, edit the configuration files (/etc/krb5.conf and /var/kerberos/krb5kdc/kadm5.acl) and replace all instances of example.com (lowercase and uppercase) with `mydomain.com` as follows. - -Next, enable Kerberos through the firewall and start / enable the related services. - -**Important**: nfs-secure must be started and enabled on the client as well: - - # firewall-cmd --permanent --add-service=kerberos - # systemctl start krb5kdc kadmin nfs-secure - # systemctl enable krb5kdc kadmin nfs-secure - -Now create the Kerberos database (please note that this may take a while as it requires a some level of entropy in your system. To speed things up, I opened another terminal and ran ping -f localhost for 30-45 seconds): - - # kdb5_util create -s - -![Create Kerberos Database](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Kerberos-Database.png) - -Create Kerberos Database - -Next, using the kadmin.local tool, create an admin principal for root: - - # kadmin.local - # addprinc root/admin - -And add the Kerberos server to the database: - - # addprinc -randkey host/box2.mydomain.com - -Same with the NFS service for both client (box1) and server (box2). Please note that in the screenshot below I forgot to do it for box1 before quitting: - - # addprinc -randkey nfs/box2.mydomain.com - # addprinc -randkey nfs/box1.mydomain.com - -And exit by typing quit and pressing Enter: - -![Add Kerberos to NFS Server](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Kerboros-for-NFS.png) - -Add Kerberos to NFS Server - -Then obtain and cache Kerberos ticket-granting ticket for root/admin: - - # kinit root/admin - # klist - -![Cache Kerberos](http://www.tecmint.com/wp-content/uploads/2015/09/Cache-kerberos-Ticket.png) - -Cache Kerberos - -The last step before actually using Kerberos is storing into a keytab file (in the server) the principals that are authorized to use Kerberos authentication: - - # kdadmin.local - # ktadd host/box2.mydomain.com - # ktadd nfs/box2.mydomain.com - # ktadd nfs/box1.mydomain.com - -Finally, mount the share and perform a write test: - - # mount -t nfs4 -o sec=krb5 box2:/nfs /mnt - # echo "Hello from Tecmint.com" > /mnt/greeting.txt - -![Mount NFS Share](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-NFS-Share.png) - -Mount NFS Share - -Let’s now unmount the share, rename the keytab file in the client (to simulate it’s not present) and try to mount the share again: - - # umount /mnt - # mv /etc/krb5.keytab /etc/krb5.keytab.orig - -![Mount Unmount Kerberos NFS Share](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Unmount-Kerberos-NFS-Share.png) - -Mount Unmount Kerberos NFS Share - -Now you can use the NFS share with Kerberos-based authentication. - -### Summary ### - -In this article we have explained how to set up NFS with Kerberos authentication. Since there is much more to the topic than we can cover in a single guide, feel free to check the online [Kerberos documentation][6] and since Kerberos is a bit tricky to say the least, don’t hesitate to drop us a note using the form below if you run into any issue or need help with your testing or implementation. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/setting-up-nfs-server-with-kerberos-based-authentication/ - -作者:[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/setup-samba-file-sharing-for-linux-windows-clients/ -[2]:http://www.tecmint.com/configure-nfs-server/ -[3]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ -[4]:http://www.tecmint.com/firewalld-rules-for-centos-7/ -[5]:http://www.tecmint.com/install-ntp-server-in-centos/ -[6]:http://web.mit.edu/kerberos/krb5-1.12/doc/admin/admin_commands/ \ No newline at end of file diff --git a/translated/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md b/translated/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md new file mode 100644 index 0000000000..5eba70cd7a --- /dev/null +++ b/translated/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md @@ -0,0 +1,190 @@ +第七部分 - 在 Linux 客户端配置基于 Kerberos 身份验证的 NFS 服务器 +================================================================================ +在本系列的前一篇文章,我们回顾了[如何在可能包括多种类型操作系统的网络上配置 Samba 共享][1]。现在,如果你需要为一组类-Unix 客户端配置文件共享,很自然的你会想到网络文件系统,或简称 NFS。 + + +![设置使用 Kerberos 进行身份验证的 NFS 服务器](http://www.tecmint.com/wp-content/uploads/2015/09/Setting-Kerberos-Authentication-with-NFS.jpg) + +RHCE 系列:第七部分 - 设置使用 Kerberos 进行身份验证的 NFS 服务器 + +在这篇文章中我们会介绍配置基于 Kerberos 身份验证的 NFS 共享的整个流程。假设你已经配置好了一个 NFS 服务器和一个客户端。如果还没有,可以参考 [安装和配置 NFS 服务器][2] - 它列出了需要安装的依赖软件包并解释了在进行下一步之前如何在服务器上进行初始化配置。 + +另外,你可能还需要配置 [SELinux][3] 和 [firewalld][4] 以允许通过 NFS 进行文件共享。 + +下面的例子假设你的 NFS 共享目录在 box2 的 /nfs: + + # semanage fcontext -a -t public_content_rw_t "/nfs(/.*)?" + # restorecon -R /nfs + # setsebool -P nfs_export_all_rw on + # setsebool -P nfs_export_all_ro on + +(其中 -P 标记指示重启持久有效)。 + +最后,别忘了: + +#### 创建 NFS 组并配置 NFS 共享目录 #### + +1. 新建一个名为 nfs 的组并给它添加用户 nfsnobody,然后更改 /nfs 目录的权限为 0770,组属主为 nfs。于是,nfsnobody(对应请求用户)在共享目录有写的权限,你就不需要在 /etc/exports 文件中使用 no_root_squash(译者注:设为 root_squash 意味着在访问 NFS 服务器上的文件时,客户机上的 root 用户不会被当作 root 用户来对待)。 + + # groupadd nfs + # usermod -a -G nfs nfsnobody + # chmod 0770 /nfs + # chgrp nfs /nfs + +2. 像下面那样更改 export 文件(/etc/exports)只允许从 box1 使用 Kerberos 安全验证的访问(sec=krb5)。 + +**注意**:anongid 的值设置为之前新建的组 nfs 的 GID: + +**exports – 添加 NFS 共享** + +---------- + + /nfs box1(rw,sec=krb5,anongid=1004) + +3. 再次 exprot(-r)所有(-a)NFS 共享。为输出添加详情(-v)是个好主意,因为它提供了发生错误时解决问题的有用信息: + + # exportfs -arv + +4. 重启并启用 NFS 服务器以及相关服务。注意你不需要启动 nfs-lock 和 nfs-idmapd,因为系统启动时其它服务会自动启动它们: + + # systemctl restart rpcbind nfs-server nfs-lock nfs-idmap + # systemctl enable rpcbind nfs-server + +#### 测试环境和其它前提要求 #### + +在这篇指南中我们使用下面的测试环境: + +- 客户端机器 [box1: 192.168.0.18] +- NFS / Kerberos 服务器 [box2: 192.168.0.20] (也称为密钥分发中心,简称 KDC)。 + +**注意**:Kerberos 服务是至关重要的认证方案。 + +正如你看到的,为了简便,NFS 服务器和 KDC 在同一台机器上,当然如果你有更多可用机器你也可以把它们安装在不同的机器上。两台机器都在 `mydomain.com` 域。 + +最后同样重要的是,Kerberos 要求客户端和服务器中至少有一个域名解析的基本模式和[网络时间协议][5]服务,因为 Kerberos 身份验证的安全一部分基于时间戳。 + +为了配置域名解析,我们在客户端和服务器中编辑 /etc/hosts 文件: + +**host 文件 – 为域添加 DNS** + +---------- + + 192.168.0.18 box1.mydomain.com box1 + 192.168.0.20 box2.mydomain.com box2 + +在 RHEL 7 中,chrony 是用于 NTP 同步的默认软件: + + # yum install chrony + # systemctl start chronyd + # systemctl enable chronyd + +为了确保 chrony 确实在和时间服务器同步你系统的时间,你可能要输入下面的命令两到三次,确保时间偏差尽可能接近 0: + + # chronyc tracking + + +![用 Chrony 同步服务器时间](http://www.tecmint.com/wp-content/uploads/2015/09/Synchronize-Time-with-Chrony.png) + +用 Chrony 同步服务器时间 + +### 安装和配置 Kerberos ### + +要设置 KDC,首先在客户端和服务器安装下面的软件包(客户端不需要 server 软件包): + + # yum update && yum install krb5-server krb5-workstation pam_krb5 + +安装完成后,编辑配置文件(/etc/krb5.conf 和 /var/kerberos/krb5kdc/kadm5.acl),像下面那样用 `mydomain.com` 替换所有 example.com。 + +下一步,确保 Kerberos 能功过防火墙并启动/启用相关服务。 + +**重要**:客户端也必须启动和启用 nfs-secure: + + # firewall-cmd --permanent --add-service=kerberos + # systemctl start krb5kdc kadmin nfs-secure + # systemctl enable krb5kdc kadmin nfs-secure + +现在创建 Kerberos 数据库(请注意这可能会需要一点时间,因为它会和你的系统进行多次交互)。为了加速这个过程,我打开了另一个终端并运行了 ping -f localhost 30 到 45 秒): + + # kdb5_util create -s + +![创建 Kerberos 数据库](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Kerberos-Database.png) + +创建 Kerberos 数据库 + +下一步,使用 kadmin.local 工具为 root 创建管理权限: + + # kadmin.local + # addprinc root/admin + +添加 Kerberos 服务器到数据库: + + # addprinc -randkey host/box2.mydomain.com + +在客户端(box1)和服务器(box2)上对 NFS 服务同样操作。请注意下面的截图中在退出前我忘了在 box1 上进行操作: + + # addprinc -randkey nfs/box2.mydomain.com + # addprinc -randkey nfs/box1.mydomain.com + +输入 quit 和回车键退出: + +![添加 Kerberos 到 NFS 服务器](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Kerboros-for-NFS.png) + +添加 Kerberos 到 NFS 服务器 + +为 root/admin 获取和缓存票据授权票据(ticket-granting ticket): + + # kinit root/admin + # klist + +![缓存 Kerberos](http://www.tecmint.com/wp-content/uploads/2015/09/Cache-kerberos-Ticket.png) + +缓存 Kerberos + +真正使用 Kerberos 之前的最后一步是保存被授权使用 Kerberos 身份验证的规则到一个密钥表文件(在服务器中): + + # kdadmin.local + # ktadd host/box2.mydomain.com + # ktadd nfs/box2.mydomain.com + # ktadd nfs/box1.mydomain.com + +最后,挂载共享目录并进行一个写测试: + + # mount -t nfs4 -o sec=krb5 box2:/nfs /mnt + # echo "Hello from Tecmint.com" > /mnt/greeting.txt + +![挂载 NFS 共享](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-NFS-Share.png) + +挂载 NFS 共享 + +现在让我们卸载共享,在客户端中重命名密钥表文件(模拟它不存在)然后试着再次挂载共享目录: + + # umount /mnt + # mv /etc/krb5.keytab /etc/krb5.keytab.orig + +![挂载/卸载 Kerberos NFS 共享](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Unmount-Kerberos-NFS-Share.png) + +挂载/卸载 Kerberos NFS 共享 + +现在你可以使用基于 Kerberos 身份验证的 NFS 共享了。 + +### 总结 ### + +在这篇文章中我们介绍了如何设置带 Kerberos 身份验证的 NFS。和我们在这篇指南中介绍的相比,该主题还有很多相关内容,可以在 [Kerberos 手册][6] 查看,另外至少可以说 Kerberos 有一点棘手,如果你在测试或实现中遇到了任何问题或需要帮助,别犹豫在下面的评论框中告诉我们吧。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/setting-up-nfs-server-with-kerberos-based-authentication/ + +作者:[Gabriel Cánepa][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) +校对:[校对者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/setup-samba-file-sharing-for-linux-windows-clients/ +[2]:http://www.tecmint.com/configure-nfs-server/ +[3]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ +[4]:http://www.tecmint.com/firewalld-rules-for-centos-7/ +[5]:http://www.tecmint.com/install-ntp-server-in-centos/ +[6]:http://web.mit.edu/kerberos/krb5-1.12/doc/admin/admin_commands/ \ No newline at end of file From 9db10d3e4ce0c896200f654eefcb749824a49aa0 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 13 Sep 2015 20:14:05 +0800 Subject: [PATCH 2060/2517] PUB:20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management @wi-cuckoo --- ...ence on RedHat Linux Package Management.md | 348 ++++++++++++++++++ ...ence on RedHat Linux Package Management.md | 348 ------------------ 2 files changed, 348 insertions(+), 348 deletions(-) create mode 100644 published/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md delete mode 100644 translated/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md diff --git a/published/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md b/published/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md new file mode 100644 index 0000000000..0ca331b72b --- /dev/null +++ b/published/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md @@ -0,0 +1,348 @@ +Shilpa Nair 分享的 RedHat Linux 包管理方面的面试经验 +======================================================================== +**Shilpa Nair 刚于2015年毕业。她之后去了一家位于 Noida,Delhi 的国家新闻电视台,应聘实习生的岗位。在她去年毕业季的时候,常逛 Tecmint 寻求作业上的帮助。从那时开始,她就常去 Tecmint。** + +![Linux Interview Questions on RPM](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Interview-Questions-on-RPM.jpeg) + +*有关 RPM 方面的 Linux 面试题* + +所有的问题和回答都是 Shilpa Nair 根据回忆重写的。 + +> “大家好!我是来自 Delhi 的Shilpa Nair。我不久前才顺利毕业,正寻找一个实习的机会。在大学早期的时候,我就对 UNIX 十分喜爱,所以我也希望这个机会能适合我,满足我的兴趣。我被提问了很多问题,大部分都是关于 RedHat 包管理的基础问题。” + +下面就是我被问到的问题,和对应的回答。我仅贴出了与 RedHat GNU/Linux 包管理相关的,也是主要被提问的。 + +### 1,Linux 里如何查找一个包安装与否?假设你需要确认 ‘nano’ 有没有安装,你怎么做? ### + +**回答**:为了确认 nano 软件包有没有安装,我们可以使用 rpm 命令,配合 -q 和 -a 选项来查询所有已安装的包 + + # rpm -qa nano + 或 + # rpm -qa | grep -i nano + + nano-2.3.1-10.el7.x86_64 + +同时包的名字必须是完整的,不完整的包名会返回到提示符,不打印任何东西,就是说这包(包名字不全)未安装。下面的例子会更好理解些: + +我们通常使用 vim 替代 vi 命令。当时如果我们查找安装包 vi/vim 的时候,我们就会看到标准输出上没有任何结果。 + + # vi + # vim + +尽管如此,我们仍然可以像上面一样运行 vi/vim 命令来清楚地知道包有没有安装。只是因为我们不知道它的完整包名才不能找到的。如果我们不确切知道完整的文件名,我们可以使用通配符: + + # rpm -qa vim* + + vim-minimal-7.4.160-1.el7.x86_64 + +通过这种方式,我们可以获得任何软件包的信息,安装与否。 + +### 2. 你如何使用 rpm 命令安装 XYZ 软件包? ### + +**回答**:我们可以使用 rpm 命令安装任何的软件包(*.rpm),像下面这样,选项 -i(安装),-v(冗余或者显示额外的信息)和 -h(在安装过程中,打印#号显示进度)。 + + # rpm -ivh peazip-1.11-1.el6.rf.x86_64.rpm + + Preparing... ################################# [100%] + Updating / installing... + 1:peazip-1.11-1.el6.rf ################################# [100%] + +如果要升级一个早期版本的包,应加上 -U 选项,选项 -v 和 -h 可以确保我们得到用 # 号表示的冗余输出,这增加了可读性。 + +### 3. 你已经安装了一个软件包(假设是 httpd),现在你想看看软件包创建并安装的所有文件和目录,你会怎么做? ### + +**回答**:使用选项 -l(列出所有文件)和 -q(查询)列出 httpd 软件包安装的所有文件(Linux 哲学:所有的都是文件,包括目录)。 + + # rpm -ql httpd + + /etc/httpd + /etc/httpd/conf + /etc/httpd/conf.d + ... + +### 4. 假如你要移除一个软件包,叫 postfix。你会怎么做? ### + +**回答**:首先我们需要知道什么包安装了 postfix。查找安装 postfix 的包名后,使用 -e(擦除/卸载软件包)和 -v(冗余输出)两个选项来实现。 + + # rpm -qa postfix* + + postfix-2.10.1-6.el7.x86_64 + +然后移除 postfix,如下: + + # rpm -ev postfix-2.10.1-6.el7.x86_64 + + Preparing packages... + postfix-2:3.0.1-2.fc22.x86_64 + +### 5. 获得一个已安装包的具体信息,如版本,发行号,安装日期,大小,总结和一个简短的描述。 ### + +**回答**:我们通过使用 rpm 的选项 -qi,后面接包名,可以获得关于一个已安装包的具体信息。 + +举个例子,为了获得 openssh 包的具体信息,我需要做的就是: + + # rpm -qi openssh + + [root@tecmint tecmint]# rpm -qi openssh + Name : openssh + Version : 6.8p1 + Release : 5.fc22 + Architecture: x86_64 + Install Date: Thursday 28 May 2015 12:34:50 PM IST + Group : Applications/Internet + Size : 1542057 + License : BSD + .... + +### 6. 假如你不确定一个指定包的配置文件在哪,比如 httpd。你如何找到所有 httpd 提供的配置文件列表和位置。 ### + +**回答**: 我们需要用选项 -c 接包名,这会列出所有配置文件的名字和他们的位置。 + + # rpm -qc httpd + + /etc/httpd/conf.d/autoindex.conf + /etc/httpd/conf.d/userdir.conf + /etc/httpd/conf.d/welcome.conf + /etc/httpd/conf.modules.d/00-base.conf + /etc/httpd/conf/httpd.conf + /etc/sysconfig/httpd + +相似地,我们可以列出所有相关的文档文件,如下: + + # rpm -qd httpd + + /usr/share/doc/httpd/ABOUT_APACHE + /usr/share/doc/httpd/CHANGES + /usr/share/doc/httpd/LICENSE + ... + +我们也可以列出所有相关的证书文件,如下: + + # rpm -qL openssh + + /usr/share/licenses/openssh/LICENCE + +忘了说明上面的选项 -d 和 -L 分别表示 “文档” 和 “证书”,抱歉。 + +### 7. 你找到了一个配置文件,位于‘/usr/share/alsa/cards/AACI.conf’,现在你不确定该文件属于哪个包。你如何查找出包的名字? ### + +**回答**:当一个包被安装后,相关的信息就存储在了数据库里。所以使用选项 -qf(-f 查询包拥有的文件)很容易追踪谁提供了上述的包。 + + # rpm -qf /usr/share/alsa/cards/AACI.conf + alsa-lib-1.0.28-2.el7.x86_64 + +类似地,我们可以查找(谁提供的)关于任何子包,文档和证书文件的信息。 + +### 8. 你如何使用 rpm 查找最近安装的软件列表? ### + +**回答**:如刚刚说的,每一样被安装的文件都记录在了数据库里。所以这并不难,通过查询 rpm 的数据库,找到最近安装软件的列表。 + +我们通过运行下面的命令,使用选项 -last(打印出最近安装的软件)达到目的。 + + # rpm -qa --last + +上面的命令会打印出所有安装的软件,最近安装的软件在列表的顶部。 + +如果我们关心的是找出特定的包,我们可以使用 grep 命令从列表中匹配包(假设是 sqlite ),简单如下: + + # rpm -qa --last | grep -i sqlite + + sqlite-3.8.10.2-1.fc22.x86_64 Thursday 18 June 2015 05:05:43 PM IST + +我们也可以获得10个最近安装的软件列表,简单如下: + + # rpm -qa --last | head + +我们可以重定义一下,输出想要的结果,简单如下: + + # rpm -qa --last | head -n 2 + +上面的命令中,-n 代表数目,后面接一个常数值。该命令是打印2个最近安装的软件的列表。 + +### 9. 安装一个包之前,你如果要检查其依赖。你会怎么做? ### + +**回答**:检查一个 rpm 包(XYZ.rpm)的依赖,我们可以使用选项 -q(查询包),-p(指定包名)和 -R(查询/列出该包依赖的包,嗯,就是依赖)。 + + # rpm -qpR gedit-3.16.1-1.fc22.i686.rpm + + /bin/sh + /usr/bin/env + glib2(x86-32) >= 2.40.0 + gsettings-desktop-schemas + gtk3(x86-32) >= 3.16 + gtksourceview3(x86-32) >= 3.16 + gvfs + libX11.so.6 + ... + +### 10. rpm 是不是一个前端的包管理工具呢? ### + +**回答**:**不是!**rpm 是一个后端管理工具,适用于基于 Linux 发行版的 RPM (此处指 Redhat Package Management)。 + +[YUM][1],全称 Yellowdog Updater Modified,是一个 RPM 的前端工具。YUM 命令自动完成所有工作,包括解决依赖和其他一切事务。 + +最近,[DNF][2](YUM命令升级版)在Fedora 22发行版中取代了 YUM。尽管 YUM 仍然可以在 RHEL 和 CentOS 平台使用,我们也可以安装 dnf,与 YUM 命令共存使用。据说 DNF 较于 YUM 有很多提高。 + +知道更多总是好的,保持自我更新。现在我们移步到前端部分来谈谈。 + +### 11. 你如何列出一个系统上面所有可用的仓库列表。 ### + +**回答**:简单地使用下面的命令,我们就可以列出一个系统上所有可用的仓库列表。 + + # yum repolist + 或 + # dnf repolist + + Last metadata expiration check performed 0:30:03 ago on Mon Jun 22 16:50:00 2015. + repo id repo name status + *fedora Fedora 22 - x86_64 44,762 + ozonos Repository for Ozon OS 61 + *updates Fedora 22 - x86_64 - Updates + +上面的命令仅会列出可用的仓库。如果你需要列出所有的仓库,不管可用与否,可以这样做。 + + # yum repolist all + 或 + # dnf repolist all + + Last metadata expiration check performed 0:29:45 ago on Mon Jun 22 16:50:00 2015. + repo id repo name status + *fedora Fedora 22 - x86_64 enabled: 44,762 + fedora-debuginfo Fedora 22 - x86_64 - Debug disabled + fedora-source Fedora 22 - Source disabled + ozonos Repository for Ozon OS enabled: 61 + *updates Fedora 22 - x86_64 - Updates enabled: 5,018 + updates-debuginfo Fedora 22 - x86_64 - Updates - Debug + +### 12. 你如何列出一个系统上所有可用并且安装了的包? ### + +**回答**:列出一个系统上所有可用的包,我们可以这样做: + + # yum list available + 或 + # dnf list available + + ast metadata expiration check performed 0:34:09 ago on Mon Jun 22 16:50:00 2015. + Available Packages + 0ad.x86_64 0.0.18-1.fc22 fedora + 0ad-data.noarch 0.0.18-1.fc22 fedora + 0install.x86_64 2.6.1-2.fc21 fedora + 0xFFFF.x86_64 0.3.9-11.fc22 fedora + 2048-cli.x86_64 0.9-4.git20141214.723738c.fc22 fedora + 2048-cli-nocurses.x86_64 0.9-4.git20141214.723738c.fc22 fedora + .... + +而列出一个系统上所有已安装的包,我们可以这样做。 + + # yum list installed + 或 + # dnf list installed + + Last metadata expiration check performed 0:34:30 ago on Mon Jun 22 16:50:00 2015. + Installed Packages + GeoIP.x86_64 1.6.5-1.fc22 @System + GeoIP-GeoLite-data.noarch 2015.05-1.fc22 @System + NetworkManager.x86_64 1:1.0.2-1.fc22 @System + NetworkManager-libnm.x86_64 1:1.0.2-1.fc22 @System + aajohan-comfortaa-fonts.noarch 2.004-4.fc22 @System + .... + +而要同时满足两个要求的时候,我们可以这样做。 + + # yum list + 或 + # dnf list + + Last metadata expiration check performed 0:32:56 ago on Mon Jun 22 16:50:00 2015. + Installed Packages + GeoIP.x86_64 1.6.5-1.fc22 @System + GeoIP-GeoLite-data.noarch 2015.05-1.fc22 @System + NetworkManager.x86_64 1:1.0.2-1.fc22 @System + NetworkManager-libnm.x86_64 1:1.0.2-1.fc22 @System + aajohan-comfortaa-fonts.noarch 2.004-4.fc22 @System + acl.x86_64 2.2.52-7.fc22 @System + .... + +### 13. 你会怎么在一个系统上面使用 YUM 或 DNF 分别安装和升级一个包与一组包? ### + +**回答**:安装一个包(假设是 nano),我们可以这样做, + + # yum install nano + +而安装一组包(假设是 Haskell),我们可以这样做, + + # yum groupinstall 'haskell' + +升级一个包(还是 nano),我们可以这样做, + + # yum update nano + +而为了升级一组包(还是 haskell),我们可以这样做, + + # yum groupupdate 'haskell' + +### 14. 你会如何同步一个系统上面的所有安装软件到稳定发行版? ### + +**回答**:我们可以一个系统上(假设是 CentOS 或者 Fedora)的所有包到稳定发行版,如下, + + # yum distro-sync [在 CentOS/ RHEL] + 或 + # dnf distro-sync [在 Fedora 20之后版本] + +似乎来面试之前你做了相当不多的功课,很好!在进一步交谈前,我还想问一两个问题。 + +### 15. 你对 YUM 本地仓库熟悉吗?你尝试过建立一个本地 YUM 仓库吗?让我们简单看看你会怎么建立一个本地 YUM 仓库。 ### + +**回答**:首先,感谢你的夸奖。回到问题,我必须承认我对本地 YUM 仓库十分熟悉,并且在我的本地主机上也部署过,作为测试用。 + +1、 为了建立本地 YUM 仓库,我们需要安装下面三个包: + + # yum install deltarpm python-deltarpm createrepo + +2、 新建一个目录(假设 /home/$USER/rpm),然后复制 RedHat/CentOS DVD 上的 RPM 包到这个文件夹下 + + # mkdir /home/$USER/rpm + # cp /path/to/rpm/on/DVD/*.rpm /home/$USER/rpm + +3、 新建基本的库头文件如下。 + + # createrepo -v /home/$USER/rpm + +4、 在路径 /etc/yum.repo.d 下创建一个 .repo 文件(如 abc.repo): + + cd /etc/yum.repos.d && cat << EOF abc.repo + [local-installation]name=yum-local + baseurl=file:///home/$USER/rpm + enabled=1 + gpgcheck=0 + EOF + +**重要**:用你的用户名替换掉 $USER。 + +以上就是创建一个本地 YUM 仓库所要做的全部工作。我们现在可以从这里安装软件了,相对快一些,安全一些,并且最重要的是不需要 Internet 连接。 + +好了!面试过程很愉快。我已经问完了。我会将你推荐给 HR。你是一个年轻且十分聪明的候选者,我们很愿意你加入进来。如果你有任何问题,你可以问我。 + +**我**:谢谢,这确实是一次愉快的面试,我感到今天非常幸运,可以搞定这次面试... + +显然,不会在这里结束。我问了很多问题,比如他们正在做的项目。我会担任什么角色,负责什么,,,balabalabala + +小伙伴们,这之后的 3 天会经过 HR 轮,到时候所有问题到时候也会被写成文档。希望我当时表现不错。感谢你们所有的祝福。 + +谢谢伙伴们和 Tecmint,花时间来编辑我的面试经历。我相信 Tecmint 好伙伴们做了很大的努力,必要要赞一个。当我们与他人分享我们的经历的时候,其他人从我们这里知道了更多,而我们自己则发现了自己的不足。 + +这增加了我们的信心。如果你最近也有任何类似的面试经历,别自己蔵着。分享出来!让我们所有人都知道。你可以使用如下的表单来与我们分享你的经历。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/linux-rpm-package-management-interview-questions/ + +作者:[Avishek Kumar][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[2]:https://linux.cn/article-5718-1.html diff --git a/translated/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md b/translated/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md deleted file mode 100644 index f095a31c65..0000000000 --- a/translated/tech/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md +++ /dev/null @@ -1,348 +0,0 @@ -Shilpa Nair 分享了她面试 RedHat Linux 包管理方面的经验 -======================================================================== -**Shilpa Nair 刚于2015年毕业。她之后去了一家位于 Noida,Delhi 的国家新闻电视台,应聘实习生的岗位。在她去年毕业季的时候,常逛 Tecmint 寻求作业上的帮助。从那时开始,她就常去 Tecmint。** - -![Linux Interview Questions on RPM](http://www.tecmint.com/wp-content/uploads/2015/06/Linux-Interview-Questions-on-RPM.jpeg) - -有关 RPM 方面的 Linux 面试题 - -所有的问题和回答都是 Shilpa Nair 根据回忆重写的。 - -> “大家好!我是来自 Delhi 的Shilpa Nair。我不久前才顺利毕业,正寻找一个实习的机会。在大学早期的时候,我就对 UNIX 十分喜爱,所以我也希望这个机会能适合我,满足我的兴趣。我被提问了很多问题,大部分都是关于 RedHat 包管理的基础问题。” - -下面就是我被问到的问题,和对应的回答。我仅贴出了与 RedHat GNU/Linux 包管理相关的,也是主要被提问的。 - -### 1,里如何查找一个包安装与否?假设你需要确认 ‘nano’ 有没有安装,你怎么做? ### - -> **回答**:为了确认 nano 软件包有没有安装,我们可以使用 rpm 命令,配合 -q 和 -a 选项来查询所有已安装的包 -> -> # rpm -qa nano -> OR -> # rpm -qa | grep -i nano -> -> nano-2.3.1-10.el7.x86_64 -> -> 同时包的名字必须是完成的,不完整的包名返回提示,不打印任何东西,就是说这包(包名字不全)未安装。下面的例子会更好理解些: -> -> 我们通常使用 vim 替代 vi 命令。当时如果我们查找安装包 vi/vim 的时候,我们就会看到标准输出上没有任何结果。 -> -> # vi -> # vim -> -> 尽管如此,我们仍然可以通过使用 vi/vim 命令来清楚地知道包有没有安装。Here is ... name(这句不知道)。如果我们不确切知道完整的文件名,我们可以使用通配符: -> -> # rpm -qa vim* -> -> vim-minimal-7.4.160-1.el7.x86_64 -> -> 通过这种方式,我们可以获得任何软件包的信息,安装与否。 - -### 2. 你如何使用 rpm 命令安装 XYZ 软件包? ### - -> **回答**:我们可以使用 rpm 命令安装任何的软件包(*.rpm),像下面这样,选项 -i(install),-v(冗余或者显示额外的信息)和 -h(打印#号显示进度,在安装过程中)。 -> -> # rpm -ivh peazip-1.11-1.el6.rf.x86_64.rpm -> -> Preparing... ################################# [100%] -> Updating / installing... -> 1:peazip-1.11-1.el6.rf ################################# [100%] -> -> 如果要升级一个早期版本的包,应加上 -U 选项,选项 -v 和 -h 可以确保我们得到用 # 号表示的冗余输出,这增加了可读性。 - -### 3. 你已经安装了一个软件包(假设是 httpd),现在你想看看软件包创建并安装的所有文件和目录,你会怎么做? ### - -> **回答**:使用选项 -l(列出所有文件)和 -q(查询)列出 httpd 软件包安装的所有文件(Linux哲学:所有的都是文件,包括目录)。 -> -> # rpm -ql httpd -> -> /etc/httpd -> /etc/httpd/conf -> /etc/httpd/conf.d -> ... - -### 4. 假如你要移除一个软件包,叫 postfix。你会怎么做? ### - -> **回答**:首先我们需要知道什么包安装了 postfix。查找安装 postfix 的包名后,使用 -e(擦除/卸载软件包)和 -v(冗余输出)两个选项来实现。 -> -> # rpm -qa postfix* -> -> postfix-2.10.1-6.el7.x86_64 -> -> 然后移除 postfix,如下: -> -> # rpm -ev postfix-2.10.1-6.el7.x86_64 -> -> Preparing packages... -> postfix-2:3.0.1-2.fc22.x86_64 - -### 5. 获得一个已安装包的具体信息,如版本,发行号,安装日期,大小,总结和一个间短的描述。 ### - -> **回答**:我们通过使用 rpm 的选项 -qi,后面接包名,可以获得关于一个已安装包的具体信息。 -> -> 举个例子,为了获得 openssh 包的具体信息,我需要做的就是: -> -> # rpm -qi openssh -> -> [root@tecmint tecmint]# rpm -qi openssh -> Name : openssh -> Version : 6.8p1 -> Release : 5.fc22 -> Architecture: x86_64 -> Install Date: Thursday 28 May 2015 12:34:50 PM IST -> Group : Applications/Internet -> Size : 1542057 -> License : BSD -> .... - -### 6. 假如你不确定一个指定包的配置文件在哪,比如 httpd。你如何找到所有 httpd 提供的配置文件列表和位置。 ### - -> **回答**: 我们需要用选项 -c 接包名,这会列出所有配置文件的名字和他们的位置。 -> -> # rpm -qc httpd -> -> /etc/httpd/conf.d/autoindex.conf -> /etc/httpd/conf.d/userdir.conf -> /etc/httpd/conf.d/welcome.conf -> /etc/httpd/conf.modules.d/00-base.conf -> /etc/httpd/conf/httpd.conf -> /etc/sysconfig/httpd -> -> 相似地,我们可以列出所有相关的文档文件,如下: -> -> # rpm -qd httpd -> -> /usr/share/doc/httpd/ABOUT_APACHE -> /usr/share/doc/httpd/CHANGES -> /usr/share/doc/httpd/LICENSE -> ... -> -> 我们也可以列出所有相关的证书文件,如下: -> -> # rpm -qL openssh -> -> /usr/share/licenses/openssh/LICENCE -> -> 忘了说明上面的选项 -d 和 -L 分别表示 “文档” 和 “证书”,抱歉。 - -### 7. 你进入了一个配置文件,位于‘/usr/share/alsa/cards/AACI.conf’,现在你不确定该文件属于哪个包。你如何查找出包的名字? ### - -> **回答**:当一个包被安装后,相关的信息就存储在了数据库里。所以使用选项 -qf(-f 查询包拥有的文件)很容易追踪谁提供了上述的包。 -> -> # rpm -qf /usr/share/alsa/cards/AACI.conf -> alsa-lib-1.0.28-2.el7.x86_64 -> -> 类似地,我们可以查找(谁提供的)关于任何子包,文档和证书文件的信息。 - -### 8. 你如何使用 rpm 查找最近安装的软件列表? ### - -> **回答**:如刚刚说的,每一样被安装的文件都记录在了数据库里。所以这并不难,通过查询 rpm 的数据库,找到最近安装软件的列表。 -> -> 我们通过运行下面的命令,使用选项 -last(打印出最近安装的软件)达到目的。 -> -> # rpm -qa --last -> -> 上面的命令会打印出所有安装的软件,最近一次安装的软件在列表的顶部。 -> -> 如果我们关心的是找出特定的包,我们可以使用 grep 命令从列表中匹配包(假设是 sqlite ),简单如下: -> -> # rpm -qa --last | grep -i sqlite -> -> sqlite-3.8.10.2-1.fc22.x86_64 Thursday 18 June 2015 05:05:43 PM IST -> -> 我们也可以获得10个最近安装的软件列表,简单如下: -> -> # rpm -qa --last | head -> -> 我们可以重定义一下,输出想要的结果,简单如下: -> -> # rpm -qa --last | head -n 2 -> -> 上面的命令中,-n 代表数目,后面接一个常数值。该命令是打印2个最近安装的软件的列表。 - -### 9. 安装一个包之前,你如果要检查其依赖。你会怎么做? ### - -> **回答**:检查一个 rpm 包(XYZ.rpm)的依赖,我们可以使用选项 -q(查询包),-p(指定包名)和 -R(查询/列出该包依赖的包,嗯,就是依赖)。 -> -> # rpm -qpR gedit-3.16.1-1.fc22.i686.rpm -> -> /bin/sh -> /usr/bin/env -> glib2(x86-32) >= 2.40.0 -> gsettings-desktop-schemas -> gtk3(x86-32) >= 3.16 -> gtksourceview3(x86-32) >= 3.16 -> gvfs -> libX11.so.6 -> ... - -### 10. rpm 是不是一个前端的包管理工具呢? ### - -> **回答**:不是!rpm 是一个后端管理工具,适用于基于 Linux 发行版的 RPM (此处指 Redhat Package Management)。 -> -> [YUM][1],全称 Yellowdog Updater Modified,是一个 RPM 的前端工具。YUM 命令自动完成所有工作,包括解决依赖和其他一切事务。 -> -> 最近,[DNF][2](YUM命令升级版)在Fedora 22发行版中取代了 YUM。尽管 YUM 仍然可以在 RHEL 和 CentOS 平台使用,我们也可以安装 dnf,与 YUM 命令共存使用。据说 DNF 较于 YUM 有很多提高。 -> -> 知道更多总是好的,保持自我更新。现在我们移步到前端部分来谈谈。 - -### 11. 你如何列出一个系统上面所有可用的仓库列表。 ### - -> **回答**:简单地使用下面的命令,我们就可以列出一个系统上所有可用的仓库列表。 -> -> # yum repolist -> 或 -> # dnf repolist -> -> Last metadata expiration check performed 0:30:03 ago on Mon Jun 22 16:50:00 2015. -> repo id repo name status -> *fedora Fedora 22 - x86_64 44,762 -> ozonos Repository for Ozon OS 61 -> *updates Fedora 22 - x86_64 - Updates -> -> 上面的命令仅会列出可用的仓库。如果你需要列出所有的仓库,不管可用与否,可以这样做。 -> -> # yum repolist all -> or -> # dnf repolist all -> -> Last metadata expiration check performed 0:29:45 ago on Mon Jun 22 16:50:00 2015. -> repo id repo name status -> *fedora Fedora 22 - x86_64 enabled: 44,762 -> fedora-debuginfo Fedora 22 - x86_64 - Debug disabled -> fedora-source Fedora 22 - Source disabled -> ozonos Repository for Ozon OS enabled: 61 -> *updates Fedora 22 - x86_64 - Updates enabled: 5,018 -> updates-debuginfo Fedora 22 - x86_64 - Updates - Debug - -### 12. 你如何列出一个系统上所有可用并且安装了的包? ### - -> **回答**:列出一个系统上所有可用的包,我们可以这样做: -> -> # yum list available -> 或 -> # dnf list available -> -> ast metadata expiration check performed 0:34:09 ago on Mon Jun 22 16:50:00 2015. -> Available Packages -> 0ad.x86_64 0.0.18-1.fc22 fedora -> 0ad-data.noarch 0.0.18-1.fc22 fedora -> 0install.x86_64 2.6.1-2.fc21 fedora -> 0xFFFF.x86_64 0.3.9-11.fc22 fedora -> 2048-cli.x86_64 0.9-4.git20141214.723738c.fc22 fedora -> 2048-cli-nocurses.x86_64 0.9-4.git20141214.723738c.fc22 fedora -> .... -> -> 而列出一个系统上所有已安装的包,我们可以这样做。 -> -> # yum list installed -> or -> # dnf list installed -> -> Last metadata expiration check performed 0:34:30 ago on Mon Jun 22 16:50:00 2015. -> Installed Packages -> GeoIP.x86_64 1.6.5-1.fc22 @System -> GeoIP-GeoLite-data.noarch 2015.05-1.fc22 @System -> NetworkManager.x86_64 1:1.0.2-1.fc22 @System -> NetworkManager-libnm.x86_64 1:1.0.2-1.fc22 @System -> aajohan-comfortaa-fonts.noarch 2.004-4.fc22 @System -> .... -> -> 而要同时满足两个要求的时候,我们可以这样做。 -> -> # yum list -> 或 -> # dnf list -> -> Last metadata expiration check performed 0:32:56 ago on Mon Jun 22 16:50:00 2015. -> Installed Packages -> GeoIP.x86_64 1.6.5-1.fc22 @System -> GeoIP-GeoLite-data.noarch 2015.05-1.fc22 @System -> NetworkManager.x86_64 1:1.0.2-1.fc22 @System -> NetworkManager-libnm.x86_64 1:1.0.2-1.fc22 @System -> aajohan-comfortaa-fonts.noarch 2.004-4.fc22 @System -> acl.x86_64 2.2.52-7.fc22 @System -> .... - -### 13. 你会怎么分别安装和升级一个包与一组包,在一个系统上面使用 YUM/DNF? ### - -> **回答**:安装一个包(假设是 nano),我们可以这样做, -> -> # yum install nano -> -> 而安装一组包(假设是 Haskell),我们可以这样做, -> -> # yum groupinstall 'haskell' -> -> 升级一个包(还是 nano),我们可以这样做, -> -> # yum update nano -> -> 而为了升级一组包(还是 haskell),我们可以这样做, -> -> # yum groupupdate 'haskell' - -### 14. 你会如何同步一个系统上面的所有安装软件到稳定发行版? ### - -> **回答**:我们可以一个系统上(假设是 CentOS 或者 Fedora)的所有包到稳定发行版,如下, -> -> # yum distro-sync [On CentOS/ RHEL] -> 或 -> # dnf distro-sync [On Fedora 20之后版本] - -似乎来面试之前你做了相当不多的功课,很好!在进一步交谈前,我还想问一两个问题。 - -### 15. 你对 YUM 本地仓库熟悉吗?你尝试过建立一个本地 YUM 仓库吗?让我们简单看看你会怎么建立一个本地 YUM 仓库。 ### - -> **回答**:首先,感谢你的夸奖。回到问题,我必须承认我对本地 YUM 仓库十分熟悉,并且在我的本地主机上也部署过,作为测试用。 -> -> 1. 为了建立本地 YUM 仓库,我们需要安装下面三个包: -> -> # yum install deltarpm python-deltarpm createrepo -> -> 2. 新建一个目录(假设 /home/$USER/rpm),然后复制 RedHat/CentOS DVD 上的 RPM 包到这个文件夹下 -> -> # mkdir /home/$USER/rpm -> # cp /path/to/rpm/on/DVD/*.rpm /home/$USER/rpm -> -> 3. 新建基本的库头文件如下。 -> -> # createrepo -v /home/$USER/rpm -> -> 4. 在路径 /etc/yum.repo.d 下创建一个 .repo 文件(如 abc.repo): -> -> cd /etc/yum.repos.d && cat << EOF > abc.repo -> [local-installation]name=yum-local -> baseurl=file:///home/$USER/rpm -> enabled=1 -> gpgcheck=0 -> EOF - -**重要**:用你的用户名替换掉 $USER。 - -以上就是创建一个本地 YUM 仓库所要做的全部工作。我们现在可以从这里安装软件了,相对快一些,安全一些,并且最重要的是不需要 Internet 连接。 - -好了!面试过程很愉快。我已经问完了。我会将你推荐给 HR。你是一个年轻且十分聪明的候选者,我们很愿意你加入进来。如果你有任何问题,你可以问我。 - -**我**:谢谢,这确实是一次愉快的面试,我感到非常幸运今天,然后这次面试就毁了。。。 - -显然,不会在这里结束。我问了很多问题,比如他们正在做的项目。我会担任什么角色,负责什么,,,balabalabala - -小伙伴们,3天以前 HR 轮的所有问题到时候也会被写成文档。希望我当时表现不错。感谢你们所有的祝福。 - -谢谢伙伴们和 Tecmint,花时间来编辑我的面试经历。我相信 Tecmint 好伙伴们做了很大的努力,必要要赞一个。当我们与他人分享我们的经历的时候,其他人从我们这里知道了更多,而我们自己则发现了自己的不足。 - -这增加了我们的信心。如果你最近也有任何类似的面试经历,别自己蔵着。分享出来!让我们所有人都知道。你可以使用如下的格式来与我们分享你的经历。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/linux-rpm-package-management-interview-questions/ - -作者:[Avishek Kumar][a] -译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ -[2]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ From f267c593a717152240e6eae44b9f92cab154f3cb Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 13 Sep 2015 20:46:49 +0800 Subject: [PATCH 2061/2517] PUB:20150827 Xtreme Download Manager Updated With Fresh GUI @mr-ping --- ...me Download Manager Updated With Fresh GUI.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/share => published}/20150827 Xtreme Download Manager Updated With Fresh GUI.md (87%) diff --git a/translated/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md b/published/20150827 Xtreme Download Manager Updated With Fresh GUI.md similarity index 87% rename from translated/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md rename to published/20150827 Xtreme Download Manager Updated With Fresh GUI.md index d9ab3ab9f3..bd55b6fb66 100644 --- a/translated/share/20150827 Xtreme Download Manager Updated With Fresh GUI.md +++ b/published/20150827 Xtreme Download Manager Updated With Fresh GUI.md @@ -1,4 +1,4 @@ -Xtreme下载管理器升级全新用户界面 +Xtreme 下载管理器升级带来全新用户界面 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme-Download-Manager-Linux.jpg) @@ -6,11 +6,11 @@ Xtreme下载管理器升级全新用户界面 Xtreme 下载管理器,也被称作 XDM 或 XDMAN,它是一个跨平台的下载管理器,可以用于 Linux、Windows 和 Mac OS X 系统之上。同时它兼容于主流的浏览器,如 Chrome, Firefox, Safari 等,因此当你从浏览器下载东西的时候可以直接使用 XDM 下载。 -当你的网络连接超慢并且需要管理下载文件的时候,像 XDM 这种软件可以帮到你大忙。例如说你在一个慢的要死的网络速度下下载一个超大文件, XDM 可以帮助你暂停并且继续下载。 +当你的网络连接超慢并且需要管理下载文件的时候,像 XDM 这种软件可以帮到你大忙。例如说你在一个慢的要死的网络速度下下载一个超大文件,或者你想要暂停和恢复下载的话, XDM 可以帮助你。 XDM 的主要功能: -- 暂停和继续下载 +- 暂停和恢复下载 - [从 YouTube 下载视频][3],其他视频网站同样适用 - 强制聚合 - 下载加速 @@ -23,11 +23,11 @@ XDM 的主要功能: ![Old XDM](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme-Download-Manager-700x400_c.jpg) -老版本XDM +*老版本XDM* ![New XDM](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Xtreme_Download_Manager.png) -新版本XDM +*新版本XDM* ### 在基于 Ubuntu 的 Linux 发行版上安装 Xtreme下载管理器 ### @@ -48,15 +48,15 @@ XDM 的主要功能: 对于其他Linux发行版,可以通过以下连接下载: -- [Download Xtreme Download Manager][4] +- [下载 Xtreme 下载管理器][4] -------------------------------------------------------------------------------- via: http://itsfoss.com/xtreme-download-manager-install/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/mr-ping) -校对:[校对者ID](https://github.com/校对者ID) +译者:[mr-ping](https://github.com/mr-ping) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 86144a1ec0dc8b14d55eb215ae93365ccec75e63 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 13 Sep 2015 20:54:08 +0800 Subject: [PATCH 2062/2517] PUB:RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7 @xiqingongzi --- ...A Series--Part 03--How to Manage Users and Groups in RHEL 7.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech/RHCSA => published}/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md (100%) diff --git a/translated/tech/RHCSA/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md b/published/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md similarity index 100% rename from translated/tech/RHCSA/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md rename to published/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md From 6c394ac2102bb1fb16239aa84133151e97e36cb9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 13 Sep 2015 21:20:46 +0800 Subject: [PATCH 2063/2517] PUB:20150816 How to migrate MySQL to MariaDB on Linux @strugglingyouth --- ...ow to migrate MySQL to MariaDB on Linux.md | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150816 How to migrate MySQL to MariaDB on Linux.md (70%) diff --git a/translated/tech/20150816 How to migrate MySQL to MariaDB on Linux.md b/published/20150816 How to migrate MySQL to MariaDB on Linux.md similarity index 70% rename from translated/tech/20150816 How to migrate MySQL to MariaDB on Linux.md rename to published/20150816 How to migrate MySQL to MariaDB on Linux.md index 70856ec874..40818ae8a5 100644 --- a/translated/tech/20150816 How to migrate MySQL to MariaDB on Linux.md +++ b/published/20150816 How to migrate MySQL to MariaDB on Linux.md @@ -1,10 +1,9 @@ - 在 Linux 中怎样将 MySQL 迁移到 MariaDB 上 ================================================================================ -自从甲骨文收购 MySQL 后,很多 MySQL 的开发者和用户放弃了 MySQL 由于甲骨文对 MySQL 的开发和维护更多倾向于闭门的立场。在社区驱动下,促使更多人移到 MySQL 的另一个分支中,叫 MariaDB。在原有 MySQL 开发人员的带领下,MariaDB 的开发遵循开源的理念,并确保 [它的二进制格式与 MySQL 兼容][1]。Linux 发行版如 Red Hat 家族(Fedora,CentOS,RHEL),Ubuntu 和Mint,openSUSE 和 Debian 已经开始使用,并支持 MariaDB 作为 MySQL 的简易替换品。 +自从甲骨文收购 MySQL 后,由于甲骨文对 MySQL 的开发和维护更多倾向于闭门的立场,很多 MySQL 的开发者和用户放弃了 MySQL。在社区驱动下,促使更多人移到 MySQL 的另一个叫 MariaDB 的分支。在原有 MySQL 开发人员的带领下,MariaDB 的开发遵循开源的理念,并确保[它的二进制格式与 MySQL 兼容][1]。Linux 发行版如 Red Hat 家族(Fedora,CentOS,RHEL),Ubuntu 和 Mint,openSUSE 和 Debian 已经开始使用,并支持 MariaDB 作为 MySQL 的直接替换品。 -如果想要将 MySQL 中的数据库迁移到 MariaDB 中,这篇文章就是你所期待的。幸运的是,由于他们的二进制兼容性,MySQL-to-MariaDB 迁移过程是非常简单的。如果你按照下面的步骤,将 MySQL 迁移到 MariaDB 会是无痛的。 +如果你想要将 MySQL 中的数据库迁移到 MariaDB 中,这篇文章就是你所期待的。幸运的是,由于他们的二进制兼容性,MySQL-to-MariaDB 迁移过程是非常简单的。如果你按照下面的步骤,将 MySQL 迁移到 MariaDB 会是无痛的。 ### 准备 MySQL 数据库和表 ### @@ -69,7 +68,7 @@ ### 安装 MariaDB ### -在 CentOS/RHEL 7和Ubuntu(14.04或更高版本)上,最新的 MariaDB 包含在其官方源。在 Fedora 上,自19版本后 MariaDB 已经替代了 MySQL。如果你使用的是旧版本或 LTS 类型如 Ubuntu 13.10 或更早的,你仍然可以通过添加其官方仓库来安装 MariaDB。 +在 CentOS/RHEL 7和Ubuntu(14.04或更高版本)上,最新的 MariaDB 已经包含在其官方源。在 Fedora 上,自19 版本后 MariaDB 已经替代了 MySQL。如果你使用的是旧版本或 LTS 类型如 Ubuntu 13.10 或更早的,你仍然可以通过添加其官方仓库来安装 MariaDB。 [MariaDB 网站][2] 提供了一个在线工具帮助你依据你的 Linux 发行版中来添加 MariaDB 的官方仓库。此工具为 openSUSE, Arch Linux, Mageia, Fedora, CentOS, RedHat, Mint, Ubuntu, 和 Debian 提供了 MariaDB 的官方仓库. @@ -103,7 +102,7 @@ $ sudo yum install MariaDB-server MariaDB-client -安装了所有必要的软件包后,你可能会被要求为 root 用户创建一个新密码。设置 root 的密码后,别忘了恢复备份的 my.cnf 文件。 +安装了所有必要的软件包后,你可能会被要求为 MariaDB 的 root 用户创建一个新密码。设置 root 的密码后,别忘了恢复备份的 my.cnf 文件。 $ sudo cp /opt/my.cnf /etc/mysql/ @@ -111,7 +110,7 @@ $ sudo service mariadb start -或者: +或: $ sudo systemctl start mariadb @@ -141,13 +140,13 @@ ### 结论 ### -如你在本教程中看到的,MySQL-to-MariaDB 的迁移并不难。MariaDB 相比 MySQL 有很多新的功能,你应该知道的。至于配置方面,在我的测试情况下,我只是将我旧的 MySQL 配置文件(my.cnf)作为 MariaDB 的配置文件,导入过程完全没有出现任何问题。对于配置文件,我建议你在迁移之前请仔细阅读MariaDB 配置选项的文件,特别是如果你正在使用 MySQL 的特殊配置。 +如你在本教程中看到的,MySQL-to-MariaDB 的迁移并不难。你应该知道,MariaDB 相比 MySQL 有很多新的功能。至于配置方面,在我的测试情况下,我只是将我旧的 MySQL 配置文件(my.cnf)作为 MariaDB 的配置文件,导入过程完全没有出现任何问题。对于配置文件,我建议你在迁移之前请仔细阅读 MariaDB 配置选项的文件,特别是如果你正在使用 MySQL 的特定配置。 -如果你正在运行更复杂的配置有海量的数据库和表,包括群集或主从复制,看一看 Mozilla IT 和 Operations 团队的 [更详细的指南][3] ,或者 [官方的 MariaDB 文档][4]。 +如果你正在运行有海量的表、包括群集或主从复制的数据库的复杂配置,看一看 Mozilla IT 和 Operations 团队的 [更详细的指南][3] ,或者 [官方的 MariaDB 文档][4]。 ### 故障排除 ### -1.在运行 mysqldump 命令备份数据库时出现以下错误。 +1、 在运行 mysqldump 命令备份数据库时出现以下错误。 $ mysqldump --all-databases --user=root --password --master-data > backupdb.sql @@ -155,7 +154,7 @@ mysqldump: Error: Binlogging on server not active -通过使用 "--master-data",你要在导出的输出中包含二进制日志信息,这对于数据库的复制和恢复是有用的。但是,二进制日志未在 MySQL 服务器启用。要解决这个错误,修改 my.cnf 文件,并在 [mysqld] 部分添加下面的选项。 +通过使用 "--master-data",你可以在导出的输出中包含二进制日志信息,这对于数据库的复制和恢复是有用的。但是,二进制日志未在 MySQL 服务器启用。要解决这个错误,修改 my.cnf 文件,并在 [mysqld] 部分添加下面的选项。 log-bin=mysql-bin @@ -176,8 +175,8 @@ via: http://xmodulo.com/migrate-mysql-to-mariadb-linux.html 作者:[Kristophorus Hadiono][a] -译者:[strugglingyouth](https://github.com/译者ID) -校对:[strugglingyouth](https://github.com/校对者ID) +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 64f540fec2d59111642016a8ad294dee5644eb4b Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 13 Sep 2015 22:47:06 +0800 Subject: [PATCH 2064/2517] PUB:20141223 Defending the Free Linux World MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @H-mudcup 这篇好难啊,尤其最后一段有句就是不明白。。 --- ...20141223 Defending the Free Linux World.md | 125 +++++++++++++++++ ...20141223 Defending the Free Linux World.md | 127 ------------------ 2 files changed, 125 insertions(+), 127 deletions(-) create mode 100644 published/20141223 Defending the Free Linux World.md delete mode 100644 translated/talk/20141223 Defending the Free Linux World.md diff --git a/published/20141223 Defending the Free Linux World.md b/published/20141223 Defending the Free Linux World.md new file mode 100644 index 0000000000..b554bf7f7e --- /dev/null +++ b/published/20141223 Defending the Free Linux World.md @@ -0,0 +1,125 @@ +守卫自由的 Linux 世界 +================================================================================ +![](http://www.linuxinsider.com/ai/908455/open-invention-network.jpg) + +**合作是开源的一部分。OIN 的 CEO Keith Bergelt 解释说,开放创新网络(Open Invention Network)模式允许众多企业和公司决定它们该在哪较量,在哪合作。随着开源的演变,“我们需要为合作创造渠道,否则我们将会有几百个团体把数十亿美元花费到同样的技术上。”** + +[开放创新网络(Open Invention Network)][1],即 OIN,正在全球范围内开展让 Linux 远离专利诉讼的伤害的活动。它的努力得到了一千多个公司的热烈回应,它们的加入让这股力量成为了历史上最大的反专利管理组织。 + +开放创新网络以白帽子组织的身份创建于2005年,目的是保护 Linux 免受来自许可证方面的困扰。包括 Google、 IBM、 NEC、 Novell、 Philips、 [Red Hat][2] 和 Sony 这些成员的董事会给予了它可观的经济支持。世界范围内的多个组织通过签署自由 OIN 协议加入了这个社区。 + +创立开放创新网络的组织成员把它当作利用知识产权保护 Linux 的大胆尝试。它的商业模式非常的难以理解。它要求它的成员采用免版权许可证,并永远放弃由于 Linux 相关知识产权起诉其他成员的机会。 + +然而,从 Linux 收购风波——想想服务器和云平台——那时起,保护 Linux 知识产权的策略就变得越加的迫切。 + +在过去的几年里,Linux 的版图曾经历了一场变革。OIN 不必再向人们解释这个组织的定义,也不必再解释为什么 Linux 需要保护。据 OIN 的 CEO Keith Bergelt 说,现在 Linux 的重要性得到了全世界的关注。 + +“我们已经见到了一场人们了解到 OIN 如何让合作受益的文化变革,”他对 LinuxInsider 说。 + +### 如何运作 ### + +开放创新网络使用专利权的方式创建了一个协作环境。这种方法有助于确保创新的延续。这已经使很多软件厂商、顾客、新型市场和投资者受益。 + +开放创新网络的专利证可以让任何公司、公共机构或个人免版权使用。这些权利的获得建立在签署者同意不会专为了维护专利而攻击 Linux 系统的基础上。 + +OIN 确保 Linux 的源代码保持开放的状态。这让编程人员、设备厂商、独立软件开发者和公共机构在投资和使用 Linux 时不用过多的担心知识产权的问题。这让对 Linux 进行重新打包、嵌入和使用的公司省了不少钱。 + +“随着版权许可证越来越广泛的使用,对 OIN 许可证的需求也变得更加的迫切。现在,人们正在寻找更加简单或更实用的解决方法”,Bergelt 说。 + +OIN 法律防御援助对成员是免费的。成员必须承诺不对 OIN 名单上的软件发起专利诉讼。为了保护他们的软件,他们也同意提供他们自己的专利。最终,这些保证将让几十万的交叉许可通过该网络相互连接起来,Bergelt 如此解释道。 + +### 填补法律漏洞 ### + +“OIN 正在做的事情是非常必要的。它提供另一层 IP (知识产权)保护,”[休斯顿法律中心大学][3]的副教授 Greg R. Vetter 这样说道。 + +他回答 LinuxInsider 说,第二版 GPL 许可证被某些人认为提供了隐含的专利许可,但是律师们更喜欢明确的许可。 + +OIN 所提供的许可填补了这个空白。它还明确的覆盖了 Linux 内核。据 Vetter 说,明确的专利许可并不是 GPLv2 中的必要部分,但是这个部分被加入到了 GPLv3 中。(LCTT 译注:Linux 内核采用的是 GPLv2 的许可) + +拿一个在 GPLv3 中写了10000行代码的代码编写者来说。随着时间推移,其他的代码编写者会贡献更多行的代码,也加入到了知识产权中。GPLv3 中的软件专利许可条款将基于所有参与的贡献者的专利,保护全部代码的使用,Vetter 如此说道。 + +### 并不完全一样 ### + +专利权和许可证在法律结构上层层叠叠互相覆盖。弄清两者对开源软件的作用就像是穿越雷区。 + +Vetter 说“通常,许可证是授予建立在专利和版权法律上的额外权利的法律结构。许可证被认为是给予了人们做一些的可能会侵犯到其他人的知识产权权利的事的许可。” + +Vetter 指出,很多自由开源许可证(例如 Mozilla 公共许可、GNU GPLv3 以及 Apache 软件许可)融合了某些互惠专利权的形式。Vetter 指出,像 BSD 和 MIT 这样旧的许可证不会提到专利。 + +一个软件的许可证让其他人可以在某种程度上使用这个编程人员创造的代码。版权对所属权的建立是自动的,只要某个人写或者画了某个原创的东西。然而,版权只覆盖了个别的表达方式和衍生的作品。他并没有涵盖代码的功能性或可用的想法。 + +专利涵盖了功能性。专利权还可以被许可。版权可能无法保护某人如何独立地开发对另一个人的代码的实现,但是专利填补了这个小瑕疵,Vetter 解释道。 + +### 寻找安全通道 ### + +许可证和专利混合的法律性质可能会对开源开发者产生威胁。据 [Chaotic Moon Studios][4] 的创办者之一、 [IEEE][5] 计算机协会成员 William Hurley 说,对于某些人来说,即使是 GPL 也会成为威胁。 + +“在很久以前,开源是个完全不同的世界。被彼此间的尊重和把代码视为艺术而非资产的观点所驱动,那时的程序和代码比现在更加的开放。我相信很多为最好的愿景所做的努力几乎最后总是背负着意外的结果,”Hurley 这样告诉 LinuxInsider。 + +他暗示说,成员人数超越了1000人(的组织)可能会在知识产权保护重要性方面意见不一。这可能会继续搅混开源生态系统这滩浑水。 + +“最终,这些显现出了围绕着知识产权的常见的一些错误概念。拥有几千个开发者并不会减少风险——而是增加。给出了专利许可的开发者越多,它们看起来就越值钱,”Hurley 说。“它们看起来越值钱,有着类似专利的或者其他知识产权的人就越可能试图利用并从中榨取他们自己的经济利益。” + +### 共享与竞争共存 ### + +竞合策略是开源的一部分。OIN 模型让各个公司能够决定他们将在哪竞争以及在哪合作,Bergelt 解释道。 + +“开源演化中的许多改变已经把我们移到了另一个方向上。我们必须为合作创造渠道。否则我们将会有几百个团体把数十亿美元花费到同样的技术上,”他说。 + +手机产业的革新就是个很好的例子。各个公司放出了不同的标准。没有共享,没有合作,Bergelt 解释道。 + +他说:“这让我们在美国接触技术的能力落后了七到十年。我们接触设备的经验远远落后于世界其他地方的人。在我们用不上 CDMA (Code Division Multiple Access 码分多址访问通信技术)时对 GSM (Global System for Mobile Communications 全球移动通信系统) 还沾沾自喜。” + +### 改变格局 ### + +OIN 在去年经历了激增400个新许可的增长。这意味着着开源有了新趋势。 + +Bergelt 说:“市场到达了一个临界点,组织内的人们终于意识到直白地合作和竞争的需要。结果是两件事同时进行。这可能会变得复杂、费力。” + +然而,这个由人们开始考虑合作和竞争的文化革新所驱动的转换过程是可以接受的。他解释说,这也是一个人们怎样拥抱开源的转变——尤其是在 Linux 这个开源社区的领导者项目。 + +还有一个迹象是,最具意义的新项目都没有在 GPLv3 许可下开发。 + +### 二个总比一个好 ### + +“GPL 极为重要,但是事实是有一堆的许可模型正被使用着。在 Eclipse、Apache 和 Berkeley 许可中,专利问题的相对可解决性通常远远低于在 GPLv3 中的。”Bergelt 说。 + +GPLv3 对于解决专利问题是个自然的补充——但是 GPL 自身不足以独自解决围绕专利使用的潜在冲突。所以 OIN 的设计是以能够补充版权许可为目的的,他补充道。 + +然而,层层叠叠的专利和许可也许并没有带来多少好处。到最后,专利在几乎所有的案例中都被用于攻击目的——而不是防御目的,Bergelt 暗示说。 + +“如果你不准备对其他人采取法律行动,那么对于你的知识产权来说专利可能并不是最佳的法律保护方式”,他说。“我们现在生活在一个对软件——开放的和专有的——误会重重的世界里。这些软件还被错误而过时的专利系统所捆绑。我们每天在工业化和被扼杀的创新中挣扎”,他说。 + +### 法院是最后的手段### + +想到 OIN 的出现抑制了诉讼的泛滥就感到十分欣慰,Bergelt 说,或者至少可以说 OIN 的出现扼制了特定的某些威胁。 + +“可以说我们让人们放下他们的武器。同时我们正在创建一种新的文化规范。一旦你入股这个模型中的非侵略专利,所产生的相关影响就是对合作的鼓励”,他说。 + +如果你愿意承诺合作,你的第一反应就会趋向于不急着起诉。相反的,你会想如何让我们允许你使用我们所拥有的东西并让它为你赚钱,而同时我们也能使用你所拥有的东西,Bergelt 解释道。 + +“OIN 是个多面的解决方式。它鼓励签署者创造双赢协议”,他说,“这让起诉成为最逼不得已的行为。那才是它的位置。” + +### 底线### + +Bergelt 坚信,OIN 的运作是为了阻止 Linux 受到专利伤害。在这个需要 Linux 的世界里没有诉讼的地方。 + +唯一临近的是与微软的移动之争,这关系到行业的发展前景(原文: The only thing that comes close are the mobile wars with Microsoft, which focus on elements high in the stack. 不太理解,请指正。)。那些来自法律的挑战可能是为了提高包括使用 Linux 产品的所属权的成本,Bergelt 说。 + +尽管如此“这些并不是有关 Linux 诉讼”,他说。“他们的重点并不在于 Linux 的核心。他们关注的是 Linux 系统里都有些什么。” + +-------------------------------------------------------------------------------- + +via: http://www.linuxinsider.com/story/Defending-the-Free-Linux-World-81512.html + +作者:Jack M. Germain +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://www.openinventionnetwork.com/ +[2]:http://www.redhat.com/ +[3]:http://www.law.uh.edu/ +[4]:http://www.chaoticmoon.com/ +[5]:http://www.ieee.org/ diff --git a/translated/talk/20141223 Defending the Free Linux World.md b/translated/talk/20141223 Defending the Free Linux World.md deleted file mode 100644 index cabc8af041..0000000000 --- a/translated/talk/20141223 Defending the Free Linux World.md +++ /dev/null @@ -1,127 +0,0 @@ -Translating by H-mudcup - -守卫自由的Linux世界 -================================================================================ -![](http://www.linuxinsider.com/ai/908455/open-invention-network.jpg) - -**"合作是开源的一部分。OIN的CEO Keith Bergelt解释说,开放创新网络(Open Invention Network)模式允许众多企业和公司决定它们该在哪较量,在哪合作。随着开源的演变,“我们需要为合作创造渠道。否则我们将会有几百个团体把数十亿美元花费到同样的技术上。”** - -[开放创新网络(Open Invention Network)][1],既OIN,正在全球范围内开展让 Linux 远离专利诉讼的伤害的活动。它的努力得到了一千多个公司的热烈回应,它们的加入让这股力量成为了历史上最大的反专利管理组织。 - -开放创新网络以白帽子组织的身份创建于2005年,目的是保护 Linux 免受来自许可证方面的困扰。包括Google、 IBM、 NEC、 Novell、 Philips、 [Red Hat][2] 和 Sony这些成员的董事会给予了它可观的经济支持。世界范围内的多个组织通过签署自由 OIN 协议加入了这个社区。 - -创立开放创新网络的组织成员把它当作利用知识产权保护 Linux 的大胆尝试。它的商业模式非常的难以理解。它要求它的成员持无专利证并永远放弃由于 Linux 相关知识产权起诉其他成员的机会。 - -然而,从 Linux 收购风波——想想服务器和云平台——那时起,保护 Linux 知识产权的策略就变得越加的迫切。 - -在过去的几年里,Linux 的版图曾经历了一场变革。OIN 不必再向人们解释这个组织的定义,也不必再解释为什么 Linux 需要保护。据 OIN 的 CEO Keith Bergelt 说,现在 Linux 的重要性得到了全世界的关注。 - -“我们已经见到了一场人们了解到OIN如何让合作受益的文化变革,”他对 LinuxInsider 说。 - -### 如何运作 ### - -开放创新网络使用专利权的方式创建了一个协作环境。这种方法有助于确保创新的延续。这已经使很多软件商贩、顾客、新型市场和投资者受益。 - -开放创新网络的专利证可以让任何公司、公共机构或个人免版权使用。这些权利的获得建立在签署者同意不会专为了维护专利而攻击 Linux 系统的基础上。 - -OIN 确保 Linux 的源代码保持开放的状态。这让编程人员、设备出售人员、独立软件开发者和公共机构在投资和使用 Linux 时不用过多的担心知识产权的问题。这让对 Linux 进行重新装配、嵌入和使用的公司省了不少钱。 - -“随着版权许可证越来越广泛的使用,对 OIN 许可证的需求也变得更加的迫切。现在,人们正在寻找更加简单或更功利的解决方法”,Bergelt 说。 - -OIN 法律防御援助对成员是免费的。成员必须承诺不对 OIN 名单带上的软件发起专利诉讼。为了保护该软件,他们也同意提供他们自己的专利。最终,这些保证将导致几十万的交叉许可通过网络连接,Bergelt 如此解释道。 - -### 填补法律漏洞 ### - -“OIN 正在做的事情是非常必要的。它提供额另一层 IP 保护,”[休斯顿法律中心大学][3]的副教授 Greg R. Vetter 这样说道。 - -他回答 LinuxInsider 说,某些人设想的第二版 GPL 许可证会隐含的提供专利许可,但是律师们更喜欢明确的许可。 - -OIN 所提供的许可填补了这个空白。它还明确的覆盖了 Linux 核心。据 Vetter 说,明确的专利许可并不是 GPLv2 中的必要部分,但是这个部分曾在 GPLv3 中。 - -拿一个在 GPLv3 中写了10000行代码的代码编写者来说。随着时间推移,其他的代码编写者会贡献更多行的代码到 IP 中。GPLv3 中的软件专利许可条款将保护所有基于参与其中的贡献者的专利的全部代码的使用,Vetter 如此说道。 - -### 并不完全一样 ### - -专利权和许可证在法律结构上层层叠叠互相覆盖。弄清两者对开源软件的作用就像是穿越雷区。 - -Vetter 说“许可证是授予通常是建立在专利和版权法律上的额外权利的法律结构。许可证被认为是给予了人们做一些的可能会侵犯到其他人的 IP 权利的事的许可。” - -Vetter 指出,很多自由开源许可证(例如 Mozilla 公共许可、GNU、GPLv3 以及 Apache 软件许可)融合了某些互惠专利权的形式。Vetter 指出,像 BSD 和 MIT 这样旧的许可证不会提到专利。 - -一个软件的许可证让其他人可以在某种程度上使用这个编程人员创造的代码。版权对所属权的建立是自动的,只要某个人写或者画了某个原创的东西。然而,版权只覆盖了个别的表达方式和衍生的作品。他并没有涵盖代码的功能性或可用的想法。 - -专利涵盖了功能性。专利权还可以成为许可证。版权可能无法保护某人如何独立的对另一个人的代码的实现的开发,但是专利填补了这个小瑕疵,Vetter 解释道。 - -### 寻找安全通道 ### - -许可证和专利混合的法律性质可能会对开源开发者产生威胁。据 [Chaotic Moon Studios][4] 的创办者之一、 [IEEE][5] 计算机协会成员 William Hurley 说,对于某些人来说即使是 GPL 也会成为威胁。 - -"在很久以前,开源是个完全不同的世界。被彼此间的尊重和把代码视为艺术而非资产的观点所驱动,那时的程序和代码比现在更加的开放。我相信很多为最好的意图所做的努力几乎最后总是背负着意外的结果,"Hurley 这样告诉 LinuxInsider。 - -他暗示说,成员人数超越了1000人可能带来了一个关于知识产权保护重要性的混乱信息。这可能会继续搅混开源生态系统这滩浑水。 - -“最终,这些显现出了围绕着知识产权的常见的一些错误概念。拥有几千个开发者并不会减少风险——而是增加。给专利许可的开发者越多,它们看起来就越值钱,”Hurley 说。“它们看起来越值钱,有着类似专利的或者其他知识产权的人就越可能试图利用并从中榨取他们自己的经济利益。” - -### 共享与竞争共存 ### - -竞合策略是开源的一部分。OIN 模型让各个公司能够决定他们将在哪竞争以及在哪合作,Bergelt 解释道。 - -“开源演化中的许多改变已经把我们移到了另一个方向上。我们必须为合作创造渠道。否则我们将会有几百个团体把数十亿美元花费到同样的技术上,”他说。 - -手机产业的革新就是个很好的例子。各个公司放出了不同的标准。没有共享,没有合作,Bergelt 解释道。 - -他说:“这让我们在美国接触技术的能力落后了七到五年。我们接触设备的经验远远落后于世界其他地方的人。在我们等待 CDMA (Code Division Multiple Access 码分多址访问通信技术)时自满于 GSM (Global System for Mobile Communications 全球移动通信系统)。” - -### 改变格局 ### - -OIN 在去年经历了增长了400个新许可的浪潮。这意味着着开源有了新趋势。 - -Bergelt 说:“市场到达了一个临界点,组织内的人们终于意识到直白地合作和竞争的需要。结果是两件事同时进行。这可能会变得复杂、费力。” - -然而,这个由人们开始考虑合作和竞争的文化革新所驱动的转换过程是可以忍受的。他解释说,这也是人们在以把开源作为开源社区的最重要的工程的方式拥抱开源——尤其是 Linux——的转变。 - -还有一个迹象是,最具意义的新工程都没有在 GPLv3 许可下开发。 - -### 二个总比一个好 ### - -“GPL 极为重要,但是事实是有一堆的许可模型正被使用着。在Eclipse、Apache 和 Berkeley 许可中,专利问题的相对可解决性通常远远低于在 GPLv3 中的。”Bergelt 说。 - -GPLv3 对于解决专利问题是个自然的补充——但是 GPL 自身不足以独自解决围绕专利使用的潜在冲突。所以 OIN 的设计是以能够补充版权许可为目的的,他补充道。 - -然而,层层叠叠的专利和许可也许并没有带来多少好处。到最后,专利在几乎所有的案例中都被用于攻击目的——而不是防御目的,Bergelt 暗示说。 - -“如果你不准备对其他人采取法律行动,那么对于你的知识财产来说专利可能并不是最佳的法律保护方式”,他说。“我们现在生活在一个对软件——开放和专有——误会重重的世界里。这些软件还被错误并过时的专利系统所捆绑。我们每天在工业化的被窒息的创新中挣扎”,他说。 - -### 法院是最后的手段### - -想到 OIN 的出现抑制了诉讼的泛滥就感到十分欣慰,Bergelt 说,或者至少可以说 OIN 的出现扼制了特定的某些威胁。 - -“可以说我们让人们放下它们了的武器。同时我们正在创建一种新的文化规范。一旦你入股这个模型中的非侵略专利,所产生的相关影响就是对合作的鼓励”,他说。 - -如果你愿意承诺合作,你的第一反应就会趋向于不急着起诉。相反的,你会想如何让我们允许你使用我们所拥有的东西并让它为你赚钱,而同时我们也能使用你所拥有的东西,Bergelt 解释道。 - -“OIN 是个多面的解决方式。他鼓励签署者创造双赢协议”,他说。“这让起诉成为最逼不得已的行为。那才是它的位置。” - -### 底线### - -Bergelt 坚信,OIN 的运作是为了阻止 Linux 受到专利伤害。在 Linux 的世界里没有诉讼的地方。 - -唯一临近的是和微软的移动大战,这主要关系到堆栈中高的元素。那些来自法律的挑战可能是为了提高包括使用 Linux 产品的所属权的成本,Bergelt 说。 - -尽管如此“这些并不是有关 Linux 诉讼”,他说。“他们的重点并不在于 Linux 的核心。他们关注的是 Linux 系统里都有些什么。” - --------------------------------------------------------------------------------- - -via: http://www.linuxinsider.com/story/Defending-the-Free-Linux-World-81512.html - -作者:Jack M. Germain -译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://www.openinventionnetwork.com/ -[2]:http://www.redhat.com/ -[3]:http://www.law.uh.edu/ -[4]:http://www.chaoticmoon.com/ -[5]:http://www.ieee.org/ From 8f75ab08e0d47b9940625e190f407f42db039639 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 13 Sep 2015 22:55:10 +0800 Subject: [PATCH 2065/2517] Delete 20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md --- ....9.0 Winamp-like Audio Player in Ubuntu.md | 72 ------------------- 1 file changed, 72 deletions(-) delete mode 100644 sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md 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 deleted file mode 100644 index 76f479cb80..0000000000 --- a/sources/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md +++ /dev/null @@ -1,72 +0,0 @@ -在 Ubuntu 上安装 Qmmp 0.9.0 类似 Winamp 的音频播放器 -================================================================================ -![](http://ubuntuhandbook.org/wp-content/uploads/2015/01/qmmp-icon-simple.png) - -Qmmp,基于 Qt 的音频播放器,与 Winamp 或 xmms 的用户界面类似,现在最新版本是0.9.0。PPA 已经在 Ubuntu 15.10,Ubuntu 15.04,Ubuntu 14.04,Ubuntu 12.04 和其衍生物中已经更新了。 - -Qmmp 0.9.0 是一个较大的版本,有许多新的功能,有许多改进和新的转变。它添加了如下功能: - -- 音频-信道序列转换器; -- 9通道支持均衡器; -- 艺术家专辑标签支持; -- 异步排序; -- 通过文件的修改日期排​​序; -- 按艺术家专辑排序; -- 支持多专栏; -- 有隐藏踪迹长度功能; -- 不用修改 qmmp.pri 来禁用插件(仅在 qmake 中)功能 -- 记住播放列表滚动位置功能; -- 排除提示数据文件功能; -- 更改用户代理功能; -- 改变窗口标题功能; -- 复位字体功能; -- 恢复默认快捷键功能; -- 默认热键为“Rename List”功能; -- 功能禁用弹出的 GME 插件; -- 简单的用户界面(QSUI)有以下变化: - - 增加了多列表的支持; - - 增加了按艺术家专辑排序; - - 增加了按文件的修改日期进行排序; - - 增加了隐藏歌曲长度功能; - - 增加了默认热键为“Rename List”; - - 增加了“Save List”功能到标签菜单; - - 增加了复位字体功能; - - 增加了复位快捷键功能; - - 改进了状态栏; - -它还改进了播放列表的通知,播放列表容器,采样率转换器,cmake 构建脚本,标题格式,在 mpeg 插件中支持 ape 标签,fileops 插件,降低了 cpu 占用率,改变默认的皮肤(炫光)和分离播放列表。 - -![qmmp-090](http://ubuntuhandbook.org/wp-content/uploads/2015/09/qmmp-090.jpg) - -### 在 Ubuntu 中安装 Qmmp 0.9.0 : ### - -新版本已经制做了 PPA,适用于目前所有 Ubuntu 发行版和衍生版。 - -1. 添加 [Qmmp PPA][1]. - -从 Dash 中打开终端并启动应用,通过按 Ctrl+Alt+T 快捷键。当它打开时,运行命令: - - sudo add-apt-repository ppa:forkotov02/ppa - -![qmmp-ppa](http://ubuntuhandbook.org/wp-content/uploads/2015/09/qmmp-ppa.jpg) - -2. 在添加 PPA 后,通过更新软件来升级 Qmmp 播放器。刷新系统缓存,并通过以下命令安装软件: - - sudo apt-get update - - sudo apt-get install qmmp qmmp-plugin-pack - -就是这样。尽情享受吧! - --------------------------------------------------------------------------------- - -via: http://ubuntuhandbook.org/index.php/2015/09/qmmp-0-9-0-in-ubuntu/ - -作者:[Ji m][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者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 From 9cd88e297833087e7bf0a8637cd5a61f8cd106a4 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 13 Sep 2015 22:55:38 +0800 Subject: [PATCH 2066/2517] Delete 20150906 Installing NGINX and NGINX Plus With Ansible.md --- ...lling NGINX and NGINX Plus With Ansible.md | 451 ------------------ 1 file changed, 451 deletions(-) delete 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 deleted file mode 100644 index 3fa66fe6b1..0000000000 --- a/sources/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md +++ /dev/null @@ -1,451 +0,0 @@ -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. - -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/ From 5eec461b75dc3896eb52dd3419d051bb79ecc217 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 13 Sep 2015 22:56:45 +0800 Subject: [PATCH 2067/2517] Create 20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md --- ....9.0 Winamp-like Audio Player in Ubuntu.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 translated/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md diff --git a/translated/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md b/translated/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md new file mode 100644 index 0000000000..ac07a04b85 --- /dev/null +++ b/translated/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md @@ -0,0 +1,72 @@ +在 Ubuntu 上安装 Qmmp 0.9.0 类似 Winamp 的音频播放器 +================================================================================ +![](http://ubuntuhandbook.org/wp-content/uploads/2015/01/qmmp-icon-simple.png) + +Qmmp,基于 Qt 的音频播放器,与 Winamp 或 xmms 的用户界面类似,现在最新版本是0.9.0。PPA 已经在 Ubuntu 15.10,Ubuntu 15.04,Ubuntu 14.04,Ubuntu 12.04 和其衍生物中已经更新了。 + +Qmmp 0.9.0 是一个较大的版本,有许多新的功能,有许多改进和新的转变。它添加了如下功能: + +- 音频-信道序列转换器; +- 9通道支持均衡器; +- 艺术家专辑标签支持; +- 异步排序; +- 通过文件的修改日期排​​序; +- 按艺术家专辑排序; +- 支持多专栏; +- 有隐藏踪迹长度功能; +- 不用修改 qmmp.pri 来禁用插件(仅在 qmake 中)功能 +- 记住播放列表滚动位置功能; +- 排除提示数据文件功能; +- 更改用户代理功能; +- 改变窗口标题功能; +- 复位字体功能; +- 恢复默认快捷键功能; +- 默认热键为“Rename List”功能; +- 功能禁用弹出的 GME 插件; +- 简单的用户界面(QSUI)有以下变化: + - 增加了多列表的支持; + - 增加了按艺术家专辑排序; + - 增加了按文件的修改日期进行排序; + - 增加了隐藏歌曲长度功能; + - 增加了默认热键为“Rename List”; + - 增加了“Save List”功能到标签菜单; + - 增加了复位字体功能; + - 增加了复位快捷键功能; + - 改进了状态栏; + +它还改进了播放列表的通知,播放列表容器,采样率转换器,cmake 构建脚本,标题格式,在 mpeg 插件中支持 ape 标签,fileops 插件,降低了 cpu 占用率,改变默认的皮肤(炫光)和分离播放列表。 + +![qmmp-090](http://ubuntuhandbook.org/wp-content/uploads/2015/09/qmmp-090.jpg) + +### 在 Ubuntu 中安装 Qmmp 0.9.0 : ### + +新版本已经制做了 PPA,适用于目前所有 Ubuntu 发行版和衍生版。 + +1. 添加 [Qmmp PPA][1]. + +从 Dash 中打开终端并启动应用,通过按 Ctrl+Alt+T 快捷键。当它打开时,运行命令: + + sudo add-apt-repository ppa:forkotov02/ppa + +![qmmp-ppa](http://ubuntuhandbook.org/wp-content/uploads/2015/09/qmmp-ppa.jpg) + +2. 在添加 PPA 后,通过更新软件来升级 Qmmp 播放器。刷新系统缓存,并通过以下命令安装软件: + + sudo apt-get update + + sudo apt-get install qmmp qmmp-plugin-pack + +就是这样。尽情享受吧! + +-------------------------------------------------------------------------------- + +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 From 9a914c9184d69099864cc3b5d71b1d75d0f3a459 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sun, 13 Sep 2015 22:57:43 +0800 Subject: [PATCH 2068/2517] Create 20150906 Installing NGINX and NGINX Plus With Ansible.md --- ...lling NGINX and NGINX Plus With Ansible.md | 452 ++++++++++++++++++ 1 file changed, 452 insertions(+) create mode 100644 translated/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md diff --git a/translated/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md b/translated/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md new file mode 100644 index 0000000000..e80f080624 --- /dev/null +++ b/translated/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md @@ -0,0 +1,452 @@ +translation by strugglingyouth +nstalling NGINX and NGINX Plus With Ansible +================================================================================ +在生产环境中,我会更喜欢做与自动化相关的所有事情。如果计算机能完成你的任务,何必需要你亲自动手呢?但是,在不断变化并存在多种技术的环境中,创建和实施自动化是一项艰巨的任务。这就是为什么我喜欢[Ansible][1]。Ansible是免费的,开源的,对于 IT 配置管理,部署和业务流程,使用起来非常方便。 + + +我最喜欢 Ansible 的一个特点是,它是完全无客户端。要管理一个系统,通过 SSH 建立连接,也使用了[Paramiko][2](一个 Python 库)或本地的 [OpenSSH][3]。Ansible 另一个吸引人的地方是它有许多可扩展的模块。这些模块可被系统管理员用于执行一些的相同任务。特别是,它们使用 Ansible 这个强有力的工具可以安装和配置任何程序在多个服务器上,环境或操作系统,只需要一个控制节点。 + +在本教程中,我将带你使用 Ansible 完成安装和部署开源[NGINX][4] 和 [NGINX Plus][5],我们的商业产品。我将在 [CentOS][6] 服务器上演示,但我也写了一个详细的教程关于在 Ubuntu 服务器上部署[在 Ubuntu 上创建一个 Ansible Playbook 来安装 NGINX 和 NGINX Plus][7] 。 + +在本教程中我将使用 Ansible 1.9.2 版本的,并在 CentOS 7.1 服务器上部署运行。 + + $ ansible --version + ansible 1.9.2 + + $ cat /etc/redhat-release + CentOS Linux release 7.1.1503 (Core) + +如果你还没有 Ansible,可以在 [Ansible 网站][8] 查看说明并安装它。 + +如果你使用的是 CentOS,安装 Ansible 十分简单,只要输入以下命令。如果你想使用源码编译安装或使用其他发行版,请参阅上面 Ansible 链接中的说明。 + + + $ sudo yum install -y epel-release && sudo yum install -y ansible + +根据环境的不同,在本教程中的命令有的可能需要 sudo 权限。文件路径,用户名,目标服务器的值取决于你的环境中。 + +### 创建一个 Ansible Playbook 来安装 NGINX (CentOS) ### + +首先,我们为 NGINX 的部署创建一个工作目录,以及子目录和部署配置文件目录。我通常建议在主目录中创建目录,在文章的所有例子中都会有说明。 + + $ cd $HOME + $ mkdir -p ansible-nginx/tasks/ + $ touch ansible-nginx/deploy.yml + $ touch ansible-nginx/tasks/install_nginx.yml + +目录结构看起来是这样的。你可以使用 tree 命令来查看。 + + $ tree $HOME/ansible-nginx/ + /home/kjones/ansible-nginx/ + ├── deploy.yml + └── tasks + └── install_nginx.yml + + 1 directory, 2 files + +如果你没有安装 tree 命令,使用以下命令去安装。 + + $ sudo yum install -y tree + +#### 创建主部署文件 #### + +接下来,我们在文本编辑器中打开 **deploy.yml**。我喜欢在命令行上使用 vim 来编辑配置文件,在整个教程中也都将使用它。 + + $ vim $HOME/ansible-nginx/deploy.yml + +**deploy.yml** 文件是 Ansible 部署的主要文件,[ 在使用 Ansible 部署 NGINX][9] 时,我们将运行 ansible‑playbook 命令执行此文件。在这个文件中,我们指定运行时 Ansible 使用的库以及其它配置文件。 + +在这个例子中,我使用 [include][10] 模块来指定配置文件一步一步来安装NGINX。虽然可以创建一个非常大的 playbook 文件,我建议你将其分割为小文件,以保证其可靠性。示例中的包括复制静态内容,复制配置文件,为更高级的部署使用逻辑配置设定变量。 + +在文件中输入以下行。包括顶部参考注释中的文件名。 + + # ./ansible-nginx/deploy.yml + + - hosts: nginx + tasks: + - include: 'tasks/install_nginx.yml' + + hosts 语句说明 Ansible 部署 **nginx** 组的所有服务器,服务器在 **/etc/ansible/hosts** 中指定。我们将编辑此文件来 [创建 NGINX 服务器的列表][11]。 + +include 语句说明 Ansible 在部署过程中从 **tasks** 目录下读取并执行 **install_nginx.yml** 文件中的内容。该文件包括以下几步:下载,安装,并启动 NGINX。我们将创建此文件在下一节。 + +#### 为 NGINX 创建部署文件 #### + +现在,先保存 **deploy.yml** 文件,并在编辑器中打开 **install_nginx.yml** 。 + + $ vim $HOME/ansible-nginx/tasks/install_nginx.yml + +该文件包含的说明有 - 以 [YAML][12] 格式写入 - 使用 Ansible 安装和配置 NGINX。每个部分(步骤中的过程)起始于一个 name 声明(前面连字符)描述此步骤。下面的 name 字符串:是 Ansible 部署过程中写到标准输出的,可以根据你的意愿来改变。YAML 文件中的下一个部分是在部署过程中将使用的模块。在下面的配置中,[yum][13] 和 [service][14] 模块使将被用。yum 模块用于在 CentOS 上安装软件包。service 模块用于管理 UNIX 的服务。在这部分的最后一行或几行指定了几个模块的参数(在本例中,这些行以 name 和 state 开始)。 + +在文件中输入以下行。对于 **deploy.yml**,在我们文件的第一行是关于文件名的注释。第一部分说明 Ansible 从 NGINX 仓库安装 **.rpm** 文件在CentOS 7 上。这说明软件包管理器直接从 NGINX 仓库安装最新最稳定的版本。需要在你的 CentOS 版本上修改路径。可使用包的列表可以在 [开源 NGINX 网站][15] 上找到。接下来的两节说明 Ansible 使用 yum 模块安装最新的 NGINX 版本,然后使用 service 模块启动 NGINX。 + +**注意:** 在第一部分中,CentOS 包中的路径名是连着的两行。在一行上输入其完整路径。 + + # ./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 + +#### 创建 NGINX 服务器列表 #### + +现在,我们有 Ansible 部署所有配置的文件,我们需要告诉 Ansible 部署哪个服务器。我们需要在 Ansible 中指定 **hosts** 文件。先备份现有的文件,并新建一个新文件来部署。 + + $ sudo mv /etc/ansible/hosts /etc/ansible/hosts.backup + $ sudo vim /etc/ansible/hosts + +在文件中输入以下行来创建一个名为 **nginx** 的组并列出安装 NGINX 的服务器。你可以指定服务器通过主机名,IP 地址,或者在一个区域,例如 **server[1-3].domain.com**。在这里,我指定一台服务器通过 IP 地址。 + + # /etc/ansible/hosts + + [nginx] + 172.16.239.140 + +#### 设置安全性 #### + +在部署之前,我们需要确保 Ansible 已通过 SSH 授权能访问我们的目标服务器。 + +首选并且最安全的方法是添加 Ansible 所要部署服务器的 RSA SSH 密钥到目标服务器的 **authorized_keys** 文件中,这给 Ansible 在目标服务器上的 SSH 权限不受限制。要了解更多关于此配置,请参阅 [安全的 OpenSSH][16] 在 wiki.centos.org。这样,你就可以自动部署而无需用户交互。 + +另外,你也可以在部署过程中需要输入密码。我强烈建议你只在测试过程中使用这种方法,因为它是不安全的,没有办法判断目标主机的身份。如果你想这样做,将每个目标主机 **/etc/ssh/ssh_config** 文件中 StrictHostKeyChecking 的默认值 yes 改为 no。然后在 ansible-playbook 命令中添加 --ask-pass参数来表示 Ansible 会提示输入 SSH 密码。 + +在这里,我将举例说明如何编辑 **ssh_config** 文件来禁用在目标服务器上严格的主机密钥检查。我们手动 SSH 到我们将部署 NGINX 的服务器并将StrictHostKeyChecking 的值更改为 no。 + + $ ssh kjones@172.16.239.140 + kjones@172.16.239.140's password:*********** + + [kjones@nginx ]$ sudo vim /etc/ssh/ssh_config + +当你更改后,保存 **ssh_config**,并通过 SSH 连接到你的 Ansible 服务器。保存后的设置应该如下图所示。 + + # /etc/ssh/ssh_config + + StrictHostKeyChecking no + +#### 运行 Ansible 部署 NGINX #### + +如果你一直照本教程的步骤来做,你可以运行下面的命令来使用 Ansible 部署NGINX。(同样,如果你设置了 RSA SSH 密钥认证,那么--ask-pass 参数是不需要的。)在 Ansible 服务器运行命令,并使用我们上面创建的配置文件。 + + $ sudo ansible-playbook --ask-pass $HOME/ansible-nginx/deploy.yml + +Ansible 提示输入 SSH 密码,输出如下。recap 中显示 failed=0 这条信息,意味着部署成功了。 + + $ 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 + +如果你没有得到一个成功的 play recap,你可以尝试用 -vvvv 参数(带连接调试的详细信息)再次运行 ansible-playbook 命令来解决部署过程的问题。 + +当部署成功(因为我们不是第一次部署)后,你可以验证 NGINX 在远程服务器上运行基本的 [cURL][17] 命令。在这里,它会返回 200 OK。Yes!我们使用Ansible 成功安装了 NGINX。 + + $ curl -Is 172.16.239.140 | grep HTTP + HTTP/1.1 200 OK + +### 创建 Ansible Playbook 来安装 NGINX Plus (CentOS) ### + +现在,我已经展示了如何安装 NGINX 的开源版本,我将带你完成安装 NGINX Plus。这需要更改一些额外的部署配置,并展示了一些 Ansible 的其他功能。 + +#### 复制 NGINX Plus 上的证书和密钥到 Ansible 服务器 #### + +使用 Ansible 安装和配置 NGINX Plus 时,首先我们需要将 [NGINX Plus Customer Portal][18] 的密钥和证书复制到部署 Ansible 服务器上的标准位置。 + +购买了 NGINX Plus 或正在试用的客户也可以访问 NGINX Plus Customer Portal。如果你有兴趣测试 NGINX Plus,你可以申请免费试用30天[点击这里][19]。在你注册后不久你将收到一个试用证书和密钥的链接。 + +在 Mac 或 Linux 主机上,我在这里演示使用 [scp][20] 工具。在 Microsoft Windows 主机,可以使用 [WinSCP][21]。在本教程中,先下载文件到我的 Mac 笔记本电脑上,然后使用 scp 将其复制到 Ansible 服务器。密钥和证书的位置都在我的家目录下。 + + $ cd /path/to/nginx-repo-files/ + $ scp nginx-repo.* user@destination-server:. + +接下来,我们通过 SSH 连接到 Ansible 服务器,确保 NGINX Plus 的 SSL 目录存在,移动文件到这儿。 + + $ ssh user@destination-server + $ sudo mkdir -p /etc/ssl/nginx/ + $ sudo mv nginx-repo.* /etc/ssl/nginx/ + +验证你的 **/etc/ssl/nginx** 目录包含证书(**.crt**)和密钥(**.key**)文件。你可以使用 tree 命令检查。 + + $ tree /etc/ssl/nginx + /etc/ssl/nginx + ├── nginx-repo.crt + └── nginx-repo.key + + 0 directories, 2 files + +如果你没有安装 tree,可以使用下面的命令去安装。 + + $ sudo yum install -y tree + +#### 创建 Ansible 目录结构 #### + +以下执行的步骤将和开源 NGINX 的非常相似在[创建安装 NGINX 的 Ansible Playbook 中(CentOS)][22]。首先,我们建一个工作目录为部署 NGINX Plus 使用。我喜欢将它创建为我主目录的子目录。 + + $ cd $HOME + $ mkdir -p ansible-nginx-plus/tasks/ + $ touch ansible-nginx-plus/deploy.yml + $ touch ansible-nginx-plus/tasks/install_nginx_plus.yml + +目录结构看起来像这样。 + + $ tree $HOME/ansible-nginx-plus/ + /home/kjones/ansible-nginx-plus/ + ├── deploy.yml + └── tasks + └── install_nginx_plus.yml + + 1 directory, 2 files + +#### 创建主部署文件 #### + +接下来,我们使用 vim 为开源的 NGINX 创建 **deploy.yml** 文件。 + + $ vim ansible-nginx-plus/deploy.yml + +和开源 NGINX 的部署唯一的区别是,我们将包含文件的名称修改为**install_nginx_plus.yml**。该文件告诉 Ansible 在 **nginx** 组中的所有服务器(**/etc/ansible/hosts** 中定义的)上部署 NGINX Plus ,然后在部署过程中从 **tasks** 目录读取并执行 **install_nginx_plus.yml** 的内容。 + + # ./ansible-nginx-plus/deploy.yml + + - hosts: nginx + tasks: + - include: 'tasks/install_nginx_plus.yml' + +如果你还没有这样做的话,你需要创建 hosts 文件,详细说明在上面的 [创建 NGINX 服务器的列表][23]。 + +#### 为 NGINX Plus 创建部署文件 #### + +在文本编辑器中打开 **install_nginx_plus.yml**。该文件在部署过程中使用 Ansible 来安装和配置 NGINX Plus。这些命令和模块仅针对 CentOS,有些是 NGINX Plus 独有的。 + + $ vim ansible-nginx-plus/tasks/install_nginx_plus.yml + +第一部分使用 [文件][24] 模块,告诉 Ansible 使用指定的路径和状态参数为 NGINX Plus 创建特定的 SSL 目录,设置根目录的权限,将权限更改为0700。 + + # ./ansible-nginx-plus/tasks/install_nginx_plus.yml + + - name: NGINX Plus | 创建 NGINX Plus ssl 证书目录 + file: path=/etc/ssl/nginx state=directory group=root mode=0700 + +接下来的两节使用 [copy][25] 模块从部署 Ansible 的服务器上将 NGINX Plus 的证书和密钥复制到 NGINX Plus 服务器上,再修改权根,将权限设置为0700。 + + - name: NGINX Plus | 复制 NGINX Plus repo 证书 + copy: src=/etc/ssl/nginx/nginx-repo.crt dest=/etc/ssl/nginx/nginx-repo.crt owner=root group=root mode=0700 + + - name: NGINX Plus | 复制 NGINX Plus 密钥 + copy: src=/etc/ssl/nginx/nginx-repo.key dest=/etc/ssl/nginx/nginx-repo.key owner=root group=root mode=0700 + +接下来,我们告诉 Ansible 使用 [get_url][26] 模块从 NGINX Plus 仓库下载 CA 证书在 url 参数指定的远程位置,通过 dest 参数把它放在指定的目录,并设置权限为 0700。 + + - name: NGINX Plus | 下载 NGINX Plus CA 证书 + get_url: url=https://cs.nginx.com/static/files/CA.crt dest=/etc/ssl/nginx/CA.crt mode=0700 + +同样,我们告诉 Ansible 使用 get_url 模块下载 NGINX Plus repo 文件,并将其复制到 **/etc/yum.repos.d** 目录下在 NGINX Plus 服务器上。 + + - name: NGINX Plus | 下载 yum NGINX Plus 仓库 + get_url: url=https://cs.nginx.com/static/files/nginx-plus-7.repo dest=/etc/yum.repos.d/nginx-plus-7.repo mode=0700 + +最后两节的 name 告诉 Ansible 使用 yum 和 service 模块下载并启动 NGINX Plus。 + + - name: NGINX Plus | 安装 NGINX Plus + yum: + name: nginx-plus + state: latest + + - name: NGINX Plus | 启动 NGINX Plus + service: + name: nginx + state: started + +#### 运行 Ansible 来部署 NGINX Plus #### + +在保存 **install_nginx_plus.yml** 文件后,然后运行 ansible-playbook 命令来部署 NGINX Plus。同样在这里,我们使用 --ask-pass 参数使用 Ansible 提示输入 SSH 密码并把它传递给每个 NGINX Plus 服务器,指定路径在 **deploy.yml** 文件中。 + + $ 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 + +playbook 的 recap 是成功的。现在,使用 curl 命令来验证 NGINX Plus 是否在运行。太好了,我们得到的是 200 OK!成功了!我们使用 Ansible 成功地安装了 NGINX Plus。 + + $ curl -Is http://172.16.239.140 | grep HTTP + HTTP/1.1 200 OK + +### 在 Ubuntu 上创建一个 Ansible Playbook 来安装 NGINX 和 NGINX Plus ### + +此过程在 [Ubuntu 服务器][27] 上部署 NGINX 和 NGINX Plus 与 CentOS 很相似,我将一步一步的指导来完成整个部署文件,并指出和 CentOS 的细微差异。 + +首先和 CentOS 一样,创建 Ansible 目录结构和主要的 Ansible 部署文件。也创建 **/etc/ansible/hosts** 文件来描述 [创建 NGINX 服务器的列表][28]。对于 NGINX Plus,你也需要复制证书和密钥在此步中 [复制 NGINX Plus 证书和密钥到 Ansible 服务器][29]。 + +下面是开源 NGINX 的 **install_nginx.yml** 部署文件。在第一部分,我们使用 [apt_key][30] 模块导入 Nginx 的签名密钥。接下来的两节使用[lineinfile][31] 模块来添加 URLs 到 **sources.list** 文件中。最后,我们使用 [apt][32] 模块来更新缓存并安装 NGINX(apt 取代了我们在 CentOS 中部署时的 yum 模块)。 + + # ./ansible-nginx/tasks/install_nginx.yml + + - name: NGINX | 添加 NGINX 签名密钥 + apt_key: url=http://nginx.org/keys/nginx_signing.key state=present + + - name: NGINX | 为 NGINX 添加 sources.list deb url + lineinfile: dest=/etc/apt/sources.list line="deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" + + - name: NGINX Plus | 为 NGINX 添加 sources.list deb-src url + lineinfile: dest=/etc/apt/sources.list line="deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" + + - name: NGINX | 更新 apt 缓存 + apt: + update_cache: yes + + - name: NGINX | 安装 NGINX + apt: + pkg: nginx + state: latest + + - name: NGINX | 启动 NGINX + service: + name: nginx + state: started +下面是 NGINX Plus 的部署文件 **install_nginx.yml**。前四节设置了 NGINX Plus 密钥和证书。然后,我们用 apt_key 模块为开源的 NGINX 导入签名密钥,get_url 模块为 NGINX Plus 下载 apt 配置文件。[shell][33] 模块使用 printf 命令写下输出到 **nginx-plus.list** 文件中在**sources.list.d** 目录。最终的 name 模块是为开源 NGINX 的。 + + # ./ansible-nginx-plus/tasks/install_nginx_plus.yml + + - name: NGINX Plus | 创建 NGINX Plus ssl 证书 repo 目录 + file: path=/etc/ssl/nginx state=directory group=root mode=0700 + + - name: NGINX Plus | 复制 NGINX Plus 仓库证书 + copy: src=/etc/ssl/nginx/nginx-repo.crt dest=/etc/ssl/nginx/nginx-repo.crt owner=root group=root mode=0700 + + - name: NGINX Plus | 复制 NGINX Plus 仓库密钥 + copy: src=/etc/ssl/nginx/nginx-repo.key dest=/etc/ssl/nginx/nginx-repo.key owner=root group=root mode=0700 + + - name: NGINX Plus | 安装 NGINX Plus CA 证书 + get_url: url=https://cs.nginx.com/static/files/CA.crt dest=/etc/ssl/nginx/CA.crt mode=0700 + + - name: NGINX Plus | 添加 NGINX Plus 签名密钥 + apt_key: url=http://nginx.org/keys/nginx_signing.key state=present + + - name: NGINX Plus | 安装 Apt-Get NGINX Plus 仓库 + get_url: url=https://cs.nginx.com/static/files/90nginx dest=/etc/apt/apt.conf.d/90nginx mode=0700 + + - name: NGINX Plus | 为 NGINX Plus 添加 sources.list url + 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 | 运行 apt-get update + apt: + update_cache: yes + + - name: NGINX Plus | 安装 NGINX Plus 通过 apt-get + apt: + pkg: nginx-plus + state: latest + + - name: NGINX Plus | 启动 NGINX Plus + service: + name: nginx + state: started + +现在我们已经准备好运行 ansible-playbook 命令: + + $ sudo ansible-playbook --ask-pass $HOME/ansible-nginx-plus/deploy.yml + +你应该得到一个成功的 play recap。如果你没有成功,你可以使用 verbose 参数,以帮助你解决在 [运行 Ansible 来部署 NGINX][34] 中出现的问题。 + +### 小结 ### + +我在这个教程中演示是什么是 Ansible,可以做些什么来帮助你自动部署 NGINX 或 NGINX Plus,这仅仅是个开始。还有许多有用的模块,用户账号管理,自定义配置模板等。如果你有兴趣了解更多关于这些,请访问 [Ansible 官方文档][35]。 + +要了解更多关于 Ansible,来听我讲用 Ansible 部署 NGINX Plus 在[NGINX.conf 2015][36],9月22-24日在旧金山。 + +-------------------------------------------------------------------------------- + +via: https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/ + +作者:[Kevin Jones][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者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/ From 243840381bc7c0505242a566618368e44cb2de0d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 14 Sep 2015 16:18:35 +0800 Subject: [PATCH 2069/2517] =?UTF-8?q?20150914-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 102 ++++++++++++++++++ ...orecasts from the command line on Linux.md | 76 +++++++++++++ ...move unused old kernel images on Ubuntu.md | 68 ++++++++++++ 3 files changed, 246 insertions(+) create mode 100644 sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md create mode 100644 sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md create mode 100644 sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md diff --git a/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md new file mode 100644 index 0000000000..eecddacf62 --- /dev/null +++ b/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md @@ -0,0 +1,102 @@ +How to Setup Node JS v4.0.0 on Ubuntu 14.04 / 15.04 +================================================================================ +Hi everyone, Node.JS Version 4.0.0 has been out, the popular server-side JavaScript platform has combines the Node.js and io.js code bases. This release represents the combined efforts encapsulated in both the Node.js project and the io.js project that are now combined in a single codebase. The most important change is this Node.js is ships with version 4.5 of Google's V8 JavaScript engine, which is the same version that ships with the current Chrome browser. So, being able to more closely track V8’s releases means Node.js runs JavaScript faster, more securely, and with the ability to use many desirable ES6 language features. + +![Node JS](http://blog.linoxide.com/wp-content/uploads/2015/09/nodejs.png) + +Node.js 4.0.0 aims to provide an easy update path for current users of io.js and node as there are no major API changes. Let’s see how you can easily get it installed and setup on Ubuntu server by following this simple article. + +### Basic System Setup ### + +Node works perfectly on Linux, Macintosh, and Solaris operating systems and among the Linux operating systems it has the best results using Ubuntu OS. That's why we are to setup it Ubuntu 15.04 while the same steps can be followed using Ubuntu 14.04. + +#### 1) System Resources #### + +The basic system resources for Node depend upon the size of your infrastructure requirements. So, here in this tutorial we will setup Node with 1 GB RAM, 1 GHz Processor and 10 GB of available disk space with minimal installation packages installed on the server that is no web or database server packages are installed. + +#### 2) System Update #### + +It always been recommended to keep your system upto date with latest patches and updates, so before we move to the installation on Node, let's login to your server with super user privileges and run update command. + + # apt-get update + +#### 3) Installing Dependencies #### + +Node JS only requires some basic system and software utilities to be present on your server, for its successful installation like 'make' 'gcc' and 'wget'. Let's run the below command to get them installed if they are not already present. + + # apt-get install python gcc make g++ wget + +### Download Latest Node JS v4.0.0 ### + +Let's download the latest Node JS version 4.0.0 by following this link of [Node JS Download Page][1]. + +![nodejs download](http://blog.linoxide.com/wp-content/uploads/2015/09/download.png) + +We will copy the link location of its latest package and download it using 'wget' command as shown. + + # wget https://nodejs.org/download/rc/v4.0.0-rc.1/node-v4.0.0-rc.1.tar.gz + +Once download completes, unpack using 'tar' command as shown. + + # tar -zxvf node-v4.0.0-rc.1.tar.gz + +![wget nodejs](http://blog.linoxide.com/wp-content/uploads/2015/09/wget.png) + +### Installing Node JS v4.0.0 ### + +Now we have to start the installation of Node JS from its downloaded source code. So, change your directory and configure the source code by running its configuration script before compiling it on your ubuntu server. + + root@ubuntu-15:~/node-v4.0.0-rc.1# ./configure + +![Installing NodeJS](http://blog.linoxide.com/wp-content/uploads/2015/09/configure.png) + +Now run the 'make install' command to compile the Node JS installation package as shown. + + root@ubuntu-15:~/node-v4.0.0-rc.1# make install + +The make command will take a couple of minutes while compiling its binaries so after executinf above command, wait for a while and keep calm. + +### Testing Node JS Installation ### + +Once the compilation process is complete, we will test it if every thing went fine. Let's run the following command to confirm the installed version of Node JS. + + root@ubuntu-15:~# node -v + v4.0.0-pre + +By executing 'node' without any arguments from the command-line you will be dropped into the REPL (Read-Eval-Print-Loop) that has simplistic emacs line-editing where you can interactively run JavaScript and see the results. + +![node version](http://blog.linoxide.com/wp-content/uploads/2015/09/node.png) + +### Writing Test Program ### + +We can also try out a very simple console program to test the successful installation and proper working of Node JS. To do so we will create a file named "test.js" and write the following code into it and save the changes made in the file as shown. + + root@ubuntu-15:~# vim test.js + var util = require("util"); + console.log("Hello! This is a Node Test Program"); + :wq! + +Now in order to run the above program, from the command prompt run the below command. + + root@ubuntu-15:~# node test.js + +![Node Program](http://blog.linoxide.com/wp-content/uploads/2015/09/node-test.png) + +So, upon successful installation we will get the output as shown in the screen, where as in the above program it loads the "util" class into a variable "util" and then uses the "util" object to perform the console tasks. While the console.log is a command similar to the cout in C++. + +### Conclusion ### + +That’s it. Hope this gives you a good idea of Node.js going with Node.js on Ubuntu. If you are new to developing applications with Node.js. After all we can say that we can expect significant performance gains with Node JS Version 4.0.0. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-node-js-4-0-ubuntu-14-04-15-04/ + +作者:[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/ +[1]:https://nodejs.org/download/rc/v4.0.0-rc.1/ \ No newline at end of file diff --git a/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md b/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md new file mode 100644 index 0000000000..c25d7684d1 --- /dev/null +++ b/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md @@ -0,0 +1,76 @@ +Linux FAQs with Answers--How to check weather forecasts from the command line on Linux +================================================================================ +> **Question**: I often check local weather forecasts on the Linux desktop. However, is there an easy way to access weather forecast information in the terminal environment, where I don't have access to desktop widgets or web browser? + +For Linux desktop users, there are many ways to access weather forecasts, e.g., using standalone weather apps, desktop widgets, or panel applets. If your work environment is terminal-based, there are also several ways to access weather forecasts from the command line. + +Among them is [wego][1], **a cute little weather app for the terminal**. Using an ncurses-based fancy interface, this command-line app allows you to see current weather conditions and forecasts at a glance. It retrieves the weather forecasts for the next 5 days via a weather forecast API. + +### Install Wego on Linux ### + +Installation of wego is pretty simple. wego is written in Go language, thus the first step is to [install Go language][2]. After installing Go, proceed to install wego as follows. + + $ go get github.com/schachmat/wego + +The wego tool will be installed under $GOPATH/bin. So add $GOPATH/bin to your $PATH variable. + + $ echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.bashrc + $ source ~/.bashrc + +Now go ahead and invoke wego from the command line. + + $ wego + +The first time you run wego, it will generate a config file (~/.wegorc), where you need to specify a weather API key. + +You can obtain a free API key from [worldweatheronline.com][3]. Free sign-up is quick and easy. You only need a valid email address. + +![](https://farm6.staticflickr.com/5781/21317466341_5a368b0d26_c.jpg) + +Your .wegorc will look like the following. + +![](https://farm6.staticflickr.com/5620/21121418558_df0d27cd0a_b.jpg) + +Other than API key, you can specify in ~/.wegorc your preferred location, use of metric/imperial units, and language. + +Note that the weather API is rate-limited; 5 queries per second, and 250 queries per day. + +When you invoke wego command again, you will see the latest weather forecast (of your preferred location), shown as follows. + +![](https://farm6.staticflickr.com/5776/21121218110_dd51e03ff4_c.jpg) + +The displayed weather information includes: (1) temperature, (2) wind direction and speed, (3) viewing distance, and (4) precipitation amount and probability. + +By default, it will show 3-day weather forecast. To change this behavior, you can supply the number of days (upto five) as an argument. For example, to see 5-day forecast: + + $ wego 5 + +If you want to check the weather of any other location, you can specify the city name. + + $ wego Seattle + +### Troubleshooting ### + +1. You encounter the following error while running wego. + + user: Current not implemented on linux/amd64 + +This error can happen when you run wego on a platform which is not supported by the native Go compiler gc (e.g., Fedora). In that case, you can compile the program using gccgo, a compiler-frontend for Go language. This can be done as follows. + + $ sudo yum install gcc-go + $ go get -compiler=gccgo github.com/schachmat/wego + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/weather-forecasts-command-line-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://ask.xmodulo.com/author/nanni +[1]:https://github.com/schachmat/wego +[2]:http://ask.xmodulo.com/install-go-language-linux.html +[3]:https://developer.worldweatheronline.com/auth/register \ No newline at end of file diff --git a/sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md b/sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md new file mode 100644 index 0000000000..9f13543292 --- /dev/null +++ b/sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md @@ -0,0 +1,68 @@ +Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu +================================================================================ +> **Question**: I have upgraded the kernel on my Ubuntu many times in the past. Now I would like to uninstall unused old kernel images to save some disk space. What is the easiest way to uninstall earlier versions of the Linux kernel on Ubuntu? + +In Ubuntu environment, there are several ways for the kernel to get upgraded. On Ubuntu desktop, Software Updater allows you to check for and update to the latest kernel on a daily basis. On Ubuntu server, the unattended-upgrades package takes care of upgrading the kernel automatically as part of important security updates. Otherwise, you can manually upgrade the kernel using apt-get or aptitude command. + +Over time, this ongoing kernel upgrade will leave you with a number of unused old kernel images accumulated on your system, wasting disk space. Each kernel image and associated modules/header files occupy 200-400MB of disk space, and so wasted space from unused kernel images will quickly add up. + +![](https://farm1.staticflickr.com/636/21352725115_29ae7aab5f_c.jpg) + +GRUB boot manager maintains GRUB entries for each old kernel, in case you want to boot into it. + +![](https://farm6.staticflickr.com/5803/21164866468_07760fc23c_z.jpg) + +As part of disk cleaning, you can consider removing old kernel images if you haven't used them for a while. + +### How to Clean up Old Kernel Images ### + +Before you remove old kernel images, remember that it is recommended to keep at least two kernel images (the latest one and an extra older version), in case the primary one goes wrong. That said, let's see how to uninstall old kernel images on Ubuntu platform. + +In Ubuntu, kernel images consist of the following packages. + +- **linux-image-**: kernel image +- **linux-image-extra-**: extra kernel modules +- **linux-headers-**: kernel header files + +First, check what kernel image(s) are installed on your system. + + $ dpkg --list | grep linux-image + $ dpkg --list | grep linux-headers + +Among the listed kernel images, you can remove a particular version (e.g., 3.19.0-15) as follows. + + $ sudo apt-get purge linux-image-3.19.0-15 + $ sudo apt-get purge linux-headers-3.19.0-15 + +The above commands will remove the kernel image, and its associated kernel modules and header files. + +Note that removing an old kernel will automatically trigger the installation of the latest Linux kernel image if you haven't upgraded to it yet. Also, after the old kernel is removed, GRUB configuration will automatically be updated to remove the corresponding GRUB entry from GRUB menu. + +If you have many unused kernels, you can remove multiple of them in one shot using the following shell expansion syntax. Note that this brace expansion will work only for bash or any compatible shells. + + $ sudo apt-get purge linux-image-3.19.0-{18,20,21,25} + $ sudo apt-get purge linux-headers-3.19.0-{18,20,21,25} + +![](https://farm6.staticflickr.com/5619/21352725355_39cc4fc2d0_c.jpg) + +The above command will remove 4 kernel images: 3.19.0-18, 3.19.0-20, 3.19.0-21 and 3.19.0-25. + +If GRUB configuration is not properly updated for whatever reason after old kernels are removed, you can try to update GRUB configuration manually with update-grub2 command. + + $ sudo update-grub2 + +Now reboot and verify that your GRUB menu has been properly cleaned up. + +![](https://farm1.staticflickr.com/593/20731623163_cccfeac854_z.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/remove-kernel-images-ubuntu.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://ask.xmodulo.com/author/nanni \ No newline at end of file From 9671625513710b143f7dda469ba3ad40a11c6fd9 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 14 Sep 2015 16:32:11 +0800 Subject: [PATCH 2070/2517] =?UTF-8?q?20150914-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Using screenfetch and linux_logo Tools.md | 227 ++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 sources/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md diff --git a/sources/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md b/sources/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md new file mode 100644 index 0000000000..6640454f07 --- /dev/null +++ b/sources/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md @@ -0,0 +1,227 @@ +Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools +================================================================================ +Do you want to display a super cool logo of your Linux distribution along with basic hardware information? Look no further try awesome screenfetch and linux_logo utilities. + +### Say hello to screenfetch ### + +screenFetch is a CLI bash script to show system/theme info in screenshots. It runs on a Linux, OS X, FreeBSD and many other Unix-like system. From the man page: + +> This handy Bash script can be used to generate one of those nifty terminal theme information + ASCII distribution logos you see in everyone's screenshots nowadays. It will auto-detect your distribution and display an ASCII version of that distribution's logo and some valuable information to the right. + +#### Installing screenfetch on Linux #### + +Open the Terminal application. Simply type the following [apt-get command][1] on a Debian or Ubuntu or Mint Linux based system: + + $ sudo apt-get install screenfetch + +![](http://s0.cyberciti.org/uploads/cms/2015/09/ubuntu-debian-linux-apt-get-install-screenfetch.jpg) + +Fig.01: Installing screenfetch using apt-get + +#### Installing screenfetch Mac OS X #### + +Type the following command: + + $ brew install screenfetch + +![](http://s0.cyberciti.org/uploads/cms/2015/09/apple-mac-osx-install-screenfetch.jpg) + +Fig.02: Installing screenfetch using brew command + +#### Installing screenfetch on FreeBSD #### + +Type the following pkg command: + + $ sudo pkg install sysutils/screenfetch + +![](http://s0.cyberciti.org/uploads/cms/2015/09/freebsd-install-pkg-screenfetch.jpg) + +Fig.03: FreeBSD install screenfetch using pkg + +#### Installing screenfetch on Fedora Linux #### + +Type the following dnf command: + + $ sudo dnf install screenfetch + +![](http://s0.cyberciti.org/uploads/cms/2015/09/fedora-dnf-install-screenfetch.jpg) + +Fig.04: Fedora Linux 22 install screenfetch using dnf + +#### How do I use screefetch utility? #### + +Simply type the following command: + + $ screenfetch + +Here is the output from various operating system: + +![](http://s0.cyberciti.org/uploads/cms/2015/09/fedora-screenfetch-300x193.jpg) + +Screenfetch on Fedora + +![](http://s0.cyberciti.org/uploads/cms/2015/09/screenfetch-osx-300x213.jpg) + +Screenfetch on OS X + +![](http://s0.cyberciti.org/uploads/cms/2015/09/screenfetch-freebsd-300x143.jpg) + +Screenfetch on FreeBSD + +![](http://s0.cyberciti.org/uploads/cms/2015/09/debian-ubutnu-screenfetch-outputs-300x279.jpg) + +Screenfetch on Debian Linux + +#### Take screenshot #### + +To take a screenshot and to save a file, enter: + + $ screenfetch -s + +You will see a screenshot file at ~/Desktop/screenFetch-*.jpg. To take a screenshot and upload to imgur directly, enter: + + $ screenfetch -su imgur + +**Sample outputs:** + + -/+:. veryv@Viveks-MacBook-Pro + :++++. OS: 64bit Mac OS X 10.10.5 14F27 + /+++/. Kernel: x86_64 Darwin 14.5.0 + .:-::- .+/:-``.::- Uptime: 3d 1h 36m + .:/++++++/::::/++++++/:` Packages: 56 + .:///////////////////////:` Shell: bash 3.2.57 + ////////////////////////` Resolution: 2560x1600 1920x1200 + -+++++++++++++++++++++++` DE: Aqua + /++++++++++++++++++++++/ WM: Quartz Compositor + /sssssssssssssssssssssss. WM Theme: Blue + :ssssssssssssssssssssssss- Font: Not Found + osssssssssssssssssssssssso/` CPU: Intel Core i5-4288U CPU @ 2.60GHz + `syyyyyyyyyyyyyyyyyyyyyyyy+` GPU: Intel Iris + `ossssssssssssssssssssss/ RAM: 6405MB / 8192MB + :ooooooooooooooooooo+. + `:+oo+/:-..-:/+o+/- + + Taking shot in 3.. 2.. 1.. 0. + ==> Uploading your screenshot now...your screenshot can be viewed at http://imgur.com/HKIUznn + +You can visit [http://imgur.com/HKIUznn][2] to see uploaded screenshot. + +### Say hello to linux_logo ### + +The linux_logo program generates a color ANSI picture of a penguin which includes some system information obtained from the /proc filesystem. + +#### Installation #### + +Simply type the following command as per your Linux distro. + +#### Debian/Ubutnu/Mint #### + + # apt-get install linux_logo + +#### CentOS/RHEL/Older Fedora #### + + # yum install linux_logo + +#### Fedora Linux v22+ or newer #### + + # dnf install linux_logo + +#### Run it #### + +Simply type the following command: + + $ linux_logo + +![](http://s0.cyberciti.org/uploads/cms/2015/09/debian-linux_logo.jpg) + +linux_logo in action + +#### But wait, there's more! #### + +You can see a list of compiled in logos using: + + $ linux_logo -f -L list + +**Sample outputs:** + + Available Built-in Logos: + Num Type Ascii Name Description + 1 Classic Yes aix AIX Logo + 2 Banner Yes bsd_banner FreeBSD Logo + 3 Classic Yes bsd FreeBSD Logo + 4 Classic Yes irix Irix Logo + 5 Banner Yes openbsd_banner OpenBSD Logo + 6 Classic Yes openbsd OpenBSD Logo + 7 Banner Yes solaris The Default Banner Logos + 8 Banner Yes banner The Default Banner Logo + 9 Banner Yes banner-simp Simplified Banner Logo + 10 Classic Yes classic The Default Classic Logo + 11 Classic Yes classic-nodots The Classic Logo, No Periods + 12 Classic Yes classic-simp Classic No Dots Or Letters + 13 Classic Yes core Core Linux Logo + 14 Banner Yes debian_banner_2 Debian Banner 2 + 15 Banner Yes debian_banner Debian Banner (white) + 16 Classic Yes debian Debian Swirl Logos + 17 Classic Yes debian_old Debian Old Penguin Logos + 18 Classic Yes gnu_linux Classic GNU/Linux + 19 Banner Yes mandrake Mandrakelinux(TM) Banner + 20 Banner Yes mandrake_banner Mandrake(TM) Linux Banner + 21 Banner Yes mandriva Mandriva(TM) Linux Banner + 22 Banner Yes pld PLD Linux banner + 23 Classic Yes raspi An ASCII Raspberry Pi logo + 24 Banner Yes redhat RedHat Banner (white) + 25 Banner Yes slackware Slackware Logo + 26 Banner Yes sme SME Server Banner Logo + 27 Banner Yes sourcemage_ban Source Mage GNU/Linux banner + 28 Banner Yes sourcemage Source Mage GNU/Linux large + 29 Banner Yes suse SUSE Logo + 30 Banner Yes ubuntu Ubuntu Logo + + Do "linux_logo -L num" where num is from above to get the appropriate logo. + Remember to also use -a to get ascii version. + +To see aix logo, enter: + + $ linux_logo -f -L aix + +To see openbsd logo: + + $ linux_logo -f -L openbsd + +Or just see some random Linux logo: + + $ linux_logo -f -L random_xy + +You [can combine bash for loop as follows to display various logos][3], enter: + +![](http://s0.cyberciti.org/uploads/cms/2015/09/linux-logo-fun.gif) + +Gif 01: linux_logo and bash for loop for fun and profie + +### Getting help ### + +Simply type the following command: + + $ screefetch -h + $ linux_logo -h + +**References** + +- [screenFetch home page][4] +- [linux_logo home page][5] + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/hardware/howto-display-linux-logo-in-bash-terminal-using-screenfetch-linux_logo/ + +作者: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/tips/linux-debian-package-management-cheat-sheet.html +[2]:http://imgur.com/HKIUznn +[3]:http://www.cyberciti.biz/faq/bash-for-loop/ +[4]:https://github.com/KittyKatt/screenFetch +[5]:https://github.com/deater/linux_logo \ No newline at end of file From 007556724fa2b291158124a880c0202c531d5eac Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 14 Sep 2015 22:31:28 +0800 Subject: [PATCH 2071/2517] translating --- ...swers--How to remove unused old kernel images on Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md b/sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md index 9f13543292..c8ba164ee8 100644 --- a/sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md +++ b/sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md @@ -1,3 +1,5 @@ +translating----geekpi + Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu ================================================================================ > **Question**: I have upgraded the kernel on my Ubuntu many times in the past. Now I would like to uninstall unused old kernel images to save some disk space. What is the easiest way to uninstall earlier versions of the Linux kernel on Ubuntu? @@ -65,4 +67,4 @@ via: http://ask.xmodulo.com/remove-kernel-images-ubuntu.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 8a35c84de2eeb090193a5f21a8a7a29e795cdd48 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 14 Sep 2015 23:03:49 +0800 Subject: [PATCH 2072/2517] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...cess And Use Cloud Storage (SkyDrive etc.) In Linux.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/published/201311/3 Ways to Access And Use Cloud Storage (SkyDrive etc.) In Linux.md b/published/201311/3 Ways to Access And Use Cloud Storage (SkyDrive etc.) In Linux.md index e1716a1cd8..8972c25a3d 100644 --- a/published/201311/3 Ways to Access And Use Cloud Storage (SkyDrive etc.) In Linux.md +++ b/published/201311/3 Ways to Access And Use Cloud Storage (SkyDrive etc.) In Linux.md @@ -7,7 +7,7 @@ ![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2013/10/linux_accessing_cloud_ubuntu_one.jpg) -使用这种方式的明显好处就是你可以通过使用他们各自的官方应用访问你的各种云存储。目前,提供官方Linux客户端的服务提供商有[SpiderOak](1), [Dropbox](2), [Ubuntu One](3),[Copy](5)。[Ubuntu One](3)虽不出名但的确是[一个不错的云存储竞争着](4)。[Copy][5]则提供比Dropbox更多的空间,是[Dropbox的替代选择之一](6)。使用这些官方Linux客户端可以保持你的电脑与他们的服务器之间的通信,还可以让你进行属性设置,如选择性同步。 +使用这种方式的明显好处就是你可以通过使用他们各自的官方应用访问你的各种云存储。目前,提供官方Linux客户端的服务提供商有[SpiderOak][1], [Dropbox][2], [Ubuntu One][3],[Copy][5]。[Ubuntu One][3]虽不出名但的确是[一个不错的云存储竞争着][4]。[Copy][5]则提供比Dropbox更多的空间,是[Dropbox的替代选择之一][6]。使用这些官方Linux客户端可以保持你的电脑与他们的服务器之间的通信,还可以让你进行属性设置,如选择性同步。 对于普通桌面用户,使用官方客户端是最好的选择,因为官方客户端可以提供最多的功能和最好的兼容性。使用它们也很简单,只需要下载他们对应你的发行版的软件包,然后安装安装完后在运行一下就Ok了。安装客户端时,它一般会指导你完成这些简单的过程。 @@ -25,9 +25,9 @@ 当你运行最后一条命令后,脚本会提醒你这是你第一次运行这个脚本。它将告诉你去浏览一个Dropbox的特定网页以便访问你的账户。它还会告诉你所有你需要放入网站的信息,这是为了让Dropbox给你App Key和App Secret以及赋予这个脚本你给予的访问权限。现在脚本就拥有了访问你账户的合法授权了。 -这些一旦完成,你就可以这个脚本执行各种任务了,例如上传、下载、删除、移动、复制、创建文件夹、查看文件、共享文件、查看文件信息和取消共享。对于全部的语法解释,你可以查看一下[这个页面](9)。 +这些一旦完成,你就可以这个脚本执行各种任务了,例如上传、下载、删除、移动、复制、创建文件夹、查看文件、共享文件、查看文件信息和取消共享。对于全部的语法解释,你可以查看一下[这个页面][9]。 -###通过[Storage Made Easy](7)将SkyDrive带到Linux上 +###通过[Storage Made Easy][7]将SkyDrive带到Linux上 微软并没有提供SkyDrive的官方Linux客户端,这一点也不令人惊讶。但是你并不意味着你不能在Linux上访问SkyDrive,记住:SkyDrive的web版本是可用的。 @@ -41,7 +41,7 @@ 第一次启动时。它会要求你登录,还有询问你要把云存储挂载到什么地方。在你做完了这些后,你就可以浏览你选择的文件夹,你还可以访问你的Storage Made Easy空间以及你的SkyDrive空间了!这种方法对于那些想在Linux上使用SkyDrive的人来说非常好,对于想把他们的多个云存储服务整合到一个地方的人来说也很不错。这种方法的缺点是你无法使用他们各自官方客户端中可以使用的特殊功能。 -因为现在在你的Linux桌面上也可以使用SkyDrive,接下来你可能需要阅读一下我写的[SkyDrive与Google Drive的比较](8)以便于知道究竟哪种更适合于你。 +因为现在在你的Linux桌面上也可以使用SkyDrive,接下来你可能需要阅读一下我写的[SkyDrive与Google Drive的比较][8]以便于知道究竟哪种更适合于你。 ###结论 From c8fcb72946f0c99ab54f75cfb30e19e79eada0c1 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 14 Sep 2015 23:21:19 +0800 Subject: [PATCH 2073/2517] translating 20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md --- ...4 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md index eecddacf62..ba828d629d 100644 --- a/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md +++ b/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md @@ -1,3 +1,6 @@ + +translating by ezio + How to Setup Node JS v4.0.0 on Ubuntu 14.04 / 15.04 ================================================================================ Hi everyone, Node.JS Version 4.0.0 has been out, the popular server-side JavaScript platform has combines the Node.js and io.js code bases. This release represents the combined efforts encapsulated in both the Node.js project and the io.js project that are now combined in a single codebase. The most important change is this Node.js is ships with version 4.5 of Google's V8 JavaScript engine, which is the same version that ships with the current Chrome browser. So, being able to more closely track V8’s releases means Node.js runs JavaScript faster, more securely, and with the ability to use many desirable ES6 language features. @@ -99,4 +102,4 @@ via: http://linoxide.com/ubuntu-how-to/setup-node-js-4-0-ubuntu-14-04-15-04/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/kashifs/ -[1]:https://nodejs.org/download/rc/v4.0.0-rc.1/ \ No newline at end of file +[1]:https://nodejs.org/download/rc/v4.0.0-rc.1/ From f4d5f650772e17507510b38561d28a84d246f63e Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 14 Sep 2015 23:22:46 +0800 Subject: [PATCH 2074/2517] translating 20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md --- ... check weather forecasts from the command line on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md b/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md index c25d7684d1..11dd713f74 100644 --- a/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md +++ b/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md @@ -1,3 +1,5 @@ +translating by ezio + Linux FAQs with Answers--How to check weather forecasts from the command line on Linux ================================================================================ > **Question**: I often check local weather forecasts on the Linux desktop. However, is there an easy way to access weather forecast information in the terminal environment, where I don't have access to desktop widgets or web browser? @@ -73,4 +75,4 @@ via: http://ask.xmodulo.com/weather-forecasts-command-line-linux.html [a]:http://ask.xmodulo.com/author/nanni [1]:https://github.com/schachmat/wego [2]:http://ask.xmodulo.com/install-go-language-linux.html -[3]:https://developer.worldweatheronline.com/auth/register \ No newline at end of file +[3]:https://developer.worldweatheronline.com/auth/register From 28f84f998cc58d4ede96d911761f76713d4ab647 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 14 Sep 2015 23:37:54 +0800 Subject: [PATCH 2075/2517] PUB:20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script @mr-ping --- ...nux Kernel in Ubuntu Easily via A Script.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename {translated/tech => published}/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md (73%) diff --git a/translated/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md b/published/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md similarity index 73% rename from translated/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md rename to published/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md index dbe5dec7cd..a2e5f1e276 100644 --- a/translated/tech/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md +++ b/published/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md @@ -1,22 +1,22 @@ -使用脚本便捷地在Ubuntu系统中安装最新的Linux内核 +使用脚本便捷地在 Ubuntu 中安装最新 Linux 内核 ================================================================================ ![](http://ubuntuhandbook.org/wp-content/uploads/2014/12/linux-kernel-icon-tux.png) 想要安装最新的Linux内核吗?一个简单的脚本就可以在Ubuntu系统中方便的完成这项工作。 -Michael Murphy 写了一个脚本用来将最新的候选版、标准版、或者低延时版内核安装到 Ubuntu 系统中。这个脚本会在询问一些问题后从 [Ubuntu kernel mainline page][1] 下载安装最新的 Linux 内核包。 +Michael Murphy 写了一个脚本用来将最新的候选版、标准版、或者低延时版的内核安装到 Ubuntu 系统中。这个脚本会在询问一些问题后从 [Ubuntu 内核主线页面][1] 下载安装最新的 Linux 内核包。 ### 通过脚本来安装、升级Linux内核: ### -1. 点击 [github page][2] 右上角的 “Download Zip” 来下载脚本。 +1. 点击这个 [github 页面][2] 右上角的 “Download Zip” 来下载该脚本。 -2. 鼠标右键单击用户下载目录下的 Zip 文件,选择 “Extract Here” 将其解压到此处。 +2. 鼠标右键单击用户下载目录下的 Zip 文件,选择 “在此展开” 将其解压。 -3. 右键点击解压后的文件夹,选择 “Open in Terminal” 在终端中导航到此文件夹下。 +3. 右键点击解压后的文件夹,选择 “在终端中打开” 到此文件夹下。 ![](http://ubuntuhandbook.org/wp-content/uploads/2015/08/open-terminal.jpg) -此时将会打开一个终端,并且自动导航到结果文件夹下。如果你找不到 “Open in Terminal” 选项的话,在 Ubuntu 软件中心搜索安装 `nautilus-open-terminal` ,然后重新登录系统即可(也可以再终端中运行 `nautilus -q` 来取代重新登录系统的操作)。 +此时将会打开一个终端,并且自动导航到目标文件夹下。如果你找不到 “在终端中打开” 选项的话,在 Ubuntu 软件中心搜索安装 `nautilus-open-terminal` ,然后重新登录系统即可(也可以再终端中运行 `nautilus -q` 来取代重新登录系统的操作)。 4. 当进入终端后,运行以下命令来赋予脚本执行本次操作的权限。 chmod +x * @@ -39,7 +39,7 @@ Michael Murphy 写了一个脚本用来将最新的候选版、标准版、或 ### 如何移除旧的(或新的)内核: ### -1. 从Ubuntu软件中心安装 Synaptic Package Manager。 +1. 从 Ubuntu 软件中心安装 Synaptic Package Manager。 2. 打开 Synaptic Package Manager 然后如下操作: @@ -68,8 +68,8 @@ Michael Murphy 写了一个脚本用来将最新的候选版、标准版、或 via: http://ubuntuhandbook.org/index.php/2015/08/install-latest-kernel-script/ 作者:[Ji m][a] -译者:[译者ID](https://github.com/mr-ping) -校对:[校对者ID](https://github.com/校对者ID) +译者:[mr-ping](https://github.com/mr-ping) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 375b0ece3a84bcb9b9f0e9e144d8adf9b00b8337 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 15 Sep 2015 09:23:05 +0800 Subject: [PATCH 2076/2517] translated --- ...move unused old kernel images on Ubuntu.md | 70 ------------------- ...move unused old kernel images on Ubuntu.md | 69 ++++++++++++++++++ 2 files changed, 69 insertions(+), 70 deletions(-) delete mode 100644 sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md create mode 100644 translated/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md diff --git a/sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md b/sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md deleted file mode 100644 index c8ba164ee8..0000000000 --- a/sources/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md +++ /dev/null @@ -1,70 +0,0 @@ -translating----geekpi - -Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu -================================================================================ -> **Question**: I have upgraded the kernel on my Ubuntu many times in the past. Now I would like to uninstall unused old kernel images to save some disk space. What is the easiest way to uninstall earlier versions of the Linux kernel on Ubuntu? - -In Ubuntu environment, there are several ways for the kernel to get upgraded. On Ubuntu desktop, Software Updater allows you to check for and update to the latest kernel on a daily basis. On Ubuntu server, the unattended-upgrades package takes care of upgrading the kernel automatically as part of important security updates. Otherwise, you can manually upgrade the kernel using apt-get or aptitude command. - -Over time, this ongoing kernel upgrade will leave you with a number of unused old kernel images accumulated on your system, wasting disk space. Each kernel image and associated modules/header files occupy 200-400MB of disk space, and so wasted space from unused kernel images will quickly add up. - -![](https://farm1.staticflickr.com/636/21352725115_29ae7aab5f_c.jpg) - -GRUB boot manager maintains GRUB entries for each old kernel, in case you want to boot into it. - -![](https://farm6.staticflickr.com/5803/21164866468_07760fc23c_z.jpg) - -As part of disk cleaning, you can consider removing old kernel images if you haven't used them for a while. - -### How to Clean up Old Kernel Images ### - -Before you remove old kernel images, remember that it is recommended to keep at least two kernel images (the latest one and an extra older version), in case the primary one goes wrong. That said, let's see how to uninstall old kernel images on Ubuntu platform. - -In Ubuntu, kernel images consist of the following packages. - -- **linux-image-**: kernel image -- **linux-image-extra-**: extra kernel modules -- **linux-headers-**: kernel header files - -First, check what kernel image(s) are installed on your system. - - $ dpkg --list | grep linux-image - $ dpkg --list | grep linux-headers - -Among the listed kernel images, you can remove a particular version (e.g., 3.19.0-15) as follows. - - $ sudo apt-get purge linux-image-3.19.0-15 - $ sudo apt-get purge linux-headers-3.19.0-15 - -The above commands will remove the kernel image, and its associated kernel modules and header files. - -Note that removing an old kernel will automatically trigger the installation of the latest Linux kernel image if you haven't upgraded to it yet. Also, after the old kernel is removed, GRUB configuration will automatically be updated to remove the corresponding GRUB entry from GRUB menu. - -If you have many unused kernels, you can remove multiple of them in one shot using the following shell expansion syntax. Note that this brace expansion will work only for bash or any compatible shells. - - $ sudo apt-get purge linux-image-3.19.0-{18,20,21,25} - $ sudo apt-get purge linux-headers-3.19.0-{18,20,21,25} - -![](https://farm6.staticflickr.com/5619/21352725355_39cc4fc2d0_c.jpg) - -The above command will remove 4 kernel images: 3.19.0-18, 3.19.0-20, 3.19.0-21 and 3.19.0-25. - -If GRUB configuration is not properly updated for whatever reason after old kernels are removed, you can try to update GRUB configuration manually with update-grub2 command. - - $ sudo update-grub2 - -Now reboot and verify that your GRUB menu has been properly cleaned up. - -![](https://farm1.staticflickr.com/593/20731623163_cccfeac854_z.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/remove-kernel-images-ubuntu.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://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md b/translated/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md new file mode 100644 index 0000000000..61eec350a9 --- /dev/null +++ b/translated/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md @@ -0,0 +1,69 @@ +Linux有问必答--如何删除Ubuntu上不再使用的老内核 +================================================================================ +> **提问**:过去我已经在我的Ubuntu上升级了几次内核。现在我想要删除这些旧的内核镜像来节省我的磁盘空间。如何用最简单的方法删除Ubuntu上先前版本的内核? + +在Ubuntu上,有几个方法来升级内核。在Ubuntu桌面中,软件更新允许你每天检查并更新到最新的内核上。在Ubuntu服务器上,一个无人值守的包会自动更新内核最为一项最要的安全更新。然而,你可以手动用apt-get或者aptitude命令来更新。 + +随着时间的流逝,持续的内核更新会在系统中积聚大量的不再使用的内核,浪费你的磁盘空间。每个内核镜像和其相关联的模块/头文件会占用200-400MB的磁盘空间,因此由不再使用的内核而浪费的磁盘空间会快速地增加。 + +![](https://farm1.staticflickr.com/636/21352725115_29ae7aab5f_c.jpg) + +GRUB管理器为每个旧内核都维护了一个GRUB入口,防止你想要进入它们。 + +![](https://farm6.staticflickr.com/5803/21164866468_07760fc23c_z.jpg) + +作为磁盘清理的一部分,如果你不再使用这些,你可以考虑清理掉这些镜像。 + +### 如何清理旧内核镜像 ### + +在删除旧内核之前,记住最好留有2个最近的内核(最新的和上一个版本),以防主要的版本出错。现在就让我们看看如何在Ubuntu上清理旧内核。 + +在Ubuntu内核镜像包哈了以下的包。 + +- **linux-image-**: 内核镜像 +- **linux-image-extra-**: 额外的内核模块 +- **linux-headers-**: 内核头文件 + +首先检查系统中安装的内核镜像。 + + $ dpkg --list | grep linux-image + $ dpkg --list | grep linux-headers + +在列出的内核镜像中,你可以移除一个特定的版本(比如3.19.0-15)。 + + $ sudo apt-get purge linux-image-3.19.0-15 + $ sudo apt-get purge linux-headers-3.19.0-15 + +上面的命令会删除内核镜像和它相关联的内核模块和头文件。 + +updated to remove the corresponding GRUB entry from GRUB menu. +注意如果你还没有升级内核那么删除旧内核会自动触发安装新内核。这样在删除旧内核之后,GRUB配置会自动升级来移除GRUB菜单中相关GRUB入口。 + +如果你有很多没用的内核,你可以用shell表达式来一次性地删除多个内核。注意这个括号表达式只在bash或者兼容的shell中才有效。 + + $ sudo apt-get purge linux-image-3.19.0-{18,20,21,25} + $ sudo apt-get purge linux-headers-3.19.0-{18,20,21,25} + +![](https://farm6.staticflickr.com/5619/21352725355_39cc4fc2d0_c.jpg) + +上面的命令会删除4个内核镜像:3.19.0-18、3.19.0-20、3.19.0-21 和 3.19.0-25。 + +如果GRUB配置由于任何原因在删除旧内核后没有正确升级,你可以尝试手动用update-grub2命令来更新配置。 + + $ sudo update-grub2 + +现在就重启来验证GRUB菜单已经正确清理了。 + +![](https://farm1.staticflickr.com/593/20731623163_cccfeac854_z.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/remove-kernel-images-ubuntu.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From a44737b019d57dbca79bf1aefc57e03716e88834 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 15 Sep 2015 19:53:05 +0800 Subject: [PATCH 2077/2517] PUB:20150824 Fix No Bootable Device Found Error After Installing Ubuntu @ictlyh --- ...ice Found Error After Installing Ubuntu.md | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) rename {translated/tech => published}/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md (58%) diff --git a/translated/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md b/published/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md similarity index 58% rename from translated/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md rename to published/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md index 91aa23d6aa..4b8e84bf1d 100644 --- a/translated/tech/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md +++ b/published/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md @@ -1,44 +1,45 @@ -修复安装完 Ubuntu 后无可引导设备错误 +修复安装完 Ubuntu 后无可引导设备的错误 ================================================================================ -通常情况下,我启动 Ubuntu 和 Windows 双系统,但是这次我决定完全消除 Windows 纯净安装 Ubuntu。纯净安装 Ubuntu 完成后,结束时屏幕输出 **no bootable device found** 而不是进入 GRUB 界面。显然,安装搞砸了 UEFI 引导设置。 + +通常情况下,我会安装启动 Ubuntu 和 Windows 的双系统,但是这次我决定完全消除 Windows 纯净安装 Ubuntu。纯净安装 Ubuntu 完成后,结束时屏幕输出 **无可引导设备(no bootable device found)** 而不是进入 GRUB 界面。显然,安装搞砸了 UEFI 引导设置。 ![安装完 Ubuntu 后无可引导设备](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_1.jpg) -我会告诉你我是如何修复**在宏碁笔记本上安装 Ubuntu 后出现无可引导设备错误**。我声明了我使用的是宏碁灵越 R13,这很重要,因为我们需要更改固件设置,而这些设置可能因制造商和设备有所不同。 +我会告诉你我是如何修复**在宏碁笔记本上安装 Ubuntu 后出现无可引导设备错误**的。我声明了我使用的是宏碁灵越 R13,这很重要,因为我们需要更改固件设置,而这些设置可能因制造商和设备有所不同。 因此在你开始这里介绍的步骤之前,先看一下发生这个错误时我计算机的状态: -- 我的宏碁灵越 R13 预装了 Windows8.1 和 UEFI 引导管理器 -- 关闭了 Secure boot(我的笔记本刚维修过,维修人员又启用了它,直到出现了问题我才发现)。你可以阅读这篇博文了解[如何在宏碁笔记本中关闭 secure boot][1] -- 我通过选择清除所有东西安装 Ubuntu,例如现有的 Windows 8.1,各种分区等。 +- 我的宏碁灵越 R13 预装了 Windows 8.1 和 UEFI 引导管理器 +- 安全引导( Secure boot)没有关闭,(我的笔记本刚维修过,维修人员又启用了它,直到出现了问题我才发现)。你可以阅读这篇博文了解[如何在宏碁笔记本中关闭安全引导(secure boot)][1] +- 我选择了清除所有东西安装 Ubuntu,例如现有的 Windows 8.1,各种分区等 - 安装完 Ubuntu 之后,从硬盘启动时我看到无可引导设备错误。但能从 USB 设备正常启动 -在我看来,没有禁用 secure boot 可能是这个错误的原因。但是,我没有数据支撑我的观点。这仅仅是预感。有趣的是,双系统启动 Windows 和 Linux 经常会出现这两个 Grub 问题: +在我看来,没有禁用安全引导(secure boot)可能是这个错误的原因。但是,我没有数据支撑我的观点。这仅仅是预感。有趣的是,双系统启动 Windows 和 Linux 经常会出现这两个 Grub 问题: -- [error: no such partition grub rescue][2] -- [Minimal BASH like line editing is supported][3] +- [错误:没有 grub 救援分区][2] +- [支持最小化 BASH 式的行编辑][3] 如果你遇到类似的情况,你可以试试我的修复方法。 ### 修复安装完 Ubuntu 后无可引导设备错误 ### -请原谅我没有丰富的图片。我的一加相机不能很好地拍摄笔记本屏幕。 +请原谅我的图片质量很差。我的一加相机不能很好地拍摄笔记本屏幕。 #### 第一步 #### -关闭电源并进入 boot 设置。我需要在宏碁灵越 R13 上快速地按 Fn+F2。如果你使用固态硬盘的话要按的非常快,因为固态硬盘启动速度很快。取决于你的制造商,你可能要用 Del 或 F10 或者 F12。 +关闭电源并进入引导设置。我需要在宏碁灵越 R13 上快速地按下 Fn+F2。如果你使用固态硬盘的话要按的非常快,因为固态硬盘启动速度很快。这取决于你的制造商,你可能要用 Del 或 F10 或者 F12。 #### 第二步 #### -在 boot 设置中,确保启用了 Secure Boot。它在 Boot 标签里。 +在引导设置中,确保启用了 Secure Boot。它在 Boot 标签里。 #### 第三步 #### -进入到 Security 标签,查找 “Select an UEFI file as trusted for executing” 并敲击回车。 +进入到 Security 标签,找到 “选择一个用于执行的可信任 UEFI 文件(Select an UEFI file as trusted for executing)” 并敲击回车。 ![修复无可引导设备错误](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_2.jpg) -特意说明,我们这一步是要在你的设备中添加 UEFI 设置文件(安装 Ubuntu 的时候生成)到可信 UEFI 启动。如果你记得的话,UEFI 启动的主要目的是提供安全性,由于(可能)没有禁用 Secure Boot,设备不会试图从新安装的操作系统中启动。添加它到类似白名单的可信列表,会使设备从 Ubuntu UEFI 文件启动。 +特意说明,我们这一步是要在你的设备中添加 UEFI 设置文件(安装 Ubuntu 的时候生成)到可信 UEFI 启动中。如果你记得的话,UEFI 启动的主要目的是提供安全性,由于(可能)没有禁用安全引导(Secure Boot),设备不会试图从新安装的操作系统中启动。添加它到类似白名单的可信列表,会使设备从 Ubuntu UEFI 文件启动。 #### 第四步 #### @@ -48,13 +49,13 @@ #### 第五步 #### -你应该可以看到 ,敲击回车。 +你应该可以看到 \ 了,敲击回车。 ![在 UEFI 中修复设置](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_4.jpg) #### 第六步 #### -在下一个屏幕中你会看到 。耐心点,马上就好了。 +在下一个屏幕中你会看到 \。耐心点,马上就好了。 ![安装完 Ubuntu 后修复启动错误](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_5.jpg) @@ -71,7 +72,7 @@ #### 第八步 #### -当我们添加它到可信 EFI 文件并执行时,按 F10 保存并退出。 +当我们添加它到可信 EFI 文件并执行后,按 F10 保存并退出。 ![保存并退出固件设置](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/No_Bootable_Device_Found_8.jpg) @@ -87,7 +88,7 @@ via: http://itsfoss.com/no-bootable-device-found-ubuntu/ 作者:[Abhishek][a] 译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From b813f6633db8bdeb9e72d9f1d09c1ac0a776b94b Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Tue, 15 Sep 2015 20:49:22 +0800 Subject: [PATCH 2078/2517] Create 20140320 Best command line tools for linux performance monitoring.md --- ... tools for linux performance monitoring.md | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 sources/tech/20140320 Best command line tools for linux performance monitoring.md diff --git a/sources/tech/20140320 Best command line tools for linux performance monitoring.md b/sources/tech/20140320 Best command line tools for linux performance monitoring.md new file mode 100644 index 0000000000..6b0ed1ebc4 --- /dev/null +++ b/sources/tech/20140320 Best command line tools for linux performance monitoring.md @@ -0,0 +1,83 @@ +Best command line tools for linux performance monitoring +================================================================================ +Sometimes a system can be slow and many reasons can be the root cause. To identify the process that is consuming memory, disk I/O or processor capacity you need to use tools to see what is happening in an operation system. + +There are many tools to monitor a GNU/Linux server. In this article, I am providing 7 monitoring tools and i hope it will help you. + +###Htop +Htop is an alternative of top command but it provides interactive system-monitor process-viewer and more user friendly output than top. + + htop also provides a better way to navigate to any process using keyboard Up/Down keys as well as we can also operate it using mouse. + + For Check our previous post:[How to install and use htop on RHEL/Centos and Fedora linux][1] +![Htop(Linux Process Monitoring)](http://lintut.com/wp-content/uploads/2013/11/Screenshot-from-2013-11-26-144444.png) +###dstat +Dstat is a versatile replacement for vmstat, iostat, netstat and ifstat. Dstat overcomes some of their limitations and adds some extra features, more counters and flexibility. Dstat is handy for monitoring systems during performance tuning tests, benchmarks or troubleshooting. + + Dstat allows you to view all of your system resources in real-time, you can eg. compare disk utilization in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval). +Dstat gives you detailed selective information in columns and clearly indicates in what magnitude and unit the output is displayed. Less confusion, less mistakes. And most importantly, it makes it very easy to write plugins to collect your own counters and extend in ways you never expected. + + Dstat’s output by default is designed for being interpreted by humans in real-time, however you can export details to CSV output to a file to be imported later into Gnumeric or Excel to generate graphs. +Check our previous post:[How to install and use dstat on RHEL/CentOS,Fedora and Debian/Ubuntu based distribution][2] +![Example dstat output](http://lintut.com/wp-content/uploads/2013/12/Screenshot-from-2013-12-26-085128.png) +###Collectl +Collectl is a light-weight performance monitoring tool capable of reporting interactively as well as logging to disk. It reports statistics on cpu, disk, infiniband, lustre, memory, network, nfs, process, quadrics, slabs and more in easy to read format. +In this article i will show you how to install and sample usage Collectl on Debian/Ubuntu and RHEL/Centos and Fedora linux. + + Check our previous post:[Collectl-Monitoring system resources][3] + ![Collectl screen](http://lintut.com/wp-content/uploads/2014/03/collectlscreen1.png) + +###Nmon +nmon is a beutiful tool to monitor linux system performance. It works on Linux, IBM AIX Unix, Power,x86, amd64 and ARM based system such as Raspberry Pi. The nmon command displays and recordslocal system information. The command can run either in interactive or recording mode. + + Check our previous post: [Nmon – linux monitoring tools][4] + ![nmon startup screen](http://lintut.com/wp-content/uploads/2013/12/Screenshot-from-2013-12-26-234246.png) +###Saidar +Saidar is a curses-based application to display system statistics. It use the libstatgrab library, which provides cross platform access to statistics about the system on which it’s run. Reported statistics includeCPU, load, processes, memory, swap, network input and output and disks activities along with their free space. + + Check our previous post:[Saidar – system monitoring tool][5] + ![saidar -c](http://lintut.com/wp-content/uploads/2013/08/Screenshot-from-2013-12-16-223053.png) +###Sar +The sar utility, which is part of the systat package, can be used to review history performance data on your server. System resource utilization can be seen for given time frames to help troubleshoot performance issues, or to optimize performance. + + Check our previous post:[Using Sar To Monitor System Performance][6] + ![Sar command](http://lintut.com/wp-content/uploads/2014/03/sar-cpu-unix.jpg) + + ###Glances + Glances is a cross-platform curses-based command line monitoring tool writen in Python which use the psutil library to grab informations from the system. Glance monitoring CPU, Load Average, Memory, Network Interfaces, Disk I/O, Processesand File System spaces utilization. + + Glances can adapt dynamically the displayed information depending on the terminal siwrize. It can also work in a client/server mode for remote monitoring. + + Check our previous post: [Glances – Real Time System Monitoring Tool for Linux][7] + ![Glances](http://lintut.com/wp-content/uploads/2013/09/Screenshot-from-2013-09-07-213127.png) + + ###Atop + [Atop](http://www.atoptool.nl/) is an interactive monitor to view the load on a Linux system. It shows the occupation of the most critical hardware resources on system level, i.e. cpu, memory, disk and network. It also shows which processes are responsible for the indicated load with respect to cpu- and memory load on process level. Disk load is shown if per process “storage accounting” is active in the kernel or if the kernel patch ‘cnt’ has been installed. Network load is only shown per process if the kernel patch ‘cnt’ has been installed. + ![Atop linux resources monitoring tool](http://lintut.com/wp-content/uploads/2014/04/Screenshot-from-2014-04-12-004319.png) + For more about Atop check next post:[Atop - monitor system resources in linux][8] + So, if you come across any other similar tool then let us know in the comment box below. + + + + + + +-------------------------------------------------------------------------------- + +via: http://lintut.com/best-command-line-tools-for-linux-performance-monitring/ + +作者:[rasho][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: +[1]:http://lintut.com/install-htop-in-rhel-centos-fedora-linux/ +[2]:http://lintut.com/dstat-linux-monitoring-tools/ +[3]:http://lintut.com/collectl-monitoring-system-resources/ +[4]:http://lintut.com/nmon-linux-monitoring-tools/ +[5]:http://lintut.com/saidar-system-monitoring-tool/ +[6]:http://lintut.com/using-sar-to-monitor-system-performance/ +[7]:http://lintut.com/glances-an-eye-on-your-system/ +[8]:http://lintut.com/atop-linux-system-resource-monitor/ From b74d29d80d67856bff17053b03e42d3ef780ec2e Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 15 Sep 2015 23:15:19 +0800 Subject: [PATCH 2079/2517] PUB:RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps @FSSlc --- ...or Analyzing text with grep and regexps.md | 209 ++++++++++++++ ...or Analyzing text with grep and regexps.md | 258 ------------------ 2 files changed, 209 insertions(+), 258 deletions(-) create mode 100644 published/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md delete mode 100644 translated/tech/RHCSA/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md diff --git a/published/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md b/published/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md new file mode 100644 index 0000000000..995aab93e1 --- /dev/null +++ b/published/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md @@ -0,0 +1,209 @@ +RHCSA 系列(四): 编辑文本文件及分析文本 +================================================================================ + +作为系统管理员的日常职责的一部分,每个系统管理员都必须处理文本文件,这包括编辑已有文件(大多可能是配置文件),或创建新的文件。有这样一个说法,假如你想在 Linux 世界中挑起一场圣战,你可以询问系统管理员们,什么是他们最喜爱的编辑器以及为什么。在这篇文章中,我们并不打算那样做,但我们将向你呈现一些技巧,这些技巧对使用两款在 RHEL 7 中最为常用的文本编辑器: nano(由于其简单和易用,特别是对于新手来说)和 vi/m(由于其自身的几个特色使得它不仅仅是一个简单的编辑器)来说都大有裨益。我确信你可以找到更多的理由来使用其中的一个或另一个,或许其他的一些编辑器如 emacs 或 pico。这完全取决于你自己。 + +![学习 Nano 和 vi 编辑器](http://www.tecmint.com/wp-content/uploads/2015/03/Learn-Nano-and-vi-Editors.png) + +*RHCSA: 使用 Nano 和 Vim 编辑文本文件 – Part 4* + +### 使用 Nano 编辑器来编辑文件 ### + +要启动 nano,你可以在命令提示符下输入 `nano`,或可选地跟上一个文件名(在这种情况下,若文件存在,它将在编辑模式中被打开)。若文件不存在,或我们省略了文件名, nano 也将在编辑模式下开启,但将为我们开启一个空白屏以便开始输入: + +![Nano 编辑器](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Editor.png) + +*Nano 编辑器* + +正如你在上一张图片中所见的那样, nano 在屏幕的底部呈现出一些可以通过指定的快捷键来触发的功能(\^,即插入记号,代指 Ctrl 键)。它们中的一些是: + +- Ctrl + G: 触发一个帮助菜单,带有一个关于功能和相应的描述的完整列表; + +![Nano 编辑器帮助菜单](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Help.png) + +*Nano 编辑器帮助菜单* + +- Ctrl + O: 保存更改到一个文件。它可以让你用一个与源文件相同或不同的名称来保存该文件,然后按 Enter 键来确认。 + +![Nano 编辑器保存更改模式](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Save-Changes.png) + +*Nano 编辑器的保存更改模式* + +- Ctrl + X: 离开当前文件,假如更改没有被保存,则它们将被丢弃; +- Ctrl + R: 通过指定一个完整的文件路径,让你选择一个文件来将该文件的内容插入到当前文件中; + +![Nano: 插入文件内容到主文件中](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-File-Content.png) + +*Nano: 插入文件内容到主文件中* + +上图的操作将把 `/etc/passwd` 的内容插入到当前文件中。 + +- Ctrl + K: 剪切当前行; +- Ctrl + U: 粘贴; +- Ctrl + C: 取消当前的操作并返回先前的屏幕; + +为了轻松地在打开的文件中浏览, nano 提供了下面的功能: + +- Ctrl + F 和 Ctrl + B 分别先前或向后移动光标;而 Ctrl + P 和 Ctrl + N 则分别向上或向下移动一行,功能与箭头键相同; +- Ctrl + space 和 Alt + space 分别向前或向后移动一个单词; + +最后, + +- 假如你想将光标移动到文档中的特定位置,使用 Ctrl + _ (下划线) 并接着输入 X,Y 将准确地带你到 第 X 行,第 Y 列。 + +![在 nano 中定位到具体的行,列](http://www.tecmint.com/wp-content/uploads/2015/03/Column-Numbers.png) + +*在 nano 中定位到具体的行和列* + +上面的例子将带你到当前文档的第 15 行,第 14 列。 + +假如你可以回忆起你早期的 Linux 岁月,特别是当你刚从 Windows 迁移到 Linux 中,你就可能会同意:对于一个新手来说,使用 nano 来开始学习是最好的方式。 + +### 使用 Vim 编辑器来编辑文件 ### + +Vim 是 vi 的加强版本,它是 Linux 中一个著名的文本编辑器,可在所有兼容 POSIX 的 *nix 系统中获取到,例如在 RHEL 7 中。假如你有机会并可以安装 Vim,请继续;假如不能,这篇文章中的大多数(若不是全部)的提示也应该可以正常工作。 + +Vim 的一个出众的特点是可以在多个不同的模式中进行操作: + +- 命令模式(Command Mode)将允许你在文件中跳转和输入命令,这些命令是由一个或多个字母组成的简洁且大小写敏感的组合。假如你想重复执行某个命令特定次数,你可以在这个命令前加上需要重复的次数(这个规则只有极少数例外)。例如, `yy`(或 `Y`,yank 的缩写)可以复制整个当前行,而 `4yy`(或 `4Y`)则复制整个从当前行到接下来的 3 行(总共 4 行)。 +- 我们总是可以通过敲击 `Esc` 键来进入命令模式(无论我们正工作在哪个模式下)。 +- 在末行模式(Ex Mode)中,你可以操作文件(包括保存当前文件和运行外部的程序或命令)。要进入末行模式,你必须从命令模式中(换言之,输入 `Esc` + `:`)输入一个冒号(`:`),再直接跟上你想使用的末行模式命令的名称。 +- 对于插入模式(Insert Mode),可以输入字母 `i` 进入,然后只需要输入文字即可。大多数的击键结果都将出现在屏幕中的文本中。 + +现在,让我们看看如何在 vim 中执行在上一节列举的针对 nano 的相同的操作。不要忘记敲击 Enter 键来确认 vim 命令。 + +为了从命令行中获取 vim 的完整手册,在命令模式下键入 `:help` 并敲击 Enter 键: + +![vim 编辑器帮助菜单](http://www.tecmint.com/wp-content/uploads/2015/03/vim-Help-Menu.png) + +*vim 编辑器帮助菜单* + +上面的部分呈现出一个内容列表,这些定义的小节则描述了 Vim 的特定话题。要浏览某一个小节,可以将光标放到它的上面,然后按 `Ctrl + ]` (闭方括号)。注意,底部的小节展示的是当前文件的内容。 + +1、 要保存更改到文件,在命令模式中运行下面命令中的任意一个,就可以达到这个目的: + +``` +:wq! +:x! +ZZ (是的,两个 ZZ,前面无需添加冒号) +``` + +2、 要离开并丢弃更改,使用 `:q!`。这个命令也将允许你离开上面描述过的帮助菜单,并返回到命令模式中的当前文件。 + +3、 剪切 N 行:在命令模式中键入 `Ndd`。 + +4、 复制 M 行:在命令模式中键入 `Myy`。 + +5、 粘贴先前剪贴或复制过的行:在命令模式中按 `P`键。 + +6、 要插入另一个文件的内容到当前文件: + + :r filename + +例如,插入 `/etc/fstab` 的内容,可以这样做: + +[在 vi 编辑器中插入文件的内容](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-Content-vi-Editor.png) + +*在 vi 编辑器中插入文件的内容* + +7、 插入一个命令的输出到当前文档: + + :r! command + +例如,要在光标所在的当前位置后面插入日期和时间: + +![在 vi 编辑器中插入时间和日期](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-Time-and-Date-in-vi-Editor.png) + +*在 vi 编辑器中插入时间和日期* + +在另一篇我写的文章中,([LFCS 系列(二)][1]),我更加详细地解释了在 vim 中可用的键盘快捷键和功能。或许你可以参考那个教程来查看如何使用这个强大的文本编辑器的更深入的例子。 + +### 使用 grep 和正则表达式来分析文本 ### + +到现在为止,你已经学习了如何使用 nano 或 vim 创建和编辑文件。打个比方说,假如你成为了一个文本编辑器忍者 – 那又怎样呢? 在其他事情上,你也需要知道如何在文本中搜索正则表达式。 + +正则表达式(也称为 "regex" 或 "regexp") 是一种识别一个特定文本字符串或模式的方式,使得一个程序可以将这个模式和任意的文本字符串相比较。尽管利用 grep 来使用正则表达式值得用一整篇文章来描述,这里就让我们复习一些基本的知识: + +**1、 最简单的正则表达式是一个由数字和字母构成的字符串(例如,单词 "svm") ,或者两个(在使用两个字符串时,你可以使用 `|`(或) 操作符):** + + # grep -Ei 'svm|vmx' /proc/cpuinfo + +上面命令的输出结果中若有这两个字符串之一的出现,则标志着你的处理器支持虚拟化: + +![正则表达式示例](http://www.tecmint.com/wp-content/uploads/2015/03/Regular-Expression-Example.png) + +*正则表达式示例* + +**2、 第二种正则表达式是一个范围列表,由方括号包裹。** + +例如, `c[aeiou]t` 匹配字符串 cat、cet、cit、cot 和 cut,而 `[a-z]` 和 `[0-9]` 则相应地匹配小写字母或十进制数字。假如你想重复正则表达式 X 次,在正则表达式的后面立即输入 `{X}`即可。 + +例如,让我们从 `/etc/fstab` 中析出存储设备的 UUID: + + # grep -Ei '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o /etc/fstab + +![在 Linux 中从一个文件中析出字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Extract-String-from-a-File.png) + +*从一个文件中析出字符串* + +方括号中的第一个表达式 `[0-9a-f]` 被用来表示小写的十六进制字符,`{8}`是一个量词,暗示前面匹配的字符串应该重复的次数(在一个 UUID 中的开头序列是一个 8 个字符长的十六进制字符串)。 + +在圆括号中,量词 `{4}`和连字符暗示下一个序列是一个 4 个字符长的十六进制字符串,接着的量词 `({3})`表示前面的表达式要重复 3 次。 + +最后,在 UUID 中的最后一个 12 个字符长的十六进制字符串可以由 `[0-9a-f]{12}` 取得, `-o` 选项表示只打印出在 `/etc/fstab`中匹配行中的匹配的(非空)部分。 + +**3、 POSIX 字符类** + +|字符类|匹配 …| +|-----|-----| +| `[:alnum:]` | 任意字母或数字 [a-zA-Z0-9] | +| `[:alpha:]` |任意字母 [a-zA-Z] | +| `[:blank:]` |空格或制表符 | +| `[:cntrl:]` |任意控制字符 (ASCII 码的 0 至 32) | +| `[:digit:]` |任意数字 [0-9] | +| `[:graph:]` |任意可见字符 | +| `[:lower:]` |任意小写字母 [a-z] | +| `[:print:]` |任意非控制字符 | +| `[:space:]` |任意空格 | +| `[:punct:]` |任意标点字符 | +| `[:upper:]` |任意大写字母 [A-Z] | +| `[:xdigit:]` |任意十六进制数字 [0-9a-fA-F] | +| `[:word:]` |任意字母,数字和下划线 [a-zA-Z0-9_] | + +例如,我们可能会对查找已添加到我们系统中给真实用户的 UID 和 GID(参考“[RHCSA 系列(二): 如何进行文件和目录管理][2]”来回忆起这些知识)感兴趣。那么,我们将在 `/etc/passwd` 文件中查找 4 个字符长的序列: + + # grep -Ei [[:digit:]]{4} /etc/passwd + +![在文件中查找一个字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Search-For-String-in-File.png) + +*在文件中查找一个字符串* + +上面的示例可能不是真实世界中使用正则表达式的最好案例,但它清晰地启发了我们如何使用 POSIX 字符类来使用 grep 分析文本。 + +### 总结 ### + + +在这篇文章中,我们已经提供了一些技巧来最大地利用针对命令行用户的两个文本编辑器 nano 和 vim,这两个工具都有相关的扩展文档可供阅读,你可以分别查询它们的官方网站(链接在下面给出)以及使用“[RHCSA 系列(一): 回顾基础命令及系统文档][3]”中给出的建议。 + +#### 参考文件链接 #### + +- [http://www.nano-editor.org/][4] +- [http://www.vim.org/][5] + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-how-to-use-nano-vi-editors/ + +作者:[Gabriel Cánepa][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[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/vi-editor-usage/ +[2]:https://linux.cn/article-6155-1.html +[3]:https://linux.cn/article-6133-1-rel.html +[4]:http://www.nano-editor.org/ +[5]:http://www.vim.org/ +[6]:http://www.tecmint.com/vi-editor-usage/ \ No newline at end of file diff --git a/translated/tech/RHCSA/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md b/translated/tech/RHCSA/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md deleted file mode 100644 index 8438ec0351..0000000000 --- a/translated/tech/RHCSA/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md +++ /dev/null @@ -1,258 +0,0 @@ -RHCSA 系列:使用 Nano 和 Vim 编辑文本文件/使用 grep 和 regexps 分析文本 – Part 4 -================================================================================ -作为系统管理员的日常职责的一部分,每个系统管理员都必须处理文本文件,这包括编辑现存文件(大多可能是配置文件),或创建新的文件。有这样一个说法,假如你想在 Linux 世界中挑起一场圣战,你可以询问系统管理员们,什么是他们最喜爱的编辑器以及为什么。在这篇文章中,我们并不打算那样做,但我们将向你呈现一些技巧,这些技巧对使用两款在 RHEL 7 中最为常用的文本编辑器: nano(由于其简单和易用,特别是对于新手来说) 和 vi/m(由于其自身的几个特色使得它不仅仅是一个简单的编辑器)来说都大有裨益。我确信你可以找到更多的理由来使用其中的一个或另一个,或许其他的一些编辑器如 emacs 或 pico。这完全取决于你。 - -![学习 Nano 和 vi 编辑器](http://www.tecmint.com/wp-content/uploads/2015/03/Learn-Nano-and-vi-Editors.png) - -RHCSA: 使用 Nano 和 Vim 编辑文本文件 – Part 4 - -### 使用 Nano 编辑器来编辑文件 ### - -要启动 nano,你可以在命令提示符下输入 `nano`,或选择性地跟上一个文件名(在这种情况下,若文件存在,它将在编辑模式中被打开)。若文件不存在,或我们省略了文件名, nano 也将在 编辑模式下开启,但将为我们开启一个空白屏以便开始输入: - -![Nano 编辑器](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Editor.png) - -Nano 编辑器 - -正如你在上一张图片中所见的那样, nano 在屏幕的底部呈现出一些功能,它们可以通过暗指的快捷键来触发(^,即插入记号,代指 Ctrl 键)。它们中的一些是: - -- Ctrl + G: 触发一个帮助菜单,带有一个关于功能和相应的描述的完整列表; -- Ctrl + X: 离开当前文件,假如更改没有被保存,则它们将被丢弃; -- Ctrl + R: 通过指定一个完整的文件路径,让你选择一个文件来将该文件的内容插入到当前文件中; - -![Nano 编辑器帮助菜单](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Help.png) - -Nano 编辑器帮助菜单 - -- Ctrl + O: 保存更改到一个文件。它将让你用一个与源文件相同或不同的名称来保存该文件,然后按 Enter 键来确认。 - -![Nano 编辑器保存更改模式](http://www.tecmint.com/wp-content/uploads/2015/03/Nano-Save-Changes.png) - -Nano 编辑器的保存更改模式 - -- Ctrl + X: 离开当前文件,假如更改没有被保存,则它们将被丢弃; -- Ctrl + R: 通过指定一个完整的文件路径,让你选择一个文件来将该文件的内容插入到当前文件中; - -![Nano: 插入文件内容到主文件中](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-File-Content.png) - -Nano: 插入文件内容到主文件中 - -上图的操作将把 `/etc/passwd` 的内容插入到当前文件中。 - -- Ctrl + K: 剪切当前行; -- Ctrl + U: 粘贴; -- Ctrl + C: 取消当前的操作并返回先前的屏幕; - -为了轻松地在打开的文件中浏览, nano 提供了下面的功能: - -- Ctrl + F 和 Ctrl + B 分别先前或向后移动光标;而 Ctrl + P 和 Ctrl + N 则分别向上或向下移动一行,功能与箭头键相同; -- Ctrl + space 和 Alt + space 分别向前或向后移动一个单词; - -最后, - -- 假如你想将光标移动到文档中的特定位置,使用 Ctrl + _ (下划线) 并接着输入 X,Y 将准确地带你到 第 X 行,第 Y 列。 - -![在 nano 中定位到具体的行,列](http://www.tecmint.com/wp-content/uploads/2015/03/Column-Numbers.png) - -在 nano 中定位到具体的行和列 - -上面的例子将带你到当前文档的第 15 行,第 14 列。 - -假如你可以回忆起你早期的 Linux 岁月,特别是当你刚从 Windows 迁移到 Linux 中,你就可能会同意:对于一个新手来说,使用 nano 来开始学习是最好的方式。 - -### 使用 Vim 编辑器来编辑文件 ### - - -Vim 是 vi 的加强版本,它是 Linux 中一个著名的文本编辑器,可在所有兼容 POSIX 的 *nix 系统中获取到,例如在 RHEL 7 中。假如你有机会并可以安装 Vim,请继续;假如不能,这篇文章中的大多数(若不是全部)的提示也应该可以正常工作。 - -Vim 的一个出众的特点是可以在多个不同的模式中进行操作: - -- 命令模式将允许你在文件中跳转和输入命令,这些命令是由一个或多个字母组成的简洁且对大小写敏感的组合。假如你想重复执行某个命令特定次,你可以在这个命令前加上需要重复的次数(这个规则只有极少数例外)。例如, yy(或 Y,yank 的缩写)可以复制整个当前行,而 4yy(或 4Y)则复制整个当前行到接着的 3 行(总共 4 行)。 -- 在 ex 模式中,你可以操作文件(包括保存当前文件和运行外部的程序或命令)。要进入 ex 模式,你必须在命令模式前(或其他词前,Esc + :)输入一个冒号(:),再直接跟上你想使用的 ex 模式命令的名称。 -- 对于插入模式,可以输入字母 i 进入,我们只需要输入文字即可。大多数的键击结果都将出现在屏幕中的文本中。 -- 我们总是可以通过敲击 Esc 键来进入命令模式(无论我们正工作在哪个模式下)。 - -现在,让我们看看如何在 vim 中执行在上一节列举的针对 nano 的相同的操作。不要忘记敲击 Enter 键来确认 vim 命令。 - -为了从命令行中获取 vim 的完整手册,在命令模式下键入 `:help` 并敲击 Enter 键: - -![vim 编辑器帮助菜单](http://www.tecmint.com/wp-content/uploads/2015/03/vim-Help-Menu.png) - -vim 编辑器帮助菜单 - -上面的小节呈现出一个目录列表,而定义过的小节则主要关注 Vim 的特定话题。要浏览某一个小节,可以将光标放到它的上面,然后按 Ctrl + ] (闭方括号)。注意,底部的小节展示的是当前文件的内容。 - -1. 要保存更改到文件,在命令模式中运行下面命令中的任意一个,就可以达到这个目的: - -``` -:wq! -:x! -ZZ (是的,两个 ZZ,前面无需添加冒号) -``` - -2. 要离开并丢弃更改,使用 `:q!`。这个命令也将允许你离开上面描述过的帮助菜单,并返回到命令模式中的当前文件。 - -3. 剪切 N 行:在命令模式中键入 `Ndd`。 - -4. 复制 M 行:在命令模式中键入 `Myy`。 - -5. 粘贴先前剪贴或复制过的行:在命令模式中按 `P`键。 - -6. 要插入另一个文件的内容到当前文件: - - :r filename - -例如,插入 `/etc/fstab` 的内容,可以这样做: - -[在 vi 编辑器中插入文件的内容](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-Content-vi-Editor.png) - -在 vi 编辑器中插入文件的内容 - -7. 插入一个命名的输出到当前文档: - - :r! command - -例如,要在光标所在的当前位置后面插入日期和时间: - -![在 vi 编辑器中插入时间和日期](http://www.tecmint.com/wp-content/uploads/2015/03/Insert-Time-and-Date-in-vi-Editor.png) - -在 vi 编辑器中插入时间和日期 - -在另一篇我写的文章中,([LFCS 系列的 Part 2][1]),我更加详细地解释了在 vim 中可用的键盘快捷键和功能。或许你可以参考那个教程来查看如何使用这个强大的文本编辑器的更深入的例子。 - -### 使用 Grep 和正则表达式来分析文本 ### - -到现在为止,你已经学习了如何使用 nano 或 vim 创建和编辑文件。打个比方说,假如你成为了一个文本编辑器忍者 – 那又怎样呢? 在其他事情上,你也需要知道如何在文本中搜索正则表达式。 - -正则表达式(也称为 "regex" 或 "regexp") 是一种识别一个特定文本字符串或模式的方式,使得一个程序可以将这个模式和任意的文本字符串相比较。尽管利用 grep 来使用正则表达式值得用一整篇文章来描述,这里就让我们复习一些基本的知识: - -**1. 最简单的正则表达式是一个由数字和字母构成的字符串(即,单词 "svm") 或两个(在使用两个字符串时,你可以使用 `|`(或) 操作符):** - - # grep -Ei 'svm|vmx' /proc/cpuinfo - -上面命令的输出结果中若有这两个字符串之一的出现,则标志着你的处理器支持虚拟化: - -![正则表达式示例](http://www.tecmint.com/wp-content/uploads/2015/03/Regular-Expression-Example.png) - -正则表达式示例 - -**2. 第二种正则表达式是一个范围列表,由方括号包裹。** - -例如, `c[aeiou]t` 匹配字符串 cat,cet,cit,cot 和 cut,而 `[a-z]` 和 `[0-9]` 则相应地匹配小写字母或十进制数字。假如你想重复正则表达式 X 次,在正则表达式的后面立即输入 `{X}`即可。 - -例如,让我们从 `/etc/fstab` 中析出存储设备的 UUID: - - # grep -Ei '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' -o /etc/fstab - -![在 Linux 中从一个文件中析出字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Extract-String-from-a-File.png) - -从一个文件中析出字符串 - -方括号中的第一个表达式 `[0-9a-f]` 被用来表示小写的十六进制字符,`{8}`是一个量词,暗示前面匹配的字符串应该重复的次数(在一个 UUID 中的开头序列是一个 8 个字符长的十六进制字符串)。 - -在圆括号中,量词 `{4}`和连字符暗示下一个序列是一个 4 个字符长的十六进制字符串,接着的量词 `({3})`表示前面的表达式要重复 3 次。 - -最后,在 UUID 中的最后一个 12 个字符长的十六进制字符串可以由 `[0-9a-f]{12}` 取得, `-o` 选项表示只打印出在 `/etc/fstab`中匹配行中的匹配的(非空)部分。 - -**3. POSIX 字符类 ** - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
字符类匹配 …
 [[:alnum:]] 任意字母或数字 [a-zA-Z0-9]
 [[:alpha:]] 任意字母 [a-zA-Z]
 [[:blank:]] 空格或制表符
 [[:cntrl:]] 任意控制字符 (ASCII 码的 0 至 32)
 [[:digit:]] 任意数字 [0-9]
 [[:graph:]] 任意可见字符
 [[:lower:]] 任意小写字母 [a-z]
 [[:print:]] 任意非控制字符 -
 [[:space:]] 任意空格
 [[:punct:]] 任意标点字符
 [[:upper:]] 任意大写字母 [A-Z]
 [[:xdigit:]] 任意十六进制数字 [0-9a-fA-F]
 [:word:] 任意字母,数字和下划线 [a-zA-Z0-9_]
- -例如,我们可能会对查找已添加到我们系统中给真实用户的 UID 和 GID(参考这个系列的 [Part 2][2]来回忆起这些知识)感兴趣。那么,我们将在 `/etc/passwd` 文件中查找 4 个字符长的序列: - - # grep -Ei [[:digit:]]{4} /etc/passwd - -![在文件中查找一个字符串](http://www.tecmint.com/wp-content/uploads/2015/03/Search-For-String-in-File.png) - -在文件中查找一个字符串 - -上面的示例可能不是真实世界中使用正则表达式的最好案例,但它清晰地启发了我们如何使用 POSIX 字符类来使用 grep 分析文本。 - -### 总结 ### - - -在这篇文章中,我们已经提供了一些技巧来最大地利用针对命令行用户的两个文本编辑器 nano 和 vim,这两个工具都有相关的扩展文档可供阅读,你可以分别查询它们的官方网站(链接在下面给出)以及使用这个系列中的 [Part 1][3] 给出的建议。 - -#### 参考文件链接 #### - -- [http://www.nano-editor.org/][4] -- [http://www.vim.org/][5] - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-exam-how-to-use-nano-vi-editors/ - -作者:[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/vi-editor-usage/ -[2]:http://www.tecmint.com/file-and-directory-management-in-linux/ -[3]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ -[4]:http://www.nano-editor.org/ -[5]:http://www.vim.org/ From b7a1830262a2ff7f7aa29b579aa76a46a65e49bc Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 15 Sep 2015 23:33:49 +0800 Subject: [PATCH 2080/2517] PUB:20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu @strugglingyouth --- ....9.0 Winamp-like Audio Player in Ubuntu.md | 33 ++++++++----------- 1 file changed, 13 insertions(+), 20 deletions(-) rename {translated/tech => published}/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md (58%) diff --git a/translated/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md b/published/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md similarity index 58% rename from translated/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md rename to published/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md index ac07a04b85..1b5ca2ce43 100644 --- a/translated/tech/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md +++ b/published/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md @@ -1,40 +1,33 @@ -在 Ubuntu 上安装 Qmmp 0.9.0 类似 Winamp 的音频播放器 +在 Ubuntu 上安装类 Winamp 的音频播放器 Qmmp 0.9.0 ================================================================================ ![](http://ubuntuhandbook.org/wp-content/uploads/2015/01/qmmp-icon-simple.png) -Qmmp,基于 Qt 的音频播放器,与 Winamp 或 xmms 的用户界面类似,现在最新版本是0.9.0。PPA 已经在 Ubuntu 15.10,Ubuntu 15.04,Ubuntu 14.04,Ubuntu 12.04 和其衍生物中已经更新了。 +Qmmp,一个基于 Qt 的音频播放器,与 Winamp 或 xmms 的用户界面类似,现在最新版本是0.9.0。PPA 已经在 Ubuntu 15.10,Ubuntu 15.04,Ubuntu 14.04,Ubuntu 12.04 和其衍生版本中已经更新了。 Qmmp 0.9.0 是一个较大的版本,有许多新的功能,有许多改进和新的转变。它添加了如下功能: - 音频-信道序列转换器; - 9通道支持均衡器; -- 艺术家专辑标签支持; +- 支持艺术家专辑标签; - 异步排序; -- 通过文件的修改日期排​​序; -- 按艺术家专辑排序; -- 支持多专栏; -- 有隐藏踪迹长度功能; - 不用修改 qmmp.pri 来禁用插件(仅在 qmake 中)功能 - 记住播放列表滚动位置功能; -- 排除提示数据文件功能; +- 排除 cue 数据文件功能; - 更改用户代理功能; - 改变窗口标题功能; -- 复位字体功能; -- 恢复默认快捷键功能; -- 默认热键为“Rename List”功能; -- 功能禁用弹出的 GME 插件; -- 简单的用户界面(QSUI)有以下变化: - - 增加了多列表的支持; +- 禁用 gme 插件淡出的功能; +- 简单用户界面(QSUI)有以下变化: + - 增加了多列的支持; - 增加了按艺术家专辑排序; - 增加了按文件的修改日期进行排序; - 增加了隐藏歌曲长度功能; - - 增加了默认热键为“Rename List”; + - 增加了“Rename List”的默认热键; - 增加了“Save List”功能到标签菜单; - 增加了复位字体功能; - 增加了复位快捷键功能; - 改进了状态栏; -它还改进了播放列表的通知,播放列表容器,采样率转换器,cmake 构建脚本,标题格式,在 mpeg 插件中支持 ape 标签,fileops 插件,降低了 cpu 占用率,改变默认的皮肤(炫光)和分离播放列表。 +它还改进了播放列表的改变通知,播放列表容器,采样率转换器,cmake 构建脚本,标题格式化,在 mpeg 插件中支持 ape 标签,fileops 插件,降低了 cpu 占用率,改变默认的皮肤(炫光)和分离的播放列表。 ![qmmp-090](http://ubuntuhandbook.org/wp-content/uploads/2015/09/qmmp-090.jpg) @@ -42,7 +35,7 @@ Qmmp 0.9.0 是一个较大的版本,有许多新的功能,有许多改进和 新版本已经制做了 PPA,适用于目前所有 Ubuntu 发行版和衍生版。 -1. 添加 [Qmmp PPA][1]. +1、 添加 [Qmmp PPA][1]. 从 Dash 中打开终端并启动应用,通过按 Ctrl+Alt+T 快捷键。当它打开时,运行命令: @@ -50,7 +43,7 @@ Qmmp 0.9.0 是一个较大的版本,有许多新的功能,有许多改进和 ![qmmp-ppa](http://ubuntuhandbook.org/wp-content/uploads/2015/09/qmmp-ppa.jpg) -2. 在添加 PPA 后,通过更新软件来升级 Qmmp 播放器。刷新系统缓存,并通过以下命令安装软件: +2、 在添加 PPA 后,通过更新软件来升级 Qmmp 播放器。刷新系统缓存,并通过以下命令安装软件: sudo apt-get update @@ -63,8 +56,8 @@ Qmmp 0.9.0 是一个较大的版本,有许多新的功能,有许多改进和 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) +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 733781b3c63a0b1fb218a497c09e91a6ba91ab92 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Wed, 16 Sep 2015 11:18:02 +0800 Subject: [PATCH 2081/2517] Create 20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md --- ...OS Runs 42 Percent of Dell PCs in China.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md diff --git a/sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md b/sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md new file mode 100644 index 0000000000..7368a21b70 --- /dev/null +++ b/sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md @@ -0,0 +1,41 @@ +Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China +================================================================================ +> Dell says that 42 percent of the PCs it sells in the Chinese market run Kylin, an open source operating system based on Ubuntu Linux that Canonical helped to create. + + Open source fans, rejoice: The Year of the Linux Desktop has arrived. Or something close to it is on the horizon in China, at least, where [Dell][1] has reported that more than 40 percent of the PCs it sells run a variant of [Ubuntu Linux][2] that [Canonical][3] helped develop. + + Specifically, Dell said that 42 percent of computers in China run NeoKylin, an operating system that originated as an effort in China to build a home-grown alternative to [Microsoft][4] (MSFT) Windows. Also known simply Kylin, the OS has been based on Ubuntu since 2013, when Canonical began collaborating with the Chinese government to create an Ubuntu variant tailored for the Chinese market. + + Earlier versions of Kylin, which has been around since 2001, were based on other operating systems, including FreeBSD, an open source Unix-like operating system that is distinct from Linux. + + Ubuntu Kylin looks and feels a lot like modern versions of Ubuntu proper. It sports the [Unity][5] interface and runs the standard suite of open source apps, as well as specialized ones such as Youker Assistant, a graphical front end that helps users manage basic computing tasks. Kylin's default theme makes it look just a little more like Windows than stock Ubuntu, however. + + Given the relative stagnation of the market for desktop Linux PCs in most of the world, Dell's announcement is striking. And in light of China's [hostility][6] toward modern editions of Windows, the news does not bode well for Microsoft's prospects in the Chinese market. + + Dell's comment on Linux PC sales in China—which appeared in the form of a statement by an executive to the Wall Street Journal—comes on the heels of the company's [announcement][7] of $125 million of new investment in China. + ![Ubuntu Kylin](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/09/hey_2.png) + + + + + + + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/091515/ubuntu-linux-based-open-source-os-runs-42-percent-dell-pc + +作者:[Christopher Tozzi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:http://dell.com/ +[2]:http://ubuntu.com/ +[3]:http://canonical.com/ +[4]:http://microsoft.com/ +[5]:http://unity.ubuntu.com/ +[6]:http://www.wsj.com/articles/windows-8-faces-new-criticism-in-china-1401882772 +[7]:http://thevarguy.com/business-technology-solution-sales/091415/dell-125-million-directed-china-jobs-new-business-and-innovation From 266b05d0214a90e5ed03bc5023b0ccd44bce4c6a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 16 Sep 2015 16:25:27 +0800 Subject: [PATCH 2082/2517] =?UTF-8?q?20150916-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...able Automatic System Updates In Ubuntu.md | 48 +++++++++++ ... which CPU core a process is running on.md | 81 +++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md create mode 100644 sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md diff --git a/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md b/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md new file mode 100644 index 0000000000..40397f2c42 --- /dev/null +++ b/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md @@ -0,0 +1,48 @@ +Enable Automatic System Updates In Ubuntu +================================================================================ +Before seeing **how to enable automatic system updates in Ubuntu**, first let’s see why should we do it in the first place. + +By default Ubuntu checks for updates daily. When there are security updates, it shows immediately but for other updates (i.e. regular software updates) it pop ups once a week. So, if you have been using Ubuntu for a while, this may be a familiar sight for you: + +![Software Update notification in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu.png) + +Now if you are a normal desktop user, you don’t really care about what kind of updates are these. And this is not entirely a bad thing. You trust Ubuntu to provide you good updates, right? So, you just select ‘Install Now’ most of the time, don’t you? + +And all you do is to click on Install Now, why not enable the automatic system updates? Enabling automatic system updates means all the latest updates will be automatically downloaded and installed without requiring any actions from you. Isn’t it convenient? + +### Enable automatic updates in Ubuntu ### + +I am using Ubuntu 15.04 in this tutorial but the steps are the same for Ubuntu 14.04 as well. + +Go to Unity Dash and look for Software & Updates: + +![Ubuntu Software Update Settings](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Software_Update_Ubuntu.jpeg) + +This will open the Software sources settings for you. Click on Updates tab here: + +![Software Updates settings in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu-1.png) + +In here, you’ll see the default settings which is daily check for updates and immediate notification for security updates. + +![Changing software update frequency](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu-2.png) + +All you need to do is to change the action which reads “When there are” to “Download and install automatically”. This will download all the available updates and install them automatically. + +![Automatic updates in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu-3.png) + +That’s it. Close it and you have automatic updates enabled in Ubuntu. In fact this tutorial is pretty similar to [changing update notification frequency in Ubuntu][1]. + +Do you use automatic updates installation or you prefer to install them manually? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/automatic-system-updates-ubuntu/ + +作者:[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://itsfoss.com/ubuntu-notify-updates-frequently/ \ No newline at end of file diff --git a/sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md b/sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md new file mode 100644 index 0000000000..3553f2b14e --- /dev/null +++ b/sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md @@ -0,0 +1,81 @@ +Linux FAQs with Answers--How to find out which CPU core a process is running on +================================================================================ +> Question: I have a Linux process running on my multi-core processor system. How can I find out which CPU core the process is running on? + +When you run performance-critical HPC applications or network-heavy workload on [multi-core NUMA processors][1], CPU/memory affinity is one important factor to consider to maximize their performance. Scheduling closely related processes on the same NUMA node can reduce slow remote memory access. On processors like Intel's Sandy Bridge processor which has an integrated PCIe controller, you want to schedule network I/O workload on the same NUMA node as the NIC card to exploit PCI-to-CPU affinity. + +As part of performance tuning or troubleshooting, you may want to know on which CPU core (or NUMA node) a particular process is currently scheduled. + +Here are several ways to **find out which CPU core is a given Linux process or a thread is scheduled on**. + +### Method One ### + +If a process is explicitly pinned to a particular CPU core using commands like [taskset][2], you can find out the pinned CPU using the following taskset command: + + $ taskset -c -p + +For example, if the process you are interested in has PID 5357: + + $ taskset -c -p 5357 + +---------- + + pid 5357's current affinity list: 5 + +The output says the process is pinned to CPU core 5. + +However, if you haven't explicitly pinned the process to any CPU core, you will get something like the following as the affinity list. + + pid 5357's current affinity list: 0-11 + +The output indicates that the process can potentially be scheduled on any CPU core from 0 to 11. So in this case, taskset is not useful in identifying which CPU core the process is currently assigned to, and you should use other methods as described below. + +### Method Two ### + +The ps command can tell you the CPU ID each process/thread is currently assigned to (under "PSR" column). + + $ ps -o pid,psr,comm -p + +---------- + + PID PSR COMMAND + 5357 10 prog + +The output says the process with PID 5357 (named "prog") is currently running on CPU core 10. If the process is not pinned, the PSR column can keep changing over time depending on where the kernel scheduler assigns the process. + +### Method Three ### + +The top command can also show the CPU assigned to a given process. First, launch top command with "p" option. Then press 'f' key, and add "Last used CPU" column to the display. The currently used CPU core will appear under "P" (or "PSR") column. + + $ top -p 5357 + +![](https://farm6.staticflickr.com/5698/21429268426_e7d1d73a04_c.jpg) + +Compared to ps command, the advantage of using top command is that you can continuously monitor how the assigned CPU changes over time. + +### Method Four ### + +Yet another method to check the currently used CPU of a process/thread is to use [htop command][3]. + +Launch htop from the command line. Press key, go to "Columns", and add PROCESSOR under "Available Columns". + +The currently used CPU ID of each process will appear under "CPU" column. + +![](https://farm6.staticflickr.com/5788/21444522832_a5a206f600_c.jpg) + +Note that all previous commands taskset, ps and top assign CPU core IDs 0, 1, 2, ..., N-1. However, htop assigns CPU core IDs starting from 1 (upto N). + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/cpu-core-process-is-running.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://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/identify-cpu-processor-architecture-linux.html +[2]:http://xmodulo.com/run-program-process-specific-cpu-cores-linux.html +[3]:http://ask.xmodulo.com/install-htop-centos-rhel.html \ No newline at end of file From 899c717a60c22c98c5a8ff97d5920a0bafd906c2 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 16 Sep 2015 16:35:12 +0800 Subject: [PATCH 2083/2517] =?UTF-8?q?20150916-2=20=E9=80=89=E9=A2=98=20RHC?= =?UTF-8?q?E=20=E4=B8=93=E9=A2=98=20=E7=AC=AC=E5=85=AB=E7=AF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Network Security Service NSS for Apache.md | 211 ++++++++++++++++++ 1 file changed, 211 insertions(+) create mode 100644 sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md diff --git a/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md b/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md new file mode 100644 index 0000000000..317b2b3292 --- /dev/null +++ b/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md @@ -0,0 +1,211 @@ +RHCE Series: Implementing HTTPS through TLS using Network Security Service (NSS) for Apache +================================================================================ +If you are a system administrator who is in charge of maintaining and securing a web server, you can’t afford to not devote your very best efforts to ensure that data served by or going through your server is protected at all times. + +![Setup Apache HTTPS Using SSL/TLS](http://www.tecmint.com/wp-content/uploads/2015/09/Setup-Apache-SSL-TLS-Server.png) + +RHCE Series: Implementing HTTPS through TLS using Network Security Service (NSS) for Apache – Part 8 + +In order to provide more secure communications between web clients and servers, the HTTPS protocol was born as a combination of HTTP and SSL (Secure Sockets Layer) or more recently, TLS (Transport Layer Security). + +Due to some serious security breaches, SSL has been deprecated in favor of the more robust TLS. For that reason, in this article we will explain how to secure connections between your web server and clients using TLS. + +This tutorial assumes that you have already installed and configured your Apache web server. If not, please refer to following article in this site before proceeding further. + +- [Install LAMP (Linux, MySQL/MariaDB, Apache and PHP) on RHEL/CentOS 7][1] + +### Installation of OpenSSL and Utilities ### + +First off, make sure that Apache is running and that both http and https are allowed through the firewall: + + # systemctl start http + # systemctl enable http + # firewall-cmd --permanent –-add-service=http + # firewall-cmd --permanent –-add-service=https + +Then install the necessary packages: + + # yum update && yum install openssl mod_nss crypto-utils + +**Important**: Please note that you can replace mod_nss with mod_ssl in the command above if you want to use OpenSSL libraries instead of NSS (Network Security Service) to implement TLS (which one to use is left entirely up to you, but we will use NSS in this article as it is more robust; for example, it supports recent cryptography standards such as PKCS #11). + +Finally, uninstall mod_ssl if you chose to use mod_nss, or viceversa. + + # yum remove mod_ssl + +### Configuring NSS (Network Security Service) ### + +After mod_nss is installed, its default configuration file is created as /etc/httpd/conf.d/nss.conf. You should then make sure that all of the Listen and VirtualHost directives point to port 443 (default port for HTTPS): + +nss.conf – Configuration File + +---------- + + Listen 443 + VirtualHost _default_:443 + +Then restart Apache and check whether the mod_nss module has been loaded: + + # apachectl restart + # httpd -M | grep nss + +![Check Mod_NSS Module in Apache](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Mod_NSS-Module-in-Apache.png) + +Check Mod_NSS Module Loaded in Apache + +Next, the following edits should be made in `/etc/httpd/conf.d/nss.conf` configuration file: + +1. Indicate NSS database directory. You can use the default directory or create a new one. In this tutorial we will use the default: + + NSSCertificateDatabase /etc/httpd/alias + +2. Avoid manual passphrase entry on each system start by saving the password to the database directory in /etc/httpd/nss-db-password.conf: + + NSSPassPhraseDialog file:/etc/httpd/nss-db-password.conf + +Where /etc/httpd/nss-db-password.conf contains ONLY the following line and mypassword is the password that you will set later for the NSS database: + + internal:mypassword + +In addition, its permissions and ownership should be set to 0640 and root:apache, respectively: + + # chmod 640 /etc/httpd/nss-db-password.conf + # chgrp apache /etc/httpd/nss-db-password.conf + +3. Red Hat recommends disabling SSL and all versions of TLS previous to TLSv1.0 due to the POODLE SSLv3 vulnerability (more information [here][2]). + +Make sure that every instance of the NSSProtocol directive reads as follows (you are likely to find only one if you are not hosting other virtual hosts): + + NSSProtocol TLSv1.0,TLSv1.1 + +4. Apache will refuse to restart as this is a self-signed certificate and will not recognize the issuer as valid. For this reason, in this particular case you will have to add: + + NSSEnforceValidCerts off + +5. Though not strictly required, it is important to set a password for the NSS database: + + # certutil -W -d /etc/httpd/alias + +![Set Password for NSS Database](http://www.tecmint.com/wp-content/uploads/2015/09/Set-Password-for-NSS-Database.png) + +Set Password for NSS Database + +### Creating a Apache SSL Self-Signed Certificate ### + +Next, we will create a self-signed certificate that will identify the server to our clients (please note that this method is not the best option for production environments; for such use you may want to consider buying a certificate verified by a 3rd trusted certificate authority, such as DigiCert). + +To create a new NSS-compliant certificate for box1 which will be valid for 365 days, we will use the genkey command. When this process completes: + + # genkey --nss --days 365 box1 + +Choose Next: + +![Create Apache SSL Key](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Apache-SSL-Key.png) + +Create Apache SSL Key + +You can leave the default choice for the key size (2048), then choose Next again: + +![Select Apache SSL Key Size](http://www.tecmint.com/wp-content/uploads/2015/09/Select-Apache-SSL-Key-Size.png) + +Select Apache SSL Key Size + +Wait while the system generates random bits: + +![Generating Random Key Bits](http://www.tecmint.com/wp-content/uploads/2015/09/Generating-Random-Bits.png) + +Generating Random Key Bits + +To speed up the process, you will be prompted to enter random text in your console, as shown in the following screencast. Please note how the progress bar stops when no input from the keyboard is received. Then, you will be asked to: + +1. Whether to send the Certificate Sign Request (CSR) to a Certificate Authority (CA): Choose No, as this is a self-signed certificate. + +2. to enter the information for the certificate. + +注:youtube 视频 + + +Finally, you will be prompted to enter the password to the NSS certificate that you set earlier: + + # genkey --nss --days 365 box1 + +![Apache NSS Certificate Password](http://www.tecmint.com/wp-content/uploads/2015/09/Apache-NSS-Password.png) + +Apache NSS Certificate Password + +At anytime, you can list the existing certificates with: + + # certutil –L –d /etc/httpd/alias + +![List Apache NSS Certificates](http://www.tecmint.com/wp-content/uploads/2015/09/List-Apache-Certificates.png) + +List Apache NSS Certificates + +And delete them by name (only if strictly required, replacing box1 by your own certificate name) with: + + # certutil -d /etc/httpd/alias -D -n "box1" + +if you need to.c + +### Testing Apache SSL HTTPS Connections ### + +Finally, it’s time to test the secure connection to our web server. When you point your browser to https://, you will get the well-known message “This connection is untrusted“: + +![Check Apache SSL Connection](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Apache-SSL-Connection.png) + +Check Apache SSL Connection + +In the above situation, you can click on Add Exception and then Confirm Security Exception – but don’t do it yet. Let’s first examine the certificate to see if its details match the information that we entered earlier (as shown in the screencast). + +To do so, click on View… –> Details tab above and you should see this when you select Issuer from the list: + +![Confirm Apache SSL Certificate Details](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Apache-SSL-Certificate-Details.png) + +Confirm Apache SSL Certificate Details + +Now you can go ahead, confirm the exception (either for this time or permanently) and you will be taken to your web server’s DocumentRoot directory via https, where you can inspect the connection details using your browser’s builtin developer tools: + +In Firefox you can launch it by right clicking on the screen, and choosing Inspect Element from the context menu, specifically through the Network tab: + +![Inspect Apache HTTPS Connection](http://www.tecmint.com/wp-content/uploads/2015/09/Inspect-Apache-HTTPS-Connection.png) + +Inspect Apache HTTPS Connection + +Please note that this is the same information as displayed before, which was entered during the certificate previously. There’s also a way to test the connection using command line tools: + +On the left (testing SSLv3): + + # openssl s_client -connect localhost:443 -ssl3 + +On the right (testing TLS): + + # openssl s_client -connect localhost:443 -tls1 + +![Testing Apache SSL and TLS Connections](http://www.tecmint.com/wp-content/uploads/2015/09/Testing-Apache-SSL-and-TLS.png) + +Testing Apache SSL and TLS Connections + +Refer to the screenshot above for more details. + +### Summary ### + +As I’m sure you already know, the presence of HTTPS inspires trust in visitors who may have to enter personal information in your site (from user names and passwords all the way to financial / bank account information). + +In that case, you will want to get a certificate signed by a trusted Certificate Authority as we explained earlier (the steps to set it up are identical with the exception that you will need to send the CSR to a CA, and you will get the signed certificate back); otherwise, a self-signed certificate as the one used in this tutorial will do. + +For more details on the use of NSS, please refer to the online help about [mod-nss][3]. And don’t hesitate to let us know if you have any questions or comments. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-apache-https-self-signed-certificate-using-nss/ + +作者:[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/install-lamp-in-centos-7/ +[1]:http://www.tecmint.com/author/gacanepa/ +[2]:https://access.redhat.com/articles/1232123 +[3]:https://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html \ No newline at end of file From a9803952cf4c393a250de14573c4f7a4a74a144a Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 16 Sep 2015 19:31:21 +0800 Subject: [PATCH 2084/2517] Update 20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md --- ...--How to find out which CPU core a process is running on.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md b/sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md index 3553f2b14e..ff305ad5ce 100644 --- a/sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md +++ b/sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Linux FAQs with Answers--How to find out which CPU core a process is running on ================================================================================ > Question: I have a Linux process running on my multi-core processor system. How can I find out which CPU core the process is running on? @@ -78,4 +79,4 @@ via: http://ask.xmodulo.com/cpu-core-process-is-running.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://xmodulo.com/identify-cpu-processor-architecture-linux.html [2]:http://xmodulo.com/run-program-process-specific-cpu-cores-linux.html -[3]:http://ask.xmodulo.com/install-htop-centos-rhel.html \ No newline at end of file +[3]:http://ask.xmodulo.com/install-htop-centos-rhel.html From 0d8e39f4d283be219171823666f10b98e1fbe952 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Wed, 16 Sep 2015 22:54:18 +0800 Subject: [PATCH 2085/2517] Translating tech/20140320 Best command line tools for linux performance monitoring.md tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md --- ...0 Best command line tools for linux performance monitoring.md | 1 + ... through TLS using Network Security Service NSS for Apache.md | 1 + 2 files changed, 2 insertions(+) diff --git a/sources/tech/20140320 Best command line tools for linux performance monitoring.md b/sources/tech/20140320 Best command line tools for linux performance monitoring.md index 6b0ed1ebc4..a9fa3cc8bc 100644 --- a/sources/tech/20140320 Best command line tools for linux performance monitoring.md +++ b/sources/tech/20140320 Best command line tools for linux performance monitoring.md @@ -1,3 +1,4 @@ +ictlyh Translating Best command line tools for linux performance monitoring ================================================================================ Sometimes a system can be slow and many reasons can be the root cause. To identify the process that is consuming memory, disk I/O or processor capacity you need to use tools to see what is happening in an operation system. diff --git a/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md b/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md index 317b2b3292..a316797ebd 100644 --- a/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md +++ b/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md @@ -1,3 +1,4 @@ +ictlyh Translating RHCE Series: Implementing HTTPS through TLS using Network Security Service (NSS) for Apache ================================================================================ If you are a system administrator who is in charge of maintaining and securing a web server, you can’t afford to not devote your very best efforts to ensure that data served by or going through your server is protected at all times. From d772f13cc812fd221f91e4942e37a9abb9ef1b04 Mon Sep 17 00:00:00 2001 From: VicYu Date: Wed, 16 Sep 2015 23:03:52 +0800 Subject: [PATCH 2086/2517] Update 20150916 Enable Automatic System Updates In Ubuntu.md --- .../20150916 Enable Automatic System Updates In Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md b/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md index 40397f2c42..3d69413a2f 100644 --- a/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md +++ b/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md @@ -1,3 +1,5 @@ + Vic020 + Enable Automatic System Updates In Ubuntu ================================================================================ Before seeing **how to enable automatic system updates in Ubuntu**, first let’s see why should we do it in the first place. @@ -45,4 +47,4 @@ via: http://itsfoss.com/automatic-system-updates-ubuntu/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/ubuntu-notify-updates-frequently/ \ No newline at end of file +[1]:http://itsfoss.com/ubuntu-notify-updates-frequently/ From 28ac776cf1ef94ec352f49b8d433669cb54463eb Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 16 Sep 2015 23:23:54 +0800 Subject: [PATCH 2087/2517] =?UTF-8?q?=E7=BF=BB=E5=B7=B2=E5=AE=8C=E6=88=90?= =?UTF-8?q?=20Linux=20FAQs=20with=20Answers--How=20to=20check=20weather=20?= =?UTF-8?q?forecasts=20from=20the=20command=20line=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...orecasts from the command line on Linux.md | 52 ++++++++----------- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md b/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md index 11dd713f74..b7751e118a 100644 --- a/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md +++ b/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md @@ -1,64 +1,56 @@ -translating by ezio - -Linux FAQs with Answers--How to check weather forecasts from the command line on Linux +Linux 问与答:如何在Linux 命令行下浏览天气预报 ================================================================================ -> **Question**: I often check local weather forecasts on the Linux desktop. However, is there an easy way to access weather forecast information in the terminal environment, where I don't have access to desktop widgets or web browser? +> **Q**: 我经常在Linux 桌面查看天气预报。然而,是否有一种在终端环境下,不通过桌面小插件或者网络查询天气预报的方法? -For Linux desktop users, there are many ways to access weather forecasts, e.g., using standalone weather apps, desktop widgets, or panel applets. If your work environment is terminal-based, there are also several ways to access weather forecasts from the command line. +对于Linux 桌面用户来说,有很多办法获取天气预报,比如使用专门的天气应用,桌面小插件,或者面板小程序。但是如果你的工作环境实际与终端的,这里也有一些在命令行下获取天气的手段。 -Among them is [wego][1], **a cute little weather app for the terminal**. Using an ncurses-based fancy interface, this command-line app allows you to see current weather conditions and forecasts at a glance. It retrieves the weather forecasts for the next 5 days via a weather forecast API. +其中有一个就是 [wego][1],**一个终端下的小巧程序**。使用基于ncurses 的接口,这个命令行程序允许你查看当前的天气情况和之后的预报。它也会通过一个天气预报的API 收集接下来5 天的天气预报。 -### Install Wego on Linux ### - -Installation of wego is pretty simple. wego is written in Go language, thus the first step is to [install Go language][2]. After installing Go, proceed to install wego as follows. +### 在Linux 下安装Wego ### +安装wego 相当简单。wego 是用Go 编写的,引起第一个步骤就是安装[Go 语言][2]。然后再安装wego。 $ go get github.com/schachmat/wego -The wego tool will be installed under $GOPATH/bin. So add $GOPATH/bin to your $PATH variable. +wego 会被安装到$GOPATH/bin,所以要将$GOPATH/bin 添加到$PATH 环境变量。 $ echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.bashrc $ source ~/.bashrc -Now go ahead and invoke wego from the command line. +现在就可与直接从命令行启动wego 了。 $ wego -The first time you run wego, it will generate a config file (~/.wegorc), where you need to specify a weather API key. - -You can obtain a free API key from [worldweatheronline.com][3]. Free sign-up is quick and easy. You only need a valid email address. +第一次运行weg 会生成一个配置文件(~/.wegorc),你需要指定一个天气API key。 +你可以从[worldweatheronline.com][3] 获取一个免费的API key。免费注册和使用。你只需要提供一个有效的邮箱地址。 ![](https://farm6.staticflickr.com/5781/21317466341_5a368b0d26_c.jpg) -Your .wegorc will look like the following. +你的 .wegorc 配置文件看起来会这样: ![](https://farm6.staticflickr.com/5620/21121418558_df0d27cd0a_b.jpg) -Other than API key, you can specify in ~/.wegorc your preferred location, use of metric/imperial units, and language. - -Note that the weather API is rate-limited; 5 queries per second, and 250 queries per day. - -When you invoke wego command again, you will see the latest weather forecast (of your preferred location), shown as follows. +除了API key,你还可以把你想要查询天气的地方、使用的城市/国家名称、语言配置在~/.wegorc 中。 +注意,这个天气API 的使用有限制:每秒最多5 次查询,每天最多250 次查询。 +当你重新执行wego 命令,你将会看到最新的天气预报(当然是你的指定地方),如下显示。 ![](https://farm6.staticflickr.com/5776/21121218110_dd51e03ff4_c.jpg) -The displayed weather information includes: (1) temperature, (2) wind direction and speed, (3) viewing distance, and (4) precipitation amount and probability. - -By default, it will show 3-day weather forecast. To change this behavior, you can supply the number of days (upto five) as an argument. For example, to see 5-day forecast: +显示出来的天气信息包括:(1)温度,(2)风速和风向,(3)可视距离,(4)降水量和降水概率 +默认情况下会显示3 天的天气预报。如果要进行修改,可以通过参数改变天气范围(最多5天),比如要查看5 天的天气预报: $ wego 5 -If you want to check the weather of any other location, you can specify the city name. +如果你想检查另一个地方的天气,只需要提供城市名即可: $ wego Seattle -### Troubleshooting ### - -1. You encounter the following error while running wego. +### 问题解决 ### +1. 可能会遇到下面的错误: user: Current not implemented on linux/amd64 -This error can happen when you run wego on a platform which is not supported by the native Go compiler gc (e.g., Fedora). In that case, you can compile the program using gccgo, a compiler-frontend for Go language. This can be done as follows. - + 当你在一个不支持原生Go 编译器的环境下运行wego 时就会出现这个错误。在这种情况下你只需要使用gccgo ——一个Go 的编译器前端来编译程序即可。这一步可以通过下面的命令完成。 + $ sudo yum install gcc-go $ go get -compiler=gccgo github.com/schachmat/wego @@ -67,7 +59,7 @@ This error can happen when you run wego on a platform which is not supported by via: http://ask.xmodulo.com/weather-forecasts-command-line-linux.html 作者:[Dan Nanni][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 287e371a44946a65ca0a286497a69d1f0926ba66 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 16 Sep 2015 23:32:42 +0800 Subject: [PATCH 2088/2517] Update 20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md --- ... How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md index ba828d629d..bceee2953b 100644 --- a/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md +++ b/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md @@ -1,7 +1,5 @@ -translating by ezio - -How to Setup Node JS v4.0.0 on Ubuntu 14.04 / 15.04 +在ubunt 14.04/15.04 上配置Node JS v4.0.0 ================================================================================ Hi everyone, Node.JS Version 4.0.0 has been out, the popular server-side JavaScript platform has combines the Node.js and io.js code bases. This release represents the combined efforts encapsulated in both the Node.js project and the io.js project that are now combined in a single codebase. The most important change is this Node.js is ships with version 4.5 of Google's V8 JavaScript engine, which is the same version that ships with the current Chrome browser. So, being able to more closely track V8’s releases means Node.js runs JavaScript faster, more securely, and with the ability to use many desirable ES6 language features. @@ -96,7 +94,7 @@ That’s it. Hope this gives you a good idea of Node.js going with Node.js on Ub via: http://linoxide.com/ubuntu-how-to/setup-node-js-4-0-ubuntu-14-04-15-04/ 作者:[Kashif Siddique][a] -译者:[译者ID](https://github.com/译者ID) +译者:[译者ID](https://github.com/osk874) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From cad2df606325ac090f8ff9c24aef513919a1877c Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 16 Sep 2015 23:33:58 +0800 Subject: [PATCH 2089/2517] Create 20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md --- ...orecasts from the command line on Linux.md | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 translated/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md diff --git a/translated/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md b/translated/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md new file mode 100644 index 0000000000..b7751e118a --- /dev/null +++ b/translated/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md @@ -0,0 +1,70 @@ +Linux 问与答:如何在Linux 命令行下浏览天气预报 +================================================================================ +> **Q**: 我经常在Linux 桌面查看天气预报。然而,是否有一种在终端环境下,不通过桌面小插件或者网络查询天气预报的方法? + +对于Linux 桌面用户来说,有很多办法获取天气预报,比如使用专门的天气应用,桌面小插件,或者面板小程序。但是如果你的工作环境实际与终端的,这里也有一些在命令行下获取天气的手段。 + +其中有一个就是 [wego][1],**一个终端下的小巧程序**。使用基于ncurses 的接口,这个命令行程序允许你查看当前的天气情况和之后的预报。它也会通过一个天气预报的API 收集接下来5 天的天气预报。 + +### 在Linux 下安装Wego ### +安装wego 相当简单。wego 是用Go 编写的,引起第一个步骤就是安装[Go 语言][2]。然后再安装wego。 + + $ go get github.com/schachmat/wego + +wego 会被安装到$GOPATH/bin,所以要将$GOPATH/bin 添加到$PATH 环境变量。 + + $ echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.bashrc + $ source ~/.bashrc + +现在就可与直接从命令行启动wego 了。 + + $ wego + +第一次运行weg 会生成一个配置文件(~/.wegorc),你需要指定一个天气API key。 +你可以从[worldweatheronline.com][3] 获取一个免费的API key。免费注册和使用。你只需要提供一个有效的邮箱地址。 + +![](https://farm6.staticflickr.com/5781/21317466341_5a368b0d26_c.jpg) + +你的 .wegorc 配置文件看起来会这样: + +![](https://farm6.staticflickr.com/5620/21121418558_df0d27cd0a_b.jpg) + +除了API key,你还可以把你想要查询天气的地方、使用的城市/国家名称、语言配置在~/.wegorc 中。 +注意,这个天气API 的使用有限制:每秒最多5 次查询,每天最多250 次查询。 +当你重新执行wego 命令,你将会看到最新的天气预报(当然是你的指定地方),如下显示。 + +![](https://farm6.staticflickr.com/5776/21121218110_dd51e03ff4_c.jpg) + +显示出来的天气信息包括:(1)温度,(2)风速和风向,(3)可视距离,(4)降水量和降水概率 +默认情况下会显示3 天的天气预报。如果要进行修改,可以通过参数改变天气范围(最多5天),比如要查看5 天的天气预报: + + $ wego 5 + +如果你想检查另一个地方的天气,只需要提供城市名即可: + + $ wego Seattle + +### 问题解决 ### +1. 可能会遇到下面的错误: + + user: Current not implemented on linux/amd64 + + 当你在一个不支持原生Go 编译器的环境下运行wego 时就会出现这个错误。在这种情况下你只需要使用gccgo ——一个Go 的编译器前端来编译程序即可。这一步可以通过下面的命令完成。 + + $ sudo yum install gcc-go + $ go get -compiler=gccgo github.com/schachmat/wego + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/weather-forecasts-command-line-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/oska874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:https://github.com/schachmat/wego +[2]:http://ask.xmodulo.com/install-go-language-linux.html +[3]:https://developer.worldweatheronline.com/auth/register From 6f732f683c488f29ef40f3ca0bcf4fc4ab4343db Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 16 Sep 2015 23:34:28 +0800 Subject: [PATCH 2090/2517] Delete 20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md --- ...orecasts from the command line on Linux.md | 70 ------------------- 1 file changed, 70 deletions(-) delete mode 100644 sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md diff --git a/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md b/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md deleted file mode 100644 index b7751e118a..0000000000 --- a/sources/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md +++ /dev/null @@ -1,70 +0,0 @@ -Linux 问与答:如何在Linux 命令行下浏览天气预报 -================================================================================ -> **Q**: 我经常在Linux 桌面查看天气预报。然而,是否有一种在终端环境下,不通过桌面小插件或者网络查询天气预报的方法? - -对于Linux 桌面用户来说,有很多办法获取天气预报,比如使用专门的天气应用,桌面小插件,或者面板小程序。但是如果你的工作环境实际与终端的,这里也有一些在命令行下获取天气的手段。 - -其中有一个就是 [wego][1],**一个终端下的小巧程序**。使用基于ncurses 的接口,这个命令行程序允许你查看当前的天气情况和之后的预报。它也会通过一个天气预报的API 收集接下来5 天的天气预报。 - -### 在Linux 下安装Wego ### -安装wego 相当简单。wego 是用Go 编写的,引起第一个步骤就是安装[Go 语言][2]。然后再安装wego。 - - $ go get github.com/schachmat/wego - -wego 会被安装到$GOPATH/bin,所以要将$GOPATH/bin 添加到$PATH 环境变量。 - - $ echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.bashrc - $ source ~/.bashrc - -现在就可与直接从命令行启动wego 了。 - - $ wego - -第一次运行weg 会生成一个配置文件(~/.wegorc),你需要指定一个天气API key。 -你可以从[worldweatheronline.com][3] 获取一个免费的API key。免费注册和使用。你只需要提供一个有效的邮箱地址。 - -![](https://farm6.staticflickr.com/5781/21317466341_5a368b0d26_c.jpg) - -你的 .wegorc 配置文件看起来会这样: - -![](https://farm6.staticflickr.com/5620/21121418558_df0d27cd0a_b.jpg) - -除了API key,你还可以把你想要查询天气的地方、使用的城市/国家名称、语言配置在~/.wegorc 中。 -注意,这个天气API 的使用有限制:每秒最多5 次查询,每天最多250 次查询。 -当你重新执行wego 命令,你将会看到最新的天气预报(当然是你的指定地方),如下显示。 - -![](https://farm6.staticflickr.com/5776/21121218110_dd51e03ff4_c.jpg) - -显示出来的天气信息包括:(1)温度,(2)风速和风向,(3)可视距离,(4)降水量和降水概率 -默认情况下会显示3 天的天气预报。如果要进行修改,可以通过参数改变天气范围(最多5天),比如要查看5 天的天气预报: - - $ wego 5 - -如果你想检查另一个地方的天气,只需要提供城市名即可: - - $ wego Seattle - -### 问题解决 ### -1. 可能会遇到下面的错误: - - user: Current not implemented on linux/amd64 - - 当你在一个不支持原生Go 编译器的环境下运行wego 时就会出现这个错误。在这种情况下你只需要使用gccgo ——一个Go 的编译器前端来编译程序即可。这一步可以通过下面的命令完成。 - - $ sudo yum install gcc-go - $ go get -compiler=gccgo github.com/schachmat/wego - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/weather-forecasts-command-line-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni -[1]:https://github.com/schachmat/wego -[2]:http://ask.xmodulo.com/install-go-language-linux.html -[3]:https://developer.worldweatheronline.com/auth/register From 7ca9ec892bbf40a5c18426715afdc918b01342ff Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Thu, 17 Sep 2015 08:29:05 +0800 Subject: [PATCH 2091/2517] Create 20150916 Italy's Ministry of Defense to Drop Microsoft Office in Favor of LibreOffice.md --- ...icrosoft Office in Favor of LibreOffice.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sources/talk/20150916 Italy's Ministry of Defense to Drop Microsoft Office in Favor of LibreOffice.md diff --git a/sources/talk/20150916 Italy's Ministry of Defense to Drop Microsoft Office in Favor of LibreOffice.md b/sources/talk/20150916 Italy's Ministry of Defense to Drop Microsoft Office in Favor of LibreOffice.md new file mode 100644 index 0000000000..f47352ed26 --- /dev/null +++ b/sources/talk/20150916 Italy's Ministry of Defense to Drop Microsoft Office in Favor of LibreOffice.md @@ -0,0 +1,30 @@ +Italy's Ministry of Defense to Drop Microsoft Office in Favor of LibreOffice +================================================================================ +>**LibreItalia's Italo Vignoli [reports][1] that the Italian Ministry of Defense is about to migrate to the LibreOffice open-source software for productivity and adopt the Open Document Format (ODF), while moving away from proprietary software products.** + +The movement comes in the form of a [collaboration][1] between Italy's Ministry of Defense and the LibreItalia Association. Sonia Montegiove, President of the LibreItalia Association, and Ruggiero Di Biase, Rear Admiral and General Executive Manager of Automated Information Systems of the Ministry of Defense in Italy signed an agreement for a collaboration to adopt the LibreOffice office suite in all of the Ministry's offices. + +While the LibreItalia non-profit organization promises to help the Italian Ministry of Defense with trainers for their offices across the country, the Ministry will start the implementation of the LibreOffice software on October 2015 with online training courses for their staff. The entire transition process is expected to be completed by the end of year 2016\. An Italian law lets officials find open source software alternatives to well-known commercial software. + +"Under the agreement, the Italian Ministry of Defense will develop educational content for a series of online training courses on LibreOffice, which will be released to the community under Creative Commons, while the partners, LibreItalia, will manage voluntarily the communication and training of trainers in the Ministry," says Italo Vignoli, Honorary President of LibreItalia. + +### The Ministry of Defense will adopt the Open Document Format (ODF) + +The initiative will allow the Italian Ministry of Defense to be independent from proprietary software applications, which are aimed at individual productivity, and adopt open source document format standards like Open Document Format (ODF), which is used by default in the LibreOffice office suite. The project follows similar movements already made by governments of other European countries, including United Kingdom, France, Spain, Germany, and Holland. + +It would appear that numerous other public institutions all over Italy are using open source alternatives, including the Italian Region Emilia Romagna, Galliera Hospital in Genoa, Macerata, Cremona, Trento and Bolzano, Perugia, the municipalities of Bologna, ASL 5 of Veneto, Piacenza and Reggio Emilia, and many others. AGID (Agency for Digital Italy) welcomes this project and hopes that other public institutions will do the same. + + +-------------------------------------------------------------------------------- + +via: http://news.softpedia.com/news/italy-s-ministry-of-defense-to-drop-microsoft-office-in-favor-of-libreoffice-491850.shtml + +作者:[Marius Nestor][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://news.softpedia.com/editors/browse/marius-nestor +[1]:http://www.libreitalia.it/accordo-di-collaborazione-tra-associazione-libreitalia-onlus-e-difesa-per-ladozione-del-prodotto-libreoffice-quale-pacchetto-di-produttivita-open-source-per-loffice-automation/ +[2]:http://www.libreitalia.it/chi-siamo/ From bcaee6786ef129f9ada0f9a52ec0356dd40342ca Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 17 Sep 2015 09:50:16 +0800 Subject: [PATCH 2092/2517] translating --- ...Based Open Source OS Runs 42 Percent of Dell PCs in China.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md b/sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md index 7368a21b70..1961850b65 100644 --- a/sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md +++ b/sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md @@ -1,3 +1,5 @@ +translating---geekpi + Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China ================================================================================ > Dell says that 42 percent of the PCs it sells in the Chinese market run Kylin, an open source operating system based on Ubuntu Linux that Canonical helped to create. From 80cde8ca85bde6d3b09f9047719993705abd0763 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 17 Sep 2015 10:27:04 +0800 Subject: [PATCH 2093/2517] translated --- ...OS Runs 42 Percent of Dell PCs in China.md | 43 ------------------- ...OS Runs 42 Percent of Dell PCs in China.md | 41 ++++++++++++++++++ 2 files changed, 41 insertions(+), 43 deletions(-) delete mode 100644 sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md create mode 100644 translated/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md diff --git a/sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md b/sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md deleted file mode 100644 index 1961850b65..0000000000 --- a/sources/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md +++ /dev/null @@ -1,43 +0,0 @@ -translating---geekpi - -Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China -================================================================================ -> Dell says that 42 percent of the PCs it sells in the Chinese market run Kylin, an open source operating system based on Ubuntu Linux that Canonical helped to create. - - Open source fans, rejoice: The Year of the Linux Desktop has arrived. Or something close to it is on the horizon in China, at least, where [Dell][1] has reported that more than 40 percent of the PCs it sells run a variant of [Ubuntu Linux][2] that [Canonical][3] helped develop. - - Specifically, Dell said that 42 percent of computers in China run NeoKylin, an operating system that originated as an effort in China to build a home-grown alternative to [Microsoft][4] (MSFT) Windows. Also known simply Kylin, the OS has been based on Ubuntu since 2013, when Canonical began collaborating with the Chinese government to create an Ubuntu variant tailored for the Chinese market. - - Earlier versions of Kylin, which has been around since 2001, were based on other operating systems, including FreeBSD, an open source Unix-like operating system that is distinct from Linux. - - Ubuntu Kylin looks and feels a lot like modern versions of Ubuntu proper. It sports the [Unity][5] interface and runs the standard suite of open source apps, as well as specialized ones such as Youker Assistant, a graphical front end that helps users manage basic computing tasks. Kylin's default theme makes it look just a little more like Windows than stock Ubuntu, however. - - Given the relative stagnation of the market for desktop Linux PCs in most of the world, Dell's announcement is striking. And in light of China's [hostility][6] toward modern editions of Windows, the news does not bode well for Microsoft's prospects in the Chinese market. - - Dell's comment on Linux PC sales in China—which appeared in the form of a statement by an executive to the Wall Street Journal—comes on the heels of the company's [announcement][7] of $125 million of new investment in China. - ![Ubuntu Kylin](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/09/hey_2.png) - - - - - - - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/open-source-application-software-companies/091515/ubuntu-linux-based-open-source-os-runs-42-percent-dell-pc - -作者:[Christopher Tozzi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://thevarguy.com/author/christopher-tozzi -[1]:http://dell.com/ -[2]:http://ubuntu.com/ -[3]:http://canonical.com/ -[4]:http://microsoft.com/ -[5]:http://unity.ubuntu.com/ -[6]:http://www.wsj.com/articles/windows-8-faces-new-criticism-in-china-1401882772 -[7]:http://thevarguy.com/business-technology-solution-sales/091415/dell-125-million-directed-china-jobs-new-business-and-innovation diff --git a/translated/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md b/translated/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md new file mode 100644 index 0000000000..eea7af0368 --- /dev/null +++ b/translated/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md @@ -0,0 +1,41 @@ +基于Linux的Ubuntu开源操作系统在中国42%的Dell PC上运行 +================================================================================ +> Dell称它在中国市场出售的42%的PC运行的是Kylin,一款Canonical帮助创建的基于Ubuntu的操作系统。 + + 让开源粉丝欢喜的是:Linux桌面年来了。或者说中国正在接近这个目标,[Dell][1]报告称超过40%售卖的PC机运行的是 [Canonical][3]帮助开发的[Ubuntu Linux][2]。 + + 特别地,Dell称42%的中国电脑运行NeoKylin,一款中国本土倾力打造的用于替代[Microsoft][4] (MSFT) Windows的操作系统。它也简称麒麟,一款从2013年出来的基于Ubuntu的操作系统,也是这年开始Canonical公司与中国政府合作来建立一个专为中国市场Ubuntu变种。 + + 2001年左右早期版本的麒麟,都是基于其他操作系统,包括FreeBSD,一个开放源码的区别于Linux的类Unix操作系统。 + + Ubuntu的麒麟的外观和感觉很像Ubuntu的现代版本。它拥有的[Unity][5]界面,并运行标准开源套件,以及专门的如Youker助理程序,它是一个图形化的前端,帮助用户管理的基本计算任务。但是麒麟的默认主题使得它看起来有点像Windows而不是Ubuntu。 + + 鉴于桌面Linux PC市场在世界上大多数国家的相对停滞,戴尔的宣布是惊人的。并结合中国对现代windows的轻微[敌意][6],这个消息并不预示着微软在中国市场的前景。 + + 在Dell公司[宣布][7]在华投资1.25亿美元很快之后一位行政官给华尔街杂志的评论中提到了Dell在中国市场上PC的销售。 + ![Ubuntu Kylin](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/09/hey_2.png) + + + + + + + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/091515/ubuntu-linux-based-open-source-os-runs-42-percent-dell-pc + +作者:[Christopher Tozzi][a] +译者:[geekpi](https://github.com/geeekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:http://dell.com/ +[2]:http://ubuntu.com/ +[3]:http://canonical.com/ +[4]:http://microsoft.com/ +[5]:http://unity.ubuntu.com/ +[6]:http://www.wsj.com/articles/windows-8-faces-new-criticism-in-china-1401882772 +[7]:http://thevarguy.com/business-technology-solution-sales/091415/dell-125-million-directed-china-jobs-new-business-and-innovation From de7796e8175d0894822494dd5ec2d3bfe238087d Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 17 Sep 2015 10:29:44 +0800 Subject: [PATCH 2094/2517] PUB:20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux @strugglingyouth --- ...e number of threads in a process on Linux.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) rename {translated/tech => published}/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md (59%) diff --git a/translated/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md b/published/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md similarity index 59% rename from translated/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md rename to published/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md index 96bf143533..8667e99712 100644 --- a/translated/tech/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md +++ b/published/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md @@ -1,5 +1,4 @@ - -Linux 有问必答 - 如何在 Linux 中统计一个进程的线程数 +Linux 有问必答:如何在 Linux 中统计一个进程的线程数 ================================================================================ > **问题**: 我正在运行一个程序,它在运行时会派生出多个线程。我想知道程序在运行时会有多少线程。在 Linux 中检查进程的线程数最简单的方法是什么? @@ -7,11 +6,11 @@ Linux 有问必答 - 如何在 Linux 中统计一个进程的线程数 ### 方法一: /proc ### - proc 伪文件系统,它驻留在 /proc 目录,这是最简单的方法来查看任何活动进程的线程数。 /proc 目录以可读文本文件形式输出,提供现有进程和系统硬件相关的信息如 CPU, interrupts, memory, disk, 等等. +proc 伪文件系统,它驻留在 /proc 目录,这是最简单的方法来查看任何活动进程的线程数。 /proc 目录以可读文本文件形式输出,提供现有进程和系统硬件相关的信息如 CPU、中断、内存、磁盘等等. $ cat /proc//status -上面的命令将显示进程 的详细信息,包括过程状态(例如, sleeping, running),父进程 PID,UID,GID,使用的文件描述符的数量,以及上下文切换的数量。输出也包括**进程创建的总线程数**如下所示。 +上面的命令将显示进程 \ 的详细信息,包括过程状态(例如, sleeping, running),父进程 PID,UID,GID,使用的文件描述符的数量,以及上下文切换的数量。输出也包括**进程创建的总线程数**如下所示。 Threads: @@ -23,11 +22,11 @@ Linux 有问必答 - 如何在 Linux 中统计一个进程的线程数 输出表明该进程有28个线程。 -或者,你可以在 /proc//task 中简单的统计目录的数量,如下所示。 +或者,你可以在 /proc//task 中简单的统计子目录的数量,如下所示。 $ ls /proc//task | wc -这是因为,对于一个进程中创建的每个线程,在 /proc//task 中会创建一个相应的目录,命名为其线程 ID。由此在 /proc//task 中目录的总数表示在进程中线程的数目。 +这是因为,对于一个进程中创建的每个线程,在 `/proc//task` 中会创建一个相应的目录,命名为其线程 ID。由此在 `/proc//task` 中目录的总数表示在进程中线程的数目。 ### 方法二: ps ### @@ -35,7 +34,7 @@ Linux 有问必答 - 如何在 Linux 中统计一个进程的线程数 $ ps hH p | wc -l -如果你想监视一个进程的不同线程消耗的硬件资源(CPU & memory),请参阅[此教程][1]。(注:此文我们翻译过) +如果你想监视一个进程的不同线程消耗的硬件资源(CPU & memory),请参阅[此教程][1]。 -------------------------------------------------------------------------------- @@ -43,9 +42,9 @@ via: http://ask.xmodulo.com/number-of-threads-process-linux.html 作者:[Dan Nanni][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/view-threads-process-linux.html +[1]:https://linux.cn/article-5633-1.html From 46a74b72f1a7ea9c3aee03c43e8985368475a588 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 17 Sep 2015 10:44:29 +0800 Subject: [PATCH 2095/2517] =?UTF-8?q?20150917-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ository with 44 Years of Unix Evolution.md | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 sources/tech/20150917 A Repository with 44 Years of Unix Evolution.md diff --git a/sources/tech/20150917 A Repository with 44 Years of Unix Evolution.md b/sources/tech/20150917 A Repository with 44 Years of Unix Evolution.md new file mode 100644 index 0000000000..807cedf01d --- /dev/null +++ b/sources/tech/20150917 A Repository with 44 Years of Unix Evolution.md @@ -0,0 +1,202 @@ +A Repository with 44 Years of Unix Evolution +================================================================================ +### Abstract ### + +The evolution of the Unix operating system is made available as a version-control repository, covering the period from its inception in 1972 as a five thousand line kernel, to 2015 as a widely-used 26 million line system. The repository contains 659 thousand commits and 2306 merges. The repository employs the commonly used Git system for its storage, and is hosted on the popular GitHub archive. It has been created by synthesizing with custom software 24 snapshots of systems developed at Bell Labs, Berkeley University, and the 386BSD team, two legacy repositories, and the modern repository of the open source FreeBSD system. In total, 850 individual contributors are identified, the early ones through primary research. The data set can be used for empirical research in software engineering, information systems, and software archaeology. + +### 1 Introduction ### + +The Unix operating system stands out as a major engineering breakthrough due to its exemplary design, its numerous technical contributions, its development model, and its widespread use. The design of the Unix programming environment has been characterized as one offering unusual simplicity, power, and elegance [[1][1]]. On the technical side, features that can be directly attributed to Unix or were popularized by it include [[2][2]]: the portable implementation of the kernel in a high level language; a hierarchical file system; compatible file, device, networking, and inter-process I/O; the pipes and filters architecture; virtual file systems; and the shell as a user-selectable regular process. A large community contributed software to Unix from its early days [[3][3]], [[4][4],pp. 65-72]. This community grew immensely over time and worked using what are now termed open source software development methods [[5][5],pp. 440-442]. Unix and its intellectual descendants have also helped the spread of the C and C++ programming languages, parser and lexical analyzer generators (*yacc, lex*), document preparation tools (*troff, eqn, tbl*), scripting languages (*awk, sed, Perl*), TCP/IP networking, and configuration management systems (*SCCS, RCS, Subversion, Git*), while also forming a large part of the modern internet infrastructure and the web. + +Luckily, important Unix material of historical importance has survived and is nowadays openly available. Although Unix was initially distributed with relatively restrictive licenses, the most significant parts of its early development have been released by one of its right-holders (Caldera International) under a liberal license. Combining these parts with software that was developed or released as open source software by the University of California, Berkeley and the FreeBSD Project provides coverage of the system's development over a period ranging from June 20th 1972 until today. + +Curating and processing available snapshots as well as old and modern configuration management repositories allows the reconstruction of a new synthetic Git repository that combines under a single roof most of the available data. This repository documents in a digital form the detailed evolution of an important digital artefact over a period of 44 years. The following sections describe the repository's structure and contents (Section [II][6]), the way it was created (Section [III][7]), and how it can be used (Section [IV][8]). + +### 2 Data Overview ### + +The 1GB Unix history Git repository is made available for cloning on [GitHub][9].[1][10] Currently[2][11] the repository contains 659 thousand commits and 2306 merges from about 850 contributors. The contributors include 23 from the Bell Labs staff, 158 from Berkeley's Computer Systems Research Group (CSRG), and 660 from the FreeBSD Project. + +The repository starts its life at a tag identified as *Epoch*, which contains only licensing information and its modern README file. Various tag and branch names identify points of significance. + +- *Research-VX* tags correspond to six research editions that came out of Bell Labs. These start with *Research-V1* (4768 lines of PDP-11 assembly) and end with *Research-V7* (1820 mostly C files, 324kLOC). +- *Bell-32V* is the port of the 7th Edition Unix to the DEC/VAX architecture. +- *BSD-X* tags correspond to 15 snapshots released from Berkeley. +- *386BSD-X* tags correspond to two open source versions of the system, with the Intel 386 architecture kernel code mainly written by Lynne and William Jolitz. +- *FreeBSD-release/X* tags and branches mark 116 releases coming from the FreeBSD project. + +In addition, branches with a *-Snapshot-Development* suffix denote commits that have been synthesized from a time-ordered sequence of a snapshot's files, while tags with a *-VCS-Development* suffix mark the point along an imported version control history branch where a particular release occurred. + +The repository's history includes commits from the earliest days of the system's development, such as the following. + + commit c9f643f59434f14f774d61ee3856972b8c3905b1 + Author: Dennis Ritchie + Date: Mon Dec 2 18:18:02 1974 -0500 + Research V5 development + Work on file usr/sys/dmr/kl.c + +Merges between releases that happened along the system's evolution, such as the development of BSD 3 from BSD 2 and Unix 32/V, are also correctly represented in the Git repository as graph nodes with two parents. + +More importantly, the repository is constructed in a way that allows *git blame*, which annotates source code lines with the version, date, and author associated with their first appearance, to produce the expected code provenance results. For example, checking out the *BSD-4* tag, and running git blame on the kernel's *pipe.c* file will show lines written by Ken Thompson in 1974, 1975, and 1979, and by Bill Joy in 1980. This allows the automatic (though computationally expensive) detection of the code's provenance at any point of time. + +![](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/provenance.png) + +Figure 1: Code provenance across significant Unix releases. + +As can be seen in Figure [1][12], a modern version of Unix (FreeBSD 9) still contains visible chunks of code from BSD 4.3, BSD 4.3 Net/2, and FreeBSD 2.0. Interestingly, the Figure shows that code developed during the frantic dash to create an open source operating system out of the code released by Berkeley (386BSD and FreeBSD 1.0) does not seem to have survived. The oldest code in FreeBSD 9 appears to be an 18-line sequence in the C library file timezone.c, which can also be found in the 7th Edition Unix file with the same name and a time stamp of January 10th, 1979 - 36 years ago. + +### 3 Data Collection and Processing ### + +The goal of the project is to consolidate data concerning the evolution of Unix in a form that helps the study of the system's evolution, by entering them into a modern revision repository. This involves collecting the data, curating them, and synthesizing them into a single Git repository. + +![](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/branches.png) + +Figure 2: Imported Unix snapshots, repositories, and their mergers. + +The project is based on three types of data (see Figure [2][13]). First, snapshots of early released versions, which were obtained from the [Unix Heritage Society archive][14],[3][15] the [CD-ROM images][16] containing the full source archives of CSRG,[4][17] the [OldLinux site][18],[5][19] and the [FreeBSD archive][20].[6][21] Second, past and current repositories, namely the CSRG SCCS [[6][22]] repository, the FreeBSD 1 CVS repository, and the [Git mirror of modern FreeBSD development][23].[7][24] The first two were obtained from the same sources as the corresponding snapshots. + +The last, and most labour intensive, source of data was **primary research**. The release snapshots do not provide information regarding their ancestors and the contributors of each file. Therefore, these pieces of information had to be determined through primary research. The authorship information was mainly obtained by reading author biographies, research papers, internal memos, and old documentation scans; by reading and automatically processing source code and manual page markup; by communicating via email with people who were there at the time; by posting a query on the Unix *StackExchange* site; by looking at the location of files (in early editions the kernel source code was split into `usr/sys/dmr` and `/usr/sys/ken`); and by propagating authorship from research papers and manual pages to source code and from one release to others. (Interestingly, the 1st and 2nd Research Edition manual pages have an "owner" section, listing the person (e.g. *ken*) associated with the corresponding system command, file, system call, or library function. This section was not there in the 4th Edition, and resurfaced as the "Author" section in BSD releases.) Precise details regarding the source of the authorship information are documented in the project's files that are used for mapping Unix source code files to their authors and the corresponding commit messages. Finally, information regarding merges between source code bases was obtained from a [BSD family tree maintained by the NetBSD project][25].[8][26] + +The software and data files that were developed as part of this project, are [available online][27],[9][28] and, with appropriate network, CPU and disk resources, they can be used to recreate the repository from scratch. The authorship information for major releases is stored in files under the project's `author-path` directory. These contain lines with a regular expressions for a file path followed by the identifier of the corresponding author. Multiple authors can also be specified. The regular expressions are processed sequentially, so that a catch-all expression at the end of the file can specify a release's default authors. To avoid repetition, a separate file with a `.au` suffix is used to map author identifiers into their names and emails. One such file has been created for every community associated with the system's evolution: Bell Labs, Berkeley, 386BSD, and FreeBSD. For the sake of authenticity, emails for the early Bell Labs releases are listed in UUCP notation (e.g. `research!ken`). The FreeBSD author identifier map, required for importing the early CVS repository, was constructed by extracting the corresponding data from the project's modern Git repository. In total the commented authorship files (828 rules) comprise 1107 lines, and there are another 640 lines mapping author identifiers to names. + +The curation of the project's data sources has been codified into a 168-line `Makefile`. It involves the following steps. + +**Fetching** Copying and cloning about 11GB of images, archives, and repositories from remote sites. + +**Tooling** Obtaining an archiver for old PDP-11 archives from 2.9 BSD, and adjusting it to compile under modern versions of Unix; compiling the 4.3 BSD *compress* program, which is no longer part of modern Unix systems, in order to decompress the 386BSD distributions. + +**Organizing** Unpacking archives using tar and *cpio*; combining three 6th Research Edition directories; unpacking all 1 BSD archives using the old PDP-11 archiver; mounting CD-ROM images so that they can be processed as file systems; combining the 8 and 62 386BSD floppy disk images into two separate files. + +**Cleaning** Restoring the 1st Research Edition kernel source code files, which were obtained from printouts through optical character recognition, into a format close to their original state; patching some 7th Research Edition source code files; removing metadata files and other files that were added after a release, to avoid obtaining erroneous time stamp information; patching corrupted SCCS files; processing the early FreeBSD CVS repository by removing CVS symbols assigned to multiple revisions with a custom Perl script, deleting CVS *Attic* files clashing with live ones, and converting the CVS repository into a Git one using *cvs2svn*. + +An interesting part of the repository representation is how snapshots are imported and linked together in a way that allows *git blame* to perform its magic. Snapshots are imported into the repository as sequential commits based on the time stamp of each file. When all files have been imported the repository is tagged with the name of the corresponding release. At that point one could delete those files, and begin the import of the next snapshot. Note that the *git blame* command works by traversing backwards a repository's history, and using heuristics to detect code moving and being copied within or across files. Consequently, deleted snapshots would create a discontinuity between them, and prevent the tracing of code between them. + +Instead, before the next snapshot is imported, all the files of the preceding snapshot are moved into a hidden look-aside directory named `.ref` (reference). They remain there, until all files of the next snapshot have been imported, at which point they are deleted. Because every file in the `.ref` directory matches exactly an original file, *git blame* can determine how source code moves from one version to the next via the `.ref` file, without ever displaying the `.ref` file. To further help the detection of code provenance, and to increase the representation's realism, each release is represented as a merge between the branch with the incremental file additions (*-Development*) and the preceding release. + +For a period in the 1980s, only a subset of the files developed at Berkeley were under SCCS version control. During that period our unified repository contains imports of both the SCCS commits, and the snapshots' incremental additions. At the point of each release, the SCCS commit with the nearest time stamp is found and is marked as a merge with the release's incremental import branch. These merges can be seen in the middle of Figure [2][29]. + +The synthesis of the various data sources into a single repository is mainly performed by two scripts. A 780-line Perl script (`import-dir.pl`) can export the (real or synthesized) commit history from a single data source (snapshot directory, SCCS repository, or Git repository) in the *Git fast export* format. The output is a simple text format that Git tools use to import and export commits. Among other things, the script takes as arguments the mapping of files to contributors, the mapping between contributor login names and their full names, the commit(s) from which the import will be merged, which files to process and which to ignore, and the handling of "reference" files. A 450-line shell script creates the Git repository and calls the Perl script with appropriate arguments to import each one of the 27 available historical data sources. The shell script also runs 30 tests that compare the repository at specific tags against the corresponding data sources, verify the appearance and disappearance of look-aside directories, and look for regressions in the count of tree branches and merges and the output of *git blame* and *git log*. Finally, *git* is called to garbage-collect and compress the repository from its initial 6GB size down to the distributed 1GB. + +### 4 Data Uses ### + +The data set can be used for empirical research in software engineering, information systems, and software archeology. Through its unique uninterrupted coverage of a period of more than 40 years, it can inform work on software evolution and handovers across generations. With thousandfold increases in processing speed and million-fold increases in storage capacity during that time, the data set can also be used to study the co-evolution of software and hardware technology. The move of the software's development from research labs, to academia, and to the open source community can be used to study the effects of organizational culture on software development. The repository can also be used to study how notable individuals, such as Turing Award winners (Dennis Ritchie and Ken Thompson) and captains of the IT industry (Bill Joy and Eric Schmidt), actually programmed. Another phenomenon worthy of study concerns the longevity of code, either at the level of individual lines, or as complete systems that were at times distributed with Unix (Ingres, Lisp, Pascal, Ratfor, Snobol, TMG), as well as the factors that lead to code's survival or demise. Finally, because the data set stresses Git, the underlying software repository storage technology, to its limits, it can be used to drive engineering progress in the field of revision management systems. + +![](http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/metrics.png) + +Figure 3: Code style evolution along Unix releases. + +Figure [3][30], which depicts trend lines (obtained with R's local polynomial regression fitting function) of some interesting code metrics along 36 major releases of Unix, demonstrates the evolution of code style and programming language use over very long timescales. This evolution can be driven by software and hardware technology affordances and requirements, software construction theory, and even social forces. The dates in the Figure have been calculated as the average date of all files appearing in a given release. As can be seen in it, over the past 40 years the mean length of identifiers and file names has steadily increased from 4 and 6 characters to 7 and 11 characters, respectively. We can also see less steady increases in the number of comments and decreases in the use of the *goto* statement, as well as the virtual disappearance of the *register* type modifier. + +### 5 Further Work ### + +Many things can be done to increase the repository's faithfulness and usefulness. Given that the build process is shared as open source code, it is easy to contribute additions and fixes through GitHub pull requests. The most useful community contribution would be to increase the coverage of imported snapshot files that are attributed to a specific author. Currently, about 90 thousand files (out of a total of 160 thousand) are getting assigned an author through a default rule. Similarly, there are about 250 authors (primarily early FreeBSD ones) for which only the identifier is known. Both are listed in the build repository's unmatched directory, and contributions are welcomed. Furthermore, the BSD SCCS and the FreeBSD CVS commits that share the same author and time-stamp can be coalesced into a single Git commit. Support can be added for importing the SCCS file comment fields, in order to bring into the repository the corresponding metadata. Finally, and most importantly, more branches of open source systems can be added, such as NetBSD OpenBSD, DragonFlyBSD, and *illumos*. Ideally, current right holders of other important historical Unix releases, such as System III, System V, NeXTSTEP, and SunOS, will release their systems under a license that would allow their incorporation into this repository for study. + +#### Acknowledgements #### + +The author thanks the many individuals who contributed to the effort. Brian W. Kernighan, Doug McIlroy, and Arnold D. Robbins helped with Bell Labs login identifiers. Clem Cole, Era Eriksson, Mary Ann Horton, Kirk McKusick, Jeremy C. Reed, Ingo Schwarze, and Anatole Shaw helped with BSD login identifiers. The BSD SCCS import code is based on work by H. Merijn Brand and Jonathan Gray. + +This research has been co-financed by the European Union (European Social Fund - ESF) and Greek national funds through the Operational Program "Education and Lifelong Learning" of the National Strategic Reference Framework (NSRF) - Research Funding Program: Thalis - Athens University of Economics and Business - Software Engineering Research Platform. + +### References ### + +[[1]][31] + M. D. McIlroy, E. N. Pinson, and B. A. Tague, "UNIX time-sharing system: Foreword," *The Bell System Technical Journal*, vol. 57, no. 6, pp. 1899-1904, July-August 1978. + +[[2]][32] + D. M. Ritchie and K. Thompson, "The UNIX time-sharing system," *Bell System Technical Journal*, vol. 57, no. 6, pp. 1905-1929, July-August 1978. + +[[3]][33] + D. M. Ritchie, "The evolution of the UNIX time-sharing system," *AT&T Bell Laboratories Technical Journal*, vol. 63, no. 8, pp. 1577-1593, Oct. 1984. + +[[4]][34] + P. H. Salus, *A Quarter Century of UNIX*. Boston, MA: Addison-Wesley, 1994. + +[[5]][35] + E. S. Raymond, *The Art of Unix Programming*. Addison-Wesley, 2003. + +[[6]][36] + M. J. Rochkind, "The source code control system," *IEEE Transactions on Software Engineering*, vol. SE-1, no. 4, pp. 255-265, 1975. + +---------- + +#### Footnotes: #### + +[1][37] - [https://github.com/dspinellis/unix-history-repo][38] + +[2][39] - Updates may add or modify material. To ensure replicability the repository's users are encouraged to fork it or archive it. + +[3][40] - [http://www.tuhs.org/archive_sites.html][41] + +[4][42] - [https://www.mckusick.com/csrg/][43] + +[5][44] - [http://www.oldlinux.org/Linux.old/distributions/386BSD][45] + +[6][46] - [http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/][47] + +[7][48] - [https://github.com/freebsd/freebsd][49] + +[8][50] - [http://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/share/misc/bsd-family-tree][51] + +[9][52] - [https://github.com/dspinellis/unix-history-make][53] + +-------------------------------------------------------------------------------- + +via: http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#MPT78 +[2]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#RT78 +[3]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#Rit84 +[4]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#Sal94 +[5]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#Ray03 +[6]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#sec:data +[7]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#sec:dev +[8]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#sec:use +[9]:https://github.com/dspinellis/unix-history-repo +[10]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFtNtAAB +[11]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFtNtAAC +[12]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#fig:provenance +[13]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#fig:branches +[14]:http://www.tuhs.org/archive_sites.html +[15]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFtNtAAD +[16]:https://www.mckusick.com/csrg/ +[17]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFtNtAAE +[18]:http://www.oldlinux.org/Linux.old/distributions/386BSD +[19]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFtNtAAF +[20]:http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/ +[21]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFtNtAAG +[22]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#SCCS +[23]:https://github.com/freebsd/freebsd +[24]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFtNtAAH +[25]:http://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/share/misc/bsd-family-tree +[26]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFtNtAAI +[27]:https://github.com/dspinellis/unix-history-make +[28]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFtNtAAJ +[29]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#fig:branches +[30]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#fig:metrics +[31]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#CITEMPT78 +[32]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#CITERT78 +[33]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#CITERit84 +[34]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#CITESal94 +[35]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#CITERay03 +[36]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#CITESCCS +[37]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFrefAAB +[38]:https://github.com/dspinellis/unix-history-repo +[39]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFrefAAC +[40]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFrefAAD +[41]:http://www.tuhs.org/archive_sites.html +[42]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFrefAAE +[43]:https://www.mckusick.com/csrg/ +[44]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFrefAAF +[45]:http://www.oldlinux.org/Linux.old/distributions/386BSD +[46]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFrefAAG +[47]:http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/ +[48]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFrefAAH +[49]:https://github.com/freebsd/freebsd +[50]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFrefAAI +[51]:http://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/share/misc/bsd-family-tree +[52]:http://www.dmst.aueb.gr/dds/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html#tthFrefAAJ +[53]:https://github.com/dspinellis/unix-history-make \ No newline at end of file From 9ec17292c9af74eec62628cdb2d6786ddf5e9d3a Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 17 Sep 2015 10:58:30 +0800 Subject: [PATCH 2096/2517] PUB:20150824 Basics Of NetworkManager Command Line Tool Nmcli @geekpi --- ... NetworkManager Command Line Tool Nmcli.md | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) rename {translated/tech => published}/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md (76%) diff --git a/translated/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md b/published/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md similarity index 76% rename from translated/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md rename to published/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md index 5ddb31d1ea..19b5a9cd02 100644 --- a/translated/tech/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md +++ b/published/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md @@ -1,14 +1,15 @@ -网络管理命令行工具基础,Nmcli +Nmcli 网络管理命令行工具基础 ================================================================================ + ![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/08/networking1.jpg) ### 介绍 ### -在本教程中,我们会在CentOS / RHEL 7中讨论网络管理工具,也叫**nmcli**。那些使用**ifconfig**的用户应该在CentOS 7中避免使用这个命令。 +在本教程中,我们会在CentOS / RHEL 7中讨论网络管理工具(NetworkManager command line tool),也叫**nmcli**。那些使用**ifconfig**的用户应该在CentOS 7中避免使用**ifconfig** 了。 让我们用nmcli工具配置一些网络设置。 -### 要得到系统中所有接口的地址信息 ### +#### 要得到系统中所有接口的地址信息 #### [root@localhost ~]# ip addr show @@ -27,13 +28,13 @@ inet6 fe80::20c:29ff:fe67:2f4c/64 scope link valid_lft forever preferred_lft forever -#### 检索与连接的接口相关的数据包统计 #### +#### 检索与已连接的接口相关的数据包统计 #### [root@localhost ~]# ip -s link show eno16777736 **示例输出:** -![unxmen_(011)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0111.png) +![](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0111.png) #### 得到路由配置 #### @@ -50,11 +51,11 @@ 输出像traceroute,但是更加完整。 -![unxmen_0121](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_01211.png) +![](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_01211.png) ### nmcli 工具 ### -**Nmcli** 是一个非常丰富和灵活的命令行工具。nmcli使用的情况有: +**nmcli** 是一个非常丰富和灵活的命令行工具。nmcli使用的情况有: - **设备** – 正在使用的网络接口 - **连接** – 一组配置设置,对于一个单一的设备可以有多个连接,可以在连接之间切换。 @@ -63,7 +64,7 @@ [root@localhost ~]# nmcli connection show -![unxmen_(013)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_013.png) +![](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_013.png) #### 得到特定连接的详情 #### @@ -71,7 +72,7 @@ **示例输出:** -![unxmen_(014)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0141.png) +![](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0141.png) #### 得到网络设备状态 #### @@ -89,7 +90,7 @@ 这里, -- **Connection add** – 添加新的连接 +- **connection add** – 添加新的连接 - **con-name** – 连接名 - **type** – 设备类型 - **ifname** – 接口名 @@ -100,7 +101,7 @@ Connection 'dhcp' (163a6822-cd50-4d23-bb42-8b774aeab9cb) successfully added. -#### 不同过dhcp分配IP,使用“static”添加地址 #### +#### 不通过dhcp分配IP,使用“static”添加地址 #### [root@localhost ~]# nmcli connection add con-name "static" ifname eno16777736 autoconnect no type ethernet ip4 192.168.1.240 gw4 192.168.1.1 @@ -112,25 +113,23 @@ [root@localhost ~]# nmcli connection up eno1 -Again Check, whether ip address is changed or not. 再检查一遍,ip地址是否已经改变 [root@localhost ~]# ip addr show -![unxmen_(015)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0151.png) +![](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_0151.png) #### 添加DNS设置到静态连接中 #### [root@localhost ~]# nmcli connection modify "static" ipv4.dns 202.131.124.4 -#### 添加额外的DNS值 #### +#### 添加更多的DNS #### -[root@localhost ~]# nmcli connection modify "static" +ipv4.dns 8.8.8.8 + [root@localhost ~]# nmcli connection modify "static" +ipv4.dns 8.8.8.8 **注意**:要使用额外的**+**符号,并且要是**+ipv4.dns**,而不是**ip4.dns**。 - -添加一个额外的ip地址: +####添加一个额外的ip地址#### [root@localhost ~]# nmcli connection modify "static" +ipv4.addresses 192.168.200.1/24 @@ -138,11 +137,11 @@ Again Check, whether ip address is changed or not. [root@localhost ~]# nmcli connection up eno1 -![unxmen_(016)](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_016.png) +![](http://www.unixmen.com/wp-content/uploads/2015/08/unxmen_016.png) 你会看见,设置生效了。 -完结 +完结。 -------------------------------------------------------------------------------- @@ -150,6 +149,6 @@ via: http://www.unixmen.com/basics-networkmanager-command-line-tool-nmcli/ 作者:Rajneesh Upadhyay 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From a0c5a6e951a91e6266cafdb1e0e1766935f6c7ea Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 17 Sep 2015 17:24:48 +0800 Subject: [PATCH 2097/2517] Update 20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md --- ... How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md index bceee2953b..63c2f115fa 100644 --- a/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md +++ b/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md @@ -1,13 +1,13 @@ 在ubunt 14.04/15.04 上配置Node JS v4.0.0 ================================================================================ -Hi everyone, Node.JS Version 4.0.0 has been out, the popular server-side JavaScript platform has combines the Node.js and io.js code bases. This release represents the combined efforts encapsulated in both the Node.js project and the io.js project that are now combined in a single codebase. The most important change is this Node.js is ships with version 4.5 of Google's V8 JavaScript engine, which is the same version that ships with the current Chrome browser. So, being able to more closely track V8’s releases means Node.js runs JavaScript faster, more securely, and with the ability to use many desirable ES6 language features. +大家好,Node.JS 4.0 发布了,主流的服务器端JS 平台已经将Node.js 和io.js 结合到一起。4.0 版就是两者结合的产物——共用一个代码库。这次最主要的变化是Node.js 封装了Google V8 4.5 JS 引擎,而这一版与当前的Chrome 一致。所以,紧跟V8 的版本号可以让Node.js 运行的更快、更安全,同时更好的利用ES6 的很多语言特性。 ![Node JS](http://blog.linoxide.com/wp-content/uploads/2015/09/nodejs.png) -Node.js 4.0.0 aims to provide an easy update path for current users of io.js and node as there are no major API changes. Let’s see how you can easily get it installed and setup on Ubuntu server by following this simple article. +Node.js 4.0 的目标是为io.js 当前用户提供一个简单的升级途径,所以这次并没有太多重要的API 变更。剩下的内容会让我们看到如何轻松的在ubuntu server 上安装、配置Node.js。 -### Basic System Setup ### +### 基础系统安装 ### Node works perfectly on Linux, Macintosh, and Solaris operating systems and among the Linux operating systems it has the best results using Ubuntu OS. That's why we are to setup it Ubuntu 15.04 while the same steps can be followed using Ubuntu 14.04. From 2d9aad0530ea5cbe8deedc9dd1f04b29d332ef24 Mon Sep 17 00:00:00 2001 From: Vic020 Date: Thu, 17 Sep 2015 21:50:09 +0800 Subject: [PATCH 2098/2517] Translated --- ...able Automatic System Updates In Ubuntu.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md b/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md index 3d69413a2f..ea320bd6e2 100644 --- a/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md +++ b/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md @@ -1,47 +1,45 @@ - Vic020 - -Enable Automatic System Updates In Ubuntu +开启Ubuntu系统自动升级 ================================================================================ -Before seeing **how to enable automatic system updates in Ubuntu**, first let’s see why should we do it in the first place. +在学习如何开启Ubuntu系统自动升级之前,先解释下为什么需要自动升级。 -By default Ubuntu checks for updates daily. When there are security updates, it shows immediately but for other updates (i.e. regular software updates) it pop ups once a week. So, if you have been using Ubuntu for a while, this may be a familiar sight for you: +默认情况下,ubuntu每天一次检查更新。但是一周只会弹出一次软件升级提醒,除非当有安全性升级时,才会立即弹出。所以,如果你已经使用Ubuntu一段时间,你肯定很熟悉这个画面: -![Software Update notification in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu.png) +![Ubuntu软件升级提醒](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu.png) -Now if you are a normal desktop user, you don’t really care about what kind of updates are these. And this is not entirely a bad thing. You trust Ubuntu to provide you good updates, right? So, you just select ‘Install Now’ most of the time, don’t you? +但是做为一个正常桌面用户,根本不会去关心有什么更新细节。而且这个提醒完全就是浪费时间,你肯定信任Ubuntu提供的升级补丁,对不对?所以,大部分情况你肯定会选择“现在安装”,对不对? -And all you do is to click on Install Now, why not enable the automatic system updates? Enabling automatic system updates means all the latest updates will be automatically downloaded and installed without requiring any actions from you. Isn’t it convenient? +所以,你需要做的就只是点一下升级按钮。现在,明白为什么需要自动系统升级了吧?开启自动系统升级意味着所有最新的更新都会自动下载并安装,并且没有请求确认。是不是很方便? -### Enable automatic updates in Ubuntu ### +### 开启Ubuntu自动升级 ### -I am using Ubuntu 15.04 in this tutorial but the steps are the same for Ubuntu 14.04 as well. +演示使用Ubuntu15.04,Ubuntu 14.04步骤类似。 -Go to Unity Dash and look for Software & Updates: +打开Unity Dash ,找到软件&更新: -![Ubuntu Software Update Settings](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Software_Update_Ubuntu.jpeg) +![Ubuntu 软件升级设置](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/08/Software_Update_Ubuntu.jpeg) -This will open the Software sources settings for you. Click on Updates tab here: +打开软件资源设置,切换到升级标签: -![Software Updates settings in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu-1.png) +![Ubuntu 软件升级设置](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu-1.png) -In here, you’ll see the default settings which is daily check for updates and immediate notification for security updates. +可以发现,默认设置就是每日检查并立即提醒安全升级。 -![Changing software update frequency](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu-2.png) +![改变软件更新频率](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu-2.png) -All you need to do is to change the action which reads “When there are” to “Download and install automatically”. This will download all the available updates and install them automatically. +改变 ‘当有安全升级’和‘当有其他升级’的选项为:下载并自动安装。 ![Automatic updates in Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Software-Update-Ubntu-3.png) -That’s it. Close it and you have automatic updates enabled in Ubuntu. In fact this tutorial is pretty similar to [changing update notification frequency in Ubuntu][1]. +关闭对话框完成设定。这样每次Ubuntu检查更新后就会自动升级。事实上,这篇文章十分类似[改变Ubuntu升级提醒频率][1]。 -Do you use automatic updates installation or you prefer to install them manually? +你喜欢自动升级还是手动安装升级呢?欢迎评论。 -------------------------------------------------------------------------------- via: http://itsfoss.com/automatic-system-updates-ubuntu/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) +译者:[Vic020/VicYu](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e3d095702450e39c78c80fbfbbf085b3c20d342e Mon Sep 17 00:00:00 2001 From: Vic020 Date: Thu, 17 Sep 2015 21:56:34 +0800 Subject: [PATCH 2099/2517] Moved --- .../tech/20150916 Enable Automatic System Updates In Ubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150916 Enable Automatic System Updates In Ubuntu.md (100%) diff --git a/sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md b/translated/tech/20150916 Enable Automatic System Updates In Ubuntu.md similarity index 100% rename from sources/tech/20150916 Enable Automatic System Updates In Ubuntu.md rename to translated/tech/20150916 Enable Automatic System Updates In Ubuntu.md From 016298b61e4a60a7bc2398d08aeaabfec03136ec Mon Sep 17 00:00:00 2001 From: KnightJoker <544133483@qq.com> Date: Thu, 17 Sep 2015 23:12:21 +0800 Subject: [PATCH 2100/2517] Translating by KnightJoker --- .../Learn with Linux--Master Your Math with These Linux Apps.md | 2 ++ 1 file changed, 2 insertions(+) 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 index f9def558fb..c70122d6c5 100644 --- 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 @@ -1,3 +1,5 @@ +Translating by KnightJoker + Learn with Linux: Master Your Math with These Linux Apps ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-featured.png) From abb5dce140736fb501967b7c826e6d3c0de04561 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 18 Sep 2015 00:36:19 +0800 Subject: [PATCH 2101/2517] =?UTF-8?q?=E7=BF=BB=E5=B7=B2=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md index 63c2f115fa..453ab2c234 100644 --- a/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md +++ b/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md @@ -9,85 +9,84 @@ Node.js 4.0 的目标是为io.js 当前用户提供一个简单的升级途径 ### 基础系统安装 ### -Node works perfectly on Linux, Macintosh, and Solaris operating systems and among the Linux operating systems it has the best results using Ubuntu OS. That's why we are to setup it Ubuntu 15.04 while the same steps can be followed using Ubuntu 14.04. - -#### 1) System Resources #### +Node 在Linux,Macintosh,Solaris 这几个系统上都可以完美的运行,同时linux 的发行版本当中Ubuntu 是最合适的。这也是我们为什么要尝试在ubuntu 15.04 上安装Node,当然了在14.04 上也可以使用相同的步骤安装。 +#### 1) 系统资源 #### The basic system resources for Node depend upon the size of your infrastructure requirements. So, here in this tutorial we will setup Node with 1 GB RAM, 1 GHz Processor and 10 GB of available disk space with minimal installation packages installed on the server that is no web or database server packages are installed. -#### 2) System Update #### +#### 2) 系统更新 #### It always been recommended to keep your system upto date with latest patches and updates, so before we move to the installation on Node, let's login to your server with super user privileges and run update command. # apt-get update -#### 3) Installing Dependencies #### +#### 3) 安装依赖 #### Node JS only requires some basic system and software utilities to be present on your server, for its successful installation like 'make' 'gcc' and 'wget'. Let's run the below command to get them installed if they are not already present. # apt-get install python gcc make g++ wget -### Download Latest Node JS v4.0.0 ### +### 下载最新版的Node JS v4.0.0 ### -Let's download the latest Node JS version 4.0.0 by following this link of [Node JS Download Page][1]. +使用链接 [Node JS Download Page][1] 下载源代码. ![nodejs download](http://blog.linoxide.com/wp-content/uploads/2015/09/download.png) -We will copy the link location of its latest package and download it using 'wget' command as shown. +我们会复制最新源代码的链接,然后用`wget` 下载,命令如下: # wget https://nodejs.org/download/rc/v4.0.0-rc.1/node-v4.0.0-rc.1.tar.gz -Once download completes, unpack using 'tar' command as shown. +下载完成后使用命令`tar` 解压缩: # tar -zxvf node-v4.0.0-rc.1.tar.gz ![wget nodejs](http://blog.linoxide.com/wp-content/uploads/2015/09/wget.png) -### Installing Node JS v4.0.0 ### +### 安装 Node JS v4.0.0 ### -Now we have to start the installation of Node JS from its downloaded source code. So, change your directory and configure the source code by running its configuration script before compiling it on your ubuntu server. +现在可以开始使用下载好的源代码编译Nod JS。你需要在ubuntu serve 上开始编译前运行配置脚本来修改你要使用目录和配置参数。 root@ubuntu-15:~/node-v4.0.0-rc.1# ./configure ![Installing NodeJS](http://blog.linoxide.com/wp-content/uploads/2015/09/configure.png) -Now run the 'make install' command to compile the Node JS installation package as shown. +现在运行命令'make install' 编译安装Node JS: root@ubuntu-15:~/node-v4.0.0-rc.1# make install -The make command will take a couple of minutes while compiling its binaries so after executinf above command, wait for a while and keep calm. +make 命令会花费几分钟完成编译,冷静的等待一会。 -### Testing Node JS Installation ### +### 验证Node 安装 ### -Once the compilation process is complete, we will test it if every thing went fine. Let's run the following command to confirm the installed version of Node JS. +一旦编译任务完成,我们就可以开始验证安装工作是否OK。我们运行下列命令来确认Node JS 的版本。 root@ubuntu-15:~# node -v v4.0.0-pre -By executing 'node' without any arguments from the command-line you will be dropped into the REPL (Read-Eval-Print-Loop) that has simplistic emacs line-editing where you can interactively run JavaScript and see the results. - +在命令行下不带参数的运行`node` 就会进入REPL(Read-Eval-Print-Loop,读-执行-输出-循环)模式,它有一个简化版的emacs 行编辑器,通过它你可以交互式的运行JS和查看运行结果。 ![node version](http://blog.linoxide.com/wp-content/uploads/2015/09/node.png) -### Writing Test Program ### +### 写测试程序 ### -We can also try out a very simple console program to test the successful installation and proper working of Node JS. To do so we will create a file named "test.js" and write the following code into it and save the changes made in the file as shown. +我们也可以写一个很简单的终端程序来测试安装是否成功,并且工作正常。要完成这一点,我们将会创建一个“tes.js” 文件,包含一下代码,操作如下: root@ubuntu-15:~# vim test.js var util = require("util"); console.log("Hello! This is a Node Test Program"); :wq! -Now in order to run the above program, from the command prompt run the below command. +现在为了运行上面的程序,在命令行运行下面的命令。 root@ubuntu-15:~# node test.js ![Node Program](http://blog.linoxide.com/wp-content/uploads/2015/09/node-test.png) -So, upon successful installation we will get the output as shown in the screen, where as in the above program it loads the "util" class into a variable "util" and then uses the "util" object to perform the console tasks. While the console.log is a command similar to the cout in C++. +在一个成功安装了Node JS 的环境下运行上面的程序就会在屏幕上得到上图所示的输出,这个程序加载类 “util” 到变量“util” 中,接着用对象“util” 运行终端任务,console.log 这个命令作用类似C++ 里的cout -### Conclusion ### +### 结论 ### That’s it. Hope this gives you a good idea of Node.js going with Node.js on Ubuntu. If you are new to developing applications with Node.js. After all we can say that we can expect significant performance gains with Node JS Version 4.0.0. +希望本文能够通过在ubuntu 上安装、运行Node.JS让你了解一下Node JS 的大概,如果你是刚刚开始使用Node.JS 开发应用程序。最后我们可以说我们能够通过Node JS v4.0.0 获取显著的性能。 -------------------------------------------------------------------------------- From b1f44f63b152c2545c4ed5df21411637e2c9ad50 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 18 Sep 2015 00:37:16 +0800 Subject: [PATCH 2102/2517] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=88=B0translated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 translated/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md diff --git a/translated/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/translated/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md new file mode 100644 index 0000000000..453ab2c234 --- /dev/null +++ b/translated/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md @@ -0,0 +1,102 @@ + +在ubunt 14.04/15.04 上配置Node JS v4.0.0 +================================================================================ +大家好,Node.JS 4.0 发布了,主流的服务器端JS 平台已经将Node.js 和io.js 结合到一起。4.0 版就是两者结合的产物——共用一个代码库。这次最主要的变化是Node.js 封装了Google V8 4.5 JS 引擎,而这一版与当前的Chrome 一致。所以,紧跟V8 的版本号可以让Node.js 运行的更快、更安全,同时更好的利用ES6 的很多语言特性。 + +![Node JS](http://blog.linoxide.com/wp-content/uploads/2015/09/nodejs.png) + +Node.js 4.0 的目标是为io.js 当前用户提供一个简单的升级途径,所以这次并没有太多重要的API 变更。剩下的内容会让我们看到如何轻松的在ubuntu server 上安装、配置Node.js。 + +### 基础系统安装 ### + +Node 在Linux,Macintosh,Solaris 这几个系统上都可以完美的运行,同时linux 的发行版本当中Ubuntu 是最合适的。这也是我们为什么要尝试在ubuntu 15.04 上安装Node,当然了在14.04 上也可以使用相同的步骤安装。 +#### 1) 系统资源 #### + +The basic system resources for Node depend upon the size of your infrastructure requirements. So, here in this tutorial we will setup Node with 1 GB RAM, 1 GHz Processor and 10 GB of available disk space with minimal installation packages installed on the server that is no web or database server packages are installed. + +#### 2) 系统更新 #### + +It always been recommended to keep your system upto date with latest patches and updates, so before we move to the installation on Node, let's login to your server with super user privileges and run update command. + + # apt-get update + +#### 3) 安装依赖 #### + +Node JS only requires some basic system and software utilities to be present on your server, for its successful installation like 'make' 'gcc' and 'wget'. Let's run the below command to get them installed if they are not already present. + + # apt-get install python gcc make g++ wget + +### 下载最新版的Node JS v4.0.0 ### + +使用链接 [Node JS Download Page][1] 下载源代码. + +![nodejs download](http://blog.linoxide.com/wp-content/uploads/2015/09/download.png) + +我们会复制最新源代码的链接,然后用`wget` 下载,命令如下: + + # wget https://nodejs.org/download/rc/v4.0.0-rc.1/node-v4.0.0-rc.1.tar.gz + +下载完成后使用命令`tar` 解压缩: + + # tar -zxvf node-v4.0.0-rc.1.tar.gz + +![wget nodejs](http://blog.linoxide.com/wp-content/uploads/2015/09/wget.png) + +### 安装 Node JS v4.0.0 ### + +现在可以开始使用下载好的源代码编译Nod JS。你需要在ubuntu serve 上开始编译前运行配置脚本来修改你要使用目录和配置参数。 + + root@ubuntu-15:~/node-v4.0.0-rc.1# ./configure + +![Installing NodeJS](http://blog.linoxide.com/wp-content/uploads/2015/09/configure.png) + +现在运行命令'make install' 编译安装Node JS: + + root@ubuntu-15:~/node-v4.0.0-rc.1# make install + +make 命令会花费几分钟完成编译,冷静的等待一会。 + +### 验证Node 安装 ### + +一旦编译任务完成,我们就可以开始验证安装工作是否OK。我们运行下列命令来确认Node JS 的版本。 + + root@ubuntu-15:~# node -v + v4.0.0-pre + +在命令行下不带参数的运行`node` 就会进入REPL(Read-Eval-Print-Loop,读-执行-输出-循环)模式,它有一个简化版的emacs 行编辑器,通过它你可以交互式的运行JS和查看运行结果。 +![node version](http://blog.linoxide.com/wp-content/uploads/2015/09/node.png) + +### 写测试程序 ### + +我们也可以写一个很简单的终端程序来测试安装是否成功,并且工作正常。要完成这一点,我们将会创建一个“tes.js” 文件,包含一下代码,操作如下: + + root@ubuntu-15:~# vim test.js + var util = require("util"); + console.log("Hello! This is a Node Test Program"); + :wq! + +现在为了运行上面的程序,在命令行运行下面的命令。 + + root@ubuntu-15:~# node test.js + +![Node Program](http://blog.linoxide.com/wp-content/uploads/2015/09/node-test.png) + +在一个成功安装了Node JS 的环境下运行上面的程序就会在屏幕上得到上图所示的输出,这个程序加载类 “util” 到变量“util” 中,接着用对象“util” 运行终端任务,console.log 这个命令作用类似C++ 里的cout + +### 结论 ### + +That’s it. Hope this gives you a good idea of Node.js going with Node.js on Ubuntu. If you are new to developing applications with Node.js. After all we can say that we can expect significant performance gains with Node JS Version 4.0.0. +希望本文能够通过在ubuntu 上安装、运行Node.JS让你了解一下Node JS 的大概,如果你是刚刚开始使用Node.JS 开发应用程序。最后我们可以说我们能够通过Node JS v4.0.0 获取显著的性能。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-node-js-4-0-ubuntu-14-04-15-04/ + +作者:[Kashif Siddique][a] +译者:[译者ID](https://github.com/osk874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/kashifs/ +[1]:https://nodejs.org/download/rc/v4.0.0-rc.1/ From 0e59499692182b2b3d137ddb4e8d6dc284d8e672 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 18 Sep 2015 00:37:39 +0800 Subject: [PATCH 2103/2517] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 102 ------------------ 1 file changed, 102 deletions(-) delete mode 100644 sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md diff --git a/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md deleted file mode 100644 index 453ab2c234..0000000000 --- a/sources/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md +++ /dev/null @@ -1,102 +0,0 @@ - -在ubunt 14.04/15.04 上配置Node JS v4.0.0 -================================================================================ -大家好,Node.JS 4.0 发布了,主流的服务器端JS 平台已经将Node.js 和io.js 结合到一起。4.0 版就是两者结合的产物——共用一个代码库。这次最主要的变化是Node.js 封装了Google V8 4.5 JS 引擎,而这一版与当前的Chrome 一致。所以,紧跟V8 的版本号可以让Node.js 运行的更快、更安全,同时更好的利用ES6 的很多语言特性。 - -![Node JS](http://blog.linoxide.com/wp-content/uploads/2015/09/nodejs.png) - -Node.js 4.0 的目标是为io.js 当前用户提供一个简单的升级途径,所以这次并没有太多重要的API 变更。剩下的内容会让我们看到如何轻松的在ubuntu server 上安装、配置Node.js。 - -### 基础系统安装 ### - -Node 在Linux,Macintosh,Solaris 这几个系统上都可以完美的运行,同时linux 的发行版本当中Ubuntu 是最合适的。这也是我们为什么要尝试在ubuntu 15.04 上安装Node,当然了在14.04 上也可以使用相同的步骤安装。 -#### 1) 系统资源 #### - -The basic system resources for Node depend upon the size of your infrastructure requirements. So, here in this tutorial we will setup Node with 1 GB RAM, 1 GHz Processor and 10 GB of available disk space with minimal installation packages installed on the server that is no web or database server packages are installed. - -#### 2) 系统更新 #### - -It always been recommended to keep your system upto date with latest patches and updates, so before we move to the installation on Node, let's login to your server with super user privileges and run update command. - - # apt-get update - -#### 3) 安装依赖 #### - -Node JS only requires some basic system and software utilities to be present on your server, for its successful installation like 'make' 'gcc' and 'wget'. Let's run the below command to get them installed if they are not already present. - - # apt-get install python gcc make g++ wget - -### 下载最新版的Node JS v4.0.0 ### - -使用链接 [Node JS Download Page][1] 下载源代码. - -![nodejs download](http://blog.linoxide.com/wp-content/uploads/2015/09/download.png) - -我们会复制最新源代码的链接,然后用`wget` 下载,命令如下: - - # wget https://nodejs.org/download/rc/v4.0.0-rc.1/node-v4.0.0-rc.1.tar.gz - -下载完成后使用命令`tar` 解压缩: - - # tar -zxvf node-v4.0.0-rc.1.tar.gz - -![wget nodejs](http://blog.linoxide.com/wp-content/uploads/2015/09/wget.png) - -### 安装 Node JS v4.0.0 ### - -现在可以开始使用下载好的源代码编译Nod JS。你需要在ubuntu serve 上开始编译前运行配置脚本来修改你要使用目录和配置参数。 - - root@ubuntu-15:~/node-v4.0.0-rc.1# ./configure - -![Installing NodeJS](http://blog.linoxide.com/wp-content/uploads/2015/09/configure.png) - -现在运行命令'make install' 编译安装Node JS: - - root@ubuntu-15:~/node-v4.0.0-rc.1# make install - -make 命令会花费几分钟完成编译,冷静的等待一会。 - -### 验证Node 安装 ### - -一旦编译任务完成,我们就可以开始验证安装工作是否OK。我们运行下列命令来确认Node JS 的版本。 - - root@ubuntu-15:~# node -v - v4.0.0-pre - -在命令行下不带参数的运行`node` 就会进入REPL(Read-Eval-Print-Loop,读-执行-输出-循环)模式,它有一个简化版的emacs 行编辑器,通过它你可以交互式的运行JS和查看运行结果。 -![node version](http://blog.linoxide.com/wp-content/uploads/2015/09/node.png) - -### 写测试程序 ### - -我们也可以写一个很简单的终端程序来测试安装是否成功,并且工作正常。要完成这一点,我们将会创建一个“tes.js” 文件,包含一下代码,操作如下: - - root@ubuntu-15:~# vim test.js - var util = require("util"); - console.log("Hello! This is a Node Test Program"); - :wq! - -现在为了运行上面的程序,在命令行运行下面的命令。 - - root@ubuntu-15:~# node test.js - -![Node Program](http://blog.linoxide.com/wp-content/uploads/2015/09/node-test.png) - -在一个成功安装了Node JS 的环境下运行上面的程序就会在屏幕上得到上图所示的输出,这个程序加载类 “util” 到变量“util” 中,接着用对象“util” 运行终端任务,console.log 这个命令作用类似C++ 里的cout - -### 结论 ### - -That’s it. Hope this gives you a good idea of Node.js going with Node.js on Ubuntu. If you are new to developing applications with Node.js. After all we can say that we can expect significant performance gains with Node JS Version 4.0.0. -希望本文能够通过在ubuntu 上安装、运行Node.JS让你了解一下Node JS 的大概,如果你是刚刚开始使用Node.JS 开发应用程序。最后我们可以说我们能够通过Node JS v4.0.0 获取显著的性能。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/setup-node-js-4-0-ubuntu-14-04-15-04/ - -作者:[Kashif Siddique][a] -译者:[译者ID](https://github.com/osk874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/kashifs/ -[1]:https://nodejs.org/download/rc/v4.0.0-rc.1/ From 10fe32ed8436a33afcf5f80193e6750978e78faf Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 18 Sep 2015 09:15:08 +0800 Subject: [PATCH 2104/2517] PUB:20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu @geekpi --- ... to remove unused old kernel images on Ubuntu.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md (84%) diff --git a/translated/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md b/published/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md similarity index 84% rename from translated/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md rename to published/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md index 61eec350a9..4ac40ff485 100644 --- a/translated/tech/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md +++ b/published/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md @@ -1,14 +1,14 @@ -Linux有问必答--如何删除Ubuntu上不再使用的老内核 +Linux有问必答:如何删除Ubuntu上不再使用的旧内核 ================================================================================ > **提问**:过去我已经在我的Ubuntu上升级了几次内核。现在我想要删除这些旧的内核镜像来节省我的磁盘空间。如何用最简单的方法删除Ubuntu上先前版本的内核? -在Ubuntu上,有几个方法来升级内核。在Ubuntu桌面中,软件更新允许你每天检查并更新到最新的内核上。在Ubuntu服务器上,一个无人值守的包会自动更新内核最为一项最要的安全更新。然而,你可以手动用apt-get或者aptitude命令来更新。 +在Ubuntu上,有几个方法来升级内核。在Ubuntu桌面中,软件更新允许你每天检查并更新到最新的内核上。在Ubuntu服务器上,最为重要的安全更新项目之一就是 unattended-upgrades 软件包会自动更新内核。然而,你也可以手动用apt-get或者aptitude命令来更新。 随着时间的流逝,持续的内核更新会在系统中积聚大量的不再使用的内核,浪费你的磁盘空间。每个内核镜像和其相关联的模块/头文件会占用200-400MB的磁盘空间,因此由不再使用的内核而浪费的磁盘空间会快速地增加。 ![](https://farm1.staticflickr.com/636/21352725115_29ae7aab5f_c.jpg) -GRUB管理器为每个旧内核都维护了一个GRUB入口,防止你想要进入它们。 +GRUB管理器为每个旧内核都维护了一个GRUB入口,以备你想要使用它们。 ![](https://farm6.staticflickr.com/5803/21164866468_07760fc23c_z.jpg) @@ -18,7 +18,7 @@ GRUB管理器为每个旧内核都维护了一个GRUB入口,防止你想要进 在删除旧内核之前,记住最好留有2个最近的内核(最新的和上一个版本),以防主要的版本出错。现在就让我们看看如何在Ubuntu上清理旧内核。 -在Ubuntu内核镜像包哈了以下的包。 +在Ubuntu内核镜像包含了以下的包。 - **linux-image-**: 内核镜像 - **linux-image-extra-**: 额外的内核模块 @@ -36,7 +36,6 @@ GRUB管理器为每个旧内核都维护了一个GRUB入口,防止你想要进 上面的命令会删除内核镜像和它相关联的内核模块和头文件。 -updated to remove the corresponding GRUB entry from GRUB menu. 注意如果你还没有升级内核那么删除旧内核会自动触发安装新内核。这样在删除旧内核之后,GRUB配置会自动升级来移除GRUB菜单中相关GRUB入口。 如果你有很多没用的内核,你可以用shell表达式来一次性地删除多个内核。注意这个括号表达式只在bash或者兼容的shell中才有效。 @@ -52,7 +51,7 @@ updated to remove the corresponding GRUB entry from GRUB menu. $ sudo update-grub2 -现在就重启来验证GRUB菜单已经正确清理了。 +现在就重启来验证GRUB菜单是否已经正确清理了。 ![](https://farm1.staticflickr.com/593/20731623163_cccfeac854_z.jpg) @@ -62,7 +61,7 @@ via: http://ask.xmodulo.com/remove-kernel-images-ubuntu.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From dd8db52e1074d0674450934b327c94b676b2381f Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 18 Sep 2015 09:34:37 +0800 Subject: [PATCH 2105/2517] PUB:20150906 Do Simple Math In Ubuntu And elementary OS With NaSC @ictlyh --- ...o Simple Math In Ubuntu And elementary OS With NaSC.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md (90%) diff --git a/translated/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md b/published/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md similarity index 90% rename from translated/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md rename to published/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md index d65beef2a5..5b3c20d03a 100644 --- a/translated/tech/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md +++ b/published/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md @@ -18,9 +18,9 @@ Elementary OS 它自己本身借鉴了 OS X,也就不奇怪它的很多第三 ### 在 Ubuntu、Elementary OS 和 Mint 上安装 NaSC ### -安装 NaSC 有一个可用的 PPA。PPA 中说 ‘每日’,意味着所有构建(包括不稳定),但作为我的快速测试,并没什么影响。 +安装 NaSC 有一个可用的 PPA。PPA 是 ‘每日’,意味着每日构建(意即,不稳定),但作为我的快速测试,并没什么影响。 -打卡一个终端并运行下面的命令: +打开一个终端并运行下面的命令: sudo apt-add-repository ppa:nasc-team/daily sudo apt-get update @@ -35,7 +35,7 @@ Elementary OS 它自己本身借鉴了 OS X,也就不奇怪它的很多第三 sudo apt-get remove nasc sudo apt-add-repository --remove ppa:nasc-team/daily -如果你试用了这个软件,要分享你的经验哦。除此之外,你也可以在第三方 Elementary OS 应用中体验[Vocal podcast app for Linux][3]。 +如果你试用了这个软件,要分享你的经验哦。除此之外,你也可以在第三方 Elementary OS 应用中体验 [Vocal podcast app for Linux][3]。 -------------------------------------------------------------------------------- @@ -43,7 +43,7 @@ via: http://itsfoss.com/math-ubuntu-nasc/ 作者:[Abhishek][a] 译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From dd74cfa2ae4729732aadb907da97f921ea279cc0 Mon Sep 17 00:00:00 2001 From: DongShuaike Date: Fri, 18 Sep 2015 09:36:39 +0800 Subject: [PATCH 2106/2517] Create 20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md --- ...R 0.98 INSTALL IN UBUNTU AND LINUX MINT.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md diff --git a/sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md b/sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md new file mode 100644 index 0000000000..ba371ca915 --- /dev/null +++ b/sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md @@ -0,0 +1,60 @@ +TERMINATOR 0.98: INSTALL IN UBUNTU AND LINUX MINT +================================================================================ +[Terminator][1] multiple terminals in one window. The goal of this project is to produce a useful tool for arranging terminals. It is inspired by programs such as gnome-multi-term, quadkonsole, etc. in that the main focus is arranging terminals in grids. Terminator 0.98 bringing a more polished tabs functionality, better layout saving/restoring, improved preferences UI and numerous bug fixes. + +![](http://www.ewikitech.com/wp-content/uploads/2015/09/Screenshot-from-2015-09-17-094828.png) + +###CHANGES/FEATURE TERMINATOR 0.98 +- Alayout launcher was added which allows easily switching between layouts (use Alt + L to open the new layout switcher); +- A new manual was added (use F1 to launch it); +- When saving, a layout now remembers the following: + - * maximised and fullscreen status + - * window titles + - * which tab was active + - * which terminal was active + - * working directory for each terminal +- Added options for enabling/disabling non-homogenous tabs and scroll arrows; +- Added shortcuts for scrolling up/down by line/half-page/page; +- Added Ctrl+MouseWheel Zoom in/out and Shift+MouseWheel page scroll up/down; +- Added shortcuts for next/prev profile; +- Improved consistency of Custom Commands menu; +- Added shortcuts/code to toggle All/Tab grouping; +- Improved watcher plugin; +- Added search bar wrap toggle; +- Major cleanup and reorganisation of the preferences window, including a complete revamp of the global tab. +- Added option to set how long ActivityWatcher plugin is quiet for; +- Many other improvements and bug fixes +- [Click Here To See Complete Changlog][2] + +###INSTALL TERMINATOR 0.98: + +Terminator 0.98 is available in PPA, Firstly we need to add repository in Ubuntu/Linux Mint system. Run following commands in terminal to install Terminator 0.98. + + $ sudo add-apt-repository ppa:gnome-terminator/nightly + $ sudo apt-get update + $ sudo apt-get install terminator + +If you want to remove terminator, simply run following command in terminal, (Optional) + + $ sudo apt-get remove terminator + + + + + +-------------------------------------------------------------------------------- + +via: http://www.ewikitech.com/articles/linux/terminator-install-ubuntu-linux-mint/ + +作者:[admin][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.ewikitech.com/author/admin/ +[1]:https://launchpad.net/terminator +[2]:http://bazaar.launchpad.net/~gnome-terminator/terminator/trunk/view/head:/ChangeLog + + + From f609fd494c7b0d9dd59226fcfe8d1d7e06b30644 Mon Sep 17 00:00:00 2001 From: runningwater Date: Fri, 18 Sep 2015 10:22:10 +0800 Subject: [PATCH 2107/2517] translating by runningwater --- ...Best command line tools for linux performance monitoring.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20140320 Best command line tools for linux performance monitoring.md b/sources/tech/20140320 Best command line tools for linux performance monitoring.md index 6b0ed1ebc4..eb77aa60d6 100644 --- a/sources/tech/20140320 Best command line tools for linux performance monitoring.md +++ b/sources/tech/20140320 Best command line tools for linux performance monitoring.md @@ -1,3 +1,4 @@ +(translating by runningwater) Best command line tools for linux performance monitoring ================================================================================ Sometimes a system can be slow and many reasons can be the root cause. To identify the process that is consuming memory, disk I/O or processor capacity you need to use tools to see what is happening in an operation system. @@ -67,7 +68,7 @@ The sar utility, which is part of the systat package, can be used to review hist via: http://lintut.com/best-command-line-tools-for-linux-performance-monitring/ 作者:[rasho][a] -译者:[译者ID](https://github.com/译者ID) +译者:[runningwater](https://github.com/runningwater) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From ffd53ee55e85409a54ce027904565eeaf0c90bc3 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 18 Sep 2015 11:55:57 +0800 Subject: [PATCH 2108/2517] =?UTF-8?q?=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这篇和你翻译的另外一篇基本上一致,不发表了。@ictlyh @DeadFire --- ...ple in Ubuntu or Elementary OS via NaSC.md | 62 ------------------- 1 file changed, 62 deletions(-) delete mode 100644 translated/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md diff --git a/translated/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md b/translated/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md deleted file mode 100644 index 2d74b1efa5..0000000000 --- a/translated/tech/20150906 Make Math Simple in Ubuntu or Elementary OS via NaSC.md +++ /dev/null @@ -1,62 +0,0 @@ -在 Ubuntu 和 Elementary 上使用 NaSC 做简单数学运算 -================================================================================ -![](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-icon.png) - -NaSC(Not a Soulver Clone,并非 Soulver 的克隆品)是为 Elementary 操作系统进行数学计算而设计的一款开源软件。类似于 Mac 上的 [Soulver][1]。 - -> 它能使你像平常那样进行计算。它允许你输入任何你想输入的,智能识别其中的数学部分并在右边面板打印出结果。然后你可以在后面的等式中使用这些结果,如果结果发生了改变,等式中使用的也会同样变化。 - -用 NaSC,你可以: - -- 自己定义复杂的计算 -- 改变单位和值(英尺、米、厘米,美元、欧元等) -- 了解行星的表面积 -- 解二次多项式 -- 以及其它 - -![nasc-eos](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-eos.jpg) - -第一次启动时,NaSC 提供了一个关于现有功能的教程。以后你还可以通过点击标题栏上的帮助图标再次查看。 - -![nasc-help](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-help.jpg) - -另外,这个软件还允许你保存文件以便以后继续工作。还可以在一定时间内通过粘贴板共用。 - -### 在 Ubuntu 或 Elementary OS Freya 上安装 NaSC: ### - -对于 Ubuntu 15.04,Ubuntu 15.10,Elementary OS Freya,从 Dash 或应用启动器中打开终端,逐条运行下面的命令: - -1. 通过命令添加 [NaSC PPA][2]: - - sudo apt-add-repository ppa:nasc-team/daily - -![nasc-ppa](http://ubuntuhandbook.org/wp-content/uploads/2015/09/nasc-ppa.jpg) - -2. 如果安装了 Synaptic 软件包管理器,点击 ‘Reload’ 后搜索并安装 ‘nasc’。 - -或者运行下面的命令更新系统缓存并安装软件: - - sudo apt-get update - - sudo apt-get install nasc - -3. **(可选)** 要卸载软件以及 NaSC,运行: - - sudo apt-get remove nasc && sudo add-apt-repository -r ppa:nasc-team/daily - -对于不想添加 PPA 的人,可以直接从[该网页][3]获取 .deb 安装包。、 - --------------------------------------------------------------------------------- - -via: http://ubuntuhandbook.org/index.php/2015/09/make-math-simple-in-ubuntu-elementary-os-via-nasc/ - -作者:[Ji m][a] -译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) -校对:[校对者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 606717fe970c7e64bccbe6f7b21abf63ddafca09 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 18 Sep 2015 12:31:04 +0800 Subject: [PATCH 2109/2517] Delete 20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md --- ... which CPU core a process is running on.md | 82 ------------------- 1 file changed, 82 deletions(-) delete mode 100644 sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md diff --git a/sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md b/sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md deleted file mode 100644 index ff305ad5ce..0000000000 --- a/sources/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md +++ /dev/null @@ -1,82 +0,0 @@ -translation by strugglingyouth -Linux FAQs with Answers--How to find out which CPU core a process is running on -================================================================================ -> Question: I have a Linux process running on my multi-core processor system. How can I find out which CPU core the process is running on? - -When you run performance-critical HPC applications or network-heavy workload on [multi-core NUMA processors][1], CPU/memory affinity is one important factor to consider to maximize their performance. Scheduling closely related processes on the same NUMA node can reduce slow remote memory access. On processors like Intel's Sandy Bridge processor which has an integrated PCIe controller, you want to schedule network I/O workload on the same NUMA node as the NIC card to exploit PCI-to-CPU affinity. - -As part of performance tuning or troubleshooting, you may want to know on which CPU core (or NUMA node) a particular process is currently scheduled. - -Here are several ways to **find out which CPU core is a given Linux process or a thread is scheduled on**. - -### Method One ### - -If a process is explicitly pinned to a particular CPU core using commands like [taskset][2], you can find out the pinned CPU using the following taskset command: - - $ taskset -c -p - -For example, if the process you are interested in has PID 5357: - - $ taskset -c -p 5357 - ----------- - - pid 5357's current affinity list: 5 - -The output says the process is pinned to CPU core 5. - -However, if you haven't explicitly pinned the process to any CPU core, you will get something like the following as the affinity list. - - pid 5357's current affinity list: 0-11 - -The output indicates that the process can potentially be scheduled on any CPU core from 0 to 11. So in this case, taskset is not useful in identifying which CPU core the process is currently assigned to, and you should use other methods as described below. - -### Method Two ### - -The ps command can tell you the CPU ID each process/thread is currently assigned to (under "PSR" column). - - $ ps -o pid,psr,comm -p - ----------- - - PID PSR COMMAND - 5357 10 prog - -The output says the process with PID 5357 (named "prog") is currently running on CPU core 10. If the process is not pinned, the PSR column can keep changing over time depending on where the kernel scheduler assigns the process. - -### Method Three ### - -The top command can also show the CPU assigned to a given process. First, launch top command with "p" option. Then press 'f' key, and add "Last used CPU" column to the display. The currently used CPU core will appear under "P" (or "PSR") column. - - $ top -p 5357 - -![](https://farm6.staticflickr.com/5698/21429268426_e7d1d73a04_c.jpg) - -Compared to ps command, the advantage of using top command is that you can continuously monitor how the assigned CPU changes over time. - -### Method Four ### - -Yet another method to check the currently used CPU of a process/thread is to use [htop command][3]. - -Launch htop from the command line. Press key, go to "Columns", and add PROCESSOR under "Available Columns". - -The currently used CPU ID of each process will appear under "CPU" column. - -![](https://farm6.staticflickr.com/5788/21444522832_a5a206f600_c.jpg) - -Note that all previous commands taskset, ps and top assign CPU core IDs 0, 1, 2, ..., N-1. However, htop assigns CPU core IDs starting from 1 (upto N). - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/cpu-core-process-is-running.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://ask.xmodulo.com/author/nanni -[1]:http://xmodulo.com/identify-cpu-processor-architecture-linux.html -[2]:http://xmodulo.com/run-program-process-specific-cpu-cores-linux.html -[3]:http://ask.xmodulo.com/install-htop-centos-rhel.html From 8c7b7778bc887d31828d7a76d05822737266fb9e Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 18 Sep 2015 12:31:38 +0800 Subject: [PATCH 2110/2517] Create 20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md --- ... which CPU core a process is running on.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 translated/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md diff --git a/translated/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md b/translated/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md new file mode 100644 index 0000000000..d901b95030 --- /dev/null +++ b/translated/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md @@ -0,0 +1,82 @@ +Linux 有问必答--如何找出哪个 CPU 内核正在运行进程 +================================================================================ +>问题:我有个 Linux 进程运行在多核处理器系统上。怎样才能找出哪个 CPU 内核正在运行该进程? + +当你运行需要较高性能的 HPC 程序或非常消耗网络资源的程序在 [多核 NUMA 处理器上][1],CPU/memory 的亲和力是限度其发挥最大性能的重要因素之一。在同一 NUMA 节点上调整程序的亲和力可以减少远程内存访问。像英特尔 Sandy Bridge 处理器,该处理器有一个集成的 PCIe 控制器,要调整同一 NUMA 节点的网络 I/O 负载可以使用 网卡控制 PCI 和 CPU 亲和力。 + +由于性能优化和故障排除只是一部分,你可能想知道哪个 CPU 内核(或 NUMA 节点)被调度运行特定的进程。 + +这里有几种方法可以 **找出哪个 CPU 内核被调度来运行 给定的 Linux 进程或线程**。 + +### 方法一 ### + +如果一个进程明确的被固定到 CPU 的特定内核,如使用 [taskset][2] 命令,你可以使用 taskset 命令找出被固定的 CPU 内核: + + $ taskset -c -p + +例如, 如果你对 PID 5357 这个进程有兴趣: + + $ taskset -c -p 5357 + +---------- + + pid 5357's current affinity list: 5 + +输出显示这个过程被固定在 CPU 内核 5。 + +但是,如果你没有明确固定进程到任何 CPU 内核,你会得到类似下面的亲和力列表。 + + pid 5357's current affinity list: 0-11 + +输出表明,该进程可能会被安排在从0到11中的任何一个 CPU 内核。在这种情况下,taskset 不会识别该进程当前被分配给哪个 CPU 内核,你应该使用如下所述的方法。 + +### 方法二 ### + +ps 命令可以告诉你每个进程/线程目前分配到的 (在“PSR”列)CPU ID。 + + + $ ps -o pid,psr,comm -p + +---------- + + PID PSR COMMAND + 5357 10 prog + +输出表示进程的 PID 为 5357(名为"prog")目前在CPU 内核 10 上运行着。如果该过程没有被固定,PSR 列可以保持随着时间变化,内核可能调度该进程到不同位置。 + +### 方法三 ### + +top 命令也可以显示 CPU 被分配给哪个进程。首先,在top 命令中使用“P”选项。然后按“f”键,显示中会出现 "Last used CPU" 列。目前使用的 CPU 内核将出现在 “P”(或“PSR”)列下。 + + $ top -p 5357 + +![](https://farm6.staticflickr.com/5698/21429268426_e7d1d73a04_c.jpg) + +相比于 ps 命令,使用 top 命令的好处是,你可以连续监视随着时间的改变, CPU 是如何分配的。 + +### 方法四 ### + +另一种来检查一个进程/线程当前使用的是哪个 CPU 内核的方法是使用 [htop 命令][3]。 + +从命令行启动 htop。按 键,进入"Columns",在"Available Columns"下会添加 PROCESSOR。 + +每个进程当前使用的 CPU ID 将出现在“CPU”列中。 + +![](https://farm6.staticflickr.com/5788/21444522832_a5a206f600_c.jpg) + +请注意,所有以前使用的命令 taskset,ps 和 top 分配CPU 内核的 IDs 为 0,1,2,...,N-1。然而,htop 分配 CPU 内核 IDs 从 1开始(直到 N)。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/cpu-core-process-is-running.html + +作者:[Dan Nanni][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/identify-cpu-processor-architecture-linux.html +[2]:http://xmodulo.com/run-program-process-specific-cpu-cores-linux.html +[3]:http://ask.xmodulo.com/install-htop-centos-rhel.html From 615f47739b4c4edf7036d5c890cf8a16284e9376 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 18 Sep 2015 14:37:51 +0800 Subject: [PATCH 2111/2517] PUB:RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between @FSSlc --- ...Boot Shutdown and Everything in Between.md | 152 +++++++++++++ ...Boot Shutdown and Everything in Between.md | 214 ------------------ 2 files changed, 152 insertions(+), 214 deletions(-) create mode 100644 published/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md delete mode 100644 translated/tech/RHCSA/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md diff --git a/published/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md b/published/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md new file mode 100644 index 0000000000..36caaf5294 --- /dev/null +++ b/published/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md @@ -0,0 +1,152 @@ +RHCSA 系列(五): RHEL7 中的进程管理:开机,关机 +================================================================================ +我们将概括和简要地复习从你按开机按钮来打开你的 RHEL 7 服务器到呈现出命令行界面的登录屏幕之间所发生的所有事情,以此来作为这篇文章的开始。 + +![RHEL 7 开机过程](http://www.tecmint.com/wp-content/uploads/2015/03/RHEL-7-Boot-Process.png) + +*Linux 开机过程* + +**请注意:** + +1. 相同的基本原则也可以应用到其他的 Linux 发行版本中,但可能需要较小的更改,并且 +2. 下面的描述并不是旨在给出开机过程的一个详尽的解释,而只是介绍一些基础的东西 + +### Linux 开机过程 ### + +1. 初始化 POST(加电自检)并执行硬件检查; + +2. 当 POST 完成后,系统的控制权将移交给启动管理器的第一阶段(first stage),它存储在一个硬盘的引导扇区(对于使用 BIOS 和 MBR 的旧式的系统而言)或存储在一个专门的 (U)EFI 分区上。 + +3. 启动管理器的第一阶段完成后,接着进入启动管理器的第二阶段(second stage),通常大多数使用的是 GRUB(GRand Unified Boot Loader 的简称),它驻留在 `/boot` 中,然后开始加载内核和驻留在 RAM 中的初始化文件系统(被称为 initramfs,它包含执行必要操作所需要的程序和二进制文件,以此来最终挂载真实的根文件系统)。 + +4. 接着展示了闪屏(splash)过后,呈现在我们眼前的是类似下图的画面,它允许我们选择一个操作系统和内核来启动: + + ![RHEL 7 开机屏幕](http://www.tecmint.com/wp-content/uploads/2015/03/RHEL-7-Boot-Screen.png) + + *启动菜单屏幕* + +5. 内核会对接入到系统的硬件进行设置,当根文件系统被挂载后,接着便启动 PID 为 1 的进程,这个进程将开始初始化其他的进程并最终呈现给我们一个登录提示符界面。 + + 注意:假如我们想在启动后查看这些信息,我们可以使用 [dmesg 命令][1],并使用这个系列里的上一篇文章中介绍过的工具(注:即 grep)来过滤它的输出。 + + ![登录屏幕和进程的 PID](http://www.tecmint.com/wp-content/uploads/2015/03/Login-Screen-Process-PID.png) + + *登录屏幕和进程的 PID* + +在上面的例子中,我们使用了大家熟知的 `ps` 命令来显示在系统启动过程中的一系列当前进程的信息,它们的父进程(或者换句话说,就是那个开启这些进程的进程)为 systemd(大多数现代的 Linux 发行版本已经切换到的系统和服务管理器): + + # ps -o ppid,pid,uname,comm --ppid=1 + +记住 `-o`(为 -format 的简写)选项允许你以一个自定义的格式来显示 ps 的输出,以此来满足你的需求;这个自定义格式使用 `man ps` 里 STANDARD FORMAT SPECIFIERS 一节中的特定关键词。 + +另一个你想自定义 ps 的输出而不是使用其默认输出的情形是:当你需要找到引起 CPU 或内存消耗过多的那些进程,并按照下列方式来对它们进行排序时: + + # ps aux --sort=+pcpu # 以 %CPU 来排序(增序) + # ps aux --sort=-pcpu # 以 %CPU 来排序(降序) + # ps aux --sort=+pmem # 以 %MEM 来排序(增序) + # ps aux --sort=-pmem # 以 %MEM 来排序(降序) + # ps aux --sort=+pcpu,-pmem # 结合 %CPU (增序) 和 %MEM (降序)来排列 + +![http://www.tecmint.com/wp-content/uploads/2015/03/ps-command-output.png](http://www.tecmint.com/wp-content/uploads/2015/03/ps-command-output.png) + +*自定义 ps 命令的输出* + +### systemd 的一个介绍 ### + +在 Linux 世界中,很少有能比在主流的 Linux 发行版本中采用 systemd 引起更多的争论的决定。systemd 的倡导者根据以下事实来表明其主要的优势: + +1. 在系统启动期间,systemd 允许并发地启动更多的进程(相比于先前的 SysVinit,SysVinit 似乎总是表现得更慢,因为它一个接一个地启动进程,检查一个进程是否依赖于另一个进程,然后等待守护进程启动才可以启动的更多的服务),并且 +2. 在一个运行着的系统中,它用作一个动态的资源管理器。这样在启动期间,当一个服务被需要时,才启动它(以此来避免消耗系统资源)而不是在没有一个合理的原因的情况下启动额外的服务。 +3. 向后兼容 sysvinit 的脚本。 + + 另外请阅读: ['init' 和 'systemd' 背后的故事][2] + +systemd 由 systemctl 工具控制,假如你了解 SysVinit,你将会对以下的内容感到熟悉: + +- service 工具,在旧一点的系统中,它被用来管理 SysVinit 脚本,以及 +- chkconfig 工具,为系统服务升级和查询运行级别信息 +- shutdown 你一定使用过几次来重启或关闭一个运行的系统。 + +下面的表格展示了使用传统的工具和 systemctl 之间的相似之处: + + +| 旧式工具 | Systemctl 等价命令 | 描述 | +|-------------|----------------------|-------------| +| service name start | systemctl start name | 启动 name (这里 name 是一个服务) | +| service name stop | systemctl stop name | 停止 name | +| service name condrestart | systemctl try-restart name | 重启 name (如果它已经运行了) | +| service name restart | systemctl restart name | 重启 name | +| service name reload | systemctl reload name | 重载 name 的配置 | +| service name status | systemctl status name | 显示 name 的当前状态 | +| service - status-all | systemctl | 显示当前所有服务的状态 | +| chkconfig name on | systemctl enable name | 通过一个特定的单元文件,让 name 可以在系统启动时运行(这个文件是一个符号链接)。启用或禁用一个启动时的进程,实际上是增加或移除一个到 /etc/systemd/system 目录中的符号链接。 | +| chkconfig name off | systemctl disable name | 通过一个特定的单元文件,让 name 可以在系统启动时禁止运行(这个文件是一个符号链接)。 | +| chkconfig -list name | systemctl is-enabled name | 确定 name (一个特定的服务)当前是否启用。| +| chkconfig - list | systemctl - type=service | 显示所有的服务及其是否启用或禁用。 | +| shutdown -h now | systemctl poweroff | 关机 | +| shutdown -r now | systemctl reboot | 重启系统 | + +systemd 也引进了单元(unit)(它可能是一个服务,一个挂载点,一个设备或者一个网络套接字)和目标(target)(它们定义了 systemd 如何去管理和同时开启几个相关的进程,可以认为它们与在基于 SysVinit 的系统中的运行级别等价,尽管事实上它们并不等价)的概念。 + +### 总结归纳 ### + +其他与进程管理相关,但并不仅限于下面所列的功能的任务有: + +**1. 在考虑到系统资源的使用上,调整一个进程的执行优先级:** + +这是通过 `renice` 工具来完成的,它可以改变一个或多个正在运行着的进程的调度优先级。简单来说,调度优先级是一个允许内核(当前只支持 >= 2.6 的版本)根据某个给定进程被分配的执行优先级(即友善度(niceness),从 -20 到 19)来为其分配系统资源的功能。 + +`renice` 的基本语法如下: + + # renice [-n] priority [-gpu] identifier + +在上面的通用命令中,第一个参数是将要使用的优先级数值,而另一个参数可以是进程 ID(这是默认的设定),进程组 ID,用户 ID 或者用户名。一个常规的用户(即除 root 以外的用户)只可以更改他或她所拥有的进程的调度优先级,并且只能增加友善度的层次(这意味着占用更少的系统资源)。 + +![在 Linux 中调整进程的优先级](http://www.tecmint.com/wp-content/uploads/2015/03/Process-Scheduling-Priority.png) + +*进程调度优先级* + +**2. 按照需要杀死一个进程(或终止其正常执行):** + +更精确地说,杀死一个进程指的是通过 [kill 或 pkill][3] 命令给该进程发送一个信号,让它优雅地(SIGTERM=15)或立即(SIGKILL=9)结束它的执行。 + +这两个工具的不同之处在于前一个被用来终止一个特定的进程或一个进程组,而后一个则允许你通过进程的名称和其他属性,执行相同的动作。 + +另外, pkill 与 pgrep 相捆绑,pgrep 提供将受符合的进程的 PID 给 pkill 来使用。例如,在运行下面的命令之前: + + # pkill -u gacanepa + +查看一眼由 gacanepa 所拥有的 PID 或许会带来点帮助: + + # pgrep -l -u gacanepa + +![找到用户拥有的 PID](http://www.tecmint.com/wp-content/uploads/2015/03/Find-PIDs-of-User.png) + +*找到用户拥有的 PID* + +默认情况下,kill 和 pkiill 都发送 SIGTERM 信号给进程,如我们上面提到的那样,这个信号可以被忽略(即该进程可能会终止其自身的执行,也可能不终止),所以当你因一个合理的理由要真正地停止一个运行着的进程,则你将需要在命令行中带上特定的 SIGKILL 信号: + + # kill -9 identifier # 杀死一个进程或一个进程组 + # kill -s SIGNAL identifier # 同上 + # pkill -s SIGNAL identifier # 通过名称或其他属性来杀死一个进程 + +### 结论 ### + +在这篇文章中,我们解释了在 RHEL 7 系统中,有关开机启动过程的基本知识,并分析了一些可用的工具来帮助你通过使用一般的程序和 systemd 特有的命令来管理进程。 + +请注意,这个列表并不旨在涵盖有关这个话题的所有花哨的工具,请随意使用下面的评论栏来添加你自已钟爱的工具和命令。同时欢迎你的提问和其他的评论。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/rhcsa-exam-boot-process-and-process-management/ + +作者:[Gabriel Cánepa][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/gacanepa/ +[1]:https://linux.cn/article-3587-1.html +[2]:http://www.tecmint.com/systemd-replaces-init-in-linux/ +[3]:https://linux.cn/article-2116-1.html diff --git a/translated/tech/RHCSA/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md b/translated/tech/RHCSA/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md deleted file mode 100644 index 91e2482e49..0000000000 --- a/translated/tech/RHCSA/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md +++ /dev/null @@ -1,214 +0,0 @@ -RHECSA 系列:RHEL7 中的进程管理:开机,关机,以及两者之间的所有其他事项 – Part 5 -================================================================================ -我们将概括和简要地复习从你按开机按钮来打开你的 RHEL 7 服务器到呈现出命令行界面的登录屏幕之间所发生的所有事情,以此来作为这篇文章的开始。 - -![RHEL 7 开机过程](http://www.tecmint.com/wp-content/uploads/2015/03/RHEL-7-Boot-Process.png) - -Linux 开机过程 - -**请注意:** - -1. 相同的基本原则也可以应用到其他的 Linux 发行版本中,但可能需要较小的更改,并且 -2. 下面的描述并不是旨在给出开机过程的一个详尽的解释,而只是介绍一些基础的东西 - -### Linux 开机过程 ### - -1.初始化 POST(加电自检)并执行硬件检查; - -2.当 POST 完成后,系统的控制权将移交给启动管理器的第一阶段,它存储在一个硬盘的引导扇区(对于使用 BIOS 和 MBR 的旧式的系统)或存储在一个专门的 (U)EFI 分区上。 - -3.启动管理器的第一阶段完成后,接着进入启动管理器的第二阶段,通常大多数使用的是 GRUB(GRand Unified Boot Loader 的简称),它驻留在 `/boot` 中,反过来加载内核和驻留在 RAM 中的初始化文件系统(被称为 initramfs,它包含执行必要操作所需要的程序和二进制文件,以此来最终挂载真实的根文件系统)。 - -4.接着经历了闪屏过后,呈现在我们眼前的是类似下图的画面,它允许我们选择一个操作系统和内核来启动: - -![RHEL 7 开机屏幕](http://www.tecmint.com/wp-content/uploads/2015/03/RHEL-7-Boot-Screen.png) - -启动菜单屏幕 - -5.然后内核对挂载到系统的硬件进行设置,一旦根文件系统被挂载,接着便启动 PID 为 1 的进程,反过来这个进程将初始化其他的进程并最终呈现给我们一个登录提示符界面。 - -注意:假如我们想在后面这样做(注:这句话我总感觉不通顺,不明白它的意思,希望改一下),我们可以使用 [dmesg 命令][1](注:这篇文章已经翻译并发表了,链接是 https://linux.cn/article-3587-1.html )并使用这个系列里的上一篇文章中解释过的工具(注:即 grep)来过滤它的输出。 - -![登录屏幕和进程的 PID](http://www.tecmint.com/wp-content/uploads/2015/03/Login-Screen-Process-PID.png) - -登录屏幕和进程的 PID - -在上面的例子中,我们使用了众所周知的 `ps` 命令来显示在系统启动过程中的一系列当前进程的信息,它们的父进程(或者换句话说,就是那个开启这些进程的进程) 为 systemd(大多数现代的 Linux 发行版本已经切换到的系统和服务管理器): - - # ps -o ppid,pid,uname,comm --ppid=1 - -记住 `-o`(为 -format 的简写)选项允许你以一个自定义的格式来显示 ps 的输出,以此来满足你的需求;这个自定义格式使用 man ps 里 STANDARD FORMAT SPECIFIERS 一节中的特定关键词。 - -另一个你想自定义 ps 的输出而不是使用其默认输出的情形是:当你需要找到引起 CPU 或内存消耗过多的那些进程,并按照下列方式来对它们进行排序时: - - # ps aux --sort=+pcpu # 以 %CPU 来排序(增序) - # ps aux --sort=-pcpu # 以 %CPU 来排序(降序) - # ps aux --sort=+pmem # 以 %MEM 来排序(增序) - # ps aux --sort=-pmem # 以 %MEM 来排序(降序) - # ps aux --sort=+pcpu,-pmem # 结合 %CPU (增序) 和 %MEM (降序)来排列 - -![http://www.tecmint.com/wp-content/uploads/2015/03/ps-command-output.png](http://www.tecmint.com/wp-content/uploads/2015/03/ps-command-output.png) - -自定义 ps 命令的输出 - -### systemd 的一个介绍 ### - -在 Linux 世界中,很少有决定能够比在主流的 Linux 发行版本中采用 systemd 引起更多的争论。systemd 的倡导者根据以下事实命名其主要的优势: - -另外请阅读: ['init' 和 'systemd' 背后的故事][2] - -1. 在系统启动期间,systemd 允许并发地启动更多的进程(相比于先前的 SysVinit,SysVinit 似乎总是表现得更慢,因为它一个接一个地启动进程,检查一个进程是否依赖于另一个进程,然后等待守护进程去开启可以开始的更多的服务),并且 -2. 在一个运行着的系统中,它作为一个动态的资源管理器来工作。这样在开机期间,当一个服务被需要时,才启动它(以此来避免消耗系统资源)而不是在没有一个合理的原因的情况下启动额外的服务。 -3. 向后兼容 sysvinit 的脚本。 - -systemd 由 systemctl 工具控制,假如你带有 SysVinit 背景,你将会对以下的内容感到熟悉: - -- service 工具, 在旧一点的系统中,它被用来管理 SysVinit 脚本,以及 -- chkconfig 工具, 为系统服务升级和查询运行级别信息 -- shutdown, 你一定使用过几次来重启或关闭一个运行的系统。 - -下面的表格展示了使用传统的工具和 systemctl 之间的相似之处: - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Legacy toolSystemctl equivalentDescription
service name startsystemctl start nameStart name (where name is a service)
service name stopsystemctl stop nameStop name
service name condrestartsystemctl try-restart nameRestarts name (if it’s already running)
service name restartsystemctl restart nameRestarts name
service name reloadsystemctl reload nameReloads the configuration for name
service name statussystemctl status nameDisplays the current status of name
service –status-allsystemctlDisplays the status of all current services
chkconfig name onsystemctl enable nameEnable name to run on startup as specified in the unit file (the file to which the symlink points). The process of enabling or disabling a service to start automatically on boot consists in adding or removing symbolic links inside the /etc/systemd/system directory.
chkconfig name offsystemctl disable nameDisables name to run on startup as specified in the unit file (the file to which the symlink points)
chkconfig –list namesystemctl is-enabled nameVerify whether name (a specific service) is currently enabled
chkconfig –listsystemctl –type=serviceDisplays all services and tells whether they are enabled or disabled
shutdown -h nowsystemctl poweroffPower-off the machine (halt)
shutdown -r nowsystemctl rebootReboot the system
- -systemd 也引进了单元(它可能是一个服务,一个挂载点,一个设备或者一个网络套接字)和目标(它们定义了 systemd 如何去管理和同时开启几个相关的进程,并可认为它们与在基于 SysVinit 的系统中的运行级别等价,尽管事实上它们并不等价)。 - -### 总结归纳 ### - -其他与进程管理相关,但并不仅限于下面所列的功能的任务有: - -**1. 在考虑到系统资源的使用上,调整一个进程的执行优先级:** - -这是通过 `renice` 工具来完成的,它可以改变一个或多个正在运行着的进程的调度优先级。简单来说,调度优先级是一个允许内核(当前只支持 >= 2.6 的版本)根据某个给定进程被分配的执行优先级(即优先级,从 -20 到 19)来为其分配系统资源的功能。 - -`renice` 的基本语法如下: - - # renice [-n] priority [-gpu] identifier - -在上面的通用命令中,第一个参数是将要使用的优先级数值,而另一个参数可以解释为进程 ID(这是默认的设定),进程组 ID,用户 ID 或者用户名。一个常规的用户(即除 root 以外的用户)只可以更改他或她所拥有的进程的调度优先级,并且只能增加优先级的层次(这意味着占用更少的系统资源)。 - -![在 Linux 中调整进程的优先级](http://www.tecmint.com/wp-content/uploads/2015/03/Process-Scheduling-Priority.png) - -进程调度优先级 - -**2. 按照需要杀死一个进程(或终止其正常执行):** - -更精确地说,杀死一个进程指的是通过 [kill 或 pkill][3]命令给该进程发送一个信号,让它优雅地(SIGTERM=15)或立即(SIGKILL=9)结束它的执行。 - -这两个工具的不同之处在于前一个被用来终止一个特定的进程或一个进程组,而后一个则允许你在进程的名称和其他属性的基础上,执行相同的动作。 - -另外, pkill 与 pgrep 相捆绑,pgrep 提供将受影响的进程的 PID 给 pkill 来使用。例如,在运行下面的命令之前: - - # pkill -u gacanepa - -查看一眼由 gacanepa 所拥有的 PID 或许会带来点帮助: - - # pgrep -l -u gacanepa - -![找到用户拥有的 PID](http://www.tecmint.com/wp-content/uploads/2015/03/Find-PIDs-of-User.png) - -找到用户拥有的 PID - -默认情况下,kill 和 pkiill 都发送 SIGTERM 信号给进程,如我们上面提到的那样,这个信号可以被忽略(即该进程可能会终止其自身的执行或者不终止),所以当你因一个合理的理由要真正地停止一个运行着的进程,则你将需要在命令行中带上特定的 SIGKILL 信号: - - # kill -9 identifier # 杀死一个进程或一个进程组 - # kill -s SIGNAL identifier # 同上 - # pkill -s SIGNAL identifier # 通过名称或其他属性来杀死一个进程 - -### 结论 ### - -在这篇文章中,我们解释了在 RHEL 7 系统中,有关开机启动过程的基本知识,并分析了一些可用的工具来帮助你通过使用一般的程序和 systemd 特有的命令来管理进程。 - -请注意,这个列表并不旨在涵盖有关这个话题的所有花哨的工具,请随意使用下面的评论栏来添加你自已钟爱的工具和命令。同时欢迎你的提问和其他的评论。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/rhcsa-exam-boot-process-and-process-management/ - -作者:[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/dmesg-commands/ -[2]:http://www.tecmint.com/systemd-replaces-init-in-linux/ -[3]:http://www.tecmint.com/how-to-kill-a-process-in-linux/ From a2be4dbf95984395c2bb8c58964a2951d93d86ae Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 18 Sep 2015 17:28:59 +0800 Subject: [PATCH 2112/2517] =?UTF-8?q?20150918-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Remove Bookmarks In Ubuntu Beginner Tip.md | 48 ++++++ ...0918 Install Justniffer In Ubuntu 15.04.md | 151 ++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md create mode 100644 sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md diff --git a/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md b/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md new file mode 100644 index 0000000000..9249a66e4d --- /dev/null +++ b/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md @@ -0,0 +1,48 @@ +How To Add And Remove Bookmarks In Ubuntu [Beginner Tip] +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Add-Bookmark.jpg) + +In this quick tip for absolute beginners, I am going to show you how to add bookmarks in Ubuntu File manager, Files. + +Now, if you wonder why would you do that, the answer is pretty simple. It gives you quick access, right in the left sidebar. For example, I [installed Copy in Ubuntu][1]. Now it has been created in /Home/Copy. Not a big deal to go in Home and then go in Copy directory, but I would like to access it rather quickly. So, I add a bookmark to it so that I would be able to access it from the sidebar. + +### Add a bookmark in Ubuntu ### + +Open Files. Go to the location which you want to save for quick access. You need to be inside the directory to bookmark it. + +Now, you have two ways to do it. + +#### Option 1: #### + +When you are in Files (file explorer in Ubuntu), look at the top for the global menu. You would see Bookmarks. Click on it and you’ll see the option to add the current location as boomark. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Add-Bookmark-Ubuntu.jpeg) + +#### Option 2: #### + +You can simply press Ctrl+D and the current location will be added as a bookmark. + +As you can see, here is the newly added Copy directory in the left sidebar for quick access: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Add-Bookmark-Ubuntu-1.jpeg) + +### Manage Bookmarks ### + +If you think you have got too many bookmarks or if you added a bookmark by mistake, you can remove a bookmark easily. Press Ctrl+B to access all the bookmarks. Here, select the desired bookmark and click on – to delete it. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Remove-bookmark-ubuntu.png) + +That’s all you need to do to manage bookmarks in Ubuntu. I know it might be trivial with most of the users, but it might help people who are absolutely new to Ubuntu. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/add-remove-bookmarks-ubuntu/ + +作者:[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://itsfoss.com/install-copy-in-ubuntu-14-04/ \ No newline at end of file diff --git a/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md b/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md new file mode 100644 index 0000000000..b4db9d16ba --- /dev/null +++ b/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md @@ -0,0 +1,151 @@ +Install Justniffer In Ubuntu 15.04 +================================================================================ +### Introduction ### + +[Justniffer][1] is a network protocol analyzer that can be used as alternative to Snort. It is a very popular network analyzer tool, it work interactively to trace/sniff a live network. It can capture traffic from a live environment, support “lipcap” a “tcpdump” file formats. It helps the users to perform analysis in a complex network where it is difficult to capture traffic with wireshark. Specially it help to analyze application layer traffic very significantly and can extract http contents like images, scripts, HTML etc easily. Justsniffer is helpful in understanding how communication occur among different components. + +### Features ### + +This is the advantage of Justniffer that it collect all traffic from a complex network without affecting system performance, and can save logs for future analysis, some of the important features of Justniffer are: + +#### 1. Reliable TCP flow rebuilding #### + +It can record and reassemble TCP segments and IP fragments using a portion of host Linux kernel. + +#### 2. Logging #### + +Log are saved for future analysis and can be customized as and when required. + +#### 3. Extensible #### + +Can be extended with external python, perl and bash scripts to get some additional results from analysis reports. + +#### 4. Performance Management #### + +Retrieve information on the basis of Connection time, close time, response time or request time etc. + +### Installation ### + +Justsniffer can be installed with ppa. + +To add the repo, run: + + $ sudo add-apt-repository ppa:oreste-notelli/ppa + +Update System: + + $ sudo apt-get update + +Install Justniffer tool: + + $ sudo apt-get install justniffer + +It failed to install in make then i run following command and try to reinstall service + + $ sudo apt-get -f install + +### Examples ### + +First of all verify installed version of Justniffer with -V option, you will need super user privileges to utilize that tool. + + $ sudo justniffer -V + +Sample output: + +![j](http://www.unixmen.com/wp-content/uploads/2015/09/j.png) + +**1. Dump Traffic to terminal in apache like format for eth1 interface, type** + + $ sudo justniffer -i eth1 + +Sample output: + +![Selection_001](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0013.png) + +**2. You can trace running tcp stream with following option** + + $ sudo justniffer -i eth1 -r + +Sample output: + +![Selection_002](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0023.png) + +**3. To get the response time of web server, type** + + $ sudo justniffer -i eth1 -a " %response.time" + +Sample output: + +![Selection_003](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0033.png) + +**4. Read a tcpdump captured file with Justniffer** + +First, capture traffic with tcpdump. + + $ sudo tcpdump -w /tmp/file.cap -s0 -i eth0 + +Now access that data with justniffer + + $ justniffer -f file.cap + +Sample output: + +![Selection_005](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0056.png) + +**5. Capture http only data** + + $ sudo justniffer -i eth1 -r -p "port 80 or port 8080" + +Sample output: + +![Selection_006](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0064.png) + +**6. Get http only data from a specific host** + + $ justniffer -i eth1 -r -p "host 192.168.1.250 and tcp port 80" + +Sample output: + +![Selection_007](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0074.png) + +**7. Capture data in a more preciser format** + +When you will type **justniffer -h** You will see a lots of format key words which help to get data in more preciser way + + $ justniffer -h + +Sample Output: + +![Selection_008](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0083.png) + +Let us retrieve data with some predefined parameter provided with justniffer + + $ justniffer -i eth1 -l "%request.timestamp %request.header.host %request.url %response.time" + +Sample Output: + +![Selection_009](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0094.png) + +There are lots of option which you can explore. + +### Conclusion ### + +Justniffer is a very nice tool for network testing. In my view users who are using Snort for network sniffing will know justniffer as an less complicated tool. It is provided with a lots of **FORMAT KEYWORDS** which are very helpful to retrieve data in specific formats as per your need. You can log your network in .cap file formats which can be analyzed later on to monitor network service performance. + +**Reference:** + +- [Justniffer website][2] + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-justniffer-ubuntu-15-04/ + +作者:[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/ +[1]:http://sourceforge.net/projects/justniffer/?source=directory +[2]:http://justniffer.sourceforge.net/ \ No newline at end of file From 48cd390ced57f8faaa4b749d529779260efe16fb Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 19 Sep 2015 08:59:46 +0800 Subject: [PATCH 2113/2517] translating --- ... How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md b/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md index 9249a66e4d..dbb21cc226 100644 --- a/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md +++ b/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md @@ -1,3 +1,5 @@ +translating---geekpi + How To Add And Remove Bookmarks In Ubuntu [Beginner Tip] ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Add-Bookmark.jpg) @@ -45,4 +47,4 @@ via: http://itsfoss.com/add-remove-bookmarks-ubuntu/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/install-copy-in-ubuntu-14-04/ \ No newline at end of file +[1]:http://itsfoss.com/install-copy-in-ubuntu-14-04/ From 2b4400f7b7a00a006a2626457f49d0987424dbad Mon Sep 17 00:00:00 2001 From: Luoyuanhao Date: Sat, 19 Sep 2015 09:03:12 +0800 Subject: [PATCH 2114/2517] Translating sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md --- .../20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md | 1 + sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md | 1 + ... through TLS using Network Security Service NSS for Apache.md | 1 + 3 files changed, 3 insertions(+) diff --git a/sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md b/sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md index ba371ca915..862a5bd9b5 100644 --- a/sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md +++ b/sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md @@ -1,3 +1,4 @@ +ictlyh Translating TERMINATOR 0.98: INSTALL IN UBUNTU AND LINUX MINT ================================================================================ [Terminator][1] multiple terminals in one window. The goal of this project is to produce a useful tool for arranging terminals. It is inspired by programs such as gnome-multi-term, quadkonsole, etc. in that the main focus is arranging terminals in grids. Terminator 0.98 bringing a more polished tabs functionality, better layout saving/restoring, improved preferences UI and numerous bug fixes. diff --git a/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md b/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md index b4db9d16ba..92d7db0bd9 100644 --- a/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md +++ b/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md @@ -1,3 +1,4 @@ +ictlyh Translating Install Justniffer In Ubuntu 15.04 ================================================================================ ### Introduction ### diff --git a/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md b/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md index 317b2b3292..a316797ebd 100644 --- a/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md +++ b/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md @@ -1,3 +1,4 @@ +ictlyh Translating RHCE Series: Implementing HTTPS through TLS using Network Security Service (NSS) for Apache ================================================================================ If you are a system administrator who is in charge of maintaining and securing a web server, you can’t afford to not devote your very best efforts to ensure that data served by or going through your server is protected at all times. From ab25dd89d2cce1cf7aa7a04d832893e566150624 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 19 Sep 2015 09:16:18 +0800 Subject: [PATCH 2115/2517] translated --- ...Remove Bookmarks In Ubuntu Beginner Tip.md | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md b/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md index dbb21cc226..25388915af 100644 --- a/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md +++ b/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md @@ -1,47 +1,45 @@ -translating---geekpi - -How To Add And Remove Bookmarks In Ubuntu [Beginner Tip] +如何在Ubuntu中添加和删除书签[新手技巧] ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Add-Bookmark.jpg) -In this quick tip for absolute beginners, I am going to show you how to add bookmarks in Ubuntu File manager, Files. +这是一篇对完全是新手的一篇技巧,我将向你展示如何在Ubuntu文件管理器中添加书签。 -Now, if you wonder why would you do that, the answer is pretty simple. It gives you quick access, right in the left sidebar. For example, I [installed Copy in Ubuntu][1]. Now it has been created in /Home/Copy. Not a big deal to go in Home and then go in Copy directory, but I would like to access it rather quickly. So, I add a bookmark to it so that I would be able to access it from the sidebar. +现在如果你想知道为什么要这么做,答案很简单。它可以让你可以快速地在左边栏中访问。比如。我[在Ubuntu中安装了Copy][1]。现在它创建了/Home/Copy。先进入Home目录再进入Copy目录并不是一件大事,但是我想要更快地访问它。因此我添加了一个书签这样我就可以直接从侧边栏访问了。 -### Add a bookmark in Ubuntu ### +### 在Ubuntu中添加书签 ### -Open Files. Go to the location which you want to save for quick access. You need to be inside the directory to bookmark it. +打开Files。进入你想要保存快速访问的目录。你需要在标记书签的目录里面。 -Now, you have two ways to do it. +现在,你有两种方法。 -#### Option 1: #### +#### 方法1: #### -When you are in Files (file explorer in Ubuntu), look at the top for the global menu. You would see Bookmarks. Click on it and you’ll see the option to add the current location as boomark. +当你在Files中时(Ubuntu中的文件管理器),查看顶部菜单。你会看到书签按钮。点击它你会看到将当前路径保存为书签的选项。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Add-Bookmark-Ubuntu.jpeg) -#### Option 2: #### +#### 方法 2: #### -You can simply press Ctrl+D and the current location will be added as a bookmark. +你可以直接按下Ctrl+D就可以将当前位置保存位书签。 -As you can see, here is the newly added Copy directory in the left sidebar for quick access: +如你所见,这里左边栏就有一个新添加的Copy目录: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Add-Bookmark-Ubuntu-1.jpeg) -### Manage Bookmarks ### +### 管理书签 ### -If you think you have got too many bookmarks or if you added a bookmark by mistake, you can remove a bookmark easily. Press Ctrl+B to access all the bookmarks. Here, select the desired bookmark and click on – to delete it. +如果你不想要太多的书签或者你错误地添加了一个书签,你可以很简单地删除它。按下Ctrl+B查看所有的书签。现在选择想要删除的书签并点击删除。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Remove-bookmark-ubuntu.png) -That’s all you need to do to manage bookmarks in Ubuntu. I know it might be trivial with most of the users, but it might help people who are absolutely new to Ubuntu. +这就是在Ubuntu中管理书签需要做的。我知道这对于大多数用户而言很贱,但是这也许多Ubuntu的新手而言或许还有用。 -------------------------------------------------------------------------------- via: http://itsfoss.com/add-remove-bookmarks-ubuntu/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e6a549f59cd1acb9710ef0ae30d05528bc3f18c5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 19 Sep 2015 09:16:55 +0800 Subject: [PATCH 2116/2517] Rename sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md to translated/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md --- ...0918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md (100%) diff --git a/sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md b/translated/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md similarity index 100% rename from sources/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md rename to translated/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md From 8aacc129220137e9916036e0fa5994083616f159 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 19 Sep 2015 09:18:06 +0800 Subject: [PATCH 2117/2517] translating --- sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md b/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md index b4db9d16ba..ff4220c863 100644 --- a/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md +++ b/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md @@ -1,3 +1,6 @@ +translating----geekpi + + Install Justniffer In Ubuntu 15.04 ================================================================================ ### Introduction ### @@ -148,4 +151,4 @@ via: http://www.unixmen.com/install-justniffer-ubuntu-15-04/ [a]:http://www.unixmen.com/author/rajneesh/ [1]:http://sourceforge.net/projects/justniffer/?source=directory -[2]:http://justniffer.sourceforge.net/ \ No newline at end of file +[2]:http://justniffer.sourceforge.net/ From 9d6b1ed7c9ab90d9cf8eb87620dac1a26e9f5bdf Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 19 Sep 2015 09:22:41 +0800 Subject: [PATCH 2118/2517] Update 20150918 Install Justniffer In Ubuntu 15.04.md --- sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md b/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md index ff4220c863..d1c49dd960 100644 --- a/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md +++ b/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md @@ -1,6 +1,3 @@ -translating----geekpi - - Install Justniffer In Ubuntu 15.04 ================================================================================ ### Introduction ### From 8bab4141cb090a0218549925ae927b482fca7a3b Mon Sep 17 00:00:00 2001 From: Luoyuanhao Date: Sat, 19 Sep 2015 10:11:46 +0800 Subject: [PATCH 2119/2517] [Translated] tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md tech/20150918 Install Justniffer In Ubuntu 15.04.md [Move] tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md --- ...R 0.98 INSTALL IN UBUNTU AND LINUX MINT.md | 61 ------- ...0918 Install Justniffer In Ubuntu 15.04.md | 152 ------------------ ... which CPU core a process is running on.md | 0 ...R 0.98 INSTALL IN UBUNTU AND LINUX MINT.md | 60 +++++++ ...0918 Install Justniffer In Ubuntu 15.04.md | 151 +++++++++++++++++ 5 files changed, 211 insertions(+), 213 deletions(-) delete mode 100644 sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md delete mode 100644 sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md rename translated/{ => tech}/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md (100%) create mode 100644 translated/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md create mode 100644 translated/tech/20150918 Install Justniffer In Ubuntu 15.04.md diff --git a/sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md b/sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md deleted file mode 100644 index 862a5bd9b5..0000000000 --- a/sources/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md +++ /dev/null @@ -1,61 +0,0 @@ -ictlyh Translating -TERMINATOR 0.98: INSTALL IN UBUNTU AND LINUX MINT -================================================================================ -[Terminator][1] multiple terminals in one window. The goal of this project is to produce a useful tool for arranging terminals. It is inspired by programs such as gnome-multi-term, quadkonsole, etc. in that the main focus is arranging terminals in grids. Terminator 0.98 bringing a more polished tabs functionality, better layout saving/restoring, improved preferences UI and numerous bug fixes. - -![](http://www.ewikitech.com/wp-content/uploads/2015/09/Screenshot-from-2015-09-17-094828.png) - -###CHANGES/FEATURE TERMINATOR 0.98 -- Alayout launcher was added which allows easily switching between layouts (use Alt + L to open the new layout switcher); -- A new manual was added (use F1 to launch it); -- When saving, a layout now remembers the following: - - * maximised and fullscreen status - - * window titles - - * which tab was active - - * which terminal was active - - * working directory for each terminal -- Added options for enabling/disabling non-homogenous tabs and scroll arrows; -- Added shortcuts for scrolling up/down by line/half-page/page; -- Added Ctrl+MouseWheel Zoom in/out and Shift+MouseWheel page scroll up/down; -- Added shortcuts for next/prev profile; -- Improved consistency of Custom Commands menu; -- Added shortcuts/code to toggle All/Tab grouping; -- Improved watcher plugin; -- Added search bar wrap toggle; -- Major cleanup and reorganisation of the preferences window, including a complete revamp of the global tab. -- Added option to set how long ActivityWatcher plugin is quiet for; -- Many other improvements and bug fixes -- [Click Here To See Complete Changlog][2] - -###INSTALL TERMINATOR 0.98: - -Terminator 0.98 is available in PPA, Firstly we need to add repository in Ubuntu/Linux Mint system. Run following commands in terminal to install Terminator 0.98. - - $ sudo add-apt-repository ppa:gnome-terminator/nightly - $ sudo apt-get update - $ sudo apt-get install terminator - -If you want to remove terminator, simply run following command in terminal, (Optional) - - $ sudo apt-get remove terminator - - - - - --------------------------------------------------------------------------------- - -via: http://www.ewikitech.com/articles/linux/terminator-install-ubuntu-linux-mint/ - -作者:[admin][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.ewikitech.com/author/admin/ -[1]:https://launchpad.net/terminator -[2]:http://bazaar.launchpad.net/~gnome-terminator/terminator/trunk/view/head:/ChangeLog - - - diff --git a/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md b/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md deleted file mode 100644 index 92d7db0bd9..0000000000 --- a/sources/tech/20150918 Install Justniffer In Ubuntu 15.04.md +++ /dev/null @@ -1,152 +0,0 @@ -ictlyh Translating -Install Justniffer In Ubuntu 15.04 -================================================================================ -### Introduction ### - -[Justniffer][1] is a network protocol analyzer that can be used as alternative to Snort. It is a very popular network analyzer tool, it work interactively to trace/sniff a live network. It can capture traffic from a live environment, support “lipcap” a “tcpdump” file formats. It helps the users to perform analysis in a complex network where it is difficult to capture traffic with wireshark. Specially it help to analyze application layer traffic very significantly and can extract http contents like images, scripts, HTML etc easily. Justsniffer is helpful in understanding how communication occur among different components. - -### Features ### - -This is the advantage of Justniffer that it collect all traffic from a complex network without affecting system performance, and can save logs for future analysis, some of the important features of Justniffer are: - -#### 1. Reliable TCP flow rebuilding #### - -It can record and reassemble TCP segments and IP fragments using a portion of host Linux kernel. - -#### 2. Logging #### - -Log are saved for future analysis and can be customized as and when required. - -#### 3. Extensible #### - -Can be extended with external python, perl and bash scripts to get some additional results from analysis reports. - -#### 4. Performance Management #### - -Retrieve information on the basis of Connection time, close time, response time or request time etc. - -### Installation ### - -Justsniffer can be installed with ppa. - -To add the repo, run: - - $ sudo add-apt-repository ppa:oreste-notelli/ppa - -Update System: - - $ sudo apt-get update - -Install Justniffer tool: - - $ sudo apt-get install justniffer - -It failed to install in make then i run following command and try to reinstall service - - $ sudo apt-get -f install - -### Examples ### - -First of all verify installed version of Justniffer with -V option, you will need super user privileges to utilize that tool. - - $ sudo justniffer -V - -Sample output: - -![j](http://www.unixmen.com/wp-content/uploads/2015/09/j.png) - -**1. Dump Traffic to terminal in apache like format for eth1 interface, type** - - $ sudo justniffer -i eth1 - -Sample output: - -![Selection_001](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0013.png) - -**2. You can trace running tcp stream with following option** - - $ sudo justniffer -i eth1 -r - -Sample output: - -![Selection_002](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0023.png) - -**3. To get the response time of web server, type** - - $ sudo justniffer -i eth1 -a " %response.time" - -Sample output: - -![Selection_003](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0033.png) - -**4. Read a tcpdump captured file with Justniffer** - -First, capture traffic with tcpdump. - - $ sudo tcpdump -w /tmp/file.cap -s0 -i eth0 - -Now access that data with justniffer - - $ justniffer -f file.cap - -Sample output: - -![Selection_005](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0056.png) - -**5. Capture http only data** - - $ sudo justniffer -i eth1 -r -p "port 80 or port 8080" - -Sample output: - -![Selection_006](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0064.png) - -**6. Get http only data from a specific host** - - $ justniffer -i eth1 -r -p "host 192.168.1.250 and tcp port 80" - -Sample output: - -![Selection_007](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0074.png) - -**7. Capture data in a more preciser format** - -When you will type **justniffer -h** You will see a lots of format key words which help to get data in more preciser way - - $ justniffer -h - -Sample Output: - -![Selection_008](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0083.png) - -Let us retrieve data with some predefined parameter provided with justniffer - - $ justniffer -i eth1 -l "%request.timestamp %request.header.host %request.url %response.time" - -Sample Output: - -![Selection_009](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0094.png) - -There are lots of option which you can explore. - -### Conclusion ### - -Justniffer is a very nice tool for network testing. In my view users who are using Snort for network sniffing will know justniffer as an less complicated tool. It is provided with a lots of **FORMAT KEYWORDS** which are very helpful to retrieve data in specific formats as per your need. You can log your network in .cap file formats which can be analyzed later on to monitor network service performance. - -**Reference:** - -- [Justniffer website][2] - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/install-justniffer-ubuntu-15-04/ - -作者:[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/ -[1]:http://sourceforge.net/projects/justniffer/?source=directory -[2]:http://justniffer.sourceforge.net/ \ No newline at end of file diff --git a/translated/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md b/translated/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md similarity index 100% rename from translated/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md rename to translated/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md diff --git a/translated/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md b/translated/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md new file mode 100644 index 0000000000..d571566c62 --- /dev/null +++ b/translated/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md @@ -0,0 +1,60 @@ +在 Ubuntu 和 Linux Mint 上安装 Terminator 0.98 +================================================================================ +[Terminator][1],在一个窗口中有多个终端。该项目的目标之一是为管理终端提供一个有用的工具。它的灵感来自于类似 gnome-multi-term,quankonsole 等程序,这些程序关注于在窗格中管理终端。 Terminator 0.98 带来了更完美的标签功能,更好的布局保存/恢复,改进了偏好用户界面和多出 bug 修复。 + +![](http://www.ewikitech.com/wp-content/uploads/2015/09/Screenshot-from-2015-09-17-094828.png) + +###TERMINATOR 0.98 的更改和新特性 +- 添加了一个布局启动器,允许在不用布局之间简单切换(用 Alt + L 打开一个新的布局切换器); +- 添加了一个新的手册(使用 F1 打开); +- 保存的时候,布局现在会记住: + - * 最大化和全屏状态 + - * 窗口标题 + - * 激活的标签 + - * 激活的终端 + - * 每个终端的工作目录 +- 添加选项用于启用/停用非同质标签和滚动箭头; +- 添加快捷键用于按行/半页/一页向上/下滚动; +- 添加使用 Ctrl+鼠标滚轮放大/缩小,Shift+鼠标滚轮向上/下滚动页面; +- 为下一个/上一个 profile 添加快捷键 +- 改进自定义命令菜单的一致性 +- 新增快捷方式/代码来切换所有/标签分组; +- 改进监视插件 +- 增加搜索栏切换; +- 清理和重新组织窗口偏好,包括一个完整的全局便签更新 +- 添加选项用于设置 ActivityWatcher 插件静默时间 +- 其它一些改进和 bug 修复 +- [点击此处查看完整更新日志][2] + +### 安装 Terminator 0.98: + +Terminator 0.98 有可用的 PPA,首先我们需要在 Ubuntu/Linux Mint 上添加库。在终端里运行下面的命令来安装 Terminator 0.98。 + + $ sudo add-apt-repository ppa:gnome-terminator/nightly + $ sudo apt-get update + $ sudo apt-get install terminator + +如果你想要移除 Terminator,只需要在终端中运行下面的命令(可选) + + $ sudo apt-get remove terminator + + + + + +-------------------------------------------------------------------------------- + +via: http://www.ewikitech.com/articles/linux/terminator-install-ubuntu-linux-mint/ + +作者:[admin][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.ewikitech.com/author/admin/ +[1]:https://launchpad.net/terminator +[2]:http://bazaar.launchpad.net/~gnome-terminator/terminator/trunk/view/head:/ChangeLog + + + diff --git a/translated/tech/20150918 Install Justniffer In Ubuntu 15.04.md b/translated/tech/20150918 Install Justniffer In Ubuntu 15.04.md new file mode 100644 index 0000000000..1d711ea08b --- /dev/null +++ b/translated/tech/20150918 Install Justniffer In Ubuntu 15.04.md @@ -0,0 +1,151 @@ +在 Ubuntu 15.04 上安装 Justniffer +================================================================================ +### 简介 ### + +[Justniffer][1] 是一个可用于替换 Snort 的网络协议分析器。它非常流行,可交互式地跟踪/探测一个网络连接。它能从实时环境中抓取流量,支持 “lipcap” 和 “tcpdump” 文件格式。它可以帮助用户分析一个用 wireshark 难以抓包的复杂网络。尤其是它可以有效的帮助分析应用层流量,能提取类似图像、脚本、HTML 等 http 内容。Justniffer 有助于理解不同组件之间是如何通信的。 + +### 功能 ### + +Justniffer 收集一个复杂网络的所有流量而不影响系统性能,这是 Justniffer 的一个优势,它还可以保存日志用于之后的分析,Justniffer 其它一些重要功能包括: + +#### 1. 可靠的 TCP 流重建 #### + +它可以使用主机 Linux 内核的一部分用于记录并重现 TCP 片段和 IP 片段。 + +#### 2. 日志 #### + +保存日志用于之后的分析,并能自定义保存内容和时间。 + +#### 3. 可扩展 #### + +可以通过外部 python、 perl 和 bash 脚本扩展来从分析报告中获取一些额外的结果。 + +#### 4. 性能管理 #### + +基于连接时间、关闭时间、响应时间或请求时间等提取信息。 + +### 安装 ### + +Justniffer 可以通过 PPA 安装: + +运行下面命令添加库: + + $ sudo add-apt-repository ppa:oreste-notelli/ppa + +更新系统: + + $ sudo apt-get update + +安装 Justniffer 工具: + + $ sudo apt-get install justniffer + +make 的时候失败了,然后我运行下面的命令并尝试重新安装服务 + + $ sudo apt-get -f install + +### 事例 ### + +首先用 -v 选项验证安装的 Justniffer 版本,你需要用超级用户权限来使用这个工具。 + + $ sudo justniffer -V + +事例输出: + +![j](http://www.unixmen.com/wp-content/uploads/2015/09/j.png) + +**1. 为 eth1 接口导出 apache 中的流量到终端** + + $ sudo justniffer -i eth1 + +事例输出: + +![Selection_001](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0013.png) + +**2. 可以永恒下面的选项跟踪正在运行的 tcp 流** + + $ sudo justniffer -i eth1 -r + +事例输出: + +![Selection_002](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0023.png) + +**3. 获取 web 服务器的响应时间** + + $ sudo justniffer -i eth1 -a " %response.time" + +事例输出: + +![Selection_003](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0033.png) + +**4. 使用 Justniffer 读取一个 tcpdump 抓取的文件** + +首先,用 tcpdump 抓取流量。 + + $ sudo tcpdump -w /tmp/file.cap -s0 -i eth0 + +然后用 Justniffer 访问数据 + + $ justniffer -f file.cap + +事例输出: + +![Selection_005](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0056.png) + +**5. 只抓取 http 数据** + + $ sudo justniffer -i eth1 -r -p "port 80 or port 8080" + +事例输出: + +![Selection_006](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0064.png) + +**6. 从一个指定主机获取 http 数据** + + $ justniffer -i eth1 -r -p "host 192.168.1.250 and tcp port 80" + +事例输出: + +![Selection_007](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0074.png) + +**7. 以更精确的格式抓取数据** + +当你输入 **justniffer -h** 的时候你可以看到很多用于以更精确的方式获取数据的格式关键字 + + $ justniffer -h + +事例输出: + +![Selection_008](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0083.png) + +让我们用 Justniffer 根据预先定义的参数提取数据 + + $ justniffer -i eth1 -l "%request.timestamp %request.header.host %request.url %response.time" + +事例输出: + +![Selection_009](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0094.png) + +其中还有很多你可以探索的选项 + +### 总结 ### + +Justniffer 是用于网络测试一个很好的工具。在我看来对于那些用 Snort 来进行网络探测的用户来说,Justniffer 是一个更简单的工具。它提供了很多 **格式关键字** 用于按照你的需要精确地提取数据。你可以用 .cap 文件格式记录网络信息,之后用于分析监视网络服务性能。 + +**参考资料:** + +- [Justniffer 官网][2] + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-justniffer-ubuntu-15-04/ + +作者:[Rajneesh Upadhyay][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/rajneesh/ +[1]:http://sourceforge.net/projects/justniffer/?source=directory +[2]:http://justniffer.sourceforge.net/ \ No newline at end of file From 9f7c2398586ebdb59018d7cfbef3145835b02645 Mon Sep 17 00:00:00 2001 From: icybreaker Date: Sat, 19 Sep 2015 11:03:18 +0800 Subject: [PATCH 2120/2517] icybreaker translating --- sources/talk/20150901 Is Linux Right For You.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150901 Is Linux Right For You.md b/sources/talk/20150901 Is Linux Right For You.md index 89044347ec..ddbffa8481 100644 --- a/sources/talk/20150901 Is Linux Right For You.md +++ b/sources/talk/20150901 Is Linux Right For You.md @@ -1,3 +1,4 @@ +icybreaker translating... Is Linux Right For You? ================================================================================ > Not everyone should opt for Linux -- for many users, remaining with Windows or OSX is the better choice. @@ -60,4 +61,4 @@ via: http://www.datamation.com/open-source/is-linux-right-for-you.html [a]:http://www.datamation.com/author/Matt-Hartley-3080.html [1]:http://www.psychocats.net/ubuntu/virtualbox [2]:http://www.howtogeek.com/howto/14912/create-a-persistent-bootable-ubuntu-usb-flash-drive/ -[3]:http://www.linuxandubuntu.com/home/dual-boot-ubuntu-15-04-14-10-and-windows-10-8-1-8-step-by-step-tutorial-with-screenshots \ No newline at end of file +[3]:http://www.linuxandubuntu.com/home/dual-boot-ubuntu-15-04-14-10-and-windows-10-8-1-8-step-by-step-tutorial-with-screenshots From 3227161d2200c51a5fa404abe8917666bdba9111 Mon Sep 17 00:00:00 2001 From: Luoyuanhao Date: Sun, 20 Sep 2015 09:08:42 +0800 Subject: [PATCH 2121/2517] [Translating]sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md --- ...mands to Manage File Types and System Time in Linu--Part 3.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md b/sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md index 2226b72297..6f4d1a63f5 100644 --- a/sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md +++ b/sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md @@ -1,3 +1,4 @@ +ictlyh Translating 5 Useful Commands to Manage File Types and System Time in Linux – Part 3 ================================================================================ Adapting to using the command line or terminal can be very hard for beginners who want to learn Linux. Because the terminal gives more control over a Linux system than GUIs programs, one has to get a used to running commands on the terminal. Therefore to memorize different commands in Linux, you should use the terminal on a daily basis to understand how commands are used with different options and arguments. From 7774856c6fc51b65a61bfca7c50760a502a8fa36 Mon Sep 17 00:00:00 2001 From: Luoyuanhao Date: Sun, 20 Sep 2015 10:38:26 +0800 Subject: [PATCH 2122/2517] [Translated]sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md --- ...Network Security Service NSS for Apache.md | 212 ------------------ ...Network Security Service NSS for Apache.md | 210 +++++++++++++++++ 2 files changed, 210 insertions(+), 212 deletions(-) delete mode 100644 sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md create mode 100644 translated/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md diff --git a/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md b/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md deleted file mode 100644 index a316797ebd..0000000000 --- a/sources/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md +++ /dev/null @@ -1,212 +0,0 @@ -ictlyh Translating -RHCE Series: Implementing HTTPS through TLS using Network Security Service (NSS) for Apache -================================================================================ -If you are a system administrator who is in charge of maintaining and securing a web server, you can’t afford to not devote your very best efforts to ensure that data served by or going through your server is protected at all times. - -![Setup Apache HTTPS Using SSL/TLS](http://www.tecmint.com/wp-content/uploads/2015/09/Setup-Apache-SSL-TLS-Server.png) - -RHCE Series: Implementing HTTPS through TLS using Network Security Service (NSS) for Apache – Part 8 - -In order to provide more secure communications between web clients and servers, the HTTPS protocol was born as a combination of HTTP and SSL (Secure Sockets Layer) or more recently, TLS (Transport Layer Security). - -Due to some serious security breaches, SSL has been deprecated in favor of the more robust TLS. For that reason, in this article we will explain how to secure connections between your web server and clients using TLS. - -This tutorial assumes that you have already installed and configured your Apache web server. If not, please refer to following article in this site before proceeding further. - -- [Install LAMP (Linux, MySQL/MariaDB, Apache and PHP) on RHEL/CentOS 7][1] - -### Installation of OpenSSL and Utilities ### - -First off, make sure that Apache is running and that both http and https are allowed through the firewall: - - # systemctl start http - # systemctl enable http - # firewall-cmd --permanent –-add-service=http - # firewall-cmd --permanent –-add-service=https - -Then install the necessary packages: - - # yum update && yum install openssl mod_nss crypto-utils - -**Important**: Please note that you can replace mod_nss with mod_ssl in the command above if you want to use OpenSSL libraries instead of NSS (Network Security Service) to implement TLS (which one to use is left entirely up to you, but we will use NSS in this article as it is more robust; for example, it supports recent cryptography standards such as PKCS #11). - -Finally, uninstall mod_ssl if you chose to use mod_nss, or viceversa. - - # yum remove mod_ssl - -### Configuring NSS (Network Security Service) ### - -After mod_nss is installed, its default configuration file is created as /etc/httpd/conf.d/nss.conf. You should then make sure that all of the Listen and VirtualHost directives point to port 443 (default port for HTTPS): - -nss.conf – Configuration File - ----------- - - Listen 443 - VirtualHost _default_:443 - -Then restart Apache and check whether the mod_nss module has been loaded: - - # apachectl restart - # httpd -M | grep nss - -![Check Mod_NSS Module in Apache](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Mod_NSS-Module-in-Apache.png) - -Check Mod_NSS Module Loaded in Apache - -Next, the following edits should be made in `/etc/httpd/conf.d/nss.conf` configuration file: - -1. Indicate NSS database directory. You can use the default directory or create a new one. In this tutorial we will use the default: - - NSSCertificateDatabase /etc/httpd/alias - -2. Avoid manual passphrase entry on each system start by saving the password to the database directory in /etc/httpd/nss-db-password.conf: - - NSSPassPhraseDialog file:/etc/httpd/nss-db-password.conf - -Where /etc/httpd/nss-db-password.conf contains ONLY the following line and mypassword is the password that you will set later for the NSS database: - - internal:mypassword - -In addition, its permissions and ownership should be set to 0640 and root:apache, respectively: - - # chmod 640 /etc/httpd/nss-db-password.conf - # chgrp apache /etc/httpd/nss-db-password.conf - -3. Red Hat recommends disabling SSL and all versions of TLS previous to TLSv1.0 due to the POODLE SSLv3 vulnerability (more information [here][2]). - -Make sure that every instance of the NSSProtocol directive reads as follows (you are likely to find only one if you are not hosting other virtual hosts): - - NSSProtocol TLSv1.0,TLSv1.1 - -4. Apache will refuse to restart as this is a self-signed certificate and will not recognize the issuer as valid. For this reason, in this particular case you will have to add: - - NSSEnforceValidCerts off - -5. Though not strictly required, it is important to set a password for the NSS database: - - # certutil -W -d /etc/httpd/alias - -![Set Password for NSS Database](http://www.tecmint.com/wp-content/uploads/2015/09/Set-Password-for-NSS-Database.png) - -Set Password for NSS Database - -### Creating a Apache SSL Self-Signed Certificate ### - -Next, we will create a self-signed certificate that will identify the server to our clients (please note that this method is not the best option for production environments; for such use you may want to consider buying a certificate verified by a 3rd trusted certificate authority, such as DigiCert). - -To create a new NSS-compliant certificate for box1 which will be valid for 365 days, we will use the genkey command. When this process completes: - - # genkey --nss --days 365 box1 - -Choose Next: - -![Create Apache SSL Key](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Apache-SSL-Key.png) - -Create Apache SSL Key - -You can leave the default choice for the key size (2048), then choose Next again: - -![Select Apache SSL Key Size](http://www.tecmint.com/wp-content/uploads/2015/09/Select-Apache-SSL-Key-Size.png) - -Select Apache SSL Key Size - -Wait while the system generates random bits: - -![Generating Random Key Bits](http://www.tecmint.com/wp-content/uploads/2015/09/Generating-Random-Bits.png) - -Generating Random Key Bits - -To speed up the process, you will be prompted to enter random text in your console, as shown in the following screencast. Please note how the progress bar stops when no input from the keyboard is received. Then, you will be asked to: - -1. Whether to send the Certificate Sign Request (CSR) to a Certificate Authority (CA): Choose No, as this is a self-signed certificate. - -2. to enter the information for the certificate. - -注:youtube 视频 - - -Finally, you will be prompted to enter the password to the NSS certificate that you set earlier: - - # genkey --nss --days 365 box1 - -![Apache NSS Certificate Password](http://www.tecmint.com/wp-content/uploads/2015/09/Apache-NSS-Password.png) - -Apache NSS Certificate Password - -At anytime, you can list the existing certificates with: - - # certutil –L –d /etc/httpd/alias - -![List Apache NSS Certificates](http://www.tecmint.com/wp-content/uploads/2015/09/List-Apache-Certificates.png) - -List Apache NSS Certificates - -And delete them by name (only if strictly required, replacing box1 by your own certificate name) with: - - # certutil -d /etc/httpd/alias -D -n "box1" - -if you need to.c - -### Testing Apache SSL HTTPS Connections ### - -Finally, it’s time to test the secure connection to our web server. When you point your browser to https://, you will get the well-known message “This connection is untrusted“: - -![Check Apache SSL Connection](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Apache-SSL-Connection.png) - -Check Apache SSL Connection - -In the above situation, you can click on Add Exception and then Confirm Security Exception – but don’t do it yet. Let’s first examine the certificate to see if its details match the information that we entered earlier (as shown in the screencast). - -To do so, click on View… –> Details tab above and you should see this when you select Issuer from the list: - -![Confirm Apache SSL Certificate Details](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Apache-SSL-Certificate-Details.png) - -Confirm Apache SSL Certificate Details - -Now you can go ahead, confirm the exception (either for this time or permanently) and you will be taken to your web server’s DocumentRoot directory via https, where you can inspect the connection details using your browser’s builtin developer tools: - -In Firefox you can launch it by right clicking on the screen, and choosing Inspect Element from the context menu, specifically through the Network tab: - -![Inspect Apache HTTPS Connection](http://www.tecmint.com/wp-content/uploads/2015/09/Inspect-Apache-HTTPS-Connection.png) - -Inspect Apache HTTPS Connection - -Please note that this is the same information as displayed before, which was entered during the certificate previously. There’s also a way to test the connection using command line tools: - -On the left (testing SSLv3): - - # openssl s_client -connect localhost:443 -ssl3 - -On the right (testing TLS): - - # openssl s_client -connect localhost:443 -tls1 - -![Testing Apache SSL and TLS Connections](http://www.tecmint.com/wp-content/uploads/2015/09/Testing-Apache-SSL-and-TLS.png) - -Testing Apache SSL and TLS Connections - -Refer to the screenshot above for more details. - -### Summary ### - -As I’m sure you already know, the presence of HTTPS inspires trust in visitors who may have to enter personal information in your site (from user names and passwords all the way to financial / bank account information). - -In that case, you will want to get a certificate signed by a trusted Certificate Authority as we explained earlier (the steps to set it up are identical with the exception that you will need to send the CSR to a CA, and you will get the signed certificate back); otherwise, a self-signed certificate as the one used in this tutorial will do. - -For more details on the use of NSS, please refer to the online help about [mod-nss][3]. And don’t hesitate to let us know if you have any questions or comments. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/create-apache-https-self-signed-certificate-using-nss/ - -作者:[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/install-lamp-in-centos-7/ -[1]:http://www.tecmint.com/author/gacanepa/ -[2]:https://access.redhat.com/articles/1232123 -[3]:https://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html \ No newline at end of file diff --git a/translated/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md b/translated/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md new file mode 100644 index 0000000000..5ff1f9fe65 --- /dev/null +++ b/translated/tech/RHCE/Part 8 - RHCE Series--Implementing HTTPS through TLS using Network Security Service NSS for Apache.md @@ -0,0 +1,210 @@ +RHCE 系列: 使用网络安全服务(NSS)为 Apache 通过 TLS 实现 HTTPS +================================================================================ +如果你是一个负责维护和确保 web 服务器安全的系统管理员,你不能不花费最大的精力确保服务器中处理和通过的数据任何时候都受到保护。 +![使用 SSL/TLS 设置 Apache HTTPS](http://www.tecmint.com/wp-content/uploads/2015/09/Setup-Apache-SSL-TLS-Server.png) + +RHCE 系列:第八部分 - 使用网络安全服务(NSS)为 Apache 通过 TLS 实现 HTTPS + +为了在客户端和服务器之间提供更安全的连接,作为 HTTP 和 SSL(安全套接层)或者最近称为 TLS(传输层安全)的组合,产生了 HTTPS 协议。 + +由于一些严重的安全漏洞,SSL 已经被更健壮的 TLS 替代。由于这个原因,在这篇文章中我们会解析如何通过 TLS 实现你 web 服务器和客户端之间的安全连接。 + +这里假设你已经安装并配置好了 Apache web 服务器。如果还没有,在进入下一步之前请阅读下面站点中的文章。 + +- [在 RHEL/CentOS 7 上安装 LAMP(Linux,MySQL/MariaDB,Apache 和 PHP)][1] + +### 安装 OpenSSL 和一些工具包 ### + +首先,确保正在运行 Apache 并且允许 http 和 https 通过防火墙: + + # systemctl start http + # systemctl enable http + # firewall-cmd --permanent –-add-service=http + # firewall-cmd --permanent –-add-service=https + +然后安装一些必须软件包: + + # yum update && yum install openssl mod_nss crypto-utils + +**重要**:请注意如果你想使用 OpenSSL 库而不是 NSS(网络安全服务)实现 TLS,你可以在上面的命令中用 mod\_ssl 替换 mod\_nss(使用哪一个取决于你,但在这篇文章中由于更加健壮我们会使用 NSS;例如,它支持最新的加密标准,比如 PKCS #11)。 + +如果你使用 mod\_nss,首先要卸载 mod\_ssl,反之如此。 + + # yum remove mod_ssl + +### 配置 NSS(网络安全服务)### + +安装完 mod\_nss 之后,会创建默认的配置文件 /etc/httpd/conf.d/nss.conf。你应该确保所有 Listen 和 VirualHost 指令都指向 443 号端口(HTTPS 默认端口): + +nss.conf – 配置文件 + +---------- + + Listen 443 + VirtualHost _default_:443 + +然后重启 Apache 并检查是否加载了 mod\_nss 模块: + + # apachectl restart + # httpd -M | grep nss + +![在 Apache 中检查 mod_nss 模块](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Mod_NSS-Module-in-Apache.png) + +检查 Apache 是否加载 mod\_nss 模块 + +下一步,在 `/etc/httpd/conf.d/nss.conf` 配置文件中做以下更改: + +1. 指定 NSS 数据库目录。你可以使用默认的目录或者新建一个。本文中我们使用默认的: + + NSSCertificateDatabase /etc/httpd/alias + +2. 通过保存密码到数据库目录中的 /etc/httpd/nss-db-password.conf 文件避免每次系统启动时要手动输入密码: + + NSSPassPhraseDialog file:/etc/httpd/nss-db-password.conf + +其中 /etc/httpd/nss-db-password.conf 只包含以下一行,其中 mypassword 是后面你为 NSS 数据库设置的密码: + + internal:mypassword + +另外,要设置该文件的权限和属主为 0640 和 root:apache: + + # chmod 640 /etc/httpd/nss-db-password.conf + # chgrp apache /etc/httpd/nss-db-password.conf + +3. 由于 POODLE SSLv3 漏洞,红帽建议停用 SSL 和 TLSv1.0 之前所有版本的 TLS(更多信息可以查看[这里][2])。 + +确保 NSSProtocol 指令的每个实例都类似下面一样(如果你没有托管其它虚拟主机,很可能只有一条): + + NSSProtocol TLSv1.0,TLSv1.1 + +4. 由于这是一个自签名证书,Apache 会拒绝重启,并不会识别为有效发行人。由于这个原因,对于这种特殊情况我们还需要添加: + + NSSEnforceValidCerts off + +5. 虽然并不是严格要求,为 NSS 数据库设置一个密码同样很重要: + + # certutil -W -d /etc/httpd/alias + +![为 NSS 数据库设置密码](http://www.tecmint.com/wp-content/uploads/2015/09/Set-Password-for-NSS-Database.png) + +为 NSS 数据库设置密码 + +### 创建一个 Apache SSL 自签名证书 ### + +下一步,我们会创建一个自签名证书为我们的客户机识别服务器(请注意这个方法对于生产环境并不是最好的选择;对于生产环境你应该考虑购买第三方可信证书机构验证的证书,例如 DigiCert)。 + +我们用 genkey 命令为 box1 创建有效期为 365 天的 NSS 兼容证书。完成这一步后: + + # genkey --nss --days 365 box1 + +选择 Next: + +![创建 Apache SSL 密钥](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Apache-SSL-Key.png) + +创建 Apache SSL 密钥 + +你可以使用默认的密钥大小(2048),然后再次选择 Next: + +![选择 Apache SSL 密钥大小](http://www.tecmint.com/wp-content/uploads/2015/09/Select-Apache-SSL-Key-Size.png) + +选择 Apache SSL 密钥大小 + +等待系统生成随机比特: + +![生成随机密钥比特](http://www.tecmint.com/wp-content/uploads/2015/09/Generating-Random-Bits.png) + +生成随机密钥比特 + +为了加快速度,会提示你在控制台输入随机字符,正如下面的截图所示。请注意当没有从键盘接收到输入时进度条是如何停止的。然后,会让你选择: + +1. 是否发送验证签名请求(CSR)到一个验证机构(CA):选择 No,因为这是一个自签名证书。 + +2. 为证书输入信息。 + +注:youtube 视频 + + +最后,会提示你输入之前设置的密码到 NSS 证书: + + # genkey --nss --days 365 box1 + +![Apache NSS 证书密码](http://www.tecmint.com/wp-content/uploads/2015/09/Apache-NSS-Password.png) + +Apache NSS 证书密码 + +在任何时候你都可以用以下命令列出现有的证书: + + # certutil –L –d /etc/httpd/alias + +![列出 Apache NSS 证书](http://www.tecmint.com/wp-content/uploads/2015/09/List-Apache-Certificates.png) + +列出 Apache NSS 证书 + +然后通过名字删除(除非严格要求,用你自己的证书名称替换 box1): + + # certutil -d /etc/httpd/alias -D -n "box1" + +如果你需要继续的话: + +### 测试 Apache SSL HTTPS 连接 ### + +最后,是时候测试到我们服务器的安全连接了。当你用浏览器打开 https://,你会看到著名的信息 “This connection is untrusted”: + +![检查 Apache SSL 连接](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Apache-SSL-Connection.png) + +检查 Apache SSL 连接 + +在上面的情况中,你可以点击添加例外(Add Exception) 然后确认安全例外(Confirm Security Exception) - 但先不要这么做。让我们首先来看看证书看它的信息是否和我们之前输入的相符(如截图所示)。 + +要做到这点,点击上面的视图(View...)-> 详情(Details)选项卡,当你从列表中选择发行人你应该看到这个: + +![确认 Apache SSL 证书详情](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Apache-SSL-Certificate-Details.png) + +确认 Apache SSL 证书详情 + +现在你继续,确认例外(限于此次或永久),然后会通过 https 把你带到你 web 服务器的 DocumentRoot 目录,在这里你可以使用你浏览器自带的开发者工具检查连接详情: + +在火狐浏览器中,你可以通过在屏幕中右击然后从上下文菜单中选择检查元素(Inspect Element)启动,尤其是通过网络选项卡: + +![检查 Apache HTTPS 连接](http://www.tecmint.com/wp-content/uploads/2015/09/Inspect-Apache-HTTPS-Connection.png) + +检查 Apache HTTPS 连接 + +请注意这和之前显示的在验证过程中输入的信息一致。还有一种方式通过使用命令行工具测试连接: + +左边(测试 SSLv3): + + # openssl s_client -connect localhost:443 -ssl3 + +右边(测试 TLS): + + # openssl s_client -connect localhost:443 -tls1 + +![测试 Apache SSL 和 TLS 连接](http://www.tecmint.com/wp-content/uploads/2015/09/Testing-Apache-SSL-and-TLS.png) + +测试 Apache SSL 和 TLS 连接 + +参考上面的截图了解更相信信息。 + +### 总结 ### + +我确信你已经知道,使用 HTTPS 会增加会在你站点中输入个人信息的访客的信任(从用户名和密码到任何商业/银行账户信息)。 + +在那种情况下,你会希望获得由可信验证机构签名的证书,正如我们之前解释的(启用的步骤和发送 CSR 到 CA 然后获得签名证书的例子相同);另外的情况,就是像我们的例子中一样使用自签名证书。 + +要获取更多关于使用 NSS 的详情,可以参考关于 [mod-nss][3] 的在线帮助。如果你有任何疑问或评论,请告诉我们。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/create-apache-https-self-signed-certificate-using-nss/ + +作者:[Gabriel Cánepa][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/install-lamp-in-centos-7/ +[1]:http://www.tecmint.com/author/gacanepa/ +[2]:https://access.redhat.com/articles/1232123 +[3]:https://git.fedorahosted.org/cgit/mod_nss.git/plain/docs/mod_nss.html \ No newline at end of file From d1fa680201f959ed80aacc1ac03751460cfb6e45 Mon Sep 17 00:00:00 2001 From: icybreaker Date: Sun, 20 Sep 2015 11:23:08 +0800 Subject: [PATCH 2123/2517] translated by icybreaker --- .../talk/20150901 Is Linux Right For You.md | 64 ------------------- .../talk/20150901 Is Linux Right For You.md | 63 ++++++++++++++++++ 2 files changed, 63 insertions(+), 64 deletions(-) delete mode 100644 sources/talk/20150901 Is Linux Right For You.md create mode 100644 translated/talk/20150901 Is Linux Right For You.md diff --git a/sources/talk/20150901 Is Linux Right For You.md b/sources/talk/20150901 Is Linux Right For You.md deleted file mode 100644 index ddbffa8481..0000000000 --- a/sources/talk/20150901 Is Linux Right For You.md +++ /dev/null @@ -1,64 +0,0 @@ -icybreaker translating... -Is Linux Right For You? -================================================================================ -> Not everyone should opt for Linux -- for many users, remaining with Windows or OSX is the better choice. - -I enjoy using Linux on the desktop. Not because of software politics or because I despise other operating systems. I simply like Linux because it just works. - -It's been my experience that not everyone is cut out for the Linux lifestyle. In this article, I'll help you run through the pros and cons of making the switch to Linux so you can determine if switching is right for you. - -### When to make the switch ### - -Switching to Linux makes sense when there is a decisive reason to do so. The same can be said about moving from Windows to OS X or vice versa. In order to have success with switching, you must be able to identify your reason for jumping ship in the first place. - -For some people, the reason for switching is frustration with their current platform. Maybe the latest upgrade left them with a lousy experience and they're ready to chart new horizons. In other instances, perhaps it's simply a matter of curiosity. Whatever the motivation, you must have a good reason for switching operating systems. If you're pushing yourself in this direction without a good reason, then no one wins. - -However, there are exceptions to every rule. And if you're really interested in trying Linux on the desktop, then maybe coming to terms with a workable compromise is the way to go. - -### Starting off slow ### - -After trying Linux for the first time, I've seen people blast their Windows installation to bits because they had a good experience with Ubuntu on a flash drive for 20 minutes. Folks, this isn't a test. Instead I'd suggest the following: - -- Run the [Linux distro in a virtual machine][1] for a week. This means you are committing to running that distro for all browser work, email and other tasks you might otherwise do on that machine. -- If running a VM for a week is too resource intensive, try doing the same with a USB drive running Linux that offers [some persistent storage][2]. This will allow you to leave your main OS alone and intact. At the same time, you'll still be able to "live inside" of your Linux distribution for a week. -- If you find that everything is successful after a week of running Linux, the next step is to examine how many times you booted into Windows that week. If only occasionally, then the next step is to look into [dual-booting Windows][3] and Linux. For those of you that only found themselves using their Linux distro, it might be worth considering making the switch full time. -- Before you hose your Windows partition completely, it might make more sense to purchase a second hard drive to install Linux onto instead. This allows you to dual-boot, but to do so with ample hard drive space. It also makes Windows available to you if something should come up. - -### What do you gain adopting Linux? ### - -So what does one gain by switching to Linux? Generally it comes down to personal freedom for most people. With Linux, if something isn't to your liking, you're free to change it. Using Linux also saves users oodles of money in avoiding hardware upgrades and unnecessary software expenses. Additionally, you're not burdened with tracking down lost license keys for software. And if you dislike the direction a particular distribution is headed, you can switch to another distribution with minimal hassle. - -The sheer volume of desktop choice on the Linux desktop is staggering. This level of choice might even seem overwhelming to the newcomer. But if you find a distro base (Debian, Fedora, Arch, etc) that you like, the hard work is already done. All you need to do now is find a variation of the distro and the desktop environment you prefer. - -Now one of the most common complaints I hear is that there isn't much in the way of software for Linux. However, this isn't accurate at all. While other operating systems may have more of it, today's Linux desktop has applications to do just about anything you can think of. Video editing (home and pro-level), photography, office management, remote access, music (listening and creation), plus much, much more. - -### What you lose adopting Linux? ### - -As much as I enjoy using Linux, my wife's home office relies on OS X. She's perfectly content using Linux for some tasks, however she relies on OS X for specific software not available for Linux. This is a common problem that many people face when first looking at making the switch. You must decide whether or not you're going to be losing out on critical software if you make the switch. - -Sometimes the issue is because the software has content locked down with it. In other cases, it's a workflow and functionality that was found with the legacy applications and not with the software available for Linux. I myself have never experienced this type of challenge, but I know those who have. Many of the software titles available for Linux are also available for other operating systems. So if there is a concern about such things, I encourage you to try out comparable apps on your native OS first. - -Another thing you might lose by switching to Linux is the luxury of local support when you need it. People scoff at this, but I know of countless instances where a newcomer to Linux was dismayed to find their only recourse for solving Linux challenges was from strangers on the Web. This is especially problematic if their only PC is the one having issues. Windows and OS X users are spoiled in that there are endless support techs in cities all over the world that support their platform(s). - -### How to proceed from here ### - -Perhaps the single biggest piece of advice to remember is always have a fallback plan. Remember, once you wipe that copy of Windows 10 from your hard drive, you may find yourself spending money to get it reinstalled. This is especially true for those of you who upgrade from other Windows releases. Accepting this, persistent flash drives with Linux or dual-booting Windows and Linux is always a preferable way forward for newcomers. Odds are that you may be just fine and take to Linux like a fish to water. But having that fallback plan in place just means you'll sleep better at night. - -If instead you've been relying on a dual-boot installation for weeks and feel ready to take the plunge, then by all means do it. Wipe your drive and start off with a clean installation of your favorite Linux distribution. I've been a full time Linux enthusiast for years and I can tell you for certain, it's a great feeling. How long? Let's just say my first Linux experience was with early Red Hat. I finally installed a dedicated installation on my laptop by 2003. - -Existing Linux enthusiasts, where did you first get started? Was your switch an exciting one or was it filled with angst? Hit the Comments and share your experiences. - --------------------------------------------------------------------------------- - -via: http://www.datamation.com/open-source/is-linux-right-for-you.html - -作者:[Matt Hartley][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.datamation.com/author/Matt-Hartley-3080.html -[1]:http://www.psychocats.net/ubuntu/virtualbox -[2]:http://www.howtogeek.com/howto/14912/create-a-persistent-bootable-ubuntu-usb-flash-drive/ -[3]:http://www.linuxandubuntu.com/home/dual-boot-ubuntu-15-04-14-10-and-windows-10-8-1-8-step-by-step-tutorial-with-screenshots diff --git a/translated/talk/20150901 Is Linux Right For You.md b/translated/talk/20150901 Is Linux Right For You.md new file mode 100644 index 0000000000..60b56f6e25 --- /dev/null +++ b/translated/talk/20150901 Is Linux Right For You.md @@ -0,0 +1,63 @@ +Linux系统是否适合于您? +================================================================================ +> 并非人人都适合使用Linux--对许多用户来说,Windows或OSX会是更好的选择。 + +我喜欢使用Linux系统,并不是因为软件的政治性质,也不是不喜欢其他操作系统。我喜欢Linux系统因为它能满足我的需求并且确实适合使用。 + +我的经验是,并非人人都适合切换至“Linux的生活方式”。本文将帮助您通过分析使用Linux系统的利弊来供您自行判断使用Linux是否真正适合您。 + +### 什么时候更换系统? ### + +当有充分的理由时,将系统切换到Linux系统是很有意义的。这对Windows用户将系统更换到OSX或类似的情况都同样适用。为让您的系统转变成功,您必须首先确定为什么要做这种转换。 + +对某些人来说,更换系统通常意味着他们不满于当前的系统操作平台。也许是最新的升级给了他们糟糕的用户体验,他们已准备好更换到别的系统,也许仅仅是因为对某个系统好奇。不管动机是什么,必须要有充分的理由支撑您做出更换操作系统的决定。如果没有一个充足的原因让您这样做,往往不会成功。 + +然而事事都有例外。如果您确实对Linux非常感兴趣,或许可以选择一种折衷的方式。 + +### 放慢起步的脚步 ### + +第一次尝试运行Linux系统后,我看到就有人开始批判Windows安装过程的费时,完全是因为他们20分钟就用闪存安装好Ubuntu的良好体验。但是伙伴们,这并不只是一次测验。相反,我有如下建议: + +- 一周的时间尝试在[虚拟机上运行Linux系统][1]。这意味着您将在该系统上运行所有的浏览器工作、邮箱操作和其它想要完成的任务。 +- 如果运行虚拟机资源消耗太大,您可以尝试通过[存储持久性][2]的USB驱动器来运行Linux,您的主操作系统将不受任何影响。与此同时,您仍可以运行Linux系统。 +- 运行Linux系统一周后,如果一切进展顺利,下一步您可以计算一下这周内登入Windows的次数。如果只是偶尔登陆Windows系统,下一步就可以尝试运行Windows和Linux[双系统][3]。对那些只运行Linux系统的用户,可以考虑尝试将系统真正更换为Linux系统。 +- 在管理Windows分区前,有必要购买一个新硬盘来安装Linux系统。这样只要有充足的硬盘空间,您就可以使用双系统。如果想到必须要要启动Windows系统做些事情,Windows系统也是可以运行的。 + +### 使用Linux系统的好处是什么? ### + +将系统更换到Linux有什么好处呢?一般而言,这种好处对大多数人来说可以归结到释放个性化自由。在使用Linux系统的时候,如果您不喜欢某些设置,可以自行更改它们。同时使用Linux可以为用户节省大量的硬件升级开支和不必要的软件开支。另外,您不需再费力找寻已丢失的软件许可证密钥,而且如果您不喜欢即将发布的系统版本,大可轻松地更换到别的版本。 + +台式机首选Linux系统是令人吃惊的,看起来对新手来说做这种选择非常困难。但是如果您发现了喜欢的一款Linux版本(Debian,Fedora,Arch等),最困难的工作其实已经完成了,您需要做的就是找到各版本并选择出您最喜欢的系统版本环境。 + +如今我听到的最常见的抱怨之一是用户发现没有太多的软件格式能适用于Linux系统。然而,这并不是事实。尽管别的操作系统可能会提供更多软件,但是如今的Linux也已经提供了足够多应用程序满足您的各种需求,包括视频剪辑(家庭版和专业版),摄影,办公管理软件,远程访问,音乐软件,还有很多别的各类软件。 + +### 使用Linux系统您会失去些什么? ### + +虽然我喜欢使用Linux,但我妻子的家庭办公系统依然依赖于OS X。对于用Linux系统完成一些特定的任务她心满意足,但是她仍习惯于使用提供Linux不支持的一些软件的OS X系统。这是许多想要更换系统的用户会遇到的一个常见的问题。如果要更换系统,您需要考虑是否愿意失去一些关键的软件工具。 + +有时在Linux系统上遇到问题是因为软件会内容锁定。别的情况下,是在Linux系统上可运行的软件并不适用于传统应用程序的工作流和功能。我自己并没有遇到过这类问题,但是我知道确实存在这些问题。许多Linux上的软件在其他操作系统上也都可以用。所以如果担心这类软件兼容问题,建议您先尝试在已有的系统上操作一下几款类似的应用程序。 + +更换成Linux系统后,另一件您可能会失去的是本地系统支持服务。人们通常会嘲笑这种愚蠢行径,但我知道,无数的新手在使用Linux时会发现解决Linux上各种问题的唯一资源就是来自网络另一端的陌生人提供的帮助。如果只是他们的PC遇到了一些问题,这将会比较麻烦。Windows和OS X的用户已经习惯各城市遍布了支持他们操作系统的各项技术服务。 + +### 如何开启新旅程? ### + +这里建议大家要记住最重要的就是经常做备份。如果您将Windows 10从硬盘中擦除,您会发现重新安装它又会花费金钱。对那些从其他Windows发布版本升级的用户来说尤其会遇到这种情况。接受这个建议,那就是对新手来说使用闪存安装Linux或使用Windows和Linux双系统都是更值得提倡的做法。您也许会如鱼得水般使用Linux系统,但是有了一份备份计划,您将高枕无忧。 + +相反,如果数周以来您一直依赖于使用双操作系统,但是已经准备好冒险去尝试一下单操作系统,那么就去做吧。格式化您的驱动器,重新安装您喜爱的Linux distribution。数年来我一直都是"全职"Linux使用爱好者,这里可以确定地告诉您,使用Linux系统感觉棒极了。这种感觉会持续多久?我第一次的Linux系统使用经验还是来自早期的Red Hat系统,2003年我已经决定在自己的笔记本上安装专用的Linux系统并一直使用至今。 + +Linux爱好者们,你们什么时候开始使用Linux的?您在最初更换成Linux系统时是兴奋还是焦虑呢?欢迎点击评论分享你们的经验。 + +-------------------------------------------------------------------------------- + +via: http://www.datamation.com/open-source/is-linux-right-for-you.html + +作者:[Matt Hartley][a] +译者:[icybreaker](https://github.com/icybreaker) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.datamation.com/author/Matt-Hartley-3080.html +[1]:http://www.psychocats.net/ubuntu/virtualbox +[2]:http://www.howtogeek.com/howto/14912/create-a-persistent-bootable-ubuntu-usb-flash-drive/ +[3]:http://www.linuxandubuntu.com/home/dual-boot-ubuntu-15-04-14-10-and-windows-10-8-1-8-step-by-step-tutorial-with-screenshots From 30f8d413f0e026f4dedc10d37ca415e23676e556 Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 20 Sep 2015 18:39:33 +0800 Subject: [PATCH 2124/2517] [complete]18 - The history of Android --- .../18 - The history of Android.md | 83 ------------------- .../18 - The history of Android.md | 83 +++++++++++++++++++ 2 files changed, 83 insertions(+), 83 deletions(-) delete mode 100644 sources/talk/The history of Android/18 - The history of Android.md create mode 100644 translated/talk/The history of Android/18 - The history of Android.md diff --git a/sources/talk/The history of Android/18 - The history of Android.md b/sources/talk/The history of Android/18 - The history of Android.md deleted file mode 100644 index 3af4359680..0000000000 --- a/sources/talk/The history of Android/18 - The history of Android.md +++ /dev/null @@ -1,83 +0,0 @@ -安卓编年史 -================================================================================ -![安卓市场的新设计试水“卡片式”界面,这将成为谷歌的主要风格。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/play-store.png) -安卓市场的新设计试水“卡片式”界面,这将成为谷歌的主要风格。 -Ron Amadeo 供图 - -安卓推向市场已经有两年半时间了,安卓市场放出了它的第四版设计。这个新设计十分重要,因为它已经很接近谷歌的“卡片式”界面了。通过在小方块中显示应用或其他内容,谷歌可以使其设计在不同尺寸屏幕下无缝过渡而不受影响。内容可以像一个相册应用里的照片一样显示——给布局渲染填充一个内容块列表,加上屏幕包装,就完成了。更大的屏幕一次可以看到更多的内容块,小点的屏幕一次看到的内容就少。内容用了不一样的方式显示,谷歌还在右边新增了一个“分类”板块,顶部还有个巨大的热门应用滚动显示。 - -虽然设计上为更容易配置界面准备好准备好了,但功能上还没有。最初发布的市场版本锁定为横屏模式,而且还是蜂巢独占的。 - -![应用详情页和“我的应用”界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/device-2014-02-12-190002.png) -应用详情页和“我的应用”界面。 -Ron Amadeo 供图 - -新的市场不仅出售应用,还加入了书籍和电影租借。谷歌从2010年开始出售图书;之前只通过网站出售。新的市场将谷歌所有的内容销售聚合到了一处,进一步向苹果 iTunes 的主宰展开较量。虽然在“安卓市场”出售这些东西有点品牌混乱,因为大部分内容都不依赖于安卓才能使用。 - -![浏览器看起来非常像 Chrome,联系人使用了双面板界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/browsercontactst.png) -浏览器看起来非常像 Chrome,联系人使用了双面板界面。 -Ron Amadeo 供图 - -The new Browser added an honest-to-goodness tabs strip at the top of the interface. While this browser wasn't Chrome, it aped a lot of Chrome's design and features. Besides the pioneering tabs-on-top interface, it added Incognito tabs, which kept no history or autocomplete records. There was also an option to have a Chrome-style new tab page consisting of thumbnails of your most-viewed webpages. - -The new Browser even synced with Chrome. After signing in to the browser, it would download your Chrome bookmarks and automatically sign in to Google Web pages with your account. Bookmarking a page was as easy as tapping on the star icon in the address bar. Just like Google Maps, the browser dumped the zoom buttons and went with all gesture controls. - -The contacts app was finally removed from the phone app and broken out into a standalone app. The previous contacts/dialer hybrid was far too phone-centric for how people use a modern smartphone. Contacts housed information for e-mails, IM, texting, addresses, birthdays, and social networks, so tying it to the phone app makes just as much sense as trying it to Google Maps. With the telephony requirements out of the way, contacts could be simplified to a tab-less list of people. Honeycomb went with a dual pane view showing the full contact list on the left and contacts on the right. This again made use of a Fragments API; a hypothetical phone version of this app could show each panel as a single screen. - -The Honeycomb version of Contacts was the first version to have a quick scroll feature. When grabbing the left scroll bar, you could quickly scroll up and down, and a letter preview showed your current spot in the list. - -![The new YouTube app looked like something out of the Matrix.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/youtubes.png) -The new YouTube app looked like something out of the Matrix. -Photo by Ron Amadeo - -YouTube thankfully dumped the "unique" design Google came up with for 2.3 and gave the video service a cohesive design that looked like it belonged in Android. The main screen was a horizontally scrolling curved wall of video thumbnails that showed a most popular or (when signed in) personalized selection of videos. While Google never brought this design to phones, it could be considered an easily reconfigurable card interface. The action bar shined here as a reconfigurable toolbar. When not signed it, the action bar was filled with a search bar. When you were signed in, search shrank down to a button, and tabs for "Home," "Browse," and "Your Channel" were shown. - -![Honeycomb really liked to drive home that it was a computer interface with blue scaffolding. Movie Studio completes the Tron look with an orange theme.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/other2.png) -Honeycomb really liked to drive home that it was a computer interface with blue scaffolding. Movie Studio completes the Tron look with an orange theme. -Photo by Ron Amadeo - -The lone new app in Honeycomb was "Movie Studio," which was not a self-explanatory app and arrived with no explanations or instructions. As far as we could tell, you could import video clips, cut them up, and add text and scene transitions. Editing video—one of the most time consuming, difficult, and processor-intensive things you can do on a computer—on a tablet felt just a little too ambitious, and Google would completely remove this app in later versions. Our favorite part of Movie Studio was that it really completed the Tron theme. While the rest of the OS used blue highlights, this was all orange. (Movie Studio is an evil program!) - -![Widgets!](http://cdn.arstechnica.net/wp-content/uploads/2014/02/device-2014-02-12-202224.png) -Widgets! -Photo by Ron Amadeo - -Honeycomb brought a new widget framework that allowed for scrolling widgets, and the Gmail, Email, and Calendar widgets were upgraded to support it. YouTube and Books used a new widget that auto-scrolled through cards of content. By flicking up or down on the widget, you could scroll through the cards. We're not sure what the point of being constantly reminded of your book collection was, but it's there if you want it. While all of these widgets worked great on a 10-inch screen, Google never redesigned them for phones, making them practically useless on Android's most popular form factor. All the widgets had massive identifying headers and usually took up half the screen to show only a few items. - -![The scrollable Recent Apps and resizable widgets in Android 3.1.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/31new.jpg) -The scrollable Recent Apps and resizable widgets in Android 3.1. -Photo by Ron Amadeo - -Later versions of Honeycomb would fix many of the early problems 3.0 had. Android 3.1 was released three months after the first version of Honeycomb, and it brought several improvements. Resizable widgets were one of the biggest features added. After long pressing on a widget, a blue outline with grabbable handles would pop up around it, and dragging the handles around would resize the widget. The Recent Apps panel could now scroll vertically and held many more apps. The only feature missing from it at this point was the ability to swipe away apps. - -Today, an 0.1 upgrade is a major release, but in Honeycomb, point releases were considerably smaller. Besides the few UI tweaks, 3.1 added support for gamepads, keyboards, mice, and other input devices over USB and Bluetooth. It also offered a few more developer APIs. - -![Android 3.2's compatibility zoom and a typical stretched-out app on an Android tablet.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/device-2014-02-14-131132.jpg) -Android 3.2's compatibility zoom and a typical stretched-out app on an Android tablet. -Photo by Ron Amadeo - -Android 3.2 launched two months after 3.1, adding support for smaller sized tablets in the seven- to eight-inch range. It finally enabled SD card support, which the Xoom carried like a vestigial limb for the first five months of its life. - -Honeycomb was rushed out the door in order to be an ecosystem builder. No one will want an Android tablet if the tablet-specific apps aren't there, and Google knew it needed to get something in the hands of developers ASAP. At this early stage of Android's tablet ecosystem, the apps just weren't there. It was the biggest problem people had with the Xoom. - -3.2 added "Compatibility Zoom," which gave users a new option of stretching apps to the screen (as shown in the right picture) or zooming the normal app layout to fit the screen. Neither option was ideal, and without the app ecosystem to support it, Honeycomb devices sold pretty poorly. Google's tablet moves would eventually pay off though. Today, Android tablets have [taken the market share crown from iOS][1]. - ----------- - -![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) - -[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. - -[@RonAmadeo][t] - --------------------------------------------------------------------------------- - -via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/18/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://techcrunch.com/2014/03/03/gartner-195m-tablets-sold-in-2013-android-grabs-top-spot-from-ipad-with-62-share/ -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/18 - The history of Android.md b/translated/talk/The history of Android/18 - The history of Android.md new file mode 100644 index 0000000000..f4781cc621 --- /dev/null +++ b/translated/talk/The history of Android/18 - The history of Android.md @@ -0,0 +1,83 @@ +安卓编年史 +================================================================================ +![安卓市场的新设计试水“卡片式”界面,这将成为谷歌的主要风格。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/play-store.png) +安卓市场的新设计试水“卡片式”界面,这将成为谷歌的主要风格。 +Ron Amadeo 供图 + +安卓推向市场已经有两年半时间了,安卓市场放出了它的第四版设计。这个新设计十分重要,因为它已经很接近谷歌的“卡片式”界面了。通过在小方块中显示应用或其他内容,谷歌可以使其设计在不同尺寸屏幕下无缝过渡而不受影响。内容可以像一个相册应用里的照片一样显示——给布局渲染填充一个内容块列表,加上屏幕包装,就完成了。更大的屏幕一次可以看到更多的内容块,小点的屏幕一次看到的内容就少。内容用了不一样的方式显示,谷歌还在右边新增了一个“分类”板块,顶部还有个巨大的热门应用滚动显示。 + +虽然设计上为更容易配置界面准备好准备好了,但功能上还没有。最初发布的市场版本锁定为横屏模式,而且还是蜂巢独占的。 + +![应用详情页和“我的应用”界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/device-2014-02-12-190002.png) +应用详情页和“我的应用”界面。 +Ron Amadeo 供图 + +新的市场不仅出售应用,还加入了书籍和电影租借。谷歌从2010年开始出售图书;之前只通过网站出售。新的市场将谷歌所有的内容销售聚合到了一处,进一步向苹果 iTunes 的主宰展开较量。虽然在“安卓市场”出售这些东西有点品牌混乱,因为大部分内容都不依赖于安卓才能使用。 + +![浏览器看起来非常像 Chrome,联系人使用了双面板界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/browsercontactst.png) +浏览器看起来非常像 Chrome,联系人使用了双面板界面。 +Ron Amadeo 供图 + +新浏览器界面顶部添加了标签页栏。尽管这个浏览器并不是 Chrome ,它模仿了许多 Chrome 的设计和特性。除了这个探索性的顶部标签页界面,浏览器还加入了隐身标签,在浏览网页时不保存历史记录和自动补全记录。它还有个选项可以让你拥有一个 Chrome 风格的新标签页,页面上包含你最经常访问的网页略缩图。 + +新浏览器甚至还能和 Chrome 同步。在浏览器登录后,它会下载你的 Chrome 书签并且自动登录你的谷歌账户。收藏一个页面只需点击地址栏的星形标志即可,和谷歌地图一样,浏览器抛弃了缩放按钮,完全改用手势控制。 + +联系人应用最终从电话应用中移除,并且独立为一个应用。之前的联系人/拨号混合式设计相对于人们使用现代智能手机的方式来说,过于以电话为中心了。联系人中存有电子邮件,IM,短信,地址,生日,以及社交网络等信息,所以将它们捆绑在电话应用里的意义和将它们放进谷歌地图里差不多。抛开了电话通讯功能,联系人能够简化成没有标签页的联系人列表。蜂巢采用了双面板视图,在左侧显示完整的联系人列表,右侧是联系人详情。应用利用了 Fragments API,通过它应用可以在同一屏显示多个面板界面。 + +蜂巢版本的联系人应用是第一个拥有快速滚动功能的版本。当按住左侧滚动条的时候,你可以快速上下拖动,应用会显示列表当前位置的首字母预览。 + +![新 Youtube 应用看起来像是来自黑客帝国。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/youtubes.png) +新 Youtube 应用看起来像是来自黑客帝国。 +Ron Amadeo 供图 + +谢天谢地 Youtube 终于抛弃了自安卓 2.3 以来的谷歌给予这个视频服务的“独特”设计,新界面设计与系统更加一体化。主界面是一个水平滚动的曲面墙,上面显示着最热门或者(登录之后)个人关注的视频。虽然谷歌从来没有将这个设计带到手机上,但它可以被认为是一个易于重新配置的卡片界面。操作栏在这里是个可配置的工具栏。没有登录时,操作栏由一个搜索栏填满。当你登录后,搜索缩小为一个按钮,“首页”,“浏览”和“你的频道”标签将会显示出来。 + +![蜂巢用一个蓝色框架的电脑界面来驱动主屏。电影工作室完全采用橙色电子风格主题。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/other2.png) +蜂巢用一个蓝色框架的电脑界面来驱动主屏。电影工作室完全采用橙色电子风格主题。 +Ron Amadeo 供图 + +蜂巢新增的应用“电影工作室”,这不是一个不言自明的应用,而且没有任何的解释或说明。就我们所知,你可以导入视频,剪切它们,添加文本和场景过渡。编辑视频——电脑上你可以做的最耗时,困难,以及处理器密集型任务之一——在平板上完成感觉有点野心过大了,谷歌在之后的版本里将其完全移除了。电影工作室里我们最喜欢的部分是它完全的电子风格主题。虽然系统的其它部分使用蓝色高亮,在这里是橙色的。(电影工作室是个邪恶的程序!) + +![小部件!](http://cdn.arstechnica.net/wp-content/uploads/2014/02/device-2014-02-12-202224.png) +小部件! +Ron Amadeo 供图 + +蜂巢带来了新的部件框架,允许部件滚动,Gmail,Email 以及日历部件都升级了以支持改功能。Youtube 和书籍使用了新的部件,内容卡片可以自动滚动切换。在小部件上轻轻向上或向下滑动可以切换卡片。我们不确定你的书籍中哪些书会被显示出来,但如果你想要的话它就在那儿。尽管所有的这些小部件在10英寸屏幕上运行良好,谷歌从未将它们重新设计给手机,这让它们在安卓最流行的规格上几乎毫无用处。所有的小部件有个大块的标识标题栏,而且通常占据大半屏幕只显示很少的内容。 + +![安卓3.1中可滚动的最近应用以及可自定义大小的小部件。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/31new.jpg) +安卓3.1中可滚动的最近应用以及可自定义大小的小部件。 +Ron Amadeo 供图 + +蜂巢后续的版本修复了3.0早期的一些问题。安卓3.1在蜂巢的第一个版本之后三个月放出,并带来了一些改进。小部件自定义大小是添加的最大特性之一。长按小部件之后,一个带有拖拽按钮的蓝色外框会显示出来,拖动按钮可以改变小部件尺寸。最近应用界面现在可以垂直滚动并且承载更多应用。这个版本唯一缺失的功能是滑动关闭应用。 + +在今天,一个0.1版本的升级是个主要更新,但是在蜂巢,那只是个小更新。除了一些界面调整,3.1添加了对游戏手柄,键盘,鼠标以及其它USB和蓝牙输入设备的支持。它还提供了更多的开发者API。 + +![安卓3.2的兼容性缩放和一个安卓平板上典型的展开视图应用。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/device-2014-02-14-131132.jpg) +安卓3.2的兼容性缩放和一个安卓平板上典型的展开视图应用。 +Ron Amadeo 供图 + +安卓3.2在3.1发布后两个月放出,添加了七到八英寸的小尺寸平板支持。3.2终于启用了SD卡支持,Xoom 在生命最初的五个月像是抱着个不完整的肢体一样。 + +蜂巢匆匆问世是为了成为一个生态系统建设者。如果应用没有平板版本,没人会想要一个安卓平板的,所以谷歌知道需要尽快将东西送到开发者手中。在这个安卓平板生态的早期阶段,应用还没有到齐。这是拥有 Xoom 的人们所面临的最大的问题。 + +3.2添加了“兼容缩放”,给了用户一个新选项,可以将应用拉伸适应屏幕(如右侧图片显示的那样)或缩放成正常的应用布局来适应屏幕。这些选项都不是很理想,没有应用生态来支持平板,蜂巢设备销售状况惨淡。但谷歌的平板决策最终还是会得到回报。今天,安卓平板已经[取代 iOS 占据了最大的市场份额][1]。 + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。 + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/18/ + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://techcrunch.com/2014/03/03/gartner-195m-tablets-sold-in-2013-android-grabs-top-spot-from-ipad-with-62-share/ +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 246a826b62bec223ff90ddbbe25865d41551677e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 20 Sep 2015 19:42:15 +0800 Subject: [PATCH 2125/2517] PUB:20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux @GOLinux --- ... Devanagari Support In Antergos And Arch Linux.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md (85%) diff --git a/translated/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md b/published/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md similarity index 85% rename from translated/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md rename to published/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md index 1bcc05a080..82063aae7a 100644 --- a/translated/tech/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md +++ b/published/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md @@ -1,17 +1,19 @@ -为Antergos与Arch Linux添加印度语和梵文支持 +也许你需要在 Antergos 与 Arch Linux 中查看印度语和梵文? ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Indian-languages.jpg) -你们到目前或许知道,我最近一直在尝试体验[Antergos Linux][1]。在安装完[Antergos][2]后我所首先注意到的一些事情是在默认的Chromium浏览器中**没法正确显示印度语脚本**。 +你们到目前或许知道,我最近一直在尝试体验 [Antergos Linux][1]。在安装完[Antergos][2]后我所首先注意到的一些事情是在默认的 Chromium 浏览器中**没法正确显示印度语脚本**。 这是一件奇怪的事情,在我之前桌面Linux的体验中是从未遇到过的。起初,我认为是浏览器的问题,所以我安装了Firefox,然而问题依旧,Firefox也不能正确显示印度语。和Chromium不显示任何东西不同的是,Firefox确实显示了一些东西,但是毫无可读性。 ![No hindi support in Arch Linux based Antergos](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Hindi_Support_Antergos_Arch_linux_1.jpeg) -Chromium中的印度语显示 + +*Chromium中的印度语显示* ![No hindi support in Arch Linux based Antergos](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/08/Hindi_Support_Antergos_Arch_linux_2.jpeg) -Firefox中的印度语显示 + +*Firefox中的印度语显示* 奇怪吧?那么,默认情况下基于Arch的Antergos Linux中没有印度语的支持吗?我没有去验证,但是我假设其它基于梵语脚本的印地语之类会产生同样的问题。 @@ -37,7 +39,7 @@ via: http://itsfoss.com/display-hindi-arch-antergos/ 作者:[Abhishek][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 6d61107e76a99b4e6b6a77a1d1bd08f000f212bd Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 20 Sep 2015 19:52:20 +0800 Subject: [PATCH 2126/2517] PUB:20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container @ictlyh --- ...ata Virtualization GA with OData in Docker Container.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md (85%) diff --git a/translated/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md b/published/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md similarity index 85% rename from translated/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md rename to published/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md index 4d14bbc904..6564e13924 100644 --- a/translated/tech/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md +++ b/published/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md @@ -1,7 +1,7 @@ 如何在 Docker 容器中运行支持 OData 的 JBoss 数据虚拟化 GA -Howto Run JBoss Data Virtualization GA with OData in Docker Container ================================================================================ -大家好,我们今天来学习如何在一个 Docker 容器中运行支持 OData(译者注:Open Data Protocol,开放数据协议) 的 JBoss 数据虚拟化 6.0.0 GA(译者注:GA,General Availability,具体定义可以查看[WIKI][4])。JBoss 数据虚拟化是数据提供和集成解决方案平台,有多种分散的数据源时,转换为一种数据源统一对待,在正确的时间将所需数据传递给任意的应用或者用户。JBoss 数据虚拟化可以帮助我们将数据快速组合和转换为可重用的商业友好的数据模型,通过开放标准接口简单可用。它提供全面的数据抽取、联合、集成、转换,以及传输功能,将来自一个或多个源的数据组合为可重复使用和共享的灵活数据。要了解更多关于 JBoss 数据虚拟化的信息,可以查看它的[官方文档][1]。Docker 是一个提供开放平台用于打包,装载和以轻量级容器运行任何应用的开源平台。使用 Docker 容器我们可以轻松处理和启用支持 OData 的 JBoss 数据虚拟化。 + +大家好,我们今天来学习如何在一个 Docker 容器中运行支持 OData(译者注:Open Data Protocol,开放数据协议) 的 JBoss 数据虚拟化 6.0.0 GA(译者注:GA,General Availability,具体定义可以查看[WIKI][4])。JBoss 数据虚拟化是数据提供和集成解决方案平台,将多种分散的数据源转换为一种数据源统一对待,在正确的时间将所需数据传递给任意的应用或者用户。JBoss 数据虚拟化可以帮助我们将数据快速组合和转换为可重用的商业友好的数据模型,通过开放标准接口简单可用。它提供全面的数据抽取、联合、集成、转换,以及传输功能,将来自一个或多个源的数据组合为可重复使用和共享的灵活数据。要了解更多关于 JBoss 数据虚拟化的信息,可以查看它的[官方文档][1]。Docker 是一个提供开放平台用于打包,装载和以轻量级容器运行任何应用的开源平台。使用 Docker 容器我们可以轻松处理和启用支持 OData 的 JBoss 数据虚拟化。 下面是该指南中在 Docker 容器中运行支持 OData 的 JBoss 数据虚拟化的简单步骤。 @@ -78,7 +78,6 @@ Howto Run JBoss Data Virtualization GA with OData in Docker Container "LinkLocalIPv6PrefixLen": 0, ### 6. Web 界面 ### -### 6. Web Interface ### 现在,如果一切如期望的那样进行,当我们用浏览器打开 http://container-ip:8080/ 和 http://container-ip:9990 时会看到支持 oData 的 JBoss 数据虚拟化登录界面和 JBoss 管理界面。管理验证的用户名和密码分别是 admin 和 redhat1!数据虚拟化验证的用户名和密码都是 user。之后,我们可以通过 web 界面在内容间导航。 @@ -94,7 +93,7 @@ via: http://linoxide.com/linux-how-to/run-jboss-data-virtualization-ga-odata-doc 作者:[Arun Pyasi][a] 译者:[ictlyh](http://www.mutouxiaogui.cn/blog) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From ebbccfca891e4839bdfe20e4bd9d15f12460cb16 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 20 Sep 2015 22:26:19 +0800 Subject: [PATCH 2127/2517] PUB:RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage @FSSlc --- ...to Configure and Encrypt System Storage.md | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) rename {translated/tech/RHCSA => published}/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md (71%) diff --git a/translated/tech/RHCSA/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md b/published/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md similarity index 71% rename from translated/tech/RHCSA/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md rename to published/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md index 41890b2280..d33d4eb3d0 100644 --- a/translated/tech/RHCSA/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md +++ b/published/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md @@ -1,28 +1,28 @@ -RHCSA 系列:使用 'Parted' 和 'SSM' 来配置和加密系统存储 – Part 6 +RHCSA 系列(六): 使用 Parted 和 SSM 来配置和加密系统存储 ================================================================================ -在本篇文章中,我们将讨论在 RHEL 7 中如何使用传统的工具来设置和配置本地系统存储,并介绍系统存储管理器(也称为 SSM),它将极大地简化上面的任务。 +在本篇文章中,我们将讨论在 RHEL 7 中如何使用传统的工具来设置和配置本地系统存储,并介绍系统存储管理器(也称为 SSM),它将极大地简化上面的任务。 ![配置和加密系统存储](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-and-Encrypt-System-Storage.png) -RHCSA: 配置和加密系统存储 – Part 6 +*RHCSA: 配置和加密系统存储 – Part 6* -请注意,我们将在这篇文章中展开这个话题,但由于该话题的宽泛性,我们将在下一期(Part 7)中继续介绍有关它的描述和使用。 +请注意,我们将在这篇文章中展开这个话题,但由于该话题的宽泛性,我们将在下一期中继续介绍有关它的描述和使用。 ### 在 RHEL 7 中创建和修改分区 ### 在 RHEL 7 中, parted 是默认的用来处理分区的程序,且它允许你: - 展示当前的分区表 -- 操纵(增加或减少分区的大小)现有的分区 +- 操纵(扩大或缩小分区的大小)现有的分区 - 利用空余的磁盘空间或额外的物理存储设备来创建分区 -强烈建议你在试图增加一个新的分区或对一个现有分区进行更改前,你应当确保设备上没有任何一个分区正在使用(`umount /dev/partition`),且假如你正使用设备的一部分来作为 swap 分区,在进行上面的操作期间,你需要将它禁用(`swapoff -v /dev/partition`) 。 +强烈建议你在试图增加一个新的分区或对一个现有分区进行更改前,你应当确保该设备上没有任何一个分区正在使用(`umount /dev/分区`),且假如你正使用设备的一部分来作为 swap 分区,在进行上面的操作期间,你需要将它禁用(`swapoff -v /dev/分区`) 。 -实施上面的操作的最简单的方法是使用一个安装介质例如一个 RHEL 7 安装 DVD 或 USB 以急救模式启动 RHEL(Troubleshooting → Rescue a Red Hat Enterprise Linux system),然后当让你选择一个选项来挂载现有的 Linux 安装时,选择'跳过'这个选项,接着你将看到一个命令行提示符,在其中你可以像下图显示的那样开始键入与在一个未被使用的物理设备上创建一个正常的分区时所用的相同的命令。 +实施上面的操作的最简单的方法是使用一个安装介质例如一个 RHEL 7 的 DVD 或 USB 安装盘以急救模式启动 RHEL(`Troubleshooting` → `Rescue a Red Hat Enterprise Linux system`),然后当让你选择一个选项来挂载现有的 Linux 安装时,选择“跳过”这个选项,接着你将看到一个命令行提示符,在其中你可以像下图显示的那样开始键入与在一个未被使用的物理设备上创建一个正常的分区时所用的相同的命令。 ![RHEL 7 急救模式](http://www.tecmint.com/wp-content/uploads/2015/04/RHEL-7-Rescue-Mode.png) -RHEL 7 急救模式 +*RHEL 7 急救模式* 要启动 parted,只需键入: @@ -32,17 +32,17 @@ RHEL 7 急救模式 ![创建新的分区](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Partition.png) -创建新的分区 +*创建新的分区* -正如你所看到的那样,在这个例子中,我们正在使用一个 5 GB 的虚拟光驱。现在我们将要创建一个 4 GB 的主分区,然后将它格式化为 xfs 文件系统,它是 RHEL 7 中默认的文件系统。 +正如你所看到的那样,在这个例子中,我们正在使用一个 5 GB 的虚拟驱动器。现在我们将要创建一个 4 GB 的主分区,然后将它格式化为 xfs 文件系统,它是 RHEL 7 中默认的文件系统。 -你可以从一系列的文件系统中进行选择。你将需要使用 mkpart 来手动地创建分区,接着和平常一样,用 mkfs.fstype 来对分区进行格式化,因为 mkpart 并不支持许多现代的文件系统以达到即开即用。 +你可以从一系列的文件系统中进行选择。你将需要使用 `mkpart` 来手动地创建分区,接着和平常一样,用 `mkfs.类型` 来对分区进行格式化,因为 `mkpart` 并不支持许多现代的文件系统的到即开即用。 在下面的例子中,我们将为设备设定一个标记,然后在 `/dev/sdb` 上创建一个主分区 `(p)`,它从设备的 0% 开始,并在 4000MB(4 GB) 处结束。 ![在 Linux 中设定分区名称](http://www.tecmint.com/wp-content/uploads/2015/04/Label-Partition.png) -标记分区的名称 +*标记分区的名称* 接下来,我们将把分区格式化为 xfs 文件系统,然后再次打印出分区表,以此来确保更改已被应用。 @@ -51,11 +51,11 @@ RHEL 7 急救模式 ![在 Linux 中格式化分区](http://www.tecmint.com/wp-content/uploads/2015/04/Format-Partition-in-Linux.png) -格式化分区为 XFS 文件系统 +*格式化分区为 XFS 文件系统* -对于旧一点的文件系统,在 parted 中你应该使用 `resize` 命令来改变分区的大小。不幸的是,这只适用于 ext2, fat16, fat32, hfs, linux-swap, 和 reiserfs (若 libreiserfs 已被安装)。 +对于旧一点的文件系统,在 parted 中你可以使用 `resize` 命令来改变分区的大小。不幸的是,这只适用于 ext2, fat16, fat32, hfs, linux-swap, 和 reiserfs (若 libreiserfs 已被安装)。 -因此,改变分区大小的唯一方式是删除它然后再创建它(所以确保你对你的数据做了完整的备份!)。毫无疑问,在 RHEL 7 中默认的分区方案是基于 LVM 的。 +因此,改变分区大小的唯一方式是删除它然后再创建它(所以,确保你对你的数据做了完整的备份!)。毫无疑问,在 RHEL 7 中默认的分区方案是基于 LVM 的。 使用 parted 来移除一个分区,可以用: @@ -64,23 +64,23 @@ RHEL 7 急救模式 ![在 Linux 中移除分区](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-Partition-in-Linux.png) -移除或删除分区 +*移除或删除分区* ### 逻辑卷管理(LVM) ### -一旦一个磁盘被分好了分区,再去更改分区的大小就是一件困难或冒险的事了。基于这个原因,假如我们计划在我们的系统上对分区的大小进行更改,我们应当考虑使用 LVM 的可能性,而不是使用传统的分区系统。这样多个物理设备可以组成一个逻辑组,以此来寄宿可自定义数目的逻辑卷,而逻辑卷的增大或减少不会带来任何麻烦。 +一旦一个磁盘被分好了分区,再去更改分区的大小就是一件困难或冒险的事了。基于这个原因,假如我们计划在我们的系统上对分区的大小进行更改,我们应当考虑使用 LVM 的可能性,而不是使用传统的分区系统。这样多个物理设备可以组成一个逻辑组,以此来存放任意数目的逻辑卷,而逻辑卷的增大或减少不会带来任何麻烦。 简单来说,你会发现下面的示意图对记住 LVM 的基础架构或许有用。 ![LVM 的基本架构](http://www.tecmint.com/wp-content/uploads/2015/04/LVM-Diagram.png) -LVM 的基本架构 +*LVM 的基本架构* #### 创建物理卷,卷组和逻辑卷 #### 遵循下面的步骤是为了使用传统的卷管理工具来设置 LVM。由于你可以通过阅读这个网站上的 LVM 系列来扩展这个话题,我将只是概要的介绍设置 LVM 的基本步骤,然后与使用 SSM 来实现相同功能做个比较。 -**注**: 我们将使用整个磁盘 `/dev/sdb` 和 `/dev/sdc` 来作为 PVs (物理卷),但是否执行相同的操作完全取决于你。 +**注**: 我们将使用整个磁盘 `/dev/sdb` 和 `/dev/sdc` 来作为物理卷(PV),但是否执行相同的操作完全取决于你。 **1. 使用 /dev/sdb 和 /dev/sdc 中 100% 的可用磁盘空间来创建分区 `/dev/sdb1` 和 `/dev/sdc1`:** @@ -89,7 +89,7 @@ LVM 的基本架构 ![创建新分区](http://www.tecmint.com/wp-content/uploads/2015/04/Create-New-Partitions.png) -创建新分区 +*创建新分区* **2. 分别在 /dev/sdb1 和 /dev/sdc1 上共创建 2 个物理卷。** @@ -98,21 +98,21 @@ LVM 的基本架构 ![创建两个物理卷](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Physical-Volumes.png) -创建两个物理卷 +*创建两个物理卷* -记住,你可以使用 pvdisplay /dev/sd{b,c}1 来显示有关新建的 PV 的信息。 +记住,你可以使用 pvdisplay /dev/sd{b,c}1 来显示有关新建的物理卷的信息。 -**3. 在上一步中创建的 PV 之上创建一个 VG:** +**3. 在上一步中创建的物理卷之上创建一个卷组(VG):** # vgcreate tecmint_vg /dev/sd{b,c}1 ![在 Linux 中创建卷组](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Volume-Group.png) -创建卷组 +*创建卷组* -记住,你可使用 vgdisplay tecmint_vg 来显示有关新建的 VG 的信息。 +记住,你可使用 vgdisplay tecmint_vg 来显示有关新建的卷组的信息。 -**4. 像下面那样,在 VG tecmint_vg 之上创建 3 个逻辑卷:** +**4. 像下面那样,在卷组 tecmint_vg 之上创建 3 个逻辑卷(LV):** # lvcreate -L 3G -n vol01_docs tecmint_vg [vol01_docs → 3 GB] # lvcreate -L 1G -n vol02_logs tecmint_vg [vol02_logs → 1 GB] @@ -120,11 +120,11 @@ LVM 的基本架构 ![在 LVM 中创建逻辑卷](http://www.tecmint.com/wp-content/uploads/2015/04/Create-Logical-Volumes.png) -创建逻辑卷 +*创建逻辑卷* -记住,你可以使用 lvdisplay tecmint_vg 来显示有关在 VG tecmint_vg 之上新建的 LV 的信息。 +记住,你可以使用 lvdisplay tecmint_vg 来显示有关在 tecmint_vg 之上新建的逻辑卷的信息。 -**5. 格式化每个逻辑卷为 xfs 文件系统格式(假如你计划在以后将要缩小卷的大小,请别使用 xfs 文件系统格式!):** +**5. 格式化每个逻辑卷为 xfs 文件系统格式(假如你计划在以后将要缩小卷的大小,请别使用 xfs 文件系统格式!):** # mkfs.xfs /dev/tecmint_vg/vol01_docs # mkfs.xfs /dev/tecmint_vg/vol02_logs @@ -138,7 +138,7 @@ LVM 的基本架构 #### 移除逻辑卷,卷组和物理卷 #### -**7.现在我们将进行与刚才相反的操作并移除 LV,VG 和 PV:** +**7.现在我们将进行与刚才相反的操作并移除逻辑卷、卷组和物理卷:** # lvremove /dev/tecmint_vg/vol01_docs # lvremove /dev/tecmint_vg/vol02_logs @@ -161,20 +161,20 @@ LVM 的基本架构 - 初始化块设备来作为物理卷 - 创建一个卷组 - 创建逻辑卷 -- 格式化 LV 和 +- 格式化逻辑卷,以及 - 只使用一个命令来挂载它们 -**9. 现在,我们可以使用下面的命令来展示有关 PV,VG 或 LV 的信息:** +**9. 现在,我们可以使用下面的命令来展示有关物理卷、卷组或逻辑卷的信息:** # ssm list dev # ssm list pool # ssm list vol -![检查有关 PV, VG,或 LV 的信息](http://www.tecmint.com/wp-content/uploads/2015/04/Display-LVM-Information.png) +![检查有关物理卷、卷组或逻辑卷的信息](http://www.tecmint.com/wp-content/uploads/2015/04/Display-LVM-Information.png) -检查有关 PV, VG,或 LV 的信息 +*检查有关物理卷、卷组或逻辑卷的信息* -**10. 正如我们知道的那样, LVM 的一个显著的特点是可以在不停机的情况下更改(增大或缩小) 逻辑卷的大小:** +**10. 正如我们知道的那样, LVM 的一个显著的特点是可以在不停机的情况下更改(增大或缩小)逻辑卷的大小:** 假定在 vol02_logs 上我们用尽了空间,而 vol03_homes 还留有足够的空间。我们将把 vol03_homes 的大小调整为 4 GB,并使用剩余的空间来扩展 vol02_logs: @@ -184,7 +184,7 @@ LVM 的基本架构 ![查看卷的大小](http://www.tecmint.com/wp-content/uploads/2015/04/Check-LVM-Free-Space.png) -查看卷的大小 +*查看卷的大小* 然后执行: @@ -196,11 +196,11 @@ LVM 的基本架构 # ssm remove tecmint_vg -这个命令将返回一个提示,询问你是否确认删除 VG 和它所包含的 LV: +这个命令将返回一个提示,询问你是否确认删除卷组和它所包含的逻辑卷: ![移除逻辑卷和卷组](http://www.tecmint.com/wp-content/uploads/2015/04/Remove-LV-VG.png) -移除逻辑卷和卷组 +*移除逻辑卷和卷组* ### 管理加密的卷 ### @@ -216,7 +216,7 @@ SSM 也给系统管理员提供了为新的或现存的卷加密的能力。首 我们的下一个任务是往 /etc/fstab 中添加条目来让这些逻辑卷在启动时可用,而不是使用设备识别编号(/dev/something)。 -我们将使用每个 LV 的 UUID (使得当我们添加其他的逻辑卷或设备后,我们的设备仍然可以被唯一的标记),而我们可以使用 blkid 应用来找到它们的 UUID: +我们将使用每个逻辑卷的 UUID (使得当我们添加其他的逻辑卷或设备后,我们的设备仍然可以被唯一的标记),而我们可以使用 blkid 应用来找到它们的 UUID: # blkid -o value UUID /dev/tecmint_vg/vol01_docs # blkid -o value UUID /dev/tecmint_vg/vol02_logs @@ -226,7 +226,7 @@ SSM 也给系统管理员提供了为新的或现存的卷加密的能力。首 ![找到逻辑卷的 UUID](http://www.tecmint.com/wp-content/uploads/2015/04/Logical-Volume-UUID.png) -找到逻辑卷的 UUID +*找到逻辑卷的 UUID* 接着,使用下面的内容来创建 /etc/crypttab 文件(请更改 UUID 来适用于你的设置): @@ -243,11 +243,11 @@ SSM 也给系统管理员提供了为新的或现存的卷加密的能力。首 # Logical volume vol03_homes /dev/mapper/homes /mnt/homes ext4 defaults 0 2 -现在重启(systemctl reboot),则你将被要求为每个 LV 输入密码。随后,你可以通过检查相应的挂载点来确保挂载操作是否成功: +现在重启(`systemctl reboot`),则你将被要求为每个逻辑卷输入密码。随后,你可以通过检查相应的挂载点来确保挂载操作是否成功: ![确保逻辑卷挂载点](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-LV-Mount-Points.png) -确保逻辑卷挂载点 +*确保逻辑卷挂载点* ### 总结 ### @@ -261,7 +261,7 @@ via: http://www.tecmint.com/rhcsa-exam-create-format-resize-delete-and-encrypt-p 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 32dbd3b1e2563b6d2d038af3a2204a3ae3fb8369 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 20 Sep 2015 23:40:36 +0800 Subject: [PATCH 2128/2517] PUB:20150826 Five Super Cool Open Source Games @H-mudcup --- ...50826 Five Super Cool Open Source Games.md | 66 +++++++++++++++++++ ...50826 Five Super Cool Open Source Games.md | 66 ------------------- 2 files changed, 66 insertions(+), 66 deletions(-) create mode 100644 published/20150826 Five Super Cool Open Source Games.md delete mode 100644 translated/share/20150826 Five Super Cool Open Source Games.md diff --git a/published/20150826 Five Super Cool Open Source Games.md b/published/20150826 Five Super Cool Open Source Games.md new file mode 100644 index 0000000000..418d6248a5 --- /dev/null +++ b/published/20150826 Five Super Cool Open Source Games.md @@ -0,0 +1,66 @@ +五大超酷的开源游戏 +================================================================================ + +在2014年和2015年,Linux 涌入了一堆流行的付费游戏,例如备受欢迎的无主之地(Borderlands)、巫师(Witcher)、死亡岛(Dead Island) 和 CS 系列游戏。虽然这是令人激动的消息,但玩家有这个支出预算吗?付费游戏很好,但更好的是由了解玩家喜好的开发者开发的免费的替代品。 + +前段时间,我偶然看到了一个三年前发布的 YouTube 视频,标题非常的有正能量 [5个不算糟糕的开源游戏][1]。虽然视频表扬了一些开源游戏,我还是更喜欢用一个更加热情的方式来切入这个话题,至少如标题所说。所以,下面是我的一份五大超酷开源游戏的清单。 + +### Tux Racer ### + +![Tux Racer](http://fossforce.com/wp-content/uploads/2015/08/tuxracer-550x413.jpg) + +*Tux Racer* + +[《Tux Racer》][2]是这份清单上的第一个游戏,因为我对这个游戏很熟悉。最近,我的兄弟和我为了参加[玩电脑的孩子们][4]项目,在[去墨西哥的路途中][3],Tux Racer 是孩子和教师都喜欢玩的游戏之一。在这个游戏中,玩家使用 Linux 吉祥物——企鹅 Tux——在下山雪道上以计时赛的方式进行比赛。玩家们不断挑战他们自己的最佳纪录。目前还没有多玩家版本,但这是有可能改变的。它适用于 Linux、OS X、Windows 和 Android。 + +### Warsow ### + +![Warsow](http://fossforce.com/wp-content/uploads/2015/08/warsow-550x413.jpg) + +*Warsow* + +[《Warsow》][5]网站介绍道:“设定是有未来感的卡通世界,Warsow 是个完全开放的适用于 Windows、Linux 和 Mac OS X平台的快节奏第一人称射击游戏(FPS)。Warsow 是跨网络的尊重和体育精神的的艺术。(Warsow is the Art of Respect and Sportsmanship Over the Web. 大写回文字母组成 Warsow。)” 我很不情愿的把 FPS 类放到了这个列表中,因为很多人玩过这类的游戏,但是我的确被 Warsow 打动了。它对很多动作进行了优先级排序,游戏节奏很快,一开始就有八个武器。卡通化的风格让玩的过程变得没有那么严肃,更加的休闲,非常适合和亲友一同玩。然而,它却以充满竞争的游戏自居,并且当我体验这个游戏时,我发现周围确实有一些专家级的玩家。它适用于 Linux、Windows 和 OS X。 + +### M.A.R.S——一个荒诞的射击游戏 ### + +![M.A.R.S. - A ridiculous shooter](http://fossforce.com/wp-content/uploads/2015/08/MARS-screenshot-550x344.jpg) + +*M.A.R.S.——一个荒诞的射击游戏* + +[《M.A.R.S——一个荒诞的射击游戏》][6]之所以吸引人是因为它充满活力的色彩和画风。支持两个玩家使用同一个键盘,而一个在线多玩家版本目前正在开发中——这意味着想要和朋友们一起玩暂时还要等等。不论如何,它是个可以使用几个不同飞船和武器的有趣的太空射击游戏。飞船的形状不同,从普通的枪、激光、散射枪到更有趣的武器(随机出来的飞船中有一个会对敌人发射泡泡,这为这款混乱的游戏增添了很多乐趣)。游戏有几种模式,比如标准模式和对方进行殊死搏斗以获得高分或先达到某个分数线,还有其他的模式,空间球(Spaceball)、坟坑(Grave-itation Pit)和保加农炮(Cannon Keep)。它适用于 Linux、Windows 和 OS X。 + +### Valyria Tear ### + +![Valyria Tear](http://fossforce.com/wp-content/uploads/2015/08/bronnan-jump-to-enemy-550x413.jpg) + +*Valyria Tear* + +[Valyria Tear][7] 类似近年来拥有众多粉丝的角色扮演游戏(RPG)。故事设定在奇幻游戏的通用年代,充满了骑士、王国和魔法,以及主要角色 Bronann。设计团队在这个世界的设计上做的非常棒,实现了玩家对这类游戏所有的期望:隐藏的宝藏、偶遇的怪物、非玩家操纵角色(NPC)的互动以及所有 RPG 不可或缺的——在低级别的怪物上刷经验直到可以面对大 BOSS。我在试玩的时候,时间不允许我太过深入到这个游戏故事中,但是感兴趣的人可以看 YouTube 上由 Yohann Ferriera 用户发的‘[Let’s Play][8]’系列视频。它适用于 Linux、Windows 和 OS X。 + +### SuperTuxKart ### + +![SuperTuxKart](http://fossforce.com/wp-content/uploads/2015/08/hacienda_tux_antarctica-550x293.jpg) + +*SuperTuxKart* + +最后一个同样好玩的游戏是 [SuperTuxKart][9],一个效仿 Mario Kart(马里奥卡丁车)但丝毫不逊色的好游戏。它在2000年-2004年间开始以 Tux Kart 开发,但是在成品中有错误,结果开发就停止了几年。从2006年开始重新开发时起,它就一直在改进,直到四个月前0.9版首次发布。在游戏里,我们的老朋友 Tux 与马里奥和其他一些开源吉祥物一同开始。其中一个熟悉的面孔是 Suzanne,这是 Blender 的那只吉祥物猴子。画面很给力,游戏很流畅。虽然在线游戏还在计划阶段,但是分屏多玩家游戏是可以的。一个电脑最多可以供四个玩家同时玩。它适用于 Linux、Windows、OS X、AmigaOS 4、AROS 和 MorphOS。 + +-------------------------------------------------------------------------------- + +via: http://fossforce.com/2015/08/five-super-cool-open-source-games/ + +作者:Hunter Banks +译者:[H-mudcup](https://github.com/H-mudcup) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://www.youtube.com/watch?v=BEKVl-XtOP8 +[2]:http://tuxracer.sourceforge.net/download.html +[3]:http://fossforce.com/2015/07/banks-family-values-texas-linux-fest/ +[4]:http://www.kidsoncomputers.org/an-amazing-week-in-oaxaca +[5]:https://www.warsow.net/download +[6]:http://mars-game.sourceforge.net/ +[7]:http://valyriatear.blogspot.com/ +[8]:https://www.youtube.com/channel/UCQ5KrSk9EqcT_JixWY2RyMA +[9]:http://supertuxkart.sourceforge.net/ diff --git a/translated/share/20150826 Five Super Cool Open Source Games.md b/translated/share/20150826 Five Super Cool Open Source Games.md deleted file mode 100644 index 30ca09e171..0000000000 --- a/translated/share/20150826 Five Super Cool Open Source Games.md +++ /dev/null @@ -1,66 +0,0 @@ -Translated by H-mudcup -五大超酷的开源游戏 -================================================================================ -在2014年和2015年,Linux 成了一堆流行商业品牌的家,例如备受欢迎的 Borderlands、Witcher、Dead Island 和 CS系列游戏。虽然这是令人激动的消息,但这跟玩家的预算有什么关系?商业品牌很好,但更好的是由了解玩家喜好的开发者开发的免费的替代品。 - -前段时间,我偶然看到了一个三年前发布的 YouTube 视频,标题非常的有正能量[5个不算糟糕的开源游戏][1]。虽然视频表扬了一些开源游戏,我还是更喜欢用一个更加热情的方式来切入这个话题,至少如标题所说。所以,下面是我的一份五大超酷开源游戏的清单。 - -### Tux Racer ### - -![Tux Racer](http://fossforce.com/wp-content/uploads/2015/08/tuxracer-550x413.jpg) - -Tux Racer - -[《Tux Racer》][2]是这份清单上的第一个游戏,因为我对这个游戏很熟悉。我和兄弟与[电脑上的孩子们][4]项目在[最近一次去墨西哥的路途中][3] Tux Racer 是孩子和教师都喜欢玩的游戏之一。在这个游戏中,玩家使用 Linux 吉祥物,企鹅 Tux,在下山雪道上以计时赛的方式进行比赛。玩家们不断挑战他们自己的最佳纪录。目前还没有多玩家版本,但这是有可能改变的。适用于 Linux、OS X、Windows 和 Android。 - -### Warsow ### - -![Warsow](http://fossforce.com/wp-content/uploads/2015/08/warsow-550x413.jpg) - -Warsow - -[《Warsow》][5]网站解释道:“设定是有未来感的卡通世界,Warsow 是个完全开放的适用于 Windows、Linux 和 Mac OS X平台的快节奏第一人称射击游戏(FPS)。Warsow 是尊重的艺术和网络中的体育精神。(Warsow is the Art of Respect and Sportsmanship Over the Web.大写字母组成Warsow。)” 我很不情愿的把 FPS 类放到了这个列表中,因为很多人玩过这类的游戏,但是我的确被 Warsow 打动了。它对很多动作进行了优先级排序,游戏节奏很快,一开始就有八个武器。卡通化的风格让玩的过程变得没有那么严肃,更加的休闲,非常适合可以和亲友一同玩。然而,他却以充满竞争的游戏自居,并且当我体验这个游戏时,我发现周围确实有一些专家级的玩家。适用于 Linux、Windows 和 OS X。 - -### M.A.R.S——一个荒诞的射击游戏 ### - -![M.A.R.S. - A ridiculous shooter](http://fossforce.com/wp-content/uploads/2015/08/MARS-screenshot-550x344.jpg) - -M.A.R.S.——一个荒诞的射击游戏 - -[《M.A.R.S——一个荒诞的射击游戏》][6]之所以吸引人是因为他充满活力的色彩和画风。支持两个玩家使用同一个键盘,而一个在线多玩家版本目前正在开发中——这意味着想要和朋友们一起玩暂时还要等等。不论如何,它是个可以使用几个不同飞船和武器的有趣的太空射击游戏。飞船的形状不同,从普通的枪、激光、散射枪到更有趣的武器(随机出来的飞船中有一个会对敌人发射泡泡,这为这款混乱的游戏增添了很多乐趣)。游戏几种模式,比如标准模式和对方进行殊死搏斗以获得高分或先达到某个分数线,还有其他的模式,空间球(Spaceball)、坟坑(Grave-itation Pit)和保加农炮(Cannon Keep)。适用于 Linux、Windows 和 OS X。 - -### Valyria Tear ### - -![Valyria Tear](http://fossforce.com/wp-content/uploads/2015/08/bronnan-jump-to-enemy-550x413.jpg) - -Valyria Tear - -[Valyria Tear][7] 类似几年来拥有众多粉丝的角色扮演游戏(RPG)。故事设定在梦幻游戏的通用年代,充满了骑士、王国和魔法,以及主要角色 Bronann。设计团队做的非常棒,在设计这个世界和实现玩家对这类游戏所有的期望:隐藏的宝藏、偶遇的怪物、非玩家操纵角色(NPC)的互动以及所有 RPG 不可或缺的:在低级别的怪物上刷经验直到可以面对大 BOSS。我在试玩的时候,时间不允许我太过深入到这个游戏故事中,但是感兴趣的人可以看 YouTube 上由 Yohann Ferriera 用户发的‘[Let’s Play][8]’系列视频。适用于 Linux、Windows 和 OS X。 - -### SuperTuxKart ### - -![SuperTuxKart](http://fossforce.com/wp-content/uploads/2015/08/hacienda_tux_antarctica-550x293.jpg) - -SuperTuxKart - -最后一个同样好玩的游戏是 [SuperTuxKart][9],一个效仿 Mario Kart(马里奥卡丁车)但丝毫不必原作差的好游戏。它在2000年-2004年间开始以 Tux Kart 开发,但是在成品中有错误,结果开发就停止了几年。从2006年开始重新开发时起,它就一直在改进,直到四个月前0.9版首次发布。在游戏里,我们的老朋友 Tux 与马里奥和其他一些开源吉祥物一同开始。其中一个熟悉的面孔是 Suzanne,Blender 的那只吉祥物猴子。画面很给力,游戏很流畅。虽然在线游戏还在计划阶段,但是分屏多玩家游戏是可以的。一个电脑最多可以四个玩家同时玩。适用于 Linux、Windows、OS X、AmigaOS 4、AROS 和 MorphOS。 - --------------------------------------------------------------------------------- - -via: http://fossforce.com/2015/08/five-super-cool-open-source-games/ - -作者:Hunter Banks -译者:[H-mudcup](https://github.com/H-mudcup) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://www.youtube.com/watch?v=BEKVl-XtOP8 -[2]:http://tuxracer.sourceforge.net/download.html -[3]:http://fossforce.com/2015/07/banks-family-values-texas-linux-fest/ -[4]:http://www.kidsoncomputers.org/an-amazing-week-in-oaxaca -[5]:https://www.warsow.net/download -[6]:http://mars-game.sourceforge.net/ -[7]:http://valyriatear.blogspot.com/ -[8]:https://www.youtube.com/channel/UCQ5KrSk9EqcT_JixWY2RyMA -[9]:http://supertuxkart.sourceforge.net/ From a248dc90a6e0dfccb3945217dea1f5ed0d9c8a84 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 21 Sep 2015 00:40:16 +0800 Subject: [PATCH 2129/2517] PUB:20150901 Is Linux Right For You MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @icybreaker 翻译的不错 ! --- published/20150901 Is Linux Right For You.md | 63 +++++++++++++++++++ .../talk/20150901 Is Linux Right For You.md | 63 ------------------- 2 files changed, 63 insertions(+), 63 deletions(-) create mode 100644 published/20150901 Is Linux Right For You.md delete mode 100644 translated/talk/20150901 Is Linux Right For You.md diff --git a/published/20150901 Is Linux Right For You.md b/published/20150901 Is Linux Right For You.md new file mode 100644 index 0000000000..af88b9bfee --- /dev/null +++ b/published/20150901 Is Linux Right For You.md @@ -0,0 +1,63 @@ +Linux 系统是否适合于您? +================================================================================ +> 并非人人都适合使用 Linux --对许多用户来说,Windows 或 OSX 会是更好的选择。 + +我喜欢使用 Linux 桌面系统,并不是因为软件的政治性质,也不是不喜欢其它操作系统。我喜欢 Linux 系统因为它能满足我的需求并且确实适合使用。 + +我的经验是,并非人人都适合切换至“Linux 的生活方式”。本文将帮助您通过分析使用 Linux 系统的利弊来供您自行判断使用 Linux 是否真正适合您。 + +### 什么时候更换系统? ### + +当有充分的理由时,将系统切换到 Linux 系统是很有意义的。这对 Windows 用户将系统更换到 OSX 或类似的情况都同样适用。为让您的系统转变成功,您必须首先确定为什么要做这种转换。 + +对某些人来说,更换系统通常意味着他们不满于当前的系统操作平台。也许是最新的升级给了他们糟糕的用户体验,而他们也已准备好更换到别的系统,也许仅仅是因为对某个系统好奇。不管动机是什么,必须要有充分的理由支撑您做出更换操作系统的决定。如果没有一个充足的原因让您这样做,往往不会成功。 + +然而事事都有例外。如果您确实对 Linux 桌面非常感兴趣,或许可以选择一种折衷的方式。 + +### 放慢起步的脚步 ### + +第一次尝试运行 Linux 系统后,我看到就有人开始批判 Windows 安装过程的费时,完全是因为他们20分钟就用闪存安装好 Ubuntu 的良好体验。但是伙伴们,这并不只是一次测验。相反,我有如下建议: + +- 用一周的时间尝试在[虚拟机上运行 Linux 系统][1]。这意味着您将在该系统上执行所有的浏览器工作、邮箱操作和其它想要完成的任务。 +- 如果运行虚拟机资源消耗太大,您可以尝试用提供了[一些持久存储][2]的 USB 驱动器来运行 Linux,您的主操作系统将不受任何影响。与此同时,您仍可以运行 Linux 系统。 +- 运行 Linux 系统一周后,如果一切进展顺利,下一步您可以计算一下这周内登入 Windows 的次数。如果只是偶尔登录 Windows 系统,下一步就可以尝试运行 Windows 和 Linux 的[双系统][3]。对那些只运行了 Linux 系统的用户,可以考虑尝试将系统真正更换为 Linux 系统。 +- 在你完全删除 Windows 分区前,更应该购买一个新硬盘来安装 Linux 系统。这样有了充足的硬盘空间,您就可以使用双系统。如果必须要启动 Windows 系统做些事情的话,Windows 系统也是可以运行的。 + +### 使用 Linux 系统的好处是什么? ### + +将系统更换到 Linux 有什么好处呢?一般而言,这种好处对大多数人来说可以归结到释放个性自由。在使用 Linux 系统的时候,如果您不喜欢某些设置,可以自行更改它们。同时使用 Linux 可以为用户节省大量的硬件升级开支和不必要的软件开支。另外,您不需再费力找寻已丢失的软件许可证密钥,而且如果您不喜欢即将发布的系统版本,大可轻松地更换到别的版本。 + +在 Linux 桌面方面可以选择的桌面种类是惊人的多,看起来对新手来说做这种选择非常困难。但是如果您发现了喜欢的一款 Linux 版本(Debian、Fedora、Arch等),最困难的工作其实已经完成了,您需要做的就是找到各版本的区别并选择出您最喜欢的系统版本环境。 + +如今我听到的最常见的抱怨之一是用户发现没有太多的软件能适用于 Linux 系统。然而,这并不是事实。尽管别的操作系统可能会提供更多软件,但是如今的 Linux 也已经提供了足够多应用程序满足您的各种需求,包括视频剪辑(家用和专业级)、摄影、办公管理软件、远程访问、音乐软件、等等等等。 + +### 使用 Linux 系统您会失去些什么? ### + +虽然我喜欢使用 Linux,但我妻子的家庭办公依然依赖于 OS X。对于用 Linux 系统完成一些特定的任务她心满意足,但是她需要 OS X 来运行一些不支持 Linux 的软件。这是许多想要更换系统的用户会遇到的一个常见的问题。如果要更换系统,您需要考虑是否愿意失去一些关键的软件工具。 + +有时这个问题是因为软件的数据只能用该软件打开。别的情况下,是传统应用程序的工作流和功能并不适用于在 Linux 系统上可运行的软件。我自己并没有遇到过这类问题,但是我知道确实存在这些问题。许多 Linux 上的软件在其它操作系统上也都可以用。所以如果担心这类软件兼容问题,建议您先尝试在已有的系统上操作一下几款类似的应用程序。 + +更换成 Linux 系统后,另一件您可能会失去的是本地系统支持服务。人们通常会嘲笑这种愚蠢行径,但我知道,无数的新手在使用 Linux 时会发现解决 Linux 上各种问题的唯一资源就是来自网络另一端的陌生人提供的帮助。如果只是他们的 PC 遇到了一些问题,这将会比较麻烦。Windows 和 OS X 的用户已经习惯各城市遍布了支持他们操作系统的各项技术服务。 + +### 如何开启新旅程? ### + +这里建议大家要记住最重要的就是总要有个回退方案。如果您将 Windows 10 从硬盘中擦除,您会发现重新安装它又会花费金钱。对那些从其它 Windows 发布版本升级的用户来说尤其会遇到这种情况。请接受这个建议,对新手来说使用闪存安装 Linux 或使用 Windows 和 Linux 双系统都是更值得提倡的做法。您也许会如鱼得水般使用 Linux系统,但是有了一份回退方案,您将高枕无忧。 + +相反,如果数周以来您一直依赖于使用双操作系统,但是已经准备好冒险去尝试一下单操作系统,那么就去做吧。格式化您的驱动器,重新安装您喜爱的 Linux 发行版。数年来我一直都是“全职” Linux 使用爱好者,这里可以确定地告诉您,使用 Linux 系统感觉棒极了。这种感觉会持续多久?我第一次的 Linux 系统使用经验还是来自早期的 Red Hat 系统,最终在2003年,我在自己的笔记本上整个安装了 Linux 系统。 + +Linux 爱好者们,你们什么时候开始使用 Linux 的?您在最初更换成 Linux 系统时是兴奋还是焦虑呢?欢迎点击评论分享你们的经验。 + +-------------------------------------------------------------------------------- + +via: http://www.datamation.com/open-source/is-linux-right-for-you.html + +作者:[Matt Hartley][a] +译者:[icybreaker](https://github.com/icybreaker) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.datamation.com/author/Matt-Hartley-3080.html +[1]:http://www.psychocats.net/ubuntu/virtualbox +[2]:http://www.howtogeek.com/howto/14912/create-a-persistent-bootable-ubuntu-usb-flash-drive/ +[3]:http://www.linuxandubuntu.com/home/dual-boot-ubuntu-15-04-14-10-and-windows-10-8-1-8-step-by-step-tutorial-with-screenshots diff --git a/translated/talk/20150901 Is Linux Right For You.md b/translated/talk/20150901 Is Linux Right For You.md deleted file mode 100644 index 60b56f6e25..0000000000 --- a/translated/talk/20150901 Is Linux Right For You.md +++ /dev/null @@ -1,63 +0,0 @@ -Linux系统是否适合于您? -================================================================================ -> 并非人人都适合使用Linux--对许多用户来说,Windows或OSX会是更好的选择。 - -我喜欢使用Linux系统,并不是因为软件的政治性质,也不是不喜欢其他操作系统。我喜欢Linux系统因为它能满足我的需求并且确实适合使用。 - -我的经验是,并非人人都适合切换至“Linux的生活方式”。本文将帮助您通过分析使用Linux系统的利弊来供您自行判断使用Linux是否真正适合您。 - -### 什么时候更换系统? ### - -当有充分的理由时,将系统切换到Linux系统是很有意义的。这对Windows用户将系统更换到OSX或类似的情况都同样适用。为让您的系统转变成功,您必须首先确定为什么要做这种转换。 - -对某些人来说,更换系统通常意味着他们不满于当前的系统操作平台。也许是最新的升级给了他们糟糕的用户体验,他们已准备好更换到别的系统,也许仅仅是因为对某个系统好奇。不管动机是什么,必须要有充分的理由支撑您做出更换操作系统的决定。如果没有一个充足的原因让您这样做,往往不会成功。 - -然而事事都有例外。如果您确实对Linux非常感兴趣,或许可以选择一种折衷的方式。 - -### 放慢起步的脚步 ### - -第一次尝试运行Linux系统后,我看到就有人开始批判Windows安装过程的费时,完全是因为他们20分钟就用闪存安装好Ubuntu的良好体验。但是伙伴们,这并不只是一次测验。相反,我有如下建议: - -- 一周的时间尝试在[虚拟机上运行Linux系统][1]。这意味着您将在该系统上运行所有的浏览器工作、邮箱操作和其它想要完成的任务。 -- 如果运行虚拟机资源消耗太大,您可以尝试通过[存储持久性][2]的USB驱动器来运行Linux,您的主操作系统将不受任何影响。与此同时,您仍可以运行Linux系统。 -- 运行Linux系统一周后,如果一切进展顺利,下一步您可以计算一下这周内登入Windows的次数。如果只是偶尔登陆Windows系统,下一步就可以尝试运行Windows和Linux[双系统][3]。对那些只运行Linux系统的用户,可以考虑尝试将系统真正更换为Linux系统。 -- 在管理Windows分区前,有必要购买一个新硬盘来安装Linux系统。这样只要有充足的硬盘空间,您就可以使用双系统。如果想到必须要要启动Windows系统做些事情,Windows系统也是可以运行的。 - -### 使用Linux系统的好处是什么? ### - -将系统更换到Linux有什么好处呢?一般而言,这种好处对大多数人来说可以归结到释放个性化自由。在使用Linux系统的时候,如果您不喜欢某些设置,可以自行更改它们。同时使用Linux可以为用户节省大量的硬件升级开支和不必要的软件开支。另外,您不需再费力找寻已丢失的软件许可证密钥,而且如果您不喜欢即将发布的系统版本,大可轻松地更换到别的版本。 - -台式机首选Linux系统是令人吃惊的,看起来对新手来说做这种选择非常困难。但是如果您发现了喜欢的一款Linux版本(Debian,Fedora,Arch等),最困难的工作其实已经完成了,您需要做的就是找到各版本并选择出您最喜欢的系统版本环境。 - -如今我听到的最常见的抱怨之一是用户发现没有太多的软件格式能适用于Linux系统。然而,这并不是事实。尽管别的操作系统可能会提供更多软件,但是如今的Linux也已经提供了足够多应用程序满足您的各种需求,包括视频剪辑(家庭版和专业版),摄影,办公管理软件,远程访问,音乐软件,还有很多别的各类软件。 - -### 使用Linux系统您会失去些什么? ### - -虽然我喜欢使用Linux,但我妻子的家庭办公系统依然依赖于OS X。对于用Linux系统完成一些特定的任务她心满意足,但是她仍习惯于使用提供Linux不支持的一些软件的OS X系统。这是许多想要更换系统的用户会遇到的一个常见的问题。如果要更换系统,您需要考虑是否愿意失去一些关键的软件工具。 - -有时在Linux系统上遇到问题是因为软件会内容锁定。别的情况下,是在Linux系统上可运行的软件并不适用于传统应用程序的工作流和功能。我自己并没有遇到过这类问题,但是我知道确实存在这些问题。许多Linux上的软件在其他操作系统上也都可以用。所以如果担心这类软件兼容问题,建议您先尝试在已有的系统上操作一下几款类似的应用程序。 - -更换成Linux系统后,另一件您可能会失去的是本地系统支持服务。人们通常会嘲笑这种愚蠢行径,但我知道,无数的新手在使用Linux时会发现解决Linux上各种问题的唯一资源就是来自网络另一端的陌生人提供的帮助。如果只是他们的PC遇到了一些问题,这将会比较麻烦。Windows和OS X的用户已经习惯各城市遍布了支持他们操作系统的各项技术服务。 - -### 如何开启新旅程? ### - -这里建议大家要记住最重要的就是经常做备份。如果您将Windows 10从硬盘中擦除,您会发现重新安装它又会花费金钱。对那些从其他Windows发布版本升级的用户来说尤其会遇到这种情况。接受这个建议,那就是对新手来说使用闪存安装Linux或使用Windows和Linux双系统都是更值得提倡的做法。您也许会如鱼得水般使用Linux系统,但是有了一份备份计划,您将高枕无忧。 - -相反,如果数周以来您一直依赖于使用双操作系统,但是已经准备好冒险去尝试一下单操作系统,那么就去做吧。格式化您的驱动器,重新安装您喜爱的Linux distribution。数年来我一直都是"全职"Linux使用爱好者,这里可以确定地告诉您,使用Linux系统感觉棒极了。这种感觉会持续多久?我第一次的Linux系统使用经验还是来自早期的Red Hat系统,2003年我已经决定在自己的笔记本上安装专用的Linux系统并一直使用至今。 - -Linux爱好者们,你们什么时候开始使用Linux的?您在最初更换成Linux系统时是兴奋还是焦虑呢?欢迎点击评论分享你们的经验。 - --------------------------------------------------------------------------------- - -via: http://www.datamation.com/open-source/is-linux-right-for-you.html - -作者:[Matt Hartley][a] -译者:[icybreaker](https://github.com/icybreaker) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.datamation.com/author/Matt-Hartley-3080.html -[1]:http://www.psychocats.net/ubuntu/virtualbox -[2]:http://www.howtogeek.com/howto/14912/create-a-persistent-bootable-ubuntu-usb-flash-drive/ -[3]:http://www.linuxandubuntu.com/home/dual-boot-ubuntu-15-04-14-10-and-windows-10-8-1-8-step-by-step-tutorial-with-screenshots From 980d64729a1480cec0fb9a79747c508ce2ee63aa Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 21 Sep 2015 15:40:14 +0800 Subject: [PATCH 2130/2517] =?UTF-8?q?20150921-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... The New Ubuntu 15.10 Default Wallpaper.md | 44 ++++ ...21 Configure PXE Server In Ubuntu 14.04.md | 249 ++++++++++++++++++ ...onCube Loaders on Ubuntu 14.04 or 15.04.md | 89 +++++++ ...Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 102 +++++++ 4 files changed, 484 insertions(+) create mode 100644 sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md create mode 100644 sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md create mode 100644 sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md create mode 100644 sources/tech/20150921 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md diff --git a/sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md b/sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md new file mode 100644 index 0000000000..557fcbc427 --- /dev/null +++ b/sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md @@ -0,0 +1,44 @@ +Meet The New Ubuntu 15.10 Default Wallpaper +================================================================================ +**The brand new default wallpaper for Ubuntu 15.10 Wily Werewolf has been unveiled. ** + +At first glance you may find little has changed from the origami-inspired ‘Suru’ design shipped with April’s release of Ubuntu 15.04. But look closer and you’ll see that the new default background does feature some subtle differences. + +For one it looks much lighter, helped by an orange glow emanating from the upper-left of the image. The angular folds and sections remain, but with the addition of blocky, rectangular sections. + +The new background has been designed by Canonical Design Team member Alex Milazzo. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/09/ubuntu-1510-wily-werewolf-wallpaper.jpg) + +The Ubuntu 15.10 default desktop wallpaper + +And just to show that there is a change, here is the Ubuntu 15.04 default wallpaper for comparison: + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/03/suru-desktop-wallpaper-ubuntu-vivid.jpg) + +The Ubuntu 15.04 default desktop wallpaper + +### Download Ubuntu 15.10 Wallpaper ### + +If you’re running daily builds of Ubuntu 15.10 Wily Werewolf and don’t yet see this as your default wallpaper you’ve no broken anything: the design has been unveiled but is, as of writing, yet to be packaged and uploaded to Wily itself. + +You don’t have to wait until October to use the new design as your desktop background. You can download the wallpaper in a huge HiDPI display friendly 4096×2304 resolution by hitting the button below. + +- [Download Ubuntu the new 15.10 Default Wallpaper][1] + +Finally, as we say this every time there’s a new wallpaper, you don’t have to care about the minutiae of distribution branding and design. If the new wallpaper is not to your tastes or you never keep it you can, as ever, easily change it — this isn’t the Ubuntu Phone after all! + +**Are you a fan of the refreshed look? Let us know in the comments below. ** + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/09/ubuntu-15-10-wily-werewolf-default-wallpaper + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://launchpadlibrarian.net/218258177/Wolf_Wallpaper_Desktop_4096x2304_Purple_PNG-24.png \ No newline at end of file diff --git a/sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md b/sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md new file mode 100644 index 0000000000..0ac8dbc527 --- /dev/null +++ b/sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md @@ -0,0 +1,249 @@ +Configure PXE Server In Ubuntu 14.04 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/09/pxe-featured.jpg) + +PXE (Preboot Execution Environment) Server allows the user to boot a Linux distribution from a network and install it on hundreds of PCs at a time without any Linux iso images. If your client’s computers don’t have CD/DVD or USB drives, or if you want to set up multiple computers at the same time in a large enterprise, then PXE server can be used to save money and time. + +In this article we will show you how you can configure a PXE server in Ubuntu 14.04. + +### Configure Networking ### + +To get started, you need to first set up your PXE server to use a static IP. To set up a static IP address in your system, you need to edit the “/etc/network/interfaces” file. + +1. Open the “/etc/network/interfaces” file. + + sudo nano /etc/network/interfaces + +Add/edit as described below: + + # The loopback network interface + auto lo + iface lo inet loopback + # The primary network interface + auto eth0 + iface eth0 inet static + address 192.168.1.20 + netmask 255.255.255.0 + gateway 192.168.1.1 + dns-nameservers 8.8.8.8 + +Save the file and exit. This will set its IP address to “192.168.1.20”. Restart the network service. + + sudo /etc/init.d/networking restart + +### Install DHCP, TFTP and NFS: ### + +DHCP, TFTP and NFS are essential components for configuring a PXE server. First you need to update your system and install all necessary packages. + +For this, run the following commands: + + sudo apt-get update + sudo apt-get install isc-dhcp-Server inetutils-inetd tftpd-hpa syslinux nfs-kernel-Server + +### Configure DHCP Server: ### + +DHCP stands for Dynamic Host Configuration Protocol, and it is used mainly for dynamically distributing network configuration parameters such as IP addresses for interfaces and services. A DHCP server in PXE environment allow clients to request and receive an IP address automatically to gain access to the network servers. + +1. Edit the “/etc/default/dhcp3-server” file. + + sudo nano /etc/default/dhcp3-server + +Add/edit as described below: + + INTERFACES="eth0" + +Save (Ctrl + o) and exit (Ctrl + x) the file. + +2. Edit the “/etc/dhcp3/dhcpd.conf” file: + + sudo nano /etc/dhcp/dhcpd.conf + +Add/edit as described below: + + default-lease-time 600; + max-lease-time 7200; + subnet 192.168.1.0 netmask 255.255.255.0 { + range 192.168.1.21 192.168.1.240; + option subnet-mask 255.255.255.0; + option routers 192.168.1.20; + option broadcast-address 192.168.1.255; + filename "pxelinux.0"; + next-Server 192.168.1.20; + } + +Save the file and exit. + +3. Start the DHCP service. + + sudo /etc/init.d/isc-dhcp-server start + +### Configure TFTP Server: ### + +TFTP is a file-transfer protocol which is similar to FTP. It is used where user authentication and directory visibility are not required. The TFTP server is always listening for PXE clients on the network. When it detects any network PXE client asking for PXE services, then it provides a network package that contains the boot menu. + +1. To configure TFTP, edit the “/etc/inetd.conf” file. + + sudo nano /etc/inetd.conf + +Add/edit as described below: + + tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot + +Save and exit the file. + +2. Edit the “/etc/default/tftpd-hpa” file. + + sudo nano /etc/default/tftpd-hpa + +Add/edit as described below: + + TFTP_USERNAME="tftp" + TFTP_DIRECTORY="/var/lib/tftpboot" + TFTP_ADDRESS="[:0.0.0.0:]:69" + TFTP_OPTIONS="--secure" + RUN_DAEMON="yes" + OPTIONS="-l -s /var/lib/tftpboot" + +Save and exit the file. + +3. Enable boot service for `inetd` to automatically start after every system reboot and start tftpd service. + + sudo update-inetd --enable BOOT + sudo service tftpd-hpa start + +4. Check status. + + sudo netstat -lu + +It will show the following output: + + Proto Recv-Q Send-Q Local Address Foreign Address State + udp 0 0 *:tftp *:* + +### Configure PXE boot files ### + +Now you need the PXE boot file “pxelinux.0” to be present in the TFTP root directory. Make a directory structure for TFTP, and copy all the bootloader files provided by syslinux from the “/usr/lib/syslinux/” to the “/var/lib/tftpboot/” path by issuing the following commands: + + sudo mkdir /var/lib/tftpboot + sudo mkdir /var/lib/tftpboot/pxelinux.cfg + sudo mkdir -p /var/lib/tftpboot/Ubuntu/14.04/amd64/ + sudo cp /usr/lib/syslinux/vesamenu.c32 /var/lib/tftpboot/ + sudo cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/ + +#### Set up PXELINUX configuration file #### + +The PXE configuration file defines the boot menu displayed to the PXE client when it boots up and contacts the TFTP server. By default, when a PXE client boots up, it will use its own MAC address to specify which configuration file to read, so we need to create that default file that contains the list of kernels which are available to boot. + +Edit the PXE Server configuration file with valid installation options. + +To edit “/var/lib/tftpboot/pxelinux.cfg/default,” + + sudo nano /var/lib/tftpboot/pxelinux.cfg/default + +Add/edit as described below: + + DEFAULT vesamenu.c32 + TIMEOUT 100 + PROMPT 0 + MENU INCLUDE pxelinux.cfg/PXE.conf + NOESCAPE 1 + LABEL Try Ubuntu 14.04 Desktop + MENU LABEL Try Ubuntu 14.04 Desktop + kernel Ubuntu/vmlinuz + append boot=casper netboot=nfs nfsroot=192.168.1.20:/var/lib/tftpboot/Ubuntu/14.04/amd64 + initrd=Ubuntu/initrd.lz quiet splash + ENDTEXT + LABEL Install Ubuntu 14.04 Desktop + MENU LABEL Install Ubuntu 14.04 Desktop + kernel Ubuntu/vmlinuz + append boot=casper automatic-ubiquity netboot=nfs nfsroot=192.168.1.20:/var/lib/tftpboot/Ubuntu/14.04/amd64 + initrd=Ubuntu/initrd.lz quiet splash + ENDTEXT + +Save and exit the file. + +Edit the “/var/lib/tftpboot/pxelinux.cfg/pxe.conf” file. + + sudo nano /var/lib/tftpboot/pxelinux.cfg/pxe.conf + +Add/edit as described below: + + MENU TITLE PXE Server + NOESCAPE 1 + ALLOWOPTIONS 1 + PROMPT 0 + MENU WIDTH 80 + MENU ROWS 14 + MENU TABMSGROW 24 + MENU MARGIN 10 + MENU COLOR border 30;44 #ffffffff #00000000 std + +Save and exit the file. + +### Add Ubuntu 14.04 Desktop Boot Images to PXE Server ### + +For this, Ubuntu kernel and initrd files are required. To get those files, you need the Ubuntu 14.04 Desktop ISO Image. You can download the Ubuntu 14.04 ISO image in the /mnt folder by issuing the following command: + + sudo cd /mnt + sudo wget http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso + +**Note**: the download URL might change as the ISO image is updated. Check out this website for the latest download link if the above URL is not working. + +Mount the ISO file, and copy all the files to the TFTP folder by issuing the following commands: + + sudo mount -o loop /mnt/ubuntu-14.04.3-desktop-amd64.iso /media/ + sudo cp -r /media/* /var/lib/tftpboot/Ubuntu/14.04/amd64/ + sudo cp -r /media/.disk /var/lib/tftpboot/Ubuntu/14.04/amd64/ + sudo cp /media/casper/initrd.lz /media/casper/vmlinuz /var/lib/tftpboot/Ubuntu/ + +### Configure NFS Server to Export ISO Contents ### + +Now you need to setup Installation Source Mirrors via NFS protocol. You can also use http and ftp for Installation Source Mirrors. Here I have used NFS to export ISO contents. + +To configure the NFS server, you need to edit the “/etc/exports” file. + + sudo nano /etc/exports + +Add/edit as described below: + + /var/lib/tftpboot/Ubuntu/14.04/amd64 *(ro,async,no_root_squash,no_subtree_check) + +Save and exit the file. For the changes to take effect, export and start NFS service. + + sudo exportfs -a + sudo /etc/init.d/nfs-kernel-server start + +Now your PXE Server is ready. + +### Configure Network Boot PXE Client ### + +A PXE client can be any computer system with a PXE network boot enable option. Now your clients can boot and install Ubuntu 14.04 Desktop by enabling “Boot From Network” options from their systems BIOS. + +You’re now ready to go – start your PXE Client Machine with the network boot enable option, and you should now see a sub-menu showing for your Ubuntu 14.04 Desktop that we created. + +![pxe](https://www.maketecheasier.com/assets/uploads/2015/09/pxe.png) + +### Conclusion ### + +Configuring network boot installation using PXE server is efficient and a time-saving method. You can install hundreds of client at a time in your local network. All you need is a PXE server and PXE enabled clients. Try it out, and let us know if this works for you. + +Reference: +- [PXE Server wiki][1] +- [PXE Server Ubuntu][2] + +Image credit: [fupsol_unl_20][3] + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/configure-pxe-server-ubuntu/ + +作者:[Hitesh Jethva][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/hiteshjethva/ +[1]:https://en.wikipedia.org/wiki/Preboot_Execution_Environment +[2]:https://help.ubuntu.com/community/PXEInstallServer +[3]:https://www.flickr.com/photos/jhcalderon/3681926417/ \ No newline at end of file diff --git a/sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md b/sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md new file mode 100644 index 0000000000..c3f9dc366d --- /dev/null +++ b/sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md @@ -0,0 +1,89 @@ +How to Setup IonCube Loaders on Ubuntu 14.04 / 15.04 +================================================================================ +IonCube Loaders is an encryption/decryption utility for PHP applications which assists in speeding up the pages that are served. It also protects your website's PHP code from being viewed and ran on unlicensed computers. Using ionCube encoded and secured PHP files requires a file called ionCube Loader to be installed on the web server and made available to PHP which is often required for a lot of PHP based applications. It handles the reading and execution of encoded files at run time. PHP can use the loader with one line added to a PHP configuration file that ‘php.ini’. + +### Prerequisites ### + +In this article we will setup the installation of Ioncube Loader on Ubuntu 14.04/15.04, so that it can be used in all PHP Modes. The only requirement for this tutorial is to have "php.ini" file exists in your system with LEMP stack installed on the server. + +### Download IonCube Loader ### + +Login to your ubuntu server to download the latest IonCube loader package according to your operating system architecture whether your are using a 32 Bit or 64 Bit OS. You can get its package by issuing the following command with super user privileges or root user. + + # wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + +![download ioncube](http://blog.linoxide.com/wp-content/uploads/2015/09/download1.png) + +After Downloading unpack the archive into the "/usr/local/src/" folder by issuing the following command. + + # tar -zxvf ioncube_loaders_lin_x86-64.tar.gz -C /usr/local/src/ + +![extracting archive](http://blog.linoxide.com/wp-content/uploads/2015/09/2-extract.png) + +After extracting the archive, we can see the list of all modules present in it. But we needs only the relevant with the version of PHP installed on our system. + +To check your PHP version, you can run the below command to find the relevant modules. + + # php -v + +![ioncube modules](http://blog.linoxide.com/wp-content/uploads/2015/09/modules.png) + +With reference to the output of above command we came to know that the PHP version installed on the system is 5.6.4, so we need to copy the appropriate module to the PHP modules folder. + +To do so we will create a new folder with name "ioncube" within the "/usr/local/" directory and copy the required ioncube loader modules into it. + + root@ubuntu-15:/usr/local/src/ioncube# mkdir /usr/local/ioncube + root@ubuntu-15:/usr/local/src/ioncube# cp ioncube_loader_lin_5.6.so ioncube_loader_lin_5.6_ts.so /usr/local/ioncube/ + +### PHP Configuration ### + +Now we need to put the following line into the configuration file of PHP file "php.ini" which is located in "/etc/php5/cli/" folder then restart your web server’s services and php module. + + # vim /etc/php5/cli/php.ini + +![ioncube zend extension](http://blog.linoxide.com/wp-content/uploads/2015/09/zend-extension.png) + +In our scenario we have Nginx web server installed, so we will run the following commands to start its services. + + # service php5-fpm restart + # service nginx restart + +![web services](http://blog.linoxide.com/wp-content/uploads/2015/09/web-services.png) + +### Testing IonCube Loader ### + +To test the ioncube loader in the PHP configuration for your website, create a test file called "info.php" with the following content and place it into the web directory of your web server. + + # vim /usr/share/nginx/html/info.php + +Then save the changes after placing phpinfo script and access "info.php" in your browser with your domain name or server’s IP address after reloading the web server services. + +You will be able to see the below section at the bottom of your php modules information. + +![php info](http://blog.linoxide.com/wp-content/uploads/2015/09/php-info.png) + +From the terminal issue the following command to verify the php version that shows the ionCube PHP Loader is Enabled. + + # php -v + +![php ioncube loader](http://blog.linoxide.com/wp-content/uploads/2015/09/php-ioncube.png) + +The output shown in the PHP version's command clearly indicated that IonCube loader has been successfully integrated with PHP. + +### Conclusion ### + +At the end of this tutorial you learnt about the installation and configuration of ionCube Loader on Ubuntu with Nginx web server there will be no such difference if you are using any other web server. So, installing Loaders is simple when its done correctly, and on most servers its installation will work without a problem. However there is no such thing as a "standard PHP installation", and servers can be setup in many different ways, and with different features enabled or disabled. + +If you are on a shared server, then make sure that you have run the ioncube-loader-helper.php script, and click the link to test run time installation. If you still face as such issue while doing your setup, feel free to contact us and leave us a comment. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-ioncube-loaders-ubuntu-14-04-15-04/ + +作者:[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/20150921 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/sources/tech/20150921 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md new file mode 100644 index 0000000000..897550432b --- /dev/null +++ b/sources/tech/20150921 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md @@ -0,0 +1,102 @@ +How to Setup Node JS v4.0.0 on Ubuntu 14.04 / 15.04 +================================================================================ +Hi everyone, Node.JS Version 4.0.0 has been out, the popular server-side JavaScript platform has combines the Node.js and io.js code bases. This release represents the combined efforts encapsulated in both the Node.js project and the io.js project that are now combined in a single codebase. The most important change is this Node.js is ships with version 4.5 of Google's V8 JavaScript engine, which is the same version that ships with the current Chrome browser. So, being able to more closely track V8’s releases means Node.js runs JavaScript faster, more securely, and with the ability to use many desirable ES6 language features. + +![Node JS](http://blog.linoxide.com/wp-content/uploads/2015/09/nodejs.png) + +Node.js 4.0.0 aims to provide an easy update path for current users of io.js and node as there are no major API changes. Let’s see how you can easily get it installed and setup on Ubuntu server by following this simple article. + +### Basic System Setup ### + +Node works perfectly on Linux, Macintosh, and Solaris operating systems and among the Linux operating systems it has the best results using Ubuntu OS. That's why we are to setup it Ubuntu 15.04 while the same steps can be followed using Ubuntu 14.04. + +**1) System Resources** + +The basic system resources for Node depend upon the size of your infrastructure requirements. So, here in this tutorial we will setup Node with 1 GB RAM, 1 GHz Processor and 10 GB of available disk space with minimal installation packages installed on the server that is no web or database server packages are installed. + +**2) System Update** + +It always been recommended to keep your system upto date with latest patches and updates, so before we move to the installation on Node, let's login to your server with super user privileges and run update command. + + # apt-get update + +**3) Installing Dependencies** + +Node JS only requires some basic system and software utilities to be present on your server, for its successful installation like 'make' 'gcc' and 'wget'. Let's run the below command to get them installed if they are not already present. + + # apt-get install python gcc make g++ wget + +### Download Latest Node JS v4.0.0 ### + +Let's download the latest Node JS version 4.0.0 by following this link of [Node JS Download Page][1]. + +![](http://blog.linoxide.com/wp-content/uploads/2015/09/download.png) + +We will copy the link location of its latest package and download it using 'wget' command as shown. + + # wget https://nodejs.org/download/rc/v4.0.0-rc.1/node-v4.0.0-rc.1.tar.gz + +Once download completes, unpack using 'tar' command as shown. + + # tar -zxvf node-v4.0.0-rc.1.tar.gz + +![](http://blog.linoxide.com/wp-content/uploads/2015/09/wget.png) + +### Installing Node JS v4.0.0 ### + +Now we have to start the installation of Node JS from its downloaded source code. So, change your directory and configure the source code by running its configuration script before compiling it on your ubuntu server. + + root@ubuntu-15:~/node-v4.0.0-rc.1# ./configure + +![](http://blog.linoxide.com/wp-content/uploads/2015/09/configure.png) + +Now run the 'make install' command to compile the Node JS installation package as shown. + + root@ubuntu-15:~/node-v4.0.0-rc.1# make install + +The make command will take a couple of minutes while compiling its binaries so after executinf above command, wait for a while and keep calm. + +### Testing Node JS Installation ### + +Once the compilation process is complete, we will test it if every thing went fine. Let's run the following command to confirm the installed version of Node JS. + + root@ubuntu-15:~# node -v + v4.0.0-pre + +By executing 'node' without any arguments from the command-line you will be dropped into the REPL (Read-Eval-Print-Loop) that has simplistic emacs line-editing where you can interactively run JavaScript and see the results. + +![](http://blog.linoxide.com/wp-content/uploads/2015/09/node.png) + +### Writing Test Program ### + +We can also try out a very simple console program to test the successful installation and proper working of Node JS. To do so we will create a file named "test.js" and write the following code into it and save the changes made in the file as shown. + + root@ubuntu-15:~# vim test.js + var util = require("util"); + console.log("Hello! This is a Node Test Program"); + :wq! + +Now in order to run the above program, from the command prompt run the below command. + + root@ubuntu-15:~# node test.js + +![](http://blog.linoxide.com/wp-content/uploads/2015/09/node-test.png) + +So, upon successful installation we will get the output as shown in the screen, where as in the above program it loads the "util" class into a variable "util" and then uses the "util" object to perform the console tasks. While the console.log is a command similar to the cout in C++. + +### Conclusion ### + +That’s it. Hope this gives you a good idea of Node.js going with Node.js on Ubuntu. If you are new to developing applications with Node.js. After all we can say that we can expect significant performance gains with Node JS Version 4.0.0. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-node-js-4-0-ubuntu-14-04-15-04/ + +作者:[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/ +[1]:https://nodejs.org/download/rc/v4.0.0-rc.1/ \ No newline at end of file From 066e66a5c2e80b3a36ef22df4f92f8792ad60499 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 21 Sep 2015 15:48:28 +0800 Subject: [PATCH 2131/2517] =?UTF-8?q?20150921-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ps for teaching open source development.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/talk/20150921 14 tips for teaching open source development.md diff --git a/sources/talk/20150921 14 tips for teaching open source development.md b/sources/talk/20150921 14 tips for teaching open source development.md new file mode 100644 index 0000000000..b2812d44c8 --- /dev/null +++ b/sources/talk/20150921 14 tips for teaching open source development.md @@ -0,0 +1,72 @@ +14 tips for teaching open source development +================================================================================ +Academia is an excellent platform for training and preparing the open source developers of tomorrow. In research, we occasionally open source software we write. We do this for two reasons. One, to promote the use of the tools we produce. And two, to learn more about the impact and issues other people face when using them. With this background of writing research software, I was tasked with redesigning the undergraduate software engineering course for second-year students at the University of Bradford. + +It was a challenge, as I was faced with 80 students coming for different degrees, including IT, business computing, and software engineering, all in the same course. The hardest part was working with students with a wide range of programming experience levels. Traditionally, the course had involved allowing students to choose their own teams, tasking them with building a garage database system and then submitting a report in the end as part of the assessment. + +I decided to redesign the course to give students insight into the process of working on real-world software teams. I divided the students into teams of five or six, based on their degrees and programming skills. The aim was to have an equal distribution of skills across the teams to prevent any unfair advantage of one team over another. + +### The core lessons ### + +The course format was updated to have both lectures and lab sessions. However, the lab session functioned as mentoring sessions, where instructors visited each team to ask for updates and see how the teams were progressing with the clients and the products. There were traditional lectures on project management, software testing, requirements engineering, and similar topics, supplemented by lab sessions and mentor meetings. These meetings allowed us to check up on students' progress and monitor whether they were following the software engineering methodologies taught in the lecture portion. Topics we taught this year included: + +- Requirements engineering +- How to interact with clients and other team members +- Software methodologies, such as agile and extreme programming approaches +- How to use different software engineering approaches and work through sprints +- Team meetings and documentations +- Project management and Gantt charts +- UML diagrams and system descriptions +- Code revisioning using Git +- Software testing and bug tracking +- Using open source libraries for their tools +- Open source licenses and which one to use +- Software delivery + +Along with these lectures, we had a few guest speakers from the corporate world talk about their practices in software product deliveries. We also managed to get the university’s intellectual property lawyer to come and talk about IP issues surrounding software in the UK, and how to handle any intellectual properties issues in software. + +### Collaboration tools ### + +To make all of the above possible, a number of tools were introduced. Students were trained on how to use them for their projects. These included: + +- Google Drive folders shared within the team and the tutor, to maintain documents and spreadsheets for project descriptions, requirements gathering, meeting minutes, and time tracking of the project. This was an extremely efficient way to monitor and also provide feedback straight into the folders for each team. +- [Basecamp][1] for document sharing as well, and later in the course we considered this as a possible replacement for Google Drive. +- Bug reporting tools such as [Mantis][2] again have a limited users for free reporting. Later Git itself was being used for bug reports n any tools by the testers in the teams +- Remote videoconferencing tools were used as a number of clients were off-campus, and sometimes not even in the same city. The students were regularly using Skype to communicate with them, documenting their meetings and sometimes even recording them for later use. +- A number of open source tool kits were also used for students' projects. The students were allowed to choose their own tool kits and languages based on the requirements of the projects. The only condition was that these have to be open source and could be installed in the university labs, which the technical staff was extremely supportive of. +- In the end all teams had to deliver their projects to the client, including complete working version of the software, documentation, and open source licenses of their own choosing. Most of the teams chose the GPL version 3 license. + +### Tips and lessons learned ### + +In the end, it was a fun year and nearly all students did very well. Here are some of the lessons I learned which may help improve the course next year: + +1. Give the students a wide variety of choice in projects that are interesting, such as game development or mobile application development, and projects with goals. Working with mundane database systems is not going to keep most students interested. Working with interesting projects, most students became self-learners, and were also helping others in their teams and outside to solve some common issues. The course also had a message list, where students were posting any issues they were encountering, in hopes of receiving advice from others. However, there was a drawback to this approach. The external examiners have advised us to go back to a style of one type of project, and one type of language to help narrow the assessment criteria for the students. +1. Give students regular feedback on their performance at every stage. This could be done during the mentoring meetings with the teams, or at other stages, to help them improve the work for next time. +1. Students are more than willing to work with clients from outside university! They look forward to working with external company representatives or people outside the university, just because of the new experience. They were all able to display professional behavior when interacting with their mentors, which put the instructors at ease. +1. A lot of teams left developing unit testing until the end of the project, which from an extreme programming methodology standpoint was a serious no-no. Maybe testing should be included at the assessments of the various stages to help remind students that they need to be developing unit tests in parallel with the software. +1. In the class of 80, there were only four girls, each working in different teams. I observed that boys were very ready to take on roles as team leads, assigning the most interesting code pieces to themselves and the girls were mostly following instructions or doing documentation. For some reason, the girls choose not to show authority or preferred not to code even when they were encouraged by a female instructor. This is still a major issue that needs to be addressed. +1. There are different styles of documentation such as using UML, state diagrams, and others. Allow students to learn them all and merge with other courses during the year to improve their learning experience. +1. Some students were very good developers, but some doing business computing had very little coding experience. The teams were encouraged to work together to prevent the idea that developer would get better marks than other team members if they were only doing meeting minutes or documentations. Roles were also encouraged to be rotated during mentoring sessions to see that everyone was getting a chance to learn how to program. +1. Allowing the team to meet with the mentor every week was helpful in monitoring team activities. It also showed who was doing the most work. Usually students who were not participating in their groups would not come to meetings, and could be identified by the work being presented by other members every week. +1. We encouraged students to attach licenses to their work and identify intellectual property issues when working with external libraries and clients. This allowed students to think out of the box and learn about real-world software delivery problems. +1. Give students room to choose their own technologies. +1. Having teaching assistants is key. Managing 80 students was very difficult, especially on the weeks when they were being assessed. Next year I would definitely have teaching assistants helping me with the teams. +1. A supportive tech support for the lab is very important. The university tech support was extremely supportive of the course. Next year, they are talking about having virtual machines assigned to teams, so the teams can install any software on their own virtual machine as needed. +1. Teamwork helps. Most teams exhibited a supportive nature to other team members, and mentoring also helped. +1. Additional support from other staff members is a plus. As a new academic, I needed to learn from experience and also seek advice at multiple points on how to handle certain students and teams if I was confused on how to engage them with the course. Support from senior staff members was very encouraging to me. + +In the end, it was a fun course—not only for the me as an instructor, but for the students as well. There were some issues with learning objectives and traditional grading schemes that still need to be ironed out to reduce the workload it produced on the instructors. For next year, I plan to keep this same format, but hope to come up with a better grading scheme and introduce more software tools that can help monitor project activities and code revisions. + +-------------------------------------------------------------------------------- + +via: http://opensource.com/education/15/9/teaching-open-source-development-undergraduates + +作者:[Mariam Kiran][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://opensource.com/users/mariamkiran +[1]:https://basecamp.com/ +[2]:https://www.mantisbt.org/ \ No newline at end of file From 103420797f34fea2931a376fb921ec5d03daaa9f Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Mon, 21 Sep 2015 19:32:41 +0800 Subject: [PATCH 2132/2517] [Translated]RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md --- ...ntrol Essentials with SELinux in RHEL 7.md | 178 ------------------ ...ntrol Essentials with SELinux in RHEL 7.md | 177 +++++++++++++++++ 2 files changed, 177 insertions(+), 178 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md deleted file mode 100644 index 8d014dcc2e..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md +++ /dev/null @@ -1,178 +0,0 @@ -FSSlc translating - -RHCSA Series: Mandatory Access Control Essentials with SELinux in RHEL 7 – Part 13 -================================================================================ -During this series we have explored in detail at least two access control methods: standard ugo/rwx permissions ([Manage Users and Groups – Part 3][1]) and access control lists ([Configure ACL’s on File Systems – Part 7][2]). - -![RHCSA Exam: SELinux Essentials and Control FileSystem Access](http://www.tecmint.com/wp-content/uploads/2015/06/SELinux-Control-File-System-Access.png) - -RHCSA Exam: SELinux Essentials and Control FileSystem Access - -Although necessary as first level permissions and access control mechanisms, they have some limitations that are addressed by Security Enhanced Linux (aka SELinux for short). - -One of such limitations is that a user can expose a file or directory to a security breach through a poorly elaborated chmod command and thus cause an unexpected propagation of access rights. As a result, any process started by that user can do as it pleases with the files owned by the user, where finally a malicious or otherwise compromised software can achieve root-level access to the entire system. - -With those limitations in mind, the United States National Security Agency (NSA) first devised SELinux, a flexible mandatory access control method, to restrict the ability of processes to access or perform other operations on system objects (such as files, directories, network ports, etc) to the least permission model, which can be modified later as needed. In few words, each element of the system is given only the access required to function. - -In RHEL 7, SELinux is incorporated into the kernel itself and is enabled in Enforcing mode by default. In this article we will explain briefly the basic concepts associated with SELinux and its operation. - -### SELinux Modes ### - -SELinux can operate in three different ways: - -- Enforcing: SELinux denies access based on SELinux policy rules, a set of guidelines that control the security engine. -- Permissive: SELinux does not deny access, but denials are logged for actions that would have been denied if running in enforcing mode. -- Disabled (self-explanatory). - -The `getenforce` command displays the current mode of SELinux, whereas `setenforce` (followed by a 1 or a 0) is used to change the mode to Enforcing or Permissive, respectively, during the current session only. - -In order to achieve persistence across logouts and reboots, you will need to edit the `/etc/selinux/config` file and set the SELINUX variable to either enforcing, permissive, or disabled: - - # getenforce - # setenforce 0 - # getenforce - # setenforce 1 - # getenforce - # cat /etc/selinux/config - -![Set SELinux Mode](http://www.tecmint.com/wp-content/uploads/2015/05/Set-SELinux-Mode.png) - -Set SELinux Mode - -Typically you will use setenforce to toggle between SELinux modes (enforcing to permissive and back) as a first troubleshooting step. If SELinux is currently set to enforcing while you’re experiencing a certain problem, and the same goes away when you set it to permissive, you can be confident you’re looking at a SELinux permissions issue. - -### SELinux Contexts ### - -A SELinux context consists of an access control environment where decisions are made based on SELinux user, role, and type (and optionally a level): - -- A SELinux user complements a regular Linux user account by mapping it to a SELinux user account, which in turn is used in the SELinux context for processes in that session, in order to explicitly define their allowed roles and levels. -- The concept of role acts as an intermediary between domains and SELinux users in that it defines which process domains and file types can be accessed. This will shield your system against vulnerability to privilege escalation attacks. -- A type defines an SELinux file type or an SELinux process domain. Under normal circumstances, processes are prevented from accessing files that other processes use, and and from accessing other processes, thus access is only allowed if a specific SELinux policy rule exists that allows it. - -Let’s see how all of that works through the following examples. - -**EXAMPLE 1: Changing the default port for the sshd daemon** - -In [Securing SSH – Part 8][3] we explained that changing the default port where sshd listens on is one of the first security measures to secure your server against external attacks. Let’s edit the `/etc/ssh/sshd_config` file and set the port to 9999: - - Port 9999 - -Save the changes, and restart sshd: - - # systemctl restart sshd - # systemctl status sshd - -![Change SSH Port](http://www.tecmint.com/wp-content/uploads/2015/05/Change-SSH-Port.png) - -Restart SSH Service - -As you can see, sshd has failed to start. But what happened? - -A quick inspection of `/var/log/audit/audit.log` indicates that sshd has been denied permissions to start on port 9999 (SELinux log messages include the word “AVC” so that they might be easily identified from other messages) because that is a reserved port for the JBoss Management service: - - # cat /var/log/audit/audit.log | grep AVC | tail -1 - -![Inspect SSH Logs](http://www.tecmint.com/wp-content/uploads/2015/05/Inspect-SSH-Logs.png) - -Inspect SSH Logs - -At this point you could disable SELinux (but don’t!) as explained earlier and try to start sshd again, and it should work. However, the semanage utility can tell us what we need to change in order for us to be able to start sshd in whatever port we choose without issues. - -Run, - - # semanage port -l | grep ssh - -to get a list of the ports where SELinux allows sshd to listen on. - -![Semanage Tool](http://www.tecmint.com/wp-content/uploads/2015/05/SELinux-Permission.png) - -Semanage Tool - -So let’s change the port in /etc/ssh/sshd_config to Port 9998, add the port to the ssh_port_t context, and then restart the service: - - # semanage port -a -t ssh_port_t -p tcp 9998 - # systemctl restart sshd - # systemctl is-active sshd - -![Semanage Add Port](http://www.tecmint.com/wp-content/uploads/2015/05/Semenage-Add-Port.png) - -Semanage Add Port - -As you can see, the service was started successfully this time. This example illustrates the fact that SELinux controls the TCP port number to its own port type internal definitions. - -**EXAMPLE 2: Allowing httpd to send access sendmail** - -This is an example of SELinux managing a process accessing another process. If you were to implement mod_security and mod_evasive along with Apache in your RHEL 7 server, you need to allow httpd to access sendmail in order to send a mail notification in the wake of a (D)DoS attack. In the following command, omit the -P flag if you do not want the change to be persistent across reboots. - - # semanage boolean -1 | grep httpd_can_sendmail - # setsebool -P httpd_can_sendmail 1 - # semanage boolean -1 | grep httpd_can_sendmail - -![Allow Apache to Send Mails](http://www.tecmint.com/wp-content/uploads/2015/05/Allow-Apache-to-Send-Mails.png) - -Allow Apache to Send Mails - -As you can tell from the above example, SELinux boolean settings (or just booleans) are true / false rules embedded into SELinux policies. You can list all the booleans with `semanage boolean -l`, and alternatively pipe it to grep in order to filter the output. - -**EXAMPLE 3: Serving a static site from a directory other than the default one** - -Suppose you are serving a static website using a different directory than the default one (`/var/www/html`), say /websites (this could be the case if you’re storing your web files in a shared network drive, for example, and need to mount it at /websites). - -a). Create an index.html file inside /websites with the following contents: - - -

SELinux test

- - -If you do, - - # ls -lZ /websites/index.html - -you will see that the index.html file has been labeled with the default_t SELinux type, which Apache can’t access: - -![Check SELinux File Permission](http://www.tecmint.com/wp-content/uploads/2015/05/Check-File-Permssion.png) - -Check SELinux File Permission - -b). Change the DocumentRoot directive in `/etc/httpd/conf/httpd.conf` to /websites and don’t forget to update the corresponding Directory block. Then, restart Apache. - -c). Browse to `http://`, and you should get a 503 Forbidden HTTP response. - -d). Next, change the label of /websites, recursively, to the httpd_sys_content_t type in order to grant Apache read-only access to that directory and its contents: - - # semanage fcontext -a -t httpd_sys_content_t "/websites(/.*)?" - -e). Finally, apply the SELinux policy created in d): - - # restorecon -R -v /websites - -Now restart Apache and browse to `http://` again and you will see the html file displayed correctly: - -![Verify Apache Page](http://www.tecmint.com/wp-content/uploads/2015/05/08part13.png) - -Verify Apache Page - -### Summary ### - -In this article we have gone through the basics of SELinux. Note that due to the vastness of the subject, a full detailed explanation is not possible in a single article, but we believe that the principles outlined in this guide will help you to move on to more advanced topics should you wish to do so. - -If I may, let me recommend two essential resources to start with: the [NSA SELinux page][4] and the [RHEL 7 SELinux User’s and Administrator’s][5] guide. - -Don’t hesitate to let us know if you have any questions or comments. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ - -作者:[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/rhcsa-exam-manage-users-and-groups -[2]:http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/ -[3]:http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network-services-in-rhel-7/ -[4]:https://www.nsa.gov/research/selinux/index.shtml -[5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/SELinux_Users_and_Administrators_Guide/part_I-SELinux.html diff --git a/translated/tech/RHCSA/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md b/translated/tech/RHCSA/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md new file mode 100644 index 0000000000..4afbc105b7 --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md @@ -0,0 +1,177 @@ +RHCSA 系列: 在 RHEL 7 中使用 SELinux 进行强制访问控制 – Part 13 +================================================================================ +在本系列的前面几篇文章中,我们已经详细地探索了至少两种访问控制方法:标准的 ugo/rwx 权限([管理用户和组 – Part 3][1]) 和访问控制列表([在文件系统中配置 ACL – Part 7][2])。 + +![RHCSA 认证:SELinux 精要和控制文件系统的访问](http://www.tecmint.com/wp-content/uploads/2015/06/SELinux-Control-File-System-Access.png) + +RHCSA 认证:SELinux 精要和控制文件系统的访问 + +尽管作为第一级别的权限和访问控制机制是必要的,但它们同样有一些局限,而这些局限则可以由安全增强 Linux(Security Enhanced Linux,简称为 SELinux) 来处理。 + +这些局限的一种情形是:某个用户可能通过一个未加详细阐述的 chmod 命令将一个文件或目录暴露在安全漏洞面前(注:这句我的翻译有点问题),从而引起访问权限的意外传播。结果,由该用户开启的任意进程可以对属于该用户的文件进行任意的操作,最终一个恶意的或受损的软件对整个系统可能会实现 root 级别的访问权限。 + +考虑到这些局限性,美国国家安全局(NSA) 率先设计出了 SELinux,一种强制的访问控制方法,它根据最小权限模型去限制进程在系统对象(如文件,目录,网络接口等)上的访问或执行其他的操作的能力,而这些限制可以在后面根据需要进行修改。简单来说,系统的每一个元素只给某个功能所需要的那些权限。 + +在 RHEL 7 中,SELinux 被并入了内核中,且默认情况下以强制模式开启。在这篇文章中,我们将简要地介绍有关 SELinux 及其相关操作的基本概念。 + +### SELinux 的模式 ### + +SELinux 可以以三种不同的模式运行: + +- 强制模式:SELinux 根据 SELinux 策略规则拒绝访问,这些规则是用以控制安全引擎的一系列准则; +- 宽容模式:SELinux 不拒绝访问,但对于那些运行在强制模式下会被拒绝访问的行为,它会进行记录; +- 关闭 (不言自明,即 SELinux 没有实际运行). + +使用 `getenforce` 命令可以展示 SELinux 当前所处的模式,而 `setenforce` 命令(后面跟上一个 1 或 0) 则被用来将当前模式切换到强制模式或宽容模式,但只对当前的会话有效。 + +为了使得在登出和重启后上面的设置还能保持作用,你需要编辑 `/etc/selinux/config` 文件并将 SELINUX 变量的值设为 enforcing,permissive,disabled 中之一: + + # getenforce + # setenforce 0 + # getenforce + # setenforce 1 + # getenforce + # cat /etc/selinux/config + +![设置 SELinux 模式](http://www.tecmint.com/wp-content/uploads/2015/05/Set-SELinux-Mode.png) + +设置 SELinux 模式 + +通常情况下,你将使用 `setenforce` 来在 SELinux 模式间进行切换(从强制模式到宽容模式,或反之),以此来作为你排错的第一步。假如 SELinux 当前被设置为强制模式,而你遇到了某些问题,但当你把 SELinux 切换为宽容模式后问题不再出现了,则你可以确信你遇到了一个 SELinux 权限方面的问题。 + +### SELinux 上下文 ### + +一个 SELinux 上下文由一个权限控制环境所组成,在这个环境中,决定的做出将基于 SELinux 的用户,角色和类型(和可选的级别): + +- 一个 SELinux 用户是通过将一个常规的 Linux 用户账户映射到一个 SELinux 用户账户来实现的,反过来,在一个会话中,这个 SELinux 用户账户在 SELinux 上下文中被进程所使用,为的是能够显示地定义它们所允许的角色和级别。 +- 角色的概念是作为域和处于该域中的 SELinux 用户之间的媒介,它定义了 SELinux 可以访问到哪个进程域和哪些文件类型。这将保护您的系统免受提权漏洞的攻击。 +- 类型则定义了一个 SELinux 文件类型或一个 SELinux 进程域。在正常情况下,进程将会被禁止访问其他进程正使用的文件,并禁止对其他进程进行访问。这样只有当一个特定的 SELinux 策略规则允许它访问时,才能够进行访问。 + +下面就让我们看看这些概念是如何在下面的例子中起作用的。 + +**例 1:改变 sshd 守护进程的默认端口** + +在[加固 SSH – Part 8][3] 中,我们解释了更改 sshd 所监听的默认端口是加固你的服务器免收外部攻击的首个安全措施。下面,就让我们编辑 `/etc/ssh/sshd_config` 文件并将端口设置为 9999: + + Port 9999 + +保存更改并重启 sshd: + + # systemctl restart sshd + # systemctl status sshd + +![更改 SSH 的端口](http://www.tecmint.com/wp-content/uploads/2015/05/Change-SSH-Port.png) + +重启 SSH 服务 + +正如你看到的那样, sshd 启动失败,但为什么会这样呢? + +快速检查 `/var/log/audit/audit.log` 文件会发现 sshd 已经被拒绝在端口 9999 上开启(SELinux 日志信息包含单词 "AVC",所以这类信息可以被轻易地与其他信息相区分),因为这个端口是 JBoss 管理服务的保留端口: + + # cat /var/log/audit/audit.log | grep AVC | tail -1 + +![查看 SSH 日志](http://www.tecmint.com/wp-content/uploads/2015/05/Inspect-SSH-Logs.png) + +查看 SSH 日志 + +在这种情况下,你可以像先前解释的那样禁用 SELinux(但请不要这样做!),并尝试重启 sshd,且这种方法能够起效。但是, `semanage` 应用可以告诉我们在哪些端口上可以开启 sshd 而不会出现任何问题。 + +运行: + + # semanage port -l | grep ssh + +便可以得到一个 SELinux 允许 sshd 在哪些端口上监听的列表: + +![Semanage 工具](http://www.tecmint.com/wp-content/uploads/2015/05/SELinux-Permission.png) + +Semanage 工具 + +所以让我们在 `/etc/ssh/sshd_config` 中将端口更改为 9998 端口,增加这个端口到 ssh_port_t 的上下文,然后重启 sshd 服务: + + # semanage port -a -t ssh_port_t -p tcp 9998 + # systemctl restart sshd + # systemctl is-active sshd + +![Semanage 添加端口](http://www.tecmint.com/wp-content/uploads/2015/05/Semenage-Add-Port.png) + +Semanage 添加端口 + +如你所见,这次 sshd 服务被成功地开启了。这个例子告诉我们这个事实:SELinux 控制 TCP 端口数为它自己端口类型中间定义。 + +**例 2:允许 httpd 访问 sendmail** + +这是一个 SELinux 管理一个进程来访问另一个进程的例子。假如在你的 RHEL 7 服务器上,你要实现 Apache 的 mod_security 和 mod_evasive(注:这里少添加了一个链接,链接的地址是 http://www.tecmint.com/protect-apache-using-mod_security-and-mod_evasive-on-rhel-centos-fedora/),你需要允许 httpd 访问 sendmail,以便在遭受到 (D)DoS 攻击时能够用邮件来提醒你。在下面的命令中,如果你不想使得更改在重启后任然生效,请去掉 `-P` 选项。 + + # semanage boolean -1 | grep httpd_can_sendmail + # setsebool -P httpd_can_sendmail 1 + # semanage boolean -1 | grep httpd_can_sendmail + +![允许 Apache 发送邮件](http://www.tecmint.com/wp-content/uploads/2015/05/Allow-Apache-to-Send-Mails.png) + +允许 Apache 发送邮件 + +从上面的例子中,你可以知道 SELinux 布尔设定(或者只是布尔值)分别对应于 true 或 false,被嵌入到了 SELinux 策略中。你可以使用 `semanage boolean -l` 来列出所有的布尔值,也可以管道至 grep 命令以便筛选输出的结果。 + +**例 3:在一个特定目录而非默认目录下服务一个静态站点** + +假设你正使用一个不同于默认目录(`/var/www/html`)的目录来服务一个静态站点,例如 `/websites` 目录(这种情形会出现在当你把你的网络文件存储在一个共享网络设备上,并需要将它挂载在 /websites 目录时)。 + +a). 在 /websites 下创建一个 index.html 文件并包含如下的内容: + + +

SELinux test

+ + +假如你执行 + + # ls -lZ /websites/index.html + +你将会看到这个 index.html 已经被标记上了 default_t SELinux 类型,而 Apache 不能访问这类文件: + +![检查 SELinux 文件的权限](http://www.tecmint.com/wp-content/uploads/2015/05/Check-File-Permssion.png) + +检查 SELinux 文件的权限 + +b). 将 `/etc/httpd/conf/httpd.conf` 中的 DocumentRoot 改为 /websites,并不要忘了 +更新相应的 Directory 代码块。然后重启 Apache。 + +c). 浏览到 `http://`,则你应该会得到一个 503 Forbidden 的 HTTP 响应。 + +d). 接下来,递归地改变 /websites 的标志,将它的标志变为 httpd_sys_content_t 类型,以便赋予 Apache 对这些目录和其内容的只读访问权限: + + # semanage fcontext -a -t httpd_sys_content_t "/websites(/.*)?" + +e). 最后,应用在 d) 中创建的 SELinux 策略: + + # restorecon -R -v /websites + +现在重启 Apache 并再次浏览到 `http://`,则你可以看到被正确展现出来的 html 文件: + +![确认 Apache 页面](http://www.tecmint.com/wp-content/uploads/2015/05/08part13.png) + +确认 Apache 页面 + +### 总结 ### + +在本文中,我们详细地介绍了 SELinux 的基础知识。请注意,由于这个主题的广泛性,在单篇文章中做出一个完全详尽的解释是不可能的,但我们相信,在这个指南中列出的基本原则将会对你进一步了解更高级的话题有所帮助,假如你想了解的话。 + +假如可以,请让我推荐两个必要的资源来入门 SELinux:[NSA SELinux 页面][4] 和 [针对用户和系统管理员的 RHEL 7 SELinux 指南][5]。 + +假如你有任何的问题或评论,请不要犹豫,让我们知晓吧。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ + +作者:[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/rhcsa-exam-manage-users-and-groups +[2]:http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/ +[3]:http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network-services-in-rhel-7/ +[4]:https://www.nsa.gov/research/selinux/index.shtml +[5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/SELinux_Users_and_Administrators_Guide/part_I-SELinux.html From f58ad625a30cbdd8002c5eb71dd6f119f335c9ab Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 21 Sep 2015 19:58:04 +0800 Subject: [PATCH 2133/2517] Update 20150921 Configure PXE Server In Ubuntu 14.04.md --- sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md b/sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md index 0ac8dbc527..4265e59b4f 100644 --- a/sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md +++ b/sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Configure PXE Server In Ubuntu 14.04 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/09/pxe-featured.jpg) @@ -246,4 +247,4 @@ via: https://www.maketecheasier.com/configure-pxe-server-ubuntu/ [a]:https://www.maketecheasier.com/author/hiteshjethva/ [1]:https://en.wikipedia.org/wiki/Preboot_Execution_Environment [2]:https://help.ubuntu.com/community/PXEInstallServer -[3]:https://www.flickr.com/photos/jhcalderon/3681926417/ \ No newline at end of file +[3]:https://www.flickr.com/photos/jhcalderon/3681926417/ From 568f24fe5f89abd61b5cc2a7f43f38c0f8a7ecbd Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 21 Sep 2015 22:20:02 +0800 Subject: [PATCH 2134/2517] PUB:20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems @geekpi --- ...Connecting Remote Unix or Linux Systems.md | 110 +++++++++++++++++ ...Connecting Remote Unix or Linux Systems.md | 111 ------------------ 2 files changed, 110 insertions(+), 111 deletions(-) create mode 100644 published/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md delete mode 100644 translated/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md diff --git a/published/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md b/published/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md new file mode 100644 index 0000000000..2b5c37992d --- /dev/null +++ b/published/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md @@ -0,0 +1,110 @@ +mosh:一个基于 SSH 用于连接远程 Unix/Linux 系统的工具 +================================================================================ +Mosh 表示移动 Shell(Mobile Shell),是一个用于从客户端跨互联网连接远程服务器的命令行工具。它能用于 SSH 连接,但是比 Secure Shell 功能更多。它是一个类似于 SSH 而带有更多功能的应用。程序最初由 Keith Winstein 编写,用于类 Unix 的操作系统中,发布于GNU GPL v3协议下。 + +![Mosh Shell SSH Client](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-SSH-Client.png) + +*Mosh Shell SSH 客户端* + +#### Mosh的功能 #### + +- 它是一个支持漫游的远程终端程序。 +- 在所有主流的类 Unix 版本中可用,如 Linux、FreeBSD、Solaris、Mac OS X 和 Android。 +- 支持不稳定连接 +- 支持智能的本地回显 +- 支持用户输入的行编辑 +- 响应式设计及在 wifi、3G、长距离连接下的鲁棒性 +- 在 IP 改变后保持连接。它使用 UDP 代替 TCP(在 SSH 中使用),当连接被重置或者获得新的 IP 后 TCP 会超时,但是 UDP 仍然保持连接。 +- 在很长的时候之后恢复会话时仍然保持连接。 +- 没有网络延迟。立即显示用户输入和删除而没有延迟 +- 像 SSH 那样支持一些旧的方式登录。 +- 包丢失处理机制 + +### Linux 中 mosh 的安装 ### + +在 Debian、Ubuntu 和 Mint 类似的系统中,你可以很容易地用 [apt-get 包管理器][1]安装。 + + # apt-get update + # apt-get install mosh + +在基于 RHEL/CentOS/Fedora 的系统中,要使用 [yum 包管理器][3]安装 mosh,你需要打开第三方的 [EPEL][2]。 + + # yum update + # yum install mosh + +在 Fedora 22+的版本中,你需要使用 [dnf 包管理器][4]来安装 mosh。 + + # dnf install mosh + +### 我该如何使用 mosh? ### + +1、 让我们尝试使用 mosh 登录远程 Linux 服务器。 + + $ mosh root@192.168.0.150 + +![Mosh Shell Remote Connection](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-Remote-Connection.png) + +*mosh远程连接* + +**注意**:你有没有看到一个连接错误,因为我在 CentOS 7中还有打开这个端口。一个快速但是我并不建议的解决方法是: + + # systemctl stop firewalld [在远程服务器上] + +更好的方法是打开一个端口并更新防火墙规则。接着用 mosh 连接到预定义的端口中。至于更深入的细节,也许你会对下面的文章感兴趣。 + +- [如何配置 Firewalld][5] + +2、 让我们假设把默认的 22 端口改到 70,这时使用 -p 选项来使用自定义端口。 + + $ mosh -p 70 root@192.168.0.150 + +3、 检查 mosh 的版本 + + $ mosh --version + +![Check Mosh Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Mosh-Version.png) + +*检查mosh版本* + +4、 你可以输入`exit`来退出 mosh 会话。 + + $ exit + +5、 mosh 支持很多选项,你可以用下面的方法看到: + + $ mosh --help + +![Mosh Shell Options](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-Options.png) + +*Mosh 选项* + +#### mosh 的优缺点 #### + +- mosh 有额外的需求,比如需要允许 UDP 直接连接,这在 SSH 不需要。 +- 动态分配的端口范围是 60000-61000。第一个打开的端口是分配好的。每个连接都需要一个端口。 +- 默认的端口分配是一个严重的安全问题,尤其是在生产环境中。 +- 支持 IPv6 连接,但是不支持 IPv6 漫游。 +- 不支持回滚 +- 不支持 X11 转发 +- 不支持 ssh-agent 转发 + +### 总结 ### + +mosh是一款在大多数linux发行版的仓库中可以下载的一款小工具。虽然它有一些差异尤其是安全问题和额外的需求,它的功能,比如漫游后保持连接是一个加分点。我的建议是任何一个使用ssh的linux用户都应该试试这个程序,mosh值得一试。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-mosh-shell-ssh-client-in-linux/ + +作者:[Avishek Kumar][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management/ +[2]:https://linux.cn/article-2324-1.html +[3]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[4]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ +[5]:http://www.tecmint.com/configure-firewalld-in-centos-7/ diff --git a/translated/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md b/translated/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md deleted file mode 100644 index 093b4cbc21..0000000000 --- a/translated/share/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md +++ /dev/null @@ -1,111 +0,0 @@ -mosh - 一个基于SSH用于连接远程Unix/Linux系统的工具 -================================================================================ -Mosh表示移动Shell(Mobile Shell)是一个用于从客户端连接远程服务器的命令行工具。它可以像ssh那样使用并包含了更多的功能。它是一个类似ssh的程序,但是提供更多的功能。程序最初由Keith Winstein编写用于类Unix的操作系统中,发布于GNU GPL v3协议下。 - -![Mosh Shell SSH Client](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-SSH-Client.png) - -Mosh客户端 - -#### Mosh的功能 #### - -- 它是一个支持漫游的远程终端程序。 -- 在所有主流类Unix版本中可用如Linux、FreeBSD、Solaris、Mac OS X和Android。 -- 中断连接支持 -- 支持智能本地echo -- 用户按键行编辑支持 -- 响应式设计及在wifi、3G、长距离连接下的鲁棒性 -- 在IP改变后保持连接。它使用UDP代替TCP(在SSH中使用)当连接被重置或者获得新的IP后TCP会超时但是UDP仍然保持连接。 -- 在你很长之间之后恢复会话时仍然保持连接。 -- 没有网络延迟。立即显示用户输入和删除而没有延迟 -- 像SSH那样支持一些旧的方式登录。 -- 包丢失处理机制 - -### Linux中mosh的安装 ### - -在Debian、Ubuntu和Mint类似的系统中,你可以很容易地用[apt-get包管理器][1]安装。 - - # apt-get update - # apt-get install mosh - -在基于RHEL/CentOS/Fedora的系统中,要使用[yum 包管理器][3]安装mosh,你需要打开第三方的[EPEL][2]。 - - # yum update - # yum install mosh - -在Fedora 22+的版本中,你需要使用[dnf包管理器][4]来安装mosh。 - - # dnf install mosh - -### 我该如何使用mosh? ### - -1. 让我们尝试使用mosh登录远程Linux服务器。 - - $ mosh root@192.168.0.150 - -![Mosh Shell Remote Connection](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-Remote-Connection.png) - -mosh远程连接 - -**注意**:你有没有看到一个连接错误,因为我在CentOS 7中还有打开这个端口。一个快速但是我并不建议的解决方法是: - - # systemctl stop firewalld [on Remote Server] - -更好的方法是打开一个端口并更新防火墙规则。接着用mosh连接到预定义的端口中。至于更深入的细节,也许你会对下面的文章感兴趣。 - -- [如何配置Firewalld][5] - -2. 让我们假设把默认的22端口改到70,这时使用-p选项来使用自定义端口。 - - $ mosh -p 70 root@192.168.0.150 - -3. 检查mosh的版本 - - $ mosh --version - -![Check Mosh Version](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Mosh-Version.png) - -检查mosh版本 - -4. 你可以输入‘exit’来退出mosh会话。 - - $ exit - -5. mosh支持很多选项,你可以用下面的方法看到: - - $ mosh --help - -![Mosh Shell Options](http://www.tecmint.com/wp-content/uploads/2015/08/Mosh-Shell-Options.png) - -Mosh选项 - -#### mosh的利弊 #### - -- mosh有额外的需求,比如需要允许UDP直接连接,这在SSH不需要。 -- 动态分配的端口范围是60000-61000。第一个打开的端口是分配的。每个连接都需要一个端口。 -- 默认端口分配是一个严重的安全问题,尤其是在生产环境中。 -- 支持IPv6连接,但是不支持IPv6漫游。 -- 不支持回溯 -- 不支持X11转发 -- 不支持ssh-agent转发 - -### 总结 ### - -Mosh is a nice small utility which is available for download in the repository of most of the Linux Distributions. Though it has a few discrepancies specially security concern and additional requirement it’s features like remaining connected even while roaming is its plus point. My recommendation is Every Linux-er who deals with SSH should try this application and mind it, Mosh is worth a try. -mosh是一款在大多数linux发行版的仓库中可以下载的一款小工具。虽然它有一些差异尤其是安全问题和额外的需求,它的功能像漫游后保持连接是一个加分点。我的建议是任何一个使用ssh的linux用户都应该试试这个程序,mosh值得一试 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-mosh-shell-ssh-client-in-linux/ - -作者:[Avishek Kumar][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management/ -[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ -[3]:http://www.tecmint.com/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ -[4]:http://www.tecmint.com/dnf-commands-for-fedora-rpm-package-management/ -[5]:http://www.tecmint.com/configure-firewalld-in-centos-7/ From 46052dcbcd15116ea4b25088fdca676bea26e304 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 21 Sep 2015 23:11:22 +0800 Subject: [PATCH 2135/2517] PUB:RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares @FSSlc --- ...Lists) and Mounting Samba or NFS Shares.md | 76 +++++++++---------- 1 file changed, 35 insertions(+), 41 deletions(-) rename {translated/tech/RHCSA => published}/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md (67%) diff --git a/translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/published/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md similarity index 67% rename from translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md rename to published/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md index a68d36de2b..94f42a47ba 100644 --- a/translated/tech/RHCSA/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md +++ b/published/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md @@ -1,42 +1,40 @@ -RHCSA 系列:使用 ACL(访问控制列表) 和挂载 Samba/NFS 共享 – Part 7 +RHCSA 系列(六): 使用 ACL(访问控制列表) 和挂载 Samba/NFS 共享 ================================================================================ -在上一篇文章([RHCSA 系列 Part 6][1])中,我们解释了如何使用 parted 和 ssm 来设置和配置本地系统存储。 +在上一篇文章([RHCSA 系列(六)][1])中,我们解释了如何使用 parted 和 ssm 来设置和配置本地系统存储。 ![配置 ACL 及挂载 NFS/Samba 共享](http://www.tecmint.com/wp-content/uploads/2015/04/Configure-ACLs-and-Mounting-NFS-Samba-Shares.png) -RHCSA Series: 配置 ACL 及挂载 NFS/Samba 共享 – Part 7 +*RHCSA 系列: 配置 ACL 及挂载 NFS/Samba 共享 – Part 7* -我们也讨论了如何创建和在系统启动时使用一个密码来挂载加密的卷。另外,我们告诫过你要避免在挂载的文件系统上执行苛刻的存储管理操作。记住了这点后,现在,我们将回顾在 RHEL 7 中最常使用的文件系统格式,然后将涵盖有关手动或自动挂载、使用和卸载网络文件系统(CIFS 和 NFS)的话题以及在你的操作系统上实现访问控制列表的使用。 +我们也讨论了如何创建和在系统启动时使用一个密码来挂载加密的卷。另外,我们告诫过你要避免在挂载的文件系统上执行危险的存储管理操作。记住了这点后,现在,我们将回顾在 RHEL 7 中最常使用的文件系统格式,然后将涵盖有关手动或自动挂载、使用和卸载网络文件系统(CIFS 和 NFS)的话题以及在你的操作系统上实现访问控制列表(Access Control List)的使用。 #### 前提条件 #### -在进一步深入之前,请确保你可使用 Samba 服务和 NFS 服务(注意在 RHEL 7 中 NFSv2 已不再被支持)。 +在进一步深入之前,请确保你可使用 Samba 服务和 NFS 服务(注意在 RHEL 7 中 NFSv2 已不再被支持)。 -在本次指导中,我们将使用一个IP 地址为 192.168.0.10 且同时运行着 Samba 服务和 NFS 服务的机子来作为服务器,使用一个 IP 地址为 192.168.0.18 的 RHEL 7 机子来作为客户端。在这篇文章的后面部分,我们将告诉你在客户端上你需要安装哪些软件包。 +在本次指导中,我们将使用一个IP 地址为 192.168.0.10 且同时运行着 Samba 服务和 NFS 服务的机器来作为服务器,使用一个 IP 地址为 192.168.0.18 的 RHEL 7 机器来作为客户端。在这篇文章的后面部分,我们将告诉你在客户端上你需要安装哪些软件包。 ### RHEL 7 中的文件系统格式 ### -从 RHEL 7 开始,由于 XFS 的高性能和可扩展性,它已经被引入所有的架构中来作为默认的文件系统。 -根据 Red Hat 及其合作伙伴在主流硬件上执行的最新测试,当前 XFS 已支持最大为 500 TB 大小的文件系统。 +从 RHEL 7 开始,由于 XFS 的高性能和可扩展性,它已经被作为所有的架构中的默认文件系统。根据 Red Hat 及其合作伙伴在主流硬件上执行的最新测试,当前 XFS 已支持最大为 500 TB 大小的文件系统。 -另外, XFS 启用了 user_xattr(扩展用户属性) 和 acl( -POSIX 访问控制列表)来作为默认的挂载选项,而不像 ext3 或 ext4(对于 RHEL 7 来说, ext2 已过时),这意味着当挂载一个 XFS 文件系统时,你不必显式地在命令行或 /etc/fstab 中指定这些选项(假如你想在后一种情况下禁用这些选项,你必须显式地使用 no_acl 和 no_user_xattr)。 +另外,XFS 启用了 `user_xattr`(扩展用户属性) 和 `acl`(POSIX 访问控制列表)来作为默认的挂载选项,而不像 ext3 或 ext4(对于 RHEL 7 来说,ext2 已过时),这意味着当挂载一个 XFS 文件系统时,你不必显式地在命令行或 /etc/fstab 中指定这些选项(假如你想在后一种情况下禁用这些选项,你必须显式地使用 `no_acl` 和 `no_user_xattr`)。 -请记住扩展用户属性可以被指定到文件和目录中来存储任意的额外信息如 mime 类型,字符集或文件的编码,而用户属性中的访问权限由一般的文件权限位来定义。 +请记住扩展用户属性可以给文件和目录指定,用来存储任意的额外信息如 mime 类型,字符集或文件的编码,而用户属性中的访问权限由一般的文件权限位来定义。 #### 访问控制列表 #### -作为一名系统管理员,无论你是新手还是专家,你一定非常熟悉与文件和目录有关的常规访问权限,这些权限为所有者,所有组和"世界"(所有的其他人)指定了特定的权限(可读,可写及可执行)。但如若你需要稍微更新你的记忆,请随意参考 [RHCSA 系列的 Part 3][3]. +作为一名系统管理员,无论你是新手还是专家,你一定非常熟悉与文件和目录有关的常规访问权限,这些权限为所有者,所有组和“世界”(所有的其他人)指定了特定的权限(可读,可写及可执行)。但如若你需要稍微更新下你的记忆,请参考 [RHCSA 系列(三)][3]. 但是,由于标准的 `ugo/rwx` 集合并不允许为不同的用户配置不同的权限,所以 ACL 便被引入了进来,为的是为文件和目录定义更加详细的访问权限,而不仅仅是这些特别指定的特定权限。 事实上, ACL 定义的权限是由文件权限位所特别指定的权限的一个超集。下面就让我们看看这个转换是如何在真实世界中被应用的吧。 -1. 存在两种类型的 ACL:访问 ACL,可被应用到一个特定的文件或目录上,以及默认 ACL,只可被应用到一个目录上。假如目录中的文件没有 ACL,则它们将继承它们的父目录的默认 ACL 。 +1. 存在两种类型的 ACL:访问 ACL,可被应用到一个特定的文件或目录上;以及默认 ACL,只可被应用到一个目录上。假如目录中的文件没有 ACL,则它们将继承它们的父目录的默认 ACL 。 2. 从一开始, ACL 就可以为每个用户,每个组或不在文件所属组中的用户配置相应的权限。 -3. ACL 可使用 `setfacl` 来设置(和移除),可相应地使用 -m 或 -x 选项。 +3. ACL 可使用 `setfacl` 来设置(和移除),可相应地使用 -m 或 -x 选项。 例如,让我们创建一个名为 tecmint 的组,并将用户 johndoe 和 davenull 加入该组: @@ -53,36 +51,32 @@ POSIX 访问控制列表)来作为默认的挂载选项,而不像 ext3 或 ext ![检验用户](http://www.tecmint.com/wp-content/uploads/2015/04/Verify-Users.png) -检验用户 +*检验用户* -现在,我们在 /mnt 下创建一个名为 playground 的目录,并在该目录下创建一个名为 testfile.txt 的文件。我们将设定该文件的属组为 tecmint,并更改它的默认 ugo/rwx 权限为 770(即赋予该文件的属主和属组可读,可写和可执行权限): +现在,我们在 /mnt 下创建一个名为 playground 的目录,并在该目录下创建一个名为 testfile.txt 的文件。我们将设定该文件的属组为 tecmint,并更改它的默认 `ugo/rwx` 权限为 770(即赋予该文件的属主和属组可读、可写和可执行权限): # mkdir /mnt/playground # touch /mnt/playground/testfile.txt + # chown :tecmint /mnt/playground/testfile.txt # chmod 770 /mnt/playground/testfile.txt 接着,依次切换为 johndoe 和 davenull 用户,并在文件中写入一些信息: - echo "My name is John Doe" > /mnt/playground/testfile.txt - echo "My name is Dave Null" >> /mnt/playground/testfile.txt - -到目前为止,一切正常。现在我们让用户 gacanepa 来向该文件执行写操作 – 则写操作将会失败,这是可以预料的。 - -但实际上我们需要用户 gacanepa(TA 不是组 tecmint 的成员)在文件 /mnt/playground/testfile.txt 上有写权限,那又该怎么办呢?首先映入你脑海里的可能是将该用户添加到组 tecmint 中。但那将使得他在所有该组具有写权限位的文件上均拥有写权限,但我们并不想这样,我们只想他能够在文件 /mnt/playground/testfile.txt 上有写权限。 - - # touch /mnt/playground/testfile.txt - # chown :tecmint /mnt/playground/testfile.txt - # chmod 777 /mnt/playground/testfile.txt # su johndoe $ echo "My name is John Doe" > /mnt/playground/testfile.txt $ su davenull $ echo "My name is Dave Null" >> /mnt/playground/testfile.txt + +到目前为止,一切正常。现在我们让用户 gacanepa 来向该文件执行写操作 – 则写操作将会失败,这是可以预料的。 + $ su gacanepa $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt ![管理用户的权限](http://www.tecmint.com/wp-content/uploads/2015/04/User-Permissions.png) -管理用户的权限 +*管理用户的权限* + +但实际上我们需要用户 gacanepa(他不是组 tecmint 的成员)在文件 /mnt/playground/testfile.txt 上有写权限,那又该怎么办呢?首先映入你脑海里的可能是将该用户添加到组 tecmint 中。但那将使得他在所有该组具有写权限位的文件上均拥有写权限,但我们并不想这样,我们只想他能够在文件 /mnt/playground/testfile.txt 上有写权限。 现在,让我们给用户 gacanepa 在 /mnt/playground/testfile.txt 文件上有读和写权限。 @@ -90,7 +84,7 @@ POSIX 访问控制列表)来作为默认的挂载选项,而不像 ext3 或 ext # setfacl -R -m u:gacanepa:rwx /mnt/playground -则你将成功地添加一条 ACL,运行 gacanepa 对那个测试文件可写。然后切换为 gacanepa 用户,并再次尝试向该文件写入一些信息: +则你将成功地添加一条 ACL,允许 gacanepa 对那个测试文件可写。然后切换为 gacanepa 用户,并再次尝试向该文件写入一些信息: $ echo "My name is Gabriel Canepa" >> /mnt/playground/testfile.txt @@ -100,9 +94,9 @@ POSIX 访问控制列表)来作为默认的挂载选项,而不像 ext3 或 ext ![检查文件的 ACL](http://www.tecmint.com/wp-content/uploads/2015/04/Check-ACL-of-File.png) -检查文件的 ACL +*检查文件的 ACL* -要为目录设定默认 ACL(它的内容将被该目录下的文件继承,除非另外被覆写),在规则前添加 `d:`并特别指定一个目录名,而不是文件名: +要为目录设定默认 ACL(它的内容将被该目录下的文件继承,除非另外被覆写),在规则前添加 `d:`并特别指定一个目录名,而不是文件名: # setfacl -m d:o:r /mnt/playground @@ -111,7 +105,7 @@ POSIX 访问控制列表)来作为默认的挂载选项,而不像 ext3 或 ext ![在 Linux 中设定默认 ACL](http://www.tecmint.com/wp-content/uploads/2015/04/Set-Default-ACL-in-Linux.png) -在 Linux 中设定默认 ACL +*在 Linux 中设定默认 ACL* [在官方的 RHEL 7 存储管理指导手册的第 20 章][3] 中提供了更多有关 ACL 的例子,我极力推荐你看一看它并将它放在身边作为参考。 @@ -129,7 +123,7 @@ POSIX 访问控制列表)来作为默认的挂载选项,而不像 ext3 或 ext ![检查可用的 NFS 共享](http://www.tecmint.com/wp-content/uploads/2015/04/Mount-NFS-Shares.png) -检查可用的 NFS 共享 +*检查可用的 NFS 共享* 要按照需求在本地客户端上使用命令行来挂载 NFS 网络共享,可使用下面的语法: @@ -139,7 +133,7 @@ POSIX 访问控制列表)来作为默认的挂载选项,而不像 ext3 或 ext # mount -t nfs 192.168.0.10:/NFS-SHARE /mnt/nfs -若你得到如下的错误信息:“Job for rpc-statd.service failed. See “systemctl status rpc-statd.service”及“journalctl -xn” for details.”,请确保 `rpcbind` 服务被启用且已在你的系统中启动了。 +若你得到如下的错误信息:`Job for rpc-statd.service failed. See "systemctl status rpc-statd.service" and "journalctl -xn" for details.`,请确保 `rpcbind` 服务被启用且已在你的系统中启动了。 # systemctl enable rpcbind.socket # systemctl restart rpcbind.service @@ -162,7 +156,7 @@ Samba 代表一个特别的工具,使得在由 *nix 和 Windows 机器组成 ![检查 Samba 共享](http://www.tecmint.com/wp-content/uploads/2015/04/Check-Samba-Shares.png) -检查 Samba 共享 +*检查 Samba 共享* 要在本地客户端上挂载 Samba 网络共享,你需要已安装好 cifs-utils 软件包: @@ -176,14 +170,14 @@ Samba 代表一个特别的工具,使得在由 *nix 和 Windows 机器组成 # mount -t cifs -o credentials=~/.smbcredentials //192.168.0.10/gacanepa /mnt/samba -其中 `smbcredentials` +其中 `.smbcredentials` 的内容是: username=gacanepa password=XXXXXX -是一个位于 root 用户的家目录(/root/) 中的隐藏文件,其权限被设置为 600,所以除了该文件的属主外,其他人对该文件既不可读也不可写。 +它是一个位于 root 用户的家目录(/root/) 中的隐藏文件,其权限被设置为 600,所以除了该文件的属主外,其他人对该文件既不可读也不可写。 -请注意 samba_share 是 Samba 分享的名称,由上面展示的 `smbclient -L remote_host` 所返回。 +请注意 samba_share 是 Samba 共享的名称,由上面展示的 `smbclient -L remote_host` 所返回。 现在,若你需要在系统启动时自动地使得 Samba 分享可用,可以向 /etc/fstab 文件添加一个像下面这样的有效条目: @@ -197,7 +191,7 @@ Samba 代表一个特别的工具,使得在由 *nix 和 Windows 机器组成 在这篇文章中,我们已经解释了如何在 Linux 中设置 ACL,并讨论了如何在一个 RHEL 7 客户端上挂载 CIFS 和 NFS 网络共享。 -我建议你去练习这些概念,甚至混合使用它们(试着在一个挂载的网络共享上设置 ACL),直至你感觉舒适。假如你有问题或评论,请随时随意地使用下面的评论框来联系我们。另外,请随意通过你的社交网络分享这篇文章。 +我建议你去练习这些概念,甚至混合使用它们(试着在一个挂载的网络共享上设置 ACL),直至你感觉掌握了。假如你有问题或评论,请随时随意地使用下面的评论框来联系我们。另外,请随意通过你的社交网络分享这篇文章。 -------------------------------------------------------------------------------- @@ -205,11 +199,11 @@ via: http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者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/rhcsa-exam-create-format-resize-delete-and-encrypt-partitions-in-linux/ -[2]:http://www.tecmint.com/rhcsa-exam-manage-users-and-groups/ +[1]:https://linux.cn/article-6257-1.html +[2]:https://linux.cn/article-6187-1.html [3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch-acls.html \ No newline at end of file From 728f9bd1300ae6f2478ae2911c65511219a8ead4 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 22 Sep 2015 07:36:15 +0800 Subject: [PATCH 2136/2517] PUB:20150908 How to Download Install and Configure Plank Dock in Ubuntu @wi-cuckoo --- ...nload Install and Configure Plank Dock in Ubuntu.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md (85%) diff --git a/translated/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md b/published/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md similarity index 85% rename from translated/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md rename to published/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md index 1990e25a60..ea125f9bbe 100644 --- a/translated/tech/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md +++ b/published/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md @@ -1,4 +1,4 @@ -在 Ubuntu 里,如何下载,安装和配置 Plank Dock +在 Ubuntu 里如何下载、安装和配置 Plank Dock ============================================================================= 一个众所周知的事实就是,Linux 是一个用户可以高度自定义的系统,有很多选项可以选择 —— 作为操作系统,有各种各样的发行版,而对于单个发行版来说,又有很多桌面环境可以选择。与其他操作系统的用户一样,Linux 用户也有不同的口味和喜好,特别是对于桌面来说。 @@ -8,7 +8,7 @@ ### Plank ### -官方的文档描述 Plank 是“这个星球上最简洁的 dock”。该项目的目的就是提供一个 dock 仅需要的功能,尽管这是很基础的一个库,却可以被扩展,创造其他的含更多高级功能的 dock 程序。 +官方的文档描述 Plank 是“这个星球上最简洁的 dock”。该项目的目的就是仅提供一个 dock 需要的功能,尽管这是很基础的一个库,却可以被扩展,创造其他的含更多高级功能的 dock 程序。 这里值得一提的就是,在 elementary OS 里,Plank 是预装的。并且 Plank 是 Docky 的基础,Docky 也是一个非常流行的 dock 应用,在功能上与 Mac OS X 的 Dock 非常相似。 @@ -30,11 +30,11 @@ ![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-enabled-new.jpg) -正如上面图片显示的那样,dock 包含许多带橙色的应用图标,这表明这些应用正处于运行状态。无需说,你可以点击一个图标来打开那个应用。同时,右击一个应用图标会给出更多的选项,你可能会感兴趣。举个例子,该下面的屏幕快照: +正如上面图片显示的那样,dock 包含许多带橙色标示的应用图标,这表明这些应用正处于运行状态。无需说,你可以点击一个图标来打开那个应用。同时,右击一个应用图标会给出更多的选项,你可能会感兴趣。举个例子,看下面的屏幕快照: ![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-right-click-icons-new.jpg) -为了获得配置的选项,你不得不右击一下 Plank 的图标(左数第一个),然后点击 Preferences 选项。这就会产生接下来的窗口。 +为了获得配置的选项,你需要右击一下 Plank 的图标(左数第一个),然后点击 Preferences 选项。这就会出现如下的窗口。 ![](https://www.maketecheasier.com/assets/uploads/2015/09/plank-preferences.png) @@ -58,7 +58,7 @@ via: https://www.maketecheasier.com/download-install-configure-plank-dock-ubuntu 作者:[Himanshu Arora][a] 译者:[wi-cuckoo](https://github.com/wi-cuckoo) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 387e52c704d2777bd4210ebe108fcb65959eee7a Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 22 Sep 2015 08:04:09 +0800 Subject: [PATCH 2137/2517] PUB:RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services @FSSlc --- ... Hostname and Enabling Network Services.md | 76 ++++++++++--------- 1 file changed, 39 insertions(+), 37 deletions(-) rename {translated/tech/RHCSA => published}/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md (59%) diff --git a/translated/tech/RHCSA/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md b/published/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md similarity index 59% rename from translated/tech/RHCSA/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md rename to published/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md index 82245f33b1..3494bf7355 100644 --- a/translated/tech/RHCSA/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md +++ b/published/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md @@ -1,26 +1,27 @@ -RHCSA 系列:安全 SSH,设定主机名及开启网络服务 – Part 8 +RHCSA 系列(八): 加固 SSH,设定主机名及启用网络服务 ================================================================================ -作为一名系统管理员,你将经常使用一个终端模拟器来登陆到一个远程的系统中,执行一系列的管理任务。你将很少有机会坐在一个真实的(物理)终端前,所以你需要设定好一种方法来使得你可以登陆到你被要求去管理的那台远程主机上。 -事实上,当你必须坐在一台物理终端前的时候,就可能是你登陆到该主机的最后一种方法。基于安全原因,使用 Telnet 来达到以上目的并不是一个好主意,因为穿行在线缆上的流量并没有被加密,它们以文本方式在传送。 +作为一名系统管理员,你将经常使用一个终端模拟器来登录到一个远程的系统中,执行一系列的管理任务。你将很少有机会坐在一个真实的(物理)终端前,所以你需要设定好一种方法来使得你可以登录到你需要去管理的那台远程主机上。 + +事实上,当你必须坐在一台物理终端前的时候,就可能是你登录到该主机的最后一种方法了。基于安全原因,使用 Telnet 来达到以上目的并不是一个好主意,因为穿行在线缆上的流量并没有被加密,它们以明文方式在传送。 另外,在这篇文章中,我们也将复习如何配置网络服务来使得它在开机时被自动开启,并学习如何设置网络和静态或动态地解析主机名。 ![RHCSA: 安全 SSH 和开启网络服务](http://www.tecmint.com/wp-content/uploads/2015/05/Secure-SSH-Server-and-Enable-Network-Services.png) -RHCSA: 安全 SSH 和开启网络服务 – Part 8 +*RHCSA: 安全 SSH 和开启网络服务 – Part 8* ### 安装并确保 SSH 通信安全 ### -对于你来说,要能够使用 SSH 远程登陆到一个 RHEL 7 机子,你必须安装 `openssh`,`openssh-clients` 和 `openssh-servers` 软件包。下面的命令不仅将安装远程登陆程序,也会安装安全的文件传输工具以及远程文件复制程序: +对于你来说,要能够使用 SSH 远程登录到一个 RHEL 7 机子,你必须安装 `openssh`,`openssh-clients` 和 `openssh-servers` 软件包。下面的命令不仅将安装远程登录程序,也会安装安全的文件传输工具以及远程文件复制程序: # yum update && yum install openssh openssh-clients openssh-servers -注意,安装上服务器所需的相应软件包是一个不错的主意,因为或许在某个时刻,你想使用同一个机子来作为客户端和服务器。 +注意,也安装上服务器所需的相应软件包是一个不错的主意,因为或许在某个时刻,你想使用同一个机子来作为客户端和服务器。 -在安装完成后,如若你想安全地访问你的 SSH 服务器,你还需要考虑一些基本的事情。下面的设定应该在文件 `/etc/ssh/sshd_config` 中得以呈现。 +在安装完成后,如若你想安全地访问你的 SSH 服务器,你还需要考虑一些基本的事情。下面的设定应该出现在文件 `/etc/ssh/sshd_config` 中。 -1. 更改 sshd 守护进程的监听端口,从 22(默认的端口值)改为一个更高的端口值(2000 或更大),但首先要确保所选的端口没有被占用。 +1、 更改 sshd 守护进程的监听端口,从 22(默认的端口值)改为一个更高的端口值(2000 或更大),但首先要确保所选的端口没有被占用。 例如,让我们假设你选择了端口 2500 。使用 [netstat][1] 来检查所选的端口是否被占用: @@ -30,17 +31,17 @@ RHCSA: 安全 SSH 和开启网络服务 – Part 8 Port 2500 -2. 只允许协议 2: +2、 只允许协议 2(LCTT 译注:SSHv1 已经被证明不安全,默认情况下 SSHv1 和 SSHv2 都支持,所以应该显示去掉如下配置行的注释,并只支持 SSHv2。): Protocol 2 -3. 配置验证超时的时间为 2 分钟,不允许以 root 身份登陆,并将允许通过 ssh 登陆的人数限制到最小: +3、 配置验证超时的时间为 2 分钟,不允许以 root 身份登录,并将允许通过 ssh 登录的人数限制到最小: LoginGraceTime 2m PermitRootLogin no AllowUsers gacanepa -4. 假如可能,使用基于公钥的验证方式而不是使用密码: +4、 假如可能,使用基于公钥的验证方式而不是使用密码: PasswordAuthentication no RSAAuthentication yes @@ -48,13 +49,13 @@ RHCSA: 安全 SSH 和开启网络服务 – Part 8 这假设了你已经在你的客户端机子上创建了带有你的用户名的一个密钥对,并将公钥复制到了你的服务器上。 -- [开启 SSH 无密码登陆][2] +- [开启 SSH 无密码登录][2] ### 配置网络和名称的解析 ### -1. 每个系统管理员应该对下面这个系统配置文件非常熟悉: +1、 每个系统管理员都应该对下面这个系统配置文件非常熟悉: -- /etc/hosts 被用来在小型网络中解析名称 <---> IP 地址。 +- /etc/hosts 被用来在小型网络中解析“名称” <---> “IP 地址”。 文件 `/etc/hosts` 中的每一行拥有如下的结构: @@ -64,7 +65,7 @@ RHCSA: 安全 SSH 和开启网络服务 – Part 8 192.168.0.10 laptop laptop.gabrielcanepa.com.ar -2. `/etc/resolv.conf` 特别指定 DNS 服务器的 IP 地址和搜索域,它被用来在没有提供域名后缀时,将一个给定的查询名称对应为一个全称域名。 +2、 `/etc/resolv.conf` 特别指定 DNS 服务器的 IP 地址和搜索域,它被用来在没有提供域名后缀时,将一个给定的查询名称对应为一个全称域名。 在正常情况下,你不必编辑这个文件,因为它是由系统管理的。然而,若你非要改变 DNS 服务器的 IP 地址,建议你在该文件的每一行中,都应该遵循下面的结构: @@ -74,7 +75,7 @@ RHCSA: 安全 SSH 和开启网络服务 – Part 8 nameserver 8.8.8.8 -3. `/etc/host.conf` 特别指定在一个网络中主机名被解析的方法和顺序。换句话说,告诉名称解析器使用哪个服务,并以什么顺序来使用。 +3、 `/etc/host.conf` 特别指定在一个网络中主机名被解析的方法和顺序。换句话说,告诉名称解析器使用哪个服务,并以什么顺序来使用。 尽管这个文件由几个选项,但最为常见和基本的设置包含如下的一行: @@ -82,12 +83,12 @@ RHCSA: 安全 SSH 和开启网络服务 – Part 8 它意味着解析器应该首先查看 `resolv.conf` 中特别指定的域名服务器,然后到 `/etc/hosts` 文件中查找解析的名称。 -4. `/etc/sysconfig/network` 包含了所有网络接口的路由和全局主机信息。下面的值可能会被使用: +4、 `/etc/sysconfig/network` 包含了所有网络接口的路由和全局主机信息。下面的值可能会被使用: NETWORKING=yes|no HOSTNAME=value -其中的 value 应该是全称域名(FQDN)。 +其中的 value 应该是全称域名(FQDN)。 GATEWAY=XXX.XXX.XXX.XXX @@ -97,7 +98,7 @@ RHCSA: 安全 SSH 和开启网络服务 – Part 8 在一个带有多个网卡的机器中, value 为网关设备名,例如 enp0s3。 -5. 位于 `/etc/sysconfig/network-scripts` 中的文件(网络适配器配置文件)。 +5、 位于 `/etc/sysconfig/network-scripts` 中的文件(网络适配器配置文件)。 在上面提到的目录中,你将找到几个被命名为如下格式的文本文件。 @@ -107,26 +108,27 @@ RHCSA: 安全 SSH 和开启网络服务 – Part 8 ![检查网络连接状态](http://www.tecmint.com/wp-content/uploads/2015/05/Check-IP-Address.png) -检查网络连接状态 +*检查网络连接状态* 例如: ![网络文件](http://www.tecmint.com/wp-content/uploads/2015/05/Network-Files.png) -网络文件 +*网络文件* -除了环回接口,你还可以为你的网卡进行一个相似的配置。注意,假如设定了某些变量,它们将为这个特别的接口,覆盖掉 `/etc/sysconfig/network` 中定义的值。在这篇文章中,为了能够解释清楚,每行都被加上了注释,但在实际的文件中,你应该避免加上注释: +除了环回接口(loopback),你还可以为你的网卡指定相似的配置。注意,假如设定了某些变量,它们将为这个指定的接口覆盖掉 `/etc/sysconfig/network` 中定义的默认值。在这篇文章中,为了能够解释清楚,每行都被加上了注释,但在实际的文件中,你应该避免加上注释: - HWADDR=08:00:27:4E:59:37 # The MAC address of the NIC - TYPE=Ethernet # Type of connection - BOOTPROTO=static # This indicates that this NIC has been assigned a static IP. If this variable was set to dhcp, the NIC will be assigned an IP address by a DHCP server and thus the next two lines should not be present in that case. + HWADDR=08:00:27:4E:59:37 ### 网卡的 MAC 地址 + TYPE=Ethernet ### 连接类型 + BOOTPROTO=static ### 这代表着该网卡指定了一个静态地址。 + ### 如果这个值指定为 dhcp,这个网卡会从 DHCP 服务器获取 IP 地址,并且就不应该出现以下两行。 IPADDR=192.168.0.18 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 - NM_CONTROLLED=no # Should be added to the Ethernet interface to prevent NetworkManager from changing the file. + NM_CONTROLLED=no ### 应该给以太网卡设置,以便可以让 NetworkManager 可以修改这个文件。 NAME=enp0s3 UUID=14033805-98ef-4049-bc7b-d4bea76ed2eb - ONBOOT=yes # The operating system should bring up this NIC during boot + ONBOOT=yes ### 操作系统会在启动时打开这个网卡。 ### 设定主机名 ### @@ -138,7 +140,7 @@ RHCSA: 安全 SSH 和开启网络服务 – Part 8 ![在RHEL 7 中检查系统的主机名](http://www.tecmint.com/wp-content/uploads/2015/05/Check-System-hostname.png) -检查系统的主机名 +*检查系统的主机名* 要更改主机名,使用 @@ -148,13 +150,13 @@ RHCSA: 安全 SSH 和开启网络服务 – Part 8 # hostnamectl set-hostname cinderella -要想使得更改生效,你需要重启 hostnamed 守护进程(这样你就不必因为要应用更改而登出系统并再登陆系统): +要想使得更改生效,你需要重启 hostnamed 守护进程(这样你就不必因为要应用更改而登出并再登录系统): # systemctl restart systemd-hostnamed ![在 RHEL7 中设定系统主机名](http://www.tecmint.com/wp-content/uploads/2015/05/Set-System-Hostname.png) -设定系统主机名 +*设定系统主机名* 另外, RHEL 7 还包含 `nmcli` 工具,它可被用来达到相同的目的。要展示主机名,运行: @@ -170,13 +172,13 @@ RHCSA: 安全 SSH 和开启网络服务 – Part 8 ![使用 nmcli 命令来设定主机名](http://www.tecmint.com/wp-content/uploads/2015/05/nmcli-command.png) -使用 nmcli 命令来设定主机名 +*使用 nmcli 命令来设定主机名* ### 在开机时开启网络服务 ### -作为本文的最后部分,就让我们看看如何确保网络服务在开机时被自动开启。简单来说,这个可通过创建符号链接到某些由服务的配置文件中的 [Install] 小节中指定的文件来实现。 +作为本文的最后部分,就让我们看看如何确保网络服务在开机时被自动开启。简单来说,这个可通过创建符号链接到某些由服务的配置文件中的 `[Install]` 小节中指定的文件来实现。 -以 firewalld(/usr/lib/systemd/system/firewalld.service) 为例: +以 firewalld(/usr/lib/systemd/system/firewalld.service) 为例: [Install] WantedBy=basic.target @@ -192,11 +194,11 @@ RHCSA: 安全 SSH 和开启网络服务 – Part 8 ![在开机时开启服务](http://www.tecmint.com/wp-content/uploads/2015/05/Enable-Service-at-System-Boot.png) -在开机时开启服务 +*在开机时开启服务* ### 总结 ### -在这篇文章中,我们总结了如何安装 SSH 及使用它安全地连接到一个 RHEL 服务器,如何改变主机名,并在最后如何确保在系统启动时开启服务。假如你注意到某个服务启动失败,你可以使用 `systemctl status -l [service]` 和 `journalctl -xn` 来进行排错。 +在这篇文章中,我们总结了如何安装 SSH 及使用它安全地连接到一个 RHEL 服务器;如何改变主机名,并在最后如何确保在系统启动时开启服务。假如你注意到某个服务启动失败,你可以使用 `systemctl status -l [service]` 和 `journalctl -xn` 来进行排错。 请随意使用下面的评论框来让我们知晓你对本文的看法。提问也同样欢迎。我们期待着你的反馈! @@ -206,10 +208,10 @@ via: http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network- 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者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/20-netstat-commands-for-linux-network-management/ -[2]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ \ No newline at end of file +[2]:https://linux.cn/article-5444-1.html \ No newline at end of file From c8ef8ddabff51faaa815d5e2a445390772de8c13 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 22 Sep 2015 08:16:38 +0800 Subject: [PATCH 2138/2517] PUB:20150908 List Of 10 Funny Linux Commands @tnuoccalanosrep --- ...0150908 List Of 10 Funny Linux Commands.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150908 List Of 10 Funny Linux Commands.md (93%) diff --git a/translated/tech/20150908 List Of 10 Funny Linux Commands.md b/published/20150908 List Of 10 Funny Linux Commands.md similarity index 93% rename from translated/tech/20150908 List Of 10 Funny Linux Commands.md rename to published/20150908 List Of 10 Funny Linux Commands.md index 7219e16890..9b89da3b2b 100644 --- a/translated/tech/20150908 List Of 10 Funny Linux Commands.md +++ b/published/20150908 List Of 10 Funny Linux Commands.md @@ -1,4 +1,4 @@ -10条真心有趣的Linux命令 +10 条真心有趣的 Linux 命令 ================================================================================ **在终端工作是一件很有趣的事情。今天,我们将会列举一些有趣得为你带来欢笑的Linux命令。** @@ -29,7 +29,7 @@ ### 3. yes ### - #yes + # yes 这个命令会不停打印字符串,直到用户把这进程给结束掉。 @@ -38,6 +38,7 @@ ![Selection_005](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0054.png) ### 4. figlet ### + 这个命令可以用apt-get安装,安装之后,在**/usr/share/figlet**可以看到一些ascii字体文件。 cd /usr/share/figlet @@ -45,26 +46,25 @@ ---------- #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 + #figlet -f block.flf unixmen ![Selection_007](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0072.png) 当然,你也可以尝试使用其他的选项。 ### 5. asciiquarium ### + 这个命令会将你的终端变成一个海洋馆。 -下载term animator + +下载term animator: # wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz -安装并且配置这个包 +安装并且配置这个包: # tar -zxvf Term-Animation-2.4.tar.gz # cd Term-Animation-2.4/ @@ -75,14 +75,14 @@ e.g. # apt-get install libcurses-perl -下载并且安装asciiquarium +下载并且安装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/ -执行如下命令 +执行如下命令: # /usr/local/bin/asciiquarium @@ -176,8 +176,8 @@ aafire能让你的终端燃起来。 via: http://www.unixmen.com/list-10-funny-linux-commands/ 作者:[Rajneesh Upadhyay][a] -译者:[tnuoccalanosrep](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[tnuoccalanosrep](https://github.com/tnuoccalanosrep) +校对:[wxy](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 713224c88c8e1dad1c13f65f3d798244090c1e53 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 22 Sep 2015 16:33:01 +0800 Subject: [PATCH 2139/2517] Delete 20150921 Configure PXE Server In Ubuntu 14.04.md --- ...21 Configure PXE Server In Ubuntu 14.04.md | 250 ------------------ 1 file changed, 250 deletions(-) delete mode 100644 sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md diff --git a/sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md b/sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md deleted file mode 100644 index 4265e59b4f..0000000000 --- a/sources/tech/20150921 Configure PXE Server In Ubuntu 14.04.md +++ /dev/null @@ -1,250 +0,0 @@ -translation by strugglingyouth -Configure PXE Server In Ubuntu 14.04 -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/09/pxe-featured.jpg) - -PXE (Preboot Execution Environment) Server allows the user to boot a Linux distribution from a network and install it on hundreds of PCs at a time without any Linux iso images. If your client’s computers don’t have CD/DVD or USB drives, or if you want to set up multiple computers at the same time in a large enterprise, then PXE server can be used to save money and time. - -In this article we will show you how you can configure a PXE server in Ubuntu 14.04. - -### Configure Networking ### - -To get started, you need to first set up your PXE server to use a static IP. To set up a static IP address in your system, you need to edit the “/etc/network/interfaces” file. - -1. Open the “/etc/network/interfaces” file. - - sudo nano /etc/network/interfaces - -Add/edit as described below: - - # The loopback network interface - auto lo - iface lo inet loopback - # The primary network interface - auto eth0 - iface eth0 inet static - address 192.168.1.20 - netmask 255.255.255.0 - gateway 192.168.1.1 - dns-nameservers 8.8.8.8 - -Save the file and exit. This will set its IP address to “192.168.1.20”. Restart the network service. - - sudo /etc/init.d/networking restart - -### Install DHCP, TFTP and NFS: ### - -DHCP, TFTP and NFS are essential components for configuring a PXE server. First you need to update your system and install all necessary packages. - -For this, run the following commands: - - sudo apt-get update - sudo apt-get install isc-dhcp-Server inetutils-inetd tftpd-hpa syslinux nfs-kernel-Server - -### Configure DHCP Server: ### - -DHCP stands for Dynamic Host Configuration Protocol, and it is used mainly for dynamically distributing network configuration parameters such as IP addresses for interfaces and services. A DHCP server in PXE environment allow clients to request and receive an IP address automatically to gain access to the network servers. - -1. Edit the “/etc/default/dhcp3-server” file. - - sudo nano /etc/default/dhcp3-server - -Add/edit as described below: - - INTERFACES="eth0" - -Save (Ctrl + o) and exit (Ctrl + x) the file. - -2. Edit the “/etc/dhcp3/dhcpd.conf” file: - - sudo nano /etc/dhcp/dhcpd.conf - -Add/edit as described below: - - default-lease-time 600; - max-lease-time 7200; - subnet 192.168.1.0 netmask 255.255.255.0 { - range 192.168.1.21 192.168.1.240; - option subnet-mask 255.255.255.0; - option routers 192.168.1.20; - option broadcast-address 192.168.1.255; - filename "pxelinux.0"; - next-Server 192.168.1.20; - } - -Save the file and exit. - -3. Start the DHCP service. - - sudo /etc/init.d/isc-dhcp-server start - -### Configure TFTP Server: ### - -TFTP is a file-transfer protocol which is similar to FTP. It is used where user authentication and directory visibility are not required. The TFTP server is always listening for PXE clients on the network. When it detects any network PXE client asking for PXE services, then it provides a network package that contains the boot menu. - -1. To configure TFTP, edit the “/etc/inetd.conf” file. - - sudo nano /etc/inetd.conf - -Add/edit as described below: - - tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot - -Save and exit the file. - -2. Edit the “/etc/default/tftpd-hpa” file. - - sudo nano /etc/default/tftpd-hpa - -Add/edit as described below: - - TFTP_USERNAME="tftp" - TFTP_DIRECTORY="/var/lib/tftpboot" - TFTP_ADDRESS="[:0.0.0.0:]:69" - TFTP_OPTIONS="--secure" - RUN_DAEMON="yes" - OPTIONS="-l -s /var/lib/tftpboot" - -Save and exit the file. - -3. Enable boot service for `inetd` to automatically start after every system reboot and start tftpd service. - - sudo update-inetd --enable BOOT - sudo service tftpd-hpa start - -4. Check status. - - sudo netstat -lu - -It will show the following output: - - Proto Recv-Q Send-Q Local Address Foreign Address State - udp 0 0 *:tftp *:* - -### Configure PXE boot files ### - -Now you need the PXE boot file “pxelinux.0” to be present in the TFTP root directory. Make a directory structure for TFTP, and copy all the bootloader files provided by syslinux from the “/usr/lib/syslinux/” to the “/var/lib/tftpboot/” path by issuing the following commands: - - sudo mkdir /var/lib/tftpboot - sudo mkdir /var/lib/tftpboot/pxelinux.cfg - sudo mkdir -p /var/lib/tftpboot/Ubuntu/14.04/amd64/ - sudo cp /usr/lib/syslinux/vesamenu.c32 /var/lib/tftpboot/ - sudo cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/ - -#### Set up PXELINUX configuration file #### - -The PXE configuration file defines the boot menu displayed to the PXE client when it boots up and contacts the TFTP server. By default, when a PXE client boots up, it will use its own MAC address to specify which configuration file to read, so we need to create that default file that contains the list of kernels which are available to boot. - -Edit the PXE Server configuration file with valid installation options. - -To edit “/var/lib/tftpboot/pxelinux.cfg/default,” - - sudo nano /var/lib/tftpboot/pxelinux.cfg/default - -Add/edit as described below: - - DEFAULT vesamenu.c32 - TIMEOUT 100 - PROMPT 0 - MENU INCLUDE pxelinux.cfg/PXE.conf - NOESCAPE 1 - LABEL Try Ubuntu 14.04 Desktop - MENU LABEL Try Ubuntu 14.04 Desktop - kernel Ubuntu/vmlinuz - append boot=casper netboot=nfs nfsroot=192.168.1.20:/var/lib/tftpboot/Ubuntu/14.04/amd64 - initrd=Ubuntu/initrd.lz quiet splash - ENDTEXT - LABEL Install Ubuntu 14.04 Desktop - MENU LABEL Install Ubuntu 14.04 Desktop - kernel Ubuntu/vmlinuz - append boot=casper automatic-ubiquity netboot=nfs nfsroot=192.168.1.20:/var/lib/tftpboot/Ubuntu/14.04/amd64 - initrd=Ubuntu/initrd.lz quiet splash - ENDTEXT - -Save and exit the file. - -Edit the “/var/lib/tftpboot/pxelinux.cfg/pxe.conf” file. - - sudo nano /var/lib/tftpboot/pxelinux.cfg/pxe.conf - -Add/edit as described below: - - MENU TITLE PXE Server - NOESCAPE 1 - ALLOWOPTIONS 1 - PROMPT 0 - MENU WIDTH 80 - MENU ROWS 14 - MENU TABMSGROW 24 - MENU MARGIN 10 - MENU COLOR border 30;44 #ffffffff #00000000 std - -Save and exit the file. - -### Add Ubuntu 14.04 Desktop Boot Images to PXE Server ### - -For this, Ubuntu kernel and initrd files are required. To get those files, you need the Ubuntu 14.04 Desktop ISO Image. You can download the Ubuntu 14.04 ISO image in the /mnt folder by issuing the following command: - - sudo cd /mnt - sudo wget http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso - -**Note**: the download URL might change as the ISO image is updated. Check out this website for the latest download link if the above URL is not working. - -Mount the ISO file, and copy all the files to the TFTP folder by issuing the following commands: - - sudo mount -o loop /mnt/ubuntu-14.04.3-desktop-amd64.iso /media/ - sudo cp -r /media/* /var/lib/tftpboot/Ubuntu/14.04/amd64/ - sudo cp -r /media/.disk /var/lib/tftpboot/Ubuntu/14.04/amd64/ - sudo cp /media/casper/initrd.lz /media/casper/vmlinuz /var/lib/tftpboot/Ubuntu/ - -### Configure NFS Server to Export ISO Contents ### - -Now you need to setup Installation Source Mirrors via NFS protocol. You can also use http and ftp for Installation Source Mirrors. Here I have used NFS to export ISO contents. - -To configure the NFS server, you need to edit the “/etc/exports” file. - - sudo nano /etc/exports - -Add/edit as described below: - - /var/lib/tftpboot/Ubuntu/14.04/amd64 *(ro,async,no_root_squash,no_subtree_check) - -Save and exit the file. For the changes to take effect, export and start NFS service. - - sudo exportfs -a - sudo /etc/init.d/nfs-kernel-server start - -Now your PXE Server is ready. - -### Configure Network Boot PXE Client ### - -A PXE client can be any computer system with a PXE network boot enable option. Now your clients can boot and install Ubuntu 14.04 Desktop by enabling “Boot From Network” options from their systems BIOS. - -You’re now ready to go – start your PXE Client Machine with the network boot enable option, and you should now see a sub-menu showing for your Ubuntu 14.04 Desktop that we created. - -![pxe](https://www.maketecheasier.com/assets/uploads/2015/09/pxe.png) - -### Conclusion ### - -Configuring network boot installation using PXE server is efficient and a time-saving method. You can install hundreds of client at a time in your local network. All you need is a PXE server and PXE enabled clients. Try it out, and let us know if this works for you. - -Reference: -- [PXE Server wiki][1] -- [PXE Server Ubuntu][2] - -Image credit: [fupsol_unl_20][3] - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/configure-pxe-server-ubuntu/ - -作者:[Hitesh Jethva][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/hiteshjethva/ -[1]:https://en.wikipedia.org/wiki/Preboot_Execution_Environment -[2]:https://help.ubuntu.com/community/PXEInstallServer -[3]:https://www.flickr.com/photos/jhcalderon/3681926417/ From a0933bc8102d1efd753357bcad3650a5ef9fac3f Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 22 Sep 2015 16:34:46 +0800 Subject: [PATCH 2140/2517] Create 20150921 Configure PXE Server In Ubuntu 14.04.md --- ...21 Configure PXE Server In Ubuntu 14.04.md | 251 ++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 translated/tech/20150921 Configure PXE Server In Ubuntu 14.04.md diff --git a/translated/tech/20150921 Configure PXE Server In Ubuntu 14.04.md b/translated/tech/20150921 Configure PXE Server In Ubuntu 14.04.md new file mode 100644 index 0000000000..eab3fb5224 --- /dev/null +++ b/translated/tech/20150921 Configure PXE Server In Ubuntu 14.04.md @@ -0,0 +1,251 @@ + + 在 Ubuntu 14.04 中配置 PXE 服务器 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/09/pxe-featured.jpg) + +PXE(Preboot Execution Environment--预启动执行环境)服务器允许用户从网络中启动 Linux 发行版并且可以同时在数百台 PC 中安装而不需要 Linux ISO 镜像。如果你客户端的计算机没有 CD/DVD 或USB 引导盘,或者如果你想在大型企业中同时安装多台计算机,那么 PXE 服务器可以帮你节省时间和金钱。 + +在这篇文章中,我们将告诉你如何在 Ubuntu 14.04 配置 PXE 服务器。 + +### 配置网络 ### + +开始前,你需要先设置 PXE 服务器使用静态 IP。在你的系统中要使用静态 IP 地址,需要编辑 “/etc/network/interfaces” 文件。 + +1. 打开 “/etc/network/interfaces” 文件. + + sudo nano /etc/network/interfaces + + 作如下修改: + + # 回环网络接口 + auto lo + iface lo inet loopback + # 主网络接口 + auto eth0 + iface eth0 inet static + address 192.168.1.20 + netmask 255.255.255.0 + gateway 192.168.1.1 + dns-nameservers 8.8.8.8 + +保存文件并退出。这将设置其 IP 地址为“192.168.1.20”。然后重新启动网络服务。 + + sudo /etc/init.d/networking restart + +### 安装 DHCP, TFTP 和 NFS: ### + +DHCP,TFTP 和 NFS 是 PXE 服务器的重要组成部分。首先,需要更新你的系统并安装所有需要的软件包。 + +为此,运行以下命令: + + sudo apt-get update + sudo apt-get install isc-dhcp-Server inetutils-inetd tftpd-hpa syslinux nfs-kernel-Server + +### 配置 DHCP 服务: ### + +DHCP 代表动态主机配置协议(Dynamic Host Configuration Protocol),并且它主要用于动态分配网络配置参数,如用于接口和服务的 IP 地址。在 PXE 环境中,DHCP 服务器允许客户端请求并自动获得一个 IP 地址来访问网络。 + +1. 编辑 “/etc/default/dhcp3-server” 文件. + + sudo nano /etc/default/dhcp3-server + + 作如下修改: + + INTERFACES="eth0" + +保存 (Ctrl + o) 并退出 (Ctrl + x) 文件. + +2. 编辑 “/etc/dhcp3/dhcpd.conf” 文件: + + sudo nano /etc/dhcp/dhcpd.conf + + 作如下修改: + + default-lease-time 600; + max-lease-time 7200; + subnet 192.168.1.0 netmask 255.255.255.0 { + range 192.168.1.21 192.168.1.240; + option subnet-mask 255.255.255.0; + option routers 192.168.1.20; + option broadcast-address 192.168.1.255; + filename "pxelinux.0"; + next-Server 192.168.1.20; + } + +保存文件并退出。 + +3. 启动 DHCP 服务. + + sudo /etc/init.d/isc-dhcp-server start + +### 配置 TFTP 服务器: ### + +TFTP 是一种文件传输协议,类似于 FTP。它不用进行用户认证也不能列出目录。TFTP 服务器总是监听网络上的 PXE 客户端。当它检测到网络中有 PXE 客户端请求 PXE 服务器时,它将提供包含引导菜单的网络数据包。 + +1. 配置 TFTP 时,需要编辑 “/etc/inetd.conf” 文件. + + sudo nano /etc/inetd.conf + + 作如下修改: + + tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot + + 保存文件并退出。 + +2. 编辑 “/etc/default/tftpd-hpa” 文件。 + + sudo nano /etc/default/tftpd-hpa + + 作如下修改: + + TFTP_USERNAME="tftp" + TFTP_DIRECTORY="/var/lib/tftpboot" + TFTP_ADDRESS="[:0.0.0.0:]:69" + TFTP_OPTIONS="--secure" + RUN_DAEMON="yes" + OPTIONS="-l -s /var/lib/tftpboot" + + 保存文件并退出。 + +3. 使用 `xinetd` 让 boot 服务在每次系统开机时自动启动,并启动tftpd服务。 + + sudo update-inetd --enable BOOT + sudo service tftpd-hpa start + +4. 检查状态。 + + sudo netstat -lu + +它将如下所示: + + Proto Recv-Q Send-Q Local Address Foreign Address State + udp 0 0 *:tftp *:* + +### 配置 PXE 启动文件 ### + +现在,你需要将 PXE 引导文件 “pxelinux.0” 放在 TFTP 根目录下。为 TFTP 创建一个目录,并复制 syslinux 在 “/usr/lib/syslinux/” 下提供的所有引导程序文件到 “/var/lib/tftpboot/” 下,操作如下: + + sudo mkdir /var/lib/tftpboot + sudo mkdir /var/lib/tftpboot/pxelinux.cfg + sudo mkdir -p /var/lib/tftpboot/Ubuntu/14.04/amd64/ + sudo cp /usr/lib/syslinux/vesamenu.c32 /var/lib/tftpboot/ + sudo cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/ + +#### 设置 PXELINUX 配置文件 #### + +PXE 配置文件定义了 PXE 客户端启动时显示的菜单,它能引导并与 TFTP 服务器关联。默认情况下,当一个 PXE 客户端启动时,它会使用自己的 MAC 地址指定要读取的配置文件,所以我们需要创建一个包含可引导内核列表的默认文件。 + +编辑 PXE 服务器配置文件使用可用的安装选项。. + +编辑 “/var/lib/tftpboot/pxelinux.cfg/default,” + + sudo nano /var/lib/tftpboot/pxelinux.cfg/default + + 作如下修改: + + DEFAULT vesamenu.c32 + TIMEOUT 100 + PROMPT 0 + MENU INCLUDE pxelinux.cfg/PXE.conf + NOESCAPE 1 + LABEL Try Ubuntu 14.04 Desktop + MENU LABEL Try Ubuntu 14.04 Desktop + kernel Ubuntu/vmlinuz + append boot=casper netboot=nfs nfsroot=192.168.1.20:/var/lib/tftpboot/Ubuntu/14.04/amd64 + initrd=Ubuntu/initrd.lz quiet splash + ENDTEXT + LABEL Install Ubuntu 14.04 Desktop + MENU LABEL Install Ubuntu 14.04 Desktop + kernel Ubuntu/vmlinuz + append boot=casper automatic-ubiquity netboot=nfs nfsroot=192.168.1.20:/var/lib/tftpboot/Ubuntu/14.04/amd64 + initrd=Ubuntu/initrd.lz quiet splash + ENDTEXT + +保存文件并退出。 + +编辑 “/var/lib/tftpboot/pxelinux.cfg/pxe.conf” 文件。 + + sudo nano /var/lib/tftpboot/pxelinux.cfg/pxe.conf + +作如下修改: + + MENU TITLE PXE Server + NOESCAPE 1 + ALLOWOPTIONS 1 + PROMPT 0 + MENU WIDTH 80 + MENU ROWS 14 + MENU TABMSGROW 24 + MENU MARGIN 10 + MENU COLOR border 30;44 #ffffffff #00000000 std + +保存文件并退出。 + +### 为 PXE 服务器添加 Ubuntu 14.04 桌面启动镜像 ### + +对于这一步,Ubuntu 内核和 initrd 文件是必需的。要获得这些文件,你需要 Ubuntu 14.04 桌面 ISO 镜像。你可以通过以下命令下载 Ubuntu 14.04 ISO 镜像到 /mnt 目录: + + sudo cd /mnt + sudo wget http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso + +**注意**: 下载用的 URL 可能会改变,因为 ISO 镜像会进行更新。如果上面的网址无法访问,看看这个网站,了解最新的下载链接。 + +挂载 ISO 文件,使用以下命令将所有文件复制到 TFTP文件夹中: + + sudo mount -o loop /mnt/ubuntu-14.04.3-desktop-amd64.iso /media/ + sudo cp -r /media/* /var/lib/tftpboot/Ubuntu/14.04/amd64/ + sudo cp -r /media/.disk /var/lib/tftpboot/Ubuntu/14.04/amd64/ + sudo cp /media/casper/initrd.lz /media/casper/vmlinuz /var/lib/tftpboot/Ubuntu/ + +### 将导出的 ISO 目录配置到 NFS 服务器上 ### + +现在,你需要通过 NFS 协议安装源镜像。你还可以使用 HTTP 和 FTP 来安装源镜像。在这里,我已经使用 NFS 导出 ISO 内容。 + +要配置 NFS 服务器,你需要编辑 “etc/exports” 文件。 + + sudo nano /etc/exports + +作如下修改: + + /var/lib/tftpboot/Ubuntu/14.04/amd64 *(ro,async,no_root_squash,no_subtree_check) + +保存文件并退出。为使更改生效,启动 NFS 服务。 + + sudo exportfs -a + sudo /etc/init.d/nfs-kernel-server start + +现在,你的 PXE 服务器已经准备就绪。 + +### 配置网络引导 PXE 客户端 ### + +PXE 客户端可以被任何具备 PXE 网络引导的系统来启用。现在,你的客户端可以启动并安装 Ubuntu 14.04 桌面,需要在系统的 BIOS 中设置 “Boot From Network” 选项。 + +现在你可以去做 - 用网络引导启动你的 PXE 客户端计算机,你现在应该看到一个子菜单,显示了我们创建的 Ubuntu 14.04 桌面。 + +![pxe](https://www.maketecheasier.com/assets/uploads/2015/09/pxe.png) + +### 结论 ### + +配置使用 PXE 服务器从网络启动安装能提高效率和节省时间。你可以在本地网络中同时安装数百个客户端。所有你需要的只是一个 PXE 服务器和能启动 PXE 的客户端。试试吧,如果这个对你有用请让我们知道。 + + +参考: +- [PXE Server wiki][1] +- [PXE Server Ubuntu][2] + +图片来源: [fupsol_unl_20][3] + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/configure-pxe-server-ubuntu/ + +作者:[Hitesh Jethva][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/hiteshjethva/ +[1]:https://en.wikipedia.org/wiki/Preboot_Execution_Environment +[2]:https://help.ubuntu.com/community/PXEInstallServer +[3]:https://www.flickr.com/photos/jhcalderon/3681926417/ From 41b4a9c58009b81645a7b99dda32e9c80e29ac5f Mon Sep 17 00:00:00 2001 From: Ezio Date: Tue, 22 Sep 2015 17:20:02 +0800 Subject: [PATCH 2141/2517] =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E8=BF=87=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 102 ------------------ 1 file changed, 102 deletions(-) delete mode 100644 sources/tech/20150921 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md diff --git a/sources/tech/20150921 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/sources/tech/20150921 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md deleted file mode 100644 index 897550432b..0000000000 --- a/sources/tech/20150921 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md +++ /dev/null @@ -1,102 +0,0 @@ -How to Setup Node JS v4.0.0 on Ubuntu 14.04 / 15.04 -================================================================================ -Hi everyone, Node.JS Version 4.0.0 has been out, the popular server-side JavaScript platform has combines the Node.js and io.js code bases. This release represents the combined efforts encapsulated in both the Node.js project and the io.js project that are now combined in a single codebase. The most important change is this Node.js is ships with version 4.5 of Google's V8 JavaScript engine, which is the same version that ships with the current Chrome browser. So, being able to more closely track V8’s releases means Node.js runs JavaScript faster, more securely, and with the ability to use many desirable ES6 language features. - -![Node JS](http://blog.linoxide.com/wp-content/uploads/2015/09/nodejs.png) - -Node.js 4.0.0 aims to provide an easy update path for current users of io.js and node as there are no major API changes. Let’s see how you can easily get it installed and setup on Ubuntu server by following this simple article. - -### Basic System Setup ### - -Node works perfectly on Linux, Macintosh, and Solaris operating systems and among the Linux operating systems it has the best results using Ubuntu OS. That's why we are to setup it Ubuntu 15.04 while the same steps can be followed using Ubuntu 14.04. - -**1) System Resources** - -The basic system resources for Node depend upon the size of your infrastructure requirements. So, here in this tutorial we will setup Node with 1 GB RAM, 1 GHz Processor and 10 GB of available disk space with minimal installation packages installed on the server that is no web or database server packages are installed. - -**2) System Update** - -It always been recommended to keep your system upto date with latest patches and updates, so before we move to the installation on Node, let's login to your server with super user privileges and run update command. - - # apt-get update - -**3) Installing Dependencies** - -Node JS only requires some basic system and software utilities to be present on your server, for its successful installation like 'make' 'gcc' and 'wget'. Let's run the below command to get them installed if they are not already present. - - # apt-get install python gcc make g++ wget - -### Download Latest Node JS v4.0.0 ### - -Let's download the latest Node JS version 4.0.0 by following this link of [Node JS Download Page][1]. - -![](http://blog.linoxide.com/wp-content/uploads/2015/09/download.png) - -We will copy the link location of its latest package and download it using 'wget' command as shown. - - # wget https://nodejs.org/download/rc/v4.0.0-rc.1/node-v4.0.0-rc.1.tar.gz - -Once download completes, unpack using 'tar' command as shown. - - # tar -zxvf node-v4.0.0-rc.1.tar.gz - -![](http://blog.linoxide.com/wp-content/uploads/2015/09/wget.png) - -### Installing Node JS v4.0.0 ### - -Now we have to start the installation of Node JS from its downloaded source code. So, change your directory and configure the source code by running its configuration script before compiling it on your ubuntu server. - - root@ubuntu-15:~/node-v4.0.0-rc.1# ./configure - -![](http://blog.linoxide.com/wp-content/uploads/2015/09/configure.png) - -Now run the 'make install' command to compile the Node JS installation package as shown. - - root@ubuntu-15:~/node-v4.0.0-rc.1# make install - -The make command will take a couple of minutes while compiling its binaries so after executinf above command, wait for a while and keep calm. - -### Testing Node JS Installation ### - -Once the compilation process is complete, we will test it if every thing went fine. Let's run the following command to confirm the installed version of Node JS. - - root@ubuntu-15:~# node -v - v4.0.0-pre - -By executing 'node' without any arguments from the command-line you will be dropped into the REPL (Read-Eval-Print-Loop) that has simplistic emacs line-editing where you can interactively run JavaScript and see the results. - -![](http://blog.linoxide.com/wp-content/uploads/2015/09/node.png) - -### Writing Test Program ### - -We can also try out a very simple console program to test the successful installation and proper working of Node JS. To do so we will create a file named "test.js" and write the following code into it and save the changes made in the file as shown. - - root@ubuntu-15:~# vim test.js - var util = require("util"); - console.log("Hello! This is a Node Test Program"); - :wq! - -Now in order to run the above program, from the command prompt run the below command. - - root@ubuntu-15:~# node test.js - -![](http://blog.linoxide.com/wp-content/uploads/2015/09/node-test.png) - -So, upon successful installation we will get the output as shown in the screen, where as in the above program it loads the "util" class into a variable "util" and then uses the "util" object to perform the console tasks. While the console.log is a command similar to the cout in C++. - -### Conclusion ### - -That’s it. Hope this gives you a good idea of Node.js going with Node.js on Ubuntu. If you are new to developing applications with Node.js. After all we can say that we can expect significant performance gains with Node JS Version 4.0.0. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/setup-node-js-4-0-ubuntu-14-04-15-04/ - -作者:[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/ -[1]:https://nodejs.org/download/rc/v4.0.0-rc.1/ \ No newline at end of file From 4f33e9ff6741a806653e4a0f94d6bba2c00cd247 Mon Sep 17 00:00:00 2001 From: ezio Date: Tue, 22 Sep 2015 17:20:56 +0800 Subject: [PATCH 2142/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md b/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md index 5b4ad2251f..3e225ac866 100644 --- a/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md +++ b/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md @@ -1,3 +1,5 @@ +- translating by Ezio + Linux 4.3 Kernel To Add The MOST Driver Subsystem ================================================================================ While the [Linux 4.2][1] kernel hasn't been officially released yet, Greg Kroah-Hartman sent in early his pull requests for the various subsystems he maintains for the Linux 4.3 merge window. From b267e288b9f79b36298a0459f39e996b1f15e6b2 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 22 Sep 2015 21:55:38 +0800 Subject: [PATCH 2143/2517] PUB:20150818 Docker Working on Security Components Live Container Migration @bazz2 --- ...curity Components Live Container Migration.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/talk => published}/20150818 Docker Working on Security Components Live Container Migration.md (77%) diff --git a/translated/talk/20150818 Docker Working on Security Components Live Container Migration.md b/published/20150818 Docker Working on Security Components Live Container Migration.md similarity index 77% rename from translated/talk/20150818 Docker Working on Security Components Live Container Migration.md rename to published/20150818 Docker Working on Security Components Live Container Migration.md index bd3f0451c7..2e60571b52 100644 --- a/translated/talk/20150818 Docker Working on Security Components Live Container Migration.md +++ b/published/20150818 Docker Working on Security Components Live Container Migration.md @@ -1,16 +1,16 @@ -Docker Working on Security Components, Live Container Migration +Docker 在安全组件、实时容器迁移方面的进展 ================================================================================ ![Docker Container Talk](http://www.eweek.com/imagesvr_ce/1905/290x195DockerMarianna.jpg) -**Docker 开发者在 Containercon 上的演讲,谈论将来的容器在安全和实时迁移方面的创新** +**这是 Docker 开发者在 Containercon 上的演讲,谈论将来的容器在安全和实时迁移方面的创新** 来自西雅图的消息。当前 IT 界最热的词汇是“容器”,美国有两大研讨会:Linuxcon USA 和 Containercon,后者就是为容器而生的。 Docker 公司是开源 Docker 项目的商业赞助商,本次研讨会这家公司有 3 位高管带来主题演讲,但公司创始人 Solomon Hykes 没上场演讲。 -Hykes 曾在 2014 年的 Linuxcon 上进行过一次主题演讲,但今年的 Containeron 他只坐在观众席上。而工程部高级副总裁 Marianna Tessel、Docker 首席安全员 Diogo Monica 和核心维护员 Michael Crosby 为我们演讲 Docker 新增的功能和将来会有的功能。 +Hykes 曾在 2014 年的 Linuxcon 上进行过一次主题演讲,但今年的 Containeron 他只坐在观众席上。而工程部高级副总裁 Marianna Tessel、Docker 首席安全官 Diogo Monica 和核心维护员 Michael Crosby 为我们演讲 Docker 新增的功能和将来会有的功能。 -Tessel 强调 Docker 现在已经被很多世界上最大的组织用在生产环境中,包括美国政府。Docker 也被用在小环境中,比如树莓派,一块树莓派上可以跑 2300 个容器。 +Tessel 强调 Docker 现在已经被很多世界上大型组织用在生产环境中,包括美国政府。Docker 也被用在小环境中,比如树莓派,一块树莓派上可以跑 2300 个容器。 “Docker 的功能正在变得越来越强大,而部署方法变得越来越简单。”Tessel 在会上说道。 @@ -18,9 +18,9 @@ Tessel 把 Docker 形容成一艘游轮,内部由强大而复杂的机器驱 Docker 试图解决的领域是简化安全配置。Tessel 认为对于大多数用户和组织来说,避免网络漏洞所涉及的安全问题是一个乏味而且复杂的过程。 -于是 Docker Content Trust 就出现在 Docker 1.8 release 版本中了。安全项目领导 Diogo Mónica 中加入 Tessel 上台讨论,说安全是一个难题,而 Docker Content Trust 就是为解决这个难道而存在的。 +于是 Docker Content Trust 就出现在 Docker 1.8 release 版本中了。安全项目领导 Diogo Mónica 中加入了 Tessel 的台上讨论,说安全是一个难题,而 Docker Content Trust 就是为解决这个难道而存在的。 -Docker Content Trusst 提供一种方法来验证一个 Docker 应用是否可信,以及多种方法来限制欺骗和病毒注入。 +Docker Content Trust 提供一种方法来验证一个 Docker 应用是否可信,以及多种方法来限制欺骗和病毒注入。 为了证明他的观点,Monica 做了个现场示范,演示 Content Trust 的效果。在一个实验中,一个网站在更新过程中其 Web App 被人为攻破,而当 Content Trust 启动后,这个黑客行为再也无法得逞。 @@ -32,7 +32,7 @@ Docker 首席维护员 Micheal Crosby 在台上做了个实时迁移的演示, 一个容器也可以克隆到另一个地方,Crosby 将他的克隆容器称为“多利”,就是世界上第一只被克隆出来的羊的名字。 -Tessel 也花了点时间聊了下 RunC 组件,这是个正在被 Open Container Initiative 作为多方开发的项目,目的是让窗口兼容 Linux、Windows 和 Solaris。 +Tessel 也花了点时间聊了下 RunC 组件,这是个正在被 Open Container Initiative 作为多方开发的项目,目的是让它可以从 Linux 扩展到包括 Windows 和 Solaris 在内的多种操作系统。 Tessel 总结说她不知道 Docker 的未来是什么样,但对此抱非常乐观的态度。 @@ -46,7 +46,7 @@ via: http://www.eweek.com/virtualization/docker-working-on-security-components-l 作者:[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 7ec5a135a47427bfaf2b1618e8d53f941639d12c Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 22 Sep 2015 22:29:38 +0800 Subject: [PATCH 2144/2517] PUB:20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China @geekpi --- ...OS Runs 42 Percent of Dell PCs in China.md | 38 +++++++++++++++++ ...OS Runs 42 Percent of Dell PCs in China.md | 41 ------------------- 2 files changed, 38 insertions(+), 41 deletions(-) create mode 100644 published/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md delete mode 100644 translated/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md diff --git a/published/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md b/published/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md new file mode 100644 index 0000000000..6364017ac7 --- /dev/null +++ b/published/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md @@ -0,0 +1,38 @@ +Ubuntu 开源操作系统运行在中国 42% 的 Dell PC 上 +================================================================================ + +> Dell 称它在中国市场出售的 42% 的 PC 运行的是 Kylin,这是一款 Canonical 帮助开发的基于 Ubuntu 的操作系统。 + +让开源粉丝欢喜的是:Linux 桌面年来了。或者说中国正在接近这个目标,[Dell][1] 报告称它售卖的超过 40% 的 PC 机运行的是 [Canonical][3] 帮助开发的 [Ubuntu Linux][2]。 + +特别地,Dell 称 42% 的中国电脑运行 NeoKylin(中标麒麟),一款中国本土倾力打造的用于替代 [Microsoft][4] Windows的操作系统。它也简称麒麟,这是一款从 2013 年出来的基于 Ubuntu 的操作系统,也是这年开始 Canonical 公司与中国政府合作建立一个专供中国市场的 Ubuntu 变种。 + +麒麟的早期版本出现于 2001 年左右,也是基于其他操作系统,包括 FreeBSD,这是一个开放源码但是不同于 Linux 的类 Unix 操作系统。 + +Ubuntu 麒麟的外观和感觉很像 Ubuntu 的现代版本。它拥有的 [Unity][5] 界面,并运行开源软件的标准套件,以及专门的如 Youker 助理程序,它是一个图形化的前端,帮助用户管理基本计算任务。但是麒麟的默认主题使得它看起来有点像 Windows 而不是 Ubuntu。 + + 鉴于桌面 Linux PC 市场在世界上大多数国家的相对停滞,戴尔的宣布是令人吃惊的。结合中国对当前版本 windows 的轻微[敌意][6],这个消息并不看好着微软在中国市场的前景。 + +紧跟着 Dell 公司[宣布][7]在华投资1.25亿美元之后,一位决策者给华尔街杂志的评论中提到了 Dell 在中国市场上 PC 的销售。 + + ![Ubuntu Kylin](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/09/hey_2.png) + + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/091515/ubuntu-linux-based-open-source-os-runs-42-percent-dell-pc + +作者:[Christopher Tozzi][a] +译者:[geekpi](https://github.com/geeekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:http://dell.com/ +[2]:http://ubuntu.com/ +[3]:http://canonical.com/ +[4]:http://microsoft.com/ +[5]:http://unity.ubuntu.com/ +[6]:http://www.wsj.com/articles/windows-8-faces-new-criticism-in-china-1401882772 +[7]:http://thevarguy.com/business-technology-solution-sales/091415/dell-125-million-directed-china-jobs-new-business-and-innovation diff --git a/translated/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md b/translated/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md deleted file mode 100644 index eea7af0368..0000000000 --- a/translated/talk/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md +++ /dev/null @@ -1,41 +0,0 @@ -基于Linux的Ubuntu开源操作系统在中国42%的Dell PC上运行 -================================================================================ -> Dell称它在中国市场出售的42%的PC运行的是Kylin,一款Canonical帮助创建的基于Ubuntu的操作系统。 - - 让开源粉丝欢喜的是:Linux桌面年来了。或者说中国正在接近这个目标,[Dell][1]报告称超过40%售卖的PC机运行的是 [Canonical][3]帮助开发的[Ubuntu Linux][2]。 - - 特别地,Dell称42%的中国电脑运行NeoKylin,一款中国本土倾力打造的用于替代[Microsoft][4] (MSFT) Windows的操作系统。它也简称麒麟,一款从2013年出来的基于Ubuntu的操作系统,也是这年开始Canonical公司与中国政府合作来建立一个专为中国市场Ubuntu变种。 - - 2001年左右早期版本的麒麟,都是基于其他操作系统,包括FreeBSD,一个开放源码的区别于Linux的类Unix操作系统。 - - Ubuntu的麒麟的外观和感觉很像Ubuntu的现代版本。它拥有的[Unity][5]界面,并运行标准开源套件,以及专门的如Youker助理程序,它是一个图形化的前端,帮助用户管理的基本计算任务。但是麒麟的默认主题使得它看起来有点像Windows而不是Ubuntu。 - - 鉴于桌面Linux PC市场在世界上大多数国家的相对停滞,戴尔的宣布是惊人的。并结合中国对现代windows的轻微[敌意][6],这个消息并不预示着微软在中国市场的前景。 - - 在Dell公司[宣布][7]在华投资1.25亿美元很快之后一位行政官给华尔街杂志的评论中提到了Dell在中国市场上PC的销售。 - ![Ubuntu Kylin](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/09/hey_2.png) - - - - - - - --------------------------------------------------------------------------------- - -via: http://thevarguy.com/open-source-application-software-companies/091515/ubuntu-linux-based-open-source-os-runs-42-percent-dell-pc - -作者:[Christopher Tozzi][a] -译者:[geekpi](https://github.com/geeekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://thevarguy.com/author/christopher-tozzi -[1]:http://dell.com/ -[2]:http://ubuntu.com/ -[3]:http://canonical.com/ -[4]:http://microsoft.com/ -[5]:http://unity.ubuntu.com/ -[6]:http://www.wsj.com/articles/windows-8-faces-new-criticism-in-china-1401882772 -[7]:http://thevarguy.com/business-technology-solution-sales/091415/dell-125-million-directed-china-jobs-new-business-and-innovation From 8a1c46c23d8cd30c32183951741a4d34f468b271 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 23 Sep 2015 16:44:40 +0800 Subject: [PATCH 2145/2517] =?UTF-8?q?20150923-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e--Minimal Icon Theme For Linux Desktop.md | 86 +++++++++ ...mistic on OpenStack Revenue Opportunity.md | 37 ++++ ...o Upgrade From Oracle 11g To Oracle 12c.md | 165 ++++++++++++++++++ 3 files changed, 288 insertions(+) create mode 100644 sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md create mode 100644 sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md create mode 100644 sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md diff --git a/sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md b/sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md new file mode 100644 index 0000000000..532004d419 --- /dev/null +++ b/sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md @@ -0,0 +1,86 @@ +Xenlism WildFire: Minimal Icon Theme For Linux Desktop +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icon-theme-linux-3.png) + +It’s been some time that I covered an icon theme on It’s FOSS. Perhaps because no theme caught my eyes in recent times. There are a few which I consider the [best icon themes for Ubuntu][1] but these are mostly the known ones like Numix and Moka and I am pretty content using Numix. + +But a few days back I came across this [Xenslim WildFire][2] and I must say, it looks damn good. Minimalism is the current popular trend in the design world and Xenlism perfects it. Smooth and tranquil, Xenlism is inspired by Nokia’s meego and Apple iOS icon. + +Have a look at some of its icons for various applications: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons.png) + +Folder icons look like: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons-1.png) + +Theme developer, [Nattapong Pullkhow][3], claims that the icon theme is best suited for GNOME but it should work fine with Unity, KDE and Mate as well. + +### Install Xenlism Wildfire icon theme ### + +Xenlism Theme is around 230 MB in download size which is slightly heavy for an icon theme but considering that it has support for a huge number of applications, the size should not be surprising. + +#### Installing in Ubuntu/Debian based Linux distributions #### + +To install it in Ubuntu variants, use the command below in a terminal to add the GPG key: + + sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 90127F5B + +After adding the key, use the following commands: + + echo "deb http://downloads.sourceforge.net/project/xenlism-wildfire/repo deb/" | sudo tee -a /etc/apt/sources.list + sudo apt-get update + sudo apt-get install xenlism-wildfire-icon-theme + +In addition to the icon theme, you can download a matching minimal wallpaper as well: + + sudo apt-get install xenlism-artwork-wallpapers + +#### Installing in Arch based Linux distributions #### + +You’ll have to edit the Pacman repository. In a terminal, use the following command: + + sudo nano /etc/pacman.conf + +Add the following section to this configuration file: + + [xenlism-arch] + SigLevel = Never + Server = http://downloads.sourceforge.net/project/xenlism-wildfire/repo/arch + +Update the system and install icon theme and wallpapers as following: + + sudo pacman -Syyu + sudo pacman -S xenlism-wildfire + +#### Using Xenlism icon theme #### + +In Ubuntu Unity, [use Unity Tweak Tool to change the icon theme][4]. In GNOME, [use Gnome Tweak Tool to change the theme][5]. I presume that you know how to do this part, but if you are stuck let me know and I’ll add some screenshots. + +Below is a screenshot of Xenlism icon theme in use in Ubuntu 15.04 Unity. Xenlism desktop wallpaper is in the background. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons-2.png) + +It looks good, isn’t it? If you try it and like it, feel free to thank the developer: + +> [Xenlism is a stunning minimal icon theme for Linux. Thanks @xenatt for this beautiful theme.][6] + +I hope you like it. Do share your views on this icon theme or your preferred icon theme. Is Xenlism good enough to change your favorite icon theme? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/xenlism-wildfire-theme/ + +作者:[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://itsfoss.com/best-icon-themes-ubuntu-1404/ +[2]:http://xenlism.github.io/wildfire/ +[3]:https://plus.google.com/+NattapongPullkhow +[4]:http://itsfoss.com/install-numix-ubuntu/ +[5]:http://itsfoss.com/install-switch-themes-gnome-shell/ +[6]:https://twitter.com/share?text=Xenlism+is+a+stunning+minimal+icon+theme+for+Linux.+Thanks+%40xenatt+for+this+beautiful+theme.&via=itsfoss&related=itsfoss&url=http://itsfoss.com/xenlism-wildfire-theme/ \ No newline at end of file diff --git a/sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md b/sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md new file mode 100644 index 0000000000..d176ed8d77 --- /dev/null +++ b/sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md @@ -0,0 +1,37 @@ +Red Hat CEO Optimistic on OpenStack Revenue Opportunity +================================================================================ +Red Hat continues to accelerate its growth thanks to an evolving mix of platform and infrastructure technology revolving around Linux and the cloud. Red Hat announced its second quarter fiscal 2016 financial results on September 21, once again exceeding expectations. + +![](http://www.serverwatch.com/imagesvr_ce/1212/icon-redhatcloud-r.jpg) + +For the quarter, Red Hat reported revenue of $504 million for a 13 percent year-over-year gain. Net Income was reported at $51 million, up from $47 Red Hatmillion in the second quarter of fiscal 2015. Looking forward, Red Hat provided some aggressive guidance for the coming quarter and the full year. For the third quarter, Red Hat provided guidance for revenue to be in the range of $519 million to $523 million, which is a 15 percent year-over-year gain. + +On a full year basis, Red Hat's full year guidance is for fiscal 2016 revenue of $2.044 billion, for a 14 percent year-over-year gain. + +Red Hat CFO Frank Calderoni commented during the earnings call that all of Red Hat's top 30 largest deals were approximately $1 million or more. He noted that Red Hat had four deals that were in excess of $5 million and one deal that was well over $10 million. As has been the case in recent years, cross selling across Red Hat products is strong with 65 percent of all deals including one or more components from Red Hat's group of application development and emerging technologies offerings. + +"We expect the growing adoption of these technologies, like Middleware, the RHEL OpenStack platform, OpenShift, cloud management and storage, to continue to drive revenue growth," Calderoni said. + +### OpenStack ### + +During the earnings call, Red Hat CEO Jim Whitehurst was repeatedly asked about the revenue prospects for OpenStack. Whitehurst said that the recently released Red Hat OpenStack Platform 7.0 is a big jump forward thanks to the improved installer. + +"It does a really good job of kind of identifying hardware and lighting it up," Whitehurst said. "Of course, that means there's a lot of work to do around certifying that hardware, making sure it lights up appropriately." + +Whitehurst said that he's starting to see a lot more production application start to move to the OpenStack cloud. He cautioned however that it's still largely the early adopters moving to OpenStack in production and it isn't quite mainstream, yet. + +From a competitive perspective, Whitehurst talked specifically about Microsoft, HP and Mirantis. In Whitehurst's view many organizations will continue to use multiple operating systems and if they choose Microsoft for one part, they are more likely to choose an open-source option,as the alternative option. Whitehurst said he doesn't see a lot of head-to-head competition against HP in cloud, but he does see Mirantis. + +"We've had several wins or people who were moving away from Mirantis to RHEL," Whitehurst said. + +-------------------------------------------------------------------------------- + +via: http://www.serverwatch.com/server-news/red-hat-ceo-optimistic-on-openstack-revenue-opportunity.html + +作者:[Sean Michael Kerner][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.serverwatch.com/author/Sean-Michael-Kerner-101580.htm \ No newline at end of file diff --git a/sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md b/sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md new file mode 100644 index 0000000000..103f3922a5 --- /dev/null +++ b/sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md @@ -0,0 +1,165 @@ +How To Upgrade From Oracle 11g To Oracle 12c +================================================================================ +Hello all. + +Today we will go through how to upgrade from oracle 11g to Oracle 12c. Let’s start then. + +For this, I will use CentOS 7 64 bit Linux distribution. + +I am assuming that you have already installed Oracle 11g on your system. Here I will show what I did when I installed Oracle 11g. + +I select “Create and configure a database” for Oracle 11g just like below image. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage1.png) + +Then I select “Desktop Class” for my Oracle 11g installation. For production you must select “Server Class”. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage2.png) + +Then you must enter all the paths for the Oracle 11g and your password as well. Below is mine for my Oracle 11g installation. Make sure you meet the Oracle password methodology for placing your password. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage3.png) + +Next, I set Inventory Directory path as below. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage4.png) + +Till now, I showed you what I had done to install Oracle 11g as we are going to upgrade to 12c. + +Let’s upgrade to Oracle 12c from Oracle 11g. + +You must download the two (2) zip files from this [link][1]. Download and unzip both files to the same directory. Files names are **linuxamd64_12c_database_1of2.zip** & **linuxamd64_12c_database_2of2.zip** respectively. After extracting or unzipping, It will create a folder called database. + +Note: Before upgrading to 12c, make sure you have all the necessary packages installed for your CentOS and all the path variable are OK and all other prerequisites are done before beginning. + +These are the following packages must be installed with correct version + +- binutils +- compat-libstdc++ +- gcc +- glibc +- libaio +- libgcc +- libstdc++ +- make +- sysstat +- unixodbc + +Search for your correct rpm version on the internet. + +You can also combine a query for multiple packages, and review the output for the correct versions. For example: + +Type the following command to check in the terminal + + rpm -q binutils compat-libstdc++ gcc glibc libaio libgcc libstdc++ make sysstat unixodbc + +The following packages (or later or earlier versions) must be installed on your system + +- binutils-2.23.52.0.1-12.el7.x86_64 +- compat-libcap1-1.10-3.el7.x86_64 +- gcc-4.8.2-3.el7.x86_64 +- gcc-c++-4.8.2-3.el7.x86_64 +- glibc-2.17-36.el7.i686 +- glibc-2.17-36.el7.x86_64 +- glibc-devel-2.17-36.el7.i686 +- glibc-devel-2.17-36.el7.x86_64 +- ksh +- libaio-0.3.109-9.el7.i686 +- libaio-0.3.109-9.el7.x86_64 +- libaio-devel-0.3.109-9.el7.i686 +- libaio-devel-0.3.109-9.el7.x86_64 +- libgcc-4.8.2-3.el7.i686 +- libgcc-4.8.2-3.el7.x86_64 +- libstdc++-4.8.2-3.el7.i686 +- libstdc++-4.8.2-3.el7.x86_64 +- libstdc++-devel-4.8.2-3.el7.i686 +- libstdc++-devel-4.8.2-3.el7.x86_64 +- libXi-1.7.2-1.el7.i686 +- libXi-1.7.2-1.el7.x86_64 +- libXtst-1.2.2-1.el7.i686 +- libXtst-1.2.2-1.el7.x86_64 +- make-3.82-19.el7.x86_64 +- sysstat-10.1.5-1.el7.x86_64 + +You will also need unixODBC-2.3.1 or later driver. + +I hope you already have a user on your CentOS 7 named oracle when you installed Oracle 11g. + +Let’s login onto CentOS by using user oracle. + +After login to your CentOS by user oracle, open a terminal on your CentOS. + +Now change directory and navigate to your extracted directory where you extracted both the zip files by using terminal. Now type the following in the terminal to begin installation of 12c. + + ./runInstaller + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212image5.png) + +If everything goes right then you will see something like below which will start the installation process of 12c. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage6.png) + +Then you can skip the updates or you can download the latest update. It is recommended that you must update it for production server. Though I am skipping it. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage7.png) + +Now, select upgrade an existing database. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage8.png) + +For language, English is already there. Click next to continue or you can add according to your need. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage9.png) + +Now, select Enterprise Edition. You can select upon your requirements. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage10.png) + +Then select your path for Software location. This is pretty much self-explanatory. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage11.png) + +For step 7, keep moving with the default options just like below. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage12.png) + +In step 9, you will get a summary report like below image. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage13.png) + +If everything is fine, you can start your installation by clicking install on step 9 and which will take you to step 10. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage14.png) + +In the process you might encounter some errors and you need to Goggle it for fix those errors. There are a number of errors you may encounter and hence I am not covering those here. + +Keep your patience and it will show Succeeded one by one for step 10. If not, search it on Google and do necessary steps to fix it. Again, as there are a number of errors you may encounter and I can’t provide all the details over here. + +Now, configure the listener just simply following on screen instruction. + +After finishing the process for listener, it will start the Database Upgrade Assistant. Select Upgrade Oracle Database. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/DUAimage15.png) + +In step 2, you will find that it will show the 11g location path along with 12c location path. Also you will find that it is indicating Target Oracle Home Release 12 from Source Oracle Home Release 11. Click next step 2 and move to step 3. + +![](http://www.unixmen.com/wp-content/uploads/2015/09/DUAimage16.png) + +Follow the on screen instructions and finished it. + +In the last step, you will get a success window where you will find that the update of oracle database was successful. + +**A word of caution**: Before upgrading to 12c for your production server, please make sure you have done it some other workstation so that you can fix all the errors, which you will encounter on the way of upgrading. Never try upgrading a production server without knowing all the details. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/upgrade-from-oracle-11g-to-oracle-12c/ + +作者:[Mohammad Forhad Iftekher][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/forhad/ +[1]:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-linux-download-1959253.html \ No newline at end of file From 9af8dc42e82ac53153caa22b04d81003a9e17326 Mon Sep 17 00:00:00 2001 From: alim0x Date: Wed, 23 Sep 2015 20:37:05 +0800 Subject: [PATCH 2146/2517] [translating]19 - The history of Android --- .../The history of Android/19 - The history of Android.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/The history of Android/19 - The history of Android.md b/sources/talk/The history of Android/19 - The history of Android.md index 32841f5be9..4fff9d0e37 100644 --- a/sources/talk/The history of Android/19 - The history of Android.md +++ b/sources/talk/The history of Android/19 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x translating + The history of Android ================================================================================ ![Google Music Beta running on Gingerbread.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/device-2014-03-31-110613.png) @@ -68,4 +70,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor [1]:http://arstechnica.com/gadgets/2011/05/hands-on-grooving-on-the-go-with-impressive-google-music-beta/ [2]:http://cdn.arstechnica.net/wp-content/uploads/2014/02/32.png [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo From 1b7b9c857b65c92f3e742a09672310f18041276e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 24 Sep 2015 09:08:59 +0800 Subject: [PATCH 2147/2517] translating --- ...1 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md b/sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md index c3f9dc366d..5e0bb30e08 100644 --- a/sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md +++ b/sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md @@ -1,3 +1,5 @@ +translating----geekpi + How to Setup IonCube Loaders on Ubuntu 14.04 / 15.04 ================================================================================ IonCube Loaders is an encryption/decryption utility for PHP applications which assists in speeding up the pages that are served. It also protects your website's PHP code from being viewed and ran on unlicensed computers. Using ionCube encoded and secured PHP files requires a file called ionCube Loader to be installed on the web server and made available to PHP which is often required for a lot of PHP based applications. It handles the reading and execution of encoded files at run time. PHP can use the loader with one line added to a PHP configuration file that ‘php.ini’. @@ -86,4 +88,4 @@ via: http://linoxide.com/ubuntu-how-to/setup-ioncube-loaders-ubuntu-14-04-15-04/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/kashifs/ \ No newline at end of file +[a]:http://linoxide.com/author/kashifs/ From 33e2644eb8ff5391c207d72e05b70ce0903fd821 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 24 Sep 2015 09:56:47 +0800 Subject: [PATCH 2148/2517] translated --- ...onCube Loaders on Ubuntu 14.04 or 15.04.md | 91 ------------------- ...onCube Loaders on Ubuntu 14.04 or 15.04.md | 91 +++++++++++++++++++ 2 files changed, 91 insertions(+), 91 deletions(-) delete mode 100644 sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md create mode 100644 translated/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md diff --git a/sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md b/sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md deleted file mode 100644 index 5e0bb30e08..0000000000 --- a/sources/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md +++ /dev/null @@ -1,91 +0,0 @@ -translating----geekpi - -How to Setup IonCube Loaders on Ubuntu 14.04 / 15.04 -================================================================================ -IonCube Loaders is an encryption/decryption utility for PHP applications which assists in speeding up the pages that are served. It also protects your website's PHP code from being viewed and ran on unlicensed computers. Using ionCube encoded and secured PHP files requires a file called ionCube Loader to be installed on the web server and made available to PHP which is often required for a lot of PHP based applications. It handles the reading and execution of encoded files at run time. PHP can use the loader with one line added to a PHP configuration file that ‘php.ini’. - -### Prerequisites ### - -In this article we will setup the installation of Ioncube Loader on Ubuntu 14.04/15.04, so that it can be used in all PHP Modes. The only requirement for this tutorial is to have "php.ini" file exists in your system with LEMP stack installed on the server. - -### Download IonCube Loader ### - -Login to your ubuntu server to download the latest IonCube loader package according to your operating system architecture whether your are using a 32 Bit or 64 Bit OS. You can get its package by issuing the following command with super user privileges or root user. - - # wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz - -![download ioncube](http://blog.linoxide.com/wp-content/uploads/2015/09/download1.png) - -After Downloading unpack the archive into the "/usr/local/src/" folder by issuing the following command. - - # tar -zxvf ioncube_loaders_lin_x86-64.tar.gz -C /usr/local/src/ - -![extracting archive](http://blog.linoxide.com/wp-content/uploads/2015/09/2-extract.png) - -After extracting the archive, we can see the list of all modules present in it. But we needs only the relevant with the version of PHP installed on our system. - -To check your PHP version, you can run the below command to find the relevant modules. - - # php -v - -![ioncube modules](http://blog.linoxide.com/wp-content/uploads/2015/09/modules.png) - -With reference to the output of above command we came to know that the PHP version installed on the system is 5.6.4, so we need to copy the appropriate module to the PHP modules folder. - -To do so we will create a new folder with name "ioncube" within the "/usr/local/" directory and copy the required ioncube loader modules into it. - - root@ubuntu-15:/usr/local/src/ioncube# mkdir /usr/local/ioncube - root@ubuntu-15:/usr/local/src/ioncube# cp ioncube_loader_lin_5.6.so ioncube_loader_lin_5.6_ts.so /usr/local/ioncube/ - -### PHP Configuration ### - -Now we need to put the following line into the configuration file of PHP file "php.ini" which is located in "/etc/php5/cli/" folder then restart your web server’s services and php module. - - # vim /etc/php5/cli/php.ini - -![ioncube zend extension](http://blog.linoxide.com/wp-content/uploads/2015/09/zend-extension.png) - -In our scenario we have Nginx web server installed, so we will run the following commands to start its services. - - # service php5-fpm restart - # service nginx restart - -![web services](http://blog.linoxide.com/wp-content/uploads/2015/09/web-services.png) - -### Testing IonCube Loader ### - -To test the ioncube loader in the PHP configuration for your website, create a test file called "info.php" with the following content and place it into the web directory of your web server. - - # vim /usr/share/nginx/html/info.php - -Then save the changes after placing phpinfo script and access "info.php" in your browser with your domain name or server’s IP address after reloading the web server services. - -You will be able to see the below section at the bottom of your php modules information. - -![php info](http://blog.linoxide.com/wp-content/uploads/2015/09/php-info.png) - -From the terminal issue the following command to verify the php version that shows the ionCube PHP Loader is Enabled. - - # php -v - -![php ioncube loader](http://blog.linoxide.com/wp-content/uploads/2015/09/php-ioncube.png) - -The output shown in the PHP version's command clearly indicated that IonCube loader has been successfully integrated with PHP. - -### Conclusion ### - -At the end of this tutorial you learnt about the installation and configuration of ionCube Loader on Ubuntu with Nginx web server there will be no such difference if you are using any other web server. So, installing Loaders is simple when its done correctly, and on most servers its installation will work without a problem. However there is no such thing as a "standard PHP installation", and servers can be setup in many different ways, and with different features enabled or disabled. - -If you are on a shared server, then make sure that you have run the ioncube-loader-helper.php script, and click the link to test run time installation. If you still face as such issue while doing your setup, feel free to contact us and leave us a comment. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/setup-ioncube-loaders-ubuntu-14-04-15-04/ - -作者:[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/ diff --git a/translated/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md b/translated/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md new file mode 100644 index 0000000000..57652e7e44 --- /dev/null +++ b/translated/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md @@ -0,0 +1,91 @@ +如何在Ubuntu 14.04 / 15.04中设置IonCube Loaders +================================================================================ +IonCube Loaders是PHP中用于辅助加速页面的加解密工具。它保护你的PHP代码不会被在未授权的计算机上查看。使用ionCube编码并加密PHP需要一个叫ionCube Loader的文件安装在web服务器上并提供给需要大量访问的PHP用。它在运行时处理并执行编码。PHP只需在‘php.ini’中添加一行就可以使用这个loader。 + +### 前提条件 ### + +在这篇文章中,我们将在Ubuntu14.04/15.04安装Ioncube Loader ,以便它可以在所有PHP模式中使用。本教程的唯一要求就是你系统安装了LEMP,并有“的php.ini”文件。 + +### 下载 IonCube Loader ### + +根据你系统的架构是32位或者64位来下载最新的IonCube loader包。你可以用超级用户权限或者root用户运行下面的命令。 + + # wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz + +![download ioncube](http://blog.linoxide.com/wp-content/uploads/2015/09/download1.png) + +下载完成后用下面的命令解压到"/usr/local/src/"。 + + # tar -zxvf ioncube_loaders_lin_x86-64.tar.gz -C /usr/local/src/ + +![extracting archive](http://blog.linoxide.com/wp-content/uploads/2015/09/2-extract.png) + +解压完成后我们就可以看到所有的存在的模块。但是我们只需要我们安装的PHP版本的相关模块。 + +要检查PHP版本,你可以运行下面的命令来找出相关的模块。 + + # php -v + +![ioncube modules](http://blog.linoxide.com/wp-content/uploads/2015/09/modules.png) + +根据上面的命令我们知道我们安装的是PHP 5.6.4,因此我们需要拷贝合适的模块到PHP模块目录下。 + +首先我们在“/usr/local/”创建一个叫“ioncube”的目录并复制需要的ioncube loader到这里。 + + root@ubuntu-15:/usr/local/src/ioncube# mkdir /usr/local/ioncube + root@ubuntu-15:/usr/local/src/ioncube# cp ioncube_loader_lin_5.6.so ioncube_loader_lin_5.6_ts.so /usr/local/ioncube/ + +### PHP 配置 ### + +我们要在位于"/etc/php5/cli/"文件夹下的"php.ini"中加入下面的配置行并重启web服务和php模块。 + + # vim /etc/php5/cli/php.ini + +![ioncube zend extension](http://blog.linoxide.com/wp-content/uploads/2015/09/zend-extension.png) + +此时我们安装的是nginx,因此我们用下面的命令来重启服务。 + + # service php5-fpm restart + # service nginx restart + +![web services](http://blog.linoxide.com/wp-content/uploads/2015/09/web-services.png) + +### 测试 IonCube Loader ### + +要为我们的网站测试ioncube loader。用下面的内容创建一个"info.php"文件并放在网站的web目录下。 + + + # vim /usr/share/nginx/html/info.php + +加入phpinfo的脚本后重启web服务后用域名或者ip地址访问“info.php”。 + +你会在最下面的php模块信息里看到下面这段。 + +![php info](http://blog.linoxide.com/wp-content/uploads/2015/09/php-info.png) + +From the terminal issue the following command to verify the php version that shows the ionCube PHP Loader is Enabled. +在终端中运行下面的命令来验证php版本并显示PHP Loader已经启用了。 + + # php -v + +![php ioncube loader](http://blog.linoxide.com/wp-content/uploads/2015/09/php-ioncube.png) + +上面的php版本输出明显地显示了IonCube loader已经成功与PHP集成了。 + +### 总结 ### + +教程的最后你已经了解了在安装有nginx的Ubuntu中安装和配置ionCube Loader,如果你正在使用其他的web服务,这与其他服务没有明显的差别。因此做完这些安装Loader是很简单的,并且在大多数服务器上的安装都不会有问题。然而并没有一个所谓的“标准PHP安装”,服务可以通过许多方式安装,并启用或者禁用功能。 + +如果你是在共享服务器上,那么确保运行了ioncube-loader-helper.php脚本,并点击链接来测试运行时安装。如果安装时你仍然遇到了问题,欢迎联系我们及给我们留下评论。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-ioncube-loaders-ubuntu-14-04-15-04/ + +作者:[Kashif Siddique][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/kashifs/ From 8565e68b53aa44a41c29f7fa8b1c1d264ddc6153 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Thu, 24 Sep 2015 10:31:27 +0800 Subject: [PATCH 2149/2517] [Translated]20151007 Productivity Tools And Tips For Linux.md --- ...7 Productivity Tools And Tips For Linux.md | 79 ------------------- ...7 Productivity Tools And Tips For Linux.md | 77 ++++++++++++++++++ 2 files changed, 77 insertions(+), 79 deletions(-) delete mode 100644 sources/tech/20151007 Productivity Tools And Tips For Linux.md create mode 100644 translated/tech/20151007 Productivity Tools And Tips For Linux.md diff --git a/sources/tech/20151007 Productivity Tools And Tips For Linux.md b/sources/tech/20151007 Productivity Tools And Tips For Linux.md deleted file mode 100644 index 2434669710..0000000000 --- a/sources/tech/20151007 Productivity Tools And Tips For Linux.md +++ /dev/null @@ -1,79 +0,0 @@ -Translating by GOLinux! -Productivity Tools And Tips For Linux -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Productivity-Tips-Linux.jpg) - -Since productivity in itself is a subjective term, I am not going into the details of what “productivity” I am talking about here. I am going to show you some tools and tips that could help you to focus better, be efficient and save time while working in Linux. - -### Productivity tools and tips for Linux ### - -Again, I am using Ubuntu at the time of writing this article. But the productivity tools and tips I am going to show you here should be applicable to most of the Linux distributions out there. - -#### Ambient Music #### - -[Music impacts productivity][2]. It is an open secret. From psychologists to management gurus, all have been advising to use ambient noise to feel relaxed and concentrate on your work. I am not going to argue with it because it works for me. I put my headphones on and listening to the birds chirping and wind blows indeed helps me in relaxing. - -In Linux, I use ANoise player for ambient noise player. Thanks to the official PPA provided, you can easily [install Ambient Noise player in Ubuntu][2] and other Ubuntu based Linux distributions. Installing it let’s you play the ambient music offline as well. - -Alternatively, you can always listen to ambient noise online. My favorite website for online ambient music is [Noisli][3]. Do give it a try. - -#### Task management app #### - -A good productive habit is to keep a to-do list. And if you combine it with [Pomodoro Technique][4], it could work wonder. What I mean hear is that create a to-do list and if possible, assign those tasks a certain time. This will keep you on track with your planned tasks for the day. - -For this, I recommend [Go For It!][5] app. You can install it in all major Linux distributions and since it is based on [ToDo.txt][6], you can easily sync it with your smartphone as well. I have written a detailed guide on [how to use Go For It!][7]. - -Alternatively, you can use [Sticky Notes][8] or [Google Keep][9]. If you need something more like [Evernote][10] fan, you can use these [open source alternatives for Evernote][11]. - -#### Clipboard manager #### - -Ctrl+ C and Ctrl+V are the integral part of our daily computer life. Only problem is that these important actions don’t have memory (by default). Suppose you copied something important and then you accidentally copied something else, you’ll lose what you had before. - -A clipboard manager comes handy in such situation. It displays the history of things you have copied (to clipboard) recently. You can copy text back to clipboard from it. - -I prefer [Diodon clipboard manager][12] for this purpose. It is actively developed and is available in Ubuntu repositories. - -#### Recent notifications #### - -When you are busy with something else and a desktop notification blings and fades away, what do you do? You wish that you could see what was the notification about, isn’t it? Recent notification indicator does this job. It keeps a history of all recent notifications. This way, you would never miss the desktop notifications. - -You can read about [Recent Notification Indicator here][13]. - -#### Terminal Tips #### - -No, I am not going to show you all those Linux command tricks and shortcuts. That could make up an entire blog. I am going to show you couple of terminal hacks you could use to enhance your productivity. - - -- **Change** sudo **password timeout**: By default sudo commands require you to enter password after 15 minutes. This could be tiresome. You could actually change the default sudo password timeout. [This tutorial][14] shows you how to do that. -- **Get desktop notification for command completion**: It’s a common joke among IT guys that developers spend a lot of time waiting for programs to be compiled and it is not entirely true. But it does affect the productivity because while you wait for the programs to be compiled, you may end up doing something else and forget about the commands you had run in the terminal.A nicer way would be to get desktop notification when a command is completed. This way, you won’t be distracted for long and can go back to what you were supposed to be doing earlier. Read about [how to get desktop notification for command completion][15]. - -I know that this is not a comprehensive article about **increasing productivity**. But these little apps and tips may actually help you to get more out of your valuable time. - -Now it’s your turn. What programs or tips you use to be more productive in Linux? Something you want to share with the community? - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/productivity-tips-ubuntu/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://www.helpscout.net/blog/music-productivity/ -[2]:http://itsfoss.com/ambient-noise-music-player-ubuntu/ -[3]:http://www.noisli.com/ -[4]:https://en.wikipedia.org/wiki/Pomodoro_Technique -[5]:http://manuel-kehl.de/projects/go-for-it/ -[6]:http://todotxt.com/ -[7]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ -[8]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ -[9]:http://itsfoss.com/install-google-keep-ubuntu-1310/ -[10]:https://evernote.com/ -[11]:http://itsfoss.com/5-evernote-alternatives-linux/ -[12]:https://esite.ch/tag/diodon/ -[13]:http://itsfoss.com/7-best-indicator-applets-for-ubuntu-13-10/ -[14]:http://itsfoss.com/change-sudo-password-timeout-ubuntu/ -[15]:http://itsfoss.com/notification-terminal-command-completion-ubuntu/ diff --git a/translated/tech/20151007 Productivity Tools And Tips For Linux.md b/translated/tech/20151007 Productivity Tools And Tips For Linux.md new file mode 100644 index 0000000000..a3245013fa --- /dev/null +++ b/translated/tech/20151007 Productivity Tools And Tips For Linux.md @@ -0,0 +1,77 @@ +Linux产能工具及其使用技巧 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Productivity-Tips-Linux.jpg) + +由于生产力本身是一个主观术语,我不打算详细解释我这里要讲到的“生产力”是什么。我打算给你们展示一些工具及其使用技巧,希望这会帮助你在Linux中工作时能更专注、更高效,并且能节省时间。 + +### Linux产能工具及其使用技巧 ### + +再次说明,我在写下本文时正在使用的是Ubuntu。但是,我将要在这里展示给大家产能工具及其使用技巧却适用于外面的大多数Linux发行版。 + +#### 外界的音乐 #### + +[音乐影响生产力][1],这已经是一个公开的秘密了。从心理学家到管理大师,他们都一直在建议使用外界的杂音来让自己放松并专注于工作。我不打算就此进行辩论,因为这对于我确实有效。我戴上耳机,然后倾听着鸟叫声和风声,这确实让我很放松。 + +在Linux中,我使用ANoise播放器来播放外界的杂音。多亏了官方提供的PPA,你可以很容易地[安装Ambient Noise播放器到Ubuntu中][2],以及其它基于Ubuntu的Linux发行版中。安装它,也可以让它离线播放外界的音乐。 + +另外,你也总可以在线听外界杂音。我最喜欢的在线外界音乐站点是[Noisli][3]。强烈推荐你试试这个。 + +#### 任务管理应用 #### + +一个良好的生产习惯,就是制订一个任务列表。如果你将它和[番茄工作法][4]组合使用,那就可能创造奇迹了。这里我所说的是,创建一个任务列表,如果可能,将这些任务分配到特定的某个时间。这将会帮助你跟踪一天中计划好的任务。 + +对于此,我推荐[Go For It!][5]应用。你可以将它安装到所有主流Linux发行版中,由于它基于[ToDo.txt][6],你也可以很容易地同步到你的智能手机中。我已经为此写了一个详尽的指南[如何使用Go For It!][7]。 + +此外,你可以使用[Sticky Notes][8]或者[Google Keep][9]。如果你需要某些更类似[Evernote][10]的功能,你可以使用这些[Evernote的开源替代品][11]。 + +#### 剪贴板管理器 #### + +Ctrl+ C和Ctrl+V是我们日常计算机生活中不可缺少的一部分,它们唯一的不足之处在于,这些重要的活动不会被记住(默认情况下)。假如你拷贝了一些重要的东西,然后你意外地又拷贝了一些其它东西,你将丢失先前拷贝的东西。 + +剪贴板管理器在这种情况下会派上用场,它可以显示你最近拷贝(到剪贴板的)内容的历史记录,你可以从它这里将文本拷贝回到剪贴板中。 + +对于该目的,我更偏好[Diodon剪贴板管理器][12]。它处于活跃开发中,并且在Ubuntu的仓库中可以得到它。 + +#### 最近通知 #### + +如果你正忙着处理其它事情,而此时一个桌面通知闪了出来又逐渐消失了,你会怎么做?你会想要看看通知都说了什么,不是吗?最近通知指示器就是用于处理此项工作,它会保留一个最近所有通知的历史记录。这样,你就永远不会错过桌面通知了。 + +你可以阅读[最近通知指示器这里][13]。 + +#### 终端技巧 #### + +不,我不打算给你们展示所有那些Linux命令技巧和快捷方法,那会写满整个博客了。我打算给你们展示一些终端黑技巧,你可以用它们来提高你的生产力。 + +- **修改**sudo**密码超时**:默认情况下,sudo命令要求你在15分钟后再次输入密码,这真是让人讨厌。实际上,你可以修改默认的sudo密码超时。[此教程][14]会给你展示如何来实现。 +- **获取命令完成的桌面通知**:这是IT朋友们之间的一个常见的玩笑,开发者们花费大量时间来等待程序编译完成,而这不完全是正确的。但是,它确实影响到了生产力,因为在你等待程序编译完成时,你可以做其它事情,并忘了你在终端中运行的命令。一个更好的途径,就是在一个命令完成时,让它显示桌面通知。这样,你就不会长时间被打断,并且可以回到之前想要做的事情上。请阅读[如何获取命令完成的桌面通知][15]。 + +我知道,这不是一篇全面涵盖了**提升生产力**的文章。但是,这些小应用和小技巧可以在实际生活中帮助你在你宝贵的时间中做得更多。 + +现在,该轮到你们了。在Linux中,你使用了什么程序或者技巧来提高生产力呢?有哪些东西你想要和社区分享呢? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/productivity-tips-ubuntu/ + +作者:[Abhishek][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://www.helpscout.net/blog/music-productivity/ +[2]:http://itsfoss.com/ambient-noise-music-player-ubuntu/ +[3]:http://www.noisli.com/ +[4]:https://en.wikipedia.org/wiki/Pomodoro_Technique +[5]:http://manuel-kehl.de/projects/go-for-it/ +[6]:http://todotxt.com/ +[7]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ +[8]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ +[9]:http://itsfoss.com/install-google-keep-ubuntu-1310/ +[10]:https://evernote.com/ +[11]:http://itsfoss.com/5-evernote-alternatives-linux/ +[12]:https://esite.ch/tag/diodon/ +[13]:http://itsfoss.com/7-best-indicator-applets-for-ubuntu-13-10/ +[14]:http://itsfoss.com/change-sudo-password-timeout-ubuntu/ +[15]:http://itsfoss.com/notification-terminal-command-completion-ubuntu/ From 30cd2e15865dc19ea84a747b04a4afe63010f2c5 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 24 Sep 2015 13:05:03 +0800 Subject: [PATCH 2150/2517] PUB:20150906 How To Set Up Your FTP Server In Linux @cvsher --- ... How To Set Up Your FTP Server In Linux.md | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) rename {translated/tech => published}/20150906 How To Set Up Your FTP Server In Linux.md (62%) diff --git a/translated/tech/20150906 How To Set Up Your FTP Server In Linux.md b/published/20150906 How To Set Up Your FTP Server In Linux.md similarity index 62% rename from translated/tech/20150906 How To Set Up Your FTP Server In Linux.md rename to published/20150906 How To Set Up Your FTP Server In Linux.md index 8c754786fe..90a1895ff0 100644 --- a/translated/tech/20150906 How To Set Up Your FTP Server In Linux.md +++ b/published/20150906 How To Set Up Your FTP Server In Linux.md @@ -1,12 +1,12 @@ -如何在linux中搭建FTP服务 +如何在 linux 中搭建 FTP 服务 ===================================================================== ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Setup-FTP-Server-in-Linux.jpg) -在本教程中,我将会解释如何搭建你自己的FTP服务。但是,首先我们应该来的学习一下FTP是什么。 +在本教程中,我将会介绍如何搭建你自己的FTP服务。但是,首先我们应该来的学习一下FTP是什么。 ###FTP是什么?### -[FTP][1] 是文件传输协议(File Transfer Protocol)的缩写。顾名思义,FTP是用于计算机之间通过网络进行文件传输。你可以通过FTP在计算机账户间进行文件传输,也可以在账户和桌面计算机之间传输文件,或者访问在线软件文档。但是,需要注意的是多数的FTP站点的使用率非常高,并且在连接前需要进行多次尝试。 +[FTP][1] 是文件传输协议(File Transfer Protocol)的缩写。顾名思义,FTP用于计算机之间通过网络进行文件传输。你可以通过FTP在计算机账户间进行文件传输,也可以在账户和桌面计算机之间传输文件,或者访问在线软件归档。但是,需要注意的是多数的FTP站点的使用率非常高,可能需要多次重连才能连接上。 FTP地址和HTTP地址(即网页地址)非常相似,只是FTP地址使用ftp://前缀而不是http:// @@ -16,23 +16,23 @@ FTP地址和HTTP地址(即网页地址)非常相似,只是FTP地址使用f 现在,我们来开始一个特别的冒险,我们将会搭建一个FTP服务用于和家人、朋友进行文件共享。在本教程,我们将以[vsftpd][2]作为ftp服务。 -VSFTPD是一个自称为最安全的FTP服务端软件。事实上VSFTPD的前两个字母表示“非常安全的(very secure)”。该软件的构建绕开了FTP协议的漏洞。 +VSFTPD是一个自称为最安全的FTP服务端软件。事实上VSFTPD的前两个字母表示“非常安全的(very secure)”。该软件的构建绕开了FTP协议的漏洞。 -尽管如此,你应该知道还有更安全的方法进行文件管理和传输,如:SFTP(使用[OpenSSH][3])。FTP协议对于共享非敏感数据是非常有用和可靠的。 +尽管如此,你应该知道还有更安全的方法进行文件管理和传输,如:SFTP(使用[OpenSSH][3])。FTP协议对于共享非敏感数据是非常有用和可靠的。 -####在rpm distributions中安装VSFTPD:#### +####使用 rpm 安装VSFTPD:#### 你可以使用如下命令在命令行界面中快捷的安装VSFTPD: dnf -y install vsftpd -####在deb distributions中安装VSFTPD:#### +####使用 deb 安装VSFTPD:#### 你可以使用如下命令在命令行界面中快捷的安装VSFTPD: sudo apt-get install vsftpd -####在Arch distribution中安装VSFTPD:#### +####在Arch 中安装VSFTPD:#### 你可以使用如下命令在命令行界面中快捷的安装VSFTPD: @@ -52,41 +52,41 @@ VSFTPD是一个自称为最安全的FTP服务端软件。事实上VSFTPD的前 write_enable=YES -**允许本地用户登陆:** +**允许本地(系统)用户登录:** -为了允许文件/etc/passwd中记录的用户可以登陆ftp服务,“local_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) + # 匿名登录不需要密码(可选) + no_anon_password=YES + # 匿名登录的最大传输速率,Bytes/second(可选) 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]) +( LCTT 译注:chroot jail是类unix系统中的一种安全机制,用于修改进程运行的根目录环境,限制该线程不能感知到其根目录树以外的其他目录结构和文件的存在。详情参看[chroot jail][4]) 有时我们需要设置根目录(chroot)环境来禁止用户离开他们的家(home)目录。在配置文件中增加/修改下面配置开启根目录限制(Chroot Jail): chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list -“chroot_list_file”变量指定根目录监狱所包含的文件/目录(译者注:即用户只能访问这些文件/目录) +“chroot\_list\_file”变量指定根目录限制所包含的文件/目录( LCTT 译注:即用户只能访问这些文件/目录) 最后你必须重启ftp服务,在命令行中输入以下命令: sudo systemctl restart vsftpd -到此为止,你的ftp服务已经搭建完成并且启动了 +到此为止,你的ftp服务已经搭建完成并且启动了。 -------------------------------------------------------------------------------- @@ -94,7 +94,7 @@ via: http://itsfoss.com/set-ftp-server-linux/ 作者:[alimiracle][a] 译者:[cvsher](https://github.com/cvsher) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 908e33cfc0d415c71e419dd26ead7a716d43d930 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 24 Sep 2015 13:08:23 +0800 Subject: [PATCH 2151/2517] PUB:20150916 Enable Automatic System Updates In Ubuntu @Vic020 --- .../20150916 Enable Automatic System Updates In Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20150916 Enable Automatic System Updates In Ubuntu.md (96%) diff --git a/translated/tech/20150916 Enable Automatic System Updates In Ubuntu.md b/published/20150916 Enable Automatic System Updates In Ubuntu.md similarity index 96% rename from translated/tech/20150916 Enable Automatic System Updates In Ubuntu.md rename to published/20150916 Enable Automatic System Updates In Ubuntu.md index ea320bd6e2..2a3ef499e9 100644 --- a/translated/tech/20150916 Enable Automatic System Updates In Ubuntu.md +++ b/published/20150916 Enable Automatic System Updates In Ubuntu.md @@ -1,4 +1,4 @@ -开启Ubuntu系统自动升级 +开启 Ubuntu 系统自动升级 ================================================================================ 在学习如何开启Ubuntu系统自动升级之前,先解释下为什么需要自动升级。 @@ -40,7 +40,7 @@ via: http://itsfoss.com/automatic-system-updates-ubuntu/ 作者:[Abhishek][a] 译者:[Vic020/VicYu](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e8ad981738b23dafbcf32a082633d03d443e8e87 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 24 Sep 2015 15:19:48 +0800 Subject: [PATCH 2152/2517] PUB:RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server @FSSlc --- ...uring and Securing a Web and FTP Server.md | 65 +++++++++---------- 1 file changed, 32 insertions(+), 33 deletions(-) rename {translated/tech/RHCSA => published}/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md (58%) diff --git a/translated/tech/RHCSA/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md b/published/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md similarity index 58% rename from translated/tech/RHCSA/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md rename to published/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md index 190c32ece5..c1588ade99 100644 --- a/translated/tech/RHCSA/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md +++ b/published/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md @@ -1,16 +1,16 @@ -RHCSA 系列: 安装,配置及加固一个 Web 和 FTP 服务器 – Part 9 +RHCSA 系列(九): 安装、配置及加固一个 Web 和 FTP 服务器 ================================================================================ -Web 服务器(也被称为 HTTP 服务器)是在网络中将内容(最为常见的是网页,但也支持其他类型的文件)进行处理并传递给客户端的服务。 +Web 服务器(也被称为 HTTP 服务器)是在网络中将内容(最为常见的是网页,但也支持其他类型的文件)进行处理并传递给客户端的服务。 -FTP 服务器是最为古老且最常使用的资源之一(即便到今天也是这样),在身份认证不是必须的情况下,它可使得在一个网络里文件对于客户端可用,因为 FTP 使用没有加密的用户名和密码。 +FTP 服务器是最为古老且最常使用的资源之一(即便到今天也是这样),在身份认证不是必须的情况下,它可通过客户端在一个网络访问文件,因为 FTP 使用没有加密的用户名和密码,所以有些情况下不需要验证也行。 在 RHEL 7 中可用的 web 服务器是版本号为 2.4 的 Apache HTTP 服务器。至于 FTP 服务器,我们将使用 Very Secure Ftp Daemon (又名 vsftpd) 来建立用 TLS 加固的连接。 ![配置和加固 Apache 和 FTP 服务器](http://www.tecmint.com/wp-content/uploads/2015/05/Install-Configure-Secure-Apache-FTP-Server.png) -RHCSA: 安装,配置及加固 Apache 和 FTP 服务器 – Part 9 +*RHCSA: 安装,配置及加固 Apache 和 FTP 服务器 – Part 9* -在这篇文章中,我们将解释如何在 RHEL 7 中安装,配置和加固 web 和 FTP 服务器。 +在这篇文章中,我们将解释如何在 RHEL 7 中安装、配置和加固 web 和 FTP 服务器。 ### 安装 Apache 和 FTP 服务器 ### @@ -35,7 +35,7 @@ RHCSA: 安装,配置及加固 Apache 和 FTP 服务器 – Part 9 ![确认 Apache Web 服务器](http://www.tecmint.com/wp-content/uploads/2015/05/Confirm-Apache-Web-Server.png) -确认 Apache Web 服务器 +*确认 Apache Web 服务器* 对于 ftp 服务器,在确保它如期望中的那样工作之前,我们必须进一步地配置它,我们将在几分钟后来做这件事。 @@ -43,7 +43,7 @@ RHCSA: 安装,配置及加固 Apache 和 FTP 服务器 – Part 9 Apache 的主要配置文件位于 `/etc/httpd/conf/httpd.conf` 中,但它可能依赖 `/etc/httpd/conf.d` 中的其他文件。 -尽管默认的配置对于大多数的情形是充分的,熟悉描述在 [官方文档][1] 中的所有可用选项是一个不错的主意。 +尽管默认的配置对于大多数的情形都够用了,但熟悉在 [官方文档][1] 中介绍的所有可用选项是一个不错的主意。 同往常一样,在编辑主配置文件前先做一个备份: @@ -51,14 +51,14 @@ Apache 的主要配置文件位于 `/etc/httpd/conf/httpd.conf` 中,但它可 然后用你钟爱的文本编辑器打开它,并查找下面这些变量: -- ServerRoot: 服务器的配置,错误和日志文件保存的目录。 -- Listen: 通知 Apache 去监听特定的 IP 地址或端口。 -- Include: 允许包含其他配置文件,这个必须存在,否则,服务器将会崩溃。它恰好与 IncludeOptional 相反,假如特定的配置文件不存在,它将静默地忽略掉它们。 -- User 和 Group: 运行 httpd 服务的用户/组的名称。 -- DocumentRoot: Apache 为你的文档服务的目录。默认情况下,所有的请求将在这个目录中被获取,但符号链接和别名可能会被用于指向其他位置。 -- ServerName: 这个指令将设定用于识别它自身的主机名(或 IP 地址)和端口。 +- `ServerRoot`: 服务器的配置,错误和日志文件保存的目录。 +- `Listen`: 通知 Apache 去监听特定的 IP 地址或端口。 +- `Include`: 允许包含其他配置文件,要包含的文件必须存在,否则,服务器将会失败。它恰好与 IncludeOptional 相反,假如特定的配置文件不存在,它将静默地忽略掉它们。 +- `User` 和 `Group`: 运行 httpd 服务的用户/组的名称。 +- `DocumentRoot`: Apache 为你的文档所服务的目录。默认情况下,所有的请求将在这个目录中被获取,但符号链接和别名可能会被用于指向其他位置。 +- `ServerName`: 这个指令将设定用于识别它自身的主机名(或 IP 地址)和端口。 -安全措施的第一步将包含创建一个特定的用户和组(如 tecmint/tecmint)来运行 web 服务器以及更改默认的端口为一个更高的端口(在这个例子中为 9000): +安全措施的第一步将包含创建一个特定的用户和组(如 tecmint/tecmint)来运行 web 服务器,以及更改默认的端口为一个更高的端口(在这个例子中为 9000) (LCTT 译注:如果你的 Web 服务器对外公开提供服务,则不建议修改为非默认端口。): ServerRoot "/etc/httpd" Listen 192.168.0.18:9000 @@ -75,47 +75,46 @@ Apache 的主要配置文件位于 `/etc/httpd/conf/httpd.conf` 中,但它可 # systemctl restart httpd -并别忘了在防火墙中开启新的端口(和禁用旧的端口): - +并别忘了在防火墙中开启新的端口(并禁用旧的端口): # firewall-cmd --zone=public --remove-port=80/tcp --permanent # firewall-cmd --zone=public --add-port=9000/tcp --permanent # firewall-cmd --reload -请注意,由于 SELinux 的策略,你只可使用如下命令所返回的端口来分配给 web 服务器。 +请注意,由于 SELinux 策略,你只能给给 web 服务器使用如下命令所返回的端口。 # semanage port -l | grep -w '^http_port_t' -假如你想使用另一个端口(如 TCP 端口 8100)来给 httpd 服务,你必须将它加到 SELinux 的端口上下文: +假如你想让 httpd 服务使用另一个端口(如 TCP 端口 8100),你必须将它加到 SELinux 的端口上下文: # semanage port -a -t http_port_t -p tcp 8100 ![添加 Apache 端口到 SELinux 策略](http://www.tecmint.com/wp-content/uploads/2015/05/Add-Apache-Port-to-SELinux-Policies.png) -添加 Apache 端口到 SELinux 策略 +*添加 Apache 端口到 SELinux 策略* 为了进一步加固你安装的 Apache,请遵循以下步骤: 1. 运行 Apache 的用户不应该拥有访问 shell 的能力: - # usermod -s /sbin/nologin tecmint + # usermod -s /sbin/nologin tecmint -2. 禁用目录列表功能,为的是阻止浏览器展示一个未包含 index.html 文件的目录里的内容。 +2. 禁用目录列表功能,这是为了阻止浏览器展示一个未包含 index.html 文件的目录里的内容。 -编辑 `/etc/httpd/conf/httpd.conf` (和虚拟主机的配置文件,假如有的话),并确保 Options 指令在顶级和目录块级别中(注:感觉这里我的翻译不对)都被设置为 None: + 编辑 `/etc/httpd/conf/httpd.conf` (以及虚拟主机的配置文件,假如有的话),并确保出现在顶层的和Directory 块中的 Options 指令都被设置为 None: - Options None + Options None -3. 在 HTTP 回应中隐藏有关 web 服务器和操作系统的信息。像下面这样编辑文件 `/etc/httpd/conf/httpd.conf`: +3. 在 HTTP 响应中隐藏有关 web 服务器和操作系统的信息。像下面这样编辑文件 `/etc/httpd/conf/httpd.conf`: - ServerTokens Prod - ServerSignature Off + ServerTokens Prod + ServerSignature Off 现在,你已经做好了从 `/var/www/html` 目录开始服务内容的准备了。 ### 配置并加固 FTP 服务器 ### -和 Apache 的情形类似, Vsftpd 的主配置文件 `(/etc/vsftpd/vsftpd.conf)` 带有详细的注释,且虽然对于大多数的应用实例,默认的配置应该足够了,但为了更有效率地操作 ftp 服务器,你应该开始熟悉相关的文档和 man 页 `(man vsftpd.conf)`(对于这点,再多的强调也不为过!)。 +和 Apache 的情形类似, Vsftpd 的主配置文件 `/etc/vsftpd/vsftpd.conf` 带有详细的注释,且虽然对于大多数的应用实例,默认的配置应该足够了,但为了更有效率地操作 ftp 服务器,你应该开始熟悉相关的文档和 man 页 `man vsftpd.conf`(对于这点,再多的强调也不为过!)。 在我们的示例中,使用了这些指令: @@ -135,7 +134,7 @@ Apache 的主要配置文件位于 `/etc/httpd/conf/httpd.conf` 中,但它可 userlist_enable=YES tcp_wrappers=YES -通过使用 `chroot_local_user=YES`,(默认情况下)本地用户在登陆之后,将马上被置于一个位于用户家目录的 chroot 环境中(注:这里的翻译也不准确)。这意味着本地用户将不能访问除其家目录之外的任何文件。 +通过使用 `chroot_local_user=YES`,(默认情况下)本地用户在登录之后,将被限制在以用户的家目录为 chroot 监狱的环境中。这意味着本地用户将不能访问除其家目录之外的任何文件。 最后,为了让 ftp 能够在用户的家目录中读取文件,设置如下的 SELinux 布尔值: @@ -145,19 +144,19 @@ Apache 的主要配置文件位于 `/etc/httpd/conf/httpd.conf` 中,但它可 ![查看 FTP 连接](http://www.tecmint.com/wp-content/uploads/2015/05/Check-FTP-Connection.png) -查看 FTP 连接 +*查看 FTP 连接* 注意, `/var/log/xferlog` 日志将会记录下载和上传的情况,这与上图的目录列表一致: ![监视 FTP 的下载和上传情况](http://www.tecmint.com/wp-content/uploads/2015/05/Monitor-FTP-Download-Upload.png) -监视 FTP 的下载和上传情况 +*监视 FTP 的下载和上传情况* 另外请参考: [在 Linux 系统中使用 Trickle 来限制应用使用的 FTP 网络带宽][2] ### 总结 ### -在本教程中,我们解释了如何设置 web 和 ftp 服务器。由于这个主题的广泛性,涵盖这些话题的所有方面是不可能的(如虚拟网络主机)。因此,我推荐你也阅读这个网站中有关 [Apache][3] 的其他卓越的文章。 +在本教程中,我们解释了如何设置 web 和 ftp 服务器。由于这个主题的广泛性,涵盖这些话题的所有方面是不可能的(如虚拟主机)。因此,我推荐你也阅读这个网站中有关 [Apache][3] 的其他卓越的文章。 -------------------------------------------------------------------------------- @@ -165,11 +164,11 @@ via: http://www.tecmint.com/rhcsa-series-install-and-secure-apache-web-server-an 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者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://httpd.apache.org/docs/2.4/ -[2]:http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ +[2]:https://linux.cn/article-5517-1.html [3]:http://www.google.com/cse?cx=partner-pub-2601749019656699:2173448976&ie=UTF-8&q=virtual+hosts&sa=Search&gws_rd=cr&ei=Dy9EVbb0IdHisASnroG4Bw#gsc.tab=0&gsc.q=apache From f5f894ad5a018f855b64564f913575bdddd0f3fe Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 24 Sep 2015 22:12:07 +0800 Subject: [PATCH 2153/2517] Update RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...Part 14--Setting Up LDAP-based Authentication in RHEL 7.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md index 36bf319b19..e3425f5164 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md @@ -1,3 +1,5 @@ +FSSlc translating + RHCSA Series: Setting Up LDAP-based Authentication in RHEL 7 – Part 14 ================================================================================ We will begin this article by outlining some LDAP basics (what it is, where it is used and why) and show how to set up a LDAP server and configure a client to authenticate against it using Red Hat Enterprise Linux 7 systems. @@ -272,4 +274,4 @@ via: http://www.tecmint.com/setup-ldap-server-and-configure-client-authenticatio [a]:http://www.tecmint.com/author/gacanepa/ [1]:http://www.tecmint.com/automatic-rhel-installations-using-kickstart/ [2]:http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ -[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Directory_Servers.html \ No newline at end of file +[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Directory_Servers.html From 182300618e4312a3d84561b2e690f23cab60cf92 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 25 Sep 2015 11:45:33 +0800 Subject: [PATCH 2154/2517] =?UTF-8?q?20150925-1=20=E9=80=89=E9=A2=98=20str?= =?UTF-8?q?uggling=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 --- ...TTP 2 Now Fully Supported in NGINX Plus.md | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 sources/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md diff --git a/sources/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md b/sources/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md new file mode 100644 index 0000000000..5d1059a38f --- /dev/null +++ b/sources/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md @@ -0,0 +1,120 @@ +struggling 翻译中 + +HTTP/2 Now Fully Supported in NGINX Plus +================================================================================ +Earlier this week we released [NGINX Plus R7][1] with support for HTTP/2. As the latest standard for the HTTP protocol, HTTP/2 is designed to bring increased performance and security to modern web applications. + +The HTTP/2 implementation in NGINX Plus works seamlessly with existing sites and applications. Minimal changes are required, as NGINX Plus delivers HTTP/1.x and HTTP/2 traffic in parallel for the best experience, no matter what browser your users choose. + +HTTP/2 support is available in the optional **nginx‑plus‑http2** package only. The **nginx‑plus** and **nginx‑plus‑extras** packages provide SPDY support and are currently recommended for production sites because of wider browser support and code maturity. + +### Why Move to HTTP/2? ### + +HTTP/2 makes data transfer more efficient and more secure for your applications. HTTP/2 adds five key features that improve performance when compared to HTTP/1.x: + +- **True multiplexing** – HTTP/1.1 enforces strict in-order completion of requests that come in over a keepalive connection. A request must be satisfied before processing on the next one can begin. HTTP/2 eliminates this requirement and allows requests to be satisfied in parallel and out of order. +- **Single, persistent connection** – As HTTP/2 allows for true multiplexing of requests, all objects on a web page can now be downloaded in parallel over a single connection. WIth HTTP/1.x, multiple connections are used to download resources in parallel, leading to inefficient use of the underlying TCP protocol. +- **Binary encoding** – Header information is sent in compact, binary format, rather than plain text, saving bytes on the wire. +- **Header compression** – Headers are compressed using a purpose-built algorithm, HPACK compression, which further reduces the amount of data crossing the network. +- **SSL/TLS encryption** – With HTTP/2, SSL/TLS encryption is mandatory. This is not enforced in the [RFC][2], which allows for plain-text HTTP/2, but rather by all web browsers that currently implement HTTP/2. SSL/TLS makes your site more secure, and with all the performance improvements in HTTP/2, the performance penalty from encryption and decryption is mitigated. + +To learn more about HTTP/2: + +- Please read our [white paper][3], which covers everything you need to know about HTTP/2. +- Download our [special edition of the High Performance Browser Networking ebook][4] by Ilya Grigorik of Google. + +### How NGINX Plus Implements HTTP/2 ### + +Our implementation of HTTP/2 is based on our support for SPDY, which is widely deployed (nearly 75% of websites that use SPDY use NGINX or NGINX Plus). With NGINX Plus, you can deploy HTTP/2 with very little change to your application infrastructure. This section discusses how NGINX Plus implements support for HTTP/2. + +#### An HTTP/2 Gateway #### + +![](https://www.nginx.com/wp-content/uploads/2015/09/http2-27-1024x300.png) + +NGINX Plus acts an HTTP/2 gateway. It talks HTTP/2 to client web browsers that support it, but translates HTTP/2 requests back to HTTP/1.x (or FastCGI, SCGI, uWSGI, etc. – whatever protocol you are currently using) for communication with back-end servers. + +#### Backward Compatibility #### + +![](https://www.nginx.com/wp-content/uploads/2015/09/http2-281-1024x581.png) + +For the foreseeable future you’ll need to support HTTP/2 and HTTP/1.x side by side. As of this writing, over 50% of users already run a web browser that [supports HTTP/2][5], but this also means almost 50% don’t. + +To support both HTTP/1.x and HTTP/2 side by side, NGINX Plus implements the Next Protocol Negotiation (NPN) extension to TLS. When a web browser connects to a server, it sends a list of supported protocols to the server. If the browser includes h2 – that is, HTTP/2 – in the list of supported protocols, NGINX Plus uses HTTP/2 for connections to that browser. If the browser doesn’t implement NPN, or doesn’t send h2 in its list of supported protocols, NGINX Plus falls back to HTTP/1.x. + +### Moving to HTTP/2 ### + +NGINX, Inc. aims to make the transition to HTTP/2 as seamless as possible. This section goes through the changes that need to be made to enable HTTP/2 for your applications, which include just a few changes to the configuration of NGINX Plus. + +#### Prerequisites #### + +Upgrade to the NGINX Plus R7 **nginx‑plus‑http2** package. Note that an HTTP/2-enabled version of the **nginx‑plus‑extras** package is not available at this time. + +#### Redirecting All Traffic to SSL/TLS #### + +If your app is not already encrypted with SSL/TLS, now would be a good time to make that move. Encrypting your app protects you from spying as well as from man-in-the-middle attacks. Some search engines even reward encrypted sites with [improved rankings][6] in search results. The following configuration block redirects all plain HTTP requests to the encrypted version of the site. + + server { + listen 80; + location / { + return 301 https://$host$request_uri; + } + } + +#### Enabling HTTP/2 #### + +To enable HTTP/2 support, simply add the http2 parameter to all [listen][7] directives. Also include the ssl parameter, required because browsers do not support HTTP/2 without encryption. + + server { + listen 443 ssl http2 default_server; + + ssl_certificate server.crt; + ssl_certificate_key server.key; + … + } + +If necessary, restart NGINX Plus, for example by running the nginx -s reload command. To verify that HTTP/2 translation is working, you can use the “HTTP/2 and SPDY indicator” plug-in available for [Google Chrome][8] and [Firefox][9]. + +### Caveats ### + +- Before installing the **nginx‑plus‑http2** package, you must remove the spdy parameter on all listen directives in your configuration (replace it with the http2 and ssl parameters to enable support for HTTP/2). With this package, NGINX Plus fails to start if any listen directives have the spdy parameter. +- If you are using a web application firewall (WAF) that is sitting in front of NGINX Plus, ensure that it is capable of parsing HTTP/2, or move it behind NGINX Plus. +- The “Server Push” feature defined in the HTTP/2 RFC is not supported in this release. Future releases of NGINX Plus might include it. +- NGINX Plus R7 supports both SPDY and HTTP/2. In a future release we will deprecate support for SPDY. Google is [deprecating SPDY][10] in early 2016, making it unnecessary to support both protocols at that point. +- If [ssl_prefer_server_ciphers][11] is set to on and/or a list of [ssl_ciphers][12] that are defined in [Appendix A: TLS 1.2 Ciper Suite Black List][13] is used, the browser will experience handshake-errors and not work. Please refer to [section 9.2.2 of the HTTP/2 RFC][14] for more details.- + +### Special Thanks ### + +NGINX, Inc. would like to thank [Dropbox][15] and [Automattic][16], who are heavy users of our software and graciously cosponsored the development of our HTTP/2 implementation. Their contributions have helped accelerate our ability to bring this software to you, and we hope you are able to support them in turn. + +![](https://www.nginx.com/wp-content/themes/nginx-theme/assets/img/landing-page/highperf_nginx_ebook.png) + +[O'REILLY'S BOOK ABOUT HTTP/2 & PERFORMANCE TUNING][17] + +-------------------------------------------------------------------------------- + +via: https://www.nginx.com/blog/http2-r7/ + +作者:[Faisal Memon][a] +译者:[struggling](https://github.com/struggling) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.nginx.com/blog/author/fmemon/ +[1]:https://www.nginx.com/blog/nginx-plus-r7-released/ +[2]:https://tools.ietf.org/html/rfc7540 +[3]:https://www.nginx.com/wp-content/uploads/2015/09/NGINX_HTTP2_White_Paper_v4.pdf +[4]:https://www.nginx.com/http2-ebook/ +[5]:http://caniuse.com/#feat=http2 +[6]:http://googlewebmastercentral.blogspot.co.uk/2014/08/https-as-ranking-signal.html +[7]:http://nginx.org/en/docs/http/ngx_http_core_module.html#listen +[8]:https://chrome.google.com/webstore/detail/http2-and-spdy-indicator/mpbpobfflnpcgagjijhmgnchggcjblin?hl=en +[9]:https://addons.mozilla.org/en-us/firefox/addon/spdy-indicator/ +[10]:http://blog.chromium.org/2015/02/hello-http2-goodbye-spdy-http-is_9.html +[11]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_prefer_server_ciphers +[12]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers +[13]:https://tools.ietf.org/html/rfc7540#appendix-A +[14]:https://tools.ietf.org/html/rfc7540#section-9.2.2 +[15]:http://dropbox.com/ +[16]:http://automattic.com/ +[17]:https://www.nginx.com/http2-ebook/ \ No newline at end of file From 3720ab3835b71276962913179f2b434debdb02c2 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 25 Sep 2015 13:56:21 +0800 Subject: [PATCH 2155/2517] PUB:20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage @GOLinux --- ...artition into One Large Virtual Storage.md | 157 +++++++++++++++ ...artition into One Large Virtual Storage.md | 183 ------------------ 2 files changed, 157 insertions(+), 183 deletions(-) create mode 100644 published/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md delete mode 100644 translated/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md diff --git a/published/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md b/published/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md new file mode 100644 index 0000000000..eb462bfe6a --- /dev/null +++ b/published/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md @@ -0,0 +1,157 @@ +Mhddfs:将多个小分区合并成一个大的虚拟存储 +================================================================================ + +让我们假定你有30GB的电影,并且你有3个驱动器,每个的大小为20GB。那么,你会怎么来存放东西呢? + +很明显,你可以将你的视频分割成2个或者3个不同的卷,并将它们手工存储到驱动器上。这当然不是一个好主意,它成了一项费力的工作,它需要你手工干预,而且花费你大量时间。 + +另外一个解决方案是创建一个 [RAID磁盘阵列][1]。然而,RAID在存储可靠性,磁盘空间可用性差等方面声名狼藉。另外一个解决方案,就是mhddfs。 + +![Combine Multiple Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Combine-Multiple-Partitions-in-Linux.png) + +*Mhddfs——在Linux中合并多个分区* + +mhddfs是一个用于Linux的设备驱动,它可以将多个挂载点合并到一个虚拟磁盘中。它是一个基于FUSE的驱动,提供了一个用于大数据存储的简单解决方案。它可以将所有小文件系统合并,创建一个单一的大虚拟文件系统,该文件系统包含其成员文件系统的所有内容,包括文件和空闲空间。 + +#### 你为什么需要Mhddfs? #### + +你的所有存储设备会创建为一个单一的虚拟池,它可以在启动时被挂载。这个小工具可以智能地照看并处理哪个存储满了,哪个存储空着,以及将数据写到哪个存储中。当你成功创建虚拟驱动器后,你可以使用[SAMBA][2]来共享你的虚拟文件系统。你的客户端将在任何时候都看到一个巨大的驱动器和大量的空闲空间。 + +#### Mhddfs特性 #### + +- 获取文件系统属性和系统信息。 +- 设置文件系统属性。 +- 创建、读取、移除和写入目录和文件。 +- 在单一设备上支持文件锁和硬链接。 + +|mhddfs的优点|mhddfs的缺点| +|-----------|-----------| +|适合家庭用户|mhddfs驱动没有内建在Linux内核中 | +|运行简单|运行时需要大量处理能力| +|没有明显的数据丢失|没有冗余解决方案| +|不需要分割文件|不支持移动硬链接| +|可以添加新文件到组成的虚拟文件系统|| +|可以管理文件保存的位置|| +|支持扩展文件属性|| + +### Linux中安装Mhddfs ### + +在Debian及其类似的移植系统中,你可以使用下面的命令来安装mhddfs包。 + + # apt-get update && apt-get install mhddfs + +![Install Mhddfs on Debian based Systems](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Mhddfs-on-Ubuntu.png) + +*安装Mhddfs到基于Debian的系统中* + +在RHEL/CentOS Linux系统中,你需要开启[epel仓库][3],然后执行下面的命令来安装mhddfs包。 + + # yum install mhddfs + +在Fedora 22及以上系统中,你可以通过dnf包管理来获得它,就像下面这样。 + + # dnf install mhddfs + +![Install Mhddfs on Fedora](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Mhddfs-on-Fedora.png) + +*安装Mhddfs到Fedora* + +如果万一mhddfs包不能从epel仓库获取到,那么你需要解决下面的依赖,然后像下面这样来编译源码并安装。 + +- FUSE头文件 +- GCC +- libc6头文件 +- uthash头文件 +- libattr1头文件(可选) + +接下来,只需从下面建议的地址下载最新的源码包,然后编译。 + + # wget http://mhddfs.uvw.ru/downloads/mhddfs_0.1.39.tar.gz + # tar -zxvf mhddfs*.tar.gz + # cd mhddfs-0.1.39/ + # make + +你应该可以在当前目录中看到mhddfs的二进制文件,以root身份将它移动到/usr/bin/和/usr/local/bin/中。 + + # cp mhddfs /usr/bin/ + # cp mhddfs /usr/local/bin/ + +一切搞定,mhddfs已经可以用了。 + +### 我怎么使用Mhddfs? ### + +1、 让我们看看当前所有挂载到我们系统中的硬盘。 + + $ df -h + +![Check Mounted Devices](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Mounted-Devices.gif) + +**样例输出** + + Filesystem Size Used Avail Use% Mounted on + + /dev/sda1 511M 132K 511M 1% /boot/efi + /dev/sda2 451G 92G 336G 22% / + /dev/sdb1 1.9T 161G 1.7T 9% /media/avi/BD9B-5FCE + /dev/sdc1 555M 555M 0 100% /media/avi/Debian 8.1.0 M-A 1 + +注意这里的‘挂载点’名称,我们后面会使用到它们。 + +2、 创建目录‘/mnt/virtual_hdd’,所有这些文件系统将会在这里组织到一起。 + + # mkdir /mnt/virtual_hdd + +3、 然后,挂载所有文件系统。你可以通过root或者FUSE组中的某个用户来完成。 + + # mhddfs /boot/efi, /, /media/avi/BD9B-5FCE/, /media/avi/Debian\ 8.1.0\ M-A\ 1/ /mnt/virtual_hdd -o allow_other + +![Mount All File System in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Mount-All-File-System-in-Linux.png) + +*在Linux中挂载所有文件系统* + +**注意**:这里我们使用了所有硬盘的挂载点名称,很明显,你的挂载点名称会有所不同。也请注意“-o allow_other”选项可以让这个虚拟文件系统让其它所有人可见,而不仅仅是创建它的人。 + +4、 现在,运行“df -h”来看看所有文件系统。它应该包含了你刚才创建的那个。 + + $ df -h + +![Verify Virtual File System Mount](http://www.tecmint.com/wp-content/uploads/2015/08/Verify-Virtual-File-System.png) + +*验证虚拟文件系统挂载* + +你可以像对已挂在的驱动器那样给虚拟文件系统应用所有的选项。 + +5、 要在每次系统启动创建这个虚拟文件系统,你应该以root身份添加下面的这行代码(在你那里会有点不同,取决于你的挂载点)到/etc/fstab文件的末尾。 + + mhddfs# /boot/efi, /, /media/avi/BD9B-5FCE/, /media/avi/Debian\ 8.1.0\ M-A\ 1/ /mnt/virtual_hdd fuse defaults,allow_other 0 0 + +6、 如果在任何时候你想要添加/移除一个新的驱动器到/从虚拟硬盘,你可以挂载一个新的驱动器,拷贝/mnt/vritual_hdd的内容,卸载卷,弹出你要移除的的驱动器并/或挂载你要包含的新驱动器。使用mhddfs命令挂载全部文件系统到Virtual_hdd下,这样就全部搞定了。 + +#### 我怎么卸载Virtual_hdd? #### + +卸载virtual_hdd相当简单,就像下面这样 + + # umount /mnt/virtual_hdd + +![Unmount Virtual Filesystem](http://www.tecmint.com/wp-content/uploads/2015/08/Unmount-Virtual-Filesystem.png) + +*卸载虚拟文件系统* + +注意,是umount,而不是unmount,很多用户都输错了。 + +到现在为止全部结束了。我正在写另外一篇文章,你们一定喜欢读的。到那时,请保持连线。请在下面的评论中给我们提供有用的反馈吧。请为我们点赞并分享,帮助我们扩散。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/combine-partitions-into-one-in-linux-using-mhddfs/ + +作者:[Avishek Kumar][a] +译者:[GOLinux](https://github.com/GOLinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/mount-filesystem-in-linux/ +[3]:https://linux.cn/article-2324-1.html diff --git a/translated/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md b/translated/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md deleted file mode 100644 index 04d9f18eb9..0000000000 --- a/translated/tech/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md +++ /dev/null @@ -1,183 +0,0 @@ -Mhddfs——将多个小分区合并成一个大的虚拟存储 -================================================================================ - -让我们假定你有30GB的电影,并且你有3个驱动器,每个的大小为20GB。那么,你会怎么来存放东西呢? - -很明显,你可以将你的视频分割成2个或者3个不同的卷,并将它们手工存储到驱动器上。这当然不是一个好主意,它成了一项费力的工作,它需要你手工干预,而且花费你大量时间。 - -另外一个解决方案是创建一个[RAID磁盘阵列][1]。然而,RAID在缺乏存储可靠性,磁盘空间可用性差等方面声名狼藉。另外一个解决方案,就是mhddfs。 - -![Combine Multiple Partitions in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Combine-Multiple-Partitions-in-Linux.png) -Mhddfs——在Linux中合并多个分区 - -mhddfs是一个用于Linux的驱动,它可以将多个挂载点合并到一个虚拟磁盘中。它是一个基于FUSE的驱动,提供了一个用于大数据存储的简单解决方案。它将所有小文件系统合并,以创建一个单一的大虚拟文件系统,该文件系统包含其成员文件系统的所有颗粒,包括文件和空闲空间。 - -#### 你为什么需要Mhddfs? #### - -你所有存储设备创建了一个单一的虚拟池,它可以在启动时被挂载。这个小工具可以智能地照看并处理哪个驱动器满了,哪个驱动器空着,将数据写到哪个驱动器中。当你成功创建虚拟驱动器后,你可以使用[SAMBA][2]来共享你的虚拟文件系统。你的客户端将在任何时候都看到一个巨大的驱动器和大量的空闲空间。 - -#### Mhddfs特性 #### - -- 获取文件系统属性和系统信息。 -- 设置文件系统属性。 -- 创建、读取、移除和写入目录和文件。 -- 支持文件锁和单一设备上的硬链接。 - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mhddfs的优点mhddfs的缺点
 适合家庭用户mhddfs驱动没有内建在Linux内核中
 运行简单 运行时需要大量处理能力
 没有明显的数据丢失 没有冗余解决方案
 不分割文件 不支持移动硬链接
 添加新文件到合并的虚拟文件系统 
 管理文件保存的位置 
  扩展文件属性 
- -### Linux中安装Mhddfs ### - -在Debian及其类似的移植系统中,你可以使用下面的命令来安装mhddfs包。 - - # apt-get update && apt-get install mhddfs - -![Install Mhddfs on Debian based Systems](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Mhddfs-on-Ubuntu.png) -安装Mhddfs到基于Debian的系统中 - -在RHEL/CentOS Linux系统中,你需要开启[epel仓库][3],然后执行下面的命令来安装mhddfs包。 - - # yum install mhddfs - -在Fedora 22及以上系统中,你可以通过dnf包管理来获得它,就像下面这样。 - - # dnf install mhddfs - -![Install Mhddfs on Fedora](http://www.tecmint.com/wp-content/uploads/2015/08/Install-Mhddfs-on-Fedora.png) -安装Mhddfs到Fedora - -如果万一mhddfs包不能从epel仓库获取到,那么你需要解决下面的依赖,然后像下面这样来编译源码并安装。 - -- FUSE头文件 -- GCC -- libc6头文件 -- uthash头文件 -- libattr1头文件(可选) - -接下来,只需从下面建议的地址下载最新的源码包,然后编译。 - - # wget http://mhddfs.uvw.ru/downloads/mhddfs_0.1.39.tar.gz - # tar -zxvf mhddfs*.tar.gz - # cd mhddfs-0.1.39/ - # make - -你应该可以在当前目录中看到mhddfs的二进制文件,以root身份将它移动到/usr/bin/和/usr/local/bin/中。 - - # cp mhddfs /usr/bin/ - # cp mhddfs /usr/local/bin/ - -一切搞定,mhddfs已经可以用了。 - -### 我怎么使用Mhddfs? ### - -1.让我们看看当前所有挂载到我们系统中的硬盘。 - - - $ df -h - -![Check Mounted Devices](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Mounted-Devices.gif) -**样例输出** - - Filesystem Size Used Avail Use% Mounted on - - /dev/sda1 511M 132K 511M 1% /boot/efi - /dev/sda2 451G 92G 336G 22% / - /dev/sdb1 1.9T 161G 1.7T 9% /media/avi/BD9B-5FCE - /dev/sdc1 555M 555M 0 100% /media/avi/Debian 8.1.0 M-A 1 - -注意这里的‘挂载点’名称,我们后面会使用到它们。 - -2.创建目录‘/mnt/virtual_hdd’,在这里,所有这些文件系统将被组成组。 - - - # mkdir /mnt/virtual_hdd - -3.然后,挂载所有文件系统。你可以通过root或者FUSE组中的某个成员来完成。 - - - # mhddfs /boot/efi, /, /media/avi/BD9B-5FCE/, /media/avi/Debian\ 8.1.0\ M-A\ 1/ /mnt/virtual_hdd -o allow_other - -![Mount All File System in Linux](http://www.tecmint.com/wp-content/uploads/2015/08/Mount-All-File-System-in-Linux.png) -在Linux中挂载所有文件系统 - -**注意**:这里我们使用了所有硬盘的挂载点名称,很明显,你的挂载点名称会有所不同。也请注意“-o allow_other”选项可以让这个虚拟文件系统让其它所有人可见,而不仅仅是创建它的人。 - -4.现在,运行“df -h”来看看所有文件系统。它应该包含了你刚才创建的那个。 - - - $ df -h - -![Verify Virtual File System Mount](http://www.tecmint.com/wp-content/uploads/2015/08/Verify-Virtual-File-System.png) -验证虚拟文件系统挂载 - -你可以像对已挂在的驱动器那样给虚拟文件系统部署所有的选项。 - -5.要在每次系统启动创建这个虚拟文件系统,你应该以root身份添加下面的这行代码(在你那里会有点不同,取决于你的挂载点)到/etc/fstab文件的末尾。 - - mhddfs# /boot/efi, /, /media/avi/BD9B-5FCE/, /media/avi/Debian\ 8.1.0\ M-A\ 1/ /mnt/virtual_hdd fuse defaults,allow_other 0 0 - -6.如果在任何时候你想要添加/移除一个新的驱动器到/从虚拟硬盘,你可以挂载一个新的驱动器,拷贝/mnt/vritual_hdd的内容,卸载卷,弹出你要移除的的驱动器并/或挂载你要包含的新驱动器。使用mhddfs命令挂载全部文件系统到Virtual_hdd下,这样就全部搞定了。 -#### 我怎么卸载Virtual_hdd? #### - -卸载virtual_hdd相当简单,就像下面这样 - - # umount /mnt/virtual_hdd - -![Unmount Virtual Filesystem](http://www.tecmint.com/wp-content/uploads/2015/08/Unmount-Virtual-Filesystem.png) -卸载虚拟文件系统 - -注意,是umount,而不是unmount,很多用户都输错了。 - -到现在为止全部结束了。我正在写另外一篇文章,你们一定喜欢读的。到那时,请保持连线到Tecmint。请在下面的评论中给我们提供有用的反馈吧。请为我们点赞并分享,帮助我们扩散。 - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/combine-partitions-into-one-in-linux-using-mhddfs/ - -作者:[Avishek Kumar][a] -译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.tecmint.com/author/avishek/ -[1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/mount-filesystem-in-linux/ -[3]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ From a6de7c218cc5e41a227798fcc502dbd0c49bff83 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 25 Sep 2015 14:58:31 +0800 Subject: [PATCH 2156/2517] PUB:20150901 How to Defragment Linux Systems @geekpi --- ...0150901 How to Defragment Linux Systems.md | 126 ++++++++++++++++++ ...0150901 How to Defragment Linux Systems.md | 125 ----------------- 2 files changed, 126 insertions(+), 125 deletions(-) create mode 100644 published/20150901 How to Defragment Linux Systems.md delete mode 100644 translated/tech/20150901 How to Defragment Linux Systems.md diff --git a/published/20150901 How to Defragment Linux Systems.md b/published/20150901 How to Defragment Linux Systems.md new file mode 100644 index 0000000000..4c14b5fc5f --- /dev/null +++ b/published/20150901 How to Defragment Linux Systems.md @@ -0,0 +1,126 @@ +如何在 Linux 中整理磁盘碎片 +================================================================================ + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-featured.png) + +有一神话是 linux 的磁盘从来不需要整理碎片。在大多数情况下这是真的,大多数因为是使用的是优秀的日志系统(ext2、3、4等等)来处理文件系统。然而,在一些特殊情况下,碎片仍旧会产生。如果正巧发生在你身上,解决方法很简单。 + +### 什么是磁盘碎片 ### + +文件系统会按块更新文件,如果这些块没有连成一整块而是分布在磁盘的各个角落中时,就会形成磁盘碎片。这对于 FAT 和 FAT32 文件系统而言是这样的。在 NTFS 中这种情况有所减轻,但在 Linux(extX)中却几乎不会发生。下面是原因: + +在像 FAT 和 FAT32 这类文件系统中,文件紧挨着写入到磁盘中。文件之间没有空间来用于增长或者更新: + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-fragmented.png) + +NTFS 中在文件之间保留了一些空间,因此有空间进行增长。但因块之间的空间是有限的,碎片也会随着时间出现。 + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-ntfs.png) + +Linux 的日志型文件系统采用了一个不同的方案。与文件相互挨着不同,每个文件分布在磁盘的各处,每个文件之间留下了大量的剩余空间。这就给文件更新和增长留下了很大的空间,碎片很少会发生。 + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-journal.png) + +此外,碎片一旦出现了,大多数 Linux 文件系统会尝试将文件和块重新连续起来。 + +### Linux 中的磁盘整理 ### + +除非你用的是一个很小的硬盘或者空间不够了,不然 Linux 很少会需要磁盘整理。一些可能需要磁盘整理的情况包括: + +- 如果你编辑的是大型视频文件或者 RAW 照片,但磁盘空间有限 +- 如果你使用一个老式硬件,如旧笔记本,你的硬盘会很小 +- 如果你的磁盘开始满了(大约使用了85%) +- 如果你的家目录中有许多小分区 + +最好的解决方案是购买一个大硬盘。如果不可能,磁盘碎片整理就很有用了。 + +### 如何检查碎片 ### + +`fsck` 命令会为你做这个,换句话说,如果你可以在 LiveCD 中运行它,那么就可以用于**所有卸载的分区**。 + +这一点很重要:**在已经挂载的分区中运行 fsck 将会严重危害到你的数据和磁盘**。 + +你已经被警告过了。开始之前,先做一个完整的备份。 + +**免责声明**: 本文的作者与本站将不会对您的文件、数据、系统或者其他损害负责。你需要自己承担风险。如果你继续,你需要接受并了解这点。 + +你应该启动到一个 live 会话中(如使用安装磁盘,系统救援CD等)并在你**卸载**的分区上运行 `fsck` 。要检查是否有任何问题,请在使用 root 权限运行下面的命令: + + fsck -fn [/path/to/your/partition] + +您可以运行以下命令找到分区的路径 + + sudo fdisk -l + +有一个在已挂载的分区中运行 `fsck`(相对)安全的方法是使用`-n`开关。这会对分区进行只读文件系统检查,而不会写入任何东西。当然,这并不能保证十分安全,你应该在创建备份之后进行。在 ext2 中,运行 + + sudo fsck.ext2 -fn /path/to/your/partition + +这会产生大量的输出,大多数错误信息的原因是分区已经挂载了。最后会给出一个碎片相关的信息。 + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-fsck.png) + +如果碎片率大于 20% 了,那么你应该开始整理你的磁盘碎片了。 + +### 如何简单地在 Linux 中整理碎片 ### + +你要做的是备份你**所有**的文件和数据到另外一块硬盘中(手动**复制**他们),格式化分区,然后重新复制回去(不要使用备份软件)。日志型文件系统会把它们作为新的文件,并将它们整齐地放置到磁盘中而不产生碎片。 + +要备份你的文件,运行 + + cp -afv [/path/to/source/partition]/* [/path/to/destination/folder] + +记住星号(*)是很重要的。 + +注意:通常认为复制大文件或者大量文件,使用 `dd` 或许是最好的。这是一个非常底层的操作,它会复制一切,包含空闲的空间甚至是留下的垃圾。这不是我们想要的,因此这里最好使用 `cp`。 + +现在你只需要删除源文件。 + + sudo rm -rf [/path/to/source/partition]/* + +**可选**:你可以使用如下命令将空闲空间用零填充。也可以用格式化来达到这点,但是如果你并没有复制整个分区而仅仅是复制大文件(它通常会形成碎片)的话,就不应该使用格式化的方法了。 + + sudo dd if=/dev/zero of=[/path/to/source/partition]/temp-zero.txt + +等待它结束。你可以用 `pv` 来监测进度。 + + sudo apt-get install pv + sudo pv -tpreb | of=[/path/to/source/partition]/temp-zero.txt + +![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-dd.png) + +这就完成了,只要删除这个用于填充的临时文件就行。 + + sudo rm [/path/to/source/partition]/temp-zero.txt + +待你清零了空闲空间(或者跳过了这步)。重新复制回文件,将第一个`cp`命令翻转一下: + + cp -afv [/path/to/original/destination/folder]/* [/path/to/original/source/partition] + +### 使用 e4defrag ### + +如果你想要简单的方法,安装 `e2fsprogs`, + + sudo apt-get install e2fsprogs + +用 root 权限在分区中运行 `e4defrag`。如果你不想或不能卸载该分区,你可以使用它的挂载点而不是路径。要整理整个系统的碎片,运行: + + sudo e4defrag / + +在挂载的情况下不保证成功(你也应该在它运行时不要使用你的系统),但是它比复制全部文件再重新复制回来简单多了。 + +### 总结 ### + +linux 系统中由于它的日志型文件系统有效的数据处理很少会出现碎片。如果你因任何原因产生了碎片,简单的方法是重新分配你的磁盘,如复制出去所有文件并复制回来,或者使用`e4defrag`。然而重要的是保证你数据的安全,因此在进行任何可能影响你全部或者大多数文件的操作之前,确保你的文件已经被备份到了另外一个安全的地方去了。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/defragment-linux/ + +作者:[Attila Orosz][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/attilaorosz/ diff --git a/translated/tech/20150901 How to Defragment Linux Systems.md b/translated/tech/20150901 How to Defragment Linux Systems.md deleted file mode 100644 index 49d16a8f18..0000000000 --- a/translated/tech/20150901 How to Defragment Linux Systems.md +++ /dev/null @@ -1,125 +0,0 @@ -如何在Linux中整理磁盘碎片 -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-featured.png) - -有一神话是linux的磁盘从来不需要整理碎片。在大多数情况下这是真的,大多数因为是使用的是优秀的日志系统(ext2、3、4等等)来处理文件系统。然而,在一些特殊情况下,碎片仍旧会产生。如果正巧发生在你身上,解决方法很简单。 - -### 什么是磁盘碎片 ### - -碎片发生在不同的小块中更新文件时,但是这些快没有形成连续完整的文件而是分布在磁盘的各个角落中。这对于FAT和FAT32文件系统而言是这样的。这在NTFS中有所减轻,在Linux(extX)中几乎不会发生。下面是原因。 - -在像FAT和FAT32这类文件系统中,文件紧挨着写入到磁盘中。文件之间没有空间来用于增长或者更新: - -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-fragmented.png) - -NTFS中在文件之间保留了一些空间,因此有空间进行增长。因为块之间的空间是有限的,碎片也会随着时间出现。 - -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-ntfs.png) - -Linux的日志文件系统采用了一个不同的方案。与文件之间挨着不同,每个文件分布在磁盘的各处,每个文件之间留下了大量的剩余空间。这里有很大的空间用于更新和增长,并且碎片很少会发生。 - -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-journal.png) - -此外,碎片一旦出现了,大多数Linux文件系统会尝试将文件和块重新连续起来。 - -### Linux中的磁盘整理 ### - -除非你用的是一个很小的硬盘或者空间不够了,不然Linux很少会需要磁盘整理。一些可能需要磁盘整理的情况包括: - -- 如果你编辑的是大型视频文件或者原生照片,但磁盘空间有限 -- if you use older hardware like an old laptop, and you have a small hard drive -- 如果你的磁盘开始满了(大约使用了85%) -- 如果你的家目录中有许多小分区 - -最好的解决方案是购买一个大硬盘。如果不可能,磁盘碎片整理就很有用了。 - -### 如何检查碎片 ### - -`fsck`命令会为你做这个 -也就是说如果你可以在liveCD中运行它,那么就可以**卸载所有的分区**。 - -这一点很重要:**在已经挂载的分区中运行fsck将会严重危害到你的数据和磁盘**。 - -你已经被警告过了。开始之前,先做一个完整的备份。 - -**免责声明**: 本文的作者与Make Tech Easier将不会对您的文件、数据、系统或者其他损害负责。你需要自己承担风险。如果你继续,你需要接收并了解这点。 - -你应该启动到一个live会话中(如安装磁盘,系统救援CD等)并运行`fsck`卸载分区。要检查是否有任何问题,请在运行root权限下面的命令: - - fsck -fn [/path/to/your/partition] - -您可以检查一下运行中的分区的路径 - - sudo fdisk -l - -有一个(相对)安全地在已挂载的分区中运行`fsck`的方法是使用‘-n’开关。这会让分区处在只读模式而不能创建任何文件。当然,这里并不能保证安全,你应该在创建备份之后进行。在ext2中,运行 - - sudo fsck.ext2 -fn /path/to/your/partition - -会产生大量的输出-- 大多数错误信息的原因是分区已经挂载了。最后会给出一个碎片相关的信息。 - -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-fsck.png) - -如果碎片大于20%了,那么你应该开始整理你的磁盘碎片了。 - -### 如何简单地在Linux中整理碎片 ### - -你要做的是备份你**所有**的文件和数据到另外一块硬盘中(手动**复制**他们)。格式化分区然后重新复制回去(不要使用备份软件)。日志系统会把它们作为新的文件,并将它们整齐地放置到磁盘中而不产生碎片。 - -要备份你的文件,运行 - - cp -afv [/path/to/source/partition]/* [/path/to/destination/folder] - -记住星号(*)是很重要的。 - -注意:通常认为复制大文件或者大量文件,使用dd或许是最好的。这是一个非常底层的操作,它会复制一切,包含空闲的空间甚至是留下的垃圾。这不是我们想要的,因此这里最好使用`cp`。 - -现在你只需要删除源文件。 - - sudo rm -rf [/path/to/source/partition]/* - -**可选**:你可以将空闲空间置零。你也可以用格式化来达到这点,但是例子中你并没有复制整个分区而仅仅是大文件(这很可能会造成碎片)。这恐怕不能成为一个选项。 - - sudo dd if=/dev/zero of=[/path/to/source/partition]/temp-zero.txt - -等待它结束。你可以用`pv`来监测进程。 - - sudo apt-get install pv - sudo pv -tpreb | of=[/path/to/source/partition]/temp-zero.txt - -![](https://www.maketecheasier.com/assets/uploads/2015/07/defragment-linux-dd.png) - -这就完成了,只要删除临时文件就行。 - - sudo rm [/path/to/source/partition]/temp-zero.txt - -待你清零了空闲空间(或者跳过了这步)。重新复制回文件,将第一个cp命令翻转一下: - - cp -afv [/path/to/original/destination/folder]/* [/path/to/original/source/partition] - -### 使用 e4defrag ### - -如果你想要简单的方法,安装`e2fsprogs`, - - sudo apt-get install e2fsprogs - -用root权限在分区中运行 `e4defrag`。如果你不想卸载分区,你可以使用它的挂载点而不是路径。要整理整个系统的碎片,运行: - - sudo e4defrag / - -在挂载的情况下不保证成功(你也应该保证在它运行时停止使用你的系统),但是它比服务全部文件再重新复制回来简单多了。 - -### 总结 ### - -linux系统中很少会出现碎片因为它的文件系统有效的数据处理。如果你因任何原因产生了碎片,简单的方法是重新分配你的磁盘如复制所有文件并复制回来,或者使用`e4defrag`。然而重要的是保证你数据的安全,因此在进行任何可能影响你全部或者大多数文件的操作之前,确保你的文件已经被备份到了另外一个安全的地方去了。 - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/defragment-linux/ - -作者:[Attila Orosz][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.maketecheasier.com/author/attilaorosz/ From 9526719928404fb3ab25b040d4400cfafb9cecba Mon Sep 17 00:00:00 2001 From: Mike Tang Date: Fri, 25 Sep 2015 17:46:10 +0800 Subject: [PATCH 2157/2517] mikecoder translating... --- ... Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md b/sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md index 532004d419..1b743f7b27 100644 --- a/sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md +++ b/sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md @@ -1,3 +1,5 @@ +mikecoder translating... + Xenlism WildFire: Minimal Icon Theme For Linux Desktop ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icon-theme-linux-3.png) @@ -83,4 +85,4 @@ via: http://itsfoss.com/xenlism-wildfire-theme/ [3]:https://plus.google.com/+NattapongPullkhow [4]:http://itsfoss.com/install-numix-ubuntu/ [5]:http://itsfoss.com/install-switch-themes-gnome-shell/ -[6]:https://twitter.com/share?text=Xenlism+is+a+stunning+minimal+icon+theme+for+Linux.+Thanks+%40xenatt+for+this+beautiful+theme.&via=itsfoss&related=itsfoss&url=http://itsfoss.com/xenlism-wildfire-theme/ \ No newline at end of file +[6]:https://twitter.com/share?text=Xenlism+is+a+stunning+minimal+icon+theme+for+Linux.+Thanks+%40xenatt+for+this+beautiful+theme.&via=itsfoss&related=itsfoss&url=http://itsfoss.com/xenlism-wildfire-theme/ From a54750182f74f48f767a55cad904a3c209271dc2 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 25 Sep 2015 23:02:15 +0800 Subject: [PATCH 2158/2517] Translating sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md --- .../20150923 How To Upgrade From Oracle 11g To Oracle 12c.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md b/sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md index 103f3922a5..a43b5e2ac5 100644 --- a/sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md +++ b/sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md @@ -1,3 +1,4 @@ +ictlyh Translating How To Upgrade From Oracle 11g To Oracle 12c ================================================================================ Hello all. From 8cee9b8333a01ffe3bcc2bb39add7a1de52b37a1 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 26 Sep 2015 08:55:14 +0800 Subject: [PATCH 2159/2517] PUB:20150906 How to Install QGit Viewer in Ubuntu 14.04 @geekpi --- ... to Install QGit Viewer in Ubuntu 14.04.md | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150906 How to Install QGit Viewer in Ubuntu 14.04.md (70%) diff --git a/translated/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md b/published/20150906 How to Install QGit Viewer in Ubuntu 14.04.md similarity index 70% rename from translated/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md rename to published/20150906 How to Install QGit Viewer in Ubuntu 14.04.md index 317e610a6f..e841c7f645 100644 --- a/translated/tech/20150906 How to Install QGit Viewer in Ubuntu 14.04.md +++ b/published/20150906 How to Install QGit Viewer in Ubuntu 14.04.md @@ -1,8 +1,9 @@ -如何在Ubuntu中安装QGit浏览器 +如何在 Ubuntu 中安装 QGit 客户端 ================================================================================ -QGit是一款Marco Costalba用Qt和C++写的开源GUI Git浏览器。它是一款在GUI环境下更好地提供浏览历史记录、提交记录和文件补丁的浏览器。它利用git命令行来执行并显示输出。它有一些常规的功能像浏览历史、比较、文件历史、文件标注、档案树。我们可以格式化并用选中的提交应用补丁,在两个实例之间拖拽并提交等等。它允许我们创建自定义的按钮来用它内置的生成器来执行特定的命令。 -这里有简单的几步在Ubuntu 14.04 LTS "Trusty"中编译并安装QGit浏览器。 +QGit是一款由Marco Costalba用Qt和C++写的开源的图形界面 Git 客户端。它是一款可以在图形界面环境下更好地提供浏览版本历史、查看提交记录和文件补丁的客户端。它利用git命令行来执行并显示输出。它有一些常规的功能像浏览版本历史、比较、文件历史、文件标注、归档树。我们可以格式化并用选中的提交应用补丁,在两个或多个实例之间拖拽并提交等等。它允许我们用它内置的生成器来创建自定义的按钮去执行特定的命令。 + +这里有简单的几步在Ubuntu 14.04 LTS "Trusty"中编译并安装QGit客户端。 ### 1. 安装 QT4 库 ### @@ -16,7 +17,7 @@ QGit是一款Marco Costalba用Qt和C++写的开源GUI Git浏览器。它是一 $ sudo apt-get install git -现在,我们要使用下面的git命令来克隆仓库。 +现在,我们要使用下面的git命令来克隆QGit客户端的仓库。 $ git clone git://repo.or.cz/qgit4/redivivus.git @@ -30,25 +31,25 @@ QGit是一款Marco Costalba用Qt和C++写的开源GUI Git浏览器。它是一 ### 3. 编译 QGit ### -克隆之后,我们现在进入redivivus的目录,并创建我们编译需要的makefile文件。因此,要进入目录,我们要运行下面的命令。 +克隆之后,我们现在进入redivivus的目录,并创建我们编译需要的makefile文件。进入目录,运行下面的命令。 $ cd redivivus -接下来,我们运行下面的命令从qmake项目也就是qgit.pro来生成新的Makefile。 +接下来,我们运行下面的命令从qmake项目文件(qgit.pro)来生成新的Makefile。 $ qmake qgit.pro -生成Makefile之后,我们现在终于要编译qgit的源代码并得到二进制的输出。首先我们要安装make和g++包用于编译,因为这是一个用C++写的程序。 +生成Makefile之后,我们现在终于可以编译qgit的源代码并生成二进制。首先我们要安装make和g++包用于编译,因为这是一个用C++写的程序。 $ sudo apt-get install make g++ -现在,我们要用make命令来编译代码了 +现在,我们要用make命令来编译代码了。 $ make ### 4. 安装 QGit ### -成功编译QGit的源码之后,我们就要在Ubuntu 14.04中安装它了,这样就可以在系统中执行它。因此我们将运行下面的命令、 +成功编译QGit的源码之后,我们就要在Ubuntu 14.04中安装它了,这样就可以在系统中执行它。因此我们将运行下面的命令。 $ sudo make install @@ -75,30 +76,30 @@ QGit是一款Marco Costalba用Qt和C++写的开源GUI Git浏览器。它是一 [Desktop Entry] Name=qgit - GenericName=git GUI viewer + GenericName=git 图形界面 viewer Exec=qgit Icon=qgit Type=Application - Comment=git GUI viewer + Comment=git 图形界面 viewer Terminal=false MimeType=inode/directory; Categories=Qt;Development;RevisionControl; 完成之后,保存并退出。 -### 6. 运行 QGit 浏览器 ### +### 6. 运行 QGit 客户端 ### QGit安装完成之后,我们现在就可以从任何启动器或者程序菜单中启动它了。要在终端下面运行QGit,我们可以像下面那样。 $ qgit -这会打开基于Qt4框架GUI模式的QGit。 +这会打开基于Qt4框架图形界面模式的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使得我们的工作更加简单和快速。 +QGit是一个很棒的基于QT的git客户端。它可以在Linux、MAC OSX和 Microsoft Windows所有这三个平台中运行。它帮助我们很容易地浏览历史、版本、分支等等git仓库提供的信息。它减少了使用命令行的方式去执行诸如浏览版本、历史、比较功能的需求,并用图形化的方式来简化了这些任务。最新的qgit版本也在默认仓库中,你可以使用 **apt-get install qgit** 命令来安装。因此,QGit用它简单的图形界面使得我们的工作更加简单和快速。 -------------------------------------------------------------------------------- @@ -106,7 +107,7 @@ 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) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 911b3e616e9025b6211b90461709b311b871cc80 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 26 Sep 2015 10:14:24 +0800 Subject: [PATCH 2160/2517] PUB:RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs @xiqingongzi --- ...ks with Cron and Monitoring System Logs.md | 199 ++++++++++++++++++ ...ks with Cron and Monitoring System Logs.md | 195 ----------------- 2 files changed, 199 insertions(+), 195 deletions(-) create mode 100644 published/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md delete mode 100644 translated/tech/RHCSA/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md diff --git a/published/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md b/published/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md new file mode 100644 index 0000000000..b6805bbf4c --- /dev/null +++ b/published/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md @@ -0,0 +1,199 @@ +RHCSA 系列(九): Yum 包管理、Cron 自动任务计划和监控系统日志 +================================================================================ + +在这篇文章中,我们将回顾如何在 RHEL7 中安装,更新和删除软件包。我们还将介绍如何使用 cron 进行任务自动化,并完成如何查找和监控系统日志文件,以及为什么这些技能是系统管理员必备技能。 + +![Yum Package Management Cron Jobs Log Monitoring Linux](http://www.tecmint.com/wp-content/uploads/2015/05/Yum-Package-Management-Cron-Job-Log-Monitoring-Linux.jpg) + +*RHCSA: Yum包管理、任务计划和系统监控 – Part 10* + +### 使用yum 管理包 ### + +要安装一个包以及所有尚未安装的依赖包,您可以使用: + + # yum -y install package_name(s) + +package_name(s) 需要是至少一个真实的软件包名 + +例如,安装 httpd 和 mlocate(按顺序),输入。 + + # yum -y install httpd mlocate + +**注意**: 字符 y 表示绕过执行下载和安装前的确认提示。如果需要提示,你可以不用它。 + +默认情况下,yum 将安装与操作系统体系结构相匹配的包,除非通过在包名加入架构名。 + +例如,在 64 位系统上,`yum install package`将安装包的 x86_64 版本,而 `yum install package.x86`(如果有的话)将安装 32 位的。 + +有时,你想安装一个包,但不知道它的确切名称。`search all` 选项可以在当前启用的软件库中的包名称和包描述中搜索它,或者`search`选项可以在包名称中搜索。 + +比如, + + # yum search log + +将搜索安装的软件库中名字和摘要与该词(log)类似的软件,而 + + # yum search all log + +也将在包描述和网址中寻找寻找相同的关键字。 + +一旦搜索返回包列表,您可能希望在安装前显示一些信息。这时 info 选项派上了用场: + + # yum info logwatch + +![Search Package Information](http://www.tecmint.com/wp-content/uploads/2015/05/Search-Package-Information.png) + +*搜索包信息* + +您可以定期用以下命令检查更新: + + # yum check-update + +上述命令将返回可以更新的所有已安装的软件包。在下图所示的例子中,只有 rhel-7-server-rpms 有可用更新: + +![Check For Package Updates](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-Updates.png) + +*检查包更新* + +然后,您可以更新该包, + + # yum update rhel-7-server-rpms + +如果有几个包可以一同更新,可以使用 ` yum update` 一次性更新所有的包。 + +当你知道一个可执行文件的名称,如 ps2pdf,但不知道那个包提供了它?你可以通过 `yum whatprovides “*/[executable]”`找到: + + # yum whatprovides “*/ps2pdf” + +![Find Package Belongs to Which Package](http://www.tecmint.com/wp-content/uploads/2015/05/Find-Package-Information.png) + +*查找文件属于哪个包* + +当删除包时,你可以使用 `yum remove Package` ,很简单吧?Yum 是一个完整而强大的包管理器。 + + # yum remove httpd + +- 参见: [20 个管理 RHEL 7 软件包的 Yum 命令][1] + +### 文本式 RPM 工具 ### + +RPM(又名 RPM 包管理器,原意是 RedHat 软件包管理器)也可用于安装或更新独立的`rpm`格式的软件包。 + +往往使用 `-Uvh` 表明如果这个包没有安装就安装它,如果已存在就尝试更新。这里`-U`表示更新、`-v`表示显示详细输出,用`-h`显示进度条。例如 + + # rpm -Uvh package.rpm + +rpm 的另一个典型的使用方法是列出所有安装的软件包, + + # rpm -qa + +![Query All RPM Packages](http://www.tecmint.com/wp-content/uploads/2015/05/Query-All-RPM-Packages.png) + +*查询所有包* + +- 参见: [20 个管理 RHEL 7 软件包的 RPM 命令][2] + +### 使用 Cron 调度任务 ### + +Linux 和 UNIX 类操作系统包括一个称为 Cron 的工具,允许你周期性调度任务(即命令或 shell 脚本)。cron 会每分钟定时检查 /var/spool/cron 目录中有在 /etc/passwd 帐户文件中指定用户名的文件。 + +执行命令时,命令输出是发送到该 crontab 的所有者(或者可以在 /etc/crontab,通过 MAILTO 环境变量中指定用户)。 + +crontab 文件(可以通过键入 `crontab -e`并按 Enter 键创建)的格式如下: + +![Crontab Entries](http://www.tecmint.com/wp-content/uploads/2015/05/Crontab-Format.png) + +*crontab条目* + +因此,如果我们想在每个月第二天上午2:15更新本地文件数据库(用于按名字或通配模式定位文件),我们需要添加以下 crontab 条目: + + 15 02 2 * * /bin/updatedb + +以上的条目的意思是:”每年每月第二天的凌晨 2:15 运行 /bin/updatedb,无论是周几”,我想你也猜到了。星号作为通配符。 + +正如我们前面所提到的,添加一个 cron 任务后,你可以看到一个名为 root 的文件被添加在 /var/spool/cron。该文件列出了所有的 crond 守护进程应该运行的任务: + + # ls -l /var/spool/cron + +![Check All Cron Jobs](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Cron-Jobs.png) + +*检查所有cron任务* + +在上图中,显示当前用户的 crontab 可以使用 `cat /var/spool/cron` 或 + + # crontab -l + +如果你需要在一个更精细的时间上运行的任务(例如,一天两次或每月三次),cron 也可以做到。 + +例如,每个月1号和15号运行 /my/script 并将输出导出到 /dev/null (丢弃输出),您可以添加如下两个crontab 条目: + + 01 00 1 * * /myscript > /dev/null 2>&1 + 01 00 15 * * /my/script > /dev/null 2>&1 + +不过为了简单,你可以将他们合并: + + 01 00 1,15 * * /my/script > /dev/null 2>&1 + +跟着前面的例子,我们可以在每三个月的第一天的凌晨1:30运行 /my/other/script。 + + 30 01 1 1,4,7,10 * /my/other/script > /dev/null 2>&1 + +但是当你必须每隔某分钟、小时、天或月来重复某个任务时,你可以通过所需的频率来划分正确的时间。以下与前一个 crontab 条目具有相同的意义: + + 30 01 1 */3 * /my/other/script > /dev/null 2>&1 + +或者也许你需要在一个固定的频率或系统启动后运行某个固定的工作,你可以使用下列五个字符串中的一个字符串来指示你想让你的任务计划工作的确切时间: + + @reboot 仅系统启动时运行 + @yearly 一年一次, 类似与 00 00 1 1 * + @monthly 一月一次, 类似与 00 00 1 * * + @weekly 一周一次, 类似与 00 00 * * 0 + @daily 一天一次, 类似与 00 00 * * * + @hourly 一小时一次, 类似与 00 * * * * + +- 参见:[11 个在 RHEL7 中调度任务的命令][3] + +### 定位和查看日志### + +系统日志存放(并轮转)在 /var/log 目录。根据 Linux 的文件系统层次标准(Linux Filesystem Hierarchy Standard),这个目录包括各种日志文件,并包含一些必要的子目录(如 audit、 httpd 或 samba ,如下图),并由相应的系统守护进程操作: + + # ls /var/log + +![Linux Log Files Location](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-Log-Files.png) + +*Linux 日志的位置* + +其他感兴趣的日志比如 [dmesg][4](包括了所有内核层缓冲区的消息),secure(记录要求用户认证的连接请求),messages(系统级信息),和 wtmp(记录了所有用户的登录、登出)。 + +日志是非常重要的,它们让你可以看到任何时刻发生在你的系统的事情,以及已经过去的事情。他们是无价的工具,可以排错和监测一个 Linux 服务器,通常使用 `tail -f` 命令来实时显示正在发生和写入日志的事件。 + +举个例子,如果你想看你的内核相关的日志,你需要输入如下命令: + + # tail -f /var/log/dmesg + +同样的,如果你想查看你的 Web 服务器日志,你需要输入如下命令: + + # tail -f /var/log/httpd/access.log + +### 总结 ### + +如果你知道如何有效的管理包、调度任务、以及知道在哪寻找系统当前和过去操作的信息,你可以放松工作而不会总被吓到。我希望这篇文章能够帮你学习或回顾这些基础知识。 + +如果你有任何问题或意见,请使用下面的表单反馈给我们。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/yum-package-management-cron-job-scheduling-monitoring-linux-logs/ + +作者:[Gabriel Cánepa][a] +译者:[xiqingongzi](https://github.com/xiqingongzi) +校对:[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/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ +[2]:http://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/ +[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ +[4]:http://www.tecmint.com/dmesg-commands/ + diff --git a/translated/tech/RHCSA/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md b/translated/tech/RHCSA/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md deleted file mode 100644 index 3456361c0c..0000000000 --- a/translated/tech/RHCSA/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md +++ /dev/null @@ -1,195 +0,0 @@ -[xiqingongzi translating] -RHCSA Series: Yum 包管理, 自动任务计划和系统监控日志 – Part 10 -================================================================================ -在这篇文章中,我们将回顾如何在REHL7中安装,更新和删除软件包。我们还将介绍如何使用cron任务的自动化,并完成如何查找和监控系统日志文件以及为什么这些技能是系统管理员必备技能 - -![Yum Package Management Cron Jobs Log Monitoring Linux](http://www.tecmint.com/wp-content/uploads/2015/05/Yum-Package-Management-Cron-Job-Log-Monitoring-Linux.jpg) - -RHCSA: Yum包管理, 任务计划和系统监控 – 第十章 - -### 使用yum 管理包 ### - -要安装一个包以及所有尚未安装的依赖包,您可以使用: - - # yum -y install package_name(s) - - package_name(s) 需要是一个存在的包名 - -例如,安装httpd和mlocate(按顺序),类型。 - - # yum -y install httpd mlocate - -**注意**: 字符y表示绕过执行下载和安装前的确认提示,如果需要,你可以删除它 - -默认情况下,yum将安装与操作系统体系结构相匹配的包,除非通过在包名加入架构名 - -例如,在64位系统上,使用yum安装包将安装包的x86_64版本,而package.x86 yum安装(如果有的话)将安装32位。 - -有时,你想安装一个包,但不知道它的确切名称。搜索可以在当前启用的存储库中去搜索包名称或在它的描述中搜索,并分别进行。 - -比如, - - # yum search log - -将搜索安装的软件包中名字与该词类似的软件,而 - - # yum search all log - -也将在包描述和网址中寻找寻找相同的关键字 - -一旦搜索返回包列表,您可能希望在安装前显示一些信息。这时info选项派上用场: - - # yum info logwatch - -![Search Package Information](http://www.tecmint.com/wp-content/uploads/2015/05/Search-Package-Information.png) - -搜索包信息 - -您可以定期用以下命令检查更新: - - # yum check-update - -上述命令将返回可以更新的所有安装包。在下图所示的例子中,只有rhel-7-server-rpms有可用更新: - -![Check For Package Updates](http://www.tecmint.com/wp-content/uploads/2015/05/Check-For-Updates.png) -检查包更新 - -然后,您可以更新该包, - - # yum update rhel-7-server-rpms - -如果有几个包,可以一同更新,yum update 将一次性更新所有的包 - -现在,当你知道一个可执行文件的名称,如ps2pdf,但不知道那个包提供了它?你可以通过 `yum whatprovides “*/[executable]”`找到: - - # yum whatprovides “*/ps2pdf” - -![Find Package Belongs to Which Package](http://www.tecmint.com/wp-content/uploads/2015/05/Find-Package-Information.png) - -查找文件属于哪个包 - -现在,当删除包时,你可以使用 yum remove Package ,很简单吧?Yum 是一个完整的强大的包管理器。 - - # yum remove httpd - -Read Also: [20 Yum Commands to Manage RHEL 7 Package Management][1] - -### 文本式RPM工具 ### - -RPM(又名RPM包管理器,或原本RedHat软件包管理器)也可用于安装或更新软件包来当他们在独立`rpm`包装形式。 - -往往使用`-Uvh` 表面这个包应该被安装而不是已存在或尝试更新。安装是`-U` ,显示详细输出用`-v`,显示进度条用`-h` 例如 - # rpm -Uvh package.rpm - -另一个典型的使用rpm 是产生一个列表,目前安装的软件包的code > rpm -qa(缩写查询所有) - - # rpm -qa - -![Query All RPM Packages](http://www.tecmint.com/wp-content/uploads/2015/05/Query-All-RPM-Packages.png) - -查询所有包 - -Read Also: [20 RPM Commands to Install Packages in RHEL 7][2] - -### Cron任务计划 ### - -Linux和UNIX类操作系统包括其他的工具称为Cron允许你安排任务(即命令或shell脚本)运行在周期性的基础上。每分钟定时检查/var/spool/cron目录中有在/etc/passwd帐户文件中指定名称的文件。 - -执行命令时,输出是发送到crontab的所有者(或者在/etc/crontab,在MailTO环境变量中指定的用户,如果它存在的话)。 - -crontab文件(这是通过键入crontab e和按Enter键创建)的格式如下: - -![Crontab Entries](http://www.tecmint.com/wp-content/uploads/2015/05/Crontab-Format.png) - -crontab条目 - -因此,如果我们想更新本地文件数据库(这是用于定位文件或图案)每个初二日上午2:15,我们需要添加以下crontab条目: - - 15 02 2 * * /bin/updatedb - -以上的条目写着:”每年每月第二天的凌晨2:15运行 /bin/updatedb“ 无论是周几”,我想你也猜到了。星号作为通配符 - -添加一个cron作业后,你可以看到一个文件名为root被添加在/var/spool/cron,正如我们前面所提到的。该文件列出了所有的crond守护进程运行的任务: - - # ls -l /var/spool/cron - -![Check All Cron Jobs](http://www.tecmint.com/wp-content/uploads/2015/05/Check-All-Cron-Jobs.png) - -检查所有cron工作 - -在上图中,显示当前用户的crontab可以使用 cat /var/spool/cron 或 - - # crontab -l - -如果你需要在一个更精细的时间上运行的任务(例如,一天两次或每月三次),cron也可以帮助你。 - -例如,每个月1号和15号运行 /my/script 并将输出导出到 /dev/null,您可以添加如下两个crontab条目: - - 01 00 1 * * /myscript > /dev/null 2>&1 - 01 00 15 * * /my/script > /dev/null 2>&1 - -不过为了简单,你可以将他们合并 - - 01 00 1,15 * * /my/script > /dev/null 2>&1 -在前面的例子中,我们可以在每三个月的第一天的凌晨1:30运行 /my/other/script . - - 30 01 1 1,4,7,10 * /my/other/script > /dev/null 2>&1 - -但是当你必须每一个“十”分钟,数小时,数天或数月的重复某个任务时,你可以通过所需的频率来划分正确的时间。以下为前一个crontab条目具有相同的意义: - - 30 01 1 */3 * /my/other/script > /dev/null 2>&1 - -或者也许你需要在一个固定的时间段或系统启动后运行某个固定的工作,例如。你可以使用下列五个字符串中的一个字符串来指示你想让你的任务计划工作的确切时间: - - @reboot 仅系统启动时运行. - @yearly 一年一次, 类似与 00 00 1 1 *. - @monthly 一月一次, 类似与 00 00 1 * *. - @weekly 一周一次, 类似与 00 00 * * 0. - @daily 一天一次, 类似与 00 00 * * *. - @hourly 一小时一次, 类似与 00 * * * *. - -Read Also: [11 Commands to Schedule Cron Jobs in RHEL 7][3] - -### 定位和查看日志### - -系统日志存放在 /var/log 目录.根据Linux的文件系统层次标准,这个目录包括各种日志文件,并包含一些必要的子目录(如 audit, httpd, 或 samba ,如下图),并由相应的系统守护进程操作 - - # ls /var/log - -![Linux Log Files Location](http://www.tecmint.com/wp-content/uploads/2015/05/Linux-Log-Files.png) - -Linux 日志定位 - -其他有趣的日志比如 [dmesg][4](包括了所有内核缓冲区的信息),安全(用户认证尝试链接),信息(系统信息),和wtmp(记录了所有用户的登录登出) - -日志是非常重要的,他们让你可以看到是任何时刻发生在你的系统的事情,甚至是已经过去的事情。他们是无价的工具,解决和监测一个Linux服务器,并因此经常使用的 “tail -f command ”来实时显示正在发生并实时写入的事件。 - -举个例子,如果你想看你的内核的日志,你需要输入如下命令 - - # tail -f /var/log/dmesg - -同样的,如果你想查看你的网络服务器日志,你需要输入如下命令 - - # tail -f /var/log/httpd/access.log - -### 总结 ### - -如果你知道如何有效的管理包,安排任务,以及知道在哪寻找系统当前和过去操作的信息,你可以放心你将不会总是有太多的惊喜。我希望这篇文章能够帮你学习或回顾这些基础知识。 - -如果你有任何问题或意见,请使用下面的表格反馈给我们。 --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/yum-package-management-cron-job-scheduling-monitoring-linux-logs/ - -作者:[Gabriel Cánepa][a] -译者:[xiqingongzi](https://github.com/xiqingongzi) -校对:[校对者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/20-linux-yum-yellowdog-updater-modified-commands-for-package-mangement/ -[2]:http://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/ -[3]:http://www.tecmint.com/11-cron-scheduling-task-examples-in-linux/ -[4]:http://www.tecmint.com/dmesg-commands/ - From 698ec9bfbda32746c99ff85eb431711748ebf1a3 Mon Sep 17 00:00:00 2001 From: Mike Tang Date: Sat, 26 Sep 2015 11:04:02 +0800 Subject: [PATCH 2161/2517] translated/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md --- ...e--Minimal Icon Theme For Linux Desktop.md | 88 ------------------- ...e--Minimal Icon Theme For Linux Desktop.md | 86 ++++++++++++++++++ 2 files changed, 86 insertions(+), 88 deletions(-) delete mode 100644 sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md create mode 100644 translated/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md diff --git a/sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md b/sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md deleted file mode 100644 index 1b743f7b27..0000000000 --- a/sources/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md +++ /dev/null @@ -1,88 +0,0 @@ -mikecoder translating... - -Xenlism WildFire: Minimal Icon Theme For Linux Desktop -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icon-theme-linux-3.png) - -It’s been some time that I covered an icon theme on It’s FOSS. Perhaps because no theme caught my eyes in recent times. There are a few which I consider the [best icon themes for Ubuntu][1] but these are mostly the known ones like Numix and Moka and I am pretty content using Numix. - -But a few days back I came across this [Xenslim WildFire][2] and I must say, it looks damn good. Minimalism is the current popular trend in the design world and Xenlism perfects it. Smooth and tranquil, Xenlism is inspired by Nokia’s meego and Apple iOS icon. - -Have a look at some of its icons for various applications: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons.png) - -Folder icons look like: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons-1.png) - -Theme developer, [Nattapong Pullkhow][3], claims that the icon theme is best suited for GNOME but it should work fine with Unity, KDE and Mate as well. - -### Install Xenlism Wildfire icon theme ### - -Xenlism Theme is around 230 MB in download size which is slightly heavy for an icon theme but considering that it has support for a huge number of applications, the size should not be surprising. - -#### Installing in Ubuntu/Debian based Linux distributions #### - -To install it in Ubuntu variants, use the command below in a terminal to add the GPG key: - - sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 90127F5B - -After adding the key, use the following commands: - - echo "deb http://downloads.sourceforge.net/project/xenlism-wildfire/repo deb/" | sudo tee -a /etc/apt/sources.list - sudo apt-get update - sudo apt-get install xenlism-wildfire-icon-theme - -In addition to the icon theme, you can download a matching minimal wallpaper as well: - - sudo apt-get install xenlism-artwork-wallpapers - -#### Installing in Arch based Linux distributions #### - -You’ll have to edit the Pacman repository. In a terminal, use the following command: - - sudo nano /etc/pacman.conf - -Add the following section to this configuration file: - - [xenlism-arch] - SigLevel = Never - Server = http://downloads.sourceforge.net/project/xenlism-wildfire/repo/arch - -Update the system and install icon theme and wallpapers as following: - - sudo pacman -Syyu - sudo pacman -S xenlism-wildfire - -#### Using Xenlism icon theme #### - -In Ubuntu Unity, [use Unity Tweak Tool to change the icon theme][4]. In GNOME, [use Gnome Tweak Tool to change the theme][5]. I presume that you know how to do this part, but if you are stuck let me know and I’ll add some screenshots. - -Below is a screenshot of Xenlism icon theme in use in Ubuntu 15.04 Unity. Xenlism desktop wallpaper is in the background. - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons-2.png) - -It looks good, isn’t it? If you try it and like it, feel free to thank the developer: - -> [Xenlism is a stunning minimal icon theme for Linux. Thanks @xenatt for this beautiful theme.][6] - -I hope you like it. Do share your views on this icon theme or your preferred icon theme. Is Xenlism good enough to change your favorite icon theme? - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/xenlism-wildfire-theme/ - -作者:[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://itsfoss.com/best-icon-themes-ubuntu-1404/ -[2]:http://xenlism.github.io/wildfire/ -[3]:https://plus.google.com/+NattapongPullkhow -[4]:http://itsfoss.com/install-numix-ubuntu/ -[5]:http://itsfoss.com/install-switch-themes-gnome-shell/ -[6]:https://twitter.com/share?text=Xenlism+is+a+stunning+minimal+icon+theme+for+Linux.+Thanks+%40xenatt+for+this+beautiful+theme.&via=itsfoss&related=itsfoss&url=http://itsfoss.com/xenlism-wildfire-theme/ diff --git a/translated/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md b/translated/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md new file mode 100644 index 0000000000..5bd7655a9e --- /dev/null +++ b/translated/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md @@ -0,0 +1,86 @@ +Xenlism WildFire: 一个精美的 Linux 桌面版主题 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icon-theme-linux-3.png) + +有那么一段时间,我一直使用一个主题,没有更换过。可能是在最近的一段时间都没有一款主题能满足我的需求。有那么一些我认为是[Ubuntu 上最好的图标主题][1],比如 Numix 和 Moka,并且,我一直也对 Numix 比较满意。 + +但是,一段时间后,我使用了[Xenslim WildFire][2],并且我必须承认,他看起来太好了。Minimail 是当前比较流行的设计趋势。并且 Xenlism 完美的表现了它。平滑和美观。Xenlism 收到了诺基亚的 Meego 和苹果图标的影响。 + +让我们来看一下他的几个不同应用的图标: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons.png) + +文件夹图标看起来像这样: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons-1.png) + +主题开发者,[Nattapong Pullkhow][3], 说,这个图标主题最适合 GNOME,但是在 Unity 和 KDE,Mate 上也表现良好。 + +### 安装 Xenlism Wildfire ### + +Xenlism Theme 大约有 230 MB, 对于一个主题来说确实很大,但是考虑到它支持的庞大的软件数量,这个大小,确实也不是那么令人吃惊。 + +#### 在 Ubuntu/Debian 上安装 Xenlism #### + +在 Ubuntu 的变种中安装前,用以下的命令添加 GPG 秘钥: + + sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 90127F5B + +添加完成之后,输入如下的命令进行安装: + + echo "deb http://downloads.sourceforge.net/project/xenlism-wildfire/repo deb/" | sudo tee -a /etc/apt/sources.list + sudo apt-get update + sudo apt-get install xenlism-wildfire-icon-theme + +除了主题之外,你也可以选择是否下载配套的桌面背景图: + + sudo apt-get install xenlism-artwork-wallpapers + +#### 在 Arch 上安装 Xenlism #### + +你需要编辑 Pacman 软件仓库。在终端中使用如下命令: + + sudo nano /etc/pacman.conf + + 添加如下的代码块,在配置文件中: + + [xenlism-arch] + SigLevel = Never + Server = http://downloads.sourceforge.net/project/xenlism-wildfire/repo/arch + +更新系统并且安装: + + sudo pacman -Syyu + sudo pacman -S xenlism-wildfire + +#### 使用 Xenlism 主题 #### + +在 Ubuntu Unity, [可以使用 Unity Tweak Tool 来改变主题][4]. In GNOME, [使用 Gnome Tweak Tool 改变主题][5]. 我确信你会接下来的步骤,如果你不会,请来信通知我,我会继续完善这篇文章。 + +这就是 Xenlism 在 Ubuntu 15.04 Unity 中的截图。同时也使用了 Xenlism 桌面背景。 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons-2.png) + +这看来真棒,不是吗?如果你试用了,并且喜欢他,你可以感谢他的开发者: + +> [Xenlism is a stunning minimal icon theme for Linux. Thanks @xenatt for this beautiful theme.][6] + +我希望你喜欢他。同时也希望你分享你对这个主题的看法,或者你喜欢的主题。Xenlism 真的很棒,可能会替换掉你最喜欢的主题。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/xenlism-wildfire-theme/ + +作者:[Abhishek][a] +译者:[MikeCoder](https://github.com/MikeCoder) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/best-icon-themes-ubuntu-1404/ +[2]:http://xenlism.github.io/wildfire/ +[3]:https://plus.google.com/+NattapongPullkhow +[4]:http://itsfoss.com/install-numix-ubuntu/ +[5]:http://itsfoss.com/install-switch-themes-gnome-shell/ +[6]:https://twitter.com/share?text=Xenlism+is+a+stunning+minimal+icon+theme+for+Linux.+Thanks+%40xenatt+for+this+beautiful+theme.&via=itsfoss&related=itsfoss&url=http://itsfoss.com/xenlism-wildfire-theme/ From 53ac741caea1b4c71c9b66e1332ed29fc18268ef Mon Sep 17 00:00:00 2001 From: KnightJoker <544133483@qq.com> Date: Sat, 26 Sep 2015 11:10:27 +0800 Subject: [PATCH 2162/2517] Translated by KnightJoker --- ...--Master Your Math with These Linux Apps.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 index c70122d6c5..a02c063999 100644 --- 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 @@ -1,21 +1,21 @@ Translating by KnightJoker -Learn with Linux: Master Your Math with These Linux Apps +用Linux学习:使用这些Linux应用来征服你的数学 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-featured.png) -This article is part of the [Learn with Linux][1] series: +这篇文章是[用Linux学习][1]系列的一部分: -- [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学习: 学习类型][2] +- [用Linux学习: 物理模拟][3] +- [用Linux学习: 学习音乐][4] +- [用Linux学习: 两个地理应用程序][5] +- [用Linux学习: 用这些Linux应用来征服你的数学][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. +Linux提供了大量的教育软件和许多优秀的工具来帮助所有年龄段的学生学习和练习各种各样的话题,常常以交互的方式。与Linux一起学习这一系列的文章则为这些各种各样的教育软件和应用提供了一个介绍。 +数学是计算机的核心。如果有人用精益求精和纪律来预期一个伟大的操作系统,比如GNU/ Linux,那么这将是数学。如果你在寻求一些数学应用程序,那么你将不会感到失望。Linux提供了很多优秀的工具使得数学看起来和你曾经做过的一样令人畏惧,但实际上他们会简化你使用它的方式。 ### 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). From 2b1b2d3a4c2e0a990153ee8ed2cc863a1331362a Mon Sep 17 00:00:00 2001 From: KnightJoker <544133483@qq.com> Date: Sat, 26 Sep 2015 11:27:20 +0800 Subject: [PATCH 2163/2517] Translated by KnightJoker --- ...-Master Your Math with These Linux Apps.md | 56 +++++++++---------- 1 file changed, 27 insertions(+), 29 deletions(-) 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 index a02c063999..f4625c6c13 100644 --- 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 @@ -1,4 +1,4 @@ -Translating by KnightJoker +Translated by KnightJoker 用Linux学习:使用这些Linux应用来征服你的数学 ================================================================================ @@ -18,98 +18,96 @@ Linux提供了大量的教育软件和许多优秀的工具来帮助所有年龄 数学是计算机的核心。如果有人用精益求精和纪律来预期一个伟大的操作系统,比如GNU/ Linux,那么这将是数学。如果你在寻求一些数学应用程序,那么你将不会感到失望。Linux提供了很多优秀的工具使得数学看起来和你曾经做过的一样令人畏惧,但实际上他们会简化你使用它的方式。 ### 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 +Gnuplot 是一个适用于不同平台的命令行脚本化和多功能的图形工具。尽管它的名字,并不是GNU操作系统的一部分。也没有免费授权,但它是免费软件(这意味着它受版权保护,但免费使用)。 +要在Ubuntu系统(或者衍生系统)上安装 `gnuplot`,输入: 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. +随着`gnuplot的`提示,将会打开一个新的窗口,图像便会在里面呈现。 ![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. +你也可以在线这个图设置不同的属性,比如像这样指定“title” 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`命令,你可以给的东西更深入一点并且绘制3D图形 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]. +但是`gnuplot`的真正力量在于在它的命令行和脚本功能,`gnuplot`广泛完整的文档可在这里找到,并在[Duke大学网站][8]上面看见这个了不起的教程[7]的原始版本。 ### Maxima ### -[Maxima][9] is a computer algebra system developed from the original sources of Macsyma. According to its SourceForge page, +[Maxima][9]是从Macsyma原始资料开发的一个计算机代数系统,根据它的 SourceForge 页面, -> “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.” +> “Maxima是符号和数值的表达,包括微分,积分,泰勒级数,拉普拉斯变换,常微分方程,线性方程组,多项式,集合,列表,向量,矩阵和张量系统的操纵系统。Maxima通过精确的分数,任意精度的整数和可变精度浮点数产生高精度的计算结果。Maxima可以二维和三维中绘制函数和数据。“ -You will have binary packages for Maxima in most Ubuntu derivatives as well as the Maxima graphical interface. To install them all, type +你将会获得二进制包用于大多数Ubuntu衍生系统的Maxima以及它的图形界面中,插入所有包,输入: 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. +在终端窗口中,Maxima是一个没有太多UI的命令行工具,但如果你开始wxmaxima,你会进入一个简单但功能强大的图形用户界面。 ![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.”) +你可以开始输入这个来简单的一个开始。(提示:如果你想计算一个表达式,使用“Shift + Enter”回车后会增加更多的方法) -Maxima can be used for very simple problems, as it also acts as a calculator, +Maxima可以用于一些简单的问题,因此也可以作为一个计算器, ![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 +它使用`gnuplot`使得绘制简单, ![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.) +(它需要gnuplot-X11的包,来显示它们。) -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, +除了美化一些图形,Maxima也尽可能用latex格式导出它们,或者通过右键是捷菜单进行一些突出的操作. ![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]. +然而其主菜单还是提供了大量压倒性的功能,当然Maxima的功能远不止如此,这里也有一个广泛使用的在线文档。 -### 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]. +### 总结 ### +数学不是一个简单的学科,这些在Linux上的优秀软件也没有使得数学更加简单,但是这些应用使得使用数学变得更加的简单和工程化。以上两种应用都只是介绍一下Linux的所提供的。如果你是认真从事数学和需要更多的功能与丰富的文档,那你更应该看看这些Mathbuntu项目。 -------------------------------------------------------------------------------- via: https://www.maketecheasier.com/learn-linux-maths/ 作者:[Attila Orosz][a] -译者:[译者ID](https://github.com/译者ID) +译者:[KnightJoker](https://github.com/KnightJoker/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d03ac0d7020bed0bae5b60bba1ede89bd86875d1 Mon Sep 17 00:00:00 2001 From: KnightJoker <544133483@qq.com> Date: Sat, 26 Sep 2015 11:30:23 +0800 Subject: [PATCH 2164/2517] Translated by KnightJoker --- ...-Master Your Math with These Linux Apps.md | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 translated/tech/Learn with Linux--Master Your Math with These Linux Apps.md diff --git a/translated/tech/Learn with Linux--Master Your Math with These Linux Apps.md b/translated/tech/Learn with Linux--Master Your Math with These Linux Apps.md new file mode 100644 index 0000000000..f4625c6c13 --- /dev/null +++ b/translated/tech/Learn with Linux--Master Your Math with These Linux Apps.md @@ -0,0 +1,126 @@ +Translated by KnightJoker + +用Linux学习:使用这些Linux应用来征服你的数学 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-featured.png) + +这篇文章是[用Linux学习][1]系列的一部分: + +- [用Linux学习: 学习类型][2] +- [用Linux学习: 物理模拟][3] +- [用Linux学习: 学习音乐][4] +- [用Linux学习: 两个地理应用程序][5] +- [用Linux学习: 用这些Linux应用来征服你的数学][6] + + +Linux提供了大量的教育软件和许多优秀的工具来帮助所有年龄段的学生学习和练习各种各样的话题,常常以交互的方式。与Linux一起学习这一系列的文章则为这些各种各样的教育软件和应用提供了一个介绍。 + +数学是计算机的核心。如果有人用精益求精和纪律来预期一个伟大的操作系统,比如GNU/ Linux,那么这将是数学。如果你在寻求一些数学应用程序,那么你将不会感到失望。Linux提供了很多优秀的工具使得数学看起来和你曾经做过的一样令人畏惧,但实际上他们会简化你使用它的方式。 +### Gnuplot ### + +Gnuplot 是一个适用于不同平台的命令行脚本化和多功能的图形工具。尽管它的名字,并不是GNU操作系统的一部分。也没有免费授权,但它是免费软件(这意味着它受版权保护,但免费使用)。 + +要在Ubuntu系统(或者衍生系统)上安装 `gnuplot`,输入: + sudo apt-get install gnuplot gnuplot-x11 + +进入一个终端窗口。启动该程序,输入: + + gnuplot + +你会看到一个简单的命令行界面: + +![learnmath-gnuplot](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot.png) + +在其中您可以直接开始输入函数。绘图命令将绘制一个曲线图。 + +输入内容,例如, + + plot sin(x)/x + +随着`gnuplot的`提示,将会打开一个新的窗口,图像便会在里面呈现。 + +![learnmath-gnuplot-plot1](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-plot1.png) + +你也可以在线这个图设置不同的属性,比如像这样指定“title” + + 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) + +使用`splot`命令,你可以给的东西更深入一点并且绘制3D图形 + + splot sin(x*y/20) + +![learnmath-gnuplot-plot3](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-plot3.png) + +这个窗口有几个基本的配置选项, + +![learnmath-gnuplot-options](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-options.png) + +但是`gnuplot`的真正力量在于在它的命令行和脚本功能,`gnuplot`广泛完整的文档可在这里找到,并在[Duke大学网站][8]上面看见这个了不起的教程[7]的原始版本。 + +### Maxima ### + +[Maxima][9]是从Macsyma原始资料开发的一个计算机代数系统,根据它的 SourceForge 页面, + +> “Maxima是符号和数值的表达,包括微分,积分,泰勒级数,拉普拉斯变换,常微分方程,线性方程组,多项式,集合,列表,向量,矩阵和张量系统的操纵系统。Maxima通过精确的分数,任意精度的整数和可变精度浮点数产生高精度的计算结果。Maxima可以二维和三维中绘制函数和数据。“ + +你将会获得二进制包用于大多数Ubuntu衍生系统的Maxima以及它的图形界面中,插入所有包,输入: + + sudo apt-get install maxima xmaxima wxmaxima + +在终端窗口中,Maxima是一个没有太多UI的命令行工具,但如果你开始wxmaxima,你会进入一个简单但功能强大的图形用户界面。 + +![learnmath-maxima](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima.png) + +你可以开始输入这个来简单的一个开始。(提示:如果你想计算一个表达式,使用“Shift + Enter”回车后会增加更多的方法) + +Maxima可以用于一些简单的问题,因此也可以作为一个计算器, + +![learnmath-maxima-1and1](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-1and1.png) + +以及一些更复杂的问题, + +![learnmath-maxima-functions](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-functions.png) + +它使用`gnuplot`使得绘制简单, + +![learnmath-maxima-plot](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-plot.png) + +或者绘制一些复杂的图形. + +![learnmath-maxima-plot2](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-plot2.png) + +(它需要gnuplot-X11的包,来显示它们。) + +除了美化一些图形,Maxima也尽可能用latex格式导出它们,或者通过右键是捷菜单进行一些突出的操作. + +![learnmath-maxima-menu](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-menu.png) + +然而其主菜单还是提供了大量压倒性的功能,当然Maxima的功能远不止如此,这里也有一个广泛使用的在线文档。 + +### 总结 ### + +数学不是一个简单的学科,这些在Linux上的优秀软件也没有使得数学更加简单,但是这些应用使得使用数学变得更加的简单和工程化。以上两种应用都只是介绍一下Linux的所提供的。如果你是认真从事数学和需要更多的功能与丰富的文档,那你更应该看看这些Mathbuntu项目。 +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/learn-linux-maths/ + +作者:[Attila Orosz][a] +译者:[KnightJoker](https://github.com/KnightJoker/译者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 From bb6acd41cf9f315903bc0d5ce82c450ac490c0ce Mon Sep 17 00:00:00 2001 From: luoyuanhao Date: Sat, 26 Sep 2015 13:18:41 +0800 Subject: [PATCH 2165/2517] [Translated]sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md --- ...o Upgrade From Oracle 11g To Oracle 12c.md | 166 ------------------ ...o Upgrade From Oracle 11g To Oracle 12c.md | 165 +++++++++++++++++ 2 files changed, 165 insertions(+), 166 deletions(-) delete mode 100644 sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md create mode 100644 translated/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md diff --git a/sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md b/sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md deleted file mode 100644 index a43b5e2ac5..0000000000 --- a/sources/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md +++ /dev/null @@ -1,166 +0,0 @@ -ictlyh Translating -How To Upgrade From Oracle 11g To Oracle 12c -================================================================================ -Hello all. - -Today we will go through how to upgrade from oracle 11g to Oracle 12c. Let’s start then. - -For this, I will use CentOS 7 64 bit Linux distribution. - -I am assuming that you have already installed Oracle 11g on your system. Here I will show what I did when I installed Oracle 11g. - -I select “Create and configure a database” for Oracle 11g just like below image. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage1.png) - -Then I select “Desktop Class” for my Oracle 11g installation. For production you must select “Server Class”. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage2.png) - -Then you must enter all the paths for the Oracle 11g and your password as well. Below is mine for my Oracle 11g installation. Make sure you meet the Oracle password methodology for placing your password. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage3.png) - -Next, I set Inventory Directory path as below. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage4.png) - -Till now, I showed you what I had done to install Oracle 11g as we are going to upgrade to 12c. - -Let’s upgrade to Oracle 12c from Oracle 11g. - -You must download the two (2) zip files from this [link][1]. Download and unzip both files to the same directory. Files names are **linuxamd64_12c_database_1of2.zip** & **linuxamd64_12c_database_2of2.zip** respectively. After extracting or unzipping, It will create a folder called database. - -Note: Before upgrading to 12c, make sure you have all the necessary packages installed for your CentOS and all the path variable are OK and all other prerequisites are done before beginning. - -These are the following packages must be installed with correct version - -- binutils -- compat-libstdc++ -- gcc -- glibc -- libaio -- libgcc -- libstdc++ -- make -- sysstat -- unixodbc - -Search for your correct rpm version on the internet. - -You can also combine a query for multiple packages, and review the output for the correct versions. For example: - -Type the following command to check in the terminal - - rpm -q binutils compat-libstdc++ gcc glibc libaio libgcc libstdc++ make sysstat unixodbc - -The following packages (or later or earlier versions) must be installed on your system - -- binutils-2.23.52.0.1-12.el7.x86_64 -- compat-libcap1-1.10-3.el7.x86_64 -- gcc-4.8.2-3.el7.x86_64 -- gcc-c++-4.8.2-3.el7.x86_64 -- glibc-2.17-36.el7.i686 -- glibc-2.17-36.el7.x86_64 -- glibc-devel-2.17-36.el7.i686 -- glibc-devel-2.17-36.el7.x86_64 -- ksh -- libaio-0.3.109-9.el7.i686 -- libaio-0.3.109-9.el7.x86_64 -- libaio-devel-0.3.109-9.el7.i686 -- libaio-devel-0.3.109-9.el7.x86_64 -- libgcc-4.8.2-3.el7.i686 -- libgcc-4.8.2-3.el7.x86_64 -- libstdc++-4.8.2-3.el7.i686 -- libstdc++-4.8.2-3.el7.x86_64 -- libstdc++-devel-4.8.2-3.el7.i686 -- libstdc++-devel-4.8.2-3.el7.x86_64 -- libXi-1.7.2-1.el7.i686 -- libXi-1.7.2-1.el7.x86_64 -- libXtst-1.2.2-1.el7.i686 -- libXtst-1.2.2-1.el7.x86_64 -- make-3.82-19.el7.x86_64 -- sysstat-10.1.5-1.el7.x86_64 - -You will also need unixODBC-2.3.1 or later driver. - -I hope you already have a user on your CentOS 7 named oracle when you installed Oracle 11g. - -Let’s login onto CentOS by using user oracle. - -After login to your CentOS by user oracle, open a terminal on your CentOS. - -Now change directory and navigate to your extracted directory where you extracted both the zip files by using terminal. Now type the following in the terminal to begin installation of 12c. - - ./runInstaller - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212image5.png) - -If everything goes right then you will see something like below which will start the installation process of 12c. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage6.png) - -Then you can skip the updates or you can download the latest update. It is recommended that you must update it for production server. Though I am skipping it. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage7.png) - -Now, select upgrade an existing database. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage8.png) - -For language, English is already there. Click next to continue or you can add according to your need. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage9.png) - -Now, select Enterprise Edition. You can select upon your requirements. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage10.png) - -Then select your path for Software location. This is pretty much self-explanatory. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage11.png) - -For step 7, keep moving with the default options just like below. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage12.png) - -In step 9, you will get a summary report like below image. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage13.png) - -If everything is fine, you can start your installation by clicking install on step 9 and which will take you to step 10. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage14.png) - -In the process you might encounter some errors and you need to Goggle it for fix those errors. There are a number of errors you may encounter and hence I am not covering those here. - -Keep your patience and it will show Succeeded one by one for step 10. If not, search it on Google and do necessary steps to fix it. Again, as there are a number of errors you may encounter and I can’t provide all the details over here. - -Now, configure the listener just simply following on screen instruction. - -After finishing the process for listener, it will start the Database Upgrade Assistant. Select Upgrade Oracle Database. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/DUAimage15.png) - -In step 2, you will find that it will show the 11g location path along with 12c location path. Also you will find that it is indicating Target Oracle Home Release 12 from Source Oracle Home Release 11. Click next step 2 and move to step 3. - -![](http://www.unixmen.com/wp-content/uploads/2015/09/DUAimage16.png) - -Follow the on screen instructions and finished it. - -In the last step, you will get a success window where you will find that the update of oracle database was successful. - -**A word of caution**: Before upgrading to 12c for your production server, please make sure you have done it some other workstation so that you can fix all the errors, which you will encounter on the way of upgrading. Never try upgrading a production server without knowing all the details. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/upgrade-from-oracle-11g-to-oracle-12c/ - -作者:[Mohammad Forhad Iftekher][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/forhad/ -[1]:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-linux-download-1959253.html \ No newline at end of file diff --git a/translated/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md b/translated/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md new file mode 100644 index 0000000000..921b5d958f --- /dev/null +++ b/translated/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md @@ -0,0 +1,165 @@ +如何将 Oracle 11g 升级到 Orcale 12c +================================================================================ +大家好。 + +今天我们来学习一下如何将 Oracle 11g 升级到 Oracle 12c。开始吧。 + +在此,我使用的是 CentOS 7 64 位 Linux 发行版。 + +我假设你已经在你的系统上安装了 Oracle 11g。这里我会展示一下安装 Oracle 11g 时我的操作步骤。 + +我在 Oracle 11g 上选择 “Create and configure a database”,如下图所示。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage1.png) + +然后我选择安装 Oracle 11g “Decktop Class”。如果是生产环境,你必须选择 “Server Class”。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage2.png) + +然后你输入安装 Oracle 11g 的所有路径以及密码。下面是我自己的 Oracle 11g 安装配置。确保你正确输入了 Oracle 的密码。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage3.png) + +下一步,我按照如下设置 Inventory Directory。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage4.png) + +到这里,我已经向你展示了我安装 Oracle 11g 所做的工作,因为我们开始想升级到 12c。 + +让我们将 Oracle 11g 升级到 Oracle 12c 吧。 + +你需要从该[链接][1]上下载两个 zip 文件。下载并解压两个文件到相同目录。文件名为 **linuxamd64_12c_database_1of2.zip** & **linuxamd64_12c_database_2of2.zip**。提取或解压完后,它会创建一个名为 database 的文件夹。 + +注意:升级到 12c 之前,请确保在你的 CentOS 上已经安装了所有必须的软件包并且 path 环境变量也已经正确配置,还有其它前提条件也已经满足。 + +下面是必须使用正确版本安装的一些软件包 + +- binutils +- compat-libstdc++ +- gcc +- glibc +- libaio +- libgcc +- libstdc++ +- make +- sysstat +- unixodbc + +在因特网上搜索正确的 rpm 版本。 + +你也可以用一个查询处理多个软件包,然后在输出中查找正确版本。例如: + +在终端中输入下面的命令 + + rpm -q binutils compat-libstdc++ gcc glibc libaio libgcc libstdc++ make sysstat unixodbc + +你的系统中必须安装了以下软件包(版本可能较新会旧) + +- binutils-2.23.52.0.1-12.el7.x86_64 +- compat-libcap1-1.10-3.el7.x86_64 +- gcc-4.8.2-3.el7.x86_64 +- gcc-c++-4.8.2-3.el7.x86_64 +- glibc-2.17-36.el7.i686 +- glibc-2.17-36.el7.x86_64 +- glibc-devel-2.17-36.el7.i686 +- glibc-devel-2.17-36.el7.x86_64 +- ksh +- libaio-0.3.109-9.el7.i686 +- libaio-0.3.109-9.el7.x86_64 +- libaio-devel-0.3.109-9.el7.i686 +- libaio-devel-0.3.109-9.el7.x86_64 +- libgcc-4.8.2-3.el7.i686 +- libgcc-4.8.2-3.el7.x86_64 +- libstdc++-4.8.2-3.el7.i686 +- libstdc++-4.8.2-3.el7.x86_64 +- libstdc++-devel-4.8.2-3.el7.i686 +- libstdc++-devel-4.8.2-3.el7.x86_64 +- libXi-1.7.2-1.el7.i686 +- libXi-1.7.2-1.el7.x86_64 +- libXtst-1.2.2-1.el7.i686 +- libXtst-1.2.2-1.el7.x86_64 +- make-3.82-19.el7.x86_64 +- sysstat-10.1.5-1.el7.x86_64 + +你也需要 unixODBC-2.3.1 或更新版本的驱动。 + +我希望你安装 Oracle 11g 的时候已经在你的 CentOS 7 上创建了名为 oracle 的用户。 + +让我们以用户 oracle 登录 CentOS。 + +以用户 oracle 登录到 CentOS 之后,在你的 CentOS上打开一个终端。 + +使用终端更改工作目录并导航到你解压两个 zip 文件的目录。在终端中输入以下命令开始安装 12c。 + + ./runInstaller + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212image5.png) + +如果一切顺利,你会看到类似下面的截图,已经开始安装 12c。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage6.png) + +然后你可以选择跳过更新或者下载最近更新。如果是生产服务器,建议你必须更新。我这里选择跳过。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage7.png) + +现在,选择升级现有数据库。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage8.png) + +对于语言,这里已经有 English。点击下一步继续,或者你可以根据你的需要添加语言。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage9.png) + +现在,选择企业版。你可以根据你的需求选择。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage10.png) + +然后选择软件位置路径,这些都是不言自明的。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage11.png) + +第七步,像下面这样使用默认的选择继续下一步。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage12.png) + +在第九步,你会看到一个类似下面这样的总结报告。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage13.png) + +如果一切正常,你可以点击步骤九中的 install 开始安装,进入步骤十。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage14.png) + +其中你可能会遇到一些错误,你需要通过谷歌找到这些错误的解决方法。你可能遇到的问题会有很多,因此我没有在这里详细介绍。 + +要有耐心,一步一步走下来最后它会告诉你成功了。否则,在谷歌上搜索做必要的操作解决问题。再一次说明,由于你可能会遇到的错误有很多,我无法在这里提供所有详细介绍。 + +现在,只需要按照下面屏幕指令配置监听器 + +配置完监听器之后,它会启动数据库升级助手(Database Upgrade Assistant)。选择 Upgrade Oracle Database。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/DUAimage15.png) + +在第二步,你会发现它显示了 11g 的位置路径以及 12c 的位置路径。同时你也会发现它指示说从原来的 Oracle Home Release 11 安装 Oracle Home Release 12.点击下一步进入步骤三。 + +![](http://www.unixmen.com/wp-content/uploads/2015/09/DUAimage16.png) + +按照屏幕上的说明完成安装。 + +在最后一步,你会看到一个成功窗口,其中你会看到成功升级了 oracle 数据库。 + +**一个忠告**:对于你的生产服务器,在升级到 12c 之前,请确保你已经在其它平台上测试过,以便你能修复升级过程中遇到的所有错误。永远不要尝试一无所知的时候就升级生产服务器。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/upgrade-from-oracle-11g-to-oracle-12c/ + +作者:[Mohammad Forhad Iftekher][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/forhad/ +[1]:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-linux-download-1959253.html \ No newline at end of file From 999a554269f912644b3d66f9123ba1f87be4f215 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 26 Sep 2015 15:29:31 +0800 Subject: [PATCH 2166/2517] [Translated]sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md --- ...e Types and System Time in Linu--Part 3.md | 280 ------------------ ...e Types and System Time in Linu--Part 3.md | 279 +++++++++++++++++ 2 files changed, 279 insertions(+), 280 deletions(-) delete mode 100644 sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md create mode 100644 translated/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md diff --git a/sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md b/sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md deleted file mode 100644 index 6f4d1a63f5..0000000000 --- a/sources/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md +++ /dev/null @@ -1,280 +0,0 @@ -ictlyh Translating -5 Useful Commands to Manage File Types and System Time in Linux – Part 3 -================================================================================ -Adapting to using the command line or terminal can be very hard for beginners who want to learn Linux. Because the terminal gives more control over a Linux system than GUIs programs, one has to get a used to running commands on the terminal. Therefore to memorize different commands in Linux, you should use the terminal on a daily basis to understand how commands are used with different options and arguments. - -![Manage File Types and Set Time in Linux](http://www.tecmint.com/wp-content/uploads/2015/09/Find-File-Types-in-Linux.jpg) - -Manage File Types and Set Time in Linux – Part 3 - -Please go through our previous parts of this [Linux Tricks][1] series. - -- [5 Interesting Command Line Tips and Tricks in Linux – Part 1][2] -- [ Useful Commandline Tricks for Newbies – Part 2][3] - -In this article, we are going to look at some tips and tricks of using 10 commands to work with files and time on the terminal. - -### File Types in Linux ### - -In Linux, everything is considered as a file, your devices, directories and regular files are all considered as files. - -There are different types of files in a Linux system: - -- Regular files which may include commands, documents, music files, movies, images, archives and so on. -- Device files: which are used by the system to access your hardware components. - -There are two types of device files block files that represent storage devices such as harddisks, they read data in blocks and character files read data in a character by character manner. - -- Hardlinks and softlinks: they are used to access files from any where on a Linux filesystem. -- Named pipes and sockets: allow different processes to communicate with each other. - -#### 1. Determining the type of a file using ‘file’ command #### - -You can determine the type of a file by using the file command as follows. The screenshot below shows different examples of using the file command to determine the types of different files. - - tecmint@tecmint ~/Linux-Tricks $ dir - BACKUP master.zip - crossroads-stable.tar.gz num.txt - EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 reggea.xspf - Linux-Security-Optimization-Book.gif tmp-link - - tecmint@tecmint ~/Linux-Tricks $ file BACKUP/ - BACKUP/: directory - - tecmint@tecmint ~/Linux-Tricks $ file master.zip - master.zip: Zip archive data, at least v1.0 to extract - - tecmint@tecmint ~/Linux-Tricks $ file crossroads-stable.tar.gz - crossroads-stable.tar.gz: gzip compressed data, from Unix, last modified: Tue Apr 5 15:15:20 2011 - - tecmint@tecmint ~/Linux-Tricks $ file Linux-Security-Optimization-Book.gif - Linux-Security-Optimization-Book.gif: GIF image data, version 89a, 200 x 259 - - tecmint@tecmint ~/Linux-Tricks $ file EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 - EDWARD-MAYA-2011-2012-NEW-REMIX.mp3: Audio file with ID3 version 2.3.0, contains: MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, JntStereo - - tecmint@tecmint ~/Linux-Tricks $ file /dev/sda1 - /dev/sda1: block special - - tecmint@tecmint ~/Linux-Tricks $ file /dev/tty1 - /dev/tty1: character special - -#### 2. Determining the file type using ‘ls’ and ‘dir’ commands #### - -Another way of determining the type of a file is by performing a long listing using the ls and [dir][4] commands. - -Using ls -l to determine the type of a file. - -When you view the file permissions, the first character shows the file type and the other charcters show the file permissions. - - tecmint@tecmint ~/Linux-Tricks $ ls -l - total 6908 - drwxr-xr-x 2 tecmint tecmint 4096 Sep 9 11:46 BACKUP - -rw-r--r-- 1 tecmint tecmint 1075620 Sep 9 11:47 crossroads-stable.tar.gz - -rwxr----- 1 tecmint tecmint 5916085 Sep 9 11:49 EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 - -rw-r--r-- 1 tecmint tecmint 42122 Sep 9 11:49 Linux-Security-Optimization-Book.gif - -rw-r--r-- 1 tecmint tecmint 17627 Sep 9 11:46 master.zip - -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:48 num.txt - -rw-r--r-- 1 tecmint tecmint 0 Sep 9 11:46 reggea.xspf - -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:47 tmp-link - -Using ls -l to determine block and character files. - - tecmint@tecmint ~/Linux-Tricks $ ls -l /dev/sda1 - brw-rw---- 1 root disk 8, 1 Sep 9 10:53 /dev/sda1 - - tecmint@tecmint ~/Linux-Tricks $ ls -l /dev/tty1 - crw-rw---- 1 root tty 4, 1 Sep 9 10:54 /dev/tty1 - -Using dir -l to determine the type of a file. - - tecmint@tecmint ~/Linux-Tricks $ dir -l - total 6908 - drwxr-xr-x 2 tecmint tecmint 4096 Sep 9 11:46 BACKUP - -rw-r--r-- 1 tecmint tecmint 1075620 Sep 9 11:47 crossroads-stable.tar.gz - -rwxr----- 1 tecmint tecmint 5916085 Sep 9 11:49 EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 - -rw-r--r-- 1 tecmint tecmint 42122 Sep 9 11:49 Linux-Security-Optimization-Book.gif - -rw-r--r-- 1 tecmint tecmint 17627 Sep 9 11:46 master.zip - -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:48 num.txt - -rw-r--r-- 1 tecmint tecmint 0 Sep 9 11:46 reggea.xspf - -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:47 tmp-link - -#### 3. Counting number of files of a specific type #### - -Next we shall look at tips on counting number of files of a specific type in a given directory using the ls, [grep][5] and [wc][6] commands. Communication between the commands is achieved through named piping. - -- grep – command to search according to a given pattern or regular expression. -- wc – command to count lines, words and characters. - -Counting number of regular files - -In Linux, regular files are represented by the `–` symbol. - - tecmint@tecmint ~/Linux-Tricks $ ls -l | grep ^- | wc -l - 7 - -**Counting number of directories** - -In Linux, directories are represented by the `d` symbol. - - tecmint@tecmint ~/Linux-Tricks $ ls -l | grep ^d | wc -l - 1 - -**Counting number of symbolic and hard links** - -In Linux, symblic and hard links are represented by the l symbol. - - tecmint@tecmint ~/Linux-Tricks $ ls -l | grep ^l | wc -l - 0 - -**Counting number of block and character files** - -In Linux, block and character files are represented by the `b` and `c` symbols respectively. - - tecmint@tecmint ~/Linux-Tricks $ ls -l /dev | grep ^b | wc -l - 37 - tecmint@tecmint ~/Linux-Tricks $ ls -l /dev | grep ^c | wc -l - 159 - -#### 4. Finding files on a Linux system #### - -Next we shall look at some commands one can use to find files on a Linux system, these include the locate, find, whatis and which commands. - -**Using the locate command to find files** - -In the output below, I am trying to locate the [Samba server configuration][7] for my system. - - tecmint@tecmint ~/Linux-Tricks $ locate samba.conf - /usr/lib/tmpfiles.d/samba.conf - /var/lib/dpkg/info/samba.conffiles - -**Using the find command to find files** - -To learn how to use the find command in Linux, you can read our following article that shows more than 30+ practical examples and usage of find command in Linux. - -- [35 Examples of ‘find’ Command in Linux][8] - -**Using the whatis command to locate commands** - -The whatis command is mostly used to locate commands and it is special because it gives information about a command, it also finds configurations files and manual entries for a command. - - tecmint@tecmint ~/Linux-Tricks $ whatis bash - bash (1) - GNU Bourne-Again SHell - - tecmint@tecmint ~/Linux-Tricks $ whatis find - find (1) - search for files in a directory hierarchy - - tecmint@tecmint ~/Linux-Tricks $ whatis ls - ls (1) - list directory contents - -**Using which command to locate commands** - -The which command is used to locate commands on the filesystem. - - tecmint@tecmint ~/Linux-Tricks $ which mkdir - /bin/mkdir - - tecmint@tecmint ~/Linux-Tricks $ which bash - /bin/bash - - tecmint@tecmint ~/Linux-Tricks $ which find - /usr/bin/find - - tecmint@tecmint ~/Linux-Tricks $ $ which ls - /bin/ls - -#### 5. Working with time on your Linux system #### - -When working in a networked environment, it is a good practice to keep the correct time on your Linux system. There are certain services on Linux systems that require correct time to work efficiently on a network. - -We shall look at commands you can use to manage time on your machine. In Linux, time is managed in two ways: system time and hardware time. - -The system time is managed by a system clock and the hardware time is managed by a hardware clock. - -To view your system time, date and timezone, use the date command as follows. - - tecmint@tecmint ~/Linux-Tricks $ date - Wed Sep 9 12:25:40 IST 2015 - -Set your system time using date -s or date –set=”STRING” as follows. - - tecmint@tecmint ~/Linux-Tricks $ sudo date -s "12:27:00" - Wed Sep 9 12:27:00 IST 2015 - - tecmint@tecmint ~/Linux-Tricks $ sudo date --set="12:27:00" - Wed Sep 9 12:27:00 IST 2015 - -You can also set time and date as follows. - - tecmint@tecmint ~/Linux-Tricks $ sudo date 090912302015 - Wed Sep 9 12:30:00 IST 2015 - -Viewing current date from a calendar using cal command. - - tecmint@tecmint ~/Linux-Tricks $ cal - September 2015 - Su Mo Tu We Th Fr Sa - 1 2 3 4 5 - 6 7 8 9 10 11 12 - 13 14 15 16 17 18 19 - 20 21 22 23 24 25 26 - 27 28 29 30 - -View hardware clock time using the hwclock command. - - tecmint@tecmint ~/Linux-Tricks $ sudo hwclock - Wednesday 09 September 2015 06:02:58 PM IST -0.200081 seconds - -To set the hardware clock time, use hwclock –set –date=”STRING” as follows. - - tecmint@tecmint ~/Linux-Tricks $ sudo hwclock --set --date="09/09/2015 12:33:00" - - tecmint@tecmint ~/Linux-Tricks $ sudo hwclock - Wednesday 09 September 2015 12:33:11 PM IST -0.891163 seconds - -The system time is set by the hardware clock during booting and when the system is shutting down, the hardware time is reset to the system time. - -Therefore when you view system time and hardware time, they are the same unless when you change the system time. Your hardware time may be incorrect when the CMOS battery is weak. - -You can also set your system time using time from the hardware clock as follows. - - $ sudo hwclock --hctosys - -It is also possible to set hardware clock time using the system clock time as follows. - - $ sudo hwclock --systohc - -To view how long your Linux system has been running, use the uptime command. - - tecmint@tecmint ~/Linux-Tricks $ uptime - 12:36:27 up 1:43, 2 users, load average: 1.39, 1.34, 1.45 - - tecmint@tecmint ~/Linux-Tricks $ uptime -p - up 1 hour, 43 minutes - - tecmint@tecmint ~/Linux-Tricks $ uptime -s - 2015-09-09 10:52:47 - -### Summary ### - -Understanding file types is Linux is a good practice for begginers, and also managing time is critical especially on servers to manage services reliably and efficiently. Hope you find this guide helpful. If you have any additional information, do not forget to post a comment. Stay connected to Tecmint. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/manage-file-types-and-set-system-time-in-linux/ - -作者:[Aaron Kili][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/aaronkili/ -[1]:http://www.tecmint.com/tag/linux-tricks/ -[2]:http://www.tecmint.com/free-online-linux-learning-guide-for-beginners/ -[3]:http://www.tecmint.com/10-useful-linux-command-line-tricks-for-newbies/ -[4]:http://www.tecmint.com/linux-dir-command-usage-with-examples/ -[5]:http://www.tecmint.com/12-practical-examples-of-linux-grep-command/ -[6]:http://www.tecmint.com/wc-command-examples/ -[7]:http://www.tecmint.com/setup-samba-file-sharing-for-linux-windows-clients/ -[8]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/ \ No newline at end of file diff --git a/translated/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md b/translated/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md new file mode 100644 index 0000000000..601f753341 --- /dev/null +++ b/translated/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md @@ -0,0 +1,279 @@ +Linux 中管理文件类型和系统时间的 5 个有用命令 - 第三部分 +================================================================================ +对于想学习 Linux 的初学者来说要适应使用命令行或者终端可能非常困难。由于终端比图形用户界面程序更能帮助用户控制 Linux 系统,我们必须习惯在终端中运行命令。因此为了有效记忆 Linux 不同的命令,你应该每天使用终端并明白怎样将命令和不同选项以及参数一同使用。 + +![在 Linux 中管理文件类型并设置时间](http://www.tecmint.com/wp-content/uploads/2015/09/Find-File-Types-in-Linux.jpg) + +在 Linux 中管理文件类型并设置时间 - 第三部分 + +请先查看我们 [Linux 小技巧][1]系列之前的文章。 + +- [Linux 中 5 个有趣的命令行提示和技巧 - 第一部分][2] +- [给新手的有用命令行技巧 - 第二部分][3] + +在这篇文章中,我们打算看看终端中 10 个和文件以及时间相关的提示和技巧。 + +### Linux 中的文件类型 ### + +在 Linux 中,一切皆文件,你的设备、目录以及普通文件都认为是文件。 + +Linux 系统中文件有不同的类型: + +- 普通文件:可能包含命令、文档、音频文件、视频、图像,归档文件等。 +- 设备文件:系统用于访问你硬件组件。 + +这里有两种表示存储设备的设备文件块文件,例如硬盘,它们以快读取数据,字符文件,以逐个字符读取数据。 + +- 硬链接和软链接:用于在 Linux 文件系统的任意地方访问文件。 +- 命名管道和套接字:允许不同的进程彼此之间交互。 + +#### 1. 用 ‘file’ 命令确定文件类型 #### + +你可以像下面这样使用 file 命令确定文件的类型。下面的截图显示了用 file 命令确定不同文件类型的例子。 + + tecmint@tecmint ~/Linux-Tricks $ dir + BACKUP master.zip + crossroads-stable.tar.gz num.txt + EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 reggea.xspf + Linux-Security-Optimization-Book.gif tmp-link + + tecmint@tecmint ~/Linux-Tricks $ file BACKUP/ + BACKUP/: directory + + tecmint@tecmint ~/Linux-Tricks $ file master.zip + master.zip: Zip archive data, at least v1.0 to extract + + tecmint@tecmint ~/Linux-Tricks $ file crossroads-stable.tar.gz + crossroads-stable.tar.gz: gzip compressed data, from Unix, last modified: Tue Apr 5 15:15:20 2011 + + tecmint@tecmint ~/Linux-Tricks $ file Linux-Security-Optimization-Book.gif + Linux-Security-Optimization-Book.gif: GIF image data, version 89a, 200 x 259 + + tecmint@tecmint ~/Linux-Tricks $ file EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 + EDWARD-MAYA-2011-2012-NEW-REMIX.mp3: Audio file with ID3 version 2.3.0, contains: MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, JntStereo + + tecmint@tecmint ~/Linux-Tricks $ file /dev/sda1 + /dev/sda1: block special + + tecmint@tecmint ~/Linux-Tricks $ file /dev/tty1 + /dev/tty1: character special + +#### 2. 用 ‘ls’ 和 ‘dir’ 命令确定文件类型 #### + +确定文件类型的另一种方式是用 ls 和 [dir][4] 命令显示一长串结果。 + +用 ls -l 确定一个文件的类型。 + +当你查看文件权限时,第一个字符显示了文件类型,其它字符显示文件权限。 + + tecmint@tecmint ~/Linux-Tricks $ ls -l + total 6908 + drwxr-xr-x 2 tecmint tecmint 4096 Sep 9 11:46 BACKUP + -rw-r--r-- 1 tecmint tecmint 1075620 Sep 9 11:47 crossroads-stable.tar.gz + -rwxr----- 1 tecmint tecmint 5916085 Sep 9 11:49 EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 + -rw-r--r-- 1 tecmint tecmint 42122 Sep 9 11:49 Linux-Security-Optimization-Book.gif + -rw-r--r-- 1 tecmint tecmint 17627 Sep 9 11:46 master.zip + -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:48 num.txt + -rw-r--r-- 1 tecmint tecmint 0 Sep 9 11:46 reggea.xspf + -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:47 tmp-link + +使用 ls -l 确定块和字符文件 + + tecmint@tecmint ~/Linux-Tricks $ ls -l /dev/sda1 + brw-rw---- 1 root disk 8, 1 Sep 9 10:53 /dev/sda1 + + tecmint@tecmint ~/Linux-Tricks $ ls -l /dev/tty1 + crw-rw---- 1 root tty 4, 1 Sep 9 10:54 /dev/tty1 + +使用 dir -l 确定一个文件的类型。 + + tecmint@tecmint ~/Linux-Tricks $ dir -l + total 6908 + drwxr-xr-x 2 tecmint tecmint 4096 Sep 9 11:46 BACKUP + -rw-r--r-- 1 tecmint tecmint 1075620 Sep 9 11:47 crossroads-stable.tar.gz + -rwxr----- 1 tecmint tecmint 5916085 Sep 9 11:49 EDWARD-MAYA-2011-2012-NEW-REMIX.mp3 + -rw-r--r-- 1 tecmint tecmint 42122 Sep 9 11:49 Linux-Security-Optimization-Book.gif + -rw-r--r-- 1 tecmint tecmint 17627 Sep 9 11:46 master.zip + -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:48 num.txt + -rw-r--r-- 1 tecmint tecmint 0 Sep 9 11:46 reggea.xspf + -rw-r--r-- 1 tecmint tecmint 5 Sep 9 11:47 tmp-link + +#### 3. 统计指定类型文件的数目 #### + +下面我们来看看在一个目录中用 ls,[grep][5] 和 [wc][6] 命令统计指定类型文件数目的技巧。命令之间的交互通过命名管道完成。 + +- grep – 用户根据给定模式或正则表达式进行搜索的命令。 +- wc – 用于统计行、字和字符的命令。 + +**统计普通文件的数目** + +在 Linux 中,普通文件用符号 `-` 表示。 + + tecmint@tecmint ~/Linux-Tricks $ ls -l | grep ^- | wc -l + 7 + +**统计目录的数目** + +在 Linux 中,目录用符号 `d` 表示。 + + tecmint@tecmint ~/Linux-Tricks $ ls -l | grep ^d | wc -l + 1 + +**统计符号链接和硬链接的数目** + +在 Linux 中,符号链接和硬链接用符号 `l` 表示。 + + tecmint@tecmint ~/Linux-Tricks $ ls -l | grep ^l | wc -l + 0 + +**统计块文件和字符文件的数目** + +在 Linux 中,块和字符文件用符号 `b` 和 `c` 表示。 + + tecmint@tecmint ~/Linux-Tricks $ ls -l /dev | grep ^b | wc -l + 37 + tecmint@tecmint ~/Linux-Tricks $ ls -l /dev | grep ^c | wc -l + 159 + +#### 4. 在 Linux 系统中查找文件 #### + +下面我们来看看在 Linux 系统中查找文件一些命令,它们包括 locate、find、whatis 和 which 命令。 + +**用 locate 命令查找文件** + +在下面的输出中,我想要定位系统中的 [Samba 服务器配置文件][7] + + tecmint@tecmint ~/Linux-Tricks $ locate samba.conf + /usr/lib/tmpfiles.d/samba.conf + /var/lib/dpkg/info/samba.conffiles + +**用 find 命令查找文件** + +想要学习如何在 Linux 中使用 find 命令,你可以阅读我们以下的文章,里面列出了 find 命令的 30 多个例子和使用方法。 + +- [Linux 中 35 个 ‘find’ 命令示例][8] + +**用 whatis 命令定位命令** + +whatis 命令通常用于定位命令,它很特殊,因为它给出关于一个命令的信息,它还能查找配置文件和命令的帮助手册条目。 + + tecmint@tecmint ~/Linux-Tricks $ whatis bash + bash (1) - GNU Bourne-Again SHell + + tecmint@tecmint ~/Linux-Tricks $ whatis find + find (1) - search for files in a directory hierarchy + + tecmint@tecmint ~/Linux-Tricks $ whatis ls + ls (1) - list directory contents + +**用 which 命令定位命令** + +which 命令用于定位文件系统中的命令。 + + tecmint@tecmint ~/Linux-Tricks $ which mkdir + /bin/mkdir + + tecmint@tecmint ~/Linux-Tricks $ which bash + /bin/bash + + tecmint@tecmint ~/Linux-Tricks $ which find + /usr/bin/find + + tecmint@tecmint ~/Linux-Tricks $ $ which ls + /bin/ls + +#### 5.处理 Linux 系统的时间 #### + +在联网环境中,保持你 Linux 系统时间准确是一个好的习惯。Linux 系统中有很多服务要求时间正确才能在联网条件下正常工作。 + +让我们来看看你可以用来管理你机器时间的命令。在 Linux 中,有两种方式管理时间:系统时间和硬件时间。 + +系统时间由系统时钟管理,硬件时间由硬件时钟管理。 + +要查看你的系统时间、日期和时区,像下面这样使用 date 命令。 + + tecmint@tecmint ~/Linux-Tricks $ date + Wed Sep 9 12:25:40 IST 2015 + +像下面这样用 date -s 或 date -set=“STRING” 设置系统时间。 + + tecmint@tecmint ~/Linux-Tricks $ sudo date -s "12:27:00" + Wed Sep 9 12:27:00 IST 2015 + + tecmint@tecmint ~/Linux-Tricks $ sudo date --set="12:27:00" + Wed Sep 9 12:27:00 IST 2015 + +你也可以像下面这样设置时间和日期。 + + tecmint@tecmint ~/Linux-Tricks $ sudo date 090912302015 + Wed Sep 9 12:30:00 IST 2015 + +使用 cal 命令从日历中查看当前日期。 + + tecmint@tecmint ~/Linux-Tricks $ cal + September 2015 + Su Mo Tu We Th Fr Sa + 1 2 3 4 5 + 6 7 8 9 10 11 12 + 13 14 15 16 17 18 19 + 20 21 22 23 24 25 26 + 27 28 29 30 + +使用 hwclock 命令查看硬件始终时间。 + + tecmint@tecmint ~/Linux-Tricks $ sudo hwclock + Wednesday 09 September 2015 06:02:58 PM IST -0.200081 seconds + +要设置硬件时钟时间,像下面这样使用 hwclock –set –date=“STRING” 命令。 + + tecmint@tecmint ~/Linux-Tricks $ sudo hwclock --set --date="09/09/2015 12:33:00" + + tecmint@tecmint ~/Linux-Tricks $ sudo hwclock + Wednesday 09 September 2015 12:33:11 PM IST -0.891163 seconds + +系统时间是由硬件始终时间在启动时设置的,系统关闭时,硬件时间被重置为系统时间。 + +因此你查看系统时间和硬件时间时,它们是一样的,除非你更改了系统时间。当你的 CMOS 电量不足时,硬件时间可能不正确。 + +你也可以像下面这样使用硬件时钟的时间设置系统时间。 + + $ sudo hwclock --hctosys + +也可以像下面这样用系统时钟时间设置硬件时钟时间。 + + $ sudo hwclock --systohc + +要查看你的 Linux 系统已经运行了多长时间,可以使用 uptime 命令。 + + tecmint@tecmint ~/Linux-Tricks $ uptime + 12:36:27 up 1:43, 2 users, load average: 1.39, 1.34, 1.45 + + tecmint@tecmint ~/Linux-Tricks $ uptime -p + up 1 hour, 43 minutes + + tecmint@tecmint ~/Linux-Tricks $ uptime -s + 2015-09-09 10:52:47 + +### 总结 ### + +对于初学者来说理解 Linux 中的文件类型是一个好的尝试,同时时间管理也非常重要,尤其是在需要可靠有效地管理服务的服务器上。希望这篇指南能对你有所帮助。如果你有任何反馈,别忘了给我们写评论。和 Tecmint 保持联系。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-file-types-and-set-system-time-in-linux/ + +作者:[Aaron Kili][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/aaronkili/ +[1]:http://www.tecmint.com/tag/linux-tricks/ +[2]:http://www.tecmint.com/free-online-linux-learning-guide-for-beginners/ +[3]:http://www.tecmint.com/10-useful-linux-command-line-tricks-for-newbies/ +[4]:http://www.tecmint.com/linux-dir-command-usage-with-examples/ +[5]:http://www.tecmint.com/12-practical-examples-of-linux-grep-command/ +[6]:http://www.tecmint.com/wc-command-examples/ +[7]:http://www.tecmint.com/setup-samba-file-sharing-for-linux-windows-clients/ +[8]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/ \ No newline at end of file From a001f8da461d0db3d86d4c233f057ce7e7181754 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 27 Sep 2015 15:12:08 +0800 Subject: [PATCH 2167/2517] [Translating]sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md --- ...11 10 Useful Linux Command Line Tricks for Newbies--Part 2.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md b/sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md index 09fd4c879d..51933e540a 100644 --- a/sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md +++ b/sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md @@ -1,3 +1,4 @@ +ictlyh Translating 10 Useful Linux Command Line Tricks for Newbies – Part 2 ================================================================================ I remember when I first started using Linux and I was used to the graphical interface of Windows, I truly hated the Linux terminal. Back then I was finding the commands hard to remember and proper use of each one of them. With time I realised the beauty, flexibility and usability of the Linux terminal and to be honest a day doesn’t pass without using. Today, I would like to share some useful tricks and tips for Linux new comers to ease their transition to Linux or simply help them learn something new (hopefully). From dd5d88063ccebe939c96999e095ca364d9738847 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Sun, 27 Sep 2015 16:02:01 +0800 Subject: [PATCH 2168/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LCTT翻译规范.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 LCTT翻译规范.md diff --git a/LCTT翻译规范.md b/LCTT翻译规范.md new file mode 100644 index 0000000000..b9a514f115 --- /dev/null +++ b/LCTT翻译规范.md @@ -0,0 +1,4 @@ +# Linux中国翻译规范 +1. 翻译中出现的专有名词,可参见Dict.md中的翻译。 +2. 英文人名,如无中文对应译名,一般不译。 +2. 缩写词,一般不须翻译,可考虑旁注中文全名。 \ No newline at end of file From 2ace123685ed6f3ef513e27b641103554afa0174 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 27 Sep 2015 16:13:29 +0800 Subject: [PATCH 2169/2517] [Translated]sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md --- ...Command Line Tricks for Newbies--Part 2.md | 251 ----------------- ...Command Line Tricks for Newbies--Part 2.md | 253 ++++++++++++++++++ 2 files changed, 253 insertions(+), 251 deletions(-) delete mode 100644 sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md create mode 100644 translated/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md diff --git a/sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md b/sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md deleted file mode 100644 index 51933e540a..0000000000 --- a/sources/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md +++ /dev/null @@ -1,251 +0,0 @@ -ictlyh Translating -10 Useful Linux Command Line Tricks for Newbies – Part 2 -================================================================================ -I remember when I first started using Linux and I was used to the graphical interface of Windows, I truly hated the Linux terminal. Back then I was finding the commands hard to remember and proper use of each one of them. With time I realised the beauty, flexibility and usability of the Linux terminal and to be honest a day doesn’t pass without using. Today, I would like to share some useful tricks and tips for Linux new comers to ease their transition to Linux or simply help them learn something new (hopefully). - -![10 Linux Commandline Tricks for Newbies](http://www.tecmint.com/wp-content/uploads/2015/09/10-Linux-Commandline-Tricks.jpg) - -10 Linux Commandline Tricks – Part 2 - -- [5 Interesting Command Line Tips and Tricks in Linux – Part 1][1] -- [5 Useful Commands to Manage Linux File Types – Part 3][2] - -This article intends to show you some useful tricks how to use the Linux terminal like a pro with minimum amount of skills. All you need is a Linux terminal and some free time to test these commands. - -### 1. Find the right command ### - -Executing the right command can be vital for your system. However in Linux there are so many different command lines that they are often hard to remember. So how do you search for the right command you need? The answer is apropos. All you need to run is: - - # apropos - -Where you should change the “description” with the actual description of the command you are looking for. Here is a good example: - - # apropos "list directory" - - dir (1) - list directory contents - ls (1) - list directory contents - ntfsls (8) - list directory contents on an NTFS filesystem - vdir (1) - list directory contents - -On the left you can see the commands and on the right their description. - -### 2. Execute Previous Command ### - -Many times you will need to execute the same command over and over again. While you can repeatedly press the Up key on your keyboard, you can use the history command instead. This command will list all commands you entered since you launched the terminal: - - # history - - 1 fdisk -l - 2 apt-get install gnome-paint - 3 hostname tecmint.com - 4 hostnamectl tecmint.com - 5 man hostnamectl - 6 hostnamectl --set-hostname tecmint.com - 7 hostnamectl -set-hostname tecmint.com - 8 hostnamectl set-hostname tecmint.com - 9 mount -t "ntfs" -o - 10 fdisk -l - 11 mount -t ntfs-3g /dev/sda5 /mnt - 12 mount -t rw ntfs-3g /dev/sda5 /mnt - 13 mount -t -rw ntfs-3g /dev/sda5 /mnt - 14 mount -t ntfs-3g /dev/sda5 /mnt - 15 mount man - 16 man mount - 17 mount -t -o ntfs-3g /dev/sda5 /mnt - 18 mount -o ntfs-3g /dev/sda5 /mnt - 19 mount -ro ntfs-3g /dev/sda5 /mnt - 20 cd /mnt - ... - -As you will see from the output above, you will receive a list of all commands that you have ran. On each line you have number indicating the row in which you have entered the command. You can recall that command by using: - - !# - -Where # should be changed with the actual number of the command. For better understanding, see the below example: - - !501 - -Is equivalent to: - - # history - -### 3. Use midnight Commander ### - -If you are not used to using commands such cd, cp, mv, rm than you can use the midnight command. It is an easy to use visual shell in which you can also use mouse: - -![Midnight Commander in Action](http://www.tecmint.com/wp-content/uploads/2015/09/mc-command.jpg) - -Midnight Commander in Action - -Thanks to the F1 – F12 keys, you can easy perform different tasks. Simply check the legend at the bottom. To select a file or folder click the “Insert” button. - -In short the midnight command is called “mc“. To install mc on your system simply run: - - $ sudo apt-get install mc [On Debian based systems] - ----------- - - # yum install mc [On Fedora based systems] - -Here is a simple example of using midnight commander. Open mc by simply typing: - - # mc - -Now use the TAB button to switch between windows – left and right. I have a LibreOffice file that I will move to “Software” folder: - -![Midnight Commander Move Files](http://www.tecmint.com/wp-content/uploads/2015/09/Midnight-Commander-Move-Files.jpg) - -Midnight Commander Move Files - -To move the file in the new directory press F6 button on your keyboard. MC will now ask you for confirmation: - -![Move Files to New Directory](http://www.tecmint.com/wp-content/uploads/2015/09/Move-Files-to-new-Directory.png) - -Move Files to New Directory - -Once confirmed, the file will be moved in the new destination directory. - -Read More: [How to Use Midnight Commander File Manager in Linux][4] - -### 4. Shutdown Computer at Specific Time ### - -Sometimes you will need to shutdown your computer some hours after your work hours have ended. You can configure your computer to shut down at specific time by using: - - $ sudo shutdown 21:00 - -This will tell your computer to shut down at the specific time you have provided. You can also tell the system to shutdown after specific amount of minutes: - - $ sudo shutdown +15 - -That way the system will shut down in 15 minutes. - -### 5. Show Information about Known Users ### - -You can use a simple command to list your Linux system users and some basic information about them. Simply use: - - # lslogins - -This should bring you the following output: - - UID USER PWD-LOCK PWD-DENY LAST-LOGIN GECOS - 0 root 0 0 Apr29/11:35 root - 1 bin 0 1 bin - 2 daemon 0 1 daemon - 3 adm 0 1 adm - 4 lp 0 1 lp - 5 sync 0 1 sync - 6 shutdown 0 1 Jul19/10:04 shutdown - 7 halt 0 1 halt - 8 mail 0 1 mail - 10 uucp 0 1 uucp - 11 operator 0 1 operator - 12 games 0 1 games - 13 gopher 0 1 gopher - 14 ftp 0 1 FTP User - 23 squid 0 1 - 25 named 0 1 Named - 27 mysql 0 1 MySQL Server - 47 mailnull 0 1 - 48 apache 0 1 Apache - ... - -### 6. Search for Files ### - -Searching for files can sometimes be not as easy as you think. A good example for searching for files is: - - # find /home/user -type f - -This command will search for all files located in /home/user. The find command is extremely powerful one and you can pass more options to it to make your search even more detailed. If you want to search for files larger than given size, you can use: - - # find . -type f -size 10M - -The above command will search from current directory for all files that are larger than 10 MB. Make sure not to run the command from the root directory of your Linux system as this may cause high I/O on your machine. - -One of the most frequently used combinations that I use find with is “exec” option, which basically allows you to run some actions on the results of the find command. - -For example, lets say that we want to find all files in a directory and change their permissions. This can be easily done with: - - # find /home/user/files/ -type f -exec chmod 644 {} \; - -The above command will search for all files in the specified directory recursively and will executed chmod command on the found files. I am sure you will find many more uses on this command in future, for now read [35 Examples of Linux ‘find’ Command and Usage][5]. - -### 7. Build Directory Trees with one Command ### - -You probably know that you can create new directories by using the mkdir command. So if you want to create a new folder you will run something like this: - - # mkdir new_folder - -But what, if you want to create 5 subfolders within that folder? Running mkdir 5 times in a row is not a good solution. Instead you can use -p option like that: - - # mkdir -p new_folder/{folder_1,folder_2,folder_3,folder_4,folder_5} - -In the end you should have 5 folders located in new_folder: - - # ls new_folder/ - - folder_1 folder_2 folder_3 folder_4 folder_5 - -### 8. Copy File into Multiple Directories ### - -File copying is usually performed with the cp command. Copying a file usually looks like this: - - # cp /path-to-file/my_file.txt /path-to-new-directory/ - -Now imagine that you need to copy that file in multiple directories: - - # cp /home/user/my_file.txt /home/user/1 - # cp /home/user/my_file.txt /home/user/2 - # cp /home/user/my_file.txt /home/user/3 - -This is a bit absurd. Instead you can solve the problem with a simple one line command: - - # echo /home/user/1/ /home/user/2/ /home/user/3/ | xargs -n 1 cp /home/user/my_file.txt - -### 9. Deleting Larger Files ### - -Sometimes files can grow extremely large. I have seen cases where a single log file went over 250 GB large due to poor administrating skills. Removing the file with rm utility might not be sufficient in such cases due to the fact that there is extremely large amount of data that needs to be removed. The operation will be a “heavy” one and should be avoided. Instead, you can go with a really simple solution: - - # > /path-to-file/huge_file.log - -Where of course you will need to change the path and the file names with the exact ones to match your case. The above command will simply write an empty output to the file. In more simpler words it will empty the file without causing high I/O on your system. - -### 10. Run Same Command on Multiple Linux Servers ### - -Recently one of our readers asked in our [LinuxSay forum][6], how to execute single command to multiple Linux boxes at once using SSH. He had his machines IP addresses looking like this: - - 10.0.0.1 - 10.0.0.2 - 10.0.0.3 - 10.0.0.4 - 10.0.0.5 - -So here is a simple solution of this issue. Collect the IP addresses of the servers in a one file called list.txt one under other just as shown above. Then you can run: - - # for in $i(cat list.txt); do ssh user@$i 'bash command'; done - -In the above example you will need to change “user” with the actual user with which you will be logging and “bash command” with the actual bash command you wish to execute. The method is better working when you are [using passwordless authentication with SSH key][7] to your machines as that way you will not need to enter the password for your user over and over again. - -Note that you may need to pass some additional parameters to the SSH command depending on your Linux boxes setup. - -### Conclusion ### - -The above examples are really simple ones and I hope they have helped you to find some of the beauty of Linux and how you can easily perform different operations that can take much more time on other operating systems. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/10-useful-linux-command-line-tricks-for-newbies/ - -作者:[Marin Todorov][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/marintodorov89/ -[1]:http://www.tecmint.com/5-linux-command-line-tricks/ -[2]:http://www.tecmint.com/manage-file-types-and-set-system-time-in-linux/ -[3]:http://www.tecmint.com/history-command-examples/ -[4]:http://www.tecmint.com/midnight-commander-a-console-based-file-manager-for-linux/ -[5]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/ -[6]:http://www.linuxsay.com/ -[7]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ \ No newline at end of file diff --git a/translated/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md b/translated/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md new file mode 100644 index 0000000000..c2fcb279f1 --- /dev/null +++ b/translated/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md @@ -0,0 +1,253 @@ +给新手的 10 个有用 Linux 命令行技巧 - 第二部分 +================================================================================ +我记得我第一次使用 Linux 的时候,我还习惯于 Windows 的图形界面,我真的很讨厌 Linux 终端。那时候我觉得命令难以记忆,不能正确使用它们。随着时间推移,我意识到了 Linux 终端的优美、灵活和可用性,说实话,我没有一天不使用它。今天,我很高兴和刚开始接触 Linux 的人一起来分享一些有用的技巧和提示,希望能帮助他们更好的向 Linux 过度,并帮助他们学到一些新的东西(希望如此)。 + +![给新手的 10 个命令行技巧](http://www.tecmint.com/wp-content/uploads/2015/09/10-Linux-Commandline-Tricks.jpg) + +10 个 Linux 命令行技巧 - 第二部分 + + +- [Linux 中 5 个有趣的命令行提示和技巧 - 第一部分][1] +- [管理 Linux 文件类型的 5 个有用命令 – 第三部分][2] + +这篇文章希望向你展示一些不需要很高的技术而可以像一个高手一样使用 Linux 终端的有用技巧。你只需要一个 Linux 终端和一些自由时间来体会这些命令。 + +### 1. 找到正确的命令 ### + +执行正确的命令对你的系统来说非常重要。然而在 Linux 中有很多通常难以记忆的不同的命令行。那么怎样才能找到你需要的正确命令呢?答案是 apropos。你只需要运行: + + # apropos + +其中你要用真正描述你要查找的命令的语句代替 “description”。这里有一个例子: + + # apropos "list directory" + + dir (1) - list directory contents + ls (1) - list directory contents + ntfsls (8) - list directory contents on an NTFS filesystem + vdir (1) - list directory contents + +左边你看到的是命令,右边是它们的描述。 + +### 2. 执行之前的命令 ### + +很多时候你需要一遍又一遍执行相同的命令。尽管你可以重复按你键盘上的 Up 键,你也可以用 history 命令。这个命令会列出自从你上次启动终端以来所有输入过的命令: + + # history + + 1 fdisk -l + 2 apt-get install gnome-paint + 3 hostname tecmint.com + 4 hostnamectl tecmint.com + 5 man hostnamectl + 6 hostnamectl --set-hostname tecmint.com + 7 hostnamectl -set-hostname tecmint.com + 8 hostnamectl set-hostname tecmint.com + 9 mount -t "ntfs" -o + 10 fdisk -l + 11 mount -t ntfs-3g /dev/sda5 /mnt + 12 mount -t rw ntfs-3g /dev/sda5 /mnt + 13 mount -t -rw ntfs-3g /dev/sda5 /mnt + 14 mount -t ntfs-3g /dev/sda5 /mnt + 15 mount man + 16 man mount + 17 mount -t -o ntfs-3g /dev/sda5 /mnt + 18 mount -o ntfs-3g /dev/sda5 /mnt + 19 mount -ro ntfs-3g /dev/sda5 /mnt + 20 cd /mnt + ... + +正如你上面看到的,你会得到一个你运行过的命令的列表。每一行中有一个数字表示你在第几行输入了命令。你可以通过以下方法重新调用该命令: + + !# + +其中要用命令的实际编号代替 #。为了更好的理解,请看下面的例子: + + !501 + +等价于: + + # history + +### 3. 使用 midnight 命令 ### + +如果你不习惯使用类似 cd、cp、mv、rm 等命令,你可以使用 midnight 命令。它是一个简单的可视化 shell,你可以在上面使用鼠标: + + +![Midnight 命令](http://www.tecmint.com/wp-content/uploads/2015/09/mc-command.jpg) + +Midnight 命令 + +多亏了 F1 到 F12 键,你可以轻易地执行不同任务。只需要在底部选择对应的命令。要选择文件或者目录,点击 “Insert” 按钮。 + +简而言之 midnight 就是所谓的 “mc”。要安装 mc,只需要运行: + + $ sudo apt-get install mc [On Debian based systems] + +---------- + + # yum install mc [On Fedora based systems] + +下面是一个使用 midnight 命令器的简单例子。通过输入以下命令打开 mc: + + # mc + +现在使用 TAB 键选择不同的窗口 - 左和右。我有一个想要移动到 “Software” 目录的 LibreOffice 文件: + +![Midnight 命令移动文件](http://www.tecmint.com/wp-content/uploads/2015/09/Midnight-Commander-Move-Files.jpg) + +Midnight 命令移动文件 + +按 F6 按钮移动文件到新的目录。MC 会请求你确认: + +![移动文件到新目录](http://www.tecmint.com/wp-content/uploads/2015/09/Move-Files-to-new-Directory.png) + +移动文件到新目录 + +确认了之后,文件就会被移动到新的目标目录。 + +扩展阅读:[如何在 Linux 中使用 Midnight 命令文件管理器][4] + +### 4. 在指定时间关闭计算机 ### + +有时候你需要在结束工作几个小时后再关闭计算机。你可以通过使用下面的命令在指定时间关闭你的计算机: + + $ sudo shutdown 21:00 + +这会告诉你在你指定的时间关闭计算机。你也可以告诉系统在指定分钟后关闭: + + $ sudo shutdown +15 + +这表示计算机会在 15 分钟后关闭。 + +### 5. 显示已知用户的信息 ### + +你可以使用一个简单的命令列出你 Linux 系统的用户以及一些关于它们的基本信息。 + + # lslogins + +这会输出下面的结果: + + UID USER PWD-LOCK PWD-DENY LAST-LOGIN GECOS + 0 root 0 0 Apr29/11:35 root + 1 bin 0 1 bin + 2 daemon 0 1 daemon + 3 adm 0 1 adm + 4 lp 0 1 lp + 5 sync 0 1 sync + 6 shutdown 0 1 Jul19/10:04 shutdown + 7 halt 0 1 halt + 8 mail 0 1 mail + 10 uucp 0 1 uucp + 11 operator 0 1 operator + 12 games 0 1 games + 13 gopher 0 1 gopher + 14 ftp 0 1 FTP User + 23 squid 0 1 + 25 named 0 1 Named + 27 mysql 0 1 MySQL Server + 47 mailnull 0 1 + 48 apache 0 1 Apache + ... + +### 6. 查找文件 ### +### 6. Search for Files ### + +查找文件有时候并不像你想象的那么简单。一个搜索文件的好例子是: + + # find /home/user -type f + +这个命令会搜索 /home/user 目录下的所有文件。find 命令真的很强大,你可以传递更多选项给它使得你的搜索更加详细。如果你想搜索比特定大小大的文件,可以使用: + + # find . -type f -size 10M + +上面的命令会搜索当前目录中所有大于 10M 的文件。确保不要在你 Linux 系统的根目录运行该命令,因为这可能导致你的机器 I/O 瓶颈。 + +我最经常和 find 命令一起使用的选项之一是 “exec”,这允许你对 find 命令的结果运行一些操作。 + +例如,假如我们想查找一个目录中的所有文件并更改权限。可以通过以下简单命令完成: + + # find /home/user/files/ -type f -exec chmod 644 {} \; + +上面的命令会递归搜索指定目录内的所有文件,并对找到的文件执行 chmod 命令。推荐你阅读 [35 个 Linux ‘find’ 命令的使用方法][5],我肯定你会发现这个命令更多的使用方法。 + +### 7. 用一个命令创建目录树 ### + +你很可能知道可以使用 mkdir 命令创建新的目录。因此如果你想创建一个新的目录,你可能会运行: + + # mkdir new_folder + +但如果你想在该目录下创建 5 个子目录呢?运行 5 次 mkdir 命令并非是一个好的选择。相反你可以类似下面这样使用 -p 选项: + + # mkdir -p new_folder/{folder_1,folder_2,folder_3,folder_4,folder_5} + +最后你会在 new_folder 中有 5 个目录: + + # ls new_folder/ + + folder_1 folder_2 folder_3 folder_4 folder_5 + +### 8. 复制文件到多个目录 ### + +通常使用 cp 命令进行文件复制。复制文件通常看起来类似: + + # cp /path-to-file/my_file.txt /path-to-new-directory/ + +现在假设你需要复制该文件到多个目录: + + # cp /home/user/my_file.txt /home/user/1 + # cp /home/user/my_file.txt /home/user/2 + # cp /home/user/my_file.txt /home/user/3 + +这有点荒唐。相反,你可以用简单的一行命令解决问题: + + # echo /home/user/1/ /home/user/2/ /home/user/3/ | xargs -n 1 cp /home/user/my_file.txt + +### 9. 删除大文件 ### + +有时候文件可能会变得很大。我看过由于缺乏管理技能一个日志文件就超过 250G 的例子。用 rm 命令可能不足以删除该文件,因为有大量的数据需要移除。应该避免这个很“笨重”的操作。相反,你可以使用一个简单的方法解决这个问题: + + # > /path-to-file/huge_file.log + +当然你需要根据你实际情况替换路径和文件名。上面的命令写一个空输出到该文件。用更简单的话说它会清空文件而不会导致你的系统产生大的 I/O 消耗。 + +### 10. 在多个 Linux 服务器上运行相同命令 ### + +最近我们的一个读者在 [LinuxSay 论坛][6]提问说如何通过 ssh 在多个 Linux 服务器上执行一个命令。他机器的 IP 地址是: + + 10.0.0.1 + 10.0.0.2 + 10.0.0.3 + 10.0.0.4 + 10.0.0.5 + +这里有一个简单的解决方法。收集服务器的 IP 地址到文件 list.txt 中,像上面那样一行一个。然后运行: + + # for in $i(cat list.txt); do ssh user@$i 'bash command'; done + +上面的命令中你需要用实际登录的用户替换 “user”,用你希望执行的实际命令替换 “bash command”。这个方法非常适用于通过[使用 SSH 密钥进行无密码验证][7],因为这样你不需要每次都为用户输入密码。 + +注意取决于你 Linux 系统的设置,你可能还需要传递一些额外的参数给 SSH 命令。 + +### 总结 ### + +上面的例子都很简单,我希望它们能帮助你发现 Linux 的优美之处,你如何能简单实现在其它操作系统上需要更多时间的不同操作。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/10-useful-linux-command-line-tricks-for-newbies/ + +作者:[Marin Todorov][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/marintodorov89/ +[1]:http://www.tecmint.com/5-linux-command-line-tricks/ +[2]:http://www.tecmint.com/manage-file-types-and-set-system-time-in-linux/ +[3]:http://www.tecmint.com/history-command-examples/ +[4]:http://www.tecmint.com/midnight-commander-a-console-based-file-manager-for-linux/ +[5]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/ +[6]:http://www.linuxsay.com/ +[7]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ \ No newline at end of file From 48f3d07d209970c7e32aa1a6543a9e52b4b1daf3 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 27 Sep 2015 17:07:45 +0800 Subject: [PATCH 2170/2517] translating --- ...0906 How to Install DNSCrypt and Unbound in Arch Linux.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 index 98cb0e9b55..b0c6dec1b5 100644 --- 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 @@ -1,3 +1,6 @@ +translating---geekpi + + 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. @@ -171,4 +174,4 @@ via: http://linoxide.com/tools/install-dnscrypt-unbound-archlinux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/arulm/ \ No newline at end of file +[a]:http://linoxide.com/author/arulm/ From cac21944417420c655ad482208877f66385f17b6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 27 Sep 2015 17:59:20 +0800 Subject: [PATCH 2171/2517] translated --- ...tall DNSCrypt and Unbound in Arch Linux.md | 177 ------------------ ...tall DNSCrypt and Unbound in Arch Linux.md | 173 +++++++++++++++++ 2 files changed, 173 insertions(+), 177 deletions(-) delete mode 100644 sources/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md create mode 100644 translated/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md 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 deleted file mode 100644 index b0c6dec1b5..0000000000 --- a/sources/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md +++ /dev/null @@ -1,177 +0,0 @@ -translating---geekpi - - -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/ diff --git a/translated/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md b/translated/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md new file mode 100644 index 0000000000..9977cbd09f --- /dev/null +++ b/translated/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md @@ -0,0 +1,173 @@ +如何在Arch Linux中安装DNSCrypt和Unbound +================================================================================ +**DNSCrypt**是一个用于加密和验证的DNS客户端和一个DNS解析器之间通信的协议。阻止DNS欺骗或中间人攻击。 DNSCrypt可用于大多数的操作系统,包括Linux,Windows,MacOSX的Android和iOS。而在本教程中我使用的是内核为4.1的archlinux。 + +Unbound是用来解析收到的任意DNS查询的DNS缓存服务器。如果用户请求一个新的查询,然后unbound将其存储到缓存中,并且当用户再次请求相同的请求时,unbound将采用已经保存的缓存。这将是第一次请求查询更快。 + +现在我将尝试安装“DNSCrypt”,以确保DNS的通信的安全,并用“Unbound”加速。 + +### 第一步 - 安装yaourt ### + +Yaourt是AUR(ARCH用户仓库)的辅助,使用户能够很容易地从AUR安装程序。 Yaourt和pacman一样使用相同的语法,这样你就可以使用yaourt安装该程序。下面是安装yaourt的简单方法: + +1. 用nano或者vi编辑arch仓库配置文件,保存在“/etc/pacman.conf”中。 + + $ nano /etc/pacman.conf + +2. 在底部填上你的yaourt仓库,粘贴下面的脚本: + + [archlinuxfr] + SigLevel = Never + Server = http://repo.archlinux.fr/$arch + +3. 用“"Ctrl + x”,接着用“Y”保存。 + +4. 接着升级仓库数据库并用pacman安装yaourt: + + $ sudo pacman -Sy yaourt + +### 第二步 - 安装 DNSCrypt和Unbound ### + +DNSCrypt和unbound就在archlinux仓库中,你可以用下面的pacman命令安装: + + $ sudo pacman -S dnscrypt-proxy unbound + +接着在安装的过程中按下“Y”。 + +### 第三步 - 安装 dnscrypt-autoinstall ### + +Dnscrypt-autoinstall是一个自动在基于Linux的系统上安装和配置DNSCrypt的脚本。DNSCrypt在AUR中,因此你必须使用“yaourt”命令来安装它。 + + $ yaourt -S dnscrypt-autoinstall + +注意 : + +-S = 这和pacman -S安装程序一样。 + +### 第四步 - 运行dnscrypt-autoinstall ### + +用root权限运行“dnscrypt-autoinstall”开自动配置DNSCrypt。 + + $ sudo dnscrypt-autoinstall + +下一步中输入“回车”,接着输入"Y"来选择你想使用的DNS提供者,我这里使用不带日志和DNSSEC的DNSCrypt.eu。 + +![DNSCrypt autoinstall](http://blog.linoxide.com/wp-content/uploads/2015/08/DNSCrypt-autoinstall.png) + +### 第五步 - 配置DNSCrypt和Unbound ### + +1. 打开dnscrypt的“/etc/conf.d/dnscrypt-config” 配置文件中“DNSCRYPT_LOCALIP”指向**本地ip**,“DNSCRYPT_LOCALPORT”根据你本人的意愿配置,我是用的是**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) + +保存并退出。 + +2. 现在你用nanao编辑器编辑“/etc/unbound/”下unbound的配置文件: + + $ nano /etc/unbound/unbound.conf + +3. 在脚本最后添加下面的行: + + do-not-query-localhost: no + forward-zone: + name: "." + forward-addr: 127.0.0.1@40 + +确保**forward-addr**和DNSCrypt中的“**DNSCRYPT_LOCALPORT**”一致。你看见我是用的是**40**端口。 + +![Unbound Configuration](http://blog.linoxide.com/wp-content/uploads/2015/08/UnboundConfiguration.png) + +接着保存并退出。 + +### 第六步 - 运行DNSCrypt和Unbound,接着添加到开机启动中 ### + +请用root权限运行DNSCrypt和unbound,你可以用systemctl命令来运行: + + $ sudo systemctl start dnscrypt-proxy unbound + +将服务添加到启动中。你可以运行“systemctl enable”: + + $ sudo systemctl enable dnscrypt-proxy unbound + +命令将会创建软链接到“/usr/lib/systemd/system/”目录的服务。 + +### 第七步 - 配置resolv.conf并重启所有服务 ### + +resolv.conf是一个在linux中用于配置DNS解析器的文件。它是一个由管理员创建的纯文本,因此你必须用root权限编辑并让它不能被其他人修改。 + +用nano编辑器编辑: + + $ nano /etc/resolv.conf + +并添加本地IP “**127.0.0.1**”,现在用“chattr”命令使他只读: + + $ chattr +i /etc/resolv.conf + +注意: + +如果你想要重新编辑,用“chattr -i /etc/resolv.conf”加入写权限。 + +现在你需要重启DNSCrypt和unbound和网络; + + $ sudo systemctl restart dnscrypt-proxy unbound netctl + +如果你看到错误,检查配置文件。 + +### 测试 ### + +1. 测试DNSCrypt + +你可以通过https://dnsleaktest.com/来确认DNSCrypt,点击“开始测试”或者“扩展测试”,并在程序运行期间等待。 + +现在你可以看到NSCrypt.eu就已经与作为DNS提供商的DNSCrypt协同工作了。 + +![Testing DNSCrypt](http://blog.linoxide.com/wp-content/uploads/2015/08/TestingDNSCrypt.png) + + +2. 测试 Unbound + +现在你应该确保unbound可以正确地与“dig”和“drill”命令一起工作。 + +这是dig命令的结果: + + $ dig linoxide.com + +我们现在看下结果,“Query time”是“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 + +再次输入命令,我们看到“Query time”是“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) + +DNSCrypt加密通信在DNS客户端和解析端工作的很好,并且Unbound通过缓存让相同的请求在另一次请求同速度更快。 + +### 总结 ### + +DNSCrypt是一个可以加密DNS客户端和DNS解析器之间的数据流的协议。 DNSCrypt可以在不同的操作系统上运行,无论是移动端或桌面端。选择DNS提供商还包括一些重要的事情,选择那些提供DNSSEC同时没有日志的。Unbound可被用作DNS缓存,从而加快解析过程,因为Unbound将请求缓存,那么接下来客户端请求相同的查询时,unbound将从缓存中取出保存的值。 DNSCrypt和Unbound是针对安全性和速度的一个强大的组合。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/install-dnscrypt-unbound-archlinux/ + +作者:[Arul][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/arulm/ From 0b70b4fe451c74fa19642dde29e0655ce061bc9b Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 27 Sep 2015 23:03:30 +0800 Subject: [PATCH 2172/2517] [translated]19 - The history of Android --- .../19 - The history of Android.md | 73 ------------------- .../19 - The history of Android.md | 71 ++++++++++++++++++ 2 files changed, 71 insertions(+), 73 deletions(-) delete mode 100644 sources/talk/The history of Android/19 - The history of Android.md create mode 100644 translated/talk/The history of Android/19 - The history of Android.md diff --git a/sources/talk/The history of Android/19 - The history of Android.md b/sources/talk/The history of Android/19 - The history of Android.md deleted file mode 100644 index 4fff9d0e37..0000000000 --- a/sources/talk/The history of Android/19 - The history of Android.md +++ /dev/null @@ -1,73 +0,0 @@ -alim0x translating - -The history of Android -================================================================================ -![Google Music Beta running on Gingerbread.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/device-2014-03-31-110613.png) -Google Music Beta running on Gingerbread. -Photo by Ron Amadeo - -### Google Music Beta—cloud storage in lieu of a content store ### - -While Honeycomb revamped the Google Music interface, the Music app didn't go directly from the Honeycomb design to Ice Cream Sandwich. In May 2011, Google launched "[Google Music Beta][1]," an online music locker that came along with a new Google Music app. - -The new Google Music app for 2.2 and up took a few design cues from the Cooliris Gallery, of all things, going with a changing, blurry image for the background. Just about everything was transparent: the pop-up menus, the tabs at the top, and the now-playing bar at the bottom. Individual songs or entire playlists could be downloaded to the device for offline playback, making Google Music an easy way to make sure your music was on all your devices. Besides the mobile app, there was also a Webapp, which allowed Google Music to work on any desktop computer. - -Google didn't have content deals in place with the record companies to start a music store yet, so its stop-gap solution was to allow users to store songs online and stream them to a device. Today, Google has content deals for individual song purchases and all-you-can-eat subscription modes, along with the music locker service. - -### Android 4.0, Ice Cream Sandwich—the modern era ### - -![The Samsung Galaxy Nexus, Android 4.0's launch device.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/samsung-i9250-galaxy-nexus-51.jpg) -The Samsung Galaxy Nexus, Android 4.0's launch device. - -Released in October 2011, Android 4.0, Ice Cream Sandwich, got the OS back on track with a release spanning phones and tablets, and it was once again open source. It was the first update to come to phones since Gingerbread, which meant the majority of Android's user base went almost a year without seeing an update. 4.0 was all about shrinking the Honeycomb design to smaller devices, bringing on-screen buttons, the action bar, and the new design language to phones. - -Ice Cream Sandwich debuted on the Samsung Galaxy Nexus, one of the first Android phones with a 720p screen. Along with the higher resolution, the Galaxy Nexus pushed phones to even larger sizes with a 4.65-inch screen—almost a full inch larger than the original Nexus One. This was called "too big" by many critics, but today many Android phones are even bigger. (Five inches is "normal" now.) Ice Cream Sandwich required a lot more power than Gingerbread did, and the Galaxy Nexus delivered with a dual core, 1.2Ghz TI OMAP processor and 1GB of RAM. - -In the US, the Galaxy Nexus debuted on Verizon with an LTE modem. Unlike previous Nexus devices, the most popular model—the Verizon version—was under the control of a carrier, and Google's software and updates had to be approved by Verizon before the phone could be updated. This led to delays in updates and the removal of software Verizon didn't like, namely Google Wallet. - -Thanks to the software improvements in Ice Cream Sandwich, Google finally achieved peak button removal on a phone. With the on-screen navigation buttons, the capacitive buttons could be removed, leaving the Galaxy Nexus with only power and volume buttons. - -![Android 4.0 shrunk down a lot of the Honeycomb design.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/2home.png) -Android 4.0 shrunk down a lot of the Honeycomb design. -Photo by Ron Amadeo - -The Tron aesthetic in Honeycomb was a little much. Immediately in Ice Cream Sandwich, Google started turning down some of the more sci-fi aspects of the design. The sci-fi clock font changed from a folded over semi-transparent thing to a thin, elegant, normal-looking font. The water ripple touch effect on the unlock circle was removed, and the alien Honeycomb clock widget was scrapped in favor of a more minimal design. The system buttons were redesigned, too, changing from blue outlines with the occasional thick side to thin, even, white outlines. The default wallpaper changed from the blue Honeycomb spaceship interior to a streaky, broken rainbow, which added some much-needed color to the default layout. - -The Honeycomb system bar features were split into a two-bar design for phones. At the top was the traditional status bar, and at the bottom was the new system bar, which housed the three system buttons: Back, Home, and Recent. A permanent search bar was added to the top of the home screen. The bar persisted on the screen the same way the dock did, so over the five home screens, it took up 20 icon spots. On the Honeycomb unlock screen, the small inner circle could be moved anywhere outside the larger circle to unlock the device. In Ice Cream Sandwich, you had to actually hit the unlock icon with the inner circle. This new accuracy requirement allowed Google to add another option to the lock screen: a camera shortcut. Dragging the inner circle to the camera icon would directly launch the camera, skipping the home screen. - -![A Phone OS meant a ton more apps, and the notification panel became a full-screen interface again.](http://cdn.arstechnica.net/wp-content/uploads/2014/02/appsandnotic40.png) -A Phone OS meant a ton more apps, and the notification panel became a full-screen interface again. -Photo by Ron Amadeo - -The App drawer was still tabbed, but the "My Apps" tab from Honeycomb was replaced with "Widgets," which was a simple 2×3 thumbnail view of widgets. Like Honeycomb, this app drawer was paginated and had to be swiped through horizontally. (Android still uses this app drawer design today.) New in the app drawer was an Android Google+ app, which existed separately for some time. Along with it came a shortcut to "Messenger," the Google+ private messaging service. ("Messenger" is not to be confused with "Messaging," the stock SMS app.) - -Since we're back to a phone now, Messaging, News and Weather, Phone, and Voice Dialer returned, and Cordy, a tablet game, was removed. Our screenshots are from the Verizon variant, which, despite being a Nexus device, was sullied by crapware like "My Verizon Mobile," and "VZ Backup Assistant." In keeping with the de-Tronification theme of Ice Cream Sandwich, the Calendar and Camera icons now looked more like something from Planet Earth rather than alien artifacts. Clock, Downloads, Phone, and Android Market got new icons, too, and "Contacts" got a new icon and a new name, becoming "People." - -The Notification panel got a big overhaul, especially when compared to the [previous Gingerbread design][2]. There was now a top header featuring the date, a settings shortcut, and a "clear all." While first Honeycomb allowed users to dismiss individual notifications by tapping on an "X" in the notification, Ice Cream Sandwich's implementation was much more elegant: just swipe the individual notifications to the left or right and they cleared. Honeycomb had blue highlights, but the blue tone was all over the place. Ice Cream Sandwich unified almost everything to a single blue (hex code #33B5E5, if you want to get specific). The background of the notification panel was made transparent, and the "handle" at the bottom changed to a minimal blue circle with an opaque black background. - -![The main page of the Android Market changed back to black.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/market.png) -The main page of the Android Market changed back to black. -Photo by Ron Amadeo - -The Market got yet another redesign. It finally supported portrait mode again and added Music to the lineup of content you can buy in the store. The new Market extended the cards concept that debuted in Honeycomb and was the first version to use the same application on tablets and phones. The cards on the main page usually didn't link to apps, instead pointing to special promotional pages like "staff picks" or seasonal promotions. - ----------- - -![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) - -[Ron Amadeo][a] / Ron is the Reviews Editor at Ars Technica, where he specializes in Android OS and Google products. He is always on the hunt for a new gadget and loves to rip things apart to see how they work. - -[@RonAmadeo][t] - --------------------------------------------------------------------------------- - -via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/19/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://arstechnica.com/gadgets/2011/05/hands-on-grooving-on-the-go-with-impressive-google-music-beta/ -[2]:http://cdn.arstechnica.net/wp-content/uploads/2014/02/32.png -[a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo diff --git a/translated/talk/The history of Android/19 - The history of Android.md b/translated/talk/The history of Android/19 - The history of Android.md new file mode 100644 index 0000000000..2ea47bc778 --- /dev/null +++ b/translated/talk/The history of Android/19 - The history of Android.md @@ -0,0 +1,71 @@ +安卓编年史 +================================================================================ +![姜饼上的 Google Music Beta。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/device-2014-03-31-110613.png) +姜饼上的 Google Music Beta。 +Ron Amadeo 供图 + +### Google Music Beta —— 取代内容商店的云存储 ### + +尽管蜂巢改进了 Google Music 的界面,但是音乐应用的设计并没有从蜂巢直接进化到冰淇淋三明治。2011年5月,谷歌发布了“[Google Music Beta][1]”,和新的 Google Music 应用一同到来的在线音乐存储。 + +新 Google Music 为安卓2.2及以上版本设计,借鉴了 Cooliris 相册的设计语言,但也有改变之处,背景使用了模糊处理的图片。几乎所有东西都是透明的:弹出菜单,顶部标签页,还有底部的正在播放栏。可以下载单独的歌曲或整个播放列表到设备上离线播放,这让 Google Music 成为一个让音乐同步到你所有设备的好途径。除了移动应用外,Google Music 还有一个 Web 应用,让它可以在任何一台桌面电脑上使用。 + +谷歌和唱片公司关于内容的合约还没有谈妥,音乐商店还没准备好,所以它的权宜之计是允许用户存储音乐到线上并下载到设备上。如今谷歌除了音乐存储服务外,还有单曲购买和订阅模式。 + +### Android 4.0, 冰淇淋三明治 —— 摩登时代 ### + +![三星 Galaxy Nexus,安卓4.0的首发设备。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/samsung-i9250-galaxy-nexus-51.jpg) +三星 Galaxy Nexus,安卓4.0的首发设备。 + +安卓4.0,冰淇淋三明治,在2011年10月发布,系统发布回到正轨,带来定期发布的手机和平板,并且安卓再次开源。这是自姜饼以来手机设备的第一个更新,意味着最主要的安卓用户群体近乎一年没有见到更新了。4.0随处可见缩小版的蜂巢设计,还将虚拟按键,操作栏(Action Bar),全新的设计语言带到了手机上。 + +冰淇淋三明治在三星 Galaxy Nexus 上首次亮相,也是最早带有720p显示屏的安卓手机之一。随着分辨率的提高,Galaxy Nexus 使用了更大的4.65英寸显示屏——几乎比最初的 Nexus One 大了一整英寸。这被许多批评者认为“太大了”,但如今的安卓设备甚至更大。(5英寸现在是“正常”的。)冰淇淋三明治比姜饼的性能要求更高,Galaxy Nexus 配备了一颗双核,1.2Ghz 德州仪器 OMAP 处理器和1GB的内存。 + +在美国,Galaxy Nexus 在 Verizon 首发并且支持 LTE。不像之前的 Nexus 设备,最流行的型号——Verizon版——是在运营商的控制之下,谷歌的软件和更新在手机得到更新之前要经过 Verizon 的核准。这导致了更新的延迟以及 Verizon 不喜欢的应用被移除,即便是 Google Wallet 也不例外。 + +多亏了冰淇淋三明治的软件改进,谷歌终于达成了移除手机上按钮的目标。有了虚拟导航键,实体电容按钮就可以移除了,最终 Galaxy Nexus 仅有电源和音量是实体按键。 + +![安卓4.0将很多蜂巢的设计缩小了。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/2home.png) +安卓4.0将很多蜂巢的设计缩小了。 +Ron Amadeo 供图 + +电子质感的审美在蜂巢中显得有点多。于是在冰淇淋三明治中,谷歌开始减少科幻风的设计。科幻风的时钟字体从半透明折叠风格转变成纤细,优雅,看起来更加正常的字体。解锁环的水面波纹效果被去除了,蜂巢中的外星风格时钟小部件也被极简设计所取代。系统按钮也经过了重新设计,原先的蓝色轮廓,偶尔的厚边框变成了细的,设置带有白色轮廓。默认壁纸从蜂巢的蓝色太空船内部变成条纹状,破碎的彩虹,给默认布局增添了不少迟来的色彩。 + +蜂巢的系统栏在手机上一分为二。在顶上是传统的状态栏,底部是新的系统栏,放着三个系统按钮:后退,主屏幕,最近应用。一个固定的搜索栏放置在了主屏幕顶部。该栏以和底栏一样的方式固定在屏幕上,所以在五个主屏上,它总共占据了20个图标大小的位置。在蜂巢的锁屏上,内部的小圆圈可以向大圆圈外的任意位置滑动来解锁设备。在冰淇淋三明治,你得把小圆圈移动到解锁图标上。这个新准确度要求允许谷歌向锁屏添加新的选项:一个相机快捷方式。将小圆圈拖向相机图标会直接启动相机,跳过了主屏幕。 + +![一个手机系统意味着更多的应用,通知面板重新回到了全屏界面。](http://cdn.arstechnica.net/wp-content/uploads/2014/02/appsandnotic40.png) +一个手机系统意味着更多的应用,通知面板重新回到了全屏界面。 +Ron Amadeo 供图 + +应用抽屉还是标签页式的,但是蜂巢中的“我的应用”标签被“部件”标签页替代,这是个简单的2×3部件略缩图视图。像蜂巢里的那样,这个应用抽屉是分页的,需要水平滑动换页。(如今安卓仍在使用这个应用抽屉设计。)应用抽屉里新增的是 Google+ 应用,后来独立存在。还有一个“Messenger”快捷方式,是 Google+ 的私密信息服务。(不要混淆 “Messenger” 和已有的 “Messaging” 短信应用。) + +因为我们现在回到了手机上,所以短信,新闻和天气,电话,以及语音拨号都回来了,以及Cordy,一个平板的游戏,被移除了。尽管不是 Nexus 设备,我们的截图还是来自 Verizon 版的设备,可以从图上看到有像 “My Verizon Mobile” 和 “VZ Backup Assistant” 这样没用的应用。为了和冰淇淋三明治的去电子风格主题一致,日历和相机图标现在看起来更像是来自地球的东西而不是来自外星球。时钟,下载,电话,以及安卓市场同样得到了新图标,联系人“Contacts”获得了新图标,还有新名字“People”。 + +通知面板进行了大改造,特别是和[之前姜饼中的设计][2]相比而言。面板头部有个日期,一个设置的快捷方式,以及“清除所有”按钮。虽然蜂巢的第一个版本就允许用户通过通知右边的“X”消除单个通知,但是冰淇淋三明治的实现更加优雅:只要从左向右滑动通知即可。蜂巢有着蓝色高亮,但是蓝色色调到处都是。冰淇淋三明治几乎把所有地方的蓝色统一成一个(如果你想知道确定的值,hex码是#33B5E5)。通知面板的背景是透明的,底部的“把手”变为一个简单的小蓝圈,带着不透明的黑色背景。 + +![安卓市场的主页背景变成了黑色。](http://cdn.arstechnica.net/wp-content/uploads/2014/03/market.png) +安卓市场的主页背景变成了黑色。 +Ron Amadeo 供图 + +市场获得了又一个新设计。它终于再次支持纵向模式,并且添加了音乐到商店中,你可以从中购买音乐。新的市场拓展了从蜂巢中引入的卡片概念,它还是第一个同时使用在手机和平板上的版本。主页上的卡片通常不是链接到应用的,而是指向特别的促销页面,像是“编辑精选”或季度促销。 + +---------- + +![Ron Amadeo](http://cdn.arstechnica.net/wp-content//uploads/authors/ron-amadeo-sq.jpg) + +[Ron Amadeo][a] / Ron是Ars Technica的评论编缉,专注于安卓系统和谷歌产品。他总是在追寻新鲜事物,还喜欢拆解事物看看它们到底是怎么运作的。 + +[@RonAmadeo][t] + +-------------------------------------------------------------------------------- + +via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/19/ + +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://arstechnica.com/gadgets/2011/05/hands-on-grooving-on-the-go-with-impressive-google-music-beta/ +[2]:http://cdn.arstechnica.net/wp-content/uploads/2014/02/32.png +[a]:http://arstechnica.com/author/ronamadeo +[t]:https://twitter.com/RonAmadeo From 22441ffaf64c6fc4365038222ff827a2b03395ea Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 27 Sep 2015 23:09:33 +0800 Subject: [PATCH 2173/2517] PUB:20150906 How to Install DNSCrypt and Unbound in Arch Linux @geekpi --- ...tall DNSCrypt and Unbound in Arch Linux.md | 174 ++++++++++++++++++ ...tall DNSCrypt and Unbound in Arch Linux.md | 173 ----------------- 2 files changed, 174 insertions(+), 173 deletions(-) create mode 100644 published/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md delete mode 100644 translated/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md diff --git a/published/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md b/published/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md new file mode 100644 index 0000000000..c83f639e7e --- /dev/null +++ b/published/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md @@ -0,0 +1,174 @@ +如何在 Arch Linux 中安装 DNSCrypt 和 Unbound +================================================================================ + +**DNSCrypt** 是一个用于对 DNS 客户端和 DNS 解析器之间通信进行加密和验证的协议。它可以阻止 DNS 欺骗或中间人攻击。 DNSCrypt 可用于大多数的操作系统,包括 Linux,Windows,MacOSX ,Android 和 iOS。而在本教程中我使用的是内核为4.1的 archlinux。 + +**Unbound** 是用来解析收到的任意 DNS 查询的 DNS 缓存服务器。如果用户请求一个新的查询,unbound 会将其存储到缓存中,并且当用户再次请求相同的请求时,unbound 将采用已经保存的缓存。这将比第一次请求查询更快。 + +现在我将尝试安装“DNSCrypt”,以确保 DNS 的通信的安全,并用“Unbound”加速。 + +### 第一步 - 安装 yaourt ### + +Yaourt 是AUR(ARCH 用户仓库)的辅助工具之一,它可以使用户能够很容易地从 AUR 安装程序。 Yaourt 和 pacman 使用相同的语法,你可以使用 yaourt 安装该程序。下面是安装 yaourt 的简单方法: + +1、 用 nano 或者 vi 编辑 arch 仓库配置文件,存放在“/etc/pacman.conf”中。 + + $ nano /etc/pacman.conf + +2、 在 yaourt 仓库底部添加,粘贴下面的脚本: + + [archlinuxfr] + SigLevel = Never + Server = http://repo.archlinux.fr/$arch + +3、 用“Ctrl + x”,接着用“Y”保存。 + +4、 接着升级仓库数据库并用pacman安装yaourt: + + $ sudo pacman -Sy yaourt + +### 第二步 - 安装 DNSCrypt 和 Unbound ### + +DNSCrypt 和 unbound 就在 archlinux 仓库中,你可以用下面的 pacman 命令安装: + + $ sudo pacman -S dnscrypt-proxy unbound + +接着在安装的过程中按下“Y”。 + +### 第三步 - 安装 dnscrypt-autoinstall ### + +Dnscrypt-autoinstall 是一个在基于 Linux 的系统上自动安装和配置 DNSCrypt 的脚本。DNSCrypt 在 AUR 中,因此你必须使用“yaourt”命令来安装它。 + + $ yaourt -S dnscrypt-autoinstall + +注意 : + +-S = 这和 pacman -S 安装程序一样。 + +### 第四步 - 运行 dnscrypt-autoinstall ### + +用 root 权限运行“dnscrypt-autoinstall”来自动配置 DNSCrypt。 + + $ sudo dnscrypt-autoinstall + +下一步中按下“回车”,接着输入"Y"来选择你想使用的 DNS 提供者,我这里使用不带日志和 DNSSEC 的 DNSCrypt.eu。 + +![DNSCrypt autoinstall](http://blog.linoxide.com/wp-content/uploads/2015/08/DNSCrypt-autoinstall.png) + +### 第五步 - 配置 DNSCrypt 和 Unbound ### + +1、 打开 dnscrypt 的“/etc/conf.d/dnscrypt-config” ,确认配置文件中“DNSCRYPT_LOCALIP”指向**本地ip**,“DNSCRYPT_LOCALPORT”根据你本人的意愿配置,我是用的是**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) + +保存并退出。 + +2、 现在你用 nano 编辑器编辑“/etc/unbound/”下 unbound 的配置文件: + + $ nano /etc/unbound/unbound.conf + +3、 在脚本最后添加下面的行: + + do-not-query-localhost: no + forward-zone: + name: "." + forward-addr: 127.0.0.1@40 + +确保**forward-addr**和DNSCrypt中的“**DNSCRYPT_LOCALPORT**”一致。如你所见,用的是**40**端口。 + +![Unbound Configuration](http://blog.linoxide.com/wp-content/uploads/2015/08/UnboundConfiguration.png) + +接着保存并退出。 + +### 第六步 - 运行 DNSCrypt 和 Unbound,接着添加到开机启动中 ### + +请用 root 权限运行 DNSCrypt 和 unbound,你可以用 systemctl 命令来运行: + + $ sudo systemctl start dnscrypt-proxy unbound + +将服务添加到启动中。你可以运行“systemctl enable”: + + $ sudo systemctl enable dnscrypt-proxy unbound + +命令将会创建软链接到“/usr/lib/systemd/system/”目录的服务。 + +### 第七步 - 配置 resolv.conf 并重启所有服务 ### + +resolv.conf 是一个在 linux 中用于配置 DNS 解析器的文件。它是一个由管理员创建的纯文本,因此你必须用 root 权限编辑并让它不能被其他人修改。 + +用 nano 编辑器编辑: + + $ nano /etc/resolv.conf + +并添加本地IP “**127.0.0.1**”。现在用“chattr”命令使他只读: + + $ chattr +i /etc/resolv.conf + +注意: + +如果你想要重新编辑,用“chattr -i /etc/resolv.conf”加入写权限。 + +现在你需要重启 DNSCrypt 和 unbound 和网络; + + $ sudo systemctl restart dnscrypt-proxy unbound netctl + +如果你看到错误,检查配置文件。 + +### 测试 ### + +1、 测试 DNSCrypt + +你可以通过 https://dnsleaktest.com/ 来确认 DNSCrypt,点击“标准测试”或者“扩展测试”,然后等待程序运行结束。 + +现在你可以看到 DNSCrypt.eu 就已经与作为 DNS 提供商的 DNSCrypt 协同工作了。 + +![Testing DNSCrypt](http://blog.linoxide.com/wp-content/uploads/2015/08/TestingDNSCrypt.png) + + +2、 测试 Unbound + +现在你应该确保 unbound 可以正确地与“dig”和“drill”命令一起工作。 + +这是 dig 命令的结果: + + $ dig linoxide.com + +我们现在看下结果,“Query time”是“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 + +再次输入命令,我们看到“Query time”是“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) + +DNSCrypt 对 DNS 客户端和解析端之间的通讯加密做的很好,并且 Unbound 通过缓存让相同的请求在另一次请求同速度更快。 + +### 总结 ### + +DNSCrypt 是一个可以加密 DNS 客户端和 DNS 解析器之间的数据流的协议。 DNSCrypt 可以在不同的操作系统上运行,无论是移动端或桌面端。选择 DNS 提供商还包括一些重要的事情,应选择那些提供 DNSSEC 同时没有日志的。Unbound 可被用作 DNS 缓存,从而加快解析过程,因为 Unbound 将请求缓存,那么接下来客户端请求相同的查询时,unbound 将从缓存中取出保存的值。 DNSCrypt 和 Unbound 是针对安全性和速度的一个强大的组合。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/tools/install-dnscrypt-unbound-archlinux/ + +作者:[Arul][a] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arulm/ diff --git a/translated/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md b/translated/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md deleted file mode 100644 index 9977cbd09f..0000000000 --- a/translated/tech/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md +++ /dev/null @@ -1,173 +0,0 @@ -如何在Arch Linux中安装DNSCrypt和Unbound -================================================================================ -**DNSCrypt**是一个用于加密和验证的DNS客户端和一个DNS解析器之间通信的协议。阻止DNS欺骗或中间人攻击。 DNSCrypt可用于大多数的操作系统,包括Linux,Windows,MacOSX的Android和iOS。而在本教程中我使用的是内核为4.1的archlinux。 - -Unbound是用来解析收到的任意DNS查询的DNS缓存服务器。如果用户请求一个新的查询,然后unbound将其存储到缓存中,并且当用户再次请求相同的请求时,unbound将采用已经保存的缓存。这将是第一次请求查询更快。 - -现在我将尝试安装“DNSCrypt”,以确保DNS的通信的安全,并用“Unbound”加速。 - -### 第一步 - 安装yaourt ### - -Yaourt是AUR(ARCH用户仓库)的辅助,使用户能够很容易地从AUR安装程序。 Yaourt和pacman一样使用相同的语法,这样你就可以使用yaourt安装该程序。下面是安装yaourt的简单方法: - -1. 用nano或者vi编辑arch仓库配置文件,保存在“/etc/pacman.conf”中。 - - $ nano /etc/pacman.conf - -2. 在底部填上你的yaourt仓库,粘贴下面的脚本: - - [archlinuxfr] - SigLevel = Never - Server = http://repo.archlinux.fr/$arch - -3. 用“"Ctrl + x”,接着用“Y”保存。 - -4. 接着升级仓库数据库并用pacman安装yaourt: - - $ sudo pacman -Sy yaourt - -### 第二步 - 安装 DNSCrypt和Unbound ### - -DNSCrypt和unbound就在archlinux仓库中,你可以用下面的pacman命令安装: - - $ sudo pacman -S dnscrypt-proxy unbound - -接着在安装的过程中按下“Y”。 - -### 第三步 - 安装 dnscrypt-autoinstall ### - -Dnscrypt-autoinstall是一个自动在基于Linux的系统上安装和配置DNSCrypt的脚本。DNSCrypt在AUR中,因此你必须使用“yaourt”命令来安装它。 - - $ yaourt -S dnscrypt-autoinstall - -注意 : - --S = 这和pacman -S安装程序一样。 - -### 第四步 - 运行dnscrypt-autoinstall ### - -用root权限运行“dnscrypt-autoinstall”开自动配置DNSCrypt。 - - $ sudo dnscrypt-autoinstall - -下一步中输入“回车”,接着输入"Y"来选择你想使用的DNS提供者,我这里使用不带日志和DNSSEC的DNSCrypt.eu。 - -![DNSCrypt autoinstall](http://blog.linoxide.com/wp-content/uploads/2015/08/DNSCrypt-autoinstall.png) - -### 第五步 - 配置DNSCrypt和Unbound ### - -1. 打开dnscrypt的“/etc/conf.d/dnscrypt-config” 配置文件中“DNSCRYPT_LOCALIP”指向**本地ip**,“DNSCRYPT_LOCALPORT”根据你本人的意愿配置,我是用的是**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) - -保存并退出。 - -2. 现在你用nanao编辑器编辑“/etc/unbound/”下unbound的配置文件: - - $ nano /etc/unbound/unbound.conf - -3. 在脚本最后添加下面的行: - - do-not-query-localhost: no - forward-zone: - name: "." - forward-addr: 127.0.0.1@40 - -确保**forward-addr**和DNSCrypt中的“**DNSCRYPT_LOCALPORT**”一致。你看见我是用的是**40**端口。 - -![Unbound Configuration](http://blog.linoxide.com/wp-content/uploads/2015/08/UnboundConfiguration.png) - -接着保存并退出。 - -### 第六步 - 运行DNSCrypt和Unbound,接着添加到开机启动中 ### - -请用root权限运行DNSCrypt和unbound,你可以用systemctl命令来运行: - - $ sudo systemctl start dnscrypt-proxy unbound - -将服务添加到启动中。你可以运行“systemctl enable”: - - $ sudo systemctl enable dnscrypt-proxy unbound - -命令将会创建软链接到“/usr/lib/systemd/system/”目录的服务。 - -### 第七步 - 配置resolv.conf并重启所有服务 ### - -resolv.conf是一个在linux中用于配置DNS解析器的文件。它是一个由管理员创建的纯文本,因此你必须用root权限编辑并让它不能被其他人修改。 - -用nano编辑器编辑: - - $ nano /etc/resolv.conf - -并添加本地IP “**127.0.0.1**”,现在用“chattr”命令使他只读: - - $ chattr +i /etc/resolv.conf - -注意: - -如果你想要重新编辑,用“chattr -i /etc/resolv.conf”加入写权限。 - -现在你需要重启DNSCrypt和unbound和网络; - - $ sudo systemctl restart dnscrypt-proxy unbound netctl - -如果你看到错误,检查配置文件。 - -### 测试 ### - -1. 测试DNSCrypt - -你可以通过https://dnsleaktest.com/来确认DNSCrypt,点击“开始测试”或者“扩展测试”,并在程序运行期间等待。 - -现在你可以看到NSCrypt.eu就已经与作为DNS提供商的DNSCrypt协同工作了。 - -![Testing DNSCrypt](http://blog.linoxide.com/wp-content/uploads/2015/08/TestingDNSCrypt.png) - - -2. 测试 Unbound - -现在你应该确保unbound可以正确地与“dig”和“drill”命令一起工作。 - -这是dig命令的结果: - - $ dig linoxide.com - -我们现在看下结果,“Query time”是“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 - -再次输入命令,我们看到“Query time”是“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) - -DNSCrypt加密通信在DNS客户端和解析端工作的很好,并且Unbound通过缓存让相同的请求在另一次请求同速度更快。 - -### 总结 ### - -DNSCrypt是一个可以加密DNS客户端和DNS解析器之间的数据流的协议。 DNSCrypt可以在不同的操作系统上运行,无论是移动端或桌面端。选择DNS提供商还包括一些重要的事情,选择那些提供DNSSEC同时没有日志的。Unbound可被用作DNS缓存,从而加快解析过程,因为Unbound将请求缓存,那么接下来客户端请求相同的查询时,unbound将从缓存中取出保存的值。 DNSCrypt和Unbound是针对安全性和速度的一个强大的组合。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/tools/install-dnscrypt-unbound-archlinux/ - -作者:[Arul][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/arulm/ From 91d7f86ad3dbe0245899b54acd9294332765f97d Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 28 Sep 2015 10:44:42 +0800 Subject: [PATCH 2174/2517] PUB:20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on @strugglingyouth --- ... which CPU core a process is running on.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md (63%) diff --git a/translated/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md b/published/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md similarity index 63% rename from translated/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md rename to published/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md index d901b95030..be9b16e5e4 100644 --- a/translated/tech/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md +++ b/published/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md @@ -1,16 +1,16 @@ -Linux 有问必答--如何找出哪个 CPU 内核正在运行进程 +Linux 有问必答:如何知道进程运行在哪个 CPU 内核上? ================================================================================ >问题:我有个 Linux 进程运行在多核处理器系统上。怎样才能找出哪个 CPU 内核正在运行该进程? -当你运行需要较高性能的 HPC 程序或非常消耗网络资源的程序在 [多核 NUMA 处理器上][1],CPU/memory 的亲和力是限度其发挥最大性能的重要因素之一。在同一 NUMA 节点上调整程序的亲和力可以减少远程内存访问。像英特尔 Sandy Bridge 处理器,该处理器有一个集成的 PCIe 控制器,要调整同一 NUMA 节点的网络 I/O 负载可以使用 网卡控制 PCI 和 CPU 亲和力。 +当你在 [多核 NUMA 处理器上][1]运行需要较高性能的 HPC(高性能计算)程序或非常消耗网络资源的程序时,CPU/memory 的亲和力是限度其发挥最大性能的重要因素之一。在同一 NUMA 节点上调度最相关的进程可以减少缓慢的远程内存访问。像英特尔 Sandy Bridge 处理器,该处理器有一个集成的 PCIe 控制器,你可以在同一 NUMA 节点上调度网络 I/O 负载(如网卡)来突破 PCI 到 CPU 亲和力限制。 -由于性能优化和故障排除只是一部分,你可能想知道哪个 CPU 内核(或 NUMA 节点)被调度运行特定的进程。 +作为性能优化和故障排除的一部分,你可能想知道特定的进程被调度到哪个 CPU 内核(或 NUMA 节点)上运行。 -这里有几种方法可以 **找出哪个 CPU 内核被调度来运行 给定的 Linux 进程或线程**。 +这里有几种方法可以 **找出哪个 CPU 内核被调度来运行给定的 Linux 进程或线程**。 ### 方法一 ### -如果一个进程明确的被固定到 CPU 的特定内核,如使用 [taskset][2] 命令,你可以使用 taskset 命令找出被固定的 CPU 内核: +如果一个进程使用 [taskset][2] 命令明确的被固定(pinned)到 CPU 的特定内核上,你可以使用 taskset 命令找出被固定的 CPU 内核: $ taskset -c -p @@ -22,19 +22,18 @@ Linux 有问必答--如何找出哪个 CPU 内核正在运行进程 pid 5357's current affinity list: 5 -输出显示这个过程被固定在 CPU 内核 5。 +输出显示这个过程被固定在 CPU 内核 5上。 但是,如果你没有明确固定进程到任何 CPU 内核,你会得到类似下面的亲和力列表。 pid 5357's current affinity list: 0-11 -输出表明,该进程可能会被安排在从0到11中的任何一个 CPU 内核。在这种情况下,taskset 不会识别该进程当前被分配给哪个 CPU 内核,你应该使用如下所述的方法。 +输出表明该进程可能会被安排在从0到11中的任何一个 CPU 内核。在这种情况下,taskset 不能识别该进程当前被分配给哪个 CPU 内核,你应该使用如下所述的方法。 ### 方法二 ### ps 命令可以告诉你每个进程/线程目前分配到的 (在“PSR”列)CPU ID。 - $ ps -o pid,psr,comm -p ---------- @@ -42,7 +41,7 @@ ps 命令可以告诉你每个进程/线程目前分配到的 (在“PSR”列 PID PSR COMMAND 5357 10 prog -输出表示进程的 PID 为 5357(名为"prog")目前在CPU 内核 10 上运行着。如果该过程没有被固定,PSR 列可以保持随着时间变化,内核可能调度该进程到不同位置。 +输出表示进程的 PID 为 5357(名为"prog")目前在CPU 内核 10 上运行着。如果该过程没有被固定,PSR 列会根据内核可能调度该进程到不同内核而改变显示。 ### 方法三 ### @@ -72,11 +71,11 @@ via: http://ask.xmodulo.com/cpu-core-process-is-running.html 作者:[Dan Nanni][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni [1]:http://xmodulo.com/identify-cpu-processor-architecture-linux.html [2]:http://xmodulo.com/run-program-process-specific-cpu-cores-linux.html -[3]:http://ask.xmodulo.com/install-htop-centos-rhel.html +[3]:https://linux.cn/article-3141-1.html From 133a93b9dbf359fbc822dfa5db5ab7aa4b52f303 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 28 Sep 2015 11:00:26 +0800 Subject: [PATCH 2175/2517] PUB:20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility @GOLinux --- ...l Uptime of System With tuptime Utility.md | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) rename {translated/tech => published}/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md (71%) diff --git a/translated/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md b/published/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md similarity index 71% rename from translated/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md rename to published/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md index 0d242c0be2..4c6356ec4e 100644 --- a/translated/tech/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md +++ b/published/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md @@ -1,19 +1,21 @@ -使用tuptime工具查看Linux服务器系统历史开机时间统计 +使用 tuptime 工具查看 Linux 服务器系统的开机时间的历史和统计 ================================================================================ -你们可以使用下面的工具来查看Linux或者类Unix系统运行了多长时间: -- uptime : 告诉你服务器运行了多长的时间。 -- lastt : 显示重启和关机时间。 -- tuptime : 报告系统的历史运行时间和统计运行时间,这是指重启之间的运行时间。和uptime命令类似,不过输出结果更有意思。 -#### 找出系统上次重启时间和日期 #### +你可以使用下面的工具来查看 Linux 或类 Unix 系统运行了多长时间: + +- uptime : 告诉你服务器运行了多长的时间。 +- lastt : 显示重启和关机时间。 +- tuptime : 报告系统的运行时间历史和运行时间统计,这是指重启之间的运行时间。和 uptime 命令类似,不过输出结果更有意思。 + +### 找出系统上次重启时间和日期 ### 你[可以使用下面的命令来获取Linux操作系统的上次重启和关机时间及日期][1](在OSX/类Unix系统上也可以用): - ## 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 @@ -23,23 +25,24 @@ ![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) -图像01:用于找出服务器开机时间的多个Linux命令 +*图01:用于找出服务器开机时间的多个Linux命令* -**跟tuptime问打个招呼吧** +###跟 tuptime 问打个招呼吧### + +tuptime 命令行工具可以报告基于 Linux 的系统上的下列信息: -tuptime命令行工具可以报告基于Linux的系统上的下列信息: 1. 系统启动次数统计 2. 注册首次启动时间(也就是安装时间) -1. 正常关机和意外关机统计 -1. 平均开机时间和故障停机时间 -1. 当前开机时间 -1. 首次启动以来的开机和故障停机率 -1. 累积系统开机时间、故障停机时间和合计 -1. 报告每次启动、开机时间、关机和故障停机时间 +3. 正常关机和意外关机统计 +4. 平均开机时间和故障停机时间 +5. 当前开机时间 +6. 首次启动以来的开机和故障停机率 +7. 累积系统开机时间、故障停机时间和合计 +8. 报告每次启动、开机时间、关机和故障停机时间 #### 安装 #### -输入[下面的命令来克隆git仓库到Linux系统中][2]: +输入[下面的命令来克隆 git 仓库到 Linux 系统中][2]: $ cd /tmp $ git clone https://github.com/rfrail3/tuptime.git @@ -51,17 +54,17 @@ tuptime命令行工具可以报告基于Linux的系统上的下列信息: ![Fig.02: Cloning a git repo](http://s0.cyberciti.org/uploads/cms/2015/09/git-install-tuptime.jpg) -图像02:克隆git仓库 +*图02:克隆git仓库* -确保你随sys,optparse,os,re,string,sqlite3,datetime,disutils安装了Python v2.7和本地模块。 +确保你安装了带有 sys,optparse,os,re,string,sqlite3,datetime,disutils 和 locale 模块的 Python v2.7。 你可以像下面这样来安装: $ sudo tuptime-install.sh -或者,可以手工安装(根据基于systemd或非systemd的Linux的推荐方法): +或者,可以手工安装(基于 systemd 或非 systemd ): -$ sudo cp /tmp/tuptime/latest/cron.d/tuptime /etc/cron.d/tuptime + $ sudo cp /tmp/tuptime/latest/cron.d/tuptime /etc/cron.d/tuptime 如果系统是systemd的,拷贝服务文件并启用: @@ -73,7 +76,7 @@ $ sudo cp /tmp/tuptime/latest/cron.d/tuptime /etc/cron.d/tuptime $ sudo cp /tmp/tuptime/latest/init.d/tuptime.init.d-debian7 /etc/init.d/tuptime $ sudo update-rc.d tuptime defaults -**运行** +####运行#### 只需输入以下命令: @@ -83,9 +86,9 @@ $ sudo cp /tmp/tuptime/latest/cron.d/tuptime /etc/cron.d/tuptime ![Fig.03: tuptime in action](http://s0.cyberciti.org/uploads/cms/2015/09/tuptime-output.jpg) -图像03:tuptime工作中 +*图03:tuptime工作中* -在更新内核后,我重启了系统,然后再次输入了同样的命令: +在一次更新内核后,我重启了系统,然后再次输入了同样的命令: $ sudo tuptime System startups: 2 since 03:52:16 PM 08/21/2015 @@ -142,7 +145,7 @@ via: http://www.cyberciti.biz/hardware/howto-see-historical-statistical-uptime-o 作者:Vivek Gite 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 606091d769e02b2c28c15b21b02ad6bb745fe724 Mon Sep 17 00:00:00 2001 From: Ezio Date: Mon, 28 Sep 2015 17:02:20 +0800 Subject: [PATCH 2176/2517] Update 20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md start translate --- ...1 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md b/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md index 3e225ac866..1960ebc9f7 100644 --- a/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md +++ b/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md @@ -1,11 +1,13 @@ - translating by Ezio -Linux 4.3 Kernel To Add The MOST Driver Subsystem +为Linux 4.3 内核添加MOST 驱动子系统 ================================================================================ - While the [Linux 4.2][1] kernel hasn't been officially released yet, Greg Kroah-Hartman sent in early his pull requests for the various subsystems he maintains for the Linux 4.3 merge window. +While the [Linux 4.2][1] kernel hasn't been officially released yet, Greg Kroah-Hartman sent in early his pull requests for the various subsystems he maintains for the Linux 4.3 merge window. +当4.2 内核还没有正式发布的时候,Greg Kroah-Hartman 就为他维护的各种子系统模块打开了4.3 的合并窗口。 The pull requests sent in by Greg KH on Thursday include the Linux 4.3 merge window updates for the driver core, TTY/serial, USB driver, char/misc, and the staging area. These pull requests don't offer any really shocking changes but mostly routine work on improvements / additions / bug-fixes. The staging area once again is heavy with various fixes and clean-ups but there's also a new driver subsystem. + Greg mentioned of the [4.3 staging changes][2], "Lots of things all over the place, almost all of them trivial fixups and changes. The usual IIO updates and new drivers and we have added the MOST driver subsystem which is getting cleaned up in the tree. The ozwpan driver is finally being deleted as it is obviously abandoned and no one cares about it." The MOST driver subsystem is short for the Media Oriented Systems Transport. The documentation to be added in the Linux 4.3 kernel explains, "The Media Oriented Systems Transport (MOST) driver gives Linux applications access a MOST network: The Automotive Information Backbone and the de-facto standard for high-bandwidth automotive multimedia networking. MOST defines the protocol, hardware and software layers necessary to allow for the efficient and low-cost transport of control, real-time and packet data using a single medium (physical layer). Media currently in use are fiber optics, unshielded twisted pair cables (UTP) and coax cables. MOST also supports various speed grades up to 150 Mbps." As explained, MOST is mostly about Linux in automotive applications. @@ -27,4 +29,4 @@ via: http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.3-Staging-Pull [2]:http://lkml.iu.edu/hypermail/linux/kernel/1508.2/02604.html [3]:http://www.phoronix.com/scan.php?page=news_item&px=KDBUS-Not-In-Linux-4.2 [4]:http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.2-rc7-Released -[5]:http://www.phoronix.com/scan.php?page=search&q=KDBUS \ No newline at end of file +[5]:http://www.phoronix.com/scan.php?page=search&q=KDBUS From 1fe54bbd4bd4b686ecc971786c6b9eb3c0762e4c Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 28 Sep 2015 18:09:08 +0800 Subject: [PATCH 2177/2517] Delete 20150925 HTTP 2 Now Fully Supported in NGINX Plus.md --- ...TTP 2 Now Fully Supported in NGINX Plus.md | 120 ------------------ 1 file changed, 120 deletions(-) delete mode 100644 sources/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md diff --git a/sources/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md b/sources/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md deleted file mode 100644 index 5d1059a38f..0000000000 --- a/sources/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md +++ /dev/null @@ -1,120 +0,0 @@ -struggling 翻译中 - -HTTP/2 Now Fully Supported in NGINX Plus -================================================================================ -Earlier this week we released [NGINX Plus R7][1] with support for HTTP/2. As the latest standard for the HTTP protocol, HTTP/2 is designed to bring increased performance and security to modern web applications. - -The HTTP/2 implementation in NGINX Plus works seamlessly with existing sites and applications. Minimal changes are required, as NGINX Plus delivers HTTP/1.x and HTTP/2 traffic in parallel for the best experience, no matter what browser your users choose. - -HTTP/2 support is available in the optional **nginx‑plus‑http2** package only. The **nginx‑plus** and **nginx‑plus‑extras** packages provide SPDY support and are currently recommended for production sites because of wider browser support and code maturity. - -### Why Move to HTTP/2? ### - -HTTP/2 makes data transfer more efficient and more secure for your applications. HTTP/2 adds five key features that improve performance when compared to HTTP/1.x: - -- **True multiplexing** – HTTP/1.1 enforces strict in-order completion of requests that come in over a keepalive connection. A request must be satisfied before processing on the next one can begin. HTTP/2 eliminates this requirement and allows requests to be satisfied in parallel and out of order. -- **Single, persistent connection** – As HTTP/2 allows for true multiplexing of requests, all objects on a web page can now be downloaded in parallel over a single connection. WIth HTTP/1.x, multiple connections are used to download resources in parallel, leading to inefficient use of the underlying TCP protocol. -- **Binary encoding** – Header information is sent in compact, binary format, rather than plain text, saving bytes on the wire. -- **Header compression** – Headers are compressed using a purpose-built algorithm, HPACK compression, which further reduces the amount of data crossing the network. -- **SSL/TLS encryption** – With HTTP/2, SSL/TLS encryption is mandatory. This is not enforced in the [RFC][2], which allows for plain-text HTTP/2, but rather by all web browsers that currently implement HTTP/2. SSL/TLS makes your site more secure, and with all the performance improvements in HTTP/2, the performance penalty from encryption and decryption is mitigated. - -To learn more about HTTP/2: - -- Please read our [white paper][3], which covers everything you need to know about HTTP/2. -- Download our [special edition of the High Performance Browser Networking ebook][4] by Ilya Grigorik of Google. - -### How NGINX Plus Implements HTTP/2 ### - -Our implementation of HTTP/2 is based on our support for SPDY, which is widely deployed (nearly 75% of websites that use SPDY use NGINX or NGINX Plus). With NGINX Plus, you can deploy HTTP/2 with very little change to your application infrastructure. This section discusses how NGINX Plus implements support for HTTP/2. - -#### An HTTP/2 Gateway #### - -![](https://www.nginx.com/wp-content/uploads/2015/09/http2-27-1024x300.png) - -NGINX Plus acts an HTTP/2 gateway. It talks HTTP/2 to client web browsers that support it, but translates HTTP/2 requests back to HTTP/1.x (or FastCGI, SCGI, uWSGI, etc. – whatever protocol you are currently using) for communication with back-end servers. - -#### Backward Compatibility #### - -![](https://www.nginx.com/wp-content/uploads/2015/09/http2-281-1024x581.png) - -For the foreseeable future you’ll need to support HTTP/2 and HTTP/1.x side by side. As of this writing, over 50% of users already run a web browser that [supports HTTP/2][5], but this also means almost 50% don’t. - -To support both HTTP/1.x and HTTP/2 side by side, NGINX Plus implements the Next Protocol Negotiation (NPN) extension to TLS. When a web browser connects to a server, it sends a list of supported protocols to the server. If the browser includes h2 – that is, HTTP/2 – in the list of supported protocols, NGINX Plus uses HTTP/2 for connections to that browser. If the browser doesn’t implement NPN, or doesn’t send h2 in its list of supported protocols, NGINX Plus falls back to HTTP/1.x. - -### Moving to HTTP/2 ### - -NGINX, Inc. aims to make the transition to HTTP/2 as seamless as possible. This section goes through the changes that need to be made to enable HTTP/2 for your applications, which include just a few changes to the configuration of NGINX Plus. - -#### Prerequisites #### - -Upgrade to the NGINX Plus R7 **nginx‑plus‑http2** package. Note that an HTTP/2-enabled version of the **nginx‑plus‑extras** package is not available at this time. - -#### Redirecting All Traffic to SSL/TLS #### - -If your app is not already encrypted with SSL/TLS, now would be a good time to make that move. Encrypting your app protects you from spying as well as from man-in-the-middle attacks. Some search engines even reward encrypted sites with [improved rankings][6] in search results. The following configuration block redirects all plain HTTP requests to the encrypted version of the site. - - server { - listen 80; - location / { - return 301 https://$host$request_uri; - } - } - -#### Enabling HTTP/2 #### - -To enable HTTP/2 support, simply add the http2 parameter to all [listen][7] directives. Also include the ssl parameter, required because browsers do not support HTTP/2 without encryption. - - server { - listen 443 ssl http2 default_server; - - ssl_certificate server.crt; - ssl_certificate_key server.key; - … - } - -If necessary, restart NGINX Plus, for example by running the nginx -s reload command. To verify that HTTP/2 translation is working, you can use the “HTTP/2 and SPDY indicator” plug-in available for [Google Chrome][8] and [Firefox][9]. - -### Caveats ### - -- Before installing the **nginx‑plus‑http2** package, you must remove the spdy parameter on all listen directives in your configuration (replace it with the http2 and ssl parameters to enable support for HTTP/2). With this package, NGINX Plus fails to start if any listen directives have the spdy parameter. -- If you are using a web application firewall (WAF) that is sitting in front of NGINX Plus, ensure that it is capable of parsing HTTP/2, or move it behind NGINX Plus. -- The “Server Push” feature defined in the HTTP/2 RFC is not supported in this release. Future releases of NGINX Plus might include it. -- NGINX Plus R7 supports both SPDY and HTTP/2. In a future release we will deprecate support for SPDY. Google is [deprecating SPDY][10] in early 2016, making it unnecessary to support both protocols at that point. -- If [ssl_prefer_server_ciphers][11] is set to on and/or a list of [ssl_ciphers][12] that are defined in [Appendix A: TLS 1.2 Ciper Suite Black List][13] is used, the browser will experience handshake-errors and not work. Please refer to [section 9.2.2 of the HTTP/2 RFC][14] for more details.- - -### Special Thanks ### - -NGINX, Inc. would like to thank [Dropbox][15] and [Automattic][16], who are heavy users of our software and graciously cosponsored the development of our HTTP/2 implementation. Their contributions have helped accelerate our ability to bring this software to you, and we hope you are able to support them in turn. - -![](https://www.nginx.com/wp-content/themes/nginx-theme/assets/img/landing-page/highperf_nginx_ebook.png) - -[O'REILLY'S BOOK ABOUT HTTP/2 & PERFORMANCE TUNING][17] - --------------------------------------------------------------------------------- - -via: https://www.nginx.com/blog/http2-r7/ - -作者:[Faisal Memon][a] -译者:[struggling](https://github.com/struggling) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.nginx.com/blog/author/fmemon/ -[1]:https://www.nginx.com/blog/nginx-plus-r7-released/ -[2]:https://tools.ietf.org/html/rfc7540 -[3]:https://www.nginx.com/wp-content/uploads/2015/09/NGINX_HTTP2_White_Paper_v4.pdf -[4]:https://www.nginx.com/http2-ebook/ -[5]:http://caniuse.com/#feat=http2 -[6]:http://googlewebmastercentral.blogspot.co.uk/2014/08/https-as-ranking-signal.html -[7]:http://nginx.org/en/docs/http/ngx_http_core_module.html#listen -[8]:https://chrome.google.com/webstore/detail/http2-and-spdy-indicator/mpbpobfflnpcgagjijhmgnchggcjblin?hl=en -[9]:https://addons.mozilla.org/en-us/firefox/addon/spdy-indicator/ -[10]:http://blog.chromium.org/2015/02/hello-http2-goodbye-spdy-http-is_9.html -[11]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_prefer_server_ciphers -[12]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers -[13]:https://tools.ietf.org/html/rfc7540#appendix-A -[14]:https://tools.ietf.org/html/rfc7540#section-9.2.2 -[15]:http://dropbox.com/ -[16]:http://automattic.com/ -[17]:https://www.nginx.com/http2-ebook/ \ No newline at end of file From 86b844ef49163dfcd0db7aa63fcb253be0c97629 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 28 Sep 2015 18:09:48 +0800 Subject: [PATCH 2178/2517] Create 20150925 HTTP 2 Now Fully Supported in NGINX Plus.md --- ...TTP 2 Now Fully Supported in NGINX Plus.md | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 translated/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md diff --git a/translated/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md b/translated/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md new file mode 100644 index 0000000000..0a9cf30ad3 --- /dev/null +++ b/translated/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md @@ -0,0 +1,126 @@ + +NGINX Plus 现在完全支持 HTTP/2 +================================================================================ +本周早些时候,我们发布了对 HTTP/2 支持的 [NGINX Plus R7][1]。作为 HTTP 协议的最新标准,HTTP/2 的设计对现在的 web 应用程序带来了更高的性能和安全性。 + +NGINX Plus 使用 HTTP/2 协议可与现有的网站和应用程序进行无缝衔接。最微小的变化就是不管用户选择什么样的浏览器,NGINX Plus 都能为用户提供 HTTP/1.x 与HTTP/2 并发运行带来的最佳体验。 + +要支持 HTTP/2 仅需提供 **nginx‑plus‑http2** 软件包。**nginx‑plus** 和 **nginx‑plus‑extras** 软件包支持 SPDY 协议,目前推荐用于生产站点,因为其被大多数浏览器所支持并且代码也是相当成熟了。 + +### 为什么要使用 HTTP/2? ### +HTTP/2 使数据传输更高效,对你的应用程序更安全。 HTTP/2 相比于 HTTP/1.x 有五个提高性能特点: + +- **完全复用** – HTTP/1.1 强制按严格的顺序来对一个请求建立连接。请求建立必须在下一个进程开始之前完成。 HTTP/2 消除了这一要求,允许并行和乱序来完成请求的建立。 + +- **单一,持久连接** – 由于 HTTP/2 允许请求真正的复用,现在通过单一连接可以并行下载网页上的所有对象。在 HTTP/1.x 中,使用多个连接来并行下载资源,从而导致使用底层 TCP 协议效率很低。 + +- **二进制编码** – Header 信息使用紧凑二进制格式发送,而不是纯文本格式,节省了传输字节。 + +- **Header 压缩** – Headers 使用专用的算法来进行压缩,HPACK 压缩,这进一步降低数据通过网络传输的字节。 + +- **SSL/TLS encryption** – 在 HTTP/2 中,强制使用 SSL/TLS。在 [RFC][2] 中并没有强制,其允许纯文本的 HTTP/2,它是由当前 Web 浏览器执行 HTTP/2 的。 SSL/TLS 使你的网站更安全,并且使用 HTTP/2 所有性能会有提升,加密和解密过程的性能也有所提升。 + +要了解更多关于 HTTP/2: + +- 请阅读我们的 [白皮书][3],它涵盖了你需要了解HTTP/2 的一切。 +- 下载由 Google 的 Ilya Grigorik 编写的 [特别版的高性能浏览器网络电子书][4] 。 + +### NGINX Plus 如何实现 HTTP/2 ### + +实现 HTTP/2 要基于对 SPDY 的支持,它已经被广泛部署(使用了 NGINX 或 NGINX Plus 的网站近 75% 都使用了 SPDY)。使用 NGINX Plus 部署 HTTP/2 时,几乎不会改变你应用程序的配置。本节将讨论 NGINX Plus如何实现对 HTTP/2 的支持。 + +#### 一个 HTTP/2 网关 #### + +![](https://www.nginx.com/wp-content/uploads/2015/09/http2-27-1024x300.png) + +NGINX Plus 作为一个 HTTP/2 网关。它谈到 HTTP/2 对客户端 Web 浏览器支持,但传输 HTTP/2 请求返回给后端服务器通信时使用 HTTP/1.x(或者 FastCGI, SCGI, uWSGI, 等等. – 取决于你目前正在使用的协议)。 + +#### 向后兼容性 #### + +![](https://www.nginx.com/wp-content/uploads/2015/09/http2-281-1024x581.png) + +在不久的未来,你需要同时支持 HTTP/2 和 HTTP/1.x。在撰写本文时,超过50%的用户使用的 Web 浏览器已经[支持 HTTP/2][5],但这也意味着近50%的人还没有使用。 + +为了同时支持 HTTP/1.x 和 HTTP/2,NGINX Plus 实现了将 Next Protocol Negotiation (NPN协议)扩展到 TLS 中。当 Web 浏览器连接到服务器时,其将所支持的协议列表发送到服务器端。如果浏览器支持的协议列表中包括 h2 - 即,HTTP/2,NGINX Plus 将使用 HTTP/2 连接到浏览器。如果浏览器不支持 NPN 或在发送支持的协议列表中没有 h2,NGINX Plus 将继续使用 HTTP/1.x。 + +### 转向 HTTP/2 ### + +NGINX,公司尽可能无缝过渡到使用 HTTP/2。本节通过对你应用程序的改变来启用对 HTTP/2 的支持,其中只包括对 NGINX Plus 配置的几个变化。 + +#### 前提条件 #### + +使用 **nginx‑plus‑http2** 软件包升级到 NGINX Plus R7 . 注意启用 HTTP/2 版本在此时不需要使用 **nginx‑plus‑extras** 软件包。 + +#### 重定向所有流量到 SSL/TLS #### + +如果你的应用程序尚未使用 SSL/TLS 加密,现在启用它正是一个好的时机。加密你的应用程序可以保护你免受间谍以及来自其他中间人的攻击。一些搜索引擎甚至在搜索结果中对加密站点 [提高排名][6]。下面的配置块重定向所有的普通 HTTP 请求到该网站的加密版本。 + + server { + listen 80; + location / { + return 301 https://$host$request_uri; + } + } + +#### 启用 HTTP/2 #### + +要启用对 HTTP/2 的支持,只需将 http2 参数添加到所有的 [listen][7] 指令中,包括 SSL 参数,因为浏览器不支持不加密的 HTTP/2 请求。 + + server { + listen 443 ssl http2 default_server; + + ssl_certificate server.crt; + ssl_certificate_key server.key; + … + } + +如果有必要,重启 NGINX Plus,例如通过运行 nginx -s reload 命令。要验证 HTTP/2 是否正常工作,你可以在 [Google Chrome][8] 和 [Firefox][9] 中使用 “HTTP/2 and SPDY indicator” 插件来检查。 + +### 注意事项 ### + +- 在安装 **nginx‑plus‑http2** 包之前, 你必须删除配置文件中所有 listen 指令后的 SPDY 参数(使用 http2 和 ssl 参数来替换它以启用对 HTTP/2 的支持)。使用这个包后,如果 listen 指令后有 spdy 参数,NGINX Plus 将无法启动。 + +- 如果你在 NGINX Plus 前端使用了 Web 应用防火墙(WAF),请确保它能够解析 HTTP/2,或者把它移到 NGINX Plus 后面。 + +- 此版本在 HTTP/2 RFC 不支持 “Server Push” 特性。 NGINX Plus 以后的版本可能会支持它。 + +- NGINX Plus R7 同时支持 SPDY 和 HTTP/2。在以后的版本中,我们将弃用对 SPDY 的支持。谷歌在2016年初将 [弃用 SPDY][10],因此同时支持这两种协议也非必要。 + +- 如果 [ssl_prefer_server_ciphers][11] 设置为 on 或者 [ssl_ciphers][12] 列表被定义在 [Appendix A: TLS 1.2 Ciper Suite Black List][13] 使用时,浏览器会出现 handshake-errors 而无法正常工作。详细内容请参阅 [section 9.2.2 of the HTTP/2 RFC][14]。 + +### 特别感谢 ### + +NGINX,公司要感谢 [Dropbox][15] 和 [Automattic][16],他们是我们软件的重度使用者,并帮助我们实现 HTTP/2。他们的贡献帮助我们加速完成这个软件,我们希望你也能支持他们。 + +![](https://www.nginx.com/wp-content/themes/nginx-theme/assets/img/landing-page/highperf_nginx_ebook.png) + +[O'REILLY'S BOOK ABOUT HTTP/2 & PERFORMANCE TUNING][17] + +-------------------------------------------------------------------------------- + +via: https://www.nginx.com/blog/http2-r7/ + +作者:[Faisal Memon][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.nginx.com/blog/author/fmemon/ +[1]:https://www.nginx.com/blog/nginx-plus-r7-released/ +[2]:https://tools.ietf.org/html/rfc7540 +[3]:https://www.nginx.com/wp-content/uploads/2015/09/NGINX_HTTP2_White_Paper_v4.pdf +[4]:https://www.nginx.com/http2-ebook/ +[5]:http://caniuse.com/#feat=http2 +[6]:http://googlewebmastercentral.blogspot.co.uk/2014/08/https-as-ranking-signal.html +[7]:http://nginx.org/en/docs/http/ngx_http_core_module.html#listen +[8]:https://chrome.google.com/webstore/detail/http2-and-spdy-indicator/mpbpobfflnpcgagjijhmgnchggcjblin?hl=en +[9]:https://addons.mozilla.org/en-us/firefox/addon/spdy-indicator/ +[10]:http://blog.chromium.org/2015/02/hello-http2-goodbye-spdy-http-is_9.html +[11]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_prefer_server_ciphers +[12]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers +[13]:https://tools.ietf.org/html/rfc7540#appendix-A +[14]:https://tools.ietf.org/html/rfc7540#section-9.2.2 +[15]:http://dropbox.com/ +[16]:http://automattic.com/ +[17]:https://www.nginx.com/http2-ebook/ From d0f0839ebc66ad3956a9b3cff6270acc7ed74eb9 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 28 Sep 2015 22:48:14 +0800 Subject: [PATCH 2179/2517] PUB:20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2 @ictlyh --- ...Command Line Tricks for Newbies--Part 2.md | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) rename {translated/tech => published}/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md (85%) diff --git a/translated/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md b/published/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md similarity index 85% rename from translated/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md rename to published/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md index c2fcb279f1..86ae1ec668 100644 --- a/translated/tech/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md +++ b/published/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md @@ -1,20 +1,20 @@ -给新手的 10 个有用 Linux 命令行技巧 - 第二部分 +给新手的 10 个有用 Linux 命令行技巧 ================================================================================ -我记得我第一次使用 Linux 的时候,我还习惯于 Windows 的图形界面,我真的很讨厌 Linux 终端。那时候我觉得命令难以记忆,不能正确使用它们。随着时间推移,我意识到了 Linux 终端的优美、灵活和可用性,说实话,我没有一天不使用它。今天,我很高兴和刚开始接触 Linux 的人一起来分享一些有用的技巧和提示,希望能帮助他们更好的向 Linux 过度,并帮助他们学到一些新的东西(希望如此)。 + +我记得我第一次使用 Linux 的时候,我还习惯于 Windows 的图形界面,我真的很讨厌 Linux 终端。那时候我觉得命令难以记忆,不能正确使用它们。随着时间推移,我意识到了 Linux 终端的优美、灵活和可用性,说实话,我没有一天不使用它。今天,我很高兴和刚开始接触 Linux 的人一起来分享一些有用的技巧和提示,希望能帮助他们更好的向 Linux 过渡,并帮助他们学到一些新的东西(希望如此)。 ![给新手的 10 个命令行技巧](http://www.tecmint.com/wp-content/uploads/2015/09/10-Linux-Commandline-Tricks.jpg) -10 个 Linux 命令行技巧 - 第二部分 +*10 个 Linux 命令行技巧* +- [5 个有趣的 Linux 命令行技巧][1] +- [管理 Linux 文件类型的 5 个有用命令][2] -- [Linux 中 5 个有趣的命令行提示和技巧 - 第一部分][1] -- [管理 Linux 文件类型的 5 个有用命令 – 第三部分][2] - -这篇文章希望向你展示一些不需要很高的技术而可以像一个高手一样使用 Linux 终端的有用技巧。你只需要一个 Linux 终端和一些自由时间来体会这些命令。 +这篇文章希望向你展示一些不需要很高的技术就可以像一个高手一样使用 Linux 终端的有用技巧。你只需要一个 Linux 终端和一些自由时间来体会这些命令。 ### 1. 找到正确的命令 ### -执行正确的命令对你的系统来说非常重要。然而在 Linux 中有很多通常难以记忆的不同的命令行。那么怎样才能找到你需要的正确命令呢?答案是 apropos。你只需要运行: +执行正确的命令对你的系统来说非常重要。然而在 Linux 中有如此多的、难以记忆的各种的命令行。那么怎样才能找到你需要的正确命令呢?答案是 apropos。你只需要运行: # apropos @@ -31,7 +31,7 @@ ### 2. 执行之前的命令 ### -很多时候你需要一遍又一遍执行相同的命令。尽管你可以重复按你键盘上的 Up 键,你也可以用 history 命令。这个命令会列出自从你上次启动终端以来所有输入过的命令: +很多时候你需要一遍又一遍执行相同的命令。尽管你可以重复按你键盘上的向上光标键,但你也可以用 history 命令替代。这个命令会列出自从你上次启动终端以来所有输入过的命令: # history @@ -73,12 +73,11 @@ 如果你不习惯使用类似 cd、cp、mv、rm 等命令,你可以使用 midnight 命令。它是一个简单的可视化 shell,你可以在上面使用鼠标: - ![Midnight 命令](http://www.tecmint.com/wp-content/uploads/2015/09/mc-command.jpg) -Midnight 命令 +*Midnight 命令* -多亏了 F1 到 F12 键,你可以轻易地执行不同任务。只需要在底部选择对应的命令。要选择文件或者目录,点击 “Insert” 按钮。 +借助 F1 到 F12 键,你可以轻易地执行不同任务。只需要在底部选择对应的命令。要选择文件或者目录,按下 “Insert” 键。 简而言之 midnight 就是所谓的 “mc”。要安装 mc,只需要运行: @@ -96,21 +95,21 @@ Midnight 命令 ![Midnight 命令移动文件](http://www.tecmint.com/wp-content/uploads/2015/09/Midnight-Commander-Move-Files.jpg) -Midnight 命令移动文件 +*Midnight 命令移动文件* 按 F6 按钮移动文件到新的目录。MC 会请求你确认: ![移动文件到新目录](http://www.tecmint.com/wp-content/uploads/2015/09/Move-Files-to-new-Directory.png) -移动文件到新目录 +*移动文件到新目录* 确认了之后,文件就会被移动到新的目标目录。 -扩展阅读:[如何在 Linux 中使用 Midnight 命令文件管理器][4] +- 扩展阅读:[如何在 Linux 中使用 Midnight 命令文件管理器][4] ### 4. 在指定时间关闭计算机 ### -有时候你需要在结束工作几个小时后再关闭计算机。你可以通过使用下面的命令在指定时间关闭你的计算机: +有时候你需要在下班几个小时后再关闭计算机。你可以通过使用下面的命令在指定时间关闭你的计算机: $ sudo shutdown 21:00 @@ -151,13 +150,12 @@ Midnight 命令移动文件 ... ### 6. 查找文件 ### -### 6. Search for Files ### 查找文件有时候并不像你想象的那么简单。一个搜索文件的好例子是: # find /home/user -type f -这个命令会搜索 /home/user 目录下的所有文件。find 命令真的很强大,你可以传递更多选项给它使得你的搜索更加详细。如果你想搜索比特定大小大的文件,可以使用: +这个命令会搜索 /home/user 目录下的所有文件。find 命令真的很强大,你可以传递更多选项给它使得你的搜索更加详细。如果你想搜索超过特定大小的文件,可以使用: # find . -type f -size 10M @@ -221,7 +219,7 @@ Midnight 命令移动文件 10.0.0.4 10.0.0.5 -这里有一个简单的解决方法。收集服务器的 IP 地址到文件 list.txt 中,像上面那样一行一个。然后运行: +这里有一个简单的解决方法。将服务器的 IP 地址写到文件 list.txt 中,像上面那样一行一个。然后运行: # for in $i(cat list.txt); do ssh user@$i 'bash command'; done @@ -239,15 +237,15 @@ via: http://www.tecmint.com/10-useful-linux-command-line-tricks-for-newbies/ 作者:[Marin Todorov][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[校对者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/marintodorov89/ -[1]:http://www.tecmint.com/5-linux-command-line-tricks/ +[1]:https://linux.cn/article-5485-1.html [2]:http://www.tecmint.com/manage-file-types-and-set-system-time-in-linux/ [3]:http://www.tecmint.com/history-command-examples/ [4]:http://www.tecmint.com/midnight-commander-a-console-based-file-manager-for-linux/ [5]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/ [6]:http://www.linuxsay.com/ -[7]:http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/ \ No newline at end of file +[7]:https://linux.cn/article-5202-1.html \ No newline at end of file From 5dfb2e347646d80411ef5e763f212ca46d6c1587 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 28 Sep 2015 23:14:00 +0800 Subject: [PATCH 2180/2517] PUB:RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables @FSSlc --- ...ic Control Using FirewallD and Iptables.md | 71 +++++++++---------- 1 file changed, 35 insertions(+), 36 deletions(-) rename {translated/tech/RHCSA => published}/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md (62%) diff --git a/translated/tech/RHCSA/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md b/published/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md similarity index 62% rename from translated/tech/RHCSA/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md rename to published/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md index 80e64c088d..f770d09353 100644 --- a/translated/tech/RHCSA/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md +++ b/published/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md @@ -1,25 +1,25 @@ -RHCSA 系列: 防火墙简要和使用 FirewallD 和 Iptables 来控制网络流量 – Part 11 +RHCSA 系列(十一): 使用 firewalld 和 iptables 来控制网络流量 ================================================================================ -简单来说,防火墙就是一个基于一系列预先定义的规则(例如流量包的目的地或来源,流量的类型等)的安全系统,它控制着一个网络中的流入和流出流量。 +简单来说,防火墙就是一个基于一系列预先定义的规则(例如流量包的目的地或来源,流量的类型等)的安全系统,它控制着一个网络中的流入和流出流量。 ![使用 FirewallD 和 Iptables 来控制网络流量](http://www.tecmint.com/wp-content/uploads/2015/05/Control-Network-Traffic-Using-Firewall.png) -RHCSA: 使用 FirewallD 和 Iptables 来控制网络流量 – Part 11 +*RHCSA: 使用 FirewallD 和 Iptables 来控制网络流量 – Part 11* -在本文中,我们将回顾 firewalld 和 iptables 的基础知识。前者是 RHEL 7 中的默认动态防火墙守护进程,而后者则是针对 Linux 的传统的防火墙服务,大多数的系统和网络管理员都非常熟悉它,并且在 RHEL 7 中也可以获取到。 +在本文中,我们将回顾 firewalld 和 iptables 的基础知识。前者是 RHEL 7 中的默认动态防火墙守护进程,而后者则是针对 Linux 的传统的防火墙服务,大多数的系统和网络管理员都非常熟悉它,并且在 RHEL 7 中也可以用。 ### FirewallD 和 Iptables 的一个比较 ### 在后台, firewalld 和 iptables 服务都通过相同的接口来与内核中的 netfilter 框架相交流,这不足为奇,即它们都通过 iptables 命令来与 netfilter 交互。然而,与 iptables 服务相反, firewalld 可以在不丢失现有连接的情况下,在正常的系统操作期间更改设定。 -在默认情况下, firewalld 应该已经安装在你的 RHEL 系统中了,尽管它可能没有在运行。你可以使用下面的命令来确认(firewall-config 是用户界面配置工具): +在默认情况下, firewalld 应该已经安装在你的 RHEL 系统中了,尽管它可能没有在运行。你可以使用下面的命令来确认(firewall-config 是用户界面配置工具): # yum info firewalld firewall-config ![检查 FirewallD 的信息](http://www.tecmint.com/wp-content/uploads/2015/05/Check-FirewallD-Information.png) -检查 FirewallD 的信息 +*检查 FirewallD 的信息* 以及, @@ -27,7 +27,7 @@ RHCSA: 使用 FirewallD 和 Iptables 来控制网络流量 – Part 11 ![检查 FirewallD 的状态](http://www.tecmint.com/wp-content/uploads/2015/05/Check-FirewallD-Status.png) -检查 FirewallD 的状态 +*检查 FirewallD 的状态* 另一方面, iptables 服务在默认情况下没有被包含在 RHEL 系统中,但可以被安装上。 @@ -38,13 +38,13 @@ RHCSA: 使用 FirewallD 和 Iptables 来控制网络流量 – Part 11 # systemctl start firewalld.service | iptables-service.service # systemctl enable firewalld.service | iptables-service.service -另外,请阅读:[管理 Systemd 服务的实用命令][1] (注: 本文已被翻译发表,在 https://linux.cn/article-5926-1.html) +另外,请阅读:[管理 Systemd 服务的实用命令][1] -至于配置文件, iptables 服务使用 `/etc/sysconfig/iptables` 文件(假如这个软件包在你的系统中没有被安装,则这个文件将不存在)。在一个被用作集群节点的 RHEL 7 机子上,这个文件长得像这样: +至于配置文件, iptables 服务使用 `/etc/sysconfig/iptables` 文件(假如这个软件包在你的系统中没有被安装,则这个文件将不存在)。在一个被用作集群节点的 RHEL 7 机子上,这个文件看起来是这样: ![Iptables 防火墙配置文件](http://www.tecmint.com/wp-content/uploads/2015/05/Iptables-Rules.png) -Iptables 防火墙配置文件 +*Iptables 防火墙配置文件* 而 firewalld 则在两个目录中存储它的配置文件,即 `/usr/lib/firewalld` 和 `/etc/firewalld`: @@ -52,33 +52,32 @@ Iptables 防火墙配置文件 ![FirewallD 的配置文件](http://www.tecmint.com/wp-content/uploads/2015/05/Firewalld-configuration.png) -FirewallD 的配置文件 +*FirewallD 的配置文件* -在这篇文章中后面,我们将进一步查看这些配置文件,在那之后,我们将在各处添加一些规则。 -现在,是时候提醒你了,你总可以使用下面的命令来找到更多有关这两个工具的信息。 +在这篇文章中后面,我们将进一步查看这些配置文件,在那之后,我们将在这两个地方添加一些规则。现在,是时候提醒你了,你总可以使用下面的命令来找到更多有关这两个工具的信息。 # man firewalld.conf # man firewall-cmd # man iptables -除了这些,记得查看一下当前系列的第一篇 [RHCSA 系列(一): 回顾基础命令及系统文档][2](注: 本文已被翻译发表,在 https://linux.cn/article-6133-1.html ),在其中我描述了几种渠道来得到安装在你的 RHEL 7 系统上的软件包的信息。 +除了这些,记得查看一下当前系列的第一篇 [RHCSA 系列(一): 回顾基础命令及系统文档][2],在其中我描述了几种渠道来得到安装在你的 RHEL 7 系统上的软件包的信息。 ### 使用 Iptables 来控制网络流量 ### -在进一步深入之前,或许你需要参考 Linux 基金会认证工程师(Linux Foundation Certified Engineer,LFCE) 系列中的 [配置 Iptables 防火墙 – Part 8][3] 来复习你脑中有关 iptables 的知识。 +在进一步深入之前,或许你需要参考 Linux 基金会认证工程师(Linux Foundation Certified Engineer,LFCE) 系列中的 [配置 Iptables 防火墙 – Part 8][3] 来复习你脑中有关 iptables 的知识。 **例 1:同时允许流入和流出的网络流量** -TCP 端口 80 和 443 是 Apache web 服务器使用的用来处理常规(HTTP) 和安全(HTTPS)网络流量的默认端口。你可以像下面这样在 enp0s3 接口上允许流入和流出网络流量通过这两个端口: +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:从某个特定网络中阻挡所有(或某些)流入连接** +**例 2:从某个特定网络中阻挡所有(或某些)流入连接** -或许有时你需要阻挡来自于某个特定网络的所有(或某些)类型的来源流量,比方说 192.168.1.0/24: +或许有时你需要阻挡来自于某个特定网络的所有(或某些)类型的来源流量,比方说 192.168.1.0/24: # iptables -I INPUT -s 192.168.1.0/24 -j DROP @@ -90,7 +89,7 @@ TCP 端口 80 和 443 是 Apache web 服务器使用的用来处理常规(HTTP) **例 3:将流入流量重定向到另一个目的地** -假如你不仅使用你的 RHEL 7 机子来作为一个软件防火墙,而且还将它作为一个硬件防火墙,使得它位于两个不同的网络之间,则在你的系统 IP 转发一定已经被开启了。假如没有开启,你需要编辑 `/etc/sysctl.conf` 文件并将 `net.ipv4.ip_forward` 的值设为 1,即: +假如你不仅使用你的 RHEL 7 机子来作为一个软件防火墙,而且还将它作为一个硬件防火墙,使得它位于两个不同的网络之间,那么在你的系统上 IP 转发一定已经被开启了。假如没有开启,你需要编辑 `/etc/sysctl.conf` 文件并将 `net.ipv4.ip_forward` 的值设为 1,即: net.ipv4.ip_forward = 1 @@ -98,27 +97,27 @@ TCP 端口 80 和 443 是 Apache web 服务器使用的用来处理常规(HTTP) # sysctl -p /etc/sysctl.conf -例如,你可能在一个内部的机子上安装了一个打印机,它的 IP 地址为 192.168.0.10,CUPS 服务在端口 631 上进行监听(同时在你的打印服务器和你的防火墙上)。为了从防火墙另一边的客户端传递打印请求,你应该添加下面的 iptables 规则: +例如,你可能在一个内部的机子上安装了一个打印机,它的 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 逐条地读取它的规则,所以请确保默认的策略或后面的规则不会重载上面例子中那些有下划线的规则。 +请记住 iptables 会逐条地读取它的规则,所以请确保默认的策略或后面的规则不会重载上面例子中那些规则。 ### FirewallD 入门 ### -引入 firewalld 的一个改变是区域(zone) (注:翻译参考了 https://fedoraproject.org/wiki/FirewallD/zh-cn) 的概念。它允许将网路划分为拥有不同信任级别的区域,由用户决定将设备和流量放置到哪个区域。 +firewalld 引入的一个变化是区域(zone) (注:翻译参考了 https://fedoraproject.org/wiki/FirewallD/zh-cn )。这个概念允许将网路划分为拥有不同信任级别的区域,由用户决定将设备和流量放置到哪个区域。 要获取活动的区域,使用: # firewall-cmd --get-active-zones -在下面的例子中,公用区域被激活了,并且 enp0s3 接口被自动地分配到了这个区域。要查看有关一个特定区域的所有信息,可使用: +在下面的例子中,public 区域是激活的,并且 enp0s3 接口被自动地分配到了这个区域。要查看有关一个特定区域的所有信息,可使用: # firewall-cmd --zone=public --list-all ![列出所有的 Firewalld 区域](http://www.tecmint.com/wp-content/uploads/2015/05/View-FirewallD-Zones.png) -列出所有的 Firewalld 区域 +*列出所有的 Firewalld 区域* 由于你可以在 [RHEL 7 安全指南][4] 中阅读到更多有关区域的知识,这里我们将仅列出一些特别的例子。 @@ -130,9 +129,9 @@ TCP 端口 80 和 443 是 Apache web 服务器使用的用来处理常规(HTTP) ![列出所有受支持的服务](http://www.tecmint.com/wp-content/uploads/2015/05/List-All-Supported-Services.png) -列出所有受支持的服务 +*列出所有受支持的服务* -要立刻且在随后的开机中使得 http 和 https 网络流量通过防火墙,可以这样: +要立刻生效且在随后重启后都可以让 http 和 https 网络流量通过防火墙,可以这样: # firewall-cmd --zone=MyZone --add-service=http # firewall-cmd --zone=MyZone --permanent --add-service=http @@ -140,13 +139,13 @@ TCP 端口 80 和 443 是 Apache web 服务器使用的用来处理常规(HTTP) # firewall-cmd --zone=MyZone --permanent --add-service=https # firewall-cmd --reload -假如 code>–zone 被忽略,则默认的区域(你可以使用 `firewall-cmd –get-default-zone`来查看)将会被使用。 +假如 `-–zone` 被忽略,则使用默认的区域(你可以使用 `firewall-cmd –get-default-zone`来查看)。 若要移除这些规则,可以在上面的命令中将 `add` 替换为 `remove`。 **例 5:IP 转发或端口转发** -首先,你需要查看在目标区域中,伪装是否被开启: +首先,你需要查看在目标区域中,伪装(masquerading)是否被开启: # firewall-cmd --zone=MyZone --query-masquerade @@ -154,7 +153,7 @@ TCP 端口 80 和 443 是 Apache web 服务器使用的用来处理常规(HTTP) ![在 firewalld 中查看伪装状态](http://www.tecmint.com/wp-content/uploads/2015/05/Check-masquerading.png) -查看伪装状态 +*查看伪装状态* 你可以为公共区域开启伪装: @@ -164,11 +163,11 @@ TCP 端口 80 和 443 是 Apache web 服务器使用的用来处理常规(HTTP) # 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 来查看更深入的例子。 +在 RHCSA 系列的 [第九部分][5] 你可以找到更深入的例子,在那篇文章中我们解释了如何允许或禁用通常被 web 服务器和 ftp 服务器使用的端口,以及在针对这两个服务所使用的默认端口被改变时,如何更改相应的规则。另外,你或许想参考 firewalld 的 wiki 来查看更深入的例子。 -Read Also: [在 RHEL 7 中配置防火墙的几个实用的 firewalld 例子][6] +- 延伸阅读: [在 RHEL 7 中配置防火墙的几个实用的 firewalld 例子][6] ### 总结 ### @@ -180,14 +179,14 @@ via: http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者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/manage-services-using-systemd-and-systemctl-in-linux/ -[2]:http://www.tecmint.com/rhcsa-exam-reviewing-essential-commands-system-documentation/ +[1]:https://linux.cn/article-5926-1.html +[2]:https://linux.cn/article-6133-1.html [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/ +[5]:https://linux.cn/article-6286-1.html [6]:http://www.tecmint.com/firewalld-rules-for-centos-7/ \ No newline at end of file From 6a40a9822dad8799246ac0bff581c1b92cf6962a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 29 Sep 2015 09:29:54 +0800 Subject: [PATCH 2181/2517] =?UTF-8?q?20150929-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...veloper's Journey into Linux Containers.md | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 sources/tech/20150929 A Developer's Journey into Linux Containers.md diff --git a/sources/tech/20150929 A Developer's Journey into Linux Containers.md b/sources/tech/20150929 A Developer's Journey into Linux Containers.md new file mode 100644 index 0000000000..3b44992ef3 --- /dev/null +++ b/sources/tech/20150929 A Developer's Journey into Linux Containers.md @@ -0,0 +1,128 @@ +A Developer’s Journey into Linux Containers +================================================================================ +![](https://deis.com/images/blog-images/dev_journey_0.jpg) + +I’ll let you in on a secret: all that DevOps cloud stuff that goes into getting my applications into the world is still a bit of a mystery to me. But, over time I’ve come to realize that understanding the ins and outs of large scale machine provisioning and application deployment is important knowledge for a developer to have. It’s akin to being a professional musician. Of course you need know how to play your instrument. But, if you don’t understand how a recording studio works or how you fit into a symphony orchestra, you’re going to have a hard time working in such environments. + +In the world of software development getting your code into our very big world is just as important as making it. DevOps counts and it counts a lot. + +So, in the spirit of bridging the gap between Dev and Ops I am going to present container technology to you from the ground up. Why containers? Because there is strong evidence to suggest that containers are the next step in machine abstraction: making a computer a place and no longer a thing. Understanding containers is a journey that we’ll take together. + +In this article I am going to cover the concepts behind containerization. I am going to cover how a container differs from a virtual machine. I am going to go into the logic behind containers construction as well as how containers fit into application architecture. I’ll discussion how lightweight versions of the Linux operating system fits into the container ecosystem. I’ll discuss using images to create reusable containers. Lastly I’ll cover how clusters of containers allow your applications to scale quickly. + +In later articles I’ll show you the step by step process to containerize a sample application and how to create a host cluster for your application’s containers. Also, I’ll show you how to use a Deis to deploy the sample application to a VM on your local system as well as a variety of cloud providers. + +So let’s get started. + +### The Benefit of Virtual Machines ### + +In order to understand how containers fit into the scheme of things you need to understand the predecessor to containers: virtual machines. + +A [virtual machine][1] (VM) is a software abstraction of a computer that runs on a physical host computer. Configuring a virtual machine is akin to buying a typical computer: you define the number of CPUs you want along with desired RAM and disk storage capacity. Once the machine is configured, you load in the operating system and then any servers and applications you want the VM to support. + +Virtual machines allow you to run many simulations of a computer on a single hardware host. Here’s what that looks like with a handy diagram: + +![](https://deis.com/images/blog-images/dev_journey_1.png) + +Virtual machines bring efficiency to your hardware investment. You can buy a big, honking machine and run a lots of VMs on it. You can have a database VM sitting with a bunch of VMs with identical versions of your custom app running as a cluster. You can get a lot of scalability out of a finite hardware resources. If you find that you need more VMs and your host hardware has the capacity, you add what you need. Or, if you don’t need a VM, you simply bring the VM off line and delete the VM image. + +### The Limitations of Virtual Machines ### + +But, virtual machines do have limits. + +Say you create three VMs on a host as shown above. The host has 12 CPUs, 48 GB of RAM, and 3 TB of storage. Each VM is configured to have 4 CPUs, 16 GB of RAM and 1 TB of storage. So far, so good. The host has the capacity. + +But there is a drawback. All the resources allocated to a particular machine are dedicated, no matter what. Each machine has been allocated 16 GB of RAM. However, if the first VM never uses more than 1 GB of its RAM allocation, the remaining 15 GB just sit there unused. If the third VM uses only 100 GB of its 1 TB storage allocation, the remaining 900 GB is wasted space. + +There is no leveling of resources. Each VM owns what it is given. So, in a way we’re back to that time before virtual machines when we were paying a lot of good money for unused resources. + +There is *another* drawback to VMs too. They can take a long time to spin up. So, if you are in a situation where your infrastructure needs to grow quickly, even in a situation when VM provisioning is automated, you can still find yourself twiddling your thumbs waiting for machines to come online. + +### Enter: Containers ### + +Conceptually, a container is a Linux process that thinks it is the only process running. The process knows only about things it is told to know about. Also, in terms of containerization, the container process is assigned its own IP address. This is important, so I will say it again. **In terms of containerization, the container process is assigned its own IP address**. Once given an IP address, the process is an identifiable resource within the host network. Then, you can issue a command to the container manager to map the container’s IP address to a IP address on the host that is accessible to the public. Once this mapping takes place, for all intents and purposes, a container is a distinct machine accessible on the network, similar in concept to a virtual machine. + +Again, a container is an isolated Linux process that has a distinct IP address thus making it identifiable on a network. Here’s what that looks like as diagram: + +![](https://deis.com/images/blog-images/dev_journey_2.png) + +A container/process shares resources on the host computer in a dynamic, cooperative manner. If the container needs only 1 GB of RAM, it uses only 1 GB. If it needs 4 GB, it uses 4 GB. It’s the same with CPU utilization and storage. The allocation of CPU, memory and storage resources is dynamic, not static as is usual on a typical virtual machine. All of this resource sharing is managed by the container manager. + +Lastly, containers boot very quickly. + +So, the benefit of containers is: **you get the isolation and encapsulation of a virtual machine without the drawback of dedicated static resources**. Also, because containers load into memory fast, you get better performance when it comes to scaling many containers up. + +### Container Hosting, Configuration, and Management ### + +Computers that host containers run a version of Linux that is stripped down to the essentials. These days, the more popular underlying operating system for a host computer is [CoreOS, mentioned above][2]. There are others, however, such as [Red Hat Atomic Host][3] and [Ubuntu Snappy][4]. + +The Linux operating system is shared between all containers, minimising duplication and reducing the container footprint. Each container contains only what is unique to that specific container. Here’s what that looks like in diagram form: + +![](https://deis.com/images/blog-images/dev_journey_3.png) + +You configure your container with the components it requires. A container component is called a **layer**. A layer is a container image. (You’ll read more about container images in the following section.). You start with a base layer which typically the type of operating system you want in your container. (The container manager will provides only the parts of your desired operating system that is not in the host OS) As you construct the configuration of your container, you’ll add layers, say Apache if you want a web server, PHP or Python runtimes, if your container is running scripts. + +Layering is very versatile. If you application or service container requires PHP 5.2, you configure that container accordingly. If you have another application or service that requires PHP 5.6, no problem. You configure that container to use PHP.5.6. Unlike VMs, where you need to go through a lot of provisioning and installation hocus pocus to change a version of a runtime dependency; with containers you just redefine the layer in the container configuration file. + +All of the container versatility described previously is controlled by the a piece of software called a container manager. Presently, the most popular container managers are [Docker][5] and [Rocket][6]. The figure above shows a host scenario is which Docker is the container manager and CoreOS is the host operating system. + +### Containers are Built with Images ### + +When it comes time for you to build our application into a container, you are going to assemble images. An image represents a template of a container that your container needs to do its work. (I know, containers within containers. Go figure.) Images are stored in a registry. Registries live on the network. + +Conceptually, a registry is similar to a [Maven][7] repository, for those of you from the Java world, or a [NuGet][8] server, for you .NET heads. You’ll create a container configuration file that lists the images your application needs. The you’ll use the container manager to make a container that includes your application’s code as well as constituent resources downloaded from a container registry. For example, if your application is made up of some PHP files, your container configuration file will declare that you get the PHP runtime from a registry. Also, you’ll use the container configuration file to declare the .php files to copy into the container’s file system. The container manager encapsulates all your application stuff into a distinct container that you’ll run on a host computer, under a container manager. + +Here’s a diagram that illustrates the concepts behind container creation: + +![](https://deis.com/images/blog-images/dev_journey_4.png) + +Let’s take a detailed look at this diagram. + +Here, (1) indicates there is a container configuration file that defines the stuff your container needs, as well as how your container is to be constructed. When you run your container on the host, the container manager will read the configuration file to get the container images you need from a registry on the cloud (2) and add the images as layers in your container. + +Also, if that constituent image requires other images, the container manager will get those images too and layer them in. At (3) the container manager will copy in files to your container as is required. + +If you use a provisioning service, such as [Deis][9], the application container you just created exists as an image (4) which the provisioning service will deploy to a cloud provider of your choice. Examples of cloud providers are AWS and Rackspace. + +### Containers in a Cluster ### + +Okay. So we can say there is a good case to be made that containers provide a greater degree of configuration flexibility and resource utilization than virtual machines. Still, this is not the all of it. + +Where containers get really flexible is when they’re clustered. Remember, a container has a distinct IP address. Thus, it can be put behind a load balancer. Once a container goes behind a load balancer, the game goes up a level. + +You can run a cluster of containers behind a load balancer container to achieve high performance, high availability computing. Here’s one example setup: + +![](https://deis.com/images/blog-images/dev_journey_5.png) + +Let’s say you’ve made an application that does some resource intensive work. Photograph processing, for example. Using a container provisioning technology such as [Deis][9], you can create a container image that has your photo processing application configured with all the resources upon which your photo processing application depends. Then, you can deploy one or many instances of your container image to under a load balancer that reside on the host. Once the container image is made, you can keep it on the sidelines for introduction later on when the system becomes maxed out and more instances of your container are required in the cluster to meet the workload at hand. + +There is more good news. You don’t have manually configure the load balancer to accept your container image every time you add more instances into the environment. You can use service discovery technology to make it so that your container announces its availability to the balancer. Then, once informed, the balancer can start to route traffic to the new node. + +### Putting It All Together ### + +Container technology picks up where the virtual machine has left off. Host operating systems such as CoreOS, RHEL Atomic, and Ubuntu’s Snappy, in conjunction with container management technologies such as Docker and Rocket, are making containers more popular everyday. + +While containers are becoming more prevalent, they do take a while to master. However, once you get the hang of them, you can use provisioning technologies such as [Deis][9] to make container creation and deployment easier. + +Getting a conceptual understanding of containers is important as we move forward to actually doing some work with them. But, I imagine the concepts are hard to grasp without the actual hands-on experience to accompany the ideas in play. So, this is what we’ll do in the next segment of this series: make some containers. + +-------------------------------------------------------------------------------- + +via: https://deis.com/blog/2015/developer-journey-linux-containers + +作者:[Bob Reselman][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://deis.com/blog +[1]:https://en.wikipedia.org/wiki/Virtual_machine +[2]:https://coreos.com/using-coreos/ +[3]:http://www.projectatomic.io/ +[4]:https://developer.ubuntu.com/en/snappy/ +[5]:https://www.docker.com/ +[6]:https://coreos.com/blog/rocket/ +[7]:https://en.wikipedia.org/wiki/Apache_Maven +[8]:https://www.nuget.org/ +[9]:http://deis.com/learn \ No newline at end of file From 4bad08240ba3ba167d6c348f918880136798c3dc Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 29 Sep 2015 16:17:53 +0800 Subject: [PATCH 2182/2517] =?UTF-8?q?20150929-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rd Is Coming To Ubuntu and Ubuntu Touch.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sources/talk/20150929 A Slick New Set-Up Wizard Is Coming To Ubuntu and Ubuntu Touch.md diff --git a/sources/talk/20150929 A Slick New Set-Up Wizard Is Coming To Ubuntu and Ubuntu Touch.md b/sources/talk/20150929 A Slick New Set-Up Wizard Is Coming To Ubuntu and Ubuntu Touch.md new file mode 100644 index 0000000000..2c147fb3e3 --- /dev/null +++ b/sources/talk/20150929 A Slick New Set-Up Wizard Is Coming To Ubuntu and Ubuntu Touch.md @@ -0,0 +1,49 @@ +A Slick New Set-Up Wizard Is Coming To Ubuntu and Ubuntu Touch +================================================================================ +> Canonical aims to 'seduce and reassure' those unfamiliar with the OS by making a good first impression + +**The Ubuntu installer is set to undergo a dramatic makeover.** + +Ubuntu will modernise its out-of-the-box experience (OOBE) to be easier and quicker to complete, look more ‘seductive’ to new users, and better present the Ubuntu brand through its design. + +Ubiquity, the current Ubuntu installer, has largely remained unchanged since its [introduction back in 2010][1]. + +### First Impressions Are Everything ### + +Since the first thing most users see when trying Ubuntu for the first time is an installer (or set-up wizard, depending on device) the design team feel it’s “one of the most important categories of software usability”. + +“It essentially says how easy your software is to use, as well as introducing the user into your brand through visual design and tone of voice, which can convey familiarity and trust within your product.” + +Canonical’s new OOBE designs show a striking departure from the current look of the Ubiquity installer used by the Ubuntu desktop, and presents a refined approach to the way mobile users ‘set up’ a new Ubuntu Phone. + +![Old design (left) and the new proposed design](http://www.omgubuntu.co.uk/wp-content/uploads/2015/09/desktop-2.jpg) + +Old design (left) and the new proposed design + +Detailing the designs in [new blog post][2], the Canonical Design team say the aim of the revamp is to create a consistent out-of-the-box experience across Ubuntu devices. + +To do this it groups together “common first experiences found on the mobile, tablet and desktop” and unifies the steps and screens between each, something they say moves the OS closer to “achieving a seamless convergent platform.” + +![New Ubuntu installer on desktop/tablet (left) and phone](http://www.omgubuntu.co.uk/wp-content/uploads/2015/09/Convergence.jpg) + +New Ubuntu installer on desktop/tablet (left) and phone + +Implementation of the new ‘OOBE’ has already begun’ according to Canonical, though as of writing there’s no firm word on when a revamped installer may land on either desktop or phone images. + +With the march to ‘desktop’ convergence now in full swing, and a(nother) stack of design changes set to hit the mobile build in lieu of the first Ubuntu Phone that ‘transforms’ in to a PC, chances are you won’t have to wait too long to try it out. + +**What do you think of the designs? How would you go about improving the Ubuntu set-up experience? Let us know in the comments below.** + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/09/new-look-ubuntu-installer-coming-soon + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://www.omgubuntu.co.uk/2010/09/ubuntu-10-10s-installer-slideshow-oozes-class +[2]:http://design.canonical.com/wp-content/uploads/Convergence.jpg \ No newline at end of file From ba499971b2071619f5af1f2b0db86b37fdf27391 Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 29 Sep 2015 22:51:36 +0800 Subject: [PATCH 2183/2517] [translating]20 - The history of Android --- .../The history of Android/20 - The history of Android.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/The history of Android/20 - The history of Android.md b/sources/talk/The history of Android/20 - The history of Android.md index 30db4ce5c2..75c89a1abc 100644 --- a/sources/talk/The history of Android/20 - The history of Android.md +++ b/sources/talk/The history of Android/20 - The history of Android.md @@ -1,3 +1,5 @@ +alim0x translating + The history of Android ================================================================================ ![Another Market design that was nothing like the old one. This lineup shows the categories page, featured, a top apps list, and an app page.](http://cdn.arstechnica.net/wp-content/uploads/2014/03/market-pages.png) @@ -90,4 +92,4 @@ via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-histor [1]:http://arstechnica.com/gadgets/2011/02/near-field-communications-a-technology-primer/ [2]:http://arstechnica.com/business/2012/01/google-launches-style-guide-for-android-developers/ [a]:http://arstechnica.com/author/ronamadeo -[t]:https://twitter.com/RonAmadeo \ No newline at end of file +[t]:https://twitter.com/RonAmadeo From cef53abb75fce3cd26ec50ee1faf7685a7c77231 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 30 Sep 2015 09:40:00 +0800 Subject: [PATCH 2184/2517] =?UTF-8?q?20150930-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e Ansible (Automation Tool) in CentOS 7.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md diff --git a/sources/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md b/sources/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md new file mode 100644 index 0000000000..9d417ba1a6 --- /dev/null +++ b/sources/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md @@ -0,0 +1,99 @@ +Install and use Ansible (Automation Tool) in CentOS 7 +================================================================================ +Ansible is a free & open source Configuration and automation tool for UNIX like operating system. It is written in python and similar to Chef or Puppet but there is one difference and advantage of Ansible is that we don’t need to install any agent on the nodes. It uses SSH for making communication to its nodes. + +In this article we will install and configure Ansible in CentOS 7 and will try to manage its two nodes. + +**Ansible Server** – ansible.linuxtechi.com ( 192.168.1.15 ) + + **Nodes** – 192.168.1.9 , 192.168.1.10 + +### Step :1 Set EPEL repository ### + +Ansible package is not available in the default yum repositories, so we will enable epel repository for CentOS 7 using below commands + + [root@ansible ~]# rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm + +### Step:2 Install Anisble using yum command ### + + [root@ansible ~]# yum install ansible + +Once the installation is completed, check the ansible version : + + [root@ansible ~]# ansible --version + +![ansible-version](http://www.linuxtechi.com/wp-content/uploads/2015/09/ansible-version.jpg) + +### Step:3 Setup keys based SSH authentication with Nodes. ### + +Generate keys on the Ansible server and copy public key to the nodes. + + root@ansible ~]# ssh-keygen + +![ssh-keygen](http://www.linuxtechi.com/wp-content/uploads/2015/09/ssh-keygen.jpg) + +Use ssh-copy-id command to copy public key of Ansible server to its nodes. + +![ssh-copy-id-command](http://www.linuxtechi.com/wp-content/uploads/2015/09/ssh-copy-id-command.jpg) + +### Step:4 Define the nodes or inventory of servers for Ansible. ### + +File ‘**/etc/ansible/hosts**‘ maintains the inventory of servers for Ansible. + + [root@ansible ~]# vi /etc/ansible/hosts + [test-servers] + 192.168.1.9 + 192.168.1.10 + +Save and exit the file. + +Sample output of hosts file. + +![ansible-host](http://www.linuxtechi.com/wp-content/uploads/2015/09/ansible-host.jpg) + +### Step:5 Now try to run the Commands from Ansible Server. ### + +Check the connectivity of ‘test-servers’ or ansible nodes using ping + + [root@ansible ~]# ansible -m ping 'test-servers' + +![ansible-ping](http://www.linuxtechi.com/wp-content/uploads/2015/09/ansible-ping.jpg) + +#### Executing Shell commands : #### + +**Example :1 Check the uptime of Ansible nodes** + + [root@ansible ~]# ansible -m command -a "uptime" 'test-servers' + +![ansible-uptime](http://www.linuxtechi.com/wp-content/uploads/2015/09/ansible-uptime.jpg) + +**Example:2 Check Kernel Version of nodes** + + [root@ansible ~]# ansible -m command -a "uname -r" 'test-servers' + +![kernel-version-ansible](http://www.linuxtechi.com/wp-content/uploads/2015/09/kernel-version-ansible.jpg) + +**Example:3 Adding a user to the nodes** + + [root@ansible ~]# ansible -m command -a "useradd mark" 'test-servers' + [root@ansible ~]# ansible -m command -a "grep mark /etc/passwd" 'test-servers' + +![useradd-ansible](http://www.linuxtechi.com/wp-content/uploads/2015/09/useradd-ansible.jpg) + +**Example:4 Redirecting the output of command to a file** + + [root@ansible ~]# ansible -m command -a "df -Th" 'test-servers' > /tmp/command-output.txt + +![redirecting-output-ansible](http://www.linuxtechi.com/wp-content/uploads/2015/09/redirecting-output-ansible.jpg) + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/install-and-use-ansible-in-centos-7/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file From 55bd010d91fe5cb389fc1858b38c689b02ac2e0b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 30 Sep 2015 09:42:19 +0800 Subject: [PATCH 2185/2517] =?UTF-8?q?20150930-2=20=E9=80=89=E9=A2=98=20=20?= =?UTF-8?q?RHCE=20=E7=AC=AC=E4=B9=9D=E7=AF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... (SMTP) using null-client Configuration.md | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md diff --git a/sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md b/sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md new file mode 100644 index 0000000000..2f89eb9064 --- /dev/null +++ b/sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md @@ -0,0 +1,152 @@ +How to Setup Postfix Mail Server (SMTP) using null-client Configuration – Part 9 +================================================================================ +Regardless of the many online communication methods that are available today, email remains a practical way to deliver messages from one end of the world to another, or to a person sitting in the office next to ours. + +The following image illustrates the process of email transport starting with the sender until the message reaches the recipient’s inbox: + +![How Mail Setup Works](http://www.tecmint.com/wp-content/uploads/2015/09/How-Mail-Setup-Works.png) + +How Mail Setup Works + +To make this possible, several things happen behind the scenes. In order for an email message to be delivered from a client application (such as [Thunderbird][1], Outlook, or webmail services such as Gmail or Yahoo! Mail) to a mail server, and from there to the destination server and finally to its intended recipient, a SMTP (Simple Mail Transfer Protocol) service must be in place in each server. + +That is the reason why in this article we will explain how to set up a SMTP server in RHEL 7 where emails sent by local users (even to other local users) are forwarded to a central mail server for easier access. + +In the exam’s requirements this is called a null-client setup. + +Our test environment will consist of an originating mail server and a central mail server or relayhost. + + Original Mail Server: (hostname: box1.mydomain.com / IP: 192.168.0.18) + Central Mail Server: (hostname: mail.mydomain.com / IP: 192.168.0.20) + +For name resolution we will use the well-known /etc/hosts file on both boxes: + + 192.168.0.18 box1.mydomain.com box1 + 192.168.0.20 mail.mydomain.com mail + +### Installing Postfix and Firewall / SELinux Considerations ### + +To begin, we will need to (in both servers): + +**1. Install Postfix:** + + # yum update && yum install postfix + +**2. Start the service and enable it to run on future reboots:** + + # systemctl start postfix + # systemctl enable postfix + +**3. Allow mail traffic through the firewall:** + + # firewall-cmd --permanent --add-service=smtp + # firewall-cmd --add-service=smtp + +![Open Mail Server Port in Firewall](http://www.tecmint.com/wp-content/uploads/2015/09/Allow-Traffic-through-Firewall.png) + +Open Mail Server SMTP Port in Firewall + +**4. Configure Postfix on box1.mydomain.com.** + +Postfix’s main configuration file is located in /etc/postfix/main.cf. This file itself is a great documentation source as the included comments explain the purpose of the program’s settings. + +For brevity, let’s display only the lines that need to be edited (yes, you need to leave mydestination blank in the originating server; otherwise the emails will be stored locally as opposed to in a central mail server which is what we actually want): + +**Configure Postfix on box1.mydomain.com** + +---------- + + myhostname = box1.mydomain.com + mydomain = mydomain.com + myorigin = $mydomain + inet_interfaces = loopback-only + mydestination = + relayhost = 192.168.0.20 + +**5. Configure Postfix on mail.mydomain.com.** + +**Configure Postfix on mail.mydomain.com** + +---------- + + myhostname = mail.mydomain.com + mydomain = mydomain.com + myorigin = $mydomain + inet_interfaces = all + mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain + mynetworks = 192.168.0.0/24, 127.0.0.0/8 + +And set the related SELinux boolean to true permanently if not already done: + + # setsebool -P allow_postfix_local_write_mail_spool on + +![Set Postfix SELinux Permission](http://www.tecmint.com/wp-content/uploads/2015/09/Set-Postfix-SELinux-Permission.png) + +Set Postfix SELinux Permission + +The above SELinux boolean will allow Postfix to write to the mail spool in the central server. + +**6. Restart the service on both servers for the changes to take effect:** + + # systemctl restart postfix + +If Postfix does not start correctly, you can use following commands to troubleshoot. + + # systemctl –l status postfix + # journalctl –xn + # postconf –n + +### Testing the Postfix Mail Servers ### + +To test the mail servers, you can use any Mail User Agent (most commonly known as MUA for short) such as [mail or mutt][2]. + +Since mutt is a personal favorite, I will use it in box1 to send an email to user tecmint using an existing file (mailbody.txt) as message body: + + # mutt -s "Part 9-RHCE series" tecmint@mydomain.com < mailbody.txt + +![Test Postfix Mail Server](http://www.tecmint.com/wp-content/uploads/2015/09/Test-Postfix-Mail-Server.png) + +Test Postfix Mail Server + +Now go to the central mail server (mail.mydomain.com), log on as user tecmint, and check whether the email was received: + + # su – tecmint + # mail + +![Check Postfix Mail Server Delivery](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Postfix-Mail-Server-Delivery.png) + +Check Postfix Mail Server Delivery + +If the email was not received, check root’s mail spool for a warning or error notification. You may also want to make sure that the SMTP service is running on both servers and that port 25 is open in the central mail server using [nmap command][3]: + + # nmap -PN 192.168.0.20 + +![Troubleshoot Postfix Mail Server](http://www.tecmint.com/wp-content/uploads/2015/09/Troubleshoot-Postfix-Mail-Server.png) + +Troubleshoot Postfix Mail Server + +### Summary ### + +Setting up a mail server and a relay host as shown in this article is an essential skill that every system administrator must have, and represents the foundation to understand and install a more complex scenario such as a mail server hosting a live domain for several (even hundreds or thousands) of email accounts. + +(Please note that this kind of setup requires a DNS server, which is out of the scope of this guide), but you can use following article to setup DNS Server: + +- [Setup Cache only DNS Server in CentOS/RHEL 07][4] + +Finally, I highly recommend you become familiar with Postfix’s configuration file (main.cf) and the program’s man page. If in doubt, don’t hesitate to drop us a line using the form below or using our forum, Linuxsay.com, where you will get almost immediate help from Linux experts from all around the world. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/setup-postfix-mail-server-smtp-using-null-client-on-centos/ + +作者:[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/install-thunderbird-17-in-ubuntu-xubuntu-linux-mint/ +[2]:http://www.tecmint.com/send-mail-from-command-line-using-mutt-command/ +[3]:http://www.tecmint.com/nmap-command-examples/ +[4]:http://www.tecmint.com/setup-dns-cache-server-in-centos-7/ \ No newline at end of file From ef687aef2e2d756a15ca24cb56bc0fa44ef09f06 Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 30 Sep 2015 23:59:51 +0800 Subject: [PATCH 2186/2517] format --- ...20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md b/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md index 1960ebc9f7..fc0b9d4937 100644 --- a/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md +++ b/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md @@ -1,5 +1,6 @@ - translating by Ezio + 为Linux 4.3 内核添加MOST 驱动子系统 ================================================================================ While the [Linux 4.2][1] kernel hasn't been officially released yet, Greg Kroah-Hartman sent in early his pull requests for the various subsystems he maintains for the Linux 4.3 merge window. From e71dcfb140c85fd782521ad8cc2543fa432b8402 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 1 Oct 2015 10:38:15 +0800 Subject: [PATCH 2187/2517] translating --- ...0 Install and use Ansible (Automation Tool) in CentOS 7.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md b/sources/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md index 9d417ba1a6..f90b7ef4b5 100644 --- a/sources/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md +++ b/sources/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md @@ -1,3 +1,5 @@ +translating---geekpi + Install and use Ansible (Automation Tool) in CentOS 7 ================================================================================ Ansible is a free & open source Configuration and automation tool for UNIX like operating system. It is written in python and similar to Chef or Puppet but there is one difference and advantage of Ansible is that we don’t need to install any agent on the nodes. It uses SSH for making communication to its nodes. @@ -96,4 +98,4 @@ via: http://www.linuxtechi.com/install-and-use-ansible-in-centos-7/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file +[a]:http://www.linuxtechi.com/author/pradeep/ From bbb05c2d443c584533b53c9ec731df8edac82c1d Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 1 Oct 2015 11:16:55 +0800 Subject: [PATCH 2188/2517] translated --- ...e Ansible (Automation Tool) in CentOS 7.md | 49 +++++++++---------- 1 file changed, 24 insertions(+), 25 deletions(-) rename {sources => translated}/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md (57%) diff --git a/sources/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md b/translated/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md similarity index 57% rename from sources/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md rename to translated/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md index f90b7ef4b5..0527b51b9c 100644 --- a/sources/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md +++ b/translated/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md @@ -1,46 +1,44 @@ -translating---geekpi - -Install and use Ansible (Automation Tool) in CentOS 7 +在CentOS 7中安装并使用Ansible(自动化工具) ================================================================================ -Ansible is a free & open source Configuration and automation tool for UNIX like operating system. It is written in python and similar to Chef or Puppet but there is one difference and advantage of Ansible is that we don’t need to install any agent on the nodes. It uses SSH for making communication to its nodes. +Ansible是一款为类Unix系统开发的免费开源配置和自动化工具。它用Python写成并且和Chef和Puppet相似,但是有一个不同和好处是我们不需要在节点中安装任何客户端。它使用SSH来和节点进行通信。 -In this article we will install and configure Ansible in CentOS 7 and will try to manage its two nodes. +本篇中我们将在CentOS 7上安装并配置Ansible,并且尝试管理两个节点。 -**Ansible Server** – ansible.linuxtechi.com ( 192.168.1.15 ) +**Ansible 服务端** – ansible.linuxtechi.com ( 192.168.1.15 ) **Nodes** – 192.168.1.9 , 192.168.1.10 -### Step :1 Set EPEL repository ### +### 第一步: 设置EPEL仓库 ### -Ansible package is not available in the default yum repositories, so we will enable epel repository for CentOS 7 using below commands +Ansible仓库默认不在yum仓库中,因此我们需要使用下面的命令启用epel仓库。 [root@ansible ~]# rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm -### Step:2 Install Anisble using yum command ### +### 第二步: 使用yum安装Ansible ### [root@ansible ~]# yum install ansible -Once the installation is completed, check the ansible version : +安装完成后,检查ansible版本: [root@ansible ~]# ansible --version ![ansible-version](http://www.linuxtechi.com/wp-content/uploads/2015/09/ansible-version.jpg) -### Step:3 Setup keys based SSH authentication with Nodes. ### +### 第三步: 设置用于节点鉴权的SSH密钥 ### -Generate keys on the Ansible server and copy public key to the nodes. +在Ansible服务端生成密钥,并且复制公钥到节点中。 root@ansible ~]# ssh-keygen ![ssh-keygen](http://www.linuxtechi.com/wp-content/uploads/2015/09/ssh-keygen.jpg) -Use ssh-copy-id command to copy public key of Ansible server to its nodes. +使用ssh-copy-id命令来复制Ansible公钥到节点中。 ![ssh-copy-id-command](http://www.linuxtechi.com/wp-content/uploads/2015/09/ssh-copy-id-command.jpg) -### Step:4 Define the nodes or inventory of servers for Ansible. ### +### 第四步:为Ansible定义节点的清单 ### -File ‘**/etc/ansible/hosts**‘ maintains the inventory of servers for Ansible. +文件 ‘**/etc/ansible/hosts**‘ 维护了Ansible中服务器的清单。 [root@ansible ~]# vi /etc/ansible/hosts [test-servers] @@ -48,41 +46,42 @@ File ‘**/etc/ansible/hosts**‘ maintains the inventory of servers for Ansible 192.168.1.10 Save and exit the file. +保存并退出文件 -Sample output of hosts file. +主机文件示例。 ![ansible-host](http://www.linuxtechi.com/wp-content/uploads/2015/09/ansible-host.jpg) -### Step:5 Now try to run the Commands from Ansible Server. ### +### 第五步:尝试在Ansible服务端运行命令 ### -Check the connectivity of ‘test-servers’ or ansible nodes using ping +使用ping检查‘test-servers’或者ansible节点的连通性。 [root@ansible ~]# ansible -m ping 'test-servers' ![ansible-ping](http://www.linuxtechi.com/wp-content/uploads/2015/09/ansible-ping.jpg) -#### Executing Shell commands : #### +#### 执行shell命令 #### -**Example :1 Check the uptime of Ansible nodes** +**例子1:检查Ansible节点的运行时间 ** [root@ansible ~]# ansible -m command -a "uptime" 'test-servers' ![ansible-uptime](http://www.linuxtechi.com/wp-content/uploads/2015/09/ansible-uptime.jpg) -**Example:2 Check Kernel Version of nodes** +**例子2:检查节点的内核版本 ** [root@ansible ~]# ansible -m command -a "uname -r" 'test-servers' ![kernel-version-ansible](http://www.linuxtechi.com/wp-content/uploads/2015/09/kernel-version-ansible.jpg) -**Example:3 Adding a user to the nodes** +**例子3:给节点增加用户 ** [root@ansible ~]# ansible -m command -a "useradd mark" 'test-servers' [root@ansible ~]# ansible -m command -a "grep mark /etc/passwd" 'test-servers' - + ![useradd-ansible](http://www.linuxtechi.com/wp-content/uploads/2015/09/useradd-ansible.jpg) -**Example:4 Redirecting the output of command to a file** +**例子4:重定向输出到文件中** [root@ansible ~]# ansible -m command -a "df -Th" 'test-servers' > /tmp/command-output.txt @@ -93,7 +92,7 @@ Check the connectivity of ‘test-servers’ or ansible nodes using ping via: http://www.linuxtechi.com/install-and-use-ansible-in-centos-7/ 作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4df4ad36b67da744e81b20981fa9ea14bcd63154 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Thu, 1 Oct 2015 21:57:35 +0800 Subject: [PATCH 2189/2517] Translating sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md --- ...Postfix Mail Server (SMTP) using null-client Configuration.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md b/sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md index 2f89eb9064..77b508db66 100644 --- a/sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md +++ b/sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md @@ -1,3 +1,4 @@ +ictlyh Translating How to Setup Postfix Mail Server (SMTP) using null-client Configuration – Part 9 ================================================================================ Regardless of the many online communication methods that are available today, email remains a practical way to deliver messages from one end of the world to another, or to a person sitting in the office next to ours. From aebe0a04fb45d1732002888baa596c8c6d76e5c5 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 2 Oct 2015 00:15:23 +0800 Subject: [PATCH 2190/2517] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201509?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- published/{ => 201509}/20141223 Defending the Free Linux World.md | 0 ... set up IPv6 BGP peering and filtering in Quagga BGP router.md | 0 ...Her Interview Experience on RedHat Linux Package Management.md | 0 ...wto Interactively Perform Tasks with Docker using Kitematic.md | 0 .../{ => 201509}/20150728 Process of the Linux kernel building.md | 0 ...50730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md | 0 ...nx as Rreverse Proxy or Load Balancer with Weave and Docker.md | 0 published/{ => 201509}/20150803 Managing Linux Logs.md | 0 ...e logging in Open vSwitch for debugging and troubleshooting.md | 0 .../20150811 How to Install Snort and Usage in Ubuntu 15.04.md | 0 ...omamndline Tool to Find and Delete Duplicate Files in Linux.md | 0 ...e Text-to-Speech Schedule a Job and Watch Commands in Linux.md | 0 ...JBoss Data Virtualization GA with OData in Docker Container.md | 0 .../{ => 201509}/20150813 Linux file system hierarchy v2.0.md | 0 .../20150816 How to migrate MySQL to MariaDB on Linux.md | 0 ...s--How to count the number of threads in a process on Linux.md | 0 ...h Answers--How to fix Wireshark GUI freeze on Linux desktop.md | 0 ...r Linux Birthday-- A 22 Years of Journey and Still Counting.md | 0 ...ker Working on Security Components Live Container Migration.md | 0 .../20150819 Linuxcon--The Changing Role of the Server OS.md | 0 .../20150820 A Look at What's Next for the Linux Kernel.md | 0 .../20150821 Top 4 open source command-line email clients.md | 0 .../20150824 Basics Of NetworkManager Command Line Tool Nmcli.md | 0 ... Fix No Bootable Device Found Error After Installing Ubuntu.md | 0 ...Add Hindi And Devanagari Support In Antergos And Arch Linux.md | 0 ...reate an AP in Ubuntu 15.04 to connect to Android or iPhone.md | 0 .../20150824 Linux about to gain a new file system--bcachefs.md | 0 ...ne Several Smaller Partition into One Large Virtual Storage.md | 0 ...4 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md | 0 .../{ => 201509}/20150826 Five Super Cool Open Source Games.md | 0 ...6 How to set up a system status page of your infrastructure.md | 0 ...SH Based Client for Connecting Remote Unix or Linux Systems.md | 0 .../20150827 Xtreme Download Manager Updated With Fresh GUI.md | 0 .../{ => 201509}/20150901 How to Defragment Linux Systems.md | 0 ...901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md | 0 .../20150901 How to automatically dim your screen on Linux.md | 0 ...stall The Latest Linux Kernel in Ubuntu Easily via A Script.md | 0 published/{ => 201509}/20150901 Is Linux Right For You.md | 0 ...'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md | 0 ...150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md | 0 ...ISH--A smart and user-friendly command line shell for Linux.md | 0 .../20150906 How To Set Up Your FTP Server In Linux.md | 0 .../20150906 How to Install DNSCrypt and Unbound in Arch Linux.md | 0 .../20150906 How to Install QGit Viewer in Ubuntu 14.04.md | 0 ...50906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md | 0 ... How to Download Install and Configure Plank Dock in Ubuntu.md | 0 .../{ => 201509}/20150908 List Of 10 Funny Linux Commands.md | 0 ...rical and Statistical Uptime of System With tuptime Utility.md | 0 ...911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md | 0 ...h Answers--How to remove unused old kernel images on Ubuntu.md | 0 ...x-Based Open Source OS Runs 42 Percent of Dell PCs in China.md | 0 .../20150916 Enable Automatic System Updates In Ubuntu.md | 0 ...ers--How to find out which CPU core a process is running on.md | 0 ...t 01--Reviewing Essential Commands and System Documentation.md | 0 ...ries--Part 02--How to Perform File and Directory Management.md | 0 ...A Series--Part 03--How to Manage Users and Groups in RHEL 7.md | 0 ...s with Nano and Vim or Analyzing text with grep and regexps.md | 0 ...nagement in RHEL 7--Boot Shutdown and Everything in Between.md | 0 ... 'Parted' and 'SSM' to Configure and Encrypt System Storage.md | 0 ...CLs (Access Control Lists) and Mounting Samba or NFS Shares.md | 0 ...ecuring SSH, Setting Hostname and Enabling Network Services.md | 0 ...--Installing, Configuring and Securing a Web and FTP Server.md | 0 ...ment, Automating Tasks with Cron and Monitoring System Logs.md | 0 ...ls and Network Traffic Control Using FirewallD and Iptables.md | 0 64 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201509}/20141223 Defending the Free Linux World.md (100%) rename published/{ => 201509}/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md (100%) rename published/{ => 201509}/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md (100%) rename published/{ => 201509}/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md (100%) rename published/{ => 201509}/20150728 Process of the Linux kernel building.md (100%) rename published/{ => 201509}/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md (100%) rename published/{ => 201509}/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md (100%) rename published/{ => 201509}/20150803 Managing Linux Logs.md (100%) rename published/{ => 201509}/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md (100%) rename published/{ => 201509}/20150811 How to Install Snort and Usage in Ubuntu 15.04.md (100%) rename published/{ => 201509}/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md (100%) rename published/{ => 201509}/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md (100%) rename published/{ => 201509}/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md (100%) rename published/{ => 201509}/20150813 Linux file system hierarchy v2.0.md (100%) rename published/{ => 201509}/20150816 How to migrate MySQL to MariaDB on Linux.md (100%) rename published/{ => 201509}/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md (100%) rename published/{ => 201509}/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md (100%) rename published/{ => 201509}/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md (100%) rename published/{ => 201509}/20150818 Docker Working on Security Components Live Container Migration.md (100%) rename published/{ => 201509}/20150819 Linuxcon--The Changing Role of the Server OS.md (100%) rename published/{ => 201509}/20150820 A Look at What's Next for the Linux Kernel.md (100%) rename published/{ => 201509}/20150821 Top 4 open source command-line email clients.md (100%) rename published/{ => 201509}/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md (100%) rename published/{ => 201509}/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md (100%) rename published/{ => 201509}/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md (100%) rename published/{ => 201509}/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md (100%) rename published/{ => 201509}/20150824 Linux about to gain a new file system--bcachefs.md (100%) rename published/{ => 201509}/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md (100%) rename published/{ => 201509}/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md (100%) rename published/{ => 201509}/20150826 Five Super Cool Open Source Games.md (100%) rename published/{ => 201509}/20150826 How to set up a system status page of your infrastructure.md (100%) rename published/{ => 201509}/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md (100%) rename published/{ => 201509}/20150827 Xtreme Download Manager Updated With Fresh GUI.md (100%) rename published/{ => 201509}/20150901 How to Defragment Linux Systems.md (100%) rename published/{ => 201509}/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md (100%) rename published/{ => 201509}/20150901 How to automatically dim your screen on Linux.md (100%) rename published/{ => 201509}/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md (100%) rename published/{ => 201509}/20150901 Is Linux Right For You.md (100%) rename published/{ => 201509}/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md (100%) rename published/{ => 201509}/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md (100%) rename published/{ => 201509}/20150906 FISH--A smart and user-friendly command line shell for Linux.md (100%) rename published/{ => 201509}/20150906 How To Set Up Your FTP Server In Linux.md (100%) rename published/{ => 201509}/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md (100%) rename published/{ => 201509}/20150906 How to Install QGit Viewer in Ubuntu 14.04.md (100%) rename published/{ => 201509}/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md (100%) rename published/{ => 201509}/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md (100%) rename published/{ => 201509}/20150908 List Of 10 Funny Linux Commands.md (100%) rename published/{ => 201509}/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md (100%) rename published/{ => 201509}/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md (100%) rename published/{ => 201509}/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md (100%) rename published/{ => 201509}/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md (100%) rename published/{ => 201509}/20150916 Enable Automatic System Updates In Ubuntu.md (100%) rename published/{ => 201509}/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md (100%) rename published/{ => 201509}/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md (100%) rename published/{ => 201509}/RHCSA Series--Part 02--How to Perform File and Directory Management.md (100%) rename published/{ => 201509}/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md (100%) rename published/{ => 201509}/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md (100%) rename published/{ => 201509}/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md (100%) rename published/{ => 201509}/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md (100%) rename published/{ => 201509}/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md (100%) rename published/{ => 201509}/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md (100%) rename published/{ => 201509}/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md (100%) rename published/{ => 201509}/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md (100%) rename published/{ => 201509}/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md (100%) diff --git a/published/20141223 Defending the Free Linux World.md b/published/201509/20141223 Defending the Free Linux World.md similarity index 100% rename from published/20141223 Defending the Free Linux World.md rename to published/201509/20141223 Defending the Free Linux World.md diff --git a/published/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md b/published/201509/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md similarity index 100% rename from published/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md rename to published/201509/20150225 How to set up IPv6 BGP peering and filtering in Quagga BGP router.md diff --git a/published/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md b/published/201509/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md similarity index 100% rename from published/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md rename to published/201509/20150623 Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management.md diff --git a/published/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md b/published/201509/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md similarity index 100% rename from published/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md rename to published/201509/20150722 Howto Interactively Perform Tasks with Docker using Kitematic.md diff --git a/published/20150728 Process of the Linux kernel building.md b/published/201509/20150728 Process of the Linux kernel building.md similarity index 100% rename from published/20150728 Process of the Linux kernel building.md rename to published/201509/20150728 Process of the Linux kernel building.md diff --git a/published/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md b/published/201509/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md similarity index 100% rename from published/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md rename to published/201509/20150730 How to Setup iTOP (IT Operational Portal) on CentOS 7.md diff --git a/published/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md b/published/201509/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md similarity index 100% rename from published/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md rename to published/201509/20150730 Howto Configure Nginx as Rreverse Proxy or Load Balancer with Weave and Docker.md diff --git a/published/20150803 Managing Linux Logs.md b/published/201509/20150803 Managing Linux Logs.md similarity index 100% rename from published/20150803 Managing Linux Logs.md rename to published/201509/20150803 Managing Linux Logs.md diff --git a/published/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md b/published/201509/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md similarity index 100% rename from published/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md rename to published/201509/20150806 Linux FAQs with Answers--How to enable logging in Open vSwitch for debugging and troubleshooting.md diff --git a/published/20150811 How to Install Snort and Usage in Ubuntu 15.04.md b/published/201509/20150811 How to Install Snort and Usage in Ubuntu 15.04.md similarity index 100% rename from published/20150811 How to Install Snort and Usage in Ubuntu 15.04.md rename to published/201509/20150811 How to Install Snort and Usage in Ubuntu 15.04.md diff --git a/published/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md b/published/201509/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md similarity index 100% rename from published/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md rename to published/201509/20150811 fdupes--A Comamndline Tool to Find and Delete Duplicate Files in Linux.md diff --git a/published/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md b/published/201509/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md similarity index 100% rename from published/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md rename to published/201509/20150812 Linux Tricks--Play Game in Chrome Text-to-Speech Schedule a Job and Watch Commands in Linux.md diff --git a/published/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md b/published/201509/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md similarity index 100% rename from published/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md rename to published/201509/20150813 Howto Run JBoss Data Virtualization GA with OData in Docker Container.md diff --git a/published/20150813 Linux file system hierarchy v2.0.md b/published/201509/20150813 Linux file system hierarchy v2.0.md similarity index 100% rename from published/20150813 Linux file system hierarchy v2.0.md rename to published/201509/20150813 Linux file system hierarchy v2.0.md diff --git a/published/20150816 How to migrate MySQL to MariaDB on Linux.md b/published/201509/20150816 How to migrate MySQL to MariaDB on Linux.md similarity index 100% rename from published/20150816 How to migrate MySQL to MariaDB on Linux.md rename to published/201509/20150816 How to migrate MySQL to MariaDB on Linux.md diff --git a/published/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md b/published/201509/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md similarity index 100% rename from published/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md rename to published/201509/20150817 Linux FAQs with Answers--How to count the number of threads in a process on Linux.md diff --git a/published/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md b/published/201509/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md similarity index 100% rename from published/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md rename to published/201509/20150817 Linux FAQs with Answers--How to fix Wireshark GUI freeze on Linux desktop.md diff --git a/published/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md b/published/201509/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md similarity index 100% rename from published/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md rename to published/201509/20150818 Debian GNU or Linux Birthday-- A 22 Years of Journey and Still Counting.md diff --git a/published/20150818 Docker Working on Security Components Live Container Migration.md b/published/201509/20150818 Docker Working on Security Components Live Container Migration.md similarity index 100% rename from published/20150818 Docker Working on Security Components Live Container Migration.md rename to published/201509/20150818 Docker Working on Security Components Live Container Migration.md diff --git a/published/20150819 Linuxcon--The Changing Role of the Server OS.md b/published/201509/20150819 Linuxcon--The Changing Role of the Server OS.md similarity index 100% rename from published/20150819 Linuxcon--The Changing Role of the Server OS.md rename to published/201509/20150819 Linuxcon--The Changing Role of the Server OS.md diff --git a/published/20150820 A Look at What's Next for the Linux Kernel.md b/published/201509/20150820 A Look at What's Next for the Linux Kernel.md similarity index 100% rename from published/20150820 A Look at What's Next for the Linux Kernel.md rename to published/201509/20150820 A Look at What's Next for the Linux Kernel.md diff --git a/published/20150821 Top 4 open source command-line email clients.md b/published/201509/20150821 Top 4 open source command-line email clients.md similarity index 100% rename from published/20150821 Top 4 open source command-line email clients.md rename to published/201509/20150821 Top 4 open source command-line email clients.md diff --git a/published/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md b/published/201509/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md similarity index 100% rename from published/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md rename to published/201509/20150824 Basics Of NetworkManager Command Line Tool Nmcli.md diff --git a/published/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md b/published/201509/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md similarity index 100% rename from published/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md rename to published/201509/20150824 Fix No Bootable Device Found Error After Installing Ubuntu.md diff --git a/published/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md b/published/201509/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md similarity index 100% rename from published/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md rename to published/201509/20150824 How To Add Hindi And Devanagari Support In Antergos And Arch Linux.md diff --git a/published/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md b/published/201509/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md similarity index 100% rename from published/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md rename to published/201509/20150824 How to create an AP in Ubuntu 15.04 to connect to Android or iPhone.md diff --git a/published/20150824 Linux about to gain a new file system--bcachefs.md b/published/201509/20150824 Linux about to gain a new file system--bcachefs.md similarity index 100% rename from published/20150824 Linux about to gain a new file system--bcachefs.md rename to published/201509/20150824 Linux about to gain a new file system--bcachefs.md diff --git a/published/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md b/published/201509/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md similarity index 100% rename from published/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md rename to published/201509/20150824 Mhddfs--Combine Several Smaller Partition into One Large Virtual Storage.md diff --git a/published/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md b/published/201509/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md similarity index 100% rename from published/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md rename to published/201509/20150824 Watch These Kids Having Fun With Linux Terminal In Ubuntu.md diff --git a/published/20150826 Five Super Cool Open Source Games.md b/published/201509/20150826 Five Super Cool Open Source Games.md similarity index 100% rename from published/20150826 Five Super Cool Open Source Games.md rename to published/201509/20150826 Five Super Cool Open Source Games.md diff --git a/published/20150826 How to set up a system status page of your infrastructure.md b/published/201509/20150826 How to set up a system status page of your infrastructure.md similarity index 100% rename from published/20150826 How to set up a system status page of your infrastructure.md rename to published/201509/20150826 How to set up a system status page of your infrastructure.md diff --git a/published/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md b/published/201509/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md similarity index 100% rename from published/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md rename to published/201509/20150826 Mosh Shell--A SSH Based Client for Connecting Remote Unix or Linux Systems.md diff --git a/published/20150827 Xtreme Download Manager Updated With Fresh GUI.md b/published/201509/20150827 Xtreme Download Manager Updated With Fresh GUI.md similarity index 100% rename from published/20150827 Xtreme Download Manager Updated With Fresh GUI.md rename to published/201509/20150827 Xtreme Download Manager Updated With Fresh GUI.md diff --git a/published/20150901 How to Defragment Linux Systems.md b/published/201509/20150901 How to Defragment Linux Systems.md similarity index 100% rename from published/20150901 How to Defragment Linux Systems.md rename to published/201509/20150901 How to Defragment Linux Systems.md diff --git a/published/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md b/published/201509/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md similarity index 100% rename from published/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md rename to published/201509/20150901 How to Install or Upgrade to Linux Kernel 4.2 in Ubuntu.md diff --git a/published/20150901 How to automatically dim your screen on Linux.md b/published/201509/20150901 How to automatically dim your screen on Linux.md similarity index 100% rename from published/20150901 How to automatically dim your screen on Linux.md rename to published/201509/20150901 How to automatically dim your screen on Linux.md diff --git a/published/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md b/published/201509/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md similarity index 100% rename from published/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md rename to published/201509/20150901 Install The Latest Linux Kernel in Ubuntu Easily via A Script.md diff --git a/published/20150901 Is Linux Right For You.md b/published/201509/20150901 Is Linux Right For You.md similarity index 100% rename from published/20150901 Is Linux Right For You.md rename to published/201509/20150901 Is Linux Right For You.md diff --git a/published/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md b/published/201509/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md similarity index 100% rename from published/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md rename to published/201509/20150901 Setting Up High-Performance 'HHVM' and Nginx or Apache with MariaDB on Debian or Ubuntu.md diff --git a/published/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md b/published/201509/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md similarity index 100% rename from published/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md rename to published/201509/20150906 Do Simple Math In Ubuntu And elementary OS With NaSC.md diff --git a/published/20150906 FISH--A smart and user-friendly command line shell for Linux.md b/published/201509/20150906 FISH--A smart and user-friendly command line shell for Linux.md similarity index 100% rename from published/20150906 FISH--A smart and user-friendly command line shell for Linux.md rename to published/201509/20150906 FISH--A smart and user-friendly command line shell for Linux.md diff --git a/published/20150906 How To Set Up Your FTP Server In Linux.md b/published/201509/20150906 How To Set Up Your FTP Server In Linux.md similarity index 100% rename from published/20150906 How To Set Up Your FTP Server In Linux.md rename to published/201509/20150906 How To Set Up Your FTP Server In Linux.md diff --git a/published/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md b/published/201509/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md similarity index 100% rename from published/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md rename to published/201509/20150906 How to Install DNSCrypt and Unbound in Arch Linux.md diff --git a/published/20150906 How to Install QGit Viewer in Ubuntu 14.04.md b/published/201509/20150906 How to Install QGit Viewer in Ubuntu 14.04.md similarity index 100% rename from published/20150906 How to Install QGit Viewer in Ubuntu 14.04.md rename to published/201509/20150906 How to Install QGit Viewer in Ubuntu 14.04.md diff --git a/published/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md b/published/201509/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md similarity index 100% rename from published/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md rename to published/201509/20150906 Install Qmmp 0.9.0 Winamp-like Audio Player in Ubuntu.md diff --git a/published/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md b/published/201509/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md similarity index 100% rename from published/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md rename to published/201509/20150908 How to Download Install and Configure Plank Dock in Ubuntu.md diff --git a/published/20150908 List Of 10 Funny Linux Commands.md b/published/201509/20150908 List Of 10 Funny Linux Commands.md similarity index 100% rename from published/20150908 List Of 10 Funny Linux Commands.md rename to published/201509/20150908 List Of 10 Funny Linux Commands.md diff --git a/published/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md b/published/201509/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md similarity index 100% rename from published/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md rename to published/201509/20150909 Linux Server See the Historical and Statistical Uptime of System With tuptime Utility.md diff --git a/published/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md b/published/201509/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md similarity index 100% rename from published/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md rename to published/201509/20150911 10 Useful Linux Command Line Tricks for Newbies--Part 2.md diff --git a/published/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md b/published/201509/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md similarity index 100% rename from published/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md rename to published/201509/20150914 Linux FAQs with Answers--How to remove unused old kernel images on Ubuntu.md diff --git a/published/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md b/published/201509/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md similarity index 100% rename from published/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md rename to published/201509/20150915 Ubuntu Linux-Based Open Source OS Runs 42 Percent of Dell PCs in China.md diff --git a/published/20150916 Enable Automatic System Updates In Ubuntu.md b/published/201509/20150916 Enable Automatic System Updates In Ubuntu.md similarity index 100% rename from published/20150916 Enable Automatic System Updates In Ubuntu.md rename to published/201509/20150916 Enable Automatic System Updates In Ubuntu.md diff --git a/published/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md b/published/201509/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md similarity index 100% rename from published/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md rename to published/201509/20150916 Linux FAQs with Answers--How to find out which CPU core a process is running on.md diff --git a/published/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/published/201509/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md similarity index 100% rename from published/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md rename to published/201509/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md diff --git a/published/RHCSA Series--Part 02--How to Perform File and Directory Management.md b/published/201509/RHCSA Series--Part 02--How to Perform File and Directory Management.md similarity index 100% rename from published/RHCSA Series--Part 02--How to Perform File and Directory Management.md rename to published/201509/RHCSA Series--Part 02--How to Perform File and Directory Management.md diff --git a/published/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md b/published/201509/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md similarity index 100% rename from published/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md rename to published/201509/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md diff --git a/published/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md b/published/201509/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md similarity index 100% rename from published/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md rename to published/201509/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md diff --git a/published/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md b/published/201509/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md similarity index 100% rename from published/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md rename to published/201509/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md diff --git a/published/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md b/published/201509/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md similarity index 100% rename from published/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md rename to published/201509/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md diff --git a/published/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/published/201509/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md similarity index 100% rename from published/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md rename to published/201509/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md diff --git a/published/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md b/published/201509/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md similarity index 100% rename from published/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md rename to published/201509/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md diff --git a/published/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md b/published/201509/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md similarity index 100% rename from published/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md rename to published/201509/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md diff --git a/published/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md b/published/201509/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md similarity index 100% rename from published/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md rename to published/201509/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md diff --git a/published/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md b/published/201509/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md similarity index 100% rename from published/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md rename to published/201509/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md From bc199705c35955c96ad2fda0b0064bc34111913e Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 2 Oct 2015 00:25:27 +0800 Subject: [PATCH 2191/2517] PUB:RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc 快发完啦。加油哦· --- ... RHEL 7 Installations Using 'Kickstart'.md | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) rename {translated/tech/RHCSA => published}/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md (64%) diff --git a/translated/tech/RHCSA/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md b/published/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md similarity index 64% rename from translated/tech/RHCSA/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md rename to published/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md index 25102ad8f9..27ae044218 100644 --- a/translated/tech/RHCSA/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md +++ b/published/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md @@ -1,32 +1,33 @@ -RHCSA 系列: 使用 ‘Kickstart’完成 RHEL 7 的自动化安装 – Part 12 +RHCSA 系列(十二): 使用 Kickstart 完成 RHEL 7 的自动化安装 ================================================================================ -无论是在数据中心还是实验室环境,Linux 服务器很少是独立的机子,很可能有时你不得不安装多个以某种方式相互联系的机子。假如你将在单个服务器上手动安装 RHEL 7 所花的时间乘以你需要配置的机子个数,则这将导致你必须做出一场相当长的努力,而通过使用被称为 kicksta 的无人值守安装工具则可以避免这样的麻烦。 + +无论是在数据中心还是实验室环境,Linux 服务器很少是独立的机器,很可能有时你需要安装多个以某种方式相互联系的机器。假如你将在单个服务器上手动安装 RHEL 7 所花的时间乘以你需要配置的机器数量,这将导致你必须做出一场相当长的努力,而通过使用被称为 kicksta 的无人值守安装工具则可以避免这样的麻烦。 在这篇文章中,我们将向你展示使用 kickstart 工具时所需的一切,以便在安装过程中,不用你时不时地照看“处在襁褓中”的服务器。 ![RHEL 7 的自动化 Kickstart 安装](http://www.tecmint.com/wp-content/uploads/2015/05/Automatic-Kickstart-Installation-of-RHEL-7.jpg) -RHCSA: RHEL 7 的自动化 Kickstart 安装 +*RHCSA: RHEL 7 的自动化 Kickstart 安装* #### Kickstart 和自动化安装简介 #### -Kickstart 是一种被用来执行无人值守操作系统安装和配置的自动化安装方法,主要被 RHEL(和其他 Fedora 的副产品,如 CentOS,Oracle Linux 等)所使用。因此,kickstart 安装方法可使得系统管理员只需考虑需要安装的软件包组和系统的配置,便可以得到相同的系统,从而省去必须手动安装这些软件包的麻烦。 +Kickstart 是一种被用来执行无人值守操作系统安装和配置的自动化安装方法,主要被 RHEL(以及其他 Fedora 的副产品,如 CentOS,Oracle Linux 等)所使用。因此,kickstart 安装方法可使得系统管理员只需考虑需要安装的软件包组和系统的配置,便可以得到相同的系统,从而省去必须手动安装这些软件包的麻烦。 -### 准备一次 Kickstart 安装 ### +### 准备 Kickstart 安装 ### -要执行一次 kickstart 安装,我们需要遵循下面的这些步骤: +要执行 kickstart 安装,我们需要遵循下面的这些步骤: 1. 创建一个 Kickstart 文件,它是一个带有多个预定义配置选项的纯文本文件。 -2. 使得 Kickstart 文件在可移动介质上可得,如一个硬盘或一个网络位置。客户端将使用 `rhel-server-7.0-x86_64-boot.iso` 镜像文件,而你还需要使得完全的 ISO 镜像(`rhel-server-7.0-x86_64-dvd.iso`)可从一个网络资源上获取得到,例如通过一个 FTP 服务器的 HTTP(在我们当前的例子中,我们将使用另一个 IP 地址为 192.168.0.18 的 RHEL 7 机子)。 +2. 将 Kickstart 文件保存在可移动介质上,如一个硬盘或一个网络位置。kickstart 客户端需要使用 `rhel-server-7.0-x86_64-boot.iso` 镜像文件,而你还需要可从一个网络资源上获取得到完整的 ISO 镜像 `rhel-server-7.0-x86_64-dvd.iso` ,例如通过一个 FTP 服务器的 HTTP 服务形式(在我们当前的例子中,我们将使用另一个 IP 地址为 192.168.0.18 的 RHEL 7 机器)。 3. 开始 Kickstart 安装。 -为创建一个 kickstart 文件,请登陆你的红帽客户门户网站帐户,并使用 [Kickstart 配置工具][1] 来选择所需的安装选项。在向下滑动之前请仔细阅读每个选项,然后选择最适合你需求的选项: +要创建一个 kickstart 文件,请登录你的红帽客户门户网站(Red Hat Customer Portal)帐户,并使用 [Kickstart 配置工具][1] 来选择所需的安装选项。在向下滑动之前请仔细阅读每个选项,然后选择最适合你需求的选项: ![Kickstart 配置工具](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-Configuration-Tool.png) -Kickstart 配置工具 +*Kickstart 配置工具* 假如你指定安装将通过 HTTP,FTP,NFS 来执行,请确保服务器上的防火墙允许这些服务通过。 @@ -59,13 +60,13 @@ Kickstart 配置工具 url --url=http://192.168.0.18//kickstart/media -这个目录是你解压 DVD 或 ISO 安装介质的地方。在执行解压之前,我们将把 ISO 安装文件作为一个回环设备挂载到 /media/rhel 目录下: +这个目录是你展开 DVD 或 ISO 安装介质内容的地方。在执行解压之前,我们将把 ISO 安装文件作为一个回环设备挂载到 /media/rhel 目录下: # mount -o loop /var/www/html/kickstart/rhel-server-7.0-x86_64-dvd.iso /media/rhel ![挂载 RHEL ISO 镜像](http://www.tecmint.com/wp-content/uploads/2015/05/Mount-RHEL-ISO-Image.png) -挂载 RHEL ISO 镜像 +*挂载 RHEL ISO 镜像* 接下来,复制 /media/rhel 中的全部文件到 /var/www/html/kickstart/media 目录: @@ -75,11 +76,11 @@ Kickstart 配置工具 ![Kickstart 媒体文件](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-media-Files.png) -Kickstart 媒体文件 +*Kickstart 媒体文件* 现在,我们已经准备好开始 kickstart 安装了。 -不管你如何选择创建 kickstart 文件的方式,在执行安装之前检查这个文件的语法总是一个不错的主意。为此,我们需要安装 pykickstart 软件包。 +不管你如何选择创建 kickstart 文件的方式,在执行安装之前检查下这个文件的语法是否有误总是一个不错的主意。为此,我们需要安装 pykickstart 软件包。 # yum update && yum install pykickstart @@ -89,7 +90,7 @@ Kickstart 媒体文件 假如文件中的语法正确,你将不会得到任何输出,反之,假如文件中存在错误,你得到警告,向你提示在某一行中语法不正确或出错原因未知。 -### 执行一次 Kickstart 安装 ### +### 执行 Kickstart 安装 ### 首先,使用 rhel-server-7.0-x86_64-boot.iso 来启动你的客户端。当初始屏幕出现时,选择安装 RHEL 7.0 ,然后按 Tab 键来追加下面这一句,接着按 Enter 键: @@ -97,31 +98,31 @@ Kickstart 媒体文件 ![RHEL Kickstart 安装](http://www.tecmint.com/wp-content/uploads/2015/05/RHEL-Kickstart-Installation.png) -RHEL Kickstart 安装 +*RHEL Kickstart 安装* 其中 tecmint.bin 是先前创建的 kickstart 文件。 -当你按了 Enter 键后,自动安装就开始了,且你将看到一个列有正在被安装的软件的列表(软件包的数目和名称根据你所选择的程序和软件包组而有所不同): +当你按了 Enter 键后,自动安装就开始了,且你将看到一个列有正在被安装的软件的列表(软件包的数目和名称根据你所选择的程序和软件包组而有所不同): ![RHEL 7 的自动化 Kickstart 安装](http://www.tecmint.com/wp-content/uploads/2015/05/Kickstart-Automatic-Installation.png) -RHEL 7 的自动化 Kickstart 安装 +*RHEL 7 的自动化 Kickstart 安装* 当自动化过程结束后,将提示你移除安装介质,接着你就可以启动到你新安装的系统中了: ![RHEL 7 启动屏幕](http://www.tecmint.com/wp-content/uploads/2015/05/RHEL-7.png) -RHEL 7 启动屏幕 +*RHEL 7 启动屏幕* 尽管你可以像我们前面提到的那样,手动地创建你的 kickstart 文件,但你应该尽可能地考虑使用受推荐的方式:你可以使用在线配置工具,或者使用在安装过程中创建的位于 root 家目录下的 anaconda-ks.cfg 文件。 -这个文件实际上就是一个 kickstart 文件,所以你或许想在选择好所有所需的选项(可能需要更改逻辑卷布局或机子上所用的文件系统)后手动地安装第一个机子,接着使用产生的 anaconda-ks.cfg 文件来自动完成其余机子的安装过程。 +这个文件实际上就是一个 kickstart 文件,你或许想在选择好所有所需的选项(可能需要更改逻辑卷布局或机器上所用的文件系统)后手动地安装第一个机器,接着使用产生的 anaconda-ks.cfg 文件来自动完成其余机器的安装过程。 -另外,使用在线配置工具或 anaconda-ks.cfg 文件来引导将来的安装将允许你使用一个加密的 root 密码来执行系统的安装。 +另外,使用在线配置工具或 anaconda-ks.cfg 文件来引导将来的安装将允许你在系统安装时以加密的形式设置 root 密码。 ### 总结 ### -既然你知道了如何创建 kickstart 文件并如何使用它们来自动完成 RHEL 7 服务器的安装,你就可以忘记时时照看安装进度的过程了。这将给你时间来做其他的事情,或者若你足够幸运,你还可以用来休闲一番。 +既然你知道了如何创建 kickstart 文件并如何使用它们来自动完成 RHEL 7 服务器的安装,你就可以不用时时照看安装进度的过程了。这将给你时间来做其他的事情,或者若你足够幸运,你还可以用来休闲一番。 无论以何种方式,请使用下面的评论栏来让我们知晓你对这篇文章的看法。提问也同样欢迎! @@ -133,7 +134,7 @@ via: http://www.tecmint.com/automatic-rhel-installations-using-kickstart/ 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 5a09959df246e3aa3c5596c6c8a97801c59acbc9 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 2 Oct 2015 00:27:12 +0800 Subject: [PATCH 2192/2517] RHCSA Series --- ...t 01--Reviewing Essential Commands and System Documentation.md | 0 ...ries--Part 02--How to Perform File and Directory Management.md | 0 ...A Series--Part 03--How to Manage Users and Groups in RHEL 7.md | 0 ...s with Nano and Vim or Analyzing text with grep and regexps.md | 0 ...nagement in RHEL 7--Boot Shutdown and Everything in Between.md | 0 ... 'Parted' and 'SSM' to Configure and Encrypt System Storage.md | 0 ...CLs (Access Control Lists) and Mounting Samba or NFS Shares.md | 0 ...ecuring SSH, Setting Hostname and Enabling Network Services.md | 0 ...--Installing, Configuring and Securing a Web and FTP Server.md | 0 ...ment, Automating Tasks with Cron and Monitoring System Logs.md | 0 ...ls and Network Traffic Control Using FirewallD and Iptables.md | 0 ...s--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md | 0 12 files changed, 0 insertions(+), 0 deletions(-) rename published/{201509 => RHCSA Series}/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md (100%) rename published/{201509 => RHCSA Series}/RHCSA Series--Part 02--How to Perform File and Directory Management.md (100%) rename published/{201509 => RHCSA Series}/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md (100%) rename published/{201509 => RHCSA Series}/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md (100%) rename published/{201509 => RHCSA Series}/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md (100%) rename published/{201509 => RHCSA Series}/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md (100%) rename published/{201509 => RHCSA Series}/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md (100%) rename published/{201509 => RHCSA Series}/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md (100%) rename published/{201509 => RHCSA Series}/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md (100%) rename published/{201509 => RHCSA Series}/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md (100%) rename published/{201509 => RHCSA Series}/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md (100%) rename published/{ => RHCSA Series}/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md (100%) diff --git a/published/201509/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md b/published/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md similarity index 100% rename from published/201509/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md rename to published/RHCSA Series/RHCSA Series--Part 01--Reviewing Essential Commands and System Documentation.md diff --git a/published/201509/RHCSA Series--Part 02--How to Perform File and Directory Management.md b/published/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md similarity index 100% rename from published/201509/RHCSA Series--Part 02--How to Perform File and Directory Management.md rename to published/RHCSA Series/RHCSA Series--Part 02--How to Perform File and Directory Management.md diff --git a/published/201509/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md b/published/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md similarity index 100% rename from published/201509/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md rename to published/RHCSA Series/RHCSA Series--Part 03--How to Manage Users and Groups in RHEL 7.md diff --git a/published/201509/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md b/published/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md similarity index 100% rename from published/201509/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md rename to published/RHCSA Series/RHCSA Series--Part 04--Editing Text Files with Nano and Vim or Analyzing text with grep and regexps.md diff --git a/published/201509/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md b/published/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md similarity index 100% rename from published/201509/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md rename to published/RHCSA Series/RHCSA Series--Part 05--Process Management in RHEL 7--Boot Shutdown and Everything in Between.md diff --git a/published/201509/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md b/published/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md similarity index 100% rename from published/201509/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md rename to published/RHCSA Series/RHCSA Series--Part 06--Using 'Parted' and 'SSM' to Configure and Encrypt System Storage.md diff --git a/published/201509/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md b/published/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md similarity index 100% rename from published/201509/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md rename to published/RHCSA Series/RHCSA Series--Part 07--Using ACLs (Access Control Lists) and Mounting Samba or NFS Shares.md diff --git a/published/201509/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md b/published/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md similarity index 100% rename from published/201509/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md rename to published/RHCSA Series/RHCSA Series--Part 08--Securing SSH, Setting Hostname and Enabling Network Services.md diff --git a/published/201509/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md b/published/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md similarity index 100% rename from published/201509/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md rename to published/RHCSA Series/RHCSA Series--Part 09--Installing, Configuring and Securing a Web and FTP Server.md diff --git a/published/201509/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md b/published/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md similarity index 100% rename from published/201509/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md rename to published/RHCSA Series/RHCSA Series--Part 10--Yum Package Management, Automating Tasks with Cron and Monitoring System Logs.md diff --git a/published/201509/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md b/published/RHCSA Series/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md similarity index 100% rename from published/201509/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md rename to published/RHCSA Series/RHCSA Series--Part 11--Firewall Essentials and Network Traffic Control Using FirewallD and Iptables.md diff --git a/published/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md b/published/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md similarity index 100% rename from published/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md rename to published/RHCSA Series/RHCSA Series--Part 12--Automate RHEL 7 Installations Using 'Kickstart'.md From 75d64b9116f548f8359cd8884605d0d8a4045def Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Fri, 2 Oct 2015 21:41:22 +0800 Subject: [PATCH 2193/2517] [Translated]RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md --- ... Up LDAP-based Authentication in RHEL 7.md | 277 ------------------ ... Up LDAP-based Authentication in RHEL 7.md | 275 +++++++++++++++++ 2 files changed, 275 insertions(+), 277 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md create mode 100644 translated/tech/RHCSA/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md b/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md deleted file mode 100644 index e3425f5164..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md +++ /dev/null @@ -1,277 +0,0 @@ -FSSlc translating - -RHCSA Series: Setting Up LDAP-based Authentication in RHEL 7 – Part 14 -================================================================================ -We will begin this article by outlining some LDAP basics (what it is, where it is used and why) and show how to set up a LDAP server and configure a client to authenticate against it using Red Hat Enterprise Linux 7 systems. - -![Setup LDAP Server and Client Authentication](http://www.tecmint.com/wp-content/uploads/2015/06/setup-ldap-server-and-configure-client-authentication.png) - -RHCSA Series: Setup LDAP Server and Client Authentication – Part 14 - -As we will see, there are several other possible application scenarios, but in this guide we will focus entirely on LDAP-based authentication. In addition, please keep in mind that due to the vastness of the subject, we will only cover its basics here, but you can refer to the documentation outlined in the summary for more in-depth details. - -For the same reason, you will note that I have decided to leave out several references to man pages of LDAP tools for the sake of brevity, but the corresponding explanations are at a fingertip’s distance (man ldapadd, for example). - -That said, let’s get started. - -**Our Testing Environment** - -Our test environment consists of two RHEL 7 boxes: - - Server: 192.168.0.18. FQDN: rhel7.mydomain.com - Client: 192.168.0.20. FQDN: ldapclient.mydomain.com - -If you want, you can use the machine installed in [Part 12: Automate RHEL 7 installations][1] using Kickstart as client. - -#### What is LDAP? #### - -LDAP stands for Lightweight Directory Access Protocol and consists in a set of protocols that allows a client to access, over a network, centrally stored information (such as a directory of login shells, absolute paths to home directories, and other typical system user information, for example) that should be accessible from different places or available to a large number of end users (another example would be a directory of home addresses and phone numbers of all employees in a company). - -Keeping such (and more) information centrally means it can be more easily maintained and accessed by everyone who has been granted permissions to use it. - -The following diagram offers a simplified diagram of LDAP, and is described below in greater detail: - -![LDAP Diagram](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Diagram.png) - -LDAP Diagram - -Explanation of above diagram in detail. - -- An entry in a LDAP directory represents a single unit or information and is uniquely identified by what is called a Distinguished Name. -- An attribute is a piece of information associated with an entry (for example, addresses, available contact phone numbers, and email addresses). -- Each attribute is assigned one or more values consisting in a space-separated list. A value that is unique per entry is called a Relative Distinguished Name. - -That being said, let’s proceed with the server and client installations. - -### Installing and Configuring a LDAP Server and Client ### - -In RHEL 7, LDAP is implemented by OpenLDAP. To install the server and client, use the following commands, respectively: - - # yum update && yum install openldap openldap-clients openldap-servers - # yum update && yum install openldap openldap-clients nss-pam-ldapd - -Once the installation is complete, there are some things we look at. The following steps should be performed on the server alone, unless explicitly noted: - -**1. Make sure SELinux does not get in the way by enabling the following booleans persistently, both on the server and the client:** - - # setsebool -P allow_ypbind=0 authlogin_nsswitch_use_ldap=0 - -Where allow_ypbind is required for LDAP-based authentication, and authlogin_nsswitch_use_ldap may be needed by some applications. - -**2. Enable and start the service:** - - # systemctl enable slapd.service - # systemctl start slapd.service - -Keep in mind that you can also disable, restart, or stop the service with [systemctl][2] as well: - - # systemctl disable slapd.service - # systemctl restart slapd.service - # systemctl stop slapd.service - -**3. Since the slapd service runs as the ldap user (which you can verify with ps -e -o pid,uname,comm | grep slapd), such user should own the /var/lib/ldap directory in order for the server to be able to modify entries created by administrative tools that can only be run as root (more on this in a minute).** - -Before changing the ownership of this directory recursively, copy the sample database configuration file for slapd into it: - - # cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG - # chown -R ldap:ldap /var/lib/ldap - -**4. Set up an OpenLDAP administrative user and assign a password:** - - # slappasswd - -as shown in the next image: - -![Set LDAP Admin Password](http://www.tecmint.com/wp-content/uploads/2015/06/Set-LDAP-Admin-Password.png) - -Set LDAP Admin Password - -and create an LDIF file (ldaprootpasswd.ldif) with the following contents: - - dn: olcDatabase={0}config,cn=config - changetype: modify - add: olcRootPW - olcRootPW: {SSHA}PASSWORD - -where: - -- PASSWORD is the hashed string obtained earlier. -- cn=config indicates global config options. -- olcDatabase indicates a specific database instance name and can be typically found inside /etc/openldap/slapd.d/cn=config. - -Referring to the theoretical background provided earlier, the `ldaprootpasswd.ldif` file will add an entry to the LDAP directory. In that entry, each line represents an attribute: value pair (where dn, changetype, add, and olcRootPW are the attributes and the strings to the right of each colon are their corresponding values). - -You may want to keep this in mind as we proceed further, and please note that we are using the same Common Names `(cn=)` throughout the rest of this article, where each step depends on the previous one. - -**5. Now, add the corresponding LDAP entry by specifying the URI referring to the ldap server, where only the protocol/host/port fields are allowed.** - - # ldapadd -H ldapi:/// -f ldaprootpasswd.ldif - -The output should be similar to: - -![LDAP Configuration](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Configuration.png) - -LDAP Configuration - -and import some basic LDAP definitions from the `/etc/openldap/schema` directory: - - # for def in cosine.ldif nis.ldif inetorgperson.ldif; do ldapadd -H ldapi:/// -f /etc/openldap/schema/$def; done - -![LDAP Definitions](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Definitions.png) - -LDAP Definitions - -**6. Have LDAP use your domain in its database.** - -Create another LDIF file, which we will call `ldapdomain.ldif`, with the following contents, replacing your domain (in the Domain Component dc=) and password as appropriate: - - dn: olcDatabase={1}monitor,cn=config - changetype: modify - replace: olcAccess - olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" - read by dn.base="cn=Manager,dc=mydomain,dc=com" read by * none - - dn: olcDatabase={2}hdb,cn=config - changetype: modify - replace: olcSuffix - olcSuffix: dc=mydomain,dc=com - - dn: olcDatabase={2}hdb,cn=config - changetype: modify - replace: olcRootDN - olcRootDN: cn=Manager,dc=mydomain,dc=com - - dn: olcDatabase={2}hdb,cn=config - changetype: modify - add: olcRootPW - olcRootPW: {SSHA}PASSWORD - - dn: olcDatabase={2}hdb,cn=config - changetype: modify - add: olcAccess - olcAccess: {0}to attrs=userPassword,shadowLastChange by - dn="cn=Manager,dc=mydomain,dc=com" write by anonymous auth by self write by * none - olcAccess: {1}to dn.base="" by * read - olcAccess: {2}to * by dn="cn=Manager,dc=mydomain,dc=com" write by * read - -Then load it as follows: - - # ldapmodify -H ldapi:/// -f ldapdomain.ldif - -![LDAP Domain Configuration](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Domain-Configuration.png) - -LDAP Domain Configuration - -**7. Now it’s time to add some entries to our LDAP directory. Attributes and values are separated by a colon `(:)` in the following file, which we’ll name `baseldapdomain.ldif`:** - - dn: dc=mydomain,dc=com - objectClass: top - objectClass: dcObject - objectclass: organization - o: mydomain com - dc: mydomain - - dn: cn=Manager,dc=mydomain,dc=com - objectClass: organizationalRole - cn: Manager - description: Directory Manager - - dn: ou=People,dc=mydomain,dc=com - objectClass: organizationalUnit - ou: People - - dn: ou=Group,dc=mydomain,dc=com - objectClass: organizationalUnit - ou: Group - -Add the entries to the LDAP directory: - - # ldapadd -x -D cn=Manager,dc=mydomain,dc=com -W -f baseldapdomain.ldif - -![Add LDAP Domain Attributes and Values](http://www.tecmint.com/wp-content/uploads/2015/06/Add-LDAP-Domain-Configuration.png) - -Add LDAP Domain Attributes and Values - -**8. Create a LDAP user called ldapuser (adduser ldapuser), then create the definitions for a LDAP group in `ldapgroup.ldif`.** - - # adduser ldapuser - # vi ldapgroup.ldif - -Add following content. - - dn: cn=Manager,ou=Group,dc=mydomain,dc=com - objectClass: top - objectClass: posixGroup - gidNumber: 1004 - -where gidNumber is the GID in /etc/group for ldapuser) and load it: - - # ldapadd -x -W -D "cn=Manager,dc=mydomain,dc=com" -f ldapgroup.ldif - -**9. Add a LDIF file with the definitions for user ldapuser (`ldapuser.ldif`):** - - dn: uid=ldapuser,ou=People,dc=mydomain,dc=com - objectClass: top - objectClass: account - objectClass: posixAccount - objectClass: shadowAccount - cn: ldapuser - uid: ldapuser - uidNumber: 1004 - gidNumber: 1004 - homeDirectory: /home/ldapuser - userPassword: {SSHA}fiN0YqzbDuDI0Fpqq9UudWmjZQY28S3M - loginShell: /bin/bash - gecos: ldapuser - shadowLastChange: 0 - shadowMax: 0 - shadowWarning: 0 - -and load it: - - # ldapadd -x -D cn=Manager,dc=mydomain,dc=com -W -f ldapuser.ldif - -![LDAP User Configuration](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-User-Configuration.png) - -LDAP User Configuration - -Likewise, you can delete the user entry you just created: - - # ldapdelete -x -W -D cn=Manager,dc=mydomain,dc=com "uid=ldapuser,ou=People,dc=mydomain,dc=com" - -**10. Allow communication through the firewall:** - - # firewall-cmd --add-service=ldap - -**11. Last, but not least, enable the client to authenticate using LDAP.** - -To help us in this final step, we will use the authconfig utility (an interface for configuring system authentication resources). - -Using the following command, the home directory for the requested user is created if it doesn’t exist after the authentication against the LDAP server succeeds: - - # authconfig --enableldap --enableldapauth --ldapserver=rhel7.mydomain.com --ldapbasedn="dc=mydomain,dc=com" --enablemkhomedir --update - -![LDAP Client Configuration](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Client-Configuration.png) - -LDAP Client Configuration - -### Summary ### - -In this article we have explained how to set up basic authentication against a LDAP server. To further configure the setup described in the present guide, please refer to [Chapter 13 – LDAP Configuration][3] in the RHEL 7 System administrator’s guide, paying special attention to the security settings using TLS. - -Feel free to leave any questions you may have using the comment form below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/setup-ldap-server-and-configure-client-authentication/ - -作者:[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/automatic-rhel-installations-using-kickstart/ -[2]:http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ -[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Directory_Servers.html diff --git a/translated/tech/RHCSA/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md b/translated/tech/RHCSA/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md new file mode 100644 index 0000000000..9aba04d2cb --- /dev/null +++ b/translated/tech/RHCSA/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md @@ -0,0 +1,275 @@ +RHCSA 系列: 在 RHEL 7 中设置基于 LDAP 的认证 – Part 14 +================================================================================ +在这篇文章中,我们将首先罗列一些 LDAP 的基础知识(它是什么,它被用于何处以及为什么会被这样使用),然后向你展示如何使用 RHEL 7 系统来设置一个 LDAP 服务器以及配置一个客户端来使用它达到认证的目的。 + +![设置 LDAP 服务器及客户端认证](http://www.tecmint.com/wp-content/uploads/2015/06/setup-ldap-server-and-configure-client-authentication.png) + +RHCSA 系列:设置 LDAP 服务器及客户端认证 – Part 14 + +正如你将看到的那样,关于认证,还存在其他可能的应用场景,但在这篇指南中,我们将只关注基于 LDAP 的认证。另外,请记住,由于这个话题的广泛性,在这里我们将只涵盖它的基础知识,但你可以参考位于总结部分中列出的文档,以此来了解更加深入的细节。 + +基于相同的原因,你将注意到:为了简洁起见,我已经决定省略了几个位于 man 页中 LDAP 工具的参考,但相应命令的解释是近在咫尺的(例如,输入 man ldapadd)。 + +那还是让我们开始吧。 + +**我们的测试环境** + +我们的测试环境包含两台 RHEL 7 机子: + + Server: 192.168.0.18. FQDN: rhel7.mydomain.com + Client: 192.168.0.20. FQDN: ldapclient.mydomain.com + +如若你想,你可以使用在 [Part 12: RHEL 7 的自动化安装][1] 中使用 Kickstart 安装的机子来作为客户端。 + +#### LDAP 是什么? #### + +LDAP 代表轻量级目录访问协议(Lightweight Directory Access Protocol),并包含在一系列协议之中,这些协议允许一个客户端通过网络去获取集中存储的信息(例如登陆 shell 的目录,家目录的绝对路径,或者其他典型的系统用户信息),而这些信息可以从不同的地方访问到或被很多终端用户获取到(另一个例子是含有某个公司所有雇员的家庭地址和电话号码的目录)。 + +对于那些被赋予了权限可以使用这些信息的人来说,将这些信息进行集中管理意味着可以更容易地维护和获取。 + +下面的图表提供了一个简化了的关于 LDAP 的示意图,且在下面将会进行更多的描述: + +![LDAP 示意图](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Diagram.png) + +LDAP 示意图 + +下面是对上面示意图的一个详细解释。 + +- 在一个 LDAP 目录中,一个条目代表一个独立单元或信息,被所谓的 Distinguished Name 唯一识别。 +- 一个属性是一些与某个条目相关的信息(例如地址,有效的联系电话号码和邮箱地址)。 +- 每个属性被分配有一个或多个值,这些值被包含在一个以空格为分隔符的列表中。每个条目中那个唯一的值被称为一个 Relative Distinguished Name。 + +接下来,就让我们进入到有关服务器和客户端安装的内容。 + +### 安装和配置一个 LDAP 服务器和客户端 ### + +在 RHEL 7 中, LDAP 由 OpenLDAP 实现。为了安装服务器和客户端,分别使用下面的命令: + + # yum update && yum install openldap openldap-clients openldap-servers + # yum update && yum install openldap openldap-clients nss-pam-ldapd + +一旦安装完成,我们还需要关注一些事情。除非显示地提示,下面的步骤都只在服务器上执行: + +**1. 在服务器和客户端上,为了确保 SELinux 不会妨碍挡道,长久地开启下列的布尔值:** + + # setsebool -P allow_ypbind=0 authlogin_nsswitch_use_ldap=0 + +其中 `allow_ypbind` 为基于 LDAP 的认证所需要,而 `authlogin_nsswitch_use_ldap`则可能会被某些应用所需要。 + +**2. 开启并启动服务:** + + # systemctl enable slapd.service + # systemctl start slapd.service + +记住你也可以使用 [systemctl][2] 来禁用,重启或停止服务: + + # systemctl disable slapd.service + # systemctl restart slapd.service + # systemctl stop slapd.service + +**3. 由于 slapd 服务是由 ldap 用户来运行的(你可以使用 `ps -e -o pid,uname,comm | grep slapd` 来验证),为了使得服务器能够更改由管理工具创建的条目,这个用户应该有目录 `/var/lib/ldap` 的所有权,而这些管理工具仅可以由 root 用户来运行(紧接着有更多这方面的内容)。** + +在递归地更改这个目录的所有权之前,将 slapd 的示例数据库配置文件复制进这个目录: + + # cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG + # chown -R ldap:ldap /var/lib/ldap + +**4. 设置一个 OpenLDAP 管理用户并设置密码:** + + # slappasswd + +正如下一福图所展示的那样: + +![设置 LDAP 管理密码](http://www.tecmint.com/wp-content/uploads/2015/06/Set-LDAP-Admin-Password.png) + +设置 LDAP 管理密码 + +然后以下面的内容创建一个 LDIF 文件(`ldaprootpasswd.ldif`): + + dn: olcDatabase={0}config,cn=config + changetype: modify + add: olcRootPW + olcRootPW: {SSHA}PASSWORD + +其中: + +- PASSWORD 是先前得到的经过哈希处理的字符串。 +- cn=config 指的是全局配置选项。 +- olcDatabase 指的是一个特定的数据库实例的名称,并且通常可以在 `/etc/openldap/slapd.d/cn=config` 目录中发现。 + +根据上面提供的理论背景,`ldaprootpasswd.ldif` 文件将添加一个条目到 LDAP 目录中。在那个条目中,每一行代表一个属性键值对(其中 dn,changetype,add 和 olcRootPW 为属性,每个冒号右边的字符串为相应的键值)。 + +随着我们的进一步深入,请记住上面的这些,并注意到在这篇文章的余下部分,我们使用相同的 Common Names `(cn=)`,而这些余下的步骤中的每一步都将与其上一步相关。 + +**5. 现在,通过特别指定相对于 ldap 服务的 URI ,添加相应的 LDAP 条目,其中只有 protocol/host/port 这几个域被允许使用。** + + # ldapadd -H ldapi:/// -f ldaprootpasswd.ldif + +上面命令的输出应该与下面的图像相似: + +![LDAP 配置](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Configuration.png) + +LDAP 配置 + +接着从 `/etc/openldap/schema` 目录导入一个基本的 LDAP 定义: + + # for def in cosine.ldif nis.ldif inetorgperson.ldif; do ldapadd -H ldapi:/// -f /etc/openldap/schema/$def; done + +![LDAP 定义](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Definitions.png) + +LDAP 定义 + +**6. 让 LDAP 在它的数据库中使用你的域名。** + +以下面的内容创建另一个 LDIF 文件,我们称之为 `ldapdomain.ldif`, 然后酌情替换这个文件中的域名(在域名分量 dc=) 和密码: + + dn: olcDatabase={1}monitor,cn=config + changetype: modify + replace: olcAccess + olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" + read by dn.base="cn=Manager,dc=mydomain,dc=com" read by * none + + dn: olcDatabase={2}hdb,cn=config + changetype: modify + replace: olcSuffix + olcSuffix: dc=mydomain,dc=com + + dn: olcDatabase={2}hdb,cn=config + changetype: modify + replace: olcRootDN + olcRootDN: cn=Manager,dc=mydomain,dc=com + + dn: olcDatabase={2}hdb,cn=config + changetype: modify + add: olcRootPW + olcRootPW: {SSHA}PASSWORD + + dn: olcDatabase={2}hdb,cn=config + changetype: modify + add: olcAccess + olcAccess: {0}to attrs=userPassword,shadowLastChange by + dn="cn=Manager,dc=mydomain,dc=com" write by anonymous auth by self write by * none + olcAccess: {1}to dn.base="" by * read + olcAccess: {2}to * by dn="cn=Manager,dc=mydomain,dc=com" write by * read + +接着使用下面的命令来加载: + + # ldapmodify -H ldapi:/// -f ldapdomain.ldif + +![LDAP 域名配置](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Domain-Configuration.png) + +LDAP 域名配置 + +**7. 现在,该是添加一些条目到我们的 LDAP 目录的时候了。在下面的文件中,属性和键值由一个冒号`(:)` 所分隔,这个文件我们将命名为 `baseldapdomain.ldif`:** + + dn: dc=mydomain,dc=com + objectClass: top + objectClass: dcObject + objectclass: organization + o: mydomain com + dc: mydomain + + dn: cn=Manager,dc=mydomain,dc=com + objectClass: organizationalRole + cn: Manager + description: Directory Manager + + dn: ou=People,dc=mydomain,dc=com + objectClass: organizationalUnit + ou: People + + dn: ou=Group,dc=mydomain,dc=com + objectClass: organizationalUnit + ou: Group + +添加条目到 LDAP 目录中: + + # ldapadd -x -D cn=Manager,dc=mydomain,dc=com -W -f baseldapdomain.ldif + +![添加 LDAP 域名,属性和键值](http://www.tecmint.com/wp-content/uploads/2015/06/Add-LDAP-Domain-Configuration.png) + +添加 LDAP 域名,属性和键值 + +**8. 创建一个名为 ldapuser 的 LDAP 用户(`adduser ldapuser`),然后在`ldapgroup.ldif` 中为一个 LDAP 组创建定义。** + + # adduser ldapuser + # vi ldapgroup.ldif + +添加下面的内容: + + dn: cn=Manager,ou=Group,dc=mydomain,dc=com + objectClass: top + objectClass: posixGroup + gidNumber: 1004 + +其中 gidNumber 是 ldapuser 在 `/etc/group` 中的 GID,然后加载这个文件: + + # ldapadd -x -W -D "cn=Manager,dc=mydomain,dc=com" -f ldapgroup.ldif + +**9. 为用户 ldapuser 添加一个带有定义的 LDIF 文件(`ldapuser.ldif`):** + + dn: uid=ldapuser,ou=People,dc=mydomain,dc=com + objectClass: top + objectClass: account + objectClass: posixAccount + objectClass: shadowAccount + cn: ldapuser + uid: ldapuser + uidNumber: 1004 + gidNumber: 1004 + homeDirectory: /home/ldapuser + userPassword: {SSHA}fiN0YqzbDuDI0Fpqq9UudWmjZQY28S3M + loginShell: /bin/bash + gecos: ldapuser + shadowLastChange: 0 + shadowMax: 0 + shadowWarning: 0 + +并加载它: + + # ldapadd -x -D cn=Manager,dc=mydomain,dc=com -W -f ldapuser.ldif + +![LDAP 用户配置](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-User-Configuration.png) + +LDAP 用户配置 + +相似地,你可以删除你刚刚创建的用户条目: + + # ldapdelete -x -W -D cn=Manager,dc=mydomain,dc=com "uid=ldapuser,ou=People,dc=mydomain,dc=com" + +**10. 允许有关 ldap 的通信通过防火墙:** + + # firewall-cmd --add-service=ldap + +**11. 最后,但并非最不重要的是使用 LDAP 开启客户端的认证。** + +为了在最后一步中对我们有所帮助,我们将使用 authconfig 工具(一个配置系统认证资源的界面)。 + +使用下面的命令,在通过 LDAP 服务器认证成功后,假如请求的用户的家目录不存在,则将会被创建: + + # authconfig --enableldap --enableldapauth --ldapserver=rhel7.mydomain.com --ldapbasedn="dc=mydomain,dc=com" --enablemkhomedir --update + +![LDAP 客户端认证](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Client-Configuration.png) + +LDAP 客户端认证 + +### 总结 ### + +在这篇文章中,我们已经解释了如何利用一个 LDAP 服务器来设置基本的认证。若想对当前这个指南里描述的设置进行更深入的配置,请参考位于 RHEL 系统管理员指南里的 [第 13 章 – LDAP 的配置][3],并特别注意使用 TLS 来进行安全设定。 + +请随意使用下面的评论框来留下你的提问。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/setup-ldap-server-and-configure-client-authentication/ + +作者:[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/automatic-rhel-installations-using-kickstart/ +[2]:http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ +[3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Directory_Servers.html From 917c08053985003e656d67a77cb8788efe10df48 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 3 Oct 2015 00:11:17 +0800 Subject: [PATCH 2194/2517] PUB:RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7 @FSSlc --- ...ntrol Essentials with SELinux in RHEL 7.md | 76 ++++++++++--------- 1 file changed, 39 insertions(+), 37 deletions(-) rename {translated/tech/RHCSA => published/RHCSA Series}/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md (52%) diff --git a/translated/tech/RHCSA/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md b/published/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md similarity index 52% rename from translated/tech/RHCSA/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md rename to published/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md index 4afbc105b7..8e77f8495e 100644 --- a/translated/tech/RHCSA/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md +++ b/published/RHCSA Series/RHCSA Series--Part 13--Mandatory Access Control Essentials with SELinux in RHEL 7.md @@ -1,28 +1,29 @@ -RHCSA 系列: 在 RHEL 7 中使用 SELinux 进行强制访问控制 – Part 13 +RHCSA 系列(十三): 在 RHEL 7 中使用 SELinux 进行强制访问控制 ================================================================================ -在本系列的前面几篇文章中,我们已经详细地探索了至少两种访问控制方法:标准的 ugo/rwx 权限([管理用户和组 – Part 3][1]) 和访问控制列表([在文件系统中配置 ACL – Part 7][2])。 + +在本系列的前面几篇文章中,我们已经详细地探索了至少两种访问控制方法:标准的 ugo/rwx 权限([RHCSA 系列(三): 如何管理 RHEL7 的用户和组][1]) 和访问控制列表([RHCSA 系列(七): 使用 ACL(访问控制列表) 和挂载 Samba/NFS 共享][2])。 ![RHCSA 认证:SELinux 精要和控制文件系统的访问](http://www.tecmint.com/wp-content/uploads/2015/06/SELinux-Control-File-System-Access.png) -RHCSA 认证:SELinux 精要和控制文件系统的访问 +*RHCSA 认证:SELinux 精要和控制文件系统的访问* -尽管作为第一级别的权限和访问控制机制是必要的,但它们同样有一些局限,而这些局限则可以由安全增强 Linux(Security Enhanced Linux,简称为 SELinux) 来处理。 +尽管作为第一级别的权限和访问控制机制是必要的,但它们同样有一些局限,而这些局限则可以由安全增强 Linux(Security Enhanced Linux,简称为 SELinux) 来处理。 -这些局限的一种情形是:某个用户可能通过一个未加详细阐述的 chmod 命令将一个文件或目录暴露在安全漏洞面前(注:这句我的翻译有点问题),从而引起访问权限的意外传播。结果,由该用户开启的任意进程可以对属于该用户的文件进行任意的操作,最终一个恶意的或受损的软件对整个系统可能会实现 root 级别的访问权限。 +这些局限的一种情形是:某个用户可能通过一个泛泛的 chmod 命令将文件或目录暴露出现了安全违例,从而引起访问权限的意外传播。结果,由该用户开启的任意进程可以对属于该用户的文件进行任意的操作,最终一个恶意的或有其它缺陷的软件可能会取得整个系统的 root 级别的访问权限。 -考虑到这些局限性,美国国家安全局(NSA) 率先设计出了 SELinux,一种强制的访问控制方法,它根据最小权限模型去限制进程在系统对象(如文件,目录,网络接口等)上的访问或执行其他的操作的能力,而这些限制可以在后面根据需要进行修改。简单来说,系统的每一个元素只给某个功能所需要的那些权限。 +考虑到这些局限性,美国国家安全局(NSA) 率先设计出了 SELinux,一种强制的访问控制方法,它根据最小权限模型去限制进程在系统对象(如文件,目录,网络接口等)上的访问或执行其他的操作的能力,而这些限制可以在之后根据需要进行修改。简单来说,系统的每一个元素只给某个功能所需要的那些权限。 -在 RHEL 7 中,SELinux 被并入了内核中,且默认情况下以强制模式开启。在这篇文章中,我们将简要地介绍有关 SELinux 及其相关操作的基本概念。 +在 RHEL 7 中,SELinux 被并入了内核中,且默认情况下以强制模式(Enforcing)开启。在这篇文章中,我们将简要地介绍有关 SELinux 及其相关操作的基本概念。 ### SELinux 的模式 ### SELinux 可以以三种不同的模式运行: -- 强制模式:SELinux 根据 SELinux 策略规则拒绝访问,这些规则是用以控制安全引擎的一系列准则; -- 宽容模式:SELinux 不拒绝访问,但对于那些运行在强制模式下会被拒绝访问的行为,它会进行记录; -- 关闭 (不言自明,即 SELinux 没有实际运行). +- 强制模式(Enforcing):SELinux 基于其策略规则来拒绝访问,这些规则是用以控制安全引擎的一系列准则; +- 宽容模式(Permissive):SELinux 不会拒绝访问,但对于那些如果运行在强制模式下会被拒绝访问的行为进行记录; +- 关闭(Disabled) (不言自明,即 SELinux 没有实际运行). -使用 `getenforce` 命令可以展示 SELinux 当前所处的模式,而 `setenforce` 命令(后面跟上一个 1 或 0) 则被用来将当前模式切换到强制模式或宽容模式,但只对当前的会话有效。 +使用 `getenforce` 命令可以展示 SELinux 当前所处的模式,而 `setenforce` 命令(后面跟上一个 1 或 0) 则被用来将当前模式切换到强制模式(Enforcing)或宽容模式(Permissive),但只对当前的会话有效。 为了使得在登出和重启后上面的设置还能保持作用,你需要编辑 `/etc/selinux/config` 文件并将 SELINUX 变量的值设为 enforcing,permissive,disabled 中之一: @@ -35,15 +36,15 @@ SELinux 可以以三种不同的模式运行: ![设置 SELinux 模式](http://www.tecmint.com/wp-content/uploads/2015/05/Set-SELinux-Mode.png) -设置 SELinux 模式 +*设置 SELinux 模式* -通常情况下,你将使用 `setenforce` 来在 SELinux 模式间进行切换(从强制模式到宽容模式,或反之),以此来作为你排错的第一步。假如 SELinux 当前被设置为强制模式,而你遇到了某些问题,但当你把 SELinux 切换为宽容模式后问题不再出现了,则你可以确信你遇到了一个 SELinux 权限方面的问题。 +通常情况下,你应该使用 `setenforce` 来在 SELinux 模式间进行切换(从强制模式到宽容模式,或反之),以此来作为你排错的第一步。假如 SELinux 当前被设置为强制模式,而你遇到了某些问题,但当你把 SELinux 切换为宽容模式后问题不再出现了,则你可以确信你遇到了一个 SELinux 权限方面的问题。 ### SELinux 上下文 ### -一个 SELinux 上下文由一个权限控制环境所组成,在这个环境中,决定的做出将基于 SELinux 的用户,角色和类型(和可选的级别): +一个 SELinux 上下文(Context)由一个访问控制环境所组成,在这个环境中,决定的做出将基于 SELinux 的用户,角色和类型(和可选的级别): -- 一个 SELinux 用户是通过将一个常规的 Linux 用户账户映射到一个 SELinux 用户账户来实现的,反过来,在一个会话中,这个 SELinux 用户账户在 SELinux 上下文中被进程所使用,为的是能够显示地定义它们所允许的角色和级别。 +- 一个 SELinux 用户是通过将一个常规的 Linux 用户账户映射到一个 SELinux 用户账户来实现的,反过来,在一个会话中,这个 SELinux 用户账户在 SELinux 上下文中被进程所使用,以便能够明确定义它们所允许的角色和级别。 - 角色的概念是作为域和处于该域中的 SELinux 用户之间的媒介,它定义了 SELinux 可以访问到哪个进程域和哪些文件类型。这将保护您的系统免受提权漏洞的攻击。 - 类型则定义了一个 SELinux 文件类型或一个 SELinux 进程域。在正常情况下,进程将会被禁止访问其他进程正使用的文件,并禁止对其他进程进行访问。这样只有当一个特定的 SELinux 策略规则允许它访问时,才能够进行访问。 @@ -51,7 +52,7 @@ SELinux 可以以三种不同的模式运行: **例 1:改变 sshd 守护进程的默认端口** -在[加固 SSH – Part 8][3] 中,我们解释了更改 sshd 所监听的默认端口是加固你的服务器免收外部攻击的首个安全措施。下面,就让我们编辑 `/etc/ssh/sshd_config` 文件并将端口设置为 9999: +在 [RHCSA 系列(八): 加固 SSH,设定主机名及启用网络服务][3] 中,我们解释了更改 sshd 所监听的默认端口是加固你的服务器免受外部攻击的首要安全措施。下面,就让我们编辑 `/etc/ssh/sshd_config` 文件并将端口设置为 9999: Port 9999 @@ -62,19 +63,19 @@ SELinux 可以以三种不同的模式运行: ![更改 SSH 的端口](http://www.tecmint.com/wp-content/uploads/2015/05/Change-SSH-Port.png) -重启 SSH 服务 +*重启 SSH 服务* 正如你看到的那样, sshd 启动失败,但为什么会这样呢? -快速检查 `/var/log/audit/audit.log` 文件会发现 sshd 已经被拒绝在端口 9999 上开启(SELinux 日志信息包含单词 "AVC",所以这类信息可以被轻易地与其他信息相区分),因为这个端口是 JBoss 管理服务的保留端口: +快速检查 `/var/log/audit/audit.log` 文件会发现 sshd 已经被拒绝在端口 9999 上开启(SELinux 的日志信息包含单词 "AVC",所以这类信息可以被轻易地与其他信息相区分),因为这个端口是 JBoss 管理服务的保留端口: # cat /var/log/audit/audit.log | grep AVC | tail -1 ![查看 SSH 日志](http://www.tecmint.com/wp-content/uploads/2015/05/Inspect-SSH-Logs.png) -查看 SSH 日志 +*查看 SSH 日志* -在这种情况下,你可以像先前解释的那样禁用 SELinux(但请不要这样做!),并尝试重启 sshd,且这种方法能够起效。但是, `semanage` 应用可以告诉我们在哪些端口上可以开启 sshd 而不会出现任何问题。 +在这种情况下,你可以像先前解释的那样禁用 SELinux(但请不要这样做!),并尝试重启 sshd,且这种方法能够起效。但是, `semanage` 应用可以告诉我们在哪些端口上可以开启 sshd 而不会出现任何问题。 运行: @@ -84,7 +85,7 @@ SELinux 可以以三种不同的模式运行: ![Semanage 工具](http://www.tecmint.com/wp-content/uploads/2015/05/SELinux-Permission.png) -Semanage 工具 +*Semanage 工具* 所以让我们在 `/etc/ssh/sshd_config` 中将端口更改为 9998 端口,增加这个端口到 ssh_port_t 的上下文,然后重启 sshd 服务: @@ -94,13 +95,13 @@ Semanage 工具 ![Semanage 添加端口](http://www.tecmint.com/wp-content/uploads/2015/05/Semenage-Add-Port.png) -Semanage 添加端口 +*semanage 添加端口* -如你所见,这次 sshd 服务被成功地开启了。这个例子告诉我们这个事实:SELinux 控制 TCP 端口数为它自己端口类型中间定义。 +如你所见,这次 sshd 服务被成功地开启了。这个例子告诉我们一个事实:SELinux 用它自己的端口类型的内部定义来控制 TCP 端口号。 **例 2:允许 httpd 访问 sendmail** -这是一个 SELinux 管理一个进程来访问另一个进程的例子。假如在你的 RHEL 7 服务器上,你要实现 Apache 的 mod_security 和 mod_evasive(注:这里少添加了一个链接,链接的地址是 http://www.tecmint.com/protect-apache-using-mod_security-and-mod_evasive-on-rhel-centos-fedora/),你需要允许 httpd 访问 sendmail,以便在遭受到 (D)DoS 攻击时能够用邮件来提醒你。在下面的命令中,如果你不想使得更改在重启后任然生效,请去掉 `-P` 选项。 +这是一个 SELinux 管理一个进程来访问另一个进程的例子。假如在你的 RHEL 7 服务器上,[你要为 Apache 配置 mod\_security 和 mod\_evasive][6],你需要允许 httpd 访问 sendmail,以便在遭受到 (D)DoS 攻击时能够用邮件来提醒你。在下面的命令中,如果你不想使得更改在重启后仍然生效,请去掉 `-P` 选项。 # semanage boolean -1 | grep httpd_can_sendmail # setsebool -P httpd_can_sendmail 1 @@ -108,13 +109,13 @@ Semanage 添加端口 ![允许 Apache 发送邮件](http://www.tecmint.com/wp-content/uploads/2015/05/Allow-Apache-to-Send-Mails.png) -允许 Apache 发送邮件 +*允许 Apache 发送邮件* -从上面的例子中,你可以知道 SELinux 布尔设定(或者只是布尔值)分别对应于 true 或 false,被嵌入到了 SELinux 策略中。你可以使用 `semanage boolean -l` 来列出所有的布尔值,也可以管道至 grep 命令以便筛选输出的结果。 +从上面的例子中,你可以知道 SELinux 布尔设定(或者只是布尔值)分别对应于 true 或 false,被嵌入到了 SELinux 策略中。你可以使用 `semanage boolean -l` 来列出所有的布尔值,也可以管道至 grep 命令以便筛选输出的结果。 -**例 3:在一个特定目录而非默认目录下服务一个静态站点** +**例 3:在一个特定目录而非默认目录下提供一个静态站点服务** -假设你正使用一个不同于默认目录(`/var/www/html`)的目录来服务一个静态站点,例如 `/websites` 目录(这种情形会出现在当你把你的网络文件存储在一个共享网络设备上,并需要将它挂载在 /websites 目录时)。 +假设你正使用一个不同于默认目录(`/var/www/html`)的目录来提供一个静态站点服务,例如 `/websites` 目录(这种情形会出现在当你把你的网络文件存储在一个共享网络设备上,并需要将它挂载在 /websites 目录时)。 a). 在 /websites 下创建一个 index.html 文件并包含如下的内容: @@ -130,14 +131,14 @@ a). 在 /websites 下创建一个 index.html 文件并包含如下的内容: ![检查 SELinux 文件的权限](http://www.tecmint.com/wp-content/uploads/2015/05/Check-File-Permssion.png) -检查 SELinux 文件的权限 +*检查 SELinux 文件的权限* b). 将 `/etc/httpd/conf/httpd.conf` 中的 DocumentRoot 改为 /websites,并不要忘了 -更新相应的 Directory 代码块。然后重启 Apache。 +更新相应的 Directory 块。然后重启 Apache。 -c). 浏览到 `http://`,则你应该会得到一个 503 Forbidden 的 HTTP 响应。 +c). 浏览 `http://`,则你应该会得到一个 503 Forbidden 的 HTTP 响应。 -d). 接下来,递归地改变 /websites 的标志,将它的标志变为 httpd_sys_content_t 类型,以便赋予 Apache 对这些目录和其内容的只读访问权限: +d). 接下来,递归地改变 /websites 的标志,将它的标志变为 `httpd_sys_content_t` 类型,以便赋予 Apache 对这些目录和其内容的只读访问权限: # semanage fcontext -a -t httpd_sys_content_t "/websites(/.*)?" @@ -149,7 +150,7 @@ e). 最后,应用在 d) 中创建的 SELinux 策略: ![确认 Apache 页面](http://www.tecmint.com/wp-content/uploads/2015/05/08part13.png) -确认 Apache 页面 +*确认 Apache 页面* ### 总结 ### @@ -165,13 +166,14 @@ via: http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者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/rhcsa-exam-manage-users-and-groups -[2]:http://www.tecmint.com/rhcsa-exam-configure-acls-and-mount-nfs-samba-shares/ -[3]:http://www.tecmint.com/rhcsa-series-secure-ssh-set-hostname-enable-network-services-in-rhel-7/ +[1]:https://linux.cn/article-6187-1.html +[2]:https://linux.cn/article-6263-1.html +[3]:https://linux.cn/article-6266-1.html [4]:https://www.nsa.gov/research/selinux/index.shtml [5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/SELinux_Users_and_Administrators_Guide/part_I-SELinux.html +[6]:https://linux.cn/article-5639-1.html From 98f2d70679f881520388838e7e60c68be7277e80 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 3 Oct 2015 10:00:29 +0800 Subject: [PATCH 2195/2517] [Translated] sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md --- ... (SMTP) using null-client Configuration.md | 153 ------------------ ... (SMTP) using null-client Configuration.md | 153 ++++++++++++++++++ 2 files changed, 153 insertions(+), 153 deletions(-) delete mode 100644 sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md create mode 100644 translated/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md diff --git a/sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md b/sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md deleted file mode 100644 index 77b508db66..0000000000 --- a/sources/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md +++ /dev/null @@ -1,153 +0,0 @@ -ictlyh Translating -How to Setup Postfix Mail Server (SMTP) using null-client Configuration – Part 9 -================================================================================ -Regardless of the many online communication methods that are available today, email remains a practical way to deliver messages from one end of the world to another, or to a person sitting in the office next to ours. - -The following image illustrates the process of email transport starting with the sender until the message reaches the recipient’s inbox: - -![How Mail Setup Works](http://www.tecmint.com/wp-content/uploads/2015/09/How-Mail-Setup-Works.png) - -How Mail Setup Works - -To make this possible, several things happen behind the scenes. In order for an email message to be delivered from a client application (such as [Thunderbird][1], Outlook, or webmail services such as Gmail or Yahoo! Mail) to a mail server, and from there to the destination server and finally to its intended recipient, a SMTP (Simple Mail Transfer Protocol) service must be in place in each server. - -That is the reason why in this article we will explain how to set up a SMTP server in RHEL 7 where emails sent by local users (even to other local users) are forwarded to a central mail server for easier access. - -In the exam’s requirements this is called a null-client setup. - -Our test environment will consist of an originating mail server and a central mail server or relayhost. - - Original Mail Server: (hostname: box1.mydomain.com / IP: 192.168.0.18) - Central Mail Server: (hostname: mail.mydomain.com / IP: 192.168.0.20) - -For name resolution we will use the well-known /etc/hosts file on both boxes: - - 192.168.0.18 box1.mydomain.com box1 - 192.168.0.20 mail.mydomain.com mail - -### Installing Postfix and Firewall / SELinux Considerations ### - -To begin, we will need to (in both servers): - -**1. Install Postfix:** - - # yum update && yum install postfix - -**2. Start the service and enable it to run on future reboots:** - - # systemctl start postfix - # systemctl enable postfix - -**3. Allow mail traffic through the firewall:** - - # firewall-cmd --permanent --add-service=smtp - # firewall-cmd --add-service=smtp - -![Open Mail Server Port in Firewall](http://www.tecmint.com/wp-content/uploads/2015/09/Allow-Traffic-through-Firewall.png) - -Open Mail Server SMTP Port in Firewall - -**4. Configure Postfix on box1.mydomain.com.** - -Postfix’s main configuration file is located in /etc/postfix/main.cf. This file itself is a great documentation source as the included comments explain the purpose of the program’s settings. - -For brevity, let’s display only the lines that need to be edited (yes, you need to leave mydestination blank in the originating server; otherwise the emails will be stored locally as opposed to in a central mail server which is what we actually want): - -**Configure Postfix on box1.mydomain.com** - ----------- - - myhostname = box1.mydomain.com - mydomain = mydomain.com - myorigin = $mydomain - inet_interfaces = loopback-only - mydestination = - relayhost = 192.168.0.20 - -**5. Configure Postfix on mail.mydomain.com.** - -**Configure Postfix on mail.mydomain.com** - ----------- - - myhostname = mail.mydomain.com - mydomain = mydomain.com - myorigin = $mydomain - inet_interfaces = all - mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain - mynetworks = 192.168.0.0/24, 127.0.0.0/8 - -And set the related SELinux boolean to true permanently if not already done: - - # setsebool -P allow_postfix_local_write_mail_spool on - -![Set Postfix SELinux Permission](http://www.tecmint.com/wp-content/uploads/2015/09/Set-Postfix-SELinux-Permission.png) - -Set Postfix SELinux Permission - -The above SELinux boolean will allow Postfix to write to the mail spool in the central server. - -**6. Restart the service on both servers for the changes to take effect:** - - # systemctl restart postfix - -If Postfix does not start correctly, you can use following commands to troubleshoot. - - # systemctl –l status postfix - # journalctl –xn - # postconf –n - -### Testing the Postfix Mail Servers ### - -To test the mail servers, you can use any Mail User Agent (most commonly known as MUA for short) such as [mail or mutt][2]. - -Since mutt is a personal favorite, I will use it in box1 to send an email to user tecmint using an existing file (mailbody.txt) as message body: - - # mutt -s "Part 9-RHCE series" tecmint@mydomain.com < mailbody.txt - -![Test Postfix Mail Server](http://www.tecmint.com/wp-content/uploads/2015/09/Test-Postfix-Mail-Server.png) - -Test Postfix Mail Server - -Now go to the central mail server (mail.mydomain.com), log on as user tecmint, and check whether the email was received: - - # su – tecmint - # mail - -![Check Postfix Mail Server Delivery](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Postfix-Mail-Server-Delivery.png) - -Check Postfix Mail Server Delivery - -If the email was not received, check root’s mail spool for a warning or error notification. You may also want to make sure that the SMTP service is running on both servers and that port 25 is open in the central mail server using [nmap command][3]: - - # nmap -PN 192.168.0.20 - -![Troubleshoot Postfix Mail Server](http://www.tecmint.com/wp-content/uploads/2015/09/Troubleshoot-Postfix-Mail-Server.png) - -Troubleshoot Postfix Mail Server - -### Summary ### - -Setting up a mail server and a relay host as shown in this article is an essential skill that every system administrator must have, and represents the foundation to understand and install a more complex scenario such as a mail server hosting a live domain for several (even hundreds or thousands) of email accounts. - -(Please note that this kind of setup requires a DNS server, which is out of the scope of this guide), but you can use following article to setup DNS Server: - -- [Setup Cache only DNS Server in CentOS/RHEL 07][4] - -Finally, I highly recommend you become familiar with Postfix’s configuration file (main.cf) and the program’s man page. If in doubt, don’t hesitate to drop us a line using the form below or using our forum, Linuxsay.com, where you will get almost immediate help from Linux experts from all around the world. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/setup-postfix-mail-server-smtp-using-null-client-on-centos/ - -作者:[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/install-thunderbird-17-in-ubuntu-xubuntu-linux-mint/ -[2]:http://www.tecmint.com/send-mail-from-command-line-using-mutt-command/ -[3]:http://www.tecmint.com/nmap-command-examples/ -[4]:http://www.tecmint.com/setup-dns-cache-server-in-centos-7/ \ No newline at end of file diff --git a/translated/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md b/translated/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md new file mode 100644 index 0000000000..ccc67dbb30 --- /dev/null +++ b/translated/tech/RHCE/Part 9 - How to Setup Postfix Mail Server (SMTP) using null-client Configuration.md @@ -0,0 +1,153 @@ +第九部分 - 如果使用零客户端配置 Postfix 邮件服务器(SMTP) +================================================================================ +尽管现在有很多在线联系方式,邮件仍然是一个人传递信息给远在世界尽头或办公室里坐在我们旁边的另一个人的有效方式。 + +下面的图描述了邮件从发送者发出直到信息到达接收者收件箱的传递过程。 + +![邮件如何工作](http://www.tecmint.com/wp-content/uploads/2015/09/How-Mail-Setup-Works.png) + +邮件如何工作 + +要使这成为可能,背后发生了好多事情。为了使邮件信息从一个客户端应用程序(例如 [Thunderbird][1]、Outlook,或者网络邮件服务,例如 Gmail 或 Yahoo 邮件)到一个邮件服务器,并从其到目标服务器并最终到目标接收人,每个服务器上都必须有 SMTP(简单邮件传输协议)服务。 + +这就是为什么我们要在这篇博文中介绍如何在 RHEL 7 中设置 SMTP 服务器,从中本地用户发送的邮件(甚至发送到本地用户)被转发到一个中央邮件服务器以便于访问。 + +在实际需求中这称为零客户端安装。 + +在我们的测试环境中将包括一个原始邮件服务器和一个中央服务器或中继主机。 + + 原始邮件服务器: (主机名: box1.mydomain.com / IP: 192.168.0.18) + 中央邮件服务器: (主机名: mail.mydomain.com / IP: 192.168.0.20) + +为了域名解析我们在两台机器中都会使用有名的 /etc/hosts 文件: + + 192.168.0.18 box1.mydomain.com box1 + 192.168.0.20 mail.mydomain.com mail + +### 安装 Postfix 和防火墙/SELinux 注意事项 ### + +首先,我们需要(在两台机器上): + +**1. 安装 Postfix:** + + # yum update && yum install postfix + +**2. 启动服务并启用开机自动启动:** + + # systemctl start postfix + # systemctl enable postfix + +**3. 允许邮件流量通过防火墙:** + + # firewall-cmd --permanent --add-service=smtp + # firewall-cmd --add-service=smtp + + +![在防火墙中开通邮件服务器端口](http://www.tecmint.com/wp-content/uploads/2015/09/Allow-Traffic-through-Firewall.png) + +在防火墙中开通邮件服务器端口 + +**4. 在 box1.mydomain.com 配置 Postfix** + +Postfix 的主要配置文件是 /etc/postfix/main.cf。这个文件本身是一个很大的文本,因为其中包含的注释解析了程序设置的目的。 + +为了简洁,我们只显示了需要编辑的行(是的,在原始服务器中你需要保留 mydestination 为空;否则邮件会被保存到本地而不是我们实际想要的中央邮件服务器): + +**在 box1.mydomain.com 配置 Postfix** + +---------- + + myhostname = box1.mydomain.com + mydomain = mydomain.com + myorigin = $mydomain + inet_interfaces = loopback-only + mydestination = + relayhost = 192.168.0.20 + +**5. 在 mail.mydomain.com 配置 Postfix** + +** 在 mail.mydomain.com 配置 Postfix ** + +---------- + + myhostname = mail.mydomain.com + mydomain = mydomain.com + myorigin = $mydomain + inet_interfaces = all + mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain + mynetworks = 192.168.0.0/24, 127.0.0.0/8 + +如果还没有设置,还要设置相关的 SELinux 布尔值永久为真: + + # setsebool -P allow_postfix_local_write_mail_spool on + +![设置 Postfix SELinux 权限](http://www.tecmint.com/wp-content/uploads/2015/09/Set-Postfix-SELinux-Permission.png) + +设置 Postfix SELinux 权限 + +上面的 SELinux 布尔值会允许 Postfix 在中央服务器写入邮件池。 + +**6. 在两台机子上重启服务以使更改生效:** + + # systemctl restart postfix + +如果 Postfix 没有正确启动,你可以使用下面的命令进行错误处理。 + + # systemctl –l status postfix + # journalctl –xn + # postconf –n + +### 测试 Postfix 邮件服务 ### + +为了测试邮件服务器,你可以使用任何邮件用户代理(最常见的简称为 MUA)例如 [mail 或 mutt][2]。 + +由于我个人喜欢 mutt,我会在 box1 中使用它发送邮件给用户 tecmint,并把现有文件(mailbody.txt)作为信息内容: + + # mutt -s "Part 9-RHCE series" tecmint@mydomain.com < mailbody.txt + +![测试 Postfix 邮件服务器](http://www.tecmint.com/wp-content/uploads/2015/09/Test-Postfix-Mail-Server.png) + +测试 Postfix 邮件服务器 + +现在到中央邮件服务器(mail.mydomain.com)以 tecmint 用户登录,并检查是否收到了邮件: + + # su – tecmint + # mail + +![检查 Postfix 邮件服务器发送](http://www.tecmint.com/wp-content/uploads/2015/09/Check-Postfix-Mail-Server-Delivery.png) + +检查 Postfix 邮件服务器发送 + +如果没有收到邮件,检查 root 用户的邮件池查看警告或者错误提示。你也需要使用 [nmap 命令][3]确保两台服务器运行了 SMTP 服务,并在中央邮件服务器中 打开了 25 号端口: + + # nmap -PN 192.168.0.20 + +![Postfix 邮件服务器错误处理](http://www.tecmint.com/wp-content/uploads/2015/09/Troubleshoot-Postfix-Mail-Server.png) + +Postfix 邮件服务器错误处理 + +### 总结 ### + +像本文中展示的设置邮件服务器和中继主机是每个系统管理员必须拥有的重要技能,也代表了理解和安装更复杂情景的基础,例如一个邮件服务器托管有多个邮件账户(甚至成百上千)的域名。 + +(请注意这种类型的设置需要有 DNS 服务器,这不在本文的介绍范围),但你可以参照下面的文章设置 DNS 服务器: + +- [在 CentOS/RHEL 07 上配置仅缓存的 DNS 服务器][4] + +最后,我强烈建议你熟悉 Postfix 的配置文件(main.cf)和这个程序的帮助手册。如果有任何疑问,别犹豫,使用下面的评论框或者我们的论坛 Linuxsay.com 告诉我们吧,你会从世界各地的 Linux 高手中获得几乎及时的帮助。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/setup-postfix-mail-server-smtp-using-null-client-on-centos/ + +作者:[Gabriel Cánepa][a] +译者:[ictlyh](https//www.mutouxiaogui.cn/blog/) +校对:[校对者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/install-thunderbird-17-in-ubuntu-xubuntu-linux-mint/ +[2]:http://www.tecmint.com/send-mail-from-command-line-using-mutt-command/ +[3]:http://www.tecmint.com/nmap-command-examples/ +[4]:http://www.tecmint.com/setup-dns-cache-server-in-centos-7/ \ No newline at end of file From d921b9a02529f881149afd06e26ffb78090bf092 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 3 Oct 2015 10:08:28 +0800 Subject: [PATCH 2196/2517] Translating sources/tech/20150929 A Developer's Journey into Linux Containers.md --- .../tech/20150929 A Developer's Journey into Linux Containers.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150929 A Developer's Journey into Linux Containers.md b/sources/tech/20150929 A Developer's Journey into Linux Containers.md index 3b44992ef3..63e4f14940 100644 --- a/sources/tech/20150929 A Developer's Journey into Linux Containers.md +++ b/sources/tech/20150929 A Developer's Journey into Linux Containers.md @@ -1,3 +1,4 @@ +ictlyh Translating A Developer’s Journey into Linux Containers ================================================================================ ![](https://deis.com/images/blog-images/dev_journey_0.jpg) From 06d853be482798adf2682de6a4550cf193b53509 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 3 Oct 2015 16:43:19 +0800 Subject: [PATCH 2197/2517] Translated sources/tech/20150929 A Developer's Journey into Linux Containers.md --- ...veloper's Journey into Linux Containers.md | 129 ------------------ ...veloper's Journey into Linux Containers.md | 128 +++++++++++++++++ 2 files changed, 128 insertions(+), 129 deletions(-) delete mode 100644 sources/tech/20150929 A Developer's Journey into Linux Containers.md create mode 100644 translated/tech/20150929 A Developer's Journey into Linux Containers.md diff --git a/sources/tech/20150929 A Developer's Journey into Linux Containers.md b/sources/tech/20150929 A Developer's Journey into Linux Containers.md deleted file mode 100644 index 63e4f14940..0000000000 --- a/sources/tech/20150929 A Developer's Journey into Linux Containers.md +++ /dev/null @@ -1,129 +0,0 @@ -ictlyh Translating -A Developer’s Journey into Linux Containers -================================================================================ -![](https://deis.com/images/blog-images/dev_journey_0.jpg) - -I’ll let you in on a secret: all that DevOps cloud stuff that goes into getting my applications into the world is still a bit of a mystery to me. But, over time I’ve come to realize that understanding the ins and outs of large scale machine provisioning and application deployment is important knowledge for a developer to have. It’s akin to being a professional musician. Of course you need know how to play your instrument. But, if you don’t understand how a recording studio works or how you fit into a symphony orchestra, you’re going to have a hard time working in such environments. - -In the world of software development getting your code into our very big world is just as important as making it. DevOps counts and it counts a lot. - -So, in the spirit of bridging the gap between Dev and Ops I am going to present container technology to you from the ground up. Why containers? Because there is strong evidence to suggest that containers are the next step in machine abstraction: making a computer a place and no longer a thing. Understanding containers is a journey that we’ll take together. - -In this article I am going to cover the concepts behind containerization. I am going to cover how a container differs from a virtual machine. I am going to go into the logic behind containers construction as well as how containers fit into application architecture. I’ll discussion how lightweight versions of the Linux operating system fits into the container ecosystem. I’ll discuss using images to create reusable containers. Lastly I’ll cover how clusters of containers allow your applications to scale quickly. - -In later articles I’ll show you the step by step process to containerize a sample application and how to create a host cluster for your application’s containers. Also, I’ll show you how to use a Deis to deploy the sample application to a VM on your local system as well as a variety of cloud providers. - -So let’s get started. - -### The Benefit of Virtual Machines ### - -In order to understand how containers fit into the scheme of things you need to understand the predecessor to containers: virtual machines. - -A [virtual machine][1] (VM) is a software abstraction of a computer that runs on a physical host computer. Configuring a virtual machine is akin to buying a typical computer: you define the number of CPUs you want along with desired RAM and disk storage capacity. Once the machine is configured, you load in the operating system and then any servers and applications you want the VM to support. - -Virtual machines allow you to run many simulations of a computer on a single hardware host. Here’s what that looks like with a handy diagram: - -![](https://deis.com/images/blog-images/dev_journey_1.png) - -Virtual machines bring efficiency to your hardware investment. You can buy a big, honking machine and run a lots of VMs on it. You can have a database VM sitting with a bunch of VMs with identical versions of your custom app running as a cluster. You can get a lot of scalability out of a finite hardware resources. If you find that you need more VMs and your host hardware has the capacity, you add what you need. Or, if you don’t need a VM, you simply bring the VM off line and delete the VM image. - -### The Limitations of Virtual Machines ### - -But, virtual machines do have limits. - -Say you create three VMs on a host as shown above. The host has 12 CPUs, 48 GB of RAM, and 3 TB of storage. Each VM is configured to have 4 CPUs, 16 GB of RAM and 1 TB of storage. So far, so good. The host has the capacity. - -But there is a drawback. All the resources allocated to a particular machine are dedicated, no matter what. Each machine has been allocated 16 GB of RAM. However, if the first VM never uses more than 1 GB of its RAM allocation, the remaining 15 GB just sit there unused. If the third VM uses only 100 GB of its 1 TB storage allocation, the remaining 900 GB is wasted space. - -There is no leveling of resources. Each VM owns what it is given. So, in a way we’re back to that time before virtual machines when we were paying a lot of good money for unused resources. - -There is *another* drawback to VMs too. They can take a long time to spin up. So, if you are in a situation where your infrastructure needs to grow quickly, even in a situation when VM provisioning is automated, you can still find yourself twiddling your thumbs waiting for machines to come online. - -### Enter: Containers ### - -Conceptually, a container is a Linux process that thinks it is the only process running. The process knows only about things it is told to know about. Also, in terms of containerization, the container process is assigned its own IP address. This is important, so I will say it again. **In terms of containerization, the container process is assigned its own IP address**. Once given an IP address, the process is an identifiable resource within the host network. Then, you can issue a command to the container manager to map the container’s IP address to a IP address on the host that is accessible to the public. Once this mapping takes place, for all intents and purposes, a container is a distinct machine accessible on the network, similar in concept to a virtual machine. - -Again, a container is an isolated Linux process that has a distinct IP address thus making it identifiable on a network. Here’s what that looks like as diagram: - -![](https://deis.com/images/blog-images/dev_journey_2.png) - -A container/process shares resources on the host computer in a dynamic, cooperative manner. If the container needs only 1 GB of RAM, it uses only 1 GB. If it needs 4 GB, it uses 4 GB. It’s the same with CPU utilization and storage. The allocation of CPU, memory and storage resources is dynamic, not static as is usual on a typical virtual machine. All of this resource sharing is managed by the container manager. - -Lastly, containers boot very quickly. - -So, the benefit of containers is: **you get the isolation and encapsulation of a virtual machine without the drawback of dedicated static resources**. Also, because containers load into memory fast, you get better performance when it comes to scaling many containers up. - -### Container Hosting, Configuration, and Management ### - -Computers that host containers run a version of Linux that is stripped down to the essentials. These days, the more popular underlying operating system for a host computer is [CoreOS, mentioned above][2]. There are others, however, such as [Red Hat Atomic Host][3] and [Ubuntu Snappy][4]. - -The Linux operating system is shared between all containers, minimising duplication and reducing the container footprint. Each container contains only what is unique to that specific container. Here’s what that looks like in diagram form: - -![](https://deis.com/images/blog-images/dev_journey_3.png) - -You configure your container with the components it requires. A container component is called a **layer**. A layer is a container image. (You’ll read more about container images in the following section.). You start with a base layer which typically the type of operating system you want in your container. (The container manager will provides only the parts of your desired operating system that is not in the host OS) As you construct the configuration of your container, you’ll add layers, say Apache if you want a web server, PHP or Python runtimes, if your container is running scripts. - -Layering is very versatile. If you application or service container requires PHP 5.2, you configure that container accordingly. If you have another application or service that requires PHP 5.6, no problem. You configure that container to use PHP.5.6. Unlike VMs, where you need to go through a lot of provisioning and installation hocus pocus to change a version of a runtime dependency; with containers you just redefine the layer in the container configuration file. - -All of the container versatility described previously is controlled by the a piece of software called a container manager. Presently, the most popular container managers are [Docker][5] and [Rocket][6]. The figure above shows a host scenario is which Docker is the container manager and CoreOS is the host operating system. - -### Containers are Built with Images ### - -When it comes time for you to build our application into a container, you are going to assemble images. An image represents a template of a container that your container needs to do its work. (I know, containers within containers. Go figure.) Images are stored in a registry. Registries live on the network. - -Conceptually, a registry is similar to a [Maven][7] repository, for those of you from the Java world, or a [NuGet][8] server, for you .NET heads. You’ll create a container configuration file that lists the images your application needs. The you’ll use the container manager to make a container that includes your application’s code as well as constituent resources downloaded from a container registry. For example, if your application is made up of some PHP files, your container configuration file will declare that you get the PHP runtime from a registry. Also, you’ll use the container configuration file to declare the .php files to copy into the container’s file system. The container manager encapsulates all your application stuff into a distinct container that you’ll run on a host computer, under a container manager. - -Here’s a diagram that illustrates the concepts behind container creation: - -![](https://deis.com/images/blog-images/dev_journey_4.png) - -Let’s take a detailed look at this diagram. - -Here, (1) indicates there is a container configuration file that defines the stuff your container needs, as well as how your container is to be constructed. When you run your container on the host, the container manager will read the configuration file to get the container images you need from a registry on the cloud (2) and add the images as layers in your container. - -Also, if that constituent image requires other images, the container manager will get those images too and layer them in. At (3) the container manager will copy in files to your container as is required. - -If you use a provisioning service, such as [Deis][9], the application container you just created exists as an image (4) which the provisioning service will deploy to a cloud provider of your choice. Examples of cloud providers are AWS and Rackspace. - -### Containers in a Cluster ### - -Okay. So we can say there is a good case to be made that containers provide a greater degree of configuration flexibility and resource utilization than virtual machines. Still, this is not the all of it. - -Where containers get really flexible is when they’re clustered. Remember, a container has a distinct IP address. Thus, it can be put behind a load balancer. Once a container goes behind a load balancer, the game goes up a level. - -You can run a cluster of containers behind a load balancer container to achieve high performance, high availability computing. Here’s one example setup: - -![](https://deis.com/images/blog-images/dev_journey_5.png) - -Let’s say you’ve made an application that does some resource intensive work. Photograph processing, for example. Using a container provisioning technology such as [Deis][9], you can create a container image that has your photo processing application configured with all the resources upon which your photo processing application depends. Then, you can deploy one or many instances of your container image to under a load balancer that reside on the host. Once the container image is made, you can keep it on the sidelines for introduction later on when the system becomes maxed out and more instances of your container are required in the cluster to meet the workload at hand. - -There is more good news. You don’t have manually configure the load balancer to accept your container image every time you add more instances into the environment. You can use service discovery technology to make it so that your container announces its availability to the balancer. Then, once informed, the balancer can start to route traffic to the new node. - -### Putting It All Together ### - -Container technology picks up where the virtual machine has left off. Host operating systems such as CoreOS, RHEL Atomic, and Ubuntu’s Snappy, in conjunction with container management technologies such as Docker and Rocket, are making containers more popular everyday. - -While containers are becoming more prevalent, they do take a while to master. However, once you get the hang of them, you can use provisioning technologies such as [Deis][9] to make container creation and deployment easier. - -Getting a conceptual understanding of containers is important as we move forward to actually doing some work with them. But, I imagine the concepts are hard to grasp without the actual hands-on experience to accompany the ideas in play. So, this is what we’ll do in the next segment of this series: make some containers. - --------------------------------------------------------------------------------- - -via: https://deis.com/blog/2015/developer-journey-linux-containers - -作者:[Bob Reselman][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://deis.com/blog -[1]:https://en.wikipedia.org/wiki/Virtual_machine -[2]:https://coreos.com/using-coreos/ -[3]:http://www.projectatomic.io/ -[4]:https://developer.ubuntu.com/en/snappy/ -[5]:https://www.docker.com/ -[6]:https://coreos.com/blog/rocket/ -[7]:https://en.wikipedia.org/wiki/Apache_Maven -[8]:https://www.nuget.org/ -[9]:http://deis.com/learn \ No newline at end of file diff --git a/translated/tech/20150929 A Developer's Journey into Linux Containers.md b/translated/tech/20150929 A Developer's Journey into Linux Containers.md new file mode 100644 index 0000000000..a71b5e8fb3 --- /dev/null +++ b/translated/tech/20150929 A Developer's Journey into Linux Containers.md @@ -0,0 +1,128 @@ +开发者的 Linux 容器之旅 +================================================================================ +![](https://deis.com/images/blog-images/dev_journey_0.jpg) + +我告诉你一个秘密:使得我的应用程序进入到全世界的所有云计算的东西,对我来说仍然有一点神秘。但随着时间流逝,我意识到理解大规模机器配置和应用程序部署的来龙去脉对一个开发者来说是非常重要的知识。这类似于成为一个专业的音乐家。你当然需要知道如何使用你的乐器。但是,如果你不知道一个录音室是如何工作的,或者你如何适应一个交响乐团,你在这样的环境中工作会变得非常困难。 + +在软件开发的世界里,使你的代码进入我们更大的世界正如写出它来一样重要。开发重要,而且是很重要。 + +因此,为了弥合开发和部署之间的间隔,我会从头开始介绍容器技术。为什么是容器?因为有强有力的证据表明,容器是机器抽象的下一步:使计算机成为场所而不再是一个东西。理解容器是我们共同的旅程。 + +在这篇文章中,我会介绍容器化背后的概念。容器和虚拟机的区别。以及容器构建背后的逻辑以及它是如何适应应用程序架构的。我会探讨轻量级的 Linux 操作系统是如何适应容器生态系统。我还会讨论使用镜像创建可重用的容器。最后我会介绍容器集群如何使你的应用程序可以快速扩展。 + +在后面的文章中,我会一步一步向你介绍容器化一个事例应用程序的过程,以及如何为你的应用程序容器创建一个托管集群。同时,我会向你展示如何使用 Deis 将你的事例应用程序部署到你本地系统以及多种云供应商的虚拟机上。 + +让我们开始吧。 + +### 虚拟机的好处 ### + +为了理解容器如何适应事物发展,你首先要了解容器的前者:虚拟机 + +[虚拟机][1] 是运行在物理宿主机上的软件抽象。配置一个虚拟机就像是购买一台计算机:你需要定义你想要的 CPU 数目,RAM 和磁盘存储容量。配置好了机器后,你把它加载到操作系统,然后是你想让虚拟机支持的任何服务器或者应用程序。 + +虚拟机允许你在一台硬件主机上运行多个模拟计算机。这是一个简单的示意图: + +![](https://deis.com/images/blog-images/dev_journey_1.png) + +虚拟机使得能充分利用你的硬件资源。你可以购买一台大型机然后在上面运行多个虚拟机。你可以有一个数据库虚拟机以及很多运行相同版本定制应用程序的虚拟机构成的集群。你可以在有限的硬件资源获得很多的扩展能力。如果你觉得你需要更多的虚拟机而且你的宿主硬件还有容量,你可以添加任何你想要的。或者,如果你不再需要一个虚拟机,你可以关闭该虚拟机并删除虚拟机镜像。 + +### 虚拟机的局限 ### + +但是,虚拟机确实有局限。 + +如上面所示,假如你在一个主机上创建了三个虚拟机。主机有 12 个 CPU,48 GB 内存和 3TB 的存储空间。每个虚拟机配置为有 4 个 CPU,16 GB 内存和 1TB 存储空间。到现在为止,一切都还好。主机有这个容量。 + +但这里有个缺陷。所有分配给一个虚拟机的资源,无论是什么,都是专有的。每台机器都分配了 16 GB 的内存。但是,如果第一个虚拟机永不会使用超过 1GB 分配的内存,剩余的 15 GB 就会被浪费在那里。如果第三天虚拟机只使用分配的 1TB 存储空间中的 100GB,其余的 900GB 就成为浪费空间。 + +这里没有资源的流动。每台虚拟机拥有分配给它的所有资源。因此,在某种方式上我们又回到了虚拟机之前,把大部分金钱花费在未使用的资源上。 + +虚拟机还有*另一个*缺陷。扩展他们需要很长时间。如果你处于基础设施需要快速增长的情形,即使虚拟机配置是自动的,你仍然会发现你的很多时间都浪费在等待机器上线。 + +### 来到:容器 ### + +概念上来说,容器是 Linux 中认为只有它自己的一个进程。该进程只知道告诉它的东西。另外,在容器化方面,该容器进程也分配了它自己的 IP 地址。这点很重要,我会再次重复。**在容器化方面,容器进程有它自己的 IP 地址**。一旦给予了一个 IP 地址,该进程就是宿主网络中可识别的资源。然后,你可以在容器管理器上运行命令,使容器 IP 映射到主机中能访问公网的 IP 地址。该映射发生时,对于任何意图和目的,一个容器就是网络上一个可访问的独立机器,概念上类似于虚拟机。 + +再次说明,容器是拥有不同 IP 地址从而使其成为网络上可识别的独立 Linux 进程。下面是一个示意图: + +![](https://deis.com/images/blog-images/dev_journey_2.png) + +容器/进程以动态合作的方式共享主机上的资源。如果容器只需要 1GB 内存,它就只会使用 1GB。如果它需要 4GB,就会使用 4GB。CPU 和存储空间利用也是如此。CPU,内存和存储空间的分配是动态的,和典型虚拟机的静态方式不同。所有这些资源的共享都由容器管理器管理。 + +最后,容器能快速启动。 + +因此,容器的好处是:**你获得了虚拟机独立和封装的好处而抛弃了专有静态资源的缺陷**。另外,由于容器能快速加载到内存,在扩展到多个容器时你能获得更好的性能。 + +### 容器托管、配置和管理 ### + +托管容器的计算机运行着被剥离的只剩下主要部分的 Linux 版本。现在,宿主计算机流行的底层操作系统是上面提到的 [CoreOS][2]。当然还有其它,例如 [Red Hat Atomic Host][3] 和 [Ubuntu Snappy][4]。 + +所有容器之间共享Linux 操作系统,减少了容器足迹的重复和冗余。每个容器只包括该容器唯一的部分。下面是一个示意图: + +![](https://deis.com/images/blog-images/dev_journey_3.png) + +你用它所需的组件配置容器。一个容器组件被称为**层**。一层是一个容器镜像,(你会在后面的部分看到更多关于容器镜像的介绍)。你从一个基本层开始,这通常是你想在容器中使用的操作系统。(容器管理器只提供你想要的操作系统在宿主操作系统中不存在的部分。)当你构建配置你的容器时,你会添加层,例如你想要添加网络服务器 Apache,如果容器要运行脚本,则需要添加 PHP 或 Python 运行时。 + +分层非常灵活。如果应用程序或者服务容器需要 PHP 5.2 版本,你相应地配置该容器即可。如果你有另一个应用程序或者服务需要 PHP 5.6 版本,没问题,你可以使用 PHP 5.6 配置该容器。不像虚拟机,更改一个版本的运行时依赖时你需要经过大量的配置和安装过程;对于容器你只需要在容器配置文件中重新定义层。 + +所有上面描述的容器多功能性都由一个称为容器管理器的软件控制。现在,最流行的容器管理器是 [Docker][5] 和 [Rocket][6]。上面的示意图展示了容器管理器是 Docker,宿主操作系统是 CentOS 的主机情景。 + +### 容器由镜像构成 ### + +当你需要将我们的应用程序构建到容器时,你就会编译镜像。镜像代表了需要完成容器工作的容器模板。(容器里的容器)。镜像被保存在网络上的注册表里。 + +从概念上讲,注册表类似于一个使用 Java 的人眼中的 [Maven][7] 仓库,使用 .NET 的人眼中的 [NuGet][8] 服务器。你会创建一个列出了你应用程序所需镜像的容器配置文件。然后你使用容器管理器创建一个包括了你应用程序代码以及从注册表中下载的构成资源的容器。例如,如果你的应用程序包括了一些 PHP 文件,你的容器配置文件会声明你会从注册表中获取 PHP 运行时。另外,你还要使用容器配置文件声明需要复制到容器文件系统中的 .php 文件。容器管理器会封装你应用程序的所有东西为一个独立容器。该容器将会在容器管理器的管理下运行在宿主计算机上。 + +这是一个容器创建背后概念的示意图: + +![](https://deis.com/images/blog-images/dev_journey_4.png) + +让我们仔细看看这个示意图。 + +(1)表示一个定义了你容器所需东西以及你容器如何构建的容器配置文件。当你在主机上运行容器时,容器管理器会读取配置文件从云上的注册表中获取你需要的容器镜像,(2)作为层将镜像添加到你的容器。 + +另外,如果组成镜像需要其它镜像,容器管理器也会获取这些镜像并把它们作为层添加进来。(3)容器管理器会将需要的文件复制到容器中。 + +如果你使用了配置服务,例如 [Deis][9],你刚刚创建的应用程序容器作为镜像存在(4)配置服务会将它部署到你选择的云供应商上。类似 AWS 和 Rackspace 云供应商。 + +### 集群中的容器 ### + +好了。这里有一个很好的例子说明了容器比虚拟机提供了更好的配置灵活性和资源利用率。但是,这并不是全部。 + +容器真正灵活是在集群中。记住,每个容器有一个独立的 IP 地址。因此,能把它放到负载均衡器后面。将容器放到负载均衡器后面,就上升了一个层次。 + +你可以在一个负载均衡容器后运行容器集群以获得更高的性能和高可用计算。这是一个例子: + +![](https://deis.com/images/blog-images/dev_journey_5.png) + +假如你开发了一个进行资源密集型工作的应用程序。例如图片处理。使用类似 [Deis][9] 的容器配置技术,你可以创建一个包括了你图片处理程序以及你图片处理程序需要的所有资源的容器镜像。然后,你可以部署一个或多个容器镜像到主机上的负载均衡器。一旦创建了容器镜像,你可以在系统快要刷爆时把它放到一边,为了满足手中的工作时添加更多的容器实例。 + +这里还有更多好消息。你不需要每次添加实例到环境中时手动配置负载均衡器以便接受你的容器镜像。你可以使用服务发现技术告知均衡器你容器的可用性。然后,一旦获知,均衡器就会将流量分发到新的结点。 + +### 全部放在一起 ### + +容器技术完善了虚拟机不包括的部分。类似 CoreOS、RHEL Atomic、和 Ubuntu 的 Snappy 宿主操作系统,和类似 Docker 和 Rocket 的容器管理技术结合起来,使得容器变得日益流行。 + +尽管容器变得更加越来越普遍,掌握它们还是需要一段时间。但是,一旦你懂得了它们的窍门,你可以使用类似 [Deis][9] 的配置技术使容器创建和部署变得更加简单。 + +概念上理解容器和进一步实际使用它们完成工作一样重要。但我认为不实际动手把想法付诸实践,概念也难以理解。因此,我们该系列的下一阶段就是:创建一些容器。 + +-------------------------------------------------------------------------------- + +via: https://deis.com/blog/2015/developer-journey-linux-containers + +作者:[Bob Reselman][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://deis.com/blog +[1]:https://en.wikipedia.org/wiki/Virtual_machine +[2]:https://coreos.com/using-coreos/ +[3]:http://www.projectatomic.io/ +[4]:https://developer.ubuntu.com/en/snappy/ +[5]:https://www.docker.com/ +[6]:https://coreos.com/blog/rocket/ +[7]:https://en.wikipedia.org/wiki/Apache_Maven +[8]:https://www.nuget.org/ +[9]:http://deis.com/learn \ No newline at end of file From 28cb827b3e3865b2c6abef30cc60e20f704c4d7a Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 3 Oct 2015 20:41:07 +0800 Subject: [PATCH 2198/2517] Update RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译。 --- ...als of Virtualization and Guest Administration with KVM.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md b/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md index d9e06bd876..6d25bf914f 100644 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md +++ b/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md @@ -1,3 +1,5 @@ +FSSlc translating + RHCSA Series: Essentials of Virtualization and Guest Administration with KVM – Part 15 ================================================================================ If you look up the word virtualize in a dictionary, you will find that it means “to create a virtual (rather than actual) version of something”. In computing, the term virtualization refers to the possibility of running multiple operating systems simultaneously and isolated one from another, on top of the same physical (hardware) system, known in the virtualization schema as host. @@ -185,4 +187,4 @@ via: http://www.tecmint.com/kvm-virtualization-basics-and-guest-administration/ [3]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ [4]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Getting_Started_Guide/index.html [5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/index.html -[6]:http://www.tecmint.com/install-and-configure-kvm-in-linux/ \ No newline at end of file +[6]:http://www.tecmint.com/install-and-configure-kvm-in-linux/ From 80b652ca92553cf1567a676dc6fd183f206dd377 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 4 Oct 2015 00:24:25 +0800 Subject: [PATCH 2199/2517] PUB:20150930 Install and use Ansible (Automation Tool) in CentOS 7 @geekpi --- ...e Ansible (Automation Tool) in CentOS 7.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md (80%) diff --git a/translated/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md b/published/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md similarity index 80% rename from translated/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md rename to published/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md index 0527b51b9c..f80f6a6125 100644 --- a/translated/tech/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md +++ b/published/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md @@ -1,12 +1,13 @@ -在CentOS 7中安装并使用Ansible(自动化工具) +在 CentOS 7 中安装并使用自动化工具 Ansible ================================================================================ -Ansible是一款为类Unix系统开发的免费开源配置和自动化工具。它用Python写成并且和Chef和Puppet相似,但是有一个不同和好处是我们不需要在节点中安装任何客户端。它使用SSH来和节点进行通信。 + +Ansible是一款为类Unix系统开发的自由开源的配置和自动化工具。它用Python写成,类似于Chef和Puppet,但是有一个不同和优点是我们不需要在节点中安装任何客户端。它使用SSH来和节点进行通信。 本篇中我们将在CentOS 7上安装并配置Ansible,并且尝试管理两个节点。 -**Ansible 服务端** – ansible.linuxtechi.com ( 192.168.1.15 ) +- **Ansible 服务端** – ansible.linuxtechi.com ( 192.168.1.15 ) - **Nodes** – 192.168.1.9 , 192.168.1.10 +- **节点** – 192.168.1.9 , 192.168.1.10 ### 第一步: 设置EPEL仓库 ### @@ -38,17 +39,16 @@ Ansible仓库默认不在yum仓库中,因此我们需要使用下面的命令 ### 第四步:为Ansible定义节点的清单 ### -文件 ‘**/etc/ansible/hosts**‘ 维护了Ansible中服务器的清单。 +文件 `/etc/ansible/hosts` 维护着Ansible中服务器的清单。 [root@ansible ~]# vi /etc/ansible/hosts [test-servers] 192.168.1.9 192.168.1.10 -Save and exit the file. -保存并退出文件 +保存并退出文件。 -主机文件示例。 +主机文件示例如下: ![ansible-host](http://www.linuxtechi.com/wp-content/uploads/2015/09/ansible-host.jpg) @@ -62,19 +62,19 @@ Save and exit the file. #### 执行shell命令 #### -**例子1:检查Ansible节点的运行时间 ** +**例子1:检查Ansible节点的运行时间(uptime)** [root@ansible ~]# ansible -m command -a "uptime" 'test-servers' ![ansible-uptime](http://www.linuxtechi.com/wp-content/uploads/2015/09/ansible-uptime.jpg) -**例子2:检查节点的内核版本 ** +**例子2:检查节点的内核版本** [root@ansible ~]# ansible -m command -a "uname -r" 'test-servers' ![kernel-version-ansible](http://www.linuxtechi.com/wp-content/uploads/2015/09/kernel-version-ansible.jpg) -**例子3:给节点增加用户 ** +**例子3:给节点增加用户** [root@ansible ~]# ansible -m command -a "useradd mark" 'test-servers' [root@ansible ~]# ansible -m command -a "grep mark /etc/passwd" 'test-servers' @@ -93,7 +93,7 @@ via: http://www.linuxtechi.com/install-and-use-ansible-in-centos-7/ 作者:[Pradeep Kumar][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 447f142a76236ef7e722eb881db82fc850ecc9d7 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 4 Oct 2015 00:47:03 +0800 Subject: [PATCH 2200/2517] PUB:RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7 @FSSlc --- ... Up LDAP-based Authentication in RHEL 7.md | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) rename {translated/tech/RHCSA => published/RHCSA Series}/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md (76%) diff --git a/translated/tech/RHCSA/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md b/published/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md similarity index 76% rename from translated/tech/RHCSA/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md rename to published/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md index 9aba04d2cb..a071f4dc33 100644 --- a/translated/tech/RHCSA/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md +++ b/published/RHCSA Series/RHCSA Series--Part 14--Setting Up LDAP-based Authentication in RHEL 7.md @@ -1,43 +1,43 @@ -RHCSA 系列: 在 RHEL 7 中设置基于 LDAP 的认证 – Part 14 +RHCSA 系列(十四): 在 RHEL 7 中设置基于 LDAP 的认证 ================================================================================ -在这篇文章中,我们将首先罗列一些 LDAP 的基础知识(它是什么,它被用于何处以及为什么会被这样使用),然后向你展示如何使用 RHEL 7 系统来设置一个 LDAP 服务器以及配置一个客户端来使用它达到认证的目的。 +在这篇文章中,我们将首先罗列一些 LDAP 的基础知识(它是什么,它被用于何处以及为什么会被这样使用),然后向你展示如何使用 RHEL 7 系统来设置一个 LDAP 服务器以及配置一个客户端来使用它达到认证的目的。 ![设置 LDAP 服务器及客户端认证](http://www.tecmint.com/wp-content/uploads/2015/06/setup-ldap-server-and-configure-client-authentication.png) -RHCSA 系列:设置 LDAP 服务器及客户端认证 – Part 14 +*RHCSA 系列:设置 LDAP 服务器及客户端认证 – Part 14* 正如你将看到的那样,关于认证,还存在其他可能的应用场景,但在这篇指南中,我们将只关注基于 LDAP 的认证。另外,请记住,由于这个话题的广泛性,在这里我们将只涵盖它的基础知识,但你可以参考位于总结部分中列出的文档,以此来了解更加深入的细节。 -基于相同的原因,你将注意到:为了简洁起见,我已经决定省略了几个位于 man 页中 LDAP 工具的参考,但相应命令的解释是近在咫尺的(例如,输入 man ldapadd)。 +基于相同的原因,你将注意到:为了简洁起见,我已经决定省略了几个位于 man 页中 LDAP 工具的参考,但相应命令的解释是近在咫尺的(例如,输入 man ldapadd)。 那还是让我们开始吧。 **我们的测试环境** -我们的测试环境包含两台 RHEL 7 机子: +我们的测试环境包含两台 RHEL 7机器: Server: 192.168.0.18. FQDN: rhel7.mydomain.com Client: 192.168.0.20. FQDN: ldapclient.mydomain.com -如若你想,你可以使用在 [Part 12: RHEL 7 的自动化安装][1] 中使用 Kickstart 安装的机子来作为客户端。 +如若你想,你可以使用在 [RHCSA 系列(十二): 使用 Kickstart 完成 RHEL 7 的自动化安装][1] 中使用 Kickstart 安装的机子来作为客户端。 #### LDAP 是什么? #### -LDAP 代表轻量级目录访问协议(Lightweight Directory Access Protocol),并包含在一系列协议之中,这些协议允许一个客户端通过网络去获取集中存储的信息(例如登陆 shell 的目录,家目录的绝对路径,或者其他典型的系统用户信息),而这些信息可以从不同的地方访问到或被很多终端用户获取到(另一个例子是含有某个公司所有雇员的家庭地址和电话号码的目录)。 +LDAP 代表轻量级目录访问协议(Lightweight Directory Access Protocol),并包含在一系列协议之中,这些协议允许一个客户端通过网络去获取集中存储的信息(例如所登录的 shell 的路径,家目录的绝对路径,或者其他典型的系统用户信息),而这些信息可以从不同的地方访问到或被很多终端用户获取到(另一个例子是含有某个公司所有雇员的家庭地址和电话号码的目录)。 对于那些被赋予了权限可以使用这些信息的人来说,将这些信息进行集中管理意味着可以更容易地维护和获取。 -下面的图表提供了一个简化了的关于 LDAP 的示意图,且在下面将会进行更多的描述: +下面的图表提供了一个简化了的关于 LDAP 的示意图,在下面将会进行更多的描述: ![LDAP 示意图](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Diagram.png) -LDAP 示意图 +*LDAP 示意图* 下面是对上面示意图的一个详细解释。 -- 在一个 LDAP 目录中,一个条目代表一个独立单元或信息,被所谓的 Distinguished Name 唯一识别。 -- 一个属性是一些与某个条目相关的信息(例如地址,有效的联系电话号码和邮箱地址)。 -- 每个属性被分配有一个或多个值,这些值被包含在一个以空格为分隔符的列表中。每个条目中那个唯一的值被称为一个 Relative Distinguished Name。 +- 在一个 LDAP 目录中,一个条目(entry)代表一个独立单元或信息,被所谓的 Distinguished Name(DN,区别名) 唯一识别。 +- 一个属性(attribute)是一些与某个条目相关的信息(例如地址,有效的联系电话号码和邮箱地址)。 +- 每个属性被分配有一个或多个值(value),这些值被包含在一个以空格为分隔符的列表中。每个条目中那个唯一的值被称为一个 Relative Distinguished Name(RDN,相对区别名)。 接下来,就让我们进入到有关服务器和客户端安装的内容。 @@ -67,7 +67,7 @@ LDAP 示意图 # systemctl restart slapd.service # systemctl stop slapd.service -**3. 由于 slapd 服务是由 ldap 用户来运行的(你可以使用 `ps -e -o pid,uname,comm | grep slapd` 来验证),为了使得服务器能够更改由管理工具创建的条目,这个用户应该有目录 `/var/lib/ldap` 的所有权,而这些管理工具仅可以由 root 用户来运行(紧接着有更多这方面的内容)。** +**3. 由于 slapd 服务是由 ldap 用户来运行的(你可以使用 `ps -e -o pid,uname,comm | grep slapd` 来验证),为了使得服务器能够更改由管理工具创建的条目,该用户应该有目录 `/var/lib/ldap` 的所有权,而这些管理工具仅可以由 root 用户来运行(紧接着有更多这方面的内容)。** 在递归地更改这个目录的所有权之前,将 slapd 的示例数据库配置文件复制进这个目录: @@ -78,11 +78,11 @@ LDAP 示意图 # slappasswd -正如下一福图所展示的那样: +正如下一幅图所展示的那样: ![设置 LDAP 管理密码](http://www.tecmint.com/wp-content/uploads/2015/06/Set-LDAP-Admin-Password.png) -设置 LDAP 管理密码 +*设置 LDAP 管理密码* 然后以下面的内容创建一个 LDIF 文件(`ldaprootpasswd.ldif`): @@ -97,9 +97,9 @@ LDAP 示意图 - cn=config 指的是全局配置选项。 - olcDatabase 指的是一个特定的数据库实例的名称,并且通常可以在 `/etc/openldap/slapd.d/cn=config` 目录中发现。 -根据上面提供的理论背景,`ldaprootpasswd.ldif` 文件将添加一个条目到 LDAP 目录中。在那个条目中,每一行代表一个属性键值对(其中 dn,changetype,add 和 olcRootPW 为属性,每个冒号右边的字符串为相应的键值)。 +根据上面提供的理论背景,`ldaprootpasswd.ldif` 文件将添加一个条目到 LDAP 目录中。在那个条目中,每一行代表一个属性键值对(其中 dn,changetype,add 和 olcRootPW 为属性,每个冒号右边的字符串为相应的键值)。 -随着我们的进一步深入,请记住上面的这些,并注意到在这篇文章的余下部分,我们使用相同的 Common Names `(cn=)`,而这些余下的步骤中的每一步都将与其上一步相关。 +随着我们的进一步深入,请记住上面的这些,并注意到在这篇文章的余下部分,我们使用相同的 Common Names(通用名) `(cn=)`,而这些余下的步骤中的每一步都将与其上一步相关。 **5. 现在,通过特别指定相对于 ldap 服务的 URI ,添加相应的 LDAP 条目,其中只有 protocol/host/port 这几个域被允许使用。** @@ -109,7 +109,7 @@ LDAP 示意图 ![LDAP 配置](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Configuration.png) -LDAP 配置 +*LDAP 配置* 接着从 `/etc/openldap/schema` 目录导入一个基本的 LDAP 定义: @@ -117,11 +117,11 @@ LDAP 配置 ![LDAP 定义](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Definitions.png) -LDAP 定义 +*LDAP 定义* **6. 让 LDAP 在它的数据库中使用你的域名。** -以下面的内容创建另一个 LDIF 文件,我们称之为 `ldapdomain.ldif`, 然后酌情替换这个文件中的域名(在域名分量 dc=) 和密码: +以下面的内容创建另一个 LDIF 文件,我们称之为 `ldapdomain.ldif`, 然后酌情替换这个文件中的域名(在域名部分(Domain Component) dc=) 和密码: dn: olcDatabase={1}monitor,cn=config changetype: modify @@ -158,7 +158,7 @@ LDAP 定义 ![LDAP 域名配置](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Domain-Configuration.png) -LDAP 域名配置 +*LDAP 域名配置* **7. 现在,该是添加一些条目到我们的 LDAP 目录的时候了。在下面的文件中,属性和键值由一个冒号`(:)` 所分隔,这个文件我们将命名为 `baseldapdomain.ldif`:** @@ -188,7 +188,7 @@ LDAP 域名配置 ![添加 LDAP 域名,属性和键值](http://www.tecmint.com/wp-content/uploads/2015/06/Add-LDAP-Domain-Configuration.png) -添加 LDAP 域名,属性和键值 +*添加 LDAP 域名,属性和键值* **8. 创建一个名为 ldapuser 的 LDAP 用户(`adduser ldapuser`),然后在`ldapgroup.ldif` 中为一个 LDAP 组创建定义。** @@ -206,7 +206,7 @@ LDAP 域名配置 # ldapadd -x -W -D "cn=Manager,dc=mydomain,dc=com" -f ldapgroup.ldif -**9. 为用户 ldapuser 添加一个带有定义的 LDIF 文件(`ldapuser.ldif`):** +**9. 为用户 ldapuser 添加一个带有定义的 LDIF 文件(`ldapuser.ldif`):** dn: uid=ldapuser,ou=People,dc=mydomain,dc=com objectClass: top @@ -231,7 +231,7 @@ LDAP 域名配置 ![LDAP 用户配置](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-User-Configuration.png) -LDAP 用户配置 +*LDAP 用户配置* 相似地,你可以删除你刚刚创建的用户条目: @@ -243,7 +243,7 @@ LDAP 用户配置 **11. 最后,但并非最不重要的是使用 LDAP 开启客户端的认证。** -为了在最后一步中对我们有所帮助,我们将使用 authconfig 工具(一个配置系统认证资源的界面)。 +为了在最后一步中对我们有所帮助,我们将使用 authconfig 工具(一个配置系统认证资源的界面)。 使用下面的命令,在通过 LDAP 服务器认证成功后,假如请求的用户的家目录不存在,则将会被创建: @@ -251,7 +251,7 @@ LDAP 用户配置 ![LDAP 客户端认证](http://www.tecmint.com/wp-content/uploads/2015/06/LDAP-Client-Configuration.png) -LDAP 客户端认证 +*LDAP 客户端认证* ### 总结 ### @@ -265,11 +265,11 @@ via: http://www.tecmint.com/setup-ldap-server-and-configure-client-authenticatio 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者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/automatic-rhel-installations-using-kickstart/ +[1]:https://linux.cn/article-6335-1.html [2]:http://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ [3]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/ch-Directory_Servers.html From 6848556ba56c6e576d065dc736ea4705f27b7aa7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 4 Oct 2015 12:34:54 +0800 Subject: [PATCH 2201/2517] translating --- .../20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md b/sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md index 557fcbc427..39a0c7f2cf 100644 --- a/sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md +++ b/sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md @@ -1,3 +1,5 @@ +translating---geekpi + Meet The New Ubuntu 15.10 Default Wallpaper ================================================================================ **The brand new default wallpaper for Ubuntu 15.10 Wily Werewolf has been unveiled. ** @@ -41,4 +43,4 @@ via: http://www.omgubuntu.co.uk/2015/09/ubuntu-15-10-wily-werewolf-default-wallp 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://launchpadlibrarian.net/218258177/Wolf_Wallpaper_Desktop_4096x2304_Purple_PNG-24.png \ No newline at end of file +[1]:https://launchpadlibrarian.net/218258177/Wolf_Wallpaper_Desktop_4096x2304_Purple_PNG-24.png From 1334b83ce7ef8edce9e1e606b304f21ca8b18736 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 4 Oct 2015 12:57:02 +0800 Subject: [PATCH 2202/2517] translated --- ... The New Ubuntu 15.10 Default Wallpaper.md | 46 ------------------- ... The New Ubuntu 15.10 Default Wallpaper.md | 44 ++++++++++++++++++ 2 files changed, 44 insertions(+), 46 deletions(-) delete mode 100644 sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md create mode 100644 translated/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md diff --git a/sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md b/sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md deleted file mode 100644 index 39a0c7f2cf..0000000000 --- a/sources/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md +++ /dev/null @@ -1,46 +0,0 @@ -translating---geekpi - -Meet The New Ubuntu 15.10 Default Wallpaper -================================================================================ -**The brand new default wallpaper for Ubuntu 15.10 Wily Werewolf has been unveiled. ** - -At first glance you may find little has changed from the origami-inspired ‘Suru’ design shipped with April’s release of Ubuntu 15.04. But look closer and you’ll see that the new default background does feature some subtle differences. - -For one it looks much lighter, helped by an orange glow emanating from the upper-left of the image. The angular folds and sections remain, but with the addition of blocky, rectangular sections. - -The new background has been designed by Canonical Design Team member Alex Milazzo. - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/09/ubuntu-1510-wily-werewolf-wallpaper.jpg) - -The Ubuntu 15.10 default desktop wallpaper - -And just to show that there is a change, here is the Ubuntu 15.04 default wallpaper for comparison: - -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/03/suru-desktop-wallpaper-ubuntu-vivid.jpg) - -The Ubuntu 15.04 default desktop wallpaper - -### Download Ubuntu 15.10 Wallpaper ### - -If you’re running daily builds of Ubuntu 15.10 Wily Werewolf and don’t yet see this as your default wallpaper you’ve no broken anything: the design has been unveiled but is, as of writing, yet to be packaged and uploaded to Wily itself. - -You don’t have to wait until October to use the new design as your desktop background. You can download the wallpaper in a huge HiDPI display friendly 4096×2304 resolution by hitting the button below. - -- [Download Ubuntu the new 15.10 Default Wallpaper][1] - -Finally, as we say this every time there’s a new wallpaper, you don’t have to care about the minutiae of distribution branding and design. If the new wallpaper is not to your tastes or you never keep it you can, as ever, easily change it — this isn’t the Ubuntu Phone after all! - -**Are you a fan of the refreshed look? Let us know in the comments below. ** - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/09/ubuntu-15-10-wily-werewolf-default-wallpaper - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://launchpadlibrarian.net/218258177/Wolf_Wallpaper_Desktop_4096x2304_Purple_PNG-24.png diff --git a/translated/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md b/translated/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md new file mode 100644 index 0000000000..53751b8449 --- /dev/null +++ b/translated/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md @@ -0,0 +1,44 @@ +与新的Ubuntu 15.10默认壁纸相遇 +================================================================================ +**全新的Ubuntu 15.10 Wily Werewolf默认壁纸已经亮相 ** + +乍一看你几乎无法发现与今天4月发布的Ubuntu 15.04中收到折纸启发的‘Suru’设计有什么差别。但是仔细看你就会发现默认背景有一些细微差别。 + +其中一点是更淡,受到由左上角图片发出的橘黄色光的帮助。保持了角褶皱和色块,但是增加了块和矩形部分。 + +新的背景由Canonica设计团队的Alex Milazzo设计。 + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/09/ubuntu-1510-wily-werewolf-wallpaper.jpg) + +Ubuntu 15.10 默认桌面背景 + +只是为了显示改变,这个是Ubuntu 15.04的默认壁纸作为比较: + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/03/suru-desktop-wallpaper-ubuntu-vivid.jpg) + +Ubuntu 15.04 默认壁纸 + +### 下载Ubuntu 15.10 壁纸 ### + +如果你正运行的是Ubuntu 15.10 Wily Werewolf每日编译版本,那么你无法看到这个默认壁纸:设计已经亮相但是还没有打包到Wily中。 + +你不必等到10月份来使用新的设计来作为你的桌面背景。你可以点击下面的按钮下载4096×2304高清壁纸。 + +- [下载Ubuntu 15.10新的默认壁纸][1] + +最后,如我们每次在有新壁纸时说的,你不必在意发布版品牌和设计细节。如果壁纸不和你的口味或者不想永远用它,轻易地就换掉毕竟这不是Ubuntu Phone! + +**你是你版本的粉丝么?在评论中让我们知道 ** + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/09/ubuntu-15-10-wily-werewolf-default-wallpaper + +作者:[Joey-Elijah Sneddon][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://launchpadlibrarian.net/218258177/Wolf_Wallpaper_Desktop_4096x2304_Purple_PNG-24.png From 4f03530ecde18cbb0b565da74927fa31f53ef017 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 4 Oct 2015 17:11:58 +0800 Subject: [PATCH 2203/2517] [Translated]RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md --- ...ation and Guest Administration with KVM.md | 190 ----------------- ...ation and Guest Administration with KVM.md | 191 ++++++++++++++++++ 2 files changed, 191 insertions(+), 190 deletions(-) delete mode 100644 sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md create mode 100644 translated/tech/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md diff --git a/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md b/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md deleted file mode 100644 index 6d25bf914f..0000000000 --- a/sources/tech/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md +++ /dev/null @@ -1,190 +0,0 @@ -FSSlc translating - -RHCSA Series: Essentials of Virtualization and Guest Administration with KVM – Part 15 -================================================================================ -If you look up the word virtualize in a dictionary, you will find that it means “to create a virtual (rather than actual) version of something”. In computing, the term virtualization refers to the possibility of running multiple operating systems simultaneously and isolated one from another, on top of the same physical (hardware) system, known in the virtualization schema as host. - -![KVM Virtualization Basics and KVM Guest Administration](http://www.tecmint.com/wp-content/uploads/2015/06/RHCSA-Part15.png) - -RHCSA Series: Essentials of Virtualization and Guest Administration with KVM – Part 15 - -Through the use of the virtual machine monitor (also known as hypervisor), virtual machines (referred to as guests) are provided virtual resources (i.e. CPU, RAM, storage, network interfaces, to name a few) from the underlying hardware. - -With that in mind, it is plain to see that one of the main advantages of virtualization is cost savings (in equipment and network infrastructure and in terms of maintenance effort) and a substantial reduction in the physical space required to accommodate all the necessary hardware. - -Since this brief how-to cannot cover all virtualization methods, I encourage you to refer to the documentation listed in the summary for further details on the subject. - -Please keep in mind that the present article is intended to be a starting point to learn the basics of virtualization in RHEL 7 using [KVM][1] (Kernel-based Virtual Machine) with command-line utilities, and not an in-depth discussion of the topic. - -### Verifying Hardware Requirements and Installing Packages ### - -In order to set up virtualization, your CPU must support it. You can verify whether your system meets the requirements with the following command: - - # grep -E 'svm|vmx' /proc/cpuinfo - -In the following screenshot we can see that the current system (with an AMD microprocessor) supports virtualization, as indicated by svm. If we had an Intel-based processor, we would see vmx instead in the results of the above command. - -![Check KVM Support](http://www.tecmint.com/wp-content/uploads/2015/06/Check-KVM-Support.png) - -Check KVM Support - -In addition, you will need to have virtualization capabilities enabled in the firmware of your host (BIOS or UEFI). - -Now install the necessary packages: - -- qemu-kvm is an open source virtualizer that provides hardware emulation for the KVM hypervisor whereas qemu-img provides a command line tool for manipulating disk images. -- libvirt includes the tools to interact with the virtualization capabilities of the operating system. -- libvirt-python contains a module that permits applications written in Python to use the interface supplied by libvirt. -- libguestfs-tools: miscellaneous system administrator command line tools for virtual machines. -- virt-install: other command-line utilities for virtual machine administration. - - # yum update && yum install qemu-kvm qemu-img libvirt libvirt-python libguestfs-tools virt-install - -Once the installation completes, make sure you start and enable the libvirtd service: - - # systemctl start libvirtd.service - # systemctl enable libvirtd.service - -By default, each virtual machine will only be able to communicate with the rest in the same physical server and with the host itself. To allow the guests to reach other machines inside our LAN and also the Internet, we need to set up a bridge interface in our host (say br0, for example) by, - -1. adding the following line to our main NIC configuration (most likely `/etc/sysconfig/network-scripts/ifcfg-enp0s3`): - - BRIDGE=br0 - -2. creating the configuration file for br0 (/etc/sysconfig/network-scripts/ifcfg-br0) with these contents (note that you may have to change the IP address, gateway address, and DNS information): - - DEVICE=br0 - TYPE=Bridge - BOOTPROTO=static - IPADDR=192.168.0.18 - NETMASK=255.255.255.0 - GATEWAY=192.168.0.1 - NM_CONTROLLED=no - DEFROUTE=yes - PEERDNS=yes - PEERROUTES=yes - IPV4_FAILURE_FATAL=no - IPV6INIT=yes - IPV6_AUTOCONF=yes - IPV6_DEFROUTE=yes - IPV6_PEERDNS=yes - IPV6_PEERROUTES=yes - IPV6_FAILURE_FATAL=no - NAME=br0 - ONBOOT=yes - DNS1=8.8.8.8 - DNS2=8.8.4.4 - -3. finally, enabling packet forwarding by making, in `/etc/sysctl.conf`, - - net.ipv4.ip_forward = 1 - -and loading the changes to the current kernel configuration: - - # sysctl -p - -Note that you may also need to tell firewalld that this kind of traffic should be allowed. Remember that you can refer to the article on that topic in this same series ([Part 11: Network Traffic Control Using FirewallD and Iptables][2]) if you need help to do that. - -### Creating VM Images ### - -By default, VM images will be created to `/var/lib/libvirt/images` and you are strongly advised to not change this unless you really need to, know what you’re doing, and want to handle SELinux settings yourself (such topic is out of the scope of this tutorial but you can refer to Part 13 of the RHCSA series: [Mandatory Access Control Essentials with SELinux][3] if you want to refresh your memory). - -This means that you need to make sure that you have allocated the necessary space in that filesystem to accommodate your virtual machines. - -The following command will create a virtual machine named `tecmint-virt01` with 1 virtual CPU, 1 GB (=1024 MB) of RAM, and 20 GB of disk space (represented by `/var/lib/libvirt/images/tecmint-virt01.img`) using the rhel-server-7.0-x86_64-dvd.iso image located inside /home/gacanepa/ISOs as installation media and the br0 as network bridge: - - # virt-install \ - --network bridge=br0 - --name tecmint-virt01 \ - --ram=1024 \ - --vcpus=1 \ - --disk path=/var/lib/libvirt/images/tecmint-virt01.img,size=20 \ - --graphics none \ - --cdrom /home/gacanepa/ISOs/rhel-server-7.0-x86_64-dvd.iso - --extra-args="console=tty0 console=ttyS0,115200" - -If the installation file was located in a HTTP server instead of an image stored in your disk, you will have to replace the –cdrom flag with –location and indicate the address of the online repository. - -As for the –graphics none option, it tells the installer to perform the installation in text-mode exclusively. You can omit that flag if you are using a GUI interface and a VNC window to access the main VM console. Finally, with –extra-args we are passing kernel boot parameters to the installer that set up a serial VM console. - -The installation should now proceed as a regular (real) server now. If not, please review the steps listed above. - -### Managing Virtual Machines ### - -These are some typical administration tasks that you, as a system administrator, will need to perform on your virtual machines. Note that all of the following commands need to be run from your host: - -**1. List all VMs:** - - # virsh list --all - -From the output of the above command you will have to note the Id for the virtual machine (although it will also return its name and current status) because you will need it for most administration tasks related to a particular VM. - -**2. Display information about a guest:** - - # virsh dominfo [VM Id] - -**3. Start, restart, or stop a guest operating system:** - - # virsh start | reboot | shutdown [VM Id] - -**4. Access a VM’s serial console if networking is not available and no X server is running on the host:** - - # virsh console [VM Id] - -**Note** that this will require that you add the serial console configuration information to the `/etc/grub.conf` file (refer to the argument passed to the –extra-args option when the VM was created). - -**5. Modify assigned memory or virtual CPUs:** - -First, shutdown the guest: - - # virsh shutdown [VM Id] - -Edit the VM configuration for RAM: - - # virsh edit [VM Id] - -Then modify - - [Memory size here without brackets] - -Restart the VM with the new settings: - - # virsh create /etc/libvirt/qemu/tecmint-virt01.xml - -Finally, change the memory dynamically: - - # virsh setmem [VM Id] [Memory size here without brackets] - -For CPU: - - # virsh edit [VM Id] - -Then modify - - [Number of CPUs here without brackets] - -For further commands and details, please refer to table 26.1 in Chapter 26 of the RHEL 5 Virtualization guide (that guide, though a bit old, includes an exhaustive list of virsh commands used for guest administration). - -### SUMMARY ### - -In this article we have covered some basic aspects of virtualization with KVM in RHEL 7, which is both a vast and a fascinating topic, and I hope it will be helpful as a starting guide for you to later explore more advanced subjects found in the official [RHEL virtualization][4] getting started and [deployment / administration guides][5]. - -In addition, you can refer to the preceding articles in [this KVM series][6] in order to clarify or expand some of the concepts explained here. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/kvm-virtualization-basics-and-guest-administration/ - -作者:[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.linux-kvm.org/page/Main_Page -[2]:http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in-firewall/ -[3]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ -[4]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Getting_Started_Guide/index.html -[5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/index.html -[6]:http://www.tecmint.com/install-and-configure-kvm-in-linux/ diff --git a/translated/tech/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md b/translated/tech/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md new file mode 100644 index 0000000000..c4f83fee61 --- /dev/null +++ b/translated/tech/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md @@ -0,0 +1,191 @@ +RHCSA 系列: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15 +================================================================================ +假如你在词典中查一下单词 “virtualize”,你将会发现它的意思是 “创造某些事物的一个虚拟物(而非真实的)”。在计算机行业中,术语虚拟化指的是:在相同的物理(硬件)系统上,同时运行多个操作系统,且这几个系统相互隔离的可能性,而那个硬件在虚拟化架构中被称作宿主机(host)。 + +![KVM 虚拟化基础和 KVM 虚拟机管理](http://www.tecmint.com/wp-content/uploads/2015/06/RHCSA-Part15.png) + +RHCSA 系类: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15 + +通过使用虚拟机监视器(也被称为虚拟机管理程序 hypervisor),虚拟机(被称为 guest)由底层的硬件来提供虚拟资源(举几个例来说如 CPU,RAM,存储介质,网络接口等)。 + +考虑到这一点就可以清楚地看出,虚拟化的主要优点是节约成本(在设备和网络基础设施,及维护工作等方面)和显著地减少容纳所有必要硬件所需的物理空间。 + +由于这个简单的指南不能涵盖所有的虚拟化方法,我鼓励你参考在总结部分中列出的文档,以此对这个话题做更深入的了解。 + +请记住当前文章只是用于在 RHEL 7 中用命令行工具使用 [KVM][1] (Kernel-based Virtual Machine) 学习虚拟化基础知识的一个起点,而并不是对这个话题的深入探讨。 + +### 检查硬件要求并安装软件包 ### + +为了设置虚拟化,你的 CPU 必须能够支持它。你可以使用下面的命令来查看你的系统是否满足这个要求: + + # grep -E 'svm|vmx' /proc/cpuinfo + +在下面的截图中,我们可以看到当前的系统(带有一个 AMD 的微处理器)支持虚拟化,svm 字样的存在暗示了这一点。假如我们有一个 Intel 系列的处理器,我们将会看到上面命令的结果将会出现 vmx 字样。 + +![检查 KVM 支持](http://www.tecmint.com/wp-content/uploads/2015/06/Check-KVM-Support.png) + +检查 KVM 支持 + +另外,你需要在你宿主机的硬件(BIOS 或 UEFI)中开启虚拟化。 + +现在,安装必要的软件包: + +- qemu-kvm 是一个开源的虚拟机程序,为 KVM 虚拟机监视器提供硬件仿真,而 qemu-img 则提供了一个操纵磁盘镜像的命令行工具。 +- libvirt 包含与操作系统的虚拟化功能交互的工具。 +- libvirt-python 包含一个模块,它允许用 Python 写的应用来使用由 libvirt 提供的接口。 +- libguestfs-tools 包含各式各样的针对虚拟机的系统管理员命令行工具。 +- virt-install 包含针对虚拟机管理的其他命令行工具。 + + + # yum update && yum install qemu-kvm qemu-img libvirt libvirt-python libguestfs-tools virt-install + +一旦安装完全,请确保你启动并开启了 libvirtd 服务: + + # systemctl start libvirtd.service + # systemctl enable libvirtd.service + +默认情况下,每个虚拟机将只能够与相同的物理服务器和宿主机自身通信。要使得虚拟机能够访问位于局域网或因特网中的其他机器,我们需要像下面这样在我们的宿主机上设置一个桥接接口(比如说 br0): + +1. 添加下面的一行到我们的 NIC 主配置中(一般是 `/etc/sysconfig/network-scripts/ifcfg-enp0s3` 这个文件): + + BRIDGE=br0 + +2. 使用下面的内容(注意,你可能必须更改 IP 地址,网关地址和 DNS 信息)为 br0 创建一个配置文件(`/etc/sysconfig/network-scripts/ifcfg-br0`): + + + DEVICE=br0 + TYPE=Bridge + BOOTPROTO=static + IPADDR=192.168.0.18 + NETMASK=255.255.255.0 + GATEWAY=192.168.0.1 + NM_CONTROLLED=no + DEFROUTE=yes + PEERDNS=yes + PEERROUTES=yes + IPV4_FAILURE_FATAL=no + IPV6INIT=yes + IPV6_AUTOCONF=yes + IPV6_DEFROUTE=yes + IPV6_PEERDNS=yes + IPV6_PEERROUTES=yes + IPV6_FAILURE_FATAL=no + NAME=br0 + ONBOOT=yes + DNS1=8.8.8.8 + DNS2=8.8.4.4 + +3. 最后通过使得文件`/etc/sysctl.conf` 中的 + + net.ipv4.ip_forward = 1 + +来开启包转发并加载更改到当前的内核配置中: + + # sysctl -p + +注意,你可能还需要告诉 firewalld 这类的流量应当被允许通过防火墙。假如你需要这样做,记住你可以参考这个系列的 [Part 11: 使用 firewalld 和 iptables 来进行网络流量控制][2]。 + +### 创建虚拟机镜像 ### + +默认情况下,虚拟机镜像将会被创建到 `/var/lib/libvirt/images` 中,且强烈建议你不要更改这个设定,除非你真的需要那么做且知道你在做什么,并能自己处理有关 SELinux 的设定(这个话题已经超出了本教程的讨论范畴,但你可以参考这个系列的第 13 部分[使用 SELinux 来进行强制访问控制][3],假如你想更新你的知识的话)。 + +这意味着你需要确保你在文件系统中分配了必要的空间来容纳你的虚拟机。 + +下面的命令将使用位于 `/home/gacanepa/ISOs`目录下的 rhel-server-7.0-x86_64-dvd.iso 镜像文件和 br0 这个网桥来创建一个名为 `tecmint-virt01` 的虚拟机,它有一个虚拟 CPU,1 GB(=1024 MB)的 RAM,20 GB 的磁盘空间(由`/var/lib/libvirt/images/tecmint-virt01.img`所代表): + + + # virt-install \ + --network bridge=br0 + --name tecmint-virt01 \ + --ram=1024 \ + --vcpus=1 \ + --disk path=/var/lib/libvirt/images/tecmint-virt01.img,size=20 \ + --graphics none \ + --cdrom /home/gacanepa/ISOs/rhel-server-7.0-x86_64-dvd.iso + --extra-args="console=tty0 console=ttyS0,115200" + +假如安装文件位于一个 HTTP 服务器上,而不是存储在你磁盘中的镜像中,你必须将上面的 `-cdrom` 替换为 `-location`,并明显地指出在线存储仓库的地址。 + +至于上面的 `–graphics none` 选项,它告诉安装程序只以文本模式执行安装过程。假如你使用一个 GUI 界面和一个 VNC 窗口来访问主虚拟机控制台,则可以省略这个选项。最后,使用 `–extra-args`参数,我们将传递内核启动参数给安装程序,以此来设置一个串行的虚拟机控制台。 + +现在,安装应当作为一个正常的(真实的)服务来执行了。假如没有,请查看上面列出的步骤。 + +### 管理虚拟机 ### + +作为一个系统管理员,还有一些典型的管理任务需要你在虚拟机上去完成。注:下面所有的命令都需要在你的宿主机上运行: + +**1. 列出所有的虚拟机:** + + # virsh list --all + +你必须留意上面命令输出中的虚拟机 ID(尽管上面的命令还会返回虚拟机的名称和当前的状态),因为你需要它来执行有关某个虚拟机的大多数管理任务。 + +**2. 显示某个虚拟机的信息:** + + # virsh dominfo [VM Id] + +**3. 开启,重启或停止一个虚拟机操作系统:** + + # virsh start | reboot | shutdown [VM Id] + +**4. 假如网络无法连接且在宿主机上没有运行 X 服务器,可以使用下面的目录来访问虚拟机的串行控制台:** + + # virsh console [VM Id] + +**注** 这需要你添加一个串行控制台配置信息到 `/etc/grub.conf` 文件中(参考刚才创建虚拟机时传递给`–extra-args`选项的参数)。 + +**5. 修改分配的内存或虚拟 CPU:** + +首先,关闭虚拟机: + + # virsh shutdown [VM Id] + +为 RAM 编辑虚拟机的配置: + + # virsh edit [VM Id] + +然后更改 + + [内存大小,这里没有括号] + +使用新的设定重启虚拟机: + + # virsh create /etc/libvirt/qemu/tecmint-virt01.xml + +最后,可以使用下面的命令来动态地改变内存的大小: + + # virsh setmem [VM Id] [内存大小,这里没有括号] + +对于 CPU,使用: + + # virsh edit [VM Id] + +然后更改 + + [CPU 数目,这里没有括号] + +至于更深入的命令和细节,请参考 RHEL 5 虚拟化指南(这个指南尽管有些陈旧,但包括了用于管理虚拟机的 virsh 命令的详尽清单)的第 26 章里的表 26.1。 + +### 总结 ### + +在这篇文章中,我们涵盖了在 RHEL 7 中如何使用 KVM 和虚拟化的一些基本概念,这个话题是一个广泛且令人着迷的话题。并且我希望它能成为你在随后阅读官方的 [RHEL 虚拟化入门][4] 和 [RHEL 虚拟化部署和管理指南][5] ,探索更高级的主题时的起点教程,并给你带来帮助。 + +另外,为了分辨或拓展这里解释的某些概念,你还可以参考先前包含在 [KVM 系列][6] 中的文章。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/kvm-virtualization-basics-and-guest-administration/ + +作者:[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.linux-kvm.org/page/Main_Page +[2]:http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in-firewall/ +[3]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ +[4]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Getting_Started_Guide/index.html +[5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/index.html +[6]:http://www.tecmint.com/install-and-configure-kvm-in-linux/ From d497c369e5ca20a1c96f0d597772c20ee3a19e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Mon, 5 Oct 2015 18:27:40 +0800 Subject: [PATCH 2204/2517] Create 20151005 pyinfo() A good looking phpinfo-like python script.md --- ...good looking phpinfo-like python script.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md diff --git a/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md b/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md new file mode 100644 index 0000000000..3f3e3291eb --- /dev/null +++ b/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md @@ -0,0 +1,28 @@ +pyinfo() A good looking phpinfo-like python script +================================================================================ +Being a native php guy, I'm used to having phpinfo(), giving me easy access to php.ini settings and loaded modules etc. So ofcourse I wanted to call the not existing pyinfo() function, to no avail. My fingers quickly pressed CTRL-E to google for a implementation of it, someone must've ported it already? + +Yes, someone did. But oh my was it ugly. Preposterous! Since I cannot stand ugly layouts *cough*, I just had to build my own. So I used the code I found and cleaned up the layout to make it better. The official python website isnt that bad layout-wise, so why not steal their colors and background images? Yes that sounds like a plan to me. + +[Gits Here][1] | [Download here][2] | [Example here][3] + +Mind you, I only ran it on a python 2.6.4 server, so anything else is at your own risk (but it should be no problem to port it to any other version). To get it working, just import the file and call pyinfo() while catching the function's return value. Print that on the screen. Huzzah! + +For those who did not get that and are using [mod_wsgi][4], run it using something like this (replace that path ofcourse): +``` +def application(environ, start_response): + import sys + path = 'YOUR_WWW_ROOT_DIRECTORY' + if path not in sys.path: + sys.path.append(path) + from pyinfo import pyinfo + output = pyinfo() + start_response('200 OK', [('Content-type', 'text/html')]) + return [output] +``` + + +[1]:https://gist.github.com/951825#file_pyinfo.py +[2]:http://bran.name/dump/pyinfo.zip +[3]:http://bran.name/dump/pyinfo/index.py +[4]:http://code.google.com/p/modwsgi/ From 076267735349c81817e52da3c73a4397f1f66170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Mon, 5 Oct 2015 18:32:58 +0800 Subject: [PATCH 2205/2517] =?UTF-8?q?=E9=80=89=E9=A2=98=EF=BC=9Apyinfo()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 20151005 pyinfo() A good looking phpinfo-like python script --- ...o() A good looking phpinfo-like python script.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md b/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md index 3f3e3291eb..7b38244e76 100644 --- a/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md +++ b/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md @@ -20,8 +20,19 @@ def application(environ, start_response): start_response('200 OK', [('Content-type', 'text/html')]) return [output] ``` - +--- +via:http://bran.name/articles/pyinfo-a-good-looking-phpinfo-like-python-script/ + +作者:[Bran van der Meer][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译, +[Linux中国](https://linux.cn/) 荣誉推出 + + +[a]:http://bran.name/resume/ [1]:https://gist.github.com/951825#file_pyinfo.py [2]:http://bran.name/dump/pyinfo.zip [3]:http://bran.name/dump/pyinfo/index.py From fb472172c9c1c018ac810799c7d988af5acea5cb Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 7 Oct 2015 10:39:04 +0800 Subject: [PATCH 2206/2517] PUB:RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc 这个系列终于完结啦。辛苦。 --- ...ation and Guest Administration with KVM.md | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) rename {translated/tech => published/RHCSA Series}/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md (70%) diff --git a/translated/tech/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md b/published/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md similarity index 70% rename from translated/tech/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md rename to published/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md index c4f83fee61..03ea45452e 100644 --- a/translated/tech/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md +++ b/published/RHCSA Series/RHCSA Series--Part 15--Essentials of Virtualization and Guest Administration with KVM.md @@ -1,18 +1,19 @@ -RHCSA 系列: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15 +RHCSA 系列(十五): 虚拟化基础和使用 KVM 进行虚拟机管理 ================================================================================ -假如你在词典中查一下单词 “virtualize”,你将会发现它的意思是 “创造某些事物的一个虚拟物(而非真实的)”。在计算机行业中,术语虚拟化指的是:在相同的物理(硬件)系统上,同时运行多个操作系统,且这几个系统相互隔离的可能性,而那个硬件在虚拟化架构中被称作宿主机(host)。 + +假如你在词典中查一下单词 “虚拟化(virtualize)”,你将会发现它的意思是 “创造某些事物的一个虚拟物(而非真实的)”。在计算机行业中,术语虚拟化(virtualization)指的是:在相同的物理(硬件)系统上,同时运行多个操作系统,且这几个系统相互隔离的**可能性**,而那个硬件在虚拟化架构中被称作宿主机(host)。 ![KVM 虚拟化基础和 KVM 虚拟机管理](http://www.tecmint.com/wp-content/uploads/2015/06/RHCSA-Part15.png) -RHCSA 系类: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15 +*RHCSA 系列: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15* -通过使用虚拟机监视器(也被称为虚拟机管理程序 hypervisor),虚拟机(被称为 guest)由底层的硬件来提供虚拟资源(举几个例来说如 CPU,RAM,存储介质,网络接口等)。 +通过使用虚拟机监视器(也被称为虚拟机管理程序(hypervisor)),虚拟机(被称为 guest)由底层的硬件来供给虚拟资源(举几个例子来说,如 CPU,RAM,存储介质,网络接口等)。 考虑到这一点就可以清楚地看出,虚拟化的主要优点是节约成本(在设备和网络基础设施,及维护工作等方面)和显著地减少容纳所有必要硬件所需的物理空间。 由于这个简单的指南不能涵盖所有的虚拟化方法,我鼓励你参考在总结部分中列出的文档,以此对这个话题做更深入的了解。 -请记住当前文章只是用于在 RHEL 7 中用命令行工具使用 [KVM][1] (Kernel-based Virtual Machine) 学习虚拟化基础知识的一个起点,而并不是对这个话题的深入探讨。 +请记住当前文章只是用于在 RHEL 7 中用命令行工具使用 [KVM][1] (Kernel-based Virtual Machine(基于内核的虚拟机)) 学习虚拟化基础知识的一个起点,而并不是对这个话题的深入探讨。 ### 检查硬件要求并安装软件包 ### @@ -24,7 +25,7 @@ RHCSA 系类: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15 ![检查 KVM 支持](http://www.tecmint.com/wp-content/uploads/2015/06/Check-KVM-Support.png) -检查 KVM 支持 +*检查 KVM 支持* 另外,你需要在你宿主机的硬件(BIOS 或 UEFI)中开启虚拟化。 @@ -36,21 +37,22 @@ RHCSA 系类: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15 - libguestfs-tools 包含各式各样的针对虚拟机的系统管理员命令行工具。 - virt-install 包含针对虚拟机管理的其他命令行工具。 +命令如下: # yum update && yum install qemu-kvm qemu-img libvirt libvirt-python libguestfs-tools virt-install -一旦安装完全,请确保你启动并开启了 libvirtd 服务: +一旦安装完成,请确保你启动并开启了 libvirtd 服务: # systemctl start libvirtd.service # systemctl enable libvirtd.service -默认情况下,每个虚拟机将只能够与相同的物理服务器和宿主机自身通信。要使得虚拟机能够访问位于局域网或因特网中的其他机器,我们需要像下面这样在我们的宿主机上设置一个桥接接口(比如说 br0): +默认情况下,每个虚拟机将只能够与放在相同的物理服务器上的虚拟机以及宿主机自身通信。要使得虚拟机能够访问位于局域网或因特网中的其他机器,我们需要像下面这样在我们的宿主机上设置一个桥接接口(比如说 br0): -1. 添加下面的一行到我们的 NIC 主配置中(一般是 `/etc/sysconfig/network-scripts/ifcfg-enp0s3` 这个文件): +1、 添加下面的一行到我们的 NIC 主配置中(类似 `/etc/sysconfig/network-scripts/ifcfg-enp0s3` 这样的文件): BRIDGE=br0 -2. 使用下面的内容(注意,你可能必须更改 IP 地址,网关地址和 DNS 信息)为 br0 创建一个配置文件(`/etc/sysconfig/network-scripts/ifcfg-br0`): +2、 使用下面的内容(注意,你可能需要更改 IP 地址,网关地址和 DNS 信息)为 br0 创建一个配置文件(`/etc/sysconfig/network-scripts/ifcfg-br0`): DEVICE=br0 @@ -75,7 +77,7 @@ RHCSA 系类: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15 DNS1=8.8.8.8 DNS2=8.8.4.4 -3. 最后通过使得文件`/etc/sysctl.conf` 中的 +3、 最后在文件`/etc/sysctl.conf` 中设置: net.ipv4.ip_forward = 1 @@ -83,11 +85,11 @@ RHCSA 系类: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15 # sysctl -p -注意,你可能还需要告诉 firewalld 这类的流量应当被允许通过防火墙。假如你需要这样做,记住你可以参考这个系列的 [Part 11: 使用 firewalld 和 iptables 来进行网络流量控制][2]。 +注意,你可能还需要告诉 firewalld 让这类的流量应当被允许通过防火墙。假如你需要这样做,记住你可以参考这个系列的 [使用 firewalld 和 iptables 来控制网络流量][2]。 ### 创建虚拟机镜像 ### -默认情况下,虚拟机镜像将会被创建到 `/var/lib/libvirt/images` 中,且强烈建议你不要更改这个设定,除非你真的需要那么做且知道你在做什么,并能自己处理有关 SELinux 的设定(这个话题已经超出了本教程的讨论范畴,但你可以参考这个系列的第 13 部分[使用 SELinux 来进行强制访问控制][3],假如你想更新你的知识的话)。 +默认情况下,虚拟机镜像将会被创建到 `/var/lib/libvirt/images` 中,且强烈建议你不要更改这个设定,除非你真的需要那么做且知道你在做什么,并能自己处理有关 SELinux 的设定(这个话题已经超出了本教程的讨论范畴,但你可以参考这个系列的第 13 部分 [使用 SELinux 来进行强制访问控制][3],假如你想更新你的知识的话)。 这意味着你需要确保你在文件系统中分配了必要的空间来容纳你的虚拟机。 @@ -104,11 +106,11 @@ RHCSA 系类: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15 --cdrom /home/gacanepa/ISOs/rhel-server-7.0-x86_64-dvd.iso --extra-args="console=tty0 console=ttyS0,115200" -假如安装文件位于一个 HTTP 服务器上,而不是存储在你磁盘中的镜像中,你必须将上面的 `-cdrom` 替换为 `-location`,并明显地指出在线存储仓库的地址。 +假如安装文件位于一个 HTTP 服务器上,而不是存储在你磁盘中的镜像中,你必须将上面的 `-cdrom` 替换为 `-location`,并明确地指出在线存储仓库的地址。 -至于上面的 `–graphics none` 选项,它告诉安装程序只以文本模式执行安装过程。假如你使用一个 GUI 界面和一个 VNC 窗口来访问主虚拟机控制台,则可以省略这个选项。最后,使用 `–extra-args`参数,我们将传递内核启动参数给安装程序,以此来设置一个串行的虚拟机控制台。 +至于上面的 `–graphics none` 选项,它告诉安装程序只以文本模式执行安装过程。假如你使用一个 GUI 界面和一个 VNC 窗口来访问主虚拟机控制台,则可以省略这个选项。最后,使用 `–extra-args` 参数,我们将传递内核启动参数给安装程序,以此来设置一个串行的虚拟机控制台。 -现在,安装应当作为一个正常的(真实的)服务来执行了。假如没有,请查看上面列出的步骤。 +现在,所安装的虚拟机应当可以作为一个正常的(真实的)服务来运行了。假如没有,请查看上面列出的步骤。 ### 管理虚拟机 ### @@ -128,11 +130,11 @@ RHCSA 系类: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15 # virsh start | reboot | shutdown [VM Id] -**4. 假如网络无法连接且在宿主机上没有运行 X 服务器,可以使用下面的目录来访问虚拟机的串行控制台:** +**4. 假如网络无法连接且在宿主机上没有运行 X 服务器,可以使用下面的命令来访问虚拟机的串行控制台:** # virsh console [VM Id] -**注** 这需要你添加一个串行控制台配置信息到 `/etc/grub.conf` 文件中(参考刚才创建虚拟机时传递给`–extra-args`选项的参数)。 +**注**:这需要你添加一个串行控制台配置信息到 `/etc/grub.conf` 文件中(参考刚才创建虚拟机时传递给`-extra-args`选项的参数)。 **5. 修改分配的内存或虚拟 CPU:** @@ -146,7 +148,7 @@ RHCSA 系类: 虚拟化基础和使用 KVM 进行虚拟机管理 – Part 15 然后更改 - [内存大小,这里没有括号] + [内存大小,注意不要加上方括号] 使用新的设定重启虚拟机: @@ -178,14 +180,14 @@ via: http://www.tecmint.com/kvm-virtualization-basics-and-guest-administration/ 作者:[Gabriel Cánepa][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者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.linux-kvm.org/page/Main_Page -[2]:http://www.tecmint.com/firewalld-vs-iptables-and-control-network-traffic-in-firewall/ -[3]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ +[2]:https://linux.cn/article-6315-1.html +[3]:https://linux.cn/article-6339-1.html [4]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Getting_Started_Guide/index.html [5]:https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/index.html [6]:http://www.tecmint.com/install-and-configure-kvm-in-linux/ From b6d889890710d20ba1acef3ec7db9c71e668032d Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 7 Oct 2015 23:15:37 +0800 Subject: [PATCH 2207/2517] PUB:20150921 Meet The New Ubuntu 15.10 Default Wallpaper @geekpi --- ... The New Ubuntu 15.10 Default Wallpaper.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/share => published}/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md (70%) diff --git a/translated/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md b/published/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md similarity index 70% rename from translated/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md rename to published/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md index 53751b8449..dc27b3609c 100644 --- a/translated/share/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md +++ b/published/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md @@ -1,8 +1,8 @@ -与新的Ubuntu 15.10默认壁纸相遇 +看看新的 Ubuntu 15.10 默认壁纸 ================================================================================ -**全新的Ubuntu 15.10 Wily Werewolf默认壁纸已经亮相 ** +**全新的Ubuntu 15.10 Wily Werewolf默认壁纸已经亮相** -乍一看你几乎无法发现与今天4月发布的Ubuntu 15.04中收到折纸启发的‘Suru’设计有什么差别。但是仔细看你就会发现默认背景有一些细微差别。 +乍一看你几乎无法发现与今天4月发布的Ubuntu 15.04中受到折纸启发的‘Suru’设计有什么差别。但是仔细看你就会发现默认背景有一些细微差别。 其中一点是更淡,受到由左上角图片发出的橘黄色光的帮助。保持了角褶皱和色块,但是增加了块和矩形部分。 @@ -10,25 +10,25 @@ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/09/ubuntu-1510-wily-werewolf-wallpaper.jpg) -Ubuntu 15.10 默认桌面背景 +*Ubuntu 15.10 默认桌面背景* -只是为了显示改变,这个是Ubuntu 15.04的默认壁纸作为比较: +为了凸显变化,这个是Ubuntu 15.04的默认壁纸作为比较: ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/03/suru-desktop-wallpaper-ubuntu-vivid.jpg) -Ubuntu 15.04 默认壁纸 +*Ubuntu 15.04 默认壁纸* ### 下载Ubuntu 15.10 壁纸 ### -如果你正运行的是Ubuntu 15.10 Wily Werewolf每日编译版本,那么你无法看到这个默认壁纸:设计已经亮相但是还没有打包到Wily中。 +如果你正运行的是Ubuntu 15.10 Wily Werewolf每日构建版本,那么你无法看到这个默认壁纸:设计已经亮相但是还没有打包到Wily中。 你不必等到10月份来使用新的设计来作为你的桌面背景。你可以点击下面的按钮下载4096×2304高清壁纸。 - [下载Ubuntu 15.10新的默认壁纸][1] -最后,如我们每次在有新壁纸时说的,你不必在意发布版品牌和设计细节。如果壁纸不和你的口味或者不想永远用它,轻易地就换掉毕竟这不是Ubuntu Phone! +最后,如我们每次在有新壁纸时说的,你不必在意发布版品牌和设计细节。如果壁纸不合你的口味或者不想永远用它,轻易地就换掉,毕竟这不是Ubuntu Phone! -**你是你版本的粉丝么?在评论中让我们知道 ** +**你是新版本的粉丝么?在评论中让我们知道** -------------------------------------------------------------------------------- @@ -36,7 +36,7 @@ via: http://www.omgubuntu.co.uk/2015/09/ubuntu-15-10-wily-werewolf-default-wallp 作者:[Joey-Elijah Sneddon][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a410e2d6b53e12fa1c251fec0e5d6ea3acd959d9 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 8 Oct 2015 00:04:52 +0800 Subject: [PATCH 2208/2517] =?UTF-8?q?20151007-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ource Media Player MPlayer 1.2 Released.md | 62 +++++++++++++ ...l Script Opens In Text Editor In Ubuntu.md | 39 ++++++++ ...wnload Videos Using youtube-dl In Linux.md | 93 +++++++++++++++++++ ...7 Productivity Tools And Tips For Linux.md | 78 ++++++++++++++++ 4 files changed, 272 insertions(+) create mode 100644 sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md create mode 100644 sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md create mode 100644 sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md create mode 100644 sources/tech/20151007 Productivity Tools And Tips For Linux.md diff --git a/sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md b/sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md new file mode 100644 index 0000000000..518a2a4135 --- /dev/null +++ b/sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md @@ -0,0 +1,62 @@ +Open Source Media Player MPlayer 1.2 Released +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/MPlayer-1.2.jpg) + +Almost three years after [MPlaayer][1] 1.1, the new version of MPlayer has been released last week. MPlayer 1.2 brings up support for many new codecs in this release. + +MPlayer is a cross-platform, open source media player. Its name is an abbreviation of “Movie Player”. MPlayer has been one of the oldest video players for Linux and during last 15 years, it has inspired a number of other media players. Some of the famous media players based on MPlayer are: + +- [MPV][2] +- SMPlayer +- KPlayer +- GNOME MPlayer +- Deepin Player + +#### What’s new in MPlayer 1.2? #### + +- Compatibility with FFmpeg 2.8 +- VDPAU hardware acceleration for H.265/HEVC +- A number of new codecs supported via FFmpeg +- Improvements in TV and DVB support +- GUI improvements +- external dependency on libdvdcss/libdvdnav packages + +#### Install MPlayer 1.2 in Linux #### + +Most Linux distributions are still having MPlayer 1.1. If you want to use the new MPlayer 1.2, you’ll have to compile it from the source code which could be tricky at times for beginners. + +I have used Ubuntu 15.04 for the installation of MPlayer 1.2. Installation instructions will remain the same for all Linux distributions except the part where you need to install yasm. + +Open a terminal and use the following commands: + + wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.2.tar.xz + + tar xvf MPlayer-1.1.1.tar.xz + + cd MPlayer-1.2 + + sudo apt-get install yasm + + ./configure + +When you run make, it will throw a number of things on the terminal screen and takes some time to build it. Have patience. + + make + + sudo make install + +If you feel uncomfortable using the source code, I advise you to either wait forMPlayer 1.2 to land in the repositories of your Linux distribution or use an alternate like MPV. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/mplayer-1-2-released/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:https://www.mplayerhq.hu/ +[2]:http://mpv.io/ \ No newline at end of file diff --git a/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md b/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md new file mode 100644 index 0000000000..95f7bb4ee5 --- /dev/null +++ b/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md @@ -0,0 +1,39 @@ +Fix Shell Script Opens In Text Editor In Ubuntu +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Run-Shell-Script-on-Double-Click.jpg) + +When you double click on a shell script (.sh file) what do you expect? The normal expectation would be that it is executed. But this might not be the case in Ubuntu, or I should better say in case of Files (Nautilus). You may go crazy yelling “Run, File, Run”, but the file won’t run and instead it gets opened in Gedit. + +I know that you would say, does the file has execute permission? And I say, yes. The shell script has execute permission but still if I double click on it, it is opened in a text editor. I don’t want it and if you are facing the same issue, I assume that even you don’t want it. + +I know that you would have been advised to run it in the terminal and I know that it would work but that’s not an excuse for the GUI way to not work. Is it? + +In this quick tutorial, we shall see **how to make shell script run by double clicking on it**. + +#### Fix Shell script opens in text editor in Ubuntu #### + +The reason why shell scripts are opening in text editor is the default behavior set in Files (file manager in Ubuntu). In earlier versions, it would ask you if you want to run the file or open for editing. The default behavior has been changed in later versions. + +To fix it, go in file manager and from the top menu and click on **Preference**: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/execute-shell-program-ubuntu-1.png) + +Next in **Files preferences**, go to **Behavior** tab and you’ll see the option of “**Executables Text Files**“. + +By default, it would have been set to “View executable text files when they are opened”. I would advise you to change it to “Ask each time” so that you’ll have the choice whether to execute it or edit but of course you can set it by default for execution. Your choice here really. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/execute-shell-program-ubuntu-2.png) + +I hope this quick tip helped you to fix this little ‘issue’. Questions and suggestions are always welcomed. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/shell-script-opens-text-editor/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ \ No newline at end of file diff --git a/sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md b/sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md new file mode 100644 index 0000000000..fa7dcbed6c --- /dev/null +++ b/sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md @@ -0,0 +1,93 @@ +How To Download Videos Using youtube-dl In Linux +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Download-YouTube-Videos.jpeg) + +I know you have already seen [how to download YouTube videos][1]. But those tools were mostly GUI ways. I am going to show you how to download YouTube videos via terminal using youtube-dl. + +### [youtube-dl][2] ### + +youtube-dl is a Python based small command-line tool that allows to download videos from YouTube.com, Dailymotion, Google Video, Photobucket, Facebook, Yahoo, Metacafe, Depositfiles and few more similar sites. It written in pygtk and requires Python interpreter to run this program, it’s not platform restricted. It should run on any Unix, Windows or in Mac OS X based systems. + +The youtube-dl tool supports resuming interrupted downloads. If youtube-dl is killed (for example by Ctrl-C or due to loss of Internet connectivity) in the middle of download, you can simply re-run it with the same YouTube video url. It will automatically resume the unfinished download, as long as a partial download is present in the current directory. Which means, you don’t need a [download][3] manager for resuming downloads. + +#### Installing youtube-dl #### + +If you are running Ubuntu based Linux distribution, you can install it using this command: + + sudo apt-get install youtube-dl + +For any Linux distribution, you can quickly install youtube-dl on your system through the command line interface with: + + sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O/usr/local/bin/youtube-dl + +After fetching the file, you need to set a executable permission on the script to execute properly. + + sudo chmod a+rx /usr/local/bin/youtube-dl + +#### Use YouTube-DL to Download Videos: #### + +To download a video file, simply run the following command. Where “VIDEO_URL” is the url of the video that you want to download. + + youtube-dl VIDEO_URL + +#### Download YouTube Videos in Multiple Formats: #### + +These days YouTube videos have different resolutions, you first need to check available video formats of a given YouTube video. For that run youtube-dl with “-F” option. It will show you a list of available formats. + + youtube-dl -F http://www.youtube.com/watch?v=BlXaGWbFVKY + +It’s output will be like: + + Setting language + BlXaGWbFVKY: Downloading video webpage + BlXaGWbFVKY: Downloading video info webpage + BlXaGWbFVKY: Extracting video information + Available formats: + 37 : mp4 [1080×1920] + 46 : webm [1080×1920] + 22 : mp4 [720×1280] + 45 : webm [720×1280] + 35 : flv [480×854] + 44 : webm [480×854] + 34 : flv [360×640] + 18 : mp4 [360×640] + 43 : webm [360×640] + 5 : flv [240×400] + 17 : mp4 [144×176] + +Now among the available video formats, choose one that you like. For example, if you want to download it in MP4 version, you should use: + + youtube-dl -f 17 http://www.youtube.com/watch?v=BlXaGWbFVKY + +#### Download subtitles of videos using youtube-dl #### + +First check if there are subtitles available for the video. To list all subs for a video, use the command beelow: + + youtube-dl --list-subs https://www.youtube.com/watch?v=Ye8mB6VsUHw + +To download all subs, but not the video: + + youtube-dl --all-subs --skip-download https://www.youtube.com/watch?v=Ye8mB6VsUHw + +#### Download entire playlist #### + +To download a playlist, simply run the following command. Where “playlist_url” is the url of the playlist that ou want to download. + + youtube-dl -cit playlist_url + +youtube-dl is a versatile command line tool and provides a number of functionalities. No wonder it is such a popular command line tool. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/download-youtube-linux/ + +作者:[alimiracle][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/ali/ +[1]:http://itsfoss.com/download-youtube-videos-ubuntu/ +[2]:https://rg3.github.io/youtube-dl/ +[3]:http://itsfoss.com/xtreme-download-manager-install/ \ No newline at end of file diff --git a/sources/tech/20151007 Productivity Tools And Tips For Linux.md b/sources/tech/20151007 Productivity Tools And Tips For Linux.md new file mode 100644 index 0000000000..7aa53de511 --- /dev/null +++ b/sources/tech/20151007 Productivity Tools And Tips For Linux.md @@ -0,0 +1,78 @@ +Productivity Tools And Tips For Linux +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Productivity-Tips-Linux.jpg) + +Since productivity in itself is a subjective term, I am not going into the details of what “productivity” I am talking about here. I am going to show you some tools and tips that could help you to focus better, be efficient and save time while working in Linux. + +### Productivity tools and tips for Linux ### + +Again, I am using Ubuntu at the time of writing this article. But the productivity tools and tips I am going to show you here should be applicable to most of the Linux distributions out there. + +#### Ambient Music #### + +[Music impacts productivity][2]. It is an open secret. From psychologists to management gurus, all have been advising to use ambient noise to feel relaxed and concentrate on your work. I am not going to argue with it because it works for me. I put my headphones on and listening to the birds chirping and wind blows indeed helps me in relaxing. + +In Linux, I use ANoise player for ambient noise player. Thanks to the official PPA provided, you can easily [install Ambient Noise player in Ubuntu][2] and other Ubuntu based Linux distributions. Installing it let’s you play the ambient music offline as well. + +Alternatively, you can always listen to ambient noise online. My favorite website for online ambient music is [Noisli][3]. Do give it a try. + +#### Task management app #### + +A good productive habit is to keep a to-do list. And if you combine it with [Pomodoro Technique][4], it could work wonder. What I mean hear is that create a to-do list and if possible, assign those tasks a certain time. This will keep you on track with your planned tasks for the day. + +For this, I recommend [Go For It!][5] app. You can install it in all major Linux distributions and since it is based on [ToDo.txt][6], you can easily sync it with your smartphone as well. I have written a detailed guide on [how to use Go For It!][7]. + +Alternatively, you can use [Sticky Notes][8] or [Google Keep][9]. If you need something more like [Evernote][10] fan, you can use these [open source alternatives for Evernote][11]. + +#### Clipboard manager #### + +Ctrl+ C and Ctrl+V are the integral part of our daily computer life. Only problem is that these important actions don’t have memory (by default). Suppose you copied something important and then you accidentally copied something else, you’ll lose what you had before. + +A clipboard manager comes handy in such situation. It displays the history of things you have copied (to clipboard) recently. You can copy text back to clipboard from it. + +I prefer [Diodon clipboard manager][12] for this purpose. It is actively developed and is available in Ubuntu repositories. + +#### Recent notifications #### + +When you are busy with something else and a desktop notification blings and fades away, what do you do? You wish that you could see what was the notification about, isn’t it? Recent notification indicator does this job. It keeps a history of all recent notifications. This way, you would never miss the desktop notifications. + +You can read about [Recent Notification Indicator here][13]. + +#### Terminal Tips #### + +No, I am not going to show you all those Linux command tricks and shortcuts. That could make up an entire blog. I am going to show you couple of terminal hacks you could use to enhance your productivity. + + +- **Change** sudo **password timeout**: By default sudo commands require you to enter password after 15 minutes. This could be tiresome. You could actually change the default sudo password timeout. [This tutorial][14] shows you how to do that. +- **Get desktop notification for command completion**: It’s a common joke among IT guys that developers spend a lot of time waiting for programs to be compiled and it is not entirely true. But it does affect the productivity because while you wait for the programs to be compiled, you may end up doing something else and forget about the commands you had run in the terminal.A nicer way would be to get desktop notification when a command is completed. This way, you won’t be distracted for long and can go back to what you were supposed to be doing earlier. Read about [how to get desktop notification for command completion][15]. + +I know that this is not a comprehensive article about **increasing productivity**. But these little apps and tips may actually help you to get more out of your valuable time. + +Now it’s your turn. What programs or tips you use to be more productive in Linux? Something you want to share with the community? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/productivity-tips-ubuntu/ + +作者:[Abhishek][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://www.helpscout.net/blog/music-productivity/ +[2]:http://itsfoss.com/ambient-noise-music-player-ubuntu/ +[3]:http://www.noisli.com/ +[4]:https://en.wikipedia.org/wiki/Pomodoro_Technique +[5]:http://manuel-kehl.de/projects/go-for-it/ +[6]:http://todotxt.com/ +[7]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ +[8]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ +[9]:http://itsfoss.com/install-google-keep-ubuntu-1310/ +[10]:https://evernote.com/ +[11]:http://itsfoss.com/5-evernote-alternatives-linux/ +[12]:https://esite.ch/tag/diodon/ +[13]:http://itsfoss.com/7-best-indicator-applets-for-ubuntu-13-10/ +[14]:http://itsfoss.com/change-sudo-password-timeout-ubuntu/ +[15]:http://itsfoss.com/notification-terminal-command-completion-ubuntu/ \ No newline at end of file From f483c967b6c0b81371472a18dcd0a1fb320612ba Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 8 Oct 2015 08:11:21 +0800 Subject: [PATCH 2209/2517] PUB:20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip @geekpi --- ... And Remove Bookmarks In Ubuntu Beginner Tip.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md (71%) diff --git a/translated/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md b/published/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md similarity index 71% rename from translated/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md rename to published/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md index 25388915af..0cc17b9465 100644 --- a/translated/tech/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md +++ b/published/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md @@ -1,26 +1,26 @@ -如何在Ubuntu中添加和删除书签[新手技巧] +[新手技巧] 如何在Ubuntu中添加和删除书签 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Add-Bookmark.jpg) 这是一篇对完全是新手的一篇技巧,我将向你展示如何在Ubuntu文件管理器中添加书签。 -现在如果你想知道为什么要这么做,答案很简单。它可以让你可以快速地在左边栏中访问。比如。我[在Ubuntu中安装了Copy][1]。现在它创建了/Home/Copy。先进入Home目录再进入Copy目录并不是一件大事,但是我想要更快地访问它。因此我添加了一个书签这样我就可以直接从侧边栏访问了。 +现在如果你想知道为什么要这么做,答案很简单。它可以让你可以快速地在左边栏中访问。比如,我[在Ubuntu中安装了Copy 云服务][1]。它创建在/Home/Copy。先进入Home目录再进入Copy目录并不是很麻烦,但是我想要更快地访问它。因此我添加了一个书签这样我就可以直接从侧边栏访问了。 ### 在Ubuntu中添加书签 ### 打开Files。进入你想要保存快速访问的目录。你需要在标记书签的目录里面。 -现在,你有两种方法。 +现在,你有两种方法: #### 方法1: #### -当你在Files中时(Ubuntu中的文件管理器),查看顶部菜单。你会看到书签按钮。点击它你会看到将当前路径保存为书签的选项。 +当你在Files(Ubuntu中的文件管理器)中时,查看顶部菜单。你会看到书签按钮。点击它你会看到将当前路径保存为书签的选项。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Add-Bookmark-Ubuntu.jpeg) #### 方法 2: #### -你可以直接按下Ctrl+D就可以将当前位置保存位书签。 +你可以直接按下Ctrl+D就可以将当前位置保存为书签。 如你所见,这里左边栏就有一个新添加的Copy目录: @@ -32,7 +32,7 @@ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Remove-bookmark-ubuntu.png) -这就是在Ubuntu中管理书签需要做的。我知道这对于大多数用户而言很贱,但是这也许多Ubuntu的新手而言或许还有用。 +这就是在Ubuntu中管理书签需要做的。我知道这对于大多数用户而言很简单,但是这也许多Ubuntu的新手而言或许还有用。 -------------------------------------------------------------------------------- @@ -40,7 +40,7 @@ via: http://itsfoss.com/add-remove-bookmarks-ubuntu/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 74b6410450549e5ad4e9021e0087a3b361bf9a0f Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 8 Oct 2015 08:30:18 +0800 Subject: [PATCH 2210/2517] PUB:20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3 @ictlyh --- ...e Types and System Time in Linu--Part 3.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md (90%) diff --git a/translated/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md b/published/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md similarity index 90% rename from translated/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md rename to published/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md index 601f753341..bfa4068997 100644 --- a/translated/tech/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md +++ b/published/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md @@ -1,17 +1,17 @@ -Linux 中管理文件类型和系统时间的 5 个有用命令 - 第三部分 +5 个在 Linux 中管理文件类型和系统时间的有用命令 ================================================================================ 对于想学习 Linux 的初学者来说要适应使用命令行或者终端可能非常困难。由于终端比图形用户界面程序更能帮助用户控制 Linux 系统,我们必须习惯在终端中运行命令。因此为了有效记忆 Linux 不同的命令,你应该每天使用终端并明白怎样将命令和不同选项以及参数一同使用。 ![在 Linux 中管理文件类型并设置时间](http://www.tecmint.com/wp-content/uploads/2015/09/Find-File-Types-in-Linux.jpg) -在 Linux 中管理文件类型并设置时间 - 第三部分 +*在 Linux 中管理文件类型并设置时间* -请先查看我们 [Linux 小技巧][1]系列之前的文章。 +请先查看我们 Linux 小技巧系列之前的文章: -- [Linux 中 5 个有趣的命令行提示和技巧 - 第一部分][2] -- [给新手的有用命令行技巧 - 第二部分][3] +- [5 个有趣的 Linux 命令行技巧][2] +- [给新手的 10 个有用 Linux 命令行技巧][3] -在这篇文章中,我们打算看看终端中 10 个和文件以及时间相关的提示和技巧。 +在这篇文章中,我们打算看看终端中 5 个和文件以及时间相关的提示和技巧。 ### Linux 中的文件类型 ### @@ -22,10 +22,10 @@ Linux 系统中文件有不同的类型: - 普通文件:可能包含命令、文档、音频文件、视频、图像,归档文件等。 - 设备文件:系统用于访问你硬件组件。 -这里有两种表示存储设备的设备文件块文件,例如硬盘,它们以快读取数据,字符文件,以逐个字符读取数据。 +这里有两种表示存储设备的设备文件:块文件,例如硬盘,它们以块读取数据;字符文件,以逐个字符读取数据。 - 硬链接和软链接:用于在 Linux 文件系统的任意地方访问文件。 -- 命名管道和套接字:允许不同的进程彼此之间交互。 +- 命名管道和套接字:允许不同的进程之间进行交互。 #### 1. 用 ‘file’ 命令确定文件类型 #### @@ -219,7 +219,7 @@ which 命令用于定位文件系统中的命令。 20 21 22 23 24 25 26 27 28 29 30 -使用 hwclock 命令查看硬件始终时间。 +使用 hwclock 命令查看硬件时钟时间。 tecmint@tecmint ~/Linux-Tricks $ sudo hwclock Wednesday 09 September 2015 06:02:58 PM IST -0.200081 seconds @@ -231,7 +231,7 @@ which 命令用于定位文件系统中的命令。 tecmint@tecmint ~/Linux-Tricks $ sudo hwclock Wednesday 09 September 2015 12:33:11 PM IST -0.891163 seconds -系统时间是由硬件始终时间在启动时设置的,系统关闭时,硬件时间被重置为系统时间。 +系统时间是由硬件时钟时间在启动时设置的,系统关闭时,硬件时间被重置为系统时间。 因此你查看系统时间和硬件时间时,它们是一样的,除非你更改了系统时间。当你的 CMOS 电量不足时,硬件时间可能不正确。 @@ -256,7 +256,7 @@ which 命令用于定位文件系统中的命令。 ### 总结 ### -对于初学者来说理解 Linux 中的文件类型是一个好的尝试,同时时间管理也非常重要,尤其是在需要可靠有效地管理服务的服务器上。希望这篇指南能对你有所帮助。如果你有任何反馈,别忘了给我们写评论。和 Tecmint 保持联系。 +对于初学者来说理解 Linux 中的文件类型是一个好的尝试,同时时间管理也非常重要,尤其是在需要可靠有效地管理服务的服务器上。希望这篇指南能对你有所帮助。如果你有任何反馈,别忘了给我们写评论。和我们保持联系。 -------------------------------------------------------------------------------- @@ -264,16 +264,16 @@ via: http://www.tecmint.com/manage-file-types-and-set-system-time-in-linux/ 作者:[Aaron Kili][a] 译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) -校对:[校对者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/aaronkili/ [1]:http://www.tecmint.com/tag/linux-tricks/ -[2]:http://www.tecmint.com/free-online-linux-learning-guide-for-beginners/ -[3]:http://www.tecmint.com/10-useful-linux-command-line-tricks-for-newbies/ +[2]:https://linux.cn/article-5485-1.html +[3]:https://linux.cn/article-6314-1.html [4]:http://www.tecmint.com/linux-dir-command-usage-with-examples/ -[5]:http://www.tecmint.com/12-practical-examples-of-linux-grep-command/ +[5]:https://linux.cn/article-2250-1.html [6]:http://www.tecmint.com/wc-command-examples/ [7]:http://www.tecmint.com/setup-samba-file-sharing-for-linux-windows-clients/ [8]:http://www.tecmint.com/35-practical-examples-of-linux-find-command/ \ No newline at end of file From 1c158b7d0ad49ee5c78b8e995db7d831f53fb8e6 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 8 Oct 2015 09:15:44 +0800 Subject: [PATCH 2211/2517] PUB:20150925 HTTP 2 Now Fully Supported in NGINX Plus @strugglingyouth --- ...TTP 2 Now Fully Supported in NGINX Plus.md | 127 ++++++++++++++++++ ...TTP 2 Now Fully Supported in NGINX Plus.md | 126 ----------------- 2 files changed, 127 insertions(+), 126 deletions(-) create mode 100644 published/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md delete mode 100644 translated/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md diff --git a/published/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md b/published/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md new file mode 100644 index 0000000000..f02b42b5a1 --- /dev/null +++ b/published/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md @@ -0,0 +1,127 @@ +NGINX Plus 现在完全支持 HTTP/2 +================================================================================ +早些时候,我们发布了支持 HTTP/2 协议的 [NGINX Plus R7][1]。作为 HTTP 协议的最新标准,HTTP/2 的设计为现在的 web 应用程序带来了更高的性能和安全性。(LCTT 译注: [开源版本的 NGINX 1.95 也支持 HTTP/2 了][18]。) + +NGINX Plus 所实现的 HTTP/2 协议可与现有的网站和应用程序进行无缝衔接。只需要一点改变,不管用户选择什么样的浏览器,NGINX Plus 都能为用户同时提供 HTTP/1.x 与HTTP/2 的最佳体验。 + +要支持 HTTP/2 仅需通过可选的 **nginx‑plus‑http2** 软件包。**nginx‑plus** 和 **nginx‑plus‑extras** 软件包支持 SPDY 协议,目前推荐用于生产站点,因为其被大多数浏览器所支持并且代码也是相当成熟了。 + +### 为什么要使用 HTTP/2? ### + +HTTP/2 使数据传输更高效,对你的应用程序更安全。 HTTP/2 相比于 HTTP/1.x 有五个提高性能特点: + +- **完全复用** – 在一个保持激活(keepalive)的连接上,HTTP/1.1 强制按严格的顺序来处理请求。一个请求必须在下一个请求开始前结束。 HTTP/2 消除了这一要求,允许并行和乱序来处理请求。 + +- **单一,持久连接** – 由于 HTTP/2 允许请求完全复用,所以可以通过单一连接并行下载网页上的所有对象。在 HTTP/1.x 中,使用多个连接来并行下载资源,从而导致使用底层 TCP 协议效率很低。 + +- **二进制编码** – Header 信息使用紧凑的二进制格式发送,而不是纯文本格式,节省了传输字节。 + +- **Header 压缩** – Headers 使用专用的 HPACK 压缩算法来进行压缩,这进一步降低数据通过网络传输的字节。 + +- **SSL/TLS 加密** – 在 HTTP/2 中,强制使用 SSL/TLS。在 [RFC][2] 中并没有强制,其允许纯文本的 HTTP/2,但是当前所有实现 HTTP/2的 Web 浏览器都只支持加密。 SSL/TLS 可以使你的网站更安全,并且使用 HTTP/2 各项性能会有提升,加密和解密过程的性能损失就减少了。 + +要了解更多关于 HTTP/2: + +- 请阅读我们的 [白皮书][3],它涵盖了你需要了解HTTP/2 的一切。 +- 下载由 Google 的 Ilya Grigorik 编写的 [特别版的高性能浏览器网络电子书][4] 。 + +### NGINX Plus 如何实现 HTTP/2 ### + +我们的 HTTP/2 实现是基于 SPDY 支持的,它已经被广泛部署(使用了 NGINX 或 NGINX Plus 的网站近 75% 都使用了 SPDY)。使用 NGINX Plus 部署 HTTP/2 时,几乎不会改变你应用程序的配置。本节将讨论 NGINX Plus如何实现对 HTTP/2 的支持。 + +#### 一个 HTTP/2 网关 #### + +![](https://www.nginx.com/wp-content/uploads/2015/09/http2-27-1024x300.png) + +NGINX Plus 作为一个 HTTP/2 网关。它与支持 HTTP/2 的客户端 Web 浏览器用 HTTP/2 通讯,而转换 HTTP/2 请求给后端服务器通信时使用 HTTP/1.x(或者 FastCGI, SCGI, uWSGI, 等等. – 取决于你目前正在使用的协议)。 + +#### 向后兼容性 #### + +![](https://www.nginx.com/wp-content/uploads/2015/09/http2-281-1024x581.png) + +在一段时间内,你需要同时支持 HTTP/2 和 HTTP/1.x。在撰写本文时,超过50%的用户使用的 Web 浏览器已经[支持 HTTP/2][5],但这也意味着近50%的人还没有使用。 + +为了同时支持 HTTP/1.x 和 HTTP/2,NGINX Plus 实现了 TLS 上的 Next Protocol Negotiation (NPN)扩展。当 Web 浏览器连接到服务器时,其将所支持的协议列表发送到服务器端。如果浏览器支持的协议列表中包括 h2 - 即 HTTP/2,NGINX Plus 将使用 HTTP/2 连接到浏览器。如果浏览器不支持 NPN 或在发送支持的协议列表中没有 h2,NGINX Plus 将继续回落到 HTTP/1.x。 + +### 转向 HTTP/2 ### + +NGINX 公司会尽可能帮助大家无缝过渡到使用 HTTP/2。本节介绍了通过对你应用进行改变来启用对 HTTP/2 支持,其中只需对 NGINX Plus 配置进行几个变化。 + +#### 前提条件 #### + +使用 **nginx‑plus‑http2** 软件包升级到 NGINX Plus R7。注意现在还没有支持 HTTP/2 版本的 **nginx‑plus‑extras** 软件包。 + +#### 重定向所有流量到 SSL/TLS #### + +如果你的应用尚未使用 SSL/TLS 加密,现在启用它正是一个好的时机。加密你的应用程序可以保护你免受间谍以及来自其他中间人的攻击。一些搜索引擎甚至在搜索结果中对加密站点[提高排名][6]。下面的配置块重定向所有的普通 HTTP 请求到该网站的加密版本。 + + server { + listen 80; + location / { + return 301 https://$host$request_uri; + } + } + +#### 启用 HTTP/2 #### + +要启用对 HTTP/2 的支持,只需将 http2 参数添加到所有的 [listen][7] 指令中,也要包括 SSL 参数,因为浏览器不支持不加密的 HTTP/2 请求。 + + server { + listen 443 ssl http2 default_server; + + ssl_certificate server.crt; + ssl_certificate_key server.key; + … + } + +如果有必要,重启 NGINX Plus,例如通过运行 `nginx -s reload` 命令。要验证 HTTP/2 是否正常工作,你可以在 [Google Chrome][8] 和 [Firefox][9] 中使用 “HTTP/2 and SPDY indicator” 插件来检查。 + +### 注意事项 ### + +- 在安装 **nginx‑plus‑http2** 包之前, 你必须删除配置文件中所有 listen 指令后的 SPDY 参数(使用 http2 和 ssl 参数来替换它以启用对 HTTP/2 的支持)。使用这个包后,如果 listen 指令后有 spdy 参数,NGINX Plus 将无法启动。 + +- 如果你在 NGINX Plus 前端使用了 Web 应用防火墙(WAF),请确保它能够解析 HTTP/2,或者把它移到 NGINX Plus 后面。 + +- 此版本不支持在 HTTP/2 RFC 中定义的 “Server Push” 特性。 NGINX Plus 以后的版本可能会支持它。 + +- NGINX Plus R7 同时支持 SPDY 和 HTTP/2(LCTT 译注:但是你只能同时使用其中一种)。在以后的版本中,我们将弃用对 SPDY 的支持。谷歌在2016年初将 [弃用 SPDY][10],因此同时支持这两种协议也非必要。 + +- 如果 [ssl_prefer_server_ciphers][11] 设置为 on 或者使用了定义在 [Appendix A: TLS 1.2 Ciper Suite Black List][13] 中的 [ssl_ciphers][12] 列表时,浏览器会出现 handshake-errors 而无法正常工作。详细内容请参阅 [section 9.2.2 of the HTTP/2 RFC][14]。 + +### 特别感谢 ### + +NGINX 公司要感谢 [Dropbox][15] 和 [Automattic][16],他们是我们软件的重度使用者,并帮助我们实现 HTTP/2。他们的贡献帮助我们加速完成这个软件,我们希望你也能支持他们。 + +![](https://www.nginx.com/wp-content/themes/nginx-theme/assets/img/landing-page/highperf_nginx_ebook.png) + +[O'REILLY'S BOOK ABOUT HTTP/2 & PERFORMANCE TUNING][17] + +-------------------------------------------------------------------------------- + +via: https://www.nginx.com/blog/http2-r7/ + +作者:[Faisal Memon][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.nginx.com/blog/author/fmemon/ +[1]:https://www.nginx.com/blog/nginx-plus-r7-released/ +[2]:https://tools.ietf.org/html/rfc7540 +[3]:https://www.nginx.com/wp-content/uploads/2015/09/NGINX_HTTP2_White_Paper_v4.pdf +[4]:https://www.nginx.com/http2-ebook/ +[5]:http://caniuse.com/#feat=http2 +[6]:http://googlewebmastercentral.blogspot.co.uk/2014/08/https-as-ranking-signal.html +[7]:http://nginx.org/en/docs/http/ngx_http_core_module.html#listen +[8]:https://chrome.google.com/webstore/detail/http2-and-spdy-indicator/mpbpobfflnpcgagjijhmgnchggcjblin?hl=en +[9]:https://addons.mozilla.org/en-us/firefox/addon/spdy-indicator/ +[10]:http://blog.chromium.org/2015/02/hello-http2-goodbye-spdy-http-is_9.html +[11]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_prefer_server_ciphers +[12]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers +[13]:https://tools.ietf.org/html/rfc7540#appendix-A +[14]:https://tools.ietf.org/html/rfc7540#section-9.2.2 +[15]:http://dropbox.com/ +[16]:http://automattic.com/ +[17]:https://www.nginx.com/http2-ebook/ +[18]:http://mailman.nginx.org/pipermail/nginx-announce/2015/000162.html \ No newline at end of file diff --git a/translated/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md b/translated/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md deleted file mode 100644 index 0a9cf30ad3..0000000000 --- a/translated/tech/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md +++ /dev/null @@ -1,126 +0,0 @@ - -NGINX Plus 现在完全支持 HTTP/2 -================================================================================ -本周早些时候,我们发布了对 HTTP/2 支持的 [NGINX Plus R7][1]。作为 HTTP 协议的最新标准,HTTP/2 的设计对现在的 web 应用程序带来了更高的性能和安全性。 - -NGINX Plus 使用 HTTP/2 协议可与现有的网站和应用程序进行无缝衔接。最微小的变化就是不管用户选择什么样的浏览器,NGINX Plus 都能为用户提供 HTTP/1.x 与HTTP/2 并发运行带来的最佳体验。 - -要支持 HTTP/2 仅需提供 **nginx‑plus‑http2** 软件包。**nginx‑plus** 和 **nginx‑plus‑extras** 软件包支持 SPDY 协议,目前推荐用于生产站点,因为其被大多数浏览器所支持并且代码也是相当成熟了。 - -### 为什么要使用 HTTP/2? ### -HTTP/2 使数据传输更高效,对你的应用程序更安全。 HTTP/2 相比于 HTTP/1.x 有五个提高性能特点: - -- **完全复用** – HTTP/1.1 强制按严格的顺序来对一个请求建立连接。请求建立必须在下一个进程开始之前完成。 HTTP/2 消除了这一要求,允许并行和乱序来完成请求的建立。 - -- **单一,持久连接** – 由于 HTTP/2 允许请求真正的复用,现在通过单一连接可以并行下载网页上的所有对象。在 HTTP/1.x 中,使用多个连接来并行下载资源,从而导致使用底层 TCP 协议效率很低。 - -- **二进制编码** – Header 信息使用紧凑二进制格式发送,而不是纯文本格式,节省了传输字节。 - -- **Header 压缩** – Headers 使用专用的算法来进行压缩,HPACK 压缩,这进一步降低数据通过网络传输的字节。 - -- **SSL/TLS encryption** – 在 HTTP/2 中,强制使用 SSL/TLS。在 [RFC][2] 中并没有强制,其允许纯文本的 HTTP/2,它是由当前 Web 浏览器执行 HTTP/2 的。 SSL/TLS 使你的网站更安全,并且使用 HTTP/2 所有性能会有提升,加密和解密过程的性能也有所提升。 - -要了解更多关于 HTTP/2: - -- 请阅读我们的 [白皮书][3],它涵盖了你需要了解HTTP/2 的一切。 -- 下载由 Google 的 Ilya Grigorik 编写的 [特别版的高性能浏览器网络电子书][4] 。 - -### NGINX Plus 如何实现 HTTP/2 ### - -实现 HTTP/2 要基于对 SPDY 的支持,它已经被广泛部署(使用了 NGINX 或 NGINX Plus 的网站近 75% 都使用了 SPDY)。使用 NGINX Plus 部署 HTTP/2 时,几乎不会改变你应用程序的配置。本节将讨论 NGINX Plus如何实现对 HTTP/2 的支持。 - -#### 一个 HTTP/2 网关 #### - -![](https://www.nginx.com/wp-content/uploads/2015/09/http2-27-1024x300.png) - -NGINX Plus 作为一个 HTTP/2 网关。它谈到 HTTP/2 对客户端 Web 浏览器支持,但传输 HTTP/2 请求返回给后端服务器通信时使用 HTTP/1.x(或者 FastCGI, SCGI, uWSGI, 等等. – 取决于你目前正在使用的协议)。 - -#### 向后兼容性 #### - -![](https://www.nginx.com/wp-content/uploads/2015/09/http2-281-1024x581.png) - -在不久的未来,你需要同时支持 HTTP/2 和 HTTP/1.x。在撰写本文时,超过50%的用户使用的 Web 浏览器已经[支持 HTTP/2][5],但这也意味着近50%的人还没有使用。 - -为了同时支持 HTTP/1.x 和 HTTP/2,NGINX Plus 实现了将 Next Protocol Negotiation (NPN协议)扩展到 TLS 中。当 Web 浏览器连接到服务器时,其将所支持的协议列表发送到服务器端。如果浏览器支持的协议列表中包括 h2 - 即,HTTP/2,NGINX Plus 将使用 HTTP/2 连接到浏览器。如果浏览器不支持 NPN 或在发送支持的协议列表中没有 h2,NGINX Plus 将继续使用 HTTP/1.x。 - -### 转向 HTTP/2 ### - -NGINX,公司尽可能无缝过渡到使用 HTTP/2。本节通过对你应用程序的改变来启用对 HTTP/2 的支持,其中只包括对 NGINX Plus 配置的几个变化。 - -#### 前提条件 #### - -使用 **nginx‑plus‑http2** 软件包升级到 NGINX Plus R7 . 注意启用 HTTP/2 版本在此时不需要使用 **nginx‑plus‑extras** 软件包。 - -#### 重定向所有流量到 SSL/TLS #### - -如果你的应用程序尚未使用 SSL/TLS 加密,现在启用它正是一个好的时机。加密你的应用程序可以保护你免受间谍以及来自其他中间人的攻击。一些搜索引擎甚至在搜索结果中对加密站点 [提高排名][6]。下面的配置块重定向所有的普通 HTTP 请求到该网站的加密版本。 - - server { - listen 80; - location / { - return 301 https://$host$request_uri; - } - } - -#### 启用 HTTP/2 #### - -要启用对 HTTP/2 的支持,只需将 http2 参数添加到所有的 [listen][7] 指令中,包括 SSL 参数,因为浏览器不支持不加密的 HTTP/2 请求。 - - server { - listen 443 ssl http2 default_server; - - ssl_certificate server.crt; - ssl_certificate_key server.key; - … - } - -如果有必要,重启 NGINX Plus,例如通过运行 nginx -s reload 命令。要验证 HTTP/2 是否正常工作,你可以在 [Google Chrome][8] 和 [Firefox][9] 中使用 “HTTP/2 and SPDY indicator” 插件来检查。 - -### 注意事项 ### - -- 在安装 **nginx‑plus‑http2** 包之前, 你必须删除配置文件中所有 listen 指令后的 SPDY 参数(使用 http2 和 ssl 参数来替换它以启用对 HTTP/2 的支持)。使用这个包后,如果 listen 指令后有 spdy 参数,NGINX Plus 将无法启动。 - -- 如果你在 NGINX Plus 前端使用了 Web 应用防火墙(WAF),请确保它能够解析 HTTP/2,或者把它移到 NGINX Plus 后面。 - -- 此版本在 HTTP/2 RFC 不支持 “Server Push” 特性。 NGINX Plus 以后的版本可能会支持它。 - -- NGINX Plus R7 同时支持 SPDY 和 HTTP/2。在以后的版本中,我们将弃用对 SPDY 的支持。谷歌在2016年初将 [弃用 SPDY][10],因此同时支持这两种协议也非必要。 - -- 如果 [ssl_prefer_server_ciphers][11] 设置为 on 或者 [ssl_ciphers][12] 列表被定义在 [Appendix A: TLS 1.2 Ciper Suite Black List][13] 使用时,浏览器会出现 handshake-errors 而无法正常工作。详细内容请参阅 [section 9.2.2 of the HTTP/2 RFC][14]。 - -### 特别感谢 ### - -NGINX,公司要感谢 [Dropbox][15] 和 [Automattic][16],他们是我们软件的重度使用者,并帮助我们实现 HTTP/2。他们的贡献帮助我们加速完成这个软件,我们希望你也能支持他们。 - -![](https://www.nginx.com/wp-content/themes/nginx-theme/assets/img/landing-page/highperf_nginx_ebook.png) - -[O'REILLY'S BOOK ABOUT HTTP/2 & PERFORMANCE TUNING][17] - --------------------------------------------------------------------------------- - -via: https://www.nginx.com/blog/http2-r7/ - -作者:[Faisal Memon][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.nginx.com/blog/author/fmemon/ -[1]:https://www.nginx.com/blog/nginx-plus-r7-released/ -[2]:https://tools.ietf.org/html/rfc7540 -[3]:https://www.nginx.com/wp-content/uploads/2015/09/NGINX_HTTP2_White_Paper_v4.pdf -[4]:https://www.nginx.com/http2-ebook/ -[5]:http://caniuse.com/#feat=http2 -[6]:http://googlewebmastercentral.blogspot.co.uk/2014/08/https-as-ranking-signal.html -[7]:http://nginx.org/en/docs/http/ngx_http_core_module.html#listen -[8]:https://chrome.google.com/webstore/detail/http2-and-spdy-indicator/mpbpobfflnpcgagjijhmgnchggcjblin?hl=en -[9]:https://addons.mozilla.org/en-us/firefox/addon/spdy-indicator/ -[10]:http://blog.chromium.org/2015/02/hello-http2-goodbye-spdy-http-is_9.html -[11]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_prefer_server_ciphers -[12]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers -[13]:https://tools.ietf.org/html/rfc7540#appendix-A -[14]:https://tools.ietf.org/html/rfc7540#section-9.2.2 -[15]:http://dropbox.com/ -[16]:http://automattic.com/ -[17]:https://www.nginx.com/http2-ebook/ From 614c7a938c1123df9818204dfb961a67f159623f Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 8 Oct 2015 09:34:45 +0800 Subject: [PATCH 2212/2517] Update 20151005 pyinfo() A good looking phpinfo-like python script.md --- ...0151005 pyinfo() A good looking phpinfo-like python script.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md b/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md index 7b38244e76..f096bc5fc6 100644 --- a/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md +++ b/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md @@ -1,3 +1,4 @@ +translation by strugglingyouth pyinfo() A good looking phpinfo-like python script ================================================================================ Being a native php guy, I'm used to having phpinfo(), giving me easy access to php.ini settings and loaded modules etc. So ofcourse I wanted to call the not existing pyinfo() function, to no avail. My fingers quickly pressed CTRL-E to google for a implementation of it, someone must've ported it already? From fd6a035bbf0994bf75a50166f906f90eb7ace258 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 8 Oct 2015 11:14:12 +0800 Subject: [PATCH 2213/2517] PUB:20150906 Installing NGINX and NGINX Plus With Ansible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @strugglingyouth 文章很长,辛苦了。不过要注意英文的倒装语句。 --- ...lling NGINX and NGINX Plus With Ansible.md | 103 +++++++++--------- 1 file changed, 50 insertions(+), 53 deletions(-) rename {translated/tech => published}/20150906 Installing NGINX and NGINX Plus With Ansible.md (59%) diff --git a/translated/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md b/published/20150906 Installing NGINX and NGINX Plus With Ansible.md similarity index 59% rename from translated/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md rename to published/20150906 Installing NGINX and NGINX Plus With Ansible.md index e80f080624..10e16e3082 100644 --- a/translated/tech/20150906 Installing NGINX and NGINX Plus With Ansible.md +++ b/published/20150906 Installing NGINX and NGINX Plus With Ansible.md @@ -1,14 +1,12 @@ -translation by strugglingyouth -nstalling NGINX and NGINX Plus With Ansible +使用 ansible 安装 NGINX 和 NGINX Plus ================================================================================ -在生产环境中,我会更喜欢做与自动化相关的所有事情。如果计算机能完成你的任务,何必需要你亲自动手呢?但是,在不断变化并存在多种技术的环境中,创建和实施自动化是一项艰巨的任务。这就是为什么我喜欢[Ansible][1]。Ansible是免费的,开源的,对于 IT 配置管理,部署和业务流程,使用起来非常方便。 +在生产环境中,我会更喜欢做与自动化相关的所有事情。如果计算机能完成你的任务,何必需要你亲自动手呢?但是,在不断变化并存在多种技术的环境中,创建和实施自动化是一项艰巨的任务。这就是为什么我喜欢 [Ansible][1] 的原因。Ansible 是一个用于 IT 配置管理,部署和业务流程的开源工具,使用起来非常方便。 +我最喜欢 Ansible 的一个特点是,它是完全无客户端的。要管理一个系统,通过 SSH 建立连接,它使用[Paramiko][2](一个 Python 库)或本地的 [OpenSSH][3]。Ansible 另一个吸引人的地方是它有许多可扩展的模块。这些模块可被系统管理员用于执行一些的常见任务。特别是,它们使用 Ansible 这个强有力的工具可以跨多个服务器、环境或操作系统安装和配置任何程序,只需要一个控制节点。 -我最喜欢 Ansible 的一个特点是,它是完全无客户端。要管理一个系统,通过 SSH 建立连接,也使用了[Paramiko][2](一个 Python 库)或本地的 [OpenSSH][3]。Ansible 另一个吸引人的地方是它有许多可扩展的模块。这些模块可被系统管理员用于执行一些的相同任务。特别是,它们使用 Ansible 这个强有力的工具可以安装和配置任何程序在多个服务器上,环境或操作系统,只需要一个控制节点。 +在本教程中,我将带你使用 Ansible 完成安装和部署开源 [NGINX][4] 和我们的商业产品 [NGINX Plus][5]。我将在 [CentOS][6] 服务器上演示,但我也在下面的“在 Ubuntu 上创建 Ansible Playbook 来安装 NGINX 和 NGINX Plus”小节中包含了在 Ubuntu 服务器上部署的细节。 -在本教程中,我将带你使用 Ansible 完成安装和部署开源[NGINX][4] 和 [NGINX Plus][5],我们的商业产品。我将在 [CentOS][6] 服务器上演示,但我也写了一个详细的教程关于在 Ubuntu 服务器上部署[在 Ubuntu 上创建一个 Ansible Playbook 来安装 NGINX 和 NGINX Plus][7] 。 - -在本教程中我将使用 Ansible 1.9.2 版本的,并在 CentOS 7.1 服务器上部署运行。 +在本教程中我将使用 Ansible 1.9.2 版本,并在 CentOS 7.1 服务器上部署运行。 $ ansible --version ansible 1.9.2 @@ -20,14 +18,13 @@ nstalling NGINX and NGINX Plus With Ansible 如果你使用的是 CentOS,安装 Ansible 十分简单,只要输入以下命令。如果你想使用源码编译安装或使用其他发行版,请参阅上面 Ansible 链接中的说明。 - $ sudo yum install -y epel-release && sudo yum install -y ansible -根据环境的不同,在本教程中的命令有的可能需要 sudo 权限。文件路径,用户名,目标服务器的值取决于你的环境中。 +根据环境的不同,在本教程中的命令有的可能需要 sudo 权限。文件路径,用户名和目标服务器取决于你的环境的情况。 ### 创建一个 Ansible Playbook 来安装 NGINX (CentOS) ### -首先,我们为 NGINX 的部署创建一个工作目录,以及子目录和部署配置文件目录。我通常建议在主目录中创建目录,在文章的所有例子中都会有说明。 +首先,我们要为 NGINX 的部署创建一个工作目录,包括子目录和部署配置文件。我通常建议在你的主目录中创建该目录,在文章的所有例子中都会有说明。 $ cd $HOME $ mkdir -p ansible-nginx/tasks/ @@ -54,11 +51,11 @@ nstalling NGINX and NGINX Plus With Ansible $ vim $HOME/ansible-nginx/deploy.yml -**deploy.yml** 文件是 Ansible 部署的主要文件,[ 在使用 Ansible 部署 NGINX][9] 时,我们将运行 ansible‑playbook 命令执行此文件。在这个文件中,我们指定运行时 Ansible 使用的库以及其它配置文件。 +**deploy.yml** 文件是 Ansible 部署的主要文件,在“使用 Ansible 部署 NGINX”小节中,我们运行 ansible‑playbook 命令时会使用此文件。在这个文件中,我们指定 Ansible 运行时使用的库以及其它配置文件。 -在这个例子中,我使用 [include][10] 模块来指定配置文件一步一步来安装NGINX。虽然可以创建一个非常大的 playbook 文件,我建议你将其分割为小文件,以保证其可靠性。示例中的包括复制静态内容,复制配置文件,为更高级的部署使用逻辑配置设定变量。 +在这个例子中,我使用 [include][10] 模块来指定配置文件一步一步来安装NGINX。虽然可以创建一个非常大的 playbook 文件,我建议你将其分割为小文件,让它们更有条理。include 的示例中可以复制静态内容,复制配置文件,为更高级的部署使用逻辑配置设定变量。 -在文件中输入以下行。包括顶部参考注释中的文件名。 +在文件中输入以下行。我在顶部的注释包含了文件名用于参考。 # ./ansible-nginx/deploy.yml @@ -66,21 +63,21 @@ nstalling NGINX and NGINX Plus With Ansible tasks: - include: 'tasks/install_nginx.yml' - hosts 语句说明 Ansible 部署 **nginx** 组的所有服务器,服务器在 **/etc/ansible/hosts** 中指定。我们将编辑此文件来 [创建 NGINX 服务器的列表][11]。 +hosts 语句说明 Ansible 部署 **nginx** 组的所有服务器,服务器在 **/etc/ansible/hosts** 中指定。我们会在下面的“创建 NGINX 服务器列表”小节编辑此文件。 -include 语句说明 Ansible 在部署过程中从 **tasks** 目录下读取并执行 **install_nginx.yml** 文件中的内容。该文件包括以下几步:下载,安装,并启动 NGINX。我们将创建此文件在下一节。 +include 语句说明 Ansible 在部署过程中从 **tasks** 目录下读取并执行 **install\_nginx.yml** 文件中的内容。该文件包括以下几步:下载,安装,并启动 NGINX。我们将在下一节创建此文件。 #### 为 NGINX 创建部署文件 #### -现在,先保存 **deploy.yml** 文件,并在编辑器中打开 **install_nginx.yml** 。 +现在,先保存 **deploy.yml** 文件,并在编辑器中打开 **install\_nginx.yml** 。 $ vim $HOME/ansible-nginx/tasks/install_nginx.yml -该文件包含的说明有 - 以 [YAML][12] 格式写入 - 使用 Ansible 安装和配置 NGINX。每个部分(步骤中的过程)起始于一个 name 声明(前面连字符)描述此步骤。下面的 name 字符串:是 Ansible 部署过程中写到标准输出的,可以根据你的意愿来改变。YAML 文件中的下一个部分是在部署过程中将使用的模块。在下面的配置中,[yum][13] 和 [service][14] 模块使将被用。yum 模块用于在 CentOS 上安装软件包。service 模块用于管理 UNIX 的服务。在这部分的最后一行或几行指定了几个模块的参数(在本例中,这些行以 name 和 state 开始)。 +该文件包含有指令(使用 [YAML][12] 格式写的), Ansible 会按照指令安装和配置我们的 NGINX 部署过程。每个节(过程中的步骤)起始于一个描述此步骤的 `name` 语句(前面有连字符)。 `name` 后的字符串是 Ansible 部署过程中输出到标准输出的,可以根据你的意愿来修改。YAML 文件中的节的下一行是在部署过程中将使用的模块。在下面的配置中,使用了 [`yum`][13] 和 [`service`][14] 模块。`yum` 模块用于在 CentOS 上安装软件包。`service` 模块用于管理 UNIX 的服务。在这个节的最后一行或几行指定了几个模块的参数(在本例中,这些行以 `name` 和 `state` 开始)。 -在文件中输入以下行。对于 **deploy.yml**,在我们文件的第一行是关于文件名的注释。第一部分说明 Ansible 从 NGINX 仓库安装 **.rpm** 文件在CentOS 7 上。这说明软件包管理器直接从 NGINX 仓库安装最新最稳定的版本。需要在你的 CentOS 版本上修改路径。可使用包的列表可以在 [开源 NGINX 网站][15] 上找到。接下来的两节说明 Ansible 使用 yum 模块安装最新的 NGINX 版本,然后使用 service 模块启动 NGINX。 +在文件中输入以下行。就像 **deploy.yml**,在我们文件的第一行是用于参考的文件名的注释。第一个节告诉 Ansible 在CentOS 7 上从 NGINX 仓库安装该 **.rpm** 文件。这让软件包管理器直接从 NGINX 仓库安装最新最稳定的版本。根据你的 CentOS 版本修改路径。所有可用的包的列表可以在 [开源 NGINX 网站][15] 上找到。接下来的两节告诉 Ansible 使用 `yum` 模块安装最新的 NGINX 版本,然后使用 `service` 模块启动 NGINX。 -**注意:** 在第一部分中,CentOS 包中的路径名是连着的两行。在一行上输入其完整路径。 +**注意:** 在第一个节中,CentOS 包中的路径名可能由于宽度显示为连着的两行。请在一行上输入其完整路径。 # ./ansible-nginx/tasks/install_nginx.yml @@ -100,12 +97,12 @@ include 语句说明 Ansible 在部署过程中从 **tasks** 目录下读取并 #### 创建 NGINX 服务器列表 #### -现在,我们有 Ansible 部署所有配置的文件,我们需要告诉 Ansible 部署哪个服务器。我们需要在 Ansible 中指定 **hosts** 文件。先备份现有的文件,并新建一个新文件来部署。 +现在,我们设置好了 Ansible 部署的所有配置文件,我们需要告诉 Ansible 部署哪个服务器。我们需要在 Ansible 中指定 **hosts** 文件。先备份现有的文件,并新建一个新文件来部署。 $ sudo mv /etc/ansible/hosts /etc/ansible/hosts.backup $ sudo vim /etc/ansible/hosts -在文件中输入以下行来创建一个名为 **nginx** 的组并列出安装 NGINX 的服务器。你可以指定服务器通过主机名,IP 地址,或者在一个区域,例如 **server[1-3].domain.com**。在这里,我指定一台服务器通过 IP 地址。 +在文件中输入(或编辑)以下行来创建一个名为 **nginx** 的组并列出安装 NGINX 的服务器。你可以通过主机名、IP 地址、或者在一个范围,例如 **server[1-3].domain.com** 来指定服务器。在这里,我通过 IP 地址指定一台服务器。 # /etc/ansible/hosts @@ -114,20 +111,20 @@ include 语句说明 Ansible 在部署过程中从 **tasks** 目录下读取并 #### 设置安全性 #### -在部署之前,我们需要确保 Ansible 已通过 SSH 授权能访问我们的目标服务器。 +接近完成了,但在部署之前,我们需要确保 Ansible 已被授权通过 SSH 访问我们的目标服务器。 -首选并且最安全的方法是添加 Ansible 所要部署服务器的 RSA SSH 密钥到目标服务器的 **authorized_keys** 文件中,这给 Ansible 在目标服务器上的 SSH 权限不受限制。要了解更多关于此配置,请参阅 [安全的 OpenSSH][16] 在 wiki.centos.org。这样,你就可以自动部署而无需用户交互。 +首选并且最安全的方法是添加 Ansible 所要部署服务器的 RSA SSH 密钥到目标服务器的 **authorized\_keys** 文件中,这给予 Ansible 在目标服务器上的不受限制 SSH 权限。要了解更多关于此配置,请参阅 wiki.centos.org 上 [安全加固 OpenSSH][16]。这样,你就可以自动部署而无需用户交互。 -另外,你也可以在部署过程中需要输入密码。我强烈建议你只在测试过程中使用这种方法,因为它是不安全的,没有办法判断目标主机的身份。如果你想这样做,将每个目标主机 **/etc/ssh/ssh_config** 文件中 StrictHostKeyChecking 的默认值 yes 改为 no。然后在 ansible-playbook 命令中添加 --ask-pass参数来表示 Ansible 会提示输入 SSH 密码。 +另外,你也可以在部署过程中要求输入密码。我强烈建议你只在测试过程中使用这种方法,因为它是不安全的,没有办法跟踪目标主机的身份(fingerprint)变化。如果你想这样做,将每个目标主机 **/etc/ssh/ssh\_config** 文件中 StrictHostKeyChecking 的默认值 yes 改为 no。然后在 ansible-playbook 命令中添加 --ask-pass 参数来让 Ansible 提示输入 SSH 密码。 -在这里,我将举例说明如何编辑 **ssh_config** 文件来禁用在目标服务器上严格的主机密钥检查。我们手动 SSH 到我们将部署 NGINX 的服务器并将StrictHostKeyChecking 的值更改为 no。 +在这里,我将举例说明如何编辑 **ssh\_config** 文件来禁用在目标服务器上严格的主机密钥检查。我们手动连接 SSH 到我们将部署 NGINX 的服务器,并将 StrictHostKeyChecking 的值更改为 no。 $ ssh kjones@172.16.239.140 kjones@172.16.239.140's password:*********** [kjones@nginx ]$ sudo vim /etc/ssh/ssh_config -当你更改后,保存 **ssh_config**,并通过 SSH 连接到你的 Ansible 服务器。保存后的设置应该如下图所示。 +当你更改后,保存 **ssh\_config**,并通过 SSH 连接到你的 Ansible 服务器。保存后的设置应该如下所示。 # /etc/ssh/ssh_config @@ -135,7 +132,7 @@ include 语句说明 Ansible 在部署过程中从 **tasks** 目录下读取并 #### 运行 Ansible 部署 NGINX #### -如果你一直照本教程的步骤来做,你可以运行下面的命令来使用 Ansible 部署NGINX。(同样,如果你设置了 RSA SSH 密钥认证,那么--ask-pass 参数是不需要的。)在 Ansible 服务器运行命令,并使用我们上面创建的配置文件。 +如果你一直照本教程的步骤来做,你可以运行下面的命令来使用 Ansible 部署 NGINX。(再次提示,如果你设置了 RSA SSH 密钥认证,那么 --ask-pass 参数是不需要的。)在 Ansible 服务器运行命令,并使用我们上面创建的配置文件。 $ sudo ansible-playbook --ask-pass $HOME/ansible-nginx/deploy.yml @@ -163,7 +160,7 @@ Ansible 提示输入 SSH 密码,输出如下。recap 中显示 failed=0 这条 如果你没有得到一个成功的 play recap,你可以尝试用 -vvvv 参数(带连接调试的详细信息)再次运行 ansible-playbook 命令来解决部署过程的问题。 -当部署成功(因为我们不是第一次部署)后,你可以验证 NGINX 在远程服务器上运行基本的 [cURL][17] 命令。在这里,它会返回 200 OK。Yes!我们使用Ansible 成功安装了 NGINX。 +当部署成功(假如我们是第一次部署)后,你可以在远程服务器上运行基本的 [cURL][17] 命令验证 NGINX 。在这里,它会返回 200 OK。Yes!我们使用 Ansible 成功安装了 NGINX。 $ curl -Is 172.16.239.140 | grep HTTP HTTP/1.1 200 OK @@ -174,11 +171,11 @@ Ansible 提示输入 SSH 密码,输出如下。recap 中显示 failed=0 这条 #### 复制 NGINX Plus 上的证书和密钥到 Ansible 服务器 #### -使用 Ansible 安装和配置 NGINX Plus 时,首先我们需要将 [NGINX Plus Customer Portal][18] 的密钥和证书复制到部署 Ansible 服务器上的标准位置。 +使用 Ansible 安装和配置 NGINX Plus 时,首先我们需要将 [NGINX Plus Customer Portal][18] NGINX Plus 订阅的密钥和证书复制到 Ansible 部署服务器上的标准位置。 -购买了 NGINX Plus 或正在试用的客户也可以访问 NGINX Plus Customer Portal。如果你有兴趣测试 NGINX Plus,你可以申请免费试用30天[点击这里][19]。在你注册后不久你将收到一个试用证书和密钥的链接。 +购买了 NGINX Plus 或正在试用的客户也可以访问 NGINX Plus Customer Portal。如果你有兴趣测试 NGINX Plus,你可以申请免费试用30天,[点击这里][19]。在你注册后不久你将收到一个试用证书和密钥的链接。 -在 Mac 或 Linux 主机上,我在这里演示使用 [scp][20] 工具。在 Microsoft Windows 主机,可以使用 [WinSCP][21]。在本教程中,先下载文件到我的 Mac 笔记本电脑上,然后使用 scp 将其复制到 Ansible 服务器。密钥和证书的位置都在我的家目录下。 +在 Mac 或 Linux 主机上,我在这里使用 [scp][20] 工具演示。在 Microsoft Windows 主机,可以使用 [WinSCP][21]。在本教程中,先下载文件到我的 Mac 笔记本电脑上,然后使用 scp 将其复制到 Ansible 服务器。密钥和证书的位置都在我的家目录下。 $ cd /path/to/nginx-repo-files/ $ scp nginx-repo.* user@destination-server:. @@ -189,7 +186,7 @@ Ansible 提示输入 SSH 密码,输出如下。recap 中显示 failed=0 这条 $ sudo mkdir -p /etc/ssl/nginx/ $ sudo mv nginx-repo.* /etc/ssl/nginx/ -验证你的 **/etc/ssl/nginx** 目录包含证书(**.crt**)和密钥(**.key**)文件。你可以使用 tree 命令检查。 +验证你的 **/etc/ssl/nginx** 目录包含了证书(**.crt**)和密钥(**.key**)文件。你可以使用 tree 命令检查。 $ tree /etc/ssl/nginx /etc/ssl/nginx @@ -204,7 +201,7 @@ Ansible 提示输入 SSH 密码,输出如下。recap 中显示 failed=0 这条 #### 创建 Ansible 目录结构 #### -以下执行的步骤将和开源 NGINX 的非常相似在[创建安装 NGINX 的 Ansible Playbook 中(CentOS)][22]。首先,我们建一个工作目录为部署 NGINX Plus 使用。我喜欢将它创建为我主目录的子目录。 +以下执行的步骤和我们的“创建 Ansible Playbook 来安装 NGINX(CentOS)”小节中部署开源 NGINX 的非常相似。首先,我们建一个工作目录用于部署 NGINX Plus 使用。我喜欢将它创建为我主目录的子目录。 $ cd $HOME $ mkdir -p ansible-nginx-plus/tasks/ @@ -223,11 +220,11 @@ Ansible 提示输入 SSH 密码,输出如下。recap 中显示 failed=0 这条 #### 创建主部署文件 #### -接下来,我们使用 vim 为开源的 NGINX 创建 **deploy.yml** 文件。 +接下来,像开源的 NGINX 一样,我们使用 vim 创建 **deploy.yml** 文件。 $ vim ansible-nginx-plus/deploy.yml -和开源 NGINX 的部署唯一的区别是,我们将包含文件的名称修改为**install_nginx_plus.yml**。该文件告诉 Ansible 在 **nginx** 组中的所有服务器(**/etc/ansible/hosts** 中定义的)上部署 NGINX Plus ,然后在部署过程中从 **tasks** 目录读取并执行 **install_nginx_plus.yml** 的内容。 +和开源 NGINX 的部署唯一的区别是,我们将包含文件的名称修改为 **install\_nginx\_plus.yml**。该文件告诉 Ansible 在 **nginx** 组中的所有服务器(**/etc/ansible/hosts** 中定义的)上部署 NGINX Plus ,然后在部署过程中从 **tasks** 目录读取并执行 **install\_nginx\_plus.yml** 的内容。 # ./ansible-nginx-plus/deploy.yml @@ -235,22 +232,22 @@ Ansible 提示输入 SSH 密码,输出如下。recap 中显示 failed=0 这条 tasks: - include: 'tasks/install_nginx_plus.yml' -如果你还没有这样做的话,你需要创建 hosts 文件,详细说明在上面的 [创建 NGINX 服务器的列表][23]。 +如果你之前没有安装过的话,你需要创建 hosts 文件,详细说明在上面的“创建 NGINX 服务器的列表”小节。 #### 为 NGINX Plus 创建部署文件 #### -在文本编辑器中打开 **install_nginx_plus.yml**。该文件在部署过程中使用 Ansible 来安装和配置 NGINX Plus。这些命令和模块仅针对 CentOS,有些是 NGINX Plus 独有的。 +在文本编辑器中打开 **install\_nginx\_plus.yml**。该文件包含了使用 Ansible 来安装和配置 NGINX Plus 部署过程中的指令。这些命令和模块仅针对 CentOS,有些是 NGINX Plus 独有的。 $ vim ansible-nginx-plus/tasks/install_nginx_plus.yml -第一部分使用 [文件][24] 模块,告诉 Ansible 使用指定的路径和状态参数为 NGINX Plus 创建特定的 SSL 目录,设置根目录的权限,将权限更改为0700。 +第一节使用 [`file`][24] 模块,告诉 Ansible 使用指定的`path`和`state`参数为 NGINX Plus 创建特定的 SSL 目录,设置属主为 root,将权限 `mode` 更改为0700。 # ./ansible-nginx-plus/tasks/install_nginx_plus.yml - name: NGINX Plus | 创建 NGINX Plus ssl 证书目录 file: path=/etc/ssl/nginx state=directory group=root mode=0700 -接下来的两节使用 [copy][25] 模块从部署 Ansible 的服务器上将 NGINX Plus 的证书和密钥复制到 NGINX Plus 服务器上,再修改权根,将权限设置为0700。 +接下来的两节使用 [copy][25] 模块从 Ansible 部署服务器上将 NGINX Plus 的证书和密钥复制到 NGINX Plus 服务器上,再修改属主为 root,权限 `mode` 为0700。 - name: NGINX Plus | 复制 NGINX Plus repo 证书 copy: src=/etc/ssl/nginx/nginx-repo.crt dest=/etc/ssl/nginx/nginx-repo.crt owner=root group=root mode=0700 @@ -258,17 +255,17 @@ Ansible 提示输入 SSH 密码,输出如下。recap 中显示 failed=0 这条 - name: NGINX Plus | 复制 NGINX Plus 密钥 copy: src=/etc/ssl/nginx/nginx-repo.key dest=/etc/ssl/nginx/nginx-repo.key owner=root group=root mode=0700 -接下来,我们告诉 Ansible 使用 [get_url][26] 模块从 NGINX Plus 仓库下载 CA 证书在 url 参数指定的远程位置,通过 dest 参数把它放在指定的目录,并设置权限为 0700。 +接下来,我们告诉 Ansible 使用 [`get_url`][26] 模块在 url 参数指定的远程位置从 NGINX Plus 仓库下载 CA 证书,通过 `dest` 参数把它放在指定的目录 `dest` ,并设置权限 `mode` 为 0700。 - name: NGINX Plus | 下载 NGINX Plus CA 证书 get_url: url=https://cs.nginx.com/static/files/CA.crt dest=/etc/ssl/nginx/CA.crt mode=0700 -同样,我们告诉 Ansible 使用 get_url 模块下载 NGINX Plus repo 文件,并将其复制到 **/etc/yum.repos.d** 目录下在 NGINX Plus 服务器上。 +同样,我们告诉 Ansible 使用 `get_url` 模块下载 NGINX Plus repo 文件,并将其复制到 NGINX Plus 服务器上的 **/etc/yum.repos.d** 目录下。 - name: NGINX Plus | 下载 yum NGINX Plus 仓库 get_url: url=https://cs.nginx.com/static/files/nginx-plus-7.repo dest=/etc/yum.repos.d/nginx-plus-7.repo mode=0700 -最后两节的 name 告诉 Ansible 使用 yum 和 service 模块下载并启动 NGINX Plus。 +最后两节的 `name` 告诉 Ansible 使用 `yum` 和 `service` 模块下载并启动 NGINX Plus。 - name: NGINX Plus | 安装 NGINX Plus yum: @@ -282,7 +279,7 @@ Ansible 提示输入 SSH 密码,输出如下。recap 中显示 failed=0 这条 #### 运行 Ansible 来部署 NGINX Plus #### -在保存 **install_nginx_plus.yml** 文件后,然后运行 ansible-playbook 命令来部署 NGINX Plus。同样在这里,我们使用 --ask-pass 参数使用 Ansible 提示输入 SSH 密码并把它传递给每个 NGINX Plus 服务器,指定路径在 **deploy.yml** 文件中。 +在保存 **install\_nginx\_plus.yml** 文件后,运行 ansible-playbook 命令来部署 NGINX Plus。同样在这里,我们使用 --ask-pass 参数使用 Ansible 提示输入 SSH 密码并把它传递给每个 NGINX Plus 服务器,并指定主配置文件路径 **deploy.yml** 文件。 $ sudo ansible-playbook --ask-pass $HOME/ansible-nginx-plus/deploy.yml @@ -315,18 +312,18 @@ Ansible 提示输入 SSH 密码,输出如下。recap 中显示 failed=0 这条 PLAY RECAP ******************************************************************** 172.16.239.140 : ok=8 changed=7 unreachable=0 failed=0 -playbook 的 recap 是成功的。现在,使用 curl 命令来验证 NGINX Plus 是否在运行。太好了,我们得到的是 200 OK!成功了!我们使用 Ansible 成功地安装了 NGINX Plus。 +playbook 的 recap 成功完成。现在,使用 curl 命令来验证 NGINX Plus 是否在运行。太好了,我们得到的是 200 OK!成功了!我们使用 Ansible 成功地安装了 NGINX Plus。 $ curl -Is http://172.16.239.140 | grep HTTP HTTP/1.1 200 OK -### 在 Ubuntu 上创建一个 Ansible Playbook 来安装 NGINX 和 NGINX Plus ### +### 在 Ubuntu 上创建 Ansible Playbook 来安装 NGINX 和 NGINX Plus ### -此过程在 [Ubuntu 服务器][27] 上部署 NGINX 和 NGINX Plus 与 CentOS 很相似,我将一步一步的指导来完成整个部署文件,并指出和 CentOS 的细微差异。 +在 [Ubuntu 服务器][27] 上部署 NGINX 和 NGINX Plus 的过程与 CentOS 很相似,我将一步一步的指导来完成整个部署文件,并指出和 CentOS 的细微差异。 -首先和 CentOS 一样,创建 Ansible 目录结构和主要的 Ansible 部署文件。也创建 **/etc/ansible/hosts** 文件来描述 [创建 NGINX 服务器的列表][28]。对于 NGINX Plus,你也需要复制证书和密钥在此步中 [复制 NGINX Plus 证书和密钥到 Ansible 服务器][29]。 +首先和 CentOS 一样,创建 Ansible 目录结构和 Ansible 主部署文件。也按“创建 NGINX 服务器的列表”小节的描述创建 **/etc/ansible/hosts** 文件。对于 NGINX Plus,你也需要安装“复制 NGINX Plus 证书和密钥到 Ansible 服务器”小节的描述复制证书和密钥。 -下面是开源 NGINX 的 **install_nginx.yml** 部署文件。在第一部分,我们使用 [apt_key][30] 模块导入 Nginx 的签名密钥。接下来的两节使用[lineinfile][31] 模块来添加 URLs 到 **sources.list** 文件中。最后,我们使用 [apt][32] 模块来更新缓存并安装 NGINX(apt 取代了我们在 CentOS 中部署时的 yum 模块)。 +下面是开源 NGINX 的 **install\_nginx.yml** 部署文件。在第一节,我们使用 [`apt_key`][30] 模块导入 NGINX 的签名密钥。接下来的两节使用 [`lineinfile`][31] 模块来添加 Ubuntu 14.04 的软件包 URL 到 **sources.list** 文件中。最后,我们使用 [`apt`][32] 模块来更新缓存并安装 NGINX(`apt` 取代了我们在 CentOS 中部署时的 `yum` 模块)。 # ./ansible-nginx/tasks/install_nginx.yml @@ -352,7 +349,8 @@ playbook 的 recap 是成功的。现在,使用 curl 命令来验证 NGINX Plu service: name: nginx state: started -下面是 NGINX Plus 的部署文件 **install_nginx.yml**。前四节设置了 NGINX Plus 密钥和证书。然后,我们用 apt_key 模块为开源的 NGINX 导入签名密钥,get_url 模块为 NGINX Plus 下载 apt 配置文件。[shell][33] 模块使用 printf 命令写下输出到 **nginx-plus.list** 文件中在**sources.list.d** 目录。最终的 name 模块是为开源 NGINX 的。 + +下面是 NGINX Plus 的部署文件 **install\_nginx.yml**。前四节设置了 NGINX Plus 密钥和证书。然后,我们像开源的 NGINX 一样用 `apt_key` 模块导入签名密钥,`get_url` 模块为 NGINX Plus 下载 `apt` 配置文件。[`shell`][33] 模块使用 `printf` 命令写下输出到 **sources.list.d** 目录中的 **nginx-plus.list** 文件。最终的 `name` 模块和开源 NGINX 一样。 # ./ansible-nginx-plus/tasks/install_nginx_plus.yml @@ -395,13 +393,12 @@ playbook 的 recap 是成功的。现在,使用 curl 命令来验证 NGINX Plu $ sudo ansible-playbook --ask-pass $HOME/ansible-nginx-plus/deploy.yml -你应该得到一个成功的 play recap。如果你没有成功,你可以使用 verbose 参数,以帮助你解决在 [运行 Ansible 来部署 NGINX][34] 中出现的问题。 +你应该得到一个成功的 play recap。如果你没有成功,你可以使用冗余参数,以帮助你解决出现的问题。 ### 小结 ### -我在这个教程中演示是什么是 Ansible,可以做些什么来帮助你自动部署 NGINX 或 NGINX Plus,这仅仅是个开始。还有许多有用的模块,用户账号管理,自定义配置模板等。如果你有兴趣了解更多关于这些,请访问 [Ansible 官方文档][35]。 +我在这个教程中演示是什么是 Ansible,可以做些什么来帮助你自动部署 NGINX 或 NGINX Plus,这仅仅是个开始。还有许多有用的模块,包括从用户账号管理到自定义配置模板等。如果你有兴趣了解关于这些的更多信息,请访问 [Ansible 官方文档][35]。 -要了解更多关于 Ansible,来听我讲用 Ansible 部署 NGINX Plus 在[NGINX.conf 2015][36],9月22-24日在旧金山。 -------------------------------------------------------------------------------- @@ -409,7 +406,7 @@ via: https://www.nginx.com/blog/installing-nginx-nginx-plus-ansible/ 作者:[Kevin Jones][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 38aeb0a1ff2f2137bc3424bcd21536555c65a50d Mon Sep 17 00:00:00 2001 From: joeren Date: Fri, 9 Oct 2015 08:16:14 +0800 Subject: [PATCH 2214/2517] Update 20151007 Productivity Tools And Tips For Linux.md --- sources/tech/20151007 Productivity Tools And Tips For Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151007 Productivity Tools And Tips For Linux.md b/sources/tech/20151007 Productivity Tools And Tips For Linux.md index 7aa53de511..2434669710 100644 --- a/sources/tech/20151007 Productivity Tools And Tips For Linux.md +++ b/sources/tech/20151007 Productivity Tools And Tips For Linux.md @@ -1,3 +1,4 @@ +Translating by GOLinux! Productivity Tools And Tips For Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Productivity-Tips-Linux.jpg) @@ -75,4 +76,4 @@ via: http://itsfoss.com/productivity-tips-ubuntu/ [12]:https://esite.ch/tag/diodon/ [13]:http://itsfoss.com/7-best-indicator-applets-for-ubuntu-13-10/ [14]:http://itsfoss.com/change-sudo-password-timeout-ubuntu/ -[15]:http://itsfoss.com/notification-terminal-command-completion-ubuntu/ \ No newline at end of file +[15]:http://itsfoss.com/notification-terminal-command-completion-ubuntu/ From 3acfc713642d73f5fd884cc228eaea9c87ac67ec Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 9 Oct 2015 10:57:52 +0800 Subject: [PATCH 2215/2517] =?UTF-8?q?20151009-1=20=E9=80=89=E9=A2=98=20RAI?= =?UTF-8?q?D=20=E7=AC=AC=E5=85=AB=E7=AF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Data and Rebuild Failed Software RAID's.md | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md diff --git a/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md b/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md new file mode 100644 index 0000000000..2acf1dfd86 --- /dev/null +++ b/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md @@ -0,0 +1,167 @@ +How to Recover Data and Rebuild Failed Software RAID’s – Part 8 +================================================================================ +In the previous articles of this [RAID series][1] you went from zero to RAID hero. We reviewed several software RAID configurations and explained the essentials of each one, along with the reasons why you would lean towards one or the other depending on your specific scenario. + +![Recover Rebuild Failed Software RAID's](http://www.tecmint.com/wp-content/uploads/2015/10/Recover-Rebuild-Failed-Software-RAID.png) + +Recover Rebuild Failed Software RAID’s – Part 8 + +In this guide we will discuss how to rebuild a software RAID array without data loss when in the event of a disk failure. For brevity, we will only consider a RAID 1 setup – but the concepts and commands apply to all cases alike. + +#### RAID Testing Scenario #### + +Before proceeding further, please make sure you have set up a RAID 1 array following the instructions provided in Part 3 of this series: [How to set up RAID 1 (Mirror) in Linux][2]. + +The only variations in our present case will be: + +1) a different version of CentOS (v7) than the one used in that article (v6.5), and + +2) different disk sizes for /dev/sdb and /dev/sdc (8 GB each). + +In addition, if SELinux is enabled in enforcing mode, you will need to add the corresponding labels to the directory where you’ll mount the RAID device. Otherwise, you’ll run into this warning message while attempting to mount it: + +![SELinux RAID Mount Error](http://www.tecmint.com/wp-content/uploads/2015/10/SELinux-RAID-Mount-Error.png) + +SELinux RAID Mount Error + +You can fix this by running: + + # restorecon -R /mnt/raid1 + +### Setting up RAID Monitoring ### + +There is a variety of reasons why a storage device can fail (SSDs have greatly reduced the chances of this happening, though), but regardless of the cause you can be sure that issues can occur anytime and you need to be prepared to replace the failed part and to ensure the availability and integrity of your data. + +A word of advice first. Even when you can inspect /proc/mdstat in order to check the status of your RAIDs, there’s a better and time-saving method that consists of running mdadm in monitor + scan mode, which will send alerts via email to a predefined recipient. + +To set this up, add the following line in /etc/mdadm.conf: + + MAILADDR user@ + +In my case: + + MAILADDR gacanepa@localhost + +![RAID Monitoring Email Alerts](http://www.tecmint.com/wp-content/uploads/2015/10/RAID-Monitoring-Email-Alerts.png) + +RAID Monitoring Email Alerts + +To run mdadm in monitor + scan mode, add the following crontab entry as root: + + @reboot /sbin/mdadm --monitor --scan --oneshot + +By default, mdadm will check the RAID arrays every 60 seconds and send an alert if it finds an issue. You can modify this behavior by adding the `--delay` option to the crontab entry above along with the amount of seconds (for example, `--delay` 1800 means 30 minutes). + +Finally, make sure you have a Mail User Agent (MUA) installed, such as [mutt or mailx][3]. Otherwise, you will not receive any alerts. + +In a minute we will see what an alert sent by mdadm looks like. + +### Simulating and Replacing a failed RAID Storage Device ### + +To simulate an issue with one of the storage devices in the RAID array, we will use the `--manage` and `--set-faulty` options as follows: + + # mdadm --manage --set-faulty /dev/md0 /dev/sdc1 + +This will result in /dev/sdc1 being marked as faulty, as we can see in /proc/mdstat: + +![Stimulate Issue with RAID Storage](http://www.tecmint.com/wp-content/uploads/2015/10/Stimulate-Issue-with-RAID-Storage.png) + +Stimulate Issue with RAID Storage + +More importantly, let’s see if we received an email alert with the same warning: + +![Email Alert on Failed RAID Device](http://www.tecmint.com/wp-content/uploads/2015/10/Email-Alert-on-Failed-RAID-Device.png) + +Email Alert on Failed RAID Device + +In this case, you will need to remove the device from the software RAID array: + + # mdadm /dev/md0 --remove /dev/sdc1 + +Then you can physically remove it from the machine and replace it with a spare part (/dev/sdd, where a partition of type fd has been previously created): + + # mdadm --manage /dev/md0 --add /dev/sdd1 + +Luckily for us, the system will automatically start rebuilding the array with the part that we just added. We can test this by marking /dev/sdb1 as faulty, removing it from the array, and making sure that the file tecmint.txt is still accessible at /mnt/raid1: + + # mdadm --detail /dev/md0 + # mount | grep raid1 + # ls -l /mnt/raid1 | grep tecmint + # cat /mnt/raid1/tecmint.txt + +![Confirm Rebuilding RAID Array](http://www.tecmint.com/wp-content/uploads/2015/10/Rebuilding-RAID-Array.png) + +Confirm Rebuilding RAID Array + +The image above clearly shows that after adding /dev/sdd1 to the array as a replacement for /dev/sdc1, the rebuilding of data was automatically performed by the system without intervention on our part. + +Though not strictly required, it’s a great idea to have a spare device in handy so that the process of replacing the faulty device with a good drive can be done in a snap. To do that, let’s re-add /dev/sdb1 and /dev/sdc1: + + # mdadm --manage /dev/md0 --add /dev/sdb1 + # mdadm --manage /dev/md0 --add /dev/sdc1 + +![Replace Failed Raid Device](http://www.tecmint.com/wp-content/uploads/2015/10/Replace-Failed-Raid-Device.png) + +Replace Failed Raid Device + +### Recovering from a Redundancy Loss ### + +As explained earlier, mdadm will automatically rebuild the data when one disk fails. But what happens if 2 disks in the array fail? Let’s simulate such scenario by marking /dev/sdb1 and /dev/sdd1 as faulty: + + # umount /mnt/raid1 + # mdadm --manage --set-faulty /dev/md0 /dev/sdb1 + # mdadm --stop /dev/md0 + # mdadm --manage --set-faulty /dev/md0 /dev/sdd1 + +Attempts to re-create the array the same way it was created at this time (or using the `--assume-clean` option) may result in data loss, so it should be left as a last resort. + +Let’s try to recover the data from /dev/sdb1, for example, into a similar disk partition (/dev/sde1 – note that this requires that you create a partition of type fd in /dev/sde before proceeding) using ddrescue: + + # ddrescue -r 2 /dev/sdb1 /dev/sde1 + +![Recovering Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Recovering-Raid-Array.png) + +Recovering Raid Array + +Please note that up to this point, we haven’t touched /dev/sdb or /dev/sdd, the partitions that were part of the RAID array. + +Now let’s rebuild the array using /dev/sde1 and /dev/sdf1: + + # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[e-f]1 + +Please note that in a real situation, you will typically use the same device names as with the original array, that is, /dev/sdb1 and /dev/sdc1 after the failed disks have been replaced with new ones. + +In this article I have chosen to use extra devices to re-create the array with brand new disks and to avoid confusion with the original failed drives. + +When asked whether to continue writing array, type Y and press Enter. The array should be started and you should be able to watch its progress with: + + # watch -n 1 cat /proc/mdstat + +When the process completes, you should be able to access the content of your RAID: + +![Confirm Raid Content](http://www.tecmint.com/wp-content/uploads/2015/10/Raid-Content.png) + +Confirm Raid Content + +### Summary ### + +In this article we have reviewed how to recover from RAID failures and redundancy losses. However, you need to remember that this technology is a storage solution and DOES NOT replace backups. + +The principles explained in this guide apply to all RAID setups alike, as well as the concepts that we will cover in the next and final guide of this series (RAID management). + +If you have any questions about this article, feel free to drop us a note using the comment form below. We look forward to hearing from you! + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/recover-data-and-rebuild-failed-software-raid/ + +作者:[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/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/create-raid1-in-linux/ +[3]:http://www.tecmint.com/send-mail-from-command-line-using-mutt-command/ \ No newline at end of file From a67a6b1dfaeaa36ce66bbe90b8e6c9a8be6928a2 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 9 Oct 2015 11:41:18 +0800 Subject: [PATCH 2216/2517] Update Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md --- ...- How to Recover Data and Rebuild Failed Software RAID's.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md b/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md index 2acf1dfd86..57f93d50b2 100644 --- a/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md +++ b/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md @@ -1,3 +1,4 @@ +translation by strugglingyouth How to Recover Data and Rebuild Failed Software RAID’s – Part 8 ================================================================================ In the previous articles of this [RAID series][1] you went from zero to RAID hero. We reviewed several software RAID configurations and explained the essentials of each one, along with the reasons why you would lean towards one or the other depending on your specific scenario. @@ -164,4 +165,4 @@ via: http://www.tecmint.com/recover-data-and-rebuild-failed-software-raid/ [a]:http://www.tecmint.com/author/gacanepa/ [1]:http://www.tecmint.com/understanding-raid-setup-in-linux/ [2]:http://www.tecmint.com/create-raid1-in-linux/ -[3]:http://www.tecmint.com/send-mail-from-command-line-using-mutt-command/ \ No newline at end of file +[3]:http://www.tecmint.com/send-mail-from-command-line-using-mutt-command/ From 31d56aa19639e919cf432954ee8db69b98f484bb Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 9 Oct 2015 14:13:35 +0800 Subject: [PATCH 2217/2517] PUB:20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @osk874 这篇翻译质量欠佳,还有漏译。 --- ...Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 102 ++++++++++++++++++ ...Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 102 ------------------ 2 files changed, 102 insertions(+), 102 deletions(-) create mode 100644 published/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md delete mode 100644 translated/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md diff --git a/published/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/published/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md new file mode 100644 index 0000000000..b96571c9fc --- /dev/null +++ b/published/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md @@ -0,0 +1,102 @@ +在 Ubuntu 14.04/15.04 上配置 Node JS v4.0.0 +================================================================================ +大家好,Node.JS 4.0 发布了,这个流行的服务器端 JS 平台合并了 Node.js 和 io.js 的代码,4.0 版就是这两个项目结合的产物——现在合并为一个代码库。这次最主要的变化是 Node.js 封装了4.5 版本的 Google V8 JS 引擎,与当前的 Chrome 所带的一致。所以,紧跟 V8 的发布可以让 Node.js 运行的更快、更安全,同时更好的利用 ES6 的很多语言特性。 + +![Node JS](http://blog.linoxide.com/wp-content/uploads/2015/09/nodejs.png) + +Node.js 4.0 发布的主要目标是为 io.js 用户提供一个简单的升级途径,所以这次并没有太多重要的 API 变更。下面的内容让我们来看看如何轻松的在 ubuntu server 上安装、配置 Node.js。 + +### 基础系统安装 ### + +Node 在 Linux,Macintosh,Solaris 这几个系统上都可以完美的运行,linux 的发行版本当中使用 Ubuntu 相当适合。这也是我们为什么要尝试在 ubuntu 15.04 上安装 Node.js,当然了在 14.04 上也可以使用相同的步骤安装。 + +#### 1) 系统资源 #### + +Node.js 所需的基本的系统资源取决于你的架构需要。本教程我们会在一台 1GB 内存、 1GHz 处理器和 10GB 磁盘空间的服务器上进行,最小安装即可,不需要安装 Web 服务器或数据库服务器。 + +#### 2) 系统更新 #### + +在我们安装 Node.js 之前,推荐你将系统更新到最新的补丁和升级包,所以请登录到系统中使用超级用户运行如下命令: + + # apt-get update + +#### 3) 安装依赖 #### + +Node.js 仅需要你的服务器上有一些基本系统和软件功能,比如 'make'、'gcc'和'wget' 之类的。如果你还没有安装它们,运行如下命令安装: + + # apt-get install python gcc make g++ wget + +### 下载最新版的Node JS v4.0.0 ### + +访问链接 [Node JS Download Page][1] 下载源代码. + +![nodejs download](http://blog.linoxide.com/wp-content/uploads/2015/09/download.png) + +复制其中的最新的源代码的链接,然后用`wget` 下载,命令如下: + + # wget https://nodejs.org/download/rc/v4.0.0-rc.1/node-v4.0.0-rc.1.tar.gz + +下载完成后使用命令`tar` 解压缩: + + # tar -zxvf node-v4.0.0-rc.1.tar.gz + +![wget nodejs](http://blog.linoxide.com/wp-content/uploads/2015/09/wget.png) + +### 安装 Node JS v4.0.0 ### + +现在可以开始使用下载好的源代码编译 Node.js。在开始编译前,你需要在 ubuntu server 上切换到源代码解压缩后的目录,运行 configure 脚本来配置源代码。 + + root@ubuntu-15:~/node-v4.0.0-rc.1# ./configure + +![Installing NodeJS](http://blog.linoxide.com/wp-content/uploads/2015/09/configure.png) + +现在运行命令 'make install' 编译安装 Node.js: + + root@ubuntu-15:~/node-v4.0.0-rc.1# make install + +make 命令会花费几分钟完成编译,安静的等待一会。 + +### 验证 Node.js 安装 ### + +一旦编译任务完成,我们就可以开始验证安装工作是否 OK。我们运行下列命令来确认 Node.js 的版本。 + + root@ubuntu-15:~# node -v + v4.0.0-pre + +在命令行下不带参数的运行`node` 就会进入 REPL(Read-Eval-Print-Loop,读-执行-输出-循环)模式,它有一个简化版的emacs 行编辑器,通过它你可以交互式的运行JS和查看运行结果。 + +![node version](http://blog.linoxide.com/wp-content/uploads/2015/09/node.png) + +### 编写测试程序 ### + +我们也可以写一个很简单的终端程序来测试安装是否成功,并且工作正常。要做这个,我们将会创建一个“test.js” 文件,包含以下代码,操作如下: + + root@ubuntu-15:~# vim test.js + var util = require("util"); + console.log("Hello! This is a Node Test Program"); + :wq! + +现在为了运行上面的程序,在命令行运行下面的命令。 + + root@ubuntu-15:~# node test.js + +![Node Program](http://blog.linoxide.com/wp-content/uploads/2015/09/node-test.png) + +在一个成功安装了 Node JS 的环境下运行上面的程序就会在屏幕上得到上图所示的输出,这个程序加载类 “util” 到变量 “util” 中,接着用对象 “util” 运行终端任务,console.log 这个命令作用类似 C++ 里的cout + +### 结论 ### + +就是这些了。如果你刚刚开始使用 Node.js 开发应用程序,希望本文能够通过在 ubuntu 上安装、运行 Node.js 让你了解一下Node.js 的大概。最后,我们可以认为我们可以期待 Node JS v4.0.0 能够取得显著性能提升。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-node-js-4-0-ubuntu-14-04-15-04/ + +作者:[Kashif Siddique][a] +译者:[osk874](https://github.com/osk874) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/kashifs/ +[1]:https://nodejs.org/download/rc/v4.0.0-rc.1/ diff --git a/translated/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/translated/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md deleted file mode 100644 index 453ab2c234..0000000000 --- a/translated/tech/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md +++ /dev/null @@ -1,102 +0,0 @@ - -在ubunt 14.04/15.04 上配置Node JS v4.0.0 -================================================================================ -大家好,Node.JS 4.0 发布了,主流的服务器端JS 平台已经将Node.js 和io.js 结合到一起。4.0 版就是两者结合的产物——共用一个代码库。这次最主要的变化是Node.js 封装了Google V8 4.5 JS 引擎,而这一版与当前的Chrome 一致。所以,紧跟V8 的版本号可以让Node.js 运行的更快、更安全,同时更好的利用ES6 的很多语言特性。 - -![Node JS](http://blog.linoxide.com/wp-content/uploads/2015/09/nodejs.png) - -Node.js 4.0 的目标是为io.js 当前用户提供一个简单的升级途径,所以这次并没有太多重要的API 变更。剩下的内容会让我们看到如何轻松的在ubuntu server 上安装、配置Node.js。 - -### 基础系统安装 ### - -Node 在Linux,Macintosh,Solaris 这几个系统上都可以完美的运行,同时linux 的发行版本当中Ubuntu 是最合适的。这也是我们为什么要尝试在ubuntu 15.04 上安装Node,当然了在14.04 上也可以使用相同的步骤安装。 -#### 1) 系统资源 #### - -The basic system resources for Node depend upon the size of your infrastructure requirements. So, here in this tutorial we will setup Node with 1 GB RAM, 1 GHz Processor and 10 GB of available disk space with minimal installation packages installed on the server that is no web or database server packages are installed. - -#### 2) 系统更新 #### - -It always been recommended to keep your system upto date with latest patches and updates, so before we move to the installation on Node, let's login to your server with super user privileges and run update command. - - # apt-get update - -#### 3) 安装依赖 #### - -Node JS only requires some basic system and software utilities to be present on your server, for its successful installation like 'make' 'gcc' and 'wget'. Let's run the below command to get them installed if they are not already present. - - # apt-get install python gcc make g++ wget - -### 下载最新版的Node JS v4.0.0 ### - -使用链接 [Node JS Download Page][1] 下载源代码. - -![nodejs download](http://blog.linoxide.com/wp-content/uploads/2015/09/download.png) - -我们会复制最新源代码的链接,然后用`wget` 下载,命令如下: - - # wget https://nodejs.org/download/rc/v4.0.0-rc.1/node-v4.0.0-rc.1.tar.gz - -下载完成后使用命令`tar` 解压缩: - - # tar -zxvf node-v4.0.0-rc.1.tar.gz - -![wget nodejs](http://blog.linoxide.com/wp-content/uploads/2015/09/wget.png) - -### 安装 Node JS v4.0.0 ### - -现在可以开始使用下载好的源代码编译Nod JS。你需要在ubuntu serve 上开始编译前运行配置脚本来修改你要使用目录和配置参数。 - - root@ubuntu-15:~/node-v4.0.0-rc.1# ./configure - -![Installing NodeJS](http://blog.linoxide.com/wp-content/uploads/2015/09/configure.png) - -现在运行命令'make install' 编译安装Node JS: - - root@ubuntu-15:~/node-v4.0.0-rc.1# make install - -make 命令会花费几分钟完成编译,冷静的等待一会。 - -### 验证Node 安装 ### - -一旦编译任务完成,我们就可以开始验证安装工作是否OK。我们运行下列命令来确认Node JS 的版本。 - - root@ubuntu-15:~# node -v - v4.0.0-pre - -在命令行下不带参数的运行`node` 就会进入REPL(Read-Eval-Print-Loop,读-执行-输出-循环)模式,它有一个简化版的emacs 行编辑器,通过它你可以交互式的运行JS和查看运行结果。 -![node version](http://blog.linoxide.com/wp-content/uploads/2015/09/node.png) - -### 写测试程序 ### - -我们也可以写一个很简单的终端程序来测试安装是否成功,并且工作正常。要完成这一点,我们将会创建一个“tes.js” 文件,包含一下代码,操作如下: - - root@ubuntu-15:~# vim test.js - var util = require("util"); - console.log("Hello! This is a Node Test Program"); - :wq! - -现在为了运行上面的程序,在命令行运行下面的命令。 - - root@ubuntu-15:~# node test.js - -![Node Program](http://blog.linoxide.com/wp-content/uploads/2015/09/node-test.png) - -在一个成功安装了Node JS 的环境下运行上面的程序就会在屏幕上得到上图所示的输出,这个程序加载类 “util” 到变量“util” 中,接着用对象“util” 运行终端任务,console.log 这个命令作用类似C++ 里的cout - -### 结论 ### - -That’s it. Hope this gives you a good idea of Node.js going with Node.js on Ubuntu. If you are new to developing applications with Node.js. After all we can say that we can expect significant performance gains with Node JS Version 4.0.0. -希望本文能够通过在ubuntu 上安装、运行Node.JS让你了解一下Node JS 的大概,如果你是刚刚开始使用Node.JS 开发应用程序。最后我们可以说我们能够通过Node JS v4.0.0 获取显著的性能。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/setup-node-js-4-0-ubuntu-14-04-15-04/ - -作者:[Kashif Siddique][a] -译者:[译者ID](https://github.com/osk874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/kashifs/ -[1]:https://nodejs.org/download/rc/v4.0.0-rc.1/ From 94385f848247fb60bf4d57dad869c1e6513e26de Mon Sep 17 00:00:00 2001 From: alim0x Date: Fri, 9 Oct 2015 20:56:26 +0800 Subject: [PATCH 2218/2517] [translating]20151007 Open Source Media Player MPlayer 1.2 Released --- ...pen Source Media Player MPlayer 1.2 Released.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md b/sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md index 518a2a4135..52a6887786 100644 --- a/sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md +++ b/sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md @@ -1,3 +1,5 @@ +alim0x translating + Open Source Media Player MPlayer 1.2 Released ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/MPlayer-1.2.jpg) @@ -30,19 +32,19 @@ I have used Ubuntu 15.04 for the installation of MPlayer 1.2. Installation instr Open a terminal and use the following commands: wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.2.tar.xz - + tar xvf MPlayer-1.1.1.tar.xz - + cd MPlayer-1.2 - + sudo apt-get install yasm - + ./configure When you run make, it will throw a number of things on the terminal screen and takes some time to build it. Have patience. make - + sudo make install If you feel uncomfortable using the source code, I advise you to either wait forMPlayer 1.2 to land in the repositories of your Linux distribution or use an alternate like MPV. @@ -59,4 +61,4 @@ via: http://itsfoss.com/mplayer-1-2-released/ [a]:http://itsfoss.com/author/abhishek/ [1]:https://www.mplayerhq.hu/ -[2]:http://mpv.io/ \ No newline at end of file +[2]:http://mpv.io/ From 913bda2922ce5c68811172a8fc0badf32f4e549f Mon Sep 17 00:00:00 2001 From: bazz2 Date: Sat, 10 Oct 2015 09:05:21 +0800 Subject: [PATCH 2219/2517] [translated]How to filter BGP routes in Quagga BGP router --- ... filter BGP routes in Quagga BGP router.md | 202 ------------------ ... filter BGP routes in Quagga BGP router.md | 201 +++++++++++++++++ 2 files changed, 201 insertions(+), 202 deletions(-) delete mode 100644 sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md create mode 100644 translated/tech/20150202 How to filter BGP routes in Quagga BGP router.md diff --git a/sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md b/sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md deleted file mode 100644 index f227e0c506..0000000000 --- a/sources/tech/20150202 How to filter BGP routes in Quagga BGP router.md +++ /dev/null @@ -1,202 +0,0 @@ -[bazz222] -How to filter BGP routes in Quagga BGP router -================================================================================ -In the [previous tutorial][1], we demonstrated how to turn a CentOS box into a BGP router using Quagga. We also covered basic BGP peering and prefix exchange setup. In this tutorial, we will focus on how we can control incoming and outgoing BGP prefixes by using **prefix-list** and **route-map**. - -As described in earlier tutorials, BGP routing decisions are made based on the prefixes received/advertised. To ensure error-free routing, it is recommended that you use some sort of filtering mechanism to control these incoming and outgoing prefixes. For example, if one of your BGP neighbors starts advertising prefixes which do not belong to them, and you accept such bogus prefixes by mistake, your traffic can be sent to that wrong neighbor, and end up going nowhere (so-called "getting blackholed"). To make sure that such prefixes are not received or advertised to any neighbor, you can use prefix-list and route-map. The former is a prefix-based filtering mechanism, while the latter is a more general prefix-based policy mechanism used to fine-tune actions. - -We will show you how to use prefix-list and route-map in Quagga. - -### Topology and Requirement ### - -In this tutorial, we assume the following topology. - -![](https://farm8.staticflickr.com/7394/16407625405_4f7d24d1f6_c.jpg) - -Service provider A has already established an eBGP peering with service provider B, and they are exchanging routing information between them. The AS and prefix details are as stated below. - -- **Peering block**: 192.168.1.0/24 -- **Service provider A**: AS 100, prefix 10.10.0.0/16 -- **Service provider B**: AS 200, prefix 10.20.0.0/16 - -In this scenario, service provider B wants to receive only prefixes 10.10.10.0/23, 10.10.10.0/24 and 10.10.11.0/24 from provider A. - -### Quagga Installation and BGP Peering ### - -In the [previous tutorial][1], we have already covered the method of installing Quagga and setting up BGP peering. So we will not go through the details here. Nonetheless, I am providing a summary of BGP configuration and prefix advertisements: - -![](https://farm8.staticflickr.com/7428/16219986668_97cb193b15_c.jpg) - -The above output indicates that the BGP peering is up. Router-A is advertising multiple prefixes towards router-B. Router-B, on the other hand, is advertising a single prefix 10.20.0.0/16 to router-A. Both routers are receiving the prefixes without any problems. - -### Creating Prefix-List ### - -In a router, a prefix can be blocked with either an ACL or prefix-list. Using prefix-list is often preferred to ACLs since prefix-list is less processor intensive than ACLs. Also, prefix-list is easier to create and maintain. - - ip prefix-list DEMO-PRFX permit 192.168.0.0/23 - -The above command creates prefix-list called 'DEMO-FRFX' that allows only 192.168.0.0/23. - -Another great feature of prefix-list is that we can specify a range of subnet mask(s). Take a look at the following example: - - ip prefix-list DEMO-PRFX permit 192.168.0.0/23 le 24 - -The above command creates prefix-list called 'DEMO-PRFX' that permits prefixes between 192.168.0.0/23 and /24, which are 192.168.0.0/23, 192.168.0.0/24 and 192.168.1.0/24. The 'le' operator means less than or equal to. You can also use 'ge' operator for greater than or equal to. - -A single prefix-list statement can have multiple permit/deny actions. Each statement is assigned a sequence number which can be determined automatically or specified manually. - -Multiple prefix-list statements are parsed one by one in the increasing order of sequence numbers. When configuring prefix-list, we should keep in mind that there is always an **implicit deny** at the end of all prefix-list statements. This means that anything that is not explicitly allowed will be denied. - -To allow everything, we can use the following prefix-list statement which allows any prefix starting from 0.0.0.0/0 up to anything with subnet mask /32. - - ip prefix-list DEMO-PRFX permit 0.0.0.0/0 le 32 - -Now that we know how to create prefix-list statements, we will create prefix-list called 'PRFX-LST' that will allow prefixes required in our scenario. - - router-b# conf t - router-b(config)# ip prefix-list PRFX-LST permit 10.10.10.0/23 le 24 - -### Creating Route-Map ### - -Besides prefix-list and ACLs, there is yet another mechanism called route-map, which can control prefixes in a BGP router. In fact, route-map can fine-tune possible actions more flexibly on the prefixes matched with an ACL or prefix-list. - -Similar to prefix-list, a route-map statement specifies permit or deny action, followed by a sequence number. Each route-map statement can have multiple permit/deny actions with it. For example: - - route-map DEMO-RMAP permit 10 - -The above statement creates route-map called 'DEMO-RMAP', and adds permit action with sequence 10. Now we will use match command under sequence 10. - - router-a(config-route-map)# match (press ? in the keyboard) - ----------- - - as-path Match BGP AS path list - community Match BGP community list - extcommunity Match BGP/VPN extended community list - interface match first hop interface of route - ip IP information - ipv6 IPv6 information - metric Match metric of route - origin BGP origin code - peer Match peer address - probability Match portion of routes defined by percentage value - tag Match tag of route - -As we can see, route-map can match many attributes. We will match a prefix in this tutorial. - - route-map DEMO-RMAP permit 10 - match ip address prefix-list DEMO-PRFX - -The match command will match the IP addresses permitted by the prefix-list 'DEMO-PRFX' created earlier (i.e., prefixes 192.168.0.0/23, 192.168.0.0/24 and 192.168.1.0/24). - -Next, we can modify the attributes by using the set command. The following example shows possible use cases of set. - - route-map DEMO-RMAP permit 10 - match ip address prefix-list DEMO-PRFX - set (press ? in keyboard) - ----------- - - aggregator BGP aggregator attribute - as-path Transform BGP AS-path attribute - atomic-aggregate BGP atomic aggregate attribute - comm-list set BGP community list (for deletion) - community BGP community attribute - extcommunity BGP extended community attribute - forwarding-address Forwarding Address - ip IP information - ipv6 IPv6 information - local-preference BGP local preference path attribute - metric Metric value for destination routing protocol - metric-type Type of metric - origin BGP origin code - originator-id BGP originator ID attribute - src src address for route - tag Tag value for routing protocol - vpnv4 VPNv4 information - weight BGP weight for routing table - -As we can see, the set command can be used to change many attributes. For a demonstration purpose, we will set BGP local preference. - - route-map DEMO-RMAP permit 10 - match ip address prefix-list DEMO-PRFX - set local-preference 500 - -Just like prefix-list, there is an implicit deny at the end of all route-map statements. So we will add another permit statement in sequence number 20 to permit everything. - - route-map DEMO-RMAP permit 10 - match ip address prefix-list DEMO-PRFX - set local-preference 500 - ! - route-map DEMO-RMAP permit 20 - -The sequence number 20 does not have a specific match command, so it will, by default, match everything. Since the decision is permit, everything will be permitted by this route-map statement. - -If you recall, our requirement is to only allow/deny some prefixes. So in our scenario, the set command is not necessary. We will just use one permit statement as follows. - - router-b# conf t - router-b(config)# route-map RMAP permit 10 - router-b(config-route-map)# match ip address prefix-list PRFX-LST - -This route-map statement should do the trick. - -### Applying Route-Map ### - -Keep in mind that ACLs, prefix-list and route-map are not effective unless they are applied to an interface or a BGP neighbor. Just like ACLs or prefix-list, a single route-map statement can be used with any number of interfaces or neighbors. However, any one interface or a neighbor can support only one route-map statement for inbound, and one for outbound traffic. - -We will apply the created route-map to the BGP configuration of router-B for neighbor 192.168.1.1 with incoming prefix advertisement. - - router-b# conf terminal - router-b(config)# router bgp 200 - router-b(config-router)# neighbor 192.168.1.1 route-map RMAP in - -Now, we check the routes advertised and received by using the following commands. - -For advertised routes: - - show ip bgp neighbor-IP advertised-routes - -For received routes: - - show ip bgp neighbor-IP routes - -![](https://farm8.staticflickr.com/7424/16221405429_4d86119548_c.jpg) - -You can see that while router-A is advertising four prefixes towards router-B, router-B is accepting only three prefixes. If we check the range, we can see that only the prefixes that are allowed by route-map are visible on router-B. All other prefixes are discarded. - -**Tip**: If there is no change in the received prefixes, try resetting the BGP session using the command: "clear ip bgp neighbor-IP". In our case: - - clear ip bgp 192.168.1.1 - -As we can see, the requirement has been met. We can create similar prefix-list and route-map statements in routers A and B to further control inbound and outbound prefixes. - -I am summarizing the configuration in one place so you can see it all at a glance. - - router bgp 200 - network 10.20.0.0/16 - neighbor 192.168.1.1 remote-as 100 - neighbor 192.168.1.1 route-map RMAP in - ! - ip prefix-list PRFX-LST seq 5 permit 10.10.10.0/23 le 24 - ! - route-map RMAP permit 10 - match ip address prefix-list PRFX-LST - -### Summary ### - -In this tutorial, we showed how we can filter BGP routes in Quagga by defining prefix-list and route-map. We also demonstrated how we can combine prefix-list with route-map to fine-control incoming prefixes. You can create your own prefix-list and route-map in a similar way to match your network requirements. These tools are one of the most effective ways to protect the production network from route poisoning and advertisement of bogon routes. - -Hope this helps. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html - -作者:[Sarmed Rahman][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/centos-bgp-router-quagga.html diff --git a/translated/tech/20150202 How to filter BGP routes in Quagga BGP router.md b/translated/tech/20150202 How to filter BGP routes in Quagga BGP router.md new file mode 100644 index 0000000000..53ce40cac6 --- /dev/null +++ b/translated/tech/20150202 How to filter BGP routes in Quagga BGP router.md @@ -0,0 +1,201 @@ +如何使用 Quagga BGP(边界网关协议)路由器来过滤 BGP 路由 +================================================================================ +在[之前的文章][1]中,我们介绍了如何使用 Quagga 将 CentOS 服务器变成一个 BGP 路由器,也介绍了 BGP 对等体和前缀交换设置。在本教程中,我们将重点放在如何使用**前缀列表**和**路由映射**来分别控制数据注入和数据输出。 + +之前的文章已经说过,BGP 的路由判定是基于前缀的收取和前缀的广播。为避免错误的路由,你需要使用一些过滤机制来控制这些前缀的收发。举个例子,如果你的一个 BGP 邻居开始广播一个本不属于它们的前缀,而你也将错就错地接收了这些不正常前缀,并且也将它转发到网络上,这个转发过程会不断进行下去,永不停止(所谓的“黑洞”就这样产生了)。所以确保这样的前缀不会被收到,或者不会转发到任何网络,要达到这个目的,你可以使用前缀列表和路由映射。前者是基于前缀的过滤机制,后者是更为常用的基于前缀的策略,可用于精调过滤机制。 + +本文会向你展示如何在 Quagga 中使用前缀列表和路由映射。 + +### 拓扑和需求 ### + +本教程使用下面的拓扑结构。 + +![](https://farm8.staticflickr.com/7394/16407625405_4f7d24d1f6_c.jpg) + +服务供应商A和供应商B已经将对方设置成为 eBGP 对等体,实现互相通信。他们的自治系统号和前缀分别如下所示。 + +- **对等区段**: 192.168.1.0/24 +- **服务供应商A**: 自治系统号 100, 前缀 10.10.0.0/16 +- **服务供应商B**: 自治系统号 200, 前缀 10.20.0.0/16 + +在这个场景中,供应商B只想从A接收 10.10.10.0/23, 10.10.10.0/24 和 10.10.11.0/24 三个前缀。 + +### 安装 Quagga 和设置 BGP 对等体 ### + +在[之前的教程][1]中,我们已经写了安装 Quagga 和设置 BGP 对等体的方法,所以这里就不再详细说明了,只简单介绍下 BGP 配置和前缀广播: + +![](https://farm8.staticflickr.com/7428/16219986668_97cb193b15_c.jpg) + +上图说明 BGP 对等体已经开启。Router-A 在向 router-B 广播多个前缀,而 Router-B 也在向 router-A 广播一个前缀 10.20.0.0/16。两个路由器都能正确无误地收发前缀。 + +### 创建前缀列表 ### + +路由器可以使用 ACL 或前缀列表来过滤一个前缀。前缀列表比 ACL 更常用,因为前者处理步骤少,而且易于创建和维护。 + + ip prefix-list DEMO-PRFX permit 192.168.0.0/23 + +上面的命令创建了名为“DEMO-FRFX”的前缀列表,只允许存在 192.168.0.0/23 这个前缀。 + +前缀列表的另一个牛X功能是支持子网掩码区间,请看下面的例子: + + ip prefix-list DEMO-PRFX permit 192.168.0.0/23 le 24 + +这个命令创建的前缀列表包含在 192.168.0.0/23 和 /24 之间的前缀,分别是 192.168.0.0/23, 192.168.0.0/24 and 192.168.1.0/24。运算符“le”表示小于等于,你也可以使用“ge”表示大于等于。 + +一个前缀列表语句可以有多个允许或拒绝操作。每个语句都自动或手动地分配有一个序列号。 + +如果存在多个前缀列表语句,则这些语句会按序列号顺序被依次执行。在配置前缀列表的时候,我们需要注意在所有前缀列表语句后面的**隐性拒绝**属性,就是说凡是不被明显允许的,都会被拒绝。 + +如果要设置成允许所有前缀,前缀列表语句设置如下: + + ip prefix-list DEMO-PRFX permit 0.0.0.0/0 le 32 + +我们已经知道如何创建前缀列表语句了,现在我们要创建一个名为“PRFX-LST”的前缀列表,来满足我们实验场景的需求。 + + router-b# conf t + router-b(config)# ip prefix-list PRFX-LST permit 10.10.10.0/23 le 24 + +### 创建路由映射 ### + +除了前缀列表和 ACL,这里还有另一种机制,叫做路由映射,也可以在 BGP 路由器中控制前缀。事实上,路由映射针对前缀匹配的微调效果比前缀列表和 ACL 都强。 + +与前缀列表类似,路由映射语句也可以指定允许和拒绝操作,也需要分配一个序列号。每个路由匹配可以有多个允许或拒绝操作。例如: + + route-map DEMO-RMAP permit 10 + +上面的语句创建了名为“DEMO-RMAP”的路由映射,添加序列号为10的允许操作。现在我们在这个序列号所对应的路由映射下使用 match 命令进行匹配。 + + router-a(config-route-map)# match (press ? in the keyboard) + +---------- + + as-path Match BGP AS path list + community Match BGP community list + extcommunity Match BGP/VPN extended community list + interface match first hop interface of route + ip IP information + ipv6 IPv6 information + metric Match metric of route + origin BGP origin code + peer Match peer address + probability Match portion of routes defined by percentage value + tag Match tag of route + +如你所见,路由映射可以匹配很多属性,本教程需要匹配一个前缀。 + + route-map DEMO-RMAP permit 10 + match ip address prefix-list DEMO-PRFX + +这个 match 命令会匹配之前建好的前缀列表中允许的 IP 地址(也就是前缀 192.168.0.0/23, 192.168.0.0/24 和 192.168.1.0/24)。 + +接下来,我们可以使用 set 命令来修改这些属性。例子如下: + + route-map DEMO-RMAP permit 10 + match ip address prefix-list DEMO-PRFX + set (press ? in keyboard) + +---------- + + aggregator BGP aggregator attribute + as-path Transform BGP AS-path attribute + atomic-aggregate BGP atomic aggregate attribute + comm-list set BGP community list (for deletion) + community BGP community attribute + extcommunity BGP extended community attribute + forwarding-address Forwarding Address + ip IP information + ipv6 IPv6 information + local-preference BGP local preference path attribute + metric Metric value for destination routing protocol + metric-type Type of metric + origin BGP origin code + originator-id BGP originator ID attribute + src src address for route + tag Tag value for routing protocol + vpnv4 VPNv4 information + weight BGP weight for routing table + +如你所见,set 命令也可以修改很多属性。为了作个示范,我们修改一下 BGP 的 local-preference 这个属性。 + + route-map DEMO-RMAP permit 10 + match ip address prefix-list DEMO-PRFX + set local-preference 500 + +如同前缀列表,路由映射语句的末尾也有隐性拒绝操作。所以我们需要添加另外一个允许语句(使用序列号20)来允许所有前缀。 + + route-map DEMO-RMAP permit 10 + match ip address prefix-list DEMO-PRFX + set local-preference 500 + ! + route-map DEMO-RMAP permit 20 + +序列号20未指定任何匹配命令,所以默认匹配所有前缀。在这个路由映射语句中,所有的前缀都被允许。 + +回想一下,我们的需求是只允许或只拒绝一些前缀,所以上面的 set 命令不应该存在于这个场景中。我们只需要一个允许语句,如下如示: + + router-b# conf t + router-b(config)# route-map RMAP permit 10 + router-b(config-route-map)# match ip address prefix-list PRFX-LST + +这个路由映射才是我们需要的效果。 + +### 应用路由映射 ### + +注意,在被应用于一个接口或一个 BGP 邻居之前,ACL、前缀列表和路由映射都不会生效。与 ACL 和前缀列表一样,一条路由映射语句也能被多个接口或邻居使用。然而,一个接口或一个邻居只能有一条路由映射语句应用于输入端,以及一条路由映射语句应用于输出端。 + +下面我们将这条路由映射语句应用于 router-B 的 BGP 配置,为 router-B 的邻居 192.168.1.1 设置输入前缀广播。 + + router-b# conf terminal + router-b(config)# router bgp 200 + router-b(config-router)# neighbor 192.168.1.1 route-map RMAP in + +现在检查下广播路由和收取路由。 + +显示广播路由的命令: + + show ip bgp neighbor-IP advertised-routes + +显示收取路由的命令: + + show ip bgp neighbor-IP routes + +![](https://farm8.staticflickr.com/7424/16221405429_4d86119548_c.jpg) + +可以看到,router-A 有4条路由前缀到达 router-B,而 router-B 只接收3条。查看一下范围,我们就能知道只有被路由映射允许的前缀才能在 router-B 上显示出来,其他的前缀一概丢弃。 + +**小提示**:如果接收前缀内容没有刷新,试试重置下 BGP 会话,使用这个命令:clear ip bgp neighbor-IP。本教程中命令如下: + + clear ip bgp 192.168.1.1 + +我们能看到系统已经满足我们的要求了。接下来我们可以在 router-A 和 router-B 上创建相似的前缀列表和路由映射语句来更好地控制输入输出的前缀。 + +这里把配置过程总结一下,方便查看。 + + router bgp 200 + network 10.20.0.0/16 + neighbor 192.168.1.1 remote-as 100 + neighbor 192.168.1.1 route-map RMAP in + ! + ip prefix-list PRFX-LST seq 5 permit 10.10.10.0/23 le 24 + ! + route-map RMAP permit 10 + match ip address prefix-list PRFX-LST + +### 总结 ### + +在本教程中我们演示了如何在 Quagga 中设置前缀列表和路由映射来过滤 BGP 路由。我们也展示了如何将前缀列表结合进路由映射来进行输入前缀的微调功能。你可以参考这些方法来设置满足自己需求的前缀列表和路由映射。这些工具是保护网络免受路由毒化和来自 bogon 路由(LCTT 译注:指不该出现在internet路由表中的地址)的广播。 + +希望本文对你有帮助。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html + +作者:[Sarmed Rahman][a] +译者:[bazz2](https://github.com/bazz2) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/sarmed +[1]:http://xmodulo.com/centos-bgp-router-quagga.html From 1176dd91ba9d5a1bff21f112b85c1a3e72c736d4 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 10 Oct 2015 10:00:50 +0800 Subject: [PATCH 2220/2517] PUB:20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop @MikeCoder --- ...e--Minimal Icon Theme For Linux Desktop.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {translated/share => published}/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md (62%) diff --git a/translated/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md b/published/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md similarity index 62% rename from translated/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md rename to published/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md index 5bd7655a9e..0049dd5a6e 100644 --- a/translated/share/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md +++ b/published/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md @@ -1,12 +1,12 @@ -Xenlism WildFire: 一个精美的 Linux 桌面版主题 +Xenlism WildFire: Linux 桌面的极简风格图标主题 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icon-theme-linux-3.png) -有那么一段时间,我一直使用一个主题,没有更换过。可能是在最近的一段时间都没有一款主题能满足我的需求。有那么一些我认为是[Ubuntu 上最好的图标主题][1],比如 Numix 和 Moka,并且,我一直也对 Numix 比较满意。 +有那么一段时间我没更换主题了,可能最近的一段时间没有一款主题能让我眼前一亮了。我考虑过更换 [Ubuntu 上最好的图标主题][1],但是它们和 Numix 和 Moka 差不多,而且我觉得 Numix 也不错。 -但是,一段时间后,我使用了[Xenslim WildFire][2],并且我必须承认,他看起来太好了。Minimail 是当前比较流行的设计趋势。并且 Xenlism 完美的表现了它。平滑和美观。Xenlism 收到了诺基亚的 Meego 和苹果图标的影响。 +但是前几天我试了试 [Xenslim WildFire][2],我必须承认,它看起来太棒了。极简风格是设计界当前的流行趋势,而 Xenlism 完美的表现了这种风格。平滑而美观,Xenlism 显然受到了诺基亚的 Meego 和苹果图标的影响。 -让我们来看一下他的几个不同应用的图标: +让我们来看一下它的几个不同应用的图标: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons.png) @@ -14,15 +14,15 @@ Xenlism WildFire: 一个精美的 Linux 桌面版主题 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons-1.png) -主题开发者,[Nattapong Pullkhow][3], 说,这个图标主题最适合 GNOME,但是在 Unity 和 KDE,Mate 上也表现良好。 +主题开发者 [Nattapong Pullkhow][3] 说,这个图标主题最适合 GNOME,但是在 Unity 和 KDE,Mate 上也表现良好。 ### 安装 Xenlism Wildfire ### -Xenlism Theme 大约有 230 MB, 对于一个主题来说确实很大,但是考虑到它支持的庞大的软件数量,这个大小,确实也不是那么令人吃惊。 +Xenlism Theme 大约有 230 MB, 对于一个主题来说确实很大,但是考虑到它所支持的庞大的软件数量,这个大小,确实也不是那么令人吃惊。 #### 在 Ubuntu/Debian 上安装 Xenlism #### -在 Ubuntu 的变种中安装前,用以下的命令添加 GPG 秘钥: +在 Ubuntu 系列中安装之前,用以下的命令添加 GPG 秘钥: sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 90127F5B @@ -42,7 +42,7 @@ Xenlism Theme 大约有 230 MB, 对于一个主题来说确实很大,但是考 sudo nano /etc/pacman.conf - 添加如下的代码块,在配置文件中: +添加如下的代码块,在配置文件中: [xenlism-arch] SigLevel = Never @@ -55,17 +55,17 @@ Xenlism Theme 大约有 230 MB, 对于一个主题来说确实很大,但是考 #### 使用 Xenlism 主题 #### -在 Ubuntu Unity, [可以使用 Unity Tweak Tool 来改变主题][4]. In GNOME, [使用 Gnome Tweak Tool 改变主题][5]. 我确信你会接下来的步骤,如果你不会,请来信通知我,我会继续完善这篇文章。 +在 Ubuntu Unity, [可以使用 Unity Tweak Tool 来改变主题][4]。 在 GNOME 中,[使用 Gnome Tweak Tool 改变主题][5]。 我确信你会接下来的步骤,如果你不会,请来信通知我,我会继续完善这篇文章。 这就是 Xenlism 在 Ubuntu 15.04 Unity 中的截图。同时也使用了 Xenlism 桌面背景。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Xenlism-icons-2.png) -这看来真棒,不是吗?如果你试用了,并且喜欢他,你可以感谢他的开发者: +这看来真棒,不是吗?如果你试用了,并且喜欢它,你可以感谢它的开发者: -> [Xenlism is a stunning minimal icon theme for Linux. Thanks @xenatt for this beautiful theme.][6] +> [Xenlism 是一个用于 Linux 的、令人兴奋的极简风格的图标主题,感谢 @xenatt 做出这么漂亮的主题。][6] -我希望你喜欢他。同时也希望你分享你对这个主题的看法,或者你喜欢的主题。Xenlism 真的很棒,可能会替换掉你最喜欢的主题。 +我希望你喜欢它。同时也希望你分享你对这个主题的看法,或者你喜欢的主题。Xenlism 真的很棒,可能会替换掉你最喜欢的主题。 -------------------------------------------------------------------------------- @@ -73,7 +73,7 @@ via: http://itsfoss.com/xenlism-wildfire-theme/ 作者:[Abhishek][a] 译者:[MikeCoder](https://github.com/MikeCoder) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8e153dbcf9d46db2c8af5c05b96e34a167ec924f Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 10 Oct 2015 10:20:05 +0800 Subject: [PATCH 2221/2517] =?UTF-8?q?=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Yuking-net --- ...Debian dropping the Linux Standard Base.md | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 sources/news/20150930 Debian dropping the Linux Standard Base.md diff --git a/sources/news/20150930 Debian dropping the Linux Standard Base.md b/sources/news/20150930 Debian dropping the Linux Standard Base.md new file mode 100644 index 0000000000..dc3e3adcce --- /dev/null +++ b/sources/news/20150930 Debian dropping the Linux Standard Base.md @@ -0,0 +1,66 @@ +Debian dropping the Linux Standard Base +======================================= + +The Linux Standard Base (LSB) is a [specification][1] that purports to define the services and application-level ABIs that a Linux distribution will provide for use by third-party programs. But some in the Debian project are questioning the value of maintaining LSB compliance—it has become, they say, a considerable amount of +work for little measurable benefit. + +The LSB was first released in 2001, and was modeled to a degree on the [POSIX][2] and [Single UNIX Specification][3] standards. Today, the LSB is maintained by a [working group][4] at the Linux Foundation. The most recent release was [LSB 5.0][5] in June 2015. It defines five LSB modules (Core, Desktop, Languages, Imaging, and Trial Use). + +The bulk of each module consists of a list of required libraries and the mandatory version for each, plus a description of the public functions and data definitions for each library. Other contents of the modules include naming and organizational specifications, such as the filesystem layout in the [Filesystem Hierarchy Standard (FHS)][6] or directory specifications like the Freedesktop [XDG Base Directory][7] specification. + +In what appears to be sheer coincidence, during the same week that LSB 5.0 was released, a discussion arose within the Debian project as to whether or not maintaining LSB compliance was a worthwhile pursuit for Debian. After LSB compliance was mentioned in passing in another thread, Didier Raboud took the opportunity to [propose][8] scaling back Debian's compliance efforts to the bare minimum. As it stands today, he said, Debian's `lsb-*` meta-packages attempt to require the correct versions of the libraries mentioned in the standard, but no one is actually checking that all of the symbols and data definitions are met as aresult. + +Furthermore, the LSB continues to grow; the 4.1 release (the most recent when Debian "jessie" was released) consisted of "*1493 components, 1672 libs, 38491 commands, 30176 classes and 716202 interfaces*," he said. No one seems interested in checking those details in the Debian packages, he noted, adding that "*I've held an LSB BoF last year at DebConf, and discussed src:lsb with various people back then, and what I took back was 'roughly no one cares'.*" Just as importantly, though, the lack of interest does not seem to be limited to Debian: + + The crux of the issue is, I think, whether this whole game is worth the work: I am yet to hear about software distribution happening through LSB packages. There are only _8_ applications by 6 companies on the LSB certified applications list, of which only one is against LSB >= 4. + +Raboud proposed that Debian drop everything except for the [lsb-base][9] package (which currently includes a small set of shell functions for use by the init system) and the [lsb-release][10] package (which provides a simple tool that users can use to query the identity of the distribution and what level of LSB compliance it advertises). + +In a follow-up [message][11],he noted that changing the LSB to be, essentially, "*whatever Debian as well as all other actors in the FLOSS world are _actually_ doing*" might make the standard—and the effort to support it in Debian—more valuable. But here again, he questioned whether anyone was interested in pursuing that objective. + +If his initial comments about lack of interest in LSB were not evidence enough, a full three months then went by with no one offering any support for maintaining the LSB-compliance packages and two terse votes in favor of dropping them. Consequently, on September 17, Raboud [announced][12] that he had gutted the `src:lsb` package (leaving just `lsb-base` and `lsb-release` as described) and uploaded it to the "unstable" archive. That minimalist set of tools will allow an interested user to start up the next Debian release and query whether or not it is LSB-compliant—and the answer will be "no." + +Raboud added that Debian does still plan to maintain FHS compliance, even though it is dropping LSB compliance: + + But Debian's not throwing all of the LSB overboard: we're still firmly standing behind the FHS (version 2.3 through Debian Policy; although 3.0 was released in August this year) and our SysV init scripts mostly conform to LSB VIII.22.{2-8}. But don't get me wrong, this src:lsb upload is an explicit move away from the LSB. + +After the announcement, Nikolaus Rath [replied][13] that some proprietary applications expect `ld-lsb.so*` symbolic links to be present in `/lib` and `/lib64`, and that those symbolic links had been provided by the `lsb-*` package set. Raboud [suggested][14] that the links should be provided by the `libc6` package instead; package maintainer Aurelien Jarno [said][15] he would accept such a patch if it was provided. + +The only remaining wrinkle, it seems, is that there are some printer-driver packages that expect some measure of LSB compliance. Raboud had noted in his first message that [OpenPrinting][16] drivers were the only example of LSB-compliant packages he had seen actually distributed. Michael Biebl [noted][17] that there was one such driver package in the main archive; Raboud [replied][18] that he believed the package in question ought to be moved to the non-free repository anyway, since it contained a binary driver. + +With that, the issue appears to be settled, at least for the current Debian development cycle. What will be more interesting, naturally, will be to see what effect, if any, the decision has on broader LSB acceptance. As Raboud alluded to, the number of distributions that are certified as LSB-compliant is [small][19]. It is hard not to notice that those distributions are largely of the "enterprise" variety. + +Perhaps, then, LSB compliance is still important to some business sectors, but it is hard to know how many customers of those enterprise distributions genuinely care about the LSB certification stamp. If Debian's experience is anything to go by, however, general interest in such certification may be in steep decline. + +--- + +via:https://lwn.net/Articles/658809/ + +作者:Nathan Willis +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译, +[Linux中国](https://linux.cn/) 荣誉推出 + + +[1]:http://refspecs.linuxfoundation.org/lsb.shtml +[2]:https://en.wikipedia.org/wiki/POSIX +[3]:https://en.wikipedia.org/wiki/Single_UNIX_Specification +[4]:http://www.linuxfoundation.org/collaborate/workgroups/lsb +[5]:http://www.linuxfoundation.org/collaborate/workgroups/lsb/lsb-50 +[6]:http://www.linuxfoundation.org/collaborate/workgroups/lsb/fhs +[7]:http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html +[8]:https://lwn.net/Articles/658838/ +[9]:https://packages.debian.org/sid/lsb-base +[10]:https://packages.debian.org/sid/lsb-release +[11]:https://lwn.net/Articles/658842/ +[12]:/Articles/658843/ +[13]:/Articles/658846/ +[14]:/Articles/658847/ +[15]:/Articles/658848/ +[16]:http://www.linuxfoundation.org/collaborate/workgroups/openprinting/ +[17]:/Articles/658844/ +[18]:/Articles/658845/ + + From 4ef5ad00d95d66767c9693f9e5b6205f4e8622a9 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sat, 10 Oct 2015 12:34:21 +0800 Subject: [PATCH 2222/2517] Delete 20151005 pyinfo() A good looking phpinfo-like python script.md --- ...good looking phpinfo-like python script.md | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md diff --git a/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md b/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md deleted file mode 100644 index f096bc5fc6..0000000000 --- a/sources/tech/20151005 pyinfo() A good looking phpinfo-like python script.md +++ /dev/null @@ -1,40 +0,0 @@ -translation by strugglingyouth -pyinfo() A good looking phpinfo-like python script -================================================================================ -Being a native php guy, I'm used to having phpinfo(), giving me easy access to php.ini settings and loaded modules etc. So ofcourse I wanted to call the not existing pyinfo() function, to no avail. My fingers quickly pressed CTRL-E to google for a implementation of it, someone must've ported it already? - -Yes, someone did. But oh my was it ugly. Preposterous! Since I cannot stand ugly layouts *cough*, I just had to build my own. So I used the code I found and cleaned up the layout to make it better. The official python website isnt that bad layout-wise, so why not steal their colors and background images? Yes that sounds like a plan to me. - -[Gits Here][1] | [Download here][2] | [Example here][3] - -Mind you, I only ran it on a python 2.6.4 server, so anything else is at your own risk (but it should be no problem to port it to any other version). To get it working, just import the file and call pyinfo() while catching the function's return value. Print that on the screen. Huzzah! - -For those who did not get that and are using [mod_wsgi][4], run it using something like this (replace that path ofcourse): -``` -def application(environ, start_response): - import sys - path = 'YOUR_WWW_ROOT_DIRECTORY' - if path not in sys.path: - sys.path.append(path) - from pyinfo import pyinfo - output = pyinfo() - start_response('200 OK', [('Content-type', 'text/html')]) - return [output] -``` ---- - -via:http://bran.name/articles/pyinfo-a-good-looking-phpinfo-like-python-script/ - -作者:[Bran van der Meer][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译, -[Linux中国](https://linux.cn/) 荣誉推出 - - -[a]:http://bran.name/resume/ -[1]:https://gist.github.com/951825#file_pyinfo.py -[2]:http://bran.name/dump/pyinfo.zip -[3]:http://bran.name/dump/pyinfo/index.py -[4]:http://code.google.com/p/modwsgi/ From dbc374103072a2b9c241e921343dd86264ad595e Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sat, 10 Oct 2015 12:37:32 +0800 Subject: [PATCH 2223/2517] Create 20151005 pyinfo() A good looking phpinfo-like python script.md --- ...good looking phpinfo-like python script.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 translated/tech/20151005 pyinfo() A good looking phpinfo-like python script.md diff --git a/translated/tech/20151005 pyinfo() A good looking phpinfo-like python script.md b/translated/tech/20151005 pyinfo() A good looking phpinfo-like python script.md new file mode 100644 index 0000000000..6d7e71396d --- /dev/null +++ b/translated/tech/20151005 pyinfo() A good looking phpinfo-like python script.md @@ -0,0 +1,40 @@ +pyinfo()一个像 phpinfo 一样的 Python 脚本 +================================================================================ +作为一个热衷于 php 的家伙,我已经习惯了使用 phpinfo() 函数来让我轻松访问 php.ini 里的配置和加载的模块等。当然我也想要使用一个不存在的 pyinfo() 函数,但没有成功。在 google 中按下 CTRL-E 快速查找是否有人实现了它? + +是的,有人已经实现了。但是,对我来说它非常难看。荒谬!因为我无法忍受丑陋的布局 *咳嗽*,我不得不亲自动手来做。所以我用找到的代码,并重新进行布局使之更好看点。Python 官方网站的布局看起来不错,那么何不盗取他们的颜色和背景图片呢?是的,这听起来像一个计划。 + +[Gits Here][1] | [Download here][2] | [Example here][3] + +提醒你下,我仅仅在 Python 2.6.4 上运行过它,所以在别的版本上可能有风险(将它移植到任何其他版本它应该是没有问题的)。为了能使它工作,只需要导入 pyinfo() 文件,并将函数的返回值打印到屏幕上。好嘞! + +如果你没有得到正确的返回结果,你需要使用 [mod_wsgi][4],然后这样运行它(当然得替换路径): + +``` +def application(environ, start_response): + import sys + path = 'YOUR_WWW_ROOT_DIRECTORY' + if path not in sys.path: + sys.path.append(path) + from pyinfo import pyinfo + output = pyinfo() + start_response('200 OK', [('Content-type', 'text/html')]) + return [output] +``` +--- + +via:http://bran.name/articles/pyinfo-a-good-looking-phpinfo-like-python-script/ + +作者:[Bran van der Meer][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译, +[Linux中国](https://linux.cn/) 荣誉推出 + + +[a]:http://bran.name/resume/ +[1]:https://gist.github.com/951825#file_pyinfo.py +[2]:http://bran.name/dump/pyinfo.zip +[3]:http://bran.name/dump/pyinfo/index.py +[4]:http://code.google.com/p/modwsgi/ From 55d860348b6c4bd7b55ef83675482203d49a515a Mon Sep 17 00:00:00 2001 From: alim0x Date: Sat, 10 Oct 2015 16:46:53 +0800 Subject: [PATCH 2224/2517] [translated]20151007 Open Source Media Player MPlayer 1.2 Released --- ...ource Media Player MPlayer 1.2 Released.md | 64 ------------------- ...ource Media Player MPlayer 1.2 Released.md | 62 ++++++++++++++++++ 2 files changed, 62 insertions(+), 64 deletions(-) delete mode 100644 sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md create mode 100644 translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md diff --git a/sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md b/sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md deleted file mode 100644 index 52a6887786..0000000000 --- a/sources/share/20151007 Open Source Media Player MPlayer 1.2 Released.md +++ /dev/null @@ -1,64 +0,0 @@ -alim0x translating - -Open Source Media Player MPlayer 1.2 Released -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/MPlayer-1.2.jpg) - -Almost three years after [MPlaayer][1] 1.1, the new version of MPlayer has been released last week. MPlayer 1.2 brings up support for many new codecs in this release. - -MPlayer is a cross-platform, open source media player. Its name is an abbreviation of “Movie Player”. MPlayer has been one of the oldest video players for Linux and during last 15 years, it has inspired a number of other media players. Some of the famous media players based on MPlayer are: - -- [MPV][2] -- SMPlayer -- KPlayer -- GNOME MPlayer -- Deepin Player - -#### What’s new in MPlayer 1.2? #### - -- Compatibility with FFmpeg 2.8 -- VDPAU hardware acceleration for H.265/HEVC -- A number of new codecs supported via FFmpeg -- Improvements in TV and DVB support -- GUI improvements -- external dependency on libdvdcss/libdvdnav packages - -#### Install MPlayer 1.2 in Linux #### - -Most Linux distributions are still having MPlayer 1.1. If you want to use the new MPlayer 1.2, you’ll have to compile it from the source code which could be tricky at times for beginners. - -I have used Ubuntu 15.04 for the installation of MPlayer 1.2. Installation instructions will remain the same for all Linux distributions except the part where you need to install yasm. - -Open a terminal and use the following commands: - - wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.2.tar.xz - - tar xvf MPlayer-1.1.1.tar.xz - - cd MPlayer-1.2 - - sudo apt-get install yasm - - ./configure - -When you run make, it will throw a number of things on the terminal screen and takes some time to build it. Have patience. - - make - - sudo make install - -If you feel uncomfortable using the source code, I advise you to either wait forMPlayer 1.2 to land in the repositories of your Linux distribution or use an alternate like MPV. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/mplayer-1-2-released/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:https://www.mplayerhq.hu/ -[2]:http://mpv.io/ diff --git a/translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md b/translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md new file mode 100644 index 0000000000..fa2584bc0c --- /dev/null +++ b/translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md @@ -0,0 +1,62 @@ +开源媒体播放器 MPlayer 1.2 发布 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/MPlayer-1.2.jpg) + +在 [MPlaayer][1] 1.1 发布将近3年后,新版 MPlayer 终于在上周发布了。在新版本 MPlayer 1.2 中带来了对许多新编码的解码支持。 + +MPlayer 是一款跨平台的开源媒体播放器。它的名字是“Movie Player”的缩写。MPlayer 已经成为 Linux 上最老牌的媒体播放器之一,在过去的15年里,它还启发了许多其他媒体播放器。著名的基于 MPlayer 的媒体播放器有: + +- [MPV][2] +- SMPlayer +- KPlayer +- GNOME MPlayer +- Deepin Player(深度影音) + +#### MPlayer 1.2 更新了些什么? #### + +- 兼容 FFmpeg 2.8 +- 对 H.265/HEVC 的 VDPAU 硬件加速 +- 通过 FFmpeg 支持一些新的编码解码 +- 改善电视与数字视频广播支持 +- 界面优化 +- libdvdcss/libdvdnav 包外部依赖 + +#### 在 Linux 安装 MPlayer 1.2 #### + +大多数 Linux 发行版仓库中还是 MPlayer 1.1 版本。如果你想使用新的 MPlayer 1.2 版本,你需要从源码手动编译,这对新手来说可能有点棘手。 + +我是在 Ubuntu 15.04 上安装的 MPlayer 1.2。除了需要安装 yasm 的地方以外,对所有 Linux 发行版来说安装说明都是一样的。 + +打开一个终端,运行下列命令: + + wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.2.tar.xz + + tar xvf MPlayer-1.1.1.tar.xz + + cd MPlayer-1.2 + + sudo apt-get install yasm + + ./configure + +在你运行 make 的时候,在你的终端屏幕上会显示一些东西,并且你需要一些时间来编译它。保持耐心。 + + make + + sudo make install + +如果你觉得从源码编译不大习惯的话,我建议你等待 MPlayer 1.2 提交到你的 Linux 发行版仓库中,或者用其它的播放器替代,比如 MPV。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/mplayer-1-2-released/ + +作者:[Abhishek][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:https://www.mplayerhq.hu/ +[2]:http://mpv.io/ From 05e21d97122dd0190a227239ef604a57d6df84aa Mon Sep 17 00:00:00 2001 From: alim0x Date: Sat, 10 Oct 2015 16:50:48 +0800 Subject: [PATCH 2225/2517] =?UTF-8?q?=E7=BA=A0=E6=AD=A3=E6=8B=BC=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20151007 Open Source Media Player MPlayer 1.2 Released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md b/translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md index fa2584bc0c..622adebd61 100644 --- a/translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md +++ b/translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md @@ -2,7 +2,7 @@ ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/MPlayer-1.2.jpg) -在 [MPlaayer][1] 1.1 发布将近3年后,新版 MPlayer 终于在上周发布了。在新版本 MPlayer 1.2 中带来了对许多新编码的解码支持。 +在 [MPlayer][1] 1.1 发布将近3年后,新版 MPlayer 终于在上周发布了。在新版本 MPlayer 1.2 中带来了对许多新编码的解码支持。 MPlayer 是一款跨平台的开源媒体播放器。它的名字是“Movie Player”的缩写。MPlayer 已经成为 Linux 上最老牌的媒体播放器之一,在过去的15年里,它还启发了许多其他媒体播放器。著名的基于 MPlayer 的媒体播放器有: From dffe69612546fc03a056ab679c9ab886bb1bc6ee Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 10 Oct 2015 22:47:34 +0800 Subject: [PATCH 2226/2517] translating --- ...0151007 Fix Shell Script Opens In Text Editor In Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md b/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md index 95f7bb4ee5..147f082f4c 100644 --- a/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md +++ b/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md @@ -1,3 +1,5 @@ +translating---geekpi + Fix Shell Script Opens In Text Editor In Ubuntu ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Run-Shell-Script-on-Double-Click.jpg) @@ -36,4 +38,4 @@ via: http://itsfoss.com/shell-script-opens-text-editor/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://itsfoss.com/author/abhishek/ \ No newline at end of file +[a]:http://itsfoss.com/author/abhishek/ From 26bee9751b358b87e9310609019c8a3e284af017 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 10 Oct 2015 23:23:55 +0800 Subject: [PATCH 2227/2517] Translating sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md --- .../20151007 How To Download Videos Using youtube-dl In Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md b/sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md index fa7dcbed6c..f72bde05de 100644 --- a/sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md +++ b/sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md @@ -1,3 +1,4 @@ +ictlyh Translating How To Download Videos Using youtube-dl In Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Download-YouTube-Videos.jpeg) From 97b4b470294147884cba9c91c06684397558fac6 Mon Sep 17 00:00:00 2001 From: Yuking-net Date: Sun, 11 Oct 2015 00:37:55 +0800 Subject: [PATCH 2228/2517] Update 20150930 Debian dropping the Linux Standard Base.md --- .../news/20150930 Debian dropping the Linux Standard Base.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20150930 Debian dropping the Linux Standard Base.md b/sources/news/20150930 Debian dropping the Linux Standard Base.md index dc3e3adcce..22a5a79a44 100644 --- a/sources/news/20150930 Debian dropping the Linux Standard Base.md +++ b/sources/news/20150930 Debian dropping the Linux Standard Base.md @@ -37,7 +37,7 @@ Perhaps, then, LSB compliance is still important to some business sectors, but i via:https://lwn.net/Articles/658809/ 作者:Nathan Willis -译者:[译者ID](https://github.com/译者ID) +译者:[Yuking](https://github.com/Yuking-net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译, From 9b10df39584038ca4dcb9812dee54725a1506b66 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 11 Oct 2015 08:58:39 +0800 Subject: [PATCH 2229/2517] translated --- ...l Script Opens In Text Editor In Ubuntu.md | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md b/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md index 147f082f4c..f1d9f7253f 100644 --- a/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md +++ b/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md @@ -1,39 +1,37 @@ -translating---geekpi - -Fix Shell Script Opens In Text Editor In Ubuntu +修复Sheell脚本在Ubuntu中用文本编辑器打开的方式 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Run-Shell-Script-on-Double-Click.jpg) -When you double click on a shell script (.sh file) what do you expect? The normal expectation would be that it is executed. But this might not be the case in Ubuntu, or I should better say in case of Files (Nautilus). You may go crazy yelling “Run, File, Run”, but the file won’t run and instead it gets opened in Gedit. +当你双击一个脚本(.sh文件)的时候,你想要做的是什么?通常的想法是执行它。但是在Ubuntu下面却不是这样,或者我应该更确切地说是在Files(Nautilus)中。你可能会疯狂地大叫“运行文件,运行文件”,但是文件没有运行而是用Gedit打开了。 -I know that you would say, does the file has execute permission? And I say, yes. The shell script has execute permission but still if I double click on it, it is opened in a text editor. I don’t want it and if you are facing the same issue, I assume that even you don’t want it. +我知道你也许会说文件有可执行权限么?我会说是的。脚本有可执行权限但是当我双击它的时候,它还是用文本编辑器打开了。我不希望这样如果你遇到了同样的问题,我想你也许也不需要这样。 -I know that you would have been advised to run it in the terminal and I know that it would work but that’s not an excuse for the GUI way to not work. Is it? +我知道你或许已经被建议在终端下面运行,我知道这个可行但是这不是一个在GUI下不能运行的借口是么? -In this quick tutorial, we shall see **how to make shell script run by double clicking on it**. +这篇教程中,我们会看到**如何在双击后运行shell脚本。** -#### Fix Shell script opens in text editor in Ubuntu #### +#### 修复在Ubuntu中shell脚本用文本编辑器打开的方式 #### -The reason why shell scripts are opening in text editor is the default behavior set in Files (file manager in Ubuntu). In earlier versions, it would ask you if you want to run the file or open for editing. The default behavior has been changed in later versions. +shell脚本用文件编辑器打开的原因是Files(Ubuntu中的文件管理器)中的默认行为设置。在更早的版本中,它或许会询问你是否运行文件或者用编辑器打开。默认的行位在新的版本中被修改了。 -To fix it, go in file manager and from the top menu and click on **Preference**: +要修复这个,进入文件管理器,并在菜单中点击**选项**: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/execute-shell-program-ubuntu-1.png) -Next in **Files preferences**, go to **Behavior** tab and you’ll see the option of “**Executables Text Files**“. +接下来在**文件选项**中进入**行为**标签中,你会看到**文本文件执行**选项。 -By default, it would have been set to “View executable text files when they are opened”. I would advise you to change it to “Ask each time” so that you’ll have the choice whether to execute it or edit but of course you can set it by default for execution. Your choice here really. +默认情况下,它被设置成“在打开是显示文本文件”。我建议你把它改成“每次询问”,这样你可以选择是执行还是编辑了,当然了你也可以选择默认执行。你可以自行选择。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/execute-shell-program-ubuntu-2.png) -I hope this quick tip helped you to fix this little ‘issue’. Questions and suggestions are always welcomed. +我希望这个贴士可以帮你修复这个小“问题”。欢迎提出问题和建议。 -------------------------------------------------------------------------------- via: http://itsfoss.com/shell-script-opens-text-editor/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 742bf1845becf48abe80a6de791e2b31e50bfe21 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 11 Oct 2015 08:59:29 +0800 Subject: [PATCH 2230/2517] Rename sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md to translated/tech/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md --- .../20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md => translated/tech/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md (100%) diff --git a/sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md b/translated/tech/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md similarity index 100% rename from sources/tech/20151007 Fix Shell Script Opens In Text Editor In Ubuntu.md rename to translated/tech/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md From f2d9efbae401c19b1c3efc7cabfce14882592696 Mon Sep 17 00:00:00 2001 From: alim0x Date: Sun, 11 Oct 2015 10:53:19 +0800 Subject: [PATCH 2231/2517] [translating]20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools --- ...re Info Using screenfetch and linux_logo Tools.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md b/sources/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md index 6640454f07..92b47aab50 100644 --- a/sources/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md +++ b/sources/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md @@ -1,3 +1,5 @@ +alim0x translating + Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools ================================================================================ Do you want to display a super cool logo of your Linux distribution along with basic hardware information? Look no further try awesome screenfetch and linux_logo utilities. @@ -80,7 +82,7 @@ To take a screenshot and to save a file, enter: You will see a screenshot file at ~/Desktop/screenFetch-*.jpg. To take a screenshot and upload to imgur directly, enter: - $ screenfetch -su imgur + $ screenfetch -su imgur **Sample outputs:** @@ -100,7 +102,7 @@ You will see a screenshot file at ~/Desktop/screenFetch-*.jpg. To take a screens `ossssssssssssssssssssss/ RAM: 6405MB / 8192MB :ooooooooooooooooooo+. `:+oo+/:-..-:/+o+/- - + Taking shot in 3.. 2.. 1.. 0. ==> Uploading your screenshot now...your screenshot can be viewed at http://imgur.com/HKIUznn @@ -130,7 +132,7 @@ Simply type the following command as per your Linux distro. Simply type the following command: - $ linux_logo + $ linux_logo ![](http://s0.cyberciti.org/uploads/cms/2015/09/debian-linux_logo.jpg) @@ -176,7 +178,7 @@ You can see a list of compiled in logos using: 28 Banner Yes sourcemage Source Mage GNU/Linux large 29 Banner Yes suse SUSE Logo 30 Banner Yes ubuntu Ubuntu Logo - + Do "linux_logo -L num" where num is from above to get the appropriate logo. Remember to also use -a to get ascii version. @@ -224,4 +226,4 @@ via: http://www.cyberciti.biz/hardware/howto-display-linux-logo-in-bash-terminal [2]:http://imgur.com/HKIUznn [3]:http://www.cyberciti.biz/faq/bash-for-loop/ [4]:https://github.com/KittyKatt/screenFetch -[5]:https://github.com/deater/linux_logo \ No newline at end of file +[5]:https://github.com/deater/linux_logo From 2bf99c2b3cc4a254f2c0d962be1e2164dc9c19a8 Mon Sep 17 00:00:00 2001 From: Yuking Date: Mon, 12 Oct 2015 01:21:57 +0800 Subject: [PATCH 2232/2517] Changes to be committed: modified: sources/news/20150930 Debian dropping the Linux Standard Base.md --- ...Debian dropping the Linux Standard Base.md | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/sources/news/20150930 Debian dropping the Linux Standard Base.md b/sources/news/20150930 Debian dropping the Linux Standard Base.md index 22a5a79a44..1f9144358a 100644 --- a/sources/news/20150930 Debian dropping the Linux Standard Base.md +++ b/sources/news/20150930 Debian dropping the Linux Standard Base.md @@ -1,38 +1,35 @@ -Debian dropping the Linux Standard Base -======================================= +Debian正在拋弃Linux标准规范 +======================== -The Linux Standard Base (LSB) is a [specification][1] that purports to define the services and application-level ABIs that a Linux distribution will provide for use by third-party programs. But some in the Debian project are questioning the value of maintaining LSB compliance—it has become, they say, a considerable amount of -work for little measurable benefit. +Linux标准规范(LSB)是一个意图定义一个Linux发行版提供的第三方程序的服务和应用层ABI的[规范][1]。但Debian项目内的某些人正在质疑维持LSB一致性的价值,他们认为,该项工作的工作量巨大,但好处有限。 -The LSB was first released in 2001, and was modeled to a degree on the [POSIX][2] and [Single UNIX Specification][3] standards. Today, the LSB is maintained by a [working group][4] at the Linux Foundation. The most recent release was [LSB 5.0][5] in June 2015. It defines five LSB modules (Core, Desktop, Languages, Imaging, and Trial Use). +LSB于2001年首次公布,建立在[POSIX][2]和[单一UNIX规范][3]的基础之上。目前,LSB由Linux基金会的一个[工作小组][4]维护。最新的版本是于2015年6月发布的[LSB 5.0][5]。它定义了五个LSB模块(核芯、桌面、语言、图形和试用)。 -The bulk of each module consists of a list of required libraries and the mandatory version for each, plus a description of the public functions and data definitions for each library. Other contents of the modules include naming and organizational specifications, such as the filesystem layout in the [Filesystem Hierarchy Standard (FHS)][6] or directory specifications like the Freedesktop [XDG Base Directory][7] specification. +每个模块都包含了一系列所需的库及其强制性版本,外加对每个库的公共函数和数据定义的描述。这些模块还包括命名和组织规范,如[文件系统层次标准(FHS)][6]中的文件系统布局或象Freedesktop的[XDG基础目录][7]规范这样的目录规范。 -In what appears to be sheer coincidence, during the same week that LSB 5.0 was released, a discussion arose within the Debian project as to whether or not maintaining LSB compliance was a worthwhile pursuit for Debian. After LSB compliance was mentioned in passing in another thread, Didier Raboud took the opportunity to [propose][8] scaling back Debian's compliance efforts to the bare minimum. As it stands today, he said, Debian's `lsb-*` meta-packages attempt to require the correct versions of the libraries mentioned in the standard, but no one is actually checking that all of the symbols and data definitions are met as aresult. +似乎只是一个巧合,就在 LSB 5.0 发布的那一周,Debian 项目内部针对Debian是否值得追求维持LSB一致性进行了一次讨论。在另一个贴子中,在提及LSB一致性后,Didier Raboud顺势[提议][8]将Debian的一致性工作维持在最低水平。他说,目前的情况是,Debian的“lsb-*”元包要求有该标准中提及的库的正确版本,但事实上却没有人去检查所有的符号和数据定义是否满足要求。 -Furthermore, the LSB continues to grow; the 4.1 release (the most recent when Debian "jessie" was released) consisted of "*1493 components, 1672 libs, 38491 commands, 30176 classes and 716202 interfaces*," he said. No one seems interested in checking those details in the Debian packages, he noted, adding that "*I've held an LSB BoF last year at DebConf, and discussed src:lsb with various people back then, and what I took back was 'roughly no one cares'.*" Just as importantly, though, the lack of interest does not seem to be limited to Debian: +另外,LSB还不断在膨胀;他说,4.1版(Debian “jessie”发布时的最新版本)包含“*1493个组件、1672个库、38491条命令、30176个类和716202个接口*”。似乎没有人有兴趣检查Debian包中的这些细节,他解释道,“*去年在DebConf上我举行过一次LSB BoF,后来又与很多人讨论过src:lsb,我收回自己的‘几乎没有人在意’的说法*”。但,重要的是,兴趣的缺乏似乎并不仅局限于Debian: - The crux of the issue is, I think, whether this whole game is worth the work: I am yet to hear about software distribution happening through LSB packages. There are only _8_ applications by 6 companies on the LSB certified applications list, of which only one is against LSB >= 4. + 我认为,这个问题的关键在于是否值得去玩这整个游戏:我还没听说有哪个软件通过LSB包来发行。LSB认证的应用清单上只有6个公司的_8_个应用,其中仅有一个 LSB >= 4。 -Raboud proposed that Debian drop everything except for the [lsb-base][9] package (which currently includes a small set of shell functions for use by the init system) and the [lsb-release][10] package (which provides a simple tool that users can use to query the identity of the distribution and what level of LSB compliance it advertises). +Raboud提议Debian摈弃除了[lsb-base][9]包(目前包括一个用于启动系统所需的小的shell函数集合)和[lsb-release][10]包(提供一个简单工具,用户可用它查询发行版的身份以及该发行版宣称的与哪个LSB级别一致)之外的所有内容。 -In a follow-up [message][11],he noted that changing the LSB to be, essentially, "*whatever Debian as well as all other actors in the FLOSS world are _actually_ doing*" might make the standard—and the effort to support it in Debian—more valuable. But here again, he questioned whether anyone was interested in pursuing that objective. +[后来][11],他又称,将LSB基本上改变为“*Debian和FLOSS世界中的所有其它演员所实际做的任何事*”可能会使得该标准(以及在Debian为支持它所做的工作)更有价值。但此时他再次质疑是否有人会对推动这个目标有兴趣。 -If his initial comments about lack of interest in LSB were not evidence enough, a full three months then went by with no one offering any support for maintaining the LSB-compliance packages and two terse votes in favor of dropping them. Consequently, on September 17, Raboud [announced][12] that he had gutted the `src:lsb` package (leaving just `lsb-base` and `lsb-release` as described) and uploaded it to the "unstable" archive. That minimalist set of tools will allow an interested user to start up the next Debian release and query whether or not it is LSB-compliant—and the answer will be "no." +如果说他最初称LSB中缺乏兴趣没有足够的证据,随后整整三个月之内没有任何人对维持LSB-一致性的包提供支持,并进行了两次拋弃它们的投票。最后,9月17日,Raboud[宣布][12]他已经抽掉`src:lsb`包(如前所述,保留了`lsb-base`和`lsb-relese`),将将其上载到“unstable”档案中。感兴趣的用户可通过最小限度的工具集来启动下一个Debian版本,并查询它是否符合LSB-一致性:结果将为“否”。 -Raboud added that Debian does still plan to maintain FHS compliance, even though it is dropping LSB compliance: +Raboud补充说,即便摈弃了LSB一致性,Debian仍计划保留FHS一致性: - But Debian's not throwing all of the LSB overboard: we're still firmly standing behind the FHS (version 2.3 through Debian Policy; although 3.0 was released in August this year) and our SysV init scripts mostly conform to LSB VIII.22.{2-8}. But don't get me wrong, this src:lsb upload is an explicit move away from the LSB. + 但Debian并没有放弃所有的LSB:我们仍将严格遵守FHS(Debian Policy中的版本2.3;虽然今年8月已经发布了3.0),而且我们的SysV启动脚本几乎全部遵循VIII.22.{2-8}。但请不要误解我们,此次src:lsb上载明确说明我们将离开LSB。 -After the announcement, Nikolaus Rath [replied][13] that some proprietary applications expect `ld-lsb.so*` symbolic links to be present in `/lib` and `/lib64`, and that those symbolic links had been provided by the `lsb-*` package set. Raboud [suggested][14] that the links should be provided by the `libc6` package instead; package maintainer Aurelien Jarno [said][15] he would accept such a patch if it was provided. +在该宣告之后,Nikolaus Rath[回应][13]称某些私有应用依赖`/lib`和`/lib64`中的符号链接`ld-lsb.so*`,而这些符号链接由`lsb-*`包提供。Raboud则[建议][14]应改由`libc6`包提供;包维护人员Aurelien Jarno[称][15],如果提供这样一个补丁,他将会接受它。 -The only remaining wrinkle, it seems, is that there are some printer-driver packages that expect some measure of LSB compliance. Raboud had noted in his first message that [OpenPrinting][16] drivers were the only example of LSB-compliant packages he had seen actually distributed. Michael Biebl [noted][17] that there was one such driver package in the main archive; Raboud [replied][18] that he believed the package in question ought to be moved to the non-free repository anyway, since it contained a binary driver. +似乎唯一的遗留问题只是某些打印机驱动包会依赖LSB一致性。Raboud称,在其首个贴子中已经说明,据他所知,实际发布的唯一一个依赖LSB一致性的包为[OpenPrinting][16]驱动程序。Michael Biebl[称][17],主档案中有这样一个驱动包;Raboud则[回应][18]说,他相信有问题的包应该被移到非自由仓库,因其包括了一个二进制驱动。 -With that, the issue appears to be settled, at least for the current Debian development cycle. What will be more interesting, naturally, will be to see what effect, if any, the decision has on broader LSB acceptance. As Raboud alluded to, the number of distributions that are certified as LSB-compliant is [small][19]. It is hard not to notice that those distributions are largely of the "enterprise" variety. +于是,这个问题看上去已经尘埃落定,至于对于目前的Debian开发周期来说是如此的状况。很自然的是,未来让人更感觉兴趣的是,如果该决定存在一些影响的话,那么人们将会看到它对更广泛的LSB接受度有何影响。正如Raboud所说的那样,被认证为LSB-一致性的发行版数量很[小][19]。人们很难不注意到这些发行版很大程度上是“企业”的变种。 -Perhaps, then, LSB compliance is still important to some business sectors, but it is hard to know how many customers of those enterprise distributions genuinely care about the LSB certification stamp. If Debian's experience is anything to go by, however, general interest in such certification may be in steep decline. - ---- +也许,对某些商业领域来说,LSB仍很重要,但很难知道有多少那些企业发行版的客户真正关心LSB认证标签。然而,如果Debian按此发展下去,对这种认证的一般兴趣可能会急剧下降。 via:https://lwn.net/Articles/658809/ From 3e94db32aa89d7eeb68f06ea8870b4ef3ae09bbd Mon Sep 17 00:00:00 2001 From: Yuking-net Date: Mon, 12 Oct 2015 01:27:56 +0800 Subject: [PATCH 2233/2517] Changes to be committed: modified: sources/news/20150930 Debian dropping the Linux Standard Base.md --- .../news/20150930 Debian dropping the Linux Standard Base.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20150930 Debian dropping the Linux Standard Base.md b/sources/news/20150930 Debian dropping the Linux Standard Base.md index 1f9144358a..b29f729aff 100644 --- a/sources/news/20150930 Debian dropping the Linux Standard Base.md +++ b/sources/news/20150930 Debian dropping the Linux Standard Base.md @@ -17,7 +17,7 @@ Raboud提议Debian摈弃除了[lsb-base][9]包(目前包括一个用于启动 [后来][11],他又称,将LSB基本上改变为“*Debian和FLOSS世界中的所有其它演员所实际做的任何事*”可能会使得该标准(以及在Debian为支持它所做的工作)更有价值。但此时他再次质疑是否有人会对推动这个目标有兴趣。 -如果说他最初称LSB中缺乏兴趣没有足够的证据,随后整整三个月之内没有任何人对维持LSB-一致性的包提供支持,并进行了两次拋弃它们的投票。最后,9月17日,Raboud[宣布][12]他已经抽掉`src:lsb`包(如前所述,保留了`lsb-base`和`lsb-relese`),将将其上载到“unstable”档案中。感兴趣的用户可通过最小限度的工具集来启动下一个Debian版本,并查询它是否符合LSB-一致性:结果将为“否”。 +如果说他最初称LSB中缺乏兴趣没有足够的证据,随后整整三个月之内没有任何人对维持LSB-一致性的包提供支持,并进行了两次拋弃它们的投票。最后,9月17日,Raboud[宣布][12]他已经抽掉`src:lsb`包(如前所述,保留了`lsb-base`和`lsb-release`),将将其上载到“unstable”档案中。感兴趣的用户可通过最小限度的工具集来启动下一个Debian版本,并查询它是否符合LSB-一致性:结果将为“否”。 Raboud补充说,即便摈弃了LSB一致性,Debian仍计划保留FHS一致性: From e9f12804e05dbe3bcc44d6ae5a6e543d971c1602 Mon Sep 17 00:00:00 2001 From: "yuking_net@sohu.com" Date: Mon, 12 Oct 2015 01:32:11 +0800 Subject: [PATCH 2234/2517] Changes to be committed: modified: sources/news/20150930 Debian dropping the Linux Standard Base.md --- .../news/20150930 Debian dropping the Linux Standard Base.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/news/20150930 Debian dropping the Linux Standard Base.md b/sources/news/20150930 Debian dropping the Linux Standard Base.md index b29f729aff..9fca1694dc 100644 --- a/sources/news/20150930 Debian dropping the Linux Standard Base.md +++ b/sources/news/20150930 Debian dropping the Linux Standard Base.md @@ -1,5 +1,5 @@ -Debian正在拋弃Linux标准规范 -======================== +Debian拋弃Linux标准规范 +======================= Linux标准规范(LSB)是一个意图定义一个Linux发行版提供的第三方程序的服务和应用层ABI的[规范][1]。但Debian项目内的某些人正在质疑维持LSB一致性的价值,他们认为,该项工作的工作量巨大,但好处有限。 From 8978eee36928cfd8590bb44c4d499a3395384658 Mon Sep 17 00:00:00 2001 From: "yuking_net@sohu.com" Date: Mon, 12 Oct 2015 01:38:56 +0800 Subject: [PATCH 2235/2517] Changes to be committed: modified: 20150930 Debian dropping the Linux Standard Base.md --- ... Debian dropping the Linux Standard Base.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sources/news/20150930 Debian dropping the Linux Standard Base.md b/sources/news/20150930 Debian dropping the Linux Standard Base.md index 9fca1694dc..f3d8b5214c 100644 --- a/sources/news/20150930 Debian dropping the Linux Standard Base.md +++ b/sources/news/20150930 Debian dropping the Linux Standard Base.md @@ -1,33 +1,33 @@ Debian拋弃Linux标准规范 ======================= -Linux标准规范(LSB)是一个意图定义一个Linux发行版提供的第三方程序的服务和应用层ABI的[规范][1]。但Debian项目内的某些人正在质疑维持LSB一致性的价值,他们认为,该项工作的工作量巨大,但好处有限。 +Linux标准规范(LSB)是一个意图定义一个Linux发行版提供的第三方程序的服务和应用层ABI的[规范][1]。但Debian项目内的某些人正在质疑维持兼容LSB的价值,他们认为,该项工作的工作量巨大,但好处有限。 LSB于2001年首次公布,建立在[POSIX][2]和[单一UNIX规范][3]的基础之上。目前,LSB由Linux基金会的一个[工作小组][4]维护。最新的版本是于2015年6月发布的[LSB 5.0][5]。它定义了五个LSB模块(核芯、桌面、语言、图形和试用)。 每个模块都包含了一系列所需的库及其强制性版本,外加对每个库的公共函数和数据定义的描述。这些模块还包括命名和组织规范,如[文件系统层次标准(FHS)][6]中的文件系统布局或象Freedesktop的[XDG基础目录][7]规范这样的目录规范。 -似乎只是一个巧合,就在 LSB 5.0 发布的那一周,Debian 项目内部针对Debian是否值得追求维持LSB一致性进行了一次讨论。在另一个贴子中,在提及LSB一致性后,Didier Raboud顺势[提议][8]将Debian的一致性工作维持在最低水平。他说,目前的情况是,Debian的“lsb-*”元包要求有该标准中提及的库的正确版本,但事实上却没有人去检查所有的符号和数据定义是否满足要求。 +似乎只是一个巧合,就在 LSB 5.0 发布的那一周,Debian 项目内部针对Debian是否值得追求维持兼容LSB进行了一次讨论。在另一个贴子中,在提及兼容LSB后,Didier Raboud顺势[提议][8]将Debian的兼容工作维持在最低水平。他说,目前的情况是,Debian的“lsb-*”元包要求有该标准中提及的库的正确版本,但事实上却没有人去检查所有的符号和数据定义是否满足要求。 -另外,LSB还不断在膨胀;他说,4.1版(Debian “jessie”发布时的最新版本)包含“*1493个组件、1672个库、38491条命令、30176个类和716202个接口*”。似乎没有人有兴趣检查Debian包中的这些细节,他解释道,“*去年在DebConf上我举行过一次LSB BoF,后来又与很多人讨论过src:lsb,我收回自己的‘几乎没有人在意’的说法*”。但,重要的是,兴趣的缺乏似乎并不仅局限于Debian: +另外,LSB还不断在膨胀;他说,4.1版(Debian “jessie”发布时的最新版本)包含“*1493个组件、1672个库、38491条命令、30176个类和716202个接口*”。似乎没有人有兴趣检查Debian包中的这些细节,他解释道,“*去年在DebConf上我举行过一次LSB BoF,后来又与很多人讨论过src:lsb,我收回自己的‘几乎没有人在意’的说法*”。但,重要的是,Debian似乎并不仅局限于兴趣的缺乏: 我认为,这个问题的关键在于是否值得去玩这整个游戏:我还没听说有哪个软件通过LSB包来发行。LSB认证的应用清单上只有6个公司的_8_个应用,其中仅有一个 LSB >= 4。 -Raboud提议Debian摈弃除了[lsb-base][9]包(目前包括一个用于启动系统所需的小的shell函数集合)和[lsb-release][10]包(提供一个简单工具,用户可用它查询发行版的身份以及该发行版宣称的与哪个LSB级别一致)之外的所有内容。 +Raboud提议Debian摈弃除了[lsb-base][9]包(目前包括一个用于启动系统所需的小的shell函数集合)和[lsb-release][10]包(提供一个简单工具,用户可用它查询发行版的身份以及该发行版宣称的与哪个LSB级别兼容)之外的所有内容。 [后来][11],他又称,将LSB基本上改变为“*Debian和FLOSS世界中的所有其它演员所实际做的任何事*”可能会使得该标准(以及在Debian为支持它所做的工作)更有价值。但此时他再次质疑是否有人会对推动这个目标有兴趣。 -如果说他最初称LSB中缺乏兴趣没有足够的证据,随后整整三个月之内没有任何人对维持LSB-一致性的包提供支持,并进行了两次拋弃它们的投票。最后,9月17日,Raboud[宣布][12]他已经抽掉`src:lsb`包(如前所述,保留了`lsb-base`和`lsb-release`),将将其上载到“unstable”档案中。感兴趣的用户可通过最小限度的工具集来启动下一个Debian版本,并查询它是否符合LSB-一致性:结果将为“否”。 +如果说他最初称LSB中缺乏兴趣没有足够的证据,随后整整三个月之内没有任何人对维持LSB兼容的包提供支持,并进行了两次拋弃它们的投票。最后,9月17日,Raboud[宣布][12]他已经抽掉`src:lsb`包(如前所述,保留了`lsb-base`和`lsb-release`),将将其上载到“unstable”档案中。感兴趣的用户可通过最小限度的工具集来启动下一个Debian版本,并查询它是否兼容LSB:结果将为“否”。 -Raboud补充说,即便摈弃了LSB一致性,Debian仍计划保留FHS一致性: +Raboud补充说,即便摈弃了兼容LSB,Debian仍计划继续兼容FHS: 但Debian并没有放弃所有的LSB:我们仍将严格遵守FHS(Debian Policy中的版本2.3;虽然今年8月已经发布了3.0),而且我们的SysV启动脚本几乎全部遵循VIII.22.{2-8}。但请不要误解我们,此次src:lsb上载明确说明我们将离开LSB。 在该宣告之后,Nikolaus Rath[回应][13]称某些私有应用依赖`/lib`和`/lib64`中的符号链接`ld-lsb.so*`,而这些符号链接由`lsb-*`包提供。Raboud则[建议][14]应改由`libc6`包提供;包维护人员Aurelien Jarno[称][15],如果提供这样一个补丁,他将会接受它。 -似乎唯一的遗留问题只是某些打印机驱动包会依赖LSB一致性。Raboud称,在其首个贴子中已经说明,据他所知,实际发布的唯一一个依赖LSB一致性的包为[OpenPrinting][16]驱动程序。Michael Biebl[称][17],主档案中有这样一个驱动包;Raboud则[回应][18]说,他相信有问题的包应该被移到非自由仓库,因其包括了一个二进制驱动。 +似乎唯一的遗留问题只是某些打印机驱动包会依赖LSB兼容。Raboud称,在其首个贴子中已经说明,据他所知,实际发布的唯一一个依赖LSB兼容的包为[OpenPrinting][16]驱动程序。Michael Biebl[称][17],主档案中有这样一个驱动包;Raboud则[回应][18]说,他相信有问题的包应该被移到非自由仓库,因其包括了一个二进制驱动。 -于是,这个问题看上去已经尘埃落定,至于对于目前的Debian开发周期来说是如此的状况。很自然的是,未来让人更感觉兴趣的是,如果该决定存在一些影响的话,那么人们将会看到它对更广泛的LSB接受度有何影响。正如Raboud所说的那样,被认证为LSB-一致性的发行版数量很[小][19]。人们很难不注意到这些发行版很大程度上是“企业”的变种。 +于是,这个问题看上去已经尘埃落定,至于对于目前的Debian开发周期来说是如此的状况。很自然的是,未来让人更感觉兴趣的是,如果该决定存在一些影响的话,那么人们将会看到它对更广泛的LSB接受度有何影响。正如Raboud所说的那样,被认证为LSB兼容的发行版数量很[小][19]。人们很难不注意到这些发行版很大程度上是“企业”的变种。 也许,对某些商业领域来说,LSB仍很重要,但很难知道有多少那些企业发行版的客户真正关心LSB认证标签。然而,如果Debian按此发展下去,对这种认证的一般兴趣可能会急剧下降。 @@ -59,5 +59,5 @@ via:https://lwn.net/Articles/658809/ [16]:http://www.linuxfoundation.org/collaborate/workgroups/openprinting/ [17]:/Articles/658844/ [18]:/Articles/658845/ - +[19]:https://www.linuxbase.org/lsb-cert/productdir.php?by_lsb From e4fb9ea72f6a766670d091d326511c9af1b5a199 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 12 Oct 2015 10:35:41 +0800 Subject: [PATCH 2236/2517] PUB:20150930 Debian dropping the Linux Standard Base @Yuking-net --- ...Debian dropping the Linux Standard Base.md | 65 +++++++++++++++++++ ...Debian dropping the Linux Standard Base.md | 63 ------------------ 2 files changed, 65 insertions(+), 63 deletions(-) create mode 100644 published/20150930 Debian dropping the Linux Standard Base.md delete mode 100644 sources/news/20150930 Debian dropping the Linux Standard Base.md diff --git a/published/20150930 Debian dropping the Linux Standard Base.md b/published/20150930 Debian dropping the Linux Standard Base.md new file mode 100644 index 0000000000..c854ba8dfe --- /dev/null +++ b/published/20150930 Debian dropping the Linux Standard Base.md @@ -0,0 +1,65 @@ +Debian 拋弃 Linux 标准规范(LSB) +======================= + +Linux 标准规范(LSB)是一个意图定义 Linux 发行版为第三方程序所提供的服务和应用层 ABI(Application Binary Interfaces,程序二进制界面) 的[规范][1]。但 Debian 项目内的某些人正在质疑是否值得维持兼容 LSB,他们认为,该项工作的工作量巨大,但好处有限。 + +LSB 于2001年首次公布,其模型建立在 [POSIX][2] 和[单一 UNIX 规范(Single UNIX Specification)][3]的基础之上。目前,LSB 由 Linux 基金会的一个[工作小组][4]维护。最新的版本是于2015年6月发布的 [LSB 5.0][5]。它定义了五个 LSB 模块(核芯(core)、桌面、语言、成像(imaging)和试用)。 + +每个模块都包含了一系列所需的库及其强制性版本,外加对每个库的公共函数和数据定义的描述。这些模块还包括命名和组织规范,如[文件系统层次标准(FHS,Filesystem Hierarchy Standard)][6]中的文件系统布局或象 Freedesktop 的[XDG 基础目录(XDG Base Directory)][7]规范这样的目录规范。 + +似乎只是一个巧合,就在 LSB 5.0 发布的同一周,Debian 项目内部针对其是否值得保持兼容 LSB 进行了一次讨论。在另一个贴子中,在提及兼容 LSB 后,Didier Raboud 顺势[提议][8]将 Debian 的兼容工作维持在最低水平。他说,目前的情况是,Debian 的“lsb-*” 元包( meta-packages)试图规定该标准中提及的库的正确版本,但事实上却没有人去检查所有的符号和数据定义是否满足要求。 + +另外,LSB 还不断在膨胀;他说, LSB 4.1 版(接近 Debian “jessie” 发布时的最新版本)包含“*1493个组件、1672个库、38491条命令、30176个类和716202个接口*”。似乎没有人有兴趣检查 Debian 包中的这些细节,他解释道,又补充说,“*去年在 DebConf 上我举行过一次 LSB BoF,后来又与很多人讨论过 src:lsb,我收回自己的‘几乎没有人在意’的说法*”。但,重要的是,Debian 似乎并不仅局限于兴趣的缺乏: + + 我认为,这个问题的关键在于是否值得去玩这整个游戏:我还没听说有哪个软件通过 LSB 包来发行。LSB 认证的应用清单上只有 6个公司的_8_个应用,其中仅有一个是针对不低于 LSB 4 的。 + +Raboud 提议 Debian 摈弃除了 [lsb-base][9] 包(目前包括一个用于启动系统所需的小的 shell 函数集合)和 [lsb-release][10] 包(提供一个简单工具,用户可用它查询发行版的身份以及该发行版宣称的与哪个 LSB 级别兼容)之外的所有内容。 + +[后来][11],他又称,将 LSB 基本上改变为“*Debian 和 FLOSS 世界中的所有的其它人所_实际_做的任何事*”可能会使得该标准(以及在 Debian 为支持它所做的工作)更有价值。但此时他再次质疑是否有人会对推动这个目标有兴趣。 + +如果说他最初称 LSB 中缺乏兴趣没有足够的证据,随后整整三个月之内没有任何人对维持 LSB 兼容的包提供支持,并进行了两次拋弃它们的投票。最后,9月17日,Raboud [宣布][12]他已经抽掉 `src:lsb` 包(如前所述,保留了`lsb-base` 和 `lsb-release`),将将其上载到 “unstable” 归档中。这个最小的工具集可以让感兴趣的用户在启动了下一个 Debian 版本后查询它是否兼容 LSB:结果将为“否”。 + +Raboud 补充说,即便摈弃了兼容 LSB,Debian 仍计划继续兼容 FHS: + + 但 Debian 并没有放弃所有的 LSB:我们仍将严格遵守 FHS(直到 Debian Policy 版本 2.3;虽然今年8月已经发布了3.0),而且我们的 SysV 启动脚本几乎全部遵循 VIII.22.{2-8}。但请不要误解,此次 src:lsb 上载明确说明我们将离开 LSB。 + +在该宣告之后,Nikolaus Rath [回应][13]称某些私有应用依赖`/lib`和`/lib64`中的符号链接`ld-lsb.so*`,而这些符号链接由`lsb-*`包提供。Raboud 则[建议][14]应改由`libc6`包提供;该包维护人员Aurelien Jarno [称][15],如果提供这样一个补丁,他将会接受它。 + +似乎唯一的遗留问题只是某些打印机驱动包会依赖 LSB 兼容。Raboud 称,在其首个贴子中已经说明,据他所知,实际发布的唯一一个依赖 LSB 兼容的包为 [OpenPrinting][16] 驱动程序。Michael Biebl [称][17],主归档中有这样一个驱动包;Raboud 则[回应][18]说,他认为这个有问题的包应该被移到非自由仓库,因其包括了一个二进制驱动。 + +于是,这个问题看上去已经尘埃落定,至于对于目前的 Debian 开发周期来说是如此的状况。很自然的是,未来让人更感觉兴趣的是,如果该决定存在一些影响的话,那么人们将会看到它对更广泛的 LSB 接受度有何影响。正如 Raboud 所说的那样,被认证为 LSB 兼容的发行版数量很[少][19]。人们很难不会注意到这些发行版很大程度上是“企业”的变种。 + +也许,对某些商业领域来说,LSB 仍很重要,但很难知道有多少那些企业发行版的客户真正关心 LSB 认证标签。然而,如果 Debian 的经验靠得住的话,对这种认证的一般兴趣可能会急剧下降。 + +---- + +via:https://lwn.net/Articles/658809/ + +作者:Nathan Willis +译者:[Yuking](https://github.com/Yuking-net) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译, +[Linux中国](https://linux.cn/) 荣誉推出 + + +[1]:http://refspecs.linuxfoundation.org/lsb.shtml +[2]:https://en.wikipedia.org/wiki/POSIX +[3]:https://en.wikipedia.org/wiki/Single_UNIX_Specification +[4]:http://www.linuxfoundation.org/collaborate/workgroups/lsb +[5]:http://www.linuxfoundation.org/collaborate/workgroups/lsb/lsb-50 +[6]:http://www.linuxfoundation.org/collaborate/workgroups/lsb/fhs +[7]:http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html +[8]:https://lwn.net/Articles/658838/ +[9]:https://packages.debian.org/sid/lsb-base +[10]:https://packages.debian.org/sid/lsb-release +[11]:https://lwn.net/Articles/658842/ +[12]:https://lwn.net/Articles/658843/ +[13]:https://lwn.net/Articles/658846/ +[14]:https://lwn.net/Articles/658847/ +[15]:https://lwn.net/Articles/658848/ +[16]:http://www.linuxfoundation.org/collaborate/workgroups/openprinting/ +[17]:https://lwn.net/Articles/658844/ +[18]:https://lwn.net/Articles/658845/ +[19]:https://www.linuxbase.org/lsb-cert/productdir.php?by_lsb + diff --git a/sources/news/20150930 Debian dropping the Linux Standard Base.md b/sources/news/20150930 Debian dropping the Linux Standard Base.md deleted file mode 100644 index f3d8b5214c..0000000000 --- a/sources/news/20150930 Debian dropping the Linux Standard Base.md +++ /dev/null @@ -1,63 +0,0 @@ -Debian拋弃Linux标准规范 -======================= - -Linux标准规范(LSB)是一个意图定义一个Linux发行版提供的第三方程序的服务和应用层ABI的[规范][1]。但Debian项目内的某些人正在质疑维持兼容LSB的价值,他们认为,该项工作的工作量巨大,但好处有限。 - -LSB于2001年首次公布,建立在[POSIX][2]和[单一UNIX规范][3]的基础之上。目前,LSB由Linux基金会的一个[工作小组][4]维护。最新的版本是于2015年6月发布的[LSB 5.0][5]。它定义了五个LSB模块(核芯、桌面、语言、图形和试用)。 - -每个模块都包含了一系列所需的库及其强制性版本,外加对每个库的公共函数和数据定义的描述。这些模块还包括命名和组织规范,如[文件系统层次标准(FHS)][6]中的文件系统布局或象Freedesktop的[XDG基础目录][7]规范这样的目录规范。 - -似乎只是一个巧合,就在 LSB 5.0 发布的那一周,Debian 项目内部针对Debian是否值得追求维持兼容LSB进行了一次讨论。在另一个贴子中,在提及兼容LSB后,Didier Raboud顺势[提议][8]将Debian的兼容工作维持在最低水平。他说,目前的情况是,Debian的“lsb-*”元包要求有该标准中提及的库的正确版本,但事实上却没有人去检查所有的符号和数据定义是否满足要求。 - -另外,LSB还不断在膨胀;他说,4.1版(Debian “jessie”发布时的最新版本)包含“*1493个组件、1672个库、38491条命令、30176个类和716202个接口*”。似乎没有人有兴趣检查Debian包中的这些细节,他解释道,“*去年在DebConf上我举行过一次LSB BoF,后来又与很多人讨论过src:lsb,我收回自己的‘几乎没有人在意’的说法*”。但,重要的是,Debian似乎并不仅局限于兴趣的缺乏: - - 我认为,这个问题的关键在于是否值得去玩这整个游戏:我还没听说有哪个软件通过LSB包来发行。LSB认证的应用清单上只有6个公司的_8_个应用,其中仅有一个 LSB >= 4。 - -Raboud提议Debian摈弃除了[lsb-base][9]包(目前包括一个用于启动系统所需的小的shell函数集合)和[lsb-release][10]包(提供一个简单工具,用户可用它查询发行版的身份以及该发行版宣称的与哪个LSB级别兼容)之外的所有内容。 - -[后来][11],他又称,将LSB基本上改变为“*Debian和FLOSS世界中的所有其它演员所实际做的任何事*”可能会使得该标准(以及在Debian为支持它所做的工作)更有价值。但此时他再次质疑是否有人会对推动这个目标有兴趣。 - -如果说他最初称LSB中缺乏兴趣没有足够的证据,随后整整三个月之内没有任何人对维持LSB兼容的包提供支持,并进行了两次拋弃它们的投票。最后,9月17日,Raboud[宣布][12]他已经抽掉`src:lsb`包(如前所述,保留了`lsb-base`和`lsb-release`),将将其上载到“unstable”档案中。感兴趣的用户可通过最小限度的工具集来启动下一个Debian版本,并查询它是否兼容LSB:结果将为“否”。 - -Raboud补充说,即便摈弃了兼容LSB,Debian仍计划继续兼容FHS: - - 但Debian并没有放弃所有的LSB:我们仍将严格遵守FHS(Debian Policy中的版本2.3;虽然今年8月已经发布了3.0),而且我们的SysV启动脚本几乎全部遵循VIII.22.{2-8}。但请不要误解我们,此次src:lsb上载明确说明我们将离开LSB。 - -在该宣告之后,Nikolaus Rath[回应][13]称某些私有应用依赖`/lib`和`/lib64`中的符号链接`ld-lsb.so*`,而这些符号链接由`lsb-*`包提供。Raboud则[建议][14]应改由`libc6`包提供;包维护人员Aurelien Jarno[称][15],如果提供这样一个补丁,他将会接受它。 - -似乎唯一的遗留问题只是某些打印机驱动包会依赖LSB兼容。Raboud称,在其首个贴子中已经说明,据他所知,实际发布的唯一一个依赖LSB兼容的包为[OpenPrinting][16]驱动程序。Michael Biebl[称][17],主档案中有这样一个驱动包;Raboud则[回应][18]说,他相信有问题的包应该被移到非自由仓库,因其包括了一个二进制驱动。 - -于是,这个问题看上去已经尘埃落定,至于对于目前的Debian开发周期来说是如此的状况。很自然的是,未来让人更感觉兴趣的是,如果该决定存在一些影响的话,那么人们将会看到它对更广泛的LSB接受度有何影响。正如Raboud所说的那样,被认证为LSB兼容的发行版数量很[小][19]。人们很难不注意到这些发行版很大程度上是“企业”的变种。 - -也许,对某些商业领域来说,LSB仍很重要,但很难知道有多少那些企业发行版的客户真正关心LSB认证标签。然而,如果Debian按此发展下去,对这种认证的一般兴趣可能会急剧下降。 - -via:https://lwn.net/Articles/658809/ - -作者:Nathan Willis -译者:[Yuking](https://github.com/Yuking-net) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译, -[Linux中国](https://linux.cn/) 荣誉推出 - - -[1]:http://refspecs.linuxfoundation.org/lsb.shtml -[2]:https://en.wikipedia.org/wiki/POSIX -[3]:https://en.wikipedia.org/wiki/Single_UNIX_Specification -[4]:http://www.linuxfoundation.org/collaborate/workgroups/lsb -[5]:http://www.linuxfoundation.org/collaborate/workgroups/lsb/lsb-50 -[6]:http://www.linuxfoundation.org/collaborate/workgroups/lsb/fhs -[7]:http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html -[8]:https://lwn.net/Articles/658838/ -[9]:https://packages.debian.org/sid/lsb-base -[10]:https://packages.debian.org/sid/lsb-release -[11]:https://lwn.net/Articles/658842/ -[12]:/Articles/658843/ -[13]:/Articles/658846/ -[14]:/Articles/658847/ -[15]:/Articles/658848/ -[16]:http://www.linuxfoundation.org/collaborate/workgroups/openprinting/ -[17]:/Articles/658844/ -[18]:/Articles/658845/ -[19]:https://www.linuxbase.org/lsb-cert/productdir.php?by_lsb - From 6fcd54d4e70e7e257afc760f11ff8dc292209656 Mon Sep 17 00:00:00 2001 From: locez Date: Mon, 12 Oct 2015 18:46:23 +0800 Subject: [PATCH 2237/2517] translating by locez --- ...908 How to Run ISO Files Directly From the HDD with GRUB2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 7de3640532..147bd7b625 100644 --- 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 @@ -1,7 +1,7 @@ +Translating by Locez 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 ### From 9955e76d8b2392f583dea7ad6ee70b5ac18b98b9 Mon Sep 17 00:00:00 2001 From: locez Date: Mon, 12 Oct 2015 21:33:25 +0800 Subject: [PATCH 2238/2517] translated --- ... Files Directly From the HDD with GRUB2.md | 59 +++++++++---------- 1 file changed, 27 insertions(+), 32 deletions(-) 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 index 147bd7b625..8af47b2d31 100644 --- 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 @@ -1,37 +1,32 @@ -Translating by Locez -How to Run ISO Files Directly From the HDD with GRUB2 +如何使用 GRUB 2 直接从硬盘运行 ISO 文件 ================================================================================ ![](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. +大多数 Linux 发行版都会提供一个可以从 USB 启动的 live 环境,以便用户无需安装即可测试系统。我们可以用它来评测这个发行版或仅仅是当成一个一次性系统,并且很容易将这些文件复制到一个 U 盘上,在某些情况下,我们可能需要经常运行同一个或不同的 ISO 镜像。GRUB 2 可以配置成直接从启动菜单运行一个 live 环境,而不需要烧录这些 ISO 到硬盘或 USB 设备。 -### Obtaining and checking bootable ISO images ### +### 获取和检查可启动的 ISO 镜像 ### +为了获取 ISO 镜像,我们通常应该访问所需要的发行版的网站下载与我们架构兼容的镜像文件。如果这个镜像可以从 U 盘启动,那它也应该可以从 GRUB 菜单启动。 -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 +当镜像下载完后,我们应该通过 MD5 校验检查它的完整性。这会输出一大串数字与字母合成的序列。 ![](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. +将这个序列与下载页提供的 MD5 校验码进行比较,两者应该完全相同。 -### Setting up GRUB 2 ### +### 配置 GRUB 2 ### +ISO 镜像文件包含了整个系统。我们要做的仅仅是告诉 GRUB 2 哪里可以找到 kernel 和 initramdisk 或 initram 文件系统(这取决于我们所使用的发行版)。 -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). +在下面的例子中,一个 Kubuntu 15.04 live 环境将被配置到 Ubuntu 14.04 盒子的 Grub 启动菜单项。这应该能在大多数新的以 Ubuntu 为基础的系统上运行。如果你是其他系统并且想实现一些其它的东西,你可以从[这些文件][1]获取灵感,但这会要求你拥有一点 GRUB 使用经验。 -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. +这个例子的文件 `kubuntu-15.04-desktop-amd64.iso` -In this example the file `kubuntu-15.04-desktop-amd64.iso` +放在位于 `/dev/sda1` 的 `/home/maketecheasier/TempISOs/` 上. -lives in `/home/maketecheasier/TempISOs/` on `/dev/sda1`. - -To make GRUB2 look for it in the right place, you need to edit the +为了使 GRUB 2 能正确找到它,我们应该编辑 /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 @@ -42,52 +37,52 @@ To start Kubuntu from the above location, add the following code (after adjustin ![](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"`. +首先设置了一个变量名 `$menuentry` ,这是 ISO 文件的所在位置 。如果你想改变一个 ISO ,你应该修改 `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`). +注意 hd0,1 这里非常重要,它的意思是第一硬盘,第一分区 (`/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).. +GRUB 的命名在这里稍微有点困惑,对于硬盘来说,它从 “0” 开始计数,第一块硬盘为 #0 ,第二块为 #1 ,第三块为 #2 ,依此类推。但是对于分区来说,它从 “1” 开始计数,第一个分区为 #1 ,第二个分区为 #2 ,依此类推。也许这里有一个很好的原因,但肯定不是明智的(明显用户体验很糟糕).. -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. +在 Linux 中第一块硬盘,第一个分区是 `/dev/sda1` ,但在 GRUB2 中则是 `hd0,1` 。第二块硬盘,第三个分区则是 `hd1,3`, 依此类推. -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. +这会载入内核镜像,在新的 Ubuntu Live CD 中,内核被存放在 `/casper` 目录,并且命名为 `vmlinuz.efi` 。如果你使用的是其它系统,可能会没有 `.efi` 扩展名或内核被存放在其它地方 (可以使用归档管理器打开 ISO 文件在 `/casper` 中查找确认)。最后一个选项, `quiet splash`, 是一个常规的 GRUB 选项无论你是否在意改动它们。 -Finally +最后 initrd (loop)/casper/initrd.lz -will load `initrd`, which is responsible to load a RAMDisk into memory for bootup. +这会载入 `initrd` ,它负责载入 RAMDisk 到内存用于启动。 -### Booting into your live system ### +### 启动 live 系统 ### -To make it all work, you will only need to update GRUB2 +做完上面所有的步骤后,需要更新 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. +当重启系统后,应该可以看见一个新的,并且允许我们启动刚刚配置的 ISO 镜像的 GRUB 条目 ![](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. +选择这个新条目就允许我们像从 DVD 或 U 盘中启动一个 live 环境一样。 -------------------------------------------------------------------------------- via: https://www.maketecheasier.com/run-iso-files-hdd-grub2/ 作者:[Attila Orosz][a] -译者:[译者ID](https://github.com/译者ID) +译者:[译者ID](https://github.com/locez) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 979c24833d29d086ef5fa1a83de08b855a08ab38 Mon Sep 17 00:00:00 2001 From: locez Date: Mon, 12 Oct 2015 21:34:49 +0800 Subject: [PATCH 2239/2517] translated --- ...908 How to Run ISO Files Directly From the HDD with GRUB2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 8af47b2d31..49850d831e 100644 --- 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 @@ -82,7 +82,7 @@ GRUB 的命名在这里稍微有点困惑,对于硬盘来说,它从 “0” via: https://www.maketecheasier.com/run-iso-files-hdd-grub2/ 作者:[Attila Orosz][a] -译者:[译者ID](https://github.com/locez) +译者:[Locez](https://github.com/locez) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 86ec23a9b8dc3e8297687d2974538c912743fc3d Mon Sep 17 00:00:00 2001 From: locez Date: Mon, 12 Oct 2015 21:36:30 +0800 Subject: [PATCH 2240/2517] translated --- ... Files Directly From the HDD with GRUB2.md | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 translated/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md diff --git a/translated/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md b/translated/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md new file mode 100644 index 0000000000..49850d831e --- /dev/null +++ b/translated/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md @@ -0,0 +1,91 @@ +如何使用 GRUB 2 直接从硬盘运行 ISO 文件 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-featured.png) +大多数 Linux 发行版都会提供一个可以从 USB 启动的 live 环境,以便用户无需安装即可测试系统。我们可以用它来评测这个发行版或仅仅是当成一个一次性系统,并且很容易将这些文件复制到一个 U 盘上,在某些情况下,我们可能需要经常运行同一个或不同的 ISO 镜像。GRUB 2 可以配置成直接从启动菜单运行一个 live 环境,而不需要烧录这些 ISO 到硬盘或 USB 设备。 + +### 获取和检查可启动的 ISO 镜像 ### +为了获取 ISO 镜像,我们通常应该访问所需要的发行版的网站下载与我们架构兼容的镜像文件。如果这个镜像可以从 U 盘启动,那它也应该可以从 GRUB 菜单启动。 + +当镜像下载完后,我们应该通过 MD5 校验检查它的完整性。这会输出一大串数字与字母合成的序列。 + +![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-md5.png) + +将这个序列与下载页提供的 MD5 校验码进行比较,两者应该完全相同。 + +### 配置 GRUB 2 ### +ISO 镜像文件包含了整个系统。我们要做的仅仅是告诉 GRUB 2 哪里可以找到 kernel 和 initramdisk 或 initram 文件系统(这取决于我们所使用的发行版)。 + +在下面的例子中,一个 Kubuntu 15.04 live 环境将被配置到 Ubuntu 14.04 盒子的 Grub 启动菜单项。这应该能在大多数新的以 Ubuntu 为基础的系统上运行。如果你是其他系统并且想实现一些其它的东西,你可以从[这些文件][1]获取灵感,但这会要求你拥有一点 GRUB 使用经验。 + +这个例子的文件 `kubuntu-15.04-desktop-amd64.iso` + +放在位于 `/dev/sda1` 的 `/home/maketecheasier/TempISOs/` 上. + +为了使 GRUB 2 能正确找到它,我们应该编辑 + + /etc/grub.d40-custom + +![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-40-custom-empty.png) + + 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) + +### 分析上述代码 ### + +首先设置了一个变量名 `$menuentry` ,这是 ISO 文件的所在位置 。如果你想改变一个 ISO ,你应该修改 `isofile="/path/to/file/name-of-iso-file-.iso"`. + +下一行是指定回环设备,且必须给出正确的分区号码。 + + loopback loop (hd0,1)$isofile + +注意 hd0,1 这里非常重要,它的意思是第一硬盘,第一分区 (`/dev/sda1`)。 + +GRUB 的命名在这里稍微有点困惑,对于硬盘来说,它从 “0” 开始计数,第一块硬盘为 #0 ,第二块为 #1 ,第三块为 #2 ,依此类推。但是对于分区来说,它从 “1” 开始计数,第一个分区为 #1 ,第二个分区为 #2 ,依此类推。也许这里有一个很好的原因,但肯定不是明智的(明显用户体验很糟糕).. + +在 Linux 中第一块硬盘,第一个分区是 `/dev/sda1` ,但在 GRUB2 中则是 `hd0,1` 。第二块硬盘,第三个分区则是 `hd1,3`, 依此类推. + +下一个重要的行是 + + linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash + +这会载入内核镜像,在新的 Ubuntu Live CD 中,内核被存放在 `/casper` 目录,并且命名为 `vmlinuz.efi` 。如果你使用的是其它系统,可能会没有 `.efi` 扩展名或内核被存放在其它地方 (可以使用归档管理器打开 ISO 文件在 `/casper` 中查找确认)。最后一个选项, `quiet splash`, 是一个常规的 GRUB 选项无论你是否在意改动它们。 + +最后 + + initrd (loop)/casper/initrd.lz + +这会载入 `initrd` ,它负责载入 RAMDisk 到内存用于启动。 + +### 启动 live 系统 ### + +做完上面所有的步骤后,需要更新 GRUB2 + + sudo update-grub + +![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-updare-grub.png) + +当重启系统后,应该可以看见一个新的,并且允许我们启动刚刚配置的 ISO 镜像的 GRUB 条目 + +![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-grub-menu.png) + +选择这个新条目就允许我们像从 DVD 或 U 盘中启动一个 live 环境一样。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/run-iso-files-hdd-grub2/ + +作者:[Attila Orosz][a] +译者:[Locez](https://github.com/locez) +校对:[校对者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 1bfb726e4b66eae5febd28551100a872af46dfd2 Mon Sep 17 00:00:00 2001 From: Locez Date: Mon, 12 Oct 2015 13:38:14 +0800 Subject: [PATCH 2241/2517] delete --- ... Files Directly From the HDD with GRUB2.md | 91 ------------------- 1 file changed, 91 deletions(-) delete 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 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 deleted file mode 100644 index 49850d831e..0000000000 --- a/sources/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md +++ /dev/null @@ -1,91 +0,0 @@ -如何使用 GRUB 2 直接从硬盘运行 ISO 文件 -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-featured.png) -大多数 Linux 发行版都会提供一个可以从 USB 启动的 live 环境,以便用户无需安装即可测试系统。我们可以用它来评测这个发行版或仅仅是当成一个一次性系统,并且很容易将这些文件复制到一个 U 盘上,在某些情况下,我们可能需要经常运行同一个或不同的 ISO 镜像。GRUB 2 可以配置成直接从启动菜单运行一个 live 环境,而不需要烧录这些 ISO 到硬盘或 USB 设备。 - -### 获取和检查可启动的 ISO 镜像 ### -为了获取 ISO 镜像,我们通常应该访问所需要的发行版的网站下载与我们架构兼容的镜像文件。如果这个镜像可以从 U 盘启动,那它也应该可以从 GRUB 菜单启动。 - -当镜像下载完后,我们应该通过 MD5 校验检查它的完整性。这会输出一大串数字与字母合成的序列。 - -![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-md5.png) - -将这个序列与下载页提供的 MD5 校验码进行比较,两者应该完全相同。 - -### 配置 GRUB 2 ### -ISO 镜像文件包含了整个系统。我们要做的仅仅是告诉 GRUB 2 哪里可以找到 kernel 和 initramdisk 或 initram 文件系统(这取决于我们所使用的发行版)。 - -在下面的例子中,一个 Kubuntu 15.04 live 环境将被配置到 Ubuntu 14.04 盒子的 Grub 启动菜单项。这应该能在大多数新的以 Ubuntu 为基础的系统上运行。如果你是其他系统并且想实现一些其它的东西,你可以从[这些文件][1]获取灵感,但这会要求你拥有一点 GRUB 使用经验。 - -这个例子的文件 `kubuntu-15.04-desktop-amd64.iso` - -放在位于 `/dev/sda1` 的 `/home/maketecheasier/TempISOs/` 上. - -为了使 GRUB 2 能正确找到它,我们应该编辑 - - /etc/grub.d40-custom - -![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-40-custom-empty.png) - - 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) - -### 分析上述代码 ### - -首先设置了一个变量名 `$menuentry` ,这是 ISO 文件的所在位置 。如果你想改变一个 ISO ,你应该修改 `isofile="/path/to/file/name-of-iso-file-.iso"`. - -下一行是指定回环设备,且必须给出正确的分区号码。 - - loopback loop (hd0,1)$isofile - -注意 hd0,1 这里非常重要,它的意思是第一硬盘,第一分区 (`/dev/sda1`)。 - -GRUB 的命名在这里稍微有点困惑,对于硬盘来说,它从 “0” 开始计数,第一块硬盘为 #0 ,第二块为 #1 ,第三块为 #2 ,依此类推。但是对于分区来说,它从 “1” 开始计数,第一个分区为 #1 ,第二个分区为 #2 ,依此类推。也许这里有一个很好的原因,但肯定不是明智的(明显用户体验很糟糕).. - -在 Linux 中第一块硬盘,第一个分区是 `/dev/sda1` ,但在 GRUB2 中则是 `hd0,1` 。第二块硬盘,第三个分区则是 `hd1,3`, 依此类推. - -下一个重要的行是 - - linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash - -这会载入内核镜像,在新的 Ubuntu Live CD 中,内核被存放在 `/casper` 目录,并且命名为 `vmlinuz.efi` 。如果你使用的是其它系统,可能会没有 `.efi` 扩展名或内核被存放在其它地方 (可以使用归档管理器打开 ISO 文件在 `/casper` 中查找确认)。最后一个选项, `quiet splash`, 是一个常规的 GRUB 选项无论你是否在意改动它们。 - -最后 - - initrd (loop)/casper/initrd.lz - -这会载入 `initrd` ,它负责载入 RAMDisk 到内存用于启动。 - -### 启动 live 系统 ### - -做完上面所有的步骤后,需要更新 GRUB2 - - sudo update-grub - -![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-updare-grub.png) - -当重启系统后,应该可以看见一个新的,并且允许我们启动刚刚配置的 ISO 镜像的 GRUB 条目 - -![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-grub-menu.png) - -选择这个新条目就允许我们像从 DVD 或 U 盘中启动一个 live 环境一样。 - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/run-iso-files-hdd-grub2/ - -作者:[Attila Orosz][a] -译者:[Locez](https://github.com/locez) -校对:[校对者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 7887eb2411739bc76c5044416a70f2bc412b0239 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 12 Oct 2015 14:25:34 +0800 Subject: [PATCH 2242/2517] =?UTF-8?q?20151012-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ut Linux Try Linux Desktop on the Cloud.md | 44 +++++++++ ...tory Of Aix HP-UX Solaris BSD And LINUX.md | 99 +++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md create mode 100644 sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md diff --git a/sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md b/sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md new file mode 100644 index 0000000000..286d6ba816 --- /dev/null +++ b/sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md @@ -0,0 +1,44 @@ +Curious about Linux? Try Linux Desktop on the Cloud +================================================================================ +Linux maintains a very small market share as a desktop operating system. Current surveys estimate its share to be a mere 2%; contrast that with the various strains (no pun intended) of Windows which total nearly 90% of the desktop market. For Linux to challenge Microsoft's monopoly on the desktop, there needs to be a simple way of learning about this different operating system. And it would be naive to believe a typical Windows user is going to buy a second machine, tinker with partitioning a hard disk to set up a multi-boot system, or just jump ship to Linux without an easy way back. + +![](http://www.linuxlinks.com/portal/content/reviews/Cloud/CloudComputing.png) + +We have examined a number of risk-free ways users can experiment with Linux without dabbling with partition management. Various options include Live CD/DVDs, USB keys and desktop virtualization software. For the latter, I can strongly recommend VMWare (VMWare Player) or Oracle VirtualBox, two relatively easy and free ways of installing and running multiple operating systems on a desktop or laptop computer. Each virtual machine has its own share of CPU, memory, network interfaces etc which is isolated from other virtual machines. But virtual machines still require some effort to get Linux up and running, and a reasonably powerful machine. Too much effort for a mere inquisitive mind. + +It can be difficult to break down preconceptions. Many Windows users will have experimented with free software that is available on Linux. But there are many facets to learn on Linux. And it takes time to become accustomed to the way things work in Linux. + +Surely there should be an effortless way for a beginner to experiment with Linux for the first time? Indeed there is; step forward the online cloud lab. + +### LabxNow ### + +![LabxNow](http://www.linuxlinks.com/portal/content/reviews/Cloud/Screenshot-LabxNow.png) + +LabxNow provides a free service for general users offering Linux remote desktop over the browser. The developers promote the service as having a personal remote lab (to play around, develop, whatever!) that will be accessible from anywhere, with the internet of course. + +The service currently offers a free virtual private server with 2 cores, 4GB RAM and 10GB SSD space. The service runs on a 4 AMD 6272 CPU with 128GB RAM. + +#### Features include: #### + +- Machine images: Ubuntu 14.04 with Xfce 4.10, RHEL 6.5, CentOS with Gnome, and Oracle +- Hardware: CPU - 1 or 2 cores; RAM: 512MB, 1GB, 2GB or 4GB +- Fast network for data transfers +- Works with all popular browsers +- Install anything, run anything - an excellent way to experiment and learn all about Linux without any risk +- Easily add, delete, manage and customize VMs +- Share VMs, Remote desktop support + +All you need is a reasonable Internet connected device. Forget about high cost VPS, domain space or hardware support. LabxNow offers a great way of experimenting with Ubuntu, RHEL and CentOS. It gives Windows users an excellent environment to dip their toes into the wonderful world of Linux. Further, it allows users to do (programming) work from anywhere in the word without having the stress of installing Linux on each machine. Point your web browser at [www.labxnow.org/labxweb/][1]. + +There are other services (mostly paid services) that allow users to experiment with Linux. These include Cloudsigma which offers a free 7 day trial, and Icebergs.io (full root access via HTML5). But for now, LabxNow gets my recommendation. + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20151003095334682/LinuxCloud.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://www.labxnow.org/labxweb/ \ No newline at end of file diff --git a/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md b/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md new file mode 100644 index 0000000000..0832929789 --- /dev/null +++ b/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md @@ -0,0 +1,99 @@ +The Brief History Of Aix, HP-UX, Solaris, BSD, And LINUX +================================================================================ +Always remember that when doors close on you, other doors open. [Ken Thompson][1] and [Dennis Richie][2] are a great example for such saying. They were two of the best information technology specialists in the **20th** century as they created the **UNIX** system which is considered one the most influential and inspirational software that ever written. + +### The UNIX systems beginning at Bell Labs ### + +**UNIX** which was originally called **UNICS** (**UN**iplexed **I**nformation and **C**omputing **S**ervice) has a great family and was never born by itself. The grandfather of UNIX was **CTSS** (**C**ompatible **T**ime **S**haring **S**ystem) and the father was the **Multics** (**MULT**iplexed **I**nformation and **C**omputing **S**ervice) project which supports interactive timesharing for mainframe computers by huge communities of users. + +UNIX was born at **Bell Labs** in **1969** by **Ken Thompson** and later **Dennis Richie**. These two great researchers and scientists worked on a collaborative project with **General Electric** and the **Massachusetts Institute of Technology** to create an interactive timesharing system called the Multics. + +Multics was created to combine timesharing with other technological advances, allowing the users to phone the computer from remote terminals, then edit documents, read e-mail, run calculations, and so on. + +Over the next five years, AT&T corporate invested millions of dollars in the Multics project. They purchased mainframe computer called GE-645 and they dedicated to the effort of the top researchers at Bell Labs such as Ken Thompson, Stuart Feldman, Dennis Ritchie, M. Douglas McIlroy, Joseph F. Ossanna, and Robert Morris. The project was too ambitious, but it fell troublingly behind the schedule. And at the end, AT&T leaders decided to leave the project. + +Bell Labs managers decided to stop any further work on operating systems which made many researchers frustrated and upset. But thanks to Thompson, Richie, and some researchers who ignored their bosses’ instructions and continued working with love on their labs, UNIX was created as one the greatest operating systems of all times. + +UNIX started its life on a PDP-7 minicomputer which was a testing machine for Thompson’s ideas about the operating systems design and a platform for Thompsons and Richie’s game simulation that was called Space and Travel. + +> “What we wanted to preserve was not just a good environment in which to do programming, but a system around which a fellowship could form. We knew from experience that the essence of communal computing, as supplied by remote-access, time-shared machines, is not just to type programs into a terminal instead of a keypunch, but to encourage close communication”. Dennis Richie Said. + +UNIX was so close to be the first system under which the programmer could directly sit down at a machine and start composing programs on the fly, explore possibilities and also test while composing. All through UNIX lifetime, it has had a growing more capabilities pattern by attracting skilled volunteer effort from different programmers impatient with the other operating systems limitations. + +UNIX has received its first funding for a PDP-11/20 in 1970, the UNIX operating system was then officially named and could run on the PDP-11/20. The first real job from UNIX was in 1971, it was to support word processing for the patent department at Bell Labs. + +### The C revolution on UNIX systems ### + +Dennis Richie invented a higher level programming language called “**C**” in **1972**, later he decided with Ken Thompson to rewrite the UNIX in “C” to give the system more portability options. They wrote and debugged almost 100,000 code lines that year. The migration to the “C” language resulted in highly portable software that require only a relatively small machine-dependent code to be then replaced when porting UNIX to another computing platform. + +The UNIX was first formally presented to the outside world in 1973 on Operating Systems Principles, where Dennis Ritchie and Ken Thompson delivered a paper, then AT&T released Version 5 of the UNIX system and licensed it to the educational institutions, and then in 1975 they licensed Version 6 of UNIX to companies for the first time with a cost **$20.000**. The most widely used version of UNIX was Version 7 in 1980 where anybody could purchase a license but it was very restrictive terms in this license. The license included the source code, the machine dependents kernel which was written in PDP-11 assembly language. At all, versions of UNIX systems were determined by its user manuals editions. + +### The AIX System ### + +In **1983**, **Microsoft** had a plan to make a **Xenix** MS-DOS’s multiuser successor, and they created Xenix-based Altos 586 with **512 KB** RAM and **10 MB** hard drive by this year with cost $8,000. By 1984, 100,000 UNIX installations around the world for the System V Release 2. In 1986, 4.3BSD was released that included internet name server and the **AIX system** was announced by **IBM** with Installation base over 250,000. AIX is based on Unix System V, this system has BSD roots and is a hybrid of both. + +AIX was the first operating system that introduced a **journaled file system (JFS)** and an integrated Logical Volume Manager (LVM). IBM ported AIX to its RS/6000 platform by 1989. The Version 5L was a breakthrough release that was introduced in 2001 to provide Linux affinity and logical partitioning with the Power4 servers. + +AIX introduced virtualization by 2004 in AIX 5.3 with Advanced Power Virtualization (APV) which offered Symmetric multi-threading, micro-partitioning, and shared processor pools. + +In 2007, IBM started to enhance its virtualization product, by coinciding with the AIX 6.1 release and the architecture of Power6. They also rebranded Advanced Power Virtualization to PowerVM. + +The enhancements included form of workload partitioning that was called WPARs, that are similar to Solaris zones/Containers, but with much better functionality. + +### The HP-UX System ### + +The **Hewlett-Packard’s UNIX (HP-UX)** was based originally on System V release 3. The system initially ran exclusively on the PA-RISC HP 9000 platform. The Version 1 of HP-UX was released in 1984. + +The Version 9, introduced SAM, its character-based graphical user interface (GUI), from which one can administrate the system. The Version 10, was introduced in 1995, and brought some changes in the layout of the system file and directory structure, which made it similar to AT&T SVR4. + +The Version 11 was introduced in 1997. It was HP’s first release to support 64-bit addressing. But in 2000, this release was rebranded to 11i, as HP introduced operating environments and bundled groups of layered applications for specific Information Technology purposes. + +In 2001, The Version 11.20 was introduced with support for Itanium systems. The HP-UX was the first UNIX that used ACLs (Access Control Lists) for file permissions and it was also one of the first that introduced built-in support for Logical Volume Manager. + +Nowadays, HP-UX uses Veritas as primary file system due to partnership between Veritas and HP. + +The HP-UX is up to release 11iv3, update 4. + +### The Solaris System ### + +The Sun’s UNIX version, **Solaris**, was the successor of **SunOS**, which was founded in 1992. SunOS was originally based on the BSD (Berkeley Software Distribution) flavor of UNIX but SunOS versions 5.0 and later were based on Unix System V Release 4 which was rebranded as Solaris. + +SunOS version 1.0 was introduced with support for Sun-1 and Sun-2 systems in 1983. Version 2.0 was introduced later in 1985. In 1987, Sun and AT&T announced that they would collaborate on a project to merge System V and BSD into only one release, based on SVR4. + +The Solaris 2.4 was first Sparc/x86 release by Sun. The last release of the SunOS was version 4.1.4 announced in November 1994. The Solaris 7 was the first 64-bit Ultra Sparc release and it added native support for file system metadata logging. + +Solaris 9 was introduced in 2002, with support for Linux capabilities and Solaris Volume Manager. Then, Solaris 10 was introduced in 2005, and has number of innovations, such as support for its Solaris Containers, new ZFS file system, and Logical Domains. + +The Solaris system is presently up to version 10 as the latest update was released in 2008. + +### Linux ### + +By 1991 there were growing requirements for a free commercial alternative. Therefore **Linus Torvalds** set out to create new free operating system kernel that eventually became **Linux**. Linux started with a small number of “C” files and under a license which prohibited commercial distribution. Linux is a UNIX-like system and is different than UNIX. + +Version 3.18 was introduced in 2015 under a GNU Public License. IBM said that more than 18 million lines of code are Open Source and available to developers. + +The GNU Public License becomes the most widely available free software license which you can find nowadays. In accordance with the Open Source principles, this license permits individuals and organizations the freedom to distribute, run, share by copying, study, and also modify the code of the software. + +### UNIX vs. Linux: Technical Overview ### + +- Linux can encourage more diversity, and Linux developers come from wider range of backgrounds with different experiences and opinions. +- Linux can run on wider range of platforms and also types of architecture than UNIX. +- Developers of UNIX commercial editions have a specific target platform and audience in mind for their operating system. +- **Linux is more secure than UNIX** as it is less affected by virus threats or malware attacks. Linux has had about 60-100 viruses to date, but at the same time none of them are currently spreading. On the other hand, UNIX has had 85-120 viruses but some of them are still spreading. +- With commands of UNIX, tools and elements are rarely changed, and even some interfaces and command lines arguments still remain in later versions of UNIX. +- Some Linux development projects get funded on a voluntary basis such as Debian. The other projects maintain a community version of commercial Linux distributions such as SUSE with openSUSE and Red Hat with Fedora. +- Traditional UNIX is about scale up, but on the other hand Linux is about scale out. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/brief-history-aix-hp-ux-solaris-bsd-linux/ + +作者:[M.el Khamlichi][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/pirat9/ +[1]:http://www.unixmen.com/ken-thompson-unix-systems-father/ +[2]:http://www.unixmen.com/dennis-m-ritchie-father-c-programming-language/ \ No newline at end of file From 228f7edab1e9eda0183ce80ec8cf9f215049452b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 12 Oct 2015 14:41:44 +0800 Subject: [PATCH 2243/2517] =?UTF-8?q?20151012-1=20=E9=80=89=E9=A2=98?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=B8=80=E4=B8=AA=E5=9B=BE=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...1012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md b/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md index 0832929789..f45f901b3d 100644 --- a/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md +++ b/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md @@ -1,5 +1,7 @@ The Brief History Of Aix, HP-UX, Solaris, BSD, And LINUX ================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/05/linux-712x445.png) + Always remember that when doors close on you, other doors open. [Ken Thompson][1] and [Dennis Richie][2] are a great example for such saying. They were two of the best information technology specialists in the **20th** century as they created the **UNIX** system which is considered one the most influential and inspirational software that ever written. ### The UNIX systems beginning at Bell Labs ### From b9aa6be17cb07db9c84e7d2b6498d41c2e5423a9 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 12 Oct 2015 15:21:40 +0800 Subject: [PATCH 2244/2517] =?UTF-8?q?20151012-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...51012 What is a good IDE for R on Linux.md | 61 ++++ ...012 10 Useful Utilities For Linux Users.md | 263 ++++++++++++++++++ ...012 How To Use iPhone In Antergos Linux.md | 81 ++++++ ... device permission permanently on Linux.md | 53 ++++ ... about built-in kernel modules on Linux.md | 53 ++++ ...sword change at the next login on Linux.md | 54 ++++ 6 files changed, 565 insertions(+) create mode 100644 sources/share/20151012 What is a good IDE for R on Linux.md create mode 100644 sources/tech/20151012 10 Useful Utilities For Linux Users.md create mode 100644 sources/tech/20151012 How To Use iPhone In Antergos Linux.md create mode 100644 sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md create mode 100644 sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md create mode 100644 sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md diff --git a/sources/share/20151012 What is a good IDE for R on Linux.md b/sources/share/20151012 What is a good IDE for R on Linux.md new file mode 100644 index 0000000000..fa0af9f921 --- /dev/null +++ b/sources/share/20151012 What is a good IDE for R on Linux.md @@ -0,0 +1,61 @@ +What is a good IDE for R on Linux +================================================================================ +Some time ago, I covered some of the [best IDEs for C/C++][1] on Linux. Obviously C and C++ are not the only programming languages out there, and it is time to turn to something a bit more specific. + +If you have ever done some statistics, it is possible that you have encountered the [language R][2]. If you have not, I really recommend this open source programming language which is tailored for statistics and data mining. Coming from a coding background, you might be thrown off a bit by the syntax, but hopefully you will get seduced by the speed of its vector operations. In short, try it. And to do so, what better way to start with an IDE? R being a cross platform language, there are a bunch of good IDEs which make data analysis in R far more pleasurable. If you are very attached to a particular editor, there are also some very good plugins to turn that editor into a fully-fledged R IDE. + +Here is a list of five good IDEs for R language in Linux environment. + +### 1. RStudio ### + +![](https://c1.staticflickr.com/1/603/22093054381_431383ab60_c.jpg) + +Let’s start hard with maybe one of the most popular R IDEs out there: [RStudio][3]. In addition to common IDE features like syntax highlighting and code completion, RStudio stands out for its integration of R documentation, its powerful debugger and its multiple views system. If you start with R, I can only recommend RStudio as the R console on the side is perfect for testing your code in real time, and the object explorer will help you understand what kind of data you are dealing with. Finally, what really conquered me was the integration of the plots visualiser, making it easy to export your graphs as images. On the downside, RStudio lacks the shortcuts and the advanced settings to make it a perfect IDE. Still, with a free version under AGPL license, Linux users have no excuses not to give this IDE a try. + +### 2. Emacs with ESS ### + +![](https://c2.staticflickr.com/6/5824/22056857776_a14a4e7e1b_c.jpg) + +In my last post about IDEs, some people were disappointed by the absence of Emacs in my list. My main reason for that is that Emacs is kind of the wild card of IDE: you could place it on any list for any languages. But things are different for [R with the ESS plugin][4]. Emacs Speaks Statistics (ESS) is an amazing plugin which completely changes the way you use the Emacs editor and really fits the needs of R coders. A bit like RStudio which has multiple views, Emacs with ESS displays presents two panels: one with the code and one with an R console, making it easy to test your code in real time and explore the objects. But ESS's real strength is its seamless integration with other Emacs plugins you might have installed and its advanced configuration options. In short, if you like your Emacs shortcuts, you will like to be able to use them in an environment that makes sense for R development. For full disclosure, however, I have heard of and experienced some efficiency issues when dealing with a lot of data in ESS. Nothing too major to be a problem, but just enough have me prefer RStudio. + +### 3. Vim with Vim-R-plugin ### + +![](https://c1.staticflickr.com/1/680/22056923916_abe3531bb4_b.jpg) + +Because I do not want to discriminate after talking about Emacs, I also tried the equivalent for Vim: the [Vim-R-plugin][5]. Using the terminal tool called tmux, this plugin makes it possible to have an R console open and code at the same time. But most importantly, it brings syntax highlighting and omni-completion for R objects to Vim. You can also easily access R documentation and browse objects. But once again, the strength comes from its extensive customization capacities and the speed of Vim. If you are tempted by this option, I direct you to the extremely thorough [documentation][6] on installing and setting up your environment. + +### 4. Gedit with RGedit ### + +![](https://c1.staticflickr.com/1/761/22056923956_1413f60b42_c.jpg) + +If neither Emacs or Vim is your cup of tea, and what you like is your default Gnome editor, then [RGedit][7] is made for you: a plugin to code in R from Gedit. Gedit is known to be more powerful than what it looks. With a very large library of plugins, it is possible to do a lot with it. And RGedit is precisely the plugin you need to code in R from Gedit. It comes with the classic syntax highlighting and integration of the R console at the bottom of the screen, but also a bunch of unique features like multiple profiles, code folding, file explorer, and even a GUI wizard to generate code from snippets. Despite my indifference towards Gedit, I have to admit that these features go beyond the basic plugin functionality and really make a difference when you spend a lot of time analyzing data. The only shadow is that the last update is from 2013. I really hope that this project can pick up again. + +### 5. RKWard ### + +![](https://c2.staticflickr.com/6/5643/21896132829_2ea8f3a320_c.jpg) + +Finally, last but not least, [RKWard][8] is an R IDE made for KDE environments. What I love the most about it is its name. But honestly, its package management system and spreadsheet-like data editor come in close second. In addition to that, it includes an easy system for plotting and importing data, and can be extended by plugins. If you are not a fan of the KDE feel, you might be a bit uncomfortable, but if you are, I would really recommend checking it out. + +To conclude, whether you are new to R or not, these IDEs might be useful to you. It does not matter if you prefer something that stands for itself, or a plugin for your favorite editor, I am sure that you will appreciate one of the features these software provide. I am also sure I missed a lot of good IDEs for R, which deserve to be on this list. So since you wrote a lot of very good comments for the post on the IDEs for C/C++, I invite you to do the same here and share your knowledge. + +What do you feel is a good IDE for R on Linux? Please let us know in the comments. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/good-ide-for-r-on-linux.html + +作者:[Adrien Brochard][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/adrien +[1]:http://xmodulo.com/good-ide-for-c-cpp-linux.html +[2]:https://www.r-project.org/ +[3]:https://www.rstudio.com/ +[4]:http://ess.r-project.org/ +[5]:http://www.vim.org/scripts/script.php?script_id=2628 +[6]:http://www.lepem.ufc.br/jaa/r-plugin.html +[7]:http://rgedit.sourceforge.net/ +[8]:https://rkward.kde.org/ \ No newline at end of file diff --git a/sources/tech/20151012 10 Useful Utilities For Linux Users.md b/sources/tech/20151012 10 Useful Utilities For Linux Users.md new file mode 100644 index 0000000000..b39679a9fc --- /dev/null +++ b/sources/tech/20151012 10 Useful Utilities For Linux Users.md @@ -0,0 +1,263 @@ +10 Useful Utilities For Linux Users +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2014/09/linux-656x445.png) + +### Introduction ### + +In this tutorial, I have collected 10 useful utility tools for Linux users which will include various network monitoring, system auditing or some another random commands which can help users to enhance their productivity. I hope you will enjoy them. + +#### 1. w #### + +Display who is logged into the system and what process executed by them. + + $w + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_023.png) + +for help + + $w -h + +for current user + + $w + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_024.png) + +#### 2. nmon #### + +Nmon or nigel’s monitor is a tool which displays performance information of the system. + + $ sudo apt-get install nmon + +---------- + + $ nmon + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_001.png) + +nmon can dump information related to netwrok, cpu, memory or disk uses. + +**nmon cpu info (press c)** + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_002.png) + +**nmon network info (press n)** + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_003.png) + +**nman disk info (press d)** + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_004.png) + +#### 3. ncdu #### + +A Command utility is a cursor based version of ‘du’, this command is used to analyze disk space occupied by various directories. + + $apt-get install ncdu + +---------- + + $ncdu / + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_006.png) + +Final output: + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_007.png) + +Press n to order by name or press s to order by file size(default). + +#### 4. slurm #### + +A command line utility used for command based network interface bandwidth monitoring, it will display ascii based graphic. + + $ apt-get install slurm + +Examples: + + $ slurm -i + +---------- + + $ slurm -i eth1 + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0091.png) + +**options** + +- Press **l** to display lx/tx led. +- press **c** to switch to classic mode. +- press **r** to refresh screen. +- press **q** to quit. + +#### 5.findmnt #### + +Findmnt command is used to find mount file systems. It is used to list mount devices and can alos mount or unmount devices as and when required, it comes as a part of util-linux. + +Examples: + + $findmnt + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0101.png) + +To get output in list format. + + $ findmnt -l + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0111.png) + +List file systems mounted in fstab. + + $ findmnt -s + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0122.png) + +List mounted files systems by file type + + $ findmnt -t ext4 + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0131.png) + +#### 6. dstat #### + +A combined and flexible tool which can be used to monitor memory, process, network or disk space performance, it is a good replacement of ifstat, iostat, dmstat etc. + + $apt-get install dstat + +Examples: + +A detailed info about cpu, hard disk and network. + + $ dstat + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0141.png) + +- **-c** cpu + + $ dstat -c + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0151.png) + +Some more detailed information about cpu + + $ dstat -cdl -D sda1 + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_017.png) + +- **-d** disk + + $ dstat -d + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0161.png) + +#### 7. saidar #### + +Another cli based system statistics monitoring tool, provide information about disk uses, network, memory, swap etc. + + $ sudo apt-get install saidar + +Examples: + + $ saidar + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0181.png) + +Enable colored output + + $ saider -c + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0191.png) + +#### 8. ss #### + +ss or socket statistics is a good alternative to netstat it directory gather information from kernel space nad play fast in comparision to the netstat utility. + +Examples: + +List all connections + + $ ss |less + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0201.png) + +Greb only tcp traffic + + $ ss -A tcp + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0211.png) + +Grab process name and pid + + $ ss -ltp + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0221.png) + +#### 9. ccze #### + +A tool that decorate your logs :). + + $ apt-get install ccze + +Examples: + + $ tailf /var/log/syslog | ccze + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0231.png) + +List ccze modules: + + $ ccze -l + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0241.png) + +Save log as html. + + tailf /var/log/syslog | ccze -h > /home/tux/Desktop/rajneesh.html + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_025.png) + +#### 10. ranwhen.py #### + +A python based terminal utility that can be used to display system activities graphically. Details are presented in a very colorful histogram. + +Install python: + + $ sudo apt-add-repository ppa:fkrull/deadsnakes + +Update system: + + $ sudo apt-get update + +Download python: + + $ sudo apt-get install python3.2 + +- [Download ranwhen.py][1] + + $ unzip ranwhen-master.zip && cd ranwhen-master + +Run the tool. + + $ python3.2 ranwhen.py + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_026.png) + +### Conclusion ### + +These are the less popular, yet important Linux administration tools. They can help user in their day to day activities. In our upcoming articles, we will try to bring some more Admin/user tools. + +Have fun! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/10-useful-utilities-linux-users/ + +作者:[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/ +[1]:https://github.com/p-e-w/ranwhen/archive/master.zip \ No newline at end of file diff --git a/sources/tech/20151012 How To Use iPhone In Antergos Linux.md b/sources/tech/20151012 How To Use iPhone In Antergos Linux.md new file mode 100644 index 0000000000..0186a214d4 --- /dev/null +++ b/sources/tech/20151012 How To Use iPhone In Antergos Linux.md @@ -0,0 +1,81 @@ +How To Use iPhone In Antergos Linux +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/iPhone-Antergos-Arch-Linux.jpg) + +Troubles with iPhone and Arch Linux? iPhone and Linux never really go along very well. In this tutorial, I am going to show you how can you use iPhone in Antergos Linux. Since Antergos is based on Arch Linux, the same steps should be applicable to other Arch based Linux distros such as Manjaro Linux. + +So, recently I bought me a brand new iPhone 6S and when I connected it to Antergos Linux to copy some pictures, it was not detected at all. I could see that iPhone was being charged and I had allowed iPhone to ‘trust the computer’ but there was nothing at all detected. I tried to run dmseg but there was no trace of iPhone or Apple there. What is funny that [libimobiledevice][1] was installed as well, which always fixes [iPhone mount issue in Ubuntu][2]. + +I am going to show you how I am using iPhone 6S, running on iOS 9 in Antergos. It goes more in command line way, but I presume since you are in Arch Linux zone, you are not scared of terminal (and you should not be as well). + +### Mount iPhone in Arch Linux ### + +**Step 1**: Unplug your iPhone, if it is already plugged in. + +**Step 2**: Now, open a terminal and use the following command to install some necessary packages. Don’t worry if they are already installed. + + sudo pacman -Sy ifuse usbmuxd libplist libimobiledevice + +**Step 3**: Once these programs and libraries are installed, reboot your system. + + sudo reboot + +**Step 4**: Make a directory where you want the iPhone to be mounted. I would suggest making a directory named iPhone in your home directory. + + mkdir ~/iPhone + +**Step 5**: Unlock your phone and plug it in. If asked to trust the computer, allow it. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/iPhone-mount-Antergos-Linux-2.jpeg) + +**Step 6**: Verify that iPhone is recognized by the system this time. + + dmesg | grep -i iphone + +This should show you some result with iPhone and Apple in it. Something like this: + + [ 31.003392] ipheth 2-1:4.2: Apple iPhone USB Ethernet device attached + [ 40.950883] ipheth 2-1:4.2: Apple iPhone USB Ethernet now disconnected + [ 47.471897] ipheth 2-1:4.2: Apple iPhone USB Ethernet device attached + [ 82.967116] ipheth 2-1:4.2: Apple iPhone USB Ethernet now disconnected + [ 106.735932] ipheth 2-1:4.2: Apple iPhone USB Ethernet device attached + +This means that iPhone has been successfully recognized by Antergos/Arch Linux. + +**Step 7**: When everything is set, it’s time to mount the iPhone. Use the command below: + + ifuse ~/iPhone + +Since we created the mount directory in home, it won’t need root access and you should also be able to see it easily in your home directory. If the command is successful, you won’t see any output. + +Go back to Files and see if the iPhone is recognized or not. For me, it looks like this in Antergos: + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/iPhone-mount-Antergos-Linux.jpeg) + +You can access the files in this directory. Copy files from it or to it. + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/iPhone-mount-Antergos-Linux-1.jpeg) + +**Step 8**: When you want to unmount it, you should use this command: + + sudo umount ~/iPhone + +### Worked for you? ### + +I know that it is not very convenient and ideally, iPhone should be recognized as any other USB storage device but things don’t always behave as they are expected to. Good thing is that a little DIY hack can always fix the issue and it gives a sense of achievement (at least to me). That being said, I must say Antergos should work to fix this issue so that iPhone can be mounted by default. + +Did this trick work for you? If you have questions or suggestions, feel free to drop a comment. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/iphone-antergos-linux/ + +作者:[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://www.libimobiledevice.org/ +[2]:http://itsfoss.com/mount-iphone-ipad-ios-7-ubuntu-13-10/ \ No newline at end of file diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md b/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md new file mode 100644 index 0000000000..8af62bfd75 --- /dev/null +++ b/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md @@ -0,0 +1,53 @@ +Linux FAQs with Answers--How to change USB device permission permanently on Linux +================================================================================ +> **Question**: I am trying to run gpsd on my Linux with a USB GPS receiver. However, I am getting the following errors from gpsd. +> +> gpsd[377]: gpsd:ERROR: read-only device open failed: Permission denied +> gpsd[377]: gpsd:ERROR: /dev/ttyUSB0: device activation failed. +> gpsd[377]: gpsd:ERROR: device open failed: Permission denied - retrying read-only +> +> Looks like gpsd does not have permission to access the USB device (/dev/ttyUSB0). How can I change its default permission mode permanently on Linux? + +When you run a process that wants to read or write to a USB device, the user/group of the process must have appropriate permission to do so. Of course you can change the permission of your USB device manually with chmod command, but such manual permission change will be temporary. The USB device will revert to its default permission mode when you reboot your Linux machine. + +![](https://farm6.staticflickr.com/5741/20848677843_202ff53303_c.jpg) + +As a permanent solution, you can create a udev-based USB permission rule which assigns any custom permission mode of your choice. Here is how to do it. + +First, you need to identify the vendorID and productID of your USB device. For that, use lsusb command. + + $ lsusb -vvv + +![](https://farm1.staticflickr.com/731/20848677743_39f76eb403_c.jpg) + +From the lsusb output, find your USB device's entry, and look for "idVendor" and "idProduct" fields. In this example, we have idVendor (0x067b) and idProduct (0x2303). + +Next, create a new udev rule as follows. + + $ sudo vi /etc/udev/rules.d/50-myusb.rules + +---------- + + SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GROUP="users", MODE="0666" + +Replace "idVendor" and "idProduct" values with your own. **MODE="0666"** indicates the preferred permission of the USB device. + +Now reboot your machine or reload udev rules: + + $ sudo udevadm control --reload + +Then verify the permission of the USB device. + +![](https://farm1.staticflickr.com/744/21282872179_9a4a05d768_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/change-usb-device-permission-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://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md b/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md new file mode 100644 index 0000000000..b7a5be3975 --- /dev/null +++ b/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md @@ -0,0 +1,53 @@ +Linux FAQs with Answers--How to find information about built-in kernel modules on Linux +================================================================================ +> **Question**: I would like to know what modules are built into the kernel of my Linux system, and what parameters are available in each module. Is there a way to get a list of all built-in kernel modules and device drivers, and find detailed information about them? + +The modern Linux kernel has been growing significantly over the years to support a wide variety of hardware devices, file systems and networking functions. During this time, "loadable kernel modules (LKM)" came into being in order to keep the kernel from getting bloated, while flexibly extending its capabilities and hardware support under different environments, without having to rebuild it. + +The Linux kernel shipped with the latest Linux distributions comes with relatively a small number of "built-in modules", while the rest of hardware-specific drivers or custom capabilities exist as "loadable modules" which you can selectively load or unload. + +The built-in modules are statically compiled into the kernel. Unlike loadable kernel modules which can be dynamically loaded, unloaded, looked up or listed using commands like modprobe, insmod, rmmod, modinfo or lsmod, built-in kernel modules are always loaded in the kernel upon boot-up, and cannot be managed with these commands. + +### Find a List of Built-in Kernel Modules ### + +To get a list of all built-in modules, run the following command. + + $ cat /lib/modules/$(uname -r)/modules.builtin + +![](https://farm1.staticflickr.com/697/21481933835_ef6b9c71e1_c.jpg) + +You can also get a hint on what modules are built-in by running: + +![](https://farm6.staticflickr.com/5643/21295025949_57f5849c36_c.jpg) + +### Find Parameters of Built-in Kernel Modules ### + +Each kernel module, whether it's built-in or loadable, comes with a set of parameters. For loadable kernel modules, the modinfo command will show parameter information about them. However, this command will not work with built-in modules. You will simply get the following error. + + modinfo: ERROR: Module XXXXXX not found. + +If you want to check what parameters are available in a given built-in module, and what their values are, you can instead examine the content in **/sys/module** directory. + +Under /sys/module directory, you will find sub-directories named after existing kernel modules (both built-in and loadable). Then in each module directory, there is a directory named "parameters", which lists all available parameters for the module. + +For example, let's say you want to find out parameters of a built-in module called tcp_cubic (the default TCP implementation of the kernel). Then you can do this: + + $ ls /sys/module/tcp_cubic/parameters + +And check the value of each parameter by reading a corresponding file. + + $ cat /sys/module/tcp_cubic/parameters/tcp_friendliness + +![](https://farm6.staticflickr.com/5639/21293886250_a199b9c8f7_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/find-information-builtin-kernel-modules-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://ask.xmodulo.com/author/nanni \ No newline at end of file diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md b/sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md new file mode 100644 index 0000000000..aadd2d1e81 --- /dev/null +++ b/sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md @@ -0,0 +1,54 @@ +Linux FAQs with Answers--How to force password change at the next login on Linux +================================================================================ +> **Question**: I manage a Linux server for multiple users to share. I have just created a new user account with some default password, and I want the user to change the default password immediately after the first login. Is there a way to force a user to change his/her password at the next login? + +In multi-user Linux environment, it's a standard practice to create user accounts with some random default password. Then after a successful login, a new user can change the default password to his or her own. For security reasons, it is often recommended to "force" users to change the default password after the first login to make sure that the initial one-time password is no longer used. + +Here is **how to force a user to change his or her password on the next login**. + +Every user account in Linux is associated with various password-related configurations and information. For example, it remembers the date of the last password change, the minimum/maximum number of days between password changes, and when to expire the current password, etc. + +A command-line tool called chage can access and adjust password expiration related configurations. You can use this tool to force password change of any user at the next login. + +To view password expiration information of a particular user (e.g., alice), run the following command. Note that you need root privilege only when you are checking password age information of any other user than yourself. + + $ sudo chage -l alice + +![](https://c1.staticflickr.com/1/727/21955581605_5471e61ee0_c.jpg) + +### Force Password Change for a User ### + +If you want to force a user to change his or her password, use the following command. + + $ sudo chage -d0 + +Originally the "-d " option is supposed to set the "age" of a password (in terms of the number of days since January 1st, 1970 when the password was last changed). So "-d0" indicates that the password was changed on January 1st, 1970, which essentially expires the current password, and causes it to be changed on the next login. + +Another way to expire the current password is via passwd command. + + $ sudo passwd -e + +The above command has the same effect of "chage -d0", making the current password of the user expire immediately. + +Now check the password information of the user again, and you will see: + +![](https://c2.staticflickr.com/6/5770/21767501480_ba88f00d80_c.jpg) + +When you log in again, you will be asked to change the password. You will need to verify the current password one more time before the change. + +![](https://c2.staticflickr.com/6/5835/21929638636_eed4d69cb9_c.jpg) + +To set more comprehensive password policies (e.g., password complexity, reuse prevention), you can use PAM. See [the article][1] for more detail. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/force-password-change-next-login-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://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/set-password-policy-linux.html \ No newline at end of file From 097f331da2b62d82e480f22c7123f02e2463cfce Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 12 Oct 2015 15:35:59 +0800 Subject: [PATCH 2245/2517] =?UTF-8?q?20151012-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ices from Ubuntu Command Line Using Mop.md | 90 +++++++++++++++++++ ...ber sed and awk All Linux admins should.md | 60 +++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md create mode 100644 sources/tech/20151012 Remember sed and awk All Linux admins should.md diff --git a/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md b/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md new file mode 100644 index 0000000000..b23e772ca3 --- /dev/null +++ b/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md @@ -0,0 +1,90 @@ +How to Monitor Stock Prices from Ubuntu Command Line Using Mop +================================================================================ +Having a side income is always good, especially when you can easily manage the work along with your full time job. If your regular work involves working on an Internet-connected computer, trading stocks is a popular option to earn a few extra bucks. + +While there are quite a few stock-monitoring applications available for Linux, most of them are GUI-based. What if you’re a Linux professional who spends a lot (or all) of your time working on machines that do not have any GUI installed? Are you out of luck? Well, no, there are some command line stock-tracking tools, including Mop, which we’ll be discussing in this article. + +### Mop ### + +Mop, as already mentioned in the introduction above, is a command line tool that displays continuous and updated information about the US stock markets and individual stocks. Implemented in the GO programming language, the project is the brain child of Michael Dvorkin. + +### Download and Install ### + +Since the project is implemented in GO, before installing the tool, you’ll first have to make sure that the programming language is installed on your machine. Following are the steps required to install GO on a Debian-based system like Ubuntu: + + sudo apt-get install golang + mkdir ~/workspace + echo 'export GOPATH="$HOME/workspace"' >> ~/.bashrc + source ~/.bashrc + +Once GO is installed, the next step is to install the Mop tool and set the environment, something which you can do by running the following commands: + + sudo apt-get install git + go get github.com/michaeldv/mop + cd $GOPATH/src/github.com/michaeldv/mop + make install + export PATH="$PATH:$GOPATH/bin" + +Once done, just run the following command to execute Mop: + + cmd + +### Features ### + +When you run the Mop command for the first time, you’ll see an output similar to the following. + +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-first-run.jpg) + +As you can see in the image above, the output – which auto-refreshes frequently – contains information related to various popular stock exchanges around the world as well as individual stocks. + +### Add/remove stocks ### + +Mop allows you to easily add/remove individual stocks to and from the output list. To add a stock, all you have to do is to press “+” and mention the stock listing name when prompted. For example, the following screenshot was taken while adding Facebook (FB) to the list. + +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-add-stock.png) + +As I pressed the “+” key, a row containing text “Add tickers:” appeared, prompting me to add the stock listing name – I added FB for Facebook and pressed Enter. The output refreshed, and the new stock was added to the list: + +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-stock-added.png) + +Similarly, you can delete a stock listing by pressing “-” and mentioning its name. + +#### Group stocks based on value #### + +There is a way to group stocks based on whether their value is going up or down – all you have to do is to press the “g” key. Following this, the stocks which are advancing will be grouped together and shown in green, while those whose value is going down will be represented in black. + +Here is an example screenshot. + +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-group-stocks-profit-loss.png) + +#### Column sort #### + +Mop also allows you to change the sort order of individual columns. For this you first need to press “o” (this will select the first column by default), and then use the left and right arrow keys to select the column you want to sort. Once done, press enter to sort the column contents. + +For example, the following screenshot shows the output after the contents of the first column were sorted in descending alphabetical order. + +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-change-order.png) + +**Note**: to better understand, compare it with the previous screenshot. + +#### Other options #### + +Other available options include “p” for pausing market data and stock updates, “q” or “esc” for quitting the command line application, and “?” for displaying the help page. + +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-help.png) + +### Conclusion ### + +Mop is a basic stock monitoring tool that doesn’t offer a plethora of features, but does what it promises. It’s quite obvious that the tool is not for stock trading professionals but is still a decent choice if all you want to do is some basic stock tracking on a command line-only machine. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/monitor-stock-prices-ubuntu-command-line/ + +作者:[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/ \ No newline at end of file diff --git a/sources/tech/20151012 Remember sed and awk All Linux admins should.md b/sources/tech/20151012 Remember sed and awk All Linux admins should.md new file mode 100644 index 0000000000..f52f748859 --- /dev/null +++ b/sources/tech/20151012 Remember sed and awk All Linux admins should.md @@ -0,0 +1,60 @@ +Remember sed and awk? All Linux admins should +================================================================================ +![](http://images.techhive.com/images/article/2015/03/linux-100573790-primary.idge.jpg) + +Credit: Shutterstock + +**We aren’t doing the next generation of Linux and Unix admins any favors by forgetting init scripts and fundamental tools** + +I happened across a post on Reddit by chance, [asking about textfile manipulation][1]. It was a fairly simple request, similar to those that folks in Unix see nearly every day. In this case, it was how to remove all duplicate lines in a file, keeping one instance of each. This sounds relatively easy, but can get a bit complicated if the source file is sufficiently large and random. + +There are countless answers to this problem. You could write a script in nearly any language to do this, with varying levels of complexity and time investment, which I suspect is what most would do. It might take 20 or 60 minutes depending on skill level, but armed with Perl, Python, or Ruby, you could make quick work of it. + +Or you could use the answer stated in that thread, which warmed my heart: Just use awk. + +That answer is the most concise and simplest solution to the problem by far. It’s one line: + + awk '!seen[$0]++' . + +Let’s take a look at this. + +In this command, there’s a lot of hidden code. Awk is a text processing language, and as such it makes a lot of assumptions. For starters, what you see here is actually the meat of a for loop. Awk assumes you want to loop through every line of the input file, so you don’t need to explicitly state it. Awk also assumes you want to print the postprocessed output, so you don’t need to state that either. Finally, Awk then assumes the loop ends when the last statement finishes, so no need to state it. + +The string seen in this example is the name given to an associative array. $0 is a variable that represents the entirety of the current line of the file. Thus, this command translates to “Evaluate every line in this file, and if you haven’t seen this line before, print it.” Awk does this by adding $0 to the seen array if it doesn’t already exist and incrementing the value so that it will not match the pattern the next time around and, thus, not print. + +Some will see this as elegant, while others may see this as obfuscation. Anyone who uses awk on a daily basis will be in the first group. Awk is designed to do this. You can write multiline programs in awk. You can even write [disturbingly complex functions in awk][2]. But at the end of the day, awk is designed to do text processing, generally within a pipe. Eliminating the extraneous cruft of loop definition is simply a shortcut for a very common use case. If you like, you could write the same thing as the following: + + awk '{ if (!seen[$0]) print $0; seen[$0]++ }’ + +It would lead to the same result. + +Awk is the perfect tool for this job. Nevertheless, I believe many admins -- especially newer admins -- would jump into [Bash][3] or Python to try to accomplish this task, because knowledge of awk and what it can do seems to be fading as time goes on. I think it may be an indicator of things to come, where problems that have been solved for decades suddenly emerge again, based on lack of exposure to the previous solutions. + +The shell, grep, sed, and awk are fundaments of Unix computing. If you’re not completely comfortable with their use, you’re artificially hamstrung because they form the basis of interaction with Unix systems via the CLI and shell scripting. One of the best ways to learn how these tools work is by observing and working with live examples, which every Unix flavor has in spades with their init systems -- or had, in the case of Linux distros that have adopted [systemd][4]. + +Millions of Unix admins learned how shell scripting and Unix tools worked by reading, writing, modifying, and working with init scripts. Init scripts differ greatly from OS to OS, even from distribution to distribution in the case of Linux, but they are all rooted in sh, and they all use core CLI tools like sed, awk, and grep. + +I’ve heard many complaints that init scripts are “ancient” and “difficult,” but in fact, init scripts use the same tools that Unix admins work with every day, and thus provide an excellent way to become more familiar and comfortable with those tools. Saying that init scripts are hard to read or difficult to work with is to admit that you lack fundamental familiarity with the Unix toolset. + +Speaking of things found on Reddit, I also came across this question from a budding Linux sys admin, [asking whether he should bother to learn sysvinit][5]. Most of the answers in the thread are good -- yes, definitely learn sysvinit and systemd. One commenter even notes that init scripts are a great way to learn Bash, and another states that the Fortune 50 company he works for has no plans to move to a systemd-based release. + +But it concerns me that this is a question at all. If we continue down the path of eliminating scripts and roping off core system elements within our operating systems, we will inadvertently make it harder for new admins to learn the fundamental Unix toolset due to the lack of exposure. + +I’m not sure why some want to cover up Unix internals with abstraction after abstraction, but such a path may reduce a generation of Unix admins to hapless button pushers dependent on support contracts. I’m pretty sure that would not be a good development. + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2985804/linux/remember-sed-awk-linux-admins-should.html + +作者:[Paul Venezia][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Paul-Venezia/ +[1]:https://www.reddit.com/r/linuxadmin/comments/3lwyko/how_do_i_remove_every_occurence_of_duplicate_line/ +[2]:http://intro-to-awk.blogspot.com/2008/08/awk-more-complex-examples.html +[3]:http://www.infoworld.com/article/2613338/linux/linux-how-to-script-a-bash-crash-course.html +[4]:http://www.infoworld.com/article/2608798/data-center/systemd--harbinger-of-the-linux-apocalypse.html +[5]:https://www.reddit.com/r/linuxadmin/comments/3ltq2y/when_i_start_learning_about_linux_administration/ \ No newline at end of file From ee9e3e82c867fb401b25edb71fdd0758924d2566 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 12 Oct 2015 16:37:11 +0800 Subject: [PATCH 2246/2517] =?UTF-8?q?20151012-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...co Virtual Private Networking on Docker.md | 322 ++++++++++++++++++ ...up DockerUI--a Web Interface for Docker.md | 111 ++++++ ...etup Red Hat Ceph Storage on CentOS 7.0.md | 250 ++++++++++++++ 3 files changed, 683 insertions(+) create mode 100644 sources/tech/20151012 Getting Started to Calico Virtual Private Networking on Docker.md create mode 100644 sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md create mode 100644 sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md diff --git a/sources/tech/20151012 Getting Started to Calico Virtual Private Networking on Docker.md b/sources/tech/20151012 Getting Started to Calico Virtual Private Networking on Docker.md new file mode 100644 index 0000000000..27d60729e9 --- /dev/null +++ b/sources/tech/20151012 Getting Started to Calico Virtual Private Networking on Docker.md @@ -0,0 +1,322 @@ +Getting Started to Calico Virtual Private Networking on Docker +================================================================================ +Calico is a free and open source software for virtual networking in data centers. It is a pure Layer 3 approach to highly scalable datacenter for cloud virtual networking. It seamlessly integrates with cloud orchestration system such as openstack, docker clusters in order to enable secure IP communication between virtual machines and containers. It implements a highly productive vRouter in each node that takes advantage of the existing Linux kernel forwarding engine. Calico works in such an awesome technology that it has the ability to peer directly with the data center’s physical fabric whether L2 or L3, without the NAT, tunnels on/off ramps, or overlays. Calico makes full utilization of docker to run its containers in the nodes which makes it multi-platform and very easy to ship, pack and deploy. Calico has the following salient features out of the box. + +- It can scale tens of thousands of servers and millions of workloads. +- Calico is easy to deploy, operate and diagnose. +- It is open source software licensed under Apache License version 2 and uses open standards. +- It supports container, virtual machines and bare metal workloads. +- It supports both IPv4 and IPv6 internet protocols. +- It is designed internally to support rich, flexible and secure network policy. + +In this tutorial, we'll perform a virtual private networking between two nodes running Calico in them with Docker Technology. Here are some easy steps on how we can do that. + +### 1. Installing etcd ### + +To get started with the calico virtual private networking, we'll need to have a linux machine running etcd. As CoreOS comes preinstalled and preconfigured with etcd, we can use CoreOS but if we want to configure Calico in other linux distributions, then we'll need to setup it in our machine. As we are running Ubuntu 14.04 LTS, we'll need to first install and configure etcd in our machine. To install etcd in our Ubuntu box, we'll need to add the official ppa repository of Calico by running the following command in the machine which we want to run etcd server. Here, we'll be installing etcd in our 1st node. + + # apt-add-repository ppa:project-calico/icehouse + + The primary source of Ubuntu packages for Project Calico based on OpenStack Icehouse, an open source solution for virtual networking in cloud data centers. Find out more at http://www.projectcalico.org/ + More info: https://launchpad.net/~project-calico/+archive/ubuntu/icehouse + Press [ENTER] to continue or ctrl-c to cancel adding it + gpg: keyring `/tmp/tmpi9zcmls1/secring.gpg' created + gpg: keyring `/tmp/tmpi9zcmls1/pubring.gpg' created + gpg: requesting key 3D40A6A7 from hkp server keyserver.ubuntu.com + gpg: /tmp/tmpi9zcmls1/trustdb.gpg: trustdb created + gpg: key 3D40A6A7: public key "Launchpad PPA for Project Calico" imported + gpg: Total number processed: 1 + gpg: imported: 1 (RSA: 1) + OK + +Then, we'll need to edit /etc/apt/preferences and make changes to prefer Calico-provided packages for Nova and Neutron. + + # nano /etc/apt/preferences + +We'll need to add the following lines into it. + + Package: * + Pin: release o=LP-PPA-project-calico-* + Pin-Priority: 100 + +![Calico PPA Config](http://blog.linoxide.com/wp-content/uploads/2015/10/calico-ppa-config.png) + +Next, we'll also need to add the official BIRD PPA for Ubuntu 14.04 LTS so that bugs fixes are installed before its available on the Ubuntu repo. + + # add-apt-repository ppa:cz.nic-labs/bird + + The BIRD Internet Routing Daemon PPA (by upstream & .deb maintainer) + More info: https://launchpad.net/~cz.nic-labs/+archive/ubuntu/bird + Press [ENTER] to continue or ctrl-c to cancel adding it + gpg: keyring `/tmp/tmphxqr5hjf/secring.gpg' created + gpg: keyring `/tmp/tmphxqr5hjf/pubring.gpg' created + gpg: requesting key F9C59A45 from hkp server keyserver.ubuntu.com + apt-ggpg: /tmp/tmphxqr5hjf/trustdb.gpg: trustdb created + gpg: key F9C59A45: public key "Launchpad Datov� schr�nky" imported + gpg: Total number processed: 1 + gpg: imported: 1 (RSA: 1) + OK + +Now, after the PPA jobs are done, we'll now gonna update the local repository index and then install etcd in our machine. + + # apt-get update + +To install etcd in our ubuntu machine, we'll gonna run the following apt command. + + # apt-get install etcd python-etcd + +### 2. Starting Etcd ### + +After the installation is complete, we'll now configure the etcd configuration file. Here, we'll edit **/etc/init/etcd.conf** using a text editor and append the line exec **/usr/bin/etcd** and make it look like below configuration. + + # nano /etc/init/etcd.conf + exec /usr/bin/etcd --name="node1" \ + --advertise-client-urls="http://10.130.65.71:2379,http://10.130.65.71:4001" \ + --listen-client-urls="http://0.0.0.0:2379,http://0.0.0.0:4001" \ + --listen-peer-urls "http://0.0.0.0:2380" \ + --initial-advertise-peer-urls "http://10.130.65.71:2380" \ + --initial-cluster-token $(uuidgen) \ + --initial-cluster "node1=http://10.130.65.71:2380" \ + --initial-cluster-state "new" + +![Configuring ETCD](http://blog.linoxide.com/wp-content/uploads/2015/10/configuring-etcd.png) + +**Note**: In the above configuration, we'll need to replace 10.130.65.71 and node-1 with the private ip address and hostname of your etcd server box. After done with editing, we'll need to save and exit the file. + +We can get the private ip address of our etcd server by running the following command. + + # ifconfig + +![ifconfig](http://blog.linoxide.com/wp-content/uploads/2015/10/ifconfig1.png) + +As our etcd configuration is done, we'll now gonna start our etcd service in our Ubuntu node. To start etcd daemon, we'll gonna run the following command. + + # service etcd start + +After done, we'll have a check if etcd is really running or not. To ensure that, we'll need to run the following command. + + # service etcd status + +### 3. Installing Docker ### + +Next, we'll gonna install Docker in both of our nodes running Ubuntu. To install the latest release of docker, we'll simply need to run the following command. + + # curl -sSL https://get.docker.com/ | sh + +![Docker Engine Installation](http://blog.linoxide.com/wp-content/uploads/2015/10/docker-engine-installation.png) + +After the installation is completed, we'll gonna start the docker daemon in-order to make sure that its running before we move towards Calico. + + # service docker restart + + docker stop/waiting + docker start/running, process 3056 + +### 3. Installing Calico ### + +We'll now install calico in our linux machine in-order to run the calico containers. We'll need to install Calico in every node which we're wanting to connect into the Calico network. To install Calico, we'll need to run the following command under root or sudo permission. + +#### On 1st Node #### + + # wget https://github.com/projectcalico/calico-docker/releases/download/v0.6.0/calicoctl + + --2015-09-28 12:08:59-- https://github.com/projectcalico/calico-docker/releases/download/v0.6.0/calicoctl + Resolving github.com (github.com)... 192.30.252.129 + Connecting to github.com (github.com)|192.30.252.129|:443... connected. + ... + Resolving github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)... 54.231.9.9 + Connecting to github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)|54.231.9.9|:443... connected. + HTTP request sent, awaiting response... 200 OK + Length: 6166661 (5.9M) [application/octet-stream] + Saving to: 'calicoctl' + 100%[=========================================>] 6,166,661 1.47MB/s in 6.7s + 2015-09-28 12:09:08 (898 KB/s) - 'calicoctl' saved [6166661/6166661] + + # chmod +x calicoctl + +After done with making it executable, we'll gonna make the binary calicoctl available as the command in any directory. To do so, we'll need to run the following command. + + # mv calicoctl /usr/bin/ + +#### On 2nd Node #### + + # wget https://github.com/projectcalico/calico-docker/releases/download/v0.6.0/calicoctl + + --2015-09-28 12:09:03-- https://github.com/projectcalico/calico-docker/releases/download/v0.6.0/calicoctl + Resolving github.com (github.com)... 192.30.252.131 + Connecting to github.com (github.com)|192.30.252.131|:443... connected. + ... + Resolving github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)... 54.231.8.113 + Connecting to github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)|54.231.8.113|:443... connected. + HTTP request sent, awaiting response... 200 OK + Length: 6166661 (5.9M) [application/octet-stream] + Saving to: 'calicoctl' + 100%[=========================================>] 6,166,661 1.47MB/s in 5.9s + 2015-09-28 12:09:11 (1022 KB/s) - 'calicoctl' saved [6166661/6166661] + + # chmod +x calicoctl + +After done with making it executable, we'll gonna make the binary calicoctl available as the command in any directory. To do so, we'll need to run the following command. + + # mv calicoctl /usr/bin/ + +Likewise, we'll need to execute the above commands to install in every other nodes. + +### 4. Starting Calico services ### + +After we have installed calico on each of our nodes, we'll gonna start our Calico services. To start the calico services, we'll need to run the following commands. + +#### On 1st Node #### + + # calicoctl node + + WARNING: Unable to detect the xt_set module. Load with `modprobe xt_set` + WARNING: Unable to detect the ipip module. Load with `modprobe ipip` + No IP provided. Using detected IP: 10.130.61.244 + Pulling Docker image calico/node:v0.6.0 + Calico node is running with id: fa0ca1f26683563fa71d2ccc81d62706e02fac4bbb08f562d45009c720c24a43 + +#### On 2nd Node #### + +Next, we'll gonna export a global variable in order to connect our calico nodes to the same etcd server which is hosted in node1 in our case. To do so, we'll need to run the following command in each of our nodes. + + # export ETCD_AUTHORITY=10.130.61.244:2379 + +Then, we'll gonna run calicoctl container in our every our second node. + + # calicoctl node + + WARNING: Unable to detect the xt_set module. Load with `modprobe xt_set` + WARNING: Unable to detect the ipip module. Load with `modprobe ipip` + No IP provided. Using detected IP: 10.130.61.245 + Pulling Docker image calico/node:v0.6.0 + Calico node is running with id: 70f79c746b28491277e28a8d002db4ab49f76a3e7d42e0aca8287a7178668de4 + +This command should be executed in every nodes in which we want to start our Calico services. The above command start a container in the respective node. To check if the container is running or not, we'll gonna run the following docker command. + + # docker ps + +![Docker Running Containers](http://blog.linoxide.com/wp-content/uploads/2015/10/docker-running-containers.png) + +If we see the output something similar to the output shown below then we can confirm that Calico containers are up and running. + +### 5. Starting Containers ### + +Next, we'll need to start few containers in each of our nodes running Calico services. We'll assign a different name to each of the containers running ubuntu. Here, workload-A, workload-B, etc has been assigned as the unique name for each of the containers. To do so, we'll need to run the following command. + +#### On 1st Node #### + + # docker run --net=none --name workload-A -tid ubuntu + + Unable to find image 'ubuntu:latest' locally + latest: Pulling from library/ubuntu + ... + 91e54dfb1179: Already exists + library/ubuntu:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security. + Digest: sha256:73fbe2308f5f5cb6e343425831b8ab44f10bbd77070ecdfbe4081daa4dbe3ed1 + Status: Downloaded newer image for ubuntu:latest + a1ba9105955e9f5b32cbdad531cf6ecd9cab0647d5d3d8b33eca0093605b7a18 + + # docker run --net=none --name workload-B -tid ubuntu + + 89dd3d00f72ac681bddee4b31835c395f14eeb1467300f2b1b9fd3e704c28b7d + +#### On 2nd Node #### + + # docker run --net=none --name workload-C -tid ubuntu + + Unable to find image 'ubuntu:latest' locally + latest: Pulling from library/ubuntu + ... + 91e54dfb1179: Already exists + library/ubuntu:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security. + Digest: sha256:73fbe2308f5f5cb6e343425831b8ab44f10bbd77070ecdfbe4081daa4dbe3ed1 + Status: Downloaded newer image for ubuntu:latest + 24e2d5d7d6f3990b534b5643c0e483da5b4620a1ac2a5b921b2ba08ebf754746 + + # docker run --net=none --name workload-D -tid ubuntu + + c6f28d1ab8f7ac1d9ccc48e6e4234972ed790205c9ca4538b506bec4dc533555 + +Similarly, if we have more nodes, we can run ubuntu docker container into it by running the above command with assigning a different container name. + +### 6. Assigning IP addresses ### + +After we have got our docker containers running in each of our hosts, we'll go for adding a networking support to the containers. Now, we'll gonna assign a new ip address to each of the containers using calicoctl. This will add a new network interface to the containers with the assigned ip addresses. To do so, we'll need to run the following commands in the hosts running the containers. + +#### On 1st Node #### + + # calicoctl container add workload-A 192.168.0.1 + # calicoctl container add workload-B 192.168.0.2 + +#### On 2nd Node #### + + # calicoctl container add workload-C 192.168.0.3 + # calicoctl container add workload-D 192.168.0.4 + +### 7. Adding Policy Profiles ### + +After our containers have got networking interfaces and ip address assigned, we'll now need to add policy profiles to enable networking between the containers each other. After adding the profiles, the containers will be able to communicate to each other only if they have the common profiles assigned. That means, if they have different profiles assigned, they won't be able to communicate to eachother. So, before being able to assign. we'll need to first create some new profiles. That can be done in either of the hosts. Here, we'll run the following command in 1st Node. + + # calicoctl profile add A_C + + Created profile A_C + + # calicoctl profile add B_D + + Created profile B_D + +After the profile has been created, we'll simply add our workload to the required profile. Here, in this tutorial, we'll place workload A and workload C in a common profile A_C and workload B and D in a common profile B_D. To do so, we'll run the following command in our hosts. + +#### On 1st Node #### + + # calicoctl container workload-A profile append A_C + # calicoctl container workload-B profile append B_D + +#### On 2nd Node #### + + # calicoctl container workload-C profile append A_C + # calicoctl container workload-D profile append B_D + +### 8. Testing the Network ### + +After we've added a policy profile to each of our containers using Calicoctl, we'll now test whether our networking is working as expected or not. We'll take a node and a workload and try to communicate with the other containers running in same or different nodes. And due to the profile, we should be able to communicate only with the containers having a common profile. So, in this case, workload A should be able to communicate with only C and vice versa whereas workload A shouldn't be able to communicate with B or D. To test the network, we'll gonna ping the containers having common profiles from the 1st host running workload A and B. + +We'll first ping workload-C having ip 192.168.0.3 using workload-A as shown below. + + # docker exec workload-A ping -c 4 192.168.0.3 + +Then, we'll ping workload-D having ip 192.168.0.4 using workload-B as shown below. + + # docker exec workload-B ping -c 4 192.168.0.4 + +![Ping Test Success](http://blog.linoxide.com/wp-content/uploads/2015/10/ping-test-success.png) + +Now, we'll check if we're able to ping the containers having different profiles. We'll now ping workload-D having ip address 192.168.0.4 using workload-A. + + # docker exec workload-A ping -c 4 192.168.0.4 + +After done, we'll try to ping workload-C having ip address 192.168.0.3 using workload-B. + + # docker exec workload-B ping -c 4 192.168.0.3 + +![Ping Test Failed](http://blog.linoxide.com/wp-content/uploads/2015/10/ping-test-failed.png) + +Hence, the workloads having same profiles could ping each other whereas having different profiles couldn't ping to each other. + +### Conclusion ### + +Calico is an awesome project providing an easy way to configure a virtual network using the latest docker technology. It is considered as a great open source solution for virtual networking in cloud data centers. Calico is being experimented by people in different cloud platforms like AWS, DigitalOcean, GCE and more these days. As Calico is currently under experiment, its stable version hasn't been released yet and is still in pre-release. The project consists a well documented documentations, tutorials and manuals in their [official documentation site][2]. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/calico-virtual-private-networking-docker/ + +作者:[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/ +[1]:http://docs.projectcalico.org/ \ No newline at end of file diff --git a/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md b/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md new file mode 100644 index 0000000000..b712c8ebd6 --- /dev/null +++ b/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md @@ -0,0 +1,111 @@ +How to Setup DockerUI - a Web Interface for Docker +================================================================================ +Docker is getting more popularity day by day. The idea of running a complete Operating System inside a container rather than running inside a virtual machine is an awesome technology. Docker has made lives of millions of system administrators and developers pretty easy for getting their work done in no time. It is an open source technology that provides an open platform to pack, ship, share and run any application as a lightweight container without caring on which operating system we are running on the host. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. Running docker containers and managing them may come a bit difficult and time consuming, so there is a web based application named DockerUI which is make managing and running container pretty simple. DockerUI is highly beneficial to people who are not much aware of linux command lines and want to run containerized applications. DockerUI is an open source web based application best known for its beautiful design and ease simple interface for running and managing docker containers. + +Here are some easy steps on how we can setup Docker Engine with DockerUI in our linux machine. + +### 1. Installing Docker Engine ### + +First of all, we'll gonna install docker engine in our linux machine. Thanks to its developers, docker is very easy to install in any major linux distribution. To install docker engine, we'll need to run the following command with respect to which distribution we are running. + +#### On Ubuntu/Fedora/CentOS/RHEL/Debian #### + +Docker maintainers have written an awesome script that can be used to install docker engine in Ubuntu 15.04/14.10/14.04, CentOS 6.x/7, Fedora 22, RHEL 7 and Debian 8.x distributions of linux. This script recognizes the distribution of linux installed in our machine, then adds the required repository to the filesystem, updates the local repository index and finally installs docker engine and required dependencies from it. To install docker engine using that script, we'll need to run the following command under root or sudo mode. + + # curl -sSL https://get.docker.com/ | sh + +#### On OpenSuse/SUSE Linux Enterprise #### + +To install docker engine in the machine running OpenSuse 13.1/13.2 or SUSE Linux Enterprise Server 12, we'll simply need to execute the zypper command. We'll gonna install docker using zypper command as the latest docker engine is available on the official repository. To do so, we'll run the following command under root/sudo mode. + + # zypper in docker + +#### On ArchLinux #### + +Docker is available in the official repository of Archlinux as well as in the AUR packages maintained by the community. So, we have two options to install docker in archlinux. To install docker using the official arch repository, we'll need to run the following pacman command. + + # pacman -S docker + +But if we want to install docker from the Archlinux User Repository ie AUR, then we'll need to execute the following command. + + # yaourt -S docker-git + +### 2. Starting Docker Daemon ### + +After docker is installed, we'll now gonna start our docker daemon so that we can run docker containers and manage them. We'll run the following command to make sure that docker daemon is installed and to start the docker daemon. + +#### On SysVinit #### + + # service docker start + +#### On Systemd #### + + # systemctl start docker + +### 3. Installing DockerUI ### + +Installing DockerUI is pretty easy than installing docker engine. We just need to pull the dockerui from the Docker Registry Hub and run it inside a container. To do so, we'll simply need to run the following command. + + # docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock dockerui/dockerui + +![Starting DockerUI Container](http://blog.linoxide.com/wp-content/uploads/2015/09/starting-dockerui-container.png) + +Here, in the above command, as the default port of the dockerui web application server 9000, we'll simply map the default port of it with -p flag. With -v flag, we specify the docker socket. The --privileged flag is required for hosts using SELinux. + +After executing the above command, we'll now check if the dockerui container is running or not by running the following command. + + # docker ps + +![Running Docker Containers](http://blog.linoxide.com/wp-content/uploads/2015/09/running-docker-containers.png) + +### 4. Pulling an Image ### + +Currently, we cannot pull an image directly from DockerUI so, we'll need to pull a docker image from the linux console/terminal. To do so, we'll need to run the following command. + + # docker pull ubuntu + +![Docker Image Pull](http://blog.linoxide.com/wp-content/uploads/2015/10/docker-image-pull.png) + +The above command will pull an image tagged as ubuntu from the official [Docker Hub][1]. Similarly, we can pull more images that we require and are available in the hub. + +### 4. Managing with DockerUI ### + +After we have started the dockerui container, we'll now have fun with it to start, pause, stop, remove and perform many possible activities featured by dockerui with docker containers and images. First of all, we'll need to open the web application using our web browser. To do so, we'll need to point our browser to http://ip-address:9000 or http://mydomain.com:9000 according to the configuration of our system. By default, there is no login authentication needed for the user access but we can configure our web server for adding authentication. To start a container, first we'll need to have images of the required application we want to run a container with. + +#### Create a Container #### + +To create a container, we'll need to go to the section named Images then, we'll need to click on the image id which we want to create a container of. After clicking on the required image id, we'll need to click on Create button then we'll be asked to enter the required properties for our container. And after everything is set and done. We'll need to click on Create button to finally create a container. + +![Creating Docker Container](http://blog.linoxide.com/wp-content/uploads/2015/10/creating-docker-container.png) + +#### Stop a Container #### + +To stop a container, we'll need to move towards the Containers page and then select the required container we want to stop. Now, we'll want to click on Stop option which we can see under Actions drop-down menu. + +![Managing Container](http://blog.linoxide.com/wp-content/uploads/2015/10/managing-container.png) + +#### Pause and Resume #### + +To pause a container, we simply select the required container we want to pause by keeping a check mark on the container and then click the Pause option under Actions . This is will pause the running container and then, we can simply resume the container by selecting Unpause option from the Actions drop down menu. + +#### Kill and Remove #### + +Like we had performed the above tasks, its pretty easy to kill and remove a container or an image. We just need to check/select the required container or image and then select the Kill or Remove button from the application according to our need. + +### Conclusion ### + +DockerUI is a beautiful utilization of Docker Remote API to develop an awesome web interface for managing docker containers. The developers have designed and developed this application in pure HTML and JS language. It is currently incomplete and is under heavy development so we don't recommend it for the use in production currently. It makes users pretty easy to manage their containers and images with simple clicks without needing to execute lines of commands to do small jobs. If we want to contribute DockerUI, we can simply visit its [Github Repository][2]. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-dockerui-web-interface-docker/ + +作者:[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/ +[1]:https://hub.docker.com/ +[2]:https://github.com/crosbymichael/dockerui/ \ No newline at end of file diff --git a/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md b/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md new file mode 100644 index 0000000000..6f5f3f3b65 --- /dev/null +++ b/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md @@ -0,0 +1,250 @@ +How to Setup Red Hat Ceph Storage on CentOS 7.0 +================================================================================ +Ceph is an open source software platform that stores data on a single distributed computer cluster. When you are planning to build a cloud, then on top of the requirements you have to decide on how to implement your storage. Open Source CEPH is one of RED HAT mature technology based on object-store system, called RADOS, with a set of gateway APIs that present the data in block, file, and object modes. As a result of its open source nature, this portable storage platform may be installed and used in public or private clouds. The topology of a Ceph cluster is designed around replication and information distribution, which are intrinsic and provide data integrity. It is designed to be fault-tolerant, and can run on commodity hardware, but can also be run on a number of more advanced systems with the right setup. + +Ceph can be installed on any Linux distribution but it requires the recent kernel and other up-to-date libraries in order to be properly executed. But, here in this tutorial we will be using CentOS-7.0 with minimal installation packages on it. + +### System Resources ### + + **CEPH-STORAGE** + OS: CentOS Linux 7 (Core) + RAM:1 GB + CPU:1 CPU + DISK: 20 + Network: 45.79.136.163 + FQDN: ceph-storage.linoxide.com + + **CEPH-NODE** + OS: CentOS Linux 7 (Core) + RAM:1 GB + CPU:1 CPU + DISK: 20 + Network: 45.79.171.138 + FQDN: ceph-node.linoxide.com + +### Pre-Installation Setup ### + +There are few steps that we need to perform on each of our node before the CEPH storage setup. So first thing is to make sure that each node is configured with its networking setup with FQDN that is reachable to other nodes. + +**Configure Hosts** + +To setup the hosts entry on each node let's open the default hosts configuration file as shown below. + + # vi /etc/hosts + +---------- + + 45.79.136.163 ceph-storage ceph-storage.linoxide.com + 45.79.171.138 ceph-node ceph-node.linoxide.com + +**Install VMware Tools** + +While working on the VMware virtual environment, its recommended that you have installed its open VM tools. You can install using below command. + + #yum install -y open-vm-tools + +**Firewall Setup** + +If you are working on a restrictive environment where your local firewall in enabled then make sure that the number of following ports are allowed from in your CEPH storge admin node and client nodes. + +You must open ports 80, 2003, and 4505-4506 on your Admin Calamari node and port 80 to CEPH admin or Calamari node for inbound so that clients in your network can access the Calamari web user interface. + +You can start and enable firewall in centos 7 with given below command. + + #systemctl start firewalld + #systemctl enable firewalld + +To allow the mentioned ports in the Admin Calamari node run the following commands. + + #firewall-cmd --zone=public --add-port=80/tcp --permanent + #firewall-cmd --zone=public --add-port=2003/tcp --permanent + #firewall-cmd --zone=public --add-port=4505-4506/tcp --permanent + #firewall-cmd --reload + +On the CEPH Monitor nodes you have to allow the following ports in the firewall. + + #firewall-cmd --zone=public --add-port=6789/tcp --permanent + +Then allow the following list of default ports for talking to clients and monitors and for sending data to other OSDs. + + #firewall-cmd --zone=public --add-port=6800-7300/tcp --permanent + +It quite fair that you should disable firewall and SELinux settings if you are working in a non-production environment , so we are going to disable the firewall and SELinux in our test environment. + + #systemctl stop firewalld + #systemctl disable firewalld + +**System Update** + +Now update your system and then give it a reboot to implement the required changes. + + #yum update + #shutdown -r 0 + +### Setup CEPH User ### + +Now we will create a separate sudo user that will be used for installing the ceph-deploy utility on each node and allow that user to have password less access on each node because it needs to install software and configuration files without prompting for passwords on CEPH nodes. + +To create new user with its separate home directory run the below command on the ceph-storage host. + + [root@ceph-storage ~]# useradd -d /home/ceph -m ceph + [root@ceph-storage ~]# passwd ceph + +Each user created on the nodes must have sudo rights, you can assign the sudo rights to the user using running the following command as shown. + + [root@ceph-storage ~]# echo "ceph ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ceph + ceph ALL = (root) NOPASSWD:ALL + + [root@ceph-storage ~]# sudo chmod 0440 /etc/sudoers.d/ceph + +### Setup SSH-Key ### + +Now we will generate SSH keys on the admin ceph node and then copy that key to each Ceph cluster nodes. + +Let's run the following command on the ceph-node to copy its ssh key on the ceph-storage. + + [root@ceph-node ~]# ssh-keygen + Generating public/private rsa key pair. + Enter file in which to save the key (/root/.ssh/id_rsa): + Created directory '/root/.ssh'. + Enter passphrase (empty for no passphrase): + Enter same passphrase again: + Your identification has been saved in /root/.ssh/id_rsa. + Your public key has been saved in /root/.ssh/id_rsa.pub. + The key fingerprint is: + 5b:*:*:*:*:*:*:*:*:*:c9 root@ceph-node + The key's randomart image is: + +--[ RSA 2048]----+ + +---------- + + [root@ceph-node ~]# ssh-copy-id ceph@ceph-storage + +![SSH key](http://blog.linoxide.com/wp-content/uploads/2015/10/k3.png) + +### Configure PID Count ### + +To configure the PID count value, we will make use of the following commands to check the default kernel value. By default its a small maximum number of threads that is '32768'. +So will configure this value to a higher number of threads by editing the system conf file as shown in the image. + +![Change PID Value](http://blog.linoxide.com/wp-content/uploads/2015/10/3-PID-value.png) + +### Setup Your Administration Node Server ### + +With all the networking setup and verified, now we will install ceph-deploy using the user ceph. So, check the hosts entry by opening its file. + + #vim /etc/hosts + ceph-storage 45.79.136.163 + ceph-node 45.79.171.138 + +Now to add its repository run the below command. + + #rpm -Uhv http://ceph.com/rpm-giant/el7/noarch/ceph-release-1-0.el7.noarch.rpm + +![Adding EPEL](http://blog.linoxide.com/wp-content/uploads/2015/10/k1.png) + +OR create a new file and update the CEPH repository parameters but do not forget to mention your current release and distribution. + + [root@ceph-storage ~]# vi /etc/yum.repos.d/ceph.repo + +---------- + + [ceph-noarch] + name=Ceph noarch packages + baseurl=http://ceph.com/rpm-{ceph-release}/{distro}/noarch + enabled=1 + gpgcheck=1 + type=rpm-md + gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc + +After this update your system and install the ceph deploy package. + +### Installing CEPH-Deploy Package ### + +To upate the system with latest ceph repository and other packages, we will run the following command along with ceph-deploy installation command. + + #yum update -y && yum install ceph-deploy -y + +Image- + +### Setup the cluster ### + +Create a new directory and move into it on the admin ceph-node to collect all output files and logs by using the following commands. + + #mkdir ~/ceph-cluster + #cd ~/ceph-cluster + +---------- + + #ceph-deploy new storage + +![setup ceph cluster](http://blog.linoxide.com/wp-content/uploads/2015/10/k4.png) + +Upon successful execution of above command you can see it creating its configuration files. +Now to configure the default configuration file of CEPH, open it using any editor and place the following two lines under its global parameters that reflects your public network. + + #vim ceph.conf + osd pool default size = 1 + public network = 45.79.0.0/16 + +### Installing CEPH ### + +We are now going to install CEPH on each of the node associated with our CEPH cluster. To do so we make use of the following command to install CEPH on our both nodes that is ceph-storage and ceph-node as shown below. + + #ceph-deploy install ceph-node ceph-storage + +![installing ceph](http://blog.linoxide.com/wp-content/uploads/2015/10/k5.png) + +This will takes some time while processing all its required repositories and installing the required packages. + +Once the ceph installation process is complete on both nodes we will proceed to create monitor and gather keys by running the following command on the same node. + + #ceph-deploy mon create-initial + +![CEPH Initial Monitor](http://blog.linoxide.com/wp-content/uploads/2015/10/k6.png) + +### Setup OSDs and OSD Daemons ### + +Now we will setup disk storages, to do so first run the below command to List all of your usable disks by using the below command. + + #ceph-deploy disk list ceph-storage + +In results will get the list of your disks used on your storage nodes that you will use for creating the OSD. Let's run the following command that consists of your disks names as shown below. + + #ceph-deploy disk zap storage:sda + #ceph-deploy disk zap storage:sdb + +Now to finalize the OSD setup let's run the below commands to setup the journaling disk along with data disk. + + #ceph-deploy osd prepare storage:sdb:/dev/sda + #ceph-deploy osd activate storage:/dev/sdb1:/dev/sda1 + +You will have to repeat the same command on all the nodes while it will clean everything present on the disk. Afterwards to have a functioning cluster, we need to copy the different keys and configuration files from the admin ceph-node to all the associated nodes by using the following command. + + #ceph-deploy admin ceph-node ceph-storage + +### Testing CEPH ### + +We have almost completed the CEPH cluster setup, let's run the below command to check the status of the running ceph by using the below command on the admin ceph-node. + + #ceph status + #ceph health + HEALTH_OK + +So, if you did not get any error message at ceph status , that means you have successfully setup your ceph storage cluster on CentOS 7. + +### Conclusion ### + +In this detailed article we learned about the CEPH storage clustering setup using the two virtual Machines with CentOS 7 OS installed on them that can be used as a backup or as your local storage that can be used to precess other virtual machines by creating its pools. We hope you have got this article helpful. Do share your experiences when you try this at your end. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/storage/setup-red-hat-ceph-storage-centos-7-0/ + +作者:[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 From 71f363bf918af18b36618ea486c74a982ce47f86 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 12 Oct 2015 21:35:16 +0800 Subject: [PATCH 2247/2517] Update 20151012 10 Useful Utilities For Linux Users.md --- sources/tech/20151012 10 Useful Utilities For Linux Users.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151012 10 Useful Utilities For Linux Users.md b/sources/tech/20151012 10 Useful Utilities For Linux Users.md index b39679a9fc..24df805fc6 100644 --- a/sources/tech/20151012 10 Useful Utilities For Linux Users.md +++ b/sources/tech/20151012 10 Useful Utilities For Linux Users.md @@ -1,3 +1,4 @@ +translation by strugglingyouth 10 Useful Utilities For Linux Users ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2014/09/linux-656x445.png) @@ -260,4 +261,4 @@ via: http://www.unixmen.com/10-useful-utilities-linux-users/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/rajneesh/ -[1]:https://github.com/p-e-w/ranwhen/archive/master.zip \ No newline at end of file +[1]:https://github.com/p-e-w/ranwhen/archive/master.zip From 6c32aeae4d3ced81373eb351d73b77bd5ee0f317 Mon Sep 17 00:00:00 2001 From: alim0x Date: Mon, 12 Oct 2015 22:36:22 +0800 Subject: [PATCH 2248/2517] [translated]20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools --- ... Using screenfetch and linux_logo Tools.md | 106 +++++++++--------- 1 file changed, 52 insertions(+), 54 deletions(-) rename {sources => translated}/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md (63%) diff --git a/sources/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md b/translated/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md similarity index 63% rename from sources/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md rename to translated/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md index 92b47aab50..4e9dce31ca 100644 --- a/sources/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md +++ b/translated/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md @@ -1,90 +1,88 @@ -alim0x translating - -Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools +用 screenfetch 和 linux_logo 工具显示带有酷炫 Linux 标志的基本硬件信息 ================================================================================ -Do you want to display a super cool logo of your Linux distribution along with basic hardware information? Look no further try awesome screenfetch and linux_logo utilities. +想在屏幕上显示出你的 Linux 发行版的酷炫标志和基本硬件信息吗?不用找了,来试试超赞的 screenfetch 和 linux_logo 工具。 -### Say hello to screenfetch ### +### 来见见 screenfetch 吧 ### -screenFetch is a CLI bash script to show system/theme info in screenshots. It runs on a Linux, OS X, FreeBSD and many other Unix-like system. From the man page: +screenFetch 是一个能够在截屏中显示系统/主题信息的命令行脚本。它可以在 Linux,OS X,FreeBSD 以及其它的许多类Unix系统上使用。来自 man 手册的说明: -> This handy Bash script can be used to generate one of those nifty terminal theme information + ASCII distribution logos you see in everyone's screenshots nowadays. It will auto-detect your distribution and display an ASCII version of that distribution's logo and some valuable information to the right. +> 这个方便的 Bash 脚本可以用来生成那些漂亮的终端主题信息和 ASCII 发行版标志,就像如今你在别人的截屏里看到的那样。它会自动检测你的发行版并显示 ASCII 版的发行版标志,并且在右边显示一些有价值的信息。 -#### Installing screenfetch on Linux #### +#### 在 Linux 上安装 screenfetch #### -Open the Terminal application. Simply type the following [apt-get command][1] on a Debian or Ubuntu or Mint Linux based system: +打开终端应用。在基于 Debian 或 Ubuntu 或 Mint 的系统上只需要输入下列 [apt-get 命令][1]: $ sudo apt-get install screenfetch ![](http://s0.cyberciti.org/uploads/cms/2015/09/ubuntu-debian-linux-apt-get-install-screenfetch.jpg) -Fig.01: Installing screenfetch using apt-get +图一:用 apt-get 安装 screenfetch -#### Installing screenfetch Mac OS X #### +#### 在 Mac OS X 上安装 screenfetch #### -Type the following command: +输入下列命令: $ brew install screenfetch ![](http://s0.cyberciti.org/uploads/cms/2015/09/apple-mac-osx-install-screenfetch.jpg) -Fig.02: Installing screenfetch using brew command +图二:用 brew 命令安装 screenfetch -#### Installing screenfetch on FreeBSD #### +#### 在 FreeBSD 上安装 screenfetch #### -Type the following pkg command: +输入下列 pkg 命令: $ sudo pkg install sysutils/screenfetch ![](http://s0.cyberciti.org/uploads/cms/2015/09/freebsd-install-pkg-screenfetch.jpg) -Fig.03: FreeBSD install screenfetch using pkg +图三:在 FreeBSD 用 pkg 安装 screenfetch -#### Installing screenfetch on Fedora Linux #### +#### 在 Fedora 上安装 screenfetch #### -Type the following dnf command: +输入下列 dnf 命令: $ sudo dnf install screenfetch ![](http://s0.cyberciti.org/uploads/cms/2015/09/fedora-dnf-install-screenfetch.jpg) -Fig.04: Fedora Linux 22 install screenfetch using dnf +图四:在 Fedora 22 用 dnf 安装 screenfetch -#### How do I use screefetch utility? #### +#### 我该怎么使用 screefetch 工具? #### -Simply type the following command: +只需输入以下命令: $ screenfetch -Here is the output from various operating system: +这是不同系统的输出: ![](http://s0.cyberciti.org/uploads/cms/2015/09/fedora-screenfetch-300x193.jpg) -Screenfetch on Fedora +Fedora 上的 Screenfetch ![](http://s0.cyberciti.org/uploads/cms/2015/09/screenfetch-osx-300x213.jpg) -Screenfetch on OS X +OS X 上的 Screenfetch ![](http://s0.cyberciti.org/uploads/cms/2015/09/screenfetch-freebsd-300x143.jpg) -Screenfetch on FreeBSD +FreeBSD 上的 Screenfetch ![](http://s0.cyberciti.org/uploads/cms/2015/09/debian-ubutnu-screenfetch-outputs-300x279.jpg) -Screenfetch on Debian Linux +Debian 上的 Screenfetch -#### Take screenshot #### +#### 获取截屏 #### -To take a screenshot and to save a file, enter: +要获取截屏并保存成文件,输入: $ screenfetch -s -You will see a screenshot file at ~/Desktop/screenFetch-*.jpg. To take a screenshot and upload to imgur directly, enter: +你会看到一个文件 ~/Desktop/screenFetch-*.jpg。获取截屏并直接上传到 imgur,输入: $ screenfetch -su imgur -**Sample outputs:** +**输出示例:** -/+:. veryv@Viveks-MacBook-Pro :++++. OS: 64bit Mac OS X 10.10.5 14F27 @@ -106,45 +104,45 @@ You will see a screenshot file at ~/Desktop/screenFetch-*.jpg. To take a screens Taking shot in 3.. 2.. 1.. 0. ==> Uploading your screenshot now...your screenshot can be viewed at http://imgur.com/HKIUznn -You can visit [http://imgur.com/HKIUznn][2] to see uploaded screenshot. +你可以访问 [http://imgur.com/HKIUznn][2] 来查看上传的截屏。 -### Say hello to linux_logo ### +### 再来看看 linux_logo ### -The linux_logo program generates a color ANSI picture of a penguin which includes some system information obtained from the /proc filesystem. +linux_logo 程序生成一个彩色的 ANSI 版企鹅图片,还包含一些来自 /proc 的系统信息。 -#### Installation #### +#### 安装 #### -Simply type the following command as per your Linux distro. +只需按照你的 Linux 发行版输入对应的命令: #### Debian/Ubutnu/Mint #### # apt-get install linux_logo -#### CentOS/RHEL/Older Fedora #### +#### CentOS/RHEL/旧版 Fedora #### # yum install linux_logo -#### Fedora Linux v22+ or newer #### +#### Fedora Linux v22+ 或更新版本 #### # dnf install linux_logo -#### Run it #### +#### 运行它 #### -Simply type the following command: +只需输入下列命令: $ linux_logo ![](http://s0.cyberciti.org/uploads/cms/2015/09/debian-linux_logo.jpg) -linux_logo in action +运行 linux_logo -#### But wait, there's more! #### +#### 等等,还有更多! #### -You can see a list of compiled in logos using: +你可以用这个命令查看内置的标志列表: $ linux_logo -f -L list -**Sample outputs:** +**输出示例:** Available Built-in Logos: Num Type Ascii Name Description @@ -182,42 +180,42 @@ You can see a list of compiled in logos using: Do "linux_logo -L num" where num is from above to get the appropriate logo. Remember to also use -a to get ascii version. -To see aix logo, enter: +查看 aix 的标志,输入: $ linux_logo -f -L aix -To see openbsd logo: +查看 openbsd 的标志: $ linux_logo -f -L openbsd -Or just see some random Linux logo: +或者只是随机看看一些 Linux 标志: $ linux_logo -f -L random_xy -You [can combine bash for loop as follows to display various logos][3], enter: +你[可以像下面那样结合 bash 的循环来显示不同的标志][3],输入: ![](http://s0.cyberciti.org/uploads/cms/2015/09/linux-logo-fun.gif) -Gif 01: linux_logo and bash for loop for fun and profie +动图1: linux_logo 和 bash 循环,既有趣又能发朋友圈耍酷 -### Getting help ### +### 获取帮助 ### -Simply type the following command: +输入下列命令: $ screefetch -h $ linux_logo -h -**References** +**参考** -- [screenFetch home page][4] -- [linux_logo home page][5] +- [screenFetch 主页][4] +- [linux_logo 主页][5] -------------------------------------------------------------------------------- via: http://www.cyberciti.biz/hardware/howto-display-linux-logo-in-bash-terminal-using-screenfetch-linux_logo/ 作者:Vivek Gite -译者:[译者ID](https://github.com/译者ID) +译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 13274d89f5bf2413d685284050e58dcd83a0867c Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 13 Oct 2015 08:41:35 +0800 Subject: [PATCH 2249/2517] Update 20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md --- ...ow to change USB device permission permanently on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md b/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md index 8af62bfd75..4c07c48f90 100644 --- a/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md +++ b/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md @@ -1,3 +1,5 @@ +translating----geekpi + Linux FAQs with Answers--How to change USB device permission permanently on Linux ================================================================================ > **Question**: I am trying to run gpsd on my Linux with a USB GPS receiver. However, I am getting the following errors from gpsd. @@ -50,4 +52,4 @@ via: http://ask.xmodulo.com/change-usb-device-permission-linux.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From bd616af903eca9eb6e80b8957d776122ae7fe80f Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 13 Oct 2015 08:41:54 +0800 Subject: [PATCH 2250/2517] Update 20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md --- ...find information about built-in kernel modules on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md b/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md index b7a5be3975..d816a975f7 100644 --- a/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md +++ b/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md @@ -1,3 +1,5 @@ +translating----geekpi + Linux FAQs with Answers--How to find information about built-in kernel modules on Linux ================================================================================ > **Question**: I would like to know what modules are built into the kernel of my Linux system, and what parameters are available in each module. Is there a way to get a list of all built-in kernel modules and device drivers, and find detailed information about them? @@ -50,4 +52,4 @@ via: http://ask.xmodulo.com/find-information-builtin-kernel-modules-linux.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 9dad14cf1ce72f67ffd19f139fabe5a44624f25a Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 13 Oct 2015 08:42:27 +0800 Subject: [PATCH 2251/2517] Update 20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md --- ...How to force password change at the next login on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md b/sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md index aadd2d1e81..8e192f112b 100644 --- a/sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md +++ b/sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md @@ -1,3 +1,5 @@ +translating----geekpi + Linux FAQs with Answers--How to force password change at the next login on Linux ================================================================================ > **Question**: I manage a Linux server for multiple users to share. I have just created a new user account with some default password, and I want the user to change the default password immediately after the first login. Is there a way to force a user to change his/her password at the next login? @@ -51,4 +53,4 @@ via: http://ask.xmodulo.com/force-password-change-next-login-linux.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni -[1]:http://xmodulo.com/set-password-policy-linux.html \ No newline at end of file +[1]:http://xmodulo.com/set-password-policy-linux.html From c6ff7fc4596ef3a0ce963f720ac79c98f4174866 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 13 Oct 2015 08:53:38 +0800 Subject: [PATCH 2252/2517] translated --- ... device permission permanently on Linux.md | 55 ------------------- ... device permission permanently on Linux.md | 54 ++++++++++++++++++ 2 files changed, 54 insertions(+), 55 deletions(-) delete mode 100644 sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md create mode 100644 translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md b/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md deleted file mode 100644 index 4c07c48f90..0000000000 --- a/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md +++ /dev/null @@ -1,55 +0,0 @@ -translating----geekpi - -Linux FAQs with Answers--How to change USB device permission permanently on Linux -================================================================================ -> **Question**: I am trying to run gpsd on my Linux with a USB GPS receiver. However, I am getting the following errors from gpsd. -> -> gpsd[377]: gpsd:ERROR: read-only device open failed: Permission denied -> gpsd[377]: gpsd:ERROR: /dev/ttyUSB0: device activation failed. -> gpsd[377]: gpsd:ERROR: device open failed: Permission denied - retrying read-only -> -> Looks like gpsd does not have permission to access the USB device (/dev/ttyUSB0). How can I change its default permission mode permanently on Linux? - -When you run a process that wants to read or write to a USB device, the user/group of the process must have appropriate permission to do so. Of course you can change the permission of your USB device manually with chmod command, but such manual permission change will be temporary. The USB device will revert to its default permission mode when you reboot your Linux machine. - -![](https://farm6.staticflickr.com/5741/20848677843_202ff53303_c.jpg) - -As a permanent solution, you can create a udev-based USB permission rule which assigns any custom permission mode of your choice. Here is how to do it. - -First, you need to identify the vendorID and productID of your USB device. For that, use lsusb command. - - $ lsusb -vvv - -![](https://farm1.staticflickr.com/731/20848677743_39f76eb403_c.jpg) - -From the lsusb output, find your USB device's entry, and look for "idVendor" and "idProduct" fields. In this example, we have idVendor (0x067b) and idProduct (0x2303). - -Next, create a new udev rule as follows. - - $ sudo vi /etc/udev/rules.d/50-myusb.rules - ----------- - - SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GROUP="users", MODE="0666" - -Replace "idVendor" and "idProduct" values with your own. **MODE="0666"** indicates the preferred permission of the USB device. - -Now reboot your machine or reload udev rules: - - $ sudo udevadm control --reload - -Then verify the permission of the USB device. - -![](https://farm1.staticflickr.com/744/21282872179_9a4a05d768_b.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/change-usb-device-permission-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://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md b/translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md new file mode 100644 index 0000000000..533bbfad5b --- /dev/null +++ b/translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md @@ -0,0 +1,54 @@ +Linux有问必答 -- 如何在LInux中永久修改USB设备权限 +================================================================================ +> **提问**:当我尝试在Linux中运行USB GPS接收器时我遇到了下面来自gpsd的错误。 +> +> gpsd[377]: gpsd:ERROR: read-only device open failed: Permission denied +> gpsd[377]: gpsd:ERROR: /dev/ttyUSB0: device activation failed. +> gpsd[377]: gpsd:ERROR: device open failed: Permission denied - retrying read-only +> +> 看上去gpsd没有权限访问USB设备(/dev/ttyUSB0)。我该如何永久修改它在Linux上的权限? + +当你在运行一个会读取或者写入USB设备的进程时,进程的用户/组必须有权限这么做。当然你可以手动用chmod命令改变USB设备的权限,但是手动的权限改变只是暂时的。USB设备会在下次重启时恢复它的默认权限。 + +![](https://farm6.staticflickr.com/5741/20848677843_202ff53303_c.jpg) + +作为一个永久的方式,你可以创建一个基于udev的USB权限规则,它可以根据你的选择分配任何权限模式。下面是该如何做。 + +首先,你需要找出USB设备的vendorID和productID。使用lsusb命令。 + + $ lsusb -vvv + +![](https://farm1.staticflickr.com/731/20848677743_39f76eb403_c.jpg) + +上面lsusb的输出中,找出你的USB设备,并找出"idVendor"和"idProduct"字段。本例中,我们的结果是idVendor (0x067b)和 idProduct (0x2303) + +下面创建一个新的udev规则。 + + $ sudo vi /etc/udev/rules.d/50-myusb.rules + +---------- + + SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GROUP="users", MODE="0666" + +用你自己的"idVendor"和"idProduct"来替换。**MODE="0666"**表示USB设备的权限。 + +现在重启电脑并重新加载udev规则: + + $ sudo udevadm control --reload + +Then verify the permission of the USB device. +接着验证USB设备的权限。 + +![](https://farm1.staticflickr.com/744/21282872179_9a4a05d768_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/change-usb-device-permission-linux.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From 6c146196cb80e9d14d31c1aa3ab5d0985c512fbe Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 13 Oct 2015 09:13:38 +0800 Subject: [PATCH 2253/2517] translated --- ... about built-in kernel modules on Linux.md | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md b/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md index d816a975f7..3b37ef3c91 100644 --- a/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md +++ b/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md @@ -1,42 +1,40 @@ -translating----geekpi - -Linux FAQs with Answers--How to find information about built-in kernel modules on Linux +Linux有问必答--如何找出Linux中内置模块的信息 ================================================================================ -> **Question**: I would like to know what modules are built into the kernel of my Linux system, and what parameters are available in each module. Is there a way to get a list of all built-in kernel modules and device drivers, and find detailed information about them? +> **提问**:我想要知道Linux系统中内核内置的模块,以及每个模块的参数。有什么方法可以得到内置模块和设备驱动的列表,以及它们的详细信息呢? -The modern Linux kernel has been growing significantly over the years to support a wide variety of hardware devices, file systems and networking functions. During this time, "loadable kernel modules (LKM)" came into being in order to keep the kernel from getting bloated, while flexibly extending its capabilities and hardware support under different environments, without having to rebuild it. +现代Linux内核正在随着时间迅速地增长来支持大量的硬件、文件系统和网络功能。在此期间,“可加载模块”的引入防止内核变得越来越臃肿,以及在不同的环境中灵活地扩展功能及硬件支持,而不必重新构建内核。 -The Linux kernel shipped with the latest Linux distributions comes with relatively a small number of "built-in modules", while the rest of hardware-specific drivers or custom capabilities exist as "loadable modules" which you can selectively load or unload. +最新的Linux发型版的内核只带了相对较小的“内置模块”,其余的特定硬件驱动或者自定义功能作为“可加载模块”来让你选择地加载或卸载。 -The built-in modules are statically compiled into the kernel. Unlike loadable kernel modules which can be dynamically loaded, unloaded, looked up or listed using commands like modprobe, insmod, rmmod, modinfo or lsmod, built-in kernel modules are always loaded in the kernel upon boot-up, and cannot be managed with these commands. +内置模块被静态地编译进了内核。不像可加载内核模块可以动态地使用modprobe、insmod、rmmod、modinfo或者lsmod等命令地加载、卸载、查询模块,内置的模块总是在启动是就加载进了内核,不会被这些命令管理。 -### Find a List of Built-in Kernel Modules ### +### 找出内置模块列表 ### -To get a list of all built-in modules, run the following command. +要得到内置模块列表,运行下面的命令。 $ cat /lib/modules/$(uname -r)/modules.builtin ![](https://farm1.staticflickr.com/697/21481933835_ef6b9c71e1_c.jpg) -You can also get a hint on what modules are built-in by running: +你也可以用下面的命令来查看有哪些内置模块: ![](https://farm6.staticflickr.com/5643/21295025949_57f5849c36_c.jpg) -### Find Parameters of Built-in Kernel Modules ### +### 找出内置模块参数 ### -Each kernel module, whether it's built-in or loadable, comes with a set of parameters. For loadable kernel modules, the modinfo command will show parameter information about them. However, this command will not work with built-in modules. You will simply get the following error. +每个内核模块无论是内置的还是可加载的都有一系列的参数。对于可加载模块,modinfo命令显示它们的参数信息。然而这个命令不对内置模块管用。你会得到下面的错误。 modinfo: ERROR: Module XXXXXX not found. -If you want to check what parameters are available in a given built-in module, and what their values are, you can instead examine the content in **/sys/module** directory. +如果你想要查看内置模块的参数,以及它们的值,你可以在**/sys/module** 下检查它们的内容。 -Under /sys/module directory, you will find sub-directories named after existing kernel modules (both built-in and loadable). Then in each module directory, there is a directory named "parameters", which lists all available parameters for the module. +在 /sys/module目录下,你可以找到内核模块(包含内置和可加载的)命名的子目录。结合则进入每个模块目录,这里有个“parameters”目录,列出了这个模块所有的参数。 -For example, let's say you want to find out parameters of a built-in module called tcp_cubic (the default TCP implementation of the kernel). Then you can do this: +比如你要找出tcp_cubic(内核默认的TCP实现)模块的参数。你可以这么做: $ ls /sys/module/tcp_cubic/parameters -And check the value of each parameter by reading a corresponding file. +接着阅读这个文件查看每个参数的值。 $ cat /sys/module/tcp_cubic/parameters/tcp_friendliness @@ -47,7 +45,7 @@ And check the value of each parameter by reading a corresponding file. via: http://ask.xmodulo.com/find-information-builtin-kernel-modules-linux.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From f84e372378f16cd602c10cedca8facff60bb092f Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 13 Oct 2015 09:14:07 +0800 Subject: [PATCH 2254/2517] Rename sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md to translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md --- ... to find information about built-in kernel modules on Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md (100%) diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md b/translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md similarity index 100% rename from sources/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md rename to translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md From cdd9166ed17971b41a9fe75c6cb8ebf0f830dca0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 13 Oct 2015 09:48:44 +0800 Subject: [PATCH 2255/2517] translated --- ...sword change at the next login on Linux.md | 56 ------------------- ...sword change at the next login on Linux.md | 55 ++++++++++++++++++ 2 files changed, 55 insertions(+), 56 deletions(-) delete mode 100644 sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md create mode 100644 translated/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md b/sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md deleted file mode 100644 index 8e192f112b..0000000000 --- a/sources/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md +++ /dev/null @@ -1,56 +0,0 @@ -translating----geekpi - -Linux FAQs with Answers--How to force password change at the next login on Linux -================================================================================ -> **Question**: I manage a Linux server for multiple users to share. I have just created a new user account with some default password, and I want the user to change the default password immediately after the first login. Is there a way to force a user to change his/her password at the next login? - -In multi-user Linux environment, it's a standard practice to create user accounts with some random default password. Then after a successful login, a new user can change the default password to his or her own. For security reasons, it is often recommended to "force" users to change the default password after the first login to make sure that the initial one-time password is no longer used. - -Here is **how to force a user to change his or her password on the next login**. - -Every user account in Linux is associated with various password-related configurations and information. For example, it remembers the date of the last password change, the minimum/maximum number of days between password changes, and when to expire the current password, etc. - -A command-line tool called chage can access and adjust password expiration related configurations. You can use this tool to force password change of any user at the next login. - -To view password expiration information of a particular user (e.g., alice), run the following command. Note that you need root privilege only when you are checking password age information of any other user than yourself. - - $ sudo chage -l alice - -![](https://c1.staticflickr.com/1/727/21955581605_5471e61ee0_c.jpg) - -### Force Password Change for a User ### - -If you want to force a user to change his or her password, use the following command. - - $ sudo chage -d0 - -Originally the "-d " option is supposed to set the "age" of a password (in terms of the number of days since January 1st, 1970 when the password was last changed). So "-d0" indicates that the password was changed on January 1st, 1970, which essentially expires the current password, and causes it to be changed on the next login. - -Another way to expire the current password is via passwd command. - - $ sudo passwd -e - -The above command has the same effect of "chage -d0", making the current password of the user expire immediately. - -Now check the password information of the user again, and you will see: - -![](https://c2.staticflickr.com/6/5770/21767501480_ba88f00d80_c.jpg) - -When you log in again, you will be asked to change the password. You will need to verify the current password one more time before the change. - -![](https://c2.staticflickr.com/6/5835/21929638636_eed4d69cb9_c.jpg) - -To set more comprehensive password policies (e.g., password complexity, reuse prevention), you can use PAM. See [the article][1] for more detail. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/force-password-change-next-login-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://ask.xmodulo.com/author/nanni -[1]:http://xmodulo.com/set-password-policy-linux.html diff --git a/translated/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md b/translated/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md new file mode 100644 index 0000000000..509d0b6e45 --- /dev/null +++ b/translated/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md @@ -0,0 +1,55 @@ +Linux有问必答--如何强制在下次登录Linux时更换密码 +================================================================================ +> **提问**:我管理着一台多人共享的Linux服务器。我刚使用默认密码创建了一个新用户,但是我想用户在第一次登录时更换密码。有没有什么方法可以让他/她在下次登录时修改密码呢? + +在多用户Linux环境中,标准实践是使用一个默认的随机密码创建一个用户账户。成功登录后,新用户自己改变默认密码。出于安全里有,经常建议“强制”用户在第一次登录时修改密码来确保这个一次性使用的密码不会再被使用。 + +下面是**如何强制用户在下次登录时修改他/她的密码**。 + +changes, and when to expire the current password, etc. +每个Linux用户都关联这不同的密码相关配置和信息。比如,记录着上次密码更改的日期、最小/最大的修改密码的天数、密码何时过期等等。 + +一个叫chage的命令行工具可以访问并调整密码过期相关配置。你可以使用这个工具来强制用户在下次登录修改密码、 + +要查看特定用户的过期信息(比如:alice),运行下面的命令。注意的是除了你自己之外查看其他任何用户的密码信息都需要root权限。 + + $ sudo chage -l alice + +![](https://c1.staticflickr.com/1/727/21955581605_5471e61ee0_c.jpg) + +### 强制用户修改密码 ### + +如果你想要强制用户去修改他/她的密码,使用下面的命令。 + + $ sudo chage -d0 + +原本“-d ”参数是用来设置密码的“年龄”(也就是上次修改密码起到1970 1.1起的天数)。因此“-d0”的意思是上次密码修改的时间是1970 1.1,这就让当前的密码过期了,也就强制让他在下次登录的时候修改密码了。 + +另外一个过期当前密码的方式是用passwd命令。 + + $ sudo passwd -e + +上面的命令和“chage -d0”作用一样,让当前用户的密码立即过期。 + +现在检查用户的信息,你会发现: + +![](https://c2.staticflickr.com/6/5770/21767501480_ba88f00d80_c.jpg) + +当你再次登录时候,你会被要求修改密码。你会在修改前被要求再验证一次当前密码。 + +![](https://c2.staticflickr.com/6/5835/21929638636_eed4d69cb9_c.jpg) + +要设置更全面的密码策略(如密码复杂性,防止重复使用),则可以使用PAM。参见[这篇文章][1]了解更多详情。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/force-password-change-next-login-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://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/set-password-policy-linux.html From 5159b6aa09c44cdcb9fc5878b5f8f32ffbfc748a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 13 Oct 2015 16:20:32 +0800 Subject: [PATCH 2256/2517] =?UTF-8?q?20151013-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...odo--A ToDo List Manager For DIY Lovers.md | 55 ++++++++++++++++ ...3 DFileManager--Cover Flow File Manager.md | 63 +++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md create mode 100644 sources/tech/20151013 DFileManager--Cover Flow File Manager.md diff --git a/sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md b/sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md new file mode 100644 index 0000000000..828de7258c --- /dev/null +++ b/sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md @@ -0,0 +1,55 @@ +Mytodo: A ToDo List Manager For DIY Lovers +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-Linux.jpg) + +Usually, I focus on applications that are hassle free and easy to use (read GUI oriented). That’s the reason why I included [Go For It][1] to do program in the list of [Linux productivity tools][2]. Today, I am going to show you yet another to-do list application that is slightly different than the rest. + +[Mytodo][3] is an open source to-do list program that puts you, the user, in command of everything. Unlike most other similar programs, Mytodo is more DIY hobbyist oriented because it lets you configure the server (if you want to use it on multiple computers), provides a command line interface among other main features. + +It is written in Python and thus it could be used in all Linux distros and other operating systems such as Windows. + +Some of the main features of Mytodo are: + +- Both GUI and command line interface +- Configure your own server +- Add users/password +- Written in Python +- Searchable by tag +- To-do list list can be displayed as [Conky][4] + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list.jpeg) + +GUI + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list-cli.jpeg) + +Command Line + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list-conky.jpeg) + +Conky displaying to-do list + +You can find the source code and configuration instructions on the Github link below: + +- [Download and Configure Mytodo ][5] + +While some people might not like all this command line and configuration part, but it certainly has its own pleasure. I let you try and decide if Mytodo suits our need and taste. + +Image credit: https://pixabay.com/en/to-do-list-task-list-notes-written-734587 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/mytodo-list-manager/ + +作者:[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://itsfoss.com/go-for-it-to-do-app-in-linux/ +[2]:http://itsfoss.com/productivity-tips-ubuntu/ +[3]:https://github.com/mohamed-aziz/mytodo +[4]:http://itsfoss.com/conky-gui-ubuntu-1304/ +[5]:https://github.com/mohamed-aziz/mytodo \ No newline at end of file diff --git a/sources/tech/20151013 DFileManager--Cover Flow File Manager.md b/sources/tech/20151013 DFileManager--Cover Flow File Manager.md new file mode 100644 index 0000000000..9c96fe9553 --- /dev/null +++ b/sources/tech/20151013 DFileManager--Cover Flow File Manager.md @@ -0,0 +1,63 @@ +DFileManager: Cover Flow File Manager +================================================================================ +A real gem of a file manager absent from the standard Ubuntu repositories but sporting a unique feature. That’s DFileManager in a twitterish statement. + +A tricky question to answer is just how many open source Linux applications are available. Just out of curiosity, you can type at the shell: + + ~$ for f in /var/lib/apt/lists/*Packages; do printf ’%5d %s\n’ $(grep ’^Package: ’ “$f” | wc -l) ${f##*/} done | sort -rn + +On my Ubuntu 15.04 system, it produces the following results: + +![Ubuntu 15.04 Packages](http://www.linuxlinks.com/portal/content/reviews/FileManagers/UbuntuPackages.png) + +As the screenshot above illustrates, there are approximately 39,000 packages in the Universe repository, and around 8,500 packages in the main repository. These numbers sound a lot. But there is a smorgasbord of open source applications, utilities, and libraries that don’t have an Ubuntu team generating a package. And more importantly, there are some real treasures missing from the repositories which can only be discovered by compiling source code. DFileManager is one such utility. It is a Qt based cross-platform file manager which is in an early stage of development. Qt provides single-source portability across all major desktop operating systems. + +In the absence of a binary package, the user needs to compile the code. For some tools, this can be problematic, particularly if the application depends on any obscure libraries, or specific versions which may be incompatible with other software installed on a system. + +### Installation ### + +Fortunately, DFileManager is simple to compile. The installation instructions on the developer’s website provide most of the steps necessary for my creaking Ubuntu box, but a few essential packages were missing (why is it always that way however many libraries clutter up your filesystem?) To prepare my system, download the source code from GitHub and then compile the software, I entered the following commands at the shell: + + ~$ sudo apt-get install qt5-default qt5-qmake libqt5x11extras5-dev + ~$ git clone git://git.code.sf.net/p/dfilemanager/code dfilemanager-code + ~$ cd dfilemananger-code + ~$ mkdir build + ~$ cd build + ~$ cmake ../ -DCMAKE_INSTALL_PREFIX=/usr + ~$ make + ~$ sudo make install + +You can then start the application by typing at the shell: + + ~$ dfm + +Here is a screenshot of DFileManager in action, with the main attraction in full view; the Cover Flow view. This offers the ability to slide through items in the current folder with an attractive feel. It’s ideal for viewing photos. The file manager bears a resemblance to Finder (the default file manager and graphical user interface shell used on all Macintosh operating systems), which may appeal to you. + +![DFileManager in action](http://www.linuxlinks.com/portal/content/reviews/FileManagers/Screenshot-dfm.png) + +### Features: ### + +- 4 views: Icons, Details, Columns, and Cover Flow +- Categorised bookmarks with Places and Devices +- Tabs +- Simple searching and filtering +- Customizable thumbnails for filetypes including multimedia files +- Information bar which can be undocked +- Open folders and files with one click +- Option to queue IO operations +- Remembers some view properties for each folder +- Show hidden files + +DFileManager is not a replacement for KDE’s Dolphin, but do give it a go. It’s a file manager that really helps the user browse files. And don’t forget to give feedback to the developer; that’s a contribution anyone can offer. + +-------------------------------------------------------------------------------- + +via: http://gofk.tumblr.com/post/131014089537/dfilemanager-cover-flow-file-manager-a-real-gem + +作者:[gofk][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://gofk.tumblr.com/ \ No newline at end of file From e957ef65370227143642b9e7136e08bb248c7801 Mon Sep 17 00:00:00 2001 From: alim0x Date: Tue, 13 Oct 2015 19:36:26 +0800 Subject: [PATCH 2257/2517] [translating]Mytodo--A ToDo List Manager For D... --- .../20151013 Mytodo--A ToDo List Manager For DIY Lovers.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md b/sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md index 828de7258c..0bac6cc4d0 100644 --- a/sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md +++ b/sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md @@ -1,3 +1,5 @@ +alim0x translating + Mytodo: A ToDo List Manager For DIY Lovers ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-Linux.jpg) @@ -52,4 +54,4 @@ via: http://itsfoss.com/mytodo-list-manager/ [2]:http://itsfoss.com/productivity-tips-ubuntu/ [3]:https://github.com/mohamed-aziz/mytodo [4]:http://itsfoss.com/conky-gui-ubuntu-1304/ -[5]:https://github.com/mohamed-aziz/mytodo \ No newline at end of file +[5]:https://github.com/mohamed-aziz/mytodo From 300e1b99e95bb355fca6dab076357dc0c6b9cba4 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 14 Oct 2015 11:30:09 +0800 Subject: [PATCH 2258/2517] Delete 20151012 10 Useful Utilities For Linux Users.md --- ...012 10 Useful Utilities For Linux Users.md | 264 ------------------ 1 file changed, 264 deletions(-) delete mode 100644 sources/tech/20151012 10 Useful Utilities For Linux Users.md diff --git a/sources/tech/20151012 10 Useful Utilities For Linux Users.md b/sources/tech/20151012 10 Useful Utilities For Linux Users.md deleted file mode 100644 index 24df805fc6..0000000000 --- a/sources/tech/20151012 10 Useful Utilities For Linux Users.md +++ /dev/null @@ -1,264 +0,0 @@ -translation by strugglingyouth -10 Useful Utilities For Linux Users -================================================================================ -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2014/09/linux-656x445.png) - -### Introduction ### - -In this tutorial, I have collected 10 useful utility tools for Linux users which will include various network monitoring, system auditing or some another random commands which can help users to enhance their productivity. I hope you will enjoy them. - -#### 1. w #### - -Display who is logged into the system and what process executed by them. - - $w - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_023.png) - -for help - - $w -h - -for current user - - $w - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_024.png) - -#### 2. nmon #### - -Nmon or nigel’s monitor is a tool which displays performance information of the system. - - $ sudo apt-get install nmon - ----------- - - $ nmon - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_001.png) - -nmon can dump information related to netwrok, cpu, memory or disk uses. - -**nmon cpu info (press c)** - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_002.png) - -**nmon network info (press n)** - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_003.png) - -**nman disk info (press d)** - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_004.png) - -#### 3. ncdu #### - -A Command utility is a cursor based version of ‘du’, this command is used to analyze disk space occupied by various directories. - - $apt-get install ncdu - ----------- - - $ncdu / - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_006.png) - -Final output: - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_007.png) - -Press n to order by name or press s to order by file size(default). - -#### 4. slurm #### - -A command line utility used for command based network interface bandwidth monitoring, it will display ascii based graphic. - - $ apt-get install slurm - -Examples: - - $ slurm -i - ----------- - - $ slurm -i eth1 - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0091.png) - -**options** - -- Press **l** to display lx/tx led. -- press **c** to switch to classic mode. -- press **r** to refresh screen. -- press **q** to quit. - -#### 5.findmnt #### - -Findmnt command is used to find mount file systems. It is used to list mount devices and can alos mount or unmount devices as and when required, it comes as a part of util-linux. - -Examples: - - $findmnt - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0101.png) - -To get output in list format. - - $ findmnt -l - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0111.png) - -List file systems mounted in fstab. - - $ findmnt -s - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0122.png) - -List mounted files systems by file type - - $ findmnt -t ext4 - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0131.png) - -#### 6. dstat #### - -A combined and flexible tool which can be used to monitor memory, process, network or disk space performance, it is a good replacement of ifstat, iostat, dmstat etc. - - $apt-get install dstat - -Examples: - -A detailed info about cpu, hard disk and network. - - $ dstat - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0141.png) - -- **-c** cpu - - $ dstat -c - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0151.png) - -Some more detailed information about cpu - - $ dstat -cdl -D sda1 - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_017.png) - -- **-d** disk - - $ dstat -d - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0161.png) - -#### 7. saidar #### - -Another cli based system statistics monitoring tool, provide information about disk uses, network, memory, swap etc. - - $ sudo apt-get install saidar - -Examples: - - $ saidar - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0181.png) - -Enable colored output - - $ saider -c - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0191.png) - -#### 8. ss #### - -ss or socket statistics is a good alternative to netstat it directory gather information from kernel space nad play fast in comparision to the netstat utility. - -Examples: - -List all connections - - $ ss |less - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0201.png) - -Greb only tcp traffic - - $ ss -A tcp - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0211.png) - -Grab process name and pid - - $ ss -ltp - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0221.png) - -#### 9. ccze #### - -A tool that decorate your logs :). - - $ apt-get install ccze - -Examples: - - $ tailf /var/log/syslog | ccze - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0231.png) - -List ccze modules: - - $ ccze -l - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0241.png) - -Save log as html. - - tailf /var/log/syslog | ccze -h > /home/tux/Desktop/rajneesh.html - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_025.png) - -#### 10. ranwhen.py #### - -A python based terminal utility that can be used to display system activities graphically. Details are presented in a very colorful histogram. - -Install python: - - $ sudo apt-add-repository ppa:fkrull/deadsnakes - -Update system: - - $ sudo apt-get update - -Download python: - - $ sudo apt-get install python3.2 - -- [Download ranwhen.py][1] - - $ unzip ranwhen-master.zip && cd ranwhen-master - -Run the tool. - - $ python3.2 ranwhen.py - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_026.png) - -### Conclusion ### - -These are the less popular, yet important Linux administration tools. They can help user in their day to day activities. In our upcoming articles, we will try to bring some more Admin/user tools. - -Have fun! - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/10-useful-utilities-linux-users/ - -作者:[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/ -[1]:https://github.com/p-e-w/ranwhen/archive/master.zip From 7feaa7284a1f806389d1de3681add744e9137781 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 14 Oct 2015 11:30:47 +0800 Subject: [PATCH 2259/2517] Create 20151012 10 Useful Utilities For Linux Users.md --- ...012 10 Useful Utilities For Linux Users.md | 264 ++++++++++++++++++ 1 file changed, 264 insertions(+) create mode 100644 translated/tech/20151012 10 Useful Utilities For Linux Users.md diff --git a/translated/tech/20151012 10 Useful Utilities For Linux Users.md b/translated/tech/20151012 10 Useful Utilities For Linux Users.md new file mode 100644 index 0000000000..fbb4bfa8b0 --- /dev/null +++ b/translated/tech/20151012 10 Useful Utilities For Linux Users.md @@ -0,0 +1,264 @@ +对 Linux 用户10个有用的工具 +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2014/09/linux-656x445.png) + +### 引言 ### + +在本教程中,我已经收集了对 Linux 用户10个有用的工具,其中包括各种网络监控,系统审计和一些其它实用的命令,它可以帮助用户提高工作效率。我希望你会喜欢他们。 + +#### 1. w #### + +显示谁登录了系统并执行了哪些程序。 + + $w + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_023.png) + +显示帮助信息 + + $w -h + +(LCTT译注:-h为不显示头部信息) + +显示当前用户信息 + + $w + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_024.png) + +#### 2. nmon #### +Nmon(nigel’s monitor 的简写)是一个显示系统性能信息的工具。 + + $ sudo apt-get install nmon + +---------- + + $ nmon + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_001.png) + +nmon 可以转储与 netwrok,cpu, memory 和磁盘使用情况的信息。 + +**nmon 显示 cpu 信息 (按 c)** + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_002.png) + +**nmon 显示 network 信息 (按 n)** + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_003.png) + +**nman 显示 disk 信息 (按 d)** + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_004.png) + +#### 3. ncdu #### + +是一个基于‘du’的光标版本的命令行程序,这个命令是用来分析各种目录占用的磁盘空间。 + + $apt-get install ncdu + +---------- + + $ncdu / + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_006.png) + +最终的输出: + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_007.png) + +按 n 则通过文件名来排序,按 s 则按文件大小来排序(默认的)。 + +#### 4. slurm #### + +一个基于网络接口的带宽监控命令行程序,它会基于图形来显示 ascii 文件。 + + $ apt-get install slurm + +例如: + + $ slurm -i + +---------- + + $ slurm -i eth1 + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0091.png) + +**选项** + +- 按 **l** 显示 lx/tx 指示灯. +- 按 **c** 切换到经典模式. +- 按 **r** 刷新屏幕. +- 按 **q** 退出. + +#### 5.findmnt #### + +Findmnt 命令用于查找挂载的文件系统。它是用来列出安装设备,当需要时也可以挂载或卸载设备,它也是 util-linux 的一部分。 + +例子: + + $findmnt + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0101.png) + +以列表格式输出。 + + $ findmnt -l + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0111.png) + +列出在 fstab 中挂载的文件系统。 + + $ findmnt -s + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0122.png) + +按文件类型列出已挂载的文件系统。 + + $ findmnt -t ext4 + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0131.png) + +#### 6. dstat #### + +一种组合和灵活的工具,它可用于监控内存,进程,网络和磁盘的性能,它可以用来取代 ifstat, iostat, dmstat 等。 + + $apt-get install dstat + +例如: + +查看有关 cpu,硬盘和网络的详细信息。 + + $ dstat + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0141.png) + +- **-c** cpu + + $ dstat -c + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0151.png) + +显示 cpu 的详细信息。 + + $ dstat -cdl -D sda1 + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_017.png) + +- **-d** 磁盘 + + $ dstat -d + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0161.png) + +#### 7. saidar #### + +另一种基于 CLI 的系统统计数据监控工具,提供了有关磁盘使用,网络,内存,交换等信息。 + + $ sudo apt-get install saidar + +例如: + + $ saidar + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0181.png) + +启用彩色输出 + + $ saider -c + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0191.png) + +#### 8. ss #### + +ss(socket statistics)是一个很好的选择来替代 netstat,它从内核空间收集信息,比 netstat 的性能更好。 + +例如: + +列出所有的连接 + + $ ss |less + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0201.png) + +列出 tcp 流量 + + $ ss -A tcp + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0211.png) + +列出进程名和 pid + + $ ss -ltp + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0221.png) + +#### 9. ccze #### + +一个自定义日志格式的工具 :). + + $ apt-get install ccze + +例如: + + $ tailf /var/log/syslog | ccze + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0231.png) + +列出 ccze 模块: + + $ ccze -l + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0241.png) + +将日志保存为 html 文件。 + + tailf /var/log/syslog | ccze -h > /home/tux/Desktop/rajneesh.html + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_025.png) + +#### 10. ranwhen.py #### + +一种基于 Python 的终端工具,它可以用来以图形方式显示系统活动状态。详细信息以一个丰富多彩的柱状图来展示。 + +安装 python: + + $ sudo apt-add-repository ppa:fkrull/deadsnakes + +更新系统: + + $ sudo apt-get update + +下载 python: + + $ sudo apt-get install python3.2 + +- [下载 ranwhen.py][1] + + $ unzip ranwhen-master.zip && cd ranwhen-master + +运行工具。 + + $ python3.2 ranwhen.py + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_026.png) + +### 结论 ### + +这都是些冷门但重要的 Linux 管理工具。他们可以在日常生活中帮助用户。在我们即将发表的文章中,我们会尽量多带来些管理员/用户工具。 + +玩得愉快! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/10-useful-utilities-linux-users/ + +作者:[Rajneesh Upadhyay][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/rajneesh/ +[1]:https://github.com/p-e-w/ranwhen/archive/master.zip From ba821888382b9e0228de9084309a0c4691686fc7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 15 Oct 2015 09:32:03 +0800 Subject: [PATCH 2260/2517] =?UTF-8?q?20151015-1=20=E9=80=89=E9=A2=98=20RAI?= =?UTF-8?q?D=20=E4=B8=93=E9=A2=98=E7=AC=AC=E4=B9=9D=E7=AF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tware RAID's in Linux with 'Mdadm' Tool.md | 160 ++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 sources/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md diff --git a/sources/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md b/sources/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md new file mode 100644 index 0000000000..06cae1f11f --- /dev/null +++ b/sources/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md @@ -0,0 +1,160 @@ +How to Manage Software RAID’s in Linux with ‘Mdadm’ Tool – Part 9 +================================================================================ +Regardless of your previous experience with RAID arrays, and whether you followed all of the tutorials in [this RAID series][1] or not, managing software RAIDs in Linux is not a very complicated task once you have become acquainted with `mdadm --manage` command. + +![Manage Raid Devices with Mdadm in Linux](http://www.tecmint.com/wp-content/uploads/2015/10/Manage-Raid-with-Mdadm-Tool-in-Linux.jpg) + +Manage Raid Devices with Mdadm in Linux – Part 9 + +In this tutorial we will review the functionality provided by this tool so that you can have it handy when you need it. + +#### RAID Testing Scenario #### + +As in the last article of this series, we will use for simplicity a RAID 1 (mirror) array which consists of two 8 GB disks (/dev/sdb and /dev/sdc) and an initial spare device (/dev/sdd) to illustrate, but the commands and concepts listed herein apply to other types of setups as well. That said, feel free to go ahead and add this page to your browser’s bookmarks, and let’s get started. + +### Understanding mdadm Options and Usage ### + +Fortunately, mdadm provides a `built-in --help` flag that provides explanations and documentation for each of the main options. + +Thus, let’s start by typing: + + # mdadm --manage --help + +to see what are the tasks that `mdadm --manage` will allow us to perform and how: + +![Manage RAID with mdadm Tool](http://www.tecmint.com/wp-content/uploads/2015/10/mdadm-Usage-in-Linux.png) + +Manage RAID with mdadm Tool + +As we can see in the above image, managing a RAID array involves performing the following tasks at one time or another: + +- (Re)Adding a device to the array. +- Mark a device as faulty. +- Removing a faulty device from the array. +- Replacing the faulty device with a spare one. +- Start an array that’s partially built. +- Stop an array. +- Mark an array as ro (read-only) or rw (read-write). + +### Managing RAID Devices with mdadm Tool ### + +Note that if you omit the `--manage` option, mdadm assumes management mode anyway. Keep this fact in mind to avoid running into trouble further down the road. + +The highlighted text in the previous image shows the basic syntax to manage RAIDs: + + # mdadm --manage RAID options devices + +Let’s illustrate with a few examples. + +#### ​Example 1: Add a device to the RAID array #### + +You will typically add a new device when replacing a faulty one, or when you have a spare part that you want to have handy in case of a failure: + + # mdadm --manage /dev/md0 --add /dev/sdd1 + +![Add Device to Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Add-Device-to-Raid-Array.png) + +Add Device to Raid Array + +#### ​Example 2: Marking a RAID device as faulty and removing it from the array #### + +This is a mandatory step before logically removing the device from the array, and later physically pulling it out from the machine – in that order (if you miss one of these steps you may end up causing actual damage to the device): + + # mdadm --manage /dev/md0 --fail /dev/sdb1 + +Note how the spare device added in the previous example is used to automatically replace the failed disk. Not only that, but the [recovery and rebuilding of raid data][2] start immediately as well: + +![Recover and Rebuild Raid Data](http://www.tecmint.com/wp-content/uploads/2015/10/Recover-and-Rebuild-Raid-Data.png) + +Recover and Rebuild Raid Data + +Once the device has been indicated as failed manually, it can be safely removed from the array: + + # mdadm --manage /dev/md0 --remove /dev/sdb1 + +#### ​Example 3: Re-adding a device that was part of the array which had been removed previously #### + +Up to this point, we have a working RAID 1 array that consists of 2 active devices: /dev/sdc1 and /dev/sdd1. If we attempt to re-add /dev/sdb1 to /dev/md0 right now: + + # mdadm --manage /dev/md0 --re-add /dev/sdb1 + +we will run into an error: + +mdadm: --re-add for /dev/sdb1 to /dev/md0 is not possible +because the array is already made up of the maximum possible number of drives. So we have 2 choices: a) add /dev/sdb1 as a spare, as shown in Example #1, or b) remove /dev/sdd1 from the array and then re-add /dev/sdb1. + +We choose option b), and will start by stopping the array to later reassemble it: + + # mdadm --stop /dev/md0 + # mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 + +If the above command does not successfully add /dev/sdb1 back to the array, use the command from Example #1 to do it. + +Although mdadm will initially detect the newly added device as a spare, it will start rebuilding the data and when it’s done doing so, it should recognize the device to be an active part of the RAID: + +![Raid Rebuild Status](http://www.tecmint.com/wp-content/uploads/2015/10/Raid-Rebuild-Status.png) + +Raid Rebuild Status + +#### Example 4: Replace a Raid device with a specific disk #### + +Replacing a disk in the array with a spare one is as easy as: + + # mdadm --manage /dev/md0 --replace /dev/sdb1 --with /dev/sdd1 + +![Replace Raid Device](http://www.tecmint.com/wp-content/uploads/2015/10/Replace-Raid-device.png) + +Replace Raid Device + +This results in the device following the `--with` switch being added to the RAID while the disk indicated through `--replace` being marked as faulty: + +![Check Raid Rebuild Status](http://www.tecmint.com/wp-content/uploads/2015/10/Check-Raid-Rebuild-Status.png) + +Check Raid Rebuild Status + +#### ​Example 5: Marking an Raid array as ro or rw #### + +After creating the array, you must have created a filesystem on top of it and mounted it on a directory in order to use it. What you probably didn’t know then is that you can mark the RAID as ro, thus allowing only read operations to be performed on it, or rw, in order to write to the device as well. + +To mark the device as ro, it needs to be unmounted first: + + # umount /mnt/raid1 + # mdadm --manage /dev/md0 --readonly + # mount /mnt/raid1 + # touch /mnt/raid1/test1 + +![Set Permissions on Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Set-Permissions-on-Raid-Array.png) + +Set Permissions on Raid Array + +To configure the array to allow write operations as well, use the `--readwrite` option. Note that you will need to unmount the device and stop it before setting the rw flag: + + # umount /mnt/raid1 + # mdadm --manage /dev/md0 --stop + # mdadm --assemble /dev/md0 /dev/sdc1 /dev/sdd1 + # mdadm --manage /dev/md0 --readwrite + # touch /mnt/raid1/test2 + +![Allow Read Write Permission on Raid](http://www.tecmint.com/wp-content/uploads/2015/10/Allow-Write-Permission-on-Raid.png) + +Allow Read Write Permission on Raid + +### Summary ### + +Throughout this series we have explained how to set up a variety of software RAID arrays that are used in enterprise environments. If you followed through the articles and the examples provided in these articles you are prepared to leverage the power of software RAIDs in Linux. + +Should you happen to have questions or suggestions, feel free to contact us using the form below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-software-raid-devices-in-linux-with-mdadm/ + +作者:[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/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/recover-data-and-rebuild-failed-software-raid/ \ No newline at end of file From 16a83172114c3cec5bfdf9604c44f87a5ae7c62b Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 15 Oct 2015 09:41:11 +0800 Subject: [PATCH 2261/2517] Revert "translated" This reverts commit 6c146196cb80e9d14d31c1aa3ab5d0985c512fbe. --- ... about built-in kernel modules on Linux.md | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md b/translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md index 3b37ef3c91..d816a975f7 100644 --- a/translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md +++ b/translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md @@ -1,40 +1,42 @@ -Linux有问必答--如何找出Linux中内置模块的信息 +translating----geekpi + +Linux FAQs with Answers--How to find information about built-in kernel modules on Linux ================================================================================ -> **提问**:我想要知道Linux系统中内核内置的模块,以及每个模块的参数。有什么方法可以得到内置模块和设备驱动的列表,以及它们的详细信息呢? +> **Question**: I would like to know what modules are built into the kernel of my Linux system, and what parameters are available in each module. Is there a way to get a list of all built-in kernel modules and device drivers, and find detailed information about them? -现代Linux内核正在随着时间迅速地增长来支持大量的硬件、文件系统和网络功能。在此期间,“可加载模块”的引入防止内核变得越来越臃肿,以及在不同的环境中灵活地扩展功能及硬件支持,而不必重新构建内核。 +The modern Linux kernel has been growing significantly over the years to support a wide variety of hardware devices, file systems and networking functions. During this time, "loadable kernel modules (LKM)" came into being in order to keep the kernel from getting bloated, while flexibly extending its capabilities and hardware support under different environments, without having to rebuild it. -最新的Linux发型版的内核只带了相对较小的“内置模块”,其余的特定硬件驱动或者自定义功能作为“可加载模块”来让你选择地加载或卸载。 +The Linux kernel shipped with the latest Linux distributions comes with relatively a small number of "built-in modules", while the rest of hardware-specific drivers or custom capabilities exist as "loadable modules" which you can selectively load or unload. -内置模块被静态地编译进了内核。不像可加载内核模块可以动态地使用modprobe、insmod、rmmod、modinfo或者lsmod等命令地加载、卸载、查询模块,内置的模块总是在启动是就加载进了内核,不会被这些命令管理。 +The built-in modules are statically compiled into the kernel. Unlike loadable kernel modules which can be dynamically loaded, unloaded, looked up or listed using commands like modprobe, insmod, rmmod, modinfo or lsmod, built-in kernel modules are always loaded in the kernel upon boot-up, and cannot be managed with these commands. -### 找出内置模块列表 ### +### Find a List of Built-in Kernel Modules ### -要得到内置模块列表,运行下面的命令。 +To get a list of all built-in modules, run the following command. $ cat /lib/modules/$(uname -r)/modules.builtin ![](https://farm1.staticflickr.com/697/21481933835_ef6b9c71e1_c.jpg) -你也可以用下面的命令来查看有哪些内置模块: +You can also get a hint on what modules are built-in by running: ![](https://farm6.staticflickr.com/5643/21295025949_57f5849c36_c.jpg) -### 找出内置模块参数 ### +### Find Parameters of Built-in Kernel Modules ### -每个内核模块无论是内置的还是可加载的都有一系列的参数。对于可加载模块,modinfo命令显示它们的参数信息。然而这个命令不对内置模块管用。你会得到下面的错误。 +Each kernel module, whether it's built-in or loadable, comes with a set of parameters. For loadable kernel modules, the modinfo command will show parameter information about them. However, this command will not work with built-in modules. You will simply get the following error. modinfo: ERROR: Module XXXXXX not found. -如果你想要查看内置模块的参数,以及它们的值,你可以在**/sys/module** 下检查它们的内容。 +If you want to check what parameters are available in a given built-in module, and what their values are, you can instead examine the content in **/sys/module** directory. -在 /sys/module目录下,你可以找到内核模块(包含内置和可加载的)命名的子目录。结合则进入每个模块目录,这里有个“parameters”目录,列出了这个模块所有的参数。 +Under /sys/module directory, you will find sub-directories named after existing kernel modules (both built-in and loadable). Then in each module directory, there is a directory named "parameters", which lists all available parameters for the module. -比如你要找出tcp_cubic(内核默认的TCP实现)模块的参数。你可以这么做: +For example, let's say you want to find out parameters of a built-in module called tcp_cubic (the default TCP implementation of the kernel). Then you can do this: $ ls /sys/module/tcp_cubic/parameters -接着阅读这个文件查看每个参数的值。 +And check the value of each parameter by reading a corresponding file. $ cat /sys/module/tcp_cubic/parameters/tcp_friendliness @@ -45,7 +47,7 @@ Linux有问必答--如何找出Linux中内置模块的信息 via: http://ask.xmodulo.com/find-information-builtin-kernel-modules-linux.html 作者:[Dan Nanni][a] -译者:[geekpi](https://github.com/geekpi) +译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 302c1dba0d535eb21037c4112bf04ea03ed0237f Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 15 Oct 2015 09:43:29 +0800 Subject: [PATCH 2262/2517] =?UTF-8?q?20151015-2=20=E9=80=89=E9=A2=98=20uni?= =?UTF-8?q?cornx=20=E6=8E=A8=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...borative Group to Speed Real-Time Linux.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md diff --git a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md new file mode 100644 index 0000000000..f05fd4cf07 --- /dev/null +++ b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md @@ -0,0 +1,78 @@ +New Collaborative Group to Speed Real-Time Linux +================================================================================ +![](http://www.linux.com/images/stories/66866/Tux-150.png) + +Tux-150The Linux Foundation’s [announcement][1] at LinuxCon this week that it was assuming funding control over the Real-Time Linux project gave renewed hope that embedded Linux will complete its 15-year campaign to achieve equivalence with RTOSes in real-time operations. The RTL group is being reinvigorated as a Real-Time Linux Collaborative Project, with better funding, more developers, and closer integration with mainline kernel development. + +According to the Linux Foundation, moving RTL under its umbrella “will save the industry millions of dollars in research and development.” The move will also “improve quality of the code through robust upstream kernel test infrastructure,” says the Foundation. + +Over the past decade, the RTL project has been overseen, and more recently, funded, by the [Open Source Automation Development Lab][2], which is continuing on as a Gold member of the new collaborative project, but will hand funding duties over to the Linux Foundation in January. The RTL project and [OSADL][3] have been responsible for maintaining the RT-Preempt (or [Preempt-RT][4]) patches, and periodically updating them to mainline Linux. + +The task is about 90 percent complete, according to Dr. Carsten Emde, longtime General Manager of OSADL. “It’s like building a house,” he explains. “The main components such as the walls, windows, and doors are already in place, or in our case, things like high-resolution timers, interrupt threads, and priority-inheritance mutexes. But then you need all these little bits and pieces such as carpets and wallpaper to finish the job.” + +According to Emde, real-time Linux is already technologically equivalent to most real-time operating systems – assuming you’re willing to hassle with all the patches. “The goal of the project was to provide a Linux system with a predefined deterministic worst-case latency and nothing else,” says Emde. “This goal is reached today when a kernel is patched, and the same goal will be reached when a future unpatched mainline RT kernel will be used. The only – of course important – difference is that the maintenance work will be much less when we do no longer need to continually adapt off-tree components to mainline.” + +The RTL Collaborative Group will continue under the guidance of Thomas Gleixner, the key maintainer over the past decade. This week, Gleixner was appointed a Linux Foundation Fellow, joining a select group that includes Linux kernel stable maintainer Greg Kroah-Hartman, Yocto Project maintainer Richard Purdie, and Linus Torvalds. + +According to Emde, RTL’s secondary maintainer Steven Rostedt of Red Hat, who “maintains older but still maintained kernel versions,” will continue to participate in the project along with Red Hat’s Ingo Molnàr, who was a key developer of RTL, but in recent years has had more of an advisory position. Somewhat surprisingly, however, Red Hat is not one of the RTL Collaborative Group’s members. Instead, Google takes the top spot as the lone Platinum member, while Gold members include National Instruments (NI), OSADL, and Texas Instruments (TI). Silver members include Altera, ARM, Intel, and IBM. + +### The Long Road to Real Time ### + +When Linux first appeared in embedded devices more than 15 years ago, it faced an embedded computing market dominated by RTOSes such as Wind River’s VxWorks, which continue to offer highly deterministic, hardened kernels required by many industrial, avionics, and transportation applications. Like Microsoft’s already then established – and more real-time – Windows CE, Linux faced resistance and outright mockery from potential industrial clients. These desktop-derived distributions might be okay for lightweight consumer electronics, it was argued, but they lacked the hardened, kernels that made RTOSes the choice for devices that required deterministic task scheduling for split-second reliability. + +Improving Linux’s real-time capabilities was an [early goal][5] of embedded Linux pioneers such as [MontaVista][6]. Over the years, RTL development was accelerated and formalized in various groups such as OSADL, which [was founded in 2006][7], as well as the Real-Time Linux Foundation (RTLF). When RTLF [merged with OSADL][8] in 2009, OSADL and its RTL group took full ownership over the PREEMPT-RT patch maintenance and upstreaming process. OSADL also oversees other automation-related projects such as [Safety Critical Linux][9]. + +OSADL’s stewardship over RTL progressed in three stages: advocacy and outreach, testing and quality assessment, and finally, funding. Early on, OSADL’s role was to write articles, make presentations, organize training, and “spread the word” about the advantages of RTL, says Emde. “To introduce a new technology such as Linux and its community-based development model into the rather conservative automation industry required first of all to build confidence,” he says. “Switching from a proprietary RTOS to Linux means that companies must introduce new strategies and processes in order to interact with a community.” + +Later, OSADL moved on to providing technical performance data, establishing [a quality assessment and testing center][10], and providing assistance to its industrial members in open source legal compliance and safety certifications. + +As RTL grew more mature, pulling even with the fading Windows CE in real-time capabilities and increasingly [cutting into RTOS market share][11], rival real-time Linux projects – principally [Xenomai][12] – have begun to integrate with it. + +“The success of the RT patches, and the clear prospective that they would eventually be merged completely, has led to a change of focus at Xenomai,” says Emde. “Xenomai 3.0 can be used in combination with the RT patches and provide so-called ‘skins’ that allow you to recycle real-time source code that was written for other systems. They haven’t been completely unified, however, since Xenomai uses a dual kernel approach whereas the RT patches apply only to a single Linux kernel.” + +In more recent years, the RTL group’s various funding sources have dropped off, and OSADL took on that role, too. “When the development recently slowed down a bit because of a lack of funding, OSADL started its third milestone by directly funding Thomas Gleixner's work,” says Emde. + +As Emde wrote in an [Oct. 5 blog entry][13], the growing expansion of Real-Time Linux beyond its core industrial base to areas like automotive and telecom suggested that the funding should be expanded as well. “It would not be entirely fair to let the automation industry fund the complete remaining work on its own, since other industries such as telecommunication also rely on the availability of a deterministic Linux kernel,” wrote Emde. + +When the Linux Foundation showed interest in expanding its funding role, OSADL decided it would be “much more efficient to have a single funding and control channel,” says Emde. He adds, however, that as a Gold member, OSADL is still participating in the oversight of the project, and will continue its advocacy and quality assurance activities. + +### Automotive Looks for Real-Time Boost ### + +RTL will continue to see its greatest growth in industrial applications where it will gradually replace RTOS applications, says Emde. Yet, it is also growing quickly in automotive, and will later spread to railway and avionics, he adds. + +Indeed, the growing role of Linux in automotive appears to be key to the Linux Foundation’s goals for RTL, with potential collaborations with its [Automotive Grade Linux][14] (AGL) workgroup. Automotive may also be the chief motivator for Google’s high-profile participation, speculates Emde. In addition, TI is deeply involved with automotive with its Jacinto processors. + +Linux-oriented automotive projects like AGL aim to move Linux beyond in-vehicle infotainment (IVI) into cluster controls and telematics where RTOSes like QNX dominate. Autonomous vehicles are even in greater need of real-time performance. + +Emde notes that OSADL's [SIL2LinuxMP][15] project may play an important role in extending RTL into automotive. SIL2LinuxMP is not an automotive-specific project, but BMW is participating, and automotive is one of the key applications. The project aims to certify base components required for RTL to run on a single- or multi-core COTS board. It defines bootloader, root filesystem, Linux kernel, and C library bindings to access RTL. + +Autonomous drones and robots are also ripe for real-time, and Xenomai is already used in many robots, as well as some drones. Yet, RTL’s role will be limited in the wider embedded Linux world of consumer electronics and Internet of Things applications. The main barrier is the latency of wireless communications and the Internet itself. + +“Real-time Linux will have a role within machine control and between machines and peripheral devices, but less between remote machines,” says Emde. “Real-time via Internet will probably never be possible.” + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/news/software/applications/858828-new-collaborative-group-to-speed-real-time-linux + +作者:[Eric Brown][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/42808 +[1]:http://www.linuxfoundation.org/news-media/announcements/2015/10/linux-foundation-announces-project-advance-real-time-linux +[2]:http://archive.linuxgizmos.com/celebrating-the-open-source-automation-development-labs-first-birthday/ +[3]:https://www.osadl.org/ +[4]:http://linuxgizmos.com/adding-real-time-to-linux-with-preempt-rt/ +[5]:http://archive.linuxgizmos.com/real-time-linux-what-is-it-why-do-you-want-it-how-do-you-do-it-a/ +[6]:http://www.linux.com/news/embedded-mobile/mobile-linux/841651-embedded-linux-pioneer-montavista-spins-iot-linux-distribution +[7]:http://archive.linuxgizmos.com/industry-group-aims-linux-at-automation-apps/ +[8]:http://archive.linuxgizmos.com/industrial-linux-groups-merge/ +[9]:https://www.osadl.org/Safety-Critical-Linux.safety-critical-linux.0.html +[10]:http://www.osadl.org/QA-Farm-Realtime.qa-farm-about.0.html +[11]:http://www.linux.com/news/embedded-mobile/mobile-linux/818011-embedded-linux-keeps-growing-amid-iot-disruption-says-study +[12]:http://xenomai.org/ +[13]:https://www.osadl.org/Single-View.111+M5dee6946dab.0.html +[14]:http://www.linux.com/news/embedded-mobile/mobile-linux/833358-first-open-automotive-grade-linux-spec-released +[15]:http://www.osadl.org/SIL2LinuxMP.sil2-linux-project.0.html \ No newline at end of file From 7a0670db88d5163da3d39783b5b122d7568d82fa Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 15 Oct 2015 09:47:57 +0800 Subject: [PATCH 2263/2517] Revert "Revert "translated"" This reverts commit 16a83172114c3cec5bfdf9604c44f87a5ae7c62b. --- ... about built-in kernel modules on Linux.md | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md b/translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md index d816a975f7..3b37ef3c91 100644 --- a/translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md +++ b/translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md @@ -1,42 +1,40 @@ -translating----geekpi - -Linux FAQs with Answers--How to find information about built-in kernel modules on Linux +Linux有问必答--如何找出Linux中内置模块的信息 ================================================================================ -> **Question**: I would like to know what modules are built into the kernel of my Linux system, and what parameters are available in each module. Is there a way to get a list of all built-in kernel modules and device drivers, and find detailed information about them? +> **提问**:我想要知道Linux系统中内核内置的模块,以及每个模块的参数。有什么方法可以得到内置模块和设备驱动的列表,以及它们的详细信息呢? -The modern Linux kernel has been growing significantly over the years to support a wide variety of hardware devices, file systems and networking functions. During this time, "loadable kernel modules (LKM)" came into being in order to keep the kernel from getting bloated, while flexibly extending its capabilities and hardware support under different environments, without having to rebuild it. +现代Linux内核正在随着时间迅速地增长来支持大量的硬件、文件系统和网络功能。在此期间,“可加载模块”的引入防止内核变得越来越臃肿,以及在不同的环境中灵活地扩展功能及硬件支持,而不必重新构建内核。 -The Linux kernel shipped with the latest Linux distributions comes with relatively a small number of "built-in modules", while the rest of hardware-specific drivers or custom capabilities exist as "loadable modules" which you can selectively load or unload. +最新的Linux发型版的内核只带了相对较小的“内置模块”,其余的特定硬件驱动或者自定义功能作为“可加载模块”来让你选择地加载或卸载。 -The built-in modules are statically compiled into the kernel. Unlike loadable kernel modules which can be dynamically loaded, unloaded, looked up or listed using commands like modprobe, insmod, rmmod, modinfo or lsmod, built-in kernel modules are always loaded in the kernel upon boot-up, and cannot be managed with these commands. +内置模块被静态地编译进了内核。不像可加载内核模块可以动态地使用modprobe、insmod、rmmod、modinfo或者lsmod等命令地加载、卸载、查询模块,内置的模块总是在启动是就加载进了内核,不会被这些命令管理。 -### Find a List of Built-in Kernel Modules ### +### 找出内置模块列表 ### -To get a list of all built-in modules, run the following command. +要得到内置模块列表,运行下面的命令。 $ cat /lib/modules/$(uname -r)/modules.builtin ![](https://farm1.staticflickr.com/697/21481933835_ef6b9c71e1_c.jpg) -You can also get a hint on what modules are built-in by running: +你也可以用下面的命令来查看有哪些内置模块: ![](https://farm6.staticflickr.com/5643/21295025949_57f5849c36_c.jpg) -### Find Parameters of Built-in Kernel Modules ### +### 找出内置模块参数 ### -Each kernel module, whether it's built-in or loadable, comes with a set of parameters. For loadable kernel modules, the modinfo command will show parameter information about them. However, this command will not work with built-in modules. You will simply get the following error. +每个内核模块无论是内置的还是可加载的都有一系列的参数。对于可加载模块,modinfo命令显示它们的参数信息。然而这个命令不对内置模块管用。你会得到下面的错误。 modinfo: ERROR: Module XXXXXX not found. -If you want to check what parameters are available in a given built-in module, and what their values are, you can instead examine the content in **/sys/module** directory. +如果你想要查看内置模块的参数,以及它们的值,你可以在**/sys/module** 下检查它们的内容。 -Under /sys/module directory, you will find sub-directories named after existing kernel modules (both built-in and loadable). Then in each module directory, there is a directory named "parameters", which lists all available parameters for the module. +在 /sys/module目录下,你可以找到内核模块(包含内置和可加载的)命名的子目录。结合则进入每个模块目录,这里有个“parameters”目录,列出了这个模块所有的参数。 -For example, let's say you want to find out parameters of a built-in module called tcp_cubic (the default TCP implementation of the kernel). Then you can do this: +比如你要找出tcp_cubic(内核默认的TCP实现)模块的参数。你可以这么做: $ ls /sys/module/tcp_cubic/parameters -And check the value of each parameter by reading a corresponding file. +接着阅读这个文件查看每个参数的值。 $ cat /sys/module/tcp_cubic/parameters/tcp_friendliness @@ -47,7 +45,7 @@ And check the value of each parameter by reading a corresponding file. via: http://ask.xmodulo.com/find-information-builtin-kernel-modules-linux.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a7b6c7ee5c30001c34611715db24f8ebca5bf44d Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 15 Oct 2015 09:54:53 +0800 Subject: [PATCH 2264/2517] Revert "translated" This reverts commit c6ff7fc4596ef3a0ce963f720ac79c98f4174866. --- ... device permission permanently on Linux.md | 55 +++++++++++++++++++ ... device permission permanently on Linux.md | 54 ------------------ 2 files changed, 55 insertions(+), 54 deletions(-) create mode 100644 sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md delete mode 100644 translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md b/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md new file mode 100644 index 0000000000..4c07c48f90 --- /dev/null +++ b/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md @@ -0,0 +1,55 @@ +translating----geekpi + +Linux FAQs with Answers--How to change USB device permission permanently on Linux +================================================================================ +> **Question**: I am trying to run gpsd on my Linux with a USB GPS receiver. However, I am getting the following errors from gpsd. +> +> gpsd[377]: gpsd:ERROR: read-only device open failed: Permission denied +> gpsd[377]: gpsd:ERROR: /dev/ttyUSB0: device activation failed. +> gpsd[377]: gpsd:ERROR: device open failed: Permission denied - retrying read-only +> +> Looks like gpsd does not have permission to access the USB device (/dev/ttyUSB0). How can I change its default permission mode permanently on Linux? + +When you run a process that wants to read or write to a USB device, the user/group of the process must have appropriate permission to do so. Of course you can change the permission of your USB device manually with chmod command, but such manual permission change will be temporary. The USB device will revert to its default permission mode when you reboot your Linux machine. + +![](https://farm6.staticflickr.com/5741/20848677843_202ff53303_c.jpg) + +As a permanent solution, you can create a udev-based USB permission rule which assigns any custom permission mode of your choice. Here is how to do it. + +First, you need to identify the vendorID and productID of your USB device. For that, use lsusb command. + + $ lsusb -vvv + +![](https://farm1.staticflickr.com/731/20848677743_39f76eb403_c.jpg) + +From the lsusb output, find your USB device's entry, and look for "idVendor" and "idProduct" fields. In this example, we have idVendor (0x067b) and idProduct (0x2303). + +Next, create a new udev rule as follows. + + $ sudo vi /etc/udev/rules.d/50-myusb.rules + +---------- + + SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GROUP="users", MODE="0666" + +Replace "idVendor" and "idProduct" values with your own. **MODE="0666"** indicates the preferred permission of the USB device. + +Now reboot your machine or reload udev rules: + + $ sudo udevadm control --reload + +Then verify the permission of the USB device. + +![](https://farm1.staticflickr.com/744/21282872179_9a4a05d768_b.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/change-usb-device-permission-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://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md b/translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md deleted file mode 100644 index 533bbfad5b..0000000000 --- a/translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md +++ /dev/null @@ -1,54 +0,0 @@ -Linux有问必答 -- 如何在LInux中永久修改USB设备权限 -================================================================================ -> **提问**:当我尝试在Linux中运行USB GPS接收器时我遇到了下面来自gpsd的错误。 -> -> gpsd[377]: gpsd:ERROR: read-only device open failed: Permission denied -> gpsd[377]: gpsd:ERROR: /dev/ttyUSB0: device activation failed. -> gpsd[377]: gpsd:ERROR: device open failed: Permission denied - retrying read-only -> -> 看上去gpsd没有权限访问USB设备(/dev/ttyUSB0)。我该如何永久修改它在Linux上的权限? - -当你在运行一个会读取或者写入USB设备的进程时,进程的用户/组必须有权限这么做。当然你可以手动用chmod命令改变USB设备的权限,但是手动的权限改变只是暂时的。USB设备会在下次重启时恢复它的默认权限。 - -![](https://farm6.staticflickr.com/5741/20848677843_202ff53303_c.jpg) - -作为一个永久的方式,你可以创建一个基于udev的USB权限规则,它可以根据你的选择分配任何权限模式。下面是该如何做。 - -首先,你需要找出USB设备的vendorID和productID。使用lsusb命令。 - - $ lsusb -vvv - -![](https://farm1.staticflickr.com/731/20848677743_39f76eb403_c.jpg) - -上面lsusb的输出中,找出你的USB设备,并找出"idVendor"和"idProduct"字段。本例中,我们的结果是idVendor (0x067b)和 idProduct (0x2303) - -下面创建一个新的udev规则。 - - $ sudo vi /etc/udev/rules.d/50-myusb.rules - ----------- - - SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GROUP="users", MODE="0666" - -用你自己的"idVendor"和"idProduct"来替换。**MODE="0666"**表示USB设备的权限。 - -现在重启电脑并重新加载udev规则: - - $ sudo udevadm control --reload - -Then verify the permission of the USB device. -接着验证USB设备的权限。 - -![](https://farm1.staticflickr.com/744/21282872179_9a4a05d768_b.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/change-usb-device-permission-linux.html - -作者:[Dan Nanni][a] -译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni From e35307ccec1bb7f4744cdf42998a280311b74fb2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 15 Oct 2015 09:57:45 +0800 Subject: [PATCH 2265/2517] Update 20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md --- ... device permission permanently on Linux.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md b/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md index 4c07c48f90..533bbfad5b 100644 --- a/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md +++ b/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md @@ -1,30 +1,28 @@ -translating----geekpi - -Linux FAQs with Answers--How to change USB device permission permanently on Linux +Linux有问必答 -- 如何在LInux中永久修改USB设备权限 ================================================================================ -> **Question**: I am trying to run gpsd on my Linux with a USB GPS receiver. However, I am getting the following errors from gpsd. +> **提问**:当我尝试在Linux中运行USB GPS接收器时我遇到了下面来自gpsd的错误。 > > gpsd[377]: gpsd:ERROR: read-only device open failed: Permission denied > gpsd[377]: gpsd:ERROR: /dev/ttyUSB0: device activation failed. > gpsd[377]: gpsd:ERROR: device open failed: Permission denied - retrying read-only > -> Looks like gpsd does not have permission to access the USB device (/dev/ttyUSB0). How can I change its default permission mode permanently on Linux? +> 看上去gpsd没有权限访问USB设备(/dev/ttyUSB0)。我该如何永久修改它在Linux上的权限? -When you run a process that wants to read or write to a USB device, the user/group of the process must have appropriate permission to do so. Of course you can change the permission of your USB device manually with chmod command, but such manual permission change will be temporary. The USB device will revert to its default permission mode when you reboot your Linux machine. +当你在运行一个会读取或者写入USB设备的进程时,进程的用户/组必须有权限这么做。当然你可以手动用chmod命令改变USB设备的权限,但是手动的权限改变只是暂时的。USB设备会在下次重启时恢复它的默认权限。 ![](https://farm6.staticflickr.com/5741/20848677843_202ff53303_c.jpg) -As a permanent solution, you can create a udev-based USB permission rule which assigns any custom permission mode of your choice. Here is how to do it. +作为一个永久的方式,你可以创建一个基于udev的USB权限规则,它可以根据你的选择分配任何权限模式。下面是该如何做。 -First, you need to identify the vendorID and productID of your USB device. For that, use lsusb command. +首先,你需要找出USB设备的vendorID和productID。使用lsusb命令。 $ lsusb -vvv ![](https://farm1.staticflickr.com/731/20848677743_39f76eb403_c.jpg) -From the lsusb output, find your USB device's entry, and look for "idVendor" and "idProduct" fields. In this example, we have idVendor (0x067b) and idProduct (0x2303). +上面lsusb的输出中,找出你的USB设备,并找出"idVendor"和"idProduct"字段。本例中,我们的结果是idVendor (0x067b)和 idProduct (0x2303) -Next, create a new udev rule as follows. +下面创建一个新的udev规则。 $ sudo vi /etc/udev/rules.d/50-myusb.rules @@ -32,13 +30,14 @@ Next, create a new udev rule as follows. SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GROUP="users", MODE="0666" -Replace "idVendor" and "idProduct" values with your own. **MODE="0666"** indicates the preferred permission of the USB device. +用你自己的"idVendor"和"idProduct"来替换。**MODE="0666"**表示USB设备的权限。 -Now reboot your machine or reload udev rules: +现在重启电脑并重新加载udev规则: $ sudo udevadm control --reload Then verify the permission of the USB device. +接着验证USB设备的权限。 ![](https://farm1.staticflickr.com/744/21282872179_9a4a05d768_b.jpg) @@ -47,7 +46,7 @@ Then verify the permission of the USB device. via: http://ask.xmodulo.com/change-usb-device-permission-linux.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 384797786e73419101306a134dd03bf2ea09cb79 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 15 Oct 2015 09:58:15 +0800 Subject: [PATCH 2266/2517] Rename sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md to translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md --- ...s--How to change USB device permission permanently on Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md (100%) diff --git a/sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md b/translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md similarity index 100% rename from sources/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md rename to translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md From 3f41271b07c11f87fcafc43fa9022f401e66e544 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 15 Oct 2015 10:22:20 +0800 Subject: [PATCH 2267/2517] =?UTF-8?q?unicornx=20=E8=AE=A4=E9=A2=86?= =?UTF-8?q?=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0151015 New Collaborative Group to Speed Real-Time Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md index f05fd4cf07..3c0f618f63 100644 --- a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md +++ b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md @@ -1,3 +1,4 @@ +unicornx 翻译中... ... New Collaborative Group to Speed Real-Time Linux ================================================================================ ![](http://www.linux.com/images/stories/66866/Tux-150.png) @@ -55,7 +56,7 @@ Autonomous drones and robots are also ripe for real-time, and Xenomai is already via: http://www.linux.com/news/software/applications/858828-new-collaborative-group-to-speed-real-time-linux 作者:[Eric Brown][a] -译者:[译者ID](https://github.com/译者ID) +译者:[unicornx](https://github.com/unicornx) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8f0352b6b65f8ac8ff339903ae5a5184009e7ad6 Mon Sep 17 00:00:00 2001 From: alim0x Date: Thu, 15 Oct 2015 20:19:05 +0800 Subject: [PATCH 2268/2517] [translated]Mytodo--A ToDo List Manager For DIY Lovers --- ...odo--A ToDo List Manager For DIY Lovers.md | 57 ------------------- ...odo--A ToDo List Manager For DIY Lovers.md | 55 ++++++++++++++++++ 2 files changed, 55 insertions(+), 57 deletions(-) delete mode 100644 sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md create mode 100644 translated/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md diff --git a/sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md b/sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md deleted file mode 100644 index 0bac6cc4d0..0000000000 --- a/sources/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md +++ /dev/null @@ -1,57 +0,0 @@ -alim0x translating - -Mytodo: A ToDo List Manager For DIY Lovers -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-Linux.jpg) - -Usually, I focus on applications that are hassle free and easy to use (read GUI oriented). That’s the reason why I included [Go For It][1] to do program in the list of [Linux productivity tools][2]. Today, I am going to show you yet another to-do list application that is slightly different than the rest. - -[Mytodo][3] is an open source to-do list program that puts you, the user, in command of everything. Unlike most other similar programs, Mytodo is more DIY hobbyist oriented because it lets you configure the server (if you want to use it on multiple computers), provides a command line interface among other main features. - -It is written in Python and thus it could be used in all Linux distros and other operating systems such as Windows. - -Some of the main features of Mytodo are: - -- Both GUI and command line interface -- Configure your own server -- Add users/password -- Written in Python -- Searchable by tag -- To-do list list can be displayed as [Conky][4] - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list.jpeg) - -GUI - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list-cli.jpeg) - -Command Line - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list-conky.jpeg) - -Conky displaying to-do list - -You can find the source code and configuration instructions on the Github link below: - -- [Download and Configure Mytodo ][5] - -While some people might not like all this command line and configuration part, but it certainly has its own pleasure. I let you try and decide if Mytodo suits our need and taste. - -Image credit: https://pixabay.com/en/to-do-list-task-list-notes-written-734587 - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/mytodo-list-manager/ - -作者:[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://itsfoss.com/go-for-it-to-do-app-in-linux/ -[2]:http://itsfoss.com/productivity-tips-ubuntu/ -[3]:https://github.com/mohamed-aziz/mytodo -[4]:http://itsfoss.com/conky-gui-ubuntu-1304/ -[5]:https://github.com/mohamed-aziz/mytodo diff --git a/translated/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md b/translated/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md new file mode 100644 index 0000000000..881f81e868 --- /dev/null +++ b/translated/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md @@ -0,0 +1,55 @@ +Mytodo: 为 DIY 爱好者准备的待办事项管理软件 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-Linux.jpg) + +通常我关注的软件都是那些不用折腾并且易用的(对图形界面而言)。这就是我把 [Go For It][1] 待办事项程序归到 [Linux 生产力工具][2] 列表的原因。今天,我要向你们展示另一款待办事项列表应用,和其它的待办事项软件有点不一样。 + +[Mytodo][3] 是个开源的待办事项列表程序,让你能够掌管一切。与其它类似的程序不同的是,Mytodo 更加面向 DIY 爱好者,因为它允许你配置服务器(如果你想在多台电脑上使用的话),除了主要的功能外还提供一个命令行界面。 + +它是用 Python 编写的,因此可以在所有 Linux 发行版以及其它操作系统,比如 Windows 上使用。 + +Mytodo 的一些主要特性: + +- 同时拥有图形界面和命令行界面 +- 配置你自己的服务器 +- 添加用户/密码 +- Python 编写 +- 可根据标签搜索 +- 待办事项可以在 [Conky][4] 显示 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list.jpeg) + +图形界面 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list-cli.jpeg) + +命令行 + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list-conky.jpeg) + +Conky 显示着待办事项 + +你可以在下面的 Github 链接里找到源码和配置介绍: + +- [下载和配置 Mytodo ][5] + +尽管有些人可能不大喜欢命令行和配置部分的内容,但它自然有它的乐趣所在。我建议你自己尝试一下,看看 Mytodo 是否符合我们的需求和口味。 + +图片致谢: https://pixabay.com/en/to-do-list-task-list-notes-written-734587 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/mytodo-list-manager/ + +作者:[Abhishek][a] +译者:[alim0x](https://github.com/alim0x) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ +[2]:http://itsfoss.com/productivity-tips-ubuntu/ +[3]:https://github.com/mohamed-aziz/mytodo +[4]:http://itsfoss.com/conky-gui-ubuntu-1304/ +[5]:https://github.com/mohamed-aziz/mytodo From fafc65f88da019363396c0cf42efe7637e908a05 Mon Sep 17 00:00:00 2001 From: unicornx Date: Thu, 15 Oct 2015 22:41:20 +0800 Subject: [PATCH 2269/2517] in progressing --- ...borative Group to Speed Real-Time Linux.md | 51 ++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md index 3c0f618f63..e807c0052a 100644 --- a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md +++ b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md @@ -3,54 +3,103 @@ New Collaborative Group to Speed Real-Time Linux ================================================================================ ![](http://www.linux.com/images/stories/66866/Tux-150.png) -Tux-150The Linux Foundation’s [announcement][1] at LinuxCon this week that it was assuming funding control over the Real-Time Linux project gave renewed hope that embedded Linux will complete its 15-year campaign to achieve equivalence with RTOSes in real-time operations. The RTL group is being reinvigorated as a Real-Time Linux Collaborative Project, with better funding, more developers, and closer integration with mainline kernel development. +The Linux Foundation’s [announcement][1] at LinuxCon this week that it was assuming funding control over the Real-Time Linux project gave renewed hope that embedded Linux will complete its 15-year campaign to achieve equivalence with RTOSes in real-time operations. The RTL group is being reinvigorated as a Real-Time Linux Collaborative Project, with better funding, more developers, and closer integration with mainline kernel development. + +在本周的Linux大会活动(LinuxCon)上Linux基金会(Linux Foundation)[宣称][1],“Real-Time + Linux”项目(译者注:实时Linux操作系统项目,简称RTL)得到了新的资金支持,并预期这将促进该项目,使其自成立15年来第一次有机会在实时操作性上和其他的实时操作系统一较高下。Linux基金会将RTL项目重组为一个新的项目,并命名为“Real-Time Linux Collaborative Project”,该项目将获得更有力的资金支持,更多的开发人员将投入其中,并在开发和集成上和内核主线保持更紧密的联系。 According to the Linux Foundation, moving RTL under its umbrella “will save the industry millions of dollars in research and development.” The move will also “improve quality of the code through robust upstream kernel test infrastructure,” says the Foundation. +根据Linux基金会的说法,RTL项目并入Linux基金会后“将为业界节省数百万美元的重复研发费用。”同时此举也将“通过基于稳定的主线内核版本开发而改善本项目的代码质量”。 + Over the past decade, the RTL project has been overseen, and more recently, funded, by the [Open Source Automation Development Lab][2], which is continuing on as a Gold member of the new collaborative project, but will hand funding duties over to the Linux Foundation in January. The RTL project and [OSADL][3] have been responsible for maintaining the RT-Preempt (or [Preempt-RT][4]) patches, and periodically updating them to mainline Linux. +在过去的十几年中,RTL项目的开发管理和经费资助主要由[开源自动化开发实验室(译者注:Open Source Automation Development Lab,简称OSADL)] [2]承担,其将继续作为新合作项目的金牌成员之一,但其原来承担的资金资助工作将会在一月份移交给Linux基金。RTL项目和[OSADL][3]长久以来一直负责维护[内核的实时抢占(RT-Preempt)补丁][4],并定期将其更新到Linux内核的主线上。 + The task is about 90 percent complete, according to Dr. Carsten Emde, longtime General Manager of OSADL. “It’s like building a house,” he explains. “The main components such as the walls, windows, and doors are already in place, or in our case, things like high-resolution timers, interrupt threads, and priority-inheritance mutexes. But then you need all these little bits and pieces such as carpets and wallpaper to finish the job.” +按长期以来一直担任OSADL总经理的Carsten Emde博士的话说,支持内核实时特性的工作已经完成了将近90%。 “这就像盖房子,”他解释说。 “主要的部件,如墙壁,窗户和门都已经安装到位,就实时内核来说,类似的主要部件譬如:高精度定时器(high-resolution timers),中断线程化机制(interrupt threads)和基于优先级可继承的互斥量(priority-inheritance mutexes)等。你所剩下的工作就是还需要一些小零碎,如地毯和墙纸来完成最终的工程。“ + +PC <== + According to Emde, real-time Linux is already technologically equivalent to most real-time operating systems – assuming you’re willing to hassle with all the patches. “The goal of the project was to provide a Linux system with a predefined deterministic worst-case latency and nothing else,” says Emde. “This goal is reached today when a kernel is patched, and the same goal will be reached when a future unpatched mainline RT kernel will be used. The only – of course important – difference is that the maintenance work will be much less when we do no longer need to continually adapt off-tree components to mainline.” +据昂德,实时Linux已经是技术上等同于大多数实时操作系统 - 假设你愿意麻烦地把所有补丁。 “该项目的目标是提供一个Linux系统预定义的确定性最坏情况下的延迟,没有别的,”昂德说。 “这个目标是走到了今天,当一个内核补丁,并在未来的未打补丁的主线RT内核将使用相同的目标一定会达到。唯一的 - 当然重要的 - 不同的是,维修工作会少得多,当我们不再需要关闭树组件主线不断地适应“。 + The RTL Collaborative Group will continue under the guidance of Thomas Gleixner, the key maintainer over the past decade. This week, Gleixner was appointed a Linux Foundation Fellow, joining a select group that includes Linux kernel stable maintainer Greg Kroah-Hartman, Yocto Project maintainer Richard Purdie, and Linus Torvalds. +在RTL协作组将继续托马斯Gleixner,关键维护者在过去十年的指导下进行。本周,Gleixner被任命为Linux基金会研究员,加入一个选择组,其中包括Linux内核维护者稳定格雷格Kroah-Hartman的,Yocto计划维护者理查德Purdie和Linus Torvalds公司。 + According to Emde, RTL’s secondary maintainer Steven Rostedt of Red Hat, who “maintains older but still maintained kernel versions,” will continue to participate in the project along with Red Hat’s Ingo Molnàr, who was a key developer of RTL, but in recent years has had more of an advisory position. Somewhat surprisingly, however, Red Hat is not one of the RTL Collaborative Group’s members. Instead, Google takes the top spot as the lone Platinum member, while Gold members include National Instruments (NI), OSADL, and Texas Instruments (TI). Silver members include Altera, ARM, Intel, and IBM. +据昂德,红帽的RTL的二级维护史蒂芬Rostedt,谁“维护旧的,但仍然保持内核版本,”将继续参与该项目与Red Hat的英格·蒙内,谁是RTL的主要开发者,但近年来已经有更多的咨询地位。有些令人惊讶,然而,红帽不是RTL协作组的成员之一。相反,谷歌采取的头把交椅作为唯一的白金会员,黄金会员包括美国国家仪器公司(NI),OSADL和德州仪器(TI)。银卡会员包括Altera公司,ARM,英特尔和IBM。 + ### The Long Road to Real Time ### +###的漫长道路实时### When Linux first appeared in embedded devices more than 15 years ago, it faced an embedded computing market dominated by RTOSes such as Wind River’s VxWorks, which continue to offer highly deterministic, hardened kernels required by many industrial, avionics, and transportation applications. Like Microsoft’s already then established – and more real-time – Windows CE, Linux faced resistance and outright mockery from potential industrial clients. These desktop-derived distributions might be okay for lightweight consumer electronics, it was argued, but they lacked the hardened, kernels that made RTOSes the choice for devices that required deterministic task scheduling for split-second reliability. +当Linux第一次出现在嵌入式设备超过15年前,它面临着一个嵌入式计算市场受到的RTOS为主如Wind River的VxWorks,从而继续提供许多工业,航空电子设备和交通运输应用所需的高确定性,硬化的内核。像微软已经随之建立 - 以及更多实时 - 的Windows CE,Linux的面临着阻力和彻底的嘲讽潜在工业客户。这些桌面衍生的分布可能是正确的轻质消费类电子产品,有人主张,但他们缺乏硬化,内核,使得实时操作系统的选择,需要确定的任务调度的瞬间可靠性的设备。 + Improving Linux’s real-time capabilities was an [early goal][5] of embedded Linux pioneers such as [MontaVista][6]. Over the years, RTL development was accelerated and formalized in various groups such as OSADL, which [was founded in 2006][7], as well as the Real-Time Linux Foundation (RTLF). When RTLF [merged with OSADL][8] in 2009, OSADL and its RTL group took full ownership over the PREEMPT-RT patch maintenance and upstreaming process. OSADL also oversees other automation-related projects such as [Safety Critical Linux][9]. +嵌入式Linux先驱如[MontaVista公司]改进的Linux的实时能力是一个[早期目标] [5] [6]。多年来,RTL加快发展,并正式在不同群体,如OSADL,其中[成立于2006][7],以及实时Linux基金会(RTLF)。当RTLF[合并OSADL] [8]在2009年,OSADL和RTL集团采取了完整的所有权在PREEMPT-RT补丁维护和上游化的过程。 OSADL还负责监督其他自动化相关的项目,如[安全关键的Linux] [9]。 + OSADL’s stewardship over RTL progressed in three stages: advocacy and outreach, testing and quality assessment, and finally, funding. Early on, OSADL’s role was to write articles, make presentations, organize training, and “spread the word” about the advantages of RTL, says Emde. “To introduce a new technology such as Linux and its community-based development model into the rather conservative automation industry required first of all to build confidence,” he says. “Switching from a proprietary RTOS to Linux means that companies must introduce new strategies and processes in order to interact with a community.” +OSADL的管家,RTL进展分为三个阶段:宣传和推广,测试和质量评估,最后的资金。在早期,OSADL的作用是写文章,作演讲,组织培训,和“口耳相传的”关于劳动教养的优势,昂德说。 “引进新的技术,例如Linux和以社区为基础的发展模式成为需要首先建立信任的相当保守的自动化行业,”他说。 “从专有的实时操作系统向Linux转换意味着企业必须以与社区交互引入新的战略和流程。” + Later, OSADL moved on to providing technical performance data, establishing [a quality assessment and testing center][10], and providing assistance to its industrial members in open source legal compliance and safety certifications. +后来,OSADL转移到提供技术性能数据,建立[质量评估和试验中心] [10],并提供援助,以它的工业会员开放源码的合法合规性和安全认证。 + As RTL grew more mature, pulling even with the fading Windows CE in real-time capabilities and increasingly [cutting into RTOS market share][11], rival real-time Linux projects – principally [Xenomai][12] – have begun to integrate with it. +由于RTL变得更加成熟,即使有衰落的Windows CE的实时能力拉动和日益[切入实时操作系统的市场份额] [11],竞争对手的实时Linux项目 - 主要是[Xenomai] [12] - 已经开始整合 用它。 + “The success of the RT patches, and the clear prospective that they would eventually be merged completely, has led to a change of focus at Xenomai,” says Emde. “Xenomai 3.0 can be used in combination with the RT patches and provide so-called ‘skins’ that allow you to recycle real-time source code that was written for other systems. They haven’t been completely unified, however, since Xenomai uses a dual kernel approach whereas the RT patches apply only to a single Linux kernel.” +“在RT补丁的成功,以及明确的预期,他们最终会被完全合并,导致了焦点的Xenomai的变化,”昂德说。 “Xenomai3.0可以组合使用与RT贴剂并提供所谓的”皮肤“,允许你回收被用于其他系统编写的实时源代码。他们还没有完全统一,但是,由于Xenomai采用了双内核的方法,而RT补丁只适用于单一的Linux内核。“ + In more recent years, the RTL group’s various funding sources have dropped off, and OSADL took on that role, too. “When the development recently slowed down a bit because of a lack of funding, OSADL started its third milestone by directly funding Thomas Gleixner's work,” says Emde. +在最近几年中,RTL集团的各种资金来源已经脱落,并OSADL承担了这个角色了。 “当发展减缓近期由于缺乏资金下来了一点,OSADL通过直接资助托马斯Gleixner的工作,开始了它的第三个里程碑,”昂德说。 + As Emde wrote in an [Oct. 5 blog entry][13], the growing expansion of Real-Time Linux beyond its core industrial base to areas like automotive and telecom suggested that the funding should be expanded as well. “It would not be entirely fair to let the automation industry fund the complete remaining work on its own, since other industries such as telecommunication also rely on the availability of a deterministic Linux kernel,” wrote Emde. +作为昂德在[十月写道5博客条目] [13],实时Linux的日益扩张超越其核心产业基地,如汽车和电信领域的建议,基金应该和扩大。 “让自动化产业基金自身完整的剩余工作,因为其他行业如电信还依赖于确定性的Linux内核的可用性这将不是完全公平,写道:”昂德。 + When the Linux Foundation showed interest in expanding its funding role, OSADL decided it would be “much more efficient to have a single funding and control channel,” says Emde. He adds, however, that as a Gold member, OSADL is still participating in the oversight of the project, and will continue its advocacy and quality assurance activities. +当Linux基金会表现出扩大其融资作用的兴趣,OSADL决定这将是“更有效有一个单一的资金和控制渠道,”昂德说。然而,他补充说,作为金卡会员,OSADL仍然参与该项目的监督,并将继续倡导和质量保证活动。 + ### Automotive Looks for Real-Time Boost ### +###汽车看起来实时升压### RTL will continue to see its greatest growth in industrial applications where it will gradually replace RTOS applications, says Emde. Yet, it is also growing quickly in automotive, and will later spread to railway and avionics, he adds. +RTL将继续看到它在工业领域最大的增长,其中它将逐步取代RTOS应用,昂德说。然而,它也迅速增长的汽车,稍后会蔓延到铁路和航空电子设备,他补充道。 + Indeed, the growing role of Linux in automotive appears to be key to the Linux Foundation’s goals for RTL, with potential collaborations with its [Automotive Grade Linux][14] (AGL) workgroup. Automotive may also be the chief motivator for Google’s high-profile participation, speculates Emde. In addition, TI is deeply involved with automotive with its Jacinto processors. +事实上,Linux在汽车出现了越来越大的作用是关键的Linux基金会的目标RTL,与它的[汽车级Linux] [14](AGL)工作组的潜在合作。汽车也可能是主要的促进因素谷歌的高调参与,推测昂德。此外,TI是深入参与与汽车,其哈辛托处理器。 + Linux-oriented automotive projects like AGL aim to move Linux beyond in-vehicle infotainment (IVI) into cluster controls and telematics where RTOSes like QNX dominate. Autonomous vehicles are even in greater need of real-time performance. +面向Linux的汽车项目,如联合集团的目标是将Linux的超越车载信息娱乐(IVI)到集群控制和远程信息处理,其中像QNX实时操作系统占据主导地位。自主车甚至更需要实时性能。 + Emde notes that OSADL's [SIL2LinuxMP][15] project may play an important role in extending RTL into automotive. SIL2LinuxMP is not an automotive-specific project, but BMW is participating, and automotive is one of the key applications. The project aims to certify base components required for RTL to run on a single- or multi-core COTS board. It defines bootloader, root filesystem, Linux kernel, and C library bindings to access RTL. +EMDE注意到OSADL的[SIL2LinuxMP] [15]项目可能在延长的RTL到汽车中发挥重要作用。 SIL2LinuxMP不是一个汽车专用的项目,但是宝马参与,以及汽车的关键应用之一。该项目旨在证明上的单核或多核COTS系统运行所需的RTL基本组件。它定义了引导程序,根文件系统,Linux内核和C库绑定访问RTL。 + Autonomous drones and robots are also ripe for real-time, and Xenomai is already used in many robots, as well as some drones. Yet, RTL’s role will be limited in the wider embedded Linux world of consumer electronics and Internet of Things applications. The main barrier is the latency of wireless communications and the Internet itself. +自主无人机和机器人也是成熟的实时和Xenomai已经使用在许多的机器人,以及一些无人机。然而,RTL的角色将在更广阔的嵌入式Linux的世界消费电子和物联网的应用受到限制。的主要障碍是无线通信和因特网本身的延迟。 + “Real-time Linux will have a role within machine control and between machines and peripheral devices, but less between remote machines,” says Emde. “Real-time via Internet will probably never be possible.” +“实时Linux将拥有在机器控制和机器和外围设备之间的作用,但不远程计算机之间,”昂德说。 “通过互联网实时将可能永远不可能。” + -------------------------------------------------------------------------------- via: http://www.linux.com/news/software/applications/858828-new-collaborative-group-to-speed-real-time-linux From c57605904e13171b2de9985c31cb4d4f9d287799 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 16 Oct 2015 00:05:52 +0800 Subject: [PATCH 2270/2517] PUB:20151005 pyinfo() A good looking phpinfo-like python script @strugglingyouth --- ... A good looking phpinfo-like python script.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) rename {translated/tech => published}/20151005 pyinfo() A good looking phpinfo-like python script.md (50%) diff --git a/translated/tech/20151005 pyinfo() A good looking phpinfo-like python script.md b/published/20151005 pyinfo() A good looking phpinfo-like python script.md similarity index 50% rename from translated/tech/20151005 pyinfo() A good looking phpinfo-like python script.md rename to published/20151005 pyinfo() A good looking phpinfo-like python script.md index 6d7e71396d..480abefef8 100644 --- a/translated/tech/20151005 pyinfo() A good looking phpinfo-like python script.md +++ b/published/20151005 pyinfo() A good looking phpinfo-like python script.md @@ -1,14 +1,16 @@ -pyinfo()一个像 phpinfo 一样的 Python 脚本 +pyinfo():一个像 phpinfo 一样的 Python 脚本 ================================================================================ -作为一个热衷于 php 的家伙,我已经习惯了使用 phpinfo() 函数来让我轻松访问 php.ini 里的配置和加载的模块等。当然我也想要使用一个不存在的 pyinfo() 函数,但没有成功。在 google 中按下 CTRL-E 快速查找是否有人实现了它? +作为一个热衷于 php 的家伙,我已经习惯了使用 `phpinfo()` 函数来让我轻松访问 php.ini 里的配置和加载的模块等信息。当然我也想要使用一个不存在的 `pyinfo()` 函数,但没有成功。按下 CTRL-E,google 一下是否有人实现了它? -是的,有人已经实现了。但是,对我来说它非常难看。荒谬!因为我无法忍受丑陋的布局 *咳嗽*,我不得不亲自动手来做。所以我用找到的代码,并重新进行布局使之更好看点。Python 官方网站的布局看起来不错,那么何不盗取他们的颜色和背景图片呢?是的,这听起来像一个计划。 +是的,有人已经实现了。但是,对我来说它非常难看。荒谬!因为我无法忍受丑陋的布局,*咳咳*,我不得不亲自动手来改改。我用找到的代码,并重新进行布局使之更好看点。Python 官方网站的布局看起来不错,那么何不借用他们的颜色和背景图片呢?是的,这听起来像一个计划。 -[Gits Here][1] | [Download here][2] | [Example here][3] +- [Gist 代码地址][1] +- [下载地址][2] +- [例子][3] -提醒你下,我仅仅在 Python 2.6.4 上运行过它,所以在别的版本上可能有风险(将它移植到任何其他版本它应该是没有问题的)。为了能使它工作,只需要导入 pyinfo() 文件,并将函数的返回值打印到屏幕上。好嘞! +提醒你下,我仅仅在 Python 2.6.4 上运行过它,所以在别的版本上可能有风险(将它移植到任何其他版本它应该是没有问题的)。要使用它,只需要导入该文件, 并调用`pyinfo()`函数得到它的返回值打印到屏幕上。好嘞! -如果你没有得到正确的返回结果,你需要使用 [mod_wsgi][4],然后这样运行它(当然得替换路径): +如果你在使用 [mod_wsgi][4] 时没有得到正确的返回结果,你可以如下运行它(当然得替换路径): ``` def application(environ, start_response): @@ -27,7 +29,7 @@ via:http://bran.name/articles/pyinfo-a-good-looking-phpinfo-like-python-script 作者:[Bran van der Meer][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译, [Linux中国](https://linux.cn/) 荣誉推出 From d57822906bec79378f1a53c275056be0b3d463e3 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 16 Oct 2015 00:24:23 +0800 Subject: [PATCH 2271/2517] PUB:20150918 Install Justniffer In Ubuntu 15.04 @ictlyh --- ...0918 Install Justniffer In Ubuntu 15.04.md | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) rename {translated/tech => published}/20150918 Install Justniffer In Ubuntu 15.04.md (60%) diff --git a/translated/tech/20150918 Install Justniffer In Ubuntu 15.04.md b/published/20150918 Install Justniffer In Ubuntu 15.04.md similarity index 60% rename from translated/tech/20150918 Install Justniffer In Ubuntu 15.04.md rename to published/20150918 Install Justniffer In Ubuntu 15.04.md index 1d711ea08b..2aec58c91d 100644 --- a/translated/tech/20150918 Install Justniffer In Ubuntu 15.04.md +++ b/published/20150918 Install Justniffer In Ubuntu 15.04.md @@ -1,28 +1,29 @@ 在 Ubuntu 15.04 上安装 Justniffer ================================================================================ ### 简介 ### +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/09/monitoring1.jpg) -[Justniffer][1] 是一个可用于替换 Snort 的网络协议分析器。它非常流行,可交互式地跟踪/探测一个网络连接。它能从实时环境中抓取流量,支持 “lipcap” 和 “tcpdump” 文件格式。它可以帮助用户分析一个用 wireshark 难以抓包的复杂网络。尤其是它可以有效的帮助分析应用层流量,能提取类似图像、脚本、HTML 等 http 内容。Justniffer 有助于理解不同组件之间是如何通信的。 +[Justniffer][1] 是一个可用于替代 Snort 的网络协议分析器。它非常流行,可交互式地跟踪/探测一个网络连接。它能从实时环境中抓取流量,支持 “lipcap” 和 “tcpdump” 文件格式。它可以帮助用户分析一个用 wireshark 难以抓包的复杂网络。尤其是它可以有效的帮助你分析应用层流量,能提取类似图像、脚本、HTML 等 http 内容。Justniffer 有助于理解不同组件之间是如何通信的。 ### 功能 ### -Justniffer 收集一个复杂网络的所有流量而不影响系统性能,这是 Justniffer 的一个优势,它还可以保存日志用于之后的分析,Justniffer 其它一些重要功能包括: +Justniffer 可以收集一个复杂网络的所有流量而不影响系统性能,这是 Justniffer 的一个优势,它还可以保存日志用于之后的分析,Justniffer 其它一些重要功能包括: -#### 1. 可靠的 TCP 流重建 #### +1. 可靠的 TCP 流重建 -它可以使用主机 Linux 内核的一部分用于记录并重现 TCP 片段和 IP 片段。 + 它可以使用主机 Linux 内核的一部分用于记录并重现 TCP 片段和 IP 片段。 -#### 2. 日志 #### +2. 日志 -保存日志用于之后的分析,并能自定义保存内容和时间。 + 保存日志用于之后的分析,并能自定义保存内容和时间。 -#### 3. 可扩展 #### +3. 可扩展 -可以通过外部 python、 perl 和 bash 脚本扩展来从分析报告中获取一些额外的结果。 + 可以通过外部的 python、 perl 和 bash 脚本扩展来从分析报告中获取一些额外的结果。 -#### 4. 性能管理 #### +4. 性能管理 -基于连接时间、关闭时间、响应时间或请求时间等提取信息。 + 基于连接时间、关闭时间、响应时间或请求时间等提取信息。 ### 安装 ### @@ -44,41 +45,41 @@ make 的时候失败了,然后我运行下面的命令并尝试重新安装服 $ sudo apt-get -f install -### 事例 ### +### 示例 ### 首先用 -v 选项验证安装的 Justniffer 版本,你需要用超级用户权限来使用这个工具。 $ sudo justniffer -V -事例输出: +示例输出: ![j](http://www.unixmen.com/wp-content/uploads/2015/09/j.png) -**1. 为 eth1 接口导出 apache 中的流量到终端** +**1、 以类似 apache 的格式导出 eth1 接口流量,显示到终端** $ sudo justniffer -i eth1 -事例输出: +示例输出: ![Selection_001](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0013.png) -**2. 可以永恒下面的选项跟踪正在运行的 tcp 流** +**2、 可以用下面的选项跟踪正在运行的 tcp 流** $ sudo justniffer -i eth1 -r -事例输出: +示例输出: ![Selection_002](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0023.png) -**3. 获取 web 服务器的响应时间** +**3、 获取 web 服务器的响应时长** $ sudo justniffer -i eth1 -a " %response.time" -事例输出: +示例输出: ![Selection_003](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0033.png) -**4. 使用 Justniffer 读取一个 tcpdump 抓取的文件** +**4、 使用 Justniffer 读取一个 tcpdump 抓取的文件** 首先,用 tcpdump 抓取流量。 @@ -88,33 +89,33 @@ make 的时候失败了,然后我运行下面的命令并尝试重新安装服 $ justniffer -f file.cap -事例输出: +示例输出: ![Selection_005](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0056.png) -**5. 只抓取 http 数据** +**5、 只抓取 http 数据** $ sudo justniffer -i eth1 -r -p "port 80 or port 8080" -事例输出: +示例输出: ![Selection_006](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0064.png) -**6. 从一个指定主机获取 http 数据** +**6、 获取一个指定主机 http 数据** $ justniffer -i eth1 -r -p "host 192.168.1.250 and tcp port 80" -事例输出: +示例输出: ![Selection_007](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0074.png) -**7. 以更精确的格式抓取数据** +**7、 以更精确的格式抓取数据** 当你输入 **justniffer -h** 的时候你可以看到很多用于以更精确的方式获取数据的格式关键字 $ justniffer -h -事例输出: +示例输出: ![Selection_008](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0083.png) @@ -122,15 +123,15 @@ make 的时候失败了,然后我运行下面的命令并尝试重新安装服 $ justniffer -i eth1 -l "%request.timestamp %request.header.host %request.url %response.time" -事例输出: +示例输出: ![Selection_009](http://www.unixmen.com/wp-content/uploads/2015/09/Selection_0094.png) -其中还有很多你可以探索的选项 +其中还有很多你可以探索的选项。 ### 总结 ### -Justniffer 是用于网络测试一个很好的工具。在我看来对于那些用 Snort 来进行网络探测的用户来说,Justniffer 是一个更简单的工具。它提供了很多 **格式关键字** 用于按照你的需要精确地提取数据。你可以用 .cap 文件格式记录网络信息,之后用于分析监视网络服务性能。 +Justniffer 是一个很好的用于网络测试的工具。在我看来对于那些用 Snort 来进行网络探测的用户来说,Justniffer 是一个更简单的工具。它提供了很多 **格式关键字** 用于按照你的需要精确地提取数据。你可以用 .cap 文件格式记录网络信息,之后用于分析监视网络服务性能。 **参考资料:** @@ -142,7 +143,7 @@ via: http://www.unixmen.com/install-justniffer-ubuntu-15-04/ 作者:[Rajneesh Upadhyay][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 62bca18abedff94fdc919c89c73ba85c809570b1 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 16 Oct 2015 14:17:05 +0800 Subject: [PATCH 2272/2517] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=912?= =?UTF-8?q?0150821=20Linux=204.3=20Kernel=20To=20Add=20The=20MOST=20Driver?= =?UTF-8?q?=20Subsystem.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4.3 Kernel To Add The MOST Driver Subsystem.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md b/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md index fc0b9d4937..8e3c1d705e 100644 --- a/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md +++ b/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md @@ -1,26 +1,23 @@ -- translating by Ezio - - 为Linux 4.3 内核添加MOST 驱动子系统 ================================================================================ -While the [Linux 4.2][1] kernel hasn't been officially released yet, Greg Kroah-Hartman sent in early his pull requests for the various subsystems he maintains for the Linux 4.3 merge window. 当4.2 内核还没有正式发布的时候,Greg Kroah-Hartman 就为他维护的各种子系统模块打开了4.3 的合并窗口。 -The pull requests sent in by Greg KH on Thursday include the Linux 4.3 merge window updates for the driver core, TTY/serial, USB driver, char/misc, and the staging area. These pull requests don't offer any really shocking changes but mostly routine work on improvements / additions / bug-fixes. The staging area once again is heavy with various fixes and clean-ups but there's also a new driver subsystem. +周二Greg KH 发起的拉取请求(pull request)里包含了linux 4.3 的合并窗口更新,内容涉及驱动核心、TTY/串口、USB驱动、字符/杂项以及暂存区内容。这些拉取申请没有提供任何震撼性的改变,大部分都是改进/附加/修改bug。暂存区内容又是大量的修正和清理,但是还是有一个新的驱动子系统。 -Greg mentioned of the [4.3 staging changes][2], "Lots of things all over the place, almost all of them trivial fixups and changes. The usual IIO updates and new drivers and we have added the MOST driver subsystem which is getting cleaned up in the tree. The ozwpan driver is finally being deleted as it is obviously abandoned and no one cares about it." +Greg 提到了[4.3 的暂存区改变][2],“这里的很多东西,几乎全部都是细小的修改和改变。通常的IIO 更新和新驱动,以及我们已经添加了的MOST 驱动子系统,已经在源码树里整理了。ozwpan 驱动最终还是被删掉,引文它很明显被废弃了而且也没有人关心它。” -The MOST driver subsystem is short for the Media Oriented Systems Transport. The documentation to be added in the Linux 4.3 kernel explains, "The Media Oriented Systems Transport (MOST) driver gives Linux applications access a MOST network: The Automotive Information Backbone and the de-facto standard for high-bandwidth automotive multimedia networking. MOST defines the protocol, hardware and software layers necessary to allow for the efficient and low-cost transport of control, real-time and packet data using a single medium (physical layer). Media currently in use are fiber optics, unshielded twisted pair cables (UTP) and coax cables. MOST also supports various speed grades up to 150 Mbps." As explained, MOST is mostly about Linux in automotive applications. +MOST 驱动子系统是面向媒体的系统传输的简称。在linux 4.3 新增的文档里面解释道,“MOST 驱动支持LInux 应用程序访问MOST 网络:汽车信息骨干网和高速汽车多媒体网络的事实上的标准。MOST 定义了必要的协议、硬件和软件层,提供高效且低消耗的传输控制,实时的数据包传输,只需要使用一个媒介(物理层)。目前使用的媒介是光线、非屏蔽双绞线(UTP)和同轴电缆。MOST 也支持多种传输速度,最高支持150Mbps。”如文档解释的,MOST 主要是关于Linux 在汽车上的应用。 + +当Greg KH 发出了他为Linux 4.3 多个子系统做出的更新,但是他还没有打算提交[KDBUS][5]的内核代码。他之前已经放出了[linux 4.3 的KDBUS] 的开发计划,所以我们将需要等待官方的4.3 合并窗口,看看会发生什么。关注Phoronix 下周关于linux 4.3 内核的新闻报道,此时合并窗口将会开始,假如Linus 在本周[发布linux 4.2][4]。 -While Greg KH sent in his various subsystem updates for Linux 4.3, he didn't yet propose the [KDBUS][5] kernel code be pulled. He's previously expressed plans for [KDBUS in Linux 4.3][3] so we'll wait until the 4.3 merge window officially gets going to see what happens. Stay tuned to Phoronix for more Linux 4.3 kernel coverage next week when the merge window will begin, [assuming Linus releases 4.2][4] this weekend. -------------------------------------------------------------------------------- via: http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.3-Staging-Pull 作者:[Michael Larabel][a] -译者:[译者ID](https://github.com/译者ID) +译者:[oska874](https://github.com/oska874) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 8def4d11b1454c7b8f1b4090e968627e6fe7d9b9 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 16 Oct 2015 14:24:54 +0800 Subject: [PATCH 2273/2517] Update 20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md --- ...Monitor Stock Prices from Ubuntu Command Line Using Mop.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md b/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md index b23e772ca3..3375f5e5bb 100644 --- a/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md +++ b/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md @@ -1,3 +1,5 @@ +translating by Ezio + How to Monitor Stock Prices from Ubuntu Command Line Using Mop ================================================================================ Having a side income is always good, especially when you can easily manage the work along with your full time job. If your regular work involves working on an Internet-connected computer, trading stocks is a popular option to earn a few extra bucks. @@ -87,4 +89,4 @@ via: https://www.maketecheasier.com/monitor-stock-prices-ubuntu-command-line/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:https://www.maketecheasier.com/author/himanshu/ \ No newline at end of file +[a]:https://www.maketecheasier.com/author/himanshu/ From 27582ab3010d26a6dc1deddacaa12d205656ea31 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 16 Oct 2015 14:25:11 +0800 Subject: [PATCH 2274/2517] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E5=88=B0=20transla?= =?UTF-8?q?ted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md (100%) diff --git a/sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md b/translated/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md similarity index 100% rename from sources/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md rename to translated/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md From 6cc46516f4a073a0900e53e2b063ac0b63da62ba Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 16 Oct 2015 14:26:08 +0800 Subject: [PATCH 2275/2517] Update 20151012 Remember sed and awk All Linux admins should.md --- .../20151012 Remember sed and awk All Linux admins should.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151012 Remember sed and awk All Linux admins should.md b/sources/tech/20151012 Remember sed and awk All Linux admins should.md index f52f748859..c0b3aded0b 100644 --- a/sources/tech/20151012 Remember sed and awk All Linux admins should.md +++ b/sources/tech/20151012 Remember sed and awk All Linux admins should.md @@ -1,3 +1,5 @@ +translating by Ezio + Remember sed and awk? All Linux admins should ================================================================================ ![](http://images.techhive.com/images/article/2015/03/linux-100573790-primary.idge.jpg) @@ -57,4 +59,4 @@ via: http://www.infoworld.com/article/2985804/linux/remember-sed-awk-linux-admin [2]:http://intro-to-awk.blogspot.com/2008/08/awk-more-complex-examples.html [3]:http://www.infoworld.com/article/2613338/linux/linux-how-to-script-a-bash-crash-course.html [4]:http://www.infoworld.com/article/2608798/data-center/systemd--harbinger-of-the-linux-apocalypse.html -[5]:https://www.reddit.com/r/linuxadmin/comments/3ltq2y/when_i_start_learning_about_linux_administration/ \ No newline at end of file +[5]:https://www.reddit.com/r/linuxadmin/comments/3ltq2y/when_i_start_learning_about_linux_administration/ From ae6c088df8187b7504b874f88be745bea7ef0ce1 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 16 Oct 2015 14:26:42 +0800 Subject: [PATCH 2276/2517] Update 20151012 How to Setup DockerUI--a Web Interface for Docker.md --- ...12 How to Setup DockerUI--a Web Interface for Docker.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md b/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md index b712c8ebd6..8e13fdc8d5 100644 --- a/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md +++ b/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md @@ -1,3 +1,6 @@ +translating by Ezio + + How to Setup DockerUI - a Web Interface for Docker ================================================================================ Docker is getting more popularity day by day. The idea of running a complete Operating System inside a container rather than running inside a virtual machine is an awesome technology. Docker has made lives of millions of system administrators and developers pretty easy for getting their work done in no time. It is an open source technology that provides an open platform to pack, ship, share and run any application as a lightweight container without caring on which operating system we are running on the host. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. Running docker containers and managing them may come a bit difficult and time consuming, so there is a web based application named DockerUI which is make managing and running container pretty simple. DockerUI is highly beneficial to people who are not much aware of linux command lines and want to run containerized applications. DockerUI is an open source web based application best known for its beautiful design and ease simple interface for running and managing docker containers. @@ -101,11 +104,11 @@ DockerUI is a beautiful utilization of Docker Remote API to develop an awesome w via: http://linoxide.com/linux-how-to/setup-dockerui-web-interface-docker/ 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[oska874](https://github.com/oska874) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ [1]:https://hub.docker.com/ -[2]:https://github.com/crosbymichael/dockerui/ \ No newline at end of file +[2]:https://github.com/crosbymichael/dockerui/ From 44327a406a159b90354ee269e778c2cbcd6881b6 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 16 Oct 2015 15:14:31 +0800 Subject: [PATCH 2277/2517] finish translate --- ...ices from Ubuntu Command Line Using Mop.md | 59 +++++++++---------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md b/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md index 3375f5e5bb..a5207c3813 100644 --- a/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md +++ b/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md @@ -1,25 +1,22 @@ -translating by Ezio - -How to Monitor Stock Prices from Ubuntu Command Line Using Mop +命令行下使用Mop 监视股票价格 ================================================================================ -Having a side income is always good, especially when you can easily manage the work along with your full time job. If your regular work involves working on an Internet-connected computer, trading stocks is a popular option to earn a few extra bucks. - -While there are quite a few stock-monitoring applications available for Linux, most of them are GUI-based. What if you’re a Linux professional who spends a lot (or all) of your time working on machines that do not have any GUI installed? Are you out of luck? Well, no, there are some command line stock-tracking tools, including Mop, which we’ll be discussing in this article. +有一份隐性收入通常很不错,特别是当你可以轻松的协调业余和全职工作。如果你的日常工作使用了联网的电脑,交易股票是一个很流行的选项来获取额外收入。 +但是目前只有很少的股票监视软件可以用在linux 上,其中大多数还是基于图形界面的。如果你是一个Linux 专家,并且大量的工作时间是在没有图形界面的电脑上呢?你是不是就没办法了?不,这里还有一个命令行下的股票追踪工具,包括Mop,也就是本文要聊一聊的工具。 ### Mop ### -Mop, as already mentioned in the introduction above, is a command line tool that displays continuous and updated information about the US stock markets and individual stocks. Implemented in the GO programming language, the project is the brain child of Michael Dvorkin. +Mop,如上所述,是一个命令行下连续显示和更新美股和独立股票信息的工具。使用GO 实现的,是Michael Dvorkin 大脑的产物。 +### 下载安装 ### -### Download and Install ### -Since the project is implemented in GO, before installing the tool, you’ll first have to make sure that the programming language is installed on your machine. Following are the steps required to install GO on a Debian-based system like Ubuntu: +因为这个工程使用GO 实现的,所以你要做的第一步是在你的计算机上安装这种编程语言,下面就是在Debian 系系统,比如Ubuntu上安装GO的步骤: sudo apt-get install golang mkdir ~/workspace echo 'export GOPATH="$HOME/workspace"' >> ~/.bashrc source ~/.bashrc -Once GO is installed, the next step is to install the Mop tool and set the environment, something which you can do by running the following commands: +GO 安装好后的下一步是安装Mop 工具和配置环境,你要做的是运行下面的命令: sudo apt-get install git go get github.com/michaeldv/mop @@ -27,64 +24,62 @@ Once GO is installed, the next step is to install the Mop tool and set the envir make install export PATH="$PATH:$GOPATH/bin" -Once done, just run the following command to execute Mop: - +完成之后就可以运行下面的命令执行Mop: cmd -### Features ### +### 特性 ### -When you run the Mop command for the first time, you’ll see an output similar to the following. +当你第一次运行Mop 时,你会看到类似下面的输出信息: ![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-first-run.jpg) -As you can see in the image above, the output – which auto-refreshes frequently – contains information related to various popular stock exchanges around the world as well as individual stocks. +如你所见,这些输出信息—— 周期性自动刷新 ——包含了主要几个交易所和个股的信息。 -### Add/remove stocks ### +### 添加删除股票 ### -Mop allows you to easily add/remove individual stocks to and from the output list. To add a stock, all you have to do is to press “+” and mention the stock listing name when prompted. For example, the following screenshot was taken while adding Facebook (FB) to the list. +Mop 允许你轻松的从输出列表上添加/删除个股信息。要添加,你全部要做的是按”+“和输入股票名称。举个例子,下图就是添加Facebook (FB) 到列表里。 ![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-add-stock.png) -As I pressed the “+” key, a row containing text “Add tickers:” appeared, prompting me to add the stock listing name – I added FB for Facebook and pressed Enter. The output refreshed, and the new stock was added to the list: +因为我按下了”+“键,一列包含文本”Add tickers:“出现了,提示我添加股票名称—— 我添加了FB 然后按下回车。输出列表更新了,我添加的新股票也出现在列表了: ![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-stock-added.png) -Similarly, you can delete a stock listing by pressing “-” and mentioning its name. +类似的,你可以使用”-“ 键和提供股票名称删除一个股票。 -#### Group stocks based on value #### +#### 根据价格分组 #### -There is a way to group stocks based on whether their value is going up or down – all you have to do is to press the “g” key. Following this, the stocks which are advancing will be grouped together and shown in green, while those whose value is going down will be represented in black. +还有一个把股票分组的办法:依据他们的股价升跌,你索要做的就是按下”g“ 键。接下来,股票会分组显示:升的在一起使用绿色字体显示,而下跌的股票会黑色字体显示。 -Here is an example screenshot. +如下所示: ![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-group-stocks-profit-loss.png) -#### Column sort #### +#### 列排序 #### -Mop also allows you to change the sort order of individual columns. For this you first need to press “o” (this will select the first column by default), and then use the left and right arrow keys to select the column you want to sort. Once done, press enter to sort the column contents. +Mop 同时也允许你根据不同的列类型改变排序规则。这种用法需要你按下”o“(这个命令默认使用第一列的值来排序),然后使用左右键来选择你要使用的列。完成之后按下回车对内容重新排序。 -For example, the following screenshot shows the output after the contents of the first column were sorted in descending alphabetical order. +举个例子,下面的截图就是根据输出内容的第一列、按照字母表排序之后的结果。 ![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-change-order.png) -**Note**: to better understand, compare it with the previous screenshot. +**注意**: 为了更好的理解,和前面的截屏对比一下。 -#### Other options #### - -Other available options include “p” for pausing market data and stock updates, “q” or “esc” for quitting the command line application, and “?” for displaying the help page. +#### 其他选项 #### +其它的可用选项包括”p“:暂停市场和股票信息更新,”q“ 或者”esc“ 来退出命令行程序,”?“ 显示帮助页。 ![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-help.png) -### Conclusion ### +### 结论 ### -Mop is a basic stock monitoring tool that doesn’t offer a plethora of features, but does what it promises. It’s quite obvious that the tool is not for stock trading professionals but is still a decent choice if all you want to do is some basic stock tracking on a command line-only machine. +Mop 是一个基础的股票监控工具,并没有提供太多的特性,只提供了他声称的功能。很明显,这个工具并不是为专业股票交易者提供的,而仅仅为你在只有命令行的机器上得体的提供了一个跟踪股票信息的选择。 -------------------------------------------------------------------------------- via: https://www.maketecheasier.com/monitor-stock-prices-ubuntu-command-line/ 作者:[Himanshu Arora][a] -译者:[译者ID](https://github.com/译者ID) +译者:[oska874](https://github.com/oska874) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 058337a58f38ac8e5acdabc58402a7fa1d654c98 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 16 Oct 2015 15:15:33 +0800 Subject: [PATCH 2278/2517] translated --- ...ices from Ubuntu Command Line Using Mop.md | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 translated/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md diff --git a/translated/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md b/translated/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md new file mode 100644 index 0000000000..a5207c3813 --- /dev/null +++ b/translated/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md @@ -0,0 +1,87 @@ +命令行下使用Mop 监视股票价格 +================================================================================ +有一份隐性收入通常很不错,特别是当你可以轻松的协调业余和全职工作。如果你的日常工作使用了联网的电脑,交易股票是一个很流行的选项来获取额外收入。 + +但是目前只有很少的股票监视软件可以用在linux 上,其中大多数还是基于图形界面的。如果你是一个Linux 专家,并且大量的工作时间是在没有图形界面的电脑上呢?你是不是就没办法了?不,这里还有一个命令行下的股票追踪工具,包括Mop,也就是本文要聊一聊的工具。 +### Mop ### + +Mop,如上所述,是一个命令行下连续显示和更新美股和独立股票信息的工具。使用GO 实现的,是Michael Dvorkin 大脑的产物。 +### 下载安装 ### + + +因为这个工程使用GO 实现的,所以你要做的第一步是在你的计算机上安装这种编程语言,下面就是在Debian 系系统,比如Ubuntu上安装GO的步骤: + + sudo apt-get install golang + mkdir ~/workspace + echo 'export GOPATH="$HOME/workspace"' >> ~/.bashrc + source ~/.bashrc + +GO 安装好后的下一步是安装Mop 工具和配置环境,你要做的是运行下面的命令: + + sudo apt-get install git + go get github.com/michaeldv/mop + cd $GOPATH/src/github.com/michaeldv/mop + make install + export PATH="$PATH:$GOPATH/bin" + +完成之后就可以运行下面的命令执行Mop: + cmd + +### 特性 ### + +当你第一次运行Mop 时,你会看到类似下面的输出信息: + +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-first-run.jpg) + +如你所见,这些输出信息—— 周期性自动刷新 ——包含了主要几个交易所和个股的信息。 + +### 添加删除股票 ### + +Mop 允许你轻松的从输出列表上添加/删除个股信息。要添加,你全部要做的是按”+“和输入股票名称。举个例子,下图就是添加Facebook (FB) 到列表里。 + +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-add-stock.png) + +因为我按下了”+“键,一列包含文本”Add tickers:“出现了,提示我添加股票名称—— 我添加了FB 然后按下回车。输出列表更新了,我添加的新股票也出现在列表了: + +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-stock-added.png) + +类似的,你可以使用”-“ 键和提供股票名称删除一个股票。 + +#### 根据价格分组 #### + +还有一个把股票分组的办法:依据他们的股价升跌,你索要做的就是按下”g“ 键。接下来,股票会分组显示:升的在一起使用绿色字体显示,而下跌的股票会黑色字体显示。 + +如下所示: + +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-group-stocks-profit-loss.png) + +#### 列排序 #### + +Mop 同时也允许你根据不同的列类型改变排序规则。这种用法需要你按下”o“(这个命令默认使用第一列的值来排序),然后使用左右键来选择你要使用的列。完成之后按下回车对内容重新排序。 + +举个例子,下面的截图就是根据输出内容的第一列、按照字母表排序之后的结果。 + +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-change-order.png) + +**注意**: 为了更好的理解,和前面的截屏对比一下。 + +#### 其他选项 #### + +其它的可用选项包括”p“:暂停市场和股票信息更新,”q“ 或者”esc“ 来退出命令行程序,”?“ 显示帮助页。 +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-help.png) + +### 结论 ### + +Mop 是一个基础的股票监控工具,并没有提供太多的特性,只提供了他声称的功能。很明显,这个工具并不是为专业股票交易者提供的,而仅仅为你在只有命令行的机器上得体的提供了一个跟踪股票信息的选择。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/monitor-stock-prices-ubuntu-command-line/ + +作者:[Himanshu Arora][a] +译者:[oska874](https://github.com/oska874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/himanshu/ From 5dd4d89ddc1bbd95881a73684403ebf988b0fc1c Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 16 Oct 2015 15:15:52 +0800 Subject: [PATCH 2279/2517] =?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 --- ...ices from Ubuntu Command Line Using Mop.md | 87 ------------------- 1 file changed, 87 deletions(-) delete mode 100644 sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md diff --git a/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md b/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md deleted file mode 100644 index a5207c3813..0000000000 --- a/sources/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md +++ /dev/null @@ -1,87 +0,0 @@ -命令行下使用Mop 监视股票价格 -================================================================================ -有一份隐性收入通常很不错,特别是当你可以轻松的协调业余和全职工作。如果你的日常工作使用了联网的电脑,交易股票是一个很流行的选项来获取额外收入。 - -但是目前只有很少的股票监视软件可以用在linux 上,其中大多数还是基于图形界面的。如果你是一个Linux 专家,并且大量的工作时间是在没有图形界面的电脑上呢?你是不是就没办法了?不,这里还有一个命令行下的股票追踪工具,包括Mop,也就是本文要聊一聊的工具。 -### Mop ### - -Mop,如上所述,是一个命令行下连续显示和更新美股和独立股票信息的工具。使用GO 实现的,是Michael Dvorkin 大脑的产物。 -### 下载安装 ### - - -因为这个工程使用GO 实现的,所以你要做的第一步是在你的计算机上安装这种编程语言,下面就是在Debian 系系统,比如Ubuntu上安装GO的步骤: - - sudo apt-get install golang - mkdir ~/workspace - echo 'export GOPATH="$HOME/workspace"' >> ~/.bashrc - source ~/.bashrc - -GO 安装好后的下一步是安装Mop 工具和配置环境,你要做的是运行下面的命令: - - sudo apt-get install git - go get github.com/michaeldv/mop - cd $GOPATH/src/github.com/michaeldv/mop - make install - export PATH="$PATH:$GOPATH/bin" - -完成之后就可以运行下面的命令执行Mop: - cmd - -### 特性 ### - -当你第一次运行Mop 时,你会看到类似下面的输出信息: - -![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-first-run.jpg) - -如你所见,这些输出信息—— 周期性自动刷新 ——包含了主要几个交易所和个股的信息。 - -### 添加删除股票 ### - -Mop 允许你轻松的从输出列表上添加/删除个股信息。要添加,你全部要做的是按”+“和输入股票名称。举个例子,下图就是添加Facebook (FB) 到列表里。 - -![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-add-stock.png) - -因为我按下了”+“键,一列包含文本”Add tickers:“出现了,提示我添加股票名称—— 我添加了FB 然后按下回车。输出列表更新了,我添加的新股票也出现在列表了: - -![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-stock-added.png) - -类似的,你可以使用”-“ 键和提供股票名称删除一个股票。 - -#### 根据价格分组 #### - -还有一个把股票分组的办法:依据他们的股价升跌,你索要做的就是按下”g“ 键。接下来,股票会分组显示:升的在一起使用绿色字体显示,而下跌的股票会黑色字体显示。 - -如下所示: - -![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-group-stocks-profit-loss.png) - -#### 列排序 #### - -Mop 同时也允许你根据不同的列类型改变排序规则。这种用法需要你按下”o“(这个命令默认使用第一列的值来排序),然后使用左右键来选择你要使用的列。完成之后按下回车对内容重新排序。 - -举个例子,下面的截图就是根据输出内容的第一列、按照字母表排序之后的结果。 - -![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-change-order.png) - -**注意**: 为了更好的理解,和前面的截屏对比一下。 - -#### 其他选项 #### - -其它的可用选项包括”p“:暂停市场和股票信息更新,”q“ 或者”esc“ 来退出命令行程序,”?“ 显示帮助页。 -![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-help.png) - -### 结论 ### - -Mop 是一个基础的股票监控工具,并没有提供太多的特性,只提供了他声称的功能。很明显,这个工具并不是为专业股票交易者提供的,而仅仅为你在只有命令行的机器上得体的提供了一个跟踪股票信息的选择。 - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/monitor-stock-prices-ubuntu-command-line/ - -作者:[Himanshu Arora][a] -译者:[oska874](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.maketecheasier.com/author/himanshu/ From b63183dc594b575fabcec3e96dfe5948960abb81 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 16 Oct 2015 20:09:28 +0800 Subject: [PATCH 2280/2517] translated sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md --- ...wnload Videos Using youtube-dl In Linux.md | 94 ------------------- ...wnload Videos Using youtube-dl In Linux.md | 93 ++++++++++++++++++ 2 files changed, 93 insertions(+), 94 deletions(-) delete mode 100644 sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md create mode 100644 translated/tech/20151007 How To Download Videos Using youtube-dl In Linux.md diff --git a/sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md b/sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md deleted file mode 100644 index f72bde05de..0000000000 --- a/sources/tech/20151007 How To Download Videos Using youtube-dl In Linux.md +++ /dev/null @@ -1,94 +0,0 @@ -ictlyh Translating -How To Download Videos Using youtube-dl In Linux -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Download-YouTube-Videos.jpeg) - -I know you have already seen [how to download YouTube videos][1]. But those tools were mostly GUI ways. I am going to show you how to download YouTube videos via terminal using youtube-dl. - -### [youtube-dl][2] ### - -youtube-dl is a Python based small command-line tool that allows to download videos from YouTube.com, Dailymotion, Google Video, Photobucket, Facebook, Yahoo, Metacafe, Depositfiles and few more similar sites. It written in pygtk and requires Python interpreter to run this program, it’s not platform restricted. It should run on any Unix, Windows or in Mac OS X based systems. - -The youtube-dl tool supports resuming interrupted downloads. If youtube-dl is killed (for example by Ctrl-C or due to loss of Internet connectivity) in the middle of download, you can simply re-run it with the same YouTube video url. It will automatically resume the unfinished download, as long as a partial download is present in the current directory. Which means, you don’t need a [download][3] manager for resuming downloads. - -#### Installing youtube-dl #### - -If you are running Ubuntu based Linux distribution, you can install it using this command: - - sudo apt-get install youtube-dl - -For any Linux distribution, you can quickly install youtube-dl on your system through the command line interface with: - - sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O/usr/local/bin/youtube-dl - -After fetching the file, you need to set a executable permission on the script to execute properly. - - sudo chmod a+rx /usr/local/bin/youtube-dl - -#### Use YouTube-DL to Download Videos: #### - -To download a video file, simply run the following command. Where “VIDEO_URL” is the url of the video that you want to download. - - youtube-dl VIDEO_URL - -#### Download YouTube Videos in Multiple Formats: #### - -These days YouTube videos have different resolutions, you first need to check available video formats of a given YouTube video. For that run youtube-dl with “-F” option. It will show you a list of available formats. - - youtube-dl -F http://www.youtube.com/watch?v=BlXaGWbFVKY - -It’s output will be like: - - Setting language - BlXaGWbFVKY: Downloading video webpage - BlXaGWbFVKY: Downloading video info webpage - BlXaGWbFVKY: Extracting video information - Available formats: - 37 : mp4 [1080×1920] - 46 : webm [1080×1920] - 22 : mp4 [720×1280] - 45 : webm [720×1280] - 35 : flv [480×854] - 44 : webm [480×854] - 34 : flv [360×640] - 18 : mp4 [360×640] - 43 : webm [360×640] - 5 : flv [240×400] - 17 : mp4 [144×176] - -Now among the available video formats, choose one that you like. For example, if you want to download it in MP4 version, you should use: - - youtube-dl -f 17 http://www.youtube.com/watch?v=BlXaGWbFVKY - -#### Download subtitles of videos using youtube-dl #### - -First check if there are subtitles available for the video. To list all subs for a video, use the command beelow: - - youtube-dl --list-subs https://www.youtube.com/watch?v=Ye8mB6VsUHw - -To download all subs, but not the video: - - youtube-dl --all-subs --skip-download https://www.youtube.com/watch?v=Ye8mB6VsUHw - -#### Download entire playlist #### - -To download a playlist, simply run the following command. Where “playlist_url” is the url of the playlist that ou want to download. - - youtube-dl -cit playlist_url - -youtube-dl is a versatile command line tool and provides a number of functionalities. No wonder it is such a popular command line tool. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/download-youtube-linux/ - -作者:[alimiracle][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/ali/ -[1]:http://itsfoss.com/download-youtube-videos-ubuntu/ -[2]:https://rg3.github.io/youtube-dl/ -[3]:http://itsfoss.com/xtreme-download-manager-install/ \ No newline at end of file diff --git a/translated/tech/20151007 How To Download Videos Using youtube-dl In Linux.md b/translated/tech/20151007 How To Download Videos Using youtube-dl In Linux.md new file mode 100644 index 0000000000..99855c9d22 --- /dev/null +++ b/translated/tech/20151007 How To Download Videos Using youtube-dl In Linux.md @@ -0,0 +1,93 @@ +如何在 Linux 中使用 youtube-dl 下载视频 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Download-YouTube-Videos.jpeg) + +我知道你已经看过[如何下载 YouTube 视频][1]。但那些工具大部分都采用图形用户界面的方式。我会向你展示如何通过终端使用 youtube-dl 下载 YouTube 视频。 + +### [youtube-dl][2] ### + +youtube-dl 是基于 Python 的命令行小工具,允许你从 YouTube.com、Dailymotion、Google Video、Photobucket、Facebook、Yahoo、Metacafe、Depositfiles 以及其它一些类似网站中下载视频。它是用 pygtk 编写的,需要 Python 解析器来运行,对平台要求并不严格。它能够在 Unix、Windows 或者 Mac OS X 系统上运行。 + +youtube-dl 支持断点续传。如果在下载的过程中 youtube-dl 被杀死了(例如通过 Ctrl-C 或者丢失网络连接),你只需要使用相同的 YouTube 视频 URL 再次运行它。只要当前目录中有下载的部分文件,它就会自动恢复没有完成的下载,也就是说,你不需要[下载][3]管理器来恢复下载。 + +#### 安装 youtube-dl #### + +如果你运行的是基于 Ubuntu 的 Linux 发行版,你可以使用下面的命令安装: + + sudo apt-get install youtube-dl + +对于任何 Linux 发行版,你都可以通过下面的命令行接口在你的系统上快速安装 youtube-dl: + + sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O/usr/local/bin/youtube-dl + +获取到该文件后,为了能正常执行你需要给脚本设置可执行权限。 + + sudo chmod a+rx /usr/local/bin/youtube-dl + +#### 使用 youtube-dl 下载视频: #### + +要下载一个视频文件,只需要运行下面的命令。其中 “VIDEO_URL” 是你想要下载视频的 url。 + + youtube-dl VIDEO_URL + +#### 以多种格式下载 YouTube 视频: #### + +现在 YouTube 视频有不同的分辨率,首先你需要检查指定的 YouTube 视频可用的视频格式。可以使用 “-F” 选项运行 youtube-dl。它会向你显示出可用的格式。 + + youtube-dl -F http://www.youtube.com/watch?v=BlXaGWbFVKY + +它的输出类似于: + + Setting language + BlXaGWbFVKY: Downloading video webpage + BlXaGWbFVKY: Downloading video info webpage + BlXaGWbFVKY: Extracting video information + Available formats: + 37 : mp4 [1080×1920] + 46 : webm [1080×1920] + 22 : mp4 [720×1280] + 45 : webm [720×1280] + 35 : flv [480×854] + 44 : webm [480×854] + 34 : flv [360×640] + 18 : mp4 [360×640] + 43 : webm [360×640] + 5 : flv [240×400] + 17 : mp4 [144×176] + +在可用的视频格式中,选择你需要的一种。例如,如果你想下载 MP4 格式的,你可以: + + youtube-dl -f 17 http://www.youtube.com/watch?v=BlXaGWbFVKY + +#### 使用 youtube-dl 下载视频字幕 #### + +首先检查是否有可用的视频字幕。使用下面的命令列出视频所有可用的字幕: + + youtube-dl --list-subs https://www.youtube.com/watch?v=Ye8mB6VsUHw + +下载所有字幕,但不包括视频: + + youtube-dl --all-subs --skip-download https://www.youtube.com/watch?v=Ye8mB6VsUHw + +#### 下载整个播放列表 #### + +运行下面的命令下载整个播放列表。其中 “playlist_url” 是你希望下载的播放列表的 url。 + + youtube-dl -cit playlist_url + +youtube-dl 是一个多功能的命令行工具,它提供了很多功能。难怪这个命令行工具这么流行。 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/download-youtube-linux/ + +作者:[alimiracle][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/ali/ +[1]:http://itsfoss.com/download-youtube-videos-ubuntu/ +[2]:https://rg3.github.io/youtube-dl/ +[3]:http://itsfoss.com/xtreme-download-manager-install/ \ No newline at end of file From ac25bd04cf3ea4c57228bfb7fff5a3fab7a6a3e1 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 16 Oct 2015 20:16:02 +0800 Subject: [PATCH 2281/2517] Translating sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md --- .../20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md b/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md index 6f5f3f3b65..1c61864ce8 100644 --- a/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md +++ b/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md @@ -1,3 +1,4 @@ +ictlyh Translating How to Setup Red Hat Ceph Storage on CentOS 7.0 ================================================================================ Ceph is an open source software platform that stores data on a single distributed computer cluster. When you are planning to build a cloud, then on top of the requirements you have to decide on how to implement your storage. Open Source CEPH is one of RED HAT mature technology based on object-store system, called RADOS, with a set of gateway APIs that present the data in block, file, and object modes. As a result of its open source nature, this portable storage platform may be installed and used in public or private clouds. The topology of a Ceph cluster is designed around replication and information distribution, which are intrinsic and provide data integrity. It is designed to be fault-tolerant, and can run on commodity hardware, but can also be run on a number of more advanced systems with the right setup. From 983029bd53073ef55c95dd584fdb80f158b6408a Mon Sep 17 00:00:00 2001 From: unicornx Date: Fri, 16 Oct 2015 23:06:50 +0800 Subject: [PATCH 2282/2517] nearly completed, need 2nd scan to polish --- ...borative Group to Speed Real-Time Linux.md | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md index e807c0052a..fa8bc6b4c5 100644 --- a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md +++ b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md @@ -6,7 +6,7 @@ New Collaborative Group to Speed Real-Time Linux The Linux Foundation’s [announcement][1] at LinuxCon this week that it was assuming funding control over the Real-Time Linux project gave renewed hope that embedded Linux will complete its 15-year campaign to achieve equivalence with RTOSes in real-time operations. The RTL group is being reinvigorated as a Real-Time Linux Collaborative Project, with better funding, more developers, and closer integration with mainline kernel development. 在本周的Linux大会活动(LinuxCon)上Linux基金会(Linux Foundation)[宣称][1],“Real-Time - Linux”项目(译者注:实时Linux操作系统项目,简称RTL)得到了新的资金支持,并预期这将促进该项目,使其自成立15年来第一次有机会在实时操作性上和其他的实时操作系统一较高下。Linux基金会将RTL项目重组为一个新的项目,并命名为“Real-Time Linux Collaborative Project”,该项目将获得更有力的资金支持,更多的开发人员将投入其中,并在开发和集成上和内核主线保持更紧密的联系。 + Linux”项目(译者注:实时Linux操作系统项目,简称RTL)得到了新的资金支持,并预期这将促进该项目,使其自成立15年来第一次有机会在实时操作性上和其他的实时操作系统一较高下。Linux基金会将RTL项目重组为一个新的项目,并命名为“Real-Time Linux Collaborative Project”(译者注,下文将称其为“RTL协作组”),该项目将获得更有力的资金支持,更多的开发人员将投入其中,并在开发和集成上和内核主线保持更紧密的联系。 According to the Linux Foundation, moving RTL under its umbrella “will save the industry millions of dollars in research and development.” The move will also “improve quality of the code through robust upstream kernel test infrastructure,” says the Foundation. @@ -20,85 +20,84 @@ The task is about 90 percent complete, according to Dr. Carsten Emde, longtime G 按长期以来一直担任OSADL总经理的Carsten Emde博士的话说,支持内核实时特性的工作已经完成了将近90%。 “这就像盖房子,”他解释说。 “主要的部件,如墙壁,窗户和门都已经安装到位,就实时内核来说,类似的主要部件譬如:高精度定时器(high-resolution timers),中断线程化机制(interrupt threads)和基于优先级可继承的互斥量(priority-inheritance mutexes)等。你所剩下的工作就是还需要一些小零碎,如地毯和墙纸来完成最终的工程。“ -PC <== - According to Emde, real-time Linux is already technologically equivalent to most real-time operating systems – assuming you’re willing to hassle with all the patches. “The goal of the project was to provide a Linux system with a predefined deterministic worst-case latency and nothing else,” says Emde. “This goal is reached today when a kernel is patched, and the same goal will be reached when a future unpatched mainline RT kernel will be used. The only – of course important – difference is that the maintenance work will be much less when we do no longer need to continually adapt off-tree components to mainline.” -据昂德,实时Linux已经是技术上等同于大多数实时操作系统 - 假设你愿意麻烦地把所有补丁。 “该项目的目标是提供一个Linux系统预定义的确定性最坏情况下的延迟,没有别的,”昂德说。 “这个目标是走到了今天,当一个内核补丁,并在未来的未打补丁的主线RT内核将使用相同的目标一定会达到。唯一的 - 当然重要的 - 不同的是,维修工作会少得多,当我们不再需要关闭树组件主线不断地适应“。 +据Emde介绍,从技术的角度来说,实时Linux的性能已经可以媲美绝大多数其他的实时操作系统 - 只要你不厌其烦地愿意把所有的补丁都打上。 Emde的原话如下:“该项目(译者注,指RTL)的目标就是提供一个满足实时性要求Linux系统,使其无论在如何恶劣的负载状况下都可以保证在确定的可以预先定义的时间内对处理做出响应,没有其他,这个目标已经实现,但需要你手动地将RTL提供的补丁添加到Linux内核主线的版本代码上,但新项目将在Linux内核主线版本上直接支持同样的的目标。唯一的,当然也是最重要的区别就是相应的维护工作将少得多,因为我们再也不用一次又一次移植那些独立于内核主线的补丁代码了。” The RTL Collaborative Group will continue under the guidance of Thomas Gleixner, the key maintainer over the past decade. This week, Gleixner was appointed a Linux Foundation Fellow, joining a select group that includes Linux kernel stable maintainer Greg Kroah-Hartman, Yocto Project maintainer Richard Purdie, and Linus Torvalds. -在RTL协作组将继续托马斯Gleixner,关键维护者在过去十年的指导下进行。本周,Gleixner被任命为Linux基金会研究员,加入一个选择组,其中包括Linux内核维护者稳定格雷格Kroah-Hartman的,Yocto计划维护者理查德Purdie和Linus Torvalds公司。 +新的RTL协作组将继续在Thomas Gleixner的指导下工作,Thomas Gleixner在过去的十多年里一直是RTL的核心维护人员。本周,Gleixner被任命为Linux基金会成员,并加入了一个特别的小组,小组成员包括Linux稳定内核维护者Greg Kroah-Hartman,Yocto项目维护者Richard Purdie和Linus Torvalds本人。 According to Emde, RTL’s secondary maintainer Steven Rostedt of Red Hat, who “maintains older but still maintained kernel versions,” will continue to participate in the project along with Red Hat’s Ingo Molnàr, who was a key developer of RTL, but in recent years has had more of an advisory position. Somewhat surprisingly, however, Red Hat is not one of the RTL Collaborative Group’s members. Instead, Google takes the top spot as the lone Platinum member, while Gold members include National Instruments (NI), OSADL, and Texas Instruments (TI). Silver members include Altera, ARM, Intel, and IBM. -据昂德,红帽的RTL的二级维护史蒂芬Rostedt,谁“维护旧的,但仍然保持内核版本,”将继续参与该项目与Red Hat的英格·蒙内,谁是RTL的主要开发者,但近年来已经有更多的咨询地位。有些令人惊讶,然而,红帽不是RTL协作组的成员之一。相反,谷歌采取的头把交椅作为唯一的白金会员,黄金会员包括美国国家仪器公司(NI),OSADL和德州仪器(TI)。银卡会员包括Altera公司,ARM,英特尔和IBM。 + +据Emde介绍,RTL的第二维护人Steven Rostedt来自Red Hat公司,他负责维护旧的内核版本,他将和同样来自Red Hat的Ingo Molnàr继续参与该项目,Ingo是RTL的关键开发人员,但近年来更多地从事咨询方面的工作。有些令人惊讶的是,Red Hat竟然不是RTL协作组的成员之一。相反,谷歌作为唯一的白金会员占据了头把交椅,其他黄金会员包括国家仪器公司(National Instruments,简称NI),OSADL和德州仪器(TI)。银卡会员包括Altera公司,ARM,Intel和IBM。 ### The Long Road to Real Time ### -###的漫长道路实时### +###走向实时内核的漫长道路### When Linux first appeared in embedded devices more than 15 years ago, it faced an embedded computing market dominated by RTOSes such as Wind River’s VxWorks, which continue to offer highly deterministic, hardened kernels required by many industrial, avionics, and transportation applications. Like Microsoft’s already then established – and more real-time – Windows CE, Linux faced resistance and outright mockery from potential industrial clients. These desktop-derived distributions might be okay for lightweight consumer electronics, it was argued, but they lacked the hardened, kernels that made RTOSes the choice for devices that required deterministic task scheduling for split-second reliability. -当Linux第一次出现在嵌入式设备超过15年前,它面临着一个嵌入式计算市场受到的RTOS为主如Wind River的VxWorks,从而继续提供许多工业,航空电子设备和交通运输应用所需的高确定性,硬化的内核。像微软已经随之建立 - 以及更多实时 - 的Windows CE,Linux的面临着阻力和彻底的嘲讽潜在工业客户。这些桌面衍生的分布可能是正确的轻质消费类电子产品,有人主张,但他们缺乏硬化,内核,使得实时操作系统的选择,需要确定的任务调度的瞬间可靠性的设备。 +当15年前Linux第一次出现在嵌入式设备上的时候,它所面临的嵌入式计算市场已经被其他的实时操作系统,譬如风河公司(WindRiver)的VxWorks,所牢牢占据着,VxWorks从那时到现在,一直在为众多的工控设备,航空电子设备以及交通运输应用提供着工业级别的高确定性的,硬实时的内核。微软后来也提供了一个支持实时性的操作系统版本-Windows CE,Linux所面临的是来自潜在工业客户的公开嘲讽和层层阻力。他们认为那些从桌面系统改进来的Linux发行版本顶多适合要求不高的轻量级消费类电子产品,是不适合那些对硬实时要求高的设备的。 Improving Linux’s real-time capabilities was an [early goal][5] of embedded Linux pioneers such as [MontaVista][6]. Over the years, RTL development was accelerated and formalized in various groups such as OSADL, which [was founded in 2006][7], as well as the Real-Time Linux Foundation (RTLF). When RTLF [merged with OSADL][8] in 2009, OSADL and its RTL group took full ownership over the PREEMPT-RT patch maintenance and upstreaming process. OSADL also oversees other automation-related projects such as [Safety Critical Linux][9]. -嵌入式Linux先驱如[MontaVista公司]改进的Linux的实时能力是一个[早期目标] [5] [6]。多年来,RTL加快发展,并正式在不同群体,如OSADL,其中[成立于2006][7],以及实时Linux基金会(RTLF)。当RTLF[合并OSADL] [8]在2009年,OSADL和RTL集团采取了完整的所有权在PREEMPT-RT补丁维护和上游化的过程。 OSADL还负责监督其他自动化相关的项目,如[安全关键的Linux] [9]。 +对于嵌入式Linux的先行者如[MontaVista公司][6]来说,其[早期的目标][5]很明确就是要改进Linux的实时能力。多年以来,对Linux的实时性能开发发展迅速,得到各种组织的支持,如OSADL[成立于2006年][7],以及实时Linux基金会(Real-Time Linux Foundation,简称RTLF)。在2009年[OSADL与RTLF合并][8],OSADL及其RTL组承担了所有的抢占式实时内核(PREEMPT-RT)补丁的维护工作并始终保存跟踪最新的Linux内核主线版本。除此之外OSADL还负责监管其他自动化相关的项目,例如[高可靠性Linux][9](Safety Critical Linux,译者注:指研究如何在关键系统上可靠安全地运行Linux)。 OSADL’s stewardship over RTL progressed in three stages: advocacy and outreach, testing and quality assessment, and finally, funding. Early on, OSADL’s role was to write articles, make presentations, organize training, and “spread the word” about the advantages of RTL, says Emde. “To introduce a new technology such as Linux and its community-based development model into the rather conservative automation industry required first of all to build confidence,” he says. “Switching from a proprietary RTOS to Linux means that companies must introduce new strategies and processes in order to interact with a community.” -OSADL的管家,RTL进展分为三个阶段:宣传和推广,测试和质量评估,最后的资金。在早期,OSADL的作用是写文章,作演讲,组织培训,和“口耳相传的”关于劳动教养的优势,昂德说。 “引进新的技术,例如Linux和以社区为基础的发展模式成为需要首先建立信任的相当保守的自动化行业,”他说。 “从专有的实时操作系统向Linux转换意味着企业必须以与社区交互引入新的战略和流程。” +OSADL对RTL的支持经历了三个阶段:拥护和推广、测试和质量评估以及最后的资金支持。Emde表示,在早期,OSADL的角色仅限于写写推广的文章,制作专题报告,组织相关培训,以及“宣传”RTL的优点。他说:“要让一个相当保守的自动化行业接受象Linux之类的新技术及其基于社区的那种开发模式,首先就需要建立其对新事物的信心。从使用专有的实时操作系统转向改用Linux对公司意味着必须引入新的战略和流程,以便与社区进行互动。” Later, OSADL moved on to providing technical performance data, establishing [a quality assessment and testing center][10], and providing assistance to its industrial members in open source legal compliance and safety certifications. -后来,OSADL转移到提供技术性能数据,建立[质量评估和试验中心] [10],并提供援助,以它的工业会员开放源码的合法合规性和安全认证。 +后来,OSADL改而提供技术性能数据,建立[质量评估和测试中心][10],并在和开源相关事务的法律问题和安全认证方面向行业成员提供帮助。 As RTL grew more mature, pulling even with the fading Windows CE in real-time capabilities and increasingly [cutting into RTOS market share][11], rival real-time Linux projects – principally [Xenomai][12] – have begun to integrate with it. -由于RTL变得更加成熟,即使有衰落的Windows CE的实时能力拉动和日益[切入实时操作系统的市场份额] [11],竞争对手的实时Linux项目 - 主要是[Xenomai] [12] - 已经开始整合 用它。 +当RTL在实时性上变得愈加成熟,相反Windows CE却是江河日下,[其市场份额正在快速地被RTL所蚕食][11],一些与RTL竞争的实时Linux项目,主要是[Xenomai][12]已开始集成RTL。 “The success of the RT patches, and the clear prospective that they would eventually be merged completely, has led to a change of focus at Xenomai,” says Emde. “Xenomai 3.0 can be used in combination with the RT patches and provide so-called ‘skins’ that allow you to recycle real-time source code that was written for other systems. They haven’t been completely unified, however, since Xenomai uses a dual kernel approach whereas the RT patches apply only to a single Linux kernel.” -“在RT补丁的成功,以及明确的预期,他们最终会被完全合并,导致了焦点的Xenomai的变化,”昂德说。 “Xenomai3.0可以组合使用与RT贴剂并提供所谓的”皮肤“,允许你回收被用于其他系统编写的实时源代码。他们还没有完全统一,但是,由于Xenomai采用了双内核的方法,而RT补丁只适用于单一的Linux内核。“ +“伴随RTL补丁的成功发展,以及明确的预期其最终会被集成到Linux内核主线代码中,导致Xenomai关注的重心发生了变化,”Emde说。 “Xenomai 3.0可与RT补丁结合起来使用,并提供了所谓的‘皮肤’,(译者注:一个封装层),使我们可以复用为其他系统编写的代码。不过,它们还没有完全统一起来,因为Xenomai使用了双内核方法,而RT补丁只适用于单一Linux内核。“ In more recent years, the RTL group’s various funding sources have dropped off, and OSADL took on that role, too. “When the development recently slowed down a bit because of a lack of funding, OSADL started its third milestone by directly funding Thomas Gleixner's work,” says Emde. -在最近几年中,RTL集团的各种资金来源已经脱落,并OSADL承担了这个角色了。 “当发展减缓近期由于缺乏资金下来了一点,OSADL通过直接资助托马斯Gleixner的工作,开始了它的第三个里程碑,”昂德说。 +近些年来,资助RTL项目的来源越来越少,最终OSADL接过了这个重任。Emde说:“当最近开发工作因缺少资金而陷入停滞时,OSADL对RTL的支持进入到第三个重大阶段:开始直接资助Thomas Gleixner的工作。” As Emde wrote in an [Oct. 5 blog entry][13], the growing expansion of Real-Time Linux beyond its core industrial base to areas like automotive and telecom suggested that the funding should be expanded as well. “It would not be entirely fair to let the automation industry fund the complete remaining work on its own, since other industries such as telecommunication also rely on the availability of a deterministic Linux kernel,” wrote Emde. -作为昂德在[十月写道5博客条目] [13],实时Linux的日益扩张超越其核心产业基地,如汽车和电信领域的建议,基金应该和扩大。 “让自动化产业基金自身完整的剩余工作,因为其他行业如电信还依赖于确定性的Linux内核的可用性这将不是完全公平,写道:”昂德。 +正如Emde在其[10月5日的一篇博文][13]中所描述的那样,实时Linux的应用领域正在日益扩大,由其原来主要服务的工业控制扩大到了汽车行业和电信业等领域,这表明资助的来源也应该得到拓宽。Emde原文写道:“仅仅靠工业自动化行业的资金来支撑剩余的工作是不合理的,因为电信等其他行业也在使用实时Linux内核。” When the Linux Foundation showed interest in expanding its funding role, OSADL decided it would be “much more efficient to have a single funding and control channel,” says Emde. He adds, however, that as a Gold member, OSADL is still participating in the oversight of the project, and will continue its advocacy and quality assurance activities. -当Linux基金会表现出扩大其融资作用的兴趣,OSADL决定这将是“更有效有一个单一的资金和控制渠道,”昂德说。然而,他补充说,作为金卡会员,OSADL仍然参与该项目的监督,并将继续倡导和质量保证活动。 +当Linux基金会表明有兴趣提供资金支持时,OSADL认为“单一的资助和控制渠道要有效得多”,Emde如是说。不过,他补充说,作为黄金级成员,OSADL仍参与监管项目的工作,会继续从事其宣传和质量保证方面的活动。 ### Automotive Looks for Real-Time Boost ### -###汽车看起来实时升压### +###汽车行业期待RTL的崛起### RTL will continue to see its greatest growth in industrial applications where it will gradually replace RTOS applications, says Emde. Yet, it is also growing quickly in automotive, and will later spread to railway and avionics, he adds. -RTL将继续看到它在工业领域最大的增长,其中它将逐步取代RTOS应用,昂德说。然而,它也迅速增长的汽车,稍后会蔓延到铁路和航空电子设备,他补充道。 +Emde表示,RTL会继续在工业应用领域迎来最迅猛的发展并逐渐取代其他实时操作系统。而且,他补充道,RTL在汽车行业发展也很迅猛,以后会扩大并应用到铁路和航空电子设备上。 Indeed, the growing role of Linux in automotive appears to be key to the Linux Foundation’s goals for RTL, with potential collaborations with its [Automotive Grade Linux][14] (AGL) workgroup. Automotive may also be the chief motivator for Google’s high-profile participation, speculates Emde. In addition, TI is deeply involved with automotive with its Jacinto processors. -事实上,Linux在汽车出现了越来越大的作用是关键的Linux基金会的目标RTL,与它的[汽车级Linux] [14](AGL)工作组的潜在合作。汽车也可能是主要的促进因素谷歌的高调参与,推测昂德。此外,TI是深入参与与汽车,其哈辛托处理器。 +的确,Linux在汽车行业将扮演越来越重要的角色,这也是Linux基金对RTL所寄予厚望的原因之所在。RTL工作组可能会与Linux基金会旗下的[车载Linux(Automotive Grade Linux,简称AGL)][14]工作组展开合作。Emde猜测,Google高调参与的主要动因可能也是希望将RTL用于汽车控制。此外,德州仪器(TI)也非常期望将其Jacinto处理器应用于汽车行业。 Linux-oriented automotive projects like AGL aim to move Linux beyond in-vehicle infotainment (IVI) into cluster controls and telematics where RTOSes like QNX dominate. Autonomous vehicles are even in greater need of real-time performance. -面向Linux的汽车项目,如联合集团的目标是将Linux的超越车载信息娱乐(IVI)到集群控制和远程信息处理,其中像QNX实时操作系统占据主导地位。自主车甚至更需要实时性能。 +面向车载Linux的项目(比如AGL)旨在让Linux在车载设备应用上不要仅限于车载信息娱乐(In-Vehicle Infotainment,简称IVI),而是要进入到譬如集群控制和车载通讯领域,这些领域目前主要使用QNX之类的实时操作系统。无人驾驶汽车对操作系统的实时性能的需求还要大。 Emde notes that OSADL's [SIL2LinuxMP][15] project may play an important role in extending RTL into automotive. SIL2LinuxMP is not an automotive-specific project, but BMW is participating, and automotive is one of the key applications. The project aims to certify base components required for RTL to run on a single- or multi-core COTS board. It defines bootloader, root filesystem, Linux kernel, and C library bindings to access RTL. -EMDE注意到OSADL的[SIL2LinuxMP] [15]项目可能在延长的RTL到汽车中发挥重要作用。 SIL2LinuxMP不是一个汽车专用的项目,但是宝马参与,以及汽车的关键应用之一。该项目旨在证明上的单核或多核COTS系统运行所需的RTL基本组件。它定义了引导程序,根文件系统,Linux内核和C库绑定访问RTL。 +Emde特别指出,OSADL的[SIL2LinuxMP][15]项目可能会在将RTL引入到汽车工业领域上扮演重要的角色。SIL2LinuxMP并不是专门针对汽车工业的项目,但随着BMW公司参与其中,汽车行业成为其很重要的应用领域之一。该项目的目标在于验证RTL在采用单核或多核CPU的标准化商用(Commercial Off-The-Shelf,简称COTS)板卡上运行所需的基本部件。它定义了引导程序、根文件系统、Linux内核以及对应支持RTL的C库。 Autonomous drones and robots are also ripe for real-time, and Xenomai is already used in many robots, as well as some drones. Yet, RTL’s role will be limited in the wider embedded Linux world of consumer electronics and Internet of Things applications. The main barrier is the latency of wireless communications and the Internet itself. -自主无人机和机器人也是成熟的实时和Xenomai已经使用在许多的机器人,以及一些无人机。然而,RTL的角色将在更广阔的嵌入式Linux的世界消费电子和物联网的应用受到限制。的主要障碍是无线通信和因特网本身的延迟。 +无人机和机器人使用实时Linux的时机也已成熟,Xenomai系统早已用在许多机器人以及一些无人机中。不过,在更广泛的嵌入式Linux世界,包括了消费电子产品和物联网应用中,RTL可以扮演的角色很有限。主要的障碍在于,无线通信和互联网本身带来的延迟。 “Real-time Linux will have a role within machine control and between machines and peripheral devices, but less between remote machines,” says Emde. “Real-time via Internet will probably never be possible.” -“实时Linux将拥有在机器控制和机器和外围设备之间的作用,但不远程计算机之间,”昂德说。 “通过互联网实时将可能永远不可能。” +Emde说:“实时Linux主要还是应用于系统内部控制以及系统与周边外设之间的控制,在远程控制机器上作用不大。通过互联网要想实现实时控制恐怕是永远不可能的。” -------------------------------------------------------------------------------- From 94ace6d7411bdb6f337b9abb76d8d8210cb3f129 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 16 Oct 2015 23:29:39 +0800 Subject: [PATCH 2283/2517] Translated translated/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md --- ...etup Red Hat Ceph Storage on CentOS 7.0.md | 251 ------------------ ...etup Red Hat Ceph Storage on CentOS 7.0.md | 250 +++++++++++++++++ 2 files changed, 250 insertions(+), 251 deletions(-) delete mode 100644 sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md create mode 100644 translated/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md diff --git a/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md b/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md deleted file mode 100644 index 1c61864ce8..0000000000 --- a/sources/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md +++ /dev/null @@ -1,251 +0,0 @@ -ictlyh Translating -How to Setup Red Hat Ceph Storage on CentOS 7.0 -================================================================================ -Ceph is an open source software platform that stores data on a single distributed computer cluster. When you are planning to build a cloud, then on top of the requirements you have to decide on how to implement your storage. Open Source CEPH is one of RED HAT mature technology based on object-store system, called RADOS, with a set of gateway APIs that present the data in block, file, and object modes. As a result of its open source nature, this portable storage platform may be installed and used in public or private clouds. The topology of a Ceph cluster is designed around replication and information distribution, which are intrinsic and provide data integrity. It is designed to be fault-tolerant, and can run on commodity hardware, but can also be run on a number of more advanced systems with the right setup. - -Ceph can be installed on any Linux distribution but it requires the recent kernel and other up-to-date libraries in order to be properly executed. But, here in this tutorial we will be using CentOS-7.0 with minimal installation packages on it. - -### System Resources ### - - **CEPH-STORAGE** - OS: CentOS Linux 7 (Core) - RAM:1 GB - CPU:1 CPU - DISK: 20 - Network: 45.79.136.163 - FQDN: ceph-storage.linoxide.com - - **CEPH-NODE** - OS: CentOS Linux 7 (Core) - RAM:1 GB - CPU:1 CPU - DISK: 20 - Network: 45.79.171.138 - FQDN: ceph-node.linoxide.com - -### Pre-Installation Setup ### - -There are few steps that we need to perform on each of our node before the CEPH storage setup. So first thing is to make sure that each node is configured with its networking setup with FQDN that is reachable to other nodes. - -**Configure Hosts** - -To setup the hosts entry on each node let's open the default hosts configuration file as shown below. - - # vi /etc/hosts - ----------- - - 45.79.136.163 ceph-storage ceph-storage.linoxide.com - 45.79.171.138 ceph-node ceph-node.linoxide.com - -**Install VMware Tools** - -While working on the VMware virtual environment, its recommended that you have installed its open VM tools. You can install using below command. - - #yum install -y open-vm-tools - -**Firewall Setup** - -If you are working on a restrictive environment where your local firewall in enabled then make sure that the number of following ports are allowed from in your CEPH storge admin node and client nodes. - -You must open ports 80, 2003, and 4505-4506 on your Admin Calamari node and port 80 to CEPH admin or Calamari node for inbound so that clients in your network can access the Calamari web user interface. - -You can start and enable firewall in centos 7 with given below command. - - #systemctl start firewalld - #systemctl enable firewalld - -To allow the mentioned ports in the Admin Calamari node run the following commands. - - #firewall-cmd --zone=public --add-port=80/tcp --permanent - #firewall-cmd --zone=public --add-port=2003/tcp --permanent - #firewall-cmd --zone=public --add-port=4505-4506/tcp --permanent - #firewall-cmd --reload - -On the CEPH Monitor nodes you have to allow the following ports in the firewall. - - #firewall-cmd --zone=public --add-port=6789/tcp --permanent - -Then allow the following list of default ports for talking to clients and monitors and for sending data to other OSDs. - - #firewall-cmd --zone=public --add-port=6800-7300/tcp --permanent - -It quite fair that you should disable firewall and SELinux settings if you are working in a non-production environment , so we are going to disable the firewall and SELinux in our test environment. - - #systemctl stop firewalld - #systemctl disable firewalld - -**System Update** - -Now update your system and then give it a reboot to implement the required changes. - - #yum update - #shutdown -r 0 - -### Setup CEPH User ### - -Now we will create a separate sudo user that will be used for installing the ceph-deploy utility on each node and allow that user to have password less access on each node because it needs to install software and configuration files without prompting for passwords on CEPH nodes. - -To create new user with its separate home directory run the below command on the ceph-storage host. - - [root@ceph-storage ~]# useradd -d /home/ceph -m ceph - [root@ceph-storage ~]# passwd ceph - -Each user created on the nodes must have sudo rights, you can assign the sudo rights to the user using running the following command as shown. - - [root@ceph-storage ~]# echo "ceph ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ceph - ceph ALL = (root) NOPASSWD:ALL - - [root@ceph-storage ~]# sudo chmod 0440 /etc/sudoers.d/ceph - -### Setup SSH-Key ### - -Now we will generate SSH keys on the admin ceph node and then copy that key to each Ceph cluster nodes. - -Let's run the following command on the ceph-node to copy its ssh key on the ceph-storage. - - [root@ceph-node ~]# ssh-keygen - Generating public/private rsa key pair. - Enter file in which to save the key (/root/.ssh/id_rsa): - Created directory '/root/.ssh'. - Enter passphrase (empty for no passphrase): - Enter same passphrase again: - Your identification has been saved in /root/.ssh/id_rsa. - Your public key has been saved in /root/.ssh/id_rsa.pub. - The key fingerprint is: - 5b:*:*:*:*:*:*:*:*:*:c9 root@ceph-node - The key's randomart image is: - +--[ RSA 2048]----+ - ----------- - - [root@ceph-node ~]# ssh-copy-id ceph@ceph-storage - -![SSH key](http://blog.linoxide.com/wp-content/uploads/2015/10/k3.png) - -### Configure PID Count ### - -To configure the PID count value, we will make use of the following commands to check the default kernel value. By default its a small maximum number of threads that is '32768'. -So will configure this value to a higher number of threads by editing the system conf file as shown in the image. - -![Change PID Value](http://blog.linoxide.com/wp-content/uploads/2015/10/3-PID-value.png) - -### Setup Your Administration Node Server ### - -With all the networking setup and verified, now we will install ceph-deploy using the user ceph. So, check the hosts entry by opening its file. - - #vim /etc/hosts - ceph-storage 45.79.136.163 - ceph-node 45.79.171.138 - -Now to add its repository run the below command. - - #rpm -Uhv http://ceph.com/rpm-giant/el7/noarch/ceph-release-1-0.el7.noarch.rpm - -![Adding EPEL](http://blog.linoxide.com/wp-content/uploads/2015/10/k1.png) - -OR create a new file and update the CEPH repository parameters but do not forget to mention your current release and distribution. - - [root@ceph-storage ~]# vi /etc/yum.repos.d/ceph.repo - ----------- - - [ceph-noarch] - name=Ceph noarch packages - baseurl=http://ceph.com/rpm-{ceph-release}/{distro}/noarch - enabled=1 - gpgcheck=1 - type=rpm-md - gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc - -After this update your system and install the ceph deploy package. - -### Installing CEPH-Deploy Package ### - -To upate the system with latest ceph repository and other packages, we will run the following command along with ceph-deploy installation command. - - #yum update -y && yum install ceph-deploy -y - -Image- - -### Setup the cluster ### - -Create a new directory and move into it on the admin ceph-node to collect all output files and logs by using the following commands. - - #mkdir ~/ceph-cluster - #cd ~/ceph-cluster - ----------- - - #ceph-deploy new storage - -![setup ceph cluster](http://blog.linoxide.com/wp-content/uploads/2015/10/k4.png) - -Upon successful execution of above command you can see it creating its configuration files. -Now to configure the default configuration file of CEPH, open it using any editor and place the following two lines under its global parameters that reflects your public network. - - #vim ceph.conf - osd pool default size = 1 - public network = 45.79.0.0/16 - -### Installing CEPH ### - -We are now going to install CEPH on each of the node associated with our CEPH cluster. To do so we make use of the following command to install CEPH on our both nodes that is ceph-storage and ceph-node as shown below. - - #ceph-deploy install ceph-node ceph-storage - -![installing ceph](http://blog.linoxide.com/wp-content/uploads/2015/10/k5.png) - -This will takes some time while processing all its required repositories and installing the required packages. - -Once the ceph installation process is complete on both nodes we will proceed to create monitor and gather keys by running the following command on the same node. - - #ceph-deploy mon create-initial - -![CEPH Initial Monitor](http://blog.linoxide.com/wp-content/uploads/2015/10/k6.png) - -### Setup OSDs and OSD Daemons ### - -Now we will setup disk storages, to do so first run the below command to List all of your usable disks by using the below command. - - #ceph-deploy disk list ceph-storage - -In results will get the list of your disks used on your storage nodes that you will use for creating the OSD. Let's run the following command that consists of your disks names as shown below. - - #ceph-deploy disk zap storage:sda - #ceph-deploy disk zap storage:sdb - -Now to finalize the OSD setup let's run the below commands to setup the journaling disk along with data disk. - - #ceph-deploy osd prepare storage:sdb:/dev/sda - #ceph-deploy osd activate storage:/dev/sdb1:/dev/sda1 - -You will have to repeat the same command on all the nodes while it will clean everything present on the disk. Afterwards to have a functioning cluster, we need to copy the different keys and configuration files from the admin ceph-node to all the associated nodes by using the following command. - - #ceph-deploy admin ceph-node ceph-storage - -### Testing CEPH ### - -We have almost completed the CEPH cluster setup, let's run the below command to check the status of the running ceph by using the below command on the admin ceph-node. - - #ceph status - #ceph health - HEALTH_OK - -So, if you did not get any error message at ceph status , that means you have successfully setup your ceph storage cluster on CentOS 7. - -### Conclusion ### - -In this detailed article we learned about the CEPH storage clustering setup using the two virtual Machines with CentOS 7 OS installed on them that can be used as a backup or as your local storage that can be used to precess other virtual machines by creating its pools. We hope you have got this article helpful. Do share your experiences when you try this at your end. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/storage/setup-red-hat-ceph-storage-centos-7-0/ - -作者:[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/translated/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md b/translated/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md new file mode 100644 index 0000000000..7e6ed0d2c2 --- /dev/null +++ b/translated/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md @@ -0,0 +1,250 @@ +如何在 CentOS 7.0 上配置 Ceph 存储 +How to Setup Red Hat Ceph Storage on CentOS 7.0 +================================================================================ +Ceph 是一个将数据存储在单一分布式计算机集群上的开源软件平台。当你计划构建一个云时,你首先需要决定如何实现你的存储。开源的 CEPH 是红帽原生技术之一,它基于称为 RADOS 的对象存储系统,用一组网关 API 表示块、文件、和对象模式中的数据。由于它自身开源的特性,这种便携存储平台能在公有和私有云上安装和使用。Ceph 集群的拓扑结构是按照备份和信息分布设计的,这内在设计能提供数据完整性。它的设计目标就是容错、通过正确配置能运行于商业硬件和一些更高级的系统。 + +Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要求最近的内核以及其它最新的库。在这篇指南中,我们会使用最小化安装的 CentOS-7.0。 + +### 系统资源 ### + + **CEPH-STORAGE** + OS: CentOS Linux 7 (Core) + RAM:1 GB + CPU:1 CPU + DISK: 20 + Network: 45.79.136.163 + FQDN: ceph-storage.linoxide.com + + **CEPH-NODE** + OS: CentOS Linux 7 (Core) + RAM:1 GB + CPU:1 CPU + DISK: 20 + Network: 45.79.171.138 + FQDN: ceph-node.linoxide.com + +### 安装前的配置 ### + +在安装 CEPH 存储之前,我们要在每个节点上完成一些步骤。第一件事情就是确保每个节点的网络已经配置好并且能相互访问。 + +**配置 Hosts** + +要在每个节点上配置 hosts 条目,要像下面这样打开默认的 hosts 配置文件。 + + # vi /etc/hosts + +---------- + + 45.79.136.163 ceph-storage ceph-storage.linoxide.com + 45.79.171.138 ceph-node ceph-node.linoxide.com + +**安装 VMware 工具** + +工作环境是 VMWare 虚拟环境时,推荐你安装它的 open VM 工具。你可以使用下面的命令安装。 + + #yum install -y open-vm-tools + +**配置防火墙** + +如果你正在使用启用了防火墙的限制性环境,确保在你的 CEPH 存储管理节点和客户端节点中开放了以下的端口。 + +你必须在你的 Admin Calamari 节点开放 80、2003、以及4505-4506 端口,并且允许通过 80 号端口到 CEPH 或 Calamari 管理节点,以便你网络中的客户端能访问 Calamari web 用户界面。 + +你可以使用下面的命令在 CentOS 7 中启动并启用防火墙。 + + #systemctl start firewalld + #systemctl enable firewalld + +运行以下命令使 Admin Calamari 节点开放上面提到的端口。 + + #firewall-cmd --zone=public --add-port=80/tcp --permanent + #firewall-cmd --zone=public --add-port=2003/tcp --permanent + #firewall-cmd --zone=public --add-port=4505-4506/tcp --permanent + #firewall-cmd --reload + +在 CEPH Monitor 节点,你要在防火墙中允许通过以下端口。 + + #firewall-cmd --zone=public --add-port=6789/tcp --permanent + +然后允许以下默认端口列表,以便能和客户端以及监控节点交互,并发送数据到其它 OSD。 + + #firewall-cmd --zone=public --add-port=6800-7300/tcp --permanent + +如果你工作在非生产环境,建议你停用防火墙以及 SELinux 设置,在我们的测试环境中我们会停用防火墙以及 SELinux。 + + #systemctl stop firewalld + #systemctl disable firewalld + +**系统升级** + +现在升级你的系统并重启使所需更改生效。 + + #yum update + #shutdown -r 0 + +### 设置 CEPH 用户 ### + +现在我们会新建一个单独的 sudo 用户用于在每个节点安装 ceph-deploy工具,并允许该用户无密码访问每个节点,因为它需要在 CEPH 节点上安装软件和配置文件而不会有输入密码提示。 + +运行下面的命令在 ceph-storage 主机上新建有独立 home 目录的新用户。 + + [root@ceph-storage ~]# useradd -d /home/ceph -m ceph + [root@ceph-storage ~]# passwd ceph + +节点中新建的每个用户都要有 sudo 权限,你可以使用下面展示的命令赋予 sudo 权限。 + + [root@ceph-storage ~]# echo "ceph ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ceph + ceph ALL = (root) NOPASSWD:ALL + + [root@ceph-storage ~]# sudo chmod 0440 /etc/sudoers.d/ceph + +### 设置 SSH 密钥 ### + +现在我们会在 ceph 管理节点生成 SSH 密钥并把密钥复制到每个 Ceph 集群节点。 + +在 ceph-node 运行下面的命令复制它的 ssh 密钥到 ceph-storage。 + + [root@ceph-node ~]# ssh-keygen + Generating public/private rsa key pair. + Enter file in which to save the key (/root/.ssh/id_rsa): + Created directory '/root/.ssh'. + Enter passphrase (empty for no passphrase): + Enter same passphrase again: + Your identification has been saved in /root/.ssh/id_rsa. + Your public key has been saved in /root/.ssh/id_rsa.pub. + The key fingerprint is: + 5b:*:*:*:*:*:*:*:*:*:c9 root@ceph-node + The key's randomart image is: + +--[ RSA 2048]----+ + +---------- + + [root@ceph-node ~]# ssh-copy-id ceph@ceph-storage + +![SSH key](http://blog.linoxide.com/wp-content/uploads/2015/10/k3.png) + +### 配置 PID 数目 ### + +要配置 PID 数目的值,我们会使用下面的命令检查默认的内核值。默认情况下,是一个小的最大线程数 32768. +如下图所示通过编辑系统配置文件配置该值为一个更大的数。 + +![更改 PID 值](http://blog.linoxide.com/wp-content/uploads/2015/10/3-PID-value.png) + +### 配置管理节点服务器 ### + +配置并验证了所有网络后,我们现在使用 ceph 用户安装 ceph-deploy。通过打开文件检查 hosts 条目。 + + #vim /etc/hosts + ceph-storage 45.79.136.163 + ceph-node 45.79.171.138 + +运行下面的命令添加它的库。 + + #rpm -Uhv http://ceph.com/rpm-giant/el7/noarch/ceph-release-1-0.el7.noarch.rpm + +![添加 EPEL](http://blog.linoxide.com/wp-content/uploads/2015/10/k1.png) + +或者创建一个新文件并更新 CEPH 库参数,别忘了替换你当前的 Release 和版本号。 + + [root@ceph-storage ~]# vi /etc/yum.repos.d/ceph.repo + +---------- + + [ceph-noarch] + name=Ceph noarch packages + baseurl=http://ceph.com/rpm-{ceph-release}/{distro}/noarch + enabled=1 + gpgcheck=1 + type=rpm-md + gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc + +之后更新你的系统并安装 ceph-deploy 软件包。 + +### 安装 CEPH-Deploy 软件包 ### + +我们运行下面的命令以及 ceph-deploy 安装命令来更新系统以及最新的 ceph 库和其它软件包。 + + #yum update -y && yum install ceph-deploy -y + + +### 配置集群 ### + +使用下面的命令在 ceph 管理节点新建一个目录并进入新目录,用于收集所有输出文件和日志。 + + #mkdir ~/ceph-cluster + #cd ~/ceph-cluster + +---------- + + #ceph-deploy new storage + +![设置 ceph 集群](http://blog.linoxide.com/wp-content/uploads/2015/10/k4.png) + +如果成功执行了上面的命令,你会看到它新建了配置文件。 +现在配置 CEPH 默认的配置文件,用任意编辑器打开它并在会影响你公共网络的 global 参数下面添加以下两行。 + + #vim ceph.conf + osd pool default size = 1 + public network = 45.79.0.0/16 + +### 安装 CEPH ### + +现在我们准备在和 CEPH 集群相关的每个节点上安装 CEPH。我们使用下面的命令在 ceph-storage 和 ceph-node 上安装 CEPH。 + + #ceph-deploy install ceph-node ceph-storage + +![安装 ceph](http://blog.linoxide.com/wp-content/uploads/2015/10/k5.png) + +处理所有所需仓库和安装所需软件包会需要一些时间。 + +当两个节点上的 ceph 安装过程都完成后,我们下一步会通过在相同节点上运行以下命令创建监视器并收集密钥。 + + #ceph-deploy mon create-initial + +![CEPH 初始化监视器](http://blog.linoxide.com/wp-content/uploads/2015/10/k6.png) + +### 设置 OSDs 和 OSD 守护进程 ### + +现在我们会设置磁盘存储,首先运行下面的命令列出你所有可用的磁盘。 + + #ceph-deploy disk list ceph-storage + +结果中会列出你存储节点中使用的磁盘,你会用它们来创建 OSD。让我们运行以下包括你磁盘名称的命令。 + + #ceph-deploy disk zap storage:sda + #ceph-deploy disk zap storage:sdb + +为了最后完成 OSD 配置,运行下面的命令配置日志磁盘以及数据磁盘。 + + #ceph-deploy osd prepare storage:sdb:/dev/sda + #ceph-deploy osd activate storage:/dev/sdb1:/dev/sda1 + +你需要在所有节点上运行相同的命令,它会清除你磁盘上的所有东西。之后为了集群能运转起来,我们需要使用以下命令从 ceph 管理节点复制不同的密钥和配置文件到所有相关节点。 + + #ceph-deploy admin ceph-node ceph-storage + +### 测试 CEPH ### + +我们几乎完成了 CEPH 集群设置,让我们在 ceph 管理节点上运行下面的命令检查正在运行的 ceph 状态。 + + #ceph status + #ceph health + HEALTH_OK + +如果你在 ceph status 中没有看到任何错误信息,就意味着你成功地在 CentOS 7 上安装了 ceph 存储集群。 + +### 总结 ### + +在这篇详细的文章中我们学习了如何使用两台安装了 CentOS 7 的虚拟机设置 CEPH 存储集群,这能用于备份或者作为用于处理其它虚拟机的本地存储。我们希望这篇文章能对你有所帮助。当你试着安装的时候记得分享你的经验。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/storage/setup-red-hat-ceph-storage-centos-7-0/ + +作者:[Kashif Siddique][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者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 From c75f5fb55465cadacf83daaed8ef09d62bd3d072 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 16 Oct 2015 23:36:17 +0800 Subject: [PATCH 2284/2517] Update 20151012 How to Setup DockerUI--a Web Interface for Docker.md --- ...up DockerUI--a Web Interface for Docker.md | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md b/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md index 8e13fdc8d5..e3e60aa8c2 100644 --- a/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md +++ b/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md @@ -1,29 +1,28 @@ translating by Ezio - -How to Setup DockerUI - a Web Interface for Docker +在浏览器上使用Docker ================================================================================ Docker is getting more popularity day by day. The idea of running a complete Operating System inside a container rather than running inside a virtual machine is an awesome technology. Docker has made lives of millions of system administrators and developers pretty easy for getting their work done in no time. It is an open source technology that provides an open platform to pack, ship, share and run any application as a lightweight container without caring on which operating system we are running on the host. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. Running docker containers and managing them may come a bit difficult and time consuming, so there is a web based application named DockerUI which is make managing and running container pretty simple. DockerUI is highly beneficial to people who are not much aware of linux command lines and want to run containerized applications. DockerUI is an open source web based application best known for its beautiful design and ease simple interface for running and managing docker containers. Here are some easy steps on how we can setup Docker Engine with DockerUI in our linux machine. -### 1. Installing Docker Engine ### +### 1. 安装docker ### First of all, we'll gonna install docker engine in our linux machine. Thanks to its developers, docker is very easy to install in any major linux distribution. To install docker engine, we'll need to run the following command with respect to which distribution we are running. -#### On Ubuntu/Fedora/CentOS/RHEL/Debian #### +#### Ubuntu/Fedora/CentOS/RHEL/Debian #### Docker maintainers have written an awesome script that can be used to install docker engine in Ubuntu 15.04/14.10/14.04, CentOS 6.x/7, Fedora 22, RHEL 7 and Debian 8.x distributions of linux. This script recognizes the distribution of linux installed in our machine, then adds the required repository to the filesystem, updates the local repository index and finally installs docker engine and required dependencies from it. To install docker engine using that script, we'll need to run the following command under root or sudo mode. # curl -sSL https://get.docker.com/ | sh -#### On OpenSuse/SUSE Linux Enterprise #### +#### OpenSuse/SUSE Linux 企业版 #### To install docker engine in the machine running OpenSuse 13.1/13.2 or SUSE Linux Enterprise Server 12, we'll simply need to execute the zypper command. We'll gonna install docker using zypper command as the latest docker engine is available on the official repository. To do so, we'll run the following command under root/sudo mode. # zypper in docker -#### On ArchLinux #### +#### ArchLinux #### Docker is available in the official repository of Archlinux as well as in the AUR packages maintained by the community. So, we have two options to install docker in archlinux. To install docker using the official arch repository, we'll need to run the following pacman command. @@ -33,7 +32,7 @@ But if we want to install docker from the Archlinux User Repository ie AUR, then # yaourt -S docker-git -### 2. Starting Docker Daemon ### +### 2. 启动 ### After docker is installed, we'll now gonna start our docker daemon so that we can run docker containers and manage them. We'll run the following command to make sure that docker daemon is installed and to start the docker daemon. @@ -45,7 +44,7 @@ After docker is installed, we'll now gonna start our docker daemon so that we ca # systemctl start docker -### 3. Installing DockerUI ### +### 3. 安装DockerUI ### Installing DockerUI is pretty easy than installing docker engine. We just need to pull the dockerui from the Docker Registry Hub and run it inside a container. To do so, we'll simply need to run the following command. @@ -71,31 +70,31 @@ Currently, we cannot pull an image directly from DockerUI so, we'll need to pull The above command will pull an image tagged as ubuntu from the official [Docker Hub][1]. Similarly, we can pull more images that we require and are available in the hub. -### 4. Managing with DockerUI ### +### 4. 管理 ### After we have started the dockerui container, we'll now have fun with it to start, pause, stop, remove and perform many possible activities featured by dockerui with docker containers and images. First of all, we'll need to open the web application using our web browser. To do so, we'll need to point our browser to http://ip-address:9000 or http://mydomain.com:9000 according to the configuration of our system. By default, there is no login authentication needed for the user access but we can configure our web server for adding authentication. To start a container, first we'll need to have images of the required application we want to run a container with. -#### Create a Container #### +#### 创建 #### To create a container, we'll need to go to the section named Images then, we'll need to click on the image id which we want to create a container of. After clicking on the required image id, we'll need to click on Create button then we'll be asked to enter the required properties for our container. And after everything is set and done. We'll need to click on Create button to finally create a container. ![Creating Docker Container](http://blog.linoxide.com/wp-content/uploads/2015/10/creating-docker-container.png) -#### Stop a Container #### +#### 中止 #### To stop a container, we'll need to move towards the Containers page and then select the required container we want to stop. Now, we'll want to click on Stop option which we can see under Actions drop-down menu. ![Managing Container](http://blog.linoxide.com/wp-content/uploads/2015/10/managing-container.png) -#### Pause and Resume #### +#### 暂停与恢复 #### To pause a container, we simply select the required container we want to pause by keeping a check mark on the container and then click the Pause option under Actions . This is will pause the running container and then, we can simply resume the container by selecting Unpause option from the Actions drop down menu. -#### Kill and Remove #### +#### 删除 #### Like we had performed the above tasks, its pretty easy to kill and remove a container or an image. We just need to check/select the required container or image and then select the Kill or Remove button from the application according to our need. -### Conclusion ### +### 结论 ### DockerUI is a beautiful utilization of Docker Remote API to develop an awesome web interface for managing docker containers. The developers have designed and developed this application in pure HTML and JS language. It is currently incomplete and is under heavy development so we don't recommend it for the use in production currently. It makes users pretty easy to manage their containers and images with simple clicks without needing to execute lines of commands to do small jobs. If we want to contribute DockerUI, we can simply visit its [Github Repository][2]. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! From 51face464782fbba01d1597e65e9dd1b5f7e91eb Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 17 Oct 2015 23:01:35 +0800 Subject: [PATCH 2285/2517] Update 20151012 What is a good IDE for R on Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- sources/share/20151012 What is a good IDE for R on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20151012 What is a good IDE for R on Linux.md b/sources/share/20151012 What is a good IDE for R on Linux.md index fa0af9f921..8079396b50 100644 --- a/sources/share/20151012 What is a good IDE for R on Linux.md +++ b/sources/share/20151012 What is a good IDE for R on Linux.md @@ -1,3 +1,5 @@ +FSSlc translating + What is a good IDE for R on Linux ================================================================================ Some time ago, I covered some of the [best IDEs for C/C++][1] on Linux. Obviously C and C++ are not the only programming languages out there, and it is time to turn to something a bit more specific. @@ -58,4 +60,4 @@ via: http://xmodulo.com/good-ide-for-r-on-linux.html [5]:http://www.vim.org/scripts/script.php?script_id=2628 [6]:http://www.lepem.ufc.br/jaa/r-plugin.html [7]:http://rgedit.sourceforge.net/ -[8]:https://rkward.kde.org/ \ No newline at end of file +[8]:https://rkward.kde.org/ From bf1f5311fc298b06a2fca01b853875862dbf7594 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 18 Oct 2015 09:07:32 +0800 Subject: [PATCH 2286/2517] PUB:20151007 Open Source Media Player MPlayer 1.2 Released @alim0x --- ...1007 Open Source Media Player MPlayer 1.2 Released.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) rename {translated/share => published}/20151007 Open Source Media Player MPlayer 1.2 Released.md (88%) diff --git a/translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md b/published/20151007 Open Source Media Player MPlayer 1.2 Released.md similarity index 88% rename from translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md rename to published/20151007 Open Source Media Player MPlayer 1.2 Released.md index 622adebd61..95a777e6f1 100644 --- a/translated/share/20151007 Open Source Media Player MPlayer 1.2 Released.md +++ b/published/20151007 Open Source Media Player MPlayer 1.2 Released.md @@ -4,7 +4,7 @@ 在 [MPlayer][1] 1.1 发布将近3年后,新版 MPlayer 终于在上周发布了。在新版本 MPlayer 1.2 中带来了对许多新编码的解码支持。 -MPlayer 是一款跨平台的开源媒体播放器。它的名字是“Movie Player”的缩写。MPlayer 已经成为 Linux 上最老牌的媒体播放器之一,在过去的15年里,它还启发了许多其他媒体播放器。著名的基于 MPlayer 的媒体播放器有: +MPlayer 是一款跨平台的开源媒体播放器。它的名字是“Movie Player”的缩写。MPlayer 是 Linux 上最老牌的媒体播放器之一,在过去的15年里,它还带动出现了许多其他媒体播放器。著名的基于 MPlayer 的媒体播放器有: - [MPV][2] - SMPlayer @@ -30,19 +30,14 @@ MPlayer 是一款跨平台的开源媒体播放器。它的名字是“Movie Pla 打开一个终端,运行下列命令: wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.2.tar.xz - tar xvf MPlayer-1.1.1.tar.xz - cd MPlayer-1.2 - sudo apt-get install yasm - ./configure 在你运行 make 的时候,在你的终端屏幕上会显示一些东西,并且你需要一些时间来编译它。保持耐心。 make - sudo make install 如果你觉得从源码编译不大习惯的话,我建议你等待 MPlayer 1.2 提交到你的 Linux 发行版仓库中,或者用其它的播放器替代,比如 MPV。 @@ -53,7 +48,7 @@ via: http://itsfoss.com/mplayer-1-2-released/ 作者:[Abhishek][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 301ad6d507734f9a1812d21cc832a55a3f71f719 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 18 Oct 2015 09:26:34 +0800 Subject: [PATCH 2287/2517] PUB:20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux @oska874 --- ...orecasts from the command line on Linux.md | 72 +++++++++++++++++++ ...orecasts from the command line on Linux.md | 70 ------------------ 2 files changed, 72 insertions(+), 70 deletions(-) create mode 100644 published/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md delete mode 100644 translated/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md diff --git a/published/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md b/published/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md new file mode 100644 index 0000000000..dae869445b --- /dev/null +++ b/published/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md @@ -0,0 +1,72 @@ +Linux 有问必答:如何在 Linux 命令行下浏览天气预报 +================================================================================ +> **Q**: 我经常在 Linux 桌面查看天气预报。然而,是否有一种在终端环境下,不通过桌面小插件或者浏览器查询天气预报的方法? + +对于 Linux 桌面用户来说,有很多办法获取天气预报,比如使用专门的天气应用、桌面小插件,或者面板小程序。但是如果你的工作环境是基于终端的,这里也有一些在命令行下获取天气的手段。 + +其中有一个就是 [wego][1],**一个终端下的小巧程序**。使用基于 ncurses 的接口,这个命令行程序允许你查看当前的天气情况和之后的预报。它也会通过一个天气预报的 API 收集接下来 5 天的天气预报。 + +### 在 Linux 下安装 wego ### + +安装 wego 相当简单。wego 是用 Go 编写的,引起第一个步骤就是安装 [Go 语言][2]。然后再安装 wego。 + + $ go get github.com/schachmat/wego + +wego 会被安装到 $GOPATH/bin,所以要将 $GOPATH/bin 添加到 $PATH 环境变量。 + + $ echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.bashrc + $ source ~/.bashrc + +现在就可与直接从命令行启动 wego 了。 + + $ wego + +第一次运行 weg 会生成一个配置文件(`~/.wegorc`),你需要指定一个天气 API key。 +你可以从 [worldweatheronline.com][3] 获取一个免费的 API key。免费注册和使用。你只需要提供一个有效的邮箱地址。 + +![](https://farm6.staticflickr.com/5781/21317466341_5a368b0d26_c.jpg) + +你的 .wegorc 配置文件看起来会这样: + +![](https://farm6.staticflickr.com/5620/21121418558_df0d27cd0a_b.jpg) + +除了 API key,你还可以把你想要查询天气的地方、使用的城市/国家名称、语言配置在 `~/.wegorc` 中。 +注意,这个天气 API 的使用有限制:每秒最多 5 次查询,每天最多 250 次查询。 +当你重新执行 wego 命令,你将会看到最新的天气预报(当然是你的指定地方),如下显示。 + +![](https://farm6.staticflickr.com/5776/21121218110_dd51e03ff4_c.jpg) + +显示出来的天气信息包括:(1)温度,(2)风速和风向,(3)可视距离,(4)降水量和降水概率 +默认情况下会显示3 天的天气预报。如果要进行修改,可以通过参数改变天气范围(最多5天),比如要查看 5 天的天气预报: + + $ wego 5 + +如果你想检查另一个地方的天气,只需要提供城市名即可: + + $ wego Seattle + +### 问题解决 ### + +1. 可能会遇到下面的错误: + + user: Current not implemented on linux/amd64 + + 当你在一个不支持原生 Go 编译器的环境下运行 wego 时就会出现这个错误。在这种情况下你只需要使用 gccgo ——一个 Go 的编译器前端来编译程序即可。这一步可以通过下面的命令完成。 + + $ sudo yum install gcc-go + $ go get -compiler=gccgo github.com/schachmat/wego + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/weather-forecasts-command-line-linux.html + +作者:[Dan Nanni][a] +译者:[oska874](https://github.com/oska874) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:https://github.com/schachmat/wego +[2]:http://ask.xmodulo.com/install-go-language-linux.html +[3]:https://developer.worldweatheronline.com/auth/register diff --git a/translated/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md b/translated/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md deleted file mode 100644 index b7751e118a..0000000000 --- a/translated/tech/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md +++ /dev/null @@ -1,70 +0,0 @@ -Linux 问与答:如何在Linux 命令行下浏览天气预报 -================================================================================ -> **Q**: 我经常在Linux 桌面查看天气预报。然而,是否有一种在终端环境下,不通过桌面小插件或者网络查询天气预报的方法? - -对于Linux 桌面用户来说,有很多办法获取天气预报,比如使用专门的天气应用,桌面小插件,或者面板小程序。但是如果你的工作环境实际与终端的,这里也有一些在命令行下获取天气的手段。 - -其中有一个就是 [wego][1],**一个终端下的小巧程序**。使用基于ncurses 的接口,这个命令行程序允许你查看当前的天气情况和之后的预报。它也会通过一个天气预报的API 收集接下来5 天的天气预报。 - -### 在Linux 下安装Wego ### -安装wego 相当简单。wego 是用Go 编写的,引起第一个步骤就是安装[Go 语言][2]。然后再安装wego。 - - $ go get github.com/schachmat/wego - -wego 会被安装到$GOPATH/bin,所以要将$GOPATH/bin 添加到$PATH 环境变量。 - - $ echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.bashrc - $ source ~/.bashrc - -现在就可与直接从命令行启动wego 了。 - - $ wego - -第一次运行weg 会生成一个配置文件(~/.wegorc),你需要指定一个天气API key。 -你可以从[worldweatheronline.com][3] 获取一个免费的API key。免费注册和使用。你只需要提供一个有效的邮箱地址。 - -![](https://farm6.staticflickr.com/5781/21317466341_5a368b0d26_c.jpg) - -你的 .wegorc 配置文件看起来会这样: - -![](https://farm6.staticflickr.com/5620/21121418558_df0d27cd0a_b.jpg) - -除了API key,你还可以把你想要查询天气的地方、使用的城市/国家名称、语言配置在~/.wegorc 中。 -注意,这个天气API 的使用有限制:每秒最多5 次查询,每天最多250 次查询。 -当你重新执行wego 命令,你将会看到最新的天气预报(当然是你的指定地方),如下显示。 - -![](https://farm6.staticflickr.com/5776/21121218110_dd51e03ff4_c.jpg) - -显示出来的天气信息包括:(1)温度,(2)风速和风向,(3)可视距离,(4)降水量和降水概率 -默认情况下会显示3 天的天气预报。如果要进行修改,可以通过参数改变天气范围(最多5天),比如要查看5 天的天气预报: - - $ wego 5 - -如果你想检查另一个地方的天气,只需要提供城市名即可: - - $ wego Seattle - -### 问题解决 ### -1. 可能会遇到下面的错误: - - user: Current not implemented on linux/amd64 - - 当你在一个不支持原生Go 编译器的环境下运行wego 时就会出现这个错误。在这种情况下你只需要使用gccgo ——一个Go 的编译器前端来编译程序即可。这一步可以通过下面的命令完成。 - - $ sudo yum install gcc-go - $ go get -compiler=gccgo github.com/schachmat/wego - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/weather-forecasts-command-line-linux.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni -[1]:https://github.com/schachmat/wego -[2]:http://ask.xmodulo.com/install-go-language-linux.html -[3]:https://developer.worldweatheronline.com/auth/register From 0b441f8deb16e7771dd62d852c7670ffb6548da2 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 18 Oct 2015 09:45:17 +0800 Subject: [PATCH 2288/2517] PUB:20150908 How to Run ISO Files Directly From the HDD with GRUB2 @Locez --- ... Files Directly From the HDD with GRUB2.md | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md (80%) diff --git a/translated/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md b/published/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md similarity index 80% rename from translated/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md rename to published/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md index 49850d831e..ae5ea004d4 100644 --- a/translated/tech/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md +++ b/published/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md @@ -1,10 +1,12 @@ 如何使用 GRUB 2 直接从硬盘运行 ISO 文件 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-featured.png) + 大多数 Linux 发行版都会提供一个可以从 USB 启动的 live 环境,以便用户无需安装即可测试系统。我们可以用它来评测这个发行版或仅仅是当成一个一次性系统,并且很容易将这些文件复制到一个 U 盘上,在某些情况下,我们可能需要经常运行同一个或不同的 ISO 镜像。GRUB 2 可以配置成直接从启动菜单运行一个 live 环境,而不需要烧录这些 ISO 到硬盘或 USB 设备。 ### 获取和检查可启动的 ISO 镜像 ### -为了获取 ISO 镜像,我们通常应该访问所需要的发行版的网站下载与我们架构兼容的镜像文件。如果这个镜像可以从 U 盘启动,那它也应该可以从 GRUB 菜单启动。 + +为了获取 ISO 镜像,我们通常应该访问所需的发行版的网站下载与我们架构兼容的镜像文件。如果这个镜像可以从 U 盘启动,那它也应该可以从 GRUB 菜单启动。 当镜像下载完后,我们应该通过 MD5 校验检查它的完整性。这会输出一大串数字与字母合成的序列。 @@ -13,13 +15,12 @@ 将这个序列与下载页提供的 MD5 校验码进行比较,两者应该完全相同。 ### 配置 GRUB 2 ### + ISO 镜像文件包含了整个系统。我们要做的仅仅是告诉 GRUB 2 哪里可以找到 kernel 和 initramdisk 或 initram 文件系统(这取决于我们所使用的发行版)。 -在下面的例子中,一个 Kubuntu 15.04 live 环境将被配置到 Ubuntu 14.04 盒子的 Grub 启动菜单项。这应该能在大多数新的以 Ubuntu 为基础的系统上运行。如果你是其他系统并且想实现一些其它的东西,你可以从[这些文件][1]获取灵感,但这会要求你拥有一点 GRUB 使用经验。 +在下面的例子中,一个 Kubuntu 15.04 live 环境将被配置到 Ubuntu 14.04 机器的 Grub 启动菜单项。这应该能在大多数新的以 Ubuntu 为基础的系统上运行。如果你是其它系统并且想实现一些其它的东西,你可以从[这些文件][1]了解更多细节,但这会要求你拥有一点 GRUB 使用经验。 -这个例子的文件 `kubuntu-15.04-desktop-amd64.iso` - -放在位于 `/dev/sda1` 的 `/home/maketecheasier/TempISOs/` 上. +这个例子的文件 `kubuntu-15.04-desktop-amd64.iso` 放在位于 `/dev/sda1` 的 `/home/maketecheasier/TempISOs/` 上。 为了使 GRUB 2 能正确找到它,我们应该编辑 @@ -39,7 +40,7 @@ ISO 镜像文件包含了整个系统。我们要做的仅仅是告诉 GRUB 2 ### 分析上述代码 ### -首先设置了一个变量名 `$menuentry` ,这是 ISO 文件的所在位置 。如果你想改变一个 ISO ,你应该修改 `isofile="/path/to/file/name-of-iso-file-.iso"`. +首先设置了一个变量名 `$menuentry` ,这是 ISO 文件的所在位置 。如果你想换一个 ISO ,你应该修改 `isofile="/path/to/file/name-of-iso-file-.iso"`. 下一行是指定回环设备,且必须给出正确的分区号码。 @@ -51,11 +52,11 @@ GRUB 的命名在这里稍微有点困惑,对于硬盘来说,它从 “0” 在 Linux 中第一块硬盘,第一个分区是 `/dev/sda1` ,但在 GRUB2 中则是 `hd0,1` 。第二块硬盘,第三个分区则是 `hd1,3`, 依此类推. -下一个重要的行是 +下一个重要的行是: linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=${isofile} quiet splash -这会载入内核镜像,在新的 Ubuntu Live CD 中,内核被存放在 `/casper` 目录,并且命名为 `vmlinuz.efi` 。如果你使用的是其它系统,可能会没有 `.efi` 扩展名或内核被存放在其它地方 (可以使用归档管理器打开 ISO 文件在 `/casper` 中查找确认)。最后一个选项, `quiet splash`, 是一个常规的 GRUB 选项无论你是否在意改动它们。 +这会载入内核镜像,在新的 Ubuntu Live CD 中,内核被存放在 `/casper` 目录,并且命名为 `vmlinuz.efi` 。如果你使用的是其它系统,可能会没有 `.efi` 扩展名或内核被存放在其它地方 (可以使用归档管理器打开 ISO 文件在 `/casper` 中查找确认)。最后一个选项, `quiet splash` ,是一个常规的 GRUB 选项,改不改无所谓。 最后 @@ -65,13 +66,13 @@ GRUB 的命名在这里稍微有点困惑,对于硬盘来说,它从 “0” ### 启动 live 系统 ### -做完上面所有的步骤后,需要更新 GRUB2 +做完上面所有的步骤后,需要更新 GRUB2: sudo update-grub ![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-updare-grub.png) -当重启系统后,应该可以看见一个新的,并且允许我们启动刚刚配置的 ISO 镜像的 GRUB 条目 +当重启系统后,应该可以看见一个新的、并且允许我们启动刚刚配置的 ISO 镜像的 GRUB 条目: ![](https://www.maketecheasier.com/assets/uploads/2015/07/rundirectiso-grub-menu.png) @@ -83,7 +84,7 @@ via: https://www.maketecheasier.com/run-iso-files-hdd-grub2/ 作者:[Attila Orosz][a] 译者:[Locez](https://github.com/locez) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b83d0b678695286ac66d2a793603d2b21235f7b9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 18 Oct 2015 10:26:41 +0800 Subject: [PATCH 2289/2517] PUB:20151007 Productivity Tools And Tips For Linux @GOLinux --- ...1007 Productivity Tools And Tips For Linux.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20151007 Productivity Tools And Tips For Linux.md (85%) diff --git a/translated/tech/20151007 Productivity Tools And Tips For Linux.md b/published/20151007 Productivity Tools And Tips For Linux.md similarity index 85% rename from translated/tech/20151007 Productivity Tools And Tips For Linux.md rename to published/20151007 Productivity Tools And Tips For Linux.md index a3245013fa..3bc56cc9f6 100644 --- a/translated/tech/20151007 Productivity Tools And Tips For Linux.md +++ b/published/20151007 Productivity Tools And Tips For Linux.md @@ -1,4 +1,4 @@ -Linux产能工具及其使用技巧 +Linux 产能工具及其使用技巧 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Productivity-Tips-Linux.jpg) @@ -6,7 +6,7 @@ Linux产能工具及其使用技巧 ### Linux产能工具及其使用技巧 ### -再次说明,我在写下本文时正在使用的是Ubuntu。但是,我将要在这里展示给大家产能工具及其使用技巧却适用于外面的大多数Linux发行版。 +再次说明,我在写下本文时正在使用的是Ubuntu。但是,我将要在这里展示给大家产能工具及其使用技巧却适用于市面上的大多数Linux发行版。 #### 外界的音乐 #### @@ -36,14 +36,14 @@ Ctrl+ C和Ctrl+V是我们日常计算机生活中不可缺少的一部分,它 如果你正忙着处理其它事情,而此时一个桌面通知闪了出来又逐渐消失了,你会怎么做?你会想要看看通知都说了什么,不是吗?最近通知指示器就是用于处理此项工作,它会保留一个最近所有通知的历史记录。这样,你就永远不会错过桌面通知了。 -你可以阅读[最近通知指示器这里][13]。 +你可以在此阅读[最近通知指示器][13]。 #### 终端技巧 #### 不,我不打算给你们展示所有那些Linux命令技巧和快捷方法,那会写满整个博客了。我打算给你们展示一些终端黑技巧,你可以用它们来提高你的生产力。 - **修改**sudo**密码超时**:默认情况下,sudo命令要求你在15分钟后再次输入密码,这真是让人讨厌。实际上,你可以修改默认的sudo密码超时。[此教程][14]会给你展示如何来实现。 -- **获取命令完成的桌面通知**:这是IT朋友们之间的一个常见的玩笑,开发者们花费大量时间来等待程序编译完成,而这不完全是正确的。但是,它确实影响到了生产力,因为在你等待程序编译完成时,你可以做其它事情,并忘了你在终端中运行的命令。一个更好的途径,就是在一个命令完成时,让它显示桌面通知。这样,你就不会长时间被打断,并且可以回到之前想要做的事情上。请阅读[如何获取命令完成的桌面通知][15]。 +- **获取命令完成的桌面通知**:这是IT朋友们之间的一个常见的玩笑——开发者们花费大量时间来等待程序编译完成——然而这不完全是正确的。但是,它确实影响到了生产力,因为在你等待程序编译完成时,你可以做其它事情,并忘了你在终端中运行的命令。一个更好的途径,就是在一个命令完成时,让它显示桌面通知。这样,你就不会长时间被打断,并且可以回到之前想要做的事情上。请阅读[如何获取命令完成的桌面通知][15]。 我知道,这不是一篇全面涵盖了**提升生产力**的文章。但是,这些小应用和小技巧可以在实际生活中帮助你在你宝贵的时间中做得更多。 @@ -55,20 +55,20 @@ via: http://itsfoss.com/productivity-tips-ubuntu/ 作者:[Abhishek][a] 译者:[GOLinux](https://github.com/GOLinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/abhishek/ [1]:http://www.helpscout.net/blog/music-productivity/ -[2]:http://itsfoss.com/ambient-noise-music-player-ubuntu/ +[2]:https://linux.cn/article-5233-1.html [3]:http://www.noisli.com/ [4]:https://en.wikipedia.org/wiki/Pomodoro_Technique [5]:http://manuel-kehl.de/projects/go-for-it/ [6]:http://todotxt.com/ -[7]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ +[7]:https://linux.cn/article-5337-1.html [8]:http://itsfoss.com/indicator-stickynotes-windows-like-sticky-note-app-for-ubuntu/ -[9]:http://itsfoss.com/install-google-keep-ubuntu-1310/ +[9]:https://linux.cn/article-2634-1.html [10]:https://evernote.com/ [11]:http://itsfoss.com/5-evernote-alternatives-linux/ [12]:https://esite.ch/tag/diodon/ From 855cbed88f4d48b5e65158c81dc7a2b1e7100c67 Mon Sep 17 00:00:00 2001 From: martin qi Date: Mon, 19 Oct 2015 01:08:40 +0800 Subject: [PATCH 2290/2517] Create 20150716 Interview--Larry Wall.md --- .../talk/20150716 Interview--Larry Wall.md | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 translated/talk/20150716 Interview--Larry Wall.md diff --git a/translated/talk/20150716 Interview--Larry Wall.md b/translated/talk/20150716 Interview--Larry Wall.md new file mode 100644 index 0000000000..e989b01d9d --- /dev/null +++ b/translated/talk/20150716 Interview--Larry Wall.md @@ -0,0 +1,125 @@ +专访: Larry Wall +================================================================================ +> 经历了15年的打造,Perl 6终将在年底与大家见面。我们预先采访了她的作者了解一下新特性。 + +Larry Wall是个相当有趣的人。他即编程语言Perl的创造者,这种语言被广泛的誉为将互联网粘在一起的胶水,也因为对非字母使用的密度和宽容度被嘲笑是‘只写’语言。Larry本人具有语言学背景,曾风趣的使用“洋葱的状态”来介绍Perl特性,为人津道。 + +在2015年布鲁塞尔的FOSDEM上,我们赶上Larry,问了问他为什么Perl 6花了如此长的时间(Perl 5的发布时间是1994年),了解当项目中的每个人都各执己见时是多么的难以管理,以及他的语言学背景自始至终究竟给Perl带来了怎样的影响。做好准备,让我们来领略其中的奥妙…… + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall1.jpg) + +**Linux Voice:你有计划寻找世界某处某种不知名的语言来写脚本,但你还未曾有机会去实现它。现在呢?** + +Larry Wall:那需要多么青春,才能承担得起呀!做这些事需要投入很大的努力和人力,以至于已经不适合那些上了年纪的人了。健康、活力是其中的一部分,同样也因为人们在年轻的时候更容易学习一门新的语言,只有在你学会了语言之后你才能写脚本呀。 + +我自学了日语十年,由于语音和发声联系我能说的比流利——但要理解别人的意思对我来说还十分困难。所以到了日本我会问路,但我听不懂他们的回答! + +> “在Perl 6中,我们试图让电脑更准确的了解我们。” + +通常需要学习一门语言直到能开发一个书写系统,并且可以使用这种语言进行少量的交流,经过日积月累直到,你能用它学习研究、教书育人,最后达到可以教授本土人如何以他们的文明书写。 + +当然如果在语言方面你有帮手 —— 经过别人的提醒我们不再使用“语言线人”来称呼他们了,那样显得我们像是在CIA工作的一样!—— 你可以通过他们的帮助来学习外语。他们不是老师,但他们会以另一种方式来激发你学习 —— 当然他们也能叫你如何说。他们会拿着一根棍子,指着它说“这是一根棍子”,然后丢掉同时说“棒子掉下去了”。你开始记下一些东西并将其系统化。 + +大多数迫使人们站出来的原因是翻译圣经。但是这只是其中的一方面;另一方面也是为了保护自己的文明。传教士在这方面臭名昭著,应为人类学家认为人们应该基于自己的文明来做这件事。但注定有些有些人会改变他们的文明——他们可能是军队、或是商人,如可口可乐或者缝纫机器,或传教士。在这三者之间,传教士式相对来讲伤害最小的了,如果他们恪守本职的话。 + +**LV:许多文字系统有本可依,相较而言你的发明就像是格林兰语…** + +切诺基人照搬字母就发明了他们自己的语言,并没有在这些字母上施加任何他们的想法,这种做法相当任性。它们必须要能够表达出人们所想,才能使交流更顺畅。经常是有些声调语言使用的是西方文字拼写,并尽可能的使用拉丁文的字符变化。然后用重音符或数字标注出音调。 + +在你开始学习如何使用语音和语调表示之后,你也开始变得迷糊——或者你书写就不如从前准确。或者你对话的时候像在讲英文,但发音开始无法匹配拼写。 + +**LV:当你在维护Perl的时候,你的语言学背景会不会使你认为:“这对程序设计语言真的非常重要”?** + +LW:我在人们是如何使用语言上想了很多。在现实的语言中,你有一套名词、动词和形容词的体系,并且你知道这些单词的词性。在现实的自然语言中,你时常将一个单词放到不同的位置。我所学的语言学理论也被称为法位学,他会解释这些在自然语言中工作的原理 —— 也就是有些东西你考虑的时候是名词,但你可以将它用作动词,并且人们总是这样做。 + +你能很好的将任何单词放在任何位置,然后你就能沟通了。我比较喜欢的例子是将一整句话用作为一个形容词。这句话会是这样的:“我不喜欢你[我可以用任何东西来取代这个形容词的]态度”! + +所以自然语言非常灵活,因为聆听者非常聪明 —— 至少,相对于电脑而言 —— 你相信他们会理解你最想表达的意思,即使存在歧义。当然对电脑而言,你必须保证歧义不大。 + +可以说在Perl 1到5上,我们针对这方面的管理做得还不够。有时电脑会在不应该的时候抽风。在Perl 6上,我们找了许多方法,使得电脑对你所说的话能更准确的理解,就算用户并不清楚这底是字符串还是数字。电脑准确的知道它的类型。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall2.jpg) + +**LV:Perl被视作互联网上的“胶水”语言已久,能将点点滴滴组合在一起。在你看来Perl 6的发布是否符合当前用户的需要,或者旨在招揽更多新用户,能使她重获新生吗?** + +LW:最初的设想是为Perl程序员带来更好的Perl。但在看到了Perl 5上的不足后,很明显改掉这些不足会使Perl 6更易用,就像我在讨论中提到过 —— 类似于在J. R. R. Tolkien上对易用性的讨论一样[see http://tinyurl.com/nhpr8g2]。 + +重点是“简单的东西应该简单,而难得东西应该可以实现”。让我们回顾一下,在Perl 2和3之间的那段时间。在Perl 2上我们不能处理二进制数据或嵌入的空值 —— 只有C语言风格的字符串。我曾说过“Perl只是文本执行语言 —— 你并不需要有这些功能的文本执行语言”。 + +但当时发生了一大对的问题,因为大多数的文本中会包含少量的二进制数据 —— 类似的例如网址。你使用二进制数据打开套接字,然后文本处理它。所以语言的可用性两倍于处理二进制的可能性。 + +那我们开始探讨在语言中什么应该简单。现在的Perl中有一条原则,我们偷师了哈夫曼编码,在位编码系统中为字符采取了不同的尺寸。常用的字符占用的位数较少,不常用的字符占用的位数更多。 + +> “掌握平衡时需要格外小心。毕竟在刚开始的时候总会有许多的好主意。” + +我们偷师了这种想法并将它作为Perl的原则,针对常用的或者说常输入的 —— 这些常用的东西必须简单或简洁。另一方面,也显得更加的不规则。在自然语言中也是这样的,由诸多的常用的动词趋于诸多的不规律。 + +所以在这样的情况下需要更多的差异存在。我很喜欢一本书是Umberto Eco写的的《探寻完美的语言》,说的并不是计算机语言;而是哲学语言,大体的意思是古代的语言也许是完美的,我们应该将她们带回来。 + +所有的这类语言错误的认为同样的事物,其编码也应该一直是相同的。但这并不是我们沟通的方式。如果你的农场中有许多动物,他们都有对应的名字,当你想杀一只鸡的时候说“走,去把Blerfoo宰了”,你的真实想法是宰了Blerfee,但有可能最后死的是一头牛。 + +所以在这种时候我们其实更需要好好的将单词区分开,使沟通的信道的冗余增加。 + +在电子学中还有另一种自时钟码。在从前的串行传输协议中有停止和启动位,来保持同步。自然语言中也会包含这些。比如说,在写日语时,你不用空格。由于书写方式的原因,他们会在每个词组的开头使用中文中的汉字字符,然后用音节表中的字符来结尾。 + +**LV:平假名,对吗?** + +LW: 是的,平假名。所以使用这一系统,每个词组的开头就自然而然的脱颖而出了。同样的,在古老的希腊,大多数的动词都是搭配好的。所以它们拥有时钟排序机制的标准结尾。在他们的书写体系中空格也是可有可无的 —— 引入空格是更现代的一大发明。 + +所以在计算机语言上也要如此,将值包含于自时钟码中。在Perl上我们重度依赖此道,而且在Perl 6上相较于前几代这种依赖更重。当你使用表达式时,你要么想得到一个词,要么想到得到插入操作符。当你想要得到一个词,你有可能同时得到一个前缀操作符,同样当你想要得到一个插入符,你也可能同时得到前一个词的后缀。 + +但是反过来。如果编译器准确的知道它想要什么,你只用多写那么一丢丢,其他的让Perl来完成。所以在切断的时候,它会根据需要推荐常规表达式,分割处也会如你所愿。而我们并不需要操心任何事,因为那只会使你失去自时钟冗余。 + +大多数我们最好的语法错误消息,源于对一行中出现两个词的观察。然后我们尝试找出原因 —— “哦,你一定漏掉了上一行的分号”。所以我们相较于很多其他特殊解析器可以生成更加好的错误消息。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall3.jpg) + +**LV:为什么Perl 6花了15年?当每个人对她有不同看法时一定十分难管理,而且正确和错误并不是绝对的。** + +LW:这其中必定会有非常微妙的平衡。刚开始会有许多的想法 —— 当然,我并不是想说那些是好想法。也有很多令人烦恼的地方,就像有361条RFC[功能建议文件],而我想要实现的可能只有其中的20条。我们需要坐下来,将它们全部看完,并忽略其中的解决方案,因为它们通常流于表象、视野狭隘。几乎每一条只针对一样事物,如若我们将它们全部拼凑起来,那简直是一堆垃圾。 + +所以我们必须基于人们在使用Perl 5时的真实感受重新整理。寻找统一、深层的解决方案。许多的RFC文档都提到了一个事实,就是类型系统的不足。通过引入更条理分明的类型系统,我们可以解决很多问题并且即聪明又紧凑。 + +同时我们开始关注其他面:如何统一特征集并开始重用不同领域的想法。并不需要他们在下层相同。我们有一种标准的书写配对方式——好的吧,Perl的话有两种!但使用冒号书写配对的方法同样可以被基数计数法或是任何文字编号所重用。同样也可以用于其他形式的引用。在Perl里我们称它为“奇妙的一致”。 + +> “早先组建Perl 6实施小组的朋友,挽着我的手说:“我们真的很需要一位语言的设计者。”” + +同样的想法涌现出来,你说“我已经熟悉了语法如何运作,但是我实在别处看到的”。所以说视角相同才能找出这种一致。那些早期将Perl 6呈现在我面前的人们,握着我的手说:“我们真的需要一位语言的设计者。您能作为我们的精神领袖吗?” + +所以我是语言的设计者,但总是听到:“离实施小组远点!我们目睹了你对Perl 5做的那些,我们不想历史重演!”真是让我忍俊不禁因为他们作为起步的核心和原先Perl 5的内部结构上几乎别无二致,也许就只因为这个原因实施小组早期的工作并不顺利。 + +因为我们始终坚持我们的整体设计方法,所以在是否应该使用VM上讨论良久,最后解决的方式很像面向对象的汇编语言。类似的问题在伊始阶段无处不在。然后Pugs这家伙走过来说:“用用看Haskell吧,它能让你们清醒的认识自己正在干什么。让我们用它来弄清自己的言下之意。” + +因此,我们明确了其中的一些语义模型的,但更重要的是,我们开始建立符合哪些语义模型的测试套件。在这时候,持续的对Parrot VM进行开发,以及另一个实施项目Niecza的到来,它基于.Net,是由一个年轻的家伙搞出来的。他很聪明且实施了一大部分的Perl 6。不过他还是一个人干,并没有找到什么好方法让别人介入他的项目。 + +同时Parrot项目变得过于庞大,以至于任何人都不能真正的由内而外的管理它,并且很难重构。负责这方面工作的Rakudo觉得我们可能需要在更多平台上运行不止Parrot VM。于是他们发明了所谓的可移植层,“Not Quite Perl”简写成NQP。他们一开始将它移植到JVM(Java虚拟机)上运行,与此同时,他们还秘密的在一个新的VM上工作。这个叫做MoarVM的VM这去年刚刚为人知晓。 + +无论MoarVM还是JVM在回归测试中表现得十分接近 —— 在许多方面Parrot算是紧随其后。这样不挑剔VM真的很棒,我们也能开始考虑将NQP发扬光大。谷歌夏季编码大赛的目标就是针对JavaScript的NQP,这应该靠谱,因为MoarVM平时处理也同样使用Node.js。 + +我们可能要将今年余下的时光投在MoarVM上,直到6.0发布,方可休息片刻。 + +**LV:去年英国,政府开展编程年,来激发年轻人对编程的兴趣。针对活动的建议五花八门——类似为了让人们准确的认识到内存的使用你是否应该从低阶语言开授,或是一门高阶语言。你对此作和看法?** + +LW:到现在为止,Python社区在低阶方面的教学工作做得比我们要好。我们也很想在这一方面做点什么,这也是我们有蝴蝶logo的部分原因,以此来吸引七岁大小的女孩子! + +我们认为将Perl 6作为第一门语言来学习是可行的。一大堆的将Perl 5作为第一门语言学习的人让我们吃惊。你知道,在Perl 5中有许多相当大的概念,如闭包,范围操作符,和一些你通常在函数式编程中学到的特性。这才Perl 6中同样有很多。 + +> “到现在为止,Python社区在低阶方面的教学工作做得比我们要好。” + +Perl 6花了这么长时间的部分原因是我们尝试去坚持将近50种互不相同的原则,在设计语言的最后对于“哪点是最重要的规则”这个问题还是悬而未决。有太多的问题需要讨论。优势我们做出了决定,并已经工作了一段时间,才发现这个决定并不正确。 + +之前我们并未针对并发程序设计设计或指定些什么,直到Jonathan Worthington的出现,他非常巧妙的权衡了各个方面。他结合了一些其他语言诸如Go和C#的想法,将并发原语写的非常好。可组合性是一个语言至关重要的一部分。 + +很滑稽的是很多程序设计系统的并发和并行写的并不好 —— 就像线程和锁,不良的操作方式有很多。所以在我看来,额外花点时间看一下Go或者C#这种高阶原语的开发是很值得的 —— 他们在条目中列出了矛盾 —— 写的相当棒。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/interview-larry-wall/ + +作者:[Mike Saunders][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/mike/ From 527ff17151a21f189912fe3d4f2983be3ba25b01 Mon Sep 17 00:00:00 2001 From: martin qi Date: Mon, 19 Oct 2015 01:09:24 +0800 Subject: [PATCH 2291/2517] Delete 20150716 Interview--Larry Wall.md --- .../talk/20150716 Interview--Larry Wall.md | 127 ------------------ 1 file changed, 127 deletions(-) delete mode 100644 sources/talk/20150716 Interview--Larry Wall.md diff --git a/sources/talk/20150716 Interview--Larry Wall.md b/sources/talk/20150716 Interview--Larry Wall.md deleted file mode 100644 index f3fea9c596..0000000000 --- a/sources/talk/20150716 Interview--Larry Wall.md +++ /dev/null @@ -1,127 +0,0 @@ -translating... - -Interview: Larry Wall -================================================================================ -> Perl 6 has been 15 years in the making, and is now due to be released at the end of this year. We speak to its creator to find out what’s going on. - -Larry Wall is a fascinating man. He’s the creator of Perl, a programming language that’s widely regarded as the glue holding the internet together, and mocked by some as being a “write-only” language due to its density and liberal use of non-alphanumeric characters. Larry also has a background in linguistics, and is well known for delivering entertaining “State of the Onion” presentations about the future of Perl. - -At FOSDEM 2015 in Brussels, we caught up with Larry to ask him why Perl 6 has taken so long (Perl 5 was released in 1994), how difficult it is to manage a project when everyone has strong opinions and pulling in different directions, and how his background in linguistics influenced the design of Perl from the start. Get ready for some intriguing diversions… - -![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall1.jpg) - -**Linux Voice: You once had a plan to go and find an undocumented language somewhere in the world and create a written script for it, but you never had the opportunity to fulfil this plan. Is that something you’d like to go back and do now?** - -Larry Wall: You have to be kind of young to be able to carry that off! It’s actually a lot of hard work, and organisations that do these things don’t tend to take people in when they’re over a certain age. Partly this is down to health and vigour, but also because people are much better at picking up new languages when they’re younger, and you have to learn the language before making a script for it. - -I started trying to teach myself Japanese about 10 years ago, and I could speak it quite well, because of my phonology and phonetics training – but it’s very hard for me to understand what anybody says. So I can go to Japan and ask for directions, but I can’t really understand the answers! - -> “With Perl 6, we found some ways to make the computer more sure about what the user is talking about.” - -So usually learning a language well enough to develop a writing system, and to at least be conversational in the language, takes some period of years before you can get to the point where you can actually do literacy and start educating people on their own culture, as it were. And then you teach them to write about their own culture as well. - -Of course, if you have language helpers – and we were told not to call them “language informants”, or everyone would think we were working for the CIA! – if you have these people, you can get them to come in and help you learn the foreign language. They are not teachers but there are ways of eliciting things from someone who’s not a language teacher – they can still teach you how to speak. They can take a stick and point to it and say “that’s a stick”, and drop it and say “the stick falls”. Then you start writing things down and systematising things. - -The motivation that most people have, going out to these groups, is to translate the Bible into their languages. But that’s only one part of it; the other is also culture preservation. Missionaries get kind of a bad rep on that, because anthropologists think they should be left to sit their in their own culture. But somebody is probably going to change their culture anyway – it’s usually the army, or businesses coming in, like Coca Cola or the sewing machine people, or missionaries. And of those three, the missionaries are the least damaging, if they’re doing their job right. - -**LV: Many writing systems are based on existing scripts, and then you have invented ones like Greenlandic…** - -LW: The Cherokee invented their own just by copying letters, and they have no mapping much to what we think of letters, and it’s fairly arbitrary in that sense. It just has to represent how the people themselves think of the language, and sufficiently well to communicate. Often there will be variations on Western orthography, using characters from Latin where possible. Tonal languages have to mark the tones somehow, by accents or by numbers. - -As soon as you start leaning towards a phoenetic or phonological representation, then you also start to lose dialectical differences – or you have to write the dialectal differences. Or you have conventional spelling like we have in English, but pronunciation that doesn’t really match it. - -**LV: When you started working on Perl, what did you take from your background in linguistics that made you think: “this is really important in a programming language”?** - -LW: I thought a lot about how people use languages. In real languages, you have a system of nouns and verbs and adjectives, and you kind of know which words are which type. And in real natural languages, you have a lot of instances of shoving one word into a different slot. The linguistic theory I studied was called tagmemics, and it accounts for how this works in a natural language – that you could have something that you think of as a noun, but you can verb it, and people do that all time. - -You can pretty much shove anything in any slot, and you can communicate. One of my favourite examples is shoving an entire sentence in as an adjective. The sentence goes like this: “I don’t like your I-can-use-anything-as-an-adjective attitude”! - -So natural language is very flexible this way because you have a very intelligent listener – or at least, compared with a computer – who you can rely on to figure out what you must have meant, in case of ambiguity. Of course, in a computer language you have to manage the ambiguity much more closely. - -Arguably in Perl 1 through to 5 we didn’t manage it quite adequately enough. Sometimes the computer was confused when it really shouldn’t be. With Perl 6, we discovered some ways to make the computer more sure about what the user is talking about, even if the user is confused about whether something is really a string or a number. The computer knows the exact type of it. We figured out ways of having stronger typing internally but still have the allomorphic “you can use this as that” idea. - -![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall2.jpg) - -**LV: For a long time Perl was seen as the “glue” language of the internet, for fitting bits and pieces together. Do you see Perl 6 as a release to satisfy the needs of existing users, or as a way to bring in new people, and bring about a resurgence in the language?** - -LW: The initial intent was to make a better Perl for Perl programmers. But as we looked at the some of the inadequacies of Perl 5, it became apparent that if we fixed these inadequacies, Perl 6 would be more applicable, as I mentioned in my talk – like how J. R. R. Tolkien talked about applicability [see http://tinyurl.com/nhpr8g2]. - -The idea that “easy things should be easy and hard things should be possible” goes way back, to the boundary between Perl 2 and Perl 3. In Perl 2, we couldn’t handle binary data or embedded nulls – it was just C-style strings. I said then that “Perl is just a text processing language – you don’t need those things in a text processing language”. - -But it occurred to me at the time that there were a large number of problems that were mostly text, and had a little bit of binary data in them – network addresses and things like that. You use binary data to open the socket but then text to process it. So the applicability of the language more than doubled by making it possible to handle binary data. - -That began a trade-off about what things should be easy in a language. Nowadays we have a principle in Perl, and we stole the phrase Huffman coding for it, from the bit encoding system where you have different sizes for characters. Common characters are encoded in a fewer number of bits, and rarer characters are encoded in more bits. - -> “There had to be a very careful balancing act. There were just so many good ideas at the beginning.” - -We stole that idea as a general principle for Perl, for things that are commonly used, or when you have to type them very often – the common things need to be shorter or more succinct. Another bit of that, however, is that they’re allowed to be more irregular. In natural language, it’s actually the most commonly used verbs that tend to be the most irregular. - -And there’s a reason for that, because you need more differentiation of them. One of my favourite books is called The Search for the Perfect Language by Umberto Eco, and it’s not about computer languages; it’s about philosophical languages, and the whole idea that maybe some ancient language was the perfect language and we should get back to it. - -All of those languages make the mistake of thinking that similar things should always be encoded similarly. But that’s not how you communicate. If you have a bunch of barnyard animals, and they all have related names, and you say “Go out and kill the Blerfoo”, but you really wanted them to kill the Blerfee, you might get a cow killed when you want a chicken killed. - -So in realms like that it’s actually better to differentiate the words, for more redundancy in the communication channel. The common words need to have more of that differentiation. It’s all about communicating efficiently, and then there’s also this idea of self-clocking codes. If you look at a UPC label on a product – a barcode – that’s actually a self-clocking code where each pair of bars and spaces is always in a unit of seven columns wide. You rely on that – you know the width of the bars will always add up to that. So it’s self-clocking. - -There are other self-clocking codes used in electronics. In the old transmission serial protocols there were stop and start bits so you could keep things synced up. Natural languages also do this. For instance, in the writing of Japanese, they don’t use spaces. Because the way they write it, they will have a Kanji character from Chinese at the head of each phrase, and then the endings are written in the a syllabary. - -**LV: Hiragana, right?** - -LW: Yes, Hiragana. So naturally the head of each phrase really stands out with this system. Similarly, in ancient Greek, most of the verbs were declined or conjugated. So they had standard endings were sort-of a clocking mechanism. Spaces were optional in their writing system as well – it was a more modern invention to put the spaces in. - -So similarly in computer languages, there’s value in having a self-clocking code. We rely on this heavily in Perl, and even more heavily in Perl 6 than in previous releases. The idea that when you’re parsing an expression, you’re either expecting a term or an infix operator. When you’re expecting a term you might also get a prefix operator – that’s kind-of in the same expectation slot – and when you’re expecting an infix you might also get a postfix for the previous term. - -But it flips back and forth. And if the compiler actually knows which it is expecting, you can overload those a little bit, and Perl does this. So a slash when it’s expecting a term will introduce a regular expression, whereas a slash when you’re expecting an infix will be division. On the other hand, we don’t want to overload everything, because then you lose the self-clocking redundancy. - -Most of our best error messages, for syntax errors, actually come out of noticing that you have two terms in a row. And then we try to figure out why there are two terms in a row – “oh, you must have left a semicolon out on the previous line”. So we can produce much better error messages than the more ad-hoc parsers. - -![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall3.jpg) - -**LV: Why has Perl 6 taken fifteen years? It must be hard overseeing a language when everyone has different opinions about things, and there’s not always the right way to do things, and the wrong way.** - -LW: There had to be a very careful balancing act. There were just so many good ideas at the beginning – well, I don’t want to say they were all good ideas. There were so many pain points, like there were 361 RFCs [feature proposal documents] when I expected maybe 20. We had to sit back and actually look at them all, and ignore the proposed solutions, because they were all over the map and all had tunnel vision. Each one many have just changed one thing, but if we had done them all, it would’ve been a complete mess. - -So we had to re-rationalise based on how people were actually hurting when they tried to use Perl 5. We started to look at the unifying, underlying ideas. Many of these RFCs were based on the fact that we had an inadequate type system. By introducing a more coherent type system we could fix many problems in a sane fashion and a cohesive fashion. - -And we started noticing other ways how we could unify the featuresets and start reusing ideas in different areas. Not necessarily that they were the same thing underneath. We have a standard way of writing pairs – well, two ways in Perl! But the way of writing pairs with a colon could also be reused for radix notation, or for literal numbers in any base. It could also be used for various alternative forms of quoting. We say in Perl that it’s “strangely consistent”. - -> “People who made early implementations of Perl 6 came back to me, cap in hand, and said “We really need a language designer.”” - -Similar ideas pop up, and you say “I’m already familiar with how that syntax works, but I see it’s being used for something else”. So it took some unity of vision to find these unifications. People who had the various ideas and made early implementations of Perl 6 came back to me, cap-in-hand, and said “We really need a language designer. Could you be our benevolent dictator?” - -So I was the language designer, but I was almost explicitly told: “Stay out of the implementation! We saw what you did made out of Perl 5, and we don’t like it!” It was really funny because the innards of the new implementation started looking a whole lot like Perl 5 inside, and maybe that’s why some of the early implementations didn’t work well. - -Because we were still feeling our way into the whole design, the implementations made a lot of assumptions about what VM should do and shouldn’t do, so we ended up with something like an object oriented assembly language. That sort of problem was fairly pervasive at the beginning. Then the Pugs guys came along and said “Let’s use Haskell, because it makes you think very clearly about what you’re doing. Let’s use it to clarify our semantic model underneath.” - -So we nailed down some of those semantic models, but more importantly, we started building the test suite at that point, to be consistent with those semantic models. Then after that, the Parrot VM continued developing, and then another implementation, Niecza, came along and it was based on .NET. It was by a young fellow who was very smart and implemented a large subset of Perl 6, but he was kind of a loner, didn’t really figure out a way to get other people involved in his project. - -At the same time the Parrot project was getting too big for anyone to really manage it inside, and very difficult to refactor. At that point the fellows working on Rakudo decided that we probably needed to be on more platforms than just the Parrot VM. So they invented a portability layer called NQP which stands for “Not Quite Perl”. They ported it to first of all run on the JVM (Java Virtual Machine), and while they were doing that they were also secretly working on a new VM called MoarVM. That became public a little over a year ago. - -Both MoarVM and JVM run a pretty much equivalent set of regression tests – Parrot is kind-of trailing back in some areas. So that has been very good to flush out VM-specific assumptions, and we’re starting to think about NQP targeting other things. There was a Google Summer of Code project year to target NQP to JavaScript, and that might fit right in, because MoarVM also uses Node.js for much of its more mundane processing. - -We probably need to concentrate on MoarVM for the rest of this year, until we actually define 6.0, and then the rest will catch up. - -**LV: Last year in the UK, the government kicked off the Year of Code, an attempt to get young people interested in programming. There are lots of opinions about how this should be done – like whether you should teach low-level languages at the start, so that people really understand memory usage, or a high-level language. What’s your take on that?** - -LW: Up until now, the Python community has done a much better job of getting into the lower levels of education than we have. We’d like to do something in that space too, and that’s partly why we have the butterfly logo, because it’s going to be appealing to seven year old girls! - -But we do think that Perl 6 will be learnable as a first language. A number of people have surprised us by learning Perl 5 as their first language. And you know, there are a number of fairly powerful concepts even in Perl 5, like closures, lexical scoping, and features you generally get from functional programming. Even more so in Perl 6. - -> “Until now, the Python community has done a much better job of getting into the lower levels of education.” - -Part of the reason the Perl 6 has taken so long is that we have around 50 different principles we try to stick to, and in language design you’re end up juggling everything and saying “what’s really the most important principle here”? There has been a lot of discussion about a lot of different things. Sometimes we commit to a decision, work with it for a while, and then realise it wasn’t quite the right decision. - -We didn’t design or specify pretty much anything about concurrent programming until someone came along who was smart enough about it and knew what the different trade-offs were, and that’s Jonathan Worthington. He has blended together ideas from other languages like Go and C#, with concurrent primitives that compose well. Composability is important in the rest of the language. - -There are an awful lot of concurrent and parallel programming systems that don’t compose well – like threads and locks, and there have been lots of ways to do it poorly. So in one sense, it’s been worth waiting this extra time to see some of these languages like Go and C# develop really good high-level primitives – that’s sort of a contradiction in terms – that compose well. - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/interview-larry-wall/ - -作者:[Mike Saunders][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/mike/ From ed3dbbad279702ca0980be3c8c6a4f5d31710ffc Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 19 Oct 2015 09:03:33 +0800 Subject: [PATCH 2292/2517] PUB:20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem @oska874 --- ...Kernel To Add The MOST Driver Subsystem.md | 28 +++++++++++++++++ ...Kernel To Add The MOST Driver Subsystem.md | 30 ------------------- 2 files changed, 28 insertions(+), 30 deletions(-) create mode 100644 published/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md delete mode 100644 translated/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md diff --git a/published/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md b/published/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md new file mode 100644 index 0000000000..40f63a4c8d --- /dev/null +++ b/published/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md @@ -0,0 +1,28 @@ +Linux 4.3 内核增加了 MOST 驱动子系统 +================================================================================ +当 4.2 内核还没有正式发布的时候,Greg Kroah-Hartman 就为他维护的各种子系统模块打开了4.3 的合并窗口。 + +之前 Greg KH 发起的拉取请求(pull request)里包含了 linux 4.3 的合并窗口更新,内容涉及驱动核心、TTY/串口、USB 驱动、字符/杂项以及暂存区内容。这些拉取申请没有提供任何震撼性的改变,大部分都是改进/附加/修改bug。暂存区内容又是大量的修正和清理,但是还是有一个新的驱动子系统。 + +Greg 提到了[4.3 的暂存区改变][2],“这里的很多东西,几乎全部都是细小的修改和改变。通常的 IIO 更新和新驱动,以及我们已经添加了的 MOST 驱动子系统,已经在源码树里整理了。ozwpan 驱动最终还是被删掉,因为它很明显被废弃了而且也没有人关心它。” + +MOST 驱动子系统是面向媒体的系统传输(Media Oriented Systems Transport)的简称。在 linux 4.3 新增的文档里面解释道,“MOST 驱动支持 LInux 应用程序访问 MOST 网络:汽车信息骨干网(Automotive Information Backbone),高速汽车多媒体网络的事实上的标准。MOST 定义了必要的协议、硬件和软件层,提供高效且低消耗的传输控制,实时的数据包传输,而只需要使用一个媒介(物理层)。目前使用的媒介是光线、非屏蔽双绞线(UTP)和同轴电缆。MOST 也支持多种传输速度,最高支持150Mbps。”如文档解释的,MOST 主要是关于 Linux 在汽车上的应用。 + +当 Greg KH 发出了他为 Linux 4.3 多个子系统做出的更新,但是他还没有打算提交 [KDBUS][5] 的内核代码。他之前已经放出了 [linux 4.3 的 KDBUS] 的开发计划,所以我们将需要等待官方的4.3 合并窗口,看看会发生什么。 + +-------------------------------------------------------------------------------- + +via: http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.3-Staging-Pull + +作者:[Michael Larabel][a] +译者:[oska874](https://github.com/oska874) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.michaellarabel.com/ +[1]:http://www.phoronix.com/scan.php?page=search&q=Linux+4.2 +[2]:http://lkml.iu.edu/hypermail/linux/kernel/1508.2/02604.html +[3]:http://www.phoronix.com/scan.php?page=news_item&px=KDBUS-Not-In-Linux-4.2 +[4]:http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.2-rc7-Released +[5]:http://www.phoronix.com/scan.php?page=search&q=KDBUS diff --git a/translated/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md b/translated/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md deleted file mode 100644 index 8e3c1d705e..0000000000 --- a/translated/talk/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md +++ /dev/null @@ -1,30 +0,0 @@ -为Linux 4.3 内核添加MOST 驱动子系统 -================================================================================ -当4.2 内核还没有正式发布的时候,Greg Kroah-Hartman 就为他维护的各种子系统模块打开了4.3 的合并窗口。 - -周二Greg KH 发起的拉取请求(pull request)里包含了linux 4.3 的合并窗口更新,内容涉及驱动核心、TTY/串口、USB驱动、字符/杂项以及暂存区内容。这些拉取申请没有提供任何震撼性的改变,大部分都是改进/附加/修改bug。暂存区内容又是大量的修正和清理,但是还是有一个新的驱动子系统。 - - -Greg 提到了[4.3 的暂存区改变][2],“这里的很多东西,几乎全部都是细小的修改和改变。通常的IIO 更新和新驱动,以及我们已经添加了的MOST 驱动子系统,已经在源码树里整理了。ozwpan 驱动最终还是被删掉,引文它很明显被废弃了而且也没有人关心它。” - -MOST 驱动子系统是面向媒体的系统传输的简称。在linux 4.3 新增的文档里面解释道,“MOST 驱动支持LInux 应用程序访问MOST 网络:汽车信息骨干网和高速汽车多媒体网络的事实上的标准。MOST 定义了必要的协议、硬件和软件层,提供高效且低消耗的传输控制,实时的数据包传输,只需要使用一个媒介(物理层)。目前使用的媒介是光线、非屏蔽双绞线(UTP)和同轴电缆。MOST 也支持多种传输速度,最高支持150Mbps。”如文档解释的,MOST 主要是关于Linux 在汽车上的应用。 - -当Greg KH 发出了他为Linux 4.3 多个子系统做出的更新,但是他还没有打算提交[KDBUS][5]的内核代码。他之前已经放出了[linux 4.3 的KDBUS] 的开发计划,所以我们将需要等待官方的4.3 合并窗口,看看会发生什么。关注Phoronix 下周关于linux 4.3 内核的新闻报道,此时合并窗口将会开始,假如Linus 在本周[发布linux 4.2][4]。 - - --------------------------------------------------------------------------------- - -via: http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.3-Staging-Pull - -作者:[Michael Larabel][a] -译者:[oska874](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.michaellarabel.com/ -[1]:http://www.phoronix.com/scan.php?page=search&q=Linux+4.2 -[2]:http://lkml.iu.edu/hypermail/linux/kernel/1508.2/02604.html -[3]:http://www.phoronix.com/scan.php?page=news_item&px=KDBUS-Not-In-Linux-4.2 -[4]:http://www.phoronix.com/scan.php?page=news_item&px=Linux-4.2-rc7-Released -[5]:http://www.phoronix.com/scan.php?page=search&q=KDBUS From 492bf330a8e0586fa34b0fdb7333b1e38cb6ec4d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 19 Oct 2015 10:07:18 +0800 Subject: [PATCH 2293/2517] =?UTF-8?q?20151019-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e Search Is About To Get A Big Power Up.md | 38 ++++++++++++ ...o install Ubuntu desktop behind a proxy.md | 61 +++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md create mode 100644 sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md diff --git a/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md b/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md new file mode 100644 index 0000000000..7ce79073c5 --- /dev/null +++ b/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md @@ -0,0 +1,38 @@ +Nautilus File Search Is About To Get A Big Power Up +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/10/nautilus-new-search-filters.jpg) + +**Finding stray files and folders in Nautilus is about to get a whole lot easier. ** + +A new **search filter** for the default [GNOME file manager][1] is in development. It makes heavy use of GNOME’s spiffy pop-over menus in an effort to offer a simpler way to narrow in on search results and find exactly what you’re after. + +Developer Georges Stavracas is working on the new UI and [describes][2] the new editor as “cleaner, saner and more intuitive”. + +Based on a video he’s [uploaded to YouTube][3] demoing the new approach – which he hasn’t made available for embedding – he’s not wrong. + +> “Nautilus has very complex but powerful internals, which allows us to do many things. And indeed, there is code for the many options in there. So, why did it used to look so poorly implemented/broken?”, he writes on his blog. + +The question is part rhetorical; the new search filter interface surfaces many of these ‘powerful internals’ to yhe user. Searches can be filtered ad **hoc** based on content type, name or by date range. + +Changing anything in an app like Nautilus is likely to upset some users, so as helpful and straightforward as the new UI seems it could come in for some heat. + +Not that worry of discontent seems to hamper progress (though the outcry at the [removal of ‘type ahead’ search][4] in 2014 still rings loud in many ears, no doubt). GNOME 3.18, [released last month][5], introduced a new file progress dialog to Nautilus and better integration for remote shares, including Google Drive. + +Stavracas’ search filter are not yet merged in to Files’ trunk, but the reworked search UI is tentatively targeted for inclusion in GNOME 3.20, due spring next year. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/10/new-nautilus-search-filter-ui + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://wiki.gnome.org/Apps/Nautilus +[2]:http://feaneron.com/2015/10/12/the-new-search-for-gnome-files-aka-nautilus/ +[3]:https://www.youtube.com/watch?v=X2sPRXDzmUw +[4]:http://www.omgubuntu.co.uk/2014/01/ubuntu-14-04-nautilus-type-ahead-patch +[5]:http://www.omgubuntu.co.uk/2015/09/gnome-3-18-release-new-features \ No newline at end of file diff --git a/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md new file mode 100644 index 0000000000..217f9ebcda --- /dev/null +++ b/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md @@ -0,0 +1,61 @@ +Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy +================================================================================ +> **Question:** My computer is connected to a corporate network sitting behind an HTTP proxy. When I try to install Ubuntu desktop on the computer from a CD-ROM drive, the installation hangs and never finishes while trying to retrieve files, which is presumably due to the proxy. However, the problem is that Ubuntu installer never asks me to configure proxy during installation procedure. Then how can I install Ubuntu desktop behind a proxy? + +Unlike Ubuntu server, installation of Ubuntu desktop is pretty much auto-pilot, not leaving much room for customization, such as custom disk partitioning, manual network settings, package selection, etc. While such simple, one-shot installation is considered user-friendly, it leaves much to be desired for those users looking for "advanced installation mode" to customize their Ubuntu desktop installation. + +In addition, one big problem of the default Ubuntu desktop installer is the absense of proxy settings. If your computer is connected behind a proxy, you will notice that Ubuntu installation gets stuck while preparing to download files. + +![](https://c2.staticflickr.com/6/5683/22195372232_cea81a5e45_c.jpg) + +This post describes how to get around the limitation of Ubuntu installer and **install Ubuntu desktop when you are behind a proxy**. + +The basic idea is as follows. Instead of starting with Ubuntu installer directly, boot into live Ubuntu desktop first, configure proxy settings, and finally launch Ubuntu installer manually from live desktop. The following is the step by step procedure. + +After booting from Ubuntu desktop CD/DVD or USB, click on "Try Ubuntu" on the first welcome screen. + +![](https://c1.staticflickr.com/1/586/22195371892_3816ba09c3_c.jpg) + +Once you boot into live Ubuntu desktop, click on Settings icon in the left. + +![](https://c1.staticflickr.com/1/723/22020327738_058610c19d_c.jpg) + +Go to Network menu. + +![](https://c2.staticflickr.com/6/5675/22021212239_ba3901c8bf_c.jpg) + +Configure proxy settings manually. + +![](https://c1.staticflickr.com/1/735/22020025040_59415e0b9a_c.jpg) + +Next, open a terminal. + +![](https://c2.staticflickr.com/6/5642/21587084823_357b5c48cb_c.jpg) + +Enter a root session by typing the following: + + $ sudo su + +Finally, type the following command as the root. + + # ubiquity gtk_ui + +This will launch GUI-based Ubuntu installer as follows. + +![](https://c1.staticflickr.com/1/723/22020025090_cc64848b6c_c.jpg) + +Proceed with the rest of installation. + +![](https://c1.staticflickr.com/1/628/21585344214_447020e9d6_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-ubuntu-desktop-behind-proxy.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://ask.xmodulo.com/author/nanni \ No newline at end of file From f647aa1f47b0e515ada7faf7ece366c2b9e2280d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 19 Oct 2015 10:32:01 +0800 Subject: [PATCH 2294/2517] =?UTF-8?q?20151019-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...019 10 passwd command examples in Linux.md | 146 ++++++++++ ...0151019 11 df command examples in Linux.md | 258 ++++++++++++++++++ 2 files changed, 404 insertions(+) create mode 100644 sources/tech/20151019 10 passwd command examples in Linux.md create mode 100644 sources/tech/20151019 11 df command examples in Linux.md diff --git a/sources/tech/20151019 10 passwd command examples in Linux.md b/sources/tech/20151019 10 passwd command examples in Linux.md new file mode 100644 index 0000000000..141bc25e3e --- /dev/null +++ b/sources/tech/20151019 10 passwd command examples in Linux.md @@ -0,0 +1,146 @@ +10 passwd command examples in Linux +================================================================================ +As the name suggest **passwd** command is used to change the password of system users. If the passwd command is executed by non-root user then it will ask for the current password and then set the new password of a user who invoked the command. When this command is executed by super user or root then it can reset the password for any user including root without knowing the current password. + +In this post we will discuss passwd command with practical examples. + +#### Syntax : #### + + # passwd {options} {user_name} + +Different options that can be used in passwd command are listed below : + +![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-command-options.jpg) + +### Example:1 Change Password of System Users ### + +When you logged in as non-root user like ‘linuxtechi’ in my case and run passwd command then it will reset password of logged in user. + + [linuxtechi@linuxworld ~]$ passwd + Changing password for user linuxtechi. + Changing password for linuxtechi. + (current) UNIX password: + New password: + Retype new password: + passwd: all authentication tokens updated successfully. + [linuxtechi@linuxworld ~]$ + +When you logged in as root user and run **passwd** command then it will reset the root password by default and if you specify the user-name after passwd command then it will change the password of that user. + + [root@linuxworld ~]# passwd + [root@linuxworld ~]# passwd linuxtechi + +![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-command.jpg) + +**Note** : System user’s password is stored in an encrypted form in /etc/shadow file. + +### Example:2 Display Password Status Information. ### + +To display password status information of a user , use **-S** option in passwd command. + + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 0 99999 7 -1 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +In the above output first field shows the user name and second field shows Password status ( **PS = Password Set , LK = Password locked , NP = No Password** ), third field shows when the password was changed and last & fourth field shows minimum age, maximum age, warning period, and inactivity period for the password + +### Example:3 Display Password Status info for all the accounts ### + +To display password status info for all the accounts use “**-aS**” option in passwd command, example is shown below : + + root@localhost:~# passwd -Sa + +![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-sa.jpg) + +### Example:4 Removing Password of a User using -d option ### + +In my case i am removing/ deleting the password of ‘**linuxtechi**‘ user. + + [root@linuxworld ~]# passwd -d linuxtechi + Removing password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi NP 2015-09-20 0 99999 7 -1 (Empty password.) + [root@linuxworld ~]# + +“**-d**” option will make user’s password empty and will disable user’s account. + +### Example:5 Set Password Expiry Immediately ### + +Use ‘-e’ option in passwd command to expire user’s password immediately , this will force the user to change the password in the next login. + + [root@linuxworld ~]# passwd -e linuxtechi + Expiring password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 1970-01-01 0 99999 7 -1 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +Now Try to ssh machine using linuxtechi user. + +![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-expiry.jpg) + +### Example:6 Lock the password of System User ### + +Use ‘**-l**‘ option in passwd command to lock a user’s password, it will add “!” at starting of user’s password. A User can’t Change it’s password when his/her password is locked. + + [root@linuxworld ~]# passwd -l linuxtechi + Locking password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi LK 2015-09-20 0 99999 7 -1 (Password locked.) + [root@linuxworld ~]# + +### Example:7 Unlock User’s Password using -u option ### + + [root@linuxworld ~]# passwd -u linuxtechi + Unlocking password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# + +### Example:8 Setting inactive days using -i option ### + +-i option in passwd command is used to set inactive days for a system user. This will come into the picture when password of user ( in my case linuxtechi) expired and user didn’t change its password in ‘**n**‘ number of days ( i.e 10 days in my case) then after that user will not able to login. + + [root@linuxworld ~]# passwd -i 10 linuxtechi + Adjusting aging data for user linuxtechi. + passwd: Success + [root@linuxworld ~]# + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 0 99999 7 10 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +### Example:9 Set Minimum Days to Change Password using -n option. ### + +In the below example linuxtechi user has to change the password in 90 days. A value of zero shows that user can change it’s password in any time. + + [root@linuxworld ~]# passwd -n 90 linuxtechi + Adjusting aging data for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 90 99999 7 10 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +### Example:10 Set Warning days before password expire using -w option ### + +‘**-w**’ option in passwd command is used to set warning days for a user. It means a user will be warned for n number of days that his/her password is going to expire. + + [root@linuxworld ~]# passwd -w 12 linuxtechi + Adjusting aging data for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 90 99999 12 10 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/10-passwd-command-examples-in-linux/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file diff --git a/sources/tech/20151019 11 df command examples in Linux.md b/sources/tech/20151019 11 df command examples in Linux.md new file mode 100644 index 0000000000..f259789eaa --- /dev/null +++ b/sources/tech/20151019 11 df command examples in Linux.md @@ -0,0 +1,258 @@ +11 df command examples in Linux +================================================================================ +df (disk free) command is used to display disk usage of the file system. By default df command shows the file system usage in 1K blocks for all the current mounted file system, if you want to display the output of df command in human readable format , use -h option like “df -h”. + +In this post we will discuss 11 different examples of ‘**df**‘ command in Linux + +Basic Format of df command in Linux + + # df {options} {mount_point_of_filesystem} + +Options used in df command : + +![](http://www.linuxtechi.com/wp-content/uploads/2015/10/df-command-options.jpg) + +Sample Output of df : + + [root@linux-world ~]# df + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 804668 15311852 5% / + devtmpfs 771876 0 771876 0% /dev + tmpfs 777928 0 777928 0% /dev/shm + tmpfs 777928 8532 769396 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + /dev/sda1 487652 62593 395363 14% /boot + /dev/mapper/vg00-var 9948012 48692 9370936 1% /var + /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### Example:1 List disk usage of all the file system using ‘-a’ ### + +when we use ‘-a’ option in df command , it will display disk usage of all the file systems. + + [root@linux-world ~]# df -a + Filesystem 1K-blocks Used Available Use% Mounted on + rootfs 17003304 804668 15311852 5% / + proc 0 0 0 - /proc + sysfs 0 0 0 - /sys + devtmpfs 771876 0 771876 0% /dev + securityfs 0 0 0 - /sys/kernel/security + tmpfs 777928 0 777928 0% /dev/shm + devpts 0 0 0 - /dev/pts + tmpfs 777928 8532 769396 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + cgroup 0 0 0 - /sys/fs/cgroup/systemd + pstore 0 0 0 - /sys/fs/pstore + cgroup 0 0 0 - /sys/fs/cgroup/cpuset + cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct + cgroup 0 0 0 - /sys/fs/cgroup/memory + cgroup 0 0 0 - /sys/fs/cgroup/devices + cgroup 0 0 0 - /sys/fs/cgroup/freezer + cgroup 0 0 0 - /sys/fs/cgroup/net_cls + cgroup 0 0 0 - /sys/fs/cgroup/blkio + cgroup 0 0 0 - /sys/fs/cgroup/perf_event + cgroup 0 0 0 - /sys/fs/cgroup/hugetlb + configfs 0 0 0 - /sys/kernel/config + /dev/mapper/vg00-root 17003304 804668 15311852 5% / + selinuxfs 0 0 0 - /sys/fs/selinux + systemd-1 0 0 0 - /proc/sys/fs/binfmt_misc + debugfs 0 0 0 - /sys/kernel/debug + hugetlbfs 0 0 0 - /dev/hugepages + mqueue 0 0 0 - /dev/mqueue + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + /dev/sda1 487652 62593 395363 14% /boot + /dev/mapper/vg00-var 9948012 48692 9370936 1% /var + /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### Example:2 Display the output of df command in human readable format. ### + +Using ‘-h’ option in df command , output can be displayed in human readable format ( e.g 5K , 500M & 5G ) + + [root@linux-world ~]# df -h + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/vg00-root 17G 786M 15G 5% / + devtmpfs 754M 0 754M 0% /dev + tmpfs 760M 0 760M 0% /dev/shm + tmpfs 760M 8.4M 752M 2% /run + tmpfs 760M 0 760M 0% /sys/fs/cgroup + /dev/mapper/vg00-home 15G 41M 14G 1% /home + /dev/sda1 477M 62M 387M 14% /boot + /dev/mapper/vg00-var 9.5G 48M 9.0G 1% /var + /dev/mapper/vg00-sap 15G 37M 14G 1% /sap + [root@linux-world ~]# + +### Example:3 Display Space usage of particular file system ### + +Suppose we want to print space usage of /sap file system, + + [root@linux-world ~]# df -h /sap/ + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/vg00-sap 15G 37M 14G 1% /sap + [root@linux-world ~]# + +### Example:4 Print file system type of all mounted file systems ### + +‘**-T**’ is used in df command to display the file system type in the output. + + [root@linux-world ~]# df -T + Filesystem Type 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root ext4 17003304 804668 15311852 5% / + devtmpfs devtmpfs 771876 0 771876 0% /dev + tmpfs tmpfs 777928 0 777928 0% /dev/shm + tmpfs tmpfs 777928 8532 769396 2% /run + tmpfs tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home ext4 14987616 41000 14162232 1% /home + /dev/sda1 ext3 487652 62593 395363 14% /boot + /dev/mapper/vg00-var ext3 9948012 48696 9370932 1% /var + /dev/mapper/vg00-sap ext3 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### Example:5 Print disk usage of file systems in block-size. ### + + [root@linux-world ~]# df -k + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 804668 15311852 5% / + devtmpfs 771876 0 771876 0% /dev + tmpfs 777928 0 777928 0% /dev/shm + tmpfs 777928 8532 769396 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + /dev/sda1 487652 62593 395363 14% /boot + /dev/mapper/vg00-var 9948012 48696 9370932 1% /var + /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### Example:6 Display inodes information of file system. ### + +‘**-i**’ option in df command is used to display inode information of the file system + +inodes info of all the file system : + + [root@linux-world ~]# df -i + Filesystem Inodes IUsed IFree IUse% Mounted on + /dev/mapper/vg00-root 1089536 22031 1067505 3% / + devtmpfs 192969 357 192612 1% /dev + tmpfs 194482 1 194481 1% /dev/shm + tmpfs 194482 420 194062 1% /run + tmpfs 194482 13 194469 1% /sys/fs/cgroup + /dev/mapper/vg00-home 960992 15 960977 1% /home + /dev/sda1 128016 337 127679 1% /boot + /dev/mapper/vg00-var 640848 1235 639613 1% /var + /dev/mapper/vg00-sap 960992 11 960981 1% /sap + [root@linux-world ~]# + +inodes info of particular file system : + + [root@linux-world ~]# df -i /sap/ + Filesystem Inodes IUsed IFree IUse% Mounted on + /dev/mapper/vg00-sap 960992 11 960981 1% /sap + [root@linux-world ~]# + +### Example:7 Print grant total space usage of all file system. ### + +‘–total‘ option in df command is used to display the grant total of disk usage of all the file system. + + [root@linux-world ~]# df -h --total + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/vg00-root 17G 786M 15G 5% / + devtmpfs 754M 0 754M 0% /dev + tmpfs 760M 0 760M 0% /dev/shm + tmpfs 760M 8.4M 752M 2% /run + tmpfs 760M 0 760M 0% /sys/fs/cgroup + /dev/mapper/vg00-home 15G 41M 14G 1% /home + /dev/sda1 477M 62M 387M 14% /boot + /dev/mapper/vg00-var 9.5G 48M 9.0G 1% /var + /dev/mapper/vg00-sap 15G 37M 14G 1% /sap + total 58G 980M 54G 2% - + [root@linux-world ~]# + +### Example:8 Print only Local file system space usage info. ### + +Suppose network file system also mounted on linux box and but we want to display local file system information only, this can be achieved by using ‘-l‘ option in df command. + +![](http://www.linuxtechi.com/wp-content/uploads/2015/10/nfs4-fs-mount.jpg) + +Limiting to local file system : + + [root@linux-world ~]# df -Thl + Filesystem Type Size Used Avail Use% Mounted on + /dev/mapper/vg00-root ext4 17G 791M 15G 6% / + devtmpfs devtmpfs 754M 0 754M 0% /dev + tmpfs tmpfs 760M 0 760M 0% /dev/shm + tmpfs tmpfs 760M 8.4M 752M 2% /run + tmpfs tmpfs 760M 0 760M 0% /sys/fs/cgroup + /dev/mapper/vg00-home ext4 15G 41M 14G 1% /home + /dev/sda1 ext3 477M 62M 387M 14% /boot + /dev/mapper/vg00-var ext3 9.5G 105M 8.9G 2% /var + /dev/mapper/vg00-sap ext3 15G 37M 14G 1% /sap + [root@linux-world ~]# + +### Example:9 Print Disk Space information of particular file system type. ### + +‘**-t**’ option in df command is used to print information of particular file system type, after ‘-t’ specify the file system type, example is shown below : + +for ext4 : + + [root@linux-world ~]# df -t ext4 + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 809492 15307028 6% / + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + [root@linux-world ~]# + +for nfs4 : + + [root@linux-world ~]# df -t nfs4 + Filesystem 1K-blocks Used Available Use% Mounted on + 192.168.1.5:/opensuse 301545472 266833920 19371008 94% /data + [root@linux-world ~]# + +### Example:10 Exclude Particular file system type using ‘-x’ option ### + +“**-x** or **–exclude-type**” is used to exclude the certain file system type in the output of df command. + +Let suppose we want to print all the file systems excluding ext3 file system. + + [root@linux-world ~]# df -x ext3 + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 809492 15307028 6% / + devtmpfs 771876 0 771876 0% /dev + tmpfs 777928 0 777928 0% /dev/shm + tmpfs 777928 8540 769388 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + 192.168.1.5:/opensuse 301545472 266834944 19369984 94% /data + [root@linux-world ~]# + +### Example:11 Print only certain fields in output of df command. ### + +‘**–output={field_name1,field_name2….}**‘ option is used to display the certain fields in df command output. + +Valid field names are: ‘source’, ‘fstype’, ‘itotal’, ‘iused’, ‘iavail’, ‘ipcent’, ‘size’, ‘used’, ‘avail’, ‘pcent’ and ‘target’ + + [root@linux-world ~]# df --output=fstype,size,iused + Type 1K-blocks IUsed + ext4 17003304 22275 + devtmpfs 771876 357 + tmpfs 777928 1 + tmpfs 777928 423 + tmpfs 777928 13 + ext4 14987616 15 + ext3 487652 337 + ext3 9948012 1373 + ext3 14987656 11 + nfs4 301545472 451099 + [root@linux-world ~]# + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/11-df-command-examples-in-linux/ + +作者:[Pradeep Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file From 435b62ccabec83d47f98e878f3434e67210c6f26 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 19 Oct 2015 11:43:07 +0800 Subject: [PATCH 2295/2517] =?UTF-8?q?20151019-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...st Wine 32-bit on 64-bit Ubuntu (15.10).md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md diff --git a/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md b/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md new file mode 100644 index 0000000000..edd8f68a4e --- /dev/null +++ b/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md @@ -0,0 +1,39 @@ +How-To: Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10) +================================================================================ +Wine 1.7.53 was released a few hours ago, and, as with each new version, it comes with several improvements, including support for **XAudio**, **Direct3D** code cleanups, improved **OLE object embedding**, further implementation of **Web Services DLL**, and a bunch of bug fixes. + +![](http://www.tuxarena.com/wp-content/uploads/2015/10/wine1753a.jpg) + +There is an official PPA for Wine [here][1], but it only comes with 1.7.44, so to install the latest version you can compile from source following the instructions below. + +Download the source tarball from [here][2] (direct link [here][3]) and uncompress it (**tar -xf wine-1.7.53**). Next, install the dependencies: + + sudo apt-get install build-essential gcc-multilib libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxshmfence-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu1-mesa-dev:i386 libosmesa6-dev:i386 libpcap0.8-dev:i386 libdbus-1-dev:i386 libncurses5-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-dev:i386 liblcms2-dev:i386 gstreamer0.10-plugins-base:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig1-dev:i386 libgsm1-dev:i386 libtiff5-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap2-dev:i386 libgnutls-dev:i386 libjpeg-dev:i386 + +Now change the working directory to **wine-1.7.53** and type: + + ./configure + make + sudo make install + +Alternatively, you can specify a prefix to the configure script and install Wine as normal user: + + ./configure --prefix=$HOME/usr/bin + make + make install + +In this case, Wine will be installed as **$HOME/usr/bin/wine**, so make sure $HOME/usr/bin is in your PATH variable. + +-------------------------------------------------------------------------------- + +via: http://www.tuxarena.com/2015/10/how-to-compile-latest-wine-32-bit-on-64-bit-ubuntu-15-10/ + +作者:Craciun Dan +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://launchpad.net/~ubuntu-wine/+archive/ubuntu/ppa +[2]:https://www.winehq.org/announce/1.7.53 +[3]:http://prdownloads.sourceforge.net/wine/wine-1.7.53.tar.bz2 \ No newline at end of file From 8e4732916406e64919be65de832ffa774973fab5 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 19 Oct 2015 12:30:47 +0800 Subject: [PATCH 2296/2517] Delete Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md --- ...Data and Rebuild Failed Software RAID's.md | 168 ------------------ 1 file changed, 168 deletions(-) delete mode 100644 sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md diff --git a/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md b/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md deleted file mode 100644 index 57f93d50b2..0000000000 --- a/sources/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md +++ /dev/null @@ -1,168 +0,0 @@ -translation by strugglingyouth -How to Recover Data and Rebuild Failed Software RAID’s – Part 8 -================================================================================ -In the previous articles of this [RAID series][1] you went from zero to RAID hero. We reviewed several software RAID configurations and explained the essentials of each one, along with the reasons why you would lean towards one or the other depending on your specific scenario. - -![Recover Rebuild Failed Software RAID's](http://www.tecmint.com/wp-content/uploads/2015/10/Recover-Rebuild-Failed-Software-RAID.png) - -Recover Rebuild Failed Software RAID’s – Part 8 - -In this guide we will discuss how to rebuild a software RAID array without data loss when in the event of a disk failure. For brevity, we will only consider a RAID 1 setup – but the concepts and commands apply to all cases alike. - -#### RAID Testing Scenario #### - -Before proceeding further, please make sure you have set up a RAID 1 array following the instructions provided in Part 3 of this series: [How to set up RAID 1 (Mirror) in Linux][2]. - -The only variations in our present case will be: - -1) a different version of CentOS (v7) than the one used in that article (v6.5), and - -2) different disk sizes for /dev/sdb and /dev/sdc (8 GB each). - -In addition, if SELinux is enabled in enforcing mode, you will need to add the corresponding labels to the directory where you’ll mount the RAID device. Otherwise, you’ll run into this warning message while attempting to mount it: - -![SELinux RAID Mount Error](http://www.tecmint.com/wp-content/uploads/2015/10/SELinux-RAID-Mount-Error.png) - -SELinux RAID Mount Error - -You can fix this by running: - - # restorecon -R /mnt/raid1 - -### Setting up RAID Monitoring ### - -There is a variety of reasons why a storage device can fail (SSDs have greatly reduced the chances of this happening, though), but regardless of the cause you can be sure that issues can occur anytime and you need to be prepared to replace the failed part and to ensure the availability and integrity of your data. - -A word of advice first. Even when you can inspect /proc/mdstat in order to check the status of your RAIDs, there’s a better and time-saving method that consists of running mdadm in monitor + scan mode, which will send alerts via email to a predefined recipient. - -To set this up, add the following line in /etc/mdadm.conf: - - MAILADDR user@ - -In my case: - - MAILADDR gacanepa@localhost - -![RAID Monitoring Email Alerts](http://www.tecmint.com/wp-content/uploads/2015/10/RAID-Monitoring-Email-Alerts.png) - -RAID Monitoring Email Alerts - -To run mdadm in monitor + scan mode, add the following crontab entry as root: - - @reboot /sbin/mdadm --monitor --scan --oneshot - -By default, mdadm will check the RAID arrays every 60 seconds and send an alert if it finds an issue. You can modify this behavior by adding the `--delay` option to the crontab entry above along with the amount of seconds (for example, `--delay` 1800 means 30 minutes). - -Finally, make sure you have a Mail User Agent (MUA) installed, such as [mutt or mailx][3]. Otherwise, you will not receive any alerts. - -In a minute we will see what an alert sent by mdadm looks like. - -### Simulating and Replacing a failed RAID Storage Device ### - -To simulate an issue with one of the storage devices in the RAID array, we will use the `--manage` and `--set-faulty` options as follows: - - # mdadm --manage --set-faulty /dev/md0 /dev/sdc1 - -This will result in /dev/sdc1 being marked as faulty, as we can see in /proc/mdstat: - -![Stimulate Issue with RAID Storage](http://www.tecmint.com/wp-content/uploads/2015/10/Stimulate-Issue-with-RAID-Storage.png) - -Stimulate Issue with RAID Storage - -More importantly, let’s see if we received an email alert with the same warning: - -![Email Alert on Failed RAID Device](http://www.tecmint.com/wp-content/uploads/2015/10/Email-Alert-on-Failed-RAID-Device.png) - -Email Alert on Failed RAID Device - -In this case, you will need to remove the device from the software RAID array: - - # mdadm /dev/md0 --remove /dev/sdc1 - -Then you can physically remove it from the machine and replace it with a spare part (/dev/sdd, where a partition of type fd has been previously created): - - # mdadm --manage /dev/md0 --add /dev/sdd1 - -Luckily for us, the system will automatically start rebuilding the array with the part that we just added. We can test this by marking /dev/sdb1 as faulty, removing it from the array, and making sure that the file tecmint.txt is still accessible at /mnt/raid1: - - # mdadm --detail /dev/md0 - # mount | grep raid1 - # ls -l /mnt/raid1 | grep tecmint - # cat /mnt/raid1/tecmint.txt - -![Confirm Rebuilding RAID Array](http://www.tecmint.com/wp-content/uploads/2015/10/Rebuilding-RAID-Array.png) - -Confirm Rebuilding RAID Array - -The image above clearly shows that after adding /dev/sdd1 to the array as a replacement for /dev/sdc1, the rebuilding of data was automatically performed by the system without intervention on our part. - -Though not strictly required, it’s a great idea to have a spare device in handy so that the process of replacing the faulty device with a good drive can be done in a snap. To do that, let’s re-add /dev/sdb1 and /dev/sdc1: - - # mdadm --manage /dev/md0 --add /dev/sdb1 - # mdadm --manage /dev/md0 --add /dev/sdc1 - -![Replace Failed Raid Device](http://www.tecmint.com/wp-content/uploads/2015/10/Replace-Failed-Raid-Device.png) - -Replace Failed Raid Device - -### Recovering from a Redundancy Loss ### - -As explained earlier, mdadm will automatically rebuild the data when one disk fails. But what happens if 2 disks in the array fail? Let’s simulate such scenario by marking /dev/sdb1 and /dev/sdd1 as faulty: - - # umount /mnt/raid1 - # mdadm --manage --set-faulty /dev/md0 /dev/sdb1 - # mdadm --stop /dev/md0 - # mdadm --manage --set-faulty /dev/md0 /dev/sdd1 - -Attempts to re-create the array the same way it was created at this time (or using the `--assume-clean` option) may result in data loss, so it should be left as a last resort. - -Let’s try to recover the data from /dev/sdb1, for example, into a similar disk partition (/dev/sde1 – note that this requires that you create a partition of type fd in /dev/sde before proceeding) using ddrescue: - - # ddrescue -r 2 /dev/sdb1 /dev/sde1 - -![Recovering Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Recovering-Raid-Array.png) - -Recovering Raid Array - -Please note that up to this point, we haven’t touched /dev/sdb or /dev/sdd, the partitions that were part of the RAID array. - -Now let’s rebuild the array using /dev/sde1 and /dev/sdf1: - - # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[e-f]1 - -Please note that in a real situation, you will typically use the same device names as with the original array, that is, /dev/sdb1 and /dev/sdc1 after the failed disks have been replaced with new ones. - -In this article I have chosen to use extra devices to re-create the array with brand new disks and to avoid confusion with the original failed drives. - -When asked whether to continue writing array, type Y and press Enter. The array should be started and you should be able to watch its progress with: - - # watch -n 1 cat /proc/mdstat - -When the process completes, you should be able to access the content of your RAID: - -![Confirm Raid Content](http://www.tecmint.com/wp-content/uploads/2015/10/Raid-Content.png) - -Confirm Raid Content - -### Summary ### - -In this article we have reviewed how to recover from RAID failures and redundancy losses. However, you need to remember that this technology is a storage solution and DOES NOT replace backups. - -The principles explained in this guide apply to all RAID setups alike, as well as the concepts that we will cover in the next and final guide of this series (RAID management). - -If you have any questions about this article, feel free to drop us a note using the comment form below. We look forward to hearing from you! - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/recover-data-and-rebuild-failed-software-raid/ - -作者:[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/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/create-raid1-in-linux/ -[3]:http://www.tecmint.com/send-mail-from-command-line-using-mutt-command/ From 5bba29ed0a4b55aeed6b3b50313a7ba53b9d1ee7 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 19 Oct 2015 12:31:37 +0800 Subject: [PATCH 2297/2517] Create Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md --- ...Data and Rebuild Failed Software RAID's.md | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 translated/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md diff --git a/translated/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md b/translated/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md new file mode 100644 index 0000000000..6c753de40f --- /dev/null +++ b/translated/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md @@ -0,0 +1,169 @@ + +当软件 RAID 故障时如何恢复和重建数据 – 第 8 部分 +================================================================================ + +在阅读过 [RAID 系列][1] 前面的文章后你已经对 RAID 略微熟悉了。回顾前面几个软件 RAID 的配置,我们对每一个做了详细的解释,使用哪一个取决与你的具体情况。 + +![Recover Rebuild Failed Software RAID's](http://www.tecmint.com/wp-content/uploads/2015/10/Recover-Rebuild-Failed-Software-RAID.png) + +恢复并重建故障的软件 RAID - 第8部分 + +在本文中,我们将讨论当一个磁盘发生故障时如何重建软件 RAID 阵列并且不会丢失数据。为方便起见,我们仅考虑RAID 1 的配置 - 但其方法和概念适用于所有情况。 + +#### RAID 测试方案 #### + +在进一步讨论之前,请确保你已经配置了 RAID 1 阵列,可以按照本系列第3部分提供的方法:[在 Linux 中如何组建 RAID 1(镜像)][2]。 + +在目前的情况下,仅有的变化是: + +1)使用不同版本 CentOS(v7),而不是前面文章中的(v6.5)。 + +2) 磁盘容量发生改变, /dev/sdb 和 /dev/sdc(各8GB)。 + +此外,如果 SELinux 是 enforcing 模式,你需要将相应的标签添加到挂载 RAID 设备的目录中。否则,当你试图挂载时,你会碰到这样的警告信息: + +![SELinux RAID Mount Error](http://www.tecmint.com/wp-content/uploads/2015/10/SELinux-RAID-Mount-Error.png) + +启用 SELinux 时 RAID 挂载错误 + +通过以下命令来解决: + + # restorecon -R /mnt/raid1 + +### 配置 RAID 监控 ### + +存储设备损坏的原因很多(尽管固态硬盘大大减少了这种情况发生的可能性),但不管是什么原因,可以肯定问题随时可能发生,你需要准备好替换发生故障的部分,并确保数据的可用性和完整性。 + +首先建议是。虽然你可以查看 /proc/mdstat 来检查 RAID 的状态,但有一个更好的和节省时间的方法,使用监控 + 扫描模式运行 mdadm,它将警报通过电子邮件发送到一个预定义的收件人。 + +要这样设置,在 /etc/mdadm.conf 添加以下行: + + MAILADDR user@ + +我自己的设置: + + MAILADDR gacanepa@localhost + +![RAID Monitoring Email Alerts](http://www.tecmint.com/wp-content/uploads/2015/10/RAID-Monitoring-Email-Alerts.png) + +监控 RAID 并使用电子邮件进行报警 + +要运行 mdadm 在监控 + 扫描模式中,以 root 用户添加以下 crontab 条目: + + @reboot /sbin/mdadm --monitor --scan --oneshot + +默认情况下,mdadm 每隔60秒会检查 RAID 阵列,如果发现问题将发出警报。你可以通过添加 `--delay` 选项到crontab 条目上面,后面跟上秒数,来修改默认行为(例如,`--delay` 1800意味着30分钟)。 + +最后,确保你已经安装了一个邮件用户代理(MUA),如[mutt or mailx][3]。否则,你将不会收到任何警报。 + +在一分钟内,我们就会看到 mdadm 发送的警报。 + +### 模拟和更换发生故障的 RAID 存储设备 ### + +为了给 RAID 阵列中的存储设备模拟一个故障,我们将使用 `--manage` 和 `--set-faulty` 选项,如下所示: + + # mdadm --manage --set-faulty /dev/md0 /dev/sdc1 + +这将导致的 /dev/sdc1 被标记为 faulty,我们可以在 /proc/mdstat 看到: + +![Stimulate Issue with RAID Storage](http://www.tecmint.com/wp-content/uploads/2015/10/Stimulate-Issue-with-RAID-Storage.png) + +在 RAID 存储设备上模拟问题 + +更重要的是,如果我们收到了同样的警报邮件: + +![Email Alert on Failed RAID Device](http://www.tecmint.com/wp-content/uploads/2015/10/Email-Alert-on-Failed-RAID-Device.png) + +RAID 设备故障时发送邮件警报 + +在这种情况下,你需要从软件 RAID 阵列中删除该设备: + + # mdadm /dev/md0 --remove /dev/sdc1 + +然后,你可以直接从机器中取出,并将其使用备用设备来取代(/dev/sdd 中类型为 fd 的分区以前已被创建): + + # mdadm --manage /dev/md0 --add /dev/sdd1 + +幸运的是,该系统会使用我们刚才添加的磁盘自动重建阵列。我们可以通过标记 dev/sdb1 为 faulty 来进行测试,从阵列中取出后,并确保 tecmint.txt 文件仍然在/mnt/raid1 是可访问的: + + # mdadm --detail /dev/md0 + # mount | grep raid1 + # ls -l /mnt/raid1 | grep tecmint + # cat /mnt/raid1/tecmint.txt + +![Confirm Rebuilding RAID Array](http://www.tecmint.com/wp-content/uploads/2015/10/Rebuilding-RAID-Array.png) + +确认 RAID 重建 + +上面图片清楚的显示,添加 /dev/sdd1 到阵列中来替代 /dev/sdc1,数据的重建是系统自动完成的,不需要干预。 + +虽然要求不是很严格,有一个备用设备是个好主意,这样更换故障的设备就可以在瞬间完成了。要做到这一点,先让我们重新添加 /dev/sdb1 和 /dev/sdc1: + + # mdadm --manage /dev/md0 --add /dev/sdb1 + # mdadm --manage /dev/md0 --add /dev/sdc1 + +![Replace Failed Raid Device](http://www.tecmint.com/wp-content/uploads/2015/10/Replace-Failed-Raid-Device.png) + +取代故障的 Raid 设备 + +### 从冗余丢失中恢复数据 ### + +如前所述,当一个磁盘发生故障 mdadm 将自动重建数据。但是,如果阵列中的2个磁盘都故障时会发生什么?让我们来模拟这种情况,通过标记 /dev/sdb1 和 /dev/sdd1 为 faulty: + + # umount /mnt/raid1 + # mdadm --manage --set-faulty /dev/md0 /dev/sdb1 + # mdadm --stop /dev/md0 + # mdadm --manage --set-faulty /dev/md0 /dev/sdd1 + +此时尝试以同样的方式重新创建阵列就(或使用 `--assume-clean` 选项)可能会导致数据丢失,因此不到万不得已不要使用。 + + +让我们试着从 /dev/sdb1 恢复数据,例如,在一个类似的磁盘分区(/dev/sde1 - 注意,这需要你执行前在/dev/sde 上创建一个 fd 类型的分区)上使用 ddrescue: + + # ddrescue -r 2 /dev/sdb1 /dev/sde1 + +![Recovering Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Recovering-Raid-Array.png) + +恢复 Raid 阵列 + +请注意,到现在为止,我们还没有触及 /dev/sdb 和 /dev/sdd,这是 RAID 阵列的一部分分区。 + +现在,让我们使用 /dev/sde1 和 /dev/sdf1 来重建阵列: + + # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[e-f]1 + +请注意,在真实的情况下,你需要使用与原来的阵列中相同的设备名称,即把 /dev/sdb1 和 /dev/sdc1 替换了的磁盘。 + +在本文中,我选择了使用额外的设备来重新创建全新的磁盘阵列,为了避免与原来的故障磁盘混淆。 + +当被问及是否继续写入阵列时,键入 Y,然后按 Enter。阵列被启动,你也可以查看它的进展: + + # watch -n 1 cat /proc/mdstat + +当这个过程完成后,你应该能够访问 RAID 的数据: + +![Confirm Raid Content](http://www.tecmint.com/wp-content/uploads/2015/10/Raid-Content.png) + +确认 Raid 数据 + +### 总结 ### + +在本文中,我们回顾了从 RAID 故障和冗余丢失中恢复数据。但是,你要记住,这种技术是一种存储解决方案,不能取代备份。 + +本文中介绍的方法适用于所有 RAID 中,还有其中的理念,我将在本系列的最后一篇(RAID 管理)中涵盖它。 + +如果你对本文有任何疑问,随时给我们以评论的形式说明。我们期待倾听阁下的心声! +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/recover-data-and-rebuild-failed-software-raid/ + +作者:[Gabriel Cánepa][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者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/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/create-raid1-in-linux/ +[3]:http://www.tecmint.com/send-mail-from-command-line-using-mutt-command/ From b7df0d71c326512be544cfdc7520c03d2e5429ca Mon Sep 17 00:00:00 2001 From: VicYu Date: Mon, 19 Oct 2015 14:13:59 +0800 Subject: [PATCH 2298/2517] Update 20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md --- ...Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md b/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md index edd8f68a4e..2f57b3fbb2 100644 --- a/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md +++ b/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md @@ -1,3 +1,5 @@ + Vic020 + How-To: Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10) ================================================================================ Wine 1.7.53 was released a few hours ago, and, as with each new version, it comes with several improvements, including support for **XAudio**, **Direct3D** code cleanups, improved **OLE object embedding**, further implementation of **Web Services DLL**, and a bunch of bug fixes. @@ -36,4 +38,4 @@ via: http://www.tuxarena.com/2015/10/how-to-compile-latest-wine-32-bit-on-64-bit [1]:https://launchpad.net/~ubuntu-wine/+archive/ubuntu/ppa [2]:https://www.winehq.org/announce/1.7.53 -[3]:http://prdownloads.sourceforge.net/wine/wine-1.7.53.tar.bz2 \ No newline at end of file +[3]:http://prdownloads.sourceforge.net/wine/wine-1.7.53.tar.bz2 From 011f069ff248bc9537eaa4d0cc2e7b501301f1dc Mon Sep 17 00:00:00 2001 From: VicYu Date: Mon, 19 Oct 2015 14:31:57 +0800 Subject: [PATCH 2299/2517] Translated:20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md --- ...est Wine 32-bit on 64-bit Ubuntu (15.10).md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md b/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md index 2f57b3fbb2..56c38176fa 100644 --- a/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md +++ b/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md @@ -1,37 +1,35 @@ - Vic020 - -How-To: Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10) +如何在64位Ubuntu 15.10中编译最新版32位Wine ================================================================================ -Wine 1.7.53 was released a few hours ago, and, as with each new version, it comes with several improvements, including support for **XAudio**, **Direct3D** code cleanups, improved **OLE object embedding**, further implementation of **Web Services DLL**, and a bunch of bug fixes. +Wine发布了最新的1.7.53版本。此版本带来的大量性能提升,包括**XAudio**,**Direct3D**代码清理,改善**OLE对象嵌入**技术,更好的**Web服务dll**的实现,还有其他大量更新。 ![](http://www.tuxarena.com/wp-content/uploads/2015/10/wine1753a.jpg) -There is an official PPA for Wine [here][1], but it only comes with 1.7.44, so to install the latest version you can compile from source following the instructions below. +虽然官方PPA支持[Wine][1],但目前只提供1.7.44版本,所以安装最新版本可以从源码编译安装。 -Download the source tarball from [here][2] (direct link [here][3]) and uncompress it (**tar -xf wine-1.7.53**). Next, install the dependencies: +[下载源码包][2]([直接下载][3])并解压(**tar -xf wine-1.7.53**).然后,安装依赖。 sudo apt-get install build-essential gcc-multilib libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxshmfence-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu1-mesa-dev:i386 libosmesa6-dev:i386 libpcap0.8-dev:i386 libdbus-1-dev:i386 libncurses5-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-dev:i386 liblcms2-dev:i386 gstreamer0.10-plugins-base:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig1-dev:i386 libgsm1-dev:i386 libtiff5-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap2-dev:i386 libgnutls-dev:i386 libjpeg-dev:i386 -Now change the working directory to **wine-1.7.53** and type: +现在切换到wine-1.7.53解压后的文件夹,并输入: ./configure make sudo make install -Alternatively, you can specify a prefix to the configure script and install Wine as normal user: +同样地,你也可以指定prefix配置脚本,以当前用户安装wine: ./configure --prefix=$HOME/usr/bin make make install -In this case, Wine will be installed as **$HOME/usr/bin/wine**, so make sure $HOME/usr/bin is in your PATH variable. +这种情况下,Wine将会安装在**$HOME/usr/bin/wine**,所以请检查$HOME/usr/bin在你的PATH变量中。 -------------------------------------------------------------------------------- via: http://www.tuxarena.com/2015/10/how-to-compile-latest-wine-32-bit-on-64-bit-ubuntu-15-10/ 作者:Craciun Dan -译者:[译者ID](https://github.com/译者ID) +译者:[VicYu/Vic020](http://vicyu.net) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From bab5f01f9caeba834ec4cffcc895d33672020f39 Mon Sep 17 00:00:00 2001 From: Vic020 Date: Mon, 19 Oct 2015 14:36:35 +0800 Subject: [PATCH 2300/2517] Moved --- ...To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md (100%) diff --git a/sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md b/translated/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md similarity index 100% rename from sources/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md rename to translated/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md From 1d319f9931d4d7cedd1629b416559ab0cbcd8eb7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 19 Oct 2015 16:14:40 +0800 Subject: [PATCH 2301/2517] =?UTF-8?q?20151019-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...9 Gaming On Linux--All You Need To Know.md | 203 ++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 sources/talk/20151019 Gaming On Linux--All You Need To Know.md diff --git a/sources/talk/20151019 Gaming On Linux--All You Need To Know.md b/sources/talk/20151019 Gaming On Linux--All You Need To Know.md new file mode 100644 index 0000000000..9b0df50160 --- /dev/null +++ b/sources/talk/20151019 Gaming On Linux--All You Need To Know.md @@ -0,0 +1,203 @@ +Gaming On Linux: All You Need To Know +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Gaming-on-Linux.jpeg) + +**Can I play games on Linux?** + +This is one of the most frequently asked questions by people who are thinking about [switching to Linux][1]. After all, gaming on Linux often termed as a distant possibility. In fact, some people even wonder if they can listen to music or watch movies on Linux. Considering that, question about native Linux games seem genuine. + +In this article, I am going to answer most of the Linux gaming questions a Linux beginner may have. For example, if it is possible to play games on Linux, if yes, what are the Linux games available, where can you **download Linux games** from or how do you get more information of gaming on Linux. + +But before I do that, let me make a confession. I am not a PC gamer or rather I should say, I am not desktop Linux gamer. I prefer to play games on my PS4 and I don’t care about PC games or even mobile games (no candy crush request sent to anyone in my friend list). This is the reason you see only a few articles in [Linux games][2] section of It’s FOSS. + +So why am I covering this topic then? + +Because I have been asked questions about playing games on Linux several times and I wanted to come up with a Linux gaming guide that could answer all those question. And remember, it’s not just gaming on Ubuntu I am talking about here. I am talking about Linux in general. + +### Can you play games on Linux? ### + +Yes and no! + +Yes, you can play games on Linux and no, you cannot play ‘all the games’ in Linux. + +Confused? Don’t be. What I meant here is that you can get plenty of popular games on Linux such as [Counter Strike, Metro Last Night][3] etc. But you might not get all the latest and popular Windows games on Linux, for e.g., [PES 2015][4]. + +The reason, in my opinion, is that Linux has less than 2% of desktop market share and these numbers are demotivating enough for most game developers to avoid working on the Linux version of their games. + +Which means that there is huge possibility that the most talked about games of the year may not be playable in Linux. Don’t despair, there are ‘other means’ to get these games on Linux and we shall see it in coming sections, but before that let’s talk about what kind of games are available for Linux. + +If I have to categorize, I’ll divide them in four categories: + +1. Native Linux Games +1. Windows games in Linux +1. Browser Games +1. Terminal Games + +Let’s start with the most important one, native Linux games, first. + +---------- + +### 1. Where to find native Linux games? ### + +Native Linux games mean those games which are officially supported in Linux. These games have native Linux client and can be installed like most other applications in Linux without requiring any additional effort (we’ll see about these in next section). + +So, as you see, there are games developed for Linux. Next question that arises is where can you find these Linux games and how can you play them. I am going to list some of the resources where you can get Linux games. + +#### Steam #### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/09/Install-Steam-Ubuntu-11.jpeg) + +“[Steam][5] is a digital distribution platform for video games. As Amazon Kindle is digital distribution platform for e-Books, iTunes for music, similarly Steam is for games. It provides you the option to buy and install games, play multiplayer and stay in touch with other games via social networking on its platform. The games are protected with [DRM][6].” + +A couple of years ago, when gaming platform Steam announced support for Linux, it was a big news. It was an indication that gaming on Linux is being taken seriously. Though Steam’s decision was more influenced with its own Linux-based gaming console and a separate [Linux distribution called Steam OS][7], it still was a reassuring move that has brought a number of games on Linux. + +I have written a detailed article about installing and using Steam. If you are getting started with Steam, do read it. + +- [Install and use Steam for gaming on Linux][8] + +#### GOG.com #### + +[GOG.com][9] is another platform similar to Steam. Like Steam, you can browse and find hundreds of native Linux games on GOG.com, purchase the games and install them. If the games support several platforms, you can download and use them across various operating systems. Your purchased games are available for you all the time in your account. You can download them anytime you wish. + +One main difference between the two is that GOG.com offers only DRM free games and movies. Also, GOG.com is entirely web based. So you don’t need to install a client like Steam. You can simply download the games from browser and install them in your system. + +#### Portable Linux Games #### + +[Portable Linux Games][10] is a website that has a collection of a number of Linux games. The unique and best thing about Portable Linux Games is that you can download and store the games for offline installation. + +The downloaded files have all the dependencies (at times Wine and Perl installation) and these are also platform independent. All you need to do is to download the files and double click to install them. Store the downloadable file on external hard disk and use them in future. Highly recommend if you don’t have continuous access to high speed internet. + +#### Game Drift Game Store #### + +[Game Drift][11] is actually a Linux distribution based on Ubuntu with sole focus on gaming. While you might not want to start using this Linux distribution for the sole purpose of gaming, you can always visit its game store online and see what games are available for Linux and install them. + +#### Linux Game Database #### + +As the name suggests, [Linux Game Database][12] is a website with a huge collection of Linux games. You can browse through various category of games and download/install them from the game developer’s website. As a member of Linux Game Database, you can even rate the games. LGDB, kind of, aims to be the IGN or IMDB for Linux games. + +#### Penguspy #### + +Created by a gamer who refused to use Windows for playing games, [Penguspy][13] showcases a collection of some of the best Linux games. You can browse games based on category and if you like the game, you’ll have to go to the respective game developer’s website. + +#### Software Repositories #### + +Look into the software repositories of your own Linux distribution. There always will be some games in it. If you are using Ubuntu, Ubuntu Software Center itself has an entire section for games. Same is true for other Linux distributions such as Linux Mint etc. + +---------- + +### 2. How to play Windows games in Linux? ### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Wine-Linux.png) + +So far we talked about native Linux games. But there are not many Linux games, or to be more precise, most popular Linux games are not available for Linux but they are available for Windows PC. So the questions arises, how to play Windows games in Linux? + +Good thing is that with the help of tools like Wine, PlayOnLinux and CrossOver, you can play a number of popular Windows games in Linux. + +#### Wine #### + +Wine is a compatibility layer which is capable of running Windows applications in systems like Linux, BSD and OS X. With the help of Wine, you can install and use a number of Windows applications in Linux. + +[Installing Wine in Ubuntu][14] or any other Linux is easy as it is available in most Linux distributions’ repository. There is a huge [database of applications and games supported by Wine][15] that you can browse. + +#### CrossOver #### + +[CrossOver][16] is an improved version of Wine that brings professional and technical support to Wine. But unlike Wine, CrossOver is not free. You’ll have to purchase the yearly license for it. Good thing about CrossOver is that every purchase contributes to Wine developers and that in fact boosts the development of Wine to support more Windows games and applications. If you can afford $48 a year, you should buy CrossOver for the support they provide. + +### PlayOnLinux ### + +PlayOnLinux too is based on Wine but implemented differently. It has different interface and slightly easier to use than Wine. Like Wine, PlayOnLinux too is free to use. You can browse the [applications and games supported by PlayOnLinux on its database][17]. + +---------- + +### 3. Browser Games ### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Chrome-Web-Store.jpeg) + +Needless to say that there are tons of browser based games that are available to play in any operating system, be it Windows or Linux or Mac OS X. Most of the addictive mobile games, such as [GoodGame Empire][18], also have their web browser counterparts. + +Apart from that, thanks to [Google Chrome Web Store][19], you can play some more games in Linux. These Chrome games are installed like a standalone app and they can be accessed from the application menu of your Linux OS. Some of these Chrome games are playable offline as well. + +---------- + +### 4. Terminal Games ### + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/03/nSnake_Linux_terminal_game.jpeg) + +Added advantage of using Linux is that you can use the command line terminal to play games. I know that it’s not the best way to play games but at times, it’s fun to play games like [Snake][20] or [2048][21] in terminal. There is a good collection of Linux terminal games at [this blog][22]. You can browse through it and play the ones you want. + +---------- + +### How to stay updated about Linux games? ### + +When you have learned a lot about what kind of games are available on Linux and how could you use them, next question is how to stay updated about new games on Linux? And for that, I advise you to follow these blogs that provide you with the latest happenings of the Linux gaming world: + +- [Gaming on Linux][23]: I won’t be wrong if I call it the nest Linux gaming news portal. You get all the latest rumblings and news about Linux games. Frequently updated, Gaming on Linux has dedicated fan following which makes it a nice community of Linux game lovers. +- [Free Gamer][24]: A blog focusing on free and open source games. +- [Linux Game News][25]: A Tumbler blog that updates on various Linux games. + +#### What else? #### + +I think that’s pretty much what you need to know to get started with gaming on Linux. If you are still not convinced, I would advise you to [dual boot Linux with Windows][26]. Use Linux as your main desktop and if you want to play games, boot into Windows. This could be a compromised solution. + +I think that’s pretty much what you need to know to get started with gaming on Linux. If you are still not convinced, I would advise you to [dual boot Linux with Windows][27]. Use Linux as your main desktop and if you want to play games, boot into Windows. This could be a compromised solution. + +It’s time for you to add your inputs. Do you play games on your Linux desktop? What are your favorites? What blogs you follow to stay updated on latest Linux games? + + +投票项目: +How do you play games on Linux? + +- I use Wine and PlayOnLinux along with native Linux Games +- I am happy with Browser Games +- I prefer the Terminal Games +- I use native Linux games only +- I play it on Steam +- I dual boot and go in to Windows to play games +- I don't play games at all + +注:投票代码 +
+
+ + + +注,发布时根据情况看怎么处理 + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/linux-gaming-guide/ + +作者:[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://itsfoss.com/reasons-switch-linux-windows-xp/ +[2]:http://itsfoss.com/category/games/ +[3]:http://blog.counter-strike.net/ +[4]:https://pes.konami.com/tag/pes-2015/ +[5]:http://store.steampowered.com/ +[6]:https://en.wikipedia.org/wiki/Digital_rights_management +[7]:http://itsfoss.com/valve-annouces-linux-based-gaming-operating-system-steamos/ +[8]:http://itsfoss.com/install-steam-ubuntu-linux/ +[9]:http://www.gog.com/ +[10]:http://www.portablelinuxgames.org/ +[11]:http://gamedrift.org/GameStore.html +[12]:http://www.lgdb.org/ +[13]:http://www.penguspy.com/ +[14]:http://itsfoss.com/wine-1-5-11-released-ppa-available-to-download/ +[15]:https://appdb.winehq.org/ +[16]:https://www.codeweavers.com/products/ +[17]:https://www.playonlinux.com/en/supported_apps.html +[18]:http://empire.goodgamestudios.com/ +[19]:https://chrome.google.com/webstore/category/apps +[20]:http://itsfoss.com/nsnake-play-classic-snake-game-linux-terminal/ +[21]:http://itsfoss.com/play-2048-linux-terminal/ +[22]:https://ttygames.wordpress.com/ +[23]:https://www.gamingonlinux.com/ +[24]:http://freegamer.blogspot.fr/ +[25]:http://linuxgamenews.com/ +[26]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ +[27]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ \ No newline at end of file From 09c0a5a1c016417680b92c24c97a20ee27146169 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 19 Oct 2015 20:38:15 +0800 Subject: [PATCH 2302/2517] Update 20151019 10 passwd command examples in Linux.md --- sources/tech/20151019 10 passwd command examples in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151019 10 passwd command examples in Linux.md b/sources/tech/20151019 10 passwd command examples in Linux.md index 141bc25e3e..c723992c89 100644 --- a/sources/tech/20151019 10 passwd command examples in Linux.md +++ b/sources/tech/20151019 10 passwd command examples in Linux.md @@ -1,3 +1,4 @@ +translation by strugglingyouth 10 passwd command examples in Linux ================================================================================ As the name suggest **passwd** command is used to change the password of system users. If the passwd command is executed by non-root user then it will ask for the current password and then set the new password of a user who invoked the command. When this command is executed by super user or root then it can reset the password for any user including root without knowing the current password. @@ -143,4 +144,4 @@ via: http://www.linuxtechi.com/10-passwd-command-examples-in-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file +[a]:http://www.linuxtechi.com/author/pradeep/ From d9467600993c316d297baebecebbb90465c8eef8 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 19 Oct 2015 21:34:06 +0800 Subject: [PATCH 2303/2517] Update 20151019 11 df command examples in Linux.md --- sources/tech/20151019 11 df command examples in Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151019 11 df command examples in Linux.md b/sources/tech/20151019 11 df command examples in Linux.md index f259789eaa..bcb17960c3 100644 --- a/sources/tech/20151019 11 df command examples in Linux.md +++ b/sources/tech/20151019 11 df command examples in Linux.md @@ -1,3 +1,4 @@ +translation by strugglingyouth 11 df command examples in Linux ================================================================================ df (disk free) command is used to display disk usage of the file system. By default df command shows the file system usage in 1K blocks for all the current mounted file system, if you want to display the output of df command in human readable format , use -h option like “df -h”. @@ -255,4 +256,4 @@ via: http://www.linuxtechi.com/11-df-command-examples-in-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.linuxtechi.com/author/pradeep/ \ No newline at end of file +[a]:http://www.linuxtechi.com/author/pradeep/ From 2b8ee7c4171ae414713ef80ae0b39929b183a211 Mon Sep 17 00:00:00 2001 From: unicornx Date: Mon, 19 Oct 2015 23:10:43 +0800 Subject: [PATCH 2304/2517] polish was done --- ...borative Group to Speed Real-Time Linux.md | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md index fa8bc6b4c5..8e3b007fd7 100644 --- a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md +++ b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md @@ -6,7 +6,7 @@ New Collaborative Group to Speed Real-Time Linux The Linux Foundation’s [announcement][1] at LinuxCon this week that it was assuming funding control over the Real-Time Linux project gave renewed hope that embedded Linux will complete its 15-year campaign to achieve equivalence with RTOSes in real-time operations. The RTL group is being reinvigorated as a Real-Time Linux Collaborative Project, with better funding, more developers, and closer integration with mainline kernel development. 在本周的Linux大会活动(LinuxCon)上Linux基金会(Linux Foundation)[宣称][1],“Real-Time - Linux”项目(译者注:实时Linux操作系统项目,简称RTL)得到了新的资金支持,并预期这将促进该项目,使其自成立15年来第一次有机会在实时操作性上和其他的实时操作系统一较高下。Linux基金会将RTL项目重组为一个新的项目,并命名为“Real-Time Linux Collaborative Project”(译者注,下文将称其为“RTL协作组”),该项目将获得更有力的资金支持,更多的开发人员将投入其中,并在开发和集成上和内核主线保持更紧密的联系。 + Linux”项目(译者注:实时Linux操作系统项目,简称RTL)得到了新的资金支持,并预期这将促进该项目,使其自成立15年来第一次有机会在实时操作性上和其他的实时操作系统(RTOS,译者注:Real Time Operation System)一较高下。Linux基金会将RTL项目重组为一个新的项目,并命名为“Real-Time Linux Collaborative Project”(译者注,下文将称其为“RTL协作组”),该项目将获得更有力的资金支持,更多的开发人员将投入其中,并在开发和集成上和Linux内核主线保持更紧密的联系。 According to the Linux Foundation, moving RTL under its umbrella “will save the industry millions of dollars in research and development.” The move will also “improve quality of the code through robust upstream kernel test infrastructure,” says the Foundation. @@ -14,15 +14,15 @@ According to the Linux Foundation, moving RTL under its umbrella “will save th Over the past decade, the RTL project has been overseen, and more recently, funded, by the [Open Source Automation Development Lab][2], which is continuing on as a Gold member of the new collaborative project, but will hand funding duties over to the Linux Foundation in January. The RTL project and [OSADL][3] have been responsible for maintaining the RT-Preempt (or [Preempt-RT][4]) patches, and periodically updating them to mainline Linux. -在过去的十几年中,RTL项目的开发管理和经费资助主要由[开源自动化开发实验室(译者注:Open Source Automation Development Lab,简称OSADL)] [2]承担,其将继续作为新合作项目的金牌成员之一,但其原来承担的资金资助工作将会在一月份移交给Linux基金。RTL项目和[OSADL][3]长久以来一直负责维护[内核的实时抢占(RT-Preempt)补丁][4],并定期将其更新到Linux内核的主线上。 +在过去的十几年中,RTL项目的开发管理和经费资助主要由[开源自动化开发实验室(译者注:Open Source Automation Development Lab,以下简称OSADL)] [2]承担,OSDL将继续作为新合作项目的金牌成员之一,但其原来承担的资金资助工作将会在一月份移交给Linux基金。RTL项目和[OSADL][3]长久以来一直负责维护[内核的实时抢占(RT-Preempt)补丁][4],并定期将其更新到Linux内核的主线上。 The task is about 90 percent complete, according to Dr. Carsten Emde, longtime General Manager of OSADL. “It’s like building a house,” he explains. “The main components such as the walls, windows, and doors are already in place, or in our case, things like high-resolution timers, interrupt threads, and priority-inheritance mutexes. But then you need all these little bits and pieces such as carpets and wallpaper to finish the job.” -按长期以来一直担任OSADL总经理的Carsten Emde博士的话说,支持内核实时特性的工作已经完成了将近90%。 “这就像盖房子,”他解释说。 “主要的部件,如墙壁,窗户和门都已经安装到位,就实时内核来说,类似的主要部件譬如:高精度定时器(high-resolution timers),中断线程化机制(interrupt threads)和基于优先级可继承的互斥量(priority-inheritance mutexes)等。你所剩下的工作就是还需要一些小零碎,如地毯和墙纸来完成最终的工程。“ +据长期以来一直担任OSADL总经理的Carsten Emde博士介绍,支持内核实时特性的工作已经完成了将近90%。 “这就像盖房子,”他解释说。 “主要的部件,如墙壁,窗户和门都已经安装到位,就实时内核来说,类似的主要部件包括:高精度定时器(high-resolution timers),中断线程化机制(interrupt threads)和基于优先级可继承的互斥量(priority-inheritance mutexes)等。你所剩下的就是还需要一些边边角角的工作,就如同装修房子过程中还剩下铺设如地毯和墙纸等来完成最终的工程。” According to Emde, real-time Linux is already technologically equivalent to most real-time operating systems – assuming you’re willing to hassle with all the patches. “The goal of the project was to provide a Linux system with a predefined deterministic worst-case latency and nothing else,” says Emde. “This goal is reached today when a kernel is patched, and the same goal will be reached when a future unpatched mainline RT kernel will be used. The only – of course important – difference is that the maintenance work will be much less when we do no longer need to continually adapt off-tree components to mainline.” -据Emde介绍,从技术的角度来说,实时Linux的性能已经可以媲美绝大多数其他的实时操作系统 - 只要你不厌其烦地愿意把所有的补丁都打上。 Emde的原话如下:“该项目(译者注,指RTL)的目标就是提供一个满足实时性要求Linux系统,使其无论在如何恶劣的负载状况下都可以保证在确定的可以预先定义的时间内对处理做出响应,没有其他,这个目标已经实现,但需要你手动地将RTL提供的补丁添加到Linux内核主线的版本代码上,但新项目将在Linux内核主线版本上直接支持同样的的目标。唯一的,当然也是最重要的区别就是相应的维护工作将少得多,因为我们再也不用一次又一次移植那些独立于内核主线的补丁代码了。” +以Emde观点来看,从技术的角度来说,实时Linux的性能已经可以媲美绝大多数其他的实时操作系统 - 但前提是你要不厌其烦地把所有的补丁都打上。 Emde的原话如下:“该项目(译者注,指RTL)的唯一目标就是提供一个满足实时性要求Linux系统,使其无论运行状况如何恶劣都可以保证在确定的可以预先定义的时间期限内对外界处理做出响应。这个目标已经实现,但需要你手动地将RTL提供的补丁添加到Linux内核主线的版本代码上,但新项目将在Linux内核主线版本上直接支持同样的的目标。唯一的,当然也是最重要的区别就是相应的维护工作将少得多,因为我们再也不用一次又一次移植那些独立于内核主线的补丁代码了。” The RTL Collaborative Group will continue under the guidance of Thomas Gleixner, the key maintainer over the past decade. This week, Gleixner was appointed a Linux Foundation Fellow, joining a select group that includes Linux kernel stable maintainer Greg Kroah-Hartman, Yocto Project maintainer Richard Purdie, and Linus Torvalds. @@ -30,7 +30,6 @@ The RTL Collaborative Group will continue under the guidance of Thomas Gleixner, According to Emde, RTL’s secondary maintainer Steven Rostedt of Red Hat, who “maintains older but still maintained kernel versions,” will continue to participate in the project along with Red Hat’s Ingo Molnàr, who was a key developer of RTL, but in recent years has had more of an advisory position. Somewhat surprisingly, however, Red Hat is not one of the RTL Collaborative Group’s members. Instead, Google takes the top spot as the lone Platinum member, while Gold members include National Instruments (NI), OSADL, and Texas Instruments (TI). Silver members include Altera, ARM, Intel, and IBM. - 据Emde介绍,RTL的第二维护人Steven Rostedt来自Red Hat公司,他负责维护旧的内核版本,他将和同样来自Red Hat的Ingo Molnàr继续参与该项目,Ingo是RTL的关键开发人员,但近年来更多地从事咨询方面的工作。有些令人惊讶的是,Red Hat竟然不是RTL协作组的成员之一。相反,谷歌作为唯一的白金会员占据了头把交椅,其他黄金会员包括国家仪器公司(National Instruments,简称NI),OSADL和德州仪器(TI)。银卡会员包括Altera公司,ARM,Intel和IBM。 ### The Long Road to Real Time ### @@ -38,7 +37,7 @@ According to Emde, RTL’s secondary maintainer Steven Rostedt of Red Hat, who When Linux first appeared in embedded devices more than 15 years ago, it faced an embedded computing market dominated by RTOSes such as Wind River’s VxWorks, which continue to offer highly deterministic, hardened kernels required by many industrial, avionics, and transportation applications. Like Microsoft’s already then established – and more real-time – Windows CE, Linux faced resistance and outright mockery from potential industrial clients. These desktop-derived distributions might be okay for lightweight consumer electronics, it was argued, but they lacked the hardened, kernels that made RTOSes the choice for devices that required deterministic task scheduling for split-second reliability. -当15年前Linux第一次出现在嵌入式设备上的时候,它所面临的嵌入式计算市场已经被其他的实时操作系统,譬如风河公司(WindRiver)的VxWorks,所牢牢占据着,VxWorks从那时到现在,一直在为众多的工控设备,航空电子设备以及交通运输应用提供着工业级别的高确定性的,硬实时的内核。微软后来也提供了一个支持实时性的操作系统版本-Windows CE,Linux所面临的是来自潜在工业客户的公开嘲讽和层层阻力。他们认为那些从桌面系统改进来的Linux发行版本顶多适合要求不高的轻量级消费类电子产品,是不适合那些对硬实时要求高的设备的。 +当15年前Linux第一次出现在嵌入式设备上的时候,它所面临的嵌入式计算市场已经被其他的实时操作系统,譬如风河公司(WindRiver)的VxWorks,所牢牢占据。VxWorks从那时起到现在,一直在为众多的工控设备,航空电子设备以及交通运输应用提供着工业级别的高确定性的,硬实时的内核。微软后来也提供了一个支持实时性的操作系统版本-Windows CE,当时的Linux所面临的是来自潜在工业客户的公开嘲讽和层层阻力。他们认为那些从桌面系统改进来的Linux发行版本顶多适合要求不高的轻量级消费类电子产品,而不适合那些对硬实时要求更高的设备。 Improving Linux’s real-time capabilities was an [early goal][5] of embedded Linux pioneers such as [MontaVista][6]. Over the years, RTL development was accelerated and formalized in various groups such as OSADL, which [was founded in 2006][7], as well as the Real-Time Linux Foundation (RTLF). When RTLF [merged with OSADL][8] in 2009, OSADL and its RTL group took full ownership over the PREEMPT-RT patch maintenance and upstreaming process. OSADL also oversees other automation-related projects such as [Safety Critical Linux][9]. @@ -46,38 +45,38 @@ Improving Linux’s real-time capabilities was an [early goal][5] of embedded Li OSADL’s stewardship over RTL progressed in three stages: advocacy and outreach, testing and quality assessment, and finally, funding. Early on, OSADL’s role was to write articles, make presentations, organize training, and “spread the word” about the advantages of RTL, says Emde. “To introduce a new technology such as Linux and its community-based development model into the rather conservative automation industry required first of all to build confidence,” he says. “Switching from a proprietary RTOS to Linux means that companies must introduce new strategies and processes in order to interact with a community.” -OSADL对RTL的支持经历了三个阶段:拥护和推广、测试和质量评估以及最后的资金支持。Emde表示,在早期,OSADL的角色仅限于写写推广的文章,制作专题报告,组织相关培训,以及“宣传”RTL的优点。他说:“要让一个相当保守的自动化行业接受象Linux之类的新技术及其基于社区的那种开发模式,首先就需要建立其对新事物的信心。从使用专有的实时操作系统转向改用Linux对公司意味着必须引入新的战略和流程,以便与社区进行互动。” +OSADL对RTL的支持经历了三个阶段:拥护和推广,测试和质量评估,以及最后的资金支持。Emde表示,在早期,OSADL的角色仅限于写写推广的文章,制作专题报告,组织相关培训,以及“宣传”RTL的优点。他说:“要让一个相当保守的工控行业接受象Linux之类的新技术及其基于社区的那种开发模式,首先就需要建立其对新事物的信心。从使用专有的实时操作系统转向改用Linux对公司意味着必须引入新的战略和流程,才能与社区进行互动。” Later, OSADL moved on to providing technical performance data, establishing [a quality assessment and testing center][10], and providing assistance to its industrial members in open source legal compliance and safety certifications. -后来,OSADL改而提供技术性能数据,建立[质量评估和测试中心][10],并在和开源相关事务的法律问题和安全认证方面向行业成员提供帮助。 +后来,OSADL改而提供技术性能数据,建立[质量评估和测试中心][10],并在和开源相关的法律事务问题和安全认证方面向行业成员提供帮助。 As RTL grew more mature, pulling even with the fading Windows CE in real-time capabilities and increasingly [cutting into RTOS market share][11], rival real-time Linux projects – principally [Xenomai][12] – have begun to integrate with it. -当RTL在实时性上变得愈加成熟,相反Windows CE却是江河日下,[其市场份额正在快速地被RTL所蚕食][11],一些与RTL竞争的实时Linux项目,主要是[Xenomai][12]已开始集成RTL。 +当RTL在实时性上变得愈加成熟的同时,相反地Windows CE却是江河日下,[其市场份额正在快速地被RTL所蚕食][11],一些与RTL竞争的实时Linux项目,主要是[Xenomai][12]也已开始集成RTL。 “The success of the RT patches, and the clear prospective that they would eventually be merged completely, has led to a change of focus at Xenomai,” says Emde. “Xenomai 3.0 can be used in combination with the RT patches and provide so-called ‘skins’ that allow you to recycle real-time source code that was written for other systems. They haven’t been completely unified, however, since Xenomai uses a dual kernel approach whereas the RT patches apply only to a single Linux kernel.” -“伴随RTL补丁的成功发展,以及明确的预期其最终会被集成到Linux内核主线代码中,导致Xenomai关注的重心发生了变化,”Emde说。 “Xenomai 3.0可与RT补丁结合起来使用,并提供了所谓的‘皮肤’,(译者注:一个封装层),使我们可以复用为其他系统编写的代码。不过,它们还没有完全统一起来,因为Xenomai使用了双内核方法,而RT补丁只适用于单一Linux内核。“ +“伴随RTL补丁的成功发展,以及明确的预期其最终会被集成到Linux内核主线代码中,导致Xenomai关注的重心发生了变化,”Emde说。 “Xenomai 3.0可与RT补丁结合起来使用,并提供了所谓的‘皮肤’,(译者注:一个封装层),使我们可以复用为其他系统编写的代码。不过,它们还没有完全统一起来,因为Xenomai使用了双内核方法,而RT补丁只适用于单一的Linux内核。“ In more recent years, the RTL group’s various funding sources have dropped off, and OSADL took on that role, too. “When the development recently slowed down a bit because of a lack of funding, OSADL started its third milestone by directly funding Thomas Gleixner's work,” says Emde. -近些年来,资助RTL项目的来源越来越少,最终OSADL接过了这个重任。Emde说:“当最近开发工作因缺少资金而陷入停滞时,OSADL对RTL的支持进入到第三个重大阶段:开始直接资助Thomas Gleixner的工作。” +近些年来,RTL项目的资助来源越来越少,所以最终OSADL接过了这个重任。Emde说:“当最近开发工作因缺少资金而陷入停滞时,OSADL对RTL的支持进入到第三个重大阶段:开始直接资助Thomas Gleixner的工作。” As Emde wrote in an [Oct. 5 blog entry][13], the growing expansion of Real-Time Linux beyond its core industrial base to areas like automotive and telecom suggested that the funding should be expanded as well. “It would not be entirely fair to let the automation industry fund the complete remaining work on its own, since other industries such as telecommunication also rely on the availability of a deterministic Linux kernel,” wrote Emde. -正如Emde在其[10月5日的一篇博文][13]中所描述的那样,实时Linux的应用领域正在日益扩大,由其原来主要服务的工业控制扩大到了汽车行业和电信业等领域,这表明资助的来源也应该得到拓宽。Emde原文写道:“仅仅靠工业自动化行业的资金来支撑剩余的工作是不合理的,因为电信等其他行业也在使用实时Linux内核。” +正如Emde在其[10月5日的一篇博文][13]中所描述的那样,实时Linux的应用领域正在日益扩大,由其原来主要服务的工业控制扩大到了汽车行业和电信业等领域,这表明资助的来源也应该得到拓宽。Emde原文写道:“仅仅靠来自工控行业的资金来支撑全部的工作是不合理的,因为电信等其他行业也在享用实时Linux内核。” When the Linux Foundation showed interest in expanding its funding role, OSADL decided it would be “much more efficient to have a single funding and control channel,” says Emde. He adds, however, that as a Gold member, OSADL is still participating in the oversight of the project, and will continue its advocacy and quality assurance activities. -当Linux基金会表明有兴趣提供资金支持时,OSADL认为“单一的资助和控制渠道要有效得多”,Emde如是说。不过,他补充说,作为黄金级成员,OSADL仍参与监管项目的工作,会继续从事其宣传和质量保证方面的活动。 +当Linux基金会表明有兴趣提供资金支持时,OSADL认为“单一的资助和控制渠道要有效得多”(译者注:指最终由Linux基金会全盘接手了RTL项目),Emde如是说。不过,他补充说,作为黄金级成员,OSADL仍参与监管项目的工作,会继续从事其宣传和质量保证方面的活动。 ### Automotive Looks for Real-Time Boost ### ###汽车行业期待RTL的崛起### RTL will continue to see its greatest growth in industrial applications where it will gradually replace RTOS applications, says Emde. Yet, it is also growing quickly in automotive, and will later spread to railway and avionics, he adds. -Emde表示,RTL会继续在工业应用领域迎来最迅猛的发展并逐渐取代其他实时操作系统。而且,他补充道,RTL在汽车行业发展也很迅猛,以后会扩大并应用到铁路和航空电子设备上。 +Emde表示,RTL会继续在工业应用领域飞速发展并逐渐取代其他实时操作系统。而且,他补充说,RTL在汽车行业发展也很迅猛,以后会扩大并应用到铁路和航空电子设备上。 Indeed, the growing role of Linux in automotive appears to be key to the Linux Foundation’s goals for RTL, with potential collaborations with its [Automotive Grade Linux][14] (AGL) workgroup. Automotive may also be the chief motivator for Google’s high-profile participation, speculates Emde. In addition, TI is deeply involved with automotive with its Jacinto processors. @@ -85,19 +84,19 @@ Indeed, the growing role of Linux in automotive appears to be key to the Linux F Linux-oriented automotive projects like AGL aim to move Linux beyond in-vehicle infotainment (IVI) into cluster controls and telematics where RTOSes like QNX dominate. Autonomous vehicles are even in greater need of real-time performance. -面向车载Linux的项目(比如AGL)旨在让Linux在车载设备应用上不要仅限于车载信息娱乐(In-Vehicle Infotainment,简称IVI),而是要进入到譬如集群控制和车载通讯领域,这些领域目前主要使用QNX之类的实时操作系统。无人驾驶汽车对操作系统的实时性能的需求还要大。 +面向车载Linux的项目(比如AGL)的目标是要扩大Linux在车载设备上的应用范围,其应用不是仅限于车载信息娱乐(In-Vehicle Infotainment,简称IVI),而是要进入到譬如集群控制和车载通讯领域,而这些领域目前主要使用的是QNX之类的实时操作系统。无人驾驶汽车在实时性上对操作系统也有很高的要求。 Emde notes that OSADL's [SIL2LinuxMP][15] project may play an important role in extending RTL into automotive. SIL2LinuxMP is not an automotive-specific project, but BMW is participating, and automotive is one of the key applications. The project aims to certify base components required for RTL to run on a single- or multi-core COTS board. It defines bootloader, root filesystem, Linux kernel, and C library bindings to access RTL. -Emde特别指出,OSADL的[SIL2LinuxMP][15]项目可能会在将RTL引入到汽车工业领域上扮演重要的角色。SIL2LinuxMP并不是专门针对汽车工业的项目,但随着BMW公司参与其中,汽车行业成为其很重要的应用领域之一。该项目的目标在于验证RTL在采用单核或多核CPU的标准化商用(Commercial Off-The-Shelf,简称COTS)板卡上运行所需的基本部件。它定义了引导程序、根文件系统、Linux内核以及对应支持RTL的C库。 +Emde特别指出,OSADL的[SIL2LinuxMP][15]项目可能会在将RTL引入到汽车工业领域上扮演重要的角色。SIL2LinuxMP并不是专门针对汽车工业的项目,但随着BMW公司参与其中,汽车行业成为其很重要的应用领域之一。该项目的目标在于验证RTL在采用单核或多核CPU的标准化商用(Commercial Off-The-Shelf,简称COTS)板卡上运行所需的基本组件。它定义了引导程序、根文件系统、Linux内核以及对应支持RTL的C库。 Autonomous drones and robots are also ripe for real-time, and Xenomai is already used in many robots, as well as some drones. Yet, RTL’s role will be limited in the wider embedded Linux world of consumer electronics and Internet of Things applications. The main barrier is the latency of wireless communications and the Internet itself. -无人机和机器人使用实时Linux的时机也已成熟,Xenomai系统早已用在许多机器人以及一些无人机中。不过,在更广泛的嵌入式Linux世界,包括了消费电子产品和物联网应用中,RTL可以扮演的角色很有限。主要的障碍在于,无线通信和互联网本身带来的延迟。 +无人机和机器人使用实时Linux的时机也已成熟,Xenomai系统早已用在许多机器人以及一些无人机中。不过,在更广泛的嵌入式Linux世界,包括了消费电子产品和物联网应用中,RTL可以扮演的角色很有限。主要的障碍在于,无线通信和互联网本身会带来延迟。 “Real-time Linux will have a role within machine control and between machines and peripheral devices, but less between remote machines,” says Emde. “Real-time via Internet will probably never be possible.” -Emde说:“实时Linux主要还是应用于系统内部控制以及系统与周边外设之间的控制,在远程控制机器上作用不大。通过互联网要想实现实时控制恐怕是永远不可能的。” +Emde说:“目前实时Linux主要还是应用于系统内部控制以及系统与周边外设之间的控制,在远程控制机器上作用不大。企图通过互联网实现实时控制恐怕不是一件可行的事情。” -------------------------------------------------------------------------------- From b716a8560d52db6ec010381e838dfce241249f6b Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 19 Oct 2015 23:11:08 +0800 Subject: [PATCH 2305/2517] PUB:20150716 Interview--Larry Wall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @martin2011qi 很多地方翻译的很棒!辛苦了,我校对都用了一天呢。 --- published/20150716 Interview--Larry Wall.md | 132 ++++++++++++++++++ .../talk/20150716 Interview--Larry Wall.md | 125 ----------------- 2 files changed, 132 insertions(+), 125 deletions(-) create mode 100644 published/20150716 Interview--Larry Wall.md delete mode 100644 translated/talk/20150716 Interview--Larry Wall.md diff --git a/published/20150716 Interview--Larry Wall.md b/published/20150716 Interview--Larry Wall.md new file mode 100644 index 0000000000..c08b46910c --- /dev/null +++ b/published/20150716 Interview--Larry Wall.md @@ -0,0 +1,132 @@ +Larry Wall 专访——语言学、Perl 6 的设计和发布 +================================================================================ + +> 经历了15年的打造,Perl 6 终将在年底与大家见面。我们预先采访了它的作者了解一下新特性。 + +Larry Wall 是个相当有趣的人。他是编程语言 Perl 的创造者,这种语言被广泛的誉为将互联网粘在一起的胶水,也由于大量地在各种地方使用非字母的符号被嘲笑为‘只写’语言——以难以阅读著称。Larry 本人具有语言学背景,以其介绍 Perl 未来发展的演讲“[洋葱的状态][1](State of the Onion)”而闻名。(LCTT 译注:“洋葱的状态”是 Larry Wall 的年度演讲的主题,洋葱也是 Perl 基金会的标志。) + +在2015年布鲁塞尔的 FOSDEM 上,我们赶上了 Larry,问了问他为什么 Perl 6 花了如此长的时间(Perl 5 的发布时间是1994年),了解当项目中的每个人都各执己见时是多么的难以管理,以及他的语言学背景自始至终究竟给 Perl 带来了怎样的影响。做好准备,让我们来领略其中的奥妙…… + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall1.jpg) + +**Linux Voice:你曾经有过计划去寻找世界上某个地方的某种不见经传的语言,然后为它创造书写的文字,但你从未有机会去实现它。如果你能回到过去,你会去做么?** + +Larry Wall:你首先得是个年轻人才能搞得定!做这些事需要投入很大的努力和人力,以至于已经不适合那些上了年纪的人了。健康、活力是其中的一部分,同样也因为人们在年轻的时候更容易学习一门新的语言,只有在你学会了语言之后你才能写呀。 + +我自学了日语十年,由于我的音系学和语音学的训练我能说的比较流利——但要理解别人的意思对我来说还十分困难。所以到了日本我会问路,但我听不懂他们的回答! + +通常需要一门语言学习得足够好才能开发一个文字体系,并可以使用这种语言进行少量的交流。在你能够实际推广它和用本土人自己的文化教育他们前,那还需要一些年。最后才可以教授本土人如何以他们的文明书写。 + +当然如果在语言方面你有帮手 —— 经过别人的提醒我们不再使用“语言线人”来称呼他们了,那样显得我们像是在 CIA 工作的一样!—— 你可以通过他们的帮助来学习外语。他们不是老师,但他们会以另一种方式来启发你学习 —— 当然他们也能教你如何说。他们会拿着一根棍子,指着它说“这是一根棍子”,然后丢掉同时说“棒子掉下去了”。然后,你就可以记下一些东西并将其系统化。 + +大多数让人们有这样做的动力是翻译圣经。但是这只是其中的一方面;另一方面也是为了文化保护。传教士在这方面臭名昭著,因为人类学家认为人们应该基于自己的文明来做这件事。但有些人注定会改变他们的文化——他们可能是军队、或是商业侵入,如可口可乐或者缝纫机,或传教士。在这三者之间,传教士相对来讲伤害最小的了,如果他们恪守本职的话。 + +**LV:许多文字系统有本可依,相较而言你的发明就像是格林兰语…** + +印第安人照搬字母就发明了他们自己的语言,而且没有在这些字母上施加太多我们给这些字母赋予的涵义,这种做法相当随性。它们只要能够表达出人们的所思所想,使交流顺畅就行。经常是有些声调语言(Tonal language)使用的是西方文字拼写,并尽可能的使用拉丁文的字符变化,然后用重音符或数字标注出音调。 + +在你开始学习如何使用语音和语调表示之后,你也开始变得迷糊——或者你的书写就不如从前准确。或者你对话的时候像在讲英文,但发音开始无法匹配拼写。 + +**LV:当你在开发 Perl 的时候,你的语言学背景会不会使你认为:“这对程序设计语言真的非常重要”?** + +LW:我在人们是如何使用语言上想了很多。在现实的语言中,你有一套名词、动词和形容词的体系,并且你知道这些单词的词性。在现实的自然语言中,你时常将一个单词放到不同的位置。我所学的语言学理论也被称为法位学(phoenetic),它解释了这些在自然语言中工作的原理 —— 也就是有些你当做名词的东西,有时候你可以将它用作动词,并且人们总是这样做。 + +你能很好的将任何单词放在任何位置而进行沟通。我比较喜欢的例子是将一个整句用作为一个形容词。这句话会是这样的:“我不喜欢你的[我可以用任何东西来取代这个形容词的]态度”! + +所以自然语言非常灵活,因为聆听者非常聪明 —— 至少,相对于电脑而言 —— 你相信他们会理解你最想表达的意思,即使存在歧义。当然对电脑而言,你必须保证歧义不大。 + +> “在 Perl 6 中,我们试图让电脑更准确的了解我们。” + +可以说在 Perl 1到5上,我们针对歧义方面处理做得还不够。有时电脑会在不应该的时候迷惑。在 Perl 6上,我们找了许多方法,使得电脑对你所说的话能更准确的理解,就算用户并不清楚这底是字符串还是数字,电脑也能准确的知道它的类型。我们找到了内部以强类型存储,而仍然可以无视类型的“以此即彼”的方法。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall2.jpg) + +**LV:Perl 被视作互联网上的“胶水(glue)”语言已久,能将点点滴滴组合在一起。在你看来 Perl 6 的发布是否符合当前用户的需要,或者旨在招揽更多新用户,能使它重获新生吗?** + +LW:最初的设想是为 Perl 程序员带来更好的 Perl。但在看到了 Perl 5 上的不足后,很明显改掉这些不足会使 Perl 6更易用,就像我在讨论中提到过 —— 类似于 [托尔金(J. R. R. Tolkien) 在《指环王》前言中谈到的适用性一样][2]。 + +重点是“简单的东西应该简单,而困难的东西应该可以实现”。让我们回顾一下,在 Perl 2和3之间的那段时间。在 Perl 2上我们不能处理二进制数据或嵌入的 null 值 —— 只支持 C 语言风格的字符串。我曾说过“Perl 只是文本处理语言 —— 在文本处理语言里你并不需要这些功能”。 + +但当时发生了一大堆的问题,因为大多数的文本中会包含少量的二进制数据 —— 如网络地址(network addresses)及类似的东西。你使用二进制数据打开套接字,然后处理文本。所以通过支持二进制数据,语言的适用性(applicability)翻了一倍。 + +这让我们开始探讨在语言中什么应该简单。现在的 Perl 中有一条原则,是我们偷师了哈夫曼编码(Huffman coding)的做法,它在位编码系统中为字符采取了不同的尺寸,常用的字符占用的位数较少,不常用的字符占用的位数更多。 + +我们偷师了这种想法并将它作为 Perl 的一般原则,针对常用的或者说常输入的 —— 这些常用的东西必须简单或简洁。不过,另一方面,也显得更加的不规则(irregular)。在自然语言中也是这样的,最常用的动词实际上往往是最不规则的。 + +所以在这样的情况下需要更多的差异存在。我很喜欢一本书是 Umberto Eco 写的的《探寻完美的语言(The Search for the Perfect Language)》,说的并不是计算机语言;而是哲学语言,大体的意思是古代的语言也许是完美的,我们应该将它们带回来。 + +所有的这类语言错误的认为类似的事物其编码也应该总是类似的。但这并不是我们沟通的方式。如果你的农场中有许多动物,他们都有相近的名字,当你想杀一只鸡的时候说“走,去把 Blerfoo 宰了”,你的真实想法是宰了 Blerfee,但有可能最后死的是一头牛(LCTT 译注:这是杀鸡用牛刀的意思吗?哈哈)。 + +所以在这种时候我们其实更需要好好的将单词区分开,使沟通信道的冗余增加。常用的单词应该有更多的差异。为了达到更有效的通讯,还有一种自足(LCTT 译注:self-clocking ,自同步,[概念][3]来自电信和电子行业,此处译为“自足”更能体现涵义)编码。如果你在一个货物上看到过 UPC 标签(条形码),它就是一个自足编码,每对“条”和“空”总是以七个列宽为单位,据此你就知道“条”的宽度加起来总是这么宽。这就是自足。 + +在电子产品中还有另一种自足编码。在老式的串行传输协议中有停止和启动位,来保持同步。自然语言中也会包含这些。比如说,在写日语时,不用使用空格。由于书写方式的原因,他们会在每个词组的开头使用中文中的汉字字符,然后用音节表(syllabary)中的字符来结尾。 + +**LV:是平假名,对吗?** + +LW: 是的,平假名。所以在这一系统,每个词组的开头就自然就很重要了。同样的,在古希腊,大多数的动词都是搭配好的(declined 或 conjugated),所以它们的标准结尾是一种自足机制。在他们的书写体系中空格也是可有可无的 —— 引入空格是更近代的发明。 + +所以在计算机语言上也要如此,有的值也可以自足编码。在 Perl 上我们重度依赖这种方法,而且在 Perl 6 上相较于前几代这种依赖更重。当你使用表达式时,你要么得到的是一个词,要么得到的是插值(infix)操作符。当你想要得到一个词,你有可能得到的是一个前缀操作符,它也在相同的位置;同样当你想要得到一个插值操作符,你也可能得到的是前一个词的后缀。 + +但是反过来。如果编译器准确的知道它想要什么,你可以稍微重载(overload)它们,其它的让 Perl 来完成。所以在斜线“/”后面是单词时它会当成正则表达式,而斜线“/”在字串中时视作除法。而我们并不会重载所有东西,因为那只会使你失去自足冗余。 + +多数情况下我们提示的比较好的语法错误消息,是出于发现了一行中出现了两个关键词,然后我们尝试找出为什么一行会出现两个关键字 —— “哦,你一定漏掉了上一行的分号”,所以我们相较于很多其他的按步照班的解析器可以生成更好的错误消息。 + +![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall3.jpg) + +**LV:为什么 Perl 6 花了15年?当每个人对事物有不同看法时一定十分难于管理,而且正确和错误并不是绝对的。** + +LW:这必须要非常小心地平衡。刚开始会有许多的好的想法 —— 好吧,我并不是说那些全是好的想法。也有很多令人烦恼的地方,就像有361条 RFC [功能建议文件],而我也许只想要20条。我们需要坐下来,将它们全部看完,并忽略其中的解决方案,因为它们通常流于表象、视野狭隘。几乎每一条只针对一样事物,如若我们将它们全部拼凑起来,那简直是一堆垃圾。 + +> “掌握平衡时需要格外小心。毕竟在刚开始的时候总会有许多的好主意。” + +所以我们必须基于人们在使用 Perl 5 时的真实感受重新整理,寻找统一、深层的解决方案。这些 RFC 文档许多都提到了一个事实,就是类型系统的不足。通过引入更条理分明的类型系统,我们可以解决很多问题并且即聪明又紧凑。 + +同时我们开始关注其他方面:如何统一特征集并开始重用不同领域的想法,这并不需要它们在下层相同。我们有一种标准的书写配对(pair)的方式——好吧,在 Perl 里面有两种!但使用冒号书写配对的方法同样可以用于基数计数法或是任何进制的文本编号。同样也可以用于其他形式的引用(quoting)。在 Perl 里我们称它为“奇妙的一致”。 + +> “做了 Perl 6 的早期实现的朋友们,握着我的手说:“我们真的很需要一位语言的设计者。”” + +同样的想法涌现出来,你说“我已经熟悉了语法如何运作,但是我看见它也被用在别处”,所以说视角相同才能找出这种一致。那些提出各种想法和做了 Perl 6 的早期实现的人们回来看我,握着我的手说:“我们真的需要一位语言的设计者。您能作为我们的[仁慈独裁者][4](benevolent dictator)吗?”(LCTT 译注:Benevolent Dictator For Life,或 BDFL,指开源领袖,通常指对社区争议拥有最终裁决权的领袖,典故来自 Python 创始人 Guido van Rossum, 具体参考维基条目[解释][4]) + +所以我是语言的设计者,但总是听到:“不要管具体实现(implementation)!我们目睹了你对 Perl 5 做的那些,我们不想历史重演!”真是让我忍俊不禁,因为他们作为起步的核心和原先 Perl 5 的内部结构上几乎别无二致,也许这就是为什么一些早期的实现做的并不好的原因。 + +因为我们仍然在摸索我们的整个设计,其实现在做了许多 VM (虚拟机)该做什么和不该做什么的假设,所以最终这个东西就像面向对象的汇编语言一样。类似的问题在伊始阶段无处不在。然后 Pugs 这家伙走过来说:“用用看 Haskell 吧,它能让你们清醒的认识自己正在干什么,让我们用它来弄清楚下层的语义模型(semantic model)。” + +因此,我们明确了其中的一些语义模型,但更重要的是,我们开始建立符合那些语义模型的测试套件。在这之后,Parrot VM 继续进行开发,并且出现了另一个实现 Niecza ,它基于 .Net,是由一个年轻的家伙搞出来的。他很聪明,实现了 Perl 6 的一个很大的子集。不过他还是一个人干,并没有找到什么好方法让别人介入他的项目。 + +同时 Parrot 项目变得过于庞大,以至于任何人都不能真正的深入掌控它,并且很难重构。同时,开发 Rakudo 的人们觉得我们可能需要在更多平台上运行它,而不只是在 Parrot VM 上。 于是他们发明了所谓的可移植层 NQP ,即 “Not Quite Perl”。他们一开始将它移植到 JVM(Java虚拟机)上运行,与此同时,他们还秘密的开发了一个叫做 MoarVM 的 VM ,它去年才刚刚为人知晓。 + +无论 MoarVM 还是 JVM 在回归测试(regression test)中表现得十分接近 —— 在许多方面 Parrot 算是尾随其后。这样不挑剔 VM 真的很棒,我们也能开始考虑将 NQP 发扬光大。谷歌夏季编码大赛(Google Summer of Code project)的目标就是针对 JavaScript 的 NQP,这应该靠谱,因为 MoarVM 也同样使用 Node.js 作为日常处理。 + +我们可能要将今年余下的时光投在 MoarVM 上,直到 6.0 发布,方可休息片刻。 + +**LV:去年英国,政府开展编程年活动(Year of Code),来激发年轻人对编程的兴趣。针对活动的建议五花八门——类似为了让人们准确的认识到内存的使用你是否应该从低阶语言开始讲授,或是一门高阶语言。你对此作何看法?** + +LW:到现在为止,Python 社区在低阶方面的教学工作做得比我们要好。我们也很想在这一方面做点什么,这也是我们有蝴蝶 logo 的部分原因,以此来吸引七岁大小的女孩子! + +![Perl 6 : Camelia](https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Camelia.svg/640px-Camelia.svg.png) + +> “到现在为止,Python 社区在低阶方面的教学工作做得比我们要好。” + +我们认为将 Perl 6 作为第一门语言来学习是可行的。一大堆的将 Perl 5 作为第一门语言学习的人让我们吃惊。你知道,在 Perl 5 中有许多相当大的概念,如闭包,词法范围,和一些你通常在函数式编程中见到的特性。甚至在 Perl 6 中更是如此。 + +Perl 6 花了这么长时间的部分原因是我们尝试去坚持将近 50 种互不相同的原则,在设计语言的最后对于“哪点是最重要的规则”这个问题还是悬而未决。有太多的问题需要讨论。有时我们做出了决定,并已经工作了一段时间,才发现这个决定并不很正确。 + +之前我们并未针对并发程序设计或指定很多东西,直到 Jonathan Worthington 的出现,他非常巧妙的权衡了各个方面。他结合了一些其他语言诸如 Go 和 C# 的想法,将并发原语写的非常好。可组合性(Composability)是一个语言至关重要的一部分。 + +有很多的程序设计系统的并发和并行写的并不好 —— 比如线程和锁,不良的操作方式有很多。所以在我看来,额外花点时间看一下 Go 或者 C# 这种高阶原语的开发是很值得的 —— 那是一种关键字上的矛盾 —— 写的相当棒。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/interview-larry-wall/ + +作者:[Mike Saunders][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/mike/ +[1]:https://en.wikipedia.org/wiki/Perl#State_of_the_Onion +[2]:http://tinyurl.com/nhpr8g2 +[3]:http://en.wikipedia.org/wiki/Self-clocking_signal +[4]:https://en.wikipedia.org/wiki/Benevolent_dictator_for_life \ No newline at end of file diff --git a/translated/talk/20150716 Interview--Larry Wall.md b/translated/talk/20150716 Interview--Larry Wall.md deleted file mode 100644 index e989b01d9d..0000000000 --- a/translated/talk/20150716 Interview--Larry Wall.md +++ /dev/null @@ -1,125 +0,0 @@ -专访: Larry Wall -================================================================================ -> 经历了15年的打造,Perl 6终将在年底与大家见面。我们预先采访了她的作者了解一下新特性。 - -Larry Wall是个相当有趣的人。他即编程语言Perl的创造者,这种语言被广泛的誉为将互联网粘在一起的胶水,也因为对非字母使用的密度和宽容度被嘲笑是‘只写’语言。Larry本人具有语言学背景,曾风趣的使用“洋葱的状态”来介绍Perl特性,为人津道。 - -在2015年布鲁塞尔的FOSDEM上,我们赶上Larry,问了问他为什么Perl 6花了如此长的时间(Perl 5的发布时间是1994年),了解当项目中的每个人都各执己见时是多么的难以管理,以及他的语言学背景自始至终究竟给Perl带来了怎样的影响。做好准备,让我们来领略其中的奥妙…… - -![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall1.jpg) - -**Linux Voice:你有计划寻找世界某处某种不知名的语言来写脚本,但你还未曾有机会去实现它。现在呢?** - -Larry Wall:那需要多么青春,才能承担得起呀!做这些事需要投入很大的努力和人力,以至于已经不适合那些上了年纪的人了。健康、活力是其中的一部分,同样也因为人们在年轻的时候更容易学习一门新的语言,只有在你学会了语言之后你才能写脚本呀。 - -我自学了日语十年,由于语音和发声联系我能说的比流利——但要理解别人的意思对我来说还十分困难。所以到了日本我会问路,但我听不懂他们的回答! - -> “在Perl 6中,我们试图让电脑更准确的了解我们。” - -通常需要学习一门语言直到能开发一个书写系统,并且可以使用这种语言进行少量的交流,经过日积月累直到,你能用它学习研究、教书育人,最后达到可以教授本土人如何以他们的文明书写。 - -当然如果在语言方面你有帮手 —— 经过别人的提醒我们不再使用“语言线人”来称呼他们了,那样显得我们像是在CIA工作的一样!—— 你可以通过他们的帮助来学习外语。他们不是老师,但他们会以另一种方式来激发你学习 —— 当然他们也能叫你如何说。他们会拿着一根棍子,指着它说“这是一根棍子”,然后丢掉同时说“棒子掉下去了”。你开始记下一些东西并将其系统化。 - -大多数迫使人们站出来的原因是翻译圣经。但是这只是其中的一方面;另一方面也是为了保护自己的文明。传教士在这方面臭名昭著,应为人类学家认为人们应该基于自己的文明来做这件事。但注定有些有些人会改变他们的文明——他们可能是军队、或是商人,如可口可乐或者缝纫机器,或传教士。在这三者之间,传教士式相对来讲伤害最小的了,如果他们恪守本职的话。 - -**LV:许多文字系统有本可依,相较而言你的发明就像是格林兰语…** - -切诺基人照搬字母就发明了他们自己的语言,并没有在这些字母上施加任何他们的想法,这种做法相当任性。它们必须要能够表达出人们所想,才能使交流更顺畅。经常是有些声调语言使用的是西方文字拼写,并尽可能的使用拉丁文的字符变化。然后用重音符或数字标注出音调。 - -在你开始学习如何使用语音和语调表示之后,你也开始变得迷糊——或者你书写就不如从前准确。或者你对话的时候像在讲英文,但发音开始无法匹配拼写。 - -**LV:当你在维护Perl的时候,你的语言学背景会不会使你认为:“这对程序设计语言真的非常重要”?** - -LW:我在人们是如何使用语言上想了很多。在现实的语言中,你有一套名词、动词和形容词的体系,并且你知道这些单词的词性。在现实的自然语言中,你时常将一个单词放到不同的位置。我所学的语言学理论也被称为法位学,他会解释这些在自然语言中工作的原理 —— 也就是有些东西你考虑的时候是名词,但你可以将它用作动词,并且人们总是这样做。 - -你能很好的将任何单词放在任何位置,然后你就能沟通了。我比较喜欢的例子是将一整句话用作为一个形容词。这句话会是这样的:“我不喜欢你[我可以用任何东西来取代这个形容词的]态度”! - -所以自然语言非常灵活,因为聆听者非常聪明 —— 至少,相对于电脑而言 —— 你相信他们会理解你最想表达的意思,即使存在歧义。当然对电脑而言,你必须保证歧义不大。 - -可以说在Perl 1到5上,我们针对这方面的管理做得还不够。有时电脑会在不应该的时候抽风。在Perl 6上,我们找了许多方法,使得电脑对你所说的话能更准确的理解,就算用户并不清楚这底是字符串还是数字。电脑准确的知道它的类型。 - -![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall2.jpg) - -**LV:Perl被视作互联网上的“胶水”语言已久,能将点点滴滴组合在一起。在你看来Perl 6的发布是否符合当前用户的需要,或者旨在招揽更多新用户,能使她重获新生吗?** - -LW:最初的设想是为Perl程序员带来更好的Perl。但在看到了Perl 5上的不足后,很明显改掉这些不足会使Perl 6更易用,就像我在讨论中提到过 —— 类似于在J. R. R. Tolkien上对易用性的讨论一样[see http://tinyurl.com/nhpr8g2]。 - -重点是“简单的东西应该简单,而难得东西应该可以实现”。让我们回顾一下,在Perl 2和3之间的那段时间。在Perl 2上我们不能处理二进制数据或嵌入的空值 —— 只有C语言风格的字符串。我曾说过“Perl只是文本执行语言 —— 你并不需要有这些功能的文本执行语言”。 - -但当时发生了一大对的问题,因为大多数的文本中会包含少量的二进制数据 —— 类似的例如网址。你使用二进制数据打开套接字,然后文本处理它。所以语言的可用性两倍于处理二进制的可能性。 - -那我们开始探讨在语言中什么应该简单。现在的Perl中有一条原则,我们偷师了哈夫曼编码,在位编码系统中为字符采取了不同的尺寸。常用的字符占用的位数较少,不常用的字符占用的位数更多。 - -> “掌握平衡时需要格外小心。毕竟在刚开始的时候总会有许多的好主意。” - -我们偷师了这种想法并将它作为Perl的原则,针对常用的或者说常输入的 —— 这些常用的东西必须简单或简洁。另一方面,也显得更加的不规则。在自然语言中也是这样的,由诸多的常用的动词趋于诸多的不规律。 - -所以在这样的情况下需要更多的差异存在。我很喜欢一本书是Umberto Eco写的的《探寻完美的语言》,说的并不是计算机语言;而是哲学语言,大体的意思是古代的语言也许是完美的,我们应该将她们带回来。 - -所有的这类语言错误的认为同样的事物,其编码也应该一直是相同的。但这并不是我们沟通的方式。如果你的农场中有许多动物,他们都有对应的名字,当你想杀一只鸡的时候说“走,去把Blerfoo宰了”,你的真实想法是宰了Blerfee,但有可能最后死的是一头牛。 - -所以在这种时候我们其实更需要好好的将单词区分开,使沟通的信道的冗余增加。 - -在电子学中还有另一种自时钟码。在从前的串行传输协议中有停止和启动位,来保持同步。自然语言中也会包含这些。比如说,在写日语时,你不用空格。由于书写方式的原因,他们会在每个词组的开头使用中文中的汉字字符,然后用音节表中的字符来结尾。 - -**LV:平假名,对吗?** - -LW: 是的,平假名。所以使用这一系统,每个词组的开头就自然而然的脱颖而出了。同样的,在古老的希腊,大多数的动词都是搭配好的。所以它们拥有时钟排序机制的标准结尾。在他们的书写体系中空格也是可有可无的 —— 引入空格是更现代的一大发明。 - -所以在计算机语言上也要如此,将值包含于自时钟码中。在Perl上我们重度依赖此道,而且在Perl 6上相较于前几代这种依赖更重。当你使用表达式时,你要么想得到一个词,要么想到得到插入操作符。当你想要得到一个词,你有可能同时得到一个前缀操作符,同样当你想要得到一个插入符,你也可能同时得到前一个词的后缀。 - -但是反过来。如果编译器准确的知道它想要什么,你只用多写那么一丢丢,其他的让Perl来完成。所以在切断的时候,它会根据需要推荐常规表达式,分割处也会如你所愿。而我们并不需要操心任何事,因为那只会使你失去自时钟冗余。 - -大多数我们最好的语法错误消息,源于对一行中出现两个词的观察。然后我们尝试找出原因 —— “哦,你一定漏掉了上一行的分号”。所以我们相较于很多其他特殊解析器可以生成更加好的错误消息。 - -![](http://www.linuxvoice.com/wp-content/uploads/2015/07/wall3.jpg) - -**LV:为什么Perl 6花了15年?当每个人对她有不同看法时一定十分难管理,而且正确和错误并不是绝对的。** - -LW:这其中必定会有非常微妙的平衡。刚开始会有许多的想法 —— 当然,我并不是想说那些是好想法。也有很多令人烦恼的地方,就像有361条RFC[功能建议文件],而我想要实现的可能只有其中的20条。我们需要坐下来,将它们全部看完,并忽略其中的解决方案,因为它们通常流于表象、视野狭隘。几乎每一条只针对一样事物,如若我们将它们全部拼凑起来,那简直是一堆垃圾。 - -所以我们必须基于人们在使用Perl 5时的真实感受重新整理。寻找统一、深层的解决方案。许多的RFC文档都提到了一个事实,就是类型系统的不足。通过引入更条理分明的类型系统,我们可以解决很多问题并且即聪明又紧凑。 - -同时我们开始关注其他面:如何统一特征集并开始重用不同领域的想法。并不需要他们在下层相同。我们有一种标准的书写配对方式——好的吧,Perl的话有两种!但使用冒号书写配对的方法同样可以被基数计数法或是任何文字编号所重用。同样也可以用于其他形式的引用。在Perl里我们称它为“奇妙的一致”。 - -> “早先组建Perl 6实施小组的朋友,挽着我的手说:“我们真的很需要一位语言的设计者。”” - -同样的想法涌现出来,你说“我已经熟悉了语法如何运作,但是我实在别处看到的”。所以说视角相同才能找出这种一致。那些早期将Perl 6呈现在我面前的人们,握着我的手说:“我们真的需要一位语言的设计者。您能作为我们的精神领袖吗?” - -所以我是语言的设计者,但总是听到:“离实施小组远点!我们目睹了你对Perl 5做的那些,我们不想历史重演!”真是让我忍俊不禁因为他们作为起步的核心和原先Perl 5的内部结构上几乎别无二致,也许就只因为这个原因实施小组早期的工作并不顺利。 - -因为我们始终坚持我们的整体设计方法,所以在是否应该使用VM上讨论良久,最后解决的方式很像面向对象的汇编语言。类似的问题在伊始阶段无处不在。然后Pugs这家伙走过来说:“用用看Haskell吧,它能让你们清醒的认识自己正在干什么。让我们用它来弄清自己的言下之意。” - -因此,我们明确了其中的一些语义模型的,但更重要的是,我们开始建立符合哪些语义模型的测试套件。在这时候,持续的对Parrot VM进行开发,以及另一个实施项目Niecza的到来,它基于.Net,是由一个年轻的家伙搞出来的。他很聪明且实施了一大部分的Perl 6。不过他还是一个人干,并没有找到什么好方法让别人介入他的项目。 - -同时Parrot项目变得过于庞大,以至于任何人都不能真正的由内而外的管理它,并且很难重构。负责这方面工作的Rakudo觉得我们可能需要在更多平台上运行不止Parrot VM。于是他们发明了所谓的可移植层,“Not Quite Perl”简写成NQP。他们一开始将它移植到JVM(Java虚拟机)上运行,与此同时,他们还秘密的在一个新的VM上工作。这个叫做MoarVM的VM这去年刚刚为人知晓。 - -无论MoarVM还是JVM在回归测试中表现得十分接近 —— 在许多方面Parrot算是紧随其后。这样不挑剔VM真的很棒,我们也能开始考虑将NQP发扬光大。谷歌夏季编码大赛的目标就是针对JavaScript的NQP,这应该靠谱,因为MoarVM平时处理也同样使用Node.js。 - -我们可能要将今年余下的时光投在MoarVM上,直到6.0发布,方可休息片刻。 - -**LV:去年英国,政府开展编程年,来激发年轻人对编程的兴趣。针对活动的建议五花八门——类似为了让人们准确的认识到内存的使用你是否应该从低阶语言开授,或是一门高阶语言。你对此作和看法?** - -LW:到现在为止,Python社区在低阶方面的教学工作做得比我们要好。我们也很想在这一方面做点什么,这也是我们有蝴蝶logo的部分原因,以此来吸引七岁大小的女孩子! - -我们认为将Perl 6作为第一门语言来学习是可行的。一大堆的将Perl 5作为第一门语言学习的人让我们吃惊。你知道,在Perl 5中有许多相当大的概念,如闭包,范围操作符,和一些你通常在函数式编程中学到的特性。这才Perl 6中同样有很多。 - -> “到现在为止,Python社区在低阶方面的教学工作做得比我们要好。” - -Perl 6花了这么长时间的部分原因是我们尝试去坚持将近50种互不相同的原则,在设计语言的最后对于“哪点是最重要的规则”这个问题还是悬而未决。有太多的问题需要讨论。优势我们做出了决定,并已经工作了一段时间,才发现这个决定并不正确。 - -之前我们并未针对并发程序设计设计或指定些什么,直到Jonathan Worthington的出现,他非常巧妙的权衡了各个方面。他结合了一些其他语言诸如Go和C#的想法,将并发原语写的非常好。可组合性是一个语言至关重要的一部分。 - -很滑稽的是很多程序设计系统的并发和并行写的并不好 —— 就像线程和锁,不良的操作方式有很多。所以在我看来,额外花点时间看一下Go或者C#这种高阶原语的开发是很值得的 —— 他们在条目中列出了矛盾 —— 写的相当棒。 - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/interview-larry-wall/ - -作者:[Mike Saunders][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/mike/ From 25f9f72905b98b8c45e6f070a4ca930254094c63 Mon Sep 17 00:00:00 2001 From: unicornx Date: Mon, 19 Oct 2015 23:18:43 +0800 Subject: [PATCH 2306/2517] removed chinese, clean up --- ...borative Group to Speed Real-Time Linux.md | 49 +------------------ 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md index 8e3b007fd7..2729a61e0b 100644 --- a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md +++ b/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md @@ -1,101 +1,56 @@ unicornx 翻译中... ... -New Collaborative Group to Speed Real-Time Linux + +新的合作组将加速实时Linux的发展 ================================================================================ ![](http://www.linux.com/images/stories/66866/Tux-150.png) -The Linux Foundation’s [announcement][1] at LinuxCon this week that it was assuming funding control over the Real-Time Linux project gave renewed hope that embedded Linux will complete its 15-year campaign to achieve equivalence with RTOSes in real-time operations. The RTL group is being reinvigorated as a Real-Time Linux Collaborative Project, with better funding, more developers, and closer integration with mainline kernel development. - 在本周的Linux大会活动(LinuxCon)上Linux基金会(Linux Foundation)[宣称][1],“Real-Time Linux”项目(译者注:实时Linux操作系统项目,简称RTL)得到了新的资金支持,并预期这将促进该项目,使其自成立15年来第一次有机会在实时操作性上和其他的实时操作系统(RTOS,译者注:Real Time Operation System)一较高下。Linux基金会将RTL项目重组为一个新的项目,并命名为“Real-Time Linux Collaborative Project”(译者注,下文将称其为“RTL协作组”),该项目将获得更有力的资金支持,更多的开发人员将投入其中,并在开发和集成上和Linux内核主线保持更紧密的联系。 -According to the Linux Foundation, moving RTL under its umbrella “will save the industry millions of dollars in research and development.” The move will also “improve quality of the code through robust upstream kernel test infrastructure,” says the Foundation. - 根据Linux基金会的说法,RTL项目并入Linux基金会后“将为业界节省数百万美元的重复研发费用。”同时此举也将“通过基于稳定的主线内核版本开发而改善本项目的代码质量”。 -Over the past decade, the RTL project has been overseen, and more recently, funded, by the [Open Source Automation Development Lab][2], which is continuing on as a Gold member of the new collaborative project, but will hand funding duties over to the Linux Foundation in January. The RTL project and [OSADL][3] have been responsible for maintaining the RT-Preempt (or [Preempt-RT][4]) patches, and periodically updating them to mainline Linux. - 在过去的十几年中,RTL项目的开发管理和经费资助主要由[开源自动化开发实验室(译者注:Open Source Automation Development Lab,以下简称OSADL)] [2]承担,OSDL将继续作为新合作项目的金牌成员之一,但其原来承担的资金资助工作将会在一月份移交给Linux基金。RTL项目和[OSADL][3]长久以来一直负责维护[内核的实时抢占(RT-Preempt)补丁][4],并定期将其更新到Linux内核的主线上。 -The task is about 90 percent complete, according to Dr. Carsten Emde, longtime General Manager of OSADL. “It’s like building a house,” he explains. “The main components such as the walls, windows, and doors are already in place, or in our case, things like high-resolution timers, interrupt threads, and priority-inheritance mutexes. But then you need all these little bits and pieces such as carpets and wallpaper to finish the job.” - 据长期以来一直担任OSADL总经理的Carsten Emde博士介绍,支持内核实时特性的工作已经完成了将近90%。 “这就像盖房子,”他解释说。 “主要的部件,如墙壁,窗户和门都已经安装到位,就实时内核来说,类似的主要部件包括:高精度定时器(high-resolution timers),中断线程化机制(interrupt threads)和基于优先级可继承的互斥量(priority-inheritance mutexes)等。你所剩下的就是还需要一些边边角角的工作,就如同装修房子过程中还剩下铺设如地毯和墙纸等来完成最终的工程。” -According to Emde, real-time Linux is already technologically equivalent to most real-time operating systems – assuming you’re willing to hassle with all the patches. “The goal of the project was to provide a Linux system with a predefined deterministic worst-case latency and nothing else,” says Emde. “This goal is reached today when a kernel is patched, and the same goal will be reached when a future unpatched mainline RT kernel will be used. The only – of course important – difference is that the maintenance work will be much less when we do no longer need to continually adapt off-tree components to mainline.” - 以Emde观点来看,从技术的角度来说,实时Linux的性能已经可以媲美绝大多数其他的实时操作系统 - 但前提是你要不厌其烦地把所有的补丁都打上。 Emde的原话如下:“该项目(译者注,指RTL)的唯一目标就是提供一个满足实时性要求Linux系统,使其无论运行状况如何恶劣都可以保证在确定的可以预先定义的时间期限内对外界处理做出响应。这个目标已经实现,但需要你手动地将RTL提供的补丁添加到Linux内核主线的版本代码上,但新项目将在Linux内核主线版本上直接支持同样的的目标。唯一的,当然也是最重要的区别就是相应的维护工作将少得多,因为我们再也不用一次又一次移植那些独立于内核主线的补丁代码了。” -The RTL Collaborative Group will continue under the guidance of Thomas Gleixner, the key maintainer over the past decade. This week, Gleixner was appointed a Linux Foundation Fellow, joining a select group that includes Linux kernel stable maintainer Greg Kroah-Hartman, Yocto Project maintainer Richard Purdie, and Linus Torvalds. - 新的RTL协作组将继续在Thomas Gleixner的指导下工作,Thomas Gleixner在过去的十多年里一直是RTL的核心维护人员。本周,Gleixner被任命为Linux基金会成员,并加入了一个特别的小组,小组成员包括Linux稳定内核维护者Greg Kroah-Hartman,Yocto项目维护者Richard Purdie和Linus Torvalds本人。 -According to Emde, RTL’s secondary maintainer Steven Rostedt of Red Hat, who “maintains older but still maintained kernel versions,” will continue to participate in the project along with Red Hat’s Ingo Molnàr, who was a key developer of RTL, but in recent years has had more of an advisory position. Somewhat surprisingly, however, Red Hat is not one of the RTL Collaborative Group’s members. Instead, Google takes the top spot as the lone Platinum member, while Gold members include National Instruments (NI), OSADL, and Texas Instruments (TI). Silver members include Altera, ARM, Intel, and IBM. - 据Emde介绍,RTL的第二维护人Steven Rostedt来自Red Hat公司,他负责维护旧的内核版本,他将和同样来自Red Hat的Ingo Molnàr继续参与该项目,Ingo是RTL的关键开发人员,但近年来更多地从事咨询方面的工作。有些令人惊讶的是,Red Hat竟然不是RTL协作组的成员之一。相反,谷歌作为唯一的白金会员占据了头把交椅,其他黄金会员包括国家仪器公司(National Instruments,简称NI),OSADL和德州仪器(TI)。银卡会员包括Altera公司,ARM,Intel和IBM。 -### The Long Road to Real Time ### ###走向实时内核的漫长道路### -When Linux first appeared in embedded devices more than 15 years ago, it faced an embedded computing market dominated by RTOSes such as Wind River’s VxWorks, which continue to offer highly deterministic, hardened kernels required by many industrial, avionics, and transportation applications. Like Microsoft’s already then established – and more real-time – Windows CE, Linux faced resistance and outright mockery from potential industrial clients. These desktop-derived distributions might be okay for lightweight consumer electronics, it was argued, but they lacked the hardened, kernels that made RTOSes the choice for devices that required deterministic task scheduling for split-second reliability. - 当15年前Linux第一次出现在嵌入式设备上的时候,它所面临的嵌入式计算市场已经被其他的实时操作系统,譬如风河公司(WindRiver)的VxWorks,所牢牢占据。VxWorks从那时起到现在,一直在为众多的工控设备,航空电子设备以及交通运输应用提供着工业级别的高确定性的,硬实时的内核。微软后来也提供了一个支持实时性的操作系统版本-Windows CE,当时的Linux所面临的是来自潜在工业客户的公开嘲讽和层层阻力。他们认为那些从桌面系统改进来的Linux发行版本顶多适合要求不高的轻量级消费类电子产品,而不适合那些对硬实时要求更高的设备。 -Improving Linux’s real-time capabilities was an [early goal][5] of embedded Linux pioneers such as [MontaVista][6]. Over the years, RTL development was accelerated and formalized in various groups such as OSADL, which [was founded in 2006][7], as well as the Real-Time Linux Foundation (RTLF). When RTLF [merged with OSADL][8] in 2009, OSADL and its RTL group took full ownership over the PREEMPT-RT patch maintenance and upstreaming process. OSADL also oversees other automation-related projects such as [Safety Critical Linux][9]. - 对于嵌入式Linux的先行者如[MontaVista公司][6]来说,其[早期的目标][5]很明确就是要改进Linux的实时能力。多年以来,对Linux的实时性能开发发展迅速,得到各种组织的支持,如OSADL[成立于2006年][7],以及实时Linux基金会(Real-Time Linux Foundation,简称RTLF)。在2009年[OSADL与RTLF合并][8],OSADL及其RTL组承担了所有的抢占式实时内核(PREEMPT-RT)补丁的维护工作并始终保存跟踪最新的Linux内核主线版本。除此之外OSADL还负责监管其他自动化相关的项目,例如[高可靠性Linux][9](Safety Critical Linux,译者注:指研究如何在关键系统上可靠安全地运行Linux)。 -OSADL’s stewardship over RTL progressed in three stages: advocacy and outreach, testing and quality assessment, and finally, funding. Early on, OSADL’s role was to write articles, make presentations, organize training, and “spread the word” about the advantages of RTL, says Emde. “To introduce a new technology such as Linux and its community-based development model into the rather conservative automation industry required first of all to build confidence,” he says. “Switching from a proprietary RTOS to Linux means that companies must introduce new strategies and processes in order to interact with a community.” - OSADL对RTL的支持经历了三个阶段:拥护和推广,测试和质量评估,以及最后的资金支持。Emde表示,在早期,OSADL的角色仅限于写写推广的文章,制作专题报告,组织相关培训,以及“宣传”RTL的优点。他说:“要让一个相当保守的工控行业接受象Linux之类的新技术及其基于社区的那种开发模式,首先就需要建立其对新事物的信心。从使用专有的实时操作系统转向改用Linux对公司意味着必须引入新的战略和流程,才能与社区进行互动。” -Later, OSADL moved on to providing technical performance data, establishing [a quality assessment and testing center][10], and providing assistance to its industrial members in open source legal compliance and safety certifications. - 后来,OSADL改而提供技术性能数据,建立[质量评估和测试中心][10],并在和开源相关的法律事务问题和安全认证方面向行业成员提供帮助。 -As RTL grew more mature, pulling even with the fading Windows CE in real-time capabilities and increasingly [cutting into RTOS market share][11], rival real-time Linux projects – principally [Xenomai][12] – have begun to integrate with it. - 当RTL在实时性上变得愈加成熟的同时,相反地Windows CE却是江河日下,[其市场份额正在快速地被RTL所蚕食][11],一些与RTL竞争的实时Linux项目,主要是[Xenomai][12]也已开始集成RTL。 -“The success of the RT patches, and the clear prospective that they would eventually be merged completely, has led to a change of focus at Xenomai,” says Emde. “Xenomai 3.0 can be used in combination with the RT patches and provide so-called ‘skins’ that allow you to recycle real-time source code that was written for other systems. They haven’t been completely unified, however, since Xenomai uses a dual kernel approach whereas the RT patches apply only to a single Linux kernel.” - “伴随RTL补丁的成功发展,以及明确的预期其最终会被集成到Linux内核主线代码中,导致Xenomai关注的重心发生了变化,”Emde说。 “Xenomai 3.0可与RT补丁结合起来使用,并提供了所谓的‘皮肤’,(译者注:一个封装层),使我们可以复用为其他系统编写的代码。不过,它们还没有完全统一起来,因为Xenomai使用了双内核方法,而RT补丁只适用于单一的Linux内核。“ -In more recent years, the RTL group’s various funding sources have dropped off, and OSADL took on that role, too. “When the development recently slowed down a bit because of a lack of funding, OSADL started its third milestone by directly funding Thomas Gleixner's work,” says Emde. - 近些年来,RTL项目的资助来源越来越少,所以最终OSADL接过了这个重任。Emde说:“当最近开发工作因缺少资金而陷入停滞时,OSADL对RTL的支持进入到第三个重大阶段:开始直接资助Thomas Gleixner的工作。” -As Emde wrote in an [Oct. 5 blog entry][13], the growing expansion of Real-Time Linux beyond its core industrial base to areas like automotive and telecom suggested that the funding should be expanded as well. “It would not be entirely fair to let the automation industry fund the complete remaining work on its own, since other industries such as telecommunication also rely on the availability of a deterministic Linux kernel,” wrote Emde. - 正如Emde在其[10月5日的一篇博文][13]中所描述的那样,实时Linux的应用领域正在日益扩大,由其原来主要服务的工业控制扩大到了汽车行业和电信业等领域,这表明资助的来源也应该得到拓宽。Emde原文写道:“仅仅靠来自工控行业的资金来支撑全部的工作是不合理的,因为电信等其他行业也在享用实时Linux内核。” -When the Linux Foundation showed interest in expanding its funding role, OSADL decided it would be “much more efficient to have a single funding and control channel,” says Emde. He adds, however, that as a Gold member, OSADL is still participating in the oversight of the project, and will continue its advocacy and quality assurance activities. - 当Linux基金会表明有兴趣提供资金支持时,OSADL认为“单一的资助和控制渠道要有效得多”(译者注:指最终由Linux基金会全盘接手了RTL项目),Emde如是说。不过,他补充说,作为黄金级成员,OSADL仍参与监管项目的工作,会继续从事其宣传和质量保证方面的活动。 -### Automotive Looks for Real-Time Boost ### ###汽车行业期待RTL的崛起### -RTL will continue to see its greatest growth in industrial applications where it will gradually replace RTOS applications, says Emde. Yet, it is also growing quickly in automotive, and will later spread to railway and avionics, he adds. - Emde表示,RTL会继续在工业应用领域飞速发展并逐渐取代其他实时操作系统。而且,他补充说,RTL在汽车行业发展也很迅猛,以后会扩大并应用到铁路和航空电子设备上。 -Indeed, the growing role of Linux in automotive appears to be key to the Linux Foundation’s goals for RTL, with potential collaborations with its [Automotive Grade Linux][14] (AGL) workgroup. Automotive may also be the chief motivator for Google’s high-profile participation, speculates Emde. In addition, TI is deeply involved with automotive with its Jacinto processors. - 的确,Linux在汽车行业将扮演越来越重要的角色,这也是Linux基金对RTL所寄予厚望的原因之所在。RTL工作组可能会与Linux基金会旗下的[车载Linux(Automotive Grade Linux,简称AGL)][14]工作组展开合作。Emde猜测,Google高调参与的主要动因可能也是希望将RTL用于汽车控制。此外,德州仪器(TI)也非常期望将其Jacinto处理器应用于汽车行业。 -Linux-oriented automotive projects like AGL aim to move Linux beyond in-vehicle infotainment (IVI) into cluster controls and telematics where RTOSes like QNX dominate. Autonomous vehicles are even in greater need of real-time performance. - 面向车载Linux的项目(比如AGL)的目标是要扩大Linux在车载设备上的应用范围,其应用不是仅限于车载信息娱乐(In-Vehicle Infotainment,简称IVI),而是要进入到譬如集群控制和车载通讯领域,而这些领域目前主要使用的是QNX之类的实时操作系统。无人驾驶汽车在实时性上对操作系统也有很高的要求。 -Emde notes that OSADL's [SIL2LinuxMP][15] project may play an important role in extending RTL into automotive. SIL2LinuxMP is not an automotive-specific project, but BMW is participating, and automotive is one of the key applications. The project aims to certify base components required for RTL to run on a single- or multi-core COTS board. It defines bootloader, root filesystem, Linux kernel, and C library bindings to access RTL. - Emde特别指出,OSADL的[SIL2LinuxMP][15]项目可能会在将RTL引入到汽车工业领域上扮演重要的角色。SIL2LinuxMP并不是专门针对汽车工业的项目,但随着BMW公司参与其中,汽车行业成为其很重要的应用领域之一。该项目的目标在于验证RTL在采用单核或多核CPU的标准化商用(Commercial Off-The-Shelf,简称COTS)板卡上运行所需的基本组件。它定义了引导程序、根文件系统、Linux内核以及对应支持RTL的C库。 -Autonomous drones and robots are also ripe for real-time, and Xenomai is already used in many robots, as well as some drones. Yet, RTL’s role will be limited in the wider embedded Linux world of consumer electronics and Internet of Things applications. The main barrier is the latency of wireless communications and the Internet itself. - 无人机和机器人使用实时Linux的时机也已成熟,Xenomai系统早已用在许多机器人以及一些无人机中。不过,在更广泛的嵌入式Linux世界,包括了消费电子产品和物联网应用中,RTL可以扮演的角色很有限。主要的障碍在于,无线通信和互联网本身会带来延迟。 -“Real-time Linux will have a role within machine control and between machines and peripheral devices, but less between remote machines,” says Emde. “Real-time via Internet will probably never be possible.” - Emde说:“目前实时Linux主要还是应用于系统内部控制以及系统与周边外设之间的控制,在远程控制机器上作用不大。企图通过互联网实现实时控制恐怕不是一件可行的事情。” -------------------------------------------------------------------------------- From 2cab6a8014d889008574217b597c59a52dfbd6fc Mon Sep 17 00:00:00 2001 From: unicornx Date: Mon, 19 Oct 2015 23:24:26 +0800 Subject: [PATCH 2307/2517] ready for PR --- ...20151015 New Collaborative Group to Speed Real-Time Linux.md | 2 -- 1 file changed, 2 deletions(-) rename {sources => translated}/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md (99%) diff --git a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md b/translated/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md similarity index 99% rename from sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md rename to translated/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md index 2729a61e0b..e3650558c6 100644 --- a/sources/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md +++ b/translated/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md @@ -1,5 +1,3 @@ -unicornx 翻译中... ... - 新的合作组将加速实时Linux的发展 ================================================================================ ![](http://www.linux.com/images/stories/66866/Tux-150.png) From 463beaf53e241c563a91c0d668ef3408909d4b2a Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 20 Oct 2015 09:50:34 +0800 Subject: [PATCH 2308/2517] =?UTF-8?q?20151020-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0 19 Years of KDE History--Step by Step.md | 220 ++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 sources/talk/20101020 19 Years of KDE History--Step by Step.md diff --git a/sources/talk/20101020 19 Years of KDE History--Step by Step.md b/sources/talk/20101020 19 Years of KDE History--Step by Step.md new file mode 100644 index 0000000000..b5abb96572 --- /dev/null +++ b/sources/talk/20101020 19 Years of KDE History--Step by Step.md @@ -0,0 +1,220 @@ +19 Years of KDE History: Step by Step +================================================================================ +注:youtube 视频 + + +### Introduction ### + +KDE – one of most functional desktop environment ever. It’s open source and free for use. 19 years ago, 14 october 1996 german programmer Matthias Ettrich has started a development of this beautiful environment. KDE provides the shell and many applications for everyday using. Today KDE uses the hundred thousand peoples over the world on Unix and Windows operating system. 19 years – serious age for software projects. Time to return and see how it begin. + +K Desktop Environment has some new aspects: new design, good look & feel, consistency, easy to use, powerful applications for typical desktop work and special use cases. Name “KDE” is an easy word hack with “Common Desktop Environment”, “K” – “Cool”. The first KDE version used proprietary Trolltech’s Qt framework (parent of Qt) with dual licensing: open source QPL(Q public license) and proprietary commercial license. In 2000 Trolltech released some Qt libraries under GPL; Qt 4.5 was released in LGPL 2.1. Since 2009 KDE is compiled for three products: Plasma Workspaces (Shell), KDE Applications, KDE Platform as KDE Software compilation. + +### Releases ### + +#### Pre-Release – 14 October 1996 #### + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/0b3.png) + +Kool Desktop Environment. Word “Kool” will be dropped in future. In the beginning, all components were released to the developer community separately without any coordinated timeframe throughout the overall project. First communication of KDE via mailing list, that was called kde@fiwi02.wiwi.uni-Tubingen.de. + +#### KDE 1.0 – July 12, 1998 #### + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/10.png) + +This version received mixed reception. Many criticized the use of the Qt software framework – back then under the FreeQt license which was claimed to not be compatible with free software – and advised the use of Motif or LessTif instead. Despite that criticism, KDE was well received by many users and made its way into the first Linux distributions. + +![28 January 1999](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/11.png) + +28 January 1999 + +An update, **K Desktop Environment 1.1**, was faster, more stable and included many small improvements. It also included a new set of icons, backgrounds and textures. Among this overhauled artwork was a new KDE logo by Torsten Rahn consisting of the letter K in front of a gear which is used in revised form to this day. + +#### KDE 2.0 – October 23, 2000 #### + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/20.png) + +Major updates: * DCOP (Desktop COmmunication Protocol), a client-to-client communications protocol * KIO, an application I/O library. * KParts, a component object model * KHTML, an HTML 4.0 compliant rendering and drawing engine + +![26 February 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/21.png) + +26 February 2001 + +**K Desktop Environment 2.1** release inaugurated the media player noatun, which used a modular, plugin design. For development, K Desktop Environment 2.1 was bundled with KDevelop. + +![15 August 2001](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/22.png) + +15 August 2001 + +The **KDE 2.2** release featured up to a 50% improvement in application startup time on GNU/Linux systems and increased stability and capabilities for HTML rendering and JavaScript; some new features in KMail. + +#### KDE 3.0 – April 3, 2002 #### + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/30.png) + +K Desktop Environment 3.0 introduced better support for restricted usage, a feature demanded by certain environments such as kiosks, Internet cafes and enterprise deployments, which disallows the user from having full access to all capabilities of a piece of software. + +![28 January 2003](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/31.png) + +28 January 2003 + +**K Desktop Environment 3.1** introduced new default window (Keramik) and icon (Crystal) styles as well as several feature enhancements. + +![3 February 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/32.png) + +3 February 2004 + +**K Desktop Environment 3.2** included new features, such as inline spell checking for web forms and emails, improved e-mail and calendaring support, tabs in Konqueror and support for Microsoft Windows desktop sharing protocol (RDP). + +![19 August 2004](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/33.png) + +19 August 2004 + +**K Desktop Environment 3.3** focused on integrating different desktop components. Kontact was integrated with Kolab, a groupware application, and Kpilot. Konqueror was given better support for instant messaging contacts, with the capability to send files to IM contacts and support for IM protocols (e.g., IRC). + +![16 March 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/34.png) + +16 March 2005 + +**K Desktop Environment 3.4** focused on improving accessibility. The update added a text-to-speech system with support for Konqueror, Kate, KPDF, the standalone application KSayIt and text-to-speech synthesis on the desktop. + +![29 November 2005](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/35.png) + +29 November 2005 + +**The K Desktop Environment 3.5** release added SuperKaramba, which provides integrated and simple-to-install widgets to the desktop. Konqueror was given an ad-block feature and became the second web browser to pass the Acid2 CSS test. + +#### KDE SC 4.0 – January 11, 2008 #### + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/400.png) + +The majority of development went into implementing most of the new technologies and frameworks of KDE 4. Plasma and the Oxygen style were two of the biggest user-facing changes. Dolphin replaces Konqueror as file manager, Okular – default document viewer. + +![29 July 2008](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/401.png) + +29 July 2008 + +**KDE 4.1** includes a shared emoticon theming system which is used in PIM and Kopete, and DXS, a service that lets applications download and install data from the Internet with one click. Also introduced are GStreamer, QuickTime 7, and DirectShow 9 Phonon backends. New applications: * Dragon Player * Kontact * Skanlite – software for scanners * Step – physics simulator * New games: Kdiamond, Kollision, KBreakout and others + +![27 January 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/402.png) + +27 January 2009 + +**KDE 4.2** is considered a significant improvement beyond KDE 4.1 in nearly all aspects, and a suitable replacement for KDE 3.5 for most users. + +![4 August 2009](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/403.png) + +4 August 2009 + +**KDE 4.3** fixed over 10,000 bugs and implemented almost 2,000 feature requests. Integration with other technologies, such as PolicyKit, NetworkManager & Geolocation services, was another focus of this release. + +![9 February 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/404.png) + +9 February 2010 + +**KDE SC 4.4** is based on version 4.6 of the Qt 4 toolkit. New application – KAddressBook, first release of Kopete. + +![10 August 2010](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/405.png) + +10 August 2010 + +**KDE SC 4.5** has some new features: integration of the WebKit library, an open-source web browser engine, which is used in major browsers such as Apple Safari and Google Chrome. KPackageKit replaced Kpackage. + +![26 January 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/406.png) + +26 January 2011 + +**KDE SC 4.6** has better OpenGL compositing along with the usual myriad of fixes and features. + +![27 July 2011](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/407.png) + +27 July 2011 + +**KDE SC 4.7** has updated KWin with OpenGL ES 2.0 compatible, Qt Quick, Plasma Desktop with many enhancements and a lot of new functions in general applications. 12k bugs if fixed. + +![25 January 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/408.png) + +25 January 2012 + +**KDE SC 4.8**: better KWin performance and Wayland support, new design of Doplhin. + +![1 August 2012](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/409.png) + +1 August 2012 + +**KDE SC 4.9**: several improvements to the Dolphin file manager, including the reintroduction of in-line file renaming, back and forward mouse buttons, improvement of the places panel and better usage of file metadata. + +![6 February 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/410.png) + +6 February 2013 + +**KDE SC 4.10**: many of the default Plasma widgets were rewritten in QML, and Nepomuk, Kontact and Okular received significant speed improvements. + +![14 August 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/411.png) + +14 August 2013 + +**KDE SC 4.11**: Kontact and Nepomuk received many optimizations. The first generation Plasma Workspaces entered maintenance-only development mode. + +![18 December 2013](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/412.png) + +18 December 2013 + +**KDE SC 4.12**: Kontact received substantial improvements, many small improvements. + +![16 April 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/413.png) + +18 December 2013 + +**KDE SC 4.13**: Nepomuk semantic desktop search was replaced with KDE’s in house Baloo. KDE SC 4.13 was released in 53 different translations. + +![20 August 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/414.png) + +18 December 2013 + +**KDE SC 4.14**: he release primarily focused on stability, with numerous bugs fixed and few new features added. This was the final KDE SC 4 release. + +#### KDE Plasma 5.0 – July 15, 2014 #### + +![](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/500.png) + +KDE Plasma 5 – 5th generation of KDE. Massive impovements in design and system, new default theme – Breeze, complete migration to QML, better performance with OpenGL, better HiDPI displays support. + +![11 November 2014](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/501.png) + +11 November 2014 + +**KDE Plasma 5.1**: Ported missing features from Plasma 4. + +![27 January 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/502.png) + +27 January 2015 + +**KDE Plasma 5.2**: New components: BlueDevil, KSSHAskPass, Muon, SDDM theme configuration, KScreen, GTK+ style configuration and KDecoration. + +![28 April 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/503.png) + +28 April 2015 + +**KDE Plasma 5.3**: Tech preview of Plasma Media Center. New Bluetooth and touchpad applets. Enhanced power management. + +![25 August 2015](https://github.com/paulcarroty/Articles/raw/master/KDE_History/im/504.png) + +25 August 2015 + +**KDE Plasma 5.4**: Initial Wayland session, new QML-based audio volume applet, and alternative full-screen application launcher. + +Big thanks to the [KDE][1] developers and community, Wikipedia for [descriptions][2] and all my readers. Be free and use the open source software like a KDE. + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/kde-history/ + +作者:[Pavlo RudyiCategories][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/author/paul/ +[1]:https://www.kde.org/ +[2]:https://en.wikipedia.org/wiki/KDE_Plasma_5 \ No newline at end of file From f5cac98fe5f4330188ffef002c9e22636c2f2f03 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 20 Oct 2015 10:18:04 +0800 Subject: [PATCH 2309/2517] translating --- ...h Answers--How to install Ubuntu desktop behind a proxy.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md index 217f9ebcda..609fc8643d 100644 --- a/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md +++ b/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md @@ -1,3 +1,5 @@ +translating---geekpi + Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy ================================================================================ > **Question:** My computer is connected to a corporate network sitting behind an HTTP proxy. When I try to install Ubuntu desktop on the computer from a CD-ROM drive, the installation hangs and never finishes while trying to retrieve files, which is presumably due to the proxy. However, the problem is that Ubuntu installer never asks me to configure proxy during installation procedure. Then how can I install Ubuntu desktop behind a proxy? @@ -58,4 +60,4 @@ via: http://ask.xmodulo.com/install-ubuntu-desktop-behind-proxy.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 1d4726b9c8e14ab69619ddecd47f8e1f67a37028 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 20 Oct 2015 10:37:34 +0800 Subject: [PATCH 2310/2517] translated --- ...o install Ubuntu desktop behind a proxy.md | 63 ------------------- ...o install Ubuntu desktop behind a proxy.md | 61 ++++++++++++++++++ 2 files changed, 61 insertions(+), 63 deletions(-) delete mode 100644 sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md create mode 100644 translated/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md diff --git a/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md deleted file mode 100644 index 609fc8643d..0000000000 --- a/sources/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md +++ /dev/null @@ -1,63 +0,0 @@ -translating---geekpi - -Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy -================================================================================ -> **Question:** My computer is connected to a corporate network sitting behind an HTTP proxy. When I try to install Ubuntu desktop on the computer from a CD-ROM drive, the installation hangs and never finishes while trying to retrieve files, which is presumably due to the proxy. However, the problem is that Ubuntu installer never asks me to configure proxy during installation procedure. Then how can I install Ubuntu desktop behind a proxy? - -Unlike Ubuntu server, installation of Ubuntu desktop is pretty much auto-pilot, not leaving much room for customization, such as custom disk partitioning, manual network settings, package selection, etc. While such simple, one-shot installation is considered user-friendly, it leaves much to be desired for those users looking for "advanced installation mode" to customize their Ubuntu desktop installation. - -In addition, one big problem of the default Ubuntu desktop installer is the absense of proxy settings. If your computer is connected behind a proxy, you will notice that Ubuntu installation gets stuck while preparing to download files. - -![](https://c2.staticflickr.com/6/5683/22195372232_cea81a5e45_c.jpg) - -This post describes how to get around the limitation of Ubuntu installer and **install Ubuntu desktop when you are behind a proxy**. - -The basic idea is as follows. Instead of starting with Ubuntu installer directly, boot into live Ubuntu desktop first, configure proxy settings, and finally launch Ubuntu installer manually from live desktop. The following is the step by step procedure. - -After booting from Ubuntu desktop CD/DVD or USB, click on "Try Ubuntu" on the first welcome screen. - -![](https://c1.staticflickr.com/1/586/22195371892_3816ba09c3_c.jpg) - -Once you boot into live Ubuntu desktop, click on Settings icon in the left. - -![](https://c1.staticflickr.com/1/723/22020327738_058610c19d_c.jpg) - -Go to Network menu. - -![](https://c2.staticflickr.com/6/5675/22021212239_ba3901c8bf_c.jpg) - -Configure proxy settings manually. - -![](https://c1.staticflickr.com/1/735/22020025040_59415e0b9a_c.jpg) - -Next, open a terminal. - -![](https://c2.staticflickr.com/6/5642/21587084823_357b5c48cb_c.jpg) - -Enter a root session by typing the following: - - $ sudo su - -Finally, type the following command as the root. - - # ubiquity gtk_ui - -This will launch GUI-based Ubuntu installer as follows. - -![](https://c1.staticflickr.com/1/723/22020025090_cc64848b6c_c.jpg) - -Proceed with the rest of installation. - -![](https://c1.staticflickr.com/1/628/21585344214_447020e9d6_c.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/install-ubuntu-desktop-behind-proxy.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://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/translated/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md new file mode 100644 index 0000000000..6e1a0de7cb --- /dev/null +++ b/translated/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md @@ -0,0 +1,61 @@ +Linux有问必答--如何在代理中安装Ubuntu +================================================================================ +> **提问:** 我的电脑连接到的是使用HTTP代理的公司网络。当我想使用CD-ROM安装Ubuntu时,安装在尝试获取文件时被停滞了,可能是由于代理的原因。然而问题是Ubuntu的安装程序从来没有在安装过程中提示我配置代理。我该怎样在代理中安装Ubuntu桌面版? + +不像Ubuntu服务器版,Ubuntu桌面版的安装非常自动化,没有留下太多的自定义空间,就像自定义磁盘分区,手动网络设置,包选择等等。虽然这种简单的,一键安装被认为是用户友好的,但却是那些寻找“高级安装模式”来定制自己的Ubuntu桌面安装的用户不希望的。 + +除此之外,默认的Ubuntu桌面版安装器的一个大问题是缺少代理设置。如果你电脑在代理后面,你会看到Ubuntu在准备下载文件的时候停滞了。 + +![](https://c2.staticflickr.com/6/5683/22195372232_cea81a5e45_c.jpg) + +这篇文章描述了如何解除Ubuntu安装限制以及**如何在代理中安装Ubuntu桌面**。 + +基本的想打是这样的。首先启动到live Ubuntu桌面中而不是直接启动Ubuntu安装器,配置代理设置并且手动在live Ubuntu中启动Ubuntu安装器。下面是步骤。 + +从Ubuntu桌面版CD/DVD或者USB启动后,在欢迎页面点击“Try Ubuntu”。 + +![](https://c1.staticflickr.com/1/586/22195371892_3816ba09c3_c.jpg) + +当你进入live Ubuntu后,点击左边的设置图标。 + +![](https://c1.staticflickr.com/1/723/22020327738_058610c19d_c.jpg) + +进入网络菜单。 + +![](https://c2.staticflickr.com/6/5675/22021212239_ba3901c8bf_c.jpg) + +手动配置代理 + +![](https://c1.staticflickr.com/1/735/22020025040_59415e0b9a_c.jpg) + +接下来,打开终端。 + +![](https://c2.staticflickr.com/6/5642/21587084823_357b5c48cb_c.jpg) + +输入下面的命令进入root会话。 + + $ sudo su + +最后以root权限输入下面的命令。 + + # ubiquity gtk_ui + +它会启动基于GUI的Ubuntu安装器。 + +![](https://c1.staticflickr.com/1/723/22020025090_cc64848b6c_c.jpg) + +接着完成剩余的安装。 + +![](https://c1.staticflickr.com/1/628/21585344214_447020e9d6_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-ubuntu-desktop-behind-proxy.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From 5d5a502e27804b732cdbc4abf3ba1196185cfe5c Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 20 Oct 2015 11:44:07 +0800 Subject: [PATCH 2311/2517] Delete 20151019 10 passwd command examples in Linux.md --- ...019 10 passwd command examples in Linux.md | 147 ------------------ 1 file changed, 147 deletions(-) delete mode 100644 sources/tech/20151019 10 passwd command examples in Linux.md diff --git a/sources/tech/20151019 10 passwd command examples in Linux.md b/sources/tech/20151019 10 passwd command examples in Linux.md deleted file mode 100644 index c723992c89..0000000000 --- a/sources/tech/20151019 10 passwd command examples in Linux.md +++ /dev/null @@ -1,147 +0,0 @@ -translation by strugglingyouth -10 passwd command examples in Linux -================================================================================ -As the name suggest **passwd** command is used to change the password of system users. If the passwd command is executed by non-root user then it will ask for the current password and then set the new password of a user who invoked the command. When this command is executed by super user or root then it can reset the password for any user including root without knowing the current password. - -In this post we will discuss passwd command with practical examples. - -#### Syntax : #### - - # passwd {options} {user_name} - -Different options that can be used in passwd command are listed below : - -![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-command-options.jpg) - -### Example:1 Change Password of System Users ### - -When you logged in as non-root user like ‘linuxtechi’ in my case and run passwd command then it will reset password of logged in user. - - [linuxtechi@linuxworld ~]$ passwd - Changing password for user linuxtechi. - Changing password for linuxtechi. - (current) UNIX password: - New password: - Retype new password: - passwd: all authentication tokens updated successfully. - [linuxtechi@linuxworld ~]$ - -When you logged in as root user and run **passwd** command then it will reset the root password by default and if you specify the user-name after passwd command then it will change the password of that user. - - [root@linuxworld ~]# passwd - [root@linuxworld ~]# passwd linuxtechi - -![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-command.jpg) - -**Note** : System user’s password is stored in an encrypted form in /etc/shadow file. - -### Example:2 Display Password Status Information. ### - -To display password status information of a user , use **-S** option in passwd command. - - [root@linuxworld ~]# passwd -S linuxtechi - linuxtechi PS 2015-09-20 0 99999 7 -1 (Password set, SHA512 crypt.) - [root@linuxworld ~]# - -In the above output first field shows the user name and second field shows Password status ( **PS = Password Set , LK = Password locked , NP = No Password** ), third field shows when the password was changed and last & fourth field shows minimum age, maximum age, warning period, and inactivity period for the password - -### Example:3 Display Password Status info for all the accounts ### - -To display password status info for all the accounts use “**-aS**” option in passwd command, example is shown below : - - root@localhost:~# passwd -Sa - -![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-sa.jpg) - -### Example:4 Removing Password of a User using -d option ### - -In my case i am removing/ deleting the password of ‘**linuxtechi**‘ user. - - [root@linuxworld ~]# passwd -d linuxtechi - Removing password for user linuxtechi. - passwd: Success - [root@linuxworld ~]# - [root@linuxworld ~]# passwd -S linuxtechi - linuxtechi NP 2015-09-20 0 99999 7 -1 (Empty password.) - [root@linuxworld ~]# - -“**-d**” option will make user’s password empty and will disable user’s account. - -### Example:5 Set Password Expiry Immediately ### - -Use ‘-e’ option in passwd command to expire user’s password immediately , this will force the user to change the password in the next login. - - [root@linuxworld ~]# passwd -e linuxtechi - Expiring password for user linuxtechi. - passwd: Success - [root@linuxworld ~]# passwd -S linuxtechi - linuxtechi PS 1970-01-01 0 99999 7 -1 (Password set, SHA512 crypt.) - [root@linuxworld ~]# - -Now Try to ssh machine using linuxtechi user. - -![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-expiry.jpg) - -### Example:6 Lock the password of System User ### - -Use ‘**-l**‘ option in passwd command to lock a user’s password, it will add “!” at starting of user’s password. A User can’t Change it’s password when his/her password is locked. - - [root@linuxworld ~]# passwd -l linuxtechi - Locking password for user linuxtechi. - passwd: Success - [root@linuxworld ~]# passwd -S linuxtechi - linuxtechi LK 2015-09-20 0 99999 7 -1 (Password locked.) - [root@linuxworld ~]# - -### Example:7 Unlock User’s Password using -u option ### - - [root@linuxworld ~]# passwd -u linuxtechi - Unlocking password for user linuxtechi. - passwd: Success - [root@linuxworld ~]# - -### Example:8 Setting inactive days using -i option ### - --i option in passwd command is used to set inactive days for a system user. This will come into the picture when password of user ( in my case linuxtechi) expired and user didn’t change its password in ‘**n**‘ number of days ( i.e 10 days in my case) then after that user will not able to login. - - [root@linuxworld ~]# passwd -i 10 linuxtechi - Adjusting aging data for user linuxtechi. - passwd: Success - [root@linuxworld ~]# - [root@linuxworld ~]# passwd -S linuxtechi - linuxtechi PS 2015-09-20 0 99999 7 10 (Password set, SHA512 crypt.) - [root@linuxworld ~]# - -### Example:9 Set Minimum Days to Change Password using -n option. ### - -In the below example linuxtechi user has to change the password in 90 days. A value of zero shows that user can change it’s password in any time. - - [root@linuxworld ~]# passwd -n 90 linuxtechi - Adjusting aging data for user linuxtechi. - passwd: Success - [root@linuxworld ~]# passwd -S linuxtechi - linuxtechi PS 2015-09-20 90 99999 7 10 (Password set, SHA512 crypt.) - [root@linuxworld ~]# - -### Example:10 Set Warning days before password expire using -w option ### - -‘**-w**’ option in passwd command is used to set warning days for a user. It means a user will be warned for n number of days that his/her password is going to expire. - - [root@linuxworld ~]# passwd -w 12 linuxtechi - Adjusting aging data for user linuxtechi. - passwd: Success - [root@linuxworld ~]# passwd -S linuxtechi - linuxtechi PS 2015-09-20 90 99999 12 10 (Password set, SHA512 crypt.) - [root@linuxworld ~]# - --------------------------------------------------------------------------------- - -via: http://www.linuxtechi.com/10-passwd-command-examples-in-linux/ - -作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxtechi.com/author/pradeep/ From 7433a102cd989741db18e5500f87a0855a88e1f5 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 20 Oct 2015 11:45:07 +0800 Subject: [PATCH 2312/2517] Create 20151019 10 passwd command examples in Linux.md --- ...019 10 passwd command examples in Linux.md | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 translated/tech/20151019 10 passwd command examples in Linux.md diff --git a/translated/tech/20151019 10 passwd command examples in Linux.md b/translated/tech/20151019 10 passwd command examples in Linux.md new file mode 100644 index 0000000000..0f9f1f3827 --- /dev/null +++ b/translated/tech/20151019 10 passwd command examples in Linux.md @@ -0,0 +1,150 @@ + +在 Linux 中 passwd 命令的10个示例 +================================================================================ + +正如 **passwd** 命令的名称所示,其用于改变系统用户的密码。如果 passwd 命令由非 root 用户执行,那么它会询问当前用户的密码,然后设置调用命令用户的新密码。当此命令由超级用户 root 执行的话,就可以重新设置任何用户的密码,包括不知道当前密码的用户。 + +在这篇文章中,我们将讨论 passwd 命令实际的例子。 + +#### 语法 : #### + + # passwd {options} {user_name} + +可以在 passwd 命令使用不同的选项,列表如下: + +![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-command-options.jpg) + +### 例1:更改系统用户的密码 ### + +当你使用非 root 用户登录时,像我使用 ‘linuxtechi’ 登录的情况下,运行 passwd 命令它会重置当前登录用户的密码。 + + [linuxtechi@linuxworld ~]$ passwd + Changing password for user linuxtechi. + Changing password for linuxtechi. + (current) UNIX password: + New password: + Retype new password: + passwd: all authentication tokens updated successfully. + [linuxtechi@linuxworld ~]$ + +当你作为 root 用户登录后并运行 **passwd** 命令时,它默认情况下会重新设置 root 的密码,如果你在 passwd 命令后指定了用户名,它会重置该用户的密码。 + + [root@linuxworld ~]# passwd + [root@linuxworld ~]# passwd linuxtechi + +![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-command.jpg) + +**注意** : 系统用户的密码以加密的形式保存在 /etc/shadow 文件中。 + +### 例2:显示密码状态信息 ### + +要显示用户密码的状态信息,请在 passwd 命令后使用 **-S** 选项。 + + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 0 99999 7 -1 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +在上面的输出中,第一个字段显示的用户名,第二个字段显示密码状态(**PS = 密码设置,LK = 密码锁定,NP = 无密码**),第三个字段显示了当密码被改变,后面的字段分别显示了密码能更改的最小期限和最大期限,超过更改期能使用的最大期限,最后的为过期禁用天数。 + +### 例3:显示所有账号的密码状态信息 ### + +为了显示所有用户密码的状态信息需要使用 “**-aS**”选项在passwd 命令中,示例如下所示: + + root@localhost:~# passwd -Sa + +![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-sa.jpg) + +(LCTT译注:CentOS6.6 没有测试成功,但 Ubuntu 可以。) + +### 例4:使用 -d 选项删除用户的密码 ### + +就我而言,我删除 ‘**linuxtechi**‘ 用户的密码。 + + [root@linuxworld ~]# passwd -d linuxtechi + Removing password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi NP 2015-09-20 0 99999 7 -1 (Empty password.) + [root@linuxworld ~]# + +“**-d**” 选项将使用户的密码为空,并禁用用户登录。 + +### 例5:设置密码立即过期 ### + +在 passwd 命令中使用 '-e' 选项会立即使用户的密码过期,这将强制用户在下次登录时更改密码。 + + [root@linuxworld ~]# passwd -e linuxtechi + Expiring password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 1970-01-01 0 99999 7 -1 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +现在尝试用 linuxtechi 用户 SSH 到主机。 + +![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-expiry.jpg) + +### 例6:锁定系统用户的密码 ### + +在 passwd 命令中使用 ‘**-l**‘ 选项能锁定用户的密码,它会在密码的起始位置加上“!”。当他/她的密码被锁定时,用户将不能更改它的密码。 + + [root@linuxworld ~]# passwd -l linuxtechi + Locking password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi LK 2015-09-20 0 99999 7 -1 (Password locked.) + [root@linuxworld ~]# + +### 例7:使用 -u 选项解锁用户密码 ### + + [root@linuxworld ~]# passwd -u linuxtechi + Unlocking password for user linuxtechi. + passwd: Success + [root@linuxworld ~]# + +### 例8:使用 -i 选项设置非活动时间 ### + +在 passwd 命令中使用 -i 选项用于设系统用户的非活动时间。当用户(我使用的是linuxtechi用户)密码过期后,用户再经过 ‘**n**‘ 天后(在我的情况下是10天)没有更改其密码,用户将不能登录。 + + [root@linuxworld ~]# passwd -i 10 linuxtechi + Adjusting aging data for user linuxtechi. + passwd: Success + [root@linuxworld ~]# + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 0 99999 7 10 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +### 例9:使用 -n 选项设置密码更改的最短时间 ### + +在下面的例子中,linuxtechi用户必须在90天内更改密码。0表示用户可以在任何时候更改它的密码。 + + [root@linuxworld ~]# passwd -n 90 linuxtechi + Adjusting aging data for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 90 99999 7 10 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +### 例10:使用 -w 选项设置密码过期前的警告期限 ### + +‘**-w**’ 选项在 passwd 命令中用于设置用户的警告期限。这意味着,n天之后,他/她的密码将过期。 + + [root@linuxworld ~]# passwd -w 12 linuxtechi + Adjusting aging data for user linuxtechi. + passwd: Success + [root@linuxworld ~]# passwd -S linuxtechi + linuxtechi PS 2015-09-20 90 99999 12 10 (Password set, SHA512 crypt.) + [root@linuxworld ~]# + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/10-passwd-command-examples-in-linux/ + +作者:[Pradeep Kumar][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ From cbb89d26a85a973c25c4ebb0a4ed356dbad7dbd6 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 20 Oct 2015 11:53:17 +0800 Subject: [PATCH 2313/2517] =?UTF-8?q?20151020-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...gn and Software Evolution--Step by Step.md | 199 ++++++++++ ...rs of LibreOffice Evolution (2010-2015).md | 83 ++++ ...20 Linux History--24 Years Step by Step.md | 299 ++++++++++++++ sources/tech/20151020 how to h2 in apache.md | 375 ++++++++++++++++++ 4 files changed, 956 insertions(+) create mode 100644 sources/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md create mode 100644 sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md create mode 100644 sources/talk/20151020 Linux History--24 Years Step by Step.md create mode 100644 sources/tech/20151020 how to h2 in apache.md diff --git a/sources/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md b/sources/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md new file mode 100644 index 0000000000..174fc55262 --- /dev/null +++ b/sources/talk/20151020 18 Years of GNOME Design and Software Evolution--Step by Step.md @@ -0,0 +1,199 @@ +18 Years of GNOME Design and Software Evolution: Step by Step +================================================================================ +注:youtube 视频 + + +[GNOME][1] (GNU Object Model Environment) was started on August 15th 1997 by two Mexican programmers – Miguel de Icaza and Federico Mena. GNOME – Free Software project to develop a desktop environment and applications by volunteers and paid full-time developers. All of GNOME Desktop Environment is the open source software and support Linux, FreeBSD, OpenBSD and others. + +Now we move to 1997 and see the first version of GNOME: + +### GNOME 1 ### + +![GNOME 1.0 - First major GNOME release](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/1.0/gnome.png) + +**GNOME 1.0** (1997) – First major GNOME release + +![GNOME 1.2 Bongo](https://raw.githubusercontent.com/paulcarroty/Articles/master/GNOME_History/1.2/1361441938.or.86429.png) + +**GNOME 1.2** “Bongo”, 2000 + +![GNOME 1.4 Tranquility](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/1.4/1.png) + +**GNOME 1.4** “Tranquility”, 2001 + +### GNOME 2 ### + +![GNOME 2.0](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.0/1.png) + +**GNOME 2.0**, 2002 + +Major upgrade based on GTK+2. Introduction of the Human Interface Guidelines. + +![GNOME 2.2](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.2/GNOME_2.2_catala.png) + +**GNOME 2.2**, 2003 + +Multimedia and file manager improvements. + +![GNOME 2.4 Temujin](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.4/gnome-desktop.png) + +**GNOME 2.4** “Temujin”, 2003 + +First release of Epiphany Browser, accessibility support. + +![GNOME 2.6](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.6/Adam_Hooper.png) + +**GNOME 2.6**, 2004 + +Nautilus changes to a spatial file manager, and a new GTK+ file dialog is introduced. A short-lived fork of GNOME, GoneME, is created as a response to the changes in this version. + +![GNOME 2.8](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.8/3.png) + +**GNOME 2.8**, 2004 + +Improved removable device support, adds Evolution + +![GNOME 2.10](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.10/GNOME-Screenshot-2.10-FC4.png) + +**GNOME 2.10**, 2005 + +Lower memory requirements and performance improvements. Adds: new panel applets (modem control, drive mounter and trashcan); and the Totem and Sound Juicer applications. + +![GNOME 2.12](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.12/gnome-livecd.jpg) + +**GNOME 2.12**, 2005 + +Nautilus improvements; improvements in cut/paste between applications and freedesktop.org integration. Adds: Evince PDF viewer; New default theme: Clearlooks; menu editor; keyring manager and admin tools. Based on GTK+ 2.8 with cairo support + +![GNOME 2.14](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.14/debian4-stable.jpg) + +**GNOME 2.14**, 2006 + +Performance improvements (over 100% in some cases); usability improvements in user preferences; GStreamer 0.10 multimedia framework. Adds: Ekiga video conferencing application; Deskbar search tool; Pessulus lockdown editor; Fast user switching; Sabayon system administration tool. + +![GNOME 2.16](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.16/Gnome-2.16-screenshot.png) + +**GNOME 2.16**, 2006 + +Performance improvements. Adds: Tomboy notetaking application; Baobab disk usage analyser; Orca screen reader; GNOME Power Manager (improving laptop battery life); improvements to Totem, Nautilus; compositing support for Metacity; new icon theme. Based on GTK+ 2.10 with new print dialog + +![GNOME 2.18](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.18/Gnome-2.18.1.png) + +**GNOME 2.18**, 2007 + +Performance improvements. Adds: Seahorse GPG security application, allowing encryption of emails and local files; Baobab disk usage analyser improved to support ring chart view; Orca screen reader; improvements to Evince, Epiphany and GNOME Power Manager, Volume control; two new games, GNOME Sudoku and glChess. MP3 and AAC audio encoding. + +![GNOME 2.20](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.20/rnintroduction-screenshot.png) + +**GNOME 2.20**, 2007 + +Tenth anniversary release. Evolution backup functionality; improvements in Epiphany, EOG, GNOME Power Manager; password keyring management in Seahorse. Adds: PDF forms editing in Evince; integrated search in the file manager dialogs; automatic multimedia codec installer. + +![GNOME 2.22, 2008](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.22/GNOME-2-22-2-Released-2.png) + +**GNOME 2.22**, 2008 + +Addition of Cheese, a tool for taking photos from webcams and Remote Desktop Viewer; basic window compositing support in Metacity; introduction of GVFS; improved playback support for DVDs and YouTube, MythTV support in Totem; internationalised clock applet; Google Calendar support and message tagging in Evolution; improvements in Evince, Tomboy, Sound Juicer and Calculator. + +![GNOME 2.24](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.24/gnome-224.jpg) + +**GNOME 2.24**, 2008 + +Addition of the Empathy instant messenger client, Ekiga 3.0, tabbed browsing in Nautilus, better multiple screens support and improved digital TV support. + +![GNOME 2.26](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.26/gnome226-large_001.jpg) + +**GNOME 2.26**, 2009 + +New optical disc recording application Brasero, simpler file sharing, media player improvements, support for multiple monitors and fingerprint reader support. + +![GNOME 2.28](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.28/1.png) + +**GNOME 2.28**, 2009 + +Addition of GNOME Bluetooth module. Improvements to Epiphany web browser, Empathy instant messenger client, Time Tracker, and accessibility. Upgrade to GTK+ version 2.18. + +![GNOME 2.30](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.30/GNOME2.30.png) + +**GNOME 2.30**, 2010 + +Improvements to Nautilus file manager, Empathy instant messenger client, Tomboy, Evince, Time Tracker, Epiphany, and Vinagre. iPod and iPod Touch devices are now partially supported via GVFS through libimobiledevice. Uses GTK+ 2.20. + +![GNOME 2.32](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/2.32/gnome-2-32.png.en_GB.png) + +**GNOME 2.32**, 2010 + +Addition of Rygel and GNOME Color Manager. Improvements to Empathy instant messenger client, Evince, Nautilus file manager and others. 3.0 was intended to be released in September 2010, so a large part of the development effort since 2.30 went towards 3.0. + +### GNOME 3 ### + +![GNOME 3.0](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.0/chat-3-0.png) + +**GNOME 3.0**, 2011 + +Introduction of GNOME Shell. A redesigned settings framework with fewer, more focused options. Topic-oriented help based on the Mallard markup language. Side-by-side window tiling. A new visual theme and default font. Adoption of GTK+ 3.0 with its improved language bindings, themes, touch, and multiplatform support. Removal of long-deprecated development APIs.[73] + +![GNOME 3.2](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.2/gdm.png) + +**GNOME 3.2**, 2011 + +Online accounts support; Web applications support; contacts manager; documents and files manager; quick preview of files in the File Manager; greater integration; better documentation; enhanced looks and various performance improvements. + +![GNOME 3.4](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.4/application-view.png) + +**GNOME 3.4**, 2012 + +New Look for GNOME 3 Applications: Documents, Epiphany (now called Web), and GNOME Contacts. Search for documents from the Activities overview. Application menus support. Refreshed interface components: New color picker, redesigned scrollbars, easier to use spin buttons, and hideable title bars. Smooth scrolling support. New animated backgrounds. Improved system settings with new Wacom panel. Easier extensions management. Better hardware support. Topic-oriented documentation. Video calling and Live Messenger support in Empathy. Better accessibility: Improved Orca integration, better high contrast mode, and new zoom settings. Plus many other application enhancements and smaller details. + +![GNOME 3.6](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.6/gnome-3-6.png) + +**GNOME 3.6**, 2012 + +Refreshed Core components: New applications button and improved layout in the Activities Overview. A new login and lock screen. Redesigned Message Tray. Notifications are now smarter, more noticeable, easier to dismiss. Improved interface and settings for System Settings. The user menu now shows Power Off by default. Integrated Input Methods. Accessibility is always on. New applications: Boxes, that was introduced as a preview version in GNOME 3.4, and Clocks, an application to handle world times. Updated looks for Disk Usage Analyzer, Empathy and Font Viewer. Improved braille support in Orca. In Web, the previously blank start page was replaced by a grid that holds your most visited pages, plus better full screen mode and a beta of WebKit2. Evolution renders email using WebKit. Major improvements to Disks. Revamped Files application (also known as Nautilus), with new features like Recent files and search. + +![GNOME 3.8](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.8/applications-view.png) + +**GNOME 3.8**, 2013 + +Refreshed Core components: A new applications view with frequently used and all apps. An overhauled window layout. New input methods OSD switcher. The Notifications & Messaging tray now react to the force with which the pointer is pressed against the screen edge. Added Classic mode for those who prefer a more traditional desktop experience. The GNOME Settings application features an updated toolbar design. New Initial Setup assistant. GNOME Online Accounts integrates with more services. Web has been upgraded to use the WebKit2 engine. Web has a new private browsing mode. Documents has gained a new dual page mode & Google Documents integration. Improved user interface of Contacts. GNOME Files, GNOME Boxes and GNOME Disks have received a number of improvements. Integration of ownCloud. New GNOME Core Applications: GNOME Clocks and GNOME Weather. + +![GNOME 3.10](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.10/GNOME-3-10-Release-Schedule-2.png) + +**GNOME 3.10**, 2013 + +A reworked system status area, which gives a more focused overview of the system. A collection of new applications, including GNOME Maps, GNOME Notes, GNOME Music and GNOME Photos. New geolocation features, such as automatic time zones and world clocks. HiDPI support[75] and smart card support. D-Bus activation made possible with GLib 2.38 + +![GNOME 3.12](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.12/app-folders.png) + +**GNOME 3.12**, 2014 + +Improved keyboard navigation and window selection in the Overview. Revamped first set-up utility based on usability tests. Wired networking re-added to the system status area. Customizable application folders in the Applications view. Introduction of new GTK+ widgets such as popovers in many applications. New tab style in GTK+. GNOME Videos GNOME Terminal and gedit were given a fresh look, more consistent with the HIG. A search provider for the terminal emulator is included in GNOME Shell. Improvements to GNOME Software and high-density display support. A new sound recorder application. New desktop notifications API. Progress in the Wayland port has reached a usable state that can be optionally previewed. + +![GNOME 3.14](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.14/Top-Features-of-GNOME-3-14-Gallery-459893-2.jpg) + +**GNOME 3.14**, 2014 + +Improved desktop environment animations. Improved touchscreen support. GNOME Software supports managing installed add-ons. GNOME Photos adds support for Google. Redesigned UI for Evince, Sudoku, Mines and Weather. Hitori is added as part of GNOME Games. + +![GNOME 3.16](https://github.com/paulcarroty/Articles/raw/master/GNOME_History/3.16/preview-apps.png) + +**GNOME 3.16**, 2015 + +33,000 changes. Major changes include UI color scheme goes from black to charcoal. Overlay scroll bars added. Improvements to notifications including integration with Calendar applet. Tweaks to various apps including Files, Image Viewer, and Maps. Access to Preview Apps. Continued porting from X11 to Wayland. + +Thanks to [Wikipedia][2] for short changelogs review and another big thanks for GNOME Project! Stay tuned! + + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/18-years-of-gnome-evolution/ + +作者:[Pavlo Rudyi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/author/paul/ +[1]:https://www.gnome.org/ +[2]:https://en.wikipedia.org/wiki/GNOME \ No newline at end of file diff --git a/sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md b/sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md new file mode 100644 index 0000000000..998b725295 --- /dev/null +++ b/sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md @@ -0,0 +1,83 @@ +Five Years of LibreOffice Evolution (2010-2015) +================================================================================ +注:youtube 视频 + + +[LibreOffice][1] – amazing free and open source office suite from The Document Foundation. LO was forked from [OpenOffice.org][2] in September 28, 2010 and OOo is an open-source version of the earlier [StarOffice][3]. The LibreOffice support word processing, the creation and editing of spreadsheets, slideshows, diagrams and drawings, databases, mathematical formulae. + +### Core applications: ### + +- **Writer** – word processor +- **Calc** – spreadsheet app, similar to Excel +- **Impress** – application for presentations, support Microsoft PowerPoint’s format +- **Draw** – vector graphics editor +- **Math** – special application for writing and editing mathematical formulae +- **Base** – database management + +![LibreOffice 3.3, 2011](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.3/Help-License-Info.png) + +LibreOffice 3.3, 2011 + +First version of LibreOffice – fork of OpenOffice.org + +![LibreOffice 3.4](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.4/1cc80d1cada204a061402785b2048f7clibreoffice-3.4.3.png) + +LibreOffice 3.4 + +![LibreOffice 3.5](https://raw.githubusercontent.com/paulcarroty/Articles/master/LO_History/3.5/libreoffice35-large_001.jpg) + +LibreOffice 3.5 + +![LibreOffice 3.6](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.6/libreoffice-3.6.0.png) + +LibreOffice 3.6 + +![Libre Office 4.0](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.0/libreoffice-writer.png) + +LibreOffice 4.0 + +![Libre Office 4.1](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.1/Writer1.png) + +LibreOffice 4.1 + +![Libre Office 4.2](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.2/libreoffice-4.2.png) + +Libre Office 4.2 + +![LibreOffice 4.3](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.3/libreoffice.jpg) + +LibreOffice 4.3 + +![LibreOffice 4.4](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.4/LibreOffice_Writer_4_4_2.png) + +LibreOffice 4.4 + +![Libre Office 5.0](https://github.com/paulcarroty/Articles/raw/master/LO_History/5.0/LibreOffice_Writer_5.0.png) + +LibreOffice 5.0 + +### History of Libre Office from Wikipedia ### + +![StarOffice major derivatives](https://commons.wikimedia.org/wiki/File%3AStarOffice_major_derivatives.svg) + + +### LibreOffice 5.0 Review ### + +注:youtube 视频 + + + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/libreoffice-5years-evolution/ + +作者:[Pavlo Rudyi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/author/paul/ +[1]:http://www.libreoffice.org/ +[2]:https://www.openoffice.org/ +[3]:http://www.staroffice.org/ \ No newline at end of file diff --git a/sources/talk/20151020 Linux History--24 Years Step by Step.md b/sources/talk/20151020 Linux History--24 Years Step by Step.md new file mode 100644 index 0000000000..319722e560 --- /dev/null +++ b/sources/talk/20151020 Linux History--24 Years Step by Step.md @@ -0,0 +1,299 @@ +Linux History: 24 Years Step by Step +================================================================================ +注:youtube 视频 + + + +### Pre-history ### + +Linux success would not be possible without [C programming language][1] and [GNU Project][2] – Environment of Linux. + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/00-1.jpg) + +Ken Thompson and Dennis Ritchie + +[Ken Thompson][1] and [Dennis Ritchie][2] was created the Unix Operation System in 1969-1970. Later was released the new [C programming language][3] – high-level and portable PL. Linux kernel written in C with some assembly code. + +![Richard Matthew Stallman](https://github.com/paulcarroty/Articles/raw/master/Linux_24/00-2.jpg) + +Richard Matthew Stallman + +[Richard Matthew Stallman][4] started in 1984 the [GNU Project][5]. One of biggest goals — free Unix-like operation system and totally + +### 1991 – The Beginning ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1991-1.jpg) + +Linus Torvalds, 1991 + +[Linus Torvalds][5] begin Linux kernel development in Helsinki, Finland – witten programm for hes hardware – Intel 80386 CPU. Hi also use Minix and GNU C compiler. Here is historical message from Linus Torvalds to Minix newsgroup: + +> From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) +> Newsgroups: comp.os.minix +> Subject: What would you like to see most in minix? +> Summary: small poll for my new operating system +> Message-ID: +> Date: 25 Aug 91 20:57:08 GMT +> Organization: University of Helsinki +> +> +> Hello everybody out there using minix - +> +> I'm doing a (free) operating system (just a hobby, won't be big and +> professional like gnu) for 386(486) AT clones. This has been brewing +> since april, and is starting to get ready. I'd like any feedback on +> things people like/dislike in minix, as my OS resembles it somewhat +> (same physical layout of the file-system (due to practical reasons) +> among other things). +> +> I've currently ported bash(1.08) and gcc(1.40), and things seem to work. +> This implies that I'll get something practical within a few months, and +> I'd like to know what features most people would want. Any suggestions +> are welcome, but I won't promise I'll implement them :-) +> +> Linus (torvalds@kruuna.helsinki.fi) + +After this Linux has supported by worldwide volunteers and professional specialists. Name “Linux” was defined by Linus coworker Ari Lemmke – just named directory of project on University Server. + +### 1992 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1992-1.jpg) + +Version 0.12 of Linux Kernel released under GPLv2. + +### 1993 ### + +![Slackware 1.0 ](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1993-1.png) + +First release of Slackware – the oldest Linux Distro with the same leader – Patrick Volkerding. Linux kernel have ~100 Developers. + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1993-2.png) + +Debian + +Debian – one of largest Linux-community also created in 1991. + +### 1994 ### + +Linux 1.0 released and first GUI is available – thanks to XFree86 project. + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1994-1.png) + +Red Hat Linux + +Released Red Hat Linux 1.0 + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1994-2.png) + +S.u.S.E Linux + +and [S.u.S.E. Linux][6] 1.0. + +### 1995 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1995-1.png) + +Red Hat Inc. + +Bob Young and Marc Ewing merged their local business to [Red Hat Software][7]. Linux ported to many of hardware platforms. + +### 1996 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1996-1.png) + +### Tux ### + +Tux Penguin – official mascot of Linux. Idea of Linus Torvalds – after visit to National Zoo & Aquarium in Canberra. Linux 2.0 released and support symmetric multiprocessing. Begin of KDE development. + +### 1997 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1997-1.jpg) + +Miguel de Icaza + +Miguel de Icaza and Federico Mena begin development of GNOME – free desktop environment with application. Linus Torvalds win in Linux’s Trademark conflict and Linux becomes the registered trademark of Linus. + +### 1998 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1998-1.jpg) + +The Cathedral and the Bazaar + +[The Cathedral and the Bazaar][8] essay by Eric S. Raymond is published – highly recommend to read. Linux support from big companies: IBM, Oracle, Compaq. + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1998-2.png) + +Mandrake Linux + +First release of Mandrake Linux – Red Hat Linux-based distro with K Desktop Environment. + +### 1999 ### + +![](https://upload.wikimedia.org/wikipedia/commons/4/4f/KDE_1.1.jpg) + +First major KDE release. + +### 2000 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2000-1.jpg) + +Dell support Linux – first big hardware vendor + +### 2001 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2001-1.jpg) + +Revolution OS + +Documentary film “Revolution OS” – 20 years of GNU, Linux, Open Source, Free Software history with iterview of best hackers of Linux and Open Source World. + +### 2002 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2002-1.jpg) + +BitKeeper + +Linux now use BitKeeper – proprietary software for distributed version control. + +### 2003 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2003-1.png) + +SUSE + +Novell buy SuSE Linux AG for $210M. Since 2003 also started epic battle SCO Group vs IBM and Linux community for the Unix copyrights. + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2003-2.png) + +Fedora + +First Release of Fedora Linux from Red Hat and Linux Community. + +### 2004 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2004-1.png) + +X.ORG Foundation + +The XFree86 team is dropped and join to [X.Org Foundation][9], development of X be faster. + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2004-2.jpg) + +Ubuntu 4.10 – First Release + +### 2005 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2005-1.png) + +openSUSE + +Beginning of [openSUSE][10] – free version of enterprise Novell’s OS. OpenOffice.org started support of OpenDocument standards. + +### 2006 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2006-1.png) + +New Linux distribution – Oracle Linux based on Red Hat Enterprise Linux. Microsoft and Novell begin cooperation in IT and both patents protection. + +### 2007 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2007-1.jpg) + +Dell Linux Laptop + +First laptops with preinstalled Linux from Dell. + +### 2008 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2008-1.jpg) + +KDE 4.0 + +KDE 4 released in non-stable condition and many users migrate to GNOME. + +### 2009 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2009-1.jpg) + +Red Hat + +Red Hat’s Linux-based success – $2.62 billion market capitalization. + +In 2009 Microsoft sumbitted first patch to Linux kernel under GPLv2 license. + +### 2010 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2010-1.png) + +Novell -> Attachmate + +Novell was sold to The Attachmate Group, Inc. for $2.2 billion. SUSE and Novell – two independs products in new company. + +First release of [systemd][11] and begin of Linux system revolution. + +### 2011 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2011-1.png) + +Unity Desktop in 2011 + +Ubuntu Unity released – a lot of criticizm from users. + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2011-2.png) + +GNOME 3.0, 2011 + +GNOME 3.0 release – “unholy mess” by Linus Torvalds and also a lot of negative critics. Linux kernel 3.0 released. + +### 2012 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2012-1.png) + +15 million lines of code + +Linux kernel have a 15 million lines of code. Microsoft is one of top Linux contributors. + +### 2013 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2013-1.png) + +Kali Linux 1.0 released – Debian-based Linux distro for penetration testing and digital forensics. Also in 2014 Centos with code developers joined to Red Hat Inc. + +### 2014 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2014-1.jpg) + +Lennart Poettering and Kay Sievers + +systemd – default in Ubuntu and all top Linux distribution. Ubuntu have 22 000 000 users. Big Android progress – 75% of all mobile devices. + +### 2015 ### + +![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2015-1.jpg) + +Linux kernel 4.0 released. Mandriva was liquidated, but have a lot of forks – Mageia is most popular. + +Written from Linux with love. + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/linux-history/ + +作者:[Pavlo Rudyi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/author/paul/ +[1]:https://en.wikipedia.org/wiki/C_(programming_language) +[2]:https://en.wikipedia.org/wiki/GNU_Project +[3]:https://en.wikipedia.org/wiki/Ken_Thompson +[4]:https://en.wikipedia.org/wiki/Dennis_Ritchie +[5]:https://en.wikipedia.org/wiki/Linus_Torvalds +[6]:https://en.wikipedia.org/wiki/SUSE_Linux_distributions +[7]:https://en.wikipedia.org/wiki/Red_Hat +[8]:https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar +[9]:http://www.x.org/ +[10]:https://en.opensuse.org/Main_Page +[11]:https://en.wikipedia.org/wiki/Systemd \ No newline at end of file diff --git a/sources/tech/20151020 how to h2 in apache.md b/sources/tech/20151020 how to h2 in apache.md new file mode 100644 index 0000000000..ae15965f9e --- /dev/null +++ b/sources/tech/20151020 how to h2 in apache.md @@ -0,0 +1,375 @@ +how to h2 in apache +================================================================================ +Copyright (C) 2015 greenbytes GmbH + +Support for HTTP/2 is finally being released with Apache httpd 2.4.17! This pages gives advice on how to build/deploy/configure it. The plan is to update this as people find out new things (read: bugs) or give recommendations on what works best for them. + +Ultimately, this will then flow back into the official Apache documentation and this page will only contain a single link to it. But we are not quite there yet... + +### Sources ### + +You can get the Apache release from [here][1]. HTTP/2 support is included in Apache 2.4.17 and upwards. I will not repeat instructions on how to build the server in general. There is excellent material available in several places, for example [here][2]. + +(Any links to experimental packages? Drop me a note on twitter @icing.) + +#### Building with HTTP/2 Support #### + +Should you build from a release, you will need to **configure** first. There are tons of options. The ones specific for HTTP/2 are: + +- **--enable-http2** + + This enables the module 'http2' which does implement the protocol inside the Apache server. + +- **--with-nghttp2=** + + This specifies a non-standard location for the library libnghttp2 which is necessary for the http2 module. If nghttp2 is in a standard place, the configure process will pick it up automatically. + +- **--enable-nghttp2-staticlib-deps** + + Ultra-rarely needed option that you may use to static link the nghttp2 library to the server. On most platforms, this only has an effect when there is no shared nghttp2 library to be found. + +In case you want to build nghttp2 for yourself, you find documentation at [nghttp2.org][3]. The library is also being shipped in the latest Fedora and other distros will follow. + +#### TLS Support #### + +Most people will want to use HTTP/2 with browsers and browser only support it on TLS connections (**https://** urls). You'll need proper configuration for that which I cover below. But foremost what you will need is an TLS library that supports the ALPN extension. + +ALPN is neccessary to negotiate the protocol to use between server and client. If it is not implemented by the TLS lib on your server, the client will only ever talk HTTP/1.1. So, who does link with Apache and support it? + +- **OpenSSL 1.0.2** and onward. +- ??? + +If you get your OpenSSL library from your Linux distro, the version number used there might be different from the official OpenSSL releases. Check with your distro in case of doubt. + +### Configuration ### + +One useful addition to your server is to set a good logging level for the http2 module. Add this: + + # this needs to be somewhere + LoadModule http2_module modules/mod_http2.so + + + LogLevel http2:info + + +When you start your server and look in the error log, you should see one line like: + + [timestamp] [http2:info] [pid XXXXX:tid numbers] + mod_http2 (v1.0.0, nghttp2 1.3.4), initializing... + +#### Protocols #### + +So, assume you have the server built and deployed, the TLS library is bleeding edge (sorry), your server starts, you open your browser and...how do you know it is working? + +If you have not added more to your server config, it probably isn't. + +You need to tell the server where to use the protocol. By default, the HTTP/2 protocol is not enabled anywhere in your server. Because that is the safe route and you might have an existing deployment should continue to work. + +You enable the HTTP/2 protocol with the new **Protocols** directive: + + # for a https server + Protocols h2 http/1.1 + ... + + # for a http server + Protocols h2c http/1.1 + +You can add this for the server in general or for specific **vhosts**. + +#### SSL Parameter #### + +HTTP/2 has some special requirements regarding TLS (SSL). See the chapter about [https:// connections][4] for more information. + +### http:// Connections (h2c) ### + +Although no browser currently supports it, the HTTP/2 protocol also works for http:// urls and mod_h[ttp]2 supports this. The only thing you need to do in order to enable it is the Protocols configuration: + + # for a http server + Protocols h2c http/1.1 + +inside your **httpd.conf**. + +There are several client (and client libraries) that support **h2c**. I'll dicusss some specifics below: + +#### curl #### + +Of course, the command line client for network resources, maintained by Daniel Stenberg. If you have curl on your system, there is an easy way to check its http/2 support: + + sh> curl -V + curl 7.43.0 (x86_64-apple-darwin15.0) libcurl/7.43.0 SecureTransport zlib/1.2.5 + Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp + Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets + +which is no good. There is no 'HTTP2' among the features. You'd want something like this: + + sh> curl -V + url 7.45.0 (x86_64-apple-darwin15.0.0) libcurl/7.45.0 OpenSSL/1.0.2d zlib/1.2.8 nghttp2/1.3.4 + Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp + Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets + +If you have a curl with the HTTP2 feature, you may check your server with some simple commands: + + sh> curl -v --http2 http:/// + ... + > Connection: Upgrade, HTTP2-Settings + > Upgrade: h2c + > HTTP2-Settings: AAMAAABkAAQAAP__ + > + < HTTP/1.1 101 Switching Protocols + < Upgrade: h2c + < Connection: Upgrade + * Received 101 + * Using HTTP2, server supports multi-use + * Connection state changed (HTTP/2 confirmed) + ... + + +Congratulations, id you see the line with **...101 Switching...**, it's working! + +There are cases, where the upgrade to HTTP/2 will not happen. When your first request does have content, for example you do a file upload, the Upgrade will not trigger. For a detailed explanation, see the section [h2c restrictions][5]. + +#### nghttp #### + +nghttp2 has its own client and servers that can be build with it. If you have the client on your system, you can verify your installation by simply retrieving a resource: + + sh> nghttp -uv http:/// + [ 0.001] Connected + [ 0.001] HTTP Upgrade request + ... + Connection: Upgrade, HTTP2-Settings + Upgrade: h2c + HTTP2-Settings: AAMAAABkAAQAAP__ + ... + [ 0.005] HTTP Upgrade response + HTTP/1.1 101 Switching Protocols + Upgrade: h2c + Connection: Upgrade + + [ 0.006] HTTP Upgrade success + ... + +which is very similar to the Upgrade dance we see in the **curl** example above. + +There is another way to use **h2c** hidden in the command line arguments: **-u**. This instructs **nghttp** to perform the HTTP/1 Upgrade dance. But what if we leave this out? + + sh> nghttp -v http:/// + [ 0.002] Connected + [ 0.002] send SETTINGS frame + ... + [ 0.002] send HEADERS frame + ; END_STREAM | END_HEADERS | PRIORITY + (padlen=0, dep_stream_id=11, weight=16, exclusive=0) + ; Open new stream + :method: GET + :path: / + :scheme: http + ... + +The connection immediately speaks HTTP/2! This is what the protocol calls the direct mode and it works by some magic 24 bytes that the client sends to the server right away: + + 0x505249202a20485454502f322e300d0a0d0a534d0d0a0d0a + or in ASCII: PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n + +A **h2c** capable server sees this on a new connection and can immediately switch its HTTP/2 processing on. A HTTP/1.1 server will see a funny request, answer it and close the connection. + +Therefore **direct** mode is only good for clients if they can be resonably sure that the server supports this. For example, because a previous Upgrade dance was successful. + +The charme of **direct** is the zero overhead and that it works for all requests, even those that carry a body (see [h2c restrictions][6]). The direct mode is enabled by default on any server that allows the h2c protocol. If you want to disable it, add the configuration directive: + +注:下面这行打删除线 + + H2Direct off + +注:下面这行打删除线 +to your server. + +For the 2.4.17 release, **H2Direct** is enabled by default on cleartext connection. However there are some modules with whom this is incompatible with. Therefore, in the next release, the default will change to **off** and if you want your server to support it, you need to set it to + + H2Direct on + +### https:// Connections (h2) ### + +Once you get mod_h[ttp]2 working for h2c connections, it's time to get the **h2** sibling going, as browsers only do it with **https:** nowadays. + +The HTTP/2 standard imposes some extra requirements on https: (TLS) connections. The ALPN extension has already been mentioned above. An additional requirement is that no cipher from a specified [black list][7] may be used. + +While the current version of **mod_h[ttp]2** does not enforce these ciphers (but some day will), most clients will do so. If you point your browser at a **h2** server with inappropriate ciphers, you will get the obscure warning **INADEQUATE_SECURITY** and the browser will simply refuse to continue. + +An acceptable Apache SSL configuration regarding this is: + + SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK + SSLProtocol All -SSLv2 -SSLv3 + ... + +(Yes, it's that long.) + +There are other SSL configuration parameters that should be tweaked, but do not have to: **SSLSessionCache**, **SSLUseStapling**, etc. but those are covered elsewhere. See the excellent [High Performance Browser Networking][8] by Ilya Grigorik, for example. + +#### curl #### + +Time to fire up a shell and use curl again (see the [h2c section about curl][9] for requirements). Using curl, you may check your server with some simple commands: + + sh> curl -v --http2 https:/// + ... + * ALPN, offering h2 + * ALPN, offering http/1.1 + ... + * ALPN, server accepted to use h2 + ... + + +Congratulations, it's working! If not, the reason might be: + +- Your curl does not support HTTP/2, see [this check][10]. +- Your openssl is old and does not support ALPN. +- Your certificate could not be verified or your cipher configuration is not accepted. Try adding the command line option -k to disable those checks in curl. If that works, review yor SSL configuration and certificate. + +#### nghttp #### + +**nghttp** we discussed already for **h2c**. If you use it for a **https:** connection, you will either see the resource or an error like this: + + sh> nghttp https:/// + [ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2) + +There are two possiblities for this which you can check by adding -v. Either your get this: + + sh> nghttp -v https:/// + [ 0.034] Connected + [ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2) + +This means that the TLS library your server uses does not implement ALPN. Getting this installtion correct is sometimes tricky. Use stackoverflow. + +Or you get this: + + sh> nghttp -v https:/// + [ 0.034] Connected + The negotiated protocol: http/1.1 + [ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2) + +which means ALPN is working, only the h2 protocol was not selected. You need to check that Protocols is set as described above for yourserver. Try setting it in the general section, in case you do not get it working in a vhost at first. + +#### Firefox #### + +Update: Steffen Land from [Apache Lounge][11] pointed me to the [HTTP/2 indicator Add-on for Firefox][12]. Nice if you want to see in how many places you already talk h2 (Hint: Apache Lounge talks h2 for some time now...). + +In Firefox you can to open the Developer Tools and there the Network tab to check for HTTP/2 connections. When you have those open and reload your html page, you see something like the following: + +![](https://icing.github.io/mod_h2/images/firefox-h2.png) + +Among the response headers, you see this strange **X-Firefox-Spdy** entry listing "h2". That is the indication that HTTP/2 is used on this **https:** connection. + +#### Google Chrome #### + +In Google Chrome, you will not see a HTTP/2 indicator in the developer tools. Instead, Chrome uses the special location **chrome://net-internals/#http2** to give information. + +If you have opened a page on your server and look at that net-internals page, you will see something like this: + +![](https://icing.github.io/mod_h2/images/chrome-h2.png) + +If your server is among the ones listed here, it is working. + +#### Microsoft Edge #### + +HTTP/2 is supported in the Windows 10 successor to Internet Explorer: Edge. Here you can also see the protocol used in the Developer Tools in the Network tab: + +![](https://icing.github.io/mod_h2/images/ie-h2.png) + +#### Safari #### + +In Apple's Safari, you open the Developer Tools and there the Network tab. Reload your server page and select the row in the Developer Tools that shows the load. If you enable the right side details view, look at the **Status**. It should show **HTTP/2.0 200** like here: + +![](https://icing.github.io/mod_h2/images/safari-h2.png) + +#### Renegotiations #### + +Renegotiations on a https: connection means that certain TLS parameters are changed on the running connection. In Apache httpd you can change TLS parameters in directory configurations. If a request arrives for a resource in a certain location, configured TLS parameter are compared to the current TLS parameters. If they differ, renegotiation is triggered. + +Most common use cases for this are cipher changes and client certificates. You can require clients to meet authentication only for special locations, or you might enable more secure, but CPU intensive ciphers for specific resources. + +Whatever your good use cases are, renegotiation are a **MUST NOT** in HTTP/2. With 100s of requests ongoing on the same connection, which renegotiation would otherwise occur when? + +The current **mod_h[ttp]2** does not protect you from such configuration. If you have a site which uses TLS renegotiation, DO NOT enable h2 on it! + +Again, we will address that in future releases so that you can enable it safely. + +### Restrictions ### + +#### Non-HTTP Protocols #### + +Modules implementing protocols other than HTTP may be incompatible with **mod_http2**. This will most certainly be the case when this other protocol requires the server to send data first. + +**NNTP** is one example of such a protocol. If you have a **mod_nntp_like_ssl** configured in your server, do not even load mod_http2. Wait for the next release. + +#### h2c Restrictions #### + +There are some restrictions on the **h2c** implementation, you should be aware of: + +#### Deny h2c on virtual host #### + +You cannot deny **h2c direct** on specific virtual hosts. **direct** gets triggered at connection setup when there is not request to be seen yet. Which makes it impossible to foresee which virtual host Apache needs to look at. + +#### Upgrade on request body #### + +The **h2c** Upgrade dance will not work on requests that have a body. Those are PUT and POST requests (form submits and uploads). If you write a client, you may precede those requests with a simple GET or an OPTIONS * to trigger the upgrade. + +The reason is quite technical in nature, but in case you want to know: during Upgrade, the connection is in a half insane state. The request is coming in HTTP/1.1 format and the response is being written in HTTP/2 frames. If the request carries a body, the server needs to read the whole body before it sends a response back. Because the response might need answers from the client for flow control among other things. But if the HTTP/1.1 request is still being sent, the client is unable to talk HTTP/2 yet. + +In order to make behaviour predictable, several server implementors decided to not do an Upgrade in the presence of any request bodies, even small ones. + +#### Upgrade on 302s #### + +The h2c Upgrade dance also does currently not work when there is a general redirect in place. Seems that rewrite happens before the mod_http2 has a chance to act. Certainly not a deal breaker, but might be confusing when you test a site that has it. + +#### h2 Restrictions #### + +There are some restrictions on the h2 implementation you should be aware of: + +#### Connection Reuse #### + +The HTTP/2 protocol allows reuse of TLS connections under certain conditions: if you have a certiface with wildcards or several altSubject names, browsers will reuse any existing connection they might have. Example: + +You have a certificate for **a.example.org** that has as additional name **b.example.org**. You open in your browser the url **https://a.example.org/**, open another tab and load **https://b.example.org/**. + +Before opening a new connection, the browser sees that it still has the one to **a.example.org** open and that the certificate is also valid for **b.example.org**. So, it sends the request for second tab over the connection of the first one. + +This connection reuse is intentional and makes it easier for sites that have invested in sharding for efficiency in HTTP/1 to also benefit from HTTP/2 without much change. + +In Apache **mod_h[ttp]2** this is not fully implemented, yet. When **a.example.org** and **b.example.org** are separate virtual hosts, Apache will not allow such connection reuse and inform the browser with status code **421 Misdirected Request** about it. The browser will understand that it has to open a new connection to **b.example.org**. All will work, however some efficiency gets lost. + +We expect to have the proper checks in place for the next release. + +Münster, 12.10.2015, + +Stefan Eissing, greenbytes GmbH + +Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. See LICENSE for details. + + +---------- + +This project is maintained by [icing][13] + +-------------------------------------------------------------------------------- + +via: https://icing.github.io/mod_h2/howto.html + +作者:[icing][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://github.com/icing +[1]:https://httpd.apache.org/download.cgi +[2]:https://httpd.apache.org/docs/2.4/install.html +[3]:https://nghttp2.org/ +[4]:https://icing.github.io/mod_h2/howto.html#https +[5]:https://icing.github.io/mod_h2/howto.html#h2c-restrictions +[6]:https://icing.github.io/mod_h2/howto.html#h2c-restrictions +[7]:https://httpwg.github.io/specs/rfc7540.html#BadCipherSuites +[8]:http://chimera.labs.oreilly.com/books/1230000000545 +[9]:https://icing.github.io/mod_h2/howto.html#curl +[10]:https://icing.github.io/mod_h2/howto.html#curl +[11]:https://www.apachelounge.com/ +[12]:https://addons.mozilla.org/en-US/firefox/addon/spdy-indicator/ +[13]:https://github.com/icing \ No newline at end of file From 1f4c9707d821a9501e2b8f4c734904485f15c0e7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 20 Oct 2015 13:20:16 +0800 Subject: [PATCH 2314/2517] =?UTF-8?q?20151020-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dation--Best Quotes of Richard Stallman.md | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md diff --git a/sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md b/sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md new file mode 100644 index 0000000000..af8bb311db --- /dev/null +++ b/sources/talk/20151020 30 Years of Free Software Foundation--Best Quotes of Richard Stallman.md @@ -0,0 +1,170 @@ +30 Years of Free Software Foundation: Best Quotes of Richard Stallman +================================================================================ +注:youtube 视频 + + +**Richard Matthew Stallman** (rms) – one of biggest figure in Information Technology. He is a computer programmer and architect (GNU Compiler Collection (GCC)), GNU Debugger, Emacs), software freedom evangelist, [GNU Project][1] and [FSF][2] founder. + +**GNU** is a recursive acronym “GNU’s Not Unix!”. GNU – collection of free computer software for Unix-based operation system. Can be used with GNU/Hurd and Linux kernels. Announced on September 27, 1983. General components: + +- GNU Compiler Collection (GCC) +- GNU C library (glibc) +- GNU Core Utilities (coreutils) +- GNU Debugger (GDB) +- GNU Binary Utilities (binutils) +- GNU Bash shell +- NOME desktop environment + +注:视频 + + +**Free Software Foundation** (FSF) – non-profit organization for free software and computer user freedom promotion and defend their rights. Read more information here. Founded on 4 October 1985. + +- The freedom to run the program as you wish, for any purpose (freedom 0). +- The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this. +- The freedom to redistribute copies so you can help your neighbor (freedom 2). +- The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. + +This is the Four Freedoms of free software. + +Here is quotes of Richard Stallman about freedom, software, social, philosophy and others things. + +**About Facebook:** + +> Facebook is not your friend, it is a surveillance engine. + +**About Android:** + +> Android is very different from the GNU/Linux operating system because it contains very little of GNU. Indeed, just about the only component in common between Android and GNU/Linux is Linux, the kernel. + +**About computer industry:** + +> The computer industry is the only industry that is more fashion-driven than women's fashion. + +**About cloud computing:** + +> The interesting thing about cloud computing is that we've redefined cloud computing to include everything that we already do. + +**About ethics:** + +> Whether gods exist or not, there is no way to get absolute certainty about ethics. Without absolute certainty, what do we do? We do the best we can. + +**About freedom:** + +> Free software is software that respects your freedom and the social solidarity of your community. So it's free as in freedom. + +**About goal and idealism:** + +> If you want to accomplish something in the world, idealism is not enough - you need to choose a method that works to achieve the goal. + +**About sharing:** + +> Sharing is good, and with digital technology, sharing is easy. + +**About facebook (extended version):** + +> Facebook mistreats its users. Facebook is not your friend; it is a surveillance engine. For instance, if you browse the Web and you see a 'like' button in some page or some other site that has been displayed from Facebook. Therefore, Facebook knows that your machine visited that page. + +**About web application:** + +> One reason you should not use web applications to do your computing is that you lose control. +> +> If you use a proprietary program or somebody else's web server, you're defenceless. You're putty in the hands of whoever developed that software. + +**About books:** + +> With paper printed books, you have certain freedoms. You can acquire the book anonymously by paying cash, which is the way I always buy books. I never use a credit card. I don't identify to any database when I buy books. Amazon takes away that freedom. + +**About MPAA:** + +> Officially, MPAA stands for Motion Picture Association of America, but I suggest that MPAA stands for Malicious Power Attacking All. + +**About money and career:** + +> I could have made money this way, and perhaps amused myself writing code. But I knew that at the end of my career, I would look back on years of building walls to divide people, and feel I had spent my life making the world a worse place. + +**About proprietary software:** + +> Proprietary software keeps users divided and helpless. Divided because each user is forbidden to redistribute it to others, and helpless because the users can't change it since they don't have the source code. They can't study what it really does. So the proprietary program is a system of unjust power. + +**About smartphone:** + +> A smartphone is a computer - it's not built using a computer - the job it does is the job of being a computer. So, everything we say about computers, that the software you run should be free - you should insist on that - applies to smart phones just the same. And likewise to those tablets. + +**About CD and digital content:** + +> CD stores have the disadvantage of an expensive inventory, but digital bookshops would need no such thing: they could write copies at the time of sale on to memory sticks, and sell you one if you forgot your own. + +**About paradigm of competition:** + +> The paradigm of competition is a race: by rewarding the winner, we encourage everyone to run faster. When capitalism really works this way, it does a good job; but its defenders are wrong in assuming it always works this way. + +**About vi and emacs:** + +> People sometimes ask me if it is a sin in the Church of Emacs to use vi. Using a free version of vi is not a sin; it is a penance. So happy hacking. + +**About freedom and history:** + +> Value your freedom or you will lose it, teaches history. 'Don't bother us with politics', respond those who don't want to learn. + +**About patents:** + +> Fighting patents one by one will never eliminate the danger of software patents, any more than swatting mosquitoes will eliminate malaria. +> +> Software patents are dangerous to software developers because they impose monopolies on software ideas. + +**About copyrights:** + +> In practice, the copyright system does a bad job of supporting authors, aside from the most popular ones. Other authors' principal interest is to be better known, so sharing their work benefits them as well as readers. + +**About pay for work:** + +> There is nothing wrong with wanting pay for work, or seeking to maximize one's income, as long as one does not use means that are destructive. + +**About Chrome OS:** + +> In essence, Chrome OS is the GNU/Linux operating system. However, it is delivered without the usual applications, and rigged up to impede and discourage installing applications. + +**About Linux users:** + +> Many users of the GNU/Linux system will not have heard the ideas of free software. They will not be aware that we have ideas, that a system exists because of ethical ideals, which were omitted from ideas associated with the term 'open source.' + +**About privacy in facebook:** + +> If there is a Like button in a page, Facebook knows who visited that page. And it can get IP address of the computer visiting the page even if the person is not a Facebook user. + +**About programming:** + +> Programming is not a science. Programming is a craft. +> +> My favorite programming languages are Lisp and C. However, since around 1992 I have worked mainly on free software activism, which means I am too busy to do much programming. Around 2008 I stopped doing programming projects. +> +> C++ is a badly designed and ugly language. It would be a shame to use it in Emacs. + +**About hacking and learn programming:** + +> People could no longer learn hacking the way I did, by starting to work on a real operating system, making real improvements. In fact, in the 1980s I often came across newly graduated computer science majors who had never seen a real program in their lives. They had only seen toy exercises, school exercises, because every real program was a trade secret. They never had the experience of writing features for users to really use, and fixing the bugs that real users came across. The things you need to know to do real work. +> +> It is hard to write a simple definition of something as varied as hacking, but I think what these activities have in common is playfulness, cleverness, and exploration. Thus, hacking means exploring the limits of what is possible, in a spirit of playful cleverness. Activities that display playful cleverness have "hack value". + +**About web browsing:** + +> For personal reasons, I do not browse the web from my computer. (I also have no net connection much of the time.) To look at page I send mail to a daemon which runs wget and mails the page back to me. It is very efficient use of my time, but it is slow in real time. + +**About music sharing:** + +> Friends share music with each other, they don't allow themselves to be divided by a system that says that nobody is supposed to have copies. + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/fsf-richard-stallman/ + +作者:[Pavlo Rudyi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/author/paul/ +[1]:http://www.gnu.org/ +[2]:http://www.fsf.org/ \ No newline at end of file From beef1622d0fd61591ef2b513b69928a786b9ad35 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 20 Oct 2015 23:19:47 +0800 Subject: [PATCH 2315/2517] Translating sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md sources/talk/20151020 Linux History--24 Years Step by Step.md sources/tech/20151020 how to h2 in apache.md --- ...21 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md | 1 + sources/talk/20151020 Linux History--24 Years Step by Step.md | 1 + sources/tech/20151020 how to h2 in apache.md | 1 + 3 files changed, 3 insertions(+) diff --git a/sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md b/sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md index d176ed8d77..c4761e1657 100644 --- a/sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md +++ b/sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md @@ -1,3 +1,4 @@ +ictlyh Translating Red Hat CEO Optimistic on OpenStack Revenue Opportunity ================================================================================ Red Hat continues to accelerate its growth thanks to an evolving mix of platform and infrastructure technology revolving around Linux and the cloud. Red Hat announced its second quarter fiscal 2016 financial results on September 21, once again exceeding expectations. diff --git a/sources/talk/20151020 Linux History--24 Years Step by Step.md b/sources/talk/20151020 Linux History--24 Years Step by Step.md index 319722e560..ddd1cc3538 100644 --- a/sources/talk/20151020 Linux History--24 Years Step by Step.md +++ b/sources/talk/20151020 Linux History--24 Years Step by Step.md @@ -1,3 +1,4 @@ +ictlyh Translating Linux History: 24 Years Step by Step ================================================================================ 注:youtube 视频 diff --git a/sources/tech/20151020 how to h2 in apache.md b/sources/tech/20151020 how to h2 in apache.md index ae15965f9e..3618994f8b 100644 --- a/sources/tech/20151020 how to h2 in apache.md +++ b/sources/tech/20151020 how to h2 in apache.md @@ -1,3 +1,4 @@ +ictlyh Translating how to h2 in apache ================================================================================ Copyright (C) 2015 greenbytes GmbH From 4eca2910f2504ca6f742d4ef6d03b60a679c65a5 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 21 Oct 2015 22:09:19 +0800 Subject: [PATCH 2316/2517] PUB:Part 8 - How to Recover Data and Rebuild Failed Software RAID's MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @strugglingyouth 就剩下一篇9啦。 --- ... RAID, Concepts of RAID and RAID Levels.md | 0 ...Two Devices’ Using ‘mdadm’ Tool in Linux.md | 0 ... (Mirroring) using 'Two Disks' in Linux.md | 0 ...iping with Distributed Parity) in Linux.md | 0 ...ith Double Distributed Parity) in Linux.md | 0 ...ing Up RAID 10 or 1+0 (Nested) in Linux.md | 0 ...Array and Removing Failed Disks in Raid.md | 0 ...Data and Rebuild Failed Software RAID's.md | 70 +++++++++---------- 8 files changed, 34 insertions(+), 36 deletions(-) rename published/{201508 => RAID}/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md (100%) rename published/{201508 => RAID}/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md (100%) rename published/{201508 => RAID}/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md (100%) rename published/{201508 => RAID}/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md (100%) rename published/{201508 => RAID}/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md (100%) rename published/{201508 => RAID}/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md (100%) rename published/{201508 => RAID}/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md (100%) rename {translated/tech => published}/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md (65%) diff --git a/published/201508/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md b/published/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md similarity index 100% rename from published/201508/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md rename to published/RAID/Part 1 - Introduction to RAID, Concepts of RAID and RAID Levels.md diff --git a/published/201508/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md b/published/RAID/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md similarity index 100% rename from published/201508/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md rename to published/RAID/Part 2 - Creating Software RAID0 (Stripe) on ‘Two Devices’ Using ‘mdadm’ Tool in Linux.md diff --git a/published/201508/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md b/published/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md similarity index 100% rename from published/201508/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md rename to published/RAID/Part 3 - Setting up RAID 1 (Mirroring) using 'Two Disks' in Linux.md diff --git a/published/201508/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md b/published/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md similarity index 100% rename from published/201508/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md rename to published/RAID/Part 4 - Creating RAID 5 (Striping with Distributed Parity) in Linux.md diff --git a/published/201508/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md b/published/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md similarity index 100% rename from published/201508/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md rename to published/RAID/Part 5 - Setup RAID Level 6 (Striping with Double Distributed Parity) in Linux.md diff --git a/published/201508/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md b/published/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md similarity index 100% rename from published/201508/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md rename to published/RAID/Part 6 - Setting Up RAID 10 or 1+0 (Nested) in Linux.md diff --git a/published/201508/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md b/published/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md similarity index 100% rename from published/201508/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md rename to published/RAID/Part 7 - Growing an Existing RAID Array and Removing Failed Disks in Raid.md diff --git a/translated/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md b/published/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md similarity index 65% rename from translated/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md rename to published/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md index 6c753de40f..82233aacda 100644 --- a/translated/tech/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md +++ b/published/RAID/Part 8 - How to Recover Data and Rebuild Failed Software RAID's.md @@ -1,30 +1,28 @@ - -当软件 RAID 故障时如何恢复和重建数据 – 第 8 部分 +在 Linux 下使用 RAID(八):当软件 RAID 故障时如何恢复和重建数据 ================================================================================ -在阅读过 [RAID 系列][1] 前面的文章后你已经对 RAID 略微熟悉了。回顾前面几个软件 RAID 的配置,我们对每一个做了详细的解释,使用哪一个取决与你的具体情况。 +在阅读过 [RAID 系列][1] 前面的文章后你已经对 RAID 比较熟悉了。回顾前面几个软件 RAID 的配置,我们对每一个都做了详细的解释,使用哪一个取决与你的具体情况。 ![Recover Rebuild Failed Software RAID's](http://www.tecmint.com/wp-content/uploads/2015/10/Recover-Rebuild-Failed-Software-RAID.png) -恢复并重建故障的软件 RAID - 第8部分 +*恢复并重建故障的软件 RAID - 第8部分* 在本文中,我们将讨论当一个磁盘发生故障时如何重建软件 RAID 阵列并且不会丢失数据。为方便起见,我们仅考虑RAID 1 的配置 - 但其方法和概念适用于所有情况。 #### RAID 测试方案 #### -在进一步讨论之前,请确保你已经配置了 RAID 1 阵列,可以按照本系列第3部分提供的方法:[在 Linux 中如何组建 RAID 1(镜像)][2]。 +在进一步讨论之前,请确保你已经配置好了 RAID 1 阵列,可以按照本系列第3部分提供的方法:[在 Linux 中如何创建 RAID 1(镜像)][2]。 在目前的情况下,仅有的变化是: -1)使用不同版本 CentOS(v7),而不是前面文章中的(v6.5)。 +1. 使用不同版本 CentOS(v7),而不是前面文章中的(v6.5)。 +2. 磁盘容量发生改变, /dev/sdb 和 /dev/sdc(各8GB)。 -2) 磁盘容量发生改变, /dev/sdb 和 /dev/sdc(各8GB)。 - -此外,如果 SELinux 是 enforcing 模式,你需要将相应的标签添加到挂载 RAID 设备的目录中。否则,当你试图挂载时,你会碰到这样的警告信息: +此外,如果 SELinux 设置为 enforcing 模式,你需要将相应的标签添加到挂载 RAID 设备的目录中。否则,当你试图挂载时,你会碰到这样的警告信息: ![SELinux RAID Mount Error](http://www.tecmint.com/wp-content/uploads/2015/10/SELinux-RAID-Mount-Error.png) -启用 SELinux 时 RAID 挂载错误 +*启用 SELinux 时 RAID 挂载错误* 通过以下命令来解决: @@ -34,27 +32,27 @@ 存储设备损坏的原因很多(尽管固态硬盘大大减少了这种情况发生的可能性),但不管是什么原因,可以肯定问题随时可能发生,你需要准备好替换发生故障的部分,并确保数据的可用性和完整性。 -首先建议是。虽然你可以查看 /proc/mdstat 来检查 RAID 的状态,但有一个更好的和节省时间的方法,使用监控 + 扫描模式运行 mdadm,它将警报通过电子邮件发送到一个预定义的收件人。 +首先建议是。虽然你可以查看 `/proc/mdstat` 来检查 RAID 的状态,但有一个更好的和节省时间的方法,使用监控 + 扫描模式运行 mdadm,它将警报通过电子邮件发送到一个预定义的收件人。 -要这样设置,在 /etc/mdadm.conf 添加以下行: +要这样设置,在 `/etc/mdadm.conf` 添加以下行: MAILADDR user@ -我自己的设置: +我自己的设置如下: MAILADDR gacanepa@localhost ![RAID Monitoring Email Alerts](http://www.tecmint.com/wp-content/uploads/2015/10/RAID-Monitoring-Email-Alerts.png) -监控 RAID 并使用电子邮件进行报警 +*监控 RAID 并使用电子邮件进行报警* -要运行 mdadm 在监控 + 扫描模式中,以 root 用户添加以下 crontab 条目: +要让 mdadm 运行在监控 + 扫描模式中,以 root 用户添加以下 crontab 条目: @reboot /sbin/mdadm --monitor --scan --oneshot 默认情况下,mdadm 每隔60秒会检查 RAID 阵列,如果发现问题将发出警报。你可以通过添加 `--delay` 选项到crontab 条目上面,后面跟上秒数,来修改默认行为(例如,`--delay` 1800意味着30分钟)。 -最后,确保你已经安装了一个邮件用户代理(MUA),如[mutt or mailx][3]。否则,你将不会收到任何警报。 +最后,确保你已经安装了一个邮件用户代理(MUA),如[mutt 或 mailx][3]。否则,你将不会收到任何警报。 在一分钟内,我们就会看到 mdadm 发送的警报。 @@ -64,27 +62,27 @@ # mdadm --manage --set-faulty /dev/md0 /dev/sdc1 -这将导致的 /dev/sdc1 被标记为 faulty,我们可以在 /proc/mdstat 看到: +这将导致 /dev/sdc1 被标记为 faulty,我们可以在 /proc/mdstat 看到: ![Stimulate Issue with RAID Storage](http://www.tecmint.com/wp-content/uploads/2015/10/Stimulate-Issue-with-RAID-Storage.png) -在 RAID 存储设备上模拟问题 +*在 RAID 存储设备上模拟问题* -更重要的是,如果我们收到了同样的警报邮件: +更重要的是,让我们看看是不是收到了同样的警报邮件: ![Email Alert on Failed RAID Device](http://www.tecmint.com/wp-content/uploads/2015/10/Email-Alert-on-Failed-RAID-Device.png) -RAID 设备故障时发送邮件警报 +*RAID 设备故障时发送邮件警报* 在这种情况下,你需要从软件 RAID 阵列中删除该设备: # mdadm /dev/md0 --remove /dev/sdc1 -然后,你可以直接从机器中取出,并将其使用备用设备来取代(/dev/sdd 中类型为 fd 的分区以前已被创建): +然后,你可以直接从机器中取出,并将其使用备用设备来取代(/dev/sdd 中类型为 fd 的分区是以前创建的): # mdadm --manage /dev/md0 --add /dev/sdd1 -幸运的是,该系统会使用我们刚才添加的磁盘自动重建阵列。我们可以通过标记 dev/sdb1 为 faulty 来进行测试,从阵列中取出后,并确保 tecmint.txt 文件仍然在/mnt/raid1 是可访问的: +幸运的是,该系统会使用我们刚才添加的磁盘自动重建阵列。我们可以通过标记 /dev/sdb1 为 faulty 来进行测试,从阵列中取出后,并确认 tecmint.txt 文件仍然在 /mnt/raid1 是可访问的: # mdadm --detail /dev/md0 # mount | grep raid1 @@ -93,7 +91,7 @@ RAID 设备故障时发送邮件警报 ![Confirm Rebuilding RAID Array](http://www.tecmint.com/wp-content/uploads/2015/10/Rebuilding-RAID-Array.png) -确认 RAID 重建 +*确认 RAID 重建* 上面图片清楚的显示,添加 /dev/sdd1 到阵列中来替代 /dev/sdc1,数据的重建是系统自动完成的,不需要干预。 @@ -104,11 +102,11 @@ RAID 设备故障时发送邮件警报 ![Replace Failed Raid Device](http://www.tecmint.com/wp-content/uploads/2015/10/Replace-Failed-Raid-Device.png) -取代故障的 Raid 设备 +*取代故障的 Raid 设备* ### 从冗余丢失中恢复数据 ### -如前所述,当一个磁盘发生故障 mdadm 将自动重建数据。但是,如果阵列中的2个磁盘都故障时会发生什么?让我们来模拟这种情况,通过标记 /dev/sdb1 和 /dev/sdd1 为 faulty: +如前所述,当一个磁盘发生故障时, mdadm 将自动重建数据。但是,如果阵列中的2个磁盘都故障时会发生什么?让我们来模拟这种情况,通过标记 /dev/sdb1 和 /dev/sdd1 为 faulty: # umount /mnt/raid1 # mdadm --manage --set-faulty /dev/md0 /dev/sdb1 @@ -117,14 +115,13 @@ RAID 设备故障时发送邮件警报 此时尝试以同样的方式重新创建阵列就(或使用 `--assume-clean` 选项)可能会导致数据丢失,因此不到万不得已不要使用。 - -让我们试着从 /dev/sdb1 恢复数据,例如,在一个类似的磁盘分区(/dev/sde1 - 注意,这需要你执行前在/dev/sde 上创建一个 fd 类型的分区)上使用 ddrescue: +让我们试着从 /dev/sdb1 恢复数据,例如,在一个类似的磁盘分区(/dev/sde1 - 注意,这需要你执行前在/dev/sde 上创建一个 fd 类型的分区)上使用 `ddrescue`: # ddrescue -r 2 /dev/sdb1 /dev/sde1 ![Recovering Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Recovering-Raid-Array.png) -恢复 Raid 阵列 +*恢复 Raid 阵列* 请注意,到现在为止,我们还没有触及 /dev/sdb 和 /dev/sdd,这是 RAID 阵列的一部分分区。 @@ -132,38 +129,39 @@ RAID 设备故障时发送邮件警报 # mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd[e-f]1 -请注意,在真实的情况下,你需要使用与原来的阵列中相同的设备名称,即把 /dev/sdb1 和 /dev/sdc1 替换了的磁盘。 +请注意,在真实的情况下,你需要使用与原来的阵列中相同的设备名称,即设备失效后替换的磁盘的名称应该是 /dev/sdb1 和 /dev/sdc1。 -在本文中,我选择了使用额外的设备来重新创建全新的磁盘阵列,为了避免与原来的故障磁盘混淆。 +在本文中,我选择了使用额外的设备来重新创建全新的磁盘阵列,是为了避免与原来的故障磁盘混淆。 当被问及是否继续写入阵列时,键入 Y,然后按 Enter。阵列被启动,你也可以查看它的进展: # watch -n 1 cat /proc/mdstat -当这个过程完成后,你应该能够访问 RAID 的数据: +当这个过程完成后,你就应该能够访问 RAID 的数据: ![Confirm Raid Content](http://www.tecmint.com/wp-content/uploads/2015/10/Raid-Content.png) -确认 Raid 数据 +*确认 Raid 数据* ### 总结 ### 在本文中,我们回顾了从 RAID 故障和冗余丢失中恢复数据。但是,你要记住,这种技术是一种存储解决方案,不能取代备份。 -本文中介绍的方法适用于所有 RAID 中,还有其中的理念,我将在本系列的最后一篇(RAID 管理)中涵盖它。 +本文中介绍的方法适用于所有 RAID 中,其中的概念我将在本系列的最后一篇(RAID 管理)中涵盖它。 如果你对本文有任何疑问,随时给我们以评论的形式说明。我们期待倾听阁下的心声! + -------------------------------------------------------------------------------- via: http://www.tecmint.com/recover-data-and-rebuild-failed-software-raid/ 作者:[Gabriel Cánepa][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者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/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/create-raid1-in-linux/ +[1]:https://linux.cn/article-6085-1.html +[2]:https://linux.cn/article-6093-1.html [3]:http://www.tecmint.com/send-mail-from-command-line-using-mutt-command/ From 365905c4cc02b31a66829a1f04abe04b694ca74d Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 21 Oct 2015 22:20:13 +0800 Subject: [PATCH 2317/2517] PUB:20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux @geekpi --- ... device permission permanently on Linux.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) rename {translated/tech => published}/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md (55%) diff --git a/translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md b/published/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md similarity index 55% rename from translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md rename to published/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md index 533bbfad5b..051a15638f 100644 --- a/translated/tech/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md +++ b/published/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md @@ -1,26 +1,26 @@ -Linux有问必答 -- 如何在LInux中永久修改USB设备权限 +Linux 有问必答:如何在 Linux 中永久修改 USB 设备权限 ================================================================================ -> **提问**:当我尝试在Linux中运行USB GPS接收器时我遇到了下面来自gpsd的错误。 +> **提问**:当我尝试在 Linux 中运行 USB GPS 接收器时我遇到了下面来自 gpsd 的错误。 > > gpsd[377]: gpsd:ERROR: read-only device open failed: Permission denied > gpsd[377]: gpsd:ERROR: /dev/ttyUSB0: device activation failed. > gpsd[377]: gpsd:ERROR: device open failed: Permission denied - retrying read-only > -> 看上去gpsd没有权限访问USB设备(/dev/ttyUSB0)。我该如何永久修改它在Linux上的权限? +> 看上去 gpsd 没有权限访问 USB 设备(/dev/ttyUSB0)。我该如何永久修改它在Linux上的权限? -当你在运行一个会读取或者写入USB设备的进程时,进程的用户/组必须有权限这么做。当然你可以手动用chmod命令改变USB设备的权限,但是手动的权限改变只是暂时的。USB设备会在下次重启时恢复它的默认权限。 +当你在运行一个会读取或者写入USB设备的进程时,进程的用户/组必须有权限这么做才行。当然你可以手动用`chmod`命令改变 USB 设备的权限,但是手动的权限改变只是暂时的。USB 设备会在下次重启时恢复它的默认权限。 ![](https://farm6.staticflickr.com/5741/20848677843_202ff53303_c.jpg) -作为一个永久的方式,你可以创建一个基于udev的USB权限规则,它可以根据你的选择分配任何权限模式。下面是该如何做。 +作为一个永久的方式,你可以创建一个基于 udev 的 USB 权限规则,它可以根据你的选择分配任何权限模式。下面是该如何做。 -首先,你需要找出USB设备的vendorID和productID。使用lsusb命令。 +首先,你需要找出 USB 设备的 vendorID 和 productID。使用`lsusb`命令。 $ lsusb -vvv ![](https://farm1.staticflickr.com/731/20848677743_39f76eb403_c.jpg) -上面lsusb的输出中,找出你的USB设备,并找出"idVendor"和"idProduct"字段。本例中,我们的结果是idVendor (0x067b)和 idProduct (0x2303) +上面`lsusb`的输出中,找出你的 USB 设备,并找出"idVendor"和"idProduct"字段。本例中,我们的结果是`idVendor (0x067b)`和 `idProduct (0x2303)` 下面创建一个新的udev规则。 @@ -32,12 +32,11 @@ Linux有问必答 -- 如何在LInux中永久修改USB设备权限 用你自己的"idVendor"和"idProduct"来替换。**MODE="0666"**表示USB设备的权限。 -现在重启电脑并重新加载udev规则: +现在重启电脑并重新加载 udev 规则: $ sudo udevadm control --reload -Then verify the permission of the USB device. -接着验证USB设备的权限。 +接着验证下 USB 设备的权限。 ![](https://farm1.staticflickr.com/744/21282872179_9a4a05d768_b.jpg) @@ -47,7 +46,7 @@ via: http://ask.xmodulo.com/change-usb-device-permission-linux.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 00492e8a5be0f7c262610926263f996af12d4b6d Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 21 Oct 2015 23:08:26 +0800 Subject: [PATCH 2318/2517] Delete 20151019 11 df command examples in Linux.md --- ...0151019 11 df command examples in Linux.md | 259 ------------------ 1 file changed, 259 deletions(-) delete mode 100644 sources/tech/20151019 11 df command examples in Linux.md diff --git a/sources/tech/20151019 11 df command examples in Linux.md b/sources/tech/20151019 11 df command examples in Linux.md deleted file mode 100644 index bcb17960c3..0000000000 --- a/sources/tech/20151019 11 df command examples in Linux.md +++ /dev/null @@ -1,259 +0,0 @@ -translation by strugglingyouth -11 df command examples in Linux -================================================================================ -df (disk free) command is used to display disk usage of the file system. By default df command shows the file system usage in 1K blocks for all the current mounted file system, if you want to display the output of df command in human readable format , use -h option like “df -h”. - -In this post we will discuss 11 different examples of ‘**df**‘ command in Linux - -Basic Format of df command in Linux - - # df {options} {mount_point_of_filesystem} - -Options used in df command : - -![](http://www.linuxtechi.com/wp-content/uploads/2015/10/df-command-options.jpg) - -Sample Output of df : - - [root@linux-world ~]# df - Filesystem 1K-blocks Used Available Use% Mounted on - /dev/mapper/vg00-root 17003304 804668 15311852 5% / - devtmpfs 771876 0 771876 0% /dev - tmpfs 777928 0 777928 0% /dev/shm - tmpfs 777928 8532 769396 2% /run - tmpfs 777928 0 777928 0% /sys/fs/cgroup - /dev/mapper/vg00-home 14987616 41000 14162232 1% /home - /dev/sda1 487652 62593 395363 14% /boot - /dev/mapper/vg00-var 9948012 48692 9370936 1% /var - /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap - [root@linux-world ~]# - -### Example:1 List disk usage of all the file system using ‘-a’ ### - -when we use ‘-a’ option in df command , it will display disk usage of all the file systems. - - [root@linux-world ~]# df -a - Filesystem 1K-blocks Used Available Use% Mounted on - rootfs 17003304 804668 15311852 5% / - proc 0 0 0 - /proc - sysfs 0 0 0 - /sys - devtmpfs 771876 0 771876 0% /dev - securityfs 0 0 0 - /sys/kernel/security - tmpfs 777928 0 777928 0% /dev/shm - devpts 0 0 0 - /dev/pts - tmpfs 777928 8532 769396 2% /run - tmpfs 777928 0 777928 0% /sys/fs/cgroup - cgroup 0 0 0 - /sys/fs/cgroup/systemd - pstore 0 0 0 - /sys/fs/pstore - cgroup 0 0 0 - /sys/fs/cgroup/cpuset - cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct - cgroup 0 0 0 - /sys/fs/cgroup/memory - cgroup 0 0 0 - /sys/fs/cgroup/devices - cgroup 0 0 0 - /sys/fs/cgroup/freezer - cgroup 0 0 0 - /sys/fs/cgroup/net_cls - cgroup 0 0 0 - /sys/fs/cgroup/blkio - cgroup 0 0 0 - /sys/fs/cgroup/perf_event - cgroup 0 0 0 - /sys/fs/cgroup/hugetlb - configfs 0 0 0 - /sys/kernel/config - /dev/mapper/vg00-root 17003304 804668 15311852 5% / - selinuxfs 0 0 0 - /sys/fs/selinux - systemd-1 0 0 0 - /proc/sys/fs/binfmt_misc - debugfs 0 0 0 - /sys/kernel/debug - hugetlbfs 0 0 0 - /dev/hugepages - mqueue 0 0 0 - /dev/mqueue - /dev/mapper/vg00-home 14987616 41000 14162232 1% /home - /dev/sda1 487652 62593 395363 14% /boot - /dev/mapper/vg00-var 9948012 48692 9370936 1% /var - /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap - [root@linux-world ~]# - -### Example:2 Display the output of df command in human readable format. ### - -Using ‘-h’ option in df command , output can be displayed in human readable format ( e.g 5K , 500M & 5G ) - - [root@linux-world ~]# df -h - Filesystem Size Used Avail Use% Mounted on - /dev/mapper/vg00-root 17G 786M 15G 5% / - devtmpfs 754M 0 754M 0% /dev - tmpfs 760M 0 760M 0% /dev/shm - tmpfs 760M 8.4M 752M 2% /run - tmpfs 760M 0 760M 0% /sys/fs/cgroup - /dev/mapper/vg00-home 15G 41M 14G 1% /home - /dev/sda1 477M 62M 387M 14% /boot - /dev/mapper/vg00-var 9.5G 48M 9.0G 1% /var - /dev/mapper/vg00-sap 15G 37M 14G 1% /sap - [root@linux-world ~]# - -### Example:3 Display Space usage of particular file system ### - -Suppose we want to print space usage of /sap file system, - - [root@linux-world ~]# df -h /sap/ - Filesystem Size Used Avail Use% Mounted on - /dev/mapper/vg00-sap 15G 37M 14G 1% /sap - [root@linux-world ~]# - -### Example:4 Print file system type of all mounted file systems ### - -‘**-T**’ is used in df command to display the file system type in the output. - - [root@linux-world ~]# df -T - Filesystem Type 1K-blocks Used Available Use% Mounted on - /dev/mapper/vg00-root ext4 17003304 804668 15311852 5% / - devtmpfs devtmpfs 771876 0 771876 0% /dev - tmpfs tmpfs 777928 0 777928 0% /dev/shm - tmpfs tmpfs 777928 8532 769396 2% /run - tmpfs tmpfs 777928 0 777928 0% /sys/fs/cgroup - /dev/mapper/vg00-home ext4 14987616 41000 14162232 1% /home - /dev/sda1 ext3 487652 62593 395363 14% /boot - /dev/mapper/vg00-var ext3 9948012 48696 9370932 1% /var - /dev/mapper/vg00-sap ext3 14987656 37636 14165636 1% /sap - [root@linux-world ~]# - -### Example:5 Print disk usage of file systems in block-size. ### - - [root@linux-world ~]# df -k - Filesystem 1K-blocks Used Available Use% Mounted on - /dev/mapper/vg00-root 17003304 804668 15311852 5% / - devtmpfs 771876 0 771876 0% /dev - tmpfs 777928 0 777928 0% /dev/shm - tmpfs 777928 8532 769396 2% /run - tmpfs 777928 0 777928 0% /sys/fs/cgroup - /dev/mapper/vg00-home 14987616 41000 14162232 1% /home - /dev/sda1 487652 62593 395363 14% /boot - /dev/mapper/vg00-var 9948012 48696 9370932 1% /var - /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap - [root@linux-world ~]# - -### Example:6 Display inodes information of file system. ### - -‘**-i**’ option in df command is used to display inode information of the file system - -inodes info of all the file system : - - [root@linux-world ~]# df -i - Filesystem Inodes IUsed IFree IUse% Mounted on - /dev/mapper/vg00-root 1089536 22031 1067505 3% / - devtmpfs 192969 357 192612 1% /dev - tmpfs 194482 1 194481 1% /dev/shm - tmpfs 194482 420 194062 1% /run - tmpfs 194482 13 194469 1% /sys/fs/cgroup - /dev/mapper/vg00-home 960992 15 960977 1% /home - /dev/sda1 128016 337 127679 1% /boot - /dev/mapper/vg00-var 640848 1235 639613 1% /var - /dev/mapper/vg00-sap 960992 11 960981 1% /sap - [root@linux-world ~]# - -inodes info of particular file system : - - [root@linux-world ~]# df -i /sap/ - Filesystem Inodes IUsed IFree IUse% Mounted on - /dev/mapper/vg00-sap 960992 11 960981 1% /sap - [root@linux-world ~]# - -### Example:7 Print grant total space usage of all file system. ### - -‘–total‘ option in df command is used to display the grant total of disk usage of all the file system. - - [root@linux-world ~]# df -h --total - Filesystem Size Used Avail Use% Mounted on - /dev/mapper/vg00-root 17G 786M 15G 5% / - devtmpfs 754M 0 754M 0% /dev - tmpfs 760M 0 760M 0% /dev/shm - tmpfs 760M 8.4M 752M 2% /run - tmpfs 760M 0 760M 0% /sys/fs/cgroup - /dev/mapper/vg00-home 15G 41M 14G 1% /home - /dev/sda1 477M 62M 387M 14% /boot - /dev/mapper/vg00-var 9.5G 48M 9.0G 1% /var - /dev/mapper/vg00-sap 15G 37M 14G 1% /sap - total 58G 980M 54G 2% - - [root@linux-world ~]# - -### Example:8 Print only Local file system space usage info. ### - -Suppose network file system also mounted on linux box and but we want to display local file system information only, this can be achieved by using ‘-l‘ option in df command. - -![](http://www.linuxtechi.com/wp-content/uploads/2015/10/nfs4-fs-mount.jpg) - -Limiting to local file system : - - [root@linux-world ~]# df -Thl - Filesystem Type Size Used Avail Use% Mounted on - /dev/mapper/vg00-root ext4 17G 791M 15G 6% / - devtmpfs devtmpfs 754M 0 754M 0% /dev - tmpfs tmpfs 760M 0 760M 0% /dev/shm - tmpfs tmpfs 760M 8.4M 752M 2% /run - tmpfs tmpfs 760M 0 760M 0% /sys/fs/cgroup - /dev/mapper/vg00-home ext4 15G 41M 14G 1% /home - /dev/sda1 ext3 477M 62M 387M 14% /boot - /dev/mapper/vg00-var ext3 9.5G 105M 8.9G 2% /var - /dev/mapper/vg00-sap ext3 15G 37M 14G 1% /sap - [root@linux-world ~]# - -### Example:9 Print Disk Space information of particular file system type. ### - -‘**-t**’ option in df command is used to print information of particular file system type, after ‘-t’ specify the file system type, example is shown below : - -for ext4 : - - [root@linux-world ~]# df -t ext4 - Filesystem 1K-blocks Used Available Use% Mounted on - /dev/mapper/vg00-root 17003304 809492 15307028 6% / - /dev/mapper/vg00-home 14987616 41000 14162232 1% /home - [root@linux-world ~]# - -for nfs4 : - - [root@linux-world ~]# df -t nfs4 - Filesystem 1K-blocks Used Available Use% Mounted on - 192.168.1.5:/opensuse 301545472 266833920 19371008 94% /data - [root@linux-world ~]# - -### Example:10 Exclude Particular file system type using ‘-x’ option ### - -“**-x** or **–exclude-type**” is used to exclude the certain file system type in the output of df command. - -Let suppose we want to print all the file systems excluding ext3 file system. - - [root@linux-world ~]# df -x ext3 - Filesystem 1K-blocks Used Available Use% Mounted on - /dev/mapper/vg00-root 17003304 809492 15307028 6% / - devtmpfs 771876 0 771876 0% /dev - tmpfs 777928 0 777928 0% /dev/shm - tmpfs 777928 8540 769388 2% /run - tmpfs 777928 0 777928 0% /sys/fs/cgroup - /dev/mapper/vg00-home 14987616 41000 14162232 1% /home - 192.168.1.5:/opensuse 301545472 266834944 19369984 94% /data - [root@linux-world ~]# - -### Example:11 Print only certain fields in output of df command. ### - -‘**–output={field_name1,field_name2….}**‘ option is used to display the certain fields in df command output. - -Valid field names are: ‘source’, ‘fstype’, ‘itotal’, ‘iused’, ‘iavail’, ‘ipcent’, ‘size’, ‘used’, ‘avail’, ‘pcent’ and ‘target’ - - [root@linux-world ~]# df --output=fstype,size,iused - Type 1K-blocks IUsed - ext4 17003304 22275 - devtmpfs 771876 357 - tmpfs 777928 1 - tmpfs 777928 423 - tmpfs 777928 13 - ext4 14987616 15 - ext3 487652 337 - ext3 9948012 1373 - ext3 14987656 11 - nfs4 301545472 451099 - [root@linux-world ~]# - --------------------------------------------------------------------------------- - -via: http://www.linuxtechi.com/11-df-command-examples-in-linux/ - -作者:[Pradeep Kumar][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxtechi.com/author/pradeep/ From 80f05f0f82826fb2e2bfe0b2c508ae32ec129c7c Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 21 Oct 2015 23:09:19 +0800 Subject: [PATCH 2319/2517] Create 20151019 11 df command examples in Linux.md --- ...0151019 11 df command examples in Linux.md | 259 ++++++++++++++++++ 1 file changed, 259 insertions(+) create mode 100644 translated/tech/20151019 11 df command examples in Linux.md diff --git a/translated/tech/20151019 11 df command examples in Linux.md b/translated/tech/20151019 11 df command examples in Linux.md new file mode 100644 index 0000000000..8b2035acee --- /dev/null +++ b/translated/tech/20151019 11 df command examples in Linux.md @@ -0,0 +1,259 @@ + Linux 中 df 命令的11个例子 +================================================================================ + +df(可用磁盘)命令用于显示文件系统的磁盘使用情况。默认情况下 df 命令将以 1KB 为单位进行显示所有当前已挂载的文件系统,如果你想以人类易读的格式显示 df 命令的输出,像这样“df -h”使用 -h 选项。 + +在这篇文章中,我们将讨论 ‘**df**‘ 命令在 Linux 下11种不同的实例 + +在 Linux 下 df 命令的基本格式为: + + # df {options} {mount_point_of_filesystem} + +在 df 命令中可用的选项有: + +![](http://www.linuxtechi.com/wp-content/uploads/2015/10/df-command-options.jpg) + +df 的原样输出 : + + [root@linux-world ~]# df + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 804668 15311852 5% / + devtmpfs 771876 0 771876 0% /dev + tmpfs 777928 0 777928 0% /dev/shm + tmpfs 777928 8532 769396 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + /dev/sda1 487652 62593 395363 14% /boot + /dev/mapper/vg00-var 9948012 48692 9370936 1% /var + /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### 例1:使用 ‘-a’ 选项列出所有文件系统的磁盘使用量 ### + +当我们在 df 命令中使用 ‘-a’ 选项时,它会显示所有文件系统的磁盘使用情况。 + + [root@linux-world ~]# df -a + Filesystem 1K-blocks Used Available Use% Mounted on + rootfs 17003304 804668 15311852 5% / + proc 0 0 0 - /proc + sysfs 0 0 0 - /sys + devtmpfs 771876 0 771876 0% /dev + securityfs 0 0 0 - /sys/kernel/security + tmpfs 777928 0 777928 0% /dev/shm + devpts 0 0 0 - /dev/pts + tmpfs 777928 8532 769396 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + cgroup 0 0 0 - /sys/fs/cgroup/systemd + pstore 0 0 0 - /sys/fs/pstore + cgroup 0 0 0 - /sys/fs/cgroup/cpuset + cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct + cgroup 0 0 0 - /sys/fs/cgroup/memory + cgroup 0 0 0 - /sys/fs/cgroup/devices + cgroup 0 0 0 - /sys/fs/cgroup/freezer + cgroup 0 0 0 - /sys/fs/cgroup/net_cls + cgroup 0 0 0 - /sys/fs/cgroup/blkio + cgroup 0 0 0 - /sys/fs/cgroup/perf_event + cgroup 0 0 0 - /sys/fs/cgroup/hugetlb + configfs 0 0 0 - /sys/kernel/config + /dev/mapper/vg00-root 17003304 804668 15311852 5% / + selinuxfs 0 0 0 - /sys/fs/selinux + systemd-1 0 0 0 - /proc/sys/fs/binfmt_misc + debugfs 0 0 0 - /sys/kernel/debug + hugetlbfs 0 0 0 - /dev/hugepages + mqueue 0 0 0 - /dev/mqueue + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + /dev/sda1 487652 62593 395363 14% /boot + /dev/mapper/vg00-var 9948012 48692 9370936 1% /var + /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### 例2:以人类易读的格式显示 df 命令的输出 ### + +在 df 命令中使用‘-h’选项,输出以人易读的格式输出(例如,5K,500M & 5G) + + [root@linux-world ~]# df -h + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/vg00-root 17G 786M 15G 5% / + devtmpfs 754M 0 754M 0% /dev + tmpfs 760M 0 760M 0% /dev/shm + tmpfs 760M 8.4M 752M 2% /run + tmpfs 760M 0 760M 0% /sys/fs/cgroup + /dev/mapper/vg00-home 15G 41M 14G 1% /home + /dev/sda1 477M 62M 387M 14% /boot + /dev/mapper/vg00-var 9.5G 48M 9.0G 1% /var + /dev/mapper/vg00-sap 15G 37M 14G 1% /sap + [root@linux-world ~]# + +### 例3:显示特定文件系统已使用的空间 ### + +假如我们想显示 /sap 文件系统空间的使用情况。 + + [root@linux-world ~]# df -h /sap/ + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/vg00-sap 15G 37M 14G 1% /sap + [root@linux-world ~]# + +### 例4:输出所有已挂载文件系统的类型 ### + +‘**-T**’ 选项用在 df 命令中用来显示文件系统的类型。 + + [root@linux-world ~]# df -T + Filesystem Type 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root ext4 17003304 804668 15311852 5% / + devtmpfs devtmpfs 771876 0 771876 0% /dev + tmpfs tmpfs 777928 0 777928 0% /dev/shm + tmpfs tmpfs 777928 8532 769396 2% /run + tmpfs tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home ext4 14987616 41000 14162232 1% /home + /dev/sda1 ext3 487652 62593 395363 14% /boot + /dev/mapper/vg00-var ext3 9948012 48696 9370932 1% /var + /dev/mapper/vg00-sap ext3 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### 例5:输出文件系统磁盘使用的块大小 ### + + [root@linux-world ~]# df -k + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 804668 15311852 5% / + devtmpfs 771876 0 771876 0% /dev + tmpfs 777928 0 777928 0% /dev/shm + tmpfs 777928 8532 769396 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + /dev/sda1 487652 62593 395363 14% /boot + /dev/mapper/vg00-var 9948012 48696 9370932 1% /var + /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap + [root@linux-world ~]# + +### 例6:输出文件系统的 inode 信息 ### + +‘**-i**’ 选项用在 df 命令用于显示文件系统的 inode 信息。 + +所有文件系统的 inode 信息: + + [root@linux-world ~]# df -i + Filesystem Inodes IUsed IFree IUse% Mounted on + /dev/mapper/vg00-root 1089536 22031 1067505 3% / + devtmpfs 192969 357 192612 1% /dev + tmpfs 194482 1 194481 1% /dev/shm + tmpfs 194482 420 194062 1% /run + tmpfs 194482 13 194469 1% /sys/fs/cgroup + /dev/mapper/vg00-home 960992 15 960977 1% /home + /dev/sda1 128016 337 127679 1% /boot + /dev/mapper/vg00-var 640848 1235 639613 1% /var + /dev/mapper/vg00-sap 960992 11 960981 1% /sap + [root@linux-world ~]# + +特定文件系统的 inode 信息: + + [root@linux-world ~]# df -i /sap/ + Filesystem Inodes IUsed IFree IUse% Mounted on + /dev/mapper/vg00-sap 960992 11 960981 1% /sap + [root@linux-world ~]# + +### 例7:输出所有文件系统总的使用情况 ### + +‘–total‘ 选项在 df 命令中用于显示所有文件系统的磁盘使用情况。 + + [root@linux-world ~]# df -h --total + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/vg00-root 17G 786M 15G 5% / + devtmpfs 754M 0 754M 0% /dev + tmpfs 760M 0 760M 0% /dev/shm + tmpfs 760M 8.4M 752M 2% /run + tmpfs 760M 0 760M 0% /sys/fs/cgroup + /dev/mapper/vg00-home 15G 41M 14G 1% /home + /dev/sda1 477M 62M 387M 14% /boot + /dev/mapper/vg00-var 9.5G 48M 9.0G 1% /var + /dev/mapper/vg00-sap 15G 37M 14G 1% /sap + total 58G 980M 54G 2% - + [root@linux-world ~]# + +### 例8:只打印本地文件系统磁盘的使用情况 ### + +假设网络文件系统也挂载在 Linux 上,但我们只想显示本地文件系统的信息,这可以通过使用 df 命令的 ‘-l‘ 选项来实现。 + +![](http://www.linuxtechi.com/wp-content/uploads/2015/10/nfs4-fs-mount.jpg) + +只打印本地文件系统: + + [root@linux-world ~]# df -Thl + Filesystem Type Size Used Avail Use% Mounted on + /dev/mapper/vg00-root ext4 17G 791M 15G 6% / + devtmpfs devtmpfs 754M 0 754M 0% /dev + tmpfs tmpfs 760M 0 760M 0% /dev/shm + tmpfs tmpfs 760M 8.4M 752M 2% /run + tmpfs tmpfs 760M 0 760M 0% /sys/fs/cgroup + /dev/mapper/vg00-home ext4 15G 41M 14G 1% /home + /dev/sda1 ext3 477M 62M 387M 14% /boot + /dev/mapper/vg00-var ext3 9.5G 105M 8.9G 2% /var + /dev/mapper/vg00-sap ext3 15G 37M 14G 1% /sap + [root@linux-world ~]# + +### 例9:打印特定文件系统类型的磁盘使用情况 ### + +‘**-t**’ 选项在 df 命令中用来打印特定文件系统类型的信息,‘-t’ 指定文件系统的类型,如下所示: + +对于 ext4 : + + [root@linux-world ~]# df -t ext4 + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 809492 15307028 6% / + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + [root@linux-world ~]# + +对于 nfs4 : + + [root@linux-world ~]# df -t nfs4 + Filesystem 1K-blocks Used Available Use% Mounted on + 192.168.1.5:/opensuse 301545472 266833920 19371008 94% /data + [root@linux-world ~]# + +### 例10:使用 ‘-x’ 选项排除特定的文件系统类型 ### + +“**-x** 或 **–exclude-type**” 在 df 命令中用来在输出中排出某些文件系统类型。 + +假设我们想打印排出 ext3 外所有的文件系统。 + + [root@linux-world ~]# df -x ext3 + Filesystem 1K-blocks Used Available Use% Mounted on + /dev/mapper/vg00-root 17003304 809492 15307028 6% / + devtmpfs 771876 0 771876 0% /dev + tmpfs 777928 0 777928 0% /dev/shm + tmpfs 777928 8540 769388 2% /run + tmpfs 777928 0 777928 0% /sys/fs/cgroup + /dev/mapper/vg00-home 14987616 41000 14162232 1% /home + 192.168.1.5:/opensuse 301545472 266834944 19369984 94% /data + [root@linux-world ~]# + +### 例11:在 df 命令的输出中只打印特定的字段 ### + +‘**–output={field_name1,field_name2….}**‘ 选项用于显示 df 命令某些字段的输出。 + +可用的字段名有: ‘source’, ‘fstype’, ‘itotal’, ‘iused’, ‘iavail’, ‘ipcent’, ‘size’, ‘used’, ‘avail’, ‘pcent’ 和 ‘target’ + + [root@linux-world ~]# df --output=fstype,size,iused + Type 1K-blocks IUsed + ext4 17003304 22275 + devtmpfs 771876 357 + tmpfs 777928 1 + tmpfs 777928 423 + tmpfs 777928 13 + ext4 14987616 15 + ext3 487652 337 + ext3 9948012 1373 + ext3 14987656 11 + nfs4 301545472 451099 + [root@linux-world ~]# + +-------------------------------------------------------------------------------- + +via: http://www.linuxtechi.com/11-df-command-examples-in-linux/ + +作者:[Pradeep Kumar][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxtechi.com/author/pradeep/ From ccd9ccb302704185b01d14220a54143a4ecde206 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 22 Oct 2015 10:34:39 +0800 Subject: [PATCH 2320/2517] PUB:20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04 @geekpi --- ...onCube Loaders on Ubuntu 14.04 or 15.04.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md (70%) diff --git a/translated/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md b/published/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md similarity index 70% rename from translated/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md rename to published/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md index 57652e7e44..365729905c 100644 --- a/translated/tech/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md +++ b/published/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md @@ -1,10 +1,10 @@ 如何在Ubuntu 14.04 / 15.04中设置IonCube Loaders ================================================================================ -IonCube Loaders是PHP中用于辅助加速页面的加解密工具。它保护你的PHP代码不会被在未授权的计算机上查看。使用ionCube编码并加密PHP需要一个叫ionCube Loader的文件安装在web服务器上并提供给需要大量访问的PHP用。它在运行时处理并执行编码。PHP只需在‘php.ini’中添加一行就可以使用这个loader。 +IonCube Loaders是一个PHP中用于加解密的工具,并带有加速页面运行的功能。它也可以保护你的PHP代码不会查看和运行在未授权的计算机上。要使用ionCube编码、加密的PHP文件,需要在web服务器上安装一个叫ionCube Loader的文件,并需要让 PHP 可以访问到,很多 PHP 应用都在用它。它可以在运行时读取并执行编码过后的代码。PHP只需在‘php.ini’中添加一行就可以使用这个loader。 ### 前提条件 ### -在这篇文章中,我们将在Ubuntu14.04/15.04安装Ioncube Loader ,以便它可以在所有PHP模式中使用。本教程的唯一要求就是你系统安装了LEMP,并有“的php.ini”文件。 +在这篇文章中,我们将在Ubuntu14.04/15.04安装Ioncube Loader ,以便它可以在所有PHP模式中使用。本教程的唯一要求就是你系统安装了LEMP,并有“php.ini”文件。 ### 下载 IonCube Loader ### @@ -14,15 +14,15 @@ IonCube Loaders是PHP中用于辅助加速页面的加解密工具。它保护 ![download ioncube](http://blog.linoxide.com/wp-content/uploads/2015/09/download1.png) -下载完成后用下面的命令解压到"/usr/local/src/"。 +下载完成后用下面的命令解压到“/usr/local/src/"。 # tar -zxvf ioncube_loaders_lin_x86-64.tar.gz -C /usr/local/src/ ![extracting archive](http://blog.linoxide.com/wp-content/uploads/2015/09/2-extract.png) -解压完成后我们就可以看到所有的存在的模块。但是我们只需要我们安装的PHP版本的相关模块。 +解压完成后我们就可以看到所有提供的模块。但是我们只需要我们所安装的PHP版本的对应模块。 -要检查PHP版本,你可以运行下面的命令来找出相关的模块。 +要检查PHP版本,你可以运行下面的命令来找出相应的模块。 # php -v @@ -30,14 +30,14 @@ IonCube Loaders是PHP中用于辅助加速页面的加解密工具。它保护 根据上面的命令我们知道我们安装的是PHP 5.6.4,因此我们需要拷贝合适的模块到PHP模块目录下。 -首先我们在“/usr/local/”创建一个叫“ioncube”的目录并复制需要的ioncube loader到这里。 +首先我们在“/usr/local/”创建一个叫“ioncube”的目录并复制所需的ioncube loader到这里。 root@ubuntu-15:/usr/local/src/ioncube# mkdir /usr/local/ioncube root@ubuntu-15:/usr/local/src/ioncube# cp ioncube_loader_lin_5.6.so ioncube_loader_lin_5.6_ts.so /usr/local/ioncube/ ### PHP 配置 ### -我们要在位于"/etc/php5/cli/"文件夹下的"php.ini"中加入下面的配置行并重启web服务和php模块。 +我们要在位于"/etc/php5/cli/"文件夹下的"php.ini"中加入如下的配置行并重启web服务和php模块。 # vim /etc/php5/cli/php.ini @@ -54,7 +54,6 @@ IonCube Loaders是PHP中用于辅助加速页面的加解密工具。它保护 要为我们的网站测试ioncube loader。用下面的内容创建一个"info.php"文件并放在网站的web目录下。 - # vim /usr/share/nginx/html/info.php 加入phpinfo的脚本后重启web服务后用域名或者ip地址访问“info.php”。 @@ -63,7 +62,6 @@ IonCube Loaders是PHP中用于辅助加速页面的加解密工具。它保护 ![php info](http://blog.linoxide.com/wp-content/uploads/2015/09/php-info.png) -From the terminal issue the following command to verify the php version that shows the ionCube PHP Loader is Enabled. 在终端中运行下面的命令来验证php版本并显示PHP Loader已经启用了。 # php -v @@ -74,7 +72,7 @@ From the terminal issue the following command to verify the php version that sho ### 总结 ### -教程的最后你已经了解了在安装有nginx的Ubuntu中安装和配置ionCube Loader,如果你正在使用其他的web服务,这与其他服务没有明显的差别。因此做完这些安装Loader是很简单的,并且在大多数服务器上的安装都不会有问题。然而并没有一个所谓的“标准PHP安装”,服务可以通过许多方式安装,并启用或者禁用功能。 +教程的最后你已经了解了如何在安装有nginx的Ubuntu中安装和配置ionCube Loader,如果你正在使用其他的web服务,这与其他服务没有明显的差别。因此安装Loader是很简单的,并且在大多数服务器上的安装都不会有问题。然而并没有一个所谓的“标准PHP安装”,服务可以通过许多方式安装,并启用或者禁用功能。 如果你是在共享服务器上,那么确保运行了ioncube-loader-helper.php脚本,并点击链接来测试运行时安装。如果安装时你仍然遇到了问题,欢迎联系我们及给我们留下评论。 @@ -84,7 +82,7 @@ via: http://linoxide.com/ubuntu-how-to/setup-ioncube-loaders-ubuntu-14-04-15-04/ 作者:[Kashif Siddique][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8410725bf5c92232e296efc5b0ae382dd7bbcacd Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 22 Oct 2015 12:01:54 +0800 Subject: [PATCH 2321/2517] =?UTF-8?q?20151022-1=20=E9=80=89=E9=A2=98=20str?= =?UTF-8?q?uggling=20=E6=8E=A8=E8=8D=90=E5=B9=B6=E8=AE=A4=E9=A2=86?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ips for Improving WordPress Performance.md | 513 ++++++++++++++++++ 1 file changed, 513 insertions(+) create mode 100644 sources/tech/20151022 9 Tips for Improving WordPress Performance.md diff --git a/sources/tech/20151022 9 Tips for Improving WordPress Performance.md b/sources/tech/20151022 9 Tips for Improving WordPress Performance.md new file mode 100644 index 0000000000..8aab6b8f49 --- /dev/null +++ b/sources/tech/20151022 9 Tips for Improving WordPress Performance.md @@ -0,0 +1,513 @@ +struggling 翻译中... +9 Tips for Improving WordPress Performance +================================================================================ +WordPress is the single largest platform for website creation and web application delivery worldwide. About [a quarter][1] of all sites are now built on open-source WordPress software, including sites for eBay, Mozilla, RackSpace, TechCrunch, CNN, MTV, the New York Times, the Wall Street Journal. + +WordPress.com, the most popular site for user-created blogs, also runs on WordPress open source software. [NGINX powers WordPress.com][2]. Among WordPress customers, many sites start on WordPress.com and then move to hosted WordPress open-source software; more and more of these sites use NGINX software as well. + +WordPress’ appeal is its simplicity, both for end users and for implementation. However, the architecture of a WordPress site presents problems when usage ramps upward – and several steps, including caching and combining WordPress and NGINX, can solve these problems. + +In this blog post, we provide nine performance tips to help overcome typical WordPress performance challenges: + +- [Cache static resources][3] +- [Cache dynamic files][4] +- [Move to NGINX][5] +- [Add permalink support to NGINX][6] +- [Configure NGINX for FastCGI][7] +- [Configure NGINX for W3_Total_Cache][8] +- [Configure NGINX for WP-Super-Cache][9] +- [Add security precautions to your NGINX configuration][10] +- [Configure NGINX to support WordPress Multisite][11] + +### WordPress Performance on LAMP Sites ### + +Most WordPress sites are run on a traditional LAMP software stack: the Linux OS, Apache web server software, MySQL database software – often on a separate database server – and the PHP programming language. Each of these is a very well-known, widely used, open source tool. Most people in the WordPress world “speak” LAMP, so it’s easy to get help and support. + +When a user visits a WordPress site, a browser running the Linux/Apache combination creates six to eight connections per user. As the user moves around the site, PHP assembles each page on the fly, grabbing resources from the MySQL database to answer requests. + +LAMP stacks work well for anywhere from a few to, perhaps, hundreds of simultaneous users. However, sudden increases in traffic are common online and – usually – a good thing. + +But when a LAMP-stack site gets busy, with the number of simultaneous users climbing into the many hundreds or thousands, it can develop serious bottlenecks. Two main causes of bottlenecks are: + +1. The Apache web server – Apache consumes substantial resources for each and every connection. If Apache accepts too many simultaneous connections, memory can be exhausted and performance slows because data has to be paged back and forth to disk. If connections are limited to protect response time, new connections have to wait, which also leads to a poor user experience. +1. The PHP/MySQL interaction – Together, an application server running PHP and a MySQL database server can serve a maximum number of requests per second. When the number of requests exceeds the maximum, users have to wait. Exceeding the maximum by a relatively small amount can cause a large slowdown in responsiveness for all users. Exceeding it by two or more times can cause significant performance problems. + +The performance bottlenecks in a LAMP site are particularly resistant to the usual instinctive response, which is to upgrade to more powerful hardware – more CPUs, more disk space, and so on. Incremental increases in hardware performance can’t keep up with the exponential increases in demand for system resources that Apache and the PHP/MySQL combination experience when they get overloaded. + +The leading alternative to a LAMP stack is a LEMP stack – Linux, NGINX, MySQL, and PHP. (In the LEMP acronym, the E stands for the sound at the start of “engine-x.”) We describe a LEMP stack in [Tip 3][12]. + +### Tip 1. Cache Static Resources ### + +Static resources are unchanging files such as CSS files, JavaScript files, and image files. These files often make up half or more of the data on a web page. The remainder of the page is dynamically generated content like comments in a forum, a performance dashboard, or personalized content (think Amazon.com product recommendations). + +Caching static resources has two big benefits: + +- Faster delivery to the user – The user gets the static file from their browser cache or a caching server closer to them on the Internet. These are sometimes big files, so reducing latency for them helps a lot. +- Reduced load on the application server – Every file that’s retrieved from a cache is one less request the web server has to process. The more you cache, the more you avoid thrashing because resources have run out. + +To support browser caching, set the correct HTTP headers for static files. Look into the HTTP Cache-Control header, specifically the max-age setting, the Expires header, and Entity tags. You can find a good introduction [here][13]. + +When local caching is enabled and a user requests a previously accessed file, the browser first checks whether the file is in the cache. If so, it asks the web server if the file has changed. If the file hasn’t changed, the web server can respond immediately with code 304 (Not Modified) meaning that the file is unchanged, instead of returning code 200 OK and then retrieving and delivering the changed file. + +To support caching beyond the browser, consider the Tips below, and consider a content delivery network (CDN).CDNs are a popular and powerful tool for caching, but we don’t describe them in detail here. Consider a CDN after you implement the other techniques mentioned here. Also, CDNs may be less useful as you transition your site from HTTP/1.x to the new HTTP/2 standard; investigate and test as needed to find the right answer for your site. + +If you move to NGINX Plus or the open source NGINX software as part of your software stack, as suggested in [Tip 3][14], then configure NGINX to cache static resources. Use the following configuration, replacing www.example.com with the URL of your web server. + + server { + # substitute your web server's URL for www.example.com + server_name www.example.com; + root /var/www/example.com/htdocs; + index index.php; + + access_log /var/log/nginx/example.com.access.log; + error_log /var/log/nginx/example.com.error.log; + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ \.php$ { + try_files $uri =404; + include fastcgi_params; + # substitute the socket, or address and port, of your WordPress server + fastcgi_pass unix:/var/run/php5-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + } + + location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { + expires max; + log_not_found off; + access_log off; + } + } + +### Tip 2. Cache Dynamic Files ### + +WordPress generates web pages dynamically, meaning that it generates a given web page every time it is requested (even if the result is the same as the time before). This means that users always get the freshest content. + +Think of a user visiting a blog post that has comments enabled at the bottom of the post. You want the user to see all comments – even a comment that just came in a moment ago. Dynamic content makes this happen. + +But now let’s say that the blog post is getting ten or twenty requests per second. The application server might start to thrash under the pressure of trying to regenerate the page so often, causing big delays. The goal of delivering the latest content to new visitors becomes relevant only in theory, because they’re have to wait so long to get the page in the first place. + +To prevent page delivery from slowing down due to increasing load, cache the dynamic file. This makes the file less dynamic, but makes the whole system more responsive. + +To enable caching in WordPress, use one of several popular plug-ins – described below. A WordPress caching plug-in asks for a fresh page, then caches it for a brief period of time – perhaps just a few seconds. So, if the site is getting several requests a second, most users get their copy of the page from the cache. This helps the retrieval time for all users: + +- Most users get a cached copy of the page. The application server does no work at all. +- Users who do get a fresh copy get it fast. The application server only has to generate a fresh page every so often. When the server does generate a fresh page (for the first user to come along after the cached page expires), it does this much faster because it’s not overloaded with requests. + +You can cache dynamic files for WordPress running on a LAMP stack or on a [LEMP stack][15] (described in [Tip 3][16]). There are several caching plug-ins you can use with WordPress. Here are the most popular caching plug-ins and caching techniques, listed from the simplest to the most powerful: + +- [Hyper-Cache][17] and [Quick-Cache][18] – These two plug-ins create a single PHP file for each WordPress page or post. This supports some dynamic functionality while bypassing much WordPress core processing and the database connection, creating a faster user experience. They don’t bypass all PHP processing, so they don’t give the same performance boost as the following options. They also don’t require changes to the NGINX configuration. +- [WP Super Cache][19] – The most popular caching plug-in for WordPress. It has many settings, which are presented through an easy-to-use interface, shown below. We show a sample NGINX configuration in [Tip 7][20]. +- [W3 Total Cache][21] – This is the second most popular cache plug-in for WordPress. It has even more option settings than WP Super Cache, making it a powerful but somewhat complex option. For a sample NGINX configuration, see [Tip 6][22]. +- [FastCGI][23] – CGI stands for Common Gateway Interface, a language-neutral way to request and receive files on the Internet. FastCGI is not a plug-in but a way to interact with a cache. FastCGI can be used in Apache as well as in NGINX, where it’s the most popular dynamic caching approach; we describe how to configure NGINX to use it in [Tip 5][24]. + +The documentation for these plug-ins and techniques explains how to configure them in a typical LAMP stack. Configuration options include database and object caching; minification for HTML, CSS, and JavaScript files; and integration options for popular CDNs. For NGINX configuration, see the Tips referenced in the list. + +**Note**: Caches do not work for users who are logged into WordPress, because their view of WordPress pages is personalized. (For most sites, only a small minority of users are likely to be logged in.) Also, most caches do not show a cached page to users who have recently left a comment, as that user will want to see their comment appear when they refresh the page. To cache the non-personalized content of a page, you can use a technique called [fragment caching][25], if it’s important to overall performance. + +### Tip 3. Move to NGINX ### + +As mentioned above, Apache can cause performance problems when the number of simultaneous users rises above a certain point – perhaps hundreds of simultaneous users. Apache allocates substantial resources to each connection, and therefore tends to run out of memory. Apache can be configured to limit connections to avoid exhausting memory, but that means, when the limit is exceeded, new connection requests have to wait. + +In addition, Apache loads another copy of the mod_php module into memory for every connection, even if it’s only serving static files (images, CSS, JavaScript, etc.). This consumes even more resources for each connection and limits the capacity of the server further. + +To start solving these problems, move from a LAMP stack to a LEMP stack – replace Apache with (e)NGINX. NGINX handles many thousands of simultaneous connections in a fixed memory footprint, so you don’t have to experience thrashing, nor limit simultaneous connections to a small number. + +NGINX also deals with static files better, with built-in, easily tuned [caching][26] controls. The load on the application server is reduced, and your site can serve far more traffic with a faster, more enjoyable experience for your users. + +You can use NGINX on all the web servers in your deployment, or you can put an NGINX server “in front” of Apache as a reverse proxy – the NGINX server receives client requests, serves static files, and sends PHP requests to Apache, which processes them. + +For dynamically generated pages – the core use case for WordPress experience – choose a caching tool, as described in [Tip 2][27]. In the Tips below, you can find NGINX configuration suggestions for FastCGI, W3_Total_Cache, and WP-Super-Cache. (Hyper-Cache and Quick-Cache don’t require changes to NGINX configuration.) + +**Tip.** Caches are typically saved to disk, but you can use [tmpfs][28] to store the cache in memory and increase performance. + +Setting up NGINX for WordPress is easy. Just follow these four steps, which are described in further detail in the indicated Tips: + +1. Add permalink support – Add permalink support to NGINX. This eliminates dependence on the **.htaccess** configuration file, which is Apache-specific. See [Tip 4][29]. +1. Configure for caching – Choose a caching tool and implement it. Choices include FastCGI cache, W3 Total Cache, WP Super Cache, Hyper Cache, and Quick Cache. See Tips [5][30], [6][31], and [7][32]. +1. Implement security precautions – Adopt best practices for WordPress security on NGINX. See [Tip 8][33]. +1. Configure WordPress Multisite – If you use WordPress Multisite, configure NGINX for a subdirectory, subdomain, or multiple-domain architecture. See [Tip 9][34]. + +### Tip 4. Add Permalink Support to NGINX ### + +Many WordPress sites depend on **.htaccess** files, which are required for several WordPress features, including permalink support, plug-ins, and file caching. NGINX does not support **.htaccess** files. Fortunately, you can use NGINX’s simple, yet comprehensive, configuration language to achieve most of the same functionality. + +You can enable [Permalinks][35] in WordPress with NGINX by including the following location block in your main [server][36] block. (This location block is also included in other code samples below.) + +The **try_files** directive tells NGINX to check whether the requested URL exists as a file ( **$uri**) or directory (**$uri/**) in the document root, **/var/www/example.com/htdocs**. If not, NGINX does a redirect to **/index.php**, passing the query string arguments as parameters. + + server { + server_name example.com www.example.com; + root /var/www/example.com/htdocs; + index index.php; + + access_log /var/log/nginx/example.com.access.log; + error_log /var/log/nginx/example.com.error.log; + + location / { + try_files $uri $uri/ /index.php?$args; + } + } + +### Tip 5. Configure NGINX for FastCGI ### + +NGINX can cache responses from FastCGI applications like PHP. This method offers the best performance. + +For NGINX open source, compile in the third-party module [ngx_cache_purge][37], which provides cache purging capability, and use the configuration code below. NGINX Plus includes its own implementation of this code. + +When using FastCGI, we recommend you install the [Nginx Helper plug-in][38] and use a configuration such as the one below, especially the use of **fastcgi_cache_key** and the location block including **fastcgi_cache_purge**. The plug-in automatically purges your cache when a page or a post is published or modified, a new comment is published, or the cache is manually purged from the WordPress Admin Dashboard. + +The Nginx Helper plug-in can also add a short HTML snippet to the bottom of your pages, confirming the cache is working and displaying some statistics. (You can also confirm the cache is functioning properly using the [$upstream_cache_status][39] variable.) + +fastcgi_cache_path /var/run/nginx-cache levels=1:2 + keys_zone=WORDPRESS:100m inactive=60m; +fastcgi_cache_key "$scheme$request_method$host$request_uri"; + + server { + server_name example.com www.example.com; + root /var/www/example.com/htdocs; + index index.php; + + access_log /var/log/nginx/example.com.access.log; + error_log /var/log/nginx/example.com.error.log; + + set $skip_cache 0; + + # POST requests and urls with a query string should always go to PHP + if ($request_method = POST) { + set $skip_cache 1; + } + + if ($query_string != "") { + set $skip_cache 1; + } + + # Don't cache uris containing the following segments + if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php + |sitemap(_index)?.xml") { + set $skip_cache 1; + } + + # Don't use the cache for logged in users or recent commenters + if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass + |wordpress_no_cache|wordpress_logged_in") { + set $skip_cache 1; + } + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ \.php$ { + try_files $uri /index.php; + include fastcgi_params; + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_cache_bypass $skip_cache; + fastcgi_no_cache $skip_cache; + fastcgi_cache WORDPRESS; + fastcgi_cache_valid 60m; + } + + location ~ /purge(/.*) { + fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; + } + + location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png + |ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { + + access_log off; + log_not_found off; + expires max; + } + + location = /robots.txt { + access_log off; + log_not_found off; + } + + location ~ /\. { + deny all; + access_log off; + log_not_found off; + } + } + +### Tip 6. Configure NGINX for W3_Total_Cache ### + +[W3 Total Cache][40], by Frederick Townes of [W3-Edge][41], is a WordPress caching framework that supports NGINX. It’s an alternative to FastCGI cache with a wide range of option settings. + +The caching plug-in offers a variety of caching configurations and also includes options for database and object caching, minification of HTML, CSS, and JavaScript, as well as options to integrate with popular CDNs. + +The plug-in handles NGINX configuration by writing to an NGINX configuration file located in the root directory of your domain. + + server { + server_name example.com www.example.com; + + root /var/www/example.com/htdocs; + index index.php; + access_log /var/log/nginx/example.com.access.log; + error_log /var/log/nginx/example.com.error.log; + + include /path/to/wordpress/installation/nginx.conf; + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ \.php$ { + try_files $uri =404; + include fastcgi_params; + fastcgi_pass unix:/var/run/php5-fpm.sock; + } + } + +### Tip 7. Configure NGINX for WP Super Cache ### + +[WP Super Cache][42] by Donncha O Caoimh, a WordPress developer at [Automattic][43], is a WordPress caching engine that turns dynamic WordPress pages into static HTML files that NGINX can serve very quickly. It was one of the first caching plug-ins for WordPress and has a smaller, more focused range of options than others. + +NGINX configurations for WP-Super-Cache can vary depending on your preference. One possible configuration follows. + +In the configuration below, the location block with supercache named in it is the WP Super Cache-specific part, and is needed for the configuration to work. The rest of the code is made up of WordPress rules for not caching users who are logged into WordPress, not caching POST requests, and setting expires headers for static assets, plus standard PHP implementation; these parts can be customized to fit your needs. + + server { + server_name example.com www.example.com; + root /var/www/example.com/htdocs; + index index.php; + + access_log /var/log/nginx/example.com.access.log; + error_log /var/log/nginx/example.com.error.log debug; + + set $cache_uri $request_uri; + + # POST requests and urls with a query string should always go to PHP + if ($request_method = POST) { + set $cache_uri 'null cache'; + } + if ($query_string != "") { + set $cache_uri 'null cache'; + } + + # Don't cache uris containing the following segments + if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php + |wp-.*.php|/feed/|index.php|wp-comments-popup.php + |wp-links-opml.php|wp-locations.php |sitemap(_index)?.xml + |[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { + + set $cache_uri 'null cache'; + } + + # Don't use the cache for logged-in users or recent commenters + if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+ + |wp-postpass|wordpress_logged_in") { + set $cache_uri 'null cache'; + } + + # Use cached or actual file if it exists, otherwise pass request to WordPress + location / { + try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html + $uri $uri/ /index.php; + } + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + log_not_found off + access_log off; + } + + location ~ .php$ { + try_files $uri /index.php; + include fastcgi_params; + fastcgi_pass unix:/var/run/php5-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + } + + # Cache static files for as long as possible + location ~*.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css + |rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2 + |doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { + expires max; + log_not_found off; + access_log off; + } + } + +### Tip 8. Add Security Precautions to Your NGINX Configuration ### + +To protect against attacks, you can control access to key resources and limit the ability of bots to overload the login utility. + +Allow only specific IP addresses to access the WordPress Dashboard. + + # Restrict access to WordPress Dashboard + location /wp-admin { + deny 192.192.9.9; + allow 192.192.1.0/24; + allow 10.1.1.0/16; + deny all; + } + +Only allow uploading of specific types of files to prevent programs with malicious intent from being uploaded and running. + + # Deny access to uploads which aren’t images, videos, music, etc. + location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php|js|swf)$ { + deny all; + } + +Deny access to **wp-config.php**, the WordPress configuration file. Another way to deny access is to move the file one directory level above the domain root. + + # Deny public access to wp-config.php + location ~* wp-config.php { + deny all; + } + +Rate limit **wp-login.php** to block against brute force attacks. + + # Deny access to wp-login.php + location = /wp-login.php { + limit_req zone=one burst=1 nodelay; + fastcgi_pass unix:/var/run/php5-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + } + +### Tip 9. Use NGINX with WordPress Multisite ### + +WordPress Multisite, as its name implies, is a version of WordPress software that allows you to manage two or more sites from a single WordPress instance. The [WordPress.com][44] service, which hosts thousands of user blogs, is run from WordPress Multisite. + +You can run separate sites from either subdirectories of a single domain or from separate subdomains. + +Use this code block to add support for a subdirectory structure. + + # Add support for subdirectory structure in WordPress Multisite + if (!-e $request_filename) { + rewrite /wp-admin$ $scheme://$host$uri/ permanent; + rewrite ^(/[^/]+)?(/wp-.*) $2 last; + rewrite ^(/[^/]+)?(/.*\.php) $2 last; + } + +Use this code block instead of the code block above to add support for a subdirectory structure, substituting your own subdirectory names. + + # Add support for subdomains + server_name example.com *.example.com; + +Older versions of WordPress Multisite (3.4 and earlier) use readfile() to serve static content. However, readfile() is PHP code, which causes a significant performance hit when it executes. We can use NGINX to bypass this unnecessary PHP processing. The code snippets below are separated by separator lines (==============). + + # Avoid PHP readfile() for /blogs.dir/structure in the subdirectory path. + location ^~ /blogs.dir { + internal; + alias /var/www/example.com/htdocs/wp-content/blogs.dir; + access_log off; + log_not_found off; + expires max; + } + + ============================================================ + + # Avoid php readfile() for /files/structure in the subdirectory path + location ~ ^(/[^/]+/)?files/(?.+) { + try_files /wp-content/blogs.dir/$blogid/files/$rt_file /wp-includes/ms-files.php?file=$rt_file; + access_log off; + log_not_found off; + expires max; + } + + ============================================================ + + # WPMU files structure for the subdomain path + location ~ ^/files/(.*)$ { + try_files /wp-includes/ms-files.php?file=$1 =404; + access_log off; + log_not_found off; + expires max; + } + + ============================================================ + + # Map blog ID to specific directory + map $http_host $blogid { + default 0; + example.com 1; + site1.example.com 2; + site1.com 2; + } + +### Conclusion ### + +Scalability is a challenge for more and more site developers as they achieve success with their WordPress sites. (And for new sites that want to head WordPress performance problems off at the pass.) Adding WordPress caching, and combining WordPress and NGINX, are solid answers. + +NGINX is not only useful with WordPress sites. NGINX is the [leading web server][45] among the busiest 1,000, 10,000, and 100,000 sites in the world. + +For more on NGINX performance, see our recent blog post, [10 Tips for 10x Application Performance][46]. + +NGINX software comes in two versions: + +- NGINX open source software – Like WordPress, this is software you download, configure, and compile yourself. +- NGINX Plus – NGINX Plus includes a pre-built reference version of the software, as well as service and technical support. + +To get started, go to [nginx.org][47] for the open source software or check out [NGINX Plus][48]. + +-------------------------------------------------------------------------------- + +via: https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/ + +作者:[Floyd Smith][a] +译者:[译者ID](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/floyd/ +[1]:http://w3techs.com/technologies/overview/content_management/all +[2]:https://www.nginx.com/press/choosing-nginx-growth-wordpresscom/ +[3]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#cache-static +[4]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#cache-dynamic +[5]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx +[6]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#permalink +[7]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#fastcgi +[8]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#w3-total-cache +[9]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#wp-super-cache +[10]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#security +[11]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#multisite +[12]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx +[13]:http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/ +[14]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx +[15]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#lamp +[16]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx +[17]:https://wordpress.org/plugins/hyper-cache/ +[18]:https://wordpress.org/plugins/quick-cache/ +[19]:https://wordpress.org/plugins/wp-super-cache/ +[20]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#wp-super-cache +[21]:https://wordpress.org/plugins/w3-total-cache/ +[22]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#w3-total-cache +[23]:http://www.fastcgi.com/ +[24]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#fastcgi +[25]:https://css-tricks.com/wordpress-fragment-caching-revisited/ +[26]:https://www.nginx.com/resources/admin-guide/content-caching/ +[27]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#cache-dynamic +[28]:https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt +[29]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#permalink +[30]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#fastcgi +[31]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#w3-total-cache +[32]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#wp-super-cache +[33]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#security +[34]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#multisite +[35]:http://codex.wordpress.org/Using_Permalinks +[36]:http://nginx.org/en/docs/http/ngx_http_core_module.html#server +[37]:https://github.com/FRiCKLE/ngx_cache_purge +[38]:https://wordpress.org/plugins/nginx-helper/ +[39]:http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables +[40]:https://wordpress.org/plugins/w3-total-cache/ +[41]:http://www.w3-edge.com/ +[42]:https://wordpress.org/plugins/wp-super-cache/ +[43]:http://automattic.com/ +[44]:https://wordpress.com/ +[45]:http://w3techs.com/technologies/cross/web_server/ranking +[46]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/ +[47]:http://www.nginx.org/en +[48]:https://www.nginx.com/products/ +[49]: +[50]: \ No newline at end of file From 7392383b7f0381db2e3899d8d3d3d4d3a75029ac Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 22 Oct 2015 12:39:04 +0800 Subject: [PATCH 2322/2517] PUB:Part 1 - RHCE Series--How to Setup and Test Static Network Routing @ictlyh --- ...o Setup and Test Static Network Routing.md | 77 ++++++++++--------- 1 file changed, 39 insertions(+), 38 deletions(-) rename {translated/tech => published}/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md (61%) diff --git a/translated/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md b/published/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md similarity index 61% rename from translated/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md rename to published/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md index 03038b92d5..2e20280ecd 100644 --- a/translated/tech/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md +++ b/published/RHCE/Part 1 - RHCE Series--How to Setup and Test Static Network Routing.md @@ -1,27 +1,28 @@ -RHCE 系列第一部分:如何设置和测试静态网络路由 +RHCE 系列(一):如何设置和测试静态网络路由 ================================================================================ RHCE(Red Hat Certified Engineer,红帽认证工程师)是红帽公司的一个认证,红帽向企业社区贡献开源操作系统和软件,同时它还给公司提供训练、支持和咨询服务。 ![RHCE 考试准备指南](http://www.tecmint.com/wp-content/uploads/2015/07/RHCE-Exam-Series-by-TecMint.jpg) -RHCE 考试准备指南 +*RHCE 考试准备指南* -这个 RHCE 是基于性能的考试(代号 EX300),面向那些拥有更多的技能、知识和能力的红帽企业版 Linux(RHEL)系统高级系统管理员。 +这个 RHCE 是一个绩效考试(代号 EX300),面向那些拥有更多的技能、知识和能力的红帽企业版 Linux(RHEL)系统高级系统管理员。 **重要**: [红帽认证系统管理员][1] (Red Hat Certified System Administrator,RHCSA)认证要求先有 RHCE 认证。 以下是基于红帽企业版 Linux 7 考试的考试目标,我们会在该 RHCE 系列中分别介绍: - 第一部分:如何在 RHEL 7 中设置和测试静态路由 -- 第二部分:如果进行包过滤、网络地址转换和设置内核运行时参数 -- 第三部分:如果使用 Linux 工具集产生和发送系统活动报告 +- 第二部分:如何进行包过滤、网络地址转换和设置内核运行时参数 +- 第三部分:如何使用 Linux 工具集产生和发送系统活动报告 - 第四部分:使用 Shell 脚本进行自动化系统维护 -- 第五部分:如果配置本地和远程系统日志 -- 第六部分:如果配置一个 Samba 服务器或 NFS 服务器(译者注:Samba 是在 Linux 和 UNI X系统上实现 SMB 协议的一个免费软件,由服务器及客户端程序构成。SMB,Server Messages Block,信息服务块,是一种在局域网上共享文件和打印机的一种通信协议,它为局域网内的不同计算机之间提供文件及打印机等资源的共享服务。) -- 第七部分:为收发邮件配置完整的 SMTP 服务器 -- 第八部分:在 RHEL 7 上设置 HTTPS 和 TLS -- 第九部分:设置网络时间协议 -- 第十部分:如何配置一个 Cache-Only DNS 服务器 +- 第五部分:如何在 RHEL 7 中管理系统日志(配置、轮换和导入到数据库) +- 第六部分:设置 Samba 服务器并配置 FirewallD 和 SELinux 支持客户端文件共享 +- 第七部分:设置 NFS 服务器及基于 Kerberos 认证的客户端 +- 第八部分:在 Apache 上使用网络安全服务(NSS)通过 TLS 提供 HTTPS 服务 +- 第九部分:如何使用无客户端配置来设置 Postfix 邮件服务器(SMTP) +- 第十部分:在 RHEL/CentOS 7 中设置网络时间协议(NTP)服务器 +- 第十一部分:如何配置一个只缓存的 DNS 服务器 在你的国家查看考试费用和注册考试,可以到 [RHCE 认证][2] 网页。 @@ -29,31 +30,31 @@ RHCE 考试准备指南 ![在 RHEL 中设置静态网络路由](http://www.tecmint.com/wp-content/uploads/2015/07/Setup-Static-Network-Routing-in-RHEL-7.jpg) -RHCE 系列第一部分:设置和测试网络静态路由 +*RHCE 系列第一部分:设置和测试网络静态路由* 请注意我们不会作深入的介绍,但以这种方式组织内容能帮助你开始第一步并继续后面的内容。 ### 红帽企业版 Linux 7 中的静态路由 ### -现代网络的一个奇迹就是有很多可用的设备能将一组计算机连接起来,不管是在一个房间里少量的机器还是在一栋建筑物、城市、国家或者大洲之间的多台机器。 +现代网络的一个奇迹就是有很多可用设备能将一组计算机连接起来,不管是在一个房间里少量的机器还是在一栋建筑物、城市、国家或者大洲之间的多台机器。 然而,为了能在任意情形下有效的实现这些,需要对网络包进行路由,或者换句话说,它们从源到目的地的路径需要按照某种规则。 -静态路由是为网络包指定一个路由的过程,而不是使用网络设备提供的默认网关。除非另有指定,否则通过路由,网络包会被导向默认网关;基于预定义的标准,例如数据包目的地,使用静态路由可以定义其它路径。 +静态路由是为网络包指定一个路由的过程,而不是使用网络设备提供的默认网关。除非另有指定静态路由,网络包会被导向默认网关;而静态路由则基于预定义标准所定义的其它路径,例如数据包目的地。 -我们在该篇指南中会考虑以下场景。我们有一台红帽企业版 Linux 7,连接到路由器 1号 [192.168.0.1] 以访问因特网以及 192.168.0.0/24 中的其它机器。 +我们在该篇指南中会考虑以下场景。我们有一台 RHEL 7,连接到 1号路由器 [192.168.0.1] 以访问因特网以及 192.168.0.0/24 中的其它机器。 -第二个路由器(路由器 2号)有两个网卡:enp0s3 同样通过网络连接到路由器 1号,以便连接RHEL 7 以及相同网络中的其它机器,另外一个网卡(enp0s8)用于授权访问内部服务所在的 10.0.0.0/24 网络,例如 web 或数据库服务器。 +第二个路由器(2号路由器)有两个网卡:enp0s3 同样连接到路由器1号以访问互联网,及与 RHEL 7 和同一网络中的其它机器通讯,另外一个网卡(enp0s8)用于授权访问内部服务所在的 10.0.0.0/24 网络,例如 web 或数据库服务器。 该场景可以用下面的示意图表示: ![静态路由网络示意图](http://www.tecmint.com/wp-content/uploads/2015/07/Static-Routing-Network-Diagram.png) -静态路由网络示意图 +*静态路由网络示意图* -在这篇文章中我们会集中介绍在 RHEL 7 中设置路由表,确保它能通过路由器 1号访问因特网以及通过路由器 2号访问内部网络。 +在这篇文章中我们会集中介绍在 RHEL 7 中设置路由表,确保它能通过1号路由器访问因特网以及通过2号路由器访问内部网络。 -在 RHEL 7 中,你会通过命令行用 [命令 ip][3] 配置和显示设备和路由。这些更改能在运行的系统中及时生效,但由于重启后不会保存,我们会使用 /etc/sysconfig/network-scripts 目录下的 ifcfg-enp0sX 和 route-enp0sX 文件永久保存我们的配置。 +在 RHEL 7 中,你可以通过命令行用 [ip 命令][3] 配置和显示设备和路由。这些更改能在运行的系统中及时生效,但由于重启后不会保存,我们会使用 `/etc/sysconfig/network-scripts` 目录下的 `ifcfg-enp0sX` 和 `route-enp0sX` 文件永久保存我们的配置。 首先,让我们打印出当前的路由表: @@ -61,15 +62,15 @@ RHCE 系列第一部分:设置和测试网络静态路由 ![在 Linux 中检查路由表](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Current-Routing-Table.png) -检查当前路由表 +*检查当前路由表* 从上面的输出中,我们可以得出以下结论: - 默认网关的 IP 是 192.168.0.1,可以通过网卡 enp0s3 访问。 -- 系统启动的时候,它启用了到 169.254.0.0/16 的 zeroconf 路由(只是在本例中)。也就是说,如果机器设置为通过 DHCP 获取一个 IP 地址,但是由于某些原因失败了,它就会在该网络中自动分配到一个地址。这一行的意思是,该路由会允许我们通过 enp0s3 和其它没有从 DHCP 服务器中成功获得 IP 地址的机器机器连接。 -- 最后,但同样重要的是,我们也可以通过 IP 地址是 192.168.0.18 的 enp0s3 和 192.168.0.0/24 网络中的其它机器连接。 +- 系统启动的时候,它启用了到 169.254.0.0/16 的 zeroconf 路由(只是在本例中)。也就是说,如果机器设置通过 DHCP 获取 IP 地址,但是由于某些原因失败了,它就会在上述网段中自动分配到一个地址。这一行的意思是,该路由会允许我们通过 enp0s3 和其它没有从 DHCP 服务器中成功获得 IP 地址的机器机器相连接。 +- 最后,但同样重要的是,我们也可以通过 IP 地址是 192.168.0.18 的 enp0s3 与 192.168.0.0/24 网络中的其它机器连接。 -下面是这样的配置中你需要做的一些典型任务。除非另有说明,下面的任务都在路由器 2号上进行。 +下面是这样的配置中你需要做的一些典型任务。除非另有说明,下面的任务都在2号路由器上进行。 确保正确安装了所有网卡: @@ -88,7 +89,7 @@ RHCE 系列第一部分:设置和测试网络静态路由 # ip addr del 10.0.0.17 dev enp0s8 # ip addr add 10.0.0.18 dev enp0s8 -现在,请注意你只能添加一个通过已经能访问的网关到目标网络的路由。因为这个原因,我们需要在 192.168.0.0/24 范围中给 enp0s3 分配一个 IP 地址,这样我们的 RHEL 7 才能连接到它: +现在,请注意你只能添加一个通过网关到目标网络的路由,网关需要可以访问到。因为这个原因,我们需要在 192.168.0.0/24 范围中给 enp0s3 分配一个 IP 地址,这样我们的 RHEL 7 才能连接到它: # ip addr add 192.168.0.19 dev enp0s3 @@ -101,7 +102,7 @@ RHCE 系列第一部分:设置和测试网络静态路由 # systemctl stop firewalld # systemctl disable firewalld -回到我们的 RHEL 7(192.168.0.18),让我们配置一个通过 192.168.0.19(路由器 2号的 enp0s3)到 10.0.0.0/24 的路由: +回到我们的 RHEL 7(192.168.0.18),让我们配置一个通过 192.168.0.19(2号路由器的 enp0s3)到 10.0.0.0/24 的路由: # ip route add 10.0.0.0/24 via 192.168.0.19 @@ -111,7 +112,7 @@ RHCE 系列第一部分:设置和测试网络静态路由 ![显示网络路由表](http://www.tecmint.com/wp-content/uploads/2015/07/Show-Network-Routing.png) -确认网络路由表 +*确认网络路由表* 同样,在你尝试连接的 10.0.0.0/24 网络的机器中添加对应的路由: @@ -131,13 +132,13 @@ RHCE 系列第一部分:设置和测试网络静态路由 192.168.0.18 也就是我们的 RHEL 7 机器的 IP 地址。 -另外,我们还可以使用 [tcpdump][4](需要通过 yum install tcpdump 安装)来检查我们 RHEL 7 和 10.0.0.20 中 web 服务器之间的 TCP 双向通信。 +另外,我们还可以使用 [tcpdump][4](需要通过 `yum install tcpdump` 安装)来检查我们 RHEL 7 和 10.0.0.20 中 web 服务器之间的 TCP 双向通信。 首先在第一台机器中启用日志: # tcpdump -qnnvvv -i enp0s3 host 10.0.0.20 -在同一个系统上的另一个终端,让我们通过 telnet 连接到 web 服务器的 80 号端口(假设 Apache 正在监听该端口;否则在下面命令中使用正确的端口): +在同一个系统上的另一个终端,让我们通过 telnet 连接到 web 服务器的 80 号端口(假设 Apache 正在监听该端口;否则应在下面命令中使用正确的监听端口): # telnet 10.0.0.20 80 @@ -145,7 +146,7 @@ tcpdump 日志看起来像下面这样: ![检查服务器之间的网络连接](http://www.tecmint.com/wp-content/uploads/2015/07/Tcpdump-logs.png) -检查服务器之间的网络连接 +*检查服务器之间的网络连接* 通过查看我们 RHEL 7(192.168.0.18)和 web 服务器(10.0.0.20)之间的双向通信,可以看出已经正确地初始化了连接。 @@ -162,7 +163,7 @@ tcpdump 日志看起来像下面这样: # Device used to connect to default gateway. Replace X with the appropriate number. GATEWAYDEV=enp0sX -当需要为每个网卡设置特定的变量和值时(正如我们在路由器 2号上面做的),你需要编辑 /etc/sysconfig/network-scripts/ifcfg-enp0s3 和 /etc/sysconfig/network-scripts/ifcfg-enp0s8 文件。 +当需要为每个网卡设置特定的变量和值时(正如我们在2号路由器上面做的),你需要编辑 `/etc/sysconfig/network-scripts/ifcfg-enp0s3` 和 `/etc/sysconfig/network-scripts/ifcfg-enp0s8` 文件。 下面是我们的例子, @@ -184,23 +185,23 @@ tcpdump 日志看起来像下面这样: NAME=enp0s8 ONBOOT=yes -分别对应 enp0s3 和 enp0s8。 +其分别对应 enp0s3 和 enp0s8。 -由于要为我们的客户端机器(192.168.0.18)进行路由,我们需要编辑 /etc/sysconfig/network-scripts/route-enp0s3: +由于要为我们的客户端机器(192.168.0.18)进行路由,我们需要编辑 `/etc/sysconfig/network-scripts/route-enp0s3`: 10.0.0.0/24 via 192.168.0.19 dev enp0s3 -现在重启系统你可以在路由表中看到该路由规则。 +现在`reboot`你的系统,就可以在路由表中看到该路由规则。 ### 总结 ### -在这篇文章中我们介绍了红帽企业版 Linux 7 的静态路由。尽管场景可能不同,这里介绍的例子说明了所需的原理以及进行该任务的步骤。结束之前,我还建议你看一下 Linux 文档项目中 [第四章 4][5] 保护和优化 Linux 部分,以了解这里介绍主题的更详细内容。 +在这篇文章中我们介绍了红帽企业版 Linux 7 的静态路由。尽管场景可能不同,这里介绍的例子说明了所需的原理以及进行该任务的步骤。结束之前,我还建议你看一下 Linux 文档项目(The Linux Documentation Project)网站上的《安全加固和优化 Linux(Securing and Optimizing Linux)》的[第四章][5],以了解这里介绍主题的更详细内容。 -免费电子书 Securing & Optimizing Linux: The Hacking Solution (v.3.0) - 这本 800 多页的电子书全面收集了 Linux 安全的小技巧以及如果安全和简便的使用它们去配置基于 Linux 的应用和服务。 +免费电子书《Securing and Optimizing Linux: The Hacking Solution (v.3.0)》 - 这本 800 多页的电子书全面收集了 Linux 安全的小技巧以及如果安全和简便的使用它们去配置基于 Linux 的应用和服务。 ![Linux 安全和优化](http://www.tecmint.com/wp-content/uploads/2015/07/Linux-Security-Optimization-Book.gif) -Linux 安全和优化 +*Linux 安全和优化* [马上下载][6] @@ -214,12 +215,12 @@ via: http://www.tecmint.com/how-to-setup-and-configure-static-network-routing-in 作者:[Gabriel Cánepa][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者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/rhcsa-exam-reviewing-essential-commands-system-documentation/ +[1]:https://linux.cn/article-6133-1.html [2]:https://www.redhat.com/en/services/certification/rhce [3]:http://www.tecmint.com/ip-command-examples/ [4]:http://www.tecmint.com/12-tcpdump-commands-a-network-sniffer-tool/ From b131810cee48e4c98ffa33a9ee162e8884878070 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 22 Oct 2015 14:07:00 +0800 Subject: [PATCH 2323/2517] =?UTF-8?q?20151022-2=20=E9=80=89=E9=A2=98=20RHC?= =?UTF-8?q?E=20=E7=AC=AC=E5=8D=81=E7=AF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e Protocol) Server' in RHEL or CentOS 7.md | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md diff --git a/sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md b/sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md new file mode 100644 index 0000000000..b13e7cd90d --- /dev/null +++ b/sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md @@ -0,0 +1,130 @@ +Part 10: Setting Up “NTP (Network Time Protocol) Server” in RHEL/CentOS 7 +================================================================================ +Network Time Protocol – NTP- is a protocol which runs over port 123 UDP at Transport Layer and allows computers to synchronize time over networks for an accurate time. While time is passing by, computers internal clocks tend to drift which can lead to inconsistent time issues, especially on servers and clients logs files or if you want to replicate servers resources or databases. + +![NTP Server Install in CentOS](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Server-Install-in-CentOS.png) + +NTP Server Installation in CentOS and RHEL 7 + +#### Requirements: #### + +- [CentOS 7 Installation Procedure][1] +- [RHEL 7 Installation Procedure][2] + +#### Additional Requirements: #### + +- [Register and Enbale RHEL 7 Subscription for Updates][3] +- [Configure Static IP Address on CentOS/Rhel 7][4] +- [Disable and Remove Unwanted Services in CentOS/RHEL 7][5] + +This tutorial will demonstrate how you can install and configure NTP server on CentOS/RHEL 7 and automatically synchronize time with the closest geographically peers available for your server location by using NTP Public Pool Time Servers list. + +#### Step 1: Install and configure NTP daemon #### + +1. NTP server package is provided by default from official CentOS /RHEL 7 repositories and can be installed by issuing the following command. + + # yum install ntp + +![Install NTP in CentOS](http://www.tecmint.com/wp-content/uploads/2014/09/Install-NTP-in-CentOS.png) + +Install NTP Server + +2. After the server is installed, first go to official [NTP Public Pool Time Servers][6], choose your Continent area where the server physically is located, then search for your Country location and a list of NTP servers should appear. + +![NTP Pool Server](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Pool-Server.png) + +NTP Pool Server + +3. Then open NTP daemon main configuration file for editing, comment the default list of Public Servers from pool.ntp.org project and replace it with the list provided for your country like in the screenshot below. + +![Configure NTP Server in CentOS](http://www.tecmint.com/wp-content/uploads/2014/09/Configure-NTP-Server.png) + +Configure NTP Server + +4. Further, you need to allow clients from your networks to synchronize time with this server. To accomplish this, add the following line to NTP configuration file, where restrict statement controls, what network is allowed to query and sync time – replace network IPs accordingly. + + restrict 192.168.1.0 netmask 255.255.255.0 nomodify notrap + +The nomodify notrap statements suggest that your clients are not allowed to configure the server or be used as peers for time sync. + +5. If you need additional information for troubleshooting in case there are problems with your NTP daemon add a log file statement which will record all NTP server issues into one dedicated log file. + + logfile /var/log/ntp.log + +![Enable NTP Logs in CentOS](http://www.tecmint.com/wp-content/uploads/2014/09/Enable-NTP-Log.png) + +Enable NTP Logs + +6. After you have edited the file with all configuration explained above save and close ntp.conf file. Your final configuration should look like in the screenshot below. + +![NTP Server Configuration in CentOS](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Server-Configuration.png) + +NTP Server Configuration + +### Step 2: Add Firewall Rules and Start NTP Daemon ### + +7. NTP service uses UDP port 123 on OSI transport layer (layer 4). It is designed particularly to resist the effects of variable latency (jitter). To open this port on RHEL/CentOS 7 run the following commands against Firewalld service. + + # firewall-cmd --add-service=ntp --permanent + # firewall-cmd --reload + +![Open NTP Port in Firewall](http://www.tecmint.com/wp-content/uploads/2014/09/Open-NTP-Port.png) + +Open NTP Port in Firewall + +8. After you have opened Firewall port 123, start NTP server and make sure you enable it system-wide. Use the following commands to manage the service. + + # systemctl start ntpd + # systemctl enable ntpd + # systemctl status ntpd + +![Start NTP Service](http://www.tecmint.com/wp-content/uploads/2014/09/Start-NTP-Service.png) + +Start NTP Service + +### Step 3: Verify Server Time Sync ### + +9. After NTP daemon has been started, wait a few minutes for the server to synchronize time with its pool list servers, then run the following commands to verify NTP peers synchronization status and your system time. + + # ntpq -p + # date -R + +![Verify NTP Server Time](http://www.tecmint.com/wp-content/uploads/2014/09/Verify-NTP-Time-Sync.png) + +Verify NTP Time Sync + +10. If you want to query and synchronize against a pool of your choice use ntpdate command, followed by the server or servers addresses, as suggested in the following command line example. + + # ntpdate -q 0.ro.pool.ntp.org 1.ro.pool.ntp.org + +![Synchronize NTP Time](http://www.tecmint.com/wp-content/uploads/2014/09/Synchronize-NTP-Time.png) + +Synchronize NTP Time + +### Step 4: Setup Windows NTP Client ### + +11. If your windows machine is not a part of a Domain Controller you can configure Windows to synchronize time with your NTP server by going to Time from the right side of Taskbar -> Change Date and Time Settings -> Internet Time tab -> Change Settings -> Check Synchronize with an Internet time server -> put your server’s IP or FQDN on Server filed -> Update now -> OK. + +![Synchronize Windows Time with NTP](http://www.tecmint.com/wp-content/uploads/2014/09/Synchronize-Windows-Time-with-NTP.png) + +Synchronize Windows Time with NTP + +That’s all! Setting up a local NTP Server on your network ensures that all your servers and clients have the same time set in case of an Internet connectivity failure and they all are synchronized with each other. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-ntp-server-in-centos/ + +作者:[Matei Cezar][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/cezarmatei/ +[1]:http://www.tecmint.com/centos-7-installation/ +[2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ +[3]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ +[4]:http://www.tecmint.com/configure-network-interface-in-rhel-centos-7-0/ +[5]:http://www.tecmint.com/remove-unwanted-services-in-centos-7/ +[6]:http://www.pool.ntp.org/en/ \ No newline at end of file From cd8f4b14169ae29faa430abd37024950d6d2cbe7 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 22 Oct 2015 23:26:23 +0800 Subject: [PATCH 2324/2517] Delete Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md --- ...tware RAID's in Linux with 'Mdadm' Tool.md | 160 ------------------ 1 file changed, 160 deletions(-) delete mode 100644 sources/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md diff --git a/sources/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md b/sources/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md deleted file mode 100644 index 06cae1f11f..0000000000 --- a/sources/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md +++ /dev/null @@ -1,160 +0,0 @@ -How to Manage Software RAID’s in Linux with ‘Mdadm’ Tool – Part 9 -================================================================================ -Regardless of your previous experience with RAID arrays, and whether you followed all of the tutorials in [this RAID series][1] or not, managing software RAIDs in Linux is not a very complicated task once you have become acquainted with `mdadm --manage` command. - -![Manage Raid Devices with Mdadm in Linux](http://www.tecmint.com/wp-content/uploads/2015/10/Manage-Raid-with-Mdadm-Tool-in-Linux.jpg) - -Manage Raid Devices with Mdadm in Linux – Part 9 - -In this tutorial we will review the functionality provided by this tool so that you can have it handy when you need it. - -#### RAID Testing Scenario #### - -As in the last article of this series, we will use for simplicity a RAID 1 (mirror) array which consists of two 8 GB disks (/dev/sdb and /dev/sdc) and an initial spare device (/dev/sdd) to illustrate, but the commands and concepts listed herein apply to other types of setups as well. That said, feel free to go ahead and add this page to your browser’s bookmarks, and let’s get started. - -### Understanding mdadm Options and Usage ### - -Fortunately, mdadm provides a `built-in --help` flag that provides explanations and documentation for each of the main options. - -Thus, let’s start by typing: - - # mdadm --manage --help - -to see what are the tasks that `mdadm --manage` will allow us to perform and how: - -![Manage RAID with mdadm Tool](http://www.tecmint.com/wp-content/uploads/2015/10/mdadm-Usage-in-Linux.png) - -Manage RAID with mdadm Tool - -As we can see in the above image, managing a RAID array involves performing the following tasks at one time or another: - -- (Re)Adding a device to the array. -- Mark a device as faulty. -- Removing a faulty device from the array. -- Replacing the faulty device with a spare one. -- Start an array that’s partially built. -- Stop an array. -- Mark an array as ro (read-only) or rw (read-write). - -### Managing RAID Devices with mdadm Tool ### - -Note that if you omit the `--manage` option, mdadm assumes management mode anyway. Keep this fact in mind to avoid running into trouble further down the road. - -The highlighted text in the previous image shows the basic syntax to manage RAIDs: - - # mdadm --manage RAID options devices - -Let’s illustrate with a few examples. - -#### ​Example 1: Add a device to the RAID array #### - -You will typically add a new device when replacing a faulty one, or when you have a spare part that you want to have handy in case of a failure: - - # mdadm --manage /dev/md0 --add /dev/sdd1 - -![Add Device to Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Add-Device-to-Raid-Array.png) - -Add Device to Raid Array - -#### ​Example 2: Marking a RAID device as faulty and removing it from the array #### - -This is a mandatory step before logically removing the device from the array, and later physically pulling it out from the machine – in that order (if you miss one of these steps you may end up causing actual damage to the device): - - # mdadm --manage /dev/md0 --fail /dev/sdb1 - -Note how the spare device added in the previous example is used to automatically replace the failed disk. Not only that, but the [recovery and rebuilding of raid data][2] start immediately as well: - -![Recover and Rebuild Raid Data](http://www.tecmint.com/wp-content/uploads/2015/10/Recover-and-Rebuild-Raid-Data.png) - -Recover and Rebuild Raid Data - -Once the device has been indicated as failed manually, it can be safely removed from the array: - - # mdadm --manage /dev/md0 --remove /dev/sdb1 - -#### ​Example 3: Re-adding a device that was part of the array which had been removed previously #### - -Up to this point, we have a working RAID 1 array that consists of 2 active devices: /dev/sdc1 and /dev/sdd1. If we attempt to re-add /dev/sdb1 to /dev/md0 right now: - - # mdadm --manage /dev/md0 --re-add /dev/sdb1 - -we will run into an error: - -mdadm: --re-add for /dev/sdb1 to /dev/md0 is not possible -because the array is already made up of the maximum possible number of drives. So we have 2 choices: a) add /dev/sdb1 as a spare, as shown in Example #1, or b) remove /dev/sdd1 from the array and then re-add /dev/sdb1. - -We choose option b), and will start by stopping the array to later reassemble it: - - # mdadm --stop /dev/md0 - # mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 - -If the above command does not successfully add /dev/sdb1 back to the array, use the command from Example #1 to do it. - -Although mdadm will initially detect the newly added device as a spare, it will start rebuilding the data and when it’s done doing so, it should recognize the device to be an active part of the RAID: - -![Raid Rebuild Status](http://www.tecmint.com/wp-content/uploads/2015/10/Raid-Rebuild-Status.png) - -Raid Rebuild Status - -#### Example 4: Replace a Raid device with a specific disk #### - -Replacing a disk in the array with a spare one is as easy as: - - # mdadm --manage /dev/md0 --replace /dev/sdb1 --with /dev/sdd1 - -![Replace Raid Device](http://www.tecmint.com/wp-content/uploads/2015/10/Replace-Raid-device.png) - -Replace Raid Device - -This results in the device following the `--with` switch being added to the RAID while the disk indicated through `--replace` being marked as faulty: - -![Check Raid Rebuild Status](http://www.tecmint.com/wp-content/uploads/2015/10/Check-Raid-Rebuild-Status.png) - -Check Raid Rebuild Status - -#### ​Example 5: Marking an Raid array as ro or rw #### - -After creating the array, you must have created a filesystem on top of it and mounted it on a directory in order to use it. What you probably didn’t know then is that you can mark the RAID as ro, thus allowing only read operations to be performed on it, or rw, in order to write to the device as well. - -To mark the device as ro, it needs to be unmounted first: - - # umount /mnt/raid1 - # mdadm --manage /dev/md0 --readonly - # mount /mnt/raid1 - # touch /mnt/raid1/test1 - -![Set Permissions on Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Set-Permissions-on-Raid-Array.png) - -Set Permissions on Raid Array - -To configure the array to allow write operations as well, use the `--readwrite` option. Note that you will need to unmount the device and stop it before setting the rw flag: - - # umount /mnt/raid1 - # mdadm --manage /dev/md0 --stop - # mdadm --assemble /dev/md0 /dev/sdc1 /dev/sdd1 - # mdadm --manage /dev/md0 --readwrite - # touch /mnt/raid1/test2 - -![Allow Read Write Permission on Raid](http://www.tecmint.com/wp-content/uploads/2015/10/Allow-Write-Permission-on-Raid.png) - -Allow Read Write Permission on Raid - -### Summary ### - -Throughout this series we have explained how to set up a variety of software RAID arrays that are used in enterprise environments. If you followed through the articles and the examples provided in these articles you are prepared to leverage the power of software RAIDs in Linux. - -Should you happen to have questions or suggestions, feel free to contact us using the form below. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/manage-software-raid-devices-in-linux-with-mdadm/ - -作者:[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/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/recover-data-and-rebuild-failed-software-raid/ \ No newline at end of file From 6811005202cb67c32c4ebb85c2c633e2be67cbc6 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 22 Oct 2015 23:27:30 +0800 Subject: [PATCH 2325/2517] Create Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md --- ...tware RAID's in Linux with 'Mdadm' Tool.md | 161 ++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 translated/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md diff --git a/translated/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md b/translated/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md new file mode 100644 index 0000000000..5f1dd3a413 --- /dev/null +++ b/translated/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md @@ -0,0 +1,161 @@ + +在 Linux 中如何使用 ‘Mdadm’ 工具管理软件 RAID - 第9部分 +================================================================================ + +无论你以前有没有使用 RAID 阵列的经验,以及是否完成了 [此 RAID 系列][1] 的所有教程,一旦你在 Linux 中熟悉了 `mdadm --manage` 命令的使用,管理软件 RAID 将不是很复杂的任务。 + + +![Manage Raid Devices with Mdadm in Linux](http://www.tecmint.com/wp-content/uploads/2015/10/Manage-Raid-with-Mdadm-Tool-in-Linux.jpg) + +在 Linux 中使用 mdadm 管理 RAID 设备 - 第9部分 + +在本教程中,我们会再介绍此工具提供的功能,这样当你需要它,就可以派上用场。 + +#### RAID 测试方案 #### + +在本系列的最后一篇文章中,我们将使用一个简单的 RAID 1(镜像)阵列,它由两个 8GB 的磁盘(/dev/sdb 和 /dev/sdc)和一个备用设备(dev/sdd)来演示,但在此使用的方法也适用于其他类型的配置。也就是说,放心去用吧,把这个页面添加到浏览器的书签,然后让我们开始吧。 + +### 了解 mdadm 的选项和使用方法 ### + +幸运的是,mdadm 有一个 `built-in --help` 参数来对每个主要的选项提供说明文档。 + +因此,让我们开始使用: + + # mdadm --manage --help + +`mdadm --manage` 将使我们看到能够执行哪些任务: + +![Manage RAID with mdadm Tool](http://www.tecmint.com/wp-content/uploads/2015/10/mdadm-Usage-in-Linux.png) + +使用 mdadm 工具来管理 RAID + +正如我们在上面的图片看到,管理一个 RAID 阵列可以在任意时间执行以下任务: + +- (重新)将设备添加到阵列中. +- 把设备标记为故障. +- 从阵列中删除故障设备. +- 使用备用设备更换故障设备. +- 先创建部分阵列. +- 停止阵列. +- 标记阵列为 ro(只读)或 rw(读写). + +### 使用 mdadm 工具管理 RAID 设备 ### + +需要注意的是,如果用户忽略 `--manage` 选项,mdadm 默认使用管理模式。请记住这其实一点,以避免出现最坏的情况。 + +上面图像中的高亮文本显示了管理 RAIDs 的基本的语法: + + # mdadm --manage RAID options devices + +让我们来演示几个例子. + +#### ​例1:为 RAID 阵列添加设备 #### + +你通常会添加新设备来更换故障的设备,或者使用空闲的分区以便在出现故障时能及时替换: + + # mdadm --manage /dev/md0 --add /dev/sdd1 + +![Add Device to Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Add-Device-to-Raid-Array.png) + +添加设备到 Raid 阵列 + +#### ​例2:把一个 RAID 设备标记为故障并从阵列中移除 #### + +在从逻辑阵列中删除该设备前,这是强制性的一步,然后从机器中取出它 - 注意顺序(如果弄错了这些步骤,最终可能会造成实际设备的损害): + + # mdadm --manage /dev/md0 --fail /dev/sdb1 + +请注意在前面的例子中,知道如何添加备用设备来自动更换出现故障的磁盘。在此之后,[恢复和重建 raid 数据][2] 就开始了: + +![Recover and Rebuild Raid Data](http://www.tecmint.com/wp-content/uploads/2015/10/Recover-and-Rebuild-Raid-Data.png) + +恢复和重建 raid 数据 + +一旦设备已被手动标记为故障,你就可以安全地从阵列中删除它: + + # mdadm --manage /dev/md0 --remove /dev/sdb1 + +#### 例3:重新添加设备,这是阵列中已经移除的一部分 #### + +到现在为止,我们有一个工作的 RAID 1 阵列,它包含了2个活动的设备:/dev/sdc1 和 /dev/sdd1。现在让我们试图重新添加 /dev/sdb1 到/dev/md0: + + # mdadm --manage /dev/md0 --re-add /dev/sdb1 + +我们会碰到一个错误: + +mdadm: --re-add 将 /dev/sdb1 添加到 /dev/md0 是不可能的,因为阵列中的磁盘已经达到了最大的数量。因此,我们有两个选择:a)将 /dev/sdb1 添加为备用的,如例1,或 b)从阵列中删除 /dev/sdd1 然后重新添加 /dev/sdb1。 + +我们选择选项 b),先停止阵列然后重新启动: + + # mdadm --stop /dev/md0 + # mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 + +如果上面的命令不能成功添加 /dev/sdb1 到阵列中,使用例1中的命令来完成。 + +mdadm 能检测到新添加的设备并将其作为备用设备,当添加完成后它会开始重建数据,它也被认为是 RAID 中的活动设备: + +![Raid Rebuild Status](http://www.tecmint.com/wp-content/uploads/2015/10/Raid-Rebuild-Status.png) + +重建 Raid 的状态 + +#### 例4:使用特定磁盘更换 RAID 设备 #### + +在阵列中使用备用磁盘更换磁盘很简单: + + # mdadm --manage /dev/md0 --replace /dev/sdb1 --with /dev/sdd1 + +![Replace Raid Device](http://www.tecmint.com/wp-content/uploads/2015/10/Replace-Raid-device.png) + +更换 Raid 设备 + +当磁盘通过 `--replace` 被标记为故障时,这将导致设备通过 `--with` 被添加到 RAID 中: + +![Check Raid Rebuild Status](http://www.tecmint.com/wp-content/uploads/2015/10/Check-Raid-Rebuild-Status.png) + +检查 Raid 重建状态 + +#### ​例5:标记 RAID 阵列为 ro 或 rw #### + +创建阵列后,你必须在它上面创建一个文件系统并将其挂载到一个目录下才能使用它。你可能不知道,RAID 也可以被设置为 ro,然后它就只读了,或者设置为 rw,然后就能进行写入设备以及读取操作。 + +为了标记该设备为 ro,首先需要将其卸载: + + # umount /mnt/raid1 + # mdadm --manage /dev/md0 --readonly + # mount /mnt/raid1 + # touch /mnt/raid1/test1 + +![Set Permissions on Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Set-Permissions-on-Raid-Array.png) + +在 RAID 阵列上设置权限 + +要配置阵列允许写入操作需要使用 `--readwrite` 选项。请注意,在设置 rw 标志前,你需要先卸载设备并停止它: + + # umount /mnt/raid1 + # mdadm --manage /dev/md0 --stop + # mdadm --assemble /dev/md0 /dev/sdc1 /dev/sdd1 + # mdadm --manage /dev/md0 --readwrite + # touch /mnt/raid1/test2 + +![Allow Read Write Permission on Raid](http://www.tecmint.com/wp-content/uploads/2015/10/Allow-Write-Permission-on-Raid.png) + +配置 Raid 允许读写操作 + +### 总结 ### + +在本系列中,我们已经解释了如何建立一个在企业环境中使用的软件RAID 阵列。如果你按照这些文章所提供的例子进行配置,在 Linux 中你会充分利用软件 RAID 的价值。 + +如果你碰巧任何问题或有建议,请随时使用下面的方式与我们联系。 +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/manage-software-raid-devices-in-linux-with-mdadm/ + +作者:[GABRIEL CÁNEPA][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者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/understanding-raid-setup-in-linux/ +[2]:http://www.tecmint.com/recover-data-and-rebuild-failed-software-raid/ From c9c15a2186eb5a0c6eade320edf644eb28aea7a3 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 22 Oct 2015 23:31:33 +0800 Subject: [PATCH 2326/2517] PUB:20151013 Mytodo--A ToDo List Manager For DIY Lovers @alim0x --- ...3 Mytodo--A ToDo List Manager For DIY Lovers.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename {translated/share => published}/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md (84%) diff --git a/translated/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md b/published/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md similarity index 84% rename from translated/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md rename to published/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md index 881f81e868..84ebd749f4 100644 --- a/translated/share/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md +++ b/published/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md @@ -1,8 +1,8 @@ -Mytodo: 为 DIY 爱好者准备的待办事项管理软件 +Mytodo:为 DIY 爱好者准备的待办事项管理软件 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-Linux.jpg) -通常我关注的软件都是那些不用折腾并且易用的(对图形界面而言)。这就是我把 [Go For It][1] 待办事项程序归到 [Linux 生产力工具][2] 列表的原因。今天,我要向你们展示另一款待办事项列表应用,和其它的待办事项软件有点不一样。 +通常我关注的软件都是那些不用折腾并且易用的(对图形界面而言)。这就是我把 [Go For It][1] 待办事项程序归到 [Linux 产能工具][2] 列表的原因。今天,我要向你们展示另一款待办事项列表应用,和其它的待办事项软件有点不一样。 [Mytodo][3] 是个开源的待办事项列表程序,让你能够掌管一切。与其它类似的程序不同的是,Mytodo 更加面向 DIY 爱好者,因为它允许你配置服务器(如果你想在多台电脑上使用的话),除了主要的功能外还提供一个命令行界面。 @@ -19,15 +19,15 @@ Mytodo 的一些主要特性: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list.jpeg) -图形界面 +*图形界面* ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list-cli.jpeg) -命令行 +*命令行* ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Mytodo-list-conky.jpeg) -Conky 显示着待办事项 +*Conky 显示着待办事项* 你可以在下面的 Github 链接里找到源码和配置介绍: @@ -43,13 +43,13 @@ via: http://itsfoss.com/mytodo-list-manager/ 作者:[Abhishek][a] 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/abhishek/ [1]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ -[2]:http://itsfoss.com/productivity-tips-ubuntu/ +[2]:https://linux.cn/article-6425-1.html [3]:https://github.com/mohamed-aziz/mytodo [4]:http://itsfoss.com/conky-gui-ubuntu-1304/ [5]:https://github.com/mohamed-aziz/mytodo From 80130c8746b0ac5b5ba9de58bf4819f5c6de3894 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 22 Oct 2015 23:51:44 +0800 Subject: [PATCH 2327/2517] PUB:20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT @ictlyh --- ...R 0.98 INSTALL IN UBUNTU AND LINUX MINT.md | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md (66%) diff --git a/translated/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md b/published/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md similarity index 66% rename from translated/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md rename to published/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md index d571566c62..983f68a687 100644 --- a/translated/tech/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md +++ b/published/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md @@ -1,27 +1,28 @@ 在 Ubuntu 和 Linux Mint 上安装 Terminator 0.98 ================================================================================ -[Terminator][1],在一个窗口中有多个终端。该项目的目标之一是为管理终端提供一个有用的工具。它的灵感来自于类似 gnome-multi-term,quankonsole 等程序,这些程序关注于在窗格中管理终端。 Terminator 0.98 带来了更完美的标签功能,更好的布局保存/恢复,改进了偏好用户界面和多出 bug 修复。 +[Terminator][1],它可以在一个窗口内打开多个终端。该项目的目标之一是为摆放终端提供一个有用的工具。它的灵感来自于类似 gnome-multi-term,quankonsole 等程序,这些程序关注于按网格摆放终端。 Terminator 0.98 带来了更完美的标签功能,更好的布局保存/恢复,改进了偏好用户界面和多处 bug 修复。 ![](http://www.ewikitech.com/wp-content/uploads/2015/09/Screenshot-from-2015-09-17-094828.png) ###TERMINATOR 0.98 的更改和新特性 + - 添加了一个布局启动器,允许在不用布局之间简单切换(用 Alt + L 打开一个新的布局切换器); - 添加了一个新的手册(使用 F1 打开); - 保存的时候,布局现在会记住: - - * 最大化和全屏状态 - - * 窗口标题 - - * 激活的标签 - - * 激活的终端 - - * 每个终端的工作目录 -- 添加选项用于启用/停用非同质标签和滚动箭头; + - 最大化和全屏状态 + - 窗口标题 + - 激活的标签 + - 激活的终端 + - 每个终端的工作目录 +- 添加选项用于启用/停用非同类(non-homogenous)标签和滚动箭头; - 添加快捷键用于按行/半页/一页向上/下滚动; -- 添加使用 Ctrl+鼠标滚轮放大/缩小,Shift+鼠标滚轮向上/下滚动页面; -- 为下一个/上一个 profile 添加快捷键 +- 添加使用 Ctrl+鼠标滚轮来放大/缩小,Shift+鼠标滚轮向上/下滚动页面; +- 为下一个/上一个配置文件(profile)添加快捷键 - 改进自定义命令菜单的一致性 - 新增快捷方式/代码来切换所有/标签分组; - 改进监视插件 - 增加搜索栏切换; -- 清理和重新组织窗口偏好,包括一个完整的全局便签更新 +- 清理和重新组织偏好(preferences)窗口,包括一个完整的全局便签更新 - 添加选项用于设置 ActivityWatcher 插件静默时间 - 其它一些改进和 bug 修复 - [点击此处查看完整更新日志][2] @@ -37,10 +38,6 @@ Terminator 0.98 有可用的 PPA,首先我们需要在 Ubuntu/Linux Mint 上 如果你想要移除 Terminator,只需要在终端中运行下面的命令(可选) $ sudo apt-get remove terminator - - - - -------------------------------------------------------------------------------- @@ -48,7 +45,7 @@ via: http://www.ewikitech.com/articles/linux/terminator-install-ubuntu-linux-min 作者:[admin][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From fbecc441024d709e870d2a6a143659d1b163e8aa Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 23 Oct 2015 00:27:51 +0800 Subject: [PATCH 2328/2517] PUB:Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters @ictlyh --- ...ation and Set Kernel Runtime Parameters.md | 68 ++++++++++--------- 1 file changed, 35 insertions(+), 33 deletions(-) rename {translated/tech => published}/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md (63%) diff --git a/translated/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md b/published/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md similarity index 63% rename from translated/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md rename to published/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md index 74b162be1c..38baedd754 100644 --- a/translated/tech/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md +++ b/published/RHCE/Part 2 - How to Perform Packet Filtering Network Address Translation and Set Kernel Runtime Parameters.md @@ -1,16 +1,17 @@ -RHCE 第二部分 - 如何进行包过滤、网络地址转换和设置内核运行时参数 +RHCE 系列(二):如何进行包过滤、网络地址转换和设置内核运行时参数 ================================================================================ -正如第一部分(“[设置静态网络路由][1]”)承诺的,在这篇文章(RHCE 系列第二部分),我们首先介绍红帽企业版 Linux 7中包过滤和网络地址转换原理,然后再介绍某些条件发送变化或者需要激活时设置运行时内核参数以改变运行时内核行为。 + +正如第一部分(“[设置静态网络路由][1]”)提到的,在这篇文章(RHCE 系列第二部分),我们首先介绍红帽企业版 Linux 7(RHEL)中包过滤和网络地址转换(NAT)的原理,然后再介绍在某些条件发生变化或者需要变动时设置运行时内核参数以改变运行时内核行为。 ![RHEL 中的网络包过滤](http://www.tecmint.com/wp-content/uploads/2015/07/Network-Packet-Filtering-in-RHEL.jpg) -RHCE 第二部分:网络包过滤 +*RHCE 第二部分:网络包过滤* ### RHEL 7 中的网络包过滤 ### -当我们讨论数据包过滤的时候,我们指防火墙读取每个尝试通过它的数据包的包头所进行的处理。然后,根据系统管理员之前定义的规则,通过采取所要求的动作过滤数据包。 +当我们讨论数据包过滤的时候,我们指防火墙读取每个试图通过它的数据包的包头所进行的处理。然后,根据系统管理员之前定义的规则,通过采取所要求的动作过滤数据包。 -正如你可能知道的,从 RHEL 7 开始,管理防火墙的默认服务是 [firewalld][2]。类似 iptables,它和 Linux 内核的 netfilter 模块交互以便检查和操作网络数据包。不像 iptables,Firewalld 的更新可以立即生效,而不用中断活跃的连接 - 你甚至不需要重启服务。 +正如你可能知道的,从 RHEL 7 开始,管理防火墙的默认服务是 [firewalld][2]。类似 iptables,它和 Linux 内核的 netfilter 模块交互以便检查和操作网络数据包。但不像 iptables,Firewalld 的更新可以立即生效,而不用中断活跃的连接 - 你甚至不需要重启服务。 Firewalld 的另一个优势是它允许我们定义基于预配置服务名称的规则(之后会详细介绍)。 @@ -18,27 +19,27 @@ Firewalld 的另一个优势是它允许我们定义基于预配置服务名称 ![静态路由网络示意图](http://www.tecmint.com/wp-content/uploads/2015/07/Static-Routing-Network-Diagram.png) -静态路由网络示意图 +*静态路由网络示意图* -然而,你应该记得,由于还没有介绍包过滤,为了简化例子,我们停用了路由器 2号 的防火墙。现在让我们来看看如何可以使接收的数据包发送到目的地的特定服务或端口。 +然而,你应该记得,由于还没有介绍包过滤,为了简化例子,我们停用了2号路由器的防火墙。现在让我们来看看如何使接收的数据包发送到目的地的特定服务或端口。 -首先,让我们添加一条永久规则允许从 enp0s3 (192.168.0.19) 到 enp0s8 (10.0.0.18) 的绑定流量: +首先,让我们添加一条永久规则允许从 enp0s3 (192.168.0.19) 到 enp0s8 (10.0.0.18) 的入站流量: # firewall-cmd --permanent --direct --add-rule ipv4 filter FORWARD 0 -i enp0s3 -o enp0s8 -j ACCEPT -上面的命令会把规则保存到 /etc/firewalld/direct.xml: +上面的命令会把规则保存到 `/etc/firewalld/direct.xml` 中: # cat /etc/firewalld/direct.xml ![在 CentOS 7 中检查 Firewalld 保存的规则](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Firewalld-Save-Rules.png) -检查 Firewalld 保存的规则 +*检查 Firewalld 保存的规则* 然后启用规则使其立即生效: # firewall-cmd --direct --add-rule ipv4 filter FORWARD 0 -i enp0s3 -o enp0s8 -j ACCEPT -现在你可以从 RHEL 7 中通过 telnet 登录到 web 服务器并再次运行 [tcpdump][3] 监视两台机器之间的 TCP 流量,这次路由器 2号已经启用了防火墙。 +现在你可以从 RHEL 7 中通过 telnet 到 web 服务器并再次运行 [tcpdump][3] 监视两台机器之间的 TCP 流量,这次2号路由器已经启用了防火墙。 # telnet 10.0.0.20 80 # tcpdump -qnnvvv -i enp0s3 host 10.0.0.20 @@ -61,19 +62,19 @@ Firewalld 的另一个优势是它允许我们定义基于预配置服务名称 我强烈建议你看看 Fedora Project Wiki 中的 [Firewalld Rich Language][4] 文档更详细地了解关于富规则的内容。 -### RHEL 7 中的网络地址转换 ### +### RHEL 7 中的网络地址转换(NAT) ### -网络地址转换(NAT)是为专用网络中的一组计算机(也可能是其中的一台)分配一个独立的公共 IP 地址的过程。结果,在内部网络中仍然可以用它们自己的私有 IP 地址区别,但外部“看来”它们是一样的。 +网络地址转换(NAT)是为专用网络中的一组计算机(也可能是其中的一台)分配一个独立的公共 IP 地址的过程。这样,在内部网络中仍然可以用它们自己的私有 IP 地址来区别,但外部“看来”它们是一样的。 -另外,网络地址转换使得内部网络中的计算机发送请求到外部资源(例如因特网)然后只有源系统能接收到对应的响应成为可能。 +另外,网络地址转换使得内部网络中的计算机发送请求到外部资源(例如因特网),然后只有源系统能接收到对应的响应成为可能。 现在让我们考虑下面的场景: ![RHEL 中的网络地址转换](http://www.tecmint.com/wp-content/uploads/2015/07/Network-Address-Translation-Diagram.png) -网络地址转换 +*网络地址转换* -在路由器 2 中,我们会把 enp0s3 接口移动到外部区域,enp0s8 到内部区域,伪装或者说 NAT 默认是启用的: +在2号路由器中,我们会把 enp0s3 接口移动到外部区域(external),enp0s8 到内部区域(external),伪装(masquerading)或者说 NAT 默认是启用的: # firewall-cmd --list-all --zone=external # firewall-cmd --change-interface=enp0s3 --zone=external @@ -81,7 +82,7 @@ Firewalld 的另一个优势是它允许我们定义基于预配置服务名称 # firewall-cmd --change-interface=enp0s8 --zone=internal # firewall-cmd --change-interface=enp0s8 --zone=internal --permanent -对于我们当前的设置,内部区域 - 以及和它一起启用的任何东西都是默认区域: +对于我们当前的设置,内部区域(internal) - 以及和它一起启用的任何东西都是默认区域: # firewall-cmd --set-default-zone=internal @@ -89,44 +90,44 @@ Firewalld 的另一个优势是它允许我们定义基于预配置服务名称 # firewall-cmd --reload -最后,在 web 服务器中添加路由器 2 为默认网关: +最后,在 web 服务器中添加2号路由器为默认网关: # ip route add default via 10.0.0.18 -现在你会发现在 web 服务器中你可以 ping 路由器 1 和外部网站(例如 tecmint.com): +现在你会发现在 web 服务器中你可以 ping 1号路由器和外部网站(例如 tecmint.com): # ping -c 2 192.168.0.1 # ping -c 2 tecmint.com ![验证网络路由](http://www.tecmint.com/wp-content/uploads/2015/07/Verify-Network-Routing.png) -验证网络路由 +*验证网络路由* ### 在 RHEL 7 中设置内核运行时参数 ### -在 Linux 中,允许你更改、启用以及停用内核运行时参数,RHEL 也不例外。/proc/sys 接口允许你当操作条件发生变化时实时设置运行时参数以改变系统行为而不需太多麻烦。 +在 Linux 中,允许你更改、启用以及停用内核运行时参数,RHEL 也不例外。当操作条件发生变化时,`/proc/sys` 接口(sysctl)允许你实时设置运行时参数改变系统行为,而不需太多麻烦。 -为了实现这个目的,会用内建的 echo shell 写 /proc/sys/ 中的文件,其中 很可能是以下目录中的一个: +为了实现这个目的,会用 shell 内建的 echo 写 `/proc/sys/` 中的文件,其中 `` 一般是以下目录中的一个: - dev: 连接到机器中的特定设备的参数。 - fs: 文件系统配置(例如 quotas 和 inodes)。 - kernel: 内核配置。 - net: 网络配置。 -- vm: 内核虚拟内存的使用。 +- vm: 内核的虚拟内存的使用。 要显示所有当前可用值的列表,运行 # sysctl -a | less -在第一部分中,我们通过以下命令改变了 net.ipv4.ip_forward 参数的值以允许 Linux 机器作为一个路由器。 +在第一部分中,我们通过以下命令改变了 `net.ipv4.ip_forward` 参数的值以允许 Linux 机器作为一个路由器。 # echo 1 > /proc/sys/net/ipv4/ip_forward -另一个你可能想要设置的运行时参数是 kernel.sysrq,它会启用你键盘上的 Sysrq 键,以使系统更好的运行一些底层函数,例如如果由于某些原因冻结了后重启系统: +另一个你可能想要设置的运行时参数是 `kernel.sysrq`,它会启用你键盘上的 `Sysrq` 键,以使系统更好的运行一些底层功能,例如如果由于某些原因冻结了后重启系统: # echo 1 > /proc/sys/kernel/sysrq -要显示特定参数的值,可以按照下面方式使用 sysctl: +要显示特定参数的值,可以按照下面方式使用 `sysctl`: # sysctl @@ -135,28 +136,29 @@ Firewalld 的另一个优势是它允许我们定义基于预配置服务名称 # sysctl net.ipv4.ip_forward # sysctl kernel.sysrq -一些参数,例如上面提到的一个,只需要一个值,而其它一些(例如 fs.inode-state)要求多个值: +有些参数,例如上面提到的某个,只需要一个值,而其它一些(例如 `fs.inode-state`)要求多个值: ![在 Linux 中查看内核参数](http://www.tecmint.com/wp-content/uploads/2015/07/Check-Kernel-Parameters.png) -查看内核参数 +*查看内核参数* 不管什么情况下,做任何更改之前你都需要阅读内核文档。 -请注意系统重启后这些设置会丢失。要使这些更改永久生效,我们需要添加内容到 /etc/sysctl.d 目录的 .conf 文件,像下面这样: +请注意系统重启后这些设置会丢失。要使这些更改永久生效,我们需要添加内容到 `/etc/sysctl.d` 目录的 .conf 文件,像下面这样: # echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/10-forward.conf (其中数字 10 表示相对同一个目录中其它文件的处理顺序)。 -并用下面命令启用更改 +并用下面命令启用更改: # sysctl -p /etc/sysctl.d/10-forward.conf ### 总结 ### 在这篇指南中我们解释了基本的包过滤、网络地址变换和在运行的系统中设置内核运行时参数并使重启后能持久化。我希望这些信息能对你有用,如往常一样,我们期望收到你的回复! -别犹豫,在下面的表格中和我们分享你的疑问、评论和建议吧。 + +别犹豫,在下面的表单中和我们分享你的疑问、评论和建议吧。 -------------------------------------------------------------------------------- @@ -164,12 +166,12 @@ via: http://www.tecmint.com/perform-packet-filtering-network-address-translation 作者:[Gabriel Cánepa][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者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/how-to-setup-and-configure-static-network-routing-in-rhel/ +[1]:https://linux.cn/article-6451-1.html [2]:http://www.tecmint.com/firewalld-rules-for-centos-7/ [3]:http://www.tecmint.com/12-tcpdump-commands-a-network-sniffer-tool/ [4]:https://fedoraproject.org/wiki/Features/FirewalldRichLanguage \ No newline at end of file From 7e72b6f833d1fbe1c6b3c5d3cfb2037c84174638 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 23 Oct 2015 08:44:34 +0800 Subject: [PATCH 2329/2517] =?UTF-8?q?20151023-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-The Man Behind Ubuntu Operating System.md | 119 ++++++++++++++++++ ...tu 15.10 Codenamed Wily Werewolf Review.md | 68 ++++++++++ 2 files changed, 187 insertions(+) create mode 100644 sources/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md create mode 100644 sources/talk/20151023 Ubuntu 15.10 Codenamed Wily Werewolf Review.md diff --git a/sources/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md b/sources/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md new file mode 100644 index 0000000000..3390c232ac --- /dev/null +++ b/sources/talk/20151023 Mark Shuttleworth--The Man Behind Ubuntu Operating System.md @@ -0,0 +1,119 @@ +Mark Shuttleworth – The Man Behind Ubuntu Operating System +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Mark-Shuttleworth-652x445.jpg) + +**Mark Richard Shuttleworth** is the founder of **Ubuntu** or the man behind the Debian as they call him. He was born in 1973 in Welkom, South Africa. He’s an entrepreneur and also space tourist who became later **1st citizen of independent African country who could travel to the space**. + +Mark also founded **Thawte** in 1996, the Internet commerce security company, while he was studying finance and IT at University of Cape Town. + +In 2000, Mark founded the HBD, as an investment company, and also he created the Shuttleworth Foundation in order to fund the innovative leaders in the society with combination of fellowships and some investments. + +> “The mobile world is crucial to the future of the PC. This month, for example, it became clear that the traditional PC is shrinking in favor of tablets. So if we want to be relevant on the PC, we have to figure out how to be relevant in the mobile world first. Mobile is also interesting because there’s no pirated Windows market. So if you win a device to your OS, it stays on your OS. In the PC world, we are constantly competing with “free Windows”, which presents somewhat unique challenges. So our focus now is to establish a great story around Ubuntu and mobile form factors – the tablet and the phone – on which we can build deeper relationships with everyday consumers.” +> +> — Mark Shuttleworth + +In 2002, he flew to International Space Station as member of their crew of Soyuz mission TM-34, after 1 year of training in the Star City, Russia. And after running campaign to promote the science, code, and mathematics to the aspiring astronauts and the other ambitious types at schools in SA, Mark founded the **Canonical Ltd**. and in 2013, he provided leadership for Ubuntu operating system for software development purposes. + +Today, Shuttleworth holds dual citizenship of United Kingdom and South Africa currently lives on lovely Mallards botanical garden in Isle of Man, with 18 precocious ducks, equally his lovely girlfriend Claire, 2 black bitches and occasional itinerant sheep. + +> “Computer is not a device anymore. It is an extension of your mind and your gateway to other people.” +> +> — Mark Shuttleworth + +### Mark Shuttleworth’s Early life ### + +As we mentioned above, Mark was born in Welkom, South Africa’s Orange Free State as son of surgeon and nursery-school teacher, Mark attended the school at Western Province Preparatory School where he became eventually the Head Boy in 1986, followed by 1 term at Rondebosch Boys’ High School, and later at Bishops/Diocesan College where he was again Head Boy in 1991. + +Mark obtained the Bachelor of Business Science degree in the Finance and Information Systems at University of Cape Town, where he lived there in Smuts Hall. He became, as a student, involved in installations of the 1st residential Internet connections at his university. + +> “There are many examples of companies and countries that have improved their competitiveness and efficiency by adopting open source strategies. The creation of skills through all levels is of fundamental importance to both companies and countries.” +> +> — Mark Shuttleworth + +### Mark Shuttleworth’s Career ### + +Mark founded Thawte in 1995, which was specialized in the digital certificates and Internet security, then he sold it to VeriSign in 1999, earning about $575 million at the time. + +In 2000, Mark formed the HBD Venture Capital (Here be Dragons), the business incubator and venture capital provider. In 2004, he formed the Canonical Ltd., for promotion and commercial support of the free software development projects, especially Ubuntu operating system. In 2009, Mark stepped down as CEO of Canonical, Ltd. + +> “In the early days of the DCC I preferred to let the proponents do their thing and then see how it all worked out in the end. Now we are pretty close to the end.” +> +> — Mark Shuttleworth + +### Linux and FOSS with Mark Shuttleworth ### + +In the late 1990s, Mark participated as one of developers of Debian operating system. + +In 2001, Mark formed the Shuttleworth Foundation, It is non-profit organization dedicated to the social innovation that also funds free, educational, and open source software projects in South Africa, including Freedom Toaster. + +In 2004, Mark returned to free software world by funding software development of Ubuntu, as it was Linux distribution based on Debian, throughout his company Canonical Ltd. + +In 2005, Mark founded Ubuntu Foundation and made initial investment of 10 million dollars. In Ubuntu project, Mark is often referred to with tongue-in-cheek title “**SABDFL (Self-Appointed Benevolent Dictator for Life)**”. To come up with list of names of people in order to hire for the entire project, Mark took about six months of Debian mailing list archives with him during his travelling to Antarctica aboard icebreaker Kapitan Khlebnikov in 2004. In 2005, Mark purchased 65% stake of Impi Linux. + +> “I urge telecommunications regulators to develop a commercial strategy for delivering effective access to the continent.” +> +> — Mark Shuttleworth + +In 2006, it was announced that Shuttleworth became **first patron of KDE**, which was highest level of sponsorship available at the time. This patronship ended in 2012, with financial support together for Kubuntu, which was Ubuntu variant with KDE as a main desktop. + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/shuttleworth-kde.jpg) + +In 2009, Shuttleworth announced that, he would step down as the CEO of Canonical in order to focus more energy on partnership, product design, and the customers. Jane Silber, took on this job as the CEO at Canonical after he was the COO at Canonical since 2004. + +In 2010, Mark received the honorary degree from Open University for that work. + +In 2012, Mark and Kenneth Rogoff took part together in debate opposite Peter Thiel and Garry Kasparov at Oxford Union, this debate was entitled “**The Innovation Enigma**”. + +In 2013, Mark and Ubuntu were awarded **Austrian anti-privacy Big Brother Award** for sending the local Ubuntu Unity Dash searches to the Canonical servers by default. One year earlier in 2012, Mark had defended the anonymization method that was used. + +> “All the major PC companies now ship PC’s with Ubuntu pre-installed. So we have a very solid set of working engagements in the industry. But those PC companies are nervous to promote something new to PC buyers. If we can get PC buyers familiar with Ubuntu as a phone and tablet experience, then they may be more willing buy it on the PC too. Because no OS ever succeeded by emulating another OS. Android is great, but if we want to succeed we need to bring something new and better to market. We are all at risk of stagnating if we don’t pursue the future, vigorously. But if you pursue the future, you have to accept that not everybody will agree with your vision.” +> +> — Mark Shuttleworth + +### Mark Shuttleworth’s Spaceflight ### + +Mark gained worldwide fame in 2002 as a second self-funded space tourist and the first South African who could travel to the space. Flying through Space Adventures, Mark launched aboard Russian Soyuz TM-34 mission as spaceflight participant, and he paid approximately $20 million for that voyage. 2 days later, Soyuz spacecraft arrived at International Space Station, where Mark spent 8 days participating in the experiments related to the AIDS and the GENOME research. Later in 2002, Mark returned to the Earth on the Soyuz TM-33. To participate in that flight, Mark had to undergo 1 year of preparation and training, including 7 months spent in the Star City, Russia. + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Mark-Shuttleworth1.jpg) + +While in space, Mark had radio conversation with Nelson Mandela and another 14 year old South African girl, called Michelle Foster, who asked Mark to marry her. Of course Mark politely dodged that question, stating that he was much honored to this question before cunningly change the subject. The terminally ill Foster was also provided the opportunity to have conversation with Mark and Nelson Mandela by Reach for Dream foundation. + +Upon returning, Mark traveled widely and also spoke about that spaceflight to schoolchildren around the world. + +> “The raw numbers suggest that Ubuntu continues to grow in terms of actual users. And our partnerships – Dell, HP, Lenovo on the hardware front, and gaming companies like EA, Valve joining up on the software front – make me feel like we continue to lead where it matters.” +> +> — Mark Shuttleworth + +### Mark Shuttleworth’s Transport ### + +Mark has his private jet, Bombardier Global Express that is often referred to as Canonical One but it’s in fact owned through the HBD Venture Capital Company. The dragon depicted on side of the plane is Norman, HBD Venture Capital mascot. + +### The Legal Clash with South African Reserve Bank ### + +Upon the moving R2.5 billion in the capital from South Africa to Isle of Man, South African Reserve Bank imposed R250 million levy to release Mark’s assets. Mark appealed, and then after lengthy legal battle, Reserve Bank was ordered to repay Mark his R250 million, plus the interest. Mark announced that he would be donating that entire amount to trust that will be established in order to help others take cases to Constitutional Court. + +> “The exit charge was not inconsistent with the Constitution. The dominant purpose of the exit charge was not to raise revenue but rather to regulate conduct by discouraging the export of capital to protect the domestic economy.” +> +> — Judge Dikgang Moseneke + +In 2015, Constitutional Court of South Africa reversed and set-aside findings of lower courts, ruling that dominant purpose of the exit charge was in order to regulate conduct rather than for raising the revenue. + +### Mark Shuttleworth’s likes ### + +Cesária Évora, mp3s,Spring, Chelsea, finally seeing something obvious for first time, coming home, Sinatra, daydreaming, sundowners, flirting, d’Urberville, string theory, Linux, particle physics, Python, reincarnation, mig-29s, snow, travel, Mozilla, lime marmalade, body shots, the African bush, leopards, Rajasthan, Russian saunas, snowboarding, weightlessness, Iain m banks, broadband, Alastair Reynolds, fancy dress, skinny-dipping, flashes of insight, post-adrenaline euphoria, the inexplicable, convertibles, Clifton, country roads, international space station, machine learning, artificial intelligence, Wikipedia, Slashdot, kitesurfing, and Manx lanes. + +### Shuttleworth’s dislikes ### + +Admin, salary negotiations, legalese, and public speaking. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/mark-shuttleworth-man-behind-ubuntu-operating-system/ + +作者:[M.el Khamlichi][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/pirat9/ \ No newline at end of file diff --git a/sources/talk/20151023 Ubuntu 15.10 Codenamed Wily Werewolf Review.md b/sources/talk/20151023 Ubuntu 15.10 Codenamed Wily Werewolf Review.md new file mode 100644 index 0000000000..e232beb30a --- /dev/null +++ b/sources/talk/20151023 Ubuntu 15.10 Codenamed Wily Werewolf Review.md @@ -0,0 +1,68 @@ +Ubuntu 15.10, Codenamed Wily Werewolf, Review +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Ubuntu-15.10-791x445.png) + +The problem we have with reviewing Ubuntu on any occasion, is readers consistently expect to read of a revolutionary new release, every 6 months. If you’re expecting Ubuntu 15.10 to be just that, then you may want to click out of this review right now. It’s important to clarify that this is nothing negative towards 15.10 as a release, but it is a maintenance release and not a release which purports to introduce a great deal of new software. + +With that opening disclaimer out of the way, let’s take a look at what 15.10 does offer. + +### Linux kernel 4.2 ### + +The biggest change you will find with Ubuntu 15.10 is the kernel branch has been upgraded to **Linux 4.2**. + +This is long overdue for Ubuntu. It feels like it has been lagging behind other distributions by sticking with the 3.x branch of Linux for the entirety of the 15.04 cycle. + +If you’re going to be installing Ubuntu 15.10 on new hardware, then you will benefit greatly from the Linux kernel upgrade to 4.x branch as there is loads of updates which directly improve performance on new hardware. Support for AMDGPU kernel DRM is included, which is a boon for owners of recent Radeon graphics cards. The latest iteration of the driver will reside alongside the current Radeon DRM drivers, which was already in the kernel in addition to the usual open-source driver offerings. + +Support for Intel Broxton is also included in Linux 4.2, albeit Ubuntu 15.10 users are probably going to get nothing out of this update, yet it’s still worthy of a mention we think. There are also some erroneous updates for Skylake CPU’s. Finally, there is a host of code updates and fixes for Ext4 filesystems. + +That pretty much rounds out the Linux kernel 4.2 updates. So what else is new? Let’s take a closer look at the software that you may be more familiar with and get more excited about. + +### Software ### + +LibreOffice has been upgraded to 5.0.1.2, a major update for LibreOffice users. Firefox on the version that we tested is sitting at 41.0.2. By the time you read this, it will most-likely be updated again and you may see a newer version be pushed out through the Ubuntu Repositories. + +On the desktop front, a vanilla Ubuntu installation will see you running Unity 7.3.2 while GNOME sits at 3.8. On the KDE end, a Plasma 5 desktop will see you running version 5.4.2. For the alternative desktop-environments, XFCE has been upgraded to the latest revision, 4.12 while the version of MATE includes 1.10. + +### User Experience/Screenshots ### + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/1.png) + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/2.png) + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/3.png) + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/4.png) + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/5.png) + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/6.png) + +### Conclusion ### + +Ubuntu 15.10 as a operating system for Review is pretty lackluster. There’s nothing new as such and there’s nothing we can really say that is going to change your opinion from its predecessor, 15.04. Therefore, we recommend you to upgrade either out of habit and according to your regular upgrade schedule rather than out of a specific necessity for a specific feature of this release. Because there is really nothing that could possibly differentiate it from the older, yet still very stable 15.04 release. But if you’re going to stick with 15.04 for a little longer, we do recommend that you look at [upgrading the kernel to the latest 4.2 branch][2]. It is worth it. + +If you really want a reason to upgrade? Linux kernel 4.2 would be our sole reason for taking Ubuntu 15.10 into consideration. + +### Looking Ahead ### + +What we really look forward to is the release of Ubuntu 16.04. We have been promised over and over again for several releases that Mir will be the default display server included in Ubuntu. We still see releases pushed out that rely on X.org. It has resulted in us adopting a “yeah right” attitude as we have become accustomed to the usual delay announcements. + +We are hopeful that Mir Developers can push out a working version in time for the release of 16.04 next year. As precaution though, we urge you to not get too excited because it may very well not happen. + +It remains much the same with Unity 8. It’s most certainly a possibility, but we can’t guarantee that it will be included in 16.04, yet we remain hopeful. + +As we’ve mentioned for this release, there’s nothing really ground-breaking with this release. In fact, it has been much the same story for the last couple of releases of Ubuntu Linux. It is in dire need of a distribution-wide reboot. Developers and Ubuntu users alike are positive that Mir and Unity 8 will be the two primary packages that may just provide the popular, yet ailing, distribution the reboot that it needs. + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/ubuntu-15-10-codenamed-wily-werewolf-review/ + +作者:[Chris Jones][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/chris/ +[1]:http://www.unixmen.com/how-to-install-linux-kernel-4-2-3/ \ No newline at end of file From 18b6a85c4b808fafeb0ab5a1e3d42a3f13a4a313 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 23 Oct 2015 18:45:15 +0800 Subject: [PATCH 2330/2517] Translating sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md --- ...p 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md b/sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md index b13e7cd90d..b7c268f14b 100644 --- a/sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md +++ b/sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md @@ -1,3 +1,4 @@ +ictlyh Translating Part 10: Setting Up “NTP (Network Time Protocol) Server” in RHEL/CentOS 7 ================================================================================ Network Time Protocol – NTP- is a protocol which runs over port 123 UDP at Transport Layer and allows computers to synchronize time over networks for an accurate time. While time is passing by, computers internal clocks tend to drift which can lead to inconsistent time issues, especially on servers and clients logs files or if you want to replicate servers resources or databases. From 2ba7f33f55d3aa79411fad7510503f5ccaeebc6e Mon Sep 17 00:00:00 2001 From: martin qi Date: Fri, 23 Oct 2015 22:57:25 +0800 Subject: [PATCH 2331/2517] translating --- ...9 Superclass--15 of the world's best living programmers.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150909 Superclass--15 of the world's best living programmers.md b/sources/talk/20150909 Superclass--15 of the world's best living programmers.md index 70a9803b10..8959bc42fb 100644 --- a/sources/talk/20150909 Superclass--15 of the world's best living programmers.md +++ b/sources/talk/20150909 Superclass--15 of the world's best living programmers.md @@ -1,3 +1,5 @@ +martin translating... + Superclass: 15 of the world’s best living programmers ================================================================================ When developers discuss who the world’s top programmer is, these names tend to come up a lot. @@ -386,4 +388,4 @@ via: http://www.itworld.com/article/2823547/enterprise-software/158256-superclas [131]:http://community.topcoder.com/tc?module=AlgoRank [132]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi [133]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi/comment/4720779 -[134]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi/comment/4880549 \ No newline at end of file +[134]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi/comment/4880549 From 11356cdf1bcd58de69a753e2a64754866e834b2e Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 23 Oct 2015 23:19:56 +0800 Subject: [PATCH 2332/2517] PUB:Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @strugglingyouth 大功告成~ --- ...tware RAID's in Linux with 'Mdadm' Tool.md | 77 ++++++++++--------- 1 file changed, 39 insertions(+), 38 deletions(-) rename {translated/tech => published}/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md (63%) diff --git a/translated/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md b/published/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md similarity index 63% rename from translated/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md rename to published/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md index 5f1dd3a413..775e82aba5 100644 --- a/translated/tech/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md +++ b/published/RAID/Part 9 - How to Manage Software RAID's in Linux with 'Mdadm' Tool.md @@ -1,53 +1,51 @@ - -在 Linux 中如何使用 ‘Mdadm’ 工具管理软件 RAID - 第9部分 +在 Linux 下使用 RAID(九):如何使用 ‘Mdadm’ 工具管理软件 RAID ================================================================================ 无论你以前有没有使用 RAID 阵列的经验,以及是否完成了 [此 RAID 系列][1] 的所有教程,一旦你在 Linux 中熟悉了 `mdadm --manage` 命令的使用,管理软件 RAID 将不是很复杂的任务。 +![在 Linux 中使用 mdadm 管理 RAID 设备 - 第9部分](http://www.tecmint.com/wp-content/uploads/2015/10/Manage-Raid-with-Mdadm-Tool-in-Linux.jpg) -![Manage Raid Devices with Mdadm in Linux](http://www.tecmint.com/wp-content/uploads/2015/10/Manage-Raid-with-Mdadm-Tool-in-Linux.jpg) - -在 Linux 中使用 mdadm 管理 RAID 设备 - 第9部分 +*在 Linux 中使用 mdadm 管理 RAID 设备 - 第9部分* 在本教程中,我们会再介绍此工具提供的功能,这样当你需要它,就可以派上用场。 #### RAID 测试方案 #### -在本系列的最后一篇文章中,我们将使用一个简单的 RAID 1(镜像)阵列,它由两个 8GB 的磁盘(/dev/sdb 和 /dev/sdc)和一个备用设备(dev/sdd)来演示,但在此使用的方法也适用于其他类型的配置。也就是说,放心去用吧,把这个页面添加到浏览器的书签,然后让我们开始吧。 +在本系列的最后一篇文章中,我们将使用一个简单的 RAID 1(镜像)阵列,它由两个 8GB 的磁盘(/dev/sdb 和 /dev/sdc)和一个备用设备(/dev/sdd)来演示,但在此使用的方法也适用于其他类型的配置。也就是说,放心去用吧,把这个页面添加到浏览器的书签,然后让我们开始吧。 ### 了解 mdadm 的选项和使用方法 ### -幸运的是,mdadm 有一个 `built-in --help` 参数来对每个主要的选项提供说明文档。 +幸运的是,mdadm 有一个内建的 `--help` 参数来对每个主要的选项提供说明文档。 -因此,让我们开始使用: +因此,让我们开始输入: # mdadm --manage --help -`mdadm --manage` 将使我们看到能够执行哪些任务: +就会使我们看到 `mdadm --manage` 能够执行哪些任务: ![Manage RAID with mdadm Tool](http://www.tecmint.com/wp-content/uploads/2015/10/mdadm-Usage-in-Linux.png) -使用 mdadm 工具来管理 RAID +*使用 mdadm 工具来管理 RAID* 正如我们在上面的图片看到,管理一个 RAID 阵列可以在任意时间执行以下任务: -- (重新)将设备添加到阵列中. -- 把设备标记为故障. -- 从阵列中删除故障设备. -- 使用备用设备更换故障设备. -- 先创建部分阵列. -- 停止阵列. -- 标记阵列为 ro(只读)或 rw(读写). +- (重新)将设备添加到阵列中 +- 把设备标记为故障 +- 从阵列中删除故障设备 +- 使用备用设备更换故障设备 +- 先创建部分阵列 +- 停止阵列 +- 标记阵列为 ro(只读)或 rw(读写) ### 使用 mdadm 工具管理 RAID 设备 ### -需要注意的是,如果用户忽略 `--manage` 选项,mdadm 默认使用管理模式。请记住这其实一点,以避免出现最坏的情况。 +需要注意的是,如果用户忽略 `--manage` 选项,mdadm 默认使用管理模式。请记住这一点,以避免出现最坏的情况。 -上面图像中的高亮文本显示了管理 RAIDs 的基本的语法: +上图中的高亮文本显示了管理 RAID 的基本语法: # mdadm --manage RAID options devices -让我们来演示几个例子. +让我们来演示几个例子。 #### ​例1:为 RAID 阵列添加设备 #### @@ -57,11 +55,11 @@ ![Add Device to Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Add-Device-to-Raid-Array.png) -添加设备到 Raid 阵列 +*添加设备到 Raid 阵列* #### ​例2:把一个 RAID 设备标记为故障并从阵列中移除 #### -在从逻辑阵列中删除该设备前,这是强制性的一步,然后从机器中取出它 - 注意顺序(如果弄错了这些步骤,最终可能会造成实际设备的损害): +在从逻辑阵列中删除该设备前,这是强制性的步骤,然后才能从机器中取出它 - 注意顺序(如果弄错了这些步骤,最终可能会造成实际设备的损害): # mdadm --manage /dev/md0 --fail /dev/sdb1 @@ -69,21 +67,23 @@ ![Recover and Rebuild Raid Data](http://www.tecmint.com/wp-content/uploads/2015/10/Recover-and-Rebuild-Raid-Data.png) -恢复和重建 raid 数据 +*恢复和重建 raid 数据* 一旦设备已被手动标记为故障,你就可以安全地从阵列中删除它: # mdadm --manage /dev/md0 --remove /dev/sdb1 -#### 例3:重新添加设备,这是阵列中已经移除的一部分 #### +#### 例3:重新添加设备,来替代阵列中已经移除的设备 #### -到现在为止,我们有一个工作的 RAID 1 阵列,它包含了2个活动的设备:/dev/sdc1 和 /dev/sdd1。现在让我们试图重新添加 /dev/sdb1 到/dev/md0: +到现在为止,我们有一个工作的 RAID 1 阵列,它包含了2个活动的设备:/dev/sdc1 和 /dev/sdd1。现在让我们试试重新添加 /dev/sdb1 到/dev/md0: # mdadm --manage /dev/md0 --re-add /dev/sdb1 我们会碰到一个错误: -mdadm: --re-add 将 /dev/sdb1 添加到 /dev/md0 是不可能的,因为阵列中的磁盘已经达到了最大的数量。因此,我们有两个选择:a)将 /dev/sdb1 添加为备用的,如例1,或 b)从阵列中删除 /dev/sdd1 然后重新添加 /dev/sdb1。 + # mdadm: --re-add for /dev/sdb1 to /dev/md0 is not possible + +因为阵列中的磁盘已经达到了最大的数量。因此,我们有两个选择:a)将 /dev/sdb1 添加为备用的,如例1;或 b)从阵列中删除 /dev/sdd1 然后重新添加 /dev/sdb1。 我们选择选项 b),先停止阵列然后重新启动: @@ -96,7 +96,7 @@ mdadm 能检测到新添加的设备并将其作为备用设备,当添加完 ![Raid Rebuild Status](http://www.tecmint.com/wp-content/uploads/2015/10/Raid-Rebuild-Status.png) -重建 Raid 的状态 +*重建 Raid 的状态* #### 例4:使用特定磁盘更换 RAID 设备 #### @@ -106,19 +106,19 @@ mdadm 能检测到新添加的设备并将其作为备用设备,当添加完 ![Replace Raid Device](http://www.tecmint.com/wp-content/uploads/2015/10/Replace-Raid-device.png) -更换 Raid 设备 +*更换 Raid 设备* -当磁盘通过 `--replace` 被标记为故障时,这将导致设备通过 `--with` 被添加到 RAID 中: +这会导致 `--replace` 指定的设备被标记为故障,而 `--with`指定的设备添加到 RAID 中来替代它: ![Check Raid Rebuild Status](http://www.tecmint.com/wp-content/uploads/2015/10/Check-Raid-Rebuild-Status.png) -检查 Raid 重建状态 +*检查 Raid 重建状态* #### ​例5:标记 RAID 阵列为 ro 或 rw #### -创建阵列后,你必须在它上面创建一个文件系统并将其挂载到一个目录下才能使用它。你可能不知道,RAID 也可以被设置为 ro,然后它就只读了,或者设置为 rw,然后就能进行写入设备以及读取操作。 +创建阵列后,你必须在它上面创建一个文件系统并将其挂载到一个目录下才能使用它。你可能不知道,RAID 也可以被设置为 ro,使其只读;或者设置为 rw,就可以同时写入了。 -为了标记该设备为 ro,首先需要将其卸载: +要标记该设备为 ro,首先需要将其卸载: # umount /mnt/raid1 # mdadm --manage /dev/md0 --readonly @@ -127,7 +127,7 @@ mdadm 能检测到新添加的设备并将其作为备用设备,当添加完 ![Set Permissions on Raid Array](http://www.tecmint.com/wp-content/uploads/2015/10/Set-Permissions-on-Raid-Array.png) -在 RAID 阵列上设置权限 +*在 RAID 阵列上设置权限* 要配置阵列允许写入操作需要使用 `--readwrite` 选项。请注意,在设置 rw 标志前,你需要先卸载设备并停止它: @@ -139,23 +139,24 @@ mdadm 能检测到新添加的设备并将其作为备用设备,当添加完 ![Allow Read Write Permission on Raid](http://www.tecmint.com/wp-content/uploads/2015/10/Allow-Write-Permission-on-Raid.png) -配置 Raid 允许读写操作 +*配置 Raid 允许读写操作* ### 总结 ### -在本系列中,我们已经解释了如何建立一个在企业环境中使用的软件RAID 阵列。如果你按照这些文章所提供的例子进行配置,在 Linux 中你会充分利用软件 RAID 的价值。 +在本系列中,我们已经解释了如何建立一个在企业环境中使用的软件 RAID 阵列。如果你按照这些文章所提供的例子进行配置,在 Linux 中你会充分领会到软件 RAID 的价值。 如果你碰巧任何问题或有建议,请随时使用下面的方式与我们联系。 + -------------------------------------------------------------------------------- via: http://www.tecmint.com/manage-software-raid-devices-in-linux-with-mdadm/ 作者:[GABRIEL CÁNEPA][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者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/understanding-raid-setup-in-linux/ -[2]:http://www.tecmint.com/recover-data-and-rebuild-failed-software-raid/ +[1]:https://linux.cn/article-6085-1.html +[2]:https://linux.cn/article-6448-1.html From e102e7d9cfc080fefd398dec383be28d4446bdc4 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 24 Oct 2015 14:30:36 +0800 Subject: [PATCH 2333/2517] Translated sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md --- ...mistic on OpenStack Revenue Opportunity.md | 38 ------------------- ...mistic on OpenStack Revenue Opportunity.md | 37 ++++++++++++++++++ 2 files changed, 37 insertions(+), 38 deletions(-) delete mode 100644 sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md create mode 100644 translated/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md diff --git a/sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md b/sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md deleted file mode 100644 index c4761e1657..0000000000 --- a/sources/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md +++ /dev/null @@ -1,38 +0,0 @@ -ictlyh Translating -Red Hat CEO Optimistic on OpenStack Revenue Opportunity -================================================================================ -Red Hat continues to accelerate its growth thanks to an evolving mix of platform and infrastructure technology revolving around Linux and the cloud. Red Hat announced its second quarter fiscal 2016 financial results on September 21, once again exceeding expectations. - -![](http://www.serverwatch.com/imagesvr_ce/1212/icon-redhatcloud-r.jpg) - -For the quarter, Red Hat reported revenue of $504 million for a 13 percent year-over-year gain. Net Income was reported at $51 million, up from $47 Red Hatmillion in the second quarter of fiscal 2015. Looking forward, Red Hat provided some aggressive guidance for the coming quarter and the full year. For the third quarter, Red Hat provided guidance for revenue to be in the range of $519 million to $523 million, which is a 15 percent year-over-year gain. - -On a full year basis, Red Hat's full year guidance is for fiscal 2016 revenue of $2.044 billion, for a 14 percent year-over-year gain. - -Red Hat CFO Frank Calderoni commented during the earnings call that all of Red Hat's top 30 largest deals were approximately $1 million or more. He noted that Red Hat had four deals that were in excess of $5 million and one deal that was well over $10 million. As has been the case in recent years, cross selling across Red Hat products is strong with 65 percent of all deals including one or more components from Red Hat's group of application development and emerging technologies offerings. - -"We expect the growing adoption of these technologies, like Middleware, the RHEL OpenStack platform, OpenShift, cloud management and storage, to continue to drive revenue growth," Calderoni said. - -### OpenStack ### - -During the earnings call, Red Hat CEO Jim Whitehurst was repeatedly asked about the revenue prospects for OpenStack. Whitehurst said that the recently released Red Hat OpenStack Platform 7.0 is a big jump forward thanks to the improved installer. - -"It does a really good job of kind of identifying hardware and lighting it up," Whitehurst said. "Of course, that means there's a lot of work to do around certifying that hardware, making sure it lights up appropriately." - -Whitehurst said that he's starting to see a lot more production application start to move to the OpenStack cloud. He cautioned however that it's still largely the early adopters moving to OpenStack in production and it isn't quite mainstream, yet. - -From a competitive perspective, Whitehurst talked specifically about Microsoft, HP and Mirantis. In Whitehurst's view many organizations will continue to use multiple operating systems and if they choose Microsoft for one part, they are more likely to choose an open-source option,as the alternative option. Whitehurst said he doesn't see a lot of head-to-head competition against HP in cloud, but he does see Mirantis. - -"We've had several wins or people who were moving away from Mirantis to RHEL," Whitehurst said. - --------------------------------------------------------------------------------- - -via: http://www.serverwatch.com/server-news/red-hat-ceo-optimistic-on-openstack-revenue-opportunity.html - -作者:[Sean Michael Kerner][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.serverwatch.com/author/Sean-Michael-Kerner-101580.htm \ No newline at end of file diff --git a/translated/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md b/translated/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md new file mode 100644 index 0000000000..e87cf21d8c --- /dev/null +++ b/translated/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md @@ -0,0 +1,37 @@ +红帽 CEO 对 OpenStack 收益表示乐观 +================================================================================ +得益于围绕 Linux 和云不断发展的平台和基础设施技术,红帽正在持续快速发展。红帽宣布在九月二十一日完成了 2016 财年第二季度的财务业绩,再次超过预期。 + +![](http://www.serverwatch.com/imagesvr_ce/1212/icon-redhatcloud-r.jpg) + +这一季度,红帽的收入为 5 亿 4 百万美元,和去年同比增长 13%。网络输入为 5 千 1 百万美元,超过 2015 年第二季度的 4 千 7 百万美元。展望未来,红帽为下一季度和全年提供了积极的目标。对于第三季度,红帽希望指导收益能在 5亿1千9百万美元和5亿2千3百万美元之间,和去年同期相比增长 15%。 + +对于 2016 财年,红帽的全年指导目标是 20亿4千4百万美元,和去年相比增长 14%。 + +红帽 CFO Frank Calderoni 在电话会议上指出,红帽最高的 30 个订单大概甚至超过 1 百万美元。其中有 4 个订单超过 5百万美元,还有一个超过1千万美元。从近几年的经验来看,红帽产品的交叉销售非常成功,全部订单中有超过 65% 的订单包括了一个或多个红帽应用和新兴技术产品组件。 + +Calderoni 说 “我们希望这些技术,例如中间件、RHEL OpenStack 平台、OpenShift、云管理和存储能持续推动收益增长。” + +### OpenStack ### + +在电话会议中,红帽 CEO Jim Whitehurst 多次问到 OpenStack 的收入前景。Whitehurst 说得益于安装程序的改进,最近发布的 Red Hat OpenStack Platform 7.0 向前垮了一大步。 + +Whitehurst 提到:“在识别硬件和使用方面它做的很好,当然,这也意味着在硬件识别并正确使用它们方便还有很多工作要做。” + +Whitehurst 说他已经开始注意到很多的生产应用程序开始迁移到 OpenStack 云上来。他也警告说在产业化方面迁移到 OpenStack 大部分只是尝鲜,还并没有成为主流。 + +对于竞争对手, Whitehurst 尤其提到了微软、惠普和 Mirantis。在他看来,很多组织仍然会使用多种操作系统,如果他们其中一部分使用了微软,他们更倾向于开源方案作为替代选项。Whitehurst 说在云方面他还没有看到太多和惠普面对面的竞争,但和 Mirantis 则确实如此。 + +Whitehurst 说 “我们也有几次胜利,他们从 Mirantis 转到了 RHEL。” + +-------------------------------------------------------------------------------- + +via: http://www.serverwatch.com/server-news/red-hat-ceo-optimistic-on-openstack-revenue-opportunity.html + +作者:[Sean Michael Kerner][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.serverwatch.com/author/Sean-Michael-Kerner-101580.htm \ No newline at end of file From 62c3ae7447bb0fe6cc6e4266b7f1505e217307fa Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 24 Oct 2015 16:07:13 +0800 Subject: [PATCH 2334/2517] Translated sources/talk/20151020 Linux History--24 Years Step by Step.md --- ...20 Linux History--24 Years Step by Step.md | 101 +++++++++--------- 1 file changed, 51 insertions(+), 50 deletions(-) rename {sources => translated}/talk/20151020 Linux History--24 Years Step by Step.md (53%) diff --git a/sources/talk/20151020 Linux History--24 Years Step by Step.md b/translated/talk/20151020 Linux History--24 Years Step by Step.md similarity index 53% rename from sources/talk/20151020 Linux History--24 Years Step by Step.md rename to translated/talk/20151020 Linux History--24 Years Step by Step.md index ddd1cc3538..ce9f6f95d2 100644 --- a/sources/talk/20151020 Linux History--24 Years Step by Step.md +++ b/translated/talk/20151020 Linux History--24 Years Step by Step.md @@ -1,33 +1,34 @@ -ictlyh Translating -Linux History: 24 Years Step by Step +Linux 的历史:24 年,一步一个脚印 ================================================================================ 注:youtube 视频 -### Pre-history ### +### 史前 ### -Linux success would not be possible without [C programming language][1] and [GNU Project][2] – Environment of Linux. +没有 [C 编程语言][1] and [GNU 项目][2] - Linux 环境,也就不可能有 Linux 的成功。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/00-1.jpg) -Ken Thompson and Dennis Ritchie -[Ken Thompson][1] and [Dennis Ritchie][2] was created the Unix Operation System in 1969-1970. Later was released the new [C programming language][3] – high-level and portable PL. Linux kernel written in C with some assembly code. +Ken Thompson 和 Dennis Ritchie + +[Ken Thompson][1] 和 [Dennis Ritchie][2] 在 1969-1970 创造了 Unix 操作系统。之后发布了新的 [C 编程语言][3] - 高级可移植编程语言。 Linux 内核用 C 和一些汇编代码写成。 + ![Richard Matthew Stallman](https://github.com/paulcarroty/Articles/raw/master/Linux_24/00-2.jpg) Richard Matthew Stallman -[Richard Matthew Stallman][4] started in 1984 the [GNU Project][5]. One of biggest goals — free Unix-like operation system and totally +[Richard Matthew Stallman][4] 在 1984 年启动了 [GNU 项目][5]。最大的一个目标 - 完全自由的类-Unix 操作系统。 -### 1991 – The Beginning ### +### 1991 – 元年 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1991-1.jpg) Linus Torvalds, 1991 -[Linus Torvalds][5] begin Linux kernel development in Helsinki, Finland – witten programm for hes hardware – Intel 80386 CPU. Hi also use Minix and GNU C compiler. Here is historical message from Linus Torvalds to Minix newsgroup: +[Linus Torvalds][5] 在芬兰赫尔辛基开始了 Linux 内核开发 - 为他的硬件 - Intel 30386 CPU 编写程序。他也使用 Minix 和 GNU C 编译器。下面是 Linus Torvalds 给 Minix 新闻组的历史消息: > From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) > Newsgroups: comp.os.minix @@ -54,41 +55,41 @@ Linus Torvalds, 1991 > > Linus (torvalds@kruuna.helsinki.fi) -After this Linux has supported by worldwide volunteers and professional specialists. Name “Linux” was defined by Linus coworker Ari Lemmke – just named directory of project on University Server. +从此之后,Linux 开始得到了世界范围志愿者和专业专家的支持。Linus 的合作者 Ari Lemmke 把它命名为 “Linux” - 大学服务器项目上的目录名称。 ### 1992 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1992-1.jpg) -Version 0.12 of Linux Kernel released under GPLv2. +在 GPLv2 协议下发布了 0.12 版 Linux 内核。 ### 1993 ### ![Slackware 1.0 ](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1993-1.png) -First release of Slackware – the oldest Linux Distro with the same leader – Patrick Volkerding. Linux kernel have ~100 Developers. +第一次发布 Slackware(译者注:Slackware Linux 是一个高度技术性的,干净的发行版,只有少量非常有限的个人设置) – 相同主导者 Patrick Volkerding 最老的 Linux 发行版。Linux 内核有 100 多个开发者。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1993-2.png) Debian -Debian – one of largest Linux-community also created in 1991. +Debian – 1991 年创立了最大的 Linux 社区之一。 ### 1994 ### -Linux 1.0 released and first GUI is available – thanks to XFree86 project. +Linux 1.0 发布了,多亏了 XFree 86 项目,第一次有了 GUI。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1994-1.png) Red Hat Linux -Released Red Hat Linux 1.0 +发布 Red Hat Linux 1.0 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1994-2.png) S.u.S.E Linux -and [S.u.S.E. Linux][6] 1.0. +和 [S.u.S.E. Linux][6] 1.0. ### 1995 ### @@ -96,7 +97,7 @@ and [S.u.S.E. Linux][6] 1.0. Red Hat Inc. -Bob Young and Marc Ewing merged their local business to [Red Hat Software][7]. Linux ported to many of hardware platforms. +Bob Yound 和 Marc Ewing 合并他们的本地业务为 [Red Hat Software][7]。Linux 移植到了很多硬件平台。 ### 1996 ### @@ -104,7 +105,7 @@ Bob Young and Marc Ewing merged their local business to [Red Hat Software][7]. L ### Tux ### -Tux Penguin – official mascot of Linux. Idea of Linus Torvalds – after visit to National Zoo & Aquarium in Canberra. Linux 2.0 released and support symmetric multiprocessing. Begin of KDE development. +企鹅 Tux - Linux 官方吉祥物。Linus Torvalds 参观了堪培拉国家动物园和水族馆之后有了这个想法。发布了 Linux 2.0,支持对称多处理器。开始开发 KDE。 ### 1997 ### @@ -112,33 +113,33 @@ Tux Penguin – official mascot of Linux. Idea of Linus Torvalds – after visit Miguel de Icaza -Miguel de Icaza and Federico Mena begin development of GNOME – free desktop environment with application. Linus Torvalds win in Linux’s Trademark conflict and Linux becomes the registered trademark of Linus. +Miguel de Icaza 和 Federico Mena 开始开发 GNOME - 自由桌面环境和应用程序。Linus Torvalds 赢得了 Linux 商标冲突,Linux 成为了 Linus 的注册商标。 ### 1998 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1998-1.jpg) -The Cathedral and the Bazaar +大教堂和集市 -[The Cathedral and the Bazaar][8] essay by Eric S. Raymond is published – highly recommend to read. Linux support from big companies: IBM, Oracle, Compaq. +Eric S. Raymond 出版了文章 [The Cathedral and the Bazaar][8](大教堂和集市) - 非常推荐阅读。Linux 得到了大公司的支持: IBM、Oracle、康柏。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1998-2.png) Mandrake Linux -First release of Mandrake Linux – Red Hat Linux-based distro with K Desktop Environment. +首次发布 Mandrake Linux - 基于红帽 Linux 带 K 桌面环境的发行版。 ### 1999 ### ![](https://upload.wikimedia.org/wikipedia/commons/4/4f/KDE_1.1.jpg) -First major KDE release. +第一个主要的 KDE 发行版。 ### 2000 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2000-1.jpg) -Dell support Linux – first big hardware vendor +Dell 支持 Linux - 第一个大的硬件供应商。 ### 2001 ### @@ -146,7 +147,7 @@ Dell support Linux – first big hardware vendor Revolution OS -Documentary film “Revolution OS” – 20 years of GNU, Linux, Open Source, Free Software history with iterview of best hackers of Linux and Open Source World. +纪录片 “Revolution OS”(译者注:操作系统革命) - GNU、Linux、开源、自由软件的 20 年历史,以及 Linux 和开源界最好骇客的采访。 ### 2002 ### @@ -154,7 +155,7 @@ Documentary film “Revolution OS” – 20 years of GNU, Linux, Open Source, Fr BitKeeper -Linux now use BitKeeper – proprietary software for distributed version control. +Linux 开始使用 BitKeeper - 分布式版本控制专用软件。 ### 2003 ### @@ -162,25 +163,25 @@ Linux now use BitKeeper – proprietary software for distributed version control SUSE -Novell buy SuSE Linux AG for $210M. Since 2003 also started epic battle SCO Group vs IBM and Linux community for the Unix copyrights. +Novell 用 210 美元购买了 SUSE Linux AG。2003 年也开始了 SCO 集团,IBM、以及 Linux 社区关于 Unix 版权的史诗般战役。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2003-2.png) Fedora -First Release of Fedora Linux from Red Hat and Linux Community. +红帽和 Linux 社区第一次发布了 Fedora Linux。 ### 2004 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2004-1.png) -X.ORG Foundation +X.ORG 基金会 -The XFree86 team is dropped and join to [X.Org Foundation][9], development of X be faster. +XFree86 解散了并加入到 [X.Org 基金会][9], X 的开发更快了。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2004-2.jpg) -Ubuntu 4.10 – First Release +Ubuntu 4.10 – 第一次发布 ### 2005 ### @@ -188,21 +189,21 @@ Ubuntu 4.10 – First Release openSUSE -Beginning of [openSUSE][10] – free version of enterprise Novell’s OS. OpenOffice.org started support of OpenDocument standards. +开始了 [openSUSE][10] - 企业版 Novell’s OS 的免费版本。OpenOffice.org 开始支持 OpenDocument 标准。 ### 2006 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2006-1.png) -New Linux distribution – Oracle Linux based on Red Hat Enterprise Linux. Microsoft and Novell begin cooperation in IT and both patents protection. +新的 Linux 发行版 - 基于红帽企业版 Linux 的 Oracle Linux。微软和 Novell 开始在 IT 和专利保护方面进行合作。 ### 2007 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2007-1.jpg) -Dell Linux Laptop +Dell Linux 笔记本 -First laptops with preinstalled Linux from Dell. +Dell 发布了预安装 Linux 的笔记本。 ### 2008 ### @@ -210,7 +211,7 @@ First laptops with preinstalled Linux from Dell. KDE 4.0 -KDE 4 released in non-stable condition and many users migrate to GNOME. +在不稳定的情况下发布了 KDE 4,很多用户开始迁移到 GNOME。 ### 2009 ### @@ -218,9 +219,9 @@ KDE 4 released in non-stable condition and many users migrate to GNOME. Red Hat -Red Hat’s Linux-based success – $2.62 billion market capitalization. +红帽 Linux 的成功 - 市值 2亿6千2百万美元。 -In 2009 Microsoft sumbitted first patch to Linux kernel under GPLv2 license. +2009 年微软第一次在 GPLv2 协议下向 Linux 内核提交了补丁。 ### 2010 ### @@ -228,9 +229,9 @@ In 2009 Microsoft sumbitted first patch to Linux kernel under GPLv2 license. Novell -> Attachmate -Novell was sold to The Attachmate Group, Inc. for $2.2 billion. SUSE and Novell – two independs products in new company. +Novell 已 2亿2千万美元卖给了 Attachmate Group, Inc。在新公司 SUSE 和 Novell 成为了两款独立的产品。 -First release of [systemd][11] and begin of Linux system revolution. +第一次发布了 [systemd][11],开始了 Linux 系统的革命。 ### 2011 ### @@ -238,50 +239,50 @@ First release of [systemd][11] and begin of Linux system revolution. Unity Desktop in 2011 -Ubuntu Unity released – a lot of criticizm from users. +发布了 Ubuntu Unity - 遭到很多用户的批评。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2011-2.png) GNOME 3.0, 2011 -GNOME 3.0 release – “unholy mess” by Linus Torvalds and also a lot of negative critics. Linux kernel 3.0 released. +发布了 GNOME 3.0 - Linus Torvalds 评论为 “unholy mess” 以及很多负面评论。发布了 Linux 内核 3.0。 ### 2012 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2012-1.png) -15 million lines of code +1500 万行代码 -Linux kernel have a 15 million lines of code. Microsoft is one of top Linux contributors. +Linux 内核有 1500 万行代码。微软成为主要共享者之一。 ### 2013 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2013-1.png) -Kali Linux 1.0 released – Debian-based Linux distro for penetration testing and digital forensics. Also in 2014 Centos with code developers joined to Red Hat Inc. +发布了 Kali Linux 1.0 - 用户渗透测试和数字取证的基于 Debian 的 Linux 发行版。2014 年 CentOS 代码开发者加入到了红帽公司。 ### 2014 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2014-1.jpg) -Lennart Poettering and Kay Sievers +Lennart Poettering 和 Kay Sievers -systemd – default in Ubuntu and all top Linux distribution. Ubuntu have 22 000 000 users. Big Android progress – 75% of all mobile devices. +systemd - Ubuntu 和所有主流 Linux 发行版的默认初始化程序。Ubuntu 有 2200 万用户。安卓的大进步 - 占了所有移动设备的 75%。 ### 2015 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2015-1.jpg) -Linux kernel 4.0 released. Mandriva was liquidated, but have a lot of forks – Mageia is most popular. +发布了 Linux 4.0。没有了 Mandriva(译者注:Mandriva 是目前全球最优秀的 Linux 发行版之一,稳居于 linux 排行榜第一梯队。2005年之前稳居 linux 排行榜 NO.1。它是目前最易用的 linux 发行版,也是众多国际级 linux 发行版中唯一一个默认即支持中文环境的 linux) - 但还有很多分支 - 其中最流行的一个是 Mageia。 -Written from Linux with love. +写于对 Linux 的热爱。 -------------------------------------------------------------------------------- via: https://tlhp.cf/linux-history/ 作者:[Pavlo Rudyi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](http://mutouxiaogui.cn/blog) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From f4282d7e85868bf081c4b2b8dc2df5a4c0d1fc0d Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 24 Oct 2015 17:01:46 +0800 Subject: [PATCH 2335/2517] Translated sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md --- ...e Protocol) Server' in RHEL or CentOS 7.md | 131 ------------------ ...e Protocol) Server' in RHEL or CentOS 7.md | 130 +++++++++++++++++ 2 files changed, 130 insertions(+), 131 deletions(-) delete mode 100644 sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md create mode 100644 translated/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md diff --git a/sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md b/sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md deleted file mode 100644 index b7c268f14b..0000000000 --- a/sources/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md +++ /dev/null @@ -1,131 +0,0 @@ -ictlyh Translating -Part 10: Setting Up “NTP (Network Time Protocol) Server” in RHEL/CentOS 7 -================================================================================ -Network Time Protocol – NTP- is a protocol which runs over port 123 UDP at Transport Layer and allows computers to synchronize time over networks for an accurate time. While time is passing by, computers internal clocks tend to drift which can lead to inconsistent time issues, especially on servers and clients logs files or if you want to replicate servers resources or databases. - -![NTP Server Install in CentOS](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Server-Install-in-CentOS.png) - -NTP Server Installation in CentOS and RHEL 7 - -#### Requirements: #### - -- [CentOS 7 Installation Procedure][1] -- [RHEL 7 Installation Procedure][2] - -#### Additional Requirements: #### - -- [Register and Enbale RHEL 7 Subscription for Updates][3] -- [Configure Static IP Address on CentOS/Rhel 7][4] -- [Disable and Remove Unwanted Services in CentOS/RHEL 7][5] - -This tutorial will demonstrate how you can install and configure NTP server on CentOS/RHEL 7 and automatically synchronize time with the closest geographically peers available for your server location by using NTP Public Pool Time Servers list. - -#### Step 1: Install and configure NTP daemon #### - -1. NTP server package is provided by default from official CentOS /RHEL 7 repositories and can be installed by issuing the following command. - - # yum install ntp - -![Install NTP in CentOS](http://www.tecmint.com/wp-content/uploads/2014/09/Install-NTP-in-CentOS.png) - -Install NTP Server - -2. After the server is installed, first go to official [NTP Public Pool Time Servers][6], choose your Continent area where the server physically is located, then search for your Country location and a list of NTP servers should appear. - -![NTP Pool Server](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Pool-Server.png) - -NTP Pool Server - -3. Then open NTP daemon main configuration file for editing, comment the default list of Public Servers from pool.ntp.org project and replace it with the list provided for your country like in the screenshot below. - -![Configure NTP Server in CentOS](http://www.tecmint.com/wp-content/uploads/2014/09/Configure-NTP-Server.png) - -Configure NTP Server - -4. Further, you need to allow clients from your networks to synchronize time with this server. To accomplish this, add the following line to NTP configuration file, where restrict statement controls, what network is allowed to query and sync time – replace network IPs accordingly. - - restrict 192.168.1.0 netmask 255.255.255.0 nomodify notrap - -The nomodify notrap statements suggest that your clients are not allowed to configure the server or be used as peers for time sync. - -5. If you need additional information for troubleshooting in case there are problems with your NTP daemon add a log file statement which will record all NTP server issues into one dedicated log file. - - logfile /var/log/ntp.log - -![Enable NTP Logs in CentOS](http://www.tecmint.com/wp-content/uploads/2014/09/Enable-NTP-Log.png) - -Enable NTP Logs - -6. After you have edited the file with all configuration explained above save and close ntp.conf file. Your final configuration should look like in the screenshot below. - -![NTP Server Configuration in CentOS](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Server-Configuration.png) - -NTP Server Configuration - -### Step 2: Add Firewall Rules and Start NTP Daemon ### - -7. NTP service uses UDP port 123 on OSI transport layer (layer 4). It is designed particularly to resist the effects of variable latency (jitter). To open this port on RHEL/CentOS 7 run the following commands against Firewalld service. - - # firewall-cmd --add-service=ntp --permanent - # firewall-cmd --reload - -![Open NTP Port in Firewall](http://www.tecmint.com/wp-content/uploads/2014/09/Open-NTP-Port.png) - -Open NTP Port in Firewall - -8. After you have opened Firewall port 123, start NTP server and make sure you enable it system-wide. Use the following commands to manage the service. - - # systemctl start ntpd - # systemctl enable ntpd - # systemctl status ntpd - -![Start NTP Service](http://www.tecmint.com/wp-content/uploads/2014/09/Start-NTP-Service.png) - -Start NTP Service - -### Step 3: Verify Server Time Sync ### - -9. After NTP daemon has been started, wait a few minutes for the server to synchronize time with its pool list servers, then run the following commands to verify NTP peers synchronization status and your system time. - - # ntpq -p - # date -R - -![Verify NTP Server Time](http://www.tecmint.com/wp-content/uploads/2014/09/Verify-NTP-Time-Sync.png) - -Verify NTP Time Sync - -10. If you want to query and synchronize against a pool of your choice use ntpdate command, followed by the server or servers addresses, as suggested in the following command line example. - - # ntpdate -q 0.ro.pool.ntp.org 1.ro.pool.ntp.org - -![Synchronize NTP Time](http://www.tecmint.com/wp-content/uploads/2014/09/Synchronize-NTP-Time.png) - -Synchronize NTP Time - -### Step 4: Setup Windows NTP Client ### - -11. If your windows machine is not a part of a Domain Controller you can configure Windows to synchronize time with your NTP server by going to Time from the right side of Taskbar -> Change Date and Time Settings -> Internet Time tab -> Change Settings -> Check Synchronize with an Internet time server -> put your server’s IP or FQDN on Server filed -> Update now -> OK. - -![Synchronize Windows Time with NTP](http://www.tecmint.com/wp-content/uploads/2014/09/Synchronize-Windows-Time-with-NTP.png) - -Synchronize Windows Time with NTP - -That’s all! Setting up a local NTP Server on your network ensures that all your servers and clients have the same time set in case of an Internet connectivity failure and they all are synchronized with each other. - --------------------------------------------------------------------------------- - -via: http://www.tecmint.com/install-ntp-server-in-centos/ - -作者:[Matei Cezar][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/cezarmatei/ -[1]:http://www.tecmint.com/centos-7-installation/ -[2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ -[3]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ -[4]:http://www.tecmint.com/configure-network-interface-in-rhel-centos-7-0/ -[5]:http://www.tecmint.com/remove-unwanted-services-in-centos-7/ -[6]:http://www.pool.ntp.org/en/ \ No newline at end of file diff --git a/translated/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md b/translated/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md new file mode 100644 index 0000000000..54c4330ae2 --- /dev/null +++ b/translated/tech/RHCE/Part 10 - Setting Up 'NTP (Network Time Protocol) Server' in RHEL or CentOS 7.md @@ -0,0 +1,130 @@ +第 10 部分:在 RHEL/CentOS 7 中设置 “NTP(网络时间协议) 服务器” +================================================================================ +网络时间协议 - NTP - 是运行在传输层 123 号端口允许计算机通过网络同步准确时间的协议。随着时间的流逝,计算机内部时间会出现漂移,这会导致时间不一致问题,尤其是对于服务器和客户端日志文件,或者你想要备份服务器资源或数据库。 + +![在 CentOS 上安装 NTP 服务器](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Server-Install-in-CentOS.png) + +在 CentOS 和 RHEL 7 上安装 NTP 服务器 + +#### 要求: #### + +- [CentOS 7 安装过程][1] +- [RHEL 安装过程][2] + +#### 额外要求: #### + +- [注册并启用 RHEL 7 更新订阅][3] +- [在 CentOS/RHCE 7 上配置静态 IP][4] +- [在 CentOS/RHEL 7 上停用并移除不需要的服务][5] + +这篇指南会告诉你如何在 CentOS/RHCE 7 上安装和配置 NTP 服务器,并使用 NTP 公共时间服务器池列表中和你服务器地理位置最近的可用节点中同步时间。 + +#### 步骤一:安装和配置 NTP 守护进程 #### + +1. 官方 CentOS /RHEL 7 库默认提供 NTP 服务器安装包,可以通过使用下面的命令安装。 + + # yum install ntp + +![在 CentOS 上安装 NTP 服务器](http://www.tecmint.com/wp-content/uploads/2014/09/Install-NTP-in-CentOS.png) + +安装 NTP 服务器 + +2. 安装完服务器之后,首先到官方 [NTP 公共时间服务器池][6],选择你服务器物理位置所在的洲,然后搜索你的国家位置,然后会出现 NTP 服务器列表。 + +![NTP 服务器池](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Pool-Server.png) + +NTP 服务器池 + +3. 然后打开编辑 NTP 守护进程主要配置文件,从 pool.ntp.org 中注释掉默认的公共服务器列表并用类似下面截图提供给你国家的列表替换。 + +![在 CentOS 中配置 NTP 服务器](http://www.tecmint.com/wp-content/uploads/2014/09/Configure-NTP-Server.png) + +配置 NTP 服务器 + +4. 下一步,你需要允许客户端从你的网络中和这台服务器同步时间。为了做到这点,添加下面一行到 NTP 配置文件,其中限制语句控制允许哪些网络查询和同步时间 - 根据需要替换网络 IP。 + + restrict 192.168.1.0 netmask 255.255.255.0 nomodify notrap + +nomodify notrap 语句意味着不允许你的客户端配置服务器或者作为同步时间的节点。 + +5. 如果你需要额外的信息用于错误处理,以防你的 NTP 守护进程出现问题,添加一个 logfile 语句,用于记录所有 NTP 服务器问题到一个指定的日志文件。 + + logfile /var/log/ntp.log + +![在 CentOS 中启用 NTP 日志](http://www.tecmint.com/wp-content/uploads/2014/09/Enable-NTP-Log.png) + +启用 NTP 日志 + +6. 你编辑完所有上面解释的配置并保存关闭 ntp.conf 文件后,你最终的配置看起来像下面的截图。 + +![CentOS 中 NTP 服务器的配置](http://www.tecmint.com/wp-content/uploads/2014/09/NTP-Server-Configuration.png) + +NTP 服务器配置 + +### 步骤二:添加防火墙规则并启动 NTP 守护进程 ### + +7. NTP 服务在传输层(第四层)使用 123 号 UDP 端口。它是针对限制可变延迟的影响特别设计的。要在 RHEL/CentOS 7 中开放这个端口,可以对 Firewalld 服务使用下面的命令。 + + # firewall-cmd --add-service=ntp --permanent + # firewall-cmd --reload + +![在 Firewall 中开放 NTP 端口](http://www.tecmint.com/wp-content/uploads/2014/09/Open-NTP-Port.png) + +在 Firewall 中开放 NTP 端口 + +8. 你在防火墙中开放了 123 号端口之后,启动 NTP 服务器并确保系统范围内可用。用下面的命令管理服务。 + + # systemctl start ntpd + # systemctl enable ntpd + # systemctl status ntpd + +![启动 NTP 服务](http://www.tecmint.com/wp-content/uploads/2014/09/Start-NTP-Service.png) + +启动 NTP 服务 + +### 步骤三:验证服务器时间同步 ### + +9. 启动了 NTP 守护进程后,用几分钟等服务器和它的服务器池列表同步时间,然后运行下面的命令验证 NTP 节点同步状态和你的系统时间。 + + # ntpq -p + # date -R + +![验证 NTP 服务器时间](http://www.tecmint.com/wp-content/uploads/2014/09/Verify-NTP-Time-Sync.png) + +验证 NTP 时间同步 + +10. 如果你想查询或者和你选择的服务器池同步,你可以使用 ntpdate 命令,后面跟服务器名或服务器地址,类似下面建议的命令行事例。 + + # ntpdate -q 0.ro.pool.ntp.org 1.ro.pool.ntp.org + +![同步 NTP 同步](http://www.tecmint.com/wp-content/uploads/2014/09/Synchronize-NTP-Time.png) + +同步 NTP 时间 + +### 步骤四:设置 Windows NTP 客户端 ### + +11. 如果你的 windows 机器不是域名控制器的一部分,你可以配置 Windows 和你的 NTP服务器同步时间。在任务栏右边 -> 时间 -> 更改日期和时间设置 -> 网络时间标签 -> 更改设置 -> 和一个网络时间服务器检查同步 -> 在 Server 空格输入服务器 IP 或 FQDN -> 马上更新 -> OK。 + +![和 NTP 同步 Windows 时间](http://www.tecmint.com/wp-content/uploads/2014/09/Synchronize-Windows-Time-with-NTP.png) + +和 NTP 同步 Windows 时间 + +就是这些。在你的网络中配置一个本地 NTP 服务器能确保你所有的服务器和客户端有相同的时间设置,以防出现网络连接失败,并且它们彼此都相互同步。 + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-ntp-server-in-centos/ + +作者:[Matei Cezar][a] +译者:[ictlyh](http://motouxiaogui.cn/blog) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/cezarmatei/ +[1]:http://www.tecmint.com/centos-7-installation/ +[2]:http://www.tecmint.com/redhat-enterprise-linux-7-installation/ +[3]:http://www.tecmint.com/enable-redhat-subscription-reposiories-and-updates-for-rhel-7/ +[4]:http://www.tecmint.com/configure-network-interface-in-rhel-centos-7-0/ +[5]:http://www.tecmint.com/remove-unwanted-services-in-centos-7/ +[6]:http://www.pool.ntp.org/en/ \ No newline at end of file From 9a9aa6b576e8a551e19b02d61a8470fa7387dda2 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 25 Oct 2015 21:01:33 +0800 Subject: [PATCH 2336/2517] PUB:20151019 11 df command examples in Linux @strugglingyouth --- ...0151019 11 df command examples in Linux.md | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) rename {translated/tech => published}/20151019 11 df command examples in Linux.md (85%) diff --git a/translated/tech/20151019 11 df command examples in Linux.md b/published/20151019 11 df command examples in Linux.md similarity index 85% rename from translated/tech/20151019 11 df command examples in Linux.md rename to published/20151019 11 df command examples in Linux.md index 8b2035acee..a5e3c827ba 100644 --- a/translated/tech/20151019 11 df command examples in Linux.md +++ b/published/20151019 11 df command examples in Linux.md @@ -1,9 +1,9 @@ Linux 中 df 命令的11个例子 ================================================================================ -df(可用磁盘)命令用于显示文件系统的磁盘使用情况。默认情况下 df 命令将以 1KB 为单位进行显示所有当前已挂载的文件系统,如果你想以人类易读的格式显示 df 命令的输出,像这样“df -h”使用 -h 选项。 +df 即“可用磁盘”(disk free),用于显示文件系统的磁盘使用情况。默认情况下 df 命令将以每块 1K 的单位进行显示所有当前已挂载的文件系统,如果你想以人类易读的格式显示 df 命令的输出,像这样“df -h”使用 -h 选项。 -在这篇文章中,我们将讨论 ‘**df**‘ 命令在 Linux 下11种不同的实例 +在这篇文章中,我们将讨论 `df` 命令在 Linux 下11种不同的实例。 在 Linux 下 df 命令的基本格式为: @@ -13,7 +13,7 @@ df(可用磁盘)命令用于显示文件系统的磁盘使用情况。默认 ![](http://www.linuxtechi.com/wp-content/uploads/2015/10/df-command-options.jpg) -df 的原样输出 : +df 的样例输出 : [root@linux-world ~]# df Filesystem 1K-blocks Used Available Use% Mounted on @@ -28,9 +28,9 @@ df 的原样输出 : /dev/mapper/vg00-sap 14987656 37636 14165636 1% /sap [root@linux-world ~]# -### 例1:使用 ‘-a’ 选项列出所有文件系统的磁盘使用量 ### +### 例1:使用 -a 选项列出所有文件系统的磁盘使用量 ### -当我们在 df 命令中使用 ‘-a’ 选项时,它会显示所有文件系统的磁盘使用情况。 +当我们在 df 命令中使用 `-a` 选项时,它会显示所有文件系统的磁盘使用情况。 [root@linux-world ~]# df -a Filesystem 1K-blocks Used Available Use% Mounted on @@ -69,7 +69,7 @@ df 的原样输出 : ### 例2:以人类易读的格式显示 df 命令的输出 ### -在 df 命令中使用‘-h’选项,输出以人易读的格式输出(例如,5K,500M & 5G) +在 df 命令中使用`-h`选项,以人类易读的格式输出(例如,5K,500M 及 5G) [root@linux-world ~]# df -h Filesystem Size Used Avail Use% Mounted on @@ -95,7 +95,7 @@ df 的原样输出 : ### 例4:输出所有已挂载文件系统的类型 ### -‘**-T**’ 选项用在 df 命令中用来显示文件系统的类型。 +`-T` 选项用在 df 命令中用来显示文件系统的类型。 [root@linux-world ~]# df -T Filesystem Type 1K-blocks Used Available Use% Mounted on @@ -110,7 +110,7 @@ df 的原样输出 : /dev/mapper/vg00-sap ext3 14987656 37636 14165636 1% /sap [root@linux-world ~]# -### 例5:输出文件系统磁盘使用的块大小 ### +### 例5:按块大小输出文件系统磁盘使用情况 ### [root@linux-world ~]# df -k Filesystem 1K-blocks Used Available Use% Mounted on @@ -127,7 +127,7 @@ df 的原样输出 : ### 例6:输出文件系统的 inode 信息 ### -‘**-i**’ 选项用在 df 命令用于显示文件系统的 inode 信息。 +`-i` 选项用在 df 命令用于显示文件系统的 inode 信息。 所有文件系统的 inode 信息: @@ -151,9 +151,9 @@ df 的原样输出 : /dev/mapper/vg00-sap 960992 11 960981 1% /sap [root@linux-world ~]# -### 例7:输出所有文件系统总的使用情况 ### +### 例7:输出所有文件系统使用情况汇总 ### -‘–total‘ 选项在 df 命令中用于显示所有文件系统的磁盘使用情况。 +`-total` 选项在 df 命令中用于显示所有文件系统的磁盘使用情况汇总。 [root@linux-world ~]# df -h --total Filesystem Size Used Avail Use% Mounted on @@ -171,7 +171,7 @@ df 的原样输出 : ### 例8:只打印本地文件系统磁盘的使用情况 ### -假设网络文件系统也挂载在 Linux 上,但我们只想显示本地文件系统的信息,这可以通过使用 df 命令的 ‘-l‘ 选项来实现。 +假设网络文件系统也挂载在 Linux 上,但我们只想显示本地文件系统的信息,这可以通过使用 df 命令的 `-l` 选项来实现。 ![](http://www.linuxtechi.com/wp-content/uploads/2015/10/nfs4-fs-mount.jpg) @@ -192,7 +192,7 @@ df 的原样输出 : ### 例9:打印特定文件系统类型的磁盘使用情况 ### -‘**-t**’ 选项在 df 命令中用来打印特定文件系统类型的信息,‘-t’ 指定文件系统的类型,如下所示: +`-t` 选项在 df 命令中用来打印特定文件系统类型的信息,用 `-t` 指定文件系统的类型,如下所示: 对于 ext4 : @@ -209,11 +209,11 @@ df 的原样输出 : 192.168.1.5:/opensuse 301545472 266833920 19371008 94% /data [root@linux-world ~]# -### 例10:使用 ‘-x’ 选项排除特定的文件系统类型 ### +### 例10:使用 -x 选项排除特定的文件系统类型 ### -“**-x** 或 **–exclude-type**” 在 df 命令中用来在输出中排出某些文件系统类型。 +`-x` 或 `–exclude-type` 在 df 命令中用来在输出中排出某些文件系统类型。 -假设我们想打印排出 ext3 外所有的文件系统。 +假设我们想打印除 ext3 外所有的文件系统。 [root@linux-world ~]# df -x ext3 Filesystem 1K-blocks Used Available Use% Mounted on @@ -228,9 +228,9 @@ df 的原样输出 : ### 例11:在 df 命令的输出中只打印特定的字段 ### -‘**–output={field_name1,field_name2….}**‘ 选项用于显示 df 命令某些字段的输出。 +`-output={field_name1,field_name2...}` 选项用于显示 df 命令某些字段的输出。 -可用的字段名有: ‘source’, ‘fstype’, ‘itotal’, ‘iused’, ‘iavail’, ‘ipcent’, ‘size’, ‘used’, ‘avail’, ‘pcent’ 和 ‘target’ +可用的字段名有: `source`, `fstype`, `itotal`, `iused`, `iavail`, `ipcent`, `size`, `used`, `avail`, `pcent` 和 `target` [root@linux-world ~]# df --output=fstype,size,iused Type 1K-blocks IUsed @@ -252,7 +252,7 @@ via: http://www.linuxtechi.com/11-df-command-examples-in-linux/ 作者:[Pradeep Kumar][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c03075cd492225b00d1da4254d00a32349e9df48 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 25 Oct 2015 21:31:11 +0800 Subject: [PATCH 2337/2517] PUB:20151012 10 Useful Utilities For Linux Users @strugglingyouth --- ...012 10 Useful Utilities For Linux Users.md | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) rename {translated/tech => published}/20151012 10 Useful Utilities For Linux Users.md (76%) diff --git a/translated/tech/20151012 10 Useful Utilities For Linux Users.md b/published/20151012 10 Useful Utilities For Linux Users.md similarity index 76% rename from translated/tech/20151012 10 Useful Utilities For Linux Users.md rename to published/20151012 10 Useful Utilities For Linux Users.md index fbb4bfa8b0..99bfe6869a 100644 --- a/translated/tech/20151012 10 Useful Utilities For Linux Users.md +++ b/published/20151012 10 Useful Utilities For Linux Users.md @@ -1,10 +1,10 @@ -对 Linux 用户10个有用的工具 + 10 个给 Linux 用户的有用工具 ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2014/09/linux-656x445.png) ### 引言 ### -在本教程中,我已经收集了对 Linux 用户10个有用的工具,其中包括各种网络监控,系统审计和一些其它实用的命令,它可以帮助用户提高工作效率。我希望你会喜欢他们。 +在本教程中,我已经收集了10个给 Linux 用户的有用工具,其中包括各种网络监控,系统审计和一些其它实用的命令,它可以帮助用户提高工作效率。我希望你会喜欢他们。 #### 1. w #### @@ -14,19 +14,18 @@ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_023.png) -显示帮助信息 +不显示头部信息(LCTT译注:原文此处有误) $w -h -(LCTT译注:-h为不显示头部信息) - -显示当前用户信息 +显示指定用户的信息 $w ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_024.png) #### 2. nmon #### + Nmon(nigel’s monitor 的简写)是一个显示系统性能信息的工具。 $ sudo apt-get install nmon @@ -37,7 +36,7 @@ Nmon(nigel’s monitor 的简写)是一个显示系统性能信息的工具 ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_001.png) -nmon 可以转储与 netwrok,cpu, memory 和磁盘使用情况的信息。 +nmon 可以显示与 netwrok,cpu, memory 和磁盘使用情况的信息。 **nmon 显示 cpu 信息 (按 c)** @@ -53,7 +52,7 @@ nmon 可以转储与 netwrok,cpu, memory 和磁盘使用情况的信息。 #### 3. ncdu #### -是一个基于‘du’的光标版本的命令行程序,这个命令是用来分析各种目录占用的磁盘空间。 +是一个支持光标的`du`程序,这个命令是用来分析各种目录占用的磁盘空间。 $apt-get install ncdu @@ -71,7 +70,7 @@ nmon 可以转储与 netwrok,cpu, memory 和磁盘使用情况的信息。 #### 4. slurm #### -一个基于网络接口的带宽监控命令行程序,它会基于图形来显示 ascii 文件。 +一个基于网络接口的带宽监控命令行程序,它会用字符来显示文本图形。 $ apt-get install slurm @@ -94,7 +93,7 @@ nmon 可以转储与 netwrok,cpu, memory 和磁盘使用情况的信息。 #### 5.findmnt #### -Findmnt 命令用于查找挂载的文件系统。它是用来列出安装设备,当需要时也可以挂载或卸载设备,它也是 util-linux 的一部分。 +Findmnt 命令用于查找挂载的文件系统。它用来列出安装设备,当需要时也可以挂载或卸载设备,它是 util-linux 软件包的一部分。 例子: @@ -122,7 +121,7 @@ Findmnt 命令用于查找挂载的文件系统。它是用来列出安装设备 #### 6. dstat #### -一种组合和灵活的工具,它可用于监控内存,进程,网络和磁盘的性能,它可以用来取代 ifstat, iostat, dmstat 等。 +一种灵活的组合工具,它可用于监控内存,进程,网络和磁盘性能,它可以用来取代 ifstat, iostat, dmstat 等。 $apt-get install dstat @@ -134,27 +133,27 @@ Findmnt 命令用于查找挂载的文件系统。它是用来列出安装设备 ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0141.png) -- **-c** cpu +**-c** cpu $ dstat -c ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0151.png) -显示 cpu 的详细信息。 - - $ dstat -cdl -D sda1 - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_017.png) - -- **-d** 磁盘 +**-d** 磁盘 $ dstat -d ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_0161.png) +显示 cpu、磁盘等的详细信息。 + + $ dstat -cdl -D sda1 + +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Selection_017.png) + #### 7. saidar #### -另一种基于 CLI 的系统统计数据监控工具,提供了有关磁盘使用,网络,内存,交换等信息。 +另一种基于命令行的系统统计数据监控工具,提供了有关磁盘使用,网络,内存,交换分区等信息。 $ sudo apt-get install saidar @@ -172,7 +171,7 @@ Findmnt 命令用于查找挂载的文件系统。它是用来列出安装设备 #### 8. ss #### -ss(socket statistics)是一个很好的选择来替代 netstat,它从内核空间收集信息,比 netstat 的性能更好。 +ss(socket statistics)是一个很好的替代 netstat 的选择,它从内核空间收集信息,比 netstat 的性能更好。 例如: @@ -196,7 +195,7 @@ ss(socket statistics)是一个很好的选择来替代 netstat,它从内 #### 9. ccze #### -一个自定义日志格式的工具 :). +一个美化日志显示的工具 :). $ apt-get install ccze @@ -222,7 +221,7 @@ ss(socket statistics)是一个很好的选择来替代 netstat,它从内 一种基于 Python 的终端工具,它可以用来以图形方式显示系统活动状态。详细信息以一个丰富多彩的柱状图来展示。 -安装 python: +安装 python(LCTT 译注:一般来说,你应该已经有了 python,不需要此步): $ sudo apt-add-repository ppa:fkrull/deadsnakes @@ -234,7 +233,7 @@ ss(socket statistics)是一个很好的选择来替代 netstat,它从内 $ sudo apt-get install python3.2 -- [下载 ranwhen.py][1] +[点此下载 ranwhen.py][1] $ unzip ranwhen-master.zip && cd ranwhen-master @@ -246,7 +245,7 @@ ss(socket statistics)是一个很好的选择来替代 netstat,它从内 ### 结论 ### -这都是些冷门但重要的 Linux 管理工具。他们可以在日常生活中帮助用户。在我们即将发表的文章中,我们会尽量多带来些管理员/用户工具。 +这都是些不常见但重要的 Linux 管理工具。他们可以在日常生活中帮助用户。在我们即将发表的文章中,我们会尽量多带来些管理员/用户工具。 玩得愉快! @@ -256,7 +255,7 @@ via: http://www.unixmen.com/10-useful-utilities-linux-users/ 作者:[Rajneesh Upadhyay][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c8d8618e001b9016efe7db177bbc99e9ea9e8be6 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 26 Oct 2015 05:56:58 +0800 Subject: [PATCH 2338/2517] PUB:20150202 How to filter BGP routes in Quagga BGP router @bazz2 --- ... to filter BGP routes in Quagga BGP router.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20150202 How to filter BGP routes in Quagga BGP router.md (93%) diff --git a/translated/tech/20150202 How to filter BGP routes in Quagga BGP router.md b/published/20150202 How to filter BGP routes in Quagga BGP router.md similarity index 93% rename from translated/tech/20150202 How to filter BGP routes in Quagga BGP router.md rename to published/20150202 How to filter BGP routes in Quagga BGP router.md index 53ce40cac6..17bf6fbbcc 100644 --- a/translated/tech/20150202 How to filter BGP routes in Quagga BGP router.md +++ b/published/20150202 How to filter BGP routes in Quagga BGP router.md @@ -1,6 +1,6 @@ 如何使用 Quagga BGP(边界网关协议)路由器来过滤 BGP 路由 ================================================================================ -在[之前的文章][1]中,我们介绍了如何使用 Quagga 将 CentOS 服务器变成一个 BGP 路由器,也介绍了 BGP 对等体和前缀交换设置。在本教程中,我们将重点放在如何使用**前缀列表**和**路由映射**来分别控制数据注入和数据输出。 +在[之前的文章][1]中,我们介绍了如何使用 Quagga 将 CentOS 服务器变成一个 BGP 路由器,也介绍了 BGP 对等体和前缀交换设置。在本教程中,我们将重点放在如何使用**前缀列表(prefix-list)**和**路由映射(route-map)**来分别控制数据注入和数据输出。 之前的文章已经说过,BGP 的路由判定是基于前缀的收取和前缀的广播。为避免错误的路由,你需要使用一些过滤机制来控制这些前缀的收发。举个例子,如果你的一个 BGP 邻居开始广播一个本不属于它们的前缀,而你也将错就错地接收了这些不正常前缀,并且也将它转发到网络上,这个转发过程会不断进行下去,永不停止(所谓的“黑洞”就这样产生了)。所以确保这样的前缀不会被收到,或者不会转发到任何网络,要达到这个目的,你可以使用前缀列表和路由映射。前者是基于前缀的过滤机制,后者是更为常用的基于前缀的策略,可用于精调过滤机制。 @@ -36,15 +36,15 @@ 上面的命令创建了名为“DEMO-FRFX”的前缀列表,只允许存在 192.168.0.0/23 这个前缀。 -前缀列表的另一个牛X功能是支持子网掩码区间,请看下面的例子: +前缀列表的另一个强大功能是支持子网掩码区间,请看下面的例子: ip prefix-list DEMO-PRFX permit 192.168.0.0/23 le 24 -这个命令创建的前缀列表包含在 192.168.0.0/23 和 /24 之间的前缀,分别是 192.168.0.0/23, 192.168.0.0/24 and 192.168.1.0/24。运算符“le”表示小于等于,你也可以使用“ge”表示大于等于。 +这个命令创建的前缀列表包含在 192.168.0.0/23 和 /24 之间的前缀,分别是 192.168.0.0/23, 192.168.0.0/24 和 192.168.1.0/24。运算符“le”表示小于等于,你也可以使用“ge”表示大于等于。 一个前缀列表语句可以有多个允许或拒绝操作。每个语句都自动或手动地分配有一个序列号。 -如果存在多个前缀列表语句,则这些语句会按序列号顺序被依次执行。在配置前缀列表的时候,我们需要注意在所有前缀列表语句后面的**隐性拒绝**属性,就是说凡是不被明显允许的,都会被拒绝。 +如果存在多个前缀列表语句,则这些语句会按序列号顺序被依次执行。在配置前缀列表的时候,我们需要注意在所有前缀列表语句之后是**隐性拒绝**语句,就是说凡是不被明显允许的,都会被拒绝。 如果要设置成允许所有前缀,前缀列表语句设置如下: @@ -81,7 +81,7 @@ probability Match portion of routes defined by percentage value tag Match tag of route -如你所见,路由映射可以匹配很多属性,本教程需要匹配一个前缀。 +如你所见,路由映射可以匹配很多属性,在本教程中匹配的是前缀。 route-map DEMO-RMAP permit 10 match ip address prefix-list DEMO-PRFX @@ -163,7 +163,7 @@ 可以看到,router-A 有4条路由前缀到达 router-B,而 router-B 只接收3条。查看一下范围,我们就能知道只有被路由映射允许的前缀才能在 router-B 上显示出来,其他的前缀一概丢弃。 -**小提示**:如果接收前缀内容没有刷新,试试重置下 BGP 会话,使用这个命令:clear ip bgp neighbor-IP。本教程中命令如下: +**小提示**:如果接收前缀内容没有刷新,试试重置下 BGP 会话,使用这个命令:`clear ip bgp neighbor-IP`。本教程中命令如下: clear ip bgp 192.168.1.1 @@ -193,9 +193,9 @@ via: http://xmodulo.com/filter-bgp-routes-quagga-bgp-router.html 作者:[Sarmed Rahman][a] 译者:[bazz2](https://github.com/bazz2) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/sarmed -[1]:http://xmodulo.com/centos-bgp-router-quagga.html +[1]:https://linux.cn/article-4609-1.html From f2a61469a4564d51866e65eebecee2ed936c1537 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 26 Oct 2015 07:08:37 +0800 Subject: [PATCH 2339/2517] PUB:20151020 Linux History--24 Years Step by Step @ictlyh --- ...20 Linux History--24 Years Step by Step.md | 124 +++++++++--------- 1 file changed, 61 insertions(+), 63 deletions(-) rename {translated/talk => published}/20151020 Linux History--24 Years Step by Step.md (59%) diff --git a/translated/talk/20151020 Linux History--24 Years Step by Step.md b/published/20151020 Linux History--24 Years Step by Step.md similarity index 59% rename from translated/talk/20151020 Linux History--24 Years Step by Step.md rename to published/20151020 Linux History--24 Years Step by Step.md index ce9f6f95d2..71a82faf8c 100644 --- a/translated/talk/20151020 Linux History--24 Years Step by Step.md +++ b/published/20151020 Linux History--24 Years Step by Step.md @@ -6,19 +6,17 @@ Linux 的历史:24 年,一步一个脚印 ### 史前 ### -没有 [C 编程语言][1] and [GNU 项目][2] - Linux 环境,也就不可能有 Linux 的成功。 +没有 [C 编程语言][1] 和 [GNU 项目][2] 构成 Linux 环境,也就不可能有 Linux 的成功。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/00-1.jpg) +*Ken Thompson 和 Dennis Ritchie* -Ken Thompson 和 Dennis Ritchie - -[Ken Thompson][1] 和 [Dennis Ritchie][2] 在 1969-1970 创造了 Unix 操作系统。之后发布了新的 [C 编程语言][3] - 高级可移植编程语言。 Linux 内核用 C 和一些汇编代码写成。 - +[Ken Thompson][1] 和 [Dennis Ritchie][2] 在 1969-1970 创造了 Unix 操作系统。之后发布了新的 [C 编程语言][3],它是一种高级的、可移植的编程语言。 Linux 内核用 C 和一些汇编代码写成。 ![Richard Matthew Stallman](https://github.com/paulcarroty/Articles/raw/master/Linux_24/00-2.jpg) -Richard Matthew Stallman +*Richard Matthew Stallman* [Richard Matthew Stallman][4] 在 1984 年启动了 [GNU 项目][5]。最大的一个目标 - 完全自由的类-Unix 操作系统。 @@ -26,9 +24,9 @@ Richard Matthew Stallman ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1991-1.jpg) -Linus Torvalds, 1991 +*Linus Torvalds, 1991* -[Linus Torvalds][5] 在芬兰赫尔辛基开始了 Linux 内核开发 - 为他的硬件 - Intel 30386 CPU 编写程序。他也使用 Minix 和 GNU C 编译器。下面是 Linus Torvalds 给 Minix 新闻组的历史消息: +[Linus Torvalds][5] 在芬兰赫尔辛基开始了 Linux 内核开发,他是为他的硬件 - Intel 30386 CPU 编写的程序。他也使用 Minix 和 GNU C 编译器。下面是 Linus Torvalds 给 Minix 新闻组的历史消息: > From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) > Newsgroups: comp.os.minix @@ -55,7 +53,7 @@ Linus Torvalds, 1991 > > Linus (torvalds@kruuna.helsinki.fi) -从此之后,Linux 开始得到了世界范围志愿者和专业专家的支持。Linus 的合作者 Ari Lemmke 把它命名为 “Linux” - 大学服务器项目上的目录名称。 +从此之后,Linux 开始得到了世界范围志愿者和专业专家的支持。Linus 的同事 Ari Lemmke 把它命名为 “Linux” - 这其实是他们的大学 ftp 服务器上的项目目录名称。 ### 1992 ### @@ -67,13 +65,13 @@ Linus Torvalds, 1991 ![Slackware 1.0 ](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1993-1.png) -第一次发布 Slackware(译者注:Slackware Linux 是一个高度技术性的,干净的发行版,只有少量非常有限的个人设置) – 相同主导者 Patrick Volkerding 最老的 Linux 发行版。Linux 内核有 100 多个开发者。 +Slackware 首次发布(LCTT 译注:Slackware Linux 是一个高度技术性的、干净的发行版,只有少量非常有限的个人设置) – 最早的 Linux 发行版,其领导者 Patrick Volkerding 也是最早的。其时,Linux 内核有 100 多个开发者。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1993-2.png) -Debian +*Debian* -Debian – 1991 年创立了最大的 Linux 社区之一。 +Debian – 最大的 Linux 社区之一也创立于 1991 年。 ### 1994 ### @@ -81,201 +79,201 @@ Linux 1.0 发布了,多亏了 XFree 86 项目,第一次有了 GUI。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1994-1.png) -Red Hat Linux +*Red Hat Linux* -发布 Red Hat Linux 1.0 +发布了 Red Hat Linux 1.0 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1994-2.png) -S.u.S.E Linux +*S.u.S.E Linux* -和 [S.u.S.E. Linux][6] 1.0. +和 [S.u.S.E. Linux][6] 1.0。 ### 1995 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1995-1.png) -Red Hat Inc. +*Red Hat Inc.* -Bob Yound 和 Marc Ewing 合并他们的本地业务为 [Red Hat Software][7]。Linux 移植到了很多硬件平台。 +Bob Young 和 Marc Ewing 合并他们的本地业务为 [Red Hat Software][7]。Linux 移植到了很多硬件平台。 ### 1996 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1996-1.png) -### Tux ### +*Tux* -企鹅 Tux - Linux 官方吉祥物。Linus Torvalds 参观了堪培拉国家动物园和水族馆之后有了这个想法。发布了 Linux 2.0,支持对称多处理器。开始开发 KDE。 +企鹅 Tux 是 Linux 官方吉祥物,Linus Torvalds 参观了堪培拉国家动物园和水族馆之后有了这个想法。发布了 Linux 2.0,支持对称多处理器。开始开发 KDE。 ### 1997 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1997-1.jpg) -Miguel de Icaza +*Miguel de Icaza* -Miguel de Icaza 和 Federico Mena 开始开发 GNOME - 自由桌面环境和应用程序。Linus Torvalds 赢得了 Linux 商标冲突,Linux 成为了 Linus 的注册商标。 +Miguel de Icaza 和 Federico Mena 开始开发 GNOME - 自由桌面环境和应用程序。Linus Torvalds 赢得了 Linux 商标冲突官司,Linux 成为了 Linus Torvalds 的注册商标。 ### 1998 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1998-1.jpg) -大教堂和集市 +*大教堂和集市* -Eric S. Raymond 出版了文章 [The Cathedral and the Bazaar][8](大教堂和集市) - 非常推荐阅读。Linux 得到了大公司的支持: IBM、Oracle、康柏。 +Eric S. Raymond 出版了文章 [The Cathedral and the Bazaar(大教堂和集市)][8] - 高度推荐阅读。Linux 得到了大公司的支持: IBM、Oracle、康柏。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/1998-2.png) -Mandrake Linux +*Mandrake Linux* -首次发布 Mandrake Linux - 基于红帽 Linux 带 K 桌面环境的发行版。 +Mandrake Linux 首次发布 - 基于红帽 Linux 的发行版,带有 KDE 桌面环境。 ### 1999 ### ![](https://upload.wikimedia.org/wikipedia/commons/4/4f/KDE_1.1.jpg) -第一个主要的 KDE 发行版。 +第一个主要的 KDE 版本。 ### 2000 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2000-1.jpg) -Dell 支持 Linux - 第一个大的硬件供应商。 +Dell 支持 Linux - 这是第一个支持的大硬件供应商。 ### 2001 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2001-1.jpg) -Revolution OS +*Revolution OS* -纪录片 “Revolution OS”(译者注:操作系统革命) - GNU、Linux、开源、自由软件的 20 年历史,以及 Linux 和开源界最好骇客的采访。 +纪录片 “Revolution OS(操作系统革命)” - GNU、Linux、开源、自由软件的 20 年历史,以及对 Linux 和开源界顶级黑客的采访。 ### 2002 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2002-1.jpg) -BitKeeper +*BitKeeper* -Linux 开始使用 BitKeeper - 分布式版本控制专用软件。 +Linux 开始使用 BitKeeper,这是一种商业版的分布式版本控制软件。 ### 2003 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2003-1.png) -SUSE +*SUSE* -Novell 用 210 美元购买了 SUSE Linux AG。2003 年也开始了 SCO 集团,IBM、以及 Linux 社区关于 Unix 版权的史诗般战役。 +Novell 用 2.1 亿美元购买了 SUSE Linux AG。同年 SCO 集团 也开始了同 IBM 以及 Linux 社区关于 Unix 版权的艰难的法律诉讼。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2003-2.png) -Fedora +*Fedora* -红帽和 Linux 社区第一次发布了 Fedora Linux。 +红帽和 Linux 社区首次发布了 Fedora Linux。 ### 2004 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2004-1.png) -X.ORG 基金会 +*X.ORG 基金会* XFree86 解散了并加入到 [X.Org 基金会][9], X 的开发更快了。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2004-2.jpg) -Ubuntu 4.10 – 第一次发布 +Ubuntu 4.10 – Ubuntu 首次发布 ### 2005 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2005-1.png) -openSUSE +*openSUSE* -开始了 [openSUSE][10] - 企业版 Novell’s OS 的免费版本。OpenOffice.org 开始支持 OpenDocument 标准。 +[openSUSE][10] 开始了,这是企业版 Novell’s OS 的免费版本。OpenOffice.org 开始支持 OpenDocument 标准。 ### 2006 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2006-1.png) -新的 Linux 发行版 - 基于红帽企业版 Linux 的 Oracle Linux。微软和 Novell 开始在 IT 和专利保护方面进行合作。 +一个新的 Linux 发行版,基于红帽企业版 Linux 的 Oracle Linux。微软和 Novell 开始在 IT 和专利保护方面进行合作。 ### 2007 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2007-1.jpg) -Dell Linux 笔记本 +*Dell Linux 笔记本* -Dell 发布了预安装 Linux 的笔记本。 +Dell 发布了第一个预装 Linux 的笔记本。 ### 2008 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2008-1.jpg) -KDE 4.0 +*KDE 4.0* -在不稳定的情况下发布了 KDE 4,很多用户开始迁移到 GNOME。 +KDE 4 发布了,但是不稳定,很多用户开始迁移到 GNOME。 ### 2009 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2009-1.jpg) -Red Hat +*Red Hat* -红帽 Linux 的成功 - 市值 2亿6千2百万美元。 +红帽 Linux 取得了成功 - 市值达 26亿2千万美元。 -2009 年微软第一次在 GPLv2 协议下向 Linux 内核提交了补丁。 +2009 年微软在 GPLv2 协议下向 Linux 内核提交了第一个补丁。 ### 2010 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2010-1.png) -Novell -> Attachmate +*Novell -> Attachmate* -Novell 已 2亿2千万美元卖给了 Attachmate Group, Inc。在新公司 SUSE 和 Novell 成为了两款独立的产品。 +Novell 已 22亿美元卖给了 Attachmate Group, Inc。SUSE 和 Novell 成为了新公司的两款独立的产品。 -第一次发布了 [systemd][11],开始了 Linux 系统的革命。 +[systemd][11] 首次发布,开始了 Linux 系统的革命。 ### 2011 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2011-1.png) -Unity Desktop in 2011 +*Unity 桌面,2011* -发布了 Ubuntu Unity - 遭到很多用户的批评。 +Ubuntu Unity 发布,遭到很多用户的批评。 ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2011-2.png) -GNOME 3.0, 2011 +*GNOME 3.0,2011* -发布了 GNOME 3.0 - Linus Torvalds 评论为 “unholy mess” 以及很多负面评论。发布了 Linux 内核 3.0。 +GNOME 3.0 发布, Linus Torvalds 评论为 “unholy mess” ,有很多负面评论。Linux 内核 3.0 发布。 ### 2012 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2012-1.png) -1500 万行代码 +*1500 万行代码* -Linux 内核有 1500 万行代码。微软成为主要共享者之一。 +Linux 内核达到 1500 万行代码。微软成为主要贡献者之一。 ### 2013 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2013-1.png) -发布了 Kali Linux 1.0 - 用户渗透测试和数字取证的基于 Debian 的 Linux 发行版。2014 年 CentOS 代码开发者加入到了红帽公司。 +Kali Linux 1.0 发布, 用于渗透测试和数字取证,基于 Debian 的 Linux 发行版。2014 年 CentOS 及其代码开发者加入到了红帽公司。 ### 2014 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2014-1.jpg) -Lennart Poettering 和 Kay Sievers +*Lennart Poettering 和 Kay Sievers* -systemd - Ubuntu 和所有主流 Linux 发行版的默认初始化程序。Ubuntu 有 2200 万用户。安卓的大进步 - 占了所有移动设备的 75%。 +systemd 成为 Ubuntu 和所有主流 Linux 发行版的默认初始化程序。Ubuntu 有 2200 万用户。安卓的大进步 - 占了所有移动设备的 75% 份额。 ### 2015 ### ![](https://github.com/paulcarroty/Articles/raw/master/Linux_24/2015-1.jpg) -发布了 Linux 4.0。没有了 Mandriva(译者注:Mandriva 是目前全球最优秀的 Linux 发行版之一,稳居于 linux 排行榜第一梯队。2005年之前稳居 linux 排行榜 NO.1。它是目前最易用的 linux 发行版,也是众多国际级 linux 发行版中唯一一个默认即支持中文环境的 linux) - 但还有很多分支 - 其中最流行的一个是 Mageia。 +发布了 Linux 4.0。Mandriva 公司清算,但还有很多分支,其中最流行的一个是 Mageia。 -写于对 Linux 的热爱。 +带着对 Linux 的热爱而执笔。 -------------------------------------------------------------------------------- @@ -283,7 +281,7 @@ via: https://tlhp.cf/linux-history/ 作者:[Pavlo Rudyi][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From eb945f9b935cbf84a239d1cd62e8c5c089f36582 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Mon, 26 Oct 2015 20:51:59 +0800 Subject: [PATCH 2340/2517] [Translated]20151012 What is a good IDE for R on Linux.md --- ...51012 What is a good IDE for R on Linux.md | 63 ------------------- ...51012 What is a good IDE for R on Linux.md | 61 ++++++++++++++++++ 2 files changed, 61 insertions(+), 63 deletions(-) delete mode 100644 sources/share/20151012 What is a good IDE for R on Linux.md create mode 100644 translated/share/20151012 What is a good IDE for R on Linux.md diff --git a/sources/share/20151012 What is a good IDE for R on Linux.md b/sources/share/20151012 What is a good IDE for R on Linux.md deleted file mode 100644 index 8079396b50..0000000000 --- a/sources/share/20151012 What is a good IDE for R on Linux.md +++ /dev/null @@ -1,63 +0,0 @@ -FSSlc translating - -What is a good IDE for R on Linux -================================================================================ -Some time ago, I covered some of the [best IDEs for C/C++][1] on Linux. Obviously C and C++ are not the only programming languages out there, and it is time to turn to something a bit more specific. - -If you have ever done some statistics, it is possible that you have encountered the [language R][2]. If you have not, I really recommend this open source programming language which is tailored for statistics and data mining. Coming from a coding background, you might be thrown off a bit by the syntax, but hopefully you will get seduced by the speed of its vector operations. In short, try it. And to do so, what better way to start with an IDE? R being a cross platform language, there are a bunch of good IDEs which make data analysis in R far more pleasurable. If you are very attached to a particular editor, there are also some very good plugins to turn that editor into a fully-fledged R IDE. - -Here is a list of five good IDEs for R language in Linux environment. - -### 1. RStudio ### - -![](https://c1.staticflickr.com/1/603/22093054381_431383ab60_c.jpg) - -Let’s start hard with maybe one of the most popular R IDEs out there: [RStudio][3]. In addition to common IDE features like syntax highlighting and code completion, RStudio stands out for its integration of R documentation, its powerful debugger and its multiple views system. If you start with R, I can only recommend RStudio as the R console on the side is perfect for testing your code in real time, and the object explorer will help you understand what kind of data you are dealing with. Finally, what really conquered me was the integration of the plots visualiser, making it easy to export your graphs as images. On the downside, RStudio lacks the shortcuts and the advanced settings to make it a perfect IDE. Still, with a free version under AGPL license, Linux users have no excuses not to give this IDE a try. - -### 2. Emacs with ESS ### - -![](https://c2.staticflickr.com/6/5824/22056857776_a14a4e7e1b_c.jpg) - -In my last post about IDEs, some people were disappointed by the absence of Emacs in my list. My main reason for that is that Emacs is kind of the wild card of IDE: you could place it on any list for any languages. But things are different for [R with the ESS plugin][4]. Emacs Speaks Statistics (ESS) is an amazing plugin which completely changes the way you use the Emacs editor and really fits the needs of R coders. A bit like RStudio which has multiple views, Emacs with ESS displays presents two panels: one with the code and one with an R console, making it easy to test your code in real time and explore the objects. But ESS's real strength is its seamless integration with other Emacs plugins you might have installed and its advanced configuration options. In short, if you like your Emacs shortcuts, you will like to be able to use them in an environment that makes sense for R development. For full disclosure, however, I have heard of and experienced some efficiency issues when dealing with a lot of data in ESS. Nothing too major to be a problem, but just enough have me prefer RStudio. - -### 3. Vim with Vim-R-plugin ### - -![](https://c1.staticflickr.com/1/680/22056923916_abe3531bb4_b.jpg) - -Because I do not want to discriminate after talking about Emacs, I also tried the equivalent for Vim: the [Vim-R-plugin][5]. Using the terminal tool called tmux, this plugin makes it possible to have an R console open and code at the same time. But most importantly, it brings syntax highlighting and omni-completion for R objects to Vim. You can also easily access R documentation and browse objects. But once again, the strength comes from its extensive customization capacities and the speed of Vim. If you are tempted by this option, I direct you to the extremely thorough [documentation][6] on installing and setting up your environment. - -### 4. Gedit with RGedit ### - -![](https://c1.staticflickr.com/1/761/22056923956_1413f60b42_c.jpg) - -If neither Emacs or Vim is your cup of tea, and what you like is your default Gnome editor, then [RGedit][7] is made for you: a plugin to code in R from Gedit. Gedit is known to be more powerful than what it looks. With a very large library of plugins, it is possible to do a lot with it. And RGedit is precisely the plugin you need to code in R from Gedit. It comes with the classic syntax highlighting and integration of the R console at the bottom of the screen, but also a bunch of unique features like multiple profiles, code folding, file explorer, and even a GUI wizard to generate code from snippets. Despite my indifference towards Gedit, I have to admit that these features go beyond the basic plugin functionality and really make a difference when you spend a lot of time analyzing data. The only shadow is that the last update is from 2013. I really hope that this project can pick up again. - -### 5. RKWard ### - -![](https://c2.staticflickr.com/6/5643/21896132829_2ea8f3a320_c.jpg) - -Finally, last but not least, [RKWard][8] is an R IDE made for KDE environments. What I love the most about it is its name. But honestly, its package management system and spreadsheet-like data editor come in close second. In addition to that, it includes an easy system for plotting and importing data, and can be extended by plugins. If you are not a fan of the KDE feel, you might be a bit uncomfortable, but if you are, I would really recommend checking it out. - -To conclude, whether you are new to R or not, these IDEs might be useful to you. It does not matter if you prefer something that stands for itself, or a plugin for your favorite editor, I am sure that you will appreciate one of the features these software provide. I am also sure I missed a lot of good IDEs for R, which deserve to be on this list. So since you wrote a lot of very good comments for the post on the IDEs for C/C++, I invite you to do the same here and share your knowledge. - -What do you feel is a good IDE for R on Linux? Please let us know in the comments. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/good-ide-for-r-on-linux.html - -作者:[Adrien Brochard][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/adrien -[1]:http://xmodulo.com/good-ide-for-c-cpp-linux.html -[2]:https://www.r-project.org/ -[3]:https://www.rstudio.com/ -[4]:http://ess.r-project.org/ -[5]:http://www.vim.org/scripts/script.php?script_id=2628 -[6]:http://www.lepem.ufc.br/jaa/r-plugin.html -[7]:http://rgedit.sourceforge.net/ -[8]:https://rkward.kde.org/ diff --git a/translated/share/20151012 What is a good IDE for R on Linux.md b/translated/share/20151012 What is a good IDE for R on Linux.md new file mode 100644 index 0000000000..2e5d72a880 --- /dev/null +++ b/translated/share/20151012 What is a good IDE for R on Linux.md @@ -0,0 +1,61 @@ +Linux 上针对 R 语言的好用 IDE +================================================================================ +前一段时间,我已经介绍过 [Linux 上针对 C/C++ 语言的最好 IDE][1]。很显然 C 或 C++ 并不是现存的唯一的编程语言,是时间讨论某些更加特别的语言了。 + +假如你做过一些统计工作,很可能你已经见识过 [R 语言][2] 了。假如你还没有,我真的非常推荐这门专为统计和数据挖掘而生的开源编程语言。若你拥有编程背景,它的语法可能会使你感到有些不适应,但希望它的向量化操作所带来的快速能够吸引到你。简而言之,请尝试使用一下这门语言。而要做到这一点,使用一个好的 IDE 来入门或许更好吧。R 作为一门跨平台的语言,有着一大把好用的 IDE,它们使得用 R 语言进行数据分析变得更惬意。假如你非常钟意一个特定的编辑器,这里也有一些好用的插件来将它转变为一个成熟的 R IDE。 + +下面就让我们见识一下 Linux 环境下 5 个针对 R 语言的好用 IDE吧。 + +### 1. RStudio ### + +![](https://c1.staticflickr.com/1/603/22093054381_431383ab60_c.jpg) + +就让我们以或许是最为人们喜爱的 R IDE: [RStudio][3] 来开始我们的介绍吧。除了一般 IDE 所提供的诸如语法高亮,代码补全等功能,RStudio 还因其集成了 R 语言帮助文档,强大的调试器,多视图系统而突出。如果你准备入门 R 语言,我只建议你将 RStudio 作为你的 R 语言控制台,一方面用它来实时测试代码是很完美的,另外对象浏览器将帮助你理解你正在处理的是哪类数据。最后,真正征服我的是它集成了图形显示器,使得你能够更轻松地以图片方式探索你的图形。至于它不好的方面, RStudio 缺乏快捷键和高级设置来使得它成为一个完美的 IDE。然而,它有一个以 AGPL 协议发布的免费版本, Linux 用户没有借口不去试试这个 IDE。 + +### 2. 带有 ESS 插件的 Emacs ### + +![](https://c2.staticflickr.com/6/5824/22056857776_a14a4e7e1b_c.jpg) + +在我的前一个有关 IDE 的文章中,很多朋友对我所给出的清单中没有 Emacs 而感到失望。对于这个,我的主要理由是 Emacs 可以说是 IDE 里面的“通配符”:你可以将它放到任意语言的 IDE 清单中。但对于 [带有 ESS 插件的 R][4] 来说,事情就变得有些不同了。Emacs Speaks Statistics (ESS) 是一个令人惊异的插件,它将完全改变你使用 Emacs 编辑器的方式,真的非常适合 R 编程者的需求。与 RStudio 类似,带有 ESS 的 Emacs 拥有多视图,它有两个面板:一个显示代码,另一个则是一个 R 控制台,使得实时地测试代码和探索数据对象变得更加容易。但 ESS 真正的长处是可以和你已安装的其他 Emacs 插件无缝集成以及它的高级配置选项。简而言之,如果你喜欢你的 Emacs 快捷键,你将能够在 R 语言开发环境下使用它们。然而,当你在 ESS 中处理大量数据时,我已经听闻并经历了一些效率低下的问题。尽管这个问题不是很重大,但足以让我更偏好 RStudio。 + +### 3. Vim with Vim-R-plugin ### + +![](https://c1.staticflickr.com/1/680/22056923916_abe3531bb4_b.jpg) + +在谈论完 Emacs 后,因为我不想去讨论 Emacs 和 Vim 的优劣,所以我尽力给予 Vim 同样的待遇,下面介绍 [Vim R 插件][5]。使用名为 tmux 的终端工具,这个工具使得在开启一个 R 控制台的同时,又书写 R 代码成为可能。但最为重要的是,它还为 Vim 带来了 R 语言的语法高亮和自动补全。你还可以轻易地获取 R 帮助文档和浏览数据对象。但再次强调,这些强大的功能来源于它大量的自定义选项和 Vim 的速度。假如你被这些功能所诱惑,我希望你能够通读有关介绍如何安装这个插件并设置相关环境的[文档][6]。 + +### 4. 带有 RGedit 的 Gedit ### + +![](https://c1.staticflickr.com/1/761/22056923956_1413f60b42_c.jpg) + +若 Emacs 和 Vim 都不是你的菜,而你恰好喜欢默认的 Gnome 编辑器,则 [RGedit][7] 就专门为你而生:它是 Gedit 的一个专门编辑 R 代码的插件。Gedit 比它看起来的样子更强大,配上大量的插件,就有可能用它来做许许多多的事情。而 RGedit 恰好就是你编辑 R 代码所需要的那款插件。它支持传统的语法高亮并在屏幕下方集成了 R 控制台,但它还有一大类独特的功能,例如多文件编辑,代码折叠,文件查看器,甚至还有一个 GUI 的向导用来从 snippets 产生代码。尽管我对 Gedit 并不感冒,但我必须承认这些功能比一般插件的功能更好并且在你花费很长时间去分析数据时它会有很大的帮助。唯一的污点是它的最后一次更新是 2013 年。我真的希望这个项目能够被重新焕发新生。 + +### 5. RKWard ### + +![](https://c2.staticflickr.com/6/5643/21896132829_2ea8f3a320_c.jpg) + +最后的并不意味着最不重要,作为这个清单的最后,[RKWard][8] 是一个 KDE 环境下的 R 语言 IDE。我最喜爱它的一点是它的名称。但说老实话,它的包管理系统和类似电子表格的数据编辑器排在我最喜欢它的理由的第二位。除了这些,它还包含一个简单的用来画图和导入数据的系统,另外它还可以使用插件来扩展功能。假如你不是一个 KDE 迷,或许你有点不喜欢这个,但若你是,我真的建议你考虑使用它。 + +总的来说,无论你是否刚入门 R 语言,这些 IDE 对你或许都有些帮助。假如你更偏好某个软件它自身所代表的东西或者是偏好针对你喜爱的编辑器的插件,这些都没有什么问题,我确信你将感激这些软件所提供的某些功能。同时我还确信我遗漏了很多好的针对 R 语言的 IDE,或许它们值得罗列在这个清单上。鉴于你们在上一篇针对 C/C++ 的最好 IDE 这个话题中陈述了很多非常有用的评论,我也邀请你们在这里做出同样精彩的评论并分享出你的知识。 + +关于 Linux 下针对 R 语言的好用编辑器,你有什么看法呢?请在下面的评论中让我们知晓。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/good-ide-for-r-on-linux.html + +作者:[Adrien Brochard][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/adrien +[1]:http://xmodulo.com/good-ide-for-c-cpp-linux.html +[2]:https://www.r-project.org/ +[3]:https://www.rstudio.com/ +[4]:http://ess.r-project.org/ +[5]:http://www.vim.org/scripts/script.php?script_id=2628 +[6]:http://www.lepem.ufc.br/jaa/r-plugin.html +[7]:http://rgedit.sourceforge.net/ +[8]:https://rkward.kde.org/ From 91df945657c8d0fafa1fa9585833556a42ed1b77 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 26 Oct 2015 21:37:01 +0800 Subject: [PATCH 2341/2517] Update 20151020 Five Years of LibreOffice Evolution (2010-2015).md --- ...20151020 Five Years of LibreOffice Evolution (2010-2015).md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md b/sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md index 998b725295..bce2f812b6 100644 --- a/sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md +++ b/sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md @@ -1,3 +1,4 @@ +translation by strugglingyouth Five Years of LibreOffice Evolution (2010-2015) ================================================================================ 注:youtube 视频 @@ -80,4 +81,4 @@ via: https://tlhp.cf/libreoffice-5years-evolution/ [a]:https://tlhp.cf/author/paul/ [1]:http://www.libreoffice.org/ [2]:https://www.openoffice.org/ -[3]:http://www.staroffice.org/ \ No newline at end of file +[3]:http://www.staroffice.org/ From f87c0378710c10b370bcb172f9b4015e4e86ae4e Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 27 Oct 2015 00:08:03 +0800 Subject: [PATCH 2342/2517] PUB:20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity @ictlyh --- ...imistic on OpenStack Revenue Opportunity.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) rename {translated/talk => published}/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md (63%) diff --git a/translated/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md b/published/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md similarity index 63% rename from translated/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md rename to published/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md index e87cf21d8c..f09b4a5473 100644 --- a/translated/talk/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md +++ b/published/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md @@ -1,28 +1,32 @@ 红帽 CEO 对 OpenStack 收益表示乐观 ================================================================================ -得益于围绕 Linux 和云不断发展的平台和基础设施技术,红帽正在持续快速发展。红帽宣布在九月二十一日完成了 2016 财年第二季度的财务业绩,再次超过预期。 +得益于围绕 Linux 和云不断发展的平台与基础设施技术,红帽正在持续快速发展。红帽宣布在九月二十一日完成了 2016 财年第二季度的财务业绩,再次超过预期。 ![](http://www.serverwatch.com/imagesvr_ce/1212/icon-redhatcloud-r.jpg) -这一季度,红帽的收入为 5 亿 4 百万美元,和去年同比增长 13%。网络输入为 5 千 1 百万美元,超过 2015 年第二季度的 4 千 7 百万美元。展望未来,红帽为下一季度和全年提供了积极的目标。对于第三季度,红帽希望指导收益能在 5亿1千9百万美元和5亿2千3百万美元之间,和去年同期相比增长 15%。 +这一季度,红帽的收入为 5 亿 4 百万美元,和去年同比增长 13%。净收入为 5 千 1 百万美元,超过了 2015 财年第二季度的 4 千 7 百万美元。 + +展望未来,红帽为下一季度和全年提供了积极的目标。对于第三季度,红帽希望指导收益能在 5亿1千9百万美元和5亿2千3百万美元之间,和去年同期相比增长 15%。 对于 2016 财年,红帽的全年指导目标是 20亿4千4百万美元,和去年相比增长 14%。 -红帽 CFO Frank Calderoni 在电话会议上指出,红帽最高的 30 个订单大概甚至超过 1 百万美元。其中有 4 个订单超过 5百万美元,还有一个超过1千万美元。从近几年的经验来看,红帽产品的交叉销售非常成功,全部订单中有超过 65% 的订单包括了一个或多个红帽应用和新兴技术产品组件。 +红帽 CFO Frank Calderoni 在电话会议上指出,红帽最高的 30 个订单差不多甚至超过了 1 百万美元。其中有 4 个订单超过 5 百万美元,还有一个超过 1 千万美元。 + +从近几年的经验来看,红帽产品的交叉销售非常成功,全部订单中有超过 65% 的订单包括了一个或多个红帽应用和新兴技术产品组件。 Calderoni 说 “我们希望这些技术,例如中间件、RHEL OpenStack 平台、OpenShift、云管理和存储能持续推动收益增长。” ### OpenStack ### -在电话会议中,红帽 CEO Jim Whitehurst 多次问到 OpenStack 的收入前景。Whitehurst 说得益于安装程序的改进,最近发布的 Red Hat OpenStack Platform 7.0 向前垮了一大步。 +在电话会议中,红帽 CEO Jim Whitehurst 多次问到 OpenStack 的预期收入。Whitehurst 说得益于安装程序的改进,最近发布的 Red Hat OpenStack Platform 7.0 向前垮了一大步。 Whitehurst 提到:“在识别硬件和使用方面它做的很好,当然,这也意味着在硬件识别并正确使用它们方便还有很多工作要做。” Whitehurst 说他已经开始注意到很多的生产应用程序开始迁移到 OpenStack 云上来。他也警告说在产业化方面迁移到 OpenStack 大部分只是尝鲜,还并没有成为主流。 -对于竞争对手, Whitehurst 尤其提到了微软、惠普和 Mirantis。在他看来,很多组织仍然会使用多种操作系统,如果他们其中一部分使用了微软,他们更倾向于开源方案作为替代选项。Whitehurst 说在云方面他还没有看到太多和惠普面对面的竞争,但和 Mirantis 则确实如此。 +对于竞争对手, Whitehurst 尤其提到了微软、惠普和 Mirantis。在他看来,很多组织仍然会使用多种操作系统,如果他们部分使用了微软产品,会更倾向于开源方案作为替代选项。Whitehurst 说在云方面他还没有看到太多和惠普面对面的竞争,但和 Mirantis 则确实如此。 -Whitehurst 说 “我们也有几次胜利,他们从 Mirantis 转到了 RHEL。” +Whitehurst 说 “我们也有几次胜利,客户从 Mirantis 转到了 RHEL。” -------------------------------------------------------------------------------- @@ -30,7 +34,7 @@ via: http://www.serverwatch.com/server-news/red-hat-ceo-optimistic-on-openstack- 作者:[Sean Michael Kerner][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b876911942f23b8c3bb61a8c0812e6b550ba108a Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 27 Oct 2015 00:19:39 +0800 Subject: [PATCH 2343/2517] PUB:20151007 How To Download Videos Using youtube-dl In Linux @ictlyh --- ...w To Download Videos Using youtube-dl In Linux.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20151007 How To Download Videos Using youtube-dl In Linux.md (85%) diff --git a/translated/tech/20151007 How To Download Videos Using youtube-dl In Linux.md b/published/20151007 How To Download Videos Using youtube-dl In Linux.md similarity index 85% rename from translated/tech/20151007 How To Download Videos Using youtube-dl In Linux.md rename to published/20151007 How To Download Videos Using youtube-dl In Linux.md index 99855c9d22..4d268e4c23 100644 --- a/translated/tech/20151007 How To Download Videos Using youtube-dl In Linux.md +++ b/published/20151007 How To Download Videos Using youtube-dl In Linux.md @@ -4,11 +4,11 @@ 我知道你已经看过[如何下载 YouTube 视频][1]。但那些工具大部分都采用图形用户界面的方式。我会向你展示如何通过终端使用 youtube-dl 下载 YouTube 视频。 -### [youtube-dl][2] ### +### youtube-dl ### -youtube-dl 是基于 Python 的命令行小工具,允许你从 YouTube.com、Dailymotion、Google Video、Photobucket、Facebook、Yahoo、Metacafe、Depositfiles 以及其它一些类似网站中下载视频。它是用 pygtk 编写的,需要 Python 解析器来运行,对平台要求并不严格。它能够在 Unix、Windows 或者 Mac OS X 系统上运行。 +[youtube-dl][2] 是基于 Python 的命令行小工具,允许你从 YouTube.com、Dailymotion、Google Video、Photobucket、Facebook、Yahoo、Metacafe、Depositfiles 以及其它一些类似网站中下载视频。它是用 pygtk 编写的,需要 Python 解析器来运行,对平台要求并不严格。它能够在 Unix、Windows 或者 Mac OS X 系统上运行。 -youtube-dl 支持断点续传。如果在下载的过程中 youtube-dl 被杀死了(例如通过 Ctrl-C 或者丢失网络连接),你只需要使用相同的 YouTube 视频 URL 再次运行它。只要当前目录中有下载的部分文件,它就会自动恢复没有完成的下载,也就是说,你不需要[下载][3]管理器来恢复下载。 +youtube-dl 支持断点续传。如果在下载的过程中 youtube-dl 被杀死了(例如通过 Ctrl-C 或者丢失网络连接),你只需要使用相同的 YouTube 视频 URL 再次运行它。只要当前目录中有下载的部分文件,它就会自动恢复没有完成的下载,也就是说,你不需要[下载管理器][3]来恢复下载。 #### 安装 youtube-dl #### @@ -16,7 +16,7 @@ youtube-dl 支持断点续传。如果在下载的过程中 youtube-dl 被杀死 sudo apt-get install youtube-dl -对于任何 Linux 发行版,你都可以通过下面的命令行接口在你的系统上快速安装 youtube-dl: +对于任何 Linux 发行版,你都可以通过下面的命令行在你的系统上快速安装 youtube-dl: sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O/usr/local/bin/youtube-dl @@ -83,11 +83,11 @@ via: http://itsfoss.com/download-youtube-linux/ 作者:[alimiracle][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://itsfoss.com/author/ali/ [1]:http://itsfoss.com/download-youtube-videos-ubuntu/ [2]:https://rg3.github.io/youtube-dl/ -[3]:http://itsfoss.com/xtreme-download-manager-install/ \ No newline at end of file +[3]:https://linux.cn/article-6209-1.html \ No newline at end of file From 8bed8d81cd5e09f6c2f1db036baaf87246bd1d61 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 27 Oct 2015 00:29:35 +0800 Subject: [PATCH 2344/2517] PUB:20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10) @Vic020 --- ...atest Wine 32-bit on 64-bit Ubuntu (15.10).md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md (62%) diff --git a/translated/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md b/published/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md similarity index 62% rename from translated/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md rename to published/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md index 56c38176fa..06e28304c3 100644 --- a/translated/tech/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md +++ b/published/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md @@ -1,28 +1,28 @@ -如何在64位Ubuntu 15.10中编译最新版32位Wine +如何在 64 位 Ubuntu 15.10 中编译最新版 32 位 Wine ================================================================================ -Wine发布了最新的1.7.53版本。此版本带来的大量性能提升,包括**XAudio**,**Direct3D**代码清理,改善**OLE对象嵌入**技术,更好的**Web服务dll**的实现,还有其他大量更新。 +Wine 发布了最新的1.7.53版本。此版本带来的大量性能提升,包括**XAudio**,**Direct3D**代码清理,改善**OLE对象嵌入**技术,更好的** Web Services dll**的实现,还有其他大量更新。 ![](http://www.tuxarena.com/wp-content/uploads/2015/10/wine1753a.jpg) -虽然官方PPA支持[Wine][1],但目前只提供1.7.44版本,所以安装最新版本可以从源码编译安装。 +虽然有一个官方 [Wine][1] PPA,但目前只提供1.7.44版本,所以安装最新版本可以从源码编译安装。 -[下载源码包][2]([直接下载][3])并解压(**tar -xf wine-1.7.53**).然后,安装依赖。 +[下载源码包][2]([直接下载地址在此][3])并解压 `tar -xf wine-1.7.53`。然后,安装如下依赖。 sudo apt-get install build-essential gcc-multilib libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxshmfence-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu1-mesa-dev:i386 libosmesa6-dev:i386 libpcap0.8-dev:i386 libdbus-1-dev:i386 libncurses5-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-dev:i386 liblcms2-dev:i386 gstreamer0.10-plugins-base:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig1-dev:i386 libgsm1-dev:i386 libtiff5-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap2-dev:i386 libgnutls-dev:i386 libjpeg-dev:i386 -现在切换到wine-1.7.53解压后的文件夹,并输入: +现在切换到 wine-1.7.53 解压后的文件夹,并输入: ./configure make sudo make install -同样地,你也可以指定prefix配置脚本,以当前用户安装wine: +同样地,你也可以给配置脚本指定 prefix 参数。以普通用户安装 wine: ./configure --prefix=$HOME/usr/bin make make install -这种情况下,Wine将会安装在**$HOME/usr/bin/wine**,所以请检查$HOME/usr/bin在你的PATH变量中。 +这种情况下,Wine 将会安装在`$HOME/usr/bin/wine`,所以请检查`$HOME/usr/bin`在你的`PATH`变量中。 -------------------------------------------------------------------------------- @@ -30,7 +30,7 @@ via: http://www.tuxarena.com/2015/10/how-to-compile-latest-wine-32-bit-on-64-bit 作者:Craciun Dan 译者:[VicYu/Vic020](http://vicyu.net) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From f8da6fd5a3ebe2bca3919d864268b800b625c416 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 27 Oct 2015 09:38:46 +0800 Subject: [PATCH 2345/2517] translating --- sources/tech/20151012 How To Use iPhone In Antergos Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151012 How To Use iPhone In Antergos Linux.md b/sources/tech/20151012 How To Use iPhone In Antergos Linux.md index 0186a214d4..712e00a612 100644 --- a/sources/tech/20151012 How To Use iPhone In Antergos Linux.md +++ b/sources/tech/20151012 How To Use iPhone In Antergos Linux.md @@ -1,3 +1,5 @@ +translating-----geekpi + How To Use iPhone In Antergos Linux ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/iPhone-Antergos-Arch-Linux.jpg) @@ -78,4 +80,4 @@ via: http://itsfoss.com/iphone-antergos-linux/ [a]:http://itsfoss.com/author/abhishek/ [1]:http://www.libimobiledevice.org/ -[2]:http://itsfoss.com/mount-iphone-ipad-ios-7-ubuntu-13-10/ \ No newline at end of file +[2]:http://itsfoss.com/mount-iphone-ipad-ios-7-ubuntu-13-10/ From cccf1cf3401939fdbce307a4c285ce37245f97cc Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 27 Oct 2015 11:19:40 +0800 Subject: [PATCH 2346/2517] translated --- ...012 How To Use iPhone In Antergos Linux.md | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/sources/tech/20151012 How To Use iPhone In Antergos Linux.md b/sources/tech/20151012 How To Use iPhone In Antergos Linux.md index 712e00a612..2e33e5a536 100644 --- a/sources/tech/20151012 How To Use iPhone In Antergos Linux.md +++ b/sources/tech/20151012 How To Use iPhone In Antergos Linux.md @@ -1,40 +1,38 @@ -translating-----geekpi - -How To Use iPhone In Antergos Linux +如何在Antergos Linux中使用iPhone ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/iPhone-Antergos-Arch-Linux.jpg) -Troubles with iPhone and Arch Linux? iPhone and Linux never really go along very well. In this tutorial, I am going to show you how can you use iPhone in Antergos Linux. Since Antergos is based on Arch Linux, the same steps should be applicable to other Arch based Linux distros such as Manjaro Linux. +在Arch Linux中使用iPhone遇到麻烦了么?iPhone和Linux从来都没有集成的很好。本教程中,我会向你展示如何在Antergos Linux中使用iPhone,对于同样基于Arch的的Linux发行版如Manjaro也应该同样管用。 -So, recently I bought me a brand new iPhone 6S and when I connected it to Antergos Linux to copy some pictures, it was not detected at all. I could see that iPhone was being charged and I had allowed iPhone to ‘trust the computer’ but there was nothing at all detected. I tried to run dmseg but there was no trace of iPhone or Apple there. What is funny that [libimobiledevice][1] was installed as well, which always fixes [iPhone mount issue in Ubuntu][2]. +我最近购买了一台全新的iPhone 6S,当我连接到Antergos Linux中要拷贝一些照片时,它完全没有检测到它。我看见iPhone正在被充电并且我已经允许了iPhone“信任这台电脑”,但是还是完全没有检测到。我尝试运行dmseg但是没有关于iPhone或者Apple的信息。有趣的是我已经安装了[libimobiledevice][1]。这个可以可以解决[iPhone在Ubuntu中的挂载问题][2]。 -I am going to show you how I am using iPhone 6S, running on iOS 9 in Antergos. It goes more in command line way, but I presume since you are in Arch Linux zone, you are not scared of terminal (and you should not be as well). +我会向你展示如何在Antergos中使用运行iOS 9的iPhone 6S。这会有更多的命令行,但是我假设你用的是ArchLinux,并不惧怕使用终端(也不应该惧怕)、 -### Mount iPhone in Arch Linux ### +### 在Arch Linux中挂载iPhone ### -**Step 1**: Unplug your iPhone, if it is already plugged in. +**第一步**:如果已经插入拔下你的iPhone -**Step 2**: Now, open a terminal and use the following command to install some necessary packages. Don’t worry if they are already installed. +**第二步**:现在,打开终端输入下面的命令来安装必要的包。不要担心如果它们已经安装过了。 sudo pacman -Sy ifuse usbmuxd libplist libimobiledevice -**Step 3**: Once these programs and libraries are installed, reboot your system. +**第三步**: 这些库和程序安装完成后,重启系统 sudo reboot -**Step 4**: Make a directory where you want the iPhone to be mounted. I would suggest making a directory named iPhone in your home directory. +**第四步**:创建一个iPhone的挂载目录,我建议在家目录中创建一个iPhone目录。 mkdir ~/iPhone -**Step 5**: Unlock your phone and plug it in. If asked to trust the computer, allow it. +**第五步**:解锁你的手机并插入,如果询问是否允许,请允许。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/iPhone-mount-Antergos-Linux-2.jpeg) -**Step 6**: Verify that iPhone is recognized by the system this time. +**第六步**: 验证这时iPhone已经被机器识别了。 dmesg | grep -i iphone -This should show you some result with iPhone and Apple in it. Something like this: +这时就该显示iPhone和Apple的结果了。就像这样: [ 31.003392] ipheth 2-1:4.2: Apple iPhone USB Ethernet device attached [ 40.950883] ipheth 2-1:4.2: Apple iPhone USB Ethernet now disconnected @@ -42,38 +40,38 @@ This should show you some result with iPhone and Apple in it. Something like thi [ 82.967116] ipheth 2-1:4.2: Apple iPhone USB Ethernet now disconnected [ 106.735932] ipheth 2-1:4.2: Apple iPhone USB Ethernet device attached -This means that iPhone has been successfully recognized by Antergos/Arch Linux. +这意味着这时iPhone已经被Antergos/Arch成功地识别了。 -**Step 7**: When everything is set, it’s time to mount the iPhone. Use the command below: +**第七步**: 设置完成后是时候挂载iPhone了,使用下面的命令: ifuse ~/iPhone -Since we created the mount directory in home, it won’t need root access and you should also be able to see it easily in your home directory. If the command is successful, you won’t see any output. +由于我们在家目录中创建了挂载目录,你不需要root权限就可以在家目录中看见。如果命令成功了,你就不会看见输出。 -Go back to Files and see if the iPhone is recognized or not. For me, it looks like this in Antergos: +回到Files看下iPhone是否已经识别。对于我而言,在Antergos中看上去这样: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/iPhone-mount-Antergos-Linux.jpeg) -You can access the files in this directory. Copy files from it or to it. +你可以在这个目录中访问文件。从这里复制文件或者复制到里面。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/iPhone-mount-Antergos-Linux-1.jpeg) -**Step 8**: When you want to unmount it, you should use this command: +**第八步**: 当你想要卸载的时候,使用这个命令: sudo umount ~/iPhone -### Worked for you? ### +### 对你有用么? ### -I know that it is not very convenient and ideally, iPhone should be recognized as any other USB storage device but things don’t always behave as they are expected to. Good thing is that a little DIY hack can always fix the issue and it gives a sense of achievement (at least to me). That being said, I must say Antergos should work to fix this issue so that iPhone can be mounted by default. +我知道这并不是非常方便和理想,iPhone应该像其他USB其他usb设备那样但是事情并不总是像人们想的那样。好事是一点小的DIY就能解决这个问题带来了一点成就感(至少对我而言)。我必须要说的是Antergos应该修复这个问题让iPhone可以默认挂载。 -Did this trick work for you? If you have questions or suggestions, feel free to drop a comment. +这个技巧对你有用么?如果你有任何问题或者建议,欢迎留下评论。 -------------------------------------------------------------------------------- via: http://itsfoss.com/iphone-antergos-linux/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4a5d580480fabced50a625ee5cd93367234b8a5d Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 27 Oct 2015 11:20:05 +0800 Subject: [PATCH 2347/2517] Rename sources/tech/20151012 How To Use iPhone In Antergos Linux.md to translated/tech/20151012 How To Use iPhone In Antergos Linux.md --- .../tech/20151012 How To Use iPhone In Antergos Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151012 How To Use iPhone In Antergos Linux.md (100%) diff --git a/sources/tech/20151012 How To Use iPhone In Antergos Linux.md b/translated/tech/20151012 How To Use iPhone In Antergos Linux.md similarity index 100% rename from sources/tech/20151012 How To Use iPhone In Antergos Linux.md rename to translated/tech/20151012 How To Use iPhone In Antergos Linux.md From 47d1ceb71f32013f5d21224b5ea68a4a1338a558 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 27 Oct 2015 11:47:25 +0800 Subject: [PATCH 2348/2517] =?UTF-8?q?20151027-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Distribution Logo ASCII Art In Terminal.md | 130 ++++++++++++++++++ ...20151027 How To Show Desktop In GNOME 3.md | 64 +++++++++ 2 files changed, 194 insertions(+) create mode 100644 sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md create mode 100644 sources/tech/20151027 How To Show Desktop In GNOME 3.md diff --git a/sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md b/sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md new file mode 100644 index 0000000000..fbcc299fe5 --- /dev/null +++ b/sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md @@ -0,0 +1,130 @@ +Display Linux Distribution Logo ASCII Art In Terminal +================================================================================ +![Display Linux logo in ASCII art](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/ASCII-Arts-Linux-Logo.jpeg) + +See the picture above? You might have seen people sharing such desktop screenshot with terminal showing the logo of the Linux distribution used in ASCII characters. Looking at those screenshots, you may wonder **how to show the logo of Linux distribution in terminal in ASCII characters**. + +In this tutorial, I’ll show you a couple of tools that will display Linux logo in command line. + +### 1. Use screenfetch to display Linux distro logo in ASCII art ### + +[screenfetch][1] is the easiest way to display Linux distribution logo in the terminal. You don’t have to specify anything, it will auto-detect the Linux distribution. And not just logo, screenfetch also displays some basic hardware information alongside it. + +#### Install screenfetch #### + +To install screenfetch in Ubuntu based distributions such as Linux Mint, elementary OS, Linux Lite, Zorin OS etc, you can use the command below: + + sudo apt-get install screenfetch + +**Note**: For Ubuntu 14.04 based distros, you’ll have to add a PPA (as suggested by Benjamin in the comments). Use the command below: + + sudo apt-add-repository ppa:djcj/screenfetch + sudo apt-get update + apt-get install screenfetch + +To install screenfetch in Arch based distributions such as Antergos, Manjaro, Chakra etc, use the command below: + + sudo pacman -S screenfetch + +To install screenfetch in Fedora based Linux distributions such as Korora etc, use the command below: + + sudo dnf install screenfetch + +#### Using screenfetch #### + +Using screenfetch is utterly simple. Open a terminal and use the command below: + + screenfetch + +That’s it. You’ll see the logo of your Linux distribution displayed in ASCII art along with some information about your system: + +![ASCII display for Antergos](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Screenfetch-Antergos-Arch.jpeg) + +![ASCII display for Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Screenfetch-Ubuntu.jpeg) + +#### Taking screenshot with screenfetch [Optional] #### + +Now this is optional because you can use the Screenshot tools to take screenshot of the displayed ASCII art in terminal. But if you install command line screenshot utility, scrot (it is available in the default repository of several Linux distributions), you can automatically take a screenshot of the displayed Linux logo along with your desktop with the command below: + + screenfetch -s + +If I combine screenfetch with vintage looking [cool-retro-term][2], the result is even more awesome: + +![screenfetch with cool retro term](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/ASCII-Art-Retro-Terminal.jpeg) + +### 2. Use linux_logo to display Linux distro logo in ASCII art ### + +linux_logo is another command line tool to display ASCII art of Linux distributions. Unlike screenfetch, linux_logo doesn’t automatically identifies and displays the correct Linux distro logo. + +For Ubuntu, it displayed Debian and for Antergos, it displayed sort of BSD-ish logo. + +![Debian instead of Ubuntu?](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Linuxlogo-Ubuntu.jpeg) + +Debian instead of Ubuntu? + +But linux_logo has a number of options that you can use. You can choose to display the logo of any Linux distribution available in the list. Before we see how to do that, let me show you how to install it first. + +#### Install linux_logo #### + +To install linux_logo in Ubuntu based Linux distributions, use the command below: + + sudo apt-get install linuxlogo + +To install linux_logo in Arch based Linux distributions, use the command below: + + sudo pacman -S linux_logo + +To install linux_logo in Fedora based Linux distributions, use the command below: + + sudo dnf install linux_logo + +#### Using linux_logo #### + +Once installed, use the command below to list all the options: + + linux_logo -L list + +The output would be like: + +![using linux_logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Linux-logo-Antergos.jpeg) + +As you can see there are a number of options. You can choose the number of the Linux distribution and use it in the following way: + + linux_logo -L 25 + +This will display OpenSUSE logo: + +![OpenSUSE ASCII art](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Suse-Linux-logo-Antergos.jpeg) + +There are more options to display certain sort of info and hide other etc. I left it up to you to explore it. + +### Which one did you like more? ### + +screenfetch or linux_logo? Which one you liked more? Personally, I prefer screenfetch. It’s easier to use and does what it is expected of it. What about you? + +注:投票 +Which one you prefer? + +- screenfetch +- linux_logo +- Don't care + +投票代码: +
+
+ +

+ +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/display-linux-logo-in-ascii/ + +作者:[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]:https://github.com/KittyKatt/screenFetch +[2]:http://itsfoss.com/cool-retro-term/ \ No newline at end of file diff --git a/sources/tech/20151027 How To Show Desktop In GNOME 3.md b/sources/tech/20151027 How To Show Desktop In GNOME 3.md new file mode 100644 index 0000000000..27abc7637a --- /dev/null +++ b/sources/tech/20151027 How To Show Desktop In GNOME 3.md @@ -0,0 +1,64 @@ +How To Show Desktop In GNOME 3 +================================================================================ +![How to show desktop in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-in-GNOME-3.jpg) + +How do you **show desktop in GNOME 3**? GNOME is a wonderful desktop environment but it focuses more on switching between the applications. What if you want to close all the running windows and display just the desktop? + +In Windows, you can do this by pressing Windows+D. In Ubuntu Unity, it is done with Ctrl+Super+D shortcut keys. But for some reason, GNOME has the shortcut key to show desktop disabled for some reasons. + +When you press Super+D or Ctrl+Super+D, nothing happens. If you want to see the desktop, you’ll have to minimize all running windows one by one. It is not convenient specially if you have several application windows open. + +In this quick tutorial, I am going to show you how to add keyboard shortcut to show desktop in [GNOME 3][1]. + +### Add shortcut key to show desktop in GNOME 3 ### + +I am using [Antergos Linux][2] with GNOME 3.18 in this tutorial, but the steps are applicable to any Linux distribution using any version of GNOME 3. Also, Antergos has [Numix theme][3] applied by default. So, you might not see your usual GNOME icons. But I believe the steps are straight forward and you can easily follow it. + +#### Step 1 #### + +Go to System Settings. Click on the top right corner, from the drop down, click on the system settings icon. + +![System Settings in GNOME Antergos Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-1.png) + +#### Step 2 #### + +When you are in System Settings, look for Keyboard settings. + +![Keyboard settings in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-2.png) + +#### Step 3 #### + +In here, Go to **Shortcuts tab** and select **Navigation** from the left side pane. Scroll down a bit and look for **Hide all normal windows**. You’ll see that it has been disabled. + +![Shortcut keys in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-3.jpeg) + +#### Step 4 #### + +Click once on the key you want to edit, in this case, Hide all normal windows. You’ll see that it has been changed to **New accelerator**… Now whichever keys you will press, it will be assigned for showing the desktop. + +If you accidently press wrong key combination, just press backspace key and it will be disabled again. Click on it again and use the desired key combination. + +![Shortcut key edit in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-4.jpeg) + +#### Step 5 #### + +Once you have used the desired key combination, just close the system settings. There is no option for saving the changes because changes are saved instantly. In my case, I used Ctrl+Super+D to align it with the behavior in Ubuntu Unity. + +![Keyboard shortcut edit in GNOME](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-5.jpeg) + +That’s it folks. Enjoy the shortcut to show desktop in GNOME 3. I hope you found this quick tutorial helpful. Any questions, suggestions or a word of thanks is always welcomed :) + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/show-desktop-gnome-3/ + +作者:[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]:https://www.gnome.org/gnome-3/ +[2]:http://itsfoss.com/tag/antergos/ +[3]:http://itsfoss.com/install-numix-ubuntu/ \ No newline at end of file From 2b87e3fcf75ffe014e4f3f066eddeb1f2dd6a670 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 27 Oct 2015 14:27:28 +0800 Subject: [PATCH 2349/2517] =?UTF-8?q?20151027-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...s to Mount a Remote Filesystem on Linux.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md diff --git a/sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md b/sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md new file mode 100644 index 0000000000..41a825834c --- /dev/null +++ b/sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md @@ -0,0 +1,72 @@ +How to Use SSHfs to Mount a Remote Filesystem on Linux +================================================================================ +Have you ever wanted to mount remote file systems locally over secure shell? If so, SSHfs may be just what you’re looking for. It makes use of SSH and Fuse to allow you to mount remote computers (or servers) locally. + +**Note**: this article assumes that you understand [how SSH works and that it is already set up on your system][1]. + +### Preparation ### + +Before SSHfs can be mounted, things must be set up – installing SSHfs, as well as installing the fuse package to your system. You’ll also need to create a group for fuse, add your user to said group and create the folder where the remote file system will reside. + +To install the packages on your Ubuntu Linux installation, just enter this command into a terminal window: + + sudo apt-get install sshfs fuse + +![sshfs-install-fuse-ubuntu](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-install-fuse-ubuntu.jpg) + +If you’re not using Ubuntu, just search for the package names in your distribution’s package manager. It would be best to just search for terms relating to fuse or SSHfs, since the package could be named slightly different depending on what you’re running. + +After installing the packages to your system, it’s time to create the fuse group. When you install fuse, a group should be created on your system. If this isn’t the case, enter this command into a terminal window to create it on your Linux installation: + + sudo groupadd fuse + +After the group has been added, add your user to it. + + sudo gpasswd -a "$USER" fuse + +![sshfs-add-user-to-fuse-group](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-add-user-to-fuse-group.png) + +Don’t worry about `$USER` in the command above. The shell will replace it with your own username automatically. Now that the group stuff is taken care of, it’s time to create the folder where the the remote files will mount to. + + mkdir ~/remote_folder + +With the local folder created on your computer, your remote file system is now set up to be mounted over SSHfs. + +### Mounting the remote file system ### + +To mount your remote file system to your machine, you’ll need to enter a lengthy command into your terminal window. + + sshfs -o idmap=user username@ip.address:/remote/file/system/ ~/remote + +![sshfs-mount-file-system-to-local-folder](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-mount-file-system-to-local-folder.png) + +**Note**: It is also possible to mount your SSHfs file system with an SSH keyfile. Just replace the `sshfs -o idmap=user` part of the command above with `sshfs -o IdentityFile=~/.ssh/keyfile`, and you’ll be good to go. + +When this command has been entered, you’ll be prompted to enter the remote user’s password. If the login is successful, your remote file system will be mounted in the `~/remote_folder` directory that was created earlier. + +![sshfs-mount-file-system-to-local-folder-2](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-mount-file-system-to-local-folder-2.jpg) + +Done with your remote file system and want to un-mount it? It’s easy? Just enter this command into the terminal: + + sudo umount ~/remote_folder + +This simple command will disconnect your remote connection as well as empty out your remote folder. + +### Conclusion ### + +There are many tools for accessing remote files to mount locally on Linux. With that being said, few, if any, take advantage of the powerful feature-set that SSH has. I hope that with the help of this tutorial, you, too, will learn just how powerful of a tool SSHfs can be. + +What are your thoughts on SSHfs? Let us know in the comment section below! + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/sshfs-mount-remote-filesystem-linux/ + +作者:[Derrik Diener][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/derrikdiener/ +[1]:https://www.maketecheasier.com/setup-ssh-ubuntu/ \ No newline at end of file From db600ffff2bfb190c08b2349caa92f011b7155c1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 27 Oct 2015 14:39:35 +0800 Subject: [PATCH 2350/2517] =?UTF-8?q?20151027-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... How To Install Retro Terminal In Linux.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sources/tech/20151027 How To Install Retro Terminal In Linux.md diff --git a/sources/tech/20151027 How To Install Retro Terminal In Linux.md b/sources/tech/20151027 How To Install Retro Terminal In Linux.md new file mode 100644 index 0000000000..086c947ea4 --- /dev/null +++ b/sources/tech/20151027 How To Install Retro Terminal In Linux.md @@ -0,0 +1,74 @@ +How To Install Retro Terminal In Linux +================================================================================ +![Retro Terminal in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux.jpeg) + +Nostalgic about the past? Get a slice of the past by **installing retro terminal app** [cool-retro-term][1] which, as the name suggests, is both cool and retro at the same. + +Do you remember the time when there were CRT monitors everywhere and the terminal screen used to flicker? You don’t need to be old to have witnessed it. If you watch movies set in early 90’s, you’ll see plenty of CRT monitors with green/B&W command prompt. It has a geeky aura which makes it cooler. + +If you are tired of terminal appearance and you need something cool and ‘new’, cool-retro-term will give you a vintage terminal appearance to relive the past. You also can change its color, animation kind, and add some effect to it. + +Here are few screenshots of the different looks of cool-retro-term: + +![Retro Terminal](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux-1.jpeg) + +![Retro Terminal Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux-2.jpeg) + +![Vintage Terminal](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux-3.jpeg) + +### Install cool-retro-term in Ubuntu based Linux distributions ### + +To install cool-retro-term in Ubuntu based Linux distributions, such as Linux Mint, elementary OS, Linux Lite etc, use the PPA below: + + sudo add-apt-repository ppa:noobslab/apps + sudo apt-get update + sudo apt-get install cool-retro-term + +### Install cool-retro-term in Arch based Linux distributions ### + +Installing cool-retro-term in Arch based Linux distributions such as [Antergos][2] and [Manjaro][3], use the following command: + + sudo pacman -S cool-retro-term + +### Install cool-retro-term from source code ### + +For installing this application from source code, you need to install a number of dependencies first. Some of the know dependencies in Ubuntu based distributions are: + + sudo apt-get install git build-essential qmlscene qt5-qmake qt5-default qtdeclarative5-dev qtdeclarative5-controls-plugin qtdeclarative5-qtquick2-plugin libqt5qml-graphicaleffects qtdeclarative5-dialogs-plugin qtdeclarative5-localstorage-plugin qtdeclarative5-window-plugin + +Known dependencies for other distributions can be found on the [github of cool-retro-term][4]. + +Now use commands below to compile the program: + + git clone https://github.com/Swordfish90/cool-retro-term.git + cd cool-retro-term + qmake && make + +Once the program is compiled, you can run it with this command: + + ./cool-retro-term + +If you like to have this app in program menu for quick access so that you won’t have to run it manually each time with the commands, you can use the command below: + + sudo cp cool-retro-term.desktop /usr/share/applications + +You can learn some more terminal tricks here. Enjoy the vintage terminal in Linux :) + +With inputs from: [Abhishek Prakash][5] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/cool-retro-term/ + +作者:[Hossein Heydari][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/hossein/ +[1]:https://github.com/Swordfish90/cool-retro-term +[2]:http://itsfoss.com/tag/antergos/ +[3]:https://manjaro.github.io/ +[4]:https://github.com/Swordfish90/cool-retro-term +[5]:http://itsfoss.com/author/abhishek/ \ No newline at end of file From 058041978da5ef9e154c6b5406b7a2f9d1f42102 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 27 Oct 2015 15:54:41 +0800 Subject: [PATCH 2351/2517] =?UTF-8?q?20151027-4=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nstall Ghost with Nginx on FreeBSD 10.2.md | 296 ++++++++++++++++++ 1 file changed, 296 insertions(+) create mode 100644 sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md diff --git a/sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md b/sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md new file mode 100644 index 0000000000..57e59b325e --- /dev/null +++ b/sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md @@ -0,0 +1,296 @@ +How to Install Ghost with Nginx on FreeBSD 10.2 +================================================================================ +Node.js is open source runtime environment for developing the server-side applications. Node.js application is written in javascript and can be run on the server that running Node.js runtime. It is cross-platform runtime, running on Linux, Windows, OSX, IBM AIX, including FreeBSD. Node.js was created by Ryan Dahl and other developer working at Joyent on 2009. It is designed to build scalable network applications. + +Ghost is blogging platform coded in Node.js. It is open source publishing platform with beautifully designed, user-friendly, and free. It is allows you to easily publish your content on web, or create your portofolio website. + +In this tutorial we will install a Ghost with Nginx as our web server on FreeBSD. We will install Node.js, Npm, nginx and sqlite3 on FreeBSD 10.2. + +### Step 1 - Install Node.js npm and Sqlite3 ### + +If you want to running ghost on your server, you must install node.js. In this section we will install node.js from the freebsd ports collection, please go to the ports directory "/usr/ports/www/node" and install by running command "**make**". + + cd /usr/ports/www/node + make install clean + +If you've done with node.js installation, please switch to the npm directory and install it. **npm** is Package manager for installs, publishes and manages node programs. + + cd /usr/ports/www/npm/ + make install clean + +Next, please install sqlite3. By default ghost is use sqlite3 as the database system, but it is support too for mysql/mariadb and postgresql. We will use sqlite3 as the default database. + + cd /usr/ports/databases/sqlite3/ + make install clean + +If all is installed, please check the version of node.js and npm : + + node --version + v0.12.6 + + npm --version + 2.11.3 + + sqlite3 --version + 3.8.10.2 + +![node and npm version](http://blog.linoxide.com/wp-content/uploads/2015/10/node-and-npm-version.png) + +### Step 2 - Add Ghost User ### + +We will install and running ghost under normal users called "**ghost**". please create new user with "adduser" command : + + adduser ghost + FILL With Your INFO + +![Add user Ghost](http://blog.linoxide.com/wp-content/uploads/2015/10/Add-user-Ghost.png) + +### Step 3 - Installing Ghost ### + +We will install ghost under "**/var/www/**" directory, so let's create it and then go to the installation directory : + + mkdir -p /var/www/ + cd /var/www/ + +Download ghost latest version with wget command : + + wget --no-check-certificate https://ghost.org/zip/ghost-latest.zip + +Extract it to the directory called "**ghost**" : + + unzip -d ghost ghost-latest.zip + +Next, change the owner as user "**ghost**", we will run and install it under that user. + + chown -R ghost:ghost ghost/ + +If all is done, switch the user to "**ghost**" by typing command below : + + su - ghost + +Then go to the installation directory "/var/www/ghost/" : + + cd /var/www/ghost/ + +And before install ghost, we need a sqlit3 modules for node js, install it with npm command : + + setenv CXX c++ ; npm install sqlite3 --sqlite=/usr/local + +**Note : Run as "ghost" user, not root user.** + +And now we ready to install ghost, please install it with npm command : + + npm install --production + +Next, copy the configuration file "config.example.js" to "**config.js**", then edit it with nano editor : + + cp config.example.js config.js + nano -c config.js + +change on line 25 server block : + + host: '0.0.0.0', + +Save and exit. + +Now run ghost with command below : + + npm start --production + +And test by visiting the server ip and port 2368. + +![Ghost Installed](http://blog.linoxide.com/wp-content/uploads/2015/10/Ghost-Installed.png) + +Ghost is installed on directory "/var/www/ghost", under user "ghost". + +### Step 4 - Run Ghost as FreeBSD Services ### + +To run an application as service on freebsd, you need to add the script to the rc.d directory. we will create new service script for ghost in directory "**/usr/local/etc/rc.d/**". + +Before we create the services script, we need to install a node.js module for running ghost as service, install forever module with npm command **as sudo/root** privileges : + + npm install forever -g + +Now please go to the rc.d directory and create new file called ghost there : + + cd /usr/local/etc/rc.d/ + nano -c ghost + +Paste service script below : + + #!/bin/sh + + # PROVIDE: ghost + # KEYWORD: shutdown + PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" + + . /etc/rc.subr + + name="ghost" + rcvar="ghost_enable" + extra_commands="status" + + load_rc_config ghost + : ${ghost_enable:="NO"} + + status_cmd="ghost_status" + start_cmd="ghost_start" + stop_cmd="ghost_stop" + restart_cmd="ghost_restart" + + ghost="/var/www/ghost" + log="/var/log/ghost/ghost.log" + ghost_start() { + sudo -u ghost sh -c "cd $ghost && NODE_ENV=production forever start -al $log index.js" + } + + ghost_stop() { + sudo -u ghost sh -c "cd $ghost && NODE_ENV=production forever stop index.js" + } + + ghost_status() { + sudo -u ghost sh -c "NODE_ENV=production forever list" + } + + ghost_restart() { + ghost_stop; + ghost_start; + } + + run_rc_command "$1" + +Save and exit. + +Next, make ghost service script an executable : + + chmod +x ghost + +and create new directory and file for ghost log, and change the owner to ghost user : + + mkdir -p /var/www/ghost/ + touch /var/www/ghost/ghost.log + chown -R /var/www/ghost/ + +And the last if you want to run ghost service, you need to add ghost service to the boot time/startup application with sysrc command : + + sysrc ghost_enable=yes + +and start ghost with : + + service ghost start + +Other command : + + service ghost stop + service ghost status + service ghost restart + +![Ghost service command](http://blog.linoxide.com/wp-content/uploads/2015/10/Ghost-service-command.png) + +### Step 5 - Install and Configure Nginx for Ghost ### + +By default, ghost running standalone,, you can run it without Nginx, apache or IIS webserver. But in this tutorial we will install and configre nginx to work with Ghost. + +Please install nginx from the freebsd repository with pkg command : + + pkg install nginx + +Next, go to nginx configuration directory and make new directory for virtualhost configuration. + + cd /usr/local/etc/nginx/ + mkdir virtualhost/ + +go to the virtualhost directory, make new file called ghost.conf with nano editor : + + cd virtualhost/ + nano -c ghost.conf + +Paste virtualhost configuration below : + + server { + listen 80; + + #Your Domain + server_name ghost.me; + + location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)$ { + access_log off; + expires 30d; + add_header Pragma public; + add_header Cache-Control "public, mustrevalidate, proxy-revalidate"; + proxy_pass http://127.0.0.1:2368; + } + + location / { + add_header X-XSS-Protection "1; mode=block"; + add_header Cache-Control "public, max-age=0"; + add_header Content-Security-Policy "script-src 'self' ; font-src 'self' ; connect-src 'self' ; block-all-mixed-content; reflected-xss block; referrer no-referrer"; + add_header X-Content-Type-Options nosniff; + add_header X-Frame-Options DENY; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://127.0.0.1:2368; + } + + location = /robots.txt { access_log off; log_not_found off; } + location = /favicon.ico { access_log off; log_not_found off; } + + location ~ /\.ht { + deny all; + } + + } + +Save and exit. + +To activate the virtualhost configuration, you need to include that file to the **nginx.conf**. please go to nginx configuration directory and edit nginx.conf file : + + cd /usr/local/etc/nginx/ + nano -c nginx.conf + +Before the last line, include the virtualhost configuration directory : + + [......] + + include virtualhost/*.conf; + + } + +Save and exit. + +Test nginx configuration with command "**nginx -t**", if there is no error, add nginx to the start up with command sysrc : + + sysrc nginx_enable=yes + +and start nginx : + + service nginx start + +Now test all nginx and virtualhost configuration. please open your browser and type the : ghost.me + +![ghost.me successfully](http://blog.linoxide.com/wp-content/uploads/2015/10/ghost.me-successfully.png) + +Ghost.me is running successfully. + +If you want to check the nginx server, use "**curl**" command. + +![ghost and nginx test](http://blog.linoxide.com/wp-content/uploads/2015/10/ghost-and-nginx-test.png) + +Ghost is running with nginx. + +### Conclusion ### + +Node.js is runtime environment created by Ryan Dahl for creating and developing scalable server-side applications. Ghost is open-source blogging platform coded in node.js, it is come with beautifully designed and easy to use for everyone. By default, the ghost is a web application that can stand on its own, does not require a webserver apache, nginx or IIS, but we can also integrate with a web server(In this tutorial use Nginx). Sqlite is default database used by ghost, but it supupport too for mysql/mariadb and postgresql. Ghost is fast and easy to use for you and configure. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-ghost-nginx-freebsd-10-2/ + +作者:[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 From 4402acef11e299bc7c3733836a2d00b56da0f2da Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 27 Oct 2015 20:42:53 +0800 Subject: [PATCH 2352/2517] Translating: sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md --- .../20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md | 1 + ...027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md | 1 + 2 files changed, 2 insertions(+) diff --git a/sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md b/sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md index 57e59b325e..e0624da202 100644 --- a/sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md +++ b/sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md @@ -1,3 +1,4 @@ +ictlyh Translating How to Install Ghost with Nginx on FreeBSD 10.2 ================================================================================ Node.js is open source runtime environment for developing the server-side applications. Node.js application is written in javascript and can be run on the server that running Node.js runtime. It is cross-platform runtime, running on Linux, Windows, OSX, IBM AIX, including FreeBSD. Node.js was created by Ryan Dahl and other developer working at Joyent on 2009. It is designed to build scalable network applications. diff --git a/sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md b/sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md index 41a825834c..957c34cd84 100644 --- a/sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md +++ b/sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md @@ -1,3 +1,4 @@ +ictlyh Translating How to Use SSHfs to Mount a Remote Filesystem on Linux ================================================================================ Have you ever wanted to mount remote file systems locally over secure shell? If so, SSHfs may be just what you’re looking for. It makes use of SSH and Fuse to allow you to mount remote computers (or servers) locally. From a60aa97b374c7a9f0f23e8a402e0f38c62d6ac58 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 27 Oct 2015 22:21:01 +0800 Subject: [PATCH 2353/2517] Translated sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md --- ...s to Mount a Remote Filesystem on Linux.md | 73 ------------------- ...s to Mount a Remote Filesystem on Linux.md | 72 ++++++++++++++++++ 2 files changed, 72 insertions(+), 73 deletions(-) delete mode 100644 sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md create mode 100644 translated/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md diff --git a/sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md b/sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md deleted file mode 100644 index 957c34cd84..0000000000 --- a/sources/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md +++ /dev/null @@ -1,73 +0,0 @@ -ictlyh Translating -How to Use SSHfs to Mount a Remote Filesystem on Linux -================================================================================ -Have you ever wanted to mount remote file systems locally over secure shell? If so, SSHfs may be just what you’re looking for. It makes use of SSH and Fuse to allow you to mount remote computers (or servers) locally. - -**Note**: this article assumes that you understand [how SSH works and that it is already set up on your system][1]. - -### Preparation ### - -Before SSHfs can be mounted, things must be set up – installing SSHfs, as well as installing the fuse package to your system. You’ll also need to create a group for fuse, add your user to said group and create the folder where the remote file system will reside. - -To install the packages on your Ubuntu Linux installation, just enter this command into a terminal window: - - sudo apt-get install sshfs fuse - -![sshfs-install-fuse-ubuntu](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-install-fuse-ubuntu.jpg) - -If you’re not using Ubuntu, just search for the package names in your distribution’s package manager. It would be best to just search for terms relating to fuse or SSHfs, since the package could be named slightly different depending on what you’re running. - -After installing the packages to your system, it’s time to create the fuse group. When you install fuse, a group should be created on your system. If this isn’t the case, enter this command into a terminal window to create it on your Linux installation: - - sudo groupadd fuse - -After the group has been added, add your user to it. - - sudo gpasswd -a "$USER" fuse - -![sshfs-add-user-to-fuse-group](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-add-user-to-fuse-group.png) - -Don’t worry about `$USER` in the command above. The shell will replace it with your own username automatically. Now that the group stuff is taken care of, it’s time to create the folder where the the remote files will mount to. - - mkdir ~/remote_folder - -With the local folder created on your computer, your remote file system is now set up to be mounted over SSHfs. - -### Mounting the remote file system ### - -To mount your remote file system to your machine, you’ll need to enter a lengthy command into your terminal window. - - sshfs -o idmap=user username@ip.address:/remote/file/system/ ~/remote - -![sshfs-mount-file-system-to-local-folder](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-mount-file-system-to-local-folder.png) - -**Note**: It is also possible to mount your SSHfs file system with an SSH keyfile. Just replace the `sshfs -o idmap=user` part of the command above with `sshfs -o IdentityFile=~/.ssh/keyfile`, and you’ll be good to go. - -When this command has been entered, you’ll be prompted to enter the remote user’s password. If the login is successful, your remote file system will be mounted in the `~/remote_folder` directory that was created earlier. - -![sshfs-mount-file-system-to-local-folder-2](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-mount-file-system-to-local-folder-2.jpg) - -Done with your remote file system and want to un-mount it? It’s easy? Just enter this command into the terminal: - - sudo umount ~/remote_folder - -This simple command will disconnect your remote connection as well as empty out your remote folder. - -### Conclusion ### - -There are many tools for accessing remote files to mount locally on Linux. With that being said, few, if any, take advantage of the powerful feature-set that SSH has. I hope that with the help of this tutorial, you, too, will learn just how powerful of a tool SSHfs can be. - -What are your thoughts on SSHfs? Let us know in the comment section below! - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/sshfs-mount-remote-filesystem-linux/ - -作者:[Derrik Diener][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/derrikdiener/ -[1]:https://www.maketecheasier.com/setup-ssh-ubuntu/ \ No newline at end of file diff --git a/translated/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md b/translated/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md new file mode 100644 index 0000000000..9d25041535 --- /dev/null +++ b/translated/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md @@ -0,0 +1,72 @@ +如何在 Linux 上使用 SSHfs 挂载一个远程文件系统 +================================================================================ +你有想通过安全 shell 挂载一个远程文件系统到本地的经历吗?如果有的话,SSHfs 也许就是你所需要的。它通过使用 SSH 和 Fuse(LCTT 译注:Filesystem in Userspace,用户态文件系统,是 Linux 中用于挂载某些网络空间,如 SSH,到本地文件系统的模块) 允许你挂载远程计算机(或者服务器)到本地。 + +**注意**: 这篇文章假设你明白[SSH 如何工作并在你的系统中配置 SSH][1]。 + +### 准备 ### + +在使用 SSHfs 挂载之前,需要进行一些设置 - 在你的系统上安装 SSHfs 以及 fuse 软件包。你还需要为 fuse 创建一个组,添加用户到组,并创建远程文件系统将会驻留的目录。 + +要在 Ubuntu Linux 上安装两个软件包,只需要在终端窗口输入以下命令: + + sudo apt-get install sshfs fuse + +![ubuntu 安装 sshfs-fuse](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-install-fuse-ubuntu.jpg) + +如果你使用的不是 Ubuntu,那就在你的发行版软件包管理器中搜索软件包名称。最好搜索和 fuse 或 SSHfs 相关的关键字,因为取决于你运行的系统,软件包名称可能稍微有些不同。 + +在你的系统上安装完软件包之后,就该创建 fuse 组了。在你安装 fuse 的时候,应该会在你的系统上创建一个组。如果没有的话,在终端窗口中输入以下命令以便在你的 Linux 系统中创建组: + + sudo groupadd fuse + +添加了组之后,把你的用户添加到这个组。 + + sudo gpasswd -a "$USER" fuse + +![sshfs 添加用户到组 fuse](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-add-user-to-fuse-group.png) + +别担心上面命令的 `$USER`。shell 会自动用你自己的用户名替换。处理了和组相关的事之后,就是时候创建要挂载远程文件的目录了。 + + mkdir ~/remote_folder + +在你的系统上创建了本地目录之后,就可以通过 SSHfs 挂载远程文件系统了。 + +### 挂载远程文件系统 ### + +要在你的机器上挂载远程文件系统,你需要在终端窗口中输入一段较长的命令。 + + sshfs -o idmap=user username@ip.address:/remote/file/system/ ~/remote + +![sshfs 挂载文件系统到本地目录1](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-mount-file-system-to-local-folder.png) + +**注意**: 也可以通过 SSH 密钥文件挂载 SSHfs 文件系统。只需要在上面的命中用 `sshfs -o IdentityFile=~/.ssh/keyfile`, 替换 `sshfs -o idmap=user` 部分。 + +输入这个命令之后,会提示你输入远程用户的密码。如果登录成功了,你的远程文件系统就会被挂载到之前创建的 `~/remote_folder` 目录。 + +![sshfs挂载文件系统到本地目录2](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-mount-file-system-to-local-folder-2.jpg) + +使用完了你的远程文件系统,想要卸载它?容易吗?只需要在终端输入下面的命令: + + sudo umount ~/remote_folder + +这个简单的命令会断开远程连接同时清空 remote_folder 目录。 + +### 总结 ### + +在 Linux 上有很多工具可以用于访问远程文件并挂载到本地。如之前所说,如果有的话,也只有很少的工具能充分利用 SSH 的强大功能。我希望在这篇指南的帮助下,也能认识到 SSHfs 是一个多么强大的工具。 + +你觉得 SSHfs 怎么样呢?在线的评论框里告诉我们吧! + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/sshfs-mount-remote-filesystem-linux/ + +作者:[Derrik Diener][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/derrikdiener/ +[1]:https://www.maketecheasier.com/setup-ssh-ubuntu/ \ No newline at end of file From 5ee8b10b987806182cd1da6ec90e0b9cd0b58aa1 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Tue, 27 Oct 2015 23:09:33 +0800 Subject: [PATCH 2354/2517] Translating sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md --- ...824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md b/sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md index b4014bb009..404b65b414 100644 --- a/sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md +++ b/sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md @@ -1,3 +1,4 @@ +ictlyh Translating How to Setup Zephyr Test Management Tool on CentOS 7.x ================================================================================ Test Management encompasses anything and everything that you need to do as testers. Test management tools are used to store information on how testing is to be done, plan testing activities and report the status of quality assurance activities. So in this article we will illustrate you about the setup of Zephyr test management tool that includes everything needed to manage the test process can save testers hassle of installing separate applications that are necessary for the testing process. Once you have done with its setup you will be able to track bugs, defects and allows the project tasks for collaboration with your team as you can easily share and access the data across multiple project teams for communication and collaboration throughout the testing process. From 12c74f98c8fe5df6d8405a45a0a112ba411bb38d Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 28 Oct 2015 08:21:30 +0800 Subject: [PATCH 2355/2517] Delete 20151020 Five Years of LibreOffice Evolution (2010-2015).md --- ...rs of LibreOffice Evolution (2010-2015).md | 84 ------------------- 1 file changed, 84 deletions(-) delete mode 100644 sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md diff --git a/sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md b/sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md deleted file mode 100644 index bce2f812b6..0000000000 --- a/sources/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md +++ /dev/null @@ -1,84 +0,0 @@ -translation by strugglingyouth -Five Years of LibreOffice Evolution (2010-2015) -================================================================================ -注:youtube 视频 - - -[LibreOffice][1] – amazing free and open source office suite from The Document Foundation. LO was forked from [OpenOffice.org][2] in September 28, 2010 and OOo is an open-source version of the earlier [StarOffice][3]. The LibreOffice support word processing, the creation and editing of spreadsheets, slideshows, diagrams and drawings, databases, mathematical formulae. - -### Core applications: ### - -- **Writer** – word processor -- **Calc** – spreadsheet app, similar to Excel -- **Impress** – application for presentations, support Microsoft PowerPoint’s format -- **Draw** – vector graphics editor -- **Math** – special application for writing and editing mathematical formulae -- **Base** – database management - -![LibreOffice 3.3, 2011](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.3/Help-License-Info.png) - -LibreOffice 3.3, 2011 - -First version of LibreOffice – fork of OpenOffice.org - -![LibreOffice 3.4](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.4/1cc80d1cada204a061402785b2048f7clibreoffice-3.4.3.png) - -LibreOffice 3.4 - -![LibreOffice 3.5](https://raw.githubusercontent.com/paulcarroty/Articles/master/LO_History/3.5/libreoffice35-large_001.jpg) - -LibreOffice 3.5 - -![LibreOffice 3.6](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.6/libreoffice-3.6.0.png) - -LibreOffice 3.6 - -![Libre Office 4.0](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.0/libreoffice-writer.png) - -LibreOffice 4.0 - -![Libre Office 4.1](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.1/Writer1.png) - -LibreOffice 4.1 - -![Libre Office 4.2](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.2/libreoffice-4.2.png) - -Libre Office 4.2 - -![LibreOffice 4.3](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.3/libreoffice.jpg) - -LibreOffice 4.3 - -![LibreOffice 4.4](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.4/LibreOffice_Writer_4_4_2.png) - -LibreOffice 4.4 - -![Libre Office 5.0](https://github.com/paulcarroty/Articles/raw/master/LO_History/5.0/LibreOffice_Writer_5.0.png) - -LibreOffice 5.0 - -### History of Libre Office from Wikipedia ### - -![StarOffice major derivatives](https://commons.wikimedia.org/wiki/File%3AStarOffice_major_derivatives.svg) - - -### LibreOffice 5.0 Review ### - -注:youtube 视频 - - - --------------------------------------------------------------------------------- - -via: https://tlhp.cf/libreoffice-5years-evolution/ - -作者:[Pavlo Rudyi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://tlhp.cf/author/paul/ -[1]:http://www.libreoffice.org/ -[2]:https://www.openoffice.org/ -[3]:http://www.staroffice.org/ From bf16e09b01f2e7ce872b37b5c2467ee74a3a87d3 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 28 Oct 2015 08:23:08 +0800 Subject: [PATCH 2356/2517] Create 20151020 Five Years of LibreOffice Evolution (2010-2015).md --- ...rs of LibreOffice Evolution (2010-2015).md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 translated/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md diff --git a/translated/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md b/translated/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md new file mode 100644 index 0000000000..6d65849678 --- /dev/null +++ b/translated/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md @@ -0,0 +1,85 @@ + +LibreOffice(2010-2015) 五年的演变 +================================================================================ +注:youtube 视频 + + + +[LibreOffice][1] – 文档基金会(The Document Foundation)一个免费和开源的办公套件。OOo 是[StarOffice][3] 早期的开源版本,LO 在2010年9月28日从 [OpenOffice.org][2] 中被独立出来。LibreOffice 支持文字处理,电子表格,幻灯片,图表和图形,数据库,数学公式的创建和编辑。 + +### 核心应用: ### + +- **Writer** – 文字处理器 +- **Calc** – 电子表格应用程序,类似于 Excel +- **Impress** – 应用演示,支持 Microsoft PowerPoint 的格式 +- **Draw** – 矢量图形编辑器 +- **Math** – 用于编写和​​编辑数学公式的特殊应用 +- **Base** – 数据库管理 + +![LibreOffice 3.3, 2011](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.3/Help-License-Info.png) + +LibreOffice 3.3, 2011 + +LibreOffice 的第一个版本 - OpenOffice.org 的一个分支 + +![LibreOffice 3.4](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.4/1cc80d1cada204a061402785b2048f7clibreoffice-3.4.3.png) + +LibreOffice 3.4 + +![LibreOffice 3.5](https://raw.githubusercontent.com/paulcarroty/Articles/master/LO_History/3.5/libreoffice35-large_001.jpg) + +LibreOffice 3.5 + +![LibreOffice 3.6](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.6/libreoffice-3.6.0.png) + +LibreOffice 3.6 + +![Libre Office 4.0](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.0/libreoffice-writer.png) + +LibreOffice 4.0 + +![Libre Office 4.1](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.1/Writer1.png) + +LibreOffice 4.1 + +![Libre Office 4.2](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.2/libreoffice-4.2.png) + +Libre Office 4.2 + +![LibreOffice 4.3](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.3/libreoffice.jpg) + +LibreOffice 4.3 + +![LibreOffice 4.4](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.4/LibreOffice_Writer_4_4_2.png) + +LibreOffice 4.4 + +![Libre Office 5.0](https://github.com/paulcarroty/Articles/raw/master/LO_History/5.0/LibreOffice_Writer_5.0.png) + +LibreOffice 5.0 + +### Libre Office 的发展,出自 Wikipedia ### + +![StarOffice major derivatives](https://commons.wikimedia.org/wiki/File%3AStarOffice_major_derivatives.svg) + + +### 回顾 LibreOffice 5.0 ### + +注:youtube 视频 + + + +-------------------------------------------------------------------------------- + +via: https://tlhp.cf/libreoffice-5years-evolution/ + +作者:[Pavlo Rudyi][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://tlhp.cf/author/paul/ +[1]:http://www.libreoffice.org/ +[2]:https://www.openoffice.org/ +[3]:http://www.staroffice.org/ From 15f078f2b191aa04be0f94f49285ab9d9aaad85d Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 28 Oct 2015 11:37:56 +0800 Subject: [PATCH 2357/2517] =?UTF-8?q?20151028-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Installing Ubuntu 15.10 'Wily Werewolf'.md | 194 ++++++++++++++++++ ...w Ubuntu 15.10 Features You Should Know.md | 109 ++++++++++ 2 files changed, 303 insertions(+) create mode 100644 sources/talk/20151028 10 Things To Do After Installing Ubuntu 15.10 'Wily Werewolf'.md create mode 100644 sources/talk/20151028 Here are the 9 New Ubuntu 15.10 Features You Should Know.md diff --git a/sources/talk/20151028 10 Things To Do After Installing Ubuntu 15.10 'Wily Werewolf'.md b/sources/talk/20151028 10 Things To Do After Installing Ubuntu 15.10 'Wily Werewolf'.md new file mode 100644 index 0000000000..7ff2c965e7 --- /dev/null +++ b/sources/talk/20151028 10 Things To Do After Installing Ubuntu 15.10 'Wily Werewolf'.md @@ -0,0 +1,194 @@ +10 Things To Do After Installing Ubuntu 15.10 'Wily Werewolf' +================================================================================ +![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/3527964.jpg?242) + +Yesterday Ubuntu 15.10 was made [available to download][1] with some new features, improvements and updated apps. If you've upgraded to Ubuntu 15.10 then this article is going to show you 10 things/tweaks that you need to do to make your Ubuntu more handy and fruitful. + +### What's New In Ubuntu 15.10? ### + +Ubuntu 15.10 codenamed 'Wily Werewolf' was released yesterday with new features, improvements, fixes and updated apps. Read our complete article to know more stuff added with Ubuntu 15.10. + +### Things To Do After Installing Ubuntu 15.10 ### + +Ubuntu 15.10 is shipping with new features that are activated by default, no need to tweak for anyone. But, changes made in the last release of Ubuntu 15.04, were not activated by default and so in Ubuntu 15.10. Other than those changes you need to install useful/must have applications. So first tweak our newly installed Wily Werewolf. + +### 1. Update Ubuntu 15.10 ### + +Before you use the system and any app first check for updates. Updating the system is necessary to keep the OS more stable and secure. Updates also adds new features in the system. Although there won't be larger size of updates after you within some days of release as all the packages are already to their newest versions. + +![update ubuntu 15.10](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/9719789_orig.png) + +#### Tweak Ubuntu 15.10 #### + +One of things to notice is that the tweaks that were presented in the last Ubuntu release are not activated by default. Those are still at your wish, if you want go ahead and activate them. For example, Always Show Menus, Where to show menu, in the window's title bar or in the menu bar. + +### 2. Set Menus Position ### + +By default in Ubuntu 15.10, the menu are set to show in the menu bar which is sometimes uneasy to reach to but you can set the menus to show in the window's title bar. Go to **Settings >> Appearances >> Behavior >> in the window's title bar**. + +![set menu position in window's title bar](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/6711164_orig.png) + +3. Install Unity Tweak Tool + +To tweak system more install Unity Tweak Tool, It has more options than the default system settings. You can change theme, icons, workspaces settings and many more. Check the screenshot below - + +![install unity tweak tool](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/5399532_orig.png?449) + +### 4. Install Firewall To Block Harmful Incoming/Outgoing Connections ### + +![ufw firewall](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/8042619_orig.png?296) + +One of the favorite ways of hackers to get access to individuals' system is to scan for the open ports and attack through them. A firewall protect your system from such attacks by blocking harmful incoming/outgoing connections. + +UFW stands ofr Uncomplicated Firewall. As the name suggests it's the most easy to use firewall you ever used. Just install and switch it on. Configure firewall rules, block particular ports etc. easily. To know all about UFW and how to use all of its features read our following article - + +[Install UFW Firewall In Linux And Secure Computer From Harmful Incoming/Outgoing Connections][2] + +#### Install UFW Firewall #### + + $ sudo apt-get install ufw + Install Graphical Interface + $ sudo apt-get install gufw + +### 5. Install Graphics Drivers ### + +If you're a game lover or you play HD videos or do video editing kind of things then you need to have proprietary drivers installed available for your hardware for better graphics performance. + +To install graphics driver - + +Go to **Settings >> Software & Updates >> Additional Drivers** + +It will search for the latest drivers available for you hardware. + +![install proprietary drivers in ubuntu 15.10](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/1658110_orig.png) + +### 6. Install VLC & Media Codecs For More Media Support ### + +VLC supports most file formats so it's better to use VLC to escape the error while playing audio files. + +Sometimes you play a mp3 and it does not play. To solve this problem, Ubuntu gives an option while you're installing Ubuntu to install all the necessary media codecs. If you checked that then don't worry, if you haven't then do the following - + + $ sudo apt-get install vlc + Install Media Codecs + $ sudo apt-get install ubuntu-restricted-extras + +### 7. Configure Cloud Storage ### + +Cloud storage are very useful to share files across your local devices like, Mobile to PC or Laptops and vice-versa. User can easily install Storages like, Dropbox, Copy, Gdrive (Using Grive) etc. + +#### Dropbox #### + +To install Dropbox, download Dropbox installation client first. + +- [Download Dropbox][3] + +Download Dropbox for your system architecture. To check whether your system is 64-Bit or 32-Bit + +Goto **Settings >> Details** + +Open the downloaded .deb file with Ubuntu Software Center and click install. + +![install dropbox](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/3856198_orig.png) + +When installed search Dropbox in Ubuntu dash and open it. It's just an installation client, so now this will install Dropbox app. Once the download competes you'll have the app asking for your Dropbox credentials. Enter your email id and password and login. All of your cloud files will be synced in your Ubuntu desktop. + +### 8. Enhance Look By Installing Themes ### + +The default two themes are not too much attractive. You can download and install cool themes from our Linux Themes Page. + +[![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/7726719.jpg)][4] + +[![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/7763892.jpg)][5] + +[![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/9618846.jpg)][6] + +[![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/5625784.jpg)][7] + +- [Download More Themes][8] + +### 9. Install & Configure Email Client ### + +Email clients are very useful because you can check for new emails without opening up web browser. Ubuntu 15.10 comes with Thunderbird email client, one of the most popular email clients, supports multiple email accounts and desktop notifications. + +Thunderbird is simple to configure. Just use your email id and password to login and sync your emails right into your desktop/laptop. + +If you don't want to use Thunderbird then check out our article [Top 4 Open Source Email Clients For Linux][9] + +![install email client in ubuntu 15.10](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/9381369_orig.jpg) + +### 10. Take The Poll ### + +After you have upgraded to Ubuntu 15.10, configure all the necessary or must have apps. Please take the poll to tell us what you like the most in Ubuntu 15.10 'Wily Werewolf'. + +注:投票项目 +What Do You Like The Most In Ubuntu 15.10? + +- Linux Kernel 4.2 +- Unity Improvements +- Steam Controller Support +- Ubuntu Make +- Persistent Network Interface Names +- New Wallpapers +- Other? Please Comment Below + +-------------------------------------------------------------------------------- + +via: http://www.linuxandubuntu.com/home/10-things-to-do-after-installing-ubuntu-1510-wily-werewolf + +作者:[Mohd Sohail][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://in.linkedin.com/in/mohdsohail +[1]:http://www.linuxandubuntu.com/linux/ubuntu-1510-wily-werewolf-released-with-new-features-and-improvements-download-now +[2]:http://www.linuxandubuntu.com/linux/install-ufw-firewall-in-linux-and-secure-computer-from-harmful-incoming-outgoing-connections +[3]:https://db.tt/CbUWY1ca +[4]:http://www.linuxandubuntu.com/linux-themes/arc-dark-red-cinnamon-install-in-ubuntu-and-derivatives +[5]:http://www.linuxandubuntu.com/linux-themes/windows-8-gtk3-modern-ui-09-install-in-ubuntu-linux +[6]:http://www.linuxandubuntu.com/linux-themes/ubuntu-touch-unity-17-install-in-ubuntu-gtk +[7]:http://www.linuxandubuntu.com/linux-themes/numixdarkred-cinnamon-021-install-in-ubuntulinux-mint +[8]:http://www.linuxandubuntu.com/linux-themes.html +[9]:http://www.linuxandubuntu.com/linux/top-5-open-source-email-clients-for-linux +[10]: +[11]: +[12]: +[13]: +[14]: +[15]: +[16]: +[17]: +[18]: +[19]: +[20]: +[21]: +[22]: +[23]: +[24]: +[25]: +[26]: +[27]: +[28]: +[29]: +[30]: +[31]: +[32]: +[33]: +[34]: +[35]: +[36]: +[37]: +[38]: +[39]: +[40]: +[41]: +[42]: +[43]: +[44]: +[45]: +[46]: +[47]: +[48]: +[49]: +[50]: \ No newline at end of file diff --git a/sources/talk/20151028 Here are the 9 New Ubuntu 15.10 Features You Should Know.md b/sources/talk/20151028 Here are the 9 New Ubuntu 15.10 Features You Should Know.md new file mode 100644 index 0000000000..e7a3b76b5d --- /dev/null +++ b/sources/talk/20151028 Here are the 9 New Ubuntu 15.10 Features You Should Know.md @@ -0,0 +1,109 @@ +Here are the 9 New Ubuntu 15.10 Features You Should Know +================================================================================ +The stable edition of Ubuntu 15.10 wily werewolf is just released by canonical few days a ago and it now available to download and install on your computer. Lets take a look at the features that are implemented in the new release of ubuntu 15.10 and see what important packages have been updated. + +Watch – A quick video about “What’s new in Ubuntu 15.10“, thanks to [linuxscoop][1] for making this video. + +注:youtube 视频 + + +Below we are can mention the new features of Ubuntu 15.10 Wily Werewolf + +### Linux kernel 4.2 ### + +![Ubuntu 15.10 - Kernel 4.2](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-Kernel-4.2.jpg) + +Ubuntu 15.10 ships with linux kernel 4.2. This introduces lots of changes, like support for the new AMD GPU driver, NCQ TRIM handling, queue spinlocks, F2FS per-file encryption and lots of new and updated drivers. + +### Unity 7.3.2 ### + +![Ubuntu 15.10 - Unity 7.3](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-unity-7.3.jpg) + +Unity as the main desktop of ubuntu 15.10 has been updated to version 7.3.2. it comes with bug fixes, polish and small usability improvements. The following we can mention the features of Unity 7.3.2: + +- Allows drag and drop apps from the Dash to the desktop to create shortcuts +- Page up/down keyboard navigation works as scroll in the Dash +- Dash title & BFB tooltip is updated based on your privacy settings +- Session exit buttons now have a click effect +- Fix to prevent ‘shutdown’ of computer when screen is locked +- Active app icons now show unfolded when launcher accordion triggered +- Fix for full screen menubar +- Fixes issues with ‘show desktop’ that caused window decoration for two windows of same app to vanish +- Dash: Non-expandable category headers skipped in keyboard navigation +- Dash: Non-expandable category headers are no longer highlighted on mouse over +- Dash: screenreader and KeyNav fixes +- New setting to control the show-now delay (when pressing Alt key) +- Logic tweak to stop adjacent menu opening when moving from an indicator icon to its menu + +### GNOME 3.16 stack ### + +![Ubuntu 15.10 - GNOME Stack 3.16](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-GNOME-Stack-3.16.jpg) + +Another important changes for this release, the most of the packages from the GNOME stack updated to version 3.16.x. This is a good thing since these packages do come with lots of improvements.Unfortunately, the nautilus file manager for Ubuntu 15.10 is still in version 3.14 and Gedit text editor file still dating from 3.10. + +### Introduce GNOME Overlay Scrollbars ### + +![Ubuntu 15.10 - GNOME Overlay Scrollbars](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-GNOME-Overlay-Scrollbars.jpg) + +In Ubuntu 15.10, Ubuntu developers have decided to implement the GNOME Overlay scrollbars, it replacement of Unity’s overlay scrollbars for GTK3 applications. That’s no different than before, but it does serve as a stark and regular reminder of how much easier it is to use scrollbars that are always present in a predicable spot and wider than the pinpoint tip of a mouse cursor. + +### Ubuntu Make ### + +![Ubuntu 15.10 - ubuntu-make](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-ubuntu-make.jpg) + +Ubuntu Make, a command-line utility that allows you to download the latest version of popular developer tools easier on Ubuntu, now supports even more platforms, frameworks and services, including a full Android development environment. + +### Persistent Network Interface Names ### + +![Ubuntu 15.10 - Persistent Network Interface Names](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-Persistent-Network-Interface-Names.jpg) + +Ubuntu developer also introduces stateless persistent network interface names in Ubuntu 15.10. This means that naming the network interfaces like eth0 or eth1 will be a thing of the past and that new more comprehensive names will be used. Also, the names will remain valid even after a restart or if the hardware is removed. + +### Steam Controller Support ### + +![Ubuntu 15.10 - Steam Controller Support](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-Steam-Controller-Support.jpg) + +In this release, Ubuntu Developer also add support for the Steam Controller in Ubuntu 15.10. For now, the updated Steam package seems to be available only for Ubuntu 15.10, but it’s possible that the patch will be backported to other supported distributions. This means that Ubuntu 15.10 users will be able to plug the new controller, open Steam, and just play without having to read and apply any kind of advice from tutorials. + +### New Default Wallpaper ### + +![Ubuntu 15.10 - New Wallpaper](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-New-Wallpaper.jpg) + +Ubuntu 15.10 bring a new default wallpaper, the wallpaper desaign concept adopted from origami and it called suru. A new set of community sourced wallpapers are also included. + +### Core Applications Updates ### + +![Ubuntu 15.10 - Core Applications](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-Core-Applications.jpg) + +Ubuntu 15.10 updates the core applications. among them: + +- Firefox 41 +- Chromium 45 +- LibreOffice 5.0.2 +- Totem (aka ‘Videos’) 3.16 +- Nautilus (aka ‘Files’) 3.14.2 +- Rhythmbox 3.2.1 +- GNOME Terminal 3.16 +- Eye of GNOME 3.16 +- Empathy 3.12.10 +- Shotwell 0.22 + +Download Ubuntu 15.10 Final Release + +The image of Ubuntu 15.10 ready to download and install. it available in 64-bit and 32-bit, the both can download from the official ISO downloads page by hitting the link below + +- [Download Ubuntu 15.10][2] + +-------------------------------------------------------------------------------- + +via: http://ubuntuportal.com/2015/10/ubuntu-15-10.html + +作者:[ncode][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ubuntuportal.com/author/ncode/ +[1]:https://www.youtube.com/user/linuxscoop +[2]:http://releases.ubuntu.com/15.10/ \ No newline at end of file From c8fac87d41561af45f11cbd44d05704912558779 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 28 Oct 2015 12:12:53 +0800 Subject: [PATCH 2358/2517] =?UTF-8?q?20151028-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...10 Tips for 10x Application Performance.md | 277 ++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 sources/tech/20151028 10 Tips for 10x Application Performance.md diff --git a/sources/tech/20151028 10 Tips for 10x Application Performance.md b/sources/tech/20151028 10 Tips for 10x Application Performance.md new file mode 100644 index 0000000000..a899284450 --- /dev/null +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -0,0 +1,277 @@ +10 Tips for 10x Application Performance +================================================================================ +Improving web application performance is more critical than ever. The share of economic activity that’s online is growing; more than 5% of the developed world’s economy is now on the Internet (see Resources below for statistics). And our always-on, hyper-connected modern world means that user expectations are higher than ever. If your site does not respond instantly, or if your app does not work without delay, users quickly move on to your competitors. + +For example, a study done by Amazon almost 10 years ago proved that, even then, a 100-millisecond decrease in page-loading time translated to a 1% increase in its revenue. Another recent study highlighted the fact that that more than half of site owners surveyed said they lost revenue or customers due to poor application performance. + +How fast does a website need to be? For each second a page takes to load, about 4% of users abandon it. Top e-commerce sites offer a time to first interaction ranging from one to three seconds, which offers the highest conversion rate. It’s clear that the stakes for web application performance are high and likely to grow. + +Wanting to improve performance is easy, but actually seeing results is difficult. To help you on your journey, this blog post offers you ten tips to help you increase your website performance by as much as 10x. It’s the first in a series detailing how you can increase your application performance with the help of some well-tested optimization techniques, and with a little support from NGINX. This series also outlines potential improvements in security that you can gain along the way. + +### Tip #1: Accelerate and Secure Applications with a Reverse Proxy Server ### + +If your web application runs on a single machine, the solution to performance problems might seem obvious: just get a faster machine, with more processor, more RAM, a fast disk array, and so on. Then the new machine can run your WordPress server, Node.js application, Java application, etc., faster than before. (If your application accesses a database server, the solution might still seem simple: get two faster machines, and a faster connection between them.) + +Trouble is, machine speed might not be the problem. Web applications often run slowly because the computer is switching among different kinds of tasks: interacting with users on thousands of connections, accessing files from disk, and running application code, among others. The application server may be thrashing – running out of memory, swapping chunks of memory out to disk, and making many requests wait on a single task such as disk I/O. + +Instead of upgrading your hardware, you can take an entirely different approach: adding a reverse proxy server to offload some of these tasks. A [reverse proxy server][1] sits in front of the machine running the application and handles Internet traffic. Only the reverse proxy server is connected directly to the Internet; communication with the application servers is over a fast internal network. + +Using a reverse proxy server frees the application server from having to wait for users to interact with the web app and lets it concentrate on building pages for the reverse proxy server to send across the Internet. The application server, which no longer has to wait for client responses, can run at speeds close to those achieved in optimized benchmarks. + +Adding a reverse proxy server also adds flexibility to your web server setup. For instance, if a server of a given type is overloaded, another server of the same type can easily be added; if a server is down, it can easily be replaced. + +Because of the flexibility it provides, a reverse proxy server is also a prerequisite for many other performance-boosting capabilities, such as: + +- **Load balancing** (see [Tip #2][2]) – A load balancer runs on a reverse proxy server to share traffic evenly across a number of application servers. With a load balancer in place, you can add application servers without changing your application at all. +- **Caching static files** (see [Tip #3][3]) – Files that are requested directly, such as image files or code files, can be stored on the reverse proxy server and sent directly to the client, which serves assets more quickly and offloads the application server, allowing the application to run faster. +- **Securing your site** – The reverse proxy server can be configured for high security and monitored for fast recognition and response to attacks, keeping the application servers protected. + +NGINX software is specifically designed for use as a reverse proxy server, with the additional capabilities described above. NGINX uses an event-driven processing approach which is more efficient than traditional servers. NGINX Plus adds more advanced reverse proxy features, such as application [health checks][4], specialized request routing, advanced caching, and support. + +![NGINX Worker Process helps increase application performance](https://www.nginx.com/wp-content/uploads/2015/10/Graph-11.png) + +### Tip #2: Add a Load Balancer ### + +Adding a [load balancer][5] is a relatively easy change which can create a dramatic improvement in the performance and security of your site. Instead of making a core web server bigger and more powerful, you use a load balancer to distribute traffic across a number of servers. Even if an application is poorly written, or has problems with scaling, a load balancer can improve the user experience without any other changes. + +A load balancer is, first, a reverse proxy server (see [Tip #1][6]) – it receives Internet traffic and forwards requests to another server. The trick is that the load balancer supports two or more application servers, using [a choice of algorithms][7] to split requests between servers. The simplest load balancing approach is round robin, with each new request sent to the next server on the list. Other methods include sending requests to the server with the fewest active connections. NGINX Plus has [capabilities][8] for continuing a given user session on the same server, which is called session persistence. + +Load balancers can lead to strong improvements in performance because they prevent one server from being overloaded while other servers wait for traffic. They also make it easy to expand your web server capacity, as you can add relatively low-cost servers and be sure they’ll be put to full use. + +Protocols that can be load balanced include HTTP, HTTPS, SPDY, HTTP/2, WebSocket, [FastCGI][9], SCGI, uwsgi, memcached, and several other application types, including TCP-based applications and other Layer 4 protocols. Analyze your web applications to determine which you use and where performance is lagging. + +The same server or servers used for load balancing can also handle several other tasks, such as SSL termination, support for HTTP/1/x and HTTP/2 use by clients, and caching for static files. + +NGINX is often used for load balancing; to learn more, please see our [overview blog post][10], [configuration blog post][11], [ebook][12] and associated [webinar][13], and [documentation][14]. Our commercial version, [NGINX Plus][15], supports more specialized load balancing features such as load routing based on server response time and the ability to load balance on Microsoft’s NTLM protocol. + +### Tip #3: Cache Static and Dynamic Content ### + +Caching improves web application performance by delivering content to clients faster. Caching can involve several strategies: preprocessing content for fast delivery when needed, storing content on faster devices, storing content closer to the client, or a combination. + +There are two different types of caching to consider: + +- **Caching of static content**. Infrequently changing files, such as image files (JPEG, PNG) and code files (CSS, JavaScript), can be stored on an edge server for fast retrieval from memory or disk. +- **Caching of dynamic content**. Many Web applications generate fresh HTML for each page request. By briefly caching one copy of the generated HTML for a brief period of time, you can dramatically reduce the total number of pages that have to be generated while still delivering content that’s fresh enough to meet your requirements. + +If a page gets ten views per second, for instance, and you cache it for one second, 90% of requests for the page will come from the cache. If you separately cache static content, even the freshly generated versions of the page might be made up largely of cached content. + +There are three main techniques for caching content generated by web applications: + +- **Moving content closer to users**. Keeping a copy of content closer to the user reduces its transmission time. +- **Moving content to faster machines**. Content can be kept on a faster machine for faster retrieval. +- **Moving content off of overused machines**. Machines sometimes operate much slower than their benchmark performance on a particular task because they are busy with other tasks. Caching on a different machine improves performance for the cached resources and also for non-cached resources, because the host machine is less overloaded. + +Caching for web applications can be implemented from the inside – the web application server – out. First, caching is used for dynamic content, to reduce the load on application servers. Then, caching is used for static content (including temporary copies of what would otherwise be dynamic content), further off-loading application servers. And caching is then moved off of application servers and onto machines that are faster and/or closer to the user, unburdening the application servers, and reducing retrieval and transmission times. + +Improved caching can speed up applications tremendously. For many web pages, static data, such as large image files, makes up more than half the content. It might take several seconds to retrieve and transmit such data without caching, but only fractions of a second if the data is cached locally. + +As an example of how caching is used in practice, NGINX and NGINX Plus use two directives to [set up caching][16]: proxy_cache_path and proxy_cache. You specify the cache location and size, the maximum time files are kept in the cache, and other parameters. Using a third (and quite popular) directive, proxy_cache_use_stale, you can even direct the cache to supply stale content when the server that supplies fresh content is busy or down, giving the client something rather than nothing. From the user’s perspective, this may strongly improves your site or application’s uptime. + +NGINX Plus has [advanced caching features][17], including support for [cache purging][18] and visualization of cache status on a [dashboard][19] for live activity monitoring. + +For more information on caching with NGINX, see the [reference documentation][20] and [NGINX Content Caching][21] in the NGINX Plus Admin Guide. + +**Note**: Caching crosses organizational lines between people who develop applications, people who make capital investment decisions, and people who run networks in real time. Sophisticated caching strategies, like those alluded to here, are a good example of the value of a [DevOps perspective][22], in which application developer, architectural, and operations perspectives are merged to help meet goals for site functionality, response time, security, and business results, )such as completed transactions or sales. + +### Tip #4: Compress Data ### + +Compression is a huge potential performance accelerator. There are carefully engineered and highly effective compression standards for photos (JPEG and PNG), videos (MPEG-4), and music (MP3), among others. Each of these standards reduces file size by an order of magnitude or more. + +Text data – including HTML (which includes plain text and HTML tags), CSS, and code such as JavaScript – is often transmitted uncompressed. Compressing this data can have a disproportionate impact on perceived web application performance, especially for clients with slow or constrained mobile connections. + +That’s because text data is often sufficient for a user to interact with a page, where multimedia data may be more supportive or decorative. Smart content compression can reduce the bandwidth requirements of HTML, Javascript, CSS and other text-based content, typically by 30% or more, with a corresponding reduction in load time. + +If you use SSL, compression reduces the amount of data that has to be SSL-encoded, which offsets some of the CPU time it takes to compress the data. + +Methods for compressing text data vary. For example, see the [section on HTTP/2][23] for a novel text compression scheme, adapted specifically for header data. As another example of text compression you can [turn on][24] GZIP compression in NGINX. After you [pre-compress text data][25] on your services, you can serve the compressed .gz version directly using the gzip_static directive. + +### Tip #5: Optimize SSL/TLS ### + +The Secure Sockets Layer ([SSL][26]) protocol and its successor, the Transport Layer Security (TLS) protocol, are being used on more and more websites. SSL/TLS encrypts the data transported from origin servers to users to help improve site security. Part of what may be influencing this trend is that Google now uses the presence of SSL/TLS as a positive influence on search engine rankings. + +Despite rising popularity, the performance hit involved in SSL/TLS is a sticking point for many sites. SSL/TLS slows website performance for two reasons: + +1. The initial handshake required to establish encryption keys whenever a new connection is opened. The way that browsers using HTTP/1.x establish multiple connections per server multiplies that hit. +1. Ongoing overhead from encrypting data on the server and decrypting it on the client. + +To encourage the use of SSL/TLS, the authors of HTTP/2 and SPDY (described in the [next section][27]) designed these protocols so that browsers need just one connection per browser session. This greatly reduces one of the two major sources of SSL overhead. However, even more can be done today to improve the performance of applications delivered over SSL/TLS. + +The mechanism for optimizing SSL/TLS varies by web server. As an example, NGINX uses [OpenSSL][28], running on standard commodity hardware, to provide performance similar to dedicated hardware solutions. NGINX [SSL performance][29] is well-documented and minimizes the time and CPU penalty from performing SSL/TLS encryption and decryption. + +In addition, see [this blog post][30] for details on ways to increase SSL/TLS performance. To summarize briefly, the techniques are: + +- **Session caching**. Uses the [ssl_session_cache][31] directive to cache the parameters used when securing each new connection with SSL/TLS. +- **Session tickets or IDs**. These store information about specific SSL/TLS sessions in a ticket or ID so a connection can be reused smoothly, without new handshaking. +- **OCSP stapling**. Cuts handshaking time by caching SSL/TLS certificate information. + +NGINX and NGINX Plus can be used for SSL/TLS termination – handling encryption and decyption for client traffic, while communicating with other servers in clear text. Use [these steps][32] to set up NGINX or NGINX Plus to handle SSL/TLS termination. Also, here are [specific steps][33] for NGINX Plus when used with servers that accept TCP connections. + +### Tip #6: Implement HTTP/2 or SPDY ### + +For sites that already use SSL/TLS, HTTP/2 and SPDY are very likely to improve performance, because the single connection requires just one handshake. For sites that don’t yet use SSL/TLS, HTTP/2 and SPDY makes a move to SSL/TLS (which normally slows performance) a wash from a responsiveness point of view. + +Google introduced SPDY in 2012 as a way to achieve faster performance on top of HTTP/1.x. HTTP/2 is the recently approved IETF standard based on SPDY. SPDY is broadly supported, but is soon to be deprecated, replaced by HTTP/2. + +The key feature of SPDY and HTTP/2 is the use of a single connection rather than multiple connections. The single connection is multiplexed, so it can carry pieces of multiple requests and responses at the same time. + +By getting the most out of one connection, these protocols avoid the overhead of setting up and managing multiple connections, as required by the way browsers implement HTTP/1.x. The use of a single connection is especially helpful with SSL, because it minimizes the time-consuming handshaking that SSL/TLS needs to set up a secure connection. + +The SPDY protocol required the use of SSL/TLS; HTTP/2 does not officially require it, but all browsers so far that support HTTP/2 use it only if SSL/TLS is enabled. That is, a browser that supports HTTP/2 uses it only if the website is using SSL and its server accepts HTTP/2 traffic. Otherwise, the browser communicates over HTTP/1.x. + +When you implement SPDY or HTTP/2, you no longer need typical HTTP performance optimizations such as domain sharding, resource merging, and image spriting. These changes make your code and deployments simpler and easier to manage. To learn more about the changes that HTTP/2 is bringing about, read our [white paper][34]. + +![NGINX Supports SPDY and HTTP/2 for increased web application performance](https://www.nginx.com/wp-content/uploads/2015/10/http2-27.png) + +As an example of support for these protocols, NGINX has supported SPDY from early on, and [most sites][35] that use SPDY today run on NGINX. NGINX is also [pioneering support][36] for HTTP/2, with [support][37] for HTTP/2 in NGINX open source and NGINX Plus as of September 2015. + +Over time, we at NGINX expect most sites to fully enable SSL and to move to HTTP/2. This will lead to increased security and, as new optimizations are found and implemented, simpler code that performs better. + +### Tip #7: Update Software Versions ### + +One simple way to boost application performance is to select components for your software stack based on their reputation for stability and performance. In addition, because developers of high-quality components are likely to pursue performance enhancements and fix bugs over time, it pays to use the latest stable version of software. New releases receive more attention from developers and the user community. Newer builds also take advantage of new compiler optimizations, including tuning for new hardware. + +Stable new releases are typically more compatible and higher-performing than older releases. It’s also easier to keep on top of tuning optimizations, bug fixes, and security alerts when you stay on top of software updates. + +Staying with older software can also prevent you from taking advantage of new capabilities. For example, HTTP/2, described above, currently requires OpenSSL 1.0.1. Starting in mid-2016, HTTP/2 will require OpenSSL 1.0.2, which was released in January 2015. + +NGINX users can start by moving to the [[latest version of the NGINX open source software][38] or [NGINX Plus][39]; they include new capabilities such as socket sharding and thread pools (see below), and both are constantly being tuned for performance. Then look at the software deeper in your stack and move to the most recent version wherever you can. + +### Tip #8: Tune Linux for Performance ### + +Linux is the underlying operating system for most web server implementations today, and as the foundation of your infrastructure, Linux represents a significant opportunity to improve performance. By default, many Linux systems are conservatively tuned to use few resources and to match a typical desktop workload. This means that web application use cases require at least some degree of tuning for maximum performance. + +Linux optimizations are web server-specific. Using NGINX as an example, here are a few highlights of changes you can consider to speed up Linux: + +- **Backlog queue**. If you have connections that appear to be stalling, consider increasing net.core.somaxconn, the maximum number of connections that can be queued awaiting attention from NGINX. You will see error messages if the existing connection limit is too small, and you can gradually increase this parameter until the error messages stop. +- **File descriptors**. NGINX uses up to two file descriptors for each connection. If your system is serving a lot of connections, you might need to increase sys.fs.file_max, the system-wide limit for file descriptors, and nofile, the user file descriptor limit, to support the increased load. +- **Ephemeral ports**. When used as a proxy, NGINX creates temporary (“ephemeral”) ports for each upstream server. You can increase the range of port values, set by net.ipv4.ip_local_port_range, to increase the number of ports available. You can also reduce the timeout before an inactive port gets reused with the net.ipv4.tcp_fin_timeout setting, allowing for faster turnover. + +For NGINX, check out the [NGINX performance tuning guides][40] to learn how to optimize your Linux system so that it can cope with large volumes of network traffic without breaking a sweat! + +### Tip #9: Tune Your Web Server for Performance ### + +Whatever web server you use, you need to tune it for web application performance. The following recommendations apply generally to any web server, but specific settings are given for NGINX. Key optimizations include: + +- **Access logging**. Instead of writing a log entry for every request to disk immediately, you can buffer entries in memory and write them to disk as a group. For NGINX, add the *buffer=size* parameter to the *access_log* directive to write log entries to disk when the memory buffer fills up. If you add the **flush=time** parameter, the buffer contents are also be written to disk after the specified amount of time. +- **Buffering**. Buffering holds part of a response in memory until the buffer fills, which can make communications with the client more efficient. Responses that don’t fit in memory are written to disk, which can slow performance. When NGINX buffering is [on][42], you use the *proxy_buffer_size* and *proxy_buffers* directives to manage it. +- **Client keepalives**. Keepalive connections reduce overhead, especially when SSL/TLS is in use. For NGINX, you can increase the maximum number of *keepalive_requests* a client can make over a given connection from the default of 100, and you can increase the *keepalive_timeout* to allow the keepalive connection to stay open longer, resulting in faster subsequent requests. +- **Upstream keepalives**. Upstream connections – connections to application servers, database servers, and so on – benefit from keepalive connections as well. For upstream connections, you can increase *keepalive*, the number of idle keepalive connections that remain open for each worker process. This allows for increased connection reuse, cutting down on the need to open brand new connections. For more information about keepalives, refer to this [blog post][41]. +- **Limits**. Limiting the resources that clients use can improve performance and security. For NGINX,the *limit_conn* and *limit_conn_zone* directives restrict the number of connections from a given source, while *limit_rate* constrains bandwidth. These settings can stop a legitimate user from “hogging” resources and also help prevent against attacks. The *limit_req* and *limit_req_zone* directives limit client requests. For connections to upstream servers, use the max_conns parameter to the server directive in an upstream configuration block. This limits connections to an upstream server, preventing overloading. The associated queue directive creates a queue that holds a specified number of requests for a specified length of time after the *max_conns* limit is reached. +- **Worker processes**. Worker processes are responsible for the processing of requests. NGINX employs an event-based model and OS-dependent mechanisms to efficiently distribute requests among worker processes. The recommendation is to set the value of *worker_processes* to one per CPU. The maximum number of worker_connections (512 by default) can safely be raised on most systems if needed; experiment to find the value that works best for your system. +- **Socket sharding**. Typically, a single socket listener distributes new connections to all worker processes. Socket sharding creates a socket listener for each worker process, with the kernel assigning connections to socket listeners as they become available. This can reduce lock contention and improve performance on multicore systems. To enable [socket sharding][43], include the reuseport parameter on the listen directive. +- **Thread pools**. Any computer process can be held up by a single, slow operation. For web server software, disk access can hold up many faster operations, such as calculating or copying information in memory. When a thread pool is used, the slow operation is assigned to a separate set of tasks, while the main processing loop keeps running faster operations. When the disk operation completes, the results go back into the main processing loop. In NGINX, two operations – the read() system call and sendfile() – are offloaded to [thread pools][44]. + +![Thread pools help increase application performance by assigning a slow operation to a separate set of tasks](https://www.nginx.com/wp-content/uploads/2015/10/Graph-17.png) + +**Tip**. When changing settings for any operating system or supporting service, change a single setting at a time, then test performance. If the change causes problems, or if it doesn’t make your site run faster, change it back. + +See this [blog post][45] for more details on tuning NGINX. + +### Tip #10: Monitor Live Activity to Resolve Issues and Bottlenecks ### + +The key to a high-performance approach to application development and delivery is watching your application’s real-world performance closely and in real time. You must be able to monitor activity within specific devices and across your web infrastructure. + +Monitoring site activity is mostly passive – it tells you what’s going on, and leaves it to you to spot problems and fix them. + +Monitoring can catch several different kinds of issues. They include: + +- A server is down. +- A server is limping, dropping connections. +- A server is suffering from a high proportion of cache misses. +- A server is not sending correct content. + +A global application performance monitoring tool like New Relic or Dynatrace helps you monitor page load time from remote locations, while NGINX helps you monitor the application delivery side. Application performance data tells you when your optimizations are making a real difference to your users, and when you need to consider adding capacity to your infrastructure to sustain the traffic. + +To help identify and resolve issues quickly, NGINX Plus adds [application-aware health checks][46] – synthetic transactions that are repeated regularly and are used to alert you to problems. NGINX Plus also has [session draining][47], which stops new connections while existing tasks complete, and a slow start capability, allowing a recovered server to come up to speed within a load-balanced group. When used effectively, health checks allow you to identify issues before they significantly impact the user experience, while session draining and slow start allow you to replace servers and ensure the process does not negatively affect perceived performance or uptime. The figure shows the built-in NGINX Plus [live activity monitoring][48] dashboard for a web infrastructure with servers, TCP connections, and caching. + +![Use real-time application performance monitoring tools to identify and resolve issues quickly](https://www.nginx.com/wp-content/uploads/2015/10/Screen-Shot-2015-10-05-at-4.16.32-PM.png) + +### Conclusion: Seeing 10x Performance Improvement ### + +The performance improvements that are available for any one web application vary tremendously, and actual gains depend on your budget, the time you can invest, and gaps in your existing implementation. So, how might you achieve 10x performance improvement for your own applications? + +To help guide you on the potential impact of each optimization, here are pointers to the improvement that may be possible with each tip detailed above, though your mileage will almost certainly vary: + +- **Reverse proxy server and load balancing**. No load balancing, or poor load balancing, can cause episodes of very poor performance. Adding a reverse proxy server, such as NGINX, can prevent web applications from thrashing between memory and disk. Load balancing can move processing from overburdened servers to available ones and make scaling easy. These changes can result in dramatic performance improvement, with a 10x improvement easily achieved compared to the worst moments for your current implementation, and lesser but substantial achievements available for overall performance. +- **Caching dynamic and static content**. If you have an overburdened web server that’s doubling as your application server, 10x improvements in peak-time performance can be achieved by caching dynamic content alone. Caching for static files can improve performance by single-digit multiples as well. +- **Compressing data**. Using media file compression such as JPEG for photos, PNG for graphics, MPEG-4 for movies, and MP3 for music files can greatly improve performance. Once these are all in use, then compressing text data (code and HTML) can improve initial page load times by a factor of two. +- **Optimizing SSL/TLS**. Secure handshakes can have a big impact on performance, so optimizing them can lead to perhaps a 2x improvement in initial responsiveness, particularly for text-heavy sites. Optimizing media file transmission under SSL/TLS is likely to yield only small performance improvements. +- **Implementing HTTP/2 and SPDY**. When used with SSL/TLS, these protocols are likely to result in incremental improvements for overall site performance. +- **Tuning Linux and web server software (such as NGINX)**. Fixes such as optimizing buffering, using keepalive connections, and offloading time-intensive tasks to a separate thread pool can significantly boost performance; thread pools, for instance, can speed disk-intensive tasks by [nearly an order of magnitude][49]. + +We hope you try out these techniques for yourself. We want to hear the kind of application performance improvements you’re able to achieve. Share your results in the comments below, or tweet your story with the hash tags #NGINX and #webperf! + +### Resources for Internet Statistics ### + +[Statista.com – Share of the internet economy in the gross domestic product in G-20 countries in 2016][50] + +[Load Impact – How Bad Performance Impacts Ecommerce Sales][51] + +[Kissmetrics – How Loading Time Affects Your Bottom Line (infographic)][52] + +[Econsultancy – Site speed: case studies, tips and tools for improving your conversion rate][53] + +-------------------------------------------------------------------------------- + +via: https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io + +作者:[Floyd Smith][a] +译者:[译者ID](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/floyd/ +[1]:https://www.nginx.com/resources/glossary/reverse-proxy-server +[2]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io#tip2 +[3]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io#tip3 +[4]:https://www.nginx.com/products/application-health-checks/ +[5]:https://www.nginx.com/solutions/load-balancing/ +[6]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io#tip1 +[7]:https://www.nginx.com/resources/admin-guide/load-balancer/ +[8]:https://www.nginx.com/blog/load-balancing-with-nginx-plus/ +[9]:https://www.digitalocean.com/community/tutorials/understanding-and-implementing-fastcgi-proxying-in-nginx +[10]:https://www.nginx.com/blog/five-reasons-use-software-load-balancer/ +[11]:https://www.nginx.com/blog/load-balancing-with-nginx-plus/ +[12]:https://www.nginx.com/resources/ebook/five-reasons-choose-software-load-balancer/ +[13]:https://www.nginx.com/resources/webinars/choose-software-based-load-balancer-45-min/ +[14]:https://www.nginx.com/resources/admin-guide/load-balancer/ +[15]:https://www.nginx.com/products/ +[16]:https://www.nginx.com/blog/nginx-caching-guide/ +[17]:https://www.nginx.com/products/content-caching-nginx-plus/ +[18]:http://nginx.org/en/docs/http/ngx_http_proxy_module.html?&_ga=1.95342300.1348073562.1438712874#proxy_cache_purge +[19]:https://www.nginx.com/products/live-activity-monitoring/ +[20]:http://nginx.org/en/docs/http/ngx_http_proxy_module.html?&&&_ga=1.61156076.1348073562.1438712874#proxy_cache +[21]:https://www.nginx.com/resources/admin-guide/content-caching +[22]:https://www.nginx.com/blog/network-vs-devops-how-to-manage-your-control-issues/ +[23]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io#tip6 +[24]:https://www.nginx.com/resources/admin-guide/compression-and-decompression/ +[25]:http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html +[26]:https://www.digicert.com/ssl.htm +[27]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io#tip6 +[28]:http://openssl.org/ +[29]:https://www.nginx.com/blog/nginx-ssl-performance/ +[30]:https://www.nginx.com/blog/improve-seo-https-nginx/ +[31]:http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache +[32]:https://www.nginx.com/resources/admin-guide/nginx-ssl-termination/ +[33]:https://www.nginx.com/resources/admin-guide/nginx-tcp-ssl-termination/ +[34]:https://www.nginx.com/resources/datasheet/datasheet-nginx-http2-whitepaper/ +[35]:http://w3techs.com/blog/entry/25_percent_of_the_web_runs_nginx_including_46_6_percent_of_the_top_10000_sites +[36]:https://www.nginx.com/blog/how-nginx-plans-to-support-http2/ +[37]:https://www.nginx.com/blog/nginx-plus-r7-released/ +[38]:http://nginx.org/en/download.html +[39]:https://www.nginx.com/products/ +[40]:https://www.nginx.com/blog/tuning-nginx/ +[41]:https://www.nginx.com/blog/http-keepalives-and-web-performance/ +[42]:http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering +[43]:https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/ +[44]:https://www.nginx.com/blog/thread-pools-boost-performance-9x/ +[45]:https://www.nginx.com/blog/tuning-nginx/ +[46]:https://www.nginx.com/products/application-health-checks/ +[47]:https://www.nginx.com/products/session-persistence/#session-draining +[48]:https://www.nginx.com/products/live-activity-monitoring/ +[49]:https://www.nginx.com/blog/thread-pools-boost-performance-9x/ +[50]:http://www.statista.com/statistics/250703/forecast-of-internet-economy-as-percentage-of-gdp-in-g-20-countries/ +[51]:http://blog.loadimpact.com/blog/how-bad-performance-impacts-ecommerce-sales-part-i/ +[52]:https://blog.kissmetrics.com/loading-time/?wide=1 +[53]:https://econsultancy.com/blog/10936-site-speed-case-studies-tips-and-tools-for-improving-your-conversion-rate/ \ No newline at end of file From c0df5eb75cdd946a8ea9c80fe6c57490fb243ff4 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 28 Oct 2015 17:36:25 +0800 Subject: [PATCH 2359/2517] =?UTF-8?q?20151028-3=20=E9=80=89=E9=A2=98=20Bos?= =?UTF-8?q?sie=20Awards=202015=20=E7=B3=BB=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...en source application development tools.md | 336 ++++++++++++++++++ ...2015--The best open source applications.md | 238 +++++++++++++ ...15--The best open source big data tools.md | 287 +++++++++++++++ ...n source data center and cloud software.md | 261 ++++++++++++++ ...open source desktop and mobile software.md | 223 ++++++++++++ ...source networking and security software.md | 162 +++++++++ 6 files changed, 1507 insertions(+) create mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source application development tools.md create mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source applications.md create mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source big data tools.md create mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source data center and cloud software.md create mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source desktop and mobile software.md create mode 100644 sources/share/20151028 Bossie Awards 2015--The best open source networking and security software.md diff --git a/sources/share/20151028 Bossie Awards 2015--The best open source application development tools.md b/sources/share/20151028 Bossie Awards 2015--The best open source application development tools.md new file mode 100644 index 0000000000..10da3e7cdc --- /dev/null +++ b/sources/share/20151028 Bossie Awards 2015--The best open source application development tools.md @@ -0,0 +1,336 @@ +Bossie Awards 2015: The best open source application development tools +================================================================================ +InfoWorld's top picks among platforms, frameworks, databases, and all the other tools that programmers use + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-app-dev-100613767-orig.jpg) + +### The best open source development tools ### + +There must be a better way, right? The developers are the ones who find it. This year's winning projects in the application development category include client-side frameworks, server-side frameworks, mobile frameworks, databases, languages, libraries, editors, and yeah, Docker. These are our top picks among all of the tools that make it faster and easier to build better applications. + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-docker-100613773-orig.jpg) + +### Docker ### + +The darling of container fans almost everywhere, [Docker][2] provides a low-overhead way to isolate an application or service’s environment, which serves its stated goal of being an open platform for building, shipping, and running distributed applications. Docker has been widely supported, even among those seeking to replace the Docker container format with an alternative, more secure runtime and format, specifically Rkt and AppC. Heck, Microsoft Visual Studio now supports deploying into a Docker container too. + +Docker’s biggest impact has been on virtual machine environments. Since Docker containers run inside the operating system, many more Docker containers than virtual machines can run in a given amount of RAM. This is important because RAM is usually the scarcest and most expensive resource in a virtualized environment. + +There are hundreds of thousands of runnable public images on Docker Hub, of which a few hundred are official, and the rest are from the community. You describe Docker images with a Dockerfile and build images locally from the Docker command line. You can add both public and private image repositories to Docker Hub. + +-- Martin Heller + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-nodejs-iojs-100613778-orig.jpg) + +### Node.js and io.js ### + +[Node.js][2] -- and its recently reunited fork [io.js][3] -- is a platform built on [Google Chrome's V8 JavaScript runtime][4] for building fast, scalable, network applications. Node uses an event-driven, nonblocking I/O model without threads. In general, Node tends to take less memory and CPU resources than other runtime engines, such as Java and the .Net Framework. For example, a typical Node.js Web server can run well in a 512MB instance on Cloud Foundry or a 512MB Docker container. + +The Node repository on GitHub has more than 35,000 stars and more than 8,000 forks. The project, sponsored primarily by Joyent, has more than 600 contributors. Some of the more famous Node applications are 37Signals, [Ancestry.com][5], Chomp, the Wall Street Journal online, FeedHenry, [GE.com][6], Mockingbird, [Pearson.com][7], Shutterstock, and Uber. The popular IoT back-end Node-RED is built on Node, as are many client apps, such as Brackets and Nuclide. + +-- Martin Heller + +![](rticle/2015/09/bossies-2015-angularjs-100613766-orig.jpg) + +### AngularJS ### + +[AngularJS][8] (or simply Angular, among friends) is a Model-View-Whatever (MVW) JavaScript AJAX framework that extends HTML with markup for dynamic views and data binding. Angular is especially good for developing single-page Web applications and linking HTML forms to models and JavaScript controllers. + +The weird sounding Model-View-Whatever pattern is an attempt to include the Model-View-Controller, Model-View-ViewModel, and Model-View-Presenter patterns under one moniker. The differences among these three closely related patterns are the sorts of topics that programmers love to argue about fiercely; the Angular developers decided to opt out of the discussion. + +Basically, Angular automatically synchronizes data from your UI (view) with your JavaScript objects (model) through two-way data binding. To help you structure your application better and make it easy to test, AngularJS teaches the browser how to do dependency injection and inversion of control. + +Angular was created by Google and open-sourced under the MIT license; there are currently more than 1,200 contributors to the project on GitHub, and the repository has more than 40,000 stars and 18,000 forks. The Angular site lists [210 “neat things” built with Angular][9]. + +-- Martin Heller + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-react-100613782-orig.jpg) + +### React ### + +[React][10] is a JavaScript library for building a UI or view, typically for single-page applications. Note that React does not implement anything having to do with a model or controller. React pages can render on the server or the client; rendering on the server (with Node.js) is typically much faster. People often combine React with AngularJS to create complete applications. + +React combines JavaScript and HTML in a single file, optionally a JSX component. React fans like the way JSX components combine views and their related functionality in one file, though that flies in the face of the last decade of Web development trends, which were all about separating the markup and the code. React fans also claim that you can’t understand it until you’ve tried it. Perhaps you should; the React repository on GitHub has 26,000 stars. + +[React Native][11] implements React with native iOS controls; the React Native command line uses Node and Xcode. [ReactJS.Net][12] integrates React with [ASP.Net][13] and C#. React is available under a BSD license with a patent license grant from Facebook. + +-- Martin Heller + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-atom-100613768-orig.jpg) + +### Atom ### + +[Atom][14] is an open source, hackable desktop editor from GitHub, based on Web technologies. It’s a full-featured tool with a fuzzy finder; fast projectwide search and replace; multiple cursors and selections; multiple panes, snippets, code folding; and the ability to import TextMate grammars and themes. Out of the box, Atom displayed proper syntax highlighting for every programming language on which I tried it, except for F# and C#; I fixed that easily by loading those packages from within Atom. Not surprising, Atom has tight integration with GitHub. + +The skeleton of Atom has been separated from the guts and called the Electron shell, providing an open source way to build cross-platform desktop apps with Web technologies. Visual Studio Code is built on the Electron shell, as are a number of proprietary and open source apps, including Slack and Kitematic. Facebook Nuclide adds significant functionality to Atom, including remote development and support for Flow, Hack, and Mercurial. + +On the downside, updating Atom packages can become painful, especially if you have many of them installed. The Nuclide packages seem to be the worst offenders -- they not only take a long time to update, they run CPU-intensive Node processes to do so. + +-- Martin Heller + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-brackets-100613769-orig.jpg) + +### Brackets ### + +[Brackets][15] is a lightweight editor for Web design that Adobe developed and open-sourced, drawing heavily on other open source projects. The idea is to build better tooling for JavaScript, HTML, CSS, and related open Web technologies. Brackets itself is written in JavaScript, HTML, and CSS, and the developers use Brackets to build Brackets. The editor portion is based on another open source project, CodeMirror, and the Brackets native shell is based on Google’s Chromium Embedded Framework. + +Brackets features a clean UI, with the ability to open a quick inline editor that displays all of the related CSS for some HTML, or all of the related JavaScript for some scripting, and a live preview for Web pages that you are editing. New in Brackets 1.4 is instant search in files, easier preferences editing, the ability to enable and disable extensions individually, improved text rendering on Macs, and Greek and Cyrillic character support. Last November, Adobe started shipping a preview version of Extract for Brackets, which can pull out design information from Photoshop files, as part of the default download for Brackets. + +-- Martin Heller + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-typescript-100613786-orig.jpg) + +### TypeScript ### + +[TypeScript][16] is a portable, duck-typed superset of JavaScript that compiles to plain JavaScript. The goal of the project is to make JavaScript usable for large applications. In pursuit of that goal, TypeScript adds optional types, classes, and modules to JavaScript, and it supports tools for large-scale JavaScript applications. Typing gets rid of some of the nonsensical and potentially buggy default behavior in JavaScript, for example: + + > 1 + "1" + '11' + +“Duck” typing means that the type checking focuses on the shape of the data values; TypeScript describes basic types, interfaces, and classes. While the current version of JavaScript does not support traditional, class-based, object-oriented programming, the ECMAScript 6 specification does. TypeScript compiles ES6 classes into plain, compatible JavaScript, with prototype-based objects, unless you enable ES6 output using the `--target` compiler option. + +Visual Studio includes TypeScript in the box, starting with Visual Studio 2013 Update 2. You can also edit TypeScript in Visual Studio Code, WebStorm, Atom, Sublime Text, and Eclipse. + +When using an external JavaScript library, or new host API, you'll need to use a declaration file (.d.ts) to describe the shape of the library. You can often find declaration files in the [DefinitelyTyped][17] repository, either by browsing, using the [TSD definition manager][18], or using NuGet. + +TypeScript’s GitHub repository has more than 6,000 stars. + +-- Martin Heller + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-swagger-100613785-orig.jpg) + +### Swagger ### + +[Swagger][19] is a language-agnostic interface to RESTful APIs, with tooling that gives you interactive documentation, client SDK generation, and discoverability. It’s one of several recent attempts to codify the description of RESTful APIs, in the spirit of WSDL for XML Web Services (2000) and CORBA for distributed object interfaces (1991). + +The tooling makes Swagger especially interesting. [Swagger-UI][20] automatically generates beautiful documentation and a live API sandbox from a Swagger-compliant API. The [Swagger codegen][21] project allows generation of client libraries automatically from a Swagger-compliant server. + +[Swagger Editor][22] lets you edit Swagger API specifications in YAML inside your browser and preview documentations in real time. Valid Swagger JSON descriptions can then be generated and used with the full Swagger tooling. + +The [Swagger JS][23] library is a fast way to enable a JavaScript client to communicate with a Swagger-enabled server. Additional clients exist for Clojure, Go, Java, .Net, Node.js, Perl, PHP, Python, Ruby, and Scala. + +The [Amazon API Gateway][24] is a managed service for API management at scale. It can import Swagger specifications using an open source [Swagger Importer][25] tool. + +Swagger and friends use the Apache 2.0 license. + +-- Martin Heller + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-polymer-100613781-orig.jpg) + +### Polymer ### + +The [Polymer][26] library is a lightweight, “sugaring” layer on top of the Web components APIs to help in building your own Web components. It adds several features for greater ease in building complex elements, such as creating custom element registration, adding markup to your element, configuring properties on your element, setting the properties with attributes, data binding with mustache syntax, and internal styling of elements. + +Polymer also includes libraries of prebuilt elements. The Iron library includes elements for working with layout, user input, selection, and scaffolding apps. The Paper elements implement Google's Material Design. The Gold library includes elements for credit card input fields for e-commerce, the Neon elements implement animations, the Platinum library implements push messages and offline caching, and the Google Web Components library is exactly what it says; it includes wrappers for YouTube, Firebase, Google Docs, Hangouts, Google Maps, and Google Charts. + +Polymer Molecules are elements that wrap other JavaScript libraries. The only Molecule currently implemented is for marked, a Markdown library. The Polymer repository on GitHub currently has 12,000 stars. The software is distributed under a BSD-style license. + +-- Martin Heller + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-ionic-100613775-orig.jpg) + +### Ionic ### + +The [Ionic][27] framework is a front-end SDK for building hybrid mobile apps, using Angular.js and Cordova, PhoneGap, or Trigger.io. Ionic was designed to be similar in spirit to the Android and iOS SDKs, and to do a minimum of DOM manipulation and use hardware-accelerated transitions to keep the rendering speed high. Ionic is focused mainly on the look and feel and UI interaction of your app. + +In addition to the framework, Ionic encompasses an ecosystem of mobile development tools and resources. These include Chrome-based tools, Angular extensions for Cordova capabilities, back-end services, a development server, and a shell View App to enable testers to use your Ionic code on their devices without the need for you to distribute beta apps through the App Store or Google Play. + +Appery.io integrated Ionic into its low-code builder in July 2015. Ionic’s GitHub repository has more than 18,000 stars and more than 3,000 forks. Ionic is distributed under an MIT license and currently runs in UIWebView for iOS 7 and later, and in Android 4.1 and up. + +-- Martin Heller + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-cordova-100613771-orig.jpg) + +### Cordova ### + +[Apache Cordova][28] is the open source project spun off when Adobe acquired PhoneGap from Nitobi. Cordova is a set of device APIs, plus some tooling, that allows a mobile app developer to access native device functionality like the camera and accelerometer from JavaScript. When combined with a UI framework like Angular, it allows a smartphone app to be developed with only HTML, CSS, and JavaScript. By using Cordova plug-ins for multiple devices, you can generate hybrid apps that share a large portion of their code but also have access to a wide range of platform capabilities. The HTML5 markup and code runs in a WebView hosted by the Cordova shell. + +Cordova is one of the cross-platform mobile app options supported by Visual Studio 2015. Several companies offer online builders for Cordova apps, similar to the Adobe PhoneGap Build service. Online builders save you from having to install and maintain most of the device SDKs on which Cordova relies. + +-- Martin Heller + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-famous-100613774-orig.jpg) + +### Famous Engine ### + +The high-performance Famo.us JavaScript framework introduced last year has become the [Famous Engine][29] and [Famous Framework][30]. The Famous Engine runs in a mixed mode, with the DOM and WebGL under a single coordinate system. As before, Famous structures applications in a scene graph hierarchy, but now it produces very little garbage (reducing the garbage collector overhead) and sustains 60FPS animations. + +The Famous Physics engine has been refactored to its own, fine-grained module so that you can load only the features you need. Other improvements since last year include streamlined eventing, improved sizing, decoupling the scene graph from the rendering pipeline by using a draw command buffer, and switching to a fully open MIT license. + +The new Famous Framework is an alpha-stage developer preview built on the Famous Engine; its goal is creating reusable, composable, and interchangeable UI widgets and applications. Eventually, Famous hopes to replace the jQuery UI widgets with Famous Framework widgets, but while it's promising, the Famous Framework is nowhere near production-ready. + +-- Martin Heller + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-mongodb-rev-100614248-orig.jpg) + +### MongoDB ### + +[MongoDB][31] is no stranger to the Bossies or to the ever-growing and ever-competitive NoSQL market. If you still aren't familiar with this very popular technology, here's a brief overview: MongoDB is a cross-platform document-oriented database, favoring JSON-like documents with dynamic schemas that make data integration easier and faster. + +MongoDB has attractive features, including but not limited to ad hoc queries, flexible indexing, replication, high availability, automatic sharding, load balancing, and aggregation. + +The big, bold move with [version 3.0 this year][32] was the new WiredTiger storage engine. We can now have document-level locking. This makes “normal” applications a whole lot more scalable and makes MongoDB available to more use cases. + +MongoDB has a growing open source ecosystem with such offerings as the [TokuMX engine][33], from the famous MySQL bad boys Percona. The long list of MongoDB customers includes heavy hitters such as Craigslist, eBay, Facebook, Foursquare, Viacom, and the New York Times. + +-- Andrew Oliver + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-couchbase-100614851-orig.jpg) + +### Couchbase ### + +[Couchbase][34] is another distributed, document-oriented database that has been making waves in the NoSQL world for quite some time now. Couchbase and MongoDB often compete, but they each have their sweet spots. Couchbase tends to outperform MongoDB when doing more in memory is possible. + +Additionally, Couchbase’s mobile features allow you to disconnect and ship a database in compact format. This allows you to scale down as well as up. This is useful not just for mobile devices but also for specialized applications, like shipping medical records across radio waves in Africa. + +This year Couchbase added N1QL, a SQL-based query language that did away with Couchbase’s biggest obstacle, requiring static views. The new release also introduced multidimensional scaling. This allows individual scaling of services such as querying, indexing, and data storage to improve performance, instead of adding an entire, duplicate node. + +-- Andrew C. Oliver + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-cassandra-100614852-orig.jpg) + +### Cassandra ### + +[Cassandra][35] is the other white meat of column family databases. HBase might be included with your favorite Hadoop distribution, but Cassandra is the one people deliberately deploy for specialized applications. There are good reasons for this. + +Cassandra was designed for high workloads of both writes and reads where millisecond consistency isn't as important as throughput. HBase is optimized for reads and greater write consistency. To a large degree, Cassandra tends to be used for operational systems and HBase more for data warehouse and batch-system-type use cases. + +While Cassandra has not received as much attention as other NoSQL databases and slipped into a quiet period a couple years back, it is widely used and deployed, and it's a great fit for time series, product catalog, recommendations, and other applications. If you want to keep a cluster up “no matter what” with multiple masters and multiple data centers, and you need to scale with lots of reads and lots of writes, Cassandra might just be your Huckleberry. + +-- Andrew C. Oliver + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-orientdb-100613780-orig.jpg) + +### OrientDB ### + +[OrientDB][36] is an interesting hybrid in the NoSQL world, combining features from a document database, where individual documents can have multiple fields without necessarily defining a schema, and a graph database, which consists of a set of nodes and edges. At a basic level, OrientDB considers the document as a vertex, and relationships between fields as graph edges. Because the relationships between elements are part of the record, no costly joins are required when querying data. + +Like most databases today, OrientDB offers linear scalability via a distributed architecture. Adding capacity is a matter of simply adding more nodes to the cluster. Queries are written in a variant of SQL that is extended to support graph concepts. It's not exactly SQL, but data analysts shouldn't have too much trouble adapting. Language bindings are available for most commonly used languages, such as R, Scala, .Net, and C, and those integrating OrientDB into their applications will find an active user community to get help from. + +-- Steven Nunez + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-rethinkdb-100613783-orig.jpg) + +### RethinkDB ### + +[RethinkDB][37] is a scalable, real-time JSON database with the ability to continuously push updated query results to applications that subscribe to changes. There are official RethinkDB drivers for Ruby, Python, and JavaScript/Node.js, and community-supported drivers for more than a dozen other languages, including C#, Go, and PHP. + +It’s temping to confuse RethinkDB with real-time sync APIs, such as Firebase and PubNub. RethinkDB can be run as a cloud service like Firebase and PubNub, but you can also install it on your own hardware or Docker containers. RethinkDB does more than synchronize: You can run arbitrary RethinkDB queries, including table joins, subqueries, geospatial queries, and aggregation. Finally, RethinkDB is designed to be accessed from an application server, not a browser. + +Where MongoDB requires you to poll the database to see changes, RethinkDB lets you subscribe to a stream of changes to a query result. You can shard and scale RethinkDB easily, unlike MongoDB. Also unlike relational databases, RethinkDB does not give you full ACID support or strong schema enforcement, although it can perform joins. + +The RethinkDB repository has 10,000 stars on GitHub, a remarkably high number for a database. It is licensed with the Affero GPL 3.0; the drivers are licensed with Apache 2.0. + +-- Martin Heller + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-rust-100613784-orig.jpg) + +### Rust ### + +[Rust][38] is a syntactically C-like systems programming language from Mozilla Research that guarantees memory safety and offers painless concurrency (that is, no data races). It does not have a garbage collector and has minimal runtime overhead. Rust is strongly typed with type inference. This is all promising. + +Rust was designed for performance. It doesn’t yet demonstrate great performance, however, so now the mantra seems to be that it runs as fast as C++ code that implements all the safety checks built into Rust. I’m not sure whether I believe that, as in many cases the strictest safety checks for C/C++ code are done by static and dynamic analysis and testing, which don’t add any runtime overhead. Perhaps Rust performance will come with time. + +So far, the only tools for Rust are the Cargo package manager and the rustdoc documentation generator, plus a couple of simple Rust plug-ins for programming editors. As far as we have heard, there is no shipping software that was actually built with Rust. Now that Rust has reached the 1.0 milestone, we might expect that to change. + +Rust is distributed with a dual Apache 2.0 and MIT license. With 13,000 stars on its GitHub repository, Rust is certainly attracting attention, but when and how it will deliver real benefits remains to be seen. + +-- Martin Heller + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-opencv-100613779-orig.jpg) + +### OpenCV ### + +[OpenCV][39] (Open Source Computer Vision Library) is a computer vision and machine learning library that contains about 500 algorithms, such as face detection, moving object tracking, image stitching, red-eye removal, machine learning, and eye movement tracking. It runs on Windows, Mac OS X, Linux, Android, and iOS. + +OpenCV has official C++, C, Python, Java, and MATLAB interfaces, and wrappers in other languages such as C#, Perl, and Ruby. CUDA and OpenCL interfaces are under active development. OpenCV was originally (1999) an Intel Research project in Russia; from there it moved to the robotics research lab Willow Garage (2008) and finally to [OpenCV.org][39] (2012) with a core team at Itseez, current source on GitHub, and stable snapshots on SourceForge. + +Users of OpenCV include Google, Yahoo, Microsoft, Intel, IBM, Sony, Honda, and Toyota. There are currently more than 6,000 stars and 5,000 forks on the GitHub repository. The project uses a BSD license. + +-- Martin Heller + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-llvm-100613777-orig.jpg) + +### LLVM ### + +The [LLVM Project][40] is a collection of modular and reusable compiler and tool chain technologies, which originated at the University of Illinois. LLVM has grown to include a number of subprojects, several of which are interesting in their own right. LLVM is distributed with Debian, Ubuntu, and Apple Xcode, among others, and it’s used in commercial products from the likes of Adobe (including After Effects), Apple (including Objective-C and Swift), Cray, Intel, NVIDIA, and Siemens. A few of the open source projects that depend on LLVM are PyPy, Mono, Rubinius, Pure, Emscripten, Rust, and Julia. Microsoft has recently contributed LLILC, a new LLVM-based compiler for .Net, to the .Net Foundation. + +The main LLVM subprojects are the core libraries, which provide optimization and code generation; Clang, a C/C++/Objective-C compiler that’s about three times faster than GCC; LLDB, a much faster debugger than GDB; libc++, an implementation of the C++ 11 Standard Library; and OpenMP, for parallel programming. + +-- Martin Heller + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-main-100613823-orig.jpg) + +### Read about more open source winners ### + +InfoWorld's Best of Open Source Awards for 2014 celebrate more than 100 open source projects, from the bottom of the stack to the top. Follow these links to more open source winners: + +[Bossie Awards 2015: The best open source applications][41] + +[Bossie Awards 2015: The best open source application development tools][42] + +[Bossie Awards 2015: The best open source big data tools][43] + +[Bossie Awards 2015: The best open source data center and cloud software][44] + +[Bossie Awards 2015: The best open source desktop and mobile software][45] + +[Bossie Awards 2015: The best open source networking and security software][46] + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2982920/open-source-tools/bossie-awards-2015-the-best-open-source-application-development-tools.html + +作者:[InfoWorld staff][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/InfoWorld-staff/ +[1]:https://www.docker.com/ +[2]:https://nodejs.org/en/ +[3]:https://iojs.org/en/ +[4]:https://developers.google.com/v8/?hl=en +[5]:http://www.ancestry.com/ +[6]:http://www.ge.com/ +[7]:https://www.pearson.com/ +[8]:https://angularjs.org/ +[9]:https://builtwith.angularjs.org/ +[10]:https://facebook.github.io/react/ +[11]:https://facebook.github.io/react-native/ +[12]:http://reactjs.net/ +[13]:http://asp.net/ +[14]:https://atom.io/ +[15]:http://brackets.io/ +[16]:http://www.typescriptlang.org/ +[17]:http://definitelytyped.org/ +[18]:http://definitelytyped.org/tsd/ +[19]:http://swagger.io/ +[20]:https://github.com/swagger-api/swagger-ui +[21]:https://github.com/swagger-api/swagger-codegen +[22]:https://github.com/swagger-api/swagger-editor +[23]:https://github.com/swagger-api/swagger-js +[24]:http://aws.amazon.com/cn/api-gateway/ +[25]:https://github.com/awslabs/aws-apigateway-importer +[26]:https://www.polymer-project.org/ +[27]:http://ionicframework.com/ +[28]:https://cordova.apache.org/ +[29]:http://famous.org/ +[30]:http://famous.org/framework/ +[31]:https://www.mongodb.org/ +[32]:http://www.infoworld.com/article/2878738/nosql/first-look-mongodb-30-for-mature-audiences.html +[33]:http://www.infoworld.com/article/2929772/nosql/mongodb-crossroads-growth-or-openness.html +[34]:http://www.couchbase.com/nosql-databases/couchbase-server +[35]:https://cassandra.apache.org/ +[36]:http://orientdb.com/ +[37]:http://rethinkdb.com/ +[38]:https://www.rust-lang.org/ +[39]:http://opencv.org/ +[40]:http://llvm.org/ +[41]:http://www.infoworld.com/article/2982622/bossie-awards-2015-the-best-open-source-applications.html +[42]:http://www.infoworld.com/article/2982920/bossie-awards-2015-the-best-open-source-application-development-tools.html +[43]:http://www.infoworld.com/article/2982429/bossie-awards-2015-the-best-open-source-big-data-tools.html +[44]:http://www.infoworld.com/article/2982923/bossie-awards-2015-the-best-open-source-data-center-and-cloud-software.html +[45]:http://www.infoworld.com/article/2982630/bossie-awards-2015-the-best-open-source-desktop-and-mobile-software.html +[46]:http://www.infoworld.com/article/2982962/bossie-awards-2015-the-best-open-source-networking-and-security-software.html \ No newline at end of file diff --git a/sources/share/20151028 Bossie Awards 2015--The best open source applications.md b/sources/share/20151028 Bossie Awards 2015--The best open source applications.md new file mode 100644 index 0000000000..29fced5cc9 --- /dev/null +++ b/sources/share/20151028 Bossie Awards 2015--The best open source applications.md @@ -0,0 +1,238 @@ +Bossie Awards 2015: The best open source applications +================================================================================ +InfoWorld's top picks in open source business applications, enterprise integration, and middleware + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-applications-100614669-orig.jpg) + +### The best open source applications ### + +Applications -- ERP, CRM, HRM, CMS, BPM -- are not only fertile ground for three-letter acronyms, they're the engines behind every modern business. Our top picks in the category include back- and front-office solutions, marketing automation, lightweight middleware, heavyweight middleware, and other tools for moving data around, mixing it together, and magically transforming it into smarter business decisions. + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-xtuple-100614684-orig.jpg) + +### xTuple ### + +Small and midsize companies with light manufacturing or distribution needs have a friend in [xTuple][1]. This modular ERP/CRM combo bundles operations and financial control, product and inventory management, and CRM and sales support. Its relatively simple install lets you deploy all of the modules or only what you need today -- helping trim support costs without sacrificing customization later. + +This summer’s release brought usability improvements to the UI and a generous number of bug fixes. Recent updates also yielded barcode scanning and label printing for mobile warehouse workers, an enhanced workflow module (built with Plv8, a wrapper around Google’s V8 JavaScript engine that lets you write stored procedures for PostgreSQL in JavaScript), and quality management tools that are sure to get mileage on shop floors. + +The xTuple codebase is JavaScript from stem to stern. The server components can all be installed locally, in xTuple’s cloud, or deployed as an appliance. A mobile Web client, and mobile CRM features, augment a good native desktop client. + +-- James R. Borck + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-odoo-100614678-orig.jpg) + +### Odoo ### + +[Odoo][2] used to be known as OpenERP. Last year the company raised private capital and broadened its scope. Today Odoo is a one-stop shop for back office and customer-facing applications -- replete with content management, business intelligence, and e-commerce modules. + +Odoo 8 fronts accounting, invoicing, project management, resource planning, and customer relationship management tools with a flexible Web interface that can be tailored to your company’s workflow. Add-on modules for warehouse management and HR, as well as for live chat and analytics, round out the solution. + +This year saw Odoo focused primarily on usability updates. A recently released sales planner helps sales groups track KPIs, and a new tips feature lends in-context help. Odoo 9 is right around the corner with alpha builds showing customer portals, Web form creation tools, mobile and VoIP services, and integration hooks to eBay and Amazon. + +Available for Windows and Linux, and as a SaaS offering, Odoo gives small and midsized companies an accessible set of tools to manage virtually every aspect of their business. + +-- James R. Borck + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-idempiere-100614673-orig.jpg) + +### iDempiere ### + +Small and midsize companies have great choices in Odoo and xTuple. Larger manufacturing and distribution companies will need something more. For them, there’s [iDempiere][3] -- a well maintained offshoot of ADempiere with OSGi modularity. + +iDempiere implements a fully loaded ERP, supply chain, and CRM suite right out of the box. Built with Java, iDempiere supports both PostgreSQL and Oracle Database, and it can be customized extensively through modules built to the OSGi specification. iDempiere is perfectly suited to managing complex business scenarios involving multiple partners, requiring dynamic reporting, or employing point-of-sale and warehouse services. + +Being enterprise-ready comes with a price. iDempiere’s feature-rich tools and complexity impose a steep learning curve and require a commitment to integration support. Of course, those costs are offset by savings from the software’s free GPL2 licensing. iDempiere’s easy install script, small resource footprint, and clean interface also help alleviate some of the startup pains. There’s even a virtual appliance available on Sourceforge to get you started. + +-- James R. Borck + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-suitecrm-100614680-orig.jpg) + +### SuiteCRM ### + +SugarCRM held the sweet spot in open source CRM since, well, forever. Then last year Sugar announced it would no longer contribute to the open source Community Edition. Into the ensuing vacuum rushed [SuiteCRM][4] – a fork of the final Sugar code. + +SuiteCRM 7.2 creates an experience on a par with SugarCRM Professional’s marketing, sales, and service tools. With add-on modules for workflow, reporting, and security, as well as new innovations like Lucene-driven search, taps for social media, and a beta reveal of new desktop notifications, SuiteCRM is on solid footing. + +The Advanced Open Sales module provides a familiar migration path from Sugar, while commercial support is available from the likes of [SalesAgility][5], the company that forked SuiteCRM in the first place. In little more than a year, SuiteCRM rescued the code, rallied an inspired community, and emerged as a new leader in open source CRM. Who needs Sugar? + +-- James R. Borck + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-civicrm-100614671-orig.jpg) + +### CiviCRM ### + +We typically focus attention on CRM vis-à-vis small and midsize business requirements. But nonprofit and advocacy groups need to engage with their “customers” too. Enter [CiviCRM][6]. + +CiviCRM addresses the needs of nonprofits with tools for fundraising and donation processing, membership management, email tracking, and event planning. Granular access control and security bring role-based permissions to views, keeping paid staff and volunteers partitioned and productive. This year CiviCRM continued to develop with new features like simple A/B testing and monitoring for email campaigns. + +CiviCRM deploys as a plug-in to your WordPress, Drupal, or Joomla content management system -- a dead-simple install if you already have one of these systems in place. If you don’t, CiviCRM is an excellent reason to deploy the CMS. It’s a niche-filling solution that allows nonprofits to start using smarter, tailored tools for managing constituencies, without steep hurdles and training costs. + +-- James R. Borck + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-mautic-100614677-orig.jpg) + +### Mautic ### + +For marketers, the Internet -- Web, email, social, all of it -- is the stuff dreams are made on. [Mautic][7] allows you to create Web and email campaigns that track and nurture customer engagement, then roll all of the data into detailed reports to gain insight into customer needs and wants and how to meet them. + +Open source options in marketing automation are few, but Mautic’s extensibility stands out even against closed solutions like IBM’s Silverpop. Mautic even integrates with popular third-party email marketing solutions (MailChimp, Constant Contact) and social media platforms (Facebook, Twitter, Google+, Instagram) with quick-connect widgets. + +The developers of Mautic could stand to broaden the features for list segmentation and improve the navigability of their UI. Usability is also hindered by sparse documentation. But if you’re willing to rough it out long enough to learn your way, you’ll find a gem -- and possibly even gold -- in Mautic. + +-- James R. Borck + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-orangehrm-100614679-orig.jpg) + +### OrangeHRM ### + +The commercial software market in the human resource management space is rather fragmented, with Talent, HR, and Workforce Management startups all vying for a slice of the pie. It’s little wonder the open source world hasn’t found much direction either, with the most ambitious HRM solutions often locked inside larger ERP distributions. [OrangeHRM][8] is a standout. + +OrangeHRM tackles employee administration from recruitment and applicant tracking to performance reviews, with good audit trails throughout. An employee portal provides self-serve access to personal employment information, time cards, leave requests, and personnel documents, helping reduce demands on HR staff. + +OrangeHRM doesn’t yet address niche aspects like talent management (social media, collaboration, knowledge banks), but it’s remarkably full-featured. Professional and Enterprise options offer more advanced functionality (in areas such as recruitment, training, on/off-boarding, document management, and mobile device access), while community modules are available for the likes of Active Directory/LDAP integration, advanced reporting, and even insurance benefit management. + +-- James R. Borck + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-libreoffice-100614675-orig.jpg) + +### LibreOffice ### + +[LibreOffice][9] is the easy choice for best open source office productivity suite. Originally forked from OpenOffice, Libre has been moving at a faster clip than OpenOffice ever since, drawing more developers and producing more new features than its rival. + +LibreOffice 5.0, released only last month, offers UX improvements that truly enhance usability (like visual previews to style changes in the sidebar), brings document editing to Android devices (previously a view-only prospect), and finally delivers on a 64-bit Windows codebase. + +LibreOffice still lacks a built-in email client and a personal information manager, not to mention the real-time collaborative document editing available in Microsoft Office. But Libre can run off of a USB flash disk for portability, natively supports a greater number of graphic and file formats, and creates hybrid PDFs with embedded ODF files for full-on editing. Libre even imports Apple Pages documents, in addition to opening and saving all Microsoft Office formats. + +LibreOffice has done a solid job of tightening its codebase and delivering enhancements at a regular clip. With a new cloud version under development, LibreOffice will soon be more liberating than ever. + +-- James R. Borck + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-bonita-100614672-orig.jpg) + +### Bonita BPM ### + +Open source BPM has become a mature, cost-effective alternative to the top proprietary solutions. Having led the charge since 2009, Bonitasoft continues to raise the bar. The new [Bonita BPM 7][10] release impresses with innovative features that simplify code generation and shorten development cycles for BPM app creation. + +Most important to the new version, though, is better abstraction of underlying core business logic from UI and data components, allowing UIs and processes to be developed independently. This new MVC approach reduces downtime for live upgrades (no more recompilation!) and eases application maintenance. + +Bonita contains a winning set of connectors to a broad range of enterprise systems (ERP, CRM, databases) as well as to Web services. Complementing its process weaving tools, a new form designer (built on AngularJS/Bootstrap) goes a long way toward improving UI creation for the Web-centric and mobile workforce. + +-- James R. Borck + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-camunda-100614670-orig.jpg) + +### Camunda BPM ### + +Many open source solutions, like Bonita BPM, offer solid, drop-in functionality. Dig into the code base, though, and you may find it’s not the cleanest to build upon. Enterprise Java developers who hang out under the hood should check out [Camunda BPM][11]. + +Forked from Alfresco Activiti (a creation of former Red Hat jBPM developers), Camunda BPM delivers a tight, Java-based BPMN 2.0 engine in support of human workflow activities, case management, and systems process automation that can be embedded in your Java apps or run as a container service in Tomcat. Camunda’s ecosystem offers an Eclipse plug-in for process modeling and the Cockpit dashboard brings real-time monitoring and management over running processes. + +The Enterprise version adds WebSphere and WebLogic Server support. Additional incentives for the Enterprise upgrade include Saxon-driven XSLT templating (sidestepping the scripting engine) and add-ons to improve process management and exception handling. + +Camunda is a solid BPM engine ready for build-out and one of the first open source process managers to introduce DMN (Decision Model and Notation) support, which helps to simplify complex rules-based modeling alongside BPMN. DMN support is currently at the alpha stage. + +-- James R. Borck + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-talend-100614681-orig.jpg) + +### Talend Open Studio ### + +No open source ETL or EAI solution comes close to [Talend Open Studio][12] in functionality, performance, or support of modern integration trends. This year Talend unleashed Open Studio 6, a new version with a streamlined UI and smarter tooling that brings it more in line with Talend’s cloud-based offering. + +Using Open Studio you can visually design, test, and debug orchestrations that connect, transform, and synchronize data across a broad range of real-time applications and data resources. Talend’s wealth of connectors provides support for most any endpoint -- from flat files to Hadoop to Amazon S3. Packaged editions focus on specific scenarios such as big data integration, ESB, and data integrity monitoring. + +New support for Java 8 brings a speed boost. The addition of support for MariaDB and for in-memory processing with MemSQL, as well as updates to the ESB engine, keep Talend in step with the community’s needs. Version 6 was a long time coming, but no less welcome for that. Talend Open Studio is still first in managing complex data integration -- in-house, in the cloud, or increasingly, a combination of the two. + +-- James R. Borck + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-warewolf-100614683-orig.jpg) + +### Warewolf ESB ### + +Complex integration patterns may demand the strengths of a Talend to get the job done. But for many lightweight microservices, the overhead of a full-fledged enterprise integration solution is extreme overkill. + +[Warewolf ESB][13] combines a streamlined .Net-based process engine with visual development tools to provide for dead simple messaging and application payload routing in a native Windows environment. The Warewolf ESB is an “easy service bus,” not an enterprise service bus. + +Drag-and-drop tooling in the design studio makes quick work of configuring connections and logic flows. Built-in wizardry handles Web services definitions and database calls, and it can even tap Windows DLLs and the command line directly. Using the visual debugger, you can inspect execution streams (if not yet actually step through them), then package everything for remote deployment. + +Warewolf is still a .40.5 release and undergoing major code changes. It also lacks native connectors, easy transforms, and any means of scalability management. Be aware that the precompiled install demands collection of some usage statistics (I wish they would stop that). But Warewolf ESB is fast, free, and extensible. It’s a quirky, upstart project that offers definite benefits to Windows integration architects. + +-- James R. Borck + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-knime-100614674-orig.jpg) + +### KNIME ### + +[KNIME][14] takes a code-free approach to predictive analytics. Using a graphical workbench, you wire together workflows from an abundant library of processing nodes, which handle data access, transformation, analysis, and visualization. With KNIME, you can pull data from databases and big data platforms, run ETL transformations, perform data mining with R, and produce custom reports in the end. + +The company was busy this year rolling out the KNIME 2.12 update. The new release introduces MongoDB support, XPath nodes with autoquery creation, and a new view controller (based on the D3 JavaScript library) that creates interactive data visualizations on the fly. It also includes additional statistical nodes and a REST interface (KNIME Server edition) that provides services-based access to workflows. + +KNIME’s core analytics engine is free open source. The company offers several fee-based extensions for clustering and collaboration. (A portion of your licensing fee actually funds the open source project.) KNIME Server (on-premise or cloud) ups the ante with security, collaboration, and workflow repositories -- all serving to inject analytics more productively throughout your business lines. + +-- James R. Borck + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-teiid-100614682-orig.jpg) + +### Teiid ### + +[Teiid][15] is a data virtualization system that allows applications to use data from multiple, heterogeneous data stores. Currently a JBoss project, Teiid is backed by years of development from MetaMatrix and a long history of addressing the data access needs of the largest enterprise environments. I even see [uses for Teiid in Hadoop and big data environments][16]. + +In essence, Teiid allows you to connect all of your data sources into a “virtual” mega data source. You can define caching semantics, transforms, and other “configuration not code” transforms to load from multiple data sources using plain old SQL, XQuery, or procedural queries. + +Teiid is primarily accessible through JBDC and has built-in support for Web services. Red Hat sells Teiid as [JBoss Data Virtualization][17]. + +-- Andrew C. Oliver + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-main-100614676-orig.jpg) + +### Read about more open source winners ### + +InfoWorld's Best of Open Source Awards for 2014 celebrate more than 100 open source projects, from the bottom of the stack to the top. Follow these links to more open source winners: + +[Bossie Awards 2015: The best open source applications][18] + +[Bossie Awards 2015: The best open source application development tools][19] + +[Bossie Awards 2015: The best open source big data tools][20] + +[Bossie Awards 2015: The best open source data center and cloud software][21] + +[Bossie Awards 2015: The best open source desktop and mobile software][22] + +[Bossie Awards 2015: The best open source networking and security software][23] + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2982622/open-source-tools/bossie-awards-2015-the-best-open-source-applications.html + +作者:[InfoWorld staff][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/InfoWorld-staff/ +[1]:http://xtuple.org/ +[2]:http://odoo.com/ +[3]:http://idempiere.org/ +[4]:http://suitecrm.com/ +[5]:http://salesagility.com/ +[6]:http://civicrm.org/ +[7]:https://www.mautic.org/ +[8]:http://www.orangehrm.com/ +[9]:http://libreoffice.org/ +[10]:http://www.bonitasoft.com/ +[11]:http://camunda.com/ +[12]:http://talend.com/ +[13]:http://warewolf.io/ +[14]:http://www.knime.org/ +[15]:http://teiid.jboss.org/ +[16]:http://www.infoworld.com/article/2922180/application-development/database-virtualization-or-i-dont-want-to-do-etl-anymore.html +[17]:http://www.jboss.org/products/datavirt/overview/ +[18]:http://www.infoworld.com/article/2982622/bossie-awards-2015-the-best-open-source-applications.html +[19]:http://www.infoworld.com/article/2982920/bossie-awards-2015-the-best-open-source-application-development-tools.html +[20]:http://www.infoworld.com/article/2982429/bossie-awards-2015-the-best-open-source-big-data-tools.html +[21]:http://www.infoworld.com/article/2982923/bossie-awards-2015-the-best-open-source-data-center-and-cloud-software.html +[22]:http://www.infoworld.com/article/2982630/bossie-awards-2015-the-best-open-source-desktop-and-mobile-software.html +[23]:http://www.infoworld.com/article/2982962/bossie-awards-2015-the-best-open-source-networking-and-security-software.html \ No newline at end of file diff --git a/sources/share/20151028 Bossie Awards 2015--The best open source big data tools.md b/sources/share/20151028 Bossie Awards 2015--The best open source big data tools.md new file mode 100644 index 0000000000..0cf65ea3a8 --- /dev/null +++ b/sources/share/20151028 Bossie Awards 2015--The best open source big data tools.md @@ -0,0 +1,287 @@ +Bossie Awards 2015: The best open source big data tools +================================================================================ +InfoWorld's top picks in distributed data processing, streaming analytics, machine learning, and other corners of large-scale data analytics + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-big-data-100613944-orig.jpg) + +### The best open source big data tools ### + +How many Apache projects can sit on a pile of big data? Fire up your Hadoop cluster, and you might be able to count them. Among this year's Bossies in big data, you'll find the fastest, widest, and deepest newfangled solutions for large-scale SQL, stream processing, sort-of stream processing, and in-memory analytics, not to mention our favorite maturing members of the Hadoop ecosystem. It seems everyone has a nail to drive into MapReduce's coffin. + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-spark-100613962-orig.jpg) + +### Spark ### + +With hundreds of contributors, [Spark][1] is one of the most active and fastest-growing Apache projects, and with heavyweights like IBM throwing their weight behind the project and major corporations bringing applications into large-scale production, the momentum shows no signs of letting up. + +The sweet spot for Spark continues to be machine learning. Highlights since last year include the replacement of the SchemaRDD with a Dataframes API, similar to those found in R and Pandas, making data access much simpler than with the raw RDD interface. Also new are ML pipelines for building repeatable machine learning workflows, expanded and optimized support for various storage formats, simpler interfaces to machine learning algorithms, improvements in the display of cluster resources usage, and task tracking. + +On by default in Spark 1.5 is the off-heap memory manager, Tungsten, which offers much faster processing by fine-tuning data structure layout in memory. Finally, the new website, [spark-packages.org][2], with more than 100 third-party libraries, adds many useful features from the community. + +-- Steven Nunez + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-storm-100614149-orig.jpg) + +### Storm ### + +[Apache Storm][3] is a Clojure-based distributed computation framework primarily for streaming real-time analytics. Storm is based on the [disruptor pattern][4] for low-latency complex event processing created LMAX. Unlike Spark, Storm can do single events as opposed to “micro-batches,” and it has a lower memory footprint. In my experience, it scales better for streaming, especially when you’re mainly streaming to ingest data into other data sources. + +Storm’s profile has been eclipsed by Spark, but Spark is inappropriate for many streaming applications. Storm is frequently used with Apache Kafka. + +-- Andrew C. Oliver + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-h2o-100613950-orig.jpg) + +### H2O ### + +[H2O][5] is a distributed, in-memory processing engine for machine learning that boasts an impressive array of algorithms. Previously only available for R users, version 3.0 adds Python and Java language bindings, as well as a Spark execution engine for the back end. The best way to view H20 is as a very large memory extension of your R environment. Instead of working directly on large data sets, the R extensions communicate via a REST API with the H2O cluster, where H2O does the heavy lifting. + +Several useful R packages such as ddply have been wrapped, allowing you to use them on data sets larger than the amount of RAM on the local machine. You can run H2O on EC2, on a Hadoop/YARN cluster, and on Docker containers. With Sparkling Water (Spark plus H2O) you can access Spark RDDs on the cluster side by side to, for example, process a data frame with Spark before passing it to an H2O machine learning algorithm. + +-- Steven Nunez + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-apex-100613943-orig.jpg) + +### Apex ### + +[Apex][6] is an enterprise-grade, big data-in-motion platform that unifies stream processing as well as batch processing. A native YARN application, Apex processes streaming data in a scalable, fault-tolerant manner and provides all the common stream operators out of the box. One of the best things about Apex is that it natively supports the common event processing guarantees (exactly once, at least once, at most once). Formerly a commercial product by DataTorrent, Apex's roots show in the quality of the documentation, examples, code, and design. Devops and application development are cleanly separated, and user code generally doesn't have to be aware that it is running in a streaming cluster. + +A related project, [Malhar][7], offers more than 300 commonly used operators and application templates that implement common business logic. The Malhar libraries significantly reduce the time it takes to develop an Apex application, and there are connectors (operators) for storage, file systems, messaging systems, databases, and nearly anything else you might want to connect to from an application. The operators can all be extended or customized to meet individual business's requirements. All Malhar components are available under the Apache license. + +-- Steven Nunez + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-druid-100613947-orig.jpg) + +### Druid ### + +[Druid][8], which moved to a commercially friendly Apache license in February of this year, is best described as a hybrid, “event streams meet OLAP” solution. Originally developed to analyze online events for ad markets, Druid allows users to do arbitrary and interactive exploration of time series data. Some of the key features include low-latency ingest of events, fast aggregations, and approximate and exact calculations. + +At the heart of Druid is a custom data store that uses specialized nodes to handle each part of the problem. Real-time ingest is managed by real-time nodes (JVMs) that eventually flush data to historical nodes that are responsible for data that has aged. Broker nodes direct queries in a scatter-gather fashion to both real-time and historical nodes to give the user a complete picture of events. Benchmarked at a sustained 500K events per second and 1 million events per second peak, Druid is ideal as a real-time dashboard for ad-tech, network traffic, and other activity streams. + +-- Steven Nunez + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-flink-100613949-orig.jpg) + +### Flink ### + +At its core, [Flink][9] is a data flow engine for event streams. Although superficially similar to Spark, Flink takes a different approach to in-memory processing. First, Flink was designed from the start as a stream processor. Batch is simply a special case of a stream with a beginning and an end, and Flink offers APIs for dealing with each case, the DataSet API (batch) and the DataStream API. Developers coming from the MapReduce world should feel right at home working with the DataSet API, and porting applications to Flink should be straightforward. In many ways Flink mirrors the simplicity and consistency that helped make Spark so popular. Like Spark, Flink is written in Scala. + +The developers of Flink clearly thought out usage and operations too: Flink works natively with YARN and Tez, and it uses an off-heap memory management scheme to work around some of the JVM limitations. A peek at the Flink JIRA site shows a healthy pace of development, and you’ll find an active community on the mailing lists and on StackOverflow as well. + +-- Steven Nunez + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-elastic-100613948-orig.jpg) + +### Elasticsearch ### + +[Elasticsearch][10] is a distributed document search server based on [Apache Lucene][11]. At its heart, Elasticsearch builds indices on JSON-formatted documents in nearly real time, enabling fast, full-text, schema-free queries. Combined with the open source Kibana dashboard, you can create impressive visualizations of your real-time data in a simple point-and-click fashion. + +Elasticsearch is easy to set up and easy to scale, automatically making use of new hardware by rebalancing shards as required. The query syntax isn't at all SQL-like, but it is intuitive enough for anyone familiar with JSON. Most users won't be interacting at that level anyway. Developers can use the native JSON-over-HTTP interface or one of the several language bindings available, including Ruby, Python, PHP, Perl, .Net, Java, and JavaScript. + +-- Steven Nunez + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-slamdata-100613961-orig.jpg) + +### SlamData ### + +If you are seeking a user-friendly tool to visualize and understand your newfangled NoSQL data, take a look at [SlamData][12]. SlamData allows you to query nested JSON data using familiar SQL syntax, without relocation or transformation. + +One of the technology’s main features is its connectors. From MongoDB to HBase, Cassandra, and Apache Spark, SlamData taps external data sources with the industry's most advanced “pushdown” processing technology, performing transformations and analytics close to the data. + +While you might ask, “Wouldn’t I be better off building a data lake or data warehouse?” consider the companies that were born in NoSQL. Skipping the ETL and simply connecting a visualization tool to a replica offers distinct advantages -- not only in terms of how up-to-date the data is, but in how many moving parts you have to maintain. + +-- Andrew C. Oliver + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-drill-100613946-orig.jpg) + +### Drill ### + +[Drill][13] is a distributed system for interactive analysis of large-scale data sets, inspired by [Google's Dremel][14]. Designed for low-latency analysis of nested data, Drill has a stated design goal of scaling to 10,000 servers and querying petabytes of data and trillions of records. + +Nested data can be obtained from a variety of data sources (such as HDFS, HBase, Amazon S3, and Azure Blobs) and in multiple formats (including JSON, Avro, and protocol buffers), and you don't need to specify a schema up front (“schema on read”). + +Drill uses ANSI SQL:2003 for its query language, so there's no learning curve for data engineers to overcome, and it allows you to join data across multiple data sources (for example, joining a table in HBase with logs in HDFS). Finally, Drill offers ODBC and JDBC interfaces to connect your favorite BI tools. + +-- Steven Nunez + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-hbase-100613951-orig.jpg) + +### HBase ### + +[HBase][15] reached the 1.x milestone this year and continues to improve. Like other nonrelational distributed datastores, HBase excels at returning search results very quickly and for this reason is often used to back search engines, such as the ones at eBay, Bloomberg, and Yahoo. As a stable and mature software offering, HBase does not get fresh features as frequently as newer projects, but that's often good for enterprises. + +Recent improvements include the addition of high-availability region servers, support for rolling upgrades, and YARN compatibility. Features in the works include scanner updates that promise to improve performance and the ability to use HBase as a persistent store for streaming applications like Storm and Spark. HBase can also be queried SQL style via the [Phoenix][16] project, now out of incubation, whose SQL compatibility is steadily improving. Phoenix recently added a Spark connector and the ability to add custom user-defined functions. + +-- Steven Nunez + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-hive-100613952-orig.jpg) + +### Hive ### + +Although stable and mature for several years, [Hive][17] reached the 1.0 version milestone this year and continues to be the best solution when really heavy SQL lifting (many petabytes) is required. The community continues to focus on improving the speed, scale, and SQL compliance of Hive. Currently at version 1.2, significant improvements since its last Bossie include full ACID semantics, cross-data center replication, and a cost-based optimizer. + +Hive 1.2 also brought improved SQL compliance, making it easier for organizations to use it to off-load ETL jobs from their existing data warehouses. In the pipeline are speed improvements with an in-memory cache called LLAP (which, from the looks of the JIRAs, is about ready for release), the integration of Spark machine learning libraries, and improved SQL constructs like nonequi joins, interval types, and subqueries. + +-- Steven Nunez + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-kylin-100613955-orig.jpg) + +### Kylin ### + +[Kylin][18] is an application developed at eBay for processing very large OLAP cubes via ANSI SQL, a task familiar to most data analysts. If you think about how many items are on sale now and in the past at eBay, and all the ways eBay might want to slice and dice data related to those items, you will begin to understand the types of queries Kylin was designed for. + +Like most other analysis applications, Kylin supports multiple access methods, including JDBC, ODBC, and a REST API for programmatic access. Although Kylin is still in incubation at Apache, and the community nascent, the project is well documented and the developers are responsive and eager to understand customer use cases. Getting up and running with a starter cube was a snap. If you have a need for analysis of extremely large cubes, you should take a look at Kylin. + +-- Steven Nunez + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-cdap-100613945-orig.jpg) + +### CDAP ### + +[CDAP][19] (Cask Data Access Platform) is a framework running on top of Hadoop that abstracts away the complexity of building and running big data applications. CDAP is organized around two core abstractions: data and applications. CDAP Datasets are logical representations of data that behave uniformly regardless of the underlying storage layer; CDAP Streams provide similar support for real-time data. + +Applications use CDAP services for things such as distributed transactions and service discovery to shield developers from the low-level details of Hadoop. CDAP comes with a data ingestion framework and a few prebuilt applications and “packs” for common tasks like ETL and website analytics, along with support for testing, debugging, and security. Like most formerly commercial (closed source) projects, CDAP benefits from good documentation, tutorials, and examples. + +-- Steven Nunez + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-ranger-100613960-orig.jpg) + +### Ranger ### + +Security has long been a sore spot with Hadoop. It isn’t (as is frequently reported) that Hadoop is “insecure” or “has no security.” Rather, the truth was more that Hadoop had too much security, though not in a good way. I mean that every component had its own authentication and authorization implementation that wasn’t integrated with the rest of platform. + +Hortonworks acquired XA/Secure in May, and [a few renames later][20] we have [Ranger][21]. Ranger pulls many of the key components of Hadoop together under one security umbrella, allowing you to set a “policy” that ties your Hadoop security to your existing ACL-based Active Directory authentication and authorization. Ranger gives you one place to manage Hadoop access control, one place to audit, one place to manage the encryption, and a pretty Web page to do it from. + +-- Andrew C. Oliver + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-mesos-100613957-orig.jpg) + +### Mesos ### + +[Mesos][22], developed at the [AMPLab][23] at U.C. Berkeley that also brought us Spark, takes a different approach to managing cluster computing resources. The best way to describe Mesos is as a distributed microkernel for the data center. Mesos provides a minimal set of operating system mechanisms like inter-process communications, disk access, and memory to higher-level applications, called “frameworks” in Mesos-speak, that run in what is analogous to user space. Popular frameworks for Mesos include [Chronos][24] and [Aurora][25] for building ETL pipelines and job scheduling, and a few big data processing applications including Hadoop, Storm, and Spark, which have been ported to run as Mesos frameworks. + +Mesos applications (frameworks) negotiate for cluster resources using a two-level scheduling mechanism, so writing a Mesos application is unlikely to feel like a familiar experience to most developers. Although Mesos is a young project, momentum is growing, and with Spark being an exceptionally good fit for Mesos, we're likely to see more from Mesos in the coming years. + +-- Steven Nunez + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-nifi-100613958-orig.jpg) + +### NiFi ### + +[NiFi][26] is an incubating Apache project to automate the flow of data between systems. It doesn't operate in the traditional space that Kafka and Storm do, but rather in the space between external devices and the data center. NiFi was originally developed by the NSA and donated to the open source community in 2014. It has a strong community of developers and users within various government agencies. + +NiFi isn't like anything else in the current big data ecosystem. It is much closer to a tradition EAI (enterprise application integration) tool than a data processing platform, although simple transformations are possible. One interesting feature is the ability to debug and change data flows in real time. Although not quite a REPL (read, eval, print loop), this kind of paradigm dramatically shortens the development cycle by not requiring a compile-deploy-test-debug workflow. Other interesting features include a strong “chain of custody,” where each piece of data can be tracked from beginning to end, along with any changes made along the way. You can also prioritize data flows so that time-sensitive information can be received as quickly as possible, bypassing less time-critical events. + +-- Steven Nunez + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-kafka-100613954-orig.jpg) + +### Kafka ### + +[Kafka][27] has emerged as the de-facto standard for distributed publish-subscribe messaging in the big data space. Its design allows brokers to support thousands of clients at high rates of sustained message throughput, while maintaining durability through a distributed commit log. Kafka does this by maintaining what is essentially a single log file in HDFS. Since HDFS is a distributed storage system that keeps redundant copies, Kafka is protected. + +When consumers want to read messages, Kafka looks up their offset in the central log and sends them. Because messages are not deleted immediately, adding consumers or replaying historical messages does not impose additional costs. Kafka has been benchmarked at 2 million writes per second by its developers at LinkedIn. Despite Kafka’s sub-1.0 version number, Kafka is a mature and stable product, in use in some of the largest clusters in the world. + +-- Steven Nunez + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-opentsdb-100613959-orig.jpg) + +### OpenTSDB ### + +[OpenTSDB][28] is a time series database built on HBase. It was designed specifically for analyzing data collected from applications, mobile devices, networking equipment, and other hardware devices. The custom HBase schema used to store the time series data has been designed for fast aggregations and minimal storage requirements. + +By using HBase as the underlying storage layer, OpenTSDB gains the distributed and reliable characteristics of that system. Users don't interact with HBase directly; instead events are written to the system via the time series daemon (TSD), which can be scaled out as required to handle high-throughput situations. There are a number of prebuilt connectors to publish data to OpenTSDB, and clients to read data from Ruby, Python, and other languages. OpenTSDB isn't strong on creating interactive graphics, but several third-party tools fill that gap. If you are already using HBase and want a simple way to store event data, OpenTSDB might be just the thing. + +-- Steven Nunez + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-jupyter-100613953-orig.jpg) + +### Jupyter ### + +Everybody's favorite notebook application went generic. [Jupyter][29] is “the language-agnostic parts of IPython” spun out into an independent package. Although Jupyter itself is written in Python, the system is modular. Now you can have an IPython-like interface, along with notebooks for sharing code, documentation, and data visualizations, for nearly any language you like. + +At least [50 language][30] kernels are already supported, including LISP, R, Ruby, F#, Perl, and Scala. In fact, even IPython itself is simply a Python module for Jupyter. Communication with the language kernel is via a REPL (read, eval, print loop) protocol, similar to [nREPL][31] or [Slime][32]. It is nice to see such a useful piece of software receiving significant [nonprofit funding][33] to further its development, such as parallel execution and multi-user notebooks. Behold, open source at its best. + +-- Steven Nunez + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-zeppelin-100613963-orig.jpg) + +### Zeppelin ### + +While still in incubation, [Apache Zeppelin][34] is nevertheless stirring the data analytics and visualization pot. The Web-based notebook enables users to ingest, discover, analyze, and visualize their data. The notebook also allows you to collaborate with others to make data-driven, interactive documents incorporating a growing number of programming languages. + +This technology also boasts an integration with Spark and an interpreter concept allowing any language or data processing back end to be plugged into Zeppelin. Currently Zeppelin supports interpreters such as Scala, Python, SparkSQL, Hive, Markdown, and Shell. + +Zeppelin is still immature. I wanted to put a demo up but couldn’t find an easy way to disable “shell” as an execution option (among other things). However, it already looks better visually than IPython Notebook, which is the popular incumbent in this space. If you don’t want to spring for DataBricks Cloud or need something open source and extensible, this is the most promising distributed computing notebook around -- especially if you’re a Sparky type. + +-- Andrew C. Oliver + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-main-100613956-orig.jpg) + +### Read about more open source winners ### + +InfoWorld's Best of Open Source Awards for 2014 celebrate more than 100 open source projects, from the bottom of the stack to the top. Follow these links to more open source winners: + +[Bossie Awards 2015: The best open source applications][35] + +[Bossie Awards 2015: The best open source application development tools][36] + +[Bossie Awards 2015: The best open source big data tools][37] + +[Bossie Awards 2015: The best open source data center and cloud software][38] + +[Bossie Awards 2015: The best open source desktop and mobile software][39] + +[Bossie Awards 2015: The best open source networking and security software][40] + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2982429/open-source-tools/bossie-awards-2015-the-best-open-source-big-data-tools.html + +作者:[InfoWorld staff][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/InfoWorld-staff/ +[1]:https://spark.apache.org/ +[2]:http://spark-packages.org/ +[3]:https://storm.apache.org/ +[4]:https://lmax-exchange.github.io/disruptor/ +[5]:http://h2o.ai/product/ +[6]:https://www.datatorrent.com/apex/ +[7]:https://github.com/DataTorrent/Malhar +[8]:https://druid.io/ +[9]:https://flink.apache.org/ +[10]:https://www.elastic.co/products/elasticsearch +[11]:http://lucene.apache.org/ +[12]:http://teiid.jboss.org/ +[13]:https://drill.apache.org/ +[14]:http://research.google.com/pubs/pub36632.html +[15]:http://hbase.apache.org/ +[16]:http://phoenix.apache.org/ +[17]:https://hive.apache.org/ +[18]:https://kylin.incubator.apache.org/ +[19]:http://cdap.io/ +[20]:http://www.infoworld.com/article/2973381/application-development/apache-ranger-chuck-norris-hadoop-security.html +[21]:https://ranger.incubator.apache.org/ +[22]:http://mesos.apache.org/ +[23]:https://amplab.cs.berkeley.edu/ +[24]:http://nerds.airbnb.com/introducing-chronos/ +[25]:http://aurora.apache.org/ +[26]:http://nifi.apache.org/ +[27]:https://kafka.apache.org/ +[28]:http://opentsdb.net/ +[29]:http://jupyter.org/ +[30]:http://https//github.com/ipython/ipython/wiki/IPython-kernels-for-other-languages +[31]:https://github.com/clojure/tools.nrepl +[32]:https://github.com/slime/slime +[33]:http://blog.jupyter.org/2015/07/07/jupyter-funding-2015/ +[34]:https://zeppelin.incubator.apache.org/ +[35]:http://www.infoworld.com/article/2982622/bossie-awards-2015-the-best-open-source-applications.html +[36]:http://www.infoworld.com/article/2982920/bossie-awards-2015-the-best-open-source-application-development-tools.html +[37]:http://www.infoworld.com/article/2982429/bossie-awards-2015-the-best-open-source-big-data-tools.html +[38]:http://www.infoworld.com/article/2982923/bossie-awards-2015-the-best-open-source-data-center-and-cloud-software.html +[39]:http://www.infoworld.com/article/2982630/bossie-awards-2015-the-best-open-source-desktop-and-mobile-software.html +[40]:http://www.infoworld.com/article/2982962/bossie-awards-2015-the-best-open-source-networking-and-security-software.html \ No newline at end of file diff --git a/sources/share/20151028 Bossie Awards 2015--The best open source data center and cloud software.md b/sources/share/20151028 Bossie Awards 2015--The best open source data center and cloud software.md new file mode 100644 index 0000000000..5640c75137 --- /dev/null +++ b/sources/share/20151028 Bossie Awards 2015--The best open source data center and cloud software.md @@ -0,0 +1,261 @@ +Bossie Awards 2015: The best open source data center and cloud software +================================================================================ +InfoWorld's top picks of the year in open source platforms, infrastructure, management, and orchestration software + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-data-center-cloud-100613986-orig.jpg) + +### The best open source data center and cloud software ### + +You might have heard about this new thing called Docker containers. Developers love them because you can build them with a script, add services in layers, and push them right from your MacBook Pro to a server for testing. It works because they're superlightweight, unlike those now-archaic virtual machines. Containers -- and other lightweight approaches to deliver services -- are changing the shape of operating systems, applications, and the tools to manage them. Our Bossie winners in data center and cloud are leading the charge. + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-docker-100613987-orig.jpg) + +### Docker Machine, Compose, and Swarm ### + +Docker’s open source container technology has been adopted by the major public clouds and is being built into the next version of Windows Server. Allowing developers and operations teams to separate applications from infrastructure, Docker is a powerful data center automation tool. + +However, containers are only part of the Docker story. Docker also provides a series of tools that allow you to use the Docker API to automate the entire container lifecycle, as well as handling application design and orchestration. + +[Machine][1] allows you to automate the provisioning of Docker Containers. Starting with a command line, you can use a single line of code to target one or more hosts, deploy the Docker engine, and even join it to a Swarm cluster. There’s support for most hypervisors and cloud platforms – all you need are your access credentials. + +[Swarm][2] handles clustering and scheduling, and it can be integrated with Mesos for more advanced scheduling capabilities. You can use Swarm to build a pool of container hosts, allowing your apps to scale out as demand increases. Applications and all of their dependencies can be defined with [Compose][3], which lets you link containers together into a distributed application and launch them as a group. Compose descriptions work across platforms, so you can take a developer configuration and quickly deploy in production. + +-- Simon Bisson + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-coreos-rkt-100613985-orig.jpg) + +### CoreOS and Rkt ### + +A thin, lightweight server OS, [CoreOS][4] is based on Google’s Chromium OS. Instead of using a package manager to install functions, it’s designed to be used with Linux containers. By using containers to extend a thin core, CoreOS allows you to quickly deploy applications, working well on cloud infrastructures. + +CoreOS’s container management tooling, fleet, is designed to treat a cluster of CoreOS servers as a single unit, with tools for managing high availability and for deploying containers to the cluster based on resource availability. A cross-cluster key/value store, etcd, handles device management and supports service discovery. If a node fails, etcd can quickly restore state on a new replica, giving you a distributed configuration management platform that’s linked to CoreOS’s automated update service. + +While CoreOS is perhaps best known for its Docker support, the CoreOS team is developing its own container runtime, rkt, with its own container format, the App Container Image. Also compatible with Docker containers, rkt has a modular architecture that allows different containerization systems (even hardware virtualization, in a proof of concept from Intel) to be plugged in. However, rkt is still in the early stages of development, so isn’t quite production ready. + +-- Simon Bisson + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-rancheros-100613997-orig.jpg) + +### RancherOS ### + +As we abstract more and more services away from the underlying operating system using containers, we can start thinking about what tomorrow’s operating system will look like. Similar to our applications, it’s going to be a modular set of services running on a thin kernel, self-configuring to offer only the services our applications need. + +[RancherOS][5] is a glimpse of what that OS might look like. Blending the Linux kernel with Docker, RancherOS is a minimal OS suitable for hosting container-based applications in cloud infrastructures. Instead of using standard Linux packaging techniques, RancherOS leverages Docker to host Linux user-space services and applications in separate container layers. A low-level Docker instance is first to boot, hosting system services in their own containers. Users' applications run in a higher-level Docker instance, separate from the system containers. If one of your containers crashes, the host keeps running. + +RancherOS is only 20MB in size, so it's easy to replicate across a data center. It’s also designed to be managed using automation tools, not manually, with API-level access that works with Docker’s management tools as well as with Rancher Labs’ own cloud infrastructure and management tools. + +-- Simon Bisson + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-kubernetes-100613991-orig.jpg) + +### Kubernetes ### + +Google’s [Kubernetes][6] container orchestration system is designed to manage and run applications built in Docker and Rocket containers. Focused on managing microservice applications, Kubernetes lets you distribute your containers across a cluster of hosts, while handling scaling and ensuring managed services run reliably. + +With containers providing an application abstraction layer, Kubernetes is an application-centric management service that supports many modern development paradigms, with a focus on user intent. That means you launch applications, and Kubernetes will manage the containers to run within the parameters you set, using the Kubernetes scheduler to make sure it gets the resources it needs. Containers are grouped into pods and managed by a replication engine that can recover failed containers or add more pods as applications scale. + +Kubernetes powers Google’s own Container Engine, and it runs on a range of other cloud and data center services, including AWS and Azure, as well as vSphere and Mesos. Containers can be either loosely or tightly coupled, so applications not designed for cloud PaaS operations can be migrated to the cloud as a tightly coupled set of containers. Kubernetes also supports rapid deployment of applications to a cluster, giving you an endpoint for a continuous delivery process. + +-- Simon Bisson + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-mesos-100613993-orig.jpg) + +### Mesos ### + +Turning a data center into a private or public cloud requires more than a hypervisor. It requires a new operating layer that can manage the data center resources as if they were a single computer, handling resources and scheduling. Described as a “distributed systems kernel,” [Apache Mesos][7] allows you to manage thousands of servers, using containers to host applications and APIs to support parallel application development. + +At the heart of Mesos is a set of daemons that expose resources to a central scheduler. Tasks are distributed across nodes, taking advantage of available CPU and memory. One key approach is the ability for applications to reject offered resources if they don’t meet requirements. It’s an approach that works well for big data applications, and you can use Mesos to run Hadoop and Cassandra distributed databases, as well as Apache’s own Spark data processing engine. There’s also support for the Jenkins continuous integration server, allowing you to run build and test workers in parallel on a cluster of servers, dynamically adjusting the tasks depending on workload. + +Designed to run on Linux and Mac OS X, Mesos has also recently been ported to Windows to support the development of scalable parallel applications on Azure. + +-- Simon Bisson + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-smartos-100614849-orig.jpg) + +### SmartOS and SmartDataCenter ### + +Joyent’s [SmartDataCenter][8] is the software that runs its public cloud, adding a management platform on top of its [SmartOS][9] thin server OS. A descendent of OpenSolaris that combines Zones containers and the KVM hypervisor, SmartOS is an in-memory operating system, quick to boot from a USB stick and run on bare-metal servers. + +Using SmartOS, you can quickly deploy a set of lightweight servers that can be programmatically managed via a set of JSON APIs, with functionality delivered via virtual machines, downloaded by built-in image management tools. Through the use of VMs, all userland operations are isolated from the underlying OS, reducing the security exposure of both the host and guests. + +SmartDataCenter runs on SmartOS servers, with one server running as a dedicated management node, and the rest of a cluster operating as compute nodes. You can get started with a Cloud On A Laptop build (available as a VMware virtual appliance) that lets you experiment with the management server. In a live data center, you’ll deploy SmartOS on your servers, using ZFS to handle storage – which includes your local image library. Services are deployed as images, with components stored in an object repository. + +The combination of SmartDataCenter and SmartOS builds on the experience of Joyent’s public cloud, giving you a tried and tested set of tools that can help you bootstrap your own cloud data center. It’s an infrastructure focused on virtual machines today, but laying the groundwork for tomorrow. A related Joyent project, [sdc-docker][10], exposes an entire SmartDataCenter cluster as a single Docker host, driven by native Docker commands. + +-- Simon Bisson + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-sensu-100614850-orig.jpg) + +### Sensu ### + +Managing large-scale data centers isn’t about working with server GUIs, it’s about automating scripts based on information from monitoring tools and services, routing information from sensors and logs, and then delivering actions to applications. One tool that’s beginning to offer this functionality is [Sensu][11], often described as a “monitoring router.” + +Scripts running across your data center deliver information to Sensu, which then routes it to the appropriate handler, using a publish-and-subscribe architecture based on RabbitMQ. Servers can be distributed, delivering published check results to handler code. You might see results in email, or in a Slack room, or in Sensu’s own dashboards. Message formats are defined in JSON files, or mutators used to format data on the fly, and messages can be filtered to one or more event handlers. + +Sensu is still a relatively young tool, but it’s one that shows a lot of promise. If you’re going to automate your data center, you’re going to need a tool like this not only to show you what’s happening, but to deliver that information where it’s most needed. A commercial option adds support for integration with third-party applications, but much of what you need to manage a data center is in the open source release. + +-- Simon Bisson + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-prometheus-100613996-orig.jpg) + +### Prometheus ### + +Managing a modern data center is a complex task. Racks of servers need to be treated like cattle rather than pets, and you need a monitoring system designed to handle hundreds and thousands of nodes. Monitoring applications presents special challenges, and that’s where [Prometheus][12] comes in to play. A service monitoring system designed to deliver alerts to operators, Prometheus can run on everything from a single laptop to a highly available cluster of monitoring servers. + +Time series data is captured and stored, then compared against patterns to identify faults and problems. You’ll need to expose data on HTTP endpoints, using a YAML file to configure the server. A browser-based reporting tool handles displaying data, with an expression console where you can experiment with queries. Dashboards can be created with a GUI builder, or written using a series of templates, letting you deliver application consoles that can be managed using version control systems such as Git. + +Captured data can be managed using expressions, which make it easy to aggregate data from several sources -- for example, letting you bring performance data from a series of Web endpoints into one store. An experimental alert manager module delivers alerts to common collaboration and devops tools, including Slack and PagerDuty. Official client libraries for common languages like Go and Java mean it’s easy to add Prometheus support to your applications and services, while third-party options extend Prometheus to Node.js and .Net. + +-- Simon Bisson + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-elk-100613988-orig.jpg) + +### Elasticsearch, Logstash, and Kibana ### + +Running a modern data center generates a lot of data, and it requires tools to get information out of that data. That’s where the combination of Elasticsearch, Logstash, and Kibana, often referred to as the ELK stack, comes into play. + +Designed to handle scalable search across a mix of content types, including structured and unstructured documents, [Elasticsearch][13] builds on Apache’s Lucene information retrieval tools, with a RESTful JSON API. It’s used to provide search for sites like Wikipedia and GitHub, using a distributed index with automated load balancing and routing. + +Under the fabric of a modern cloud is a physical array of servers, running as VM hosts. Monitoring many thousands of servers needs centralized logs. [Logstash][14] harvests and filters the logs generated by those servers (and by the applications running on them), using a forwarder on each physical and virtual machine. Logstash-formatted data is then delivered to Elasticsearch, giving you a search index that can be quickly scaled as you add more servers. + +At a higher level, [Kibana][15] adds a visualization layer to Elasticsearch, providing a Web dashboard for exploring and analyzing the data. Dashboards can be created around custom searches and shared with your team, providing a quick, easy-to-digest devops information feed. + +-- Simon Bisson + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-ansible-100613984-orig.jpg) + +### Ansible ### + +Managing server configuration is a key element of any devops approach to managing a modern data center or a cloud infrastructure. Configuration management tooling that takes a desired state approach to simplifies systems management at cloud scale, using server and application descriptions to handle server and application deployment. + +[Ansible][16] offers a minimal management service, using SSH to manage Unix nodes and PowerShell to work with Windows servers, with no need to deploy agents. An Ansible Playbook describes the state of a server or service in YAML, deploying Ansible modules to servers that handle configuration and removing them once the service is running. You can use Playbooks to orchestrate tasks -- for example, deploying several Web endpoints with a single script. + +It’s possible to make module creation and Playbook delivery part of a continuous delivery process, using build tools to deliver configurations and automate deployment. Ansible can pull in information from cloud service providers, simplifying management of virtual machines and networks. Monitoring tools in Ansible are able to trigger additional deployments automatically, helping manage and control cloud services, as well as working to manage resources used by large-scale data platforms like Hadoop. + +-- Simon Bisson + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-jenkins-100613990-orig.jpg) + +### Jenkins ### + +Getting continuous delivery right requires more than a structured way of handling development; it also requires tools for managing test and build. That’s where the [Jenkins][17] continuous integration server comes in. Jenkins works with your choice of source control, your test harnesses, and your build server. It’s a flexible tool, initially designed for working with Java but now extended to support Web and mobile development and even to build Windows applications. + +Jenkins is perhaps best thought of as a switching network, shunting files through a test and build process, and responding to signals from the various tools you’re using – thanks to a library of more than 1,000 plug-ins. These include tools for integrating Jenkins with both local Git instances and GitHub so that it's possible to extend a continuous development model into your build and delivery processes. + +Using an automation tool like Jenkins is as much about adopting a philosophy as it is about implementing a build process. Once you commit to continuous integration as part of a continuous delivery model, you’ll be running test and build cycles as soon as code is delivered to your source control release branch – and delivering it to users as soon as it’s in the main branch. + +-- Simon Bisson + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-nodejs-iojs-100613995-orig.jpg) + +### Node.js and io.js ### + +Modern cloud applications are built using different design patterns from the familiar n-tier enterprise and Web apps. They’re distributed, event-driven collections of services that can be quickly scaled and can support many thousands of simultaneous users. One key technology in this new paradigm is [Node.js][18], used by many major cloud platforms and easy to install as part of a thin server or container on cloud infrastructure. + +Key to the success of Node.js is the Npm package format, which allows you to quickly install extensions to the core Node.js service. These include frameworks like Express and Seneca, which help build scalable applications. A central registry handles package distribution, and dependencies are automatically installed. + +While the [io.js][19] fork exposed issues with project governance, it also allowed a group of developers to push forward adding ECMAScript 6 support to an Npm-compatible engine. After reconciliation between the two teams, the Node.js and io.js codebases have been merged, with new releases now coming from the io.js code repository. + +Other forks, like Microsoft’s io.js fork to add support for its 64-bit Chakra JavaScript engine alongside Google’s V8, are likely to be merged back into the main branch over the next year, keeping the Node.js platform evolving and cementing its role as the preferred host for cloud-scale microservices. + +-- Simon Bisson + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-seneca-100613998-orig.jpg) + +### Seneca ### + +The developers of the [Seneca][20] microservice framework have a motto: “Build it now, scale it later!” It’s an apt maxim for anyone thinking about developing microservices, as it allows you to start small, then add functionality as your service grows. + +Seneca is at heart an implementation of the [actor/message design pattern][21], focused on using Node.js as a switching engine that takes in messages, processes their contents, and sends an appropriate response, either to the message originator or to another service. By focusing on the message patterns that map to business use cases, it’s relatively easy to take Seneca and quickly build a minimum viable product for your application. A plug-in architecture makes it easy to integrate Seneca with other tools and to quickly add functionality to your services. + +You can easily add new patterns to your codebase or break existing patterns into separate services as the needs of your application grow or change. One pattern can also call another, allowing quick code reuse. It’s also easy to add Seneca to a message bus, so you can use it as a framework for working with data from Internet of things devices, as all you need to do is define a listening port where JSON data is delivered. + +Services may not be persistent, and Seneca gives you the option of using a built-in object relational mapping layer to handle data abstraction, with plug-ins for common databases. + +-- Simon Bisson + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-netcore-aspnet-100613994-orig.jpg) + +### .Net Core and ASP.Net vNext ### + +Microsoft’s [open-sourcing of .Net][22] is bringing much of the company’s Web platform into the open. The new [.Net Core][23] release runs on Windows, on OS X, and on Linux. Currently migrating from Microsoft’s Codeplex repository to GitHub, .Net Core offers a more modular approach to .Net, allowing you to install the functions you need as you need them. + +Currently under development is [ASP.Net 5][24], an open source version of the Web platform, which runs on .Net Core. You can work with it as the basis of Web apps using Microsoft’s MVC 6 framework. There’s also support for the new SignalR libraries, which add support for WebSockets and other real-time communications protocols. + +If you’re planning on using Microsoft’s new Nano server, you’ll be writing code against .Net Core, as it’s designed for thin environments. The new DNX, the .Net Execution environment, simplifies deployment of ASP.Net applications on a wide range of platforms, with tools for packaging code and for booting a runtime on a host. Features are added using the NuGet package manager, letting you use only the libraries you want. + +Microsoft’s open source .Net is still very young, but there’s a commitment in Redmond to ensure it’s successful. Support in Microsoft’s own next-generation server operating systems means it has a place in both the data center and the cloud. + +-- Simon Bisson + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-glusterfs-100613989-orig.jpg) + +### GlusterFS ### + +[GlusterFS][25] is a distributed file system. Gluster aggregates various storage servers into one large parallel network file system. You can [even use it in place of HDFS in a Hadoop cluster][26] or in place of an expensive SAN system -- or both. While HDFS is great for Hadoop, having a general-purpose distributed file system that doesn’t require you to transfer data to another location to analyze it is a key advantage. + +In an era of commoditized hardware, commoditized computing, and increased performance and latency requirements, buying a big, fat expensive EMC SAN and hoping it fits all of your needs (it won’t) is no longer your sole viable option. GlusterFS was acquired by Red Hat in 2011. + +-- Andrew C. Oliver + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-main-100613992-orig.jpg) + +### Read about more open source winners ### + +InfoWorld's Best of Open Source Awards for 2014 celebrate more than 100 open source projects, from the bottom of the stack to the top. Follow these links to more open source winners: + +[Bossie Awards 2015: The best open source applications][27] + +[Bossie Awards 2015: The best open source application development tools][28] + +[Bossie Awards 2015: The best open source big data tools][29] + +[Bossie Awards 2015: The best open source data center and cloud software][30] + +[Bossie Awards 2015: The best open source desktop and mobile software][31] + +[Bossie Awards 2015: The best open source networking and security software][32] + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2982923/open-source-tools/bossie-awards-2015-the-best-open-source-data-center-and-cloud-software.html + +作者:[InfoWorld staff][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/InfoWorld-staff/ +[1]:https://www.docker.com/docker-machine +[2]:https://www.docker.com/docker-swarm +[3]:https://www.docker.com/docker-compose +[4]:https://coreos.com/ +[5]:http://rancher.com/rancher-os/ +[6]:http://kubernetes.io/ +[7]:https://mesos.apache.org/ +[8]:https://github.com/joyent/sdc +[9]:https://smartos.org/ +[10]:https://github.com/joyent/sdc-docker +[11]:https://sensuapp.org/ +[12]:http://prometheus.io/ +[13]:https://www.elastic.co/products/elasticsearch +[14]:https://www.elastic.co/products/logstash +[15]:https://www.elastic.co/products/kibana +[16]:http://www.ansible.com/home +[17]:https://jenkins-ci.org/ +[18]:https://nodejs.org/en/ +[19]:https://iojs.org/en/ +[20]:http://senecajs.org/ +[21]:http://www.infoworld.com/article/2976422/application-development/how-to-use-actors-in-distributed-applications.html +[22]:http://www.infoworld.com/article/2846450/microsoft-net/microsoft-open-sources-server-side-net-launches-visual-studio-2015-preview.html +[23]:https://dotnet.github.io/core/ +[24]:http://www.asp.net/vnext +[25]:http://www.gluster.org/ +[26]:http://www.gluster.org/community/documentation/index.php/Hadoop +[27]:http://www.infoworld.com/article/2982622/bossie-awards-2015-the-best-open-source-applications.html +[28]:http://www.infoworld.com/article/2982920/bossie-awards-2015-the-best-open-source-application-development-tools.html +[29]:http://www.infoworld.com/article/2982429/bossie-awards-2015-the-best-open-source-big-data-tools.html +[30]:http://www.infoworld.com/article/2982923/bossie-awards-2015-the-best-open-source-data-center-and-cloud-software.html +[31]:http://www.infoworld.com/article/2982630/bossie-awards-2015-the-best-open-source-desktop-and-mobile-software.html +[32]:http://www.infoworld.com/article/2982962/bossie-awards-2015-the-best-open-source-networking-and-security-software.html \ No newline at end of file diff --git a/sources/share/20151028 Bossie Awards 2015--The best open source desktop and mobile software.md b/sources/share/20151028 Bossie Awards 2015--The best open source desktop and mobile software.md new file mode 100644 index 0000000000..83b2b24a2e --- /dev/null +++ b/sources/share/20151028 Bossie Awards 2015--The best open source desktop and mobile software.md @@ -0,0 +1,223 @@ +Bossie Awards 2015: The best open source desktop and mobile software +================================================================================ +InfoWorld's top picks in open source productivity tools, desktop utilities, and mobile apps + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-desktop-mobile-100614439-orig.jpg) + +### The best open source desktop and mobile software ### + +Open source on the desktop has a long and distinguished history, and many of our Bossie winners in this category go back many years. Packed with features and still improving, some of these tools offer compelling alternatives to pricey commercial software. Others are utilities that we lean on daily for one reason or another -- the can openers and potato peelers of desktop productivity. One or two of them either plug holes in Windows, or they go the distance where Windows falls short. + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-libreoffice-100614436-orig.jpg) + +### LibreOffice ### + +With the major release of version 5 in August, the Document Foundation’s [LibreOffice][1] offers a completely redesigned user interface, better compatibility with Microsoft Office (including good-but-not-great DOCX, XLSX, and PPTX file format support), and significant improvements to Calc, the spreadsheet application. + +Set against a turbulent background, the LibreOffice effort split from OpenOffice.org in 2010. In 2011, Oracle announced it would no longer support OpenOffice.org, and handed the trademark to the Apache Software Foundation. Since then, it has become [increasingly clear][2] that LibreOffice is winning the race for developers, features, and users. + +-- Woody Leonhard + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-firefox-100614426-orig.jpg) + +### Firefox ### + +In the battle of the big browsers, [Firefox][3] gets our vote over its longtime open source rival Chromium for two important reasons: + +• **Memory use**. Chromium, like its commercial cousin Chrome, has a nasty propensity to glom onto massive amounts of memory. + +• **Privacy**. Witness the [recent controversy][4] over Chromium automatically downloading a microphone snooping program to respond to “OK, Google.” + +Firefox may not have the most features or the down-to-the-millisecond fastest rendering engine. But it’s solid, stingy with resources, highly extensible, and most of all, it comes with no strings attached. There’s no ulterior data-gathering motive. + +-- Woody Leonhard + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-thunderbird-100614433-orig.jpg) + +### Thunderbird ### + +A longtime favorite email client, Mozilla’s [Thunderbird][5], may be getting a bit long in the tooth, but it’s still supported and showing signs of life. The latest version, 38.2, arrived in August, and there are plans for more development. + +Mozilla officially pulled its people off the project back in July 2012, but a hardcore group of volunteers, led by Kent James and the all-volunteer Thunderbird Council, continues to toil away. While you won’t find the latest email innovations in Thunderbird, you will find a solid core of basic functions based on local storage. If having mail in the cloud spooks you, it’s a good, private alternative. And if James goes ahead with his idea of encrypting Thunderbird mail end-to-end, there may be significant new life in the old bird. + +-- Woody Leonhard + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-notepad-100614432-orig.jpg) + +### Notepad++ ### + +If Windows Notepad handles all of your text editing (and source code editing and HTML editing) needs, more power to ya. For Windows users who yearn for a little bit more in a text editor, there’s Don Ho’s [Notepad++][6], which is the editor I turn to, over and over again. + +With tabbed views, drag-and-drop, color-coded hints for completing HTML commands, bookmarks, macro recording, shortcut keys, and every text encoding format you’re likely to encounter, Notepad++ takes text to a new level. We get frequent updates, too, with the latest in August. + +-- Woody Leonhard + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-vlc-100614435-orig.jpg) + +### VLC ### + +The stalwart [VLC][7] (formerly known as VideoLan Client) runs almost any kind of media file on almost any platform. Yes, it even works as a remote control on Apple Watch. + +The tiled Universal app version for Windows 10, in the Windows Store, draws some criticism for instability and lack of control, but in most cases VLC works, and it works well -- without external codecs. It even supports Blu-ray formats with two new libraries. + +The desktop version is a must-have for Windows 10, unless you’re ready to run the advertising gauntlets that are the Universal Groove Music and Movies & TV apps from Microsoft. VLC received a major [feature update][8] in February and a comprehensive bug fix in April. + +-- Woody Leonhard + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-7-zip-100614429-orig.jpg) + +### 7-Zip ### + +Long recognized as the preeminent open source ZIP archive manager for Windows, [7-Zip][9] works like a champ, even on the Windows 10 desktop. Full coverage for RAR files, which can be problematic in Windows, combine with password-protected file creation and support for self-extracting ZIPs. It’s one of those programs that just works. + +Yes, it would be nice to get a more modern file picker. Yes, it would be interesting to see a tiled Universal app version. But even without the fancy bells and whistles, 7-Zip deserves a place on every Windows desktop. + +-- Woody Leonhard + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-handbrake-100614427-orig.jpg) + +### Handbrake ### + +If you want to convert your DVDs (or video files in any commonly used format) into a file in some other format, or simply scrape them off a silver coaster, [Handbrake][10] is the way to do it. If you’re a Windows user, Handbrake is almost indispensible, since Microsoft doesn’t believe in ripping DVDs. + +Handbrake presents a number of handy presets for optimizing conversions for your target device (iPod, iPad, Android Tablet, and so on) It’s simple, and it’s fast. With the latest round of bug fixes released in June, Handbrake’s keeping up on maintenance -- and it works fine on the Windows 10 desktop. + +-- Woody Leonhard + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-keepass-100614430-orig.jpg) + +### KeePass ### + +I’ll confess that I almost gave up on [KeePass][11] because the primary download site goes to Sourceforge. That means you have to be extremely careful which boxes are checked and what you click on (and when) as you attempt to download and install the software. While KeePass itself is 100 percent clean open source (GNU GPL), Sourceforge doesn’t feel so constrained, and its [installers reek of crapware][12]. + +One of many local-file password storage programs, KeePass distinguishes itself with broad scope, as well as its ability to run on all sorts of platforms, no installation required. KeePass will save not only passwords, but also credit card information and freely structured information. It provides a strong random password generator, and the database itself is locked with AES and Twofish, so nobody’s going to crack it. And it’s kept up to date, with a new stable release last month. + +-- Woody Leonhard + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-virtualbox-100614434-orig.jpg) + +### VirtualBox ### + +With a major release published in July, Oracle’s open source [VirtualBox][13] -- available for Windows, OS X, Linux, even Solaris --continues to give commercial counterparts VMware Workstation, VMware Fusion, Parallels Desktop, and Microsoft’s Hyper-V a hard run for their money. The Oracle team is still getting the final Windows 10 bugs ironed out, but come to think of it, so is Microsoft. + +VirtualBox doesn’t quite match the performance or polish of the VMware and Parallels products, but it’s getting closer. Version 5 brought long-awaited drag-and-drop support, making it easier to move files between VMs and host. + +I prefer VirtualBox over Hyper-V because it’s easy to control external devices. In Hyper-V, for example, getting sound to work is a pain in the neck, but in VirtualBox it only takes a click in setup. The shared clipboard between VM and host works wonders. Running speed on both is roughly the same, with a slight advantage to Hyper-V. But managing VirtualBox machines is much easier. + +-- Woody Leonhard + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-inkscape-100614428-orig.jpg) + +### Inkscape ### + +If you stand in awe of the designs created with Adobe Illustrator (or even CorelDraw), take a close look at [Inkscape][14]. Scalable vector images never looked so good. + +Version 0.91, released in January, uses a new internal graphics rendering engine called Cairo, sponsored by Google, to make the app run faster and allow for more accurate rendering. Inkscape will read and write SVG, PNG, PDF, even EPS, and many other formats. It can export Flash XML Graphics, HTML5 Canvas, and XAML, among others. + +There’s a strong community around Inkscape, and it’s built for easy extensibility. It’s available for Windows, OS X, and Linux. + +-- Woody Leonhard + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-keepassdroid-100614431-orig.jpg) + +### KeePassDroid ### + +Trying to remember all of the passwords we need today is impossible, and creating new ones to meet stringent password policy requirements can be agonizing. A port of KeePass for Android, [KeePassDroid][15] brings sanity preserving password management to mobile devices. + +Like KeyPass, KeyPassDroid makes creating and accessing passwords easy, requiring you to recall only a single master password. It supports both DES and Twofish algorithms for encrypting all passwords, and it goes a step further by encrypting the entire password database, not only the password fields. Notes and other password pertinent information are encrypted too. + +While KeePassDroid's interface is minimal -- dated, some would say -- it gets the job done with bare-bones efficiency. Need to generate passwords that have certain character sets and lengths? KeePassDroid can do that with ease. With more than a million downloads on the Google Play Store, you could say this app definitely fills a need. + +-- Victor R. Garza + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-prey-100615300-orig.jpg) + +### Prey ### + +Loss or theft of mobile devices is all too common these days. While there are many tools in the enterprise to manage and erase data either misplaced or stolen from an organization, [Prey][16] facilitates the recovery of the phone, laptop, or tablet, and not just the wiping of potentially sensitive information from the device. + +Prey is a Web service that works with an open source installed agent for Linux, OS X, Windows, Android, and iOS devices. Prey tracks your lost or stolen device by using either the device's GPS, the native geolocation provided by newer operating systems, or an associated Wi-Fi hotspot to home in on the location. + +If your smartphone is lost or stolen, send a text message to the device to activate Prey. For stolen tablets or laptops, use the Prey Project's cloud-based control panel to select the device as missing. The Prey agent on any device can then take a screenshot of the active applications, turn on the camera to catch a thief's image, reset the device to the factory settings, or fully lock down the device. + +Should you want to retrieve your lost items, the Prey Project strongly suggests you contact your local police to have them assist you. + +-- Victor R. Garza + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-orbot-100615299-orig.jpg) + +### Orbot ### + +The premiere proxy application for Android, [Orbot][17] leverages the volunteer-operated network of virtual tunnels called Tor (The Onion Router) to keep all communications private. Orbot works with companion applications [Orweb][18] for secure Web browsing and [ChatSecure][19] for secure chat. In fact, any Android app that allows its proxy settings to be changed can be secured with Orbot. + +One thing to remember about the Tor network is that it's designed for secure, lightweight communications, not for pulling down torrents or watching YouTube videos. Surfing media-rich sites like Facebook can be painfully slow. Your Orbot communications won't be blazing fast, but they will stay private and confidential. + +-- Victor R. Garza + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-tails-100615301-orig.jpg) + +### Tails ### + +[Tails][20], or The Amnesic Incognito Live System, is a Linux Live OS that can be booted from a USB stick, DVD, or SD card. It’s often used covertly in the Deep Web to secure traffic when purchasing illicit substances, but it can also be used to avoid tracking, support freedom of speech, circumvent censorship, and promote liberty. + +Leveraging Tor (The Onion Router), Tails keeps all communications secure and private and promises to leave no trace on any computer after it’s used. It performs disk encryption with LUKS, protects instant messages with OTR, encrypts Web traffic with the Tor Browser and HTTPS Everywhere, and securely deletes files via Nautilus Wipe. Tails even has an office suite, image editor, and the like. + +Now, it's always possible to be traced while using any system if you're not careful, so be vigilant when using Tails and follow good privacy practices, like turning off JavaScript while using Tor. And be aware that Tails isn't necessarily going to be speedy, even while using a fiber connect, but that's what you pay for anonymity. + +-- Victor R. Garza + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-main-100614438-orig.jpg) + +### Read about more open source winners ### + +InfoWorld's Best of Open Source Awards for 2014 celebrate more than 100 open source projects, from the bottom of the stack to the top. Follow these links to more open source winners: + +[Bossie Awards 2015: The best open source applications][21] + +[Bossie Awards 2015: The best open source application development tools][22] + +[Bossie Awards 2015: The best open source big data tools][23] + +[Bossie Awards 2015: The best open source data center and cloud software][24] + +[Bossie Awards 2015: The best open source desktop and mobile software][25] + +[Bossie Awards 2015: The best open source networking and security software][26] + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2982630/open-source-tools/bossie-awards-2015-the-best-open-source-desktop-and-mobile-software.html + +作者:[InfoWorld staff][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/InfoWorld-staff/ +[1]:https://www.libreoffice.org/download/libreoffice-fresh/ +[2]:http://lwn.net/Articles/637735/ +[3]:https://www.mozilla.org/en-US/firefox/new/ +[4]:https://nakedsecurity.sophos.com/2015/06/24/not-ok-google-privacy-advocates-take-on-the-chromium-team-and-win/ +[5]:https://www.mozilla.org/en-US/thunderbird/ +[6]:https://notepad-plus-plus.org/ +[7]:http://www.videolan.org/vlc/index.html +[8]:http://www.videolan.org/press/vlc-2.2.0.html +[9]:http://www.7-zip.org/ +[10]:https://handbrake.fr/ +[11]:http://keepass.info/ +[12]:http://www.infoworld.com/article/2931753/open-source-software/sourceforge-the-end-cant-come-too-soon.html +[13]:https://www.virtualbox.org/ +[14]:https://inkscape.org/en/download/windows/ +[15]:http://www.keepassdroid.com/ +[16]:http://preyproject.com/ +[17]:https://www.torproject.org/docs/android.html.en +[18]:https://guardianproject.info/apps/orweb/ +[19]:https://guardianproject.info/apps/chatsecure/ +[20]:https://tails.boum.org/ +[21]:http://www.infoworld.com/article/2982622/bossie-awards-2015-the-best-open-source-applications.html +[22]:http://www.infoworld.com/article/2982920/bossie-awards-2015-the-best-open-source-application-development-tools.html +[23]:http://www.infoworld.com/article/2982429/bossie-awards-2015-the-best-open-source-big-data-tools.html +[24]:http://www.infoworld.com/article/2982923/bossie-awards-2015-the-best-open-source-data-center-and-cloud-software.html +[25]:http://www.infoworld.com/article/2982630/bossie-awards-2015-the-best-open-source-desktop-and-mobile-software.html +[26]:http://www.infoworld.com/article/2982962/bossie-awards-2015-the-best-open-source-networking-and-security-software.html \ No newline at end of file diff --git a/sources/share/20151028 Bossie Awards 2015--The best open source networking and security software.md b/sources/share/20151028 Bossie Awards 2015--The best open source networking and security software.md new file mode 100644 index 0000000000..129ce3eff4 --- /dev/null +++ b/sources/share/20151028 Bossie Awards 2015--The best open source networking and security software.md @@ -0,0 +1,162 @@ +Bossie Awards 2015: The best open source networking and security software +================================================================================ +InfoWorld's top picks of the year among open source tools for building, operating, and securing networks + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-net-sec-100614459-orig.jpg) + +### The best open source networking and security software ### + +BIND, Sendmail, OpenSSH, Cacti, Nagios, Snort -- open source software seems to have been invented for networks, and many of the oldies and goodies are still going strong. Among our top picks in the category this year, you'll find a mix of stalwarts, mainstays, newcomers, and upstarts perfecting the arts of network management, security monitoring, vulnerability assessment, rootkit detection, and much more. + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-icinga-100614482-orig.jpg) + +### Icinga 2 ### + +Icinga began life as a fork of system monitoring application Nagios. [Icinga 2][1] was completely rewritten to give users a modern interface, support for multiple databases, and an API to integrate numerous extensions. With out-of-the-box load balancing, notifications, and configuration, Icinga 2 shortens the time to installation for complex environments. Icinga 2 supports Graphite natively, giving administrators real-time performance graphing without any fuss. But what puts Icinga back on the radar this year is its release of Icinga Web 2, a graphical front end with drag-and-drop customizable dashboards and streamlined monitoring tools. + +Administrators can view, filter, and prioritize problems, while keeping track of which actions have already been taken. A new matrix view lets administrators view hosts and services on one page. You can view events over a particular time period or filter incidents to understand which ones need immediate attention. Icinga Web 2 may boast a new interface and zippier performance, but all the usual commands from Icinga Classic and Icinga Web are still available. That means there is no downtime trying to learn a new version of the tool. + +-- Fahmida Rashid + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-zenoss-100614465-orig.jpg) + +### Zenoss Core ### + +Another open source stalwart, [Zenoss Core][2] gives network administrators a complete, one-stop solution for tracking and managing all of the applications, servers, storage, networking components, virtualization tools, and other elements of an enterprise infrastructure. Administrators can make sure the hardware is running efficiently and take advantage of the modular design to plug in ZenPacks for extended functionality. + +Zenoss Core 5, released in February of this year, takes the already powerful tool and improves it further, with an enhanced user interface and expanded dashboard. The Web-based console and dashboards were already highly customizable and dynamic, and the new version now lets administrators mash up multiple component charts onto a single chart. Think of it as the tool for better root cause and cause/effect analysis. + +Portlets give additional insights for network mapping, device issues, daemon processes, production states, watch lists, and event views, to name a few. And new HTML5 charts can be exported outside the tool. The Zenoss Control Center allows out-of-band management and monitoring of all Zenoss components. Zenoss Core has new tools for online backup and restore, snapshots and rollbacks, and multihost deployment. Even more important, deployments are faster with full Docker support. + +-- Fahmida Rashid + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-opennms-100614461-orig.jpg) + +### OpenNMS ### + +An extremely flexible network management solution, [OpenNMS][3] can handle any network management task, whether it's device management, application performance monitoring, inventory control, or events management. With IPv6 support, a robust alerts system, and the ability to record user scripts to test Web applications, OpenNMS has everything network administrators and testers need. OpenNMS has become, as now a mobile dashboard, called OpenNMS Compass, lets networking pros keep an eye on their network even when they're out and about. + +The iOS version of the app, which is available on the [iTunes App Store][4], displays outages, nodes, and alarms. The next version will offer additional event details, resource graphs, and information about IP and SNMP interfaces. The Android version, available on [Google Play][5], displays network availability, outages, and alarms on the dashboard, as well as the ability to acknowledge, escalate, or clear alarms. The mobile clients are compatible with OpenNMS Horizon 1.12 or greater and OpenNMS Meridian 2015.1.0 or greater. + +-- Fahmida Rashid + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-onion-100614460-orig.jpg) + +### Security Onion ### + +Like an onion, network security monitoring is made of many layers. No single tool will give you visibility into every attack or show you every reconnaissance or foot-printing session on your company network. [Security Onion][6] bundles scores of proven tools into one handy Ubuntu distro that will allow you to see who's inside your network and help keep the bad guys out. + +Whether you're taking a proactive approach to network security monitoring or following up on a potential attack, Security Onion can assist. Consisting of sensor, server, and display layers, the Onion combines full network packet capture with network-based and host-based intrusion detection, and it serves up all of the various logs for inspection and analysis. + +The star-studded network security toolchain includes Netsniff-NG for packet capture, Snort and Suricata for rules-based network intrusion detection, Bro for analysis-based network monitoring, OSSEC for host intrusion detection, and Sguil, Squert, Snorby, and ELSA (Enterprise Log Search and Archive) for display, analysis, and log management. It’s a carefully vetted collection of tools, all wrapped in a wizard-driven installer and backed by thorough documentation, that can help you get from zero to monitoring as fast as possible. + +-- Victor R. Garza + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-kali-100614458-orig.jpg) + +Kali Linux + +The team behind [Kali Linux][7] revamped the popular security Linux distribution this year to make it faster and even more versatile. Kali sports a new 4.0 kernel, improved hardware and wireless driver support, and a snappier interface. The most popular tools are easily accessible from a dock on the side of the screen. The biggest change? Kali Linux is now a rolling distribution, with a continuous stream of software updates. Kali's core system is based on Debian Jessie, and the team will pull packages continuously from Debian Testing, while continuing to add new Kali-flavored features on top. + +The distribution still comes jam-packed with tools for penetration testing, vulnerability analysis, security forensics, Web application analysis, wireless networking and assessment, reverse engineering, and exploitation tools. Now the distribution has an upstream version checking system that will automatically notify users when updates are available for the individual tools. The distribution also features ARM images for a range of devices, including Raspberry Pi, Chromebook, and Odroids, as well as updates to the NetHunter penetration testing platform that runs on Android devices. There are other changes too: Metasploit Community/Pro is no longer included, because Kali 2.0 is not yet [officially supported by Rapid7][8]. + +-- Fahmida Rashid + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-openvas-100614462-orig.jpg) + +### OpenVAS ### + +[OpenVAS][9], the Open Vulnerability Assessment System, is a framework that combines multiple services and tools to offer vulnerability scanning and vulnerability management. The scanner is coupled with a weekly feed of network vulnerability tests, or you can use a feed from a commercial service. The framework includes a command-line interface (so it can be scripted) and an SSL-secured, browser-based interface via the [Greenbone Security Assistant][10]. OpenVAS accommodates various plug-ins for additional functionality. Scans can be scheduled or run on-demand. + +Multiple OpenVAS installations can be controlled through a single master, which makes this a scalable vulnerability assessment tool for enterprises. The project is as compatible with standards as can be: Scan results and configurations are stored in a SQL database, where they can be accessed easily by external reporting tools. Client tools access the OpenVAS Manager via the XML-based stateless OpenVAS Management Protocol, so security administrators can extend the functionality of the framework. The software can be installed from packages or source code to run on Windows or Linux, or downloaded as a virtual appliance. + +-- Matt Sarrel + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-owasp-100614463-orig.jpg) + +### OWASP ### + +[OWASP][11], the Open Web Application Security Project, is a nonprofit organization with worldwide chapters focused on improving software security. The community-driven organization provides test tools, documentation, training, and almost anything you could imagine that’s related to assessing software security and best practices for developing secure software. Several OWASP projects have become valuable components of many a security practitioner's toolkit: + +[ZAP][12], the Zed Attack Proxy Project, is a penetration test tool for finding vulnerabilities in Web applications. One of the design goals of ZAP was to make it easy to use so that developers and functional testers who aren't security experts can benefit from using it. ZAP provides automated scanners and a set of manual test tools. + +The [Xenotix XSS Exploit Framework][13] is an advanced cross-site scripting vulnerability detection and exploitation framework that runs scans within browser engines to get real-world results. The Xenotix Scanner Module uses three intelligent fuzzers, and it can run through nearly 5,000 distinct XSS payloads. An API lets security administrators extend and customize the exploit toolkit. + +[O-Saft][14], or the OWASP SSL advanced forensic tool, is an SSL auditing tool that shows detailed information about SSL certificates and tests SSL connections. This command-line tool can run online or offline to assess SSL security such as ciphers and configurations. O-Saft provides built-in checks for common vulnerabilities, and you can easily extend these through scripting. In May 2015 a simple GUI was added as an optional download. + +[OWTF][15], the Offensive Web Testing Framework, is an automated test tool that follows OWASP testing guidelines and the NIST and PTES standards. The framework uses both a Web UI and a CLI, and it probes Web and application servers for common vulnerabilities such as improper configuration and unpatched software. + +-- Matt Sarrel + +![](http://core0.staticworld.net/images/article/2015/09/bossies-2015-beef-100614456-orig.jpg) + +### BeEF ### + +The Web browser has become the most common vector for attacks against clients. [BeEF][15], the Browser Exploitation Framework Project, is a widely used penetration tool to assess Web browser security. BeEF helps you expose the security weaknesses of client systems using client-side attacks launched through the browser. BeEF sets up a malicious website, which security administrators visit from the browser they want to test. BeEF then sends commands to attack the Web browser and use it to plant software on the client machine. Administrators can then launch attacks on the client machine as if they were zombies. + +BeEF comes with commonly used modules like a key logger, a port scanner, and a Web proxy, plus you can write your own modules or send commands directly to the zombified test machine. BeEF comes with a handful of demo Web pages to help you get started and makes it very easy to write additional Web pages and attack modules so you can customize testing to your environment. BeEF is a valuable test tool for assessing browser and endpoint security and for learning how browser-based attacks are launched. Use it to put together a demo to show your users how malware typically infects client devices. + +-- Matt Sarrel + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-unhide-100614464-orig.jpg) + +### Unhide ### + +[Unhide][16] is a forensic tool that locates open TCP/UDP ports and hidden process on UNIX, Linux, and Windows. Hidden ports and processes can be the result of rootkit or LKM (loadable kernel module) activity. Rootkits can be difficult to find and remove because they are designed to be stealthy, hiding themselves from the OS and user. A rootkit can use LKMs to hide its processes or impersonate other processes, allowing it to run on machines undiscovered for a long time. Unhide can provide the assurance that administrators need to know their systems are clean. + +Unhide is really two separate scripts: one for processes and one for ports. The tool interrogates running processes, threads, and open ports and compares this info to what's registered with the system as active, reporting discrepancies. Unhide and WinUnhide are extremely lightweight scripts that run from the command line to produce text output. They're not pretty, but they are extremely useful. Unhide is also included in the [Rootkit Hunter][17] project. + +-- Matt Sarrel + +![](http://images.techhive.com/images/article/2015/09/bossies-2015-main-100614457-orig.jpg) + +Read about more open source winners + +InfoWorld's Best of Open Source Awards for 2014 celebrate more than 100 open source projects, from the bottom of the stack to the top. Follow these links to more open source winners: + +[Bossie Awards 2015: The best open source applications][18] + +[Bossie Awards 2015: The best open source application development tools][19] + +[Bossie Awards 2015: The best open source big data tools][20] + +[Bossie Awards 2015: The best open source data center and cloud software][21] + +[Bossie Awards 2015: The best open source desktop and mobile software][22] + +[Bossie Awards 2015: The best open source networking and security software][23] + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2982962/open-source-tools/bossie-awards-2015-the-best-open-source-networking-and-security-software.html + +作者:[InfoWorld staff][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/InfoWorld-staff/ +[1]:https://www.icinga.org/icinga/icinga-2/ +[2]:http://www.zenoss.com/ +[3]:http://www.opennms.org/ +[4]:https://itunes.apple.com/us/app/opennms-compass/id968875097?mt=8 +[5]:https://play.google.com/store/apps/details?id=com.opennms.compass&hl=en +[6]:http://blog.securityonion.net/p/securityonion.html +[7]:https://www.kali.org/ +[8]:https://community.rapid7.com/community/metasploit/blog/2015/08/12/metasploit-on-kali-linux-20 +[9]:http://www.openvas.org/ +[10]:http://www.greenbone.net/ +[11]:https://www.owasp.org/index.php/Main_Page +[12]:https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project +[13]:https://www.owasp.org/index.php/O-Saft +[14]:https://www.owasp.org/index.php/OWASP_OWTF +[15]:http://www.beefproject.com/ +[16]:http://www.unhide-forensics.info/ +[17]:http://www.rootkit.nl/projects/rootkit_hunter.html +[18]:http://www.infoworld.com/article/2982622/bossie-awards-2015-the-best-open-source-applications.html +[19]:http://www.infoworld.com/article/2982920/bossie-awards-2015-the-best-open-source-application-development-tools.html +[20]:http://www.infoworld.com/article/2982429/bossie-awards-2015-the-best-open-source-big-data-tools.html +[21]:http://www.infoworld.com/article/2982923/bossie-awards-2015-the-best-open-source-data-center-and-cloud-software.html +[22]:http://www.infoworld.com/article/2982630/bossie-awards-2015-the-best-open-source-desktop-and-mobile-software.html +[23]:http://www.infoworld.com/article/2982962/bossie-awards-2015-the-best-open-source-networking-and-security-software.html \ No newline at end of file From bf982108ea08177ebdbecbb23e88b78b2b9843e7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 29 Oct 2015 07:55:05 +0800 Subject: [PATCH 2360/2517] translating --- sources/tech/20151027 How To Show Desktop In GNOME 3.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151027 How To Show Desktop In GNOME 3.md b/sources/tech/20151027 How To Show Desktop In GNOME 3.md index 27abc7637a..2abeb64374 100644 --- a/sources/tech/20151027 How To Show Desktop In GNOME 3.md +++ b/sources/tech/20151027 How To Show Desktop In GNOME 3.md @@ -1,3 +1,5 @@ +translating----geekpi + How To Show Desktop In GNOME 3 ================================================================================ ![How to show desktop in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-in-GNOME-3.jpg) @@ -61,4 +63,4 @@ via: http://itsfoss.com/show-desktop-gnome-3/ [a]:http://itsfoss.com/author/abhishek/ [1]:https://www.gnome.org/gnome-3/ [2]:http://itsfoss.com/tag/antergos/ -[3]:http://itsfoss.com/install-numix-ubuntu/ \ No newline at end of file +[3]:http://itsfoss.com/install-numix-ubuntu/ From 9243cf6ca3d4e2cfd53514a095bc9b9dee42474b Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 29 Oct 2015 11:39:45 +0800 Subject: [PATCH 2361/2517] translated --- ...20151027 How To Show Desktop In GNOME 3.md | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/sources/tech/20151027 How To Show Desktop In GNOME 3.md b/sources/tech/20151027 How To Show Desktop In GNOME 3.md index 2abeb64374..93bd0ab847 100644 --- a/sources/tech/20151027 How To Show Desktop In GNOME 3.md +++ b/sources/tech/20151027 How To Show Desktop In GNOME 3.md @@ -1,61 +1,59 @@ -translating----geekpi - -How To Show Desktop In GNOME 3 +如何在GNOME 3 中显示桌面 ================================================================================ ![How to show desktop in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-in-GNOME-3.jpg) -How do you **show desktop in GNOME 3**? GNOME is a wonderful desktop environment but it focuses more on switching between the applications. What if you want to close all the running windows and display just the desktop? +你**该如何在GNOME 3中显示桌面**?GNOME是一个很棒的桌面环境但是它专注于在程序间切换。如果你想关闭所有窗口并显示桌面呢? -In Windows, you can do this by pressing Windows+D. In Ubuntu Unity, it is done with Ctrl+Super+D shortcut keys. But for some reason, GNOME has the shortcut key to show desktop disabled for some reasons. +在Windows中,你可以按下Windows+D。在Ubuntu Unity中,可以用Ctrl+Super+D快捷键。但是由于一些原因,GNOME禁用了显示桌面的快捷键。 -When you press Super+D or Ctrl+Super+D, nothing happens. If you want to see the desktop, you’ll have to minimize all running windows one by one. It is not convenient specially if you have several application windows open. +当你按下Super+D或者Ctrl+Super+D,不会发生什么。如果你想要看到桌面,你得一个个最小化窗口。如果你有好几个打开的窗口那么这会非常不方便。 -In this quick tutorial, I am going to show you how to add keyboard shortcut to show desktop in [GNOME 3][1]. +在本教程中,我们向你展示[GNOME 3][1]中添加显示桌面的快捷键。 -### Add shortcut key to show desktop in GNOME 3 ### +### 在GNOME 3 中添加显示桌面的快捷键 ### -I am using [Antergos Linux][2] with GNOME 3.18 in this tutorial, but the steps are applicable to any Linux distribution using any version of GNOME 3. Also, Antergos has [Numix theme][3] applied by default. So, you might not see your usual GNOME icons. But I believe the steps are straight forward and you can easily follow it. +我在本教程的使用的是GNOME 3.18的[Antergos Linux][2],但是步骤对于任何GNOME 3版本的Linux发行版都是有用的。同时也使用了[Numix主题][3]作为默认主题。因此你也许不会看到常规的GNOME图标。但是我相信步骤很直接你可以很方便地尝试。 -#### Step 1 #### +#### 第一步 #### -Go to System Settings. Click on the top right corner, from the drop down, click on the system settings icon. +进入系统设置。点击右上角,在下拉列表中,点击系统设置图标。 ![System Settings in GNOME Antergos Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-1.png) -#### Step 2 #### +#### 第二步 #### -When you are in System Settings, look for Keyboard settings. +当你在系统设置中时,寻找设置。 ![Keyboard settings in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-2.png) -#### Step 3 #### +#### 第三步 #### -In here, Go to **Shortcuts tab** and select **Navigation** from the left side pane. Scroll down a bit and look for **Hide all normal windows**. You’ll see that it has been disabled. +在这里,选择**Shortcuts**标签并在左边拦选择**Navigation**。向下滚动一点查找**Hide all normal windows**。你会看见它已经被禁用了 ![Shortcut keys in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-3.jpeg) -#### Step 4 #### +#### 第四步 #### -Click once on the key you want to edit, in this case, Hide all normal windows. You’ll see that it has been changed to **New accelerator**… Now whichever keys you will press, it will be assigned for showing the desktop. +在“Hide all normla windows”上面点击一下。你会看到它变成了**New accelerator**。现在无论你按下哪个键,他都会被分配成显示桌面。 -If you accidently press wrong key combination, just press backspace key and it will be disabled again. Click on it again and use the desired key combination. +如果你意外按下了错误的键,只要按下退格它就会被禁用。再次点击并使用需要的组合键。 ![Shortcut key edit in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-4.jpeg) -#### Step 5 #### +#### 第五步 #### -Once you have used the desired key combination, just close the system settings. There is no option for saving the changes because changes are saved instantly. In my case, I used Ctrl+Super+D to align it with the behavior in Ubuntu Unity. +一旦设置了组合键,只要关闭系统设置。没有设置保存因为更改是立即生效的。在本例中,我使用Ctrl+Super+D来校准到与Ubuntu Unity一致。 ![Keyboard shortcut edit in GNOME](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-5.jpeg) -That’s it folks. Enjoy the shortcut to show desktop in GNOME 3. I hope you found this quick tutorial helpful. Any questions, suggestions or a word of thanks is always welcomed :) +就是这样。享受GNOME 3中的显示桌面快捷键吧。我希望这篇教程对你们有用。有任何问题、建议或者留言都欢迎:) -------------------------------------------------------------------------------- via: http://itsfoss.com/show-desktop-gnome-3/ 作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 01320bc898b0a75fdca58792abd3bcdbbb90ce9f Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 29 Oct 2015 11:40:10 +0800 Subject: [PATCH 2362/2517] Rename sources/tech/20151027 How To Show Desktop In GNOME 3.md to translated/tech/20151027 How To Show Desktop In GNOME 3.md --- .../tech/20151027 How To Show Desktop In GNOME 3.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20151027 How To Show Desktop In GNOME 3.md (100%) diff --git a/sources/tech/20151027 How To Show Desktop In GNOME 3.md b/translated/tech/20151027 How To Show Desktop In GNOME 3.md similarity index 100% rename from sources/tech/20151027 How To Show Desktop In GNOME 3.md rename to translated/tech/20151027 How To Show Desktop In GNOME 3.md From 76d7caa5f64f466a148bb1f86f29503dbaf35242 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 29 Oct 2015 13:19:08 +0800 Subject: [PATCH 2363/2517] PUB:20151019 10 passwd command examples in Linux @strugglingyouth --- ...019 10 passwd command examples in Linux.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) rename {translated/tech => published}/20151019 10 passwd command examples in Linux.md (83%) diff --git a/translated/tech/20151019 10 passwd command examples in Linux.md b/published/20151019 10 passwd command examples in Linux.md similarity index 83% rename from translated/tech/20151019 10 passwd command examples in Linux.md rename to published/20151019 10 passwd command examples in Linux.md index 0f9f1f3827..6e19bef6b2 100644 --- a/translated/tech/20151019 10 passwd command examples in Linux.md +++ b/published/20151019 10 passwd command examples in Linux.md @@ -1,10 +1,9 @@ - -在 Linux 中 passwd 命令的10个示例 +10 个 Linux 中的 passwd 命令示例 ================================================================================ -正如 **passwd** 命令的名称所示,其用于改变系统用户的密码。如果 passwd 命令由非 root 用户执行,那么它会询问当前用户的密码,然后设置调用命令用户的新密码。当此命令由超级用户 root 执行的话,就可以重新设置任何用户的密码,包括不知道当前密码的用户。 +正如 **passwd** 命令的名称所示,其用于改变系统用户的密码。如果 passwd 命令由非 root 用户执行,那么它会询问当前用户的密码,然后设置调用该命令的用户的新密码。当此命令由超级用户 root 执行的话,就可以重新设置任何用户的密码,包括不知道当前密码的用户。 -在这篇文章中,我们将讨论 passwd 命令实际的例子。 +在这篇文章中,我们将用实例来介绍 passwd 命令。 #### 语法 : #### @@ -16,7 +15,7 @@ ### 例1:更改系统用户的密码 ### -当你使用非 root 用户登录时,像我使用 ‘linuxtechi’ 登录的情况下,运行 passwd 命令它会重置当前登录用户的密码。 +当你使用非 root 用户登录时,比如我使用 ‘linuxtechi’ 登录的情况下,运行 passwd 命令它会重置当前登录用户的密码。 [linuxtechi@linuxworld ~]$ passwd Changing password for user linuxtechi. @@ -44,7 +43,7 @@ linuxtechi PS 2015-09-20 0 99999 7 -1 (Password set, SHA512 crypt.) [root@linuxworld ~]# -在上面的输出中,第一个字段显示的用户名,第二个字段显示密码状态(**PS = 密码设置,LK = 密码锁定,NP = 无密码**),第三个字段显示了当密码被改变,后面的字段分别显示了密码能更改的最小期限和最大期限,超过更改期能使用的最大期限,最后的为过期禁用天数。 +在上面的输出中,第一个字段显示的用户名,第二个字段显示密码状态(**PS = 密码设置,LK = 密码锁定,NP = 无密码**),第三个字段显示了上次修改密码的时间,后面四个字段分别显示了密码能更改的最小期限和最大期限,警告期限和没有使用该口令的时长。 ### 例3:显示所有账号的密码状态信息 ### @@ -54,11 +53,11 @@ ![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-sa.jpg) -(LCTT译注:CentOS6.6 没有测试成功,但 Ubuntu 可以。) +(LCTT译注:不同发行版/passwd 的行为不同。CentOS6.6 没有测试成功,但 Ubuntu 可以。) ### 例4:使用 -d 选项删除用户的密码 ### -就我而言,我删除 ‘**linuxtechi**‘ 用户的密码。 +用我做例子,删除 ‘**linuxtechi**‘ 用户的密码。 [root@linuxworld ~]# passwd -d linuxtechi Removing password for user linuxtechi. @@ -68,7 +67,7 @@ linuxtechi NP 2015-09-20 0 99999 7 -1 (Empty password.) [root@linuxworld ~]# -“**-d**” 选项将使用户的密码为空,并禁用用户登录。 +“**-d**” 选项将清空用户密码,并禁用用户登录。 ### 例5:设置密码立即过期 ### @@ -81,7 +80,7 @@ linuxtechi PS 1970-01-01 0 99999 7 -1 (Password set, SHA512 crypt.) [root@linuxworld ~]# -现在尝试用 linuxtechi 用户 SSH 到主机。 +现在尝试用 linuxtechi 用户 SSH 连接到主机。 ![](http://www.linuxtechi.com/wp-content/uploads/2015/09/passwd-expiry.jpg) @@ -143,7 +142,7 @@ via: http://www.linuxtechi.com/10-passwd-command-examples-in-linux/ 作者:[Pradeep Kumar][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1a3ec6780c395c7b9e0ecd8d913823c343640571 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 29 Oct 2015 13:32:48 +0800 Subject: [PATCH 2364/2517] PUB:20151012 Linux FAQs with Answers--How to force password change at the next login on Linux @geekpi --- ...orce password change at the next login on Linux.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) rename {translated/tech => published}/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md (86%) diff --git a/translated/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md b/published/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md similarity index 86% rename from translated/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md rename to published/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md index 509d0b6e45..22c298c047 100644 --- a/translated/tech/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md +++ b/published/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md @@ -1,12 +1,11 @@ -Linux有问必答--如何强制在下次登录Linux时更换密码 +Linux有问必答:如何强制在下次登录Linux时更换密码 ================================================================================ > **提问**:我管理着一台多人共享的Linux服务器。我刚使用默认密码创建了一个新用户,但是我想用户在第一次登录时更换密码。有没有什么方法可以让他/她在下次登录时修改密码呢? -在多用户Linux环境中,标准实践是使用一个默认的随机密码创建一个用户账户。成功登录后,新用户自己改变默认密码。出于安全里有,经常建议“强制”用户在第一次登录时修改密码来确保这个一次性使用的密码不会再被使用。 +在多用户Linux环境中,标准实践是使用一个默认的随机密码创建一个用户账户。成功登录后,新用户自己改变默认密码。出于安全考虑,经常建议“强制”用户在第一次登录时修改密码来确保这个一次性使用的密码不会再被使用。 下面是**如何强制用户在下次登录时修改他/她的密码**。 -changes, and when to expire the current password, etc. 每个Linux用户都关联这不同的密码相关配置和信息。比如,记录着上次密码更改的日期、最小/最大的修改密码的天数、密码何时过期等等。 一个叫chage的命令行工具可以访问并调整密码过期相关配置。你可以使用这个工具来强制用户在下次登录修改密码、 @@ -23,7 +22,7 @@ changes, and when to expire the current password, etc. $ sudo chage -d0 -原本“-d ”参数是用来设置密码的“年龄”(也就是上次修改密码起到1970 1.1起的天数)。因此“-d0”的意思是上次密码修改的时间是1970 1.1,这就让当前的密码过期了,也就强制让他在下次登录的时候修改密码了。 +原本“-d ”参数是用来设置密码的“年龄”(也就是上次修改密码起到1970/1/1起的天数)。因此“-d0”的意思是上次密码修改的时间是1970/1/1,这就让当前的密码过期了,也就强制让他在下次登录的时候修改密码了。 另外一个过期当前密码的方式是用passwd命令。 @@ -46,8 +45,8 @@ changes, and when to expire the current password, etc. via: http://ask.xmodulo.com/force-password-change-next-login-linux.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8a12b1f1610f1f79933dab277dac89c7371248ca Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 29 Oct 2015 13:52:51 +0800 Subject: [PATCH 2365/2517] PUB:20150923 How To Upgrade From Oracle 11g To Oracle 12c @ictlyh --- ...o Upgrade From Oracle 11g To Oracle 12c.md | 34 +++++++------------ 1 file changed, 12 insertions(+), 22 deletions(-) rename {translated/tech => published}/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md (83%) diff --git a/translated/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md b/published/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md similarity index 83% rename from translated/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md rename to published/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md index 921b5d958f..3d27b772d8 100644 --- a/translated/tech/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md +++ b/published/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md @@ -1,12 +1,8 @@ 如何将 Oracle 11g 升级到 Orcale 12c ================================================================================ -大家好。 +大家好。今天我们来学习一下如何将 Oracle 11g 升级到 Oracle 12c。开始吧。 -今天我们来学习一下如何将 Oracle 11g 升级到 Oracle 12c。开始吧。 - -在此,我使用的是 CentOS 7 64 位 Linux 发行版。 - -我假设你已经在你的系统上安装了 Oracle 11g。这里我会展示一下安装 Oracle 11g 时我的操作步骤。 +在此,我使用的是 CentOS 7 64 位 Linux 发行版。我假设你已经在你的系统上安装了 Oracle 11g。这里我会展示一下安装 Oracle 11g 时我的操作步骤。 我在 Oracle 11g 上选择 “Create and configure a database”,如下图所示。 @@ -16,7 +12,7 @@ ![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage2.png) -然后你输入安装 Oracle 11g 的所有路径以及密码。下面是我自己的 Oracle 11g 安装配置。确保你正确输入了 Oracle 的密码。 +然后你输入安装 Oracle 11g 的各种路径以及密码。下面是我自己的 Oracle 11g 安装配置。确保你正确输入了 Oracle 的密码。 ![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage3.png) @@ -30,7 +26,7 @@ 你需要从该[链接][1]上下载两个 zip 文件。下载并解压两个文件到相同目录。文件名为 **linuxamd64_12c_database_1of2.zip** & **linuxamd64_12c_database_2of2.zip**。提取或解压完后,它会创建一个名为 database 的文件夹。 -注意:升级到 12c 之前,请确保在你的 CentOS 上已经安装了所有必须的软件包并且 path 环境变量也已经正确配置,还有其它前提条件也已经满足。 +注意:升级到 12c 之前,请确保在你的 CentOS 上已经安装了所有必须的软件包,并且所有的路径变量也已经正确配置,还有其它前提条件也已经满足。 下面是必须使用正确版本安装的一些软件包 @@ -47,13 +43,11 @@ 在因特网上搜索正确的 rpm 版本。 -你也可以用一个查询处理多个软件包,然后在输出中查找正确版本。例如: - -在终端中输入下面的命令 +你也可以用一个查询处理多个软件包,然后在输出中查找正确版本。例如,在终端中输入下面的命令: rpm -q binutils compat-libstdc++ gcc glibc libaio libgcc libstdc++ make sysstat unixodbc -你的系统中必须安装了以下软件包(版本可能较新会旧) +你的系统中必须安装了以下软件包(版本可能或新或旧) - binutils-2.23.52.0.1-12.el7.x86_64 - compat-libcap1-1.10-3.el7.x86_64 @@ -83,11 +77,7 @@ 你也需要 unixODBC-2.3.1 或更新版本的驱动。 -我希望你安装 Oracle 11g 的时候已经在你的 CentOS 7 上创建了名为 oracle 的用户。 - -让我们以用户 oracle 登录 CentOS。 - -以用户 oracle 登录到 CentOS 之后,在你的 CentOS上打开一个终端。 +我希望你安装 Oracle 11g 的时候已经在你的 CentOS 7 上创建了名为 oracle 的用户。让我们以用户 oracle 登录 CentOS。以用户 oracle 登录到 CentOS 之后,在你的 CentOS上打开一个终端。 使用终端更改工作目录并导航到你解压两个 zip 文件的目录。在终端中输入以下命令开始安装 12c。 @@ -119,15 +109,15 @@ ![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage11.png) -第七步,像下面这样使用默认的选择继续下一步。 +对于第七步,像下面这样使用默认的选择继续下一步。 ![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage12.png) -在第九步,你会看到一个类似下面这样的总结报告。 +在第九步中,你会看到一个类似下面这样的总结报告。 ![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage13.png) -如果一切正常,你可以点击步骤九中的 install 开始安装,进入步骤十。 +如果一切正常,你可以点击第九步中的 install 开始安装,进入第十步。 ![](http://www.unixmen.com/wp-content/uploads/2015/09/11g212cimage14.png) @@ -135,7 +125,7 @@ 要有耐心,一步一步走下来最后它会告诉你成功了。否则,在谷歌上搜索做必要的操作解决问题。再一次说明,由于你可能会遇到的错误有很多,我无法在这里提供所有详细介绍。 -现在,只需要按照下面屏幕指令配置监听器 +现在,只需要按照下面屏幕指令配置监听器。 配置完监听器之后,它会启动数据库升级助手(Database Upgrade Assistant)。选择 Upgrade Oracle Database。 @@ -157,7 +147,7 @@ via: http://www.unixmen.com/upgrade-from-oracle-11g-to-oracle-12c/ 作者:[Mohammad Forhad Iftekher][a] 译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From fc79fa4bf4448b4d887fac495a19e6f587df4691 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Thu, 29 Oct 2015 20:27:43 +0800 Subject: [PATCH 2366/2517] translatin wi-cuckoo --- ...27 Display Linux Distribution Logo ASCII Art In Terminal.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md b/sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md index fbcc299fe5..4a978f5b77 100644 --- a/sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md +++ b/sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md @@ -1,3 +1,4 @@ +translating wi-cuckoo Display Linux Distribution Logo ASCII Art In Terminal ================================================================================ ![Display Linux logo in ASCII art](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/ASCII-Arts-Linux-Logo.jpeg) @@ -127,4 +128,4 @@ via: http://itsfoss.com/display-linux-logo-in-ascii/ [a]:http://itsfoss.com/author/abhishek/ [1]:https://github.com/KittyKatt/screenFetch -[2]:http://itsfoss.com/cool-retro-term/ \ No newline at end of file +[2]:http://itsfoss.com/cool-retro-term/ From 987684dccda3906c03525d10b7c255663517fe20 Mon Sep 17 00:00:00 2001 From: Ryan Hu <213edu@gmail.com> Date: Thu, 29 Oct 2015 11:00:28 -0700 Subject: [PATCH 2367/2517] [Translating] 213edu 20151019 Gaming On Linux--All You Need To Know.md --- .../talk/20151019 Gaming On Linux--All You Need To Know.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20151019 Gaming On Linux--All You Need To Know.md b/sources/talk/20151019 Gaming On Linux--All You Need To Know.md index 9b0df50160..525d08838b 100644 --- a/sources/talk/20151019 Gaming On Linux--All You Need To Know.md +++ b/sources/talk/20151019 Gaming On Linux--All You Need To Know.md @@ -1,3 +1,5 @@ +213edu Translating + Gaming On Linux: All You Need To Know ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Gaming-on-Linux.jpeg) @@ -200,4 +202,4 @@ via: http://itsfoss.com/linux-gaming-guide/ [24]:http://freegamer.blogspot.fr/ [25]:http://linuxgamenews.com/ [26]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ -[27]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ \ No newline at end of file +[27]:http://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/ From 242e9f204119a4aa65cc416866f444f8972067b4 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 30 Oct 2015 14:33:38 +0800 Subject: [PATCH 2368/2517] =?UTF-8?q?20151030-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...80 Linux Monitoring Tools for SysAdmins.md | 603 ++++++++++++++++++ 1 file changed, 603 insertions(+) create mode 100644 sources/share/20151030 80 Linux Monitoring Tools for SysAdmins.md diff --git a/sources/share/20151030 80 Linux Monitoring Tools for SysAdmins.md b/sources/share/20151030 80 Linux Monitoring Tools for SysAdmins.md new file mode 100644 index 0000000000..420db8fb89 --- /dev/null +++ b/sources/share/20151030 80 Linux Monitoring Tools for SysAdmins.md @@ -0,0 +1,603 @@ +80 Linux Monitoring Tools for SysAdmins +================================================================================ +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/linux-monitoring.jpg) + +The industry is hotting up at the moment, and there are more tools than you can shake a stick at. Here lies the most comprehensive list on the Internet (of Tools). Featuring over 80 ways to your machines. Within this article we outline: + +- Command line tools +- Network related +- System related monitoring +- Log monitoring tools +- Infrastructure monitoring tools + +It’s hard work monitoring and debugging performance problems, but it’s easier with the right tools at the right time. Here are some tools you’ve probably heard of, some you probably haven’t – and when to use them: + +### Top 10 System Monitoring Tools ### + +#### 1. Top #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/top.jpg) + +This is a small tool which is pre-installed in many unix systems. When you want an overview of all the processes or threads running in the system: top is a good tool. You can order these processes on different criteria and the default criteria is CPU. + +#### 2. [htop][1] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/htop.jpg) + +Htop is essentially an enhanced version of top. It’s easier to sort by processes. It’s visually easier to understand and has built in commands for common things you would like to do. Plus it’s fully interactive. + +#### 3. [atop][2] #### + +Atop monitors all processes much like top and htop, unlike top and htop however it has daily logging of the processes for long-term analysis. It also shows resource consumption by all processes. It will also highlight resources that have reached a critical load. + +#### 4. [apachetop][3] #### + +Apachetop monitors the overall performance of your apache webserver. It’s largely based on mytop. It displays current number of reads, writes and the overall number of requests processed. + +#### 5. [ftptop][4] #### + +ftptop gives you basic information of all the current ftp connections to your server such as the total amount of sessions, how many are uploading and downloading and who the client is. + +#### 6. [mytop][5] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mytop.jpg) + +mytop is a neat tool for monitoring threads and performance of mysql. It gives you a live look into the database and what queries it’s processing in real time. + +#### 7. [powertop][6] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/powertop.jpg) + +powertop helps you diagnose issues that has to do with power consumption and power management. It can also help you experiment with power management settings to achieve the most efficient settings for your server. You switch tabs with the tab key. + +#### 8. [iotop][7] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iotop.jpg) + +iotop checks the I/O usage information and gives you a top-like interface to that. It displays columns on read and write and each row represents a process. It also displays the percentage of time the process spent while swapping in and while waiting on I/O. + +### Network related monitoring ### + +#### 9. [ntopng][8] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ntopng.jpg) + +ntopng is the next generation of ntop and the tool provides a graphical user interface via the browser for network monitoring. It can do stuff such as: geolocate hosts, get network traffic and show ip traffic distribution and analyze it. + +#### 10. [iftop][9] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iftop.jpg) + +iftop is similar to top, but instead of mainly checking for cpu usage it listens to network traffic on selected network interfaces and displays a table of current usage. It can be handy for answering questions such as “Why on earth is my internet connection so slow?!”. + +#### 11. [jnettop][10] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/jnettop.jpg) + +jnettop visualises network traffic in much the same way as iftop does. It also supports customizable text output and a machine-friendly mode to support further analysis. + +12. [bandwidthd][11] + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/bandwidthd.jpg) + +BandwidthD tracks usage of TCP/IP network subnets and visualises that in the browser by building a html page with graphs in png. There is a database driven system that supports searching, filtering, multiple sensors and custom reports. + +#### 13. [EtherApe][12] #### + +EtherApe displays network traffic graphically, the more talkative the bigger the node. It either captures live traffic or can read it from a tcpdump. The displayed can also be refined using a network filter with pcap syntax. + +#### 14. [ethtool][13] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ethtool.jpg) + +ethtool is used for displaying and modifying some parameters of the network interface controllers. It can also be used to diagnose Ethernet devices and get more statistics from the devices. + +#### 15. [NetHogs][14] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nethogs.jpg) + +NetHogs breaks down network traffic per protocol or per subnet. It then groups by process. So if there’s a surge in network traffic you can fire up NetHogs and see which process is causing it. + +#### 16. [iptraf][15] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iptraf.jpg) + +iptraf gathers a variety of metrics such as TCP connection packet and byte count, interface statistics and activity indicators, TCP/UDP traffic breakdowns and station packet and byte counts. + +#### 17. [ngrep][16] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ngrep.jpg) + +ngrep is grep but for the network layer. It’s pcap aware and will allow to specify extended regular or hexadecimal expressions to match against packets of . + +#### 18. [MRTG][17] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mrtg.jpg) + +MRTG was orginally developed to monitor router traffic, but now it’s able to monitor other network related things as well. It typically collects every five minutes and then generates a html page. It also has the capability of sending warning emails. + +#### 19. [bmon][18] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/bmon.jpg) + +Bmon monitors and helps you debug networks. It captures network related statistics and presents it in human friendly way. You can also interact with bmon through curses or through scripting. + +#### 20. traceroute #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/traceroute.jpg) + +Traceroute is a built-in tool for displaying the route and measuring the delay of packets across a network. + +#### 21. [IPTState][19] #### + +IPTState allows you to watch where traffic that crosses your iptables is going and then sort that by different criteria as you please. The tool also allows you to delete states from the table. + +#### 22. [darkstat][20] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/darkstat.jpg) + +Darkstat captures network traffic and calculates statistics about usage. The reports are served over a simple HTTP server and gives you a nice graphical user interface of the graphs. + +#### 23. [vnStat][21] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/vnstat.jpg) + +vnStat is a network traffic monitor that uses statistics provided by the kernel which ensures light use of system resources. The gathered statistics persists through system reboots. It has color options for the artistic sysadmins. + +#### 24. netstat #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/netstat.jpg) + +Netstat is a built-in tool that displays TCP network connections, routing tables and a number of network interfaces. It’s used to find problems in the network. + +#### 25. ss #### + +Instead of using netstat, it’s however preferable to use ss. The ss command is capable of showing more information than netstat and is actually faster. If you want a summary statistics you can use the command `ss -s`. + +#### 26. [nmap][22] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nmap.jpg) + +Nmap allows you to scan your server for open ports or detect which OS is being used. But you could also use this for SQL injection vulnerabilities, network discovery and other means related to penetration testing. + +#### 27. [MTR][23] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mtr.jpg) + +MTR combines the functionality of traceroute and the ping tool into a single network diagnostic tool. When using the tool it will limit the number hops individual packets has to travel while also listening to their expiry. It then repeats this every second. + +#### 28. [Tcpdump][24] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/tcpdump.jpg) + +Tcpdump will output a description of the contents of the packet it just captured which matches the expression that you provided in the command. You can also save the this data for further analysis. + +#### 29. [Justniffer][25] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/justniffer.jpg) + +Justniffer is a tcp packet sniffer. You can choose whether you would like to collect low-level data or high-level data with this sniffer. It also allows you to generate logs in customizable way. You could for instance mimic the access log that apache has. + +### System related monitoring ### + +#### 30. [nmon][26] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nmon.jpg) + +nmon either outputs the data on screen or saves it in a comma separated file. You can display CPU, memory, network, filesystems, top processes. The data can also be added to a RRD database for further analysis. + +#### 31. [conky][27] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/cpulimit.jpg) + +Conky monitors a plethora of different OS stats. It has support for IMAP and POP3 and even support for many popular music players! For the handy person you could extend it with your own scripts or programs using Lua. + +#### 32. [Glances][28] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/glances.jpg) + +Glances monitors your system and aims to present a maximum amount of information in a minimum amount of space. It has the capability to function in a client/server mode as well as monitoring remotely. It also has a web interface. + +#### 33. [saidar][29] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/saidar.jpg) + +Saidar is a very small tool that gives you basic information about your system resources. It displays a full screen of the standard system resources. The emphasis for saidar is being as simple as possible. + +#### 34. [RRDtool][30] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/rrdtool.jpg) + +RRDtool is a tool developed to handle round-robin databases or RRD. RRD aims to handle time-series data like CPU load, temperatures etc. This tool provides a way to extract RRD data in a graphical format. + +#### 35. [monit][31] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/monit.jpg) + +Monit has the capability of sending you alerts as well as restarting services if they run into trouble. It’s possible to perform any type of check you could write a script for with monit and it has a web user interface to ease your eyes. + +#### 36. [Linux process explorer][32] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/linux-process-monitor.jpg) + +Linux process explorer is akin to the activity monitor for OSX or the windows equivalent. It aims to be more usable than top or ps. You can view each process and see how much memory usage or CPU it uses. + +#### 37. df #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/df.jpg) + +df is an abbreviation for disk free and is pre-installed program in all unix systems used to display the amount of available disk space for filesystems which the user have access to. + +#### 38. [discus][33] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/discus.jpg) + +Discus is similar to df however it aims to improve df by making it prettier using fancy features as colors, graphs and smart formatting of numbers. + +#### 39. [xosview][34] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/xosview.jpg) + +xosview is a classic system monitoring tool and it gives you a simple overview of all the different parts of the including IRQ. + +#### 40. [Dstat][35] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/dstat.jpg) + +Dstat aims to be a replacement for vmstat, iostat, netstat and ifstat. It allows you to view all of your system resources in real-time. The data can then be exported into csv. Most importantly dstat allows for plugins and could thus be extended into areas not yet known to mankind. + +#### 41. [Net-SNMP][36] #### + +SNMP is the protocol ‘simple network management protocol’ and the Net-SNMP tool suite helps you collect accurate information about your servers using this protocol. + +#### 42. [incron][37] #### + +Incron allows you to monitor a directory tree and then take action on those changes. If you wanted to copy files to directory ‘b’ once new files appeared in directory ‘a’ that’s exactly what incron does. + +#### 43. [monitorix][38] #### + +Monitorix is lightweight system monitoring tool. It helps you monitor a single machine and gives you a wealth of metrics. It also has a built-in HTTP server to view graphs and a reporting mechanism of all metrics. + +#### 44. vmstat #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/vmstat.jpg) + +vmstat or virtual memory statistics is a small built-in tool that monitors and displays a summary about the memory in the machine. + +#### 45. uptime #### + +This small command that quickly gives you information about how long the machine has been running, how many users currently are logged on and the system load average for the past 1, 5 and 15 minutes. + +#### 46. mpstat #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/mpstat.jpg) + +mpstat is a built-in tool that monitors cpu usage. The most common command is using `mpstat -P ALL` which gives you the usage of all the cores. You can also get an interval update of the CPU usage. + +#### 47. pmap #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/pmap.jpg) + +pmap is a built-in tool that reports the memory map of a process. You can use this command to find out causes of memory bottlenecks. + +#### 48. ps #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ps.jpg) + +The ps command will give you an overview of all the current processes. You can easily select all processes using the command `ps -A` + +#### 49. [sar][39] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/sar.jpg) + +sar is a part of the sysstat package and helps you to collect, report and save different system metrics. With different commands it will give you CPU, memory and I/O usage among other things. + +#### 50. [collectl][40] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/collectl.jpg) + +Similar to sar collectl collects performance metrics for your machine. By default it shows cpu, network and disk stats but it collects a lot more. The difference to sar is collectl is able to deal with times below 1 second, it can be fed into a plotting tool directly and collectl monitors processes more extensively. + +#### 51. [iostat][41] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/iostat.jpg) + +iostat is also part of the sysstat package. This command is used for monitoring system input/output. The reports themselves can be used to change system configurations to better balance input/output load between hard drives in your machine. + +#### 52. free #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/free.jpg) + +This is a built-in command that displays the total amount of free and used physical memory on your machine. It also displays the buffers used by the kernel at that given moment. + +#### 53. /Proc file system #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/procfile.jpg) + +The proc file system gives you a peek into kernel statistics. From these statistics you can get detailed information about the different hardware devices on your machine. Take a look at the [full list of the proc file statistics][42] + +#### 54. [GKrellM][43] #### + +GKrellm is a gui application that monitor the status of your hardware such CPU, main memory, hard disks, network interfaces and many other things. It can also monitor and launch a mail reader of your choice. + +#### 55. [Gnome system monitor][44] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/gnome-system-monitor.jpg) + +Gnome system monitor is a basic system monitoring tool that has features looking at process dependencies from a tree view, kill or renice processes and graphs of all server metrics. + +### Log monitoring tools ### + +#### 56. [GoAccess][45] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/goaccess.jpg) + +GoAccess is a real-time web log analyzer which analyzes the access log from either apache, nginx or amazon cloudfront. It’s also possible to output the data into HTML, JSON or CSV. It will give you general statistics, top visitors, 404s, geolocation and many other things. + +#### 57. [Logwatch][46] #### + +Logwatch is a log analysis system. It parses through your system’s logs and creates a report analyzing the areas that you specify. It can give you daily reports with short digests of the activities taking place on your machine. + +#### 58. [Swatch][47] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/swatch.jpg) + +Much like Logwatch Swatch also monitors your logs, but instead of giving reports it watches for regular expression and notifies you via mail or the console when there is a match. It could be used for intruder detection for example. + +#### 59. [MultiTail][48] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/multitail.jpg) + +MultiTail helps you monitor logfiles in multiple windows. You can merge two or more of these logfiles into one. It will also use colors to display the logfiles for easier reading with the help of regular expressions. + +#### System tools #### + +#### 60. [acct or psacct][49] #### + +acct or psacct (depending on if you use apt-get or yum) allows you to monitor all the commands a users executes inside the system including CPU and memory time. Once installed you get that summary with the command ‘sa’. + +#### 61. [whowatch][50] #### + +Similar to acct this tool monitors users on your system and allows you to see in real time what commands and processes they are using. It gives you a tree structure of all the processes and so you can see exactly what’s happening. + +#### 62. [strace][51] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/strace.jpg) + +strace is used to diagnose, debug and monitor interactions between processes. The most common thing to do is making strace print a list of system calls made by the program which is useful if the program does not behave as expected. + +#### 63. [DTrace][52] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/dtrace.jpg) + +DTrace is the big brother of strace. It dynamically patches live running instructions with instrumentation code. This allows you to do in-depth performance analysis and troubleshooting. However, it’s not for the weak of heart as there is a 1200 book written on the topic. + +#### 64. [webmin][53] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/webmin.jpg) + +Webmin is a web-based system administration tool. It removes the need to manually edit unix configuration files and lets you manage the system remotely if need be. It has a couple of monitoring modules that you can attach to it. + +#### 65. stat #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/stat.jpg) + +Stat is a built-in tool for displaying status information of files and file systems. It will give you information such as when the file was modified, accessed or changed. + +#### 66. ifconfig #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/ifconfig.jpg) + +ifconfig is a built-in tool used to configure the network interfaces. Behind the scenes network monitor tools use ifconfig to set it into promiscuous mode to capture all packets. You can do it yourself with `ifconfig eth0 promisc` and return to normal mode with `ifconfig eth0 -promisc`. + +#### 67. [ulimit][54] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/unlimit.jpg) + +ulimit is a built-in tool that monitors system resources and keeps a limit so any of the monitored resources don’t go overboard. For instance making a fork bomb where a properly configured ulimit is in place would be totally fine. + +#### 68. [cpulimit][55] #### + +CPUlimit is a small tool that monitors and then limits the CPU usage of a process. It’s particularly useful to make batch jobs not eat up too many CPU cycles. + +#### 69. lshw #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/lshw.jpg) + +lshw is a small built-in tool extract detailed information about the hardware configuration of the machine. It can output everything from CPU version and speed to mainboard configuration. + +#### 70. w #### + +W is a built-in command that displays information about the users currently using the machine and their processes. + +#### 71. lsof #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/lsof.jpg) + +lsof is a built-in tool that gives you a list of all open files and network connections. From there you can narrow it down to files opened by processes, based on the process name, by a specific user or perhaps kill all processes that belongs to a specific user. + +### Infrastructure monitoring tools ### + +#### 72. Server Density #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/server-density-monitoring.png) + +Our [server monitoring tool][56]! It has a web interface that allows you to set alerts and view graphs for all system and network metrics. You can also set up monitoring of websites whether they are up or down. Server Density allows you to set permissions for users and you can extend your monitoring with our plugin infrastructure or api. The service already supports Nagios plugins. + +#### 73. [OpenNMS][57] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/opennms.jpg) + +OpenNMS has four main functional areas: event management and notifications; discovery and provisioning; service monitoring and data collection. It’s designed to be customizable to work in a variety of network environments. + +#### 74. [SysUsage][58] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/sysusage.jpg) + +SysUsage monitors your system continuously via Sar and other system commands. It also allows notifications to alarm you once a threshold is reached. SysUsage itself can be run from a centralized place where all the collected statistics are also being stored. It has a web interface where you can view all the stats. + +#### 75. [brainypdm][59] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/brainypdm.jpg) + +brainypdm is a data management and monitoring tool that has the capability to gather data from nagios or another generic source to make graphs. It’s cross-platform, has custom graphs and is web based. + +#### 76. [PCP][60] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/pcp.jpg) + +PCP has the capability of collating metrics from multiple hosts and does so efficiently. It also has a plugin framework so you can make it collect specific metrics that is important to you. You can access graph data through either a web interface or a GUI. Good for monitoring large systems. + +#### 77. [KDE system guard][61] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/kdesystemguard.jpg) + +This tool is both a system monitor and task manager. You can view server metrics from several machines through the worksheet and if a process needs to be killed or if you need to start a process it can be done within KDE system guard. + +#### 78. [Munin][62] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/munin.jpg) + +Munin is both a network and a system monitoring tool which offers alerts for when metrics go beyond a given threshold. It uses RRDtool to create the graphs and it has web interface to display these graphs. Its emphasis is on plug and play capabilities with a number of plugins available. + +#### 79. [Nagios][63] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/nagios.jpg) + +Nagios is system and network monitoring tool that helps you monitor monitor your many servers. It has support for alerting for when things go wrong. It also has many plugins written for the platform. + +#### 80. [Zenoss][64] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/zenoss.jpg) + +Zenoss provides a web interface that allows you to monitor all system and network metrics. Moreover it discovers network resources and changes in network configurations. It has alerts for you to take action on and it supports the Nagios plugins. + +#### 81. [Cacti][65] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/cacti.jpg) + +(And one for luck!) Cacti is network graphing solution that uses the RRDtool data storage. It allows a user to poll services at predetermined intervals and graph the result. Cacti can be extended to monitor a source of your choice through shell scripts. + +#### 82. [Zabbix][66] #### + +![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/zabbix-monitoring.png) + +Zabbix is an open source infrastructure monitoring solution. It can use most databases out there to store the monitoring statistics. The Core is written in C and has a frontend in PHP. If you don’t like installing an agent, Zabbix might be an option for you. + +### Bonus section: ### + +Thanks for your suggestions. It’s an oversight on our part that we’ll have to go back trough and renumber all the headings. In light of that, here’s a short section at the end for some of the Linux monitoring tools recommended by you: + +#### 83. [collectd][67] #### + +Collectd is a Unix daemon that collects all your monitoring statistics. It uses a modular design and plugins to fill in any niche monitoring. This way collectd stays as lightweight and customizable as possible. + +#### 84. [Observium][68] #### + +Observium is an auto-discovering network monitoring platform supporting a wide range of hardware platforms and operating systems. Observium focuses on providing a beautiful and powerful yet simple and intuitive interface to the health and status of your network. + +#### 85. Nload #### + +It’s a command line tool that monitors network throughput. It’s neat because it visualizes the in and and outgoing traffic using two graphs and some additional useful data like total amount of transferred data. You can install it with + + yum install nload + +or + + sudo apt-get install nload + +#### 84. [SmokePing][69] #### + +SmokePing keeps track of the network latencies of your network and it visualises them too. There are a wide range of latency measurement plugins developed for SmokePing. If a GUI is important to you it’s there is an ongoing development to make that happen. + +#### 85. [MobaXterm][70] #### + +If you’re working in windows environment day in and day out. You may feel limited by the terminal Windows provides. MobaXterm comes to the rescue and allows you to use many of the terminal commands commonly found in Linux. Which will help you tremendously in your monitoring needs! + +#### 86. [Shinken monitoring][71] #### + +Shinken is a monitoring framework which is a total rewrite of Nagios in python. It aims to enhance flexibility and managing a large environment. While still keeping all your nagios configuration and plugins. + +-------------------------------------------------------------------------------- + +via: https://blog.serverdensity.com/80-linux-monitoring-tools-know/ + +作者:[Jonathan Sundqvist][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + + +[a]:https://www.serverdensity.com/ +[1]:http://hisham.hm/htop/ +[2]:http://www.atoptool.nl/ +[3]:https://github.com/JeremyJones/Apachetop +[4]:http://www.proftpd.org/docs/howto/Scoreboard.html +[5]:http://jeremy.zawodny.com/mysql/mytop/ +[6]:https://01.org/powertop +[7]:http://guichaz.free.fr/iotop/ +[8]:http://www.ntop.org/products/ntop/ +[9]:http://www.ex-parrot.com/pdw/iftop/ +[10]:http://jnettop.kubs.info/wiki/ +[11]:http://bandwidthd.sourceforge.net/ +[12]:http://etherape.sourceforge.net/ +[13]:https://www.kernel.org/pub/software/network/ethtool/ +[14]:http://nethogs.sourceforge.net/ +[15]:http://iptraf.seul.org/ +[16]:http://ngrep.sourceforge.net/ +[17]:http://oss.oetiker.ch/mrtg/ +[18]:https://github.com/tgraf/bmon/ +[19]:http://www.phildev.net/iptstate/index.shtml +[20]:https://unix4lyfe.org/darkstat/ +[21]:http://humdi.net/vnstat/ +[22]:http://nmap.org/ +[23]:http://www.bitwizard.nl/mtr/ +[24]:http://www.tcpdump.org/ +[25]:http://justniffer.sourceforge.net/ +[26]:http://nmon.sourceforge.net/pmwiki.php +[27]:http://conky.sourceforge.net/ +[28]:https://github.com/nicolargo/glances +[29]:https://packages.debian.org/sid/utils/saidar +[30]:http://oss.oetiker.ch/rrdtool/ +[31]:http://mmonit.com/monit +[32]:http://sourceforge.net/projects/procexp/ +[33]:http://packages.ubuntu.com/lucid/utils/discus +[34]:http://www.pogo.org.uk/~mark/xosview/ +[35]:http://dag.wiee.rs/home-made/dstat/ +[36]:http://www.net-snmp.org/ +[37]:http://inotify.aiken.cz/?section=incron&page=about&lang=en +[38]:http://www.monitorix.org/ +[39]:http://sebastien.godard.pagesperso-orange.fr/ +[40]:http://collectl.sourceforge.net/ +[41]:http://sebastien.godard.pagesperso-orange.fr/ +[42]:http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html +[43]:http://members.dslextreme.com/users/billw/gkrellm/gkrellm.html +[44]:http://freecode.com/projects/gnome-system-monitor +[45]:http://goaccess.io/ +[46]:http://sourceforge.net/projects/logwatch/ +[47]:http://sourceforge.net/projects/swatch/ +[48]:http://www.vanheusden.com/multitail/ +[49]:http://www.gnu.org/software/acct/ +[50]:http://whowatch.sourceforge.net/ +[51]:http://sourceforge.net/projects/strace/ +[52]:http://dtrace.org/blogs/about/ +[53]:http://www.webmin.com/ +[54]:http://ss64.com/bash/ulimit.html +[55]:https://github.com/opsengine/cpulimit +[56]:https://www.serverdensity.com/server-monitoring/ +[57]:http://www.opennms.org/ +[58]:http://sysusage.darold.net/ +[59]:http://sourceforge.net/projects/brainypdm/ +[60]:http://www.pcp.io/ +[61]:https://userbase.kde.org/KSysGuard +[62]:http://munin-monitoring.org/ +[63]:http://www.nagios.org/ +[64]:http://www.zenoss.com/ +[65]:http://www.cacti.net/ +[66]:http://www.zabbix.com/ +[67]:https://collectd.org/ +[68]:http://www.observium.org/ +[69]:http://oss.oetiker.ch/smokeping/ +[70]:http://mobaxterm.mobatek.net/ +[71]:http://www.shinken-monitoring.org/ \ No newline at end of file From 3290c9db1198a30d691c7c824783f0b22aceb381 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Fri, 30 Oct 2015 14:44:07 +0800 Subject: [PATCH 2369/2517] =?UTF-8?q?20151030-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...stall FreeBSD on Raspberry Pi 2 Model B.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md diff --git a/sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md b/sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md new file mode 100644 index 0000000000..5d2817d1b7 --- /dev/null +++ b/sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md @@ -0,0 +1,94 @@ +How To Install FreeBSD on Raspberry Pi 2 Model B +================================================================================ +How do I install FreeBSD 10 or FreeBSD 11 (current) on Raspberry Pi 2 Model B? How do I flash the SD Card using Linux, OS X, FreeBSD or Unix-like operating system? + +You can easily install FreeBSD 10 or FreeBSD 11 (current) on Raspberry Pi 2 Model B. You can build a nice and easy to use Unix server using FreeBSD operating system. FreeBSD-CURRENT has supported Raspberry Pi since November, 2012 and Raspberry Pi 2 since March, 2015. In this quick tutorial I'm going to explain how to install FreeBSD 11 current arm port on RPI2. + +### 1. Download FreeBSD-current image for arm ### + +You can [visit this page to grab pre built][1] images for Raspberry Pi 2. Use wget or curl command to download image: + + $ wget ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz + +OR + + $ curl -O ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz + +### 2. Decompress FreeBSD-current image ### + +Type any one of the following command: + + $ unxz FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz + +OR + + $ xz --decompress FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz + +### 3. SD Card Setup ### + +You can flash the SD card using OS X, Linux, FreeBSD, MS-Windows and Unix-like operating system. + +### Flashing FreeBSD-current using Mac OS X ### + +Type the following dd command: + + $ diskutil list + $ diskutil unmountDisk /dev/diskN + $ sudo dd if=FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img of=/dev/disk2 bs=64k + +Sample outputs: + + 1024+0 records in + 1024+0 records out + 1073741824 bytes transferred in 661.669584 secs (1622776 bytes/sec) + +#### Flashing FreeBSD-current using Linux/FreeBSD or Unix-like system #### + +The syntax is: + + $ dd if=FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img of=/dev/sdb bs=1M + +Make sure you replace /dev/sdb with actual SD card device name. + +### 4. Boot FreeBSD ### + +Insert in the SD card in your Raspberry Pi 2 Model B. You need to connect keyboard, mouse and display monitor. I'm using USB to serial cable to get output on screen: + +![Fig.01 RPi USB based serial connection](http://s0.cyberciti.org/uploads/faq/2015/10/Raspberry-Pi-2-Model-B.pin-out.jpg) + +Fig.01 RPi USB based serial connection + +In this following example, I'm connecting to my RPi using screen command: + + ## Linux version ## + screen /dev/tty.USB0 115200 + + ## OS X version ## + screen /dev/cu.usbserial 115200 + + ## Windows user use Putty.exe ## + +Sample FreeBSD RPI boot session: + +![Gif 01: Booting FreeBSD-current on RPi 2](http://s0.cyberciti.org/uploads/faq/2015/10/freebsd-current-rpi.gif) + +Gif 01: Booting FreeBSD-current on RPi 2 + +### 5. FreeBSD username and password for RPi 2 ### + +The default passwords for the images are freebsd/freebsd and root/root. + +And, there you have it, FreeBSD-current installed and running on RPi 2. + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/how-to-install-freebsd-on-raspberry-pi-2-model-b/ + +作者:[Vivek Gite][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.cyberciti.biz/tips/about-us +[1]:ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0 \ No newline at end of file From 6792dea98fec0f15350460d45958a7b4df545272 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 30 Oct 2015 15:33:14 +0800 Subject: [PATCH 2370/2517] Update 20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md --- ...0151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md b/sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md index 5d2817d1b7..514e50cce0 100644 --- a/sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md +++ b/sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md @@ -1,3 +1,4 @@ +translation by strugglingyouth How To Install FreeBSD on Raspberry Pi 2 Model B ================================================================================ How do I install FreeBSD 10 or FreeBSD 11 (current) on Raspberry Pi 2 Model B? How do I flash the SD Card using Linux, OS X, FreeBSD or Unix-like operating system? @@ -91,4 +92,4 @@ via: http://www.cyberciti.biz/faq/how-to-install-freebsd-on-raspberry-pi-2-model 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.cyberciti.biz/tips/about-us -[1]:ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0 \ No newline at end of file +[1]:ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0 From 9bcce61eb7cddb3c6a863f91fcf6f7a8023c00da Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 30 Oct 2015 18:34:34 +0800 Subject: [PATCH 2371/2517] Update 20151030 80 Linux Monitoring Tools for SysAdmins.md --- .../share/20151030 80 Linux Monitoring Tools for SysAdmins.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20151030 80 Linux Monitoring Tools for SysAdmins.md b/sources/share/20151030 80 Linux Monitoring Tools for SysAdmins.md index 420db8fb89..f9384d4635 100644 --- a/sources/share/20151030 80 Linux Monitoring Tools for SysAdmins.md +++ b/sources/share/20151030 80 Linux Monitoring Tools for SysAdmins.md @@ -1,3 +1,5 @@ + +translation by strugglingyouth 80 Linux Monitoring Tools for SysAdmins ================================================================================ ![](https://serverdensity-wpengine.netdna-ssl.com/wp-content/uploads/2015/02/linux-monitoring.jpg) @@ -600,4 +602,4 @@ via: https://blog.serverdensity.com/80-linux-monitoring-tools-know/ [68]:http://www.observium.org/ [69]:http://oss.oetiker.ch/smokeping/ [70]:http://mobaxterm.mobatek.net/ -[71]:http://www.shinken-monitoring.org/ \ No newline at end of file +[71]:http://www.shinken-monitoring.org/ From 8ae455a59a7c4596b68bd9ffd7d24ceb6cc4e4af Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 31 Oct 2015 19:24:14 +0800 Subject: [PATCH 2372/2517] PUB:20151015 New Collaborative Group to Speed Real-Time Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @unicornx 翻译的很不错,看来你是RTL 行内人士啊。 --- ...borative Group to Speed Real-Time Linux.md | 78 ++++++++++++++++++ ...borative Group to Speed Real-Time Linux.md | 79 ------------------- 2 files changed, 78 insertions(+), 79 deletions(-) create mode 100644 published/20151015 New Collaborative Group to Speed Real-Time Linux.md delete mode 100644 translated/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md diff --git a/published/20151015 New Collaborative Group to Speed Real-Time Linux.md b/published/20151015 New Collaborative Group to Speed Real-Time Linux.md new file mode 100644 index 0000000000..34d14e2253 --- /dev/null +++ b/published/20151015 New Collaborative Group to Speed Real-Time Linux.md @@ -0,0 +1,78 @@ +新的 RTL 协作组将加速实时 Linux 的发展 +================================================================================ +![](http://www.linux.com/images/stories/66866/Tux-150.png) + +在本周的 Linux 大会活动(LinuxCon)上 Linux 基金会(Linux Foundation)[宣称][1],实时Linux操作系统项目(RTL,Real-Time Linux)得到了新的资金支持,并预期这将促进该项目,使其自成立15年来第一次有机会在实时操作性上和其他的实时操作系统(RTOS,Real Time Operation System)一较高下。Linux 基金会将 RTL 组重组为一个新的项目,并命名为RTL协作组(Real-Time Linux Collaborative Project),该项目将获得更有力的资金支持,更多的开发人员将投入其中,并更加紧密地集成到 Linux 内核主线开发中。 + +根据 Linux 基金会的说法,RTL 项目并入 Linux基金会旗下后,“在研发方面将为业界节省数百万美元的费用。”同时此举也将“通过强有力的上游内核测试体系而改善本项目的代码质量”。 + +在过去的十几年中,RTL 项目的开发管理和经费资助主要由[开源自动化开发实验室] [2](OSADL,Open Source Automation Development Lab)承担,OSADL 将继续作为新合作项目的金牌成员之一,但其原来承担的资金资助工作将会在一月份移交给 Linux 基金会。RTL 项目和 [OSADL][3] 长久以来一直负责维护[内核的实时抢占(RT-Preempt 或 Preempt-RT)][4]补丁,并定期将其更新到 Linux 内核的主线上。 + +据长期以来一直担任 OSADL 总经理的 Carsten Emde 博士介绍,支持内核实时特性的工作已经完成了将近 90%。 “这就像盖房子,”他解释说。 “主要的部件,如墙壁,窗户和门都已经安装到位,就实时内核来说,类似的主要部件包括:高精度定时器(high-resolution timers),中断线程化机制(interrupt threads)和优先级可继承的互斥量(priority-inheritance mutexes)等。然后所剩下的就是需要一些边边角角的工作,就如同装修房子过程中还剩下铺设如地毯和墙纸等来完成最终的工程。” + +以 Emde 观点来看,从技术的角度来说,实时 Linux 的性能已经可以媲美绝大多数其他的实时操作系统 - 但前提是你要不厌其烦地把所有的补丁都打上。 Emde 的原话如下:“该项目(LCTT 译注,指RTL)的唯一目标就是提供一个满足实时性要求的 Linux 系统,使其无论运行状况如何恶劣都可以保证在确定的、可以预先定义的时间期限内对外界处理做出响应。这个目标已经实现,但需要你手动地将 RTL 提供的补丁添加到 Linux 内核主线的版本代码上,但将来的不用打补丁的实时 Linux 内核也能实现这个目标。唯一的,当然也是最重要的区别就是相应的维护工作将少得多,因为我们再也不用一次又一次移植那些独立于内核主线的补丁代码了。” + +新的 RTL 协作组将继续在 Thomas Gleixner 的指导下工作,Thomas Gleixner 在过去的十多年里一直是 RTL 的核心维护人员。本周,Gleixner 被任命为 Linux 基金会成员,并加入了一个特别的小组,小组成员包括 Linux 稳定内核维护者Greg Kroah-Hartman,Yocto 项目维护者 Richard Purdie 和 Linus Torvalds 本人。 + +据 Emde 介绍,RTL 的第二维护人 Steven Rostedt 来自 Red Hat 公司,他负责“维护旧的,但尚保持维护的内核版本”,他将和同样来自 Red Hat 的 Ingo Molnàr 继续参与该项目,Ingo 是 RTL 的关键开发人员,但近年来更多地从事咨询方面的工作。有些令人惊讶的是,Red Hat 竟然不是 RTL 协作组的成员之一。相反,谷歌作为唯一的白金会员占据了头把交椅,其他黄金会员包括国家仪器公司(NI,National Instruments),OSADL 和德州仪器(TI)。银卡会员包括Altera 公司,ARM,Intel 和 IBM。 + +###走向实时内核的漫长道路### + +当15年前 Linux 第一次出现在嵌入式设备上的时候,它所面临的嵌入式计算市场已经被其他的实时操作系统,譬如风河公司(WindRiver)的 VxWorks,所牢牢占据。VxWorks 从那时起到现在,一直在为众多的工控设备、航空电子设备以及交通运输应用提供着工业级别的高确定性的,硬实时的内核。微软后来也提供了一个支持实时性的操作系统版本- Windows CE,当时的 Linux 所面临的是来自潜在工业客户的公开嘲讽和层层阻力。他们认为那些从桌面系统改进来的 Linux 发行版本顶多适合要求不高的轻量级消费类电子产品,而不适合那些对硬实时要求更高的设备。 + +对于嵌入式 Linux 的先行者如 [MontaVista 公司][6]来说,其[早期的目标][5]很明确就是要改进 Linux 的实时能力。多年以来,对 Linux 的实时性能开发发展迅速,得到各种组织的支持,如[成立于2006年][7]的 OSADL,以及实时 Linux 基金会(RTLF,Real-Time Linux Foundation)。在2009年 [OSADL 与 RTLF 合并][8],OSADL 及其 RTL 组承担了所有的抢占式实时内核(Preempt-RT)补丁的维护工作和将补丁提交到上游内核主线的工作。除此之外 OSADL 还负责监管其他自动化相关的项目,例如[高可靠性 Linux][9](Safety Critical Linux)(译者注:指研究如何在关键系统上可靠安全地运行Linux)。 + +OSADL 对 RTL 的支持经历了三个阶段:拥护和推广,测试和质量评估,以及最后的资金支持。Emde 表示,在早期,OSADL 的角色仅限于写写推广的文章,制作专题报告,组织相关培训,以及“宣传” RTL 的优点。他说:“要让一个相当保守的工控行业接受象 Linux 之类的新技术及其基于社区的那种开发模式,首先就需要建立其对新事物的信任。从使用专有的实时操作系统转向改用 Linux 对公司意味着必须引入新的战略和流程,才能与社区进行互动。” + +后来,OSADL 改而提供技术性能数据,建立[质量评估和测试中心][10],并在和开源相关的法律事务问题和安全认证方面向行业成员提供帮助。 + +当 RTL 在实时性上变得愈加成熟的同时,相反地 Windows CE 却是江河日下,[其市场份额正在快速地被 RTL 所蚕食][11],一些与 RTL 竞争的实时 Linux 项目,主要是 [Xenomai][12] 也已开始集成 RTL。 + +“伴随 RTL 补丁的成功,以及明确的预期其最终会被完整集成到 Linux 内核主线代码中,导致 Xenomai 关注的重心发生了变化,”Emde 说。 “Xenomai 3.0 可与 RT 补丁结合起来使用,并提供了所谓的‘皮肤’,(LCTT 译注:一个封装层),使我们可以复用为其他系统编写的代码。不过,它们还没有完全统一起来,因为 Xenomai 使用了双内核方法,而RT 补丁只适用于单一的 Linux 内核。“ + +近些年来,RTL 组的资助来源越来越少,所以最终 OSADL 接过了这个重任。Emde 说:“当最近开发工作因缺少资金而陷入停滞时,OSADL 对 RTL 的支持进入到第三个重大阶段:开始直接资助 Thomas Gleixner 的工作。” + +正如 Emde 在其[10月5日的一篇博文][13]中所描述的那样,实时 Linux 的应用领域正在日益扩大,由其原来主要服务的工业控制扩大到了汽车行业和电信业等领域,这表明资助的来源也应该得到拓宽。Emde 原文写道:“仅仅靠来自工控行业的资金来支撑全部的工作是不合理的,因为电信等其他行业也在享用实时 Linux 内核。” + +当 Linux 基金会表明有兴趣提供资金支持时,OSADL 认为“单一的资助和控制渠道要有效得多”(LCTT 译注:指最终由Linux 基金会全盘接手了 RTL 项目),Emde 如是说。不过,他补充说,作为黄金级成员,OSADL 仍参与监管项目的工作,会继续从事其宣传和质量保证方面的活动。 + +###汽车行业期待 RTL 的崛起### + +Emde 表示,RTL 会继续在工业应用领域飞速发展并逐渐取代其他实时操作系统。而且,他补充说,RTL 在汽车行业发展也很迅猛,以后会扩大并应用到铁路和航空电子设备上。 + +的确,Linux 在汽车行业将扮演越来越重要的角色,这也是 Linux 基金对 RTL 所寄予厚望的原因之所在。RTL 工作组可能会与 Linux 基金会旗下的[车载Linux][14](AGL,Automotive Grade Linux)工作组展开合作。Emde 猜测,Google 高调参与的主要动因可能也是希望将 RTL 用于汽车控制。此外,德州仪器(TI)也非常期望将其 Jacinto 处理器应用于汽车行业。 + +面向车载 Linux 的项目(比如AGL)的目标是要扩大 Linux 在车载设备上的应用范围,其应用不是仅限于车载信息娱乐(IVI,In-Vehicle Infotainment),而是要进入到譬如集群控制和车载通讯领域,而这些领域目前主要使用的是 QNX 之类的实时操作系统。无人驾驶汽车在实时性上对操作系统也有很高的要求。 + +Emde 特别指出,OSADL 的 [SIL2LinuxMP][15] 项目可能会在将 RTL 引入到汽车工业领域上扮演重要的角色。SIL2LinuxMP 并不是专门针对汽车工业的项目,但随着 BMW 公司参与其中,汽车行业成为其很重要的应用领域之一。该项目的目标在于验证 RTL 在采用单核或多核 CPU 的标准化商用(COTS,Commercial Off-The-Shelf)板卡上运行所需的基本组件。它定义了引导程序、根文件系统、Linux 内核以及对应支持 RTL 的 C 库。 + +无人机和机器人使用实时 Linux 的时机也已成熟,Xenomai 系统早已用在许多机器人以及一些无人机中。不过,在更广泛的嵌入式 Linux 世界,包括了消费电子产品和物联网应用中,RTL 可以扮演的角色很有限。主要的障碍在于,无线通信和互联网本身会带来延迟。 + +Emde 说:“目前实时 Linux 主要还是应用于系统内部控制以及系统与周边外设之间的控制,在远程控制机器上作用不大。企图通过互联网实现实时控制恐怕不是一件可行的事情。” + +-------------------------------------------------------------------------------- + +via: http://www.linux.com/news/software/applications/858828-new-collaborative-group-to-speed-real-time-linux + +作者:[Eric Brown][a] +译者:[unicornx](https://github.com/unicornx) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linux.com/community/forums/person/42808 +[1]:http://www.linuxfoundation.org/news-media/announcements/2015/10/linux-foundation-announces-project-advance-real-time-linux +[2]:http://archive.linuxgizmos.com/celebrating-the-open-source-automation-development-labs-first-birthday/ +[3]:https://www.osadl.org/ +[4]:http://linuxgizmos.com/adding-real-time-to-linux-with-preempt-rt/ +[5]:http://archive.linuxgizmos.com/real-time-linux-what-is-it-why-do-you-want-it-how-do-you-do-it-a/ +[6]:http://www.linux.com/news/embedded-mobile/mobile-linux/841651-embedded-linux-pioneer-montavista-spins-iot-linux-distribution +[7]:http://archive.linuxgizmos.com/industry-group-aims-linux-at-automation-apps/ +[8]:http://archive.linuxgizmos.com/industrial-linux-groups-merge/ +[9]:https://www.osadl.org/Safety-Critical-Linux.safety-critical-linux.0.html +[10]:http://www.osadl.org/QA-Farm-Realtime.qa-farm-about.0.html +[11]:http://www.linux.com/news/embedded-mobile/mobile-linux/818011-embedded-linux-keeps-growing-amid-iot-disruption-says-study +[12]:http://xenomai.org/ +[13]:https://www.osadl.org/Single-View.111+M5dee6946dab.0.html +[14]:http://www.linux.com/news/embedded-mobile/mobile-linux/833358-first-open-automotive-grade-linux-spec-released +[15]:http://www.osadl.org/SIL2LinuxMP.sil2-linux-project.0.html \ No newline at end of file diff --git a/translated/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md b/translated/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md deleted file mode 100644 index e3650558c6..0000000000 --- a/translated/talk/20151015 New Collaborative Group to Speed Real-Time Linux.md +++ /dev/null @@ -1,79 +0,0 @@ -新的合作组将加速实时Linux的发展 -================================================================================ -![](http://www.linux.com/images/stories/66866/Tux-150.png) - -在本周的Linux大会活动(LinuxCon)上Linux基金会(Linux Foundation)[宣称][1],“Real-Time - Linux”项目(译者注:实时Linux操作系统项目,简称RTL)得到了新的资金支持,并预期这将促进该项目,使其自成立15年来第一次有机会在实时操作性上和其他的实时操作系统(RTOS,译者注:Real Time Operation System)一较高下。Linux基金会将RTL项目重组为一个新的项目,并命名为“Real-Time Linux Collaborative Project”(译者注,下文将称其为“RTL协作组”),该项目将获得更有力的资金支持,更多的开发人员将投入其中,并在开发和集成上和Linux内核主线保持更紧密的联系。 - -根据Linux基金会的说法,RTL项目并入Linux基金会后“将为业界节省数百万美元的重复研发费用。”同时此举也将“通过基于稳定的主线内核版本开发而改善本项目的代码质量”。 - -在过去的十几年中,RTL项目的开发管理和经费资助主要由[开源自动化开发实验室(译者注:Open Source Automation Development Lab,以下简称OSADL)] [2]承担,OSDL将继续作为新合作项目的金牌成员之一,但其原来承担的资金资助工作将会在一月份移交给Linux基金。RTL项目和[OSADL][3]长久以来一直负责维护[内核的实时抢占(RT-Preempt)补丁][4],并定期将其更新到Linux内核的主线上。 - -据长期以来一直担任OSADL总经理的Carsten Emde博士介绍,支持内核实时特性的工作已经完成了将近90%。 “这就像盖房子,”他解释说。 “主要的部件,如墙壁,窗户和门都已经安装到位,就实时内核来说,类似的主要部件包括:高精度定时器(high-resolution timers),中断线程化机制(interrupt threads)和基于优先级可继承的互斥量(priority-inheritance mutexes)等。你所剩下的就是还需要一些边边角角的工作,就如同装修房子过程中还剩下铺设如地毯和墙纸等来完成最终的工程。” - -以Emde观点来看,从技术的角度来说,实时Linux的性能已经可以媲美绝大多数其他的实时操作系统 - 但前提是你要不厌其烦地把所有的补丁都打上。 Emde的原话如下:“该项目(译者注,指RTL)的唯一目标就是提供一个满足实时性要求Linux系统,使其无论运行状况如何恶劣都可以保证在确定的可以预先定义的时间期限内对外界处理做出响应。这个目标已经实现,但需要你手动地将RTL提供的补丁添加到Linux内核主线的版本代码上,但新项目将在Linux内核主线版本上直接支持同样的的目标。唯一的,当然也是最重要的区别就是相应的维护工作将少得多,因为我们再也不用一次又一次移植那些独立于内核主线的补丁代码了。” - -新的RTL协作组将继续在Thomas Gleixner的指导下工作,Thomas Gleixner在过去的十多年里一直是RTL的核心维护人员。本周,Gleixner被任命为Linux基金会成员,并加入了一个特别的小组,小组成员包括Linux稳定内核维护者Greg Kroah-Hartman,Yocto项目维护者Richard Purdie和Linus Torvalds本人。 - -据Emde介绍,RTL的第二维护人Steven Rostedt来自Red Hat公司,他负责维护旧的内核版本,他将和同样来自Red Hat的Ingo Molnàr继续参与该项目,Ingo是RTL的关键开发人员,但近年来更多地从事咨询方面的工作。有些令人惊讶的是,Red Hat竟然不是RTL协作组的成员之一。相反,谷歌作为唯一的白金会员占据了头把交椅,其他黄金会员包括国家仪器公司(National Instruments,简称NI),OSADL和德州仪器(TI)。银卡会员包括Altera公司,ARM,Intel和IBM。 - -###走向实时内核的漫长道路### - -当15年前Linux第一次出现在嵌入式设备上的时候,它所面临的嵌入式计算市场已经被其他的实时操作系统,譬如风河公司(WindRiver)的VxWorks,所牢牢占据。VxWorks从那时起到现在,一直在为众多的工控设备,航空电子设备以及交通运输应用提供着工业级别的高确定性的,硬实时的内核。微软后来也提供了一个支持实时性的操作系统版本-Windows CE,当时的Linux所面临的是来自潜在工业客户的公开嘲讽和层层阻力。他们认为那些从桌面系统改进来的Linux发行版本顶多适合要求不高的轻量级消费类电子产品,而不适合那些对硬实时要求更高的设备。 - -对于嵌入式Linux的先行者如[MontaVista公司][6]来说,其[早期的目标][5]很明确就是要改进Linux的实时能力。多年以来,对Linux的实时性能开发发展迅速,得到各种组织的支持,如OSADL[成立于2006年][7],以及实时Linux基金会(Real-Time Linux Foundation,简称RTLF)。在2009年[OSADL与RTLF合并][8],OSADL及其RTL组承担了所有的抢占式实时内核(PREEMPT-RT)补丁的维护工作并始终保存跟踪最新的Linux内核主线版本。除此之外OSADL还负责监管其他自动化相关的项目,例如[高可靠性Linux][9](Safety Critical Linux,译者注:指研究如何在关键系统上可靠安全地运行Linux)。 - -OSADL对RTL的支持经历了三个阶段:拥护和推广,测试和质量评估,以及最后的资金支持。Emde表示,在早期,OSADL的角色仅限于写写推广的文章,制作专题报告,组织相关培训,以及“宣传”RTL的优点。他说:“要让一个相当保守的工控行业接受象Linux之类的新技术及其基于社区的那种开发模式,首先就需要建立其对新事物的信心。从使用专有的实时操作系统转向改用Linux对公司意味着必须引入新的战略和流程,才能与社区进行互动。” - -后来,OSADL改而提供技术性能数据,建立[质量评估和测试中心][10],并在和开源相关的法律事务问题和安全认证方面向行业成员提供帮助。 - -当RTL在实时性上变得愈加成熟的同时,相反地Windows CE却是江河日下,[其市场份额正在快速地被RTL所蚕食][11],一些与RTL竞争的实时Linux项目,主要是[Xenomai][12]也已开始集成RTL。 - -“伴随RTL补丁的成功发展,以及明确的预期其最终会被集成到Linux内核主线代码中,导致Xenomai关注的重心发生了变化,”Emde说。 “Xenomai 3.0可与RT补丁结合起来使用,并提供了所谓的‘皮肤’,(译者注:一个封装层),使我们可以复用为其他系统编写的代码。不过,它们还没有完全统一起来,因为Xenomai使用了双内核方法,而RT补丁只适用于单一的Linux内核。“ - -近些年来,RTL项目的资助来源越来越少,所以最终OSADL接过了这个重任。Emde说:“当最近开发工作因缺少资金而陷入停滞时,OSADL对RTL的支持进入到第三个重大阶段:开始直接资助Thomas Gleixner的工作。” - -正如Emde在其[10月5日的一篇博文][13]中所描述的那样,实时Linux的应用领域正在日益扩大,由其原来主要服务的工业控制扩大到了汽车行业和电信业等领域,这表明资助的来源也应该得到拓宽。Emde原文写道:“仅仅靠来自工控行业的资金来支撑全部的工作是不合理的,因为电信等其他行业也在享用实时Linux内核。” - -当Linux基金会表明有兴趣提供资金支持时,OSADL认为“单一的资助和控制渠道要有效得多”(译者注:指最终由Linux基金会全盘接手了RTL项目),Emde如是说。不过,他补充说,作为黄金级成员,OSADL仍参与监管项目的工作,会继续从事其宣传和质量保证方面的活动。 - -###汽车行业期待RTL的崛起### - -Emde表示,RTL会继续在工业应用领域飞速发展并逐渐取代其他实时操作系统。而且,他补充说,RTL在汽车行业发展也很迅猛,以后会扩大并应用到铁路和航空电子设备上。 - -的确,Linux在汽车行业将扮演越来越重要的角色,这也是Linux基金对RTL所寄予厚望的原因之所在。RTL工作组可能会与Linux基金会旗下的[车载Linux(Automotive Grade Linux,简称AGL)][14]工作组展开合作。Emde猜测,Google高调参与的主要动因可能也是希望将RTL用于汽车控制。此外,德州仪器(TI)也非常期望将其Jacinto处理器应用于汽车行业。 - -面向车载Linux的项目(比如AGL)的目标是要扩大Linux在车载设备上的应用范围,其应用不是仅限于车载信息娱乐(In-Vehicle Infotainment,简称IVI),而是要进入到譬如集群控制和车载通讯领域,而这些领域目前主要使用的是QNX之类的实时操作系统。无人驾驶汽车在实时性上对操作系统也有很高的要求。 - -Emde特别指出,OSADL的[SIL2LinuxMP][15]项目可能会在将RTL引入到汽车工业领域上扮演重要的角色。SIL2LinuxMP并不是专门针对汽车工业的项目,但随着BMW公司参与其中,汽车行业成为其很重要的应用领域之一。该项目的目标在于验证RTL在采用单核或多核CPU的标准化商用(Commercial Off-The-Shelf,简称COTS)板卡上运行所需的基本组件。它定义了引导程序、根文件系统、Linux内核以及对应支持RTL的C库。 - -无人机和机器人使用实时Linux的时机也已成熟,Xenomai系统早已用在许多机器人以及一些无人机中。不过,在更广泛的嵌入式Linux世界,包括了消费电子产品和物联网应用中,RTL可以扮演的角色很有限。主要的障碍在于,无线通信和互联网本身会带来延迟。 - -Emde说:“目前实时Linux主要还是应用于系统内部控制以及系统与周边外设之间的控制,在远程控制机器上作用不大。企图通过互联网实现实时控制恐怕不是一件可行的事情。” - --------------------------------------------------------------------------------- - -via: http://www.linux.com/news/software/applications/858828-new-collaborative-group-to-speed-real-time-linux - -作者:[Eric Brown][a] -译者:[unicornx](https://github.com/unicornx) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linux.com/community/forums/person/42808 -[1]:http://www.linuxfoundation.org/news-media/announcements/2015/10/linux-foundation-announces-project-advance-real-time-linux -[2]:http://archive.linuxgizmos.com/celebrating-the-open-source-automation-development-labs-first-birthday/ -[3]:https://www.osadl.org/ -[4]:http://linuxgizmos.com/adding-real-time-to-linux-with-preempt-rt/ -[5]:http://archive.linuxgizmos.com/real-time-linux-what-is-it-why-do-you-want-it-how-do-you-do-it-a/ -[6]:http://www.linux.com/news/embedded-mobile/mobile-linux/841651-embedded-linux-pioneer-montavista-spins-iot-linux-distribution -[7]:http://archive.linuxgizmos.com/industry-group-aims-linux-at-automation-apps/ -[8]:http://archive.linuxgizmos.com/industrial-linux-groups-merge/ -[9]:https://www.osadl.org/Safety-Critical-Linux.safety-critical-linux.0.html -[10]:http://www.osadl.org/QA-Farm-Realtime.qa-farm-about.0.html -[11]:http://www.linux.com/news/embedded-mobile/mobile-linux/818011-embedded-linux-keeps-growing-amid-iot-disruption-says-study -[12]:http://xenomai.org/ -[13]:https://www.osadl.org/Single-View.111+M5dee6946dab.0.html -[14]:http://www.linux.com/news/embedded-mobile/mobile-linux/833358-first-open-automotive-grade-linux-spec-released -[15]:http://www.osadl.org/SIL2LinuxMP.sil2-linux-project.0.html \ No newline at end of file From b30e55c6a6b7d133b8a15285d93f69bd2321efe9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 31 Oct 2015 19:24:54 +0800 Subject: [PATCH 2373/2517] PUB:20151020 Five Years of LibreOffice Evolution (2010-2015) @strugglingyouth --- ...rs of LibreOffice Evolution (2010-2015).md | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) rename {translated/talk => published}/20151020 Five Years of LibreOffice Evolution (2010-2015).md (76%) diff --git a/translated/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md b/published/20151020 Five Years of LibreOffice Evolution (2010-2015).md similarity index 76% rename from translated/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md rename to published/20151020 Five Years of LibreOffice Evolution (2010-2015).md index 6d65849678..e21ebc06e9 100644 --- a/translated/talk/20151020 Five Years of LibreOffice Evolution (2010-2015).md +++ b/published/20151020 Five Years of LibreOffice Evolution (2010-2015).md @@ -1,11 +1,10 @@ - -LibreOffice(2010-2015) 五年的演变 +LibreOffice 这五年(2010-2015) ================================================================================ 注:youtube 视频 -[LibreOffice][1] – 文档基金会(The Document Foundation)一个免费和开源的办公套件。OOo 是[StarOffice][3] 早期的开源版本,LO 在2010年9月28日从 [OpenOffice.org][2] 中被独立出来。LibreOffice 支持文字处理,电子表格,幻灯片,图表和图形,数据库,数学公式的创建和编辑。 +[LibreOffice][1],来自文档基金会(The Document Foundation)一个自由开源的令人惊叹的办公套件。LO (LibreOffice)在2010年9月28日由 [OpenOffice.org][2] 分支出来;而 OOo (OpenOffice.org)则是早期的 [StarOffice][3] 开源版本。LibreOffice 支持文字处理,创建与编辑电子表格,幻灯片,图表和图形,数据库,数学公式的创建和编辑等。 ### 核心应用: ### @@ -18,52 +17,51 @@ LibreOffice(2010-2015) 五年的演变 ![LibreOffice 3.3, 2011](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.3/Help-License-Info.png) -LibreOffice 3.3, 2011 +*LibreOffice 3.3, 2011* -LibreOffice 的第一个版本 - OpenOffice.org 的一个分支 +这是LibreOffice 的第一个版本 - 分支自 OpenOffice.org ![LibreOffice 3.4](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.4/1cc80d1cada204a061402785b2048f7clibreoffice-3.4.3.png) -LibreOffice 3.4 +*LibreOffice 3.4* ![LibreOffice 3.5](https://raw.githubusercontent.com/paulcarroty/Articles/master/LO_History/3.5/libreoffice35-large_001.jpg) -LibreOffice 3.5 +*LibreOffice 3.5* ![LibreOffice 3.6](https://github.com/paulcarroty/Articles/raw/master/LO_History/3.6/libreoffice-3.6.0.png) -LibreOffice 3.6 +*LibreOffice 3.6* ![Libre Office 4.0](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.0/libreoffice-writer.png) -LibreOffice 4.0 +*LibreOffice 4.0* ![Libre Office 4.1](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.1/Writer1.png) -LibreOffice 4.1 +*LibreOffice 4.1* ![Libre Office 4.2](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.2/libreoffice-4.2.png) -Libre Office 4.2 +*Libre Office 4.2* ![LibreOffice 4.3](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.3/libreoffice.jpg) -LibreOffice 4.3 +*LibreOffice 4.3* ![LibreOffice 4.4](https://github.com/paulcarroty/Articles/raw/master/LO_History/4.4/LibreOffice_Writer_4_4_2.png) -LibreOffice 4.4 +*LibreOffice 4.4* ![Libre Office 5.0](https://github.com/paulcarroty/Articles/raw/master/LO_History/5.0/LibreOffice_Writer_5.0.png) -LibreOffice 5.0 +*LibreOffice 5.0* ### Libre Office 的发展,出自 Wikipedia ### ![StarOffice major derivatives](https://commons.wikimedia.org/wiki/File%3AStarOffice_major_derivatives.svg) - -### 回顾 LibreOffice 5.0 ### +### LibreOffice 5.0 预览 ### 注:youtube 视频 @@ -75,7 +73,7 @@ via: https://tlhp.cf/libreoffice-5years-evolution/ 作者:[Pavlo Rudyi][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From acb9e4db67ab0ec0f1f6a77b42608ffbe6c0ac2c Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sat, 31 Oct 2015 21:56:38 +0800 Subject: [PATCH 2374/2517] Delete 20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md --- ...stall FreeBSD on Raspberry Pi 2 Model B.md | 95 ------------------- 1 file changed, 95 deletions(-) delete mode 100644 sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md diff --git a/sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md b/sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md deleted file mode 100644 index 514e50cce0..0000000000 --- a/sources/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md +++ /dev/null @@ -1,95 +0,0 @@ -translation by strugglingyouth -How To Install FreeBSD on Raspberry Pi 2 Model B -================================================================================ -How do I install FreeBSD 10 or FreeBSD 11 (current) on Raspberry Pi 2 Model B? How do I flash the SD Card using Linux, OS X, FreeBSD or Unix-like operating system? - -You can easily install FreeBSD 10 or FreeBSD 11 (current) on Raspberry Pi 2 Model B. You can build a nice and easy to use Unix server using FreeBSD operating system. FreeBSD-CURRENT has supported Raspberry Pi since November, 2012 and Raspberry Pi 2 since March, 2015. In this quick tutorial I'm going to explain how to install FreeBSD 11 current arm port on RPI2. - -### 1. Download FreeBSD-current image for arm ### - -You can [visit this page to grab pre built][1] images for Raspberry Pi 2. Use wget or curl command to download image: - - $ wget ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz - -OR - - $ curl -O ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz - -### 2. Decompress FreeBSD-current image ### - -Type any one of the following command: - - $ unxz FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz - -OR - - $ xz --decompress FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz - -### 3. SD Card Setup ### - -You can flash the SD card using OS X, Linux, FreeBSD, MS-Windows and Unix-like operating system. - -### Flashing FreeBSD-current using Mac OS X ### - -Type the following dd command: - - $ diskutil list - $ diskutil unmountDisk /dev/diskN - $ sudo dd if=FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img of=/dev/disk2 bs=64k - -Sample outputs: - - 1024+0 records in - 1024+0 records out - 1073741824 bytes transferred in 661.669584 secs (1622776 bytes/sec) - -#### Flashing FreeBSD-current using Linux/FreeBSD or Unix-like system #### - -The syntax is: - - $ dd if=FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img of=/dev/sdb bs=1M - -Make sure you replace /dev/sdb with actual SD card device name. - -### 4. Boot FreeBSD ### - -Insert in the SD card in your Raspberry Pi 2 Model B. You need to connect keyboard, mouse and display monitor. I'm using USB to serial cable to get output on screen: - -![Fig.01 RPi USB based serial connection](http://s0.cyberciti.org/uploads/faq/2015/10/Raspberry-Pi-2-Model-B.pin-out.jpg) - -Fig.01 RPi USB based serial connection - -In this following example, I'm connecting to my RPi using screen command: - - ## Linux version ## - screen /dev/tty.USB0 115200 - - ## OS X version ## - screen /dev/cu.usbserial 115200 - - ## Windows user use Putty.exe ## - -Sample FreeBSD RPI boot session: - -![Gif 01: Booting FreeBSD-current on RPi 2](http://s0.cyberciti.org/uploads/faq/2015/10/freebsd-current-rpi.gif) - -Gif 01: Booting FreeBSD-current on RPi 2 - -### 5. FreeBSD username and password for RPi 2 ### - -The default passwords for the images are freebsd/freebsd and root/root. - -And, there you have it, FreeBSD-current installed and running on RPi 2. - --------------------------------------------------------------------------------- - -via: http://www.cyberciti.biz/faq/how-to-install-freebsd-on-raspberry-pi-2-model-b/ - -作者:[Vivek Gite][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.cyberciti.biz/tips/about-us -[1]:ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0 From f5c9963f2419220c3df4febdfee5df8c46201bf0 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sat, 31 Oct 2015 21:57:20 +0800 Subject: [PATCH 2375/2517] Create 20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md --- ...stall FreeBSD on Raspberry Pi 2 Model B.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 translated/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md diff --git a/translated/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md b/translated/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md new file mode 100644 index 0000000000..941d3a2b72 --- /dev/null +++ b/translated/tech/20151030 How To Install FreeBSD on Raspberry Pi 2 Model B.md @@ -0,0 +1,98 @@ + +如何在树莓派2 B型上安装 FreeBSD +================================================================================ + +在树莓派2 B型上如何安装 FreeBSD 10 或 FreeBSD 11(current)?怎么在 Linux,OS X,FreeBSD 或类 Unix 操作系统上烧录 SD 卡? + +在树莓派2 B型上安装 FreeBSD 10或 FreeBSD 11(current)很容易。使用 FreeBSD 操作系统可以打造一个非常易用的 Unix 服务器。FreeBSD-CURRENT 自2012年十一月以来一直支持树莓派,2015年三月份后也开始支持树莓派2了。在这个快速教程中我将介绍如何在 RPI2 上安装 FreeBSD 11 current arm 版。 + +### 1. 下载 FreeBSD-current 的 arm 镜像 ### + +你可以 [访问这个页面来下载][1] 树莓派2的镜像。使用 wget 或 curl 命令来下载镜像: + + + $ wget ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz + +或 + + $ curl -O ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz + +### 2. 解压 FreeBSD-current 镜像 ### + +执行以下命令中的任何一个: + + $ unxz FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz + +或 + + $ xz --decompress FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img.xz + +### 3. 设置 SD ### + +你可以在 OS X,Linux,FreeBSD,MS-Windows 和类 Unix 系统来烧录 SD 卡。 + +### 在 Mac OS X 下烧录 FreeBSD-current ### + +使用下面的 dd 命令: + + $ diskutil list + $ diskutil unmountDisk /dev/diskN + $ sudo dd if=FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img of=/dev/disk2 bs=64k + +示例输出: + + 1024+0 records in + 1024+0 records out + 1073741824 bytes transferred in 661.669584 secs (1622776 bytes/sec) + +#### 使用 Linux/FreeBSD 或者 类 Unix 系统来烧录 FreeBSD-current #### + +语法是这样: + + $ dd if=FreeBSD-11.0-CURRENT-arm-armv6-RPI2-20151016-r289420.img of=/dev/sdb bs=1M + +确保使用实际 SD 卡的设备名称来替换 /dev/sdb 。 + +### 4. 引导 FreeBSD ### + +在树莓派2 B型上插入 SD 卡。你需要连接键盘,鼠标和显示器。我使用的是 USB 转串口线来连接显示器的: + +![Fig.01 RPi USB based serial connection](http://s0.cyberciti.org/uploads/faq/2015/10/Raspberry-Pi-2-Model-B.pin-out.jpg) + + +图01 RPI 基于 USB 的串行连接 + +在下面的例子中,我使用 screen 命令来连接我的 RPI: + + ## Linux version ## + screen /dev/tty.USB0 115200 + + ## OS X version ## + screen /dev/cu.usbserial 115200 + + ## Windows user use Putty.exe ## + +FreeBSD RPI 启动输出样例: + +![Gif 01: Booting FreeBSD-current on RPi 2](http://s0.cyberciti.org/uploads/faq/2015/10/freebsd-current-rpi.gif) + +图01: 在 RPi 2上引导 FreeBSD-current + +### 5. FreeBSD 在 RPi 2上的用户名和密码 ### + +默认的密码是 freebsd/freebsd 和 root/root。 + +到此为止, FreeBSD-current 已经安装并运行在 RPi 2上。 + +-------------------------------------------------------------------------------- + +via: http://www.cyberciti.biz/faq/how-to-install-freebsd-on-raspberry-pi-2-model-b/ + +作者:[Vivek Gite][a] +译者:[译者ID](https://github.com/译者ID) +校对:[strugglingyouth](https://github.com/strugglingyouth) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.cyberciti.biz/tips/about-us +[1]:ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0 From b948c160a0158afb6e42bea6a0766434603e7e64 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 31 Oct 2015 22:37:42 +0800 Subject: [PATCH 2376/2517] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201510?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150202 How to filter BGP routes in Quagga BGP router.md | 0 published/{ => 201510}/20150716 Interview--Larry Wall.md | 0 .../20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md | 0 .../20150906 Installing NGINX and NGINX Plus With Ansible.md | 0 ...50908 How to Run ISO Files Directly From the HDD with GRUB2.md | 0 ...mmands to Manage File Types and System Time in Linu--Part 3.md | 0 ...150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md | 0 ...w to check weather forecasts from the command line on Linux.md | 0 .../20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md | 0 ...0918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md | 0 .../{ => 201510}/20150918 Install Justniffer In Ubuntu 15.04.md | 0 ...50921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md | 0 .../20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md | 0 ...921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md | 0 .../20150923 How To Upgrade From Oracle 11g To Oracle 12c.md | 0 ...0923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md | 0 .../20150925 HTTP 2 Now Fully Supported in NGINX Plus.md | 0 .../20150930 Debian dropping the Linux Standard Base.md | 0 ...50930 Install and use Ansible (Automation Tool) in CentOS 7.md | 0 ...20151005 pyinfo() A good looking phpinfo-like python script.md | 0 .../20151007 How To Download Videos Using youtube-dl In Linux.md | 0 .../20151007 Open Source Media Player MPlayer 1.2 Released.md | 0 .../20151007 Productivity Tools And Tips For Linux.md | 0 .../{ => 201510}/20151012 10 Useful Utilities For Linux Users.md | 0 ...s--How to change USB device permission permanently on Linux.md | 0 ...rs--How to force password change at the next login on Linux.md | 0 .../20151013 Mytodo--A ToDo List Manager For DIY Lovers.md | 0 .../20151015 New Collaborative Group to Speed Real-Time Linux.md | 0 .../{ => 201510}/20151019 10 passwd command examples in Linux.md | 0 .../{ => 201510}/20151019 11 df command examples in Linux.md | 0 ...To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md | 0 .../20151020 Five Years of LibreOffice Evolution (2010-2015).md | 0 .../{ => 201510}/20151020 Linux History--24 Years Step by Step.md | 0 33 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201510}/20150202 How to filter BGP routes in Quagga BGP router.md (100%) rename published/{ => 201510}/20150716 Interview--Larry Wall.md (100%) rename published/{ => 201510}/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md (100%) rename published/{ => 201510}/20150906 Installing NGINX and NGINX Plus With Ansible.md (100%) rename published/{ => 201510}/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md (100%) rename published/{ => 201510}/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md (100%) rename published/{ => 201510}/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md (100%) rename published/{ => 201510}/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md (100%) rename published/{ => 201510}/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md (100%) rename published/{ => 201510}/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md (100%) rename published/{ => 201510}/20150918 Install Justniffer In Ubuntu 15.04.md (100%) rename published/{ => 201510}/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md (100%) rename published/{ => 201510}/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md (100%) rename published/{ => 201510}/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md (100%) rename published/{ => 201510}/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md (100%) rename published/{ => 201510}/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md (100%) rename published/{ => 201510}/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md (100%) rename published/{ => 201510}/20150930 Debian dropping the Linux Standard Base.md (100%) rename published/{ => 201510}/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md (100%) rename published/{ => 201510}/20151005 pyinfo() A good looking phpinfo-like python script.md (100%) rename published/{ => 201510}/20151007 How To Download Videos Using youtube-dl In Linux.md (100%) rename published/{ => 201510}/20151007 Open Source Media Player MPlayer 1.2 Released.md (100%) rename published/{ => 201510}/20151007 Productivity Tools And Tips For Linux.md (100%) rename published/{ => 201510}/20151012 10 Useful Utilities For Linux Users.md (100%) rename published/{ => 201510}/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md (100%) rename published/{ => 201510}/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md (100%) rename published/{ => 201510}/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md (100%) rename published/{ => 201510}/20151015 New Collaborative Group to Speed Real-Time Linux.md (100%) rename published/{ => 201510}/20151019 10 passwd command examples in Linux.md (100%) rename published/{ => 201510}/20151019 11 df command examples in Linux.md (100%) rename published/{ => 201510}/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md (100%) rename published/{ => 201510}/20151020 Five Years of LibreOffice Evolution (2010-2015).md (100%) rename published/{ => 201510}/20151020 Linux History--24 Years Step by Step.md (100%) diff --git a/published/20150202 How to filter BGP routes in Quagga BGP router.md b/published/201510/20150202 How to filter BGP routes in Quagga BGP router.md similarity index 100% rename from published/20150202 How to filter BGP routes in Quagga BGP router.md rename to published/201510/20150202 How to filter BGP routes in Quagga BGP router.md diff --git a/published/20150716 Interview--Larry Wall.md b/published/201510/20150716 Interview--Larry Wall.md similarity index 100% rename from published/20150716 Interview--Larry Wall.md rename to published/201510/20150716 Interview--Larry Wall.md diff --git a/published/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md b/published/201510/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md similarity index 100% rename from published/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md rename to published/201510/20150821 Linux 4.3 Kernel To Add The MOST Driver Subsystem.md diff --git a/published/20150906 Installing NGINX and NGINX Plus With Ansible.md b/published/201510/20150906 Installing NGINX and NGINX Plus With Ansible.md similarity index 100% rename from published/20150906 Installing NGINX and NGINX Plus With Ansible.md rename to published/201510/20150906 Installing NGINX and NGINX Plus With Ansible.md diff --git a/published/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md b/published/201510/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md similarity index 100% rename from published/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md rename to published/201510/20150908 How to Run ISO Files Directly From the HDD with GRUB2.md diff --git a/published/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md b/published/201510/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md similarity index 100% rename from published/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md rename to published/201510/20150911 5 Useful Commands to Manage File Types and System Time in Linu--Part 3.md diff --git a/published/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md b/published/201510/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md similarity index 100% rename from published/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md rename to published/201510/20150914 How to Setup Node JS v4.0.0 on Ubuntu 14.04 or 15.04.md diff --git a/published/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md b/published/201510/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md similarity index 100% rename from published/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md rename to published/201510/20150914 Linux FAQs with Answers--How to check weather forecasts from the command line on Linux.md diff --git a/published/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md b/published/201510/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md similarity index 100% rename from published/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md rename to published/201510/20150917 TERMINATOR 0.98 INSTALL IN UBUNTU AND LINUX MINT.md diff --git a/published/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md b/published/201510/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md similarity index 100% rename from published/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md rename to published/201510/20150918 How To Add And Remove Bookmarks In Ubuntu Beginner Tip.md diff --git a/published/20150918 Install Justniffer In Ubuntu 15.04.md b/published/201510/20150918 Install Justniffer In Ubuntu 15.04.md similarity index 100% rename from published/20150918 Install Justniffer In Ubuntu 15.04.md rename to published/201510/20150918 Install Justniffer In Ubuntu 15.04.md diff --git a/published/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md b/published/201510/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md similarity index 100% rename from published/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md rename to published/201510/20150921 How to Setup IonCube Loaders on Ubuntu 14.04 or 15.04.md diff --git a/published/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md b/published/201510/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md similarity index 100% rename from published/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md rename to published/201510/20150921 Meet The New Ubuntu 15.10 Default Wallpaper.md diff --git a/published/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md b/published/201510/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md similarity index 100% rename from published/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md rename to published/201510/20150921 Red Hat CEO Optimistic on OpenStack Revenue Opportunity.md diff --git a/published/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md b/published/201510/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md similarity index 100% rename from published/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md rename to published/201510/20150923 How To Upgrade From Oracle 11g To Oracle 12c.md diff --git a/published/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md b/published/201510/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md similarity index 100% rename from published/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md rename to published/201510/20150923 Xenlism WildFire--Minimal Icon Theme For Linux Desktop.md diff --git a/published/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md b/published/201510/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md similarity index 100% rename from published/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md rename to published/201510/20150925 HTTP 2 Now Fully Supported in NGINX Plus.md diff --git a/published/20150930 Debian dropping the Linux Standard Base.md b/published/201510/20150930 Debian dropping the Linux Standard Base.md similarity index 100% rename from published/20150930 Debian dropping the Linux Standard Base.md rename to published/201510/20150930 Debian dropping the Linux Standard Base.md diff --git a/published/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md b/published/201510/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md similarity index 100% rename from published/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md rename to published/201510/20150930 Install and use Ansible (Automation Tool) in CentOS 7.md diff --git a/published/20151005 pyinfo() A good looking phpinfo-like python script.md b/published/201510/20151005 pyinfo() A good looking phpinfo-like python script.md similarity index 100% rename from published/20151005 pyinfo() A good looking phpinfo-like python script.md rename to published/201510/20151005 pyinfo() A good looking phpinfo-like python script.md diff --git a/published/20151007 How To Download Videos Using youtube-dl In Linux.md b/published/201510/20151007 How To Download Videos Using youtube-dl In Linux.md similarity index 100% rename from published/20151007 How To Download Videos Using youtube-dl In Linux.md rename to published/201510/20151007 How To Download Videos Using youtube-dl In Linux.md diff --git a/published/20151007 Open Source Media Player MPlayer 1.2 Released.md b/published/201510/20151007 Open Source Media Player MPlayer 1.2 Released.md similarity index 100% rename from published/20151007 Open Source Media Player MPlayer 1.2 Released.md rename to published/201510/20151007 Open Source Media Player MPlayer 1.2 Released.md diff --git a/published/20151007 Productivity Tools And Tips For Linux.md b/published/201510/20151007 Productivity Tools And Tips For Linux.md similarity index 100% rename from published/20151007 Productivity Tools And Tips For Linux.md rename to published/201510/20151007 Productivity Tools And Tips For Linux.md diff --git a/published/20151012 10 Useful Utilities For Linux Users.md b/published/201510/20151012 10 Useful Utilities For Linux Users.md similarity index 100% rename from published/20151012 10 Useful Utilities For Linux Users.md rename to published/201510/20151012 10 Useful Utilities For Linux Users.md diff --git a/published/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md b/published/201510/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md similarity index 100% rename from published/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md rename to published/201510/20151012 Linux FAQs with Answers--How to change USB device permission permanently on Linux.md diff --git a/published/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md b/published/201510/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md similarity index 100% rename from published/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md rename to published/201510/20151012 Linux FAQs with Answers--How to force password change at the next login on Linux.md diff --git a/published/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md b/published/201510/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md similarity index 100% rename from published/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md rename to published/201510/20151013 Mytodo--A ToDo List Manager For DIY Lovers.md diff --git a/published/20151015 New Collaborative Group to Speed Real-Time Linux.md b/published/201510/20151015 New Collaborative Group to Speed Real-Time Linux.md similarity index 100% rename from published/20151015 New Collaborative Group to Speed Real-Time Linux.md rename to published/201510/20151015 New Collaborative Group to Speed Real-Time Linux.md diff --git a/published/20151019 10 passwd command examples in Linux.md b/published/201510/20151019 10 passwd command examples in Linux.md similarity index 100% rename from published/20151019 10 passwd command examples in Linux.md rename to published/201510/20151019 10 passwd command examples in Linux.md diff --git a/published/20151019 11 df command examples in Linux.md b/published/201510/20151019 11 df command examples in Linux.md similarity index 100% rename from published/20151019 11 df command examples in Linux.md rename to published/201510/20151019 11 df command examples in Linux.md diff --git a/published/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md b/published/201510/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md similarity index 100% rename from published/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md rename to published/201510/20151019 How-To--Compile the Latest Wine 32-bit on 64-bit Ubuntu (15.10).md diff --git a/published/20151020 Five Years of LibreOffice Evolution (2010-2015).md b/published/201510/20151020 Five Years of LibreOffice Evolution (2010-2015).md similarity index 100% rename from published/20151020 Five Years of LibreOffice Evolution (2010-2015).md rename to published/201510/20151020 Five Years of LibreOffice Evolution (2010-2015).md diff --git a/published/20151020 Linux History--24 Years Step by Step.md b/published/201510/20151020 Linux History--24 Years Step by Step.md similarity index 100% rename from published/20151020 Linux History--24 Years Step by Step.md rename to published/201510/20151020 Linux History--24 Years Step by Step.md From cf87d2afb426576904990d8ae0e7a0f312127c2c Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 1 Nov 2015 15:45:16 +0800 Subject: [PATCH 2377/2517] PUB:20151012 What is a good IDE for R on Linux @FSSlc --- ...0151012 What is a good IDE for R on Linux.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) rename {translated/share => published}/20151012 What is a good IDE for R on Linux.md (70%) diff --git a/translated/share/20151012 What is a good IDE for R on Linux.md b/published/20151012 What is a good IDE for R on Linux.md similarity index 70% rename from translated/share/20151012 What is a good IDE for R on Linux.md rename to published/20151012 What is a good IDE for R on Linux.md index 2e5d72a880..36cd1ecda9 100644 --- a/translated/share/20151012 What is a good IDE for R on Linux.md +++ b/published/20151012 What is a good IDE for R on Linux.md @@ -1,8 +1,9 @@ -Linux 上针对 R 语言的好用 IDE +Linux 上好用的 R 语言 IDE ================================================================================ + 前一段时间,我已经介绍过 [Linux 上针对 C/C++ 语言的最好 IDE][1]。很显然 C 或 C++ 并不是现存的唯一的编程语言,是时间讨论某些更加特别的语言了。 -假如你做过一些统计工作,很可能你已经见识过 [R 语言][2] 了。假如你还没有,我真的非常推荐这门专为统计和数据挖掘而生的开源编程语言。若你拥有编程背景,它的语法可能会使你感到有些不适应,但希望它的向量化操作所带来的快速能够吸引到你。简而言之,请尝试使用一下这门语言。而要做到这一点,使用一个好的 IDE 来入门或许更好吧。R 作为一门跨平台的语言,有着一大把好用的 IDE,它们使得用 R 语言进行数据分析变得更惬意。假如你非常钟意一个特定的编辑器,这里也有一些好用的插件来将它转变为一个成熟的 R IDE。 +假如你做过一些统计工作,很可能你已经见识过 [R 语言][2] 了。假如你还没有,我真的非常推荐这门专为统计和数据挖掘而生的开源编程语言。若你拥有编程背景,它的语法可能会使你感到有些不适应,但希望它的向量化操作所带来的快速能够吸引到你。简而言之,请尝试使用一下这门语言。而要做到这一点,使用一个好的 IDE 来入门或许会更好。R 作为一门跨平台的语言,有着一大把好用的 IDE,它们使得用 R 语言进行数据分析变得更惬意。假如你非常钟意一个特定的编辑器,这里也有一些好用的插件来将它转变为一个成熟的 R 语言的 IDE。 下面就让我们见识一下 Linux 环境下 5 个针对 R 语言的好用 IDE吧。 @@ -10,15 +11,15 @@ Linux 上针对 R 语言的好用 IDE ![](https://c1.staticflickr.com/1/603/22093054381_431383ab60_c.jpg) -就让我们以或许是最为人们喜爱的 R IDE: [RStudio][3] 来开始我们的介绍吧。除了一般 IDE 所提供的诸如语法高亮,代码补全等功能,RStudio 还因其集成了 R 语言帮助文档,强大的调试器,多视图系统而突出。如果你准备入门 R 语言,我只建议你将 RStudio 作为你的 R 语言控制台,一方面用它来实时测试代码是很完美的,另外对象浏览器将帮助你理解你正在处理的是哪类数据。最后,真正征服我的是它集成了图形显示器,使得你能够更轻松地以图片方式探索你的图形。至于它不好的方面, RStudio 缺乏快捷键和高级设置来使得它成为一个完美的 IDE。然而,它有一个以 AGPL 协议发布的免费版本, Linux 用户没有借口不去试试这个 IDE。 +就让我们以或许是最为人们喜爱的 R IDE —— [RStudio][3] 来开始我们的介绍吧。除了一般 IDE 所提供的诸如语法高亮、代码补全等功能,RStudio 还因其集成了 R 语言帮助文档、强大的调试器、多视图系统而突出。如果你准备入门 R 语言,我只建议你将 RStudio 作为你的 R 语言控制台,一方面用它来实时测试代码是很完美的,另外对象浏览器可以帮助你理解你正在处理的是哪类数据。最后,真正征服我的是它集成了图形显示器,使得你能够更轻松地将图形输出为图片文件。至于它不好的方面, RStudio 缺乏快捷键和高级设置来使得它成为一个完美的 IDE。然而,它有一个以 AGPL 协议发布的免费版本, Linux 用户没有借口不去试试这个 IDE。 ### 2. 带有 ESS 插件的 Emacs ### ![](https://c2.staticflickr.com/6/5824/22056857776_a14a4e7e1b_c.jpg) -在我的前一个有关 IDE 的文章中,很多朋友对我所给出的清单中没有 Emacs 而感到失望。对于这个,我的主要理由是 Emacs 可以说是 IDE 里面的“通配符”:你可以将它放到任意语言的 IDE 清单中。但对于 [带有 ESS 插件的 R][4] 来说,事情就变得有些不同了。Emacs Speaks Statistics (ESS) 是一个令人惊异的插件,它将完全改变你使用 Emacs 编辑器的方式,真的非常适合 R 编程者的需求。与 RStudio 类似,带有 ESS 的 Emacs 拥有多视图,它有两个面板:一个显示代码,另一个则是一个 R 控制台,使得实时地测试代码和探索数据对象变得更加容易。但 ESS 真正的长处是可以和你已安装的其他 Emacs 插件无缝集成以及它的高级配置选项。简而言之,如果你喜欢你的 Emacs 快捷键,你将能够在 R 语言开发环境下使用它们。然而,当你在 ESS 中处理大量数据时,我已经听闻并经历了一些效率低下的问题。尽管这个问题不是很重大,但足以让我更偏好 RStudio。 +在我的前一个有关 IDE 的文章中,很多朋友对我所给出的清单中没有 Emacs 而感到失望。对于这个,我的主要理由是 Emacs 可以说是 IDE 里面的“通配符”:你可以将它放到任意语言的 IDE 清单中。但对于 [带有 ESS 插件的 R][4] 来说,事情就变得有些不同了。Emacs Speaks Statistics (ESS) 是一个令人惊异的插件,它将完全改变你使用 Emacs 编辑器的方式,真的非常适合 R 编程者的需求。与 RStudio 类似,带有 ESS 的 Emacs 拥有多视图,它有两个面板:一个显示代码,另一个则是一个 R 控制台,使得实时地测试代码和探索数据对象变得更加容易。但 ESS 真正的长处是可以和你已安装的其他 Emacs 插件无缝集成,以及它的高级配置选项。简而言之,如果你喜欢你的 Emacs 快捷键,你将能够在 R 语言开发环境下使用它们。然而,当你在 ESS 中处理大量数据时,我已经听闻并经历了一些效率低下的问题。尽管这个问题不是很重大,但足以让我更偏好 RStudio。 -### 3. Vim with Vim-R-plugin ### +### 3. Vim 及 Vim-R-plugin ### ![](https://c1.staticflickr.com/1/680/22056923916_abe3531bb4_b.jpg) @@ -28,7 +29,7 @@ Linux 上针对 R 语言的好用 IDE ![](https://c1.staticflickr.com/1/761/22056923956_1413f60b42_c.jpg) -若 Emacs 和 Vim 都不是你的菜,而你恰好喜欢默认的 Gnome 编辑器,则 [RGedit][7] 就专门为你而生:它是 Gedit 的一个专门编辑 R 代码的插件。Gedit 比它看起来的样子更强大,配上大量的插件,就有可能用它来做许许多多的事情。而 RGedit 恰好就是你编辑 R 代码所需要的那款插件。它支持传统的语法高亮并在屏幕下方集成了 R 控制台,但它还有一大类独特的功能,例如多文件编辑,代码折叠,文件查看器,甚至还有一个 GUI 的向导用来从 snippets 产生代码。尽管我对 Gedit 并不感冒,但我必须承认这些功能比一般插件的功能更好并且在你花费很长时间去分析数据时它会有很大的帮助。唯一的污点是它的最后一次更新是 2013 年。我真的希望这个项目能够被重新焕发新生。 +若 Emacs 和 Vim 都不是你的菜,而你恰好喜欢默认的 Gnome 编辑器,则 [RGedit][7] 就是专门为你而生的:它是 Gedit 的一个专门编辑 R 代码的插件。Gedit 比你以为的更强大,配上大量的插件,就有可能用它来做许许多多的事情。而 RGedit 恰好就是你编辑 R 代码所需要的那款插件。它支持传统的语法高亮并在屏幕下方集成了 R 控制台,但它还有一大类独特的功能,例如多文件编辑、代码折叠、文件查看器,甚至还有一个 GUI 的向导用来从 snippets 产生代码。尽管我对 Gedit 并不感冒,但我必须承认这些功能比一般插件的功能更好,并且在你花费很长时间去分析数据时它会有很大的帮助。唯一的不足是它的最后一次更新是 2013 年。我真的希望这个项目能够被重新焕发新生。 ### 5. RKWard ### @@ -45,8 +46,8 @@ Linux 上针对 R 语言的好用 IDE via: http://xmodulo.com/good-ide-for-r-on-linux.html 作者:[Adrien Brochard][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d3a367fbf3b7cd72473bccbbe03e76f5081b43a0 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 1 Nov 2015 18:38:04 +0800 Subject: [PATCH 2378/2517] Translated sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md --- ...nstall Ghost with Nginx on FreeBSD 10.2.md | 297 ------------------ ...nstall Ghost with Nginx on FreeBSD 10.2.md | 296 +++++++++++++++++ 2 files changed, 296 insertions(+), 297 deletions(-) delete mode 100644 sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md create mode 100644 translated/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md diff --git a/sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md b/sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md deleted file mode 100644 index e0624da202..0000000000 --- a/sources/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md +++ /dev/null @@ -1,297 +0,0 @@ -ictlyh Translating -How to Install Ghost with Nginx on FreeBSD 10.2 -================================================================================ -Node.js is open source runtime environment for developing the server-side applications. Node.js application is written in javascript and can be run on the server that running Node.js runtime. It is cross-platform runtime, running on Linux, Windows, OSX, IBM AIX, including FreeBSD. Node.js was created by Ryan Dahl and other developer working at Joyent on 2009. It is designed to build scalable network applications. - -Ghost is blogging platform coded in Node.js. It is open source publishing platform with beautifully designed, user-friendly, and free. It is allows you to easily publish your content on web, or create your portofolio website. - -In this tutorial we will install a Ghost with Nginx as our web server on FreeBSD. We will install Node.js, Npm, nginx and sqlite3 on FreeBSD 10.2. - -### Step 1 - Install Node.js npm and Sqlite3 ### - -If you want to running ghost on your server, you must install node.js. In this section we will install node.js from the freebsd ports collection, please go to the ports directory "/usr/ports/www/node" and install by running command "**make**". - - cd /usr/ports/www/node - make install clean - -If you've done with node.js installation, please switch to the npm directory and install it. **npm** is Package manager for installs, publishes and manages node programs. - - cd /usr/ports/www/npm/ - make install clean - -Next, please install sqlite3. By default ghost is use sqlite3 as the database system, but it is support too for mysql/mariadb and postgresql. We will use sqlite3 as the default database. - - cd /usr/ports/databases/sqlite3/ - make install clean - -If all is installed, please check the version of node.js and npm : - - node --version - v0.12.6 - - npm --version - 2.11.3 - - sqlite3 --version - 3.8.10.2 - -![node and npm version](http://blog.linoxide.com/wp-content/uploads/2015/10/node-and-npm-version.png) - -### Step 2 - Add Ghost User ### - -We will install and running ghost under normal users called "**ghost**". please create new user with "adduser" command : - - adduser ghost - FILL With Your INFO - -![Add user Ghost](http://blog.linoxide.com/wp-content/uploads/2015/10/Add-user-Ghost.png) - -### Step 3 - Installing Ghost ### - -We will install ghost under "**/var/www/**" directory, so let's create it and then go to the installation directory : - - mkdir -p /var/www/ - cd /var/www/ - -Download ghost latest version with wget command : - - wget --no-check-certificate https://ghost.org/zip/ghost-latest.zip - -Extract it to the directory called "**ghost**" : - - unzip -d ghost ghost-latest.zip - -Next, change the owner as user "**ghost**", we will run and install it under that user. - - chown -R ghost:ghost ghost/ - -If all is done, switch the user to "**ghost**" by typing command below : - - su - ghost - -Then go to the installation directory "/var/www/ghost/" : - - cd /var/www/ghost/ - -And before install ghost, we need a sqlit3 modules for node js, install it with npm command : - - setenv CXX c++ ; npm install sqlite3 --sqlite=/usr/local - -**Note : Run as "ghost" user, not root user.** - -And now we ready to install ghost, please install it with npm command : - - npm install --production - -Next, copy the configuration file "config.example.js" to "**config.js**", then edit it with nano editor : - - cp config.example.js config.js - nano -c config.js - -change on line 25 server block : - - host: '0.0.0.0', - -Save and exit. - -Now run ghost with command below : - - npm start --production - -And test by visiting the server ip and port 2368. - -![Ghost Installed](http://blog.linoxide.com/wp-content/uploads/2015/10/Ghost-Installed.png) - -Ghost is installed on directory "/var/www/ghost", under user "ghost". - -### Step 4 - Run Ghost as FreeBSD Services ### - -To run an application as service on freebsd, you need to add the script to the rc.d directory. we will create new service script for ghost in directory "**/usr/local/etc/rc.d/**". - -Before we create the services script, we need to install a node.js module for running ghost as service, install forever module with npm command **as sudo/root** privileges : - - npm install forever -g - -Now please go to the rc.d directory and create new file called ghost there : - - cd /usr/local/etc/rc.d/ - nano -c ghost - -Paste service script below : - - #!/bin/sh - - # PROVIDE: ghost - # KEYWORD: shutdown - PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" - - . /etc/rc.subr - - name="ghost" - rcvar="ghost_enable" - extra_commands="status" - - load_rc_config ghost - : ${ghost_enable:="NO"} - - status_cmd="ghost_status" - start_cmd="ghost_start" - stop_cmd="ghost_stop" - restart_cmd="ghost_restart" - - ghost="/var/www/ghost" - log="/var/log/ghost/ghost.log" - ghost_start() { - sudo -u ghost sh -c "cd $ghost && NODE_ENV=production forever start -al $log index.js" - } - - ghost_stop() { - sudo -u ghost sh -c "cd $ghost && NODE_ENV=production forever stop index.js" - } - - ghost_status() { - sudo -u ghost sh -c "NODE_ENV=production forever list" - } - - ghost_restart() { - ghost_stop; - ghost_start; - } - - run_rc_command "$1" - -Save and exit. - -Next, make ghost service script an executable : - - chmod +x ghost - -and create new directory and file for ghost log, and change the owner to ghost user : - - mkdir -p /var/www/ghost/ - touch /var/www/ghost/ghost.log - chown -R /var/www/ghost/ - -And the last if you want to run ghost service, you need to add ghost service to the boot time/startup application with sysrc command : - - sysrc ghost_enable=yes - -and start ghost with : - - service ghost start - -Other command : - - service ghost stop - service ghost status - service ghost restart - -![Ghost service command](http://blog.linoxide.com/wp-content/uploads/2015/10/Ghost-service-command.png) - -### Step 5 - Install and Configure Nginx for Ghost ### - -By default, ghost running standalone,, you can run it without Nginx, apache or IIS webserver. But in this tutorial we will install and configre nginx to work with Ghost. - -Please install nginx from the freebsd repository with pkg command : - - pkg install nginx - -Next, go to nginx configuration directory and make new directory for virtualhost configuration. - - cd /usr/local/etc/nginx/ - mkdir virtualhost/ - -go to the virtualhost directory, make new file called ghost.conf with nano editor : - - cd virtualhost/ - nano -c ghost.conf - -Paste virtualhost configuration below : - - server { - listen 80; - - #Your Domain - server_name ghost.me; - - location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)$ { - access_log off; - expires 30d; - add_header Pragma public; - add_header Cache-Control "public, mustrevalidate, proxy-revalidate"; - proxy_pass http://127.0.0.1:2368; - } - - location / { - add_header X-XSS-Protection "1; mode=block"; - add_header Cache-Control "public, max-age=0"; - add_header Content-Security-Policy "script-src 'self' ; font-src 'self' ; connect-src 'self' ; block-all-mixed-content; reflected-xss block; referrer no-referrer"; - add_header X-Content-Type-Options nosniff; - add_header X-Frame-Options DENY; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass http://127.0.0.1:2368; - } - - location = /robots.txt { access_log off; log_not_found off; } - location = /favicon.ico { access_log off; log_not_found off; } - - location ~ /\.ht { - deny all; - } - - } - -Save and exit. - -To activate the virtualhost configuration, you need to include that file to the **nginx.conf**. please go to nginx configuration directory and edit nginx.conf file : - - cd /usr/local/etc/nginx/ - nano -c nginx.conf - -Before the last line, include the virtualhost configuration directory : - - [......] - - include virtualhost/*.conf; - - } - -Save and exit. - -Test nginx configuration with command "**nginx -t**", if there is no error, add nginx to the start up with command sysrc : - - sysrc nginx_enable=yes - -and start nginx : - - service nginx start - -Now test all nginx and virtualhost configuration. please open your browser and type the : ghost.me - -![ghost.me successfully](http://blog.linoxide.com/wp-content/uploads/2015/10/ghost.me-successfully.png) - -Ghost.me is running successfully. - -If you want to check the nginx server, use "**curl**" command. - -![ghost and nginx test](http://blog.linoxide.com/wp-content/uploads/2015/10/ghost-and-nginx-test.png) - -Ghost is running with nginx. - -### Conclusion ### - -Node.js is runtime environment created by Ryan Dahl for creating and developing scalable server-side applications. Ghost is open-source blogging platform coded in node.js, it is come with beautifully designed and easy to use for everyone. By default, the ghost is a web application that can stand on its own, does not require a webserver apache, nginx or IIS, but we can also integrate with a web server(In this tutorial use Nginx). Sqlite is default database used by ghost, but it supupport too for mysql/mariadb and postgresql. Ghost is fast and easy to use for you and configure. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-ghost-nginx-freebsd-10-2/ - -作者:[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/translated/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md b/translated/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md new file mode 100644 index 0000000000..f8d78c88f9 --- /dev/null +++ b/translated/tech/20151027 How to Install Ghost with Nginx on FreeBSD 10.2.md @@ -0,0 +1,296 @@ +如何在 FreeBSD 10.2 上安装使用 Nginx 的 Ghost +================================================================================ +Node.js 是用于开发服务器端应用程序的开源运行时环境。Node.js 应用使用 JavaScript 编写,能在任何有 Node.js 运行时的服务器上运行。它跨平台支持 Linux、Windows、OSX、IBM AIX,也包括 FreeBSD。Node.js 是 Ryan Dahl 以及在 Joyent 工作的其他开发者于 2009 年创建的。它的设计目标就是构建可扩展的网络应用程序。 + +Ghost 是使用 Node.js 编写的博客平台。它不仅开源,而且有很漂亮的界面设计、对用户友好并且免费。它允许你快速地在网络上发布内容,或者创建你的混合网站。 + +在这篇指南中我们会在 FreeBSD 上安装使用 Nginx 作为 web 服务器的 Ghost。我们会在 FreeBSD 10.2 上安装 Node.js、Npm、nginx 和 sqlite3。 + +### 第一步 - 安装 Node.js npm 和 Sqlite3 ### + +如果你想在你的服务器上运行 ghost,你必须安装 node.js。在这一部分,我们会从 freebsd 移植软件库中安装 node.js,请进入库目录 "/usr/ports/www/node" 并通过运行命令 "**make**" 安装。 + + cd /usr/ports/www/node + make install clean + +如果你已经安装了 node.js,那就进入到 npm 目录并安装它。**npm** 是用于安装、发布和管理 node 程序的软件包管理器。 + + cd /usr/ports/www/npm/ + make install clean + +下一步,安装 sqlite3。默认情况下 ghost 使用 sqlite3 作为数据库系统,但它也支持 mysql/mariadb 和 postgresql。我们会使用 sqlite3 作为默认数据库。 + + cd /usr/ports/databases/sqlite3/ + make install clean + +如果安装完了所有软件,还有检查 node.js 和 npm 的版本: + + node --version + v0.12.6 + + npm --version + 2.11.3 + + sqlite3 --version + 3.8.10.2 + +![node 和 npm 版本](http://blog.linoxide.com/wp-content/uploads/2015/10/node-and-npm-version.png) + +### 第二步 - 添加 Ghost 用户 ### + +我们会以普通用户 "**ghost**" 身份安装和运行 ghost。用 "adduser" 命令添加新用户: + + adduser ghost + FILL With Your INFO + +![添加用户 Ghost](http://blog.linoxide.com/wp-content/uploads/2015/10/Add-user-Ghost.png) + +### 第三步 - 安装 Ghost ### + +我们会把 ghost 安装到 "**/var/www/**" 目录,首先新建目录然后进入到安装目录: + + mkdir -p /var/www/ + cd /var/www/ + +用 wget 命令下载最新版本的 ghost: + + wget --no-check-certificate https://ghost.org/zip/ghost-latest.zip + +把它解压到 "**ghost**" 目录: + + unzip -d ghost ghost-latest.zip + +下一步,更改属主为 "**ghost**",我们会以这个用户安装和运行它。 + + chown -R ghost:ghost ghost/ + +都做完了的话,通过输入以下命令切换到 "**ghost**" 用户: + + su - ghost + +然后进入到安装目录"/var/www/ghost/": + + cd /var/www/ghost/ + +在安装 ghost 之前,我们需要为 node.js 安装 sqlite3 模块,用 npm 命令安装: + + setenv CXX c++ ; npm install sqlite3 --sqlite=/usr/local + +**注意: 以 “ghost” 用户运行,而不是 root 用户。** + +现在,我们准备好安装 ghost 了,用 npm 命令安装: + + npm install --production + +下一步,复制配置文件 "config.example.js" 为 "**config.js**",用 nano 编辑器编辑: + + cp config.example.js config.js + nano -c config.js + +更改 server 模块的第 25 行: + + host: '0.0.0.0', + +保存并退出。 + +现在用下面的命令运行 ghost: + + npm start --production + +通过访问服务器 ip 和 2368 号端口验证。 + +![Ghost 安装完成](http://blog.linoxide.com/wp-content/uploads/2015/10/Ghost-Installed.png) + +以 “ghost” 用户在 "/var/www/ghost" 目录安装了 ghost。 + +### 第四步 - 作为 FreeBSD 服务运行 Ghost ### + +要在 freebsd 上以服务形式运行应用,你需要在 rc.d 目录添加脚本。我们会在 "**/usr/local/etc/rc.d/**" 目录为 ghost 创建新的服务脚本。 + +在创建服务脚本之前,为了以服务形式运行 ghost,我们需要安装一个 node.js 模块,用 npm 命令以 **sudo/root** 权限安装 forever 模块: + + npm install forever -g + +现在进入到 rc.d 目录并创建名为 ghost 的新文件: + + cd /usr/local/etc/rc.d/ + nano -c ghost + +粘贴下面的服务脚本: + + #!/bin/sh + + # PROVIDE: ghost + # KEYWORD: shutdown + PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" + + . /etc/rc.subr + + name="ghost" + rcvar="ghost_enable" + extra_commands="status" + + load_rc_config ghost + : ${ghost_enable:="NO"} + + status_cmd="ghost_status" + start_cmd="ghost_start" + stop_cmd="ghost_stop" + restart_cmd="ghost_restart" + + ghost="/var/www/ghost" + log="/var/log/ghost/ghost.log" + ghost_start() { + sudo -u ghost sh -c "cd $ghost && NODE_ENV=production forever start -al $log index.js" + } + + ghost_stop() { + sudo -u ghost sh -c "cd $ghost && NODE_ENV=production forever stop index.js" + } + + ghost_status() { + sudo -u ghost sh -c "NODE_ENV=production forever list" + } + + ghost_restart() { + ghost_stop; + ghost_start; + } + + run_rc_command "$1" + +保存并退出。 + +下一步,给 ghost 服务脚本添加可执行权限: + + chmod +x ghost + +为 ghost 日志创建新的目录和文件,并把属主修改为 ghost 用户: + + mkdir -p /var/www/ghost/ + touch /var/www/ghost/ghost.log + chown -R /var/www/ghost/ + +最后,如果你想运行 ghost 服务,你需要用 sysrc 命令添加 ghost 服务到开机启动应用程序: + + sysrc ghost_enable=yes + +用以下命令启动 ghost: + + service ghost start + +其它命令: + + service ghost stop + service ghost status + service ghost restart + +![Ghost 服务命令](http://blog.linoxide.com/wp-content/uploads/2015/10/Ghost-service-command.png) + +### 第五步 - 为 Ghost 安装和配置 Nginx ### + +默认情况下,ghost 会以单机模式运行,你可以不用 Nginx、apache 或 IIS web 服务器直接运行它。但在这篇指南中我们会安装和配置 nginx 和 ghost 一起使用。 + +用 pkg 命令从 freebsd 库中安装 nginx: + + pkg install nginx + +下一步,进入 nginx 配置目录并为 virtualhost 配置创建新的目录。 + + cd /usr/local/etc/nginx/ + mkdir virtualhost/ + +进入 virtualhost 目录,用 nano 编辑器创建名为 ghost.conf 的新文件: + + cd virtualhost/ + nano -c ghost.conf + +粘贴下面的 virtualhost 配置: + + server { + listen 80; + + #Your Domain + server_name ghost.me; + + location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)$ { + access_log off; + expires 30d; + add_header Pragma public; + add_header Cache-Control "public, mustrevalidate, proxy-revalidate"; + proxy_pass http://127.0.0.1:2368; + } + + location / { + add_header X-XSS-Protection "1; mode=block"; + add_header Cache-Control "public, max-age=0"; + add_header Content-Security-Policy "script-src 'self' ; font-src 'self' ; connect-src 'self' ; block-all-mixed-content; reflected-xss block; referrer no-referrer"; + add_header X-Content-Type-Options nosniff; + add_header X-Frame-Options DENY; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://127.0.0.1:2368; + } + + location = /robots.txt { access_log off; log_not_found off; } + location = /favicon.ico { access_log off; log_not_found off; } + + location ~ /\.ht { + deny all; + } + + } + +保存并退出。 + +要启用 virtualhost 配置,你需要把那个文件添加到 **nginx.conf**。进入 nginx 配置目录并编辑 nginx.conf 文件: + + cd /usr/local/etc/nginx/ + nano -c nginx.conf + +在最后一行的前面,包含 virtualhost 配置目录: + + [......] + + include virtualhost/*.conf; + + } + +保存并退出。 + +用命令 "**nginx -t**" 测试 nginx 配置,如果没有错误,用 sysrc 添加 nginx 到开机启动: + + sysrc nginx_enable=yes + +并启动 nginx: + + service nginx start + +现在测试所有 nginx 和 virtualhost 配置。请打开你的浏览器并输入: ghost.me + +![ghost.me 成功运行](http://blog.linoxide.com/wp-content/uploads/2015/10/ghost.me-successfully.png) + +Ghost.me 正在成功运行。 + +如果你想要检查 nginx 服务器,可以使用 "**curl**" 命令。 + +![测试 ghost 和 nginx](http://blog.linoxide.com/wp-content/uploads/2015/10/ghost-and-nginx-test.png) + +Ghost 正在 nginx 上运行。 + +### 总结 ### + +Node.js 是 Ryan Dahl 为创建和开发可扩展服务器端应用程序创建的运行时环境。Ghost 是使用 node.js 编写的开源博客平台,它有漂亮的外观设计并且易于使用。默认情况下,ghost 是可以单独运行的 web 应用程序,并不需要类似 apache、nginx 或 IIS 之类的 web 服务器,但我们也可以和 web 服务器集成(在这篇指南中使用 Nginx)。Sqlite 是 ghost 默认使用的数据库,它还支持 msql/mariadb 和 postgresql。Ghost 能快速部署并且易于使用和配置。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-ghost-nginx-freebsd-10-2/ + +作者:[Arul][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者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 From 6f1af383e3523e2aa4874844b0b3d75c1ef84290 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 1 Nov 2015 19:56:00 +0800 Subject: [PATCH 2379/2517] Translated sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md --- ...phyr Test Management Tool on CentOS 7.x.md | 234 ------------------ ...phyr Test Management Tool on CentOS 7.x.md | 231 +++++++++++++++++ 2 files changed, 231 insertions(+), 234 deletions(-) delete mode 100644 sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md create mode 100644 translated/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md diff --git a/sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md b/sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md deleted file mode 100644 index 404b65b414..0000000000 --- a/sources/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md +++ /dev/null @@ -1,234 +0,0 @@ -ictlyh Translating -How to Setup Zephyr Test Management Tool on CentOS 7.x -================================================================================ -Test Management encompasses anything and everything that you need to do as testers. Test management tools are used to store information on how testing is to be done, plan testing activities and report the status of quality assurance activities. So in this article we will illustrate you about the setup of Zephyr test management tool that includes everything needed to manage the test process can save testers hassle of installing separate applications that are necessary for the testing process. Once you have done with its setup you will be able to track bugs, defects and allows the project tasks for collaboration with your team as you can easily share and access the data across multiple project teams for communication and collaboration throughout the testing process. - -### Requirements for Zephyr ### - -We are going to install and run Zephyr under the following set of its minimum resources. Resources can be enhanced as per your infrastructure requirements. We will be installing Zephyr on the CentOS-7 64-bit while its binary distributions are available for almost all Linux operating systems. - -注:表格 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Zephyr test management tool
Linux OSCentOS Linux 7 (Core), 64-bit
PackagesJDK 7 or above ,  Oracle JDK 6 updateNo Prior Tomcat, MySQL installed
RAM4 GBPreferred 8 GB
CPU2.0 GHZ or Higher
Hard Disk30 GB , Atleast 5GB must be free
- -You must have super user (root) access to perform the installation process for Zephyr and make sure that you have properly configured yout network with static IP address and its default set of ports must be available and allowed in the firewall where as the Port 80/443, 8005, 8009, 8010 will used by tomcat and Port 443 or 2099 will used within Zephyr by flex for the RTMP protocol. - -### Install Java JDK 7 ### - -Java JDK 7 is the basic requirement for the installation of Zephyr, if its not already installed in your operating system then do the following to install Java and setup its JAVA_HOME environment variables to be properly configured. - -Let’s issue the below commands to install Java JDK 7. - - [root@centos-007 ~]# yum install java-1.7.0-openjdk-1.7.0.79-2.5.5.2.el7_1 - ----------- - - [root@centos-007 ~]# yum install java-1.7.0-openjdk-devel-1.7.0.85-2.6.1.2.el7_1.x86_64 - -Once your java is installed including its required dependencies, run the following commands to set its JAVA_HOME environment variables. - - [root@centos-007 ~]# export JAVA_HOME=/usr/java/default - [root@centos-007 ~]# export PATH=/usr/java/default/bin:$PATH - -Now check the version of java to verify its installation with following command. - - [root@centos-007 ~]# java –version - ----------- - - java version "1.7.0_79" - OpenJDK Runtime Environment (rhel-2.5.5.2.el7_1-x86_64 u79-b14) - OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode) - -The output shows that we we have successfully installed OpenJDK Java verion 1.7.0_79. - -### Install MySQL 5.6.X ### - -If you have other MySQLs on the machine then it is recommended to remove them and -install this version on top of them or upgrade their schemas to what is specified. As this specific major/minor (5.6.X) version of MySQL is required with the root username as a prerequisite of Zephyr. - -To install MySQL 5.6 on CentOS-7.1 lets do the following steps: - -Download the rpm package, which will create a yum repo file for MySQL Server installation. - - [root@centos-007 ~]# yum install wget - [root@centos-007 ~]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm - -Now Install this downloaded rpm package by using rpm command. - - [root@centos-007 ~]# rpm -ivh mysql-community-release-el7-5.noarch.rpm - -After the installation of this package you will get two new yum repo related to MySQL. Then by using yum command, now we will install MySQL Server 5.6 and all dependencies will be installed itself. - - [root@centos-007 ~]# yum install mysql-server - -Once the installation process completes, run the following commands to start mysqld services and check its status whether its active or not. - - [root@centos-007 ~]# service mysqld start - [root@centos-007 ~]# service mysqld status - -On fresh installation of MySQL Server. The MySQL root user password is blank. -For good security practice, we should reset the password MySQL root user. - -Connect to MySQL using the auto-generated empty password and change the -root password. - - [root@centos-007 ~]# mysql - mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_password'); - mysql> flush privileges; - mysql> quit; - -Now we need to configure the required database parameters in the default configuration file of MySQL. Let's open its file located in "/etc/" folder and update it as follow. - - [root@centos-007 ~]# vi /etc/my.cnf - ----------- - - [mysqld] - datadir=/var/lib/mysql - socket=/var/lib/mysql/mysql.sock - symbolic-links=0 - - sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES - max_allowed_packet=150M - max_connections=600 - default-storage-engine=INNODB - character-set-server=utf8 - collation-server=utf8_unicode_ci - - [mysqld_safe] - log-error=/var/log/mysqld.log - pid-file=/var/run/mysqld/mysqld.pid - default-storage-engine=INNODB - character-set-server=utf8 - collation-server=utf8_unicode_ci - - [mysql] - max_allowed_packet = 150M - [mysqldump] - quick - -Save the changes made in the configuration file and restart mysql services. - - [root@centos-007 ~]# service mysqld restart - -### Download Zephyr Installation Package ### - -We done with installation of required packages necessary to install Zephyr. Now we need to get the binary distributed package of Zephyr and its license key. Go to official download link of Zephyr that is http://download.yourzephyr.com/linux/download.php give your email ID and click to download. - -![Zephyr Download](http://blog.linoxide.com/wp-content/uploads/2015/08/13.png) - -Then and confirm your mentioned Email Address and you will get the Zephyr Download link and its License Key link. So click on the provided links and choose the appropriate version of your Operating system to download the binary installation package and its license file to the server. - -We have placed it in the home directory and modify its permissions to make it executable. - -![Zephyr Binary](http://blog.linoxide.com/wp-content/uploads/2015/08/22.png) - -### Start Zephyr Installation and Configuration ### - -Now we are ready to start the installation of Zephyr by executing its binary installation script as below. - - [root@centos-007 ~]# ./zephyr_4_7_9213_linux_setup.sh –c - -Once you run the above command, it will check for the Java environment variables to be properly setup and configured. If there's some mis-configuration you might the error like. - - testing JVM in /usr ... - Starting Installer ... - Error : Either JDK is not found at expected locations or JDK version is mismatched. - Zephyr requires Oracle Java Development Kit (JDK) version 1.7 or higher. - -Once you have properly configured your Java, then it will start installation of Zephyr and asks to press "o" to proceed and "c" to cancel the setup. Let's type "o" and press "Enter" key to start installation. - -![install zephyr](http://blog.linoxide.com/wp-content/uploads/2015/08/32.png) - -The next option is to review all the requirements for the Zephyr setup and Press "Enter" to move forward to next option. - -![zephyr requirements](http://blog.linoxide.com/wp-content/uploads/2015/08/42.png) - -To accept the license agreement type "1" and Press Enter. - - I accept the terms of this license agreement [1], I do not accept the terms of this license agreement [2, Enter] - -Here we need to choose the appropriate destination location where we want to install the zephyr and choose the default ports, if you want to choose other than default ports, you are free to mention here. - -![installation folder](http://blog.linoxide.com/wp-content/uploads/2015/08/52.png) - -Then customize the mysql database parameters and give the right paths to the configurations file. You might the an error at this point as shown below. - - Please update MySQL configuration. Configuration parameter max_connection should be at least 500 (max_connection = 500) and max_allowed_packet should be at least 50MB (max_allowed_packet = 50M). - -To overcome this error make sure that you have configure the "max_connection" and "max_allowed_packet" limits properly in the mysql configuration file. So confirm these settings, connect to mysql server and run the commands as shown. - -![mysql connections](http://blog.linoxide.com/wp-content/uploads/2015/08/62.png) - -Once you have configured your mysql database properly, it will extract the configuration files to complete the setup. - -![mysql customization](http://blog.linoxide.com/wp-content/uploads/2015/08/72.png) - -The installation process completes with successful installation of Zephyr 4.7 on your computer. To Launch Zephyr Desktop type "y" to finish Zephyr installation. - -![launch zephyr](http://blog.linoxide.com/wp-content/uploads/2015/08/82.png) - -### Launch Zephyr Desktop ### - -Open your web browser to launch Zephyr Desktop with your localhost IP adress and you will be direted to the Zephyr Desktop. - - http://your_server_IP/zephyr/desktop/ - -![Zephyr Desktop](http://blog.linoxide.com/wp-content/uploads/2015/08/91.png) - -From your Zephyr Dashboard click on the "Test Manager" and login with the dault user name and password that is "test.manager". - -![Test Manage Login](http://blog.linoxide.com/wp-content/uploads/2015/08/test_manager_login.png) - -Once you are loged in you will be able to configure your administrative settings as shown. So choose the settings you wish to put according to your environment. - -![Test Manage Administration](http://blog.linoxide.com/wp-content/uploads/2015/08/test_manage_admin.png) - -Save the settings after you have done with your administrative settings, similarly do the settings of resources management and project setup and start using Zephyr as a complete set of your testing management tool. You check and edit the status of your administrative settings from the Department Dashboard Management as shown. - -![zephyr dashboard](http://blog.linoxide.com/wp-content/uploads/2015/08/dashboard.png) - -### Conclusion ### - -Cheers! we have done with the complete setup of Zephyr installation setup on Centos 7.1. We hope you are now much aware of Zephyr Test management tool which offer the prospect of streamlining the testing process and allow quick access to data analysis, collaborative tools and easy communication across multiple project teams. Feel free to comment us if you find any difficulty while you are doing it in your environment. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/setup-zephyr-tool-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/translated/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md b/translated/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md new file mode 100644 index 0000000000..7de8349b9c --- /dev/null +++ b/translated/tech/20150824 How to Setup Zephyr Test Management Tool on CentOS 7.x.md @@ -0,0 +1,231 @@ +如何在 CentOS 7.x 上安装 Zephyr 测试管理工具 +================================================================================ +测试管理工具包括作为测试人员需要的任何东西。测试管理工具用来记录测试执行的结果、计划测试活动以及报告质量保证活动的情况。在这篇文章中我们会向你介绍如何配置 Zephyr 测试管理工具,它包括了管理测试活动需要的所有东西,不需要单独安装测试活动所需要的应用程序从而降低测试人员不必要的麻烦。一旦你安装完它,你就看可以用它跟踪 bug、缺陷,和你的团队成员协作项目任务,因为你可以轻松地共享和访问测试过程中多个项目团队的数据。 + +### Zephyr 要求 ### + +安装和运行 Zephyr 要求满足以下最低条件。可以根据你的基础设施提高资源。我们会在 64 位 CentOS-7 系统上安装 Zephyr,几乎在所有的 Linux 操作系统中都有可用的 Zephyr 二进制发行版。 + +注:表格 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Zephyr test management tool
Linux OSCentOS Linux 7 (Core), 64-bit
PackagesJDK 7 or above ,  Oracle JDK 6 updateNo Prior Tomcat, MySQL installed
RAM4 GBPreferred 8 GB
CPU2.0 GHZ or Higher
Hard Disk30 GB , Atleast 5GB must be free
+ +安装 Zephyr 要求你有超级用户(root)权限,并确保你已经正确配置了网络的静态 IP ,默认端口必须可用并允许通过防火墙。其中 tomcat 会使用 80/443、 8005、 8009、 8010 端口, Zephyr 内部使用 RTMP 协议的 flex 会使用 443 和 2099 号端口。 + +### 安装 Java JDK 7 ### + +安装 Zephyr 首先需要安装 Java JDK 7,如果你的系统上还没有安装,可以按照下面的方法安装 Java 并设置 JAVA_HOME 环境变量。 + +输入以下的命令安装 Java JDK 7。 + + [root@centos-007 ~]# yum install java-1.7.0-openjdk-1.7.0.79-2.5.5.2.el7_1 + +---------- + + [root@centos-007 ~]# yum install java-1.7.0-openjdk-devel-1.7.0.85-2.6.1.2.el7_1.x86_64 + +安装完 java 和它的所有依赖后,运行下面的命令设置 JAVA_HOME 环境变量。 + + [root@centos-007 ~]# export JAVA_HOME=/usr/java/default + [root@centos-007 ~]# export PATH=/usr/java/default/bin:$PATH + +用下面的命令检查 java 版本以验证安装。 + + [root@centos-007 ~]# java –version + +---------- + + java version "1.7.0_79" + OpenJDK Runtime Environment (rhel-2.5.5.2.el7_1-x86_64 u79-b14) + OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode) + +输出显示我们已经正确安装了 1.7.0_79 版本的 OpenJDK Java。 + +### 安装 MySQL 5.6.x ### + +如果的机器上有其它的 MySQL,建议你先卸载它们并安装这个版本,或者升级它们的模式到指定的版本。因为 Zephyr 前提要求这个指定的主要/最小 MySQL (5.6.x)版本要有 root 用户名。 + +可以按照下面的步骤在 CentOS-7.1 上安装 MySQL 5.6 : + +下载 rpm 软件包,它会为安装 MySQL 服务器创建一个 yum 库文件。 + + [root@centos-007 ~]# yum install wget + [root@centos-007 ~]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm + +然后用 rpm 命令安装下载下来的 rpm 软件包。 + + [root@centos-007 ~]# rpm -ivh mysql-community-release-el7-5.noarch.rpm + +安装完这个软件包后你会有两个和 MySQL 相关的新的 yum 库。然后使用 yum 命令安装 MySQL Server 5.6,它会自动安装所有需要的依赖。 + + [root@centos-007 ~]# yum install mysql-server + +安装过程完成之后,运行下面的命令启动 mysqld 服务并检查它的状态是否激活。 + + [root@centos-007 ~]# service mysqld start + [root@centos-007 ~]# service mysqld status + +对于全新安装的 MySQL 服务器,MySQL root 用户的密码为空。 +为了安全起见,我们应该重置 MySQL root 用户的密码。 + +用自动生成的空密码连接到 MySQL 并更改 root 用户密码。 + + [root@centos-007 ~]# mysql + mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_password'); + mysql> flush privileges; + mysql> quit; + +现在我们需要在 MySQL 默认的配置文件中配置所需的数据库参数。打开 "/etc/" 目录中的文件并按照下面那样更新。 + + [root@centos-007 ~]# vi /etc/my.cnf + +---------- + + [mysqld] + datadir=/var/lib/mysql + socket=/var/lib/mysql/mysql.sock + symbolic-links=0 + + sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES + max_allowed_packet=150M + max_connections=600 + default-storage-engine=INNODB + character-set-server=utf8 + collation-server=utf8_unicode_ci + + [mysqld_safe] + log-error=/var/log/mysqld.log + pid-file=/var/run/mysqld/mysqld.pid + default-storage-engine=INNODB + character-set-server=utf8 + collation-server=utf8_unicode_ci + + [mysql] + max_allowed_packet = 150M + [mysqldump] + quick + +保存配置文件中的更新并重启 mysql 服务。 + + [root@centos-007 ~]# service mysqld restart + +### 下载 Zephyr 安装包 ### + +我们已经安装完了安装 Zephyr 所需要的软件包。现在我们需要获取 Zephyr 二进制发布包和它的许可证密钥。到 Zephyr 官方下载链接 [http://download.yourzephyr.com/linux/download.php](http://download.yourzephyr.com/linux/download.php) 输入你的电子邮件 ID 并点击下载。 + +![下载 Zephyr](http://blog.linoxide.com/wp-content/uploads/2015/08/13.png) + +然后确认你的电子邮件地址,你会获得 Zephyr 下载链接和它的许可证密钥链接。点击提供的链接从服务器中选择和你操作系统合适的版本下载二进制安装包以及许可证文件。 + +我们把它下载到 home 目录并更改它的权限为可执行。 + +![Zephyr 二进制包](http://blog.linoxide.com/wp-content/uploads/2015/08/22.png) + +### 开始安装和配置 Zephyr ### + +现在我们通过执行它的二进制安装脚本开始安装 Zephyr。 + + [root@centos-007 ~]# ./zephyr_4_7_9213_linux_setup.sh –c + +一旦你运行了上面的命令,它会检查是否正确配置了 Java 环境变量。如果配置不正确,你可能会看到类似下面的错误。 + + testing JVM in /usr ... + Starting Installer ... + Error : Either JDK is not found at expected locations or JDK version is mismatched. + Zephyr requires Oracle Java Development Kit (JDK) version 1.7 or higher. + +如果你正确配置了 Java,它会开始安装 Zephyr 并要求你输入 “o” 继续或者输入 “c” 取消安装。让我们敲击 “o” 并输入回车键开始安装。 + +![安装 zephyr](http://blog.linoxide.com/wp-content/uploads/2015/08/32.png) + +下一个选项是检查安装 Zephyr 所有的要求,输入回车进入下一个选项。 + +![zephyr 要求](http://blog.linoxide.com/wp-content/uploads/2015/08/42.png) + +输入 “1” 并回车同意许可证协议。 + + I accept the terms of this license agreement [1], I do not accept the terms of this license agreement [2, Enter] + +我们需要选择安装 Zephyr 合适的目标位置以及默认端口,如果你想用默认端口之外的其它端口,也可以在这里配置。 + +![installation folder](http://blog.linoxide.com/wp-content/uploads/2015/08/52.png) + +然后自定义 mysql 数据库参数并给出配置文件的正确路径。在这一步你可能看到类似下面的错误。 + + Please update MySQL configuration. Configuration parameter max_connection should be at least 500 (max_connection = 500) and max_allowed_packet should be at least 50MB (max_allowed_packet = 50M). + +要消除这个错误,你要确保在 mysql 配置文件中正确配置了 "max\_connection" 和 "max\_allowed\_packet" 参数。运行所示的命令连接到数据库确认这些设置。 + +![连接 mysql](http://blog.linoxide.com/wp-content/uploads/2015/08/62.png) + +当你正确配置了 mysql 数据库,它会提取配置文件并完成安装。 + +![配置 mysql](http://blog.linoxide.com/wp-content/uploads/2015/08/72.png) + +安装过程在你的计算机上成功的安装了 Zephyr 4.7。要启动 Zephyr 桌面,输入 “y” 完成 Zephyr 安装。 + +![启动 zephyr](http://blog.linoxide.com/wp-content/uploads/2015/08/82.png) + +### 启动 Zephyr 桌面 ### + +打开你的 web 浏览器并用你的本机 IP 地址启动 Zephyr 桌面,你会被导向 Zephyr 桌面。 + + http://your_server_IP/zephyr/desktop/ + +![Zephyr 桌面](http://blog.linoxide.com/wp-content/uploads/2015/08/91.png) + +从 Zephyr 仪表盘点击 "Test Manager" 并用默认的用户名和密码 "test.manager" 登录。 + +![Test Manage 登录](http://blog.linoxide.com/wp-content/uploads/2015/08/test_manager_login.png) + +你登录进去后你就可以配置你的管理设置了。根据你的环境选择你想要的设置。 + +![Test Manage 管理](http://blog.linoxide.com/wp-content/uploads/2015/08/test_manage_admin.png) + +完成管理设置后保存设置,资源管理和项目配置也类似,然后开始使用 Zephyr 作为你的测试管理工具吧。如图所示在 Department Dashboard Management 中检查和编辑管理设置状态。 + +![zephyr 仪表盘](http://blog.linoxide.com/wp-content/uploads/2015/08/dashboard.png) + +### 总结 ### + +好了! 我们已经在 CentOS 7.1 上安装完了 Zephyr。我们希望你能更加深入了解 Zephyr 测试管理工具,它提供简化测试流程、允许快速访问数据分析、协作工具以及多个项目成员之间交流。如果在你的环境中遇到任何问题,欢迎和我们联系。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-zephyr-tool-centos-7-x/ + +作者:[Kashif Siddique][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者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 From ec61534f1216cf42d9333daea7d020751ff6350e Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 1 Nov 2015 23:02:50 +0800 Subject: [PATCH 2380/2517] PUB:20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools @alim0x --- ... Using screenfetch and linux_logo Tools.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename {translated/tech => published}/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md (87%) diff --git a/translated/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md b/published/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md similarity index 87% rename from translated/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md rename to published/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md index 4e9dce31ca..564fb33e1e 100644 --- a/translated/tech/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md +++ b/published/20150914 Display Awesome Linux Logo With Basic Hardware Info Using screenfetch and linux_logo Tools.md @@ -1,12 +1,12 @@ -用 screenfetch 和 linux_logo 工具显示带有酷炫 Linux 标志的基本硬件信息 +用 screenfetch 和 linux_logo 显示带有酷炫 Linux 标志的基本硬件信息 ================================================================================ 想在屏幕上显示出你的 Linux 发行版的酷炫标志和基本硬件信息吗?不用找了,来试试超赞的 screenfetch 和 linux_logo 工具。 -### 来见见 screenfetch 吧 ### +### 来看看 screenfetch 吧 ### screenFetch 是一个能够在截屏中显示系统/主题信息的命令行脚本。它可以在 Linux,OS X,FreeBSD 以及其它的许多类Unix系统上使用。来自 man 手册的说明: -> 这个方便的 Bash 脚本可以用来生成那些漂亮的终端主题信息和 ASCII 发行版标志,就像如今你在别人的截屏里看到的那样。它会自动检测你的发行版并显示 ASCII 版的发行版标志,并且在右边显示一些有价值的信息。 +> 这个方便的 Bash 脚本可以用来生成那些漂亮的终端主题信息和用 ASCII 构成的发行版标志,就像如今你在别人的截屏里看到的那样。它会自动检测你的发行版并显示 ASCII 版的发行版标志,并且在右边显示一些有价值的信息。 #### 在 Linux 上安装 screenfetch #### @@ -16,7 +16,7 @@ screenFetch 是一个能够在截屏中显示系统/主题信息的命令行脚 ![](http://s0.cyberciti.org/uploads/cms/2015/09/ubuntu-debian-linux-apt-get-install-screenfetch.jpg) -图一:用 apt-get 安装 screenfetch +*图一:用 apt-get 安装 screenfetch* #### 在 Mac OS X 上安装 screenfetch #### @@ -26,7 +26,7 @@ screenFetch 是一个能够在截屏中显示系统/主题信息的命令行脚 ![](http://s0.cyberciti.org/uploads/cms/2015/09/apple-mac-osx-install-screenfetch.jpg) -图二:用 brew 命令安装 screenfetch +*图二:用 brew 命令安装 screenfetch* #### 在 FreeBSD 上安装 screenfetch #### @@ -36,7 +36,7 @@ screenFetch 是一个能够在截屏中显示系统/主题信息的命令行脚 ![](http://s0.cyberciti.org/uploads/cms/2015/09/freebsd-install-pkg-screenfetch.jpg) -图三:在 FreeBSD 用 pkg 安装 screenfetch +*图三:在 FreeBSD 用 pkg 安装 screenfetch* #### 在 Fedora 上安装 screenfetch #### @@ -46,7 +46,7 @@ screenFetch 是一个能够在截屏中显示系统/主题信息的命令行脚 ![](http://s0.cyberciti.org/uploads/cms/2015/09/fedora-dnf-install-screenfetch.jpg) -图四:在 Fedora 22 用 dnf 安装 screenfetch +*图四:在 Fedora 22 用 dnf 安装 screenfetch* #### 我该怎么使用 screefetch 工具? #### @@ -56,21 +56,21 @@ screenFetch 是一个能够在截屏中显示系统/主题信息的命令行脚 这是不同系统的输出: -![](http://s0.cyberciti.org/uploads/cms/2015/09/fedora-screenfetch-300x193.jpg) +![](http://s0.cyberciti.org/uploads/cms/2015/09/fedora-screenfetch.jpg) -Fedora 上的 Screenfetch +*Fedora 上的 Screenfetch* -![](http://s0.cyberciti.org/uploads/cms/2015/09/screenfetch-osx-300x213.jpg) +![](http://s0.cyberciti.org/uploads/cms/2015/09/screenfetch-osx.jpg) -OS X 上的 Screenfetch +*OS X 上的 Screenfetch* -![](http://s0.cyberciti.org/uploads/cms/2015/09/screenfetch-freebsd-300x143.jpg) +![](http://s0.cyberciti.org/uploads/cms/2015/09/screenfetch-freebsd.jpg) -FreeBSD 上的 Screenfetch +*FreeBSD 上的 Screenfetch* -![](http://s0.cyberciti.org/uploads/cms/2015/09/debian-ubutnu-screenfetch-outputs-300x279.jpg) +![](http://s0.cyberciti.org/uploads/cms/2015/09/debian-ubutnu-screenfetch-outputs.jpg) -Debian 上的 Screenfetch +*Debian 上的 Screenfetch* #### 获取截屏 #### @@ -134,7 +134,7 @@ linux_logo 程序生成一个彩色的 ANSI 版企鹅图片,还包含一些来 ![](http://s0.cyberciti.org/uploads/cms/2015/09/debian-linux_logo.jpg) -运行 linux_logo +*运行 linux_logo* #### 等等,还有更多! #### @@ -196,7 +196,7 @@ linux_logo 程序生成一个彩色的 ANSI 版企鹅图片,还包含一些来 ![](http://s0.cyberciti.org/uploads/cms/2015/09/linux-logo-fun.gif) -动图1: linux_logo 和 bash 循环,既有趣又能发朋友圈耍酷 +*动图1: linux_logo 和 bash 循环,既有趣又能发朋友圈耍酷* ### 获取帮助 ### @@ -216,7 +216,7 @@ via: http://www.cyberciti.biz/hardware/howto-display-linux-logo-in-bash-terminal 作者:Vivek Gite 译者:[alim0x](https://github.com/alim0x) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 11f16e1b2e33f002508507f62a49fd96b21ef76d Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 1 Nov 2015 23:27:58 +0800 Subject: [PATCH 2381/2517] PUB:20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux @geekpi --- ...n about built-in kernel modules on Linux.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename {translated/tech => published}/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md (53%) diff --git a/translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md b/published/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md similarity index 53% rename from translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md rename to published/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md index 3b37ef3c91..ada766b696 100644 --- a/translated/tech/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md +++ b/published/20151012 Linux FAQs with Answers--How to find information about built-in kernel modules on Linux.md @@ -1,12 +1,12 @@ -Linux有问必答--如何找出Linux中内置模块的信息 +Linux有问必答:如何找出Linux中内置模块的信息 ================================================================================ -> **提问**:我想要知道Linux系统中内核内置的模块,以及每个模块的参数。有什么方法可以得到内置模块和设备驱动的列表,以及它们的详细信息呢? +> **提问**:我想要知道Linux系统中内核内置的模块,以及每个模块有哪些参数。有什么方法可以得到内置模块和设备驱动的列表,以及它们的详细信息呢? -现代Linux内核正在随着时间迅速地增长来支持大量的硬件、文件系统和网络功能。在此期间,“可加载模块”的引入防止内核变得越来越臃肿,以及在不同的环境中灵活地扩展功能及硬件支持,而不必重新构建内核。 +现代Linux内核正在随着时间变化而迅速增长,以支持大量的硬件、文件系统和网络功能。在此期间,“可加载模块(loadable kernel modules,[LKM])”的引入防止内核变得越来越臃肿,以及在不同的环境中灵活地扩展功能及硬件支持,而不必重新构建内核。 -最新的Linux发型版的内核只带了相对较小的“内置模块”,其余的特定硬件驱动或者自定义功能作为“可加载模块”来让你选择地加载或卸载。 +最新的Linux发行版的内核只带了相对较小的“内置模块(built-in modules)”,其余的特定硬件驱动或者自定义功能作为“可加载模块”来让你选择地加载或卸载。 -内置模块被静态地编译进了内核。不像可加载内核模块可以动态地使用modprobe、insmod、rmmod、modinfo或者lsmod等命令地加载、卸载、查询模块,内置的模块总是在启动是就加载进了内核,不会被这些命令管理。 +内置模块被静态地编译进了内核。不像可加载内核模块可以动态地使用`modprobe`、`insmod`、`rmmod`、`modinfo`或者`lsmod`等命令地加载、卸载、查询模块,内置的模块总是在启动时就加载进了内核,不会被这些命令管理。 ### 找出内置模块列表 ### @@ -22,13 +22,13 @@ Linux有问必答--如何找出Linux中内置模块的信息 ### 找出内置模块参数 ### -每个内核模块无论是内置的还是可加载的都有一系列的参数。对于可加载模块,modinfo命令显示它们的参数信息。然而这个命令不对内置模块管用。你会得到下面的错误。 +每个内核模块无论是内置的还是可加载的都有一系列的参数。对于可加载模块,`modinfo`命令可以显示它们的参数信息。然而这个命令对内置模块没有用。你会得到下面的错误。 modinfo: ERROR: Module XXXXXX not found. -如果你想要查看内置模块的参数,以及它们的值,你可以在**/sys/module** 下检查它们的内容。 +如果你想要查看内置模块的参数,以及它们的值,你可以在 **/sys/module** 下检查它们的内容。 -在 /sys/module目录下,你可以找到内核模块(包含内置和可加载的)命名的子目录。结合则进入每个模块目录,这里有个“parameters”目录,列出了这个模块所有的参数。 +在 /sys/module目录下,你可以找到内核模块(包含内置和可加载的)命名的子目录。进入每个模块目录,这里有个“parameters”目录,列出了这个模块所有的参数。 比如你要找出tcp_cubic(内核默认的TCP实现)模块的参数。你可以这么做: @@ -46,7 +46,7 @@ via: http://ask.xmodulo.com/find-information-builtin-kernel-modules-linux.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4c85e3a1b7067df66ba431d260e500b0b28d852e Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 2 Nov 2015 00:22:00 +0800 Subject: [PATCH 2382/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...res and algorithms make you a better developer.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/translated/talk/20150823 How learning data structures and algorithms make you a better developer.md b/translated/talk/20150823 How learning data structures and algorithms make you a better developer.md index 8125229719..6c50ed210a 100644 --- a/translated/talk/20150823 How learning data structures and algorithms make you a better developer.md +++ b/translated/talk/20150823 How learning data structures and algorithms make you a better developer.md @@ -15,15 +15,15 @@ 您将***更深入地***了解,计算机如何完成各项操作。无论您是否是直接使用给定的算法,它都影响着您作出的各种技术决定。从计算机操作系统的内存分配到RDBMS的内在工作机制,以及网络堆栈如何实现将数据从地球的一个角落发送至另一个角落这些大大小小的工作的完成,都离不开基础的数据结构与算法,理解并掌握它将会让您更了解计算机的运作机理。 -对算法广泛深入的学习能让为您应对大体系的问题储备解决方案。之前建模困难时遇到的问题如今通常都能融合进经典的数据结构中得到很好地解决。即使是最基础的数据结构,只要对它进行足够深入的钻研,您将会发现在每天的编程任务中都能经常用到这些知识。 +对算法广泛深入的学习能为您储备解决方案来应对大体系的问题。之前建模困难时遇到的问题如今通常都能融合进经典的数据结构中得到很好地解决。即使是最基础的数据结构,只要对它进行足够深入的钻研,您将会发现在每天的编程任务中都能经常用到这些知识。 -有了这种思维模式,在遇到磨棱两可的问题时,您会具备想出新的解决方案的能力。即使最初并没有打算用数据结构与算法解决相应问题的情况,当真正用它们解决这些问题时您会发现它们将非常有用。要意识到这一点,您至少要对数据结构与算法分析的基础知识有深入直观的认识。 +有了这种思维模式,在遇到磨棱两可的问题时,您将能够想出新奇的解决方案。即使最初并没有打算用数据结构与算法解决相应问题的情况,当真正用它们解决这些问题时您会发现它们将非常有用。要意识到这一点,您至少要对数据结构与算法分析的基础知识有深入直观的认识。 理论认识就讲到这里,让我们一起看看下面几个例子。 ###最短路径问题### -我们想要开发一个计算从一个国际机场出发到另一个国际机场的最短距离的软件。假设我们受限于以下路线: +我们想要开发一个软件来计算从一个国际机场出发到另一个国际机场的最短距离。假设我们受限于以下路线: ![](http://www.happybearsoftware.com/assets/posts/how-learning-data-structures-and-algorithms-makes-you-a-better-developer/airport-graph-d2e32b3344b708383e405d67a80c29ea.svg) @@ -61,7 +61,7 @@ 这里有两个潜在的重要约束条件: - 返回的必修课列表中,每门课都与下一门课存在依赖关系 - - 必修课列表中不能有重复项 + - 我们不希望列表中有任何重复课程 这是解决数据间依赖关系的例子,解决该问题的排序算法称作拓扑排序算法(tsort)。它适用于解决上述我们用YAML列出的依赖关系图的情况,以下是在图中显示的相关结果(其中箭头代表`需要先修的课程`): @@ -96,7 +96,7 @@ - 您会理解为什么较大的压缩文件会获得较好的整体压缩效果(如压缩的越多,压缩率也越高)。这也是SPDY协议得以推崇的原因之一:在复杂的HTTP请求/响应过程数据有更好的压缩效果。 - 您会了解数据传输过程中如果想要压缩JavaScript/CSS文件,运行压缩软件是完全没有意义的。PNG文件也是类似,因为它们已经使用DEFLATE算法完成了压缩。 - - 如果您试图强行破译加密的信息,您可能会发现重复数据压缩质量越好,给定的密文单位bit的数据压缩将帮助您确定相关的[分组密码模式](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation). + - 如果您试图强行破译加密的信息,您可能会发现由于重复数据压缩质量更好,给定的密文单位bit的数据压缩将帮助您确定相关的[分组密码工作模式](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation). ###下一步选择学习什么是困难的### 作为一名程序员应当做好持续学习的准备。为成为一名web开发人员,您需要了解标记语言以及Ruby/Python,正则表达式,SQL,JavaScript等高级编程语言,还需要了解HTTP的工作原理,如何运行UNIX终端以及面向对象的编程艺术。您很难有效地预览到未来的职业全景,因此选择下一步要学习哪些知识是困难的。 @@ -111,7 +111,7 @@ via: http://www.happybearsoftware.com/how-learning-data-structures-and-algorithm 作者:[Happy Bear][a] 译者:[icybreaker](https://github.com/icybreaker) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 From 4698c71a1f8c444780e22fc4b90491f6abb17335 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Mon, 2 Nov 2015 22:55:32 +0800 Subject: [PATCH 2383/2517] delete a post --- ...Distribution Logo ASCII Art In Terminal.md | 131 ------------------ 1 file changed, 131 deletions(-) delete mode 100644 sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md diff --git a/sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md b/sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md deleted file mode 100644 index 4a978f5b77..0000000000 --- a/sources/tech/20151027 Display Linux Distribution Logo ASCII Art In Terminal.md +++ /dev/null @@ -1,131 +0,0 @@ -translating wi-cuckoo -Display Linux Distribution Logo ASCII Art In Terminal -================================================================================ -![Display Linux logo in ASCII art](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/ASCII-Arts-Linux-Logo.jpeg) - -See the picture above? You might have seen people sharing such desktop screenshot with terminal showing the logo of the Linux distribution used in ASCII characters. Looking at those screenshots, you may wonder **how to show the logo of Linux distribution in terminal in ASCII characters**. - -In this tutorial, I’ll show you a couple of tools that will display Linux logo in command line. - -### 1. Use screenfetch to display Linux distro logo in ASCII art ### - -[screenfetch][1] is the easiest way to display Linux distribution logo in the terminal. You don’t have to specify anything, it will auto-detect the Linux distribution. And not just logo, screenfetch also displays some basic hardware information alongside it. - -#### Install screenfetch #### - -To install screenfetch in Ubuntu based distributions such as Linux Mint, elementary OS, Linux Lite, Zorin OS etc, you can use the command below: - - sudo apt-get install screenfetch - -**Note**: For Ubuntu 14.04 based distros, you’ll have to add a PPA (as suggested by Benjamin in the comments). Use the command below: - - sudo apt-add-repository ppa:djcj/screenfetch - sudo apt-get update - apt-get install screenfetch - -To install screenfetch in Arch based distributions such as Antergos, Manjaro, Chakra etc, use the command below: - - sudo pacman -S screenfetch - -To install screenfetch in Fedora based Linux distributions such as Korora etc, use the command below: - - sudo dnf install screenfetch - -#### Using screenfetch #### - -Using screenfetch is utterly simple. Open a terminal and use the command below: - - screenfetch - -That’s it. You’ll see the logo of your Linux distribution displayed in ASCII art along with some information about your system: - -![ASCII display for Antergos](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Screenfetch-Antergos-Arch.jpeg) - -![ASCII display for Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Screenfetch-Ubuntu.jpeg) - -#### Taking screenshot with screenfetch [Optional] #### - -Now this is optional because you can use the Screenshot tools to take screenshot of the displayed ASCII art in terminal. But if you install command line screenshot utility, scrot (it is available in the default repository of several Linux distributions), you can automatically take a screenshot of the displayed Linux logo along with your desktop with the command below: - - screenfetch -s - -If I combine screenfetch with vintage looking [cool-retro-term][2], the result is even more awesome: - -![screenfetch with cool retro term](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/ASCII-Art-Retro-Terminal.jpeg) - -### 2. Use linux_logo to display Linux distro logo in ASCII art ### - -linux_logo is another command line tool to display ASCII art of Linux distributions. Unlike screenfetch, linux_logo doesn’t automatically identifies and displays the correct Linux distro logo. - -For Ubuntu, it displayed Debian and for Antergos, it displayed sort of BSD-ish logo. - -![Debian instead of Ubuntu?](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Linuxlogo-Ubuntu.jpeg) - -Debian instead of Ubuntu? - -But linux_logo has a number of options that you can use. You can choose to display the logo of any Linux distribution available in the list. Before we see how to do that, let me show you how to install it first. - -#### Install linux_logo #### - -To install linux_logo in Ubuntu based Linux distributions, use the command below: - - sudo apt-get install linuxlogo - -To install linux_logo in Arch based Linux distributions, use the command below: - - sudo pacman -S linux_logo - -To install linux_logo in Fedora based Linux distributions, use the command below: - - sudo dnf install linux_logo - -#### Using linux_logo #### - -Once installed, use the command below to list all the options: - - linux_logo -L list - -The output would be like: - -![using linux_logo](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Linux-logo-Antergos.jpeg) - -As you can see there are a number of options. You can choose the number of the Linux distribution and use it in the following way: - - linux_logo -L 25 - -This will display OpenSUSE logo: - -![OpenSUSE ASCII art](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Suse-Linux-logo-Antergos.jpeg) - -There are more options to display certain sort of info and hide other etc. I left it up to you to explore it. - -### Which one did you like more? ### - -screenfetch or linux_logo? Which one you liked more? Personally, I prefer screenfetch. It’s easier to use and does what it is expected of it. What about you? - -注:投票 -Which one you prefer? - -- screenfetch -- linux_logo -- Don't care - -投票代码: -
-
- -

- --------------------------------------------------------------------------------- - -via: http://itsfoss.com/display-linux-logo-in-ascii/ - -作者:[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]:https://github.com/KittyKatt/screenFetch -[2]:http://itsfoss.com/cool-retro-term/ From adb6baf2cf8a63eebf8f6fa178c60aab53c02e7e Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Mon, 2 Nov 2015 23:15:25 +0800 Subject: [PATCH 2384/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20151027 How To Show Desktop In GNOME 3.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/tech/20151027 How To Show Desktop In GNOME 3.md b/translated/tech/20151027 How To Show Desktop In GNOME 3.md index 93bd0ab847..2eb373defa 100644 --- a/translated/tech/20151027 How To Show Desktop In GNOME 3.md +++ b/translated/tech/20151027 How To Show Desktop In GNOME 3.md @@ -1,18 +1,18 @@ -如何在GNOME 3 中显示桌面 +如何在 GNOME 3 中显示桌面 ================================================================================ ![How to show desktop in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-in-GNOME-3.jpg) -你**该如何在GNOME 3中显示桌面**?GNOME是一个很棒的桌面环境但是它专注于在程序间切换。如果你想关闭所有窗口并显示桌面呢? +你**如何在 GNOME 3 中显示桌面**?GNOME是一个很棒的桌面环境但是它更加专注于在程序间切换。如果你想关闭所有运行中的窗口,仅仅显示桌面呢? -在Windows中,你可以按下Windows+D。在Ubuntu Unity中,可以用Ctrl+Super+D快捷键。但是由于一些原因,GNOME禁用了显示桌面的快捷键。 +在Windows中,你可以按下Windows+D。在Ubuntu Unity中,可以用Ctrl+Super+D快捷键。不过由于一些原因,GNOME禁用了显示桌面的快捷键。 -当你按下Super+D或者Ctrl+Super+D,不会发生什么。如果你想要看到桌面,你得一个个最小化窗口。如果你有好几个打开的窗口那么这会非常不方便。 +当你按下Super+D或者Ctrl+Super+D,什么都不会发生。如果你想要看到桌面,你得一个个最小化窗口。如果你有好几个打开的窗口那么这会非常不方便。 -在本教程中,我们向你展示[GNOME 3][1]中添加显示桌面的快捷键。 +在本教程中,我将会向你展示在[GNOME 3][1]中添加显示桌面的快捷键。 ### 在GNOME 3 中添加显示桌面的快捷键 ### -我在本教程的使用的是GNOME 3.18的[Antergos Linux][2],但是步骤对于任何GNOME 3版本的Linux发行版都是有用的。同时也使用了[Numix主题][3]作为默认主题。因此你也许不会看到常规的GNOME图标。但是我相信步骤很直接你可以很方便地尝试。 +我在本教程的使用的是GNOME 3.18的[Antergos Linux][2]但是这些步骤对于任何GNOME 3版本的Linux发行版都适用。同时也使用了[Numix主题][3]作为默认主题。因此你也许不会看到平常的GNOME图标。但是我相信步骤是一目了然的,很容易就能理解。 #### 第一步 #### @@ -22,27 +22,27 @@ #### 第二步 #### -当你在系统设置中时,寻找设置。 +当你在系统设置中时,寻找Keyboard设置。 ![Keyboard settings in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-2.png) #### 第三步 #### -在这里,选择**Shortcuts**标签并在左边拦选择**Navigation**。向下滚动一点查找**Hide all normal windows**。你会看见它已经被禁用了 +在这里,选择**Shortcuts**标签并在左边拦选择**Navigation**。向下滚动一点查找**Hide all normal windows**。你会看见它已经被禁用了。 ![Shortcut keys in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-3.jpeg) #### 第四步 #### -在“Hide all normla windows”上面点击一下。你会看到它变成了**New accelerator**。现在无论你按下哪个键,他都会被分配成显示桌面。 +在“Hide all normla windows”上面点击一下。你会看到它变成了**New accelerator**。现在无论你按下哪个键,他都会被指定为显示桌面。 -如果你意外按下了错误的键,只要按下退格它就会被禁用。再次点击并使用需要的组合键。 +如果你不小心按下了错误的组合键,只要按下退格它就会被禁用。再次点击并使用需要的组合键。 ![Shortcut key edit in GNOME 3](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-4.jpeg) #### 第五步 #### -一旦设置了组合键,只要关闭系统设置。没有设置保存因为更改是立即生效的。在本例中,我使用Ctrl+Super+D来校准到与Ubuntu Unity一致。 +一旦设置了组合键,只要关闭系统设置。没有保存设置因为更改是立即生效的。在本例中,我使用Ctrl+Super+D来与我在Ubuntu Unity中的使用习惯保持一致。 ![Keyboard shortcut edit in GNOME](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-5.jpeg) @@ -54,7 +54,7 @@ via: http://itsfoss.com/show-desktop-gnome-3/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From bc3dc812a8eaa085cf49dfbcac9235d98f732602 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 2 Nov 2015 23:18:58 +0800 Subject: [PATCH 2385/2517] PUB:Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets @ictlyh --- ...m Activity Reports Using Linux Toolsets.md | 64 ++++++++++--------- 1 file changed, 33 insertions(+), 31 deletions(-) rename {translated/tech => published}/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md (69%) diff --git a/translated/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md b/published/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md similarity index 69% rename from translated/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md rename to published/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md index 7a373cd76b..b60fdfe39d 100644 --- a/translated/tech/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md +++ b/published/RHCE/Part 3 - How to Produce and Deliver System Activity Reports Using Linux Toolsets.md @@ -1,32 +1,32 @@ -RHCE 第三部分 - 如何使用 Linux 工具集产生和发送系统活动报告 +RHCE 系列(三):如何使用 Linux 工具集生成和发送系统活动报告 ================================================================================ -作为一个系统工程师,你经常需要生成一些显示系统资源利用率的报告,以便确保:1)正最佳利用它们,2)防止出现瓶颈,3)确保可扩展性,以及其它原因。 +作为一个系统工程师,你经常需要生成一些显示系统资源利用率的报告,以便确保:1)正在合理利用系统,2)防止出现瓶颈,3)确保可扩展性,以及其它原因。 ![监视 Linux 性能活动报告](http://www.tecmint.com/wp-content/uploads/2015/08/Monitor-Linux-Performance-Activity-Reports.jpg) -RHCE 第三部分:监视 Linux 性能活动报告 +*RHCE 第三部分:监视 Linux 性能活动报告* -除了著名的用于检测磁盘、内存和 CPU 使用率的原生 Linux 工具 - 可以给出很多例子,红帽企业版 Linux 7 还提供了两个额外的工具集用于为你的报告增加可以收集的数据:sysstat 和 dstat。 +除了著名的用于检测磁盘、内存和 CPU 使用率的原生 Linux 工具 - 可以给出很多例子,红帽企业版 Linux 7 还提供了另外两个可以为你的报告更多数据的工具套装:sysstat 和 dstat。 在这篇文章中,我们会介绍两者,但首先让我们来回顾一下传统工具的使用。 ### 原生 Linux 工具 ### -使用 df,你可以报告磁盘空间以及文件系统的 inode 使用情况。你需要监视两者,因为缺少磁盘空间会阻止你保存更多文件(甚至会导致系统崩溃),就像耗尽 inode 意味着你不能将文件链接到对应的数据结构,从而导致同样的结果:你不能将那些文件保存到磁盘中。 +使用 df,你可以报告磁盘空间以及文件系统的 inode 使用情况。你需要监视这两者,因为缺少磁盘空间会阻止你保存更多文件(甚至会导致系统崩溃),就像耗尽 inode 意味着你不能将文件链接到对应的数据结构,从而导致同样的结果:你不能将那些文件保存到磁盘中。 # df -h [以人类可读形式显示输出] # df -h --total [生成总计] ![检查 Linux 总的磁盘使用](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Total-Disk-Usage.png) -检查 Linux 总的磁盘使用 +*检查 Linux 总的磁盘使用* # df -i [显示文件系统的 inode 数目] # df -i --total [生成总计] ![检查 Linux 总的 inode 数目](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Total-inode-Numbers.png) -检查 Linux 总的 inode 数目 +*检查 Linux 总的 inode 数目* 用 du,你可以估计文件、目录或文件系统的文件空间使用。 @@ -37,7 +37,7 @@ RHCE 第三部分:监视 Linux 性能活动报告 ![检查 Linux 目录磁盘大小](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Directory-Disk-Size.png) -检查 Linux 目录磁盘大小 +*检查 Linux 目录磁盘大小* 别错过了: @@ -56,7 +56,7 @@ RHCE 第三部分:监视 Linux 性能活动报告 ![检查 Linux 系统性能](http://www.tecmint.com/wp-content/uploads/2015/08/Check-Linux-Systerm-Performance.png) -检查 Linux 系统性能 +*检查 Linux 系统性能* 正如你从上面图片看到的,vmstat 的输出分为很多列:proc(process)、memory、swap、io、system、和 CPU。每个字段的意义可以在 vmstat man 手册的 FIELD DESCRIPTION 部分找到。 @@ -66,20 +66,20 @@ RHCE 第三部分:监视 Linux 性能活动报告 ![Vmstat Linux 性能监视](http://www.tecmint.com/wp-content/uploads/2015/08/Vmstat-Linux-Peformance-Monitoring.png) -Vmstat Linux 性能监视 +*Vmstat Linux 性能监视* 请注意当磁盘上的文件被更改时,活跃内存的数量增加,写到磁盘的块数目(bo)和属于用户进程的 CPU 时间(us)也是这样。 -或者一个保存大文件到磁盘时(dsync 引发): +或者直接保存一个大文件到磁盘时(由 dsync 标志引发): # vmstat -a 1 5 # dd if=/dev/zero of=dummy.out bs=1M count=1000 oflag=dsync ![Vmstat Linux 磁盘性能监视](http://www.tecmint.com/wp-content/uploads/2015/08/VmStat-Linux-Disk-Performance-Monitoring.png) -Vmstat Linux 磁盘性能监视 +*Vmstat Linux 磁盘性能监视* -在这个例子中,我们可以看到很大数目的块被写入到磁盘(bo),这正如预期的那样,同时 CPU 处理任务之前等待 IO 操作完成的时间(wa)也增加了。 +在这个例子中,我们可以看到大量的块被写入到磁盘(bo),这正如预期的那样,同时 CPU 处理任务之前等待 IO 操作完成的时间(wa)也增加了。 **别错过**: [Vmstat – Linux 性能监视][3] @@ -90,22 +90,22 @@ Vmstat Linux 磁盘性能监视 sysstat 软件包包含以下工具: - sar (收集、报告、或者保存系统活动信息)。 -- sadf (以多种方式显式 sar 收集的数据)。 +- sadf (以多种方式显示 sar 收集的数据)。 - mpstat (报告处理器相关的统计信息)。 - iostat (报告 CPU 统计信息和设备以及分区的 IO统计信息)。 - pidstat (报告 Linux 任务统计信息)。 - nfsiostat (报告 NFS 的输出/输出统计信息)。 - cifsiostat (报告 CIFS 统计信息) -- sa1 (收集并保存系统活动日常文件的二进制数据)。 -- sa2 (在 /var/log/sa 目录写每日报告)。 +- sa1 (收集并保存二进制数据到系统活动每日数据文件中)。 +- sa2 (在 /var/log/sa 目录写入每日报告)。 -dstat 为这些工具提供的功能添加了一些额外的特性,以及更多的计数器和更大的灵活性。你可以通过运行 yum info sysstat 或者 yum info dstat 找到每个工具完整的介绍,或者安装完成后分别查看每个工具的 man 手册。 +dstat 比这些工具所提供的功能更多一些,并且提供了更多的计数器和更大的灵活性。你可以通过运行 yum info sysstat 或者 yum info dstat 找到每个工具完整的介绍,或者安装完成后分别查看每个工具的 man 手册。 安装两个软件包: # yum update && yum install sysstat dstat -sysstat 主要的配置文件是 /etc/sysconfig/sysstat。你可以在该文件中找到下面的参数: +sysstat 主要的配置文件是 `/etc/sysconfig/sysstat`。你可以在该文件中找到下面的参数: # How long to keep log files (in days). # If value is greater than 28, then log files are kept in @@ -119,17 +119,17 @@ sysstat 主要的配置文件是 /etc/sysconfig/sysstat。你可以在该文件 # Compression program to use. ZIP="bzip2" -sysstat 安装完成后,/etc/cron.d/sysstat 中会添加和启用两个 cron 作业。第一个作业每 10 分钟运行系统活动计数工具并在 /var/log/sa/saXX 中保存报告,其中 XX 是该月的一天。 +sysstat 安装完成后,`/etc/cron.d/sysstat` 中会添加和启用两个 cron 任务。第一个任务每 10 分钟运行系统活动计数工具,并在 `/var/log/sa/saXX` 中保存报告,其中 XX 是该月的一天。 -因此,/var/log/sa/sa05 会包括该月份第 5 天所有的系统活动报告。这里假设我们在上面的配置文件中对 HISTORY 变量使用默认的值: +因此,`/var/log/sa/sa05` 会包括该月份第 5 天所有的系统活动报告。这里假设我们在上面的配置文件中对 HISTORY 变量使用默认的值: */10 * * * * root /usr/lib64/sa/sa1 1 1 -第二个作业在每天夜间 11:53 生成每日进程计数总结并把它保存到 /var/log/sa/sarXX 文件,其中 XX 和之前例子中的含义相同: +第二个任务在每天夜间 11:53 生成每日进程计数总结并把它保存到 `/var/log/sa/sarXX` 文件,其中 XX 和之前例子中的含义相同: 53 23 * * * root /usr/lib64/sa/sa2 -A -例如,你可能想要输出该月份第 6 天从上午 9:30 到晚上 5:30 的系统统计信息到一个 LibreOffice Calc 或 Microsoft Excel 可以查看的 .csv 文件(它也允许你创建表格和图片): +例如,你可能想要输出该月份第 6 天从上午 9:30 到晚上 5:30 的系统统计信息到一个 LibreOffice Calc 或 Microsoft Excel 可以查看的 .csv 文件(这样就可以让你创建表格和图片了): # sadf -s 09:30:00 -e 17:30:00 -dh /var/log/sa/sa06 -- | sed 's/;/,/g' > system_stats20150806.csv @@ -137,7 +137,7 @@ sysstat 安装完成后,/etc/cron.d/sysstat 中会添加和启用两个 cron ![Linux 系统统计信息](http://www.tecmint.com/wp-content/uploads/2015/08/Linux-System-Statistics.png) -Linux 系统统计信息 +*Linux 系统统计信息* 最后,让我们看看 dstat 提供什么功能。请注意如果不带参数运行,dstat 默认使用 -cdngy(表示 CPU、磁盘、网络、内存页、和系统统计信息),并每秒添加一行(可以在任何时候用 Ctrl + C 中断执行): @@ -145,15 +145,15 @@ Linux 系统统计信息 ![Linux 磁盘统计检测](http://www.tecmint.com/wp-content/uploads/2015/08/dstat-command.png) -Linux 磁盘统计检测 +*Linux 磁盘统计检测* 要输出统计信息到 .csv 文件,可以用 -output 标记后面跟一个文件名称。让我们来看看在 LibreOffice Calc 中该文件看起来是怎样的: ![检测 Linux 统计信息输出](http://www.tecmint.com/wp-content/uploads/2015/08/Monitor-Linux-Statistics-Output.png) -检测 Linux 统计信息输出 +*检测 Linux 统计信息输出* -我强烈建议你查看 dstat 的 man 手册,为了方便你的阅读用 PDF 格式包括本文以及 sysstat 的 man 手册。你会找到其它能帮助你创建自定义的详细系统活动报告的选项。 +为了更多的阅读体验,我强烈建议你查看 [dstat][5] 和 [sysstat][6] 的 pdf 格式 man 手册。你会找到其它能帮助你创建自定义的详细系统活动报告的选项。 **别错过**: [Sysstat – Linux 的使用活动检测工具][4] @@ -161,7 +161,7 @@ Linux 磁盘统计检测 在该指南中我们解释了如何使用 Linux 原生工具以及 RHEL 7 提供的特定工具来生成系统使用报告。在某种情况下,你可能像依赖最好的朋友那样依赖这些报告。 -你很可能使用过这篇指南中我们没有介绍到的其它工具。如果真是这样的话,用下面的表格和社区中的其他成员一起分享吧,也可以是任何其它的建议/疑问/或者评论。 +你很可能使用过这篇指南中我们没有介绍到的其它工具。如果真是这样的话,用下面的表单和社区中的其他成员一起分享吧,也可以是任何其它的建议/疑问/或者评论。 我们期待你的回复。 @@ -171,12 +171,14 @@ via: http://www.tecmint.com/linux-performance-monitoring-and-file-system-statist 作者:[Gabriel Cánepa][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者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/how-to-check-disk-space-in-linux/ +[1]:https://linux.cn/article-6466-1.html [2]:http://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/ -[3]:http://www.tecmint.com/linux-performance-monitoring-with-vmstat-and-iostat-commands/ -[4]:http://www.tecmint.com/install-sysstat-in-linux/ \ No newline at end of file +[3]:https://linux.cn/article-4024-1.html +[4]:https://linux.cn/article-4028-1.html +[5]:http://www.tecmint.com/wp-content/pdf/dstat.pdf +[6]:http://www.tecmint.com/wp-content/pdf/sysstat.pdf \ No newline at end of file From 21946bb666b15c91d602777e5916647a6b0039d5 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 3 Nov 2015 22:56:59 +0800 Subject: [PATCH 2386/2517] PUB:20150823 How learning data structures and algorithms make you a better developer @icybreaker --- ... algorithms make you a better developer.md | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) rename {translated/talk => published}/20150823 How learning data structures and algorithms make you a better developer.md (58%) diff --git a/translated/talk/20150823 How learning data structures and algorithms make you a better developer.md b/published/20150823 How learning data structures and algorithms make you a better developer.md similarity index 58% rename from translated/talk/20150823 How learning data structures and algorithms make you a better developer.md rename to published/20150823 How learning data structures and algorithms make you a better developer.md index 6c50ed210a..27973b2f42 100644 --- a/translated/talk/20150823 How learning data structures and algorithms make you a better developer.md +++ b/published/20150823 How learning data structures and algorithms make you a better developer.md @@ -1,19 +1,19 @@ -学习数据结构与算法分析如何帮助您成为更优秀的开发人员? +学习数据结构与算法分析如何帮助您成为更优秀的开发人员 ================================================================================ -> "相较于其它方式,我一直热衷于推崇围绕数据设计代码,我想这也是Git能够如此成功的一大原因[…]在我看来,区别程序员优劣的一大标准就在于他是否认为自己设计的代码或数据结构更为重要。" +> "相较于其它方式,我一直热衷于推崇围绕数据设计代码,我想这也是Git能够如此成功的一大原因[…]在我看来,区别程序员优劣的一大标准就在于他是否认为自己设计的代码还是数据结构更为重要。" -- Linus Torvalds --- -> "优秀的数据结构与简陋的代码组合远比倒过来的组合方式更好。" +> "优秀的数据结构与简陋的代码组合远比反之的组合更好。" -- Eric S. Raymond, The Cathedral and The Bazaar 学习数据结构与算法分析会让您成为一名出色的程序员。 -**数据结构与算法分析是一种解决问题的思维模式** 在您的个人知识库中,数据结构与算法分析的相关知识储备越多,您将具备应对并解决越多各类繁杂问题的能力。掌握了这种思维模式,您还将有能力针对新问题提出更多以前想不到的漂亮的解决方案。 +**数据结构与算法分析是一种解决问题的思维模式。** 在您的个人知识库中,数据结构与算法分析的相关知识储备越多,您将越多具备应对并解决各类繁杂问题的能力。掌握了这种思维模式,您还将有能力针对新问题提出更多以前想不到的漂亮的解决方案。 -您将***更深入地***了解,计算机如何完成各项操作。无论您是否是直接使用给定的算法,它都影响着您作出的各种技术决定。从计算机操作系统的内存分配到RDBMS的内在工作机制,以及网络堆栈如何实现将数据从地球的一个角落发送至另一个角落这些大大小小的工作的完成,都离不开基础的数据结构与算法,理解并掌握它将会让您更了解计算机的运作机理。 +您将*更深入地*了解,计算机如何完成各项操作。无论您是否是直接使用给定的算法,它都影响着您作出的各种技术决定。从计算机操作系统的内存分配到RDBMS的内在工作机制,以及网络协议如何实现将数据从地球的一个角落发送至另一个角落,这些大大小小的工作的完成,都离不开基础的数据结构与算法,理解并掌握它将会让您更了解计算机的运作机理。 对算法广泛深入的学习能为您储备解决方案来应对大体系的问题。之前建模困难时遇到的问题如今通常都能融合进经典的数据结构中得到很好地解决。即使是最基础的数据结构,只要对它进行足够深入的钻研,您将会发现在每天的编程任务中都能经常用到这些知识。 @@ -27,15 +27,15 @@ ![](http://www.happybearsoftware.com/assets/posts/how-learning-data-structures-and-algorithms-makes-you-a-better-developer/airport-graph-d2e32b3344b708383e405d67a80c29ea.svg) -从这张画出机场各自之间的距离以及目的地的图中,我们如何才能找到最短距离,比方说从赫尔辛基到伦敦?**Dijkstra算法**是能让我们在最短的时间得到正确答案的适用算法。 +从这张画出机场各自之间的距离以及目的地的图中,我们如何才能找到最短距离,比方说从赫尔辛基到伦敦?**[Dijkstra算法][3]**是能让我们在最短的时间得到正确答案的适用算法。 -在所有可能的解法中,如果您曾经遇到过这类问题,知道可以用Dijkstra算法求解,您大可不必从零开始实现它,只需***知道***该算法能指向固定的代码库帮助您解决相关的实现问题。 +在所有可能的解法中,如果您曾经遇到过这类问题,知道可以用Dijkstra算法求解,您大可不必从零开始实现它,只需***知道***该算法的代码库能帮助您解决相关的实现问题。 -实现了该算法,您将深入理解一项著名的重要图论算法。您会发现实际上该算法太集成化,因此名为A*的扩展包经常会代替该算法使用。这个算法应用广泛,从机器人指引的功能实现到TCP数据包路由,以及GPS寻径问题都能应用到这个算法。 +如果你深入到该算法的实现中,您将深入理解一项著名的重要图论算法。您会发现实际上该算法比较消耗资源,因此名为[A*][4]的扩展经常用于代替该算法。这个算法应用广泛,从机器人寻路的功能实现到TCP数据包路由,以及GPS寻径问题都能应用到这个算法。 ###先后排序问题### -您想要在开放式在线课程平台上(如Udemy或Khan学院)学习某课程,有些课程之间彼此依赖。例如,用户学习牛顿力学机制课程前必须先修微积分课程,课程之间可以有多种依赖关系。用YAML表述举例如下: +您想要在开放式在线课程(MOOC,Massive Open Online Courses)平台上(如Udemy或Khan学院)学习某课程,有些课程之间彼此依赖。例如,用户学习牛顿力学(Newtonian Mechanics)课程前必须先修微积分(Calculus)课程,课程之间可以有多种依赖关系。用YAML表述举例如下: # Mapping from course name to requirements # @@ -54,7 +54,7 @@ astrophysics: [radioactivity, calculus] quantumn_mechanics: [atomic_physics, radioactivity, calculus] -鉴于以上这些依赖关系,作为一名用户,我希望系统能帮我列出必修课列表,让我在之后可以选择任意一门课程学习。如果我选择了`微积分`课程,我希望系统能返回以下列表: +鉴于以上这些依赖关系,作为一名用户,我希望系统能帮我列出必修课列表,让我在之后可以选择任意一门课程学习。如果我选择了微积分(calculus)课程,我希望系统能返回以下列表: arithmetic -> algebra -> trigonometry -> calculus @@ -63,7 +63,7 @@ - 返回的必修课列表中,每门课都与下一门课存在依赖关系 - 我们不希望列表中有任何重复课程 -这是解决数据间依赖关系的例子,解决该问题的排序算法称作拓扑排序算法(tsort)。它适用于解决上述我们用YAML列出的依赖关系图的情况,以下是在图中显示的相关结果(其中箭头代表`需要先修的课程`): +这是解决数据间依赖关系的例子,解决该问题的排序算法称作拓扑排序算法(tsort,topological sort)。它适用于解决上述我们用YAML列出的依赖关系图的情况,以下是在图中显示的相关结果(其中箭头代表`需要先修的课程`): ![](http://www.happybearsoftware.com/assets/posts/how-learning-data-structures-and-algorithms-makes-you-a-better-developer/course-graph-2f60f42bb0dc95319954ce34c02705a2.svg) @@ -79,16 +79,17 @@ 这符合我们上面描述的需求,用户只需选出`radioactivity`,就能得到在此之前所有必修课程的有序列表。 -在运用该排序算法之前,我们甚至不需要深入了解算法的实现细节。一般来说,选择不同的编程语言在其标准库中都会有相应的算法实现。即使最坏的情况,Unix也会默认安装`tsort`程序,运行`tsort`程序,您就可以实现该算法。 +在运用该排序算法之前,我们甚至不需要深入了解算法的实现细节。一般来说,你可能选择的各种编程语言在其标准库中都会有相应的算法实现。即使最坏的情况,Unix也会默认安装`tsort`程序,运行`man tsort` 来了解该程序。 ###其它拓扑排序适用场合### - - **工具** 使用诸如`make`的工具您可以声明任务之间的依赖关系,这里拓扑排序算法将从底层实现具有依赖关系的任务顺序执行的功能。 - - **有`require`指令的编程语言**,适用于要运行当前文件需先运行另一个文件的情况。这里拓扑排序用于识别文件运行顺序以保证每个文件只加载一次,且满足所有文件间的依赖关系要求。 - - **包含甘特图的项目管理工具**.甘特图能直观列出给定任务的所有依赖关系,在这些依赖关系之上能提供给用户任务完成的预估时间。我不常用到甘特图,但这些绘制甘特图的工具很可能会用到拓扑排序算法。 + - **类似`make`的工具** 可以让您声明任务之间的依赖关系,这里拓扑排序算法将从底层实现具有依赖关系的任务顺序执行的功能。 + - **具有`require`指令的编程语言**适用于要运行当前文件需先运行另一个文件的情况。这里拓扑排序用于识别文件运行顺序以保证每个文件只加载一次,且满足所有文件间的依赖关系要求。 + - **带有甘特图的项目管理工具**。甘特图能直观列出给定任务的所有依赖关系,在这些依赖关系之上能提供给用户任务完成的预估时间。我不常用到甘特图,但这些绘制甘特图的工具很可能会用到拓扑排序算法。 ###霍夫曼编码实现数据压缩### -[霍夫曼编码](http://en.wikipedia.org/wiki/Huffman_coding)是一种用于无损数据压缩的编码算法。它的工作原理是先分析要压缩的数据,再为每个字符创建一个二进制编码。字符出现的越频繁,编码赋值越小。因此在一个数据集中`e`可能会编码为`111`,而`x`会编码为`10010`。创建了这种编码模式,就可以串联无定界符,也能正确地进行解码。 + +[霍夫曼编码][5](Huffman coding)是一种用于无损数据压缩的编码算法。它的工作原理是先分析要压缩的数据,再为每个字符创建一个二进制编码。字符出现的越频繁,编码赋值越小。因此在一个数据集中`e`可能会编码为`111`,而`x`会编码为`10010`。创建了这种编码模式,就可以串联无定界符,也能正确地进行解码。 在gzip中使用的DEFLATE算法就结合了霍夫曼编码与LZ77一同用于实现数据压缩功能。gzip应用领域很广,特别适用于文件压缩(以`.gz`为扩展名的文件)以及用于数据传输中的http请求与应答。 @@ -96,10 +97,11 @@ - 您会理解为什么较大的压缩文件会获得较好的整体压缩效果(如压缩的越多,压缩率也越高)。这也是SPDY协议得以推崇的原因之一:在复杂的HTTP请求/响应过程数据有更好的压缩效果。 - 您会了解数据传输过程中如果想要压缩JavaScript/CSS文件,运行压缩软件是完全没有意义的。PNG文件也是类似,因为它们已经使用DEFLATE算法完成了压缩。 - - 如果您试图强行破译加密的信息,您可能会发现由于重复数据压缩质量更好,给定的密文单位bit的数据压缩将帮助您确定相关的[分组密码工作模式](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation). + - 如果您试图强行破译加密的信息,您可能会发现由于重复数据压缩质量更好,密文给定位的数据压缩率将帮助您确定相关的[分组密码工作模式][6](block cipher mode of operation.)。 ###下一步选择学习什么是困难的### -作为一名程序员应当做好持续学习的准备。为成为一名web开发人员,您需要了解标记语言以及Ruby/Python,正则表达式,SQL,JavaScript等高级编程语言,还需要了解HTTP的工作原理,如何运行UNIX终端以及面向对象的编程艺术。您很难有效地预览到未来的职业全景,因此选择下一步要学习哪些知识是困难的。 + +作为一名程序员应当做好持续学习的准备。为了成为一名web开发人员,您需要了解标记语言以及Ruby/Python、正则表达式、SQL、JavaScript等高级编程语言,还需要了解HTTP的工作原理,如何运行UNIX终端以及面向对象的编程艺术。您很难有效地预览到未来的职业全景,因此选择下一步要学习哪些知识是困难的。 我没有快速学习的能力,因此我不得不在时间花费上非常谨慎。我希望尽可能地学习到有持久生命力的技能,即不会在几年内就过时的技术。这意味着我也会犹豫这周是要学习JavaScript框架还是那些新的编程语言。 @@ -118,6 +120,7 @@ via: http://www.happybearsoftware.com/how-learning-data-structures-and-algorithm [a]:http://www.happybearsoftware.com/ [1]:http://en.wikipedia.org/wiki/Huffman_coding [2]:http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation - - - +[3]:http://en.wikipedia.org/wiki/Dijkstra's_algorithm +[4]:http://en.wikipedia.org/wiki/A*_search_algorithm +[5]:http://en.wikipedia.org/wiki/Huffman_coding +[6]:http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation From 34e62f51168581295a032a4ff2538b2bce22e34e Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 4 Nov 2015 21:45:45 +0800 Subject: [PATCH 2387/2517] PUB:20151027 How To Show Desktop In GNOME 3 @geekpi --- .../20151027 How To Show Desktop In GNOME 3.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20151027 How To Show Desktop In GNOME 3.md (86%) diff --git a/translated/tech/20151027 How To Show Desktop In GNOME 3.md b/published/20151027 How To Show Desktop In GNOME 3.md similarity index 86% rename from translated/tech/20151027 How To Show Desktop In GNOME 3.md rename to published/20151027 How To Show Desktop In GNOME 3.md index 2eb373defa..08933c0cb7 100644 --- a/translated/tech/20151027 How To Show Desktop In GNOME 3.md +++ b/published/20151027 How To Show Desktop In GNOME 3.md @@ -12,7 +12,7 @@ ### 在GNOME 3 中添加显示桌面的快捷键 ### -我在本教程的使用的是GNOME 3.18的[Antergos Linux][2]但是这些步骤对于任何GNOME 3版本的Linux发行版都适用。同时也使用了[Numix主题][3]作为默认主题。因此你也许不会看到平常的GNOME图标。但是我相信步骤是一目了然的,很容易就能理解。 +我在本教程的使用的是带有GNOME 3.18的[Antergos Linux][2],但是这些步骤对于任何GNOME 3版本的Linux发行版都适用。同时,Antergos也使用了[Numix主题][3]作为默认主题。因此你也许不会看到平常的GNOME图标。但是我相信步骤是一目了然的,很容易就能理解。 #### 第一步 #### @@ -34,7 +34,7 @@ #### 第四步 #### -在“Hide all normla windows”上面点击一下。你会看到它变成了**New accelerator**。现在无论你按下哪个键,他都会被指定为显示桌面。 +在“Hide all normla windows”上面点击一下。你会看到它变成了**New accelerator**。现在无论你按下哪个键,它都会被指定为显示桌面的快捷键。 如果你不小心按下了错误的组合键,只要按下退格它就会被禁用。再次点击并使用需要的组合键。 @@ -42,7 +42,7 @@ #### 第五步 #### -一旦设置了组合键,只要关闭系统设置。没有保存设置因为更改是立即生效的。在本例中,我使用Ctrl+Super+D来与我在Ubuntu Unity中的使用习惯保持一致。 +一旦设置了组合键,只要关闭系统设置。不用保存设置因为更改是立即生效的。在本例中,我使用Ctrl+Super+D来与我在Ubuntu Unity中的使用习惯保持一致。 ![Keyboard shortcut edit in GNOME](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Show-Desktop-GNOME-5.jpeg) @@ -61,4 +61,4 @@ via: http://itsfoss.com/show-desktop-gnome-3/ [a]:http://itsfoss.com/author/abhishek/ [1]:https://www.gnome.org/gnome-3/ [2]:http://itsfoss.com/tag/antergos/ -[3]:http://itsfoss.com/install-numix-ubuntu/ +[3]:https://linux.cn/article-3281-1.html From 9511d3032d96dd2d03daa27f47a6f17f65e9824d Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 4 Nov 2015 22:34:56 +0800 Subject: [PATCH 2388/2517] PUB:20151012 How To Use iPhone In Antergos Linux @geekpi --- ...012 How To Use iPhone In Antergos Linux.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20151012 How To Use iPhone In Antergos Linux.md (80%) diff --git a/translated/tech/20151012 How To Use iPhone In Antergos Linux.md b/published/20151012 How To Use iPhone In Antergos Linux.md similarity index 80% rename from translated/tech/20151012 How To Use iPhone In Antergos Linux.md rename to published/20151012 How To Use iPhone In Antergos Linux.md index 2e33e5a536..e9bbca215a 100644 --- a/translated/tech/20151012 How To Use iPhone In Antergos Linux.md +++ b/published/20151012 How To Use iPhone In Antergos Linux.md @@ -1,22 +1,22 @@ -如何在Antergos Linux中使用iPhone +如何在 Antergos Linux 中使用 iPhone ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/iPhone-Antergos-Arch-Linux.jpg) -在Arch Linux中使用iPhone遇到麻烦了么?iPhone和Linux从来都没有集成的很好。本教程中,我会向你展示如何在Antergos Linux中使用iPhone,对于同样基于Arch的的Linux发行版如Manjaro也应该同样管用。 +在Arch Linux中使用iPhone遇到麻烦了么?iPhone和Linux从来都没有很好地集成。本教程中,我会向你展示如何在Antergos Linux中使用iPhone,对于同样基于Arch的的Linux发行版如Manjaro也应该同样管用。 -我最近购买了一台全新的iPhone 6S,当我连接到Antergos Linux中要拷贝一些照片时,它完全没有检测到它。我看见iPhone正在被充电并且我已经允许了iPhone“信任这台电脑”,但是还是完全没有检测到。我尝试运行dmseg但是没有关于iPhone或者Apple的信息。有趣的是我已经安装了[libimobiledevice][1]。这个可以可以解决[iPhone在Ubuntu中的挂载问题][2]。 +我最近购买了一台全新的iPhone 6S,当我连接到Antergos Linux中要拷贝一些照片时,它完全没有检测到它。我看见iPhone正在被充电并且我已经允许了iPhone“信任这台电脑”,但是还是完全没有检测到。我尝试运行`dmseg`但是没有关于iPhone或者Apple的信息。有趣的是我当我安装好了[libimobiledevice][1],这个就可以解决[iPhone在Ubuntu中的挂载问题][2]。 -我会向你展示如何在Antergos中使用运行iOS 9的iPhone 6S。这会有更多的命令行,但是我假设你用的是ArchLinux,并不惧怕使用终端(也不应该惧怕)、 +我会向你展示如何在Antergos中使用运行iOS 9的iPhone 6S。这会有更多的命令行,但是我假设你用的是ArchLinux,并不惧怕使用终端(也不应该惧怕)。 ### 在Arch Linux中挂载iPhone ### -**第一步**:如果已经插入拔下你的iPhone +**第一步**:如果已经插入,请拔下你的iPhone。 -**第二步**:现在,打开终端输入下面的命令来安装必要的包。不要担心如果它们已经安装过了。 +**第二步**:现在,打开终端输入下面的命令来安装必要的包。如果它们已经安装过了也没有关系。 sudo pacman -Sy ifuse usbmuxd libplist libimobiledevice -**第三步**: 这些库和程序安装完成后,重启系统 +**第三步**: 这些库和程序安装完成后,重启系统。 sudo reboot @@ -24,11 +24,11 @@ mkdir ~/iPhone -**第五步**:解锁你的手机并插入,如果询问是否允许,请允许。 +**第五步**:解锁你的手机并插入,如果询问是否信任该计算机,请允许信任。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/iPhone-mount-Antergos-Linux-2.jpeg) -**第六步**: 验证这时iPhone已经被机器识别了。 +**第六步**: 看看这时iPhone是否已经被机器识别了。 dmesg | grep -i iphone @@ -46,7 +46,7 @@ ifuse ~/iPhone -由于我们在家目录中创建了挂载目录,你不需要root权限就可以在家目录中看见。如果命令成功了,你就不会看见输出。 +由于我们在家目录中创建了挂载目录,你不需要root权限就可以在家目录中看见。如果命令成功了,你就不会看见任何输出。 回到Files看下iPhone是否已经识别。对于我而言,在Antergos中看上去这样: @@ -62,7 +62,7 @@ ### 对你有用么? ### -我知道这并不是非常方便和理想,iPhone应该像其他USB其他usb设备那样但是事情并不总是像人们想的那样。好事是一点小的DIY就能解决这个问题带来了一点成就感(至少对我而言)。我必须要说的是Antergos应该修复这个问题让iPhone可以默认挂载。 +我知道这并不是非常方便和理想,iPhone应该像其他USB设备那样工作,但是事情并不总是像人们想的那样。好的是一点小的DIY就能解决这个问题带来了一点成就感(至少对我而言)。我必须要说的是Antergos应该修复这个问题让iPhone可以默认挂载。 这个技巧对你有用么?如果你有任何问题或者建议,欢迎留下评论。 @@ -72,7 +72,7 @@ via: http://itsfoss.com/iphone-antergos-linux/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 093c2edef39119ba626e7a8a1a1348d335ff327d Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 4 Nov 2015 23:13:41 +0800 Subject: [PATCH 2389/2517] PUB:Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks @ictlyh --- ...Automate Linux System Maintenance Tasks.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) rename {translated/tech => published}/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md (81%) diff --git a/translated/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md b/published/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md similarity index 81% rename from translated/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md rename to published/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md index 37a3dbe11c..fdf0d29c96 100644 --- a/translated/tech/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md +++ b/published/RHCE/Part 4 - Using Shell Scripting to Automate Linux System Maintenance Tasks.md @@ -1,20 +1,20 @@ -第四部分 - 使用 Shell 脚本自动化 Linux 系统维护任务 +RHCE 系列(四): 使用 Shell 脚本自动化 Linux 系统维护任务 ================================================================================ -之前我听说高效系统管理员/工程师的其中一个特点是懒惰。一开始看起来很矛盾,但作者接下来解释了其中的原因: +之前我听说高效的系统管理员的一个特点是懒惰。一开始看起来很矛盾,但作者接下来解释了其中的原因: ![自动化 Linux 系统维护任务](http://www.tecmint.com/wp-content/uploads/2015/08/Automate-Linux-System-Maintenance-Tasks.png) -RHCE 系列:第四部分 - 自动化 Linux 系统维护任务 +*RHCE 系列:第四部分 - 自动化 Linux 系统维护任务* -如果一个系统管理员花费大量的时间解决问题以及做重复的工作,你就应该怀疑他这么做是否正确。换句话说,一个高效的系统管理员/工程师应该制定一个计划使得尽量花费少的时间去做重复的工作,以及通过使用该系列中第三部分 [使用 Linux 工具集监视系统活动报告][1] 介绍的工具预见问题。因此,尽管看起来他/她没有做很多的工作,但那是因为 shell 脚本帮助完成了他的/她的大部分任务,这也就是本章我们将要探讨的东西。 +如果一个系统管理员花费大量的时间解决问题以及做重复的工作,你就应该怀疑他这么做是否正确。换句话说,一个高效的系统管理员/工程师应该制定一个计划使得其尽量花费少的时间去做重复的工作,以及通过使用本系列中第三部分 [使用 Linux 工具集监视系统活动报告][1] 介绍的工具来预见问题。因此,尽管看起来他/她没有做很多的工作,但那是因为 shell 脚本帮助完成了他的/她的大部分任务,这也就是本章我们将要探讨的东西。 ### 什么是 shell 脚本? ### -简单的说,shell 脚本就是一个由 shell 一步一步执行的程序,而 shell 是在 Linux 内核和端用户之间提供接口的另一个程序。 +简单的说,shell 脚本就是一个由 shell 一步一步执行的程序,而 shell 是在 Linux 内核和最终用户之间提供接口的另一个程序。 -默认情况下,RHEL 7 中用户使用的 shell 是 bash(/bin/bash)。如果你想知道详细的信息和历史背景,你可以查看 [维基页面][2]。 +默认情况下,RHEL 7 中用户使用的 shell 是 bash(/bin/bash)。如果你想知道详细的信息和历史背景,你可以查看这个[维基页面][2]。 -关于这个 shell 提供的众多功能的介绍,可以查看 **man 手册**,也可以从 ([Bash 命令][3])下载 PDF 格式。除此之外,假设你已经熟悉 Linux 命令(否则我强烈建议你首先看一下 **Tecmint.com** 中的文章 [从新手到系统管理员指南][4] )。现在让我们开始吧。 +关于这个 shell 提供的众多功能的介绍,可以查看 **man 手册**,也可以从 ([Bash 命令][3])处下载 PDF 格式。除此之外,假设你已经熟悉 Linux 命令(否则我强烈建议你首先看一下 **Tecmint.com** 中的文章 [从新手到系统管理员指南][4] )。现在让我们开始吧。 ### 写一个脚本显示系统信息 ### @@ -27,7 +27,7 @@ RHCE 系列:第四部分 - 自动化 Linux 系统维护任务 #!/bin/bash - # RHCE 系列第四部分事例脚本 + # RHCE 系列第四部分示例脚本 # 该脚本会返回以下这些系统信息: # -主机名称: echo -e "\e[31;43m***** HOSTNAME INFORMATION *****\e[0m" @@ -67,9 +67,9 @@ RHCE 系列:第四部分 - 自动化 Linux 系统维护任务 ![服务器监视 Shell 脚本](http://www.tecmint.com/wp-content/uploads/2015/08/Server-Monitoring-Shell-Script.png) -服务器监视 Shell 脚本 +*服务器监视 Shell 脚本* -该功能用以下命令提供: +颜色功能是由以下命令提供的: echo -e "\e[COLOR1;COLOR2m\e[0m" @@ -79,13 +79,13 @@ RHCE 系列:第四部分 - 自动化 Linux 系统维护任务 你想使其自动化的任务可能因情况而不同。因此,我们不可能在一篇文章中覆盖所有可能的场景,但是我们会介绍使用 shell 脚本可以使其自动化的三种典型任务: -**1)** 更新本地文件数据库, 2) 查找(或者删除)有 777 权限的文件, 以及 3) 文件系统使用超过定义的阀值时发出警告。 +1) 更新本地文件数据库, 2) 查找(或者删除)有 777 权限的文件, 以及 3) 文件系统使用超过定义的阀值时发出警告。 让我们在脚本目录中新建一个名为 `auto_tasks.sh` 的文件并添加以下内容: #!/bin/bash - # 自动化任务事例脚本: + # 自动化任务示例脚本: # -更新本地文件数据库: echo -e "\e[4;32mUPDATING LOCAL FILE DATABASE\e[0m" updatedb @@ -123,16 +123,16 @@ RHCE 系列:第四部分 - 自动化 Linux 系统维护任务 ![查找 777 权限文件的 Shell 脚本](http://www.tecmint.com/wp-content/uploads/2015/08/Shell-Script-to-Find-777-Permissions.png) -查找 777 权限文件的 Shell 脚本 +*查找 777 权限文件的 Shell 脚本* ### 使用 Cron ### -想更进一步提高效率,你不会想只是坐在你的电脑前手动执行这些脚本。相反,你会使用 cron 来调度这些任务周期性地执行,并把结果通过邮件发动给预定义的接收者或者将它们保存到使用 web 浏览器可以查看的文件中。 +想更进一步提高效率,你不会想只是坐在你的电脑前手动执行这些脚本。相反,你会使用 cron 来调度这些任务周期性地执行,并把结果通过邮件发动给预先指定的接收者,或者将它们保存到使用 web 浏览器可以查看的文件中。 下面的脚本(filesystem_usage.sh)会运行有名的 **df -h** 命令,格式化输出到 HTML 表格并保存到 **report.html** 文件中: #!/bin/bash - # Sample script to demonstrate the creation of an HTML report using shell scripting + # 演示使用 shell 脚本创建 HTML 报告的示例脚本 # Web directory WEB_DIR=/var/www/html # A little CSS and table layout to make the report look a little nicer @@ -177,7 +177,7 @@ RHCE 系列:第四部分 - 自动化 Linux 系统维护任务 ![服务器监视报告](http://www.tecmint.com/wp-content/uploads/2015/08/Server-Monitoring-Report.png) -服务器监视报告 +*服务器监视报告* 你可以添加任何你想要的信息到那个报告中。添加下面的 crontab 条目在每天下午的 1:30 运行该脚本: @@ -193,12 +193,12 @@ via: http://www.tecmint.com/using-shell-script-to-automate-linux-system-maintena 作者:[Gabriel Cánepa][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/gacanepa/ -[1]:http://www.tecmint.com/linux-performance-monitoring-and-file-system-statistics-reports/ +[1]:https://linux.cn/article-6512-1.html [2]:https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29 [3]:http://www.tecmint.com/wp-content/pdf/bash.pdf [4]:http://www.tecmint.com/60-commands-of-linux-a-guide-from-newbies-to-system-administrator/ From a55c780d32e51e6c1af47766111c942537f37449 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 4 Nov 2015 23:26:11 +0800 Subject: [PATCH 2390/2517] =?UTF-8?q?=E8=B6=85=E6=9C=9F=E5=9B=9E=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @cygmris @H-mudcup @KevinSJ @ZTinoZ @liuaiping @wyangsun @KnightJoker --- ...Open Source Collaborative Editing Tools.md | 1 - ... open source board games to play online.md | 1 - ... Torvalds muses about open-source software.md | 46 ----- .../20150820 Why did you start using Linux.md | 1 - ...ng before CoreOS and the Atomic Project.md | 92 --------- ...e Free Software Foundation--30 years in.md | 149 -------------- ...icrosoft Office in Favor of LibreOffice.md | 30 --- ...rd Is Coming To Ubuntu and Ubuntu Touch.md | 49 ----- ...tu 15.10 Codenamed Wily Werewolf Review.md | 68 ------ ...Installing Ubuntu 15.10 'Wily Werewolf'.md | 194 ------------------ ...w Ubuntu 15.10 Features You Should Know.md | 109 ---------- ...lation Guide for Puppet on Ubuntu 15.04.md | 1 - ...orkManager to systemd-networkd on Linux.md | 2 - ...31 Linux workstation security checklist.md | 1 - ...-Master Your Math with These Linux Apps.md | 126 ------------ 15 files changed, 870 deletions(-) delete mode 100644 sources/talk/20150820 LinuxCon's surprise keynote speaker ​Linus Torvalds muses about open-source software.md delete mode 100644 sources/talk/20150824 LinuxCon exclusive--Mark Shuttleworth says Snappy was born long before CoreOS and the Atomic Project.md delete mode 100644 sources/talk/20150910 The Free Software Foundation--30 years in.md delete mode 100644 sources/talk/20150916 Italy's Ministry of Defense to Drop Microsoft Office in Favor of LibreOffice.md delete mode 100644 sources/talk/20150929 A Slick New Set-Up Wizard Is Coming To Ubuntu and Ubuntu Touch.md delete mode 100644 sources/talk/20151023 Ubuntu 15.10 Codenamed Wily Werewolf Review.md delete mode 100644 sources/talk/20151028 10 Things To Do After Installing Ubuntu 15.10 'Wily Werewolf'.md delete mode 100644 sources/talk/20151028 Here are the 9 New Ubuntu 15.10 Features You Should Know.md delete mode 100644 sources/tech/Learn with Linux/Learn with Linux--Master Your Math with These Linux Apps.md diff --git a/sources/share/20150824 Great Open Source Collaborative Editing Tools.md b/sources/share/20150824 Great Open Source Collaborative Editing Tools.md index 4696862569..c4746bc482 100644 --- a/sources/share/20150824 Great Open Source Collaborative Editing Tools.md +++ b/sources/share/20150824 Great Open Source Collaborative Editing Tools.md @@ -1,4 +1,3 @@ -cygmris is translating... Great Open Source Collaborative Editing Tools ================================================================================ In a nutshell, collaborative writing is writing done by more than one person. There are benefits and risks of collaborative working. Some of the benefits include a more integrated / co-ordinated approach, better use of existing resources, and a stronger, united voice. For me, the greatest advantage is one of the most transparent. That's when I need to take colleagues' views. Sending files back and forth between colleagues is inefficient, causes unnecessary delays and leaves people (i.e. me) unhappy with the whole notion of collaboration. With good collaborative software, I can share notes, data and files, and use comments to share thoughts in real-time or asynchronously. Working together on documents, images, video, presentations, and tasks is made less of a chore. diff --git a/sources/share/20150901 5 best open source board games to play online.md b/sources/share/20150901 5 best open source board games to play online.md index 5df980d1db..c14fecc697 100644 --- a/sources/share/20150901 5 best open source board games to play online.md +++ b/sources/share/20150901 5 best open source board games to play online.md @@ -1,4 +1,3 @@ -Translating by H-mudcup 5 best open source board games to play online ================================================================================ I have always had a fascination with board games, in part because they are a device of social interaction, they challenge the mind and, most importantly, they are great fun to play. In my misspent youth, myself and a group of friends gathered together to escape the horrors of the classroom, and indulge in a little escapism. The time provided an outlet for tension and rivalry. Board games help teach diplomacy, how to make and break alliances, bring families and friends together, and learn valuable lessons. diff --git a/sources/talk/20150820 LinuxCon's surprise keynote speaker ​Linus Torvalds muses about open-source software.md b/sources/talk/20150820 LinuxCon's surprise keynote speaker ​Linus Torvalds muses about open-source software.md deleted file mode 100644 index c045233630..0000000000 --- a/sources/talk/20150820 LinuxCon's surprise keynote speaker ​Linus Torvalds muses about open-source software.md +++ /dev/null @@ -1,46 +0,0 @@ -LinuxCon's surprise keynote speaker ​Linus Torvalds muses about open-source software -================================================================================ -> In a broad-ranging question and answer session, Linus Torvalds, Linux's founder, shared his thoughts on the current state of open source and Linux. - -**SEATTLE** -- [LinuxCon][1] attendees got an early Christmas present when the Wednesday morning "surprise" keynote speaker turned out to be Linux's founder, Linus Torvalds. - -![zemlin-and-torvalds-08192015-1.jpg](http://zdnet2.cbsistatic.com/hub/i/2015/08/19/9951f05a-fedf-4bf4-a4a1-3b4a15458de6/c19c89ded58025eccd090787ba40e803/zemlin-and-torvalds-08192015-1.jpg) - -Jim Zemlin and Linus Torvalds shooting the breeze at LinuxCon in Seattle. -- sjvn - -Jim Zemlin, the Linux Foundation's executive director, opened the question and answer session by quoting from a recent article about Linus, "[Torvalds may be the most influential individual economic force][2] of the past 20 years. ... Torvalds has, in effect, been as instrumental in retooling the production lines of the modern economy as Henry Ford was 100 years earlier." - -Torvalds replied, "I don't think I'm all that powerful, but I'm glad to get all the credit for open source." For someone who's arguably been more influential on technology than Bill Gates, Steve Jobs, or Larry Ellison, Torvalds remains amusingly modest. That's probably one reason [Torvalds, who doesn't suffer fools gladly][3], remains the unchallenged leader of Linux. - -It also helps that he doesn't take himself seriously, except when it comes to code quality. Zemlin reminded him that he was also described in the same article as being "5-feet, ho-hum tall with a paunch, ... his body type and gait resemble that of Tux, the penguin mascot of Linux." Torvald's reply was to grin and say "What is this? A roast?" He added that 5'8" was a perfectly good height. - -More seriously, Zemlin asked Torvalds what he thought about the current excitement over containers. Indeed, at times LinuxCon has felt like DockerCon. Torvalds replied, "I'm glad that the kernel is far removed from containers and other buzzwords. We only care about just the kernel. I'm so focused on the kernel I really don't care. I don't get involved in the politics above the kernel and I'm really happy that I don't know." - -Moving on, Zemlin asked Torvalds what he thought about the demand from the Internet of Things (IoT) for an even smaller Linux kernel. "Everyone has always wished for a smaller kernel," Torvalds said. "But, with all the modules it's still tens of MegaBytes in size. It's shocking that it used to fit into a MB. We'd like it to be mean lean, mean IT machine again." - -But, "Torvalds continued, "It's hard to get rid of unnecessary fat. Things tend to grow. Realistically I don't think we can get down to the sizes we were 20 years ago." - -As for security, the next topic, Torvalds said, "I'm at odds with the security community. They tend to see technology as black and white. If it's not security they don't care at all about it." The truth is "security is bugs. Most of the security issues we've had in the kernel hasn't been that big. Most of them have been really stupid and then some clever person takes advantage of it." - -The bottom line is, "We'll never get rid of bugs so security will never be perfect. We do try to be really careful about code. With user space we have to be very strict." But, "Bugs happen and all you can do is mitigate them. Open source is doing fairly well, but anyone who thinks we'll ever be completely secure is foolish." - -Zemlin concluded by asking Torvalds where he saw Linux ten years from now. Torvalds replied that he doesn't look at it this way. "I'm plodding, pedestrian, I look ahead six months, I don't plan 10 years ahead. I think that's insane." - -Sure, "companies plan ten years, and their plans use open source. Their whole process is very forward thinking. But I'm not worried about 10 years ahead. I look to the next release and the release beyond that." - -For Torvalds, who works at home where "the FedEx guy is no longer surprised to find me in my bathrobe at 2 in the afternoon," looking ahead a few months works just fine. And so do all the businesses -- both technology-based Amazon, Google, Facebook and more mainstream, WalMart, the New York Stock Exchange, and McDonalds -- that live on Linux every day. - --------------------------------------------------------------------------------- - -via: http://www.zdnet.com/article/linus-torvalds-muses-about-open-source-software/ - -作者:[Steven J. Vaughan-Nichols][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.zdnet.com/meet-the-team/us/steven-j-vaughan-nichols/ -[1]:http://events.linuxfoundation.org/events/linuxcon-north-america -[2]:http://www.bloomberg.com/news/articles/2015-06-16/the-creator-of-linux-on-the-future-without-him -[3]:http://www.zdnet.com/article/linus-torvalds-finds-gnome-3-4-to-be-a-total-user-experience-design-failure/ \ No newline at end of file diff --git a/sources/talk/20150820 Why did you start using Linux.md b/sources/talk/20150820 Why did you start using Linux.md index 3ddf90c560..5fb6a8d4fe 100644 --- a/sources/talk/20150820 Why did you start using Linux.md +++ b/sources/talk/20150820 Why did you start using Linux.md @@ -1,4 +1,3 @@ -KevinSJ translating Why did you start using Linux? ================================================================================ > In today's open source roundup: What got you started with Linux? Plus: IBM's Linux only Mainframe. And why you should skip Windows 10 and go with Linux diff --git a/sources/talk/20150824 LinuxCon exclusive--Mark Shuttleworth says Snappy was born long before CoreOS and the Atomic Project.md b/sources/talk/20150824 LinuxCon exclusive--Mark Shuttleworth says Snappy was born long before CoreOS and the Atomic Project.md deleted file mode 100644 index 2c45b6064b..0000000000 --- a/sources/talk/20150824 LinuxCon exclusive--Mark Shuttleworth says Snappy was born long before CoreOS and the Atomic Project.md +++ /dev/null @@ -1,92 +0,0 @@ -LinuxCon exclusive: Mark Shuttleworth says Snappy was born long before CoreOS and the Atomic Project -================================================================================ -![](http://images.techhive.com/images/article/2015/08/mark-100608730-primary.idge.jpg) - -Mark Shuttleworth at LinuxCon Credit: Swapnil Bhartiya - -> Mark Shuttleworth, founder of Canonical and Ubuntu, made a surprise visit at LinuxCon. I sat down with him for a video interview and talked about Ubuntu on IBM’s new LinuxONE systems, Canonical’s plans for containers, open source in the enterprise space and much more. - -### You made a surprise entry during the keynote. What brought you to LinuxCon? ### - -**Mark Shuttleworth**: I am here at LinuxCon to support IBM and Canonical in their announcement of Ubuntu on their new Linux-only super-high-end mainframe LinuxONE. These are the biggest machines in the world, purpose-built to run only Linux. And we will be bringing Ubuntu to them, which is a real privilege for us and is going to be incredible for developers. - -![mark selfie](http://images.techhive.com/images/article/2015/08/mark-selfie-100608731-large.idge.jpg) - -Swapnil Bhartiya - -Mark Shuttleworth and Swapnil Bhartiya, mandatory selfie at LinuxCon - -### Only Red Hat and SUSE were supported on it. Why was Ubuntu missing from the mainframe scene? ### - -**Mark**: Ubuntu has always been about developers. It has been about enabling the free software platform from where it is collaboratively built to be available at no cost to developers in the world, so they are limited only by their imagination—not by money, not by geography. - -There was an incredible story told today about a 12-year-old kid who started out with Ubuntu; there are incredible stories about people building giant businesses with Ubuntu. And for me, being able to empower people, whether they come from one part of the world or another to express their ideas on free software, is what Ubuntu is all about. It's been a journey for us essentially, going to the platforms those developers care about, and just in the last year, we suddenly saw a flood of requests from companies who run mainframes, who are using Ubuntu for their infrastructure—70% of OpenStack deployments are on Ubuntu. Those same people said, “Look, there is the mainframe, and we like to unleash it and think of it as a region in the cloud.” So when IBM started talking to us, saying that they have this project in the works, it felt like a very natural fit: You are going to be able to take your Ubuntu laptop, build code there and ship it straight to every cloud, every virtualization environment, every bare metal in every architecture including the mainframe, and that's going to be beautiful. - -### Will Canonical be offering support for these systems? ### - -**Mark**: Yes. Ubuntu on z Systems is going to be completely supported. We will make long-term commitments to that. The idea is to bring together scale-out-fast cloud-like workloads, which is really born on Ubuntu; 70% of workloads on Amazon and other public clouds run on Ubuntu. Now you can think of running that on a mainframe if that makes sense to you. - -We are going to provide exactly the same platform that we do on the cloud, and we are going to provide that on the mainframe as well. We are also going to expose it to the OpenStack API so you can consume it on a mainframe with exactly the same tools and exactly the same processes that you would consume on a laptop, or OpenStack or public cloud resources. So all of the things that Ubuntu builds to make your life easy as a developer are going to be available across that full range of platforms and systems, and all of that is commercially supported. - -### Canonical is doing a lot of things: It is into enterprise, and it’s in the consumer space with mobile and desktop. So what is the core focus of Canonical now? ### - -**Mark**: The trick for us is to enable the reuse of specifically the same parts [of our technology] in as many useful ways as possible. So if you look at the work that we do at z Systems, it's absolutely defined by the work that we do on the cloud. We want to deliver exactly the same libraries on exactly the same date for the mainframe as we do for public clouds and for x86, ARM and Power servers today. - -We don't allow Ubuntu or our focus to fragment very dramatically because we don't allow different products managers to find Ubuntu in different ways in different environments. We just want to bring that standard experience that developers love to this new environment. - -Similarly if you look at the work we are doing on IoT [Internet of Things], Snappy Ubuntu is the heart of the phone. It’s the phone without the GUI. So the definitions, the tools, the kernels, the mechanisms are shared across those projects. So we are able to multiply the impact of the work. We have an incredible community, and we try to enable the community to do things that they want to do that we can’t do. So that's why we have so many buntus, and it's kind of incredible for me to see what they do with that. - -We also see the community climbing in. We see hundreds of developers working with Snappy for IoT, and we see developers working with Snappy on mobile, for personal computing as convergence becomes real. And, of course, there is the cloud server story: 70% of the world is Ubuntu, so there is a huge audience. We don't have to do all the work that we do; we just have to be open and willing to, kind of, do the core infrastructure and then reuse it as efficiently as possible. - -### Is Snappy a response to Atomic or CoreOS? ### - -**Mark**: Snappy as a project was born four years ago when we started working on the phone, which was long before the CoreOS, long before Atomic. I think the principles of atomicity, transactionality are beautiful, but remember: We needed to build the same things for the phone. And with Snappy, we have the ability to deliver transactional updates to any of these systems—phones, servers and cloud devices. - -Of course, it feels a little different because in order to provide those guarantees, we have to shape the system in such a way that we can guarantee the guarantees. And that's why Snappy is snappy; it's a new thing. It's not based on an old packaging system. Though we will keep both of them: All Snaps for us that Canonical makes, the core snaps that define the OS, are all built from Debian packages. They are two different faces of the same coin for us, and developers will use them as tools. We use the right tools for the job. - -There are couple of key advantages for Snappy over CoreOS and Atomic, and the main one is this: We took the view that we wanted the base idea to be extensible. So with Snappy, the core operating system is tiny. You make all the choices, and you take all the decisions about things you want to bolt on that: you want to bolt on Docker; you want to bolt on Kubernete; you want to bolt on Mesos; you want to bolt on Lattice from Pivotal; you want to bolt on OpenStack. Those are the things you choose to add with Snappy. Whereas with Atomic and CoreOS, it's one blob and you have to do it exactly the way they want you to do it. You have to live with the versions of software and the choices they make. - -Whereas with Snappy, we really preserve this idea of the choices you have got in Ubuntu are now transactionally available on Snappy systems. That makes the core much smaller, and it gives you the choice of different container systems, different container management systems, different cloud infrastructure systems or different apps of every description. I think that's the winning idea. In fullness of time, people will realize that they wanted to make those choices themselves; they just want Canonical to do the work of providing the updates in a really efficient manner. - -### There is so much competition in the container space with Docker, Rocket and many other players. Where will Canonical stand amid this competition? ### - -**Mark**: Canonical is focused on platform tools, and we see things like the Rocket and Docker as things super-useful for developers; we just make sure that those work best on Ubuntu. Docker, for years, ran only Ubuntu because we work very closely with them, and we are glad now that it's available everywhere else. But if you look at the numbers, the vast majority of Docker containers are on Ubuntu. Because we work really hard, as developers, you get the best experience with all of these tools on Ubuntu. We don't want to try and control everything, and it’s great for us to have those guys competing. - -I think in the end people will see that there is really two kinds of containers. 1) There are cases where a container is just like a VM machine. It feels like a whole machine, it runs all processes, all the logs and cron jobs are there. It's like a VM, just that it's much cheaper, much lighter, much faster, and that's LXD. 2) And then there would be process containers, which are like Docker or Rocket; they are there to run a specific application very fast. I think we lead the world in general machine container story, which is our hypervisor LXD, and I think Docker leads the story when it comes to applications containers, process containers. And those two work together really beautifully. - -### Microsoft and Canonical are working together on LXD? Can you tell us about this engagement? ### - -Mark: LXD is two things. First, it's an implementation on top of Canonical's work on the kernel so that you can start to create full machine containers on any host. But it's also a REST API. That’s the transitions from LXC to LXD. We got a daemon there so you can talk to the daemon over the network, if it's listening on the network, and says tell me about the containers on that machine, tell me about the file systems on that machine, the networks on that machine, start or stop the container. - -So LXD becomes a distributed hypervisor effectively. Very interestingly, last week Microsoft announced that they like REST API. It is very clean, very simple, very well engineered, and they are going to implement the same API for Windows machines. It's completely cross-platform, which means you will be able to talk to any machine—Linux or Windows. So it gives you very clean and simple APIs to talk about containers on any host on the network. - -Of course, we have led the work in [OpenStack to bind LXD to Nova][1], which is the control system to compute in OpenStack, so that's how we create a whole cloud with OpenStack API with the individual VMs being actually containers, so much denser, much faster, much lighter, much cheaper. - -### Open Source is becoming a norm in the enterprise segment. What do you think is driving the adoption of open source in the enterprise? ### - -**Mark**: The reason why open source has become so popular in the enterprise is because it enables them to go faster. We are all competing at some level, and if you can't make progress because you have to call up some vendor, you can't dig in and help yourself go faster, then you feel frustrated. And given the choice between frustration and at least the ability to dig into a problem, enterprises over time will always choose to give themselves the ability to dig in and help themselves. So that is why open source is phenomenal. - -I think it goes a bit deeper than that. I think people have started to realize as much as we compete, 99% of what we need to do is shared, and there is something meaningful about contributing to something that is shared. As I have seen Ubuntu go from something that developers love, to something that CIOs love that developers love Ubuntu. As that happens, it's not a one-way ticket. They often want to say how can we help contribute to make this whole thing go faster. - -We have always seen a curve of complexity, and open source has traditionally been higher up on the curve of complexity and therefore considered threatening or difficult or too uncertain for people who are not comfortable with the complexity. What's wonderful to me is that many open source projects have identified that as a blocker for their own future. So in Ubuntu we have made user experience, design and “making it easy” a first-class goal. We have done the same for OpenStack. With Ubuntu tools for OpenStack anybody can build an OpenStack cloud in an hour, and if you want, that cloud can run itself, scale itself, manage itself, can deal with failures. It becomes something you can just fire up and forget, which also makes it really cheap. It also makes it something that's not a distraction, and so by making open source easier and easier, we are broadening its appeal to consumers and into the enterprise and potentially into the government. - -### How open are governments to open source? Can you tell us about the utilization of open source by governments, especially in the U.S.? ### - -**Mark**: I don't track the usage in government, but part of government utilization in the modern era is the realization that how untrustworthy other governments might be. There is a desire for people to be able to say, “Look, I want to review or check and potentially self-build all the things that I depend on.” That's a really important mission. At the end of the day, some people see this as a game where maybe they can get something out of the other guy. I see it as a game where we can make a level playing field, where everybody gets to compete. I have a very strong interest in making sure that Ubuntu is trustworthy, which means the way we build it, the way we run it, the governance around it is such that people can have confidence in it as an independent thing. - -### You are quite vocal about freedom, privacy and other social issues on Google+. How do you see yourself, your company and Ubuntu playing a role in making the world a better place? ### - -**Mark**: The most important thing for us to do is to build confidence in trusted platforms, platforms that are freely available but also trustworthy. At any given time, there will always be people who can make arguments about why they should have access to something. But we know from history that at the end of the day, due process of law, justice, doesn't depend on the abuse of privacy, abuse of infrastructure, the abuse of data. So I am very strongly of the view that in the fullness of time, all of the different major actors will come to the view that their primary interest is in having something that is conceptually trustworthy. This isn't about what America can steal from Germany or what China can learn in Russia. This is about saying we’re all going to be able to trust our infrastructure; that's a generational journey. But I believe Ubuntu can be right at the center of people's thinking about that. - --------------------------------------------------------------------------------- - -via: http://www.itworld.com/article/2973116/linux/linuxcon-exclusive-mark-shuttleworth-says-snappy-was-born-long-before-coreos-and-the-atomic-project.html - -作者:[Swapnil Bhartiya][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.itworld.com/author/Swapnil-Bhartiya/ -[1]:https://wiki.openstack.org/wiki/HypervisorSupportMatrix \ No newline at end of file diff --git a/sources/talk/20150910 The Free Software Foundation--30 years in.md b/sources/talk/20150910 The Free Software Foundation--30 years in.md deleted file mode 100644 index f782b2e876..0000000000 --- a/sources/talk/20150910 The Free Software Foundation--30 years in.md +++ /dev/null @@ -1,149 +0,0 @@ -The Free Software Foundation: 30 years in -================================================================================ -![](http://opensource.com/sites/default/files/styles/image-full-size/public/images/life/osdc_general_openfield.png?itok=tcXpYeHi) - -Welcome back, folks, to a new Six Degrees column. As usual, please send your thoughts on this piece to the comment box and your suggestions for future columns to [my inbox][1]. - -Now, I have to be honest with you all, this column went a little differently than I expected. - -A few weeks ago when thinking what to write, I mused over the notion of a piece about the [Free Software Foundation][2] celebrating its 30 year anniversary and how relevant and important its work is in today's computing climate. - -To add some meat I figured I would interview [John Sullivan][3], executive director of the FSF. My plan was typical of many of my pieces: thread together an interesting narrative and quote pieces of the interview to give it color. - -Well, that all went out the window when John sent me a tremendously detailed, thoughtful, and descriptive interview. I decided therefore to present it in full as the main event, and to add some commentary throughout. Thus, this is quite a long column, but I think it paints a fascinating picture of a fascinating organization. I recommend you grab a cup of something delicious and settle in for a solid read. - -### The sands of change ### - -The Free Software Foundation was founded in 1985. To paint a picture of what computing was like back then, the [Amiga 1000][4] was released, C++ was becoming a dominant language, [Aldus PageMaker][5] was announced, and networking was just starting to grow. Oh, and that year [Careless Whisper][6] by Wham! was a major hit. - -Things have changed a lot in 30 years. Back in 1985 the FSF was primarily focused on building free pieces of software that were primarily useful to nerdy computer people. These days we have software, services, social networks, and more to consider. - -I first wanted to get a sense of what John feels are most prominent risks to software freedom today. - -"I think there's widespread agreement on the biggest risks for computer user freedom today, but maybe not on the names for them." - -"The first is what we might as well just call 'tiny computers everywhere.' The free software movement has succeeded to the point where laptops, desktops, and servers can run fully free operating systems doing anything users of proprietary systems can do. There are still a few holes, but they'll be closed. The challenge that remains in this area is to cut through the billion dollar marketing budgets and legal regimes working against us to actually get the systems into users hands." - -"However, we have a serious problem on the set of computers whose primary common trait is that they are very small. Even though a car is not especially small, the computers in it are, so I include that form factor in this category, along with phones, tablets, glasses, watches, and so on. While these computers often have a basis in free software—for example, using the kernel Linux along with other free software like Android or GNU—their primary uses are to run proprietary applications and be shims for services that replace local computing with computing done on a server over which the user has no control. Since these devices serve vital functions, with some being primary means of communication for huge populations, some sitting very close to our bodies and our actual vital functions, some bearing responsibility for our physical safety, it is imperative that they run fully free systems under their users' control. Right now, they don't." - -John feels the risk here is not just the platforms and form factors, but the services integrates into them. - -"The services many of these devices talk to are the second major threat we face. It does us little good booting into a free system if we do our actual work and entertainment on companies' servers running software we have no access to at all. The point of free software is that we can see, modify, and share code. The existence of those freedoms even for nontechnical users provides a shield that prevents companies from controlling us. None of these freedoms exist for users of Facebook or Salesforce or Google Docs. Even more worrisome, we see a trend where people are accepting proprietary restrictions imposed on their local machines in order to have access to certain services. Browsers—including Firefox—are now automatically installing a DRM plugin in order to appease Netflix and other video giants. We need to work harder at developing free software decentralized replacements for media distribution that can actually empower users, artists, and user-artists, and for other services as well. For Facebook we have GNU social, pump.io, Diaspora, Movim, and others. For Salesforce, we have CiviCRM. For Google Docs, we have Etherpad. For media, we have GNU MediaGoblin. But all of these projects need more help, and many services don't have any replacement contenders yet." - -It is interesting that John mentions finding free software equivalents for common applications and services today. The FSF maintains a list of "High Priority Projects" that are designed to fill this gap. Unfortunately the capabilities of these projects varies tremendously and in an age where social media is so prominent, the software is only part of the problem: the real challenge is getting people to use it. - -This all begs the question of where the FSF fit in today's modern computing world. I am a fan of the FSF. I think the work they do is valuable and I contribute financially to support it too. They are an important organization for building an open computing culture, but all organizations need to grow, adjust, and adapt, particularly ones in the technology space. - -I wanted to get a better sense of what the FSF is doing today that it wasn't doing at it's inception. - -"We're speaking to a much larger audience than we were 30 years ago, and to a much broader audience. It's no longer just hackers and developers and researchers that need to know about free software. Everyone using a computer does, and it's quickly becoming the case that everyone uses a computer." - -John went on to provide some examples of these efforts. - -"We're doing coordinated public advocacy campaigns on issues of concern to the free software movement. Earlier in our history, we expressed opinions on these things, and took action on a handful, but in the last ten years we've put more emphasis on formulating and carrying out coherent campaigns. We've made especially significant noise in the area of Digital Restrictions Management (DRM) with Defective by Design, which I believe played a role in getting iTunes music off DRM (now of course, Apple is bringing DRM back with Apple Music). We've made attractive and useful introductory materials for people new to free software, like our [User Liberation animated video][7] and our [Email Self-Defense Guide][8]. - -We're also endorsing hardware that [respects users' freedoms][9]. Hardware distributors whose devices have been certified by the FSF to contain and require only free software can display a logo saying so. Expanding the base of free software users and the free software movement has two parts: convincing people to care, and then making it possible for them to act on that. Through this initiative, we encourage manufacturers and distributors to do the right thing, and we make it easy for users who have started to care about free software to buy what they need without suffering through hours and hours of research. We've certified a home WiFi router, 3D printers, laptops, and USB WiFi adapters, with more on the way. - -We're collecting all of the free software we can find in our [Free Software Directory][10]. We still have a long way to go on this—we're at only about 15,500 packages right now, and we can imagine many improvements to the design and function of the site—but I think this resource has great potential for helping users find the free software they need, especially users who aren't yet using a full GNU/Linux system. With the dangers inherent in downloading random programs off the Internet, there is a definite need for a curated collection like this. It also happens to provide a wealth of machine-readable data of use to researchers. - -We're acting as the fiscal sponsor for several specific free software projects, enabling them to raise funds for development. Most of these projects are part of GNU (which we continue to provide many kinds of infrastructure for), but we also sponsor [Replicant][11], a fully free fork of Android designed to give users the free-est mobile devices currently possible. - -We're helping developers use free software licenses properly, and we're following up on complaints about companies that aren't following the terms of the GPL. We help them fix their mistakes and distribute properly. RMS was in fact doing similar work with the precursors of the GPL very early on, but it's now an ongoing part of our work. - -Most of the specific things the FSF does now it wasn't doing 30 years ago, but the vision is little changed from the original paperwork—we aim to create a world where everything users want to do on any computer can be done using free software; a world where users control their computers and not the other way around." - -### A cult of personality ### - -There is little doubt in anyone's minds about the value the FSF brings. As John just highlighted, its efforts span not just the creation and licensing of free software, but also recognizing, certifying, and advocating a culture of freedom in technology. - -The head of the FSF is the inimitable Richard M. Stallman, commonly referred to as RMS. - -RMS is a curious character. He has demonstrated an unbelievable level of commitment to his ideas, philosophy, and ethical devotion to freedom in software. - -While he is sometimes mocked online for his social awkwardness, be it things said in his speeches, his bizarre travel requirements, or other sometimes cringeworthy moments, RMS's perspectives on software and freedom are generally rock-solid. He takes a remarkably consistent approach to his perspectives and he is clearly a careful thinker about not just his own thoughts but the wider movement he is leading. My only criticism is that I think from time to time he somewhat over-eggs the pudding with the voracity of his words. But hey, given his importance in our world, I would rather take an extra egg than no pudding for anyone. O.K., I get that the whole pudding thing here was strained... - -So RMS is a key part of the FSF, but the organization is also much more than that. There are employees, a board, and many contributors. I was curious to see how much of a role RMS plays these days in the FSF. John shared this with me. - -"RMS is the FSF's President, and does that work without receiving a salary from the FSF. He continues his grueling global speaking schedule, advocating for free software and computer user freedom in dozens of countries each year. In the course of that, he meets with government officials as well as local activists connected with all varieties of social movements. He also raises funds for the FSF and inspires many people to volunteer." - -"In between engagements, he does deep thinking on issues facing the free software movement, and anticipates new challenges. Often this leads to new articles—he wrote a 3-part series for Wired earlier this year about free software and free hardware designs—or new ideas communicated to the FSF's staff as the basis for future projects." - -As we delved into the cult of personality, I wanted to tap John's perspectives on how wide the free software movement has grown. - -I remember being at the [Open Source Think Tank][12] (an event that brings together execs from various open source organizations) and there was a case study where attendees were asked to recommend license choice for a particular project. The vast majority of break-out groups recommended the Apache Software License (APL) over the GNU Public License (GPL). - -This stuck in my mind as since then I have noticed that many companies seem to have opted for open licenses other than the GPL. I was curious to see if John had noticed a trend towards the APL as opposed to the GPL. - -"Has there been? I'm not so sure. I gave a presentation at FOSDEM a few years ago called 'Is Copyleft Being Framed?' that showed some of the problems with the supposed data behind claims of shifts in license adoption. I'll be publishing an article soon on this, but here's some of the major problems: - - -- Free software license choices do not exist in a vacuum. The number of people choosing proprietary software licenses also needs to be considered in order to draw the kinds of conclusions that people want to draw. I find it much more likely that lax permissive license choices (such as the Apache License or 3-clause BSD) are trading off with proprietary license choices, rather than with the GPL. -- License counters often, ironically, don't publish the software they use to collect that data as free software. That means we can't inspect their methods or reproduce their results. Some people are now publishing the code they use, but certainly any that don't should be completely disregarded. Science has rules. -- What counts as a thing with a license? Are we really counting an app under the APL that makes funny noises as 1:1 with GNU Emacs under GPLv3? If not, how do we decide which things to treat as equals? Are we only looking at software that actually works? Are we making sure not to double- and triple- count programs that exist on multiple hosting sites, and what about ports for different OSes? - -The question is interesting to ponder, but every conclusion I've seen so far has been extremely premature in light of the actual data. I'd much rather see a survey of developers asking about why they chose particular licenses for their projects than any more of these attempts to programmatically ascertain the license of programs and then ascribe human intentions on to patterns in that data. - -Copyleft is as vital as it ever was. Permissively licensed software is still free software and on-face a good thing, but it is contingent and needs an accompanying strong social commitment to not incorporate it in proprietary software. If free software's major long-term impact is enabling businesses to more efficiently make products that restrict us, then we have achieved nothing for computer user freedom." - -### Rising to new challenges ### - -30 years is an impressive time for any organization to be around, and particularly one with such important goals that span so many different industries, professions, governments, and cultures. - -As I started to wrap up the interview I wanted to get a better sense of what the FSF's primary function is today, 30 years after the mission started. - -"I think the FSF is in a very interesting position of both being a steady rock and actively pushing the envelope." - -"We have core documents like the [Free Software Definition][13], the [GNU General Public License][14], and the [list we maintain of free and nonfree software licenses][15], which have been keystones in the construction of the world of free software we have today. People place a great deal of trust in us to stay true to the principles outlined in those documents, and to apply them correctly and wisely in our assessments of new products or practices in computing. In this role, we hold the ladder for others to climb. As a 501(c)(3) charity held legally accountable to the public interest, and about 85% funded by individuals, we have the right structure for this." - -"But we also push the envelope. We take on challenges that others say are too hard. I guess that means we also build ladders? Or maybe I should stop with the metaphors." - -While John may not be great with metaphors (like I am one to talk), the FSF is great at setting a mission and demonstrating a devout commitment to it. This mission starts with a belief that free software should be everywhere. - -"We are not satisfied with the idea that you can get a laptop that works with free software except for a few components. We're not satisfied that you can have a tablet that runs a lot of free software, and just uses proprietary software to communicate with networks and to accelerate video and to take pictures and to check in on your flight and to call an Über and to.. Well, we are happy about some such developments for sure, but we are also unhappy about the suggestion that we should be fully content with them. Any proprietary software on a system is both an injustice to the user and inherently a threat to users' security. These almost-free things can be stepping stones on the way to a free world, but only if we keep our feet moving." - -In the early years of the FSF, we actually had to get a free operating system written. This has now been done by GNU and Linux and many collaborators, although there is always more software to write and bugs to fix. So while the FSF does still sponsor free software development in specific areas, there are thankfully many other organizations also doing this." - -A key part of the challenge John is referring to is getting the right hardware into the hands of the right people. - -"What we have been focusing on now are the challenges I highlighted in the first question. We are in desperate need of hardware in several different areas that fully supports free software. We have been talking a lot at the FSF about what we can do to address this, and I expect us to be making some significant moves to both increase our support for some of the projects already out there—as we having been doing to some extent through our Respects Your Freedom certification program—and possibly to launch some projects of our own. The same goes for the network service problem. I think we need to tackle them together, because having full control over the mobile components has great potential for changing how we relate to services, and decentralizing more and more services will in turn shape the mobile components." - -I hope folks will support the FSF as we work to grow and tackle these challenges. Hardware is expensive and difficult, as is making usable, decentralized, federated replacements for network services. We're going to need the resources and creativity of a lot of people. But, 30 years ago, a community rallied around RMS and the concept of copyleft to write an entire operating system. I've spent my last 12 years at the FSF because I believe we can rise to the new challenges in the same way." - -### Final thoughts ### - -In reading John's thoughtful responses to my questions, and in knowing various FSF members, the one sense that resonates for me is the sheer level of passion that is alive and kicking in the FSF. This is not an organization that has got bored or disillusioned with its mission. Its passion and commitment is as voracious as it has ever been. - -While I don't always agree with the FSF and I sometimes think its approach is a little one-dimensional at times, I have been and will continue to be a huge fan and supporter of its work. The FSF represent the ethical heartbeat of much of the free software and open source work that happens across the world. It represents a world view that is pretty hard to the left, but I believe its passion and conviction helps to bring people further to the right a little closer to the left too. - -Sure, RMS can be odd, somewhat hardline, and a little sensational, but he is precisely the kind of leader that is valuable in a movement that encapsulates a mixture of technology, ethics, and culture. We need an RMS in much the same way we need a Torvalds, a Shuttleworth, a Whitehurst, and a Zemlin. These different people bring together mixture of perspectives that ultimately maps to technology that can be adaptable to almost any set of use cases, ethics, and ambitions. - -So, in closing, I want to thank the FSF for its tremendous efforts, and I wish the FSF and its fearless leaders, one Richard M. Stallman and one John Sullivan, another 30 years of fighting the good fight. Go get 'em! - -> This article is part of Jono Bacon's Six Degrees column, where he shares his thoughts and perspectives on culture, communities, and trends in open source. - --------------------------------------------------------------------------------- - -via: http://opensource.com/business/15/9/free-software-foundation-30-years - -作者:[Jono Bacon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://opensource.com/users/jonobacon -[1]:Welcome back, folks, to a new Six Degrees column. As usual, please send your thoughts on this piece to the comment box and your suggestions for future columns to my inbox. -[2]:http://www.fsf.org/ -[3]:http://twitter.com/johns_fsf/ -[4]:https://en.wikipedia.org/wiki/Amiga_1000 -[5]:https://en.wikipedia.org/wiki/Adobe_PageMaker -[6]:https://www.youtube.com/watch?v=izGwDsrQ1eQ -[7]:http://fsf.org/ -[8]:http://emailselfdefense.fsf.org/ -[9]:http://fsf.org/ryf -[10]:http://directory.fsf.org/ -[11]:http://www.replicant.us/ -[12]:http://www.osthinktank.com/ -[13]:http://www.fsf.org/about/what-is-free-software -[14]:http://www.gnu.org/licenses/gpl-3.0.en.html -[15]:http://www.gnu.org/licenses/licenses.en.html \ No newline at end of file diff --git a/sources/talk/20150916 Italy's Ministry of Defense to Drop Microsoft Office in Favor of LibreOffice.md b/sources/talk/20150916 Italy's Ministry of Defense to Drop Microsoft Office in Favor of LibreOffice.md deleted file mode 100644 index f47352ed26..0000000000 --- a/sources/talk/20150916 Italy's Ministry of Defense to Drop Microsoft Office in Favor of LibreOffice.md +++ /dev/null @@ -1,30 +0,0 @@ -Italy's Ministry of Defense to Drop Microsoft Office in Favor of LibreOffice -================================================================================ ->**LibreItalia's Italo Vignoli [reports][1] that the Italian Ministry of Defense is about to migrate to the LibreOffice open-source software for productivity and adopt the Open Document Format (ODF), while moving away from proprietary software products.** - -The movement comes in the form of a [collaboration][1] between Italy's Ministry of Defense and the LibreItalia Association. Sonia Montegiove, President of the LibreItalia Association, and Ruggiero Di Biase, Rear Admiral and General Executive Manager of Automated Information Systems of the Ministry of Defense in Italy signed an agreement for a collaboration to adopt the LibreOffice office suite in all of the Ministry's offices. - -While the LibreItalia non-profit organization promises to help the Italian Ministry of Defense with trainers for their offices across the country, the Ministry will start the implementation of the LibreOffice software on October 2015 with online training courses for their staff. The entire transition process is expected to be completed by the end of year 2016\. An Italian law lets officials find open source software alternatives to well-known commercial software. - -"Under the agreement, the Italian Ministry of Defense will develop educational content for a series of online training courses on LibreOffice, which will be released to the community under Creative Commons, while the partners, LibreItalia, will manage voluntarily the communication and training of trainers in the Ministry," says Italo Vignoli, Honorary President of LibreItalia. - -### The Ministry of Defense will adopt the Open Document Format (ODF) - -The initiative will allow the Italian Ministry of Defense to be independent from proprietary software applications, which are aimed at individual productivity, and adopt open source document format standards like Open Document Format (ODF), which is used by default in the LibreOffice office suite. The project follows similar movements already made by governments of other European countries, including United Kingdom, France, Spain, Germany, and Holland. - -It would appear that numerous other public institutions all over Italy are using open source alternatives, including the Italian Region Emilia Romagna, Galliera Hospital in Genoa, Macerata, Cremona, Trento and Bolzano, Perugia, the municipalities of Bologna, ASL 5 of Veneto, Piacenza and Reggio Emilia, and many others. AGID (Agency for Digital Italy) welcomes this project and hopes that other public institutions will do the same. - - --------------------------------------------------------------------------------- - -via: http://news.softpedia.com/news/italy-s-ministry-of-defense-to-drop-microsoft-office-in-favor-of-libreoffice-491850.shtml - -作者:[Marius Nestor][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://news.softpedia.com/editors/browse/marius-nestor -[1]:http://www.libreitalia.it/accordo-di-collaborazione-tra-associazione-libreitalia-onlus-e-difesa-per-ladozione-del-prodotto-libreoffice-quale-pacchetto-di-produttivita-open-source-per-loffice-automation/ -[2]:http://www.libreitalia.it/chi-siamo/ diff --git a/sources/talk/20150929 A Slick New Set-Up Wizard Is Coming To Ubuntu and Ubuntu Touch.md b/sources/talk/20150929 A Slick New Set-Up Wizard Is Coming To Ubuntu and Ubuntu Touch.md deleted file mode 100644 index 2c147fb3e3..0000000000 --- a/sources/talk/20150929 A Slick New Set-Up Wizard Is Coming To Ubuntu and Ubuntu Touch.md +++ /dev/null @@ -1,49 +0,0 @@ -A Slick New Set-Up Wizard Is Coming To Ubuntu and Ubuntu Touch -================================================================================ -> Canonical aims to 'seduce and reassure' those unfamiliar with the OS by making a good first impression - -**The Ubuntu installer is set to undergo a dramatic makeover.** - -Ubuntu will modernise its out-of-the-box experience (OOBE) to be easier and quicker to complete, look more ‘seductive’ to new users, and better present the Ubuntu brand through its design. - -Ubiquity, the current Ubuntu installer, has largely remained unchanged since its [introduction back in 2010][1]. - -### First Impressions Are Everything ### - -Since the first thing most users see when trying Ubuntu for the first time is an installer (or set-up wizard, depending on device) the design team feel it’s “one of the most important categories of software usability”. - -“It essentially says how easy your software is to use, as well as introducing the user into your brand through visual design and tone of voice, which can convey familiarity and trust within your product.” - -Canonical’s new OOBE designs show a striking departure from the current look of the Ubiquity installer used by the Ubuntu desktop, and presents a refined approach to the way mobile users ‘set up’ a new Ubuntu Phone. - -![Old design (left) and the new proposed design](http://www.omgubuntu.co.uk/wp-content/uploads/2015/09/desktop-2.jpg) - -Old design (left) and the new proposed design - -Detailing the designs in [new blog post][2], the Canonical Design team say the aim of the revamp is to create a consistent out-of-the-box experience across Ubuntu devices. - -To do this it groups together “common first experiences found on the mobile, tablet and desktop” and unifies the steps and screens between each, something they say moves the OS closer to “achieving a seamless convergent platform.” - -![New Ubuntu installer on desktop/tablet (left) and phone](http://www.omgubuntu.co.uk/wp-content/uploads/2015/09/Convergence.jpg) - -New Ubuntu installer on desktop/tablet (left) and phone - -Implementation of the new ‘OOBE’ has already begun’ according to Canonical, though as of writing there’s no firm word on when a revamped installer may land on either desktop or phone images. - -With the march to ‘desktop’ convergence now in full swing, and a(nother) stack of design changes set to hit the mobile build in lieu of the first Ubuntu Phone that ‘transforms’ in to a PC, chances are you won’t have to wait too long to try it out. - -**What do you think of the designs? How would you go about improving the Ubuntu set-up experience? Let us know in the comments below.** - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/09/new-look-ubuntu-installer-coming-soon - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:http://www.omgubuntu.co.uk/2010/09/ubuntu-10-10s-installer-slideshow-oozes-class -[2]:http://design.canonical.com/wp-content/uploads/Convergence.jpg \ No newline at end of file diff --git a/sources/talk/20151023 Ubuntu 15.10 Codenamed Wily Werewolf Review.md b/sources/talk/20151023 Ubuntu 15.10 Codenamed Wily Werewolf Review.md deleted file mode 100644 index e232beb30a..0000000000 --- a/sources/talk/20151023 Ubuntu 15.10 Codenamed Wily Werewolf Review.md +++ /dev/null @@ -1,68 +0,0 @@ -Ubuntu 15.10, Codenamed Wily Werewolf, Review -================================================================================ -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/Ubuntu-15.10-791x445.png) - -The problem we have with reviewing Ubuntu on any occasion, is readers consistently expect to read of a revolutionary new release, every 6 months. If you’re expecting Ubuntu 15.10 to be just that, then you may want to click out of this review right now. It’s important to clarify that this is nothing negative towards 15.10 as a release, but it is a maintenance release and not a release which purports to introduce a great deal of new software. - -With that opening disclaimer out of the way, let’s take a look at what 15.10 does offer. - -### Linux kernel 4.2 ### - -The biggest change you will find with Ubuntu 15.10 is the kernel branch has been upgraded to **Linux 4.2**. - -This is long overdue for Ubuntu. It feels like it has been lagging behind other distributions by sticking with the 3.x branch of Linux for the entirety of the 15.04 cycle. - -If you’re going to be installing Ubuntu 15.10 on new hardware, then you will benefit greatly from the Linux kernel upgrade to 4.x branch as there is loads of updates which directly improve performance on new hardware. Support for AMDGPU kernel DRM is included, which is a boon for owners of recent Radeon graphics cards. The latest iteration of the driver will reside alongside the current Radeon DRM drivers, which was already in the kernel in addition to the usual open-source driver offerings. - -Support for Intel Broxton is also included in Linux 4.2, albeit Ubuntu 15.10 users are probably going to get nothing out of this update, yet it’s still worthy of a mention we think. There are also some erroneous updates for Skylake CPU’s. Finally, there is a host of code updates and fixes for Ext4 filesystems. - -That pretty much rounds out the Linux kernel 4.2 updates. So what else is new? Let’s take a closer look at the software that you may be more familiar with and get more excited about. - -### Software ### - -LibreOffice has been upgraded to 5.0.1.2, a major update for LibreOffice users. Firefox on the version that we tested is sitting at 41.0.2. By the time you read this, it will most-likely be updated again and you may see a newer version be pushed out through the Ubuntu Repositories. - -On the desktop front, a vanilla Ubuntu installation will see you running Unity 7.3.2 while GNOME sits at 3.8. On the KDE end, a Plasma 5 desktop will see you running version 5.4.2. For the alternative desktop-environments, XFCE has been upgraded to the latest revision, 4.12 while the version of MATE includes 1.10. - -### User Experience/Screenshots ### - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/1.png) - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/2.png) - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/3.png) - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/4.png) - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/5.png) - -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/10/6.png) - -### Conclusion ### - -Ubuntu 15.10 as a operating system for Review is pretty lackluster. There’s nothing new as such and there’s nothing we can really say that is going to change your opinion from its predecessor, 15.04. Therefore, we recommend you to upgrade either out of habit and according to your regular upgrade schedule rather than out of a specific necessity for a specific feature of this release. Because there is really nothing that could possibly differentiate it from the older, yet still very stable 15.04 release. But if you’re going to stick with 15.04 for a little longer, we do recommend that you look at [upgrading the kernel to the latest 4.2 branch][2]. It is worth it. - -If you really want a reason to upgrade? Linux kernel 4.2 would be our sole reason for taking Ubuntu 15.10 into consideration. - -### Looking Ahead ### - -What we really look forward to is the release of Ubuntu 16.04. We have been promised over and over again for several releases that Mir will be the default display server included in Ubuntu. We still see releases pushed out that rely on X.org. It has resulted in us adopting a “yeah right” attitude as we have become accustomed to the usual delay announcements. - -We are hopeful that Mir Developers can push out a working version in time for the release of 16.04 next year. As precaution though, we urge you to not get too excited because it may very well not happen. - -It remains much the same with Unity 8. It’s most certainly a possibility, but we can’t guarantee that it will be included in 16.04, yet we remain hopeful. - -As we’ve mentioned for this release, there’s nothing really ground-breaking with this release. In fact, it has been much the same story for the last couple of releases of Ubuntu Linux. It is in dire need of a distribution-wide reboot. Developers and Ubuntu users alike are positive that Mir and Unity 8 will be the two primary packages that may just provide the popular, yet ailing, distribution the reboot that it needs. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/ubuntu-15-10-codenamed-wily-werewolf-review/ - -作者:[Chris Jones][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/chris/ -[1]:http://www.unixmen.com/how-to-install-linux-kernel-4-2-3/ \ No newline at end of file diff --git a/sources/talk/20151028 10 Things To Do After Installing Ubuntu 15.10 'Wily Werewolf'.md b/sources/talk/20151028 10 Things To Do After Installing Ubuntu 15.10 'Wily Werewolf'.md deleted file mode 100644 index 7ff2c965e7..0000000000 --- a/sources/talk/20151028 10 Things To Do After Installing Ubuntu 15.10 'Wily Werewolf'.md +++ /dev/null @@ -1,194 +0,0 @@ -10 Things To Do After Installing Ubuntu 15.10 'Wily Werewolf' -================================================================================ -![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/3527964.jpg?242) - -Yesterday Ubuntu 15.10 was made [available to download][1] with some new features, improvements and updated apps. If you've upgraded to Ubuntu 15.10 then this article is going to show you 10 things/tweaks that you need to do to make your Ubuntu more handy and fruitful. - -### What's New In Ubuntu 15.10? ### - -Ubuntu 15.10 codenamed 'Wily Werewolf' was released yesterday with new features, improvements, fixes and updated apps. Read our complete article to know more stuff added with Ubuntu 15.10. - -### Things To Do After Installing Ubuntu 15.10 ### - -Ubuntu 15.10 is shipping with new features that are activated by default, no need to tweak for anyone. But, changes made in the last release of Ubuntu 15.04, were not activated by default and so in Ubuntu 15.10. Other than those changes you need to install useful/must have applications. So first tweak our newly installed Wily Werewolf. - -### 1. Update Ubuntu 15.10 ### - -Before you use the system and any app first check for updates. Updating the system is necessary to keep the OS more stable and secure. Updates also adds new features in the system. Although there won't be larger size of updates after you within some days of release as all the packages are already to their newest versions. - -![update ubuntu 15.10](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/9719789_orig.png) - -#### Tweak Ubuntu 15.10 #### - -One of things to notice is that the tweaks that were presented in the last Ubuntu release are not activated by default. Those are still at your wish, if you want go ahead and activate them. For example, Always Show Menus, Where to show menu, in the window's title bar or in the menu bar. - -### 2. Set Menus Position ### - -By default in Ubuntu 15.10, the menu are set to show in the menu bar which is sometimes uneasy to reach to but you can set the menus to show in the window's title bar. Go to **Settings >> Appearances >> Behavior >> in the window's title bar**. - -![set menu position in window's title bar](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/6711164_orig.png) - -3. Install Unity Tweak Tool - -To tweak system more install Unity Tweak Tool, It has more options than the default system settings. You can change theme, icons, workspaces settings and many more. Check the screenshot below - - -![install unity tweak tool](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/5399532_orig.png?449) - -### 4. Install Firewall To Block Harmful Incoming/Outgoing Connections ### - -![ufw firewall](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/8042619_orig.png?296) - -One of the favorite ways of hackers to get access to individuals' system is to scan for the open ports and attack through them. A firewall protect your system from such attacks by blocking harmful incoming/outgoing connections. - -UFW stands ofr Uncomplicated Firewall. As the name suggests it's the most easy to use firewall you ever used. Just install and switch it on. Configure firewall rules, block particular ports etc. easily. To know all about UFW and how to use all of its features read our following article - - -[Install UFW Firewall In Linux And Secure Computer From Harmful Incoming/Outgoing Connections][2] - -#### Install UFW Firewall #### - - $ sudo apt-get install ufw - Install Graphical Interface - $ sudo apt-get install gufw - -### 5. Install Graphics Drivers ### - -If you're a game lover or you play HD videos or do video editing kind of things then you need to have proprietary drivers installed available for your hardware for better graphics performance. - -To install graphics driver - - -Go to **Settings >> Software & Updates >> Additional Drivers** - -It will search for the latest drivers available for you hardware. - -![install proprietary drivers in ubuntu 15.10](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/1658110_orig.png) - -### 6. Install VLC & Media Codecs For More Media Support ### - -VLC supports most file formats so it's better to use VLC to escape the error while playing audio files. - -Sometimes you play a mp3 and it does not play. To solve this problem, Ubuntu gives an option while you're installing Ubuntu to install all the necessary media codecs. If you checked that then don't worry, if you haven't then do the following - - - $ sudo apt-get install vlc - Install Media Codecs - $ sudo apt-get install ubuntu-restricted-extras - -### 7. Configure Cloud Storage ### - -Cloud storage are very useful to share files across your local devices like, Mobile to PC or Laptops and vice-versa. User can easily install Storages like, Dropbox, Copy, Gdrive (Using Grive) etc. - -#### Dropbox #### - -To install Dropbox, download Dropbox installation client first. - -- [Download Dropbox][3] - -Download Dropbox for your system architecture. To check whether your system is 64-Bit or 32-Bit - -Goto **Settings >> Details** - -Open the downloaded .deb file with Ubuntu Software Center and click install. - -![install dropbox](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/3856198_orig.png) - -When installed search Dropbox in Ubuntu dash and open it. It's just an installation client, so now this will install Dropbox app. Once the download competes you'll have the app asking for your Dropbox credentials. Enter your email id and password and login. All of your cloud files will be synced in your Ubuntu desktop. - -### 8. Enhance Look By Installing Themes ### - -The default two themes are not too much attractive. You can download and install cool themes from our Linux Themes Page. - -[![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/7726719.jpg)][4] - -[![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/7763892.jpg)][5] - -[![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/9618846.jpg)][6] - -[![](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/5625784.jpg)][7] - -- [Download More Themes][8] - -### 9. Install & Configure Email Client ### - -Email clients are very useful because you can check for new emails without opening up web browser. Ubuntu 15.10 comes with Thunderbird email client, one of the most popular email clients, supports multiple email accounts and desktop notifications. - -Thunderbird is simple to configure. Just use your email id and password to login and sync your emails right into your desktop/laptop. - -If you don't want to use Thunderbird then check out our article [Top 4 Open Source Email Clients For Linux][9] - -![install email client in ubuntu 15.10](http://www.linuxandubuntu.com/uploads/2/1/1/5/21152474/9381369_orig.jpg) - -### 10. Take The Poll ### - -After you have upgraded to Ubuntu 15.10, configure all the necessary or must have apps. Please take the poll to tell us what you like the most in Ubuntu 15.10 'Wily Werewolf'. - -注:投票项目 -What Do You Like The Most In Ubuntu 15.10? - -- Linux Kernel 4.2 -- Unity Improvements -- Steam Controller Support -- Ubuntu Make -- Persistent Network Interface Names -- New Wallpapers -- Other? Please Comment Below - --------------------------------------------------------------------------------- - -via: http://www.linuxandubuntu.com/home/10-things-to-do-after-installing-ubuntu-1510-wily-werewolf - -作者:[Mohd Sohail][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://in.linkedin.com/in/mohdsohail -[1]:http://www.linuxandubuntu.com/linux/ubuntu-1510-wily-werewolf-released-with-new-features-and-improvements-download-now -[2]:http://www.linuxandubuntu.com/linux/install-ufw-firewall-in-linux-and-secure-computer-from-harmful-incoming-outgoing-connections -[3]:https://db.tt/CbUWY1ca -[4]:http://www.linuxandubuntu.com/linux-themes/arc-dark-red-cinnamon-install-in-ubuntu-and-derivatives -[5]:http://www.linuxandubuntu.com/linux-themes/windows-8-gtk3-modern-ui-09-install-in-ubuntu-linux -[6]:http://www.linuxandubuntu.com/linux-themes/ubuntu-touch-unity-17-install-in-ubuntu-gtk -[7]:http://www.linuxandubuntu.com/linux-themes/numixdarkred-cinnamon-021-install-in-ubuntulinux-mint -[8]:http://www.linuxandubuntu.com/linux-themes.html -[9]:http://www.linuxandubuntu.com/linux/top-5-open-source-email-clients-for-linux -[10]: -[11]: -[12]: -[13]: -[14]: -[15]: -[16]: -[17]: -[18]: -[19]: -[20]: -[21]: -[22]: -[23]: -[24]: -[25]: -[26]: -[27]: -[28]: -[29]: -[30]: -[31]: -[32]: -[33]: -[34]: -[35]: -[36]: -[37]: -[38]: -[39]: -[40]: -[41]: -[42]: -[43]: -[44]: -[45]: -[46]: -[47]: -[48]: -[49]: -[50]: \ No newline at end of file diff --git a/sources/talk/20151028 Here are the 9 New Ubuntu 15.10 Features You Should Know.md b/sources/talk/20151028 Here are the 9 New Ubuntu 15.10 Features You Should Know.md deleted file mode 100644 index e7a3b76b5d..0000000000 --- a/sources/talk/20151028 Here are the 9 New Ubuntu 15.10 Features You Should Know.md +++ /dev/null @@ -1,109 +0,0 @@ -Here are the 9 New Ubuntu 15.10 Features You Should Know -================================================================================ -The stable edition of Ubuntu 15.10 wily werewolf is just released by canonical few days a ago and it now available to download and install on your computer. Lets take a look at the features that are implemented in the new release of ubuntu 15.10 and see what important packages have been updated. - -Watch – A quick video about “What’s new in Ubuntu 15.10“, thanks to [linuxscoop][1] for making this video. - -注:youtube 视频 - - -Below we are can mention the new features of Ubuntu 15.10 Wily Werewolf - -### Linux kernel 4.2 ### - -![Ubuntu 15.10 - Kernel 4.2](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-Kernel-4.2.jpg) - -Ubuntu 15.10 ships with linux kernel 4.2. This introduces lots of changes, like support for the new AMD GPU driver, NCQ TRIM handling, queue spinlocks, F2FS per-file encryption and lots of new and updated drivers. - -### Unity 7.3.2 ### - -![Ubuntu 15.10 - Unity 7.3](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-unity-7.3.jpg) - -Unity as the main desktop of ubuntu 15.10 has been updated to version 7.3.2. it comes with bug fixes, polish and small usability improvements. The following we can mention the features of Unity 7.3.2: - -- Allows drag and drop apps from the Dash to the desktop to create shortcuts -- Page up/down keyboard navigation works as scroll in the Dash -- Dash title & BFB tooltip is updated based on your privacy settings -- Session exit buttons now have a click effect -- Fix to prevent ‘shutdown’ of computer when screen is locked -- Active app icons now show unfolded when launcher accordion triggered -- Fix for full screen menubar -- Fixes issues with ‘show desktop’ that caused window decoration for two windows of same app to vanish -- Dash: Non-expandable category headers skipped in keyboard navigation -- Dash: Non-expandable category headers are no longer highlighted on mouse over -- Dash: screenreader and KeyNav fixes -- New setting to control the show-now delay (when pressing Alt key) -- Logic tweak to stop adjacent menu opening when moving from an indicator icon to its menu - -### GNOME 3.16 stack ### - -![Ubuntu 15.10 - GNOME Stack 3.16](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-GNOME-Stack-3.16.jpg) - -Another important changes for this release, the most of the packages from the GNOME stack updated to version 3.16.x. This is a good thing since these packages do come with lots of improvements.Unfortunately, the nautilus file manager for Ubuntu 15.10 is still in version 3.14 and Gedit text editor file still dating from 3.10. - -### Introduce GNOME Overlay Scrollbars ### - -![Ubuntu 15.10 - GNOME Overlay Scrollbars](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-GNOME-Overlay-Scrollbars.jpg) - -In Ubuntu 15.10, Ubuntu developers have decided to implement the GNOME Overlay scrollbars, it replacement of Unity’s overlay scrollbars for GTK3 applications. That’s no different than before, but it does serve as a stark and regular reminder of how much easier it is to use scrollbars that are always present in a predicable spot and wider than the pinpoint tip of a mouse cursor. - -### Ubuntu Make ### - -![Ubuntu 15.10 - ubuntu-make](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-ubuntu-make.jpg) - -Ubuntu Make, a command-line utility that allows you to download the latest version of popular developer tools easier on Ubuntu, now supports even more platforms, frameworks and services, including a full Android development environment. - -### Persistent Network Interface Names ### - -![Ubuntu 15.10 - Persistent Network Interface Names](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-Persistent-Network-Interface-Names.jpg) - -Ubuntu developer also introduces stateless persistent network interface names in Ubuntu 15.10. This means that naming the network interfaces like eth0 or eth1 will be a thing of the past and that new more comprehensive names will be used. Also, the names will remain valid even after a restart or if the hardware is removed. - -### Steam Controller Support ### - -![Ubuntu 15.10 - Steam Controller Support](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-Steam-Controller-Support.jpg) - -In this release, Ubuntu Developer also add support for the Steam Controller in Ubuntu 15.10. For now, the updated Steam package seems to be available only for Ubuntu 15.10, but it’s possible that the patch will be backported to other supported distributions. This means that Ubuntu 15.10 users will be able to plug the new controller, open Steam, and just play without having to read and apply any kind of advice from tutorials. - -### New Default Wallpaper ### - -![Ubuntu 15.10 - New Wallpaper](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-New-Wallpaper.jpg) - -Ubuntu 15.10 bring a new default wallpaper, the wallpaper desaign concept adopted from origami and it called suru. A new set of community sourced wallpapers are also included. - -### Core Applications Updates ### - -![Ubuntu 15.10 - Core Applications](http://ubuntuportal.com/wp-content/uploads/2015/10/Ubuntu-15.10-Core-Applications.jpg) - -Ubuntu 15.10 updates the core applications. among them: - -- Firefox 41 -- Chromium 45 -- LibreOffice 5.0.2 -- Totem (aka ‘Videos’) 3.16 -- Nautilus (aka ‘Files’) 3.14.2 -- Rhythmbox 3.2.1 -- GNOME Terminal 3.16 -- Eye of GNOME 3.16 -- Empathy 3.12.10 -- Shotwell 0.22 - -Download Ubuntu 15.10 Final Release - -The image of Ubuntu 15.10 ready to download and install. it available in 64-bit and 32-bit, the both can download from the official ISO downloads page by hitting the link below - -- [Download Ubuntu 15.10][2] - --------------------------------------------------------------------------------- - -via: http://ubuntuportal.com/2015/10/ubuntu-15-10.html - -作者:[ncode][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://ubuntuportal.com/author/ncode/ -[1]:https://www.youtube.com/user/linuxscoop -[2]:http://releases.ubuntu.com/15.10/ \ No newline at end of file diff --git a/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md b/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md index 501cb4a8dc..ae8df117ef 100644 --- a/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md +++ b/sources/tech/20150806 Installation Guide for Puppet on Ubuntu 15.04.md @@ -1,4 +1,3 @@ -Translating by ZTinoZ Installation Guide for Puppet on Ubuntu 15.04 ================================================================================ Hi everyone, today in this article we'll learn how to install puppet to manage your server infrastructure running ubuntu 15.04. Puppet is an open source software configuration management tool which is developed and maintained by Puppet Labs that allows us to automate the provisioning, configuration and management of a server infrastructure. Whether we're managing just a few servers or thousands of physical and virtual machines to orchestration and reporting, puppet automates tasks that system administrators often do manually which frees up time and mental space so sysadmins can work on improving other aspects of your overall setup. It ensures consistency, reliability and stability of the automated jobs processed. It facilitates closer collaboration between sysadmins and developers, enabling more efficient delivery of cleaner, better-designed code. Puppet is available in two solutions configuration management and data center automation. They are **puppet open source and puppet enterprise**. Puppet open source is a flexible, customizable solution available under the Apache 2.0 license, designed to help system administrators automate the many repetitive tasks they regularly perform. Whereas puppet enterprise edition is a proven commercial solution for diverse enterprise IT environments which lets us get all the benefits of open source puppet, plus puppet apps, commercial-only enhancements, supported modules and integrations, and the assurance of a fully supported platform. Puppet uses SSL certificates to authenticate communication between master and agent nodes. diff --git a/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md b/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md index bc7ebee015..101e86ecd0 100644 --- a/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md +++ b/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md @@ -1,5 +1,3 @@ -Translating by Ping - How to switch from NetworkManager to systemd-networkd on Linux ================================================================================ In the world of Linux, adoption of [systemd][1] has been a subject of heated controversy, and the debate between its proponents and critics is still going on. As of today, most major Linux distributions have adopted systemd as a default init system. diff --git a/sources/tech/20150831 Linux workstation security checklist.md b/sources/tech/20150831 Linux workstation security checklist.md index 9ef46339d0..155f57d982 100644 --- a/sources/tech/20150831 Linux workstation security checklist.md +++ b/sources/tech/20150831 Linux workstation security checklist.md @@ -1,4 +1,3 @@ -wyangsun translating Linux workstation security checklist ================================================================================ This is a set of recommendations used by the Linux Foundation for their systems 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 deleted file mode 100644 index f4625c6c13..0000000000 --- a/sources/tech/Learn with Linux/Learn with Linux--Master Your Math with These Linux Apps.md +++ /dev/null @@ -1,126 +0,0 @@ -Translated by KnightJoker - -用Linux学习:使用这些Linux应用来征服你的数学 -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-featured.png) - -这篇文章是[用Linux学习][1]系列的一部分: - -- [用Linux学习: 学习类型][2] -- [用Linux学习: 物理模拟][3] -- [用Linux学习: 学习音乐][4] -- [用Linux学习: 两个地理应用程序][5] -- [用Linux学习: 用这些Linux应用来征服你的数学][6] - - -Linux提供了大量的教育软件和许多优秀的工具来帮助所有年龄段的学生学习和练习各种各样的话题,常常以交互的方式。与Linux一起学习这一系列的文章则为这些各种各样的教育软件和应用提供了一个介绍。 - -数学是计算机的核心。如果有人用精益求精和纪律来预期一个伟大的操作系统,比如GNU/ Linux,那么这将是数学。如果你在寻求一些数学应用程序,那么你将不会感到失望。Linux提供了很多优秀的工具使得数学看起来和你曾经做过的一样令人畏惧,但实际上他们会简化你使用它的方式。 -### Gnuplot ### - -Gnuplot 是一个适用于不同平台的命令行脚本化和多功能的图形工具。尽管它的名字,并不是GNU操作系统的一部分。也没有免费授权,但它是免费软件(这意味着它受版权保护,但免费使用)。 - -要在Ubuntu系统(或者衍生系统)上安装 `gnuplot`,输入: - sudo apt-get install gnuplot gnuplot-x11 - -进入一个终端窗口。启动该程序,输入: - - gnuplot - -你会看到一个简单的命令行界面: - -![learnmath-gnuplot](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot.png) - -在其中您可以直接开始输入函数。绘图命令将绘制一个曲线图。 - -输入内容,例如, - - plot sin(x)/x - -随着`gnuplot的`提示,将会打开一个新的窗口,图像便会在里面呈现。 - -![learnmath-gnuplot-plot1](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-plot1.png) - -你也可以在线这个图设置不同的属性,比如像这样指定“title” - - 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) - -使用`splot`命令,你可以给的东西更深入一点并且绘制3D图形 - - splot sin(x*y/20) - -![learnmath-gnuplot-plot3](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-plot3.png) - -这个窗口有几个基本的配置选项, - -![learnmath-gnuplot-options](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-options.png) - -但是`gnuplot`的真正力量在于在它的命令行和脚本功能,`gnuplot`广泛完整的文档可在这里找到,并在[Duke大学网站][8]上面看见这个了不起的教程[7]的原始版本。 - -### Maxima ### - -[Maxima][9]是从Macsyma原始资料开发的一个计算机代数系统,根据它的 SourceForge 页面, - -> “Maxima是符号和数值的表达,包括微分,积分,泰勒级数,拉普拉斯变换,常微分方程,线性方程组,多项式,集合,列表,向量,矩阵和张量系统的操纵系统。Maxima通过精确的分数,任意精度的整数和可变精度浮点数产生高精度的计算结果。Maxima可以二维和三维中绘制函数和数据。“ - -你将会获得二进制包用于大多数Ubuntu衍生系统的Maxima以及它的图形界面中,插入所有包,输入: - - sudo apt-get install maxima xmaxima wxmaxima - -在终端窗口中,Maxima是一个没有太多UI的命令行工具,但如果你开始wxmaxima,你会进入一个简单但功能强大的图形用户界面。 - -![learnmath-maxima](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima.png) - -你可以开始输入这个来简单的一个开始。(提示:如果你想计算一个表达式,使用“Shift + Enter”回车后会增加更多的方法) - -Maxima可以用于一些简单的问题,因此也可以作为一个计算器, - -![learnmath-maxima-1and1](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-1and1.png) - -以及一些更复杂的问题, - -![learnmath-maxima-functions](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-functions.png) - -它使用`gnuplot`使得绘制简单, - -![learnmath-maxima-plot](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-plot.png) - -或者绘制一些复杂的图形. - -![learnmath-maxima-plot2](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-plot2.png) - -(它需要gnuplot-X11的包,来显示它们。) - -除了美化一些图形,Maxima也尽可能用latex格式导出它们,或者通过右键是捷菜单进行一些突出的操作. - -![learnmath-maxima-menu](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-menu.png) - -然而其主菜单还是提供了大量压倒性的功能,当然Maxima的功能远不止如此,这里也有一个广泛使用的在线文档。 - -### 总结 ### - -数学不是一个简单的学科,这些在Linux上的优秀软件也没有使得数学更加简单,但是这些应用使得使用数学变得更加的简单和工程化。以上两种应用都只是介绍一下Linux的所提供的。如果你是认真从事数学和需要更多的功能与丰富的文档,那你更应该看看这些Mathbuntu项目。 --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/learn-linux-maths/ - -作者:[Attila Orosz][a] -译者:[KnightJoker](https://github.com/KnightJoker/译者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 From 1cab4b9ad92b5908b39b1a9739366e5a9ed719dd Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 4 Nov 2015 23:37:09 +0800 Subject: [PATCH 2391/2517] =?UTF-8?q?=E8=B6=85=E6=9C=9F=E5=9B=9E=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @xuanwo --- ...asic Shell Scripting and Linux Filesystem Troubleshooting.md | 2 -- ...S--How to Install and Use vi or vim as a Full Text Editor.md | 2 -- ...tories Setting File Attributes and Finding Files in Linux.md | 2 -- ...ces Formatting Filesystems and Configuring Swap Partition.md | 2 -- ...ount Local and Network Samba and NFS Filesystems in Linux.md | 2 -- ...ions as RAID Devices – Creating & Managing System Backups.md | 2 -- ...Startup Process and Services SysVinit Systemd and Upstart.md | 2 -- ...sions and Attributes and Enabling sudo Access on Accounts.md | 2 -- ...kage Management with Yum RPM Apt Dpkg Aptitude and Zypper.md | 2 -- 9 files changed, 18 deletions(-) diff --git a/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md b/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md index 5dd1782a98..3ffb1dc54f 100644 --- a/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md +++ b/sources/tech/LFCS/Part 10 - LFCS--Understanding and Learning Basic Shell Scripting and Linux Filesystem Troubleshooting.md @@ -1,5 +1,3 @@ -Translating by Xuanwo - Part 10 - LFCS: Understanding & Learning Basic Shell Scripting and Linux Filesystem Troubleshooting ================================================================================ The Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a brand new initiative whose purpose is to allow individuals everywhere (and anywhere) to get certified in basic to intermediate operational support for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus smart decision-making when it comes to raising issues to upper support teams. diff --git a/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md b/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md index 1d069e08ea..7fe8073a77 100644 --- a/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md +++ b/sources/tech/LFCS/Part 2 - LFCS--How to Install and Use vi or vim as a Full Text Editor.md @@ -1,5 +1,3 @@ -Translating by Xuanwo - Part 2 - LFCS: How to Install and Use vi/vim as a Full Text Editor ================================================================================ A couple of months ago, the Linux Foundation launched the LFCS (Linux Foundation Certified Sysadmin) certification in order to help individuals from all over the world to verify they are capable of doing basic to intermediate system administration tasks on Linux systems: system support, first-hand troubleshooting and maintenance, plus intelligent decision-making to know when it’s time to raise issues to upper support teams. diff --git a/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md b/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md index 77fe5cf040..82cc54a5a6 100644 --- a/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md +++ b/sources/tech/LFCS/Part 3 - LFCS--How to Archive or Compress Files and Directories Setting File Attributes and Finding Files in Linux.md @@ -1,5 +1,3 @@ -Translating by Xuanwo - Part 3 - LFCS: How to Archive/Compress Files & Directories, Setting File Attributes and Finding Files in Linux ================================================================================ Recently, the Linux Foundation started the LFCS (Linux Foundation Certified Sysadmin) certification, a brand new program whose purpose is allowing individuals from all corners of the globe to have access to an exam, which if approved, certifies that the person is knowledgeable in performing basic to intermediate system administration tasks on Linux systems. This includes supporting already running systems and services, along with first-level troubleshooting and analysis, plus the ability to decide when to escalate issues to engineering teams. diff --git a/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md b/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md index 93e4b2966b..ada637fabb 100644 --- a/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md +++ b/sources/tech/LFCS/Part 4 - LFCS--Partitioning Storage Devices Formatting Filesystems and Configuring Swap Partition.md @@ -1,5 +1,3 @@ -Translating by Xuanwo - Part 4 - LFCS: Partitioning Storage Devices, Formatting Filesystems and Configuring Swap Partition ================================================================================ Last August, the Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a shiny chance for system administrators to show, through a performance-based exam, that they can perform overall operational support of Linux systems: system support, first-level diagnosing and monitoring, plus issue escalation – if needed – to other support teams. diff --git a/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md b/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md index 4316e32c16..1544a378bc 100644 --- a/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md +++ b/sources/tech/LFCS/Part 5 - LFCS--How to Mount or Unmount Local and Network Samba and NFS Filesystems in Linux.md @@ -1,5 +1,3 @@ -Translating by Xuanwo - Part 5 - LFCS: How to Mount/Unmount Local and Network (Samba & NFS) Filesystems in Linux ================================================================================ The Linux Foundation launched the LFCS certification (Linux Foundation Certified Sysadmin), a brand new program whose purpose is allowing individuals from all corners of the globe to get certified in basic to intermediate system administration tasks for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus smart decision-making when it comes to raising issues to upper support teams. diff --git a/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md b/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md index 901fb7b4f1..fd23db110f 100644 --- a/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md +++ b/sources/tech/LFCS/Part 6 - LFCS--Assembling Partitions as RAID Devices – Creating & Managing System Backups.md @@ -1,5 +1,3 @@ -Translating by Xuanwo - Part 6 - LFCS: Assembling Partitions as RAID Devices – Creating & Managing System Backups ================================================================================ Recently, the Linux Foundation launched the LFCS (Linux Foundation Certified Sysadmin) certification, a shiny chance for system administrators everywhere to demonstrate, through a performance-based exam, that they are capable of performing overall operational support on Linux systems: system support, first-level diagnosing and monitoring, plus issue escalation, when required, to other support teams. diff --git a/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md b/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md index 4b7cdf9fe2..abf09ee523 100644 --- a/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md +++ b/sources/tech/LFCS/Part 7 - LFCS--Managing System Startup Process and Services SysVinit Systemd and Upstart.md @@ -1,5 +1,3 @@ -Translating by Xuanwo - Part 7 - LFCS: Managing System Startup Process and Services (SysVinit, Systemd and Upstart) ================================================================================ A couple of months ago, the Linux Foundation announced the LFCS (Linux Foundation Certified Sysadmin) certification, an exciting new program whose aim is allowing individuals from all ends of the world to get certified in performing basic to intermediate system administration tasks on Linux systems. This includes supporting already running systems and services, along with first-hand problem-finding and analysis, plus the ability to decide when to raise issues to engineering teams. diff --git a/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md b/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md index 50f39ee2d9..2cec4de4ae 100644 --- a/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md +++ b/sources/tech/LFCS/Part 8 - LFCS--Managing Users and Groups File Permissions and Attributes and Enabling sudo Access on Accounts.md @@ -1,5 +1,3 @@ -Translating by Xuanwo - Part 8 - LFCS: Managing Users & Groups, File Permissions & Attributes and Enabling sudo Access on Accounts ================================================================================ Last August, the Linux Foundation started the LFCS certification (Linux Foundation Certified Sysadmin), a brand new program whose purpose is to allow individuals everywhere and anywhere take an exam in order to get certified in basic to intermediate operational support for Linux systems, which includes supporting running systems and services, along with overall monitoring and analysis, plus intelligent decision-making to be able to decide when it’s necessary to escalate issues to higher level support teams. diff --git a/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md b/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md index a363a50c09..6d0f65223f 100644 --- a/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md +++ b/sources/tech/LFCS/Part 9 - LFCS--Linux Package Management with Yum RPM Apt Dpkg Aptitude and Zypper.md @@ -1,5 +1,3 @@ -Translating by Xuanwo - Part 9 - LFCS: Linux Package Management with Yum, RPM, Apt, Dpkg, Aptitude and Zypper ================================================================================ Last August, the Linux Foundation announced the LFCS certification (Linux Foundation Certified Sysadmin), a shiny chance for system administrators everywhere to demonstrate, through a performance-based exam, that they are capable of succeeding at overall operational support for Linux systems. A Linux Foundation Certified Sysadmin has the expertise to ensure effective system support, first-level troubleshooting and monitoring, including finally issue escalation, when needed, to engineering support teams. From 88a65c749cbb0662946a9af9b776cfc498381e14 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 5 Nov 2015 00:10:08 +0800 Subject: [PATCH 2392/2517] PUB:06 - The history of Android MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @alim0x 开始校对起来啦~ --- .../06 - The history of Android.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) rename {translated/talk => published}/The history of Android/06 - The history of Android.md (61%) diff --git a/translated/talk/The history of Android/06 - The history of Android.md b/published/The history of Android/06 - The history of Android.md similarity index 61% rename from translated/talk/The history of Android/06 - The history of Android.md rename to published/The history of Android/06 - The history of Android.md index 030bb83ca8..363fd85a84 100644 --- a/translated/talk/The history of Android/06 - The history of Android.md +++ b/published/The history of Android/06 - The history of Android.md @@ -1,48 +1,48 @@ -The history of Android +安卓编年史(6) ================================================================================ ![T-Mobile G1](http://cdn.arstechnica.net/wp-content/uploads/2014/04/t-mobile_g1.jpg) -T-Mobile G1 -T-Mobile供图 + +*T-Mobile G1 [T-Mobile供图]* ### 安卓1.0——谷歌系app和实体硬件的引入 ### -到了2008年10月,安卓1.0已经准备好发布,这个系统在[T-Mobile G1][1](又以HTC Dream为人周知)上初次登台。G1进入了被iPhone 3G和[Nokia 1680 classic][2]所主宰的市场。(这些手机并列获得了2008年[销量最佳手机][3]称号,各自卖出了350万台。)G1的销量数字已难以获得,但T-Mobile宣称截至2009年4月该设备的销量突破了100万台。无论从哪方面来说这在竞争中都处于落后地位。 +到了2008年10月,安卓1.0已经准备好发布,这个系统在[T-Mobile G1][1](又以HTC Dream为人周知)上初次登台。G1进入了被iPhone 3G和[Nokia 1680 classic][2]所主宰的市场。(这些手机并列获得了2008年[销量最佳手机][3]称号,各自卖出了350万台。)G1的具体销量数字已难以获得,但T-Mobile宣称截至2009年4月该设备的销量突破了100万台。无论从哪方面来说这在竞争中都处于落后地位。 -G1拥有单核528Mhz的ARM 11处理器,一个Adreno 130的GPU,192MB内存,以及多达256MB的存储空间供给系统以及应用使用。它有一块3.2英寸,320x480分辨率的显示屏,被布置在一个含有实体全键盘的滑动结构之上。所以尽管安卓软件的确走过了很长的一段路,硬件也是的。时至今日,我们可以在厂商的一个手表中得到比这更好的参数:最新的[三星智能手表][4]拥有512MB内存以及1GHz的双核处理器。 +G1拥有单核528Mhz的ARM 11处理器,一个Adreno 130的GPU,192MB内存,以及多达256MB的存储空间提供给系统以及应用使用。它有一块3.2英寸、320x480分辨率的显示屏,被布置在一个含有实体全键盘的滑动结构之上。所以尽管安卓软件的确走过了很长的一段路,硬件也是的。时至今日,我们可以在一个厂商提供手表中得到比这更好的参数:最新的[三星智能手表][4]拥有512MB内存以及1GHz的双核处理器。 -当iPhone有着最少数量的按键的时候,G1确实完全相反的,按键几乎支持每个硬件控制。它有拨通和挂断按钮,home键,后退,以及菜单键,一个相机快门键,音量控制键,一个轨迹球,当然,还有50个键盘按钮。未来安卓设备将会慢慢离开按键多多的界面设计,几乎每部新旗舰都在减少按键的数量。 +当iPhone有着最少数量的按键的时候,G1确实完全相反的,按键几乎支持每个硬件控制。它有拨通和挂断按钮,home键,后退,以及菜单键,一个相机快门键,音量控制键,一个轨迹球,当然,还有50个键盘按键。未来安卓设备将会慢慢离开按键多多的界面设计,几乎每部新旗舰都在减少按键的数量。 但是这是第一次,人们见到了运行在实机上的安卓,而不是跑在一个令人沮丧的慢吞吞的模拟器上。安卓1.0没有iPhone那样顺滑流畅,闪亮耀眼,或拥有那么多的新闻报道。它也不像Windows Mobile 6.5那样才华横溢。但这仍然是个好的开始。 ![安卓1.0和0.9的默认应用列表。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/apps.png) -安卓1.0和0.9的默认应用列表。 -Ron Amadeo供图 -安卓1.0的核心与两个月前发布的beta版本相比看起来并没有什么引人注目的不同,但消费者产品带来了不少应用,包括一套完整的谷歌系应用。日历,电子邮件,Gmail,即时通讯,市场,设置,语音拨号,以及YouTube都是全新登场。那时候,音乐是智能手机上占据主宰地位的媒体类型,其王者是iTunes音乐商店。谷歌没有自家的音乐服务,所以它选择了亚马逊并绑定了亚马逊MP3商店。 +*安卓1.0和0.9的默认应用列表。[Ron Amadeo供图]* -安卓最重要的新增是谷歌商店的首次登场,叫做“安卓市场Beta”。与此同时大部分公司满足于将它们的软件目录称作一些不同的“应用商店”——意思是一个出售应用的商店,并且只出售应用——谷歌明显有着更大的野心。它搭配了一个更为通用的名字,“安卓市场”。这个名字的想法是安卓市场不仅仅拥有应用,还拥有一切你的安卓设备所需要的东西。 +安卓1.0的核心与两个月前发布的beta版本相比看起来并没有什么引人注目的不同,但这个消费产品带来了不少应用,包括一套完整的谷歌系应用。日历,电子邮件,Gmail,即时通讯,市场,设置,语音拨号,以及YouTube都是全新登场。那时候,音乐是智能手机上占据主宰地位的媒体类型,其王者是iTunes音乐商店。谷歌没有自家的音乐服务,所以它选择了亚马逊并绑定了亚马逊MP3商店。 + +安卓最重要的新增内容是首次登场的谷歌商店,叫做“安卓市场Beta”。与此同时大部分公司满足于将它们的软件目录称作各种“应用商店”——意思是一个出售应用的商店,并且只出售应用——谷歌明显有着更大的野心。它搭配了一个更为通用的名字,“安卓市场”。这个名字的想法是安卓市场不仅仅拥有应用,还拥有一切你的安卓设备所需要的东西。 ![第一个安卓市场客户端。截图展示了主页,“我的下载”,一个应用页面,以及一个应用权限页面。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/market.png) -第一个安卓市场客户端。截图展示了主页,“我的下载”,一个应用页面,以及一个应用权限页面。 -[Google][5]供图 -那时候,安卓市场只提供应用和游戏,开发者们甚至还不能为它们收费。苹果的App Store相对与安卓市场有4个月的先发优势,但是谷歌的主要差异化在于安卓的商店几乎是完全开放的。在iPhone上,应用受制于苹果的审查,必须遵循设计和技术指南。潜在的新应用不允许在功能上复制已有应用。在安卓市场,开发者可以自由地做任何想做的,包括开发替代已有的应用。控制的缺失会转变成祝福同时也是诅咒。它允许开发者革新已有的功能,但同时意味着甚至是毫无价值的垃圾应用也被允许进入市场。 +*第一个安卓市场客户端。截图展示了主页,“我的下载”,一个应用页面,以及一个应用权限页面。[[Google][5]供图]* -现在,这个客户端是又一个不再能够和谷歌服务器通讯的应用。幸运的是,它也是在因特网上被[真正记录][6]的为数不多的早期安卓应用之一。主页提供了通向一般区域的连接,像应用,游戏,搜索,以及下载,顶部有横向滚动显示的特色应用图标。搜索结果和“我的下载”页面以滚动列表的方式显示应用,显示应用名,开发者,费用(在那时都是免费的),以及评分。单独的应用页面展示了一个简短的描述,安装数,用户评论和评分,以及最重要的安装按钮。早期的安卓市场不支持图片,开发者唯一能使用的区域是应用描述,还有着500字的限制。这使得类似维护一个更新日志变的十分困难,因为只有描述的位置可以供其使用。 +那时候,安卓市场只提供应用和游戏,开发者们甚至还不能为它们收费。苹果的App Store相对与安卓市场有4个月的先发优势,但是谷歌的主要差异化在于安卓的商店几乎是完全开放的。在iPhone上,应用受制于苹果的审查,必须遵循设计和技术指南。潜在的新应用不允许在功能上复制已有应用。在安卓市场,开发者可以自由地做任何想做的,包括开发替代已有的应用。控制的缺失导致福祸相依。它允许开发者革新已有的功能,但同时意味着甚至是毫无价值的垃圾应用也被允许进入市场。 + +时至今日,这个安卓市场的客户端是又一个不再能够和谷歌服务器通讯的应用。幸运的是,它也是在因特网上被[真正记录][6]的为数不多的早期安卓应用之一。主页提供了通向一般区域的连接,像应用,游戏,搜索,以及下载,顶部有横向滚动显示的特色应用图标。搜索结果和“我的下载”页面以滚动列表的方式显示应用,显示应用名,开发者,费用(在那时都是免费的),以及评分。单独的应用页面展示了一个简短的描述,安装数,用户评论和评分,以及最重要的安装按钮。早期的安卓市场不支持图片,开发者唯一能使用的区域是应用描述,还有着500字的限制。这使得类似维护一个更新日志变的十分困难,因为只有描述的位置可以供其使用。 就在安装之前,安卓市场显示了应用所需要的权限。这是苹果直至2012年之前都避免做的,那年一个iOS应用被发现在用户不知情的情况下[将完整的通讯录上传][7]到云端。权限显示给出了一个完整的应用用到的权限列表,尽管这个版本强迫用户同意应用权限。界面有个“OK”按钮,但是除了后退按钮没有办法取消。 ![Gmail展示收件箱,打开菜单的收件箱。 ](http://cdn.arstechnica.net/wp-content/uploads/2013/12/gmail1.01.png) -Gmail展示收件箱,打开菜单的收件箱。 -Ron Amadeo供图 -下一个重要的应用也许就是Gmail。大多数基本的功能此时已经准备好了。未读邮件以加粗显示,标签是个有颜色的标记。在收件箱中每封独立邮件显示着主题,发件人,以及一个会话中的回复数。Gmail加星标志也在这里——快速点击即可给邮件加星或取消。一如往常,对于早期版本的安卓,菜单里有收件箱视图应有的所有按钮。但是,一旦打开了一封邮件,界面看起来就更加的现代了,“回复”和“转发”按钮永久固定在了屏幕底部。各个独立回复可以点击它们来展开和收缩。 +*Gmail展示收件箱,打开菜单的收件箱。[Ron Amadeo供图]* + +下一个重要的应用也许就是Gmail。大多数基本的功能此时已经准备好了。未读邮件以加粗显示,标签是个有颜色的标记。在收件箱中每封独立邮件显示着主题,发件人,以及一个会话中的回复数。Gmail加星标志也在这里——快速点击即可给邮件加星或取消。一如往常,对于早期版本的安卓,菜单里有收件箱视图应有的所有按钮。但是,一旦打开了一封邮件,界面看起来就更加的现代了,“回复”和“转发”按钮永久固定在了屏幕底部。单独回复可以点击它们来展开和收缩。 圆角,阴影,以及气泡图标给了整个应用“卡通”的外表,但是这是个好的开始。安卓的功能第一哲学真正从此开始:Gmail支持标签,邮件会话,搜索,以及邮件推送。 ![Gmail在安卓1.0的标签视图,写邮件界面,以及设置。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/gmail3.png) -Gmail在安卓1.0的标签视图,写邮件界面,以及设置。 -Ron Amadeo供图 + +*Gmail在安卓1.0的标签视图,写邮件界面,以及设置。[Ron Amadeo供图]* 但是如果你认为Gmail很丑,电子邮件应用又拉低了下限。它没有分离的收件箱或文件夹视图——所有东西都糊在一个界面。应用呈现给你一个文件夹列表,点击一个文件夹会以内嵌的方式展开内容。未读邮件左侧有条绿色的线指示,这就是电子邮件应用的界面。这个应用支持IMAP和POP3,但是没有Exchange。 @@ -58,7 +58,7 @@ Ron Amadeo供图 via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/6/ -译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) +译者:[alim0x](https://github.com/alim0x) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From b386c0ede7219264f7e45183fc748d0ec6d5bc07 Mon Sep 17 00:00:00 2001 From: KS Date: Thu, 5 Nov 2015 10:36:01 +0800 Subject: [PATCH 2393/2517] Update 20150831 Linux workstation security checklist.md --- sources/tech/20150831 Linux workstation security checklist.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150831 Linux workstation security checklist.md b/sources/tech/20150831 Linux workstation security checklist.md index 155f57d982..9ef46339d0 100644 --- a/sources/tech/20150831 Linux workstation security checklist.md +++ b/sources/tech/20150831 Linux workstation security checklist.md @@ -1,3 +1,4 @@ +wyangsun translating Linux workstation security checklist ================================================================================ This is a set of recommendations used by the Linux Foundation for their systems From 5e98d836a5b3eb10246a7abdf24b0a46f0fe07ae Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 5 Nov 2015 11:37:13 +0800 Subject: [PATCH 2394/2517] =?UTF-8?q?20151104-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... or Partitions in the Terminal on Linux.md | 88 ++++++ ...tall Pure-FTPd with TLS on FreeBSD 10.2.md | 154 ++++++++++ ...How to Install Redis Server on CentOS 7.md | 236 ++++++++++++++++ ...3.9.1 with JSON Support on Ubuntu 15.04.md | 122 ++++++++ ...fsense Firewall and Basic Configuration.md | 266 ++++++++++++++++++ ...s in Ubuntu Using Go For It Application.md | 84 ++++++ 6 files changed, 950 insertions(+) create mode 100644 sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md create mode 100644 sources/tech/20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md create mode 100644 sources/tech/20151104 How to Install Redis Server on CentOS 7.md create mode 100644 sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md create mode 100644 sources/tech/20151104 How to Setup Pfsense Firewall and Basic Configuration.md create mode 100644 sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md diff --git a/sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md b/sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md new file mode 100644 index 0000000000..0f7c1d699e --- /dev/null +++ b/sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md @@ -0,0 +1,88 @@ +How to Create New File Systems/Partitions in the Terminal on Linux +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-feature-image.png) + +Partition editing or making new file systems on Linux usually means one thing: installing the Gnome Parted partition editor (GParted). For most Linux users, this is the only way to go about it. Still, what if you could edit these partitions and file systems right in the terminal? You can! Here’s how! + +### Creating a basic Linux partition layout with CFdisk ### + +Here’s how to make a basic Linux partition scheme right from the command line. The first thing to do is open your terminal. Once you’re there, you’ll need to identify what hard drive you’re looking to change. This can easily be figured out with one simple command. + + lsblk + +![cfdisk-lsblk](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-lsblk.png) + + +Once you’ve run `lsblk`, you should get a detailed list of each hard drive currently on your system. Look through this generated list, and figure out the denotation to the drive you want to change. In this article I’ll be using `sdb` for the sake of example. + +In your terminal enter this command. It will launch a powerful terminal-based partition editing program. + + sudo cfdisk /dev/sdb + +![cfdisk-empty-layout](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-empty-layout.png) + +**Note**: replace `sdb` with whatever `lsblk` told you your hard drive was. + +When this command is entered, you’ll be inside the partition editor and will have total access to the hard drive you wish to modify. + +Since hard drive partitions are different, depending on a user’s needs, this part of the guide will go over **how to set up a split Linux home/root system layout**. + +To start, a root partition will need to be created. This will require a bit of math as the gigabytes on the hard drive need to be divided up. My test drive is 32 GB. + +In CFdisk using the arrow keys on your keyboard, select some free space. Once you’ve found some, use the arrow key to select [ NEW ] and press the Enter key. + +![cfdisk-create-root-partition](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-create-root-partition.png) + +The program will ask you to input the partition size. Once you’ve specified the size, press the Enter key. This will be known as the root partition (or /dev/sdb1). + +Next it’s time to create the home partition (/dev/sdb2). Once again, you’ll need to select some free space in CFdisk. Use the arrow key to select the [ NEW ] option, and press the Enter key. Input the size of your home partition, and press the Enter key to create it. + +![cfdisk-create-home-partition](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-create-home-partition.png) + +Finally, the swap partition needs to be created. Like the two times before, find some free space, and use the arrow key to select the [ NEW ] option. After that calculate exactly how big your Linux swap partition needs to be. + +**Note**: a swap partition is usually about as big as a computer’s physical RAM. + +![cfdisk-specify-partition-type-swap](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-specify-partition-type-swap.png) + +Now that the swap partition has been created, it’s time to specify its type. Highlight it with the up and down arrow keys. After that use the left and right arrow keys to select [ TYPE ]. Find Linux swap in the menu, and press Enter. + +![cfdisk-write-partition-table](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-write-partition-table.jpg) + +All of the partition creation is out of the way. All that’s left is to write it to the disk. Using the right arrow key, select the [ WRITE ] option, and press the Enter key. This will write your newly created layout directly to the hard drive. + +### Creating file systems with mkfs ### + +Sometimes you don’t need to make an entire partition layout. Sometimes you just need to make a file system. This can easily be accomplished directly in the terminal with the `mkfs` command. + +![cfdisk-mkfs-list-partitions-lsblk](https://www.maketecheasier.com/assets/uploads/2015/10/cfdisk-mkfs-list-partitions-lsblk.png) + +To start, figure out what you’re looking to modify. Enter `lsblk` in your terminal to find out. It’ll print out a list, and after that just find the partition or drive you want to make a file system on. + +In this example, I’ll point it towards the first partition of the secondary drive `/dev/sdb1`. It’s also possible to just point mkfs to `/dev/sdb` (to make use of the entire drive). + +![cfdisk-mkfs-make-file-system-ext4](https://www.maketecheasier.com/assets/uploads/2015/10/cfdisk-mkfs-make-file-system-ext4.png) + +To create the new file system on a specific partition, just enter + + sudo mkfs.ext4 /dev/sdb1 + +into the terminal. It should be noted that `mkfs.ext4` can be changed to whatever file system you want to use. + +### Conclusion ### + +Though editing file systems and partitions is easier using a graphical tool, the terminal is arguably more efficient. It’s much more faster to just load up a terminal, tap a few buttons and be done. With GParted and tools like it, it’s a whole ordeal. I hope that with the help of this tutorial you, too, understand how efficient editing file systems in the terminal can be. + +Do you prefer to use terminal-based programs to edit partitions on Linux? Why or why not? Tell us below! + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/create-file-systems-partitions-terminal-linux/ + +作者:[Derrik Diener][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/derrikdiener/ \ No newline at end of file diff --git a/sources/tech/20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md b/sources/tech/20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md new file mode 100644 index 0000000000..3d898340d8 --- /dev/null +++ b/sources/tech/20151104 How to Install Pure-FTPd with TLS on FreeBSD 10.2.md @@ -0,0 +1,154 @@ +How to Install Pure-FTPd with TLS on FreeBSD 10.2 +================================================================================ +FTP or File Transfer Protocol is application layer standard network protocol used to transfer file from the client to the server, after user logged in to the FTP server over the TCP-Network, such as internet. FTP has been round long time ago, much longer then P2P Program, or World Wide Web, and until this day it was a primary method for sharing file with other over the internet and it it remain very popular even today. FTP provide an secure transmission, that protect username, password and encrypt the content with SSL/TLS. + +Pure-FTPd is free FTP Server with strong and focus on the software security. It was great choice for you if you want to provide a fast, secure, lightweight with feature rich FTP Services. Pure-FTPd can be install on variety of Unix-like operating system, include Linux and FreeBSD. Pure-FTPd is created by Frank Dennis in 2001, based on Troll-FTPd, and until now is actively developed by a team led by Dennis. + +In this tutorial we will provide about installation and configuration of "**Pure-FTPd**" with Unix-like operating system FreeBSD 10.2. + +### Step 1 - Update system ### + +The first thing you must do is to install and update the freebsd repository, please connect to your server with SSH and then type command below as sudo/root : + + freebsd-update fetch + freebsd-update install + +### Step 2 - Install Pure-FTPd ### + +You can install Pure-FTPd from the ports method, but in this tutorial we will install from the freebsd repository with "**pkg**" command. So, now let's install : + + pkg install pure-ftpd + +Once installation is finished, please add pure-ftpd to the start at the boot time with sysrc command below : + + sysrc pureftpd_enable=yes + +### Step 3 - Configure Pure-FTPd ### + +Configuration file for Pure-FTPd is located at directory "/usr/local/etc/", please go to the directory and copy the sample configuration for pure-ftpd to "**pure-ftpd.conf**". + + cd /usr/local/etc/ + cp pure-ftpd.conf.sample pure-ftpd.conf + +Now edit the file configuration with nano editor : + + nano -c pure-ftpd.conf + +Note : -c option to show line number on nano. + +Go to line 59 and change the value of "VerboseLog" to "**yes**". This option is allow you as administrator to see the log all command used by the users. + + VerboseLog yes + +And now look at line 126 "PureDB" for virtual-users configuration. Virtual users is a simple mechanism to store a list of users, with their password, name, uid, directory, etc. It's just like /etc/passwd. But it's not /etc/passwd. It's a different file and only for FTP. In this tutorial we will store the list of user to the file "**/usr/local/etc/pureftpd.passwd**" and "**/usr/local/etc/pureftpd.pdb**". Please uncomment that line and change the path for the file to "/usr/local/etc/pureftpd.pdb". + + PureDB /usr/local/etc/pureftpd.pdb + +Next, uncomment on the line 336 "**CreateHomeDir**", this option make you easy to add the virtual users, allow automatically create home directories if they are missing. + + CreateHomeDir yes + +Save and exit. + +Next, start pure-ftpd with service command : + + service pure-ftpd start + +### Step 4 - Adding New Users ### + +At this step FTP server is started without error, but you can not log in to the FTP Server, because the default configuration of pure-ftpd is disabled for anonymous users. We need to create new users with home directory, and then give it the password for login. + +On thing you must do befere you add new user to pure-ftpd virtual-user is to create a system user for this, lets create new system user "**vftp**" and the default group is same as username, with home directory "**/home/vftp/**". + + pw useradd vftp -s /sbin/nologin -w no -d /home/vftp \ + -c "Virtual User Pure-FTPd" -m + +Now you can add the new user for the FTP Server with "**pure-pw**" command. For an example here, we will create new user named "**akari**", so please see command below : + + pure-pw useradd akari -u vftp -g vftp -d /home/vftp/akari + Password: TYPE YOUR PASSWORD + +that command will create user "**akari**" and the data stored at the file "**/usr/local/etc/pureftpd.passwd**", not at /etc/passwd file, so this means is that you can easily create FTP-only accounts without messing up your system accounts. + +Next, you must generate the PureDB user database with this command : + + pure-pw mkdb + +Now restart the pure-ftpd services and try connect with user "akari" : + + service pure-ftpd restart + +Trying to connect with user akari : + + ftp SERVERIP + +![FTP Connect user akari](http://blog.linoxide.com/wp-content/uploads/2015/10/FTP-Connect-user-akari.png) + +**NOTE :** + +If you want to add new user again, you can use "**pure-pw**" command. And if you want to delete the current user, you can use this : + + pure-pw userdel useryouwanttodelete + pure-pw mkdb + +### Step 5 - Add SSL/TLS to Pure-FTPd ### + +Pure-FTPd supports encryption using TLS security mechanisms. To support for TLS/SSL, make sure the OpenSSL library is already installed on your freebsd system. + +Now you must generate new "**self-signed certificate**" on the directory "**/etc/ssl/private**". Before you generate the certificate, please create new directory there called "private". + + cd /etc/ssl/ + mkdir private + cd private/ + +Now generate "self-signed certificate" with openssl command below : + + openssl req -x509 -nodes -newkey rsa:2048 -sha256 -keyout \ + /etc/ssl/private/pure-ftpd.pem \ + -out /etc/ssl/private/pure-ftpd.pem + +FILL ALL WITH YOUR PERSONAL INFO. + +![Generate Certificate pem](http://blog.linoxide.com/wp-content/uploads/2015/10/Generate-Certificate-pem.png) + +Next, change the certificate permission : + + chmod 600 /etc/ssl/private/*.pem + +Once the certifcate is generated, Edit the pure-ftpd configuration file : + + nano -c /usr/local/etc/pure-ftpd.conf + +Uncomment on line **423** to enable the TLS : + + TLS 1 + +And line **439** for the certificate file path : + + CertFile /etc/ssl/private/pure-ftpd.pem + +Save and exit, then restart the pure-ftpd services : + + service pure-ftpd restart + +Now let's test the Pure-FTPd that work with TLS/SSL. I'm here use "**FileZilla**" to connect to the FTP Server, and use user "**akari**" that have been created. + +![Pure-FTPd with TLS SUpport](http://blog.linoxide.com/wp-content/uploads/2015/10/Pure-FTPd-with-TLS-SUpport.png) + +Pure-FTPd with TLS on FreeBSD 10.2 successfully. + +### Conclusion ### + +FTP or File Transfer Protocol is standart protocol used to transfer file between users and the server. One of the best, lightweight and secure FTP Server Software is Pure-FTPd. It is secure and support for TLS/SSL encryption mechanism. Pure-FTPd is easy to to install and configure, you can manage the user with virtual user support, and it is make you as sysadmin is easy to manage the user if you have a much user ftp server. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-pure-ftpd-tls-freebsd-10-2/ + +作者:[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/20151104 How to Install Redis Server on CentOS 7.md b/sources/tech/20151104 How to Install Redis Server on CentOS 7.md new file mode 100644 index 0000000000..6cb66e4f3e --- /dev/null +++ b/sources/tech/20151104 How to Install Redis Server on CentOS 7.md @@ -0,0 +1,236 @@ +How to Install Redis Server on CentOS 7 +================================================================================ +Hi everyone, today Redis is the subject of our article, we are going to install it on CentOS 7. Build sources files, install the binaries, create and install files. After installing its components, we will set its configuration as well as some operating system parameters to make it more reliable and faster. + +![Runnins Redis](http://blog.linoxide.com/wp-content/uploads/2015/10/run-redis-standalone.jpg) + +Redis server + +Redis is an open source multi-platform data store written in ANSI C, that uses datasets directly from memory achieving extremely high performance. It supports various programming languages, including Lua, C, Java, Python, Perl, PHP and many others. It is based on simplicity, about 30k lines of code that do "few" things, but do them well. Despite you work on memory, persistence may exist and it has a fairly reasonable support for high availability and clustering, which does good in keeping your data safe. + +### Building Redis ### + +There is no official RPM package available, we need to build it from sources, in order to do this you will need install Make and GCC. + +Install GNU Compiler Collection and Make with yum if it is not already installed + + yum install gcc make + +Download the tarball from [redis download page][1]. + + curl http://download.redis.io/releases/redis-3.0.4.tar.gz -o redis-3.0.4.tar.gz + +Extract the tarball contents + + tar zxvf redis-3.0.4.tar.gz + +Enter Redis the directory we have extracted + + cd redis-3.0.4 + +Use Make to build the source files + + make + +### Install ### + +Enter on the src directory + + cd src + +Copy Redis server and client to /usr/local/bin + + cp redis-server redis-cli /usr/local/bin + +Its good also to copy sentinel, benchmark and check as well. + + cp redis-sentinel redis-benchmark redis-check-aof redis-check-dump /usr/local/bin + +Make Redis config directory + + mkdir /etc/redis + +Create a working and data directory under /var/lib/redis + + mkdir -p /var/lib/redis/6379 + +#### System parameters #### + +In order to Redis work correctly you need to set some kernel options + +Set the vm.overcommit_memory to 1, which means always, this will avoid data to be truncated, take a look [here][2] for more. + + sysctl -w vm.overcommit_memory=1 + +Change the maximum of backlog connections some value higher than the value on tcp-backlog option of redis.conf, which defaults to 511. You can find more on sysctl based ip networking "tunning" on [kernel.org][3] website. + + sysctl -w net.core.somaxconn=512. + +Disable transparent huge pages support, that is known to cause latency and memory access issues with Redis. + + echo never > /sys/kernel/mm/transparent_hugepage/enabled + +### redis.conf ### + +Redis.conf is the Redis configuration file, however you will see the file named as 6379.conf here, where the number is the same as the network port is listening to. This name is recommended if you are going to run more than one Redis instance. + +Copy sample redis.conf to **/etc/redis/6379.conf**. + + cp redis.conf /etc/redis/6379.conf + +Now edit the file and set at some of its parameters. + + vi /etc/redis/6379.conf + +#### daemonize #### + +Set daemonize to no, systemd need it to be in foreground, otherwise Redis will suddenly die. + + daemonize no + +#### pidfile #### + +Set the pidfile to redis_6379.pid under /var/run. + + pidfile /var/run/redis_6379.pid + +#### port #### + +Change the network port if you are not going to use the default + + port 6379 + +#### loglevel #### + +Set your loglevel. + + loglevel notice + +#### logfile #### + +Set the logfile to /var/log/redis_6379.log + + logfile /var/log/redis_6379.log + +#### dir #### + +Set the directory to /var/lib/redis/6379 + + dir /var/lib/redis/6379 + +### Security ### + +Here are some actions that you can take to enforce the security. + +#### Unix sockets #### + +In many cases, the client application resides on the same machine as the server, so there is no need to listen do network sockets. If this is the case you may want to use unix sockets instead, for this you need to set the **port** option to 0, and then enable unix sockets with the following options. + +Set the path to the socket file + + unixsocket /tmp/redis.sock + +Set restricted permission to the socket file + + unixsocketperm 700 + +Now, to have access with redis-cli you should use the -s flag pointing to the socket file + + redis-cli -s /tmp/redis.sock + +#### requirepass #### + +You may need remote access, if so, you should use a password, that will be required before any operation. + + requirepass "bTFBx1NYYWRMTUEyNHhsCg" + +#### rename-command #### + +Imagine the output of the next command. Yes, it will dump the configuration of the server, so you should deny access to this kind information whenever is possible. + + CONFIG GET * + +To restrict, or even disable this and other commands by using the **rename-command**. You must provide a command name and a replacement. To disable, set the replacement string to "" (blank), this is more secure as it will prevent someone from guessing the command name. + + rename-command FLUSHDB "FLUSHDB_MY_SALT_G0ES_HERE09u09u" + rename-command FLUSHALL "" + rename-command CONFIG "CONFIG_MY_S4LT_GO3S_HERE09u09u" + +![Access Redis through unix with password and command changes](http://blog.linoxide.com/wp-content/uploads/2015/10/redis-security-test.jpg) + +Access through unix sockets with password and command changes + +#### Snapshots #### + +By default Redis will periodically dump its datasets to **dump.rdb** on the data directory we set. You can configure how often the rdb file will be updated by the save command, the first parameter is a timeframe in seconds and the second is a number of changes performed on the data file. + +Every 15 hours if there was at least 1 key change + + save 900 1 + +Every 5 hours if there was at least 10 key changes + + save 300 10 + +Every minute if there was at least 10000 key changes + + save 60 10000 + +The **/var/lib/redis/6379/dump.rdb** file contains a dump of the dataset on memory since last save. Since it creates a temporary file and then replace the original file, there is no problem of corruption and you can always copy it directly without fear. + +### Starting at boot ### + +You may use systemd to add Redis to the system startup + +Copy sample init_script to /etc/init.d, note also the number of the port on the script name + + cp utils/redis_init_script /etc/init.d/redis_6379 + +We are going to use systemd, so create a unit file named redis_6379.service under **/etc/systems/system** + + vi /etc/systemd/system/redis_6379.service + +Put this content, try man systemd.service for details + + [Unit] + Description=Redis on port 6379 + + [Service] + Type=forking + ExecStart=/etc/init.d/redis_6379 start + ExecStop=/etc/init.d/redis_6379 stop + + [Install] + WantedBy=multi-user.target + +Now add the memory overcommit and maximum backlog options we have set before to the **/etc/sysctl.conf** file. + + vm.overcommit_memory = 1 + + net.core.somaxconn=512 + +For the transparent huge pages support there is no sysctl directive, so you can put the command at the end of /etc/rc.local + + echo never > /sys/kernel/mm/transparent_hugepage/enabled + +### Conclusion ### + +That's enough to start, with these settings you will be able to deploy Redis server for many simpler scenarios, however there is many options on redis.conf for more complex environments. On some cases, you may use [replication][4] and [Sentinel][5] to provide high availability, [split the data][6] across servers, create a cluster of servers. Thanks for reading! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/storage/install-redis-server-centos-7/ + +作者:[Carlos Alberto][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/carlosal/ +[1]:http://redis.io/download +[2]:https://www.kernel.org/doc/Documentation/vm/overcommit-accounting +[3]:https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt +[4]:http://redis.io/topics/replication +[5]:http://redis.io/topics/sentinel +[6]:http://redis.io/topics/partitioning \ No newline at end of file diff --git a/sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md b/sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md new file mode 100644 index 0000000000..83fc1c3f30 --- /dev/null +++ b/sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md @@ -0,0 +1,122 @@ +How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04 +================================================================================ +Hello and welcome to our today's article on SQLite which is the most widely deployed SQL database engine in the world that comes with zero-configuration, that means no setup or administration needed. SQLite is public-domain software package that provides relational database management system, or RDBMS that is used to store user-defined records in large tables. In addition to data storage and management, database engine process complex query commands that combine data from multiple tables to generate reports and data summaries. + +SQLite is very small and light weight that does not require a separate server process or system to operate. It is available on UNIX, Linux, Mac OS-X, Android, iOS and Windows which is being used in various software applications like Opera, Ruby On Rails, Adobe System, Mozilla Firefox, Google Chrome and Skype. + +### 1) Basic Requirements: ### + +There is are no such complex complex requirements for the installation of SQLite as it mostly comes support all major cross platforms. + +So, let's login to your Ubuntu server with sudo or root credentials using your CLI or Secure Shell. Then update your system so that your operating system is upto date with latest packages. + +In ubuntu, the below command is to be used for system update. + + # apt-get update + +If you are starting to deploy SQLite on on a fresh Ubuntu, then make sure that you have installed some basic system management utilities like wget, make, unzip, gcc. + +To install wget, make and gcc packages on ubuntu, you use the below command, then press "Y" to allow and proceed with installation of these packages. + + # apt-get install wget make gcc + +### 2) Download SQLite ### + +To download the latest package of SQLite, you can refer to their official [SQLite Download Page][1] as shown below. + +![SQLite download](http://blog.linoxide.com/wp-content/uploads/2015/10/Selection_014.png) + +You can copy the link of its resource package and download it on ubuntu server using the wget utility command. + + # wget https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz + +![wget SQLite](http://blog.linoxide.com/wp-content/uploads/2015/10/23.png) + +After downloading is complete, extract the package and change your current directory to the extracted SQLite folder by using the below command as shown. + + # tar -zxvf sqlite-autoconf-3090100.tar.gz + +### 3) Installing SQLite ### + +Now we are going to install and configure the SQLite package that we downloaded. So, to compile and install SQLite on ubuntu run the configuration script within the same directory where your have extracted the SQLite package as shown below. + + root@ubuntu-15:~/sqlite-autoconf-3090100# ./configure –prefix=/usr/local + +![SQLite Installation](http://blog.linoxide.com/wp-content/uploads/2015/10/35.png) + +Once the package is configuration is done under the mentioned prefix, then run the below command make command to compile the package. + + root@ubuntu-15:~/sqlite-autoconf-3090100# make + source='sqlite3.c' object='sqlite3.lo' libtool=yes \ + DEPDIR=.deps depmode=none /bin/bash ./depcomp \ + /bin/bash ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.9.1\" -DPACKAGE_STRING=\"sqlite\ 3.9.1\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.9.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_POSIX_FALLOCATE=1 -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -c -o sqlite3.lo sqlite3.c + +After running make command, to complete the installation of SQLite on ubuntu run the 'make install' command as shown below. + + # make install + +![SQLite Make Install](http://blog.linoxide.com/wp-content/uploads/2015/10/44.png) + +### 4) Testing SQLite Installation ### + +To confirm the successful installation of SQLite 3.9, run the below command in your command line interface. + + # sqlite3 + +You will the SQLite verion after running the above command as shown. + +![Testing SQLite Installation](http://blog.linoxide.com/wp-content/uploads/2015/10/53.png) + +### 5) Using SQLite ### + +SQLite is very handy to use. To get the detailed information about its usage, simply run the below command in the SQLite console. + + sqlite> .help + +So here is the list of all its available commands, with their description that you can get help to start using SQLite. + +![SQLite Help](http://blog.linoxide.com/wp-content/uploads/2015/10/62.png) + +Now in this last section , we make use of few SQLite commands to create a new database using the SQLite3 command line interface. + +To to create a new database run the below command. + + # sqlite3 test.db + +To create a table within the new database run the below command. + + sqlite> create table memos(text, priority INTEGER); + +After creating the table, insert some data using the following commands. + + sqlite> insert into memos values('deliver project description', 15); + sqlite> insert into memos values('writing new artilces', 100); + +To view the inserted data from the table , run the below command. + + sqlite> select * from memos; + deliver project description|15 + writing new artilces|100 + +to exit from the sqlite3 type the below command. + + sqlite> .exit + +![Using SQLite3](http://blog.linoxide.com/wp-content/uploads/2015/10/73.png) + +### Conclusion ### + +In this article you learned the installation of latest version of SQLite 3.9.1 which enables the recently JSON1 support in its 3.9.0 version and so on. Its is an amazing library that gets embedded inside the application that makes use of it to keep the resources much efficient and lighter. We hope you find this article much helpful, feel free to get back to us if you find any difficulty. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-sqlite-json-ubuntu-15-04/ + +作者:[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/ +[1]:https://www.sqlite.org/download.html \ No newline at end of file diff --git a/sources/tech/20151104 How to Setup Pfsense Firewall and Basic Configuration.md b/sources/tech/20151104 How to Setup Pfsense Firewall and Basic Configuration.md new file mode 100644 index 0000000000..821937390a --- /dev/null +++ b/sources/tech/20151104 How to Setup Pfsense Firewall and Basic Configuration.md @@ -0,0 +1,266 @@ +How to Setup Pfsense Firewall and Basic Configuration +================================================================================ +In this article our focus is Pfsense setup, basic configuration and overview of features available in the security distribution of FreeBSD. In this tutorial we will run network wizard for basic setting of firewall and detailed overview of services. After the [installation process][1] following snapshot shows the IP addresses of WAN/LAN and different options for the management of Pfsense firewall. + +![options](http://blog.linoxide.com/wp-content/uploads/2015/08/options.png) + +After setup , following window appear which shows the url for configuration of Pfsense. + +![URL for gui](http://blog.linoxide.com/wp-content/uploads/2015/08/login_pfsense.png) + +Open above given URL in the browser and login with username **admin** and password **pfsense** + +![login_username_password](http://blog.linoxide.com/wp-content/uploads/2015/08/login_username_password.png) + +After successful login, following wizard appears for the basic setting of Pfsense firewall. However setup wizard option can be bypassed and user can run it from the **System** menu from the web interface. + +Click on the **Next** button to start basic configuration process on Pfsense firewall. + +![wizard_start](http://blog.linoxide.com/wp-content/uploads/2015/08/wizard_start.png) + +Setting hostname, domain and DNS addresses is shown in the following figure. + +![basic_setting_wizard](http://blog.linoxide.com/wp-content/uploads/2015/08/basic_setting_wizard.png) + +Setting time zone is shown in the below given snapshot. + +![time_setting](http://blog.linoxide.com/wp-content/uploads/2015/08/time_setting.png) + +Next window shows setting for the WAN interface. By defaults Pfsense firewall block bogus and private networks. + +![wan setting](http://blog.linoxide.com/wp-content/uploads/2015/08/wan-setting.png) + +Setting LAN IP address which is used to access the Pfsense web interface for further configuration. + +![lan setting](http://blog.linoxide.com/wp-content/uploads/2015/08/lan-setting.png) + +By default password for web interface is "pfsense". Enter new password for admin user on the following window to access the web interface for further configuration. + +![password](http://blog.linoxide.com/wp-content/uploads/2015/08/password.png) + +Click on the "reload" button which is shown below. It applies the setting and redirect firewall user to main dashboard of Pfsense. + +![)reload](http://blog.linoxide.com/wp-content/uploads/2015/08/reload.png + +As shown in the following snapshot, Pfsense dashboard shows system information (such as cpu details, os version, dns detail, memory consumption) and status of ethernet/wireless interfaces etc. + +![dashboard](http://blog.linoxide.com/wp-content/uploads/2015/08/dashboard1.png) + +### Menu detail ### + +PFsense consist of System, interfaces, firewall,services,vpn,status,diagnostics and help menus. + +![all menu](http://blog.linoxide.com/wp-content/uploads/2015/10/all-menu.png) + +### System Menu ### + +Sub menus of **System** is given below. + +![system menu](http://blog.linoxide.com/wp-content/uploads/2015/08/system-menu.png) + +In the **Advanced** sub menu user can perform following operations. + +1. Configuration of web interface +1. Firewall/Nat setting +1. Networking setting +1. System tuneables setting +1. Notification setting + +![advanced-systemmenu](http://blog.linoxide.com/wp-content/uploads/2015/10/advanced-systemmenu.png) + +In the **Cert manager** sub menu, firewall administrator generates certificates for CA and users. + +![cert-manager-systemmenu](http://blog.linoxide.com/wp-content/uploads/2015/10/cert-manager-systemmenu.png) + +In the **Firmware** sub menu, user can update Pfsense firmware manually/automatically. User can take full backup of Pfsense configurations. + +![firmware-systemmenu](http://blog.linoxide.com/wp-content/uploads/2015/10/firmware-systemmenu.png) + +In the **General Setup** sub menu, user can change basic setting such as hostname and domain etc. + +![general setup-systemmenu](http://blog.linoxide.com/wp-content/uploads/2015/10/general-setup-systemmenu.png) + +As menu title indicates, user can enable/disable high availability feature from this sub menu. + +![highavail-systemmenu](http://blog.linoxide.com/wp-content/uploads/2015/10/highavail-systemmenu.png) + +Packages sub menu provides package manager facility in the web interface for Pfsense . + +![packages-system menu](http://blog.linoxide.com/wp-content/uploads/2015/10/packages-systemmenu.png) + +User can perform gateway and route management using **Routing** sub menu. + +![routing-system menu](http://blog.linoxide.com/wp-content/uploads/2015/10/routing-systemmenu.png) + +**Setup Wizard** sub menu opens following window which start basic configuration of Pfsense. + +![wizard_start](http://blog.linoxide.com/wp-content/uploads/2015/10/wizard_start.png) + +Management of user can be done from the **User manager** sub menu. + +![usermanager-system](http://blog.linoxide.com/wp-content/uploads/2015/10/usermanager-system.png) + +### Interfaces Menu ### + +This menu is used for the assignment of interfaces (LAN/WAN), VLAN setting,wireless and GRE configuration etc. + +![Interfaces setting](http://blog.linoxide.com/wp-content/uploads/2015/10/interfaces-setting.png) + +### Firewall Menu ### + +Firewall is the main and core part of Pfsense distribution and it provides following features. + +![firewall-menu](http://blog.linoxide.com/wp-content/uploads/2015/10/firewall-systemmenu.png) + +**Aliases** + +Aliases are defined for real hosts, networks or ports and they can be used to minimize the number of changes. + +![firewall-aliases](http://blog.linoxide.com/wp-content/uploads/2015/10/firewall-aliases.png) + +**NAT (Network Address Translation)** + +NAT binds a specific internal address to a specific external address. Incoming traffic from the Internet to the specified IP will be directed toward the associated internal IP. + +![firewall-nat](http://blog.linoxide.com/wp-content/uploads/2015/10/firewall-nat.png) + +**Firewall Rules** + +Firewall rules control what traffic is allowed to enter an interface on the firewall. After traffic is passed on the interface, it enters an entry in the state table is created. + +![firewall-rules](http://blog.linoxide.com/wp-content/uploads/2015/10/firewall-rules.png) + +**Schedules** + +Firewall rules can be scheduled so that they are only active at certain times of day or on certain specific days or days of the week. + +![firewall-schedules](http://blog.linoxide.com/wp-content/uploads/2015/10/firewall-schedules.png) + +**Traffic Shaper** + +Traffic shaping is the control of computer network traffic in order to optimize performance and lower latency. + +![firewall-traffic shapper](http://blog.linoxide.com/wp-content/uploads/2015/10/firewall-traffic-shapper.png) + +**Virtual IPs** + +Virtual IPs add knowledge of additional IP addresses to the firewall that are different from the firewall's real interface addresses. + +![firewall-virtualipaddresses](http://blog.linoxide.com/wp-content/uploads/2015/10/services-menu.png) + +### Services Menu ### + +Services menu shows services which are provided by the Pfsense distribution along firewall. + +![services-menu](http://blog.linoxide.com/wp-content/uploads/2015/10/services-menu.png) + +New program/software installed for some specific service is also shown in this menu such as snort. By default following services are listed in services menu. + +**Captive portal** + +The captive portal functionality in Pfsense allows securing a network by requiring a username and password entered on a portal page. + +![services-captive portal](http://blog.linoxide.com/wp-content/uploads/2015/10/services-captive-portal.png) + +**DHCP Relay** + +The DHCP Relay daemon will relay DHCP requests between broadcast domains for IPv4 DHCP. + +![services-dhcp relay](http://blog.linoxide.com/wp-content/uploads/2015/10/services-dhcp-relay.png) + +**DHCP Server** + +User can run DHCP service on the firewall for the network devices. + +![services-dhcp server](http://blog.linoxide.com/wp-content/uploads/2015/10/services-dhcp-server.png) + +**DNS Forwarder/Resolver/Dynamic DNS** + +DNS different services can be configured on the Pfsense firewall. + +![services-dynamic dns client](http://blog.linoxide.com/wp-content/uploads/2015/10/services-dynamic-dns-client.png) + +![services-dns resolver](http://blog.linoxide.com/wp-content/uploads/2015/10/services-dns-resolver.png) + +![services-dns forwarder](http://blog.linoxide.com/wp-content/uploads/2015/10/services-dns-forwarder.png) + +**IGMP Proxy** + +User can configure IGMP on the Pfsense firewall from services menu. + +![services igmp](http://blog.linoxide.com/wp-content/uploads/2015/10/services-igmp.png) + +**Load Balancer** + +Load Balancing is one of the important feature which is also supported by the Pfsense firewall. + +![services load balancer](http://blog.linoxide.com/wp-content/uploads/2015/10/services-load-balancer.png) + +**SNMP (Simple Network Management Protocol)** + +Pfsense supports all versions of snmp for remote management of firewall. + +![services snmp](http://blog.linoxide.com/wp-content/uploads/2015/10/services-snmp.png) + +**Wake on Lan** + +Using this feature packet sent to a workstation on a locally connected network which will power on a workstation. + +![services-wake on lan](http://blog.linoxide.com/wp-content/uploads/2015/10/services-wake-on-lan.png) + +### VPN Menu ### + +It is one of the most important feature of Pfsense. Its supports following types of vpn configuration. + +**VPN IPsec** + +IPsec is a standard for providing security to IP protocols via encryption and/or authentication. + +![vpn-ipsec](http://blog.linoxide.com/wp-content/uploads/2015/10/vpn-ipsec.png) + +**L2TP IPsec** + +L2TP/IPsec is a common VPN type that wraps L2TP, an insecure tunneling protocol, inside a secure channel built using transport mode IPsec. + +![vpn- l2tp](http://blog.linoxide.com/wp-content/uploads/2015/10/vpn-l2tp.png) + +**OpenVPN** + +OpenVPN is an Open Source VPN server and client that is supported on pfSense. + +![vpn openvpn](http://blog.linoxide.com/wp-content/uploads/2015/10/vpn-openvpn.png) + +**Status Menu** + +It shows the status of services provided by Pfsense such as dhcp server, ipsec and load balancer etc. + +![status-menu](http://blog.linoxide.com/wp-content/uploads/2015/10/status-menu.png) + +**Diagnostic Menu** + +This menu helps administrator/user for the rectification of Pfsense issues or problems. + +![diagnosics menu](http://blog.linoxide.com/wp-content/uploads/2015/10/diagnosics-menu.png) + +**Help Menu** + +This menu provides links for different useful resources such as FreeBSD handbook,developer wiki, paid support and pfsense book. + +![help menu](http://blog.linoxide.com/wp-content/uploads/2015/10/help-menu.png) + +### Conclusion ### + +In this article our focus was on the basic configuration and features set of Pfsense distribution. It is based on FreeBSD distribution and widely used due to security and stability features. In our future articles on Pfsense, our focus will be on the basic firewall rules setting, snort (IDS/IPS) and IPSEC VPN configuration. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/firewall/pfsense-setup-basic-configuration/ + +作者:[nido][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/naveeda/ +[1]:http://linoxide.com/firewall/install-pfsense-firewall/ \ No newline at end of file diff --git a/sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md b/sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md new file mode 100644 index 0000000000..8977e0a420 --- /dev/null +++ b/sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md @@ -0,0 +1,84 @@ +How to Manage Your To-Do Lists in Ubuntu Using Go For It Application +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-featured1.jpg) + +Task management is arguably one of the most important and challenging part of professional as well as personal life. Professionally, as you assume more and more responsibility, your performance is directly related to or affected with your ability to manage the tasks you’re assigned. + +If your job involves working on a computer, then you’ll be happy to know that there are various applications available that claim to make task management easy for you. While most of them cater to Windows users, there are many options available on Linux, too. In this article we will discuss one such application: Go For It. + +### Go For It ### + +[Go For It][1] (GFI) is developed by Manuel Kehl, who describes it as a “a simple and stylish productivity app, featuring a to-do list, merged with a timer that keeps your focus on the current task.” The timer feature, specifically, is interesting, as it also makes sure that you take a break from your current task and relax for sometime before proceeding further. + +### Download and Installation ### + +Users of Debian-based systems, like Ubuntu, can easily install the app by running the following commands in terminal: + + sudo add-apt-repository ppa:mank319/go-for-it + sudo apt-get update + sudo apt-get install go-for-it + +Once done, you can execute the application by running the following command: + + go-for-it + +### Usage and Configuration ### + +Here is how the GFI interface looks when you run the app for the very first time: + +![gfi-first-run](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-first-run1.png) + +As you can see, the interface consists of three tabs: To-Do, Timer, and Done. While the To-Do tab contains a list of tasks (the 4 tasks shown in the image above are there by default – you can delete them by clicking on the rectangular box in front of them), the Timer tab contains task timer, while Done contains a list of tasks that you’ve finished successfully. Right at the bottom is a text box where you can enter the task text and click “+” to add it to the list above. + +For example, I added a task named “MTE-research-work” to the list and selected it by clicking on it in the list – see the screenshot below: + +![gfi-task-added](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-task-added1.png) + +Then I selected the Timer tab. Here I could see a 25-minute timer for the active task which was “MTE-reaserch-work.” + +![gfi-active-task-timer](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-active-task-timer.png) + +Of course, you can change the timer value and set to any time you want. I, however, didn’t change the value and clicked the Start button present below to start the task timer. Once 60 seconds were left, GFI issued a notification indicating the same. + +![gfi-first-notification-new](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-first-notification-new.jpg) + +And once the time was up, I was asked to take a break of five minutes. + +![gfi-time-up-notification-new](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-time-up-notification-new.jpg) + +Once those five minutes were over, I could again start the task timer for my task. + +![gfi-break-time-up-new](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-break-time-up-new.jpg) + +When you’re done with your task, you can click the Done button in the Timer tab. The task is then removed from the To-Do tab and listed in the Done tab. + +![gfi-task-done](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-task-done1.png) + +GFI also allows you to tweak some of its settings. For example, the settings window shown below contains options to tweak the default task duration, break duration, and reminder time. + +![gfi-settings](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-settings1.png) + +It’s worth mentioning that GFI stores the to-do lists in the Todo.txt format which simplifies synchronization with mobile devices and makes it possible for you to edit tasks using other frontends – read more about it [here][2]. + +You can also see the GFI app in action in the video below. + +注:youtube 视频 + + +### Conclusion ### + +As you have observed, GFI is an easy to understand and simple to use task management application. Although it doesn’t offer a plethora of features, it does what it claims – the timer integration is especially useful. If you’re looking for a basic, open-source task management tool for Linux, Go For It is worth trying. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/to-do-lists-ubuntu-go-for-it/ + +作者:[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]:http://manuel-kehl.de/projects/go-for-it/ +[2]:http://todotxt.com/ \ No newline at end of file From 80c70c80b834bd13bcf632bd30b394731cd6cb33 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Thu, 5 Nov 2015 12:18:23 +0800 Subject: [PATCH 2395/2517] Update 20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md --- ... New File Systems or Partitions in the Terminal on Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md b/sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md index 0f7c1d699e..2bbe94a773 100644 --- a/sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md +++ b/sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md @@ -1,3 +1,4 @@ +translation by strugglingyouth How to Create New File Systems/Partitions in the Terminal on Linux ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-feature-image.png) @@ -85,4 +86,4 @@ via: https://www.maketecheasier.com/create-file-systems-partitions-terminal-linu 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:https://www.maketecheasier.com/author/derrikdiener/ \ No newline at end of file +[a]:https://www.maketecheasier.com/author/derrikdiener/ From 8914bee01ce39f6a912ab773cf384fb16bc5a9f7 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 5 Nov 2015 12:56:41 +0800 Subject: [PATCH 2396/2517] PUB:Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7 @ictlyh --- ...ate and Import Into Database) in RHEL 7.md | 59 +++++++++---------- 1 file changed, 28 insertions(+), 31 deletions(-) rename {translated/tech => published}/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md (73%) diff --git a/translated/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md b/published/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md similarity index 73% rename from translated/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md rename to published/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md index a37c9610fd..ab4ddd5a32 100644 --- a/translated/tech/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md +++ b/published/RHCE/Part 5 - How to Manage System Logs (Configure, Rotate and Import Into Database) in RHEL 7.md @@ -1,26 +1,24 @@ -第五部分 - 如何在 RHEL 7 中管理系统日志(配置、旋转以及导入到数据库) +RHCE 系列(五):如何在 RHEL 7 中管理系统日志(配置、轮换以及导入到数据库) ================================================================================ -为了确保你的 RHEL 7 系统安全,你需要通过查看日志文件监控系统中发生的所有活动。这样,你就可以检测任何不正常或有潜在破坏的活动并进行系统故障排除或者其它恰当的操作。 +为了确保你的 RHEL 7 系统安全,你需要通过查看日志文件来监控系统中发生的所有活动。这样,你就可以检测到任何不正常或有潜在破坏的活动并进行系统故障排除或者其它恰当的操作。 -![Linux 中使用 Rsyslog 和 Logrotate 旋转日志文件](http://www.tecmint.com/wp-content/uploads/2015/08/Manage-and-Rotate-Linux-Logs-Using-Rsyslog-Logrotate.jpg) +![Linux 中使用 Rsyslog 和 Logrotate 轮换日志文件](http://www.tecmint.com/wp-content/uploads/2015/08/Manage-and-Rotate-Linux-Logs-Using-Rsyslog-Logrotate.jpg) -(译者注:[日志旋转][9]是系统管理中归档每天产生的日志文件的自动化过程) - -RHCE 考试 - 第五部分:使用 Rsyslog 和 Logrotate 管理系统日志 +*RHCE 考试 - 第五部分:使用 Rsyslog 和 Logrotate 管理系统日志* 在 RHEL 7 中,[rsyslogd][1] 守护进程负责系统日志,它从 /etc/rsyslog.conf(该文件指定所有系统日志的默认路径)和 /etc/rsyslog.d 中的所有文件(如果有的话)读取配置信息。 ### Rsyslogd 配置 ### -快速浏览一下 [rsyslog.conf][2] 会是一个好的开端。该文件分为 3 个主要部分:模块(rsyslong 按照模块化设计),全局指令(用于设置 rsyslogd 守护进程的全局属性),以及规则。正如你可能猜想的,最后一个部分指示获取,显示以及在哪里保存什么的日志(也称为选择子),这也是这篇博文关注的重点。 +快速浏览一下 [rsyslog.conf][2] 会是一个好的开端。该文件分为 3 个主要部分:模块(rsyslong 按照模块化设计),全局指令(用于设置 rsyslogd 守护进程的全局属性),以及规则。正如你可能猜想的,最后一个部分指示记录或显示什么以及在哪里保存(也称为选择子(selector)),这也是这篇文章关注的重点。 rsyslog.conf 中典型的一行如下所示: ![Rsyslogd 配置](http://www.tecmint.com/wp-content/uploads/2015/08/Rsyslogd-Configuration.png) -Rsyslogd 配置 +*Rsyslogd 配置* -在上面的图片中,我们可以看到一个选择子包括了一个或多个用分号分隔的设备:优先级(Facility:Priority)对,其中设备描述了消息类型(参考 [RFC 3164 4.1.1 章节][3] 查看 rsyslog 可用的完整设备列表),优先级指示它的严重性,这可能是以下几种之一: +在上面的图片中,我们可以看到一个选择子包括了一个或多个用分号分隔的“设备:优先级”(Facility:Priority)对,其中设备描述了消息类型(参考 [RFC 3164 4.1.1 章节][3],查看 rsyslog 可用的完整设备列表),优先级指示它的严重性,这可能是以下几种之一: - debug - info @@ -31,7 +29,7 @@ Rsyslogd 配置 - alert - emerg -尽管自身并不是一个优先级,关键字 none 意味着指定设备没有任何优先级。 +尽管 none 并不是一个优先级,不过它意味着指定设备没有任何优先级。 **注意**:给定一个优先级表示该优先级以及之上的消息都应该记录到日志中。因此,上面例子中的行指示 rsyslogd 守护进程记录所有优先级为 info 以及以上(不管是什么设备)的除了属于 mail、authpriv、以及 cron 服务(不考虑来自这些设备的消息)的消息到 /var/log/messages。 @@ -47,7 +45,7 @@ Rsyslogd 配置 #### 创建自定义日志文件 #### -要把所有的守护进程消息记录到 /var/log/tecmint.log,我们需要在 rsyslog.conf 或者 /etc/rsyslog.d 目录中的单独文件(易于管理)添加下面一行: +要把所有的守护进程消息记录到 /var/log/tecmint.log,我们需要在 rsyslog.conf 或者 /etc/rsyslog.d 目录中的单独文件(这样易于管理)添加下面一行: daemon.* /var/log/tecmint.log @@ -55,19 +53,19 @@ Rsyslogd 配置 # systemctl restart rsyslog -在随机重启两个守护进程之前和之后查看自定义日志的内容: +在随便重启两个守护进程之前和之后查看下自定义日志的内容: ![Linux 创建自定义日志文件](http://www.tecmint.com/wp-content/uploads/2015/08/Create-Custom-Log-File.png) -创建自定义日志文件 +*创建自定义日志文件* 作为一个自学练习,我建议你重点关注设备和优先级,添加额外的消息到已有的日志文件或者像上面那样创建一个新的日志文件。 -### 使用 Logrotate 旋转日志 ### +### 使用 Logrotate 轮换日志 ### -为了防止日志文件无限制增长,logrotate 工具用于旋转、压缩、移除或者通过电子邮件发送日志,从而减轻管理会产生大量日志文件系统的困难。 +为了防止日志文件无限制增长,logrotate 工具用于轮换、压缩、移除或者通过电子邮件发送日志,从而减轻管理会产生大量日志文件系统的困难。(译者注:[日志轮换][9](rotate)是系统管理中归档每天产生的日志文件的自动化过程) -Logrotate 作为一个 cron 作业(/etc/cron.daily/logrotate)每天运行,并从 /etc/logrotate.conf 和 /etc/logrotate.d 中的文件(如果有的话)读取配置信息。 +Logrotate 作为一个 cron 任务(/etc/cron.daily/logrotate)每天运行,并从 /etc/logrotate.conf 和 /etc/logrotate.d 中的文件(如果有的话)读取配置信息。 对于 rsyslog,即使你可以在主文件中为指定服务包含设置,为每个服务创建单独的配置文件能帮助你更好地组织设置。 @@ -75,27 +73,27 @@ Logrotate 作为一个 cron 作业(/etc/cron.daily/logrotate)每天运行, ![Logrotate 配置](http://www.tecmint.com/wp-content/uploads/2015/08/Logrotate-Configuration.png) -Logrotate 配置 +*Logrotate 配置* -在上面的例子中,logrotate 会为 /var/log/wtmp 进行以下操作:尝试每个月旋转一次,但至少文件要大于 1MB,然后用 0664 权限、用户 root、组 utmp 创建一个新的日志文件。下一步只保存一个归档日志,正如旋转指令指定的: +在上面的例子中,logrotate 会为 /var/log/wtmp 进行以下操作:尝试每个月轮换一次,但至少文件要大于 1MB,然后用 0664 权限、用户 root、组 utmp 创建一个新的日志文件。下一步只保存一个归档日志,正如轮换指令指定的: ![每月 Logrotate 日志](http://www.tecmint.com/wp-content/uploads/2015/08/Logrotate-Logs-Monthly.png) -每月 Logrotate 日志 +*每月 Logrotate 日志* 让我们再来看看 /etc/logrotate.d/httpd 中的另一个例子: -![旋转 Apache 日志文件](http://www.tecmint.com/wp-content/uploads/2015/08/Rotate-Apache-Log-Files.png) +![轮换 Apache 日志文件](http://www.tecmint.com/wp-content/uploads/2015/08/Rotate-Apache-Log-Files.png) -旋转 Apache 日志文件 +*轮换 Apache 日志文件* 你可以在 logrotate 的 man 手册([man logrotate][4] 和 [man logrotate.conf][5])中阅读更多有关它的设置。为了方便你的阅读,本文还提供了两篇文章的 PDF 格式。 -作为一个系统工程师,很可能由你决定多久按照什么格式保存一次日志,取决于你是否有一个单独的分区/逻辑卷给 /var。否则,你真的要考虑删除旧日志以节省存储空间。另一方面,根据你公司和客户内部的政策,为了以后的安全审核,你可能被迫要保留多个日志。 +作为一个系统工程师,很可能由你决定多久按照什么格式保存一次日志,这取决于你是否有一个单独的分区/逻辑卷给 `/var`。否则,你真的要考虑删除旧日志以节省存储空间。另一方面,根据你公司和客户内部的政策,为了以后的安全审核,你可能必须要保留多个日志。 #### 保存日志到数据库 #### -当然检查日志可能是一个很繁琐的工作(即使有类似 grep 工具和正则表达式的帮助)。因为这个原因,rsyslog 允许我们把它们导出到数据库(OTB 支持的关系数据库管理系统包括 MySQL、MariaDB、PostgreSQL 和 Oracle)。 +当然检查日志可能是一个很繁琐的工作(即使有类似 grep 工具和正则表达式的帮助)。因为这个原因,rsyslog 允许我们把它们导出到数据库(OTB 支持的关系数据库管理系统包括 MySQL、MariaDB、PostgreSQL 和 Oracle 等)。 指南的这部分假设你已经在要管理日志的 RHEL 7 上安装了 MariaDB 服务器和客户端: @@ -104,10 +102,9 @@ Logrotate 配置 然后使用 `mysql_secure_installation` 工具为 root 用户设置密码以及其它安全考量: - ![保证 MySQL 数据库安全](http://www.tecmint.com/wp-content/uploads/2015/08/Secure-MySQL-Database.png) -保证 MySQL 数据库安全 +*保证 MySQL 数据库安全* 注意:如果你不想用 MariaDB root 用户插入日志消息到数据库,你也可以配置用另一个用户账户。如何实现的介绍已经超出了本文的范围,但在 [MariaDB 知识][6] 中有详细解析。为了简单在这篇指南中我们会使用 root 账户。 @@ -117,7 +114,7 @@ Logrotate 配置 ![保存服务器日志到数据库](http://www.tecmint.com/wp-content/uploads/2015/08/Save-Server-Logs-to-Database.png) -保存服务器日志到数据库 +*保存服务器日志到数据库* 最后,添加下面的行到 /etc/rsyslog.conf: @@ -132,18 +129,18 @@ Logrotate 配置 #### 使用 SQL 语法查询日志 #### -现在执行一些会改变日志的操作(例如停止和启动服务),然后登陆到你的 DB 服务器并使用标准的 SQL 命令显示和查询日志: +现在执行一些会改变日志的操作(例如停止和启动服务),然后登录到你的数据库服务器并使用标准的 SQL 命令显示和查询日志: USE Syslog; SELECT ReceivedAt, Message FROM SystemEvents; ![在数据库中查询日志](http://www.tecmint.com/wp-content/uploads/2015/08/Query-Logs-in-Database.png) -在数据库中查询日志 +*在数据库中查询日志* ### 总结 ### -在这篇文章中我们介绍了如何设置系统日志,如果旋转日志以及为了简化查询如何重定向消息到数据库。我们希望这些技巧能对你准备 [RHCE 考试][8] 和日常工作有所帮助。 +在这篇文章中我们介绍了如何设置系统日志,如果轮换日志以及为了简化查询如何重定向消息到数据库。我们希望这些技巧能对你准备 [RHCE 考试][8] 和日常工作有所帮助。 正如往常,非常欢迎你的反馈。用下面的表单和我们联系吧。 @@ -153,7 +150,7 @@ via: http://www.tecmint.com/manage-linux-system-logs-using-rsyslogd-and-logrotat 作者:[Gabriel Cánepa][a] 译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -165,5 +162,5 @@ via: http://www.tecmint.com/manage-linux-system-logs-using-rsyslogd-and-logrotat [5]:http://www.tecmint.com/wp-content/pdf/logrotate.conf.pdf [6]:https://mariadb.com/kb/en/mariadb/create-user/ [7]:https://github.com/sematext/rsyslog/blob/master/plugins/ommysql/createDB.sql -[8]:http://www.tecmint.com/how-to-setup-and-configure-static-network-routing-in-rhel/ +[8]:https://linux.cn/article-6451-1.html [9]:https://en.wikipedia.org/wiki/Log_rotation \ No newline at end of file From ebbacee464be1b5801e80c9fc37bde7b5e646abc Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 5 Nov 2015 13:38:25 +0800 Subject: [PATCH 2397/2517] =?UTF-8?q?20151105-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ware Centre To Be Replaced in 16.04 LTS.md | 56 +++++ ...b Delivery with these Open Source Tools.md | 195 ++++++++++++++++++ 2 files changed, 251 insertions(+) create mode 100644 sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md create mode 100644 sources/share/20151104 Optimize Web Delivery with these Open Source Tools.md diff --git a/sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md b/sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md new file mode 100644 index 0000000000..0e689ede9e --- /dev/null +++ b/sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md @@ -0,0 +1,56 @@ +Ubuntu Software Centre To Be Replaced in 16.04 LTS +================================================================================ +![The USC Will Be Replaced](http://www.omgubuntu.co.uk/wp-content/uploads/2011/09/usc1.jpg) + +The USC Will Be Replaced + +**The Ubuntu Software Centre is to be replaced in Ubuntu 16.04 LTS.** + +Users of the Xenial Xerus desktop will find that the familiar (and somewhat cumbersome) Ubuntu Software Centre is no longer available. + +GNOME’s [Software application][1] will – according to current plans – take its place as the default and package management utility on the Unity 7-based desktop. + +![GNOME Software](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/gnome-software.jpg) + +GNOME Software + +New plugins will be created to support the Software Centre’s ratings, reviews and paid app features as a result of the switch. + +The decisions were taken at a recent desktop Sprint held at Canonical HQ in London. + +“We are more confident in our ability to add support for Snaps to GNOME Software Centre (sic) than we are to Ubuntu Software Centre. And so, right now, it looks like we will be replacing [the USC] with GNOME Software Centre”, explains Ubuntu desktop manager Will Cooke at the Ubuntu Online Summit. + +GNOME 3.18 stack will also be included in Ubuntu 16.04, with select app updates to GNOME 3.20 apps taken ‘as and when it makes sense’, adds Will Cooke. + +We recently ran a poll on Twitter asking how you install software on Ubuntu. The results suggest that few of you will mourn the passing of the incumbent Software Centre… + +注:投票项目 +Which of these do you use to install software on #Ubuntu? + +- Software Centre +- Terminal + +### Other Apps Being Dropped in Ubuntu 16.04 ### + +The Ubuntu Software Centre is not the only app set to be given the heave-ho in Xenial Xerus. + +Disc burning utility Brasero and instant messaging app **Empathy** are also to be removed from the default install image. + +Neither app is considered to be under active development, and with the march of laptops lacking optical drives and web and mobile-based chat services, they may also be seen as increasingly obsolete. + +If you do have use for them don’t panic: both Brasero and Empathy will **still be available to install on Ubuntu from the archives**. + +It’s not all removals and replacements as one new desktop app is set be included by default: GNOME Calendar. + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/11/the-ubuntu-software-centre-is-being-replace-in-16-04-lts + +作者:[Sam Tran][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/111008502832304483939?rel=author +[1]:https://wiki.gnome.org/Apps/Software \ No newline at end of file diff --git a/sources/share/20151104 Optimize Web Delivery with these Open Source Tools.md b/sources/share/20151104 Optimize Web Delivery with these Open Source Tools.md new file mode 100644 index 0000000000..aaf8a7292d --- /dev/null +++ b/sources/share/20151104 Optimize Web Delivery with these Open Source Tools.md @@ -0,0 +1,195 @@ +Optimize Web Delivery with these Open Source Tools +================================================================================ +Web proxy software forwards HTTP requests without modifying traffic in any way. They can be configured as a transparent proxy with no client-side configuration required. They can also be used as a reverse proxy front-end to websites; here the cache serves an unlimited number of clients for one or some web servers. + +Web proxies are versatile tools. They have a wide variety of uses, from caching web, DNS and other lookups, to speeding up the delivery of a web server / reducing bandwidth consumption. Web proxy software can also harden security by filtering traffic and anonymizing connections, and offer media-range limitations. This software is used by high-profile, high-traffic websites such as The New York Times, The Guardian, and social media and content sites such as Twitter, Facebook, and Wikipedia. + +Web caches have become a vital mechanism for optimising the amount of data that is delivered in a given period of time. Good web caches also help to minimise latency, serving pages as quickly as possible. This helps to prevent the end user from becoming impatient having to wait for content to be delivered. Web caches optimise the data flow between client and server. They also help to converse bandwidth by caching frequently-delivered content. If you need to reduce server load and improve delivery speed of your content, it is definitely worth exploring the benefits offered by web cache software. + +To provide an insight into the quality of software available for Linux, I feature below 5 excellent open source web proxy tools. Some of the them are full-featured; a couple of them have very modest resource needs. + +### Squid ### + +Squid is a high-performance open source proxy caching server and web cache daemon. It supports FTP, Internet Gopher, HTTPS, TLS, and SSL. It handles all requests in a single, non-blocking, I/O-driven process over IPv4 or IPv6. + +Squid consists of a main server program squid, a Domain Name System lookup program dnsserver, some optional programs for rewriting requests and performing authentication, together with some management and client tools. + +Squid offers a rich access control, authorization and logging environment to develop web proxy and content serving applications. + +Features include: + +- Web proxy: + - Caching to reduce access time and bandwidth use + - Keeps meta data and especially hot objects cached in RAM + - Caches DNS lookups + - Supports non-blocking DNS lookups + - Implements negative chacking of failed requests +- Squid caches can be arranged in a hierarchy or mesh for additional bandwidth savings +- Enforce site-usage policies with extensive access controls +- Anonymize connections, such as disabling or changing specific header fields in a client's HTTP request +- Reverse proxy +- Media-range limitations +- Supports SSL +- Support for IPv6 +- Error Page Localization - error pages presented by Squid may now be localized per-request to match the visitors local preferred language +- Connection Pinning (for NTLM Auth Passthrough) - a workaround which permits Web servers to use Microsoft NTLM Authentication instead of HTTP standard authentication through a web proxy +- Quality of Service (QoS) Flow support + - Select a TOS/Diffserv value to mark local hits + - Select a TOS/Diffserv value to mark peer hits + - Selectively mark only sibling or parent requests + - Allows any HTTP response towards clients to have the TOS value of the response coming from the remote server preserved + - Mask certain bits in the TOS received from the remote server, before copying the value to the TOS send towards clients +- SSL Bump (for HTTPS Filtering and Adaptation) - Squid-in-the-middle decryption and encryption of CONNECT tunneled SSL traffic, using configurable client- and server-side certificates +- eCAP Adaptation Module support +- ICAP Bypass and Retry enhancements - ICAP is now extended with full bypass and dynamic chain routing to handle multiple adaptation services. +- ICY streaming protocol support - commonly known as SHOUTcast multimedia streams +- Dynamic SSL Certificate Generation +- Support for the Internet Content Adaptation Protocol (ICAP) +- Full request logging +- Anonymize connections + +- Website: [www.squid-cache.org][1] +- Developer: National Laboratory for Applied Networking Research (NLANR) and Internet volunteers +- License: GNU GPL v2 +- Version Number: 4.0.1 + +### Privoxy ### + +Privoxy (Privacy Enhancing Proxy) is a non-caching Web proxy with advanced filtering capabilities for enhancing privacy, modifying web page data and HTTP headers, controlling access, and removing ads and other obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual needs and tastes. It supports both stand-alone systems and multi-user networks. + +Privoxy uses the concept of actions in order to manipulate the data stream between the browser and remote sites. + +Features include: + +- Highly configurable - completely personalize your installation +- Ad blocking +- Cookie management +- Supports "Connection: keep-alive". Outgoing connections can be kept alive independently from the client +- Supports IPv6 +- Tagging which allows to change the behaviour based on client and server headers +- Run as an "intercepting" proxy +- Sophisticated actions and filters for manipulating both server and client headers +- Can be chained with other proxies +- Integrated browser-based configuration and control utility. Browser-based tracing of rule and filter effects. Remote toggling +- Web page filtering (text replacements, removes banners based on size, invisible "web-bugs" and HTML annoyances, etc) +- Modularized configuration that allows for standard settings and user settings to reside in separate files, so that installing updated actions files won't overwrite individual user settings +- Support for Perl Compatible Regular Expressions in the configuration files, and a more sophisticated and flexible configuration syntax +- GIF de-animation +- Bypass many click-tracking scripts (avoids script redirection) +- User-customizable HTML templates for most proxy-generated pages (e.g. "blocked" page) +- Auto-detection and re-reading of config file changes +- Most features are controllable on a per-site or per-location basis + +- Website: [www.privoxy.org][2] +- Developer: Fabian Keil (lead developer), David Schmidt, and many other contributors +- License: GNU GPL v2 +- Version Number: 3.4.2 + +### Varnish Cache ### + +Varnish Cache is a web accelerator written with performance and flexibility in mind. It's modern architecture offers significantly better performance. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture. Varnish stores web pages in memory so the web servers do not have to create the same web page repeatedly. The web server only recreates a page when it is changed. When content is served from memory this happens a lot faster then anything. + +Additionally Varnish can serve web pages much faster then any application server is capable of - giving the website a significant speed enhancement. + +For a cost-effective configuration, Varnish Cache uses between 1-16GB and a SSD disk. + +Features include: + +- Modern design +- VCL - a very flexible configuration language. The VCL configuration is translated to C, compiled, loaded and executed giving flexibility and speed +- Load balancing using both a round-robin and a random director, both with a per-backend weighting +- DNS, Random, Hashing and Client IP based Directors +- Load balance between multiple backends +- Support for Edge Side Includes including stitching together compressed ESI fragments +- Heavily threaded +- URL rewriting +- Cache multiple vhosts with a single Varnish +- Log data is stored in shared memory +- Basic health-checking of backends +- Graceful handling of "dead" backends +- Administered by a command line interface +- Use In-line C to extend Varnish +- Can be used on the same system as Apache +- Run multiple Varnish on the same system +- Support for HAProxy's PROXY protocol. This is a protocol adds a small header on each incoming TCP connection that describes who the real client is, added by (for example) an SSL terminating process +- Warm and cold VCL states +- Plugin support with Varnish Modules, called VMODs +- Backends defined through VMODs +- Gzip Compression and Decompression +- HTTP Streaming Pass & Fetch +- Saint and Grace mode. Saint Mode allows for unhealthy backends to be blacklisted for a period of time, preventing them from serving traffic when using Varnish as a load balancer. Grace mode allows Varnish to serve an expired version of a page or other asset in cases where Varnish is unable to retrieve a healthy response from the backend +- Experimental support for Persistent Storage, without LRU eviction + +- Website: [www.varnish-cache.org][3] +- Developer: Varnish Software +- License: FreeBSD +- Version Number: 4.1.0 + +### Polipo ### + +Polipo is an open source caching HTTP proxy which has modest resource needs. + +It listens to requests for web pages from your browser and forwards them to web servers, and forwards the servers’ replies to your browser. In the process, it optimises and cleans up the network traffic. It is similar in spirit to WWWOFFLE, but the implementation techniques are more like the ones ones used by Squid. + +Polipo aims at being a compliant HTTP/1.1 proxy. It should work with any web site that complies with either HTTP/1.1 or the older HTTP/1.0. + +Features include: + +- HTTP 1.1, IPv4 & IPv6, traffic filtering and privacy-enhancement +- Uses HTTP/1.1 pipelining if it believes that the remote server supports it, whether the incoming requests are pipelined or come in simultaneously on multiple connections +- Cache the initial segment of an instance if the download has been interrupted, and, if necessary, complete it later using Range requests +- Upgrade client requests to HTTP/1.1 even if they come in as HTTP/1.0, and up- or downgrade server replies to the client's capabilities +- Complete support for IPv6 (except for scoped (link-local) addresses) +- Use as a bridge between the IPv4 and IPv6 Internets +- Content-filtering +- Can use a technique known as Poor Man's Multiplexing to reduce latency +- SOCKS 4 and SOCKS 5 protocol support +- HTTPS proxying +- Behaves as a transparent proxy +- Run Polipo together with Privoxy or tor + +- Website: [www.pps.univ-paris-diderot.fr/~jch/software/polipo/][4] +- Developer: Juliusz Chroboczek, Christopher Davis +- License: MIT License +- Version Number: 1.1.1 + +### Tinyproxy ### + +Tinyproxy is a lightweight open source web proxy daemon. It is designed to be fast and yet small. It is useful for cases such as embedded deployments where a full featured HTTP proxy is required, but the system resources for a larger proxy are unavailable. + +Tinyproxy is very useful in a small network setting, where a larger proxy would either be too resource intensive, or a security risk. One of the key features of Tinyproxy is the buffering connection concept. In effect, Tinyproxy will buffer a high speed response from a server, and then relay it to a client at the highest speed the client will accept. This feature greatly reduces the problems with sluggishness on the net. + +Features: + +- Easy to modify +- Anonymous mode - allows specification of individual HTTP headers that should be allowed through, and which should be blocked +- HTTPS support - Tinyproxy allows forwarding of HTTPS connections without modifying traffic in any way through the CONNECT method +- Remote monitoring - access proxy statistics from afar, letting you know exactly how busy the proxy is +- Load average monitoring - configure software to refuse connections after the server load reaches a certain point +- Access control - configure to only allow connections from certain subnets or IP addresses +- Secure - run without any special privileges, thus minimizing the chance of system compromise +- URL based filtering - allows domain and URL-based black- and whitelisting +- Transparent proxying - configure as a transparent proxy, so that a proxy can be used without any client-side configuration +- Proxy chaining - use an upstream proxy server for outbound connections, instead of direct connections to the target server, creating a so-called proxy chain +- Privacy features - restrict both what data comes to your web browser from the HTTP server (e.g., cookies), and to restrict what data is allowed through from your web browser to the HTTP server (e.g., version information) +- Small footprint - the memory footprint is about 2MB with glibc, and the CPU load increases linearly with the number of simultaneous connections (depending on the speed of the connection). Tinyproxy can be run on an old machine without affecting performance + +- Website: [banu.com/tinyproxy][5] +- Developer: Robert James Kaes and contributors +- License: GNU GPL v2 +- Version Number: 1.8.3 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20151101020309690/WebDelivery.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.squid-cache.org/ +[2]:http://www.privoxy.org/ +[3]:https://www.varnish-cache.org/ +[4]:http://www.pps.univ-paris-diderot.fr/%7Ejch/software/polipo/ +[5]:https://banu.com/tinyproxy/ \ No newline at end of file From 0a6141a53fca25ace39f005b27f0b9ba5171f3a9 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 5 Nov 2015 13:45:07 +0800 Subject: [PATCH 2398/2517] =?UTF-8?q?20151105-2=20=E9=80=89=E9=A2=98=20?= =?UTF-8?q?=E9=80=9F=E7=BF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n Source Programmers over Insecure Code.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sources/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md diff --git a/sources/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md b/sources/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md new file mode 100644 index 0000000000..1e37549646 --- /dev/null +++ b/sources/talk/20151105 Linus Torvalds Lambasts Open Source Programmers over Insecure Code.md @@ -0,0 +1,35 @@ +Linus Torvalds Lambasts Open Source Programmers over Insecure Code +================================================================================ +![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2015/11/linus-torvalds.jpg) + +Linus Torvalds's latest rant underscores the high expectations the Linux developer places on open source programmers—as well the importance of security for Linux kernel code. + +Torvalds is the unofficial "benevolent dictator" of the Linux kernel project. That means he gets to decide which code contributions go into the kernel, and which ones land in the reject pile. + +On Oct. 28, open source coders whose work did not meet Torvalds's expectations faced an [angry rant][1]. "Christ people," Torvalds wrote about the code. "This is just sh*t." + +He went on to call the coders "just incompetent and out to lunch." + +What made Torvalds so angry? He believed the code could have been written more efficiently. It could have been easier for other programmers to understand and would run better through a compiler, the program that translates human-readable code into the binaries that computers understand. + +Torvalds posted his own substitution for the code in question and suggested that the programmers should have written it his way. + +Torvalds has a history of lashing out against people with whom he disagrees. It stretches back to 1991, when he famously [flamed Andrew Tanenbaum][2]—whose Minix operating system he later described as a series of "brain-damages." No doubt this latest criticism of fellow open source coders will go down as another example of Torvalds's confrontational personality. + +But Torvalds may also have been acting strategically during this latest rant. "I want to make it clear to *everybody* that code like this is completely unacceptable," he wrote, suggesting that his goal was to send a message to all Linux programmers, not just vent his anger at particular ones. + +Torvalds also used the incident as an opportunity to highlight the security concerns that arise from poorly written code. Those are issues dear to open source programmers' hearts in an age when enterprises are finally taking software security seriously, and demanding top-notch performance from their code in this regard. Lambasting open source programmers who write insecure code thus helps Linux's image. + +-------------------------------------------------------------------------------- + +via: http://thevarguy.com/open-source-application-software-companies/110415/linus-torvalds-lambasts-open-source-programmers-over-inse + +作者:[Christopher Tozzi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://thevarguy.com/author/christopher-tozzi +[1]:http://lkml.iu.edu/hypermail/linux/kernel/1510.3/02866.html +[2]:https://en.wikipedia.org/wiki/Tanenbaum%E2%80%93Torvalds_debate \ No newline at end of file From d4806aa3c4e78459eac092f730b76cc0e5cb93ce Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 5 Nov 2015 14:07:45 +0800 Subject: [PATCH 2399/2517] =?UTF-8?q?20151105-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...to change default Java version on Linux.md | 52 +++++++++++ ...to find which shell I am using on Linux.md | 91 +++++++++++++++++++ ...o install Ubuntu desktop behind a proxy.md | 61 +++++++++++++ 3 files changed, 204 insertions(+) create mode 100644 sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md create mode 100644 sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md create mode 100644 sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md diff --git a/sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md b/sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md new file mode 100644 index 0000000000..45eb3b4834 --- /dev/null +++ b/sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md @@ -0,0 +1,52 @@ +Linux FAQs with Answers--How to change default Java version on Linux +================================================================================ +> **Question**: When I am trying to run a Java program on Linux, I am getting the following error. Looks like the Java program is compiled for a different Java version than the default Java program installed on my Linux. How can I switch the default Java version on Linux? +> +> Exception in thread "main" java.lang.UnsupportedClassVersionError: com/xmodulo/hmon/gui/NetConf : Unsupported major.minor version 51.0 + +When a Java program is compiled, the build environment sets a "target" which is the oldest JRE version the program can support. If you run the Java program on a Linux system which does not meet the lowest JRE version requirement, you will encounter the following error while starting the program. + + Exception in thread "main" java.lang.UnsupportedClassVersionError: com/xmodulo/hmon/gui/NetConf : Unsupported major.minor version 51.0 + +For example, in this case the program is compiled for Java JRE 1.7 but the system only has Java JRE 1.6. + +To solve this problem, you need to change the default Java version you are using to Java JRE 1.7 or higher (assuming that such JRE is already installed). + +First, **check available Java versions** on your Linux system by using update-alternatives command: + + $ sudo update-alternatives --display java + +![](https://c2.staticflickr.com/6/5663/22661333316_81fe1ab7da_c.jpg) + +In this example, there are four different Java versions that are installed: OpenJDK JRE 1.6, Oracle Java JRE 1.6, OpenJDK JRE 1.7 and Oracle Java JRE 1.7. The default Java version is currently set to OpenJDK JRE 1.6. + +If the necessary Java JRE is not installed, you can always install it using [these instructions][1]. + +Now that there are suitable candidates to change to, you can **switch the default Java version** among available Java JREs by running the following command: + + $ sudo update-alternatives --config java + +When prompted, select the Java version you would like to use. In this example, we choose Oracle Java JRE 1.7. + +![](https://c2.staticflickr.com/6/5651/22066181083_b9c4c5b676_c.jpg) + +Now you can verify the default Java version as follows. + + $ java -version + +![](https://c1.staticflickr.com/1/634/22499411280_1d702a4101_c.jpg) + +Finally, if you defined JAVA_HOME environment variable somewhere, update the variable according to the newly set default Java version. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/change-default-java-version-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://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/install-java-runtime-linux.html \ No newline at end of file diff --git a/sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md b/sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md new file mode 100644 index 0000000000..8c127f4d8a --- /dev/null +++ b/sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md @@ -0,0 +1,91 @@ +Linux FAQs with Answers--How to find which shell I am using on Linux +================================================================================ +> **Question**: I often change between different shells at the command line. Is there a quick and easy way to find out which shell I am currently in? Also how can I find out the version of the shell? + +### Find out Which Shell You are In ### + +There are different ways to tell what shell you are currently in. The easiest way to find that out is by using special shell parameters. + +For one, [a special parameter named "$$"][1] denotes the PID of the current instance of the shell you are running. This parameter is read-only and cannot be modified. So the following command will also show you the name of the shell you are running: + + $ ps -p $$ + +---------- + + PID TTY TIME CMD + 21666 pts/4 00:00:00 bash + +The above command works across all available shells. + +If you are not using csh, another way to find out the current shell is to use an special shell parameter called "$$", which denotes the name of the shell or shell script that is currently running. This is one of the Bash special parameters, but available in other shells as well, such as sh, zsh, tcsh or dash. Using echo command to print out its value will tell you the name of the shell you are currently in. + + $ echo $0 + +---------- + + bash + +Don't be confused with a separate environment variable called $SHELL, which is set to the full path to your default shell. As such, this variable is not necessarily point to the current shell you are using. For example, $SHELL remains the same even if you invoke a different shell within a terminal. + + $ echo $SHELL + +---------- + + /bin/shell + +![](https://c2.staticflickr.com/6/5688/22544087680_4a9c180485_c.jpg) + +Thus to find out the current shell, you should use either $$ or $0, but not $SHELL. + +### Find out the Version of the Shell You are Using ### + +Once you know which shell you are in, you may want to find out what version of the shell it is. For that, type the name of your shell followed by "--version" at the command line. For example: + +**For** bash **shell**: + + $ bash --version + +---------- + + GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu) + Copyright (C) 2013 Free Software Foundation, Inc. + License GPLv3+: GNU GPL version 3 or later + + This is free software; you are free to change and redistribute it. + There is NO WARRANTY, to the extent permitted by law. + +**For** zsh **shell**: + + $ zsh --version + +---------- + + zsh 5.0.7 (x86_64-pc-linux-gnu) + +**For** tcsh **shell**: + $ tcsh --version + +---------- + + tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-unknown-linux) options wide,nls,dl,al,kan,rh,nd,color,filec + +For some shells, you can also use shell-specific variables (e.g., $BASH_VERSION or $ZSH_VERSION). + + $ echo $BASH_VERSION + +---------- + + 4.3.8(1)-release + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/which-shell-am-i-using.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://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/process-id-pid-shell-script.html \ No newline at end of file diff --git a/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md new file mode 100644 index 0000000000..c5cd0b5420 --- /dev/null +++ b/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md @@ -0,0 +1,61 @@ +Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy +================================================================================ +> **Question**: My computer is connected to a corporate network sitting behind an HTTP proxy. When I try to install Ubuntu desktop on the computer from a CD-ROM drive, the installation hangs and never finishes while trying to retrieve files, which is presumably due to the proxy. However, the problem is that Ubuntu installer never asks me to configure proxy during installation procedure. Then how can I install Ubuntu desktop behind a proxy? + +Unlike Ubuntu server, installation of Ubuntu desktop is pretty much auto-pilot, not leaving much room for customization, such as custom disk partitioning, manual network settings, package selection, etc. While such simple, one-shot installation is considered user-friendly, it leaves much to be desired for those users looking for "advanced installation mode" to customize their Ubuntu desktop installation. + +In addition, one big problem of the default Ubuntu desktop installer is the absense of proxy settings. If your computer is connected behind a proxy, you will notice that Ubuntu installation gets stuck while preparing to download files. + +![](https://c2.staticflickr.com/6/5683/22195372232_cea81a5e45_c.jpg) + +This post describes how to get around the limitation of Ubuntu **installer and install Ubuntu desktop when you are behind a proxy**. + +The basic idea is as follows. Instead of starting with Ubuntu installer directly, boot into live Ubuntu desktop first, configure proxy settings, and finally launch Ubuntu installer manually from live desktop. The following is the step by step procedure. + +After booting from Ubuntu desktop CD/DVD or USB, click on "Try Ubuntu" on the first welcome screen. + +![](https://c1.staticflickr.com/1/586/22195371892_3816ba09c3_c.jpg) + +Once you boot into live Ubuntu desktop, click on Settings icon in the left. + +![](https://c1.staticflickr.com/1/723/22020327738_058610c19d_c.jpg) + +Go to Network menu. + +![](https://c2.staticflickr.com/6/5675/22021212239_ba3901c8bf_c.jpg) + +Configure proxy settings manually. + +![](https://c1.staticflickr.com/1/735/22020025040_59415e0b9a_c.jpg) + +Next, open a terminal. + +![](https://c2.staticflickr.com/6/5642/21587084823_357b5c48cb_c.jpg) + +Enter a root session by typing the following: + + $ sudo su + +Finally, type the following command as the root. + + # ubiquity gtk_ui + +This will launch GUI-based Ubuntu installer as follows. + +![](https://c1.staticflickr.com/1/723/22020025090_cc64848b6c_c.jpg) + +Proceed with the rest of installation. + +![](https://c1.staticflickr.com/1/628/21585344214_447020e9d6_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-ubuntu-desktop-behind-proxy.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://ask.xmodulo.com/author/nanni \ No newline at end of file From 5b44a5466b2526af99ce2f8741a96b45ef82baa1 Mon Sep 17 00:00:00 2001 From: zpl Date: Thu, 5 Nov 2015 17:35:28 +0800 Subject: [PATCH 2400/2517] [translating] 20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md --- ...012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md b/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md index f45f901b3d..be5c7b9b2e 100644 --- a/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md +++ b/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md @@ -1,3 +1,4 @@ +zpl1025 translating The Brief History Of Aix, HP-UX, Solaris, BSD, And LINUX ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/05/linux-712x445.png) @@ -98,4 +99,4 @@ via: http://www.unixmen.com/brief-history-aix-hp-ux-solaris-bsd-linux/ [a]:http://www.unixmen.com/author/pirat9/ [1]:http://www.unixmen.com/ken-thompson-unix-systems-father/ -[2]:http://www.unixmen.com/dennis-m-ritchie-father-c-programming-language/ \ No newline at end of file +[2]:http://www.unixmen.com/dennis-m-ritchie-father-c-programming-language/ From 576ccf0238e14625483f345e7fa599072e1638ff Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Fri, 6 Nov 2015 09:58:02 +0800 Subject: [PATCH 2401/2517] Update 20151027 How To Install Retro Terminal In Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- .../tech/20151027 How To Install Retro Terminal In Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151027 How To Install Retro Terminal In Linux.md b/sources/tech/20151027 How To Install Retro Terminal In Linux.md index 086c947ea4..4de3e6d002 100644 --- a/sources/tech/20151027 How To Install Retro Terminal In Linux.md +++ b/sources/tech/20151027 How To Install Retro Terminal In Linux.md @@ -1,3 +1,5 @@ +FSSlc translating + How To Install Retro Terminal In Linux ================================================================================ ![Retro Terminal in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux.jpeg) @@ -71,4 +73,4 @@ via: http://itsfoss.com/cool-retro-term/ [2]:http://itsfoss.com/tag/antergos/ [3]:https://manjaro.github.io/ [4]:https://github.com/Swordfish90/cool-retro-term -[5]:http://itsfoss.com/author/abhishek/ \ No newline at end of file +[5]:http://itsfoss.com/author/abhishek/ From 28435bed62c740c89c874ac4e02058975515ea67 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 6 Nov 2015 10:36:58 +0800 Subject: [PATCH 2402/2517] Update 20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md --- ...th Answers--How to find which shell I am using on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md b/sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md index 8c127f4d8a..b93eb6db06 100644 --- a/sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md +++ b/sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md @@ -1,3 +1,5 @@ + +translation by strugglingyouth Linux FAQs with Answers--How to find which shell I am using on Linux ================================================================================ > **Question**: I often change between different shells at the command line. Is there a quick and easy way to find out which shell I am currently in? Also how can I find out the version of the shell? @@ -88,4 +90,4 @@ via: http://ask.xmodulo.com/which-shell-am-i-using.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/process-id-pid-shell-script.html \ No newline at end of file +[1]:http://ask.xmodulo.com/process-id-pid-shell-script.html From 87cf64644b9b44d41ce21b68535f232ce39d9458 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 6 Nov 2015 10:44:12 +0800 Subject: [PATCH 2403/2517] Delete 20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md --- ... or Partitions in the Terminal on Linux.md | 89 ------------------- 1 file changed, 89 deletions(-) delete mode 100644 sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md diff --git a/sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md b/sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md deleted file mode 100644 index 2bbe94a773..0000000000 --- a/sources/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md +++ /dev/null @@ -1,89 +0,0 @@ -translation by strugglingyouth -How to Create New File Systems/Partitions in the Terminal on Linux -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-feature-image.png) - -Partition editing or making new file systems on Linux usually means one thing: installing the Gnome Parted partition editor (GParted). For most Linux users, this is the only way to go about it. Still, what if you could edit these partitions and file systems right in the terminal? You can! Here’s how! - -### Creating a basic Linux partition layout with CFdisk ### - -Here’s how to make a basic Linux partition scheme right from the command line. The first thing to do is open your terminal. Once you’re there, you’ll need to identify what hard drive you’re looking to change. This can easily be figured out with one simple command. - - lsblk - -![cfdisk-lsblk](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-lsblk.png) - - -Once you’ve run `lsblk`, you should get a detailed list of each hard drive currently on your system. Look through this generated list, and figure out the denotation to the drive you want to change. In this article I’ll be using `sdb` for the sake of example. - -In your terminal enter this command. It will launch a powerful terminal-based partition editing program. - - sudo cfdisk /dev/sdb - -![cfdisk-empty-layout](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-empty-layout.png) - -**Note**: replace `sdb` with whatever `lsblk` told you your hard drive was. - -When this command is entered, you’ll be inside the partition editor and will have total access to the hard drive you wish to modify. - -Since hard drive partitions are different, depending on a user’s needs, this part of the guide will go over **how to set up a split Linux home/root system layout**. - -To start, a root partition will need to be created. This will require a bit of math as the gigabytes on the hard drive need to be divided up. My test drive is 32 GB. - -In CFdisk using the arrow keys on your keyboard, select some free space. Once you’ve found some, use the arrow key to select [ NEW ] and press the Enter key. - -![cfdisk-create-root-partition](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-create-root-partition.png) - -The program will ask you to input the partition size. Once you’ve specified the size, press the Enter key. This will be known as the root partition (or /dev/sdb1). - -Next it’s time to create the home partition (/dev/sdb2). Once again, you’ll need to select some free space in CFdisk. Use the arrow key to select the [ NEW ] option, and press the Enter key. Input the size of your home partition, and press the Enter key to create it. - -![cfdisk-create-home-partition](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-create-home-partition.png) - -Finally, the swap partition needs to be created. Like the two times before, find some free space, and use the arrow key to select the [ NEW ] option. After that calculate exactly how big your Linux swap partition needs to be. - -**Note**: a swap partition is usually about as big as a computer’s physical RAM. - -![cfdisk-specify-partition-type-swap](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-specify-partition-type-swap.png) - -Now that the swap partition has been created, it’s time to specify its type. Highlight it with the up and down arrow keys. After that use the left and right arrow keys to select [ TYPE ]. Find Linux swap in the menu, and press Enter. - -![cfdisk-write-partition-table](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-write-partition-table.jpg) - -All of the partition creation is out of the way. All that’s left is to write it to the disk. Using the right arrow key, select the [ WRITE ] option, and press the Enter key. This will write your newly created layout directly to the hard drive. - -### Creating file systems with mkfs ### - -Sometimes you don’t need to make an entire partition layout. Sometimes you just need to make a file system. This can easily be accomplished directly in the terminal with the `mkfs` command. - -![cfdisk-mkfs-list-partitions-lsblk](https://www.maketecheasier.com/assets/uploads/2015/10/cfdisk-mkfs-list-partitions-lsblk.png) - -To start, figure out what you’re looking to modify. Enter `lsblk` in your terminal to find out. It’ll print out a list, and after that just find the partition or drive you want to make a file system on. - -In this example, I’ll point it towards the first partition of the secondary drive `/dev/sdb1`. It’s also possible to just point mkfs to `/dev/sdb` (to make use of the entire drive). - -![cfdisk-mkfs-make-file-system-ext4](https://www.maketecheasier.com/assets/uploads/2015/10/cfdisk-mkfs-make-file-system-ext4.png) - -To create the new file system on a specific partition, just enter - - sudo mkfs.ext4 /dev/sdb1 - -into the terminal. It should be noted that `mkfs.ext4` can be changed to whatever file system you want to use. - -### Conclusion ### - -Though editing file systems and partitions is easier using a graphical tool, the terminal is arguably more efficient. It’s much more faster to just load up a terminal, tap a few buttons and be done. With GParted and tools like it, it’s a whole ordeal. I hope that with the help of this tutorial you, too, understand how efficient editing file systems in the terminal can be. - -Do you prefer to use terminal-based programs to edit partitions on Linux? Why or why not? Tell us below! - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/create-file-systems-partitions-terminal-linux/ - -作者:[Derrik Diener][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/derrikdiener/ From 6a3556c3654861c9d0013a9492ce300b8d6b3ac5 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 6 Nov 2015 10:45:22 +0800 Subject: [PATCH 2404/2517] Create 20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md --- ... or Partitions in the Terminal on Linux.md | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 translated/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md diff --git a/translated/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md b/translated/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md new file mode 100644 index 0000000000..a7754d9c15 --- /dev/null +++ b/translated/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md @@ -0,0 +1,91 @@ + +如何在 Linux 终端下创建新的文件系统/分区 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-feature-image.png) + +在 Linux 中创建分区或新的文件系统通常意味着一件事:安装 Gnome Parted 分区编辑器(GParted)。对于大多数 Linux 用户而言,这是唯一的办法。不过,你是否考虑过在终端创建这些分区和文件系统?当然可以!以下就是方法! + +### 使用 CFdisk 创建一个基本的 Linux 分区 ### + +以下是如何在命令行中创建一个基本的 Linux 分区的正确方案。要做的第一件事就是先打开你的终端。若你已打开,你需要找到你想要创建分区的磁盘。这可以使用一个简单的命令来找到。 + + lsblk + +![cfdisk-lsblk](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-lsblk.png) + + +一旦你运行了 `lsblk`,你应该会看到当前系统上每个磁盘的详细列表。看看这个列表,然后找出你想要使用的磁盘。在本文中,我将使用 `sdb` 来进行演示。 + +在终端输入这个命令。它会显示一个功能强大的基于终端的分区编辑程序。 + + sudo cfdisk /dev/sdb + +![cfdisk-empty-layout](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-empty-layout.png) + +**注意**: 使用在 `lsblk` 命令输出的你想要使用的磁盘来替换 `sdb`。 + +当输入此命令后,你将进入分区编辑器中,然后访问你想改变的磁盘。 + +Since hard drive partitions are different, depending on a user’s needs, this part of the guide will go over **how to set up a split Linux home/root system layout**. + +由于磁盘分区的不同,这取决于用户的需求,这部分的指南将在 **如何建立一个分布的 Linux home/root 文件分区**。 + +首先,需要创建根分区。这需要根据磁盘的字节数来进行分割。我测试的磁盘是 32 GB。 + +在 CFdisk 中使用键盘上的方向键选择需要分配的空间。你找到后,请使用箭头键选择 [ NEW ],然后按 Enter 键。 + +![cfdisk-create-root-partition](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-create-root-partition.png) + +该程序会要求你输入分区大小。一旦你指定好大小后,按 Enter 键。这将被称为根分区(或 /dev/sdb1)。 + +接下来该创建用户分区(/dev/sdb2)了。你需要在 CFdisk 中再选择一些空闲分区。使用箭头选择 [ NEW ] 选项,然后按 Enter 键。输入你用户分区的大小,然后按 Enter 键来创建它。 + +![cfdisk-create-home-partition](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-create-home-partition.png) + +最后,需要创建交换分区。像前两次一样,先找一些空闲分区,并使用箭头选择 [ NEW ] 选项。之后,算下你 Linux 想使用多大的交换分区。 + +**注意**: 交换分区通常和计算机的内存差不多大。 + +![cfdisk-specify-partition-type-swap](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-specify-partition-type-swap.png) + +现在,交换分区被创建了,该指定其类型。使用上下箭头来选择它。之后,使用左右箭头选择 [ TYPE ] 。找到 Linux swap 选项,然后按 Enter 键。 + +![cfdisk-write-partition-table](https://www.maketecheasier.com/assets/uploads/2015/03/cfdisk-write-partition-table.jpg) + +所有分区创建后。然后就是将其写入到磁盘。使用右箭头键,选择 [ WRITE ] 选项,然后按 Enter 键。这将直接将新创建的分布写入到磁盘中。 + +### 使用 mkfs 创建文件系统 ### + +有时候,你并不需要一个完整的分区。有时候,你只需要做一个文件系统。这可以在终端直接使用 `mkfs` 命令来实现。 + +![cfdisk-mkfs-list-partitions-lsblk](https://www.maketecheasier.com/assets/uploads/2015/10/cfdisk-mkfs-list-partitions-lsblk.png) + +首先,找出你要使用的磁盘。在终端输入 `lsblk` 找出来。它会打印出列表,之后只要找到你想制作文件系统的分区或盘符。 + +在这个例子中,我将使用 `/dev/sdb1` 的第一个分区。只对 `/dev/sdb` 使用 mkfs(将会使用整个分区)。 + +![cfdisk-mkfs-make-file-system-ext4](https://www.maketecheasier.com/assets/uploads/2015/10/cfdisk-mkfs-make-file-system-ext4.png) + +要在一个特定的分区上创建新文件系统,只需输入 + + sudo mkfs.ext4 /dev/sdb1 + +在终端。应当指出的是,`mkfs.ext4` 可以将你指定的任何文件系统改变。 + +### 结论 ### + +虽然使用图形工具编辑文件系统和分区更容易,但终端可以说是更有效的。终端的加载速度更快,点击几个按钮即可。GParted 和其它工具一样,它也是一个完整的工具。我希望在本教程的帮助下,你会明白如何在终端中高效的编辑文件系统。 + +你是否更喜欢使用基于终端的方法在 Linux 上编辑分区?为什么或为什么不?在下面告诉我们! + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/create-file-systems-partitions-terminal-linux/ + +作者:[Derrik Diener][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/derrikdiener/ From af2a1f5a3d58148b79f539024fc1f0e9c0f9afa9 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 6 Nov 2015 10:49:22 +0800 Subject: [PATCH 2405/2517] Update 20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md --- ...e New File Systems or Partitions in the Terminal on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md b/translated/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md index a7754d9c15..2948e8de61 100644 --- a/translated/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md +++ b/translated/tech/20151104 How to Create New File Systems or Partitions in the Terminal on Linux.md @@ -56,7 +56,7 @@ Since hard drive partitions are different, depending on a user’s needs, this p ### 使用 mkfs 创建文件系统 ### -有时候,你并不需要一个完整的分区。有时候,你只需要做一个文件系统。这可以在终端直接使用 `mkfs` 命令来实现。 +有时候,你并不需要一个完整的分区,你只想要创建一个文件系统而已。你可以在终端直接使用 `mkfs` 命令来实现。 ![cfdisk-mkfs-list-partitions-lsblk](https://www.maketecheasier.com/assets/uploads/2015/10/cfdisk-mkfs-list-partitions-lsblk.png) From fb8a91a87f53d250c67e159f5f194ef12ba94e6f Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 6 Nov 2015 15:25:16 +0800 Subject: [PATCH 2406/2517] PUB:07 - The history of Android @alim0x --- .../07 - The history of Android.md | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) rename {translated/talk => published}/The history of Android/07 - The history of Android.md (51%) diff --git a/translated/talk/The history of Android/07 - The history of Android.md b/published/The history of Android/07 - The history of Android.md similarity index 51% rename from translated/talk/The history of Android/07 - The history of Android.md rename to published/The history of Android/07 - The history of Android.md index 583e847d6e..9777963d63 100644 --- a/translated/talk/The history of Android/07 - The history of Android.md +++ b/published/The history of Android/07 - The history of Android.md @@ -1,90 +1,90 @@ -安卓编年史 +安卓编年史(7) ================================================================================ ![电子邮件应用的所有界面。前两张截图展示了标签/收件箱结合的视图,最后一张截图展示了一封邮件。](http://cdn.arstechnica.net/wp-content/uploads/2014/01/email2lol.png) -电子邮件应用的所有界面。前两张截图展示了标签/收件箱结合的视图,最后一张截图展示了一封邮件。 -Ron Amadeo供图 -邮件视图是——令人惊讶的!——白色。安卓的电子邮件应用从历史角度来说算是个打了折扣的Gmail应用,你可以在这里看到紧密的联系。读邮件以及写邮件视图几乎没有任何修改地就从Gmail那里直接取过来使用。 +*电子邮件应用的所有界面。前两张截图展示了标签/收件箱结合的视图,最后一张截图展示了一封邮件。 [Ron Amadeo供图]* + +邮件视图是——令人惊讶的!居然是白色。安卓的电子邮件应用从历史角度来说算是个打了折扣的Gmail应用,你可以在这里看到紧密的联系。读邮件以及写邮件视图几乎没有任何修改地就从Gmail那里直接取过来使用。 ![即时通讯应用。截图展示了服务提供商选择界面,朋友列表,以及一个对话。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/IM2.png) -即时通讯应用。截图展示了服务提供商选择界面,朋友列表,以及一个对话。 -Ron Amadeo供图 -在Google Hangouts之前,甚至是Google Talk之前,就有“IM”——安卓1.0带来的唯一一个即时通讯客户端。令人惊奇的是,它支持多种IM服务:用户可以从AIM,Google Talk,Windows Live Messenger以及Yahoo中挑选。还记得操作系统开发者什么时候关心过互通性吗? +*即时通讯应用。截图展示了服务提供商选择界面,朋友列表,以及一个对话。[Ron Amadeo供图]* -朋友列表是聊天中带有白色聊天气泡的黑色背景界面。状态用一个带颜色的圆形来指示,右侧的小安卓机器人指示出某人正在使用移动设备。IM应用相比Google Hangouts远比它有沟通性,这真是十分神奇的。绿色代表着某人正在使用设备并且已经登录,黄色代表着他们登录了但处于空闲状态,红色代表他们手动设置状态为忙,不想被打扰,灰色表示离线。现在Hangouts只显示用户是否打开了应用。 +在Google Hangouts之前,甚至是Google Talk之前,就有了“IM”——安卓1.0带来的唯一一个即时通讯客户端。令人惊奇的是,它支持多种IM服务:用户可以从AIM,Google Talk,Windows Live Messenger以及Yahoo中挑选。还记得操作系统开发者什么时候关心过互通性吗? + +朋友列表是黑色背景界面,如果在聊天中则带有白色聊天气泡。状态用一个带颜色的圆形来指示,右侧的小安卓机器人指示出某人正在使用移动设备。IM应用相比Google Hangouts远比它有沟通性,这真是十分神奇的。绿色代表着某人正在使用设备并且已经登录,黄色代表着他们登录了但处于空闲状态,红色代表他们手动设置状态为忙,不想被打扰,灰色表示离线。现在Hangouts只显示用户是否打开了应用。 聊天对话界面明显基于信息应用,聊天的背景从白色和蓝色被换成了白色和绿色。但是没人更改信息输入框的颜色,所以加上橙色的高亮效果,界面共使用了白色,绿色,蓝色和橙色。 ![安卓1.0上的YouTube。截图展示了主界面,打开菜单的主界面,分类界面,视频播放界面。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/yt5000.png) -安卓1.0上的YouTube。截图展示了主界面,打开菜单的主界面,分类界面,视频播放界面。 -Ron Amadeo供图 -YouTube仅仅以G1的320p屏幕和3G网络速度可能不会有今天这样的移动意识,但谷歌的视频服务在安卓1.0上就被置入发布了。主界面看起来就像是安卓市场调整过的版本,顶部带有一个横向滚动选择部分,下面有垂直滚动分类列表。谷歌的一些分类选择还真是奇怪:“最热门”和“最多观看”有什么区别? +*安卓1.0上的YouTube。截图展示了主界面,打开菜单的主界面,分类界面,视频播放界面。[Ron Amadeo供图]* -一个谷歌没有意识到YouTube最终能达到多庞大的标志——有一个视频分类是“最近更新”。在今天,每分钟有[100小时时长的视频][1]上传到Youtube上,如果这个分类能正常工作的话,它会是一个快速滚动的视频列表,快到以至于变为一片无法阅读的模糊。 +以G1的320p屏幕和3G网络速度,YouTube可能不会有今天这样的手机上的表现,但谷歌的视频服务在安卓1.0上就被置入发布了。主界面看起来就像是安卓市场调整过的版本,顶部带有一个横向滚动选择部分,下面有垂直滚动分类列表。谷歌的一些分类选择还真是奇怪:“最热门”和“最多观看”有什么区别? -菜单含有搜索,喜爱,分类,设置。设置(没有图片)是有史以来最简陋的,只有个清除搜索历史的选项。分类都是一样的平淡,仅仅是个黑色的文本列表。 +这是一个谷歌没有意识到YouTube最终能达到多庞大的标志——有一个视频分类是“最近更新”。在今天,每分钟有[100小时时长的视频][1]上传到Youtube上,如果这个分类能正常工作的话,它会是一个快速滚动的视频列表,快到以至于变为一片无法阅读的模糊。 + +菜单含有搜索,喜爱,分类,设置。设置(没有该图片)是有史以来最简陋的,只有个清除搜索历史的选项。分类都是一样的平淡,仅仅是个黑色的文本列表。 最后一张截图展示了视频播放界面,只支持横屏模式。尽管自动隐藏的播放控制有个进度条,但它还是很奇怪地包含了后退和前进按钮。 ![YouTube的视频菜单,描述页面,评论。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/yt3.png) -YouTube的视频菜单,描述页面,评论。 -Ron Amadeo供图 -每个视频的更多选项可以通过点击菜单按钮来打开。在这里你可以把视频标记为喜爱,查看详细信息,以及阅读评论。所有的这些界面,和视频播放一样,是锁定横屏模式的。 +*YouTube的视频菜单,描述页面,评论。[Ron Amadeo供图]* + +每个视频的更多选项可以通过点击菜单按钮来打开。在这里你可以把视频标记为“喜爱”,查看详细信息,以及阅读评论。所有的这些界面,和视频播放一样,是锁定横屏模式的。 然而“共享”不会打开一个对话框,它只是向Gmail邮件中加入了视频的链接。想要把链接通过短信或即时消息发送给别人是不可能的。你可以阅读评论,但是没办法评价他们或发表自己的评论。你同样无法给视频评分或赞。 ![相机应用的拍照界面,菜单,照片浏览模式。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/camera.png) -相机应用的拍照界面,菜单,照片浏览模式。 -Ron Amadeo供图 -在实体机上跑上真正的安卓意味着相机功能可以正常运作,即便那里没什么太多可关注的。左边的黑色方块是相机的界面,原本应该显示取景器图像,但SDK的截图工具没办法捕捉下来。G1有个硬件实体的拍照键(还记得吗?),所以相机没必要有个屏幕上的快门键。相机没有曝光,白平衡,或HDR设置——你可以拍摄照片,仅此而已。 +*相机应用的拍照界面,菜单,照片浏览模式。[Ron Amadeo供图]* + +在实体机上跑真正的安卓意味着相机功能可以正常运作,即便那里没什么太多可关注的。左边的黑色方块是相机的界面,原本应该显示取景器图像,但SDK的截图工具没办法捕捉下来。G1有个硬件实体的拍照键(还记得吗?),所以相机没必要有个屏幕上的快门键。相机没有曝光,白平衡,或HDR设置——你可以拍摄照片,仅此而已。 菜单按钮显示两个选项:跳转到相册应用和带有两个选项的设置界面。第一个设置选项是是否给照片加上地理标记,第二个是在每次拍摄后显示提示菜单,你可以在上面右边看到截图。同样的,你目前还只能拍照——还不支持视频拍摄。 ![日历的月视图,打开菜单的周视图,日视图,以及日程。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/calviews.png) -日历的月视图,打开菜单的周视图,日视图,以及日程。 -Ron Amadeo供图 + +*日历的月视图,打开菜单的周视图,日视图,以及日程。[Ron Amadeo供图]* 就像这个时期的大多数应用一样,日历的主命令界面是菜单。菜单用来切换视图,添加新事件,导航至当天,选择要显示的日程,以及打开设置。菜单扮演着每个单独按钮的入口的作用。 月视图不能显示约会事件的文字。每个日期旁边有个侧边,约会会显示为侧边上的绿色部分,通过位置来表示约会是在一天中的什么时候。周视图同样不能显示预约文字——G1的320×480的显示屏像素还不够密——所以你会在日历中看到一个带有颜色指示条的白块。唯一一个显示文字的是日程和日视图。你可以用滑动来切换日期——左右滑动切换周和日,上下滑动切换月份和日程。 ![设置主界面,无线设置,关于页面的底部。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/settings.png) -设置主界面,无线设置,关于页面的底部。 -Ron Amadeo供图 -安卓1.0最终带来了设置界面。这个界面是个带有文字的黑白界面,粗略地分为各个部分。每个列表项边的下箭头让人误以为点击它会展开折叠的更多东西,但是触摸列表项的任何位置只会加载下一屏幕。所有的界面看起来确实无趣,都差不多一样,但是嘿,这可是设置啊。 +*设置主界面,无线设置,关于页面的底部。[Ron Amadeo供图]* -任何带有开/关状态的选项都使用了卡通风的复选框。安卓1.0最初的复选框真是奇怪——就算是在“未选中”状态时,它们还是有个灰色的勾选标记在里面。安卓把勾选标记当作了灯泡,打开时亮起来,关闭的时候变得黯淡,但这不是复选框的工作方式。然而我们最终还是见到了“关于”页面。安卓1.0运行Linux内核2.6.25版本。 +安卓1.0最终带来了设置界面。这个界面是个带有文字的黑白界面,粗略地分为各个部分。每个列表项边上的下箭头让人误以为点击它会展开折叠的更多东西,但是触摸列表项的任何位置只会加载下一屏幕。所有的界面看起来确实无趣,都差不多一样,但是嘿,这可是设置啊。 + +任何带有开/关状态的选项都使用了卡通风格的复选框。安卓1.0最初的复选框真是奇怪——就算是在“未选中”状态时,它们还是有个灰色的勾选标记在里面。安卓把勾选标记当作了灯泡,打开时亮起来,关闭的时候变得黯淡,但这不是复选框的工作方式。然而我们最终还是见到了“关于”页面。安卓1.0运行Linux内核2.6.25版本。 设置界面意味着我们终于可以打开安全设置并更改锁屏。安卓1.0只有两种风格,安卓0.9那样的灰色方形锁屏,以及需要你在9个点组成的网格中画出图案的图形解锁。像这样的滑动图案相比PIN码更加容易记忆和输入,尽管它没有增加多少安全性。 ![语音拨号,图形锁屏,电池低电量警告,时间设置。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/grabbag.png) -语音拨号,图形锁屏,电池低电量警告,时间设置。 -Ron Amadeo供图 -语音功能和语音拨号一同来到了1.0。这个特性以各种功能实现在AOSP徘徊了一段时间,然而它是一个简单的拨打号码和联系人的语音命令应用。语音拨号是个和谷歌未来的语音产品完全无关的应用,但是,它的工作方式和非智能机上的语音拨号一样。 +*语音拨号,图形锁屏,电池低电量警告,时间设置。[Ron Amadeo供图]* + +语音功能和语音拨号一同来到了1.0。这个特性以各种功能实现在AOSP徘徊了一段时间,然而它是一个简单的拨打号码和联系人的语音命令应用。语音拨号是个和谷歌未来的语音产品完全无关的应用,它的工作方式和非智能机上的语音拨号一样。 关于最后一个值得注意的,当电池电量低于百分之十五的时候会触发低电量弹窗。这是个有趣的图案,它把电源线错误的一端插入手机。谷歌,那可不是(现在依然不是)手机应该有的充电方式。 -安卓1.0是个伟大的开头,但是功能上仍然有许多缺失。实体键盘和大量硬件按钮被强制要求配备,因为不带有十字方向键或轨迹球的安卓设备依然不被允许销售。另外,基本的智能手机功能比如自动旋转依然缺失。内置应用不可能像今天这样通过安卓市场来更新。所有的谷歌系应用和系统交织在一起。如果谷歌想要升级一个单独的应用,需要通过运营商推送整个系统的更新。安卓依然还有许多工作要做。 +安卓1.0是个伟大的开端,但是功能上仍然有许多缺失。强制配备了实体键盘和大量硬件按钮,因为不带有十字方向键或轨迹球的安卓设备依然不被允许销售。另外,基本的智能手机功能比如自动旋转依然缺失。内置应用不可能像今天这样通过安卓市场来更新。所有的谷歌系应用和系统交织在一起。如果谷歌想要升级一个单独的应用,需要通过运营商推送整个系统的更新。安卓依然还有许多工作要做。 ### 安卓1.1——第一个真正的增量更新 ### ![安卓1.1的所有新特性:语音搜索,安卓市场付费应用支持,谷歌纵横,设置中的新“系统更新”选项。](http://cdn.arstechnica.net/wp-content/uploads/2013/12/11.png) -安卓1.1的所有新特性:语音搜索,安卓市场付费应用支持,谷歌纵横,设置中的新“系统更新”选项。 -Ron Amadeo供图 -安卓1.0发布四个半月后,2009年2月,安卓在安卓1.1中得到了它的第一个公开更新。系统方面没有太多变化,谷歌向1.1中添加新东西现如今也都已被关闭。谷歌语音搜索是安卓向云端语音搜索的第一个突击,它在应用抽屉里有自己的图标。尽管这个应用已经不能与谷歌服务器通讯,你可以[在iPhone上][2]看到它以前是怎么工作的。它还没有语音操作,但你可以说出想要搜索的,结果会显示在一个简单的谷歌搜索中。 +*安卓1.1的所有新特性:语音搜索,安卓市场付费应用支持,谷歌纵横,设置中的新“系统更新”选项。[Ron Amadeo供图]* -安卓市场添加了对付费应用的支持,但是就像beta客户端中一样,这个版本的安卓市场不再能够连接Google Play服务器。我们最多能够看到分类界面,你可以在免费应用,付费应用和全部应用中选择。 +安卓1.0发布四个半月后,2009年2月,安卓在安卓1.1中得到了它的第一个公开更新。系统方面没有太多变化,谷歌向1.1中添加的新东西现如今也都已被关闭。谷歌语音搜索是安卓向云端语音搜索的第一个突击,它在应用抽屉里有自己的图标。尽管这个应用已经不能与谷歌服务器通讯,你可以[在iPhone上][2]看到它以前是怎么工作的。它还没有语音操作,但你可以说出想要搜索的,结果会显示在一个简单的谷歌搜索中。 + +安卓市场添加了对付费应用的支持,但是就像beta客户端中一样,这个版本的安卓市场已经不能连接Google Play服务器。我们最多能够看到分类界面,你可以在免费应用、付费应用和全部应用中选择。 地图添加了[谷歌纵横][3],一个向朋友分享自己位置的方法。纵横在几个月前为了支持Google+而被关闭并且不再能够工作。地图菜单里有个纵横的选项,但点击它现在只会打开一个带载入中圆圈的画面,并永远停留在这里。 -安卓世界的系统更新来得更加迅速——或者至少是一条在运营商和OEM推送之前获得更新的途径——谷歌向“关于手机”界面添加了检查系统更新按钮。 +安卓世界的系统更新来得更加迅速——或者至少是一条在运营商和OEM推送之前获得更新的途径——谷歌也在“关于手机”界面添加了检查系统更新按钮。 ---------- @@ -98,7 +98,7 @@ Ron Amadeo供图 via: http://arstechnica.com/gadgets/2014/06/building-android-a-40000-word-history-of-googles-mobile-os/7/ -译者:[alim0x](https://github.com/alim0x) 校对:[校对者ID](https://github.com/校对者ID) +译者:[alim0x](https://github.com/alim0x) 校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 6a4aa07ed1504c80539173c3f8bedd4b1c1a39d0 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Fri, 6 Nov 2015 19:26:19 +0800 Subject: [PATCH 2407/2517] [Translated]20151227 How To Install Retro Terminal In Linux.md --- ... How To Install Retro Terminal In Linux.md | 76 ------------------- ... How To Install Retro Terminal In Linux.md | 74 ++++++++++++++++++ 2 files changed, 74 insertions(+), 76 deletions(-) delete mode 100644 sources/tech/20151027 How To Install Retro Terminal In Linux.md create mode 100644 translated/tech/20151027 How To Install Retro Terminal In Linux.md diff --git a/sources/tech/20151027 How To Install Retro Terminal In Linux.md b/sources/tech/20151027 How To Install Retro Terminal In Linux.md deleted file mode 100644 index 4de3e6d002..0000000000 --- a/sources/tech/20151027 How To Install Retro Terminal In Linux.md +++ /dev/null @@ -1,76 +0,0 @@ -FSSlc translating - -How To Install Retro Terminal In Linux -================================================================================ -![Retro Terminal in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux.jpeg) - -Nostalgic about the past? Get a slice of the past by **installing retro terminal app** [cool-retro-term][1] which, as the name suggests, is both cool and retro at the same. - -Do you remember the time when there were CRT monitors everywhere and the terminal screen used to flicker? You don’t need to be old to have witnessed it. If you watch movies set in early 90’s, you’ll see plenty of CRT monitors with green/B&W command prompt. It has a geeky aura which makes it cooler. - -If you are tired of terminal appearance and you need something cool and ‘new’, cool-retro-term will give you a vintage terminal appearance to relive the past. You also can change its color, animation kind, and add some effect to it. - -Here are few screenshots of the different looks of cool-retro-term: - -![Retro Terminal](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux-1.jpeg) - -![Retro Terminal Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux-2.jpeg) - -![Vintage Terminal](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux-3.jpeg) - -### Install cool-retro-term in Ubuntu based Linux distributions ### - -To install cool-retro-term in Ubuntu based Linux distributions, such as Linux Mint, elementary OS, Linux Lite etc, use the PPA below: - - sudo add-apt-repository ppa:noobslab/apps - sudo apt-get update - sudo apt-get install cool-retro-term - -### Install cool-retro-term in Arch based Linux distributions ### - -Installing cool-retro-term in Arch based Linux distributions such as [Antergos][2] and [Manjaro][3], use the following command: - - sudo pacman -S cool-retro-term - -### Install cool-retro-term from source code ### - -For installing this application from source code, you need to install a number of dependencies first. Some of the know dependencies in Ubuntu based distributions are: - - sudo apt-get install git build-essential qmlscene qt5-qmake qt5-default qtdeclarative5-dev qtdeclarative5-controls-plugin qtdeclarative5-qtquick2-plugin libqt5qml-graphicaleffects qtdeclarative5-dialogs-plugin qtdeclarative5-localstorage-plugin qtdeclarative5-window-plugin - -Known dependencies for other distributions can be found on the [github of cool-retro-term][4]. - -Now use commands below to compile the program: - - git clone https://github.com/Swordfish90/cool-retro-term.git - cd cool-retro-term - qmake && make - -Once the program is compiled, you can run it with this command: - - ./cool-retro-term - -If you like to have this app in program menu for quick access so that you won’t have to run it manually each time with the commands, you can use the command below: - - sudo cp cool-retro-term.desktop /usr/share/applications - -You can learn some more terminal tricks here. Enjoy the vintage terminal in Linux :) - -With inputs from: [Abhishek Prakash][5] - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/cool-retro-term/ - -作者:[Hossein Heydari][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/hossein/ -[1]:https://github.com/Swordfish90/cool-retro-term -[2]:http://itsfoss.com/tag/antergos/ -[3]:https://manjaro.github.io/ -[4]:https://github.com/Swordfish90/cool-retro-term -[5]:http://itsfoss.com/author/abhishek/ diff --git a/translated/tech/20151027 How To Install Retro Terminal In Linux.md b/translated/tech/20151027 How To Install Retro Terminal In Linux.md new file mode 100644 index 0000000000..b3b7b54b62 --- /dev/null +++ b/translated/tech/20151027 How To Install Retro Terminal In Linux.md @@ -0,0 +1,74 @@ +Linux 下如何安装 Retro Terminal +================================================================================ +![Retro Terminal in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux.jpeg) + +你有怀旧情节?那就试试 **安装 retro terminal 应用** [cool-retro-term][1] 来一瞥过去的时光吧。顾名思义,`cool-retro-term` 是一个兼具酷炫和怀旧的终端。 + +你还记得那段遍地都是 CRT 显示器、终端屏幕闪烁不停的时光吗?现在你并不需要穿越到过去来见证那段时光。假如你观看背景设置在上世纪 90 年代的电影,你就可以看到大量带有绿色或黑底白字的显像管显示器。再加上它们通常带有极客光环,这使得它们看起来更酷。 + +若你已经厌倦了你机器中终端的外表,正寻找某些炫酷且‘新奇’的东西,则 `cool-retro-term` 将会带给你一个复古的终端外表,使你可以重温过去。你也可以改变它的颜色、动画类型并添加一些额外的特效。 + +下面是不同外观下 `cool-retro-term` 的一些截图: + +![Retro Terminal](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux-1.jpeg) + +![Retro Terminal Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux-2.jpeg) + +![Vintage Terminal](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux-3.jpeg) + +### 在基于 Ubuntu 的 Linux 发行版本下安装 cool-retro-term ### + +如果想在基于 Ubuntu 的 Linux 发行版本下安装 cool-retro-term,例如 Linux Mint,elementary OS, Linux Lite 等,可以使用下面的 PPA: + + sudo add-apt-repository ppa:noobslab/apps + sudo apt-get update + sudo apt-get install cool-retro-term + +### 在基于 Arch 的 Linux 发行版本下安装 cool-retro-term ### + +若你想在诸如 [Antergos][2] 和 [Manjaro][3] 等基于 Arch 的 Linux 发行版本下安装 cool-retro-term ,则可以使用下面的命令: + + sudo pacman -S cool-retro-term + +### 从源代码安装 cool-retro-term ### + +如果你想从源代码安装这个应用,那么首先你需要安装一些依赖。在基于 Ubuntu 的发行版本中,已知的依赖有: + + sudo apt-get install git build-essential qmlscene qt5-qmake qt5-default qtdeclarative5-dev qtdeclarative5-controls-plugin qtdeclarative5-qtquick2-plugin libqt5qml-graphicaleffects qtdeclarative5-dialogs-plugin qtdeclarative5-localstorage-plugin qtdeclarative5-window-plugin + +对于其他发行版本,已知的依赖可以在 [cool-retro-term 的 github 页面][4] 中找到。 + +现在使用下面的命令来编译这个程序吧: + + git clone https://github.com/Swordfish90/cool-retro-term.git + cd cool-retro-term + qmake && make + +一旦程序编译成功,你就可以使用下面的命令来运行它了: + + ./cool-retro-term + +假如你想使得这个应用可在程序菜单中被快速获取到,以便你不用再每次手动地用命令来启动它,则你可以使用下面的命令: + + sudo cp cool-retro-term.desktop /usr/share/applications + +在这里你可以学到更多的终端技巧。在 Linux 中享受这个复古的终端吧 :) + +稿件来自: [Abhishek Prakash][5] + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/cool-retro-term/ + +作者:[Hossein Heydari][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/hossein/ +[1]:https://github.com/Swordfish90/cool-retro-term +[2]:http://itsfoss.com/tag/antergos/ +[3]:https://manjaro.github.io/ +[4]:https://github.com/Swordfish90/cool-retro-term +[5]:http://itsfoss.com/author/abhishek/ From f2863ffc1577e33ced2335b4bdd837615715f30d Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Fri, 6 Nov 2015 19:35:07 +0800 Subject: [PATCH 2408/2517] Update 20150827 The Strangest Most Unique Linux Distros.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- .../talk/20150827 The Strangest Most Unique Linux Distros.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150827 The Strangest Most Unique Linux Distros.md b/sources/talk/20150827 The Strangest Most Unique Linux Distros.md index 04ff47952a..83ead1f75e 100644 --- a/sources/talk/20150827 The Strangest Most Unique Linux Distros.md +++ b/sources/talk/20150827 The Strangest Most Unique Linux Distros.md @@ -1,3 +1,5 @@ +FSSlc Translating + The Strangest, Most Unique Linux Distros ================================================================================ From the most consumer focused distros like Ubuntu, Fedora, Mint or elementary OS to the more obscure, minimal and enterprise focused ones such as Slackware, Arch Linux or RHEL, I thought I've seen them all. Couldn't have been any further from the truth. Linux eco-system is very diverse. There's one for everyone. Let's discuss the weird and wacky world of niche Linux distros that represents the true diversity of open platforms. @@ -64,4 +66,4 @@ via: http://www.techdrivein.com/2015/08/the-strangest-most-unique-linux-distros. [10]:https://nixos.org/ [11]:http://www.gobolinux.org/ [12]:http://hannahmontana.sourceforge.net/ -[13]:http://rlsd2.dimakrasner.com/ \ No newline at end of file +[13]:http://rlsd2.dimakrasner.com/ From 020a91a9305e80fa7e033c327539b7e21579a48d Mon Sep 17 00:00:00 2001 From: ictlyh Date: Fri, 6 Nov 2015 22:38:02 +0800 Subject: [PATCH 2409/2517] Translated sources/tech/20151020 how to h2 in apache.md --- sources/tech/20151020 how to h2 in apache.md | 376 ------------------ .../tech/20151020 how to h2 in apache.md | 375 +++++++++++++++++ 2 files changed, 375 insertions(+), 376 deletions(-) delete mode 100644 sources/tech/20151020 how to h2 in apache.md create mode 100644 translated/tech/20151020 how to h2 in apache.md diff --git a/sources/tech/20151020 how to h2 in apache.md b/sources/tech/20151020 how to h2 in apache.md deleted file mode 100644 index 3618994f8b..0000000000 --- a/sources/tech/20151020 how to h2 in apache.md +++ /dev/null @@ -1,376 +0,0 @@ -ictlyh Translating -how to h2 in apache -================================================================================ -Copyright (C) 2015 greenbytes GmbH - -Support for HTTP/2 is finally being released with Apache httpd 2.4.17! This pages gives advice on how to build/deploy/configure it. The plan is to update this as people find out new things (read: bugs) or give recommendations on what works best for them. - -Ultimately, this will then flow back into the official Apache documentation and this page will only contain a single link to it. But we are not quite there yet... - -### Sources ### - -You can get the Apache release from [here][1]. HTTP/2 support is included in Apache 2.4.17 and upwards. I will not repeat instructions on how to build the server in general. There is excellent material available in several places, for example [here][2]. - -(Any links to experimental packages? Drop me a note on twitter @icing.) - -#### Building with HTTP/2 Support #### - -Should you build from a release, you will need to **configure** first. There are tons of options. The ones specific for HTTP/2 are: - -- **--enable-http2** - - This enables the module 'http2' which does implement the protocol inside the Apache server. - -- **--with-nghttp2=** - - This specifies a non-standard location for the library libnghttp2 which is necessary for the http2 module. If nghttp2 is in a standard place, the configure process will pick it up automatically. - -- **--enable-nghttp2-staticlib-deps** - - Ultra-rarely needed option that you may use to static link the nghttp2 library to the server. On most platforms, this only has an effect when there is no shared nghttp2 library to be found. - -In case you want to build nghttp2 for yourself, you find documentation at [nghttp2.org][3]. The library is also being shipped in the latest Fedora and other distros will follow. - -#### TLS Support #### - -Most people will want to use HTTP/2 with browsers and browser only support it on TLS connections (**https://** urls). You'll need proper configuration for that which I cover below. But foremost what you will need is an TLS library that supports the ALPN extension. - -ALPN is neccessary to negotiate the protocol to use between server and client. If it is not implemented by the TLS lib on your server, the client will only ever talk HTTP/1.1. So, who does link with Apache and support it? - -- **OpenSSL 1.0.2** and onward. -- ??? - -If you get your OpenSSL library from your Linux distro, the version number used there might be different from the official OpenSSL releases. Check with your distro in case of doubt. - -### Configuration ### - -One useful addition to your server is to set a good logging level for the http2 module. Add this: - - # this needs to be somewhere - LoadModule http2_module modules/mod_http2.so - - - LogLevel http2:info - - -When you start your server and look in the error log, you should see one line like: - - [timestamp] [http2:info] [pid XXXXX:tid numbers] - mod_http2 (v1.0.0, nghttp2 1.3.4), initializing... - -#### Protocols #### - -So, assume you have the server built and deployed, the TLS library is bleeding edge (sorry), your server starts, you open your browser and...how do you know it is working? - -If you have not added more to your server config, it probably isn't. - -You need to tell the server where to use the protocol. By default, the HTTP/2 protocol is not enabled anywhere in your server. Because that is the safe route and you might have an existing deployment should continue to work. - -You enable the HTTP/2 protocol with the new **Protocols** directive: - - # for a https server - Protocols h2 http/1.1 - ... - - # for a http server - Protocols h2c http/1.1 - -You can add this for the server in general or for specific **vhosts**. - -#### SSL Parameter #### - -HTTP/2 has some special requirements regarding TLS (SSL). See the chapter about [https:// connections][4] for more information. - -### http:// Connections (h2c) ### - -Although no browser currently supports it, the HTTP/2 protocol also works for http:// urls and mod_h[ttp]2 supports this. The only thing you need to do in order to enable it is the Protocols configuration: - - # for a http server - Protocols h2c http/1.1 - -inside your **httpd.conf**. - -There are several client (and client libraries) that support **h2c**. I'll dicusss some specifics below: - -#### curl #### - -Of course, the command line client for network resources, maintained by Daniel Stenberg. If you have curl on your system, there is an easy way to check its http/2 support: - - sh> curl -V - curl 7.43.0 (x86_64-apple-darwin15.0) libcurl/7.43.0 SecureTransport zlib/1.2.5 - Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp - Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets - -which is no good. There is no 'HTTP2' among the features. You'd want something like this: - - sh> curl -V - url 7.45.0 (x86_64-apple-darwin15.0.0) libcurl/7.45.0 OpenSSL/1.0.2d zlib/1.2.8 nghttp2/1.3.4 - Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp - Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets - -If you have a curl with the HTTP2 feature, you may check your server with some simple commands: - - sh> curl -v --http2 http:/// - ... - > Connection: Upgrade, HTTP2-Settings - > Upgrade: h2c - > HTTP2-Settings: AAMAAABkAAQAAP__ - > - < HTTP/1.1 101 Switching Protocols - < Upgrade: h2c - < Connection: Upgrade - * Received 101 - * Using HTTP2, server supports multi-use - * Connection state changed (HTTP/2 confirmed) - ... - - -Congratulations, id you see the line with **...101 Switching...**, it's working! - -There are cases, where the upgrade to HTTP/2 will not happen. When your first request does have content, for example you do a file upload, the Upgrade will not trigger. For a detailed explanation, see the section [h2c restrictions][5]. - -#### nghttp #### - -nghttp2 has its own client and servers that can be build with it. If you have the client on your system, you can verify your installation by simply retrieving a resource: - - sh> nghttp -uv http:/// - [ 0.001] Connected - [ 0.001] HTTP Upgrade request - ... - Connection: Upgrade, HTTP2-Settings - Upgrade: h2c - HTTP2-Settings: AAMAAABkAAQAAP__ - ... - [ 0.005] HTTP Upgrade response - HTTP/1.1 101 Switching Protocols - Upgrade: h2c - Connection: Upgrade - - [ 0.006] HTTP Upgrade success - ... - -which is very similar to the Upgrade dance we see in the **curl** example above. - -There is another way to use **h2c** hidden in the command line arguments: **-u**. This instructs **nghttp** to perform the HTTP/1 Upgrade dance. But what if we leave this out? - - sh> nghttp -v http:/// - [ 0.002] Connected - [ 0.002] send SETTINGS frame - ... - [ 0.002] send HEADERS frame - ; END_STREAM | END_HEADERS | PRIORITY - (padlen=0, dep_stream_id=11, weight=16, exclusive=0) - ; Open new stream - :method: GET - :path: / - :scheme: http - ... - -The connection immediately speaks HTTP/2! This is what the protocol calls the direct mode and it works by some magic 24 bytes that the client sends to the server right away: - - 0x505249202a20485454502f322e300d0a0d0a534d0d0a0d0a - or in ASCII: PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n - -A **h2c** capable server sees this on a new connection and can immediately switch its HTTP/2 processing on. A HTTP/1.1 server will see a funny request, answer it and close the connection. - -Therefore **direct** mode is only good for clients if they can be resonably sure that the server supports this. For example, because a previous Upgrade dance was successful. - -The charme of **direct** is the zero overhead and that it works for all requests, even those that carry a body (see [h2c restrictions][6]). The direct mode is enabled by default on any server that allows the h2c protocol. If you want to disable it, add the configuration directive: - -注:下面这行打删除线 - - H2Direct off - -注:下面这行打删除线 -to your server. - -For the 2.4.17 release, **H2Direct** is enabled by default on cleartext connection. However there are some modules with whom this is incompatible with. Therefore, in the next release, the default will change to **off** and if you want your server to support it, you need to set it to - - H2Direct on - -### https:// Connections (h2) ### - -Once you get mod_h[ttp]2 working for h2c connections, it's time to get the **h2** sibling going, as browsers only do it with **https:** nowadays. - -The HTTP/2 standard imposes some extra requirements on https: (TLS) connections. The ALPN extension has already been mentioned above. An additional requirement is that no cipher from a specified [black list][7] may be used. - -While the current version of **mod_h[ttp]2** does not enforce these ciphers (but some day will), most clients will do so. If you point your browser at a **h2** server with inappropriate ciphers, you will get the obscure warning **INADEQUATE_SECURITY** and the browser will simply refuse to continue. - -An acceptable Apache SSL configuration regarding this is: - - SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK - SSLProtocol All -SSLv2 -SSLv3 - ... - -(Yes, it's that long.) - -There are other SSL configuration parameters that should be tweaked, but do not have to: **SSLSessionCache**, **SSLUseStapling**, etc. but those are covered elsewhere. See the excellent [High Performance Browser Networking][8] by Ilya Grigorik, for example. - -#### curl #### - -Time to fire up a shell and use curl again (see the [h2c section about curl][9] for requirements). Using curl, you may check your server with some simple commands: - - sh> curl -v --http2 https:/// - ... - * ALPN, offering h2 - * ALPN, offering http/1.1 - ... - * ALPN, server accepted to use h2 - ... - - -Congratulations, it's working! If not, the reason might be: - -- Your curl does not support HTTP/2, see [this check][10]. -- Your openssl is old and does not support ALPN. -- Your certificate could not be verified or your cipher configuration is not accepted. Try adding the command line option -k to disable those checks in curl. If that works, review yor SSL configuration and certificate. - -#### nghttp #### - -**nghttp** we discussed already for **h2c**. If you use it for a **https:** connection, you will either see the resource or an error like this: - - sh> nghttp https:/// - [ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2) - -There are two possiblities for this which you can check by adding -v. Either your get this: - - sh> nghttp -v https:/// - [ 0.034] Connected - [ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2) - -This means that the TLS library your server uses does not implement ALPN. Getting this installtion correct is sometimes tricky. Use stackoverflow. - -Or you get this: - - sh> nghttp -v https:/// - [ 0.034] Connected - The negotiated protocol: http/1.1 - [ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2) - -which means ALPN is working, only the h2 protocol was not selected. You need to check that Protocols is set as described above for yourserver. Try setting it in the general section, in case you do not get it working in a vhost at first. - -#### Firefox #### - -Update: Steffen Land from [Apache Lounge][11] pointed me to the [HTTP/2 indicator Add-on for Firefox][12]. Nice if you want to see in how many places you already talk h2 (Hint: Apache Lounge talks h2 for some time now...). - -In Firefox you can to open the Developer Tools and there the Network tab to check for HTTP/2 connections. When you have those open and reload your html page, you see something like the following: - -![](https://icing.github.io/mod_h2/images/firefox-h2.png) - -Among the response headers, you see this strange **X-Firefox-Spdy** entry listing "h2". That is the indication that HTTP/2 is used on this **https:** connection. - -#### Google Chrome #### - -In Google Chrome, you will not see a HTTP/2 indicator in the developer tools. Instead, Chrome uses the special location **chrome://net-internals/#http2** to give information. - -If you have opened a page on your server and look at that net-internals page, you will see something like this: - -![](https://icing.github.io/mod_h2/images/chrome-h2.png) - -If your server is among the ones listed here, it is working. - -#### Microsoft Edge #### - -HTTP/2 is supported in the Windows 10 successor to Internet Explorer: Edge. Here you can also see the protocol used in the Developer Tools in the Network tab: - -![](https://icing.github.io/mod_h2/images/ie-h2.png) - -#### Safari #### - -In Apple's Safari, you open the Developer Tools and there the Network tab. Reload your server page and select the row in the Developer Tools that shows the load. If you enable the right side details view, look at the **Status**. It should show **HTTP/2.0 200** like here: - -![](https://icing.github.io/mod_h2/images/safari-h2.png) - -#### Renegotiations #### - -Renegotiations on a https: connection means that certain TLS parameters are changed on the running connection. In Apache httpd you can change TLS parameters in directory configurations. If a request arrives for a resource in a certain location, configured TLS parameter are compared to the current TLS parameters. If they differ, renegotiation is triggered. - -Most common use cases for this are cipher changes and client certificates. You can require clients to meet authentication only for special locations, or you might enable more secure, but CPU intensive ciphers for specific resources. - -Whatever your good use cases are, renegotiation are a **MUST NOT** in HTTP/2. With 100s of requests ongoing on the same connection, which renegotiation would otherwise occur when? - -The current **mod_h[ttp]2** does not protect you from such configuration. If you have a site which uses TLS renegotiation, DO NOT enable h2 on it! - -Again, we will address that in future releases so that you can enable it safely. - -### Restrictions ### - -#### Non-HTTP Protocols #### - -Modules implementing protocols other than HTTP may be incompatible with **mod_http2**. This will most certainly be the case when this other protocol requires the server to send data first. - -**NNTP** is one example of such a protocol. If you have a **mod_nntp_like_ssl** configured in your server, do not even load mod_http2. Wait for the next release. - -#### h2c Restrictions #### - -There are some restrictions on the **h2c** implementation, you should be aware of: - -#### Deny h2c on virtual host #### - -You cannot deny **h2c direct** on specific virtual hosts. **direct** gets triggered at connection setup when there is not request to be seen yet. Which makes it impossible to foresee which virtual host Apache needs to look at. - -#### Upgrade on request body #### - -The **h2c** Upgrade dance will not work on requests that have a body. Those are PUT and POST requests (form submits and uploads). If you write a client, you may precede those requests with a simple GET or an OPTIONS * to trigger the upgrade. - -The reason is quite technical in nature, but in case you want to know: during Upgrade, the connection is in a half insane state. The request is coming in HTTP/1.1 format and the response is being written in HTTP/2 frames. If the request carries a body, the server needs to read the whole body before it sends a response back. Because the response might need answers from the client for flow control among other things. But if the HTTP/1.1 request is still being sent, the client is unable to talk HTTP/2 yet. - -In order to make behaviour predictable, several server implementors decided to not do an Upgrade in the presence of any request bodies, even small ones. - -#### Upgrade on 302s #### - -The h2c Upgrade dance also does currently not work when there is a general redirect in place. Seems that rewrite happens before the mod_http2 has a chance to act. Certainly not a deal breaker, but might be confusing when you test a site that has it. - -#### h2 Restrictions #### - -There are some restrictions on the h2 implementation you should be aware of: - -#### Connection Reuse #### - -The HTTP/2 protocol allows reuse of TLS connections under certain conditions: if you have a certiface with wildcards or several altSubject names, browsers will reuse any existing connection they might have. Example: - -You have a certificate for **a.example.org** that has as additional name **b.example.org**. You open in your browser the url **https://a.example.org/**, open another tab and load **https://b.example.org/**. - -Before opening a new connection, the browser sees that it still has the one to **a.example.org** open and that the certificate is also valid for **b.example.org**. So, it sends the request for second tab over the connection of the first one. - -This connection reuse is intentional and makes it easier for sites that have invested in sharding for efficiency in HTTP/1 to also benefit from HTTP/2 without much change. - -In Apache **mod_h[ttp]2** this is not fully implemented, yet. When **a.example.org** and **b.example.org** are separate virtual hosts, Apache will not allow such connection reuse and inform the browser with status code **421 Misdirected Request** about it. The browser will understand that it has to open a new connection to **b.example.org**. All will work, however some efficiency gets lost. - -We expect to have the proper checks in place for the next release. - -Münster, 12.10.2015, - -Stefan Eissing, greenbytes GmbH - -Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. See LICENSE for details. - - ----------- - -This project is maintained by [icing][13] - --------------------------------------------------------------------------------- - -via: https://icing.github.io/mod_h2/howto.html - -作者:[icing][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://github.com/icing -[1]:https://httpd.apache.org/download.cgi -[2]:https://httpd.apache.org/docs/2.4/install.html -[3]:https://nghttp2.org/ -[4]:https://icing.github.io/mod_h2/howto.html#https -[5]:https://icing.github.io/mod_h2/howto.html#h2c-restrictions -[6]:https://icing.github.io/mod_h2/howto.html#h2c-restrictions -[7]:https://httpwg.github.io/specs/rfc7540.html#BadCipherSuites -[8]:http://chimera.labs.oreilly.com/books/1230000000545 -[9]:https://icing.github.io/mod_h2/howto.html#curl -[10]:https://icing.github.io/mod_h2/howto.html#curl -[11]:https://www.apachelounge.com/ -[12]:https://addons.mozilla.org/en-US/firefox/addon/spdy-indicator/ -[13]:https://github.com/icing \ No newline at end of file diff --git a/translated/tech/20151020 how to h2 in apache.md b/translated/tech/20151020 how to h2 in apache.md new file mode 100644 index 0000000000..32420d5bf4 --- /dev/null +++ b/translated/tech/20151020 how to h2 in apache.md @@ -0,0 +1,375 @@ +如何在 Apache 中启用 HTTP/2 +================================================================================ +Copyright (C) 2015 greenbytes GmbH + +刚发布的 Apache httpd 2.4.17 终于支持 HTTP/2 了。这个页面给出了一些如何构建/部署/配置的建议。目的是为了大家发现 bugs 时能升级它,或者给一些能更好工作的建议。 + +最后,这会归并回到官方 Apache 文档,这里只会留下一个到那里的链接。暂时我们还没做到。 + +### 源码 ### + +你可以从[这里][1]得到 Apache 发行版。Apache 2.4.17 及其更高版本都支持 HTTP/2。我不会再重复介绍如何构建服务器的指令。在很多地方有很好的指南,例如[这里][2]。 + +(有任何试验的链接?在 Twitter 上告诉我吧 @icing) + +#### 编译支持 HTTP/2 #### + +在你编译发行版之前,你要进行一些**配置**。这里有成千上万的选项。和 HTTP/2 相关的是: + +- **--enable-http2** + + 启用在 Apache 服务器内部实现协议的 ‘http2’ 模块。 + +- **--with-nghttp2=** + + 指定 http2 模块需要的 libnghttp2 模块的非默认位置。如果 nghttp2 是在默认的位置,配置过程会自动采用。 + +- **--enable-nghttp2-staticlib-deps** + + 很少用到的选项,你可能用来静态链接 nghttp2 库到服务器。在大部分平台上,只有在找不到共享 nghttp2 库时才有效。 + +如果你想自己编译 nghttp2,你可以到 [nghttp2.org][3] 查看文档。最新的 Fedora 以及其它发行版已经附带了这个库。 + +#### TLS 支持 #### + +大部分人想在浏览器上使用 HTTP/2, 而浏览器只在 TLS 连接(**https:// 开头的 url)时支持它。你需要一些我下面介绍的配置。但首先你需要的是支持 ALPN 扩展的 TLS 库。 + + +ALPN 用来屏蔽服务器和客户端之间的协议。如果你服务器上 TLS 库还没有实现 ALPN,客户端只能通过 HTTP/1.1 通信。那么,和 Apache 连接的到底是什么?又是什么支持它呢? + +- **OpenSSL 1.0.2** 即将到来。 +- ??? + +如果你的 OpenSSL 库是 Linux 发行版自带的,这里使用的版本号可能和官方 OpenSSL 发行版的不同。如果不确定的话检查一下你的 Linux 发行版吧。 + +### 配置 ### + +另一个给服务器的好建议是为 http2 模块设置合适的日志等级。添加下面的配置: + + # 某个地方有这样一行 + LoadModule http2_module modules/mod_http2.so + + + LogLevel http2:info + + +当你启动服务器的时候,你可以在错误日志中看来类似的一行: + + [timestamp] [http2:info] [pid XXXXX:tid numbers] + mod_http2 (v1.0.0, nghttp2 1.3.4), initializing... + +#### 协议 #### + +那么,假设你已经编译部署好了服务器, TLS 库也是最新的,你启动了你的服务器,打开了浏览器。。。你怎么知道它在工作呢? + +如果除此之外你没有添加其它到服务器配置,很可能它没有工作。 + +你需要告诉服务器在哪里使用协议。默认情况下,你的服务器并没有启动 HTTP/2 协议。因为这是安全路由,你可能要有一套部署了才能继续。 + +你用 **Protocols** 命令启用 HTTP/2 协议: + + # for a https server + Protocols h2 http/1.1 + ... + + # for a http server + Protocols h2c http/1.1 + +你可以给一般服务器或者指定的 **vhosts** 添加这个配置。 + +#### SSL 参数 #### + +对于 TLS (SSL),HTTP/2 有一些特殊的要求。阅读 [https:// 连接][4]了解更详细的信息。 + +### http:// 连接 (h2c) ### + +尽管现在还没有浏览器支持 HTTP/2 协议, http:// 这样的 url 也能正常工作, 因为有 mod_h[ttp]2 的支持。启用它你只需要做的一件事是在 **httpd.conf** 配置 Protocols : + + # for a http server + Protocols h2c http/1.1 + + +这里有一些支持 **h2c** 的客户端(和客户端库)。我会在下面介绍: + +#### curl #### + +Daniel Stenberg 维护的网络资源命令行客户端 curl 当然支持。如果你的系统上有 curl,有一个简单的方法检查它是否支持 http/2: + + sh> curl -V + curl 7.43.0 (x86_64-apple-darwin15.0) libcurl/7.43.0 SecureTransport zlib/1.2.5 + Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp + Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets + +不好了。这些功能中没有 'HTTP2'。你想要的是下面这样: + + sh> curl -V + url 7.45.0 (x86_64-apple-darwin15.0.0) libcurl/7.45.0 OpenSSL/1.0.2d zlib/1.2.8 nghttp2/1.3.4 + Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp + Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets + +如果你的 curl 支持 HTTP2 功能,你可以用一些简单的命令检查你的服务器: + + sh> curl -v --http2 http:/// + ... + > Connection: Upgrade, HTTP2-Settings + > Upgrade: h2c + > HTTP2-Settings: AAMAAABkAAQAAP__ + > + < HTTP/1.1 101 Switching Protocols + < Upgrade: h2c + < Connection: Upgrade + * Received 101 + * Using HTTP2, server supports multi-use + * Connection state changed (HTTP/2 confirmed) + ... + + +恭喜,如果看到了有 **...101 Switching...** 的行就表示它正在工作! + +有一些情况不会发生到 HTTP/2 的 Upgrade 。如果你的第一个请求没有内容,例如你上传一个文件,就不会触发 Upgrade。[h2c 限制][5]部分有详细的解释。 + +#### nghttp #### + +nghttp2 有能一起编译的客户端和服务器。如果你的系统中有客户端,你可以简单地通过获取资源验证你的安装: + + sh> nghttp -uv http:/// + [ 0.001] Connected + [ 0.001] HTTP Upgrade request + ... + Connection: Upgrade, HTTP2-Settings + Upgrade: h2c + HTTP2-Settings: AAMAAABkAAQAAP__ + ... + [ 0.005] HTTP Upgrade response + HTTP/1.1 101 Switching Protocols + Upgrade: h2c + Connection: Upgrade + + [ 0.006] HTTP Upgrade success + ... + + +这和我们上面 **curl** 例子中看到的 Upgrade 输出很相似。 + +在命令行参数中隐藏着一种可以使用 **h2c**:的参数:**-u**。这会指示 **nghttp** 进行 HTTP/1 Upgrade 过程。但如果我们不使用呢? + + sh> nghttp -v http:/// + [ 0.002] Connected + [ 0.002] send SETTINGS frame + ... + [ 0.002] send HEADERS frame + ; END_STREAM | END_HEADERS | PRIORITY + (padlen=0, dep_stream_id=11, weight=16, exclusive=0) + ; Open new stream + :method: GET + :path: / + :scheme: http + ... + +连接马上显示出了 HTTP/2!这就是协议中所谓的直接模式,当客户端发送一些特殊的 24 字节到服务器时就会发生: + + 0x505249202a20485454502f322e300d0a0d0a534d0d0a0d0a + or in ASCII: PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n + +支持 **h2c** 的服务器在一个新的连接中看到这些信息就会马上切换到 HTTP/2。HTTP/1.1 服务器则认为是一个可笑的请求,响应并关闭连接。 + +因此 **直接** 模式只适合于那些确定服务器支持 HTTP/2 的客户端。例如,前一个 Upgrade 过程是成功的。 + +**直接** 模式的魅力是零开销,它支持所有请求,即使没有 body 部分(查看[h2c 限制][6])。任何支持 h2c 协议的服务器默认启用了直接模式。如果你想停用它,可以添加下面的配置指令到你的服务器: + +注:下面这行打删除线 + + H2Direct off + +注:下面这行打删除线 + +对于 2.4.17 发行版,默认明文连接时启用 **H2Direct** 。但是有一些模块和这不兼容。因此,在下一发行版中,默认会设置为**off**,如果你希望你的服务器支持它,你需要设置它为: + + H2Direct on + +### https:// 连接 (h2) ### + +一旦你的 mod_h[ttp]2 支持 h2c 连接,就是时候一同启用 **h2**,因为现在的浏览器支持它和 **https:** 一同使用。 + +HTTP/2 标准对 https:(TLS)连接增加了一些额外的要求。上面已经提到了 ALNP 扩展。另外的一个要求是不会使用特定[黑名单][7]中的密码。 + +尽管现在版本的 **mod_h[ttp]2** 不增强这些密码(以后可能会),大部分客户端会这么做。如果你用不切当的密码在浏览器中打开 **h2** 服务器,你会看到模糊警告**INADEQUATE_SECURITY**,浏览器会拒接连接。 + +一个可接受的 Apache SSL 配置类似: + + SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK + SSLProtocol All -SSLv2 -SSLv3 + ... + +(是的,这确实很长。) + +这里还有一些应该调整的 SSL 配置参数,但不是必须:**SSLSessionCache**, **SSLUseStapling** 等,其它地方也有介绍这些。例如 Ilya Grigorik 写的一篇博客 [高性能浏览器网络][8]。 + +#### curl #### + +再次回到 shell 并使用 curl(查看 [curl h2c 章节][9] 了解要求)你也可以通过 curl 用简单的命令检测你的服务器: + + sh> curl -v --http2 https:/// + ... + * ALPN, offering h2 + * ALPN, offering http/1.1 + ... + * ALPN, server accepted to use h2 + ... + + +恭喜你,能正常工作啦!如果还不能,可能原因是: + +- 你的 curl 不支持 HTTP/2。查看[检测][10]。 +- 你的 openssl 版本太低不支持 ALPN。 +- 不能验证你的证书,或者不接受你的密码配置。尝试添加命令行选项 -k 停用 curl 中的检查。如果那能工作,还要重新配置你的 SSL 和证书。 + +#### nghttp #### + +我们已经在 **h2c** 讨论过 **nghttp**。如果你用它来进行 **https:** 连接,你会看到类似下面的信息: + + sh> nghttp https:/// + [ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2) + +这有两种可能,你可以通过添加 -v 来检查。如果是: + + sh> nghttp -v https:/// + [ 0.034] Connected + [ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2) + +这意味着你服务器使用的 TLS 库没有实现 ALPN。有时候正确安装有点困难。多看看 Stackoverflow 吧。 + +你看到的也可能是: + + sh> nghttp -v https:/// + [ 0.034] Connected + The negotiated protocol: http/1.1 + [ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2) + +这表示 ALPN 能正常工作,但并没有用 h2 协议。你需要像上面介绍的那样在服务器上选中那个协议。如果一开始在 vhost 部分选中不能正常工作,试着在通用部分选中它。 + +#### Firefox #### + +Update: [Apache Lounge][11] 的 Steffen Land 告诉我 [Firefox HTTP/2 指示插件][12]。你可以看到有多少地方用到了 h2(提示:Apache Lounge 用 h2 已经有一段时间了。。。) + +你可以在 Firefox 浏览器中打开开发者工具,在那里的网络标签页查看 HTTP/2 连接。当你打开了 HTTP/2 并重新刷新 html 页面时,你会看到类似下面的东西: + +![](https://icing.github.io/mod_h2/images/firefox-h2.png) + +在响应头中,你可以看到奇怪的 **X-Firefox-Spdy** 条目中列出了 “h2”。这表示在这个 **https:** 连接中使用了 HTTP/2。 + +#### Google Chrome #### + +在 Google Chrome 中,你在开发者工具中看不到 HTTP/2 指示器。相反,Chrome 用特殊的地址 **chrome://net-internals/#http2** 给出了相关信息。 + +如果你在服务器中打开了一个页面并在 Chrome 那个页面查看,你可以看到类似下面这样: + +![](https://icing.github.io/mod_h2/images/chrome-h2.png) + +如果你的服务器在上面的列表中,就表示它正在工作。 + +#### Microsoft Edge #### + +Windows 10 中 Internet Explorer 的继任者 Edge 也支持 HTTP/2。你也可以在开发者工具的网络标签页看到 HTTP/2 协议。 + +![](https://icing.github.io/mod_h2/images/ie-h2.png) + +#### Safari #### + +在 Apple 的 Safari 中,打开开发者工具,那里有个网络标签页。重新加载你的服务器页面并在开发者工具中选择显示了加载的行。如果你启用了在右边显示详细试图,看 **状态** 部分。那里显示了 **HTTP/2.0 200**,类似: + +![](https://icing.github.io/mod_h2/images/safari-h2.png) + +#### 重新协商 #### + +https: 连接重新协商是指正在运行的连接中特定的 TLS 参数会发生变化。在 Apache httpd 中,你可以通过目录中的配置文件修改 TLS 参数。如果一个要获取特定位置资源的请求到来,配置的 TLS 参数会和当前的 TLS 参数进行对比。如果它们不相同,就会触发重新协商。 + +这种最常见的情形是密码变化和客户端验证。你可以要求客户访问特定位置时需要通过验证,或者对于特定资源,你可以使用更安全的, CPU 敏感的密码。 + +不管你的想法有多么好,HTTP/2 中都**不可以**发生重新协商。如果有 100 多个请求到同一个地方,什么时候哪个会发生重新协商呢? + +对于这种配置,现有的 **mod_h[ttp]2** 还不能保证你的安全。如果你有一个站点使用了 TLS 重新协商,别在上面启用 h2! + +当然,我们会在后面的发行版中解决这个问题然后你就可以安全地启用了。 + +### 限制 ### + +#### 非 HTTP 协议 ### + +实现除 HTTP 之外协议的模块可能和 **mod_http2** 不兼容。这在其它协议要求服务器首先发送数据时无疑会发生。 + +**NNTP** 就是这种协议的一个例子。如果你在服务器中配置了 **mod_nntp_like_ssl**,甚至都不要加载 mod_http2。等待下一个发行版。 + +#### h2c 限制 #### + +**h2c** 的实现还有一些限制,你应该注意: + +#### 在虚拟主机中拒绝 h2c #### + +你不能对指定的虚拟主机拒绝 **h2c 直连**。连接建立而没有看到请求时会触发**直连**,这使得不可能预先知道 Apache 需要查找哪个虚拟主机。 + +#### 升级请求体 #### + +对于有 body 部分的请求,**h2c** 升级不能正常工作。那些是 PUT 和 POST 请求(用于提交和上传)。如果你写了一个客户端,你可能会用一个简单的 GET 去处理请求或者用选项 * 去触发升级。 + +原因从技术层面来看显而易见,但如果你想知道:升级过程中,连接处于半疯状态。请求按照 HTTP/1.1 的格式,而响应使用 HTTP/2。如果请求有一个 body 部分,服务器在发送响应之前需要读取整个 body。因为响应可能需要从客户端处得到应答用于流控制。但如果仍在发送 HTTP/1.1 请求,客户端就还不能处理 HTTP/2 连接。 + +为了使行为可预测,几个服务器实现商决定不要在任何请求体中进行升级,即使 body 很小。 + +#### 升级 302s #### + +有重定向发生时当前 h2c 升级也不能工作。看起来 mod_http2 之前的重写有可能发生。这当然不会导致断路,但你测试这样的站点也许会让你迷惑。 + +#### h2 限制 #### + +这里有一些你应该意识到的 h2 实现限制: + +#### 连接重用 #### + +HTTP/2 协议允许在特定条件下重用 TLS 连接:如果你有带通配符的证书或者多个 AltSubject 名称,浏览器可能会重用现有的连接。例如: + +你有一个 **a.example.org** 的证书,它还有另外一个名称 **b.example.org**。你在浏览器中打开 url **https://a.example.org/**,用另一个标签页加载 **https://b.example.org/**。 + +在重新打开一个新的连接之前,浏览器看到它有一个到 **a.example.org** 的连接并且证书对于 **b.example.org** 也可用。因此,它在第一个连接上面向第二个标签页发送请求。 + +这种连接重用是刻意设计的,它使得致力于 HTTP/1 切分效率的站点能够不需要太多变化就能利用 HTTP/2。 + +Apache **mod_h[ttp]2** 还没有完全实现这点。如果 **a.example.org** 和 **b.example.org** 是不同的虚拟主机, Apache 不会允许这样的连接重用,并会告知浏览器状态码**421 错误请求**。浏览器会意识到它需要重新打开一个到 **b.example.org** 的连接。这仍然能工作,只是会降低一些效率。 + +我们期望下一次的发布中能有切当的检查。 + +Münster, 12.10.2015, + +Stefan Eissing, greenbytes GmbH + +Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. See LICENSE for details. + + +---------- + +该项目由 [icing][13] 维护。 + +-------------------------------------------------------------------------------- + +via: https://icing.github.io/mod_h2/howto.html + +作者:[icing][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog/) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://github.com/icing +[1]:https://httpd.apache.org/download.cgi +[2]:https://httpd.apache.org/docs/2.4/install.html +[3]:https://nghttp2.org/ +[4]:https://icing.github.io/mod_h2/howto.html#https +[5]:https://icing.github.io/mod_h2/howto.html#h2c-restrictions +[6]:https://icing.github.io/mod_h2/howto.html#h2c-restrictions +[7]:https://httpwg.github.io/specs/rfc7540.html#BadCipherSuites +[8]:http://chimera.labs.oreilly.com/books/1230000000545 +[9]:https://icing.github.io/mod_h2/howto.html#curl +[10]:https://icing.github.io/mod_h2/howto.html#curl +[11]:https://www.apachelounge.com/ +[12]:https://addons.mozilla.org/en-US/firefox/addon/spdy-indicator/ +[13]:https://github.com/icing \ No newline at end of file From 561971ccf0adf73b037a26f8f43a2c6780b55516 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 7 Nov 2015 00:36:33 +0800 Subject: [PATCH 2410/2517] PUB:Learn with Linux--Master Your Math with These Linux Apps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @KnightJoker 翻译的不错!https://linux.cn/article-6546-1.html --- ...-Master Your Math with These Linux Apps.md | 126 ++++++++++++++++++ ...-Master Your Math with These Linux Apps.md | 126 ------------------ 2 files changed, 126 insertions(+), 126 deletions(-) create mode 100644 published/Learn with Linux--Master Your Math with These Linux Apps.md delete mode 100644 translated/tech/Learn with Linux--Master Your Math with These Linux Apps.md diff --git a/published/Learn with Linux--Master Your Math with These Linux Apps.md b/published/Learn with Linux--Master Your Math with These Linux Apps.md new file mode 100644 index 0000000000..7d8c9e1b5c --- /dev/null +++ b/published/Learn with Linux--Master Your Math with These Linux Apps.md @@ -0,0 +1,126 @@ +与 Linux 一起学习:使用这些 Linux 应用来征服你的数学学习 +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-featured.png) + +这篇文章是[与 Linux 一起学习][1]系列的一部分: + +- [与 Linux 一起学习: 学习类型][2] +- [与 Linux 一起学习: 物理模拟][3] +- [与 Linux 一起学习: 学习音乐][4] +- [与 Linux 一起学习: 两个地理应用程序][5] +- [与 Linux 一起学习: 使用这些 Linux 应用来征服你的数学学习][6] + +Linux 提供了大量的教育软件和许多优秀的工具来帮助各种年龄段和年级的学生学习和练习各种各样的习题,这通常是以交互的方式进行。“与 Linux 一起学习”这一系列的文章则为这些各种各样的教育软件和应用提供了一个介绍。 + +数学是计算机的核心。如果有人预期一个类如 GNU/ Linux 这样的伟大的操作系统精确而严格,那么这就是数学所起到的作用。如果你在寻求一些数学应用程序,那么你将不会感到失望。Linux 提供了很多优秀的工具使得数学看起来和你曾经做过的一样令人畏惧,但实际上他们会简化你使用它的方式。 + +### Gnuplot ### + +Gnuplot 是一个适用于不同平台的命令行脚本化和多功能的图形工具。尽管它的名字中带有“GNU”,但是它并不是 GNU 操作系统的一部分。虽然不是自由授权,但它是免费软件(这意味着它受版权保护,但免费使用)。 + +要在 Ubuntu 系统(或者衍生系统)上安装 `gnuplot`,输入: + + sudo apt-get install gnuplot gnuplot-x11 + +进入一个终端窗口。启动该程序,输入: + + gnuplot + +你会看到一个简单的命令行界面: + +![learnmath-gnuplot](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot.png) + +在其中您可以直接输入函数开始。绘图命令将绘制一个曲线图。 + +输入内容,例如, + + plot sin(x)/x + +随着`gnuplot的`提示,将会打开一个新的窗口,图像便会在里面呈现。 + +![learnmath-gnuplot-plot1](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-plot1.png) + +你也可以即时设置设置这个图的不同属性,比如像这样指定“title” + + 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) + +你可以做的更深入一点,使用`splot`命令绘制3D图形: + + splot sin(x*y/20) + +![learnmath-gnuplot-plot3](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-plot3.png) + +这个图形窗口有几个基本的配置选项, + +![learnmath-gnuplot-options](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-options.png) + +但是`gnuplot`的真正力量在于在它的命令行和脚本功能,`gnuplot`更完整的文档在[Duke大学网站][8]上面[找到][7],带有这个了不起的教程的原始版本。 + +### Maxima ### + +[Maxima][9]是一个源于 Macsyma 开发的一个计算机代数系统,根据它的 SourceForge 页面所述: + +> “Maxima 是一个操作符号和数值表达式的系统,包括微分,积分,泰勒级数,拉普拉斯变换,常微分方程,线性方程组,多项式,集合,列表,向量,矩阵和张量等。Maxima 通过精确的分数,任意精度的整数和可变精度浮点数产生高精度的计算结果。Maxima 可以以二维和三维的方式绘制函数和数据。“ + +大多数Ubuntu衍生系统都有 Maxima 二进制包以及它的图形界面,要安装这些软件包,输入: + + sudo apt-get install maxima xmaxima wxmaxima + +在终端窗口中,Maxima 是一个没有什么 UI 的命令行工具,但如果你开始 wxmaxima,你会进入一个简单但功能强大的图形用户界面。 + +![learnmath-maxima](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima.png) + +你可以通过简单的输入来开始。(提示:回车会增加更多的行,如果你想计算一个表达式,使用“Shift + Enter”。) + +Maxima 可以用于一些简单的问题,因此也可以作为一个计算器: + +![learnmath-maxima-1and1](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-1and1.png) + +以及一些更复杂的问题: + +![learnmath-maxima-functions](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-functions.png) + +它使用`gnuplot`使得绘制简单: + +![learnmath-maxima-plot](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-plot.png) + +或者绘制一些复杂的图形。 + +![learnmath-maxima-plot2](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-plot2.png) + +(它需要 gnuplot-X11 的软件包来显示它们。) + +除了将表达式表示为图形,Maxima 也可以用 latex 格式导出它们,或者通过右键快捷菜单进行一些常用操作. + +![learnmath-maxima-menu](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-menu.png) + +不过其主菜单还是提供了大量重磅功能,当然 Maxima 的功能远不止如此,这里也有一个广泛使用的[在线文档][10]。 + +### 总结 ### + +数学不是一门容易的学科,这些在 Linux 上的优秀软件也没有使得数学更加容易,但是这些应用使得使用数学变得更加的简单和方便。以上两种应用都只是介绍一下 Linux 所提供的。如果你是认真从事数学和需要更多的功能与丰富的文档,那你更应该看看这些 [Mathbuntu][11] 项目。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/learn-linux-maths/ + +作者:[Attila Orosz][a] +译者:[KnightJoker](https://github.com/KnightJoker/KnightJoker) +校对:[wxyD](https://github.com/wxy) + +本文由 [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/translated/tech/Learn with Linux--Master Your Math with These Linux Apps.md b/translated/tech/Learn with Linux--Master Your Math with These Linux Apps.md deleted file mode 100644 index f4625c6c13..0000000000 --- a/translated/tech/Learn with Linux--Master Your Math with These Linux Apps.md +++ /dev/null @@ -1,126 +0,0 @@ -Translated by KnightJoker - -用Linux学习:使用这些Linux应用来征服你的数学 -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-featured.png) - -这篇文章是[用Linux学习][1]系列的一部分: - -- [用Linux学习: 学习类型][2] -- [用Linux学习: 物理模拟][3] -- [用Linux学习: 学习音乐][4] -- [用Linux学习: 两个地理应用程序][5] -- [用Linux学习: 用这些Linux应用来征服你的数学][6] - - -Linux提供了大量的教育软件和许多优秀的工具来帮助所有年龄段的学生学习和练习各种各样的话题,常常以交互的方式。与Linux一起学习这一系列的文章则为这些各种各样的教育软件和应用提供了一个介绍。 - -数学是计算机的核心。如果有人用精益求精和纪律来预期一个伟大的操作系统,比如GNU/ Linux,那么这将是数学。如果你在寻求一些数学应用程序,那么你将不会感到失望。Linux提供了很多优秀的工具使得数学看起来和你曾经做过的一样令人畏惧,但实际上他们会简化你使用它的方式。 -### Gnuplot ### - -Gnuplot 是一个适用于不同平台的命令行脚本化和多功能的图形工具。尽管它的名字,并不是GNU操作系统的一部分。也没有免费授权,但它是免费软件(这意味着它受版权保护,但免费使用)。 - -要在Ubuntu系统(或者衍生系统)上安装 `gnuplot`,输入: - sudo apt-get install gnuplot gnuplot-x11 - -进入一个终端窗口。启动该程序,输入: - - gnuplot - -你会看到一个简单的命令行界面: - -![learnmath-gnuplot](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot.png) - -在其中您可以直接开始输入函数。绘图命令将绘制一个曲线图。 - -输入内容,例如, - - plot sin(x)/x - -随着`gnuplot的`提示,将会打开一个新的窗口,图像便会在里面呈现。 - -![learnmath-gnuplot-plot1](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-plot1.png) - -你也可以在线这个图设置不同的属性,比如像这样指定“title” - - 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) - -使用`splot`命令,你可以给的东西更深入一点并且绘制3D图形 - - splot sin(x*y/20) - -![learnmath-gnuplot-plot3](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-plot3.png) - -这个窗口有几个基本的配置选项, - -![learnmath-gnuplot-options](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-gnuplot-options.png) - -但是`gnuplot`的真正力量在于在它的命令行和脚本功能,`gnuplot`广泛完整的文档可在这里找到,并在[Duke大学网站][8]上面看见这个了不起的教程[7]的原始版本。 - -### Maxima ### - -[Maxima][9]是从Macsyma原始资料开发的一个计算机代数系统,根据它的 SourceForge 页面, - -> “Maxima是符号和数值的表达,包括微分,积分,泰勒级数,拉普拉斯变换,常微分方程,线性方程组,多项式,集合,列表,向量,矩阵和张量系统的操纵系统。Maxima通过精确的分数,任意精度的整数和可变精度浮点数产生高精度的计算结果。Maxima可以二维和三维中绘制函数和数据。“ - -你将会获得二进制包用于大多数Ubuntu衍生系统的Maxima以及它的图形界面中,插入所有包,输入: - - sudo apt-get install maxima xmaxima wxmaxima - -在终端窗口中,Maxima是一个没有太多UI的命令行工具,但如果你开始wxmaxima,你会进入一个简单但功能强大的图形用户界面。 - -![learnmath-maxima](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima.png) - -你可以开始输入这个来简单的一个开始。(提示:如果你想计算一个表达式,使用“Shift + Enter”回车后会增加更多的方法) - -Maxima可以用于一些简单的问题,因此也可以作为一个计算器, - -![learnmath-maxima-1and1](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-1and1.png) - -以及一些更复杂的问题, - -![learnmath-maxima-functions](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-functions.png) - -它使用`gnuplot`使得绘制简单, - -![learnmath-maxima-plot](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-plot.png) - -或者绘制一些复杂的图形. - -![learnmath-maxima-plot2](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-plot2.png) - -(它需要gnuplot-X11的包,来显示它们。) - -除了美化一些图形,Maxima也尽可能用latex格式导出它们,或者通过右键是捷菜单进行一些突出的操作. - -![learnmath-maxima-menu](https://www.maketecheasier.com/assets/uploads/2015/07/learnmath-maxima-menu.png) - -然而其主菜单还是提供了大量压倒性的功能,当然Maxima的功能远不止如此,这里也有一个广泛使用的在线文档。 - -### 总结 ### - -数学不是一个简单的学科,这些在Linux上的优秀软件也没有使得数学更加简单,但是这些应用使得使用数学变得更加的简单和工程化。以上两种应用都只是介绍一下Linux的所提供的。如果你是认真从事数学和需要更多的功能与丰富的文档,那你更应该看看这些Mathbuntu项目。 --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/learn-linux-maths/ - -作者:[Attila Orosz][a] -译者:[KnightJoker](https://github.com/KnightJoker/译者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 From 2ce52d84d8f1780ca326659601a1a5d334595527 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sat, 7 Nov 2015 00:53:16 +0800 Subject: [PATCH 2411/2517] Update 20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md --- ...th Answers--How to install Ubuntu desktop behind a proxy.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md index c5cd0b5420..7ceced012d 100644 --- a/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md +++ b/sources/tech/20151105 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy ================================================================================ > **Question**: My computer is connected to a corporate network sitting behind an HTTP proxy. When I try to install Ubuntu desktop on the computer from a CD-ROM drive, the installation hangs and never finishes while trying to retrieve files, which is presumably due to the proxy. However, the problem is that Ubuntu installer never asks me to configure proxy during installation procedure. Then how can I install Ubuntu desktop behind a proxy? @@ -58,4 +59,4 @@ via: http://ask.xmodulo.com/install-ubuntu-desktop-behind-proxy.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 05868aa81aa1840e74ba9b05b9e9fd07320e5d87 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sat, 7 Nov 2015 10:16:44 +0800 Subject: [PATCH 2412/2517] Delete 20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md --- ...to find which shell I am using on Linux.md | 93 ------------------- 1 file changed, 93 deletions(-) delete mode 100644 sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md diff --git a/sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md b/sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md deleted file mode 100644 index b93eb6db06..0000000000 --- a/sources/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md +++ /dev/null @@ -1,93 +0,0 @@ - -translation by strugglingyouth -Linux FAQs with Answers--How to find which shell I am using on Linux -================================================================================ -> **Question**: I often change between different shells at the command line. Is there a quick and easy way to find out which shell I am currently in? Also how can I find out the version of the shell? - -### Find out Which Shell You are In ### - -There are different ways to tell what shell you are currently in. The easiest way to find that out is by using special shell parameters. - -For one, [a special parameter named "$$"][1] denotes the PID of the current instance of the shell you are running. This parameter is read-only and cannot be modified. So the following command will also show you the name of the shell you are running: - - $ ps -p $$ - ----------- - - PID TTY TIME CMD - 21666 pts/4 00:00:00 bash - -The above command works across all available shells. - -If you are not using csh, another way to find out the current shell is to use an special shell parameter called "$$", which denotes the name of the shell or shell script that is currently running. This is one of the Bash special parameters, but available in other shells as well, such as sh, zsh, tcsh or dash. Using echo command to print out its value will tell you the name of the shell you are currently in. - - $ echo $0 - ----------- - - bash - -Don't be confused with a separate environment variable called $SHELL, which is set to the full path to your default shell. As such, this variable is not necessarily point to the current shell you are using. For example, $SHELL remains the same even if you invoke a different shell within a terminal. - - $ echo $SHELL - ----------- - - /bin/shell - -![](https://c2.staticflickr.com/6/5688/22544087680_4a9c180485_c.jpg) - -Thus to find out the current shell, you should use either $$ or $0, but not $SHELL. - -### Find out the Version of the Shell You are Using ### - -Once you know which shell you are in, you may want to find out what version of the shell it is. For that, type the name of your shell followed by "--version" at the command line. For example: - -**For** bash **shell**: - - $ bash --version - ----------- - - GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu) - Copyright (C) 2013 Free Software Foundation, Inc. - License GPLv3+: GNU GPL version 3 or later - - This is free software; you are free to change and redistribute it. - There is NO WARRANTY, to the extent permitted by law. - -**For** zsh **shell**: - - $ zsh --version - ----------- - - zsh 5.0.7 (x86_64-pc-linux-gnu) - -**For** tcsh **shell**: - $ tcsh --version - ----------- - - tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-unknown-linux) options wide,nls,dl,al,kan,rh,nd,color,filec - -For some shells, you can also use shell-specific variables (e.g., $BASH_VERSION or $ZSH_VERSION). - - $ echo $BASH_VERSION - ----------- - - 4.3.8(1)-release - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/which-shell-am-i-using.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://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/process-id-pid-shell-script.html From 143702f4f115381040098c4d2eb031d45a6dd8b3 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Sat, 7 Nov 2015 10:17:25 +0800 Subject: [PATCH 2413/2517] Create 20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md --- ...to find which shell I am using on Linux.md | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 translated/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md diff --git a/translated/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md b/translated/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md new file mode 100644 index 0000000000..675ef43d94 --- /dev/null +++ b/translated/tech/20151105 Linux FAQs with Answers--How to find which shell I am using on Linux.md @@ -0,0 +1,92 @@ + +Linux 有问必答 - 如何在 Linux 上找到当前正在使用的 shell +================================================================================ +> **问题**: 我经常在命令行中切换 shell。是否有一个快速简便的方法来找出我当前正在使用的 shell 呢?此外,我怎么能找到当前 shell 的版本? + +### 找到你当前正在使用的 Shell 版本 ### + +有多种方式可以查看你目前在使用什么 shell,最简单的方法就是通过使用 shell 的特殊参数。 + +其一,[一个名为 "$$" 的特殊参数][1] 表示当前你正在运行的 shell 的 PID。此参数是只读的,不能被修改。所以,下面的命令也将显示你正在运行的 shell 的名字: + + $ ps -p $$ + +---------- + + PID TTY TIME CMD + 21666 pts/4 00:00:00 bash + +上述命令可在所有可用的 shell 中工作。 + +如果你不使用 csh,使用 shell 的特殊参数 “$$” 可以找出当前的 shell,这表示当前正在运行的 shell 或 shell 脚本的名称。这是 Bash 的一个特殊参数,但也可用在其他 shells 中,如 sh, zsh, tcsh or dash。使用 echo 命令也可以查看你目前正在使用的 shell 的名称。 + + $ echo $0 + +---------- + + bash + +不要将 $SHELL 看成是一个单独的环境变量,它被设置为整个路径下的默认 shell。因此,这个变量并不一定指向你当前使用的 shell。例如,即使你在终端中调用不同的 shell,$SHELL 也保持不变。 + + $ echo $SHELL + +---------- + + /bin/shell + +![](https://c2.staticflickr.com/6/5688/22544087680_4a9c180485_c.jpg) + +因此,找出当前的shell,你应该使用 $$ 或 $0,但不是 $ SHELL。 + +### 找出当前 Shell 的版本 ### + +一旦你知道你使用的是哪个 shell,你可能想知道此 shell 的版本。为此,在命令行中输入 shell 并在后面加上 “--version” 参数可以查看版本信息。例如: + +**对于** bash **shell** : + + $ bash --version + +---------- + + GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu) + Copyright (C) 2013 Free Software Foundation, Inc. + License GPLv3+: GNU GPL version 3 or later + + This is free software; you are free to change and redistribute it. + There is NO WARRANTY, to the extent permitted by law. + +**对于** zsh **shell**: + + $ zsh --version + +---------- + + zsh 5.0.7 (x86_64-pc-linux-gnu) + +**对于** tcsh **shell**: + $ tcsh --version + +---------- + + tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-unknown-linux) options wide,nls,dl,al,kan,rh,nd,color,filec + +对于一些 shells,你还可以使用 shell 特定的变量(例如,$ BASH_VERSION 或 $ ZSH_VERSION)。 + + $ echo $BASH_VERSION + +---------- + + 4.3.8(1)-release + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/which-shell-am-i-using.html + +作者:[Dan Nanni][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/process-id-pid-shell-script.html From 7be4ae81c338be97fb704230912110581f1368bd Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 7 Nov 2015 14:14:55 +0800 Subject: [PATCH 2414/2517] translating---geekpi --- ...th Answers--How to change default Java version on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md b/sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md index 45eb3b4834..4280798d81 100644 --- a/sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md +++ b/sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md @@ -1,3 +1,5 @@ +translating----geekpi + Linux FAQs with Answers--How to change default Java version on Linux ================================================================================ > **Question**: When I am trying to run a Java program on Linux, I am getting the following error. Looks like the Java program is compiled for a different Java version than the default Java program installed on my Linux. How can I switch the default Java version on Linux? @@ -49,4 +51,4 @@ via: http://ask.xmodulo.com/change-default-java-version-linux.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/install-java-runtime-linux.html \ No newline at end of file +[1]:http://ask.xmodulo.com/install-java-runtime-linux.html From d2a6f538c09074092565abedac7e8dc619c75be2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 7 Nov 2015 14:32:53 +0800 Subject: [PATCH 2415/2517] translated --- ...to change default Java version on Linux.md | 54 ------------------- ...to change default Java version on Linux.md | 53 ++++++++++++++++++ 2 files changed, 53 insertions(+), 54 deletions(-) delete mode 100644 sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md create mode 100644 translated/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md diff --git a/sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md b/sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md deleted file mode 100644 index 4280798d81..0000000000 --- a/sources/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md +++ /dev/null @@ -1,54 +0,0 @@ -translating----geekpi - -Linux FAQs with Answers--How to change default Java version on Linux -================================================================================ -> **Question**: When I am trying to run a Java program on Linux, I am getting the following error. Looks like the Java program is compiled for a different Java version than the default Java program installed on my Linux. How can I switch the default Java version on Linux? -> -> Exception in thread "main" java.lang.UnsupportedClassVersionError: com/xmodulo/hmon/gui/NetConf : Unsupported major.minor version 51.0 - -When a Java program is compiled, the build environment sets a "target" which is the oldest JRE version the program can support. If you run the Java program on a Linux system which does not meet the lowest JRE version requirement, you will encounter the following error while starting the program. - - Exception in thread "main" java.lang.UnsupportedClassVersionError: com/xmodulo/hmon/gui/NetConf : Unsupported major.minor version 51.0 - -For example, in this case the program is compiled for Java JRE 1.7 but the system only has Java JRE 1.6. - -To solve this problem, you need to change the default Java version you are using to Java JRE 1.7 or higher (assuming that such JRE is already installed). - -First, **check available Java versions** on your Linux system by using update-alternatives command: - - $ sudo update-alternatives --display java - -![](https://c2.staticflickr.com/6/5663/22661333316_81fe1ab7da_c.jpg) - -In this example, there are four different Java versions that are installed: OpenJDK JRE 1.6, Oracle Java JRE 1.6, OpenJDK JRE 1.7 and Oracle Java JRE 1.7. The default Java version is currently set to OpenJDK JRE 1.6. - -If the necessary Java JRE is not installed, you can always install it using [these instructions][1]. - -Now that there are suitable candidates to change to, you can **switch the default Java version** among available Java JREs by running the following command: - - $ sudo update-alternatives --config java - -When prompted, select the Java version you would like to use. In this example, we choose Oracle Java JRE 1.7. - -![](https://c2.staticflickr.com/6/5651/22066181083_b9c4c5b676_c.jpg) - -Now you can verify the default Java version as follows. - - $ java -version - -![](https://c1.staticflickr.com/1/634/22499411280_1d702a4101_c.jpg) - -Finally, if you defined JAVA_HOME environment variable somewhere, update the variable according to the newly set default Java version. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/change-default-java-version-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://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/install-java-runtime-linux.html diff --git a/translated/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md b/translated/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md new file mode 100644 index 0000000000..c48274edf0 --- /dev/null +++ b/translated/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md @@ -0,0 +1,53 @@ +Linux又问必答-- 如何在Linux中改变默认的Java版本 +================================================================================ +> **提问**:当我尝试在Linux中运行一个Java程序时,我遇到了一个错误。看上去像程序编译所使用的Javab版本与我本地的不同。我该如何在Linux上切换默认的Java版本? + +> +> Exception in thread "main" java.lang.UnsupportedClassVersionError: com/xmodulo/hmon/gui/NetConf : Unsupported major.minor version 51.0 + +当Java程序编译时,编译环境会设置一个“target”变量来设置程序可以运行的最低Java版本。如果你Linux系统上运行的程序不满足最低的JRE版本要求,那么你会在运行的时候遇到下面的错误。 + + Exception in thread "main" java.lang.UnsupportedClassVersionError: com/xmodulo/hmon/gui/NetConf : Unsupported major.minor version 51.0 + +比如,这种情况下程序在Java JRE 1.7下编译,但是系统只有Java JRE 1.6。 + +要解决这个问题,你需要改变默认的Java版本到Java JRE 1.7或者更高(假设JRE已经安装了)。 + +首先,试用下面的update-alternatives命令**检查你系统上可用的Java版本**: + + $ sudo update-alternatives --display java + +![](https://c2.staticflickr.com/6/5663/22661333316_81fe1ab7da_c.jpg) + +本例中,总共安装了4个不同的Java版本:OpenJDK JRE 1.6、Oracle Java JRE 1.6、OpenJDK JRE 1.7 和 Oracle Java JRE 1.7。现在默认的Java版本是OpenJDK JRE 1.6。 + +如果没有安装需要的Java JRE,你可以参考[这些指导][1]来完成安装。 + +现在有可用的候选版本,你可以用下面的命令在可用的Java JRE之间**切换默认的Java版本**: + + $ sudo update-alternatives --config java + +看到提示的时候,选择你想试用的Java版本。本例中,我们选择Oracle Java JRE 1.7。 + +![](https://c2.staticflickr.com/6/5651/22066181083_b9c4c5b676_c.jpg) + +现在用下面的命令验证默认的Java版本。 + + $ java -version + +![](https://c1.staticflickr.com/1/634/22499411280_1d702a4101_c.jpg) + +最后,如果你定义了JAVA_HOME环境变量,根据你设置的Java版本更新变量。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/change-default-java-version-linux.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/install-java-runtime-linux.html From d67f79514fde1925559fe60ca452c5d7398faa0a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 7 Nov 2015 18:16:53 +0800 Subject: [PATCH 2416/2517] Translating sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md --- ...to switch from NetworkManager to systemd-networkd on Linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md b/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md index 101e86ecd0..4dfb657163 100644 --- a/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md +++ b/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md @@ -1,3 +1,4 @@ +ictlyh Translating How to switch from NetworkManager to systemd-networkd on Linux ================================================================================ In the world of Linux, adoption of [systemd][1] has been a subject of heated controversy, and the debate between its proponents and critics is still going on. As of today, most major Linux distributions have adopted systemd as a default init system. From 099071366d2455e07d752d8bb08eeecb81df77f1 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 7 Nov 2015 19:15:15 +0800 Subject: [PATCH 2417/2517] Translated sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md --- ...orkManager to systemd-networkd on Linux.md | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) rename {sources => translated}/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md (58%) diff --git a/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md b/translated/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md similarity index 58% rename from sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md rename to translated/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md index 4dfb657163..1a1fe6b35a 100644 --- a/sources/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md +++ b/translated/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md @@ -1,55 +1,74 @@ -ictlyh Translating +如何在 Linux 中从 NetworkManager 切换为 systemd-network How to switch from NetworkManager to systemd-networkd on Linux ================================================================================ +在 Linux 世界里, [systemd][1] 的采用一直是激烈争论的主题,它的支持者和反对者之间的战火仍然在燃烧。到了今天,大部分主流 Linux 发行版都已经采用了 systemd 作为默认初始化系统。 In the world of Linux, adoption of [systemd][1] has been a subject of heated controversy, and the debate between its proponents and critics is still going on. As of today, most major Linux distributions have adopted systemd as a default init system. +正如其作者所说,作为一个 “从未完成、从未完善、但一直追随技术进步” 的系统,systemd 已经不只是一个初始化进程,它被设计为一个更广泛的系统以及服务管理平台,这个;平台包括了不断增长的核心系统进程、库和工具的生态系统。 Billed as a "never finished, never complete, but tracking progress of technology" by its author, systemd is not just the init daemon, but is designed as a more broad system and service management platform which encompasses the growing ecosystem of core system daemons, libraries and utilities. +**systemd** 的其中一部分是 **systemd-networkd**,它负责 systemd 生态中的网络配置。使用 systemd-networkd,你可以为网络设备配置基础的 DHCP/静态 IP 网络。它还可以配置虚拟网络功能,例如网桥、隧道和 VLAN。systemd-networkd 目前还不能直接支持无线网络,但你可以使用 wpa_supplicant 服务配置无线适配器,然后用 **systemd-networkd** 挂钩起来。 One of many additions to **systemd** is **systemd-networkd**, which is responsible for network configuration within the systemd ecosystem. Using systemd-networkd, you can configure basic DHCP/static IP networking for network devices. It can also configure virtual networking features such as bridges, tunnels or VLANs. Wireless networking is not directly handled by systemd-networkd, but you can use wpa_supplicant service to configure wireless adapters, and then hook it up with **systemd-networkd**. +在很多 Linux 发行版中,NetworkManager 仍然作为默认的网络配置管理器。和 NetworkManager 相比,**systemd-networkd** 仍处于活跃的开发状态,还缺少一些功能。例如,它还不能像 NetworkManager 那样能在任何时候让你的计算机在多种接口之间保持连接。它还没有为高级脚本提供 ifup/ifdown 钩子函数。但是,systemd-networkd 和其它 systemd 组件(例如用于域名解析的 **resolved**、NTP 的**timesyncd**,用于命名的 udevd)结合的非常好。随着时间增长,**systemd-networkd**只会在 systemd 环境中扮演越来越重要的角色。 On many Linux distributions, NetworkManager has been and is still used as a default network configuration manager. Compared to NetworkManager, **systemd-networkd** is still under active development, and missing features. For example, it does not have NetworkManager's intelligence to keep your computer connected across various interfaces at all times. It does not provide ifup/ifdown hooks for advanced scripting. Yet, systemd-networkd is integrated well with the rest of systemd components (e.g., **resolved** for DNS, **timesyncd** for NTP, udevd for naming), and the role of **systemd-networkd** may only grow over time in the systemd environment. +如果你对 **systemd-networkd** 的进步感到高兴,从 NetworkManager 切换到 systemd-networkd 是值得你考虑的一件事。如果你强烈反对 systemd,对 NetworkManager 或[基础网络服务][2]感到很满意,那也很好。 If you are happy with the way **systemd** is evolving, one thing you can consider is to switch from NetworkManager to systemd-networkd. If you are feverishly against systemd, and perfectly happy with NetworkManager or [basic network service][2], that is totally cool. +但对于那些想尝试 systemd-networkd 的人,可以继续看下去,在这篇指南中学会在 Linux 中怎么从 NetworkManager 切换到 systemd-networkd。 But for those of you who want to try out systemd-networkd, you can read on, and find out in this tutorial how to switch from NetworkManager to systemd-networkd on Linux. +### 需求 ### ### Requirement ### +systemd 210 或更高版本提供了 systemd-networkd。因此诸如 Debian 8 "Jessie" (systemd 215)、 Fedora 21 (systemd 217)、 Ubuntu 15.04 (systemd 219) 或更高版本的 Linux 发行版和 systemd-networkd 兼容。 systemd-networkd is available in systemd version 210 and higher. Thus distributions like Debian 8 "Jessie" (systemd 215), Fedora 21 (systemd 217), Ubuntu 15.04 (systemd 219) or later are compatible with systemd-networkd. +对于其它发行版,在开始下一步之前先检查一下你的 systemd 版本。 For other distributions, check the version of your systemd before proceeding. $ systemctl --version +### 从 NetworkManager 切换到 Systemd-networkd ### ### Switch from Network Manager to Systemd-Networkd ### +从 NetworkManager 切换到 systemd-networkd 其实非常简答(反过来也一样)。 It is relatively straightforward to switch from Network Manager to systemd-networkd (and vice versa). +首先,按照下面这样先停用 NetworkManager 服务,然后启用 systemd-networkd。 First, disable Network Manager service, and enable systemd-networkd as follows. $ sudo systemctl disable NetworkManager $ sudo systemctl enable systemd-networkd +你还要启用 **systemd-resolved** 服务,systemd-networkd用它来进行域名解析。该服务还实现了一个缓存式 DNS 服务器。 You also need to enable **systemd-resolved** service, which is used by systemd-networkd for network name resolution. This service implements a caching DNS server. $ sudo systemctl enable systemd-resolved $ sudo systemctl start systemd-resolved +一旦启动,**systemd-resolved** 就会在 /run/systemd 目录下某个地方创建它自己的 resolv.conf。但是,把 DNS 解析信息存放在 /etc/resolv.conf 是更普遍的做法,很多应用程序也会依赖于 /etc/resolv.conf。因此为了兼容性,按照下面的方式创建一个到 /etc/resolv.conf 的符号链接。 Once started, **systemd-resolved** will create its own resolv.conf somewhere under /run/systemd directory. However, it is a common practise to store DNS resolver information in /etc/resolv.conf, and many applications still rely on /etc/resolv.conf. Thus for compatibility reason, create a symlink to /etc/resolv.conf as follows. $ sudo rm /etc/resolv.conf $ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf +### 用 systemd-networkd 配置网络连接 ### ### Configure Network Connections with Systemd-networkd ### +要用 systemd-networkd 配置网络服务,你必须指定带.network 扩展名的配置信息文本文件。这些网络配置文件保存到 /etc/systemd/network 并从这里加载。当有多个文件时,systemd-networkd 会按照词汇顺序一个个加载并处理。 To configure network devices with systemd-networkd, you must specify configuration information in text files with .network extension. These network configuration files are then stored and loaded from /etc/systemd/network. When there are multiple files, systemd-networkd loads and processes them one by one in lexical order. +首先创建 /etc/systemd/network 目录。 Let's start by creating a folder /etc/systemd/network. $ sudo mkdir /etc/systemd/network +#### DHCP 网络 #### #### DHCP Networking #### +首先来配置 DHCP 网络。对于此,先要创建下面的配置文件。文件名可以任意,但记住文件是按照词汇顺序处理的。 Let's configure DHCP networking first. For this, create the following configuration file. The name of a file can be arbitrary, but remember that files are processed in lexical order. $ sudo vi /etc/systemd/network/20-dhcp.network @@ -62,10 +81,13 @@ Let's configure DHCP networking first. For this, create the following configurat [Network] DHCP=yes +正如你上面看到的,每个网络配置文件包括了一个多多个 “sections”,每个 “section”都用 [XXX] 开头。每个 section 包括了一个或多个键值对。[Match] 部分决定这个配置文件配置哪个(些)网络设备。例如,这个文件匹配所有名称以 ens3 开头的网络设备(例如 enp3s0、 enp3s1、 enp3s2 等等)对于匹配的接口,然后启用 [Network] 部分指定的 DHCP 网络配置。 As you can see above, each network configuration file contains one or more "sections" with each section preceded by [XXX] heading. Each section contains one or more key/value pairs. The [Match] section determine which network device(s) are configured by this configuration file. For example, this file matches any network interface whose name starts with ens3 (e.g., enp3s0, enp3s1, enp3s2, etc). For matched interface(s), it then applies DHCP network configuration specified under [Network] section. +### 静态 IP 网络 ### ### Static IP Networking ### +如果你想给网络设备分配一个静态 IP 地址,那就新建下面的配置文件。 If you want to assign a static IP address to a network interface, create the following configuration file. $ sudo vi /etc/systemd/network/10-static-enp3s0.network @@ -80,12 +102,15 @@ If you want to assign a static IP address to a network interface, create the fol Gateway=192.168.10.1 DNS=8.8.8.8 +正如你猜测的, enp3s0 接口地址会被指定为 192.168.10.50/24,默认网关是 192.168.10.1, DNS 服务器是 8.8.8.8。这里微妙的一点是,接口名 enp3s0 事实上也匹配了之前 DHCP 配置中定义的模式规则。但是,根据词汇顺序,文件 "10-static-enp3s0.network" 在 "20-dhcp.network" 之前被处理,对于 enp3s0 接口静态配置比 DHCP 配置有更高的优先级。 As you can guess, the interface enp3s0 will be assigned an address 192.168.10.50/24, a default gateway 192.168.10.1, and a DNS server 8.8.8.8. One subtlety here is that the name of an interface enp3s0, in facts, matches the pattern rule defined in the earlier DHCP configuration as well. However, since the file "10-static-enp3s0.network" is processed before "20-dhcp.network" according to lexical order, the static configuration takes priority over DHCP configuration in case of enp3s0 interface. +一旦你完成了创建配置文件,重启 systemd-networkd 服务或者重启机器。 Once you are done with creating configuration files, restart systemd-networkd service or reboot. $ sudo systemctl restart systemd-networkd +运行以下命令检查服务状态: Check the status of the service by running: $ systemctl status systemd-networkd @@ -93,14 +118,19 @@ Check the status of the service by running: ![](https://farm1.staticflickr.com/719/21010813392_76abe123ed_c.jpg) +### 用 systemd-networkd 配置虚拟网络设备 ### ### Configure Virtual Network Devices with Systemd-networkd ### +**systemd-networkd** 同样允许你配置虚拟网络设备,例如网桥、VLAN、隧道、VXLAN、绑定等。你必须在用 .netdev 作为扩展名的文件中配置这些虚拟设备。 **systemd-networkd** also allows you to configure virtual network devices such as bridges, VLANs, tunnel, VXLAN, bonding, etc. You must configure these virtual devices in files with .netdev extension. +这里我展示了如何配置一个桥接接口。 Here I'll show how to configure a bridge interface. +#### Linux 网桥 #### #### Linux Bridge #### +如果你想创建一个 Linux 网桥(br0) 并把物理接口(eth1) 添加到网桥,你可以新建下面的配置。 If you want to create a Linux bridge (br0) and add a physical interface (eth1) to the bridge, create the following configuration. $ sudo vi /etc/systemd/network/bridge-br0.netdev @@ -111,6 +141,7 @@ If you want to create a Linux bridge (br0) and add a physical interface (eth1) t Name=br0 Kind=bridge +然后按照下面这样用 .network 文件配置网桥接口 br0 和从接口 eth1。 Then configure the bridge interface br0 and the slave interface eth1 using .network files as follows. $ sudo vi /etc/systemd/network/bridge-br0-slave.network @@ -137,16 +168,21 @@ Then configure the bridge interface br0 and the slave interface eth1 using .netw Gateway=192.168.10.1 DNS=8.8.8.8 +最后,重启 systemd-networkd。 Finally, restart systemd-networkd: $ sudo systemctl restart systemd-networkd +你可以用 [brctl 工具][3] 来验证是否创建了网桥 br0。 You can use [brctl tool][3] to verify that a bridge br0 has been created. +### 总结 ### ### Summary ### +当 systemd 誓言成为 Linux 的系统管理器时,有类似 systemd-networkd 的东西来管理网络配置也就不足为奇。但是在现阶段,systemd-networkd 看起来更适合于网络配置相对稳定的服务器环境。对于桌面/笔记本环境,它们有多种临时有线/无线接口,NetworkManager 仍然是比较好的选择。 When systemd promises to be a system manager for Linux, it is no wonder something like systemd-networkd came into being to manage network configurations. At this stage, however, systemd-networkd seems more suitable for a server environment where network configurations are relatively stable. For desktop/laptop environments which involve various transient wired/wireless interfaces, NetworkManager may still be a preferred choice. +对于想进一步了解 systemd-networkd 的人,可以参考官方[man 手册][4]了解完整的支持列表和关键点。 For those who want to check out more on systemd-networkd, refer to the official [man page][4] for a complete list of supported sections and keys. -------------------------------------------------------------------------------- @@ -154,7 +190,7 @@ For those who want to check out more on systemd-networkd, refer to the official via: http://xmodulo.com/switch-from-networkmanager-to-systemd-networkd.html 作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ictlyh](http://mutouxiaogui.cn/blog) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 645197b3a4f3bced689058f34e3c1d6a80d207df Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 7 Nov 2015 19:53:06 +0800 Subject: [PATCH 2418/2517] PUB:20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy @geekpi --- ...--How to install Ubuntu desktop behind a proxy.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md (77%) diff --git a/translated/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md b/published/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md similarity index 77% rename from translated/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md rename to published/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md index 6e1a0de7cb..80a79534ca 100644 --- a/translated/tech/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md +++ b/published/20151019 Linux FAQs with Answers--How to install Ubuntu desktop behind a proxy.md @@ -1,6 +1,6 @@ -Linux有问必答--如何在代理中安装Ubuntu +Linux有问必答: 当使用代理服务器连接互联网时如何安装 Ubuntu 桌面版 ================================================================================ -> **提问:** 我的电脑连接到的是使用HTTP代理的公司网络。当我想使用CD-ROM安装Ubuntu时,安装在尝试获取文件时被停滞了,可能是由于代理的原因。然而问题是Ubuntu的安装程序从来没有在安装过程中提示我配置代理。我该怎样在代理中安装Ubuntu桌面版? +> **提问:** 我的电脑连接到的公司网络是使用HTTP代理连上互联网的。当我想使用CD-ROM安装Ubuntu时,安装在尝试获取文件时被停滞了,可能是由于代理的原因。然而问题是Ubuntu的安装程序从来没有在安装过程中提示我配置代理。我该怎样通过代理服务器安装Ubuntu桌面版? 不像Ubuntu服务器版,Ubuntu桌面版的安装非常自动化,没有留下太多的自定义空间,就像自定义磁盘分区,手动网络设置,包选择等等。虽然这种简单的,一键安装被认为是用户友好的,但却是那些寻找“高级安装模式”来定制自己的Ubuntu桌面安装的用户不希望的。 @@ -8,9 +8,9 @@ Linux有问必答--如何在代理中安装Ubuntu ![](https://c2.staticflickr.com/6/5683/22195372232_cea81a5e45_c.jpg) -这篇文章描述了如何解除Ubuntu安装限制以及**如何在代理中安装Ubuntu桌面**。 +这篇文章描述了如何解除Ubuntu安装限制以及**如何通过代理服务器安装Ubuntu桌面**。 -基本的想打是这样的。首先启动到live Ubuntu桌面中而不是直接启动Ubuntu安装器,配置代理设置并且手动在live Ubuntu中启动Ubuntu安装器。下面是步骤。 +基本的想法是这样的。首先启动到live Ubuntu桌面中而不是直接启动Ubuntu安装器,配置代理设置并且手动在live Ubuntu中启动Ubuntu安装器。下面是步骤。 从Ubuntu桌面版CD/DVD或者USB启动后,在欢迎页面点击“Try Ubuntu”。 @@ -24,7 +24,7 @@ Linux有问必答--如何在代理中安装Ubuntu ![](https://c2.staticflickr.com/6/5675/22021212239_ba3901c8bf_c.jpg) -手动配置代理 +手动配置代理。 ![](https://c1.staticflickr.com/1/735/22020025040_59415e0b9a_c.jpg) @@ -54,7 +54,7 @@ via: http://ask.xmodulo.com/install-ubuntu-desktop-behind-proxy.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 65a211f3db955e6c5c42529a27e5fa449847136c Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 8 Nov 2015 22:59:51 +0800 Subject: [PATCH 2419/2517] PUB:Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients @ictlyh --- ...ile Sharing on Linux or Windows Clients.md | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) rename {translated/tech => published}/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md (80%) diff --git a/translated/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md b/published/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md similarity index 80% rename from translated/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md rename to published/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md index cb8fa59954..a439469b81 100644 --- a/translated/tech/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md +++ b/published/RHCE/Part 6 - Setting Up Samba and Configure FirewallD and SELinux to Allow File Sharing on Linux or Windows Clients.md @@ -1,4 +1,4 @@ -安装 Samba 并配置 Firewalld 和 SELinux 使得能在 Linux 和 Windows 之间共享文件 - 第六部分 +RHCE 系列(六):安装 Samba 并配置 Firewalld 和 SELinux 让 Linux 和 Windows 共享文件 ================================================================================ 由于计算机很少作为一个独立的系统工作,作为一个系统管理员或工程师,就应该知道如何在有多种类型的服务器之间搭设和维护网络。 @@ -6,9 +6,9 @@ ![在 Linux 中配置 Samba 进行文件共享](http://www.tecmint.com/wp-content/uploads/2015/09/setup-samba-file-sharing-on-linux-windows-clients.png) -RHCE 系列第六部分 - 设置 Samba 文件共享 +*RHCE 系列第六部分 - 设置 Samba 文件共享* -如果有人叫你设置文件服务器用于协作或者配置很可能有多种不同类型操作系统和设备的企业环境,这篇文章就能派上用场。 +如果有人让你设置文件服务器用于协作或者配置很可能有多种不同类型操作系统和设备的企业环境,这篇文章就能派上用场。 由于你可以在网上找到很多关于 Samba 和 NFS 背景和技术方面的介绍,在这篇文章以及后续文章中我们就省略了这些部分直接进入到我们的主题。 @@ -22,7 +22,7 @@ RHCE 系列第六部分 - 设置 Samba 文件共享 ![测试安装 Samba](http://www.tecmint.com/wp-content/uploads/2015/09/Testing-Setup-for-Samba.png) -测试安装 Samba +*测试安装 Samba* 在 box1 中安装以下软件包: @@ -36,7 +36,7 @@ RHCE 系列第六部分 - 设置 Samba 文件共享 ### 步骤二: 设置通过 Samba 进行文件共享 ### -Samba 这么重要的原因之一是它为 SMB/CIFS 客户端(译者注:SMB 是微软和英特尔制定的一种通信协议,CIFS 是其中一个版本,更详细的介绍可以参考[Wiki][6])提供了文件和打印设备,这使得客户端看起来服务器就是一个 Windows 系统(我必须承认写这篇文章的时候我有一点激动,因为这是我多年前作为一个新手 Linux 系统管理员的第一次设置)。 +Samba 这么重要的原因之一是它为 SMB/CIFS 客户端(LCTT 译注:SMB 是微软和英特尔制定的一种通信协议,CIFS 是其中一个版本,更详细的介绍可以参考 [Wiki][6])提供了文件和打印设备,这使得服务器在客户端看起来就是一个 Windows 系统(我必须承认写这篇文章的时候我有一点激动,因为这是我多年前作为一个新手 Linux 系统管理员的第一次设置)。 **添加系统用户并设置权限和属性** @@ -91,9 +91,9 @@ Samba 这么重要的原因之一是它为 SMB/CIFS 客户端(译者注:SMB ![测试 Samba 配置](http://www.tecmint.com/wp-content/uploads/2015/09/Test-Samba-Configuration.png) -测试 Samba 配置 +*测试 Samba 配置* -如果你要添加另一个公开的共享目录(意味着没有任何验证),在 /etc/samba/smb.conf 中创建另一章节,在共享目录名称下面复制上面的章节,只需要把 public=no 更改为 public=yes 并去掉有效用户和写列表命令。 +如果你要添加另一个公开的共享目录(意味着不需要任何验证),在 /etc/samba/smb.conf 中创建另一章节,在共享目录名称下面复制上面的章节,只需要把 public=no 更改为 public=yes 并去掉有效用户(valid users)和写列表(write list)命令。 ### 步骤五: 添加 Samba 用户 ### @@ -102,7 +102,7 @@ Samba 这么重要的原因之一是它为 SMB/CIFS 客户端(译者注:SMB # smbpasswd -a user1 # smbpasswd -a user2 -最后,重启 Samda,启用系统启动时自动启动服务,并确保共享目录对网络客户端可用: +最后,重启 Samda,并让系统启动时自动启动该服务,确保共享目录对网络客户端可用: # systemctl start smb # systemctl enable smb @@ -112,7 +112,7 @@ Samba 这么重要的原因之一是它为 SMB/CIFS 客户端(译者注:SMB ![验证 Samba 共享](http://www.tecmint.com/wp-content/uploads/2015/09/Verify-Samba-Share.png) -验证 Samba 共享 +*验证 Samba 共享* 到这里,已经正确安装和配置了 Samba 文件服务器。现在让我们在 RHEL 7 和 Windows 8 客户端中测试该配置。 @@ -120,12 +120,11 @@ Samba 这么重要的原因之一是它为 SMB/CIFS 客户端(译者注:SMB 首先,确保客户端可以访问 Samba 共享: -# smbclient –L 192.168.0.18 -U user2 - + # smbclient –L 192.168.0.18 -U user2 ![在 Linux 上挂载 Samba 共享](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Share-on-Linux.png) -在 Linux 上挂载 Samba 共享 +*在 Linux 上挂载 Samba 共享* (为 user1 重复上面的命令) @@ -135,11 +134,11 @@ Samba 这么重要的原因之一是它为 SMB/CIFS 客户端(译者注:SMB ![挂载 Samba 网络共享](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Network-Share.png) -挂载 Samba 网络共享 +*挂载 Samba 网络共享* (其中 /media/samba 是一个已有的目录) -或者在 /etc/fstab 文件中添加下面的条目自动挂载: +或者在 /etc/fstab 文件中添加下面的条目以自动挂载: **fstab** @@ -147,7 +146,7 @@ Samba 这么重要的原因之一是它为 SMB/CIFS 客户端(译者注:SMB //192.168.0.18/finance /media/samba cifs credentials=/media/samba/.smbcredentials,defaults 0 0 -其中隐藏文件 /media/samba/.smbcredentials(它的权限被设置为 600 和 root:root)有两行,指示允许使用共享的账户的用户名和密码: +其中隐藏文件 /media/samba/.smbcredentials(它的权限被设置为 600 和 root:root)有两行内容,指示允许使用共享的账户的用户名和密码: **.smbcredentials** @@ -162,17 +161,17 @@ Samba 这么重要的原因之一是它为 SMB/CIFS 客户端(译者注:SMB ![在 Samba 共享中创建文件](http://www.tecmint.com/wp-content/uploads/2015/09/Create-File-in-Samba-Share.png) -在 Samba 共享中创建文件 +*在 Samba 共享中创建文件* 正如你看到的,用权限 0770 和属主 user1:finance 创建了文件。 ### 步骤七: 在 Windows 上挂载 Samba 共享 ### -要在 Windows 上挂载 Samba 共享,进入 ‘我的计算机’ 并选择 ‘计算机’,‘网络驱动映射’。下一步,为要映射的驱动分配一个字母并用不同的认证检查连接(下面的截图使用我的母语西班牙语): +要在 Windows 上挂载 Samba 共享,进入 ‘我的计算机’ 并选择 ‘计算机’,‘网络驱动映射’。下一步,为要映射的驱动分配一个驱动器盘符并用不同的认证身份检查是否可以连接(下面的截图使用我的母语西班牙语): ![在 Windows 中挂载 Samba 共享](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Samba-Share-in-Windows.png) -在 Windows 中挂载 Samba 共享 +*在 Windows 中挂载 Samba 共享* 最后,让我们新建一个文件并检查权限和属性: @@ -188,7 +187,7 @@ Samba 这么重要的原因之一是它为 SMB/CIFS 客户端(译者注:SMB 在这篇文章中我们不仅介绍了如何使用不同操作系统设置 Samba 服务器和两个客户端,也介绍了[如何配置 Firewalld][3] 和 [服务器中的 SELinux][4] 以获取所需的组协作功能。 -最后,同样重要的是,我推荐阅读网上的 [smb.conf man 手册][5] 查看其它可能针对你的情况比本文中介绍的场景更加合适的配置命令。 +最后,同样重要的是,我推荐阅读网上的 [smb.conf man 手册][5] ,查看其它比本文中介绍的场景更加合适你的场景的配置命令。 正如往常,欢迎在下面的评论框中留下你的评论或建议。 @@ -198,7 +197,7 @@ via: http://www.tecmint.com/setup-samba-file-sharing-for-linux-windows-clients/ 作者:[Gabriel Cánepa][a] 译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 193bdf135be981f1efe7cab582cb4d61c82e6ce8 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 8 Nov 2015 23:32:05 +0800 Subject: [PATCH 2420/2517] PUB:20150921 Configure PXE Server In Ubuntu 14.04 @strugglingyouth --- ...21 Configure PXE Server In Ubuntu 14.04.md | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) rename {translated/tech => published}/20150921 Configure PXE Server In Ubuntu 14.04.md (70%) diff --git a/translated/tech/20150921 Configure PXE Server In Ubuntu 14.04.md b/published/20150921 Configure PXE Server In Ubuntu 14.04.md similarity index 70% rename from translated/tech/20150921 Configure PXE Server In Ubuntu 14.04.md rename to published/20150921 Configure PXE Server In Ubuntu 14.04.md index eab3fb5224..8689a180ce 100644 --- a/translated/tech/20150921 Configure PXE Server In Ubuntu 14.04.md +++ b/published/20150921 Configure PXE Server In Ubuntu 14.04.md @@ -1,9 +1,9 @@ - - 在 Ubuntu 14.04 中配置 PXE 服务器 +在 Ubuntu 14.04 中配置 PXE 服务器 ================================================================================ + ![](https://www.maketecheasier.com/assets/uploads/2015/09/pxe-featured.jpg) -PXE(Preboot Execution Environment--预启动执行环境)服务器允许用户从网络中启动 Linux 发行版并且可以同时在数百台 PC 中安装而不需要 Linux ISO 镜像。如果你客户端的计算机没有 CD/DVD 或USB 引导盘,或者如果你想在大型企业中同时安装多台计算机,那么 PXE 服务器可以帮你节省时间和金钱。 +PXE(Preboot Execution Environment--预启动执行环境)服务器允许用户从网络中启动 Linux 发行版并且可以不需要 Linux ISO 镜像就能同时在数百台 PC 中安装。如果你客户端的计算机没有 CD/DVD 或USB 引导盘,或者如果你想在大型企业中同时安装多台计算机,那么 PXE 服务器可以帮你节省时间和金钱。 在这篇文章中,我们将告诉你如何在 Ubuntu 14.04 配置 PXE 服务器。 @@ -11,11 +11,11 @@ PXE(Preboot Execution Environment--预启动执行环境)服务器允许用 开始前,你需要先设置 PXE 服务器使用静态 IP。在你的系统中要使用静态 IP 地址,需要编辑 “/etc/network/interfaces” 文件。 -1. 打开 “/etc/network/interfaces” 文件. +打开 “/etc/network/interfaces” 文件. sudo nano /etc/network/interfaces - 作如下修改: +作如下修改: # 回环网络接口 auto lo @@ -43,23 +43,23 @@ DHCP,TFTP 和 NFS 是 PXE 服务器的重要组成部分。首先,需要更 ### 配置 DHCP 服务: ### -DHCP 代表动态主机配置协议(Dynamic Host Configuration Protocol),并且它主要用于动态分配网络配置参数,如用于接口和服务的 IP 地址。在 PXE 环境中,DHCP 服务器允许客户端请求并自动获得一个 IP 地址来访问网络。 +DHCP 代表动态主机配置协议(Dynamic Host Configuration Protocol),它主要用于动态分配网络配置参数,如用于接口和服务的 IP 地址。在 PXE 环境中,DHCP 服务器允许客户端请求并自动获得一个 IP 地址来访问网络。 -1. 编辑 “/etc/default/dhcp3-server” 文件. +1、编辑 “/etc/default/dhcp3-server” 文件. sudo nano /etc/default/dhcp3-server - 作如下修改: +作如下修改: INTERFACES="eth0" 保存 (Ctrl + o) 并退出 (Ctrl + x) 文件. -2. 编辑 “/etc/dhcp3/dhcpd.conf” 文件: +2、编辑 “/etc/dhcp3/dhcpd.conf” 文件: sudo nano /etc/dhcp/dhcpd.conf - 作如下修改: +作如下修改: default-lease-time 600; max-lease-time 7200; @@ -74,29 +74,29 @@ DHCP 代表动态主机配置协议(Dynamic Host Configuration Protocol), 保存文件并退出。 -3. 启动 DHCP 服务. +3、启动 DHCP 服务. sudo /etc/init.d/isc-dhcp-server start ### 配置 TFTP 服务器: ### -TFTP 是一种文件传输协议,类似于 FTP。它不用进行用户认证也不能列出目录。TFTP 服务器总是监听网络上的 PXE 客户端。当它检测到网络中有 PXE 客户端请求 PXE 服务器时,它将提供包含引导菜单的网络数据包。 +TFTP 是一种文件传输协议,类似于 FTP,但它不用进行用户认证也不能列出目录。TFTP 服务器总是监听网络上的 PXE 客户端的请求。当它检测到网络中有 PXE 客户端请求 PXE 服务时,它将提供包含引导菜单的网络数据包。 -1. 配置 TFTP 时,需要编辑 “/etc/inetd.conf” 文件. +1、配置 TFTP 时,需要编辑 “/etc/inetd.conf” 文件. sudo nano /etc/inetd.conf - 作如下修改: +作如下修改: tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot - 保存文件并退出。 +保存文件并退出。 -2. 编辑 “/etc/default/tftpd-hpa” 文件。 +2、编辑 “/etc/default/tftpd-hpa” 文件。 sudo nano /etc/default/tftpd-hpa - 作如下修改: +作如下修改: TFTP_USERNAME="tftp" TFTP_DIRECTORY="/var/lib/tftpboot" @@ -105,14 +105,14 @@ TFTP 是一种文件传输协议,类似于 FTP。它不用进行用户认证 RUN_DAEMON="yes" OPTIONS="-l -s /var/lib/tftpboot" - 保存文件并退出。 +保存文件并退出。 -3. 使用 `xinetd` 让 boot 服务在每次系统开机时自动启动,并启动tftpd服务。 +3、 使用 `xinetd` 让 boot 服务在每次系统开机时自动启动,并启动tftpd服务。 sudo update-inetd --enable BOOT sudo service tftpd-hpa start -4. 检查状态。 +4、检查状态。 sudo netstat -lu @@ -123,7 +123,7 @@ TFTP 是一种文件传输协议,类似于 FTP。它不用进行用户认证 ### 配置 PXE 启动文件 ### -现在,你需要将 PXE 引导文件 “pxelinux.0” 放在 TFTP 根目录下。为 TFTP 创建一个目录,并复制 syslinux 在 “/usr/lib/syslinux/” 下提供的所有引导程序文件到 “/var/lib/tftpboot/” 下,操作如下: +现在,你需要将 PXE 引导文件 “pxelinux.0” 放在 TFTP 根目录下。为 TFTP 创建目录结构,并从 “/usr/lib/syslinux/” 复制 syslinux 提供的所有引导程序文件到 “/var/lib/tftpboot/” 下,操作如下: sudo mkdir /var/lib/tftpboot sudo mkdir /var/lib/tftpboot/pxelinux.cfg @@ -135,13 +135,13 @@ TFTP 是一种文件传输协议,类似于 FTP。它不用进行用户认证 PXE 配置文件定义了 PXE 客户端启动时显示的菜单,它能引导并与 TFTP 服务器关联。默认情况下,当一个 PXE 客户端启动时,它会使用自己的 MAC 地址指定要读取的配置文件,所以我们需要创建一个包含可引导内核列表的默认文件。 -编辑 PXE 服务器配置文件使用可用的安装选项。. +编辑 PXE 服务器配置文件,使用有效的安装选项。 -编辑 “/var/lib/tftpboot/pxelinux.cfg/default,” +编辑 “/var/lib/tftpboot/pxelinux.cfg/default”: sudo nano /var/lib/tftpboot/pxelinux.cfg/default - 作如下修改: +作如下修改: DEFAULT vesamenu.c32 TIMEOUT 100 @@ -183,12 +183,12 @@ PXE 配置文件定义了 PXE 客户端启动时显示的菜单,它能引导 ### 为 PXE 服务器添加 Ubuntu 14.04 桌面启动镜像 ### -对于这一步,Ubuntu 内核和 initrd 文件是必需的。要获得这些文件,你需要 Ubuntu 14.04 桌面 ISO 镜像。你可以通过以下命令下载 Ubuntu 14.04 ISO 镜像到 /mnt 目录: +对于这一步需要 Ubuntu 内核和 initrd 文件。要获得这些文件,你需要 Ubuntu 14.04 桌面 ISO 镜像。你可以通过以下命令下载 Ubuntu 14.04 ISO 镜像到 /mnt 目录: sudo cd /mnt sudo wget http://releases.ubuntu.com/14.04/ubuntu-14.04.3-desktop-amd64.iso -**注意**: 下载用的 URL 可能会改变,因为 ISO 镜像会进行更新。如果上面的网址无法访问,看看这个网站,了解最新的下载链接。 +**注意**: 下载用的 URL 可能会改变,因为 ISO 镜像会进行更新。如果上面的网址无法访问,看看[这个网站][4],了解最新的下载链接。 挂载 ISO 文件,使用以下命令将所有文件复制到 TFTP文件夹中: @@ -199,9 +199,9 @@ PXE 配置文件定义了 PXE 客户端启动时显示的菜单,它能引导 ### 将导出的 ISO 目录配置到 NFS 服务器上 ### -现在,你需要通过 NFS 协议安装源镜像。你还可以使用 HTTP 和 FTP 来安装源镜像。在这里,我已经使用 NFS 导出 ISO 内容。 +现在,你需要通过 NFS 协议来设置“安装源镜像( Installation Source Mirrors)”。你还可以使用 HTTP 和 FTP 来安装源镜像。在这里,我已经使用 NFS 输出 ISO 内容。 -要配置 NFS 服务器,你需要编辑 “etc/exports” 文件。 +要配置 NFS 服务器,你需要编辑 “/etc/exports” 文件。 sudo nano /etc/exports @@ -209,7 +209,7 @@ PXE 配置文件定义了 PXE 客户端启动时显示的菜单,它能引导 /var/lib/tftpboot/Ubuntu/14.04/amd64 *(ro,async,no_root_squash,no_subtree_check) -保存文件并退出。为使更改生效,启动 NFS 服务。 +保存文件并退出。为使更改生效,输出并启动 NFS 服务。 sudo exportfs -a sudo /etc/init.d/nfs-kernel-server start @@ -218,9 +218,9 @@ PXE 配置文件定义了 PXE 客户端启动时显示的菜单,它能引导 ### 配置网络引导 PXE 客户端 ### -PXE 客户端可以被任何具备 PXE 网络引导的系统来启用。现在,你的客户端可以启动并安装 Ubuntu 14.04 桌面,需要在系统的 BIOS 中设置 “Boot From Network” 选项。 +PXE 客户端可以是任何支持 PXE 网络引导的计算机系统。现在,你的客户端只需要在系统的 BIOS 中设置 “从网络引导(Boot From Network)” 选项就可以启动并安装 Ubuntu 14.04 桌面。 -现在你可以去做 - 用网络引导启动你的 PXE 客户端计算机,你现在应该看到一个子菜单,显示了我们创建的 Ubuntu 14.04 桌面。 +现在准备出发吧 - 用网络引导启动你的 PXE 客户端计算机,你现在应该看到一个子菜单,显示了我们创建的 Ubuntu 14.04 桌面的菜单项。 ![pxe](https://www.maketecheasier.com/assets/uploads/2015/09/pxe.png) @@ -241,7 +241,7 @@ via: https://www.maketecheasier.com/configure-pxe-server-ubuntu/ 作者:[Hitesh Jethva][a] 译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -249,3 +249,4 @@ via: https://www.maketecheasier.com/configure-pxe-server-ubuntu/ [1]:https://en.wikipedia.org/wiki/Preboot_Execution_Environment [2]:https://help.ubuntu.com/community/PXEInstallServer [3]:https://www.flickr.com/photos/jhcalderon/3681926417/ +[4]:http://releases.ubuntu.com/14.04/ From 60e3a4642cf32bd5e094536e6481c2e987ce4b1b Mon Sep 17 00:00:00 2001 From: icybreaker Date: Mon, 9 Nov 2015 10:10:07 +0800 Subject: [PATCH 2421/2517] icybreaker translating... --- .../20150921 14 tips for teaching open source development.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150921 14 tips for teaching open source development.md b/sources/talk/20150921 14 tips for teaching open source development.md index b2812d44c8..bf8212da70 100644 --- a/sources/talk/20150921 14 tips for teaching open source development.md +++ b/sources/talk/20150921 14 tips for teaching open source development.md @@ -1,3 +1,4 @@ +icybreaker translating... 14 tips for teaching open source development ================================================================================ Academia is an excellent platform for training and preparing the open source developers of tomorrow. In research, we occasionally open source software we write. We do this for two reasons. One, to promote the use of the tools we produce. And two, to learn more about the impact and issues other people face when using them. With this background of writing research software, I was tasked with redesigning the undergraduate software engineering course for second-year students at the University of Bradford. @@ -69,4 +70,4 @@ via: http://opensource.com/education/15/9/teaching-open-source-development-under [a]:http://opensource.com/users/mariamkiran [1]:https://basecamp.com/ -[2]:https://www.mantisbt.org/ \ No newline at end of file +[2]:https://www.mantisbt.org/ From 0838ef70619a3a8799074e15ae8a8f626934af29 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 9 Nov 2015 15:33:59 +0800 Subject: [PATCH 2422/2517] =?UTF-8?q?20151109-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...09 Open Source Alternatives to LastPass.md | 125 ++++++++++++++ ...Command Line Operation Using PV Command.md | 79 +++++++++ ... How to Set Up AWStats On Ubuntu Server.md | 106 ++++++++++++ ...ations using Gmail SMTP server on Linux.md | 156 ++++++++++++++++++ ...oid On BQ Aquaris Ubuntu Phone In Linux.md | 125 ++++++++++++++ 5 files changed, 591 insertions(+) create mode 100644 sources/share/20151109 Open Source Alternatives to LastPass.md create mode 100644 sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md create mode 100644 sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md create mode 100644 sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md create mode 100644 sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md diff --git a/sources/share/20151109 Open Source Alternatives to LastPass.md b/sources/share/20151109 Open Source Alternatives to LastPass.md new file mode 100644 index 0000000000..d8f9b908ae --- /dev/null +++ b/sources/share/20151109 Open Source Alternatives to LastPass.md @@ -0,0 +1,125 @@ +Open Source Alternatives to LastPass +================================================================================ +LastPass is a cross-platform password management program. For Linux, it is available as a plugin for Firefox, Chrome, and Opera. LastPass Sesame is available for Ubuntu/Debian and Fedora. There is also a version of LastPass compatible with Firefox Portable for installing on a USB key. And with LastPass Pocket for Ubuntu/Debian, Fedora and openSUSE, there's good coverage. While LastPass is a highly rated service, it is proprietary software. And LastPass has recently been absorbed by LogMeIn. If you're looking for an open source alternative, this article is for you. + +We all face information overload. Whether you conduct business online, read for your job, or just read for pleasure, the internet is a vast source of information. Retaining that information on a long-term basis can be difficult. However, it is essential to recall certain items of information immediately. Passwords are one such example. + +As a computer user, you face the dilemma of choosing the same password or a unique password for each service or web site you use. Matters are complicated because some sites place restrictions on the selection of the password. For example, a site may insist on a minimum number of characters, capital letters, numerals, and other characters which make choosing the same password for each site to be impossible. More importantly, there are good security reasons not to duplicate passwords. This inevitably means that individuals will simply have too many passwords to remember. One solution is to keep the passwords in written form. However, this is also highly insecure. + +Instead of trying to remember an endless array of passwords, a popular solution is to use password manager software. In fact, this type of software is an essential tool for the active internet user. It makes it easy to retrieve, manage and secure all of your passwords. Most passwords are encrypted, either by the program or the filesystem. Consequently, the user only has to remember a single password. Password managers encourage users to choose unique, non-intuitive strong passwords for each service. + +To provide an insight into the quality of software available for Linux, I introduce 4 excellent open source alternatives to LastPass. + +### KeePassX ### + +![KeePassX in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-KeePassX.png) + +KeePassX is a multi-platform port of KeePass, an open source and cross-platform password manager. This utility helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key-disk. This lets users only need to remember one single master password or insert the key-disk to unlock the whole database. + +The databases are encrypted using the algorithms AES (alias Rijndael) or Twofish using a 256 bit key. + +Features include: + +- Extensive management- title for each entry for better identification: + - Determine different expiration dates + - Insertion of attachments + - User-defined symbols for groups and entries + - Fast entry duplication + - Sorting entries in groups +- Search function: in specific groups or in the complete database +- Auto-Type, a feature that allows you to e.g. log in to a web page by pressing a single key combination. KeePassX does the rest of the typing for you. Auto-Type reads the title of currently active window on your screen and matches it to the configured database entries +- Database security with access to the KeePassX database being granted either with a password, a key-file (e.g. a CD or a memory-stick) or both +- Automatic generation of secure passwords +- Precaution features, quality indicator for chosen passwords hiding all passwords behind asterisks +- Encryption- either the Advanced Encryption Standard (AES) or the Twofish algorithm are used, with encryption of the database in 256 bit sized increments +- Import and export of entries. Import from PwManager (*.pwm) and KWallet (*.xml) files, Export as textfile (*.txt) + +- Website: [www.keepassx.org][1] +- Developer: KeePassX Team +- License: GNU GPL v2 +- Version Number: 0.4.3 + +### Encryptr ### + +![Encryptr in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Encryptr.png) + +Encryptr is an open source zero-knowledge cloud-based password manager / e-wallet powered by Crypton. Crypton is a JavaScript library that allows developers to write web applications where the server knows nothing of the contents a user is storing. + +Encryptr stores your sensitive data like passwords, credit card data, PINs, or access codes, in the cloud. However, because it was built on the zero-knowledge Crypton framework, Encryptr ensures that only the user has the ability to access or read the confidential information. + +Being cross-platform, it allows users to securely access their confidential data from a single account from the cloud, no matter where they are. + +Features include: + +- Very secure Zero-Knowledge Crypton Framework only ever encrypts or decrypts your data locally on your device +- Simple to use +- Cloud based +- Stores three types of data it stores passwords, credit card numbers and general key/value pairs +- Optional "Notes" field to all entries +- Filtering / searching the entry list +- Local encrypted caching of entries to speed up load time + +- Website: [encryptr.org][2] +- Developer: Tommy Williams +- License: GNU GPL v3 +- Version Number: 1.2.0 + +### RatticDB ### + +![RatticDB in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-RatticDB.png) + +RatticDB is an open source Django based password management service. + +RatticDB is built to be 'Password Lifecycle Management' and not simply a 'Password Storage Engine'. RatticDB aims to help you keep track of what passwords need to be changed and when. It does not include application level encryption. + +Features include: + +- Simple ACL scheme +- Change Queue feature that allows users to see when they need to update passwords for the applications they use +- Ansible configurations +- +- Website: [rattic.org][3] +- Developer: Daniel Hall +- License: GNU GPL v2 +- Version Number: 1.3.1 + +### Seahorse ### + +![Seahorse in action](http://www.linuxlinks.com/portal/content/reviews/Security/Screenshot-Seahorse.png) + +Seahorse is a Gnome front end for GnuPG - the Gnu Privacy Guard program. Its goal is to provide an easy to use Key Management Tool, along with an easy to use interface for encryption operations. + +It is a tool for secure communications and data storage. Data encryption and digital signature creation can easily be performed through a GUI and Key Management operations can easily be carried out through an intuitive interface. + +Additionally, Seahorse includes a Gedit plugin, can handle files using Nautilus, an applet for managing stuff put in the clipboard and an agent for storing private passphrases, as well as a GnuPG and OpenSSH key manager. + +Features include: + +- Encrypt/decrypt/sign files and text +- Manage your keys and keyring +- Synchronize your keys and your keyring with key servers +- Sign keys and publish +- Cache your passphrase so you don't have to keep typing it +- Backup your keys and keyring +- Add an image in any GDK supported format as a OpenGPG photo ID +- Create SSH keys, configure them, cache them +- Internationalization support + +- Website: [www.gnome.org/projects/seahorse][4] +- Developer: Jacob Perkins, Jose Carlos, Garcia Sogo, Jean Schurger, Stef Walter, Adam Schreiber +- License: GNU GPL v2 +- Version Number: 3.18.0 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20151108125950773/LastPassAlternatives.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.keepassx.org/ +[2]:https://encryptr.org/ +[3]:http://rattic.org/ +[4]:http://www.gnome.org/projects/seahorse/ \ No newline at end of file diff --git a/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md b/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md new file mode 100644 index 0000000000..780e783554 --- /dev/null +++ b/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md @@ -0,0 +1,79 @@ +How to Monitor the Progress of a Linux Command Line Operation Using PV Command +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/11/pv-featured-1.jpg) + +If you’re a Linux system admin, there’s no doubt that you must be spending most of your work time on the command line – installing and removing packages; monitoring system stats; copying, moving, deleting stuff; debugging problems; and more. There are times when you fire a command, and it takes a while before the operation completes. However, there are also times when the command you executed just hangs, leaving you guessing as to what’s actually happening behind the scenes. + +Usually, Linux commands provide no information related to the progress of the ongoing operation, something that is very important especially when you have limited time. However, that doesn’t mean you’re helpless – there exists a command, dubbed pv, that displays useful progress information related to the ongoing command line operation. In this article we will discuss this command as well as its features through some easy-to-understand examples. + +### PV Command ### + +Developed by Andrew Wood, [PV][1] – which stands for Pipe Viewer – displays information related to the progress of data through a pipeline. The information includes time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA. + +> “To use it, insert it in a pipeline between two processes, with the appropriate options. Its standard input will be passed through to its standard output and progress will be shown on standard error,” + +The above explains the command’s man page. + +### Download and Installation ### + +Users of Debian-based systems like Ubuntu can easily install the utility by running the following command in terminal: + + sudo apt-get install pv + +If you’re using any other Linux distro, you can install the command using the package manager installed on your system. Once installed successfully you can use the command line utility in various scenarios (see the following section). It’s worth mentioning that pv version 1.2.0 has been used in all the examples mentioned in this article. + +### Features and Usage ### + +A very common scenario that probably most of us (who work on the command line in Linux) would relate to is copying a movie file from a USB drive to your computer. If you try to complete the aforementioned operation using the cp command, you’ll have to blindly wait until the copying is complete or some error is thrown. + +However, the pv command can be helpful in this case. Here is an example: + + pv /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv + +And here’s the output: + +![pv-copy](https://www.maketecheasier.com/assets/uploads/2015/10/pv-copy.png) + +So, as you can see above, the command shows a lot of useful information related to the ongoing operation, including the amount of data that has been transferred, time elapsed, rate of transfer, progress bar, progress in percentage, and the amount of time left. + +The `pv` command provides various display switches. For example, you can use `-p` for displaying percentage, `-t` for timer, `-r` for rate of transfer, `-e` for eta, and -b for byte counter. The good thing is that you won’t have to remember any of them, as all of them are enabled by default. However, should you exclusively require information related to only a particular display switch in the output, you can pass that switch in the pv command. + +There’s also a `-n` display switch that allows the command to display an integer percentage, one per line on standard error, instead of the regular visual progress indicator. The following is an example of this switch in action: + + pv -n /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv + +![pv-numeric](https://www.maketecheasier.com/assets/uploads/2015/10/pv-numeric.png) + +This particular display switch is suitable in scenarios where you want to pipe the output into the [dialog][2] command. + +Moving on, there’s also a command line option, `-L`, that lets you modify the data transfer rate of the pv command. For example, I used -L to limit the data transfer rate to 2MB/s. + + pv -L 2m /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv + +![pv-ratelimit](https://www.maketecheasier.com/assets/uploads/2015/10/pv-ratelimit.png) + +As can be seen in the screenshot above, the data transfer rate was capped according to my direction. + +Another scenario where `pv` can help is while compressing files. Here is an example of how you can use this command while compressing files using Gzip: + + pv /media/himanshu/1AC2-A8E3/fnf.mkv | gzip > ./Desktop/fnf.log.gz + +![pv-gzip](https://www.maketecheasier.com/assets/uploads/2015/10/pv-gzip.png) + +### Conclusion ### + +As you have observed, pv is a useful little utility that could help you save your precious time in case a command line operation isn’t behaving as expected. Plus, the information it displays can also be used in shell scripts. I’d strongly recommend this command; it’s worth giving a try. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/monitor-progress-linux-command-line-operation/ + +作者:[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]:http://linux.die.net/man/1/pv +[2]:http://linux.die.net/man/1/dialog \ No newline at end of file diff --git a/sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md b/sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md new file mode 100644 index 0000000000..dae3c3af4f --- /dev/null +++ b/sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md @@ -0,0 +1,106 @@ +How to Set Up AWStats On Ubuntu Server +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/10/Apache_awstats_featured.jpg) + +AWStats is an open-source Web analytics reporting tool that generates advanced web, streaming, FTP or mail server statistics graphically. This log analyser works as a CGI or from command line and shows you all the possible information your log contains in a few graphical web pages. It uses a partial information file to be able to process large log files often and quickly. It supports most web server log file formats including Apache, IIS and many other web server log formats. + +This article will help you to install and configure AWStats on Ubuntu. + +### Install AWStats Package ### + +By default, AWStats package is available in the Ubuntu repository. + +You can install it by running: + + sudo apt-get install awstats + +Next you will need to enable the CGI module in Apache. + +You can do this by running: + + sudo a2enmod cgi + +Now, restart Apache to reflect the changes. + + sudo /etc/init.d/apache2 restart + +### Configure AWStats ### + +You need to create a configuration file for each domain or website you wish to view statistics for. In this example we will create a configuration file for “test.com“. + +You can do this by duplicating the AWStats default configuration file to one with your domain name. + + sudo cp /etc/awstats/awstats.conf /etc/awstats/awstats.test.com.conf + +Now, you need to make some changes in the config file: + + sudo nano /etc/awstats/awstats.test.com.conf + +Update the settings shown below: + + # Change to Apache log file, by default it's /var/log/apache2/access.log + LogFile="/var/log/apache2/access.log" + + # Change to the website domain name + SiteDomain="test.com" + HostAliases="www.test.com localhost 127.0.0.1" + + # When this parameter is set to 1, AWStats adds a button on report page to allow to "update" statistics from a web browser + AllowToUpdateStatsFromBrowser=1 + +Save and close the file. + +After these changes, you need to build your initial statistics which will be generated from the current logs on your server. You can do this using: + + sudo /usr/lib/cgi-bin/awstats.pl -config=test.com -update + +The output will look something like this: + +![awtstats](https://www.maketecheasier.com/assets/uploads/2015/10/awtstats.png) + +### Configure Apache For AWStats ### + +Next, you need to configure Apache2 to show these stats. Now copy the content of the “cgi-bin” folder to the default document root directory of your Apache installation. By default, this is in the “/usr/lib/cgi-bin” folder. + +You can do this by running: + + sudo cp -r /usr/lib/cgi-bin /var/www/html/ + sudo chown www-data:www-data /var/www/html/cgi-bin/ + sudo chmod -R 755 /var/www/html/cgi-bin/ + +### Test AWStats ### + +Now you can access your AWStats by visiting the url “http://your-server-ip/cgi-bin/awstats.pl?config=test.com.” +It will show you a results page like this: + +![awstats_page](https://www.maketecheasier.com/assets/uploads/2015/10/awstats_page.jpg) + +### Set Up Cron to Update Logs ### + +It is recommended to schedule a cron job to regularly update the AWStats database using newly created log entries, so the stats get updated on a regular basis. This will also save your time. + +To do this you need to edit the “/etc/crontab” file: + + sudo nano /etc/crontab + +Add the following line that tells AWStats to update every ten minutes. + + */10 * * * * root /usr/lib/cgi-bin/awstats.pl -config=test.com -update + +Save and close the file. + +### Conclusion ### + +AWStats is a very useful tool that can give you an overview of what is happening on your website and assist with site analysis. It is very easy to install and configure. Feel free to comment below if you have any questions. + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/set-up-awstats-ubuntu/ + +作者:[Hitesh Jethva][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/hiteshjethva/ \ No newline at end of file diff --git a/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md b/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md new file mode 100644 index 0000000000..5ffcb5aea8 --- /dev/null +++ b/sources/tech/20151109 How to send email notifications using Gmail SMTP server on Linux.md @@ -0,0 +1,156 @@ +How to send email notifications using Gmail SMTP server on Linux +================================================================================ +Suppose you want to configure a Linux app to send out email messages from your server or desktop. The email messages can be part of email newsletters, status updates (e.g., [Cachet][1]), monitoring alerts (e.g., [Monit][2]), disk events (e.g., [RAID mdadm][3]), and so on. While you can set up your [own outgoing mail server][4] to deliver messages, you can alternatively rely on a freely available public SMTP server as a maintenance-free option. + +One of the most reliable **free SMTP servers** is from Google's Gmail service. All you have to do to send email notifications within your app is to add Gmail's SMTP server address and your credentials to the app, and you are good to go. + +One catch with using Gmail's SMTP server is that there are various restrictions in place, mainly to combat spammers and email marketers who often abuse the server. For example, you can send messages to no more than 100 addresses at once, and no more than 500 recipients per day. Also, if you don't want to be flagged as a spammer, you cannot send a large number of undeliverable messages. When any of these limitations is reached, your Gmail account will temporarily be locked out for a day. In short, Gmail's SMTP server is perfectly fine for your personal use, but not meant for commercial bulk emails. + +With that being said, let me demonstrate **how to use Gmail's SMTP server in Linux environment**. + +### Google Gmail SMTP Server Setting ### + +If you want to send emails from your app using Gmail's SMTP server, remember the following details. + +- **Outgoing mail server (SMTP server)**: smtp.gmail.com +- **Use authentication**: yes +- **Use secure connection**: yes +- **Username**: your Gmail account ID (e.g., "alice" if your email is alice@gmail.com) +- **Password**: your Gmail password +- **Port**: 587 + +Exact configuration syntax may vary depending on apps. In the rest of this tutorial, I will show you several useful examples of using Gmail SMTP server in Linux. + +### Send Emails from the Command Line ### + +As the first example, let's try the most basic email functionality: send an email from the command line using Gmail SMTP server. For this, I am going to use a command-line email client called mutt. + +First, install mutt: + +For Debian-based system: + + $ sudo apt-get install mutt + +For Red Hat based system: + + $ sudo yum install mutt + +Create a mutt configuration file (~/.muttrc) and specify in the file Gmail SMTP server information as follows. Replace with your own Gmail ID. Note that this configuration is for sending emails only (not receiving emails). + + $ vi ~/.muttrc + +---------- + + set from = "@gmail.com" + set realname = "Dan Nanni" + set smtp_url = "smtp://@smtp.gmail.com:587/" + set smtp_pass = "" + +Now you are ready to send out an email using mutt: + + $ echo "This is an email body." | mutt -s "This is an email subject" alice@yahoo.com + +To attach a file in an email, use "-a" option: + + $ echo "This is an email body." | mutt -s "This is an email subject" alice@yahoo.com -a ~/test_attachment.jpg + +![](https://c1.staticflickr.com/1/770/22239850784_5fb0988075_c.jpg) + +Using Gmail SMTP server means that the emails appear as sent from your Gmail account. In other words, a recepient will see your Gmail address as the sender's address. If you want to use your domain as the email sender, you need to use Gmail SMTP relay service instead. + +### Send Email Notification When a Server is Rebooted ### + +If you are running a [virtual private server (VPS)][5] for some critical website, one recommendation is to monitor VPS reboot activities. As a more practical example, let's consider how to set up email notifications for every reboot event on your VPS. Here I assume you are using systemd on your VPS, and show you how to create a custom systemd boot-time service for automatic email notifications. + +First create the following script reboot_notify.sh which takes care of email notifications. + + $ sudo vi /usr/local/bin/reboot_notify.sh + +---------- + + #!/bin/sh + + echo "`hostname` was rebooted on `date`" | mutt -F /etc/muttrc -s "Notification on `hostname`" alice@yahoo.com + +---------- + + $ sudo chmod +x /usr/local/bin/reboot_notify.sh + +In the script, I use "-F" option to specify the location of system-wide mutt configuration file. So don't forget to create /etc/muttrc file and populate Gmail SMTP information as described earlier. + +Now let's create a custom systemd service as follows. + + $ sudo mkdir -p /usr/local/lib/systemd/system + $ sudo vi /usr/local/lib/systemd/system/reboot-task.service + +---------- + + [Unit] + Description=Send a notification email when the server gets rebooted + DefaultDependencies=no + Before=reboot.target + + [Service] + Type=oneshot + ExecStart=/usr/local/bin/reboot_notify.sh + + [Install] + WantedBy=reboot.target + +Once the service file is created, enable and start the service. + + $ sudo systemctl enable reboot-task + $ sudo systemctl start reboot-task + +From now on, you will be receiving a notification email every time the VPS gets rebooted. + +![](https://c1.staticflickr.com/1/608/22241452923_2ace9cde2e_c.jpg) + +### Send Email Notification from Server Usage Monitoring ### + +As a final example, let me present a real-world application called [Monit][6], which is a pretty useful server monitoring application. It comes with comprehensive [VPS][7] monitoring capabilities (e.g., CPU, memory, processes, file system), as well as email notification functions. + +If you want to receive email notifications for any event on your VPS (e.g., server overload) generated by Monit, you can add the following SMTP information to Monit configuration file. + + set mailserver smtp.gmail.com port 587 + username "" password "" + using tlsv12 + + set mail-format { + from: @gmail.com + subject: $SERVICE $EVENT at $DATE on $HOST + message: Monit $ACTION $SERVICE $EVENT at $DATE on $HOST : $DESCRIPTION. + + Yours sincerely, + Monit + } + + # the person who will receive notification emails + set alert alice@yahoo.com + +Here is the example email notification sent by Monit for excessive CPU load. + +![](https://c1.staticflickr.com/1/566/22873764251_8fe66bfd16_c.jpg) + +### Conclusion ### + +As you can imagine, there will be so many different ways to take advantage of free SMTP servers like Gmail. But once again, remember that the free SMTP server is not meant for commercial usage, but only for your own personal project. If you are using Gmail SMTP server inside any app, feel free to share your use case. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/send-email-notifications-gmail-smtp-server-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://xmodulo.com/setup-system-status-page.html +[2]:http://xmodulo.com/server-monitoring-system-monit.html +[3]:http://xmodulo.com/create-software-raid1-array-mdadm-linux.html +[4]:http://xmodulo.com/mail-server-ubuntu-debian.html +[5]:http://xmodulo.com/go/digitalocean +[6]:http://xmodulo.com/server-monitoring-system-monit.html +[7]:http://xmodulo.com/go/digitalocean \ No newline at end of file diff --git a/sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md b/sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md new file mode 100644 index 0000000000..bbd7f7580f --- /dev/null +++ b/sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md @@ -0,0 +1,125 @@ +Install Android On BQ Aquaris Ubuntu Phone In Linux +================================================================================ +![How to install Android on Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-on-Ubuntu-Phone.jpg) + +If you happen to own the first Ubuntu phone and want to **replace Ubuntu with Android on the bq Aquaris e4.5**, this post is going to help you. + +There can be plenty of reasons why you might want to remove Ubuntu and use the mainstream Android OS. One of the foremost reason is that the OS itself is at an early stage and intend to target developers and enthusiasts. Whatever may be your reason, installing Android on bq Aquaris is a piece of cake, thanks to the tools provided by bq. + +Let’s see what to do we need to install Android on bq Aquaris. + +### Prerequisite ### + +- Working Internet connection to download Android factory image and install tools for flashing Android +- USB data cable +- A system running Linux + +This tutorial is performed using Ubuntu 15.10. But the steps should be applicable to most other Linux distributions. + +### Replace Ubuntu with Android in bq Aquaris e4.5 ### + +#### Step 1: Download Android firmware #### + +First step is to download the Android image for bq Aquaris e4.5. Good thing is that it is available from the bq’s support website. You can download the firmware, around 650 MB in size, from the link below: + +- [Download Android for bq Aquaris e4.5][1] + +Yes, you would get OTA updates with it. At present the firmware version is 2.0.1 which is based on Android Lolipop. Over time, there could be a new firmware based on Marshmallow and then the above link could be outdated. + +I suggest to check the [bq support page and download][2] the latest firmware from there. + +Once downloaded, extract it. In the extracted directory, look for **MT6582_Android_scatter.txt** file. We shall be using it later. + +#### Step 2: Download flash tool #### + +bq has provided its own flash tool, Herramienta MTK Flash Tool, for easier installation of Android or Ubuntu on the device. You can download the tool from the link below: + +- [Download MTK Flash Tool][3] + +Since the flash tool might be upgraded in future, you can always get the latest version of flash tool from the [bq support page][4]. + +Once downloaded extract the downloaded file. You should see an executable file named **flash_tool** in it. We shall be using it later. + +#### Step 3: Remove conflicting packages (optional) #### + +If you are using recent version of Ubuntu or Ubuntu based Linux distributions, you may encounter “BROM ERROR : S_UNDEFINED_ERROR (1001)” later in this tutorial. + +To avoid this error, you’ll have to uninstall conflicting package. Use the commands below: + + sudo apt-get remove modemmanager + +Restart udev service with the command below: + + sudo service udev restart + +Just to check for any possible side effects on kernel module cdc_acm, run the command below: + + lsmod | grep cdc_acm + +If the output of the above command is an empty list, you’ll have to reinstall this kernel module: + + sudo modprobe cdc_acm + +#### Step 4: Prepare to flash Android #### + +Go to the downloaded and extracted flash tool directory (in step 2). Use command line for this purpose because you’ll have to use the root privileges here. + +Presuming that you saved it in the Downloads directory, use the command below to go to this directory (in case you do not know how to navigate between directories in command line). + + cd ~/Downloads/SP_Flash* + +After that use the command below to run the flash tool as root: + + sudo ./flash_tool + +You’ll see a window popped as the one below. Don’t bother about Download Agent field, it will be automatically filled. Just focus on Scatter-loading field. + +![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-1.jpeg) + +Remember we talked about **MT6582_Android_scatter.txt** in step 1? This text file is in the extracted directory of the Andriod firmware you downloaded in step 1. Click on Scatter-loading (in the above picture) and point to MT6582_Android_scatter.txt file. + +When you do that, you’ll see several green lines like the one below: + +![Install-Android-bq-aquaris-Ubuntu-2](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-2.jpeg) + +#### Step 5: Flashing Android #### + +We are almost ready. Switch off your phone and connect it to your computer via a USB cable. + +Select Firmware Upgrade from the dropdown and after that click on the big download button. + +![flash Android with Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu.jpeg) + +If everything is correct, you should see a flash status in the bottom of the tool: + +![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-3.jpeg) + +When the procedure is successfully completed, you’ll see a notification like this: + +![Successfully flashed Android on bq qauaris Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-4.jpeg) + +Unplug your phone and power it on. You should see a white screen with AQUARIS written in the middle and at bottom, “powered by Android” would be displayed. It might take upto 10 minutes before you could configure and start using Android. + +Note: If something goes wrong in the process, Press power, volume up, volume down button together and boot in to fast boot mode. Turn off again and connect the cable again. Repeat the process of firmware upgrade. It should work. + +### Conclusion ### + +Thanks to the tools provided, it becomes easier to **flash Android on bq Ubuntu Phone**. Of course, you can use the same steps to replace Android with Ubuntu. All you need is to download Ubuntu firmware instead of Android. + +I hope this tutorial helped you to replace Ubuntu with Android on your bq phone. If you have questions or suggestions, feel free to ask in the comment section below. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-android-ubuntu-phone/ + +作者:[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]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5_L/2.0.1_20150623-1900_bq-FW.zip +[2]:http://www.bq.com/gb/support/aquaris-e4-5 +[3]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5/Ubuntu/Web%20version/Web%20version/SP_Flash_Tool_exe_linux_v5.1424.00.zip +[4]:http://www.bq.com/gb/support/aquaris-e4-5-ubuntu-edition \ No newline at end of file From 089d3638f1e990e22ac5f453422d3759aba3c6f7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 9 Nov 2015 15:54:41 +0800 Subject: [PATCH 2423/2517] =?UTF-8?q?20151109-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...How to Configure Tripwire IDS on Debian.md | 379 ++++++++++++++++++ ...ll GitLab on Ubuntu or Fedora or Debian.md | 177 ++++++++ 2 files changed, 556 insertions(+) create mode 100644 sources/tech/20151109 How to Configure Tripwire IDS on Debian.md create mode 100644 sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md diff --git a/sources/tech/20151109 How to Configure Tripwire IDS on Debian.md b/sources/tech/20151109 How to Configure Tripwire IDS on Debian.md new file mode 100644 index 0000000000..e430c74e41 --- /dev/null +++ b/sources/tech/20151109 How to Configure Tripwire IDS on Debian.md @@ -0,0 +1,379 @@ +How to Configure Tripwire IDS on Debian +================================================================================ +This article is about Tripwire installation and configuration on Debian OS. It is a host based Intrusion detection system (IDS) for Linux environment. Prime function of tripwire IDS is to detect and report any unauthorized change (files and directories ) on linux system. After tripwire installation, baseline database created first, tripwire monitors and detects changes such as new file addition/creation, file modification and user who changed it etc. If the changes are legitimate, you can accept the changes to update tripwire database. + +### Installation and Configuration ### + +Tripwire installation on Debian VM is shown below. + + # apt-get install tripwire + +![installation](http://blog.linoxide.com/wp-content/uploads/2015/11/installation.png) + +During installation, tripwire prompt for following configuration. + +#### Site key Creation #### + +Tripwire required a site passphrase to secure the tw.cfg tripwire configuration file and tw.pol tripwire policy file. Tripewire encrypte both files using given passphrase. Site passphrase is must even for a single instance tripwire. + +![site key1](http://blog.linoxide.com/wp-content/uploads/2015/11/site-key1.png) + +#### Local Key passphrase #### + +Local passphrase is needed for the protection of tripwire database and report files . Local key used by the tripwire to avoid unauthorized modification of tripwire baseline database. + +![local key1](http://blog.linoxide.com/wp-content/uploads/2015/11/local-key1.png) + +#### Tripwire configuration path #### + +Tripwire configuration saved in the /etc/tripwire/twcfg.txt file. It is used to generate encrypted configuration file tw.cfg. + +![configuration file](http://blog.linoxide.com/wp-content/uploads/2015/11/configuration-file.png) + +**Tripwire Policy path** + +Tripwire saves policies in /etc/tripwire/twpol.txt file . It is used for the generation of encrypted policy file tw.pol used by the tripwire. + +![tripwire policy](http://blog.linoxide.com/wp-content/uploads/2015/11/tripwire-policy.png) + +Final installation of tripwire is shown in the following snapshot. + +![installed tripewire1](http://blog.linoxide.com/wp-content/uploads/2015/11/installed-tripewire1.png) + +#### Tripwire Configuration file (twcfg.txt) #### + +Tripwire configuration file (twcfg.txt) details is given below. Paths of encrypted policy file (tw.pol), site key (site.key) and local key (hostname-local.key) etc are given below. + + ROOT =/usr/sbin + + POLFILE =/etc/tripwire/tw.pol + + DBFILE =/var/lib/tripwire/$(HOSTNAME).twd + + REPORTFILE =/var/lib/tripwire/report/$(HOSTNAME)-$(DATE).twr + + SITEKEYFILE =/etc/tripwire/site.key + + LOCALKEYFILE =/etc/tripwire/$(HOSTNAME)-local.key + + EDITOR =/usr/bin/editor + + LATEPROMPTING =false + + LOOSEDIRECTORYCHECKING =false + + MAILNOVIOLATIONS =true + + EMAILREPORTLEVEL =3 + + REPORTLEVEL =3 + + SYSLOGREPORTING =true + + MAILMETHOD =SMTP + + SMTPHOST =localhost + + SMTPPORT =25 + + TEMPDIRECTORY =/tmp + +#### Tripwire Policy Configuration #### + +Configure tripwire configuration before generation of baseline database. It is necessary to disable few policies such as /dev , /proc ,/root/mail etc. Detailed policy file twpol.txt is given below. + + @@section GLOBAL + TWBIN = /usr/sbin; + TWETC = /etc/tripwire; + TWVAR = /var/lib/tripwire; + + # + # File System Definitions + # + @@section FS + + # + # First, some variables to make configuration easier + # + SEC_CRIT = $(IgnoreNone)-SHa ; # Critical files that cannot change + + SEC_BIN = $(ReadOnly) ; # Binaries that should not change + + SEC_CONFIG = $(Dynamic) ; # Config files that are changed + # infrequently but accessed + # often + + SEC_LOG = $(Growing) ; # Files that grow, but that + # should never change ownership + + SEC_INVARIANT = +tpug ; # Directories that should never + # change permission or ownership + + SIG_LOW = 33 ; # Non-critical files that are of + # minimal security impact + + SIG_MED = 66 ; # Non-critical files that are of + # significant security impact + + SIG_HI = 100 ; # Critical files that are + # significant points of + # vulnerability + + # + # Tripwire Binaries + # + ( + rulename = "Tripwire Binaries", + severity = $(SIG_HI) + ) + { + $(TWBIN)/siggen -> $(SEC_BIN) ; + $(TWBIN)/tripwire -> $(SEC_BIN) ; + $(TWBIN)/twadmin -> $(SEC_BIN) ; + $(TWBIN)/twprint -> $(SEC_BIN) ; + } + { + /boot -> $(SEC_CRIT) ; + /lib/modules -> $(SEC_CRIT) ; + } + + ( + rulename = "Boot Scripts", + severity = $(SIG_HI) + ) + { + /etc/init.d -> $(SEC_BIN) ; + #/etc/rc.boot -> $(SEC_BIN) ; + /etc/rcS.d -> $(SEC_BIN) ; + /etc/rc0.d -> $(SEC_BIN) ; + /etc/rc1.d -> $(SEC_BIN) ; + /etc/rc2.d -> $(SEC_BIN) ; + /etc/rc3.d -> $(SEC_BIN) ; + /etc/rc4.d -> $(SEC_BIN) ; + /etc/rc5.d -> $(SEC_BIN) ; + /etc/rc6.d -> $(SEC_BIN) ; + } + + ( + rulename = "Root file-system executables", + severity = $(SIG_HI) + ) + { + /bin -> $(SEC_BIN) ; + /sbin -> $(SEC_BIN) ; + } + + # + # Critical Libraries + # + ( + rulename = "Root file-system libraries", + severity = $(SIG_HI) + ) + { + /lib -> $(SEC_BIN) ; + } + + # + # Login and Privilege Raising Programs + # + ( + rulename = "Security Control", + severity = $(SIG_MED) + ) + { + /etc/passwd -> $(SEC_CONFIG) ; + /etc/shadow -> $(SEC_CONFIG) ; + } + { + #/var/lock -> $(SEC_CONFIG) ; + #/var/run -> $(SEC_CONFIG) ; # daemon PIDs + /var/log -> $(SEC_CONFIG) ; + } + + # These files change the behavior of the root account + ( + rulename = "Root config files", + severity = 100 + ) + { + /root -> $(SEC_CRIT) ; # Catch all additions to /root + #/root/mail -> $(SEC_CONFIG) ; + #/root/Mail -> $(SEC_CONFIG) ; + /root/.xsession-errors -> $(SEC_CONFIG) ; + #/root/.xauth -> $(SEC_CONFIG) ; + #/root/.tcshrc -> $(SEC_CONFIG) ; + #/root/.sawfish -> $(SEC_CONFIG) ; + #/root/.pinerc -> $(SEC_CONFIG) ; + #/root/.mc -> $(SEC_CONFIG) ; + #/root/.gnome_private -> $(SEC_CONFIG) ; + #/root/.gnome-desktop -> $(SEC_CONFIG) ; + #/root/.gnome -> $(SEC_CONFIG) ; + #/root/.esd_auth -> $(SEC_CONFIG) ; + # /root/.elm -> $(SEC_CONFIG) ; + #/root/.cshrc -> $(SEC_CONFIG) ; + #/root/.bashrc -> $(SEC_CONFIG) ; + #/root/.bash_profile -> $(SEC_CONFIG) ; + # /root/.bash_logout -> $(SEC_CONFIG) ; + #/root/.bash_history -> $(SEC_CONFIG) ; + #/root/.amandahosts -> $(SEC_CONFIG) ; + #/root/.addressbook.lu -> $(SEC_CONFIG) ; + #/root/.addressbook -> $(SEC_CONFIG) ; + #/root/.Xresources -> $(SEC_CONFIG) ; + #/root/.Xauthority -> $(SEC_CONFIG) -i ; # Changes Inode number on login + /root/.ICEauthority -> $(SEC_CONFIG) ; + } + + # + # Critical devices + # + ( + rulename = "Devices & Kernel information", + severity = $(SIG_HI), + ) + { + #/dev -> $(Device) ; + #/proc -> $(Device) ; + } + +#### Tripwire Report #### + +**tripwire –check** command checks the twpol.txt file and based on this file generates tripwire report which is shown below. If this is any error in the twpol.txt file, tripwire does not generate report. + +![tripwire report](http://blog.linoxide.com/wp-content/uploads/2015/11/tripwire-report.png) + +**Report in text form** + + root@VMdebian:/home/labadmin# tripwire --check + + Parsing policy file: /etc/tripwire/tw.pol + + *** Processing Unix File System *** + + Performing integrity check... + + Wrote report file: /var/lib/tripwire/report/VMdebian-20151024-122322.twr + + Open Source Tripwire(R) 2.4.2.2 Integrity Check Report + + Report generated by: root + + Report created on: Sat Oct 24 12:23:22 2015 + + Database last updated on: Never + + Report Summary: + + ========================================================= + + Host name: VMdebian + + Host IP address: 127.0.1.1 + + Host ID: None + + Policy file used: /etc/tripwire/tw.pol + + Configuration file used: /etc/tripwire/tw.cfg + + Database file used: /var/lib/tripwire/VMdebian.twd + + Command line used: tripwire --check + + ========================================================= + + Rule Summary: + + ========================================================= + + ------------------------------------------------------------------------------- + + Section: Unix File System + + ------------------------------------------------------------------------------- + + Rule Name Severity Level Added Removed Modified + + --------- -------------- ----- ------- -------- + + Other binaries 66 0 0 0 + + Tripwire Binaries 100 0 0 0 + + Other libraries 66 0 0 0 + + Root file-system executables 100 0 0 0 + + Tripwire Data Files 100 0 0 0 + + System boot changes 100 0 0 0 + + (/var/log) + + Root file-system libraries 100 0 0 0 + + (/lib) + + Critical system boot files 100 0 0 0 + + Other configuration files 66 0 0 0 + + (/etc) + + Boot Scripts 100 0 0 0 + + Security Control 66 0 0 0 + + Root config files 100 0 0 0 + + Invariant Directories 66 0 0 0 + + Total objects scanned: 25943 + + Total violations found: 0 + + =========================Object Summary:================================ + + ------------------------------------------------------------------------------- + + # Section: Unix File System + + ------------------------------------------------------------------------------- + + No violations. + + ===========================Error Report:===================================== + + No Errors + + ------------------------------------------------------------------------------- + + *** End of report *** + + Open Source Tripwire 2.4 Portions copyright 2000 Tripwire, Inc. Tripwire is a registered + + trademark of Tripwire, Inc. This software comes with ABSOLUTELY NO WARRANTY; + + for details use --version. This is free software which may be redistributed + + or modified only under certain conditions; see COPYING for details. + + All rights reserved. + + Integrity check complete. + +### Conclusion ### + +In this article, we learned installation and basic configuration of open source IDS tool Tripwire. First it generates baseline database and detects any change (file/folder) by comparing it with already generated baseline. However, tripwire is not live monitoring IDS. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/security/configure-tripwire-ids-debian/ + +作者:[nido][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/naveeda/ \ No newline at end of file diff --git a/sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md b/sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md new file mode 100644 index 0000000000..424e201b2c --- /dev/null +++ b/sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md @@ -0,0 +1,177 @@ +How to Install GitLab on Ubuntu / Fedora / Debian +================================================================================ +Distributed version control was never easy before git. Git is a free and open source software that is designed to handle everything from small to very large projects with ease and speed. Git was first developed by Linus Torvalds who was also the founder of well-known Linux Kernel. [GitLab][1] is an awesome development in the field of git and distributed version control system. It is a web based Git repository managing application which includes features like code reviews,wikis, issue tracking and much more. Creating, reviewing and deploying codes is very easy, managed and fast with GitLab. It can be hosted in our own server though it also provides free repository hosting in its official server which is similar to Github. GitLab has two different editions, Community Edition and Enterprise Edition. Community Edition is a complete free and open source software licensed under MIT License whereas Enterprise Edition is under a proprietary license, and contains features that are not present in the CE version. Here are some easy steps on how we can install GitLab Community Edition on our machine running Ubuntu, Fedora and Debian as operating system. + +### 1. Installing Pre-requisties ### + +First of all, we'll install the required dependencies by GitLab Community Edition. We'll install curl in order to download our required files, openssh-server in order to ssh into our machine, ca-certificates to add CA Certifications and postfix as an MTA (Mail Transfer Agent). + +Note: To install GitLab CE, we need to have a linux machine with at least 2 GB RAM and 2 Cores CPU. + +#### On Ubuntu 14 .04/Debian 8.x #### + +As these packages are available on the official repository of box Ubuntu 14.04 and Debian 8.x, we'll simply install it using apt-get package manager. To do so, we'll need to execute the following command in a terminal or console. + + # apt-get install curl openssh-server ca-certificates postfix + +![install dependencies gitlab ubuntu debian](http://blog.linoxide.com/wp-content/uploads/2015/10/install-dependencies-gitlab-ubuntu-debian.png) + +#### On Fedora 22 #### + +In Fedora 22, the default package manager is dnf as yum has been depreciated. So, we'll simply run the following dnf command in order to install those required packages. + + # dnf install curl openssh-server postfix + +![install dependencies gitlab fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/install-dependencies-gitlab-fedora.png) + +### 2. Starting and Enabling Services ### + +Now, we'll start the services of sshd and postfix using our default init system. And we'll also enable them to start automatically in every system boot. + +#### On Ubuntu 14.04 #### + +As SysVinit is installed as init system in Ubuntu 14.04, we'll use services command to start sshd and postfix daemon. + + # service sshd start + # service postfix start + +Now, in order to make them start automatically in every boot, we'll need to run the following update-rc.d command. + + # update-rc.d sshd enable + # update-rc.d postfix enable + +#### On Fedora 22/Debian 8.x #### + +As Fedora 22 and Debian 8.x is shipped with Systemd instead of SysVinit as default init system, we'll simply run the following command to start the sshd and postfix services. + + # systemctl start sshd postfix + +Now, in order to make them start automatically in every boot, we'll need to run the following systemctl command. + + # systemctl enable sshd postfix + + Created symlink from /etc/systemd/system/multi-user.target.wants/sshd.service to /usr/lib/systemd/system/sshd.service. + Created symlink from /etc/systemd/system/multi-user.target.wants/postfix.service to /usr/lib/systemd/system/postfix.service. + +### 3. Downloading GitLab ### + +We'll now download the binary installation files from the official GitLab CE Repository using curl. First, we'll need to navigate to the repository in order to get the download link of the required file. To do so, we'll need to run the following command in our linux machine running the respective operating system. + +#### On Ubuntu 14.04 #### + +As Ubuntu and Debian uses the same debian format file, we'll gonna search the required version of GitLab under [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][2] and click on the link of the required release with ubuntu/trusty tag as we are running Ubuntu 14.04. A new page will appear in which we can see the Download button, we'll gonna right click it, get the link of the file and then download it using curl as shown bellow. + + # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/trusty/gitlab-ce_8.1.2-ce.0_amd64.deb + +![Downloading Gitlab Ubuntu](http://blog.linoxide.com/wp-content/uploads/2015/10/downloading-gitlab-ubuntu.png) + +#### On Debian 8.x #### + +Like Ubuntu, we'll gonna search the required version of it under [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][3] and click on the link of the requried release with debian/jessie tag as we are running Debian 8.x. Then, a new page will appear in which we'll right click on the Download button and get the file's download link. We'll next download it using curl as shown below. + + # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/jessie/gitlab-ce_8.1.2-ce.0_amd64.deb/download + +![Downloading Gitlab Debian](http://blog.linoxide.com/wp-content/uploads/2015/10/downloading-gitlab-debian.png) + +#### On Fedora 22 #### + +As Fedora uses the rpm file for packages, we'll gonna search the required version of GitLab under [https://packages.gitlab.com/gitlab/gitlab-ce?filter=rpms][4] and click on the link of the required release, here as we are running Fedora 22, we'll select the release with el/7 tag. A new page will appear in which we can see the Download button, we'll gonna right click it, get the link of the file and then download it using curl as shown bellow. + + # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm/download + +![Downloading Gitlab Fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/downloading-gitlab-fedora.png) + +### 4. Installing GitLab ### + +After our repository source is added in our linux machine, we'll now go for the installation of GitLab Community Edition using the default package manger of the respective distribution of linux. + +#### On Ubuntu 14.04/Debian 8.x #### + +To install GitLab CE in machine running Ubuntu 14.04 or Debian 8.x linux distribution which has apt-get package manager, we'll simply run the following command. + + # dpkg -i gitlab-ce_8.1.2-ce.0_amd64.deb + +![Installing Gitlab Ubuntu Debian](http://blog.linoxide.com/wp-content/uploads/2015/10/installing-gitlab-ubuntu-debian.png) + +#### On Fedora 22 #### + +We can execute the following dnf command to install it in our Fedora 22 box. + + # dnf install gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm + +![Installing Gitlab Fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/installing-gitlab-fedora.png) + +### 5. Configuring and Starting GitLab ### + +Next, as GitLab CE has been successfully installed in our linux system. We'll now go ahead for configuring and starting it. To do so, we'll need to run the following command which is same in Ubuntu, Debian and Fedora distributions. + + # gitlab-ctl reconfigure + +![Reconfiguring Gitlab](http://blog.linoxide.com/wp-content/uploads/2015/10/reconfiguring-gitlab.png) + +### 6. Allowing Firewall ### + +If we have firewall program enabled for security in our linux box, we'll need to allow port 80 which is the default port of GitLab CE in order to make the web interface accessible across the network. Firewalld and iptables are most widely used firewall programs in linux distributions. In order to do so, we'll need to run the following commands. +On Iptables + +Iptables are installed and used in Ubuntu 14.04 by default. So, we'll need to run the following iptables commands to open port 80 in it. + + # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT + + # /etc/init.d/iptables save + +#### On Firewalld #### + +As Fedora 22 and Debian 8.x has systemd installed by default, it contains firewalld running as firewall program. In order to open the port 80 (http service) on firewalld, we'll need to execute the below commands. + + # firewall-cmd --permanent --add-service=http + + success + + # firewall-cmd --reload + + success + +### 7. Accessing GitLab Web Interface ### + +Finally, we'll now go for accessing the web interface of GitLab CE. To do so, we'll need to point our web browser to the GitLab server with http://ip-address/ or http://domain.com/ according to our configuration. After we have pointed successfully, we'll see the following screen. + +![Gitlab Login Screen](http://blog.linoxide.com/wp-content/uploads/2015/10/gitlab-login-screen.png) + +Now, in order to login to the panel, we'll need to click on Login button which will ask us an username and a password. We'll now enter the default username and password ie **root** and **5iveL!fe** respectively. After logging into the dashboard, we'll be asked to compulsorily enter the new password for our GitLab root user. + +![Setting New Password Gitlab](http://blog.linoxide.com/wp-content/uploads/2015/10/setting-new-password-gitlab.png) + +### 8. Creating Repository ### + +After we have successfully changed the password and logged in to our dashboard, we'll now create a new repository for our new project. To do so, we'll need to go under Projects and click on **NEW PROJECT** green button. + +![Creating New Projects](http://blog.linoxide.com/wp-content/uploads/2015/10/creating-new-projects.png) + +Then, we'll be asked to enter the required information and settings for our repository as shown below. We can even import our project from many git repository providers and repositories. + +![Creating New Project](http://blog.linoxide.com/wp-content/uploads/2015/10/configuring-git-project.png) + +After thats done, we'll be able to access our Git repository using any Git client including the basic git command line. We can see every activities done in the repository with other functions like creating a milestone, managing issues, merge requests, managing members, labels and Wiki for our projects. + +![Gitlab Menu](http://blog.linoxide.com/wp-content/uploads/2015/10/gitlab-menu.png) + +### Conclusion ### + +GitLab is an awesome open source web application for managing our git repository. It has a beautiful, responsive interface with plenty of cool features. It is packed with many cool features like managing groups, deploying keys, Continuous Integration, viewing logs, broadcast messages, hooks, system OAuth applications, templates and more. It has the ability to integrate tons of tools such as Slack, Hipchat, LDAP, JIRA, Jenkins, many types of hooks and a complete API. It has the minimum requirement of 2 GB RAM and 2 Cores CPU to run smoothly up to 500 users but also can be scaled to multiple active servers. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-gitlab-on-ubuntu-fedora-debian/ + +作者:[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/ +[1]:https://about.gitlab.com/ +[2]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs +[3]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs +[4]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=rpms \ No newline at end of file From af92e8e72798a86689e928ff29e4095036fe80cd Mon Sep 17 00:00:00 2001 From: sevenot Date: Mon, 9 Nov 2015 16:40:28 +0800 Subject: [PATCH 2424/2517] sevenot translating --- ...51012 Curious about Linux Try Linux Desktop on the Cloud.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md b/sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md index 286d6ba816..6ac2f2a9eb 100644 --- a/sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md +++ b/sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md @@ -1,3 +1,4 @@ +sevenot translating Curious about Linux? Try Linux Desktop on the Cloud ================================================================================ Linux maintains a very small market share as a desktop operating system. Current surveys estimate its share to be a mere 2%; contrast that with the various strains (no pun intended) of Windows which total nearly 90% of the desktop market. For Linux to challenge Microsoft's monopoly on the desktop, there needs to be a simple way of learning about this different operating system. And it would be naive to believe a typical Windows user is going to buy a second machine, tinker with partitioning a hard disk to set up a multi-boot system, or just jump ship to Linux without an easy way back. @@ -41,4 +42,4 @@ via: http://www.linuxlinks.com/article/20151003095334682/LinuxCloud.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[1]:https://www.labxnow.org/labxweb/ \ No newline at end of file +[1]:https://www.labxnow.org/labxweb/ From c1d1eccc4d50dc40eccd5d4b3d863b9faf5b8bf3 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Mon, 9 Nov 2015 17:07:57 +0800 Subject: [PATCH 2425/2517] Update 20151109 How to Set Up AWStats On Ubuntu Server.md --- .../tech/20151109 How to Set Up AWStats On Ubuntu Server.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md b/sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md index dae3c3af4f..00db229c5e 100644 --- a/sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md +++ b/sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md @@ -1,3 +1,4 @@ +translation by strugglingyouth How to Set Up AWStats On Ubuntu Server ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/10/Apache_awstats_featured.jpg) @@ -103,4 +104,4 @@ via: https://www.maketecheasier.com/set-up-awstats-ubuntu/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:https://www.maketecheasier.com/author/hiteshjethva/ \ No newline at end of file +[a]:https://www.maketecheasier.com/author/hiteshjethva/ From f619f1c4b1330a6009da8ce46819779e738d466b Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 10 Nov 2015 10:16:54 +0800 Subject: [PATCH 2426/2517] Update 20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md --- ...51104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md b/sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md index 0e689ede9e..1c7b1614d0 100644 --- a/sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md +++ b/sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md @@ -1,3 +1,4 @@ +translation by strugglingyouth Ubuntu Software Centre To Be Replaced in 16.04 LTS ================================================================================ ![The USC Will Be Replaced](http://www.omgubuntu.co.uk/wp-content/uploads/2011/09/usc1.jpg) @@ -53,4 +54,4 @@ via: http://www.omgubuntu.co.uk/2015/11/the-ubuntu-software-centre-is-being-repl 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:https://plus.google.com/111008502832304483939?rel=author -[1]:https://wiki.gnome.org/Apps/Software \ No newline at end of file +[1]:https://wiki.gnome.org/Apps/Software From e72c1631a42b081923959f56ad8ce4d039dfd125 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 10 Nov 2015 11:24:50 +0800 Subject: [PATCH 2427/2517] Delete 20151109 How to Set Up AWStats On Ubuntu Server.md --- ... How to Set Up AWStats On Ubuntu Server.md | 107 ------------------ 1 file changed, 107 deletions(-) delete mode 100644 sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md diff --git a/sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md b/sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md deleted file mode 100644 index 00db229c5e..0000000000 --- a/sources/tech/20151109 How to Set Up AWStats On Ubuntu Server.md +++ /dev/null @@ -1,107 +0,0 @@ -translation by strugglingyouth -How to Set Up AWStats On Ubuntu Server -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/10/Apache_awstats_featured.jpg) - -AWStats is an open-source Web analytics reporting tool that generates advanced web, streaming, FTP or mail server statistics graphically. This log analyser works as a CGI or from command line and shows you all the possible information your log contains in a few graphical web pages. It uses a partial information file to be able to process large log files often and quickly. It supports most web server log file formats including Apache, IIS and many other web server log formats. - -This article will help you to install and configure AWStats on Ubuntu. - -### Install AWStats Package ### - -By default, AWStats package is available in the Ubuntu repository. - -You can install it by running: - - sudo apt-get install awstats - -Next you will need to enable the CGI module in Apache. - -You can do this by running: - - sudo a2enmod cgi - -Now, restart Apache to reflect the changes. - - sudo /etc/init.d/apache2 restart - -### Configure AWStats ### - -You need to create a configuration file for each domain or website you wish to view statistics for. In this example we will create a configuration file for “test.com“. - -You can do this by duplicating the AWStats default configuration file to one with your domain name. - - sudo cp /etc/awstats/awstats.conf /etc/awstats/awstats.test.com.conf - -Now, you need to make some changes in the config file: - - sudo nano /etc/awstats/awstats.test.com.conf - -Update the settings shown below: - - # Change to Apache log file, by default it's /var/log/apache2/access.log - LogFile="/var/log/apache2/access.log" - - # Change to the website domain name - SiteDomain="test.com" - HostAliases="www.test.com localhost 127.0.0.1" - - # When this parameter is set to 1, AWStats adds a button on report page to allow to "update" statistics from a web browser - AllowToUpdateStatsFromBrowser=1 - -Save and close the file. - -After these changes, you need to build your initial statistics which will be generated from the current logs on your server. You can do this using: - - sudo /usr/lib/cgi-bin/awstats.pl -config=test.com -update - -The output will look something like this: - -![awtstats](https://www.maketecheasier.com/assets/uploads/2015/10/awtstats.png) - -### Configure Apache For AWStats ### - -Next, you need to configure Apache2 to show these stats. Now copy the content of the “cgi-bin” folder to the default document root directory of your Apache installation. By default, this is in the “/usr/lib/cgi-bin” folder. - -You can do this by running: - - sudo cp -r /usr/lib/cgi-bin /var/www/html/ - sudo chown www-data:www-data /var/www/html/cgi-bin/ - sudo chmod -R 755 /var/www/html/cgi-bin/ - -### Test AWStats ### - -Now you can access your AWStats by visiting the url “http://your-server-ip/cgi-bin/awstats.pl?config=test.com.” -It will show you a results page like this: - -![awstats_page](https://www.maketecheasier.com/assets/uploads/2015/10/awstats_page.jpg) - -### Set Up Cron to Update Logs ### - -It is recommended to schedule a cron job to regularly update the AWStats database using newly created log entries, so the stats get updated on a regular basis. This will also save your time. - -To do this you need to edit the “/etc/crontab” file: - - sudo nano /etc/crontab - -Add the following line that tells AWStats to update every ten minutes. - - */10 * * * * root /usr/lib/cgi-bin/awstats.pl -config=test.com -update - -Save and close the file. - -### Conclusion ### - -AWStats is a very useful tool that can give you an overview of what is happening on your website and assist with site analysis. It is very easy to install and configure. Feel free to comment below if you have any questions. - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/set-up-awstats-ubuntu/ - -作者:[Hitesh Jethva][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/hiteshjethva/ From 5f6739f77b0eb6d969dd4802dadd029c82621242 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 10 Nov 2015 11:25:33 +0800 Subject: [PATCH 2428/2517] Create 20151109 How to Set Up AWStats On Ubuntu Server.md --- ... How to Set Up AWStats On Ubuntu Server.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 translated/tech/20151109 How to Set Up AWStats On Ubuntu Server.md diff --git a/translated/tech/20151109 How to Set Up AWStats On Ubuntu Server.md b/translated/tech/20151109 How to Set Up AWStats On Ubuntu Server.md new file mode 100644 index 0000000000..11bfdde3ab --- /dev/null +++ b/translated/tech/20151109 How to Set Up AWStats On Ubuntu Server.md @@ -0,0 +1,108 @@ + +如何在 Ubuntu 服务器中配置 AWStats +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/10/Apache_awstats_featured.jpg) + + +AWStats 是一个开源的网站分析报告工具,自带网络,流媒体,FTP 或邮件服务器统计图。此日志分析器以 CGI 或命令行方式进行工作,并在网页中以图表的形式尽可能的显示你日志中所有的信息。它采用的是部分信息文件,以便能够频繁并快速处理大量的日志文件。它支持绝大多数 Web 服务器日志文件格式,包括 Apache,IIS 等。 + +本文将帮助你在 Ubuntu 上安装配置 AWStats。 + +### 安装 AWStats 包 ### + +默认情况下,AWStats 的包在 Ubuntu 仓库中。 + +可以通过运行下面的命令来安装: + + sudo apt-get install awstats + +接下来,你需要启用 Apache 的 CGI 模块。 + +运行以下命令来启动: + + sudo a2enmod cgi + +现在,重新启动 Apache 以使改变生效。 + + sudo /etc/init.d/apache2 restart + +### 配置 AWStats ### + +你需要为你想要查看统计的每个域或网站创建一个配置文件。在这个例子中,我们将为 “test.com” 创建一个配置文件。 + +要完成此步,你可以通过复制 AWStats 的默认配置文件来配置你要统计的域。 + + sudo cp /etc/awstats/awstats.conf /etc/awstats/awstats.test.com.conf + +现在,你需要在配置文件中做一些修改: + + sudo nano /etc/awstats/awstats.test.com.conf + +像下面这样修改下: + + # Change to Apache log file, by default it's /var/log/apache2/access.log + LogFile="/var/log/apache2/access.log" + + # Change to the website domain name + SiteDomain="test.com" + HostAliases="www.test.com localhost 127.0.0.1" + + # When this parameter is set to 1, AWStats adds a button on report page to allow to "update" statistics from a web browser + AllowToUpdateStatsFromBrowser=1 + +保存并关闭文件。 + +修改配置文件后,你需要用服务器的当前日志建立初步统计。你可以这样做: + + sudo /usr/lib/cgi-bin/awstats.pl -config=test.com -update + +输出会是这个样子: + +![awtstats](https://www.maketecheasier.com/assets/uploads/2015/10/awtstats.png) + +### 为 Apache 配置 AWStats ### + +接下来,你需要配置 Apache2 来显示统计数据。现在你需要将 “cgi-bin” 文件夹中的内容复制到 Apache 默认根目录下。默认它是在 “/usr/lib/cgi-bin”。 + +运行以下命令来完成此步: + + sudo cp -r /usr/lib/cgi-bin /var/www/html/ + sudo chown www-data:www-data /var/www/html/cgi-bin/ + sudo chmod -R 755 /var/www/html/cgi-bin/ + +### 测试 AWStats ### + +现在,您可以通过访问 url “http://your-server-ip/cgi-bin/awstats.pl?config=test.com.” 来查看 AWStats 的页面。 +它的页面像下面这样: + +![awstats_page](https://www.maketecheasier.com/assets/uploads/2015/10/awstats_page.jpg) + +### 设置定时任务来更新日志 ### + +建议你创建一个定时任务,使用新创建的日志条目定期更新 AWStats 的数据库,然后统计会定期更新。这也将节省你的时间。 + +要做到这一点,你需要编辑 “/etc/crontab” 文件: + + sudo nano /etc/crontab + +添加下面那一行来让 AWStats 每十分钟更新一次。 + + */10 * * * * root /usr/lib/cgi-bin/awstats.pl -config=test.com -update + +保存并关闭文件。 + +### 结论 ### + +AWStats 是一个非常有用的工具,可以让你对网站的状况了如指掌,并能协助你分析网站。它非常容易安装和配置。如果你有任何疑问,请在下面发表评论。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/set-up-awstats-ubuntu/ + +作者:[Hitesh Jethva][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/hiteshjethva/ From 1bab3fad63a9bc48749145925370160391071d93 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Tue, 10 Nov 2015 12:20:07 +0800 Subject: [PATCH 2429/2517] [Translated]20150827 The Strangest Most Unique Linux Distros.md --- ...The Strangest Most Unique Linux Distros.md | 69 ------------------- ...The Strangest Most Unique Linux Distros.md | 66 ++++++++++++++++++ 2 files changed, 66 insertions(+), 69 deletions(-) delete mode 100644 sources/talk/20150827 The Strangest Most Unique Linux Distros.md create mode 100644 translated/talk/20150827 The Strangest Most Unique Linux Distros.md diff --git a/sources/talk/20150827 The Strangest Most Unique Linux Distros.md b/sources/talk/20150827 The Strangest Most Unique Linux Distros.md deleted file mode 100644 index 83ead1f75e..0000000000 --- a/sources/talk/20150827 The Strangest Most Unique Linux Distros.md +++ /dev/null @@ -1,69 +0,0 @@ -FSSlc Translating - -The Strangest, Most Unique Linux Distros -================================================================================ -From the most consumer focused distros like Ubuntu, Fedora, Mint or elementary OS to the more obscure, minimal and enterprise focused ones such as Slackware, Arch Linux or RHEL, I thought I've seen them all. Couldn't have been any further from the truth. Linux eco-system is very diverse. There's one for everyone. Let's discuss the weird and wacky world of niche Linux distros that represents the true diversity of open platforms. - -![strangest linux distros](http://2.bp.blogspot.com/--cSL2-6rIgA/VcwNc5hFebI/AAAAAAAAJzk/AgB55mVtJVQ/s1600/Puppy-Linux.png) - -**Puppy Linux**: An operating system which is about 1/10th the size of an average DVD quality movie rip, that's Puppy Linux for you. The OS is just 100 MB in size! And it can run from RAM making it unusually fast even in older PCs. You can even remove the boot medium after the operating system has started! Can it get any better than that? System requirements are bare minimum, most hardware are automatically detected, and it comes loaded with software catering to your basic needs. [Experience Puppy Linux][1]. - -![suicide linux](http://3.bp.blogspot.com/-dfeehRIQKpo/VdMgRVQqIJI/AAAAAAAAJz0/TmBs-n2K9J8/s1600/suicide-linux.jpg) - -**Suicide Linux**: Did the name scare you? Well it should. 'Any time - any time - you type any remotely incorrect command, the interpreter creatively resolves it into rm -rf / and wipes your hard drive'. Simple as that. I really want to know the ones who are confident enough to risk their production machines with [Suicide Linux][2]. **Warning: DO NOT try this on production machines!** The whole thing is available in a neat [DEB package][3] if you're interested. - -![top 10 strangest linux distros](http://3.bp.blogspot.com/-Q0hlEMCD9-o/VdMieAiXY1I/AAAAAAAAJ0M/iS_ZjVaZAk8/s1600/papyros.png) - -**PapyrOS**: "Strange" in a good way. PapyrOS is trying to adapt the material design language of Android into their brand new Linux distribution. Though the project is in early stages, it already looks very promising. The project page says the OS is 80% complete and one can expect the first Alpha release anytime soon. We did a small write up on [PapyrOS][4] when it was announced and by the looks of it, PapyrOS might even become a trend-setter of sorts. Follow the project on [Google+][5] and contribute via [BountySource][6] if you're interested. - -![10 most unique linux distros](http://3.bp.blogspot.com/-8aOtnTp3Yxk/VdMo_KWs4sI/AAAAAAAAJ0o/3NTqhaw60jM/s1600/qubes-linux.png) - -**Qubes OS**: Qubes is an open-source operating system designed to provide strong security using a Security by Compartmentalization approach. The assumption is that there can be no perfect, bug-free desktop environment. And by implementing a 'Security by Isolation' approach, [Qubes Linux][7] intends to remedy that. Qubes is based on Xen, the X Window System, and Linux, and can run most Linux applications and supports most Linux drivers. Qubes was selected as a finalist of Access Innovation Prize 2014 for Endpoint Security Solution. - -![top10 linux distros](http://3.bp.blogspot.com/-2Sqvb_lilC0/VdMq_ceoXnI/AAAAAAAAJ00/kot20ugVJFk/s1600/ubuntu-satanic.jpg) - -**Ubuntu Satanic Edition**: Ubuntu SE is a Linux distribution based on Ubuntu. "It brings together the best of free software and free metal music" in one comprehensive package consisting of themes, wallpapers, and even some heavy-metal music sourced from talented new artists. Though the project doesn't look actively developed anymore, Ubuntu Satanic Edition is strange in every sense of that word. [Ubuntu SE (Slightly NSFW)][8]. - -![10 strange linux distros](http://2.bp.blogspot.com/-ZtIVjGMqdx0/VdMv136Pz1I/AAAAAAAAJ1E/-q34j-TXyUY/s1600/tiny-core-linux.png) - -**Tiny Core Linux**: Puppy Linux not small enough? Try this. Tiny Core Linux is a 12 MB graphical Linux desktop! Yep, you read it right. One major caveat: It is not a complete desktop nor is all hardware completely supported. It represents only the core needed to boot into a very minimal X desktop typically with wired internet access. There is even a version without the GUI called Micro Core Linux which is just 9MB in size. [Tiny Core Linux][9] folks. - -![top 10 unique and special linux distros](http://4.bp.blogspot.com/-idmCvIxtxeo/VdcqcggBk1I/AAAAAAAAJ1U/DTQCkiLqlLk/s1600/nixos.png) - -**NixOS**: A very experienced-user focused Linux distribution with a unique approach to package and configuration management. In other distributions, actions such as upgrades can be dangerous. Upgrading a package can cause other packages to break, upgrading an entire system is much less reliable than reinstalling from scratch. And top of all that you can't safely test what the results of a configuration change will be, there's no "Undo" so to speak. In NixOS, the entire operating system is built by the Nix package manager from a description in a purely functional build language. This means that building a new configuration cannot overwrite previous configurations. Most of the other features follow this pattern. Nix stores all packages in isolation from each other. [More about NixOS][10]. - -![strangest linux distros](http://4.bp.blogspot.com/-rOYfBXg-UiU/VddCF7w_xuI/AAAAAAAAJ1w/Nf11bOheOwM/s1600/gobolinux.jpg) - -**GoboLinux**: This is another very unique Linux distro. What makes GoboLinux so different from the rest is its unique re-arrangement of the filesystem. It has its own subdirectory tree, where all of its files and programs are stored. GoboLinux does not have a package database because the filesystem is its database. In some ways, this sort of arrangement is similar to that seen in OS X. [Get GoboLinux][11]. - -![strangest linux distros](http://1.bp.blogspot.com/-3P22pYfih6Y/VdcucPOv4LI/AAAAAAAAJ1g/PszZDbe83sQ/s1600/hannah-montana-linux.jpg) - -**Hannah Montana Linux**: Here is a Linux distro based on Kubuntu with a Hannah Montana themed boot screen, KDM, icon set, ksplash, plasma, color scheme, and wallpapers (I'm so sorry). [Link][12]. Project not active anymore. - -**RLSD Linux**: An extremely minimalistic, small, lightweight and security-hardened, text-based operating system built on Linux. "It's a unique distribution that provides a selection of console applications and home-grown security features which might appeal to hackers," developers claim. [RLSD Linux][13]. - -Did we miss anything even stranger? Let us know. - --------------------------------------------------------------------------------- - -via: http://www.techdrivein.com/2015/08/the-strangest-most-unique-linux-distros.html - -作者:Manuel Jose -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm -[2]:http://qntm.org/suicide -[3]:http://sourceforge.net/projects/suicide-linux/files/ -[4]:http://www.techdrivein.com/2015/02/papyros-material-design-linux-coming-soon.html -[5]:https://plus.google.com/communities/109966288908859324845/stream/3262a3d3-0797-4344-bbe0-56c3adaacb69 -[6]:https://www.bountysource.com/teams/papyros -[7]:https://www.qubes-os.org/ -[8]:http://ubuntusatanic.org/ -[9]:http://tinycorelinux.net/ -[10]:https://nixos.org/ -[11]:http://www.gobolinux.org/ -[12]:http://hannahmontana.sourceforge.net/ -[13]:http://rlsd2.dimakrasner.com/ diff --git a/translated/talk/20150827 The Strangest Most Unique Linux Distros.md b/translated/talk/20150827 The Strangest Most Unique Linux Distros.md new file mode 100644 index 0000000000..14cee08661 --- /dev/null +++ b/translated/talk/20150827 The Strangest Most Unique Linux Distros.md @@ -0,0 +1,66 @@ +那些奇特的 Linux 发行版本 +================================================================================ +从大多数消费者所关注的诸如 Ubuntu,Fedora,Mint 或 elementary OS 到更加晦涩、轻量级和企业级的诸如 Slackware,Arch Linux 或 RHEL,这些发行版本我都已经见识过了。除了这些,难道没有其他别的了吗?其实 Linux 的生态系统是非常多样化的,对每个人来说,总有一款适合你。下面就让我们讨论一些稀奇古怪的小众 Linux 发行版本吧,它们代表着开源平台真正的多样性。 + +![strangest linux distros](http://2.bp.blogspot.com/--cSL2-6rIgA/VcwNc5hFebI/AAAAAAAAJzk/AgB55mVtJVQ/s1600/Puppy-Linux.png) + +**Puppy Linux**: 它是一个仅有一个普通 DVD 光盘容纳十分之一大小的操作系统,这就是 Puppy Linux。整个操作系统仅有 100MB 大小!并且它还可以在内存中运行,这使得它运行极快,甚至是在老式的 PC 机上。 在操作系统启动后,你甚至可以移除安装介质!还有什么比这个更好的吗? 系统所需的资源极小,大多数的硬件都会被自动检测到,并且它预装了能够满足你基本需求的软件。[在这里体验 Puppy Linux 吧][1]. + +![suicide linux](http://3.bp.blogspot.com/-dfeehRIQKpo/VdMgRVQqIJI/AAAAAAAAJz0/TmBs-n2K9J8/s1600/suicide-linux.jpg) + +**Suicide Linux(自杀 Linux)**: 这个名字吓到你了吗?我想应该是。 ‘任何时候 -注意是任何时候-一旦你输入不正确的命令,解释器都会创造性地将它重定向为 `rm -rf /` 命令,然后擦除你的硬盘’。它就是这么简单。我真的很想知道那些自信到将[Suicide Linux][2] 安装到生产机上的家伙。 **警告:不要在生产机上尝试这个!** 假如你感兴趣的话,现在可以通过一个简洁的[DEB 包][3]来获取到它。 + +![top 10 strangest linux distros](http://3.bp.blogspot.com/-Q0hlEMCD9-o/VdMieAiXY1I/AAAAAAAAJ0M/iS_ZjVaZAk8/s1600/papyros.png) + +**PapyrOS**: 它在好的方面上 “奇怪”。PapyrOS 正尝试着将 Android 的 material design 设计语言应用到新品牌的 Linux 发行版本上。尽管这个项目还处于早期阶段,看起来它已经很有前景。该项目的网页上说该系统已经完成了 80%,随后人们可以期待它的第一个 Alpha 发行版本。在该项目被宣告提出时,我们做了[PapyrOS][4]的小幅报道,从它的外观上看,它甚至可能会引领潮流。假如你感兴趣的话,可在[Google+][5]上关注该项目并可通过[BountySource][6]来贡献出你的力量。 + +![10 most unique linux distros](http://3.bp.blogspot.com/-8aOtnTp3Yxk/VdMo_KWs4sI/AAAAAAAAJ0o/3NTqhaw60jM/s1600/qubes-linux.png) + +**Qubes OS**: Qubes 是一个开源的操作系统,通过使用安全划分的方法,被设计用来提供强大的安全性。其前提假设是不存在完美的没有 bug 的桌面环境。并通过实现一个‘安全隔离’ 的方法,[Qubes Linux][7]尝试去弥补那些 bug。Qubes 基于 Xen,X 视窗系统和 Linux,并可运行大多数的 Linux 应用,支持大多数的 Linux 驱动。Qubes 入选了 Access Innovation Prize 2014 for Endpoint Security Solution 决赛名单。 + +![top10 linux distros](http://3.bp.blogspot.com/-2Sqvb_lilC0/VdMq_ceoXnI/AAAAAAAAJ00/kot20ugVJFk/s1600/ubuntu-satanic.jpg) + +**Ubuntu Satanic Edition**: Ubuntu SE 是一个基于 Ubuntu 的发行版本。通过一个含有主题、壁纸甚至来源于某些天才新晋艺术家的重金属音乐的综合软件包,“它同时带来了最好的自由软件和免费的金属音乐” 。尽管这个项目看起来不再被活跃地发展了, Ubuntu Satanic Edition 甚至在其名字上都显得奇异。 [Ubuntu SE (Slightly NSFW)][8]。 + +![10 strange linux distros](http://2.bp.blogspot.com/-ZtIVjGMqdx0/VdMv136Pz1I/AAAAAAAAJ1E/-q34j-TXyUY/s1600/tiny-core-linux.png) + +**Tiny Core Linux**: Puppy Linux 还不够小?试试这个吧。 Tiny Core Linux 是一个 12MB 大小的图形化 Linux 桌面!是的,你没有读错。一个主要的补充说明:它不是一个完整的桌面,也并不完全支持所有的硬件。它只含有能够启动进入一个非常小巧的 X 桌面,支持有线网络连接的核心部件。它甚至还有一个名为 Micro Core Linux 的没有 GUI 的版本,仅有 9MB 大小。[Tiny Core Linux][9]。 + +![top 10 unique and special linux distros](http://4.bp.blogspot.com/-idmCvIxtxeo/VdcqcggBk1I/AAAAAAAAJ1U/DTQCkiLqlLk/s1600/nixos.png) + +**NixOS**: 它是一个非常关注经验用户的 Linux 发行版本,有着独特的方式来打包和配置管理。在其他的发行版本中,诸如升级的操作可能是非常危险的。升级一个软件包可能会引起其他包无法使用,相比于从头安装一个系统,升级整个系统则显得不是那么可信。在那些你不能安全地测试由一个配置的改变所带来的结果的更改之上,它们通常没有“重来”这个选项。在 NixOS 中,整个系统由 Nix 包管理器按照一个纯功能性的构建语言的描述来构建。这意味着一个新的配置不会重写先前的配置。大多数其他的特色功能也遵循着这个模式。Nix 相互分离地存储所有的软件包。有关 NixOS 的更多内容请看[这里][10]。 + +![strangest linux distros](http://4.bp.blogspot.com/-rOYfBXg-UiU/VddCF7w_xuI/AAAAAAAAJ1w/Nf11bOheOwM/s1600/gobolinux.jpg) + +**GoboLinux**: 这是另一个非常奇特的 Linux 发行版本。它与其他系统如此不同的原因是它有着独特的重管理文件系统。它有着自己独特的子目录树,其中存储着所有的文件和程序。GoboLinux 没有专门的包数据库,因为其文件系统就是它的数据库。在某些方面,这类管理有些类似于 OS X 上所看到的功能。 + +![strangest linux distros](http://1.bp.blogspot.com/-3P22pYfih6Y/VdcucPOv4LI/AAAAAAAAJ1g/PszZDbe83sQ/s1600/hannah-montana-linux.jpg) + +**Hannah Montana Linux**: 它是一个基于 Kubuntu 的 Linux 发行版本,它有着 Hannah Montana 主题的开机启动界面、KDM(KDE Display Manager)、图标集、ksplash、plasma、颜色主题和壁纸(请抱歉)。[这是它的链接][12]。这个项目现在不再活跃了。 + +**RLSD Linux**: 它是一个极其精简、小巧、轻量和安全加固的,建立在 Linux 内核上的基于文本的操作系统。开发者称 “它是一个独特的发行版本,提供一系列的控制台应用和本地化的安全特性,对黑客或许有吸引力。” [RLSD Linux][13]. + +我们还错过了某些更加奇特的发行版本吗?请让我们知晓吧。 +-------------------------------------------------------------------------------- + +via: http://www.techdrivein.com/2015/08/the-strangest-most-unique-linux-distros.html + +作者:Manuel Jose +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm +[2]:http://qntm.org/suicide +[3]:http://sourceforge.net/projects/suicide-linux/files/ +[4]:http://www.techdrivein.com/2015/02/papyros-material-design-linux-coming-soon.html +[5]:https://plus.google.com/communities/109966288908859324845/stream/3262a3d3-0797-4344-bbe0-56c3adaacb69 +[6]:https://www.bountysource.com/teams/papyros +[7]:https://www.qubes-os.org/ +[8]:http://ubuntusatanic.org/ +[9]:http://tinycorelinux.net/ +[10]:https://nixos.org/ +[11]:http://www.gobolinux.org/ +[12]:http://hannahmontana.sourceforge.net/ +[13]:http://rlsd2.dimakrasner.com/ \ No newline at end of file From 4c219db036d4f0263372a19aa7115486af7f3688 Mon Sep 17 00:00:00 2001 From: Stdio A Date: Tue, 10 Nov 2015 14:14:09 +0800 Subject: [PATCH 2430/2517] Translating /sources/share/20151109 Open Source Alternatives to LastPass --- .../share/20151109 Open Source Alternatives to LastPass.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20151109 Open Source Alternatives to LastPass.md b/sources/share/20151109 Open Source Alternatives to LastPass.md index d8f9b908ae..d6d6f1a11e 100644 --- a/sources/share/20151109 Open Source Alternatives to LastPass.md +++ b/sources/share/20151109 Open Source Alternatives to LastPass.md @@ -1,3 +1,5 @@ +Translating by StdioA + Open Source Alternatives to LastPass ================================================================================ LastPass is a cross-platform password management program. For Linux, it is available as a plugin for Firefox, Chrome, and Opera. LastPass Sesame is available for Ubuntu/Debian and Fedora. There is also a version of LastPass compatible with Firefox Portable for installing on a USB key. And with LastPass Pocket for Ubuntu/Debian, Fedora and openSUSE, there's good coverage. While LastPass is a highly rated service, it is proprietary software. And LastPass has recently been absorbed by LogMeIn. If you're looking for an open source alternative, this article is for you. @@ -122,4 +124,4 @@ via: http://www.linuxlinks.com/article/20151108125950773/LastPassAlternatives.ht [1]:http://www.keepassx.org/ [2]:https://encryptr.org/ [3]:http://rattic.org/ -[4]:http://www.gnome.org/projects/seahorse/ \ No newline at end of file +[4]:http://www.gnome.org/projects/seahorse/ From 0a0c567aa520aaae91eb320245ba15fdf973ced6 Mon Sep 17 00:00:00 2001 From: Stdio A Date: Tue, 10 Nov 2015 16:23:42 +0800 Subject: [PATCH 2431/2517] =?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 deleted: ../../sources/share/20151109 Open Source Alternatives to LastPass.md new file: 20151109 Open Source Alternatives to LastPass.md --- ...09 Open Source Alternatives to LastPass.md | 127 ------------------ ...09 Open Source Alternatives to LastPass.md | 123 +++++++++++++++++ 2 files changed, 123 insertions(+), 127 deletions(-) delete mode 100644 sources/share/20151109 Open Source Alternatives to LastPass.md create mode 100644 translated/share/20151109 Open Source Alternatives to LastPass.md diff --git a/sources/share/20151109 Open Source Alternatives to LastPass.md b/sources/share/20151109 Open Source Alternatives to LastPass.md deleted file mode 100644 index d6d6f1a11e..0000000000 --- a/sources/share/20151109 Open Source Alternatives to LastPass.md +++ /dev/null @@ -1,127 +0,0 @@ -Translating by StdioA - -Open Source Alternatives to LastPass -================================================================================ -LastPass is a cross-platform password management program. For Linux, it is available as a plugin for Firefox, Chrome, and Opera. LastPass Sesame is available for Ubuntu/Debian and Fedora. There is also a version of LastPass compatible with Firefox Portable for installing on a USB key. And with LastPass Pocket for Ubuntu/Debian, Fedora and openSUSE, there's good coverage. While LastPass is a highly rated service, it is proprietary software. And LastPass has recently been absorbed by LogMeIn. If you're looking for an open source alternative, this article is for you. - -We all face information overload. Whether you conduct business online, read for your job, or just read for pleasure, the internet is a vast source of information. Retaining that information on a long-term basis can be difficult. However, it is essential to recall certain items of information immediately. Passwords are one such example. - -As a computer user, you face the dilemma of choosing the same password or a unique password for each service or web site you use. Matters are complicated because some sites place restrictions on the selection of the password. For example, a site may insist on a minimum number of characters, capital letters, numerals, and other characters which make choosing the same password for each site to be impossible. More importantly, there are good security reasons not to duplicate passwords. This inevitably means that individuals will simply have too many passwords to remember. One solution is to keep the passwords in written form. However, this is also highly insecure. - -Instead of trying to remember an endless array of passwords, a popular solution is to use password manager software. In fact, this type of software is an essential tool for the active internet user. It makes it easy to retrieve, manage and secure all of your passwords. Most passwords are encrypted, either by the program or the filesystem. Consequently, the user only has to remember a single password. Password managers encourage users to choose unique, non-intuitive strong passwords for each service. - -To provide an insight into the quality of software available for Linux, I introduce 4 excellent open source alternatives to LastPass. - -### KeePassX ### - -![KeePassX in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-KeePassX.png) - -KeePassX is a multi-platform port of KeePass, an open source and cross-platform password manager. This utility helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key-disk. This lets users only need to remember one single master password or insert the key-disk to unlock the whole database. - -The databases are encrypted using the algorithms AES (alias Rijndael) or Twofish using a 256 bit key. - -Features include: - -- Extensive management- title for each entry for better identification: - - Determine different expiration dates - - Insertion of attachments - - User-defined symbols for groups and entries - - Fast entry duplication - - Sorting entries in groups -- Search function: in specific groups or in the complete database -- Auto-Type, a feature that allows you to e.g. log in to a web page by pressing a single key combination. KeePassX does the rest of the typing for you. Auto-Type reads the title of currently active window on your screen and matches it to the configured database entries -- Database security with access to the KeePassX database being granted either with a password, a key-file (e.g. a CD or a memory-stick) or both -- Automatic generation of secure passwords -- Precaution features, quality indicator for chosen passwords hiding all passwords behind asterisks -- Encryption- either the Advanced Encryption Standard (AES) or the Twofish algorithm are used, with encryption of the database in 256 bit sized increments -- Import and export of entries. Import from PwManager (*.pwm) and KWallet (*.xml) files, Export as textfile (*.txt) - -- Website: [www.keepassx.org][1] -- Developer: KeePassX Team -- License: GNU GPL v2 -- Version Number: 0.4.3 - -### Encryptr ### - -![Encryptr in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Encryptr.png) - -Encryptr is an open source zero-knowledge cloud-based password manager / e-wallet powered by Crypton. Crypton is a JavaScript library that allows developers to write web applications where the server knows nothing of the contents a user is storing. - -Encryptr stores your sensitive data like passwords, credit card data, PINs, or access codes, in the cloud. However, because it was built on the zero-knowledge Crypton framework, Encryptr ensures that only the user has the ability to access or read the confidential information. - -Being cross-platform, it allows users to securely access their confidential data from a single account from the cloud, no matter where they are. - -Features include: - -- Very secure Zero-Knowledge Crypton Framework only ever encrypts or decrypts your data locally on your device -- Simple to use -- Cloud based -- Stores three types of data it stores passwords, credit card numbers and general key/value pairs -- Optional "Notes" field to all entries -- Filtering / searching the entry list -- Local encrypted caching of entries to speed up load time - -- Website: [encryptr.org][2] -- Developer: Tommy Williams -- License: GNU GPL v3 -- Version Number: 1.2.0 - -### RatticDB ### - -![RatticDB in action](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-RatticDB.png) - -RatticDB is an open source Django based password management service. - -RatticDB is built to be 'Password Lifecycle Management' and not simply a 'Password Storage Engine'. RatticDB aims to help you keep track of what passwords need to be changed and when. It does not include application level encryption. - -Features include: - -- Simple ACL scheme -- Change Queue feature that allows users to see when they need to update passwords for the applications they use -- Ansible configurations -- -- Website: [rattic.org][3] -- Developer: Daniel Hall -- License: GNU GPL v2 -- Version Number: 1.3.1 - -### Seahorse ### - -![Seahorse in action](http://www.linuxlinks.com/portal/content/reviews/Security/Screenshot-Seahorse.png) - -Seahorse is a Gnome front end for GnuPG - the Gnu Privacy Guard program. Its goal is to provide an easy to use Key Management Tool, along with an easy to use interface for encryption operations. - -It is a tool for secure communications and data storage. Data encryption and digital signature creation can easily be performed through a GUI and Key Management operations can easily be carried out through an intuitive interface. - -Additionally, Seahorse includes a Gedit plugin, can handle files using Nautilus, an applet for managing stuff put in the clipboard and an agent for storing private passphrases, as well as a GnuPG and OpenSSH key manager. - -Features include: - -- Encrypt/decrypt/sign files and text -- Manage your keys and keyring -- Synchronize your keys and your keyring with key servers -- Sign keys and publish -- Cache your passphrase so you don't have to keep typing it -- Backup your keys and keyring -- Add an image in any GDK supported format as a OpenGPG photo ID -- Create SSH keys, configure them, cache them -- Internationalization support - -- Website: [www.gnome.org/projects/seahorse][4] -- Developer: Jacob Perkins, Jose Carlos, Garcia Sogo, Jean Schurger, Stef Walter, Adam Schreiber -- License: GNU GPL v2 -- Version Number: 3.18.0 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20151108125950773/LastPassAlternatives.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://www.keepassx.org/ -[2]:https://encryptr.org/ -[3]:http://rattic.org/ -[4]:http://www.gnome.org/projects/seahorse/ diff --git a/translated/share/20151109 Open Source Alternatives to LastPass.md b/translated/share/20151109 Open Source Alternatives to LastPass.md new file mode 100644 index 0000000000..0b29dd3f5c --- /dev/null +++ b/translated/share/20151109 Open Source Alternatives to LastPass.md @@ -0,0 +1,123 @@ +LastPass的开源替代品 +================================================================================ +LastPass是一个跨平台的密码管理程序。在Linux平台中,它可作为Firefox, Chrome和Opera浏览器的插件使用。LastPass Sesame支持Ubuntu/Debian与Fedora系统。此外,LastPass还有安装在Firefox Portable的便携版,可将其安装在USB设备上。再加上适用于Ubuntu/Debian, Fedora和openSUSE的LastPass Pocket, 其具有良好的跨平台覆盖性。虽然LastPass备受好评,但它是一个专有软件。此外,LastPass最近被LogMeIn收购。如果你在找一个开源的替代品,这篇文章可能会对你有所帮助。 + +我们正面临着信息大爆炸。无论你是要在线经营生意,找工作,还是只为了休闲来进行阅读,互联网都是一个广大的信息源。在这种情况下,长期保留信息是很困难的。然而,及时地获取某些特定信息非常重要。密码就是这样的一个例子。 + +作为一个电脑用户,你可能会面临在不同服务或网站使用相同或不同密码的困境。这个事情非常复杂,因为有些网站会限制你对密码的选择。比如,一个网站可能会限制密码的最小位数,大写字母,数字或者特殊字符,这使得在所有网站使用统一密码变得不可能。更重要的是,不在不同网站中使用同一密码有安全方面的原因。这样就不可避免地意味着人们经常会有很多密码要记。一个解决方案是将所有的密码写下来。然而,这种做法也极度的不安全。 + +为了解决需要记忆无穷多串密码的问题,目前比较流行的解决方案是使用密码管理软件。事实上,这类软件对于活跃的互联网用户来说极为实用。它使得你获取、管理和安全保存所有密码变得极为容易,而大多数密码都是被软件或文件系统加密过的。因此,用户只需要记住一个简单的密码就可以获取到其它所有密码。密码管理软件鼓励用户对于不同服务去采用独一无二的,非直观的强密码。 + +为了让大家更深入地了解Linux软件的质量,我将介绍4款优秀的、可替代LastPass的开源软件。 + +### KeePassX ### + +![KeePassX软件截图](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-KeePassX.png) + +KeePassX提供KeePass的多平台接口,是一款开源、跨平台的密码管理软件。这款软件可以帮助你以安全的方式保管密码。你可以将所有密码保存在一个数据库中,而这个数据库被一个主密码或密码盘来保管。 + +密码数据库使用AES(即Rijndael)或者TwoFish算法进行加密,密钥长度为256位。 + +该软件功能包括: + +- 多重管理模式 - 使每条密码更容易被识别 + - 可设置密码过期时间 + - 可插入附件 + - 可为不同分组或密码自定义标志 + - 在分组中对密码排序 +- 搜索函数:可在特定分组或整个数据库中搜索 +- Auto-Type: 这个功能允许你在登录网站时只需要按下几个键。KeePassX可以帮助你输入剩下的密码。Auto-Type通过读取当前窗口的标题,对密码数据库进行搜索来获取相应的密码 +- 数据库安全性强,用户可通过密码或一个密钥文件(可存储在CD或U盘中)访问数据库 +- 自动生成安全的密码 +- 具有预防措施,获取选中的密码并检查其安全性 +- 加密 - 用256位密钥,通过AES(高级加密标准)或TwoFish算法加密数据库 +- 密码可以导入或导出。可从PwManager文件(*.pwm)或KWallet文件(*.xml)中导入密码,可导出为文本(*.txt)格式。 + +- 软件官网:[www.keepassx.org][1] +- 开发者:KeepassX Team +- 软件许可证:GNU GPL V2 +- 版本号:0.4.3 + +### Encryptr ### + +![Encryptr软件截图](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Encryptr.png) + +Encryptr是一个开源的、零知晓的、基于云端的密码管理/电子钱包软件,以Crypton为基础开发。Crypton是一个Javascript库,允许开发者利用其开发应用,上传文件至服务器,而服务器无法知道用户所存储的文件内容。 + +Encryptr可将你的敏感信息,比如密码、信用卡数据、PIN码、或认证码存储在云端。然而,由于它基于零知晓的Cypton框架开发,Encryptr可保证只有用户才拥有访问或读取秘密信息的权限。 + +由于其跨平台的特性,Encryptr允许用户随时随地、安全地通过一个账户从云端获取机密信息。 + +软件特性包括: + +- 使用极安全、零知晓的Crypton框架,软件只在本地加密/解密数据 +- 易于使用 +- 基于云端 +- 可存储三种类型的数据:密码、信用卡账号以及通用的键值对 +- 可对每条密码设置“备注”项 +- 对本地密码进行缓存加密,以节省上传时间 + +- 软件官网: [encryptr.org][2] +- 开发者: Tommy Williams +- 软件许可证: GNU GPL v3 +- 版本号: 1.2.0 + +### RatticDB ### + +![RatticDB软件截图](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-RatticDB.png) + +RatticDB是一个开源的、基于Django的密码管理服务。 + +RatticDB被设计为一个“密码生命周期管理工具”而不是单单一个“密码存储工具”。RatticDB致力于及时提醒用户哪些密码在何时需要更改。它不提供应用层面的密码加密。 + +软件特性包括: + +- 简洁的ACL设计 +- 可改变队列功能,可让用户知晓何时需要更改某应用的密码 +- Ansible配置 + +- 软件官网: [rattic.org][3] +- 开发者: Daniel Hall +- 软件许可证: GNU GPL v2 +- 版本号: 1.3.1 + +### Seahorse ### + +![Seahorse软件截图](http://www.linuxlinks.com/portal/content/reviews/Security/Screenshot-Seahorse.png) + +Seahorse是一个于Gnome前端运行的GnuPG - GNU隐私保护软件。它的目标是提供一个易于使用密钥管理工具,一并提供一个易于使用的界面来控制加密操作。 + +Seahorse是一个工具,用来提供安全沟通和数据存储服务。数据加密和数字密钥生成操作可以轻易通过GUI来演示,密钥管理操作也可以轻易通过直观的界面来进行。 + +此外,Seahorse包含一个Gedit插件,可以使用鹦鹉螺文件管理器管理文件,一个管理剪贴板中事物的小程序,一个存储私密密码的代理,还有一个GnuPG和OpenSSH的密钥管理工具。 + +软件特性包括: + +- 对文本进行加密/解密/签名 +- 管理密钥及密钥环 +- 将密钥及密钥环于密钥服务器同步 +- 密码签名及发布 +- 将密码缓存起来,无需多次重复键入 +- 对密钥及密钥环进行备份 +- 可添加一个GDK支持格式的图片作为OpenGPG图片ID +- 生成SSH密钥,对其进行验证及储存 +- 多语言支持 + +- 软件官网: [www.gnome.org/projects/seahorse][4] +- 开发者: Jacob Perkins, Jose Carlos, Garcia Sogo, Jean Schurger, Stef Walter, Adam Schreiber +- 软件许可证: GNU GPL v2 +- 版本号: 3.18.0 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20151108125950773/LastPassAlternatives.html + +译者:[StdioA](https://github.com/StdioA) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://www.keepassx.org/ +[2]:https://encryptr.org/ +[3]:http://rattic.org/ +[4]:http://www.gnome.org/projects/seahorse/ From c3fa58bb184ba0d4494d91849e730c8beff6b93a Mon Sep 17 00:00:00 2001 From: chenj zhang <1134386961@qq.com> Date: Tue, 10 Nov 2015 17:51:07 +0800 Subject: [PATCH 2432/2517] Update 20151109 How to Configure Tripwire IDS on Debian.md --- .../tech/20151109 How to Configure Tripwire IDS on Debian.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sources/tech/20151109 How to Configure Tripwire IDS on Debian.md b/sources/tech/20151109 How to Configure Tripwire IDS on Debian.md index e430c74e41..11e7dbad60 100644 --- a/sources/tech/20151109 How to Configure Tripwire IDS on Debian.md +++ b/sources/tech/20151109 How to Configure Tripwire IDS on Debian.md @@ -1,3 +1,4 @@ +正在翻译:zky001 How to Configure Tripwire IDS on Debian ================================================================================ This article is about Tripwire installation and configuration on Debian OS. It is a host based Intrusion detection system (IDS) for Linux environment. Prime function of tripwire IDS is to detect and report any unauthorized change (files and directories ) on linux system. After tripwire installation, baseline database created first, tripwire monitors and detects changes such as new file addition/creation, file modification and user who changed it etc. If the changes are legitimate, you can accept the changes to update tripwire database. @@ -371,9 +372,9 @@ In this article, we learned installation and basic configuration of open source via: http://linoxide.com/security/configure-tripwire-ids-debian/ 作者:[nido][a] -译者:[译者ID](https://github.com/译者ID) +译者:[译者zky001](https://github.com/zky001) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/naveeda/ \ No newline at end of file +[a]:http://linoxide.com/author/naveeda/ From 433a6c5e5f5865be8a0aa3e98494255e22223e7e Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Tue, 10 Nov 2015 20:49:09 +0800 Subject: [PATCH 2433/2517] [translated] 20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md --- ...tory Of Aix HP-UX Solaris BSD And LINUX.md | 102 ------------------ ...tory Of Aix HP-UX Solaris BSD And LINUX.md | 101 +++++++++++++++++ 2 files changed, 101 insertions(+), 102 deletions(-) delete mode 100644 sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md create mode 100644 translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md diff --git a/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md b/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md deleted file mode 100644 index be5c7b9b2e..0000000000 --- a/sources/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md +++ /dev/null @@ -1,102 +0,0 @@ -zpl1025 translating -The Brief History Of Aix, HP-UX, Solaris, BSD, And LINUX -================================================================================ -![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/05/linux-712x445.png) - -Always remember that when doors close on you, other doors open. [Ken Thompson][1] and [Dennis Richie][2] are a great example for such saying. They were two of the best information technology specialists in the **20th** century as they created the **UNIX** system which is considered one the most influential and inspirational software that ever written. - -### The UNIX systems beginning at Bell Labs ### - -**UNIX** which was originally called **UNICS** (**UN**iplexed **I**nformation and **C**omputing **S**ervice) has a great family and was never born by itself. The grandfather of UNIX was **CTSS** (**C**ompatible **T**ime **S**haring **S**ystem) and the father was the **Multics** (**MULT**iplexed **I**nformation and **C**omputing **S**ervice) project which supports interactive timesharing for mainframe computers by huge communities of users. - -UNIX was born at **Bell Labs** in **1969** by **Ken Thompson** and later **Dennis Richie**. These two great researchers and scientists worked on a collaborative project with **General Electric** and the **Massachusetts Institute of Technology** to create an interactive timesharing system called the Multics. - -Multics was created to combine timesharing with other technological advances, allowing the users to phone the computer from remote terminals, then edit documents, read e-mail, run calculations, and so on. - -Over the next five years, AT&T corporate invested millions of dollars in the Multics project. They purchased mainframe computer called GE-645 and they dedicated to the effort of the top researchers at Bell Labs such as Ken Thompson, Stuart Feldman, Dennis Ritchie, M. Douglas McIlroy, Joseph F. Ossanna, and Robert Morris. The project was too ambitious, but it fell troublingly behind the schedule. And at the end, AT&T leaders decided to leave the project. - -Bell Labs managers decided to stop any further work on operating systems which made many researchers frustrated and upset. But thanks to Thompson, Richie, and some researchers who ignored their bosses’ instructions and continued working with love on their labs, UNIX was created as one the greatest operating systems of all times. - -UNIX started its life on a PDP-7 minicomputer which was a testing machine for Thompson’s ideas about the operating systems design and a platform for Thompsons and Richie’s game simulation that was called Space and Travel. - -> “What we wanted to preserve was not just a good environment in which to do programming, but a system around which a fellowship could form. We knew from experience that the essence of communal computing, as supplied by remote-access, time-shared machines, is not just to type programs into a terminal instead of a keypunch, but to encourage close communication”. Dennis Richie Said. - -UNIX was so close to be the first system under which the programmer could directly sit down at a machine and start composing programs on the fly, explore possibilities and also test while composing. All through UNIX lifetime, it has had a growing more capabilities pattern by attracting skilled volunteer effort from different programmers impatient with the other operating systems limitations. - -UNIX has received its first funding for a PDP-11/20 in 1970, the UNIX operating system was then officially named and could run on the PDP-11/20. The first real job from UNIX was in 1971, it was to support word processing for the patent department at Bell Labs. - -### The C revolution on UNIX systems ### - -Dennis Richie invented a higher level programming language called “**C**” in **1972**, later he decided with Ken Thompson to rewrite the UNIX in “C” to give the system more portability options. They wrote and debugged almost 100,000 code lines that year. The migration to the “C” language resulted in highly portable software that require only a relatively small machine-dependent code to be then replaced when porting UNIX to another computing platform. - -The UNIX was first formally presented to the outside world in 1973 on Operating Systems Principles, where Dennis Ritchie and Ken Thompson delivered a paper, then AT&T released Version 5 of the UNIX system and licensed it to the educational institutions, and then in 1975 they licensed Version 6 of UNIX to companies for the first time with a cost **$20.000**. The most widely used version of UNIX was Version 7 in 1980 where anybody could purchase a license but it was very restrictive terms in this license. The license included the source code, the machine dependents kernel which was written in PDP-11 assembly language. At all, versions of UNIX systems were determined by its user manuals editions. - -### The AIX System ### - -In **1983**, **Microsoft** had a plan to make a **Xenix** MS-DOS’s multiuser successor, and they created Xenix-based Altos 586 with **512 KB** RAM and **10 MB** hard drive by this year with cost $8,000. By 1984, 100,000 UNIX installations around the world for the System V Release 2. In 1986, 4.3BSD was released that included internet name server and the **AIX system** was announced by **IBM** with Installation base over 250,000. AIX is based on Unix System V, this system has BSD roots and is a hybrid of both. - -AIX was the first operating system that introduced a **journaled file system (JFS)** and an integrated Logical Volume Manager (LVM). IBM ported AIX to its RS/6000 platform by 1989. The Version 5L was a breakthrough release that was introduced in 2001 to provide Linux affinity and logical partitioning with the Power4 servers. - -AIX introduced virtualization by 2004 in AIX 5.3 with Advanced Power Virtualization (APV) which offered Symmetric multi-threading, micro-partitioning, and shared processor pools. - -In 2007, IBM started to enhance its virtualization product, by coinciding with the AIX 6.1 release and the architecture of Power6. They also rebranded Advanced Power Virtualization to PowerVM. - -The enhancements included form of workload partitioning that was called WPARs, that are similar to Solaris zones/Containers, but with much better functionality. - -### The HP-UX System ### - -The **Hewlett-Packard’s UNIX (HP-UX)** was based originally on System V release 3. The system initially ran exclusively on the PA-RISC HP 9000 platform. The Version 1 of HP-UX was released in 1984. - -The Version 9, introduced SAM, its character-based graphical user interface (GUI), from which one can administrate the system. The Version 10, was introduced in 1995, and brought some changes in the layout of the system file and directory structure, which made it similar to AT&T SVR4. - -The Version 11 was introduced in 1997. It was HP’s first release to support 64-bit addressing. But in 2000, this release was rebranded to 11i, as HP introduced operating environments and bundled groups of layered applications for specific Information Technology purposes. - -In 2001, The Version 11.20 was introduced with support for Itanium systems. The HP-UX was the first UNIX that used ACLs (Access Control Lists) for file permissions and it was also one of the first that introduced built-in support for Logical Volume Manager. - -Nowadays, HP-UX uses Veritas as primary file system due to partnership between Veritas and HP. - -The HP-UX is up to release 11iv3, update 4. - -### The Solaris System ### - -The Sun’s UNIX version, **Solaris**, was the successor of **SunOS**, which was founded in 1992. SunOS was originally based on the BSD (Berkeley Software Distribution) flavor of UNIX but SunOS versions 5.0 and later were based on Unix System V Release 4 which was rebranded as Solaris. - -SunOS version 1.0 was introduced with support for Sun-1 and Sun-2 systems in 1983. Version 2.0 was introduced later in 1985. In 1987, Sun and AT&T announced that they would collaborate on a project to merge System V and BSD into only one release, based on SVR4. - -The Solaris 2.4 was first Sparc/x86 release by Sun. The last release of the SunOS was version 4.1.4 announced in November 1994. The Solaris 7 was the first 64-bit Ultra Sparc release and it added native support for file system metadata logging. - -Solaris 9 was introduced in 2002, with support for Linux capabilities and Solaris Volume Manager. Then, Solaris 10 was introduced in 2005, and has number of innovations, such as support for its Solaris Containers, new ZFS file system, and Logical Domains. - -The Solaris system is presently up to version 10 as the latest update was released in 2008. - -### Linux ### - -By 1991 there were growing requirements for a free commercial alternative. Therefore **Linus Torvalds** set out to create new free operating system kernel that eventually became **Linux**. Linux started with a small number of “C” files and under a license which prohibited commercial distribution. Linux is a UNIX-like system and is different than UNIX. - -Version 3.18 was introduced in 2015 under a GNU Public License. IBM said that more than 18 million lines of code are Open Source and available to developers. - -The GNU Public License becomes the most widely available free software license which you can find nowadays. In accordance with the Open Source principles, this license permits individuals and organizations the freedom to distribute, run, share by copying, study, and also modify the code of the software. - -### UNIX vs. Linux: Technical Overview ### - -- Linux can encourage more diversity, and Linux developers come from wider range of backgrounds with different experiences and opinions. -- Linux can run on wider range of platforms and also types of architecture than UNIX. -- Developers of UNIX commercial editions have a specific target platform and audience in mind for their operating system. -- **Linux is more secure than UNIX** as it is less affected by virus threats or malware attacks. Linux has had about 60-100 viruses to date, but at the same time none of them are currently spreading. On the other hand, UNIX has had 85-120 viruses but some of them are still spreading. -- With commands of UNIX, tools and elements are rarely changed, and even some interfaces and command lines arguments still remain in later versions of UNIX. -- Some Linux development projects get funded on a voluntary basis such as Debian. The other projects maintain a community version of commercial Linux distributions such as SUSE with openSUSE and Red Hat with Fedora. -- Traditional UNIX is about scale up, but on the other hand Linux is about scale out. - --------------------------------------------------------------------------------- - -via: http://www.unixmen.com/brief-history-aix-hp-ux-solaris-bsd-linux/ - -作者:[M.el Khamlichi][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/pirat9/ -[1]:http://www.unixmen.com/ken-thompson-unix-systems-father/ -[2]:http://www.unixmen.com/dennis-m-ritchie-father-c-programming-language/ diff --git a/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md b/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md new file mode 100644 index 0000000000..1ee2151703 --- /dev/null +++ b/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md @@ -0,0 +1,101 @@ +Aix, HP-UX, Solaris, BSD, 和 LINUX 简史 +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/05/linux-712x445.png) + +有句话说,当一扇门在你面前关上的时候,另一扇门就会打开。[Ken Thompson][1] 和 [Dennis Richie][2] 两个人就是最好的例子。他们俩是 **20世纪** 最优秀的信息技术专家,因为他们创造了 **UNIX**,最具影响力和创新性的软件之一。 + +### UNIX 系统诞生于贝尔实验室 ### + +**UNIX** 最开始的名字是 **UNICS** (**UN**iplexed **I**nformation and **C**omputing **S**ervice),它有一个大家庭,并不是从石头里蹦出来的。UNIX的祖父是 **CTSS** (**C**ompatible **T**ime **S**haring **S**ystem),它的父亲是 **Multics** (**MULT**iplexed **I**nformation and **C**omputing **S**ervice),这个系统能支持大量用户通过交互式分时使用大型机。 + +UNIX 诞生于 **1969** 年,由 **Ken Thompson** 以及后来加入的 **Dennis Richie** 共同完成。这两位优秀的研究员和科学家一起在一个**通用电子**和**麻省理工学院**的合作项目里工作,项目目标是开发一个叫 Multics 的交互式分时系统。 + +Multics 的目标是整合分时共享以及当时其他先进技术,允许用户在远程终端通过电话登录到主机,然后可以编辑文档,阅读电子邮件,运行计算器,等等。 + +在之后的五年里,AT&T 公司为 Multics 项目投入了数百万美元。他们购买了 GE-645 大型机,聚集了贝尔实验室的顶级研究人员,例如 Ken Thompson, Stuart Feldman, Dennis Ritchie, M. Douglas McIlroy, Joseph F. Ossanna, 以及 Robert Morris。但是项目目标太过激进,进度严重滞后。最后,AT&T 高层决定放弃这个项目。 + +贝尔实验室的管理层决定停止这个让许多研究人员无比纠结的操作系统上的所有遗留工作。不过要感谢 Thompson,Richie 和一些其他研究员,他们把老板的命令丢到一边,并继续在实验室里满怀热心地忘我工作,最终孵化出前无古人后无来者的 UNIX。 + +UNIX 的第一声啼哭是在一台 PDP-7 微型机上,它是 Thompson 测试自己在操作系统设计上的点子的机器,也是 Thompson 和 Richie 一起玩 Space and Travel 游戏的模拟器。 + +> “我们想要的不仅是一个优秀的编程环境,而是能围绕这个系统形成团体。按我们自己的经验,通过远程访问和分时共享主机实现的公共计算,本质上不只是用终端输入程序代替打孔机而已,而是鼓励密切沟通。”Dennis Richie 说。 + +UNIX 是第一个靠近理想的系统,在这里程序员可以坐在机器前自由摆弄程序,探索各种可能性并随手测试。在 UNIX 整个生命周期里,因为大量因为其他操作系统限制而投身过来的高手做出的无私贡献,它的功能模型一直保持上升趋势。 + +UNIX 在 1970 年因为 PDP-11/20 获得了首次资金注入,之后正式更名为 UNIX 并支持在 PDP-11/20 上运行。UNIX 带来的第一次收获是在 1971 年,贝尔实验室的专利部门配备来做文字处理。 + +### UNIX 上的 C 语言革命 ### + +Dennis Richie 在 1972 年发明了一种叫 “**C**” 的高级编程语言,之后他和 Ken Thompson 决定用 “C” 重写 UNIX 系统,来支持更好的移植性。他们在那一年里编写和调试了差不多 100,000 行代码。在使用了 “C” 语言后,系统可移植性非常好,只需要修改一小部分机器相关的代码就可以将 UNIX 移植到其他计算机平台上。 + +UNIX 第一次公开露面是在 1973 年 Dennis Ritchie 和 Ken Thompson 在操作系统原理上发表的一篇论文,然后 AT&T 发布了 UNIX 系统第 5 版,并授权给教育机构使用,然后在 1976 年第一次以 **$20.000** 的价格授权企业使用 UNIX 第 6 版。应用最广泛的是 1980 年发布的 UNIX 第 7 版,任何人都可以购买,只是授权条款非常有限。授权内容包括源代码,以及用 PDP-11 汇编语言写的及其相关内核。各种版本 UNIX 系统完全由它的用户手册确定。 + +### AIX 系统 ### + +在 **1983** 年,**Microsoft** 计划开发 **Xenix** 作为 MS-DOS 的多用户版继任者,他们在那一年花了 $8,000 搭建了一台拥有 **512 KB** 内存以及 **10 MB**硬盘并运行 Xenix 的 Altos 586。而到 1984 年为止,全世界已经安装了超过 100,000 份 UNIX System V 第二版。在 1986 年发布了包含因特网域名服务的 4.3BSD,而且 **IBM** 宣布 **AIX 系统**的安装数已经超过 250,000。AIX 基于 Unix System V 开发,这套系统拥有 BSD 风格的根文件系统,是两者的结合。 + +AIX 第一次引入了 **日志文件系统 (JFS)** 以及集成逻辑卷管理器 (LVM)。IBM 在 1989 年将 AIX 移植到自己的 RS/6000 平台。2001 年发布的 5L 版是一个突破性的版本,提供了 Linux 友好性以及支持 Power4 服务器的逻辑分区。 + +在 2004 年发布的 AIX 5.3 引入了支持 Advanced Power Virtualization (APV) 的虚拟化技术,支持对称多线程,微分区,以及可分享的处理器池。 + +在 2007 年,IBM 同时发布 AIX 6.1 和 Power6 架构,开始加强自己的虚拟化产品。他们还将 Advanced Power Virtualization 重新包装成 PowerVM。 + +这次改进包括被称为 WPARs 的负载分区形式,类似于 Solaris 的 zones/Containers,但是功能更强。 + +### HP-UX 系统 ### + +**惠普 UNIX (HP-UX)** 源于 System V 第 3 版。这套系统一开始只支持 PA-RISC HP 9000 平台。HP-UX 第 1 版发布于 1984 年。 + +HP-UX 第 9 版引入了 SAM,一个基于角色的图形用户界面 (GUI),用户可以用来管理整个系统。在 1995 年发布的第 10 版,调整了系统文件分布以及目录结构,变得有点类似 AT&T SVR4。 + +第 11 版发布于 1997 年。这是 HP 第一个支持 64 位寻址的版本。不过在 2000 年重新发布成 11i,因为 HP 为特定的信息技术目的,引入了操作环境和分级应用的捆绑组。 + +在 2001 年发布的 11.20 版宣称支持 Itanium 系统。HP-UX 是第一个使用 ACLs(访问控制列表)管理文件权限的 UNIX 系统,也是首先支持内建逻辑卷管理器的系统之一。 + +如今,HP-UX 因为 HP 和 Veritas 的合作关系使用了 Veritas 作为主文件系统。 + +HP-UX 目前最新的版是 11iv3, update 4。 + +### Solaris 系统 ### + +Sun 的 UNIX 版本是 **Solaris**,用来接替 1992 年创建的 **SunOS**。SunOS 一开始基于 BSD(伯克利软件发行版)风格的 UNIX,但是 SunOS 5.0 版以及之后的版本都是基于重新包装成 Solaris 的 Unix System V 第 4 版。 + +SunOS 1.0 版于 1983 年发布,用于支持 Sun-1 和 Sun-2 平台。随后在 1985 年发布了 2.0 版。在 1987 年,Sun 和 AT&T 宣布合作一个项目以 SVR4 为基础将 System V 和 BSD 合并成一个版本。 + +Solaris 2.4 是 Sun 发布的第一个 Sparc/x86 版本。1994 年 11 月份发布的 SunOS 4.1.4 版是最后一个版本。Solaris 7 是首个 64 位 Ultra Sparc 版本,加入了对文件系统元数据记录的原生支持。 + +Solaris 9 发布于 2002 年,支持 Linux 特性以及 Solaris 卷管理器。之后,2005 年发布了 Solaris 10,带来许多创新,比如支持 Solaris Containers,新的 ZFS 文件系统,以及逻辑域。 + +目前 Solaris 最新的版本是 第 10 版,最后的更新发布于 2008 年。 + +### Linux ### + +到了 1991 年,用来替代商业操作系统的免费系统的需求日渐高涨。因此 **Linus Torvalds** 开始构建一个免费操作系统,最终成为 **Linux**。Linux 最开始只有一些 “C” 文件,并且使用了阻止商业发行的授权。Linux 是一个类 UNIX 系统但又不尽相同。 + +2015 年 发布了基于 GNU Public License 授权的 3.18 版。IBM 声称有超过 1800 万行开源代码开放给开发者。 + +如今 GNU Public License 是应用最广泛的免费软件授权方式。根据开源软件原则,这份授权允许个人和企业自由分发,运行,通过拷贝共享,学习,以及修改软件源码。 + +### UNIX vs. Linux: 技术概要 ### + +- Linux 鼓励多样性,Linux 的开发人员有更宽广的背景,有更多不同经验和意见。 +- Linux 比 UNIX 支持更多的平台和架构。 +- UNIX 商业版本的开发人员会为他们的操作系统考虑特定目标平台以及用户。 +- **Linux 比 UNIX 有更好的安全性**,更少受病毒或恶意软件攻击。Linux 上大约有 60-100 种病毒,但是没有任何一种还在传播。另一方面,UNIX 上大约有 85-120 种病毒,但是其中有一些还在传播中。 +- 通过 UNIX 命令,系统上的工具和元素很少改变,甚至很多接口和命令行参数在后续 UNIX 版本中一直沿用。 +- 有些 Linux 开发项目以自愿为基础进行资助,比如 Debian。其他项目会维护一个和商业 Linux 的社区版,比如 SUSE 的 openSUSE 以及红帽的 Fedora。 +- 传统 UNIX 是扩大规模,而另一方面 Linux 是扩大范围。 + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/brief-history-aix-hp-ux-solaris-bsd-linux/ + +作者:[M.el Khamlichi][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/pirat9/ +[1]:http://www.unixmen.com/ken-thompson-unix-systems-father/ +[2]:http://www.unixmen.com/dennis-m-ritchie-father-c-programming-language/ From 06a230c4314245c1af79bef584103358c7145c35 Mon Sep 17 00:00:00 2001 From: Wenxuan Zhao Date: Tue, 10 Nov 2015 14:51:36 -0400 Subject: [PATCH 2434/2517] Let's Encrypt news, wait for approval --- translated/news/LetsEncrypt.md | 112 +++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 translated/news/LetsEncrypt.md diff --git a/translated/news/LetsEncrypt.md b/translated/news/LetsEncrypt.md new file mode 100644 index 0000000000..c1c4a40ea0 --- /dev/null +++ b/translated/news/LetsEncrypt.md @@ -0,0 +1,112 @@ +# SSL/TLS 加密新纪元 - Let's Encrypt + +根据 Let's Encrypt 官方博客消息,Let's Encrypt 服务将在下周(11 月 16 日)正式对外开放。 + +Let's Encrypt 项目是由互联网安全研究小组(ISRG,Internet Security Research Group)主导并开发的一个新型数字证书认证机构(CA,Certificate Authority)。该项目旨在开发一个自由且开放的自动化 CA 套件,并向公众提供相关的证书免费签发服务以降低安全通讯的财务、技术和教育成本。在过去的一年中,互联网安全研究小组拟定了 [ACME 协议草案][1],并首次实现了使用该协议的应用套件:服务端 [Boulder][2] 和客户端 [letsencrypt][3]。 + +至于为什么 Let's Encrypt 让我们如此激动,以及 HTTPS 协议如何保护我们的通讯请参考[浅谈 HTTPS 和 SSL/TLS 协议的背景与基础][4]。 + +## ACME 协议 + +Let's Encrypt 的诞生离不开 ACME(Automated Certificate Management Environment,自动证书管理环境)协议的拟定。 + +说到 ACME 协议,我们不得不提一下传统 CA 的认证方式。Let's Encrypt 服务所签发的证书为域名认证证书(DV,Domain-validated Certificate),签发这类证书需要域名所有者完成以下至少一种挑战(Challenge)以证明自己对域名的所有权: + +* 验证申请人对域名的 Whois 信息中邮箱的控制权; +* 验证申请人对域名的常见管理员邮箱(如以 `admin@`、`postmaster@` 开头的邮箱等)的控制权; +* 在 DNS 的 TXT 记录中发布一条 CA 提供的字符串; +* 在包含域名的网址中特定路径发布一条 CA 提供的字符串。 + +不难发现,其中最容易实现自动化的一种操作必然为最后一条,ACME 协议中的 [Simple HTTP][5] 认证即是用一种类似的方法对从未签发过任何证书的域名进行认证。该协议要求在访问 `http://域名/.well-known/acme-challenge/指定字符串` 时返回特定的字符串。 + +然而实现该协议的客户端 [letsencrypt][3] 做了更多——它不仅可以通过 ACME 协议配合服务端 [Boulder][2] 的域名进行独立(standalone)的认证工作,同时还可以自动配置常见的服务器软件(目前支持 Nginx 和 Apache)以完成认证。 + +## Let's Encrypt 免费证书签发服务 + +对于大多数网站管理员来讲,想要对自己的 Web 服务器进行加密需要一笔不小的支出进行证书签发并且难以配置。根据早些年 SSL Labs 公布的 [2010 年互联网 SSL 调查报告(PDF)][6] 指出超过半数的 Web 服务器没能正确使用 Web 服务器证书,主要的问题有证书不被浏览器信任、证书和域名不匹配、证书过期、证书信任链没有正确配置、使用已知有缺陷的协议和算法等。而且证书过期后的续签和泄漏后的吊销仍需进行繁琐的人工操作。 + +幸运的是 Let's Encrypt 免费证书签发服务在经历了漫长的开发和测试之后终于来临,在 Let's Encrypt 官方 CA 被广泛信任之前,IdenTrust 的根证书对 Let's Encrypt 的二级 CA 进行了交叉签名使得大部分浏览器已经信任 Let's Encrypt 签发的证书。 + +## 使用 letsencrypt + +由于当前 Let's Encrypt 官方的证书签发服务还未公开,你只能尝试开发版本。这个版本会签发一个 CA 标识为 `happy hacker fake CA` 的测试证书,注意这个证书不受信任。 + +要获取开发版本请直接 `$ git clone https://github.com/letsencrypt/letsencrypt`。 + +以下的[使用方法][7]摘自 Let's Encrypt 官方网站。 + +### 签发证书 + +`letsencrypt` 工具可以协助你处理证书请求和验证工作。 + +#### 自动配置 Web 服务器 + +下面的操作将会自动帮你将新证书配置到 Nginx 和 Apache 中。 + +``` +$ letsencrypt run +``` + +#### 独立签发证书 + +下面的操作将会将新证书置于当前目录下。 + +``` +$ letsencrypt -d example.com auth +``` + +### 续签证书 + +默认情况下 `letsencrypt` 工具将协助你跟踪当前证书的有效期限并在需要时自动帮你续签。如果需要手动续签,执行下面的操作。 + +``` +$ letsencrypt renew --cert-path example-cert.pem +``` + +### 吊销证书 + +列出当前托管的证书菜单以吊销。 + +``` +$ letsencrypt revoke +``` + +你也可以吊销某一个证书或者属于某个私钥的所有证书。 + +``` +$ letsencrypt revoke --cert-path example-cert.pem +``` + +``` +$ letsencrypt revoke --key-path example-key.pem +``` + +## Docker 化 letsencrypt + +如果你不想让 letsencrypt 自动配置你的 Web 服务器的话,使用 Docker 跑一份独立的版本将是一个不错的选择。你所要做的只是在装有 Docker 的系统中执行: + +``` +$ sudo docker run -it --rm -p 443:443 -p 80:80 --name letsencrypt \ + -v "/etc/letsencrypt:/etc/letsencrypt" \ + -v "/var/lib/letsencrypt:/var/lib/letsencrypt" \ + quay.io/letsencrypt/letsencrypt:latest auth +``` + +你就可以快速的为自己的 Web 服务器签发一个免费而且受信任的 DV 证书啦! + +## Let's Encrypt 的注意事项 + +* Let's Encrypt 当前发行的 DV 证书仅能验证域名的所有权,并不能验证其所有者身份; +* Let's Encrypt 不像其他 CA 那样对安全事故有保险赔付; +* Let's Encrypt 目前不提共 Wildcard 证书; +* Let's Encrypt 的有效时间仅为 90 天,逾期需要续签(可自动续签)。 + +对于 Let's Encrypt 的介绍就到这里,让我们一起目睹这场互联网的安全革命吧。 + +[1]: https://github.com/letsencrypt/acme-spec +[2]: https://github.com/letsencrypt/boulder +[3]: https://github.com/letsencrypt/letsencrypt +[4]: https://linux.cn/article-5175-1.html +[5]: https://letsencrypt.github.io/acme-spec/#simple-http +[6]: https://community.qualys.com/servlet/JiveServlet/download/38-1636/Qualys_SSL_Labs-State_of_SSL_2010-v1.6.pdf +[7]: https://letsencrypt.org/howitworks/ From e59796bef0724a643f8f34886aeb9903e1191e6f Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Wed, 11 Nov 2015 11:20:56 +0800 Subject: [PATCH 2435/2517] [translating] 20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md --- ...1109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md b/sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md index bbd7f7580f..864068eb91 100644 --- a/sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md +++ b/sources/tech/20151109 Install Android On BQ Aquaris Ubuntu Phone In Linux.md @@ -1,3 +1,4 @@ +zpl1025 Install Android On BQ Aquaris Ubuntu Phone In Linux ================================================================================ ![How to install Android on Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-on-Ubuntu-Phone.jpg) @@ -122,4 +123,4 @@ via: http://itsfoss.com/install-android-ubuntu-phone/ [1]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5_L/2.0.1_20150623-1900_bq-FW.zip [2]:http://www.bq.com/gb/support/aquaris-e4-5 [3]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5/Ubuntu/Web%20version/Web%20version/SP_Flash_Tool_exe_linux_v5.1424.00.zip -[4]:http://www.bq.com/gb/support/aquaris-e4-5-ubuntu-edition \ No newline at end of file +[4]:http://www.bq.com/gb/support/aquaris-e4-5-ubuntu-edition From e5ef1c15d1c30037743c58a9e6d1fb476f7ead98 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 11 Nov 2015 16:32:54 +0800 Subject: [PATCH 2436/2517] Delete 20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md --- ...ware Centre To Be Replaced in 16.04 LTS.md | 57 ------------------- 1 file changed, 57 deletions(-) delete mode 100644 sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md diff --git a/sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md b/sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md deleted file mode 100644 index 1c7b1614d0..0000000000 --- a/sources/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md +++ /dev/null @@ -1,57 +0,0 @@ -translation by strugglingyouth -Ubuntu Software Centre To Be Replaced in 16.04 LTS -================================================================================ -![The USC Will Be Replaced](http://www.omgubuntu.co.uk/wp-content/uploads/2011/09/usc1.jpg) - -The USC Will Be Replaced - -**The Ubuntu Software Centre is to be replaced in Ubuntu 16.04 LTS.** - -Users of the Xenial Xerus desktop will find that the familiar (and somewhat cumbersome) Ubuntu Software Centre is no longer available. - -GNOME’s [Software application][1] will – according to current plans – take its place as the default and package management utility on the Unity 7-based desktop. - -![GNOME Software](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/gnome-software.jpg) - -GNOME Software - -New plugins will be created to support the Software Centre’s ratings, reviews and paid app features as a result of the switch. - -The decisions were taken at a recent desktop Sprint held at Canonical HQ in London. - -“We are more confident in our ability to add support for Snaps to GNOME Software Centre (sic) than we are to Ubuntu Software Centre. And so, right now, it looks like we will be replacing [the USC] with GNOME Software Centre”, explains Ubuntu desktop manager Will Cooke at the Ubuntu Online Summit. - -GNOME 3.18 stack will also be included in Ubuntu 16.04, with select app updates to GNOME 3.20 apps taken ‘as and when it makes sense’, adds Will Cooke. - -We recently ran a poll on Twitter asking how you install software on Ubuntu. The results suggest that few of you will mourn the passing of the incumbent Software Centre… - -注:投票项目 -Which of these do you use to install software on #Ubuntu? - -- Software Centre -- Terminal - -### Other Apps Being Dropped in Ubuntu 16.04 ### - -The Ubuntu Software Centre is not the only app set to be given the heave-ho in Xenial Xerus. - -Disc burning utility Brasero and instant messaging app **Empathy** are also to be removed from the default install image. - -Neither app is considered to be under active development, and with the march of laptops lacking optical drives and web and mobile-based chat services, they may also be seen as increasingly obsolete. - -If you do have use for them don’t panic: both Brasero and Empathy will **still be available to install on Ubuntu from the archives**. - -It’s not all removals and replacements as one new desktop app is set be included by default: GNOME Calendar. - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/11/the-ubuntu-software-centre-is-being-replace-in-16-04-lts - -作者:[Sam Tran][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/111008502832304483939?rel=author -[1]:https://wiki.gnome.org/Apps/Software From 5578d631e8de687bd33c67365e04baa8beb95c66 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Wed, 11 Nov 2015 16:34:33 +0800 Subject: [PATCH 2437/2517] Create 20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md --- ...ware Centre To Be Replaced in 16.04 LTS.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 translated/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md diff --git a/translated/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md b/translated/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md new file mode 100644 index 0000000000..f0bcfff3aa --- /dev/null +++ b/translated/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md @@ -0,0 +1,58 @@ + +Ubuntu 软件中心将在 16.04 LTS 中被替换 +================================================================================ +![The USC Will Be Replaced](http://www.omgubuntu.co.uk/wp-content/uploads/2011/09/usc1.jpg) + +USC 将被替换 + +**Ubuntu 软件中心将在 Ubuntu 16.04 LTS 中被替换。** + +Xenial Xerus 桌面用户会发现,这个熟悉的(并有些繁琐的)Ubuntu 软件中心将不再可用。 + +GNOME 的 [软件应用][1] - 按照目前的计划 - 在基于 Unity 7 的桌面中,它将作为默认的包管理工具。 + +![GNOME Software](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/gnome-software.jpg) + +GNOME 软件 + +这次变化的结果是,新开发的插件,将支持软件中心的评级,评论和应用程序付费的功能。 + +该决定是最近在伦敦标准总部举行的一次桌面峰会中被采用的。 + +“我们更相信我们添加 Snaps 到 GNOME 软件中心(sic)比到 Ubuntu 软件中心支持的能力。所以,现在看起来我们将使用 GNOME 软件中心来取代 [the USC]”,Cooke 在 Ubuntu 在线峰会解释了 Ubuntu 桌面管理器。 + +GNOME 3.18 架构与也将出现在 Ubuntu 16.04 中,将其中一些应用程序更新到 GNOME 3.20 采用的架构下 ‘这么做也是有道理的’,库克补充说。 + +我们最近在 Twitter 上做了一项民意调查,询问如何在 Ubuntu 上安装软件。结果表明,只有少数人对现在的软件中心表示不满... + +注:投票项目 + +你使用什么方式在 Ubuntu 上安装软件? + +- 软件中心 +- 终端 + +### 在 Ubuntu 16.04 其他应用程序也将会减少 ### + +Ubuntu 软件中心并不是唯一一个在 Xenial Xerus 中被丢弃的。 + +光盘刻录工具 Brasero 和即时通讯工具 **Empathy** 也将从默认镜像中删除。 + +虽然应用程序在不断的发展,但赶不上光驱以及网络和移动聊天服务,它们也会被看作是越来越过时的。 + +如果你还在使用它们请不要惊慌:Brasero 和 Empathy 将 **仍然可以使用存档在 Ubuntu 上安装**。 + +它不是完全被替换成为一个新的桌面应用程序,它还包括默认的:GNOME 日历。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/11/the-ubuntu-software-centre-is-being-replace-in-16-04-lts + +作者:[Sam Tran][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/111008502832304483939?rel=author +[1]:https://wiki.gnome.org/Apps/Software From 508e06024463e17e66e400b02493e700267be5af Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 12 Nov 2015 21:51:38 +0800 Subject: [PATCH 2438/2517] PUB:LetsEncrypt @vizv --- {translated/news => published}/LetsEncrypt.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/news => published}/LetsEncrypt.md (100%) diff --git a/translated/news/LetsEncrypt.md b/published/LetsEncrypt.md similarity index 100% rename from translated/news/LetsEncrypt.md rename to published/LetsEncrypt.md From 32519b1b036a2f53548e5846441de859e58daebc Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 12 Nov 2015 22:12:54 +0800 Subject: [PATCH 2439/2517] PUB:20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS @strugglingyouth --- ...ware Centre To Be Replaced in 16.04 LTS.md | 53 +++++++++++++++++ ...ware Centre To Be Replaced in 16.04 LTS.md | 58 ------------------- 2 files changed, 53 insertions(+), 58 deletions(-) create mode 100644 published/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md delete mode 100644 translated/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md diff --git a/published/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md b/published/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md new file mode 100644 index 0000000000..b8b10719bf --- /dev/null +++ b/published/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md @@ -0,0 +1,53 @@ +Ubuntu 软件中心将在 16.04 LTS 中被替换 +================================================================================ +![The USC Will Be Replaced](http://www.omgubuntu.co.uk/wp-content/uploads/2011/09/usc1.jpg) + +*Ubuntu 软件中心将在 Ubuntu 16.04 LTS 中被替换。* + +Ubuntu Xenial Xerus 桌面用户将会发现,这个熟悉的(并有些繁琐的)Ubuntu 软件中心将不再可用。 + +按照目前的计划,GNOME 的 [软件应用(Software application)][1] 将作为基于 Unity 7 的桌面的默认包管理工具。 + +![GNOME Software](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/gnome-software.jpg) + +*GNOME 软件应用* + +作为这次变化的一个结果是,会新开发插件来支持软件中心的评级、评论和应用程序付费的功能。 + +该决定是在伦敦的 Canonical 总部最近举行的一次桌面峰会中通过的。 + +“相对于 Ubuntu 软件中心,我们认为我们在 GNOME 软件中心(sic)添加 Snaps 支持上能做的更好。所以,现在看起来我们将使用 GNOME 软件中心来取代 [Ubuntu 软件中心]”,Ubuntu 桌面经理 Will Cooke 在 Ubuntu 在线峰会解释说。 + +GNOME 3.18 架构与也将出现在 Ubuntu 16.04 中,其中一些应用程序将更新到 GNOME 3.20 , ‘这么做也是有道理的’,Will Cooke 补充说。 + +我们最近在 Twitter 上做了一项民意调查,询问如何在 Ubuntu 上安装软件。结果表明,只有少数人怀念现在的软件中心... + +你使用什么方式在 Ubuntu 上安装软件? + +- 软件中心 +- 终端 + +### 在 Ubuntu 16.04 其他应用程序也将会减少 ### + +Ubuntu 软件中心并不是唯一一个在 Xenial Xerus 中被丢弃的。 + +光盘刻录工具 Brasero 和即时通讯工具 **Empathy** 也将从默认镜像中删除。 + +虽然这些应用程序还在不断的开发,但随着笔记本减少了光驱以及基于移动网络的聊天服务,它们看起来越来越过时了。 + +如果你还在使用它们请不要惊慌:Brasero 和 Empathy 将 **仍然可以通过存档在 Ubuntu 上安装**。 + +也并不全是丢弃和替换,默认还包括了一个新的桌面应用程序:GNOME 日历。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/11/the-ubuntu-software-centre-is-being-replace-in-16-04-lts + +作者:[Sam Tran][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/111008502832304483939?rel=author +[1]:https://wiki.gnome.org/Apps/Software diff --git a/translated/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md b/translated/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md deleted file mode 100644 index f0bcfff3aa..0000000000 --- a/translated/news/20151104 Ubuntu Software Centre To Be Replaced in 16.04 LTS.md +++ /dev/null @@ -1,58 +0,0 @@ - -Ubuntu 软件中心将在 16.04 LTS 中被替换 -================================================================================ -![The USC Will Be Replaced](http://www.omgubuntu.co.uk/wp-content/uploads/2011/09/usc1.jpg) - -USC 将被替换 - -**Ubuntu 软件中心将在 Ubuntu 16.04 LTS 中被替换。** - -Xenial Xerus 桌面用户会发现,这个熟悉的(并有些繁琐的)Ubuntu 软件中心将不再可用。 - -GNOME 的 [软件应用][1] - 按照目前的计划 - 在基于 Unity 7 的桌面中,它将作为默认的包管理工具。 - -![GNOME Software](http://www.omgubuntu.co.uk/wp-content/uploads/2013/09/gnome-software.jpg) - -GNOME 软件 - -这次变化的结果是,新开发的插件,将支持软件中心的评级,评论和应用程序付费的功能。 - -该决定是最近在伦敦标准总部举行的一次桌面峰会中被采用的。 - -“我们更相信我们添加 Snaps 到 GNOME 软件中心(sic)比到 Ubuntu 软件中心支持的能力。所以,现在看起来我们将使用 GNOME 软件中心来取代 [the USC]”,Cooke 在 Ubuntu 在线峰会解释了 Ubuntu 桌面管理器。 - -GNOME 3.18 架构与也将出现在 Ubuntu 16.04 中,将其中一些应用程序更新到 GNOME 3.20 采用的架构下 ‘这么做也是有道理的’,库克补充说。 - -我们最近在 Twitter 上做了一项民意调查,询问如何在 Ubuntu 上安装软件。结果表明,只有少数人对现在的软件中心表示不满... - -注:投票项目 - -你使用什么方式在 Ubuntu 上安装软件? - -- 软件中心 -- 终端 - -### 在 Ubuntu 16.04 其他应用程序也将会减少 ### - -Ubuntu 软件中心并不是唯一一个在 Xenial Xerus 中被丢弃的。 - -光盘刻录工具 Brasero 和即时通讯工具 **Empathy** 也将从默认镜像中删除。 - -虽然应用程序在不断的发展,但赶不上光驱以及网络和移动聊天服务,它们也会被看作是越来越过时的。 - -如果你还在使用它们请不要惊慌:Brasero 和 Empathy 将 **仍然可以使用存档在 Ubuntu 上安装**。 - -它不是完全被替换成为一个新的桌面应用程序,它还包括默认的:GNOME 日历。 - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/11/the-ubuntu-software-centre-is-being-replace-in-16-04-lts - -作者:[Sam Tran][a] -译者:[strugglingyouth](https://github.com/strugglingyouth) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/111008502832304483939?rel=author -[1]:https://wiki.gnome.org/Apps/Software From 23a7282af4cae220e7771758e0f2c0c58b1e3059 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 12 Nov 2015 23:21:44 +0800 Subject: [PATCH 2440/2517] PUB:20150827 The Strangest Most Unique Linux Distros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc 翻译的不错! --- ...The Strangest Most Unique Linux Distros.md | 88 +++++++++++++++++++ ...The Strangest Most Unique Linux Distros.md | 66 -------------- 2 files changed, 88 insertions(+), 66 deletions(-) create mode 100644 published/20150827 The Strangest Most Unique Linux Distros.md delete mode 100644 translated/talk/20150827 The Strangest Most Unique Linux Distros.md diff --git a/published/20150827 The Strangest Most Unique Linux Distros.md b/published/20150827 The Strangest Most Unique Linux Distros.md new file mode 100644 index 0000000000..a7dff335a4 --- /dev/null +++ b/published/20150827 The Strangest Most Unique Linux Distros.md @@ -0,0 +1,88 @@ +那些奇特的 Linux 发行版本 +================================================================================ +从大多数消费者所关注的诸如 Ubuntu,Fedora,Mint 或 elementary OS 到更加复杂、轻量级和企业级的诸如 Slackware,Arch Linux 或 RHEL,这些发行版本我都已经见识过了。除了这些,难道没有其他别的了吗?其实 Linux 的生态系统是非常多样化的,对每个人来说,总有一款适合你。下面就让我们讨论一些稀奇古怪的小众 Linux 发行版本吧,它们代表着开源平台真正的多样性。 + +### Puppy Linux + +![strangest linux distros](http://2.bp.blogspot.com/--cSL2-6rIgA/VcwNc5hFebI/AAAAAAAAJzk/AgB55mVtJVQ/s1600/Puppy-Linux.png) + +它是一个仅有一个普通 DVD 光盘容量十分之一大小的操作系统,这就是 Puppy Linux。整个操作系统仅有 100MB 大小!并且它还可以从内存中运行,这使得它运行极快,即便是在老式的 PC 机上。 在操作系统启动后,你甚至可以移除启动介质!还有什么比这个更好的吗? 系统所需的资源极小,大多数的硬件都会被自动检测到,并且它预装了能够满足你基本需求的软件。[在这里体验 Puppy Linux 吧][1]. + +### Suicide Linux(自杀 Linux) + +![suicide linux](http://3.bp.blogspot.com/-dfeehRIQKpo/VdMgRVQqIJI/AAAAAAAAJz0/TmBs-n2K9J8/s1600/suicide-linux.jpg) + +这个名字吓到你了吗?我想应该是。 ‘任何时候 -注意是任何时候-一旦你远程输入不正确的命令,解释器都会创造性地将它重定向为 `rm -rf /` 命令,然后擦除你的硬盘’。它就是这么简单。我真的很想知道谁自信到将[Suicide Linux][2] 安装到生产机上。 **警告:千万不要在生产机上尝试这个!** 假如你感兴趣的话,现在可以通过一个简洁的[DEB 包][3]来获取到它。 + +### PapyrOS + +![top 10 strangest linux distros](http://3.bp.blogspot.com/-Q0hlEMCD9-o/VdMieAiXY1I/AAAAAAAAJ0M/iS_ZjVaZAk8/s1600/papyros.png) + +它的 “奇怪”是好的方面。PapyrOS 正尝试着将 Android 的 material design 设计语言引入到新的 Linux 发行版本上。尽管这个项目还处于早期阶段,看起来它已经很有前景。该项目的网页上说该系统已经完成了 80%,随后人们可以期待它的第一个 Alpha 发行版本。在该项目被宣告提出时,我们做了 [PapyrOS][4] 的小幅报道,从它的外观上看,它甚至可能会引领潮流。假如你感兴趣的话,可在 [Google+][5] 上关注该项目并可通过 [BountySource][6] 来贡献出你的力量。 + +### Qubes OS + +![10 most unique linux distros](http://3.bp.blogspot.com/-8aOtnTp3Yxk/VdMo_KWs4sI/AAAAAAAAJ0o/3NTqhaw60jM/s1600/qubes-linux.png) + +Qubes 是一个开源的操作系统,其设计通过使用[安全分级(Security by Compartmentalization)][14]的方法,来提供强安全性。其前提假设是不存在完美的没有 bug 的桌面环境。并通过实现一个‘安全隔离(Security by Isolation)’ 的方法,[Qubes Linux][7]试图去解决这些问题。Qubes 基于 Xen、X 视窗系统和 Linux,并可运行大多数的 Linux 应用,支持大多数的 Linux 驱动。Qubes 入选了 Access Innovation Prize 2014 for Endpoint Security Solution 决赛名单。 + +### Ubuntu Satanic Edition + +![top10 linux distros](http://3.bp.blogspot.com/-2Sqvb_lilC0/VdMq_ceoXnI/AAAAAAAAJ00/kot20ugVJFk/s1600/ubuntu-satanic.jpg) + +Ubuntu SE 是一个基于 Ubuntu 的发行版本。通过一个含有主题、壁纸甚至来源于某些天才新晋艺术家的重金属音乐的综合软件包,“它同时带来了最好的自由软件和免费的金属音乐” 。尽管这个项目看起来不再积极开发了, Ubuntu Satanic Edition 甚至在其名字上都显得奇异。 [Ubuntu SE (Slightly NSFW)][8]。 + +### Tiny Core Linux + +![10 strange linux distros](http://2.bp.blogspot.com/-ZtIVjGMqdx0/VdMv136Pz1I/AAAAAAAAJ1E/-q34j-TXyUY/s1600/tiny-core-linux.png) + +Puppy Linux 还不够小?试试这个吧。 Tiny Core Linux 是一个 12MB 大小的图形化 Linux 桌面!是的,你没有看错。一个主要的补充说明:它不是一个完整的桌面,也并不完全支持所有的硬件。它只含有能够启动进入一个非常小巧的 X 桌面,支持有线网络连接的核心部件。它甚至还有一个名为 Micro Core Linux 的没有 GUI 的版本,仅有 9MB 大小。[Tiny Core Linux][9]。 + +### NixOS + +![top 10 unique and special linux distros](http://4.bp.blogspot.com/-idmCvIxtxeo/VdcqcggBk1I/AAAAAAAAJ1U/DTQCkiLqlLk/s1600/nixos.png) + +它是一个资深用户所关注的 Linux 发行版本,有着独特的打包和配置管理方式。在其他的发行版本中,诸如升级的操作可能是非常危险的。升级一个软件包可能会引起其他包无法使用,而升级整个系统感觉还不如重新安装一个。在那些你不能安全地测试由一个配置的改变所带来的结果的更改之上,它们通常没有“重来”这个选项。在 NixOS 中,整个系统由 Nix 包管理器按照一个纯功能性的构建语言的描述来构建。这意味着构建一个新的配置并不会重写先前的配置。大多数其他的特色功能也遵循着这个模式。Nix 相互隔离地存储所有的软件包。有关 NixOS 的更多内容请看[这里][10]。 + +### GoboLinux + +![strangest linux distros](http://4.bp.blogspot.com/-rOYfBXg-UiU/VddCF7w_xuI/AAAAAAAAJ1w/Nf11bOheOwM/s1600/gobolinux.jpg) + +这是另一个非常奇特的 Linux 发行版本。它与其他系统如此不同的原因是它有着独特的重新整理的文件系统。它有着自己独特的子目录树,其中存储着所有的文件和程序。GoboLinux 没有专门的包数据库,因为其文件系统就是它的数据库。在某些方面,这类重整有些类似于 OS X 上所看到的功能。 + +### Hannah Montana Linux + +![strangest linux distros](http://1.bp.blogspot.com/-3P22pYfih6Y/VdcucPOv4LI/AAAAAAAAJ1g/PszZDbe83sQ/s1600/hannah-montana-linux.jpg) + +它是一个基于 Kubuntu 的 Linux 发行版本,它有着汉娜·蒙塔娜( Hannah Montana) 主题的开机启动界面、KDM(KDE Display Manager)、图标集、ksplash、plasma、颜色主题和壁纸(I'm so sorry)。[这是它的链接][12]。这个项目现在不再活跃了。 + +### RLSD Linux + +它是一个极其精简、小巧、轻量和安全可靠的,基于 Linux 文本的操作系统。开发者称 “它是一个独特的发行版本,提供一系列的控制台应用和自带的安全特性,对黑客或许有吸引力。” [RLSD Linux][13]. + +我们还错过了某些更加奇特的发行版本吗?请让我们知晓吧。 + +-------------------------------------------------------------------------------- + +via: http://www.techdrivein.com/2015/08/the-strangest-most-unique-linux-distros.html + +作者:Manuel Jose +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm +[2]:http://qntm.org/suicide +[3]:http://sourceforge.net/projects/suicide-linux/files/ +[4]:http://www.techdrivein.com/2015/02/papyros-material-design-linux-coming-soon.html +[5]:https://plus.google.com/communities/109966288908859324845/stream/3262a3d3-0797-4344-bbe0-56c3adaacb69 +[6]:https://www.bountysource.com/teams/papyros +[7]:https://www.qubes-os.org/ +[8]:http://ubuntusatanic.org/ +[9]:http://tinycorelinux.net/ +[10]:https://nixos.org/ +[11]:http://www.gobolinux.org/ +[12]:http://hannahmontana.sourceforge.net/ +[13]:http://rlsd2.dimakrasner.com/ +[14]:https://en.wikipedia.org/wiki/Compartmentalization_(information_security) \ No newline at end of file diff --git a/translated/talk/20150827 The Strangest Most Unique Linux Distros.md b/translated/talk/20150827 The Strangest Most Unique Linux Distros.md deleted file mode 100644 index 14cee08661..0000000000 --- a/translated/talk/20150827 The Strangest Most Unique Linux Distros.md +++ /dev/null @@ -1,66 +0,0 @@ -那些奇特的 Linux 发行版本 -================================================================================ -从大多数消费者所关注的诸如 Ubuntu,Fedora,Mint 或 elementary OS 到更加晦涩、轻量级和企业级的诸如 Slackware,Arch Linux 或 RHEL,这些发行版本我都已经见识过了。除了这些,难道没有其他别的了吗?其实 Linux 的生态系统是非常多样化的,对每个人来说,总有一款适合你。下面就让我们讨论一些稀奇古怪的小众 Linux 发行版本吧,它们代表着开源平台真正的多样性。 - -![strangest linux distros](http://2.bp.blogspot.com/--cSL2-6rIgA/VcwNc5hFebI/AAAAAAAAJzk/AgB55mVtJVQ/s1600/Puppy-Linux.png) - -**Puppy Linux**: 它是一个仅有一个普通 DVD 光盘容纳十分之一大小的操作系统,这就是 Puppy Linux。整个操作系统仅有 100MB 大小!并且它还可以在内存中运行,这使得它运行极快,甚至是在老式的 PC 机上。 在操作系统启动后,你甚至可以移除安装介质!还有什么比这个更好的吗? 系统所需的资源极小,大多数的硬件都会被自动检测到,并且它预装了能够满足你基本需求的软件。[在这里体验 Puppy Linux 吧][1]. - -![suicide linux](http://3.bp.blogspot.com/-dfeehRIQKpo/VdMgRVQqIJI/AAAAAAAAJz0/TmBs-n2K9J8/s1600/suicide-linux.jpg) - -**Suicide Linux(自杀 Linux)**: 这个名字吓到你了吗?我想应该是。 ‘任何时候 -注意是任何时候-一旦你输入不正确的命令,解释器都会创造性地将它重定向为 `rm -rf /` 命令,然后擦除你的硬盘’。它就是这么简单。我真的很想知道那些自信到将[Suicide Linux][2] 安装到生产机上的家伙。 **警告:不要在生产机上尝试这个!** 假如你感兴趣的话,现在可以通过一个简洁的[DEB 包][3]来获取到它。 - -![top 10 strangest linux distros](http://3.bp.blogspot.com/-Q0hlEMCD9-o/VdMieAiXY1I/AAAAAAAAJ0M/iS_ZjVaZAk8/s1600/papyros.png) - -**PapyrOS**: 它在好的方面上 “奇怪”。PapyrOS 正尝试着将 Android 的 material design 设计语言应用到新品牌的 Linux 发行版本上。尽管这个项目还处于早期阶段,看起来它已经很有前景。该项目的网页上说该系统已经完成了 80%,随后人们可以期待它的第一个 Alpha 发行版本。在该项目被宣告提出时,我们做了[PapyrOS][4]的小幅报道,从它的外观上看,它甚至可能会引领潮流。假如你感兴趣的话,可在[Google+][5]上关注该项目并可通过[BountySource][6]来贡献出你的力量。 - -![10 most unique linux distros](http://3.bp.blogspot.com/-8aOtnTp3Yxk/VdMo_KWs4sI/AAAAAAAAJ0o/3NTqhaw60jM/s1600/qubes-linux.png) - -**Qubes OS**: Qubes 是一个开源的操作系统,通过使用安全划分的方法,被设计用来提供强大的安全性。其前提假设是不存在完美的没有 bug 的桌面环境。并通过实现一个‘安全隔离’ 的方法,[Qubes Linux][7]尝试去弥补那些 bug。Qubes 基于 Xen,X 视窗系统和 Linux,并可运行大多数的 Linux 应用,支持大多数的 Linux 驱动。Qubes 入选了 Access Innovation Prize 2014 for Endpoint Security Solution 决赛名单。 - -![top10 linux distros](http://3.bp.blogspot.com/-2Sqvb_lilC0/VdMq_ceoXnI/AAAAAAAAJ00/kot20ugVJFk/s1600/ubuntu-satanic.jpg) - -**Ubuntu Satanic Edition**: Ubuntu SE 是一个基于 Ubuntu 的发行版本。通过一个含有主题、壁纸甚至来源于某些天才新晋艺术家的重金属音乐的综合软件包,“它同时带来了最好的自由软件和免费的金属音乐” 。尽管这个项目看起来不再被活跃地发展了, Ubuntu Satanic Edition 甚至在其名字上都显得奇异。 [Ubuntu SE (Slightly NSFW)][8]。 - -![10 strange linux distros](http://2.bp.blogspot.com/-ZtIVjGMqdx0/VdMv136Pz1I/AAAAAAAAJ1E/-q34j-TXyUY/s1600/tiny-core-linux.png) - -**Tiny Core Linux**: Puppy Linux 还不够小?试试这个吧。 Tiny Core Linux 是一个 12MB 大小的图形化 Linux 桌面!是的,你没有读错。一个主要的补充说明:它不是一个完整的桌面,也并不完全支持所有的硬件。它只含有能够启动进入一个非常小巧的 X 桌面,支持有线网络连接的核心部件。它甚至还有一个名为 Micro Core Linux 的没有 GUI 的版本,仅有 9MB 大小。[Tiny Core Linux][9]。 - -![top 10 unique and special linux distros](http://4.bp.blogspot.com/-idmCvIxtxeo/VdcqcggBk1I/AAAAAAAAJ1U/DTQCkiLqlLk/s1600/nixos.png) - -**NixOS**: 它是一个非常关注经验用户的 Linux 发行版本,有着独特的方式来打包和配置管理。在其他的发行版本中,诸如升级的操作可能是非常危险的。升级一个软件包可能会引起其他包无法使用,相比于从头安装一个系统,升级整个系统则显得不是那么可信。在那些你不能安全地测试由一个配置的改变所带来的结果的更改之上,它们通常没有“重来”这个选项。在 NixOS 中,整个系统由 Nix 包管理器按照一个纯功能性的构建语言的描述来构建。这意味着一个新的配置不会重写先前的配置。大多数其他的特色功能也遵循着这个模式。Nix 相互分离地存储所有的软件包。有关 NixOS 的更多内容请看[这里][10]。 - -![strangest linux distros](http://4.bp.blogspot.com/-rOYfBXg-UiU/VddCF7w_xuI/AAAAAAAAJ1w/Nf11bOheOwM/s1600/gobolinux.jpg) - -**GoboLinux**: 这是另一个非常奇特的 Linux 发行版本。它与其他系统如此不同的原因是它有着独特的重管理文件系统。它有着自己独特的子目录树,其中存储着所有的文件和程序。GoboLinux 没有专门的包数据库,因为其文件系统就是它的数据库。在某些方面,这类管理有些类似于 OS X 上所看到的功能。 - -![strangest linux distros](http://1.bp.blogspot.com/-3P22pYfih6Y/VdcucPOv4LI/AAAAAAAAJ1g/PszZDbe83sQ/s1600/hannah-montana-linux.jpg) - -**Hannah Montana Linux**: 它是一个基于 Kubuntu 的 Linux 发行版本,它有着 Hannah Montana 主题的开机启动界面、KDM(KDE Display Manager)、图标集、ksplash、plasma、颜色主题和壁纸(请抱歉)。[这是它的链接][12]。这个项目现在不再活跃了。 - -**RLSD Linux**: 它是一个极其精简、小巧、轻量和安全加固的,建立在 Linux 内核上的基于文本的操作系统。开发者称 “它是一个独特的发行版本,提供一系列的控制台应用和本地化的安全特性,对黑客或许有吸引力。” [RLSD Linux][13]. - -我们还错过了某些更加奇特的发行版本吗?请让我们知晓吧。 --------------------------------------------------------------------------------- - -via: http://www.techdrivein.com/2015/08/the-strangest-most-unique-linux-distros.html - -作者:Manuel Jose -译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm -[2]:http://qntm.org/suicide -[3]:http://sourceforge.net/projects/suicide-linux/files/ -[4]:http://www.techdrivein.com/2015/02/papyros-material-design-linux-coming-soon.html -[5]:https://plus.google.com/communities/109966288908859324845/stream/3262a3d3-0797-4344-bbe0-56c3adaacb69 -[6]:https://www.bountysource.com/teams/papyros -[7]:https://www.qubes-os.org/ -[8]:http://ubuntusatanic.org/ -[9]:http://tinycorelinux.net/ -[10]:https://nixos.org/ -[11]:http://www.gobolinux.org/ -[12]:http://hannahmontana.sourceforge.net/ -[13]:http://rlsd2.dimakrasner.com/ \ No newline at end of file From 5553a91a85281aef8c83d681765902adffe4da0a Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 13 Nov 2015 21:22:48 +0800 Subject: [PATCH 2441/2517] Delete 20151022 9 Tips for Improving WordPress Performance.md --- ...ips for Improving WordPress Performance.md | 513 ------------------ 1 file changed, 513 deletions(-) delete mode 100644 sources/tech/20151022 9 Tips for Improving WordPress Performance.md diff --git a/sources/tech/20151022 9 Tips for Improving WordPress Performance.md b/sources/tech/20151022 9 Tips for Improving WordPress Performance.md deleted file mode 100644 index 8aab6b8f49..0000000000 --- a/sources/tech/20151022 9 Tips for Improving WordPress Performance.md +++ /dev/null @@ -1,513 +0,0 @@ -struggling 翻译中... -9 Tips for Improving WordPress Performance -================================================================================ -WordPress is the single largest platform for website creation and web application delivery worldwide. About [a quarter][1] of all sites are now built on open-source WordPress software, including sites for eBay, Mozilla, RackSpace, TechCrunch, CNN, MTV, the New York Times, the Wall Street Journal. - -WordPress.com, the most popular site for user-created blogs, also runs on WordPress open source software. [NGINX powers WordPress.com][2]. Among WordPress customers, many sites start on WordPress.com and then move to hosted WordPress open-source software; more and more of these sites use NGINX software as well. - -WordPress’ appeal is its simplicity, both for end users and for implementation. However, the architecture of a WordPress site presents problems when usage ramps upward – and several steps, including caching and combining WordPress and NGINX, can solve these problems. - -In this blog post, we provide nine performance tips to help overcome typical WordPress performance challenges: - -- [Cache static resources][3] -- [Cache dynamic files][4] -- [Move to NGINX][5] -- [Add permalink support to NGINX][6] -- [Configure NGINX for FastCGI][7] -- [Configure NGINX for W3_Total_Cache][8] -- [Configure NGINX for WP-Super-Cache][9] -- [Add security precautions to your NGINX configuration][10] -- [Configure NGINX to support WordPress Multisite][11] - -### WordPress Performance on LAMP Sites ### - -Most WordPress sites are run on a traditional LAMP software stack: the Linux OS, Apache web server software, MySQL database software – often on a separate database server – and the PHP programming language. Each of these is a very well-known, widely used, open source tool. Most people in the WordPress world “speak” LAMP, so it’s easy to get help and support. - -When a user visits a WordPress site, a browser running the Linux/Apache combination creates six to eight connections per user. As the user moves around the site, PHP assembles each page on the fly, grabbing resources from the MySQL database to answer requests. - -LAMP stacks work well for anywhere from a few to, perhaps, hundreds of simultaneous users. However, sudden increases in traffic are common online and – usually – a good thing. - -But when a LAMP-stack site gets busy, with the number of simultaneous users climbing into the many hundreds or thousands, it can develop serious bottlenecks. Two main causes of bottlenecks are: - -1. The Apache web server – Apache consumes substantial resources for each and every connection. If Apache accepts too many simultaneous connections, memory can be exhausted and performance slows because data has to be paged back and forth to disk. If connections are limited to protect response time, new connections have to wait, which also leads to a poor user experience. -1. The PHP/MySQL interaction – Together, an application server running PHP and a MySQL database server can serve a maximum number of requests per second. When the number of requests exceeds the maximum, users have to wait. Exceeding the maximum by a relatively small amount can cause a large slowdown in responsiveness for all users. Exceeding it by two or more times can cause significant performance problems. - -The performance bottlenecks in a LAMP site are particularly resistant to the usual instinctive response, which is to upgrade to more powerful hardware – more CPUs, more disk space, and so on. Incremental increases in hardware performance can’t keep up with the exponential increases in demand for system resources that Apache and the PHP/MySQL combination experience when they get overloaded. - -The leading alternative to a LAMP stack is a LEMP stack – Linux, NGINX, MySQL, and PHP. (In the LEMP acronym, the E stands for the sound at the start of “engine-x.”) We describe a LEMP stack in [Tip 3][12]. - -### Tip 1. Cache Static Resources ### - -Static resources are unchanging files such as CSS files, JavaScript files, and image files. These files often make up half or more of the data on a web page. The remainder of the page is dynamically generated content like comments in a forum, a performance dashboard, or personalized content (think Amazon.com product recommendations). - -Caching static resources has two big benefits: - -- Faster delivery to the user – The user gets the static file from their browser cache or a caching server closer to them on the Internet. These are sometimes big files, so reducing latency for them helps a lot. -- Reduced load on the application server – Every file that’s retrieved from a cache is one less request the web server has to process. The more you cache, the more you avoid thrashing because resources have run out. - -To support browser caching, set the correct HTTP headers for static files. Look into the HTTP Cache-Control header, specifically the max-age setting, the Expires header, and Entity tags. You can find a good introduction [here][13]. - -When local caching is enabled and a user requests a previously accessed file, the browser first checks whether the file is in the cache. If so, it asks the web server if the file has changed. If the file hasn’t changed, the web server can respond immediately with code 304 (Not Modified) meaning that the file is unchanged, instead of returning code 200 OK and then retrieving and delivering the changed file. - -To support caching beyond the browser, consider the Tips below, and consider a content delivery network (CDN).CDNs are a popular and powerful tool for caching, but we don’t describe them in detail here. Consider a CDN after you implement the other techniques mentioned here. Also, CDNs may be less useful as you transition your site from HTTP/1.x to the new HTTP/2 standard; investigate and test as needed to find the right answer for your site. - -If you move to NGINX Plus or the open source NGINX software as part of your software stack, as suggested in [Tip 3][14], then configure NGINX to cache static resources. Use the following configuration, replacing www.example.com with the URL of your web server. - - server { - # substitute your web server's URL for www.example.com - server_name www.example.com; - root /var/www/example.com/htdocs; - index index.php; - - access_log /var/log/nginx/example.com.access.log; - error_log /var/log/nginx/example.com.error.log; - - location / { - try_files $uri $uri/ /index.php?$args; - } - - location ~ \.php$ { - try_files $uri =404; - include fastcgi_params; - # substitute the socket, or address and port, of your WordPress server - fastcgi_pass unix:/var/run/php5-fpm.sock; - #fastcgi_pass 127.0.0.1:9000; - } - - location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { - expires max; - log_not_found off; - access_log off; - } - } - -### Tip 2. Cache Dynamic Files ### - -WordPress generates web pages dynamically, meaning that it generates a given web page every time it is requested (even if the result is the same as the time before). This means that users always get the freshest content. - -Think of a user visiting a blog post that has comments enabled at the bottom of the post. You want the user to see all comments – even a comment that just came in a moment ago. Dynamic content makes this happen. - -But now let’s say that the blog post is getting ten or twenty requests per second. The application server might start to thrash under the pressure of trying to regenerate the page so often, causing big delays. The goal of delivering the latest content to new visitors becomes relevant only in theory, because they’re have to wait so long to get the page in the first place. - -To prevent page delivery from slowing down due to increasing load, cache the dynamic file. This makes the file less dynamic, but makes the whole system more responsive. - -To enable caching in WordPress, use one of several popular plug-ins – described below. A WordPress caching plug-in asks for a fresh page, then caches it for a brief period of time – perhaps just a few seconds. So, if the site is getting several requests a second, most users get their copy of the page from the cache. This helps the retrieval time for all users: - -- Most users get a cached copy of the page. The application server does no work at all. -- Users who do get a fresh copy get it fast. The application server only has to generate a fresh page every so often. When the server does generate a fresh page (for the first user to come along after the cached page expires), it does this much faster because it’s not overloaded with requests. - -You can cache dynamic files for WordPress running on a LAMP stack or on a [LEMP stack][15] (described in [Tip 3][16]). There are several caching plug-ins you can use with WordPress. Here are the most popular caching plug-ins and caching techniques, listed from the simplest to the most powerful: - -- [Hyper-Cache][17] and [Quick-Cache][18] – These two plug-ins create a single PHP file for each WordPress page or post. This supports some dynamic functionality while bypassing much WordPress core processing and the database connection, creating a faster user experience. They don’t bypass all PHP processing, so they don’t give the same performance boost as the following options. They also don’t require changes to the NGINX configuration. -- [WP Super Cache][19] – The most popular caching plug-in for WordPress. It has many settings, which are presented through an easy-to-use interface, shown below. We show a sample NGINX configuration in [Tip 7][20]. -- [W3 Total Cache][21] – This is the second most popular cache plug-in for WordPress. It has even more option settings than WP Super Cache, making it a powerful but somewhat complex option. For a sample NGINX configuration, see [Tip 6][22]. -- [FastCGI][23] – CGI stands for Common Gateway Interface, a language-neutral way to request and receive files on the Internet. FastCGI is not a plug-in but a way to interact with a cache. FastCGI can be used in Apache as well as in NGINX, where it’s the most popular dynamic caching approach; we describe how to configure NGINX to use it in [Tip 5][24]. - -The documentation for these plug-ins and techniques explains how to configure them in a typical LAMP stack. Configuration options include database and object caching; minification for HTML, CSS, and JavaScript files; and integration options for popular CDNs. For NGINX configuration, see the Tips referenced in the list. - -**Note**: Caches do not work for users who are logged into WordPress, because their view of WordPress pages is personalized. (For most sites, only a small minority of users are likely to be logged in.) Also, most caches do not show a cached page to users who have recently left a comment, as that user will want to see their comment appear when they refresh the page. To cache the non-personalized content of a page, you can use a technique called [fragment caching][25], if it’s important to overall performance. - -### Tip 3. Move to NGINX ### - -As mentioned above, Apache can cause performance problems when the number of simultaneous users rises above a certain point – perhaps hundreds of simultaneous users. Apache allocates substantial resources to each connection, and therefore tends to run out of memory. Apache can be configured to limit connections to avoid exhausting memory, but that means, when the limit is exceeded, new connection requests have to wait. - -In addition, Apache loads another copy of the mod_php module into memory for every connection, even if it’s only serving static files (images, CSS, JavaScript, etc.). This consumes even more resources for each connection and limits the capacity of the server further. - -To start solving these problems, move from a LAMP stack to a LEMP stack – replace Apache with (e)NGINX. NGINX handles many thousands of simultaneous connections in a fixed memory footprint, so you don’t have to experience thrashing, nor limit simultaneous connections to a small number. - -NGINX also deals with static files better, with built-in, easily tuned [caching][26] controls. The load on the application server is reduced, and your site can serve far more traffic with a faster, more enjoyable experience for your users. - -You can use NGINX on all the web servers in your deployment, or you can put an NGINX server “in front” of Apache as a reverse proxy – the NGINX server receives client requests, serves static files, and sends PHP requests to Apache, which processes them. - -For dynamically generated pages – the core use case for WordPress experience – choose a caching tool, as described in [Tip 2][27]. In the Tips below, you can find NGINX configuration suggestions for FastCGI, W3_Total_Cache, and WP-Super-Cache. (Hyper-Cache and Quick-Cache don’t require changes to NGINX configuration.) - -**Tip.** Caches are typically saved to disk, but you can use [tmpfs][28] to store the cache in memory and increase performance. - -Setting up NGINX for WordPress is easy. Just follow these four steps, which are described in further detail in the indicated Tips: - -1. Add permalink support – Add permalink support to NGINX. This eliminates dependence on the **.htaccess** configuration file, which is Apache-specific. See [Tip 4][29]. -1. Configure for caching – Choose a caching tool and implement it. Choices include FastCGI cache, W3 Total Cache, WP Super Cache, Hyper Cache, and Quick Cache. See Tips [5][30], [6][31], and [7][32]. -1. Implement security precautions – Adopt best practices for WordPress security on NGINX. See [Tip 8][33]. -1. Configure WordPress Multisite – If you use WordPress Multisite, configure NGINX for a subdirectory, subdomain, or multiple-domain architecture. See [Tip 9][34]. - -### Tip 4. Add Permalink Support to NGINX ### - -Many WordPress sites depend on **.htaccess** files, which are required for several WordPress features, including permalink support, plug-ins, and file caching. NGINX does not support **.htaccess** files. Fortunately, you can use NGINX’s simple, yet comprehensive, configuration language to achieve most of the same functionality. - -You can enable [Permalinks][35] in WordPress with NGINX by including the following location block in your main [server][36] block. (This location block is also included in other code samples below.) - -The **try_files** directive tells NGINX to check whether the requested URL exists as a file ( **$uri**) or directory (**$uri/**) in the document root, **/var/www/example.com/htdocs**. If not, NGINX does a redirect to **/index.php**, passing the query string arguments as parameters. - - server { - server_name example.com www.example.com; - root /var/www/example.com/htdocs; - index index.php; - - access_log /var/log/nginx/example.com.access.log; - error_log /var/log/nginx/example.com.error.log; - - location / { - try_files $uri $uri/ /index.php?$args; - } - } - -### Tip 5. Configure NGINX for FastCGI ### - -NGINX can cache responses from FastCGI applications like PHP. This method offers the best performance. - -For NGINX open source, compile in the third-party module [ngx_cache_purge][37], which provides cache purging capability, and use the configuration code below. NGINX Plus includes its own implementation of this code. - -When using FastCGI, we recommend you install the [Nginx Helper plug-in][38] and use a configuration such as the one below, especially the use of **fastcgi_cache_key** and the location block including **fastcgi_cache_purge**. The plug-in automatically purges your cache when a page or a post is published or modified, a new comment is published, or the cache is manually purged from the WordPress Admin Dashboard. - -The Nginx Helper plug-in can also add a short HTML snippet to the bottom of your pages, confirming the cache is working and displaying some statistics. (You can also confirm the cache is functioning properly using the [$upstream_cache_status][39] variable.) - -fastcgi_cache_path /var/run/nginx-cache levels=1:2 - keys_zone=WORDPRESS:100m inactive=60m; -fastcgi_cache_key "$scheme$request_method$host$request_uri"; - - server { - server_name example.com www.example.com; - root /var/www/example.com/htdocs; - index index.php; - - access_log /var/log/nginx/example.com.access.log; - error_log /var/log/nginx/example.com.error.log; - - set $skip_cache 0; - - # POST requests and urls with a query string should always go to PHP - if ($request_method = POST) { - set $skip_cache 1; - } - - if ($query_string != "") { - set $skip_cache 1; - } - - # Don't cache uris containing the following segments - if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php - |sitemap(_index)?.xml") { - set $skip_cache 1; - } - - # Don't use the cache for logged in users or recent commenters - if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass - |wordpress_no_cache|wordpress_logged_in") { - set $skip_cache 1; - } - - location / { - try_files $uri $uri/ /index.php?$args; - } - - location ~ \.php$ { - try_files $uri /index.php; - include fastcgi_params; - fastcgi_pass unix:/var/run/php5-fpm.sock; - fastcgi_cache_bypass $skip_cache; - fastcgi_no_cache $skip_cache; - fastcgi_cache WORDPRESS; - fastcgi_cache_valid 60m; - } - - location ~ /purge(/.*) { - fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; - } - - location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png - |ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { - - access_log off; - log_not_found off; - expires max; - } - - location = /robots.txt { - access_log off; - log_not_found off; - } - - location ~ /\. { - deny all; - access_log off; - log_not_found off; - } - } - -### Tip 6. Configure NGINX for W3_Total_Cache ### - -[W3 Total Cache][40], by Frederick Townes of [W3-Edge][41], is a WordPress caching framework that supports NGINX. It’s an alternative to FastCGI cache with a wide range of option settings. - -The caching plug-in offers a variety of caching configurations and also includes options for database and object caching, minification of HTML, CSS, and JavaScript, as well as options to integrate with popular CDNs. - -The plug-in handles NGINX configuration by writing to an NGINX configuration file located in the root directory of your domain. - - server { - server_name example.com www.example.com; - - root /var/www/example.com/htdocs; - index index.php; - access_log /var/log/nginx/example.com.access.log; - error_log /var/log/nginx/example.com.error.log; - - include /path/to/wordpress/installation/nginx.conf; - - location / { - try_files $uri $uri/ /index.php?$args; - } - - location ~ \.php$ { - try_files $uri =404; - include fastcgi_params; - fastcgi_pass unix:/var/run/php5-fpm.sock; - } - } - -### Tip 7. Configure NGINX for WP Super Cache ### - -[WP Super Cache][42] by Donncha O Caoimh, a WordPress developer at [Automattic][43], is a WordPress caching engine that turns dynamic WordPress pages into static HTML files that NGINX can serve very quickly. It was one of the first caching plug-ins for WordPress and has a smaller, more focused range of options than others. - -NGINX configurations for WP-Super-Cache can vary depending on your preference. One possible configuration follows. - -In the configuration below, the location block with supercache named in it is the WP Super Cache-specific part, and is needed for the configuration to work. The rest of the code is made up of WordPress rules for not caching users who are logged into WordPress, not caching POST requests, and setting expires headers for static assets, plus standard PHP implementation; these parts can be customized to fit your needs. - - server { - server_name example.com www.example.com; - root /var/www/example.com/htdocs; - index index.php; - - access_log /var/log/nginx/example.com.access.log; - error_log /var/log/nginx/example.com.error.log debug; - - set $cache_uri $request_uri; - - # POST requests and urls with a query string should always go to PHP - if ($request_method = POST) { - set $cache_uri 'null cache'; - } - if ($query_string != "") { - set $cache_uri 'null cache'; - } - - # Don't cache uris containing the following segments - if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php - |wp-.*.php|/feed/|index.php|wp-comments-popup.php - |wp-links-opml.php|wp-locations.php |sitemap(_index)?.xml - |[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { - - set $cache_uri 'null cache'; - } - - # Don't use the cache for logged-in users or recent commenters - if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+ - |wp-postpass|wordpress_logged_in") { - set $cache_uri 'null cache'; - } - - # Use cached or actual file if it exists, otherwise pass request to WordPress - location / { - try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html - $uri $uri/ /index.php; - } - - location = /favicon.ico { - log_not_found off; - access_log off; - } - - location = /robots.txt { - log_not_found off - access_log off; - } - - location ~ .php$ { - try_files $uri /index.php; - include fastcgi_params; - fastcgi_pass unix:/var/run/php5-fpm.sock; - #fastcgi_pass 127.0.0.1:9000; - } - - # Cache static files for as long as possible - location ~*.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css - |rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2 - |doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { - expires max; - log_not_found off; - access_log off; - } - } - -### Tip 8. Add Security Precautions to Your NGINX Configuration ### - -To protect against attacks, you can control access to key resources and limit the ability of bots to overload the login utility. - -Allow only specific IP addresses to access the WordPress Dashboard. - - # Restrict access to WordPress Dashboard - location /wp-admin { - deny 192.192.9.9; - allow 192.192.1.0/24; - allow 10.1.1.0/16; - deny all; - } - -Only allow uploading of specific types of files to prevent programs with malicious intent from being uploaded and running. - - # Deny access to uploads which aren’t images, videos, music, etc. - location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php|js|swf)$ { - deny all; - } - -Deny access to **wp-config.php**, the WordPress configuration file. Another way to deny access is to move the file one directory level above the domain root. - - # Deny public access to wp-config.php - location ~* wp-config.php { - deny all; - } - -Rate limit **wp-login.php** to block against brute force attacks. - - # Deny access to wp-login.php - location = /wp-login.php { - limit_req zone=one burst=1 nodelay; - fastcgi_pass unix:/var/run/php5-fpm.sock; - #fastcgi_pass 127.0.0.1:9000; - } - -### Tip 9. Use NGINX with WordPress Multisite ### - -WordPress Multisite, as its name implies, is a version of WordPress software that allows you to manage two or more sites from a single WordPress instance. The [WordPress.com][44] service, which hosts thousands of user blogs, is run from WordPress Multisite. - -You can run separate sites from either subdirectories of a single domain or from separate subdomains. - -Use this code block to add support for a subdirectory structure. - - # Add support for subdirectory structure in WordPress Multisite - if (!-e $request_filename) { - rewrite /wp-admin$ $scheme://$host$uri/ permanent; - rewrite ^(/[^/]+)?(/wp-.*) $2 last; - rewrite ^(/[^/]+)?(/.*\.php) $2 last; - } - -Use this code block instead of the code block above to add support for a subdirectory structure, substituting your own subdirectory names. - - # Add support for subdomains - server_name example.com *.example.com; - -Older versions of WordPress Multisite (3.4 and earlier) use readfile() to serve static content. However, readfile() is PHP code, which causes a significant performance hit when it executes. We can use NGINX to bypass this unnecessary PHP processing. The code snippets below are separated by separator lines (==============). - - # Avoid PHP readfile() for /blogs.dir/structure in the subdirectory path. - location ^~ /blogs.dir { - internal; - alias /var/www/example.com/htdocs/wp-content/blogs.dir; - access_log off; - log_not_found off; - expires max; - } - - ============================================================ - - # Avoid php readfile() for /files/structure in the subdirectory path - location ~ ^(/[^/]+/)?files/(?.+) { - try_files /wp-content/blogs.dir/$blogid/files/$rt_file /wp-includes/ms-files.php?file=$rt_file; - access_log off; - log_not_found off; - expires max; - } - - ============================================================ - - # WPMU files structure for the subdomain path - location ~ ^/files/(.*)$ { - try_files /wp-includes/ms-files.php?file=$1 =404; - access_log off; - log_not_found off; - expires max; - } - - ============================================================ - - # Map blog ID to specific directory - map $http_host $blogid { - default 0; - example.com 1; - site1.example.com 2; - site1.com 2; - } - -### Conclusion ### - -Scalability is a challenge for more and more site developers as they achieve success with their WordPress sites. (And for new sites that want to head WordPress performance problems off at the pass.) Adding WordPress caching, and combining WordPress and NGINX, are solid answers. - -NGINX is not only useful with WordPress sites. NGINX is the [leading web server][45] among the busiest 1,000, 10,000, and 100,000 sites in the world. - -For more on NGINX performance, see our recent blog post, [10 Tips for 10x Application Performance][46]. - -NGINX software comes in two versions: - -- NGINX open source software – Like WordPress, this is software you download, configure, and compile yourself. -- NGINX Plus – NGINX Plus includes a pre-built reference version of the software, as well as service and technical support. - -To get started, go to [nginx.org][47] for the open source software or check out [NGINX Plus][48]. - --------------------------------------------------------------------------------- - -via: https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/ - -作者:[Floyd Smith][a] -译者:[译者ID](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/floyd/ -[1]:http://w3techs.com/technologies/overview/content_management/all -[2]:https://www.nginx.com/press/choosing-nginx-growth-wordpresscom/ -[3]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#cache-static -[4]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#cache-dynamic -[5]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx -[6]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#permalink -[7]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#fastcgi -[8]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#w3-total-cache -[9]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#wp-super-cache -[10]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#security -[11]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#multisite -[12]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx -[13]:http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/ -[14]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx -[15]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#lamp -[16]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx -[17]:https://wordpress.org/plugins/hyper-cache/ -[18]:https://wordpress.org/plugins/quick-cache/ -[19]:https://wordpress.org/plugins/wp-super-cache/ -[20]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#wp-super-cache -[21]:https://wordpress.org/plugins/w3-total-cache/ -[22]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#w3-total-cache -[23]:http://www.fastcgi.com/ -[24]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#fastcgi -[25]:https://css-tricks.com/wordpress-fragment-caching-revisited/ -[26]:https://www.nginx.com/resources/admin-guide/content-caching/ -[27]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#cache-dynamic -[28]:https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt -[29]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#permalink -[30]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#fastcgi -[31]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#w3-total-cache -[32]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#wp-super-cache -[33]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#security -[34]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#multisite -[35]:http://codex.wordpress.org/Using_Permalinks -[36]:http://nginx.org/en/docs/http/ngx_http_core_module.html#server -[37]:https://github.com/FRiCKLE/ngx_cache_purge -[38]:https://wordpress.org/plugins/nginx-helper/ -[39]:http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables -[40]:https://wordpress.org/plugins/w3-total-cache/ -[41]:http://www.w3-edge.com/ -[42]:https://wordpress.org/plugins/wp-super-cache/ -[43]:http://automattic.com/ -[44]:https://wordpress.com/ -[45]:http://w3techs.com/technologies/cross/web_server/ranking -[46]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/ -[47]:http://www.nginx.org/en -[48]:https://www.nginx.com/products/ -[49]: -[50]: \ No newline at end of file From 1f9f1f0b08d19d01a1fbf13bf4d3ddd2ec0900e0 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 13 Nov 2015 21:23:35 +0800 Subject: [PATCH 2442/2517] Create 20151022 9 Tips for Improving WordPress Performance.md --- ...ips for Improving WordPress Performance.md | 520 ++++++++++++++++++ 1 file changed, 520 insertions(+) create mode 100644 translated/tech/20151022 9 Tips for Improving WordPress Performance.md diff --git a/translated/tech/20151022 9 Tips for Improving WordPress Performance.md b/translated/tech/20151022 9 Tips for Improving WordPress Performance.md new file mode 100644 index 0000000000..9c105df42a --- /dev/null +++ b/translated/tech/20151022 9 Tips for Improving WordPress Performance.md @@ -0,0 +1,520 @@ + +提高 WordPress 性能的9个技巧 +================================================================================ + +关于建站和 web 应用程序交付,WordPress 是全球最大的一个平台。全球大约 [四分之一][1] 的站点现在正在使用开源 WordPress 软件,包括 eBay, Mozilla, RackSpace, TechCrunch, CNN, MTV,纽约时报,华尔街日报。 + +WordPress.com,对于用户创建博客平台是最流行的,其也运行在WordPress 开源软件上。[NGINX powers WordPress.com][2]。许多 WordPress 用户刚开始在 WordPress.com 上建站,然后移动到搭载着 WordPress 开源软件的托管主机上;其中大多数站点都使用 NGINX 软件。 + +WordPress 的吸引力是它的简单性,无论是安装启动或者对于终端用户的使用。然而,当使用量不断增长时,WordPress 站点的体系结构也存在一定的问题 - 这里几个方法,包括使用缓存以及组合 WordPress 和 NGINX,可以解决这些问题。 + +在这篇博客中,我们提供了9个技巧来进行优化,以帮助你解决 WordPress 中一些常见的性能问题: + +- [缓存静态资源][3] +- [缓存动态文件][4] +- [使用 NGINX][5] +- [添加支持 NGINX 的链接][6] +- [为 NGINX 配置 FastCGI][7] +- [为 NGINX 配置 W3_Total_Cache][8] +- [为 NGINX 配置 WP-Super-Cache][9] +- [为 NGINX 配置安全防范措施][10] +- [配置 NGINX 支持 WordPress 多站点][11] + +### 在 LAMP 架构下 WordPress 的性能 ### + +大多数 WordPress 站点都运行在传统的 LAMP 架构下:Linux 操作系统,Apache Web 服务器软件,MySQL 数据库软件 - 通常是一个单独的数据库服务器 - 和 PHP 编程语言。这些都是非常著名的,广泛应用的开源工具。大多数人都将 WordPress “称为” LAMP,并且很容易寻求帮助和支持。 + +当用户访问 WordPress 站点时,浏览器为每个用户创建六到八个连接来运行 Linux/Apache 的组合。当用户请求连接时,每个页面的 PHP 文件开始飞速的从 MySQL 数据库争夺资源来响应请求。 + +LAMP 对于数百个并发用户依然能照常工作。然而,流量突然增加是常见的并且 - 通常是 - 一件好事。 + +但是,当 LAMP 站点变得繁忙时,当同时在线的用户达到数千个时,它的瓶颈就会被暴露出来。瓶颈存在主要是两个原因: + +1. Apache Web 服务器 - Apache 为每一个连接需要消耗大量资源。如果 Apache 接受了太多的并发连接,内存可能会耗尽,性能急剧降低,因为数据必须使用磁盘进行交换。如果以限制连接数来提高响应时间,新的连接必须等待,这也导致了用户体验变得很差。 + +1. PHP/MySQL 的交互 - 总之,一个运行 PHP 和 MySQL 数据库服务器的应用服务器上每秒的请求量不能超过最大限制。当请求的数量超过最大连接数时,用户必须等待。超过最大连接数时也会增加所有用户的响应时间。超过其两倍以上时会出现明显的性能问题。 + + LAMP 架构的网站一般都会出现性能瓶颈,这时就需要升级硬件了 - 加 CPU,扩大磁盘空间等等。当 Apache 和 PHP/MySQL 的架构负载运行后,在硬件上不断的提升无法保证对系统资源指数增长的需求。 + +最先取代 LAMP 架构的是 LEMP 架构 – Linux, NGINX, MySQL, 和 PHP。 (这是 LEMP 的缩写,E 代表着 “engine-x.” 的发音。) 我们在 [技巧 3][12] 中会描述 LEMP 架构。 + +### 技巧 1. 缓存静态资源 ### + +静态资源是指不变的文件,像 CSS,JavaScript 和图片。这些文件往往在网页的数据中占半数以上。页面的其余部分是动态生成的,像在论坛中评论,仪表盘的性能,或个性化的内容(可以看看Amazon.com 产品)。 + +缓存静态资源有两大好处: + +- 更快的交付给用户 - 用户从他们浏览器的缓存或者从互联网上离他们最近的缓存服务器获取静态文件。有时候文件较大,因此减少等待时间对他们来说帮助很大。 + +- 减少应用服务器的负载 - 从缓存中检索到的每个文件会让 web 服务器少处理一个请求。你的缓存越多,用户等待的时间越短。 + +要让浏览器缓存文件,需要早在静态文件中设置正确的 HTTP 首部。当看到 HTTP Cache-Control 首部时,特别设置了 max-age,Expires 首部,以及 Entity 标记。[这里][13] 有详细的介绍。 + +当启用本地缓存然后用户请求以前访问过的文件时,浏览器首先检查该文件是否在缓存中。如果在,它会询问 Web 服务器该文件是否改变过。如果该文件没有改变,Web 服务器将立即响应一个304状态码(未改变),这意味着该文件没有改变,而不是返回状态码200 OK,然后继续检索并发送已改变的文件。 + +为了支持浏览器以外的缓存,可以考虑下面的方法,内容分发网络(CDN)。CDN 是一​​种流行且​​强大的缓存工具,但我们在这里不详细描述它。可以想一下 CDN 背后的支撑技术的实现。此外,当你的站点从 HTTP/1.x 过渡到 HTTP/2 协议时,CDN 的用处可能不太大;根据需要调查和测试,找到你网站需要的正确方法。 + +如果你转向 NGINX Plus 或开源的 NGINX 软件作为架构的一部分,建议你考虑 [技巧 3][14],然后配置 NGINX 缓存静态资源。使用下面的配置,用你 Web 服务器的 URL 替换 www.example.com。 + + server { + # substitute your web server's URL for www.example.com + server_name www.example.com; + root /var/www/example.com/htdocs; + index index.php; + + access_log /var/log/nginx/example.com.access.log; + error_log /var/log/nginx/example.com.error.log; + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ \.php$ { + try_files $uri =404; + include fastcgi_params; + # 使用你 WordPress 服务器的套接字,地址和端口来替换 + fastcgi_pass unix:/var/run/php5-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + } + + location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { + expires max; + log_not_found off; + access_log off; + } + } + +### 技巧 2. 缓存动态文件 ### + +WordPress 是动态生成的网页,这意味着每次请求时它都要生成一个给定的网页(即使和前一次的结果相同)。这意味着用户随时获得的是最新内容。 + +想一下,当用户访问一个帖子时,并在文章底部有用户的评论时。你希望用户能够看到所有的评论 - 即使评论刚刚发布。动态内容就是处理这种情况的。 + +但现在,当帖子每秒出现十几二十几个请求时。应用服务器可能每秒需要频繁生成页面导致其压力过大,造成延误。为了给用户提供最新的内容,每个访问理论上都是新的请求,因此他们也不得不在首页等待。 + +为了防止页面由于负载过大变得缓慢,需要缓存动态文件。这需要减少文件的动态内容来提高整个系统的响应速度。 + +要在 WordPress 中启用缓存中,需要使用一些流行的插件 - 如下所述。WordPress 的缓存插件需要刷新页面,然后将其缓存短暂时间 - 也许只有几秒钟。因此,如果该网站每秒中只有几个请求,那大多数用户获得的页面都是缓存的副本。这也有助于提高所有用户的检索时间: + +- 大多数用户获得页面的缓存副本。应用服务器没有做任何工作。 +- 用户很快会得到一个新的副本。应用服务器只需每隔一段时间刷新页面。当服务器产生一个新的页面(对于第一个用户访问后,缓存页过期),它这样做要快得多,因为它的请求不会超载。 + +你可以缓存运行在 LAMP 架构或者 [LEMP 架构][15] 上 WordPress 的动态文件(在 [技巧 3][16] 中说明了)。有几个缓存插件,你可以在 WordPress 中使用。这里有最流行的缓存插件和缓存技术,从最简单到最强大的: + +- [Hyper-Cache][17] 和 [Quick-Cache][18] – 这两个插件为每个 WordPress 页面创建单个 PHP 文件。它支持的一些动态函数会绕过多个 WordPress 与数据库的连接核心处理,创建一个更快的用户体验。他们不会绕过所有的 PHP 处理,所以使用以下选项他们不能给出相同的性能提升。他们也不需要修改 NGINX 的配置。 + +- [WP Super Cache][19] – 最流行的 WordPress 缓存插件。它有许多功能,它的界面非常简洁,如下图所示。我们展示了 NGINX 一个简单的配置实例在 [技巧 7][20] 中。 + +- [W3 Total Cache][21] – 这是第二大最受欢迎的 WordPress 缓存插件。它比 WP Super Cache 的功能更强大,但它有些配置选项比较复杂。一个 NGINX 的简单配置,请看 [技巧 6][22]。 + +- [FastCGI][23] – CGI 代表通用网关接口,在因特网上发送请求和接收文件。它不是一个插件只是一种能直接使用缓存的方法。FastCGI 可以被用在 Apache 和 Nginx 上,它也是最流行的动态缓存方法;我们在 [技巧 5][24] 中描述了如何配置 NGINX 来使用它。 + +这些插件的技术文档解释了如何在 LAMP 架构中配置它们。配置选项包括数据库和对象缓存;也包括使用 HTML,CSS 和 JavaScript 来构建 CDN 集成环境。对于 NGINX 的配置,请看列表中的提示技巧。 + +**注意**:WordPress 不能缓存用户的登录信息,因为它们的 WordPress 页面都是不同的。(对于大多数网站来说,只有一小部分用户可能会登录),大多数缓存不会对刚刚评论过的用户显示缓存页面,只有当用户刷新页面时才会看到他们的评论。若要缓存页面的非个性化内容,如果它对整体性能来说很重要,可以使用一种称为 [fragment caching][25] 的技术。 + +### 技巧 3. 使用 NGINX ### + +如上所述,当并发用户数超过某一值时 Apache 会导致性能问题 – 可能数百个用户同时使用。Apache 对于每一个连接会消耗大量的资源,因而容易耗尽内存。Apache 可以配置连接数的值来避免耗尽内存,但是这意味着,超过限制时,新的连接请求必须等待。 + +此外,Apache 使用 mod_php 模块将每一个连接加载到内存中,即使只有静态文件(图片,CSS,JavaScript 等)。这使得每个连接消耗更多的资源,从而限制了服务器的性能。 + +开始解决这些问题吧,从 LAMP 架构迁到 LEMP 架构 – 使用 NGINX 取代 Apache 。NGINX 仅消耗很少量的内存就能处理成千上万的并发连接数,所以你不必经历颠簸,也不必限制并发连接数。 + +NGINX 处理静态文件的性能也较好,它有内置的,简单的 [缓存][26] 控制策略。减少应用服务器的负载,你的网站的访问速度会更快,用户体验更好。 + +你可以在部署的所有 Web 服务器上使用 NGINX,或者你可以把一个 NGINX 服务器作为 Apache 的“前端”来进行反向代理 - NGINX 服务器接收客户端请求,将请求的静态文件直接返回,将 PHP 请求转发到 Apache 上进行处理。 + +对于动态页面的生成 - WordPress 核心体验 - 选择一个缓存工具,如 [技巧 2][27] 中描述的。在下面的技巧中,你可以看到 FastCGI,W3_Total_Cache 和 WP-Super-Cache 在 NGINX 上的配置示例。 (Hyper-Cache 和 Quick-Cache 不需要改变 NGINX 的配置。) + +**技巧** 缓存通常会被保存到磁盘上,但你可以用 [tmpfs][28] 将缓存放在内存中来提高性能。 + +为 WordPress 配置 NGINX 很容易。按照这四个步骤,其详细的描述在指定的技巧中: + +1.添加永久的支持 - 添加对 NGINX 的永久支持。此步消除了对 **.htaccess** 配置文件的依赖,这是 Apache 特有的。参见 [技巧 4][29] +2.配置缓存 - 选择一个缓存工具并安装好它。可选择的有 FastCGI cache,W3 Total Cache, WP Super Cache, Hyper Cache, 和 Quick Cache。请看技巧 [5][30], [6][31], 和 [7][32]. +3.落实安全防范措施 - 在 NGINX 上采用对 WordPress 最佳安全的做法。参见 [技巧 8][33]。 +4.配置 WordPress 多站点 - 如果你使用 WordPress 多站点,在 NGINX 下配置子目录,子域,或多个域的结构。见 [技巧9][34]。 + +### 技巧 4. 添加支持 NGINX 的链接 ### + +许多 WordPress 网站依靠 **.htaccess** 文件,此文件依赖 WordPress 的多个功能,包括永久支持,插件和文件缓存。NGINX 不支持 **.htaccess** 文件。幸运的是,你可以使用 NGINX 的简单而全面的配置文件来实现大部分相同的功能。 + +你可以在使用 NGINX 的 WordPress 中通过在主 [server][36] 块下添加下面的 location 块中启用 [永久链接][35]。(此 location 块在其他代码示例中也会被包括)。 + +**try_files** 指令告诉 NGINX 检查请求的 URL 在根目录下是作为文件(**$uri**)还是目录(**$uri/**),**/var/www/example.com/htdocs**。如果都不是,NGINX 将重定向到 **/index.php**,通过查询字符串参数判断是否作为参数。 + + server { + server_name example.com www.example.com; + root /var/www/example.com/htdocs; + index index.php; + + access_log /var/log/nginx/example.com.access.log; + error_log /var/log/nginx/example.com.error.log; + + location / { + try_files $uri $uri/ /index.php?$args; + } + } + +### 技巧 5. 在 NGINX 中配置 FastCGI ### + +NGINX 可以从 FastCGI 应用程序中缓存响应,如 PHP 响应。此方法可提供最佳的性能。 + +对于开源的 NGINX,第三方模块 [ngx_cache_purge][37] 提供了缓存清除能力,需要手动编译,配置代码如下所示。NGINX Plus 已经包含了此代码的实现。 + +当使用 FastCGI 时,我们建议你安装 [NGINX 辅助插件][38] 并使用下面的配置文件,尤其是要使用 **fastcgi_cache_key** 并且 location 块下要包括 **fastcgi_cache_purge**。当页面被发布或有改变时,甚至有新评论被发布时,该插件会自动清除你的缓存,你也可以从 WordPress 管理控制台手动清除。 + +NGINX 的辅助插件还可以添加一个简短的 HTML 代码到你网页的底部,确认缓存是否正常并显示一些统计工作。(你也可以使用 [$upstream_cache_status][39] 确认缓存功能是否正常。) + +fastcgi_cache_path /var/run/nginx-cache levels=1:2 + keys_zone=WORDPRESS:100m inactive=60m; +fastcgi_cache_key "$scheme$request_method$host$request_uri"; + + server { + server_name example.com www.example.com; + root /var/www/example.com/htdocs; + index index.php; + + access_log /var/log/nginx/example.com.access.log; + error_log /var/log/nginx/example.com.error.log; + + set $skip_cache 0; + + # POST 请求和查询网址的字符串应该交给 PHP + if ($request_method = POST) { + set $skip_cache 1; + } + + if ($query_string != "") { + set $skip_cache 1; + } + + #以下 uris 中包含的部分不缓存 + if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php + |sitemap(_index)?.xml") { + set $skip_cache 1; + } + + #用户不能使用缓存登录或缓存最近的评论 + if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass + |wordpress_no_cache|wordpress_logged_in") { + set $skip_cache 1; + } + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ \.php$ { + try_files $uri /index.php; + include fastcgi_params; + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_cache_bypass $skip_cache; + fastcgi_no_cache $skip_cache; + fastcgi_cache WORDPRESS; + fastcgi_cache_valid 60m; + } + + location ~ /purge(/.*) { + fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; + } + + location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png + |ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { + + access_log off; + log_not_found off; + expires max; + } + + location = /robots.txt { + access_log off; + log_not_found off; + } + + location ~ /\. { + deny all; + access_log off; + log_not_found off; + } + } + +### 技巧 6. 为 NGINX 配置 W3_Total_Cache ### + +[W3 Total Cache][40], 是 Frederick Townes 的 [W3-Edge][41] 下的, 是一个支持 NGINX 的 WordPress 缓存框架。其有众多选项配置,可以替代 FastCGI 缓存。 + +缓存插件提供了各种缓存配置,还包括数据库和对象的缓存,对 HTML,CSS 和 JavaScript,可选择性的与流行的 CDN 整合。 + +使用插件时,需要将其配置信息写入位于你的域的根目录的 NGINX 配置文件中。 + + server { + server_name example.com www.example.com; + + root /var/www/example.com/htdocs; + index index.php; + access_log /var/log/nginx/example.com.access.log; + error_log /var/log/nginx/example.com.error.log; + + include /path/to/wordpress/installation/nginx.conf; + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ \.php$ { + try_files $uri =404; + include fastcgi_params; + fastcgi_pass unix:/var/run/php5-fpm.sock; + } + } + +### 技巧 7. 为 NGINX 配置 WP Super Cache ### + +[WP Super Cache][42] 是由 Donncha O Caoimh 完成的, [Automattic][43] 上的一个 WordPress 开发者, 这是一个 WordPress 缓存引擎,它可以将 WordPress 的动态页面转变成静态 HTML 文件,以使 NGINX 可以很快的提供服务。它是第一个 WordPress 缓存插件,和其他的相比,它更专注于某一特定的领域。 + +配置 NGINX 使用 WP Super Cache 可以根据你的喜好而进行不同的配置。以下是一个示例配置。 + +在下面的配置中,location 块中使用了名为 WP Super Cache 的超级缓存中部分配置来工作。代码的其余部分是根据 WordPress 的规则不缓存用户登录信息,不缓存 POST 请求,并对静态资源设置过期首部,再加上标准的 PHP 实现;这部分可以进行定制,来满足你的需求。 + + + server { + server_name example.com www.example.com; + root /var/www/example.com/htdocs; + index index.php; + + access_log /var/log/nginx/example.com.access.log; + error_log /var/log/nginx/example.com.error.log debug; + + set $cache_uri $request_uri; + + # POST 请求和查询网址的字符串应该交给 PHP + if ($request_method = POST) { + set $cache_uri 'null cache'; + } + if ($query_string != "") { + set $cache_uri 'null cache'; + } + + #以下 uris 中包含的部分不缓存 + if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php + |wp-.*.php|/feed/|index.php|wp-comments-popup.php + |wp-links-opml.php|wp-locations.php |sitemap(_index)?.xml + |[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { + + set $cache_uri 'null cache'; + } + + #用户不能使用缓存登录或缓存最近的评论 + if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+ + |wp-postpass|wordpress_logged_in") { + set $cache_uri 'null cache'; + } + + #当请求的文件存在时使用缓存,否则将请求转发给WordPress + location / { + try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html + $uri $uri/ /index.php; + } + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location = /robots.txt { + log_not_found off + access_log off; + } + + location ~ .php$ { + try_files $uri /index.php; + include fastcgi_params; + fastcgi_pass unix:/var/run/php5-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + } + + # 尽可能的缓存静态文件 + location ~*.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css + |rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2 + |doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ { + expires max; + log_not_found off; + access_log off; + } + } + +### 技巧 8. 为 NGINX 配置安全防范措施 ### + +为了防止攻击,可以控制对关键资源的访问以及当机器超载时进行登录限制。 + +只允许特定的 IP 地址访问 WordPress 的仪表盘。 + + #对访问 WordPress 的仪表盘进行限制 + location /wp-admin { + deny 192.192.9.9; + allow 192.192.1.0/24; + allow 10.1.1.0/16; + deny all; + } + +只允许上传特定类型的文件,以防止恶意代码被上传和运行。 + + #当上传的不是图像,视频,音乐等时,拒绝访问。 + location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php|js|swf)$ { + deny all; + } + +拒绝其他人访问 WordPress 的配置文件 **wp-config.php**。拒绝其他人访问的另一种方法是将该文件的一个目录移到域的根目录下。 + + # 拒绝其他人访问 wp-config.php + location ~* wp-config.php { + deny all; + } + +对 **wp-login.php** 进行限速来防止暴力攻击。 + + # 拒绝访问 wp-login.php + location = /wp-login.php { + limit_req zone=one burst=1 nodelay; + fastcgi_pass unix:/var/run/php5-fpm.sock; + #fastcgi_pass 127.0.0.1:9000; + } + +### 技巧 9. 配置 NGINX 支持 WordPress 多站点 ### + +WordPress 多站点,顾名思义,使用同一个版本的 WordPress 从单个实例中允许你管理两个或多个网站。[WordPress.com][44] 运行的就是 WordPress 多站点,其主机为成千上万的用户提供博客服务。 + +你可以从单个域的任何子目录或从不同的子域来运行独立的网站。 + +使用此代码块添加对子目录的支持。 + + # 在 WordPress 中添加支持子目录结构的多站点 + if (!-e $request_filename) { + rewrite /wp-admin$ $scheme://$host$uri/ permanent; + rewrite ^(/[^/]+)?(/wp-.*) $2 last; + rewrite ^(/[^/]+)?(/.*\.php) $2 last; + } + +使用此代码块来替换上面的代码块以添加对子目录结构的支持,子目录名自定义。 + + # 添加支持子域名 + server_name example.com *.example.com; + +旧版本(3.4以前)的 WordPress 多站点使用 readfile() 来提供静态内容。然而,readfile() 是 PHP 代码,它会导致在执行时性能会显著降低。我们可以用 NGINX 来绕过这个非必要的 PHP 处理。该代码片段在下面被(==============)线分割出来了。 + + # 避免 PHP readfile() 在 /blogs.dir/structure 子目录中 + location ^~ /blogs.dir { + internal; + alias /var/www/example.com/htdocs/wp-content/blogs.dir; + access_log off; + log_not_found off; + expires max; + } + + ============================================================ + + # 避免 PHP readfile() 在 /files/structure 子目录中 + location ~ ^(/[^/]+/)?files/(?.+) { + try_files /wp-content/blogs.dir/$blogid/files/$rt_file /wp-includes/ms-files.php?file=$rt_file; + access_log off; + log_not_found off; + expires max; + } + + ============================================================ + + # WPMU 文件结构的子域路径 + location ~ ^/files/(.*)$ { + try_files /wp-includes/ms-files.php?file=$1 =404; + access_log off; + log_not_found off; + expires max; + } + + ============================================================ + + # 地图博客 ID 在特定的目录下 + map $http_host $blogid { + default 0; + example.com 1; + site1.example.com 2; + site1.com 2; + } + +### 结论 ### + +可扩展性对许多站点的开发者来说是一项挑战,因为这会让他们在 WordPress 站点中取得成功。(对于那些想要跨越 WordPress 性能问题的新站点。)为 WordPress 添加缓存,并将 WordPress 和 NGINX 结合,是不错的答案。 + +NGINX 不仅对 WordPress 网站是有用的。世界上排名前 1000,10,000和100,000网站中 NGINX 也是作为 [领先的 web 服务器][45] 被使用。 + +欲了解更多有关 NGINX 的性能,请看我们最近的博客,[关于 10x 应用程序的 10 个技巧][46]。 + +NGINX 软件有两个版本: + +- NGINX 开源的软件 - 像 WordPress 一样,此软件你可以自行下载,配置和编译。 +- NGINX Plus - NGINX Plus 包括一个预构建的参考版本的软件,以及服务和技术支持。 + +想要开始,先到 [nginx.org][47] 下载开源软件并了解下 [NGINX Plus][48]。 + +-------------------------------------------------------------------------------- + +via: https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/ + +作者:[Floyd Smith][a] +译者:[strugglingyouth](https://github.com/strugglingyouth) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.nginx.com/blog/author/floyd/ +[1]:http://w3techs.com/technologies/overview/content_management/all +[2]:https://www.nginx.com/press/choosing-nginx-growth-wordpresscom/ +[3]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#cache-static +[4]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#cache-dynamic +[5]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx +[6]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#permalink +[7]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#fastcgi +[8]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#w3-total-cache +[9]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#wp-super-cache +[10]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#security +[11]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#multisite +[12]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx +[13]:http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/ +[14]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx +[15]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#lamp +[16]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#adopt-nginx +[17]:https://wordpress.org/plugins/hyper-cache/ +[18]:https://wordpress.org/plugins/quick-cache/ +[19]:https://wordpress.org/plugins/wp-super-cache/ +[20]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#wp-super-cache +[21]:https://wordpress.org/plugins/w3-total-cache/ +[22]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#w3-total-cache +[23]:http://www.fastcgi.com/ +[24]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#fastcgi +[25]:https://css-tricks.com/wordpress-fragment-caching-revisited/ +[26]:https://www.nginx.com/resources/admin-guide/content-caching/ +[27]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#cache-dynamic +[28]:https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt +[29]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#permalink +[30]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#fastcgi +[31]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#w3-total-cache +[32]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#wp-super-cache +[33]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#security +[34]:https://www.nginx.com/blog/9-tips-for-improving-wordpress-performance-with-nginx/#multisite +[35]:http://codex.wordpress.org/Using_Permalinks +[36]:http://nginx.org/en/docs/http/ngx_http_core_module.html#server +[37]:https://github.com/FRiCKLE/ngx_cache_purge +[38]:https://wordpress.org/plugins/nginx-helper/ +[39]:http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables +[40]:https://wordpress.org/plugins/w3-total-cache/ +[41]:http://www.w3-edge.com/ +[42]:https://wordpress.org/plugins/wp-super-cache/ +[43]:http://automattic.com/ +[44]:https://wordpress.com/ +[45]:http://w3techs.com/technologies/cross/web_server/ranking +[46]:https://www.nginx.com/blog/10-tips-for-10x-application-performance/ +[47]:http://www.nginx.org/en +[48]:https://www.nginx.com/products/ +[49]: +[50]: From e1d0e4a8cea07e8cfc2e2afa5390c4809b3c32c1 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Sat, 14 Nov 2015 11:23:35 +0800 Subject: [PATCH 2443/2517] =?UTF-8?q?20151114-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Continuous Integration Service in Linux.md | 317 ++++++++++++++++++ 1 file changed, 317 insertions(+) create mode 100644 sources/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md diff --git a/sources/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md b/sources/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md new file mode 100644 index 0000000000..bfcf1e3ae3 --- /dev/null +++ b/sources/tech/20151114 How to Setup Drone - a Continuous Integration Service in Linux.md @@ -0,0 +1,317 @@ +How to Setup Drone - a Continuous Integration Service in Linux +============================================================== + +Are you tired of cloning, building, testing, and deploying codes time and again? If yes, switch to continuous integration. Continuous Integration aka CI is practice in software engineering of making frequent commits to the code base, building, testing and deploying as we go. CI helps to quickly integrate new codes into the existing code base. If this process is made automated, then this will speed up the development process as it reduces the time taken for the developer to build and test things manually. [Drone][1] is a free and open source project which provides an awesome environment of continuous integration service and is released under Apache License Version 2.0. It integrates with many repository providers like Github, Bitbucket and Google Code and has the ability to pull codes from the repositories enabling us to build the source code written in number of languages including PHP, Node, Ruby, Go, Dart, Python, C/C++, JAVA and more. It is made such a powerful platform cause it uses containers and docker technology for every build making users a complete control over their build environment with guaranteed isolation. + +### 1. Installing Docker ### + +First of all, we'll gonna install Docker as its the most vital element for the complete workflow of Drone. Drone does a proper utilization of docker for the purpose of building and testing application. This container technology speeds up the development of the applications. To install docker, we'll need to run the following commands with respective the distribution of linux. In this tutorial, we'll cover the steps with Ubuntu 14.04 and CentOS 7 linux distributions. + +#### On Ubuntu #### + +To install Docker in Ubuntu, we can simply run the following commands in a terminal or console. + + # apt-get update + # apt-get install docker.io + +After the installation is done, we'll restart our docker engine using service command. + + # service docker restart + +Then, we'll make docker start automatically in every system boot. + + # update-rc.d docker defaults + + Adding system startup for /etc/init.d/docker ... + /etc/rc0.d/K20docker -> ../init.d/docker + /etc/rc1.d/K20docker -> ../init.d/docker + /etc/rc6.d/K20docker -> ../init.d/docker + /etc/rc2.d/S20docker -> ../init.d/docker + /etc/rc3.d/S20docker -> ../init.d/docker + /etc/rc4.d/S20docker -> ../init.d/docker + /etc/rc5.d/S20docker -> ../init.d/docker + +#### On CentOS #### + +First, we'll gonna update every packages installed in our centos machine. We can do that by running the following command. + + # sudo yum update + +To install docker in centos, we can simply run the following commands. + + # curl -sSL https://get.docker.com/ | sh + +After our docker engine is installed in our centos machine, we'll simply start it by running the following systemd command as systemd is the default init system in centos 7. + + # systemctl start docker + +Then, we'll enable docker to start automatically in every system startup. + + # systemctl enable docker + + ln -s '/usr/lib/systemd/system/docker.service' '/etc/systemd/system/multi-user.target.wants/docker.service' + +### 2. Installing SQlite Driver ### + +It uses SQlite3 database server for storing its data and information by default. It will automatically create a database file named drone.sqlite under /var/lib/drone/ which will handle database schema setup and migration. To setup SQlite3 drivers, we'll need to follow the below steps. + +#### On Ubuntu 14.04 #### + +As SQlite3 is available on the default respository of Ubuntu 14.04, we'll simply install it by running the following apt command. + + # apt-get install libsqlite3-dev + +#### On CentOS 7 #### + +To install it on CentOS 7 machine, we'll need to run the following yum command. + + # yum install sqlite-devel + +### 3. Installing Drone ### + +Finally, after we have installed those dependencies successfully, we'll now go further towards the installation of drone in our machine. In this step, we'll simply download the binary package of it from the official download link of the respective binary formats and then install them using the default package manager. + +#### On Ubuntu #### + +We'll use wget to download the debian package of drone for ubuntu from the [official Debian file download link][2]. Here is the command to download the required debian package of drone. + + # wget downloads.drone.io/master/drone.deb + + Resolving downloads.drone.io (downloads.drone.io)... 54.231.48.98 + Connecting to downloads.drone.io (downloads.drone.io)|54.231.48.98|:80... connected. + HTTP request sent, awaiting response... 200 OK + Length: 7722384 (7.4M) [application/x-debian-package] + Saving to: 'drone.deb' + 100%[======================================>] 7,722,384 1.38MB/s in 17s + 2015-11-06 14:09:28 (456 KB/s) - 'drone.deb' saved [7722384/7722384] + +After its downloaded, we'll gonna install it with dpkg package manager. + + # dpkg -i drone.deb + + Selecting previously unselected package drone. + (Reading database ... 28077 files and directories currently installed.) + Preparing to unpack drone.deb ... + Unpacking drone (0.3.0-alpha-1442513246) ... + Setting up drone (0.3.0-alpha-1442513246) ... + Your system ubuntu 14: using upstart to control Drone + drone start/running, process 9512 + +#### On CentOS #### + +In the machine running CentOS, we'll download the RPM package from the [official download link for RPM][3] using wget command as shown below. + + # wget downloads.drone.io/master/drone.rpm + + --2015-11-06 11:06:45-- http://downloads.drone.io/master/drone.rpm + Resolving downloads.drone.io (downloads.drone.io)... 54.231.114.18 + Connecting to downloads.drone.io (downloads.drone.io)|54.231.114.18|:80... connected. + HTTP request sent, awaiting response... 200 OK + Length: 7763311 (7.4M) [application/x-redhat-package-manager] + Saving to: ‘drone.rpm’ + 100%[======================================>] 7,763,311 1.18MB/s in 20s + 2015-11-06 11:07:06 (374 KB/s) - ‘drone.rpm’ saved [7763311/7763311] + +Then, we'll install the download rpm package using yum package manager. + + # yum localinstall drone.rpm + +### 4. Configuring Port ### + +After the installation is completed, we'll gonna configure drone to make it workable. The configuration of drone is inside **/etc/drone/drone.toml** file. By default, drone web interface is exposed under port 80 which is the default port of http, if we wanna change it, we can change it by replacing the value under server block as shown below. + + [server] + port=":80" + +### 5. Integrating Github ### + +In order to run Drone we must setup at least one integration points between GitHub, GitHub Enterprise, Gitlab, Gogs, Bitbucket. In this tutorial, we'll only integrate github but if we wanna integrate other we can do that from the configuration file. In order to integrate github, we'll need to create a new application in our [github settings][4]. + +![Registering App Github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-app-github.png) + +To create, we'll need to click on Register a New Application then fill out the form as shown in the following image. + +![Registering OAuth app github](http://blog.linoxide.com/wp-content/uploads/2015/11/registering-OAuth-app-github.png) + +We should make sure that **Authorization callback URL** looks like http://drone.linoxide.com/api/auth/github.com under the configuration of the application. Then, we'll click on Register application. After done, we'll note the Client ID and Client Secret key as we'll need to configure it in our drone configuration. + +![Client ID and Secret Token](http://blog.linoxide.com/wp-content/uploads/2015/11/client-id-secret-token.png) + +After thats done, we'll need to edit our drone configuration using a text editor by running the following command. + + # nano /etc/drone/drone.toml + +Then, we'll find the [github] section and append the section with the above noted configuration as shown below. + + [github] + client="3dd44b969709c518603c" + secret="4ee261abdb431bdc5e96b19cc3c498403853632a" + # orgs=[] + # open=false + +![Configuring Github Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-github-drone-e1446835124465.png) + +### 6. Configuring SMTP server ### + +If we wanna enable drone to send notifications via emails, then we'll need to specify the SMTP configuration of our SMTP server. If we already have an SMTP server, we can use its configuration but as we don't have an SMTP server, we'll need to install an MTA ie Postfix and then specify the SMTP configuration in the drone configuration. + +#### On Ubuntu #### + +We can install postfix in ubuntu by running the following apt command. + + # apt-get install postfix + +#### On CentOS #### + +We can install postfix in CentOS by running the following yum command. + + # yum install postfix + +After installing, we'll need to edit the configuration of our postfix configuration using a text editor. + + # nano /etc/postfix/main.cf + +Then, we'll need to replace the value of myhostname parameter to our FQDN ie drone.linoxide.com . + + myhostname = drone.linoxide.com + +Now, we'll gonna finally configure the SMTP section of our drone configuration file. + + # nano /etc/drone/drone.toml + +Then, we'll find the [stmp] section and then we'll need to append the setting as follows. + + [smtp] + host = "drone.linoxide.com" + port = "587" + from = "root@drone.linoxide.com" + user = "root" + pass = "password" + +![Configuring SMTP Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/configuring-smtp-drone.png) + +Note: Here, **user** and **pass** parameters are strongly recommended to be changed according to one's user configuration. + +### 7. Configuring Worker ### + +As we know that drone utilizes docker for its building and testing task, we'll need to configure docker as the worker for our drone. To do so, we'll need to edit the [worker] section in the drone configuration file. + + # nano /etc/drone/drone.toml + +Then, we'll uncomment the following lines and append as shown below. + + [worker] + nodes=[ + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock" + ] + +Here, we have set only 2 node which means the above configuration is capable of executing only 2 build at a time. In order to increase concurrency, we can increase the number of nodes. + + [worker] + nodes=[ + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock", + "unix:///var/run/docker.sock" + ] + +Here, in the above configuration, drone is configured to process four builds at a time, using the local docker daemon. + +### 8. Restarting Drone ### + +Finally, after everything is done regarding the installation and configuration, we'll now start our drone server in our linux machine. + +#### On Ubuntu #### + +To start drone in our Ubuntu 14.04 machine, we'll simply run service command as the default init system of Ubuntu 14.04 is SysVinit. + + # service drone restart + +To make drone start automatically in every boot of the system, we'll run the following command. + + # update-rc.d drone defaults + +#### On CentOS #### + +To start drone in CentOS machine, we'll simply run systemd command as CentOS 7 is shipped with systemd as init system. + + # systemctl restart drone + +Then, we'll enable drone to start automatically in every system boot. + + # systemctl enable drone + +### 9. Allowing Firewalls ### + +As we know drone utilizes port 80 by default and we haven't changed the port, we'll gonna configure our firewall programs to allow port 80 (http) and be accessible from other machines in the network. + +#### On Ubuntu 14.04 #### + +Iptables is a popular firewall program which is installed in the ubuntu distributions by default. We'll make iptables to expose port 80 so that we can make our Drone web interface accessible in the network. + + # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT + # /etc/init.d/iptables save + +#### On CentOS 7 #### + +As CentOS 7 has systemd installed by default, it contains firewalld running as firewall problem. In order to open the port 80 (http service) on firewalld, we'll need to execute the following commands. + + # firewall-cmd --permanent --add-service=http + + success + + # firewall-cmd --reload + + success + +### 10. Accessing Web Interface ### + +Now, we'll gonna open the web interface of drone using our favourite web browser. To do so, we'll need to point our web browser to our machine running drone in it. As the default port of drone is 80 and we have also set 80 in this tutorial, we'll simply point our browser to http://ip-address/ or http://drone.linoxide.com according to our configuration. After we have done that correctly, we'll see the first page of it having options to login into our dashboard. + +![Login Github Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/login-github-drone-e1446834688394.png) + +As we have configured Github in the above step, we'll simply select github and we'll go through the app authentication process and after its done, we'll be forwarded to our Dashboard. + +![Drone Dashboard](http://blog.linoxide.com/wp-content/uploads/2015/11/drone-dashboard.png) + +Here, it will synchronize all our github repository and will ask us to activate the repo which we want to build with drone. + +![Activate Repository](http://blog.linoxide.com/wp-content/uploads/2015/11/activate-repository-e1446835574595.png) + +After its activated, it will ask us to add a new file named .drone.yml in our repository and define the build process and configuration in that file like which image to fetch and which command/script to run while compiling, etc. + +We'll need to configure our .drone.yml as shown below. + + image: python + script: + - python helloworld.py + - echo "Build has been completed." + +After its done, we'll be able to build our application using the configuration YAML file .drone.yml in our drone appliation. All the commits made into the repository is synced in realtime. It automatically syncs the commit and changes made to the repository. Once the commit is made in the repository, build is automatically started in our drone application. + +![Building Application Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/building-application-drone.png) + +After the build is completed, we'll be able to see the output of the build with the output console. + +![Build Success Drone](http://blog.linoxide.com/wp-content/uploads/2015/11/build-success-drone.png) + +### Conclusion ### + +In this article, we learned to completely setup a workable Continuous Intergration platform with Drone. If we want, we can even get started with the services provided by the official Drone.io project. We can start with free service or paid service according to our requirements. It has changed the world of Continuous integration with its beautiful web interface and powerful bunches of features. It has the ability to integrate with many third party applications and deployment platforms. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/ + +作者:[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/ +[1]:https://drone.io/ +[2]:http://downloads.drone.io/master/drone.deb +[3]:http://downloads.drone.io/master/drone.rpm +[4]:https://github.com/settings/developers From 3c77befcc04b875045ce042fd3cd24f676387771 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 14 Nov 2015 12:20:30 +0000 Subject: [PATCH 2444/2517] Update 20151012 How to Setup DockerUI--a Web Interface for Docker.md --- ...up DockerUI--a Web Interface for Docker.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md b/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md index e3e60aa8c2..c6ab5ec073 100644 --- a/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md +++ b/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md @@ -2,65 +2,65 @@ translating by Ezio 在浏览器上使用Docker ================================================================================ -Docker is getting more popularity day by day. The idea of running a complete Operating System inside a container rather than running inside a virtual machine is an awesome technology. Docker has made lives of millions of system administrators and developers pretty easy for getting their work done in no time. It is an open source technology that provides an open platform to pack, ship, share and run any application as a lightweight container without caring on which operating system we are running on the host. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. Running docker containers and managing them may come a bit difficult and time consuming, so there is a web based application named DockerUI which is make managing and running container pretty simple. DockerUI is highly beneficial to people who are not much aware of linux command lines and want to run containerized applications. DockerUI is an open source web based application best known for its beautiful design and ease simple interface for running and managing docker containers. +Docker 越来越流行了。在一个容器里面而不是虚拟机里运行一个完整的操作系统的这种是一个非常棒的技术和想法。docker 已经通过节省工作时间来拯救了千上万的系统管理员和开发人员。这是一个开源技术,提供一个平台来把应用程序当作容器来打包、分发、共享和运行,而不去关注主机上运行的操作系统是什么。它没有开发语言、框架或打包系统的限制,并且可以在任何时间、任何地点运行,从小型计算机到高端服务器都可以。运行docker容器和管理他们可能会花费一点点困难和时间,所以现在有一款基于web 的应用程序-DockerUI,可以让管理和运行容器变得很简单。DockerUI 是一个对那些不熟悉Linux 命令行担忧很想运行容器话程序的人很有帮助。DockerUI 是一个开源的基于web 的应用程序,它最著名的是它华丽的设计和简单的用来运行和管理docker 的简单的操作界面。 -Here are some easy steps on how we can setup Docker Engine with DockerUI in our linux machine. +下面会介绍如何在Linux 上安装配置DockerUI。 ### 1. 安装docker ### -First of all, we'll gonna install docker engine in our linux machine. Thanks to its developers, docker is very easy to install in any major linux distribution. To install docker engine, we'll need to run the following command with respect to which distribution we are running. +首先,我们需要安装docker。我们得感谢docker 的开发者,让我们可以简单的在主流linux 发行版上安装docker。为了安装docker,我们得在对应的发行版上使用下面的命令。 #### Ubuntu/Fedora/CentOS/RHEL/Debian #### -Docker maintainers have written an awesome script that can be used to install docker engine in Ubuntu 15.04/14.10/14.04, CentOS 6.x/7, Fedora 22, RHEL 7 and Debian 8.x distributions of linux. This script recognizes the distribution of linux installed in our machine, then adds the required repository to the filesystem, updates the local repository index and finally installs docker engine and required dependencies from it. To install docker engine using that script, we'll need to run the following command under root or sudo mode. +docker 维护者已经写了一个非常棒的脚本,用它可以在Ubuntu 15.04/14.10/14.04, CentOS 6.x/7, Fedora 22, RHEL 7 和Debian 8.x 这几个linux 发行版上安装docker。这个脚本可以识别出我们的机器上运行的linux 的发行版本,然后将需要的源库添加到文件系统、更新本地的安装源目录,最后安装docker 和依赖库。要使用这个脚本安装docker,我们需要在root 用户或者sudo 权限下运行如下的命令, # curl -sSL https://get.docker.com/ | sh #### OpenSuse/SUSE Linux 企业版 #### -To install docker engine in the machine running OpenSuse 13.1/13.2 or SUSE Linux Enterprise Server 12, we'll simply need to execute the zypper command. We'll gonna install docker using zypper command as the latest docker engine is available on the official repository. To do so, we'll run the following command under root/sudo mode. +要在运行了OpenSuse 13.1/13.2 或者 SUSE Linux Enterprise Server 12 的机器上安装docker,我们只需要简单的执行zypper 命令。运行下面的命令就可以安装最新版本的docker: # zypper in docker #### ArchLinux #### -Docker is available in the official repository of Archlinux as well as in the AUR packages maintained by the community. So, we have two options to install docker in archlinux. To install docker using the official arch repository, we'll need to run the following pacman command. +docker 存在于ArchLinux 的官方源和社区维护的AUR 库。所以在ArchLinux 上我们有两条路来安装docker。使用官方源安装,需要执行下面的pacman 命令: # pacman -S docker -But if we want to install docker from the Archlinux User Repository ie AUR, then we'll need to execute the following command. +如果要从社区源 AUR 安装docker,需要执行下面的命令: # yaourt -S docker-git ### 2. 启动 ### -After docker is installed, we'll now gonna start our docker daemon so that we can run docker containers and manage them. We'll run the following command to make sure that docker daemon is installed and to start the docker daemon. +安装好docker 之后,我们需要运行docker 监护程序,然后再能运行并管理docker 容器。我们需要使用下列命令来确定docker 监护程序已经安装并运行了。 -#### On SysVinit #### +#### 在 SysVinit 上#### # service docker start -#### On Systemd #### +#### 在Systemd 上#### # systemctl start docker ### 3. 安装DockerUI ### -Installing DockerUI is pretty easy than installing docker engine. We just need to pull the dockerui from the Docker Registry Hub and run it inside a container. To do so, we'll simply need to run the following command. +安装DockerUI 比安装docker 要简单很多。我们仅仅需要懂docker 注册表上拉取dockerui ,然后在容器里面运行。要完成这些,我们只需要简单的执行下面的命令: # docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock dockerui/dockerui ![Starting DockerUI Container](http://blog.linoxide.com/wp-content/uploads/2015/09/starting-dockerui-container.png) -Here, in the above command, as the default port of the dockerui web application server 9000, we'll simply map the default port of it with -p flag. With -v flag, we specify the docker socket. The --privileged flag is required for hosts using SELinux. +在上面的命令里,dockerui 使用的默认端口是9000,我们需要使用`-p` 命令映射默认端口。使用`-v` 标志我们可以指定docker socket。如果主机使用了SELinux那么就得使用`--privileged` 标志。 -After executing the above command, we'll now check if the dockerui container is running or not by running the following command. +执行完上面的命令后,我们要检查dockerui 容器是否运行了,或者使用下面的命令检查: # docker ps ![Running Docker Containers](http://blog.linoxide.com/wp-content/uploads/2015/09/running-docker-containers.png) -### 4. Pulling an Image ### +### 4. 拉取docker镜像 ### Currently, we cannot pull an image directly from DockerUI so, we'll need to pull a docker image from the linux console/terminal. To do so, we'll need to run the following command. From 3cbb3f68f78ad2d9b566c75b9a73e24f373a7c52 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 14 Nov 2015 13:16:03 +0000 Subject: [PATCH 2445/2517] Update 20151012 How to Setup DockerUI--a Web Interface for Docker.md --- ...tup DockerUI--a Web Interface for Docker.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md b/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md index c6ab5ec073..52d63d6ac9 100644 --- a/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md +++ b/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md @@ -1,5 +1,3 @@ -translating by Ezio - 在浏览器上使用Docker ================================================================================ Docker 越来越流行了。在一个容器里面而不是虚拟机里运行一个完整的操作系统的这种是一个非常棒的技术和想法。docker 已经通过节省工作时间来拯救了千上万的系统管理员和开发人员。这是一个开源技术,提供一个平台来把应用程序当作容器来打包、分发、共享和运行,而不去关注主机上运行的操作系统是什么。它没有开发语言、框架或打包系统的限制,并且可以在任何时间、任何地点运行,从小型计算机到高端服务器都可以。运行docker容器和管理他们可能会花费一点点困难和时间,所以现在有一款基于web 的应用程序-DockerUI,可以让管理和运行容器变得很简单。DockerUI 是一个对那些不熟悉Linux 命令行担忧很想运行容器话程序的人很有帮助。DockerUI 是一个开源的基于web 的应用程序,它最著名的是它华丽的设计和简单的用来运行和管理docker 的简单的操作界面。 @@ -62,41 +60,41 @@ docker 存在于ArchLinux 的官方源和社区维护的AUR 库。所以在ArchL ### 4. 拉取docker镜像 ### -Currently, we cannot pull an image directly from DockerUI so, we'll need to pull a docker image from the linux console/terminal. To do so, we'll need to run the following command. +现在我们还不能直接使用dockerui 拉取镜像,所以我们需要在命令行下拉取docker 镜像。要完成这些我们需要执行下面的命令。 # docker pull ubuntu ![Docker Image Pull](http://blog.linoxide.com/wp-content/uploads/2015/10/docker-image-pull.png) -The above command will pull an image tagged as ubuntu from the official [Docker Hub][1]. Similarly, we can pull more images that we require and are available in the hub. +上面的命令将会从docker 官方源[Docker Hub][1]拉取一个标志为ubuntu 的镜像。类似的我们可以从Hub 拉取需要的其它镜像。 ### 4. 管理 ### -After we have started the dockerui container, we'll now have fun with it to start, pause, stop, remove and perform many possible activities featured by dockerui with docker containers and images. First of all, we'll need to open the web application using our web browser. To do so, we'll need to point our browser to http://ip-address:9000 or http://mydomain.com:9000 according to the configuration of our system. By default, there is no login authentication needed for the user access but we can configure our web server for adding authentication. To start a container, first we'll need to have images of the required application we want to run a container with. +启动了dockerui 容器之后,我们快乐的用它来执行启动、暂停、终止、删除和其它dockerui 提供的其他用来操作docker 容器的命令。第一,我们需要在web 浏览器里面打开dockerui:在浏览器里面输入http://ip-address:9000 或者 http://mydomain.com:9000,具体要根据你的系统配置。默认情况下登录不需啊哟认证,但是可以配置我们的web 服务器来要求登录认证。要启动一个容器,我们得得到包含我们要运行的程序的景象。 #### 创建 #### -To create a container, we'll need to go to the section named Images then, we'll need to click on the image id which we want to create a container of. After clicking on the required image id, we'll need to click on Create button then we'll be asked to enter the required properties for our container. And after everything is set and done. We'll need to click on Create button to finally create a container. +创建容器我们需要在Images 页面,点击我们想创建的容器的镜像id。然后点击`Create` 按钮,接下来我们就会被要求输入创建容器所需要的属性。这些都完成之后,我们需要点击按钮`Create` 完成最终的创建。 ![Creating Docker Container](http://blog.linoxide.com/wp-content/uploads/2015/10/creating-docker-container.png) #### 中止 #### -To stop a container, we'll need to move towards the Containers page and then select the required container we want to stop. Now, we'll want to click on Stop option which we can see under Actions drop-down menu. +要停止一个容器,我们只需要跳转到`Containers` 页面,然后选取要停止的容器。然后再Action 的子菜单里面按下Stop 就行了。 ![Managing Container](http://blog.linoxide.com/wp-content/uploads/2015/10/managing-container.png) #### 暂停与恢复 #### -To pause a container, we simply select the required container we want to pause by keeping a check mark on the container and then click the Pause option under Actions . This is will pause the running container and then, we can simply resume the container by selecting Unpause option from the Actions drop down menu. +要暂停一个容器,只需要简单的选取目标容器,然后点击Pause 就行了。恢复一个容器只需要在Actions 的子菜单里面点击Unpause 就行了。 #### 删除 #### -Like we had performed the above tasks, its pretty easy to kill and remove a container or an image. We just need to check/select the required container or image and then select the Kill or Remove button from the application according to our need. +类似于我们上面完成的任务,杀掉或者删除一个容器或镜像也是很简单的。只需要检查、选择容器或镜像,然后点击Kill 或者Remove 就行了。 ### 结论 ### -DockerUI is a beautiful utilization of Docker Remote API to develop an awesome web interface for managing docker containers. The developers have designed and developed this application in pure HTML and JS language. It is currently incomplete and is under heavy development so we don't recommend it for the use in production currently. It makes users pretty easy to manage their containers and images with simple clicks without needing to execute lines of commands to do small jobs. If we want to contribute DockerUI, we can simply visit its [Github Repository][2]. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! +dockerui 使用了docker 远程API 完成了一个很棒的管理docker 容器的web 界面。它的开发者们已经使用纯HTML 和JS 设计、开发了这个应用。目前这个程序还处于开发中,并且还有大量的工作要完成,所以我们并不推荐将它应用在生产环境。它可以帮助用户简单的完成管理容器和镜像,而且只需要一点点工作。如果想参与、贡献dockerui,我们可以访问它们的[Github 仓库][2]。如果有问题、建议、反馈,请写在下面的评论框,这样我们就可以修改或者更新我们的内容。谢谢。 -------------------------------------------------------------------------------- From 1977b54c820b458153583996765d53fc1e157029 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 14 Nov 2015 13:18:05 +0000 Subject: [PATCH 2446/2517] Create 20151012 How to Setup DockerUI--a Web Interface for Docker.md --- ...up DockerUI--a Web Interface for Docker.md | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 translated/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md diff --git a/translated/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md b/translated/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md new file mode 100644 index 0000000000..52d63d6ac9 --- /dev/null +++ b/translated/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md @@ -0,0 +1,111 @@ +在浏览器上使用Docker +================================================================================ +Docker 越来越流行了。在一个容器里面而不是虚拟机里运行一个完整的操作系统的这种是一个非常棒的技术和想法。docker 已经通过节省工作时间来拯救了千上万的系统管理员和开发人员。这是一个开源技术,提供一个平台来把应用程序当作容器来打包、分发、共享和运行,而不去关注主机上运行的操作系统是什么。它没有开发语言、框架或打包系统的限制,并且可以在任何时间、任何地点运行,从小型计算机到高端服务器都可以。运行docker容器和管理他们可能会花费一点点困难和时间,所以现在有一款基于web 的应用程序-DockerUI,可以让管理和运行容器变得很简单。DockerUI 是一个对那些不熟悉Linux 命令行担忧很想运行容器话程序的人很有帮助。DockerUI 是一个开源的基于web 的应用程序,它最著名的是它华丽的设计和简单的用来运行和管理docker 的简单的操作界面。 + +下面会介绍如何在Linux 上安装配置DockerUI。 + +### 1. 安装docker ### + +首先,我们需要安装docker。我们得感谢docker 的开发者,让我们可以简单的在主流linux 发行版上安装docker。为了安装docker,我们得在对应的发行版上使用下面的命令。 + +#### Ubuntu/Fedora/CentOS/RHEL/Debian #### + +docker 维护者已经写了一个非常棒的脚本,用它可以在Ubuntu 15.04/14.10/14.04, CentOS 6.x/7, Fedora 22, RHEL 7 和Debian 8.x 这几个linux 发行版上安装docker。这个脚本可以识别出我们的机器上运行的linux 的发行版本,然后将需要的源库添加到文件系统、更新本地的安装源目录,最后安装docker 和依赖库。要使用这个脚本安装docker,我们需要在root 用户或者sudo 权限下运行如下的命令, + + # curl -sSL https://get.docker.com/ | sh + +#### OpenSuse/SUSE Linux 企业版 #### + +要在运行了OpenSuse 13.1/13.2 或者 SUSE Linux Enterprise Server 12 的机器上安装docker,我们只需要简单的执行zypper 命令。运行下面的命令就可以安装最新版本的docker: + + # zypper in docker + +#### ArchLinux #### + +docker 存在于ArchLinux 的官方源和社区维护的AUR 库。所以在ArchLinux 上我们有两条路来安装docker。使用官方源安装,需要执行下面的pacman 命令: + + # pacman -S docker + +如果要从社区源 AUR 安装docker,需要执行下面的命令: + + # yaourt -S docker-git + +### 2. 启动 ### + +安装好docker 之后,我们需要运行docker 监护程序,然后再能运行并管理docker 容器。我们需要使用下列命令来确定docker 监护程序已经安装并运行了。 + +#### 在 SysVinit 上#### + + # service docker start + +#### 在Systemd 上#### + + # systemctl start docker + +### 3. 安装DockerUI ### + +安装DockerUI 比安装docker 要简单很多。我们仅仅需要懂docker 注册表上拉取dockerui ,然后在容器里面运行。要完成这些,我们只需要简单的执行下面的命令: + + # docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock dockerui/dockerui + +![Starting DockerUI Container](http://blog.linoxide.com/wp-content/uploads/2015/09/starting-dockerui-container.png) + +在上面的命令里,dockerui 使用的默认端口是9000,我们需要使用`-p` 命令映射默认端口。使用`-v` 标志我们可以指定docker socket。如果主机使用了SELinux那么就得使用`--privileged` 标志。 + +执行完上面的命令后,我们要检查dockerui 容器是否运行了,或者使用下面的命令检查: + + # docker ps + +![Running Docker Containers](http://blog.linoxide.com/wp-content/uploads/2015/09/running-docker-containers.png) + +### 4. 拉取docker镜像 ### + +现在我们还不能直接使用dockerui 拉取镜像,所以我们需要在命令行下拉取docker 镜像。要完成这些我们需要执行下面的命令。 + + # docker pull ubuntu + +![Docker Image Pull](http://blog.linoxide.com/wp-content/uploads/2015/10/docker-image-pull.png) + +上面的命令将会从docker 官方源[Docker Hub][1]拉取一个标志为ubuntu 的镜像。类似的我们可以从Hub 拉取需要的其它镜像。 + +### 4. 管理 ### + +启动了dockerui 容器之后,我们快乐的用它来执行启动、暂停、终止、删除和其它dockerui 提供的其他用来操作docker 容器的命令。第一,我们需要在web 浏览器里面打开dockerui:在浏览器里面输入http://ip-address:9000 或者 http://mydomain.com:9000,具体要根据你的系统配置。默认情况下登录不需啊哟认证,但是可以配置我们的web 服务器来要求登录认证。要启动一个容器,我们得得到包含我们要运行的程序的景象。 + +#### 创建 #### + +创建容器我们需要在Images 页面,点击我们想创建的容器的镜像id。然后点击`Create` 按钮,接下来我们就会被要求输入创建容器所需要的属性。这些都完成之后,我们需要点击按钮`Create` 完成最终的创建。 + +![Creating Docker Container](http://blog.linoxide.com/wp-content/uploads/2015/10/creating-docker-container.png) + +#### 中止 #### + +要停止一个容器,我们只需要跳转到`Containers` 页面,然后选取要停止的容器。然后再Action 的子菜单里面按下Stop 就行了。 + +![Managing Container](http://blog.linoxide.com/wp-content/uploads/2015/10/managing-container.png) + +#### 暂停与恢复 #### + +要暂停一个容器,只需要简单的选取目标容器,然后点击Pause 就行了。恢复一个容器只需要在Actions 的子菜单里面点击Unpause 就行了。 + +#### 删除 #### + +类似于我们上面完成的任务,杀掉或者删除一个容器或镜像也是很简单的。只需要检查、选择容器或镜像,然后点击Kill 或者Remove 就行了。 + +### 结论 ### + +dockerui 使用了docker 远程API 完成了一个很棒的管理docker 容器的web 界面。它的开发者们已经使用纯HTML 和JS 设计、开发了这个应用。目前这个程序还处于开发中,并且还有大量的工作要完成,所以我们并不推荐将它应用在生产环境。它可以帮助用户简单的完成管理容器和镜像,而且只需要一点点工作。如果想参与、贡献dockerui,我们可以访问它们的[Github 仓库][2]。如果有问题、建议、反馈,请写在下面的评论框,这样我们就可以修改或者更新我们的内容。谢谢。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/setup-dockerui-web-interface-docker/ + +作者:[Arun Pyasi][a] +译者:[oska874](https://github.com/oska874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://hub.docker.com/ +[2]:https://github.com/crosbymichael/dockerui/ From a4366d00d966d9e46ba5f7e6be370ccf2d65d130 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 14 Nov 2015 13:19:11 +0000 Subject: [PATCH 2447/2517] Delete 20151012 How to Setup DockerUI--a Web Interface for Docker.md --- ...up DockerUI--a Web Interface for Docker.md | 111 ------------------ 1 file changed, 111 deletions(-) delete mode 100644 sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md diff --git a/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md b/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md deleted file mode 100644 index 52d63d6ac9..0000000000 --- a/sources/tech/20151012 How to Setup DockerUI--a Web Interface for Docker.md +++ /dev/null @@ -1,111 +0,0 @@ -在浏览器上使用Docker -================================================================================ -Docker 越来越流行了。在一个容器里面而不是虚拟机里运行一个完整的操作系统的这种是一个非常棒的技术和想法。docker 已经通过节省工作时间来拯救了千上万的系统管理员和开发人员。这是一个开源技术,提供一个平台来把应用程序当作容器来打包、分发、共享和运行,而不去关注主机上运行的操作系统是什么。它没有开发语言、框架或打包系统的限制,并且可以在任何时间、任何地点运行,从小型计算机到高端服务器都可以。运行docker容器和管理他们可能会花费一点点困难和时间,所以现在有一款基于web 的应用程序-DockerUI,可以让管理和运行容器变得很简单。DockerUI 是一个对那些不熟悉Linux 命令行担忧很想运行容器话程序的人很有帮助。DockerUI 是一个开源的基于web 的应用程序,它最著名的是它华丽的设计和简单的用来运行和管理docker 的简单的操作界面。 - -下面会介绍如何在Linux 上安装配置DockerUI。 - -### 1. 安装docker ### - -首先,我们需要安装docker。我们得感谢docker 的开发者,让我们可以简单的在主流linux 发行版上安装docker。为了安装docker,我们得在对应的发行版上使用下面的命令。 - -#### Ubuntu/Fedora/CentOS/RHEL/Debian #### - -docker 维护者已经写了一个非常棒的脚本,用它可以在Ubuntu 15.04/14.10/14.04, CentOS 6.x/7, Fedora 22, RHEL 7 和Debian 8.x 这几个linux 发行版上安装docker。这个脚本可以识别出我们的机器上运行的linux 的发行版本,然后将需要的源库添加到文件系统、更新本地的安装源目录,最后安装docker 和依赖库。要使用这个脚本安装docker,我们需要在root 用户或者sudo 权限下运行如下的命令, - - # curl -sSL https://get.docker.com/ | sh - -#### OpenSuse/SUSE Linux 企业版 #### - -要在运行了OpenSuse 13.1/13.2 或者 SUSE Linux Enterprise Server 12 的机器上安装docker,我们只需要简单的执行zypper 命令。运行下面的命令就可以安装最新版本的docker: - - # zypper in docker - -#### ArchLinux #### - -docker 存在于ArchLinux 的官方源和社区维护的AUR 库。所以在ArchLinux 上我们有两条路来安装docker。使用官方源安装,需要执行下面的pacman 命令: - - # pacman -S docker - -如果要从社区源 AUR 安装docker,需要执行下面的命令: - - # yaourt -S docker-git - -### 2. 启动 ### - -安装好docker 之后,我们需要运行docker 监护程序,然后再能运行并管理docker 容器。我们需要使用下列命令来确定docker 监护程序已经安装并运行了。 - -#### 在 SysVinit 上#### - - # service docker start - -#### 在Systemd 上#### - - # systemctl start docker - -### 3. 安装DockerUI ### - -安装DockerUI 比安装docker 要简单很多。我们仅仅需要懂docker 注册表上拉取dockerui ,然后在容器里面运行。要完成这些,我们只需要简单的执行下面的命令: - - # docker run -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock dockerui/dockerui - -![Starting DockerUI Container](http://blog.linoxide.com/wp-content/uploads/2015/09/starting-dockerui-container.png) - -在上面的命令里,dockerui 使用的默认端口是9000,我们需要使用`-p` 命令映射默认端口。使用`-v` 标志我们可以指定docker socket。如果主机使用了SELinux那么就得使用`--privileged` 标志。 - -执行完上面的命令后,我们要检查dockerui 容器是否运行了,或者使用下面的命令检查: - - # docker ps - -![Running Docker Containers](http://blog.linoxide.com/wp-content/uploads/2015/09/running-docker-containers.png) - -### 4. 拉取docker镜像 ### - -现在我们还不能直接使用dockerui 拉取镜像,所以我们需要在命令行下拉取docker 镜像。要完成这些我们需要执行下面的命令。 - - # docker pull ubuntu - -![Docker Image Pull](http://blog.linoxide.com/wp-content/uploads/2015/10/docker-image-pull.png) - -上面的命令将会从docker 官方源[Docker Hub][1]拉取一个标志为ubuntu 的镜像。类似的我们可以从Hub 拉取需要的其它镜像。 - -### 4. 管理 ### - -启动了dockerui 容器之后,我们快乐的用它来执行启动、暂停、终止、删除和其它dockerui 提供的其他用来操作docker 容器的命令。第一,我们需要在web 浏览器里面打开dockerui:在浏览器里面输入http://ip-address:9000 或者 http://mydomain.com:9000,具体要根据你的系统配置。默认情况下登录不需啊哟认证,但是可以配置我们的web 服务器来要求登录认证。要启动一个容器,我们得得到包含我们要运行的程序的景象。 - -#### 创建 #### - -创建容器我们需要在Images 页面,点击我们想创建的容器的镜像id。然后点击`Create` 按钮,接下来我们就会被要求输入创建容器所需要的属性。这些都完成之后,我们需要点击按钮`Create` 完成最终的创建。 - -![Creating Docker Container](http://blog.linoxide.com/wp-content/uploads/2015/10/creating-docker-container.png) - -#### 中止 #### - -要停止一个容器,我们只需要跳转到`Containers` 页面,然后选取要停止的容器。然后再Action 的子菜单里面按下Stop 就行了。 - -![Managing Container](http://blog.linoxide.com/wp-content/uploads/2015/10/managing-container.png) - -#### 暂停与恢复 #### - -要暂停一个容器,只需要简单的选取目标容器,然后点击Pause 就行了。恢复一个容器只需要在Actions 的子菜单里面点击Unpause 就行了。 - -#### 删除 #### - -类似于我们上面完成的任务,杀掉或者删除一个容器或镜像也是很简单的。只需要检查、选择容器或镜像,然后点击Kill 或者Remove 就行了。 - -### 结论 ### - -dockerui 使用了docker 远程API 完成了一个很棒的管理docker 容器的web 界面。它的开发者们已经使用纯HTML 和JS 设计、开发了这个应用。目前这个程序还处于开发中,并且还有大量的工作要完成,所以我们并不推荐将它应用在生产环境。它可以帮助用户简单的完成管理容器和镜像,而且只需要一点点工作。如果想参与、贡献dockerui,我们可以访问它们的[Github 仓库][2]。如果有问题、建议、反馈,请写在下面的评论框,这样我们就可以修改或者更新我们的内容。谢谢。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/setup-dockerui-web-interface-docker/ - -作者:[Arun Pyasi][a] -译者:[oska874](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://hub.docker.com/ -[2]:https://github.com/crosbymichael/dockerui/ From a5a78eee91642a970e3c48325d669fd89618b06c Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 14 Nov 2015 14:52:31 +0000 Subject: [PATCH 2448/2517] translating by ezio --- ... Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md b/sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md index 83fc1c3f30..8895d93439 100644 --- a/sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md +++ b/sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md @@ -1,3 +1,5 @@ +translating by ezio + How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04 ================================================================================ Hello and welcome to our today's article on SQLite which is the most widely deployed SQL database engine in the world that comes with zero-configuration, that means no setup or administration needed. SQLite is public-domain software package that provides relational database management system, or RDBMS that is used to store user-defined records in large tables. In addition to data storage and management, database engine process complex query commands that combine data from multiple tables to generate reports and data summaries. @@ -119,4 +121,4 @@ via: http://linoxide.com/ubuntu-how-to/install-sqlite-json-ubuntu-15-04/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/kashifs/ -[1]:https://www.sqlite.org/download.html \ No newline at end of file +[1]:https://www.sqlite.org/download.html From 8828eab49227ec42049e5f6a9d839c7afef46577 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sat, 14 Nov 2015 23:12:29 +0800 Subject: [PATCH 2449/2517] Update 20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇。 --- ...109 How to Install GitLab on Ubuntu or Fedora or Debian.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md b/sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md index 424e201b2c..43c5b48629 100644 --- a/sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md +++ b/sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md @@ -1,3 +1,5 @@ +FSSlc translting + How to Install GitLab on Ubuntu / Fedora / Debian ================================================================================ Distributed version control was never easy before git. Git is a free and open source software that is designed to handle everything from small to very large projects with ease and speed. Git was first developed by Linus Torvalds who was also the founder of well-known Linux Kernel. [GitLab][1] is an awesome development in the field of git and distributed version control system. It is a web based Git repository managing application which includes features like code reviews,wikis, issue tracking and much more. Creating, reviewing and deploying codes is very easy, managed and fast with GitLab. It can be hosted in our own server though it also provides free repository hosting in its official server which is similar to Github. GitLab has two different editions, Community Edition and Enterprise Edition. Community Edition is a complete free and open source software licensed under MIT License whereas Enterprise Edition is under a proprietary license, and contains features that are not present in the CE version. Here are some easy steps on how we can install GitLab Community Edition on our machine running Ubuntu, Fedora and Debian as operating system. @@ -174,4 +176,4 @@ via: http://linoxide.com/linux-how-to/install-gitlab-on-ubuntu-fedora-debian/ [1]:https://about.gitlab.com/ [2]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs [3]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs -[4]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=rpms \ No newline at end of file +[4]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=rpms From a46e75fd00dfbdf1fb947efb03feafc4b7c91698 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 15 Nov 2015 17:32:28 +0800 Subject: [PATCH 2450/2517] translating --- ...019 Nautilus File Search Is About To Get A Big Power Up.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md b/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md index 7ce79073c5..3e74b4c861 100644 --- a/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md +++ b/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md @@ -1,3 +1,5 @@ +translating---geekpi + Nautilus File Search Is About To Get A Big Power Up ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/10/nautilus-new-search-filters.jpg) @@ -35,4 +37,4 @@ via: http://www.omgubuntu.co.uk/2015/10/new-nautilus-search-filter-ui [2]:http://feaneron.com/2015/10/12/the-new-search-for-gnome-files-aka-nautilus/ [3]:https://www.youtube.com/watch?v=X2sPRXDzmUw [4]:http://www.omgubuntu.co.uk/2014/01/ubuntu-14-04-nautilus-type-ahead-patch -[5]:http://www.omgubuntu.co.uk/2015/09/gnome-3-18-release-new-features \ No newline at end of file +[5]:http://www.omgubuntu.co.uk/2015/09/gnome-3-18-release-new-features From dd50c9abd750e2b66b7c45abe0c5115df45661e4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 15 Nov 2015 18:49:29 +0800 Subject: [PATCH 2451/2517] translated --- ...e Search Is About To Get A Big Power Up.md | 40 ------------------- ...e Search Is About To Get A Big Power Up.md | 38 ++++++++++++++++++ 2 files changed, 38 insertions(+), 40 deletions(-) delete mode 100644 sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md create mode 100644 translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md diff --git a/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md b/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md deleted file mode 100644 index 3e74b4c861..0000000000 --- a/sources/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md +++ /dev/null @@ -1,40 +0,0 @@ -translating---geekpi - -Nautilus File Search Is About To Get A Big Power Up -================================================================================ -![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/10/nautilus-new-search-filters.jpg) - -**Finding stray files and folders in Nautilus is about to get a whole lot easier. ** - -A new **search filter** for the default [GNOME file manager][1] is in development. It makes heavy use of GNOME’s spiffy pop-over menus in an effort to offer a simpler way to narrow in on search results and find exactly what you’re after. - -Developer Georges Stavracas is working on the new UI and [describes][2] the new editor as “cleaner, saner and more intuitive”. - -Based on a video he’s [uploaded to YouTube][3] demoing the new approach – which he hasn’t made available for embedding – he’s not wrong. - -> “Nautilus has very complex but powerful internals, which allows us to do many things. And indeed, there is code for the many options in there. So, why did it used to look so poorly implemented/broken?”, he writes on his blog. - -The question is part rhetorical; the new search filter interface surfaces many of these ‘powerful internals’ to yhe user. Searches can be filtered ad **hoc** based on content type, name or by date range. - -Changing anything in an app like Nautilus is likely to upset some users, so as helpful and straightforward as the new UI seems it could come in for some heat. - -Not that worry of discontent seems to hamper progress (though the outcry at the [removal of ‘type ahead’ search][4] in 2014 still rings loud in many ears, no doubt). GNOME 3.18, [released last month][5], introduced a new file progress dialog to Nautilus and better integration for remote shares, including Google Drive. - -Stavracas’ search filter are not yet merged in to Files’ trunk, but the reworked search UI is tentatively targeted for inclusion in GNOME 3.20, due spring next year. - --------------------------------------------------------------------------------- - -via: http://www.omgubuntu.co.uk/2015/10/new-nautilus-search-filter-ui - -作者:[Joey-Elijah Sneddon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://plus.google.com/117485690627814051450/?rel=author -[1]:https://wiki.gnome.org/Apps/Nautilus -[2]:http://feaneron.com/2015/10/12/the-new-search-for-gnome-files-aka-nautilus/ -[3]:https://www.youtube.com/watch?v=X2sPRXDzmUw -[4]:http://www.omgubuntu.co.uk/2014/01/ubuntu-14-04-nautilus-type-ahead-patch -[5]:http://www.omgubuntu.co.uk/2015/09/gnome-3-18-release-new-features diff --git a/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md b/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md new file mode 100644 index 0000000000..c3c5f03d25 --- /dev/null +++ b/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md @@ -0,0 +1,38 @@ +Nautilus的文件搜索将迎来重大提升 +================================================================================ +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/10/nautilus-new-search-filters.jpg) + +**在Nautilus中搜索位置文件和文件夹将会将会变得很简单。** + +一个[GNOME文件管理器][1]中新的**搜索过滤器**正在开发中。它大量使用的GNOME的弹出式菜单来找出搜索结果并精确找到你关心的。 + +开发者Georges Stavracas正致力于新的UI并[描述][2]新的编辑器为“更干净、更理智、更直观”。 + +根据[上传到Youtube][3]的视频-他还没有嵌入它-他没有错。 + +> 他在他的博客中写到:“Nautilus有非常复杂但是强大的内部,它允许我们做很多事情。事实上这对于很多选项的代码也是这样。那么,为何它曾经看上去这么糟糕?” + +问题有部分修辞;新的搜索过滤器界面对用户展示了“强大的内部”。搜索可以根据类型、名字或者日期范围来进行过滤。 + +对像Nautilus这种app的任何修改有可能让一些用户不安,因此像这样有帮助、直接的新UI会带来一些争议。 + +不要担心不满会影响进度(毫无疑问,虽然像[移除类型优先搜索][4]的争议自2014年以来一直在争论)。[上个月发布的][5]GNOME 3.18给Nautilus引入了新的文件进度对话框,以及更好的远程共享,包括Google Drive。 + +Stavracas的搜索过滤还没被合并进Files的trunk,但是重做的UI已经初步计划在明年春天的GNOME 3.20中实现。 + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/10/new-nautilus-search-filter-ui + +作者:[Joey-Elijah Sneddon][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://wiki.gnome.org/Apps/Nautilus +[2]:http://feaneron.com/2015/10/12/the-new-search-for-gnome-files-aka-nautilus/ +[3]:https://www.youtube.com/watch?v=X2sPRXDzmUw +[4]:http://www.omgubuntu.co.uk/2014/01/ubuntu-14-04-nautilus-type-ahead-patch +[5]:http://www.omgubuntu.co.uk/2015/09/gnome-3-18-release-new-features From e7fac1dccaf81c31383b2884cb76a20db927a4be Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 15 Nov 2015 19:45:59 +0800 Subject: [PATCH 2452/2517] [Translated]20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md --- ...ll GitLab on Ubuntu or Fedora or Debian.md | 179 ------------------ ...ll GitLab on Ubuntu or Fedora or Debian.md | 178 +++++++++++++++++ 2 files changed, 178 insertions(+), 179 deletions(-) delete mode 100644 sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md create mode 100644 translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md diff --git a/sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md b/sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md deleted file mode 100644 index 43c5b48629..0000000000 --- a/sources/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md +++ /dev/null @@ -1,179 +0,0 @@ -FSSlc translting - -How to Install GitLab on Ubuntu / Fedora / Debian -================================================================================ -Distributed version control was never easy before git. Git is a free and open source software that is designed to handle everything from small to very large projects with ease and speed. Git was first developed by Linus Torvalds who was also the founder of well-known Linux Kernel. [GitLab][1] is an awesome development in the field of git and distributed version control system. It is a web based Git repository managing application which includes features like code reviews,wikis, issue tracking and much more. Creating, reviewing and deploying codes is very easy, managed and fast with GitLab. It can be hosted in our own server though it also provides free repository hosting in its official server which is similar to Github. GitLab has two different editions, Community Edition and Enterprise Edition. Community Edition is a complete free and open source software licensed under MIT License whereas Enterprise Edition is under a proprietary license, and contains features that are not present in the CE version. Here are some easy steps on how we can install GitLab Community Edition on our machine running Ubuntu, Fedora and Debian as operating system. - -### 1. Installing Pre-requisties ### - -First of all, we'll install the required dependencies by GitLab Community Edition. We'll install curl in order to download our required files, openssh-server in order to ssh into our machine, ca-certificates to add CA Certifications and postfix as an MTA (Mail Transfer Agent). - -Note: To install GitLab CE, we need to have a linux machine with at least 2 GB RAM and 2 Cores CPU. - -#### On Ubuntu 14 .04/Debian 8.x #### - -As these packages are available on the official repository of box Ubuntu 14.04 and Debian 8.x, we'll simply install it using apt-get package manager. To do so, we'll need to execute the following command in a terminal or console. - - # apt-get install curl openssh-server ca-certificates postfix - -![install dependencies gitlab ubuntu debian](http://blog.linoxide.com/wp-content/uploads/2015/10/install-dependencies-gitlab-ubuntu-debian.png) - -#### On Fedora 22 #### - -In Fedora 22, the default package manager is dnf as yum has been depreciated. So, we'll simply run the following dnf command in order to install those required packages. - - # dnf install curl openssh-server postfix - -![install dependencies gitlab fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/install-dependencies-gitlab-fedora.png) - -### 2. Starting and Enabling Services ### - -Now, we'll start the services of sshd and postfix using our default init system. And we'll also enable them to start automatically in every system boot. - -#### On Ubuntu 14.04 #### - -As SysVinit is installed as init system in Ubuntu 14.04, we'll use services command to start sshd and postfix daemon. - - # service sshd start - # service postfix start - -Now, in order to make them start automatically in every boot, we'll need to run the following update-rc.d command. - - # update-rc.d sshd enable - # update-rc.d postfix enable - -#### On Fedora 22/Debian 8.x #### - -As Fedora 22 and Debian 8.x is shipped with Systemd instead of SysVinit as default init system, we'll simply run the following command to start the sshd and postfix services. - - # systemctl start sshd postfix - -Now, in order to make them start automatically in every boot, we'll need to run the following systemctl command. - - # systemctl enable sshd postfix - - Created symlink from /etc/systemd/system/multi-user.target.wants/sshd.service to /usr/lib/systemd/system/sshd.service. - Created symlink from /etc/systemd/system/multi-user.target.wants/postfix.service to /usr/lib/systemd/system/postfix.service. - -### 3. Downloading GitLab ### - -We'll now download the binary installation files from the official GitLab CE Repository using curl. First, we'll need to navigate to the repository in order to get the download link of the required file. To do so, we'll need to run the following command in our linux machine running the respective operating system. - -#### On Ubuntu 14.04 #### - -As Ubuntu and Debian uses the same debian format file, we'll gonna search the required version of GitLab under [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][2] and click on the link of the required release with ubuntu/trusty tag as we are running Ubuntu 14.04. A new page will appear in which we can see the Download button, we'll gonna right click it, get the link of the file and then download it using curl as shown bellow. - - # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/trusty/gitlab-ce_8.1.2-ce.0_amd64.deb - -![Downloading Gitlab Ubuntu](http://blog.linoxide.com/wp-content/uploads/2015/10/downloading-gitlab-ubuntu.png) - -#### On Debian 8.x #### - -Like Ubuntu, we'll gonna search the required version of it under [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][3] and click on the link of the requried release with debian/jessie tag as we are running Debian 8.x. Then, a new page will appear in which we'll right click on the Download button and get the file's download link. We'll next download it using curl as shown below. - - # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/jessie/gitlab-ce_8.1.2-ce.0_amd64.deb/download - -![Downloading Gitlab Debian](http://blog.linoxide.com/wp-content/uploads/2015/10/downloading-gitlab-debian.png) - -#### On Fedora 22 #### - -As Fedora uses the rpm file for packages, we'll gonna search the required version of GitLab under [https://packages.gitlab.com/gitlab/gitlab-ce?filter=rpms][4] and click on the link of the required release, here as we are running Fedora 22, we'll select the release with el/7 tag. A new page will appear in which we can see the Download button, we'll gonna right click it, get the link of the file and then download it using curl as shown bellow. - - # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm/download - -![Downloading Gitlab Fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/downloading-gitlab-fedora.png) - -### 4. Installing GitLab ### - -After our repository source is added in our linux machine, we'll now go for the installation of GitLab Community Edition using the default package manger of the respective distribution of linux. - -#### On Ubuntu 14.04/Debian 8.x #### - -To install GitLab CE in machine running Ubuntu 14.04 or Debian 8.x linux distribution which has apt-get package manager, we'll simply run the following command. - - # dpkg -i gitlab-ce_8.1.2-ce.0_amd64.deb - -![Installing Gitlab Ubuntu Debian](http://blog.linoxide.com/wp-content/uploads/2015/10/installing-gitlab-ubuntu-debian.png) - -#### On Fedora 22 #### - -We can execute the following dnf command to install it in our Fedora 22 box. - - # dnf install gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm - -![Installing Gitlab Fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/installing-gitlab-fedora.png) - -### 5. Configuring and Starting GitLab ### - -Next, as GitLab CE has been successfully installed in our linux system. We'll now go ahead for configuring and starting it. To do so, we'll need to run the following command which is same in Ubuntu, Debian and Fedora distributions. - - # gitlab-ctl reconfigure - -![Reconfiguring Gitlab](http://blog.linoxide.com/wp-content/uploads/2015/10/reconfiguring-gitlab.png) - -### 6. Allowing Firewall ### - -If we have firewall program enabled for security in our linux box, we'll need to allow port 80 which is the default port of GitLab CE in order to make the web interface accessible across the network. Firewalld and iptables are most widely used firewall programs in linux distributions. In order to do so, we'll need to run the following commands. -On Iptables - -Iptables are installed and used in Ubuntu 14.04 by default. So, we'll need to run the following iptables commands to open port 80 in it. - - # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT - - # /etc/init.d/iptables save - -#### On Firewalld #### - -As Fedora 22 and Debian 8.x has systemd installed by default, it contains firewalld running as firewall program. In order to open the port 80 (http service) on firewalld, we'll need to execute the below commands. - - # firewall-cmd --permanent --add-service=http - - success - - # firewall-cmd --reload - - success - -### 7. Accessing GitLab Web Interface ### - -Finally, we'll now go for accessing the web interface of GitLab CE. To do so, we'll need to point our web browser to the GitLab server with http://ip-address/ or http://domain.com/ according to our configuration. After we have pointed successfully, we'll see the following screen. - -![Gitlab Login Screen](http://blog.linoxide.com/wp-content/uploads/2015/10/gitlab-login-screen.png) - -Now, in order to login to the panel, we'll need to click on Login button which will ask us an username and a password. We'll now enter the default username and password ie **root** and **5iveL!fe** respectively. After logging into the dashboard, we'll be asked to compulsorily enter the new password for our GitLab root user. - -![Setting New Password Gitlab](http://blog.linoxide.com/wp-content/uploads/2015/10/setting-new-password-gitlab.png) - -### 8. Creating Repository ### - -After we have successfully changed the password and logged in to our dashboard, we'll now create a new repository for our new project. To do so, we'll need to go under Projects and click on **NEW PROJECT** green button. - -![Creating New Projects](http://blog.linoxide.com/wp-content/uploads/2015/10/creating-new-projects.png) - -Then, we'll be asked to enter the required information and settings for our repository as shown below. We can even import our project from many git repository providers and repositories. - -![Creating New Project](http://blog.linoxide.com/wp-content/uploads/2015/10/configuring-git-project.png) - -After thats done, we'll be able to access our Git repository using any Git client including the basic git command line. We can see every activities done in the repository with other functions like creating a milestone, managing issues, merge requests, managing members, labels and Wiki for our projects. - -![Gitlab Menu](http://blog.linoxide.com/wp-content/uploads/2015/10/gitlab-menu.png) - -### Conclusion ### - -GitLab is an awesome open source web application for managing our git repository. It has a beautiful, responsive interface with plenty of cool features. It is packed with many cool features like managing groups, deploying keys, Continuous Integration, viewing logs, broadcast messages, hooks, system OAuth applications, templates and more. It has the ability to integrate tons of tools such as Slack, Hipchat, LDAP, JIRA, Jenkins, many types of hooks and a complete API. It has the minimum requirement of 2 GB RAM and 2 Cores CPU to run smoothly up to 500 users but also can be scaled to multiple active servers. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-gitlab-on-ubuntu-fedora-debian/ - -作者:[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/ -[1]:https://about.gitlab.com/ -[2]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs -[3]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs -[4]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=rpms diff --git a/translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md b/translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md new file mode 100644 index 0000000000..524fc1e2c1 --- /dev/null +++ b/translated/tech/20151109 How to Install GitLab on Ubuntu or Fedora or Debian.md @@ -0,0 +1,178 @@ +如何在 Ubuntu / Fedora / Debian 中安装 GitLab +================================================================================ +在 Git 问世之前,分布式版本控制从来都不是一件简单的事。Git 是一个免费、开源的软件,旨在轻松且快速地对从小规模到非常巨大的项目进行管理。Git 最开始由 Linus Torvalds 开发,他同时也是著名的 Linux 内核的创建者。在 git 和分布式版本控制系统领域中,[GitLab][1] 是一个极棒的新产品。它是一个基于 web 的 Git 仓库管理应用,包含代码审查、wiki、问题跟踪等诸多功能。使用 GitLab 可以很方便、快速地创建、审查、部署及托管代码。与 Github 类似,尽管它也提供在其官方的服务器托管免费的代码仓库,但它也可以运行在我们自己的服务器上。GitLab 有两个不同的版本:社区版(Community Edition)和企业版(Enterprise Edition)。社区本完全免费且开源,遵循 MIT 协议;而企业版则遵循一个专有的协议,包含一些社区版中没有的功能。下面介绍的是有关如何在我们自己的运行着 Ubuntu、Fedora 或 Debian 操作系统的机子上安装 GitLab 社区版的简单步骤。 + +### 1. 安装先决条件 ### + +首先,我们需要安装 GitLab 所依赖的软件包。我们将安装 `curl`,用以下载我们所需的文件;安装`openssh-server` ,以此来通过 ssh 协议登陆到我们的机子上;安装`ca-certificates`,用它来添加 CA 认证;以及 `postfix`,把它作为一个 MTA(Mail Transfer Agent,邮件传输代理)。 + +注: 若要安装 GitLab 社区版,我们需要一个至少包含 2 GB 内存和 2 核 CPU 的 linux 机子。 + +#### 在 Ubuntu 14 .04/Debian 8.x 中 #### + +鉴于这些依赖包都可以在 Ubuntu 14.04 和 Debian 8.x 的官方软件仓库中获取到,我们只需通过使用 `apt-get` 包管理器来安装它们。为此,我们需要在一个终端或控制台中执行下面的命令: + + # apt-get install curl openssh-server ca-certificates postfix + +![install dependencies gitlab ubuntu debian](http://blog.linoxide.com/wp-content/uploads/2015/10/install-dependencies-gitlab-ubuntu-debian.png) + +#### 在 Fedora 22 中 #### + +在 Fedora 22 中,由于 `yum` 已经被弃用了,所以默认的包管理器是 `dnf`。为了安装上面那些需要的软件包,我们只需运行下面的 dnf 命令: + + # dnf install curl openssh-server postfix + +![install dependencies gitlab fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/install-dependencies-gitlab-fedora.png) + +### 2. 打开并开启服务 ### + +现在,我们将使用我们默认的 init 系统来打开 sshd 和 postfix 服务。并且我们将使得它们在每次系统启动时被自动开启。 + +#### 在 Ubuntu 14.04 中 #### + +由于 SysVinit 在 Ubuntu 14.04 中作为 init 系统被安装,我们将使用 service 命令来开启 sshd 和 postfix 守护进程: + + # service sshd start + # service postfix start + +现在,为了使得它们在每次开机启动时被自动开启,我们需要运行下面的 update-rc.d 命令: + + # update-rc.d sshd enable + # update-rc.d postfix enable + +#### 在 Fedora 22/Debian 8.x 中 #### + +鉴于 Fedora 22 和 Debi 8.x 已经用 Systemd 代替了 SysVinit 来作为默认的 init 系统,我们只需运行下面的命令来开启 sshd 和 postfix 服务: + + # systemctl start sshd postfix + +现在,为了使得它们在每次开机启动时被自动地开启,我们需要运行下面的 systemctl 命令: + + # systemctl enable sshd postfix + + 从 /etc/systemd/system/multi-user.target.wants/sshd.service 建立软链接到 /usr/lib/systemd/system/sshd.service. + 从 /etc/systemd/system/multi-user.target.wants/postfix.service 建立软链接到 /usr/lib/systemd/system/postfix.service. + +### 3. 下载 GitLab ### + +现在,我们将使用 curl 从官方的 GitLab 社区版仓库下载二进制安装文件。首先,为了得到所需文件的下载链接,我们需要浏览到该软件仓库的页面。为此,我们需要在运行着相应操作系统的 linux 机子上运行下面的命令。 + +#### 在 Ubuntu 14.04 中 #### + +由于 Ubuntu 和 Debian 使用相同格式的 debian 文件,我们需要在 [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][2] 下搜索所需版本的 GitLab,然后点击有着 ubuntu/trusty 标签的链接,这是因为我们运作着 Ubuntu 14.04。接着一个新的页面将会出现,我们将看到一个下载按钮,然后我们在它的上面右击,得到文件的链接,然后像下面这样使用 curl 来下载它。 + + # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/trusty/gitlab-ce_8.1.2-ce.0_amd64.deb + +![Downloading Gitlab Ubuntu](http://blog.linoxide.com/wp-content/uploads/2015/10/downloading-gitlab-ubuntu.png) + +#### 在 Debian 8.x 中 #### + +与 Ubuntu 类似,我们需要在 [https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs][3] 页面中搜索所需版本的 GitLab,然后点击带有 debian/jessie 标签的链接,这是因为我们运行的是 Debian 8.x。接着,一个新的页面将会出现,然后我们在下载按钮上右击,得到文件的下载链接。最后我们像下面这样使用 curl 来下载该文件。 + + # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/jessie/gitlab-ce_8.1.2-ce.0_amd64.deb/download + +![Downloading Gitlab Debian](http://blog.linoxide.com/wp-content/uploads/2015/10/downloading-gitlab-debian.png) + +#### 在 Fedora 22 中#### + +由于 Fedora 使用 rpm 文件来作为软件包,我们将在 [https://packages.gitlab.com/gitlab/gitlab-ce?filter=rpms][4] 页面下搜索所需版本的 GitLab,然后点击所需发行包的链接,这里由于我们运行的是 Fedora 22,所以我们将选择带有 el/7 标签的发行包。一个新的页面将会出现,在其中我们可以看到一个下载按钮,我们将右击它,得到所需文件的链接,然后像下面这样使用 curl 来下载它。 + + # curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm/download + +![Downloading Gitlab Fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/downloading-gitlab-fedora.png) + +### 4. 安装 GitLab ### + +在相应的软件源被添加到我们的 linux 机子上之后,现在我们将使用相应 linux 发行版本中的默认包管理器来安装 GitLab 社区版。 + +#### 在 Ubuntu 14.04/Debian 8.x 中 #### + +要在运行着 Ubuntu 14.04 或 Debian 8.x linux 发行版本的机子上安装 GitLab 社区版,我们只需运行如下的命令: + + # dpkg -i gitlab-ce_8.1.2-ce.0_amd64.deb + +![Installing Gitlab Ubuntu Debian](http://blog.linoxide.com/wp-content/uploads/2015/10/installing-gitlab-ubuntu-debian.png) + +#### 在 Fedora 22 中 #### + +我们只需执行下面的 dnf 命令来在我们的 Fedora 22 机子上安装 GitLab。 + + # dnf install gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm + +![Installing Gitlab Fedora](http://blog.linoxide.com/wp-content/uploads/2015/10/installing-gitlab-fedora.png) + +### 5. 配置和开启 GitLab ### + +由于 GitLab 社区版已经成功地安装在我们的 linux 系统中了,接下来我们将要配置和开启它了。为此,我们需要运行下面的命令,这在 Ubuntu、Debian 和 Fedora 发行版本上都一样: + + # gitlab-ctl reconfigure + +![Reconfiguring Gitlab](http://blog.linoxide.com/wp-content/uploads/2015/10/reconfiguring-gitlab.png) + +### 6. 允许通过防火墙 ### + +假如在我们的 linux 机子中已经启用了防火墙程序,为了使得 GitLab 社区版的 web 界面可以通过网络进行访问,我们需要允许 80 端口通过防火墙,这个端口是 GitLab 社区版的默认端口。为此,我们需要运行下面的命令。 + +#### 在 Iptables 中 #### + +Ubuntu 14.04 默认安装和使用 Iptables。所以,我们将运行下面的 iptables 命令来打开 80 端口: + + # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT + + # /etc/init.d/iptables save + +#### 在 Firewalld 中 #### + +由于 Fedora 22 和 Debian 8.x 默认安装了 systemd,它包含了作为防火墙程序的 firewalld。为了使得 80 端口(http 服务) 能够通过 firewalld,我们需要执行下面的命令。 + + # firewall-cmd --permanent --add-service=http + + success + + # firewall-cmd --reload + + success + +### 7. 访问 GitLab Web 界面 ### + +最后,我们将访问 GitLab 社区版的 web 界面。为此,我们需要将我们的 web 浏览器指向 GitLab 服务器的网址,根据我们的配置,可能是 http://ip-address/ 或 http://domain.com/ 的格式。在我们成功指向该网址后,我们将会看到下面的页面。 + +![Gitlab Login Screen](http://blog.linoxide.com/wp-content/uploads/2015/10/gitlab-login-screen.png) + +现在,为了登陆进面板,我们需要点击登陆按钮,它将询问我们的用户名和密码。然后我们将输入默认的用户名和密码,即 **root** 和 **5iveL!fe** 。在登陆进控制面板后,我们将被强制要求为我们的 GitLab root 用户输入新的密码。 + +![Setting New Password Gitlab](http://blog.linoxide.com/wp-content/uploads/2015/10/setting-new-password-gitlab.png) + +### 8. 创建仓库 ### + +在我们成功地更改密码并登陆到我们的控制面板之后,现在,我们将为我们的新项目创建一个新的仓库。为此,我们需要来到项目栏,然后点击 **新项目** 绿色按钮。 + +![Creating New Projects](http://blog.linoxide.com/wp-content/uploads/2015/10/creating-new-projects.png) + +接着,我们将被询问给我们的项目输入所需的信息和设定,正如下面展示的那样。我们甚至可以从其他的 git 仓库提供商和仓库中导入我们的项目。 + +![Creating New Project](http://blog.linoxide.com/wp-content/uploads/2015/10/configuring-git-project.png) + +做完这些后,我们将能够使用任何包含基本 git 命令行的 Git 客户端来访问我们的 Git 仓库。我们可以看到在仓库中进行的任何活动,例如创建一个里程碑,管理 issue,合并请求,管理成员,便签,Wiki 等。 + +![Gitlab Menu](http://blog.linoxide.com/wp-content/uploads/2015/10/gitlab-menu.png) + +### 总结 ### + +GitLab 是一个用来管理 git 仓库的很棒的开源 web 应用。它有着漂亮,响应式的带有诸多酷炫功能的界面。它还打包有许多酷炫功能,例如管理群组,分发密钥,连续集成,查看日志,广播消息,钩子,系统 OAuth 应用,模板等。(注:OAuth 是一个开放标准,允许用户让第三方应用访问该用户在某一网站上存储的私密的资源(如照片,视频,联系人列表),而无需将用户名和密码提供给第三方应用。--- 摘取自 [维基百科上的 OAuth 词条](https://zh.wikipedia.org/wiki/OAuth)) 它还可以和大量的工具进行交互如 Slack,Hipchat,LDAP,JIRA,Jenkins,很多类型的钩子和一个完整的 API。它至少需要 2 GB 的内存和 2 核 CPU 来流畅运行,支持多达 500 个用户,但它也可以被扩展到多个活动的服务器上。假如你有任何的问题,建议,回馈,请将它们写在下面的评论框中,以便我们可以提升或更新我们的内容。谢谢! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-gitlab-on-ubuntu-fedora-debian/ + +作者:[Arun Pyasi][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://about.gitlab.com/ +[2]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs +[3]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs +[4]:https://packages.gitlab.com/gitlab/gitlab-ce?filter=rpms \ No newline at end of file From 7ec4cb9b3056b28923fc5b8f2554177fa42c844e Mon Sep 17 00:00:00 2001 From: martin qi Date: Sun, 15 Nov 2015 20:10:21 +0800 Subject: [PATCH 2453/2517] Delete 20150909 Superclass--15 of the world's best living programmers.md --- ... of the world's best living programmers.md | 391 ------------------ 1 file changed, 391 deletions(-) delete mode 100644 sources/talk/20150909 Superclass--15 of the world's best living programmers.md diff --git a/sources/talk/20150909 Superclass--15 of the world's best living programmers.md b/sources/talk/20150909 Superclass--15 of the world's best living programmers.md deleted file mode 100644 index 8959bc42fb..0000000000 --- a/sources/talk/20150909 Superclass--15 of the world's best living programmers.md +++ /dev/null @@ -1,391 +0,0 @@ -martin translating... - -Superclass: 15 of the world’s best living programmers -================================================================================ -When developers discuss who the world’s top programmer is, these names tend to come up a lot. - -![](http://images.techhive.com/images/article/2015/09/superman-620x465-100611650-orig.jpg) - -Image courtesy [tom_bullock CC BY 2.0][1] - -It seems like there are lots of programmers out there these days, and lots of really good programmers. But which one is the very best? - -Even though there’s no way to really say who the best living programmer is, that hasn’t stopped developers from frequently kicking the topic around. ITworld has solicited input and scoured coder discussion forums to see if there was any consensus. As it turned out, a handful of names did frequently get mentioned in these discussions. - -Use the arrows above to read about 15 people commonly cited as the world’s best living programmer. - -![](http://images.techhive.com/images/article/2015/09/margaret_hamilton-620x465-100611764-orig.jpg) - -Image courtesy [NASA][2] - -### Margaret Hamilton ### - -**Main claim to fame: The brains behind Apollo’s flight control software** - -Credentials: As the Director of the Software Engineering Division at Charles Stark Draper Laboratory, she headed up the team which [designed and built][3] the on-board [flight control software for NASA’s Apollo][4] and Skylab missions. Based on her Apollo work, she later developed the [Universal Systems Language][5] and [Development Before the Fact][6] paradigm. Pioneered the concepts of [asynchronous software, priority scheduling, and ultra-reliable software design][7]. Coined the term “[software engineering][8].” Winner of the [Augusta Ada Lovelace Award][9] in 1986 and [NASA’s Exceptional Space Act Award in 2003][10]. - -Quotes: “Hamilton invented testing , she pretty much formalised Computer Engineering in the US.” [ford_beeblebrox][11] - -“I think before her (and without disrespect including Knuth) computer programming was (and to an extent remains) a branch of mathematics. However a flight control system for a spacecraft clearly moves programming into a different paradigm.” [Dan Allen][12] - -“... she originated the term ‘software engineering’ — and offered a great example of how to do it.” [David Hamilton][13] - -“What a badass” [Drukered][14] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_donald_knuth-620x465-100502872-orig.jpg) - -Image courtesy [vonguard CC BY-SA 2.0][15] - -### Donald Knuth ### - -**Main claim to fame: Author of The Art of Computer Programming** - -Credentials: Wrote the [definitive book on the theory of programming][16]. Created the TeX digital typesetting system. [First winner of the ACM’s Grace Murray Hopper Award][17] in 1971. Winner of the ACM’s [A. M. Turing][18] Award in 1974, the [National Medal of Science][19] in 1979 and the IEEE’s [John von Neumann Medal][20] in 1995. Named a [Fellow at the Computer History Museum][21] in 1998. - -Quotes: “... wrote The Art of Computer Programming which is probably the most comprehensive work on computer programming ever.” [Anonymous][22] - -“There is only one large computer program I have used in which there are to a decent approximation 0 bugs: Don Knuth's TeX. That's impressive.” [Jaap Weel][23] - -“Pretty awesome if you ask me.” [Mitch Rees-Jones][24] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_ken-thompson-620x465-100502874-orig.jpg) - -Image courtesy [Association for Computing Machinery][25] - -### Ken Thompson ### - -**Main claim to fame: Creator of Unix** - -Credentials: Co-creator, [along with Dennis Ritchie][26], of Unix. Creator of the [B programming language][27], the [UTF-8 character encoding scheme][28], the ed [text editor][29], and co-developer of the Go programming language. Co-winner (along with Ritchie) of the [A.M. Turing Award][30] in 1983, [IEEE Computer Pioneer Award][31] in 1994, and the [National Medal of Technology][32] in 1998. Inducted as a [fellow of the Computer History Museum][33] in 1997. - -Quotes: “... probably the most accomplished programmer ever. Unix kernel, Unix tools, world-champion chess program Belle, Plan 9, Go Language.” [Pete Prokopowicz][34] - -“Ken's contributions, more than anyone else I can think of, were fundamental and yet so practical and timeless they are still in daily use.“ [Jan Jannink][35] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_richard_stallman-620x465-100502868-orig.jpg) - -Image courtesy Jiel Beaumadier CC BY-SA 3.0 - -### Richard Stallman ### - -**Main claim to fame: Creator of Emacs, GCC** - -Credentials: Founded the [GNU Project][36] and created many of its core tools, such as [Emacs, GCC, GDB][37], and [GNU Make][38]. Also founded the [Free Software Foundation][39]. Winner of the ACM's [Grace Murray Hopper Award][40] in 1990 and the [EFF's Pioneer Award in 1998][41]. - -Quotes: “... there was the time when he single-handedly outcoded several of the best Lisp hackers around, in the Symbolics vs LMI fight.” [Srinivasan Krishnan][42] - -“Through his amazing mastery of programming and force of will, he created a whole sub-culture in programming and computers.” [Dan Dunay][43] - -“I might disagree on many things with the great man, but he is still one of the most important programmers, alive or dead” [Marko Poutiainen][44] - -“Try to imagine Linux without the prior work on the GNu project. Stallman's the bomb, yo.” [John Burnette][45] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_anders_hejlsberg-620x465-100502873-orig.jpg) - -Image courtesy [D.Begley CC BY 2.0][46] - -### Anders Hejlsberg ### - -**Main claim to fame: Creator of Turbo Pascal** - -Credentials: [The original author of what became Turbo Pascal][47], one of the most popular Pascal compilers and the first integrated development environment. Later, [led the building of Delphi][48], Turbo Pascal’s successor. [Chief designer and architect of C#][49]. Winner of [Dr. Dobb's Excellence in Programming Award][50] in 2001. - -Quotes: “He wrote the [Pascal] compiler in assembly language for both of the dominant PC operating systems of the day (DOS and CPM). It was designed to compile, link and run a program in seconds rather than minutes.” [Steve Wood][51] - -“I revere this guy - he created the development tools that were my favourite through three key periods along my path to becoming a professional software engineer.” [Stefan Kiryazov][52] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_doug_cutting-620x465-100502871-orig.jpg) - -Image courtesy [vonguard CC BY-SA 2.0][53] - -### Doug Cutting ### - -**Main claim to fame: Creator of Lucene** - -Credentials: [Developed the Lucene search engine, as well as Nutch][54], a web crawler, and [Hadoop][55], a set of tools for distributed processing of large data sets. A strong proponent of open-source (Lucene, Nutch and Hadoop are all open-source). Currently [a former director of the Apache Software Foundation][56]. - -Quotes: “... he is the same guy who has written an exceptional search framework(lucene/solr) and opened the big-data gateway to the world(hadoop).” [Rajesh Rao][57] - -“His creation/work on Lucene and Hadoop (among other projects) has created a tremendous amount of wealth and employment for folks in the world….” [Amit Nithianandan][58] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_sanjay_ghemawat-620x465-100502876-orig.jpg) - -Image courtesy [Association for Computing Machinery][59] - -### Sanjay Ghemawat ### - -**Main claim to fame: Key Google architect** - -Credentials: [Helped to design and implement some of Google’s large distributed systems][60], including MapReduce, BigTable, Spanner and Google File System. [Created Unix’s ical][61] calendaring system. Elected to the [National Academy of Engineering][62] in 2009. Winner of the [ACM-Infosys Foundation Award in the Computing Sciences][63] in 2012. - -Quote: “Jeff Dean's wingman.” [Ahmet Alp Balkan][64] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_jeff_dean-620x465-100502866-orig.jpg) - -Image courtesy [Google][65] - -### Jeff Dean ### - -**Main claim to fame: The brains behind Google search indexing** - -Credentials: Helped to design and implement [many of Google’s large-scale distributed systems][66], including website crawling, indexing and searching, AdSense, MapReduce, BigTable and Spanner. Elected to the [National Academy of Engineering][67] in 2009. 2012 winner of the ACM’s [SIGOPS Mark Weiser Award][68] and the [ACM-Infosys Foundation Award in the Computing Sciences][69]. - -Quotes: “... for bringing breakthroughs in data mining( GFS, Map and Reduce, Big Table ).” [Natu Lauchande][70] - -“... conceived, built, and deployed MapReduce and BigTable, among a bazillion other things” [Erik Goldman][71] - -![](http://images.techhive.com/images/article/2015/09/linus_torvalds-620x465-100611765-orig.jpg) - -Image courtesy [Krd CC BY-SA 4.0][72] - -### Linus Torvalds ### - -**Main claim to fame: Creator of Linux** - -Credentials: Created the [Linux kernel][73] and [Git][74], an open source version control system. Winner of numerous awards and honors, including the [EFF Pioneer Award][75] in 1998, the [British Computer Society’s Lovelace Medal][76] in 2000, the [Millenium Technology Prize][77] in 2012 and the [IEEE Computer Society’s Computer Pioneer Award][78] in 2014. Also inducted into the [Computer History Museum’s Hall of Fellows][79] in 2008 and the [Internet Hall of Fame][80] in 2012. - -Quotes: “To put into prospective what an achievement this is, he wrote the Linux kernel in a few years while the GNU Hurd (a GNU-developed kernel) has been under development for 25 years and has still yet to release a production-ready example.” [Erich Ficker][81] - -“Torvalds is probably the programmer's programmer.” [Dan Allen][82] - -“He's pretty darn good.” [Alok Tripathy][83] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_john_carmack-620x465-100502867-orig.jpg) - -Image courtesy [QuakeCon CC BY 2.0][84] - -### John Carmack ### - -**Main claim to fame: Creator of Doom** - -Credentials: Cofounded id Software and [created such influential FPS games][85] as Wolfenstein 3D, Doom and Quake. Pioneered such ground-breaking computer graphic techniques [adaptive tile refresh][86], [binary space partitioning][87], and surface caching. Inducted into the [Academy of Interactive Arts and Sciences Hall of Fame][88] in 2001, [won Emmy awards][89] in the Engineering & Technology category in 2007 and 2008, and given a lifetime achievement award by the [Game Developers Choice Awards][90] in 2010. - -Quotes: “He wrote his first rendering engine before he was 20 years old. The guy's a genius. I wish I were a quarter a programmer he is.” [Alex Dolinsky][91] - -“... Wolfenstein 3D, Doom and Quake were revolutionary at the time and have influenced a generation of game designers.” [dniblock][92] - -“He can write basically anything in a weekend....” [Greg Naughton][93] - -“He is the Mozart of computer coding….” [Chris Morris][94] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_fabrice_bellard-620x465-100502870-orig.jpg) - -Image courtesy [Duff][95] - -### Fabrice Bellard ### - -**Main claim to fame: Creator of QEMU** - -Credentials: Created a [variety of well-known open-source software programs][96], including QEMU, a platform for hardware emulation and virtualization, FFmpeg, for handling multimedia data, the Tiny C Compiler and LZEXE, an executable file compressor. [Winner of the Obfuscated C Code Contest][97] in 2000 and 2001 and the [Google-O'Reilly Open Source Award][98] in 2011. Former world record holder for [calculating the most number of digits in Pi][99]. - -Quotes: “I find Fabrice Bellard's work remarkable and impressive.” [raphinou][100] - -“Fabrice Bellard is the most productive programmer in the world....” [Pavan Yara][101] - -“Hes like the Nikola Tesla of sofware engineering.” [Michael Valladolid][102] - -“He's a prolific serial achiever since the 1980s.” M[ichael Biggins][103] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_jon_skeet-620x465-100502863-orig.jpg) - -Image courtesy [Craig Murphy CC BY 2.0][104] - -### Jon Skeet ### - -**Main claim to fame: Legendary Stack Overflow contributor** - -Credentials: Google engineer and author of [C# in Depth][105]. Holds [highest reputation score of all time on Stack Overflow][106], answering, on average, 390 questions per month. - -Quotes: “Jon Skeet doesn't need a debugger, he just stares down the bug until the code confesses” [Steven A. Lowe][107] - -“When Jon Skeet's code fails to compile the compiler apologises.” [Dan Dyer][108] - -“Jon Skeet's code doesn't follow a coding convention. It is the coding convention.” [Anonymous][109] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_image_adam_dangelo-620x465-100502875-orig.jpg) - -Image courtesy [Philip Neustrom CC BY 2.0][110] - -### Adam D'Angelo ### - -**Main claim to fame: Co-founder of Quora** - -Credentials: As an engineer at Facebook, [built initial infrastructure for its news feed][111]. Went on to become CTO and VP of engineering at Facebook, before leaving to co-found Quora. [Eighth place finisher at the USA Computing Olympiad][112] as a high school student in 2001. Member of [California Institute of Technology’s silver medal winning team][113] at the ACM International Collegiate Programming Contest in 2004. [Finalist in the Algorithm Coding Competition][114] of Topcoder Collegiate Challenge in 2005. - -Quotes: “An "All-Rounder" Programmer.” [Anonymous][115] - -"For every good thing I make he has like six." [Mark Zuckerberg][116] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_petr_mitrichev-620x465-100502869-orig.jpg) - -Image courtesy [Facebook][117] - -### Petr Mitrechev ### - -**Main claim to fame: One of the top competitive programmers of all time** - -Credentials: [Two-time gold medal winner][118] in the International Olympiad in Informatics (2000, 2002). In 2006, [won the Google Code Jam][119] and was also the [TopCoder Open Algorithm champion][120]. Also, two-time winner of the Facebook Hacker Cup ([2011][121], [2013][122]). At the time of this writing, [the second ranked algorithm competitor on TopCoder][123] (handle: Petr) and also [ranked second by Codeforces][124] - -Quote: “He is an idol in competitive programming even here in India…” [Kavish Dwivedi][125] - -![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_gennady_korot-620x465-100502864-orig.jpg) - -Image courtesy [Ishandutta2007 CC BY-SA 3.0][126] - -### Gennady Korotkevich ### - -**Main claim to fame: Competitive programming prodigy** - -Credentials: Youngest participant ever (age 11) and [6 time gold medalist][127] (2007-2012) in the International Olympiad in Informatics. Part of [the winning team][128] at the ACM International Collegiate Programming Contest in 2013 and winner of the [2014 Facebook Hacker Cup][129]. At the time of this writing, [ranked first by Codeforces][130] (handle: Tourist) and [first among algorithm competitors by TopCoder][131]. - -Quotes: “A programming prodigy!” [Prateek Joshi][132] - -“Gennady is definitely amazing, and visible example of why I have a large development team in Belarus.” [Chris Howard][133] - -“Tourist is genius” [Nuka Shrinivas Rao][134] - --------------------------------------------------------------------------------- - -via: http://www.itworld.com/article/2823547/enterprise-software/158256-superclass-14-of-the-world-s-best-living-programmers.html#slide1 - -作者:[Phil Johnson][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.itworld.com/author/Phil-Johnson/ -[1]:https://www.flickr.com/photos/tombullock/15713223772 -[2]:https://commons.wikimedia.org/wiki/File:Margaret_Hamilton_in_action.jpg -[3]:http://klabs.org/home_page/hamilton.htm -[4]:https://www.youtube.com/watch?v=DWcITjqZtpU&feature=youtu.be&t=3m12s -[5]:http://www.htius.com/Articles/r12ham.pdf -[6]:http://www.htius.com/Articles/Inside_DBTF.htm -[7]:http://www.nasa.gov/home/hqnews/2003/sep/HQ_03281_Hamilton_Honor.html -[8]:http://www.nasa.gov/50th/50th_magazine/scientists.html -[9]:https://books.google.com/books?id=JcmV0wfQEoYC&pg=PA321&lpg=PA321&dq=ada+lovelace+award+1986&source=bl&ots=qGdBKsUa3G&sig=bkTftPAhM1vZ_3VgPcv-38ggSNo&hl=en&sa=X&ved=0CDkQ6AEwBGoVChMI3paoxJHWxwIVA3I-Ch1whwPn#v=onepage&q=ada%20lovelace%20award%201986&f=false -[10]:http://history.nasa.gov/alsj/a11/a11Hamilton.html -[11]:https://www.reddit.com/r/pics/comments/2oyd1y/margaret_hamilton_with_her_code_lead_software/cmrswof -[12]:http://qr.ae/RFEZLk -[13]:http://qr.ae/RFEZUn -[14]:https://www.reddit.com/r/pics/comments/2oyd1y/margaret_hamilton_with_her_code_lead_software/cmrv9u9 -[15]:https://www.flickr.com/photos/44451574@N00/5347112697 -[16]:http://cs.stanford.edu/~uno/taocp.html -[17]:http://awards.acm.org/award_winners/knuth_1013846.cfm -[18]:http://amturing.acm.org/award_winners/knuth_1013846.cfm -[19]:http://www.nsf.gov/od/nms/recip_details.jsp?recip_id=198 -[20]:http://www.ieee.org/documents/von_neumann_rl.pdf -[21]:http://www.computerhistory.org/fellowawards/hall/bios/Donald,Knuth/ -[22]:http://www.quora.com/Who-are-the-best-programmers-in-Silicon-Valley-and-why/answers/3063 -[23]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Jaap-Weel -[24]:http://qr.ae/RFE94x -[25]:http://amturing.acm.org/photo/thompson_4588371.cfm -[26]:https://www.youtube.com/watch?v=JoVQTPbD6UY -[27]:https://www.bell-labs.com/usr/dmr/www/bintro.html -[28]:http://doc.cat-v.org/bell_labs/utf-8_history -[29]:http://c2.com/cgi/wiki?EdIsTheStandardTextEditor -[30]:http://amturing.acm.org/award_winners/thompson_4588371.cfm -[31]:http://www.computer.org/portal/web/awards/cp-thompson -[32]:http://www.uspto.gov/about/nmti/recipients/1998.jsp -[33]:http://www.computerhistory.org/fellowawards/hall/bios/Ken,Thompson/ -[34]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Pete-Prokopowicz-1 -[35]:http://qr.ae/RFEWBY -[36]:https://groups.google.com/forum/#!msg/net.unix-wizards/8twfRPM79u0/1xlglzrWrU0J -[37]:http://www.emacswiki.org/emacs/RichardStallman -[38]:https://www.gnu.org/gnu/thegnuproject.html -[39]:http://www.emacswiki.org/emacs/FreeSoftwareFoundation -[40]:http://awards.acm.org/award_winners/stallman_9380313.cfm -[41]:https://w2.eff.org/awards/pioneer/1998.php -[42]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Greg-Naughton/comment/4146397 -[43]:http://qr.ae/RFEaib -[44]:http://www.quora.com/Software-Engineering/Who-are-some-of-the-greatest-currently-active-software-architects-in-the-world/answer/Marko-Poutiainen -[45]:http://qr.ae/RFEUqp -[46]:https://www.flickr.com/photos/begley/2979906130 -[47]:http://www.taoyue.com/tutorials/pascal/history.html -[48]:http://c2.com/cgi/wiki?AndersHejlsberg -[49]:http://www.microsoft.com/about/technicalrecognition/anders-hejlsberg.aspx -[50]:http://www.drdobbs.com/windows/dr-dobbs-excellence-in-programming-award/184404602 -[51]:http://qr.ae/RFEZrv -[52]:http://www.quora.com/Software-Engineering/Who-are-some-of-the-greatest-currently-active-software-architects-in-the-world/answer/Stefan-Kiryazov -[53]:https://www.flickr.com/photos/vonguard/4076389963/ -[54]:http://www.wizards-of-os.org/archiv/sprecher/a_c/doug_cutting.html -[55]:http://hadoop.apache.org/ -[56]:https://www.linkedin.com/in/cutting -[57]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Shalin-Shekhar-Mangar/comment/2293071 -[58]:http://www.quora.com/Who-are-the-best-programmers-in-Silicon-Valley-and-why/answer/Amit-Nithianandan -[59]:http://awards.acm.org/award_winners/ghemawat_1482280.cfm -[60]:http://research.google.com/pubs/SanjayGhemawat.html -[61]:http://www.quora.com/Google/Who-is-Sanjay-Ghemawat -[62]:http://www8.nationalacademies.org/onpinews/newsitem.aspx?RecordID=02062009 -[63]:http://awards.acm.org/award_winners/ghemawat_1482280.cfm -[64]:http://www.quora.com/Google/Who-is-Sanjay-Ghemawat/answer/Ahmet-Alp-Balkan -[65]:http://research.google.com/people/jeff/index.html -[66]:http://research.google.com/people/jeff/index.html -[67]:http://www8.nationalacademies.org/onpinews/newsitem.aspx?RecordID=02062009 -[68]:http://news.cs.washington.edu/2012/10/10/uw-cse-ph-d-alum-jeff-dean-wins-2012-sigops-mark-weiser-award/ -[69]:http://awards.acm.org/award_winners/dean_2879385.cfm -[70]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Natu-Lauchande -[71]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Cosmin-Negruseri/comment/28399 -[72]:https://commons.wikimedia.org/wiki/File:LinuxCon_Europe_Linus_Torvalds_05.jpg -[73]:http://www.linuxfoundation.org/about/staff#torvalds -[74]:http://git-scm.com/book/en/Getting-Started-A-Short-History-of-Git -[75]:https://w2.eff.org/awards/pioneer/1998.php -[76]:http://www.bcs.org/content/ConWebDoc/14769 -[77]:http://www.zdnet.com/blog/open-source/linus-torvalds-wins-the-tech-equivalent-of-a-nobel-prize-the-millennium-technology-prize/10789 -[78]:http://www.computer.org/portal/web/pressroom/Linus-Torvalds-Named-Recipient-of-the-2014-IEEE-Computer-Society-Computer-Pioneer-Award -[79]:http://www.computerhistory.org/fellowawards/hall/bios/Linus,Torvalds/ -[80]:http://www.internethalloffame.org/inductees/linus-torvalds -[81]:http://qr.ae/RFEeeo -[82]:http://qr.ae/RFEZLk -[83]:http://www.quora.com/Software-Engineering/Who-are-some-of-the-greatest-currently-active-software-architects-in-the-world/answer/Alok-Tripathy-1 -[84]:https://www.flickr.com/photos/quakecon/9434713998 -[85]:http://doom.wikia.com/wiki/John_Carmack -[86]:http://thegamershub.net/2012/04/gaming-gods-john-carmack/ -[87]:http://www.shamusyoung.com/twentysidedtale/?p=4759 -[88]:http://www.interactive.org/special_awards/details.asp?idSpecialAwards=6 -[89]:http://www.itworld.com/article/2951105/it-management/a-fly-named-for-bill-gates-and-9-other-unusual-honors-for-tech-s-elite.html#slide8 -[90]:http://www.gamechoiceawards.com/archive/lifetime.html -[91]:http://qr.ae/RFEEgr -[92]:http://www.itworld.com/answers/topic/software/question/whos-best-living-programmer#comment-424562 -[93]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Greg-Naughton -[94]:http://money.cnn.com/2003/08/21/commentary/game_over/column_gaming/ -[95]:http://dufoli.wordpress.com/2007/06/23/ammmmaaaazing-night/ -[96]:http://bellard.org/ -[97]:http://www.ioccc.org/winners.html#B -[98]:http://www.oscon.com/oscon2011/public/schedule/detail/21161 -[99]:http://bellard.org/pi/pi2700e9/ -[100]:https://news.ycombinator.com/item?id=7850797 -[101]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Erik-Frey/comment/1718701 -[102]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Erik-Frey/comment/2454450 -[103]:http://qr.ae/RFEjhZ -[104]:https://www.flickr.com/photos/craigmurphy/4325516497 -[105]:http://www.amazon.co.uk/gp/product/1935182471?ie=UTF8&tag=developetutor-21&linkCode=as2&camp=1634&creative=19450&creativeASIN=1935182471 -[106]:http://stackexchange.com/leagues/1/alltime/stackoverflow -[107]:http://meta.stackexchange.com/a/9156 -[108]:http://meta.stackexchange.com/a/9138 -[109]:http://meta.stackexchange.com/a/9182 -[110]:https://www.flickr.com/photos/philipn/5326344032 -[111]:http://www.crunchbase.com/person/adam-d-angelo -[112]:http://www.exeter.edu/documents/Exeter_Bulletin/fall_01/oncampus.html -[113]:http://icpc.baylor.edu/community/results-2004 -[114]:https://www.topcoder.com/tc?module=Static&d1=pressroom&d2=pr_022205 -[115]:http://qr.ae/RFfOfe -[116]:http://www.businessinsider.com/in-new-alleged-ims-mark-zuckerberg-talks-about-adam-dangelo-2012-9#ixzz369FcQoLB -[117]:https://www.facebook.com/hackercup/photos/a.329665040399024.91563.133954286636768/553381194694073/?type=1 -[118]:http://stats.ioinformatics.org/people/1849 -[119]:http://googlepress.blogspot.com/2006/10/google-announces-winner-of-global-code_27.html -[120]:http://community.topcoder.com/tc?module=SimpleStats&c=coder_achievements&d1=statistics&d2=coderAchievements&cr=10574855 -[121]:https://www.facebook.com/notes/facebook-hacker-cup/facebook-hacker-cup-finals/208549245827651 -[122]:https://www.facebook.com/hackercup/photos/a.329665040399024.91563.133954286636768/553381194694073/?type=1 -[123]:http://community.topcoder.com/tc?module=AlgoRank -[124]:http://codeforces.com/ratings -[125]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Venkateswaran-Vicky/comment/1960855 -[126]:http://commons.wikimedia.org/wiki/File:Gennady_Korot.jpg -[127]:http://stats.ioinformatics.org/people/804 -[128]:http://icpc.baylor.edu/regionals/finder/world-finals-2013/standings -[129]:https://www.facebook.com/hackercup/posts/10152022955628845 -[130]:http://codeforces.com/ratings -[131]:http://community.topcoder.com/tc?module=AlgoRank -[132]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi -[133]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi/comment/4720779 -[134]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi/comment/4880549 From cdda59280049e2aabc5d6c2346f4ebc217620087 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sun, 15 Nov 2015 20:12:14 +0800 Subject: [PATCH 2454/2517] Create 20150909 Superclass--15 of the world's best living programmers.md --- ... of the world's best living programmers.md | 389 ++++++++++++++++++ 1 file changed, 389 insertions(+) create mode 100644 translated/talk/20150909 Superclass--15 of the world's best living programmers.md diff --git a/translated/talk/20150909 Superclass--15 of the world's best living programmers.md b/translated/talk/20150909 Superclass--15 of the world's best living programmers.md new file mode 100644 index 0000000000..6f59aa13d9 --- /dev/null +++ b/translated/talk/20150909 Superclass--15 of the world's best living programmers.md @@ -0,0 +1,389 @@ +教父们: 15位举世瞩目的程序员 +================================================================================ +当开发人员讨论关于世界顶级程序员时,这些名字往往就会出现。 + +![](http://images.techhive.com/images/article/2015/09/superman-620x465-100611650-orig.jpg) + +图片来源: [tom_bullock CC BY 2.0][1] + +好像现在程序员有很多,其中不乏有许多优秀的程序员。但是期中哪些程序员更好呢? + +虽然这很难客观评价,不过在这个话题确实是开发者们乐于津道的。ITworld针对程序员社区的输入和刷新试图找出可能存在的所谓共识。事实证明,屈指可数的某些名字经常是讨论的焦点。 + +Use the arrows above to read about 15 people commonly cited as the world’s best living programmer.下面就让我们来看看这些世界顶级的程序员吧!(没有箭头呢:P) + +![](http://images.techhive.com/images/article/2015/09/margaret_hamilton-620x465-100611764-orig.jpg) + +图片来源: [NASA][2] + +### 玛格丽特·汉密尔顿 ### + +**成就: 阿波罗飞行控制软件背后的大脑** + +生平: 查尔斯·斯塔克·德雷珀实验室软件工程部的主任,她为首的团队负责设计和打造NASA阿波罗的板载飞行控制器软件和Skylab任务。基于阿波罗这段的工作经历,她又后续开发了[通用系统语言][5]和[开发先于事实][6]的范例。开创了[异步软件、优先调度和超可靠的软件设计][7]理念。被认为发明了“[软件工程][8]”一词。1986年获[奥古斯塔·埃达·洛夫莱斯][9]奖,[2003年获NASA杰出太空行动奖][10]。 + +评论: “汉密尔顿发明了测试,使美国计算机工程规范了很多” [ford_beeblebrox][11] + +“我认为在她之前(不敬地说,包括高德纳在内的)计算机编程是(另一种形式上留存的)数学分支。然而宇宙飞船的飞行控制系统明确地将编程带入了一个崭新的领域。” [Dan Allen][12] + +“... 她引入了‘计算机工程’这个术语 — 并作出了最好的示范。” [David Hamilton][13] + +“真是个坏家伙” [Drukered][14] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_donald_knuth-620x465-100502872-orig.jpg) + +图片来源: [vonguard CC BY-SA 2.0][15] + +### 唐纳德·尔文·克努斯 ### + +**成就: 《计算机程序设计艺术》 作者** + +生平: 撰写了[编程理论的权威书籍][16]。发明了数字排版系统Tex。1971年获得[首次ACM(美国计算机协会)葛丽丝·穆雷·霍普奖][17]。1974年获ACM[图灵奖][18]奖,1979年获[国家科学奖章][19],1995年获IEEE[约翰·冯·诺依曼奖章][20]。1998年入选[计算机历史博物馆名人录][21]。 + +评论: “... 写的计算器编程的艺术可能是有史以来计算机编程最大的贡献。”[佚名][22] + +“唐·克努斯的TeX是我所用过的计算机程序中唯一一个几乎没有bug的。真是让人印象深刻!” [Jaap Weel][23] + +“如果你要问我的话,我只能说太棒了!” [Mitch Rees-Jones][24] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_ken-thompson-620x465-100502874-orig.jpg) + +图片来源: [Association for Computing Machinery][25] + +### 肯尼斯·蓝·汤普逊 ### + +**成就: Unix之父** + +生平: 与[丹尼斯·里奇][26]共同创造了Unix。创造了[B语言][27]、[UTF-8字符编码方案][28]、[ed文本编辑器][29],同时也是Go语言的合作开发人。(同里奇)共同获得1983年的[图灵奖][30],1994年获[IEEE计算机先驱奖][31],1998年获颁[美国国家科技创新奖章][32]。在1997年入选[计算机历史博物馆名人录][33]。 + +评论: “... 可能是有史以来最能成事的程序员了。Unix内核,Unix用具,国际象棋程序世界冠军Belle,Plan 9,Go语言。” [Pete Prokopowicz][34] + +“肯所做出的贡献,据我所知无人能及,是如此的根本、实用、经得住时间的考验,时至今日仍在使用。” [Jan Jannink][35] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_richard_stallman-620x465-100502868-orig.jpg) + +图片来源: Jiel Beaumadier CC BY-SA 3.0 + +### 理查德·斯托曼 ### + +**成就: Emacs和GCC缔造者** + +生平: 成立了[GNU工程] [36],并创造了许多的核心工具,如[Emacs, GCC, GDB][37]和[GNU Make][38]。还创办了[自由软件基金会] [39]。1990 荣获ACM[葛丽丝·穆雷·霍普奖][40],[1998获EFF先驱奖][41]. + +评论: “... 在Symbolics对阵LMI的战斗中,独自一人与一众Lisp黑客好手对码。” [Srinivasan Krishnan][42] + +“通过他在编程上的造诣与强大信念,开辟了一整套编程与计算机的亚文化。” [Dan Dunay][43] + +“我可以不赞同这位伟人的很多方面,但不可否认无论活着还是死去,他都已经是一位伟大的程序员了。” [Marko Poutiainen][44] + +“试想Linux如果没有GNU工程的前期工作。斯托曼就是这个炸弹包,哟。” [John Burnette][45] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_anders_hejlsberg-620x465-100502873-orig.jpg) + +图片来源: [D.Begley CC BY 2.0][46] + +### 安德斯·海尔斯伯格 ### + +**成就: 创造了Turbo Pascal** + +生平: [Turbo Pascal的原作者][47],是最流行的Pascal编译器和第一个集成开发环境。而后,[领导了Delphi][48]和下一代Turbo Pascal的构建。[C#的主要设计师和架构师][49]。2001年荣获[Dr. Dobb's杰出编程奖][50]。 + +评论: “他用汇编在主流PC操作系统day(DOS and CPM)上编写了[Pascal]的编译器。用它来编译、链接并运行仅需几秒钟而不是几分钟。” [Steve Wood][51] + +“我佩服他 - 他创造了我最喜欢的开发工具,陪伴着我度过了三个关键的时期直至我成为一位专业的软件工程师。” [Stefan Kiryazov][52] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_doug_cutting-620x465-100502871-orig.jpg) + +图片来源: [vonguard CC BY-SA 2.0][53] + +### Doug Cutting ### + +**成就: 创造了Lucene** + +生平: [开发了Lucene搜索引擎、Web爬虫Nutch][54]和[对于大型数据集的分布式处理套件Hadoop][55]。一位强有力的开源支持者(Lucene、Nutch以及Hadoop都是开源的)。前[Apache软件基金的理事][56]。 + +评论: “...他就是那个即写出了优秀搜索框架(lucene/solr),又为世界开启大数据之门(hadoop)的男人。” [Rajesh Rao][57] + +“他在Lucene和Hadoop(及其它工程)的创造/工作中为世界创造了巨大的财富和就业...” [Amit Nithianandan][58] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_sanjay_ghemawat-620x465-100502876-orig.jpg) + +图片来源: [Association for Computing Machinery][59] + +### Sanjay Ghemawat ### + +**成就: 谷歌核心架构师** + +生平: [协助设计和实现了一些谷歌大型分布式系统的功能][60],包括MapReduce、BigTable、Spanner和谷歌文件系统。[创造了Unix的 ical][61]日历系统。2009年入选[国家工程院][62]。2012年荣获[ACM-Infosys基金计算机科学奖][63]。 + +评论: “Jeff Dean的僚机。” [Ahmet Alp Balkan][64] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_jeff_dean-620x465-100502866-orig.jpg) + +图片来源: [Google][65] + +### Jeff Dean ### + +**成就: 谷歌索引搜索背后的大脑** + +生平: 协助设计和实现了[许多谷歌大型分布式系统的功能][66],包括网页爬虫,索引搜索,AdSense,MapReduce,BigTable和Spanner。2009年入选[国家工程院][67]。2012年荣获ACM [SIGOPS马克·维瑟奖][68]及[ACM-Infosys基金计算机科学奖][69]。 + +评论: “... 带来的在数据挖掘(GFS、MapReduce、BigTable)上的突破。” [Natu Lauchande][70] + +“... 设计、构建并部署MapReduce和BigTable,和以及数不清的东西” [Erik Goldman][71] + +![](http://images.techhive.com/images/article/2015/09/linus_torvalds-620x465-100611765-orig.jpg) + +图片来源: [Krd CC BY-SA 4.0][72] + +### 林纳斯·托瓦兹 ### + +**成就: Linux缔造者** + +生平: 创造了[Linux内核][73]与[开源版本控制器Git][74]。收获了许多奖项和荣誉,包括有1998年的[EFF先驱奖][75],2000年荣获[英国电脑学会授予的洛夫莱斯勋章][76],2012年荣获[千禧技术奖][77]还有2014年[IEEE计算机学会授予的计算机先驱奖][78]。同样入选了2008年的[计算机历史博物馆名人录][79]与2012年的[网络名人堂][80]。 + +评论: “他只用了几年的时间就写出了Linux内核,而GNU Hurd(GNU开发的内核)历经25年的开发却丝毫没有准备发布的意思。他的成就就是带来了希望。” [Erich Ficker][81] + +“托沃兹可能是程序员的程序员。” [Dan Allen][82] + +“他真的很棒。” [Alok Tripathy][83] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_john_carmack-620x465-100502867-orig.jpg) + +图片来源: [QuakeCon CC BY 2.0][84] + +### 约翰·卡马克 ### + +**成就: 毁灭战士缔造者** + +生平: ID社联合创始人,打造了德军总部3D、毁灭战士和雷神之锤等所谓的即使FPS游戏。引领了[切片适配更新(adaptive tile refresh)][86], [二叉空间分割(binary space partitioning)][87],表面缓存(surface caching)等开创性的计算机图像技术。2001年入选[互动艺术与科学学会名人堂][88],2007年和2008年荣获工程技术类[艾美奖][89]并于2010年由[游戏开发者甄选奖][90]授予终生成就奖。 + +评论: “他在写第一个渲染引擎的时候不到20岁。这家伙这是个天才。我若有他四分之一的天赋便心满意足了。” [Alex Dolinsky][91] + +“... 德军总部3D,、毁灭战士还有雷神之锤在那时都是革命性的,影响了一代游戏设计师。” [dniblock][92] + +“一个周末他几乎可以写出任何东西....” [Greg Naughton][93] + +“他是编程界的莫扎特... [Chris Morris][94] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_fabrice_bellard-620x465-100502870-orig.jpg) + +图片来源: [Duff][95] + +### 法布里斯·贝拉 ### + +**成就: 创造了QEMU** + +生平: 创造了[一系列耳熟能详的开源软件][96],其中包括硬件模拟和虚拟化的平台QEMU,用于处理多媒体数据的FFmpeg,微型C编译器和 一个可执行文件压缩软件LZEXE。2000年和2001年[C语言混乱代码大赛的获胜者][97]并在2011年荣获[Google-O'Reilly开源奖][98]。[计算Pi最多位数][99]的前世界纪录保持着。 + +评论: “我觉得法布里斯·贝拉做的每一件事都是那么显著而又震撼。” [raphinou][100] + +“法布里斯·贝拉是世界上最高产的程序员...” [Pavan Yara][101] + +“他就像软件工程界的尼古拉·特斯拉。” [Michael Valladolid][102] + +“自80年代以来,他一直高产出一些列的成功作品。” [Michael Biggins][103] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_jon_skeet-620x465-100502863-orig.jpg) + +图片来源: [Craig Murphy CC BY 2.0][104] + +### Jon Skeet ### + +**成就: Stack Overflow传说级贡献者** + +生平: Google工程师[深入解析C#][105]的作者。保持着[有史以来在Stack Overflow上最高的声誉][106],平均每月解答390个问题。 + +评论: “他根本不需要调试器,只要他盯一下代码,错误之处自会原形毕露。” [Steven A. Lowe][107] + +“如果他的代码没有通过编译,那编译器应该道歉。” [Dan Dyer][108] + +“他根本不需要什么编程规范,他的代码就是编程规范。” [Anonymous][109] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_image_adam_dangelo-620x465-100502875-orig.jpg) + +图片来源: [Philip Neustrom CC BY 2.0][110] + +### 亚当·安捷罗 ### + +**成就: Quora的创办人之一** + +生平: 还是Facebook工程师时,[为其搭建了news feed功能的基础][111]。直至其离开并联合创始了Quora,已经成为了Facebook的CTO和工程VP。2001年以高中生的身份在[美国计算机奥林匹克上第八位完成比赛][112]。2004年ACM国际大学生编程大赛[获得银牌的团队 - 加利福尼亚技术研究所][113]的成员。2005年入围Topcoder大学生[算法编程挑战赛][114]。 + +评论: “一位程序设计全才。” [Anonymous][115] + +"我做的每个好东西,他都已有了六个。" [Mark Zuckerberg][116] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_petr_mitrichev-620x465-100502869-orig.jpg) + +图片来源: [Facebook][117] + +### Petr Mitrechev ### + +**成就: 有史以来最具竞技能力的程序员之一** + +生平: 在国际信息学奥林匹克中[两次获得金牌][118](2000,2002)。在2006,[赢得Google Code Jam][119]同时也是[TopCoder Open算法大赛冠军][120]。也同样,两次赢得Facebook黑客杯([2011][121],[2013][122])。写这篇文章的时候,[TopCoder榜中排第二][123] (即:Petr)、在[Codeforces榜同样排第二][124]。 + +评论: “他是竞技程序员的偶像,即使在印度也是如此...[Kavish Dwivedi][125] + +![](http://images.techhive.com/images/idge/imported/imageapi/2014/10/08/17/slide_gennady_korot-620x465-100502864-orig.jpg) + +图片来源: [Ishandutta2007 CC BY-SA 3.0][126] + +### Gennady Korotkevich ### + +**成就: 竞技编程小神童** + +生平: 国际信息学奥林匹克中最小参赛者(11岁)[6次获得金牌][127] (2007-2012)。2013年ACM国际大学生编程大赛[获胜队伍][128]成员及[2014 Facebook黑客杯][129]获胜者。写这篇文章的时候,[Codeforces榜排名第一][130] (即:Tourist)、[TopCoder榜第一][131]。 + +评论: “一个编程神童!” [Prateek Joshi][132] + +“Gennady真是棒,也是为什么我在白俄罗斯拥有一个强大开发团队的例证。” [Chris Howard][133] + +“Tourist真是天才” [Nuka Shrinivas Rao][134] + +-------------------------------------------------------------------------------- + +via: http://www.itworld.com/article/2823547/enterprise-software/158256-superclass-14-of-the-world-s-best-living-programmers.html#slide1 + +作者:[Phil Johnson][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.itworld.com/author/Phil-Johnson/ +[1]:https://www.flickr.com/photos/tombullock/15713223772 +[2]:https://commons.wikimedia.org/wiki/File:Margaret_Hamilton_in_action.jpg +[3]:http://klabs.org/home_page/hamilton.htm +[4]:https://www.youtube.com/watch?v=DWcITjqZtpU&feature=youtu.be&t=3m12s +[5]:http://www.htius.com/Articles/r12ham.pdf +[6]:http://www.htius.com/Articles/Inside_DBTF.htm +[7]:http://www.nasa.gov/home/hqnews/2003/sep/HQ_03281_Hamilton_Honor.html +[8]:http://www.nasa.gov/50th/50th_magazine/scientists.html +[9]:https://books.google.com/books?id=JcmV0wfQEoYC&pg=PA321&lpg=PA321&dq=ada+lovelace+award+1986&source=bl&ots=qGdBKsUa3G&sig=bkTftPAhM1vZ_3VgPcv-38ggSNo&hl=en&sa=X&ved=0CDkQ6AEwBGoVChMI3paoxJHWxwIVA3I-Ch1whwPn#v=onepage&q=ada%20lovelace%20award%201986&f=false +[10]:http://history.nasa.gov/alsj/a11/a11Hamilton.html +[11]:https://www.reddit.com/r/pics/comments/2oyd1y/margaret_hamilton_with_her_code_lead_software/cmrswof +[12]:http://qr.ae/RFEZLk +[13]:http://qr.ae/RFEZUn +[14]:https://www.reddit.com/r/pics/comments/2oyd1y/margaret_hamilton_with_her_code_lead_software/cmrv9u9 +[15]:https://www.flickr.com/photos/44451574@N00/5347112697 +[16]:http://cs.stanford.edu/~uno/taocp.html +[17]:http://awards.acm.org/award_winners/knuth_1013846.cfm +[18]:http://amturing.acm.org/award_winners/knuth_1013846.cfm +[19]:http://www.nsf.gov/od/nms/recip_details.jsp?recip_id=198 +[20]:http://www.ieee.org/documents/von_neumann_rl.pdf +[21]:http://www.computerhistory.org/fellowawards/hall/bios/Donald,Knuth/ +[22]:http://www.quora.com/Who-are-the-best-programmers-in-Silicon-Valley-and-why/answers/3063 +[23]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Jaap-Weel +[24]:http://qr.ae/RFE94x +[25]:http://amturing.acm.org/photo/thompson_4588371.cfm +[26]:https://www.youtube.com/watch?v=JoVQTPbD6UY +[27]:https://www.bell-labs.com/usr/dmr/www/bintro.html +[28]:http://doc.cat-v.org/bell_labs/utf-8_history +[29]:http://c2.com/cgi/wiki?EdIsTheStandardTextEditor +[30]:http://amturing.acm.org/award_winners/thompson_4588371.cfm +[31]:http://www.computer.org/portal/web/awards/cp-thompson +[32]:http://www.uspto.gov/about/nmti/recipients/1998.jsp +[33]:http://www.computerhistory.org/fellowawards/hall/bios/Ken,Thompson/ +[34]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Pete-Prokopowicz-1 +[35]:http://qr.ae/RFEWBY +[36]:https://groups.google.com/forum/#!msg/net.unix-wizards/8twfRPM79u0/1xlglzrWrU0J +[37]:http://www.emacswiki.org/emacs/RichardStallman +[38]:https://www.gnu.org/gnu/thegnuproject.html +[39]:http://www.emacswiki.org/emacs/FreeSoftwareFoundation +[40]:http://awards.acm.org/award_winners/stallman_9380313.cfm +[41]:https://w2.eff.org/awards/pioneer/1998.php +[42]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Greg-Naughton/comment/4146397 +[43]:http://qr.ae/RFEaib +[44]:http://www.quora.com/Software-Engineering/Who-are-some-of-the-greatest-currently-active-software-architects-in-the-world/answer/Marko-Poutiainen +[45]:http://qr.ae/RFEUqp +[46]:https://www.flickr.com/photos/begley/2979906130 +[47]:http://www.taoyue.com/tutorials/pascal/history.html +[48]:http://c2.com/cgi/wiki?AndersHejlsberg +[49]:http://www.microsoft.com/about/technicalrecognition/anders-hejlsberg.aspx +[50]:http://www.drdobbs.com/windows/dr-dobbs-excellence-in-programming-award/184404602 +[51]:http://qr.ae/RFEZrv +[52]:http://www.quora.com/Software-Engineering/Who-are-some-of-the-greatest-currently-active-software-architects-in-the-world/answer/Stefan-Kiryazov +[53]:https://www.flickr.com/photos/vonguard/4076389963/ +[54]:http://www.wizards-of-os.org/archiv/sprecher/a_c/doug_cutting.html +[55]:http://hadoop.apache.org/ +[56]:https://www.linkedin.com/in/cutting +[57]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Shalin-Shekhar-Mangar/comment/2293071 +[58]:http://www.quora.com/Who-are-the-best-programmers-in-Silicon-Valley-and-why/answer/Amit-Nithianandan +[59]:http://awards.acm.org/award_winners/ghemawat_1482280.cfm +[60]:http://research.google.com/pubs/SanjayGhemawat.html +[61]:http://www.quora.com/Google/Who-is-Sanjay-Ghemawat +[62]:http://www8.nationalacademies.org/onpinews/newsitem.aspx?RecordID=02062009 +[63]:http://awards.acm.org/award_winners/ghemawat_1482280.cfm +[64]:http://www.quora.com/Google/Who-is-Sanjay-Ghemawat/answer/Ahmet-Alp-Balkan +[65]:http://research.google.com/people/jeff/index.html +[66]:http://research.google.com/people/jeff/index.html +[67]:http://www8.nationalacademies.org/onpinews/newsitem.aspx?RecordID=02062009 +[68]:http://news.cs.washington.edu/2012/10/10/uw-cse-ph-d-alum-jeff-dean-wins-2012-sigops-mark-weiser-award/ +[69]:http://awards.acm.org/award_winners/dean_2879385.cfm +[70]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Natu-Lauchande +[71]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Cosmin-Negruseri/comment/28399 +[72]:https://commons.wikimedia.org/wiki/File:LinuxCon_Europe_Linus_Torvalds_05.jpg +[73]:http://www.linuxfoundation.org/about/staff#torvalds +[74]:http://git-scm.com/book/en/Getting-Started-A-Short-History-of-Git +[75]:https://w2.eff.org/awards/pioneer/1998.php +[76]:http://www.bcs.org/content/ConWebDoc/14769 +[77]:http://www.zdnet.com/blog/open-source/linus-torvalds-wins-the-tech-equivalent-of-a-nobel-prize-the-millennium-technology-prize/10789 +[78]:http://www.computer.org/portal/web/pressroom/Linus-Torvalds-Named-Recipient-of-the-2014-IEEE-Computer-Society-Computer-Pioneer-Award +[79]:http://www.computerhistory.org/fellowawards/hall/bios/Linus,Torvalds/ +[80]:http://www.internethalloffame.org/inductees/linus-torvalds +[81]:http://qr.ae/RFEeeo +[82]:http://qr.ae/RFEZLk +[83]:http://www.quora.com/Software-Engineering/Who-are-some-of-the-greatest-currently-active-software-architects-in-the-world/answer/Alok-Tripathy-1 +[84]:https://www.flickr.com/photos/quakecon/9434713998 +[85]:http://doom.wikia.com/wiki/John_Carmack +[86]:http://thegamershub.net/2012/04/gaming-gods-john-carmack/ +[87]:http://www.shamusyoung.com/twentysidedtale/?p=4759 +[88]:http://www.interactive.org/special_awards/details.asp?idSpecialAwards=6 +[89]:http://www.itworld.com/article/2951105/it-management/a-fly-named-for-bill-gates-and-9-other-unusual-honors-for-tech-s-elite.html#slide8 +[90]:http://www.gamechoiceawards.com/archive/lifetime.html +[91]:http://qr.ae/RFEEgr +[92]:http://www.itworld.com/answers/topic/software/question/whos-best-living-programmer#comment-424562 +[93]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Greg-Naughton +[94]:http://money.cnn.com/2003/08/21/commentary/game_over/column_gaming/ +[95]:http://dufoli.wordpress.com/2007/06/23/ammmmaaaazing-night/ +[96]:http://bellard.org/ +[97]:http://www.ioccc.org/winners.html#B +[98]:http://www.oscon.com/oscon2011/public/schedule/detail/21161 +[99]:http://bellard.org/pi/pi2700e9/ +[100]:https://news.ycombinator.com/item?id=7850797 +[101]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Erik-Frey/comment/1718701 +[102]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Erik-Frey/comment/2454450 +[103]:http://qr.ae/RFEjhZ +[104]:https://www.flickr.com/photos/craigmurphy/4325516497 +[105]:http://www.amazon.co.uk/gp/product/1935182471?ie=UTF8&tag=developetutor-21&linkCode=as2&camp=1634&creative=19450&creativeASIN=1935182471 +[106]:http://stackexchange.com/leagues/1/alltime/stackoverflow +[107]:http://meta.stackexchange.com/a/9156 +[108]:http://meta.stackexchange.com/a/9138 +[109]:http://meta.stackexchange.com/a/9182 +[110]:https://www.flickr.com/photos/philipn/5326344032 +[111]:http://www.crunchbase.com/person/adam-d-angelo +[112]:http://www.exeter.edu/documents/Exeter_Bulletin/fall_01/oncampus.html +[113]:http://icpc.baylor.edu/community/results-2004 +[114]:https://www.topcoder.com/tc?module=Static&d1=pressroom&d2=pr_022205 +[115]:http://qr.ae/RFfOfe +[116]:http://www.businessinsider.com/in-new-alleged-ims-mark-zuckerberg-talks-about-adam-dangelo-2012-9#ixzz369FcQoLB +[117]:https://www.facebook.com/hackercup/photos/a.329665040399024.91563.133954286636768/553381194694073/?type=1 +[118]:http://stats.ioinformatics.org/people/1849 +[119]:http://googlepress.blogspot.com/2006/10/google-announces-winner-of-global-code_27.html +[120]:http://community.topcoder.com/tc?module=SimpleStats&c=coder_achievements&d1=statistics&d2=coderAchievements&cr=10574855 +[121]:https://www.facebook.com/notes/facebook-hacker-cup/facebook-hacker-cup-finals/208549245827651 +[122]:https://www.facebook.com/hackercup/photos/a.329665040399024.91563.133954286636768/553381194694073/?type=1 +[123]:http://community.topcoder.com/tc?module=AlgoRank +[124]:http://codeforces.com/ratings +[125]:http://www.quora.com/Respected-Software-Engineers/Who-are-some-of-the-best-programmers-in-the-world/answer/Venkateswaran-Vicky/comment/1960855 +[126]:http://commons.wikimedia.org/wiki/File:Gennady_Korot.jpg +[127]:http://stats.ioinformatics.org/people/804 +[128]:http://icpc.baylor.edu/regionals/finder/world-finals-2013/standings +[129]:https://www.facebook.com/hackercup/posts/10152022955628845 +[130]:http://codeforces.com/ratings +[131]:http://community.topcoder.com/tc?module=AlgoRank +[132]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi +[133]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi/comment/4720779 +[134]:http://www.quora.com/Computer-Programming/Who-is-the-best-programmer-in-the-world-right-now/answer/Prateek-Joshi/comment/4880549 From 7f0afaae3f14b763bc5d2947ef9bf675b65ad997 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 15 Nov 2015 21:29:35 +0800 Subject: [PATCH 2455/2517] =?UTF-8?q?=E6=A0=A1=E5=AF=B9=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tory Of Aix HP-UX Solaris BSD And LINUX.md | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md b/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md index 1ee2151703..b35c7b7ebf 100644 --- a/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md +++ b/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md @@ -2,11 +2,11 @@ Aix, HP-UX, Solaris, BSD, 和 LINUX 简史 ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/05/linux-712x445.png) -有句话说,当一扇门在你面前关上的时候,另一扇门就会打开。[Ken Thompson][1] 和 [Dennis Richie][2] 两个人就是最好的例子。他们俩是 **20世纪** 最优秀的信息技术专家,因为他们创造了 **UNIX**,最具影响力和创新性的软件之一。 +要记住,当一扇门在你面前关闭的时候,另一扇门就会打开。[Ken Thompson][1] 和 [Dennis Richie][2] 两个人就是这句名言很好的实例。他们俩是 **20世纪** 最优秀的信息技术专家,因为他们创造了 **UNIX**,最具影响力和创新性的软件之一。 ### UNIX 系统诞生于贝尔实验室 ### -**UNIX** 最开始的名字是 **UNICS** (**UN**iplexed **I**nformation and **C**omputing **S**ervice),它有一个大家庭,并不是从石头里蹦出来的。UNIX的祖父是 **CTSS** (**C**ompatible **T**ime **S**haring **S**ystem),它的父亲是 **Multics** (**MULT**iplexed **I**nformation and **C**omputing **S**ervice),这个系统能支持大量用户通过交互式分时使用大型机。 +**UNIX** 最开始的名字是 **UNICS** (**UN**iplexed **I**nformation and **C**omputing **S**ervice),它有一个大家庭,并不是从石头缝里蹦出来的。UNIX的祖父是 **CTSS** (**C**ompatible **T**ime **S**haring **S**ystem),它的父亲是 **Multics** (**MULT**iplexed **I**nformation and **C**omputing **S**ervice),这个系统能支持大量用户通过交互式分时使用大型机。 UNIX 诞生于 **1969** 年,由 **Ken Thompson** 以及后来加入的 **Dennis Richie** 共同完成。这两位优秀的研究员和科学家一起在一个**通用电子**和**麻省理工学院**的合作项目里工作,项目目标是开发一个叫 Multics 的交互式分时系统。 @@ -20,70 +20,70 @@ UNIX 的第一声啼哭是在一台 PDP-7 微型机上,它是 Thompson 测试 > “我们想要的不仅是一个优秀的编程环境,而是能围绕这个系统形成团体。按我们自己的经验,通过远程访问和分时共享主机实现的公共计算,本质上不只是用终端输入程序代替打孔机而已,而是鼓励密切沟通。”Dennis Richie 说。 -UNIX 是第一个靠近理想的系统,在这里程序员可以坐在机器前自由摆弄程序,探索各种可能性并随手测试。在 UNIX 整个生命周期里,因为大量因为其他操作系统限制而投身过来的高手做出的无私贡献,它的功能模型一直保持上升趋势。 +UNIX 是第一个靠近理想的系统,在这里程序员可以坐在机器前自由摆弄程序,探索各种可能性并随手测试。在 UNIX 整个生命周期里,它吸引了大量因其他操作系统限制而投身过来的高手做出无私贡献,因此它的功能模型一直保持上升趋势。 UNIX 在 1970 年因为 PDP-11/20 获得了首次资金注入,之后正式更名为 UNIX 并支持在 PDP-11/20 上运行。UNIX 带来的第一次收获是在 1971 年,贝尔实验室的专利部门配备来做文字处理。 ### UNIX 上的 C 语言革命 ### -Dennis Richie 在 1972 年发明了一种叫 “**C**” 的高级编程语言,之后他和 Ken Thompson 决定用 “C” 重写 UNIX 系统,来支持更好的移植性。他们在那一年里编写和调试了差不多 100,000 行代码。在使用了 “C” 语言后,系统可移植性非常好,只需要修改一小部分机器相关的代码就可以将 UNIX 移植到其他计算机平台上。 +Dennis Richie 在 1972 年发明了一种叫 “**C**” 的高级编程语言 ,之后他和 Ken Thompson 决定用 “C” 重写 UNIX 系统,来支持更好的移植性。他们在那一年里编写和调试了差不多 100,000 行代码。在使用了 “C” 语言后,系统可移植性非常好,只需要修改一小部分机器相关的代码就可以将 UNIX 移植到其他计算机平台上。 -UNIX 第一次公开露面是在 1973 年 Dennis Ritchie 和 Ken Thompson 在操作系统原理上发表的一篇论文,然后 AT&T 发布了 UNIX 系统第 5 版,并授权给教育机构使用,然后在 1976 年第一次以 **$20.000** 的价格授权企业使用 UNIX 第 6 版。应用最广泛的是 1980 年发布的 UNIX 第 7 版,任何人都可以购买,只是授权条款非常有限。授权内容包括源代码,以及用 PDP-11 汇编语言写的及其相关内核。各种版本 UNIX 系统完全由它的用户手册确定。 +UNIX 第一次公开露面是 1973 年 Dennis Ritchie 和 Ken Thompson 在操作系统原理上发表的一篇论文,然后 AT&T 发布了 UNIX 系统第 5 版,并授权给教育机构使用,然后在 1976 年第一次以 **$20.000** 的价格授权企业使用 UNIX 第 6 版。应用最广泛的是 1980 年发布的 UNIX 第 7 版,任何人都可以购买授权,只是授权条款非常有限。授权内容包括源代码,以及用 PDP-11 汇编语言写的及其相关内核。反正,各种版本 UNIX 系统完全由它的用户手册确定。 ### AIX 系统 ### -在 **1983** 年,**Microsoft** 计划开发 **Xenix** 作为 MS-DOS 的多用户版继任者,他们在那一年花了 $8,000 搭建了一台拥有 **512 KB** 内存以及 **10 MB**硬盘并运行 Xenix 的 Altos 586。而到 1984 年为止,全世界已经安装了超过 100,000 份 UNIX System V 第二版。在 1986 年发布了包含因特网域名服务的 4.3BSD,而且 **IBM** 宣布 **AIX 系统**的安装数已经超过 250,000。AIX 基于 Unix System V 开发,这套系统拥有 BSD 风格的根文件系统,是两者的结合。 - -AIX 第一次引入了 **日志文件系统 (JFS)** 以及集成逻辑卷管理器 (LVM)。IBM 在 1989 年将 AIX 移植到自己的 RS/6000 平台。2001 年发布的 5L 版是一个突破性的版本,提供了 Linux 友好性以及支持 Power4 服务器的逻辑分区。 - +在 **1983** 年,**Microsoft** 计划开发 **Xenix** 作为 MS-DOS 的多用户版继任者,他们在那一年花了 $8,000 搭建了一台拥有 **512 KB** 内存以及 **10 MB**硬盘并运行 Xenix 的 Altos 586。而到 1984 年为止,全世界 UNIX System V 第二版的安装数量已经超过了 100,000 。在 1986 年发布了包含因特网域名服务的 4.3BSD,而且 **IBM** 宣布 **AIX 系统**的安装数已经超过 250,000。AIX 基于 Unix System V 开发,这套系统拥有 BSD 风格的根文件系统,是两者的结合。 + +AIX 第一次引入了 **日志文件系统 (JFS)** 以及集成逻辑卷管理器 (LVM)。IBM 在 1989 年将 AIX 移植到自己的 RS/6000 平台。2001 年发布的 5L 版是一个突破性的版本,提供了 Linux 友好性以及支持 Power4 服务器的逻辑分区。 + 在 2004 年发布的 AIX 5.3 引入了支持 Advanced Power Virtualization (APV) 的虚拟化技术,支持对称多线程,微分区,以及可分享的处理器池。 - + 在 2007 年,IBM 同时发布 AIX 6.1 和 Power6 架构,开始加强自己的虚拟化产品。他们还将 Advanced Power Virtualization 重新包装成 PowerVM。 - + 这次改进包括被称为 WPARs 的负载分区形式,类似于 Solaris 的 zones/Containers,但是功能更强。 ### HP-UX 系统 ### - + **惠普 UNIX (HP-UX)** 源于 System V 第 3 版。这套系统一开始只支持 PA-RISC HP 9000 平台。HP-UX 第 1 版发布于 1984 年。 - + HP-UX 第 9 版引入了 SAM,一个基于角色的图形用户界面 (GUI),用户可以用来管理整个系统。在 1995 年发布的第 10 版,调整了系统文件分布以及目录结构,变得有点类似 AT&T SVR4。 - + 第 11 版发布于 1997 年。这是 HP 第一个支持 64 位寻址的版本。不过在 2000 年重新发布成 11i,因为 HP 为特定的信息技术目的,引入了操作环境和分级应用的捆绑组。 - + 在 2001 年发布的 11.20 版宣称支持 Itanium 系统。HP-UX 是第一个使用 ACLs(访问控制列表)管理文件权限的 UNIX 系统,也是首先支持内建逻辑卷管理器的系统之一。 - + 如今,HP-UX 因为 HP 和 Veritas 的合作关系使用了 Veritas 作为主文件系统。 - + HP-UX 目前最新的版是 11iv3, update 4。 ### Solaris 系统 ### - + Sun 的 UNIX 版本是 **Solaris**,用来接替 1992 年创建的 **SunOS**。SunOS 一开始基于 BSD(伯克利软件发行版)风格的 UNIX,但是 SunOS 5.0 版以及之后的版本都是基于重新包装成 Solaris 的 Unix System V 第 4 版。 - + SunOS 1.0 版于 1983 年发布,用于支持 Sun-1 和 Sun-2 平台。随后在 1985 年发布了 2.0 版。在 1987 年,Sun 和 AT&T 宣布合作一个项目以 SVR4 为基础将 System V 和 BSD 合并成一个版本。 - + Solaris 2.4 是 Sun 发布的第一个 Sparc/x86 版本。1994 年 11 月份发布的 SunOS 4.1.4 版是最后一个版本。Solaris 7 是首个 64 位 Ultra Sparc 版本,加入了对文件系统元数据记录的原生支持。 - + Solaris 9 发布于 2002 年,支持 Linux 特性以及 Solaris 卷管理器。之后,2005 年发布了 Solaris 10,带来许多创新,比如支持 Solaris Containers,新的 ZFS 文件系统,以及逻辑域。 - + 目前 Solaris 最新的版本是 第 10 版,最后的更新发布于 2008 年。 ### Linux ### - + 到了 1991 年,用来替代商业操作系统的免费系统的需求日渐高涨。因此 **Linus Torvalds** 开始构建一个免费操作系统,最终成为 **Linux**。Linux 最开始只有一些 “C” 文件,并且使用了阻止商业发行的授权。Linux 是一个类 UNIX 系统但又不尽相同。 -2015 年 发布了基于 GNU Public License 授权的 3.18 版。IBM 声称有超过 1800 万行开源代码开放给开发者。 - +2015 年 发布了基于 GNU Public License 授权的 3.18 版。IBM 声称有超过 1800 万行开源代码开放给开发者。 + 如今 GNU Public License 是应用最广泛的免费软件授权方式。根据开源软件原则,这份授权允许个人和企业自由分发,运行,通过拷贝共享,学习,以及修改软件源码。 ### UNIX vs. Linux: 技术概要 ### - -- Linux 鼓励多样性,Linux 的开发人员有更宽广的背景,有更多不同经验和意见。 -- Linux 比 UNIX 支持更多的平台和架构。 -- UNIX 商业版本的开发人员会为他们的操作系统考虑特定目标平台以及用户。 -- **Linux 比 UNIX 有更好的安全性**,更少受病毒或恶意软件攻击。Linux 上大约有 60-100 种病毒,但是没有任何一种还在传播。另一方面,UNIX 上大约有 85-120 种病毒,但是其中有一些还在传播中。 -- 通过 UNIX 命令,系统上的工具和元素很少改变,甚至很多接口和命令行参数在后续 UNIX 版本中一直沿用。 -- 有些 Linux 开发项目以自愿为基础进行资助,比如 Debian。其他项目会维护一个和商业 Linux 的社区版,比如 SUSE 的 openSUSE 以及红帽的 Fedora。 + +- Linux 鼓励多样性,Linux 的开发人员有更宽广的背景,有更多不同经验和意见。 +- Linux 比 UNIX 支持更多的平台和架构。 +- UNIX 商业版本的开发人员会为他们的操作系统考虑特定目标平台以及用户。 +- **Linux 比 UNIX 有更好的安全性**,更少受病毒或恶意软件攻击。Linux 上大约有 60-100 种病毒,但是没有任何一种还在传播。另一方面,UNIX 上大约有 85-120 种病毒,但是其中有一些还在传播中。 +- 通过 UNIX 命令,系统上的工具和元素很少改变,甚至很多接口和命令行参数在后续 UNIX 版本中一直沿用。 +- 有些 Linux 开发项目以自愿为基础进行资助,比如 Debian。其他项目会维护一个和商业 Linux 的社区版,比如 SUSE 的 openSUSE 以及红帽的 Fedora。 - 传统 UNIX 是扩大规模,而另一方面 Linux 是扩大范围。 -------------------------------------------------------------------------------- From d982b37a3ba54754e2c2b53cb42cf81029befd20 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Sun, 15 Nov 2015 22:14:24 +0800 Subject: [PATCH 2456/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...f History Of Aix HP-UX Solaris BSD And LINUX.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md b/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md index b35c7b7ebf..921f1a57aa 100644 --- a/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md +++ b/translated/talk/20151012 The Brief History Of Aix HP-UX Solaris BSD And LINUX.md @@ -46,7 +46,7 @@ AIX 第一次引入了 **日志文件系统 (JFS)** 以及集成逻辑卷管理 **惠普 UNIX (HP-UX)** 源于 System V 第 3 版。这套系统一开始只支持 PA-RISC HP 9000 平台。HP-UX 第 1 版发布于 1984 年。 -HP-UX 第 9 版引入了 SAM,一个基于角色的图形用户界面 (GUI),用户可以用来管理整个系统。在 1995 年发布的第 10 版,调整了系统文件分布以及目录结构,变得有点类似 AT&T SVR4。 +HP-UX 第 9 版引入了 SAM,一个基于字符的图形用户界面 (GUI),用户可以用来管理整个系统。在 1995 年发布的第 10 版,调整了系统文件分布以及目录结构,变得有点类似 AT&T SVR4。 第 11 版发布于 1997 年。这是 HP 第一个支持 64 位寻址的版本。不过在 2000 年重新发布成 11i,因为 HP 为特定的信息技术目的,引入了操作环境和分级应用的捆绑组。 @@ -54,7 +54,7 @@ HP-UX 第 9 版引入了 SAM,一个基于角色的图形用户界面 (GUI), 如今,HP-UX 因为 HP 和 Veritas 的合作关系使用了 Veritas 作为主文件系统。 -HP-UX 目前最新的版是 11iv3, update 4。 +HP-UX 目前的最新版本是 11iv3, update 4。 ### Solaris 系统 ### @@ -70,21 +70,21 @@ Solaris 9 发布于 2002 年,支持 Linux 特性以及 Solaris 卷管理器。 ### Linux ### -到了 1991 年,用来替代商业操作系统的免费系统的需求日渐高涨。因此 **Linus Torvalds** 开始构建一个免费操作系统,最终成为 **Linux**。Linux 最开始只有一些 “C” 文件,并且使用了阻止商业发行的授权。Linux 是一个类 UNIX 系统但又不尽相同。 +到了 1991 年,用来替代商业操作系统的免费系统的需求日渐高涨。因此 **Linus Torvalds** 开始构建一个免费的操作系统,最终成为 **Linux**。Linux 最开始只有一些 “C” 文件,并且使用了阻止商业发行的授权。Linux 是一个类 UNIX 系统但又不尽相同。 2015 年 发布了基于 GNU Public License 授权的 3.18 版。IBM 声称有超过 1800 万行开源代码开放给开发者。 -如今 GNU Public License 是应用最广泛的免费软件授权方式。根据开源软件原则,这份授权允许个人和企业自由分发,运行,通过拷贝共享,学习,以及修改软件源码。 +如今 GNU Public License 是应用最广泛的免费软件授权方式。根据开源软件原则,这份授权允许个人和企业自由分发、运行、通过拷贝共享、学习,以及修改软件源码。 ### UNIX vs. Linux: 技术概要 ### -- Linux 鼓励多样性,Linux 的开发人员有更宽广的背景,有更多不同经验和意见。 +- Linux 鼓励多样性,Linux 的开发人员有更广阔的背景,有更多不同经验和意见。 - Linux 比 UNIX 支持更多的平台和架构。 - UNIX 商业版本的开发人员会为他们的操作系统考虑特定目标平台以及用户。 - **Linux 比 UNIX 有更好的安全性**,更少受病毒或恶意软件攻击。Linux 上大约有 60-100 种病毒,但是没有任何一种还在传播。另一方面,UNIX 上大约有 85-120 种病毒,但是其中有一些还在传播中。 - 通过 UNIX 命令,系统上的工具和元素很少改变,甚至很多接口和命令行参数在后续 UNIX 版本中一直沿用。 - 有些 Linux 开发项目以自愿为基础进行资助,比如 Debian。其他项目会维护一个和商业 Linux 的社区版,比如 SUSE 的 openSUSE 以及红帽的 Fedora。 -- 传统 UNIX 是扩大规模,而另一方面 Linux 是扩大范围。 +- 传统 UNIX 是纵向扩展,而另一方面 Linux 是横向扩展。 -------------------------------------------------------------------------------- @@ -92,7 +92,7 @@ via: http://www.unixmen.com/brief-history-aix-hp-ux-solaris-bsd-linux/ 作者:[M.el Khamlichi][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 73be1ee0b48ccaf1d54f564f7b5f689168622057 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 15 Nov 2015 23:47:33 +0800 Subject: [PATCH 2457/2517] give-up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 最近比较忙,放弃这篇翻译。 --- .../20151012 Remember sed and awk All Linux admins should.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources/tech/20151012 Remember sed and awk All Linux admins should.md b/sources/tech/20151012 Remember sed and awk All Linux admins should.md index c0b3aded0b..67a6641393 100644 --- a/sources/tech/20151012 Remember sed and awk All Linux admins should.md +++ b/sources/tech/20151012 Remember sed and awk All Linux admins should.md @@ -1,5 +1,3 @@ -translating by Ezio - Remember sed and awk? All Linux admins should ================================================================================ ![](http://images.techhive.com/images/article/2015/03/linux-100573790-primary.idge.jpg) From 289ad20c8a1663c00aa09cddcf1bcf0fcbe85542 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 16 Nov 2015 00:12:16 +0800 Subject: [PATCH 2458/2517] PUB:20151105 Linux FAQs with Answers--How to change default Java version on Linux @geekpi --- ...-How to change default Java version on Linux.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) rename {translated/tech => published}/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md (75%) diff --git a/translated/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md b/published/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md similarity index 75% rename from translated/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md rename to published/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md index c48274edf0..a2daadcc11 100644 --- a/translated/tech/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md +++ b/published/20151105 Linux FAQs with Answers--How to change default Java version on Linux.md @@ -1,15 +1,13 @@ -Linux又问必答-- 如何在Linux中改变默认的Java版本 +Linux 有问必答:如何在 Linux 中改变默认的 Java 版本 ================================================================================ -> **提问**:当我尝试在Linux中运行一个Java程序时,我遇到了一个错误。看上去像程序编译所使用的Javab版本与我本地的不同。我该如何在Linux上切换默认的Java版本? +> **提问**:当我尝试在Linux中运行一个Java程序时,我遇到了一个错误。看上去像程序编译所使用的Java版本与我本地的不同。我该如何在Linux上切换默认的Java版本? -> -> Exception in thread "main" java.lang.UnsupportedClassVersionError: com/xmodulo/hmon/gui/NetConf : Unsupported major.minor version 51.0 -当Java程序编译时,编译环境会设置一个“target”变量来设置程序可以运行的最低Java版本。如果你Linux系统上运行的程序不满足最低的JRE版本要求,那么你会在运行的时候遇到下面的错误。 +当Java程序编译时,编译环境会设置一个“target”变量来设置程序可以运行的最低Java版本。如果你Linux系统上运行的程序不能满足最低的JRE版本要求,那么你会在运行的时候遇到下面的错误。 Exception in thread "main" java.lang.UnsupportedClassVersionError: com/xmodulo/hmon/gui/NetConf : Unsupported major.minor version 51.0 -比如,这种情况下程序在Java JRE 1.7下编译,但是系统只有Java JRE 1.6。 +比如,程序在Java JRE 1.7下编译,但是系统只有Java JRE 1.6。 要解决这个问题,你需要改变默认的Java版本到Java JRE 1.7或者更高(假设JRE已经安装了)。 @@ -21,7 +19,7 @@ Linux又问必答-- 如何在Linux中改变默认的Java版本 本例中,总共安装了4个不同的Java版本:OpenJDK JRE 1.6、Oracle Java JRE 1.6、OpenJDK JRE 1.7 和 Oracle Java JRE 1.7。现在默认的Java版本是OpenJDK JRE 1.6。 -如果没有安装需要的Java JRE,你可以参考[这些指导][1]来完成安装。 +如果没有安装需要的Java JRE,你可以参考[这些指导][1]来完成安装。 现在有可用的候选版本,你可以用下面的命令在可用的Java JRE之间**切换默认的Java版本**: @@ -45,7 +43,7 @@ via: http://ask.xmodulo.com/change-default-java-version-linux.html 作者:[Dan Nanni][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5aeb2ff2c1eb7bccf2494ec554ae39b6ea8e8403 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 16 Nov 2015 01:09:52 +0800 Subject: [PATCH 2459/2517] PUB:20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux @ictlyh --- ...se SSHfs to Mount a Remote Filesystem on Linux.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md (73%) diff --git a/translated/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md b/published/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md similarity index 73% rename from translated/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md rename to published/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md index 9d25041535..cd2274071f 100644 --- a/translated/tech/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md +++ b/published/20151027 How to Use SSHfs to Mount a Remote Filesystem on Linux.md @@ -1,6 +1,6 @@ 如何在 Linux 上使用 SSHfs 挂载一个远程文件系统 ================================================================================ -你有想通过安全 shell 挂载一个远程文件系统到本地的经历吗?如果有的话,SSHfs 也许就是你所需要的。它通过使用 SSH 和 Fuse(LCTT 译注:Filesystem in Userspace,用户态文件系统,是 Linux 中用于挂载某些网络空间,如 SSH,到本地文件系统的模块) 允许你挂载远程计算机(或者服务器)到本地。 +你曾经想过用安全 shell 挂载一个远程文件系统到本地吗?如果有的话,SSHfs 也许就是你所需要的。它通过使用 SSH 和 Fuse(LCTT 译注:Filesystem in Userspace,用户态文件系统,是 Linux 中用于挂载某些网络空间,如 SSH,到本地文件系统的模块) 允许你挂载远程计算机(或者服务器)到本地。 **注意**: 这篇文章假设你明白[SSH 如何工作并在你的系统中配置 SSH][1]。 @@ -16,7 +16,7 @@ 如果你使用的不是 Ubuntu,那就在你的发行版软件包管理器中搜索软件包名称。最好搜索和 fuse 或 SSHfs 相关的关键字,因为取决于你运行的系统,软件包名称可能稍微有些不同。 -在你的系统上安装完软件包之后,就该创建 fuse 组了。在你安装 fuse 的时候,应该会在你的系统上创建一个组。如果没有的话,在终端窗口中输入以下命令以便在你的 Linux 系统中创建组: +在你的系统上安装完软件包之后,就该创建好 fuse 组了。在你安装 fuse 的时候,应该会在你的系统上创建一个组。如果没有的话,在终端窗口中输入以下命令以便在你的 Linux 系统中创建组: sudo groupadd fuse @@ -26,7 +26,7 @@ ![sshfs 添加用户到组 fuse](https://www.maketecheasier.com/assets/uploads/2015/10/sshfs-add-user-to-fuse-group.png) -别担心上面命令的 `$USER`。shell 会自动用你自己的用户名替换。处理了和组相关的事之后,就是时候创建要挂载远程文件的目录了。 +别担心上面命令的 `$USER`。shell 会自动用你自己的用户名替换。处理了和组相关的工作之后,就是时候创建要挂载远程文件的目录了。 mkdir ~/remote_folder @@ -54,9 +54,9 @@ ### 总结 ### -在 Linux 上有很多工具可以用于访问远程文件并挂载到本地。如之前所说,如果有的话,也只有很少的工具能充分利用 SSH 的强大功能。我希望在这篇指南的帮助下,也能认识到 SSHfs 是一个多么强大的工具。 +在 Linux 上有很多工具可以用于访问远程文件并挂载到本地。但是如之前所说,如果有的话,也只有很少的工具能充分利用 SSH 的强大功能。我希望在这篇指南的帮助下,也能认识到 SSHfs 是一个多么强大的工具。 -你觉得 SSHfs 怎么样呢?在线的评论框里告诉我们吧! +你觉得 SSHfs 怎么样呢?在下面的评论框里告诉我们吧! -------------------------------------------------------------------------------- @@ -64,7 +64,7 @@ via: https://www.maketecheasier.com/sshfs-mount-remote-filesystem-linux/ 作者:[Derrik Diener][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 0897a9664758ee36fb72f42c318cf32aa3ebc014 Mon Sep 17 00:00:00 2001 From: Ricky Gong Date: Mon, 16 Nov 2015 13:45:39 +0800 Subject: [PATCH 2460/2517] =?UTF-8?q?20151105=20To=20Do=20List=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Your To-Do Lists in Ubuntu Using Go For It Application.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md b/sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md index 8977e0a420..1fdc126604 100644 --- a/sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md +++ b/sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md @@ -1,3 +1,5 @@ +Ricky-Gong 翻译中 + How to Manage Your To-Do Lists in Ubuntu Using Go For It Application ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-featured1.jpg) @@ -81,4 +83,4 @@ via: https://www.maketecheasier.com/to-do-lists-ubuntu-go-for-it/ [a]:https://www.maketecheasier.com/author/himanshu/ [1]:http://manuel-kehl.de/projects/go-for-it/ -[2]:http://todotxt.com/ \ No newline at end of file +[2]:http://todotxt.com/ From 89dc32b3f5d72b5584d3569df996ff4192fb8dd3 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 16 Nov 2015 16:27:35 +0800 Subject: [PATCH 2461/2517] =?UTF-8?q?20151116-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nswers--How to install Node.js on Linux.md | 90 +++++++++++++++++++ ...ronment variable automatically on Linux.md | 48 ++++++++++ 2 files changed, 138 insertions(+) create mode 100644 sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md create mode 100644 sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md diff --git a/sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md b/sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md new file mode 100644 index 0000000000..fed809541e --- /dev/null +++ b/sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md @@ -0,0 +1,90 @@ +Linux FAQs with Answers--How to install Node.js on Linux +================================================================================ +> **Question**: How can I install Node.js on [insert your Linux distro]? + +[Node.js][1] is a server-side software platform built on Google's V8 JavaScript engine. Node.js has become a popular choice for building high-performance server-side applications all in JavaScript. What makes Node.js even more attractive for backend server development is the [huge ecosystem][2] of Node.js libraries and applications. Node.js comes with a command line utility called npm which allows you to easily install, version-control, and manage dependencies of Node.js libraries and applications from the vast npm online repository. + +In this tutorial, I will describe **how to install Node.js on major Linux distros including Debian, Ubuntu, Fedora and CentOS**. + +Node.js is available as a pre-built package on some distros (e.g., Fedora or Ubuntu), while you need to install it from its source on other distros. As Node.js is fast evolving, it is recommended to install the latest Node.js from its source, instead of installing an outdated pre-built package. The lasted Node.js comes with npm (Node.js package manager) bundled, allowing you to install external Node.js modules easily. + +### Install Node.js on Debian ### + +Starting from Debian 8 (Jessie), Node.js is available in the official repositories. Thus you can install it with: + + $ sudo apt-get install npm + +On Debian 7 (Wheezy) or earlier, you can install Node.js from its source as follows. + + $ sudo apt-get install python g++ make + $ wget http://nodejs.org/dist/node-latest.tar.gz + $ tar xvfvz node-latest.tar.gz + $ cd node-v0.10.21 (replace a version with your own) + $ ./configure + $ make + $ sudo make install + +### Install Node.js on Ubuntu or Linux Mint ### + +Node.js is included in Ubuntu (13.04 and higher). Thus installation is straightforward. The following will install Node.js and npm. + + $ sudo apt-get install npm + $ sudo ln -s /usr/bin/nodejs /usr/bin/node + +While stock Ubuntu ships Node.js, you can install a more recent version from [its PPA][3]. + + $ sudo apt-get install python-software-properties python g++ make + $ sudo add-apt-repository -y ppa:chris-lea/node.js + $ sudo apt-get update + $ sudo apt-get install npm + +### Install Node.js on Fedora ### + +Node.js is included in the base repository of Fedora. Therefore you can use yum to install Node.js on Fedora. + + $ sudo yum install npm + +If you want to install the latest version of Node.js, you can build it from its source as follows. + + $ sudo yum groupinstall 'Development Tools' + $ wget http://nodejs.org/dist/node-latest.tar.gz + $ tar xvfvz node-latest.tar.gz + $ cd node-v0.10.21 (replace a version with your own) + $ ./configure + $ make + $ sudo make install + +### Install Node.js on CentOS or RHEL ### + +To install Node.js with yum package manager on CentOS, first enable EPEL repository, and then run: + + $ sudo yum install npm + +If you want to build the latest Node.js on CentOS, follow the same procedure as in Fedora. + +### Install Node.js on Arch Linux ### + +Node.js is available in the Arch Linux community repository. Thus installation is as simple as running: + + $ sudo pacman -S nodejs npm + +### Check the Version of Node.js ### + +Once you have installed Node.js, you can check Node.js version as follows. + + $ node --version + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-node-js-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://ask.xmodulo.com/author/nanni +[1]:http://nodejs.org/ +[2]:https://www.npmjs.com/ +[3]:https://launchpad.net/~chris-lea/+archive/node.js \ No newline at end of file diff --git a/sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md b/sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md new file mode 100644 index 0000000000..ac64916ccf --- /dev/null +++ b/sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md @@ -0,0 +1,48 @@ +Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux +================================================================================ +> **Question**: I need to compile a Java program on my Linux box. For that I already installed JDK (Java Development Kit), and now I'm trying to set JAVA_HOME environment variable to point to the installed JDK. What is the recommended way to set JAVA_HOME environment variable on Linux? + +Many Java programs or Java-based IDE environments require JAVA_HOME environment variable being set. This environment variable is supposed to point to the top directory where the Java development kit (JDK) or Java runtime environment (JRE) is installed. The JDK contains everything the JRE offers, but also provides additional binaries and libraries needed to compile Java programs (e.g., compilers, debugger, JavaDoc). While the JDK is needed to build Java applications, the JRE alone is sufficient to simply run already built Java programs. + +When you are trying to set JAVA_HOME environment variable, the complication is that JAVA_HOME variable will change depending on (1) whether you installed JDK or JRE, (2) which version of JDK/JRE you installed, and (3) whether you installed Oracle JDK or Open JDK. + +So whenever your build or run-time environment changes (e.g., upgrade to a newer JDK), you need to adjust JAVA_HOME accordingly, which is cumbersome. + +The following export commands will allow you to set JAVA_HOME environment variable automatically regardless of these factors. + +If you installed JRE: + + export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java)))) + +If you installed JDK: + + export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac)))) + +Place either of the above commands in ~/.bashrc (or /etc/profile) depending on you installed JDK or JRE, and it will set JAVA_HOME permanently. + +Note that "readlink -f" command is used to get the canonical path since java or javac can be set up with multiple symlinks. + +For example, if you installed Oracle JRE 7, the first export command will automatically set JAVA_HOME to: + + /usr/lib/jvm/java-7-oracle/jre + +If you installed Open JDK version 8, the second export command will set JAVA_HOME to: + + /usr/lib/jvm/java-8-openjdk-amd64 + +![](https://c1.staticflickr.com/1/700/22961948071_c73a3261dd_c.jpg) + +In short, these export commands will automatically update JAVA_HOME variable as you re-install/upgrade your JDK/JRE packages or [change default Java version][1]. No need to adjust JAVA_HOME manually. + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/set-java_home-environment-variable-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://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/change-default-java-version-linux.html \ No newline at end of file From e37f2d0eed4bba26d95f408de0509acc17f7eb55 Mon Sep 17 00:00:00 2001 From: KS Date: Mon, 16 Nov 2015 17:52:15 +0800 Subject: [PATCH 2462/2517] Create 20150831 Linux workstation security checklist.md --- ...31 Linux workstation security checklist.md | 487 ++++++++++++++++++ 1 file changed, 487 insertions(+) create mode 100644 translated/tech/20150831 Linux workstation security checklist.md diff --git a/translated/tech/20150831 Linux workstation security checklist.md b/translated/tech/20150831 Linux workstation security checklist.md new file mode 100644 index 0000000000..11155a48e0 --- /dev/null +++ b/translated/tech/20150831 Linux workstation security checklist.md @@ -0,0 +1,487 @@ +Linux平台安全备忘录 +================================================================================ +这是一组Linux基金会自己系统管理员的推荐规范。所有Linux基金会的雇员都是远程工作,我们使用这套指导方针确保系统管理员的系统通过核心安全需求,降低我们平台成为攻击目标的风险。 + +即使你的系统管理员不用远程工作,很有可能的是,很多人的工作是在一个便携的笔记本上完成的,或者在业余时间或紧急时刻他们在工作平台中部署自己的家用系统。不论发生何种情况,你都能对应这个规范匹配到你的环境中。 + +这绝不是一个详细的“工作站加固”文档,可以说这是一个努力避免大多数明显安全错误导致太多不便的一组规范的底线。你可能阅读这个文档会认为它的方法太偏执,同时另一些人也许会认为这仅仅是一些肤浅的研究。安全就像在高速公路上开车 -- 任何比你开的慢的都是一个傻瓜,然而任何比你开的快的人都是疯子。这个指南仅仅是一些列核心安全规则,既不详细又不是替代经验,警惕,和常识。 + +每一节都分为两个部分: + +- 核对适合你项目的需求 +- 随意列出关心的项目,解释为什么这么决定 + +## 严重级别 + +在清单的每一个项目都包括严重级别,这些是我们希望能帮助指导你的决定: + +- _(关键)_ 项目应该在考虑列表上被明确的重视。如果不采取措施,将会导致你的平台安全出现高风险。 +- _(中等)_ 项目将改善你的安全形态,但不是很重要,尤其是如果他们太多的干涉你的工作流程。 +- _(低等)_ 项目也许会改善整体安全性,但是在便利权衡下也许并不值得。 +- _(可疑)_ 留作感觉会明显完善我们平台安全的项目,但是可能会需要大量的调整与操作系统交互的方式。 + +记住,这些只是参考。如果你觉得这些严重级别不能表达你的工程对安全承诺,正如你所见你应该调整他们为你合适的。 + +## 选择正确的硬件 + +我们禁止管理员使用一个特殊供应商或者一个特殊的型号,所以在选择工作系统时这部分是核心注意事项。 + +### 清单 + +- [ ] 系统支持安全启动 _(关键)_ +- [ ] 系统没有火线,雷电或者扩展卡接口 _(中等)_ +- [ ] 系统有TPM芯片 _(低)_ + +### 注意事项 + +#### 安全引导 + +尽管它是有争议的性质,安全引导提供了对抗很多针对平台的攻击(Rootkits, "Evil Maid,"等等),没有介绍太多额外的麻烦。它将不会停止真正专用的攻击者,加上有很大程度上,站点安全机构有办法应对它(可能通过设计),但是拥有安全引导总比什么都没有强。 + +作为选择,你也许部署了[Anti Evil Maid][1]提供更多健全的保护,对抗安全引导支持的攻击类型,但是它需要更多部署和维护的工作。 + +#### 系统没有火线,雷电或者扩展卡接口 + +火线是一个标准,故意的,允许任何连接设备完全直接内存访问你的系统([查看维基百科][2])。雷电接口和扩展卡同样有问题,虽然一些后来部署的雷电接口试图限制内存访问的范围。如果你没有这些系统端口,那是最好的,但是它并不严重,他们通常可以通过UEFI或内核本身禁用。 + +#### TPM芯片 + +可信平台模块(TPM)是主板上的一个与核心处理器单独分开的加密芯片,他可以用来增加平台的安全性(比如存储完整磁盘加密密钥),不过通常不用在日常平台操作。最多,这是个很好的存在,除非你有特殊需要使用TPM增加你平台安全性。 + +## 预引导环境 + +这是你开始安装系统前的一系列推荐规范。 + +### 清单 + +- [ ] 使用UEFI引导模式(不是传统BIOS)_(关键)_ +- [ ] 进入UEFI配置需要使用密码 _(关键)_ +- [ ] 使用安全引导 _(关键)_ +- [ ] 启动系统需要UEFI级别密码 _(低)_ + +### 注意事项 + +#### UEFI和安全引导 + +UEFI尽管有缺点,还是提供很多传统BIOS没有的好功能,比如安全引导。大多数现代的系统都默认使用UEFI模式。 + +UEFI配置模式密码要确保密码强度。注意,很多厂商默默地限制了你使用密码长度,所以对比长口令你也许应该选择高熵短密码(更多地密码短语看下面)。 + +基于你选择的Linux分支,你也许会也许不会跳过额外的圈子,以导入你的发行版的安全引导键,才允许你启动发行版。很多分支已经与微软合作大多数厂商给他们已发布的内核签订密钥,这已经是大多数厂商公认的了,因此为了避免问题你必须处理密钥导入。 + +作为一个额外的措施,在允许某人得到引导分区然后尝试做一些不好的事之前,让他们输入密码。为了防止肩窥,这个密码应该跟你的UEFI管理密码不同。如果你关闭启动太多,你也许该选择别把心思费在这上面,当你已经进入LUKS密码,这将为您节省一些额外的按键。 + +## 发行版选择注意事项 + +很有可能你会坚持一个广泛使用的发行版如Fedora,Ubuntu,Arch,Debian,或他们的一个类似分支。无论如何,这是你选择使用发行版应该考虑的。 + +### 清单 + +- [ ] 拥有一个强健的MAC/RBAC系统(SELinux/AppArmor/Grsecurity) _(关键)_ +- [ ] 公开的安全公告 _(关键)_ +- [ ] 提供及时的安全补丁 _(关键)_ +- [ ] 提供密码验证的包 _(关键)_ +- [ ] 完全支持UEFI和安全引导 _(关键)_ +- [ ] 拥有健壮的原生全磁盘加密支持 _(关键)_ + +### 注意事项 + +#### SELinux,AppArmor,和GrSecurity/PaX + +强制访问控制(MAC)或者基于角色的访问控制(RBAC)是一个POSIX系统遗留的基于用户或组的安全机制延伸。这些天大多数发行版已经绑定MAC/RBAC系统(Fedora,Ubuntu),或通过提供一种机制一个可选的安装后的步骤来添加它(Gentoo,Arch,Debian)。很明显,强烈建议您选择一个预装MAC/RBAC系统的分支,但是如果你对一个分支情有独钟,没有默认启用它,装完系统后应计划配置安装它。 + +应该坚决避免使用不带任何MAC/RBAC机制的分支,像传统的POSIX基于用户和组的安全在当今时代应该算是考虑不足。如果你想建立一个MAC/RBAC工作站,通常会考虑AppArmor和PaX,他们比SELinux更容易学习。此外,在一个工作站上,有很少或者没有额外的监听用户运行的应用造成的最高风险,GrSecurity/PaX_可能_会比SELinux提供更多的安全效益。 + +#### 发行版安全公告 + +大多数广泛使用的分支都有一个机制发送安全公告到他们的用户,但是如果你对一些机密感兴趣,查看开发人员是否有记录机制提醒用户安全漏洞和补丁。缺乏这样的机制是一个重要的警告信号,这个分支不够成熟,不能被视为主要管理工作站。 + +#### 及时和可靠的安全更新 + +多数常用的发行版提供的定期安全更新,但为确保关键包更新及时提供是值得检查的。避免使用分支和"社区重建"的原因是,由于不得不等待上游分支先发布它,他们经常延迟安全更新。 + +你如果找到一个在安装包,更新元数据,或两者上不使用加密签名的发行版,将会处于困境。这么说,常用的发行版多年前就已经知道这个基本安全的意义(Arch,我正在看你),所以这也是值得检查的。 + +#### 发行版支持UEFI和安全引导 + +检查发行版支持UEFI和安全引导。查明它是否需要导入额外的密钥或是否要求启动内核有一个已经被系统厂商信任的密钥签名(例如跟微软达成合作)。一些发行版不支持UEFI或安全启动,但是提供了替代品来确保防篡改或防破坏引导环境([Qubes-OS][3]使用Anti Evil Maid,前面提到的)。如果一个发行版不支持安全引导和没有机制防止引导级别攻击,还是看看别的吧。 + +#### 全磁盘加密 + +全磁盘加密是保护静止数据要求,大多数发行版都支持。作为一个选择方案,系统自加密硬件驱动也许用来(通常通过主板TPM芯片实现)和提供类似安全级别加更快的选项,但是花费也更高。 + +## 发行版安装指南 + +所有发行版都是不同的,但是也有一些一般原则: + +### 清单 + +- [ ] 使用健壮的密码全磁盘加密(LUKS) _(关键)_ +- [ ] 确保交换分区也加密了 _(关键)_ +- [ ] 确保引导程序设置了密码(可以和LUKS一样) _(关键)_ +- [ ] 设置健壮的root密码(可以和LUKS一样) _(关键)_ +- [ ] 使用无特权账户登录,管理员组的一部分 _(关键)_ +- [ ] 设置强壮的用户登录密码,不同于root密码 _(关键)_ + +### 注意事项 + +#### 全磁盘加密 + +除非你正在使用自加密硬件设备,配置你的安装程序给磁盘完整加密用来存储你的数据与你的系统文件很重要。通过自动安装的cryptfs循环文件加密用户目录还不够简单(我正在看你,老版Ubuntu),这并没有给系统二进制文件或交换分区提供保护,它可能包含大量的敏感数据。推荐的加密策略是加密LVM设备,所以在启动过程中只需要一个密码。 + +`/boot`分区将一直保持非加密,当引导程序需要引导内核前,调用LUKS/dm-crypt。内核映像本身应该用安全引导加密签名检查防止被篡改。 + +换句话说,`/boot`应该是你系统上唯一没有加密的分区。 + +#### 选择好密码 + +现代的Linux系统没有限制密码口令长度,所以唯一的限制是你的偏执和倔强。如果你要启动你的系统,你将大概至少要输入两个不同的密码:一个解锁LUKS,另一个登陆,所以长密码将会使你老的很快。最好从丰富或混合的词汇中选择2-3个单词长度,容易输入的密码。 + +优秀密码例子(是的,你可以使用空格): +- nature abhors roombas +- 12 in-flight Jebediahs +- perdon, tengo flatulence + +如果你更喜欢输入口令句,你也可以坚持使用无词汇密码但最少要10-12个字符长度。 + +除非你有人身安全的担忧,写下你的密码,并保存在一个远离你办公桌的安全的地方才合适。 + +#### Root,用户密码和管理组 + +我们建议,你的root密码和你的LUKS加密使用同样的密码(除非你共享你的笔记本给可信的人,他应该能解锁设备,但是不应该能成为root用户)。如果你是笔记本电脑的唯一用户,那么你的root密码与你的LUKS密码不同是没有意义的安全优势。通常,你可以使用同样的密码在你的UEFI管理,磁盘加密,和root登陆 -- 知道这些任意一个都会让攻击者完全控制您的系统,在单用户工作站上使这些密码不同,没有任何安全益处。 + +你应该有一个不同的,但同样强健的常规用户帐户密码用来每天工作。这个用户应该是管理组用户(例如`wheel`或者类似,根据分支),允许你执行`sudo`来提升权限。 + +换句话说,如果在你的工作站只有你一个用户,你应该有两个独特的,强健的,同样的强壮的密码需要记住: + +**管理级别**,用在以下区域: + +- UEFI管理 +- 引导程序(GRUB) +- 磁盘加密(LUKS) +- 工作站管理(root用户) + +**User-level**, used for the following: +**用户级别**,用在以下: + +- 用户登陆和sudo +- 密码管理器的主密码 + +很明显,如果有一个令人信服的理由他们所有可以不同。 + +## 安装后的加强 + +安装后的安全性加强在很大程度上取决于你选择的分支,所以在一个通用的文档中提供详细说明是徒劳的,例如这一个。然而,这里有一些你应该采取的步骤: + +### 清单 + +- [ ] 在全体范围内禁用火线和雷电模块 _(关键)_ +- [ ] 检查你的防火墙,确保过滤所有传入端口 _(关键)_ +- [ ] 确保root邮件转发到一个你可以查看到的账户 _(关键)_ +- [ ] 检查以确保sshd服务默认情况下是禁用的 _(中等)_ +- [ ] 建立一个系统自动更新任务,或更新提醒 _(中等)_ +- [ ] 配置屏幕保护程序在一段时间的不活动后自动锁定 _(中等)_ +- [ ] 建立日志监控 _(中等)_ +- [ ] 安装使用rkhunter _(低等)_ +- [ ] 安装一个入侵检测系统 _(偏执)_ + +### 注意事项 + +#### 黑名单模块 + +将火线和雷电模块列入黑名单,增加一行到`/etc/modprobe.d/blacklist-dma.conf`文件: + + blacklist firewire-core + blacklist thunderbolt + +重启后的模块将被列入黑名单。这样做是无害的,即使你没有这些端口(但也不做任何事)。 + +#### Root邮件 + +默认的root邮件只是存储在系统基本上没人读过。确保你设置了你的`/etc/aliases`来转发root邮件到你确实能读取的邮箱,否则你也许错过了重要的系统通知和报告: + + # Person who should get root's mail + root: bob@example.com + +编辑后这些后运行`newaliases`,然后测试它确保已投递,像一些邮件供应商将拒绝从没有或者不可达的域名的邮件。如果是这个原因,你需要配置邮件转发直到确实可用。 + +#### 防火墙,sshd,和监听进程 + +默认的防火墙设置将取决于您的发行版,但是大多数都允许`sshd`端口连入。除非你有一个令人信服的合理理由允许连入ssh,你应该过滤出来,禁用sshd守护进程。 + + systemctl disable sshd.service + systemctl stop sshd.service + +如果你需要使用它,你也可以临时启动它。 + +通常,你的系统不应该有任何侦听端口除了响应ping。这将有助于你对抗网络级别的零日漏洞利用。 + +#### 自动更新或通知 + +建议打开自动更新,除非你有一个非常好的理由不这么做,如担心自动更新将使您的系统无法使用(这是发生在过去,所以这种恐惧并非杞人忧天)。至少,你应该启用自动通知可用的更新。大多数发行版已经有这个服务自动运行,所以你不需要做任何事。查阅你的发行版文档查看更多。 + +你应该尽快应用所有明显的勘误,即使这些不是特别贴上“安全更新”或有关联的CVE代码。所有错误都潜在的安全漏洞和新的错误,比起坚持旧的,已知的错误,未知错误通常是更安全的策略。 + +#### 监控日志 + +你应该对你的系统上发生了什么很感兴趣。出于这个原因,你应该安装`logwatch`然后配置它每夜发送在你的系统上发生的任何事情的活动报告。这不会预防一个专业的攻击者,但是一个好安全网功能。 + +注意,许多systemd发行版将不再自动安装一个“logwatch”需要的syslog服务(由于systemd依靠自己的分类),所以你需要安装和启用“rsyslog”来确保使用logwatch之前你的/var/log不是空。 + +#### Rkhunter和IDS + +安装`rkhunter`和一个入侵检测系统(IDS)像`aide`或者`tripwire`将不会有用,除非你确实理解他们如何工作采取必要的步骤来设置正确(例如,保证数据库在额外的媒介,从可信的环境运行检测,记住执行系统更新和配置更改后要刷新数据库散列,等等)。如果你不愿在你的工作站执行这些步骤调整你如何工作,这些工具将带来麻烦没有任何实在的安全益处。 + +我们强烈建议你安装`rkhunter`并每晚运行它。它相当易于学习和使用,虽然它不会阻止一个复杂的攻击者,它也能帮助你捕获你自己的错误。 + +## 个人工作站备份 + +工作站备份往往被忽视,或无计划的做,常常是不安全的方式。 + +### 清单 + +- [ ] 设置加密备份工作站到外部存储 _(关键)_ +- [ ] 使用零认知云备份的备份工具 _(中等)_ + +### 注意事项 + +#### 全加密备份存到外部存储 + +把全部备份放到一个移动磁盘中比较方便,不用担心带宽和流速(在这个时代,大多数供应商仍然提供显著的不对称的上传/下载速度)。不用说,这个移动硬盘本身需要加密(又一次,通过LIKS),或者你应该使用一个备份工具建立加密备份,例如`duplicity`或者它的GUI版本,`deja-dup`。我建议使用后者并使用随机生成的密码,保存到你的密码管理器中。如果你带上笔记本去旅行,把这个磁盘留在家,以防你的笔记本丢失或被窃时可以找回备份。 + +除了你的家目录外,你还应该备份`/etc`目录和处于鉴定目的的`/var/log`目录。 + +首先是,避免拷贝你的家目录到任何非加密存储上,甚至是快速的在两个系统上移动文件,一旦完成你肯定会忘了清除它,暴露个人隐私或者安全信息到监听者手中 -- 尤其是把这个存储跟你的笔记本防盗同一个包里。 + +#### 零认知站外备份选择性 + +站外备份也是相当重要的,是否可以做到要么需要你的老板提供空间,要么找一家云服务商。你可以建一个单独的duplicity/deja-dup配置,只包括重要的文件,以免传输大量你不想备份的数据(网络缓存,音乐,下载等等)。 + +作为选择,你可以使用零认知备份工具,例如[SpiderOak][5],它提供一个卓越的Linux GUI工具还有实用的特性,例如在多个系统或平台间同步内容。 + +## 最佳实践 + +下面是我们认为你应该采用的最佳实践列表。它当然不是非常详细的,而是试图提供实用的建议,一个可行的整体安全性和可用性之间的平衡 + +### 浏览 + +毫无疑问,在你的系统上web浏览器将是最大、最容易暴露的攻击层面的软件。它是专门下载和执行不可信,恶意代码的一个工具。它试图采用沙箱和代码卫生处理等多种机制保护你免受这种危险,但是在之前多个场合他们都被击败了。你应该学到浏览网站是最不安全的活动在你参与的任何一天。 + +有几种方法可以减少浏览器的影响,但真正有效的方法需要你操作您的工作站将发生显著的变化。 + +#### 1: 实用两个不同的浏览器 + +这很容易做到,但是只有很少的安全效益。并不是所有浏览器都妥协给攻击者完全自由访问您的系统 -- 有时他们只能允许一个读取本地浏览器存储,窃取其他标签的活动会话,捕获输入浏览器,例如,实用两个不同的浏览器,一个用在工作/高安全站点,另一个用在其他,有助于防止攻击者请求整个饼干罐的小妥协。主要的不便是两个不同的浏览器消耗内存大量。 + +我们建议: + +##### 火狐用来工作和高安全站点 + +使用火狐登陆工作有关的站点,应该额外关心的是确保数据如cookies,会话,登陆信息,打键次数等等,明显不应该落入攻击者手中。除了少数的几个网站,你不应该用这个浏览器访问其他网站。 + +你应该安装下面的火狐扩展: + +- [ ] NoScript _(关键)_ + - NoScript阻止活动内容加载,除非在用户白名单里的域名。跟你默认浏览器比它使用起来很麻烦(可是提供了真正好的安全效益),所以我们建议只在开启了它的浏览器上访问与工作相关的网站。 + +- [ ] Privacy Badger _(关键)_ + - EFF的Privacy Badger将在加载时预防大多数外部追踪器和广告平台,在这些追踪站点影响你的浏览器时将有助于避免妥协(追踪着和广告站点通常会成为攻击者的目标,因为他们会迅速影响世界各地成千上万的系统)。 + +- [ ] HTTPS Everywhere _(关键)_ + - 这个EFF开发的扩展将确保你访问的大多数站点都在安全连接上,甚至你点击的连接使用的是http://(有效的避免大多数的攻击,例如[SSL-strip][7])。 + +- [ ] Certificate Patrol _(中等)_ + - 如果你正在访问的站点最近改变了他们的TLS证书 -- 特别是如果不是接近失效期或者现在使用不同的证书颁发机构,这个工具将会警告你。它有助于警告你是否有人正尝试中间人攻击你的连接,但是产生很多无害的假的类似情况。 + +你应该让火狐成为你的默认打开连接的浏览器,因为NoScript将在加载或者执行时阻止大多数活动内容。 + +##### 其他一切都用Chrome/Chromium + +Chromium开发者在增加很多很好的安全特性方面比火狐强(至少[在Linux上][6])),例如seccomp沙箱,内核用户名空间等等,这担当一个你访问网站和你其他系统间额外的隔离层。Chromium是流开源项目,Chrome是Google所有的基于它构建的包(使用它输入时要非常谨慎任,何你不想让谷歌知道的事情都不要使用它)。 + +有人推荐你在Chrome上也安装**Privacy Badger**和**HTTPS Everywhere**扩展,然后给他一个不同的主题,从火狐指出这是你浏览器“不信任的站点”。 + +#### 2: 使用两个不同浏览器,一个在专用的虚拟机里 + +这有点像上面建议的做法,除了您将添加一个额外的步骤,通过快速访问协议运行专用虚拟机内部Chrome,允许你共享剪贴板和转发声音事件(如,Spice或RDP)。这将在不可信的浏览器和你其他的工作环境之间添加一个优秀的隔离层,确保攻击者完全危害你的浏览器将不得不另外打破VM隔离层,以达到系统的其余部分。 + +这是一个出奇可行的结构,但是需要大量的RAM和高速处理器可以处理增加的负载。这还需要一个重要的奉献的管理员需要相应地调整自己的工作实践。 + +#### 3: 通过虚拟化完全隔离你的工作和娱乐环境 + +看[Qubes-OS项目][3],它致力于通过划分你的应用到完全独立分开的VM中,提供高安全工作环境。 + +### 密码管理器 + +#### 清单 + +- [ ] 使用密码管理器 _(关键)_ +- [ ] 不相关的站点使用不同的密码 _(关键)_ +- [ ] 使用支持团队共享的密码管理器 _(中等)_ +- [ ] 给非网站用户使用一个单独的密码管理器 _(偏执)_ + +#### 注意事项 + +使用好的,唯一的密码对你的团队成员来说应该是非常关键的需求。证书盗取一直在发生 — 要么通过中间计算机,盗取数据库备份,远程站点利用,要么任何其他的打算。证书从不应该通过站点被重用,尤其是关键的应用。 + + +##### 浏览器中的密码管理器 + +每个浏览器有一个比较安全的保存密码机制,通过供应商的机制可以同步到云存储同事用户提供密码保证数据加密。无论如何,这个机制有严重的劣势: + + +1. 不能跨浏览器工作 +2. 不提供任何与团队成员共享凭证的方法 + +也有一些良好的支持,免费或便宜的密码管理器,很好的融合到多个浏览器,跨平台工作,提供小组共享(通常是支付服务)。可以很容易地通过搜索引擎找到解决方案。 + +##### 独立的密码管理器 + +任何密码管理器都有一个主要的缺点,与浏览器结合,事实上是应用的一部分,这样最有可能被入侵者攻击。如果这让你不舒服(应该这样),你应该选择两个不同的密码管理器 -- 一个集成在浏览器中用来保存网站密码,一个作为独立运行的应用。后者可用于存储高风险凭证如root密码,数据库密码,其他shell账户凭证等。 + +有这样的工具可以特别有效的在团腿成员间共享超级用户的凭据(服务器根密码,ILO密码,数据库管理密码,引导装载程序密码等等)。 + +这几个工具可以帮助你: + +- [KeePassX][8],2版中改善了团队共享 +- [Pass][9],它使用了文本文件和PGP并与git结合 +- [Django-Pstore][10],他是用GPG在管理员之间共享凭据 +- [Hiera-Eyaml][11],如果你已经在你的平台中使用了Puppet,可以便捷的追踪你的服务器/服务凭证,像你的Hiera加密数据的一部分。 + +### 加固SSH和PGP私钥 + +个人加密密钥,包括SSH和PGP私钥,都是你工作站中最重要的物品 -- 攻击将在获取到感兴趣的东西,这将允许他们进一步攻击你的平台或冒充你为其他管理员。你应该采取额外的步骤,确保你的私钥免遭盗窃。 + +#### 清单 + +- [ ] 强壮的密码用来保护私钥 _(关键)_ +- [ ] PGP的主密码保存在移动存储中 _(中等)_ +- [ ] 身份验证、签名和加密注册表子项存储在智能卡设备 _(中等)_ +- [ ] SSH配置为使用PGP认证密钥作为ssh私钥 _(中等)_ + +#### 注意事项 + +防止私钥被偷的最好方式是使用一个智能卡存储你的加密私钥,不要拷贝到工作平台上。有几个厂商提供支持OpenPGP的设备: + +- [Kernel Concepts][12],在这里可以采购支持OpenPGP的智能卡和USB读取器,你应该需要一个。 +- [Yubikey NEO][13],这里提供OpenPGP功能的智能卡还提供很多很酷的特性(U2F, PIV, HOTP等等)。 + +确保PGP主密码没有存储在工作平台也很重要,只有子密码在使用。主密钥只有在登陆其他的密钥和创建子密钥时使用 — 不经常发生这种操作。你可以照着[Debian的子密钥][14]向导来学习如何移动你的主密钥到移动存储和创建子密钥。 + +你应该配置你的gnupg代理作为ssh代理然后使用基于智能卡PGP认证密钥作为你的ssh私钥。我们公布了一个细节向导如何使用智能卡读取器或Yubikey NEO。 + +如果你不想那么麻烦,最少要确保你的PGP私钥和你的SSH私钥有个强健的密码,这将让攻击者很难盗取使用它们。 + +### 工作站上的SELinux + +如果你使用的发行版绑定了SELinux(如Fedora),这有些如何使用它的建议,让你的工作站达到最大限度的安全。 + +#### 清单 + +- [ ] 确保你的工作站强制使用SELinux _(关键)_ +- [ ] 不要盲目的执行`audit2allow -M`,经常检查 _(关键)_ +- [ ] 从不 `setenforce 0` _(中等)_ +- [ ] 切换你的用户到SELinux用户`staff_u` _(中等)_ + +#### 注意事项 + +SELinux是一个强制访问控制(MAC)为POSIX许可核心功能扩展。它是成熟,强健,自从它推出以来已经有很长的路了。不管怎样,许多系统管理员现在重复过时的口头禅“关掉它就行。” + +话虽如此,在工作站上SELinux还是限制了安全效益,像很多应用都要作为一个用户自由的运行。开启它有益于给网络提供足够的保护,有可能有助于防止攻击者通过脆弱的后台服务提升到root级别的权限用户。 + +我们的建议是开启它并强制使用。 + +##### 从不`setenforce 0` + +使用`setenforce 0`短时间内把SELinux设置为许可模式,但是你应该避免这样做。其实你是想查找一个特定应用或者程序的问题,实际上这样是把全部系统的SELinux关闭了。 + +你应该使用`semanage permissive -a [somedomain_t]`替换`setenforce 0`,只把这个程序放入许可模式。首先运行`ausearch`查看那个程序发生问题: + + ausearch -ts recent -m avc + +然后看下`scontext=`(SELinux的上下文)行,像这样: + + scontext=staff_u:staff_r:gpg_pinentry_t:s0-s0:c0.c1023 + ^^^^^^^^^^^^^^ + +这告诉你程序`gpg_pinentry_t`被拒绝了,所以你想查看应用的故障,应该增加它到许可模式: + + semange permissive -a gpg_pinentry_t + +这将允许你使用应用然后收集AVC的其他部分,你可以连同`audit2allow`写一个本地策略。一旦完成你就不会看到新的AVC的拒绝,你可以从许可中删除程序,运行: + + semanage permissive -d gpg_pinentry_t + +##### 用SELinux的用户staff_r,使用你的工作站 + +SELinux附带的本地角色实现基于角色的用户帐户禁止或授予某些特权。作为一个管理员,你应该使用`staff_r`角色,这可以限制访问很多配置和其他安全敏感文件,除非你先执行`sudo`。 + +默认,用户作为`unconfined_r`被创建,你可以运行大多数应用,没有任何(或只有一点)SELinux约束。转换你的用户到`staff_r`角色,运行下面的命令: + + usermod -Z staff_u [username] + +你应该退出然后登陆激活新角色,届时如果你运行`id -Z`,你将会看到: + + staff_u:staff_r:staff_t:s0-s0:c0.c1023 + +在执行`sudo`时,你应该记住增加一个额外的标准告诉SELinux转换到"sysadmin"角色。你想要的命令是: + + sudo -i -r sysadm_r + +届时`id -Z`将会显示: + + staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 + +**警告**:在进行这个切换前你应该舒服的使用`ausearch`和`audit2allow`,当你作为`staff_r`角色运行时你的应用有可能不再工作了。写到这里时,以下流行的应用已知在`staff_r`下没有做策略调整就不会工作: + +- Chrome/Chromium +- Skype +- VirtualBox + +切换回`unconfined_r`,运行下面的命令: + + usermod -Z unconfined_u [username] + +然后注销再重新回到舒服的区域。 + +## 延伸阅读 + +IT安全的世界是一个没有底的兔子洞。如果你想深入,或者找到你的具体发行版更多的安全特性,请查看下面这些链接: + +- [Fedora Security Guide](https://docs.fedoraproject.org/en-US/Fedora/19/html/Security_Guide/index.html) +- [CESG Ubuntu Security Guide](https://www.gov.uk/government/publications/end-user-devices-security-guidance-ubuntu-1404-lts) +- [Debian Security Manual](https://www.debian.org/doc/manuals/securing-debian-howto/index.en.html) +- [Arch Linux Security Wiki](https://wiki.archlinux.org/index.php/Security) +- [Mac OSX Security](https://www.apple.com/support/security/guides/) + +## 许可 + +这项工作在[创作共用授权4.0国际许可证][0]许可下。 + +-------------------------------------------------------------------------------- + +via: https://github.com/lfit/itpol/blob/master/linux-workstation-security.md#linux-workstation-security-list + +作者:[mricon][a] +译者:[wyangsun](https://github.com/wyangsun) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://github.com/mricon +[0]: http://creativecommons.org/licenses/by-sa/4.0/ +[1]: https://github.com/QubesOS/qubes-antievilmaid +[2]: https://en.wikipedia.org/wiki/IEEE_1394#Security_issues +[3]: https://qubes-os.org/ +[4]: https://xkcd.com/936/ +[5]: https://spideroak.com/ +[6]: https://code.google.com/p/chromium/wiki/LinuxSandboxing +[7]: http://www.thoughtcrime.org/software/sslstrip/ +[8]: https://keepassx.org/ +[9]: http://www.passwordstore.org/ +[10]: https://pypi.python.org/pypi/django-pstore +[11]: https://github.com/TomPoulton/hiera-eyaml +[12]: http://shop.kernelconcepts.de/ +[13]: https://www.yubico.com/products/yubikey-hardware/yubikey-neo/ +[14]: https://wiki.debian.org/Subkeys +[15]: https://github.com/lfit/ssh-gpg-smartcard-config From 690eff85309eb4f5b8510a39b3ed645e8dd2d9c1 Mon Sep 17 00:00:00 2001 From: KS Date: Mon, 16 Nov 2015 17:52:44 +0800 Subject: [PATCH 2463/2517] Delete 20150831 Linux workstation security checklist.md --- ...31 Linux workstation security checklist.md | 801 ------------------ 1 file changed, 801 deletions(-) delete mode 100644 sources/tech/20150831 Linux workstation security checklist.md diff --git a/sources/tech/20150831 Linux workstation security checklist.md b/sources/tech/20150831 Linux workstation security checklist.md deleted file mode 100644 index 9ef46339d0..0000000000 --- a/sources/tech/20150831 Linux workstation security checklist.md +++ /dev/null @@ -1,801 +0,0 @@ -wyangsun translating -Linux workstation security checklist -================================================================================ -This is a set of recommendations used by the Linux Foundation for their systems -administrators. All of LF employees are remote workers and we use this set of -guidelines to ensure that a sysadmin's system passes core security requirements -in order to reduce the risk of it becoming an attack vector against the rest -of our infrastructure. - -Even if your systems administrators are not remote workers, chances are that -they perform a lot of their work either from a portable laptop in a work -environment, or set up their home systems to access the work infrastructure -for after-hours/emergency support. In either case, you can adapt this set of -recommendations to suit your environment. - -This, by no means, is an exhaustive "workstation hardening" document, but -rather an attempt at a set of baseline recommendations to avoid most glaring -security errors without introducing too much inconvenience. You may read this -document and think it is way too paranoid, while someone else may think this -barely scratches the surface. Security is just like driving on the highway -- -anyone going slower than you is an idiot, while anyone driving faster than you -is a crazy person. These guidelines are merely a basic set of core safety -rules that is neither exhaustive, nor a replacement for experience, vigilance, -and common sense. - -Each section is split into two areas: - -- The checklist that can be adapted to your project's needs -- Free-form list of considerations that explain what dictated these decisions - -## Severity levels - -The items in each checklist include the severity level, which we hope will help -guide your decision: - -- _(CRITICAL)_ items should definitely be high on the consideration list. - If not implemented, they will introduce high risks to your workstation - security. -- _(MODERATE)_ items will improve your security posture, but are less - important, especially if they interfere too much with your workflow. -- _(LOW)_ items may improve the overall security, but may not be worth the - convenience trade-offs. -- _(PARANOID)_ is reserved for items we feel will dramatically improve your - workstation security, but will probably require a lot of adjustment to the - way you interact with your operating system. - -Remember, these are only guidelines. If you feel these severity levels do not -reflect your project's commitment to security, you should adjust them as you -see fit. - -## Choosing the right hardware - -We do not mandate that our admins use a specific vendor or a specific model, so -this section addresses core considerations when choosing a work system. - -### Checklist - -- [ ] System supports SecureBoot _(CRITICAL)_ -- [ ] System has no firewire, thunderbolt or ExpressCard ports _(MODERATE)_ -- [ ] System has a TPM chip _(LOW)_ - -### Considerations - -#### SecureBoot - -Despite its controversial nature, SecureBoot offers prevention against many -attacks targeting workstations (Rootkits, "Evil Maid," etc), without -introducing too much extra hassle. It will not stop a truly dedicated attacker, -plus there is a pretty high degree of certainty that state security agencies -have ways to defeat it (probably by design), but having SecureBoot is better -than having nothing at all. - -Alternatively, you may set up [Anti Evil Maid][1] which offers a more -wholesome protection against the type of attacks that SecureBoot is supposed -to prevent, but it will require more effort to set up and maintain. - -#### Firewire, thunderbolt, and ExpressCard ports - -Firewire is a standard that, by design, allows any connecting device full -direct memory access to your system ([see Wikipedia][2]). Thunderbolt and -ExpressCard are guilty of the same, though some later implementations of -Thunderbolt attempt to limit the scope of memory access. It is best if the -system you are getting has none of these ports, but it is not critical, as -they usually can be turned off via UEFI or disabled in the kernel itself. - -#### TPM Chip - -Trusted Platform Module (TPM) is a crypto chip bundled with the motherboard -separately from the core processor, which can be used for additional platform -security (such as to store full-disk encryption keys), but is not normally used -for day-to-day workstation operation. At best, this is a nice-to-have, unless -you have a specific need to use TPM for your workstation security. - -## Pre-boot environment - -This is a set of recommendations for your workstation before you even start -with OS installation. - -### Checklist - -- [ ] UEFI boot mode is used (not legacy BIOS) _(CRITICAL)_ -- [ ] Password is required to enter UEFI configuration _(CRITICAL)_ -- [ ] SecureBoot is enabled _(CRITICAL)_ -- [ ] UEFI-level password is required to boot the system _(LOW)_ - -### Considerations - -#### UEFI and SecureBoot - -UEFI, with all its warts, offers a lot of goodies that legacy BIOS doesn't, -such as SecureBoot. Most modern systems come with UEFI mode on by default. - -Make sure a strong password is required to enter UEFI configuration mode. Pay -attention, as many manufacturers quietly limit the length of the password you -are allowed to use, so you may need to choose high-entropy short passwords vs. -long passphrases (see below for more on passphrases). - -Depending on the Linux distribution you decide to use, you may or may not have -to jump through additional hoops in order to import your distribution's -SecureBoot key that would allow you to boot the distro. Many distributions have -partnered with Microsoft to sign their released kernels with a key that is -already recognized by most system manufacturers, therefore saving you the -trouble of having to deal with key importing. - -As an extra measure, before someone is allowed to even get to the boot -partition and try some badness there, let's make them enter a password. This -password should be different from your UEFI management password, in order to -prevent shoulder-surfing. If you shut down and start a lot, you may choose to -not bother with this, as you will already have to enter a LUKS passphrase and -this will save you a few extra keystrokes. - -## Distro choice considerations - -Chances are you'll stick with a fairly widely-used distribution such as Fedora, -Ubuntu, Arch, Debian, or one of their close spin-offs. In any case, this is -what you should consider when picking a distribution to use. - -### Checklist - -- [ ] Has a robust MAC/RBAC implementation (SELinux/AppArmor/Grsecurity) _(CRITICAL)_ -- [ ] Publishes security bulletins _(CRITICAL)_ -- [ ] Provides timely security patches _(CRITICAL)_ -- [ ] Provides cryptographic verification of packages _(CRITICAL)_ -- [ ] Fully supports UEFI and SecureBoot _(CRITICAL)_ -- [ ] Has robust native full disk encryption support _(CRITICAL)_ - -### Considerations - -#### SELinux, AppArmor, and GrSecurity/PaX - -Mandatory Access Controls (MAC) or Role-Based Access Controls (RBAC) are an -extension of the basic user/group security mechanism used in legacy POSIX -systems. Most distributions these days either already come bundled with a -MAC/RBAC implementation (Fedora, Ubuntu), or provide a mechanism to add it via -an optional post-installation step (Gentoo, Arch, Debian). Obviously, it is -highly advised that you pick a distribution that comes pre-configured with a -MAC/RBAC system, but if you have strong feelings about a distribution that -doesn't have one enabled by default, do plan to configure it -post-installation. - -Distributions that do not provide any MAC/RBAC mechanisms should be strongly -avoided, as traditional POSIX user- and group-based security should be -considered insufficient in this day and age. If you would like to start out -with a MAC/RBAC workstation, AppArmor and PaX are generally considered easier -to learn than SELinux. Furthermore, on a workstation, where there are few or -no externally listening daemons, and where user-run applications pose the -highest risk, GrSecurity/PaX will _probably_ offer more security benefits than -SELinux. - -#### Distro security bulletins - -Most of the widely used distributions have a mechanism to deliver security -bulletins to their users, but if you are fond of something esoteric, check -whether the developers have a documented mechanism of alerting the users about -security vulnerabilities and patches. Absence of such mechanism is a major -warning sign that the distribution is not mature enough to be considered for a -primary admin workstation. - -#### Timely and trusted security updates - -Most of the widely used distributions deliver regular security updates, but is -worth checking to ensure that critical package updates are provided in a -timely fashion. Avoid using spin-offs and "community rebuilds" for this -reason, as they routinely delay security updates due to having to wait for the -upstream distribution to release it first. - -You'll be hard-pressed to find a distribution that does not use cryptographic -signatures on packages, updates metadata, or both. That being said, fairly -widely used distributions have been known to go for years before introducing -this basic security measure (Arch, I'm looking at you), so this is a thing -worth checking. - -#### Distros supporting UEFI and SecureBoot - -Check that the distribution supports UEFI and SecureBoot. Find out whether it -requires importing an extra key or whether it signs its boot kernels with a key -already trusted by systems manufacturers (e.g. via an agreement with -Microsoft). Some distributions do not support UEFI/SecureBoot but offer -alternatives to ensure tamper-proof or tamper-evident boot environments -([Qubes-OS][3] uses Anti Evil Maid, mentioned earlier). If a distribution -doesn't support SecureBoot and has no mechanisms to prevent boot-level attacks, -look elsewhere. - -#### Full disk encryption - -Full disk encryption is a requirement for securing data at rest, and is -supported by most distributions. As an alternative, systems with -self-encrypting hard drives may be used (normally implemented via the on-board -TPM chip) and offer comparable levels of security plus faster operation, but at -a considerably higher cost. - -## Distro installation guidelines - -All distributions are different, but here are general guidelines: - -### Checklist - -- [ ] Use full disk encryption (LUKS) with a robust passphrase _(CRITICAL)_ -- [ ] Make sure swap is also encrypted _(CRITICAL)_ -- [ ] Require a password to edit bootloader (can be same as LUKS) _(CRITICAL)_ -- [ ] Set up a robust root password (can be same as LUKS) _(CRITICAL)_ -- [ ] Use an unprivileged account, part of administrators group _(CRITICAL)_ -- [ ] Set up a robust user-account password, different from root _(CRITICAL)_ - -### Considerations - -#### Full disk encryption - -Unless you are using self-encrypting hard drives, it is important to configure -your installer to fully encrypt all the disks that will be used for storing -your data and your system files. It is not sufficient to simply encrypt the -user directory via auto-mounting cryptfs loop files (I'm looking at you, older -versions of Ubuntu), as this offers no protection for system binaries or swap, -which is likely to contain a slew of sensitive data. The recommended -encryption strategy is to encrypt the LVM device, so only one passphrase is -required during the boot process. - -The `/boot` partition will always remain unencrypted, as the bootloader needs -to be able to actually boot the kernel before invoking LUKS/dm-crypt. The -kernel image itself should be protected against tampering with a cryptographic -signature checked by SecureBoot. - -In other words, `/boot` should always be the only unencrypted partition on your -system. - -#### Choosing good passphrases - -Modern Linux systems have no limitation of password/passphrase length, so the -only real limitation is your level of paranoia and your stubbornness. If you -boot your system a lot, you will probably have to type at least two different -passwords: one to unlock LUKS, and another one to log in, so having long -passphrases will probably get old really fast. Pick passphrases that are 2-3 -words long, easy to type, and preferably from rich/mixed vocabularies. - -Examples of good passphrases (yes, you can use spaces): -- nature abhors roombas -- 12 in-flight Jebediahs -- perdon, tengo flatulence - -You can also stick with non-vocabulary passwords that are at least 10-12 -characters long, if you prefer that to typing passphrases. - -Unless you have concerns about physical security, it is fine to write down your -passphrases and keep them in a safe place away from your work desk. - -#### Root, user passwords and the admin group - -We recommend that you use the same passphrase for your root password as you -use for your LUKS encryption (unless you share your laptop with other trusted -people who should be able to unlock the drives, but shouldn't be able to -become root). If you are the sole user of the laptop, then having your root -password be different from your LUKS password has no meaningful security -advantages. Generally, you can use the same passphrase for your UEFI -administration, disk encryption, and root account -- knowing any of these will -give an attacker full control of your system anyway, so there is little -security benefit to have them be different on a single-user workstation. - -You should have a different, but equally strong password for your regular user -account that you will be using for day-to-day tasks. This user should be member -of the admin group (e.g. `wheel` or similar, depending on the distribution), -allowing you to perform `sudo` to elevate privileges. - -In other words, if you are the sole user on your workstation, you should have 2 -distinct, robust, equally strong passphrases you will need to remember: - -**Admin-level**, used in the following locations: - -- UEFI administration -- Bootloader (GRUB) -- Disk encryption (LUKS) -- Workstation admin (root user) - -**User-level**, used for the following: - -- User account and sudo -- Master password for the password manager - -All of them, obviously, can be different if there is a compelling reason. - -## Post-installation hardening - -Post-installation security hardening will depend greatly on your distribution -of choice, so it is futile to provide detailed instructions in a general -document such as this one. However, here are some steps you should take: - -### Checklist - -- [ ] Globally disable firewire and thunderbolt modules _(CRITICAL)_ -- [ ] Check your firewalls to ensure all incoming ports are filtered _(CRITICAL)_ -- [ ] Make sure root mail is forwarded to an account you check _(CRITICAL)_ -- [ ] Check to ensure sshd service is disabled by default _(MODERATE)_ -- [ ] Set up an automatic OS update schedule, or update reminders _(MODERATE)_ -- [ ] Configure the screensaver to auto-lock after a period of inactivity _(MODERATE)_ -- [ ] Set up logwatch _(MODERATE)_ -- [ ] Install and use rkhunter _(LOW)_ -- [ ] Install an Intrusion Detection System _(PARANOID)_ - -### Considerations - -#### Blacklisting modules - -To blacklist a firewire and thunderbolt modules, add the following lines to a -file in `/etc/modprobe.d/blacklist-dma.conf`: - - blacklist firewire-core - blacklist thunderbolt - -The modules will be blacklisted upon reboot. It doesn't hurt doing this even if -you don't have these ports (but it doesn't do anything either). - -#### Root mail - -By default, root mail is just saved on the system and tends to never be read. -Make sure you set your `/etc/aliases` to forward root mail to a mailbox that -you actually read, otherwise you may miss important system notifications and -reports: - - # Person who should get root's mail - root: bob@example.com - -Run `newaliases` after this edit and test it out to make sure that it actually -gets delivered, as some email providers will reject email coming in from -nonexistent or non-routable domain names. If that is the case, you will need to -play with your mail forwarding configuration until this actually works. - -#### Firewalls, sshd, and listening daemons - -The default firewall settings will depend on your distribution, but many of -them will allow incoming `sshd` ports. Unless you have a compelling legitimate -reason to allow incoming ssh, you should filter that out and disable the `sshd` -daemon. - - systemctl disable sshd.service - systemctl stop sshd.service - -You can always start it temporarily if you need to use it. - -In general, your system shouldn't have any listening ports apart from -responding to ping. This will help safeguard you against network-level 0-day -exploits. - -#### Automatic updates or notifications - -It is recommended to turn on automatic updates, unless you have a very good -reason not to do so, such as fear that an automatic update would render your -system unusable (it's happened in the past, so this fear is not unfounded). At -the very least, you should enable automatic notifications of available updates. -Most distributions already have this service automatically running for you, so -chances are you don't have to do anything. Consult your distribution -documentation to find out more. - -You should apply all outstanding errata as soon as possible, even if something -isn't specifically labeled as "security update" or has an associated CVE code. -All bugs have the potential of being security bugs and erring on the side of -newer, unknown bugs is _generally_ a safer strategy than sticking with old, -known ones. - -#### Watching logs - -You should have a keen interest in what happens on your system. For this -reason, you should install `logwatch` and configure it to send nightly activity -reports of everything that happens on your system. This won't prevent a -dedicated attacker, but is a good safety-net feature to have in place. - -Note, that many systemd distros will no longer automatically install a syslog -server that `logwatch` needs (due to systemd relying on its own journal), so -you will need to install and enable `rsyslog` to make sure your `/var/log` is -not empty before logwatch will be of any use. - -#### Rkhunter and IDS - -Installing `rkhunter` and an intrusion detection system (IDS) like `aide` or -`tripwire` will not be that useful unless you actually understand how they work -and take the necessary steps to set them up properly (such as, keeping the -databases on external media, running checks from a trusted environment, -remembering to refresh the hash databases after performing system updates and -configuration changes, etc). If you are not willing to take these steps and -adjust how you do things on your own workstation, these tools will introduce -hassle without any tangible security benefit. - -We do recommend that you install `rkhunter` and run it nightly. It's fairly -easy to learn and use, and though it will not deter a sophisticated attacker, -it may help you catch your own mistakes. - -## Personal workstation backups - -Workstation backups tend to be overlooked or done in a haphazard, often unsafe -manner. - -### Checklist - -- [ ] Set up encrypted workstation backups to external storage _(CRITICAL)_ -- [ ] Use zero-knowledge backup tools for cloud backups _(MODERATE)_ - -### Considerations - -#### Full encrypted backups to external storage - -It is handy to have an external hard drive where one can dump full backups -without having to worry about such things like bandwidth and upstream speeds -(in this day and age most providers still offer dramatically asymmetric -upload/download speeds). Needless to say, this hard drive needs to be in itself -encrypted (again, via LUKS), or you should use a backup tool that creates -encrypted backups, such as `duplicity` or its GUI companion, `deja-dup`. I -recommend using the latter with a good randomly generated passphrase, stored in -your password manager. If you travel with your laptop, leave this drive at home -to have something to come back to in case your laptop is lost or stolen. - -In addition to your home directory, you should also back up `/etc` and -`/var/log` for various forensic purposes. - -Above all, avoid copying your home directory onto any unencrypted storage, even -as a quick way to move your files around between systems, as you will most -certainly forget to erase it once you're done, exposing potentially private or -otherwise security sensitive data to snooping hands -- especially if you keep -that storage media in the same bag with your laptop. - -#### Selective zero-knowledge backups off-site - -Off-site backups are also extremely important and can be done either to your -employer, if they offer space for it, or to a cloud provider. You can set up a -separate duplicity/deja-dup profile to only include most important files in -order to avoid transferring huge amounts of data that you don't really care to -back up off-site (internet cache, music, downloads, etc). - -Alternatively, you can use a zero-knowledge backup tool, such as -[SpiderOak][5], which offers an excellent Linux GUI tool and has additional -useful features such as synchronizing content between multiple systems and -platforms. - -## Best practices - -What follows is a curated list of best practices that we think you should -adopt. It is most certainly non-exhaustive, but rather attempts to offer -practical advice that strikes a workable balance between security and overall -usability. - -### Browsing - -There is no question that the web browser will be the piece of software with -the largest and the most exposed attack surface on your system. It is a tool -written specifically to download and execute untrusted, frequently hostile -code. It attempts to shield you from this danger by employing multiple -mechanisms such as sandboxes and code sanitization, but they have all been -previously defeated on multiple occasions. You should learn to approach -browsing websites as the most insecure activity you'll engage in on any given -day. - -There are several ways you can reduce the impact of a compromised browser, but -the truly effective ways will require significant changes in the way you -operate your workstation. - -#### 1: Use two different browsers - -This is the easiest to do, but only offers minor security benefits. Not all -browser compromises give an attacker full unfettered access to your system -- -sometimes they are limited to allowing one to read local browser storage, -steal active sessions from other tabs, capture input entered into the browser, -etc. Using two different browsers, one for work/high security sites, and -another for everything else will help prevent minor compromises from giving -attackers access to the whole cookie jar. The main inconvenience will be the -amount of memory consumed by two different browser processes. - -Here's what we recommend: - -##### Firefox for work and high security sites - -Use Firefox to access work-related sites, where extra care should be taken to -ensure that data like cookies, sessions, login information, keystrokes, etc, -should most definitely not fall into attackers' hands. You should NOT use -this browser for accessing any other sites except select few. - -You should install the following Firefox add-ons: - -- [ ] NoScript _(CRITICAL)_ - - NoScript prevents active content from loading, except from user - whitelisted domains. It is a great hassle to use with your default browser - (though offers really good security benefits), so we recommend only - enabling it on the browser you use to access work-related sites. - -- [ ] Privacy Badger _(CRITICAL)_ - - EFF's Privacy Badger will prevent most external trackers and ad platforms - from being loaded, which will help avoid compromises on these tracking - sites from affecting your browser (trackers and ad sites are very commonly - targeted by attackers, as they allow rapid infection of thousands of - systems worldwide). - -- [ ] HTTPS Everywhere _(CRITICAL)_ - - This EFF-developed Add-on will ensure that most of your sites are accessed - over a secure connection, even if a link you click is using http:// (great - to avoid a number of attacks, such as [SSL-strip][7]). - -- [ ] Certificate Patrol _(MODERATE)_ - - This tool will alert you if the site you're accessing has recently changed - their TLS certificates -- especially if it wasn't nearing expiration dates - or if it is now using a different certification authority. It helps - alert you if someone is trying to man-in-the-middle your connection, - but generates a lot of benign false-positives. - -You should leave Firefox as your default browser for opening links, as -NoScript will prevent most active content from loading or executing. - -##### Chrome/Chromium for everything else - -Chromium developers are ahead of Firefox in adding a lot of nice security -features (at least [on Linux][6]), such as seccomp sandboxes, kernel user -namespaces, etc, which act as an added layer of isolation between the sites -you visit and the rest of your system. Chromium is the upstream open-source -project, and Chrome is Google's proprietary binary build based on it (insert -the usual paranoid caution about not using it for anything you don't want -Google to know about). - -It is recommended that you install **Privacy Badger** and **HTTPS Everywhere** -extensions in Chrome as well and give it a distinct theme from Firefox to -indicate that this is your "untrusted sites" browser. - -#### 2: Use two different browsers, one inside a dedicated VM - -This is a similar recommendation to the above, except you will add an extra -step of running Chrome inside a dedicated VM that you access via a fast -protocol, allowing you to share clipboards and forward sound events (e.g. -Spice or RDP). This will add an excellent layer of isolation between the -untrusted browser and the rest of your work environment, ensuring that -attackers who manage to fully compromise your browser will then have to -additionally break out of the VM isolation layer in order to get to the rest -of your system. - -This is a surprisingly workable configuration, but requires a lot of RAM and -fast processors that can handle the increased load. It will also require an -important amount of dedication on the part of the admin who will need to -adjust their work practices accordingly. - -#### 3: Fully separate your work and play environments via virtualization - -See [Qubes-OS project][3], which strives to provide a high-security -workstation environment via compartmentalizing your applications into separate -fully isolated VMs. - -### Password managers - -#### Checklist - -- [ ] Use a password manager _(CRITICAL_) -- [ ] Use unique passwords on unrelated sites _(CRITICAL)_ -- [ ] Use a password manager that supports team sharing _(MODERATE)_ -- [ ] Use a separate password manager for non-website accounts _(PARANOID)_ - -#### Considerations - -Using good, unique passwords should be a critical requirement for every member -of your team. Credential theft is happening all the time -- either via -compromised computers, stolen database dumps, remote site exploits, or any -number of other means. No credentials should ever be reused across sites, -especially for critical applications. - -##### In-browser password manager - -Every browser has a mechanism for saving passwords that is fairly secure and -can sync with vendor-maintained cloud storage while keeping the data encrypted -with a user-provided passphrase. However, this mechanism has important -disadvantages: - -1. It does not work across browsers -2. It does not offer any way of sharing credentials with team members - -There are several well-supported, free-or-cheap password managers that are -well-integrated into multiple browsers, work across platforms, and offer -group sharing (usually as a paid service). Solutions can be easily found via -search engines. - -##### Standalone password manager - -One of the major drawbacks of any password manager that comes integrated with -the browser is the fact that it's part of the application that is most likely -to be attacked by intruders. If this makes you uncomfortable (and it should), -you may choose to have two different password managers -- one for websites -that is integrated into your browser, and one that runs as a standalone -application. The latter can be used to store high-risk credentials such as -root passwords, database passwords, other shell account credentials, etc. - -It may be particularly useful to have such tool for sharing superuser account -credentials with other members of your team (server root passwords, ILO -passwords, database admin passwords, bootloader passwords, etc). - -A few tools can help you: - -- [KeePassX][8], which improves team sharing in version 2 -- [Pass][9], which uses text files and PGP and integrates with git -- [Django-Pstore][10], which uses GPG to share credentials between admins -- [Hiera-Eyaml][11], which, if you are already using Puppet for your - infrastructure, may be a handy way to track your server/service credentials - as part of your encrypted Hiera data store - -### Securing SSH and PGP private keys - -Personal encryption keys, including SSH and PGP private keys, are going to be -the most prized items on your workstation -- something the attackers will be -most interested in obtaining, as that would allow them to further attack your -infrastructure or impersonate you to other admins. You should take extra steps -to ensure that your private keys are well protected against theft. - -#### Checklist - -- [ ] Strong passphrases are used to protect private keys _(CRITICAL)_ -- [ ] PGP Master key is stored on removable storage _(MODERATE)_ -- [ ] Auth, Sign and Encrypt Subkeys are stored on a smartcard device _(MODERATE)_ -- [ ] SSH is configured to use PGP Auth key as ssh private key _(MODERATE)_ - -#### Considerations - -The best way to prevent private key theft is to use a smartcard to store your -encryption private keys and never copy them onto the workstation. There are -several manufacturers that offer OpenPGP capable devices: - -- [Kernel Concepts][12], where you can purchase both the OpenPGP compatible - smartcards and the USB readers, should you need one. -- [Yubikey NEO][13], which offers OpenPGP smartcard functionality in addition - to many other cool features (U2F, PIV, HOTP, etc). - -It is also important to make sure that the master PGP key is not stored on the -main workstation, and only subkeys are used. The master key will only be -needed when signing someone else's keys or creating new subkeys -- operations -which do not happen very frequently. You may follow [the Debian's subkeys][14] -guide to learn how to move your master key to removable storage and how to -create subkeys. - -You should then configure your gnupg agent to act as ssh agent and use the -smartcard-based PGP Auth key to act as your ssh private key. We publish a -[detailed guide][15] on how to do that using either a smartcard reader or a -Yubikey NEO. - -If you are not willing to go that far, at least make sure you have a strong -passphrase on both your PGP private key and your SSH private key, which will -make it harder for attackers to steal and use them. - -### SELinux on the workstation - -If you are using a distribution that comes bundled with SELinux (such as -Fedora), here are some recommendation of how to make the best use of it to -maximize your workstation security. - -#### Checklist - -- [ ] Make sure SELinux is enforcing on your workstation _(CRITICAL)_ -- [ ] Never blindly run `audit2allow -M`, always check _(CRITICAL)_ -- [ ] Never `setenforce 0` _(MODERATE)_ -- [ ] Switch your account to SELinux user `staff_u` _(MODERATE)_ - -#### Considerations - -SELinux is a Mandatory Access Controls (MAC) extension to core POSIX -permissions functionality. It is mature, robust, and has come a long way since -its initial roll-out. Regardless, many sysadmins to this day repeat the -outdated mantra of "just turn it off." - -That being said, SELinux will have limited security benefits on the -workstation, as most applications you will be running as a user are going to -be running unconfined. It does provide enough net benefit to warrant leaving -it on, as it will likely help prevent an attacker from escalating privileges -to gain root-level access via a vulnerable daemon service. - -Our recommendation is to leave it on and enforcing. - -##### Never `setenforce 0` - -It's tempting to use `setenforce 0` to flip SELinux into permissive mode -on a temporary basis, but you should avoid doing that. This essentially turns -off SELinux for the entire system, while what you really want is to -troubleshoot a particular application or daemon. - -Instead of `setenforce 0` you should be using `semanage permissive -a -[somedomain_t]` to put only that domain into permissive mode. First, find out -which domain is causing troubles by running `ausearch`: - - ausearch -ts recent -m avc - -and then look for `scontext=` (source SELinux context) line, like so: - - scontext=staff_u:staff_r:gpg_pinentry_t:s0-s0:c0.c1023 - ^^^^^^^^^^^^^^ - -This tells you that the domain being denied is `gpg_pinentry_t`, so if you -want to troubleshoot the application, you should add it to permissive domains: - - semange permissive -a gpg_pinentry_t - -This will allow you to use the application and collect the rest of the AVCs, -which you can then use in conjunction with `audit2allow` to write a local -policy. Once that is done and you see no new AVC denials, you can remove that -domain from permissive by running: - - semanage permissive -d gpg_pinentry_t - -##### Use your workstation as SELinux role staff_r - -SELinux comes with a native implementation of roles that prohibit or grant -certain privileges based on the role associated with the user account. As an -administrator, you should be using the `staff_r` role, which will restrict -access to many configuration and other security-sensitive files, unless you -first perform `sudo`. - -By default, accounts are created as `unconfined_r` and most applications you -execute will run unconfined, without any (or with only very few) SELinux -constraints. To switch your account to the `staff_r` role, run the following -command: - - usermod -Z staff_u [username] - -You should log out and log back in to enable the new role, at which point if -you run `id -Z`, you'll see: - - staff_u:staff_r:staff_t:s0-s0:c0.c1023 - -When performing `sudo`, you should remember to add an extra flag to tell -SELinux to transition to the "sysadmin" role. The command you want is: - - sudo -i -r sysadm_r - -At which point `id -Z` will show: - - staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 - -**WARNING**: you should be comfortable using `ausearch` and `audit2allow` -before you make this switch, as it's possible some of your applications will -no longer work when you're running as role `staff_r`. At the time of writing, -the following popular applications are known to not work under `staff_r` -without policy tweaks: - -- Chrome/Chromium -- Skype -- VirtualBox - -To switch back to `unconfined_r`, run the following command: - - usermod -Z unconfined_u [username] - -and then log out and back in to get back into the comfort zone. - -## Further reading - -The world of IT security is a rabbit hole with no bottom. If you would like to -go deeper, or find out more about security features on your particular -distribution, please check out the following links: - -- [Fedora Security Guide](https://docs.fedoraproject.org/en-US/Fedora/19/html/Security_Guide/index.html) -- [CESG Ubuntu Security Guide](https://www.gov.uk/government/publications/end-user-devices-security-guidance-ubuntu-1404-lts) -- [Debian Security Manual](https://www.debian.org/doc/manuals/securing-debian-howto/index.en.html) -- [Arch Linux Security Wiki](https://wiki.archlinux.org/index.php/Security) -- [Mac OSX Security](https://www.apple.com/support/security/guides/) - -## License -This work is licensed under a -[Creative Commons Attribution-ShareAlike 4.0 International License][0]. - --------------------------------------------------------------------------------- - -via: https://github.com/lfit/itpol/blob/master/linux-workstation-security.md#linux-workstation-security-checklist - -作者:[mricon][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://github.com/mricon -[0]: http://creativecommons.org/licenses/by-sa/4.0/ -[1]: https://github.com/QubesOS/qubes-antievilmaid -[2]: https://en.wikipedia.org/wiki/IEEE_1394#Security_issues -[3]: https://qubes-os.org/ -[4]: https://xkcd.com/936/ -[5]: https://spideroak.com/ -[6]: https://code.google.com/p/chromium/wiki/LinuxSandboxing -[7]: http://www.thoughtcrime.org/software/sslstrip/ -[8]: https://keepassx.org/ -[9]: http://www.passwordstore.org/ -[10]: https://pypi.python.org/pypi/django-pstore -[11]: https://github.com/TomPoulton/hiera-eyaml -[12]: http://shop.kernelconcepts.de/ -[13]: https://www.yubico.com/products/yubikey-hardware/yubikey-neo/ -[14]: https://wiki.debian.org/Subkeys -[15]: https://github.com/lfit/ssh-gpg-smartcard-config From d79f9ad4074cedcd3f4357da90ba7ac380c2b4d5 Mon Sep 17 00:00:00 2001 From: Ricky Gong Date: Mon, 16 Nov 2015 19:07:20 +0800 Subject: [PATCH 2464/2517] Delete from source directory --- ...s in Ubuntu Using Go For It Application.md | 86 ------------------- 1 file changed, 86 deletions(-) delete mode 100644 sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md diff --git a/sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md b/sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md deleted file mode 100644 index 1fdc126604..0000000000 --- a/sources/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md +++ /dev/null @@ -1,86 +0,0 @@ -Ricky-Gong 翻译中 - -How to Manage Your To-Do Lists in Ubuntu Using Go For It Application -================================================================================ -![](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-featured1.jpg) - -Task management is arguably one of the most important and challenging part of professional as well as personal life. Professionally, as you assume more and more responsibility, your performance is directly related to or affected with your ability to manage the tasks you’re assigned. - -If your job involves working on a computer, then you’ll be happy to know that there are various applications available that claim to make task management easy for you. While most of them cater to Windows users, there are many options available on Linux, too. In this article we will discuss one such application: Go For It. - -### Go For It ### - -[Go For It][1] (GFI) is developed by Manuel Kehl, who describes it as a “a simple and stylish productivity app, featuring a to-do list, merged with a timer that keeps your focus on the current task.” The timer feature, specifically, is interesting, as it also makes sure that you take a break from your current task and relax for sometime before proceeding further. - -### Download and Installation ### - -Users of Debian-based systems, like Ubuntu, can easily install the app by running the following commands in terminal: - - sudo add-apt-repository ppa:mank319/go-for-it - sudo apt-get update - sudo apt-get install go-for-it - -Once done, you can execute the application by running the following command: - - go-for-it - -### Usage and Configuration ### - -Here is how the GFI interface looks when you run the app for the very first time: - -![gfi-first-run](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-first-run1.png) - -As you can see, the interface consists of three tabs: To-Do, Timer, and Done. While the To-Do tab contains a list of tasks (the 4 tasks shown in the image above are there by default – you can delete them by clicking on the rectangular box in front of them), the Timer tab contains task timer, while Done contains a list of tasks that you’ve finished successfully. Right at the bottom is a text box where you can enter the task text and click “+” to add it to the list above. - -For example, I added a task named “MTE-research-work” to the list and selected it by clicking on it in the list – see the screenshot below: - -![gfi-task-added](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-task-added1.png) - -Then I selected the Timer tab. Here I could see a 25-minute timer for the active task which was “MTE-reaserch-work.” - -![gfi-active-task-timer](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-active-task-timer.png) - -Of course, you can change the timer value and set to any time you want. I, however, didn’t change the value and clicked the Start button present below to start the task timer. Once 60 seconds were left, GFI issued a notification indicating the same. - -![gfi-first-notification-new](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-first-notification-new.jpg) - -And once the time was up, I was asked to take a break of five minutes. - -![gfi-time-up-notification-new](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-time-up-notification-new.jpg) - -Once those five minutes were over, I could again start the task timer for my task. - -![gfi-break-time-up-new](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-break-time-up-new.jpg) - -When you’re done with your task, you can click the Done button in the Timer tab. The task is then removed from the To-Do tab and listed in the Done tab. - -![gfi-task-done](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-task-done1.png) - -GFI also allows you to tweak some of its settings. For example, the settings window shown below contains options to tweak the default task duration, break duration, and reminder time. - -![gfi-settings](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-settings1.png) - -It’s worth mentioning that GFI stores the to-do lists in the Todo.txt format which simplifies synchronization with mobile devices and makes it possible for you to edit tasks using other frontends – read more about it [here][2]. - -You can also see the GFI app in action in the video below. - -注:youtube 视频 - - -### Conclusion ### - -As you have observed, GFI is an easy to understand and simple to use task management application. Although it doesn’t offer a plethora of features, it does what it claims – the timer integration is especially useful. If you’re looking for a basic, open-source task management tool for Linux, Go For It is worth trying. - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/to-do-lists-ubuntu-go-for-it/ - -作者:[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]:http://manuel-kehl.de/projects/go-for-it/ -[2]:http://todotxt.com/ From 1a7721c9a3c802d2f79b1c38d455dbf091cdde1e Mon Sep 17 00:00:00 2001 From: Ricky Gong Date: Mon, 16 Nov 2015 19:09:38 +0800 Subject: [PATCH 2465/2517] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E3=80=91To=20Do=20List?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...s in Ubuntu Using Go For It Application.md | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 translated/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md diff --git a/translated/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md b/translated/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md new file mode 100644 index 0000000000..bbc96a6e7b --- /dev/null +++ b/translated/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md @@ -0,0 +1,84 @@ +如何在 Ubuntu 上用 Go For It 管理您的待办清单 (To-Do Lists) +================================================================================ +![](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-featured1.jpg) + +任务管理可以说是工作及日常生活中最重要也最具挑战性的事情之一。当您在工作中承担越来越多的责任时,您的表现将与您管理任务的能力直接挂钩。 + +若您的工作有部分需要在电脑上完成,那么您一定很乐意知道,有多款应用软件声称可以为您减轻任务管理的负担。即便这些软件中的大多数都是为 Windows 用户服务的,在 Linux 系统中仍然有不少选择。在本文中,我们就来讨论这样一款软件:Go For It. + +### Go For It ### + +[Go For It][1] (GFI) 由 Manuel Kehl 开发,他声称:“这是款简单易用且时尚优雅的生产力软件,以待办清单(To-Do List)为主打特色,并整合了一个能让你专注于当前事务的定时器。”这款软件的定时器功能尤其有趣,它还可以确保您在继续工作之前暂停下来,放松一段时间。 + +### 下载并安装 ### + +使用基于 Debian 的系统(如Ubuntu)的用户可以通过运行以下终端命令轻松地安装这款软件: + + sudo add-apt-repository ppa:mank319/go-for-it + sudo apt-get update + sudo apt-get install go-for-it + +以上命令执行完毕后,您就可以使用这条命令运行这款应用软件了: + + go-for-it + +### 使用及配置### + +当你第一次运行 GFI 时,它的界面是长这样的: + +![gfi-first-run](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-first-run1.png) + +可以看到,界面由三个标签页组成,分别是*待办* (To-Do),*定时器* (Timer)和*完成* (Done)。*待办*页是一个任务列表(上图所示的4个任务是默认生成的——您可以点击头部的方框删除它们),*定时器*页内含有任务定时器,而*完成*页则是已完成任务的列表。底部有个文本框,您可以在此输入任务描述,并点击“+”号将任务添加到上面的列表中。 + +举个例子,我将一个名为“MTE-research-work”的任务添加到了列表中,并点击选中了它,如下图所示: + +![gfi-task-added](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-task-added1.png) + +然后我进入*定时器*页,在这里我可以看到一个为当前“MTE-reaserch-work”任务设定的定时器,定时25分钟。 + +![gfi-active-task-timer](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-active-task-timer.png) + +当然,您可以将定时器设定为你喜欢的任何值。然而我并没有修改,而是直接点击下方的“开始 (Start)”按钮启动定时器。一旦剩余时间为60秒,GFI 就会给出一个提示。 + +![gfi-first-notification-new](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-first-notification-new.jpg) + +一旦时间到,它会提醒我休息5分钟。 + +![gfi-time-up-notification-new](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-time-up-notification-new.jpg) + +5分钟过后,我可以为我的任务再次开启定时器。 + +![gfi-break-time-up-new](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-break-time-up-new.jpg) + +任务完成以后,您可以点击*定时器*页中的“完成 (Done)”按钮,然后这个任务就会从*待办*页被转移到*完成*页。 + +![gfi-task-done](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-task-done1.png) + +GFI 也能让您稍微调整一些它的设置。例如,下图所示的设置窗口就包含了一些选项,让您修改默认的任务时长,休息时长和提示时刻。 + +![gfi-settings](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-settings1.png) + +值得一提的是,GFI 是以 TODO.txt 格式保存待办清单的,这种格式方便了移动设备之间的同步,也让您能使用其他前端程序来编辑任务——更多详情请阅读[这里][2]。 + +您还可以通过以下视频观看 GFI 的动态展示。 + +注:youtube 视频 + + +### 结论### + +正如您所看到的,GFI 是一款简洁明了且易于使用的任务管理软件。虽然它不提供非常丰富的功能,但它实现了它的承诺,并且定时器的整合特别有用。如果您正在寻找一款实现了基础功能,并且开源的 Linux 任务管理软件,Go For It 值得您一试。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/to-do-lists-ubuntu-go-for-it/ + +作者:[Himanshu Arora][a] +译者:[Ricky-Gong](https://github.com/Ricky-Gong) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/himanshu/ +[1]:http://manuel-kehl.de/projects/go-for-it/ +[2]:http://todotxt.com/ From 5cca15fcd63b4003f07d0a8a01acf29c52c03cfa Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 16 Nov 2015 23:45:27 +0800 Subject: [PATCH 2466/2517] PUB:20151109 Open Source Alternatives to LastPass @StduoA --- ...09 Open Source Alternatives to LastPass.md | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) rename {translated/share => published}/20151109 Open Source Alternatives to LastPass.md (72%) diff --git a/translated/share/20151109 Open Source Alternatives to LastPass.md b/published/20151109 Open Source Alternatives to LastPass.md similarity index 72% rename from translated/share/20151109 Open Source Alternatives to LastPass.md rename to published/20151109 Open Source Alternatives to LastPass.md index 0b29dd3f5c..32819f9a07 100644 --- a/translated/share/20151109 Open Source Alternatives to LastPass.md +++ b/published/20151109 Open Source Alternatives to LastPass.md @@ -1,12 +1,12 @@ -LastPass的开源替代品 +LastPass 的开源替代品 ================================================================================ LastPass是一个跨平台的密码管理程序。在Linux平台中,它可作为Firefox, Chrome和Opera浏览器的插件使用。LastPass Sesame支持Ubuntu/Debian与Fedora系统。此外,LastPass还有安装在Firefox Portable的便携版,可将其安装在USB设备上。再加上适用于Ubuntu/Debian, Fedora和openSUSE的LastPass Pocket, 其具有良好的跨平台覆盖性。虽然LastPass备受好评,但它是一个专有软件。此外,LastPass最近被LogMeIn收购。如果你在找一个开源的替代品,这篇文章可能会对你有所帮助。 -我们正面临着信息大爆炸。无论你是要在线经营生意,找工作,还是只为了休闲来进行阅读,互联网都是一个广大的信息源。在这种情况下,长期保留信息是很困难的。然而,及时地获取某些特定信息非常重要。密码就是这样的一个例子。 +我们正面临着信息大爆炸。无论你是要在线经营生意,找工作,还是只为了休闲来进行阅读,互联网都是一个海量的信息源。在这种情况下,长期保留信息是很困难的。然而,及时地获取某些特定信息非常重要。密码就是这样的一个例子。 作为一个电脑用户,你可能会面临在不同服务或网站使用相同或不同密码的困境。这个事情非常复杂,因为有些网站会限制你对密码的选择。比如,一个网站可能会限制密码的最小位数,大写字母,数字或者特殊字符,这使得在所有网站使用统一密码变得不可能。更重要的是,不在不同网站中使用同一密码有安全方面的原因。这样就不可避免地意味着人们经常会有很多密码要记。一个解决方案是将所有的密码写下来。然而,这种做法也极度的不安全。 -为了解决需要记忆无穷多串密码的问题,目前比较流行的解决方案是使用密码管理软件。事实上,这类软件对于活跃的互联网用户来说极为实用。它使得你获取、管理和安全保存所有密码变得极为容易,而大多数密码都是被软件或文件系统加密过的。因此,用户只需要记住一个简单的密码就可以获取到其它所有密码。密码管理软件鼓励用户对于不同服务去采用独一无二的,非直观的强密码。 +为了解决需要记忆无穷多串密码的问题,目前比较流行的解决方案是使用密码管理软件。事实上,这类软件对于活跃的互联网用户来说极为实用。它使得你获取、管理和安全保存所有密码变得极为容易,而大多数密码都是用软件或文件系统加密过的。因此,用户只需要记住一个简单的密码就可以获取到其它所有密码。密码管理软件鼓励用户对于不同服务去采用独一无二的,非直观的高强度的密码。 为了让大家更深入地了解Linux软件的质量,我将介绍4款优秀的、可替代LastPass的开源软件。 @@ -14,25 +14,27 @@ LastPass是一个跨平台的密码管理程序。在Linux平台中,它可作 ![KeePassX软件截图](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-KeePassX.png) -KeePassX提供KeePass的多平台接口,是一款开源、跨平台的密码管理软件。这款软件可以帮助你以安全的方式保管密码。你可以将所有密码保存在一个数据库中,而这个数据库被一个主密码或密码盘来保管。 +KeePassX是KeePass的多平台移植,是一款开源、跨平台的密码管理软件。这款软件可以帮助你以安全的方式保管密码。你可以将所有密码保存在一个数据库中,而这个数据库被一个主密码或密码盘来保管。这使得用户只需要记住一个单一的主密码或插入密码盘即可解锁整个数据库。 密码数据库使用AES(即Rijndael)或者TwoFish算法进行加密,密钥长度为256位。 该软件功能包括: -- 多重管理模式 - 使每条密码更容易被识别 +- 管理模式丰富 + - 通过标题使每条密码更容易被识别 - 可设置密码过期时间 - 可插入附件 - 可为不同分组或密码自定义标志 - 在分组中对密码排序 -- 搜索函数:可在特定分组或整个数据库中搜索 -- Auto-Type: 这个功能允许你在登录网站时只需要按下几个键。KeePassX可以帮助你输入剩下的密码。Auto-Type通过读取当前窗口的标题,对密码数据库进行搜索来获取相应的密码 -- 数据库安全性强,用户可通过密码或一个密钥文件(可存储在CD或U盘中)访问数据库 -- 自动生成安全的密码 -- 具有预防措施,获取选中的密码并检查其安全性 -- 加密 - 用256位密钥,通过AES(高级加密标准)或TwoFish算法加密数据库 +- 搜索功能:可在特定分组或整个数据库中搜索 +- 自动键入: 这个功能允许你在登录网站时只需要按下几个键。KeePassX可以帮助你输入剩下的密码。自动键入通过读取当前窗口的标题,对密码数据库进行搜索来获取相应的密码 +- 数据库安全性强,用户可通过密码或一个密钥文件(可存储在CD或U盘中)访问数据库(或两者) +- 安全密码自动生成 +- 具有预防措施,获取用星号隐藏的密码并检查其安全性 +- 加密 - 用256位密钥,通过AES(高级加密标准)或TwoFish算法加密数据库, - 密码可以导入或导出。可从PwManager文件(*.pwm)或KWallet文件(*.xml)中导入密码,可导出为文本(*.txt)格式。 +--- - 软件官网:[www.keepassx.org][1] - 开发者:KeepassX Team - 软件许可证:GNU GPL V2 @@ -42,21 +44,23 @@ KeePassX提供KeePass的多平台接口,是一款开源、跨平台的密码 ![Encryptr软件截图](http://www.linuxlinks.com/portal/content/reviews/Utilities/Screenshot-Encryptr.png) -Encryptr是一个开源的、零知晓的、基于云端的密码管理/电子钱包软件,以Crypton为基础开发。Crypton是一个Javascript库,允许开发者利用其开发应用,上传文件至服务器,而服务器无法知道用户所存储的文件内容。 +Encryptr是一个开源的、零知识(zero-knowledge)的、基于云端的密码管理/电子钱包软件,以Crypton为基础开发。Crypton是一个Javascript库,允许开发者利用其开发应用来上传文件至服务器,而服务器无法知道用户所存储的文件内容。 -Encryptr可将你的敏感信息,比如密码、信用卡数据、PIN码、或认证码存储在云端。然而,由于它基于零知晓的Cypton框架开发,Encryptr可保证只有用户才拥有访问或读取秘密信息的权限。 +Encryptr可将你的敏感信息,比如密码、信用卡数据、PIN码、或认证码存储在云端。然而,由于它基于零知识的Cypton框架开发,Encryptr可保证只有用户才拥有访问或读取秘密信息的权限。 由于其跨平台的特性,Encryptr允许用户随时随地、安全地通过一个账户从云端获取机密信息。 软件特性包括: -- 使用极安全、零知晓的Crypton框架,软件只在本地加密/解密数据 +- 使用非常安全的零知识Crypton框架,只在你的本地加密/解密数据 - 易于使用 - 基于云端 - 可存储三种类型的数据:密码、信用卡账号以及通用的键值对 - 可对每条密码设置“备注”项 -- 对本地密码进行缓存加密,以节省上传时间 +- 过滤和搜索密码 +- 对密码进行本地加密缓存,以节省载入时间 +--- - 软件官网: [encryptr.org][2] - 开发者: Tommy Williams - 软件许可证: GNU GPL v3 @@ -74,7 +78,9 @@ RatticDB被设计为一个“密码生命周期管理工具”而不是单单一 - 简洁的ACL设计 - 可改变队列功能,可让用户知晓何时需要更改某应用的密码 -- Ansible配置 +- 支持Ansible配置 + +--- - 软件官网: [rattic.org][3] - 开发者: Daniel Hall @@ -85,9 +91,9 @@ RatticDB被设计为一个“密码生命周期管理工具”而不是单单一 ![Seahorse软件截图](http://www.linuxlinks.com/portal/content/reviews/Security/Screenshot-Seahorse.png) -Seahorse是一个于Gnome前端运行的GnuPG - GNU隐私保护软件。它的目标是提供一个易于使用密钥管理工具,一并提供一个易于使用的界面来控制加密操作。 +Seahorse是一个GnuPG(GNU隐私保护软件)的Gnome前端界面。它的目标是提供一个易于使用密钥管理工具,以及一个易于使用的界面来控制加密操作。 -Seahorse是一个工具,用来提供安全沟通和数据存储服务。数据加密和数字密钥生成操作可以轻易通过GUI来演示,密钥管理操作也可以轻易通过直观的界面来进行。 +Seahorse是一个工具,用来提供安全传输和数据存储服务。数据加密和数字密钥生成操作可以轻易通过GUI来操作,密钥管理操作也可以轻易通过直观的界面来进行。 此外,Seahorse包含一个Gedit插件,可以使用鹦鹉螺文件管理器管理文件,一个管理剪贴板中事物的小程序,一个存储私密密码的代理,还有一个GnuPG和OpenSSH的密钥管理工具。 @@ -95,7 +101,7 @@ Seahorse是一个工具,用来提供安全沟通和数据存储服务。数据 - 对文本进行加密/解密/签名 - 管理密钥及密钥环 -- 将密钥及密钥环于密钥服务器同步 +- 将密钥及密钥环与密钥服务器同步 - 密码签名及发布 - 将密码缓存起来,无需多次重复键入 - 对密钥及密钥环进行备份 @@ -103,6 +109,8 @@ Seahorse是一个工具,用来提供安全沟通和数据存储服务。数据 - 生成SSH密钥,对其进行验证及储存 - 多语言支持 +--- + - 软件官网: [www.gnome.org/projects/seahorse][4] - 开发者: Jacob Perkins, Jose Carlos, Garcia Sogo, Jean Schurger, Stef Walter, Adam Schreiber - 软件许可证: GNU GPL v2 @@ -113,7 +121,7 @@ Seahorse是一个工具,用来提供安全沟通和数据存储服务。数据 via: http://www.linuxlinks.com/article/20151108125950773/LastPassAlternatives.html 译者:[StdioA](https://github.com/StdioA) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d32c97534e7dda0d4830bce24e1971f2165e9c2c Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 17 Nov 2015 00:22:13 +0800 Subject: [PATCH 2467/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...e Search Is About To Get A Big Power Up.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md b/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md index c3c5f03d25..ce7f86a6e4 100644 --- a/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md +++ b/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md @@ -1,24 +1,24 @@ -Nautilus的文件搜索将迎来重大提升 +Nautilus的文件搜索将迎来巨大提升 ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/10/nautilus-new-search-filters.jpg) -**在Nautilus中搜索位置文件和文件夹将会将会变得很简单。** +**在Nautilus中搜索零散文件和文件夹将会将会变得相当简单。** -一个[GNOME文件管理器][1]中新的**搜索过滤器**正在开发中。它大量使用的GNOME的弹出式菜单来找出搜索结果并精确找到你关心的。 +[GNOME文件管理器][1]中一个新的**搜索过滤器**正在开发中。它大量使用 GNOME 的弹出式菜单努力提供一个简单的方法缩小搜索结果并精确找到你需要的。 -开发者Georges Stavracas正致力于新的UI并[描述][2]新的编辑器为“更干净、更理智、更直观”。 +开发者Georges Stavracas正致力于新的UI并[描述][2]新的编辑器为“更干净、更合理、更直观”。 -根据[上传到Youtube][3]的视频-他还没有嵌入它-他没有错。 +根据他[上传到Youtube][3]的视频来展示新的方式-他还没有嵌入它-他没有错。 -> 他在他的博客中写到:“Nautilus有非常复杂但是强大的内部,它允许我们做很多事情。事实上这对于很多选项的代码也是这样。那么,为何它曾经看上去这么糟糕?” +> 他在他的博客中写到:“ Nautilus 有非常复杂但是强大的内部组成,它允许我们做很多事情。事实上有代码可提供很多选择。那么,为何它曾经看上去这么糟糕?” -问题有部分修辞;新的搜索过滤器界面对用户展示了“强大的内部”。搜索可以根据类型、名字或者日期范围来进行过滤。 +问题有部分比较夸张;新的搜索过滤器界面向用户展示了“强大的内部组成”。搜索结果可以根据类型、名字或者日期范围来进行过滤。 -对像Nautilus这种app的任何修改有可能让一些用户不安,因此像这样有帮助、直接的新UI会带来一些争议。 +对于像 Nautilus 这类 app 的任何修改有可能让一些用户不安,因此像这样帮助性的、直接的新UI会带来一些争议。 -不要担心不满会影响进度(毫无疑问,虽然像[移除类型优先搜索][4]的争议自2014年以来一直在争论)。[上个月发布的][5]GNOME 3.18给Nautilus引入了新的文件进度对话框,以及更好的远程共享,包括Google Drive。 +虽然对于不满的担心貌似会影响进度(毫无疑问,虽然像[移除类型优先搜索][4]的争议自2014年以来一直在争论)。GNOME 3.18 在[上个月发布了][5],给 Nautilus 引入了新的文件进度对话框,以及远程共享的更好整合,包括 Google Drive。 -Stavracas的搜索过滤还没被合并进Files的trunk,但是重做的UI已经初步计划在明年春天的GNOME 3.20中实现。 +Stavracas 的搜索过滤器还没被合并进 Files 的 trunk,但是重做的搜索 UI 已经初步计划在明年春天的 GNOME 3.20 中实现。 -------------------------------------------------------------------------------- @@ -26,7 +26,7 @@ via: http://www.omgubuntu.co.uk/2015/10/new-nautilus-search-filter-ui 作者:[Joey-Elijah Sneddon][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5f0acf2b6992ecfad4df3d647dba995cf1bd3e1b Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Tue, 17 Nov 2015 00:24:18 +0800 Subject: [PATCH 2468/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...51019 Nautilus File Search Is About To Get A Big Power Up.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md b/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md index ce7f86a6e4..b9f0762cbe 100644 --- a/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md +++ b/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md @@ -4,7 +4,7 @@ Nautilus的文件搜索将迎来巨大提升 **在Nautilus中搜索零散文件和文件夹将会将会变得相当简单。** -[GNOME文件管理器][1]中一个新的**搜索过滤器**正在开发中。它大量使用 GNOME 的弹出式菜单努力提供一个简单的方法缩小搜索结果并精确找到你需要的。 +[GNOME文件管理器][1]中一个新的**搜索过滤器**正在开发中。它大量使用 GNOME 漂亮的弹出式菜单努力提供一个简单的方法缩小搜索结果并精确找到你需要的。 开发者Georges Stavracas正致力于新的UI并[描述][2]新的编辑器为“更干净、更合理、更直观”。 From 1897f6da7a8d7c2cafe0a8c1ebe0eca3da20f59b Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Tue, 17 Nov 2015 09:58:35 +0800 Subject: [PATCH 2469/2517] Update 20151116 Linux FAQs with Answers--How to install Node.js on Linux.md --- ...inux FAQs with Answers--How to install Node.js on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md b/sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md index fed809541e..146c918d1d 100644 --- a/sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md +++ b/sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md @@ -1,3 +1,5 @@ +translation by strugglingyouth + Linux FAQs with Answers--How to install Node.js on Linux ================================================================================ > **Question**: How can I install Node.js on [insert your Linux distro]? @@ -87,4 +89,4 @@ via: http://ask.xmodulo.com/install-node-js-linux.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://nodejs.org/ [2]:https://www.npmjs.com/ -[3]:https://launchpad.net/~chris-lea/+archive/node.js \ No newline at end of file +[3]:https://launchpad.net/~chris-lea/+archive/node.js From 2f25d35da370a5b1f639518975dd574f6f025e7d Mon Sep 17 00:00:00 2001 From: Ricky Gong Date: Tue, 17 Nov 2015 10:23:32 +0800 Subject: [PATCH 2470/2517] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?=E3=80=9120151116=20Linux=20FAQs=20with=20Answers,=20JAVA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...t JAVA_HOME environment variable automatically on Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md b/sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md index ac64916ccf..2d61fc63da 100644 --- a/sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md +++ b/sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md @@ -1,3 +1,5 @@ +Ricky-Gong is translating. + Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux ================================================================================ > **Question**: I need to compile a Java program on my Linux box. For that I already installed JDK (Java Development Kit), and now I'm trying to set JAVA_HOME environment variable to point to the installed JDK. What is the recommended way to set JAVA_HOME environment variable on Linux? @@ -45,4 +47,4 @@ via: http://ask.xmodulo.com/set-java_home-environment-variable-linux.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/change-default-java-version-linux.html \ No newline at end of file +[1]:http://ask.xmodulo.com/change-default-java-version-linux.html From c680c7a8f2514f344aadc65341b3e47504857ed7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 17 Nov 2015 11:26:57 +0800 Subject: [PATCH 2471/2517] =?UTF-8?q?20151117-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ext Generation Open Source Email Client.md | 47 +++ ...eSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md | 318 ++++++++++++++++++ 2 files changed, 365 insertions(+) create mode 100644 sources/share/20151117 N1--The Next Generation Open Source Email Client.md create mode 100644 sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md diff --git a/sources/share/20151117 N1--The Next Generation Open Source Email Client.md b/sources/share/20151117 N1--The Next Generation Open Source Email Client.md new file mode 100644 index 0000000000..6cabff37be --- /dev/null +++ b/sources/share/20151117 N1--The Next Generation Open Source Email Client.md @@ -0,0 +1,47 @@ +N1: The Next Generation Open Source Email Client +================================================================================ +![N1 Open Source email client](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/N1-email-client.png) + +When we talk of email clients for Linux, generally the name of [Thunderbird][1], [Geary][2] and [Evolution][3] come to our mind. To challenge the authority of these big players, a new open source email client is entering the market. + +### Design plus features ### + +[N1][4] is the next generation open source email client which has equal focus on design and features. An open source software, N1 is available for Linux and Mac OS X with a Windows desktop application in the pipeline. + +N1 promotes itself as “extensible open source email client” because it includes a JavaScript plugin architecture that enables anyone to create powerful new features. Extensibility is a heavily popular feature that helped [open source code editor Atom][5] to gain popularity. N1 is also putting emphasis on it. + +Apart from extensibility, N1 has also focused on the looks and design of the application. A look at the screenshot of N1 is a good enough example: + +![N1 Open Source email client on Mac OS X](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/N1-email-client-1.jpeg) + +N1 email client on Mac OS X. Picture Credit: N1 + +In other features, N1 is compatible with hundreds of email providers, including Gmail, Yahoo, iCloud, Microsoft Exchange etc. Desktop app provides offline capability. + +### For now, invite only ### + +I don’t know why everyone is following OnePlus’ “exclusive invite only” marketing strategy? At present, N1 desktop app can be downloaded only when you are invited. You can request an invite using the link below. N1 team will email you the download link in a few days. + +- [Request an invite for N1][6] + +### Intriguing? ### + +I am not a big fan of desktop email clients, but N1 has definitely caught my attention and I am willing to give it a try. How about you? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/n1-open-source-email-client/ + +作者:[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]:https://www.mozilla.org/en-US/thunderbird/ +[2]:https://wiki.gnome.org/Apps/Geary +[3]:https://help.gnome.org/users/evolution/stable/ +[4]:https://nylas.com/N1/ +[5]:http://itsfoss.com/atom-stable-released/ +[6]:https://invite.nylas.com/download \ No newline at end of file diff --git a/sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md b/sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md new file mode 100644 index 0000000000..a7847c46d4 --- /dev/null +++ b/sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md @@ -0,0 +1,318 @@ +Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10 +================================================================================ +![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2014/05/postgresql.png) + +### Introduction ### + +[PostgreSQL][1] is a powerful, open-source object-relational database system. It runs under all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS, Solaris, Tru64), and Windows OS. + +Here is what **Mark Shuttleworth**, the founder of **Ubuntu**, says about PostgreSQL. + +> Postgres is a truly awesome database. When we started working on Launchpad I wasn’t sure if it would be up to the job. I was so wrong. It’s been robust, fast, and professional in every regard. +> +> — Mark Shuttleworth. + +In this handy tutorial, let us see how to install PostgreSQL 9.4 on Ubuntu 15.10 server. + +### Install PostgreSQL ### + +PostgreSQL is available in the default repositories. So enter the following command from the Terminal to install it. + + sudo apt-get install postgresql postgresql-contrib + +If you’re looking for other versions, add the PostgreSQL repository, and install it as shown below. + +The **PostgreSQL apt repository** supports LTS versions of Ubuntu (10.04, 12.04 and 14.04) on amd64 and i386 architectures as well as select non-LTS versions(14.10). While not fully supported, the packages often work on other non-LTS versions as well, by using the closest LTS version available. + +#### On Ubuntu 14.10 systems: #### + +Create the file **/etc/apt/sources.list.d/pgdg.list**; + + sudo vi /etc/apt/sources.list.d/pgdg.list + +Add a line for the repository: + + deb http://apt.postgresql.org/pub/repos/apt/ utopic-pgdg main + +**Note**: The above repository will only work on Ubuntu 14.10. It is not updated yet to Ubuntu 15.04 and 15.10. + +**On Ubuntu 14.04**, add the following line: + + deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main + +**On Ubuntu 12.04**, add the following line: + + deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main + +Import the repository signing key: + + wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc + +---------- + + sudo apt-key add - + +Update the package lists: + + sudo apt-get update + +Then install the required version. + + sudo apt-get install postgresql-9.4 + +### Accessing PostgreSQL command prompt ### + +The default database name and database user are “**postgres**”. Switch to postgres user to perform postgresql related operations: + + sudo -u postgres psql postgres + +#### Sample Output: #### + + psql (9.4.5) + Type "help" for help. + postgres=# + +To exit from posgresql prompt, type **\q** in the **psql** prompt return back to the Terminal. + +### Set “postgres” user password ### + +Login to postgresql prompt, + + sudo -u postgres psql postgres + +.. and set postgres password with following command: + + postgres=# \password postgres + Enter new password: + Enter it again: + postgres=# \q + +To install PostgreSQL Adminpack, enter the command in postgresql prompt: + + sudo -u postgres psql postgres + +---------- + + postgres=# CREATE EXTENSION adminpack; + CREATE EXTENSION + +Type **\q** in the **psql** prompt to exit from posgresql prompt, and return back to the Terminal. + +### Create New User and Database ### + +For example, let us create a new user called “**senthil**” with password “**ubuntu**”, and database called “**mydb**”. + + sudo -u postgres createuser -D -A -P senthil + +---------- + + sudo -u postgres createdb -O senthil mydb + +### Delete Users and Databases ### + +To delete the database, switch to postgres user: + + sudo -u postgres psql postgres + +Enter command: + + $ drop database + +To delete a user, enter the following command: + + $ drop user + +### Configure PostgreSQL-MD5 Authentication ### + +**MD5 authentication** requires the client to supply an MD5-encrypted password for authentication. To do that, edit **/etc/postgresql/9.4/main/pg_hba.conf** file: + + sudo vi /etc/postgresql/9.4/main/pg_hba.conf + +Add or Modify the lines as shown below + + [...] + # TYPE DATABASE USER ADDRESS METHOD + # "local" is for Unix domain socket connections only + local all all md5 + # IPv4 local connections: + host all all 127.0.0.1/32 md5 + host all all 192.168.1.0/24 md5 + # IPv6 local connections: + host all all ::1/128 md5 + [...] + +Here, 192.168.1.0/24 is my local network IP address. Replace this value with your own address. + +Restart postgresql service to apply the changes: + + sudo systemctl restart postgresql + +Or, + + sudo service postgresql restart + +### Configure PostgreSQL-Configure TCP/IP ### + +By default, TCP/IP connection is disabled, so that the users from another computers can’t access postgresql. To allow to connect users from another computers, Edit file **/etc/postgresql/9.4/main/postgresql.conf:** + + sudo vi /etc/postgresql/9.4/main/postgresql.conf + +Find the lines: + + [...] + #listen_addresses = 'localhost' + [...] + #port = 5432 + [...] + +Uncomment both lines, and set the IP address of your postgresql server or set ‘*’ to listen from all clients as shown below. You should be careful to make postgreSQL to be accessible from all remote clients. + + [...] + listen_addresses = '*' + [...] + port = 5432 + [...] + +Restart postgresql service to save changes: + + sudo systemctl restart postgresql + +Or, + + sudo service postgresql restart + +### Manage PostgreSQL with phpPgAdmin ### + +[**phpPgAdmin**][2] is a web-based administration utility written in PHP for managing PosgreSQL. + +phpPgAdmin is available in default repositories. So, Install phpPgAdmin using command: + + sudo apt-get install phppgadmin + +By default, you can access phppgadmin using **http://localhost/phppgadmin** from your local system’s web browser. + +To access remote systems, do the following. +On Ubuntu 15.10 systems: + +Edit file **/etc/apache2/conf-available/phppgadmin.conf**, + + sudo vi /etc/apache2/conf-available/phppgadmin.conf + +Find the line **Require local** and comment it by adding a **#** in front of the line. + + #Require local + +And add the following line: + + allow from all + +Save and exit the file. + +Then, restart apache service. + + sudo systemctl restart apache2 + +On Ubuntu 14.10 and previous versions: + +Edit file **/etc/apache2/conf.d/phppgadmin**: + + sudo nano /etc/apache2/conf.d/phppgadmin + +Comment the following line: + + [...] + #allow from 127.0.0.0/255.0.0.0 ::1/128 + +Uncomment the following line to make phppgadmin from all systems. + + allow from all + +Edit **/etc/apache2/apache2.conf**: + + sudo vi /etc/apache2/apache2.conf + +Add the following line: + + Include /etc/apache2/conf.d/phppgadmin + +Then, restart apache service. + + sudo service apache2 restart + +### Configure phpPgAdmin ### + +Edit file **/etc/phppgadmin/config.inc.php**, and do the following changes. Most of these options are self-explanatory. Read them carefully to know why do you change these values. + + sudo nano /etc/phppgadmin/config.inc.php + +Find the following line: + + $conf['servers'][0]['host'] = ''; + +Change it as shown below: + + $conf['servers'][0]['host'] = 'localhost'; + +And find the line: + + $conf['extra_login_security'] = true; + +Change the value to **false**. + + $conf['extra_login_security'] = false; + +Find the line: + + $conf['owned_only'] = false; + +Set the value as **true**. + + $conf['owned_only'] = true; + +Save and close the file. Restart postgresql service and Apache services. + + sudo systemctl restart postgresql + +---------- + + sudo systemctl restart apache2 + +Or, + + sudo service postgresql restart + + sudo service apache2 restart + +Now open your browser and navigate to **http://ip-address/phppgadmin**. You will see the following screen. + +![phpPgAdmin – Google Chrome_001](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_001.jpg) + +Login with users that you’ve created earlier. I already have created a user called “**senthil**” with password “**ubuntu**” before, so I log in with user “senthil”. + +![phpPgAdmin – Google Chrome_002](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_002.jpg) + +Now, you will be able to access the phppgadmin dashboard. + +![phpPgAdmin – Google Chrome_003](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_003.jpg) + +Log in with postgres user: + +![phpPgAdmin – Google Chrome_004](http://1426826955.rsc.cdn77.org/wp-content/uploads/2015/11/phpPgAdmin-Google-Chrome_004.jpg) + +That’s it. Now you’ll able to create, delete and alter databases graphically using phppgadmin. + +Cheers! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/install-postgresql-9-4-and-phppgadmin-on-ubuntu-15-10/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.twitter.com/ostechnix +[1]:http://www.postgresql.org/ +[2]:http://phppgadmin.sourceforge.net/doku.php \ No newline at end of file From ee5ac2a11be7ee9fd71996513c31c5d8f64f90ec Mon Sep 17 00:00:00 2001 From: Ricky Gong Date: Tue, 17 Nov 2015 11:48:49 +0800 Subject: [PATCH 2472/2517] Delete 20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md --- ...ronment variable automatically on Linux.md | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md diff --git a/sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md b/sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md deleted file mode 100644 index 2d61fc63da..0000000000 --- a/sources/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md +++ /dev/null @@ -1,50 +0,0 @@ -Ricky-Gong is translating. - -Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux -================================================================================ -> **Question**: I need to compile a Java program on my Linux box. For that I already installed JDK (Java Development Kit), and now I'm trying to set JAVA_HOME environment variable to point to the installed JDK. What is the recommended way to set JAVA_HOME environment variable on Linux? - -Many Java programs or Java-based IDE environments require JAVA_HOME environment variable being set. This environment variable is supposed to point to the top directory where the Java development kit (JDK) or Java runtime environment (JRE) is installed. The JDK contains everything the JRE offers, but also provides additional binaries and libraries needed to compile Java programs (e.g., compilers, debugger, JavaDoc). While the JDK is needed to build Java applications, the JRE alone is sufficient to simply run already built Java programs. - -When you are trying to set JAVA_HOME environment variable, the complication is that JAVA_HOME variable will change depending on (1) whether you installed JDK or JRE, (2) which version of JDK/JRE you installed, and (3) whether you installed Oracle JDK or Open JDK. - -So whenever your build or run-time environment changes (e.g., upgrade to a newer JDK), you need to adjust JAVA_HOME accordingly, which is cumbersome. - -The following export commands will allow you to set JAVA_HOME environment variable automatically regardless of these factors. - -If you installed JRE: - - export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java)))) - -If you installed JDK: - - export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac)))) - -Place either of the above commands in ~/.bashrc (or /etc/profile) depending on you installed JDK or JRE, and it will set JAVA_HOME permanently. - -Note that "readlink -f" command is used to get the canonical path since java or javac can be set up with multiple symlinks. - -For example, if you installed Oracle JRE 7, the first export command will automatically set JAVA_HOME to: - - /usr/lib/jvm/java-7-oracle/jre - -If you installed Open JDK version 8, the second export command will set JAVA_HOME to: - - /usr/lib/jvm/java-8-openjdk-amd64 - -![](https://c1.staticflickr.com/1/700/22961948071_c73a3261dd_c.jpg) - -In short, these export commands will automatically update JAVA_HOME variable as you re-install/upgrade your JDK/JRE packages or [change default Java version][1]. No need to adjust JAVA_HOME manually. - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/set-java_home-environment-variable-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://ask.xmodulo.com/author/nanni -[1]:http://ask.xmodulo.com/change-default-java-version-linux.html From 3a215f6a253582a22f35c7e14debe676eb4d3e7f Mon Sep 17 00:00:00 2001 From: Ricky Gong Date: Tue, 17 Nov 2015 11:51:25 +0800 Subject: [PATCH 2473/2517] =?UTF-8?q?=E3=80=90Translation=20Finished?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md --- ...ronment variable automatically on Linux.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 translated/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md diff --git a/translated/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md b/translated/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md new file mode 100644 index 0000000000..e8177ebe59 --- /dev/null +++ b/translated/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md @@ -0,0 +1,48 @@ +Linux 有问必答 - 如何在 Linux 上自动设置 JAVA_HOME 环境变量 +================================================================================ +> **问题**:我需要在我的 Linux 机器上编译 Java 程序。为此我已经安装了 JDK (Java Development Kit),而现在我正试图设置 JAVA\_HOME 环境变量使其指向安装好的 JDK 。关于在 Linux 上设置 JAVA\_HOME 环境变量,最受推崇的办法是什么? + +许多 Java 程序或基于 Java 的*集成开发环境* (IDE)都需要设置好 JAVA_HOME 环境变量。该变量应指向 *Java 开发工具包* (JDK)或 *Java 运行时环境* (JRE)的安装目录。JDK 不仅包含了 JRE 提供的一切,还带有额外的二进制代码和库文件(例如编译器,调试器及 JavaDoc 文档生成器)用于编译 Java 程序。JDK 是用来构建 Java 程序的,如果只是运行已经构建好的 Java 程序,单独一份 JRE 就足够了。 + +当您正试图设置 JAVA\_HOME 环境变量时,麻烦的事情在于 JAVA\_HOME 变量需要根据以下几点而改变:(1) 您是否安装了 JDK 或 JRE;(2) 您安装了哪个版本;(3) 您安装的是 Oracle JDK 还是 Open JDK。 + +因此每当您的开发环境或运行时环境发生改变(例如为 JDK 更新版本)时,您需要根据实际情况调整 JAVA\_HOME 变量,而这种做法是繁重且缺乏效率的。 + +以下 export 命令能为您自动设置 JAVA\_HOME 环境变量,而无须顾及上述的因素。 + +若您安装的是 JRE: + + export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java)))) + +若您安装的是 JDK: + + export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac)))) + +根据您的情况,将上述命令中的一条写入 ~/.bashrc(或 /etc/profile)文件中,它就会永久地设置好 JAVA\_HOME 变量。 + +注意,由于 java 或 javac 可以建立起多个层次的符号链接,为此"readlink -f"命令是用来获取它们真正的执行路径的。 + +举个例子,假如您安装的是 Oracle JRE 7,那么上述的第一条 export 命令将自动设置 JAVA\_HOME 为: + + /usr/lib/jvm/java-7-oracle/jre + +若您安装的是 Open JDK 第8版,那么第二条 export 命令将设置 JAVA\_HOME 为: + + /usr/lib/jvm/java-8-openjdk-amd64 + +![](https://c1.staticflickr.com/1/700/22961948071_c73a3261dd_c.jpg) + +简而言之,这些 export 命令会在您重装/升级您的JDK/JRE,或[更换默认 Java 版本][1]时自动更新 JAVA\_HOME 变量。您不再需要手动调整它。 + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/set-java_home-environment-variable-linux.html + +作者:[Dan Nanni][a] +译者:[Ricky-Gong](https://github.com/Ricky-Gong) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/change-default-java-version-linux.html From 5d7501c2a1926dd256373c18a2c800792c28268e Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Nov 2015 13:21:39 +0800 Subject: [PATCH 2474/2517] PUB:20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Ricky-Gong 翻译的不错,基本上没有可校对的。看得出用心啦!加油! --- ...VA_HOME environment variable automatically on Linux.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md (82%) diff --git a/translated/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md b/published/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md similarity index 82% rename from translated/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md rename to published/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md index e8177ebe59..f9368ec48b 100644 --- a/translated/tech/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md +++ b/published/20151116 Linux FAQs with Answers--How to set JAVA_HOME environment variable automatically on Linux.md @@ -1,14 +1,14 @@ -Linux 有问必答 - 如何在 Linux 上自动设置 JAVA_HOME 环境变量 +Linux 有问必答:如何在 Linux 上自动设置 JAVA_HOME 环境变量 ================================================================================ > **问题**:我需要在我的 Linux 机器上编译 Java 程序。为此我已经安装了 JDK (Java Development Kit),而现在我正试图设置 JAVA\_HOME 环境变量使其指向安装好的 JDK 。关于在 Linux 上设置 JAVA\_HOME 环境变量,最受推崇的办法是什么? -许多 Java 程序或基于 Java 的*集成开发环境* (IDE)都需要设置好 JAVA_HOME 环境变量。该变量应指向 *Java 开发工具包* (JDK)或 *Java 运行时环境* (JRE)的安装目录。JDK 不仅包含了 JRE 提供的一切,还带有额外的二进制代码和库文件(例如编译器,调试器及 JavaDoc 文档生成器)用于编译 Java 程序。JDK 是用来构建 Java 程序的,如果只是运行已经构建好的 Java 程序,单独一份 JRE 就足够了。 +许多 Java 程序或基于 Java 的*集成开发环境* (IDE)都需要设置好 JAVA_HOME 环境变量。该变量应指向 *Java 开发工具包* (JDK)或 *Java 运行时环境* (JRE)的安装目录。JDK 不仅包含了 JRE 提供的一切,还带有用于编译 Java 程序的额外的二进制代码和库文件(例如编译器,调试器及 JavaDoc 文档生成器)。JDK 是用来构建 Java 程序的,如果只是运行已经构建好的 Java 程序,单独一份 JRE 就足够了。 当您正试图设置 JAVA\_HOME 环境变量时,麻烦的事情在于 JAVA\_HOME 变量需要根据以下几点而改变:(1) 您是否安装了 JDK 或 JRE;(2) 您安装了哪个版本;(3) 您安装的是 Oracle JDK 还是 Open JDK。 因此每当您的开发环境或运行时环境发生改变(例如为 JDK 更新版本)时,您需要根据实际情况调整 JAVA\_HOME 变量,而这种做法是繁重且缺乏效率的。 -以下 export 命令能为您自动设置 JAVA\_HOME 环境变量,而无须顾及上述的因素。 +以下 export 命令能为您**自动设置** JAVA\_HOME 环境变量,而无须顾及上述的因素。 若您安装的是 JRE: @@ -40,7 +40,7 @@ via: http://ask.xmodulo.com/set-java_home-environment-variable-linux.html 作者:[Dan Nanni][a] 译者:[Ricky-Gong](https://github.com/Ricky-Gong) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 02b4b905e1b311dff26c5711b638e84d052f8732 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Nov 2015 13:40:13 +0800 Subject: [PATCH 2475/2517] PUB:Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients @ictlyh --- ...-based Authentication for Linux Clients.md | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) rename {translated/tech => published}/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md (82%) diff --git a/translated/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md b/published/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md similarity index 82% rename from translated/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md rename to published/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md index 5eba70cd7a..a05935f7c1 100644 --- a/translated/tech/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md +++ b/published/RHCE/Part 7 - Setting Up NFS Server with Kerberos-based Authentication for Linux Clients.md @@ -1,11 +1,10 @@ -第七部分 - 在 Linux 客户端配置基于 Kerberos 身份验证的 NFS 服务器 +RHCE 系列(七):在 Linux 客户端配置基于 Kerberos 身份验证的 NFS 服务器 ================================================================================ -在本系列的前一篇文章,我们回顾了[如何在可能包括多种类型操作系统的网络上配置 Samba 共享][1]。现在,如果你需要为一组类-Unix 客户端配置文件共享,很自然的你会想到网络文件系统,或简称 NFS。 - +在本系列的前一篇文章,我们回顾了[如何在可能包括多种类型操作系统的网络上配置 Samba 共享][1]。现在,如果你需要为一组类 Unix 客户端配置文件共享,很自然的你会想到网络文件系统,或简称 NFS。 ![设置使用 Kerberos 进行身份验证的 NFS 服务器](http://www.tecmint.com/wp-content/uploads/2015/09/Setting-Kerberos-Authentication-with-NFS.jpg) -RHCE 系列:第七部分 - 设置使用 Kerberos 进行身份验证的 NFS 服务器 +*RHCE 系列:第七部分 - 设置使用 Kerberos 进行身份验证的 NFS 服务器* 在这篇文章中我们会介绍配置基于 Kerberos 身份验证的 NFS 共享的整个流程。假设你已经配置好了一个 NFS 服务器和一个客户端。如果还没有,可以参考 [安装和配置 NFS 服务器][2] - 它列出了需要安装的依赖软件包并解释了在进行下一步之前如何在服务器上进行初始化配置。 @@ -24,28 +23,26 @@ RHCE 系列:第七部分 - 设置使用 Kerberos 进行身份验证的 NFS 服 #### 创建 NFS 组并配置 NFS 共享目录 #### -1. 新建一个名为 nfs 的组并给它添加用户 nfsnobody,然后更改 /nfs 目录的权限为 0770,组属主为 nfs。于是,nfsnobody(对应请求用户)在共享目录有写的权限,你就不需要在 /etc/exports 文件中使用 no_root_squash(译者注:设为 root_squash 意味着在访问 NFS 服务器上的文件时,客户机上的 root 用户不会被当作 root 用户来对待)。 +1、 新建一个名为 nfs 的组并给它添加用户 nfsnobody,然后更改 /nfs 目录的权限为 0770,组属主为 nfs。于是,nfsnobody(对应请求用户)在共享目录有写的权限,你就不需要在 /etc/exports 文件中使用 no_root_squash(LCTT 译注:设为 root_squash 意味着在访问 NFS 服务器上的文件时,客户机上的 root 用户不会被当作 root 用户来对待)。 # groupadd nfs # usermod -a -G nfs nfsnobody # chmod 0770 /nfs # chgrp nfs /nfs -2. 像下面那样更改 export 文件(/etc/exports)只允许从 box1 使用 Kerberos 安全验证的访问(sec=krb5)。 +2、 像下面那样更改 export 文件(/etc/exports)只允许从 box1 使用 Kerberos 安全验证的访问(sec=krb5)。 **注意**:anongid 的值设置为之前新建的组 nfs 的 GID: **exports – 添加 NFS 共享** ----------- - /nfs box1(rw,sec=krb5,anongid=1004) -3. 再次 exprot(-r)所有(-a)NFS 共享。为输出添加详情(-v)是个好主意,因为它提供了发生错误时解决问题的有用信息: +3、 再次 exprot(-r)所有(-a)NFS 共享。为输出添加详情(-v)是个好主意,因为它提供了发生错误时解决问题的有用信息: # exportfs -arv -4. 重启并启用 NFS 服务器以及相关服务。注意你不需要启动 nfs-lock 和 nfs-idmapd,因为系统启动时其它服务会自动启动它们: +4、 重启并启用 NFS 服务器以及相关服务。注意你不需要启动 nfs-lock 和 nfs-idmapd,因为系统启动时其它服务会自动启动它们: # systemctl restart rpcbind nfs-server nfs-lock nfs-idmap # systemctl enable rpcbind nfs-server @@ -61,14 +58,12 @@ RHCE 系列:第七部分 - 设置使用 Kerberos 进行身份验证的 NFS 服 正如你看到的,为了简便,NFS 服务器和 KDC 在同一台机器上,当然如果你有更多可用机器你也可以把它们安装在不同的机器上。两台机器都在 `mydomain.com` 域。 -最后同样重要的是,Kerberos 要求客户端和服务器中至少有一个域名解析的基本模式和[网络时间协议][5]服务,因为 Kerberos 身份验证的安全一部分基于时间戳。 +最后同样重要的是,Kerberos 要求客户端和服务器中至少有一个域名解析的基本方式和[网络时间协议][5]服务,因为 Kerberos 身份验证的安全一部分基于时间戳。 为了配置域名解析,我们在客户端和服务器中编辑 /etc/hosts 文件: **host 文件 – 为域添加 DNS** ----------- - 192.168.0.18 box1.mydomain.com box1 192.168.0.20 box2.mydomain.com box2 @@ -82,10 +77,9 @@ RHCE 系列:第七部分 - 设置使用 Kerberos 进行身份验证的 NFS 服 # chronyc tracking - ![用 Chrony 同步服务器时间](http://www.tecmint.com/wp-content/uploads/2015/09/Synchronize-Time-with-Chrony.png) -用 Chrony 同步服务器时间 +*用 Chrony 同步服务器时间* ### 安装和配置 Kerberos ### @@ -109,7 +103,7 @@ RHCE 系列:第七部分 - 设置使用 Kerberos 进行身份验证的 NFS 服 ![创建 Kerberos 数据库](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Kerberos-Database.png) -创建 Kerberos 数据库 +*创建 Kerberos 数据库* 下一步,使用 kadmin.local 工具为 root 创建管理权限: @@ -129,7 +123,7 @@ RHCE 系列:第七部分 - 设置使用 Kerberos 进行身份验证的 NFS 服 ![添加 Kerberos 到 NFS 服务器](http://www.tecmint.com/wp-content/uploads/2015/09/Create-Kerboros-for-NFS.png) -添加 Kerberos 到 NFS 服务器 +*添加 Kerberos 到 NFS 服务器* 为 root/admin 获取和缓存票据授权票据(ticket-granting ticket): @@ -138,7 +132,7 @@ RHCE 系列:第七部分 - 设置使用 Kerberos 进行身份验证的 NFS 服 ![缓存 Kerberos](http://www.tecmint.com/wp-content/uploads/2015/09/Cache-kerberos-Ticket.png) -缓存 Kerberos +*缓存 Kerberos* 真正使用 Kerberos 之前的最后一步是保存被授权使用 Kerberos 身份验证的规则到一个密钥表文件(在服务器中): @@ -154,7 +148,7 @@ RHCE 系列:第七部分 - 设置使用 Kerberos 进行身份验证的 NFS 服 ![挂载 NFS 共享](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-NFS-Share.png) -挂载 NFS 共享 +*挂载 NFS 共享* 现在让我们卸载共享,在客户端中重命名密钥表文件(模拟它不存在)然后试着再次挂载共享目录: @@ -163,7 +157,7 @@ RHCE 系列:第七部分 - 设置使用 Kerberos 进行身份验证的 NFS 服 ![挂载/卸载 Kerberos NFS 共享](http://www.tecmint.com/wp-content/uploads/2015/09/Mount-Unmount-Kerberos-NFS-Share.png) -挂载/卸载 Kerberos NFS 共享 +*挂载/卸载 Kerberos NFS 共享* 现在你可以使用基于 Kerberos 身份验证的 NFS 共享了。 @@ -177,12 +171,12 @@ via: http://www.tecmint.com/setting-up-nfs-server-with-kerberos-based-authentica 作者:[Gabriel Cánepa][a] 译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) -校对:[校对者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/setup-samba-file-sharing-for-linux-windows-clients/ +[1]:https://linux.cn/article-6550-1.html [2]:http://www.tecmint.com/configure-nfs-server/ [3]:http://www.tecmint.com/selinux-essentials-and-control-filesystem-access/ [4]:http://www.tecmint.com/firewalld-rules-for-centos-7/ From 8d391296196d7fabc7fb68e442d80120ae437658 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 17 Nov 2015 14:15:26 +0800 Subject: [PATCH 2476/2517] =?UTF-8?q?20151117-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...oid On BQ Aquaris Ubuntu Phone In Linux.md | 125 +++++++++++++ ... Linux 101--Get the most out of Systemd.md | 171 ++++++++++++++++++ 2 files changed, 296 insertions(+) create mode 100644 sources/tech/20151117 Install Android On BQ Aquaris Ubuntu Phone In Linux.md create mode 100644 sources/tech/20151117 Linux 101--Get the most out of Systemd.md diff --git a/sources/tech/20151117 Install Android On BQ Aquaris Ubuntu Phone In Linux.md b/sources/tech/20151117 Install Android On BQ Aquaris Ubuntu Phone In Linux.md new file mode 100644 index 0000000000..94e7ef69ce --- /dev/null +++ b/sources/tech/20151117 Install Android On BQ Aquaris Ubuntu Phone In Linux.md @@ -0,0 +1,125 @@ +Install Android On BQ Aquaris Ubuntu Phone In Linux +================================================================================ +![How to install Android on Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-on-Ubuntu-Phone.jpg) + +If you happen to own the first Ubuntu phone and want to **replace Ubuntu with Android on the bq Aquaris e4.5**, this post is going to help you. + +There can be plenty of reasons why you might want to remove Ubuntu and use the mainstream Android OS. One of the foremost reason is that the OS itself is at an early stage and intend to target developers and enthusiasts. Whatever may be your reason, installing Android on bq Aquaris is a piece of cake, thanks to the tools provided by bq. + +Let’s see what to do we need to install Android on bq Aquaris. + +### Prerequisite ### + +- Working Internet connection to download Android factory image and install tools for flashing Android +- USB data cable +- A system running Linux + +This tutorial is performed using Ubuntu 15.10. But the steps should be applicable to most other Linux distributions. + +### Replace Ubuntu with Android in bq Aquaris e4.5 ### + +#### Step 1: Download Android firmware #### + +First step is to download the Android image for bq Aquaris e4.5. Good thing is that it is available from the bq’s support website. You can download the firmware, around 650 MB in size, from the link below: + +- [Download Android for bq Aquaris e4.5][1] + +Yes, you would get OTA updates with it. At present the firmware version is 2.0.1 which is based on Android Lolipop. Over time, there could be a new firmware based on Marshmallow and then the above link could be outdated. + +I suggest to check the [bq support page][2] and download the latest firmware from there. + +Once downloaded, extract it. In the extracted directory, look for **MT6582_Android_scatter.txt** file. We shall be using it later. + +#### Step 2: Download flash tool #### + +bq has provided its own flash tool, Herramienta MTK Flash Tool, for easier installation of Android or Ubuntu on the device. You can download the tool from the link below: + +- [Download MTK Flash Tool][3] + +Since the flash tool might be upgraded in future, you can always get the latest version of flash tool from the [bq support page][4]. + +Once downloaded extract the downloaded file. You should see an executable file named **flash_tool** in it. We shall be using it later. + +#### Step 3: Remove conflicting packages (optional) #### + +If you are using recent version of Ubuntu or Ubuntu based Linux distributions, you may encounter “BROM ERROR : S_UNDEFINED_ERROR (1001)” later in this tutorial. + +To avoid this error, you’ll have to uninstall conflicting package. Use the commands below: + + sudo apt-get remove modemmanager + +Restart udev service with the command below: + + sudo service udev restart + +Just to check for any possible side effects on kernel module cdc_acm, run the command below: + + lsmod | grep cdc_acm + +If the output of the above command is an empty list, you’ll have to reinstall this kernel module: + + sudo modprobe cdc_acm + +#### Step 4: Prepare to flash Android #### + +Go to the downloaded and extracted flash tool directory (in step 2). Use command line for this purpose because you’ll have to use the root privileges here. + +Presuming that you saved it in the Downloads directory, use the command below to go to this directory (in case you do not know how to navigate between directories in command line). + + cd ~/Downloads/SP_Flash* + +After that use the command below to run the flash tool as root: + + sudo ./flash_tool + +You’ll see a window popped as the one below. Don’t bother about Download Agent field, it will be automatically filled. Just focus on Scatter-loading field. + +![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-1.jpeg) + +Remember we talked about **MT6582_Android_scatter.txt** in step 1? This text file is in the extracted directory of the Andriod firmware you downloaded in step 1. Click on Scatter-loading (in the above picture) and point to MT6582_Android_scatter.txt file. + +When you do that, you’ll see several green lines like the one below: + +![Install-Android-bq-aquaris-Ubuntu-2](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-2.jpeg) + +#### Step 5: Flashing Android #### + +We are almost ready. Switch off your phone and connect it to your computer via a USB cable. + +Select Firmware Upgrade from the dropdown and after that click on the big download button. + +![flash Android with Ubuntu](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu.jpeg) + +If everything is correct, you should see a flash status in the bottom of the tool: + +![Replace Ubuntu with Android](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-3.jpeg) + +When the procedure is successfully completed, you’ll see a notification like this: + +![Successfully flashed Android on bq qauaris Ubuntu Phone](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/Install-Android-bq-aquaris-Ubuntu-4.jpeg) + +Unplug your phone and power it on. You should see a white screen with AQUARIS written in the middle and at bottom, “powered by Android” would be displayed. It might take upto 10 minutes before you could configure and start using Android. + +Note: If something goes wrong in the process, Press power, volume up, volume down button together and boot in to fast boot mode. Turn off again and connect the cable again. Repeat the process of firmware upgrade. It should work. + +### Conclusion ### + +Thanks to the tools provided, it becomes easier to **flash Android on bq Ubuntu Phone**. Of course, you can use the same steps to replace Android with Ubuntu. All you need is to download Ubuntu firmware instead of Android. + +I hope this tutorial helped you to replace Ubuntu with Android on your bq phone. If you have questions or suggestions, feel free to ask in the comment section below. + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/install-android-ubuntu-phone/ + +作者:[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]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5_L/2.0.1_20150623-1900_bq-FW.zip +[2]:http://www.bq.com/gb/support/aquaris-e4-5 +[3]:https://storage.googleapis.com/otas/2014/Smartphones/Aquaris_E4.5/Ubuntu/Web%20version/Web%20version/SP_Flash_Tool_exe_linux_v5.1424.00.zip +[4]:http://www.bq.com/gb/support/aquaris-e4-5-ubuntu-edition \ No newline at end of file diff --git a/sources/tech/20151117 Linux 101--Get the most out of Systemd.md b/sources/tech/20151117 Linux 101--Get the most out of Systemd.md new file mode 100644 index 0000000000..7e6f0f4f71 --- /dev/null +++ b/sources/tech/20151117 Linux 101--Get the most out of Systemd.md @@ -0,0 +1,171 @@ +Linux 101: Get the most out of Systemd +================================================================================ +Why do this? + +- Understand the big changes in modern distros. +- See how Systemd replaces SysVinit. +- Get to grips with units and the new journal. + +Hate mail, personal insults, death threats – Lennart Poettering, the author of Systemd, is used to receiving these. The Red Hat employee recently ranted on Google+ about the nature of the FOSS community ([http://tinyurl.com/poorlennart][1]), lamenting that it’s “quite a sick place to be in”. In particular, he points to Linus Torvalds’s highly acerbic mailing list posts, and accuses the kernel head honcho of setting the tone of online discussion, making personal attacks and derogatory comments the norm. + +But why has Poettering received so much hate? Why does a man who simply develops open source software have to tolerate this amount of anger? Well, the answer lies in the importance of his software. Systemd is the first thing launched by the Linux kernel on most distributions now, and it serves many roles. It starts system services, handles logins, executes tasks at specified intervals, and much more. It’s growing all the time, and becoming something of a “base system” for Linux – providing all the plumbing tools needed to boot and maintain a distro. + +Now, Systemd is controversial for various reasons: it eschews some established Unix conventions, such as plain text log files. It’s seen as a “monolithic” project trying to take over everything else. And it’s a major change to the underpinnings of our OS. Yet almost every major distribution has adopted it (or is about to), so it’s here to stay. And there are benefits: faster booting, easier management of services that depend on one another, and powerful and secure logging facilities too. + +So in this tutorial we’ll explore Systemd’s features, and show you how to get the most out of them. Even if you’re not a fan of the software right now, hopefully at least you’ll feel more comfortable with it by the end. + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/eating-large.jpg) + +**This tongue-in-cheek animation at [http://tinyurl.com/m2e7mv8][2] portrays Systemd as a rabid animal eating everything in its path. Most critics haven’t been so fluffy.** + +### Booting and services ### + +Almost every major distro has either adopted Systemd, or will do so in the next release (Debian and Ubuntu). In this tutorial we’re using a pre-release of Fedora 21 – a distro that has been a great testing ground for Systemd – but the commands and notes should be the same regardless of your distro. That’s one of the plus points of Systemd: it obviates many of the tiny, niggling differences between distros. + +In a terminal, enter **ps ax | grep systemd** and look at the first line. The **1** means that it’s process ID 1, ie the first thing launched by the Linux kernel. So, once the kernel has done its work detecting hardware and organising memory, it launches the **/usr/lib/systemd/systemd** executable, which then launches other programs in turn. (In pre-Systemd days, the kernel would launch **/sbin/init**, which would then launch various other essential boot scripts, in a system known as SysVinit.) + +Central to Systemd is the concept of units. These are configuration files with information about services (programs running in the background), devices, mount points, timers and other aspects of the operating system. One of Systemd’s goals is to ease and simplify the interaction between these, so if you have a certain program that needs to start when a certain mount point is created when a certain device gets plugged in, it should be considerably easier to make all this work. (In pre-Systemd days, hacking all this together with scripts could get very ugly.) To list all units on your Linux installation, enter: + + systemctl list-unit-files + +Now, **systemctl** is the main tool for interacting with Systemd, and it has many options. Here, in the unit list, you’ll notice that there’s some formatting: enabled units are shown in green, and disabled are shown in red. Units marked as “static” can’t be started directly – they’re dependencies of other units. To narrow down the list to just services, use: + + systemctl list-unit-files --type=service + +Note that “enabled” doesn’t necessarily mean that a service is running; just that it can be turned on. To get information about a specific service, for instance GDM (the Gnome Display Manager), enter: + + systemctl status gdm.service + +This provides lots of useful information: a human-readable description of the service, the location of the unit configuration file, when it was started, its PID, and the CGroups to which it belongs (these limit resource consumption for groups of processes). + +If you look at the unit config file in **/usr/lib/systemd/system/gdm.service**, you’ll see various options, including the binary to be started (ExecStart), what it conflicts with (ie which units can’t be active at the same time), and what needs to be started before this unit can be activated (the “After” line). Some units have additional dependency options, such as “Requires” (mandatory dependencies) and “Wants” (optional). + +Another interesting option here is: + + Alias=display-manager.service + +When you activate **gdm.service**, you will also be able to view its status using **systemctl status display-manager.service**. This is useful when you know there’s a display manager running, and you want to do something with it, but you don’t care whether it’s GDM, KDM, XDM or any of the others. + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/status-large.jpg) + +**Use systemctl status, followed by a unit name, to see what’s going on with a service.** + +### Target locked ### + +If you enter **ls** in the **/usr/lib/systemd/system** directory, you’ll also see various files that end in **.target**. A target is a way of grouping units together so that they’re started at the same time. For instance, in most Unix-like OSes there’s a state of the system called “multi-user”, which means that the system has booted correctly, background services are running, and it’s ready for one or more users to log in and do their work – at least, in text mode. (Other states include single-user, for doing administration work, or reboot, for when the machine is shutting down.) + +If you look inside **multi-user.target**, you may be expecting to see a list of units that should be active in this state. But you’ll notice that the file is pretty bare – instead, individual services make themselves dependencies of the target via the **WantedBy** option. So if you look inside **avahi-daemon.service**, **NetworkManager.service** and many other **.service** files, you’ll see this line in the Install section: + + WantedBy=multi-user.target + +So, switching to the multi-user target will enable those units that contain the above line. Other targets are available (such as **emergency.target** for an emergency shell, or **halt.target** for when the machine shuts down), and you can easily switch between them like so: + + systemctl isolate emergency.target + +In many ways, these are like SysVinit runlevels, with text-mode **multi-user.target** being runlevel 3, **graphical.target** being runlevel 5, **reboot.target** being runlevel 6, and so forth. + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/unit-large.jpg) + +**The unit configuration files might look foreign compared to traditional scripts, but they’re not hard to grasp.** + +### Up and down ### + +Now, you might be pondering: we’ve got this far, and yet we haven’t even looked at stopping and starting services yet! But there’s a reason for this. Systemd can look like a complicated beast from the outside, so it’s good to have an overview of how it works before you start interacting with it. The actual commands for managing services are very simple: + + systemctl stop cups.service + systemctl start cups.service + +(If a unit has been disabled, you can first enable it with **systemctl enable** followed by the unit name. This places a symbolic link for the unit in the .wants directory of the current target, in the **/etc/systemd/system** folder.) + +Two more useful commands are **systemctl restart** and **systemctl reload**, followed by unit names. The second asks the unit to reload its configuration file. Systemd is – for the most part – very well documented, so look at the manual page (**man systemctl**) for details on every command. + +> ### Timer units: replacing Cron ### +> +> Beyond system initialisation and service management, Systemd has its fingers in various other pies too. Notably, it can perform the job of **cron**, arguably with more flexibility (and an easier to read syntax). **Cron** is the program that performs jobs at regular intervals – such as cleaning up temporary files, refreshing caches and so forth. +> +> If you look inside the **/usr/lib/systemd/system** directory again, you’ll see that various **.timer** files are provided. Have a look at some of them with **less**, and you’ll note that they follow a similar structure to the **.service** and **.target** files. The difference, however, lies in the **[Timer]** section. Consider this example: +> +> [Timer] +> OnBootSec=1h +> OnUnitActiveSec=1w +> +> Here, the **OnBootSec** option tells Systemd to activate the unit 1 hour after the system has booted. Then the second option means: activate the unit once a week after that. There’s a huge amount of flexibility in the times that you can set – enter **man systemd.time** for a full list. +> +> By default, Systemd’s accuracy for timing is one minute. In other words, it will activate the unit within a minute of the time you specify, but not necessarily to the exact second. This is done for power management reasons, but if you need a timer to be executed without any delay, right down to the microsecond, you can add this line: +> +> AccuracySec=1us +> +> Also, the **WakeSystem** option (which can be set to true or false) defines whether or not the timer should wake up the machine if it’s in suspend mode. + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/systemd_gui-large.jpg) + +**A Systemd GUI exists,although it hasn’t been actively worked on for a couple of years.** + +### Log files: say hello to journald ### + +The second major component of Systemd is the journal. This is a logging system, similar to syslog, but with some major differences. And if you’re a fan of the Unix way, prepare for your blood to boil: it’s a binary log, so you can’t just parse it using your regular command line text tools. This design decision regularly whips up heated debates on the net, but it has some benefits too. For instance, logs can be more structured, with better metadata, so it’s easier to filter out information based on executable name, PID, time and so forth. + +To view the journal in its entirety, enter: + + journalctl + +As with many other Systemd commands, this pipes the output into the **less** program, so you can scroll down by hitting space, use / (forward slash) to search, and other familiar keybindings. You’ll also notice a sprinkling of colour here too, with warnings and failure messages in red. + +That’s a lot of information; to narrow it down to the current boot, use: + + journalctl -b + +And here’s where the Systemd journal starts to shine. Do you want to see all messages from the previous boot? Try **journalctl -b -1**. Or the one before that? Replace **-1** with **-2**. How about something very specific, like all messages from 24 October 2014, 16:38 onwards?” + + journalctl -b --since=”2014-10-24 16:38” + +Even if you deplore binary logs, that’s still a useful feature, and for many admins it’s much easier than constructing a similar filter from regular expressions. + +So we’ve narrowed down the log to specific times, but what about specific programs? For units, try this: + + journalctl -u gdm.service + +(Note: that’s a good way to see the log generated by the X server.) Or how about a specific PID? + + journalctl _PID=890 + +You can even request to just see messages from a certain executable: + + journalctl /usr/bin/pulseaudio + +If you want to narrow down to messages of a certain priority, use the **-p** option. With 0 this will only show emergency messages (ie it’s time to start praying to **$DEITY**), whereas 7 will show absolutely everything, including debugging messages. See the manual page (**man journalctl**) for more details on the priority levels. + +It’s worth noting that you can combine options as well, so to only show messages from the GDM service of priority level 3 (or lower) from the current boot, use: + + journalctl -u gdm.service -p 3 -b + +Finally, if you just want to have a terminal window open, constantly updating with the latest journal entries, as you’d have with the tail command in pre-Systemd installations, just enter **journalctl -f**. + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/journal-large.jpg) + +**Binary logging isn’t popular, but the journal has some benefits, like very easy filtering of information.** + +> ### Life without Systemd? ### +> +> If you simply, absolutely can’t get on with Systemd, you still have a few choices among the major distributions. Most notably, Slackware, the longest-running distro, hasn’t made the switch yet – but its lead developer hasn’t ruled it out for the future. A few small-name distros are also holding out with SysVinit as well. +> +> But how long will this last? Gnome is becoming increasingly dependent on Systemd, and the other major desktop environments could follow suit. This is a cause of consternation in the BSD communities, as Systemd is heavily tied to Linux kernel features, so the desktops are becoming less portable, in a way. A half-way-house solution might arrive in the form of Uselessd ([http://uselessd.darknedgy.net][3]), which is a stripped-down version of Systemd that purely focuses on launching and supervising processes, without consuming the whole base system. +> +> ![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/gentoo-large.jpg) +> +> If you don’t like Sysytemd, try Gentoo, which has it as a choice of init system, but doesn’t force it on its users. + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/linux-101-get-the-most-out-of-systemd/ + +作者:[Mike Saunders][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/mike/ +[1]:http://tinyurl.com/poorlennart +[2]:http://tinyurl.com/m2e7mv8 +[3]:http://uselessd.darknedgy.net/ \ No newline at end of file From d23db41df874c5f8a039cd0469ce1af17c22acfb Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 17 Nov 2015 14:30:55 +0800 Subject: [PATCH 2477/2517] =?UTF-8?q?20151117-3=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...151117 How bad a boss is Linus Torvalds.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 sources/talk/20151117 How bad a boss is Linus Torvalds.md diff --git a/sources/talk/20151117 How bad a boss is Linus Torvalds.md b/sources/talk/20151117 How bad a boss is Linus Torvalds.md new file mode 100644 index 0000000000..bc4e7950f3 --- /dev/null +++ b/sources/talk/20151117 How bad a boss is Linus Torvalds.md @@ -0,0 +1,79 @@ +How bad a boss is Linus Torvalds? +================================================================================ +![linus torvalds](http://images.techhive.com/images/article/2015/08/linus_torvalds-100600260-primary.idge.jpg) + +*Linus Torvalds addressed a packed auditorium of Linux enthusiasts during his speech at the LinuxWorld show in San Jose, California, on August 10, 1999. Credit: James Niccolai* + +**It depends on context. In the world of software development, he’s what passes for normal. The question is whether that situation should be allowed to continue.** + +'ve known Linus Torvalds, Linux's inventor, for over 20 years. We're not chums, but we like each other. + +Lately, Torvalds has been getting a lot of flack for his management style. Linus doesn't suffer fools gladly. He has one way of judging people in his business of developing the Linux kernel: How good is your code? + +Nothing else matters. As Torvalds said earlier this year at the Linux.conf.au Conference, "I'm not a nice person, and I don't care about you. [I care about the technology and the kernel][1] -- that's what's important to me." + +Now, I can deal with that kind of person. If you can't, you should avoid the Linux kernel community, where you'll find a lot of this kind of meritocratic thinking. Which is not to say that I think everything in Linuxland is hunky-dory and should be impervious to calls for change. A meritocracy I can live with; a bastion of male dominance where women are subjected to scorn and disrespect is a problem. + +That's why I see the recent brouhaha about Torvalds' management style -- or more accurately, his total indifference to the personal side of management -- as nothing more than standard operating procedure in the world of software development. And at the same time, I see another instance that has come to light as evidence of a need for things to really change. + +The first situation arose with the [release of Linux 4.3][2], when Torvalds used the Linux Kernel Mailing List to tear into a developer who had inserted some networking code that Torvalds thought was -- well, let's say "crappy." "[[A]nd it generates [crappy] code.][3] It looks bad, and there's no reason for it." He goes on in this vein for quite a while. Besides the word "crap" and its earthier synonym, he uses the word "idiotic" pretty often. + +Here's the thing, though. He's right. I read the code. It's badly written and it does indeed seem to have been designed to use the new "overflow_usub()" function just for the sake of using it. + +Now, some people see this diatribe as evidence that Torvalds is a bad-tempered bully. I see a perfectionist who, within his field, doesn't put up with crap. + +Many people have told me that this is not how professional programmers should act. People, have you ever worked with top developers? That's exactly how they act, at Apple, Microsoft, Oracle and everywhere else I've known them. + +I've heard Steve Jobs rip a developer to pieces. I've cringed while a senior Oracle developer lead tore into a room of new programmers like a piranha through goldfish. + +In Accidental Empires, his classic book on the rise of PCs, Robert X. Cringely described Microsoft's software management style when Bill Gates was in charge as a system where "Each level, from Gates on down, screams at the next, goading and humiliating them." Ah, yes, that's the Microsoft I knew and hated. + +The difference between the leaders at big proprietary software companies and Torvalds is that he says everything in the open for the whole world to see. The others do it in private conference rooms. I've heard people claim that Torvalds would be fired in their company. Nope. He'd be right where he is now: on top of his programming world. + +Oh, and there's another difference. If you get, say, Larry Ellison mad at you, you can kiss your job goodbye. When you get Torvalds angry at your work, you'll get yelled at in an email. That's it. + +You see, Torvalds isn't anyone's boss. He's the guy in charge of a project with about 10,000 contributors, but he has zero hiring and firing authority. He can hurt your feelings, but that's about it. + +That said, there is a serious problem within both open-source and proprietary software development circles. No matter how good a programmer you are, if you're a woman, the cards are stacked against you. + +No case shows this better than that of Sarah Sharp, an Intel developer and formerly a top Linux programmer. [In a post on her blog in October][4], she explained why she had stopped contributing to the Linux kernel more than a year earlier: "I finally realized that I could no longer contribute to a community where I was technically respected, but I could not ask for personal respect.... I did not want to work professionally with people who were allowed to get away with subtle sexist or homophobic jokes." + +Who can blame her? I can't. Torvalds, like almost every software manager I've ever known, I'm sorry to say, has permitted a hostile work environment. + +He would probably say that it's not his job to ensure that Linux contributors behave with professionalism and mutual respect. He's concerned with the code and nothing but the code. + +As Sharp wrote: + +> I have the utmost respect for the technical efforts of the Linux kernel community. They have scaled and grown a project that is focused on maintaining some of the highest coding standards out there. The focus on technical excellence, in combination with overloaded maintainers, and people with different cultural and social norms, means that Linux kernel maintainers are often blunt, rude, or brutal to get their job done. Top Linux kernel developers often yell at each other in order to correct each other's behavior. +> +> That's not a communication style that works for me. … +> +> Many senior Linux kernel developers stand by the right of maintainers to be technically and personally brutal. Even if they are very nice people in person, they do not want to see the Linux kernel communication style change. + +She's right. + +Where I differ from other observers is that I don't think that this problem is in any way unique to Linux or open-source communities. With five years of work in the technology business and 25 years as a technology journalist, I've seen this kind of immature boy behavior everywhere. + +It's not Torvalds' fault. He's a technical leader with a vision, not a manager. The real problem is that there seems to be no one in the software development universe who can set a supportive tone for teams and communities. + +Looking ahead, I hope that companies and organizations, such as the Linux Foundation, can find a way to empower community managers or other managers to encourage and enforce civil behavior. + +We won't, unfortunately, find that kind of managerial finesse in our pure technical or business leaders. It's not in their DNA. + +This story, "How bad a boss is Linus Torvalds?" was originally published by Computerworld. + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/3004498/it-management/how-bad-a-boss-is-linus-torvalds.html + +作者:[Steven J. Vaughan-Nichols][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Steven-J.-Vaughan_Nichols/ +[1]:http://www.computerworld.com/article/2874475/linus-torvalds-diversity-gaffe-brings-out-the-best-and-worst-of-the-open-source-world.html +[2]:http://www.zdnet.com/article/linux-4-3-released-after-linus-torvalds-scraps-brain-damage-code/ +[3]:http://lkml.iu.edu/hypermail/linux/kernel/1510.3/02866.html +[4]:http://sarah.thesharps.us/2015/10/05/closing-a-door/ \ No newline at end of file From 9bb2ab986fec8b323fd2ee2bf5f2aec87d7611e7 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 17 Nov 2015 15:59:16 +0800 Subject: [PATCH 2478/2517] =?UTF-8?q?20151117-3=20=E9=80=89=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/talk/20151117 How bad a boss is Linus Torvalds.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sources/talk/20151117 How bad a boss is Linus Torvalds.md b/sources/talk/20151117 How bad a boss is Linus Torvalds.md index bc4e7950f3..8b10e44584 100644 --- a/sources/talk/20151117 How bad a boss is Linus Torvalds.md +++ b/sources/talk/20151117 How bad a boss is Linus Torvalds.md @@ -6,7 +6,7 @@ How bad a boss is Linus Torvalds? **It depends on context. In the world of software development, he’s what passes for normal. The question is whether that situation should be allowed to continue.** -'ve known Linus Torvalds, Linux's inventor, for over 20 years. We're not chums, but we like each other. +I've known Linus Torvalds, Linux's inventor, for over 20 years. We're not chums, but we like each other. Lately, Torvalds has been getting a lot of flack for his management style. Linus doesn't suffer fools gladly. He has one way of judging people in his business of developing the Linux kernel: How good is your code? @@ -60,11 +60,9 @@ Looking ahead, I hope that companies and organizations, such as the Linux Founda We won't, unfortunately, find that kind of managerial finesse in our pure technical or business leaders. It's not in their DNA. -This story, "How bad a boss is Linus Torvalds?" was originally published by Computerworld. - -------------------------------------------------------------------------------- -via: http://www.infoworld.com/article/3004498/it-management/how-bad-a-boss-is-linus-torvalds.html +via: http://www.computerworld.com/article/3004387/it-management/how-bad-a-boss-is-linus-torvalds.html 作者:[Steven J. Vaughan-Nichols][a] 译者:[译者ID](https://github.com/译者ID) @@ -72,7 +70,7 @@ via: http://www.infoworld.com/article/3004498/it-management/how-bad-a-boss-is-li 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://www.infoworld.com/author/Steven-J.-Vaughan_Nichols/ +[a]:http://www.computerworld.com/author/Steven-J.-Vaughan_Nichols/ [1]:http://www.computerworld.com/article/2874475/linus-torvalds-diversity-gaffe-brings-out-the-best-and-worst-of-the-open-source-world.html [2]:http://www.zdnet.com/article/linux-4-3-released-after-linus-torvalds-scraps-brain-damage-code/ [3]:http://lkml.iu.edu/hypermail/linux/kernel/1510.3/02866.html From d833c32d951b36cd36f007e3cad875e271afa28a Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 17 Nov 2015 16:32:38 +0800 Subject: [PATCH 2479/2517] PUB:20150929 A Developer's Journey into Linux Containers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ictlyh 翻译精到~ --- ...veloper's Journey into Linux Containers.md | 128 ++++++++++++++++++ ...veloper's Journey into Linux Containers.md | 128 ------------------ 2 files changed, 128 insertions(+), 128 deletions(-) create mode 100644 published/20150929 A Developer's Journey into Linux Containers.md delete mode 100644 translated/tech/20150929 A Developer's Journey into Linux Containers.md diff --git a/published/20150929 A Developer's Journey into Linux Containers.md b/published/20150929 A Developer's Journey into Linux Containers.md new file mode 100644 index 0000000000..7245883635 --- /dev/null +++ b/published/20150929 A Developer's Journey into Linux Containers.md @@ -0,0 +1,128 @@ +一位开发者的 Linux 容器之旅 +================================================================================ +![](https://deis.com/images/blog-images/dev_journey_0.jpg) + +我告诉你一个秘密:使得我的应用程序进入到全世界的 DevOps 云计算之类的东西对我来说仍然有一点神秘。但随着时间流逝,我意识到理解大规模的机器增减和应用程序部署的来龙去脉对一个开发者来说是非常重要的知识。这类似于成为一个专业的音乐家,当然你肯定需要知道如何使用你的乐器,但是,如果你不知道一个录音棚是如何工作的,或者如何适应一个交响乐团,那么你在这样的环境中工作会变得非常困难。 + +在软件开发的世界里,使你的代码进入我们的更大的世界如同把它编写出来一样重要。DevOps 重要,而且是很重要。 + +因此,为了弥合开发(Dev)和部署(Ops)之间的空隙,我会从头开始介绍容器技术。为什么是容器?因为有强力的证据表明,容器是机器抽象的下一步:使计算机成为场所而不再是一个东西。理解容器是我们共同的旅程。 + +在这篇文章中,我会介绍容器化(containerization)背后的概念。包括容器和虚拟机的区别,以及容器构建背后的逻辑以及它是如何适应应用程序架构的。我会探讨轻量级的 Linux 操作系统是如何适应容器生态系统。我还会讨论使用镜像创建可重用的容器。最后我会介绍容器集群如何使你的应用程序可以快速扩展。 + +在后面的文章中,我会一步一步向你介绍容器化一个示例应用程序的过程,以及如何为你的应用程序容器创建一个托管集群。同时,我会向你展示如何使用 Deis 将你的示例应用程序部署到你本地系统以及多种云供应商的虚拟机上。 + +让我们开始吧。 + +### 虚拟机的好处 ### + +为了理解容器如何适应事物发展,你首先要了解容器的前任:虚拟机。 + +[虚拟机][1] (virtual machine (VM))是运行在物理宿主机上的软件抽象。配置一个虚拟机就像是购买一台计算机:你需要定义你想要的 CPU 数目、RAM 和磁盘存储容量。配置好了机器后,你为它加载操作系统,以及你想让虚拟机支持的任何服务器或者应用程序。 + +虚拟机允许你在一台硬件主机上运行多个模拟计算机。这是一个简单的示意图: + +![](https://deis.com/images/blog-images/dev_journey_1.png) + +虚拟机可以让你能充分利用你的硬件资源。你可以购买一台巨大的、轰隆作响的机器,然后在上面运行多个虚拟机。你可以有一个数据库虚拟机以及很多运行相同版本的定制应用程序的虚拟机所构成的集群。你可以在有限的硬件资源获得很多的扩展能力。如果你觉得你需要更多的虚拟机而且你的宿主硬件还有容量,你可以添加任何你需要的虚拟机。或者,如果你不再需要一个虚拟机,你可以关闭该虚拟机并删除虚拟机镜像。 + +### 虚拟机的局限 ### + +但是,虚拟机确实有局限。 + +如上面所示,假如你在一个主机上创建了三个虚拟机。主机有 12 个 CPU,48 GB 内存和 3TB 的存储空间。每个虚拟机配置为有 4 个 CPU,16 GB 内存和 1TB 存储空间。到现在为止,一切都还好。主机有这个容量。 + +但这里有个缺陷。所有分配给一个虚拟机的资源,无论是什么,都是专有的。每台机器都分配了 16 GB 的内存。但是,如果第一个虚拟机永不会使用超过 1GB 分配的内存,剩余的 15 GB 就会被浪费在那里。如果第三个虚拟机只使用分配的 1TB 存储空间中的 100GB,其余的 900GB 就成为浪费空间。 + +这里没有资源的流动。每台虚拟机拥有分配给它的所有资源。因此,在某种方式上我们又回到了虚拟机之前,把大部分金钱花费在未使用的资源上。 + +虚拟机还有*另一个*缺陷。让它们跑起来需要很长时间。如果你处于基础设施需要快速增长的情形,即使增加虚拟机是自动的,你仍然会发现你的很多时间都浪费在等待机器上线。 + +### 来到:容器 ### + +概念上来说,容器是一个 Linux 进程,Linux 认为它只是一个运行中的进程。该进程只知道它被告知的东西。另外,在容器化方面,该容器进程也分配了它自己的 IP 地址。这点很重要,重要的事情讲三遍,这是第二遍。**在容器化方面,容器进程有它自己的 IP 地址。**一旦给予了一个 IP 地址,该进程就是宿主网络中可识别的资源。然后,你可以在容器管理器上运行命令,使容器 IP 映射到主机中能访问公网的 IP 地址。建立了该映射,无论出于什么意图和目的,容器就是网络上一个可访问的独立机器,从概念上类似于虚拟机。 + +这是第三遍,容器是拥有不同 IP 地址从而使其成为网络上可识别的独立 Linux 进程。下面是一个示意图: + +![](https://deis.com/images/blog-images/dev_journey_2.png) + +容器/进程以动态、合作的方式共享主机上的资源。如果容器只需要 1GB 内存,它就只会使用 1GB。如果它需要 4GB,就会使用 4GB。CPU 和存储空间利用也是如此。CPU、内存和存储空间的分配是动态的,和典型虚拟机的静态方式不同。所有这些资源的共享都由容器管理器来管理。 + +最后,容器能非常快速地启动。 + +因此,容器的好处是:**你获得了虚拟机独立和封装的好处,而抛弃了静态资源专有的缺陷**。另外,由于容器能快速加载到内存,在扩展到多个容器时你能获得更好的性能。 + +### 容器托管、配置和管理 ### + +托管容器的计算机运行着被剥离的只剩下主要部分的某个 Linux 版本。现在,宿主计算机流行的底层操作系统是之前提到的 [CoreOS][2]。当然还有其它,例如 [Red Hat Atomic Host][3] 和 [Ubuntu Snappy][4]。 + +该 Linux 操作系统被所有容器所共享,减少了容器足迹的重复和冗余。每个容器只包括该容器特有的部分。下面是一个示意图: + +![](https://deis.com/images/blog-images/dev_journey_3.png) + +你可以用它所需的组件来配置容器。一个容器组件被称为**层(layer)**。层是一个容器镜像,(你会在后面的部分看到更多关于容器镜像的介绍)。你从一个基本层开始,这通常是你想在容器中使用的操作系统。(容器管理器只提供你所要的操作系统在宿主操作系统中不存在的部分。)当你构建你的容器配置时,你需要添加层,例如你想要添加网络服务器时这个层就是 Apache,如果容器要运行脚本,则需要添加 PHP 或 Python 运行时环境。 + +分层非常灵活。如果应用程序或者服务容器需要 PHP 5.2 版本,你相应地配置该容器即可。如果你有另一个应用程序或者服务需要 PHP 5.6 版本,没问题,你可以使用 PHP 5.6 配置该容器。不像虚拟机,更改一个版本的运行时依赖时你需要经过大量的配置和安装过程;对于容器你只需要在容器配置文件中重新定义层。 + +所有上面描述的容器的各种功能都由一个称为容器管理器(container manager)的软件控制。现在,最流行的容器管理器是 [Docker][5] 和 [Rocket][6]。上面的示意图展示了容器管理器是 Docker,宿主操作系统是 CentOS 的主机情景。 + +### 容器由镜像构成 ### + +当你需要将我们的应用程序构建到容器时,你就要编译镜像。镜像代表了你的容器需要完成其工作的容器模板。(容器里可以在容器里面,如下图)。镜像存储在注册库(registry)中,注册库通过网络访问。 + +从概念上讲,注册库类似于一个使用 Java 的人眼中的 [Maven][7] 仓库、使用 .NET 的人眼中的 [NuGet][8] 服务器。你会创建一个列出了你应用程序所需镜像的容器配置文件。然后你使用容器管理器创建一个包括了你的应用程序代码以及从容器注册库中下载的部分资源。例如,如果你的应用程序包括了一些 PHP 文件,你的容器配置文件会声明你会从注册库中获取 PHP 运行时环境。另外,你还要使用容器配置文件声明需要复制到容器文件系统中的 .php 文件。容器管理器会封装你应用程序的所有东西为一个独立容器,该容器将会在容器管理器的管理下运行在宿主计算机上。 + +这是一个容器创建背后概念的示意图: + +![](https://deis.com/images/blog-images/dev_journey_4.png) + +让我们仔细看看这个示意图。 + +(1)代表一个定义了你容器所需东西以及你容器如何构建的容器配置文件。当你在主机上运行容器时,容器管理器会读取该配置文件,从云上的注册库中获取你需要的容器镜像,(2)将镜像作为层添加到你的容器中。 + +另外,如果组成镜像需要其它镜像,容器管理器也会获取这些镜像并把它们作为层添加进来。(3)容器管理器会将需要的文件复制到容器中。 + +如果你使用了配置(provisioning)服务,例如 [Deis][9],你刚刚创建的应用程序容器做成镜像,(4)配置服务会将它部署到你选择的云供应商上,比如类似 AWS 和 Rackspace 云供应商。 + +### 集群中的容器 ### + +好了。这里有一个很好的例子说明了容器比虚拟机提供了更好的配置灵活性和资源利用率。但是,这并不是全部。 + +容器真正的灵活是在集群中。记住,每个容器有一个独立的 IP 地址。因此,能把它放到负载均衡器后面。将容器放到负载均衡器后面,这就上升了一个层面。 + +你可以在一个负载均衡容器后运行容器集群以获得更高的性能和高可用计算。这是一个例子: + +![](https://deis.com/images/blog-images/dev_journey_5.png) + +假如你开发了一个资源密集型的应用程序,例如图片处理。使用类似 [Deis][9] 的容器配置技术,你可以创建一个包括了你图片处理程序以及你图片处理程序需要的所有资源的容器镜像。然后,你可以部署一个或多个容器镜像到主机上的负载均衡器下。一旦创建了容器镜像,你可以随时使用它。当系统繁忙时可以添加更多的容器实例来满足手中的工作。 + +这里还有更多好消息。每次添加实例到环境中时,你不需要手动配置负载均衡器以便接受你的容器镜像。你可以使用服务发现技术让容器告知均衡器它可用。然后,一旦获知,均衡器就会将流量分发到新的结点。 + +### 全部放在一起 ### + +容器技术完善了虚拟机缺失的部分。类似 CoreOS、RHEL Atomic、和 Ubuntu 的 Snappy 宿主操作系统,和类似 Docker 和 Rocket 的容器管理技术结合起来,使得容器变得日益流行。 + +尽管容器变得更加越来越普遍,掌握它们还是需要一段时间。但是,一旦你懂得了它们的窍门,你可以使用类似 [Deis][9] 这样的配置技术使容器创建和部署变得更加简单。 + +从概念上理解容器和进一步实际使用它们完成工作一样重要。但我认为不实际动手把想法付诸实践,概念也难以理解。因此,我们该系列的下一阶段就是:创建一些容器。 + +-------------------------------------------------------------------------------- + +via: https://deis.com/blog/2015/developer-journey-linux-containers + +作者:[Bob Reselman][a] +译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://deis.com/blog +[1]:https://en.wikipedia.org/wiki/Virtual_machine +[2]:https://coreos.com/using-coreos/ +[3]:http://www.projectatomic.io/ +[4]:https://developer.ubuntu.com/en/snappy/ +[5]:https://www.docker.com/ +[6]:https://coreos.com/blog/rocket/ +[7]:https://en.wikipedia.org/wiki/Apache_Maven +[8]:https://www.nuget.org/ +[9]:http://deis.com/learn \ No newline at end of file diff --git a/translated/tech/20150929 A Developer's Journey into Linux Containers.md b/translated/tech/20150929 A Developer's Journey into Linux Containers.md deleted file mode 100644 index a71b5e8fb3..0000000000 --- a/translated/tech/20150929 A Developer's Journey into Linux Containers.md +++ /dev/null @@ -1,128 +0,0 @@ -开发者的 Linux 容器之旅 -================================================================================ -![](https://deis.com/images/blog-images/dev_journey_0.jpg) - -我告诉你一个秘密:使得我的应用程序进入到全世界的所有云计算的东西,对我来说仍然有一点神秘。但随着时间流逝,我意识到理解大规模机器配置和应用程序部署的来龙去脉对一个开发者来说是非常重要的知识。这类似于成为一个专业的音乐家。你当然需要知道如何使用你的乐器。但是,如果你不知道一个录音室是如何工作的,或者你如何适应一个交响乐团,你在这样的环境中工作会变得非常困难。 - -在软件开发的世界里,使你的代码进入我们更大的世界正如写出它来一样重要。开发重要,而且是很重要。 - -因此,为了弥合开发和部署之间的间隔,我会从头开始介绍容器技术。为什么是容器?因为有强有力的证据表明,容器是机器抽象的下一步:使计算机成为场所而不再是一个东西。理解容器是我们共同的旅程。 - -在这篇文章中,我会介绍容器化背后的概念。容器和虚拟机的区别。以及容器构建背后的逻辑以及它是如何适应应用程序架构的。我会探讨轻量级的 Linux 操作系统是如何适应容器生态系统。我还会讨论使用镜像创建可重用的容器。最后我会介绍容器集群如何使你的应用程序可以快速扩展。 - -在后面的文章中,我会一步一步向你介绍容器化一个事例应用程序的过程,以及如何为你的应用程序容器创建一个托管集群。同时,我会向你展示如何使用 Deis 将你的事例应用程序部署到你本地系统以及多种云供应商的虚拟机上。 - -让我们开始吧。 - -### 虚拟机的好处 ### - -为了理解容器如何适应事物发展,你首先要了解容器的前者:虚拟机 - -[虚拟机][1] 是运行在物理宿主机上的软件抽象。配置一个虚拟机就像是购买一台计算机:你需要定义你想要的 CPU 数目,RAM 和磁盘存储容量。配置好了机器后,你把它加载到操作系统,然后是你想让虚拟机支持的任何服务器或者应用程序。 - -虚拟机允许你在一台硬件主机上运行多个模拟计算机。这是一个简单的示意图: - -![](https://deis.com/images/blog-images/dev_journey_1.png) - -虚拟机使得能充分利用你的硬件资源。你可以购买一台大型机然后在上面运行多个虚拟机。你可以有一个数据库虚拟机以及很多运行相同版本定制应用程序的虚拟机构成的集群。你可以在有限的硬件资源获得很多的扩展能力。如果你觉得你需要更多的虚拟机而且你的宿主硬件还有容量,你可以添加任何你想要的。或者,如果你不再需要一个虚拟机,你可以关闭该虚拟机并删除虚拟机镜像。 - -### 虚拟机的局限 ### - -但是,虚拟机确实有局限。 - -如上面所示,假如你在一个主机上创建了三个虚拟机。主机有 12 个 CPU,48 GB 内存和 3TB 的存储空间。每个虚拟机配置为有 4 个 CPU,16 GB 内存和 1TB 存储空间。到现在为止,一切都还好。主机有这个容量。 - -但这里有个缺陷。所有分配给一个虚拟机的资源,无论是什么,都是专有的。每台机器都分配了 16 GB 的内存。但是,如果第一个虚拟机永不会使用超过 1GB 分配的内存,剩余的 15 GB 就会被浪费在那里。如果第三天虚拟机只使用分配的 1TB 存储空间中的 100GB,其余的 900GB 就成为浪费空间。 - -这里没有资源的流动。每台虚拟机拥有分配给它的所有资源。因此,在某种方式上我们又回到了虚拟机之前,把大部分金钱花费在未使用的资源上。 - -虚拟机还有*另一个*缺陷。扩展他们需要很长时间。如果你处于基础设施需要快速增长的情形,即使虚拟机配置是自动的,你仍然会发现你的很多时间都浪费在等待机器上线。 - -### 来到:容器 ### - -概念上来说,容器是 Linux 中认为只有它自己的一个进程。该进程只知道告诉它的东西。另外,在容器化方面,该容器进程也分配了它自己的 IP 地址。这点很重要,我会再次重复。**在容器化方面,容器进程有它自己的 IP 地址**。一旦给予了一个 IP 地址,该进程就是宿主网络中可识别的资源。然后,你可以在容器管理器上运行命令,使容器 IP 映射到主机中能访问公网的 IP 地址。该映射发生时,对于任何意图和目的,一个容器就是网络上一个可访问的独立机器,概念上类似于虚拟机。 - -再次说明,容器是拥有不同 IP 地址从而使其成为网络上可识别的独立 Linux 进程。下面是一个示意图: - -![](https://deis.com/images/blog-images/dev_journey_2.png) - -容器/进程以动态合作的方式共享主机上的资源。如果容器只需要 1GB 内存,它就只会使用 1GB。如果它需要 4GB,就会使用 4GB。CPU 和存储空间利用也是如此。CPU,内存和存储空间的分配是动态的,和典型虚拟机的静态方式不同。所有这些资源的共享都由容器管理器管理。 - -最后,容器能快速启动。 - -因此,容器的好处是:**你获得了虚拟机独立和封装的好处而抛弃了专有静态资源的缺陷**。另外,由于容器能快速加载到内存,在扩展到多个容器时你能获得更好的性能。 - -### 容器托管、配置和管理 ### - -托管容器的计算机运行着被剥离的只剩下主要部分的 Linux 版本。现在,宿主计算机流行的底层操作系统是上面提到的 [CoreOS][2]。当然还有其它,例如 [Red Hat Atomic Host][3] 和 [Ubuntu Snappy][4]。 - -所有容器之间共享Linux 操作系统,减少了容器足迹的重复和冗余。每个容器只包括该容器唯一的部分。下面是一个示意图: - -![](https://deis.com/images/blog-images/dev_journey_3.png) - -你用它所需的组件配置容器。一个容器组件被称为**层**。一层是一个容器镜像,(你会在后面的部分看到更多关于容器镜像的介绍)。你从一个基本层开始,这通常是你想在容器中使用的操作系统。(容器管理器只提供你想要的操作系统在宿主操作系统中不存在的部分。)当你构建配置你的容器时,你会添加层,例如你想要添加网络服务器 Apache,如果容器要运行脚本,则需要添加 PHP 或 Python 运行时。 - -分层非常灵活。如果应用程序或者服务容器需要 PHP 5.2 版本,你相应地配置该容器即可。如果你有另一个应用程序或者服务需要 PHP 5.6 版本,没问题,你可以使用 PHP 5.6 配置该容器。不像虚拟机,更改一个版本的运行时依赖时你需要经过大量的配置和安装过程;对于容器你只需要在容器配置文件中重新定义层。 - -所有上面描述的容器多功能性都由一个称为容器管理器的软件控制。现在,最流行的容器管理器是 [Docker][5] 和 [Rocket][6]。上面的示意图展示了容器管理器是 Docker,宿主操作系统是 CentOS 的主机情景。 - -### 容器由镜像构成 ### - -当你需要将我们的应用程序构建到容器时,你就会编译镜像。镜像代表了需要完成容器工作的容器模板。(容器里的容器)。镜像被保存在网络上的注册表里。 - -从概念上讲,注册表类似于一个使用 Java 的人眼中的 [Maven][7] 仓库,使用 .NET 的人眼中的 [NuGet][8] 服务器。你会创建一个列出了你应用程序所需镜像的容器配置文件。然后你使用容器管理器创建一个包括了你应用程序代码以及从注册表中下载的构成资源的容器。例如,如果你的应用程序包括了一些 PHP 文件,你的容器配置文件会声明你会从注册表中获取 PHP 运行时。另外,你还要使用容器配置文件声明需要复制到容器文件系统中的 .php 文件。容器管理器会封装你应用程序的所有东西为一个独立容器。该容器将会在容器管理器的管理下运行在宿主计算机上。 - -这是一个容器创建背后概念的示意图: - -![](https://deis.com/images/blog-images/dev_journey_4.png) - -让我们仔细看看这个示意图。 - -(1)表示一个定义了你容器所需东西以及你容器如何构建的容器配置文件。当你在主机上运行容器时,容器管理器会读取配置文件从云上的注册表中获取你需要的容器镜像,(2)作为层将镜像添加到你的容器。 - -另外,如果组成镜像需要其它镜像,容器管理器也会获取这些镜像并把它们作为层添加进来。(3)容器管理器会将需要的文件复制到容器中。 - -如果你使用了配置服务,例如 [Deis][9],你刚刚创建的应用程序容器作为镜像存在(4)配置服务会将它部署到你选择的云供应商上。类似 AWS 和 Rackspace 云供应商。 - -### 集群中的容器 ### - -好了。这里有一个很好的例子说明了容器比虚拟机提供了更好的配置灵活性和资源利用率。但是,这并不是全部。 - -容器真正灵活是在集群中。记住,每个容器有一个独立的 IP 地址。因此,能把它放到负载均衡器后面。将容器放到负载均衡器后面,就上升了一个层次。 - -你可以在一个负载均衡容器后运行容器集群以获得更高的性能和高可用计算。这是一个例子: - -![](https://deis.com/images/blog-images/dev_journey_5.png) - -假如你开发了一个进行资源密集型工作的应用程序。例如图片处理。使用类似 [Deis][9] 的容器配置技术,你可以创建一个包括了你图片处理程序以及你图片处理程序需要的所有资源的容器镜像。然后,你可以部署一个或多个容器镜像到主机上的负载均衡器。一旦创建了容器镜像,你可以在系统快要刷爆时把它放到一边,为了满足手中的工作时添加更多的容器实例。 - -这里还有更多好消息。你不需要每次添加实例到环境中时手动配置负载均衡器以便接受你的容器镜像。你可以使用服务发现技术告知均衡器你容器的可用性。然后,一旦获知,均衡器就会将流量分发到新的结点。 - -### 全部放在一起 ### - -容器技术完善了虚拟机不包括的部分。类似 CoreOS、RHEL Atomic、和 Ubuntu 的 Snappy 宿主操作系统,和类似 Docker 和 Rocket 的容器管理技术结合起来,使得容器变得日益流行。 - -尽管容器变得更加越来越普遍,掌握它们还是需要一段时间。但是,一旦你懂得了它们的窍门,你可以使用类似 [Deis][9] 的配置技术使容器创建和部署变得更加简单。 - -概念上理解容器和进一步实际使用它们完成工作一样重要。但我认为不实际动手把想法付诸实践,概念也难以理解。因此,我们该系列的下一阶段就是:创建一些容器。 - --------------------------------------------------------------------------------- - -via: https://deis.com/blog/2015/developer-journey-linux-containers - -作者:[Bob Reselman][a] -译者:[ictlyh](http://www.mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://deis.com/blog -[1]:https://en.wikipedia.org/wiki/Virtual_machine -[2]:https://coreos.com/using-coreos/ -[3]:http://www.projectatomic.io/ -[4]:https://developer.ubuntu.com/en/snappy/ -[5]:https://www.docker.com/ -[6]:https://coreos.com/blog/rocket/ -[7]:https://en.wikipedia.org/wiki/Apache_Maven -[8]:https://www.nuget.org/ -[9]:http://deis.com/learn \ No newline at end of file From 32423515678cb6525127aedc74196c19ec6c2920 Mon Sep 17 00:00:00 2001 From: sevenot Date: Tue, 17 Nov 2015 17:23:11 +0800 Subject: [PATCH 2480/2517] sevenot translated --- ...ut Linux Try Linux Desktop on the Cloud.md | 45 ------------------- ...ut Linux Try Linux Desktop on the Cloud.md | 43 ++++++++++++++++++ 2 files changed, 43 insertions(+), 45 deletions(-) delete mode 100644 sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md create mode 100644 translated/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md diff --git a/sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md b/sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md deleted file mode 100644 index 6ac2f2a9eb..0000000000 --- a/sources/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md +++ /dev/null @@ -1,45 +0,0 @@ -sevenot translating -Curious about Linux? Try Linux Desktop on the Cloud -================================================================================ -Linux maintains a very small market share as a desktop operating system. Current surveys estimate its share to be a mere 2%; contrast that with the various strains (no pun intended) of Windows which total nearly 90% of the desktop market. For Linux to challenge Microsoft's monopoly on the desktop, there needs to be a simple way of learning about this different operating system. And it would be naive to believe a typical Windows user is going to buy a second machine, tinker with partitioning a hard disk to set up a multi-boot system, or just jump ship to Linux without an easy way back. - -![](http://www.linuxlinks.com/portal/content/reviews/Cloud/CloudComputing.png) - -We have examined a number of risk-free ways users can experiment with Linux without dabbling with partition management. Various options include Live CD/DVDs, USB keys and desktop virtualization software. For the latter, I can strongly recommend VMWare (VMWare Player) or Oracle VirtualBox, two relatively easy and free ways of installing and running multiple operating systems on a desktop or laptop computer. Each virtual machine has its own share of CPU, memory, network interfaces etc which is isolated from other virtual machines. But virtual machines still require some effort to get Linux up and running, and a reasonably powerful machine. Too much effort for a mere inquisitive mind. - -It can be difficult to break down preconceptions. Many Windows users will have experimented with free software that is available on Linux. But there are many facets to learn on Linux. And it takes time to become accustomed to the way things work in Linux. - -Surely there should be an effortless way for a beginner to experiment with Linux for the first time? Indeed there is; step forward the online cloud lab. - -### LabxNow ### - -![LabxNow](http://www.linuxlinks.com/portal/content/reviews/Cloud/Screenshot-LabxNow.png) - -LabxNow provides a free service for general users offering Linux remote desktop over the browser. The developers promote the service as having a personal remote lab (to play around, develop, whatever!) that will be accessible from anywhere, with the internet of course. - -The service currently offers a free virtual private server with 2 cores, 4GB RAM and 10GB SSD space. The service runs on a 4 AMD 6272 CPU with 128GB RAM. - -#### Features include: #### - -- Machine images: Ubuntu 14.04 with Xfce 4.10, RHEL 6.5, CentOS with Gnome, and Oracle -- Hardware: CPU - 1 or 2 cores; RAM: 512MB, 1GB, 2GB or 4GB -- Fast network for data transfers -- Works with all popular browsers -- Install anything, run anything - an excellent way to experiment and learn all about Linux without any risk -- Easily add, delete, manage and customize VMs -- Share VMs, Remote desktop support - -All you need is a reasonable Internet connected device. Forget about high cost VPS, domain space or hardware support. LabxNow offers a great way of experimenting with Ubuntu, RHEL and CentOS. It gives Windows users an excellent environment to dip their toes into the wonderful world of Linux. Further, it allows users to do (programming) work from anywhere in the word without having the stress of installing Linux on each machine. Point your web browser at [www.labxnow.org/labxweb/][1]. - -There are other services (mostly paid services) that allow users to experiment with Linux. These include Cloudsigma which offers a free 7 day trial, and Icebergs.io (full root access via HTML5). But for now, LabxNow gets my recommendation. - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20151003095334682/LinuxCloud.html - -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[1]:https://www.labxnow.org/labxweb/ diff --git a/translated/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md b/translated/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md new file mode 100644 index 0000000000..016429d92d --- /dev/null +++ b/translated/share/20151012 Curious about Linux Try Linux Desktop on the Cloud.md @@ -0,0 +1,43 @@ +sevenot translated +好奇Linux?试试云端的Linux桌面 +================================================================================ +Linux在桌面操作系统市场上只占据了非常小的份额,目前调查来看,估计只有2%的市场份额;对比来看丰富多变的Windows系统占据了接近90%的市场份额。对于Linux来说要挑战Windows在桌面操作系统市场的垄断,需要一个简单的方式来让用户学习不同的操作系统。如果你相信传统的Windows用户再买一台机器来使用Linux,你就太天真了。我们只能去试想用户重新分盘,设置引导程序来使用双系统,或者跳过所有步骤回到一个最简单的方法。 +![](http://www.linuxlinks.com/portal/content/reviews/Cloud/CloudComputing.png) + +我们实验过一系列无风险的使用方法让用户试操作Linux,并且不涉及任何分区管理,包括CD/DVDs光盘、USB钥匙和桌面虚拟化软件。通过实验,我强烈推荐使用VMware的VMware Player或者Oracle VirtualBox虚拟机,对于桌面操作系统或者便携式电脑的用户,这是一种相对简单而且免费的的方法来安装运行多操作系统。每一台虚拟机和其他虚拟机相隔离,但是共享CPU,存贮,网络接口等等。但是虚拟机仍需要一定的资源来安装运行Linux,也需要一台相当强劲的主机。对于一个好奇心不大的人,这样做实在是太麻烦了。 + +要打破用户传统的使用观念市非常困难的。很多Windows用户可以尝试使用Linux提供的免费软件,但也有太多要学习的Linux系统知识。这会花掉相当一部分时间来习惯Linux的工作方式。 + +当然了,对于一个第一次在Linux上操作的新手,有没有一个更高效的方法呢?答案是肯定的,接着往下看看云实验平台。 + +### LabxNow ### + +![LabxNow](http://www.linuxlinks.com/portal/content/reviews/Cloud/Screenshot-LabxNow.png) + +LabxNow提供了一个免费服务,方便广大用户通过浏览器来访问远程Liunx桌面。开发者将其加强为一个用户个人远程实验室(用户可以在系统里运行、开发任何程序),用户可以在任何地方通过互联网登入远程实验室。 + +这项服务现在可以为个人用户提供2核处理器,4GB RAM和10GB的固态硬盘,运行在128G RAM的4 AMD 6272处理器上。 + +#### 配置参数: #### + +- 系统镜像:基于Ubuntu 14.04的Xface 4.10,RHEL 6.5,CentOS(Gnome桌面),Oracle +- 硬件: CPU - 1核或者2核; 内存: 512MB, 1GB, 2GB or 4GB +- 超快的网络数据传输 +- 可以运行在所有流行的浏览器上 +- 可以安装任意程序,可以运行任何程序 – 这是一个非常棒的方法,可以随意做实验学你你想学的所有知识, 没有 一点风险 +- 添加、删除、管理、制定虚拟机非常方便 +- 支持虚拟机共享,远程桌面 + +你所需要的只是一台有稳定网络的设备。不用担心虚拟专用系统(VPS)、域名、或者硬件带来的高费用。LabxNow提供了一个非常好的方法在Ubuntu、RHEL和CentOS上实验。它给Windows用户一个极好的环境,让他们探索美妙的Linux世界。说得深一点,它可以让用户随时随地在里面工作,而没有了要在每台设备上安装Linux的压力。点击下面这个链接进入[www.labxnow.org/labxweb/][1]。 + +这里还有一些其它服务(大部分市收费服务)可以让用户在Linux使用。包括Cloudsigma环境的7天使用权和Icebergs.io(通过HTML5实现root权限)。但是现在,我推荐LabxNow。 +-------------------------------------------------------------------------------- + +来自: http://www.linuxlinks.com/article/20151003095334682/LinuxCloud.html + +译者:[sevenot](https://github.com/sevenot) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[1]:https://www.labxnow.org/labxweb/ From ff474de35679601c55ac1928b09da9c626441aa0 Mon Sep 17 00:00:00 2001 From: sevenot Date: Wed, 18 Nov 2015 00:14:58 +0800 Subject: [PATCH 2481/2517] sevenot translating --- ...Using Windows 10 After More than 8 Years--See Comparison.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md b/sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md index cf472613c4..22a0acdbf1 100644 --- a/sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md +++ b/sources/talk/20150818 A Linux User Using Windows 10 After More than 8 Years--See Comparison.md @@ -1,3 +1,4 @@ +sevenot translating A Linux User Using ‘Windows 10′ After More than 8 Years – See Comparison ================================================================================ Windows 10 is the newest member of windows NT family of which general availability was made on July 29, 2015. It is the successor of Windows 8.1. Windows 10 is supported on Intel Architecture 32 bit, AMD64 and ARMv7 processors. @@ -341,4 +342,4 @@ via: http://www.tecmint.com/a-linux-user-using-windows-10-after-more-than-8-year 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:http://www.tecmint.com/author/avishek/ -[1]:https://www.microsoft.com/en-us/software-download/windows10ISO \ No newline at end of file +[1]:https://www.microsoft.com/en-us/software-download/windows10ISO From a17668710fbcf5180857b929f85d551c93abedff Mon Sep 17 00:00:00 2001 From: Ricky Gong Date: Wed, 18 Nov 2015 13:37:23 +0800 Subject: [PATCH 2482/2517] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?=E3=80=9120151117=20Linux=20101--Get=20the=20most=20out=20of=20?= =?UTF-8?q?Systemd.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20151117 Linux 101--Get the most out of Systemd.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151117 Linux 101--Get the most out of Systemd.md b/sources/tech/20151117 Linux 101--Get the most out of Systemd.md index 7e6f0f4f71..92dbbd8eaf 100644 --- a/sources/tech/20151117 Linux 101--Get the most out of Systemd.md +++ b/sources/tech/20151117 Linux 101--Get the most out of Systemd.md @@ -1,3 +1,5 @@ +Ricky-Gong is translating this article. + Linux 101: Get the most out of Systemd ================================================================================ Why do this? @@ -168,4 +170,4 @@ via: http://www.linuxvoice.com/linux-101-get-the-most-out-of-systemd/ [a]:http://www.linuxvoice.com/author/mike/ [1]:http://tinyurl.com/poorlennart [2]:http://tinyurl.com/m2e7mv8 -[3]:http://uselessd.darknedgy.net/ \ No newline at end of file +[3]:http://uselessd.darknedgy.net/ From b6af7bd61fa28cee78d93b62d1d58fc942e18e3a Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 18 Nov 2015 15:02:19 +0800 Subject: [PATCH 2483/2517] PUB:20151027 How To Install Retro Terminal In Linux @FSSlc --- ...0151027 How To Install Retro Terminal In Linux.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename {translated/tech => published}/20151027 How To Install Retro Terminal In Linux.md (85%) diff --git a/translated/tech/20151027 How To Install Retro Terminal In Linux.md b/published/20151027 How To Install Retro Terminal In Linux.md similarity index 85% rename from translated/tech/20151027 How To Install Retro Terminal In Linux.md rename to published/20151027 How To Install Retro Terminal In Linux.md index b3b7b54b62..3284f0d465 100644 --- a/translated/tech/20151027 How To Install Retro Terminal In Linux.md +++ b/published/20151027 How To Install Retro Terminal In Linux.md @@ -2,9 +2,9 @@ Linux 下如何安装 Retro Terminal ================================================================================ ![Retro Terminal in Linux](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Retro-Terminal-Linux.jpeg) -你有怀旧情节?那就试试 **安装 retro terminal 应用** [cool-retro-term][1] 来一瞥过去的时光吧。顾名思义,`cool-retro-term` 是一个兼具酷炫和怀旧的终端。 +你有怀旧情节?那就试试 **安装复古终端应用** [cool-retro-term][1] 来一瞥过去的时光吧。顾名思义,`cool-retro-term` 是一个兼具酷炫和怀旧的终端。 -你还记得那段遍地都是 CRT 显示器、终端屏幕闪烁不停的时光吗?现在你并不需要穿越到过去来见证那段时光。假如你观看背景设置在上世纪 90 年代的电影,你就可以看到大量带有绿色或黑底白字的显像管显示器。再加上它们通常带有极客光环,这使得它们看起来更酷。 +你还记得那段遍地都是 CRT 显示器、终端屏幕闪烁不停的时光吗?现在你并不需要穿越到过去来见证那段时光。假如你观看背景设置在上世纪 90 年代的电影,你就可以看到大量带有绿色或黑底白字的显像管显示器。这种极客光环让它们看起来非常酷! 若你已经厌倦了你机器中终端的外表,正寻找某些炫酷且‘新奇’的东西,则 `cool-retro-term` 将会带给你一个复古的终端外表,使你可以重温过去。你也可以改变它的颜色、动画类型并添加一些额外的特效。 @@ -48,7 +48,7 @@ Linux 下如何安装 Retro Terminal ./cool-retro-term -假如你想使得这个应用可在程序菜单中被快速获取到,以便你不用再每次手动地用命令来启动它,则你可以使用下面的命令: +假如你想把这个应用放在程序菜单中以便快速找到,这样你就不用再每次手动地用命令来启动它,则你可以使用下面的命令: sudo cp cool-retro-term.desktop /usr/share/applications @@ -60,13 +60,13 @@ Linux 下如何安装 Retro Terminal via: http://itsfoss.com/cool-retro-term/ -作者:[Hossein Heydari][a] +作者:[Abhishek Prakash][a] 译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 -[a]:http://itsfoss.com/author/hossein/ +[a]:http://itsfoss.com/author/abhishek/ [1]:https://github.com/Swordfish90/cool-retro-term [2]:http://itsfoss.com/tag/antergos/ [3]:https://manjaro.github.io/ From 819316a86bc498bd86657482bbc99406d9e17ca1 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 18 Nov 2015 19:34:45 +0800 Subject: [PATCH 2484/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...r To-Do Lists in Ubuntu Using Go For It Application.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translated/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md b/translated/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md index bbc96a6e7b..9671ff2ecd 100644 --- a/translated/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md +++ b/translated/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md @@ -4,7 +4,7 @@ 任务管理可以说是工作及日常生活中最重要也最具挑战性的事情之一。当您在工作中承担越来越多的责任时,您的表现将与您管理任务的能力直接挂钩。 -若您的工作有部分需要在电脑上完成,那么您一定很乐意知道,有多款应用软件声称可以为您减轻任务管理的负担。即便这些软件中的大多数都是为 Windows 用户服务的,在 Linux 系统中仍然有不少选择。在本文中,我们就来讨论这样一款软件:Go For It. +若您的工作有部分需要在电脑上完成,那么您一定很乐意知道,有多款应用软件自称可以为您减轻任务管理的负担。即便这些软件中的大多数都是为 Windows 用户服务的,在 Linux 系统中仍然有不少选择。在本文中,我们就来讨论这样一款软件:Go For It. ### Go For It ### @@ -12,7 +12,7 @@ ### 下载并安装 ### -使用基于 Debian 的系统(如Ubuntu)的用户可以通过运行以下终端命令轻松地安装这款软件: +使用基于 Debian 系统(如Ubuntu)的用户可以通过运行以下终端命令轻松地安装这款软件: sudo add-apt-repository ppa:mank319/go-for-it sudo apt-get update @@ -67,7 +67,7 @@ GFI 也能让您稍微调整一些它的设置。例如,下图所示的设置 ### 结论### -正如您所看到的,GFI 是一款简洁明了且易于使用的任务管理软件。虽然它不提供非常丰富的功能,但它实现了它的承诺,并且定时器的整合特别有用。如果您正在寻找一款实现了基础功能,并且开源的 Linux 任务管理软件,Go For It 值得您一试。 +正如您所看到的,GFI 是一款简洁明了且易于使用的任务管理软件。虽然它不提供非常丰富的功能,但它实现了它的承诺,定时器的整合特别有用。如果您正在寻找一款实现了基础功能,并且开源的 Linux 任务管理软件,Go For It 值得您一试。 -------------------------------------------------------------------------------- @@ -75,7 +75,7 @@ via: https://www.maketecheasier.com/to-do-lists-ubuntu-go-for-it/ 作者:[Himanshu Arora][a] 译者:[Ricky-Gong](https://github.com/Ricky-Gong) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8d5f0cb7ea8fc02a2324a5d15e612bfa72b00b7f Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 18 Nov 2015 21:42:00 +0800 Subject: [PATCH 2485/2517] Create 20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md --- ...3.9.1 with JSON Support on Ubuntu 15.04.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md diff --git a/translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md b/translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md new file mode 100644 index 0000000000..b79dc3657e --- /dev/null +++ b/translated/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md @@ -0,0 +1,121 @@ +如何在Ubuntu 15.04 上安装带JSON 支持的SQLite 3.9.1 +================================================================================ +欢迎阅读我们关于SQLite 的文章,SQLite 是当今时间上使用最广泛的SQL 数据库引擎,它他基本不需要配置,不需要安装或者管理就可以运行。SQLite 是一个是开放领域的软件,是关系数据库的管理系统,或者说RDBMS,用来在大表存储用户定义的记录。对于数据存储和管理来说,数据库引擎要处理复杂的查询命令,这些命令可能会从多个表获取数据然后生成报告的数据总结。 + +SQLite 是一个非常小、轻量级,不需要分离的服务进程或系统。他可以运行在UNIX,Linux,Mac OS-X,Android,iOS 和Windows 上,已经被大量的软件程序使用,如Opera, Ruby On Rails, Adobe System, Mozilla Firefox, Google Chrome 和 Skype。 + +### 1) 基本需求: ### + +在几乎全部支持SQLite 的平台上安装SQLite 基本上没有复杂的要求。 + +所以让我们在CLI 或者Secure Shell 上使用sudo 或者root 权限登录Ubuntu 服务器。然后更新系统,这样子就可以让操作系统的软件更新到新版本。 + +在Ubuntu 上,下面的命令是用来更新系统的软件源的。 + + # apt-get update + +如果你要在新安装的Ubuntu 上部署SQLite,那么你需要安装一些基础的系统管理工具,如wget, make, unzip, gcc。 + +要安装wget,可以使用下面的命令,然后输入Y 如果系统提示的话: + + # apt-get install wget make gcc + +### 2) 下载 SQLite ### + +要下载SQLite 最好是在[SQLite 官网][1]下载,如下所示 + +![SQLite download](http://blog.linoxide.com/wp-content/uploads/2015/10/Selection_014.png) + +你也可以直接复制资源的连接然后再命令行使用wget 下载,如下所示: + + # wget https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz + +![wget SQLite](http://blog.linoxide.com/wp-content/uploads/2015/10/23.png) + +下载完成之后,解压缩安装包,切换工作目录到解压缩后的SQLite 目录,使用下面的命令。 + + # tar -zxvf sqlite-autoconf-3090100.tar.gz + +### 3) 安装 SQLite ### + +现在我们要开始安装、配置刚才下载的SQLite。所以在Ubuntu 上编译、安装SQLite,运行配置脚本。 + + root@ubuntu-15:~/sqlite-autoconf-3090100# ./configure –prefix=/usr/local + +![SQLite Installation](http://blog.linoxide.com/wp-content/uploads/2015/10/35.png) + +配置要上面的prefix 之后,运行下面的命令编译安装包。 + + root@ubuntu-15:~/sqlite-autoconf-3090100# make +source='sqlite3.c' object='sqlite3.lo' libtool=yes \ +DEPDIR=.deps depmode=none /bin/bash ./depcomp \ +/bin/bash ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.9.1\" -DPACKAGE_STRING=\"sqlite\ 3.9.1\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.9.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_POSIX_FALLOCATE=1 -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -c -o sqlite3.lo sqlite3.c + +运行完上面的命令之后,要在Ubuntu 上完成SQLite 的安装得运行下面的命令。 + + # make install + +![SQLite Make Install](http://blog.linoxide.com/wp-content/uploads/2015/10/44.png) + +### 4) 测试 SQLite 安装 ### + +要保证SQLite 3.9 安装成功了,运行下面的命令。 + + # sqlite3 + +SQLite 的版本会显示在命令行。 + +![Testing SQLite Installation](http://blog.linoxide.com/wp-content/uploads/2015/10/53.png) + +### 5) 使用 SQLite ### + +SQLite 很容易上手。要获得详细的使用方法,在SQLite 控制台里输入下面的命令。 + + sqlite> .help + +这里会显示全部可用的命令和详细说明。 + +![SQLite Help](http://blog.linoxide.com/wp-content/uploads/2015/10/62.png) + +现在开始最后一部分,使用一点SQLite 命令创建数据库。 + +要创建一个新的数据库需要运行下面的命令。 + + # sqlite3 test.db + +然后创建一张新表。 + + sqlite> create table memos(text, priority INTEGER); + +接着使用下面的命令插入数据。 + + sqlite> insert into memos values('deliver project description', 15); + sqlite> insert into memos values('writing new artilces', 100); + +要查看插入的数据可以运行下面的命令。 + + sqlite> select * from memos; + deliver project description|15 + writing new artilces|100 + +或者使用下面的命令离开。 + + sqlite> .exit + +![Using SQLite3](http://blog.linoxide.com/wp-content/uploads/2015/10/73.png) +### 结论 ### + +通过本文你可以了解如果安装支持JSON1 的最新版的SQLite,SQLite 从3.9.0 开始支持JSON1。这是一个非常棒的库,可以用来获取内嵌到应用程序,利用它可以很有效而且很轻量的管理资源。我们希望你能觉得本文有所帮助,请自由的像我们反馈你遇到的问题和困难。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-sqlite-json-ubuntu-15-04/ + +作者:[Kashif Siddique][a] +译者:[译者ID](https://github.com/oska874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/kashifs/ +[1]:https://www.sqlite.org/download.html From dce1e900ca3d412d83ce047f13e026c51b99c6ab Mon Sep 17 00:00:00 2001 From: Ezio Date: Wed, 18 Nov 2015 21:42:10 +0800 Subject: [PATCH 2486/2517] Delete 20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md --- ...3.9.1 with JSON Support on Ubuntu 15.04.md | 124 ------------------ 1 file changed, 124 deletions(-) delete mode 100644 sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md diff --git a/sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md b/sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md deleted file mode 100644 index 8895d93439..0000000000 --- a/sources/tech/20151104 How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04.md +++ /dev/null @@ -1,124 +0,0 @@ -translating by ezio - -How to Install SQLite 3.9.1 with JSON Support on Ubuntu 15.04 -================================================================================ -Hello and welcome to our today's article on SQLite which is the most widely deployed SQL database engine in the world that comes with zero-configuration, that means no setup or administration needed. SQLite is public-domain software package that provides relational database management system, or RDBMS that is used to store user-defined records in large tables. In addition to data storage and management, database engine process complex query commands that combine data from multiple tables to generate reports and data summaries. - -SQLite is very small and light weight that does not require a separate server process or system to operate. It is available on UNIX, Linux, Mac OS-X, Android, iOS and Windows which is being used in various software applications like Opera, Ruby On Rails, Adobe System, Mozilla Firefox, Google Chrome and Skype. - -### 1) Basic Requirements: ### - -There is are no such complex complex requirements for the installation of SQLite as it mostly comes support all major cross platforms. - -So, let's login to your Ubuntu server with sudo or root credentials using your CLI or Secure Shell. Then update your system so that your operating system is upto date with latest packages. - -In ubuntu, the below command is to be used for system update. - - # apt-get update - -If you are starting to deploy SQLite on on a fresh Ubuntu, then make sure that you have installed some basic system management utilities like wget, make, unzip, gcc. - -To install wget, make and gcc packages on ubuntu, you use the below command, then press "Y" to allow and proceed with installation of these packages. - - # apt-get install wget make gcc - -### 2) Download SQLite ### - -To download the latest package of SQLite, you can refer to their official [SQLite Download Page][1] as shown below. - -![SQLite download](http://blog.linoxide.com/wp-content/uploads/2015/10/Selection_014.png) - -You can copy the link of its resource package and download it on ubuntu server using the wget utility command. - - # wget https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz - -![wget SQLite](http://blog.linoxide.com/wp-content/uploads/2015/10/23.png) - -After downloading is complete, extract the package and change your current directory to the extracted SQLite folder by using the below command as shown. - - # tar -zxvf sqlite-autoconf-3090100.tar.gz - -### 3) Installing SQLite ### - -Now we are going to install and configure the SQLite package that we downloaded. So, to compile and install SQLite on ubuntu run the configuration script within the same directory where your have extracted the SQLite package as shown below. - - root@ubuntu-15:~/sqlite-autoconf-3090100# ./configure –prefix=/usr/local - -![SQLite Installation](http://blog.linoxide.com/wp-content/uploads/2015/10/35.png) - -Once the package is configuration is done under the mentioned prefix, then run the below command make command to compile the package. - - root@ubuntu-15:~/sqlite-autoconf-3090100# make - source='sqlite3.c' object='sqlite3.lo' libtool=yes \ - DEPDIR=.deps depmode=none /bin/bash ./depcomp \ - /bin/bash ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.9.1\" -DPACKAGE_STRING=\"sqlite\ 3.9.1\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.9.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_POSIX_FALLOCATE=1 -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -c -o sqlite3.lo sqlite3.c - -After running make command, to complete the installation of SQLite on ubuntu run the 'make install' command as shown below. - - # make install - -![SQLite Make Install](http://blog.linoxide.com/wp-content/uploads/2015/10/44.png) - -### 4) Testing SQLite Installation ### - -To confirm the successful installation of SQLite 3.9, run the below command in your command line interface. - - # sqlite3 - -You will the SQLite verion after running the above command as shown. - -![Testing SQLite Installation](http://blog.linoxide.com/wp-content/uploads/2015/10/53.png) - -### 5) Using SQLite ### - -SQLite is very handy to use. To get the detailed information about its usage, simply run the below command in the SQLite console. - - sqlite> .help - -So here is the list of all its available commands, with their description that you can get help to start using SQLite. - -![SQLite Help](http://blog.linoxide.com/wp-content/uploads/2015/10/62.png) - -Now in this last section , we make use of few SQLite commands to create a new database using the SQLite3 command line interface. - -To to create a new database run the below command. - - # sqlite3 test.db - -To create a table within the new database run the below command. - - sqlite> create table memos(text, priority INTEGER); - -After creating the table, insert some data using the following commands. - - sqlite> insert into memos values('deliver project description', 15); - sqlite> insert into memos values('writing new artilces', 100); - -To view the inserted data from the table , run the below command. - - sqlite> select * from memos; - deliver project description|15 - writing new artilces|100 - -to exit from the sqlite3 type the below command. - - sqlite> .exit - -![Using SQLite3](http://blog.linoxide.com/wp-content/uploads/2015/10/73.png) - -### Conclusion ### - -In this article you learned the installation of latest version of SQLite 3.9.1 which enables the recently JSON1 support in its 3.9.0 version and so on. Its is an amazing library that gets embedded inside the application that makes use of it to keep the resources much efficient and lighter. We hope you find this article much helpful, feel free to get back to us if you find any difficulty. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/install-sqlite-json-ubuntu-15-04/ - -作者:[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/ -[1]:https://www.sqlite.org/download.html From 69acfb296c3056c8db15fea9d6158972b47d9b89 Mon Sep 17 00:00:00 2001 From: Ricky Gong Date: Wed, 18 Nov 2015 23:05:47 +0800 Subject: [PATCH 2487/2517] Delete 20151117 Linux 101--Get the most out of Systemd.md --- ... Linux 101--Get the most out of Systemd.md | 173 ------------------ 1 file changed, 173 deletions(-) delete mode 100644 sources/tech/20151117 Linux 101--Get the most out of Systemd.md diff --git a/sources/tech/20151117 Linux 101--Get the most out of Systemd.md b/sources/tech/20151117 Linux 101--Get the most out of Systemd.md deleted file mode 100644 index 92dbbd8eaf..0000000000 --- a/sources/tech/20151117 Linux 101--Get the most out of Systemd.md +++ /dev/null @@ -1,173 +0,0 @@ -Ricky-Gong is translating this article. - -Linux 101: Get the most out of Systemd -================================================================================ -Why do this? - -- Understand the big changes in modern distros. -- See how Systemd replaces SysVinit. -- Get to grips with units and the new journal. - -Hate mail, personal insults, death threats – Lennart Poettering, the author of Systemd, is used to receiving these. The Red Hat employee recently ranted on Google+ about the nature of the FOSS community ([http://tinyurl.com/poorlennart][1]), lamenting that it’s “quite a sick place to be in”. In particular, he points to Linus Torvalds’s highly acerbic mailing list posts, and accuses the kernel head honcho of setting the tone of online discussion, making personal attacks and derogatory comments the norm. - -But why has Poettering received so much hate? Why does a man who simply develops open source software have to tolerate this amount of anger? Well, the answer lies in the importance of his software. Systemd is the first thing launched by the Linux kernel on most distributions now, and it serves many roles. It starts system services, handles logins, executes tasks at specified intervals, and much more. It’s growing all the time, and becoming something of a “base system” for Linux – providing all the plumbing tools needed to boot and maintain a distro. - -Now, Systemd is controversial for various reasons: it eschews some established Unix conventions, such as plain text log files. It’s seen as a “monolithic” project trying to take over everything else. And it’s a major change to the underpinnings of our OS. Yet almost every major distribution has adopted it (or is about to), so it’s here to stay. And there are benefits: faster booting, easier management of services that depend on one another, and powerful and secure logging facilities too. - -So in this tutorial we’ll explore Systemd’s features, and show you how to get the most out of them. Even if you’re not a fan of the software right now, hopefully at least you’ll feel more comfortable with it by the end. - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/eating-large.jpg) - -**This tongue-in-cheek animation at [http://tinyurl.com/m2e7mv8][2] portrays Systemd as a rabid animal eating everything in its path. Most critics haven’t been so fluffy.** - -### Booting and services ### - -Almost every major distro has either adopted Systemd, or will do so in the next release (Debian and Ubuntu). In this tutorial we’re using a pre-release of Fedora 21 – a distro that has been a great testing ground for Systemd – but the commands and notes should be the same regardless of your distro. That’s one of the plus points of Systemd: it obviates many of the tiny, niggling differences between distros. - -In a terminal, enter **ps ax | grep systemd** and look at the first line. The **1** means that it’s process ID 1, ie the first thing launched by the Linux kernel. So, once the kernel has done its work detecting hardware and organising memory, it launches the **/usr/lib/systemd/systemd** executable, which then launches other programs in turn. (In pre-Systemd days, the kernel would launch **/sbin/init**, which would then launch various other essential boot scripts, in a system known as SysVinit.) - -Central to Systemd is the concept of units. These are configuration files with information about services (programs running in the background), devices, mount points, timers and other aspects of the operating system. One of Systemd’s goals is to ease and simplify the interaction between these, so if you have a certain program that needs to start when a certain mount point is created when a certain device gets plugged in, it should be considerably easier to make all this work. (In pre-Systemd days, hacking all this together with scripts could get very ugly.) To list all units on your Linux installation, enter: - - systemctl list-unit-files - -Now, **systemctl** is the main tool for interacting with Systemd, and it has many options. Here, in the unit list, you’ll notice that there’s some formatting: enabled units are shown in green, and disabled are shown in red. Units marked as “static” can’t be started directly – they’re dependencies of other units. To narrow down the list to just services, use: - - systemctl list-unit-files --type=service - -Note that “enabled” doesn’t necessarily mean that a service is running; just that it can be turned on. To get information about a specific service, for instance GDM (the Gnome Display Manager), enter: - - systemctl status gdm.service - -This provides lots of useful information: a human-readable description of the service, the location of the unit configuration file, when it was started, its PID, and the CGroups to which it belongs (these limit resource consumption for groups of processes). - -If you look at the unit config file in **/usr/lib/systemd/system/gdm.service**, you’ll see various options, including the binary to be started (ExecStart), what it conflicts with (ie which units can’t be active at the same time), and what needs to be started before this unit can be activated (the “After” line). Some units have additional dependency options, such as “Requires” (mandatory dependencies) and “Wants” (optional). - -Another interesting option here is: - - Alias=display-manager.service - -When you activate **gdm.service**, you will also be able to view its status using **systemctl status display-manager.service**. This is useful when you know there’s a display manager running, and you want to do something with it, but you don’t care whether it’s GDM, KDM, XDM or any of the others. - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/status-large.jpg) - -**Use systemctl status, followed by a unit name, to see what’s going on with a service.** - -### Target locked ### - -If you enter **ls** in the **/usr/lib/systemd/system** directory, you’ll also see various files that end in **.target**. A target is a way of grouping units together so that they’re started at the same time. For instance, in most Unix-like OSes there’s a state of the system called “multi-user”, which means that the system has booted correctly, background services are running, and it’s ready for one or more users to log in and do their work – at least, in text mode. (Other states include single-user, for doing administration work, or reboot, for when the machine is shutting down.) - -If you look inside **multi-user.target**, you may be expecting to see a list of units that should be active in this state. But you’ll notice that the file is pretty bare – instead, individual services make themselves dependencies of the target via the **WantedBy** option. So if you look inside **avahi-daemon.service**, **NetworkManager.service** and many other **.service** files, you’ll see this line in the Install section: - - WantedBy=multi-user.target - -So, switching to the multi-user target will enable those units that contain the above line. Other targets are available (such as **emergency.target** for an emergency shell, or **halt.target** for when the machine shuts down), and you can easily switch between them like so: - - systemctl isolate emergency.target - -In many ways, these are like SysVinit runlevels, with text-mode **multi-user.target** being runlevel 3, **graphical.target** being runlevel 5, **reboot.target** being runlevel 6, and so forth. - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/unit-large.jpg) - -**The unit configuration files might look foreign compared to traditional scripts, but they’re not hard to grasp.** - -### Up and down ### - -Now, you might be pondering: we’ve got this far, and yet we haven’t even looked at stopping and starting services yet! But there’s a reason for this. Systemd can look like a complicated beast from the outside, so it’s good to have an overview of how it works before you start interacting with it. The actual commands for managing services are very simple: - - systemctl stop cups.service - systemctl start cups.service - -(If a unit has been disabled, you can first enable it with **systemctl enable** followed by the unit name. This places a symbolic link for the unit in the .wants directory of the current target, in the **/etc/systemd/system** folder.) - -Two more useful commands are **systemctl restart** and **systemctl reload**, followed by unit names. The second asks the unit to reload its configuration file. Systemd is – for the most part – very well documented, so look at the manual page (**man systemctl**) for details on every command. - -> ### Timer units: replacing Cron ### -> -> Beyond system initialisation and service management, Systemd has its fingers in various other pies too. Notably, it can perform the job of **cron**, arguably with more flexibility (and an easier to read syntax). **Cron** is the program that performs jobs at regular intervals – such as cleaning up temporary files, refreshing caches and so forth. -> -> If you look inside the **/usr/lib/systemd/system** directory again, you’ll see that various **.timer** files are provided. Have a look at some of them with **less**, and you’ll note that they follow a similar structure to the **.service** and **.target** files. The difference, however, lies in the **[Timer]** section. Consider this example: -> -> [Timer] -> OnBootSec=1h -> OnUnitActiveSec=1w -> -> Here, the **OnBootSec** option tells Systemd to activate the unit 1 hour after the system has booted. Then the second option means: activate the unit once a week after that. There’s a huge amount of flexibility in the times that you can set – enter **man systemd.time** for a full list. -> -> By default, Systemd’s accuracy for timing is one minute. In other words, it will activate the unit within a minute of the time you specify, but not necessarily to the exact second. This is done for power management reasons, but if you need a timer to be executed without any delay, right down to the microsecond, you can add this line: -> -> AccuracySec=1us -> -> Also, the **WakeSystem** option (which can be set to true or false) defines whether or not the timer should wake up the machine if it’s in suspend mode. - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/systemd_gui-large.jpg) - -**A Systemd GUI exists,although it hasn’t been actively worked on for a couple of years.** - -### Log files: say hello to journald ### - -The second major component of Systemd is the journal. This is a logging system, similar to syslog, but with some major differences. And if you’re a fan of the Unix way, prepare for your blood to boil: it’s a binary log, so you can’t just parse it using your regular command line text tools. This design decision regularly whips up heated debates on the net, but it has some benefits too. For instance, logs can be more structured, with better metadata, so it’s easier to filter out information based on executable name, PID, time and so forth. - -To view the journal in its entirety, enter: - - journalctl - -As with many other Systemd commands, this pipes the output into the **less** program, so you can scroll down by hitting space, use / (forward slash) to search, and other familiar keybindings. You’ll also notice a sprinkling of colour here too, with warnings and failure messages in red. - -That’s a lot of information; to narrow it down to the current boot, use: - - journalctl -b - -And here’s where the Systemd journal starts to shine. Do you want to see all messages from the previous boot? Try **journalctl -b -1**. Or the one before that? Replace **-1** with **-2**. How about something very specific, like all messages from 24 October 2014, 16:38 onwards?” - - journalctl -b --since=”2014-10-24 16:38” - -Even if you deplore binary logs, that’s still a useful feature, and for many admins it’s much easier than constructing a similar filter from regular expressions. - -So we’ve narrowed down the log to specific times, but what about specific programs? For units, try this: - - journalctl -u gdm.service - -(Note: that’s a good way to see the log generated by the X server.) Or how about a specific PID? - - journalctl _PID=890 - -You can even request to just see messages from a certain executable: - - journalctl /usr/bin/pulseaudio - -If you want to narrow down to messages of a certain priority, use the **-p** option. With 0 this will only show emergency messages (ie it’s time to start praying to **$DEITY**), whereas 7 will show absolutely everything, including debugging messages. See the manual page (**man journalctl**) for more details on the priority levels. - -It’s worth noting that you can combine options as well, so to only show messages from the GDM service of priority level 3 (or lower) from the current boot, use: - - journalctl -u gdm.service -p 3 -b - -Finally, if you just want to have a terminal window open, constantly updating with the latest journal entries, as you’d have with the tail command in pre-Systemd installations, just enter **journalctl -f**. - -![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/journal-large.jpg) - -**Binary logging isn’t popular, but the journal has some benefits, like very easy filtering of information.** - -> ### Life without Systemd? ### -> -> If you simply, absolutely can’t get on with Systemd, you still have a few choices among the major distributions. Most notably, Slackware, the longest-running distro, hasn’t made the switch yet – but its lead developer hasn’t ruled it out for the future. A few small-name distros are also holding out with SysVinit as well. -> -> But how long will this last? Gnome is becoming increasingly dependent on Systemd, and the other major desktop environments could follow suit. This is a cause of consternation in the BSD communities, as Systemd is heavily tied to Linux kernel features, so the desktops are becoming less portable, in a way. A half-way-house solution might arrive in the form of Uselessd ([http://uselessd.darknedgy.net][3]), which is a stripped-down version of Systemd that purely focuses on launching and supervising processes, without consuming the whole base system. -> -> ![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/gentoo-large.jpg) -> -> If you don’t like Sysytemd, try Gentoo, which has it as a choice of init system, but doesn’t force it on its users. - --------------------------------------------------------------------------------- - -via: http://www.linuxvoice.com/linux-101-get-the-most-out-of-systemd/ - -作者:[Mike Saunders][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://www.linuxvoice.com/author/mike/ -[1]:http://tinyurl.com/poorlennart -[2]:http://tinyurl.com/m2e7mv8 -[3]:http://uselessd.darknedgy.net/ From a9d2774fb77430c4f0f25b15f3a628366f76fcbd Mon Sep 17 00:00:00 2001 From: Ricky Gong Date: Wed, 18 Nov 2015 23:07:58 +0800 Subject: [PATCH 2488/2517] =?UTF-8?q?=E3=80=90=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E3=80=9120151117=20Systemd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Linux 101--Get the most out of Systemd.md | 171 ++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 translated/tech/20151117 Linux 101--Get the most out of Systemd.md diff --git a/translated/tech/20151117 Linux 101--Get the most out of Systemd.md b/translated/tech/20151117 Linux 101--Get the most out of Systemd.md new file mode 100644 index 0000000000..1a382479ec --- /dev/null +++ b/translated/tech/20151117 Linux 101--Get the most out of Systemd.md @@ -0,0 +1,171 @@ +Linux 101:最有效地使用 Systemd +================================================================================ +干嘛要这么做? + +- 理解现代 Linux 发行版中的显著变化; +- 看看 Systemd 是如何取代 SysVinit 的; +- 处理好*单元* (unit)和新的 journal 日志。 + +吐槽邮件,人身攻击,死亡威胁——Lennart Poettering,Systemd 的作者,对收到这些东西早就习以为常了。这位 Red Hat 公司的员工最近在 Google+ 上怒斥 FOSS 社区([http://tinyurl.com/poorlennart][1])的本质,悲痛且失望地表示:“那真是个令人恶心的地方”。他着重指出 Linus Torvalds 在邮件列表上言辞刻薄的帖子,并谴责这位内核的领导者为在线讨论定下基调,并使得人身攻击及贬抑之辞成为常态。 + +但为何 Poettering 会遭受如此多的憎恨?为何就这么个搞搞开源软件的人要忍受这等愤怒?答案就在于他的软件的重要性。如今大多数发行版中,Systemd 是 Linux 内核发起的第一个程序,并且它还扮演多种角色。它会启动系统服务,处理用户登陆,每隔特定的时间执行一些任务,还有很多很多。它在不断地成长,并逐渐成为 Linux 的某种“基础系统”——提供系统启动和发行版维护所需的所有工具。 + +如今,在以下几点上 Systemd 颇具争议:它逃避了一些确立好的 Unix 传统,例如纯文本的日志文件;它被看成是个“大一统”的项目,试图接管一切;它还是我们这个操作系统的支柱的重要革新。然而大多数主流发行版已经接受了(或即将接受)它,因此它就保留了下来。而且它确实是有好处的:更快地启动,更简单地管理那些有依赖的服务程序,提供强大且安全的日志系统等。 + +因此在这篇教程中,我们将探索 Systemd 的特性,并向您展示如何最有效地利用这些特性。即便您此刻并不是这款软件的粉丝,读完本文后您至少可以更加了解和适应它。 + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/eating-large.jpg) + +**这部没正经的动画片来自[http://tinyurl.com/m2e7mv8][2],它把 Systemd 塑造成一只狂暴的动物,吞噬它路过的一切。大多数批评者的言辞可不像这只公仔一样柔软。** + +### 启动及服务 ### + +大多数主流发行版要么已经采用 Systemd,要么即将在下个发布中采用(如 Debian 和 Ubuntu)。在本教程中,我们使用 Fedora 21——该发行版已经是 Systemd 的优秀实验场地——的一个预览版进行演示,但不论您用哪个发行版,要用到的命令和注意事项都应该是一样的。这是 Systemd 的一个加分点:它消除了不同发行版之间许多细微且琐碎的区别。 + +在终端中输入 **ps ax | grep systemd**,看到第一行,其中的数字 **1** 表示它的进程号是1,也就是说它是 Linux 内核发起的第一个程序。因此,内核一旦检测完硬件并组织好了内存,就会运行 **/usr/lib/systemd/systemd** 可执行程序,这个程序会按顺序依次发起其他程序。(在还没有 Systemd 的日子里,内核会去运行 **/sbin/init**,随后这个程序会在名为 SysVinit 的系统中运行其余的各种启动脚本。) + +Systemd 的核心是一个叫*单元* (unit)的概念,它是一些存有关于服务(在运行在后台的程序),设备,挂载点,和操作系统其他方面信息的配置文件。Systemd 的其中一个目标就是简化这些事物之间的相互作用,因此如果你有程序需要在某个挂载点被创建或某个设备被接入后开始运行,Systemd 可以让这一切正常运作起来变得相当容易。(在没有 Systemd 的日子里,要使用脚本来把这些事情调配好,那可是相当丑陋的。)要列出您 Linux 系统上的所有单元,输入以下命令: + + systemctl list-unit-files + +现在,**systemctl** 是与 Systemd 交互的主要工具,它有不少选项。在单元列表中,您会注意到这儿有一些格式:被使能的单元显示为绿色,被禁用的显示为红色。标记为“static”的单元不能直接启用,它们是其他单元所依赖的对象。若要限制输出列表只包含服务,使用以下命令: + + systemctl list-unit-files --type=service + +注意,一个单元显示为“enabled”,并不等于对应的服务正在运行,而只能说明它可以被开启。要获得某个特定服务的信息,以 GDM (the Gnome Display Manager) 为例,输入以下命令: + + systemctl status gdm.service + +这条命令提供了许多有用的信息:一段人类可读的服务描述,单元配置文件的位置,启动的时间,进程号,以及它所从属的 CGroups (用以限制各组进程的资源开销)。 + +如果您去查看位于 **/usr/lib/systemd/system/gdm.service** 的单元配置文件,您可以看到多种选项,包括要被运行的二进制文件(“ExecStart”那一行),相冲突的其他单元(即不能同时进入运行的单元),以及需要在本单元执行前进入运行的单元(“After”那一行)。一些单元有附加的依赖选项,例如“Requires”(必要的依赖)和“Wants”(可选的依赖)。 + +此处另一个有趣的选项是: + + Alias=display-manager.service + +当您启动 **gdm.service** 后,您将可以通过 **systemctl status display-manager.service** 来查看它的状态。当您知道有*显示管理程序* (display manager)在运行并想对它做点什么,但您不关心那究竟是 GDM,KDM,XDM 还是什么别的显示管理程序时,这个选项会非常有用。 + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/status-large.jpg) + +**使用 systemctl status 命令后面跟一个单元名,来查看对应的服务有什么情况。** + +### “目标”锁定 ### + +如果您在 **/usr/lib/systemd/system** 目录中输入 **ls** 命令,您将看到各种以 **.target** 结尾的文件。一个*启动目标* (target)是一种将多个单元聚合在一起以致于将它们同时启动的方式。例如,对大多数类 Unix 操作系统而言有一种“多用户”状态,意思是系统已被成功启动,后台服务正在运行,并且已准备好让一个或多个用户登陆并工作——至少在文本模式下。(其他状态包括用于进行管理工作的单用户状态,以及用于机器关机的重启状态。) + +如果您打开 **multi-user.target** 文件一探究竟,您可能期待看到的是一个要被启动的单元列表。但您会发现这个文件内部几乎空空如也——其实,一个服务会通过 **WantedBy** 选项让自己成为启动目标的依赖。因此如果您去打开 **avahi-daemon.service**, **NetworkManager.service** 及其他 **.service** 文件看看,您将在 Install 段看到这一行: + + WantedBy=multi-user.target + +因此,切换到多用户启动目标会使能那些包含上述语句的单元。还有其他一些启动目标可用(例如 **emergency.target** 用于一个紧急情况使用的 shell,以及 **halt.target** 用于机器关机),您可以用以下方式轻松地在它们之间切换: + + systemctl isolate emergency.target + +在许多方面,这些都很像 SysVinit 中的*运行级* (runlevel),如文本模式的 **multi-user.target** 类似于第3运行级,**graphical.target** 类似于第5运行级,**reboot.target** 类似于第6运行级,诸如此类。 + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/unit-large.jpg) + +**与传统的脚本相比,单元配置文件也许看起来很陌生,但并不难以理解。** + +### 开启与停止 ### + +现在您也许陷入了沉思:我们已经看了这么多,但仍没看到如何停止和开启服务!这其实是有原因的。从外部看,Systemd 也许很复杂,像野兽一般难以驾驭。因此在您开始摆弄它之间,有必要从宏观的角度看看它是如何工作的。实际用来管理服务的命令非常简单: + + systemctl stop cups.service + systemctl start cups.service + +(若某个单元被禁用了,您可以先通过 **systemctl enable** 加该单元名的方式将其使能。这种做法会为该单元创建一个符号链接,并将其放置在当前启动目标的 .wants 目录下,这些 .wants 目录在**/etc/systemd/system** 文件夹中。) + +还有两个有用的命令是 **systemctl restart** 和 **systemctl reload**,后面接单元名。后者要求单元重新加载它的配置文件。Systemd 的绝大部分都有良好的文档,因此您可以查看手册 (**man systemctl**) 了解每条命令的细节。 + +> ### 定时器单元:取代 Cron ### +> +> 除了系统初始化和服务管理,Systemd 还染指其他方面。在很大程度上,它能够完成 **cron** 的工作,而且可以说是以更灵活的方式(并带有更易读的语法)。**cron** 是一个以规定时间间隔执行任务的程序——例如清楚临时文件,刷新缓存等。 +> +> 如果您再次进入 **/usr/lib/systemd/system** 目录,您会看到那儿有多个 **.timer** 文件。用 **less** 来查看这些文件,您会发现它们与 **.service** 和 **.target** 文件有着相似的结构,而区别在于 **[Timer]** 段。举个例子: +> +> [Timer] +> OnBootSec=1h +> OnUnitActiveSec=1w +> +> **OnBootSec** 选项告诉 Systemd 在系统启动一小时后启动这个单元。第二个选项的意思是:自那以后每周启动这个单元一次。关于定时器有大量选项您可以设置——输入 **man systemd.time** 查看完整列表。 +> +> Systemd 的时间精度默认为一分钟。也就是说,它会在设定时刻的一分钟内运行单元,但不一定精确到那一秒。这么做是基于电源管理方面的原因,但如果您需要一个没有任何延时且精确到毫秒的定时器,您可以添加以下一行: +> +> AccuracySec=1us +> +> 另外, **WakeSystem** 选项(可以被设置为 true 或 false)决定了定时器是否可以唤醒处于休眠状态的机器。 + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/systemd_gui-large.jpg) + +**存在一个 Systemd 的图形界面程序,即便它已有多年未被积极维护。** + +### 日志文件:向 journald 问声好 ### + +Systemd 的第二个主要部分是 journal 。这是个日志系统,类似于 syslog 但也有些显著区别。如果您是个 Unix 日志管理模式的 粉丝,准备好热血沸腾吧:这是个二进制日志,因此您不能使用常规的命令行文本处理工具来解析它。这个设计决定不出意料地在网上引起了激烈的争论,但它的确有些优点。例如,日志可以被更系统地组织,带有更多元数据,因此可以更容易地根据可执行文件名和进程号等过滤出信息。 + +要查看整个 journal,输入以下命令: + + journalctl + +像许多其他的 Systemd 命令一样,该命令将输出通过管道的方式引向 **less** 程序,因此您可以使用空格键向下滚动,“/”(斜杠)键查找,以及其他熟悉的快捷键。您也能在此看到少许颜色,像红色的警告及错误信息。 + +以上命令会输出很多信息。为了限制其只输出当前启动的消息,使用如下命令: + + journalctl -b + +这就是 Systemd 大放异彩的地方!您想查看自上次启动以来的全部消息吗?试试 **journalctl -b -1** 吧。再上一次的?用 **-2** 替换 **-1** 吧。那自某个具体时间,例如2014年10月24日16:38以来的呢? + + journalctl -b --since=”2014-10-24 16:38” + +即便您对二进制日志感到遗憾,那依然是个有用的特性,并且对许多系统管理员来说,构建类似的过滤器比起写正则表达式而言容易多了。 + +我们已经可以根据特定的时间来准确查找日志了,那可以根据特定程序吗?对单元而言,试试这个: + + journalctl -u gdm.service + +(注意:这是个查看 X server 产生的日志的好办法。)那根据特定的进程号? + + journalctl _PID=890 + +您甚至可以请求只看某个可执行文件产生的消息: + + journalctl /usr/bin/pulseaudio + +若您想将输出的消息限制在某个优先级,可以使用 **-p** 选项。该选项参数为 0 的话只会显示紧急消息(也就是说,是时候向 **\$DEITY** 祈求保佑了),为 7 的话会显示所有消息,包括调试消息。请查看手册 (**man journalctl**) 获取更多关于优先级的信息。 + +值得指出的是,您也可以将多个选项结合在一起,若想查看在当前启动中由 GDM 服务输出的优先级数小于等于 3 的消息,请使用下述命令: + + journalctl -u gdm.service -p 3 -b + +最后,如果您仅仅想打开一个随 journal 持续更新的终端窗口,就像在没有 Systemd 时使用 tail 命令实现的那样,输入 **journalctl -f** 就好了。 + +![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/journal-large.jpg) + +**二进制日志并不流行,但 journal 的确有它的优点,如非常方便的信息查找及过滤。** + +> ### 没有 Systemd 的生活?### +> +> 如果您就是完全不能接收 Systemd,您仍然有一些主流发现版中的选择。尤其是 Slackware,作为历史最为悠久的发行版,目前还没有做出改变,但它的主要开发者并没有将其从未来规划中移除。一些不出名的发行版也在坚持使用 SysVinit 。 +> +> 但这又将持续多久呢?Gnome 正越来越依赖于 Systemd,其他的主流桌面环境也会步其后尘。这也是引起 BSD 社区一阵恐慌的原因:Systemd 与 Linux 内核紧密相连,导致在某种程度上,桌面环境正变得越来越不可移植。一种折中的解决方案也许会以 Uselessd ([http://uselessd.darknedgy.net][3]) 的形式到来:一种裁剪版的 Systemd,纯粹专注于启动和监控进程,而不消耗整个基础系统。 +> +> ![Image](http://www.linuxvoice.com/wp-content/uploads/2015/10/gentoo-large.jpg) +> +> 若您不喜欢 Systemd,可以尝试一下 Gentoo 发行版,它将 Systemd 作为初始化工具的一种选择,但并不强制用户使用 Systemd。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxvoice.com/linux-101-get-the-most-out-of-systemd/ + +作者:[Mike Saunders][a] +译者:[Ricky-Gong](https://github.com/Ricky-Gong) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://www.linuxvoice.com/author/mike/ +[1]:http://tinyurl.com/poorlennart +[2]:http://tinyurl.com/m2e7mv8 +[3]:http://uselessd.darknedgy.net/ From b7f2c958639ea34a66812fe93295ff915126c101 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 19 Nov 2015 00:50:57 +0800 Subject: [PATCH 2489/2517] translating by ezio 20151104 How to Install Redis Server on CentOS 7.md --- .../tech/20151104 How to Install Redis Server on CentOS 7.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151104 How to Install Redis Server on CentOS 7.md b/sources/tech/20151104 How to Install Redis Server on CentOS 7.md index 6cb66e4f3e..aca1f1be71 100644 --- a/sources/tech/20151104 How to Install Redis Server on CentOS 7.md +++ b/sources/tech/20151104 How to Install Redis Server on CentOS 7.md @@ -1,3 +1,5 @@ +translating by ezio + How to Install Redis Server on CentOS 7 ================================================================================ Hi everyone, today Redis is the subject of our article, we are going to install it on CentOS 7. Build sources files, install the binaries, create and install files. After installing its components, we will set its configuration as well as some operating system parameters to make it more reliable and faster. @@ -233,4 +235,4 @@ via: http://linoxide.com/storage/install-redis-server-centos-7/ [3]:https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt [4]:http://redis.io/topics/replication [5]:http://redis.io/topics/sentinel -[6]:http://redis.io/topics/partitioning \ No newline at end of file +[6]:http://redis.io/topics/partitioning From d38dc492d80d9ab4fb7d736b090a0288b4a9e4af Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 19 Nov 2015 00:52:17 +0800 Subject: [PATCH 2490/2517] translating by ezio 20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md --- ...ress of a Linux Command Line Operation Using PV Command.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md b/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md index 780e783554..8ecf772a21 100644 --- a/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md +++ b/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md @@ -1,3 +1,5 @@ +translating by ezio + How to Monitor the Progress of a Linux Command Line Operation Using PV Command ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/11/pv-featured-1.jpg) @@ -76,4 +78,4 @@ via: https://www.maketecheasier.com/monitor-progress-linux-command-line-operatio [a]:https://www.maketecheasier.com/author/himanshu/ [1]:http://linux.die.net/man/1/pv -[2]:http://linux.die.net/man/1/dialog \ No newline at end of file +[2]:http://linux.die.net/man/1/dialog From 66f5b3bed2beab50b1738eeb8bfd2c35f0214b42 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 19 Nov 2015 10:24:53 +0800 Subject: [PATCH 2491/2517] translating --- ...151117 N1--The Next Generation Open Source Email Client.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20151117 N1--The Next Generation Open Source Email Client.md b/sources/share/20151117 N1--The Next Generation Open Source Email Client.md index 6cabff37be..51916730af 100644 --- a/sources/share/20151117 N1--The Next Generation Open Source Email Client.md +++ b/sources/share/20151117 N1--The Next Generation Open Source Email Client.md @@ -1,3 +1,5 @@ +translating----geekpi + N1: The Next Generation Open Source Email Client ================================================================================ ![N1 Open Source email client](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/N1-email-client.png) @@ -44,4 +46,4 @@ via: http://itsfoss.com/n1-open-source-email-client/ [3]:https://help.gnome.org/users/evolution/stable/ [4]:https://nylas.com/N1/ [5]:http://itsfoss.com/atom-stable-released/ -[6]:https://invite.nylas.com/download \ No newline at end of file +[6]:https://invite.nylas.com/download From c0690718062a9ae05dfb65b88c01f3f2a70e713c Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 19 Nov 2015 10:45:29 +0800 Subject: [PATCH 2492/2517] translated --- ...ext Generation Open Source Email Client.md | 49 ------------------- ...ext Generation Open Source Email Client.md | 48 ++++++++++++++++++ 2 files changed, 48 insertions(+), 49 deletions(-) delete mode 100644 sources/share/20151117 N1--The Next Generation Open Source Email Client.md create mode 100644 translated/share/20151117 N1--The Next Generation Open Source Email Client.md diff --git a/sources/share/20151117 N1--The Next Generation Open Source Email Client.md b/sources/share/20151117 N1--The Next Generation Open Source Email Client.md deleted file mode 100644 index 51916730af..0000000000 --- a/sources/share/20151117 N1--The Next Generation Open Source Email Client.md +++ /dev/null @@ -1,49 +0,0 @@ -translating----geekpi - -N1: The Next Generation Open Source Email Client -================================================================================ -![N1 Open Source email client](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/N1-email-client.png) - -When we talk of email clients for Linux, generally the name of [Thunderbird][1], [Geary][2] and [Evolution][3] come to our mind. To challenge the authority of these big players, a new open source email client is entering the market. - -### Design plus features ### - -[N1][4] is the next generation open source email client which has equal focus on design and features. An open source software, N1 is available for Linux and Mac OS X with a Windows desktop application in the pipeline. - -N1 promotes itself as “extensible open source email client” because it includes a JavaScript plugin architecture that enables anyone to create powerful new features. Extensibility is a heavily popular feature that helped [open source code editor Atom][5] to gain popularity. N1 is also putting emphasis on it. - -Apart from extensibility, N1 has also focused on the looks and design of the application. A look at the screenshot of N1 is a good enough example: - -![N1 Open Source email client on Mac OS X](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/N1-email-client-1.jpeg) - -N1 email client on Mac OS X. Picture Credit: N1 - -In other features, N1 is compatible with hundreds of email providers, including Gmail, Yahoo, iCloud, Microsoft Exchange etc. Desktop app provides offline capability. - -### For now, invite only ### - -I don’t know why everyone is following OnePlus’ “exclusive invite only” marketing strategy? At present, N1 desktop app can be downloaded only when you are invited. You can request an invite using the link below. N1 team will email you the download link in a few days. - -- [Request an invite for N1][6] - -### Intriguing? ### - -I am not a big fan of desktop email clients, but N1 has definitely caught my attention and I am willing to give it a try. How about you? - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/n1-open-source-email-client/ - -作者:[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]:https://www.mozilla.org/en-US/thunderbird/ -[2]:https://wiki.gnome.org/Apps/Geary -[3]:https://help.gnome.org/users/evolution/stable/ -[4]:https://nylas.com/N1/ -[5]:http://itsfoss.com/atom-stable-released/ -[6]:https://invite.nylas.com/download diff --git a/translated/share/20151117 N1--The Next Generation Open Source Email Client.md b/translated/share/20151117 N1--The Next Generation Open Source Email Client.md new file mode 100644 index 0000000000..ef2e031afa --- /dev/null +++ b/translated/share/20151117 N1--The Next Generation Open Source Email Client.md @@ -0,0 +1,48 @@ +N1:下一代开源邮件客户端 +================================================================================ +![N1 Open Source email client](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/N1-email-client.png) + +[Evolution][3]。为了挑战这些大咖的权威,一个新的邮件客户端正在进入市场。 + +### 设计和功能 ### + +[N1][4]是一个同时聚焦设计和功能的下一代开源邮件客户端。作为一个开源软件,N1同时可以在Linux和Mac OSX上获得到,Windows的版本还在开发中。 + +N1宣传它自己为“可扩展的开源邮件客户端”,因为它包含了Javascript插件架构,它可以让任何人创建新的功能。可扩展是一个非常流行的功能,它帮助[开源编辑器Atom][5]变得流行。N1同样强调了它。 + +除了可扩展性,N1同样着重设计了程序的外观。下面N1的截图就是个很好的例子: + +![N1 Open Source email client on Mac OS X](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/N1-email-client-1.jpeg) + +Mac OS X上的N1客户端。图片来自:N1 + +除了这个功能,N1兼容上百的邮件提供商包括Gmail、Yahoo、iCloud、Microsoft Exchange等等、桌面程序提供离线能力。 + +### 目前只能邀请使用 ### + +我不知道为什么没人都选择了OnePlus的‘只能邀请使用’的市场策略。目前,N1桌面端只能被邀请才能下载。你可以用下面的链接请求一个邀请。N1团队会在几天内邮件给你下载链接。 + + +- [请求N1邀请][6] + +### 感兴趣了么? ### + +我并不是桌面邮件客户端的粉丝,但是N1的确引起了我的兴趣想要试试。你呢? + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/n1-open-source-email-client/ + +作者:[Abhishek][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:https://www.mozilla.org/en-US/thunderbird/ +[2]:https://wiki.gnome.org/Apps/Geary +[3]:https://help.gnome.org/users/evolution/stable/ +[4]:https://nylas.com/N1/ +[5]:http://itsfoss.com/atom-stable-released/ +[6]:https://invite.nylas.com/download From 122f93d9044b4a062496cb02e881dfbc8f7e9947 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Thu, 19 Nov 2015 15:28:06 +0800 Subject: [PATCH 2493/2517] =?UTF-8?q?22151119-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nd Hello World Containers is Hard Stuff.md | 328 ++++++++++++++++++ 1 file changed, 328 insertions(+) create mode 100644 sources/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md diff --git a/sources/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md b/sources/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md new file mode 100644 index 0000000000..0bdd6abadb --- /dev/null +++ b/sources/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md @@ -0,0 +1,328 @@ +Going Beyond Hello World Containers is Hard Stuff +================================================================================ +In [my previous post][1], I provided the basic concepts behind Linux container technology. I wrote as much for you as I did for me. Containers are new to me. And I figured having the opportunity to blog about the subject would provide the motivation to really learn the stuff. + +I intend to learn by doing. First get the concepts down, then get hands-on and write about it as I go. I assumed there must be a lot of Hello World type stuff out there to give me up to speed with the basics. Then, I could take things a bit further and build a microservice container or something. + +I mean, it can’t be that hard, right? + +Wrong. + +Maybe it’s easy for someone who spends significant amount of their life immersed in operations work. But for me, getting started with this stuff turned out to be hard to the point of posting my frustrations to Facebook... + +But, there is good news: I got it to work! And it’s always nice being able to make lemonade from lemons. So I am going to share the story of how I made my first microservice container with you. Maybe my pain will save you some time. + +If you've ever found yourself in a situation like this, fear not: folks like me are here to deal with the problems so you don't have to! + +Let’s begin. + +### A Thumbnail Micro Service ### + +The microservice I designed was simple in concept. Post a digital image in JPG or PNG format to an HTTP endpoint and get back a a 100px wide thumbnail. + +Here’s what that looks like: + +![container-diagram-0](https://deis.com/images/blog-images/containers-hard-0.png) + +I decide to use a NodeJS for my code and version of [ImageMagick][2] to do the thumbnail transformation. + +I did my first version of the service, using the logic shown here: + +![container-diagram-1](https://deis.com/images/blog-images/containers-hard-1.png) + +I download the [Docker Toolbox][3] which installs an the Docker Quickstart Terminal. Docker Quickstart Terminal makes creating containers easier. The terminal fires up a Linux virtual machine that has Docker installed, allowing you to run Docker commands from within a terminal. + +In my case, I am running on OS X. But there’s a Windows version too. + +I am going to use Docker Quickstart Terminal to build a container image for my microservice and run a container from that image. + +The Docker Quickstart Terminal runs in your regular terminal, like so: + +![container-diagram-2](https://deis.com/images/blog-images/containers-hard-2.png) + +### The First Little Problem and the First Big Problem ### + +So I fiddled around with NodeJS and ImageMagick and I got the service to work on my local machine. + +Then, I created the Dockerfile, which is the configuration script Docker uses to build your container. (I’ll go more into builds and Dockerfile more later on.) + +Here’s the build command I ran on the Docker Quickstart Terminal: + + $ docker build -t thumbnailer:0.1 + +I got this response: + + docker: "build" requires 1 argument. + +Huh. + +After 15 minutes I realized: I forgot to put a period . as the last argument! + +It needs to be: + + $ docker build -t thumbnailer:0.1 . + +But this wasn’t the end of my problems. + +I got the image to build and then I typed [the the `run` command][4] on the Docker Quickstart Terminal to fire up a container based on the image, called `thumbnailer:0.1`: + + $ docker run -d -p 3001:3000 thumbnailer:0.1 + +The `-p 3001:3000` argument makes it so the NodeJS microservice running on port 3000 within the container binds to port 3001 on the host virtual machine. + +Looks so good so far, right? + +Wrong. Things are about to get pretty bad. + +I determined the IP address of the virtual machine created by Docker Quickstart Terminal by running the `docker-machine` command: + + $ docker-machine ip default + +This returns the IP address of the default virtual machine, the one that is run under the Docker Quickstart Terminal. For me, this IP address was 192.168.99.100. + +I browsed to http://192.168.99.100:3001/ and got the file upload page I built: + +![container-diagram-3](https://deis.com/images/blog-images/containers-hard-3.png) + +I selected a file and clicked the Upload Image button. + +But it didn’t work. + +The terminal is telling me it can’t find the `/upload` directory my microservice requires. + +Now, keep in mind, I had been at this for about a day—between the fiddling and research. I’m feeling a little frustrated by this point. + +Then, a brain spark flew. Somewhere along the line remembered reading a microservice should not do any data persistence on its own! Saving data should be the job of another service. + +So what if the container can’t find the `/upload` directory? The real issue is: my microservice has a fundamentally flawed design. + +Let’s take another look: + +![container-diagram-4](https://deis.com/images/blog-images/containers-hard-4.png) + +Why am I saving a file to disk? Microservices are supposed to be fast. Why not do all my work in memory? Using memory buffers will make the "I can’t find no stickin’ directory" error go away and will increase the performance of my app dramatically. + +So that’s what I did. And here’s what the plan was: + +![container-diagram-5](https://deis.com/images/blog-images/containers-hard-5.png) + +Here’s the NodeJS I wrote to do all the in-memory work for creating a thumbnail: + + // Bind to the packages + var express = require('express'); + var router = express.Router(); + var path = require('path'); // used for file path + var im = require("imagemagick"); + + // Simple get that allows you test that you can access the thumbnail process + router.get('/', function (req, res, next) { + res.status(200).send('Thumbnailer processor is up and running'); + }); + + // This is the POST handler. It will take the uploaded file and make a thumbnail from the + // submitted byte array. I know, it's not rocket science, but it serves a purpose + router.post('/', function (req, res, next) { + req.pipe(req.busboy); + req.busboy.on('file', function (fieldname, file, filename) { + var ext = path.extname(filename) + + // Make sure that only png and jpg is allowed + if(ext.toLowerCase() != '.jpg' && ext.toLowerCase() != '.png'){ + res.status(406).send("Service accepts only jpg or png files"); + } + + var bytes = []; + + // put the bytes from the request into a byte array + file.on('data', function(data) { + for (var i = 0; i < data.length; ++i) { + bytes.push(data[i]); + } + console.log('File [' + fieldname + '] got bytes ' + bytes.length + ' bytes'); + }); + + // Once the request is finished pushing the file bytes into the array, put the bytes in + // a buffer and process that buffer with the imagemagick resize function + file.on('end', function() { + var buffer = new Buffer(bytes,'binary'); + console.log('Bytes got ' + bytes.length + ' bytes'); + + //resize + im.resize({ + srcData: buffer, + height: 100 + }, function(err, stdout, stderr){ + if (err){ + throw err; + } + // get the extension without the period + var typ = path.extname(filename).replace('.',''); + res.setHeader("content-type", "image/" + typ); + res.status(200); + // send the image back as a response + res.send(new Buffer(stdout,'binary')); + }); + }); + }); + }); + + module.exports = router; + +Okay, so we’re back on track and everything is hunky dory on my local machine. I go to sleep. + +But, before I do I test the microservice code running as standard Node app on localhost... + +![Containers Hard](https://deis.com/images/blog-images/containers-hard-6.png) + +It works fine. Now all I needed to do was get it working in a container. + +The next day I woke up, grabbed some coffee, and built an image—not forgetting to put in the period! + + $ docker build -t thumbnailer:01 . + +I am building from the root directory of my thumbnailer project. The build command uses the Dockerfile that is in the root directory. That’s how it goes: put the Dockerfile in the same place you want to run build and the Dockerfile will be used by default. + +Here is the text of the Dockerfile I was using: + + FROM ubuntu:latest + MAINTAINER bob@CogArtTech.com + + RUN apt-get update + RUN apt-get install -y nodejs nodejs-legacy npm + RUN apt-get install imagemagick libmagickcore-dev libmagickwand-dev + RUN apt-get clean + + COPY ./package.json src/ + + RUN cd src && npm install + + COPY . /src + + WORKDIR src/ + + CMD npm start + +What could go wrong? + +### The Second Big Problem ### + +I ran the `build` command and I got this error: + + Do you want to continue? [Y/n] Abort. + + The command '/bin/sh -c apt-get install imagemagick libmagickcore-dev libmagickwand-dev' returned a non-zero code: 1 + +I figured something was wrong with the microservice. I went back to my machine, fired up the service on localhost, and uploaded a file. + +Then I got this error from NodeJS: + + Error: spawn convert ENOENT + +What’s going on? This worked the other night! + +I searched and searched, for every permutation of the error I could think of. After about four hours of replacing different node modules here and there, I figured: why not restart the machine? + +I did. And guess what? The error went away! + +Go figure. + +### Putting the Genie Back in the Bottle ### + +So, back to the original quest: I needed to get this build working. + +I removed all of the containers running on the VM, using [the `rm` command][5]: + + $ docker rm -f $(docker ps -a -q) + +The `-f` flag here force removes running images. + +Then I removed all of my Docker images, using [the `rmi` command][6]: + + $ docker rmi if $(docker images | tail -n +2 | awk '{print $3}') + +I go through the whole process of rebuilding the image, installing the container and try to get the microservice running. Then after about an hour of self-doubt and accompanying frustration, I thought to myself: maybe this isn’t a problem with the microservice. + +So, I looked that the the error again: + + Do you want to continue? [Y/n] Abort. + + The command '/bin/sh -c apt-get install imagemagick libmagickcore-dev libmagickwand-dev' returned a non-zero code: 1 + +Then it hit me: the build is looking for a Y input from the keyboard! But, this is a non-interactive Dockerfile script. There is no keyboard. + +I went back to the Dockerfile, and there it was: + + RUN apt-get update + RUN apt-get install -y nodejs nodejs-legacy npm + RUN apt-get install imagemagick libmagickcore-dev libmagickwand-dev + RUN apt-get clean + +The second `apt-get` command is missing the `-y` flag which causes "yes" to be given automatically where usually it would be prompted for. + +I added the missing `-y` to the command: + + RUN apt-get update + RUN apt-get install -y nodejs nodejs-legacy npm + RUN apt-get install -y imagemagick libmagickcore-dev libmagickwand-dev + RUN apt-get clean + +And guess what: after two days of trial and tribulation, it worked! Two whole days! + +So, I did my build: + + $ docker build -t thumbnailer:0.1 . + +I fired up the container: + + $ docker run -d -p 3001:3000 thumbnailer:0.1 + +Got the IP address of the Virtual Machine: + + $ docker-machine ip default + +Went to my browser and entered http://192.168.99.100:3001/ into the address bar. + +The upload page loaded. + +I selected an image, and this is what I got: + +![container-diagram-7](https://deis.com/images/blog-images/containers-hard-7.png) + +It worked! + +Inside a container, for the first time! + +### So What Does It All Mean? ### + +A long time ago, I accepted the fact when it comes to tech, sometimes even the easy stuff is hard. Along with that, I abandoned the desire to be the smartest guy in the room. Still, the last few days trying get basic competency with containers has been, at times, a journey of self doubt. + +But, you wanna know something? It’s 2 AM on an early morning as I write this, and every nerve wracking hour has been worth it. Why? Because you gotta put in the time. This stuff is hard and it does not come easy for anyone. And don’t forget: you’re learning tech and tech runs the world! + +P.S. Check out this two part video of Hello World containers, check out [Raziel Tabib’s][7] excellent work in this video... + +注:youtube视频 + + +And don't miss part two... + +注:youtube视频 + + +-------------------------------------------------------------------------------- + +via: https://deis.com/blog/2015/beyond-hello-world-containers-hard-stuff + +作者:[Bob Reselman][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://deis.com/blog +[1]:http://deis.com/blog/2015/developer-journey-linux-containers +[2]:https://github.com/rsms/node-imagemagick +[3]:https://www.docker.com/toolbox +[4]:https://docs.docker.com/reference/commandline/run/ +[5]:https://docs.docker.com/reference/commandline/rm/ +[6]:https://docs.docker.com/reference/commandline/rmi/ +[7]:http://twitter.com/RazielTabib \ No newline at end of file From 44d038aae0ea965fe4331f4c6778c85419b8b1cf Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 19 Nov 2015 18:17:40 +0800 Subject: [PATCH 2494/2517] Update 20151104 How to Install Redis Server on CentOS 7.md --- .../20151104 How to Install Redis Server on CentOS 7.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/tech/20151104 How to Install Redis Server on CentOS 7.md b/sources/tech/20151104 How to Install Redis Server on CentOS 7.md index aca1f1be71..efea02a5fa 100644 --- a/sources/tech/20151104 How to Install Redis Server on CentOS 7.md +++ b/sources/tech/20151104 How to Install Redis Server on CentOS 7.md @@ -2,12 +2,14 @@ translating by ezio How to Install Redis Server on CentOS 7 ================================================================================ -Hi everyone, today Redis is the subject of our article, we are going to install it on CentOS 7. Build sources files, install the binaries, create and install files. After installing its components, we will set its configuration as well as some operating system parameters to make it more reliable and faster. + +大家好,Redis 是本文的主题,我们将要在CentOS 7 上安装它。编译源代码,安装二进制文件,创建、安装文件。然后安装组建,我们还会配置redis ,就像配置操作系统参数一样,目标就是让redis 运行的更加可靠和快速。 ![Runnins Redis](http://blog.linoxide.com/wp-content/uploads/2015/10/run-redis-standalone.jpg) -Redis server +Redis 服务器 +Redis 是一个开源的多平台数据存储软件,使用ANSI C 编写,直接在内存使用数据集,这使得它得以实现非常高的效率。Redis 支持多种编程语言,包括Lua, C, Java, Python, Perl, PHP 和其他很多语言。redis 的代码量很小,只有约3万行,它只做很少的事,但是做的很好。尽管你在内存里工作,但是数据持久化问题还是存在的,而且这也有一个很合理的理由来支撑: Redis is an open source multi-platform data store written in ANSI C, that uses datasets directly from memory achieving extremely high performance. It supports various programming languages, including Lua, C, Java, Python, Perl, PHP and many others. It is based on simplicity, about 30k lines of code that do "few" things, but do them well. Despite you work on memory, persistence may exist and it has a fairly reasonable support for high availability and clustering, which does good in keeping your data safe. ### Building Redis ### From 23330c69384881179ded4d0e8e73a9807cfff967 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 19 Nov 2015 21:01:56 +0800 Subject: [PATCH 2495/2517] Update 20151104 How to Install Redis Server on CentOS 7.md --- ...How to Install Redis Server on CentOS 7.md | 70 +++++++++---------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/sources/tech/20151104 How to Install Redis Server on CentOS 7.md b/sources/tech/20151104 How to Install Redis Server on CentOS 7.md index efea02a5fa..b2ccd85183 100644 --- a/sources/tech/20151104 How to Install Redis Server on CentOS 7.md +++ b/sources/tech/20151104 How to Install Redis Server on CentOS 7.md @@ -1,130 +1,128 @@ translating by ezio -How to Install Redis Server on CentOS 7 + ================================================================================ -大家好,Redis 是本文的主题,我们将要在CentOS 7 上安装它。编译源代码,安装二进制文件,创建、安装文件。然后安装组建,我们还会配置redis ,就像配置操作系统参数一样,目标就是让redis 运行的更加可靠和快速。 +大家好, 本文的主题是Redis,我们将要在CentOS 7 上安装它。编译源代码,安装二进制文件,创建、安装文件。然后安装组建,我们还会配置redis ,就像配置操作系统参数一样,目标就是让redis 运行的更加可靠和快速。 ![Runnins Redis](http://blog.linoxide.com/wp-content/uploads/2015/10/run-redis-standalone.jpg) Redis 服务器 -Redis 是一个开源的多平台数据存储软件,使用ANSI C 编写,直接在内存使用数据集,这使得它得以实现非常高的效率。Redis 支持多种编程语言,包括Lua, C, Java, Python, Perl, PHP 和其他很多语言。redis 的代码量很小,只有约3万行,它只做很少的事,但是做的很好。尽管你在内存里工作,但是数据持久化问题还是存在的,而且这也有一个很合理的理由来支撑: -Redis is an open source multi-platform data store written in ANSI C, that uses datasets directly from memory achieving extremely high performance. It supports various programming languages, including Lua, C, Java, Python, Perl, PHP and many others. It is based on simplicity, about 30k lines of code that do "few" things, but do them well. Despite you work on memory, persistence may exist and it has a fairly reasonable support for high availability and clustering, which does good in keeping your data safe. +Redis 是一个开源的多平台数据存储软件,使用ANSI C 编写,直接在内存使用数据集,这使得它得以实现非常高的效率。Redis 支持多种编程语言,包括Lua, C, Java, Python, Perl, PHP 和其他很多语言。redis 的代码量很小,只有约3万行,它只做很少的事,但是做的很好。尽管你在内存里工作,但是对数据持久化的需求还是存在的,而redis 的可靠性就很高,同时也支持集群,这儿些可以很好的保证你的数据安全。 -### Building Redis ### +### 构建 Redis ### -There is no official RPM package available, we need to build it from sources, in order to do this you will need install Make and GCC. +redis 目前没有官方RPM 安装包,我们需要从牙UN代码编译,而为了要编译就需要安装Make 和GCC。 -Install GNU Compiler Collection and Make with yum if it is not already installed +如果没有安装过GCC 和Make,那么就使用yum 安装。 yum install gcc make -Download the tarball from [redis download page][1]. +从[官网][1]下载tar 压缩包。 curl http://download.redis.io/releases/redis-3.0.4.tar.gz -o redis-3.0.4.tar.gz -Extract the tarball contents +解压缩。 tar zxvf redis-3.0.4.tar.gz -Enter Redis the directory we have extracted +进入解压后的目录。 cd redis-3.0.4 -Use Make to build the source files +使用Make 编译源文件。 make -### Install ### +### 安装 ### -Enter on the src directory +进入源文件的目录。 cd src -Copy Redis server and client to /usr/local/bin +复制 Redis server 和 client 到 /usr/local/bin cp redis-server redis-cli /usr/local/bin -Its good also to copy sentinel, benchmark and check as well. +最好也把sentinel,benchmark 和check 复制过去。 cp redis-sentinel redis-benchmark redis-check-aof redis-check-dump /usr/local/bin -Make Redis config directory +创建redis 配置文件夹。 mkdir /etc/redis -Create a working and data directory under /var/lib/redis +在`/var/lib/redis` 下创建有效的保存数据的目录 mkdir -p /var/lib/redis/6379 -#### System parameters #### +#### 系统参数 #### -In order to Redis work correctly you need to set some kernel options +为了让redis 正常工作需要配置一些内核参数。 -Set the vm.overcommit_memory to 1, which means always, this will avoid data to be truncated, take a look [here][2] for more. +配置vm.overcommit_memory 为1,它的意思是一直避免数据被截断,详情[见此][2]. sysctl -w vm.overcommit_memory=1 -Change the maximum of backlog connections some value higher than the value on tcp-backlog option of redis.conf, which defaults to 511. You can find more on sysctl based ip networking "tunning" on [kernel.org][3] website. +修改backlog 连接数的最大值超过redis.conf 中的tcp-backlog 值,即默认值511。你可以在[kernel.org][3] 找到更多有关基于sysctl 的ip 网络隧道的信息。 sysctl -w net.core.somaxconn=512. -Disable transparent huge pages support, that is known to cause latency and memory access issues with Redis. +禁止支持透明大页,,因为这会造成redis 使用过程产生延时和内存访问问题。 echo never > /sys/kernel/mm/transparent_hugepage/enabled ### redis.conf ### +Redis.conf 是redis 的配置文件,然而你会看到这个文件的名字是6379.conf ,而这个数字就是redis 监听的网络端口。这个名字是告诉你可以运行超过一个redis 实例。 -Redis.conf is the Redis configuration file, however you will see the file named as 6379.conf here, where the number is the same as the network port is listening to. This name is recommended if you are going to run more than one Redis instance. - -Copy sample redis.conf to **/etc/redis/6379.conf**. +复制redis.conf 的示例到 **/etc/redis/6379.conf**. cp redis.conf /etc/redis/6379.conf -Now edit the file and set at some of its parameters. +现在编辑这个文件并且配置参数。 vi /etc/redis/6379.conf -#### daemonize #### +#### 守护程序 #### -Set daemonize to no, systemd need it to be in foreground, otherwise Redis will suddenly die. +设置daemonize 为no,systemd 需要它运行在前台,否则redis 会突然挂掉。 daemonize no #### pidfile #### -Set the pidfile to redis_6379.pid under /var/run. +设置pidfile 为/var/run/redis_6379.pid。 pidfile /var/run/redis_6379.pid #### port #### -Change the network port if you are not going to use the default +如果不准备用默认端口,可以修改。 port 6379 #### loglevel #### -Set your loglevel. +设置日志级别。 loglevel notice #### logfile #### -Set the logfile to /var/log/redis_6379.log +修改日志文件路径。 logfile /var/log/redis_6379.log #### dir #### -Set the directory to /var/lib/redis/6379 +设置目录为 /var/lib/redis/6379 dir /var/lib/redis/6379 -### Security ### +### 安全 ### -Here are some actions that you can take to enforce the security. +下面有几个操作可以提高安全性。 #### Unix sockets #### @@ -226,7 +224,7 @@ That's enough to start, with these settings you will be able to deploy Redis ser via: http://linoxide.com/storage/install-redis-server-centos-7/ 作者:[Carlos Alberto][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ezio](https://github.com/oska874) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 841446e4287e85b4ed8a90a37ee6058ea6c7e255 Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Thu, 19 Nov 2015 21:44:28 +0800 Subject: [PATCH 2496/2517] =?UTF-8?q?=E5=B7=B2=E6=A0=A1=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...he Next Generation Open Source Email Client.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/translated/share/20151117 N1--The Next Generation Open Source Email Client.md b/translated/share/20151117 N1--The Next Generation Open Source Email Client.md index ef2e031afa..6ffe067ef6 100644 --- a/translated/share/20151117 N1--The Next Generation Open Source Email Client.md +++ b/translated/share/20151117 N1--The Next Generation Open Source Email Client.md @@ -2,13 +2,14 @@ N1:下一代开源邮件客户端 ================================================================================ ![N1 Open Source email client](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/N1-email-client.png) -[Evolution][3]。为了挑战这些大咖的权威,一个新的邮件客户端正在进入市场。 +当我们谈论到Linux中的邮件客户端,通常上 Thunderbird、Geary 和 [Evolution][3] 会出现在我们的脑海。作为对这些大咖们的挑战,一款新的开源邮件客户端正在涌入市场。 + ### 设计和功能 ### -[N1][4]是一个同时聚焦设计和功能的下一代开源邮件客户端。作为一个开源软件,N1同时可以在Linux和Mac OSX上获得到,Windows的版本还在开发中。 +[N1][4]是一个同时聚焦设计和功能的下一代开源邮件客户端。作为一个开源软件,N1目前支持 Linux 和 Mac OS X,Windows的版本还在开发中。 -N1宣传它自己为“可扩展的开源邮件客户端”,因为它包含了Javascript插件架构,它可以让任何人创建新的功能。可扩展是一个非常流行的功能,它帮助[开源编辑器Atom][5]变得流行。N1同样强调了它。 +N1宣传它自己为“可扩展的开源邮件客户端”,因为它包含了 Javascript 插件架构,任何人都可以为它创建强大的新功能。可扩展是一个非常流行的功能,它帮助[开源编辑器Atom][5]变得流行。N1同样把重点放在了可扩展上面。 除了可扩展性,N1同样着重设计了程序的外观。下面N1的截图就是个很好的例子: @@ -16,18 +17,18 @@ N1宣传它自己为“可扩展的开源邮件客户端”,因为它包含了 Mac OS X上的N1客户端。图片来自:N1 -除了这个功能,N1兼容上百的邮件提供商包括Gmail、Yahoo、iCloud、Microsoft Exchange等等、桌面程序提供离线能力。 +除了这个功能,N1兼容上百的邮件提供商包括Gmail、Yahoo、iCloud、Microsoft Exchange等等,桌面应用提供离线功能。 ### 目前只能邀请使用 ### -我不知道为什么没人都选择了OnePlus的‘只能邀请使用’的市场策略。目前,N1桌面端只能被邀请才能下载。你可以用下面的链接请求一个邀请。N1团队会在几天内邮件给你下载链接。 +我不知道为什么每个人都选择了 OnePlus 的‘只能邀请使用’的市场策略。目前,N1桌面端只能被邀请才能下载。你可以用下面的链接请求一个邀请。N1团队会在几天内邮件给你下载链接。 - [请求N1邀请][6] ### 感兴趣了么? ### -我并不是桌面邮件客户端的粉丝,但是N1的确引起了我的兴趣想要试试。你呢? +我并不是桌面邮件客户端的粉丝,但是 N1 的确引起了我的兴趣,让我想要试一试。你呢? -------------------------------------------------------------------------------- @@ -35,7 +36,7 @@ via: http://itsfoss.com/n1-open-source-email-client/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[Caroline](https://github.com/carolinewuyan) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 75f5dadee4ff9ecfa3441dd1296f527db06fdb31 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 19 Nov 2015 21:45:55 +0800 Subject: [PATCH 2497/2517] Update 20151104 How to Install Redis Server on CentOS 7.md --- ...How to Install Redis Server on CentOS 7.md | 56 +++++++++---------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/sources/tech/20151104 How to Install Redis Server on CentOS 7.md b/sources/tech/20151104 How to Install Redis Server on CentOS 7.md index b2ccd85183..cde50aef87 100644 --- a/sources/tech/20151104 How to Install Redis Server on CentOS 7.md +++ b/sources/tech/20151104 How to Install Redis Server on CentOS 7.md @@ -1,6 +1,4 @@ -translating by ezio - - +如何在CentOS 7上安装Redis 服务 ================================================================================ 大家好, 本文的主题是Redis,我们将要在CentOS 7 上安装它。编译源代码,安装二进制文件,创建、安装文件。然后安装组建,我们还会配置redis ,就像配置操作系统参数一样,目标就是让redis 运行的更加可靠和快速。 @@ -126,33 +124,33 @@ Redis.conf 是redis 的配置文件,然而你会看到这个文件的名字是 #### Unix sockets #### -In many cases, the client application resides on the same machine as the server, so there is no need to listen do network sockets. If this is the case you may want to use unix sockets instead, for this you need to set the **port** option to 0, and then enable unix sockets with the following options. +在很多情况下,客户端程序和服务器端程序运行在同一个机器上,所以不需要监听网络上的socket。如果这和你的使用情况类似,你就可以使用unix socket 替代网络socket ,为此你需要配置**port** 为0,然后配置下面的选项来使能unix socket。 -Set the path to the socket file +设置unix socket 的套接字文件。 unixsocket /tmp/redis.sock -Set restricted permission to the socket file +限制socket 文件的权限。 unixsocketperm 700 -Now, to have access with redis-cli you should use the -s flag pointing to the socket file +现在为了获取redis-cli 的访问权限,应该使用-s 参数指向socket 文件。 redis-cli -s /tmp/redis.sock -#### requirepass #### +#### 密码 #### -You may need remote access, if so, you should use a password, that will be required before any operation. +你可能需要远程访问,如果是,那么你应该设置密码,这样子每次操作之前要求输入密码。 requirepass "bTFBx1NYYWRMTUEyNHhsCg" -#### rename-command #### +#### 重命名命令 #### -Imagine the output of the next command. Yes, it will dump the configuration of the server, so you should deny access to this kind information whenever is possible. +想象一下下面一条条指令的输出。使得,这回输出服务器的配置,所以你应该在任何可能的情况下拒绝这种信息。 CONFIG GET * -To restrict, or even disable this and other commands by using the **rename-command**. You must provide a command name and a replacement. To disable, set the replacement string to "" (blank), this is more secure as it will prevent someone from guessing the command name. +为了限制甚至禁止这条或者其他指令可以使用**rename-command** 命令。你必须提供一个命令名和替代的名字。要禁止的话需要设置replacement 为空字符串,这样子禁止任何人猜测命令的名字会比较安全。 rename-command FLUSHDB "FLUSHDB_MY_SALT_G0ES_HERE09u09u" rename-command FLUSHALL "" @@ -160,39 +158,39 @@ To restrict, or even disable this and other commands by using the **rename-comma ![Access Redis through unix with password and command changes](http://blog.linoxide.com/wp-content/uploads/2015/10/redis-security-test.jpg) -Access through unix sockets with password and command changes +通过密码和修改命令来访问unix socket。 -#### Snapshots #### +#### 快照 #### -By default Redis will periodically dump its datasets to **dump.rdb** on the data directory we set. You can configure how often the rdb file will be updated by the save command, the first parameter is a timeframe in seconds and the second is a number of changes performed on the data file. - -Every 15 hours if there was at least 1 key change +默认情况下,redis 会周期性的将数据集转储到我们设置的目录下的文件**dump.rdb**。你可以使用save 命令配置转储的频率,他的第一个参数是以秒为单位的时间帧(译注:按照下文的意思单位应该是分钟),第二个参数是在数据文件上进行修改的数量。 +每隔15小时并且最少修改过一次键。 save 900 1 -Every 5 hours if there was at least 10 key changes +每隔5小时并且最少修改过10次键。 save 300 10 -Every minute if there was at least 10000 key changes +每隔1小时并且最少修改过10000次键。 save 60 10000 -The **/var/lib/redis/6379/dump.rdb** file contains a dump of the dataset on memory since last save. Since it creates a temporary file and then replace the original file, there is no problem of corruption and you can always copy it directly without fear. +文件**/var/lib/redis/6379/dump.rdb** 包含了内存里经过上次保存命令的转储数据。因为他创建了临时文件并且替换了源文件,这里没有被破坏的问题,而且你不用担心直接复制这个文件。 -### Starting at boot ### +### 开机时启动 ### You may use systemd to add Redis to the system startup +你可以使用systemd 将redis 添加到系统开机启动列表。 -Copy sample init_script to /etc/init.d, note also the number of the port on the script name +复制init_script 示例文件到/etc/init.d,注意脚本名所代表的端口号。 cp utils/redis_init_script /etc/init.d/redis_6379 -We are going to use systemd, so create a unit file named redis_6379.service under **/etc/systems/system** +现在我们来使用systemd,所以在**/etc/systems/system** 下创建一个单位文件名字为redis_6379.service。 vi /etc/systemd/system/redis_6379.service -Put this content, try man systemd.service for details +填写下面的内容,详情可见systemd.service。 [Unit] Description=Redis on port 6379 @@ -205,20 +203,18 @@ Put this content, try man systemd.service for details [Install] WantedBy=multi-user.target -Now add the memory overcommit and maximum backlog options we have set before to the **/etc/sysctl.conf** file. +现在添加我之前在**/etc/sysctl.conf** 里面修改多的内存过分提交和backlog 最大值的选项。 vm.overcommit_memory = 1 net.core.somaxconn=512 -For the transparent huge pages support there is no sysctl directive, so you can put the command at the end of /etc/rc.local - +对于透明大页支持,并没有直接sysctl 命令可以控制,所以需要将下面的命令放到/etc/rc.local 的结尾。 echo never > /sys/kernel/mm/transparent_hugepage/enabled -### Conclusion ### - -That's enough to start, with these settings you will be able to deploy Redis server for many simpler scenarios, however there is many options on redis.conf for more complex environments. On some cases, you may use [replication][4] and [Sentinel][5] to provide high availability, [split the data][6] across servers, create a cluster of servers. Thanks for reading! +### 总结 ### +这些足够启动了,通过设置这些选项你将足够部署redis 服务到很多简单的场景,然而在redis.conf 还有很多为复杂环境准备的redis 的选项。在一些情况下,你可以使用[replication][4] 和 [Sentinel][5] 来提高可用性,或者[将数据分散][6]在多个服务器上,创建服务器集群 。谢谢阅读。 -------------------------------------------------------------------------------- via: http://linoxide.com/storage/install-redis-server-centos-7/ From 921b87b2a25615242ceed0fbd17a04ee5e98fa19 Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 19 Nov 2015 21:48:32 +0800 Subject: [PATCH 2498/2517] Create 20151104 How to Install Redis Server on CentOS 7.md --- ...How to Install Redis Server on CentOS 7.md | 236 ++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 translated/tech/20151104 How to Install Redis Server on CentOS 7.md diff --git a/translated/tech/20151104 How to Install Redis Server on CentOS 7.md b/translated/tech/20151104 How to Install Redis Server on CentOS 7.md new file mode 100644 index 0000000000..eb872a2719 --- /dev/null +++ b/translated/tech/20151104 How to Install Redis Server on CentOS 7.md @@ -0,0 +1,236 @@ +How to Install Redis Server on CentOS 7.md + +如何在CentOS 7上安装Redis 服务 +================================================================================ + +大家好, 本文的主题是Redis,我们将要在CentOS 7 上安装它。编译源代码,安装二进制文件,创建、安装文件。然后安装组建,我们还会配置redis ,就像配置操作系统参数一样,目标就是让redis 运行的更加可靠和快速。 + +![Runnins Redis](http://blog.linoxide.com/wp-content/uploads/2015/10/run-redis-standalone.jpg) + +Redis 服务器 + +Redis 是一个开源的多平台数据存储软件,使用ANSI C 编写,直接在内存使用数据集,这使得它得以实现非常高的效率。Redis 支持多种编程语言,包括Lua, C, Java, Python, Perl, PHP 和其他很多语言。redis 的代码量很小,只有约3万行,它只做很少的事,但是做的很好。尽管你在内存里工作,但是对数据持久化的需求还是存在的,而redis 的可靠性就很高,同时也支持集群,这儿些可以很好的保证你的数据安全。 + +### 构建 Redis ### + +redis 目前没有官方RPM 安装包,我们需要从牙UN代码编译,而为了要编译就需要安装Make 和GCC。 + +如果没有安装过GCC 和Make,那么就使用yum 安装。 + + yum install gcc make + +从[官网][1]下载tar 压缩包。 + + curl http://download.redis.io/releases/redis-3.0.4.tar.gz -o redis-3.0.4.tar.gz + +解压缩。 + + tar zxvf redis-3.0.4.tar.gz + +进入解压后的目录。 + + cd redis-3.0.4 + +使用Make 编译源文件。 + + make + +### 安装 ### + +进入源文件的目录。 + + cd src + +复制 Redis server 和 client 到 /usr/local/bin + + cp redis-server redis-cli /usr/local/bin + +最好也把sentinel,benchmark 和check 复制过去。 + + cp redis-sentinel redis-benchmark redis-check-aof redis-check-dump /usr/local/bin + +创建redis 配置文件夹。 + + mkdir /etc/redis + +在`/var/lib/redis` 下创建有效的保存数据的目录 + + mkdir -p /var/lib/redis/6379 + +#### 系统参数 #### + +为了让redis 正常工作需要配置一些内核参数。 + +配置vm.overcommit_memory 为1,它的意思是一直避免数据被截断,详情[见此][2]. + + sysctl -w vm.overcommit_memory=1 + +修改backlog 连接数的最大值超过redis.conf 中的tcp-backlog 值,即默认值511。你可以在[kernel.org][3] 找到更多有关基于sysctl 的ip 网络隧道的信息。 + + sysctl -w net.core.somaxconn=512. + +禁止支持透明大页,,因为这会造成redis 使用过程产生延时和内存访问问题。 + + echo never > /sys/kernel/mm/transparent_hugepage/enabled + +### redis.conf ### +Redis.conf 是redis 的配置文件,然而你会看到这个文件的名字是6379.conf ,而这个数字就是redis 监听的网络端口。这个名字是告诉你可以运行超过一个redis 实例。 + +复制redis.conf 的示例到 **/etc/redis/6379.conf**. + + cp redis.conf /etc/redis/6379.conf + +现在编辑这个文件并且配置参数。 + + vi /etc/redis/6379.conf + +#### 守护程序 #### + +设置daemonize 为no,systemd 需要它运行在前台,否则redis 会突然挂掉。 + + daemonize no + +#### pidfile #### + +设置pidfile 为/var/run/redis_6379.pid。 + + pidfile /var/run/redis_6379.pid + +#### port #### + +如果不准备用默认端口,可以修改。 + + port 6379 + +#### loglevel #### + +设置日志级别。 + + loglevel notice + +#### logfile #### + +修改日志文件路径。 + + logfile /var/log/redis_6379.log + +#### dir #### + +设置目录为 /var/lib/redis/6379 + + dir /var/lib/redis/6379 + +### 安全 ### + +下面有几个操作可以提高安全性。 + +#### Unix sockets #### + +在很多情况下,客户端程序和服务器端程序运行在同一个机器上,所以不需要监听网络上的socket。如果这和你的使用情况类似,你就可以使用unix socket 替代网络socket ,为此你需要配置**port** 为0,然后配置下面的选项来使能unix socket。 + +设置unix socket 的套接字文件。 + + unixsocket /tmp/redis.sock + +限制socket 文件的权限。 + + unixsocketperm 700 + +现在为了获取redis-cli 的访问权限,应该使用-s 参数指向socket 文件。 + + redis-cli -s /tmp/redis.sock + +#### 密码 #### + +你可能需要远程访问,如果是,那么你应该设置密码,这样子每次操作之前要求输入密码。 + + requirepass "bTFBx1NYYWRMTUEyNHhsCg" + +#### 重命名命令 #### + +想象一下下面一条条指令的输出。使得,这回输出服务器的配置,所以你应该在任何可能的情况下拒绝这种信息。 + + CONFIG GET * + +为了限制甚至禁止这条或者其他指令可以使用**rename-command** 命令。你必须提供一个命令名和替代的名字。要禁止的话需要设置replacement 为空字符串,这样子禁止任何人猜测命令的名字会比较安全。 + + rename-command FLUSHDB "FLUSHDB_MY_SALT_G0ES_HERE09u09u" + rename-command FLUSHALL "" + rename-command CONFIG "CONFIG_MY_S4LT_GO3S_HERE09u09u" + +![Access Redis through unix with password and command changes](http://blog.linoxide.com/wp-content/uploads/2015/10/redis-security-test.jpg) + +通过密码和修改命令来访问unix socket。 + +#### 快照 #### + +默认情况下,redis 会周期性的将数据集转储到我们设置的目录下的文件**dump.rdb**。你可以使用save 命令配置转储的频率,他的第一个参数是以秒为单位的时间帧(译注:按照下文的意思单位应该是分钟),第二个参数是在数据文件上进行修改的数量。 + +每隔15小时并且最少修改过一次键。 + save 900 1 + +每隔5小时并且最少修改过10次键。 + + save 300 10 + +每隔1小时并且最少修改过10000次键。 + + save 60 10000 + +文件**/var/lib/redis/6379/dump.rdb** 包含了内存里经过上次保存命令的转储数据。因为他创建了临时文件并且替换了源文件,这里没有被破坏的问题,而且你不用担心直接复制这个文件。 + +### 开机时启动 ### + +You may use systemd to add Redis to the system startup +你可以使用systemd 将redis 添加到系统开机启动列表。 + +复制init_script 示例文件到/etc/init.d,注意脚本名所代表的端口号。 + + cp utils/redis_init_script /etc/init.d/redis_6379 + +现在我们来使用systemd,所以在**/etc/systems/system** 下创建一个单位文件名字为redis_6379.service。 + + vi /etc/systemd/system/redis_6379.service + +填写下面的内容,详情可见systemd.service。 + + [Unit] + Description=Redis on port 6379 + + [Service] + Type=forking + ExecStart=/etc/init.d/redis_6379 start + ExecStop=/etc/init.d/redis_6379 stop + + [Install] + WantedBy=multi-user.target + +现在添加我之前在**/etc/sysctl.conf** 里面修改多的内存过分提交和backlog 最大值的选项。 + + vm.overcommit_memory = 1 + + net.core.somaxconn=512 + +对于透明大页支持,并没有直接sysctl 命令可以控制,所以需要将下面的命令放到/etc/rc.local 的结尾。 + echo never > /sys/kernel/mm/transparent_hugepage/enabled + +### 总结 ### + +这些足够启动了,通过设置这些选项你将足够部署redis 服务到很多简单的场景,然而在redis.conf 还有很多为复杂环境准备的redis 的选项。在一些情况下,你可以使用[replication][4] 和 [Sentinel][5] 来提高可用性,或者[将数据分散][6]在多个服务器上,创建服务器集群 。谢谢阅读。 +-------------------------------------------------------------------------------- + +via: http://linoxide.com/storage/install-redis-server-centos-7/ + +作者:[Carlos Alberto][a] +译者:[ezio](https://github.com/oska874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/carlosal/ +[1]:http://redis.io/download +[2]:https://www.kernel.org/doc/Documentation/vm/overcommit-accounting +[3]:https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt +[4]:http://redis.io/topics/replication +[5]:http://redis.io/topics/sentinel +[6]:http://redis.io/topics/partitioning From 6e2c37645ee49e649cfd6001b3a6d60075e91e7d Mon Sep 17 00:00:00 2001 From: Ezio Date: Thu, 19 Nov 2015 21:50:34 +0800 Subject: [PATCH 2499/2517] Delete 20151104 How to Install Redis Server on CentOS 7.md --- ...How to Install Redis Server on CentOS 7.md | 234 ------------------ 1 file changed, 234 deletions(-) delete mode 100644 sources/tech/20151104 How to Install Redis Server on CentOS 7.md diff --git a/sources/tech/20151104 How to Install Redis Server on CentOS 7.md b/sources/tech/20151104 How to Install Redis Server on CentOS 7.md deleted file mode 100644 index cde50aef87..0000000000 --- a/sources/tech/20151104 How to Install Redis Server on CentOS 7.md +++ /dev/null @@ -1,234 +0,0 @@ -如何在CentOS 7上安装Redis 服务 -================================================================================ - -大家好, 本文的主题是Redis,我们将要在CentOS 7 上安装它。编译源代码,安装二进制文件,创建、安装文件。然后安装组建,我们还会配置redis ,就像配置操作系统参数一样,目标就是让redis 运行的更加可靠和快速。 - -![Runnins Redis](http://blog.linoxide.com/wp-content/uploads/2015/10/run-redis-standalone.jpg) - -Redis 服务器 - -Redis 是一个开源的多平台数据存储软件,使用ANSI C 编写,直接在内存使用数据集,这使得它得以实现非常高的效率。Redis 支持多种编程语言,包括Lua, C, Java, Python, Perl, PHP 和其他很多语言。redis 的代码量很小,只有约3万行,它只做很少的事,但是做的很好。尽管你在内存里工作,但是对数据持久化的需求还是存在的,而redis 的可靠性就很高,同时也支持集群,这儿些可以很好的保证你的数据安全。 - -### 构建 Redis ### - -redis 目前没有官方RPM 安装包,我们需要从牙UN代码编译,而为了要编译就需要安装Make 和GCC。 - -如果没有安装过GCC 和Make,那么就使用yum 安装。 - - yum install gcc make - -从[官网][1]下载tar 压缩包。 - - curl http://download.redis.io/releases/redis-3.0.4.tar.gz -o redis-3.0.4.tar.gz - -解压缩。 - - tar zxvf redis-3.0.4.tar.gz - -进入解压后的目录。 - - cd redis-3.0.4 - -使用Make 编译源文件。 - - make - -### 安装 ### - -进入源文件的目录。 - - cd src - -复制 Redis server 和 client 到 /usr/local/bin - - cp redis-server redis-cli /usr/local/bin - -最好也把sentinel,benchmark 和check 复制过去。 - - cp redis-sentinel redis-benchmark redis-check-aof redis-check-dump /usr/local/bin - -创建redis 配置文件夹。 - - mkdir /etc/redis - -在`/var/lib/redis` 下创建有效的保存数据的目录 - - mkdir -p /var/lib/redis/6379 - -#### 系统参数 #### - -为了让redis 正常工作需要配置一些内核参数。 - -配置vm.overcommit_memory 为1,它的意思是一直避免数据被截断,详情[见此][2]. - - sysctl -w vm.overcommit_memory=1 - -修改backlog 连接数的最大值超过redis.conf 中的tcp-backlog 值,即默认值511。你可以在[kernel.org][3] 找到更多有关基于sysctl 的ip 网络隧道的信息。 - - sysctl -w net.core.somaxconn=512. - -禁止支持透明大页,,因为这会造成redis 使用过程产生延时和内存访问问题。 - - echo never > /sys/kernel/mm/transparent_hugepage/enabled - -### redis.conf ### -Redis.conf 是redis 的配置文件,然而你会看到这个文件的名字是6379.conf ,而这个数字就是redis 监听的网络端口。这个名字是告诉你可以运行超过一个redis 实例。 - -复制redis.conf 的示例到 **/etc/redis/6379.conf**. - - cp redis.conf /etc/redis/6379.conf - -现在编辑这个文件并且配置参数。 - - vi /etc/redis/6379.conf - -#### 守护程序 #### - -设置daemonize 为no,systemd 需要它运行在前台,否则redis 会突然挂掉。 - - daemonize no - -#### pidfile #### - -设置pidfile 为/var/run/redis_6379.pid。 - - pidfile /var/run/redis_6379.pid - -#### port #### - -如果不准备用默认端口,可以修改。 - - port 6379 - -#### loglevel #### - -设置日志级别。 - - loglevel notice - -#### logfile #### - -修改日志文件路径。 - - logfile /var/log/redis_6379.log - -#### dir #### - -设置目录为 /var/lib/redis/6379 - - dir /var/lib/redis/6379 - -### 安全 ### - -下面有几个操作可以提高安全性。 - -#### Unix sockets #### - -在很多情况下,客户端程序和服务器端程序运行在同一个机器上,所以不需要监听网络上的socket。如果这和你的使用情况类似,你就可以使用unix socket 替代网络socket ,为此你需要配置**port** 为0,然后配置下面的选项来使能unix socket。 - -设置unix socket 的套接字文件。 - - unixsocket /tmp/redis.sock - -限制socket 文件的权限。 - - unixsocketperm 700 - -现在为了获取redis-cli 的访问权限,应该使用-s 参数指向socket 文件。 - - redis-cli -s /tmp/redis.sock - -#### 密码 #### - -你可能需要远程访问,如果是,那么你应该设置密码,这样子每次操作之前要求输入密码。 - - requirepass "bTFBx1NYYWRMTUEyNHhsCg" - -#### 重命名命令 #### - -想象一下下面一条条指令的输出。使得,这回输出服务器的配置,所以你应该在任何可能的情况下拒绝这种信息。 - - CONFIG GET * - -为了限制甚至禁止这条或者其他指令可以使用**rename-command** 命令。你必须提供一个命令名和替代的名字。要禁止的话需要设置replacement 为空字符串,这样子禁止任何人猜测命令的名字会比较安全。 - - rename-command FLUSHDB "FLUSHDB_MY_SALT_G0ES_HERE09u09u" - rename-command FLUSHALL "" - rename-command CONFIG "CONFIG_MY_S4LT_GO3S_HERE09u09u" - -![Access Redis through unix with password and command changes](http://blog.linoxide.com/wp-content/uploads/2015/10/redis-security-test.jpg) - -通过密码和修改命令来访问unix socket。 - -#### 快照 #### - -默认情况下,redis 会周期性的将数据集转储到我们设置的目录下的文件**dump.rdb**。你可以使用save 命令配置转储的频率,他的第一个参数是以秒为单位的时间帧(译注:按照下文的意思单位应该是分钟),第二个参数是在数据文件上进行修改的数量。 - -每隔15小时并且最少修改过一次键。 - save 900 1 - -每隔5小时并且最少修改过10次键。 - - save 300 10 - -每隔1小时并且最少修改过10000次键。 - - save 60 10000 - -文件**/var/lib/redis/6379/dump.rdb** 包含了内存里经过上次保存命令的转储数据。因为他创建了临时文件并且替换了源文件,这里没有被破坏的问题,而且你不用担心直接复制这个文件。 - -### 开机时启动 ### - -You may use systemd to add Redis to the system startup -你可以使用systemd 将redis 添加到系统开机启动列表。 - -复制init_script 示例文件到/etc/init.d,注意脚本名所代表的端口号。 - - cp utils/redis_init_script /etc/init.d/redis_6379 - -现在我们来使用systemd,所以在**/etc/systems/system** 下创建一个单位文件名字为redis_6379.service。 - - vi /etc/systemd/system/redis_6379.service - -填写下面的内容,详情可见systemd.service。 - - [Unit] - Description=Redis on port 6379 - - [Service] - Type=forking - ExecStart=/etc/init.d/redis_6379 start - ExecStop=/etc/init.d/redis_6379 stop - - [Install] - WantedBy=multi-user.target - -现在添加我之前在**/etc/sysctl.conf** 里面修改多的内存过分提交和backlog 最大值的选项。 - - vm.overcommit_memory = 1 - - net.core.somaxconn=512 - -对于透明大页支持,并没有直接sysctl 命令可以控制,所以需要将下面的命令放到/etc/rc.local 的结尾。 - echo never > /sys/kernel/mm/transparent_hugepage/enabled - -### 总结 ### - -这些足够启动了,通过设置这些选项你将足够部署redis 服务到很多简单的场景,然而在redis.conf 还有很多为复杂环境准备的redis 的选项。在一些情况下,你可以使用[replication][4] 和 [Sentinel][5] 来提高可用性,或者[将数据分散][6]在多个服务器上,创建服务器集群 。谢谢阅读。 --------------------------------------------------------------------------------- - -via: http://linoxide.com/storage/install-redis-server-centos-7/ - -作者:[Carlos Alberto][a] -译者:[ezio](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/carlosal/ -[1]:http://redis.io/download -[2]:https://www.kernel.org/doc/Documentation/vm/overcommit-accounting -[3]:https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt -[4]:http://redis.io/topics/replication -[5]:http://redis.io/topics/sentinel -[6]:http://redis.io/topics/partitioning From 8f5941fc1ceaecacc60eb65ca72315da04558186 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 20 Nov 2015 00:13:47 +0800 Subject: [PATCH 2500/2517] Delete 20151116 Linux FAQs with Answers--How to install Node.js on Linux.md --- ...nswers--How to install Node.js on Linux.md | 92 ------------------- 1 file changed, 92 deletions(-) delete mode 100644 sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md diff --git a/sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md b/sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md deleted file mode 100644 index 146c918d1d..0000000000 --- a/sources/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md +++ /dev/null @@ -1,92 +0,0 @@ -translation by strugglingyouth - -Linux FAQs with Answers--How to install Node.js on Linux -================================================================================ -> **Question**: How can I install Node.js on [insert your Linux distro]? - -[Node.js][1] is a server-side software platform built on Google's V8 JavaScript engine. Node.js has become a popular choice for building high-performance server-side applications all in JavaScript. What makes Node.js even more attractive for backend server development is the [huge ecosystem][2] of Node.js libraries and applications. Node.js comes with a command line utility called npm which allows you to easily install, version-control, and manage dependencies of Node.js libraries and applications from the vast npm online repository. - -In this tutorial, I will describe **how to install Node.js on major Linux distros including Debian, Ubuntu, Fedora and CentOS**. - -Node.js is available as a pre-built package on some distros (e.g., Fedora or Ubuntu), while you need to install it from its source on other distros. As Node.js is fast evolving, it is recommended to install the latest Node.js from its source, instead of installing an outdated pre-built package. The lasted Node.js comes with npm (Node.js package manager) bundled, allowing you to install external Node.js modules easily. - -### Install Node.js on Debian ### - -Starting from Debian 8 (Jessie), Node.js is available in the official repositories. Thus you can install it with: - - $ sudo apt-get install npm - -On Debian 7 (Wheezy) or earlier, you can install Node.js from its source as follows. - - $ sudo apt-get install python g++ make - $ wget http://nodejs.org/dist/node-latest.tar.gz - $ tar xvfvz node-latest.tar.gz - $ cd node-v0.10.21 (replace a version with your own) - $ ./configure - $ make - $ sudo make install - -### Install Node.js on Ubuntu or Linux Mint ### - -Node.js is included in Ubuntu (13.04 and higher). Thus installation is straightforward. The following will install Node.js and npm. - - $ sudo apt-get install npm - $ sudo ln -s /usr/bin/nodejs /usr/bin/node - -While stock Ubuntu ships Node.js, you can install a more recent version from [its PPA][3]. - - $ sudo apt-get install python-software-properties python g++ make - $ sudo add-apt-repository -y ppa:chris-lea/node.js - $ sudo apt-get update - $ sudo apt-get install npm - -### Install Node.js on Fedora ### - -Node.js is included in the base repository of Fedora. Therefore you can use yum to install Node.js on Fedora. - - $ sudo yum install npm - -If you want to install the latest version of Node.js, you can build it from its source as follows. - - $ sudo yum groupinstall 'Development Tools' - $ wget http://nodejs.org/dist/node-latest.tar.gz - $ tar xvfvz node-latest.tar.gz - $ cd node-v0.10.21 (replace a version with your own) - $ ./configure - $ make - $ sudo make install - -### Install Node.js on CentOS or RHEL ### - -To install Node.js with yum package manager on CentOS, first enable EPEL repository, and then run: - - $ sudo yum install npm - -If you want to build the latest Node.js on CentOS, follow the same procedure as in Fedora. - -### Install Node.js on Arch Linux ### - -Node.js is available in the Arch Linux community repository. Thus installation is as simple as running: - - $ sudo pacman -S nodejs npm - -### Check the Version of Node.js ### - -Once you have installed Node.js, you can check Node.js version as follows. - - $ node --version - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/install-node-js-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://ask.xmodulo.com/author/nanni -[1]:http://nodejs.org/ -[2]:https://www.npmjs.com/ -[3]:https://launchpad.net/~chris-lea/+archive/node.js From 8c14d8eec880f25add7ec71ee50b3ca7e7743c09 Mon Sep 17 00:00:00 2001 From: struggling <630441839@qq.com> Date: Fri, 20 Nov 2015 00:14:39 +0800 Subject: [PATCH 2501/2517] Create 20151116 Linux FAQs with Answers--How to install Node.js on Linux.md --- ...nswers--How to install Node.js on Linux.md | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 translated/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md diff --git a/translated/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md b/translated/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md new file mode 100644 index 0000000000..8ccca22632 --- /dev/null +++ b/translated/tech/20151116 Linux FAQs with Answers--How to install Node.js on Linux.md @@ -0,0 +1,92 @@ +Linux 有问必答 - 如何在 Linux 上安装 Node.js +================================================================================ +> **问题**: 如何在你的 Linux 发行版上安装 Node.js? + +[Node.js][1] 是建立在谷歌的 V8 JavaScript 引擎服务器端的软件平台上。在构建高性能的服务器端应用程序上,Node.js 在 JavaScript 中已是首选方案。是什么让使用 Node.js 库和应用程序的 [庞大生态系统][2] 来开发服务器后台变得如此流行。Node.js 自带一个被称为 npm 的命令行工具可以让你轻松地安装它,进行版本控制并使用 npm 的在线仓库来管理 Node.js 库和应用程序的依赖关系。 + +在本教程中,我将介绍 **如何在主流 Linux 发行版上安装 Node.js,包括Debian,Ubuntu,Fedora 和 CentOS** 。 + +Node.js 在一些发行版上作为预构建的程序包(如,Fedora 或 Ubuntu),而在其他发行版上你需要源码安装。由于 Node.js 发展比较快,建议从源码安装最新版而不是安装一个过时的预构建的程序包。最新的 Node.js 自带 npm(Node.js 的包管理器),让你可以轻松的安装 Node.js 的外部模块。 + +### 在 Debian 上安装 Node.js on ### + +从 Debian 8 (Jessie)开始,Node.js 已被纳入官方软​​件仓库。因此,你可以使用如下方式安装它: + + $ sudo apt-get install npm + +在 Debian 7 (Wheezy) 以前的版本中,你需要使用下面的方式来源码安装: + + $ sudo apt-get install python g++ make + $ wget http://nodejs.org/dist/node-latest.tar.gz + $ tar xvfvz node-latest.tar.gz + $ cd node-v0.10.21 (replace a version with your own) + $ ./configure + $ make + $ sudo make install + +### 在 Ubuntu 或 Linux Mint 中安装 Node.js ### + +Node.js 被包含在 Ubuntu(13.04 及更高版本)。因此,安装非常简单。以下方式将安装 Node.js 和 npm。 + + $ sudo apt-get install npm + $ sudo ln -s /usr/bin/nodejs /usr/bin/node + +而 Ubuntu 中的 Node.js 可能版本比较老,你可以从 [其 PPA][3] 中安装最新的版本。 + + $ sudo apt-get install python-software-properties python g++ make + $ sudo add-apt-repository -y ppa:chris-lea/node.js + $ sudo apt-get update + $ sudo apt-get install npm + +### 在 Fedora 中安装 Node.js ### + +Node.js 被包含在 Fedora 的 base 仓库中。因此,你可以在 Fedora 中用 yum 安装 Node.js。 + + $ sudo yum install npm + +如果你想安装 Node.js 的最新版本,可以按照以下步骤使用源码来安装。 + + $ sudo yum groupinstall 'Development Tools' + $ wget http://nodejs.org/dist/node-latest.tar.gz + $ tar xvfvz node-latest.tar.gz + $ cd node-v0.10.21 (replace a version with your own) + $ ./configure + $ make + $ sudo make install + +### 在 CentOS 或 RHEL 中安装 Node.js ### + +在 CentOS 使用 yum 包管理器来安装 Node.js,首先启用 EPEL 软件库,然后运行: + + $ sudo yum install npm + +如果你想在 CentOS 中安装最新版的 Node.js,其安装步骤和在 Fedora 中的相同。 + +### 在 Arch Linux 上安装 Node.js ### + +Node.js is available in the Arch Linux community repository. Thus installation is as simple as running: + +Node.js 在 Arch Linux 的社区库中可以找到。所以安装很简单,只要运行: + + $ sudo pacman -S nodejs npm + +### 检查 Node.js 的版本 ### + +一旦你已经安装了 Node.js,你可以使用如下所示的方法检查 Node.js 的版本。 + + $ node --version + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/install-node-js-linux.html + +作者:[Dan Nanni][a] +译者:[strugglingyou](https://github.com/strugglingyou) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://nodejs.org/ +[2]:https://www.npmjs.com/ +[3]:https://launchpad.net/~chris-lea/+archive/node.js From 2d06043b7e806d333848ed1fb0e52ce15ebc60c3 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 20 Nov 2015 01:18:21 +0800 Subject: [PATCH 2502/2517] translating by ezio --- .../tech/20151028 10 Tips for 10x Application Performance.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151028 10 Tips for 10x Application Performance.md b/sources/tech/20151028 10 Tips for 10x Application Performance.md index a899284450..99086f1163 100644 --- a/sources/tech/20151028 10 Tips for 10x Application Performance.md +++ b/sources/tech/20151028 10 Tips for 10x Application Performance.md @@ -1,3 +1,5 @@ +translating by ezio + 10 Tips for 10x Application Performance ================================================================================ Improving web application performance is more critical than ever. The share of economic activity that’s online is growing; more than 5% of the developed world’s economy is now on the Internet (see Resources below for statistics). And our always-on, hyper-connected modern world means that user expectations are higher than ever. If your site does not respond instantly, or if your app does not work without delay, users quickly move on to your competitors. @@ -274,4 +276,4 @@ via: https://www.nginx.com/blog/10-tips-for-10x-application-performance/?hmsr=to [50]:http://www.statista.com/statistics/250703/forecast-of-internet-economy-as-percentage-of-gdp-in-g-20-countries/ [51]:http://blog.loadimpact.com/blog/how-bad-performance-impacts-ecommerce-sales-part-i/ [52]:https://blog.kissmetrics.com/loading-time/?wide=1 -[53]:https://econsultancy.com/blog/10936-site-speed-case-studies-tips-and-tools-for-improving-your-conversion-rate/ \ No newline at end of file +[53]:https://econsultancy.com/blog/10936-site-speed-case-studies-tips-and-tools-for-improving-your-conversion-rate/ From 2dde570650a0c049eedfd181a208c812b5158db2 Mon Sep 17 00:00:00 2001 From: Ezio Date: Fri, 20 Nov 2015 20:51:20 +0800 Subject: [PATCH 2503/2517] Update 20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md --- ...of a Linux Command Line Operation Using PV Command.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md b/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md index 8ecf772a21..6b97771f06 100644 --- a/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md +++ b/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md @@ -1,17 +1,20 @@ -translating by ezio - How to Monitor the Progress of a Linux Command Line Operation Using PV Command + +如何监控linux 命令行的命令执行进度 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/11/pv-featured-1.jpg) If you’re a Linux system admin, there’s no doubt that you must be spending most of your work time on the command line – installing and removing packages; monitoring system stats; copying, moving, deleting stuff; debugging problems; and more. There are times when you fire a command, and it takes a while before the operation completes. However, there are also times when the command you executed just hangs, leaving you guessing as to what’s actually happening behind the scenes. +如果你是一个linux 系统管理员,那么毫无疑问你必须花费大量的工作时间在命令行上:安装和卸载软件,监视系统状态,复制、移动、删除文件,查错,等等。很多时候都是你输入一个命令,然后等待很长时间直到执行完成。也有的时候你执行的命令挂起了,而你只能猜测命令执行的实际情况。 Usually, Linux commands provide no information related to the progress of the ongoing operation, something that is very important especially when you have limited time. However, that doesn’t mean you’re helpless – there exists a command, dubbed pv, that displays useful progress information related to the ongoing command line operation. In this article we will discuss this command as well as its features through some easy-to-understand examples. +通常linux命令不提供和进度相关的信息,而这些信息特别重要,尤其当你只有有限的时间时。然而这并不意味着你是无助的-现在有一个命令,pv,他会显示当前在命令行执行的命令的进度信息。在本文我们会讨论它并用几个简单的例子说明种特性。 -### PV Command ### +### PV 命令 ### Developed by Andrew Wood, [PV][1] – which stands for Pipe Viewer – displays information related to the progress of data through a pipeline. The information includes time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA. + > “To use it, insert it in a pipeline between two processes, with the appropriate options. Its standard input will be passed through to its standard output and progress will be shown on standard error,” The above explains the command’s man page. From 8bd6b0043da9443fbcb17dab6447e288e165facf Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Nov 2015 22:58:49 +0800 Subject: [PATCH 2504/2517] PUB:20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop @oska874 --- ...ices from Ubuntu Command Line Using Mop.md | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) rename {translated/tech => published}/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md (50%) diff --git a/translated/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md b/published/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md similarity index 50% rename from translated/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md rename to published/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md index a5207c3813..50e64ca9ad 100644 --- a/translated/tech/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md +++ b/published/20151012 How to Monitor Stock Prices from Ubuntu Command Line Using Mop.md @@ -1,22 +1,25 @@ -命令行下使用Mop 监视股票价格 +命令行下使用 Mop 监视股票价格 ================================================================================ -有一份隐性收入通常很不错,特别是当你可以轻松的协调业余和全职工作。如果你的日常工作使用了联网的电脑,交易股票是一个很流行的选项来获取额外收入。 +![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-featured-new.jpg) + +有一份隐性收入通常很不错,特别是当你可以轻松的协调业余和全职工作。如果你的日常工作使用了联网的电脑,交易股票就是一个获取额外收入的很流行的选项。 + +但是目前只有很少的股票监视软件可以运行在 linux 上,其中大多数还是基于图形界面的。如果你是一个 Linux 专家,并且大量的工作时间是在没有图形界面的电脑上呢?你是不是就没办法了?不,还是有一些命令行下的股票追踪工具,包括Mop,也就是本文要聊一聊的工具。 -但是目前只有很少的股票监视软件可以用在linux 上,其中大多数还是基于图形界面的。如果你是一个Linux 专家,并且大量的工作时间是在没有图形界面的电脑上呢?你是不是就没办法了?不,这里还有一个命令行下的股票追踪工具,包括Mop,也就是本文要聊一聊的工具。 ### Mop ### -Mop,如上所述,是一个命令行下连续显示和更新美股和独立股票信息的工具。使用GO 实现的,是Michael Dvorkin 大脑的产物。 +Mop,如上所述,是一个命令行下连续显示和更新美股和独立股票信息的工具。使用 GO 语言实现的,是 Michael Dvorkin 的智慧结晶。 + ### 下载安装 ### - -因为这个工程使用GO 实现的,所以你要做的第一步是在你的计算机上安装这种编程语言,下面就是在Debian 系系统,比如Ubuntu上安装GO的步骤: +因为这个项目使用 GO 实现的,所以你要做的第一步是在你的计算机上安装这种编程语言,下面就是在 Debian 系的系统,比如 Ubuntu 上安装 GO 的步骤: sudo apt-get install golang mkdir ~/workspace echo 'export GOPATH="$HOME/workspace"' >> ~/.bashrc source ~/.bashrc -GO 安装好后的下一步是安装Mop 工具和配置环境,你要做的是运行下面的命令: +GO 安装好后的下一步是安装 Mop 工具和配置环境,你要做的是运行下面的命令: sudo apt-get install git go get github.com/michaeldv/mop @@ -24,12 +27,13 @@ GO 安装好后的下一步是安装Mop 工具和配置环境,你要做的是 make install export PATH="$PATH:$GOPATH/bin" -完成之后就可以运行下面的命令执行Mop: +完成之后就可以运行下面的命令执行 Mop: + cmd ### 特性 ### -当你第一次运行Mop 时,你会看到类似下面的输出信息: +当你第一次运行 Mop 时,你会看到类似下面的输出信息: ![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-first-run.jpg) @@ -37,19 +41,19 @@ GO 安装好后的下一步是安装Mop 工具和配置环境,你要做的是 ### 添加删除股票 ### -Mop 允许你轻松的从输出列表上添加/删除个股信息。要添加,你全部要做的是按”+“和输入股票名称。举个例子,下图就是添加Facebook (FB) 到列表里。 +Mop 允许你轻松的从输出列表上添加/删除个股信息。要添加,你全部要做的是按“+”和输入股票名称。举个例子,下图就是添加 Facebook (FB) 到列表里。 ![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-add-stock.png) -因为我按下了”+“键,一列包含文本”Add tickers:“出现了,提示我添加股票名称—— 我添加了FB 然后按下回车。输出列表更新了,我添加的新股票也出现在列表了: +我按下了“+”键,就出现了包含文本“Add tickers:”的一列,提示我添加股票名称—— 我添加了 FB 然后按下回车。输出列表更新了,我添加的新股票也出现在列表了: ![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-stock-added.png) -类似的,你可以使用”-“ 键和提供股票名称删除一个股票。 +类似的,你可以使用“-”键和提供股票名称删除一个股票。 #### 根据价格分组 #### -还有一个把股票分组的办法:依据他们的股价升跌,你索要做的就是按下”g“ 键。接下来,股票会分组显示:升的在一起使用绿色字体显示,而下跌的股票会黑色字体显示。 +还有一个把股票分组的办法:依据他们的股价升跌,你所要做的就是按下“g”键。接下来,股票会分组显示:升的在一起使用绿色字体显示,而下跌的股票会黑色字体显示。 如下所示: @@ -57,7 +61,7 @@ Mop 允许你轻松的从输出列表上添加/删除个股信息。要添加, #### 列排序 #### -Mop 同时也允许你根据不同的列类型改变排序规则。这种用法需要你按下”o“(这个命令默认使用第一列的值来排序),然后使用左右键来选择你要使用的列。完成之后按下回车对内容重新排序。 +Mop 同时也允许你根据不同的列类型改变排序规则。这种用法需要你按下“o”(这个命令默认使用第一列的值来排序),然后使用左右键来选择你要排序的列。完成之后按下回车对内容重新排序。 举个例子,下面的截图就是根据输出内容的第一列、按照字母表排序之后的结果。 @@ -67,12 +71,13 @@ Mop 同时也允许你根据不同的列类型改变排序规则。这种用法 #### 其他选项 #### -其它的可用选项包括”p“:暂停市场和股票信息更新,”q“ 或者”esc“ 来退出命令行程序,”?“ 显示帮助页。 +其它的可用选项包括“p”:暂停市场和股票信息更新,“q”或者“esc” 来退出命令行程序,“?”显示帮助页。 + ![](https://www.maketecheasier.com/assets/uploads/2015/09/mop-help.png) ### 结论 ### -Mop 是一个基础的股票监控工具,并没有提供太多的特性,只提供了他声称的功能。很明显,这个工具并不是为专业股票交易者提供的,而仅仅为你在只有命令行的机器上得体的提供了一个跟踪股票信息的选择。 +Mop 是一个基础的股票监控工具,并没有提供太多的特性,只提供了它所声称的功能。很明显,这个工具并不是为专业股票交易者提供的,而仅仅为你在只有命令行的机器上得体的提供了一个跟踪股票信息的选择。 -------------------------------------------------------------------------------- @@ -80,7 +85,7 @@ via: https://www.maketecheasier.com/monitor-stock-prices-ubuntu-command-line/ 作者:[Himanshu Arora][a] 译者:[oska874](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d98e271c0e5a423c9c98845720bb167f33f07cad Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Nov 2015 23:21:11 +0800 Subject: [PATCH 2505/2517] PUB:20151019 Nautilus File Search Is About To Get A Big Power Up @geekpi --- ...File Search Is About To Get A Big Power Up.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/talk => published}/20151019 Nautilus File Search Is About To Get A Big Power Up.md (63%) diff --git a/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md b/published/20151019 Nautilus File Search Is About To Get A Big Power Up.md similarity index 63% rename from translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md rename to published/20151019 Nautilus File Search Is About To Get A Big Power Up.md index b9f0762cbe..46bde42b91 100644 --- a/translated/talk/20151019 Nautilus File Search Is About To Get A Big Power Up.md +++ b/published/20151019 Nautilus File Search Is About To Get A Big Power Up.md @@ -1,24 +1,24 @@ -Nautilus的文件搜索将迎来巨大提升 +Nautilus 的文件搜索将迎来巨大提升 ================================================================================ ![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/10/nautilus-new-search-filters.jpg) -**在Nautilus中搜索零散文件和文件夹将会将会变得相当简单。** +*在Nautilus中搜索零散文件和文件夹将会将会变得相当简单。* -[GNOME文件管理器][1]中一个新的**搜索过滤器**正在开发中。它大量使用 GNOME 漂亮的弹出式菜单努力提供一个简单的方法缩小搜索结果并精确找到你需要的。 +[GNOME文件管理器][1]中正在开发一个新的**搜索过滤器**。它大量使用 GNOME 漂亮的弹出式菜单,以通过简单的方法来缩小搜索结果并精确地找到你所需要的。 -开发者Georges Stavracas正致力于新的UI并[描述][2]新的编辑器为“更干净、更合理、更直观”。 +开发者Georges Stavracas正致力于开发新的UI,他[说][2]这个新的界面“更干净、更合理、更直观”。 -根据他[上传到Youtube][3]的视频来展示新的方式-他还没有嵌入它-他没有错。 +根据他[上传到Youtube][3]的视频来展示的新方式-他还没有嵌入它-他没有错。 -> 他在他的博客中写到:“ Nautilus 有非常复杂但是强大的内部组成,它允许我们做很多事情。事实上有代码可提供很多选择。那么,为何它曾经看上去这么糟糕?” +> 他在他的博客中写到:“ Nautilus 有非常复杂但是强大的内部组成,它允许我们做很多事情。事实上在代码上存在各种可能。那么,为何它曾经看上去这么糟糕?” -问题有部分比较夸张;新的搜索过滤器界面向用户展示了“强大的内部组成”。搜索结果可以根据类型、名字或者日期范围来进行过滤。 +这个问题的部分原因比较令人吃惊:新的搜索过滤器界面向用户展示了“强大的内部组成”。搜索结果可以根据类型、名字或者日期范围来进行过滤。 对于像 Nautilus 这类 app 的任何修改有可能让一些用户不安,因此像这样帮助性的、直接的新UI会带来一些争议。 虽然对于不满的担心貌似会影响进度(毫无疑问,虽然像[移除类型优先搜索][4]的争议自2014年以来一直在争论)。GNOME 3.18 在[上个月发布了][5],给 Nautilus 引入了新的文件进度对话框,以及远程共享的更好整合,包括 Google Drive。 -Stavracas 的搜索过滤器还没被合并进 Files 的 trunk,但是重做的搜索 UI 已经初步计划在明年春天的 GNOME 3.20 中实现。 +Stavracas 的搜索过滤器还没被合并进 Files 的 trunk 中,但是复刻的搜索 UI 已经初步计划在明年春天的 GNOME 3.20 中实现。 -------------------------------------------------------------------------------- From 155a5867959e05965d85f30d333ca1f610dc47c9 Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 20 Nov 2015 23:30:02 +0800 Subject: [PATCH 2506/2517] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...51019 Nautilus File Search Is About To Get A Big Power Up.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20151019 Nautilus File Search Is About To Get A Big Power Up.md b/published/20151019 Nautilus File Search Is About To Get A Big Power Up.md index 46bde42b91..b38d77c28e 100644 --- a/published/20151019 Nautilus File Search Is About To Get A Big Power Up.md +++ b/published/20151019 Nautilus File Search Is About To Get A Big Power Up.md @@ -16,7 +16,7 @@ Nautilus 的文件搜索将迎来巨大提升 对于像 Nautilus 这类 app 的任何修改有可能让一些用户不安,因此像这样帮助性的、直接的新UI会带来一些争议。 -虽然对于不满的担心貌似会影响进度(毫无疑问,虽然像[移除类型优先搜索][4]的争议自2014年以来一直在争论)。GNOME 3.18 在[上个月发布了][5],给 Nautilus 引入了新的文件进度对话框,以及远程共享的更好整合,包括 Google Drive。 +虽然对于不满的担心貌似会影响进度(毫无疑问,虽然像[移除输入优先搜索][4]的争议自2014年以来一直在争论)。GNOME 3.18 在[上个月发布了][5],给 Nautilus 引入了新的文件进度对话框,以及远程共享的更好整合,包括 Google Drive。 Stavracas 的搜索过滤器还没被合并进 Files 的 trunk 中,但是复刻的搜索 UI 已经初步计划在明年春天的 GNOME 3.20 中实现。 From 052eba3dd383f08f4686e79daca1a1f2d42e87bb Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 21 Nov 2015 22:27:59 +0800 Subject: [PATCH 2507/2517] Update 20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md --- ...Command Line Operation Using PV Command.md | 46 +++++++++---------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md b/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md index 6b97771f06..2003bcff47 100644 --- a/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md +++ b/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md @@ -1,80 +1,76 @@ -How to Monitor the Progress of a Linux Command Line Operation Using PV Command - 如何监控linux 命令行的命令执行进度 ================================================================================ + ![](https://www.maketecheasier.com/assets/uploads/2015/11/pv-featured-1.jpg) -If you’re a Linux system admin, there’s no doubt that you must be spending most of your work time on the command line – installing and removing packages; monitoring system stats; copying, moving, deleting stuff; debugging problems; and more. There are times when you fire a command, and it takes a while before the operation completes. However, there are also times when the command you executed just hangs, leaving you guessing as to what’s actually happening behind the scenes. 如果你是一个linux 系统管理员,那么毫无疑问你必须花费大量的工作时间在命令行上:安装和卸载软件,监视系统状态,复制、移动、删除文件,查错,等等。很多时候都是你输入一个命令,然后等待很长时间直到执行完成。也有的时候你执行的命令挂起了,而你只能猜测命令执行的实际情况。 -Usually, Linux commands provide no information related to the progress of the ongoing operation, something that is very important especially when you have limited time. However, that doesn’t mean you’re helpless – there exists a command, dubbed pv, that displays useful progress information related to the ongoing command line operation. In this article we will discuss this command as well as its features through some easy-to-understand examples. 通常linux命令不提供和进度相关的信息,而这些信息特别重要,尤其当你只有有限的时间时。然而这并不意味着你是无助的-现在有一个命令,pv,他会显示当前在命令行执行的命令的进度信息。在本文我们会讨论它并用几个简单的例子说明种特性。 ### PV 命令 ### -Developed by Andrew Wood, [PV][1] – which stands for Pipe Viewer – displays information related to the progress of data through a pipeline. The information includes time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA. +[PV][1] 由Andrew Wood 开发,是Pipe Viewer 的简称,意思是通过管道显示数据处理进度的信息。这些信息包括已经耗费的时间,完成的百分比(通过进度条显示),当前的速度,要传输的全部数据,以及估计剩余的时间。 +>"要使用PV,需要配合合适的选项,把它放置在两个进程之间的管道。命令的标准输入将会通过标准输出传进来的,而进度会被输出到标准错误输出。” -> “To use it, insert it in a pipeline between two processes, with the appropriate options. Its standard input will be passed through to its standard output and progress will be shown on standard error,” +上面解释了命令的主页(?) -The above explains the command’s man page. +### 下载和安装 ### -### Download and Installation ### - -Users of Debian-based systems like Ubuntu can easily install the utility by running the following command in terminal: +Debian 系的操作系统,如Ubuntu,可以简单的使用下面的命令安装PV: sudo apt-get install pv -If you’re using any other Linux distro, you can install the command using the package manager installed on your system. Once installed successfully you can use the command line utility in various scenarios (see the following section). It’s worth mentioning that pv version 1.2.0 has been used in all the examples mentioned in this article. +如果你使用了其他发行版本,你可以使用各自的包管理软件在你的系统上安装PV。一旦PV 安装好了你就可以在各种场合使用它(详见下文)。需要注意的是下面所有例子都可以正常的鱼pv 1.2.0 工作。 -### Features and Usage ### +### 特性和用法 ### -A very common scenario that probably most of us (who work on the command line in Linux) would relate to is copying a movie file from a USB drive to your computer. If you try to complete the aforementioned operation using the cp command, you’ll have to blindly wait until the copying is complete or some error is thrown. +我们(在linux 上使用命令行的用户)的大多数使用场景都会用到的命令是从一个USB 驱动器拷贝电影文件到你的电脑。如果你使用cp 来完成上面的任务,你会什么情况都不清楚知道整个复制过程结束或者出错。 -However, the pv command can be helpful in this case. Here is an example: +然而pv 命令在这种情景下很有帮助。比如: pv /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv -And here’s the output: +输出如下: ![pv-copy](https://www.maketecheasier.com/assets/uploads/2015/10/pv-copy.png) -So, as you can see above, the command shows a lot of useful information related to the ongoing operation, including the amount of data that has been transferred, time elapsed, rate of transfer, progress bar, progress in percentage, and the amount of time left. +所以,如你所见,这个命令显示了很多和操作有关的有用信息,包括已经传输了的数据量,花费的时间,传输速率,进度条,进度的百分比,已经剩余的时间。 -The `pv` command provides various display switches. For example, you can use `-p` for displaying percentage, `-t` for timer, `-r` for rate of transfer, `-e` for eta, and -b for byte counter. The good thing is that you won’t have to remember any of them, as all of them are enabled by default. However, should you exclusively require information related to only a particular display switch in the output, you can pass that switch in the pv command. +`pv` 命令提供了多种显示选项开关。比如,你可以使用`-p` 来显示百分比,`-t` 来显示时间,`-r` 表示传输速率,`-e` 代表eta(译注:估计剩余的时间)。好事是你不必记住某一个选项,因为默认这几个选项都是使能的。但是,如果你只要其中某一个信息,那么可以通过控制这几个选项来完成任务。 -There’s also a `-n` display switch that allows the command to display an integer percentage, one per line on standard error, instead of the regular visual progress indicator. The following is an example of this switch in action: +整理还有一个`-n` 选项来允许pv 命令显示整数百分比,在标准错误输出上每行显示一个数字,用来替代通常的视觉进度条。下面是一个例子: pv -n /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv ![pv-numeric](https://www.maketecheasier.com/assets/uploads/2015/10/pv-numeric.png) -This particular display switch is suitable in scenarios where you want to pipe the output into the [dialog][2] command. +这个特殊的选项非常合适某些情境下的需求,如你想把用管道把输出传给[dialog][2] 命令。 -Moving on, there’s also a command line option, `-L`, that lets you modify the data transfer rate of the pv command. For example, I used -L to limit the data transfer rate to 2MB/s. +接下来还有一个命令行选项,`-L` 可以让你修改pv 命令的传输速率。举个例子,使用-L 选项来限制传输速率为2MB/s。 pv -L 2m /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv ![pv-ratelimit](https://www.maketecheasier.com/assets/uploads/2015/10/pv-ratelimit.png) -As can be seen in the screenshot above, the data transfer rate was capped according to my direction. +如上图所见,数据传输速度按照我们的要求被限制了。 -Another scenario where `pv` can help is while compressing files. Here is an example of how you can use this command while compressing files using Gzip: +另一个pv 可以帮上忙的情景是压缩文件。这里有一个例子可以向你解释如何与压缩软件Gzip 一起工作。 pv /media/himanshu/1AC2-A8E3/fnf.mkv | gzip > ./Desktop/fnf.log.gz ![pv-gzip](https://www.maketecheasier.com/assets/uploads/2015/10/pv-gzip.png) -### Conclusion ### +### 结论 ### -As you have observed, pv is a useful little utility that could help you save your precious time in case a command line operation isn’t behaving as expected. Plus, the information it displays can also be used in shell scripts. I’d strongly recommend this command; it’s worth giving a try. +如上所述,pv 是一个非常有用的小工具,它可以在命令没有按照预期执行的情况下帮你节省你宝贵的时间。而且这些现实的信息还可以用在shell 脚本里。我强烈的推荐你使用这个命令,他值得你一试。 -------------------------------------------------------------------------------- via: https://www.maketecheasier.com/monitor-progress-linux-command-line-operation/ 作者:[Himanshu Arora][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ezio](https://github.com/oska874) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c6d2fdc8cd9c4a7a49eea70b03aed7e1554fbf30 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 21 Nov 2015 22:29:43 +0800 Subject: [PATCH 2508/2517] Create 20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md --- ...Command Line Operation Using PV Command.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 translated/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md diff --git a/translated/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md b/translated/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md new file mode 100644 index 0000000000..2003bcff47 --- /dev/null +++ b/translated/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md @@ -0,0 +1,80 @@ +如何监控linux 命令行的命令执行进度 +================================================================================ + +![](https://www.maketecheasier.com/assets/uploads/2015/11/pv-featured-1.jpg) + +如果你是一个linux 系统管理员,那么毫无疑问你必须花费大量的工作时间在命令行上:安装和卸载软件,监视系统状态,复制、移动、删除文件,查错,等等。很多时候都是你输入一个命令,然后等待很长时间直到执行完成。也有的时候你执行的命令挂起了,而你只能猜测命令执行的实际情况。 + +通常linux命令不提供和进度相关的信息,而这些信息特别重要,尤其当你只有有限的时间时。然而这并不意味着你是无助的-现在有一个命令,pv,他会显示当前在命令行执行的命令的进度信息。在本文我们会讨论它并用几个简单的例子说明种特性。 + +### PV 命令 ### + +[PV][1] 由Andrew Wood 开发,是Pipe Viewer 的简称,意思是通过管道显示数据处理进度的信息。这些信息包括已经耗费的时间,完成的百分比(通过进度条显示),当前的速度,要传输的全部数据,以及估计剩余的时间。 + +>"要使用PV,需要配合合适的选项,把它放置在两个进程之间的管道。命令的标准输入将会通过标准输出传进来的,而进度会被输出到标准错误输出。” + +上面解释了命令的主页(?) + +### 下载和安装 ### + +Debian 系的操作系统,如Ubuntu,可以简单的使用下面的命令安装PV: + + sudo apt-get install pv + +如果你使用了其他发行版本,你可以使用各自的包管理软件在你的系统上安装PV。一旦PV 安装好了你就可以在各种场合使用它(详见下文)。需要注意的是下面所有例子都可以正常的鱼pv 1.2.0 工作。 + +### 特性和用法 ### + +我们(在linux 上使用命令行的用户)的大多数使用场景都会用到的命令是从一个USB 驱动器拷贝电影文件到你的电脑。如果你使用cp 来完成上面的任务,你会什么情况都不清楚知道整个复制过程结束或者出错。 + +然而pv 命令在这种情景下很有帮助。比如: + + pv /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv + +输出如下: + +![pv-copy](https://www.maketecheasier.com/assets/uploads/2015/10/pv-copy.png) + +所以,如你所见,这个命令显示了很多和操作有关的有用信息,包括已经传输了的数据量,花费的时间,传输速率,进度条,进度的百分比,已经剩余的时间。 + +`pv` 命令提供了多种显示选项开关。比如,你可以使用`-p` 来显示百分比,`-t` 来显示时间,`-r` 表示传输速率,`-e` 代表eta(译注:估计剩余的时间)。好事是你不必记住某一个选项,因为默认这几个选项都是使能的。但是,如果你只要其中某一个信息,那么可以通过控制这几个选项来完成任务。 + +整理还有一个`-n` 选项来允许pv 命令显示整数百分比,在标准错误输出上每行显示一个数字,用来替代通常的视觉进度条。下面是一个例子: + + pv -n /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv + +![pv-numeric](https://www.maketecheasier.com/assets/uploads/2015/10/pv-numeric.png) + +这个特殊的选项非常合适某些情境下的需求,如你想把用管道把输出传给[dialog][2] 命令。 + +接下来还有一个命令行选项,`-L` 可以让你修改pv 命令的传输速率。举个例子,使用-L 选项来限制传输速率为2MB/s。 + + pv -L 2m /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv + +![pv-ratelimit](https://www.maketecheasier.com/assets/uploads/2015/10/pv-ratelimit.png) + +如上图所见,数据传输速度按照我们的要求被限制了。 + +另一个pv 可以帮上忙的情景是压缩文件。这里有一个例子可以向你解释如何与压缩软件Gzip 一起工作。 + + pv /media/himanshu/1AC2-A8E3/fnf.mkv | gzip > ./Desktop/fnf.log.gz + +![pv-gzip](https://www.maketecheasier.com/assets/uploads/2015/10/pv-gzip.png) + +### 结论 ### + +如上所述,pv 是一个非常有用的小工具,它可以在命令没有按照预期执行的情况下帮你节省你宝贵的时间。而且这些现实的信息还可以用在shell 脚本里。我强烈的推荐你使用这个命令,他值得你一试。 + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/monitor-progress-linux-command-line-operation/ + +作者:[Himanshu Arora][a] +译者:[ezio](https://github.com/oska874) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.maketecheasier.com/author/himanshu/ +[1]:http://linux.die.net/man/1/pv +[2]:http://linux.die.net/man/1/dialog From 93b08a073dc0afea501d27bbaec565509f7c8586 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sat, 21 Nov 2015 22:30:02 +0800 Subject: [PATCH 2509/2517] Delete 20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md --- ...Command Line Operation Using PV Command.md | 80 ------------------- 1 file changed, 80 deletions(-) delete mode 100644 sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md diff --git a/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md b/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md deleted file mode 100644 index 2003bcff47..0000000000 --- a/sources/tech/20151109 How to Monitor the Progress of a Linux Command Line Operation Using PV Command.md +++ /dev/null @@ -1,80 +0,0 @@ -如何监控linux 命令行的命令执行进度 -================================================================================ - -![](https://www.maketecheasier.com/assets/uploads/2015/11/pv-featured-1.jpg) - -如果你是一个linux 系统管理员,那么毫无疑问你必须花费大量的工作时间在命令行上:安装和卸载软件,监视系统状态,复制、移动、删除文件,查错,等等。很多时候都是你输入一个命令,然后等待很长时间直到执行完成。也有的时候你执行的命令挂起了,而你只能猜测命令执行的实际情况。 - -通常linux命令不提供和进度相关的信息,而这些信息特别重要,尤其当你只有有限的时间时。然而这并不意味着你是无助的-现在有一个命令,pv,他会显示当前在命令行执行的命令的进度信息。在本文我们会讨论它并用几个简单的例子说明种特性。 - -### PV 命令 ### - -[PV][1] 由Andrew Wood 开发,是Pipe Viewer 的简称,意思是通过管道显示数据处理进度的信息。这些信息包括已经耗费的时间,完成的百分比(通过进度条显示),当前的速度,要传输的全部数据,以及估计剩余的时间。 - ->"要使用PV,需要配合合适的选项,把它放置在两个进程之间的管道。命令的标准输入将会通过标准输出传进来的,而进度会被输出到标准错误输出。” - -上面解释了命令的主页(?) - -### 下载和安装 ### - -Debian 系的操作系统,如Ubuntu,可以简单的使用下面的命令安装PV: - - sudo apt-get install pv - -如果你使用了其他发行版本,你可以使用各自的包管理软件在你的系统上安装PV。一旦PV 安装好了你就可以在各种场合使用它(详见下文)。需要注意的是下面所有例子都可以正常的鱼pv 1.2.0 工作。 - -### 特性和用法 ### - -我们(在linux 上使用命令行的用户)的大多数使用场景都会用到的命令是从一个USB 驱动器拷贝电影文件到你的电脑。如果你使用cp 来完成上面的任务,你会什么情况都不清楚知道整个复制过程结束或者出错。 - -然而pv 命令在这种情景下很有帮助。比如: - - pv /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv - -输出如下: - -![pv-copy](https://www.maketecheasier.com/assets/uploads/2015/10/pv-copy.png) - -所以,如你所见,这个命令显示了很多和操作有关的有用信息,包括已经传输了的数据量,花费的时间,传输速率,进度条,进度的百分比,已经剩余的时间。 - -`pv` 命令提供了多种显示选项开关。比如,你可以使用`-p` 来显示百分比,`-t` 来显示时间,`-r` 表示传输速率,`-e` 代表eta(译注:估计剩余的时间)。好事是你不必记住某一个选项,因为默认这几个选项都是使能的。但是,如果你只要其中某一个信息,那么可以通过控制这几个选项来完成任务。 - -整理还有一个`-n` 选项来允许pv 命令显示整数百分比,在标准错误输出上每行显示一个数字,用来替代通常的视觉进度条。下面是一个例子: - - pv -n /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv - -![pv-numeric](https://www.maketecheasier.com/assets/uploads/2015/10/pv-numeric.png) - -这个特殊的选项非常合适某些情境下的需求,如你想把用管道把输出传给[dialog][2] 命令。 - -接下来还有一个命令行选项,`-L` 可以让你修改pv 命令的传输速率。举个例子,使用-L 选项来限制传输速率为2MB/s。 - - pv -L 2m /media/himanshu/1AC2-A8E3/fNf.mkv > ./Desktop/fnf.mkv - -![pv-ratelimit](https://www.maketecheasier.com/assets/uploads/2015/10/pv-ratelimit.png) - -如上图所见,数据传输速度按照我们的要求被限制了。 - -另一个pv 可以帮上忙的情景是压缩文件。这里有一个例子可以向你解释如何与压缩软件Gzip 一起工作。 - - pv /media/himanshu/1AC2-A8E3/fnf.mkv | gzip > ./Desktop/fnf.log.gz - -![pv-gzip](https://www.maketecheasier.com/assets/uploads/2015/10/pv-gzip.png) - -### 结论 ### - -如上所述,pv 是一个非常有用的小工具,它可以在命令没有按照预期执行的情况下帮你节省你宝贵的时间。而且这些现实的信息还可以用在shell 脚本里。我强烈的推荐你使用这个命令,他值得你一试。 - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/monitor-progress-linux-command-line-operation/ - -作者:[Himanshu Arora][a] -译者:[ezio](https://github.com/oska874) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.maketecheasier.com/author/himanshu/ -[1]:http://linux.die.net/man/1/pv -[2]:http://linux.die.net/man/1/dialog From 9a512afeaa21b5c7f2aacbdd252fb1cdfbc7721a Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 21 Nov 2015 23:13:45 +0800 Subject: [PATCH 2510/2517] Translating sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md --- ...1117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md b/sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md index a7847c46d4..de05f067b5 100644 --- a/sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md +++ b/sources/tech/20151117 Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10.md @@ -1,3 +1,4 @@ +ictlyh Translating Install PostgreSQL 9.4 And phpPgAdmin On Ubuntu 15.10 ================================================================================ ![](http://1426826955.rsc.cdn77.org/wp-content/uploads/2014/05/postgresql.png) From 651c07774553f84a1403df3bf5ccb9facb29536b Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 22 Nov 2015 02:50:52 +0800 Subject: [PATCH 2511/2517] translating by ezio --- ...51119 Going Beyond Hello World Containers is Hard Stuff.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md b/sources/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md index 0bdd6abadb..3a2fd08d6f 100644 --- a/sources/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md +++ b/sources/tech/20151119 Going Beyond Hello World Containers is Hard Stuff.md @@ -1,3 +1,5 @@ +translating by ezio + Going Beyond Hello World Containers is Hard Stuff ================================================================================ In [my previous post][1], I provided the basic concepts behind Linux container technology. I wrote as much for you as I did for me. Containers are new to me. And I figured having the opportunity to blog about the subject would provide the motivation to really learn the stuff. @@ -325,4 +327,4 @@ via: https://deis.com/blog/2015/beyond-hello-world-containers-hard-stuff [4]:https://docs.docker.com/reference/commandline/run/ [5]:https://docs.docker.com/reference/commandline/rm/ [6]:https://docs.docker.com/reference/commandline/rmi/ -[7]:http://twitter.com/RazielTabib \ No newline at end of file +[7]:http://twitter.com/RazielTabib From cfeb8b4c95534c0fec6e92915ebc5ca7ce490664 Mon Sep 17 00:00:00 2001 From: Ezio Date: Sun, 22 Nov 2015 03:09:15 +0800 Subject: [PATCH 2512/2517] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E6=BA=90=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Doubly linked list in the Linux Kernel.md | 257 ++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 sources/tech/20151122 Doubly linked list in the Linux Kernel.md diff --git a/sources/tech/20151122 Doubly linked list in the Linux Kernel.md b/sources/tech/20151122 Doubly linked list in the Linux Kernel.md new file mode 100644 index 0000000000..e6b5c97a77 --- /dev/null +++ b/sources/tech/20151122 Doubly linked list in the Linux Kernel.md @@ -0,0 +1,257 @@ +Data Structures in the Linux Kernel +================================================================================ + +Doubly linked list +-------------------------------------------------------------------------------- + +Linux kernel provides its own implementation of doubly linked list, which you can find in the [include/linux/list.h](https://github.com/torvalds/linux/blob/master/include/linux/list.h). We will start `Data Structures in the Linux kernel` from the doubly linked list data structure. Why? Because it is very popular in the kernel, just try to [search](http://lxr.free-electrons.com/ident?i=list_head) + +First of all, let's look on the main structure in the [include/linux/types.h](https://github.com/torvalds/linux/blob/master/include/linux/types.h): + +```C +struct list_head { + struct list_head *next, *prev; +}; +``` + +You can note that it is different from many implementations of doubly linked list which you have seen. For example, this doubly linked list structure from the [glib](http://www.gnu.org/software/libc/) library looks like : + +```C +struct GList { + gpointer data; + GList *next; + GList *prev; +}; +``` + +Usually a linked list structure contains a pointer to the item. The implementation of linked list in Linux kernel does not. So the main question is - `where does the list store the data?`. The actual implementation of linked list in the kernel is - `Intrusive list`. An intrusive linked list does not contain data in its nodes - A node just contains pointers to the next and previous node and list nodes part of the data that are added to the list. This makes the data structure generic, so it does not care about entry data type anymore. + +For example: + +```C +struct nmi_desc { + spinlock_t lock; + struct list_head head; +}; +``` + +Let's look at some examples to understand how `list_head` is used in the kernel. As I already wrote about, there are many, really many different places where lists are used in the kernel. Let's look for an example in miscellaneous character drivers. Misc character drivers API from the [drivers/char/misc.c](https://github.com/torvalds/linux/blob/master/drivers/char/misc.c) is used for writing small drivers for handling simple hardware or virtual devices. Those drivers share same major number: + +```C +#define MISC_MAJOR 10 +``` + +but have their own minor number. For example you can see it with: + +``` +ls -l /dev | grep 10 +crw------- 1 root root 10, 235 Mar 21 12:01 autofs +drwxr-xr-x 10 root root 200 Mar 21 12:01 cpu +crw------- 1 root root 10, 62 Mar 21 12:01 cpu_dma_latency +crw------- 1 root root 10, 203 Mar 21 12:01 cuse +drwxr-xr-x 2 root root 100 Mar 21 12:01 dri +crw-rw-rw- 1 root root 10, 229 Mar 21 12:01 fuse +crw------- 1 root root 10, 228 Mar 21 12:01 hpet +crw------- 1 root root 10, 183 Mar 21 12:01 hwrng +crw-rw----+ 1 root kvm 10, 232 Mar 21 12:01 kvm +crw-rw---- 1 root disk 10, 237 Mar 21 12:01 loop-control +crw------- 1 root root 10, 227 Mar 21 12:01 mcelog +crw------- 1 root root 10, 59 Mar 21 12:01 memory_bandwidth +crw------- 1 root root 10, 61 Mar 21 12:01 network_latency +crw------- 1 root root 10, 60 Mar 21 12:01 network_throughput +crw-r----- 1 root kmem 10, 144 Mar 21 12:01 nvram +brw-rw---- 1 root disk 1, 10 Mar 21 12:01 ram10 +crw--w---- 1 root tty 4, 10 Mar 21 12:01 tty10 +crw-rw---- 1 root dialout 4, 74 Mar 21 12:01 ttyS10 +crw------- 1 root root 10, 63 Mar 21 12:01 vga_arbiter +crw------- 1 root root 10, 137 Mar 21 12:01 vhci +``` + +Now let's have a close look at how lists are used in the misc device drivers. First of all, let's look on `miscdevice` structure: + +```C +struct miscdevice +{ + int minor; + const char *name; + const struct file_operations *fops; + struct list_head list; + struct device *parent; + struct device *this_device; + const char *nodename; + mode_t mode; +}; +``` + +We can see the fourth field in the `miscdevice` structure - `list` which is a list of registered devices. In the beginning of the source code file we can see the definition of misc_list: + +```C +static LIST_HEAD(misc_list); +``` + +which expands to the definition of variables with `list_head` type: + +```C +#define LIST_HEAD(name) \ + struct list_head name = LIST_HEAD_INIT(name) +``` + +and initializes it with the `LIST_HEAD_INIT` macro, which sets previous and next entries with the address of variable - name: + +```C +#define LIST_HEAD_INIT(name) { &(name), &(name) } +``` + +Now let's look on the `misc_register` function which registers a miscellaneous device. At the start it initializes `miscdevice->list` with the `INIT_LIST_HEAD` function: + +```C +INIT_LIST_HEAD(&misc->list); +``` + +which does the same as the `LIST_HEAD_INIT` macro: + +```C +static inline void INIT_LIST_HEAD(struct list_head *list) +{ + list->next = list; + list->prev = list; +} +``` + +In the next step after a device is created by the `device_create` function, we add it to the miscellaneous devices list with: + +``` +list_add(&misc->list, &misc_list); +``` + +Kernel `list.h` provides this API for the addition of a new entry to the list. Let's look at its implementation: + +```C +static inline void list_add(struct list_head *new, struct list_head *head) +{ + __list_add(new, head, head->next); +} +``` + +It just calls internal function `__list_add` with the 3 given parameters: + +* new - new entry. +* head - list head after which the new item will be inserted. +* head->next - next item after list head. + +Implementation of the `__list_add` is pretty simple: + +```C +static inline void __list_add(struct list_head *new, + struct list_head *prev, + struct list_head *next) +{ + next->prev = new; + new->next = next; + new->prev = prev; + prev->next = new; +} +``` + +Here we add a new item between `prev` and `next`. So `misc` list which we defined at the start with the `LIST_HEAD_INIT` macro will contain previous and next pointers to the `miscdevice->list`. + +There is still one question: how to get list's entry. There is a special macro: + +```C +#define list_entry(ptr, type, member) \ + container_of(ptr, type, member) +``` + +which gets three parameters: + +* ptr - the structure list_head pointer; +* type - structure type; +* member - the name of the list_head within the structure; + +For example: + +```C +const struct miscdevice *p = list_entry(v, struct miscdevice, list) +``` + +After this we can access to any `miscdevice` field with `p->minor` or `p->name` and etc... Let's look on the `list_entry` implementation: + +```C +#define list_entry(ptr, type, member) \ + container_of(ptr, type, member) +``` + +As we can see it just calls `container_of` macro with the same arguments. At first sight, the `container_of` looks strange: + +```C +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) +``` + +First of all you can note that it consists of two expressions in curly brackets. The compiler will evaluate the whole block in the curly braces and use the value of the last expression. + +For example: + +``` +#include + +int main() { + int i = 0; + printf("i = %d\n", ({++i; ++i;})); + return 0; +} +``` + +will print `2`. + +The next point is `typeof`, it's simple. As you can understand from its name, it just returns the type of the given variable. When I first saw the implementation of the `container_of` macro, the strangest thing I found was the zero in the `((type *)0)` expression. Actually this pointer magic calculates the offset of the given field from the address of the structure, but as we have `0` here, it will be just a zero offset along with the field width. Let's look at a simple example: + +```C +#include + +struct s { + int field1; + char field2; + char field3; +}; + +int main() { + printf("%p\n", &((struct s*)0)->field3); + return 0; +} +``` + +will print `0x5`. + +The next `offsetof` macro calculates offset from the beginning of the structure to the given structure's field. Its implementation is very similar to the previous code: + +```C +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +``` + +Let's summarize all about `container_of` macro. The `container_of` macro returns the address of the structure by the given address of the structure's field with `list_head` type, the name of the structure field with `list_head` type and type of the container structure. At the first line this macro declares the `__mptr` pointer which points to the field of the structure that `ptr` points to and assigns `ptr` to it. Now `ptr` and `__mptr` point to the same address. Technically we don't need this line but it's useful for type checking. The first line ensures that the given structure (`type` parameter) has a member called `member`. In the second line it calculates offset of the field from the structure with the `offsetof` macro and subtracts it from the structure address. That's all. + +Of course `list_add` and `list_entry` is not the only functions which `` provides. Implementation of the doubly linked list provides the following API: + +* list_add +* list_add_tail +* list_del +* list_replace +* list_move +* list_is_last +* list_empty +* list_cut_position +* list_splice +* list_for_each +* list_for_each_entry + +and many more. + + +via: https://github.com/0xAX/linux-insides/edit/master/DataStructures/dlist.md + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 40b098d7bdde51550376c9aba83b3908796b695d Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Nov 2015 17:23:48 +0800 Subject: [PATCH 2513/2517] PUB:20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0 @ictlyh --- ...etup Red Hat Ceph Storage on CentOS 7.0.md | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) rename {translated/tech => published}/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md (81%) diff --git a/translated/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md b/published/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md similarity index 81% rename from translated/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md rename to published/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md index 7e6ed0d2c2..4f00be2f90 100644 --- a/translated/tech/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md +++ b/published/20151012 How to Setup Red Hat Ceph Storage on CentOS 7.0.md @@ -1,9 +1,8 @@ 如何在 CentOS 7.0 上配置 Ceph 存储 -How to Setup Red Hat Ceph Storage on CentOS 7.0 ================================================================================ -Ceph 是一个将数据存储在单一分布式计算机集群上的开源软件平台。当你计划构建一个云时,你首先需要决定如何实现你的存储。开源的 CEPH 是红帽原生技术之一,它基于称为 RADOS 的对象存储系统,用一组网关 API 表示块、文件、和对象模式中的数据。由于它自身开源的特性,这种便携存储平台能在公有和私有云上安装和使用。Ceph 集群的拓扑结构是按照备份和信息分布设计的,这内在设计能提供数据完整性。它的设计目标就是容错、通过正确配置能运行于商业硬件和一些更高级的系统。 +Ceph 是一个将数据存储在单一分布式计算机集群上的开源软件平台。当你计划构建一个云时,你首先需要决定如何实现你的存储。开源的 Ceph 是红帽原生技术之一,它基于称为 RADOS 的对象存储系统,用一组网关 API 表示块、文件、和对象模式中的数据。由于它自身开源的特性,这种便携存储平台能在公有云和私有云上安装和使用。Ceph 集群的拓扑结构是按照备份和信息分布设计的,这种内在设计能提供数据完整性。它的设计目标就是容错、通过正确配置能运行于商业硬件和一些更高级的系统。 -Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要求最近的内核以及其它最新的库。在这篇指南中,我们会使用最小化安装的 CentOS-7.0。 +Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它需要最近的内核以及其它最新的库。在这篇指南中,我们会使用最小化安装的 CentOS-7.0。 ### 系统资源 ### @@ -25,11 +24,11 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 ### 安装前的配置 ### -在安装 CEPH 存储之前,我们要在每个节点上完成一些步骤。第一件事情就是确保每个节点的网络已经配置好并且能相互访问。 +在安装 Ceph 存储之前,我们要在每个节点上完成一些步骤。第一件事情就是确保每个节点的网络已经配置好并且能相互访问。 **配置 Hosts** -要在每个节点上配置 hosts 条目,要像下面这样打开默认的 hosts 配置文件。 +要在每个节点上配置 hosts 条目,要像下面这样打开默认的 hosts 配置文件(LCTT 译注:或者做相应的 DNS 解析)。 # vi /etc/hosts @@ -46,9 +45,9 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 **配置防火墙** -如果你正在使用启用了防火墙的限制性环境,确保在你的 CEPH 存储管理节点和客户端节点中开放了以下的端口。 +如果你正在使用启用了防火墙的限制性环境,确保在你的 Ceph 存储管理节点和客户端节点中开放了以下的端口。 -你必须在你的 Admin Calamari 节点开放 80、2003、以及4505-4506 端口,并且允许通过 80 号端口到 CEPH 或 Calamari 管理节点,以便你网络中的客户端能访问 Calamari web 用户界面。 + 你必须在你的 Admin Calamari 节点开放 80、2003、以及4505-4506 端口,并且允许通过 80 号端口到 CEPH 或 Calamari 管理节点,以便你网络中的客户端能访问 Calamari web 用户界面。 你可以使用下面的命令在 CentOS 7 中启动并启用防火墙。 @@ -62,7 +61,7 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 #firewall-cmd --zone=public --add-port=4505-4506/tcp --permanent #firewall-cmd --reload -在 CEPH Monitor 节点,你要在防火墙中允许通过以下端口。 +在 Ceph Monitor 节点,你要在防火墙中允许通过以下端口。 #firewall-cmd --zone=public --add-port=6789/tcp --permanent @@ -82,9 +81,9 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 #yum update #shutdown -r 0 -### 设置 CEPH 用户 ### +### 设置 Ceph 用户 ### -现在我们会新建一个单独的 sudo 用户用于在每个节点安装 ceph-deploy工具,并允许该用户无密码访问每个节点,因为它需要在 CEPH 节点上安装软件和配置文件而不会有输入密码提示。 +现在我们会新建一个单独的 sudo 用户用于在每个节点安装 ceph-deploy工具,并允许该用户无密码访问每个节点,因为它需要在 Ceph 节点上安装软件和配置文件而不会有输入密码提示。 运行下面的命令在 ceph-storage 主机上新建有独立 home 目录的新用户。 @@ -100,7 +99,7 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 ### 设置 SSH 密钥 ### -现在我们会在 ceph 管理节点生成 SSH 密钥并把密钥复制到每个 Ceph 集群节点。 +现在我们会在 Ceph 管理节点生成 SSH 密钥并把密钥复制到每个 Ceph 集群节点。 在 ceph-node 运行下面的命令复制它的 ssh 密钥到 ceph-storage。 @@ -125,7 +124,8 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 ### 配置 PID 数目 ### -要配置 PID 数目的值,我们会使用下面的命令检查默认的内核值。默认情况下,是一个小的最大线程数 32768. +要配置 PID 数目的值,我们会使用下面的命令检查默认的内核值。默认情况下,是一个小的最大线程数 32768。 + 如下图所示通过编辑系统配置文件配置该值为一个更大的数。 ![更改 PID 值](http://blog.linoxide.com/wp-content/uploads/2015/10/3-PID-value.png) @@ -142,9 +142,9 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 #rpm -Uhv http://ceph.com/rpm-giant/el7/noarch/ceph-release-1-0.el7.noarch.rpm -![添加 EPEL](http://blog.linoxide.com/wp-content/uploads/2015/10/k1.png) +![添加 Ceph 仓仓库](http://blog.linoxide.com/wp-content/uploads/2015/10/k1.png) -或者创建一个新文件并更新 CEPH 库参数,别忘了替换你当前的 Release 和版本号。 +或者创建一个新文件并更新 Ceph 库参数,别忘了替换你当前的 Release 和版本号。 [root@ceph-storage ~]# vi /etc/yum.repos.d/ceph.repo @@ -160,7 +160,7 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 之后更新你的系统并安装 ceph-deploy 软件包。 -### 安装 CEPH-Deploy 软件包 ### +### 安装 ceph-deploy 软件包 ### 我们运行下面的命令以及 ceph-deploy 安装命令来更新系统以及最新的 ceph 库和其它软件包。 @@ -181,15 +181,16 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 ![设置 ceph 集群](http://blog.linoxide.com/wp-content/uploads/2015/10/k4.png) 如果成功执行了上面的命令,你会看到它新建了配置文件。 -现在配置 CEPH 默认的配置文件,用任意编辑器打开它并在会影响你公共网络的 global 参数下面添加以下两行。 + +现在配置 Ceph 默认的配置文件,用任意编辑器打开它并在会影响你公共网络的 global 参数下面添加以下两行。 #vim ceph.conf osd pool default size = 1 public network = 45.79.0.0/16 -### 安装 CEPH ### +### 安装 Ceph ### -现在我们准备在和 CEPH 集群相关的每个节点上安装 CEPH。我们使用下面的命令在 ceph-storage 和 ceph-node 上安装 CEPH。 +现在我们准备在和 Ceph 集群相关的每个节点上安装 Ceph。我们使用下面的命令在 ceph-storage 和 ceph-node 上安装 Ceph。 #ceph-deploy install ceph-node ceph-storage @@ -201,7 +202,7 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 #ceph-deploy mon create-initial -![CEPH 初始化监视器](http://blog.linoxide.com/wp-content/uploads/2015/10/k6.png) +![Ceph 初始化监视器](http://blog.linoxide.com/wp-content/uploads/2015/10/k6.png) ### 设置 OSDs 和 OSD 守护进程 ### @@ -223,9 +224,9 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 #ceph-deploy admin ceph-node ceph-storage -### 测试 CEPH ### +### 测试 Ceph ### -我们几乎完成了 CEPH 集群设置,让我们在 ceph 管理节点上运行下面的命令检查正在运行的 ceph 状态。 +我们快完成了 Ceph 集群设置,让我们在 ceph 管理节点上运行下面的命令检查正在运行的 ceph 状态。 #ceph status #ceph health @@ -235,7 +236,7 @@ Ceph 能在任何 Linux 发行版上安装,但为了能正确运行,它要 ### 总结 ### -在这篇详细的文章中我们学习了如何使用两台安装了 CentOS 7 的虚拟机设置 CEPH 存储集群,这能用于备份或者作为用于处理其它虚拟机的本地存储。我们希望这篇文章能对你有所帮助。当你试着安装的时候记得分享你的经验。 +在这篇详细的文章中我们学习了如何使用两台安装了 CentOS 7 的虚拟机设置 Ceph 存储集群,这能用于备份或者作为用于处理其它虚拟机的本地存储。我们希望这篇文章能对你有所帮助。当你试着安装的时候记得分享你的经验。 -------------------------------------------------------------------------------- @@ -243,7 +244,7 @@ via: http://linoxide.com/storage/setup-red-hat-ceph-storage-centos-7-0/ 作者:[Kashif Siddique][a] 译者:[ictlyh](http://mutouxiaogui.cn/blog/) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 08cee56e88eaaa6c2b5c3e9b6cba1016508305e6 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Nov 2015 17:58:43 +0800 Subject: [PATCH 2514/2517] PUB:20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu @geekpi --- ...hell-Script-Opens-In-Text Editor In Ubuntu.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename {translated/tech => published}/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md (52%) diff --git a/translated/tech/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md b/published/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md similarity index 52% rename from translated/tech/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md rename to published/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md index f1d9f7253f..da44814e11 100644 --- a/translated/tech/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md +++ b/published/20151007-Fix-Shell-Script-Opens-In-Text Editor In Ubuntu.md @@ -1,26 +1,26 @@ -修复Sheell脚本在Ubuntu中用文本编辑器打开的方式 +修复 Shell 脚本在 Ubuntu 中的默认打开方式 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/Run-Shell-Script-on-Double-Click.jpg) -当你双击一个脚本(.sh文件)的时候,你想要做的是什么?通常的想法是执行它。但是在Ubuntu下面却不是这样,或者我应该更确切地说是在Files(Nautilus)中。你可能会疯狂地大叫“运行文件,运行文件”,但是文件没有运行而是用Gedit打开了。 +当你双击一个脚本(.sh文件)的时候,你想要做的是什么?通常的想法是执行它。但是在Ubuntu下面却不是这样,或者我应该更确切地说是在Files(Nautilus)中。你可能会疯狂地大叫“运行文件,运行文件”,但是文件没有运行而是用Gedit打开了。 -我知道你也许会说文件有可执行权限么?我会说是的。脚本有可执行权限但是当我双击它的时候,它还是用文本编辑器打开了。我不希望这样如果你遇到了同样的问题,我想你也许也不需要这样。 +我知道你也许会说文件有可执行权限么?我会说是的。脚本有可执行权限但是当我双击它的时候,它还是用文本编辑器打开了。我不希望这样,如果你遇到了同样的问题,我想你也许也想要这样。 -我知道你或许已经被建议在终端下面运行,我知道这个可行但是这不是一个在GUI下不能运行的借口是么? +我知道你或许已经被建议在终端下面执行,我知道这个可行,但是这不是一个在GUI下不能运行的借口是么? 这篇教程中,我们会看到**如何在双击后运行shell脚本。** #### 修复在Ubuntu中shell脚本用文本编辑器打开的方式 #### -shell脚本用文件编辑器打开的原因是Files(Ubuntu中的文件管理器)中的默认行为设置。在更早的版本中,它或许会询问你是否运行文件或者用编辑器打开。默认的行位在新的版本中被修改了。 +shell脚本用文件编辑器打开的原因是Files(Ubuntu中的文件管理器)中的默认行为设置。在更早的版本中,它或许会询问你是否运行文件或者用编辑器打开。默认的行为在新的版本中被修改了。 要修复这个,进入文件管理器,并在菜单中点击**选项**: ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/execute-shell-program-ubuntu-1.png) -接下来在**文件选项**中进入**行为**标签中,你会看到**文本文件执行**选项。 +接下来在**文件选项(Files Preferences)**中进入**行为(Behavior)**标签中,你会看到**可执行的文本文件(Executable Text Files)**选项。 -默认情况下,它被设置成“在打开是显示文本文件”。我建议你把它改成“每次询问”,这样你可以选择是执行还是编辑了,当然了你也可以选择默认执行。你可以自行选择。 +默认情况下,它被设置成“在打开时显示文本文件(View executable text files when they are opend)”。我建议你把它改成“每次询问(Ask each time)”,这样你可以选择是执行还是编辑了,当然了你也可以选择“在打开时云可执行文本文件(Run executable text files when they are opend)”。你可以自行选择。 ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/10/execute-shell-program-ubuntu-2.png) @@ -32,7 +32,7 @@ via: http://itsfoss.com/shell-script-opens-text-editor/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 053330a32942b937892fb5d7675d2edc13e2d2f6 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Nov 2015 23:23:49 +0800 Subject: [PATCH 2515/2517] PUB:20151117 N1--The Next Generation Open Source Email Client @geekpi --- ...1--The Next Generation Open Source Email Client.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) rename {translated/share => published}/20151117 N1--The Next Generation Open Source Email Client.md (77%) diff --git a/translated/share/20151117 N1--The Next Generation Open Source Email Client.md b/published/20151117 N1--The Next Generation Open Source Email Client.md similarity index 77% rename from translated/share/20151117 N1--The Next Generation Open Source Email Client.md rename to published/20151117 N1--The Next Generation Open Source Email Client.md index 6ffe067ef6..b2cbb4c4ea 100644 --- a/translated/share/20151117 N1--The Next Generation Open Source Email Client.md +++ b/published/20151117 N1--The Next Generation Open Source Email Client.md @@ -2,22 +2,21 @@ N1:下一代开源邮件客户端 ================================================================================ ![N1 Open Source email client](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/N1-email-client.png) -当我们谈论到Linux中的邮件客户端,通常上 Thunderbird、Geary 和 [Evolution][3] 会出现在我们的脑海。作为对这些大咖们的挑战,一款新的开源邮件客户端正在涌入市场。 - +当我们谈论到Linux中的邮件客户端,通常 Thunderbird、Geary 和 [Evolution][3] 就会出现在我们的脑海。作为对这些大咖们的挑战,一款新的开源邮件客户端正在涌入市场。 ### 设计和功能 ### -[N1][4]是一个同时聚焦设计和功能的下一代开源邮件客户端。作为一个开源软件,N1目前支持 Linux 和 Mac OS X,Windows的版本还在开发中。 +[N1][4]是一个设计与功能并重的新一代开源邮件客户端。作为一个开源软件,N1目前支持 Linux 和 Mac OS X,Windows的版本还在开发中。 -N1宣传它自己为“可扩展的开源邮件客户端”,因为它包含了 Javascript 插件架构,任何人都可以为它创建强大的新功能。可扩展是一个非常流行的功能,它帮助[开源编辑器Atom][5]变得流行。N1同样把重点放在了可扩展上面。 +N1宣传它自己为“可扩展的开源邮件客户端”,因为它包含了 Javascript 插件框架,任何人都可以为它创建强大的新功能。可扩展是一个非常流行的功能,它帮助[开源编辑器Atom][5]变得流行。N1同样把重点放在了可扩展上面。 除了可扩展性,N1同样着重设计了程序的外观。下面N1的截图就是个很好的例子: ![N1 Open Source email client on Mac OS X](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/11/N1-email-client-1.jpeg) -Mac OS X上的N1客户端。图片来自:N1 +*Mac OS X上的N1客户端。图片来自:N1* -除了这个功能,N1兼容上百的邮件提供商包括Gmail、Yahoo、iCloud、Microsoft Exchange等等,桌面应用提供离线功能。 +除了这个功能,N1兼容上百个邮件服务提供商,包括Gmail、Yahoo、iCloud、Microsoft Exchange等等,这个桌面应用提供了离线功能。 ### 目前只能邀请使用 ### From 8b6b3c2d77cde27a69d1b2c1297ad413e2b4f0e4 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Nov 2015 23:24:47 +0800 Subject: [PATCH 2516/2517] PUB:20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application @Ricky-Gong --- ...our To-Do Lists in Ubuntu Using Go For It Application.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md (91%) diff --git a/translated/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md b/published/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md similarity index 91% rename from translated/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md rename to published/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md index 9671ff2ecd..81a298a227 100644 --- a/translated/tech/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md +++ b/published/20151105 How to Manage Your To-Do Lists in Ubuntu Using Go For It Application.md @@ -1,4 +1,4 @@ -如何在 Ubuntu 上用 Go For It 管理您的待办清单 (To-Do Lists) +如何在 Ubuntu 上用 Go For It 管理您的待办清单 ================================================================================ ![](https://www.maketecheasier.com/assets/uploads/2015/10/gfi-featured1.jpg) @@ -8,7 +8,7 @@ ### Go For It ### -[Go For It][1] (GFI) 由 Manuel Kehl 开发,他声称:“这是款简单易用且时尚优雅的生产力软件,以待办清单(To-Do List)为主打特色,并整合了一个能让你专注于当前事务的定时器。”这款软件的定时器功能尤其有趣,它还可以确保您在继续工作之前暂停下来,放松一段时间。 +[Go For It][1] (GFI) 由 Manuel Kehl 开发,他声称:“这是款简单易用且时尚优雅的生产力软件,以待办清单(To-Do List)为主打特色,并整合了一个能让你专注于当前事务的定时器。”这款软件的定时器功能尤其有趣,它还可以让您在继续工作之前暂停下来,放松一段时间。 ### 下载并安装 ### @@ -67,7 +67,7 @@ GFI 也能让您稍微调整一些它的设置。例如,下图所示的设置 ### 结论### -正如您所看到的,GFI 是一款简洁明了且易于使用的任务管理软件。虽然它不提供非常丰富的功能,但它实现了它的承诺,定时器的整合特别有用。如果您正在寻找一款实现了基础功能,并且开源的 Linux 任务管理软件,Go For It 值得您一试。 +正如您所看到的,GFI 是一款简洁明了且易于使用的任务管理软件。虽然它没有提供非常丰富的功能,但它实现了它的承诺,定时器的整合特别有用。如果您正在寻找一款实现了基础功能,并且开源的 Linux 任务管理软件,Go For It 值得您一试。 -------------------------------------------------------------------------------- From 838a0e1353f06b48636b28aa2162887a7936f6a9 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 22 Nov 2015 23:50:15 +0800 Subject: [PATCH 2517/2517] PUB:20150831 How to switch from NetworkManager to systemd-networkd on Linux @ictlyh --- ...orkManager to systemd-networkd on Linux.md | 165 ++++++++++++++ ...orkManager to systemd-networkd on Linux.md | 202 ------------------ 2 files changed, 165 insertions(+), 202 deletions(-) create mode 100644 published/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md delete mode 100644 translated/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md diff --git a/published/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md b/published/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md new file mode 100644 index 0000000000..658d6c033d --- /dev/null +++ b/published/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md @@ -0,0 +1,165 @@ +如何在 Linux 上从 NetworkManager 切换为 systemd-network +================================================================================ +在 Linux 世界里,对 [systemd][1] 的采用一直是激烈争论的主题,它的支持者和反对者之间的战火仍然在燃烧。到了今天,大部分主流 Linux 发行版都已经采用了 systemd 作为默认的初始化(init)系统。 + +正如其作者所说,作为一个 “从未完成、从未完善、但一直追随技术进步” 的系统,systemd 已经不只是一个初始化进程,它被设计为一个更广泛的系统以及服务管理平台,这个平台是一个包含了不断增长的核心系统进程、库和工具的生态系统。 + +**systemd** 的其中一部分是 **systemd-networkd**,它负责 systemd 生态中的网络配置。使用 systemd-networkd,你可以为网络设备配置基础的 DHCP/静态 IP 网络。它还可以配置虚拟网络功能,例如网桥、隧道和 VLAN。systemd-networkd 目前还不能直接支持无线网络,但你可以使用 wpa_supplicant 服务配置无线适配器,然后把它和 **systemd-networkd** 联系起来。 + +在很多 Linux 发行版中,NetworkManager 仍然作为默认的网络配置管理器。和 NetworkManager 相比,**systemd-networkd** 仍处于积极的开发状态,还缺少一些功能。例如,它还不能像 NetworkManager 那样能让你的计算机在任何时候通过多种接口保持连接。它还没有为更高层面的脚本编程提供 ifup/ifdown 钩子函数。但是,systemd-networkd 和其它 systemd 组件(例如用于域名解析的 **resolved**、NTP 的**timesyncd**,用于命名的 udevd)结合的非常好。随着时间增长,**systemd-networkd**只会在 systemd 环境中扮演越来越重要的角色。 + +如果你对 **systemd-networkd** 的进步感到高兴,从 NetworkManager 切换到 systemd-networkd 是值得你考虑的一件事。如果你强烈反对 systemd,对 NetworkManager 或[基础网络服务][2]感到很满意,那也很好。 + +但对于那些想尝试 systemd-networkd 的人,可以继续看下去,在这篇指南中学会在 Linux 中怎么从 NetworkManager 切换到 systemd-networkd。 + +### 需求 ### + +systemd 210 及其更高版本提供了 systemd-networkd。因此诸如 Debian 8 "Jessie" (systemd 215)、 Fedora 21 (systemd 217)、 Ubuntu 15.04 (systemd 219) 或更高版本的 Linux 发行版和 systemd-networkd 兼容。 + +对于其它发行版,在开始下一步之前先检查一下你的 systemd 版本。 + + $ systemctl --version + +### 从 NetworkManager 切换到 Systemd-networkd ### + +从 NetworkManager 切换到 systemd-networkd 其实非常简答(反过来也一样)。 + +首先,按照下面这样先停用 NetworkManager 服务,然后启用 systemd-networkd。 + + $ sudo systemctl disable NetworkManager + $ sudo systemctl enable systemd-networkd + +你还要启用 **systemd-resolved** 服务,systemd-networkd用它来进行域名解析。该服务还实现了一个缓存式 DNS 服务器。 + + $ sudo systemctl enable systemd-resolved + $ sudo systemctl start systemd-resolved + +当启动后,**systemd-resolved** 就会在 /run/systemd 目录下某个地方创建它自己的 resolv.conf。但是,把 DNS 解析信息存放在 /etc/resolv.conf 是更普遍的做法,很多应用程序也会依赖于 /etc/resolv.conf。因此为了兼容性,按照下面的方式创建一个到 /etc/resolv.conf 的符号链接。 + + $ sudo rm /etc/resolv.conf + $ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf + +### 用 systemd-networkd 配置网络连接 ### + +要用 systemd-networkd 配置网络服务,你必须指定带.network 扩展名的配置信息文本文件。这些网络配置文件保存到 /etc/systemd/network 并从这里加载。当有多个文件时,systemd-networkd 会按照字母顺序一个个加载并处理。 + +首先创建 /etc/systemd/network 目录。 + + $ sudo mkdir /etc/systemd/network + +#### DHCP 网络 #### + +首先来配置 DHCP 网络。对于此,先要创建下面的配置文件。文件名可以任意,但记住文件是按照字母顺序处理的。 + + $ sudo vi /etc/systemd/network/20-dhcp.network + +---------- + + [Match] + Name=enp3* + + [Network] + DHCP=yes + +正如你上面看到的,每个网络配置文件包括了一个或多个 “sections”,每个 “section”都用 [XXX] 开头。每个 section 包括了一个或多个键值对。`[Match]` 部分决定这个配置文件配置哪个(些)网络设备。例如,这个文件匹配所有名称以 ens3 开头的网络设备(例如 enp3s0、 enp3s1、 enp3s2 等等)对于匹配的接口,然后启用 [Network] 部分指定的 DHCP 网络配置。 + +### 静态 IP 网络 ### + +如果你想给网络设备分配一个静态 IP 地址,那就新建下面的配置文件。 + + $ sudo vi /etc/systemd/network/10-static-enp3s0.network + +---------- + + [Match] + Name=enp3s0 + + [Network] + Address=192.168.10.50/24 + Gateway=192.168.10.1 + DNS=8.8.8.8 + +正如你猜测的, enp3s0 接口地址会被指定为 192.168.10.50/24,默认网关是 192.168.10.1, DNS 服务器是 8.8.8.8。这里微妙的一点是,接口名 enp3s0 事实上也匹配了之前 DHCP 配置中定义的模式规则。但是,根据词汇顺序,文件 "10-static-enp3s0.network" 在 "20-dhcp.network" 之前被处理,对于 enp3s0 接口静态配置比 DHCP 配置有更高的优先级。 + +一旦你完成了创建配置文件,重启 systemd-networkd 服务或者重启机器。 + + $ sudo systemctl restart systemd-networkd + +运行以下命令检查服务状态: + + $ systemctl status systemd-networkd + $ systemctl status systemd-resolved + +![](https://farm1.staticflickr.com/719/21010813392_76abe123ed_c.jpg) + +### 用 systemd-networkd 配置虚拟网络设备 ### + +**systemd-networkd** 同样允许你配置虚拟网络设备,例如网桥、VLAN、隧道、VXLAN、绑定等。你必须在用 .netdev 作为扩展名的文件中配置这些虚拟设备。 + +这里我展示了如何配置一个桥接接口。 + +#### Linux 网桥 #### + +如果你想创建一个 Linux 网桥(br0) 并把物理接口(eth1) 添加到网桥,你可以新建下面的配置。 + + $ sudo vi /etc/systemd/network/bridge-br0.netdev + +---------- + + [NetDev] + Name=br0 + Kind=bridge + +然后按照下面这样用 .network 文件配置网桥接口 br0 和从接口 eth1。 + + $ sudo vi /etc/systemd/network/bridge-br0-slave.network + +---------- + + [Match] + Name=eth1 + + [Network] + Bridge=br0 + +---------- + + $ sudo vi /etc/systemd/network/bridge-br0.network + +---------- + + [Match] + Name=br0 + + [Network] + Address=192.168.10.100/24 + Gateway=192.168.10.1 + DNS=8.8.8.8 + +最后,重启 systemd-networkd。 + + $ sudo systemctl restart systemd-networkd + +你可以用 [brctl 工具][3] 来验证是否创建好了网桥 br0。 + +### 总结 ### + +当 systemd 誓言成为 Linux 的系统管理器时,有类似 systemd-networkd 的东西来管理网络配置也就不足为奇。但是在现阶段,systemd-networkd 看起来更适合于网络配置相对稳定的服务器环境。对于桌面/笔记本环境,它们有多种临时有线/无线接口,NetworkManager 仍然是比较好的选择。 + +对于想进一步了解 systemd-networkd 的人,可以参考官方[man 手册][4]了解完整的支持列表和关键点。 + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/switch-from-networkmanager-to-systemd-networkd.html + +作者:[Dan Nanni][a] +译者:[ictlyh](http://mutouxiaogui.cn/blog) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/use-systemd-system-administration-debian.html +[2]:http://xmodulo.com/disable-network-manager-linux.html +[3]:http://xmodulo.com/how-to-configure-linux-bridge-interface.html +[4]:http://www.freedesktop.org/software/systemd/man/systemd.network.html diff --git a/translated/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md b/translated/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md deleted file mode 100644 index 1a1fe6b35a..0000000000 --- a/translated/tech/20150831 How to switch from NetworkManager to systemd-networkd on Linux.md +++ /dev/null @@ -1,202 +0,0 @@ -如何在 Linux 中从 NetworkManager 切换为 systemd-network -How to switch from NetworkManager to systemd-networkd on Linux -================================================================================ -在 Linux 世界里, [systemd][1] 的采用一直是激烈争论的主题,它的支持者和反对者之间的战火仍然在燃烧。到了今天,大部分主流 Linux 发行版都已经采用了 systemd 作为默认初始化系统。 -In the world of Linux, adoption of [systemd][1] has been a subject of heated controversy, and the debate between its proponents and critics is still going on. As of today, most major Linux distributions have adopted systemd as a default init system. - -正如其作者所说,作为一个 “从未完成、从未完善、但一直追随技术进步” 的系统,systemd 已经不只是一个初始化进程,它被设计为一个更广泛的系统以及服务管理平台,这个;平台包括了不断增长的核心系统进程、库和工具的生态系统。 -Billed as a "never finished, never complete, but tracking progress of technology" by its author, systemd is not just the init daemon, but is designed as a more broad system and service management platform which encompasses the growing ecosystem of core system daemons, libraries and utilities. - -**systemd** 的其中一部分是 **systemd-networkd**,它负责 systemd 生态中的网络配置。使用 systemd-networkd,你可以为网络设备配置基础的 DHCP/静态 IP 网络。它还可以配置虚拟网络功能,例如网桥、隧道和 VLAN。systemd-networkd 目前还不能直接支持无线网络,但你可以使用 wpa_supplicant 服务配置无线适配器,然后用 **systemd-networkd** 挂钩起来。 -One of many additions to **systemd** is **systemd-networkd**, which is responsible for network configuration within the systemd ecosystem. Using systemd-networkd, you can configure basic DHCP/static IP networking for network devices. It can also configure virtual networking features such as bridges, tunnels or VLANs. Wireless networking is not directly handled by systemd-networkd, but you can use wpa_supplicant service to configure wireless adapters, and then hook it up with **systemd-networkd**. - -在很多 Linux 发行版中,NetworkManager 仍然作为默认的网络配置管理器。和 NetworkManager 相比,**systemd-networkd** 仍处于活跃的开发状态,还缺少一些功能。例如,它还不能像 NetworkManager 那样能在任何时候让你的计算机在多种接口之间保持连接。它还没有为高级脚本提供 ifup/ifdown 钩子函数。但是,systemd-networkd 和其它 systemd 组件(例如用于域名解析的 **resolved**、NTP 的**timesyncd**,用于命名的 udevd)结合的非常好。随着时间增长,**systemd-networkd**只会在 systemd 环境中扮演越来越重要的角色。 -On many Linux distributions, NetworkManager has been and is still used as a default network configuration manager. Compared to NetworkManager, **systemd-networkd** is still under active development, and missing features. For example, it does not have NetworkManager's intelligence to keep your computer connected across various interfaces at all times. It does not provide ifup/ifdown hooks for advanced scripting. Yet, systemd-networkd is integrated well with the rest of systemd components (e.g., **resolved** for DNS, **timesyncd** for NTP, udevd for naming), and the role of **systemd-networkd** may only grow over time in the systemd environment. - -如果你对 **systemd-networkd** 的进步感到高兴,从 NetworkManager 切换到 systemd-networkd 是值得你考虑的一件事。如果你强烈反对 systemd,对 NetworkManager 或[基础网络服务][2]感到很满意,那也很好。 -If you are happy with the way **systemd** is evolving, one thing you can consider is to switch from NetworkManager to systemd-networkd. If you are feverishly against systemd, and perfectly happy with NetworkManager or [basic network service][2], that is totally cool. - -但对于那些想尝试 systemd-networkd 的人,可以继续看下去,在这篇指南中学会在 Linux 中怎么从 NetworkManager 切换到 systemd-networkd。 -But for those of you who want to try out systemd-networkd, you can read on, and find out in this tutorial how to switch from NetworkManager to systemd-networkd on Linux. - -### 需求 ### -### Requirement ### - -systemd 210 或更高版本提供了 systemd-networkd。因此诸如 Debian 8 "Jessie" (systemd 215)、 Fedora 21 (systemd 217)、 Ubuntu 15.04 (systemd 219) 或更高版本的 Linux 发行版和 systemd-networkd 兼容。 -systemd-networkd is available in systemd version 210 and higher. Thus distributions like Debian 8 "Jessie" (systemd 215), Fedora 21 (systemd 217), Ubuntu 15.04 (systemd 219) or later are compatible with systemd-networkd. - -对于其它发行版,在开始下一步之前先检查一下你的 systemd 版本。 -For other distributions, check the version of your systemd before proceeding. - - $ systemctl --version - -### 从 NetworkManager 切换到 Systemd-networkd ### -### Switch from Network Manager to Systemd-Networkd ### - -从 NetworkManager 切换到 systemd-networkd 其实非常简答(反过来也一样)。 -It is relatively straightforward to switch from Network Manager to systemd-networkd (and vice versa). - -首先,按照下面这样先停用 NetworkManager 服务,然后启用 systemd-networkd。 -First, disable Network Manager service, and enable systemd-networkd as follows. - - $ sudo systemctl disable NetworkManager - $ sudo systemctl enable systemd-networkd - -你还要启用 **systemd-resolved** 服务,systemd-networkd用它来进行域名解析。该服务还实现了一个缓存式 DNS 服务器。 -You also need to enable **systemd-resolved** service, which is used by systemd-networkd for network name resolution. This service implements a caching DNS server. - - $ sudo systemctl enable systemd-resolved - $ sudo systemctl start systemd-resolved - -一旦启动,**systemd-resolved** 就会在 /run/systemd 目录下某个地方创建它自己的 resolv.conf。但是,把 DNS 解析信息存放在 /etc/resolv.conf 是更普遍的做法,很多应用程序也会依赖于 /etc/resolv.conf。因此为了兼容性,按照下面的方式创建一个到 /etc/resolv.conf 的符号链接。 -Once started, **systemd-resolved** will create its own resolv.conf somewhere under /run/systemd directory. However, it is a common practise to store DNS resolver information in /etc/resolv.conf, and many applications still rely on /etc/resolv.conf. Thus for compatibility reason, create a symlink to /etc/resolv.conf as follows. - - $ sudo rm /etc/resolv.conf - $ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf - -### 用 systemd-networkd 配置网络连接 ### -### Configure Network Connections with Systemd-networkd ### - -要用 systemd-networkd 配置网络服务,你必须指定带.network 扩展名的配置信息文本文件。这些网络配置文件保存到 /etc/systemd/network 并从这里加载。当有多个文件时,systemd-networkd 会按照词汇顺序一个个加载并处理。 -To configure network devices with systemd-networkd, you must specify configuration information in text files with .network extension. These network configuration files are then stored and loaded from /etc/systemd/network. When there are multiple files, systemd-networkd loads and processes them one by one in lexical order. - -首先创建 /etc/systemd/network 目录。 -Let's start by creating a folder /etc/systemd/network. - - $ sudo mkdir /etc/systemd/network - -#### DHCP 网络 #### -#### DHCP Networking #### - -首先来配置 DHCP 网络。对于此,先要创建下面的配置文件。文件名可以任意,但记住文件是按照词汇顺序处理的。 -Let's configure DHCP networking first. For this, create the following configuration file. The name of a file can be arbitrary, but remember that files are processed in lexical order. - - $ sudo vi /etc/systemd/network/20-dhcp.network - ----------- - - [Match] - Name=enp3* - - [Network] - DHCP=yes - -正如你上面看到的,每个网络配置文件包括了一个多多个 “sections”,每个 “section”都用 [XXX] 开头。每个 section 包括了一个或多个键值对。[Match] 部分决定这个配置文件配置哪个(些)网络设备。例如,这个文件匹配所有名称以 ens3 开头的网络设备(例如 enp3s0、 enp3s1、 enp3s2 等等)对于匹配的接口,然后启用 [Network] 部分指定的 DHCP 网络配置。 -As you can see above, each network configuration file contains one or more "sections" with each section preceded by [XXX] heading. Each section contains one or more key/value pairs. The [Match] section determine which network device(s) are configured by this configuration file. For example, this file matches any network interface whose name starts with ens3 (e.g., enp3s0, enp3s1, enp3s2, etc). For matched interface(s), it then applies DHCP network configuration specified under [Network] section. - -### 静态 IP 网络 ### -### Static IP Networking ### - -如果你想给网络设备分配一个静态 IP 地址,那就新建下面的配置文件。 -If you want to assign a static IP address to a network interface, create the following configuration file. - - $ sudo vi /etc/systemd/network/10-static-enp3s0.network - ----------- - - [Match] - Name=enp3s0 - - [Network] - Address=192.168.10.50/24 - Gateway=192.168.10.1 - DNS=8.8.8.8 - -正如你猜测的, enp3s0 接口地址会被指定为 192.168.10.50/24,默认网关是 192.168.10.1, DNS 服务器是 8.8.8.8。这里微妙的一点是,接口名 enp3s0 事实上也匹配了之前 DHCP 配置中定义的模式规则。但是,根据词汇顺序,文件 "10-static-enp3s0.network" 在 "20-dhcp.network" 之前被处理,对于 enp3s0 接口静态配置比 DHCP 配置有更高的优先级。 -As you can guess, the interface enp3s0 will be assigned an address 192.168.10.50/24, a default gateway 192.168.10.1, and a DNS server 8.8.8.8. One subtlety here is that the name of an interface enp3s0, in facts, matches the pattern rule defined in the earlier DHCP configuration as well. However, since the file "10-static-enp3s0.network" is processed before "20-dhcp.network" according to lexical order, the static configuration takes priority over DHCP configuration in case of enp3s0 interface. - -一旦你完成了创建配置文件,重启 systemd-networkd 服务或者重启机器。 -Once you are done with creating configuration files, restart systemd-networkd service or reboot. - - $ sudo systemctl restart systemd-networkd - -运行以下命令检查服务状态: -Check the status of the service by running: - - $ systemctl status systemd-networkd - $ systemctl status systemd-resolved - -![](https://farm1.staticflickr.com/719/21010813392_76abe123ed_c.jpg) - -### 用 systemd-networkd 配置虚拟网络设备 ### -### Configure Virtual Network Devices with Systemd-networkd ### - -**systemd-networkd** 同样允许你配置虚拟网络设备,例如网桥、VLAN、隧道、VXLAN、绑定等。你必须在用 .netdev 作为扩展名的文件中配置这些虚拟设备。 -**systemd-networkd** also allows you to configure virtual network devices such as bridges, VLANs, tunnel, VXLAN, bonding, etc. You must configure these virtual devices in files with .netdev extension. - -这里我展示了如何配置一个桥接接口。 -Here I'll show how to configure a bridge interface. - -#### Linux 网桥 #### -#### Linux Bridge #### - -如果你想创建一个 Linux 网桥(br0) 并把物理接口(eth1) 添加到网桥,你可以新建下面的配置。 -If you want to create a Linux bridge (br0) and add a physical interface (eth1) to the bridge, create the following configuration. - - $ sudo vi /etc/systemd/network/bridge-br0.netdev - ----------- - - [NetDev] - Name=br0 - Kind=bridge - -然后按照下面这样用 .network 文件配置网桥接口 br0 和从接口 eth1。 -Then configure the bridge interface br0 and the slave interface eth1 using .network files as follows. - - $ sudo vi /etc/systemd/network/bridge-br0-slave.network - ----------- - - [Match] - Name=eth1 - - [Network] - Bridge=br0 - ----------- - - $ sudo vi /etc/systemd/network/bridge-br0.network - ----------- - - [Match] - Name=br0 - - [Network] - Address=192.168.10.100/24 - Gateway=192.168.10.1 - DNS=8.8.8.8 - -最后,重启 systemd-networkd。 -Finally, restart systemd-networkd: - - $ sudo systemctl restart systemd-networkd - -你可以用 [brctl 工具][3] 来验证是否创建了网桥 br0。 -You can use [brctl tool][3] to verify that a bridge br0 has been created. - -### 总结 ### -### Summary ### - -当 systemd 誓言成为 Linux 的系统管理器时,有类似 systemd-networkd 的东西来管理网络配置也就不足为奇。但是在现阶段,systemd-networkd 看起来更适合于网络配置相对稳定的服务器环境。对于桌面/笔记本环境,它们有多种临时有线/无线接口,NetworkManager 仍然是比较好的选择。 -When systemd promises to be a system manager for Linux, it is no wonder something like systemd-networkd came into being to manage network configurations. At this stage, however, systemd-networkd seems more suitable for a server environment where network configurations are relatively stable. For desktop/laptop environments which involve various transient wired/wireless interfaces, NetworkManager may still be a preferred choice. - -对于想进一步了解 systemd-networkd 的人,可以参考官方[man 手册][4]了解完整的支持列表和关键点。 -For those who want to check out more on systemd-networkd, refer to the official [man page][4] for a complete list of supported sections and keys. - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/switch-from-networkmanager-to-systemd-networkd.html - -作者:[Dan Nanni][a] -译者:[ictlyh](http://mutouxiaogui.cn/blog) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/nanni -[1]:http://xmodulo.com/use-systemd-system-administration-debian.html -[2]:http://xmodulo.com/disable-network-manager-linux.html -[3]:http://xmodulo.com/how-to-configure-linux-bridge-interface.html -[4]:http://www.freedesktop.org/software/systemd/man/systemd.network.html

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 Ils^jm4_=!k7ytkO From e0857ebb0b263caf9432c70e395b55489a14adf8 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 29 Mar 2015 20:22:25 +0800 Subject: [PATCH 0401/2517] PUB:20150121 How to apply image effects to pictures on Raspberry Pi @coloka --- ...w to apply image effects to pictures on Raspberry Pi.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150121 How to apply image effects to pictures on Raspberry Pi.md (71%) diff --git a/translated/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md b/published/20150121 How to apply image effects to pictures on Raspberry Pi.md similarity index 71% rename from translated/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md rename to published/20150121 How to apply image effects to pictures on Raspberry Pi.md index f767522855..4cbdc0fcb8 100644 --- a/translated/tech/20150121 How to apply image effects to pictures on Raspberry Pi.md +++ b/published/20150121 How to apply image effects to pictures on Raspberry Pi.md @@ -2,7 +2,7 @@ ================================================================================ 现在使用[树莓派摄像头模组][1]("raspi cam"),也可以像使用卡片相机那样,给拍摄的照片增加各种各样的图片特效。 raspistill命令行工具,为您的树莓派提供了丰富的图片特效选项,来美化处理你的图片。 -你可以用[这3个命令行工具][2]来[抓取raspicam拍摄的照片或者视频][3],在这文章中将重点介绍其中的raspstill工具。raspstill工具提供了丰富的控制选项来处理图片,比如说:锐度(sharpness)、对比度(contrast)、亮度(brightness)、饱和度(saturation)、ISO、自动白平衡(AWB)、以及图片特效(image effect)等。 +有[三个命令行工具][2]可以用于[抓取raspicam拍摄的照片或者视频][3],在这文章中将重点介绍其中的raspstill工具。raspstill工具提供了丰富的控制选项来处理图片,比如说:锐度(sharpness)、对比度(contrast)、亮度(brightness)、饱和度(saturation)、ISO、自动白平衡(AWB)、以及图片特效(image effect)等。 在这篇文章中,将介绍如何使用raspstill工具以及raspicam摄像头模组来控制照片的曝光、AWB以及其他的图片效果。我写了一个简单的python脚本来自动拍摄照片并在这些照片上自动应用各种图片特效。raspicam的帮助文档中介绍了该摄像头模组所支持的曝光模式、AWB和图片特效。总的来说,raspicam一共支持16种图片特效、12种曝光模式以及10种AWB选项。 @@ -27,7 +27,6 @@ Python脚本很简单,如下所示 。 time.sleep(0.25) print "End of image capture" -The Python script operates as follows. First, create three array/list variable for the exposure, AWB and image effects. In the example, we use 2 types of exposure, 3 types of AWB, and 13 types of image effects values. Then make nested loops for applying the value of the three variables that we have. Inside the nested loop, execute the raspistill application. We specify (1) the output filename; (2) exposure value; (3) AWB value; (4) image effect value; (5) the time to take a photo, which is set to 1 second; and (6) the size of the photo, which is set to 640x480px. This Python script will create 78 different versions of a captured photo with a combination of 2 types of exposure, 3 types of AWB, and 13 types of image effects. 这个脚本完成了以下几个工作。首先,脚本中定义了3个列表,分别用于枚举曝光模式、AWB模式以及图片特效。在这个实例中,我们将使用到2种曝光模式、3种AWB模式以及13种图片特效。脚本会遍历上述3种选项的各种组合,并使用这些参数组合来运行raspistill工具。传入的参数共6个,分别为:(1)输出文件名;(2)曝光模式;(3)AWB模式;(4)图片特效模式;(5)拍照时间,设为1秒;(6)图片尺寸,设为640x480。脚本会自动拍摄78张照片,每张照片会应用不同的特效参数。 @@ -41,7 +40,7 @@ The Python script operates as follows. First, create three array/list variable f ### 小福利 ### -除了使用raspistill命令行工具来操控raspicam摄像模组以外,还有其他的方法可以用哦。[Picamera][4]是一个python库,它提供了操控raspicam摄像模组的的API接口,这样就可以便捷地构建更加复杂的应用程序。如果你精通python,那么picamera一定是你项目的好伙伴。picamera已经被默认集成到Raspbian最新版本的的镜像中。当然,如果你用的不是最新的Raspbian或者是使用其他的操作系统版本,你可以通过下面的方法来进行手动安装。 +除了使用raspistill命令行工具来操控raspicam摄像模组以外,还有其他的方法可以用哦。[Picamera][4]是一个python库,它提供了操控raspicam摄像模组的的API接口,这样就可以便捷地构建更加复杂的应用程序。如果你精通python,那么picamera一定是你的 hack 项目的好伙伴。picamera已经被默认集成到Raspbian最新版本的的镜像中。当然,如果你用的不是最新的Raspbian或者是使用其他的操作系统版本,你可以通过下面的方法来进行手动安装。 首先,先在你的系统上安装pip,详见[指导][6]。 @@ -57,7 +56,7 @@ via: http://xmodulo.com/apply-image-effects-pictures-raspberrypi.html 作者:[Kristophorus Hadiono][a] 译者:[coloka](https://github.com/coloka) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From bb17eea419213c3c6fdf06bce3cf1c74c4d033e7 Mon Sep 17 00:00:00 2001 From: VicYu Date: Mon, 30 Mar 2015 09:48:31 +0800 Subject: [PATCH 0402/2517] Update 20150326 A Peep into Process Management Commands in Linux.md --- ...150326 A Peep into Process Management Commands in Linux.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150326 A Peep into Process Management Commands in Linux.md b/sources/tech/20150326 A Peep into Process Management Commands in Linux.md index f05ed62768..e1df53bab5 100644 --- a/sources/tech/20150326 A Peep into Process Management Commands in Linux.md +++ b/sources/tech/20150326 A Peep into Process Management Commands in Linux.md @@ -1,3 +1,5 @@ + Vic020 + A Peep into Process Management Commands in Linux ================================================================================ A program in execution is called a process. While a program is an executable file present in storage and is passive, a process is a dynamic entity comprising of allocated system resources, memory, security attributes and has a state associated with it. There can be multiple processes associated with the same program and operating simultaneously without interfering with each other. The operating system efficiently manages and keeps track of all the processes running in the system. @@ -188,4 +190,4 @@ via: http://linoxide.com/linux-command/process-management-commands-linux/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/bnpoornima/ \ No newline at end of file +[a]:http://linoxide.com/author/bnpoornima/ From fb9950cdb94922f04ed20571bc5510970ba20787 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 30 Mar 2015 12:22:55 +0800 Subject: [PATCH 0403/2517] Translating by ZTinoZ --- ...324 How to Host Open Source Code Repository in github.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md index eebbfac7ee..40bc045b47 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -1,14 +1,14 @@ 怎样在Github上做开源代码库的主人 ================================================================================ -大家好,今天我们要学习一下怎样在github.com上的开源软件库中源代码的主人。GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features. It provides a workplace to host powerful collaboration, code review, and code management for open source and private projects. Unlike Git, which is strictly a command-line tool, GitHub provides a web-based graphical interface and desktop as well as mobile integration. GitHub offers both paid plans for private repositories and free accounts, which are usually used to host open-source software projects. +大家好,今天我们要学习一下怎样管理github.com库中的开源软件源代码。GitHub是一个基于web的Git库托管服务,提供分布式修改控制和Git的源代码管理(SCM)功能并加入了自身的特点。它给开源和私有项目提供了一个互相协作的工作区、代码预览和代码管理功能。不像Git,一个完完全全的命令行工具,GitHub提供了一个基于web的图形化界面和桌面,也整合了手机。GitHub同时提供了私有库付费计划和免费账号,都是用来管理开源软件项目的。 ![github universe logo](http://blog.linoxide.com/wp-content/uploads/2015/03/github-universe.jpg) -It is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Anyone can host their software's source code in github's repository for the use, contribution, sharing, issue tracking and many more by millions of people across the globe. Here are some easy and quick steps to easily host software's source code. +这是一种快速灵活,基于web的托管服务,它使用方便,管理分布式修改控制系统也是相当容易,任何人都能为了将它们使用、贡献、共享、问题跟踪和更多的全球各地数以百万计的人在github的库里管理他们的软件源代码。这里有一些简单快速地管理软件源代码的方法。 ### 1. 创建一个新的Github账号 ### -First of all, open your favorite browser and go to Github's homepage url ie [github][1]. Then, the homepage will be opened as shown below. +首先First of all, open your favorite browser and go to Github's homepage url ie [github][1]. Then, the homepage will be opened as shown below. ![Github Homepage](http://blog.linoxide.com/wp-content/uploads/2015/03/github-homepage.png) From 1b53d1157810b9d641dc4df1b4d1a590d47f1746 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 29 Mar 2015 20:29:12 +0800 Subject: [PATCH 0404/2517] PUB:20150123 Keep History Of Notifications With Recent Notifications AppIndicator @geekpi --- ...fications With Recent Notifications AppIndicator.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md (81%) diff --git a/translated/tech/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md b/published/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md similarity index 81% rename from translated/tech/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md rename to published/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md index 2cc7a4778a..4437f991b9 100644 --- a/translated/tech/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md +++ b/published/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md @@ -1,12 +1,12 @@ -使用最近通知工具保持通知历史 +使用“最近通知工具”保持桌面通知历史 ================================================================================ ![How to see recent notifications in Ubuntu 14.04](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/recent_notifications_Ubuntu_14.jpeg) -大多数桌面环境像Unity和Gnome都有通知特性。我很喜欢其中一些。它尤其当我[在Ubuntu上收听流媒体][1]时帮到我。默认上通知会在桌面的顶部显示几秒接着就会小时。如果你听见了通知的声音但是没有看到内容怎么办?你该如何知道通知的内容? +大多数桌面环境像Unity和Gnome都有通知特性。我很喜欢其中一些。它尤其当我[在Ubuntu上收听流媒体][1]时帮到我。默认上通知会在桌面的顶部显示几秒接着就会消失。如果你听见了通知的声音但是没有看到内容怎么办?你该如何知道通知的内容? 如果你可以看到最近所有通知的历史会很棒吧?是的,我知道这很棒。你可以在Ubuntu Unity或者Gnome中使用最近**通知小工具**来追踪所有的最近通知。 -最近通知位于顶部面板,并且有最近所有通知的历史。当它捕获到新的通知后,它就会变绿来表明你有未读的通知。 +最近通知位于顶部面板,并且记录了最近所有通知的历史。当它捕获到新的通知后,它就会变绿来表明你有未读的通知。 ![Recent notifications in Ubuntu 14.04](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/01/recent_notifications_Ubuntu.jpeg) @@ -24,7 +24,7 @@ sudo apt-get update sudo apt-get install indicator-notifications -安装完成后,重新登录后你就可以用了。现在它是没有通知的状态。很方便的小工具,不是么? +安装完成后,重新登录后你就可以用了。现在妈妈再也不用担心我的通知没看到了。很方便的小工具,不是么? -------------------------------------------------------------------------------- @@ -32,7 +32,7 @@ via: http://itsfoss.com/notifications-appindicator/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From ed120cb9f7c5c970ac0b5626f65e380d4acecab8 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 29 Mar 2015 20:45:41 +0800 Subject: [PATCH 0405/2517] PUB:20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian @geekpi --- ...nstall ixgbe driver on Ubuntu or Debian.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md (84%) diff --git a/translated/tech/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md b/published/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md similarity index 84% rename from translated/tech/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md rename to published/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md index aab015201e..bcaa1b3c26 100644 --- a/translated/tech/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md +++ b/published/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md @@ -1,10 +1,10 @@ -Linux 有问必答: 如何在Ubuntu或者Debian中下载和安装ixgbe驱动 +Linux 有问必答:如何在Ubuntu或者Debian中编译安装ixgbe驱动 ================================================================================ -> **提问**: 我想为我的Intel 10G网卡下载安装最新的ixgbe。我该如何在Ubuntu(或者Debian)中安装ixgbe驱动? +> **提问**: 我想为我的Intel 10G网卡下载安装最新的ixgbe驱动。我该如何在Ubuntu(或者Debian)中安装ixgbe驱动? -Intel的10G网卡(比如,82598、 82599、 x540)由ixgbe驱动支持。现代的Linux发版已经将ixgbe作为一个可加载模块。然而,有些情况你不想要你机器上的已经编译和安装的ixgbe驱动。比如,你想要体验ixbge驱动的最新特性。同样,自带内核中的ixgbe中的一个默认问题是不允许你自定义旭东内核参数。如果你想要完全自动一ixgbe驱动(比如 RSS、多队列、中断阈值等等),你需要手动从源码编译ixgbe驱动。 +Intel的10G网卡(比如,82598、 82599、 x540)由ixgbe驱动支持。现代的Linux发行版已经带有了ixgbe驱动,通过可加载模块的方式使用。然而,有些情况你希望在你机器上的自己编译安装ixgbe驱动,比如,你想要体验ixbge驱动的最新特性时。同样,内核默认自带的ixgbe驱动中的一个问题是不允许你自定义驱动的参数。如果你想要一个完全定制的ixgbe驱动(比如 RSS、多队列、中断阈值等等),你需要手动从源码编译ixgbe驱动。 -这里是如何在Ubuntu、Debian或者它们的衍生版中下载安装ixgbe驱动。 +这里是如何在Ubuntu、Debian或者它们的衍生版中下载安装ixgbe驱动的教程。 ### 第一步: 安装前提 ### @@ -29,7 +29,7 @@ Intel的10G网卡(比如,82598、 82599、 x540)由ixgbe驱动支持。现 编译之后,你会看到在ixgbe-3.23.2/src目录下创建了**ixgbe.ko**。这就是会加载到内核之中的ixgbe驱动。 -用modinfo命令检查内核模块的信息。注意你需要指定模块的绝对路径(比如 ./ixgbe.ko 或者 /home/xmodulo/ixgbe/ixgbe-3.23.2/src/ixgbe.ko)。输出中会显示ixgbe内核的版本。 +用modinfo命令检查内核模块的信息。注意你需要指定模块文件的绝对路径(比如 ./ixgbe.ko 或者 /home/xmodulo/ixgbe/ixgbe-3.23.2/src/ixgbe.ko)。输出中会显示ixgbe内核的版本。 $ modinfo ./ixgbe.ko @@ -120,24 +120,24 @@ Intel的10G网卡(比如,82598、 82599、 x540)由ixgbe驱动支持。现 ### 第五步: 安装Ixgbe驱动 ### -一旦你验证新的ixgbe驱动已经成功家在,最后一步是在你的系统中安装驱动。 +一旦你验证新的ixgbe驱动可以成功加载,最后一步是在你的系统中安装驱动。 $ sudo make install -**ixgbe.ko** 接着会安装在/lib/modules//kernel/drivers/net/ethernet/intel/ixgbe 下。 +**ixgbe.ko** 会安装在/lib/modules//kernel/drivers/net/ethernet/intel/ixgbe 下。 -这一步起,你可以用下面的modprobe命令加载ixgbe驱动了。注意你不必再指定绝对路径。 +从这一步起,你可以用下面的modprobe命令加载ixgbe驱动了。注意你不必再指定绝对路径。 $ sudo modprobe ixgbe -如果你希望在启动时家在ixgbe驱动,你可以在/etc/modules的最后加入“ixgbe”。 +如果你希望在启动时加载ixgbe驱动,你可以在/etc/modules的最后加入“ixgbe”。 -------------------------------------------------------------------------------- via: http://ask.xmodulo.com/download-install-ixgbe-driver-ubuntu-debian.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 61351ee8da1816c298846f6859d57ca2e6c43ae6 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 30 Mar 2015 13:38:51 +0800 Subject: [PATCH 0406/2517] PUB:20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @zpl1025 又是一篇重量级! --- ... Your Linux OS X Unix Shell Environment.md | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) rename {translated/tech => published}/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md (93%) diff --git a/translated/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md b/published/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md similarity index 93% rename from translated/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md rename to published/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md index 2709602c87..2dc0d43263 100644 --- a/translated/tech/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md +++ b/published/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md @@ -1,6 +1,6 @@ Shell入门:掌握Linux,OS X,Unix的Shell环境 ================================================================================ -在Linux或类Unix系统中,每个用户和进程都运行在一个特定环境中。这个环境包含了变量,设置,别名,函数以及更多的。下面是对Shell环境下一些常用命令的简单介绍,包括每个命令如何使用的例子,以及在命令行下设定你自己的环境来提高效率。 +在Linux或类Unix系统中,每个用户和进程都运行在一个特定环境中。这个环境包含了变量、设置、别名、函数以及更多的东西。下面是对Shell环境下一些常用命令的简单介绍,包括每个命令如何使用的例子,以及在命令行下设定你自己的环境来提高效率。 ![](http://s0.cyberciti.org/uploads/cms/2015/01/bash-shell-welcome-image.jpg) @@ -18,7 +18,8 @@ Shell入门:掌握Linux,OS X,Unix的Shell环境 输出范例: [![图1: Finding out your shell name](http://s0.cyberciti.org/uploads/cms/2015/01/finding-your-shell-like-a-pro.jpg)][1] -图1:找出当前的shell + +*图1:找出当前的shell* ### 找出所有已安装的shell ### @@ -32,9 +33,10 @@ Shell入门:掌握Linux,OS X,Unix的Shell环境 输出范例: [![Fig.02: Finding out your shell path](http://s0.cyberciti.org/uploads/cms/2015/01/finding-and-verifying-shell-path.jpg)][2] -图2:找出shell的路径 -文件/etc/shells里包含了系统支持的shell列表。每一行代表一个shell,是相对根目录的完整路径。用这个[cat命令][3]来查看这些数据: +*图2:找出shell的路径* + +文件/etc/shells里包含了系统所支持的shell列表。每一行代表一个shell,是相对根目录的完整路径。用这个[cat命令][3]来查看这些数据: cat /etc/shells @@ -71,7 +73,8 @@ Shell入门:掌握Linux,OS X,Unix的Shell环境 示例输出: [![Fig. 03: Bash shell nesting level (subshell numbers)](http://s0.cyberciti.org/uploads/cms/2015/01/a-nested-shell-level-command.jpg)][4] -图3:Bash shell嵌套层级(子shell数目) + +*图3:Bash shell嵌套层级(子shell数目)* ### 通过chsh命令永久变更系统shell ### @@ -83,9 +86,9 @@ Shell入门:掌握Linux,OS X,Unix的Shell环境 sudo chsh -s /bin/ksh userNameHere -### 查看当前的环境 ### +### 查看当前的环境变量 ### -你需要用到 +你需要用到: env env | more @@ -118,7 +121,8 @@ Shell入门:掌握Linux,OS X,Unix的Shell环境 下面是bash shell里一些常见变量的列表: ![Fig.04: Common bash environment variables](http://s0.cyberciti.org/uploads/cms/2015/01/common-shell-vars.jpg) -图4:常见bash环境变量 + +*图4:常见bash环境变量* > **注意**:下面这些环境变量没事不要乱改。很可能会造成不稳定的shell会话: > @@ -157,7 +161,7 @@ Shell入门:掌握Linux,OS X,Unix的Shell环境 /home/vivek -### 增加或设定一个新变量 ### +### 增加或设定一个新环境变量 ### 下面是bash,zsh,sh和ksh的语法: @@ -225,7 +229,8 @@ Shell入门:掌握Linux,OS X,Unix的Shell环境 示例输出: [![Fig.05: List all bash environment configuration files](http://s0.cyberciti.org/uploads/cms/2015/01/list-bash-enviroment-variables.jpg)][5] -图5:列出bash的所有配置文件 + +*图5:列出bash的所有配置文件* 要查看所有的bash配置文件,输入: @@ -241,7 +246,7 @@ Shell入门:掌握Linux,OS X,Unix的Shell环境 sudo cp -v /etc/bashrc /etc/bashrc.bak.22_jan_15 ######################################################################## - ## 然后,随心所欲随便改吧,好好玩玩shell环境或者提高一下效率:) ## + ## 然后,随心所欲随便改吧,好好玩玩shell环境或者提高一下效率:) ## ######################################################################## sudo vim /etc/bashrc @@ -326,14 +331,15 @@ zsh的[wiki][6]中建议用下面的命令: 示例输出: [![Fig.06: View session history in the bash shell using history command](http://s0.cyberciti.org/uploads/cms/2015/01/history-outputs.jpg)][7] -图6:在bash shell中使用history命令查看会话历史 -你可以重复使用命令。简单地按下[上]或[下]方向键就可以查看之前的命令。在shell提示符下按下[CTRL-R]可以向后搜索历史缓存或文件来查找命令。重复最后一次命令,只需要在shell提示符下输入!!就好了: +*图6:在bash shell中使用history命令查看会话历史* + +你可以重复使用之前的命令。简单地按下[上]或[下]方向键就可以查看之前的命令。在shell提示符下按下[CTRL-R]可以向后搜索历史缓存或文件来查找命令。重复最后一次命令,只需要在shell提示符下输入!!就好了: ls -l /foo/bar !! -在以上的历史记录中查看命令#93 (hddtemp /dev/sda),输入: +在以上的历史记录中找到命令#93 (hddtemp /dev/sda),输入: !93 @@ -483,7 +489,7 @@ Bash/ksh/zsh函数允许你更进一步地配置shell环境。在这个例子中 最后,[打开bash命令补齐][12] - source /etc/bash_completio + source /etc/bash_completion #### #2: 设定bash命令提示符 #### @@ -511,7 +517,7 @@ Bash/ksh/zsh函数允许你更进一步地配置shell环境。在这个例子中 # 为命令历史文件增加时间戳 export HISTTIMEFORMAT="%F %T " - # 附加到命令历史文件,俄不是覆盖 + # 附加到命令历史文件,而不是覆盖 shopt -s histappend #### #5: 设定shell会话的时区 #### @@ -561,7 +567,7 @@ Bash/ksh/zsh函数允许你更进一步地配置shell环境。在这个例子中 # 清理那些.DS_Store文件 alias dsclean='find . -type f -name .DS_Store -delete' -#### #8: 让世界充满色彩 #### +#### #8: 寡人好色 #### # 彩色的grep输出 alias grep='grep --color=auto' @@ -669,7 +675,7 @@ via: http://www.cyberciti.biz/howto/shell-primer-configuring-your-linux-unix-osx 作者:[nixCraft][a] 译者:[zpl1025](https://github.com/zpl1025) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e6c768c3b5f205354e6609e3491873bd8ed646c4 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 30 Mar 2015 13:44:53 +0800 Subject: [PATCH 0407/2517] PUB:20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu @geekpi --- ...Check If A Package Is Installed Or Not In Ubuntu.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename {translated/tech => published}/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md (93%) diff --git a/translated/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md b/published/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md similarity index 93% rename from translated/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md rename to published/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md index 9139b8dd92..a5bdc115e2 100644 --- a/translated/tech/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md +++ b/published/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md @@ -1,6 +1,6 @@ -Linux 基础:如何在Ubuntu上检查是否已经安装了一个包 +Linux 基础:如何在Ubuntu上检查一个软件包是否安装 ================================================================================ -![](http://180016988.r.cdn77.net/wp-content/uploads/2014/04/ubuntu-790x558.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2014/04/ubuntu-790x558.png) 如果你正在管理Debian或者Ubuntu服务器,你也许会经常使用**dpkg** 或者 **apt-get**命令。这两个命令用来安装、卸载和更新包。 @@ -51,7 +51,7 @@ Linux 基础:如何在Ubuntu上检查是否已经安装了一个包 +++-====================================-=======================-=======================-============================================================================= ii firefox 35.0+build3-0ubuntu0.14 amd64 Safe and easy web browser from Mozilla -要列出你系统中安装的包,输入下面的命令: +要列出你系统中安装的所有包,输入下面的命令: dpkg --get-selections @@ -97,7 +97,7 @@ Linux 基础:如何在Ubuntu上检查是否已经安装了一个包 libgcc1:amd64 install libgcc1:i386 install -额外的,你可以使用“**-L**”参数来找出包中文件的位置。 +此外,你可以使用“**-L**”参数来找出包中文件的位置。 dpkg -L gcc-4.8 @@ -130,7 +130,7 @@ via: http://www.unixmen.com/linux-basics-check-package-installed-not-ubuntu/ 作者:[SK][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9b20eb8a7a16f18f266dafd4135921c0eb602d37 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 30 Mar 2015 14:12:26 +0800 Subject: [PATCH 0408/2517] PUB:20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7 @geekpi --- ...Without Rebooting on CentOS 7 or RHEL 7.md | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md (81%) diff --git a/translated/tech/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md b/published/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md similarity index 81% rename from translated/tech/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md rename to published/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md index 104f05e0a7..d54877bd36 100644 --- a/translated/tech/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md +++ b/published/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md @@ -1,17 +1,18 @@ -如何不用重启在CentOS 7/ RHEL 7中添加一块新硬盘 +如何不用重启在CentOS 7/ RHEL 7虚拟机中添加一块新硬盘 ================================================================================ 通常在你在虚拟机中添加一块新硬盘时,你可能会看到新硬盘没有自动加载。这是因为连接到硬盘的SCSI总线需要重新扫描来使得新硬盘可见。这里有一个简单的命令来重新扫描SCSI总线和SCSI设备。下面这几步在CentOS 7 和RHEL 7 中测试过。 1. 在ESXi或者vCenter中添加一块新的20G硬盘: -![](http://www.ehowstuff.com/wp-content/uploads/2015/01/Create-new-LVM-CentOS7-1.png) + ![](http://www.ehowstuff.com/wp-content/uploads/2015/01/Create-new-LVM-CentOS7-1.png) 2. 显示当前磁盘分区: - [root@centos7 ~]# fdisk -l + [root@centos7 ~]# fdisk -l ----------- + ---------- + ``` Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes @@ -33,20 +34,22 @@ Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes + ``` 3. 确定主机总线号 - [root@centos7 ~]# ls /sys/class/scsi_host/ - host0 host1 host2 + [root@centos7 ~]# ls /sys/class/scsi_host/ + host0 host1 host2 4. 重新扫描SCSI总线来添加设备 - [root@centos7 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan - [root@centos7 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan - [root@centos7 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan + [root@centos7 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan + [root@centos7 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan + [root@centos7 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan -5. 验证磁盘和分区并确保20GB硬盘已经添加了。在本例中,出现了下面这行 “Disk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors” 并且确认新盘添加后没有重启服务器: +5. 验证磁盘和分区并确保20GB硬盘已经添加了。在本例中,出现了下面这行 “`Disk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectors`” 并且可以确认没有重启服务器就添加了新盘: + ``` [root@centos7 ~]# fdisk -l Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors @@ -76,14 +79,14 @@ Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes - + ``` -------------------------------------------------------------------------------- via: http://www.ehowstuff.com/how-to-add-a-new-hard-disk-without-rebooting-on-centos-7-rhel-7/ 作者:[skytech][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 878bc7bf1eb976cd1d8f65384cdf647147e0a369 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 30 Mar 2015 16:11:29 +0800 Subject: [PATCH 0409/2517] =?UTF-8?q?20150330-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...150330 Picty--Managing Photos Made Easy.md | 102 ++++++++++ ... login with one-time passwords on Linux.md | 180 ++++++++++++++++++ 2 files changed, 282 insertions(+) create mode 100644 sources/share/20150330 Picty--Managing Photos Made Easy.md create mode 100644 sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md diff --git a/sources/share/20150330 Picty--Managing Photos Made Easy.md b/sources/share/20150330 Picty--Managing Photos Made Easy.md new file mode 100644 index 0000000000..e88ef85cec --- /dev/null +++ b/sources/share/20150330 Picty--Managing Photos Made Easy.md @@ -0,0 +1,102 @@ +Picty: Managing Photos Made Easy +================================================================================ +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/picty_002-790x429.png) + +### About Picty ### + +**Picty** is a free, simple, yet powerful photo collection manager that will help you to manage your photos. It is designed around managing **metadata** and a **lossless** approach to image handling. Picty currently supports both online(web-based) and offline(local) collections. In local collections, the images will be stored in a local folder and it’s sub-folders. A database will be maintained to speed up the image queries in the user’s home folder. In online(web-based) collections, you can upload and share images through a web browser. Ant user with proper rights can share photos to any persons, and each user can have multiple collections open at once and collections can be shared by multiple users. There is a simple interface for transferring images between collections using a transfer plugin. + +You can download any number of photos from your Camera or any devices. Also, Picty allows you to browse photo collections from your Camera before downloading it. Picty is lightweight application, and has snappy interface. It supports Linux, and Windows platforms. + +### Features ### + +- Supports big photo collections (20,000 plus images). +- Open more than one collection at a time and transfer images between them. +- Collections are: + - Folders of images in your local file system. + - Images on cameras, phones and other media devices. + - Photo hosting services (Flickr currently supported). +- picty does not “Import” photos into its own database, it simply provides an interface for accessing them wherever they are. To keep things snappy and to allow you to browse even if you are offline, picty maintains a cache of thumbnails and metadata. +- Reads and writes metadata in industry standard formats Exif, IPTC and Xmp +- Lossless approach: + - picty writes all changes including image edits as metadata. e.g. an image crop is stored as any instruction, the original pixels remain in the file + - Changes are stored in picty’s collection cache until you save your metadata changes to the images. You can easily revert unsaved changes that you don’t like. +- Basic image editing: + - Current support for basic image enhancements such as brightness, contrast, color, cropping, and straightening. + - Improvements to those tools and other tools coming soon (red eye reduction, levels, curves, noise reduction) +- Image tagging: + - Use standard IPTC and Xmp keywords for image tags + - A tag tree view lets you easily manage your tags and navigate your collection +- Folder view: + - Navigate the directory heirarchy of your image collection +- Multi-monitor support + - picty can be configured to let you browse your collection on one screen and view full screen images on another. +- Customizable + - Create launchers for external tools + - Supports plugins – many of the current features (tagging and folder views, and all of the image editing tools) are provided by plugins + - Written in python – batteries included! + +### Installation ### + +#### 1. Install from PPA #### + +Picty developers has a PPA for Debian based distributions, like Ubuntu, to make the installation much easier. + +To install in Ubuntu and derivatives, run: + + sudo add-apt-repository ppa:damien-moore/ppa + sudo apt-get update + sudo apt-get install picty + +#### 2. Install from Source #### + +Also, you can install it from Source files. First, install the following dependencies. + + sudo apt-get install bzr python-pyinotify python-pyexiv2 python-gtk2 python-gnome2 dcraw python-osmgpsmap python-flickrapi + +Then, get the latest version using command: + + bzr branch lp:picty + +To run picty, change to the picty directory, and enter: + + cd picty + bin/picty + +To update to the latest version, run: + + cd picty + bzr pull + +### Usage ### + +Launch Picty either from Menu or Unity Dash. + +![picty_001](http://www.unixmen.com/wp-content/uploads/2015/03/picty_001.png) + +You can either choose existing collection, device or directory. Let us create a **new collection**. To do that, create New Collection button. Enter the collection, and browse to the path where you have the images stored. Finally, click **Create** button. + +![Create a Collection_001](http://www.unixmen.com/wp-content/uploads/2015/03/Create-a-Collection_001.png) + +![picty_002](http://www.unixmen.com/wp-content/uploads/2015/03/picty_002.png) + +You can modify, rotate, add/remove tags, set descriptive info of each images. To do that, just right click any image and do the actions of your choice. + +Visit the following Google group to get more information and support about Picty Photo manager. + +- [http://groups.google.com/group/pictyphotomanager][1] + +Cheers! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/picty-managing-photos-made-easy/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://groups.google.com/group/pictyphotomanager \ No newline at end of file diff --git a/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md b/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md new file mode 100644 index 0000000000..9133679994 --- /dev/null +++ b/sources/tech/20150330 How to secure SSH login with one-time passwords on Linux.md @@ -0,0 +1,180 @@ +How to secure SSH login with one-time passwords on Linux +================================================================================ +As someone says, security is a not a product, but a process. While SSH protocol itself is cryptographically secure by design, someone can wreak havoc on your SSH service if it is not administered properly, be it weak passwords, compromised keys or outdated SSH client. + +As far as SSH authentication is concerned, [public key authentication][1] is in general considered more secure than password authentication. However, key authentication is actually not desirable or even less secure if you are logging in from a public or shared computer, where things like stealth keylogger or memory scraper can always a possibility. If you cannot trust the local computer, it is better to use something else. This is when "one-time passwords" come in handy. As the name implies, each one-time password is for single-use only. Such disposable passwords can be safely used in untrusted environments as they cannot be re-used even when they are stolen. + +One way to generate disposable passwords is [Google Authenticator][2]. In this tutorial, I am going to demonstrate another way to create one-time passwords for SSH login: [OTPW][3], a one-time password login package. Unlike Google Authenticator, you do not rely on any third party for one-time password generation and verification. + +### What is OTPW? ### + +OTPW consists of one-time password generator and PAM-integrated verification routines. In OTPW, one-time passwords are generated apriori with the generator, and carried by a user securely (e.g., printed in a paper sheet). Cryptographic hash of the generated passwords are then stored in the SSH server host. When a user logs in with a one-time password, OTPW's PAM module verifies the password, and invalidates it to prevent re-use. + +### Step One: Install and Configure OTPW on Linux ### + +#### Debian, Ubuntu or Linux Mint #### + +Install OTPW packages with apt-get. + + $ sudo apt-get install libpam-otpw otpw-bin + +Open a PAM configuration file for SSH (/etc/pam.d/sshd) with a text editor, and comment out the following line (to disable password authentication). + + #@include common-auth + +and add the following two lines (to enable one-time password authentication): + + auth required pam_otpw.so + session optional pam_otpw.so + +![](https://farm8.staticflickr.com/7599/16775121360_d1f93feefa_b.jpg) + +#### Fedora or CentOS/RHEL #### + +OTPW is not available as a prebuilt package on Red Hat based systems. So let's install OTPW by building it from the source. + +First, install prerequites: + + $ sudo yum git gcc pam-devel + $ git clone https://www.cl.cam.ac.uk/~mgk25/git/otpw + $ cd otpw + +Open Makefile with a text editor, and edit a line that starts with "PAMLIB=" as follows. + +On 64-bit system: + + PAMLIB=/usr/lib64/security + +On 32-bit system: + + PAMLIB=/usr/lib/security + +Compile and install it. Note that installation will automatically restart an SSH server. So be ready to be disconnected if you are on an SSH connection. + + $ make + $ sudo make install + +Now you need to update SELinux policy since /usr/sbin/sshd tries to write to user's home directory, which is not allowed by default SELinux policy. The following commands will do. If you are not using SELinux, skip this step. + + $ sudo grep sshd /var/log/audit/audit.log | audit2allow -M mypol + $ sudo semodule -i mypol.pp + +Next, open a PAM configuration file for SSH (/etc/pam.d/sshd) with a text editor, and comment out the following line (to disable password authentication). + + #auth substack password-auth + +and add the following two lines (to enable one-time password authentication): + + auth required pam_otpw.so + session optional pam_otpw.so + +#### Step Two: Configure SSH Server for One-time Passwords #### + +The next step is to configure an SSH server to accept one-time passwords. + +Open /etc/ssh/sshd_config with a text editor, and set the following three parameters. Make sure that you do not add these lines more than once, because that will cause an SSH server to fail. + + UsePrivilegeSeparation yes + ChallengeResponseAuthentication yes + UsePAM yes + +You also need to disable default password authentication. Optionally, enable public key authentication, so that you can fall back to key-based authentication in case you do not have one-time passwords. + + PubkeyAuthentication yes + PasswordAuthentication no + +Now restart SSH server. + +Debian, Ubuntu or Linux Mint: + + $ sudo service ssh restart + +Fedora or CentOS/RHEL 7: + + $ sudo systemctl restart sshd + +#### Step Three: Generate One-time Passwords with OTPW #### + +As mentioned earlier, you need to create one-time passwords beforehand, and have them stored on the remote SSH server host. For this, run otpw-gen tool as the user you will be logging in as. + + $ cd ~ + $ otpw-gen > temporary_password.txt + +![](https://farm9.staticflickr.com/8751/16961258882_c49cfe03fb_b.jpg) + +It will ask you to set a prefix password. When you later log in, you need to type this prefix password AND one-time password. Essentially the prefix password is another layer of protection. Even if the password sheet falls into the wrong hands, the prefix password forces them to brute-force. + +Once the prefix password is set, the command will generate 280 one-time passwords, and store them in the output text file (e.g., temporary_password.txt). Each password (length of 8 characters by default) is preceded by a three-digit index number. You are supposed to print the file in a sheet and carry it with you. + +![](https://farm8.staticflickr.com/7281/16962594055_c2696d5ae1_b.jpg) + +You will also see ~/.otpw file created, where cryptographic hashs of these passwords are stored. The first three digits in each line indicate the index number of the password that will be used for SSH login. + + $ more ~/.otpw + +---------- + + OTPW1 + 280 3 12 8 + 191ai+:ENwmMqwn + 218tYRZc%PIY27a + 241ve8ns%NsHFmf + 055W4/YCauQJkr: + 102ZnJ4VWLFrk5N + 2273Xww55hteJ8Y + 1509d4b5=A64jBT + 168FWBXY%ztm9j% + 000rWUSdBYr%8UE + 037NvyryzcI+YRX + 122rEwA3GXvOk=z + +### Test One-time Passwords for SSH Login ### + +Now let's login to an SSH server in a usual way: + + $ ssh user@remote_host + +If OTPW is successfully set up, you will see a slightly different password prompt: + + Password 191: + +Now open up your password sheet, and look for index number "191" in the sheet. + + 023 kBvp tq/G 079 jKEw /HRM 135 oW/c /UeB 191 fOO+ PeiD 247 vAnZ EgUt + +According to sheet above, the one-time password for number "191" is "fOO+PeiD". You need to prepend your prefix password to it. For example, if your prefix password is "000", the actual one-time password you need to type is "000fOO+PeiD". + +Once you successfully log in, the password used is automatically invalidated. If you check ~/.otpw, you will notice that the first line is replaced with "---------------", meaning that password "191" has been voided. + + OTPW1 + 280 3 12 8 + --------------- + 218tYRZc%PIY27a + 241ve8ns%NsHFmf + 055W4/YCauQJkr: + 102ZnJ4VWLFrk5N + 2273Xww55hteJ8Y + 1509d4b5=A64jBT + 168FWBXY%ztm9j% + 000rWUSdBYr%8UE + 037NvyryzcI+YRX + 122rEwA3GXvOk=z + +### Conclusion ### + +In this tutorial, I demonstrated how to set up one-time password login for SSH using OTPW package. You may realized that a print sheet can be considered a less fancy version of security token in two-factor authentication. Yet, it is simpler and you do not rely on any third-party for its implementation. Whatever mechanism you are using to create disposable passwords, they can be helpful when you need to log in to an SSH server from an untrusted public computer. Feel free to share your experience or opinion on this topic. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/secure-ssh-login-one-time-passwords-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://xmodulo.com/how-to-force-ssh-login-via-public-key-authentication.html +[2]:http://xmodulo.com/two-factor-authentication-ssh-login-linux.html +[3]:http://www.cl.cam.ac.uk/~mgk25/otpw.html \ No newline at end of file From 57f0979d34ee49ad4bef307e880f3fb9edbc78f1 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Mon, 30 Mar 2015 16:22:47 +0800 Subject: [PATCH 0410/2517] =?UTF-8?q?20150330-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ys to Create Your Own Docker Base Image.md | 57 ++++++++++ ...epositories Using Gitblit Tool in Linux.md | 101 ++++++++++++++++++ ...nswers--How to upgrade Docker on Ubuntu.md | 35 ++++++ 3 files changed, 193 insertions(+) create mode 100644 sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md create mode 100644 sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md create mode 100644 sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md diff --git a/sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md b/sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md new file mode 100644 index 0000000000..80a7d4d4fa --- /dev/null +++ b/sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md @@ -0,0 +1,57 @@ +2 Ways to Create Your Own Docker Base Image +================================================================================ +Greetings to everyone, today we'll learn about docker base Images and how we can build our own. [Docker][1] is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. + +Docker Images is a read-only layer which never changes. It Docker uses a **Union File System** to add a read-write file system over the read-only file system. But all the changes go to the top-most writeable layer, and underneath, the original file in the read-only image is unchanged. Since images don't change, images do not have state. Base Images are those images that has no parent. The major benefits of it is that it allows us to have a separate linux OS running. + +Here are the ways on how we can create a custom base image. + +### 1. Creating Docker Base Image using Tar ### + +We can create our own base image using tar, we'll want to start building it with a working Linux Distribution we'll want to package as base image. This process may differ and depends on what distribution we are trying to build. In Debian distribution of Linux, debootstrap is preinstalled. We'll need to install debootstrap before starting the below process. Debootstrap is used to fetch the required packages to build the base system. Here, we'll create image based on Ubuntu 14.04 "Trusty". To do so, we'll need to run the following command in a terminal or shell. + + $ sudo debootstrap trusty trusty > /dev/null + $ sudo tar -C trusty -c . | sudo docker import - trusty + +![creating docker base image using debootstrap](http://blog.linoxide.com/wp-content/uploads/2015/03/creating-base-image-debootstrap.png) + +Here, the above command creates a tar file of the current directory and outputs it to STDOUT, where "docker import - trusty" takes it from STDIN and creates a base image called trusty from it. Then, we'll run a test command inside that image as follows. + + $ docker run trusty cat /etc/lsb-release + +Here are some example scripts that will allow us to build quick base images in [Docker GitHub Repo][2] . + +### 2. Creating Base Image using Scratch ### + +In the Docker registry, there is a special repository known as Scratch, which was created using an empty tar file: + + $ tar cv --files-from /dev/null | docker import - scratch + +![creating docker base image using scratch](http://blog.linoxide.com/wp-content/uploads/2015/03/creating-base-image-using-scratch.png) + + +We can use that image to base our new minimal containers FROM: + +FROM scratch +ADD script.sh /usr/local/bin/run.sh +CMD ["/usr/local/bin/run.sh"] + +The above Dockerfile is from an extremely minimal image. Here, first it starts with a totally blank filesystem, then it copies script.sh that is created to /usr/local/bin/run.sh and then run the script /usr/local/bin/run.sh . + +### Conclusion ### + +Here, in this tutorial, we learned how we can build a custom Docker Base Image out of the box. Building a docker base image is an easy task because there are sets of packages and scripts already available for. Building a docker base image is a lot useful if we want to install what we want in it. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/2-ways-create-docker-base-image/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://www.docker.com/ +[2]:https://github.com/docker/docker/blob/master/contrib/mkimage-busybox.sh \ No newline at end of file diff --git a/sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md b/sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md new file mode 100644 index 0000000000..806a462675 --- /dev/null +++ b/sources/tech/20150330 How to Serve Git Repositories Using Gitblit Tool in Linux.md @@ -0,0 +1,101 @@ +How to Serve Git Repositories Using Gitblit Tool in Linux +================================================================================ +Hi friends, today we'll be learning how to install Gitblit in your Linux Server or PC. So, lets check out what is a Git, its features and steps to install Gitblit. [Git is a distributed revision control system][1] with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. It was initially designed and developed by Linus Torvalds for Linux kernel under the terms of the GNU General Public License version 2 development in 2005, and has since become the most widely adopted version control system for software development. + +[Gitblit is a free and open source][2] built on a pure Java stack designed to handle everything from small to very large projects with speed and efficiency for serving Git repositories. It is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows. + +#### Features of Gitblit #### + +- It can be used as a dumb repository viewer with no administrative controls or user accounts. +- It can be used as a complete Git stack for cloning, pushing, and repository access control. +- It can be used without any other Git tooling (including actual Git) or it can cooperate with your established tools. + +### 1. Creating Gitblit install directory ### + +First of all we'll gonna to create a directory in our server in which we'll be installing our latest gitblit in. + + $ sudo mkdir -p /opt/gitblit + + $ cd /opt/gitblit + +![creating directory gitblit](http://blog.linoxide.com/wp-content/uploads/2015/01/creating-directory-gitblit.png) + +### 2. Downloading and Extracting ### + +Now, we will want to download the latest gitblit from the official site. Here, the current version of gitblit we are gonna install is 1.6.2 . So, please change it as the version you are gonna install in your system. + + $ sudo wget http://dl.bintray.com/gitblit/releases/gitblit-1.6.2.tar.gz + +![downloading gitblit package](http://blog.linoxide.com/wp-content/uploads/2015/01/downloading-gitblit.png) + +Now, we'll be extracting our downloaded tarball package to our current folder ie /opt/gitblit/ + + $ sudo tar -zxvf gitblit-1.6.2.tar.gz + +![extracting gitblit tar](http://blog.linoxide.com/wp-content/uploads/2015/01/extracting-gitblit-tar.png) + +### 3. Configuring and Running ### + +Now, we'll configure our Gitblit configuration. If you want to customize the behavior of Gitblit server, you can do it by modifying `gitblit/data/gitblit.properties` . Now, after you are done configuring the configuration. We finally wanna run our gitblit. We have two options on running gitblit, first is that we run it manually by the command below: + + $ sudo java -jar gitblit.jar --baseFolder data + +And next is to add and use gitblit as service. Here are the steps that we'll need to follow to use gitblit as service in linux. + +So, As I am running Ubuntu, the command below will be sudo cp service-ubuntu.sh /etc/init.d/gitblit so please change the file name service-ubuntu.sh to the distribution you are currently running. + + $ sudo ./install-service-ubuntu.sh + + $ sudo service gitblit start + +![starting gitblit service](http://blog.linoxide.com/wp-content/uploads/2015/01/starting-gitblit-service.png) + +Open your browser to http://localhost:8080 or https://localhost:8443 or replace "localhost" with the ip-address of the machine depending on your system configuration. Enter the default administrator credentials: admin / admin and click the Login button. + +![gitblit welcome](http://blog.linoxide.com/wp-content/uploads/2015/01/gitblit-welcome.png) + +Now, we'll wanna add a new user. First you'll need to login to the admin with default administrator credentials: username = **admin** and password = **admin** . + +Then, Goto user icon > users > (+) new user. And create a new user like as shown in the figure below. + +![add new user](http://blog.linoxide.com/wp-content/uploads/2015/01/add-user.png) + +Now, we'll create a new repo out of the box. Go to repositories > (+) new repository . Then, add new repository as shown below. + +![add new repository](http://blog.linoxide.com/wp-content/uploads/2015/01/add-new-repository.png) + +#### Create a new repository on the command-line #### + + touch README.md + git init + git add README.md + git commit -m "first commit" + git remote add origin ssh://arunlinoxide@localhost:29418/linoxide.com.git + git push -u origin master + +Please replace the username arunlinoxide with the user you add. + +#### Push an existing repository from the command-line #### + + git remote add origin ssh://arunlinoxide@localhost:29418/linoxide.com.git + git push -u origin master + +**Note**: It is highly recommended to everyone to change the password of username "admin" as it comes by default. + +### Conclusion ### + +Hurray, we finally installed our latest Gitblit in our Linux Computer. We can now enjoy such a beautiful version controlling system for our projects whether its small or large, no matter. With Gitblit, version controlling has been too easy. It is easy to learn and has a tiny footprint with lightning fast performance. So, if you have any questions, suggestions, feedback please write them in the comment box below. + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/serve-git-repositories-gitblit/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://git-scm.com/ +[2]:http://gitblit.com/ \ No newline at end of file diff --git a/sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md b/sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md new file mode 100644 index 0000000000..c31af4675c --- /dev/null +++ b/sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md @@ -0,0 +1,35 @@ +Linux FAQs with Answers--How to upgrade Docker on Ubuntu +================================================================================ +> **Question**: I installed Docker on Ubuntu using its standard repositories. However, the default Docker installation does not meet the version requirement for my another application that relies on Docker. How can I upgrade Docker to the latest version on Ubuntu? + +Since Docker was first released in 2013, it has been fast evolving into a full-blown open platform for distributed applications. To meet the industry's expection, Docker is being aggressively developed and constantly upgraded with new features. Chances are that the stock Docker that comes with your Ubuntu distribution is quickly outdated. For example, Ubuntu 14.10 Utopic comes with Docker version 1.2.0, while the latest Docker version is 1.5.0. + +![](https://farm9.staticflickr.com/8730/16351300024_9acb9086da_b.jpg) + +For those of you who want to stay up-to-date with Docker's latest developments, Canonical maintains a separate PPA for Docker. Using this PPA repository, you can easily upgrade Docker to the latest version on Ubuntu. + +Here is how to set up Docker PPA and upgrade Docker. + + $ sudo add-apt-repository ppa:docker-maint/testing + $ sudo apt-get update + $ sudo apt-get install docker.io + +Now check the version of installed Docker: + + $ docker --version + +---------- + + Docker version 1.5.0-dev, build a78ce5c + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/upgrade-docker-ubuntu.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file From 9054218890dd95f702cb1b14777e1d1b21b9fba1 Mon Sep 17 00:00:00 2001 From: LouisWei Date: Mon, 30 Mar 2015 22:53:17 +0800 Subject: [PATCH 0411/2517] translated wi-cuckoo --- ...Interactively Create a Docker Container.md | 100 ------------------ ...Interactively Create a Docker Container.md | 99 +++++++++++++++++ 2 files changed, 99 insertions(+), 100 deletions(-) delete mode 100644 sources/tech/20150324 How to Interactively Create a Docker Container.md create mode 100644 translated/tech/20150324 How to Interactively Create a Docker Container.md diff --git a/sources/tech/20150324 How to Interactively Create a Docker Container.md b/sources/tech/20150324 How to Interactively Create a Docker Container.md deleted file mode 100644 index 17576ec4f0..0000000000 --- a/sources/tech/20150324 How to Interactively Create a Docker Container.md +++ /dev/null @@ -1,100 +0,0 @@ -translating wi-cuckoo LLAP -How to Interactively Create a Docker Container -================================================================================ -Hi everyone, today we'll learn how we can interactively create a docker container using a docker image. Once we start a process in Docker from an Image, Docker fetches the image and its Parent Image, and repeats the process until it reaches the Base Image. Then the Union File System adds a read-write layer on top. That read-write layer, the information about its Parent Image and some other information like its unique id, networking configuration, and resource limits is called a **Container**. Containers has states as they can change from **running** to **exited** state. A container with state as **running** includes a tree of processes running on the CPU, isolated from the other processes running on the host where as **exited** is the state of the file system and its exit value is preserved. You can start, stop, and restart a container with it. - -Docker Technology has brought a remarkable change in the field of IT enabling cloud service for sharing applications and automating workflows, enabling apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. In this article, we'll build CentOS Instance in which we'll host a website running under Apache Web Server. - -Here is quick and easy tutorial on how we can create a container in an interactive method using an interactive shell. - -### 1. Running a Docker Instance ### - -Docker initially tries to fetch and run the required image locally and if its not found in local host the it pulls from the [Docker Public Registry Hub][1] . Here. we'll fetch and create a fedora instance in a Docker Container and attach a bash shell to the tty. - - # docker run -i -t fedora bash - -![Downloading Fedora Base Image](http://blog.linoxide.com/wp-content/uploads/2015/03/downloading-fedora-base-image.png) - -### 2. Installing Apache Web Server ### - -Now, after our Fedora base image with instance is ready, we'll now gonna install Apache Web Server interactively without creating a Dockerfile for it. To do so, we'll need to run the following commands in a terminal or shell. - - # yum update - -![Updating Fedora Base Image](http://blog.linoxide.com/wp-content/uploads/2015/03/updating-fedora-base-image.png) - - # yum install httpd - -![Installing httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-httpd2.png) - - # exit - -### 3. Saving the Image ### - -Now, we'll gonna save the changes we made into the Fedora Instance. To do that, we'll first gonna need to know the Container ID of the Instance. To get that we'll need to run the following command. - - # docker ps -a - -![Docker Running Container](http://blog.linoxide.com/wp-content/uploads/2015/03/docker-running-container.png) - -Then, we'll save the changes as a new image by running the below command. - - # docker commit c16378f943fe fedora-httpd - -![committing fedora httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/committing-fedora-httpd.png) - -Here, the changes are saved using the Container ID and image name fedora-httpd. To make sure that the new image is running or not, we'll run the following command. - - # docker images - -![view docker images](http://blog.linoxide.com/wp-content/uploads/2015/03/view-docker-images.png) - -### 4. Adding the Contents to the new image ### - -As we have our new Fedora Apache image running successfully, now we'll want to add the web contents which includes our website to Apache Web Server so that our website will run successfully out of the box. To do so, we'll need to create a new Dockerfile which will handle the operation from copying web contents to allowing port 80. To do so, we'll need to create a file Dockerfile using our favorite text editor as shown below. - - # nano Dockerfile - -Now, we'll need to add the following lines into that file. - - FROM fedora-httpd - ADD mysite.tar /tmp/ - RUN mv /tmp/mysite/* /var/www/html - EXPOSE 80 - ENTRYPOINT [ "/usr/sbin/httpd" ] - CMD [ "-D", "FOREGROUND" ] - -![configuring Dockerfile](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-Dockerfile.png) - -Here, in above Dockerfile, the web content which we have in mysite.tar will get automatically extracted to /tmp/ folder. Then, the entire site will move to the Apache Web root ie /var/www/html/ and the expose 80 will open port 80 so that the website will be available normally. Then, the entrypoint is set to /usr/sbin/httpd so that the Apache Server will execute. - -### 5. Building and running a Container ### - -Now, we'll build our Container using the Dockerfile we just created in order to add our website on it. To do so, we'll need to run the following command. - - # docker build -rm -t mysite . - -![Building mysite Image](http://blog.linoxide.com/wp-content/uploads/2015/03/building-mysite-image.png) - -After building our new container, we'll want to run the container using the command below. - - # docker run -d -P mysite - -![Running mysite Container](http://blog.linoxide.com/wp-content/uploads/2015/03/running-mysite-container.png) - -### Conclusion ### - -Finally, we've successfully built a Docker Container interactively. In this method, we build our containers and image directly via interactive shell commands. This method is quite easy and quick to build and deploy our images and containers. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/interactively-create-docker-container/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://registry.hub.docker.com/ diff --git a/translated/tech/20150324 How to Interactively Create a Docker Container.md b/translated/tech/20150324 How to Interactively Create a Docker Container.md new file mode 100644 index 0000000000..9661e8d3f2 --- /dev/null +++ b/translated/tech/20150324 How to Interactively Create a Docker Container.md @@ -0,0 +1,99 @@ +如何交互式地创建一个Docker容器 +=============================================================================== +大家好,今天我们来学习如何使用一个docker镜像交互式地创建一个Docker容器。一旦我们从镜像中启动一个Docker进程,Docker就会在父镜像与子镜像间来回搬运,重复工作,直到到达子镜像。然后联合文件系统会在顶层添加一个读写层。读写层又叫一个 **Container** 包含一些信息,关于它的父镜像和一些其他的信息,如单独的ID,网络配置和资源限制。容器已经声明,他们可以从 **running** 切换到 **exited** 状态。一个处于 **running** 状态的容器包含了很多分支在CPU上面运行,独立于其他在主机上运行的进程,而主机上 **exited** 是文件系统的状态,它的退出变量值是保留的。你可以使用读写层来启动,停止和重启一个容器。 + +Docker技术为IT界带来了巨大的改变,它使得云服务可以用来共享应用和工作流程自动化,使得应用可以从组件快速组合,消除了开发与品质保证和产品环境间的摩擦。在这篇文章中,我们将会建立CentOS环境,然后维护一个网站,在Apache网络服务器下运行。 + +这是快速且容易的教程,讨论我们怎样使用一个交互的shell,以一个交互的方式来创建一个容器。 + +### 1. 运行一个Docker实例 ### + +Docker一开始尝试从本地取得和运行所需的镜像,如果在本地主机上没有发现,它就会从[Docker公共注册中心][1]拉取。这里,我们将会在一个DOcker容器里取得并创建一个fedora实例,附加一个bash shell到tty + + # docker run -i -t fedora bash + +![Downloading Fedora Base Image](http://blog.linoxide.com/wp-content/uploads/2015/03/downloading-fedora-base-image.png) + +### 2.安装Apache网络服务器 ### + +现在,在我们的Fedora基本镜像准备好后,我们将会开始交互式地安装Apache网络服务器,而不必为它创建Dockerfile。为了做到这点,我们需要在终端或者shell运行以下命令。 + + # yum update + +![Installing httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-httpd2.png) + + # yum install httpd + +![Installing httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-httpd2.png) + + # exit + +### 3.Saving the Image ### + +现在,我们要去保存在Fedora实例里做的修改。要做到这个,我们首先需要知道实例的容器ID。而为了得到ID,我们又需要运行以下命令。 + + # docker ps -a + +![Docker Running Container](http://blog.linoxide.com/wp-content/uploads/2015/03/docker-running-container.png) + +然后,我们会保存这些改变为一个新的镜像,请运行以下命令。 + + # docker commit c16378f943fe fedora-httpd + +![committing fedora httpd](http://blog.linoxide.com/wp-content/uploads/2015/03/committing-fedora-httpd.png) + +这里,修改已经通过使用容器ID保存起来了,镜像名字叫fedora-httpd。为了确认新的镜像时候在运行,我们将运行以下命令 + + # docker images + +![view docker images](http://blog.linoxide.com/wp-content/uploads/2015/03/view-docker-images.png) + +### 4. 添加内容到新的镜像 ### + +我们自己新的Fedora Apache镜像正成功的运行,现在我们想添加一些网页内容到Apache网络服务器,包括我们的网站,使得网站能够脱离盒子正确运行。为做到这点,我们需要创建一个新的Dockerfile,它会处理从复制网页内容到使用80端口的所有操作。而为做到这,我们又需要使用我们最喜欢的文本编辑器创建Dockerfile文件,像下面演示的一样。 + + # nano Dockerfile + +现在,我们需要添加以下的命令行到文件中。 + + FROM fedora-httpd + ADD mysite.tar /tmp/ + RUN mv /tmp/mysite/* /var/www/html + EXPOSE 80 + ENTRYPOINT [ "/usr/sbin/httpd" ] + CMD [ "-D", "FOREGROUND" ] + +![configuring Dockerfile](http://blog.linoxide.com/wp-content/uploads/2015/03/configuring-Dockerfile.png) + +这里,运行Dockerfile,mysite.tar里的网页内容会自动解压到/temp/文件夹里。然后,整个文件会被转移到Apache网页根目录/var/www/html/,命令expose 80会打开80端口,这样网站就能正常访问。其次,入口点放在了/usr/sbin/https里面,保证Apache服务器能够执行。 + +### 5. 建立并运行一个容器 ### + +现在,为了添加我们网站在上面,我们要用刚刚创建的Dockerfile创建我们的容器,为做到这,我们需要运行以下命令。 + + # docker build -rm -t mysite . + +![Building mysite Image](http://blog.linoxide.com/wp-content/uploads/2015/03/building-mysite-image.png) + +我们建立自己的容器后,我们想要用下面的命令来运行容器。 + + # docker run -d -P mysite + +![Running mysite Container](http://blog.linoxide.com/wp-content/uploads/2015/03/running-mysite-container.png) + +### 总结 ### + +最后,我们已经成功的以交互式的方式建立了一个Docker容器。在本节方法中,我们是直接通过交互的shell命令建立我们的容器和镜像。这种方法十分简单且快速,在建立与配置镜像与容器方面。如果你有任何问题,建议和反馈,请在下方的评论框里写下来,以便我们可以提升或者更新我们的文章。谢谢!祝生活快乐 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/interactively-create-docker-container/ + +作者:[Arun Pyasi][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://registry.hub.docker.com/ From ae4d9c4bb233fa8ab466ffc66c48f35882bb1980 Mon Sep 17 00:00:00 2001 From: Zhou Yifan Date: Tue, 31 Mar 2015 12:46:46 +0800 Subject: [PATCH 0412/2517] =?UTF-8?q?[=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?]=20=20=20=20=20translated/tech/20150205=20How=20To=20Install?= =?UTF-8?q?=20or=20Configure=20VNC=20Server=20On=20CentOS=207.0.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...l or Configure VNC Server On CentOS 7.0.md | 161 ----------------- ...l or Configure VNC Server On CentOS 7.0.md | 167 ++++++++++++++++++ 2 files changed, 167 insertions(+), 161 deletions(-) delete mode 100644 sources/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md create mode 100644 translated/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md diff --git a/sources/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md b/sources/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md deleted file mode 100644 index 3eaba972f8..0000000000 --- a/sources/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md +++ /dev/null @@ -1,161 +0,0 @@ -How To Install / Configure VNC Server On CentOS 7.0 -================================================================================ -Hi there, this tutorial is all about how to install or setup [VNC][1] Server on your very CentOS 7. This tutorial also works fine in RHEL 7. In this tutorial, we'll learn what is VNC and how to install or setup [VNC Server][1] on CentOS 7 - -As we know, most of the time as a system administrator we are managing our servers over the network. It is very rare that we will need to have a physical access to any of our managed servers. In most cases all we need is to SSH remotely to do our administration tasks. In this article we will configure a GUI alternative to a remote access to our CentOS 7 server, which is VNC. VNC allows us to open a remote GUI session to our server and thus providing us with a full graphical interface accessible from any remote location. - -VNC server is a Free and Open Source Software which is designed for allowing remote access to the Desktop Environment of the server to the VNC Client whereas VNC viewer is used on remote computer to connect to the server . - -**Some Benefits of VNC server are listed below:** - - Remote GUI administration makes work easy & convenient. - Clipboard sharing between host CentOS server & VNC-client machine. - GUI tools can be installed on the host CentOS server to make the administration more powerful - Host CentOS server can be administered through any OS having the VNC-client installed. - More reliable over ssh graphics and RDP connections. - -So, now lets start our journey towards the installation of VNC Server. We need to follow the steps below to setup and to get a working VNC. - -First of all we'll need a working Desktop Environment (X-Windows), if we don't have a working GUI Desktop Environment (X Windows) running, we'll need to install it first. - -**Note: The commands below must be running under root privilege. To switch to root please execute "sudo -s" under a shell or terminal without quotes("")** - -### 1. Installing X-Windows ### - -First of all to install [X-Windows][2] we'll need to execute the below commands in a shell or terminal. It will take few minutes to install its packages. - - # yum check-update - # yum groupinstall "X Window System" - -![installing x windows](http://blog.linoxide.com/wp-content/uploads/2015/01/installing-x-windows.png) - - #yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts - -![install gnome classic session](http://blog.linoxide.com/wp-content/uploads/2015/01/gnome-classic-session-install.png) - - # unlink /etc/systemd/system/default.target - # ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target - -![configuring graphics](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-graphics.png) - - # reboot - -After our machine restarts, we'll get a working CentOS 7 Desktop. - -Now, we'll install VNC Server on our machine. - -### 2. Installing VNC Server Package ### - -Now, we'll install VNC Server package in our CentOS 7 machine. To install VNC Server, we'll need to execute the following command. - - # yum install tigervnc-server -y - -![vnc server](http://blog.linoxide.com/wp-content/uploads/2015/01/install-tigervnc.png) - -### 3. Configuring VNC ### - -Then, we'll need to create a configuration file under **/etc/systemd/system/** directory. We can copy the **vncserver@:1.service** file from example file from **/lib/systemd/system/vncserver@.service** - - # cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service - -![copying vnc server configuration](http://blog.linoxide.com/wp-content/uploads/2015/01/copying-configuration.png) - -Now we'll open **/etc/systemd/system/vncserver@:1.service** in our favorite text editor (here, we're gonna use **nano**). Then find the below lines of text in that file and replace with your username. Here, in my case its linoxide so I am replacing with linoxide and finally looks like below. - - ExecStart=/sbin/runuser -l -c "/usr/bin/vncserver %i" - PIDFile=/home//.vnc/%H%i.pid - -TO - - ExecStart=/sbin/runuser -l linoxide -c "/usr/bin/vncserver %i" - PIDFile=/home/linoxide/.vnc/%H%i.pid - -If you are creating for root user then - - ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i" - PIDFile=/root/.vnc/%H%i.pid - -![configuring user](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-user.png) - -Now, we'll need to reload our systemd. - - # systemctl daemon-reload - -Finally, we'll create VNC password for the user . To do so, first you'll need to be sure that you have sudo access to the user, here I will login to user "linoxide" then, execute the following. To login to linoxide we'll run "**su linoxide" without quotes** . - - # su linoxide - $ sudo vncpasswd - -![setting vnc password](http://blog.linoxide.com/wp-content/uploads/2015/01/vncpassword.png) - -**Make sure that you enter passwords more than 6 characters.** - -### 4. Enabling and Starting the service ### - -To enable service at startup ( Permanent ) execute the commands shown below. - - $ sudo systemctl enable vncserver@:1.service - -Then, start the service. - - $ sudo systemctl start vncserver@:1.service - -### 5. Allowing Firewalls ### - -We'll need to allow VNC services in Firewall now. - - $ sudo firewall-cmd --permanent --add-service vnc-server - $ sudo systemctl restart firewalld.service - -![allowing firewalld](http://blog.linoxide.com/wp-content/uploads/2015/01/allowing-firewalld.png) - -Now you can able to connect VNC server using IP and Port ( Eg : ip-address:1 ) - -### 6. Connecting the machine with VNC Client ### - -Finally, we are done installing VNC Server. No, we'll wanna connect the server machine and remotely access it. For that we'll need a VNC Client installed in our computer which will only enable us to remote access the server machine. - -![remote access vncserver from vncviewer](http://blog.linoxide.com/wp-content/uploads/2015/01/vncviewer.png) - -You can use VNC client like [Tightvnc viewer][3] and [Realvnc viewer][4] to connect Server. -To connect with additional users create files with different ports, please go to step 3 to configure and add a new user and port, You'll need to create **vncserver@:2.service** and replace the username in config file and continue the steps by replacing service name for different ports. **Please make sure you logged in as that particular user for creating vnc password**. - -VNC by itself runs on port 5900. Since each user will run their own VNC server, each user will have to connect via a separate port. The addition of a number in the file name tells VNC to run that service as a sub-port of 5900. So in our case, arun's VNC service will run on port 5901 (5900 + 1) and further will run on 5900 + x. Where, x denotes the port specified when creating config file **vncserver@:x.service for the further users**. - -We'll need to know the IP Address and Port of the server to connect with the client. IP addresses are the unique identity number of the machine. Here, my IP address is 96.126.120.92 and port for this user is 1. We can get the public IP address by executing the below command in a shell or terminal of the machine where VNC Server is installed. - - # curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//' - -### Conclusion ### - -Finally, we installed and configured VNC Server in the machine running CentOS 7 / RHEL 7 (Red Hat Enterprises Linux) . VNC is the most easy FOSS tool for the remote access and also a good alternative to Teamviewer Remote Access. VNC allows a user with VNC client installed to control the machine with VNC Server installed. Here are some commands listed below that are highly useful in VNC . Enjoy !! - -#### Additional Commands : #### - -- To stop VNC service . - - # systemctl stop vncserver@:1.service - -- To disable VNC service from startup. - - # systemctl disable vncserver@:1.service - -- To stop firewall. - - # systemctl stop firewalld.service - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-configure-vnc-server-centos-7-0/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://en.wikipedia.org/wiki/Virtual_Network_Computing -[2]:http://en.wikipedia.org/wiki/X_Window_System -[3]:http://www.tightvnc.com/ -[4]:https://www.realvnc.com/ \ No newline at end of file diff --git a/translated/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md b/translated/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md new file mode 100644 index 0000000000..58c846e4d6 --- /dev/null +++ b/translated/tech/20150205 How To Install or Configure VNC Server On CentOS 7.0.md @@ -0,0 +1,167 @@ +===>> boredivan翻译中 <<=== +怎样在CentOS 7.0上安装/配置VNC服务器 +================================================================================ +这是一个关于怎样在你的 CentOS 7 上安装配置 [VNC][1] 服务的教程。当然这个教程也适合 RHEL 7 。在这个教程里,我们将学习什么是VNC以及怎样在 CentOS 7 上安装配置 [VNC 服务器][1]。 + +我们都知道,作为一个系统管理员,大多数时间是通过网络管理服务器的。在管理服务器的过程中很少会用到图形界面,多数情况下我们只是用 SSH 来完成我们的管理任务。在这篇文章里,我们将配置 VNC 来提供一个连接我们 CentOS 7 服务器的方法。VNC 允许我们开启一个远程图形会话来连接我们的服务器,这样我们就可以通过网络远程访问服务器的图形界面了。 + +VNC 服务器是一个自由且开源的软件,它可以让用户可以远程访问服务器的桌面环境。另外连接 VNC 服务器需要使用 VNC viewer 这个客户端。 + +** 一些 VNC 服务器的优点:** + + 远程的图形管理方式让工作变得简单方便。 + 剪贴板可以在 CentOS 服务器主机和 VNC 客户端机器之间共享。 + CentOS 服务器上也可以安装图形工具,让管理能力变得更强大。 + 只要安装了 VNC 客户端,任何操作系统都可以管理 CentOS 服务器了。 + 比 ssh 图形和 RDP 连接更可靠。 + +那么,让我们开始安装 VNC 服务器之旅吧。我们需要按照下面的步骤一步一步来搭建一个有效的 VNC。 + + +首先,我们需要一个有效的桌面环境(X-Window),如果没有的话要先安装一个。 + +**注意:以下命令必须以 root 权限运行。要切换到 root ,请在终端下运行“sudo -s”,当然不包括双引号(“”)** + +### 1. 安装 X-Window ### + +首先我们需要安装 [X-Window][2],在终端中运行下面的命令,安装会花费一点时间。 + + # yum check-update + # yum groupinstall "X Window System" + +![installing x windows](http://blog.linoxide.com/wp-content/uploads/2015/01/installing-x-windows.png) + + #yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts + +![install gnome classic session](http://blog.linoxide.com/wp-content/uploads/2015/01/gnome-classic-session-install.png) + + # unlink /etc/systemd/system/default.target + # ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target + +![configuring graphics](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-graphics.png) + + # reboot + +在服务器重启之后,我们就有了一个工作着的 CentOS 7 桌面环境了。 + +现在,我们要在服务器上安装 VNC 服务器了。 + +### 2. 安装 VNC 服务器 ### + +现在要在我们的 CentOS 7 上安装 VNC 服务器了。我们需要执行下面的命令。 + + # yum install tigervnc-server -y + +![vnc server](http://blog.linoxide.com/wp-content/uploads/2015/01/install-tigervnc.png) + +### 3. 配置 VNC ### + +然后,我们需要在 **/etc/systemd/system/** 目录里创建一个配置文件。我们可以从 **/lib/systemd/sytem/vncserver@.service** 拷贝一份配置文件范例过来。 + + # cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service + +![copying vnc server configuration](http://blog.linoxide.com/wp-content/uploads/2015/01/copying-configuration.png) + +接着我们用自己最喜欢的编辑器(这儿我们用的 **nano** )打开 **/etc/systemd/system/vncserver@:1.service** ,找到下面这几行,用自己的用户名替换掉 。举例来说,我的用户名是 linoxide 所以我用 linoxide 来替换掉 : + + ExecStart=/sbin/runuser -l -c "/usr/bin/vncserver %i" + PIDFile=/home//.vnc/%H%i.pid + +替换成 + + ExecStart=/sbin/runuser -l linoxide -c "/usr/bin/vncserver %i" + PIDFile=/home/linoxide/.vnc/%H%i.pid + +如果是 root 用户则 + + ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i" + PIDFile=/root/.vnc/%H%i.pid + +![configuring user](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-user.png) + +好了,下面重启 systemd 。 + + # systemctl daemon-reload + +Finally, we'll create VNC password for the user . To do so, first you'll need to be sure that you have sudo access to the user, here I will login to user "linoxide" then, execute the following. To login to linoxide we'll run "**su linoxide" without quotes** . +最后还要设置一下用户的 VNC 密码。要设置某个用户的密码,必须要获得该用户的权限,这里我用 linoxide 的权限,执行“**su linoxide**”就可以了。 + + # su linoxide + $ sudo vncpasswd + +![setting vnc password](http://blog.linoxide.com/wp-content/uploads/2015/01/vncpassword.png) + +**确保你输入的密码多于6个字符** + +### 4. 开启服务 ### + +用下面的命令(永久地)开启服务: + + $ sudo systemctl enable vncserver@:1.service + +启动服务。 + + $ sudo systemctl start vncserver@:1.service + +### 5. 防火墙设置 ### + +我们需要配置防火墙来让 VNC 服务正常工作。 + + $ sudo firewall-cmd --permanent --add-service vnc-server + $ sudo systemctl restart firewalld.service + +![allowing firewalld](http://blog.linoxide.com/wp-content/uploads/2015/01/allowing-firewalld.png) + +现在就可以用 IP 和端口号(例如 192.168.1.1:1 ,这里的端口不是服务器的端口,而是视 VNC 连接数的多少从1开始排序——译注)来连接 VNC 服务器了。 + +### 6. 用 VNC 客户端连接服务器 ### + +好了,现在已经完成了 VNC 服务器的安装了。要使用 VNC 连接服务器,我们还需要一个在本地计算机上安装的仅供连接远程计算机使用的 VNC 客户端。 + +![remote access vncserver from vncviewer](http://blog.linoxide.com/wp-content/uploads/2015/01/vncviewer.png) + +你可以用像 [Tightvnc viewer][3] 和 [Realvnc viewer][4] 的客户端来连接到服务器。 + +要用其他用户和端口连接 VNC 服务器,请回到第3步,添加一个新的用户和端口。你需要创建 **vncserver@:2.service** 并替换配置文件里的用户名和之后步骤里响应的文件名、端口号。**请确保你登录 VNC 服务器用的是你之前配置 VNC 密码的时候使用的那个用户名** + + + +VNC 服务本身使用的是5900端口。鉴于有不同的用户使用 VNC ,每个人的连接都会获得不同的端口。配置文件名里面的数字告诉 VNC 服务器把服务运行在5900的子端口上。在我们这个例子里,第一个 VNC 服务会运行在5901(5900 + 1)端口上,之后的依次增加,运行在5900 + x 号端口上。其中 x 是指之后用户的配置文件名 **vncserver@:x.service** 里面的 x 。 + +在建立连接之前,我们需要知道服务器的 IP 地址和端口。IP 地址是一台计算机在网络中的独特的识别号码。我的服务器的 IP 地址是96.126.120.92,VNC 用户端口是1。执行下面的命令可以获得服务器的公网 IP 地址。 + + # curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//' + +### 总结 ### + +好了,现在我们已经在运行 CentOS 7 / RHEL 7 (Red Hat Enterprises Linux)的服务器上安装配置好了 VNC 服务器。VNC 是自由及开源的软件中最简单的一种能实现远程控制服务器的一种工具,也是 Teamviewer Remote Access 的一款优秀的替代品。VNC 允许一个安装了 VNC 客户端的用户远程控制一台安装了 VNC 服务的服务器。下面还有一些经常使用的相关命令。好好玩! + +#### 其他命令: #### + +- 关闭 VNC 服务。 + + # systemctl stop vncserver@:1.service + +- 禁止 VNC 服务开机启动。 + + # systemctl disable vncserver@:1.service + +- 关闭防火墙。 + + # systemctl stop firewalld.service + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-configure-vnc-server-centos-7-0/ + +作者:[Arun Pyasi][a] +译者:[boredivan](https://github.com/boredivan) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://en.wikipedia.org/wiki/Virtual_Network_Computing +[2]:http://en.wikipedia.org/wiki/X_Window_System +[3]:http://www.tightvnc.com/ +[4]:https://www.realvnc.com/ From 481b1b253957f892d7abfd530a0e4422207b456d Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 31 Mar 2015 13:07:14 +0800 Subject: [PATCH 0413/2517] PUB:20150202 How To Install Websvn for Subversion in CentOS 7.0 @geekpi --- ...all Websvn for Subversion in CentOS 7.0.md | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) rename {translated/tech => published}/20150202 How To Install Websvn for Subversion in CentOS 7.0.md (59%) diff --git a/translated/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md b/published/20150202 How To Install Websvn for Subversion in CentOS 7.0.md similarity index 59% rename from translated/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md rename to published/20150202 How To Install Websvn for Subversion in CentOS 7.0.md index 35af70fc51..c374f9f670 100644 --- a/translated/tech/20150202 How To Install Websvn for Subversion in CentOS 7.0.md +++ b/published/20150202 How To Install Websvn for Subversion in CentOS 7.0.md @@ -1,9 +1,8 @@ -如何在CentOS 7.0上为Subverison安装Websvn +如何在CentOS 7.0 安装 Websvn ================================================================================ -大家好,今天我们会在CentOS 7.0 上为subversion安装WebSVN。 - -WebSVN提供了Svbverion中的各种方法来查看你的仓库。我们可以看到任何给定版本的任何文件或者目录的日志并且看到所有文件改动、添加、删除的列表。我们同样可以看到两个版本间的不同来知道特定版本改动了什么。 +大家好,今天我们会在CentOS 7.0 上为 subversion(SVN)安装Web 界面 WebSVN。(subverion 是 apache 的顶级项目,也称为 Apache SVN 或 SVN) +WebSVN 将 Svbverion 的操作你的仓库的各种功能通过 Web 界面提供出来。通过它,我们可以看到任何给定版本的任何文件或者目录的日志,并且可看到所有文件改动、添加、删除的列表。我们同样可以查看两个版本间的差异来知道特定版本改动了什么。 ### 特性 ### @@ -12,20 +11,20 @@ WebSVN提供了下面这些特性: - 易于使用的用户界面 - 可定制的模板系统 - 色彩化的文件列表 -- blame 视图 +- 追溯视图 - 日志信息查询 - RSS支持 - [更多][1] -由于使用PHP写成,WebSVN同样易于移植和安装。 +由于其使用PHP写成,WebSVN同样易于移植和安装。 -现在我们将为Subverison(Apache SVN)安装WebSVN。请确保你的服务器上已经安装了Apache SVN。如果你还没有安装,你可以在本教程中安装。 +现在我们将为Subverison安装WebSVN。请确保你的服务器上已经安装了 SVN。如果你还没有安装,你可以按[本教程][2]安装。 -After you installed Apache SVN(Subversion), you'll need to follow the easy steps below.安装完Apache SVN(Subversion)后,你需要以下几步。 +安装完SVN后,你需要以下几步。 ### 1. 下载 WebSVN ### -你可以从官方网站http://www.websvn.info/download/中下载WebSVN。我们首先进入/var/www/html/并在这里下载安装包。 +你可以从官方网站 http://www.websvn.info/download/ 中下载 WebSVN。我们首先进入 /var/www/html/ 并在这里下载安装包。 $ sudo -s @@ -36,7 +35,7 @@ After you installed Apache SVN(Subversion), you'll need to follow the easy steps ![downloading websvn package](http://blog.linoxide.com/wp-content/uploads/2015/01/downloading-websvn.png) -这里,我下载的是最新的2.3.3版本的websvn。你可以从这个网站得到链接。你可以用你要安装的包的链接来替换上面的链接。 +这里,我下载的是最新的2.3.3版本的 websvn。你可以从上面这个网站找到下载链接,用适合你的包的链接来替换上面的链接。 ### 2. 解压下载的zip ### @@ -54,7 +53,7 @@ After you installed Apache SVN(Subversion), you'll need to follow the easy steps ### 4. 编辑WebSVN配置 ### -现在,我们需要拷贝位于/var/www/html/websvn/include的distconfig.php为config.php,并且接着编辑配置文件。 +现在,我们需要拷贝位于 /var/www/html/websvn/include 的 distconfig.php 为 config.php,并且接着编辑该配置文件。 # cd /var/www/html/websvn/include @@ -62,7 +61,7 @@ After you installed Apache SVN(Subversion), you'll need to follow the easy steps # nano config.php -现在我们需要按如下改变文件。这完成之后,请保存病退出。 +现在我们需要按如下改变文件。完成之后,请保存并退出。 // Configure these lines if your commands aren't on your path. // @@ -100,7 +99,7 @@ After you installed Apache SVN(Subversion), you'll need to follow the easy steps # systemctl restart httpd.service -接着我们在浏览器中打开WebSVN,输入http://Ip-address/websvn,或者你在本地的话,你可以输入http://localhost/websvn。 +接着我们在浏览器中打开WebSVN,输入 http:// IP地址/websvn ,或者你在本地的话,你可以输入 http://localhost/websvn 。 ![websvn successfully installed](http://blog.linoxide.com/wp-content/uploads/2015/01/websvn-success.png) @@ -108,7 +107,9 @@ After you installed Apache SVN(Subversion), you'll need to follow the easy steps ### 总结 ### -好了,我们已经在CentOS 7上哇安城WebSVN的安装了。这个教程同样适用于RHEL 7。WebSVN提供了Svbverion中的各种方法来查看你的仓库。你可以看到任何给定版本的任何文件或者目录的日志并且看到所有文件改动、添加、删除的列表。如果你有任何问题、评论、反馈请在下面的评论栏中留下,来让我们知道该添加什么和改进。谢谢!享受WebSVN吧。:-) +好了,我们已经在CentOS 7上完成WebSVN的安装了。这个教程同样适用于RHEL 7。WebSVN 提供了 Subverion 中的各种功能来查看你的仓库。你可以看到任何给定版本的任何文件或者目录的日志,并且看到所有文件改动、添加、删除的列表。 + +如果你有任何问题、评论、反馈请在下面的评论栏中留下,来让我们知道该添加什么和改进。谢谢! 用用看吧。:-) -------------------------------------------------------------------------------- @@ -116,9 +117,10 @@ via: http://linoxide.com/linux-how-to/install-websvn-subversion-centos-7/ 作者:[Arun Pyasi][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunp/ [1]:http://www.websvn.info/features/ +[2]:http://linoxide.com/linux-how-to/install-apache-svn-subversion-centos-7/ From f5db378888573d45b2e3668421895110654e3688 Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 31 Mar 2015 13:15:45 +0800 Subject: [PATCH 0414/2517] PUB:20150304 Linux Basics--How To Find Maximum Supported RAM By Your System @mr-ping --- ...ics--How To Find Maximum Supported RAM By Your System.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md (99%) diff --git a/translated/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md b/published/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md similarity index 99% rename from translated/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md rename to published/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md index 52b978dbc8..14bc56c329 100644 --- a/translated/tech/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md +++ b/published/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md @@ -681,15 +681,15 @@ Linux基础:如何找出你的系统所支持的最大内存 Handle 0x0031, DMI type 127, 4 bytes End Of Table -好了,就是这样。周末愉快! +好了,就是这样。 -------------------------------------------------------------------------------- -via: https://www.unixmen.com/linux-basics-how-to-find-maximum-supported-ram-by-your-system/ +via: http://www.unixmen.com/linux-basics-how-to-find-maximum-supported-ram-by-your-system/ 作者:[SK][0] 译者:[mr-ping](https://github.com/mr-ping) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 62faa592e0f17779f67ea116ecafa39b845314c0 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 31 Mar 2015 16:09:37 +0800 Subject: [PATCH 0415/2517] =?UTF-8?q?20150331-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...mate X Based System Monitor Application.md | 147 ++++++++++++++++++ ...pt or Decrypt Random Passwords in Linux.md | 104 +++++++++++++ ... remote desktop on Linux VPS using x2go.md | 137 ++++++++++++++++ ...ry Updated--How To Install It In Ubuntu.md | 70 +++++++++ 4 files changed, 458 insertions(+) create mode 100644 sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md create mode 100644 sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md create mode 100644 sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md create mode 100644 sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md diff --git a/sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md b/sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md new file mode 100644 index 0000000000..fdb2648a36 --- /dev/null +++ b/sources/tech/20150331 Conky--The Ultimate X Based System Monitor Application.md @@ -0,0 +1,147 @@ +Conky – The Ultimate X Based System Monitor Application +================================================================================ +Conky is a system monitor application written in ‘C’ Programming Language and released under GNU General Public License and BSD License. It is available for Linux and BSD Operating System. The application is X (GUI) based that was originally forked from [Torsmo][1]. + +#### Features #### + +- Simple User Interface +- Higher Degree of configuration +- It can show System stats using built-in objects (300+) as well as external scripts either on the desktop or in it’s own container. +- Low on Resource Utilization +- Shows system stats for a wide range of system variables which includes but not restricted to CPU, memory, swap, Temperature, Processes, Disk, Network, Battery, email, System messages, Music player, weather, breaking news, updates and blah..blah..blah +- Available in Default installation of OS like CrunchBang Linux and Pinguy OS. + +#### Lesser Known Facts about Conky #### + +- The Name conky was derived from a Canadian Television Show. +- It has already been ported to Nokia N900. +- It is no more maintained officially. + +### Conky Installation and Usage in Linux ### + +Before we install conky, we need to install packages like lm-sensors, curl and hddtemp using following command. + + # apt-get install lm-sensors curl hddtemp + +Time to detect-sensors. + + # sensors-detect + +**Note**: Answer ‘Yes‘ when prompted! + +Check all the detected sensors. + + # sensors + +#### Sample Output #### + + acpitz-virtual-0 + Adapter: Virtual device + temp1: +49.5°C (crit = +99.0°C) + + coretemp-isa-0000 + Adapter: ISA adapter + Physical id 0: +49.0°C (high = +100.0°C, crit = +100.0°C) + Core 0: +49.0°C (high = +100.0°C, crit = +100.0°C) + Core 1: +49.0°C (high = +100.0°C, crit = +100.0°C) + +Conky can be installed from repo as well as, can be compiled from source. + + # yum install conky [On RedHat systems] + # apt-get install conky-all [On Debian systems] + +**Note**: Before you install conky on Fedora/CentOS, you must have enabled [EPEL repository][2]. + +After conky has been installed, just issue following command to start it. + + $ conky & + +![Conky Monitor in Action](http://www.tecmint.com/wp-content/uploads/2015/03/Start-Conkey.jpeg) +Conky Monitor in Action + +It will run conky in a popup like window. It uses the basic conky configuration file located at /etc/conky/conky.conf. + +You may need to integrate conky with the desktop and won’t like a popup like window every-time. Here is what you need to do + +Copy the configuration file /etc/conky/conky.conf to your home directory and rename it as ‘`.conkyrc`‘. The dot (.) at the beginning ensures that the configuration file is hidden. + + $ cp /etc/conky/conky.conf /home/$USER/.conkyrc + +Now restart conky to take new changes. + + $ killall -SIGUSR1 conky + +![Conky Monitor Window](http://www.tecmint.com/wp-content/uploads/2015/03/Restart-Conky.jpeg) +Conky Monitor Window + +You may edit the conky configuration file located in your home dircetory. The configuration file is very easy to understand. + +Here is a sample configuration of conky. + +![Conky Configuration](http://www.tecmint.com/wp-content/uploads/2015/03/Conky-Configuration.jpeg) +Conky Configuration + +From the above window you can modify color, borders, size, scale, background, alignment and several other properties. By setting different alignments to different conky window, we can run more than one conky script at a time. + +**Using script other than the default for conky and where to find it?** + +You may write your own conky script or use one that is available over Internet. We don’t suggest you to use any script you find on the web which can be potentially dangerous unless you know what you are doing. However a few famous threads and pages have conky script that you can trust as mentioned below. + +- [http://ubuntuforums.org/showthread.php?t=281865][3] +- [http://conky.sourceforge.net/screenshots.html][4] + +At the above url, you will find every screenshot has a hyperlink, which will redirects to script file. + +#### Testing Conky Script #### + +Here I will be running a third party written conky-script on my Debian Jessie Machine, to test. + + $ wget https://github.com/alexbel/conky/archive/master.zip + $ unzip master.zip + +Change current working directory to just extracted directory. + + $ cd conky-master + +Rename the secrets.yml.example to secrets.yml. + + $ mv secrets.yml.example secrets.yml + +Install Ruby before you could run this (ruby) script. + + $ sudo apt-get install ruby + $ ruby starter.rb + +![Conky Fancy Look](http://www.tecmint.com/wp-content/uploads/2015/03/Conky-Fancy-Look.jpeg) +Conky Fancy Look + +**Note**: This script can be modified to show your current weather, temperature, etc. + +If you want to start conky at boot, add the below one liner to startup Applications. + + conky --pause 10 + save and exit. + +And Finally…such a lightweight and useful GUI eye candy like package is not in active stage and is not maintained officially anymore. The last stable release was conky 1.9.0 released on May 03, 2012. A thread on Ubuntu forum has gone over 2k pages of users sharing configuration. (link to forum : [http://ubuntuforums.org/showthread.php?t=281865/][5]) + +- [Conky Homepage][6] + +That’s all for now. Keep connected. Keep commenting. Share your thoughts and configuration in comments below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/install-conky-in-ubuntu-debian-fedora/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://torsmo.sourceforge.net/ +[2]:http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ +[3]:http://ubuntuforums.org/showthread.php?t=281865 +[4]:http://conky.sourceforge.net/screenshots.html +[5]:http://ubuntuforums.org/showthread.php?t=281865/ +[6]:http://conky.sourceforge.net/ \ No newline at end of file diff --git a/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md b/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md new file mode 100644 index 0000000000..1cd2991879 --- /dev/null +++ b/sources/tech/20150331 How to Generate or Encrypt or Decrypt Random Passwords in Linux.md @@ -0,0 +1,104 @@ +How to Generate/Encrypt/Decrypt Random Passwords in Linux +================================================================================ +We have taken initiative to produce Linux tips and tricks series. If you’ve missed the last article of this series, you may like to visit the link below. + +注:此篇文章做过原文 +- [5 Interesting Command Line Tips and Tricks in Linux][1] + +In this article, we will share some interesting Linux tips and tricks to generate random passwords and also how to encrypt and decrypt passwords with or without slat method. + +Security is one of the major concern of digital age. We put on password to computers, email, cloud, phone, documents and what not. We all know the basic to choose the password that is easy to remember and hard to guess. What about some sort of machine based password generation automatically? Believe me Linux is very good at this. + +**1. Generate a random unique password of length equal to 10 characters using command ‘pwgen‘. If you have not installed pwgen yet, use Apt or YUM to get.** + + $ pwgen 10 1 + +![Generate Random Unique Password](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Random-Unique-Password-in-Linux.gif) +Generate Random Unique Password + +Generate several random unique passwords of character length 50 in one go! + + $ pwgen 50 + +![Generate Multiple Random Passwords](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-Multiple-Random-Passwords.gif) +Generate Multiple Random Passwords + +**2. You may use ‘makepasswd‘ to generate random, unique password of given length as per choice. Before you can fire makepasswd command, make sure you have installed it. If not! Try installing the package ‘makepasswd’ using Apt or YUM.** + +Generate a random password of character length 10. Default Value is 10. + + $ makepasswd + +![makepasswd Generate Unique Password](http://www.tecmint.com/wp-content/uploads/2015/03/mkpasswd-generate-unique-password.gif) +makepasswd Generate Unique Password + +Generate a random password of character length 50. + + $ makepasswd --char 50 + +![Generate Length 50 Password](http://www.tecmint.com/wp-content/uploads/2015/03/Random-Password-Generate.gif) +Generate Length 50 Password + +Generate 7 random password of 20 characters. + + $ makepasswd --char 20 --count 7 + +![](http://www.tecmint.com/wp-content/uploads/2015/03/Generate-20-Character-Password.gif) + +**3. Encrypt a password using crypt along with salt. Provide salt manually as well as automatically.** + +For those who may not be aware of salt, + +Salt is a random data which servers as an additional input to one way function in order to protect password against dictionary attack. + +Make sure you have installed mkpasswd installed before proceeding. + +The below command will encrypt the password with salt. The salt value is taken randomly and automatically. Hence every time you run the below command it will generate different output because it is accepting random value for salt every-time. + + $ mkpasswd tecmint + +![Encrypt Password Using Crypt](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-in-Linux.gif) +Encrypt Password Using Crypt + +Now lets define the salt. It will output the same result every-time. Note you can input anything of your choice as salt. + + $ mkpasswd tecmint -s tt + +![Encrypt Password Using Salt](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-Password-Using-Salt.gif) +Encrypt Password Using Salt + +Moreover, mkpasswd is interactive and if you don’t provide password along with the command, it will ask password interactively. + +**4. Encrypt a string say “Tecmint-is-a-Linux-Community” using aes-256-cbc encryption using password say “tecmint” and salt.** + + # echo Tecmint-is-a-Linux-Community | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint + +![Encrypt A String in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Encrypt-A-String-in-Linux.gif) +Encrypt A String in Linux + +Here in the above example the output of 注:此篇原文也做过[echo command][2] is pipelined with openssl command that pass the input to be encrypted using Encoding with Cipher (enc) that uses aes-256-cbc encryption algorithm and finally with salt it is encrypted using password (tecmint). + +**5. Decrypt the above string using openssl command using the -aes-256-cbc decryption.** + + # echo U2FsdGVkX18Zgoc+dfAdpIK58JbcEYFdJBPMINU91DKPeVVrU2k9oXWsgpvpdO/Z | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint + +![Decrypt String in Linux](http://www.tecmint.com/wp-content/uploads/2015/03/Decrypt-String-in-Linux.gif) +Decrypt String in Linux + +That’s all for now. If you know any such tips and tricks you may send us your tips at admin@tecmint.com, your tip will be published under your name and also we will include it in our future article. + +Keep connected. Keep Connecting. Stay Tuned. Don’t forget to provide us with your valuable feedback in the comments below. + +-------------------------------------------------------------------------------- + +via: http://www.tecmint.com/generate-encrypt-decrypt-random-passwords-in-linux/ + +作者:[Avishek Kumar][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.tecmint.com/author/avishek/ +[1]:http://www.tecmint.com/5-linux-command-line-tricks/ +[2]:http://www.tecmint.com/echo-command-in-linux/ \ No newline at end of file diff --git a/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md b/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md new file mode 100644 index 0000000000..8f98a2ba02 --- /dev/null +++ b/sources/tech/20150331 How to set up remote desktop on Linux VPS using x2go.md @@ -0,0 +1,137 @@ +How to set up remote desktop on Linux VPS using x2go +================================================================================ +As everything is moved to the cloud, virtualized remote desktop becomes increasingly popular in the industry as a way to enhance employee's productivity. Especially for those who need to roam constantly across multiple locations and devices, remote desktop allows them to stay connected seamlessly to their work environment. Remote desktop is attractive for employers as well, achieving increased agility and flexibility in work environments, lower IT cost due to hardware consolidation, desktop security hardening, and so on. + +In the world of Linux, of course there is no shortage of choices for settings up remote desktop environment, with many protocols (e.g., RDP, RFB, NX) and server/client implementations (e.g., [TigerVNC][1], RealVNC, FreeNX, x2go, X11vnc, TeamViewer) available. + +Standing out from the pack is [X2Go][2], an open-source (GPLv2) implementation of NX-based remote desktop server and client. In this tutorial, I am going to demonstrate **how to set up remote desktop environment for [Linux VPS][3] using X2Go**. + +### What is X2Go? ### + +The history of X2Go goes back to NoMachine's NX technology. The NX remote desktop protocol was designed to deal with low bandwidth and high latency network connections by leveraging aggressive compression and caching. Later, NX was turned into closed-source while NX libraries were made GPL-ed. This has led to open-source implementation of several NX-based remote desktop solutions, and one of them is X2Go. + +What benefits does X2Go bring to the table, compared to other solutions such as VNC? X2Go inherits all the advanced features of NX technology, so naturally it works well over slow network connections. Besides, X2Go boasts of an excellent track record of ensuring security with its built-in SSH-based encryption. No longer need to set up an SSH tunnel [manually][4]. X2Go comes with audio support out of box, which means that music playback at the remote desktop is delivered (via PulseAudio) over network, and fed into local speakers. On usability front, an application that you run on remote desktop can be seamlessly rendered as a separate window on your local desktop, giving you an illusion that the application is actually running on the local desktop. As you can see, these are some of [its powerful features][5] lacking in VNC based solutions. + +### X2GO's Desktop Environment Compatibility ### + +As with other remote desktop servers, there are [known compatibility issues][6] for X2Go server. Desktop environments like KDE3/4, Xfce, MATE and LXDE are the most friendly to X2Go server. However, your mileage may vary with other desktop managers. For example, the later versions of GNOME 3, KDE5, Unity are known to be not compatible with X2Go. If the desktop manager of your remote host is compatible with X2Go, you can follow the rest of the tutorial. + +### Install X2Go Server on Linux ### + +X2Go consists of remote desktop server and client components. Let's start with X2Go server installation. I assume that you already have an X2Go-compatible desktop manager up and running on a remote host, where we will be installing X2Go server. + +Note that X2Go server component does not have a separate service that needs to be started upon boot. You just need to make sure that SSH service is up and running. + +#### Ubuntu or Linux Mint: #### + +Configure X2Go PPA repository. X2Go PPA is available for Ubuntu 14.04 and higher. + + $ sudo add-apt-repository ppa:x2go/stable + $ sudo apt-get update + $ sudo apt-get install x2goserver x2goserver-xsession + +#### Debian (Wheezy): #### + + $ sudo apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E + $ sudo sh -c "echo deb http://packages.x2go.org/debian wheezy main > /etc/apt/sources.list.d/x2go.list" + $ sudo sh -c "echo deb-src http://packages.x2go.org/debian wheezy main >> /etc/apt/sources.list.d/x2go.list" + $ sudo apt-get update + $ sudo apt-get install x2goserver x2goserver-xsession + +#### Fedora: #### + + $ sudo yum install x2goserver x2goserver-xsession + +#### CentOS/RHEL: #### + +Enable [EPEL respository][7] first, and then run: + + $ sudo yum install x2goserver x2goserver-xsession + +### Install X2Go Client on Linux ### + +On a local host where you will be connecting to remote desktop, install X2GO client as follows. + +#### Ubuntu or Linux Mint: #### + +Configure X2Go PPA repository. X2Go PPA is available for Ubuntu 14.04 and higher. + + $ sudo add-apt-repository ppa:x2go/stable + $ sudo apt-get update + $ sudo apt-get install x2goclient + +Debian (Wheezy): + + $ sudo apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E + $ sudo sh -c "echo deb http://packages.x2go.org/debian wheezy main > /etc/apt/sources.list.d/x2go.list" + $ sudo sh -c "echo deb-src http://packages.x2go.org/debian wheezy main >> /etc/apt/sources.list.d/x2go.list" + $ sudo apt-get update + $ sudo apt-get install x2goclient + +#### Fedora: #### + + $ sudo yum install x2goclient + +CentOS/RHEL: + +Enable EPEL respository first, and then run: + + $ sudo yum install x2goclient + +### Connect to Remote Desktop with X2Go Client ### + +Now it's time to connect to your remote desktop. On the local host, simply run the following command or use desktop launcher to start X2Go client. + + $ x2goclient + +Enter the remote host's IP address and SSH user name. Also, specify session type (i.e., desktop manager of a remote host). + +![](https://farm9.staticflickr.com/8730/16365755693_75f3d544e9_b.jpg) + +If you want, you can customize other things (by pressing other tabs), like connection speed, compression, screen resolution, and so on. + +![](https://farm9.staticflickr.com/8699/16984498482_665b975eca_b.jpg) + +![](https://farm9.staticflickr.com/8694/16985838755_1b7df1eb78_b.jpg) + +When you initiate a remote desktop connection, you will be asked to log in. Type your SSH login and password. + +![](https://farm9.staticflickr.com/8754/16984498432_1c8068b817_b.jpg) + +Upon successful login, you will see the remote desktop screen. + +![](https://farm9.staticflickr.com/8752/16798126858_1ab083ba80_c.jpg) + +If you want to test X2Go's seamless window feature, choose "Single application" as session type, and specify the path to an executable on the remote host. In this example, I choose Dolphin file manager on a remote KDE host. + +![](https://farm8.staticflickr.com/7584/16798393920_128c3af9c5_b.jpg) + +Once you are successfully connected, you will see a remote application window open on your local desktop, not the entire remote desktop screen. + +![](https://farm9.staticflickr.com/8742/16365755713_7b90cf65f0_c.jpg) + +### Conclusion ### + +In this tutorial, I demonstrated how to set up X2Go remote desktop on [Linux VPS][8] instance. As you can see, the whole setup process is pretty much painless (if you are using a right desktop environment). While there are some desktop-specific quirkiness, X2Go is a solid remote desktop solution which is secure, feature-rich, fast, and free. + +What feature is the most appealing to you in X2Go? Please share your thought. + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/x2go-remote-desktop-linux.html + +作者:[Dan Nanni][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/nanni +[1]:http://ask.xmodulo.com/centos-remote-desktop-vps.html +[2]:http://wiki.x2go.org/ +[3]:http://xmodulo.com/go/digitalocean +[4]:http://xmodulo.com/how-to-set-up-vnc-over-ssh.html +[5]:http://wiki.x2go.org/doku.php/doc:newtox2go +[6]:http://wiki.x2go.org/doku.php/doc:de-compat +[7]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html +[8]:http://xmodulo.com/go/digitalocean \ No newline at end of file diff --git a/sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md b/sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md new file mode 100644 index 0000000000..1ddccaa8c6 --- /dev/null +++ b/sources/tech/20150331 Linux Email App Geary Updated--How To Install It In Ubuntu.md @@ -0,0 +1,70 @@ +Linux Email App Geary Updated — How To Install It In Ubuntu +================================================================================ +**Geary, the popular desktop email client for Linux, has been updated to version 0.10 — and it gains a glut of new features in the process.** + +![An older version of Geary running in elementary OS](http://www.omgubuntu.co.uk/wp-content/uploads/2015/01/geary.jpg) +An older version of Geary running in elementary OS + +Geary 0.100 features some welcome user interface improvements and additional UI options, including: + +- New: Ability to ‘Undo’ Archive, Trash and Move actions +- New: Option to switch between a 2 column or 2 column layout +- New “split header bar” — improves message list, composer layouts +- New shortcut keys — use j/k to navigate next/previous conversations + +This update also introduces a **brand new full-text search algorithm** designed to improve the search experience in Geary, according to Yorba. + +This introduction should calm some complaints of the app’s search prowess, which often sees Geary return a slew of search results that are, to quote software outfit themselves, “…seemingly unrelated to the search query.” + +> ‘Yorba recommends that all users of the client upgrade to this release’ + +*“Although not all search problems are fixed in 0.10, Geary should be more conservative about displaying results that match the user’s query,” [the team notes][1]. * + +Last but by no means least on the main feature front is something sure to find favour with power users: **support for multiple/alternate e-mail addresses per account**. + +If your main Gmail account is set-up in Geary to pull in your Yahoo, Outlook and KittyMail messages too then you should now see them all kept neatly together and be given the option of picking which identity you send from when using the composer ‘From’ field. No, it’s not the sexiest feature but it is one that has been requested often. + +Rounding out this release of the popular Linux email client is the usual gamut of bug fixes, performance optimisations and miscellaneous improvements. + +Yorba recommends that all users of the client upgrade to this release. + +### Install Geary 0.10 in Ubuntu 14.04, 14.10 & 15.04 ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2014/09/geary-inline-composor.jpg) + +The latest version of Yorba is available to download as source, ready for compiling from the GNOME Git. But let’s be honest: that’s a bit of a hassle, right? + +Ubuntu users wondering how to install Geary 0.10 in **14.04, 14.10** and (for early birds) **15.04** have things easy. + +The official Yorba PPA contains the **latest versions of Geary** as well as those for Shotwell (photo manager) and [California][2] (calendar app). Be aware that any existing versions of these apps installed on your computer may/will be upgraded to a more recent version by adding this PPA. + +Capiche? Coolio. + +To install Geary in Ubuntu you first need to add the Yorba PPA your Softwares Sources. To do this just open a new Terminal window and carefully enter the following two commands: + + sudo add-apt-repository ppa:yorba/ppa + + sudo apt-get update && sudo apt-get install geary + +After hitting return/enter on the last you’ll be prompted to enter your password. Do this, and then let the installation complete. + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2013/04/20130320161830-geary-yorba.png) + +Once done, open your desktop environment’s app launcher and seek out the ‘Geary’ icon. Click it, add your account(s) and discover [what the email mail man has dropped off through the information superhighway][3] and into the easy to use graphical interface. + +**Don’t forget: you can always tip us with news, app suggestions, and anything else you’d like to see us cover by using the power of electronic mail. Direct your key punches to joey [at] oho [dot] io.** + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/03/install-geary-ubuntu-linux-email-update + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:https://wiki.gnome.org/Apps/Geary/FullTextSearchStrategy +[2]:http://www.omgubuntu.co.uk/2014/10/california-calendar-natural-language-parser +[3]:https://www.youtube.com/watch?v=rxM8C71GB8w \ No newline at end of file From a5cd670cde7a5768aa271056059a18c8d7dd4ccf Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 31 Mar 2015 16:29:15 +0800 Subject: [PATCH 0416/2517] =?UTF-8?q?20150331-2=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dPress with Nginx in a Docker Container.md | 348 ++++++++++++++++++ ...ling PHP 7.0 on CentOS 7.x or Fedora 21.md | 323 ++++++++++++++++ 2 files changed, 671 insertions(+) create mode 100644 sources/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md create mode 100644 sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md diff --git a/sources/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md b/sources/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md new file mode 100644 index 0000000000..9f74c672f4 --- /dev/null +++ b/sources/tech/20150331 How to Install WordPress with Nginx in a Docker Container.md @@ -0,0 +1,348 @@ +How to Install WordPress with Nginx in a Docker Container +================================================================================ +Hi all, today we'll learn how to install WordPress running Nginx Web Server in a Docker Container. WordPress is an awesome free and open source Content Management System running thousands of websites throughout the globe. [Docker][1] is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. + +Today, we'll deploy a docker container with the latest WordPress package with necessary prerequisites ie Nginx Web Server, PHP5, MariaDB Server, etc. Here are some short and sweet steps to successfully install a WordPress running Nginx in a Docker Container. + +### 1. Installing Docker ### + +Before we really start, we'll need to make sure that we have Docker installed in our Linux machine. Here, we are running CentOS 7 as host so, we'll be running yum manager to install docker using the below command. + + # yum install docker + +![Installing Docker](http://blog.linoxide.com/wp-content/uploads/2015/03/installing-docker.png) + + # systemctl restart docker.service + +### 2. Creating WordPress Dockerfile ### + +We'll need to create a Dockerfile which will automate the installation of the wordpress and its necessary pre-requisites. This Dockerfile will be used to build the image of WordPress installation we created. This WordPress Dockerfile fetches a CentOS 7 image from the Docker Registry Hub and updates the system with the latest available packages. It then installs the necessary softwares like Nginx Web Server, PHP, MariaDB, Open SSH Server and more which are essential for the Docker Container to work. It then executes a script which will initialize the installation of WordPress out of the box. + + # nano Dockerfile + +Then, we'll need to add the following lines of configuration inside that Dockerfile. + + FROM centos:centos7 + MAINTAINER The CentOS Project + + RUN yum -y update; yum clean all + RUN yum -y install epel-release; yum clean all + RUN yum -y install mariadb mariadb-server mariadb-client nginx php-fpm php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-magickwand php-magpierss php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy php-apc pwgen python-setuptools curl git tar; yum clean all + ADD ./start.sh /start.sh + ADD ./nginx-site.conf /nginx.conf + RUN mv /nginx.conf /etc/nginx/nginx.conf + RUN rm -rf /usr/share/nginx/html/* + RUN /usr/bin/easy_install supervisor + RUN /usr/bin/easy_install supervisor-stdout + ADD ./supervisord.conf /etc/supervisord.conf + RUN echo %sudo ALL=NOPASSWD: ALL >> /etc/sudoers + ADD http://wordpress.org/latest.tar.gz /wordpress.tar.gz + RUN tar xvzf /wordpress.tar.gz + RUN mv /wordpress/* /usr/share/nginx/html/. + RUN chown -R apache:apache /usr/share/nginx/ + RUN chmod 755 /start.sh + RUN mkdir /var/run/sshd + + EXPOSE 80 + EXPOSE 22 + + CMD ["/bin/bash", "/start.sh"] + +![Wordpress Dockerfile](http://blog.linoxide.com/wp-content/uploads/2015/03/Dockerfile-wordpress.png) + +### 3. Creating Start script ### + +After we create our Dockerfile, we'll need to create a script named start.sh which will run and configure our WordPress installation. It will create and configure database, passwords for wordpress. To create it, we'll need to open start.sh with our favorite text editor. + + # nano start.sh + +After opening start.sh, we'll need to add the following lines of configuration into it. + + #!/bin/bash + + __check() { + if [ -f /usr/share/nginx/html/wp-config.php ]; then + exit + fi + } + + __create_user() { + # Create a user to SSH into as. + SSH_USERPASS=`pwgen -c -n -1 8` + useradd -G wheel user + echo user:$SSH_USERPASS | chpasswd + echo ssh user password: $SSH_USERPASS + } + + __mysql_config() { + # Hack to get MySQL up and running... I need to look into it more. + yum -y erase mariadb mariadb-server + rm -rf /var/lib/mysql/ /etc/my.cnf + yum -y install mariadb mariadb-server + mysql_install_db + chown -R mysql:mysql /var/lib/mysql + /usr/bin/mysqld_safe & + sleep 10 + } + + __handle_passwords() { + # Here we generate random passwords (thank you pwgen!). The first two are for mysql users, the last batch for random keys in wp-config.php + WORDPRESS_DB="wordpress" + MYSQL_PASSWORD=`pwgen -c -n -1 12` + WORDPRESS_PASSWORD=`pwgen -c -n -1 12` + # This is so the passwords show up in logs. + echo mysql root password: $MYSQL_PASSWORD + echo wordpress password: $WORDPRESS_PASSWORD + echo $MYSQL_PASSWORD > /mysql-root-pw.txt + echo $WORDPRESS_PASSWORD > /wordpress-db-pw.txt + # There used to be a huge ugly line of sed and cat and pipe and stuff below, + # but thanks to @djfiander's thing at https://gist.github.com/djfiander/6141138 + # there isn't now. + sed -e "s/database_name_here/$WORDPRESS_DB/ + s/username_here/$WORDPRESS_DB/ + s/password_here/$WORDPRESS_PASSWORD/ + /'AUTH_KEY'/s/put your unique phrase here/`pwgen -c -n -1 65`/ + /'SECURE_AUTH_KEY'/s/put your unique phrase here/`pwgen -c -n -1 65`/ + /'LOGGED_IN_KEY'/s/put your unique phrase here/`pwgen -c -n -1 65`/ + /'NONCE_KEY'/s/put your unique phrase here/`pwgen -c -n -1 65`/ + /'AUTH_SALT'/s/put your unique phrase here/`pwgen -c -n -1 65`/ + /'SECURE_AUTH_SALT'/s/put your unique phrase here/`pwgen -c -n -1 65`/ + /'LOGGED_IN_SALT'/s/put your unique phrase here/`pwgen -c -n -1 65`/ + /'NONCE_SALT'/s/put your unique phrase here/`pwgen -c -n -1 65`/" /usr/share/nginx/html/wp-config-sample.php > /usr/share/nginx/html/wp-config.php + } + + __httpd_perms() { + chown apache:apache /usr/share/nginx/html/wp-config.php + } + + __start_mysql() { + # systemctl start mysqld.service + mysqladmin -u root password $MYSQL_PASSWORD + mysql -uroot -p$MYSQL_PASSWORD -e "CREATE DATABASE wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY '$WORDPRESS_PASSWORD'; FLUSH PRIVILEGES;" + killall mysqld + sleep 10 + } + + __run_supervisor() { + supervisord -n + } + + # Call all functions + __check + __create_user + __mysql_config + __handle_passwords + __httpd_perms + __start_mysql + __run_supervisor + +![Start Script](http://blog.linoxide.com/wp-content/uploads/2015/03/start-script.png) + +After adding the above configuration, we'll need to save it and then exit. + +### 4. Creating Configuration files ### + +Now, we'll need to create configuration file for Nginx Web Server named nginx-site.conf . + + # nano nginx-site.conf + +Then, we'll add the following configuration to the config file. + + user nginx; + worker_processes 1; + + error_log /var/log/nginx/error.log; + #error_log /var/log/nginx/error.log notice; + #error_log /var/log/nginx/error.log info; + + pid /run/nginx.pid; + events { + worker_connections 1024; + } + http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + #keepalive_timeout 0; + keepalive_timeout 65; + + #gzip on; + + index index.html index.htm index.php; + + # Load modular configuration files from the /etc/nginx/conf.d directory. + # See http://nginx.org/en/docs/ngx_core_module.html#include + # for more information. + include /etc/nginx/conf.d/*.conf; + + server { + listen 80; + server_name localhost; + + #charset koi8-r; + + #access_log logs/host.access.log main; + root /usr/share/nginx/html; + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + location ~ \.php$ { + + root /usr/share/nginx/html; + try_files $uri =404; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} + + } + } + +![Nginx configuration](http://blog.linoxide.com/wp-content/uploads/2015/03/nginx-conf.png) + +Now, we'll create supervisord.conf file and add the following lines as shown below. + + # nano supervisord.conf + +Then, add the following lines. + + [unix_http_server] + file=/tmp/supervisor.sock ; (the path to the socket file) + + [supervisord] + logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log) + logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) + logfile_backups=10 ; (num of main logfile rotation backups;default 10) + loglevel=info ; (log level;default info; others: debug,warn,trace) + pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid) + nodaemon=false ; (start in foreground if true;default false) + minfds=1024 ; (min. avail startup file descriptors;default 1024) + minprocs=200 ; (min. avail process descriptors;default 200) + + ; the below section must remain in the config file for RPC + ; (supervisorctl/web interface) to work, additional interfaces may be + ; added by defining them in separate rpcinterface: sections + [rpcinterface:supervisor] + supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + + [supervisorctl] + serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket + + [program:php-fpm] + command=/usr/sbin/php-fpm -c /etc/php/fpm + stdout_events_enabled=true + stderr_events_enabled=true + + [program:php-fpm-log] + command=tail -f /var/log/php-fpm/php-fpm.log + stdout_events_enabled=true + stderr_events_enabled=true + + [program:mysql] + command=/usr/bin/mysql --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 + stdout_events_enabled=true + stderr_events_enabled=true + + [program:nginx] + command=/usr/sbin/nginx + stdout_events_enabled=true + stderr_events_enabled=true + + [eventlistener:stdout] + command = supervisor_stdout + buffer_size = 100 + events = PROCESS_LOG + result_handler = supervisor_stdout:event_handler + +![Supervisord Configuration](http://blog.linoxide.com/wp-content/uploads/2015/03/supervisord.png) + +After adding, we'll save and exit the file. + +### 5. Building WordPress Container ### + +Now, after done with creating configurations and scripts, we'll now finally use the Dockerfile to build our desired container with the latest WordPress CMS installed and configured according to the configuration. To do so, we'll run the following command in that directory. + + # docker build --rm -t wordpress:centos7 . + +![Building WordPress Container](http://blog.linoxide.com/wp-content/uploads/2015/03/building-wordpress-container.png) + +### 6. Running WordPress Container ### + +Now, to run our newly built container and open port 80 and 22 for Nginx Web Server and SSH access respectively, we'll run the following command. + + # CID=$(docker run -d -p 80:80 wordpress:centos7) + +![Run WordPress Docker](http://blog.linoxide.com/wp-content/uploads/2015/03/run-wordpress-docker.png) + +To check the process and commands executed inside the container, we'll run the following command. + + # echo "$(docker logs $CID )" + +TO check if the port mapping is correct or not, run the following command. + + # docker ps + +![docker state](http://blog.linoxide.com/wp-content/uploads/2015/03/docker-state.png) + +### 7. Web Interface ### + +Finally if everything went accordingly, we'll be welcomed with WordPress when pointing the browser to http://ip-address/ or http://mywebsite.com/ . + +![Wordpress Start](http://blog.linoxide.com/wp-content/uploads/2015/03/wordpress-start.png) + +Now, we'll go step wise through the web interface and setup wordpress configuration, username and password for the WordPress Panel. + +![Wordpress Welcome](http://blog.linoxide.com/wp-content/uploads/2015/03/wordpress-welcome.png) + +Then, use the username and password entered above into the WordPress Login page. + +![wordpress login](http://blog.linoxide.com/wp-content/uploads/2015/03/wordpress-login.png) + +### Conclusion ### + +We successfully built and run WordPress CMS under LEMP Stack running in CentOS 7 Operating System as the docker OS. Running WordPress inside a container makes a lot safe and secure to the host system from the security perspective. This article enables one to completely configure WordPress to run under Docker Container with Nginx Web Server. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-wordpress-nginx-docker-container/ + +作者:[Arun Pyasi][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://docker.io/ \ No newline at end of file diff --git a/sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md b/sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md new file mode 100644 index 0000000000..b34cb616d8 --- /dev/null +++ b/sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md @@ -0,0 +1,323 @@ +Its Now Worth Try Installing PHP 7.0 on CentOS 7.x / Fedora 21 +================================================================================ +PHP is a well known general purpose, server side web scripting language. A vast majority of online websites are coded in this language. PHP is ever evolving, feature rich, easy to use and well organized scripting language. Currently PHP development team is working on next major release of PHP, named PHP 7. The current production PHP version is PHP 5.6, as you might already know that PHP 6 was aborted in the past, the supporters of PHP 7 did not want the next important PHP version to be confused with that branch that was killed long time in the past. So it has been decided to name the next major release of PHP as PHP 7 instead of 6. PHP 7.0 is supposed to be released in November this year. + +Here are some of the prominent features in next major PHP release. + +- In order to improve performance and memory footprints PHPNG feature has been added to this new release. +- JIT engine has been included to dynamically compile Zend opcodes into native machine code in order to achieve faster processing. This feature will allow subsequent calls to the same code so that it may run much faster. +- AST (Abstract Syntax Tree) is a newly added feature which will enhance support for php extensions and userland applications. +- Asynchronous Programming feature will add support for parallel tasks within the same request. +- New version will support for stand alone multi-threading web server so that it may handle many simultaneous requests using a single memory pool. + +### Installing PHP 7 on Centos / Fedora ### + +Lets see how we can install PHP7 on Centos 7 and Fedora 21. In order to install PHP7 we will need to first clone php-src repository. Once cloning process is complete, we will configure and compile it. Before we proceed, lets ensure that we do have followings installed on our Linux system otherwise PHP compile process will return errors and abort. + +- Git +- autoconf +- gcc +- bison + +All of the above metioned prerequisits can be installed using Yum package manager. The following single command should take care of this: + + yum install git autoconf gcc bison + +Ready to start PHP7 installation process ? Lets first create PHP7 directory and make it your working directory. + + mkdir php7 + + cd php7 + +Now clone php-src repo, run following command on the terminal. + + git clone https://git.php.net/repository/php-src.git + +The process should complete in few min, here is sample output which you should see at the completion of this task. + + [root@localhost php7]# git clone https://git.php.net/repository/php-src.git + + Cloning into 'php-src'... + + remote: Counting objects: 615064, done. + + remote: Compressing objects: 100% (127800/127800), done. + + remote: Total 615064 (delta 492063), reused 608718 (delta 485944) + + Receiving objects: 100% (615064/615064), 152.32 MiB | 16.97 MiB/s, done. + + Resolving deltas: 100% (492063/492063), done. + +Lets configure and compile PHP7, run following commands on the terminal to start the configuration process: + + cd php-src + + ./buildconf + +Here is sample output for ./buildconf command. + + [root@localhost php-src]# ./buildconf + + buildconf: checking installation... + + buildconf: autoconf version 2.69 (ok) + + rebuilding aclocal.m4 + + rebuilding configure + + rebuilding main/php_config.h.in + +Proceed further with the configuration process using following command: + + ./configure \ + + --prefix=$HOME/php7/usr \ + + --with-config-file-path=$HOME/php7/usr/etc \ + + --enable-mbstring \ + + --enable-zip \ + + --enable-bcmath \ + + --enable-pcntl \ + + --enable-ftp \ + + --enable-exif \ + + --enable-calendar \ + + --enable-sysvmsg \ + + --enable-sysvsem \ + + --enable-sysvshm \ + + --enable-wddx \ + + --with-curl \ + + --with-mcrypt \ + + --with-iconv \ + + --with-gmp \ + + --with-pspell \ + + --with-gd \ + + --with-jpeg-dir=/usr \ + + --with-png-dir=/usr \ + + --with-zlib-dir=/usr \ + + --with-xpm-dir=/usr \ + + --with-freetype-dir=/usr \ + + --with-t1lib=/usr \ + + --enable-gd-native-ttf \ + + --enable-gd-jis-conv \ + + --with-openssl \ + + --with-mysql=/usr \ + + --with-pdo-mysql=/usr \ + + --with-gettext=/usr \ + + --with-zlib=/usr \ + + --with-bz2=/usr \ + + --with-recode=/usr \ + + --with-mysqli=/usr/bin/mysql_config + +It will take a sweet amount to time, once completed, you should see output like this: + + creating libtool + + appending configuration tag "CXX" to libtool + + Generating files + + configure: creating ./config.status + + creating main/internal_functions.c + + creating main/internal_functions_cli.c + + +--------------------------------------------------------------------+ + + | License: | + + | This software is subject to the PHP License, available in this | + + | distribution in the file LICENSE. By continuing this installation | + + | process, you are bound by the terms of this license agreement. | + + | If you do not agree with the terms of this license, you must abort | + + | the installation process at this point. | + + +--------------------------------------------------------------------+ + + + + Thank you for using PHP. + + + + config.status: creating php7.spec + + config.status: creating main/build-defs.h + + config.status: creating scripts/phpize + + config.status: creating scripts/man1/phpize.1 + + config.status: creating scripts/php-config + + config.status: creating scripts/man1/php-config.1 + + config.status: creating sapi/cli/php.1 + + config.status: creating sapi/cgi/php-cgi.1 + + config.status: creating ext/phar/phar.1 + + config.status: creating ext/phar/phar.phar.1 + + config.status: creating main/php_config.h + + config.status: executing default commands + + + +Run following command to complete the compilation process. + + make + +Sample output for “make” command is shown below: + + Generating phar.php + + Generating phar.phar + + PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled. + + clicommand.inc + + directorytreeiterator.inc + + directorygraphiterator.inc + + pharcommand.inc + + invertedregexiterator.inc + + phar.inc + + + + Build complete. + + Don't forget to run 'make test'. + +That’s all, its time to install PHP7 now, run following to install it. + + make install + +Sample output for successful install process should look like: + + [root@localhost php-src]# make install + + Installing shared extensions: /root/php7/usr/lib/php/extensions/no-debug-non-zts-20141001/ + + Installing PHP CLI binary: /root/php7/usr/bin/ + + Installing PHP CLI man page: /root/php7/usr/php/man/man1/ + + Installing PHP CGI binary: /root/php7/usr/bin/ + + Installing PHP CGI man page: /root/php7/usr/php/man/man1/ + + Installing build environment: /root/php7/usr/lib/php/build/ + + Installing header files: /root/php7/usr/include/php/ + + Installing helper programs: /root/php7/usr/bin/ + + program: phpize + + program: php-config + + Installing man pages: /root/php7/usr/php/man/man1/ + + page: phpize.1 + + page: php-config.1 + + Installing PEAR environment: /root/php7/usr/lib/php/ + + [PEAR] Archive_Tar - installed: 1.3.13 + + [PEAR] Console_Getopt - installed: 1.3.1 + + [PEAR] Structures_Graph- installed: 1.0.4 + + [PEAR] XML_Util - installed: 1.2.3 + + [PEAR] PEAR - installed: 1.9.5 + + Wrote PEAR system config file at: /root/php7/usr/etc/pear.conf + + You may want to add: /root/php7/usr/lib/php to your php.ini include_path + + /root/php7/php-src/build/shtool install -c ext/phar/phar.phar /root/php7/usr/bin + + ln -s -f /root/php7/usr/bin/phar.phar /root/php7/usr/bin/phar + + Installing PDO headers: /root/php7/usr/include/php/ext/pdo/ + +Conguratulaion, PHP 7 has been installed on your Linux system now. Once installation is complete, move to sapi/cli direcoty inside php7 installation folder. + + cd sapi/cli + +and verify PHP version from here. + + [root@localhost cli]# ./php -v + + PHP 7.0.0-dev (cli) (built: Mar 28 2015 00:54:11) + + Copyright (c) 1997-2015 The PHP Group + + Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies + +### Conclusion ### + +PHP 7 is also [added in remi repositories][1], this upcoming version is mainly focused on performance improvements, its new features are aimed to make PHP as a well fit for modern programming needs and trends. PHP 7.0 will have many new features and some deprecations to the old items. We hope to see details about new features and deprecations in the coming months. Enjoy! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-php-7-centos-7-fedora-21/ + +作者:[Aun Raza][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:http://blog.famillecollet.com/post/2015/03/25/PHP-7.0-as-Software-Collection \ No newline at end of file From f345442fed75078ca6189605a9499d987318b544 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 31 Mar 2015 18:32:51 +0800 Subject: [PATCH 0417/2517] Translating by ZTinoZ --- ...324 How to Host Open Source Code Repository in github.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md index 40bc045b47..00c7cb57e6 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -8,13 +8,13 @@ ### 1. 创建一个新的Github账号 ### -首先First of all, open your favorite browser and go to Github's homepage url ie [github][1]. Then, the homepage will be opened as shown below. +首先,打开你最喜欢的浏览器并访问[github][1],首页页面如下所示。 ![Github Homepage](http://blog.linoxide.com/wp-content/uploads/2015/03/github-homepage.png) -Now, after the homepage has been opened, please fill form shown to sign up for a new github account. +现在,首页打开之后,请填写一个新的github账号用于注册。 -After the you entered the valid information required for sign up, you'll be redirected to the plan choosing step. We have 5 plans listed in this page. One can choose the plan according to their requirement. Here, we'll go for a free plan. So, click on Choose to the Free plan and click on Finish Sign up. If we are planning to create an organization then, we need to tick on Help me setup an organization next. +输入注册所需的有效信息之后,你会被转到计划选择的步骤。在这个页面上有5种计划,我们可以根据需要来选择,这里我们要选择免费计划。所以,我们点击选择Free计划并完成注册。如果我们接下去还打算创建一个组织,那我们需要勾选“Help me setup an organization next”。 ![choosing plan](http://blog.linoxide.com/wp-content/uploads/2015/03/choosing-plan.png) From de57e8d830a6d1df27e6ff20dc412f8d6ce1602c Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 31 Mar 2015 23:43:51 +0800 Subject: [PATCH 0418/2517] PUB:20150225 How to Hide PHP Version in Linux @geekpi --- .../20150225 How to Hide PHP Version in Linux.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) rename {translated/tech => published}/20150225 How to Hide PHP Version in Linux.md (59%) diff --git a/translated/tech/20150225 How to Hide PHP Version in Linux.md b/published/20150225 How to Hide PHP Version in Linux.md similarity index 59% rename from translated/tech/20150225 How to Hide PHP Version in Linux.md rename to published/20150225 How to Hide PHP Version in Linux.md index 1634ff2af2..89dcdf4f75 100644 --- a/translated/tech/20150225 How to Hide PHP Version in Linux.md +++ b/published/20150225 How to Hide PHP Version in Linux.md @@ -1,8 +1,8 @@ -如何在Linux中隐藏PHP版本 +如何在Linux服务器中隐藏PHP版本 ================================================================================ -通常上,大多数默认设置安装的web服务器存在信息泄露。这其中之一是PHP。PHP(超文本预处理器)是如今流行的服务端html嵌入式语言。在如今这个充满挑战的时代,有许多攻击者会尝试发现你服务端的漏洞。因此,我会简单描述如何在Linux服务器中隐藏PHP信息。 +通常,大多数默认设置安装的web服务器存在信息泄露,这其中之一就是PHP。PHP 是如今流行的服务端html嵌入式语言(之一?)。在如今这个充满挑战的时代,有许多攻击者会尝试发现你服务端的漏洞。因此,我会简单描述如何在Linux服务器中隐藏PHP信息。 -默认上**exposr_php**默认是开的。关闭“expose_php”参数可以使php隐藏它的版本信息。 +默认上**expose_php**默认是开的。关闭“expose_php”参数可以使php隐藏它的版本信息。 [root@centos66 ~]# vi /etc/php.ini @@ -26,9 +26,9 @@ X-Page-Speed: 1.9.32.2-4321 Cache-Control: max-age=0, no-cache -更改之后,php就不会在web服务头中显示版本了: +更改并重启 Web 服务后,php就不会在web服务头中显示版本了: -[root@centos66 ~]# curl -I http://www.ehowstuff.com/ +```[root@centos66 ~]# curl -I http://www.ehowstuff.com/ HTTP/1.1 200 OK Server: nginx @@ -39,8 +39,9 @@ X-Pingback: http://www.ehowstuff.com/xmlrpc.php Date: Wed, 11 Feb 2015 14:10:43 GMT X-Page-Speed: 1.9.32.2-4321 Cache-Control: max-age=0, no-cache +``` -有任何需要帮助的请到twiiter @ehowstuff,或在下面留下你的评论。[点此获取更多历史文章][1] +LCTT译注:除了 PHP 的版本之外,Web 服务器也会默认泄露版本号。如果使用 Apache 服务器,请[参照此文章关闭Apache 版本显示][2];如果使用 Nginx 服务器,请在 http 段内加入`server_tokens off;` 配置。以上修改请记得重启相关服务。 -------------------------------------------------------------------------------- @@ -48,9 +49,10 @@ via: http://www.ehowstuff.com/how-to-hide-php-version-in-linux/ 作者:[skytech][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.ehowstuff.com/author/mhstar/ [1]:http://www.ehowstuff.com/archives/ +[2]:http://linux.cn/article-3642-1.html \ No newline at end of file From 528f2bb8b9469e4b6b860323fcd597eaaadd0211 Mon Sep 17 00:00:00 2001 From: Frank Zhang Date: Wed, 1 Apr 2015 00:01:57 +0800 Subject: [PATCH 0419/2517] [translated] 20150316 Systemd Boot Process a Close Look in Linux.md --- ...temd Boot Process a Close Look in Linux.md | 151 ------------------ ...temd Boot Process a Close Look in Linux.md | 150 +++++++++++++++++ 2 files changed, 150 insertions(+), 151 deletions(-) delete mode 100644 sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md create mode 100644 translated/tech/20150316 Systemd Boot Process a Close Look in Linux.md diff --git a/sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md b/sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md deleted file mode 100644 index eded061738..0000000000 --- a/sources/tech/20150316 Systemd Boot Process a Close Look in Linux.md +++ /dev/null @@ -1,151 +0,0 @@ -zpl1025 -Systemd Boot Process a Close Look in Linux -================================================================================ -The way Linux system boots up is quite complex and there have always been need to optimize the way it works. The traditional boot up process of Linux system is mainly handled by the well know init process (also known as SysV init boot system), while there have been identified inefficiencies in the init based boot system, systemd on the other hand is another boot up manager for Linux based systems which claims to overcome the shortcomings of [traditional Linux SysV init][2] based system. We will be focusing our discussion on the features and controversies of systemd , but in order to understand it, let’s see how Linux boot process is handled by traditional SysV init based system. Kindly note that Systemd is still in testing phase and future releases of Linux operating systems are preparing to replace their current boot process with Systemd Boot manager. - -### Understanding Linux Boot Process ### - -Init is the very first process that starts when we power on our Linux system. Init process is assigned the PID of 1. It is parent process for all other processes on the system. When a Linux computer is started, the processor searches for the BIOS on the system memory, BIOS then tests system resources and find the first boot device, usually set as hard disk, it looks for Master Boot Record (MBR) on the hard disk, loads its contents to memory and passes control to it, the further boot process is controlled by MBR. - -Master Boot Record initiates the Boot loader (Linux has two well know boot loaders, GRUB and LILO, 80% of Linux systems are using GRUB loaders), this is the time when GRUB or LILO loads the kernel module. Kernel module immediately looks for the “init” in /sbin partition and executes it. That’s from where init becomes the parent process of Linux system. The very first file read by init is /etc/inittab , from here init decides the run level of our Linux operating system. It finds partition table information from /etc/fstab file and mounts partitions accordingly. Init then launches all the services/scripts specified in the /etc/init.d directory of the default run level. This is the step where all services are initialized by init one by one. In this process, one service at a time is started by init , all services/daemons run in the background and init keeps managing them. - -The shutdown process works in pretty much the reverse function, first of all init stops all services and then filesystem is un-mounted at the last stage. - -The above mentioned process has some shortcomings. The need to replace traditional init with something better have been felt from long time now. Some replacements have been developed and implemented as well. The well know replacements for this init based system as Upstart , Epoch , Mudar and Systemd. Systemd is the one which got most attention and is considered to be better of all available alternatives. - -### Understanding Systemd ### - -Reducing the boot time and computational overhead is the main objective of developing the Systemd. Systemd (System Manager Daemon) , originally developed under GNU General Public License, is now under GNU Lesser General Public License, it is most frequently discussed boot and services manager these days. If your Linux system is configured to use Systemd boot manager, then instead of traditional SysV init, startup process will be handled by systemd. One of the core feature of Systemd is that it supports post boot scripts of SysV Init as well . - -Systemd introduces the parallelization boot concept, it creates a sockets for each daemon that needs to be started, these sockets are abstracted from the processes that use them so they allow daemons to interact with each other. Systemd creates news processes and assigns every process a control group. The processes in different control groups use kernel to communicate with each others. The way [systemd handles the start up process][2] is quite neat, and much optimized as compared to the traditional init based system. Let’s review some of the core features of Systemd. - -- The boot process is much simpler as compared to the init -- Systemd provides concurrent and parallel process of system boot so it ensures better boot speed -- Processes are tracked using control groups, not by PIDs -- Improved ways to handle boot and services dependencies. -- Capability of system snapshots and restore -- Monitoring of started services ; also capabale of restarting any crashed services -- Includes systemd-login module to control user logins. -- Ability to add and remove components -- Low memory foot prints and ability for job scheduling -- Journald module for event logging and syslogd module for system log. - -Systemd handles system shutdown process in well organized way as well. It has three script located inside /usr/lib/systemd/ directory, named systemd-halt.service , systemd-poweroff.service , systemd-reboot.service . These scripts are executed when user choose to shutdown, reboot or halt Linux system. In the event of shutdown, systemd first un-mount all file systems and disabled all swap devices, detaches the storage devices and kills remaining processes. - -![](http://images.linoxide.com/systemd-boot-process.jpg) - -### Structural Overview of Systemd ### - -Let’s review Linux system boot process with some structural details when it is using systemd as boot and services manager. For the sake of simplicity, we are listing the process in steps below: - -**1.** The very first steps when you power on your system is the BIOS initialization. BIOS reads the boot device settings, locates and hands over control to MBR (assuming hard disk is set as first boot device). - -**2.** MBR reads information from Grub or LILO boot loader and initializes the kernel. Grub or LILO will specify how to handle further system boot up. If you have specified systemd as boot manager in grub configuration file, then the further boot process will be handled by systemd. Systemd handles boot and services management process using “targets”. The ”target" files in systemd are used for grouping different boot units and start up synchronization processes. - -**3.** The very first target executed by systemd is **default.target**. But default.target is actually a symlink to **graphical.target**. Symlink in linux works just like shortcuts in Windows. Graphical.target file is located at /usr/lib/systemd/system/graphical.target path. We have shown the contents of graphical.target file in the following screenshot. - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/graphical1.png) - -**4.** At this stage, **multi-user.target** has been invoked and this target keeps its further sub-units inside “/etc/systemd/system/multi-user.target.wants” directory. This target sets the environment for multi user support. None root users are enabled at this stage of boot up process. Firewall related services are started on this stage of boot as well. - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/multi-user-target1.png) - -"multi-user.target" passes control to another layer “**basic.target**”. - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/Basic-Target.png) - -**5.** "basic.target" unit is the one that starts usual services specially graphical manager service. It uses /etc/systemd/system/basic.target.wants directory to decide which services need to be started, basic.target passes on control to **sysinit.target**. - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/Sysint-Target.png) - -**6.** "sysinit.target" starts important system services like file System mounting, swap spaces and devices, kernel additional options etc. sysinit.target passes on startup process to **local-fs.target**. The contents of this target unit are shown in the following screenshot. - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/local-FS-Target.png) - -**7.** local-fs.target , no user related services are started by this target unit, it handles core low level services only. This target is the one performing actions on the basis of /etc/fstab and /etc/inittab files. - -### Analyzing System Boot Performancev ### - -Systemd offers tool to identify and troubleshoot boot related issues or performance concerns. **Systemd-analyze** is a built-in command which lets you examine boot process. You can find out the units which are facing errors during boot up and can further trace and correct boot component issues. Some useful systemd-analyze commands are listed below. - -**systemd-analyze time** shows the time spent in kernel, and normal user space. - - $ systemd-analyze time - - Startup finished in 1440ms (kernel) + 3444ms (userspace) - -**systemd-analyze blame** prints a list of all running units, sorted by the time taken by then to initialize, in this way you can have idea of which services are taking long time to start during boot up. - - $ systemd-analyze blame - - 2001ms mysqld.service - 234ms httpd.service - 191ms vmms.service - -**systemd-analyze verify** shows if there are any syntax errors in the system units. **Systemd-analyze plot** can be used to write down whole startup process to a SVG formate file. Whole boot process is very lengthy to read, so using this command we can dump the output of whole boot processing into a file and then can read and analyze it further. The following command will take care of this. - - systemd-analyze plot > boot.svg - -### Systemd Controversies ### - -Systemd has not been lucky to receive love from everyone, some professionals and administrators have different opinions on its working and developments. Per critics of Systemd, it’s “not Unix-like” because it tried to replace some system services. Some professionals don’t like the idea of using binary configuration files as well. It is said that editing systemd configuration is not an easy tasks and there are no graphical tools available for this purpose. - -### Test Systemd on Ubuntu 14.04 and 12.04 ### - -Originally, Ubuntu decided to replace their current boot process with Systemd in Ubuntu 16.04 LTS. Ubuntu 16.04 is supposed to be released in April 2016, but considering the popularity and demand for Systemd, the upcoming **Ubuntu 15.04** will have it as its default boot manager. Good news is that the user of Ubuntu 14.04 Trusty Tahr And Ubuntu 12.04 Precise Pangolin can still test Systemd on their machines. The test process is not very complex, all you need to do is to include the related PPA to the system, update repository and perform system upgrade. - -**Disclaimer** : Please note that its still in testing and development stages for Ubuntu. Testing packages might have any unknown issues and in worst case scenario, they might break your system configurations. Make sure you backup your important data before trying this upgrade. - -Run following command on the terminal to add ppa to the your ubuntu system: - - sudo add-apt-repository ppa:pitti/systemd - -You will be seeing warning message here because we are trying to use temporary/testing PPA which is not recommended for production machines. - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/PPA-Systemd1.png) - -Now update the APT Package Manager repositories by running the following command. - - sudo apt-get update - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/Update-APT1.png) - -Perform system upgrade by running the following command. - - sudo apt-get dist-upgrade - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/System-Upgrade.png) - -That’s all, you should be able to see configuration files of systemd on your ubuntu system now, just browse to the /lib/systemd/ directory and see the files there. - -Alright, it’s time we edit grub configuration file and specify systemd as default Boot Manager. Edit grub file using Gedit text editor. - - sudo gedit /etc/default/grub - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/Edit-Grub.png) - -Here edit GRUB_CMDLINE_LINUX_DEFAULT parameter in this file and specify the value of this parameter as: "**init=/lib/systemd/systemd**" - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/Grub-Systemd.png) - -That’s all, your ubuntu system is no longer using its traditional boot manager, its using Systemd Manager now. Reboot your system and see the systemd boot up process. - -![](http://blog.linoxide.com/wp-content/uploads/2015/03/Sytemd-Boot.png) - -### Conclusion ### - -Systemd is no doubt a step forward towards improving Linux Boot process; it’s an awesome suite of libraries and daemons that together improve the system boot and shutdown process. Many linux distributions are preparing to support it as their official boot manager. In future releases of Linux distros, we can hope to see systemd startup. But on the other hand, in order to succeed and to be adopted on the wide scale, systemd should address the concerns of critics as well. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/systemd-boot-process/ - -作者:[Aun Raza][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunrz/ -[1]:http://linoxide.com/booting/boot-process-of-linux-in-detail/ -[2]:http://0pointer.de/blog/projects/self-documented-boot.html diff --git a/translated/tech/20150316 Systemd Boot Process a Close Look in Linux.md b/translated/tech/20150316 Systemd Boot Process a Close Look in Linux.md new file mode 100644 index 0000000000..a2c2ea28be --- /dev/null +++ b/translated/tech/20150316 Systemd Boot Process a Close Look in Linux.md @@ -0,0 +1,150 @@ +走进Linux之systemd启动过程 +================================================================================ +Linux系统的启动方式有点复杂,而且总是有需要优化的地方。传统的Linux系统启动过程主要由著名的init进程(也被称为SysV init启动系统)处理,而基于init的启动系统也被确认会有效率不足的问题,systemd是Linux系统机器的另一种启动方式,宣称弥补了以[传统Linux SysV init][2]为基础的系统的缺点。在这里我们将着重讨论systemd的特性和争议,但是为了更好地理解它,也会看一下通过传统的以SysV init为基础的系统的Linux启动过程是什么样的。友情提醒一下systemd仍然处在测试阶段,而未来发布的Linux操作系统也正准备用systemd启动管理程序替代当前的启动过程。 + +### 理解Linux启动过程 ### + +在我们打开Linux电脑的电源后第一个启动的进程就是init。分配给init进程的PID是1。它是系统其他所有进程的父进程。当一台Linux电脑启动后,处理器会先在系统存储中查找BIOS,之后BIOS会测试系统资源然后找到第一个引导设备,通常设置为硬盘,然后会查找硬盘的主引导记录(MBR),然后加载到内存中并把控制权交给它,以后的启动过程就由MBR控制。 + +主引导记录会初始化引导程序(Linux上有两个著名的引导程序,GRUB和LILO,80%的Linux系统在用GRUB引导程序),这个时候GRUB或LILO会加载内核模块。内核会马上查找/sbin下的init进程并执行它。从这里开始init成为了Linux系统的父进程。init读取的第一个文件是/etc/inittab,通过它init会确定我们Linux操作系统的运行级别。它会从文件/etc/fstab里查找分区表信息然后做相应的挂载。然后init会启动/etc/init.d里指定的默认启动级别的所有服务/脚本。所有服务在这里通过init一个一个被初始化。在这个过程里,init每次只启动一个服务,所有服务/守护进程都在后台执行并由init来管理。 + +关机过程差不多是相反的过程,首先init停止所有服务,最后阶段会卸载文件系统。 + +以上提到的启动过程有一些不足的地方。而用一种更好的方式来替代传统init的需求已经存在很长时间了。也产生了许多替代方案。其中比较著名的有Upstart,Epoch,Muda和Systemd。而Systemd获得最多关注并被认为是目前最佳的方案。 + +### 理解Systemd ### + +开发Systemd的主要目的就是减少系统引导时间和计算开销。Systemd(系统管理守护进程),最开始以GNU GPL协议授权开发,现在已转为使用GNU LGPL协议,它是如今讨论最热烈的引导和服务管理程序。如果你的Linux系统配置为使用Systemd引导程序,那么代替传统的SysV init,启动过程将交给systemd处理。Systemd的一个核心功能是它同时支持SysV init的后开机启动脚本。 + +Systemd引入了并行启动的概念,它会为每个需要启动的守护进程建立一个管道套接字,这些套接字对于使用它们的进程来说是抽象的,这样它们可以允许不同守护进程之间进行交互。Systemd会创建新进程并为每个进程分配一个控制组。处于不同控制组的进程之间可以通过内核来互相通信。[systemd处理开机启动进程][2]的方式非常漂亮,和传统基于init的系统比起来优化了太多。让我们看下Systemd的一些核心功能。 + +- 和init比起来引导过程简化了很多 +- Systemd支持并发引导过程从而可以更快启动 +- 通过控制组来追踪进程,而不是PID +- 优化了处理引导过程和服务之间依赖的方式 +- 支持系统快照和恢复 +- 监控已启动的服务;也支持重启已崩溃服务 +- 包含了systemd-login模块用于控制用户登录 +- 支持加载和卸载组件 +- 低内存使用痕迹以及任务调度能力 +- 记录事件的Journald模块和记录系统日志的syslogd模块 + +Systemd同时也清晰地处理了系统关机过程。它在/usr/lib/systemd/目录下有三个脚本,分别叫systemd-halt.service,systemd-poweroff.service,systemd-reboot.service。这几个脚本会在用户选择关机,重启或待机时执行。在接收到关机事件时,systemd首先卸载所有文件系统并停止所有内存交换设备,断开存储设备,之后停止所有剩下的进程。 + +![](http://images.linoxide.com/systemd-boot-process.jpg) + +### Systemd结构概览 ### + +让我们看一下Linux系统在使用systemd作为引导程序时的开机启动过程的结构性细节。为了简单,我们将在下面按步骤列出来这个过程: + +**1.** 当你打开电源后电脑所做的第一件事情就是BIOS初始化。BIOS会读取引导设备设定,定位并传递系统控制权给MBR(假设硬盘是第一引导设备)。 + +**2.** MBR从Grub或LILO引导程序读取相关信息并初始化内核。接下来将由Grub或LILO继续引导系统。如果你在grub配置文件里指定了systemd作为引导管理程序,之后的引导过程将由systemd完成。Systemd使用“target”来处理引导和服务管理过程。这些systemd里的“target”文件被用于分组不同的引导单元以及启动同步进程。 + +**3.** systemd执行的第一个目标是**default.target**。但实际上default.target是指向**graphical.target**的软链接。Linux里的软链接用起来和Windows下的快捷方式一样。文件Graphical.target的实际位置是/usr/lib/systemd/system/graphical.target。在下面的截图里显示了graphical.target文件的内容。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/graphical1.png) + +**4.** 在这个阶段,会启动**multi-user.target**而这个target将自己的子单元放在目录“/etc/systemd/system/multi-user.target.wants”里。这个target为多用户支持设定系统环境。非root用户会在这个阶段的引导过程中启用。防火墙相关的服务也会在这个阶段启动。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/multi-user-target1.png) + +"multi-user.target"会将控制权交给另一层“**basic.target**”。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Basic-Target.png) + +**5.** "basic.target"单元用于启动普通服务特别是图形管理服务。它通过/etc/systemd/system/basic.target.wants目录来决定哪些服务会被启动,basic.target之后将控制权交给**sysinit.target**. + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Sysint-Target.png) + +**6.** "sysinit.target"会启动重要的系统服务例如系统挂载,内存交换空间和设备,内核补充选项等等。sysinit.target在启动过程中会传递给**local-fs.target**。这个target单元的内容如下面截图里所展示。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/local-FS-Target.png) + +**7.** local-fs.target,这个target单元不会启动用户相关的服务,它只处理底层核心服务。这个target会根据/etc/fstab和/etc/inittab来执行相关操作。 + +### 系统引导性能分析 ### + +Systemd提供了工具用于识别和定位引导相关的问题或性能影响。**Systemd-analyze**是一个内建的命令,可以用来检测引导过程。你可以找出在启动过程中出错的单元,然后跟踪并改正引导组件的问题。在下面列出一些常用的systemd-analyze命令。 + +**systemd-analyze time** 用于显示内核和普通用户空间启动时所花的时间。 + + $ systemd-analyze time + + Startup finished in 1440ms (kernel) + 3444ms (userspace) + +**systemd-analyze blame** 会列出所有正在运行的单元,按从初始化开始到当前所花的时间排序,通过这种方式你就知道哪些服务在引导过程中要花较长时间来启动。 + + $ systemd-analyze blame + + 2001ms mysqld.service + 234ms httpd.service + 191ms vmms.service + +**systemd-analyze verify** 显示在所有系统单元中是否有语法错误。**systemd-analyze plot** 可以用来把整个引导过程写入一个SVG格式文件里。整个引导过程非常长不方便阅读,所以通过这个命令我们可以把输出写入一个文件,之后再查看和分析。下面这个命令就是做这个。 + + systemd-analyze plot > boot.svg + +### Systemd的争议 ### + +Systemd并没有幸运地获得所有人的青睐,一些专家和管理员对于它的工作方式和开发有不同意见。根据对于Systemd的批评,它不是“类Unix”方式因为它试着替换一些系统服务。一些专家也不喜欢使用二进制配置文件的想法。据说编辑systemd配置非常困难而且没有一个可用的图形工具。 + +### 在Ubuntu 14.04和12.04上测试Systemd ### + +本来,Ubuntu决定从Ubuntu 16.04 LTS开始使用Systemd来替换当前的引导过程。Ubuntu 16.04预计在2016年4月发布,但是考虑到Systemd的流行和需求,即将发布的**Ubuntu 15.04**将采用它作为默认引导程序。好消息是Ubuntu 14.04 Trusty Tahr和Ubuntu 12.04 Precise Pangolin的用户可以在他们的机器上测试Systemd。测试过程并不复杂,你所要做的只是把相关的PPA包含到系统中,更新仓库并升级系统。 + +**声明**:请注意它仍然处于Ubuntu的测试和开发阶段。升级测试包可能会带来一些未知错误,最坏的情况下有可能损坏你的系统配置。请确保在尝试升级前已经备份好重要数据。 + +在终端里运行下面的命令来添加PPA到你的Ubuntu系统里: + + sudo add-apt-repository ppa:pitti/systemd + +你将会看到警告信息因为我们尝试使用临时/测试PPA,而它们是不建议用于实际工作机器上的。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/PPA-Systemd1.png) + +然后运行下面的命令更新APT包管理仓库。 + + sudo apt-get update + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Update-APT1.png) + +运行下面的命令升级系统。 + + sudo apt-get dist-upgrade + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/System-Upgrade.png) + +就这些,你应该已经可以在你的Ubuntu系统里看到Systemd配置文件了,打开/lib/systemd/目录可以看到这些文件。 + +好吧,现在让我们编辑一下grub配置文件指定systemd作为默认引导程序。可以使用Gedit文字编辑器编辑grub配置文件。 + + sudo gedit /etc/default/grub + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Edit-Grub.png) + +在文件里修改GRUB_CMDLINE_LINUX_DEFAULT项,设定它的参数为:“**init=/lib/systemd/systemd**” + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Grub-Systemd.png) + +就这样,你的Ubuntu系统已经不在使用传统的引导程序了,改为使用Systemd管理器。重启你的机器然后查看systemd引导过程吧。 + +![](http://blog.linoxide.com/wp-content/uploads/2015/03/Sytemd-Boot.png) + +### 结论 ### + +Systemd毫无疑问为改进Linux引导过程前进了一大步;它包含了一套漂亮的库和守护进程配合工作来优化系统引导和关闭过程。许多Linux发行版正准备将它作为自己的正式引导程序。在以后的Linux发行版中,我们将有望看到systemd开机。但是另一方面,为了获得成功并广泛应用,systemd仍需要认真处理批评意见。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/systemd-boot-process/ + +作者:[Aun Raza][a] +译者:[zpl1025](https://github.com/zpl1025) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:http://linoxide.com/booting/boot-process-of-linux-in-detail/ +[2]:http://0pointer.de/blog/projects/self-documented-boot.html From a765603abe6a6a61ae635879d6dbf3505c1c6798 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 1 Apr 2015 00:27:36 +0800 Subject: [PATCH 0420/2517] PUB:20150225 10 quick tar command examples to create or extract archives in Linux @theo-l --- ... to create or extract archives in Linux.md | 56 +++++++++---------- 1 file changed, 26 insertions(+), 30 deletions(-) rename {translated/tech => published}/20150225 10 quick tar command examples to create or extract archives in Linux.md (70%) diff --git a/translated/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md b/published/20150225 10 quick tar command examples to create or extract archives in Linux.md similarity index 70% rename from translated/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md rename to published/20150225 10 quick tar command examples to create or extract archives in Linux.md index 75865f7713..6d851ee0cc 100644 --- a/translated/tech/20150225 10 quick tar command examples to create or extract archives in Linux.md +++ b/published/20150225 10 quick tar command examples to create or extract archives in Linux.md @@ -1,41 +1,40 @@ -linux中创建和解压文档的10个快速tar命令样例 +在linux中创建和解压文档的11个 tar 命令例子 ================================================================================ ### linux中的tar命令### tar(磁带归档)命令是linux系统中被经常用来将文件存入到一个归档文件中的命令。 -常见的文件扩展包括:.tar.gz 和 .tar.bz2, 分别表示通过gzip或bzip算法进一步压缩的磁带归档文件扩展。 +其常见的文件扩展包括:.tar.gz 和 .tar.bz2, 分别表示通过了gzip或bzip算法进一步进行了压缩。 +在本教程中我们会管中窥豹一下在linux桌面或服务器版本中使用tar命令来处理一些创建和解压归档文件的日常工作的例子。 -在该教程中我们会窥探一下在linux桌面或服务器版本中使用tar命令来处理一些日常创建和解压归档文件的工作样例。 ### 使用tar命令### tar命令在大部分linux系统默认情况下都是可用的,所以你不用单独安装该软件。 -> tar命令具有两个压缩格式,gzip和bzip,该命令的“z”选项用来指定gzip,“j”选项用来指定bzip。同时也可哟用来创建非压缩归档文件。 +> tar命令具有两个压缩格式,gzip和bzip,该命令的“z”选项用来指定gzip,“j”选项用来指定bzip。同时也可以创建非压缩归档文件。 -#### 1.解压一个tar.gz归档 #### +#### 1.解压一个tar.gz归档 #### 一般常见的用法是用来解压归档文件,下面的命令将会把文件从一个tar.gz归档文件中解压出来。 - $ tar -xvzf tarfile.tar.gz 这里对这些参数做一个简单解释- > x - 解压文件 -> v - 繁琐,在解压每个文件时打印出文件的名称。 +> v - 冗长模式,在解压每个文件时打印出文件的名称。 -> z - 该文件是一个使用 gzip压缩的文件。 +> z - 该文件是一个使用 gzip 压缩的文件。 > f - 使用接下来的tar归档来进行操作。 这些就是一些需要记住的重要选项。 -**解压 tar.bz2/bzip 归档文件 ** +**解压 tar.bz2/bzip 归档文件** -具有bz2扩展名的文件是使用bzip算法进行压缩的,但是tar命令也可以对其进行处理,但是是通过使用“j”选项来替换“z”选项。 +具有bz2扩展名的文件是使用bzip算法进行压缩的,但是tar命令也可以对其进行处理,但是需要通过使用“j”选项来替换“z”选项。 $ tar -xvjf archivefile.tar.bz2 @@ -47,25 +46,25 @@ tar命令在大部分linux系统默认情况下都是可用的,所以你不用 然后,首先需要确认目标目录是否存在,毕竟tar命令并不会为你创建目录,所以如果目标目录不存在的情况下该命令会失败。 -####3. 解压出单个文件 #### +####3. 提取出单个文件 #### -为了从一个归档文件中解压出单个文件,只需要将文件名按照以下方式将其放置在命令后面。 +为了从一个归档文件中提取出单个文件,只需要将文件名按照以下方式将其放置在命令后面。 $ tar -xz -f abc.tar.gz "./new/abc.txt" 在上述命令中,可以按照以下方式来指定多个文件。 - $ tar -xv -f abc.tar.gz "./new/cde.txt" "./new/abc.txt" + $ tar -xz -f abc.tar.gz "./new/cde.txt" "./new/abc.txt" #### 4.使用通配符来解压多个文件 #### 通配符可以用来解压于给定通配符匹配的一批文件,例如所有以".txt"作为扩展名的文件。 - $ tar -xv -f abc.tar.gz --wildcards "*.txt" + $ tar -xz -f abc.tar.gz --wildcards "*.txt" -#### 5. 列出并检索tar归档文件中的内容 #### +#### 5. 列出并检索tar归档文件中的内容 #### -如果你仅仅想要列出而不是解压tar归档文件的中的内容,使用“-t”选项, 下面的命令用来打印一个使用gzip压缩过的tar归档文件中的内容。 +如果你仅仅想要列出而不是解压tar归档文件的中的内容,使用“-t”(test)选项, 下面的命令用来打印一个使用gzip压缩过的tar归档文件中的内容。 $ tar -tz -f abc.tar.gz ./new/ @@ -75,7 +74,7 @@ tar命令在大部分linux系统默认情况下都是可用的,所以你不用 ./new/abc.txt ... -将输出通过管道定向到grep来搜索一个文件或者定向到less命令来浏览内容列表。 使用"v"繁琐选项将会打印出每个文件的额外详细信息。 +可以将输出通过管道定向到grep来搜索一个文件,或者定向到less命令来浏览内容列表。 使用"v"冗长选项将会打印出每个文件的额外详细信息。 对于 tar.bz2/bzip文件,需要使用"j"选项。 @@ -84,11 +83,10 @@ tar命令在大部分linux系统默认情况下都是可用的,所以你不用 $ tar -tvz -f abc.tar.gz | grep abc.txt -rw-rw-r-- enlightened/enlightened 0 2015-01-13 11:40 ./new/abc.txt -#### 6.创建一个tar/tar.gz归档文件 #### +#### 6.创建一个tar/tar.gz归档文件 #### 现在我们已经学过了如何解压一个tar归档文件,是时候开始创建一个新的tar归档文件了。tar命令可以用来将所选的文件或整个目录放入到一个归档文件中,以下是相应的样例。 - 下面的命令使用一个目录来创建一个tar归档文件,它会将该目录中所有的文件和子目录都加入到归档文件中。 $ tar -cvf abc.tar ./new/ @@ -102,14 +100,13 @@ tar命令在大部分linux系统默认情况下都是可用的,所以你不用 $ tar -cvzf abc.tar.gz ./new/ -> 文件的扩展名其实并不真正有什么影响。“tar.gz” 和tgz是gzip压缩算法压缩文件的常见扩展名。 “tar.bz2”和“tbz”是bzip压缩算法压缩文件的常见扩展名。 - +> 文件的扩展名其实并不真正有什么影响。“tar.gz” 和“tgz”是gzip压缩算法压缩文件的常见扩展名。 “tar.bz2”和“tbz”是bzip压缩算法压缩文件的常见扩展名(LCTT 译注:归档是否是压缩的和采用哪种压缩方式并不取决于其扩展名,扩展名只是为了便于辨识。)。 #### 7. 在添加文件之前进行确认 #### 一个有用的选项是“w”,该选项使得tar命令在添加每个文件到归档文件之前来让用户进行确认,有时候这会很有用。 -使用该选项时,只有用户输入yes时的文件才会被加入到归档文件中,如果你输入任何东西,默认的回答是一个“No”。 +使用该选项时,只有用户输入“y”时的文件才会被加入到归档文件中,如果你不输入任何东西,其默认表示是一个“n”。 # 添加指定文件 @@ -137,7 +134,7 @@ tar命令在大部分linux系统默认情况下都是可用的,所以你不用 #### 9. 将文件加入到压缩的归档文件中(tar.gz/tar.bz2) #### -之前已经提到了不可能将文件加入到已压缩的归档文件中,然和依然可以通过简单的一些把戏来完成。使用gunzip命令来解压缩归档文件,然后将文件加入到归档文件中后重新进行压缩。 +之前已经提到了不可能将文件加入到已压缩的归档文件中,然而依然可以通过简单的一些把戏来完成。使用gunzip命令来解压缩归档文件,然后将文件加入到归档文件中后重新进行压缩。 $ gunzip archive.tar.gz $ tar -rf archive.tar ./path/to/file @@ -147,16 +144,15 @@ tar命令在大部分linux系统默认情况下都是可用的,所以你不用 #### 10.通过tar来进行备份 #### -一个真实的场景是在规则的间隔内来备份目录,tar命令可以通过cron调度来实现这样的一个备份,以下是一个样例 - +一个真实的场景是在固定的时间间隔内来备份目录,tar命令可以通过cron调度来实现这样的一个备份,以下是一个样例 : $ tar -cvz -f archive-$(date +%Y%m%d).tar.gz ./new/ -使用cron来运行上述的命令会保持创建类似以下名称的备份文件 - -'archive-20150218.tar.gz'. +使用cron来运行上述的命令会保持创建类似以下名称的备份文件 :'archive-20150218.tar.gz'。 当然,需要确保日益增长的归档文件不会导致磁盘空间的溢出。 -#### 11. 在创建归档文件是进行验证 #### +#### 11. 在创建归档文件时进行验证 #### "W"选项可以用来在创建归档文件之后进行验证,以下是一个简单例子。 @@ -174,9 +170,9 @@ tar命令在大部分linux系统默认情况下都是可用的,所以你不用 Verify ./new/newfile.txt Verify ./new/abc.txt -需要注意的是验证动作不能呢该在压缩过的归档文件上进行,只能在非压缩的tar归档文件上执行。 +需要注意的是验证动作不能在压缩过的归档文件上进行,只能在非压缩的tar归档文件上执行。 -现在就先到此为止,可以通过“man tar”命令来查看tar命令的的手册。 +这次就先到此为止,可以通过“man tar”命令来查看tar命令的的手册。 -------------------------------------------------------------------------------- @@ -184,7 +180,7 @@ via: http://www.binarytides.com/linux-tar-command/ 作者:[Silver Moon][a] 译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From e7419b7eea7f44a328ad9b9f31e1323f03117852 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 1 Apr 2015 00:29:18 +0800 Subject: [PATCH 0421/2517] =?UTF-8?q?=E5=BD=92=E6=A1=A3201503?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... protect SSH server from brute force attacks using fail2ban.md | 0 ...ay Movie Player Has a Stylish Interface Ubuntu Installation.md | 0 ...41106 Tomahawk Music Player Returns With New Look, Features.md | 0 ...7 11 Useful Utilities To Supercharge Your Ubuntu Experience.md | 0 ...--Find And Remove Duplicate Files Instantly From Hard Drive.md | 0 published/{ => 201503}/20141204 Linux Namespaces.md | 0 ...1205 How to configure a syslog server with rsyslog on Linux.md | 0 ...itiator Client' Setup on RHEL or CentOS or Fedora -Part III.md | 0 ...rage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md | 0 ... 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md | 0 ...1219 Creating your First App on Linux with Python and Flask.md | 0 ...41219 Google Cloud offers streamlined Ubuntu for Docker use.md | 0 ... Answers--How to fix 'XXX is not in the sudoers file' error.md | 0 .../20141229 5 User Space Debugging Tools in Linux.md | 0 ...104 How to configure fail2ban to protect Apache HTTP server.md | 0 ...50104 How to debug a C or C++ program with Nemiver debugger.md | 0 ...et up a cross-platform backup server on Linux with BackupPC.md | 0 ... App Can Write a Single ISO to 20 USB Drives Simultaneously.md | 0 ...w to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md | 0 .../20150112 How to Find and Remove Duplicate Files on Linux.md | 0 .../20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md | 0 .../20150114 What is a good IDE for C or C++ on Linux.md | 0 .../{ => 201503}/20150115 20 Unix Command Line Tricks--Part I.md | 0 .../{ => 201503}/20150115 Get back your privacy and control.md | 0 ...Run Linux Applications From The Terminal In Background Mode.md | 0 ...50119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md | 0 .../{ => 201503}/20150119 Ubuntu With XFCE vs Xubuntu Linux.md | 0 .../20150121 How to Monitor Network Usage with nload in Linux.md | 0 ...0121 How to apply image effects to pictures on Raspberry Pi.md | 0 ...121 Linux FAQs with Answers--How to check CPU info on Linux.md | 0 ... How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md | 0 ... to create and configure a MySQL user from the command line.md | 0 ...ow to download and install ixgbe driver on Ubuntu or Debian.md | 0 ... to use yum to download a RPM package without installing it.md | 0 ...ory Of Notifications With Recent Notifications AppIndicator.md | 0 ...Shell Primer--Master Your Linux OS X Unix Shell Environment.md | 0 .../{ => 201503}/20150126 4 lvcreate Command Examples on Linux.md | 0 .../{ => 201503}/20150126 CD Audio Grabbers--Graphical Based.md | 0 .../20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md | 0 ...0126 How To Kill All Processes Of A Specific User With slay.md | 0 ...Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md | 0 ...em performance by moving your log files to RAM Using Ramlog.md | 0 .../20150127 How to limit network bandwidth on Linux.md | 0 .../20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md | 0 published/{ => 201503}/20150127 Windows 10 versus Linux.md | 0 ...How To Monitor Access Point Signal Strength With wifi-linux.md | 0 ...cs--How To Check If A Package Is Installed Or Not In Ubuntu.md | 0 ...dPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md | 0 ...20150202 How To Install Websvn for Subversion in CentOS 7.0.md | 0 .../20150203 9 Best IDEs and Code Editors for JavaScript Users.md | 0 .../20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md | 0 ...20150205 How To Use Smartphones Like Weather Conky In Linux.md | 0 ...e IP Addresses To Single Network Interface Card On CentOS 7.md | 0 .../20150209 How to back up a Debian system using backupninja.md | 0 ... Answers--How to get the process ID (PID) of a shell script.md | 0 .../20150211 Best Known Linux Archive or Compress Tools.md | 0 ...ow To Protect Ubuntu Server Against the GHOST Vulnerability.md | 0 ...5 A Look At What Linux Games We Will See In 2015 And Beyond.md | 0 ...How To Make GDebi Default Instead of Ubuntu Software Center.md | 0 ...tar command examples to create or extract archives in Linux.md | 0 .../{ => 201503}/20150225 How to Hide PHP Version in Linux.md | 0 ...25 Italian Region Emilia-Romagna Is Switching To OpenOffice.md | 0 ...wers--How to install full kernel source on Debian or Ubuntu.md | 0 ...ux Basics--How To Find Maximum Supported RAM By Your System.md | 0 ...0306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md | 0 ...10 best uses for open source software in the business world.md | 0 .../20150309 15 Basic 'ls' Command Examples in Linux.md | 0 ...9 New App Brings Android Notifications to The GNOME Desktop.md | 0 ...ian TC Members Appointed For Going Past The Systemd Fallout.md | 0 69 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201503}/20130315 How to protect SSH server from brute force attacks using fail2ban.md (100%) rename published/{ => 201503}/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md (100%) rename published/{ => 201503}/20141106 Tomahawk Music Player Returns With New Look, Features.md (100%) rename published/{ => 201503}/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md (100%) rename published/{ => 201503}/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md (100%) rename published/{ => 201503}/20141204 Linux Namespaces.md (100%) rename published/{ => 201503}/20141205 How to configure a syslog server with rsyslog on Linux.md (100%) rename published/{ => 201503}/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md (100%) rename published/{ => 201503}/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md (100%) rename published/{ => 201503}/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md (100%) rename published/{ => 201503}/20141219 Creating your First App on Linux with Python and Flask.md (100%) rename published/{ => 201503}/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md (100%) rename published/{ => 201503}/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md (100%) rename published/{ => 201503}/20141229 5 User Space Debugging Tools in Linux.md (100%) rename published/{ => 201503}/20150104 How to configure fail2ban to protect Apache HTTP server.md (100%) rename published/{ => 201503}/20150104 How to debug a C or C++ program with Nemiver debugger.md (100%) rename published/{ => 201503}/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md (100%) rename published/{ => 201503}/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md (100%) rename published/{ => 201503}/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md (100%) rename published/{ => 201503}/20150112 How to Find and Remove Duplicate Files on Linux.md (100%) rename published/{ => 201503}/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md (100%) rename published/{ => 201503}/20150114 What is a good IDE for C or C++ on Linux.md (100%) rename published/{ => 201503}/20150115 20 Unix Command Line Tricks--Part I.md (100%) rename published/{ => 201503}/20150115 Get back your privacy and control.md (100%) rename published/{ => 201503}/20150115 How To Run Linux Applications From The Terminal In Background Mode.md (100%) rename published/{ => 201503}/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md (100%) rename published/{ => 201503}/20150119 Ubuntu With XFCE vs Xubuntu Linux.md (100%) rename published/{ => 201503}/20150121 How to Monitor Network Usage with nload in Linux.md (100%) rename published/{ => 201503}/20150121 How to apply image effects to pictures on Raspberry Pi.md (100%) rename published/{ => 201503}/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md (100%) rename published/{ => 201503}/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md (100%) rename published/{ => 201503}/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md (100%) rename published/{ => 201503}/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md (100%) rename published/{ => 201503}/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md (100%) rename published/{ => 201503}/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md (100%) rename published/{ => 201503}/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md (100%) rename published/{ => 201503}/20150126 4 lvcreate Command Examples on Linux.md (100%) rename published/{ => 201503}/20150126 CD Audio Grabbers--Graphical Based.md (100%) rename published/{ => 201503}/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md (100%) rename published/{ => 201503}/20150126 How To Kill All Processes Of A Specific User With slay.md (100%) rename published/{ => 201503}/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md (100%) rename published/{ => 201503}/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md (100%) rename published/{ => 201503}/20150127 How to limit network bandwidth on Linux.md (100%) rename published/{ => 201503}/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md (100%) rename published/{ => 201503}/20150127 Windows 10 versus Linux.md (100%) rename published/{ => 201503}/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md (100%) rename published/{ => 201503}/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md (100%) rename published/{ => 201503}/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md (100%) rename published/{ => 201503}/20150202 How To Install Websvn for Subversion in CentOS 7.0.md (100%) rename published/{ => 201503}/20150203 9 Best IDEs and Code Editors for JavaScript Users.md (100%) rename published/{ => 201503}/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md (100%) rename published/{ => 201503}/20150205 How To Use Smartphones Like Weather Conky In Linux.md (100%) rename published/{ => 201503}/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md (100%) rename published/{ => 201503}/20150209 How to back up a Debian system using backupninja.md (100%) rename published/{ => 201503}/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md (100%) rename published/{ => 201503}/20150211 Best Known Linux Archive or Compress Tools.md (100%) rename published/{ => 201503}/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md (100%) rename published/{ => 201503}/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md (100%) rename published/{ => 201503}/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md (100%) rename published/{ => 201503}/20150225 10 quick tar command examples to create or extract archives in Linux.md (100%) rename published/{ => 201503}/20150225 How to Hide PHP Version in Linux.md (100%) rename published/{ => 201503}/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md (100%) rename published/{ => 201503}/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md (100%) rename published/{ => 201503}/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md (100%) rename published/{ => 201503}/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md (100%) rename published/{ => 201503}/20150309 10 best uses for open source software in the business world.md (100%) rename published/{ => 201503}/20150309 15 Basic 'ls' Command Examples in Linux.md (100%) rename published/{ => 201503}/20150309 New App Brings Android Notifications to The GNOME Desktop.md (100%) rename published/{ => 201503}/New Debian TC Members Appointed For Going Past The Systemd Fallout.md (100%) diff --git a/published/20130315 How to protect SSH server from brute force attacks using fail2ban.md b/published/201503/20130315 How to protect SSH server from brute force attacks using fail2ban.md similarity index 100% rename from published/20130315 How to protect SSH server from brute force attacks using fail2ban.md rename to published/201503/20130315 How to protect SSH server from brute force attacks using fail2ban.md diff --git a/published/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md b/published/201503/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md similarity index 100% rename from published/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md rename to published/201503/20141106 Flow' N Play Movie Player Has a Stylish Interface Ubuntu Installation.md diff --git a/published/20141106 Tomahawk Music Player Returns With New Look, Features.md b/published/201503/20141106 Tomahawk Music Player Returns With New Look, Features.md similarity index 100% rename from published/20141106 Tomahawk Music Player Returns With New Look, Features.md rename to published/201503/20141106 Tomahawk Music Player Returns With New Look, Features.md diff --git a/published/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md b/published/201503/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md similarity index 100% rename from published/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md rename to published/201503/20141127 11 Useful Utilities To Supercharge Your Ubuntu Experience.md diff --git a/published/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md b/published/201503/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md similarity index 100% rename from published/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md rename to published/201503/20141127 dupeGuru--Find And Remove Duplicate Files Instantly From Hard Drive.md diff --git a/published/20141204 Linux Namespaces.md b/published/201503/20141204 Linux Namespaces.md similarity index 100% rename from published/20141204 Linux Namespaces.md rename to published/201503/20141204 Linux Namespaces.md diff --git a/published/20141205 How to configure a syslog server with rsyslog on Linux.md b/published/201503/20141205 How to configure a syslog server with rsyslog on Linux.md similarity index 100% rename from published/20141205 How to configure a syslog server with rsyslog on Linux.md rename to published/201503/20141205 How to configure a syslog server with rsyslog on Linux.md diff --git a/published/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md b/published/201503/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md similarity index 100% rename from published/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md rename to published/201503/20141217 Centralized Secure Storage (iSCSI)-- 'Initiator Client' Setup on RHEL or CentOS or Fedora -Part III.md diff --git a/published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md b/published/201503/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md similarity index 100% rename from published/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md rename to published/201503/20141217 Create Centralized Secure Storage using iSCSI Target on RHEL or CentOS or Fedora Part -I.md diff --git a/published/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md b/published/201503/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md similarity index 100% rename from published/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md rename to published/201503/20141217 How to Create and Setup LUNs using LVM in 'iSCSI Target Server' on RHEL or CentOS or Fedora -Part II.md diff --git a/published/20141219 Creating your First App on Linux with Python and Flask.md b/published/201503/20141219 Creating your First App on Linux with Python and Flask.md similarity index 100% rename from published/20141219 Creating your First App on Linux with Python and Flask.md rename to published/201503/20141219 Creating your First App on Linux with Python and Flask.md diff --git a/published/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md b/published/201503/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md similarity index 100% rename from published/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md rename to published/201503/20141219 Google Cloud offers streamlined Ubuntu for Docker use.md diff --git a/published/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md b/published/201503/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md similarity index 100% rename from published/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md rename to published/201503/20141224 Linux FAQs with Answers--How to fix 'XXX is not in the sudoers file' error.md diff --git a/published/20141229 5 User Space Debugging Tools in Linux.md b/published/201503/20141229 5 User Space Debugging Tools in Linux.md similarity index 100% rename from published/20141229 5 User Space Debugging Tools in Linux.md rename to published/201503/20141229 5 User Space Debugging Tools in Linux.md diff --git a/published/20150104 How to configure fail2ban to protect Apache HTTP server.md b/published/201503/20150104 How to configure fail2ban to protect Apache HTTP server.md similarity index 100% rename from published/20150104 How to configure fail2ban to protect Apache HTTP server.md rename to published/201503/20150104 How to configure fail2ban to protect Apache HTTP server.md diff --git a/published/20150104 How to debug a C or C++ program with Nemiver debugger.md b/published/201503/20150104 How to debug a C or C++ program with Nemiver debugger.md similarity index 100% rename from published/20150104 How to debug a C or C++ program with Nemiver debugger.md rename to published/201503/20150104 How to debug a C or C++ program with Nemiver debugger.md diff --git a/published/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md b/published/201503/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md similarity index 100% rename from published/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md rename to published/201503/20150104 How to set up a cross-platform backup server on Linux with BackupPC.md diff --git a/published/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md b/published/201503/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md similarity index 100% rename from published/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md rename to published/201503/20150106 This App Can Write a Single ISO to 20 USB Drives Simultaneously.md diff --git a/published/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md b/published/201503/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md similarity index 100% rename from published/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md rename to published/201503/20150108 How to Install Scrapy a Web Crawling Tool in Ubuntu 14.04 LTS.md diff --git a/published/20150112 How to Find and Remove Duplicate Files on Linux.md b/published/201503/20150112 How to Find and Remove Duplicate Files on Linux.md similarity index 100% rename from published/20150112 How to Find and Remove Duplicate Files on Linux.md rename to published/201503/20150112 How to Find and Remove Duplicate Files on Linux.md diff --git a/published/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md b/published/201503/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md similarity index 100% rename from published/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md rename to published/201503/20150114 Install Gitblit On Ubuntu or Fedora or CentOS.md diff --git a/published/20150114 What is a good IDE for C or C++ on Linux.md b/published/201503/20150114 What is a good IDE for C or C++ on Linux.md similarity index 100% rename from published/20150114 What is a good IDE for C or C++ on Linux.md rename to published/201503/20150114 What is a good IDE for C or C++ on Linux.md diff --git a/published/20150115 20 Unix Command Line Tricks--Part I.md b/published/201503/20150115 20 Unix Command Line Tricks--Part I.md similarity index 100% rename from published/20150115 20 Unix Command Line Tricks--Part I.md rename to published/201503/20150115 20 Unix Command Line Tricks--Part I.md diff --git a/published/20150115 Get back your privacy and control.md b/published/201503/20150115 Get back your privacy and control.md similarity index 100% rename from published/20150115 Get back your privacy and control.md rename to published/201503/20150115 Get back your privacy and control.md diff --git a/published/20150115 How To Run Linux Applications From The Terminal In Background Mode.md b/published/201503/20150115 How To Run Linux Applications From The Terminal In Background Mode.md similarity index 100% rename from published/20150115 How To Run Linux Applications From The Terminal In Background Mode.md rename to published/201503/20150115 How To Run Linux Applications From The Terminal In Background Mode.md diff --git a/published/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md b/published/201503/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md similarity index 100% rename from published/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md rename to published/201503/20150119 Ubuntu 15.04 Finally Lets You Set Menus ToAlways Show.md diff --git a/published/20150119 Ubuntu With XFCE vs Xubuntu Linux.md b/published/201503/20150119 Ubuntu With XFCE vs Xubuntu Linux.md similarity index 100% rename from published/20150119 Ubuntu With XFCE vs Xubuntu Linux.md rename to published/201503/20150119 Ubuntu With XFCE vs Xubuntu Linux.md diff --git a/published/20150121 How to Monitor Network Usage with nload in Linux.md b/published/201503/20150121 How to Monitor Network Usage with nload in Linux.md similarity index 100% rename from published/20150121 How to Monitor Network Usage with nload in Linux.md rename to published/201503/20150121 How to Monitor Network Usage with nload in Linux.md diff --git a/published/20150121 How to apply image effects to pictures on Raspberry Pi.md b/published/201503/20150121 How to apply image effects to pictures on Raspberry Pi.md similarity index 100% rename from published/20150121 How to apply image effects to pictures on Raspberry Pi.md rename to published/201503/20150121 How to apply image effects to pictures on Raspberry Pi.md diff --git a/published/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md b/published/201503/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md similarity index 100% rename from published/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md rename to published/201503/20150121 Linux FAQs with Answers--How to check CPU info on Linux.md diff --git a/published/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md b/published/201503/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md similarity index 100% rename from published/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md rename to published/201503/20150122 How To Recover Windows 7 And Delete Ubuntu In 3 Easy Steps.md diff --git a/published/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md b/published/201503/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md similarity index 100% rename from published/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md rename to published/201503/20150122 Linux FAQs with Answers--How to create and configure a MySQL user from the command line.md diff --git a/published/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md b/published/201503/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md similarity index 100% rename from published/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md rename to published/201503/20150122 Linux FAQs with Answers--How to download and install ixgbe driver on Ubuntu or Debian.md diff --git a/published/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md b/published/201503/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md similarity index 100% rename from published/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md rename to published/201503/20150122 Linux FAQs with Answers--How to use yum to download a RPM package without installing it.md diff --git a/published/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md b/published/201503/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md similarity index 100% rename from published/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md rename to published/201503/20150123 Keep History Of Notifications With Recent Notifications AppIndicator.md diff --git a/published/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md b/published/201503/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md similarity index 100% rename from published/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md rename to published/201503/20150125 A Shell Primer--Master Your Linux OS X Unix Shell Environment.md diff --git a/published/20150126 4 lvcreate Command Examples on Linux.md b/published/201503/20150126 4 lvcreate Command Examples on Linux.md similarity index 100% rename from published/20150126 4 lvcreate Command Examples on Linux.md rename to published/201503/20150126 4 lvcreate Command Examples on Linux.md diff --git a/published/20150126 CD Audio Grabbers--Graphical Based.md b/published/201503/20150126 CD Audio Grabbers--Graphical Based.md similarity index 100% rename from published/20150126 CD Audio Grabbers--Graphical Based.md rename to published/201503/20150126 CD Audio Grabbers--Graphical Based.md diff --git a/published/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md b/published/201503/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md similarity index 100% rename from published/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md rename to published/201503/20150126 Cleaning up Ubuntu 14.10,14.04,13.10 system.md diff --git a/published/20150126 How To Kill All Processes Of A Specific User With slay.md b/published/201503/20150126 How To Kill All Processes Of A Specific User With slay.md similarity index 100% rename from published/20150126 How To Kill All Processes Of A Specific User With slay.md rename to published/201503/20150126 How To Kill All Processes Of A Specific User With slay.md diff --git a/published/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md b/published/201503/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md similarity index 100% rename from published/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md rename to published/201503/20150126 How to Add a New Hard Disk Without Rebooting on CentOS 7 or RHEL 7.md diff --git a/published/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md b/published/201503/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md similarity index 100% rename from published/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md rename to published/201503/20150126 Improve system performance by moving your log files to RAM Using Ramlog.md diff --git a/published/20150127 How to limit network bandwidth on Linux.md b/published/201503/20150127 How to limit network bandwidth on Linux.md similarity index 100% rename from published/20150127 How to limit network bandwidth on Linux.md rename to published/201503/20150127 How to limit network bandwidth on Linux.md diff --git a/published/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md b/published/201503/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md similarity index 100% rename from published/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md rename to published/201503/20150127 LinSSID--A Graphical Wi-Fi Scanner for Linux.md diff --git a/published/20150127 Windows 10 versus Linux.md b/published/201503/20150127 Windows 10 versus Linux.md similarity index 100% rename from published/20150127 Windows 10 versus Linux.md rename to published/201503/20150127 Windows 10 versus Linux.md diff --git a/published/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md b/published/201503/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md similarity index 100% rename from published/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md rename to published/201503/20150128 How To Monitor Access Point Signal Strength With wifi-linux.md diff --git a/published/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md b/published/201503/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md similarity index 100% rename from published/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md rename to published/201503/20150128 Linux Basics--How To Check If A Package Is Installed Or Not In Ubuntu.md diff --git a/published/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md b/published/201503/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md similarity index 100% rename from published/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md rename to published/201503/20150131 WordPress Can Be Used to Leverage Critical Ghost Flaw in Linux.md diff --git a/published/20150202 How To Install Websvn for Subversion in CentOS 7.0.md b/published/201503/20150202 How To Install Websvn for Subversion in CentOS 7.0.md similarity index 100% rename from published/20150202 How To Install Websvn for Subversion in CentOS 7.0.md rename to published/201503/20150202 How To Install Websvn for Subversion in CentOS 7.0.md diff --git a/published/20150203 9 Best IDEs and Code Editors for JavaScript Users.md b/published/201503/20150203 9 Best IDEs and Code Editors for JavaScript Users.md similarity index 100% rename from published/20150203 9 Best IDEs and Code Editors for JavaScript Users.md rename to published/201503/20150203 9 Best IDEs and Code Editors for JavaScript Users.md diff --git a/published/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md b/published/201503/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md similarity index 100% rename from published/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md rename to published/201503/20150203 How To Install KDE Plasma 5.2 In Ubuntu 14.10.md diff --git a/published/20150205 How To Use Smartphones Like Weather Conky In Linux.md b/published/201503/20150205 How To Use Smartphones Like Weather Conky In Linux.md similarity index 100% rename from published/20150205 How To Use Smartphones Like Weather Conky In Linux.md rename to published/201503/20150205 How To Use Smartphones Like Weather Conky In Linux.md diff --git a/published/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md b/published/201503/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md similarity index 100% rename from published/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md rename to published/201503/20150205 Linux Basics--Assign Multiple IP Addresses To Single Network Interface Card On CentOS 7.md diff --git a/published/20150209 How to back up a Debian system using backupninja.md b/published/201503/20150209 How to back up a Debian system using backupninja.md similarity index 100% rename from published/20150209 How to back up a Debian system using backupninja.md rename to published/201503/20150209 How to back up a Debian system using backupninja.md diff --git a/published/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md b/published/201503/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md similarity index 100% rename from published/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md rename to published/201503/20150209 Linux FAQs with Answers--How to get the process ID (PID) of a shell script.md diff --git a/published/20150211 Best Known Linux Archive or Compress Tools.md b/published/201503/20150211 Best Known Linux Archive or Compress Tools.md similarity index 100% rename from published/20150211 Best Known Linux Archive or Compress Tools.md rename to published/201503/20150211 Best Known Linux Archive or Compress Tools.md diff --git a/published/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md b/published/201503/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md similarity index 100% rename from published/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md rename to published/201503/20150211 How To Protect Ubuntu Server Against the GHOST Vulnerability.md diff --git a/published/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md b/published/201503/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md similarity index 100% rename from published/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md rename to published/201503/20150215 A Look At What Linux Games We Will See In 2015 And Beyond.md diff --git a/published/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md b/published/201503/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md similarity index 100% rename from published/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md rename to published/201503/20150215 How To Make GDebi Default Instead of Ubuntu Software Center.md diff --git a/published/20150225 10 quick tar command examples to create or extract archives in Linux.md b/published/201503/20150225 10 quick tar command examples to create or extract archives in Linux.md similarity index 100% rename from published/20150225 10 quick tar command examples to create or extract archives in Linux.md rename to published/201503/20150225 10 quick tar command examples to create or extract archives in Linux.md diff --git a/published/20150225 How to Hide PHP Version in Linux.md b/published/201503/20150225 How to Hide PHP Version in Linux.md similarity index 100% rename from published/20150225 How to Hide PHP Version in Linux.md rename to published/201503/20150225 How to Hide PHP Version in Linux.md diff --git a/published/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md b/published/201503/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md similarity index 100% rename from published/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md rename to published/201503/20150225 Italian Region Emilia-Romagna Is Switching To OpenOffice.md diff --git a/published/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md b/published/201503/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md similarity index 100% rename from published/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md rename to published/201503/20150225 Linux FAQs with Answers--How to install full kernel source on Debian or Ubuntu.md diff --git a/published/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md b/published/201503/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md similarity index 100% rename from published/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md rename to published/201503/20150304 Linux Basics--How To Find Maximum Supported RAM By Your System.md diff --git a/published/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md b/published/201503/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md similarity index 100% rename from published/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md rename to published/201503/20150306 Pinta 1.6 Released Install It In Ubuntu And Linux Mint.md diff --git a/published/20150309 10 best uses for open source software in the business world.md b/published/201503/20150309 10 best uses for open source software in the business world.md similarity index 100% rename from published/20150309 10 best uses for open source software in the business world.md rename to published/201503/20150309 10 best uses for open source software in the business world.md diff --git a/published/20150309 15 Basic 'ls' Command Examples in Linux.md b/published/201503/20150309 15 Basic 'ls' Command Examples in Linux.md similarity index 100% rename from published/20150309 15 Basic 'ls' Command Examples in Linux.md rename to published/201503/20150309 15 Basic 'ls' Command Examples in Linux.md diff --git a/published/20150309 New App Brings Android Notifications to The GNOME Desktop.md b/published/201503/20150309 New App Brings Android Notifications to The GNOME Desktop.md similarity index 100% rename from published/20150309 New App Brings Android Notifications to The GNOME Desktop.md rename to published/201503/20150309 New App Brings Android Notifications to The GNOME Desktop.md diff --git a/published/New Debian TC Members Appointed For Going Past The Systemd Fallout.md b/published/201503/New Debian TC Members Appointed For Going Past The Systemd Fallout.md similarity index 100% rename from published/New Debian TC Members Appointed For Going Past The Systemd Fallout.md rename to published/201503/New Debian TC Members Appointed For Going Past The Systemd Fallout.md From 9bb0602a5d0509ff4bda24d10dd5514ef4b703b5 Mon Sep 17 00:00:00 2001 From: DeadFire Date: Wed, 1 Apr 2015 11:13:53 +0800 Subject: [PATCH 0422/2517] =?UTF-8?q?20150401-1=20=E9=80=89=E9=A2=98=20ZMa?= =?UTF-8?q?p=20=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20150401 ZMap Documentation.md | 743 ++++++++++++++++++++ 1 file changed, 743 insertions(+) create mode 100644 sources/tech/20150401 ZMap Documentation.md diff --git a/sources/tech/20150401 ZMap Documentation.md b/sources/tech/20150401 ZMap Documentation.md new file mode 100644 index 0000000000..810140d774 --- /dev/null +++ b/sources/tech/20150401 ZMap Documentation.md @@ -0,0 +1,743 @@ +ZMap Documentation +================================================================================ +1. Getting Started with ZMap +1. Scanning Best Practices +1. Command Line Arguments +1. Additional Information + 1. TCP SYN Probe Module + 1. ICMP Echo Probe Module + 1. UDP Probe Module + 1. Configuration Files + 1. Verbosity + 1. Results Output + 1. Blacklisting + 1. Rate Limiting and Sampling + 1. Sending Multiple Probes +1. Extending ZMap + 1. Sample Applications + 1. Writing Probe and Output Modules + +---------- + +### Getting Started with ZMap ### + +ZMap is designed to perform comprehensive scans of the IPv4 address space or large portions of it. While ZMap is a powerful tool for researchers, please keep in mind that by running ZMap, you are potentially scanning the ENTIRE IPv4 address space at over 1.4 million packets per second. Before performing even small scans, we encourage users to contact their local network administrators and consult our list of scanning best practices. + +By default, ZMap will perform a TCP SYN scan on the specified port at the maximum rate possible. A more conservative configuration that will scan 10,000 random addresses on port 80 at a maximum 10 Mbps can be run as follows: + + $ zmap --bandwidth=10M --target-port=80 --max-targets=10000 --output-file=results.csv + +Or more concisely specified as: + + $ zmap -B 10M -p 80 -n 10000 -o results.csv + +ZMap can also be used to scan specific subnets or CIDR blocks. For example, to scan only 10.0.0.0/8 and 192.168.0.0/16 on port 80, run: + + zmap -p 80 -o results.csv 10.0.0.0/8 192.168.0.0/16 + +If the scan started successfully, ZMap will output status updates every one second similar to the following: + + 0% (1h51m left); send: 28777 562 Kp/s (560 Kp/s avg); recv: 1192 248 p/s (231 p/s avg); hits: 0.04% + 0% (1h51m left); send: 34320 554 Kp/s (559 Kp/s avg); recv: 1442 249 p/s (234 p/s avg); hits: 0.04% + 0% (1h50m left); send: 39676 535 Kp/s (555 Kp/s avg); recv: 1663 220 p/s (232 p/s avg); hits: 0.04% + 0% (1h50m left); send: 45372 570 Kp/s (557 Kp/s avg); recv: 1890 226 p/s (232 p/s avg); hits: 0.04% + +These updates provide information about the current state of the scan and are of the following form: %-complete (est time remaining); packets-sent curr-send-rate (avg-send-rate); recv: packets-recv recv-rate (avg-recv-rate); hits: hit-rate + +If you do not know the scan rate that your network can support, you may want to experiment with different scan rates or bandwidth limits to find the fastest rate that your network can support before you see decreased results. + +By default, ZMap will output the list of distinct IP addresses that responded successfully (e.g. with a SYN ACK packet) similar to the following. There are several additional formats (e.g. JSON and Redis) for outputting results as well as options for producing programmatically parsable scan statistics. As wells, additional output fields can be specified and the results can be filtered using an output filter. + + 115.237.116.119 + 23.9.117.80 + 207.118.204.141 + 217.120.143.111 + 50.195.22.82 + +We strongly encourage you to use a blacklist file, to exclude both reserved/unallocated IP space (e.g. multicast, RFC1918), as well as networks that request to be excluded from your scans. By default, ZMap will utilize a simple blacklist file containing reserved and unallocated addresses located at `/etc/zmap/blacklist.conf`. If you find yourself specifying certain settings, such as your maximum bandwidth or blacklist file every time you run ZMap, you can specify these in `/etc/zmap/zmap.conf` or use a custom configuration file. + +If you are attempting to troubleshoot scan related issues, there are several options to help debug. First, it is possible can perform a dry run scan in order to see the packets that would be sent over the network by adding the `--dryrun` flag. As well, it is possible to change the logging verbosity by setting the `--verbosity=n` flag. + +---------- + +### Scanning Best Practices ### + +We offer these suggestions for researchers conducting Internet-wide scans as guidelines for good Internet citizenship. + +- Coordinate closely with local network administrators to reduce risks and handle inquiries +- Verify that scans will not overwhelm the local network or upstream provider +- Signal the benign nature of the scans in web pages and DNS entries of the source addresses +- Clearly explain the purpose and scope of the scans in all communications +- Provide a simple means of opting out and honor requests promptly +- Conduct scans no larger or more frequent than is necessary for research objectives +- Spread scan traffic over time or source addresses when feasible + +It should go without saying that scan researchers should refrain from exploiting vulnerabilities or accessing protected resources, and should comply with any special legal requirements in their jurisdictions. + +---------- + +### Command Line Arguments ### + +#### Common Options #### + +These options are the most common options when performing a simple scan. We note that some options are dependent on the probe module or output module used (e.g. target port is not used when performing an ICMP Echo Scan). + + +**-p, --target-port=port** + +TCP port number to scan (e.g. 443) + +**-o, --output-file=name** + +Write results to this file. Use - for stdout + +**-b, --blacklist-file=path** + +File of subnets to exclude, in CIDR notation (e.g. 192.168.0.0/16), one-per line. It is recommended you use this to exclude RFC 1918 addresses, multicast, IANA reserved space, and other IANA special-purpose addresses. An example blacklist file is provided in conf/blacklist.example for this purpose. + +#### Scan Options #### + +**-n, --max-targets=n** + +Cap the number of targets to probe. This can either be a number (e.g. `-n 1000`) or a percentage (e.g. `-n 0.1%`) of the scannable address space (after excluding blacklist) + +**-N, --max-results=n** + +Exit after receiving this many results + +**-t, --max-runtime=secs** + +Cap the length of time for sending packets + +**-r, --rate=pps** + +Set the send rate in packets/sec + +**-B, --bandwidth=bps** + +Set the send rate in bits/second (supports suffixes G, M, and K (e.g. `-B 10M` for 10 mbps). This overrides the `--rate` flag. + +**-c, --cooldown-time=secs** + +How long to continue receiving after sending has completed (default=8) + +**-e, --seed=n** + +Seed used to select address permutation. Use this if you want to scan addresses in the same order for multiple ZMap runs. + +**--shards=n** + +Split the scan up into N shards/partitions among different instances of zmap (default=1). When sharding, `--seed` is required + +**--shard=n** + +Set which shard to scan (default=0). Shards are indexed in the range [0, N), where N is the total number of shards. When sharding `--seed` is required. + +**-T, --sender-threads=n** + +Threads used to send packets (default=1) + +**-P, --probes=n** + +Number of probes to send to each IP (default=1) + +**-d, --dryrun** + +Print out each packet to stdout instead of sending it (useful for debugging) + +#### Network Options #### + +**-s, --source-port=port|range** + +Source port(s) to send packets from + +**-S, --source-ip=ip|range** + +Source address(es) to send packets from. Either single IP or range (e.g. 10.0.0.1-10.0.0.9) + +**-G, --gateway-mac=addr** + +Gateway MAC address to send packets to (in case auto-detection does not work) + +**-i, --interface=name** + +Network interface to use + +#### Probe Options #### + +ZMap allows users to specify and write their own probe modules for use with ZMap. Probe modules are responsible for generating probe packets to send, and processing responses from hosts. + +**--list-probe-modules** + +List available probe modules (e.g. tcp_synscan) + +**-M, --probe-module=name** + +Select probe module (default=tcp_synscan) + +**--probe-args=args** + +Arguments to pass to probe module + +**--list-output-fields** + +List the fields the selected probe module can send to the output module + +#### Output Options #### + +ZMap allows users to specify and write their own output modules for use with ZMap. Output modules are responsible for processing the fieldsets returned by the probe module, and outputing them to the user. Users can specify output fields, and write filters over the output fields. + +**--list-output-modules** + +List available output modules (e.g. tcp_synscan) + +**-O, --output-module=name** + +Select output module (default=csv) + +**--output-args=args** + +Arguments to pass to output module + +**-f, --output-fields=fields** + +Comma-separated list of fields to output + +**--output-filter** + +Specify an output filter over the fields defined by the probe module + +#### Additional Options #### + +**-C, --config=filename** + +Read a configuration file, which can specify any other options. + +**-q, --quiet** + +Do not print status updates once per second + +**-g, --summary** + +Print configuration and summary of results at the end of the scan + +**-v, --verbosity=n** + +Level of log detail (0-5, default=3) + +**-h, --help** + +Print help and exit + +**-V, --version** + +Print version and exit + +---------- + +### Additional Information ### + +#### TCP SYN Scans #### + +When performing a TCP SYN scan, ZMap requires a single target port and supports specifying a range of source ports from which the scan will originate. + +**-p, --target-port=port** + +TCP port number to scan (e.g. 443) + +**-s, --source-port=port|range** + +Source port(s) for scan packets (e.g. 40000-50000) + +**Warning!** ZMap relies on the Linux kernel to respond to SYN/ACK packets with RST packets in order to close connections opened by the scanner. This occurs because ZMap sends packets at the Ethernet layer in order to reduce overhead otherwise incurred in the kernel from tracking open TCP connections and performing route lookups. As such, if you have a firewall rule that tracks established connections such as a netfilter rule similar to `-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT`, this will block SYN/ACK packets from reaching the kernel. This will not prevent ZMap from recording responses, but it will prevent RST packets from being sent back, ultimately using up a connection on the scanned host until your connection times out. We strongly recommend that you select a set of unused ports on your scanning host which can be allowed access in your firewall and specifying this port range when executing ZMap, with the `-s` flag (e.g. `-s '50000-60000'`). + +#### ICMP Echo Request Scans #### + +While ZMap performs TCP SYN scans by default, it also supports ICMP echo request scans in which an ICMP echo request packet is sent to each host and the type of ICMP response received in reply is denoted. An ICMP scan can be performed by selecting the icmp_echoscan scan module similar to the following: + + $ zmap --probe-module=icmp_echoscan + +#### UDP Datagram Scans #### + +ZMap additionally supports UDP probes, where it will send out an arbitrary UDP datagram to each host, and receive either UDP or ICMP Unreachable responses. ZMap supports four different methods of setting the UDP payload through the --probe-args command-line option. These are 'text' for ASCII-printable payloads, 'hex' for hexadecimal payloads set on the command-line, 'file' for payloads contained in an external file, and 'template' for payloads that require dynamic field generation. In order to obtain the UDP response, make sure that you specify 'data' as one of the fields to report with the -f option. + +The example below will send the two bytes 'ST', a PCAnwywhere 'status' request, to UDP port 5632. + + $ zmap -M udp -p 5632 --probe-args=text:ST -N 100 -f saddr,data -o - + +The example below will send the byte '0x02', a SQL Server 'client broadcast' request, to UDP port 1434. + + $ zmap -M udp -p 1434 --probe-args=hex:02 -N 100 -f saddr,data -o - + +The example below will send a NetBIOS status request to UDP port 137. This uses a payload file that is included with the ZMap distribution. + + $ zmap -M udp -p 1434 --probe-args=file:netbios_137.pkt -N 100 -f saddr,data -o - + +The example below will send a SIP 'OPTIONS' request to UDP port 5060. This uses a template file that is included with the ZMap distribution. + + $ zmap -M udp -p 1434 --probe-args=file:sip_options.tpl -N 100 -f saddr,data -o - + +UDP payload templates are still experimental. You may encounter crashes when more using more than one send thread (-T) and there is a significant decrease in performance compared to static payloads. A template is simply a payload file that contains one or more field specifiers enclosed in a ${} sequence. Some protocols, notably SIP, require the payload to reflect the source and destination of the packet. Other protocols, such as portmapper and DNS, contain fields that should be randomized per request or risk being dropped by multi-homed systems scanned by ZMap. + +The payload template below will send a SIP OPTIONS request to every destination: + + OPTIONS sip:${RAND_ALPHA=8}@${DADDR} SIP/2.0 + Via: SIP/2.0/UDP ${SADDR}:${SPORT};branch=${RAND_ALPHA=6}.${RAND_DIGIT=10};rport;alias + From: sip:${RAND_ALPHA=8}@${SADDR}:${SPORT};tag=${RAND_DIGIT=8} + To: sip:${RAND_ALPHA=8}@${DADDR} + Call-ID: ${RAND_DIGIT=10}@${SADDR} + CSeq: 1 OPTIONS + Contact: sip:${RAND_ALPHA=8}@${SADDR}:${SPORT} + Content-Length: 0 + Max-Forwards: 20 + User-Agent: ${RAND_ALPHA=8} + Accept: text/plain + +In the example above, note that line endings are \r\n and the end of this request must contain \r\n\r\n for most SIP implementations to correcly process it. A working example is included in the examples/udp-payloads directory of the ZMap source tree (sip_options.tpl). + +The following template fields are currently implemented: + + +- **SADDR**: Source IP address in dotted-quad format +- **SADDR_N**: Source IP address in network byte order +- **DADDR**: Destination IP address in dotted-quad format +- **DADDR_N**: Destination IP address in network byte order +- **SPORT**: Source port in ascii format +- **SPORT_N**: Source port in network byte order +- **DPORT**: Destination port in ascii format +- **DPORT_N**: Destination port in network byte order +- **RAND_BYTE**: Random bytes (0-255), length specified with =(length) parameter +- **RAND_DIGIT**: Random digits from 0-9, length specified with =(length) parameter +- **RAND_ALPHA**: Random mixed-case letters from A-Z, length specified with =(length) parameter +- **RAND_ALPHANUM**: Random mixed-case letters from A-Z and digits from 0-9, length specified with =(length) parameter + +### Configuration Files ### + +ZMap supports configuration files instead of requiring all options to be specified on the command-line. A configuration can be created by specifying one long-name option and the value per line such as: + + interface "eth1" + source-ip 1.1.1.4-1.1.1.8 + gateway-mac b4:23:f9:28:fa:2d # upstream gateway + cooldown-time 300 # seconds + blacklist-file /etc/zmap/blacklist.conf + output-file ~/zmap-output + quiet + summary + +ZMap can then be run with a configuration file and specifying any additional necessary parameters: + + $ zmap --config=~/.zmap.conf --target-port=443 + +### Verbosity ### + +There are several types of on-screen output that ZMap produces. By default, ZMap will print out basic progress information similar to the following every 1 second. This can be disabled by setting the `--quiet` flag. + + 0:01 12%; send: 10000 done (15.1 Kp/s avg); recv: 144 143 p/s (141 p/s avg); hits: 1.44% + +ZMap also prints out informational messages during scanner configuration such as the following, which can be controlled with the `--verbosity` argument. + + Aug 11 16:16:12.813 [INFO] zmap: started + Aug 11 16:16:12.817 [DEBUG] zmap: no interface provided. will use eth0 + Aug 11 16:17:03.971 [DEBUG] cyclic: primitive root: 3489180582 + Aug 11 16:17:03.971 [DEBUG] cyclic: starting point: 46588 + Aug 11 16:17:03.975 [DEBUG] blacklist: 3717595507 addresses allowed to be scanned + Aug 11 16:17:03.975 [DEBUG] send: will send from 1 address on 28233 source ports + Aug 11 16:17:03.975 [DEBUG] send: using bandwidth 10000000 bits/s, rate set to 14880 pkt/s + Aug 11 16:17:03.985 [DEBUG] recv: thread started + +ZMap also supports printing out a grep-able summary at the end of the scan, similar to below, which can be invoked with the `--summary` flag. + + cnf target-port 443 + cnf source-port-range-begin 32768 + cnf source-port-range-end 61000 + cnf source-addr-range-begin 1.1.1.4 + cnf source-addr-range-end 1.1.1.8 + cnf maximum-packets 4294967295 + cnf maximum-runtime 0 + cnf permutation-seed 0 + cnf cooldown-period 300 + cnf send-interface eth1 + cnf rate 45000 + env nprocessors 16 + exc send-start-time Fri Jan 18 01:47:35 2013 + exc send-end-time Sat Jan 19 00:47:07 2013 + exc recv-start-time Fri Jan 18 01:47:35 2013 + exc recv-end-time Sat Jan 19 00:52:07 2013 + exc sent 3722335150 + exc blacklisted 572632145 + exc first-scanned 1318129262 + exc hit-rate 0.874102 + exc synack-received-unique 32537000 + exc synack-received-total 36689941 + exc synack-cooldown-received-unique 193 + exc synack-cooldown-received-total 1543 + exc rst-received-unique 141901021 + exc rst-received-total 166779002 + adv source-port-secret 37952 + adv permutation-gen 4215763218 + +### Results Output ### + +ZMap can produce results in several formats through the use of **output modules**. By default, ZMap only supports **csv** output, however support for **redis** and **json** can be compiled in. The results sent to these output modules may be filtered using an **output filter**. The fields the output module writes are specified by the user. By default, ZMap will return results in csv format and if no output file is specified, ZMap will not produce specific results. It is also possible to write your own output module; see Writing Output Modules for information. + +**-o, --output-file=p** + +File to write output to + +**-O, --output-module=p** + +Invoke a custom output module + + +**-f, --output-fields=p** + +Comma-separated list of fields to output + +**--output-filter=filter** + +Specify an output filter over fields for a given probe + +**--list-output-modules** + +Lists available output modules + +**--list-output-fields** + +List available output fields for a given probe + +#### Output Fields #### + +ZMap has a variety of fields it can output beyond IP address. These fields can be viewed for a given probe module by running with the `--list-output-fields` flag. + + $ zmap --probe-module="tcp_synscan" --list-output-fields + saddr string: source IP address of response + saddr-raw int: network order integer form of source IP address + daddr string: destination IP address of response + daddr-raw int: network order integer form of destination IP address + ipid int: IP identification number of response + ttl int: time-to-live of response packet + sport int: TCP source port + dport int: TCP destination port + seqnum int: TCP sequence number + acknum int: TCP acknowledgement number + window int: TCP window + classification string: packet classification + success int: is response considered success + repeat int: is response a repeat response from host + cooldown int: Was response received during the cooldown period + timestamp-str string: timestamp of when response arrived in ISO8601 format. + timestamp-ts int: timestamp of when response arrived in seconds since Epoch + timestamp-us int: microsecond part of timestamp (e.g. microseconds since 'timestamp-ts') + +To select which fields to output, any combination of the output fields can be specified as a comma-separated list using the `--output-fields=fields` or `-f` flags. Example: + + $ zmap -p 80 -f "response,saddr,daddr,sport,seq,ack,in_cooldown,is_repeat,timestamp" -o output.csv + +#### Filtering Output #### + +Results generated by a probe module can be filtered before being passed to the output module. Filters are defined over the output fields of a probe module. Filters are written in a simple filtering language, similar to SQL, and are passed to ZMap using the **--output-filter** option. Output filters are commonly used to filter out duplicate results, or to only pass only sucessful responses to the output module. + +Filter expressions are of the form ` `. The type of `` must be either a string or unsigned integer literal, and match the type of ``. The valid operations for integer comparisons are `= !=, <, >, <=, >=`. The operations for string comparisons are =, !=. The `--list-output-fields` flag will print what fields and types are available for the selected probe module, and then exit. + +Compound filter expressions may be constructed by combining filter expressions using parenthesis to specify order of operations, the `&&` (logical AND) and `||` (logical OR) operators. + +**Examples** + +Write a filter for only successful, non-duplicate responses + + --output-filter="success = 1 && repeat = 0" + +Filter for packets that have classification RST and a TTL greater than 10, or for packets with classification SYNACK + + --output-filter="(classification = rst && ttl > 10) || classification = synack" + +#### CSV #### + +The csv module will produce a comma-separated value file of the output fields requested. For example, the following command produces the following CSV in a file called `output.csv`. + + $ zmap -p 80 -f "response,saddr,daddr,sport,seq,ack,in_cooldown,is_repeat,timestamp" -o output.csv + +---------- + + response, saddr, daddr, sport, dport, seq, ack, in_cooldown, is_repeat, timestamp + synack, 159.174.153.144, 10.0.0.9, 80, 40555, 3050964427, 3515084203, 0, 0,2013-08-15 18:55:47.681 + rst, 141.209.175.1, 10.0.0.9, 80, 40136, 0, 3272553764, 0, 0,2013-08-15 18:55:47.683 + rst, 72.36.213.231, 10.0.0.9, 80, 56642, 0, 2037447916, 0, 0,2013-08-15 18:55:47.691 + rst, 148.8.49.150, 10.0.0.9, 80, 41672, 0, 1135824975, 0, 0,2013-08-15 18:55:47.692 + rst, 50.165.166.206, 10.0.0.9, 80, 38858, 0, 535206863, 0, 0,2013-08-15 18:55:47.694 + rst, 65.55.203.135, 10.0.0.9, 80, 50008, 0, 4071709905, 0, 0,2013-08-15 18:55:47.700 + synack, 50.57.166.186, 10.0.0.9, 80, 60650, 2813653162, 993314545, 0, 0,2013-08-15 18:55:47.704 + synack, 152.75.208.114, 10.0.0.9, 80, 52498, 460383682, 4040786862, 0, 0,2013-08-15 18:55:47.707 + synack, 23.72.138.74, 10.0.0.9, 80, 33480, 810393698, 486476355, 0, 0,2013-08-15 18:55:47.710 + +#### Redis #### + +The redis output module allows addresses to be added to a Redis queue instead of being saved to file which ultimately allows ZMap to be incorporated with post processing tools. + +**Heads Up!** ZMap does not build with Redis support by default. If you are building ZMap from source, you can build with Redis support by running CMake with `-DWITH_REDIS=ON`. + +### Blacklisting and Whitelisting ### + +ZMap supports both blacklisting and whitelisting network prefixes. If ZMap is not provided with blacklist or whitelist parameters, ZMap will scan all IPv4 addresses (including local, reserved, and multicast addresses). If a blacklist file is specified, network prefixes in the blacklisted segments will not be scanned; if a whitelist file is provided, only network prefixes in the whitelist file will be scanned. A whitelist and blacklist file can be used in coordination; the blacklist has priority over the whitelist (e.g. if you have whitelisted 10.0.0.0/8 and blacklisted 10.1.0.0/16, then 10.1.0.0/16 will not be scanned). Whitelist and blacklist files can be specified on the command-line as follows: + +**-b, --blacklist-file=path** + +File of subnets to blacklist in CIDR notation, e.g. 192.168.0.0/16 + +**-w, --whitelist-file=path** + +File of subnets to limit scan to in CIDR notation, e.g. 192.168.0.0/16 + +Blacklist files should be formatted with a single network prefix in CIDR notation per line. Comments are allowed using the `#` character. Example: + + # From IANA IPv4 Special-Purpose Address Registry + # http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml + # Updated 2013-05-22 + + 0.0.0.0/8 # RFC1122: "This host on this network" + 10.0.0.0/8 # RFC1918: Private-Use + 100.64.0.0/10 # RFC6598: Shared Address Space + 127.0.0.0/8 # RFC1122: Loopback + 169.254.0.0/16 # RFC3927: Link Local + 172.16.0.0/12 # RFC1918: Private-Use + 192.0.0.0/24 # RFC6890: IETF Protocol Assignments + 192.0.2.0/24 # RFC5737: Documentation (TEST-NET-1) + 192.88.99.0/24 # RFC3068: 6to4 Relay Anycast + 192.168.0.0/16 # RFC1918: Private-Use + 192.18.0.0/15 # RFC2544: Benchmarking + 198.51.100.0/24 # RFC5737: Documentation (TEST-NET-2) + 203.0.113.0/24 # RFC5737: Documentation (TEST-NET-3) + 240.0.0.0/4 # RFC1112: Reserved + 255.255.255.255/32 # RFC0919: Limited Broadcast + + # From IANA Multicast Address Space Registry + # http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml + # Updated 2013-06-25 + + 224.0.0.0/4 # RFC5771: Multicast/Reserved + +If you are looking to scan only a random portion of the internet, checkout Sampling, instead of using whitelisting and blacklisting. + +**Heads Up!** The default ZMap configuration uses the blacklist file at `/etc/zmap/blacklist.conf`, which contains locally scoped address space and reserved IP ranges. The default configuration can be changed by editing `/etc/zmap/zmap.conf`. + +### Rate Limiting and Sampling ### + +By default, ZMap will scan at the fastest rate that your network adaptor supports. In our experiences on commodity hardware, this is generally around 95-98% of the theoretical speed of gigabit Ethernet, which may be faster than your upstream provider can handle. ZMap will not automatically adjust its send-rate based on your upstream provider. You may need to manually adjust your send-rate to reduce packet drops and incorrect results. + +**-r, --rate=pps** + +Set maximum send rate in packets/sec + +**-B, --bandwidth=bps** + +Set send rate in bits/sec (supports suffixes G, M, and K). This overrides the --rate flag. + +ZMap also allows random sampling of the IPv4 address space by specifying max-targets and/or max-runtime. Because hosts are scanned in a random permutation generated per scan instantiation, limiting a scan to n hosts will perform a random sampling of n hosts. Command-line options: + +**-n, --max-targets=n** + +Cap number of targets to probe + +**-N, --max-results=n** + +Cap number of results (exit after receiving this many positive results) + +**-t, --max-runtime=s** + +Cap length of time for sending packets (in seconds) + +**-s, --seed=n** + +Seed used to select address permutation. Specify the same seed in order to scan addresses in the same order for different ZMap runs. + +For example, if you wanted to scan the same one million hosts on the Internet for multiple scans, you could set a predetermined seed and cap the number of scanned hosts similar to the following: + + zmap -p 443 -s 3 -n 1000000 -o results + +In order to determine which one million hosts were going to be scanned, you could run the scan in dry-run mode which will print out the packets that would be sent instead of performing the actual scan. + + zmap -p 443 -s 3 -n 1000000 --dryrun | grep daddr + | awk -F'daddr: ' '{print $2}' | sed 's/ |.*//;' + +### Sending Multiple Packets ### + +ZMap supports sending multiple probes to each host. Increasing this number both increases scan time and hosts reached. However, we find that the increase in scan time (~100% per additional probe) greatly outweighs the increase in hosts reached (~1% per additional probe). + +**-P, --probes=n** + +The number of unique probes to send to each IP (default=1) + +---------- + +### Sample Applications ### + +ZMap is designed for initiating contact with a large number of hosts and finding ones that respond positively. However, we realize that many users will want to perform follow-up processing, such as performing an application level handshake. For example, users who perform a TCP SYN scan on port 80 might want to perform a simple GET request and users who scan port 443 may be interested in completing a TLS handshake. + +#### Banner Grab #### + +We have included a sample application, banner-grab, with ZMap that enables users to receive messages from listening TCP servers. Banner-grab connects to the provided servers, optionally sends a message, and prints out the first message received from the server. This tool can be used to fetch banners such as HTTP server responses to specific commands, telnet login prompts, or SSH server strings. + +This example finds 1000 servers listening on port 80, and sends a simple GET request to each, storing their base-64 encoded responses in http-banners.out + + $ zmap -p 80 -N 1000 -B 10M -o - | ./banner-grab-tcp -p 80 -c 500 -d ./http-req > out + +For more details on using `banner-grab`, see the README file in `examples/banner-grab`. + +**Heads Up!** ZMap and banner-grab can have significant performance and accuracy impact on one another if run simultaneously (as in the example). Make sure not to let ZMap saturate banner-grab-tcp's concurrent connections, otherwise banner-grab will fall behind reading stdin, causing ZMap to block on writing stdout. We recommend using a slower scanning rate with ZMap, and increasing the concurrency of banner-grab-tcp to no more than 3000 (Note that > 1000 concurrent connections requires you to use `ulimit -SHn 100000` and `ulimit -HHn 100000` to increase the maximum file descriptors per process). These parameters will of course be dependent on your server performance, and hit-rate; we encourage developers to experiment with small samples before running a large scan. + +#### Forge Socket #### + +We have also included a form of banner-grab, called forge-socket, that reuses the SYN-ACK sent from the server for the connection that ultimately fetches the banner. In `banner-grab-tcp`, ZMap sends a SYN to each server, and listening servers respond with a SYN+ACK. The ZMap host's kernel receives this, and sends a RST, as no active connection is associated with that packet. The banner-grab program must then create a new TCP connection to the same server to fetch data from it. + +In forge-socket, we utilize a kernel module by the same name, that allows us to create a connection with arbitrary TCP parameters. This enables us to suppress the kernel's RST packet, and instead create a socket that will reuse the SYN+ACK's parameters, and send and receive data through this socket as we would any normally connected socket. + +To use forge-socket, you will need the forge-socket kernel module, available from [github][1]. You should git clone `git@github.com:ewust/forge_socket.git` in the ZMap root source directory, and then cd into the forge_socket directory, and run make. Install the kernel module with `insmod forge_socket.ko` as root. + +You must also tell the kernel not to send RST packets. An easy way to disable RST packets system wide is to use **iptables**. `iptables -A OUTPUT -p tcp -m tcp --tcp-flgas RST,RST RST,RST -j DROP` as root will do this, though you may also add an optional --dport X to limit this to the port (X) you are scanning. To remove this after your scan completes, you can run `iptables -D OUTPUT -p tcp -m tcp --tcp-flags RST,RST RST,RST -j DROP` as root. + +Now you should be able to build the forge-socket ZMap example program. To run it, you must use the **extended_file** ZMap output module: + + $ zmap -p 80 -N 1000 -B 10M -O extended_file -o - | \ + ./forge-socket -c 500 -d ./http-req > ./http-banners.out + +See the README in `examples/forge-socket` for more details. + +---------- + +### Writing Probe and Output Modules ### + +ZMap can be extended to support different types of scanning through **probe modules** and additional types of results **output through** output modules. Registered probe and output modules can be listed through the command-line interface: + +**--list-probe-modules** + +Lists installed probe modules + +**--list-output-modules** + +Lists installed output modules + +#### Output Modules #### + +ZMap output and post-processing can be extended by implementing and registering **output modules** with the scanner. Output modules receive a callback for every received response packet. While the default provided modules provide simple output, these modules are also capable of performing additional post-processing (e.g. tracking duplicates or outputting numbers in terms of AS instead of IP address) + +Output modules are created by defining a new output_module struct and registering it in [output_modules.c][2]: + + typedef struct output_module { + const char *name; // how is output module referenced in the CLI + unsigned update_interval; // how often is update called in seconds + + output_init_cb init; // called at scanner initialization + output_update_cb start; // called at the beginning of scanner + output_update_cb update; // called every update_interval seconds + output_update_cb close; // called at scanner termination + + output_packet_cb process_ip; // called when a response is received + + const char *helptext; // Printed when --list-output-modules is called + + } output_module_t; + +Output modules must have a name, which is how they are referenced on the command-line and generally implement `success_ip` and oftentimes `other_ip` callback. The process_ip callback is called for every response packet that is received and passed through the output filter by the current **probe module**. The response may or may not be considered a success (e.g. it could be a TCP RST). These callbacks must define functions that match the `output_packet_cb` definition: + + int (*output_packet_cb) ( + + ipaddr_n_t saddr, // IP address of scanned host in network-order + ipaddr_n_t daddr, // destination IP address in network-order + + const char* response_type, // send-module classification of packet + + int is_repeat, // {0: first response from host, 1: subsequent responses} + int in_cooldown, // {0: not in cooldown state, 1: scanner in cooldown state} + + const u_char* packet, // pointer to struct iphdr of IP packet + size_t packet_len // length of packet in bytes + ); + +An output module can also register callbacks to be executed at scanner initialization (tasks such as opening an output file), start of the scan (tasks such as documenting blacklisted addresses), during regular intervals during the scan (tasks such as progress updates), and close (tasks such as closing any open file descriptors). These callbacks are provided with complete access to the scan configuration and current state: + + int (*output_update_cb)(struct state_conf*, struct state_send*, struct state_recv*); + +which are defined in [output_modules.h][3]. An example is available at [src/output_modules/module_csv.c][4]. + +#### Probe Modules #### + +Packets are constructed using probe modules which allow abstracted packet creation and response classification. ZMap comes with two scan modules by default: `tcp_synscan` and `icmp_echoscan`. By default, ZMap uses `tcp_synscan`, which sends TCP SYN packets, and classifies responses from each host as open (received SYN+ACK) or closed (received RST). ZMap also allows developers to write their own probe modules for use with ZMap, using the following API. + +Each type of scan is implemented by developing and registering the necessary callbacks in a `send_module_t` struct: + + typedef struct probe_module { + const char *name; // how scan is invoked on command-line + size_t packet_length; // how long is probe packet (must be static size) + + const char *pcap_filter; // PCAP filter for collecting responses + size_t pcap_snaplen; // maximum number of bytes for libpcap to capture + + uint8_t port_args; // set to 1 if ZMap requires a --target-port be + // specified by the user + + probe_global_init_cb global_initialize; // called once at scanner initialization + probe_thread_init_cb thread_initialize; // called once for each thread packet buffer + probe_make_packet_cb make_packet; // called once per host to update packet + probe_validate_packet_cb validate_packet; // called once per received packet, + // return 0 if packet is invalid, + // non-zero otherwise. + + probe_print_packet_cb print_packet; // called per packet if in dry-run mode + probe_classify_packet_cb process_packet; // called by receiver to classify response + probe_close_cb close; // called at scanner termination + + fielddef_t *fields // Definitions of the fields specific to this module + int numfields // Number of fields + + } probe_module_t; + +At scanner initialization, `global_initialize` is called once and can be utilized to perform any necessary global configuration or initialization. However, `global_initialize` does not have access to the packet buffer which is thread-specific. Instead, `thread_initialize` is called at the initialization of each sender thread and is provided with access to the buffer that will be used for constructing probe packets along with global source and destination values. This callback should be used to construct the host agnostic packet structure such that only specific values (e.g. destination host and checksum) need to be be updated for each host. For example, the Ethernet header will not change between headers (minus checksum which is calculated in hardware by the NIC) and therefore can be defined ahead of time in order to reduce overhead at scan time. + +The `make_packet` callback is called for each host that is scanned to allow the **probe module** to update host specific values and is provided with IP address values, an opaque validation string, and probe number (shown below). The probe module is responsible for placing as much of the verification string into the probe, in such a way that when a valid response is returned by a server, the probe module can verify that it is present. For example, for a TCP SYN scan, the tcp_synscan probe module can use the TCP source port and sequence number to store the validation string. Response packets (SYN+ACKs) will contain the expected values in the destination port and acknowledgement number. + + int make_packet( + void *packetbuf, // packet buffer + ipaddr_n_t src_ip, // source IP in network-order + ipaddr_n_t dst_ip, // destination IP in network-order + uint32_t *validation, // validation string to place in probe + int probe_num // if sending multiple probes per host, + // this will be which probe number for this + // host we are currently sending + ); + +Scan modules must also define `pcap_filter`, `validate_packet`, and `process_packet`. Only packets that match the PCAP filter will be considered by the scanner. For example, in the case of a TCP SYN scan, we only want to investigate TCP SYN/ACK or TCP RST packets and would utilize a filter similar to `tcp && tcp[13] & 4 != 0 || tcp[13] == 18`. The `validate_packet` function will be called for every packet that fulfills this PCAP filter. If the validation returns non-zero, the `process_packet` function will be called, and will populate a fieldset using fields defined in `fields` with data from the packet. For example, the following code processes a packet for the TCP synscan probe module. + + void synscan_process_packet(const u_char *packet, uint32_t len, fieldset_t *fs) + { + struct iphdr *ip_hdr = (struct iphdr *)&packet[sizeof(struct ethhdr)]; + struct tcphdr *tcp = (struct tcphdr*)((char *)ip_hdr + + (sizeof(struct iphdr))); + + fs_add_uint64(fs, "sport", (uint64_t) ntohs(tcp->source)); + fs_add_uint64(fs, "dport", (uint64_t) ntohs(tcp->dest)); + fs_add_uint64(fs, "seqnum", (uint64_t) ntohl(tcp->seq)); + fs_add_uint64(fs, "acknum", (uint64_t) ntohl(tcp->ack_seq)); + fs_add_uint64(fs, "window", (uint64_t) ntohs(tcp->window)); + + if (tcp->rst) { // RST packet + fs_add_string(fs, "classification", (char*) "rst", 0); + fs_add_uint64(fs, "success", 0); + } else { // SYNACK packet + fs_add_string(fs, "classification", (char*) "synack", 0); + fs_add_uint64(fs, "success", 1); + } + } + +-------------------------------------------------------------------------------- + +via: https://zmap.io/documentation.html + +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:https://github.com/ewust/forge_socket/ +[2]:https://github.com/zmap/zmap/blob/v1.0.0/src/output_modules/output_modules.c +[3]:https://github.com/zmap/zmap/blob/master/src/output_modules/output_modules.h +[4]:https://github.com/zmap/zmap/blob/master/src/output_modules/module_csv.c \ No newline at end of file From 761fa63e61f5b66f6eb16d612abb7e083047adef Mon Sep 17 00:00:00 2001 From: carolinewuyan <309866211@qq.com> Date: Wed, 1 Apr 2015 14:49:26 +0800 Subject: [PATCH 0423/2517] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20150310 4 Linux Based Mini PC You Can Buy In 2015.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/share => published}/20150310 4 Linux Based Mini PC You Can Buy In 2015.md (100%) diff --git a/translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md b/published/20150310 4 Linux Based Mini PC You Can Buy In 2015.md similarity index 100% rename from translated/share/20150310 4 Linux Based Mini PC You Can Buy In 2015.md rename to published/20150310 4 Linux Based Mini PC You Can Buy In 2015.md From 822027ee379b102fad77ee52f796de16155a7f14 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 1 Apr 2015 18:13:30 +0800 Subject: [PATCH 0424/2517] Translating by ZTinoZ --- ...ow to Host Open Source Code Repository in github.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md index 00c7cb57e6..20253f476c 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -20,19 +20,19 @@ ### 2. 创建一个新的库 ### -After we have successfully signed up a new account or logged in to Github, we'll now need to create a new Repository to get started. +成功注册新账号或登录上Github之后,我们需要创建一个新的库来开始我们的正题。 -Click on **(+)** button which is located at the top right near the account id. Then Click on New Repository . +点击位于顶部靠右账号id旁边的**(+)**按钮,然后点击“New Repository”。 ![Add new repository](http://blog.linoxide.com/wp-content/uploads/2015/03/create-new-repository.png) -Now, after clicking on add a new repository, we'll now be directed to the page where we'll need to enter the required information. +点击创建一个新的库之后,我们进入了填写所需信息的页面。 ![adding repository information](http://blog.linoxide.com/wp-content/uploads/2015/03/adding-information-repository.png) -Now, after entering the required information about the new repository, we'll need to click on green Create repository button. +填写好信息之后,我们点击绿色的“Create repository”按钮。 -After it is done, we'll get to see something similar like this image. +这些步骤都做完之后,我们将看到类似于下面这张图的页面。 ![repository github](http://blog.linoxide.com/wp-content/uploads/2015/03/repository-github.png) From 369899a2cb4e0d81fe776c70f029d5d1990ca3cc Mon Sep 17 00:00:00 2001 From: LouisWei Date: Wed, 1 Apr 2015 21:28:22 +0800 Subject: [PATCH 0425/2517] translating wi-cuckoo --- ... Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md b/sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md index b34cb616d8..68db83d812 100644 --- a/sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md +++ b/sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md @@ -1,3 +1,4 @@ +translating wi-cuckoo LLAP Its Now Worth Try Installing PHP 7.0 on CentOS 7.x / Fedora 21 ================================================================================ PHP is a well known general purpose, server side web scripting language. A vast majority of online websites are coded in this language. PHP is ever evolving, feature rich, easy to use and well organized scripting language. Currently PHP development team is working on next major release of PHP, named PHP 7. The current production PHP version is PHP 5.6, as you might already know that PHP 6 was aborted in the past, the supporters of PHP 7 did not want the next important PHP version to be confused with that branch that was killed long time in the past. So it has been decided to name the next major release of PHP as PHP 7 instead of 6. PHP 7.0 is supposed to be released in November this year. @@ -320,4 +321,4 @@ via: http://linoxide.com/linux-how-to/install-php-7-centos-7-fedora-21/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://linoxide.com/author/arunrz/ -[1]:http://blog.famillecollet.com/post/2015/03/25/PHP-7.0-as-Software-Collection \ No newline at end of file +[1]:http://blog.famillecollet.com/post/2015/03/25/PHP-7.0-as-Software-Collection From 31895a9db8cadde210bc041accf59d0d1e51e148 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 1 Apr 2015 23:00:19 +0800 Subject: [PATCH 0426/2517] PUB:20150211 Simple Steps Migration From MySQL To MariaDB On Linux @martin2011qi --- ...igration From MySQL To MariaDB On Linux.md | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) rename {translated/tech => published}/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md (84%) diff --git a/translated/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md b/published/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md similarity index 84% rename from translated/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md rename to published/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md index e21084faeb..a778240683 100644 --- a/translated/tech/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md +++ b/published/20150211 Simple Steps Migration From MySQL To MariaDB On Linux.md @@ -15,13 +15,13 @@ MariaDB是MySQL社区开发的分支,也是一个增强型的替代品。它 现在,让我们迁移到MariaDB吧! -**以测试为目的**让我们创建一个叫**linoxidedb**的示例数据库。 +让我们创建一个叫**linoxidedb**的**用于测试的**示例数据库。 使用以下命令用root账户登陆MySQL: $ mysql -u root -p -输入mysql root用户的密码后,你将进入**mysql的命令行** +输入mysql 的 root 用户密码后,你将进入**mysql的命令行** **创建测试数据库:** @@ -54,7 +54,8 @@ MariaDB是MySQL社区开发的分支,也是一个增强型的替代品。它 $ mysqldump: Error: Binlogging on server not active ![](http://blog.linoxide.com/wp-content/uploads/2015/01/mysqldump-error.png) -mysqldump error + +*mysqldump error* 为了修复这个错误,我们需要对**my.cnf**文件做一些小改动。 @@ -68,7 +69,7 @@ mysqldump error ![configuring my.cnf](http://blog.linoxide.com/wp-content/uploads/2015/01/configuring-my.cnf_.png) -好了在保存并关闭文件后,我们需要重启一下mysql服务。运行以下命令重启: +好了,在保存并关闭文件后,我们需要重启一下mysql服务。运行以下命令重启: $ sudo /etc/init.d/mysql restart @@ -77,17 +78,18 @@ mysqldump error $ mysqldump --all-databases --user=root --password --master-data > backupdatabase.sql ![](http://blog.linoxide.com/wp-content/uploads/2015/01/crearing-bakup-file.png) -dumping databases + +*dumping databases* 上面的命令将会备份所有的数据库,把它们存储在当前目录下的**backupdatabase.sql**文件中。 ### 2. 卸载MySQL ### -首先,我们得把**my.cnt文件挪到安全的地方去**。 +首先,我们得把**my.cnf文件挪到安全的地方去**。 -**注**:my.cnf文件将不会在你卸载MySQL包的时候被删除,我们这样做只是以防万一。在MariaDB安装时,它会询问我们是保持现存的my.cnf文件,还是使用包中自带的版本(即新my.cnf文件)。 +**注**:在你卸载MySQL包的时候不会自动删除my.cnf文件,我们这样做只是以防万一。在MariaDB安装时,它会询问我们是保持现存的my.cnf文件,还是使用包中自带的版本(即新my.cnf文件)。 -在shell或终端中输入如下命令来备份my.cnt文件: +在shell或终端中输入如下命令来备份my.cnf文件: $ sudo cp /etc/mysql/my.cnf my.cnf.bak @@ -111,7 +113,7 @@ dumping databases ![adding mariadb repo](http://blog.linoxide.com/wp-content/uploads/2015/01/adding-repo-mariadb.png) -键值导入并且添加完仓库后你就可以用以下命令安装MariaDB了: +键值导入并且添加完仓库后,你就可以用以下命令安装MariaDB了: $ sudo apt-get update $ sudo apt-get install mariadb-server @@ -120,7 +122,7 @@ dumping databases ![my.conf configuration prompt](http://blog.linoxide.com/wp-content/uploads/2015/01/my.conf-configuration-prompt.png) -我们应该还没忘记在MariaDB安装时,它会问你是使用现有的my.cnf文件,还是包中自带的版本。你可以使用以前的my.cnf也可以用包中自带的。即使你想直接使用新的my.cnf文件,你依然可以晚点将以前的备份内容还原进去(别忘了我们已经将它复制到安全的地方那个去了)。所以,我们直接选择了默认的选项“N”。如果需要安装其他版本,请参考[MariaDB官方仓库][2]。 +我们应该还没忘记在MariaDB安装时,它会问你是使用现有的my.cnf文件,还是包中自带的版本。你可以使用以前的my.cnf也可以用包中自带的。即使你想直接使用新的my.cnf文件,你依然可以晚点时候将以前的备份内容还原进去(别忘了我们已经将它复制到安全的地方了)。所以,我们直接选择了默认的选项“N”。如果需要安装其他版本,请参考[MariaDB官方仓库][2]。 ### 4. 恢复配置文件 ### @@ -136,7 +138,7 @@ dumping databases 就这样,我们已成功将之前的数据库导入了进来。 -来,让我们登陆一下mysql命令行,检查一下数据库是否真的已经导入了: +来,让我们登录一下mysql命令行,检查一下数据库是否真的已经导入了: $ mysql -u root -p @@ -152,15 +154,15 @@ dumping databases ### 总结 ### -最后,我们已经成功地从MySQL迁移到了MariaDB数据库管理系统。MariaDB比MySQL好,虽然在性能方面MySQL还是比它更快,但是MariaDB的优点在于它额外的特性与支持的许可证。这能够确保它自由开源(FOSS),并永久自由开源,相比之下MySQL还有许多额外的插件,有些不能自由使用代码、有些没有公开的开发进程、有些在不久的将来会变的不再自由开源。如果你有任何的问题、评论、反馈给我们,不要犹豫直接在评论区留下你的看法。谢谢观看本教程,希望那你能喜欢MariaDB。 +最后,我们已经成功地从MySQL迁移到了MariaDB数据库管理系统。MariaDB比MySQL好,虽然在性能方面MySQL还是比它更快,但是MariaDB的优点在于它额外的特性与支持的许可证。这能够确保它自由开源(FOSS),并永久自由开源,相比之下MySQL还有许多额外的插件,有些不能自由使用代码、有些没有公开的开发进程、有些在不久的将来会变的不再自由开源。如果你有任何的问题、评论、反馈给我们,不要犹豫直接在评论区留下你的看法。谢谢观看本教程,希望你能喜欢MariaDB。 -------------------------------------------------------------------------------- via: http://linoxide.com/linux-how-to/migrate-mysql-mariadb-linux/ 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 5de782162c34961013af7b9c1d449710fc74f9d3 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 1 Apr 2015 23:04:44 +0800 Subject: [PATCH 0427/2517] PUB:20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip] @geekpi --- ... Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md (71%) diff --git a/translated/tech/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md b/published/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md similarity index 71% rename from translated/tech/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md rename to published/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md index 17349f2330..dcc6cb31c4 100644 --- a/translated/tech/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md +++ b/published/20150209 Fix Cannot Empty Trash In Ubuntu 14.04 [Quick Tip].md @@ -1,10 +1,10 @@ -在Ubuntu 14.04 中修复无法修复回收站[快速提示] +在Ubuntu 14.04 中修复无法清空回收站的问题 ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/02/empty-the-trash.jpg) ### 问题 ### -**无法在Ubuntu 14.04中清空回收站的问题**。我右键回收站图标并选择清空回收站,就像我一直做的那样。我看到进度条显示删除文件中过了一段时间。但是它停止了,并且Nautilus文件管理也停止了。我不得不在终端中停止了它。 +**我遇到了无法在Ubuntu 14.04中清空回收站的问题**。我右键回收站图标并选择清空回收站,就像我一直做的那样。我看到进度条显示删除文件中过了一段时间。但是它停止了,并且Nautilus文件管理也停止了。我不得不在终端中停止了它。 但是这很痛苦因为文件还在垃圾箱中。并且我反复尝试清空后窗口都冻结了。 @@ -18,7 +18,7 @@ 这里注意你的输入。你使用超级管理员权限来运行删除命令。我相信你不会删除其他文件或者目录。 -上面的命令会删除回收站目录下的所有文件。换句话说,这是用命令清空垃圾箱。使用玩上面的命令后,你会看到垃圾箱已经清空了。如果你删除了所有文件,你不应该在看到Nautilus崩溃的问题了。 +上面的命令会删除回收站目录下的所有文件。换句话说,这是用命令清空垃圾箱。使用完上面的命令后,你会看到垃圾箱已经清空了。如果你清空了所有文件,你不应该在看到Nautilus崩溃的问题了。 ### 对你有用么? ### @@ -30,7 +30,7 @@ via: http://itsfoss.com/fix-empty-trash-ubuntu/ 作者:[Abhishek][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 3adce8532778890519ebac62723af7479c424329 Mon Sep 17 00:00:00 2001 From: wxy Date: Wed, 1 Apr 2015 23:17:34 +0800 Subject: [PATCH 0428/2517] PUB:20150306 Nmap--Not Just for Evil @theo-l --- published/20150306 Nmap--Not Just for Evil.md | 41 +++++++++++++++++++ .../tech/20150306 Nmap--Not Just for Evil.md | 41 ------------------- 2 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 published/20150306 Nmap--Not Just for Evil.md delete mode 100644 translated/tech/20150306 Nmap--Not Just for Evil.md diff --git a/published/20150306 Nmap--Not Just for Evil.md b/published/20150306 Nmap--Not Just for Evil.md new file mode 100644 index 0000000000..e84ed9a1a7 --- /dev/null +++ b/published/20150306 Nmap--Not Just for Evil.md @@ -0,0 +1,41 @@ +Nmap--不是只能用于做坏事! +================================================================================ +如果SSH是系统管理员世界的"瑞士军刀"的话,那么Nmap就是一盒炸药。炸药很容易被误用然后将你的双脚崩掉,但是也是一个很有威力的工具,能够胜任一些看似无法完成的任务。 + +大多数人想到Nmap时,他们想到的是扫描服务器,查找开放端口来实施攻击。然而,在过去的这些年中,这样的超能力在当你管理服务器或计算机遇到问题时也是非常的有用。无论是你试图找出在你的网络上有哪些类型的服务器使用了指定的IP地址,或者尝试锁定一个新的NAS设备,以及扫描网络等,都会非常有用。 + +下图显示了我的QNAP NAS的网络扫描结果。我使用该设备的唯一目的是为了NFS和SMB文件共享,但是你可以看到,它包含了一大堆大开大敞的端口。如果没有Nmap,很难发现机器到底在运行着什么玩意儿。 + +![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11825nmapf1.jpg) + +*网络扫描* + +另外一个可能你没想到的用途是用它来扫描一个网络。你甚至根本不需要root的访问权限,而且你也可以非常容易地来指定你想要扫描的网络地址块,例如输入: + + nmap 192.168.1.0/24 + +上述命令会扫描我的局域网中全部的254个可用的IP地址,让我可以知道那个是可以Ping的,以及那些端口是开放的。如果你刚刚在网络上添加一个新的硬件,但是不知道它通过DHCP获取的IP地址是什么,那么此时Nmap就是无价之宝。例如,上述命令在我的网络中揭示了这个问题: + + Nmap scan report for TIVO-8480001903CCDDB.brainofshawn.com (192.168.1.220) + Host is up (0.0083s latency). + Not shown: 995 filtered ports + PORT STATE SERVICE + 80/tcp open http + 443/tcp open https + 2190/tcp open tivoconnect + 2191/tcp open tvbus + 9080/tcp closed glrpc + +它不仅显示了新的Tivo 设备,而且还告诉我那些端口是开放的。由于它的可靠性、可用性以及“黑边帽子”的能力,Nmap获得了本月的 <<编辑推荐>>奖。这不是一个新的程序,但是如果你是一个linux用户的话,你应该玩玩它。 + +-------------------------------------------------------------------------------- + +via: http://www.linuxjournal.com/content/nmap%E2%80%94not-just-evil + +作者:[Shawn Powers][a] +译者:[theo-l](https://github.com/theo-l) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.linuxjournal.com/users/shawn-powers diff --git a/translated/tech/20150306 Nmap--Not Just for Evil.md b/translated/tech/20150306 Nmap--Not Just for Evil.md deleted file mode 100644 index ba923d178d..0000000000 --- a/translated/tech/20150306 Nmap--Not Just for Evil.md +++ /dev/null @@ -1,41 +0,0 @@ -Nmap--不只是邪恶. -================================================================================ -如果SSH是系统管理员世界的"瑞士军刀"的话,那么Nmap就是一盒炸药. 炸药很容易被误用然后将你的双脚崩掉,但是也是一个很有威力的工具,能够胜任一些看似无法完成的任务. - -大多数人想到Nmap时,他们想到的是扫描服务器,查找开放端口来实施工具. 然而,在过去的这些年中,同样的超能力在当你管理服务器或计算机遇到问题时变得难以置信的有用.无论是你试图找出在你的网络上有哪些类型的服务器使用了指定的IP地址,或者尝试锁定一个新的NAS设备,以及扫描网络等,都会非常有用. - -图1显示了我的QNAP NAS的网络扫描.我使用该单元的唯一目的是为了NFS和SMB文件共享,但是你可以看到,它包含了一大堆大开大敞的端口.如果没有Nmap,很难发现机器到底在运行着什么玩意儿. - -![](http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11825nmapf1.jpg) - -### 图1 网络扫描 ### - -另外一个无法想象的用处是用它来扫描一个网络.你甚至根本不需要root的访问权限,而且你也可以非常容易地来指定你想要扫描的网络块,例如,输入: - - nmap 192.168.1.0/24 - -上述命令会扫描我局部网络中全部的254个可用的IP地址,让我可以知道那个使可以Ping的,以及那些端口时开放的.如果你刚刚插入一片新的硬件,但是不知道它通过DHCP获取的IP地址,那么此时Nmap就是无价之宝. 例如,上述命令在我的网络中揭示了这个问题. - - Nmap scan report for TIVO-8480001903CCDDB.brainofshawn.com (192.168.1.220) - Host is up (0.0083s latency). - Not shown: 995 filtered ports - PORT STATE SERVICE - 80/tcp open http - 443/tcp open https - 2190/tcp open tivoconnect - 2191/tcp open tvbus - 9080/tcp closed glrpc - -它不仅显示了新的Tivo单元,而且还告诉我那些端口是开放的. 由于它的可靠性,可用性以及黑色边框帽子的能力,Nmap获得了本月的 <<编辑推荐>>奖. 这不是一个新的程序,但是如果你是一个linux用户的话,你应该玩玩它. - --------------------------------------------------------------------------------- - -via: http://www.linuxjournal.com/content/nmap%E2%80%94not-just-evil - -作者:[Shawn Powers][a] -译者:[theo-l](https://github.com/theo-l) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.linuxjournal.com/users/shawn-powers From 4ca83d4b088d1ed760929759c39c8db62c23d196 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 1 Apr 2015 23:28:53 +0800 Subject: [PATCH 0429/2517] translated --- ...inal Commands That Will Rock Your World.md | 261 ++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md diff --git a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md new file mode 100644 index 0000000000..fab733bf7f --- /dev/null +++ b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md @@ -0,0 +1,261 @@ +11个Linux终端命令,让你的世界摇滚起来 +================================================================================ +我已经用了十年的Linux了,通过今天这篇文章我将向大家展示一系列的,我希望一开始就有人教导而不是曾在我成长道路上绊住我的Linux命令、工具和花招。 + +![Linux Keyboard Shortcuts.](http://f.tqn.com/y/linux/1/L/m/J/1/keyboardshortcuts.png) +Linux的快捷键。 + +### 1. 命令行日常系快捷键 ### + +如下的快捷方式非常有用,能够极大的提升你的工作效率: + +- CTRL + U - 剪切光标前的内容 +- CTRL + K - 剪切光标至行末的内容 +- CTRL + Y - 粘贴 +- CTRL + E - 移动光标到行末 +- CTRL + A - 移动光标到行首 +- ALT + F - 跳向下一个空格 +- ALT + B - 跳回上一个空格 +- ALT + Backspace - 删除前一个字 +- CTRL + W - 剪切光标后一个字 +- Shift + Insert - 向终端内粘贴文本 + +那么为了让上诉内容更易理解来看下面的这行命令。 + + sudo apt-get intall programname + +如你所见,命令中存在拼写错误,为了正常执行需要把“intall”替换成“install”。想象现在光标正在行末,我们有很多的方法将她退回单词install并替换它。我可以按两次ALT+B这样光标就会在如下的位置(这里用^代替光标的位置)。 + + sudo apt-get^intall programname + +现在你可以按两下方向键并将“s”插入到install中去了。 + +如果你想将浏览器中的文本复制到终端,可以使用快捷键"shift + insert"。 + +![](http://f.tqn.com/y/linux/1/L/n/J/1/sudotricks2.png) + +### 2. SUDO !! ### + +这个命令如果你还不知道我觉得你应该好好感谢我,因为如果你不知道那每次你在输入长串命令后看到“permission denied”后一定会痛恼不堪。 + +- sudo !! + +如何使用sudo !!?很简单。试想你刚输入了如下命令: + + apt-get install ranger + +一定会出现"Permission denied"除非你的登录了足够高权限的账户。 + +sudo !!就会用sudo的形式运行上一条命令。所以上一条命令可以看成是这样: + + sudo apt-get install ranger + +如果你不知道什么是sudo[戳这里][1]。 + +![Pause Terminal Applications.](http://f.tqn.com/y/linux/1/L/o/J/1/pauseapps.png) +暂停终端运行的应用程序。 + +### 3. 暂停并在后台运行命令 ### + +我曾经写过一篇如何在终端后台运行命令的指南。 + +- CTRL + Z - 暂停应用程序 +- fg - 重新将程序唤到前台 + +如何使用这个技巧呢? + +试想你正用nano编辑一个文件: + + sudo nano abc.txt + +文件编辑到一半你意识到你需要马上在终端输入些命令,但是nano在前台运行让你不能输入。你一定认为唯一的方法就是保存文件,推出nano,运行命令以后在重新打开nano。 + +其实你只要按CTRL + Z前台的命令就会暂停,画面就切回到命令行了。然后你就能运行你想要运行命令,等命令运行完后在终端窗口输入“fg”就可以回到先前暂停的任务。 + +有一个尝试非常有趣就是用nano打开文件,输入一些东西然后暂停会话。再用nano打开另一个文件,输入一些什么后再暂停会话。如果你输入“fg”你将回到第二个用nano打开的文件。只有退出nano再输入“fg”,你才会回到第一个用nano打开的文件。 + +![nohup.](http://f.tqn.com/y/linux/1/L/p/J/1/nohup3.png) +nohup. + +### 4. 使用nohup在登出SSH会话后仍运行命令 ### + +如果你用ssh登录别的机器时,[nohup命令]真的非常有用。 + +那么怎么使用nohup呢? + +想象一下你使用ssh远程登录到另一台电脑上,你运行了一条非常耗时的命令然后退出了ssh会话,不过命令仍在执行。而nohup可以将这一场景变成现实。 + +举个例子以测试为目的我用[树莓派][3]来下载发行版。 + +我绝对不会给我的树莓派外接显示器、键盘或鼠标。 + +一般我总是用[SSH] [4]从笔记本电脑连接到树莓派。如果我在不用nohup的情况下使用树莓派下载大型文件,那我就必须等待到下载完成后才能登出ssh会话关掉笔记本。如果是这样那我为什么要使用树莓派下文件呢? + +使用nohup的方法也很简单,只需如下例中在nohup后输入要执行的命令即可: + + nohup wget http://mirror.is.co.za/mirrors/linuxmint.com/iso//stable/17.1/linuxmint-17.1-cinnamon-64bit.iso & + +![Schedule tasks with at.](http://f.tqn.com/y/linux/1/L/q/J/1/at.png) +At管理任务日程 + +### 5. ‘在’特定的时间运行Linux命令 ### + +‘nohup’命令在你用SSH连接到服务器,并在上面保持执行SSH登出前任务的时候十分有用。 + +想一下如果你需要在特定的时间执行同一个命令,这种情况该怎么办呢? + +命令‘at’就能妥善解决这一情况。以下是‘at’使用示例。 + + at 10:38 PM Fri + at> cowsay 'hello' + at> CTRL + D + +上面的命令能在周五下午10时38分运行程序[cowsay] [5]。 + +使用的语法就是‘at’后追加日期时间。 + +当at>提示符出现后就可以输入你想在那个时间运行的命令了。 + +CTRL + D返回终端。 + +还有许多日期和时间的格式都是值得的你好好翻一翻‘at’的man手册来找到更多的使用方式。 + +![](http://f.tqn.com/y/linux/1/L/l/J/1/manmost.png) + +### 6. Man手册 ### + +Man手册会为你列出命令和参数的使用大纲,教你如何使用她们。 + +Man手册看起开沉闷呆板。(我思忖她们也不是被设计来娱乐我们的)。 + +不过这不代表你不能做些什么来使她们变得性感点。 + + export PAGER=most + +你需要 ‘most’;她会使你的你的man手册的色彩更加绚丽。 + +你可以用一下命令给man手册设定指定的行长: + + export MANWIDTH=80 + +最后,如果你有浏览器,你可以使用-H在默认浏览器中打开任意的man页。 + + man -H + +注意啦,以上的命令只有在你将默认的浏览器已经设置到环境变量$BROWSER中了之后才效果哟。 + +![View Processes With htop.](http://f.tqn.com/y/linux/1/L/r/J/1/nohup2.png) +使用htop查看进程。 + +### 7. 使用htop查看和管理进程 ### + +你用哪个命令找出电脑上正在运行的进程的呢?我敢打赌是‘[ps][6]’并在其后加不同的参数来得到你所想要的不同输出。 + +安装‘[htop][7]’吧!绝对让你相见恨晚。 + +htop在终端中将进程以列表的方式呈现,有点类似于Windows中的任务管理器。 + +你可以使用功能键的组合来切换排列的方式和展示出来的项。你也可以在htop中直接杀死进程。 + +在终端中简单的输入htop即可运行。 + + htop + +![Command Line File Manager - Ranger.](http://f.tqn.com/y/linux/1/L/s/J/1/ranger.png) +命令行文件管理 - Ranger. + +### 8. 使用ranger浏览文件系统 ### + +如果说htop是命令行进程控制的好帮手那么[ranger][8]就是命令行浏览文件系统的好帮手。 + +你在用之前可能需要先安装,不过一旦安装了以后就可以在命令行输入以下命令启动她: + + ranger + +在命令行窗口中ranger和一些别的文件管理器很像,但是她是左右结构的比起上下的来意味着你按左方向键你将前进到上一个文件夹结构而右方向键则会切换到下一个。 + +在使用前ranger的man手册还是值得一读的,这样你就可以用快捷键操作ranger了。 + +![Cancel Linux Shutdown.](http://f.tqn.com/y/linux/1/L/t/J/1/shutdown.png) +Linux取消关机。 + +### 9. 取消关机 ### + +无论是在命令行还是图形用户界面[关机][9]后发现自己不是真的想要关机。 + + shutdown -c + +需要注意的是,如果关机已经开始则有可能来不及停止关机。 + +以下是另一个可以尝试命令: + +- [pkill][10] shutdown + +![Kill Hung Processes With XKill.](http://f.tqn.com/y/linux/1/L/u/J/1/killhungprocesses.png) +使用XKill杀死挂起进程。 + +### 10. 杀死挂起进程的简单方法 ### + +想象一下,你正在运行的应用程序不明原因的僵死了。 + +你可以使用‘ps -ef’来找到该进程后杀掉或者使用‘htop’。 + +有一个更快、更容易的命令叫做[xkill][11]。 + +简单的在终端中输入以下命令并在窗口中点击你想杀死的应用程序。 + + xkill + +那如果整个系统挂掉了怎么办呢? + +按住键盘上的‘alt’和‘sysrq’稍待片刻输入如下所示: +Hold down the 'alt' and 'sysrq' keys on your keyboard and whilst they are held down type the following slowly: + +- [REISUB][12] + +这样不按关机键也能重启你的计算机。 + +![youtube-dl.](http://f.tqn.com/y/linux/1/L/v/J/1/youtubedl2.png) +youtube-dl. + +### 11. 下载Youtube视频 ### + +一般来说我们大多数人都喜欢看Youtube的视频,也会通过钟爱的播放器播放Youtube的流。 + +如果你需要离线一段时间(比如:从苏格兰南部坐飞机到英格兰南部旅游的这段时间)那么你可能希望下载一些视频到存储设备中,到闲暇时观看。 + +你所要做的就是从包管理器中安装youtube-dl。 + +你可以用以下命令使用youtube-dl: + + youtube-dl url-to-video + +你能在Youtubu视频页面点击分享链接得到视频的url。只要简单的复制链接在粘帖到命令行就行了(要用shift + insert快捷键哟)。 + +### 总结 ### + +希望你在这篇文章中得到帮助,并且在这11条中找到至少一条让你惊叹“原来如此”的技巧。 + +-------------------------------------------------------------------------------- + +via: http://linux.about.com/od/commands/tp/11-Linux-Terminal-Commands-That-Will-Rock-Your-World.htm + +作者:[Gary Newell][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linux.about.com/bio/Gary-Newell-132058.htm +[1]:http://linux.about.com/cs/linux101/g/sudo.htm +[2]:http://linux.about.com/library/cmd/blcmdl1_nohup.htm +[3]:http://linux.about.com/od/mobiledevicesother/a/Raspberry-Pi-Computer-Running-Linux.htm +[4]:http://linux.about.com/od/commands/l/blcmdl1_ssh.htm +[5]:http://linux.about.com/cs/linux101/g/cowsay.htm +[6]:http://linux.about.com/od/commands/l/blcmdl1_ps.htm +[7]:http://www.linux.com/community/blogs/133-general-linux/745323-5-commands-to-check-memory-usage-on-linux +[8]:http://ranger.nongnu.org/ +[9]:http://linux.about.com/od/commands/l/blcmdl8_shutdow.htm +[10]:http://linux.about.com/library/cmd/blcmdl1_pkill.htm +[11]:http://linux.about.com/od/funnymanpages/a/funman_xkill.htm +[12]:http://blog.kember.net/articles/reisub-the-gentle-linux-restart/ From 97dda6e589129955531b62ef0cab17f1ded2f4d6 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 1 Apr 2015 23:30:35 +0800 Subject: [PATCH 0430/2517] Update 20150318 11 Linux Terminal Commands That Will Rock Your World.md --- ...0318 11 Linux Terminal Commands That Will Rock Your World.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md index fab733bf7f..df309bb4cb 100644 --- a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md +++ b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md @@ -2,7 +2,7 @@ ================================================================================ 我已经用了十年的Linux了,通过今天这篇文章我将向大家展示一系列的,我希望一开始就有人教导而不是曾在我成长道路上绊住我的Linux命令、工具和花招。 -![Linux Keyboard Shortcuts.](http://f.tqn.com/y/linux/1/L/m/J/1/keyboardshortcuts.png) +![Linux Keyboard Shortcuts.](http://f.tqn.com/y/linux/1/L/m/J/1/keyboardshortcuts.png) Linux的快捷键。 ### 1. 命令行日常系快捷键 ### From d09e8814313186f30bc6933ec5bf045df8c881a4 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 1 Apr 2015 23:37:25 +0800 Subject: [PATCH 0431/2517] Update 20150318 11 Linux Terminal Commands That Will Rock Your World.md --- ...8 11 Linux Terminal Commands That Will Rock Your World.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md index df309bb4cb..73c919b6cc 100644 --- a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md +++ b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md @@ -208,12 +208,11 @@ Linux取消关机。 那如果整个系统挂掉了怎么办呢? -按住键盘上的‘alt’和‘sysrq’稍待片刻输入如下所示: -Hold down the 'alt' and 'sysrq' keys on your keyboard and whilst they are held down type the following slowly: +按住键盘上的‘alt’和‘sysrq’同时输入: - [REISUB][12] -这样不按关机键也能重启你的计算机。 +这样不按电源键你的计算机也能重启了。 ![youtube-dl.](http://f.tqn.com/y/linux/1/L/v/J/1/youtubedl2.png) youtube-dl. From acbb7e6b8bc14e247c766e5de86fb6f5d2fa99d5 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 1 Apr 2015 23:38:18 +0800 Subject: [PATCH 0432/2517] Update 20150318 11 Linux Terminal Commands That Will Rock Your World.md --- ...0318 11 Linux Terminal Commands That Will Rock Your World.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md index 73c919b6cc..b2d12d638d 100644 --- a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md +++ b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md @@ -233,7 +233,7 @@ youtube-dl. ### 总结 ### -希望你在这篇文章中得到帮助,并且在这11条中找到至少一条让你惊叹“原来如此”的技巧。 +希望你在这篇文章中得到帮助,并且在这11条中找到至少一条让你惊叹“原来可以这样”的技巧。 -------------------------------------------------------------------------------- From 99c586967be6eb4954fb6752101fbf22938f8ef6 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 1 Apr 2015 23:38:48 +0800 Subject: [PATCH 0433/2517] Delete 20150318 11 Linux Terminal Commands That Will Rock Your World.md --- ...inal Commands That Will Rock Your World.md | 268 ------------------ 1 file changed, 268 deletions(-) delete mode 100644 sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md diff --git a/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md deleted file mode 100644 index 0e3af6907d..0000000000 --- a/sources/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md +++ /dev/null @@ -1,268 +0,0 @@ -translating by martin. - -11 Linux Terminal Commands That Will Rock Your World -================================================================================ -I have been using Linux for about 10 years and what I am going to show you in this article is a list of Linux commands, tools and clever little tricks that I wish somebody had shown me from the outset instead of stumbling upon them as I went along. - -![Linux Keyboard Shortcuts.](http://f.tqn.com/y/linux/1/L/m/J/1/keyboardshortcuts.png) -Linux Keyboard Shortcuts. - -### 1. Useful Command Line Keyboard Shortcuts ### - -The following keyboard shortcuts are incredibly useful and will save you loads of time: - -- CTRL + U - Cuts text up until the cursor. -- CTRL + K - Cuts text from the cursor until the end of the line -- CTRL + Y - Pastes text -- CTRL + E - Move cursor to end of line -- CTRL + A - Move cursor to the beginning of the line -- ALT + F - Jump forward to next space -- ALT + B - Skip back to previous space -- ALT + Backspace - Delete previous word -- CTRL + W - Cut word behind cursor -- Shift + Insert - Pastes text into terminal - -Just so that the commands above make sense look at the next line of text. - - sudo apt-get intall programname - -As you can see I have a spelling error and for the command to work I would need to change "intall" to "install". - -Imagine the cursor is at the end of the line. There are various ways to get back to the word install to change it. - -I could press ALT + B twice which would put the cursor in the following position (denoted by the ^ symbol): - - sudo apt-get^intall programname - -Now you could press the cursor key and insert the ''s' into install. - -Another useful command is "shift + insert" especially If you need to copy text from a browser into the terminal. - -![](http://f.tqn.com/y/linux/1/L/n/J/1/sudotricks2.png) - -### 2. SUDO !! ### - -You are going to really thank me for the next command if you don't already know it because until you know this exists you curse yourself every time you enter a command and the words "permission denied" appear. - -- sudo !! - -How do you use sudo !!? Simply. Imagine you have entered the following command: - - apt-get install ranger - -The words "Permission denied" will appear unless you are logged in with elevated privileges. - -sudo !! runs the previous command as sudo. So the previous command now becomes: - - sudo apt-get install ranger - -If you don't know what sudo is [start here][1]. - -![Pause Terminal Applications.](http://f.tqn.com/y/linux/1/L/o/J/1/pauseapps.png) -Pause Terminal Applications. - -### 3. Pausing Commands And Running Commands In The Background ### - -I have already written a guide showing how to run terminal commands in the background. - -- CTRL + Z - Pauses an application -- fg - Returns you to the application - -So what is this tip about? - -Imagine you have opened a file in nano as follows: - - sudo nano abc.txt - -Halfway through typing text into the file you realise that you quickly want to type another command into the terminal but you can't because you opened nano in foreground mode. - -You may think your only option is to save the file, exit nano, run the command and then re-open nano. - -All you have to do is press CTRL + Z and the foreground application will pause and you will be returned to the command line. You can then run any command you like and when you have finished return to your previously paused session by entering "fg" into the terminal window and pressing return. - -An interesting thing to try out is to open a file in nano, enter some text and pause the session. Now open another file in nano, enter some text and pause the session. If you now enter "fg" you return to the second file you opened in nano. If you exit nano and enter "fg" again you return to the first file you opened within nano. - -![nohup.](http://f.tqn.com/y/linux/1/L/p/J/1/nohup3.png) -nohup. - -### 4. Use nohup To Run Commands After You Log Out Of An SSH Session ### - -The [nohup command][2] is really useful if you use the ssh command to log onto other machines. - -So what does nohup do? - -Imagine you are logged on to another computer remotely using ssh and you want to run a command that takes a long time and then exit the ssh session but leave the command running even though you are no longer connected then nohup lets you do just that. - -For instance I use my [Raspberry PI][3] to download distributions for review purposes. - -I never have my Raspberry PI connected to a display nor do I have a keyboard and mouse connected to it. - -I always connect to the Raspberry PI via [ssh][4] from a laptop. If I started downloading a large file on the Raspberry PI without using the nohup command then I would have to wait for the download to finish before logging off the ssh session and before shutting down the laptop. If I did this then I may as well have not used the Raspberry PI to download the file at all. - -To use nohup all I have to type is nohup followed by the command as follows: - - nohup wget http://mirror.is.co.za/mirrors/linuxmint.com/iso//stable/17.1/linuxmint-17.1-cinnamon-64bit.iso & - -![Schedule tasks with at.](http://f.tqn.com/y/linux/1/L/q/J/1/at.png) -Schedule tasks with at. - -### 5. Running A Linux Command 'AT' A Specific Time ### - -The 'nohup' command is good if you are connected to an SSH server and you want the command to remain running after logging out of the SSH session. - -Imagine you want to run that same command at a specific point in time. - -The 'at' command allows you to do just that. 'at' can be used as follows. - - at 10:38 PM Fri - at> cowsay 'hello' - at> CTRL + D - -The above command will run the program [cowsay][5] at 10:38 PM on Friday evening. - -The syntax is 'at' followed by the date and time to run. - -When the at> prompt appears enter the command you want to run at the specified time. - -The CTRL + D returns you to the cursor. - -There are lots of different date and time formats and it is worth checking the man pages for more ways to use 'at'. - -![](http://f.tqn.com/y/linux/1/L/l/J/1/manmost.png) - -### 6. Man Pages ### - -Man pages give you an outline of what commands are supposed to do and the switches that can be used with them. - -The man pages are kind of dull on their own. (I guess they weren't designed to excite us). - -You can however do things to make your usage of man more appealing. - - export PAGER=most - -You will need to install 'most; for this to work but when you do it makes your man pages more colourful. - -You can limit the width of the man page to a certain number of columns using the following command: - - export MANWIDTH=80 - -Finally, if you have a browser available you can open any man page in the default browser by using the -H switch as follows: - - man -H - -Note this only works if you have a default browser set up within the $BROWSER environment variable. - -![View Processes With htop.](http://f.tqn.com/y/linux/1/L/r/J/1/nohup2.png) -View Processes With htop. - -### 7. Use htop To View And Manage Processes ### - -Which command do you currently use to find out which processes are running on your computer? My bet is that you are using '[ps][6]' and that you are using various switches to get the output you desire. - -Install '[htop][7]'. It is definitely a tool you will wish that you installed earlier. - -htop provides a list of all running processes in the terminal much like the file manager in Windows. - -You can use a mixture of function keys to change the sort order and the columns that are displayed. You can also kill processes from within htop. - -To run htop simply type the following into the terminal window: - - htop - -![Command Line File Manager - Ranger.](http://f.tqn.com/y/linux/1/L/s/J/1/ranger.png) -Command Line File Manager - Ranger. - -### 8. Navigate The File System Using ranger ### - -If htop is immensely useful for controlling the processes running via the command line then [ranger][8] is immensely useful for navigating the file system using the command line. - -You will probably need to install ranger to be able to use it but once installed you can run it simply by typing the following into the terminal: - - ranger - -The command line window will be much like any other file manager but it works left to right rather than top to bottom meaning that if you use the left arrow key you work your way up the folder structure and the right arrow key works down the folder structure. - -It is worth reading the man pages before using ranger so that you can get used to all keyboard switches that are available. - -![Cancel Linux Shutdown.](http://f.tqn.com/y/linux/1/L/t/J/1/shutdown.png) -Cancel Linux Shutdown. - -### 9. Cancel A Shutdown ### - -So you started the [shutdown][9] either via the command line or from the GUI and you realised that you really didn't want to do that. - - shutdown -c - -Note that if the shutdown has already started then it may be too late to stop the shutdown. - -Another command to try is as follows: - -- [pkill][10] shutdown - -![Kill Hung Processes With XKill.](http://f.tqn.com/y/linux/1/L/u/J/1/killhungprocesses.png) -Kill Hung Processes With XKill. - -### 10. Killing Hung Processes The Easy Way ### - -Imagine you are running an application and for whatever reason it hangs. - -You could use 'ps -ef' to find the process and then kill the process or you could use 'htop'. - -There is a quicker and easier command that you will love called [xkill][11]. - -Simply type the following into a terminal and then click on the window of the application you want to kill. - - xkill - -What happens though if the whole system is hanging? - -Hold down the 'alt' and 'sysrq' keys on your keyboard and whilst they are held down type the following slowly: - -- [REISUB][12] - -This will restart your computer without having to hold in the power button. - -![youtube-dl.](http://f.tqn.com/y/linux/1/L/v/J/1/youtubedl2.png) -youtube-dl. - -### 11. Download Youtube Videos ### - -Generally speaking most of us are quite happy for Youtube to host the videos and we watch them by streaming them through our chosen media player. - -If you know you are going to be offline for a while (i.e. due to a plane journey or travelling between the south of Scotland and the north of England) then you may wish to download a few videos onto a pen drive and watch them at your leisure. - -All you have to do is install youtube-dl from your package manager. - -You can use youtube-dl as follows: - - youtube-dl url-to-video - -You can get the url to any video on Youtube by clicking the share link on the video's page. Simply copy the link and paste it into the command line (using the shift + insert shortcut). - -### Summary ### - -I hope that you found this list useful and that you are thinking "i didn't know you could do that" for at least 1 of the 11 items listed. - --------------------------------------------------------------------------------- - -via: http://linux.about.com/od/commands/tp/11-Linux-Terminal-Commands-That-Will-Rock-Your-World.htm - -作者:[Gary Newell][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linux.about.com/bio/Gary-Newell-132058.htm -[1]:http://linux.about.com/cs/linux101/g/sudo.htm -[2]:http://linux.about.com/library/cmd/blcmdl1_nohup.htm -[3]:http://linux.about.com/od/mobiledevicesother/a/Raspberry-Pi-Computer-Running-Linux.htm -[4]:http://linux.about.com/od/commands/l/blcmdl1_ssh.htm -[5]:http://linux.about.com/cs/linux101/g/cowsay.htm -[6]:http://linux.about.com/od/commands/l/blcmdl1_ps.htm -[7]:http://www.linux.com/community/blogs/133-general-linux/745323-5-commands-to-check-memory-usage-on-linux -[8]:http://ranger.nongnu.org/ -[9]:http://linux.about.com/od/commands/l/blcmdl8_shutdow.htm -[10]:http://linux.about.com/library/cmd/blcmdl1_pkill.htm -[11]:http://linux.about.com/od/funnymanpages/a/funman_xkill.htm -[12]:http://blog.kember.net/articles/reisub-the-gentle-linux-restart/ From dc6c4e331cf37f3312b8b362b0e6af4be32bde72 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 1 Apr 2015 23:47:26 +0800 Subject: [PATCH 0434/2517] Update 20150318 11 Linux Terminal Commands That Will Rock Your World.md --- ... 11 Linux Terminal Commands That Will Rock Your World.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md index b2d12d638d..4d67a4c681 100644 --- a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md +++ b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md @@ -24,7 +24,11 @@ Linux的快捷键。 sudo apt-get intall programname -如你所见,命令中存在拼写错误,为了正常执行需要把“intall”替换成“install”。想象现在光标正在行末,我们有很多的方法将她退回单词install并替换它。我可以按两次ALT+B这样光标就会在如下的位置(这里用^代替光标的位置)。 +如你所见,命令中存在拼写错误,为了正常执行需要把“intall”替换成“install”。 + +想象现在光标正在行末,我们有很多的方法将她退回单词install并替换它。 + +我可以按两次ALT+B这样光标就会在如下的位置(这里用^代替光标的位置)。 sudo apt-get^intall programname From 3683e979e7fdd5c57fee6596b541539e980ff507 Mon Sep 17 00:00:00 2001 From: martin qi Date: Wed, 1 Apr 2015 23:49:47 +0800 Subject: [PATCH 0435/2517] Update 20150318 11 Linux Terminal Commands That Will Rock Your World.md --- ...18 11 Linux Terminal Commands That Will Rock Your World.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md index 4d67a4c681..fce6ed5c80 100644 --- a/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md +++ b/translated/tech/20150318 11 Linux Terminal Commands That Will Rock Your World.md @@ -72,7 +72,9 @@ sudo !!就会用sudo的形式运行上一条命令。所以上一条命令可以 sudo nano abc.txt -文件编辑到一半你意识到你需要马上在终端输入些命令,但是nano在前台运行让你不能输入。你一定认为唯一的方法就是保存文件,推出nano,运行命令以后在重新打开nano。 +文件编辑到一半你意识到你需要马上在终端输入些命令,但是nano在前台运行让你不能输入。 + +你可能觉得唯一的方法就是保存文件,推出nano,运行命令以后在重新打开nano。 其实你只要按CTRL + Z前台的命令就会暂停,画面就切回到命令行了。然后你就能运行你想要运行命令,等命令运行完后在终端窗口输入“fg”就可以回到先前暂停的任务。 From 90625cf06b1a83af04d91e9a613726269b785209 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 2 Apr 2015 00:07:14 +0800 Subject: [PATCH 0436/2517] PUB:20150318 Fedora GNOME Keyboard Shortcuts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @martin2011qi 下回记得文末的译者处写上你的 id 哦。 --- ...0150318 Fedora GNOME Keyboard Shortcuts.md | 135 +++++++++--------- 1 file changed, 71 insertions(+), 64 deletions(-) rename {translated/tech => published}/20150318 Fedora GNOME Keyboard Shortcuts.md (69%) diff --git a/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md b/published/20150318 Fedora GNOME Keyboard Shortcuts.md similarity index 69% rename from translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md rename to published/20150318 Fedora GNOME Keyboard Shortcuts.md index 4210289b6d..75fdf0916e 100644 --- a/translated/tech/20150318 Fedora GNOME Keyboard Shortcuts.md +++ b/published/20150318 Fedora GNOME Keyboard Shortcuts.md @@ -1,14 +1,15 @@ -Fedora GNOME快捷键 +Fedora GNOME 的常用快捷键 ================================================================================ -在Fedora,为了获得最好的[GNOME桌面] [1]体验,你需要了解并掌握一些驾驭系统的快捷键。 +在Fedora中,为了获得最好的[GNOME桌面][1]体验,你需要了解并掌握一些驾驭系统的快捷键。 这篇文章将列举我们日常使用中使用频率最高的快捷键。 -![GNOME Keyboard Shortcuts - The Super Key. ](http://f.tqn.com/y/linux/1/L/o/K/1/gnomekeyboardshortcut1.png) -GNOME 快捷键 - super键. - #### 1. Super键 #### +![GNOME Keyboard Shortcuts - The Super Key. ](http://f.tqn.com/y/linux/1/L/o/K/1/gnomekeyboardshortcut1.png) + +*GNOME 快捷键 - super键* + [“super”键][2]是如今驾驭操作系统的好朋友。 在传统的笔记本电脑中“super”键坐落于最后一列就在“alt”键的旁边(就是徽标键)。 @@ -17,116 +18,122 @@ GNOME 快捷键 - super键. 同时按下 "ALT" 和"F1"一样可以达到这样的效果。 -![GNOME Run Command.](http://f.tqn.com/y/linux/1/L/p/K/1/runcommand.png) -GNOME 指令运行. +### 2. 如何快速执行一条命令 ### -### 2. 如何快速执行一条指令 ### +![GNOME Run Command.](http://f.tqn.com/y/linux/1/L/p/K/1/runcommand.png) + +*GNOME 运行某命令* 如果你需要快速的执行一条指令,你可以按下"ALT"+"F2",这样就会出现指令运行对话框了。 -你就可以在窗口中输入你想要执行的指令了,回车执行。 - -![TAB Through Applications.](http://f.tqn.com/y/linux/1/L/q/K/1/tabthroughwindows.png) -使用TAB在应用中切换。 +现在你就可以在窗口中输入你想要执行的指令了,回车执行。 ### 3. 快速切换到另一个打开的应用 ### -就像微软的Windows一样你可以使用"ALT"和"TAB" 的组合键在应用程序之间切换。 +![TAB Through Applications.](http://f.tqn.com/y/linux/1/L/q/K/1/tabthroughwindows.png) -在一些键盘上tab键是这样的**|<- ->|**而有些则是简单的"TAB"字母。 +*使用TAB在应用中切换* -GNOME应用间切换随着你的切换显示的是简单的图标和应用的名字 +就像在微软的Windows下一样你可以使用"ALT"和"TAB" 的组合键在应用程序之间切换。 -如果你按下"shift"+"tab"将反过来切换应用。 +在一些键盘上tab键上画的是这样的**|<- ->|**,而有些则是简单的"TAB"字母。 -![Switch Windows In The Same Application.](http://f.tqn.com/y/linux/1/L/r/K/1/switchwindowsinsameapplication.png) -在应用中切换不同窗口。 +GNOME应用切换器随着你的切换,显示简单的图标和应用的名字。 + +如果你按下"shift"+"tab"将以反序切换应用。 ### 4. 在同一应用中快速切换不同的窗口 ### +![Switch Windows In The Same Application.](http://f.tqn.com/y/linux/1/L/r/K/1/switchwindowsinsameapplication.png) + +*在应用中切换不同窗口* + 如果你像我一样经常打开五六个Firefox。 -你已经知道通过"Alt"+"Tab"实现应用间的切换。 +你已经知道通过"Alt"+"Tab"实现应用间的切换。有两种方法可以在同一个应用中所有打开的窗口中切换。 -有两种方法可以在同应用中所有打开的窗口中切换。 +第一种是按"Alt"+"Tab"让选框停留在你所要切换窗口的应用图标上。短暂的停留等到下拉窗口出现你就能用鼠标选择窗口了。 -第一种是按"Alt"+"Tab"让选框停留在你所要切换窗口的应用图标上。短暂的停留等到下拉窗出现你就能用鼠标选择窗口了。 +第二种也是比较推荐的方式是按"Alt"+"Tab"让选框停留在你所要切换窗口的应用图标上,然后按"super"+"`"在此应用打开的窗口间切换。 -第二种也是比较推荐的方式是按"Alt"+"Tab"让选框停留在你所要切换窗口的应用图标上然后按"super"+"`"在此应用打开的窗口间切换。 +**注释:"\`"就是tab键上面的那个键。无论你使用的那种键盘排布,用于切换的键一直都是tab上面的那个键,所以也有可能不是"\`"键。** -**注释"\`"就是tab键上面的那个键。用于切换的键一直都是tab上面的那个键,无论你使用的那种键盘排布,也有可能不是"`"键。** - -如果你的手很灵活(或者是我称之为的忍者手)那你也可以同时按"shift", "`"和"super"键来反向切换窗口。 - -![Switch Keyboard Focus.](http://f.tqn.com/y/linux/1/L/s/K/1/switchkeyboardfocus.png) -切换键盘焦点。 +如果你的手很灵活(或者是我称之为忍者手的)那你也可以同时按"shift", "\`"和"super"键来反向切换窗口。 ### 5. 切换键盘焦点 ### +![Switch Keyboard Focus.](http://f.tqn.com/y/linux/1/L/s/K/1/switchkeyboardfocus.png) + +*切换键盘焦点* + 这个键盘快捷键并不是必须掌握的,但是还是最好掌握。 如若你想将输入的焦点放到搜索栏或者一个应用窗口上,你可以同时按下"CTRL", "ALT"和"TAB",这样就会出现一个让你选择切换区域的列表。 然后就可以按方向键做出选择了。 -![Show All Applications.](http://f.tqn.com/y/linux/1/L/t/K/1/showapplications.png) -显示所有应用程序。 - ### 6. 显示所有应用程序列表 ### +![Show All Applications.](http://f.tqn.com/y/linux/1/L/t/K/1/showapplications.png) + +*显示所有应用程序* + 如果恰巧最后一个应用就是你想要找的,那么这样做真的会帮你省很多时间。 -按"super"和"A"键来快速浏览这个包含你系统上所有应用的列表。 - -![Switch Workspaces.](http://f.tqn.com/y/linux/1/L/u/K/1/switchworkspaces.png) -切换工作区。 +按"super"和"A"键来快速切换到这个包含你系统上所有应用的列表上。 ### 7. 切换工作区 ### +![Switch Workspaces.](http://f.tqn.com/y/linux/1/L/u/K/1/switchworkspaces.png) + +*切换工作区* + 如果你已经使用linux有一段时间了,那么这种[多工作区切换][3]的工作方式一定深得你心了吧。 -举个例子,你在第一个工作区里做开发,第二个中浏览网页而把你邮件的客户端开在第三个工作区中。 +举个例子,你在第一个工作区里做开发,第二个之中浏览网页,而把你邮件的客户端开在第三个工作区中。 -工作区切换你可以使用"super"+"Page Up" (PGUP)键朝一个方向切,也可以按"super"+"Page Down" (PGDN)键朝另一个方向切。 +工作区切换你可以使用"super"+"Page Up" (向上翻页)键朝一个方向切,也可以按"super"+"Page Down" (向下翻页)键朝另一个方向切。 还有一个比较麻烦的备选方案就是按"super"显示打开的应用,然后在屏幕的右侧选择你所要切换的工作区。 -![Move Application To Another Workspace.](http://f.tqn.com/y/linux/1/L/v/K/1/movetoanewworkspace.png) -将应用移至另一个工作区。 - ### 8. 将一些项目移至一个新的工作区 ### -如果这个工作区已经被搞得杂乱无章了没准你会想将手头的应用转到一个全新的工作区,请按组合键"super", "shift"和"page up"或"super", "shift"和"page down" key。 +![Move Application To Another Workspace.](http://f.tqn.com/y/linux/1/L/v/K/1/movetoanewworkspace.png) + +*将应用移至另一个工作区* + +如果这个工作区已经被搞得杂乱无章了,没准你会想将手头的应用转到一个全新的工作区,请按组合键"super", "shift"和"page up"或"super", "shift"和"page down" 键。 备选方案按"super"键,然后在应用列表中找到你想要移动的应用拖到屏幕右侧的工作区。 +### 9. 显示信息托盘 ### + ![Show The Message Tray.](http://f.tqn.com/y/linux/1/L/w/K/1/showmessagetray.png) -显示信息栏。 -### 9. 显示信息栏 ### +*显示信息托盘* -消息栏会提供一些通知。 - -按"super"+"M"呼出消息栏。 +消息托盘会提供一个通知列表。按"super"+"M"呼出消息托盘。 备选方法是鼠标移动到屏幕右下角。 -![Lock The Screen.](http://f.tqn.com/y/linux/1/L/x/K/1/lockscreen.png) -锁屏。 - ### 10. 锁屏 ### +![Lock The Screen.](http://f.tqn.com/y/linux/1/L/x/K/1/lockscreen.png) + +*锁屏* + 想要休息一会喝杯咖啡?不想误触键盘? 无论何时只要离开你的电脑应该习惯性的按下"super"+"L"锁屏。 解锁方法是从屏幕的下方向上拽,输入密码即可。 -![Control Alt Delete Within Fedora.](http://f.tqn.com/y/linux/1/L/y/K/1/poweroff.png) -Fedora中Control+Alt+Delete - ### 11. 关机 ### +![Control Alt Delete Within Fedora.](http://f.tqn.com/y/linux/1/L/y/K/1/poweroff.png) + +*Fedora中Control+Alt+Delete* + 如果你曾是windows的用户,你一定记得著名的三指快捷操作CTRL+ALT+DELETE。 如果在键盘上同时按下CTRL+ALT+DELETE,Fedora就会弹出一则消息,提示你的电脑将在60秒后关闭。 @@ -158,18 +165,17 @@ Fedora中Control+Alt+Delete [录制的内容][4]将以[webm][5]格式保存于当前用户家目录下的录像文件夹中。 -![Put Windows Side By Side.](http://f.tqn.com/y/linux/1/L/z/K/1/splitwindows.png) -并排显示窗口。 - ### 14. 并排显示窗口 ### +![Put Windows Side By Side.](http://f.tqn.com/y/linux/1/L/z/K/1/splitwindows.png) + +*并排显示窗口* + 你可以将一个窗口靠左占满左半屏,另一个窗口靠右占满右半屏,让两个窗口并排显示。 -也可以按"Super"+"←"让当前应用占满左半屏。 +也可以按"Super"+"←"(左箭头)让当前应用占满左半屏。按"Super"+"→"(右箭头)让当前应用占满右半屏。 -按"Super"+"→"让当前应用占满右半屏。 - -### 15. 窗口的最大化, 最小化和恢复 ### +### 15. 窗口的最大化,最小化和恢复 ### 双击标题栏可以最大化窗口。 @@ -177,11 +183,12 @@ Fedora中Control+Alt+Delete 右键菜单选择"最小化"就可以最小化了。 -![GNOME Keyboard Shortcut Cheat Sheet. ](http://f.tqn.com/y/linux/1/L/-/L/1/gnomekeyboardshortcuts.png) -GNOME快捷键速查表。 - ### 16. 总结 ### +![GNOME Keyboard Shortcut Cheat Sheet. ](http://f.tqn.com/y/linux/1/L/-/L/1/gnomekeyboardshortcuts.png) + +*GNOME快捷键速查表* + 我做了一份快捷键速查表,你可以打印出来贴在墙上,这样一定能够更快上手。 当你掌握了这些快捷键后,你一定会感慨这个桌面环境使用起来是如此的顺手。 @@ -196,8 +203,8 @@ GNOME快捷键速查表。 via: http://linux.about.com/od/howtos/tp/Fedora-GNOME-Keyboard-Shortcuts.htm 作者:[Gary Newell][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 262548fcce7bf0e1a30b166caad75d24ea7889db Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 2 Apr 2015 08:27:25 +0800 Subject: [PATCH 0437/2517] translating --- ...inux FAQs with Answers--How to upgrade Docker on Ubuntu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md b/sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md index c31af4675c..f24963eee3 100644 --- a/sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md +++ b/sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md @@ -1,3 +1,5 @@ +Translating----geekpi + Linux FAQs with Answers--How to upgrade Docker on Ubuntu ================================================================================ > **Question**: I installed Docker on Ubuntu using its standard repositories. However, the default Docker installation does not meet the version requirement for my another application that relies on Docker. How can I upgrade Docker to the latest version on Ubuntu? @@ -32,4 +34,4 @@ via: http://ask.xmodulo.com/upgrade-docker-ubuntu.html 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://ask.xmodulo.com/author/nanni \ No newline at end of file +[a]:http://ask.xmodulo.com/author/nanni From 8e75858230d247a6bb3ae3f8691731c52cd4c696 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 2 Apr 2015 08:39:52 +0800 Subject: [PATCH 0438/2517] translated --- ...nswers--How to upgrade Docker on Ubuntu.md | 37 ------------------- ...nswers--How to upgrade Docker on Ubuntu.md | 35 ++++++++++++++++++ 2 files changed, 35 insertions(+), 37 deletions(-) delete mode 100644 sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md create mode 100644 translated/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md diff --git a/sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md b/sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md deleted file mode 100644 index f24963eee3..0000000000 --- a/sources/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md +++ /dev/null @@ -1,37 +0,0 @@ -Translating----geekpi - -Linux FAQs with Answers--How to upgrade Docker on Ubuntu -================================================================================ -> **Question**: I installed Docker on Ubuntu using its standard repositories. However, the default Docker installation does not meet the version requirement for my another application that relies on Docker. How can I upgrade Docker to the latest version on Ubuntu? - -Since Docker was first released in 2013, it has been fast evolving into a full-blown open platform for distributed applications. To meet the industry's expection, Docker is being aggressively developed and constantly upgraded with new features. Chances are that the stock Docker that comes with your Ubuntu distribution is quickly outdated. For example, Ubuntu 14.10 Utopic comes with Docker version 1.2.0, while the latest Docker version is 1.5.0. - -![](https://farm9.staticflickr.com/8730/16351300024_9acb9086da_b.jpg) - -For those of you who want to stay up-to-date with Docker's latest developments, Canonical maintains a separate PPA for Docker. Using this PPA repository, you can easily upgrade Docker to the latest version on Ubuntu. - -Here is how to set up Docker PPA and upgrade Docker. - - $ sudo add-apt-repository ppa:docker-maint/testing - $ sudo apt-get update - $ sudo apt-get install docker.io - -Now check the version of installed Docker: - - $ docker --version - ----------- - - Docker version 1.5.0-dev, build a78ce5c - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/upgrade-docker-ubuntu.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni diff --git a/translated/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md b/translated/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md new file mode 100644 index 0000000000..8d993c1c47 --- /dev/null +++ b/translated/tech/20150330 Linux FAQs with Answers--How to upgrade Docker on Ubuntu.md @@ -0,0 +1,35 @@ +Linux有问必答-- 如何在Ubuntu中升级Docker +================================================================================ +> **提问**: 我使用了Ubuntu的标准仓库安装了Docker。然而,默认安装的Docker不能满足我另外一个依赖Docker程序的版本需要。我该如何在Ubuntu中升级到Docker的最新版本? + +Docker第一次在2013年发布,它快速地演变成了一个针对分布式程序的开发平台。为了满足工业期望,Docker正在紧密地开发并持续地带来新特性的升级。这样Ubuntu发行版中的Docker版本可能很快就会过时。比如,, Ubuntu 14.10 Utopic 中的Docker版本是1.2.0, 然而最新的Docker版本是1.5.0。 + +![](https://farm9.staticflickr.com/8730/16351300024_9acb9086da_b.jpg) + +对于那些想要跟随Docker的最新开发的人而言,Canonical为Docker维护了一个独立的PPA。使用这个PPA仓库,你可以很容易地在Ubuntu上升级到最新的Docker版本。 + +下面是如何设置Docker的PPA和升级Docker。 + + $ sudo add-apt-repository ppa:docker-maint/testing + $ sudo apt-get update + $ sudo apt-get install docker.io + +检查安装的Docker版本: + + $ docker --version + +---------- + + Docker version 1.5.0-dev, build a78ce5c + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/upgrade-docker-ubuntu.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni From 667bce6d75fbf7d39cad7d2d9e6ed20c885dd5f7 Mon Sep 17 00:00:00 2001 From: KevinSJ Date: Wed, 1 Apr 2015 22:12:04 -0500 Subject: [PATCH 0439/2517] Update 20150323 Papyrus--An Open Source Note Manager.md --- sources/share/20150323 Papyrus--An Open Source Note Manager.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150323 Papyrus--An Open Source Note Manager.md b/sources/share/20150323 Papyrus--An Open Source Note Manager.md index eda13551a8..f5caf02c56 100644 --- a/sources/share/20150323 Papyrus--An Open Source Note Manager.md +++ b/sources/share/20150323 Papyrus--An Open Source Note Manager.md @@ -1,3 +1,4 @@ +KevinSJ Translating Papyrus: An Open Source Note Manager ================================================================================ ![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_4.jpeg) @@ -54,4 +55,4 @@ via: http://itsfoss.com/papyrus-open-source-note-manager/ [1]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ [2]:http://aseman.co/en/products/papyrus/ [3]:https://github.com/sialan-labs/kaqaz/ -[4]:http://aseman.co/en/products/papyrus/ \ No newline at end of file +[4]:http://aseman.co/en/products/papyrus/ From 358ebe437a1a8b2a4f0e9458d9001d294ea5b466 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Thu, 2 Apr 2015 00:41:00 -0500 Subject: [PATCH 0440/2517] Delete 20150323 Papyrus--An Open Source Note Manager.md --- ...23 Papyrus--An Open Source Note Manager.md | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 sources/share/20150323 Papyrus--An Open Source Note Manager.md diff --git a/sources/share/20150323 Papyrus--An Open Source Note Manager.md b/sources/share/20150323 Papyrus--An Open Source Note Manager.md deleted file mode 100644 index f5caf02c56..0000000000 --- a/sources/share/20150323 Papyrus--An Open Source Note Manager.md +++ /dev/null @@ -1,58 +0,0 @@ -KevinSJ Translating -Papyrus: An Open Source Note Manager -================================================================================ -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_4.jpeg) - -In last post, we saw an [open source to-do app Go For It!][1]. In a similar article, today we’ll see an **open source note taking application Papyrus**. - -[Papyrus][2] is a fork of [Kaqaz note manager][3] and is built on QT5. It brings a clean, polished user interface and is security focused (as it claims). Emphasizing on simplicity, I find Papyrus similar to OneNote. You organize your notes in ‘paper’ and add them a label for grouping those papers. Simple enough! - -### Papyrus features: ### - -Though Papyrus focuses on simplicity, it still has plenty of features up its sleeves. Some of the main features are: - -- Note management with labels and categories -- Advanced search options -- Touch mode available -- Full screen option -- Back up to Dropbox/hard drive/external -- Password protection for selective papers -- Sharing papers with other applications -- Encrypted synchronization via Dropbox -- Available for Android, Windows and OS X apart from Linux - -### Install Papyrus ### - -Papyrus has APK available for Android users. There are installer files for Windows and OS X. Linux users can get source code of the application. Ubuntu and other Ubuntu based distributions can use the .deb packages. Based on your OS and preference, you can get the respective files from the Papyrus download page: - -- [Download Papyrus][4] - -### Screenshots ### - -Here are some screenshots of the application: - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_3-700x450_c.jpeg) - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_2-700x450_c.jpeg) - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_1-700x450_c.jpeg) - -![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux-700x450_c.jpeg) - -Give Papyrus a try and see if you like it. Do share your experience with it with the rest of us here. - --------------------------------------------------------------------------------- - -via: http://itsfoss.com/papyrus-open-source-note-manager/ - -作者:[Abhishek][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://itsfoss.com/author/abhishek/ -[1]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ -[2]:http://aseman.co/en/products/papyrus/ -[3]:https://github.com/sialan-labs/kaqaz/ -[4]:http://aseman.co/en/products/papyrus/ From 21172989196edf11d47a8417bfd2a20b00380f45 Mon Sep 17 00:00:00 2001 From: Kevin Sicong Jiang Date: Thu, 2 Apr 2015 00:43:42 -0500 Subject: [PATCH 0441/2517] Create 20150323 Papyrus--An Open Source Note Manager.md --- ...23 Papyrus--An Open Source Note Manager.md | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 translated/share/20150323 Papyrus--An Open Source Note Manager.md diff --git a/translated/share/20150323 Papyrus--An Open Source Note Manager.md b/translated/share/20150323 Papyrus--An Open Source Note Manager.md new file mode 100644 index 0000000000..87c80fa0ac --- /dev/null +++ b/translated/share/20150323 Papyrus--An Open Source Note Manager.md @@ -0,0 +1,61 @@ +Papyrus:开源笔记管理工具 +================================================================================ +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_4.jpeg) + +在上一篇帖子中,我们介绍了[任务管理软件Go For It!][1].今天我们将介绍一款名为**Papyrus的开源笔记软件** + +[Papyrus][2] 是[Kaqaz笔记管理][3]的变体并使用了QT5.它不仅有简洁、易用的界面,还具备了较好的安全性。由于强调简洁,我觉得Papyrus与OneNote比较相像。你可以将你的笔记像"纸张"一样分类整理,还可以给他们添加标签进行分组。够简单的吧! + +### Papyrus的功能: ### + +## Papyrus的功能: ### + +虽然Papyrus强调简洁,它依然有很多丰富的功能。他的一些主要功能如下: +- 按类别和标签管理笔记 +- 高级搜索选项 +- 触屏模式 +- 全屏选项 +- 备份至Dropbox/硬盘 +- 某些页面允许加密 +- 可与其他软件共享笔记 +- 与Dropbox加密同步 +- 除Linux外,还可在Android,Windows和OS X使用 + +### Install Papyrus ### + +Papyrus为Android用户提供了APK安装包。Windows和OS X也有安装文件。Linux用户还可以获取程序的源码。使用Ubuntu及其他基于Ubuntu的发行版可以使用.deb包进行安装。根据你的系统及习惯,你可以从Papyrus的下载页面中获取不同的文件: + +- [下载 Papyrus][4] + +### 软件截图 ### + +以下是此软件的一些截图: + + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_3-700x450_c.jpeg) + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_2-700x450_c.jpeg) + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux_1-700x450_c.jpeg) + +![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2015/03/Papyrus_Linux-700x450_c.jpeg) + +试试Papyrus吧,你会喜欢上它的。 + +(译者注;此软件暂无中文版) + +-------------------------------------------------------------------------------- + +via: http://itsfoss.com/papyrus-open-source-note-manager/ + +作者:[Abhishek][a] +译者:[KevinSJ](https://github.com/KevinSJ) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://itsfoss.com/author/abhishek/ +[1]:http://itsfoss.com/go-for-it-to-do-app-in-linux/ +[2]:http://aseman.co/en/products/papyrus/ +[3]:https://github.com/sialan-labs/kaqaz/ +[4]:http://aseman.co/en/products/papyrus/ From ea988e9a0cb20eff4a93611d0a76a67760a62155 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 2 Apr 2015 18:01:02 +0800 Subject: [PATCH 0442/2517] Translating by ZTinoZ --- ...0150324 How to Host Open Source Code Repository in github.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md index 20253f476c..e9ff764434 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -38,7 +38,7 @@ ### 3. 上传一个已有项目 ### -If we want to share our existing project on Github, we'll surely need to push the codes to the repository we created. To do so, we'll first need to install git in our Linux machine. As I am running Ubuntu 14.04 LTS in my machine, I'll need to run **apt** manger to install it. +如果我们想在Github上分享我们的项目,我们自然要把代码推上我们创建的库中。想要这样的话,我们首先要在我们的Linux机器上安装git。如果As I am running Ubuntu 14.04 LTS in my machine, I'll need to run **apt** manger to install it. $ sudo apt-get install git From 5f38358c5ca44d30c9abbf850de484354bc524eb Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Thu, 2 Apr 2015 18:31:41 +0800 Subject: [PATCH 0443/2517] =?UTF-8?q?20150402-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...The VirtualBox 5.0 beta is finally here.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 sources/news/20150402 The VirtualBox 5.0 beta is finally here.md diff --git a/sources/news/20150402 The VirtualBox 5.0 beta is finally here.md b/sources/news/20150402 The VirtualBox 5.0 beta is finally here.md new file mode 100644 index 0000000000..475ef2f811 --- /dev/null +++ b/sources/news/20150402 The VirtualBox 5.0 beta is finally here.md @@ -0,0 +1,35 @@ +The VirtualBox 5.0 beta is finally here +======================================= +**Oracle's desktop virtualization software gets its first major point revision in almost five years, but the changes are more evolutionary than revolutionary.** + +VirtualBox, the open source virtualization system originally created by Sun and now under Oracle's stewardship, has released its first revision to the left of the decimal point in nearly five years. + +Don't expect anything truly revolutionary, though, judging from the release notes for and the behavior of the beta itself. With this release, VirtualBox picks up a bit more polish, both visually and technologically, but its main advantage over VMware remains with its offer of a free incarnation of many of the same core features. + +The last major version of VirtualBox 4.0 was released in December 2010, and it delivered a heavily reworked version of the program with a new GUI, new virtual hardware, and a reorganized project design. But the pace of major releases for the project was slow, with the last major release (version 4.3) arriving in late 2013. Everything since then has been officially designated as a "maintenance" release. + +**VirtualBox 5.0** + +*The first beta of VirtualBox 5.0 adds features like the ability to edit the menus and shortcut icons for VM windows, as shown here.* + +Among the biggest changes for VirtualBox 5.0 is support for more instruction set extensions that run with hardware-assisted virtualization. The AES-NI instruction set, typically used for hardware acceleration of encryption, and the SSE 4.1 and SSE 4.2 instructions sets were included among them. Also new is paravirtualization support for Windows and Linux guests, a new architecture for abstracting host audio, and support for USB 3 (xHCI) controller in guests. + +Most of the usability updates are improvements to the VirtualBox GUI. One big change is the ability to customize the menus and the toolbar for individual virtual machines so that little- or never-used options can be removed entirely. Another major addition is the ability to encrypt virtual volumes from within the VirtualBox interface, rather than relying on the guest OS's own disk-encryption system (assuming it has one). + +Oracle warns that this is beta software and should be treated accordingly. Sure enough, the main GUI and the guest OS windows all sport black-and-red Beta warnings in one corner. But a Windows 10 VM created with the previous VirtualBox release (4.3.26) booted and ran fine, and the 5.0 version of the VirtualBox Guest Additions -- for better video support, bidirectional copy and paste, and other features -- installed without issues. (Fixes to better support Windows 10 have been showing up since version 4.3.18.) + +No word has been given yet on when the final version of 5.0 will be out, but Oracle [encourages users][1] to download and try out the beta -- in a nonproduction environment -- and file bug reports with their [beta feedback forum][2]. + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2905098/virtualization/oracle-virtualbox-5-0-beta-is-finally-here.html + +作者:[Serdar Yegulalp][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Serdar-Yegulalp/ +[1]:https://forums.virtualbox.org/viewtopic.php?f=15&t=66904 +[2]:https://forums.virtualbox.org/viewforum.php?f=15 From 50594ef1f672b7f489fadb844d72b0b1a298afe0 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Thu, 2 Apr 2015 18:31:53 +0800 Subject: [PATCH 0444/2517] [Translated] 20150316 How to access Gmail from the command line on Linux with Alpine.md --- ...m the command line on Linux with Alpine.md | 105 ------------------ ...m the command line on Linux with Alpine.md | 103 +++++++++++++++++ 2 files changed, 103 insertions(+), 105 deletions(-) delete mode 100644 sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md create mode 100644 translated/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md diff --git a/sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md b/sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md deleted file mode 100644 index 498cd2c827..0000000000 --- a/sources/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md +++ /dev/null @@ -1,105 +0,0 @@ -FSSlc translating - -How to access Gmail from the command line on Linux with Alpine -================================================================================ -If you are a command-line lover, I am sure that you welcome with open arms any tool that allows you to perform at least one of your daily tasks using that powerful work environment, e.g., from [scheduling appointments][1] and [managing finances][2] to accessing [Facebook][3] and [Twitter][4]. - -In this post I will show you yet another pretty neat use case of Linux command-line: **accessing Google's Gmail service**. To do so, we are going to use Alpine, a versatile ncurses-based, command-line email client (not to be confused with Alpine Linux). We will configure Gmail's IMAP and SMTP settings in Alpine to receive and send email messages via Google mail servers in a terminal environment. At the end of this tutorial, you will realize that it will only take a few minimum steps to use any other mail servers in Alpine. - -Granted there are already outstanding GUI-based email clients such as Thunderbird, Evolution or even web interface. So why would anyone be interested in using a command-line email client to access Gmail? The answer is simple. You need to get something done quickly and want to avoid using system resources unnecessarily. Or you are accessing a minimal headless server that does not have the X server installed. Or the X server on your desktop crashed, and you need to send emails urgently before fixing it. In all these situations Alpine can come in handy and get you going in no time. - -Beyond simple editing, sending and receiving of text-based email messages, Alpine is able to encrypt, decrypt, and digitally sign email messages, and integrate seamlessly with TLS. - -### Installing Alpine on Linux ### - -In Red Hat-based distributions, install Alpine as follows. Note that on RHEL/CentOS, you need to enable [EPEL repository][5] first. - - # yum install alpine - -In Debian, Ubuntu or their derivatives, you will do: - - # aptitude install alpine - -After the installation is complete, you can launch the email client by running: - - # alpine - -The first time you run alpine, it will create a mail directory for the current user inside his/her home directory (~/mail), and bring up the main interface, as shown in the following screencast. - -注:youtube视频,发布的时候做个链接吧 - - -The user interface has the following sections: - -![](https://farm9.staticflickr.com/8724/16618079590_6c236ce2c2_c.jpg) - -Feel free to browse around a bit in order to become acquainted with Alpine. You can always return to the command prompt by hitting the 'Q' key any time. Note that all screens have context-related help available at the bottom of the screen. - -Before proceeding further, we will create a default configuration file for Alpine. In order to do so, quit Alpine, and execute the following command from the command line: - - # alpine -conf > /etc/pine.conf - -### Configuring Alpine to Use a Gmail Account ### - -Once you have installed Alpine and spent at least a few minutes to feel comfortable with its interface and menus, it's time to actually configure it to use an existing Gmail account. - -Before following these steps in Alpine, remember to enable IMAP in your Gmail settings from the webmail interface. Once IMAP access is enabled in your Gmail account, proceed to the following steps to enable reading Gmail messages on Alpine. - -First, launch Alpine. - -Press 'S' for Setup, and then 'L' for collection lists to define groups of folders to help you better organize your mail: - -![](https://farm8.staticflickr.com/7614/16779579656_690eda419c_o.png) - -Add a new folder by pressing 'A' and fill the required information: - -- **Nickname**: whatever name of your choice. -- **Server**: imap.gmail.com/ssl/user=yourgmailusername@gmail.com - -You may leave Path and View blank. - -Then press Ctrl+X and enter your password when prompted: - -![](https://farm9.staticflickr.com/8611/16618079640_6f7dca336a_b.jpg) - -If everything goes as expected, there should be a new folder named after the nickname that you chose earlier. You should find your Gmail mailboxes there: - -![](https://farm8.staticflickr.com/7598/16804355052_10c1a6c5bd_b.jpg) - -For verification, you can compare the contents of your Alpine's "Gmail Sent" mailbox with those of the web client: - -![](https://farm8.staticflickr.com/7602/16619323939_d2eab3e162_c.jpg) - -By default new mail checking/notification occurs automatically every 150 seconds. You can change this value, along with many others, in the /etc/pine.conf file. This configuration file is heavily commented for clarity. To set the desired mail check interval to 10 seconds, for example, you will need to do: - - # The approximate number of seconds between checks for new mail - mail-check-interval=10 - -Finally, we need to configure an SMTP server to send email messages via Alpine. Go back to the Alpine's setup screen as explained earlier, and press 'C' to set the address of a Google's SMTP server. You will need to edit the value of the SMTP Server (for sending) line as follows: - - smtp.gmail.com:587/tls/user=yourgmailusername@gmail.com - -You will be prompted to save changes when you press 'E' to exit setup. Once you save the changes, you are on your way to sending emails through Alpine! To do that, just go to Compose in the main menu, and start enjoying your Gmail account from the command line. - -### Conclusion ### - -In this post we have discussed how to access Gmail in a terminal environment via a lightweight and powerful command-line email client called Alpine. Alpine is free software released under the Apache Software License 2.0, which is a software license compatible with the GPL. Alpine takes pride in being friendly for new users, yet powerful for seasoned system administrators at the same time. I hope that after reading this article you have come to realize how true that last statement is. - -Feel free to leave your comments or questions using the form below. I look forward to hearing from you! - --------------------------------------------------------------------------------- - -via: http://xmodulo.com/gmail-command-line-linux-alpine.html - -作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://xmodulo.com/author/gabriel -[1]:http://xmodulo.com/schedule-appointments-todo-tasks-linux-terminal.html -[2]:http://xmodulo.com/manage-personal-expenses-command-line.html -[3]:http://xmodulo.com/access-facebook-command-line-linux.html -[4]:http://xmodulo.com/access-twitter-command-line-linux.html -[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html diff --git a/translated/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md b/translated/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md new file mode 100644 index 0000000000..ce347ad4e6 --- /dev/null +++ b/translated/tech/20150316 How to access Gmail from the command line on Linux with Alpine.md @@ -0,0 +1,103 @@ +如何在 Linux 中使用 Alpine 在命令行里获取 Gmail +================================================================================ +假如你是一个命令行爱好者,我很确信你将张开双臂欢迎任何可以使你使用这个强大的工作环境来执行哪怕一项日常任务的工具,例如从 [安排日程][1] 、 [管理财务][2] 到 获取 [Facebook][3] 、[Twitter][4]等任务。 + +在这个帖子中,我将为你展示 Linux 命令行的另一个漂亮干练的使用案例:**获取 Google 的 Gmail 服务**,为此,我们将使用 Alpine,一个基于 ncurses 的多功能命令行邮件客户端(不要和 Alpine Linux 搞混淆)。我们将在 Alphine 中配置 Gmail 的 IMAP 和 SMTP 设定来通过 Google 的邮件服务器在终端环境中收取和发送邮件。在这个教程的最后,你将意识到只需几步就可以在 Alpine 中使用其他的邮件服务。 + +诚然,已有许多卓越的基于 GUI 的邮件客户端存在,例如 Thunderbird, Evolution 或者甚至是 Web 界面,那么为什么还有人对使用命令行的邮件客户端来收取 Gmail 这样的事感兴趣呢?答案很简单。假如你需要快速地处理好事情并想避免使用不必要系统资源;或者你正工作在一个最小化安装(注:这里我感觉自己翻译有误)的服务器上,而它没有安装 X 服务(注:这里也需要更改);又或者是 X 服务在你的桌面上崩溃了,而你需要在解决这个问题之前急切地发送一些邮件。在上述所有的情况下, Alpine 都可以派上用场并在任何时间满足你的需求。 + +除了简单的编辑,发送和接收文本类的邮件信息等功能外, Alpine 还可以进行加密,解密和对邮件信息进行数字签名,以及与 TLS(注:Transport Layer Security) 无缝集成。 + +### 在 Linux 上安装 Alpine ### + +在基于 Red Hat 的发行版本上,可以像下面那样来安装 Alpine。需要注意的是,在 RHEL 或 CentOS 上,你需要首先启用 [EPEL 软件仓库][5]。 + + # yum install alpine + +在 Debian,Ubuntu 或它们的衍生发行版本上,你可以这样做: + + # aptitude install alpine + +在安装完成后,你可以运行下面的命令来启动该邮件客户端: + + # alpine + +在你第一次启用 Alpine 时,它将在当前用户的家目录下创建一个邮件文件夹(`~/mail`),并显现出主界面,正如下面的截屏所显示的那样: + +注:youtube视频,发布的时候做个链接吧(注:这里我不知道该如何操作,不过我已经下载了该视频,如有需要,可以发送) + + +它的用户界面有下列几个模块: + +![](https://farm9.staticflickr.com/8724/16618079590_6c236ce2c2_c.jpg) + +请随意地浏览,操作来熟悉 Alpine。你总是可以在任何时候通过敲 'Q' 来回到命令提示符界面。请注意,所有的字符界面下方都有与操作相关的帮助。 + +在进一步深入之前,我们将为 Alpine 创建一个默认的配置文件。为此,请关闭 Alpine,然后在命令行中执行下面的命令: + + # alpine -conf > /etc/pine.conf + +### 配置 Alpine 来使用 Gmail 账号 ### + +一旦你安装了 Alpine 并至少花费了几分钟的时间来熟悉它的界面和菜单,下面便是实际配置它来使用一个已有的 Gmail 账户的时候了。 + +在 Alpine 中执行下面的步骤之前,记得要通过你的 Web 邮件界面,在你的 Gmail 设定里启用 IMAP 协议。一旦在你的 Gmail 账户中 IMAP 被启用,执行下面的步骤来在 Alpine 中启用阅读 Gmail 信息的功能。 + +首先,启动 Alpine。 + +按 'S' 来进行设置,再按 'L' 选择 `collectionLists` 选项来定义不同的文件夹类别以帮助你更好地组织你的邮件: + +![](https://farm8.staticflickr.com/7614/16779579656_690eda419c_o.png) + +按 'A' 来新建一个文件夹并填写必要的信息: + +- **昵称**: 填写任何你想写的名字; +- **服务器**: imap.gmail.com/ssl/user=yourgmailusername@gmail.com + +你可以将 `Path` 和 `View` 留白不填。 + +然后按 `Ctrl+X` 并在有提示时输入你的 Gmail 密码: + +![](https://farm9.staticflickr.com/8611/16618079640_6f7dca336a_b.jpg) + +假如一切如预期一样进展顺利,就会出现一个以你先前填写的昵称来命名的新文件夹。你应该可以在这里找到你的 Gmail 信箱: + +![](https://farm8.staticflickr.com/7598/16804355052_10c1a6c5bd_b.jpg) + +为了验证,你可以比较在 Alpine 中显示的 "Gmail Sent" 信箱和在 Web 界面下的信箱: + +![](https://farm8.staticflickr.com/7602/16619323939_d2eab3e162_c.jpg) + +默认情况下,每隔 150 秒,它将自动检查新邮件或提示,你可以在文件 `/etc/pine.conf`中改变这个值,同时你还可以修改许多其他设定。这个配置文件拥有详细且清晰的注释。例如,为了将检查新邮件的时间间隔设定为 10 秒,你需要这样设定: + + # The approximate number of seconds between checks for new mail + mail-check-interval=10 + +最后,我们需要配置一个 SMTP 服务器来通过 Alpine 发送邮件信息。回到先前解释过的 Alpine 的设置界面,然后按 'C' 来设定一个 Google 的 SMTP 服务器地址,你需要像下面这样编辑 `SMTP Server`(为了发送) 这一行内容: + + smtp.gmail.com:587/tls/user=yourgmailusername@gmail.com + +当你按 'E' 离开设定界面时,将会提醒你保存更改。一旦你保存了更改,马上你就可以通过 Alpine 来发送邮件了!为此,来到主菜单中的 `Compose` 选项,接着开始从命令行中操作你的 Gmail 吧。 + +### 总结 ### + +在这个帖子里,我们讨论了在终端环境中如何通过一个名为 Alpha 的轻量且强大的命令行邮件客户端来获取 Gmail。 Alpine 是一个发布在 Apache Software License 2.0 协议下的自由软件,该协议与 GPL 协议相兼容。 Alpine 引以自豪的是:它不仅对新手友好,同时还做到了让那些经验丰富的系统管理员认为它是强大的。我希望在你阅读完这篇文章后,你能意识到我最后一个论断是多么的正确。 + +非常欢迎使用下面的输入框来留下你的评论或问题。我期待着你们的反馈! + +-------------------------------------------------------------------------------- + +via: http://xmodulo.com/gmail-command-line-linux-alpine.html + +作者:[Gabriel Cánepa][a] +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://xmodulo.com/author/gabriel +[1]:http://xmodulo.com/schedule-appointments-todo-tasks-linux-terminal.html +[2]:http://xmodulo.com/manage-personal-expenses-command-line.html +[3]:http://xmodulo.com/access-facebook-command-line-linux.html +[4]:http://xmodulo.com/access-twitter-command-line-linux.html +[5]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html From 872a2236708e0a05cd931c385ddfdc5730468d02 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Thu, 2 Apr 2015 18:36:42 +0800 Subject: [PATCH 0445/2517] Update 20150227 Chess in a Few Bytes.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译这篇文章。 --- sources/share/20150227 Chess in a Few Bytes.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/share/20150227 Chess in a Few Bytes.md b/sources/share/20150227 Chess in a Few Bytes.md index 26ef9d523d..e0f6302dcd 100644 --- a/sources/share/20150227 Chess in a Few Bytes.md +++ b/sources/share/20150227 Chess in a Few Bytes.md @@ -1,3 +1,5 @@ +Translating by FSSlc + Chess in a Few Bytes ================================================================================ I am showing my age by mentioning that my introduction to computing was a ZX81, a home computer produced by a UK developer (Sinclair Research) which had a whopping 1KB of RAM. The 1KB is not a typographical error, the home computer really shipped with a mere 1KB of onboard memory. But this memory limitation did not prevent enthusiasts producing a huge variety of software. In fact the machine sparked a generation of programming wizards who were forced to get to grips with its workings. The machine was upgradable with a 16KB RAM pack which offered so many more coding possibilities. But the unexpanded 1KB machine still inspired programmers to release remarkable software. @@ -111,4 +113,4 @@ via: http://www.linuxlinks.com/article/20150222033906262/ChessBytes.html [1]:http://nanochess.org/chess6.html [2]:http://www.pouet.net/prod.php?which=64962 -[3]:http://home.hccnet.nl/h.g.muller/max-src2.html \ No newline at end of file +[3]:http://home.hccnet.nl/h.g.muller/max-src2.html From 65a8623495c58bde0a13c328b38a959e9146cb10 Mon Sep 17 00:00:00 2001 From: wxy Date: Thu, 2 Apr 2015 22:01:48 +0800 Subject: [PATCH 0446/2517] =?UTF-8?q?PUB:20150122=20How=20are=20C=20data?= =?UTF-8?q?=20types=20=E2=80=9Csupported=20directly=20by=20most=20computer?= =?UTF-8?q?s=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @KayGuoWhu --- ... “supported directly by most computers”.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/talk => published}/20150122 How are C data types “supported directly by most computers”.md (68%) diff --git a/translated/talk/20150122 How are C data types “supported directly by most computers”.md b/published/20150122 How are C data types “supported directly by most computers”.md similarity index 68% rename from translated/talk/20150122 How are C data types “supported directly by most computers”.md rename to published/20150122 How are C data types “supported directly by most computers”.md index d204928ad6..f57bd9ac7f 100644 --- a/translated/talk/20150122 How are C data types “supported directly by most computers”.md +++ b/published/20150122 How are C data types “supported directly by most computers”.md @@ -1,15 +1,15 @@ C语言数据类型是如何被大多数计算机系统所支持? ---------- +======================== -#问题: +###问题: -在读K&R版的*The C Programming Language*一书时,我在[介绍,第3页]看到这样一条说明: +在读K&R版的*The C Programming Language*一书时,我在[介绍,第3页]看到这样一条说明: ->因为C语言提供的数据类型和控制结构可以直接被大部分计算机系统所支持,所以在实现自包含程序时所需要的运行库文件一般很小。 +>**因为C语言提供的数据类型和控制结构可以直接被大部分计算机系统所支持,所以在实现自包含程序时所需要的运行库文件一般很小。** -这段黑体说明了什么?能找到一个例子来说明C语言中的某种数据类型或控制结构并不能被一种计算机系统所支持呢? +这段黑体说明了什么?能否找到一个例子来说明C语言中的某种数据类型或控制结构不被某种计算机系统直接支持呢? -#回答: +###回答: 事实上,C语言中确实有不被直接支持的数据类型。 @@ -31,13 +31,13 @@ return _float_add(x, y); 另一个常见的例子是64位整型数(C语言标准中'long long'类型是1999年之后才出现的),这种类型在32位系统上也不能直接使用。古董级的SPARC系统则不支持整型乘法,所以在运行时必须提供乘法的实现。当然,还有一些其它例子。 -##其它语言 +####其它语言 相比起来,其它编程语言有更加复杂的基本类型。 -比如,Lisp中的symbol需要大量的运行时实现支持,就像Lua中的tables、Python中的strings、Fortran中的arrays,等等。在C语言中等价的类型通常要么不属于标准库(C语言没有标准symbols或tables),要么更加简单,而且并不需要那么多的运行时支持(C语言中的array基本上就是指针,以NULL结尾的字符串实现起来也很简单)。 +比如,Lisp中的symbol需要大量的运行时实现支持,就像Lua中的table、Python中的string、Fortran中的array,等等。在C语言中等价的类型通常要么不属于标准库(C语言没有标准symbol或table),要么更加简单,而且并不需要那么多的运行时支持(C语言中的array基本上就是指针,以NULL结尾的字符串实现起来也很简单)。 -##控制结构 +####控制结构 异常处理是C语言中没有的一种控制结构。非局部的退出只有'setjmp()'和'longjmp()'两种,只能提供保存和恢复某些部分的处理器状态。相比之下,C++运行时环境必须先遍历函数调用栈,然后调用析构函数和异常处理函数。 @@ -46,7 +46,7 @@ via:[stackoverflow](http://stackoverflow.com/questions/27977522/how-are-c-data-t 作者:[Dietrich Epp][a] 译者:[KayGuoWhu](https://github.com/KayGuoWhu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2cbe29755502333aa099c0afa89a692f2e5f2c5f Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 3 Apr 2015 00:12:35 +0800 Subject: [PATCH 0447/2517] PUB:20150215 How to share files between computers over network with btsync @martin2011qi --- ...ween computers over network with btsync.md | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) rename {translated/tech => published}/20150215 How to share files between computers over network with btsync.md (62%) diff --git a/translated/tech/20150215 How to share files between computers over network with btsync.md b/published/20150215 How to share files between computers over network with btsync.md similarity index 62% rename from translated/tech/20150215 How to share files between computers over network with btsync.md rename to published/20150215 How to share files between computers over network with btsync.md index c6cd7051c4..ac280d2ffd 100644 --- a/translated/tech/20150215 How to share files between computers over network with btsync.md +++ b/published/20150215 How to share files between computers over network with btsync.md @@ -1,10 +1,10 @@ -如何使用btsync通过网络实现电脑间文件共享 +如何使用btsync通过网络实现计算机间的文件共享 ================================================================================ -如果你是使用各式设备在网上工作的这类人,我相信你肯定需要一个在不同设备间同步文件及目录的方法,至少是非常渴望有这种功能。 +如果你是那种使用各式设备在网上工作的人,我相信你肯定需要一个在不同设备间同步文件及目录的方法,至少是非常渴望有这种功能。 -BitTorrent Sync简称btsync,是一个基于BitTorrent(著名P2P文件分享协议)的免费跨平台同步工具。与传统BitTorrent客户端不同的是btsync用于传输加密和访问授权的是不同操作系统及设备中自动生成的键。 +BitTorrent Sync简称btsync,是一个基于BitTorrent(著名P2P文件分享协议)的免费跨平台同步工具。与传统BitTorrent客户端不同的是,btsync可以在不同操作系统及设备之间加密数据传输和基于自动生成的密钥来授予访问共享文件的权限。 -更具体点,当你想要通过btsync共享一些文件或文件夹,相应的读/写键(所谓的秘密编码)已经创建。这些键将会通过不同的途径例如HTTPS链接,电子邮件,二维码等被分享。一旦两台设备通过一个键配对成功,链接内容将会直接在其间同步。如果没有事先设置,传输将不会有文件大小和速度的限制。你可以在btsync中创建账号,以此来创建和管理通过网络分享的键和文件。 +更具体点,当你想要通过btsync共享一些文件或文件夹,相应的读/写密钥(所谓的密码)就创建好了。这些密钥可以通过HTTPS链接,电子邮件,二维码等在不同的设备间共享传递。一旦两台设备通过一个密钥配对成功,其所对应的内容将会直接在其间同步。如果没有事先设置,传输将不会有文件大小和速度的限制。你可以在btsync中创建账号,这样你可以通过 web 界面来创建和管理通过网络分享的密钥和文件。 BitTorrent Sync可以在许多的操作系统上运行,包括Linux,MacOS X,Windows,在 [Android][1]和[iOS][2]上也可以使用。在这里,我们将教你在Linux环境(一台家用服务器)与Windows环境(一台笔记本电脑)之间如何使用BitTorrent Sync来同步文件。 @@ -12,7 +12,7 @@ BitTorrent Sync可以在许多的操作系统上运行,包括Linux,MacOS X BitTorrent Sync可以在[项目主页][3]直接下载。由于Windows版本的BitTorrent Syn安装起来十分简单,所以我们假设笔记本上已经安装了。我们把焦点放到Linux服务器上的安装和配置。 -在下载页面中选择你的系统架构,右键相应链接,选择复制连接地址(或者简单的依靠浏览器判断),将链接粘贴到在终端中用wget下载,如下: +在下载页面中选择你的系统架构,右键相应链接,复制连接地址(或者类似的功能,不同浏览器可能不同),将链接粘贴到在终端中用wget下载,如下: **64位Linux:** @@ -36,11 +36,11 @@ BitTorrent Sync可以在[项目主页][3]直接下载。由于Windows版本的Bi export PATH=$PATH:/usr/local/bin/btsync -或者在在该文件夹中运行btsync的二进制文件。我们推荐使用第一种方式,虽需要少量的输入但更容易记忆。 +或者在该文件夹中运行btsync的二进制文件。我们推荐使用第一种方式,虽需要少量的输入但更容易记忆。 -### 配置Btsync ### +### 配置btsync ### -Btsync带有一个内置的网络服务器被用作其管理接口。想要使用这个接口你需要创建一个配置文件。你可以使用以下命令来创建: +btsync带有一个内置的网络服务器,用作其管理接口。想要使用这个接口你需要创建一个配置文件。你可以使用以下命令来创建: # btsync --dump-sample-config > btsync.config @@ -54,19 +54,21 @@ Btsync带有一个内置的网络服务器被用作其管理接口。想要使 ![](https://farm9.staticflickr.com/8599/15895277793_da63841433_b.jpg) +如果你将来想要优化一下它的配置,可以看一下 /usr/local/bin/btsync 目录下的 README 文件,不过现在我们先继续下面的步骤。 + ### 第一次运行btsync ### 作为一个系统的最高执行者我们需要依赖日志文件!所以在我们启动btsync之前,我们将先为btsync创建一个日志文件。 # touch /var/log/btsync.log -最后,让我们开启btsync: +最后,让我们启动btsync: # btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log ![](https://farm8.staticflickr.com/7288/16327720298_ccf2cbedea_c.jpg) -现在在你的浏览器中输入正在运行btsync监听的服务器IP地址和端口(我这是192.168.0.15:8888),同意隐私政策,条款和最终用户许可协议: +现在在你的浏览器中输入正在运行的btsync所监听的服务器IP地址和端口(我这是192.168.0.15:8888),同意其隐私政策,条款和最终用户许可协议: ![](https://farm9.staticflickr.com/8597/16327720318_d52551fc44_b.jpg) @@ -80,33 +82,29 @@ Btsync带有一个内置的网络服务器被用作其管理接口。想要使 现在这样就够了。在运行接下来的步骤之前,请先在Windows主机(或你想使用的其他Linux设备)上安装BitTorrent Sync。 -### Btsync分享文件 ### +### btsync分享文件 ### -下方的视频将会展示如何在安装Windows8的电脑[192.168.0.106]上分享现有的文件夹。在添加好想要同步的文件夹后,你会得到它的键,通过“Enter a key or link”菜单(上面的图已经展示过了)添加到你安装到的Linux机器上,并开始同步: +这个[视频][5](需要翻墙)展示了如何在安装Windows8的电脑[192.168.0.106]上分享现有的文件夹。在添加好想要同步的文件夹后,你会得到它的密钥,通过“Enter a key or link”菜单(上面的图已经展示过了)添加到你安装到的Linux机器上,并开始同步。 -注释:youtube视频 - +现在用别的设备试试吧;找一个想要分享的文件夹或是一些文件,并通过Linux服务器的网络接口将密钥导入到你安装的“中央”btsync中。 -现在用别的设备试试吧;找一个想要分享的文件夹或是一些文件,并通过Linux服务器的网络接口将键导入到你安装的“核心”btsync中。 - -### 使用常规用户开机自动运行btsync ### +### 以常规用户开机自动运行btsync ### 你们可能注意到了,视频中在同步文件时是使用'root'组的用户创建/btsync目录的。那是因为我们使用超级用户手动启动BitTorrent Sync的原因。在通常情况下,你会希望它开机自动使用无权限用户(www_data或是专门为此创建的账户,例如btsync)启动。 -所以,我们创建了一个叫做btsync的用户,并在/etc/rc.local文件(exit 0行前)添加如下字段: +所以,我们创建了一个叫做btsync的用户,并在/etc/rc.local文件(exit 0 这一行前)添加如下字段: sudo -u btsync /usr/local/bin/btsync/btsync --config /usr/local/bin/btsync/btsync.config --log /var/log/btsync.log 最后,创建pid文件: - # touch /usr/local/bin/btsync/.sync//sync.pid + # touch /usr/local/bin/btsync/.sync/sync.pid -并递归更改/usr/local/bin/btsync的所属用户: +并递归更改 /usr/local/bin/btsync的所属用户: # chown -R btsync:root /usr/local/bin/btsync 现在重启试试,看看btsync是否正在由预期中的用户运行: -Now reboot and verify that btsync is running as the intended user: ![](https://farm9.staticflickr.com/8647/16327988660_644f6d4505_c.jpg) @@ -114,7 +112,7 @@ Now reboot and verify that btsync is running as the intended user: ### 尾注 ### -如你所见,BitTorrent Sync对你几乎就像一个无服务器的Dropbox。我说“几乎”的原因是:当你在局域网内同步数据时,同步在两个设备之间直接进行。然而如果你想要跨网段同步数据,并且你的设备可能要穿过防火墙的限制来配对,那就只能通过一个提供BitTorrent的第三方中继服务器来完成同步传输。虽然声称传输经过 [AES加密][4],你还是可能遇到不想放生的状况。为了你的隐私着想,务必在你共享的每个文件夹中关掉中继/跟踪选项。 +如你所见,BitTorrent Sync对你而言几乎就像一个无服务器的Dropbox。我说“几乎”的原因是:当你在局域网内同步数据时,同步在两个设备之间直接进行。然而如果你想要跨网段同步数据,并且你的设备可能要穿过防火墙的限制来配对,那就只能通过一个提供BitTorrent的第三方中继服务器来完成同步传输。虽然声称传输经过 [AES加密][4],你还是可能会遇到不想发生的状况。为了你的隐私着想,务必在你共享的每个文件夹中关掉中继/跟踪选项。 希望这些对你有用!分享愉快! @@ -123,8 +121,8 @@ Now reboot and verify that btsync is running as the intended user: via: http://xmodulo.com/share-files-between-computers-over-network.html 作者:[Gabriel Cánepa][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 @@ -133,3 +131,4 @@ via: http://xmodulo.com/share-files-between-computers-over-network.html [2]:https://itunes.apple.com/us/app/bittorrent-sync/id665156116 [3]:http://www.getsync.com/ [4]:http://www.getsync.com/tech-specs +[5]:https://youtu.be/f7kLM0lAqF4 From 15b8d1c8ded2730899e2444f02f38773c2a28a66 Mon Sep 17 00:00:00 2001 From: theo-l Date: Fri, 3 Apr 2015 00:12:32 -0300 Subject: [PATCH 0448/2517] updating --- ...ications in a Linux System with Trickle.md | 45 +++++++++++++++++-- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md index 35d9ad15b5..7ed4abd8ef 100644 --- a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md +++ b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md @@ -206,80 +206,102 @@ Output: LinuxFun.pdf: 2.79 MB 17.76 kB/s ### Running Trickle in Supervised [unmanaged] Mode ### +### 在有监督的模式下运行Trickle [未管理的]### Trickle can also run in unmanaged mode, following a series of parameters defined in /etc/trickled.conf. This file defines how trickled (the daemon) behaves and manages trickle. +Tricle也可以在未管理的模式下运行,通过跟随在/etc/tricled.conf文件中定义的一系列参数。 这个文件定义了守护线程 trickled的行为以及如何管理tricle。 In addition, if we want to set global settings to be used, overall, by all applications, we will need to use the trickled command. This command runs the daemon and allows us to define download and upload limits that will be shared by all the applications run through trickle without us needing to specify limits each time. +另外,如果你想要全局设置被所有的应用程序使用的话,我们就会需要使用tricle命令。 这个命令运行守护线程并允许我们通过trickle定义所有应用程序共享的上传下载限制,不需要我们每次来进行指定。 For example, running: +例如,运行: # trickled -d 50 -u 10 Will cause that the download and upload speeds of any application run through trickle be limited to 30 KB/s and 10 KB/s, respectively. +会导致任何通过tricle运行的应用程序的上传下载速率分别限制在30kb/s和10kb/s。 Please note that you can check at any time whether trickled is running and with what arguments: +请注意,你可以在任何时间都能确认守护线程tricled是否正在运行以及其运行参数: # ps -ef | grep trickled | grep -v grep Output: +输出: root 16475 1 0 Dec24 ? 00:00:04 trickled -d 50 -u 10 **Example 3: Uploading a 19 MB mp4 file to our FTP server using with and without trickle.** +**样例3:在是否使用tricle的情形下上传一个 19MB 的mp4文件到我们的FTP服务器。 ** In this example we will use the freely-distributable “He is the gift” video, available for download from [this link][3]. +在这个样例中,我们会使用“He is the gift”的自由分布视频,可以通过这个[链接][3]下载。 We will initially download this file to your current working directory with the following command: +我们将会在开始通过以下的命令将这个文件下载到你的当前工作目录中: # wget http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 First off, we will start the trickled daemon with the command listed above: +首先,我们会使用之前列出的命令来开启守护进程trickled: # trickled -d 30 -u 10 Without trickle: +在没有trickle时: # ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 Output: +输出: 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 36.31 MB/s With trickle: +有trickle的时: # trickle ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 Output: +输出: 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 9.51 kB/s As we can see in the output above, the upload transfer rate dropped to ~10 KB/s. +我们可以看到上面的输出,上传的速率下降到了约 10KB/s。 **Example 4: Downloading the same video with and without trickle** - +** 样例4:在有无trickle的情形下下载这个相同的视频 ** As in Example 2, we will be downloading the file to the current working directory. - +与样例2一样,我们会将该文件下载到当前工作目录中。 Without trickle: +在没有trickle时: # ncftpget -u username -p password 192.168.0.15 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 Output: +输出: 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 108.34 MB/s With trickle: +有trickle的时: # trickle ncftpget -u username -p password 111.111.111.111 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 Output: - +输出: 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 29.28 kB/s Which is in accordance with the download limit set earlier (30 KB/s). +上面的结果与我们之前设置的下载限速相对应(30KB/s)。 **Note:** That once the daemon has been started, there is no need to set individual limits for each application that uses trickle. +**注意:** 一旦守护进程开启之后,没有必要使用trickle来为每个应用程序来单独设置限制。 As we mentioned earlier, one can further customize trickle’s bandwidth shaping through trickled.conf. A typical section in this file consists of the following: +如前所述,每个人都可以进一步地通过tricled.conf来客制化tricle的宽带速率调整,该文件的一个典型的分区有以下部分组成: [service] Priority = @@ -287,15 +309,26 @@ As we mentioned earlier, one can further customize trickle’s bandwidth shaping Length-Smoothing = Where, +其中, - [service] indicates the name of the application whose bandwidth usage we intend to shape. +- [service] 用来指示我们想要对其进行宽带使用调整的应用程序名称 + - Priority allows us to specify a service to have a higher priority relative to another, thus not allowing a single application to hog all the bandwidth which the daemon is managing. The lower the number, the more bandwidth that is assigned to [service]. +- Priority 用来让我们为某个服务制定一个相对于其他服务高的优先级,这样就不允许守护进程管理中的一个单独的应用程序来占用所有的宽带。越小的数字代表更高的优先级。 + - Time-Smoothing [in seconds]: defines with what time intervals trickled will try to let the application transfer and / or receive data. Smaller values (something between the range of 0.1 – 1s) are ideal for interactive applications and will result in a more continuous (smooth) session while slightly larger values (1 – 10 s) are better for applications that need bulk transfer. If no value is specified, the default (5 s) is used. +- Time-Smoothing [以秒计]: 定义了trickled让各个应用程序传输或接收数据的时间间隔。小的间隔值(0.1-1秒)对于交互式应用程序是理想的,因为这样会具有一个更加流畅的会话体验,而一个相对较大 +的时间间隔值(1-10秒)对于需要批量传输应用程序就会显得更好。如果没有指定该值,默认是5秒。 + - Length-Smoothing [in KB]: the idea is the same as in Time-Smoothing, but based on the length of an I/O operation. If no value is specified, the default (10 KB) is used. +- Length-smoothing [KB 单位]: 该想法与Time-Smoothing如出一辙,但是是基于I/O操作而言。如果没有指定值,会使用默认的10KB。 Changing the smoothing values will translate into the application specified by [service] using transfer rates within an interval instead of a fixed value. Unfortunately, there is no formula to calculate the lower and upper limits of this interval as it mainly depends of each specific case scenario. +流畅值的改变会被翻译为将指定的服务的使用一个间隔值而不是一个固定值。不幸的是,没有一个特定的公式来计算间隔值的上下限,主要依赖于特定的应用场景。 The following is a trickled.conf sample file in the CentOS 7 client (192.168.0.17): +下面是一个在CentOS 7 客户端中的tricled.conf 样例文件(192.168.0.17): [ssh] Priority = 1 @@ -308,6 +341,8 @@ The following is a trickled.conf sample file in the CentOS 7 client (192.168.0.1 Length-Smoothing = 3 Using this setup, trickled will prioritize SSH connections over FTP transfers. Note that an interactive process, such as SSH, uses smaller time-smoothing values, whereas a service that performs bulk data transfers (FTP) uses a greater value. The smoothing values are responsible for the download and upload speeds in our previous example not matching the exact value specified by the trickled daemon but moving in an interval close to it. +使用该设置,tricled会为SSH赋予比FTP较高的传输优先级。值得注意的是,一个交互进程,例如SSH,使用了一个较小的时间间隔值,然而一个处理批量数据传输的服务如FTP使用一个较大的时间 +间隔来负责之前的样例中的上传下载速率,尽管不是百分百的有trickled指定的值,但是也已经非常接近了。 ### Conclusion ### ### 总结 ### @@ -318,8 +353,10 @@ In this article we have explored how to limit the bandwidth used by applications - 限制系统下载工具的下载速度,例如[wget][4],或 BT客户端. - Limiting the speed at which your system can be updated via `[yum][5]` (or `[aptitude][6]`, if you’re in a Debian-based system), the package management system. -- +- 限制你的系统的包管理工具`[yun][5]`更新的速度 (如果是基于Debian系统的话,其包管理工具为`[aptitude][6]`)。 + - If your server happens to be behind a proxy or firewall (or is the proxy or firewall itself), you can use trickle to set limits on both the download and upload, or communication speed with the clients or the outside. +- 如果你的服务器是在一个代理或防火墙后面(或者其本身即是代理或防火墙的话),你可以使用trickle来同时设定下载和上传速率,或者与客户端或外部交流速率。 Questions and comments are most welcome. Feel free to use the form below to send them our way. 欢迎提问或留言. From f39c127f33574a7e00ad94b24ef484d6c414127a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=82=98=EC=9B=90=ED=98=B8?= Date: Fri, 3 Apr 2015 16:22:32 +0800 Subject: [PATCH 0449/2517] Update 20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md --- ... Install Cherokee Lightweight Web Server on Ubuntu 14.04.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md b/sources/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md index 1e2ba90d6e..f5529c9b18 100644 --- a/sources/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md +++ b/sources/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md @@ -1,3 +1,4 @@ +翻译中 ictlyh How to Install Cherokee Lightweight Web Server on Ubuntu 14.04 ================================================================================ **Cherokee** is an free and open source high performance, lightweight, full-featured web server and running on major platform (Linux, Mac OS X, Solaris, and BSD). It is compatible with TLS/SSL,FastCGI, SCGI, PHP, uWSGI, SSI, CGI, LDAP, HTTP proxying, video streaming, content caching, traffic shaping, virtual hosts, Apache compatible log files, and load balancing. @@ -84,4 +85,4 @@ via: http://linoxide.com/ubuntu-how-to/install-cherokee-lightweight-web-server-u 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/arunp/ \ No newline at end of file +[a]:http://linoxide.com/author/arunp/ From 46b895771d0f2514d01da86aa7262ef482ffc14e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=82=98=EC=9B=90=ED=98=B8?= Date: Fri, 3 Apr 2015 17:07:47 +0800 Subject: [PATCH 0450/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=902?= =?UTF-8?q?0150119=20How=20to=20Install=20Cherokee=20Lightweight=20Web=20S?= =?UTF-8?q?erver=20on=20Ubuntu=2014.04.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 --- ... Lightweight Web Server on Ubuntu 14.04.md | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 translated/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md diff --git a/translated/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md b/translated/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md new file mode 100644 index 0000000000..63b99fd0a6 --- /dev/null +++ b/translated/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md @@ -0,0 +1,79 @@ +如何在Ubuntu14.04上安装轻量级web服务器Cherokee +================================================================================ +**Cherokee** 是一个免费,开源,高性能轻量级的多特性web服务器,支持大部分主流操作系统(Linux, Mac OS X, Solaris, and BSD)。它兼容TLS/SSL,FastCGI, SCGI, PHP, uWSGI, SSI, CGI, LDAP, HTTP代理, 视频流处理, 内容缓存, 流量控制, 虚拟主机, 和Apache兼容的日志文件,还有负载均衡。 + +今天我们介绍一下怎样在Ubuntu Server 14.04LTS安装和配置轻量级的web服务器Cherokee,只需要注意修改源列表,同样适用于Ubuntu12.04,12.10和13.04. + +在Ubuntu Server上逐步安装和配置Cherokee + +### 1. 更新Ubuntu软件包索引 ### + +首先登陆Ubuntu Server,执行以下命令,更新Ubuntu Server的软件源并安装可用的更新。 + + sudo apt-get update + + sudo apt-get upgrade + +### 2. 加入 PPA ### + +通过运行以下命令增加Cherokee的PPA + + sudo add-apt-repository ppa:cherokee-webserver + + sudo apt-get update + +对于运行14.04版本的服务器还需要执行以下步骤 + + cd /etc/apt/sources.list.d + + nano cherokee-webserver-ppa-trusty.list + + 用deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu saucy main 替换 deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu trusty main + +**再次运行命令:** + + sudo apt-get update + +### 3. 使用apt-get安装Cherokee ### +使用如下命令安装Cherokee和SSL模块 + + sudo apt-get install cherokee cherokee-admin cherokee-doc libcherokee-mod-libssl libcherokee-mod-streaming libcherokee-mod-rrd + +### 4. 配置Cherokee ### +重启Cherokee服务: + + sudo service cherokee start + +使用Cherokee最大的好处就是能通过一个简单易用的web接口cherokee-admin来管理所有的配置选项。这是通过浏览器管理Cherokee的推荐方法。使用如下命令启动cherokee-admin + + sudo cherokee-admin + +**Note: cherokee-admin 会显示用户名,一次密码和web管理界面。** + +默认情况下,只能通过localhost访问Cherokee-admin,如果需要通过其它网络地址来访问,可以使用‘**-b**’参数。如果不指定任何IP地址,Cherokee-admin会自动监听所有网络端口。然后就可以通过网络访问Cherokee-admin + + sudo cherokee-admin -b + +通过指定IP地址访问Cherokee-admin + + sudo cherokee-admin -b 192.168.1.102 + +### 5 浏览cherokee-admin面板 ### + +在你喜欢的浏览器中输入地址http://hostname_or_IP:9090/就可以进入控制面板了。例如我的是http://127.0.0.1:9090/,在浏览器中显示如下图 + +![cherokee-admin-panel](http://blog.linoxide.com/wp-content/uploads/2014/12/cherokee-admin.png) + +好了,到这里我们已经成功地在Ubuntu Server上安装和配置了Cherokee + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/install-cherokee-lightweight-web-server-ubuntu-14-04/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ From 6395ebe8c1b6d81e2785d72fb9db3b2b9427607b Mon Sep 17 00:00:00 2001 From: wxy Date: Fri, 3 Apr 2015 22:12:58 +0800 Subject: [PATCH 0451/2517] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @ictlyh --- ... Lightweight Web Server on Ubuntu 14.04.md | 88 ------------------- 1 file changed, 88 deletions(-) delete mode 100644 sources/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md diff --git a/sources/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md b/sources/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md deleted file mode 100644 index f5529c9b18..0000000000 --- a/sources/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md +++ /dev/null @@ -1,88 +0,0 @@ -翻译中 ictlyh -How to Install Cherokee Lightweight Web Server on Ubuntu 14.04 -================================================================================ -**Cherokee** is an free and open source high performance, lightweight, full-featured web server and running on major platform (Linux, Mac OS X, Solaris, and BSD). It is compatible with TLS/SSL,FastCGI, SCGI, PHP, uWSGI, SSI, CGI, LDAP, HTTP proxying, video streaming, content caching, traffic shaping, virtual hosts, Apache compatible log files, and load balancing. - -Today we'll explains how to install and configure the Light Weight Cherokeeweb server on Ubuntu Server edition 14.04 LTS (Trusty) and should also work with 12.04, 12.10 and 13. 04, just skip the modification of source list. - -Step by step install and configure the Cherokee web server on Ubuntu Server edition - -### 1. Updating Ubuntu Package Index ### - -First, Login into Ubuntu Server and make sure your ubuntu server update, run the following commands one by one, and install any available updates: - - sudo apt-get update - - sudo apt-get upgrade - -### 2. Adding PPA ### - -Add the PPA cherokee webserver. by running the following commands - - sudo add-apt-repository ppa:cherokee-webserver - - sudo apt-get update - -Now, only for servers running Ubuntu 14.04 LTS (Trusty) follow this step below - - cd /etc/apt/sources.list.d - - nano cherokee-webserver-ppa-trusty.list - - replace: - - deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu trusty main - - to: - - deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu saucy main - -**then again run:** - - sudo apt-get update - -### 3. Installing Cherokee Web Server using apt-get ### - -Enter the following command to install the Cherokee web server including Module SSL - - sudo apt-get install cherokee cherokee-admin cherokee-doc libcherokee-mod-libssl libcherokee-mod-streaming libcherokee-mod-rrd - -### 4. Configuring Cherokee ### - - sudo service cherokee start - -The best part about using its Web Server is being able to manage all of its configurations through a simple to use web interface. This interface, known as cherokee-admin, is the recommended means of administering cherokee web server through web browser. Start cherokee-admin by running the following command: - - sudo cherokee-admin - -**Note: The cherokee-admin will display the administration user name, One-time Password and administration web interface.** - -**Note down your One-Time password. You will need this when you login to its admin web interface.** - -By default, cherokee-admin can only accessed from localhost. If you need to access the admin for other network address using the parameter ‘**-b**’. If you doesn’t mention any ip address, it will automatically listen to all network interfaces. Then you can connect to cherokee-admin from other network address. - - sudo cherokee-admin -b - -If you need to access its admin from specific network address - - sudo cherokee-admin -b 192.168.1.102 - -### 5. Browse your Cherokee Admin Panel ### - -Now you can access the administration panel from you favorite browser by typing http://hostname_or_IP:9090/ for me its http://127.0.0.1:9090/, it will appear on your browser like this: - -![cherokee-admin-panel](http://blog.linoxide.com/wp-content/uploads/2014/12/cherokee-admin.png) - -Hurray, we have successfully installed and configured Cherokee Web Server in our Ubuntu Server. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/install-cherokee-lightweight-web-server-ubuntu-14-04/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ From 2beb75056eeea6746b38c672aed991f4f5d80048 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 4 Apr 2015 01:12:04 -0300 Subject: [PATCH 0452/2517] translated --- ...ications in a Linux System with Trickle.md | 152 +++++------------- 1 file changed, 43 insertions(+), 109 deletions(-) diff --git a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md index 7ed4abd8ef..7a5553afa3 100644 --- a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md +++ b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md @@ -1,63 +1,42 @@ -theo-l translating - -How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle 如何在linux上使用Trickle来显示应用程序的网络宽带使用. ================================================================================ -Have you ever encountered situations where one application dominated you all network bandwidth? If you have ever been in a situation where one application ate all your traffic, then you will value the role of the trickle bandwidth shaper application. Either you are a system admin or just a Linux user, you need to learn how to control the upload and download speeds for applications to make sure that your network bandwidth is not burned by a single application. 有没有遇到过系统中的某个应用程序独占了你所有的网络宽带的情形?如果你有过这样的遭遇,那么你就会感受到Trickle宽带调整应用角色的价值.不管你是一个系统管理员还是仅仅Linux用户,都需要学习如何控制应用程序的上下行速度,来确保你的网络宽带不会被某个程序 霸占. ![Install Trickle Bandwidth Limit in Linux](http://www.tecmint.com/wp-content/uploads/2013/11/Bandwidth-limit-trickle.png) Install Trickle Bandwidth Limit in Linux -### What is Trickle? ### ### 什么是 Trickle? ### -Trickle is a network bandwidth shaper tool that allows us to manage the upload and download speeds of applications in order to prevent any single one of them to hog all (or most) of the available bandwidth. In few words, trickle lets you control the network traffic rate on a per-application basis, as opposed to per-user control, which is the classic example of bandwidth shaping in a client-server environment, and is probably the setup we are more familiar with. Trickle是一个网络宽带调整工具,可以让我们管理应用程序的网络上下行速度,使得可以避免其中的某个应用程序吃掉了全部或大部分可用的宽带.换句话说,Trickle可以让你基于单个应用程序来控制 网络流量速率,而不是仅仅针对与单个用户--在客户端网络环境中经典的宽带调整样例, -### How Trickle Works? ### ### Trickle是如何工作的?### -In addition, trickle can help us to define priorities on a per-application basis, so that when overall limits have been set for the entire system, priority apps will still get more bandwidth automatically. To accomplish this task, trickle sets traffic limits to the way in which data is sent to, and received from, sockets using TCP connections. We must note that, other than the data transfer rates, trickle does not modify in any way the behavior of the process it is shaping at any given moment. 另外,tricle可以帮助我们基于应用来定义优先级,所以当对整个系统进行了全局限制设定,高优先级的应用依然会自动地获取更多的宽带。为了实现这个目标,tricle设置通过TCP连接的套接字对数 据发送、数据接收路径的流量限制。我们必须注意到,除了影响传输速率之外,tricle任何时候都不会以任何方式来改变其处理过程。 -### What Can’t Trickle do? ### ### Trickle不能做什么? ### -The only limitation, so to speak, is that trickle will not work with statically linked applications or binaries with the SUID or SGID bits set since it uses dynamic linking and loading to place itself between the shaped process and its associated network socket. Trickle then acts as a proxy between these two software components. 这么说吧,唯一的限制就是,tricle静态连接的应用或者具有SUID或SGID位设置的二进制--因为他们使用动态链接并且将其自身加载到调整过程以及其关联的网络套接字之间。 Trickle此时会在这两种软件 组件之间扮演代理的角色。 -Since trickle does not require superuser privileges in order to run, users can set their own traffic limits. Since this may not be desirable, we will explore how to set overall limits that system users cannot exceed. In other words, users will still be able to manage their traffic rates, but always within the boundaries set by the system administrator. 由于trickle并不会需要超级用户的权限来运行,所以用户可以设置用户独立的流量限制,可能这并不是你想要的,我们会探索如何使用全局设定来限制系统中的所有用户的流量限制。也即是说,此时系统中的每个用户具有管理 各自的流量速率,但是无论如何,都会受到系统管理员给他们设置的边界限制。 -In this article we will explain how to limit the network bandwidth used by applications in a Linux server with trickle. To generate the necessary traffic, we will use ncftpput and ncftpget (both tools are available by installing ncftp) on the client (CentOS 7 server – dev1: 192.168.0.17), and vsftpd on the server (Debian Wheezy 7.5 – dev2: 192.168.0.15) for demonstration purposes. The same instructions also works on RedHat, Fedora and Ubuntu based systems. 在这边文章中,我们会描述如何通过trickle在linux平台上管理应用程序使用的网络宽带。为了生成必要流量,在此会在客户端(CentOS 7 server – dev1: 192.168.0.17)上使用 ncftpput 和 ncftpget, 在服务器(Debian Wheezy 7.5 – dev2: 192.168.0.15)上使用vsftpd 来进行演示。 相同的指令也可以在RedHat,Fedora和Ubuntu等系统使用。 -#### Prerequisites #### #### 前提条件 #### -1. For RHEL/CentOS 7/6, [enable the EPEL repository][1]. Extra Packages for Enterprise Linux (EPEL) is a repository of high-quality free and open-source software maintained by the Fedora project and is 100% compatible with its spinoffs, such as Red Hat Enterprise Linux and CentOS. Both trickle and ncftp are made available from this repository. -<<<<<<< HEAD -1. 对于 RHEL/CentOS 7/6, [开启EPEL仓库][1]。EPEL的Extra Packages是一个 -有Fedora项目维护的高质量、开源的软件仓库,而且百分之百与其衍生产品相兼容,如 +1. 对于 RHEL/CentOS 7/6, [开启EPEL仓库][1]。EPEL的Extra Packages是一个 有Fedora项目维护的高质量、开源的软件仓库,而且百分之百与其衍生产品相兼容,如 企业版本Linux和CentOS. 在这个仓库中trickle和ncftp两者都是可用的。 -======= -1. 对于 RHEL/CentOS 7/6, [开启EPEL仓库][1] ->>>>>>> 4c29f6179cf78a6a9b97c7e57e28245b2237b015 -2. Install ncftp as follows: 2. 按照如下方式安装ncftp: # yum update && sudo yum install ncftp [On RedHat based systems] # aptitude update && aptitude install ncftp [On Debian based systems] -3. Set up a FTP server in a separate server. Please note that although FTP is inherently insecure, it is still widely used in cases when security in uploading or downloading files is not needed. We are using it in this article to illustrate the bounties of trickle and because it shows the transfer rates in stdout on the client, and we will leave the discussion of whether it should or should not be used for another date and time :). 3. 在单独的服务器上设置一个FTP服务器。需要注意的是,尽管FTP天生就不安全,但是 仍然被广泛应用在安全性无关紧要的文件上传下载中。 在这篇文章中我们使用它来演示 trickle的优点,同时它也会在客户端的标准输出流中显示传输速率,我们将是否在另外 @@ -66,7 +45,6 @@ trickle的优点,同时它也会在客户端的标准输出流中显示传输 # yum update && yum install vsftpd [On RedHat based systems] # aptitude update && aptitude install vsftpd [On Debian based systems] -Now, edit the /etc/vsftpd/vsftpd.conf file on the FTP server as follows: 现在,在FTP服务器上按照以下方式编辑 /etc/vsftpd/vsftpd.conf 文件。 anonymous_enable=NO @@ -74,7 +52,6 @@ Now, edit the /etc/vsftpd/vsftpd.conf file on the FTP server as follows: chroot_local_user=YES allow_writeable_chroot=YES -After that, make sure to start vsftpd for your current session and to enable it for automatic start on future boots: 在此之后,确保在你的当前会话中开启了vsftpd,并在之后的启动中让其自动启动。 # systemctl start vsftpd [For systemd-based systems] @@ -82,225 +59,200 @@ After that, make sure to start vsftpd for your current session and to enable it # service vsftpd start [For init-based systems] # chkconfig vsftpd on -4. If you chose to set up the FTP server in a CentOS/RHEL 7 droplet with SSH keys for remote access, you will need a password-protected user account with the appropriate directory and file permissions for uploading and downloading the desired content OUTSIDE root’s home directory. 4. 如果你选在在一个CentOS/RHEL 7中为FTP服务器的远程访问配备SSH秘钥,你需要 一个具有适合访问root目录之外的目录和文件内容上传下载权限并密码受保护的用户账户。 -You can then browse to your home directory by entering the following URL in your browser. A login window will pop up prompting you for a valid user account and password on the FTP server. 你可以通过在你的浏览器中输入以下的URL来浏览你的Home目录。一个登陆窗口会弹出来 提示你输入FTP服务器中的有效的用户名和密码。 ftp://192.168.0.15 -If the authentication succeeds, you will see the contents of your home directory. Later in this tutorial you will be able to refresh that page to display the files that have been uploaded during previous steps. 如果验证成功,你就会看到你的home目录中的内容。该教程的稍后部分中,你将可以刷新 页面来显示在你之前上传过的文件。 ![FTP Directory Tree](http://www.tecmint.com/wp-content/uploads/2013/11/FTP-Directory-Tree.png) FTP Directory Tree -### How to Install Trickle in Linux ### ### 如何在Linux中安装 Tricle ### -1. Install trickle via yum or aptitude. 1. 通过yum或aptitude来安装tricle. -To ensure a successful installation, it is considered good practice to make sure the currently installed packages are up-to-date (using yum update) before installing the tool itself. +为了确保能够成功安装,最好在安装工具之前,保证当前的安装包是最新的版本。 # yum -y update && yum install trickle [On RedHat based systems] # aptitude -y update && aptitude install trickle [On Debian based systems] -2. Verify whether trickle will work with the desired binary. +2. 确认trickle是否对特定的二进制包有用。 -As we explained earlier, trickle will only work with binaries using dynamic, or shared, libraries. To verify whether we can use this tool with a certain application, we can use the well-known ldd utility, where ldd stands for list dynamic dependencies. Specifically, we will look for the presence of glibc (the GNU C library) in the list of dynamic dependencies of any given program because it is precisely that library which defines the system calls involved in communication through sockets. +之前我们解释过,trickle只对使用动态或共享包的二进制包有用。为了确认我们是否可以对某个特定的应用使用trickle,我们可以使用著名的ldd( +列出动态依赖)工具。 特别地,我们会查看任何给定程序的动态依赖中检查其当前使用的glibc,因为其准确地定义了使用套接字交流中使用的系统调用。 -Run the following command against a given binary to see if trickle can be used to shape its bandwidth: +对一个给定的二进制包执行以下命令来查看是否能对其使用trickle进行宽带调整: # ldd $(which [binary]) | grep libc.so -For example, +例如, # ldd $(which ncftp) | grep libc.so -whose output is: +其输出是: # libc.so.6 => /lib64/libc.so.6 (0x00007efff2e6c000) -The string between brackets in the output may change from system to system and even between subsequent runs of the same command, since it represents the load address of the library in physical memory. +输出中的括号中的字符可能在不同的系统平台中发生改变,甚至相同的命令在不同的时候运行也会,因为其代表包加载到物理内存中的地址。 -If the above command does not return any results, it means that the binary it was run against does not use libc and thus trickle cannot be used as bandwidth shaper in that case. +如果上面的命令没有返回任何的结果,就说明这个二进制包没有使用libc包,因此tricle对其不能起到宽带调整的作用。 -### Learn How to Use Trickle ### +### 学习如何使用Trickle### -The most basic usage of trickle is in standalone mode. Using this approach, trickle is used to explicitly define the download and upload speeds of a given application. As we explained earlier, for the sake of brevity, we will use the same application for download and upload tests. +最基本的用法就是使用其单模式,通过这种方式,trickle用来显示地定义给定应用程序的上传下载速率。如前所述,为了简单性,我们会使用相同的应用 +来进行上传下载测试。 -#### Running Trickle in Standalone Mode #### +#### 在单模式下运行trickle#### -We will compare the download and upload speeds with and without using trickle. The -d option indicates the download speed in KB/s, while the -u flag tells trickle to limit the upload speed by the same unit. In addition, we will use the -s flag, which specifies that trickle should run in standalone mode. +我们会比较在有无trickle的情况下的上传下载速率, ‘-d’选项指示下载速率(KB/s单位),而'-u'选项指示相同单位的上传速率。另外我们会使用到‘-s’ +选项来指定trickle应该以单模式运行。 -The basic syntax to run trickle in standalone mode is as follows: +以单模式运行trickle的基本语法如下: # trickle -s -d [download rate in KB/s] -u [upload rate in KB/s] -In order to perform the following examples on your own, make sure to have trickle and ncftp installed on the client machine (192.168.0.17 in my case). +为了能够让你自己运行以下样例,确保你在自己的客户端安装了trickle和ncftp(我的是192.168.0.17)。 -**Example 1: Uploading a 2.8 MB PDF file with and without trickle.** +**样例1:在有无trickle的情况下上传一个2.8 MB的PDF文件。** -We are using the freely-distributable Linux Fundamentals PDF file (available from [here][2]) for the following tests. - -You can initially download this file to your current working directory with the following command: +我们使用一个自由发布的LInux基础知识PDF文件来进行下面的测试[文件链接][2]。 +你可以首先使用下面的命令将这个文件下载到你当前的工作目录中: # wget http://linux-training.be/files/books/LinuxFun.pdf -The syntax to upload a file to our FTP server without trickle is as follows: +下面是在没有trickle的情况下将一个文件上传到我们的FTP服务器的语法: # ncftpput -u username -p password 192.168.0.15 /remote_directory local-filename -Where /remote_directory is the path of the upload directory relative to username’s home, and local-filename is a file in your current working directory. +其中的 /remote_directory 是相对于用户名的Home目录的上传路径,而local-filename是一个你当前工作目录中的文件。 -Specifically, without trickle we get a peak upload speed of 52.02 MB/s (please note that this is not the real average upload speed, but an instant starting peak), and the file gets uploaded almost instantly: +特别的是,在没有trickle的情形下,我们可以得到上传峰值速率52.02MB/s(请注意,这个不是真正的平均上传速率,而是峰值开始的瞬时值),而且这个文件几乎 +在瞬间就完成了上传。 # ncftpput -u username -p password 192.168.0.15 /testdir LinuxFun.pdf -Output: +输出: LinuxFun.pdf: 2.79 MB 52.02 MB/s -With trickle, we will limit the upload transfer rate at 5 KB/s. Before uploading the file for the second time, we need to delete it from the destination directory; otherwise, ncftp will inform us that the file at the destination directory is the same that we are trying to upload, and will not perform the transfer: - +在使用trickle的情况下,我们会限制上传速率在5KB/s。在第二次上传文件之前,我们需要在目标目录中删除这个文件,否则ncftp就会通知我们在目标 +目录中已经存在了与上传文件相同的文件,从而不会执行文件的传输: # rm /absolute/path/to/destination/directory/LinuxFun.pdf -Then: +然后: # trickle -s -u 5 ncftpput -u username -p password 111.111.111.111 /testdir LinuxFun.pdf -Output: +输出: LinuxFun.pdf: 2.79 MB 4.94 kB/s -In the example above, we can see that the average upload speed dropped to ~5 KB/s. +在上面的样例中,我们看到平均的上传速率下降到了5KB/s。 -**Example 2: Downloading the same 2.8 MB PDF file with and without trickle** +**样例2:在有无trickle的情况下下载相同过得2.8MB的PDF文件** -First, remember to delete the PDF from the original source directory: +首先,记得从原来的源文目录中删除这个PDF: # rm /absolute/path/to/source/directory/LinuxFun.pdf -Please note that the following cases will download the remote file to the current directory in the client machine. This fact is indicated by the period (‘.‘) that appears after the IP address of the FTP server. +请注意,下面的样例中将远程的文件下载到客户端机器的当前目录下,这是由FTP服务器的IP地址后面的·.·决定的。 -Without trickle: +没有trickle的情况下: # ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf -Output: +输出: LinuxFun.pdf: 2.79 MB 260.53 MB/s -With trickle, limiting the download speed at 20 KB/s: +在有trickle的情况下,限制下载速率在20KB/s: # trickle -s -d 30 ncftpget -u username -p password 111.111.111.111 . /testdir/LinuxFun.pdf -Output: +输出: LinuxFun.pdf: 2.79 MB 17.76 kB/s -### Running Trickle in Supervised [unmanaged] Mode ### ### 在有监督的模式下运行Trickle [未管理的]### -Trickle can also run in unmanaged mode, following a series of parameters defined in /etc/trickled.conf. This file defines how trickled (the daemon) behaves and manages trickle. Tricle也可以在未管理的模式下运行,通过跟随在/etc/tricled.conf文件中定义的一系列参数。 这个文件定义了守护线程 trickled的行为以及如何管理tricle。 -In addition, if we want to set global settings to be used, overall, by all applications, we will need to use the trickled command. This command runs the daemon and allows us to define download and upload limits that will be shared by all the applications run through trickle without us needing to specify limits each time. 另外,如果你想要全局设置被所有的应用程序使用的话,我们就会需要使用tricle命令。 这个命令运行守护线程并允许我们通过trickle定义所有应用程序共享的上传下载限制,不需要我们每次来进行指定。 -For example, running: 例如,运行: # trickled -d 50 -u 10 -Will cause that the download and upload speeds of any application run through trickle be limited to 30 KB/s and 10 KB/s, respectively. 会导致任何通过tricle运行的应用程序的上传下载速率分别限制在30kb/s和10kb/s。 -Please note that you can check at any time whether trickled is running and with what arguments: 请注意,你可以在任何时间都能确认守护线程tricled是否正在运行以及其运行参数: # ps -ef | grep trickled | grep -v grep -Output: 输出: root 16475 1 0 Dec24 ? 00:00:04 trickled -d 50 -u 10 -**Example 3: Uploading a 19 MB mp4 file to our FTP server using with and without trickle.** -**样例3:在是否使用tricle的情形下上传一个 19MB 的mp4文件到我们的FTP服务器。 ** +**样例3:在是否使用tricle的情形下上传一个 19MB 的mp4文件到我们的FTP服务器。** -In this example we will use the freely-distributable “He is the gift” video, available for download from [this link][3]. 在这个样例中,我们会使用“He is the gift”的自由分布视频,可以通过这个[链接][3]下载。 -We will initially download this file to your current working directory with the following command: 我们将会在开始通过以下的命令将这个文件下载到你的当前工作目录中: # wget http://media2.ldscdn.org/assets/missionary/our-people-2014/2014-00-1460-he-is-the-gift-360p-eng.mp4 -First off, we will start the trickled daemon with the command listed above: 首先,我们会使用之前列出的命令来开启守护进程trickled: # trickled -d 30 -u 10 -Without trickle: 在没有trickle时: # ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 -Output: 输出: 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 36.31 MB/s -With trickle: 有trickle的时: # trickle ncftpput -u username -p password 192.168.0.15 /testdir 2014-00-1460-he-is-the-gift-360p-eng.mp4 -Output: 输出: 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 9.51 kB/s -As we can see in the output above, the upload transfer rate dropped to ~10 KB/s. 我们可以看到上面的输出,上传的速率下降到了约 10KB/s。 -**Example 4: Downloading the same video with and without trickle** ** 样例4:在有无trickle的情形下下载这个相同的视频 ** -As in Example 2, we will be downloading the file to the current working directory. + 与样例2一样,我们会将该文件下载到当前工作目录中。 -Without trickle: + 在没有trickle时: # ncftpget -u username -p password 192.168.0.15 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 -Output: 输出: 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 108.34 MB/s -With trickle: 有trickle的时: # trickle ncftpget -u username -p password 111.111.111.111 . /testdir/2014-00-1460-he-is-the-gift-360p-eng.mp4 -Output: 输出: 2014-00-1460-he-is-the-gift-360p-eng.mp4: 18.53 MB 29.28 kB/s -Which is in accordance with the download limit set earlier (30 KB/s). 上面的结果与我们之前设置的下载限速相对应(30KB/s)。 -**Note:** That once the daemon has been started, there is no need to set individual limits for each application that uses trickle. **注意:** 一旦守护进程开启之后,没有必要使用trickle来为每个应用程序来单独设置限制。 -As we mentioned earlier, one can further customize trickle’s bandwidth shaping through trickled.conf. A typical section in this file consists of the following: 如前所述,每个人都可以进一步地通过tricled.conf来客制化tricle的宽带速率调整,该文件的一个典型的分区有以下部分组成: [service] @@ -308,26 +260,16 @@ As we mentioned earlier, one can further customize trickle’s bandwidth shaping Time-Smoothing = Length-Smoothing = -Where, 其中, -- [service] indicates the name of the application whose bandwidth usage we intend to shape. - [service] 用来指示我们想要对其进行宽带使用调整的应用程序名称 - -- Priority allows us to specify a service to have a higher priority relative to another, thus not allowing a single application to hog all the bandwidth which the daemon is managing. The lower the number, the more bandwidth that is assigned to [service]. - Priority 用来让我们为某个服务制定一个相对于其他服务高的优先级,这样就不允许守护进程管理中的一个单独的应用程序来占用所有的宽带。越小的数字代表更高的优先级。 - -- Time-Smoothing [in seconds]: defines with what time intervals trickled will try to let the application transfer and / or receive data. Smaller values (something between the range of 0.1 – 1s) are ideal for interactive applications and will result in a more continuous (smooth) session while slightly larger values (1 – 10 s) are better for applications that need bulk transfer. If no value is specified, the default (5 s) is used. -- Time-Smoothing [以秒计]: 定义了trickled让各个应用程序传输或接收数据的时间间隔。小的间隔值(0.1-1秒)对于交互式应用程序是理想的,因为这样会具有一个更加流畅的会话体验,而一个相对较大 +- Time-Smoothing [以秒计]: 定义了trickled让各个应用程序传输或接收数据的时间间隔。小的间隔值(0.1-1秒)对于交互式应用程序是理想的,因为这样会具有一个更加平滑的会话体验,而一个相对较大 的时间间隔值(1-10秒)对于需要批量传输应用程序就会显得更好。如果没有指定该值,默认是5秒。 - -- Length-Smoothing [in KB]: the idea is the same as in Time-Smoothing, but based on the length of an I/O operation. If no value is specified, the default (10 KB) is used. - Length-smoothing [KB 单位]: 该想法与Time-Smoothing如出一辙,但是是基于I/O操作而言。如果没有指定值,会使用默认的10KB。 -Changing the smoothing values will translate into the application specified by [service] using transfer rates within an interval instead of a fixed value. Unfortunately, there is no formula to calculate the lower and upper limits of this interval as it mainly depends of each specific case scenario. -流畅值的改变会被翻译为将指定的服务的使用一个间隔值而不是一个固定值。不幸的是,没有一个特定的公式来计算间隔值的上下限,主要依赖于特定的应用场景。 +平滑值的改变会被翻译为将指定的服务的使用一个间隔值而不是一个固定值。不幸的是,没有一个特定的公式来计算间隔值的上下限,主要依赖于特定的应用场景。 -The following is a trickled.conf sample file in the CentOS 7 client (192.168.0.17): 下面是一个在CentOS 7 客户端中的tricled.conf 样例文件(192.168.0.17): [ssh] @@ -340,27 +282,19 @@ The following is a trickled.conf sample file in the CentOS 7 client (192.168.0.1 Time-Smoothing = 1 Length-Smoothing = 3 -Using this setup, trickled will prioritize SSH connections over FTP transfers. Note that an interactive process, such as SSH, uses smaller time-smoothing values, whereas a service that performs bulk data transfers (FTP) uses a greater value. The smoothing values are responsible for the download and upload speeds in our previous example not matching the exact value specified by the trickled daemon but moving in an interval close to it. 使用该设置,tricled会为SSH赋予比FTP较高的传输优先级。值得注意的是,一个交互进程,例如SSH,使用了一个较小的时间间隔值,然而一个处理批量数据传输的服务如FTP使用一个较大的时间 间隔来负责之前的样例中的上传下载速率,尽管不是百分百的有trickled指定的值,但是也已经非常接近了。 -### Conclusion ### ### 总结 ### -In this article we have explored how to limit the bandwidth used by applications using trickle on Fedora-based distributions and Debian / derivatives. Other possible use cases include, but are not limited to: 在该文章中,我们探索了任何使用trickle在基于Fedora发行版和Debian衍生版平台上来限制应用程序的宽带使用.也包含了其他的可能用法,但是不对以下情形进行限制: -- Limiting the download speed via a system utility such as [wget][4], or a torrent client, for example. - 限制系统下载工具的下载速度,例如[wget][4],或 BT客户端. -- Limiting the speed at which your system can be updated via `[yum][5]` (or `[aptitude][6]`, if you’re in a Debian-based system), the package management system. - 限制你的系统的包管理工具`[yun][5]`更新的速度 (如果是基于Debian系统的话,其包管理工具为`[aptitude][6]`)。 -- If your server happens to be behind a proxy or firewall (or is the proxy or firewall itself), you can use trickle to set limits on both the download and upload, or communication speed with the clients or the outside. - 如果你的服务器是在一个代理或防火墙后面(或者其本身即是代理或防火墙的话),你可以使用trickle来同时设定下载和上传速率,或者与客户端或外部交流速率。 -Questions and comments are most welcome. Feel free to use the form below to send them our way. 欢迎提问或留言. - -------------------------------------------------------------------------------- via: http://www.tecmint.com/manage-and-limit-downloadupload-bandwidth-with-trickle-in-linux/ From be7bf7db5f51b0d61ae93df00a517c72b4936731 Mon Sep 17 00:00:00 2001 From: theo-L Date: Sat, 4 Apr 2015 01:17:31 -0300 Subject: [PATCH 0453/2517] Update 20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md --- ...width Used by Applications in a Linux System with Trickle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md index 7a5553afa3..b8ed29b47c 100644 --- a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md +++ b/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md @@ -1,4 +1,4 @@ -如何在linux上使用Trickle来显示应用程序的网络宽带使用. +如何在linux上使用Trickle来限制应用程序的网络宽带使用. ================================================================================ 有没有遇到过系统中的某个应用程序独占了你所有的网络宽带的情形?如果你有过这样的遭遇,那么你就会感受到Trickle宽带调整应用角色的价值.不管你是一个系统管理员还是仅仅Linux用户,都需要学习如何控制应用程序的上下行速度,来确保你的网络宽带不会被某个程序 霸占. From eda96c0683044dda32c72e83c7edcc902f85ddc3 Mon Sep 17 00:00:00 2001 From: theo-l Date: Sat, 4 Apr 2015 01:21:51 -0300 Subject: [PATCH 0454/2517] translated --- ...ndwidth Used by Applications in a Linux System with Trickle.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md (100%) diff --git a/sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md b/translated/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md similarity index 100% rename from sources/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md rename to translated/tech/20150302 How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle.md From 582c0eda1e2de5a1fb2d1655005cc802c2185ca6 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 4 Apr 2015 12:52:33 +0800 Subject: [PATCH 0455/2517] PUB:20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04 @ictlyh --- ... Lightweight Web Server on Ubuntu 14.04.md | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md (59%) diff --git a/translated/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md b/published/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md similarity index 59% rename from translated/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md rename to published/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md index 63b99fd0a6..160a8d62f9 100644 --- a/translated/tech/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md +++ b/published/20150119 How to Install Cherokee Lightweight Web Server on Ubuntu 14.04.md @@ -1,8 +1,8 @@ -如何在Ubuntu14.04上安装轻量级web服务器Cherokee +如何在Ubuntu 14.04上安装轻量级web服务器Cherokee ================================================================================ -**Cherokee** 是一个免费,开源,高性能轻量级的多特性web服务器,支持大部分主流操作系统(Linux, Mac OS X, Solaris, and BSD)。它兼容TLS/SSL,FastCGI, SCGI, PHP, uWSGI, SSI, CGI, LDAP, HTTP代理, 视频流处理, 内容缓存, 流量控制, 虚拟主机, 和Apache兼容的日志文件,还有负载均衡。 +**Cherokee** 是一个免费,开源,高性能轻量级的全功能web服务器,支持大部分主流操作系统(Linux、 Mac OS X、 Solaris 和 BSD)。它支持TLS/SSL、FastCGI、 SCGI、 PHP、 uWSGI、 SSI、 CGI、 LDAP、 HTTP代理、 视频流处理、 内容缓存、 流量控制、 虚拟主机、Apache兼容的日志文件,以及负载均衡等功能。 -今天我们介绍一下怎样在Ubuntu Server 14.04LTS安装和配置轻量级的web服务器Cherokee,只需要注意修改源列表,同样适用于Ubuntu12.04,12.10和13.04. +今天我们介绍一下怎样在Ubuntu Server 14.04 LTS安装和配置轻量级的web服务器Cherokee,只需要注意修改软件源列表,同样适用于Ubuntu12.04,12.10和13.04。 在Ubuntu Server上逐步安装和配置Cherokee @@ -28,27 +28,31 @@ nano cherokee-webserver-ppa-trusty.list - 用deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu saucy main 替换 deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu trusty main +用`deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu saucy main` 替换 `deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu trusty main` **再次运行命令:** sudo apt-get update ### 3. 使用apt-get安装Cherokee ### + 使用如下命令安装Cherokee和SSL模块 sudo apt-get install cherokee cherokee-admin cherokee-doc libcherokee-mod-libssl libcherokee-mod-streaming libcherokee-mod-rrd ### 4. 配置Cherokee ### + 重启Cherokee服务: sudo service cherokee start -使用Cherokee最大的好处就是能通过一个简单易用的web接口cherokee-admin来管理所有的配置选项。这是通过浏览器管理Cherokee的推荐方法。使用如下命令启动cherokee-admin +使用Cherokee最大的好处就是能通过一个简单易用的web界面 cherokee-admin 来管理所有的配置选项。推荐通过浏览器来管理Cherokee。使用如下命令启动cherokee-admin sudo cherokee-admin -**Note: cherokee-admin 会显示用户名,一次密码和web管理界面。** +**注意: cherokee-admin 会显示用户名,一次性密码和web管理界面地址。** + +**请记录下这个一次性密码,登录到管理界面时需要它。** 默认情况下,只能通过localhost访问Cherokee-admin,如果需要通过其它网络地址来访问,可以使用‘**-b**’参数。如果不指定任何IP地址,Cherokee-admin会自动监听所有网络端口。然后就可以通过网络访问Cherokee-admin @@ -58,13 +62,13 @@ sudo cherokee-admin -b 192.168.1.102 -### 5 浏览cherokee-admin面板 ### +### 5. 浏览cherokee-admin面板 ### -在你喜欢的浏览器中输入地址http://hostname_or_IP:9090/就可以进入控制面板了。例如我的是http://127.0.0.1:9090/,在浏览器中显示如下图 +在你喜欢的浏览器中输入地址`http://主机名或 IP 地址:9090/`就可以进入控制面板了。例如我的是http://127.0.0.1:9090/,在浏览器中显示如下图 ![cherokee-admin-panel](http://blog.linoxide.com/wp-content/uploads/2014/12/cherokee-admin.png) -好了,到这里我们已经成功地在Ubuntu Server上安装和配置了Cherokee +好了,到这里我们已经成功地在Ubuntu Server上安装和配置了Cherokee。 -------------------------------------------------------------------------------- @@ -72,7 +76,7 @@ via: http://linoxide.com/ubuntu-how-to/install-cherokee-lightweight-web-server-u 作者:[Arun Pyasi][a] 译者:[ictlyh](https://github.com/ictlyh) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 00d8e5e818258419050a5395cef51da7d207144b Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 4 Apr 2015 13:07:09 +0800 Subject: [PATCH 0456/2517] PUB:20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL @geekpi --- ...sed Monitoring System In CentOS or RHEL.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename {translated/tech => published}/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md (75%) diff --git a/translated/tech/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md b/published/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md similarity index 75% rename from translated/tech/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md rename to published/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md index 2c83a1b808..72b79c1c96 100644 --- a/translated/tech/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md +++ b/published/20150203 How To Install Linux-dash Web Based Monitoring System In CentOS or RHEL.md @@ -1,13 +1,13 @@ -如何在CentOS/RHEL中安装机遇Web监控的Linux-dash +如何在CentOS/RHEL中安装基于Web的监控系统 linux-dash ================================================================================ -**Linux-dash**是一款为Linux设计的基于web的轻量级监控面板。这个程序会显示实时时间、不同的系统属性,比如CPU负载、RAM使用率、磁盘使用率、网速、网络连接、RX/TX带宽、登录用户、运行的进程等等。它不会存储长期的统计。因为它没有后端数据库。 +**Linux-dash**是一款为Linux设计的基于web的轻量级监控面板。这个程序会实时显示各种不同的系统属性,比如CPU负载、RAM使用率、磁盘使用率、网速、网络连接、RX/TX带宽、登录用户、运行的进程等等。它不会存储长期的统计。因为它没有后端数据库。 -本篇文章将会向你展示如何安装和设置Linux dash,这里的web服务器是**Nginx**. +本篇文章将会向你展示如何安装和设置Linux dash,这里所使用的web服务器是**Nginx**. ### 安装 ### 首先我们要启用[EPEL 仓库][1]。 - + **接下来,我们需要用下面的命令安装nginx。** sudo yum install nginx @@ -59,7 +59,7 @@ sudo vim /etc/php-fpm.d/www.conf -**确保设置了“listn”,“user”和“group”字段。你可以保留下面的配置不变。** +**确保设置了如下的“listen”,“user”和“group”字段。你可以保留其它的配置不变。** . . . listen = /var/run/php-fpm.sock @@ -73,25 +73,25 @@ sudo cp -r linux-dash/ /var/www/ sudo chown -R nginx:nginx /var/www -**接下来,重启 Nginx和php-fpm** +**接下来,重启 Nginx和php-fpm。** sudo service nginx restart sudo service php-fpm restart -**设置nginx和php-fpm开机自动启动** +**设置nginx和php-fpm开机自动启动。** sudo chkconfig nginx on sudo chkconfig php-fpm on -在本例中,我们使用TCP端口8080配置linux-dash。因此确保防火墙没有阻止8080 TCP端口。 +在本例中,我们使用TCP端口8080配置linux-dash。因此需确保防火墙没有阻止8080 TCP端口。 ### 用linux-dash监控Linux服务器 ### -你现在可以在浏览器中输入**http://:8080/linux-dash/**来访问Linux-dash。 +你现在可以在浏览器中输入**http://\:8080/linux-dash/**来访问Linux-dash。 web面板包含了不同的组件,每个都显示独特的系统属性。你可以自定义web面板的外观也可以关闭一些组件。 -![](http://180016988.r.cdn77.net/wp-content/uploads/2015/01/Lin-dash.png) +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/01/Lin-dash.png) 美好的一天! @@ -104,9 +104,9 @@ via: http://www.unixmen.com/install-linux-dash-web-based-monitoring-system-cento 作者:[Jijo][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/jijo/ -[1]:http://www.unixmen.com/install-epel-repository-centos-rhel-7/ +[1]:http://linux.cn/article-2324-1.html From 6f27330d6c0005ef34982dcf597005d918243dac Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 4 Apr 2015 16:51:38 +0800 Subject: [PATCH 0457/2517] translating --- ...-How to install and access CentOS remote desktop on VPS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md b/sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md index 9306f21c8d..bc7d64dbdc 100644 --- a/sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md +++ b/sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md @@ -1,3 +1,5 @@ +Translating---geekpi + Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS ================================================================================ > **Question**: I want to install CentOS desktop on VPS, and be able to access the desktop GUI remotely from home. What is a recommended way to set up and access CentOS-based remote desktop on VPS? @@ -118,4 +120,4 @@ via: http://ask.xmodulo.com/centos-remote-desktop-vps.html [a]:http://ask.xmodulo.com/author/nanni [1]:http://xmodulo.com/go/digitalocean [2]:http://xmodulo.com/how-to-install-gnome-desktop-on-centos.html -[3]:http://xmodulo.com/how-to-set-up-vnc-over-ssh.html \ No newline at end of file +[3]:http://xmodulo.com/how-to-set-up-vnc-over-ssh.html From 337e69c37d1b34ad2752931246e2bfb1f8b08052 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 4 Apr 2015 17:46:42 +0800 Subject: [PATCH 0458/2517] translated --- ...and access CentOS remote desktop on VPS.md | 123 ------------------ ...and access CentOS remote desktop on VPS.md | 121 +++++++++++++++++ 2 files changed, 121 insertions(+), 123 deletions(-) delete mode 100644 sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md create mode 100644 translated/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md diff --git a/sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md b/sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md deleted file mode 100644 index bc7d64dbdc..0000000000 --- a/sources/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md +++ /dev/null @@ -1,123 +0,0 @@ -Translating---geekpi - -Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS -================================================================================ -> **Question**: I want to install CentOS desktop on VPS, and be able to access the desktop GUI remotely from home. What is a recommended way to set up and access CentOS-based remote desktop on VPS? - -Nowadays teleworking or remote working with flexible hours is increasingly popular in tech industry. One of the enabling technologies behind this trend is remote desktop. Your desktop environment is in the cloud, and you can access the remote desktop anywhere you go, either from home or at your workplace. - -This tutorial describes how you can set up CentOS based remote desktop on VPS. Here we are going to demonstrate CentOS 7 based environment. - -We assume that you already created a CentOS 7 VPS instance somewhere (e.g., using [DigitalOcean][1] or Amazon EC2). Make sure that the VPS instance has at least 1GB memory. Otherwise, CentOS desktop will crash when you try to access remote desktop. - -### Step One: Install CentOS Desktop ### - -If an available CentOS image is a minimal version of CentOS without desktop, you will need to install desktop (e.g., GNOME) on your CentOS VPS before proceeding. For example, DigitalOcean's CentOS image is such a minimal version, which requires [desktop GUI installation][2] as follows. - - # yum groupinstall "GNOME Desktop" - -Reboot a VPS after finishing installation. - -### Step Two: Install and Configure VNC Server ### - -The next step is to install and configure VNC server. We are going to use TigerVNC, an open-source VNC server implementation. - - # yum install tigervnc-server - -Now create a user account (e.g., xmodulo) which will be used to access remote desktop. - - # useradd xmodulo - # passwd xmodulo - -When a user tries to access remote desktop using VNC, a dedicated VNC server daemon will be launched to handle its requests. This means that you will need to create a separate VNC server configuration for each user. - -CentOS 7 relies on systemd to manage and configure system services. So we are going to configure VNC server for xmodulo user using systemd. - -Let's first check the status of VNC server by running either command below: - - # systemctl status vncserver@:.service - # systemctl is-enabled vncserver@.service - -By default, freshly installed VNC service is not active (disabled). - -![](https://farm8.staticflickr.com/7613/16877514732_8ccffe7b6b_b.jpg) - -Now create a VNC service configuration for xmodulo user by copying a generic VNC service unit file as follows. - - # cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service - -Open the configuration file with a text editor, and replace with an actual user name (e.g., xmodulo) under [Service] section. Also, append "-geometry " parameter in ExecStart. In the end, the following two lines with bold font will be modified. - - # vi /etc/systemd/system/vncserver@:1.service - ----------- - - [Service] - Type=forking - # Clean any existing files in /tmp/.X11-unix environment - ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' - ExecStart=/sbin/runuser -l xmodulo -c "/usr/bin/vncserver %i -geometry 1024x768" - PIDFile=/home/xmodulo/.vnc/%H%i.pid - ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' - -Now set up (optional) VNC password for xmodulo user for security. For this, switch to the user, and run vncserver command. - - # su - xmodulo - # vncserver - -You will be prompted to enter a VNC password for the user. Once the password is set, you will need to use this password to gain access to remote desktop. - -![](https://farm9.staticflickr.com/8752/16692564599_9c4e5da1b6_b.jpg) - -Finally, reload services to activate the new VNC configuration: - - # systemctl daemon-reload - -and enable VNC service to make it start automatically upon boot: - - # systemctl enable vncserver@:1.service - -Check the port number that a VNC server is listening on by running: - - # netstat -tulpn | grep vnc - -![](https://farm8.staticflickr.com/7625/16692646729_7bb16c4897_b.jpg) - -Port 5901 is the default port number for VNC client to connect to a VNC server. - -### Step Three: Connect to Remote Desktop over SSH ### - -By design, Remote Frame Buffer (RFB) protocol used by VNC is not a secure protocol. Thus it is not a good idea to directly connect to a remote VNC server running on VPS using a VNC client. Any sensitive information such as password could easily be leaked from VNC traffic. So instead, I strongly recommend that you [tunnel VNC traffic][3] over a secure SSH tunnel, as described here. - -On a local host where you want to run VNC client, create an SSH tunnel to a remote VPS using the following command. When prompted for SSH password, type the password of the user. - - $ ssh xmodulo@ -L 5901:127.0.0.1:5901 - -Replace "xmodulo" with your own VNC user, and fill in the IP address of your VPS instance. - -Once an SSH tunnel is established, remote VNC traffic will be routed over the SSH tunnel, and be sent to 127.0.0.1:5901. - -Now go ahead and launch your favorite VNC client (e.g., vinagre), and connect to 127.0.0.1:5901. - -![](https://farm8.staticflickr.com/7639/16691289910_fae83510fb_o.png) - -You will be asked to enter a VNC password. When you type a correct VNC password, you will finally be able to CentOS remote desktop on VPS securely. - -![](https://farm8.staticflickr.com/7614/16877678411_aa8349f6b1_c.jpg) - -![](https://farm9.staticflickr.com/8702/16256320434_81f9b5b70c_c.jpg) - --------------------------------------------------------------------------------- - -via: http://ask.xmodulo.com/centos-remote-desktop-vps.html - -作者:[Dan Nanni][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://ask.xmodulo.com/author/nanni -[1]:http://xmodulo.com/go/digitalocean -[2]:http://xmodulo.com/how-to-install-gnome-desktop-on-centos.html -[3]:http://xmodulo.com/how-to-set-up-vnc-over-ssh.html diff --git a/translated/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md b/translated/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md new file mode 100644 index 0000000000..3108d1ed32 --- /dev/null +++ b/translated/tech/20150323 Linux FAQs with Answers--How to install and access CentOS remote desktop on VPS.md @@ -0,0 +1,121 @@ +Linux有问必答-- 如何在VPS上安装和访问CentOS远程桌面 +================================================================================ +> **提问**: 我想在VPS中安装CentOS桌面,并可以直接从我家远程访问GUI桌面。有什么建议可以在VPS上设置和访问CentOS远程桌面? + +如何远程办公或者远程弹性化工作制在技术领域正变得越来越流行。这个趋势背后的一个技术就是远程桌面。你的桌面环境在云中,你可以在任何你去的地方,或者在家或者工作场所访问你的远程桌面。 + +这个教程介绍如何VPS中设置基于CentOS的远程桌面。现在,我们会先展示CentOS的基础环境。 + +我们假设你已经创建了CentOS 7的VPS实例(比如,使用[DigitalOcean][1] 或者 Amazon EC2)。请确保你的VPS实例有至少1GB的内存。不然,CentOS将会在你访问远程桌面的时候回崩溃。 + +### 第一步: 安装CentOS桌面 ### + +如果现在的CentOS版本是没有桌面的最小版本,你需要先在VPS上安装桌面(比如GNOME)。比如,DigitalOcean的镜像就是最小版本,它需要如下安装[桌面GUI][2] + + # yum groupinstall "GNOME Desktop" + +在安装完成之后重启VPS。 + +### 第二步:安装和配置VNC服务器 ### + +接下来就是安装和配置VNC服务器。我们使用的是TigerVNC,一个开源的VNC服务实现。 + + # yum install tigervnc-server + +现在创建一个用户账户(比如:xmodulo)用来访问远程桌面。 + + # useradd xmodulo + # passwd xmodulo + +当一个用户尝试使用VNC访问远程桌面时,VNC守护进程就会启动来处理这个请求。这意味着你需要为每个用户创建一个独立的VNC配置文件。 + +CentOS依靠systemd来管理和配置系统服务。所以我们将使用systemd来为用户xmodulo配置VNC服务器。 + +首先让我们使用下面任意一条命令来检查VNC服务器的状态。 + + # systemctl status vncserver@:.service + # systemctl is-enabled vncserver@.service + +默认上,刚安装的VNC服务并没有激活(禁用)。 + +![](https://farm8.staticflickr.com/7613/16877514732_8ccffe7b6b_b.jpg) + +现在服务一份通用的VNC服务文件来位用户xmodulo创建一个VNC服务配置。 + + # cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service + +用本文编辑器来打开配置文件,用实际的用户名(比如:xmodulo)来替换[Service]下面的。同样。在ExecStart后面追加 "-geometry " 参数。最后,要修改下面两行加粗字体的两行。 + + # vi /etc/systemd/system/vncserver@:1.service + +---------- + + [Service] + Type=forking + # Clean any existing files in /tmp/.X11-unix environment + ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' + ExecStart=/sbin/runuser -l xmodulo -c "/usr/bin/vncserver %i -geometry 1024x768" + PIDFile=/home/xmodulo/.vnc/%H%i.pid + ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :' + +现在为用户xmodulo设置密码(可选)。首先切换到该用户,并运行vncserver命令。 + + # su - xmodulo + # vncserver + +你会被提示输入用户的VNC密码。密码设置完成后,你下次需要用这个密码来访问你的远程桌面。 + +![](https://farm9.staticflickr.com/8752/16692564599_9c4e5da1b6_b.jpg) + +最后,重新加载服务来使新的VNC配置生效: + + # systemctl daemon-reload + +在启动时自动启动VNC服务: + + # systemctl enable vncserver@:1.service + +检查vnc服务正在监听的端口: + + # netstat -tulpn | grep vnc + +![](https://farm8.staticflickr.com/7625/16692646729_7bb16c4897_b.jpg) + +端口5901是VNC默认的客户端连接到VNC服务器使用的端口。 + +### 第三步:通过SSH连接到远程桌面 ### + +设计上,VNC使用的远程帧缓存(RFB)并不是一种安全的协议。那么在VNC客户端上直接连接到VNC服务器上并不是一个好主意。任何敏感信息比如密码都可以在VNC流量中被轻易地泄露。因此,我强烈建议使用SSH隧道来[加密你的VNC流量][3]。 + +在你要运行VNC客户端的本机上,使用下面的命令来创建一个连接到远程VPS的SSH通道。当被要输入SSH密码时,输入用户的密码。 + + $ ssh xmodulo@ -L 5901:127.0.0.1:5901 + +用你自己的VNC用户名来替换“xmodulo”,并填上你自己的VPS IP地址。 + +一旦SSH通道建立之后,远程VNC流量就会通过ssh通道路由并发送到127.0.0.1:5901。 + +现在启动你最爱的VNC客户端(比如:vinagre),来连接到127.0.0.1:5901。 + +![](https://farm8.staticflickr.com/7639/16691289910_fae83510fb_o.png) + +你将被要求输入VNC密码。当你输入VNC密码时,你就可以安全地连接到CentOS的远程桌面了. + +![](https://farm8.staticflickr.com/7614/16877678411_aa8349f6b1_c.jpg) + +![](https://farm9.staticflickr.com/8702/16256320434_81f9b5b70c_c.jpg) + +-------------------------------------------------------------------------------- + +via: http://ask.xmodulo.com/centos-remote-desktop-vps.html + +作者:[Dan Nanni][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://ask.xmodulo.com/author/nanni +[1]:http://xmodulo.com/go/digitalocean +[2]:http://xmodulo.com/how-to-install-gnome-desktop-on-centos.html +[3]:http://xmodulo.com/how-to-set-up-vnc-over-ssh.html From 8558b8645a77a9bd3dd98be8f1d9494482d42632 Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 4 Apr 2015 18:32:39 +0800 Subject: [PATCH 0459/2517] PUB:20141204 Intense Gameplay--Try these 13 Roguelike games MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @FSSlc 这篇好难,辛苦了~我也校对了半天,虽然不是特别满意,不过也大致如此了。 --- ... Gameplay--Try these 13 Roguelike games.md | 401 ++++++++++++++++++ ... Gameplay--Try these 13 Roguelike games.md | 400 ----------------- 2 files changed, 401 insertions(+), 400 deletions(-) create mode 100644 published/20141204 Intense Gameplay--Try these 13 Roguelike games.md delete mode 100644 translated/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md diff --git a/published/20141204 Intense Gameplay--Try these 13 Roguelike games.md b/published/20141204 Intense Gameplay--Try these 13 Roguelike games.md new file mode 100644 index 0000000000..f271a53e1f --- /dev/null +++ b/published/20141204 Intense Gameplay--Try these 13 Roguelike games.md @@ -0,0 +1,401 @@ +想找点激烈的游戏?那就试试这 13 款 Roguelike 游戏吧! +================================================================================ +Roguelike 是角色扮演游戏的一个子类。从字面上看,它的意思是 “像 Rogue 的游戏”。Rogue 是一个关于地下城冒险的视频游戏,于 1980 年第一次发行,以极其上瘾而著称。这个游戏的目标是取得深藏于第 26 层的 "Amulet of Yendor",再返回到顶层逃出生天。 + +Roguelike 的准确定义并不存在,但这类游戏通常具有下面的特点: + +- 奇幻的叙事背景; +- 用程序产生关卡。游戏中的绝大多数场景在开始新的游戏时由游戏自动创建。这样做是为了鼓励玩家不断重玩; +- 回合制的地下城探险和战斗; +- 随机生成的基于贴片的图形环境; +- 随机发生战斗; +- 永久死亡 :在游戏中,死亡真的存在,一旦你的角色死了,那就真的结束了; +- 高难度。 + +这篇文章精心挑选了一些可运行在 Linux 平台下的 roguelike 游戏。假如你喜欢激烈、易上瘾的游戏,可以尝试这 13 款游戏。不要因它们原始的画质而退缩,一旦你沉浸其中,你将很快忘记画面的简陋。所有的这些都可以免费下载,并且几乎所有的游戏都是在开源协议下发行的。 + +---------- + +###Dungeon Crawl Stone Soup + +![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-Dungeon1.png) + +Dungeon Crawl Stone Soup 是一个开源的,单用户角色扮演类的 roguelike 游戏,玩家要在遍布危险而充满敌意的怪兽的地下城中进行探险和寻找宝藏,并在任务中拯救传说中的神秘 Zot 宝珠。 + +Dungeon Crawl Stone Soup 是 Linley 开发的 Dungeon Crawl 游戏的延续。它是公开开发的,并邀请 Crawl 社区的人员来参与其中。 + +Dungeon Crawl 有着超棒且深层次的战术游戏环节,创新的魔法和信仰系统,以及数量宏大的和你战斗的怪兽。Crawl 也是最难以攻陷的 roguelike 游戏之一。当你最终在游戏中通关,将胜利宣言张贴在 rec.games.roguelike.misc 时,你才会知道这有多么令人骄傲! + +特点包括: + +- 丰富多彩的、富含深层次战术的 roguelike 游戏; +- 手绘地图; +- 无数的金库; +- 漂亮的界面; +- 创新的魔法和信仰系统; +- 各种神灵,角色,物品和聪明的怪兽; + +- 网站: [crawl.develz.org][1] +- 开发者: Stone Soup 开发小组 +- 协议: Crawl General Public License +- 版本号: 0.15.2 + +---------- + +###Dwarf Fortress + +![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-DwarfFortress.png) + +Dwarf Fortress 是一个单人魔幻游戏,与 NetHack 类似。你可以在一个随机生成的持久的世界中,控制一个矮人哨兵或一个冒险者。 + +这个游戏的特色有:三种游戏模式(矮人要塞,冒险者,传说模式),一个独特的随机生成的世界(由地形,野生生物和传奇生物等组成), 阴森的战斗机制以及各种邪恶鱼群。 + +特点包括: + +- 在这个世界里,你想玩多久都可以。可以经历许多次游戏,记录历史事件,对更改进行跟踪等; +- 当你扮演的矮人在山群中寻找宝藏时,你可以对他们下达命令 + - 用各种材料来手工制作珍宝、物品,并可以用贵重金属、宝石等来改进它们; + - 通过各种手段保护你自己,防御来自敌对文明的袭击; + - 支持贵族,他们会管理你的民众 + - 让你的矮人高兴起来,了解他们工作和休闲时的想法; + - 不同的 Z 坐标可以使你在多个层级上建造你的堡垒。建立塔台或征服地下深处; + - 建立水闸来灌溉作物或用水淹没你的对手; +- 扮演一个探险者并进行探索,为荣誉而战或复仇 + - 与以前的游戏中的对手相遇; + - 在你经过的旅途中营救小城里的人们; + - 没有繁琐的情节,只需要探索; + - 无缝连接的漫游游戏世界-总共达到 197376 x 197376 平方 -可以在区域地图上更快速地穿行; + - 接受小镇或文明社会的领导所委托的任务; + - 可以找到你以前的角色,以一个新的角色带上他们来一场新的冒险,或者直接重新激活并使用他们; + - 通过 Z 轴使得你可以在各个地下城的不同层级间和结构间平滑的上下移动来和对手战斗; +- 战斗模式是通过技巧、身体部位、搏斗、在不同区域间蓄势和躲避,体验流血、疼痛,恶心及其他感受; +- 一个动态的天气模型跟踪风,湿度及空气流动,以创造冷暖气流锋面、风、暴风雨雪; +- 超过 200 种岩石和矿物类型被引入到了游戏世界,它们被放置在合适的地理环境中; +- 通过可更改的文本文件来添加生物,武器,植物,金属和其他对象; +- 以 16 色(包括黑色)渲染的扩展 ASCII 字符集,以及 8 种背景颜色(包括黑色); + +- 网站: [www.bay12games.com/dwarves/][2] +- 开发者: Tarn Adams +- 协议: 免费软件 +- 版本号: 0.40.19 + +---------- + +###Ancient Domains of Mystery + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-ADOM.png) + +Ancient Domains of Mystery (ADOM) 是一个 rogue-like 游戏,从 1994 年至今一直在不断开发。 + +它是一个包含复杂地下城的单用户游戏。你控制一个用种族、类别、属性、技巧和装备等描述的虚构角色。这个虚构角色正尝试着达到一个特定的目标(参考下面的介绍)并在一个困难的任务中取胜。为了完成任务,你必须在以前没有发现的隧道和地下城中探险,和丑陋的怪兽战斗,解开一系列遗忘的秘密,并找到宝藏。 + +在游戏期间,你在每次游戏时随机生成的各层地下城中探索。你也可能遇到某个特定的关卡,其中有着特定的挑战或者围绕某个特定主题而生成。 + +特点包括: + +- 拥有上百个地点的巨大游戏世界,例如城堡、随机生成的地下城、主题寺庙、墓地、古代遗迹、塔台和其他名胜; +- 各种各样的种族(矮人、drakeling、雾精灵、hurthling、兽人、巨魔、ratling 等等)(LCTT注:种族信息可以参考[这里](http://ancardia.wikia.com/wiki/Race) 和丰富的职业(战士、 元素法师、 刺客、 混沌骑士,决斗士等等)带来无限的游戏乐趣; +- 上百个怪兽和物品,其中的许多带有随机的增强特性; +- 迫使你在对力量的欲望和对诅咒的恐惧之间进行权衡的腐败体系; +- 法术、祈祷、思想技艺、炼金术、手工艺和更多; +- 多样的任务和分支故事主线; +- 许多完全不同的结局,可能改变现实本身。 + +- 网站: [www.adom.de][3] +- 开发者: Thomas Biskup +- 协议: Postcardware +- 版本号: 1.20 Prelease 20 + +---------- + +###Tales of Maj’Eyal (ToME) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-ToME.png) + +Tales of Maj’Eyal (ToME) (注:中文译名为 马基埃亚尔的传说) 是一个免费、开源的 roguelike 角色扮演游戏,包含特色的战术回合制战役和先进角色构建。它作为运行在 T-Engine 4.0 中的一个模块而被创造。 + +现在处于王权世纪(Age of Ascendancy),在长达一万年的冲突痛苦和混乱之后,我们所知的世界终于进入了一个相对和平的时期。 “魔法大爆裂(Spellblaze)” 留下的影响已经大为减缓, 大地的伤痕也慢慢地开始愈合。在薪火世纪(Age of Pyre)之后,各个文明也纷纷开始重建家园。(注:翻译来源于 [这里](http://www.qiyun.org/zhuanti/majiaiyaerdechuanshuo.htm))    + +特点包括: + +- 适合于那些没有 rogueline 体验的玩家; +- 同时支持图形界面和 ASCII 模式; +- 某些角色拥有多达 40 种的能力; +- 天赋系统; +- 战役引擎; +- 在线的持久状态/成就追踪; +- IRC 聊天客户端; +- 可扩展,可修改; +- 充满激情的音乐; +- 可解锁新的种族,类别,起始点,游戏模式和特点等; + +- 网站: [te4.org][4] +- 开发者: ToME 开发团队 +- 协议: GNU GPL v3.0 +- 版本号: 1.2.5 + +---------- + +###Cataclysm Dark Days Ahead + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Cataclysm.png) + +Cataclysm 是一个开源的 “后末世” roguelike 游戏,背景设定在由怪兽和僵尸带来的毁灭性的瘟疫后虚构的新英格兰(New England) 乡村。它是 Whale 开发的原有 Cataclysm 的继续,拓展了更多新的生物,建筑,游戏机制和其他特点。 + +尽管有些人描述它为一个 “僵尸游戏”,但 Cataclysm 远比一个“僵尸游戏”包含更多内容。玩家要在一个由程序生成的严酷、持久的世界中艰难生存下去。在一个死寂的文明世界中搜寻剩下的食物和装备,或者假如你足够幸运,搞到一辆装满汽油的汽车逃离 Dodge --这个如地狱一般的地方。从僵尸到巨型昆虫或机器人杀手以及更加奇怪和致命的东西,你要通过战斗来击败它们或逃离,以及和那些想要抢夺你的东西的那些同你一样的人战斗。 + +在许多方面上, Cataclysm 与大多数的 roguelike 游戏不同。它被设定在一个没有边界的三维世界里,而不是设定在一个垂直、线性的地下城中。这意味着相比于大多数的 roguel 游戏,探险将占一个更大的比重,而且这个游戏将具有更大的自由度。由于地图是如此的巨大,在每次游戏之间,它可以完全保持原样。假如你死了,并以一个新的角色开始,你的新游戏将会设定在同你最近呆过的游戏世界相同的世界里。同许多 roguelike 游戏一样,你可以获得先前角色的战利品;而与大多数 roguelike 不同的是,你也可以重新踏上先前角色的轨迹,并且对世界做出的任何戏剧性改变将会维持到你的下一次游戏。 + +特点包括: + +- 详细的角色创建,提供了数量众多的特性来选择; +- 防御模式,这是一个有着快节奏作战的休息模式; +- Bionics;类似于在许多其他游戏里的魔法系统; +- 基因突变, 有好的和坏的变化; +- 无界的,完全随机的世界地图,可以在角色交替时保持不变; +- 创造物品 + - 新的制作方法可能需要通过练习或从书本中获得来磨练你的知识; +- 逼真的火、烟和其他动态的地图特效; +- 昼/夜循环,需要睡觉。假如你必须的话,可以使用咖啡因来保持更长时间的清醒,但这不健康; +- 超过 300 种物品类型,包括众多的现实世界的枪支,药品和工具; + - 许多药品是上瘾的,并需要持续使用来避免负面效果; +- 通过修补门、窗、建造陷阱和巩固你的家的基石来防止一个僵尸的突然造访; +- 能够构建你自己的木屋,包括墙和屋顶; +- 可以驾驶在“后末世”发现的汽车兜风; + - 这个可以根据你的需求来修改,或甚至你可以自己制造一辆; +- 温度系统,太冷或太热都非常危险; +- 初步支持贴片界面; +- 根据选项生成世界,以及各种编辑方式; + +- 网站: [en.cataclysmdda.com][5] +- 作者: Kevin Granade 及其他 +- 协议: Creative Commons Attribution-ShareAlike 3.0 Unported License +- 版本号: 0.B + +---------- + +###Goblin Hack + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-GoblinHack.png) + +Goblin Hack 是一个开源 roguelike 游戏,基于 OpenGL 的平滑滚动的ASCII 图形界面。这个游戏受 NetHack 外观的启发,但更加快速且使用更少的按键。 + +Goblin Hack 有一个简洁的界面,在今天这个过度强调渲染的游戏世界中,似乎它对所有年龄段的玩家都有吸引力,并启发了这些玩家的想象力。 + +在被投进一个随机的正在生成的地下城之前,玩家可以从几个角色类别中选择一个角色。 + +特点包括: + +- 令人印象深刻的界面(相比于许多其他的 roguelike 游戏); +- 简洁的界面; +- 在被投进一个随机的正在生成的第一层地下城之前,玩家可以从几个角色类别中选择一个角色; +- 手动保存游戏; + +- 网站: [goblinhack.sourceforge.net][6], [github.com/goblinhack/goblinhack][7] +- 作者: Neil McGill +- 协议: GNU GPL v2 +- 版本号: 1.19 + +---------- + +###SLASH'EM + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-SlashEM.png) + +Super Lotsa Added Stuff Hack - Extended Magic (SLASH'EM) 是一个角色扮演游戏,在其中你控制一个单独的角色。SLASH'EM 是 NetHack 的一个变种。它拥有一个和 Rogue、ADOM、Anghand 及 NetHack 相似的界面和游戏玩法。你通过键盘来控制角色的动作,以一个俯视的视角来查看这个世界。 + +背景: Amulet of Yendor 已被偷走,不仅如此,偷走 amulet 的 Wizard of Yendor(坏蛋)似乎深藏于 Dungeons of Doom(危险的地方)。 + +特点包括: + +- 提供额外的特色、怪兽和项目; +- 新颖的特点包括僧人职业和类似推箱子的关卡; +- 主地下城比在 NetHack 中的要大很多; + +- 网站: [www.slashem.org][8] +- 开发者: Slash'EM 开发团队 +- 协议: MIT License, NetHack General Public License +- 版本号: 0.0.7E7F3 + +---------- + +###NetHack + +![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-NetHack.jpg) + +NetHack 是一个极简,但又非常吸引人的具有地下城与龙风格的冒险游戏。“net”元素指的是它的发展已经根据网络进行了调整,“hack”元素指的是角色扮演游戏的一种类型,以乱砍、猛砍著称,着眼于战斗。 + +在 NetHack 中,你扮演凶猛的战士、巫师或许多其他职业中的一种,一路战斗着,为你的神灵获取 Amulet of Yendor(可以说这是一个倒退!)。在这个过程中,你可能会遇到一个或两个 quantum mechanic(LCTT 译注:从[这里](http://nethack.wikia.com/wiki/Quantum_mechanic)得知,这指的是一种怪兽),或者可能遇到一个小型的太空舰队,抑或是 —— 假如你*足够*幸运会遇到 —— Ravenous Bugblatter Beast of Traal。(LCTT 译注:我参考了[这里](http://nethack.wikia.com/wiki/Douglas_Adams))。 + +特点包括: + +- 45-50 个关卡, 其中的大多数随机生成; +- 各种各样的物品:武器、盔甲、卷轴、药水、戒指、宝石和各种各样的工具,如钥匙和灯; +- 祝福和诅咒; +- 永久死亡: 若没有对当前的保存文件进行备份,失效的角色就找不回来了; +- 界面: + - 文本模式; + - 图形化界面, 使用 X、Qt 工具集或 GNOME 库; + +- 网站: [www.nethack.org][9] +- 开发者: NetHack 开发团队 +- 协议: NetHack 通用公共许可证 +- 版本号: 3.4.3 + +---------- + +###Ascii Sector + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-AsciiSector.png) + +Ascii Sector 是一个免费的太空战斗/探险/交易游戏,它基于经典的电脑游戏 `Wing Commander: Privateer`,后者由 Origine Systems 公司于 1993 年发布。 + +在 Ascii Sector 中,刚开始你将驾驶一艘简易的飞船,然后可以通过接受任务或者贩卖物品来挣得足够多的钱以升级你的飞船或重新再买一艘。不管是在太空中,还是在地面上,抑或是在飞船上,你可以专注于致命的战斗;并且通过使用 Ascii Sector 的脚本语言,你还可以为游戏创造自己的任务或享受其他玩家创造的任务。 + +特点包括: + +- 使用 ANSI 字符集生成图形界面; +- 真正的深入到游戏中; +- 提供各种基地,任务,商品和飞船; +- 飞船型号包括: Broadsword, Centurion, Demon, Dralthi, Drayman, Galaxy, Gladius, Gothri, Kamekh, Nexus, Orion, Paradign, Stileto, Talon, Tarsus 和 Ulysses; +- 四个象限: Alizarin, Crimson, Mauve, 和 Viridian; +- 可下载的任务; +- 任务可用脚本编辑; +- Ascii Sector 任务语言,在 Ascii Sector 宇宙中创造你自己的故事; +- 可以袭击或抢劫星球上的 NPC(非玩家控制角色); +- 可以到处移动的持久性舰队、可以改变系统的控制、引来敌人的舰队、回基地修复或重建; +- 可以登录系统受损的飞船; +- 可下载高质量的音乐文件; + +- 网站: [www.asciisector.net][10] +- 开发者: Christian Knudsen +- 协议: 免费软件 +- 版本号: 0.7.1.4 + +---------- + +###Angband + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Angband.png) + +Angband 是一个免费、单用户、使用 ASCII 字符图形化的地下城探险游戏,在其中你将以一个冒险者的角色探索一个深深的地下城,与怪兽战斗,获得你能取得的最好武器,准备着与黑暗之主 Morgoth 的最后决战。从上世纪九十年代开始,它一直在持续地开发着。 + +Angband 沿袭了 Rogue 和 NetHack 的风格路线。它由 Moria 和 Umoria 游戏衍生而来,基于 Rogue 回合制。它经常被描述为一个 “roguelike”游戏,因为它的外观和游戏体验与 Rogue 非常相似。很多游戏中的新生物、物品都来自 J.R.R Tolkien 的画作,尽管有些野兽直接来源于经典的神话、龙与地下城、Rolemaster,或 Angband 的原开发者的脑海中。 + +特点包括: + +- 100 层地下城; +- 随机产生的新关卡; +- 可以选择成为人类、半精灵、精灵、霍比特人、地精、矮人,半兽人,半巨魔, 登丹人 ,高等精灵,或者狗头人; +- 神器; +- 施法; +- 怪物; +- 怪物坑; +- 怪物巢穴; + +- 网站: [rephial.org][11] +- 开发者: Angband 开发小组 +- 协议: GNU GPL v2 +- 版本号: 3.5.0 + +---------- + +###UnNetHack + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-UnNetHack.png) + +UnNetHack 是 NetHack 的一个分支版本。NetHack 最开始于 1987 年发行,并且许多游戏玩家认为它是计算机世界所能提供的最好游戏体验的游戏之一。 + +特点包括: + +- 增加了许多针对 NetHack 的增强,如额外的怪兽、更多的关卡、许多新的元素、更多的危险、更具挑战性的游戏,以及最重要的,相比普通的 NetHack,它更具娱乐性; +- 帮助新手开始的教程; + +- 网站: [sourceforge.net/apps/trac/unnethack][12] +- 作者: Patric Mueller +- 协议: Nethack General Public License +- 版本号: 5.1.0 + +---------- + +###Hydra Slayer + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-HydraSlayer.png) + +Hydra Slayer 是一个专注于杀死九头蛇的开源 Roguelike 游戏。它受到了希腊神话、地下城探险、MathRL seven day roguelike ,和一些关于勇者杀死多头野兽的数字谜题等启发。 + +特点如下: + +- 独特的游戏机制; +- 混合希腊神话和数字迷宫的主题; +- 传统的 roguelike ASCII 字符界面或贴片/3D 界面; +- 5 种人物角色,具有极为不同的战术、力量及弱点; +- 28 种敌人类型: + - 10 种基本的九头蛇类型(每种类型都有两种变种); + - 8 种特殊类型的敌人; + - 可用作战术工具的无害蘑菇; +- 28 种装备(并包括材料和装备的大小/力量的变种); +- 15 种武器材料; +- 18 种非装备物品; +- 3 种可供选择的地图; +- 8 种关卡拓扑结构(包括莫比乌斯带和克莱因瓶); +- 11 个关卡生成器; +- 2 种结局; + +- 网站: [www.roguetemple.com/z/hydra][13] +- 开发者: Zeno Rogue +- 协议: GNU GPL v2 +- 版本号: 16.1 + +---------- + +###Brogue + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Brogue.png) + +Brogue 是一个开源的 Roguelike 游戏,它可以运行在 Mac OS X, Windows, Linux, iOS 和 Android 等平台下。 + +Brogue 是 Rogue 的一个直系分支,后者是一个最早由 Michael Toy 和 Glenn Wichman 于 1980 年左右开发的地下城探险视频游戏。与其他受欢迎的现代 Roguelike 游戏不同, Brogue 追求简单而不是复杂性,同时尽力确保游戏的不同组成之间的联系是有趣且纷繁多彩。 + +这个游戏的目标是取得深藏于地下第 26 层的 "Amulet of Yendor",再返回到地面逃出生天。对于那些技术娴熟且想进一步探险的人来说,位于 26 层之下的每层均包含 3 颗 lumenstone (流明石)(LCTT 译注:此处与我在[这里](http://brogue.wikia.com/wiki/Lumenstone)看到的有些出入),获得它们,将在胜利的基础上被授予额外的得分。 + +Brogue 是一个富有挑战性的游戏,但玩起来非常有趣。尽量不要因游戏的高难度而灰心;试玩一段时间之后,你会发现它变得非常吸引人。 + +特点如下: + +- 追求简单而非复杂; +- 对用户友好; +- 相比于 Rogue, Brogue 关卡生成更加复杂; +- 移除了 XP 和 水平系统 ; +- 陷阱,防护性物品; +- 额外的怪兽类型和魔法物品; + +- 网站: [sites.google.com/site/broguegame][14] +- 作者: Brian Walker +- 协议: GNU Affero GPL +- 版本号: 1.7.3 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/201412031524381/RoguelikeGames.html + +作者:Frazer Kline +译者:[FSSlc](https://github.com/FSSlc) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://crawl.develz.org/ +[2]:http://www.bay12games.com/dwarves/index.html +[3]:http://www.adom.de/ +[4]:http://te4.org/ +[5]:http://en.cataclysmdda.com/ +[6]:http://goblinhack.sourceforge.net/ +[7]:https://github.com/goblinhack/goblinhack +[8]:http://www.slashem.org/ +[9]:http://www.nethack.org/ +[10]:http://www.asciisector.net/ +[11]:http://rephial.org/ +[12]:http://sourceforge.net/apps/trac/unnethack/ +[13]:http://www.roguetemple.com/z/hydra/ +[14]:lhttps://sites.google.com/site/broguegame/ \ No newline at end of file diff --git a/translated/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md b/translated/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md deleted file mode 100644 index aedc2fe881..0000000000 --- a/translated/share/20141204 Intense Gameplay--Try these 13 Roguelike games.md +++ /dev/null @@ -1,400 +0,0 @@ -寻求激烈的游戏玩法?那就试试这 13 款 Roguelike 游戏吧 -================================================================================ -Roguelike 是角色扮演游戏的一个子类。从字面上看,它的意思是 “像 Rogue 的游戏”。Rogue 是一个关于地下城冒险的视频游戏,于 1980 年第一次发行,以友好、易上瘾而著称。这个游戏的目标是取得深藏于第 26 层的 "Amulet of Yendor",再返回到顶层逃出生天。 - -Roguelike 的准确定义并不存在,但这类游戏通常具有下面的特点: - -- 奇幻的叙事背景; -- 程序性的关卡产生。每个新的游戏环节中的游戏世界均由游戏产生。这样做是为了鼓励玩家重玩; -- 回合制的地下城探险和战斗; -- 随机生成的基于瓷砖的(Tile-based)图形环境; -- 随机的冲突生成; -- 永久死亡 。在游戏中,死亡真的存在,一旦你死了,就代表你真的结束了。 -- 高难度。 - -这篇文章精心挑选了一些可运行在 Linux 平台下的 roguelike 游戏。假如你喜欢激烈、易上瘾的游戏,可以尝试这 13 款游戏。不要因它们原始的画质而退步,一旦你沉浸其中,你将很快忘记画面的简陋。所有的这些都可以免费下载,并且几乎所有的游戏都是在开源协议下发行的。 ----------- - -![](http://www.linuxlinks.com/portal/content2/png/DungeonCrawlStoneSoup.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-Dungeon1.png) - -Dungeon Crawl Stone Soup 是一个开源的,单用户角色扮演类的 roguelike 游戏,玩家要在充满危险和不友好的怪兽的地下城中进行探险和寻找宝藏,并在任务中拯救 mystifyingly fabulous Orb of Zot(注:这里我不知如何翻译) - -Dungeon Crawl Stone Soup 是 Linley 开发的 Dungeon Crawl 游戏的延续。它被公开地开发并邀请 Crawl 社区的人员来参与其中。 - -Dungeon Crawl 有着超棒且深层次的战术游戏环节,创新的魔法和信仰系统,以及数量宏大的可供战斗的怪兽。Crawl 也是最难以攻陷的 roguelike 游戏之一。当你最终在游戏中通关并将你的胜利宣言张贴在 rec.games.roguelike.misc ,这时在你心中,你知道你已经取得了什么。 - -特点有: - -- 丰富多彩的, 富含深层次战术的 roguelike 游戏; -- 手绘地图; -- 无数的金库; -- 漂亮的界面; -- 创新的魔法和信仰系统; -- 广泛的神灵,角色,物品和聪明的怪兽; - -- 网站: [crawl.develz.org][1] -- 开发者: Stone Soup 开发小组 -- 协议: Crawl General Public License -- 版本号: 0.15.2 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/DwarfFortress.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-DwarfFortress.png) - -Dwarf Fortress 是一个绝妙的单人游戏,与 NetHack 类似。你可以在一个随机生成的持久的世界中,控制一个矮人哨兵或一个冒险者。 - -这个游戏的特色有:三种游戏模式(矮人要塞,冒险者,传说模式),一个独特的随机生成的世界(由地形,野生生物和传说等组成), 阴森的战斗机制以及各种恶性的鲤鱼。 - -特点包括: - -- 在这个世界里,你想持续多久都可以。可以经历许多次游戏,记录历史事件,对更改进行跟踪等; -- 当你的矮人在山群中寻找宝藏时,你可以对它们下达命令 - - 用各种材料来手工制作珍宝、家具,并可以用贵重金属,宝石等来改进这些珍宝、家具; - - 在广度和深度上保护你自己,防御来自敌对文明的袭击; - - 当他们有求于你的民众时,支持贵族(注:感觉自己翻译错了这句) - - 维持你的矮人的高兴状态,在它们工作和休闲时读取它们的思想; - - Z 坐标可以使你在多个层级上建造你的堡垒,建立塔台或征服深处; - - 建立水闸来为耕种调水或水淹你的对手; -- 扮演一个探险者并进行探索,为荣誉而战或复仇 - - 与以前的游戏中的对手相遇; - - 在你经过的旅途中营救小城里的人群 - - 在没有笨重的绘画限制下探险; - - 无缝的漫游游戏世界-总共达到 197376 x 197376 平方 -或者在区域地图上更快速地穿行; - - 接受小城或文明社会的领导委托的任务 - - 收回并与你扮演的老角色相遇,在一次探险中,以一个新的角色带上它们或者直接使用它们; - - Z 轴使得你可以在各个地牢层级间无缝地上下移动以及调整结构的尺寸来和对手战斗; -- 战斗模型的使用技巧,身体组成,搏斗,在方块之间进行操作和躲避,流血,疼痛,恶心及其他; -- 一个动态的天气模型用来跟踪风,湿度及空气的动向,用来创造前线,风,暴风雨和暴风雪 -- 超过 200 种岩石和矿物类型被引入游戏世界,它们被放置在合适的地理环境中; -- 通过可更改的文本文件来添加生物,武器,植物,金属和其他对象; -- 扩展的以 16 色(包括黑色)渲染的 ASCII 角色集合,以及 8 种背景颜色(包括黑色); - -- 网站: [www.bay12games.com/dwarves/][2] -- 开发者: Tarn Adams -- 协议: 免费软件 -- 版本号: 0.40.19 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/ADOM.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-ADOM.png) - -Ancient Domains of Mystery (ADOM) 是一个 rogue-like 游戏,自从 1994 年开始,它一直在开发。 - -它是一个包含复杂地牢的单用户游戏。你控制一个用种族,类别,属性,技巧和装备等描述的虚构角色。这个虚构角色正尝试着达到一个特定的目标(参考下面的介绍)并在一个困难的任务中取胜。为了完成任务,你必须在以前没有发现的隧道和地牢中探险,和丑陋的怪兽战斗,解开一系列遗忘的秘密,并找到宝藏。 - -在游戏期间,你在每次游戏时随机生成的各层地牢中探索。你也可能遇到某个特定的关卡,其中有着特定的挑战或者围绕某个特定主题而生成。 - -特点包括: - -- 拥有上百个地点的巨大游戏世界,例如城堡,随机生成的地牢,主题寺庙,墓地,古代遗迹,塔台和其他名胜; -- 各种各样的种族(dwarves, drakelings, mist elves, hurthlings, orcs, trolls, ratlings and many others)(注:种族信息可以参考[这里](http://ancardia.wikia.com/wiki/Race) 和更多的类别 (fighters, elementalists, assassins, chaos knights, duelists and much more),允许无限的游戏风格; -- 上百个怪兽和物品,其中的许多拥有增强的随机特性; -- 一个堕落系统,迫使你在对力量的欲望和对诅咒的恐惧之间进行权衡; -- 法术,祈祷,思想技艺,炼金术,手工艺和更多; -- 多样的任务和分支故事主线; -- 许多完全不同的结局,可能改变现实本身 - -- 网站: [www.adom.de][3] -- 开发者: Thomas Biskup -- 协议: Postcardware -- 版本号: 1.20 Prelease 20 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/ToME.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-ToME.png) - -Tales of Maj’Eyal (ToME) (注:中文翻译为 马基埃亚尔的传说) 是一个免费,开源的 roguelike 角色扮演游戏,包含特色的战术回合制战役和先进的建筑。它作为运行在 T-Engine 4.0 中的一个模块而被创造。 - -现在处于王权世纪(Age of Ascendancy),在长达一万年的冲突痛苦和混乱之后,我们所知的世界终于进入了一个相对和平的时期。 “魔法大爆裂(Spellblaze)” 留下的影响已经大为减缓, 大地的伤痕也慢慢地开始愈合。在薪火世纪(Age of Pyre)之后,各个文明也纷纷开始重建家园。(注:翻译来源于 [这里](http://www.qiyun.org/zhuanti/majiaiyaerdechuanshuo.htm))    -特点包括: - -- 适合于那些没有 rogueline 体验的玩家; -- 同时支持图形界面和 ASCII 模式; -- 某些角色拥有超过 40 种能力; -- 天赋系统; -- 战役引擎; -- 在线的持久状态/成就追踪; -- IRC 聊天客户端; -- 可扩展,可修改; -- 充满激情的音乐; -- 解锁新的种族,类别,起始点,游戏模式和特点等; - -- 网站: [te4.org][4] -- 开发者: ToME 开发团队 -- 协议: GNU GPL v3.0 -- 版本号: 1.2.5 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/CataclysmDarkDaysAhead1.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Cataclysm.png) - -Cataclysm 是一个开源的 “后末世” roguelike 游戏,背景设定在由怪兽和僵尸带来的毁灭性的瘟疫后虚构的新英格兰(New England) 乡村。它是 Whale 开发的原有 Cataclysm 的继续,拓展了更多新的生物,建筑,游戏机制和其他特点。 - -尽管有些人描述它为一个 “僵尸游戏”,但 Cataclysm 远比一个“僵尸游戏”包含更多内容。玩家要在一个由程序生成的严酷,持久的世界中艰难生存下去。在一个死寂的文明世界中为了食物,装备或者假如你足够幸运,一辆装满汽油的汽车来逃离 Dodge --这个如地狱一般的地方-- 而苦苦寻觅。通过战斗来击败或从一系列强大的怪兽底下逃离,从僵尸到巨型昆虫或机器人杀手以及更加奇怪和致命的东西中逃离,以及和那些想要得到你拥有的东西的同你一样的人战斗。 - -在许多方面上, Cataclysm 同大多数的 roguelike 游戏有很大的不同。它被设定在一个无界的三维世界里,而不是设定在一个垂直、线性的地牢。这意味着相比于大多数的 roguel 游戏,探险将占一个更大的比重,而且这个游戏将具有更少的线性性。由于地图是如此的巨大,在每次游戏之间,它可以完全保持原样。假如你死了,并以一个新的角色开始,你的新游戏将会设定在同你最近呆过的游戏世界相同的世界里。同许多 roguelike 游戏一样,你可以获得先前角色的战利品;而与大多数 roguelike 不同的是,你也可以重新踏上先前角色的轨迹,并且对世界做出的任何戏剧性改变将会维持到你的下一次游戏。 - -特点包括: - -- 详细的角色创造,提供了数量众多的特性来选择; -- 防御模式, 一个休息模式和快节奏作战; -- Bionics; 类似于在许多其他游戏里的 魔法系统; -- 基因突变, 有好的和坏的; -- 无界的, 完全随机的世界地图,可以在角色交替时保持不变; -- 创造物品 - - 新的制作方法可能需要通过练习或从书本中获得来磨练你的知识; -- 逼真的火,烟和其他动态的地图特效; -- 一个昼/夜循环,需要睡觉。假如你必须的话,可以使用咖啡因来保持更长时间的清醒,但这不健康; -- 超过 300 种物品类型,包括众多的现实世界的枪支,药品和工具; - - 许多药品是上瘾的,并需要持续使用来避免负面效果; -- 通过修补门,窗,建造陷阱和巩固你的家的基石来防止一个僵尸的突然造访; -- 拥有构建你自己的木质建筑,包括墙和屋顶的能力; -- 使用汽车在“后末世”发现的景观中兜风; - - 这个可以根据你的需求来修改,或甚至你可以从底层建造一个景观; -- 一个温度系统,太冷或太热都非常危险; -- 初步支持 tile 界面; -- 一个类似于 World Gen 一样的选项和多彩的编辑方法; - -- 网站: [en.cataclysmdda.com][5] -- 作者: Kevin Granade 及其他 -- 协议: Creative Commons Attribution-ShareAlike 3.0 Unported License -- 版本号: 0.B - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/GoblinHack1.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-GoblinHack.png) - -Goblin Hack 是一个拥有基于 OpenGL 的平滑滚动的图形界面的开源 roguelike 游戏。这个游戏受 NetHack 外观的启发,但更加快速且使用更少的按键。 - -Goblin Hack 有一个简洁的界面,在今天这个过度渲染的游戏世界中,似乎它对所有年龄段的玩家都有吸引力,并启发了这些玩家的想象力。 - -在被投进一个随机的正在生成的地牢之前,玩家可以从几个角色类别中选择一个角色。 - -特点包括: - -- 令人印象深刻的界面(相比于许多其他的 roguelike 游戏); -- 简洁的界面; -- 在被投进一个随机的正在生成的第一层地牢之前,玩家可以从几个角色类别中选择一个角色; -- 手动保存游戏; - -- 网站: [goblinhack.sourceforge.net][6], [github.com/goblinhack/goblinhack][7] -- 作者: Neil McGill -- 协议: GNU GPL v2 -- 版本号: 1.19 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/SLASH%27EM.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-SlashEM.png) - -Super Lotsa Added Stuff Hack - Extended Magic (SLASH'EM) 是一个角色扮演游戏,在其中你控制一个单独的角色。SLASH'EM 是 NetHack 的一个变种。它拥有一个和 Rogue, ADOM, Anghand 及 NetHack 相似的界面和游戏玩法。你通过键盘来控制角色的动作,以一个俯视的视角来查看这个世界。 - -背景: Amulet of Yendor 已被偷走,不仅如此,偷走 amulet 的 Wizard of Yendor(不是一个好人)似乎深藏于 Dungeons of Doom(不是一个友好的地方)。 - -特点包括: - -- 提供额外的特点、怪兽和项目; -- 新颖的特点包括僧人种类和类似推箱子的关卡; -- 主要的地牢比在 NetHack 中的要大很多; - -- 网站: [www.slashem.org][8] -- 开发者: Slash'EM 开发团队 -- 协议: MIT License, NetHack General Public License -- 版本号: 0.0.7E7F3 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/NetHack.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games/Screenshot-NetHack.jpg) - - -NetHack 是一个绝妙的简洁,但又非常吸引人的具有地下城与龙风格的冒险游戏。“net”元素指的是它的发展已经根据网络进行了协调,“hack”元素指的是角色扮演游戏的一种体裁,以乱砍、猛砍著称,着眼于战斗。 - -在 NetHack 中,你扮演激烈的战士、精灵或许多其他种类的一部分角色,一路战斗着,为你的神灵获取 Amulet of Yendor(可以说这是一个倒退!)。在这个过程中,你可能会遇到一个或两个 quantum mechanic(注:从[这里](http://nethack.wikia.com/wiki/Quantum_mechanic)得知,这指的是一种怪兽),或者可能遇到一个小型的太空舰队,抑或是 --假如你*足够*幸运 -- Ravenous Bugblatter Beast of Traal。(注:我参考了[这里](http://nethack.wikia.com/wiki/Douglas_Adams))。 - -特点包括: - -- 45-50 个关卡, 其中的大多数随机生成 -- 各种各样的物品:武器、盔甲、卷轴、药水、戒指、宝石和各种各样的工具,如钥匙和灯 -- 祝福和诅咒 -- Permadeath永久死亡: 若没有对当前的保存文件进行备份,过期的角色不能再找回; -- 界面: - - 控制台; - - 图形化界面, 使用 X、Qt 工具集或 GNOME 库 - -- 网站: [www.nethack.org][9] -- 开发者: NetHack 开发团队 -- 协议: NetHack 通用公共许可证 -- 版本号: 3.4.3 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/AsciiSector.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-AsciiSector.png) - -Ascii Sector 是一个免费的太空战斗/探险/交易游戏,它基于经典的电脑游戏 `Wing Commander: Privateer`,后者由 Origine Systems 公司于 1993 年发布。 - -在 Ascii Sector 中,刚开始你将驾驶一艘简易的飞船,然后可以通过接受任务或者贩卖物品来挣得足够多的钱以升级你的飞船或重新再买一艘。不管是在太空中,还是在地面上,抑或是在飞船上,你可以专注于致命的战斗;并且通过使用 Ascii Sector 的脚本语言,你还可以为游戏创造自己的任务或享受其他玩家创造的任务。 - -特点包括: - -- 图像界面使用 ANSI 人物集; -- 真正的深入到游戏中; -- 提供各种基地,任务,商品和飞船; -- 飞船型号包括: Broadsword, Centurion, Demon, Dralthi, Drayman, Galaxy, Gladius, Gothri, Kamekh, Nexus, Orion, Paradign, Stileto, Talon, Tarsus 和 Ulysses; -- 四个象限: Alizarin, Crimson, Mauve, and Viridian; -- 可下载的任务; -- 任务可用脚本编辑; -- Ascii Sector 任务语言,在 Ascii Sector 宇宙中创造你自己的故事; -- 可以袭击或抢劫位于星球上的 NPCs(指非玩家控制角色); -- 可以到处移动的持久性舰队、可以改变系统的控制、玩弄敌人的舰队、回基地修复或重建; -- 可以登录系统受损的飞船; -- 可下载高质量的音乐文件; - -- 网站: [www.asciisector.net][10] -- 开发者: Christian Knudsen -- 协议: 免费软件 -- 版本号: 0.7.1.4 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/Angband.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Angband.png) - -Angband 是一个免费、单用户、图形界面的地下城探险游戏,它使用 ASCII 字符的角色,在其中你将以一个冒险者的角色探索一个深深的地下城,与怪兽战斗,获得你能取得的最好武器,准备着与黑暗之主 Morgoth 的最后绝战。从上世纪九十年代开始,它一直在持续地开发着。 - -Angband 沿袭了 Rogue 和 NetHack 的风格路线。它由 Moria 和 Umoria 游戏衍生而来,反过来这两个游戏都以 Rogue 为基础。它经常被描述为一个 “roguelike”游戏,因为它的外观和游戏体验与 Rogue 非常相似。很多游戏中的新生物、物品都来自 J.R.R Tolkien 的画作,尽管有些野兽直接来源于经典的神话、Dungeons & Dragons, Rolemaster(根据wikipedia,这两个都是角色扮演游戏的名称)、或原来 Angband 开发者的脑海中。 - -特点包括: - -- 100 层地牢; -- 随机产生的新关卡; -- 可以选择成为人类、半精灵、精灵、霍比特人、地精、矮人,半兽人,半巨魔, 登丹人 ,高等精灵,或者狗头人; -- 神器; -- 施法; -- 怪物; -- 怪物坑; -- 怪物巢穴; - -- 网站: [rephial.org][11] -- 开发者: Angband 开发小组 -- 协议: GNU GPL v2 -- 版本号: 3.5.0 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/UnNetHack1.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-UnNetHack.png) - -UnNetHack 是 NetHack 的一个分支。NetHack 最开始于 1987 年发行,并且许多游戏玩家认为它是计算机世界所能提供的最好游戏体验的游戏之一。 - -特点包括: - -- 增加了许多针对 NetHack 的增强,如额外的怪兽、更多的关卡、许多新的元素、更多的危险、更具挑战性的游戏,以及最重要的,相比普通的 NetHack,它更具娱乐性; -- 帮助新手开始的教程; - -- 网站: [sourceforge.net/apps/trac/unnethack][12] -- 作者: Patric Mueller -- 协议: Nethack General Public License -- 版本号: 5.1.0 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/HydraSlayer.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-HydraSlayer.png) - -Hydra Slayer 是一个专注于杀死九头蛇的开源 Roguelike 游戏。它受希腊神话、地下城探险、MathRL 七日 rouguelike,和一些关于勇敢的英雄杀死多头野兽的数字谜题等启发。 - -特点如下: - -- 独特的游戏机制; -- 混合希腊神话和数字迷宫的主题; -- 传统的 roguelike ASSCII 字符界面或 砖块/3D 界面; -- 5 种人物角色,具有极为不同的战术、力量及弱点; -- 28 种敌人类型: - - 10 种基本的九头蛇类型(每种类型都有两种变种); - - 8 种特殊类型的敌人; - - 无害的蘑菇可用作战术工具; -- 28 种装备(并包括材料和装备的大小/力量的变种); -- 15 种武器材料; -- 18 种不可装备项; -- 3 种可供选择的地图; -- 8 种层级拓扑结构(包括莫比乌斯带和克莱因瓶); -- 11 个等级; -- 2 种胜利结局; - -- 网站: [www.roguetemple.com/z/hydra][13] -- 开发者: Zeno Rogue -- 协议: GNU GPL v2 -- 版本号: 16.1 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/Brogue1.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Brogue.png) - -Brogue 是一个开源的 Roguelike 游戏,它可以运行在 Mac OS X, Windows, Linux, iOS 和 Android 等平台下。 - -Brogue 是 Rogue 的一个直系分支,后者是一个由 Michael Toy 和 Glenn Wichman 于 1980 年左右最先开发的地下城探险视频游戏。与其他受欢迎的现代 Roguelike 游戏不同, Brogue 追求简单而不是复杂性,同时尽力确保游戏的不同组成之间的联系是有趣且纷繁多彩的。 - -这个游戏的目标是取得深藏于地下第 26 层的 "Amulet of Yendor",再返回到顶层逃出生天。对于那些技术娴熟且想进一步探险的人来说,位于 26 层之下的每层均包含 3 颗 lumenstone (流明石)(注:这里与我在[这里](http://brogue.wikia.com/wiki/Lumenstone)看到的有些出入),获得它们,将在胜利的基础上被授予额外的得分。 - -Brogue 是一个富有挑战性的游戏,但玩着仍有许多趣味。尽量不要因游戏的高难度而灰心;试玩一段时间之后,你会发现它变得非常吸引人。 - -特点如下: - -- 追求简单而非复杂; -- 对用户友好; -- 相比于 Rogue, Brogue 有一个更加复杂的层级划分; -- 移除了 XP 和 水平系统 ; -- 陷阱,保护项目; -- 额外的怪兽类型和魔法项目; - -- 网站: [sites.google.com/site/broguegame][14] -- 作者: Brian Walker -- 协议: GNU Affero GPL -- 版本号: 1.7.3 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/201412031524381/RoguelikeGames.html - -作者:Frazer Kline -译者:[FSSlc](https://github.com/FSSlc) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://crawl.develz.org/ -[2]:http://www.bay12games.com/dwarves/index.html -[3]:http://www.adom.de/ -[4]:http://te4.org/ -[5]:http://en.cataclysmdda.com/ -[6]:http://goblinhack.sourceforge.net/ -[7]:https://github.com/goblinhack/goblinhack -[8]:http://www.slashem.org/ -[9]:http://www.nethack.org/ -[10]:http://www.asciisector.net/ -[11]:http://rephial.org/ -[12]:http://sourceforge.net/apps/trac/unnethack/ -[13]:http://www.roguetemple.com/z/hydra/ -[14]:levelling system \ No newline at end of file From 00b31e30c927b5c2aed7a8c5d163e2c057abb4f5 Mon Sep 17 00:00:00 2001 From: Zhou Yifan Date: Sat, 4 Apr 2015 18:46:44 +0800 Subject: [PATCH 0460/2517] =?UTF-8?q?boredivan=E7=BF=BB=E8=AF=91=E4=B8=AD?= =?UTF-8?q?=EF=BC=9A=20=20=20=20=2020150205=20How=20To=20Scan=20And=20Chec?= =?UTF-8?q?k=20A=20WordPress=20Website=20Security=20Using=20WPScan,=20Nmap?= =?UTF-8?q?,=20And=20Nikto.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...WordPress Website Security Using WPScan, Nmap, And Nikto.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md b/sources/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md index 4af1fc99cb..4f84e2c4a2 100644 --- a/sources/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md +++ b/sources/tech/20150205 How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto.md @@ -1,3 +1,4 @@ +[boredivan翻译中] How To Scan And Check A WordPress Website Security Using WPScan, Nmap, And Nikto ================================================================================ ### Introduction ### @@ -421,4 +422,4 @@ via: http://www.unixmen.com/scan-check-wordpress-website-security-using-wpscan-n [4]:http://www.unixmen.com/install-nikto-web-scanner-check-vulnerabilities [5]:https://cirt.net/nikto/ [6]:http://osvdb.org/ -[7]:http://www.unixmen.com/secure-wordpress-website/ \ No newline at end of file +[7]:http://www.unixmen.com/secure-wordpress-website/ From 8bd33dd768be2c695b7c4739a9be600736651488 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 4 Apr 2015 22:22:00 +0800 Subject: [PATCH 0461/2517] =?UTF-8?q?PR:=E7=BF=BB=E8=AF=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md b/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md index 92ac657b5a..9f51f396b9 100644 --- a/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md +++ b/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md @@ -1,3 +1,4 @@ +翻译中 ictlyh How to Bind Apache Tomcat to IPv4 in Centos / Redhat ================================================================================ Hi all, today we'll learn how to bind tomcat to ipv4 in CentOS 7 Linux Distribution. From a7dc506e1a28a50f959598abaa259db170bcdbf2 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sat, 4 Apr 2015 23:23:49 +0800 Subject: [PATCH 0462/2517] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90:?= =?UTF-8?q?20150202=20How=20to=20Bind=20Apache=20Tomcat=20to=20IPv4=20in?= =?UTF-8?q?=20Centos=20or=20Redhat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ache Tomcat to IPv4 in Centos or Redhat.md | 80 ------------------- ...ache Tomcat to IPv4 in Centos or Redhat.md | 77 ++++++++++++++++++ 2 files changed, 77 insertions(+), 80 deletions(-) delete mode 100644 sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md create mode 100644 translated/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md diff --git a/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md b/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md deleted file mode 100644 index 9f51f396b9..0000000000 --- a/sources/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md +++ /dev/null @@ -1,80 +0,0 @@ -翻译中 ictlyh -How to Bind Apache Tomcat to IPv4 in Centos / Redhat -================================================================================ -Hi all, today we'll learn how to bind tomcat to ipv4 in CentOS 7 Linux Distribution. - -**Apache Tomcat** is an open source web server and servlet container developed by the [Apache Software Foundation][1]. It implements the Java Servlet, JavaServer Pages (JSP), Java Unified Expression Language and Java WebSocket specifications from Sun Microsystems and provides a web server environment for Java code to run in. - -Binding Tomcat to IPv4 is necessary if we have our server not working due to the default binding of our tomcat server to IPv6. As we know IPv6 is the modern way of assigning IP address to a device and is not in complete practice these days but may come into practice in soon future. So, currently we don't need to switch our tomcat server to IPv6 due to no use and we should bind it to IPv4. - -Before thinking to bind to IPv4, we should make sure that we've got tomcat installed in our CentOS 7. Here's is a quick tutorial on [how to install tomcat 8 in CentOS 7.0 Server][2]. - -### 1. Switching to user tomcat ### - -First of all, we'll gonna switch user to **tomcat** user. We can do that by running **su - tomcat** in a shell or terminal. - - # su - tomcat - -![Switch user to tomcat](http://blog.linoxide.com/wp-content/uploads/2015/01/switch-user-tomcat.png) - -### 2. Finding Catalina.sh ### - -Now, we'll First Go to bin directory inside the directory of Apache Tomcat installation which is usually under **/usr/share/apache-tomcat-8.0.x/bin/** where x is sub version of the Apache Tomcat Release. In my case, its **/usr/share/apache-tomcat-8.0.18/bin/** as I have version 8.0.18 installed in my CentOS 7 Server. - - $ cd /usr/share/apache-tomcat-8.0.18/bin - -**Note: Please replace 8.0.18 to the version of Apache Tomcat installed in your system. ** - -Inside the bin folder, there is a script file named catalina.sh . Thats the script file which we'll gonna edit and add a line of configuration which will bind tomcat to IPv4 . You can see that file by running **ls** into a terminal or shell. - - $ ls - -![finding catalina.sh](http://blog.linoxide.com/wp-content/uploads/2015/01/finding-catalina.sh_.png) - -### 3. Configuring Catalina.sh ### - -Now, we'll add **JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"** to that scripting file catalina.sh at the end of the file as shown in the figure below. We can edit the file using our favorite text editing software like nano, vim, etc. Here, we'll gonna use nano. - - $ nano catalina.sh - -![Catalina script](http://blog.linoxide.com/wp-content/uploads/2015/01/catalina-script.png) - -Then, add to the file as shown below: - -**JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"** - -![configured catalina](http://blog.linoxide.com/wp-content/uploads/2015/01/configured-catalina.png) - -Now, as we've added the configuration to the file, we'll now save and exit nano. - -### 4. Restarting ### - -Now, we'll restart our tomcat server to get our configuration working. We'll need to first execute shutdown.sh and then startup.sh . - - $ ./shutdown.sh - -Now, well run execute startup.sh as: - - $ ./startup.sh - -![restarting apache tomcat server](http://blog.linoxide.com/wp-content/uploads/2015/01/restarting-tomcat-server.png) - -This will restart our tomcat server and the configuration will be loaded which will ultimately bind the server to IPv4. - -### Conclusion ### - -Hurray, finally we'have got our tomcat server bind to IPv4 running in our CentOS 7 Linux Distribution. Binding to IPv4 is easy and is necessary if your Tomcat server is bind to IPv6 which will infact will make your tomcat server not working as IPv6 is not used these days and may come into practice in coming future. If you have any questions, comments, feedback please do write on the comment box below and let us know what stuffs needs to be added or improved. Thank You! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/bind-apache-tomcat-ipv4-centos/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:http://www.apache.org/ -[2]:http://linoxide.com/linux-how-to/install-tomcat-8-centos-7/ \ No newline at end of file diff --git a/translated/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md b/translated/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md new file mode 100644 index 0000000000..5aff088f99 --- /dev/null +++ b/translated/tech/20150202 How to Bind Apache Tomcat to IPv4 in Centos or Redhat.md @@ -0,0 +1,77 @@ +在CentOS或者Redhat中如何为Apache Tomcat绑定IPv4 +================================================================================ +今天我们来学习一下如何在CentOS 7 Linux分布式系统中为Tomcat绑定IPv4 + +**Apache Tomcat** 是由[Apache Software Foundation][1] 开发的开源web服务器和servlet容器。它实现了Java Servlet,JavaServer页面(JSP),Java的统一表达式语言,以及Sun Microsystems的Java的WebSocket规范,并提供了一个运行java代码的web服务器环境。 + +如果由于默认绑定tomcat到IPv6而导致我们的web服务器不能正常工作,就有必要将tomcat绑定到IPv4。众所周知,IPv6是为设备分配IP地址的现代方法,虽然在不久的将来也许会得到应用,但是现在并没有得到完全应用。由于没有用处,目前我们并不需要将我们的Tomcat服务器向IPv6转换,我们应该将其绑定到IPv4。 + +在开始将tomcat绑定到IPv4之前,我们应该确保在我们的CentOS 7中已经安装了tomcat。这是一个[如何在CentOS 7.0服务器中安装tomcat 8][2]的指导。 + +### 1. 切换到tomcat用户 ### + +首先,我们要切换到 **tomcat** 用户。我们可以通过在shell或者终端中运行 **su tomcat** 命令完成。 + + # su tomcat + +![切换到tomcat用户](http://blog.linoxide.com/wp-content/uploads/2015/01/switch-user-tomcat.png) + +### 2. 找到文件 Catalina.sh ### + +现在我们要进入Apache Tomcat安装目录下的bin文件夹,通常是 **/usr/share/apache-tomcat-8.0.x/bin/**, 这里的x是 Apache Tomcat发行版的子版本号。因为我的CentOS 7服务器中安装的版本是8.0.18,这里我的目录是 **/usr/share/apache-tomcat-8.0.18/bin/**。 + + $ cd /usr/share/apache-tomcat-8.0.18/bin + +**注意:请用你系统中安装的Apache Tomcat的版本号替换8.0.18。** + +在bin目录中,有一个名字是catalina.sh的脚本文件。这就是我们要编辑的文件,我们将在里面增加一行将tomcat绑定到IPv4的配置信息。你可以通过在shell或者终端中运行命令 **ls** 来查看这个文件。 + + $ ls + +![查找文件 catalina.sh](http://blog.linoxide.com/wp-content/uploads/2015/01/finding-catalina.sh_.png) + +### 3. 配置 Catalina.sh ### + +如图所示,我们将在catalina.sh脚本文件的最后增加一行 **JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"**。我们可以使用我们喜欢的文本编辑器来编辑这个文件,例如nano,vim等等。这里我们使用nano。 + + $ nano catalina.sh + +![Catalina script](http://blog.linoxide.com/wp-content/uploads/2015/01/catalina-script.png) + +然后,如下图所示,将 **JAVA_OPTS= "$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"** 增加到文件。 + +![配置 catalina](http://blog.linoxide.com/wp-content/uploads/2015/01/configured-catalina.png) + +现在,我们已经将配置信息增加到文件中。保存文件并退出nano。 + +### 4. 重启 ### + +现在,我们通过重启tomcat服务器使配置生效。我们要先运行shutdown.sh,然后运行startup.sh。 + + $ ./shutdown.sh + +运行可执行文件startup.sh: + + $ ./startup.sh + +![重启apache tomcat 服务器](http://blog.linoxide.com/wp-content/uploads/2015/01/restarting-tomcat-server.png) + +这将重启我们的tomcat服务器并加载将服务器绑定到IPv4的配置信息。 + +### 结尾 ### + +好了,我们终于将我们运行在CentOS 7 Linux分布式系统上的tomcat服务器绑定到IPv4上了。尽管IPv6在不久的将来也许会得到应用,但由于现在还没有使用,如果因为将你的Tomcat服务器绑定到IPv6上而使得你的tomcat服务器不工作,就有必要将tomcat绑定到IPv4上,这也很简单。如果你有任何疑问,建议,反馈,请在下面的评论框中写下来,让我们知道有什么需要增加或者改进。非常感谢! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/bind-apache-tomcat-ipv4-centos/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:http://www.apache.org/ +[2]:http://linoxide.com/linux-how-to/install-tomcat-8-centos-7/ From 8b970dabc4b9531b3f470d6a4b49f5cf651611af Mon Sep 17 00:00:00 2001 From: wxy Date: Sat, 4 Apr 2015 23:25:01 +0800 Subject: [PATCH 0463/2517] PUB:20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux @geekpi --- ...al error--x264.h--No such file or directory' on Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md (96%) diff --git a/translated/tech/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md b/published/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md similarity index 96% rename from translated/tech/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md rename to published/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md index 2ecacac6b1..57f8983d89 100644 --- a/translated/tech/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md +++ b/published/20150209 Linux FAQs with Answers--How to fix 'fatal error--x264.h--No such file or directory' on Linux.md @@ -8,7 +8,7 @@ Linux 有问必答:如何在Linux 中修复“fatal error: x264.h: No such fil [x264][1]是GNU GPL授权的H.264/MPEG-4 AVC编码库。x264库被广泛用于视频编码/转码程序比如Avidemux、[FFmpeg][2]、 [HandBrake][3]、 OpenShot、 MEncode等等。 -要解决这个问题,你需要安装x264的开发库文件。你可以这么做。 +要解决这个问题,你需要安装x264的开发库文件。你可以如下做。 ###在 Debian、 Ubuntu 或者 Linux Mint 中安装像x264库和开发文件 ### @@ -24,7 +24,7 @@ RPM Fusion设置完成后,你可以使用下面的命令安装x264开发文件 $ sudo yum --enablerepo=rpmfusion-free install x264-devel -注意RPM Fusion仓库在CentOS 7中还没有,因此上面的方法在CentOS 7中还不可行。万一是CentOS 7 ,你可以从源码编译并安装x264,下面会解释的。 +注意RPM Fusion仓库在CentOS 7中还没有,因此上面的方法在CentOS 7中还不可行。万一是CentOS 7 ,你可以从源码编译并安装x264,下面会解释的。 ### 在Debian、 Ubuntu 或者 Linux Mint中源码编译x264库 ### @@ -81,7 +81,7 @@ x264库将会安装在/usr/local/lib。要让其他程序可以使用这个库 via: http://ask.xmodulo.com/fatal-error-x264-h-no-such-file-or-directory.html 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From aa4e66f92b29505fe64b09668d60cd6d223e2d15 Mon Sep 17 00:00:00 2001 From: wxy Date: Sun, 5 Apr 2015 00:01:17 +0800 Subject: [PATCH 0464/2517] PUB:20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04 @martin2011qi --- ... Passwordless SSH Logon to Ubuntu 14.04.md | 85 +++++++++++++++++++ ... Passwordless SSH Logon to Ubuntu 14.04.md | 85 ------------------- 2 files changed, 85 insertions(+), 85 deletions(-) create mode 100644 published/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md delete mode 100644 translated/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md diff --git a/published/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md b/published/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md new file mode 100644 index 0000000000..8d2a56f574 --- /dev/null +++ b/published/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md @@ -0,0 +1,85 @@ + 如何设置Ubuntu14.04 的 SSH 无密码登录 +================================================================================ +大家好,今天我来向大家介绍如何在 Ubuntu12.04 上设置 SSH 的无密码登录功能。仅在工作站上有正确的(公私)密钥对以供匹配时SSH服务端才会允许你登录,反之访问将不会被允许。 + +正常情况下,我们需要连上SSH的控制台输入用户名及其密码才行。如果两者全部正确,我们就可以访问,反之访问被服务端拒绝。不过相比而言还有一种比用密码更安全的登录方式,我们可以在登录SSH时通过加密密钥进行无密码登录。 + +如果你想启用这个安全的方式,我们只需简单的禁用密码登录并只允许加密密钥登录即可。使用这种方式时,客户端计算机上会产生一对私钥和公钥。接着客户端得把公钥上传到SSH服务端的authorized_key文件中去。在授予访问前,服务器及客户端电脑会校验这个密钥对。如果服务器上的公钥与客服端提交的私钥匹配则授予访问权限,否则访问被拒绝。 + +这是认证到SSH服务器的非常安全的一种做法,如果你想为单一的SSH用户登录实现安全登录,这也是备受推崇的方式。这里快速的过一遍如何启用无密码登录SSH的配置过程。 + +### 1.安装Openssh服务端 ### + +首先,我们需要更新我们的本地库索引。所以如下所见,我们需要先输入“apt-get update” + + $ sudo apt-get update + +![Updating Repo Index](http://blog.linoxide.com/wp-content/uploads/2015/02/updating-repo-list.png) + +现在我们可以通过以下命令安装openssh-server: + + $ sudo apt-get install openssh-server + +![Installing openssh server](http://blog.linoxide.com/wp-content/uploads/2015/02/installing-openssh-server.png) + +### 2. 开启openssh服务 ### + +在OpenSSH已经成功安装在Ubuntu14.04操作系统上了之后,我们要启动OpenSSH的服务。以下命令让你启动/开启服务。 + + $ sudo service ssh start + +或 + + $ sudo /etc/init.d/ssh start + +### 3. 配置密钥对 ### + +在我们安装并启动了OpenSSH服务以后。现在终于到了要我们搞定公私钥对的时候了,在终端中运行以下命令: + + $ ssh-keygen -t rsa + +在运行完以上命令了以后,我们需要回答一系列的问题。首先选择保存密钥的路径,按回车将会选择默认路径即家目录的一个隐藏的.ssh文件夹。下一个提示是请输入口令提醒。我个人将此留空(直接回车)。之后密钥对就会创建,大功告成。 + +![Generating Key Pair](http://blog.linoxide.com/wp-content/uploads/2015/02/generating-key-pair.png) + +在密钥对生成以后,我们需要将**客户端上的公钥复制到SSH服务端**或者主机,来创建对客户端的信任关系。运行以下命令复制客户端的公钥到服务端。 + + $ ssh-copy-id user@ip_address + +在公钥上传之后,我们现在可以禁用通过密码登陆SSH的方式了。为此,我们需要通过以下命令用文本编辑器打开**/etc/ssh/ssh_config**。 + + $ sudo nano /etc/ssh/sshd_config + +现在,我们需要按照下图所示去掉几行注释并进行一些赋值。 + +![Configuring sshd Config](http://blog.linoxide.com/wp-content/uploads/2015/02/configuring-sshd_config.png) + +### 4. 重启SSH服务 ### + +最后,在我们配置完SSH服务端后,为了使改动生效我们需要重启SSH服务。在终端或控制台运行以下命令重启。 + + $ sudo service ssh restart + +或 + + $ sudo /etc/init.d/ssh restart + +![Restarting ssh](http://blog.linoxide.com/wp-content/uploads/2015/02/restarting-ssh.png) + +现在,我们可以试试不用密码仅用密钥对的方式登录ssh服务端了。 + +### 总结 ### + +太好了!我们成功的配置了无密码登录SSH。使用加密密钥对进行SSH服务器认证是非常安全的一种做法,如果你想为SSH的单一用户登录实施安全的认证这也是备受推崇的方式。所以,如果你还有什么问题或建议,请在意见框中向我们反馈。很欣慰你能读完,希望你能喜欢加密的SSH安全登录 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/ubuntu-how-to/setup-passwordless-ssh-logon-ubuntu-14-04/ + +作者:[Arun Pyasi][a] +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ diff --git a/translated/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md b/translated/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md deleted file mode 100644 index a3020446ee..0000000000 --- a/translated/tech/20150302 How to Setup Passwordless SSH Logon to Ubuntu 14.04.md +++ /dev/null @@ -1,85 +0,0 @@ -设置Ubuntu14.04无密码登录SSH -================================================================================ -大家好,今天我来向大家介绍如何在可信的Ubuntu12.04上设置无密码登录SSH功能。仅在工作站有正确的(公私)密钥以供匹配时SSH服务端才会允许你登录,反之访问将不会被允许。 - -正常情况下,我们需要连上SSH的控制台输入用户名和密码,两者结合使用。如果两者全部正确,我们就可以访问,反之访问被服务端拒绝。不过相比而言还有一种比用密码更安全的登录方式,我们用的不是密码在登录SSH我们用的是密钥。 - -如果你想使用这个安全的方式,我们只需简单的禁用密码登录并只允许密钥即可。使用这种方式时,客户端计算机上会产生公私一对密钥。接着客户端得把公钥上传到SSH服务端的密要验证文件中去。在访问被授予前,服务器及客户端电脑互验密钥对。如果服务器上的公钥与客服端提交的私钥匹配访问开始,否则访问被拒绝。 - -这是获取SSH服务器认证中非常安全的一种做法,如果你想为SSH用户登录实施安全的认证,这也是备受推崇的方式。这里快速的过一遍允许无密码登录SSH的配置过程。 - -### 1.安装Openssh服务端 ### - -首先,我们需要更新我们的本地库索引。所以如下所见,我们需要先输入“apt-get update” - - $ sudo apt-get update - -![Updating Repo Index](http://blog.linoxide.com/wp-content/uploads/2015/02/updating-repo-list.png) - -现在我们可以通过以下命令安装openssh-server: - - $ sudo apt-get install openssh-server - -![Installing openssh server](http://blog.linoxide.com/wp-content/uploads/2015/02/installing-openssh-server.png) - -### 2. 开启openssh服务 ### - -在OpenSSH已经成功安装在Ubuntu14.04操作系统上了之后,我们要启动OpenSSH的服务。以下命令让你启动/开启服务。 - - $ sudo service ssh start - -OR - - $ sudo /etc/init.d/ssh start - -### 3. 配置密钥对 ### - -在我们安装并启动了OpenSSH服务以后。现在终于到了要我们搞定公私钥对的时候了,在终端中运行以下命令: - - $ ssh-keygen -t rsa - -在运行完以上命令了以后,我们完成一系列的提示的任务。首先选择保存密钥路径,按回车将会选择默认路径即家目录的一个隐藏的.ssh文件夹。下一个提示是请输入提醒。我个人将此留白(回车过)。之后密钥对就会创建,大功告成。 - -![Generating Key Pair](http://blog.linoxide.com/wp-content/uploads/2015/02/generating-key-pair.png) - -在密钥对生成以后,我们需要将**客户端的上的公钥复制到SSH服务端**或者宿主来创建对客户端的信任关系。运行以下命令复制客户端的公钥到服务端。 - - $ ssh-copy-id user@ip_address - -在公钥上传之后,我们现在可以不用通过密码登陆SSH了。为此,我们需要通过以下命令用文本编辑器打开**etc/ssh/ssh_config**。 - - $ sudo nano /etc/ssh/sshd_config - -现在,我们需要按照下图所示去到几行注释并进行一些赋值。 - -![Configuring sshd Config](http://blog.linoxide.com/wp-content/uploads/2015/02/configuring-sshd_config.png) - -### 4. 重启SSH服务 ### - -最后,在我们配置完SSH服务端后,为了使改动生效我们需要重启SSH服务。在终端或控制台运行以下命令重启。 - - $ sudo service ssh restart - -OR - - $ sudo /etc/init.d/ssh restart - -![Restarting ssh](http://blog.linoxide.com/wp-content/uploads/2015/02/restarting-ssh.png) - -现在,我们可以试试不用密码仅用密钥配对的方式登录ssh服务端了。 - -### 总结 ### - -太好了!我们成功的配置了无密码登录SSH。这是获取SSH服务器认证中非常安全的一种做法,如果你想为SSH但用户登录实施安全的认证这也是备受推崇的方式。所以,如果你还有什么问题或建议,请在意见框中向我们反馈。很欣慰你能读完,祝你SSH登录愉快 :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/ubuntu-how-to/setup-passwordless-ssh-logon-ubuntu-14-04/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ From 47956ac89a7e516bf301afe64cf3d120fd57a5c4 Mon Sep 17 00:00:00 2001 From: FSSlc Date: Sun, 5 Apr 2015 13:27:39 +0800 Subject: [PATCH 0465/2517] Translated 20150227 Chess in a Few Bytes.md --- .../share/20150227 Chess in a Few Bytes.md | 116 ------------------ .../share/20150227 Chess in a Few Bytes.md | 114 +++++++++++++++++ 2 files changed, 114 insertions(+), 116 deletions(-) delete mode 100644 sources/share/20150227 Chess in a Few Bytes.md create mode 100644 translated/share/20150227 Chess in a Few Bytes.md diff --git a/sources/share/20150227 Chess in a Few Bytes.md b/sources/share/20150227 Chess in a Few Bytes.md deleted file mode 100644 index e0f6302dcd..0000000000 --- a/sources/share/20150227 Chess in a Few Bytes.md +++ /dev/null @@ -1,116 +0,0 @@ -Translating by FSSlc - -Chess in a Few Bytes -================================================================================ -I am showing my age by mentioning that my introduction to computing was a ZX81, a home computer produced by a UK developer (Sinclair Research) which had a whopping 1KB of RAM. The 1KB is not a typographical error, the home computer really shipped with a mere 1KB of onboard memory. But this memory limitation did not prevent enthusiasts producing a huge variety of software. In fact the machine sparked a generation of programming wizards who were forced to get to grips with its workings. The machine was upgradable with a 16KB RAM pack which offered so many more coding possibilities. But the unexpanded 1KB machine still inspired programmers to release remarkable software. - -![1K ZX Chess ](http://www.linuxlinks.com/portal/content2/reviews/Games2/1KZXChess.jpg) - -My favourite ZX81 games were Flight Simulation, 3D Monster Maze, Galaxians, and above all 1K ZX Chess. Only the latter was written for the unexpanded ZX81. In fact, David Horne's 1K ZX Chess was coded in a mere 672 bytes of RAM. However, the game managed to implement most chess rules, and offer a computer opponent. While some important rules were omitted (castling, pawn promotion, and en passant capture), it was still amazing to be able to play against artificial intelligence. The game took up a fair chunk of my misspent youth. - -1K ZX Chess remained the smallest implementation of chess on any computer for 33 years until the record was broken by BootChess this year, and subsequently by Toledo AtomChess. These three games do not implement all of the chess rules, so for completeness I have included my favourite small implementation of chess that implements a complete set of chess rules. - -Linux has a good range of extremely strong chess engines such as Stockfish, Critter, Togo II, Crafty, GNU Chess, and Komodo. The chess engines featured in this article offer no match to a good chess engine, but they show how much can be achieved with a minuscule codebase. - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/ToledoAtomchess.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Toledo.png) - -You may have seen a considerable amount of press coverage about BootChess, a chess program written in 487 bytes of code, smashing the record of the then smallest chess program, 1K ZX Chess. Óscar Toledo Gutiérrez took up the mantle and decided to code an even more compact chess game. Toledo Atomchess is a mere 481 bytes of x86 assembly code which fits in a boot sector. The engine plays a reasonable game of chess given the limitations of its incredibly small codebase. - -Features include: - -- Basic chess movements -- ASCII text representation of chess board -- Moves are entered in algebraic form -- Search depth of 3-ply - -Obviously, to fit the chess of game into 481 bytes, the author had to make some sacrifices. These limitations include: - -- No promotion of pawns -- No castling -- No en passant -- No move validation - -The author has also written chess programs in C, JavaScript and Java; each are very small implementations of chess. - -- Website: [nanochess.org/chess6.html][1] -- Developer: Óscar Toledo Gutiérrez -- License: Free for non-commercial use -- Version Number: - - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/BootChess.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-BootChess.png) - -BootChess is an extremely small computer implementation of chess. The game is crammed into a mere 487 bytes and runs on Windows, Mac OS X and Linux operating systems. The board and pieces of BootChess are represented by text alone, with P representing pawns, Q used for the queens and full stops entered for empty squares. - -Features include: - -- Graphic text representation of chess board and use input -- Bootsector sized (512 bytes) with a playable chess game -- x86 bios hardware only bootstrap (no software dependencies) -- All main legal moves including double square pawn start -- Pawn promotion to queen (contrary to 1k ZX Chess) -- CPU artificial intelligence called taxiMax > minMax half-ply -- Hard-coded Spanish white pieces opening - -Again, there are some important limitations. Omissions include: - -- Under-promotion -- En passant pawn capture -- No castling -- 3-repetition rule -- 50 move draw rule -- No opening or closing books -- One or more minMax/negaMax full plies for artificial intelligence - -- Website: [www.pouet.net/prod.php?which=64962][2] -- Developer: Olivier "Baudsurfer/RSi" Poudade -- License: WTFPL v2 -- Version Number: .02 - ----------- - -![](http://www.linuxlinks.com/portal/content2/png/Micro-Max.png) - -![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Micro-Max.png) - -Micro-Max is a 133-line chess source which is written in C - -The author has implemented a (hash) transposition table, the engine checks the legality of the input moves, and full FIDE rules except for for under-promotions. - -Features include: - -- Recursive negamax search -- Quiescence search with recaptures -- Recapture extensions -- Iterative deepening -- Best-move-first 'sorting' -- Hash table storing score and best move -- Full FIDE rules (except under promotion) and move-legality checking - -There is also a stripped-down 1433-character version, but allowing you to play under-promotions for full FIDE-rule compliance. - -- Website: [home.hccnet.nl/h.g.muller/max-src2.html][3] -- Developer: Harm Geert Muller -- License: The MIT License -- Version Number: 3.2 - --------------------------------------------------------------------------------- - -via: http://www.linuxlinks.com/article/20150222033906262/ChessBytes.html - -作者:Frazer Kline -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[1]:http://nanochess.org/chess6.html -[2]:http://www.pouet.net/prod.php?which=64962 -[3]:http://home.hccnet.nl/h.g.muller/max-src2.html diff --git a/translated/share/20150227 Chess in a Few Bytes.md b/translated/share/20150227 Chess in a Few Bytes.md new file mode 100644 index 0000000000..60b5598c76 --- /dev/null +++ b/translated/share/20150227 Chess in a Few Bytes.md @@ -0,0 +1,114 @@ +几 KB 的国际象棋程序 +================================================================================ +当我提及到我用来介绍计算(注:这里翻译的有问题)的是一台 ZX81 电脑时,我已经暴露了我的年龄。ZX81 是一个由英国(UK,the United Kingdom) 开发者(Sincilair 研究所)生产的家庭电脑,它拥有"高达" 1KB 的随机存储器(RAM)。上面的 1kB 并不是打印错误,这个家庭电脑确实只配置有 1KB 的板载内存。但这个内存大小上的限制并没有阻止爱好者制作种类繁多的软件。事实上,这个机器引发了一代编程奇才的出现,这迫使他们掌握让程序在该机上正常运行的方法。这个机器可以通过一个 16 KB 的 RAM 包来进行升级,这就提供了更多的编程可能。但未经扩展的 1KB 机器仍然激励着编程者发布卓越的软件。 + +![1K ZX Chess ](http://www.linuxlinks.com/portal/content2/reviews/Games2/1KZXChess.jpg) + +我最喜爱的 ZX81 游戏有: Flight Simulation, 3D Monster Maze, Galaxians, 以及最重要的 1K ZX Chess。 只有最后一个程序是为未扩展的 ZX81 电脑设计的。事实上,David Horne 开发的 1K ZX Chess 只使用了仅仅 672 字节的 RAM(注:如果读者有兴趣,可以看看 [这里](http://users.ox.ac.uk/~uzdm0006/scans/1kchess/)对该程序的代码及解释)。尽管如此,该游戏尽力去实现大多数的国际象棋规则,并提供了一个计算机虚拟对手。虽然一些重要的规则被忽略了(如:王车易位,兵的升变,和吃过路兵) +(注:参考了[这里](http://zh.wikibooks.org/zh/%E5%9B%BD%E9%99%85%E8%B1%A1%E6%A3%8B/%E8%A7%84%E5%88%99)和[这里](http://en.wikipedia.org/wiki/Rules_of_chess)),但能够和人工智能相对抗,这仍然令人惊讶。这个游戏占据了我逝去的青春里的相当一部分。 + +1K ZX Chess 保持着在任何计算机上国际象棋的最小实现的地位长达 33 年,直到今年由 BootChess 打破了该记录,紧接着由 Toledo AtomChess 打破。这三个程序都没有实现所有的国际象棋规则,所以为了完整性,我介绍了我最喜爱的,实现了所有国际象棋规则的极小的国际象棋。 + +Linux 有着一系列极其强大的国际象棋引擎,如 Stockfish, Critter, Togo II, Crafty, GNU Chess, 和 Komodo 。 在这篇文章精选的国际象棋程序虽敌不过一个好的国际象棋程序,但它们展示了使用微不足道的代码库究竟可以实现多少东西。 +---------- + +![](http://www.linuxlinks.com/portal/content2/png/ToledoAtomchess.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Toledo.png) + +你可能已经看到了大量有关 BootChess 新闻报道,一个只用 487 字节写就的国际象棋程序,一举打破了先前最小的国际象棋程序,1K ZX Chess 的记录。Óscar Toledo Gutiérrez 拿起外套并决定编写一个更加紧凑的国际象棋游戏。Toledo Atomchess 是仅有 481 字节的 x86 汇编代码,它适合在引导扇区里。 在给定的极小代码库限制下,这个引擎实现了一个适当的国际象棋游戏。 + +特点包括: + +- 基本的象棋移动 +- 象棋盘的 ASCII 文本表现 +- 以代数形式来输入移动(注:如 D2D4) +- 3 层的搜索深度 + +显然,为了将这个国际象棋程序压缩到 481 字节中,作者必须做出某些牺牲,这些局限包括: + +- 没有兵的升变 +- 没有王车易位 +- 没有吃过路兵 +- 没有移动确认 + +该作者也使用 C,JavaScript 和 Java 来写这个国际象棋程序,每种实现都非常小。 + +- 网站: [nanochess.org/chess6.html][1] +- 开发者: Óscar Toledo Gutiérrez +- 协议: 对非商业使用免费(Free for non-commercial use) +- 版本号: - + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/BootChess.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-BootChess.png) + +BootChess 是一个国际象棋的极其小巧的计算机实现。这个程序被塞进到仅仅 487 字节里,并可运行在 Windows, Mac OS X 和 Linux 等操作系统。BootChess 的棋盘和棋子单独用文本表示,其中 P 代表兵, Q 用来代表王后,以及输入的任何停顿代表空白方块。 + +特点包括: + +- 象棋棋盘和用户输入的图形化文本表示 +- 引导扇区大小(512 字节)的可玩的象棋游戏 +- 只需 x86 bios 硬件引导程序(没有软件依赖) +- 所有主要的正规移动包括 double square pawn start(注:这个我没有查到是什么意思) +- 兵升变为王后(与 1k ZX Chess 相反) +- 名为 taxiMax > minMax half-ply 的 CPU 人工智能 +- 硬编码的西班牙白子开局 + +同样,它也存在一些重要的限制。这些遗漏包括: + +- 正在推广 +- 吃过路兵 +- 没有王车易位 +- 3 次位置重复和局规则(注:下一步之前,同样的移动出现了两次;可以参考[这里](http://www.netplaces.com/chess-basics/ending-the-game/three-position-repetition.htm)) +- 50 步移动和局规则(注:在连续的50个回合内,双方既没有棋子被吃掉,也没有兵被移动过,则和局;可以参考[这里](http://www.chessvariants.org/d.chess/chess.html)) +- 没有开放或封闭的书籍 +- 一个或多个 minMAX/negaMax 全层人工智能 + +- 网站: [www.pouet.net/prod.php?which=64962][2] +- 开发者: Olivier "Baudsurfer/RSi" Poudade +- 协议: WTFPL v2 +- 版本号: .02 + +---------- + +![](http://www.linuxlinks.com/portal/content2/png/Micro-Max.png) + +![](http://www.linuxlinks.com/portal/content/reviews/Games2/Screenshot-Micro-Max.png) + +Micro-Max 是一个用 C 写就的 133 行象棋源程序。 + +作者实现了一个 hash 变换表,该引擎检查输入移动的合法性,以及支持 FIDE(注: World Chess Federation 缩写,[这里](https://www.fide.com/)为其官网) 的全部规则,除了正在推广的规则。 + +特点包括: + +- 递归的 negamax 搜索 +- 重新夺回的静态搜索 +- 重新夺回规则的扩展 +- 迭代深化 +- 最好的先走策略 `排序` +- 存储分数和最佳移动的 Hash 表 +- 完整的 FIDE 规则(不包括正在推广的规则) 和移动合法性检查 + +同样存在一个简装的 1433个字符的版本,但允许你使用符合 FIDE 规则的正在推广的规则。 + +- 网站: [home.hccnet.nl/h.g.muller/max-src2.html][3] +- 开发者: Harm Geert Muller +- 协议: The MIT License +- 版本号: 3.2 + +-------------------------------------------------------------------------------- + +via: http://www.linuxlinks.com/article/20150222033906262/ChessBytes.html + +作者:Frazer Kline +译者:[FSSlc](https://github.com/FSSlc) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[1]:http://nanochess.org/chess6.html +[2]:http://www.pouet.net/prod.php?which=64962 +[3]:http://home.hccnet.nl/h.g.muller/max-src2.html \ No newline at end of file From 57801aeab903e4e68b76df9914e7b137528a1c45 Mon Sep 17 00:00:00 2001 From: ictlyh Date: Sun, 5 Apr 2015 14:31:26 +0800 Subject: [PATCH 0466/2517] Translated:20150402 The VirtualBox 5.0 beta is finally here --- ...The VirtualBox 5.0 beta is finally here.md | 35 ------------------- ...The VirtualBox 5.0 beta is finally here.md | 35 +++++++++++++++++++ 2 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 sources/news/20150402 The VirtualBox 5.0 beta is finally here.md create mode 100644 translated/news/20150402 The VirtualBox 5.0 beta is finally here.md diff --git a/sources/news/20150402 The VirtualBox 5.0 beta is finally here.md b/sources/news/20150402 The VirtualBox 5.0 beta is finally here.md deleted file mode 100644 index 475ef2f811..0000000000 --- a/sources/news/20150402 The VirtualBox 5.0 beta is finally here.md +++ /dev/null @@ -1,35 +0,0 @@ -The VirtualBox 5.0 beta is finally here -======================================= -**Oracle's desktop virtualization software gets its first major point revision in almost five years, but the changes are more evolutionary than revolutionary.** - -VirtualBox, the open source virtualization system originally created by Sun and now under Oracle's stewardship, has released its first revision to the left of the decimal point in nearly five years. - -Don't expect anything truly revolutionary, though, judging from the release notes for and the behavior of the beta itself. With this release, VirtualBox picks up a bit more polish, both visually and technologically, but its main advantage over VMware remains with its offer of a free incarnation of many of the same core features. - -The last major version of VirtualBox 4.0 was released in December 2010, and it delivered a heavily reworked version of the program with a new GUI, new virtual hardware, and a reorganized project design. But the pace of major releases for the project was slow, with the last major release (version 4.3) arriving in late 2013. Everything since then has been officially designated as a "maintenance" release. - -**VirtualBox 5.0** - -*The first beta of VirtualBox 5.0 adds features like the ability to edit the menus and shortcut icons for VM windows, as shown here.* - -Among the biggest changes for VirtualBox 5.0 is support for more instruction set extensions that run with hardware-assisted virtualization. The AES-NI instruction set, typically used for hardware acceleration of encryption, and the SSE 4.1 and SSE 4.2 instructions sets were included among them. Also new is paravirtualization support for Windows and Linux guests, a new architecture for abstracting host audio, and support for USB 3 (xHCI) controller in guests. - -Most of the usability updates are improvements to the VirtualBox GUI. One big change is the ability to customize the menus and the toolbar for individual virtual machines so that little- or never-used options can be removed entirely. Another major addition is the ability to encrypt virtual volumes from within the VirtualBox interface, rather than relying on the guest OS's own disk-encryption system (assuming it has one). - -Oracle warns that this is beta software and should be treated accordingly. Sure enough, the main GUI and the guest OS windows all sport black-and-red Beta warnings in one corner. But a Windows 10 VM created with the previous VirtualBox release (4.3.26) booted and ran fine, and the 5.0 version of the VirtualBox Guest Additions -- for better video support, bidirectional copy and paste, and other features -- installed without issues. (Fixes to better support Windows 10 have been showing up since version 4.3.18.) - -No word has been given yet on when the final version of 5.0 will be out, but Oracle [encourages users][1] to download and try out the beta -- in a nonproduction environment -- and file bug reports with their [beta feedback forum][2]. - --------------------------------------------------------------------------------- - -via: http://www.infoworld.com/article/2905098/virtualization/oracle-virtualbox-5-0-beta-is-finally-here.html - -作者:[Serdar Yegulalp][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.infoworld.com/author/Serdar-Yegulalp/ -[1]:https://forums.virtualbox.org/viewtopic.php?f=15&t=66904 -[2]:https://forums.virtualbox.org/viewforum.php?f=15 diff --git a/translated/news/20150402 The VirtualBox 5.0 beta is finally here.md b/translated/news/20150402 The VirtualBox 5.0 beta is finally here.md new file mode 100644 index 0000000000..ed2549d347 --- /dev/null +++ b/translated/news/20150402 The VirtualBox 5.0 beta is finally here.md @@ -0,0 +1,35 @@ +VirturalBox 5.0 beta版终于发布了 +======================================= +**甲骨文公司的桌面虚拟化软件获得了近五年来的第一次重大改版,但是更像是改进而不是革命性的的变化。** + +VirtualBox,由Sun公司创建,现在由甲骨文管理的开源虚拟化系统,获得了近5年来第一次的主版本更新发布。 + +从发行说明和测试版本身的表现来看,别期望任何真正革命性的改变。在此版本中,VirtualBox在视觉上和技术上都做了一些改进,但和VMware相比,它的主要优势仍然是相同核心功能的自由化。 + +VirtualBox 4.0的最后一个主要版本在2010年12月发布,它采用了新的图形化用户界面,新的虚拟化硬件和重组的项目设计,带来了重大的改版。但项目主要版本的发布步伐缓慢,上一次重要版本(版本4.3)在2013年底才发布。从那时起,一切都被正式称为“维修”发布。 + +**VirtualBox 5.0** + +*VirtualBox 5.0的第一个测试版增加了编辑菜单,VM窗口的快捷方式图标等功能,如下面所示。* + +VirtualBox 5.0最大的变化是增加了对硬件辅助虚拟化指令集扩展的支持。AES-NI指令集通常用于加密时的硬件加速,SSE 4.1和SSE 4.2指令集都包括在其中。另外一点是支持Windows和Linux客户机的半虚拟化,一个抽象主机音响的新的架构以及支持客户机中的USB 3(xHCI)控制器。 + +大部分可用更新都是对VirtualBox 图形化用户界面的改进。一个大的变化就是支持给单个虚拟主机自定义菜单和工具栏,这样很少或者从不使用的选项就可以彻底删除。另外重要的一点是可以在VirtualBox接口内部对虚拟磁盘进行加密,而不依赖于客户机操作系统自身的磁盘加密功能(假设有的话)。 + +甲骨文公司提醒由于这是个测试版软件,需要谨慎对待。当然,主界面和客户机系统界面在某方面都可能引起红黑测试版警告。但之前VirtualBox发行版(4.3.26)上创建的Windows 10虚拟机启动和运行都没问题,5.0版本中添加的VirtualBox客户机功能--更好的视频支持,双向复制和粘贴,以及其它功能--安装的时候也没有问题。(更好地支持Windows 10的修复从4.3.18版本后就开始出现)。 + +虽然没有明确指出5.0的最终版什么时候会发布,但是甲骨文公司[鼓励用户][1]在非生产环境中下载和使用测试版,并在[测试版反馈论坛][2]中报告bug文件。 + +-------------------------------------------------------------------------------- + +via: http://www.infoworld.com/article/2905098/virtualization/oracle-virtualbox-5-0-beta-is-finally-here.html + +作者:[Serdar Yegulalp][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.infoworld.com/author/Serdar-Yegulalp/ +[1]:https://forums.virtualbox.org/viewtopic.php?f=15&t=66904 +[2]:https://forums.virtualbox.org/viewforum.php?f=15 From 87e0885c6dbee04000e3118a7dfc1ae3c0fd17b9 Mon Sep 17 00:00:00 2001 From: Chang Liu Date: Sun, 5 Apr 2015 15:12:05 +0800 Subject: [PATCH 0467/2517] Update 20150119 How to Remember and Restore Running Applications on Next Logon.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 准备翻译该篇文章。 --- ...Remember and Restore Running Applications on Next Logon.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md b/sources/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md index 457d6788e2..772667bde2 100644 --- a/sources/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md +++ b/sources/tech/20150119 How to Remember and Restore Running Applications on Next Logon.md @@ -1,3 +1,5 @@ +FSSlc translating + How to Remember and Restore Running Applications on Next Logon ================================================================================ You have made some apps running in your Ubuntu and don't want to stop the process, just managed your windows and opened your stuffs needed to work. Then, something else demands your attention or you have battery low in your machine and you have to shut down. No worries. You can have Ubuntu remember all your running applications and restore them the next time you log in. @@ -94,4 +96,4 @@ via: http://linoxide.com/ubuntu-how-to/remember-running-applications-ubuntu/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 -[a]:http://linoxide.com/author/arunp/ \ No newline at end of file +[a]:http://linoxide.com/author/arunp/ From 8283b2b21e0f22536b04d04776be68c3df2a6b59 Mon Sep 17 00:00:00 2001 From: wi-cuckoo Date: Sun, 5 Apr 2015 20:36:17 +0800 Subject: [PATCH 0468/2517] translated wi-cuckoo --- ...ling PHP 7.0 on CentOS 7.x or Fedora 21.md | 322 ++++++++++++++++++ 1 file changed, 322 insertions(+) create mode 100644 translated/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md diff --git a/translated/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md b/translated/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md new file mode 100644 index 0000000000..bc27aec4ec --- /dev/null +++ b/translated/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md @@ -0,0 +1,322 @@ +现在值得去尝试一下在CentOS 7.x或Fedora 21上面安装PHP 7.0 +=============================================================================== +PHP是一种为我们熟知的通用的,服务器网页脚本语言。超大量的在线网站都是用PHP编写的。PHP过去一直在更新,丰富功能,易于使用,而且很好组织的脚本语言。目前PHP的开发团队正筹备下一个PHP版本的发行,名字是PHP 7。现在的PHP版本为PHP 5.6,可能你清楚PHP 6已经流产了,PHP 7的支持者们不希望下一个重要的版本被其他分支混淆,即过去已经停止很久的PHP 6。所以决定下一个PHP主要的发行版本叫PHP 7,而不是PHP 6。PHP 7.0预计在今年十一月份发行。 + +在下一个主要的PHP发行版里有一些不错的功能。 + +- 为了提升执行效率与记忆痕迹,PHPNG功能被添加到新的发行版中。 +- JIT引擎被收入来动态编译Zend操作码为自然机器码,以此来达到更快的处理性能。这项功能允许随后的程序调用同一份代码,这样会运行快很多。 +- AST(抽象语法树)是最新添加的功能,它可以增强支持PHP的扩展性和用户应用。 +- 异步编程功能会添加支持并行任务,在同样的需求下。 +-新的版本会支持独立多线程网页服务,这样可以使用一个单独的存储块处理很多并发的请求。 + +### 在CcentOS/Fedora上安装PHP 7 ### + +让我们来看看怎样在CentOS 7和Fedora 21安装PHP7。为了安装PHP7,我们首先需要克隆php-src 仓库。当克隆工作完成,我们会配置和编译它。进行下一步之前,我们要确保已经在LInux系统下安装了如下的东西,否则PHP编译会返回错误,然后流产。 + +- Git +- autoconf +- gcc +- bison + +所有上面提到的要求可以使用Yum软件包管理器安装。用连续的一个命令应该这样: + + yum install git autoconf gcc bison + +准备好开始安装PHP7了吗?让我们先创建一个PHP7目录,作为你的工作目录。 + + mkdir php7 + + cd php7 + +现在克隆php-src仓库,在终端里运行下面的命令。 + + git clone https://git.php.net/repository/php-src.git + +工作应该会在几分钟后完成,这里是一个样例输出,你应该会在任务完成时看见。 + + [root@localhost php7]# git clone https://git.php.net/repository/php-src.git + + Cloning into 'php-src'... + + remote: Counting objects: 615064, done. + + remote: Compressing objects: 100% (127800/127800), done. + + remote: Total 615064 (delta 492063), reused 608718 (delta 485944) + + Receiving objects: 100% (615064/615064), 152.32 MiB | 16.97 MiB/s, done. + + Resolving deltas: 100% (492063/492063), done. + +让我们来配置,编译PHP7,在终端运行下面的命令,开始配置工作: + + cd php-src + + ./buildconf + +下面是./buildconf命令的样例输出。 + + [root@localhost php-src]# ./buildconf + + buildconf: checking installation... + + buildconf: autoconf version 2.69 (ok) + + rebuilding aclocal.m4 + + rebuilding configure + + rebuilding main/php_config.h.in + +使用下面的命令,继续配置进程: + + ./configure \ + + --prefix=$HOME/php7/usr \ + + --with-config-file-path=$HOME/php7/usr/etc \ + + --enable-mbstring \ + + --enable-zip \ + + --enable-bcmath \ + + --enable-pcntl \ + + --enable-ftp \ + + --enable-exif \ + + --enable-calendar \ + + --enable-sysvmsg \ + + --enable-sysvsem \ + + --enable-sysvshm \ + + --enable-wddx \ + + --with-curl \ + + --with-mcrypt \ + + --with-iconv \ + + --with-gmp \ + + --with-pspell \ + + --with-gd \ + + --with-jpeg-dir=/usr \ + + --with-png-dir=/usr \ + + --with-zlib-dir=/usr \ + + --with-xpm-dir=/usr \ + + --with-freetype-dir=/usr \ + + --with-t1lib=/usr \ + + --enable-gd-native-ttf \ + + --enable-gd-jis-conv \ + + --with-openssl \ + + --with-mysql=/usr \ + + --with-pdo-mysql=/usr \ + + --with-gettext=/usr \ + + --with-zlib=/usr \ + + --with-bz2=/usr \ + + --with-recode=/usr \ + + --with-mysqli=/usr/bin/mysql_config + +这会花去不少的时间,一旦完成,你应该会看到如下面的输出: + + creating libtool + + appending configuration tag "CXX" to libtool + + Generating files + + configure: creating ./config.status + + creating main/internal_functions.c + + creating main/internal_functions_cli.c + + +--------------------------------------------------------------------+ + + | License: | + + | This software is subject to the PHP License, available in this | + + | distribution in the file LICENSE. By continuing this installation | + + | process, you are bound by the terms of this license agreement. | + + | If you do not agree with the terms of this license, you must abort | + + | the installation process at this point. | + + +--------------------------------------------------------------------+ + + + + Thank you for using PHP. + + + + config.status: creating php7.spec + + config.status: creating main/build-defs.h + + config.status: creating scripts/phpize + + config.status: creating scripts/man1/phpize.1 + + config.status: creating scripts/php-config + + config.status: creating scripts/man1/php-config.1 + + config.status: creating sapi/cli/php.1 + + config.status: creating sapi/cgi/php-cgi.1 + + config.status: creating ext/phar/phar.1 + + config.status: creating ext/phar/phar.phar.1 + + config.status: creating main/php_config.h + + config.status: executing default commands + + +运行下面的命令,完成编译过程。 + + manke + +“make”命令过后的样例输出如下所示: + + Generating phar.php + + Generating phar.phar + + PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled. + + clicommand.inc + + directorytreeiterator.inc + + directorygraphiterator.inc + + pharcommand.inc + + invertedregexiterator.inc + + phar.inc + + + + Build complete. + + Don't forget to run 'make test'. + +活儿干完了,该安装PHP7了,运行下面的命令安装它。 + + make install + +成功安装的进程的样例输出应该像这样: + + [root@localhost php-src]# make install + + Installing shared extensions: /root/php7/usr/lib/php/extensions/no-debug-non-zts-20141001/ + + Installing PHP CLI binary: /root/php7/usr/bin/ + + Installing PHP CLI man page: /root/php7/usr/php/man/man1/ + + Installing PHP CGI binary: /root/php7/usr/bin/ + + Installing PHP CGI man page: /root/php7/usr/php/man/man1/ + + Installing build environment: /root/php7/usr/lib/php/build/ + + Installing header files: /root/php7/usr/include/php/ + + Installing helper programs: /root/php7/usr/bin/ + + program: phpize + + program: php-config + + Installing man pages: /root/php7/usr/php/man/man1/ + + page: phpize.1 + + page: php-config.1 + + Installing PEAR environment: /root/php7/usr/lib/php/ + + [PEAR] Archive_Tar - installed: 1.3.13 + + [PEAR] Console_Getopt - installed: 1.3.1 + + [PEAR] Structures_Graph- installed: 1.0.4 + + [PEAR] XML_Util - installed: 1.2.3 + + [PEAR] PEAR - installed: 1.9.5 + + Wrote PEAR system config file at: /root/php7/usr/etc/pear.conf + + You may want to add: /root/php7/usr/lib/php to your php.ini include_path + + /root/php7/php-src/build/shtool install -c ext/phar/phar.phar /root/php7/usr/bin + + ln -s -f /root/php7/usr/bin/phar.phar /root/php7/usr/bin/phar + + Installing PDO headers: /root/php7/usr/include/php/ext/pdo/ + +恭喜你,PHP7已经安装在你的Linux系统上了。安装完后,进入PHP7安装文件里的sapi/cli里面。 + + cd sapi/cli + +在这里验证PHP的版本。 + + [root@localhost cli]# ./php -v + + PHP 7.0.0-dev (cli) (built: Mar 28 2015 00:54:11) + + Copyright (c) 1997-2015 The PHP Group + + Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies + +### 总结 ### + +PHP 7也被[添加到了remi仓库][1],即将到来的版本主要关注执行效率的提升,新的特性致力于使PHP较好满足现代编程的需求和趋势。PHP 7.0将会有许多新的特性,丢弃一些老版本的东西。在接下来的日子里,我们希望看到新特性和弃用功能的具体情况。尽情享受吧! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/install-php-7-centos-7-fedora-21/ + +作者:[Aun Raza][a] +译者:[wi-cuckoo](https://github.com/wi-cuckoo) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunrz/ +[1]:http://blog.famillecollet.com/post/2015/03/25/PHP-7.0-as-Software-Collection From 6fe0c9f97de392bde4fe79e5d539ee50508d450c Mon Sep 17 00:00:00 2001 From: Louis Wei Date: Sun, 5 Apr 2015 20:37:17 +0800 Subject: [PATCH 0469/2517] Delete 20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md --- ...ling PHP 7.0 on CentOS 7.x or Fedora 21.md | 324 ------------------ 1 file changed, 324 deletions(-) delete mode 100644 sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md diff --git a/sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md b/sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md deleted file mode 100644 index 68db83d812..0000000000 --- a/sources/tech/20150331 Its Now Worth Try Installing PHP 7.0 on CentOS 7.x or Fedora 21.md +++ /dev/null @@ -1,324 +0,0 @@ -translating wi-cuckoo LLAP -Its Now Worth Try Installing PHP 7.0 on CentOS 7.x / Fedora 21 -================================================================================ -PHP is a well known general purpose, server side web scripting language. A vast majority of online websites are coded in this language. PHP is ever evolving, feature rich, easy to use and well organized scripting language. Currently PHP development team is working on next major release of PHP, named PHP 7. The current production PHP version is PHP 5.6, as you might already know that PHP 6 was aborted in the past, the supporters of PHP 7 did not want the next important PHP version to be confused with that branch that was killed long time in the past. So it has been decided to name the next major release of PHP as PHP 7 instead of 6. PHP 7.0 is supposed to be released in November this year. - -Here are some of the prominent features in next major PHP release. - -- In order to improve performance and memory footprints PHPNG feature has been added to this new release. -- JIT engine has been included to dynamically compile Zend opcodes into native machine code in order to achieve faster processing. This feature will allow subsequent calls to the same code so that it may run much faster. -- AST (Abstract Syntax Tree) is a newly added feature which will enhance support for php extensions and userland applications. -- Asynchronous Programming feature will add support for parallel tasks within the same request. -- New version will support for stand alone multi-threading web server so that it may handle many simultaneous requests using a single memory pool. - -### Installing PHP 7 on Centos / Fedora ### - -Lets see how we can install PHP7 on Centos 7 and Fedora 21. In order to install PHP7 we will need to first clone php-src repository. Once cloning process is complete, we will configure and compile it. Before we proceed, lets ensure that we do have followings installed on our Linux system otherwise PHP compile process will return errors and abort. - -- Git -- autoconf -- gcc -- bison - -All of the above metioned prerequisits can be installed using Yum package manager. The following single command should take care of this: - - yum install git autoconf gcc bison - -Ready to start PHP7 installation process ? Lets first create PHP7 directory and make it your working directory. - - mkdir php7 - - cd php7 - -Now clone php-src repo, run following command on the terminal. - - git clone https://git.php.net/repository/php-src.git - -The process should complete in few min, here is sample output which you should see at the completion of this task. - - [root@localhost php7]# git clone https://git.php.net/repository/php-src.git - - Cloning into 'php-src'... - - remote: Counting objects: 615064, done. - - remote: Compressing objects: 100% (127800/127800), done. - - remote: Total 615064 (delta 492063), reused 608718 (delta 485944) - - Receiving objects: 100% (615064/615064), 152.32 MiB | 16.97 MiB/s, done. - - Resolving deltas: 100% (492063/492063), done. - -Lets configure and compile PHP7, run following commands on the terminal to start the configuration process: - - cd php-src - - ./buildconf - -Here is sample output for ./buildconf command. - - [root@localhost php-src]# ./buildconf - - buildconf: checking installation... - - buildconf: autoconf version 2.69 (ok) - - rebuilding aclocal.m4 - - rebuilding configure - - rebuilding main/php_config.h.in - -Proceed further with the configuration process using following command: - - ./configure \ - - --prefix=$HOME/php7/usr \ - - --with-config-file-path=$HOME/php7/usr/etc \ - - --enable-mbstring \ - - --enable-zip \ - - --enable-bcmath \ - - --enable-pcntl \ - - --enable-ftp \ - - --enable-exif \ - - --enable-calendar \ - - --enable-sysvmsg \ - - --enable-sysvsem \ - - --enable-sysvshm \ - - --enable-wddx \ - - --with-curl \ - - --with-mcrypt \ - - --with-iconv \ - - --with-gmp \ - - --with-pspell \ - - --with-gd \ - - --with-jpeg-dir=/usr \ - - --with-png-dir=/usr \ - - --with-zlib-dir=/usr \ - - --with-xpm-dir=/usr \ - - --with-freetype-dir=/usr \ - - --with-t1lib=/usr \ - - --enable-gd-native-ttf \ - - --enable-gd-jis-conv \ - - --with-openssl \ - - --with-mysql=/usr \ - - --with-pdo-mysql=/usr \ - - --with-gettext=/usr \ - - --with-zlib=/usr \ - - --with-bz2=/usr \ - - --with-recode=/usr \ - - --with-mysqli=/usr/bin/mysql_config - -It will take a sweet amount to time, once completed, you should see output like this: - - creating libtool - - appending configuration tag "CXX" to libtool - - Generating files - - configure: creating ./config.status - - creating main/internal_functions.c - - creating main/internal_functions_cli.c - - +--------------------------------------------------------------------+ - - | License: | - - | This software is subject to the PHP License, available in this | - - | distribution in the file LICENSE. By continuing this installation | - - | process, you are bound by the terms of this license agreement. | - - | If you do not agree with the terms of this license, you must abort | - - | the installation process at this point. | - - +--------------------------------------------------------------------+ - - - - Thank you for using PHP. - - - - config.status: creating php7.spec - - config.status: creating main/build-defs.h - - config.status: creating scripts/phpize - - config.status: creating scripts/man1/phpize.1 - - config.status: creating scripts/php-config - - config.status: creating scripts/man1/php-config.1 - - config.status: creating sapi/cli/php.1 - - config.status: creating sapi/cgi/php-cgi.1 - - config.status: creating ext/phar/phar.1 - - config.status: creating ext/phar/phar.phar.1 - - config.status: creating main/php_config.h - - config.status: executing default commands - - - -Run following command to complete the compilation process. - - make - -Sample output for “make” command is shown below: - - Generating phar.php - - Generating phar.phar - - PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled. - - clicommand.inc - - directorytreeiterator.inc - - directorygraphiterator.inc - - pharcommand.inc - - invertedregexiterator.inc - - phar.inc - - - - Build complete. - - Don't forget to run 'make test'. - -That’s all, its time to install PHP7 now, run following to install it. - - make install - -Sample output for successful install process should look like: - - [root@localhost php-src]# make install - - Installing shared extensions: /root/php7/usr/lib/php/extensions/no-debug-non-zts-20141001/ - - Installing PHP CLI binary: /root/php7/usr/bin/ - - Installing PHP CLI man page: /root/php7/usr/php/man/man1/ - - Installing PHP CGI binary: /root/php7/usr/bin/ - - Installing PHP CGI man page: /root/php7/usr/php/man/man1/ - - Installing build environment: /root/php7/usr/lib/php/build/ - - Installing header files: /root/php7/usr/include/php/ - - Installing helper programs: /root/php7/usr/bin/ - - program: phpize - - program: php-config - - Installing man pages: /root/php7/usr/php/man/man1/ - - page: phpize.1 - - page: php-config.1 - - Installing PEAR environment: /root/php7/usr/lib/php/ - - [PEAR] Archive_Tar - installed: 1.3.13 - - [PEAR] Console_Getopt - installed: 1.3.1 - - [PEAR] Structures_Graph- installed: 1.0.4 - - [PEAR] XML_Util - installed: 1.2.3 - - [PEAR] PEAR - installed: 1.9.5 - - Wrote PEAR system config file at: /root/php7/usr/etc/pear.conf - - You may want to add: /root/php7/usr/lib/php to your php.ini include_path - - /root/php7/php-src/build/shtool install -c ext/phar/phar.phar /root/php7/usr/bin - - ln -s -f /root/php7/usr/bin/phar.phar /root/php7/usr/bin/phar - - Installing PDO headers: /root/php7/usr/include/php/ext/pdo/ - -Conguratulaion, PHP 7 has been installed on your Linux system now. Once installation is complete, move to sapi/cli direcoty inside php7 installation folder. - - cd sapi/cli - -and verify PHP version from here. - - [root@localhost cli]# ./php -v - - PHP 7.0.0-dev (cli) (built: Mar 28 2015 00:54:11) - - Copyright (c) 1997-2015 The PHP Group - - Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies - -### Conclusion ### - -PHP 7 is also [added in remi repositories][1], this upcoming version is mainly focused on performance improvements, its new features are aimed to make PHP as a well fit for modern programming needs and trends. PHP 7.0 will have many new features and some deprecations to the old items. We hope to see details about new features and deprecations in the coming months. Enjoy! - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/install-php-7-centos-7-fedora-21/ - -作者:[Aun Raza][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunrz/ -[1]:http://blog.famillecollet.com/post/2015/03/25/PHP-7.0-as-Software-Collection From 0ffac9ab738c4631e7293de8ae15ea511704d8f0 Mon Sep 17 00:00:00 2001 From: martin qi Date: Sun, 5 Apr 2015 21:30:35 +0800 Subject: [PATCH 0470/2517] Update 20150401 ZMap Documentation.md --- sources/tech/20150401 ZMap Documentation.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/tech/20150401 ZMap Documentation.md b/sources/tech/20150401 ZMap Documentation.md index 810140d774..3cde747acf 100644 --- a/sources/tech/20150401 ZMap Documentation.md +++ b/sources/tech/20150401 ZMap Documentation.md @@ -1,3 +1,5 @@ +translating by martin. + ZMap Documentation ================================================================================ 1. Getting Started with ZMap @@ -740,4 +742,4 @@ via: https://zmap.io/documentation.html [1]:https://github.com/ewust/forge_socket/ [2]:https://github.com/zmap/zmap/blob/v1.0.0/src/output_modules/output_modules.c [3]:https://github.com/zmap/zmap/blob/master/src/output_modules/output_modules.h -[4]:https://github.com/zmap/zmap/blob/master/src/output_modules/module_csv.c \ No newline at end of file +[4]:https://github.com/zmap/zmap/blob/master/src/output_modules/module_csv.c From 0588c4760e3e5fb241c39bc248582876b96879d2 Mon Sep 17 00:00:00 2001 From: H-mudcup Date: Mon, 6 Apr 2015 11:37:26 +0800 Subject: [PATCH 0471/2517] Update 20150330 Picty--Managing Photos Made Easy.md --- sources/share/20150330 Picty--Managing Photos Made Easy.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/share/20150330 Picty--Managing Photos Made Easy.md b/sources/share/20150330 Picty--Managing Photos Made Easy.md index e88ef85cec..ab1c8a094d 100644 --- a/sources/share/20150330 Picty--Managing Photos Made Easy.md +++ b/sources/share/20150330 Picty--Managing Photos Made Easy.md @@ -1,3 +1,4 @@ +Translating by H-mudcup Picty: Managing Photos Made Easy ================================================================================ ![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/03/picty_002-790x429.png) @@ -99,4 +100,4 @@ via: http://www.unixmen.com/picty-managing-photos-made-easy/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://www.unixmen.com/author/sk/ -[1]:http://groups.google.com/group/pictyphotomanager \ No newline at end of file +[1]:http://groups.google.com/group/pictyphotomanager From 53a09807d5f9273e4d18b9e53aab9e32adcb97de Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 6 Apr 2015 16:06:51 +0800 Subject: [PATCH 0472/2517] PR:[Translating]Mydumper--Mysql Database Backup tool --- sources/share/20150326 Mydumper--Mysql Database Backup tool.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/share/20150326 Mydumper--Mysql Database Backup tool.md b/sources/share/20150326 Mydumper--Mysql Database Backup tool.md index e8260760e2..154919f09b 100644 --- a/sources/share/20150326 Mydumper--Mysql Database Backup tool.md +++ b/sources/share/20150326 Mydumper--Mysql Database Backup tool.md @@ -1,3 +1,4 @@ +Translating by ictlyh Mydumper – Mysql Database Backup tool ================================================================================ Mydumper is a tool used for backing up MySQL database servers much faster than the mysqldump tool distributed with MySQL. It also has the capability to retrieve the binary logs from the remote server at the same time as the dump itself. From 72b9bfd0c68581051bdb92ce1d66d12960ac09ba Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 6 Apr 2015 16:11:57 +0800 Subject: [PATCH 0473/2517] PR:[Translating]2 Ways to Create Your Own Docker Base Image --- .../tech/20150330 2 Ways to Create Your Own Docker Base Image.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md b/sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md index 80a7d4d4fa..c9ea39e5fd 100644 --- a/sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md +++ b/sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md @@ -1,3 +1,4 @@ +Translating by ictlyh 2 Ways to Create Your Own Docker Base Image ================================================================================ Greetings to everyone, today we'll learn about docker base Images and how we can build our own. [Docker][1] is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. From 844a2f2a2405e66145fd2a28daec287a0954412e Mon Sep 17 00:00:00 2001 From: ictlyh Date: Mon, 6 Apr 2015 19:27:29 +0800 Subject: [PATCH 0474/2517] [Translated]20150326 Mydumper--Mysql Database Backup tool" [Translated]20150330 2 Ways to Create Your Own Docker Base Image --- ...26 Mydumper--Mysql Database Backup tool.md | 111 ------------------ ...ys to Create Your Own Docker Base Image.md | 58 --------- ...26 Mydumper--Mysql Database Backup tool.md | 110 +++++++++++++++++ ...ys to Create Your Own Docker Base Image.md | 57 +++++++++ 4 files changed, 167 insertions(+), 169 deletions(-) delete mode 100644 sources/share/20150326 Mydumper--Mysql Database Backup tool.md delete mode 100644 sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md create mode 100644 translated/share/20150326 Mydumper--Mysql Database Backup tool.md create mode 100644 translated/tech/20150330 2 Ways to Create Your Own Docker Base Image.md diff --git a/sources/share/20150326 Mydumper--Mysql Database Backup tool.md b/sources/share/20150326 Mydumper--Mysql Database Backup tool.md deleted file mode 100644 index 154919f09b..0000000000 --- a/sources/share/20150326 Mydumper--Mysql Database Backup tool.md +++ /dev/null @@ -1,111 +0,0 @@ -Translating by ictlyh -Mydumper – Mysql Database Backup tool -================================================================================ -Mydumper is a tool used for backing up MySQL database servers much faster than the mysqldump tool distributed with MySQL. It also has the capability to retrieve the binary logs from the remote server at the same time as the dump itself. - -### Mydumper advantages ### - -o Parallelism (hence, speed) and performance (avoids expensive character set conversion routines, efficient code overall) - -o Easier to manage output (separate files for tables, dump metadata,etc, easy to view/parse data) - -o Consistency -- maintains snapshot across all threads, provides accurate master and slave log positions, etc - -o Manageability -- supports PCRE for specifying database and tables inclusions and exclusions - -### Install mydumper on ubuntu ### - -Open the terminal and run the following command - - sudo apt-get install mydumper - -### Using Mydumper ### - -#### Syntax #### - - mydumper [options] - -Application Options: - -- -B, --database Database to dump -- -T, --tables-list Comma delimited table list to dump (does not exclude regex option) -- -o, --outputdir Directory to output files to -- -s, --statement-size Attempted size of INSERT statement in bytes, default 1000000 -- -r, --rows Try to split tables into chunks of this many rows -- -c, --compress Compress output files -- -e, --build-empty-files Build dump files even if no data available from table -- -x, --regex Regular expression for ‘db.table' matching -- -i, --ignore-engines Comma delimited list of storage engines to ignore -- -m, --no-schemas Do not dump table schemas with the data -- -k, --no-locks Do not execute the temporary shared read lock. WARNING: This will cause inconsistent backups -- -l, --long-query-guard Set long query timer in seconds, default 60 -- --kill-long-queries Kill long running queries (instead of aborting) -- -b, --binlogs Get a snapshot of the binary logs as well as dump data -- -D, --daemon Enable daemon mode -- -I, --snapshot-interval Interval between each dump snapshot (in minutes), requires --daemon, default 60 -- -L, --logfile Log file name to use, by default stdout is used -- -h, --host The host to connect to -- -u, --user Username with privileges to run the dump -- -p, --password User password -- -P, --port TCP/IP port to connect to -- -S, --socket UNIX domain socket file to use for connection -- -t, --threads Number of threads to use, default 4 -- -C, --compress-protocol Use compression on the MySQL connection -- -V, --version Show the program version and exit -- -v, --verbose Verbosity of output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2 - -#### Mydumper Example #### - - mydumper \ - --database=$DB_NAME \ - --host=$DB_HOST \ - --user=$DB_USER \ - --password=$DB_PASS \ - --outputdir=$DB_DUMP \ - --rows=500000 \ - --compress \ - --build-empty-files \ - --threads=2 \ - --compress-protocol - -Description of Mydumper's output data - -Mydumper does not output to files, but rather to files in a directory. The --outputdir option specifies the name of the directory to use. - -The output is two parts - -Schema - -For each table in the database, a file containing the CREATE TABLE statement will be created. It will be named: - -dbname.tablename-schema.sql.gz - -Data - -For each table with number of rows above the --rows parameter, you will have a file called: - -dbname.tablename.0000n.sql.gz - -Where "n" starts with 0 up to the number of. - -If you want to restore these backup you can use Myloader - - myloader \ - --database=$DB_NAME \ - --directory=$DB_DUMP \ - --queries-per-transaction=50000 \ - --threads=10 \ - --compress-protocol \ - --verbose=3 - --------------------------------------------------------------------------------- - -via: http://www.ubuntugeek.com/mydumper-mysql-database-backup-tool.html - -作者:[ruchi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file diff --git a/sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md b/sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md deleted file mode 100644 index c9ea39e5fd..0000000000 --- a/sources/tech/20150330 2 Ways to Create Your Own Docker Base Image.md +++ /dev/null @@ -1,58 +0,0 @@ -Translating by ictlyh -2 Ways to Create Your Own Docker Base Image -================================================================================ -Greetings to everyone, today we'll learn about docker base Images and how we can build our own. [Docker][1] is an Open Source project that provides an open platform to pack, ship and run any application as a lightweight container. It has no boundaries of Language support, Frameworks or packaging system and can be run anywhere, anytime from a small home computers to high-end servers. It makes them great building blocks for deploying and scaling web apps, databases, and back-end services without depending on a particular stack or provider. - -Docker Images is a read-only layer which never changes. It Docker uses a **Union File System** to add a read-write file system over the read-only file system. But all the changes go to the top-most writeable layer, and underneath, the original file in the read-only image is unchanged. Since images don't change, images do not have state. Base Images are those images that has no parent. The major benefits of it is that it allows us to have a separate linux OS running. - -Here are the ways on how we can create a custom base image. - -### 1. Creating Docker Base Image using Tar ### - -We can create our own base image using tar, we'll want to start building it with a working Linux Distribution we'll want to package as base image. This process may differ and depends on what distribution we are trying to build. In Debian distribution of Linux, debootstrap is preinstalled. We'll need to install debootstrap before starting the below process. Debootstrap is used to fetch the required packages to build the base system. Here, we'll create image based on Ubuntu 14.04 "Trusty". To do so, we'll need to run the following command in a terminal or shell. - - $ sudo debootstrap trusty trusty > /dev/null - $ sudo tar -C trusty -c . | sudo docker import - trusty - -![creating docker base image using debootstrap](http://blog.linoxide.com/wp-content/uploads/2015/03/creating-base-image-debootstrap.png) - -Here, the above command creates a tar file of the current directory and outputs it to STDOUT, where "docker import - trusty" takes it from STDIN and creates a base image called trusty from it. Then, we'll run a test command inside that image as follows. - - $ docker run trusty cat /etc/lsb-release - -Here are some example scripts that will allow us to build quick base images in [Docker GitHub Repo][2] . - -### 2. Creating Base Image using Scratch ### - -In the Docker registry, there is a special repository known as Scratch, which was created using an empty tar file: - - $ tar cv --files-from /dev/null | docker import - scratch - -![creating docker base image using scratch](http://blog.linoxide.com/wp-content/uploads/2015/03/creating-base-image-using-scratch.png) - - -We can use that image to base our new minimal containers FROM: - -FROM scratch -ADD script.sh /usr/local/bin/run.sh -CMD ["/usr/local/bin/run.sh"] - -The above Dockerfile is from an extremely minimal image. Here, first it starts with a totally blank filesystem, then it copies script.sh that is created to /usr/local/bin/run.sh and then run the script /usr/local/bin/run.sh . - -### Conclusion ### - -Here, in this tutorial, we learned how we can build a custom Docker Base Image out of the box. Building a docker base image is an easy task because there are sets of packages and scripts already available for. Building a docker base image is a lot useful if we want to install what we want in it. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy :-) - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-how-to/2-ways-create-docker-base-image/ - -作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 - -[a]:http://linoxide.com/author/arunp/ -[1]:https://www.docker.com/ -[2]:https://github.com/docker/docker/blob/master/contrib/mkimage-busybox.sh \ No newline at end of file diff --git a/translated/share/20150326 Mydumper--Mysql Database Backup tool.md b/translated/share/20150326 Mydumper--Mysql Database Backup tool.md new file mode 100644 index 0000000000..97e83e0933 --- /dev/null +++ b/translated/share/20150326 Mydumper--Mysql Database Backup tool.md @@ -0,0 +1,110 @@ +Mydumper - MySQL数据库备份工具 +================================================================================ +Mydumper 是MySQL数据库服务器备份工具,它比MySQL自带的mysqldump快很多。它还有在转储本身的时候检索远程服务器二进制日志文件的能力。 + +### Mydumper 的优势 ### + +o 并行性 (因此有高速度) 和 性能 (避免了昂贵的字符集转换例程, 高效的代码) + +o 更容易管理输出 (每个表独立的文件,转储元数据等,简单的查看/解析数据) + +o 一致性 -- 在所有线程中维护快照, 提供准确的主从结点日志位置等。 + +o 可管理性 -- 支持对包含和排除指定的数据库和表的PCRE操作(译者注:PCRE,Perl Compatible Regular Expression,Perl兼容正则表达式) + +### 在Ubuntu上安装 mydumper ### + +打开终端运行以下命令 + + sudo apt-get install mydumper + +### 使用 Mydumper ### + +#### 语法 #### + + mydumper [options] + +应用程序选项: + +- -B, --database 转储的数据库 +- -T, --tables-list 逗号分隔的转储表列表(不排除正则表达式) +- -o, --outputdir 保存输出文件的目录 +- -s, --statement-size 插入语句的字节大小, 默认是1000000个字节 +- -r, --rows 把表分为每个这么多行的块 +- -c, --compress 压缩输出文件 +- -e, --build-empty-files 尽管表中没有数据也创建输出文件 +- -x, --regex 匹配‘db.table'的正则表达式 +- -i, --ignore-engines 逗号分隔的忽略存储引擎列表 +- -m, --no-schemas 不转储有数据的表架构 +- -k, --no-locks 不执行临时共享读锁. 警告: 这会导致备份的不一致性 +- -l, --long-query-guard 设置长查询的计时器秒数,默认是60秒 +- --kill-long-queries 杀死长查询 (而不是退出) +- -b, --binlogs 获取二进制日志文件和转储数据的快照 +- -D, --daemon 开启守护进程模式 +- -I, --snapshot-interval 每个转储快照之间的间隔时间(分钟), 需要开启 --daemon, 默认是60分钟 +- -L, --logfile 日志文件的名字,默认是stdout +- -h, --host 要连接的主机 +- -u, --user 有转储权限的用户名 +- -p, --password 用户密码 +- -P, --port 连接的TCP/IP端口 +- -S, --socket 用于连接的Unix套接字文件 +- -t, --threads 使用的线程数,默认是4 +- -C, --compress-protocol 在MySQL连接上使用压缩 +- -V, --version 查看程序版本号 +- -v, --verbose 输出信息的等级, 0 = silent, 1 = errors, 2 = warnings, 3 = info, 默认是2 + +#### Mydumper 例子 #### + + mydumper \ + --database=$DB_NAME \ + --host=$DB_HOST \ + --user=$DB_USER \ + --password=$DB_PASS \ + --outputdir=$DB_DUMP \ + --rows=500000 \ + --compress \ + --build-empty-files \ + --threads=2 \ + --compress-protocol + +Mydumper输出数据的说明 + +Mydumper不直接指定输出的文件,而是输出到文件夹的文件中。--outputdir 选项指定要使用的目录名称。 + +输出分为两部分 + +架构 + +对数据库中的每个表,创建包含 CREATE TABLE 语句的文件。文件命名为: + +dbname.tablename-schema.sql.gz + +数据 + +对于每个行数多余--rows参数的表, 创建文件名字为: + +dbname.tablename.0000n.sql.gz + +"n"从0开始. + +你可以使用Myloader恢复这些备份 + + myloader \ + --database=$DB_NAME \ + --directory=$DB_DUMP \ + --queries-per-transaction=50000 \ + --threads=10 \ + --compress-protocol \ + --verbose=3 + +-------------------------------------------------------------------------------- + +via: http://www.ubuntugeek.com/mydumper-mysql-database-backup-tool.html + +作者:[ruchi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.ubuntugeek.com/author/ubuntufix \ No newline at end of file diff --git a/translated/tech/20150330 2 Ways to Create Your Own Docker Base Image.md b/translated/tech/20150330 2 Ways to Create Your Own Docker Base Image.md new file mode 100644 index 0000000000..63188ebc5b --- /dev/null +++ b/translated/tech/20150330 2 Ways to Create Your Own Docker Base Image.md @@ -0,0 +1,57 @@ +创建你自己的Docker基本映像的2中方式 +================================================================================ +欢迎大家,今天我们学习一下docker基本映像以及如何构建我们自己的docker基本映像。[Docker][1]是一个开源项目,为打包,装载和运行任何应用提供开发平台的轻量级容器。它没有语言支持,框架和打包系统的限制,从小型的家用电脑到高端的服务器,在何时何地都可以运行。这使它们成为不依赖于特定栈和供应商,很好的部署和扩展网络应用,数据库和后端服务的构建块。 + +Docker映像是不可更改的只读层。Docker使用**Union File System**在只读文件系统上增加读写文件系统。但所有更改都发生在最顶层的可写层,最底部,在只读映像上的原始文件仍然不会改变。由于映像不会改变,也就没有状态。基本映像是没有父类的那些映像。Docker基本映像主要的好处是它允许我们有一个独立允许的Linux操作系统。 + +下面是我们如何可以创建自定义基本映像的方式。 + +### 1. 使用Tar创建Docker基本映像 ### + +我们可以使用tar构建我们自己的基本映像,我们从将要打包为基本映像的运行中的Linux发行版开始构建。这过程可以会有些不同,它取决于我们打算构建的发行版。在Linux的发行版Debian中,已经预装了debootstrap。在开始下面的步骤之前,我们需要安装debootstrap。debootstrap用来获取构建基本系统需要的包。这里,我们构建基于Ubuntu 14.04 "Trusty" 的映像。做这些,我们需要在终端或者shell中运行以下命令。 + + $ sudo debootstrap trusty trusty > /dev/null + $ sudo tar -C trusty -c . | sudo docker import - trusty + +![使用debootstrap构建docker基本映像](http://blog.linoxide.com/wp-content/uploads/2015/03/creating-base-image-debootstrap.png) + +上面的命令为当前文件夹创建了一个tar文件并输出到STDOUT中,"docker import - trusty"从STDIN中获取这个tar文件并根据它创建一个名为trusty的基本映像。然后,如下所示,我们将运行映像内部的一条测试命令。 + + $ docker run trusty cat /etc/lsb-release + +[Docker GitHub Repo][2] 中有一些允许我们快速构建基本映像的事例脚本. + +### 2. 使用Scratch构建基本映像 ### + +在Docker的注册表中,有一个被称为Scratch的使用空tar文件构建的特殊库: + + $ tar cv --files-from /dev/null | docker import - scratch + +![使用scratch构建docker基本映像](http://blog.linoxide.com/wp-content/uploads/2015/03/creating-base-image-using-scratch.png) + + +我们可以使用这个映像构建新的小容器: + +FROM scratch +ADD script.sh /usr/local/bin/run.sh +CMD ["/usr/local/bin/run.sh"] + +上面的Docker文件来自一个很小的映像。这里,它首先从一个完全空的文件系统开始,然后它复制新建的/usr/local/bin/run.sh为script.sh,然后运行脚本/usr/local/bin/run.sh。 + +### 结尾 ### + +这这个教程中,我们学习了如果构建一个自定义的Docker基本映像。构建一个docker基本映像是一个很简单的任务,因为这里有很多已经可用的包和脚本。如果我们想要在里面安装想要的东西,构建docker基本映像非常有用。如果有任何疑问,建议或者反馈,请在下面的评论框中写下来。非常感谢!享受吧 :-) + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-how-to/2-ways-create-docker-base-image/ + +作者:[Arun Pyasi][a] +译者:[ictlyh](https://github.com/ictlyh) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://linoxide.com/author/arunp/ +[1]:https://www.docker.com/ +[2]:https://github.com/docker/docker/blob/master/contrib/mkimage-busybox.sh \ No newline at end of file From e730fb9dff9e392abff07b7f004bd32195013351 Mon Sep 17 00:00:00 2001 From: KayGuoWhu Date: Mon, 6 Apr 2015 19:37:02 +0800 Subject: [PATCH 0475/2517] translating --- ...20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md index f85b2cf725..f6def514b8 100644 --- a/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md +++ b/sources/tech/20150227 Enjoy Android Apps on Ubuntu using ARChon Runtime.md @@ -1,3 +1,4 @@ +translating by KayGuoWhu Enjoy Android Apps on Ubuntu using ARChon Runtime ================================================================================ Before, we gave try to many android app emulating tools like Genymotion, Virtualbox, Android SDK, etc to try to run android apps on it. But, with this new Chrome Android Runtime, we are able to run Android Apps on our Chrome Browser. So, here are the steps we'll need to follow to install Android Apps on Ubuntu using ARChon Runtime. From 15036e7cb761fffa581568192a31c0afe012415a Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 6 Apr 2015 22:47:58 +0800 Subject: [PATCH 0476/2517] PUB:20150202 tespeed - Python Tool To Test Your Internet Speed @geekpi --- ...Python Tool To Test Your Internet Speed.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20150202 tespeed - Python Tool To Test Your Internet Speed.md (74%) diff --git a/translated/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md b/published/20150202 tespeed - Python Tool To Test Your Internet Speed.md similarity index 74% rename from translated/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md rename to published/20150202 tespeed - Python Tool To Test Your Internet Speed.md index 99bfab9842..021eff9c2a 100644 --- a/translated/tech/20150202 tespeed - Python Tool To Test Your Internet Speed.md +++ b/published/20150202 tespeed - Python Tool To Test Your Internet Speed.md @@ -1,12 +1,12 @@ tespeed - 测试网速的Python工具 ================================================================================ -许多电脑呆子知道可以用**speedtest.net**测试网速,但是这个不能在测试中给你足够的控制。Linux用户喜欢在终端中输入命令来完成任务,至少对我是这样的。 +许多电脑呆子知道可以用**speedtest.net**测试网速,但是这个不能在测试中给你足够的控制。Linux用户喜欢在终端中输入命令来完成任务,至少我就是这样的。 -tespeed是一款有很多特性的python工具,可以在终端在测试网速。根据文档,它利用了speedtest.net的服务器,但是用户可以手动指定。 +tespeed是一款有很多特性的python工具,可以在终端在测试网速。根据文档说明,它利用了speedtest.net的服务器,但是用户可以手动指定。 -最初作者用php语言写了tespeed工具,并且证明了ISP提供的网络远低于它广告中所说的那样。但是事情并不是一直如它们想的那样,因此作者移植他的php脚本到python中并且他的工具在github中已经有180个star了。 +最初作者用php语言写了tespeed工具,并且证明了ISP提供的网络远低于它广告中所说的那样。但是事情并不是一直如他们想的那样,因此作者移植他的php脚本到python中,并且他的工具在github中已经有180个star了。 -这意味着**alot**。 +It means **alot**。 ### 如何在linux中测试tespeed ### @@ -23,11 +23,11 @@ tespeed是一款有很多特性的python工具,可以在终端在测试网速 wget http://sourceforge.net/projects/socksipy/files/socksipy/SocksiPy%201.00/SocksiPy.zip/ -下载完成后 解压**SocksiPy.zip**病运行下面的命令来克隆tespeed仓库到你本地机器中。 +下载完成后 解压**SocksiPy.zip**并运行下面的命令来克隆tespeed仓库到你本地机器中。 git clone https://github.com/Janhouse/tespeed.git -接着把SocksiPy文件夹放到你克隆下来的tespeed项目中。现在我们要像截图那样在SocksPy中的**__init__.py**下面创建一个空文件。 +接着把SocksiPy文件夹放到你克隆下来的tespeed项目中。现在我们要像截图那样在SocksiPy中的创建一个叫**__init__.py**的空文件。 ![simple trick to make tespeed work](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed1.png) @@ -39,9 +39,9 @@ tespeed是一款有很多特性的python工具,可以在终端在测试网速 ![testing download and upload speed with tespeed python application](http://blog.linoxide.com/wp-content/uploads/2015/01/tespeed2.png) -在tespeed中有很多选项,如**-ls**来现实服务器,**-p**来指定代理服务器, **-s**来阻止调试(STDERR)输出, 还有很多我们会在本教程中探索。 +在tespeed中有很多选项,如**-ls**来列出服务器,**-p**来指定代理服务器, **-s**来阻止调试(STDERR)输出, 还有很多我们会在本教程中探索。 -如果你想要结果现实成MB,你可以在**python tespeed.py** 后面接上选项 **-mib**。 +如果你想要结果显示成MB,你可以在**python tespeed.py** 后面接上选项 **-mib**。 python tespeed.py -mib @@ -61,7 +61,7 @@ tespeed是一款有很多特性的python工具,可以在终端在测试网速 ### 总结 ### -=tespeed的确是一款帮助用户在终端中测试上传和下载速度的高性能python脚本。它支持很多的选项并且你可以指定列表中你想使用的服务器。继续使用tespeed并在留言区写下你们的体验吧。 +tespeed的确是一款帮助用户在终端中测试上传和下载速度的高性能python脚本。它支持很多的选项并且你可以指定列表中你想使用的服务器。继续使用tespeed并在留言区写下你们的体验吧。 -------------------------------------------------------------------------------- @@ -69,7 +69,7 @@ via: http://linoxide.com/tools/tespeed-python-tool-test-internet-speed/ 作者:[Oltjano Terpollari][a] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 2912c18f05c5134e0b35bc7d23b88367e00c6e99 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 6 Apr 2015 23:07:26 +0800 Subject: [PATCH 0477/2517] PUB:20150211 Install Mumble in Ubuntu an Opensource VoIP Apps @martin2011qi --- ...umble in Ubuntu an Opensource VoIP Apps.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) rename {translated/tech => published}/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md (67%) diff --git a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md b/published/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md similarity index 67% rename from translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md rename to published/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md index 762e363beb..fdaaef9e70 100644 --- a/translated/tech/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md +++ b/published/20150211 Install Mumble in Ubuntu an Opensource VoIP Apps.md @@ -1,8 +1,8 @@ -Ubuntu上的一个开源VoIP应用——Mumble +游戏玩家的福音:在 Ubuntu 上安装开源 VoIP 应用 Mumble ================================================================================ -Mumble是一个自由开源的VoIP应用,遵守New BSD License,主要面向的用户群体是玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 +Mumble是一个自由开源的VoIP应用,在新的 BSD 许可证下发布,主要面向的用户群体是游戏玩家。运行起来类似于TeamSpeak和Ventrilo,用户通过连接到同一个服务器来实现相互通讯。 -Mumble提供了如下的一些特性: +Mumble提供了如下的漂亮特性: - 低延迟,这点对游戏相当重要 - 提供游戏中的可视插件,通过它你可以知道是谁正在和你通话并定位他们的位置 @@ -30,11 +30,11 @@ Mumble提供了如下的一些特性: ![mumble q1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q1.jpg) -选择“是”开机自动启动mumble,接着它会询问你是否运行高性能模式以保持低延迟,为了让它保持最佳性能这是个不错的主意。 +选择“是”让服务器开机时自动启动mumble,接着它会询问你是否运行高优先级模式以保持低延迟,为了让它保持最佳性能这是个不错的主意。 ![mumble q2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q2.jpg) -接着为你刚安装好的mumble服务端设置最高权限用户的密码,记住密码它会在登录时用到。 +接着为你刚安装好的mumble服务端设管理员用户的密码,记住这个密码,它会在登录时用到。 ![mumble q3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-q3.jpg) @@ -44,7 +44,7 @@ Mumble提供了如下的一些特性: $ sudo apt-get install mumble -第一次运行mumble时,导向将会帮助你配置音频的输入输出,使其能在客户端上保持最好的效果。第一次同样也会询问你要使用的是什么声音设备和麦克风: +第一次运行mumble时,配置向导将会帮助你配置音频的输入输出,使其能在客户端上保持最好的效果。第一次同样也会询问你要使用的是什么声音设备和麦克风: ![mumble client 1](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-1.jpg) @@ -52,15 +52,15 @@ Mumble提供了如下的一些特性: ![mumble client 2](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-2.jpg) -因为mumble帮你加密所有的通讯内容所以它会征询你创建证书: +因为mumble会帮你加密所有的通讯内容所以它会要求你创建证书: ![mumble client 3](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-client-3.jpg) -完成导向后你就能添加第一个服务器,连接对话框如下图所示: +完成配置向导后你就能添加第一个服务器,连接对话框如下图所示: ![mumble add server](http://blog.linoxide.com/wp-content/uploads/2015/01/mumble-add-server.jpg) -首先输入一个标签,名字任意因为那只不过是为了记住服务器的,然后输入服务器的地址和端口,最后使用“SuperUser”作为用户名而密码则是你配置mumble服务器端时输入的密码。 +首先输入一个标签,名字任意因为那只不过是为了记住服务器的,然后输入服务器的地址和端口,最后使用“SuperUser”作为用户名,而密码则是你配置mumble服务器端时输入的密码。 现在你可以连接到服务器了,在联网玩游戏或与你好友、队友聊天开黑时享受这些功能给你带来的乐趣吧! @@ -69,8 +69,8 @@ Mumble提供了如下的一些特性: via: http://linoxide.com/ubuntu-how-to/install-mumble-ubuntu/ 作者:[Adrian Dinu][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[martin2011qi](https://github.com/martin2011qi) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From 9797e2c48a2cd204779eba068f47dfc3dbbcc2f7 Mon Sep 17 00:00:00 2001 From: wxy Date: Mon, 6 Apr 2015 23:40:25 +0800 Subject: [PATCH 0478/2517] PUB:How to create a custom backup plan for Debian with backupninja @SPccman --- ...backup plan for Debian with backupninja.md | 59 +++++++++---------- 1 file changed, 29 insertions(+), 30 deletions(-) rename {translated/tech => published}/How to create a custom backup plan for Debian with backupninja.md (67%) diff --git a/translated/tech/How to create a custom backup plan for Debian with backupninja.md b/published/How to create a custom backup plan for Debian with backupninja.md similarity index 67% rename from translated/tech/How to create a custom backup plan for Debian with backupninja.md rename to published/How to create a custom backup plan for Debian with backupninja.md index 50cd15c6ce..cfd0237c92 100644 --- a/translated/tech/How to create a custom backup plan for Debian with backupninja.md +++ b/published/How to create a custom backup plan for Debian with backupninja.md @@ -1,21 +1,21 @@ 使用backupninja为Debian定制备份计划 -======= +============ -backupninja是Debian系统(以及基于Debian的发行版)中一个强大的、高度可配置的备份软件。在[前一篇文章][1]中,我们探讨了如何安装backupninja以及如何设置两个备份操作并执行。然而,那些只是冰山一角。这一次,我们要讨论如何利用Helper与辅助功能,可以使用这些功能定制策略以完成任何备份需要。 +backupninja是Debian系统(以及基于Debian的发行版)中一个强大的、高度可配置的备份软件。在[前一篇文章][1]中,我们探讨了如何安装backupninja以及如何设置两个备份操作并执行。然而,那些只是冰山一角。这一次,我们要讨论如何定制 Handler 和 Helper ,使用这些功能定制策略以完成任何备份需要。 ###回顾 backupninja -backupninja的特点是它完全抛弃纯文本的配置文件/etc/backup.d,软件自己会搞定。另外,我们可以编写自定义脚本(又叫 “handlers”)放在/usr/share/backupninja 目录下来完成不同类型的备份操作。此外,可以通过ninjahelper的基于ncurses的交互式菜单(又叫”helpers")来指导我们创建一些配置文件,使得人工错误率降到最低。 +backupninja的一个独特的地方是它可以完全抛弃/etc/backup.d中的纯文本配置文件和操作文件,软件自己会搞定。另外,我们可以编写自定义脚本(又叫 “handler”)放在/usr/share/backupninja 目录下来完成不同类型的备份操作。此外,可以通过ninjahelper的基于ncurses的交互式菜单(又叫“helper”)来指导我们创建一些配置文件,使得人工错误降到最低。 ###创建定制的Handler与Helper 这一节的目标是创建一个脚本,将home目录以**gzip**或**bzip2**压缩包的形式备份起来,不包括音乐与视频文件。我们将这个文件命名为home,将它放在/usr/backup/ninja目录下。 -尽管你可以使用默认的tar handler(参考 /usr/share/backupninja/tar 与 /usr/share/backupninja/tar.helper)来达到这个效果,但是我们使用这种方法来展示如何创建实用的 handler 脚本与基于 ncurses 的 helper。你可以根据你的需求来决定如何运用同样的原则。 +尽管你可以使用默认的tar handler(参考 /usr/share/backupninja/tar 与 /usr/share/backupninja/tar.helper)来达到这个效果,但是我们使用这种方法来展示如何创建实用的 handler 脚本与基于 ncurses 的 helper。你可以根据你的需求来决定如何运用这里的方法。 -由于 handlers 来源与主脚本,所以无需以#!/bin/bash开始。 +由于 handlers 来源于主脚本,所以无需以#!/bin/bash开始的释伴行(shebang line)。 -我们推荐的 handler (/usr/share/backupninja/home)如下所示。它带有非常多的注释说明。getconf 功能用来读取备份操作的配置文件。如果你指定了一个变量的值,那么它会覆盖配置文件中对应变量的值: +我们编写的 handler (/usr/share/backupninja/home)如下所示。已经详细注释了。getconf 函数用来读取备份操作的配置文件。如果你指定了一个变量的值,那么它会覆盖配置文件中对应变量的值: #/home 目录 handler 脚本 @@ -34,25 +34,25 @@ backupninja的特点是它完全抛弃纯文本的配置文件/etc/backup.d,软 #不包含 *.mp3 与 *.mp4 文件 getconf excludes - # 默认扩展一打包的备份文件 + # 要打包备份文件的默认扩展名 getconf EXTENSION - # Absolute path to date binary + # tar 程序的绝对路径 getconf TAR `which tar` - # Absolute path to date binary + # date 程序的绝对路径 getconf DATE `which date` # 日期格式 DATEFORMAT="%Y-%m-%d" - # 如果备份目录不存在,以致命错误退出 + # 如果备份目录不存在,以致命错误退出 if [ ! -d "$backupdir" ] then mkdir -p "$backupdir" || fatal "Can not make directory $backupdir" fi - # 如果备份目录不可写, 同样以致命错误退出 + # 如果备份目录不可写,同样以致命错误退出 if [ ! -w "$backupdir" ] then fatal "Directory $backupdir is not writable" @@ -85,7 +85,7 @@ backupninja的特点是它完全抛弃纯文本的配置文件/etc/backup.d,软 exclude_options="$exclude_options --exclude $i" done - # 调试信息, 执行备份操作 + # 调试信息,执行备份操作 debug "Running backup: " $TAR -c -p -v $compress_option $exclude_options \ -f "$backupdir/$backupname-"`$DATE "+$DATEFORMAT"`".$EXTENSION" \ $includes @@ -100,9 +100,9 @@ backupninja的特点是它完全抛弃纯文本的配置文件/etc/backup.d,软 [ $? -ne 0 ] && fatal "Tar backup failed" -接下来我们将要创建helper文件 (/usr/share/backupninja/home.helper)这样,hendlers将会以菜单的形式在**ninjahelper**中显示: +接下来我们将要创建helper文件(/usr/share/backupninja/home.helper)。这样,hendlers将会以菜单的形式在**ninjahelper**中显示: - # 备份操作描述. 以下划线分割单词. + # 备份操作描述,以下划线分割单词 HELPERS="$HELPERS home:backup_of_home_directories" home_wizard() { @@ -173,7 +173,7 @@ backupninja的特点是它完全抛弃纯文本的配置文件/etc/backup.d,软 $home_includes $home_excludes - # 二进制压缩包,必须为GNU tar + # tar 程序的路径,必须为GNU tar TAR `which tar` DATE `which date` DATEFORMAT "%Y-%m-%d" @@ -186,19 +186,19 @@ backupninja的特点是它完全抛弃纯文本的配置文件/etc/backup.d,软 ###运行 ninjahelper### -当创建了名为home的handler脚本以及对应的名为home.helper的helper后,运行ninjahelper命令创建一个新的备份操作。 +当创建了名为home的handler脚本以及对应的home.helper后,运行ninjahelper命令创建一个新的备份操作。 #ninjahelper -选择 create a new backup action(创建一个新的备份操作). +选择 create a new backup action(创建一个新的备份操作)。 ![](https://farm8.staticflickr.com/7467/15322605273_90edaa5bc1_z.jpg) -接下来将看到可选的操作类型,这里选择“backup of home directories"(备份home目录); +接下来将看到可选的操作类型,这里选择“backup of home directories"(备份home目录): ![](https://farm9.staticflickr.com/8636/15754955450_f3ef82217b_z.jpg) -接下来会显示在helper中设置的默认值(这里只有3个)。可以编辑文本框中的值。注意,关于”when”变量的语法,参考文档的日程安排章节。 +然后会显示在helper中设置的默认值(这里只显示了3个)。可以编辑文本框中的值。注意,关于“when”变量的语法,参考文档的日程安排章节。 ![](https://farm8.staticflickr.com/7508/15941578982_24b680e1c3_z.jpg) @@ -210,9 +210,9 @@ backupninja的特点是它完全抛弃纯文本的配置文件/etc/backup.d,软 ![](https://farm8.staticflickr.com/7534/15942239225_bb66dbdb63.jpg) -按回车键显示这个备份操作的选项。因为它非常简单,可所以我们可以随便对它进行一些实验。 +按回车键显示这个备份操作的选项。因为它非常简单,所以我们可以随便对它进行一些实验。 -注意,“run this action now"(立即运行)选项会不顾日程表安排的时间而立即进行备份操作: +注意,“run this action now"(立即运行)选项会不顾日程表安排的时间而立即进行备份操作: ![](https://farm8.staticflickr.com/7508/15754955470_9af6251096_z.jpg) @@ -220,27 +220,26 @@ backupninja的特点是它完全抛弃纯文本的配置文件/etc/backup.d,软 ![](https://farm9.staticflickr.com/8662/15754955480_487d040fcd_z.jpg) -上面的图片告诉我们,备份操作讲不会成功,因为它所需要链接的远程主机似乎宕机了。另外,在helper文件中指定的目录不存在。当纠正这些问题后,重新开始备份操作。 +上面的图片告诉我们,用于完成备份操作的连接没有建立,因为它所需要链接的远程主机似乎宕机了。另外,在helper文件中指定的目标目录不存在。当纠正这些问题后,重新开始备份操作。 需要牢记的事情: - - 当你新建了一个自定义脚本来处(如foobar)理特殊的备份操作时,那么你还需要编写与之对应的helper(foobar.helper)文件,ninjahelper 将通过它生成名为10.foobar(下一个操作为11,以此类推)的文件,保存在/etc/backup.d目录下,而这个文件才是备份操作的真正的配置文件。 - - 可以通过ninjahelper设定行备份操作的执行时间,或按照”when”变量中设置的频率来执行。 + - 当你在/usr/share/backupninja 下新建了一个自定义脚本(如foobar)来处理特殊的备份操作时,那么你还需要编写与之对应的helper(foobar.helper)文件,ninjahelper 将通过它生成名为10.foobar(下一个操作为11,以此类推)的文件,保存在/etc/backup.d目录下,而这个文件才是备份操作的真正的配置文件。 + - 可以通过ninjahelper设定好备份操作的执行时间,或按照“when”变量中设置的频率来执行。 ###总结### -在这篇文章中,我们探讨了如何从头创建我们自己的备份操作,以及如何向ninjahelper添加相关的菜单以生成对应的配置文件。通过[上一篇][2]与这一篇文章,我希望我已经给出了足够好的理由让你继续研究,或者至少应该尝试一下。 +在这篇文章中,我们探讨了如何从头创建我们自己的备份操作,以及如何向ninjahelper添加相关的菜单以生成对应的配置文件。通过[上一篇][1]与这一篇文章,我希望我已经给出了足够好的理由让你继续研究,或者至少应该尝试一下。 ------------------------------ via: http://xmodulo.com/create-custom-backup-plan-debian.html -作者:[ Gabriel Cánepa][a] -译者:[SPccman](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +作者:[Gabriel Cánepa][a] +译者:[SPccman](https://github.com/SPccman) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:http://xmodulo.com/author/gabriel -[1]:http://xmodulo.com/backup-debian-system-backupninja.html -[2]:http://xmodulo.com/backup-debian-system-backupninja.html +[1]:http://linux.cn/article-5096-1.html From 4537d0dbfd01623fcaa526b1116da211ce410b5a Mon Sep 17 00:00:00 2001 From: joeren Date: Tue, 7 Apr 2015 08:29:02 +0800 Subject: [PATCH 0479/2517] Update 20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md --- ... WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md b/sources/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md index 651952ec1d..48971b9ca8 100644 --- a/sources/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md +++ b/sources/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md @@ -1,3 +1,4 @@ +Translating by GOLinux ... Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM ================================================================================ **TL;DR In a local, Vagrant-based environment HHVM lost, probably due to a bug; it’s still investigated with the help of the HHVM guys! However on a DigitalOcean 4GB box it beat even the latest build of PHP-NG!** @@ -262,4 +263,4 @@ via: https://kinsta.com/blog/real-world-wordpress-benchmarks-with-php5-5-php5-6- 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 [a]:https://kinsta.com/blog/author/kinstadmin/ -[1]:https://kinsta.com/blog/hhvm-and-wordpress/ \ No newline at end of file +[1]:https://kinsta.com/blog/hhvm-and-wordpress/ From fc98155bb8e8ae6c8d02e1d52667b40ed6c4fe7b Mon Sep 17 00:00:00 2001 From: DeadFire Date: Tue, 7 Apr 2015 11:26:24 +0800 Subject: [PATCH 0480/2517] =?UTF-8?q?20150407-1=20=E9=80=89=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ys Relaxing Sounds to Keep You Creative.md | 55 +++ ... To Get Your iTunes Experience On Linux.md | 86 +++++ ...w To Install CentOS Web Panel In CentOS.md | 329 ++++++++++++++++++ 3 files changed, 470 insertions(+) create mode 100644 sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md create mode 100644 sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md create mode 100644 sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md diff --git a/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md b/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md new file mode 100644 index 0000000000..f8f2b714fc --- /dev/null +++ b/sources/share/20150407 Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative.md @@ -0,0 +1,55 @@ +Ambient Noise Player for Ubuntu Plays Relaxing Sounds to Keep You Creative +================================================================================ +![Rain is a soothing sound for some](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/raining-1600x900-wallpaper_www.wallpapermay.com_84-1.jpg) +Rain is a soothing sound for some + +**If I plan on being productive I can’t listen to ‘regular’ music. It distracts me. I start singing along or get reminded of a different track, so end up poking around my library and… Well, that’s that.** + +But by the same token I can’t work in silence (living with 6 cats means that’s not a possibility, though) but the inconsistency jars and sudden clatters and meows interrupt. + +My solution that is to **listen to ambient noise**. + +I find it helps nullify the misdirection my brain craves, land provide a soundscape that wraps the noise of kitty play time. + +Ambient noise is the noise that play out in the background of daily lives; the rain drumming on a window, the intelligible hum of coffee shop chatter, the gossiping of birds on the wind, and so on. + +Listening to these sounds can force a racing mind to slow down, rebase and refocus on what matters. + +### Ambient Noise App for Ubuntu ### + +![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/04/ambient-noise-player-750x365.jpg) + +Google Play and Apple app stores are packed full of ambient and white noise apps. Now a similar tool is available natively on Ubuntu. + +‘[Ambient Noise][1]‘ — as the name might suggest — is an audio player designed specifically for playing these sounds. It even integrates with the Ubuntu Sound Menu for a neat ‘pick, click and relax’ experience. + +The app, which is also known as ‘ANoise Player’ and is made by Marcos Costales, comes with a set of **8 high-quality sounds**. + +These 8 presets cover various ambient atmospheres, ranging from the rhythmic sound of rain, to the tranquil tones of nature at night, and back to the buzz of a bustling coffee shop in the afternoon. + +### Install ANoise Player in Ubuntu ### + +Ambient Noise player for Ubuntu is a free application and is available to install from its own dedicated PPA. + +To do this open a new Terminal window and run: + + sudo add-apt-repository ppa:costales/anoise + + sudo apt-get update && sudo apt-get install anoise + +Once installed simply open it from the Unity Dash (or your DE’s equivalent), pick your preferred noise using Sound Menu and then …relax! The app even remembers which sound you used last. + +Even so, give it a try out and see if it suits your needs. I would say let me know what you think, but I will be too focused to hear — and so might you! + +-------------------------------------------------------------------------------- + +via: http://www.omgubuntu.co.uk/2015/04/ambient-noise-player-app-for-ubuntu-linux + +作者:[Joey-Elijah Sneddon][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:https://plus.google.com/117485690627814051450/?rel=author +[1]:http://anoise.tuxfamily.org/ \ No newline at end of file diff --git a/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md b/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md new file mode 100644 index 0000000000..194c3307e2 --- /dev/null +++ b/sources/share/20150407 Top 6 Ways To Get Your iTunes Experience On Linux.md @@ -0,0 +1,86 @@ +Top 6 Ways To Get Your iTunes Experience On Linux +================================================================================ +![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/itunes-linux-840x420.jpg?35dc20) + +As you’re getting used to Linux (potentially as your new main operating system), you’ll eventually try to find a way to efficiently manage your music. iTunes comes to mind because it’s been the most popular way to manage music over the years, but you’ll quickly find out that iTunes isn’t available natively on Linux. Plus, better ways exist to manage your music now that it’s 2015. + +However, that doesn’t automatically mean that you won’t be able to manage your music the way you want to. There’s plenty of other ways to keep tabs on your music library. Here’s six great ways to get it done. + +### iTunes via WINE ### + +Even if iTunes isn’t available in Linux as a native application, you can still try to [get it to work under WINE][1] or PlayOnLinux. These pieces of software try to add a compatibility layer so that Windows applications work on Linux, but the results are far from perfect. Therefore, [not all Windows applications will run with WINE][2] — but it’s still worth a try. + +Each version of iTunes can give you different results, but the general process is as follows: + +1. Install WINE +1. Run the iTunes installer via WINE +1. Google and try to solve any problems you come across. + +Again, you might come across issues somewhere along the way which cannot be solved, such as the installer failing or the installed application refusing to run. That’s just how it is with WINE. + +If you really want to use iTunes and you happen to luck out with WINE, then that’s great. However, if you’d rather use a native Linux application or WINE didn’t work for you, then there are options here as well. Several “music library manager” programs are available to give you a quick oversight of your music and play it directly in the application, as well as make playlists. + +### [Amarok][3] ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/amarok_main.jpg?35dc20) + +If you use KDE, then I’d recommend Amarok. It has [plenty of features to manage your music][4] and tight desktop integration with KDE. It also has useful features such as Last.FM integration, file tracking, dynamic playlists, and script support. It can even pull up biographies of artists as you play their songs. + +### [Banshee][5] ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/banshee_main.jpg?35dc20) + +If you use GNOME or any GTK-based desktop environment (they’re quite common), then I’d recommend Banshee as a [full-featured music library][6] manager. It has a very similar feature set as Amarok, including Last.FM integration, Internet radio support, podcast support, and much more. Amarok and Banshee are really among the top two choices, so which one you choose should depend on which desktop environment you’re using (for integration’s sake). + +### [Rhythmbox][7] ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/rhythmbox_main.jpg?35dc20) + +Rhythmbox as a more [lightweight music library alternative][8] that is best used on GTK-based desktop environments. However, it still has quite a few features. You also get Last.FM support here, plus gapless playback and integration with various other applications such as Nautilus, XChat, and Pidgin. + +### [Clementine][9] ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/clementine_main.jpg?35dc20) + +Another application called Clementine also gets my recommendation with its clean and intuitive interface. It has tons of support for third-party services such as Spotify, Digitally Imported, and Dropbox. There’s also an Android app you can use as a remote control for Clementine. [Clementine is cross-platform][10] and available for Windows and Mac OS X. + +They all are excellent at managing and playing your music. The only downside to all of these is that there is no iOS device integration, and there’s currently no modern application that can do that. However, iOS has received enough improvements that it’s virtually unnecessary to connect it to a computer anymore. + +### [Google Play Music][11] ### + +![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/google_music.jpg?35dc20) + +Lastly, if none of those applications satisfy your needs, you can take a look at Google Play Music. This online service acts as a music library manager that can play your music, but it also has some extra benefits. You can upload all your music to it and have access on any device connected to the Internet. That also means that you won’t have to sync your music between your computer and your mobile device (no matter if Android or iOS) because you have access to Google Play Music from both. If you want to expand your library you can get the All Access subscription, but it’s not a requirement. You can use it simply as a music library completely free for up to 20,000 songs. + +#### Wot, no Spotify?! #### + +The only reason why I don’t mention Spotify is that, although it’s also a great way to access and listen to music, it doesn’t really let you manage your own music. You can’t upload trakcs to Spotify — you have to listen to what they give you. Albeit they give you a lot, but it’s nonetheless a different mechanism. + +### You Have Options ### + +With these six options, you should be able to get iTunes-like functionality on your desktop. These options focused mainly on managing and playing your music library, but if there are any other features that you need from iTunes, other Linux-native applications can take care of those needs. + +**What music applications do you regularly use on Linux?** Let us know in the comments! + +-------------------------------------------------------------------------------- + +via: http://www.makeuseof.com/tag/top-6-ways-get-itunes-experience-linux/ + +作者:[Danny Stieben][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.makeuseof.com/tag/author/danny/ +[1]:http://www.makeuseof.com/tag/how-about-some-wine-with-your-linux/ +[2]:http://www.makeuseof.com/answers/does-wine-runs-all-windows-apps/ +[3]:https://amarok.kde.org/ +[4]:http://www.makeuseof.com/tag/control-music-amarok-linux/ +[5]:http://banshee.fm/ +[6]:http://www.makeuseof.com/tag/banshee-20-comprehensive-media-player-streamer-podcast-tool-linux/ +[7]:https://wiki.gnome.org/Apps/Rhythmbox +[8]:http://www.makeuseof.com/tag/play-manage-music-collection-rhythmbox-linux/ +[9]:https://www.clementine-player.org/ +[10]:http://www.makeuseof.com/tag/need-a-lightweight-music-player-without-sacrificing-features-clementine-cross-platform/ +[11]:http://music.google.com/ \ No newline at end of file diff --git a/sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md b/sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md new file mode 100644 index 0000000000..ccad9d1b87 --- /dev/null +++ b/sources/tech/20150407 How To Install CentOS Web Panel In CentOS.md @@ -0,0 +1,329 @@ +How To Install CentOS Web Panel In CentOS +================================================================================ +![](http://1102047360.rsc.cdn77.org/wp-content/uploads/2015/04/centos-790x427.jpg) + +### About CentOS Web Panel ### + +There are so many free and paid Control panels available nowadays. We will, today, discuss about [CentOS Web panel(CMP)][1], specially designed for RPM based distributions like CentOS, RHEL, Scientific Linux etc. **CWP** is a free, Open Source control panel that can be widely used for deploying a Web hosting environment easily. Unlike other Control panels, CWP is automatically deploy the LAMP stack with Varnish Cache server. + +### Features ### + +CWP comes with lot of features and free services. As I mentioned before, CWP automatically installs full LAMP stack (apache, php, phpmyadmin, webmail, mailserver etc.) on your server. + +Here is the complete list of features and software that will be automatically installed and configured during CWP installation. + +#### List of softwares to be installed and configured during CWP installation: #### + +- Apache Web Server +- PHP 5.4 +- MySQL + phpMyAdmin +- Postfix + Dovecot + roundcube webmail +- CSF Firewall +- File System Lock (no more website hacking, all your files are locked from changes) +- Backups; AutoFixer for server configuration + +#### 3rd Party Applications: #### + +- CloudLinux + CageFS + PHP Selector +- Softaculous – Script Installer (Free and Premium) + +#### Web Server: #### + +- Varnish Cache server +- Compiles Apache from source +- Apache reCompiler + Additional modules +- Apache server status, configuration +- Edit apache vhosts, vhosts templates, include configuration +- Rebuild all apache Virtual hosts +- suPHP & suExec +- Mod Security + OWASP rules +- Tomcat 8 server management +- DoS protection +- Perl cgi script support + +#### PHP: #### + +- PHP Switcher (switch between PHP versions like: 5.2, 5.3, 5.4, 5.5) +- PHP Selector select PHP version per user or per folder (PHP 4.4, 5.2, 5.3, 5.4, 5.5, 5.6) +- Simple php editor +- Simple php.ini generator in the users panel +- PHP addons +- PHP.ini editor & PHP info & List modules +- php.ini per user account +- FFMPEG, For Video streaming websites +- CloudLinux + PHP Selector + +#### User Management #### + +- Add, List, Edit adn Remove Users +- User Monitoring +- Shell access management +- User Limit Managment +- Limit Processes +- Limit Open Files +- User FTP & File Manager +- CloudLinux + CageFS +- Dedicated IP per account + +#### DNS: #### + +- FreeDNS +- Add, Edit, List and Remove DNS zones +- Edit nameserver IPs +- DNS zone template editor +- New Easy DNS Zone Manager (with ajax) +- New DNS Zone list with Additional resolving information using google (also checking rDNS, nameservers….) + +#### Email: #### + +- Postfix & dovecot +- MailBoxes, Alias +- Roundcube webmail +- Postfix Mail queue +- rDNS Checker Module +- AntiSPAM +- SPF & DKIM Integration +- Re-Build Postfix/Dovecot Mail server with AntiVirus, AntiSpam Protection +- Email Auto Responder + +#### System: #### + +- CPU core and clock info +- Memory usage info +- Detailed Disk status +- Software Info like kernel version, uptime etc. +- Services Status +- ChkConfig Manager +- Network port usage +- Network configuration +- SSHD configuration +- Auto-Fixer (checks important configuration and tries to auto-fix issues) + +#### Monitoring: #### + +- Monitor services eg. top, apache stats, mysql etc. +- Use Java SSH Terminal/Console within panel +- Services Configuration (eg. Apache, PHP, MySQL etc) +- Run shell commands in screen/background + +#### Security: #### + +- CSF Firewall +- SSL generator +- SSL Certificate Manager +- CloudLinux + CageFS + +#### SQL: #### + +- MySQL Database Management +- Add local or remote access user +- Live Monitor MySQL process list +- Create, Remove database +- Add additional users per database +- MySQL server configuration +- PhpMyAdmin +- PostgreSQL, phpPgAdmin Support + +#### Additional options: #### + +- TeamSpeak 3 Manager +- Shoutcast Manager +- Auto-update +- Backup manager +- File Manager +- Virtual FTP users per domain +- cPanel Account Migration (restores files, databases and database users) +- And many more. + +### Install CentOS Web Panel In CentOS 6 ### + +At the time writing this tutorial, CWP only supports upto CentOS 6.x versions. It doesn’t work on CentOS 7 and later versions. + +#### Prerequisites: #### + +**Before installing CWP, you must know the following information:** + +- CWP only supports static IP addresses. It does not support dynamic, sticky, or internal IP addresses. +- CWP doesn’t has an uninstaller. After you install CWP, you must reinstall the server to remove it. +- Only install CWP on a freshly installed operating system without any configuration changes. +- Need atleast 512MB RAM for 32 bit systems. +- 1024MB for 64 bit systems. +- Need 4GB RAM or more to deploy all modules. +- At least 20GB or hard disk space is required. + +For testing purpose in VirtualBox, 640MB RAM and 10GB hdd space is enough. + +#### Update server: #### + +Install wget package first. This is needed to download CWP. + + yum install wget -y + +Update your server using command: + + yum update -y + +Reboot once to take effect the changes. + +#### Install CWP: #### + +Change to **/usr/local/src/** directory: + + cd /usr/local/src + +Download latest CWP version with command: + + wget http://centos-webpanel.com/cwp-latest + +If the above URL doesn’t work, use the following link instead. + + wget http://dl1.centos-webpanel.com/files/cwp-latest + +Then, start CWP installer using command: + + sh cwp-latest + +**Sample output:** + +![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_001.png) + +![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_002.png) + +The installation will take upto 30 minutes or more depending upon your Internet speed. + +Finally, you’ll see the installation completed message like below. Note down the details such as mysql root user password and login URLs of CWP. You”ll need them later. Then Press Enter key to reboot your system. + +![](http://www.unixmen.com/wp-content/uploads/2015/04/root@server-usr-local-src_004.png) + +After booting into the system, you will see the CWP welcome login message. + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CentOS-6.5-Minimal-Running-Oracle-VM-VirtualBox_006.png) + +#### Adjust Firewall/Router: #### + +The CWP default web console ports are **2030(http)** and **2031(https)**. You should allow the both ports through firewall/Router in order to access the CWP web console from a remote system. + +To do that, edit: + + vi /etc/sysconfig/iptables + +Add the following lines: + + [...] + -A INPUT -p tcp -m state --state NEW -m tcp --dport 2030 -j ACCEPT + -A INPUT -p tcp -m state --state NEW -m tcp --dport 2031 -j ACCEPT + [...] + +Save and close the file. Restart iptables service to take effect the changes. + + service iptables restart + +### Accessing CWP Web Console ### + +Open up your browser and type: + +**http://IP-Address:2030/** + +Or + +**https://IP-Address:2031/** + +You will see the following like screen. + +The login credentials are: + +- **Username**: root +- **Password**: your root password + +![](http://www.unixmen.com/wp-content/uploads/2015/04/Login-CentOS-WebPanel-Mozilla-Firefox_007.png) + +This is how CWP dashboard will look: + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_008.png) + +Congratulations! CWP has been successfully has been installed. + +### CWP Basic Configuration ### + +Next, we have to do couple of things such as: + +1. Setup nameservers +1. Setup shared ip (must be your public IP address) +1. Setup at least one hosting package (or edit default package) +1. Setup root email, etc. + +#### Setup nameservers: #### + +To setup nameservers, go to **DNS Functions -> Edit nameservers IPs**. + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_009.png) + +Set your nameservers and click Save changes button. + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_010.png) + +#### Setup Shared IP And Root mail ID: #### + +This is important step to host websites on your host. To setup shared IP, go to **CWP Settings -> Edit settings**. + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_011.png) + +Enter your Static IP and Email ID, and Click Save settings button. + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_012.png) + +Now, CWP is ready to host websites. + +#### Setup hosting package: #### + +A hosting package is nothing but a Web hosting plan that consists of allowed diskspace, bandwidth, no of FTP accounts, no of email ids, and no of databases etc. You can setup any number of web hosting plans as your wish. + +To add a package, go to **Packages – Add a Package** from the CWP console. + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_013.png) + +Enter the name of the package, amount of Diskquota/RAM allowed, FTP/Email accounts, Databases, and subdomains etc. Click Save settings button to create the web hosting plan. + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_014.png) + +Now, CWP is ready to host your domains. + +#### Adding Domains: #### + +To create a new Domain, you to have at least one user account. + +To add a user, go to **User Accounts -> New Account**. + +Enter the domain(ex.unixmen.com), username, password and Email id etc. Finally, click **Create**. + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_016.png) + +Now, let us add a new domain. + +To add a domain, go to **Domains -> Add Domain**. + +Enter the Domain and assign the domain the users of your choice. + +![](http://www.unixmen.com/wp-content/uploads/2015/04/CWP.admin-Mozilla-Firefox_017.png) + +### Conclusion ### + +In this tutorial, we have seen how to install and configure CentOS Web Panel to create a simple web hosting environment. CWP is very simple to install and use. Even a novice user can create a basic web hosting server in a couple of hours. Also, CWP is completely free to use and open source. Give it a try! You won’t be disappointed. + +You can find the more details about CWP in the [CentOS Web Panel Wiki page][2]. + +Cheers! + +-------------------------------------------------------------------------------- + +via: http://www.unixmen.com/how-to-install-centos-web-panel-in-centos/ + +作者:[SK][a] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 + +[a]:http://www.unixmen.com/author/sk/ +[1]:http://centos-webpanel.com/ +[2]:http://wiki.centos-webpanel.com/ \ No newline at end of file From f3df0a812e56ac5729f4047625565b30b72cb2d6 Mon Sep 17 00:00:00 2001 From: GOLinux Date: Tue, 7 Apr 2015 11:50:36 +0800 Subject: [PATCH 0481/2517] [Translated]20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md --- Dict.md | 119 ++++++++ ...arks with PHP5.5 PHP5.6 PHP-NG and HHVM.md | 266 ----------------- ...arks with PHP5.5 PHP5.6 PHP-NG and HHVM.md | 270 ++++++++++++++++++ 3 files changed, 389 insertions(+), 266 deletions(-) create mode 100644 Dict.md delete mode 100644 sources/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md create mode 100644 translated/tech/20141226 Real-World WordPress Benchmarks with PHP5.5 PHP5.6 PHP-NG and HHVM.md diff --git a/Dict.md b/Dict.md new file mode 100644 index 0000000000..ab220cb977 --- /dev/null +++ b/Dict.md @@ -0,0 +1,119 @@ + + +